diff --git a/CGMES_2.4.13_18DEC2013/ACDCConverter.cpp b/CGMES_2.4.13_18DEC2013/ACDCConverter.cpp index b12f6d2bc..6216b3adb 100644 --- a/CGMES_2.4.13_18DEC2013/ACDCConverter.cpp +++ b/CGMES_2.4.13_18DEC2013/ACDCConverter.cpp @@ -10,29 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "ACDCConverterDCTerminal.hpp" #include "Terminal.hpp" -#include "ApparentPower.hpp" -#include "CurrentFlow.hpp" -#include "ActivePower.hpp" -#include "Voltage.hpp" -#include "Voltage.hpp" -#include "Voltage.hpp" -#include "Integer.hpp" -#include "ActivePower.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" -#include "Voltage.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "Voltage.hpp" -#include "Voltage.hpp" -#include "Voltage.hpp" -#include "Voltage.hpp" using namespace CIMPP; -ACDCConverter::ACDCConverter() : PccTerminal(nullptr) {}; -ACDCConverter::~ACDCConverter() {}; +ACDCConverter::ACDCConverter() : PccTerminal(nullptr) {} +ACDCConverter::~ACDCConverter() {} static const std::list PossibleProfilesForClass = { @@ -80,278 +62,311 @@ ACDCConverter::getPossibleProfilesForAttributes() const return map; } +bool assign_ACDCConverterDCTerminal_DCConductingEquipment(BaseClass*, BaseClass*); +bool assign_ACDCConverter_DCTerminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + ACDCConverterDCTerminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->DCTerminals.begin(), element->DCTerminals.end(), element2) == element->DCTerminals.end()) + { + element->DCTerminals.push_back(element2); + return assign_ACDCConverterDCTerminal_DCConductingEquipment(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_ACDCConverter_baseS(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Terminal_ConverterDCSides(BaseClass*, BaseClass*); +bool assign_ACDCConverter_PccTerminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PccTerminal != element2) + { + element->PccTerminal = element2; + return assign_Terminal_ConverterDCSides(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_ACDCConverter_baseS(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->baseS; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_idc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_idc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->idc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_idleLoss(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_idleLoss(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->idleLoss; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_maxUdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_maxUdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxUdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_minUdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_minUdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minUdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_nomUdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_nomUdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nomUdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_numberOfValves(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_numberOfValves(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->numberOfValves; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_p(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_poleLossP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_poleLossP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->poleLossP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_ratedUdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_ratedUdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedUdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_resistiveLoss(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_resistiveLoss(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->resistiveLoss; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_switchingLoss(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_switchingLoss(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->switchingLoss; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_targetPpcc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_targetPpcc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->targetPpcc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_targetUdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_targetUdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->targetUdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_uc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_udc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_udc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->udc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_valveU0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_valveU0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->valveU0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverterDCTerminal_DCConductingEquipment(BaseClass*, BaseClass*); -bool assign_ACDCConverter_DCTerminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) -{ - ACDCConverter* element = dynamic_cast(BaseClass_ptr1); - ACDCConverterDCTerminal* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) - { - if (std::find(element->DCTerminals.begin(), element->DCTerminals.end(), element2) == element->DCTerminals.end()) - { - element->DCTerminals.push_back(element2); - return assign_ACDCConverterDCTerminal_DCConductingEquipment(BaseClass_ptr2, BaseClass_ptr1); - } - return true; - } - return false; -} -bool assign_Terminal_ConverterDCSides(BaseClass*, BaseClass*); -bool assign_ACDCConverter_PccTerminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_ACDCConverter_PccTerminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - ACDCConverter* element = dynamic_cast(BaseClass_ptr1); - Terminal* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->PccTerminal != element2) + if (element->PccTerminal != 0) { - element->PccTerminal = element2; - return assign_Terminal_ConverterDCSides(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->PccTerminal); + return true; } - return true; } return false; } bool get_ACDCConverter_baseS(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseS; if (!buffer.str().empty()) @@ -365,7 +380,8 @@ bool get_ACDCConverter_baseS(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ACDCConverter_idc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->idc; if (!buffer.str().empty()) @@ -379,7 +395,8 @@ bool get_ACDCConverter_idc(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ACDCConverter_idleLoss(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->idleLoss; if (!buffer.str().empty()) @@ -393,7 +410,8 @@ bool get_ACDCConverter_idleLoss(const BaseClass* BaseClass_ptr1, std::stringstre bool get_ACDCConverter_maxUdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxUdc; if (!buffer.str().empty()) @@ -407,7 +425,8 @@ bool get_ACDCConverter_maxUdc(const BaseClass* BaseClass_ptr1, std::stringstream bool get_ACDCConverter_minUdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minUdc; if (!buffer.str().empty()) @@ -421,7 +440,8 @@ bool get_ACDCConverter_minUdc(const BaseClass* BaseClass_ptr1, std::stringstream bool get_ACDCConverter_nomUdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nomUdc; if (!buffer.str().empty()) @@ -435,7 +455,8 @@ bool get_ACDCConverter_nomUdc(const BaseClass* BaseClass_ptr1, std::stringstream bool get_ACDCConverter_numberOfValves(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->numberOfValves; if (!buffer.str().empty()) @@ -449,7 +470,8 @@ bool get_ACDCConverter_numberOfValves(const BaseClass* BaseClass_ptr1, std::stri bool get_ACDCConverter_p(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p; if (!buffer.str().empty()) @@ -463,7 +485,8 @@ bool get_ACDCConverter_p(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ACDCConverter_poleLossP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->poleLossP; if (!buffer.str().empty()) @@ -477,7 +500,8 @@ bool get_ACDCConverter_poleLossP(const BaseClass* BaseClass_ptr1, std::stringstr bool get_ACDCConverter_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q; if (!buffer.str().empty()) @@ -491,7 +515,8 @@ bool get_ACDCConverter_q(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ACDCConverter_ratedUdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedUdc; if (!buffer.str().empty()) @@ -505,7 +530,8 @@ bool get_ACDCConverter_ratedUdc(const BaseClass* BaseClass_ptr1, std::stringstre bool get_ACDCConverter_resistiveLoss(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->resistiveLoss; if (!buffer.str().empty()) @@ -519,7 +545,8 @@ bool get_ACDCConverter_resistiveLoss(const BaseClass* BaseClass_ptr1, std::strin bool get_ACDCConverter_switchingLoss(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->switchingLoss; if (!buffer.str().empty()) @@ -533,7 +560,8 @@ bool get_ACDCConverter_switchingLoss(const BaseClass* BaseClass_ptr1, std::strin bool get_ACDCConverter_targetPpcc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->targetPpcc; if (!buffer.str().empty()) @@ -547,7 +575,8 @@ bool get_ACDCConverter_targetPpcc(const BaseClass* BaseClass_ptr1, std::stringst bool get_ACDCConverter_targetUdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->targetUdc; if (!buffer.str().empty()) @@ -561,7 +590,8 @@ bool get_ACDCConverter_targetUdc(const BaseClass* BaseClass_ptr1, std::stringstr bool get_ACDCConverter_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uc; if (!buffer.str().empty()) @@ -575,7 +605,8 @@ bool get_ACDCConverter_uc(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ACDCConverter_udc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->udc; if (!buffer.str().empty()) @@ -589,7 +620,8 @@ bool get_ACDCConverter_udc(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ACDCConverter_valveU0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->valveU0; if (!buffer.str().empty()) @@ -601,21 +633,6 @@ bool get_ACDCConverter_valveU0(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } - -bool get_ACDCConverter_PccTerminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->PccTerminal != 0) - { - BaseClass_list.push_back(element->PccTerminal); - return true; - } - } - return false; -} - - const char ACDCConverter::debugName[] = "ACDCConverter"; const char* ACDCConverter::debugString() const { @@ -624,35 +641,35 @@ const char* ACDCConverter::debugString() const void ACDCConverter::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ACDCConverter"), &ACDCConverter_factory)); + factory_map.emplace("cim:ACDCConverter", &ACDCConverter_factory); } void ACDCConverter::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.baseS"), &assign_ACDCConverter_baseS)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.idc"), &assign_ACDCConverter_idc)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.idleLoss"), &assign_ACDCConverter_idleLoss)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.maxUdc"), &assign_ACDCConverter_maxUdc)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.minUdc"), &assign_ACDCConverter_minUdc)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.nomUdc"), &assign_ACDCConverter_nomUdc)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.numberOfValves"), &assign_ACDCConverter_numberOfValves)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.p"), &assign_ACDCConverter_p)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.poleLossP"), &assign_ACDCConverter_poleLossP)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.q"), &assign_ACDCConverter_q)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.ratedUdc"), &assign_ACDCConverter_ratedUdc)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.resistiveLoss"), &assign_ACDCConverter_resistiveLoss)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.switchingLoss"), &assign_ACDCConverter_switchingLoss)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.targetPpcc"), &assign_ACDCConverter_targetPpcc)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.targetUdc"), &assign_ACDCConverter_targetUdc)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.uc"), &assign_ACDCConverter_uc)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.udc"), &assign_ACDCConverter_udc)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.valveU0"), &assign_ACDCConverter_valveU0)); + assign_map.emplace("cim:ACDCConverter.baseS", &assign_ACDCConverter_baseS); + assign_map.emplace("cim:ACDCConverter.idc", &assign_ACDCConverter_idc); + assign_map.emplace("cim:ACDCConverter.idleLoss", &assign_ACDCConverter_idleLoss); + assign_map.emplace("cim:ACDCConverter.maxUdc", &assign_ACDCConverter_maxUdc); + assign_map.emplace("cim:ACDCConverter.minUdc", &assign_ACDCConverter_minUdc); + assign_map.emplace("cim:ACDCConverter.nomUdc", &assign_ACDCConverter_nomUdc); + assign_map.emplace("cim:ACDCConverter.numberOfValves", &assign_ACDCConverter_numberOfValves); + assign_map.emplace("cim:ACDCConverter.p", &assign_ACDCConverter_p); + assign_map.emplace("cim:ACDCConverter.poleLossP", &assign_ACDCConverter_poleLossP); + assign_map.emplace("cim:ACDCConverter.q", &assign_ACDCConverter_q); + assign_map.emplace("cim:ACDCConverter.ratedUdc", &assign_ACDCConverter_ratedUdc); + assign_map.emplace("cim:ACDCConverter.resistiveLoss", &assign_ACDCConverter_resistiveLoss); + assign_map.emplace("cim:ACDCConverter.switchingLoss", &assign_ACDCConverter_switchingLoss); + assign_map.emplace("cim:ACDCConverter.targetPpcc", &assign_ACDCConverter_targetPpcc); + assign_map.emplace("cim:ACDCConverter.targetUdc", &assign_ACDCConverter_targetUdc); + assign_map.emplace("cim:ACDCConverter.uc", &assign_ACDCConverter_uc); + assign_map.emplace("cim:ACDCConverter.udc", &assign_ACDCConverter_udc); + assign_map.emplace("cim:ACDCConverter.valveU0", &assign_ACDCConverter_valveU0); } void ACDCConverter::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.DCTerminals"), &assign_ACDCConverter_DCTerminals)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.PccTerminal"), &assign_ACDCConverter_PccTerminal)); + assign_map.emplace("cim:ACDCConverter.DCTerminals", &assign_ACDCConverter_DCTerminals); + assign_map.emplace("cim:ACDCConverter.PccTerminal", &assign_ACDCConverter_PccTerminal); } void ACDCConverter::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/ACDCConverter.hpp b/CGMES_2.4.13_18DEC2013/ACDCConverter.hpp index 2defddf17..dec762625 100644 --- a/CGMES_2.4.13_18DEC2013/ACDCConverter.hpp +++ b/CGMES_2.4.13_18DEC2013/ACDCConverter.hpp @@ -26,9 +26,7 @@ namespace CIMPP class ACDCConverterDCTerminal; class Terminal; - /* - A unit with valves for three phases, together with unit control equipment, essential protective and switching devices, DC storage capacitors, phase reactors and auxiliaries, if any, used for conversion. - */ + /** \brief A unit with valves for three phases, together with unit control equipment, essential protective and switching devices, DC storage capacitors, phase reactors and auxiliaries, if any, used for conversion. */ class ACDCConverter : public ConductingEquipment { public: @@ -36,26 +34,65 @@ namespace CIMPP ACDCConverter(); ~ACDCConverter() override; - std::list DCTerminals; /* Default: 0 */ - CIMPP::Terminal* PccTerminal; /* All converters` DC sides linked to this point of common coupling terminal. Default: 0 */ - CIMPP::ApparentPower baseS; /* Base apparent power of the converter pole. Default: nullptr */ - CIMPP::CurrentFlow idc; /* Converter DC current, also called Id. Converter state variable, result from power flow. Default: nullptr */ - CIMPP::ActivePower idleLoss; /* Active power loss in pole at no power transfer. Converter configuration data used in power flow. Default: nullptr */ - CIMPP::Voltage maxUdc; /* The maximum voltage on the DC side at which the converter should operate. Converter configuration data used in power flow. Default: nullptr */ - CIMPP::Voltage minUdc; /* Min allowed converter DC voltage. Converter configuration data used in power flow. Default: nullptr */ - CIMPP::Voltage nomUdc; /* The nominal voltage on the DC side at which the converter is designed to operate. Converter configuration data used in power flow. Default: nullptr */ - CIMPP::Integer numberOfValves; /* Number of valves in the converter. Used in loss calculations. Default: 0 */ - CIMPP::ActivePower p; /* Active power at the point of common coupling. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution in the case a simplified power flow model is used. Default: nullptr */ - CIMPP::ActivePower poleLossP; /* The active power loss at a DC Pole = idleLoss + switchingLoss*|Idc| + resitiveLoss*Idc^2 For lossless operation Pdc=Pac For rectifier operation with losses Pdc=Pac-lossP For inverter operation with losses Pdc=Pac+lossP Converter state variable used in power flow. Default: nullptr */ - CIMPP::ReactivePower q; /* Reactive power at the point of common coupling. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution in the case a simplified power flow model is used. Default: nullptr */ - CIMPP::Voltage ratedUdc; /* Rated converter DC voltage, also called UdN. Converter configuration data used in power flow. Default: nullptr */ - CIMPP::Simple_Float resistiveLoss; /* Converter configuration data used in power flow. Refer to poleLossP. Default: nullptr */ - CIMPP::PU switchingLoss; /* Switching losses, relative to the base apparent power `baseS`. Refer to poleLossP. Default: nullptr */ - CIMPP::ActivePower targetPpcc; /* Real power injection target in AC grid, at point of common coupling. Default: nullptr */ - CIMPP::Voltage targetUdc; /* Target value for DC voltage magnitude. Default: nullptr */ - CIMPP::Voltage uc; /* Converter voltage, the voltage at the AC side of the bridge. Converter state variable, result from power flow. Default: nullptr */ - CIMPP::Voltage udc; /* Converter voltage at the DC side, also called Ud. Converter state variable, result from power flow. Default: nullptr */ - CIMPP::Voltage valveU0; /* Valve threshold voltage. Forward voltage drop when the valve is conducting. Used in loss calculations, i.e. the switchLoss depend on numberOfValves * valveU0. Default: nullptr */ + /** \brief Default: 0 */ + std::list DCTerminals; + + /** \brief All converters` DC sides linked to this point of common coupling terminal. Default: 0 */ + CIMPP::Terminal* PccTerminal; + + /** \brief Base apparent power of the converter pole. Default: nullptr */ + CIMPP::ApparentPower baseS; + + /** \brief Converter DC current, also called Id. Converter state variable, result from power flow. Default: nullptr */ + CIMPP::CurrentFlow idc; + + /** \brief Active power loss in pole at no power transfer. Converter configuration data used in power flow. Default: nullptr */ + CIMPP::ActivePower idleLoss; + + /** \brief The maximum voltage on the DC side at which the converter should operate. Converter configuration data used in power flow. Default: nullptr */ + CIMPP::Voltage maxUdc; + + /** \brief Min allowed converter DC voltage. Converter configuration data used in power flow. Default: nullptr */ + CIMPP::Voltage minUdc; + + /** \brief The nominal voltage on the DC side at which the converter is designed to operate. Converter configuration data used in power flow. Default: nullptr */ + CIMPP::Voltage nomUdc; + + /** \brief Number of valves in the converter. Used in loss calculations. Default: 0 */ + CIMPP::Integer numberOfValves; + + /** \brief Active power at the point of common coupling. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution in the case a simplified power flow model is used. Default: nullptr */ + CIMPP::ActivePower p; + + /** \brief The active power loss at a DC Pole = idleLoss + switchingLoss*|Idc| + resitiveLoss*Idc^2 For lossless operation Pdc=Pac For rectifier operation with losses Pdc=Pac-lossP For inverter operation with losses Pdc=Pac+lossP Converter state variable used in power flow. Default: nullptr */ + CIMPP::ActivePower poleLossP; + + /** \brief Reactive power at the point of common coupling. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution in the case a simplified power flow model is used. Default: nullptr */ + CIMPP::ReactivePower q; + + /** \brief Rated converter DC voltage, also called UdN. Converter configuration data used in power flow. Default: nullptr */ + CIMPP::Voltage ratedUdc; + + /** \brief Converter configuration data used in power flow. Refer to poleLossP. Default: nullptr */ + CIMPP::Simple_Float resistiveLoss; + + /** \brief Switching losses, relative to the base apparent power `baseS`. Refer to poleLossP. Default: nullptr */ + CIMPP::PU switchingLoss; + + /** \brief Real power injection target in AC grid, at point of common coupling. Default: nullptr */ + CIMPP::ActivePower targetPpcc; + + /** \brief Target value for DC voltage magnitude. Default: nullptr */ + CIMPP::Voltage targetUdc; + + /** \brief Converter voltage, the voltage at the AC side of the bridge. Converter state variable, result from power flow. Default: nullptr */ + CIMPP::Voltage uc; + + /** \brief Converter voltage at the DC side, also called Ud. Converter state variable, result from power flow. Default: nullptr */ + CIMPP::Voltage udc; + + /** \brief Valve threshold voltage. Forward voltage drop when the valve is conducting. Used in loss calculations, i.e. the switchLoss depend on numberOfValves * valveU0. Default: nullptr */ + CIMPP::Voltage valveU0; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ACDCConverterDCTerminal.cpp b/CGMES_2.4.13_18DEC2013/ACDCConverterDCTerminal.cpp index d4c8f5505..ca0c487b0 100644 --- a/CGMES_2.4.13_18DEC2013/ACDCConverterDCTerminal.cpp +++ b/CGMES_2.4.13_18DEC2013/ACDCConverterDCTerminal.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ACDCConverter.hpp" -#include "DCPolarityKind.hpp" using namespace CIMPP; -ACDCConverterDCTerminal::ACDCConverterDCTerminal() : DCConductingEquipment(nullptr) {}; -ACDCConverterDCTerminal::~ACDCConverterDCTerminal() {}; +ACDCConverterDCTerminal::ACDCConverterDCTerminal() : DCConductingEquipment(nullptr) {} +ACDCConverterDCTerminal::~ACDCConverterDCTerminal() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ ACDCConverterDCTerminal::getPossibleProfilesForAttributes() const return map; } - -bool assign_ACDCConverterDCTerminal_polarity(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ACDCConverterDCTerminal* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->polarity; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ACDCConverter_DCTerminals(BaseClass*, BaseClass*); bool assign_ACDCConverterDCTerminal_DCConductingEquipment(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,10 +58,24 @@ bool assign_ACDCConverterDCTerminal_DCConductingEquipment(BaseClass* BaseClass_p return false; } +bool assign_ACDCConverterDCTerminal_polarity(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + ACDCConverterDCTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->polarity; + if (!buffer.fail()) + { + return true; + } + } + return false; +} bool get_ACDCConverterDCTerminal_DCConductingEquipment(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ACDCConverterDCTerminal* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverterDCTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DCConductingEquipment != 0) { @@ -88,10 +86,10 @@ bool get_ACDCConverterDCTerminal_DCConductingEquipment(const BaseClass* BaseClas return false; } - bool get_ACDCConverterDCTerminal_polarity(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverterDCTerminal* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverterDCTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->polarity; if (!buffer.str().empty()) @@ -111,17 +109,17 @@ const char* ACDCConverterDCTerminal::debugString() const void ACDCConverterDCTerminal::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ACDCConverterDCTerminal"), &ACDCConverterDCTerminal_factory)); + factory_map.emplace("cim:ACDCConverterDCTerminal", &ACDCConverterDCTerminal_factory); } void ACDCConverterDCTerminal::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ACDCConverterDCTerminal.polarity"), &assign_ACDCConverterDCTerminal_polarity)); + assign_map.emplace("cim:ACDCConverterDCTerminal.polarity", &assign_ACDCConverterDCTerminal_polarity); } void ACDCConverterDCTerminal::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ACDCConverterDCTerminal.DCConductingEquipment"), &assign_ACDCConverterDCTerminal_DCConductingEquipment)); + assign_map.emplace("cim:ACDCConverterDCTerminal.DCConductingEquipment", &assign_ACDCConverterDCTerminal_DCConductingEquipment); } void ACDCConverterDCTerminal::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/ACDCConverterDCTerminal.hpp b/CGMES_2.4.13_18DEC2013/ACDCConverterDCTerminal.hpp index c501a1514..84b1157e7 100644 --- a/CGMES_2.4.13_18DEC2013/ACDCConverterDCTerminal.hpp +++ b/CGMES_2.4.13_18DEC2013/ACDCConverterDCTerminal.hpp @@ -25,8 +25,11 @@ namespace CIMPP ACDCConverterDCTerminal(); ~ACDCConverterDCTerminal() override; - CIMPP::ACDCConverter* DCConductingEquipment; /* Default: 0 */ - CIMPP::DCPolarityKind polarity; /* Represents the normal network polarity condition. Default: 0 */ + /** \brief Default: 0 */ + CIMPP::ACDCConverter* DCConductingEquipment; + + /** \brief Represents the normal network polarity condition. Default: 0 */ + CIMPP::DCPolarityKind polarity; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ACDCTerminal.cpp b/CGMES_2.4.13_18DEC2013/ACDCTerminal.cpp index 8220bb67b..d4cc5c048 100644 --- a/CGMES_2.4.13_18DEC2013/ACDCTerminal.cpp +++ b/CGMES_2.4.13_18DEC2013/ACDCTerminal.cpp @@ -11,13 +11,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "BusNameMarker.hpp" #include "Measurement.hpp" #include "OperationalLimitSet.hpp" -#include "Boolean.hpp" -#include "Integer.hpp" using namespace CIMPP; -ACDCTerminal::ACDCTerminal() : BusNameMarker(nullptr) {}; -ACDCTerminal::~ACDCTerminal() {}; +ACDCTerminal::ACDCTerminal() : BusNameMarker(nullptr) {} +ACDCTerminal::~ACDCTerminal() {} static const std::list PossibleProfilesForClass = { @@ -52,34 +50,6 @@ ACDCTerminal::getPossibleProfilesForAttributes() const return map; } - -bool assign_ACDCTerminal_connected(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ACDCTerminal* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->connected; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_ACDCTerminal_sequenceNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ACDCTerminal* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->sequenceNumber; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_BusNameMarker_Terminal(BaseClass*, BaseClass*); bool assign_ACDCTerminal_BusNameMarker(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -96,6 +66,7 @@ bool assign_ACDCTerminal_BusNameMarker(BaseClass* BaseClass_ptr1, BaseClass* Bas } return false; } + bool assign_Measurement_Terminal(BaseClass*, BaseClass*); bool assign_ACDCTerminal_Measurements(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -112,6 +83,7 @@ bool assign_ACDCTerminal_Measurements(BaseClass* BaseClass_ptr1, BaseClass* Base } return false; } + bool assign_OperationalLimitSet_Terminal(BaseClass*, BaseClass*); bool assign_ACDCTerminal_OperationalLimitSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -129,38 +101,38 @@ bool assign_ACDCTerminal_OperationalLimitSet(BaseClass* BaseClass_ptr1, BaseClas return false; } -bool get_ACDCTerminal_connected(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_ACDCTerminal_connected(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const ACDCTerminal* element = dynamic_cast(BaseClass_ptr1)) + ACDCTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->connected; - if (!buffer.str().empty()) + buffer >> element->connected; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_ACDCTerminal_sequenceNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_ACDCTerminal_sequenceNumber(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const ACDCTerminal* element = dynamic_cast(BaseClass_ptr1)) + ACDCTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->sequenceNumber; - if (!buffer.str().empty()) + buffer >> element->sequenceNumber; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_ACDCTerminal_BusNameMarker(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ACDCTerminal* element = dynamic_cast(BaseClass_ptr1)) + const ACDCTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->BusNameMarker != 0) { @@ -172,6 +144,37 @@ bool get_ACDCTerminal_BusNameMarker(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->connected; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_ACDCTerminal_sequenceNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ACDCTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->sequenceNumber; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + const char ACDCTerminal::debugName[] = "ACDCTerminal"; const char* ACDCTerminal::debugString() const { @@ -180,20 +183,20 @@ const char* ACDCTerminal::debugString() const void ACDCTerminal::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ACDCTerminal"), &ACDCTerminal_factory)); + factory_map.emplace("cim:ACDCTerminal", &ACDCTerminal_factory); } void ACDCTerminal::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ACDCTerminal.connected"), &assign_ACDCTerminal_connected)); - assign_map.insert(std::make_pair(std::string("cim:ACDCTerminal.sequenceNumber"), &assign_ACDCTerminal_sequenceNumber)); + assign_map.emplace("cim:ACDCTerminal.connected", &assign_ACDCTerminal_connected); + assign_map.emplace("cim:ACDCTerminal.sequenceNumber", &assign_ACDCTerminal_sequenceNumber); } void ACDCTerminal::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ACDCTerminal.BusNameMarker"), &assign_ACDCTerminal_BusNameMarker)); - assign_map.insert(std::make_pair(std::string("cim:ACDCTerminal.Measurements"), &assign_ACDCTerminal_Measurements)); - assign_map.insert(std::make_pair(std::string("cim:ACDCTerminal.OperationalLimitSet"), &assign_ACDCTerminal_OperationalLimitSet)); + assign_map.emplace("cim:ACDCTerminal.BusNameMarker", &assign_ACDCTerminal_BusNameMarker); + assign_map.emplace("cim:ACDCTerminal.Measurements", &assign_ACDCTerminal_Measurements); + assign_map.emplace("cim:ACDCTerminal.OperationalLimitSet", &assign_ACDCTerminal_OperationalLimitSet); } void ACDCTerminal::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/ACDCTerminal.hpp b/CGMES_2.4.13_18DEC2013/ACDCTerminal.hpp index 6dcc095d5..ed29f46b5 100644 --- a/CGMES_2.4.13_18DEC2013/ACDCTerminal.hpp +++ b/CGMES_2.4.13_18DEC2013/ACDCTerminal.hpp @@ -21,9 +21,7 @@ namespace CIMPP class Measurement; class OperationalLimitSet; - /* - An electrical connection point (AC or DC) to a piece of conducting equipment. Terminals are connected at physical connection points called connectivity nodes. - */ + /** \brief An electrical connection point (AC or DC) to a piece of conducting equipment. Terminals are connected at physical connection points called connectivity nodes. */ class ACDCTerminal : public IdentifiedObject { public: @@ -31,11 +29,20 @@ namespace CIMPP ACDCTerminal(); ~ACDCTerminal() override; - CIMPP::BusNameMarker* BusNameMarker; /* The bus name marker used to name the bus (topological node). Default: 0 */ - std::list Measurements; /* Measurements associated with this terminal defining where the measurement is placed in the network topology. It may be used, for instance, to capture the sensor position, such as a voltage transformer (PT) at a busbar or a current transformer (CT) at the bar between a breaker and an isolator. Default: 0 */ - std::list OperationalLimitSet; /* Default: 0 */ - CIMPP::Boolean connected; /* The connected status is related to a bus-branch model and the topological node to terminal relation. True implies the terminal is connected to the related topological node and false implies it is not. In a bus-branch model, the connected status is used to tell if equipment is disconnected without having to change the connectivity described by the topological node to terminal relation. A valid case is that conducting equipment can be connected in one end and open in the other. In particular for an AC line segment, where the reactive line charging can be significant, this is a relevant case. Default: false */ - CIMPP::Integer sequenceNumber; /* The orientation of the terminal connections for a multiple terminal conducting equipment. The sequence numbering starts with 1 and additional terminals should follow in increasing order. The first terminal is the `starting point` for a two terminal branch. Default: 0 */ + /** \brief The bus name marker used to name the bus (topological node). Default: 0 */ + CIMPP::BusNameMarker* BusNameMarker; + + /** \brief Measurements associated with this terminal defining where the measurement is placed in the network topology. It may be used, for instance, to capture the sensor position, such as a voltage transformer (PT) at a busbar or a current transformer (CT) at the bar between a breaker and an isolator. Default: 0 */ + std::list Measurements; + + /** \brief Default: 0 */ + std::list OperationalLimitSet; + + /** \brief The connected status is related to a bus-branch model and the topological node to terminal relation. True implies the terminal is connected to the related topological node and false implies it is not. In a bus-branch model, the connected status is used to tell if equipment is disconnected without having to change the connectivity described by the topological node to terminal relation. A valid case is that conducting equipment can be connected in one end and open in the other. In particular for an AC line segment, where the reactive line charging can be significant, this is a relevant case. Default: false */ + CIMPP::Boolean connected; + + /** \brief The orientation of the terminal connections for a multiple terminal conducting equipment. The sequence numbering starts with 1 and additional terminals should follow in increasing order. The first terminal is the `starting point` for a two terminal branch. Default: 0 */ + CIMPP::Integer sequenceNumber; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ACLineSegment.cpp b/CGMES_2.4.13_18DEC2013/ACLineSegment.cpp index fb7cbca77..baecc7103 100644 --- a/CGMES_2.4.13_18DEC2013/ACLineSegment.cpp +++ b/CGMES_2.4.13_18DEC2013/ACLineSegment.cpp @@ -8,20 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Susceptance.hpp" -#include "Susceptance.hpp" -#include "Conductance.hpp" -#include "Conductance.hpp" -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "Temperature.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -ACLineSegment::ACLineSegment() {}; -ACLineSegment::~ACLineSegment() {}; +ACLineSegment::ACLineSegment() {} +ACLineSegment::~ACLineSegment() {} static const std::list PossibleProfilesForClass = { @@ -56,129 +47,136 @@ ACLineSegment::getPossibleProfilesForAttributes() const return map; } - -bool assign_ACLineSegment_b0ch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACLineSegment_b0ch(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b0ch; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACLineSegment_bch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACLineSegment_bch(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bch; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACLineSegment_g0ch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACLineSegment_g0ch(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g0ch; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACLineSegment_gch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACLineSegment_gch(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gch; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACLineSegment_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACLineSegment_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACLineSegment_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACLineSegment_r0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACLineSegment_shortCircuitEndTemperature(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACLineSegment_shortCircuitEndTemperature(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->shortCircuitEndTemperature; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACLineSegment_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACLineSegment_x(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACLineSegment_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACLineSegment_x0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ACLineSegment_b0ch(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b0ch; if (!buffer.str().empty()) @@ -192,7 +190,8 @@ bool get_ACLineSegment_b0ch(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ACLineSegment_bch(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bch; if (!buffer.str().empty()) @@ -206,7 +205,8 @@ bool get_ACLineSegment_bch(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ACLineSegment_g0ch(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g0ch; if (!buffer.str().empty()) @@ -220,7 +220,8 @@ bool get_ACLineSegment_g0ch(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ACLineSegment_gch(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gch; if (!buffer.str().empty()) @@ -234,7 +235,8 @@ bool get_ACLineSegment_gch(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ACLineSegment_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -248,7 +250,8 @@ bool get_ACLineSegment_r(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ACLineSegment_r0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r0; if (!buffer.str().empty()) @@ -262,7 +265,8 @@ bool get_ACLineSegment_r0(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ACLineSegment_shortCircuitEndTemperature(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortCircuitEndTemperature; if (!buffer.str().empty()) @@ -276,7 +280,8 @@ bool get_ACLineSegment_shortCircuitEndTemperature(const BaseClass* BaseClass_ptr bool get_ACLineSegment_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x; if (!buffer.str().empty()) @@ -290,7 +295,8 @@ bool get_ACLineSegment_x(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ACLineSegment_x0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x0; if (!buffer.str().empty()) @@ -302,8 +308,6 @@ bool get_ACLineSegment_x0(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char ACLineSegment::debugName[] = "ACLineSegment"; const char* ACLineSegment::debugString() const { @@ -312,20 +316,20 @@ const char* ACLineSegment::debugString() const void ACLineSegment::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ACLineSegment"), &ACLineSegment_factory)); + factory_map.emplace("cim:ACLineSegment", &ACLineSegment_factory); } void ACLineSegment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.b0ch"), &assign_ACLineSegment_b0ch)); - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.bch"), &assign_ACLineSegment_bch)); - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.g0ch"), &assign_ACLineSegment_g0ch)); - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.gch"), &assign_ACLineSegment_gch)); - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.r"), &assign_ACLineSegment_r)); - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.r0"), &assign_ACLineSegment_r0)); - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.shortCircuitEndTemperature"), &assign_ACLineSegment_shortCircuitEndTemperature)); - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.x"), &assign_ACLineSegment_x)); - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.x0"), &assign_ACLineSegment_x0)); + assign_map.emplace("cim:ACLineSegment.b0ch", &assign_ACLineSegment_b0ch); + assign_map.emplace("cim:ACLineSegment.bch", &assign_ACLineSegment_bch); + assign_map.emplace("cim:ACLineSegment.g0ch", &assign_ACLineSegment_g0ch); + assign_map.emplace("cim:ACLineSegment.gch", &assign_ACLineSegment_gch); + assign_map.emplace("cim:ACLineSegment.r", &assign_ACLineSegment_r); + assign_map.emplace("cim:ACLineSegment.r0", &assign_ACLineSegment_r0); + assign_map.emplace("cim:ACLineSegment.shortCircuitEndTemperature", &assign_ACLineSegment_shortCircuitEndTemperature); + assign_map.emplace("cim:ACLineSegment.x", &assign_ACLineSegment_x); + assign_map.emplace("cim:ACLineSegment.x0", &assign_ACLineSegment_x0); } void ACLineSegment::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ACLineSegment.hpp b/CGMES_2.4.13_18DEC2013/ACLineSegment.hpp index f03651a21..21be2e6c6 100644 --- a/CGMES_2.4.13_18DEC2013/ACLineSegment.hpp +++ b/CGMES_2.4.13_18DEC2013/ACLineSegment.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A wire or combination of wires, with consistent electrical characteristics, building a single electrical system, used to carry alternating current between points in the power system. For symmetrical, transposed 3ph lines, it is sufficient to use attributes of the line segment, which describe impedances and admittances for the entire length of the segment. Additionally impedances can be computed by using length and associated per length impedances. The BaseVoltage at the two ends of ACLineSegments in a Line shall have the same BaseVoltage.nominalVoltage. However, boundary lines may have slightly different BaseVoltage.nominalVoltages and variation is allowed. Larger voltage difference in general requires use of an equivalent branch. - */ + /** \brief A wire or combination of wires, with consistent electrical characteristics, building a single electrical system, used to carry alternating current between points in the power system. For symmetrical, transposed 3ph lines, it is sufficient to use attributes of the line segment, which describe impedances and admittances for the entire length of the segment. Additionally impedances can be computed by using length and associated per length impedances. The BaseVoltage at the two ends of ACLineSegments in a Line shall have the same BaseVoltage.nominalVoltage. However, boundary lines may have slightly different BaseVoltage.nominalVoltages and variation is allowed. Larger voltage difference in general requires use of an equivalent branch. */ class ACLineSegment : public Conductor { public: @@ -31,15 +29,32 @@ namespace CIMPP ACLineSegment(); ~ACLineSegment() override; - CIMPP::Susceptance b0ch; /* Zero sequence shunt (charging) susceptance, uniformly distributed, of the entire line section. Default: nullptr */ - CIMPP::Susceptance bch; /* Positive sequence shunt (charging) susceptance, uniformly distributed, of the entire line section. This value represents the full charging over the full length of the line. Default: nullptr */ - CIMPP::Conductance g0ch; /* Zero sequence shunt (charging) conductance, uniformly distributed, of the entire line section. Default: nullptr */ - CIMPP::Conductance gch; /* Positive sequence shunt (charging) conductance, uniformly distributed, of the entire line section. Default: nullptr */ - CIMPP::Resistance r; /* Positive sequence series resistance of the entire line section. Default: nullptr */ - CIMPP::Resistance r0; /* Zero sequence series resistance of the entire line section. Default: nullptr */ - CIMPP::Temperature shortCircuitEndTemperature; /* Maximum permitted temperature at the end of SC for the calculation of minimum short-circuit currents. Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::Reactance x; /* Positive sequence series reactance of the entire line section. Default: nullptr */ - CIMPP::Reactance x0; /* Zero sequence series reactance of the entire line section. Default: nullptr */ + /** \brief Zero sequence shunt (charging) susceptance, uniformly distributed, of the entire line section. Default: nullptr */ + CIMPP::Susceptance b0ch; + + /** \brief Positive sequence shunt (charging) susceptance, uniformly distributed, of the entire line section. This value represents the full charging over the full length of the line. Default: nullptr */ + CIMPP::Susceptance bch; + + /** \brief Zero sequence shunt (charging) conductance, uniformly distributed, of the entire line section. Default: nullptr */ + CIMPP::Conductance g0ch; + + /** \brief Positive sequence shunt (charging) conductance, uniformly distributed, of the entire line section. Default: nullptr */ + CIMPP::Conductance gch; + + /** \brief Positive sequence series resistance of the entire line section. Default: nullptr */ + CIMPP::Resistance r; + + /** \brief Zero sequence series resistance of the entire line section. Default: nullptr */ + CIMPP::Resistance r0; + + /** \brief Maximum permitted temperature at the end of SC for the calculation of minimum short-circuit currents. Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::Temperature shortCircuitEndTemperature; + + /** \brief Positive sequence series reactance of the entire line section. Default: nullptr */ + CIMPP::Reactance x; + + /** \brief Zero sequence series reactance of the entire line section. Default: nullptr */ + CIMPP::Reactance x0; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Accumulator.cpp b/CGMES_2.4.13_18DEC2013/Accumulator.cpp index accb2f53f..0f56cb3a0 100644 --- a/CGMES_2.4.13_18DEC2013/Accumulator.cpp +++ b/CGMES_2.4.13_18DEC2013/Accumulator.cpp @@ -8,13 +8,13 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "AccumulatorValue.hpp" #include "AccumulatorLimitSet.hpp" +#include "AccumulatorValue.hpp" using namespace CIMPP; -Accumulator::Accumulator() {}; -Accumulator::~Accumulator() {}; +Accumulator::Accumulator() {} +Accumulator::~Accumulator() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ Accumulator::getPossibleProfilesForAttributes() const return map; } - - bool assign_AccumulatorValue_Accumulator(BaseClass*, BaseClass*); bool assign_Accumulator_AccumulatorValues(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_Accumulator_AccumulatorValues(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_AccumulatorLimitSet_Measurements(BaseClass*, BaseClass*); bool assign_Accumulator_LimitSets(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -87,7 +86,7 @@ const char* Accumulator::debugString() const void Accumulator::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Accumulator"), &Accumulator_factory)); + factory_map.emplace("cim:Accumulator", &Accumulator_factory); } void Accumulator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -96,8 +95,8 @@ void Accumulator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Accumulator.AccumulatorValues"), &assign_Accumulator_AccumulatorValues)); - assign_map.insert(std::make_pair(std::string("cim:Accumulator.LimitSets"), &assign_Accumulator_LimitSets)); + assign_map.emplace("cim:Accumulator.AccumulatorValues", &assign_Accumulator_AccumulatorValues); + assign_map.emplace("cim:Accumulator.LimitSets", &assign_Accumulator_LimitSets); } void Accumulator::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/Accumulator.hpp b/CGMES_2.4.13_18DEC2013/Accumulator.hpp index 4d851c20d..0ea3177cb 100644 --- a/CGMES_2.4.13_18DEC2013/Accumulator.hpp +++ b/CGMES_2.4.13_18DEC2013/Accumulator.hpp @@ -18,9 +18,7 @@ namespace CIMPP class AccumulatorLimitSet; class AccumulatorValue; - /* - Accumulator represents an accumulated (counted) Measurement, e.g. an energy value. - */ + /** \brief Accumulator represents an accumulated (counted) Measurement, e.g. an energy value. */ class Accumulator : public Measurement { public: @@ -28,8 +26,11 @@ namespace CIMPP Accumulator(); ~Accumulator() override; - std::list AccumulatorValues; /* Measurement to which this value is connected. Default: 0 */ - std::list LimitSets; /* The Measurements using the LimitSet. Default: 0 */ + /** \brief Measurement to which this value is connected. Default: 0 */ + std::list AccumulatorValues; + + /** \brief The Measurements using the LimitSet. Default: 0 */ + std::list LimitSets; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/AccumulatorLimit.cpp b/CGMES_2.4.13_18DEC2013/AccumulatorLimit.cpp index f876fc8c7..f04f7dc98 100644 --- a/CGMES_2.4.13_18DEC2013/AccumulatorLimit.cpp +++ b/CGMES_2.4.13_18DEC2013/AccumulatorLimit.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "AccumulatorLimitSet.hpp" -#include "Integer.hpp" using namespace CIMPP; -AccumulatorLimit::AccumulatorLimit() : LimitSet(nullptr) {}; -AccumulatorLimit::~AccumulatorLimit() {}; +AccumulatorLimit::AccumulatorLimit() : LimitSet(nullptr) {} +AccumulatorLimit::~AccumulatorLimit() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ AccumulatorLimit::getPossibleProfilesForAttributes() const return map; } - -bool assign_AccumulatorLimit_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (AccumulatorLimit* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->value; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_AccumulatorLimitSet_Limits(BaseClass*, BaseClass*); bool assign_AccumulatorLimit_LimitSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_AccumulatorLimit_LimitSet(BaseClass* BaseClass_ptr1, BaseClass* Base return false; } -bool get_AccumulatorLimit_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_AccumulatorLimit_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const AccumulatorLimit* element = dynamic_cast(BaseClass_ptr1)) + AccumulatorLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->value; - if (!buffer.str().empty()) + buffer >> element->value; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_AccumulatorLimit_LimitSet(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AccumulatorLimit* element = dynamic_cast(BaseClass_ptr1)) + const AccumulatorLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->LimitSet != 0) { @@ -102,6 +86,20 @@ bool get_AccumulatorLimit_LimitSet(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->value; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char AccumulatorLimit::debugName[] = "AccumulatorLimit"; const char* AccumulatorLimit::debugString() const @@ -111,17 +109,17 @@ const char* AccumulatorLimit::debugString() const void AccumulatorLimit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AccumulatorLimit"), &AccumulatorLimit_factory)); + factory_map.emplace("cim:AccumulatorLimit", &AccumulatorLimit_factory); } void AccumulatorLimit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AccumulatorLimit.value"), &assign_AccumulatorLimit_value)); + assign_map.emplace("cim:AccumulatorLimit.value", &assign_AccumulatorLimit_value); } void AccumulatorLimit::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AccumulatorLimit.LimitSet"), &assign_AccumulatorLimit_LimitSet)); + assign_map.emplace("cim:AccumulatorLimit.LimitSet", &assign_AccumulatorLimit_LimitSet); } void AccumulatorLimit::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/AccumulatorLimit.hpp b/CGMES_2.4.13_18DEC2013/AccumulatorLimit.hpp index d64fc8fab..e49dffefb 100644 --- a/CGMES_2.4.13_18DEC2013/AccumulatorLimit.hpp +++ b/CGMES_2.4.13_18DEC2013/AccumulatorLimit.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class AccumulatorLimitSet; - /* - Limit values for Accumulator measurements. - */ + /** \brief Limit values for Accumulator measurements. */ class AccumulatorLimit : public Limit { public: @@ -28,8 +26,11 @@ namespace CIMPP AccumulatorLimit(); ~AccumulatorLimit() override; - CIMPP::AccumulatorLimitSet* LimitSet; /* The limit values used for supervision of Measurements. Default: 0 */ - CIMPP::Integer value; /* The value to supervise against. The value is positive. Default: 0 */ + /** \brief The limit values used for supervision of Measurements. Default: 0 */ + CIMPP::AccumulatorLimitSet* LimitSet; + + /** \brief The value to supervise against. The value is positive. Default: 0 */ + CIMPP::Integer value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/AccumulatorLimitSet.cpp b/CGMES_2.4.13_18DEC2013/AccumulatorLimitSet.cpp index 4721674f0..dcba477a5 100644 --- a/CGMES_2.4.13_18DEC2013/AccumulatorLimitSet.cpp +++ b/CGMES_2.4.13_18DEC2013/AccumulatorLimitSet.cpp @@ -8,14 +8,13 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "AccumulatorLimit.hpp" #include "Accumulator.hpp" -#include "Boolean.hpp" +#include "AccumulatorLimit.hpp" using namespace CIMPP; -AccumulatorLimitSet::AccumulatorLimitSet() {}; -AccumulatorLimitSet::~AccumulatorLimitSet() {}; +AccumulatorLimitSet::AccumulatorLimitSet() {} +AccumulatorLimitSet::~AccumulatorLimitSet() {} static const std::list PossibleProfilesForClass = { @@ -44,21 +43,6 @@ AccumulatorLimitSet::getPossibleProfilesForAttributes() const return map; } - -bool assign_AccumulatorLimitSet_isPercentageLimits(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (AccumulatorLimitSet* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->isPercentageLimits; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_AccumulatorLimit_LimitSet(BaseClass*, BaseClass*); bool assign_AccumulatorLimitSet_Limits(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -75,6 +59,7 @@ bool assign_AccumulatorLimitSet_Limits(BaseClass* BaseClass_ptr1, BaseClass* Bas } return false; } + bool assign_Accumulator_LimitSets(BaseClass*, BaseClass*); bool assign_AccumulatorLimitSet_Measurements(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -92,24 +77,25 @@ bool assign_AccumulatorLimitSet_Measurements(BaseClass* BaseClass_ptr1, BaseClas return false; } -bool get_AccumulatorLimitSet_isPercentageLimits(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_AccumulatorLimitSet_isPercentageLimits(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const AccumulatorLimitSet* element = dynamic_cast(BaseClass_ptr1)) + AccumulatorLimitSet* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->isPercentageLimits; - if (!buffer.str().empty()) + buffer >> element->isPercentageLimits; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } bool get_AccumulatorLimitSet_Measurements(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AccumulatorLimitSet* element = dynamic_cast(BaseClass_ptr1)) + const AccumulatorLimitSet* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { std::copy(element->Measurements.begin(), element->Measurements.end(), std::back_inserter(BaseClass_list)); return !BaseClass_list.empty(); @@ -117,6 +103,20 @@ bool get_AccumulatorLimitSet_Measurements(const BaseClass* BaseClass_ptr1, std:: return false; } +bool get_AccumulatorLimitSet_isPercentageLimits(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const AccumulatorLimitSet* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->isPercentageLimits; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char AccumulatorLimitSet::debugName[] = "AccumulatorLimitSet"; const char* AccumulatorLimitSet::debugString() const @@ -126,18 +126,18 @@ const char* AccumulatorLimitSet::debugString() const void AccumulatorLimitSet::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AccumulatorLimitSet"), &AccumulatorLimitSet_factory)); + factory_map.emplace("cim:AccumulatorLimitSet", &AccumulatorLimitSet_factory); } void AccumulatorLimitSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AccumulatorLimitSet.isPercentageLimits"), &assign_AccumulatorLimitSet_isPercentageLimits)); + assign_map.emplace("cim:AccumulatorLimitSet.isPercentageLimits", &assign_AccumulatorLimitSet_isPercentageLimits); } void AccumulatorLimitSet::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AccumulatorLimitSet.Limits"), &assign_AccumulatorLimitSet_Limits)); - assign_map.insert(std::make_pair(std::string("cim:AccumulatorLimitSet.Measurements"), &assign_AccumulatorLimitSet_Measurements)); + assign_map.emplace("cim:AccumulatorLimitSet.Limits", &assign_AccumulatorLimitSet_Limits); + assign_map.emplace("cim:AccumulatorLimitSet.Measurements", &assign_AccumulatorLimitSet_Measurements); } void AccumulatorLimitSet::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/AccumulatorLimitSet.hpp b/CGMES_2.4.13_18DEC2013/AccumulatorLimitSet.hpp index 54a0144bd..bbe956f8c 100644 --- a/CGMES_2.4.13_18DEC2013/AccumulatorLimitSet.hpp +++ b/CGMES_2.4.13_18DEC2013/AccumulatorLimitSet.hpp @@ -19,9 +19,7 @@ namespace CIMPP class Accumulator; class AccumulatorLimit; - /* - An AccumulatorLimitSet specifies a set of Limits that are associated with an Accumulator measurement. - */ + /** \brief An AccumulatorLimitSet specifies a set of Limits that are associated with an Accumulator measurement. */ class AccumulatorLimitSet : public LimitSet { public: @@ -29,9 +27,14 @@ namespace CIMPP AccumulatorLimitSet(); ~AccumulatorLimitSet() override; - std::list Limits; /* The set of limits. Default: 0 */ - std::list Measurements; /* A measurement may have zero or more limit ranges defined for it. Default: 0 */ - CIMPP::Boolean isPercentageLimits; /* Tells if the limit values are in percentage of normalValue or the specified Unit for Measurements and Controls. Default: false */ + /** \brief The set of limits. Default: 0 */ + std::list Limits; + + /** \brief A measurement may have zero or more limit ranges defined for it. Default: 0 */ + std::list Measurements; + + /** \brief Tells if the limit values are in percentage of normalValue or the specified Unit for Measurements and Controls. Default: false */ + CIMPP::Boolean isPercentageLimits; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/AccumulatorReset.cpp b/CGMES_2.4.13_18DEC2013/AccumulatorReset.cpp index 4fcaaba29..ae3e698db 100644 --- a/CGMES_2.4.13_18DEC2013/AccumulatorReset.cpp +++ b/CGMES_2.4.13_18DEC2013/AccumulatorReset.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -AccumulatorReset::AccumulatorReset() : AccumulatorValue(nullptr) {}; -AccumulatorReset::~AccumulatorReset() {}; +AccumulatorReset::AccumulatorReset() : AccumulatorValue(nullptr) {} +AccumulatorReset::~AccumulatorReset() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ AccumulatorReset::getPossibleProfilesForAttributes() const return map; } - - bool assign_AccumulatorValue_AccumulatorReset(BaseClass*, BaseClass*); bool assign_AccumulatorReset_AccumulatorValue(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_AccumulatorReset_AccumulatorValue(BaseClass* BaseClass_ptr1, BaseCla return false; } - bool get_AccumulatorReset_AccumulatorValue(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AccumulatorReset* element = dynamic_cast(BaseClass_ptr1)) + const AccumulatorReset* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->AccumulatorValue != 0) { @@ -73,7 +71,6 @@ bool get_AccumulatorReset_AccumulatorValue(const BaseClass* BaseClass_ptr1, std: return false; } - const char AccumulatorReset::debugName[] = "AccumulatorReset"; const char* AccumulatorReset::debugString() const { @@ -82,7 +79,7 @@ const char* AccumulatorReset::debugString() const void AccumulatorReset::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AccumulatorReset"), &AccumulatorReset_factory)); + factory_map.emplace("cim:AccumulatorReset", &AccumulatorReset_factory); } void AccumulatorReset::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void AccumulatorReset::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AccumulatorReset.AccumulatorValue"), &assign_AccumulatorReset_AccumulatorValue)); + assign_map.emplace("cim:AccumulatorReset.AccumulatorValue", &assign_AccumulatorReset_AccumulatorValue); } void AccumulatorReset::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/AccumulatorReset.hpp b/CGMES_2.4.13_18DEC2013/AccumulatorReset.hpp index d474cb11c..8c35f6e44 100644 --- a/CGMES_2.4.13_18DEC2013/AccumulatorReset.hpp +++ b/CGMES_2.4.13_18DEC2013/AccumulatorReset.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class AccumulatorValue; - /* - This command reset the counter value to zero. - */ + /** \brief This command reset the counter value to zero. */ class AccumulatorReset : public Control { public: @@ -27,7 +25,8 @@ namespace CIMPP AccumulatorReset(); ~AccumulatorReset() override; - CIMPP::AccumulatorValue* AccumulatorValue; /* The accumulator value that is reset by the command. Default: 0 */ + /** \brief The accumulator value that is reset by the command. Default: 0 */ + CIMPP::AccumulatorValue* AccumulatorValue; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/AccumulatorValue.cpp b/CGMES_2.4.13_18DEC2013/AccumulatorValue.cpp index b26655b9b..7311c3091 100644 --- a/CGMES_2.4.13_18DEC2013/AccumulatorValue.cpp +++ b/CGMES_2.4.13_18DEC2013/AccumulatorValue.cpp @@ -10,12 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "Accumulator.hpp" #include "AccumulatorReset.hpp" -#include "Integer.hpp" using namespace CIMPP; -AccumulatorValue::AccumulatorValue() : Accumulator(nullptr), AccumulatorReset(nullptr) {}; -AccumulatorValue::~AccumulatorValue() {}; +AccumulatorValue::AccumulatorValue() : Accumulator(nullptr), AccumulatorReset(nullptr) {} +AccumulatorValue::~AccumulatorValue() {} static const std::list PossibleProfilesForClass = { @@ -44,21 +43,6 @@ AccumulatorValue::getPossibleProfilesForAttributes() const return map; } - -bool assign_AccumulatorValue_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (AccumulatorValue* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->value; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_Accumulator_AccumulatorValues(BaseClass*, BaseClass*); bool assign_AccumulatorValue_Accumulator(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -75,6 +59,7 @@ bool assign_AccumulatorValue_Accumulator(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_AccumulatorReset_AccumulatorValue(BaseClass*, BaseClass*); bool assign_AccumulatorValue_AccumulatorReset(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -92,24 +77,24 @@ bool assign_AccumulatorValue_AccumulatorReset(BaseClass* BaseClass_ptr1, BaseCla return false; } -bool get_AccumulatorValue_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_AccumulatorValue_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const AccumulatorValue* element = dynamic_cast(BaseClass_ptr1)) + AccumulatorValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->value; - if (!buffer.str().empty()) + buffer >> element->value; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_AccumulatorValue_Accumulator(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AccumulatorValue* element = dynamic_cast(BaseClass_ptr1)) + const AccumulatorValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Accumulator != 0) { @@ -121,6 +106,21 @@ bool get_AccumulatorValue_Accumulator(const BaseClass* BaseClass_ptr1, std::list } +bool get_AccumulatorValue_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const AccumulatorValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->value; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + const char AccumulatorValue::debugName[] = "AccumulatorValue"; const char* AccumulatorValue::debugString() const { @@ -129,18 +129,18 @@ const char* AccumulatorValue::debugString() const void AccumulatorValue::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AccumulatorValue"), &AccumulatorValue_factory)); + factory_map.emplace("cim:AccumulatorValue", &AccumulatorValue_factory); } void AccumulatorValue::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AccumulatorValue.value"), &assign_AccumulatorValue_value)); + assign_map.emplace("cim:AccumulatorValue.value", &assign_AccumulatorValue_value); } void AccumulatorValue::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AccumulatorValue.Accumulator"), &assign_AccumulatorValue_Accumulator)); - assign_map.insert(std::make_pair(std::string("cim:AccumulatorValue.AccumulatorReset"), &assign_AccumulatorValue_AccumulatorReset)); + assign_map.emplace("cim:AccumulatorValue.Accumulator", &assign_AccumulatorValue_Accumulator); + assign_map.emplace("cim:AccumulatorValue.AccumulatorReset", &assign_AccumulatorValue_AccumulatorReset); } void AccumulatorValue::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/AccumulatorValue.hpp b/CGMES_2.4.13_18DEC2013/AccumulatorValue.hpp index 715cf4a55..3a573eb45 100644 --- a/CGMES_2.4.13_18DEC2013/AccumulatorValue.hpp +++ b/CGMES_2.4.13_18DEC2013/AccumulatorValue.hpp @@ -19,9 +19,7 @@ namespace CIMPP class Accumulator; class AccumulatorReset; - /* - AccumulatorValue represents an accumulated (counted) MeasurementValue. - */ + /** \brief AccumulatorValue represents an accumulated (counted) MeasurementValue. */ class AccumulatorValue : public MeasurementValue { public: @@ -29,9 +27,14 @@ namespace CIMPP AccumulatorValue(); ~AccumulatorValue() override; - CIMPP::Accumulator* Accumulator; /* The values connected to this measurement. Default: 0 */ - CIMPP::AccumulatorReset* AccumulatorReset; /* The command that reset the accumulator value. Default: 0 */ - CIMPP::Integer value; /* The value to supervise. The value is positive. Default: 0 */ + /** \brief The values connected to this measurement. Default: 0 */ + CIMPP::Accumulator* Accumulator; + + /** \brief The command that reset the accumulator value. Default: 0 */ + CIMPP::AccumulatorReset* AccumulatorReset; + + /** \brief The value to supervise. The value is positive. Default: 0 */ + CIMPP::Integer value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ActivePower.hpp b/CGMES_2.4.13_18DEC2013/ActivePower.hpp index d1a142af8..37f33d93d 100644 --- a/CGMES_2.4.13_18DEC2013/ActivePower.hpp +++ b/CGMES_2.4.13_18DEC2013/ActivePower.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Product of RMS value of the voltage and the RMS value of the in-phase component of the current. - */ + /** \brief Product of RMS value of the voltage and the RMS value of the in-phase component of the current. */ class ActivePower { public: diff --git a/CGMES_2.4.13_18DEC2013/ActivePowerLimit.cpp b/CGMES_2.4.13_18DEC2013/ActivePowerLimit.cpp index 587b83aff..d05a279c9 100644 --- a/CGMES_2.4.13_18DEC2013/ActivePowerLimit.cpp +++ b/CGMES_2.4.13_18DEC2013/ActivePowerLimit.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "ActivePower.hpp" using namespace CIMPP; -ActivePowerLimit::ActivePowerLimit() {}; -ActivePowerLimit::~ActivePowerLimit() {}; +ActivePowerLimit::ActivePowerLimit() {} +ActivePowerLimit::~ActivePowerLimit() {} static const std::list PossibleProfilesForClass = { @@ -40,25 +39,24 @@ ActivePowerLimit::getPossibleProfilesForAttributes() const return map; } - -bool assign_ActivePowerLimit_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ActivePowerLimit_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ActivePowerLimit* element = dynamic_cast(BaseClass_ptr1)) + ActivePowerLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->value; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ActivePowerLimit_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ActivePowerLimit* element = dynamic_cast(BaseClass_ptr1)) + const ActivePowerLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value; if (!buffer.str().empty()) @@ -70,8 +68,6 @@ bool get_ActivePowerLimit_value(const BaseClass* BaseClass_ptr1, std::stringstre return false; } - - const char ActivePowerLimit::debugName[] = "ActivePowerLimit"; const char* ActivePowerLimit::debugString() const { @@ -80,12 +76,12 @@ const char* ActivePowerLimit::debugString() const void ActivePowerLimit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ActivePowerLimit"), &ActivePowerLimit_factory)); + factory_map.emplace("cim:ActivePowerLimit", &ActivePowerLimit_factory); } void ActivePowerLimit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ActivePowerLimit.value"), &assign_ActivePowerLimit_value)); + assign_map.emplace("cim:ActivePowerLimit.value", &assign_ActivePowerLimit_value); } void ActivePowerLimit::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ActivePowerLimit.hpp b/CGMES_2.4.13_18DEC2013/ActivePowerLimit.hpp index b13c05c4a..cdf99235b 100644 --- a/CGMES_2.4.13_18DEC2013/ActivePowerLimit.hpp +++ b/CGMES_2.4.13_18DEC2013/ActivePowerLimit.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Limit on active power flow. - */ + /** \brief Limit on active power flow. */ class ActivePowerLimit : public OperationalLimit { public: @@ -27,7 +25,8 @@ namespace CIMPP ActivePowerLimit(); ~ActivePowerLimit() override; - CIMPP::ActivePower value; /* Value of active power limit. Default: nullptr */ + /** \brief Value of active power limit. Default: nullptr */ + CIMPP::ActivePower value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ActivePowerPerFrequency.hpp b/CGMES_2.4.13_18DEC2013/ActivePowerPerFrequency.hpp index f8b5bd3ab..dbbdb347e 100644 --- a/CGMES_2.4.13_18DEC2013/ActivePowerPerFrequency.hpp +++ b/CGMES_2.4.13_18DEC2013/ActivePowerPerFrequency.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Active power variation with frequency. - */ + /** \brief Active power variation with frequency. */ class ActivePowerPerFrequency { public: diff --git a/CGMES_2.4.13_18DEC2013/Analog.cpp b/CGMES_2.4.13_18DEC2013/Analog.cpp index 2721f0af2..d11d78a05 100644 --- a/CGMES_2.4.13_18DEC2013/Analog.cpp +++ b/CGMES_2.4.13_18DEC2013/Analog.cpp @@ -8,14 +8,13 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "AnalogValue.hpp" #include "AnalogLimitSet.hpp" -#include "Boolean.hpp" +#include "AnalogValue.hpp" using namespace CIMPP; -Analog::Analog() {}; -Analog::~Analog() {}; +Analog::Analog() {} +Analog::~Analog() {} static const std::list PossibleProfilesForClass = { @@ -44,21 +43,6 @@ Analog::getPossibleProfilesForAttributes() const return map; } - -bool assign_Analog_positiveFlowIn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (Analog* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->positiveFlowIn; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_AnalogValue_Analog(BaseClass*, BaseClass*); bool assign_Analog_AnalogValues(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -75,6 +59,7 @@ bool assign_Analog_AnalogValues(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ } return false; } + bool assign_AnalogLimitSet_Measurements(BaseClass*, BaseClass*); bool assign_Analog_LimitSets(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -92,9 +77,26 @@ bool assign_Analog_LimitSets(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr return false; } +bool assign_Analog_positiveFlowIn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + Analog* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->positiveFlowIn; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + + bool get_Analog_positiveFlowIn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Analog* element = dynamic_cast(BaseClass_ptr1)) + const Analog* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->positiveFlowIn; if (!buffer.str().empty()) @@ -106,8 +108,6 @@ bool get_Analog_positiveFlowIn(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } - - const char Analog::debugName[] = "Analog"; const char* Analog::debugString() const { @@ -116,18 +116,18 @@ const char* Analog::debugString() const void Analog::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Analog"), &Analog_factory)); + factory_map.emplace("cim:Analog", &Analog_factory); } void Analog::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Analog.positiveFlowIn"), &assign_Analog_positiveFlowIn)); + assign_map.emplace("cim:Analog.positiveFlowIn", &assign_Analog_positiveFlowIn); } void Analog::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Analog.AnalogValues"), &assign_Analog_AnalogValues)); - assign_map.insert(std::make_pair(std::string("cim:Analog.LimitSets"), &assign_Analog_LimitSets)); + assign_map.emplace("cim:Analog.AnalogValues", &assign_Analog_AnalogValues); + assign_map.emplace("cim:Analog.LimitSets", &assign_Analog_LimitSets); } void Analog::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/Analog.hpp b/CGMES_2.4.13_18DEC2013/Analog.hpp index 667a90c4f..38ba38c37 100644 --- a/CGMES_2.4.13_18DEC2013/Analog.hpp +++ b/CGMES_2.4.13_18DEC2013/Analog.hpp @@ -19,9 +19,7 @@ namespace CIMPP class AnalogLimitSet; class AnalogValue; - /* - Analog represents an analog Measurement. - */ + /** \brief Analog represents an analog Measurement. */ class Analog : public Measurement { public: @@ -29,9 +27,14 @@ namespace CIMPP Analog(); ~Analog() override; - std::list AnalogValues; /* Measurement to which this value is connected. Default: 0 */ - std::list LimitSets; /* The Measurements using the LimitSet. Default: 0 */ - CIMPP::Boolean positiveFlowIn; /* If true then this measurement is an active power, reactive power or current with the convention that a positive value measured at the Terminal means power is flowing into the related PowerSystemResource. Default: false */ + /** \brief Measurement to which this value is connected. Default: 0 */ + std::list AnalogValues; + + /** \brief The Measurements using the LimitSet. Default: 0 */ + std::list LimitSets; + + /** \brief If true then this measurement is an active power, reactive power or current with the convention that a positive value measured at the Terminal means power is flowing into the related PowerSystemResource. Default: false */ + CIMPP::Boolean positiveFlowIn; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/AnalogControl.cpp b/CGMES_2.4.13_18DEC2013/AnalogControl.cpp index 1e6f809f9..aba858065 100644 --- a/CGMES_2.4.13_18DEC2013/AnalogControl.cpp +++ b/CGMES_2.4.13_18DEC2013/AnalogControl.cpp @@ -9,13 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "AnalogValue.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -AnalogControl::AnalogControl() : AnalogValue(nullptr) {}; -AnalogControl::~AnalogControl() {}; +AnalogControl::AnalogControl() : AnalogValue(nullptr) {} +AnalogControl::~AnalogControl() {} static const std::list PossibleProfilesForClass = { @@ -44,70 +42,71 @@ AnalogControl::getPossibleProfilesForAttributes() const return map; } - -bool assign_AnalogControl_maxValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AnalogValue_AnalogControl(BaseClass*, BaseClass*); +bool assign_AnalogControl_AnalogValue(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (AnalogControl* element = dynamic_cast(BaseClass_ptr1)) + AnalogControl* element = dynamic_cast(BaseClass_ptr1); + AnalogValue* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->maxValue; - if (buffer.fail()) - return false; - else - return true; + if (element->AnalogValue != element2) + { + element->AnalogValue = element2; + return assign_AnalogValue_AnalogControl(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_AnalogControl_minValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AnalogControl_maxValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AnalogControl* element = dynamic_cast(BaseClass_ptr1)) + AnalogControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->minValue; - if (buffer.fail()) - return false; - else + buffer >> element->maxValue; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_AnalogValue_AnalogControl(BaseClass*, BaseClass*); -bool assign_AnalogControl_AnalogValue(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_AnalogControl_minValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { AnalogControl* element = dynamic_cast(BaseClass_ptr1); - AnalogValue* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->AnalogValue != element2) + buffer >> element->minValue; + if (!buffer.fail()) { - element->AnalogValue = element2; - return assign_AnalogValue_AnalogControl(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool get_AnalogControl_maxValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_AnalogControl_AnalogValue(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AnalogControl* element = dynamic_cast(BaseClass_ptr1)) + const AnalogControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->maxValue; - if (!buffer.str().empty()) + if (element->AnalogValue != 0) { + BaseClass_list.push_back(element->AnalogValue); return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_AnalogControl_minValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_AnalogControl_maxValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AnalogControl* element = dynamic_cast(BaseClass_ptr1)) + const AnalogControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->minValue; + buffer << element->maxValue; if (!buffer.str().empty()) { return true; @@ -117,21 +116,21 @@ bool get_AnalogControl_minValue(const BaseClass* BaseClass_ptr1, std::stringstre return false; } - -bool get_AnalogControl_AnalogValue(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) +bool get_AnalogControl_minValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AnalogControl* element = dynamic_cast(BaseClass_ptr1)) + const AnalogControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->AnalogValue != 0) + buffer << element->minValue; + if (!buffer.str().empty()) { - BaseClass_list.push_back(element->AnalogValue); return true; } } + buffer.setstate(std::ios::failbit); return false; } - const char AnalogControl::debugName[] = "AnalogControl"; const char* AnalogControl::debugString() const { @@ -140,18 +139,18 @@ const char* AnalogControl::debugString() const void AnalogControl::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AnalogControl"), &AnalogControl_factory)); + factory_map.emplace("cim:AnalogControl", &AnalogControl_factory); } void AnalogControl::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AnalogControl.maxValue"), &assign_AnalogControl_maxValue)); - assign_map.insert(std::make_pair(std::string("cim:AnalogControl.minValue"), &assign_AnalogControl_minValue)); + assign_map.emplace("cim:AnalogControl.maxValue", &assign_AnalogControl_maxValue); + assign_map.emplace("cim:AnalogControl.minValue", &assign_AnalogControl_minValue); } void AnalogControl::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AnalogControl.AnalogValue"), &assign_AnalogControl_AnalogValue)); + assign_map.emplace("cim:AnalogControl.AnalogValue", &assign_AnalogControl_AnalogValue); } void AnalogControl::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/AnalogControl.hpp b/CGMES_2.4.13_18DEC2013/AnalogControl.hpp index 546706c40..8185c302e 100644 --- a/CGMES_2.4.13_18DEC2013/AnalogControl.hpp +++ b/CGMES_2.4.13_18DEC2013/AnalogControl.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class AnalogValue; - /* - An analog control used for supervisory control. - */ + /** \brief An analog control used for supervisory control. */ class AnalogControl : public Control { public: @@ -28,9 +26,14 @@ namespace CIMPP AnalogControl(); ~AnalogControl() override; - CIMPP::AnalogValue* AnalogValue; /* The Control variable associated with the MeasurementValue. Default: 0 */ - CIMPP::Simple_Float maxValue; /* Normal value range maximum for any of the Control.value. Used for scaling, e.g. in bar graphs. Default: nullptr */ - CIMPP::Simple_Float minValue; /* Normal value range minimum for any of the Control.value. Used for scaling, e.g. in bar graphs. Default: nullptr */ + /** \brief The Control variable associated with the MeasurementValue. Default: 0 */ + CIMPP::AnalogValue* AnalogValue; + + /** \brief Normal value range maximum for any of the Control.value. Used for scaling, e.g. in bar graphs. Default: nullptr */ + CIMPP::Simple_Float maxValue; + + /** \brief Normal value range minimum for any of the Control.value. Used for scaling, e.g. in bar graphs. Default: nullptr */ + CIMPP::Simple_Float minValue; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/AnalogLimit.cpp b/CGMES_2.4.13_18DEC2013/AnalogLimit.cpp index 0408b5298..007d1c5d0 100644 --- a/CGMES_2.4.13_18DEC2013/AnalogLimit.cpp +++ b/CGMES_2.4.13_18DEC2013/AnalogLimit.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "AnalogLimitSet.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -AnalogLimit::AnalogLimit() : LimitSet(nullptr) {}; -AnalogLimit::~AnalogLimit() {}; +AnalogLimit::AnalogLimit() : LimitSet(nullptr) {} +AnalogLimit::~AnalogLimit() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ AnalogLimit::getPossibleProfilesForAttributes() const return map; } - -bool assign_AnalogLimit_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (AnalogLimit* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->value; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_AnalogLimitSet_Limits(BaseClass*, BaseClass*); bool assign_AnalogLimit_LimitSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_AnalogLimit_LimitSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass return false; } -bool get_AnalogLimit_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_AnalogLimit_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const AnalogLimit* element = dynamic_cast(BaseClass_ptr1)) + AnalogLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->value; - if (!buffer.str().empty()) + buffer >> element->value; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_AnalogLimit_LimitSet(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AnalogLimit* element = dynamic_cast(BaseClass_ptr1)) + const AnalogLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->LimitSet != 0) { @@ -102,6 +86,20 @@ bool get_AnalogLimit_LimitSet(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->value; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char AnalogLimit::debugName[] = "AnalogLimit"; const char* AnalogLimit::debugString() const @@ -111,17 +109,17 @@ const char* AnalogLimit::debugString() const void AnalogLimit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AnalogLimit"), &AnalogLimit_factory)); + factory_map.emplace("cim:AnalogLimit", &AnalogLimit_factory); } void AnalogLimit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AnalogLimit.value"), &assign_AnalogLimit_value)); + assign_map.emplace("cim:AnalogLimit.value", &assign_AnalogLimit_value); } void AnalogLimit::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AnalogLimit.LimitSet"), &assign_AnalogLimit_LimitSet)); + assign_map.emplace("cim:AnalogLimit.LimitSet", &assign_AnalogLimit_LimitSet); } void AnalogLimit::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/AnalogLimit.hpp b/CGMES_2.4.13_18DEC2013/AnalogLimit.hpp index 1d0aefb00..58ddbd984 100644 --- a/CGMES_2.4.13_18DEC2013/AnalogLimit.hpp +++ b/CGMES_2.4.13_18DEC2013/AnalogLimit.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class AnalogLimitSet; - /* - Limit values for Analog measurements. - */ + /** \brief Limit values for Analog measurements. */ class AnalogLimit : public Limit { public: @@ -28,8 +26,11 @@ namespace CIMPP AnalogLimit(); ~AnalogLimit() override; - CIMPP::AnalogLimitSet* LimitSet; /* The limit values used for supervision of Measurements. Default: 0 */ - CIMPP::Simple_Float value; /* The value to supervise against. Default: nullptr */ + /** \brief The limit values used for supervision of Measurements. Default: 0 */ + CIMPP::AnalogLimitSet* LimitSet; + + /** \brief The value to supervise against. Default: nullptr */ + CIMPP::Simple_Float value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/AnalogLimitSet.cpp b/CGMES_2.4.13_18DEC2013/AnalogLimitSet.cpp index 7c343466d..c59ae0fa2 100644 --- a/CGMES_2.4.13_18DEC2013/AnalogLimitSet.cpp +++ b/CGMES_2.4.13_18DEC2013/AnalogLimitSet.cpp @@ -8,14 +8,13 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "AnalogLimit.hpp" #include "Analog.hpp" -#include "Boolean.hpp" +#include "AnalogLimit.hpp" using namespace CIMPP; -AnalogLimitSet::AnalogLimitSet() {}; -AnalogLimitSet::~AnalogLimitSet() {}; +AnalogLimitSet::AnalogLimitSet() {} +AnalogLimitSet::~AnalogLimitSet() {} static const std::list PossibleProfilesForClass = { @@ -44,21 +43,6 @@ AnalogLimitSet::getPossibleProfilesForAttributes() const return map; } - -bool assign_AnalogLimitSet_isPercentageLimits(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (AnalogLimitSet* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->isPercentageLimits; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_AnalogLimit_LimitSet(BaseClass*, BaseClass*); bool assign_AnalogLimitSet_Limits(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -75,6 +59,7 @@ bool assign_AnalogLimitSet_Limits(BaseClass* BaseClass_ptr1, BaseClass* BaseClas } return false; } + bool assign_Analog_LimitSets(BaseClass*, BaseClass*); bool assign_AnalogLimitSet_Measurements(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -92,24 +77,25 @@ bool assign_AnalogLimitSet_Measurements(BaseClass* BaseClass_ptr1, BaseClass* Ba return false; } -bool get_AnalogLimitSet_isPercentageLimits(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_AnalogLimitSet_isPercentageLimits(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const AnalogLimitSet* element = dynamic_cast(BaseClass_ptr1)) + AnalogLimitSet* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->isPercentageLimits; - if (!buffer.str().empty()) + buffer >> element->isPercentageLimits; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } bool get_AnalogLimitSet_Measurements(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AnalogLimitSet* element = dynamic_cast(BaseClass_ptr1)) + const AnalogLimitSet* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { std::copy(element->Measurements.begin(), element->Measurements.end(), std::back_inserter(BaseClass_list)); return !BaseClass_list.empty(); @@ -117,6 +103,20 @@ bool get_AnalogLimitSet_Measurements(const BaseClass* BaseClass_ptr1, std::list< return false; } +bool get_AnalogLimitSet_isPercentageLimits(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const AnalogLimitSet* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->isPercentageLimits; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char AnalogLimitSet::debugName[] = "AnalogLimitSet"; const char* AnalogLimitSet::debugString() const @@ -126,18 +126,18 @@ const char* AnalogLimitSet::debugString() const void AnalogLimitSet::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AnalogLimitSet"), &AnalogLimitSet_factory)); + factory_map.emplace("cim:AnalogLimitSet", &AnalogLimitSet_factory); } void AnalogLimitSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AnalogLimitSet.isPercentageLimits"), &assign_AnalogLimitSet_isPercentageLimits)); + assign_map.emplace("cim:AnalogLimitSet.isPercentageLimits", &assign_AnalogLimitSet_isPercentageLimits); } void AnalogLimitSet::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AnalogLimitSet.Limits"), &assign_AnalogLimitSet_Limits)); - assign_map.insert(std::make_pair(std::string("cim:AnalogLimitSet.Measurements"), &assign_AnalogLimitSet_Measurements)); + assign_map.emplace("cim:AnalogLimitSet.Limits", &assign_AnalogLimitSet_Limits); + assign_map.emplace("cim:AnalogLimitSet.Measurements", &assign_AnalogLimitSet_Measurements); } void AnalogLimitSet::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/AnalogLimitSet.hpp b/CGMES_2.4.13_18DEC2013/AnalogLimitSet.hpp index af30f91a4..3bc86a57d 100644 --- a/CGMES_2.4.13_18DEC2013/AnalogLimitSet.hpp +++ b/CGMES_2.4.13_18DEC2013/AnalogLimitSet.hpp @@ -19,9 +19,7 @@ namespace CIMPP class Analog; class AnalogLimit; - /* - An AnalogLimitSet specifies a set of Limits that are associated with an Analog measurement. - */ + /** \brief An AnalogLimitSet specifies a set of Limits that are associated with an Analog measurement. */ class AnalogLimitSet : public LimitSet { public: @@ -29,9 +27,14 @@ namespace CIMPP AnalogLimitSet(); ~AnalogLimitSet() override; - std::list Limits; /* The set of limits. Default: 0 */ - std::list Measurements; /* A measurement may have zero or more limit ranges defined for it. Default: 0 */ - CIMPP::Boolean isPercentageLimits; /* Tells if the limit values are in percentage of normalValue or the specified Unit for Measurements and Controls. Default: false */ + /** \brief The set of limits. Default: 0 */ + std::list Limits; + + /** \brief A measurement may have zero or more limit ranges defined for it. Default: 0 */ + std::list Measurements; + + /** \brief Tells if the limit values are in percentage of normalValue or the specified Unit for Measurements and Controls. Default: false */ + CIMPP::Boolean isPercentageLimits; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/AnalogValue.cpp b/CGMES_2.4.13_18DEC2013/AnalogValue.cpp index eac1a231b..2c9ec60f2 100644 --- a/CGMES_2.4.13_18DEC2013/AnalogValue.cpp +++ b/CGMES_2.4.13_18DEC2013/AnalogValue.cpp @@ -10,12 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "Analog.hpp" #include "AnalogControl.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -AnalogValue::AnalogValue() : Analog(nullptr), AnalogControl(nullptr) {}; -AnalogValue::~AnalogValue() {}; +AnalogValue::AnalogValue() : Analog(nullptr), AnalogControl(nullptr) {} +AnalogValue::~AnalogValue() {} static const std::list PossibleProfilesForClass = { @@ -44,21 +43,6 @@ AnalogValue::getPossibleProfilesForAttributes() const return map; } - -bool assign_AnalogValue_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (AnalogValue* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->value; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_Analog_AnalogValues(BaseClass*, BaseClass*); bool assign_AnalogValue_Analog(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -75,6 +59,7 @@ bool assign_AnalogValue_Analog(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_p } return false; } + bool assign_AnalogControl_AnalogValue(BaseClass*, BaseClass*); bool assign_AnalogValue_AnalogControl(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -92,24 +77,24 @@ bool assign_AnalogValue_AnalogControl(BaseClass* BaseClass_ptr1, BaseClass* Base return false; } -bool get_AnalogValue_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_AnalogValue_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const AnalogValue* element = dynamic_cast(BaseClass_ptr1)) + AnalogValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->value; - if (!buffer.str().empty()) + buffer >> element->value; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_AnalogValue_Analog(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AnalogValue* element = dynamic_cast(BaseClass_ptr1)) + const AnalogValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Analog != 0) { @@ -121,6 +106,21 @@ bool get_AnalogValue_Analog(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->value; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + const char AnalogValue::debugName[] = "AnalogValue"; const char* AnalogValue::debugString() const { @@ -129,18 +129,18 @@ const char* AnalogValue::debugString() const void AnalogValue::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AnalogValue"), &AnalogValue_factory)); + factory_map.emplace("cim:AnalogValue", &AnalogValue_factory); } void AnalogValue::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AnalogValue.value"), &assign_AnalogValue_value)); + assign_map.emplace("cim:AnalogValue.value", &assign_AnalogValue_value); } void AnalogValue::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AnalogValue.Analog"), &assign_AnalogValue_Analog)); - assign_map.insert(std::make_pair(std::string("cim:AnalogValue.AnalogControl"), &assign_AnalogValue_AnalogControl)); + assign_map.emplace("cim:AnalogValue.Analog", &assign_AnalogValue_Analog); + assign_map.emplace("cim:AnalogValue.AnalogControl", &assign_AnalogValue_AnalogControl); } void AnalogValue::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/AnalogValue.hpp b/CGMES_2.4.13_18DEC2013/AnalogValue.hpp index e8bc8c0fc..6a1f17faf 100644 --- a/CGMES_2.4.13_18DEC2013/AnalogValue.hpp +++ b/CGMES_2.4.13_18DEC2013/AnalogValue.hpp @@ -19,9 +19,7 @@ namespace CIMPP class Analog; class AnalogControl; - /* - AnalogValue represents an analog MeasurementValue. - */ + /** \brief AnalogValue represents an analog MeasurementValue. */ class AnalogValue : public MeasurementValue { public: @@ -29,9 +27,14 @@ namespace CIMPP AnalogValue(); ~AnalogValue() override; - CIMPP::Analog* Analog; /* The values connected to this measurement. Default: 0 */ - CIMPP::AnalogControl* AnalogControl; /* The MeasurementValue that is controlled. Default: 0 */ - CIMPP::Simple_Float value; /* The value to supervise. Default: nullptr */ + /** \brief The values connected to this measurement. Default: 0 */ + CIMPP::Analog* Analog; + + /** \brief The MeasurementValue that is controlled. Default: 0 */ + CIMPP::AnalogControl* AnalogControl; + + /** \brief The value to supervise. Default: nullptr */ + CIMPP::Simple_Float value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/AngleDegrees.hpp b/CGMES_2.4.13_18DEC2013/AngleDegrees.hpp index 39204363b..99fe46c0d 100644 --- a/CGMES_2.4.13_18DEC2013/AngleDegrees.hpp +++ b/CGMES_2.4.13_18DEC2013/AngleDegrees.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Measurement of angle in degrees. - */ + /** \brief Measurement of angle in degrees. */ class AngleDegrees { public: diff --git a/CGMES_2.4.13_18DEC2013/AngleRadians.hpp b/CGMES_2.4.13_18DEC2013/AngleRadians.hpp index 2ac29ff28..8f1659629 100644 --- a/CGMES_2.4.13_18DEC2013/AngleRadians.hpp +++ b/CGMES_2.4.13_18DEC2013/AngleRadians.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Phase angle in radians. - */ + /** \brief Phase angle in radians. */ class AngleRadians { public: diff --git a/CGMES_2.4.13_18DEC2013/ApparentPower.hpp b/CGMES_2.4.13_18DEC2013/ApparentPower.hpp index bcb8201e6..0142a98c0 100644 --- a/CGMES_2.4.13_18DEC2013/ApparentPower.hpp +++ b/CGMES_2.4.13_18DEC2013/ApparentPower.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Product of the RMS value of the voltage and the RMS value of the current. - */ + /** \brief Product of the RMS value of the voltage and the RMS value of the current. */ class ApparentPower { public: diff --git a/CGMES_2.4.13_18DEC2013/ApparentPowerLimit.cpp b/CGMES_2.4.13_18DEC2013/ApparentPowerLimit.cpp index ae3fa464c..adbb44d3c 100644 --- a/CGMES_2.4.13_18DEC2013/ApparentPowerLimit.cpp +++ b/CGMES_2.4.13_18DEC2013/ApparentPowerLimit.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "ApparentPower.hpp" using namespace CIMPP; -ApparentPowerLimit::ApparentPowerLimit() {}; -ApparentPowerLimit::~ApparentPowerLimit() {}; +ApparentPowerLimit::ApparentPowerLimit() {} +ApparentPowerLimit::~ApparentPowerLimit() {} static const std::list PossibleProfilesForClass = { @@ -40,25 +39,24 @@ ApparentPowerLimit::getPossibleProfilesForAttributes() const return map; } - -bool assign_ApparentPowerLimit_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ApparentPowerLimit_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ApparentPowerLimit* element = dynamic_cast(BaseClass_ptr1)) + ApparentPowerLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->value; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ApparentPowerLimit_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ApparentPowerLimit* element = dynamic_cast(BaseClass_ptr1)) + const ApparentPowerLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value; if (!buffer.str().empty()) @@ -70,8 +68,6 @@ bool get_ApparentPowerLimit_value(const BaseClass* BaseClass_ptr1, std::stringst return false; } - - const char ApparentPowerLimit::debugName[] = "ApparentPowerLimit"; const char* ApparentPowerLimit::debugString() const { @@ -80,12 +76,12 @@ const char* ApparentPowerLimit::debugString() const void ApparentPowerLimit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ApparentPowerLimit"), &ApparentPowerLimit_factory)); + factory_map.emplace("cim:ApparentPowerLimit", &ApparentPowerLimit_factory); } void ApparentPowerLimit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ApparentPowerLimit.value"), &assign_ApparentPowerLimit_value)); + assign_map.emplace("cim:ApparentPowerLimit.value", &assign_ApparentPowerLimit_value); } void ApparentPowerLimit::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ApparentPowerLimit.hpp b/CGMES_2.4.13_18DEC2013/ApparentPowerLimit.hpp index 77b406d8a..c9bf47334 100644 --- a/CGMES_2.4.13_18DEC2013/ApparentPowerLimit.hpp +++ b/CGMES_2.4.13_18DEC2013/ApparentPowerLimit.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Apparent power limit. - */ + /** \brief Apparent power limit. */ class ApparentPowerLimit : public OperationalLimit { public: @@ -27,7 +25,8 @@ namespace CIMPP ApparentPowerLimit(); ~ApparentPowerLimit() override; - CIMPP::ApparentPower value; /* The apparent power limit. Default: nullptr */ + /** \brief The apparent power limit. Default: nullptr */ + CIMPP::ApparentPower value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Area.hpp b/CGMES_2.4.13_18DEC2013/Area.hpp index 681c909b6..847a38b94 100644 --- a/CGMES_2.4.13_18DEC2013/Area.hpp +++ b/CGMES_2.4.13_18DEC2013/Area.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Area. - */ + /** \brief Area. */ class Area { public: diff --git a/CGMES_2.4.13_18DEC2013/AsynchronousMachine.cpp b/CGMES_2.4.13_18DEC2013/AsynchronousMachine.cpp index bad87183c..934692393 100644 --- a/CGMES_2.4.13_18DEC2013/AsynchronousMachine.cpp +++ b/CGMES_2.4.13_18DEC2013/AsynchronousMachine.cpp @@ -9,21 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "AsynchronousMachineDynamics.hpp" -#include "AsynchronousMachineKind.hpp" -#include "Boolean.hpp" -#include "PerCent.hpp" -#include "Simple_Float.hpp" -#include "Frequency.hpp" -#include "RotationSpeed.hpp" -#include "Integer.hpp" -#include "ActivePower.hpp" -#include "Boolean.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -AsynchronousMachine::AsynchronousMachine() : AsynchronousMachineDynamics(nullptr) {}; -AsynchronousMachine::~AsynchronousMachine() {}; +AsynchronousMachine::AsynchronousMachine() : AsynchronousMachineDynamics(nullptr) {} +AsynchronousMachine::~AsynchronousMachine() {} static const std::list PossibleProfilesForClass = { @@ -62,158 +52,183 @@ AsynchronousMachine::getPossibleProfilesForAttributes() const return map; } +bool assign_AsynchronousMachineDynamics_AsynchronousMachine(BaseClass*, BaseClass*); +bool assign_AsynchronousMachine_AsynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + AsynchronousMachineDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->AsynchronousMachineDynamics != element2) + { + element->AsynchronousMachineDynamics = element2; + return assign_AsynchronousMachineDynamics_AsynchronousMachine(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_AsynchronousMachine_asynchronousMachineType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_asynchronousMachineType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->asynchronousMachineType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachine_converterFedDrive(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_converterFedDrive(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->converterFedDrive; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachine_efficiency(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_efficiency(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efficiency; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachine_iaIrRatio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_iaIrRatio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->iaIrRatio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachine_nominalFrequency(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_nominalFrequency(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nominalFrequency; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachine_nominalSpeed(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_nominalSpeed(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nominalSpeed; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachine_polePairNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_polePairNumber(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->polePairNumber; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachine_ratedMechanicalPower(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_ratedMechanicalPower(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedMechanicalPower; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachine_reversible(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_reversible(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->reversible; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachine_rxLockedRotorRatio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_rxLockedRotorRatio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rxLockedRotorRatio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachineDynamics_AsynchronousMachine(BaseClass*, BaseClass*); -bool assign_AsynchronousMachine_AsynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_AsynchronousMachine_asynchronousMachineType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); - AsynchronousMachineDynamics* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->AsynchronousMachineDynamics != element2) + buffer << element->asynchronousMachineType; + if (!buffer.str().empty()) { - element->AsynchronousMachineDynamics = element2; - return assign_AsynchronousMachineDynamics_AsynchronousMachine(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } + buffer.setstate(std::ios::failbit); return false; } bool get_AsynchronousMachine_converterFedDrive(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->converterFedDrive; if (!buffer.str().empty()) @@ -227,7 +242,8 @@ bool get_AsynchronousMachine_converterFedDrive(const BaseClass* BaseClass_ptr1, bool get_AsynchronousMachine_efficiency(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efficiency; if (!buffer.str().empty()) @@ -241,7 +257,8 @@ bool get_AsynchronousMachine_efficiency(const BaseClass* BaseClass_ptr1, std::st bool get_AsynchronousMachine_iaIrRatio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->iaIrRatio; if (!buffer.str().empty()) @@ -255,7 +272,8 @@ bool get_AsynchronousMachine_iaIrRatio(const BaseClass* BaseClass_ptr1, std::str bool get_AsynchronousMachine_nominalFrequency(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nominalFrequency; if (!buffer.str().empty()) @@ -269,7 +287,8 @@ bool get_AsynchronousMachine_nominalFrequency(const BaseClass* BaseClass_ptr1, s bool get_AsynchronousMachine_nominalSpeed(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nominalSpeed; if (!buffer.str().empty()) @@ -283,7 +302,8 @@ bool get_AsynchronousMachine_nominalSpeed(const BaseClass* BaseClass_ptr1, std:: bool get_AsynchronousMachine_polePairNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->polePairNumber; if (!buffer.str().empty()) @@ -297,7 +317,8 @@ bool get_AsynchronousMachine_polePairNumber(const BaseClass* BaseClass_ptr1, std bool get_AsynchronousMachine_ratedMechanicalPower(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedMechanicalPower; if (!buffer.str().empty()) @@ -311,7 +332,8 @@ bool get_AsynchronousMachine_ratedMechanicalPower(const BaseClass* BaseClass_ptr bool get_AsynchronousMachine_reversible(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->reversible; if (!buffer.str().empty()) @@ -325,7 +347,8 @@ bool get_AsynchronousMachine_reversible(const BaseClass* BaseClass_ptr1, std::st bool get_AsynchronousMachine_rxLockedRotorRatio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rxLockedRotorRatio; if (!buffer.str().empty()) @@ -337,22 +360,6 @@ bool get_AsynchronousMachine_rxLockedRotorRatio(const BaseClass* BaseClass_ptr1, return false; } - - -bool get_AsynchronousMachine_asynchronousMachineType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->asynchronousMachineType; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char AsynchronousMachine::debugName[] = "AsynchronousMachine"; const char* AsynchronousMachine::debugString() const { @@ -361,26 +368,26 @@ const char* AsynchronousMachine::debugString() const void AsynchronousMachine::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AsynchronousMachine"), &AsynchronousMachine_factory)); + factory_map.emplace("cim:AsynchronousMachine", &AsynchronousMachine_factory); } void AsynchronousMachine::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.asynchronousMachineType"), &assign_AsynchronousMachine_asynchronousMachineType)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.converterFedDrive"), &assign_AsynchronousMachine_converterFedDrive)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.efficiency"), &assign_AsynchronousMachine_efficiency)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.iaIrRatio"), &assign_AsynchronousMachine_iaIrRatio)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.nominalFrequency"), &assign_AsynchronousMachine_nominalFrequency)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.nominalSpeed"), &assign_AsynchronousMachine_nominalSpeed)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.polePairNumber"), &assign_AsynchronousMachine_polePairNumber)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.ratedMechanicalPower"), &assign_AsynchronousMachine_ratedMechanicalPower)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.reversible"), &assign_AsynchronousMachine_reversible)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.rxLockedRotorRatio"), &assign_AsynchronousMachine_rxLockedRotorRatio)); + assign_map.emplace("cim:AsynchronousMachine.asynchronousMachineType", &assign_AsynchronousMachine_asynchronousMachineType); + assign_map.emplace("cim:AsynchronousMachine.converterFedDrive", &assign_AsynchronousMachine_converterFedDrive); + assign_map.emplace("cim:AsynchronousMachine.efficiency", &assign_AsynchronousMachine_efficiency); + assign_map.emplace("cim:AsynchronousMachine.iaIrRatio", &assign_AsynchronousMachine_iaIrRatio); + assign_map.emplace("cim:AsynchronousMachine.nominalFrequency", &assign_AsynchronousMachine_nominalFrequency); + assign_map.emplace("cim:AsynchronousMachine.nominalSpeed", &assign_AsynchronousMachine_nominalSpeed); + assign_map.emplace("cim:AsynchronousMachine.polePairNumber", &assign_AsynchronousMachine_polePairNumber); + assign_map.emplace("cim:AsynchronousMachine.ratedMechanicalPower", &assign_AsynchronousMachine_ratedMechanicalPower); + assign_map.emplace("cim:AsynchronousMachine.reversible", &assign_AsynchronousMachine_reversible); + assign_map.emplace("cim:AsynchronousMachine.rxLockedRotorRatio", &assign_AsynchronousMachine_rxLockedRotorRatio); } void AsynchronousMachine::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.AsynchronousMachineDynamics"), &assign_AsynchronousMachine_AsynchronousMachineDynamics)); + assign_map.emplace("cim:AsynchronousMachine.AsynchronousMachineDynamics", &assign_AsynchronousMachine_AsynchronousMachineDynamics); } void AsynchronousMachine::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/AsynchronousMachine.hpp b/CGMES_2.4.13_18DEC2013/AsynchronousMachine.hpp index 099479f8b..9808c783d 100644 --- a/CGMES_2.4.13_18DEC2013/AsynchronousMachine.hpp +++ b/CGMES_2.4.13_18DEC2013/AsynchronousMachine.hpp @@ -25,9 +25,7 @@ namespace CIMPP { class AsynchronousMachineDynamics; - /* - A rotating machine whose shaft rotates asynchronously with the electrical field. Also known as an induction machine with no external connection to the rotor windings, e.g squirrel-cage induction machine. - */ + /** \brief A rotating machine whose shaft rotates asynchronously with the electrical field. Also known as an induction machine with no external connection to the rotor windings, e.g squirrel-cage induction machine. */ class AsynchronousMachine : public RotatingMachine { public: @@ -35,17 +33,38 @@ namespace CIMPP AsynchronousMachine(); ~AsynchronousMachine() override; - CIMPP::AsynchronousMachineDynamics* AsynchronousMachineDynamics; /* Asynchronous machine dynamics model used to describe dynamic behavior of this asynchronous machine. Default: 0 */ - CIMPP::AsynchronousMachineKind asynchronousMachineType; /* Indicates the type of Asynchronous Machine (motor or generator). Default: 0 */ - CIMPP::Boolean converterFedDrive; /* Indicates whether the machine is a converter fed drive. Used for short circuit data exchange according to IEC 60909 Default: false */ - CIMPP::PerCent efficiency; /* Efficiency of the asynchronous machine at nominal operation in percent. Indicator for converter drive motors. Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::Simple_Float iaIrRatio; /* Ratio of locked-rotor current to the rated current of the motor (Ia/Ir). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::Frequency nominalFrequency; /* Nameplate data indicates if the machine is 50 or 60 Hz. Default: nullptr */ - CIMPP::RotationSpeed nominalSpeed; /* Nameplate data. Depends on the slip and number of pole pairs. Default: nullptr */ - CIMPP::Integer polePairNumber; /* Number of pole pairs of stator. Used for short circuit data exchange according to IEC 60909 Default: 0 */ - CIMPP::ActivePower ratedMechanicalPower; /* Rated mechanical power (Pr in the IEC 60909-0). Used for short circuit data exchange according to IEC 60909. Default: nullptr */ - CIMPP::Boolean reversible; /* Indicates for converter drive motors if the power can be reversible. Used for short circuit data exchange according to IEC 60909 Default: false */ - CIMPP::Simple_Float rxLockedRotorRatio; /* Locked rotor ratio (R/X). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + /** \brief Asynchronous machine dynamics model used to describe dynamic behavior of this asynchronous machine. Default: 0 */ + CIMPP::AsynchronousMachineDynamics* AsynchronousMachineDynamics; + + /** \brief Indicates the type of Asynchronous Machine (motor or generator). Default: 0 */ + CIMPP::AsynchronousMachineKind asynchronousMachineType; + + /** \brief Indicates whether the machine is a converter fed drive. Used for short circuit data exchange according to IEC 60909 Default: false */ + CIMPP::Boolean converterFedDrive; + + /** \brief Efficiency of the asynchronous machine at nominal operation in percent. Indicator for converter drive motors. Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::PerCent efficiency; + + /** \brief Ratio of locked-rotor current to the rated current of the motor (Ia/Ir). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::Simple_Float iaIrRatio; + + /** \brief Nameplate data indicates if the machine is 50 or 60 Hz. Default: nullptr */ + CIMPP::Frequency nominalFrequency; + + /** \brief Nameplate data. Depends on the slip and number of pole pairs. Default: nullptr */ + CIMPP::RotationSpeed nominalSpeed; + + /** \brief Number of pole pairs of stator. Used for short circuit data exchange according to IEC 60909 Default: 0 */ + CIMPP::Integer polePairNumber; + + /** \brief Rated mechanical power (Pr in the IEC 60909-0). Used for short circuit data exchange according to IEC 60909. Default: nullptr */ + CIMPP::ActivePower ratedMechanicalPower; + + /** \brief Indicates for converter drive motors if the power can be reversible. Used for short circuit data exchange according to IEC 60909 Default: false */ + CIMPP::Boolean reversible; + + /** \brief Locked rotor ratio (R/X). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::Simple_Float rxLockedRotorRatio; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/AsynchronousMachineDynamics.cpp b/CGMES_2.4.13_18DEC2013/AsynchronousMachineDynamics.cpp index bfe9a4fb3..a7e89471f 100644 --- a/CGMES_2.4.13_18DEC2013/AsynchronousMachineDynamics.cpp +++ b/CGMES_2.4.13_18DEC2013/AsynchronousMachineDynamics.cpp @@ -15,8 +15,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -AsynchronousMachineDynamics::AsynchronousMachineDynamics() : AsynchronousMachine(nullptr), MechanicalLoadDynamics(nullptr), TurbineGovernorDynamics(nullptr), WindTurbineType1or2Dynamics(nullptr) {}; -AsynchronousMachineDynamics::~AsynchronousMachineDynamics() {}; +AsynchronousMachineDynamics::AsynchronousMachineDynamics() : AsynchronousMachine(nullptr), MechanicalLoadDynamics(nullptr), TurbineGovernorDynamics(nullptr), WindTurbineType1or2Dynamics(nullptr) {} +AsynchronousMachineDynamics::~AsynchronousMachineDynamics() {} static const std::list PossibleProfilesForClass = { @@ -46,8 +46,6 @@ AsynchronousMachineDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_AsynchronousMachine_AsynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_AsynchronousMachineDynamics_AsynchronousMachine(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -64,6 +62,7 @@ bool assign_AsynchronousMachineDynamics_AsynchronousMachine(BaseClass* BaseClass } return false; } + bool assign_MechanicalLoadDynamics_AsynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_AsynchronousMachineDynamics_MechanicalLoadDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -80,6 +79,7 @@ bool assign_AsynchronousMachineDynamics_MechanicalLoadDynamics(BaseClass* BaseCl } return false; } + bool assign_TurbineGovernorDynamics_AsynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_AsynchronousMachineDynamics_TurbineGovernorDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -96,6 +96,7 @@ bool assign_AsynchronousMachineDynamics_TurbineGovernorDynamics(BaseClass* BaseC } return false; } + bool assign_WindTurbineType1or2Dynamics_AsynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_AsynchronousMachineDynamics_WindTurbineType1or2Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -113,10 +114,10 @@ bool assign_AsynchronousMachineDynamics_WindTurbineType1or2Dynamics(BaseClass* B return false; } - bool get_AsynchronousMachineDynamics_AsynchronousMachine(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AsynchronousMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->AsynchronousMachine != 0) { @@ -128,6 +129,8 @@ bool get_AsynchronousMachineDynamics_AsynchronousMachine(const BaseClass* BaseCl } + + const char AsynchronousMachineDynamics::debugName[] = "AsynchronousMachineDynamics"; const char* AsynchronousMachineDynamics::debugString() const { @@ -136,7 +139,7 @@ const char* AsynchronousMachineDynamics::debugString() const void AsynchronousMachineDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AsynchronousMachineDynamics"), &AsynchronousMachineDynamics_factory)); + factory_map.emplace("cim:AsynchronousMachineDynamics", &AsynchronousMachineDynamics_factory); } void AsynchronousMachineDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -145,10 +148,10 @@ void AsynchronousMachineDynamics::addPrimitiveAssignFnsToMap(std::unordered_map< void AsynchronousMachineDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineDynamics.AsynchronousMachine"), &assign_AsynchronousMachineDynamics_AsynchronousMachine)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineDynamics.MechanicalLoadDynamics"), &assign_AsynchronousMachineDynamics_MechanicalLoadDynamics)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineDynamics.TurbineGovernorDynamics"), &assign_AsynchronousMachineDynamics_TurbineGovernorDynamics)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineDynamics.WindTurbineType1or2Dynamics"), &assign_AsynchronousMachineDynamics_WindTurbineType1or2Dynamics)); + assign_map.emplace("cim:AsynchronousMachineDynamics.AsynchronousMachine", &assign_AsynchronousMachineDynamics_AsynchronousMachine); + assign_map.emplace("cim:AsynchronousMachineDynamics.MechanicalLoadDynamics", &assign_AsynchronousMachineDynamics_MechanicalLoadDynamics); + assign_map.emplace("cim:AsynchronousMachineDynamics.TurbineGovernorDynamics", &assign_AsynchronousMachineDynamics_TurbineGovernorDynamics); + assign_map.emplace("cim:AsynchronousMachineDynamics.WindTurbineType1or2Dynamics", &assign_AsynchronousMachineDynamics_WindTurbineType1or2Dynamics); } void AsynchronousMachineDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/AsynchronousMachineDynamics.hpp b/CGMES_2.4.13_18DEC2013/AsynchronousMachineDynamics.hpp index c800b8543..bc0e2a13d 100644 --- a/CGMES_2.4.13_18DEC2013/AsynchronousMachineDynamics.hpp +++ b/CGMES_2.4.13_18DEC2013/AsynchronousMachineDynamics.hpp @@ -20,9 +20,7 @@ namespace CIMPP class TurbineGovernorDynamics; class WindTurbineType1or2Dynamics; - /* - Asynchronous machine whose behaviour is described by reference to a standard model expressed in either time constant reactance form or equivalent circuit form - */ + /** \brief Asynchronous machine whose behaviour is described by reference to a standard model expressed in either time constant reactance form or equivalent circuit form */ class AsynchronousMachineDynamics : public RotatingMachineDynamics { public: @@ -30,10 +28,17 @@ namespace CIMPP AsynchronousMachineDynamics(); ~AsynchronousMachineDynamics() override; - CIMPP::AsynchronousMachine* AsynchronousMachine; /* Asynchronous machine to which this asynchronous machine dynamics model applies. Default: 0 */ - CIMPP::MechanicalLoadDynamics* MechanicalLoadDynamics; /* Mechanical load model associated with this asynchronous machine model. Default: 0 */ - CIMPP::TurbineGovernorDynamics* TurbineGovernorDynamics; /* Turbine-governor model associated with this asynchronous machine model. Default: 0 */ - CIMPP::WindTurbineType1or2Dynamics* WindTurbineType1or2Dynamics; /* Wind generator type 1 or 2 model associated with this asynchronous machine model. Default: 0 */ + /** \brief Asynchronous machine to which this asynchronous machine dynamics model applies. Default: 0 */ + CIMPP::AsynchronousMachine* AsynchronousMachine; + + /** \brief Mechanical load model associated with this asynchronous machine model. Default: 0 */ + CIMPP::MechanicalLoadDynamics* MechanicalLoadDynamics; + + /** \brief Turbine-governor model associated with this asynchronous machine model. Default: 0 */ + CIMPP::TurbineGovernorDynamics* TurbineGovernorDynamics; + + /** \brief Wind generator type 1 or 2 model associated with this asynchronous machine model. Default: 0 */ + CIMPP::WindTurbineType1or2Dynamics* WindTurbineType1or2Dynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/AsynchronousMachineEquivalentCircuit.cpp b/CGMES_2.4.13_18DEC2013/AsynchronousMachineEquivalentCircuit.cpp index 8aed225a4..5ed52c82d 100644 --- a/CGMES_2.4.13_18DEC2013/AsynchronousMachineEquivalentCircuit.cpp +++ b/CGMES_2.4.13_18DEC2013/AsynchronousMachineEquivalentCircuit.cpp @@ -8,16 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -AsynchronousMachineEquivalentCircuit::AsynchronousMachineEquivalentCircuit() {}; -AsynchronousMachineEquivalentCircuit::~AsynchronousMachineEquivalentCircuit() {}; +AsynchronousMachineEquivalentCircuit::AsynchronousMachineEquivalentCircuit() {} +AsynchronousMachineEquivalentCircuit::~AsynchronousMachineEquivalentCircuit() {} static const std::list PossibleProfilesForClass = { @@ -48,77 +43,80 @@ AsynchronousMachineEquivalentCircuit::getPossibleProfilesForAttributes() const return map; } - -bool assign_AsynchronousMachineEquivalentCircuit_rr1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineEquivalentCircuit_rr1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rr1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachineEquivalentCircuit_rr2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineEquivalentCircuit_rr2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rr2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachineEquivalentCircuit_xlr1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineEquivalentCircuit_xlr1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xlr1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachineEquivalentCircuit_xlr2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineEquivalentCircuit_xlr2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xlr2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachineEquivalentCircuit_xm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineEquivalentCircuit_xm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_AsynchronousMachineEquivalentCircuit_rr1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rr1; if (!buffer.str().empty()) @@ -132,7 +130,8 @@ bool get_AsynchronousMachineEquivalentCircuit_rr1(const BaseClass* BaseClass_ptr bool get_AsynchronousMachineEquivalentCircuit_rr2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rr2; if (!buffer.str().empty()) @@ -146,7 +145,8 @@ bool get_AsynchronousMachineEquivalentCircuit_rr2(const BaseClass* BaseClass_ptr bool get_AsynchronousMachineEquivalentCircuit_xlr1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xlr1; if (!buffer.str().empty()) @@ -160,7 +160,8 @@ bool get_AsynchronousMachineEquivalentCircuit_xlr1(const BaseClass* BaseClass_pt bool get_AsynchronousMachineEquivalentCircuit_xlr2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xlr2; if (!buffer.str().empty()) @@ -174,7 +175,8 @@ bool get_AsynchronousMachineEquivalentCircuit_xlr2(const BaseClass* BaseClass_pt bool get_AsynchronousMachineEquivalentCircuit_xm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xm; if (!buffer.str().empty()) @@ -186,8 +188,6 @@ bool get_AsynchronousMachineEquivalentCircuit_xm(const BaseClass* BaseClass_ptr1 return false; } - - const char AsynchronousMachineEquivalentCircuit::debugName[] = "AsynchronousMachineEquivalentCircuit"; const char* AsynchronousMachineEquivalentCircuit::debugString() const { @@ -196,16 +196,16 @@ const char* AsynchronousMachineEquivalentCircuit::debugString() const void AsynchronousMachineEquivalentCircuit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AsynchronousMachineEquivalentCircuit"), &AsynchronousMachineEquivalentCircuit_factory)); + factory_map.emplace("cim:AsynchronousMachineEquivalentCircuit", &AsynchronousMachineEquivalentCircuit_factory); } void AsynchronousMachineEquivalentCircuit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineEquivalentCircuit.rr1"), &assign_AsynchronousMachineEquivalentCircuit_rr1)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineEquivalentCircuit.rr2"), &assign_AsynchronousMachineEquivalentCircuit_rr2)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineEquivalentCircuit.xlr1"), &assign_AsynchronousMachineEquivalentCircuit_xlr1)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineEquivalentCircuit.xlr2"), &assign_AsynchronousMachineEquivalentCircuit_xlr2)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineEquivalentCircuit.xm"), &assign_AsynchronousMachineEquivalentCircuit_xm)); + assign_map.emplace("cim:AsynchronousMachineEquivalentCircuit.rr1", &assign_AsynchronousMachineEquivalentCircuit_rr1); + assign_map.emplace("cim:AsynchronousMachineEquivalentCircuit.rr2", &assign_AsynchronousMachineEquivalentCircuit_rr2); + assign_map.emplace("cim:AsynchronousMachineEquivalentCircuit.xlr1", &assign_AsynchronousMachineEquivalentCircuit_xlr1); + assign_map.emplace("cim:AsynchronousMachineEquivalentCircuit.xlr2", &assign_AsynchronousMachineEquivalentCircuit_xlr2); + assign_map.emplace("cim:AsynchronousMachineEquivalentCircuit.xm", &assign_AsynchronousMachineEquivalentCircuit_xm); } void AsynchronousMachineEquivalentCircuit::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/AsynchronousMachineEquivalentCircuit.hpp b/CGMES_2.4.13_18DEC2013/AsynchronousMachineEquivalentCircuit.hpp index 9e711c649..0280d8e3e 100644 --- a/CGMES_2.4.13_18DEC2013/AsynchronousMachineEquivalentCircuit.hpp +++ b/CGMES_2.4.13_18DEC2013/AsynchronousMachineEquivalentCircuit.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The electrical equations of all variations of the asynchronous model are based on the AsynchronousEquivalentCircuit diagram for the direct and quadrature axes, with two equivalent rotor windings in each axis. = + = + * / ( + ) = + * * / ( * + * + * ) = ( + ) / ( * ) = ( * + * + * ) / ( * * (+ ) Same equations using CIM attributes from AsynchronousMachineTimeConstantReactance class on left of = sign and AsynchronousMachineEquivalentCircuit class on right (except as noted): xs = xm + RotatingMachineDynamics.statorLeakageReactance xp = RotatingMachineDynamics.statorLeakageReactance + xm * xlr1 / (xm + xlr1) xpp = RotatingMachineDynamics.statorLeakageReactance + xm * xlr1* xlr2 / (xm * xlr1 + xm * xlr2 + xlr1 * xlr2) tpo = (xm + xlr1) / (2*pi*nominal frequency * rr1) tppo = (xm * xlr1 + xm * xlr2 + xlr1 * xlr2) / (2*pi*nominal frequency * rr2 * (xm + xlr1). - */ + /** \brief The electrical equations of all variations of the asynchronous model are based on the AsynchronousEquivalentCircuit diagram for the direct and quadrature axes, with two equivalent rotor windings in each axis. = + = + * / ( + ) = + * * / ( * + * + * ) = ( + ) / ( * ) = ( * + * + * ) / ( * * (+ ) Same equations using CIM attributes from AsynchronousMachineTimeConstantReactance class on left of = sign and AsynchronousMachineEquivalentCircuit class on right (except as noted): xs = xm + RotatingMachineDynamics.statorLeakageReactance xp = RotatingMachineDynamics.statorLeakageReactance + xm * xlr1 / (xm + xlr1) xpp = RotatingMachineDynamics.statorLeakageReactance + xm * xlr1* xlr2 / (xm * xlr1 + xm * xlr2 + xlr1 * xlr2) tpo = (xm + xlr1) / (2*pi*nominal frequency * rr1) tppo = (xm * xlr1 + xm * xlr2 + xlr1 * xlr2) / (2*pi*nominal frequency * rr2 * (xm + xlr1). */ class AsynchronousMachineEquivalentCircuit : public AsynchronousMachineDynamics { public: @@ -27,11 +25,20 @@ namespace CIMPP AsynchronousMachineEquivalentCircuit(); ~AsynchronousMachineEquivalentCircuit() override; - CIMPP::PU rr1; /* Damper 1 winding resistance. Default: nullptr */ - CIMPP::PU rr2; /* Damper 2 winding resistance. Default: nullptr */ - CIMPP::PU xlr1; /* Damper 1 winding leakage reactance. Default: nullptr */ - CIMPP::PU xlr2; /* Damper 2 winding leakage reactance. Default: nullptr */ - CIMPP::PU xm; /* Magnetizing reactance. Default: nullptr */ + /** \brief Damper 1 winding resistance. Default: nullptr */ + CIMPP::PU rr1; + + /** \brief Damper 2 winding resistance. Default: nullptr */ + CIMPP::PU rr2; + + /** \brief Damper 1 winding leakage reactance. Default: nullptr */ + CIMPP::PU xlr1; + + /** \brief Damper 2 winding leakage reactance. Default: nullptr */ + CIMPP::PU xlr2; + + /** \brief Magnetizing reactance. Default: nullptr */ + CIMPP::PU xm; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/AsynchronousMachineKind.cpp b/CGMES_2.4.13_18DEC2013/AsynchronousMachineKind.cpp index d9b39ecb0..795ae96ee 100644 --- a/CGMES_2.4.13_18DEC2013/AsynchronousMachineKind.cpp +++ b/CGMES_2.4.13_18DEC2013/AsynchronousMachineKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "AsynchronousMachineKind") + if (EnumSymbol.substr(0, pos) != "AsynchronousMachineKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,12 +50,12 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "generator") + if (EnumSymbol == "generator") { rop = AsynchronousMachineKind::generator; return lop; } - if(EnumSymbol == "motor") + if (EnumSymbol == "motor") { rop = AsynchronousMachineKind::motor; return lop; diff --git a/CGMES_2.4.13_18DEC2013/AsynchronousMachineKind.hpp b/CGMES_2.4.13_18DEC2013/AsynchronousMachineKind.hpp index 8b8e54e57..f82a69df1 100644 --- a/CGMES_2.4.13_18DEC2013/AsynchronousMachineKind.hpp +++ b/CGMES_2.4.13_18DEC2013/AsynchronousMachineKind.hpp @@ -9,21 +9,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Kind of Asynchronous Machine. - */ + /** \brief Kind of Asynchronous Machine. */ class AsynchronousMachineKind { public: enum AsynchronousMachineKind_ENUM { - /** - * The Asynchronous Machine is a generator. - */ + /** The Asynchronous Machine is a generator. */ generator, - /** - * The Asynchronous Machine is a motor. - */ + /** The Asynchronous Machine is a motor. */ motor, }; diff --git a/CGMES_2.4.13_18DEC2013/AsynchronousMachineTimeConstantReactance.cpp b/CGMES_2.4.13_18DEC2013/AsynchronousMachineTimeConstantReactance.cpp index dd33a441b..4f8d1492d 100644 --- a/CGMES_2.4.13_18DEC2013/AsynchronousMachineTimeConstantReactance.cpp +++ b/CGMES_2.4.13_18DEC2013/AsynchronousMachineTimeConstantReactance.cpp @@ -8,16 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -AsynchronousMachineTimeConstantReactance::AsynchronousMachineTimeConstantReactance() {}; -AsynchronousMachineTimeConstantReactance::~AsynchronousMachineTimeConstantReactance() {}; +AsynchronousMachineTimeConstantReactance::AsynchronousMachineTimeConstantReactance() {} +AsynchronousMachineTimeConstantReactance::~AsynchronousMachineTimeConstantReactance() {} static const std::list PossibleProfilesForClass = { @@ -48,77 +43,80 @@ AsynchronousMachineTimeConstantReactance::getPossibleProfilesForAttributes() con return map; } - -bool assign_AsynchronousMachineTimeConstantReactance_tpo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineTimeConstantReactance_tpo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachineTimeConstantReactance_tppo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineTimeConstantReactance_tppo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tppo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachineTimeConstantReactance_xp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineTimeConstantReactance_xp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachineTimeConstantReactance_xpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineTimeConstantReactance_xpp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xpp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachineTimeConstantReactance_xs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineTimeConstantReactance_xs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_AsynchronousMachineTimeConstantReactance_tpo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpo; if (!buffer.str().empty()) @@ -132,7 +130,8 @@ bool get_AsynchronousMachineTimeConstantReactance_tpo(const BaseClass* BaseClass bool get_AsynchronousMachineTimeConstantReactance_tppo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tppo; if (!buffer.str().empty()) @@ -146,7 +145,8 @@ bool get_AsynchronousMachineTimeConstantReactance_tppo(const BaseClass* BaseClas bool get_AsynchronousMachineTimeConstantReactance_xp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xp; if (!buffer.str().empty()) @@ -160,7 +160,8 @@ bool get_AsynchronousMachineTimeConstantReactance_xp(const BaseClass* BaseClass_ bool get_AsynchronousMachineTimeConstantReactance_xpp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xpp; if (!buffer.str().empty()) @@ -174,7 +175,8 @@ bool get_AsynchronousMachineTimeConstantReactance_xpp(const BaseClass* BaseClass bool get_AsynchronousMachineTimeConstantReactance_xs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xs; if (!buffer.str().empty()) @@ -186,8 +188,6 @@ bool get_AsynchronousMachineTimeConstantReactance_xs(const BaseClass* BaseClass_ return false; } - - const char AsynchronousMachineTimeConstantReactance::debugName[] = "AsynchronousMachineTimeConstantReactance"; const char* AsynchronousMachineTimeConstantReactance::debugString() const { @@ -196,16 +196,16 @@ const char* AsynchronousMachineTimeConstantReactance::debugString() const void AsynchronousMachineTimeConstantReactance::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AsynchronousMachineTimeConstantReactance"), &AsynchronousMachineTimeConstantReactance_factory)); + factory_map.emplace("cim:AsynchronousMachineTimeConstantReactance", &AsynchronousMachineTimeConstantReactance_factory); } void AsynchronousMachineTimeConstantReactance::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineTimeConstantReactance.tpo"), &assign_AsynchronousMachineTimeConstantReactance_tpo)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineTimeConstantReactance.tppo"), &assign_AsynchronousMachineTimeConstantReactance_tppo)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineTimeConstantReactance.xp"), &assign_AsynchronousMachineTimeConstantReactance_xp)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineTimeConstantReactance.xpp"), &assign_AsynchronousMachineTimeConstantReactance_xpp)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineTimeConstantReactance.xs"), &assign_AsynchronousMachineTimeConstantReactance_xs)); + assign_map.emplace("cim:AsynchronousMachineTimeConstantReactance.tpo", &assign_AsynchronousMachineTimeConstantReactance_tpo); + assign_map.emplace("cim:AsynchronousMachineTimeConstantReactance.tppo", &assign_AsynchronousMachineTimeConstantReactance_tppo); + assign_map.emplace("cim:AsynchronousMachineTimeConstantReactance.xp", &assign_AsynchronousMachineTimeConstantReactance_xp); + assign_map.emplace("cim:AsynchronousMachineTimeConstantReactance.xpp", &assign_AsynchronousMachineTimeConstantReactance_xpp); + assign_map.emplace("cim:AsynchronousMachineTimeConstantReactance.xs", &assign_AsynchronousMachineTimeConstantReactance_xs); } void AsynchronousMachineTimeConstantReactance::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/AsynchronousMachineTimeConstantReactance.hpp b/CGMES_2.4.13_18DEC2013/AsynchronousMachineTimeConstantReactance.hpp index bdce8fd68..8c5a0b3f6 100644 --- a/CGMES_2.4.13_18DEC2013/AsynchronousMachineTimeConstantReactance.hpp +++ b/CGMES_2.4.13_18DEC2013/AsynchronousMachineTimeConstantReactance.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The parameters used for models expressed in time constant reactance form include: - */ + /** \brief The parameters used for models expressed in time constant reactance form include: */ class AsynchronousMachineTimeConstantReactance : public AsynchronousMachineDynamics { public: @@ -28,11 +26,20 @@ namespace CIMPP AsynchronousMachineTimeConstantReactance(); ~AsynchronousMachineTimeConstantReactance() override; - CIMPP::Seconds tpo; /* Transient rotor time constant (T`o) (> T``o). Typical Value = 5. Default: nullptr */ - CIMPP::Seconds tppo; /* Subtransient rotor time constant (T``o) (> 0). Typical Value = 0.03. Default: nullptr */ - CIMPP::PU xp; /* Transient reactance (unsaturated) (X`) (>=X``). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU xpp; /* Subtransient reactance (unsaturated) (X``) (> Xl). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU xs; /* Synchronous reactance (Xs) (>= X`). Typical Value = 1.8. Default: nullptr */ + /** \brief Transient rotor time constant (T`o) (> T``o). Typical Value = 5. Default: nullptr */ + CIMPP::Seconds tpo; + + /** \brief Subtransient rotor time constant (T``o) (> 0). Typical Value = 0.03. Default: nullptr */ + CIMPP::Seconds tppo; + + /** \brief Transient reactance (unsaturated) (X`) (>=X``). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU xp; + + /** \brief Subtransient reactance (unsaturated) (X``) (> Xl). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU xpp; + + /** \brief Synchronous reactance (Xs) (>= X`). Typical Value = 1.8. Default: nullptr */ + CIMPP::PU xs; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/AsynchronousMachineUserDefined.cpp b/CGMES_2.4.13_18DEC2013/AsynchronousMachineUserDefined.cpp index dd1fad853..df2454abf 100644 --- a/CGMES_2.4.13_18DEC2013/AsynchronousMachineUserDefined.cpp +++ b/CGMES_2.4.13_18DEC2013/AsynchronousMachineUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -AsynchronousMachineUserDefined::AsynchronousMachineUserDefined() {}; -AsynchronousMachineUserDefined::~AsynchronousMachineUserDefined() {}; +AsynchronousMachineUserDefined::AsynchronousMachineUserDefined() {} +AsynchronousMachineUserDefined::~AsynchronousMachineUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ AsynchronousMachineUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_AsynchronousMachineUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (AsynchronousMachineUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_AsynchronousMachineUserDefined(BaseClass*, BaseClass*); bool assign_AsynchronousMachineUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_AsynchronousMachineUserDefined_ProprietaryParameterDynamics(BaseClas return false; } +bool assign_AsynchronousMachineUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + AsynchronousMachineUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_AsynchronousMachineUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_AsynchronousMachineUserDefined_proprietary(const BaseClass* BaseClass_p return false; } - - const char AsynchronousMachineUserDefined::debugName[] = "AsynchronousMachineUserDefined"; const char* AsynchronousMachineUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* AsynchronousMachineUserDefined::debugString() const void AsynchronousMachineUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AsynchronousMachineUserDefined"), &AsynchronousMachineUserDefined_factory)); + factory_map.emplace("cim:AsynchronousMachineUserDefined", &AsynchronousMachineUserDefined_factory); } void AsynchronousMachineUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineUserDefined.proprietary"), &assign_AsynchronousMachineUserDefined_proprietary)); + assign_map.emplace("cim:AsynchronousMachineUserDefined.proprietary", &assign_AsynchronousMachineUserDefined_proprietary); } void AsynchronousMachineUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineUserDefined.ProprietaryParameterDynamics"), &assign_AsynchronousMachineUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:AsynchronousMachineUserDefined.ProprietaryParameterDynamics", &assign_AsynchronousMachineUserDefined_ProprietaryParameterDynamics); } void AsynchronousMachineUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/AsynchronousMachineUserDefined.hpp b/CGMES_2.4.13_18DEC2013/AsynchronousMachineUserDefined.hpp index 5aa08aed8..76f2416f2 100644 --- a/CGMES_2.4.13_18DEC2013/AsynchronousMachineUserDefined.hpp +++ b/CGMES_2.4.13_18DEC2013/AsynchronousMachineUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Asynchronous machine whose dynamic behaviour is described by a user-defined model. - */ + /** \brief Asynchronous machine whose dynamic behaviour is described by a user-defined model. */ class AsynchronousMachineUserDefined : public AsynchronousMachineDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP AsynchronousMachineUserDefined(); ~AsynchronousMachineUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/BaseVoltage.cpp b/CGMES_2.4.13_18DEC2013/BaseVoltage.cpp index 23fb97916..b4ba1e5da 100644 --- a/CGMES_2.4.13_18DEC2013/BaseVoltage.cpp +++ b/CGMES_2.4.13_18DEC2013/BaseVoltage.cpp @@ -12,12 +12,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "TopologicalNode.hpp" #include "TransformerEnd.hpp" #include "VoltageLevel.hpp" -#include "Voltage.hpp" using namespace CIMPP; -BaseVoltage::BaseVoltage() {}; -BaseVoltage::~BaseVoltage() {}; +BaseVoltage::BaseVoltage() {} +BaseVoltage::~BaseVoltage() {} static const std::list PossibleProfilesForClass = { @@ -51,21 +50,6 @@ BaseVoltage::getPossibleProfilesForAttributes() const return map; } - -bool assign_BaseVoltage_nominalVoltage(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (BaseVoltage* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->nominalVoltage; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ConductingEquipment_BaseVoltage(BaseClass*, BaseClass*); bool assign_BaseVoltage_ConductingEquipment(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -82,6 +66,7 @@ bool assign_BaseVoltage_ConductingEquipment(BaseClass* BaseClass_ptr1, BaseClass } return false; } + bool assign_TopologicalNode_BaseVoltage(BaseClass*, BaseClass*); bool assign_BaseVoltage_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -98,6 +83,7 @@ bool assign_BaseVoltage_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* Ba } return false; } + bool assign_TransformerEnd_BaseVoltage(BaseClass*, BaseClass*); bool assign_BaseVoltage_TransformerEnds(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -114,6 +100,7 @@ bool assign_BaseVoltage_TransformerEnds(BaseClass* BaseClass_ptr1, BaseClass* Ba } return false; } + bool assign_VoltageLevel_BaseVoltage(BaseClass*, BaseClass*); bool assign_BaseVoltage_VoltageLevel(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -131,9 +118,28 @@ bool assign_BaseVoltage_VoltageLevel(BaseClass* BaseClass_ptr1, BaseClass* BaseC return false; } +bool assign_BaseVoltage_nominalVoltage(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + BaseVoltage* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->nominalVoltage; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + + + + bool get_BaseVoltage_nominalVoltage(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const BaseVoltage* element = dynamic_cast(BaseClass_ptr1)) + const BaseVoltage* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nominalVoltage; if (!buffer.str().empty()) @@ -145,8 +151,6 @@ bool get_BaseVoltage_nominalVoltage(const BaseClass* BaseClass_ptr1, std::string return false; } - - const char BaseVoltage::debugName[] = "BaseVoltage"; const char* BaseVoltage::debugString() const { @@ -155,20 +159,20 @@ const char* BaseVoltage::debugString() const void BaseVoltage::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:BaseVoltage"), &BaseVoltage_factory)); + factory_map.emplace("cim:BaseVoltage", &BaseVoltage_factory); } void BaseVoltage::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:BaseVoltage.nominalVoltage"), &assign_BaseVoltage_nominalVoltage)); + assign_map.emplace("cim:BaseVoltage.nominalVoltage", &assign_BaseVoltage_nominalVoltage); } void BaseVoltage::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:BaseVoltage.ConductingEquipment"), &assign_BaseVoltage_ConductingEquipment)); - assign_map.insert(std::make_pair(std::string("cim:BaseVoltage.TopologicalNode"), &assign_BaseVoltage_TopologicalNode)); - assign_map.insert(std::make_pair(std::string("cim:BaseVoltage.TransformerEnds"), &assign_BaseVoltage_TransformerEnds)); - assign_map.insert(std::make_pair(std::string("cim:BaseVoltage.VoltageLevel"), &assign_BaseVoltage_VoltageLevel)); + assign_map.emplace("cim:BaseVoltage.ConductingEquipment", &assign_BaseVoltage_ConductingEquipment); + assign_map.emplace("cim:BaseVoltage.TopologicalNode", &assign_BaseVoltage_TopologicalNode); + assign_map.emplace("cim:BaseVoltage.TransformerEnds", &assign_BaseVoltage_TransformerEnds); + assign_map.emplace("cim:BaseVoltage.VoltageLevel", &assign_BaseVoltage_VoltageLevel); } void BaseVoltage::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/BaseVoltage.hpp b/CGMES_2.4.13_18DEC2013/BaseVoltage.hpp index 1faae4d7a..5e04e5f8a 100644 --- a/CGMES_2.4.13_18DEC2013/BaseVoltage.hpp +++ b/CGMES_2.4.13_18DEC2013/BaseVoltage.hpp @@ -21,9 +21,7 @@ namespace CIMPP class TransformerEnd; class VoltageLevel; - /* - Defines a system base voltage which is referenced. - */ + /** \brief Defines a system base voltage which is referenced. */ class BaseVoltage : public IdentifiedObject { public: @@ -31,11 +29,20 @@ namespace CIMPP BaseVoltage(); ~BaseVoltage() override; - std::list ConductingEquipment; /* Base voltage of this conducting equipment. Use only when there is no voltage level container used and only one base voltage applies. For example, not used for transformers. Default: 0 */ - std::list TopologicalNode; /* The topological nodes at the base voltage. Default: 0 */ - std::list TransformerEnds; /* Transformer ends at the base voltage. This is essential for PU calculation. Default: 0 */ - std::list VoltageLevel; /* The voltage levels having this base voltage. Default: 0 */ - CIMPP::Voltage nominalVoltage; /* The power system resource`s base voltage. Default: nullptr */ + /** \brief Base voltage of this conducting equipment. Use only when there is no voltage level container used and only one base voltage applies. For example, not used for transformers. Default: 0 */ + std::list ConductingEquipment; + + /** \brief The topological nodes at the base voltage. Default: 0 */ + std::list TopologicalNode; + + /** \brief Transformer ends at the base voltage. This is essential for PU calculation. Default: 0 */ + std::list TransformerEnds; + + /** \brief The voltage levels having this base voltage. Default: 0 */ + std::list VoltageLevel; + + /** \brief The power system resource`s base voltage. Default: nullptr */ + CIMPP::Voltage nominalVoltage; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/BasicIntervalSchedule.cpp b/CGMES_2.4.13_18DEC2013/BasicIntervalSchedule.cpp index 876fcee65..2daa4c674 100644 --- a/CGMES_2.4.13_18DEC2013/BasicIntervalSchedule.cpp +++ b/CGMES_2.4.13_18DEC2013/BasicIntervalSchedule.cpp @@ -8,14 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "DateTime.hpp" -#include "UnitSymbol.hpp" -#include "UnitSymbol.hpp" using namespace CIMPP; -BasicIntervalSchedule::BasicIntervalSchedule() {}; -BasicIntervalSchedule::~BasicIntervalSchedule() {}; +BasicIntervalSchedule::BasicIntervalSchedule() {} +BasicIntervalSchedule::~BasicIntervalSchedule() {} static const std::list PossibleProfilesForClass = { @@ -44,51 +41,52 @@ BasicIntervalSchedule::getPossibleProfilesForAttributes() const return map; } - -bool assign_BasicIntervalSchedule_startTime(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_BasicIntervalSchedule_startTime(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->startTime = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_BasicIntervalSchedule_value1Unit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_BasicIntervalSchedule_value1Unit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->value1Unit; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_BasicIntervalSchedule_value2Unit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_BasicIntervalSchedule_value2Unit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->value2Unit; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_BasicIntervalSchedule_startTime(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + const BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->startTime; if (!buffer.str().empty()) @@ -100,11 +98,10 @@ bool get_BasicIntervalSchedule_startTime(const BaseClass* BaseClass_ptr1, std::s return false; } - - bool get_BasicIntervalSchedule_value1Unit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + const BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value1Unit; if (!buffer.str().empty()) @@ -118,7 +115,8 @@ bool get_BasicIntervalSchedule_value1Unit(const BaseClass* BaseClass_ptr1, std:: bool get_BasicIntervalSchedule_value2Unit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + const BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value2Unit; if (!buffer.str().empty()) @@ -138,14 +136,14 @@ const char* BasicIntervalSchedule::debugString() const void BasicIntervalSchedule::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:BasicIntervalSchedule"), &BasicIntervalSchedule_factory)); + factory_map.emplace("cim:BasicIntervalSchedule", &BasicIntervalSchedule_factory); } void BasicIntervalSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:BasicIntervalSchedule.startTime"), &assign_BasicIntervalSchedule_startTime)); - assign_map.insert(std::make_pair(std::string("cim:BasicIntervalSchedule.value1Unit"), &assign_BasicIntervalSchedule_value1Unit)); - assign_map.insert(std::make_pair(std::string("cim:BasicIntervalSchedule.value2Unit"), &assign_BasicIntervalSchedule_value2Unit)); + assign_map.emplace("cim:BasicIntervalSchedule.startTime", &assign_BasicIntervalSchedule_startTime); + assign_map.emplace("cim:BasicIntervalSchedule.value1Unit", &assign_BasicIntervalSchedule_value1Unit); + assign_map.emplace("cim:BasicIntervalSchedule.value2Unit", &assign_BasicIntervalSchedule_value2Unit); } void BasicIntervalSchedule::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/BasicIntervalSchedule.hpp b/CGMES_2.4.13_18DEC2013/BasicIntervalSchedule.hpp index b629ba700..610f2e7d6 100644 --- a/CGMES_2.4.13_18DEC2013/BasicIntervalSchedule.hpp +++ b/CGMES_2.4.13_18DEC2013/BasicIntervalSchedule.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Schedule of values at points in time. - */ + /** \brief Schedule of values at points in time. */ class BasicIntervalSchedule : public IdentifiedObject { public: @@ -28,9 +26,14 @@ namespace CIMPP BasicIntervalSchedule(); ~BasicIntervalSchedule() override; - CIMPP::DateTime startTime; /* The time for the first time point. Default: '' */ - CIMPP::UnitSymbol value1Unit; /* Value1 units of measure. Default: 0 */ - CIMPP::UnitSymbol value2Unit; /* Value2 units of measure. Default: 0 */ + /** \brief The time for the first time point. Default: '' */ + CIMPP::DateTime startTime; + + /** \brief Value1 units of measure. Default: 0 */ + CIMPP::UnitSymbol value1Unit; + + /** \brief Value2 units of measure. Default: 0 */ + CIMPP::UnitSymbol value2Unit; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Bay.cpp b/CGMES_2.4.13_18DEC2013/Bay.cpp index c951dd9ec..bf629aae8 100644 --- a/CGMES_2.4.13_18DEC2013/Bay.cpp +++ b/CGMES_2.4.13_18DEC2013/Bay.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Bay::Bay() : VoltageLevel(nullptr) {}; -Bay::~Bay() {}; +Bay::Bay() : VoltageLevel(nullptr) {} +Bay::~Bay() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ Bay::getPossibleProfilesForAttributes() const return map; } - - bool assign_VoltageLevel_Bays(BaseClass*, BaseClass*); bool assign_Bay_VoltageLevel(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_Bay_VoltageLevel(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr return false; } - bool get_Bay_VoltageLevel(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Bay* element = dynamic_cast(BaseClass_ptr1)) + const Bay* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->VoltageLevel != 0) { @@ -73,7 +71,6 @@ bool get_Bay_VoltageLevel(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Bay"), &Bay_factory)); + factory_map.emplace("cim:Bay", &Bay_factory); } void Bay::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void Bay::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Bay.VoltageLevel"), &assign_Bay_VoltageLevel)); + assign_map.emplace("cim:Bay.VoltageLevel", &assign_Bay_VoltageLevel); } void Bay::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/Bay.hpp b/CGMES_2.4.13_18DEC2013/Bay.hpp index b9ff9679a..7d30425e4 100644 --- a/CGMES_2.4.13_18DEC2013/Bay.hpp +++ b/CGMES_2.4.13_18DEC2013/Bay.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class VoltageLevel; - /* - A collection of power system resources (within a given substation) including conducting equipment, protection relays, measurements, and telemetry. A bay typically represents a physical grouping related to modularization of equipment. - */ + /** \brief A collection of power system resources (within a given substation) including conducting equipment, protection relays, measurements, and telemetry. A bay typically represents a physical grouping related to modularization of equipment. */ class Bay : public EquipmentContainer { public: @@ -27,7 +25,8 @@ namespace CIMPP Bay(); ~Bay() override; - CIMPP::VoltageLevel* VoltageLevel; /* The voltage level containing this bay. Default: 0 */ + /** \brief The voltage level containing this bay. Default: 0 */ + CIMPP::VoltageLevel* VoltageLevel; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Breaker.cpp b/CGMES_2.4.13_18DEC2013/Breaker.cpp index 88a01ff00..034b1ee93 100644 --- a/CGMES_2.4.13_18DEC2013/Breaker.cpp +++ b/CGMES_2.4.13_18DEC2013/Breaker.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Breaker::Breaker() {}; -Breaker::~Breaker() {}; +Breaker::Breaker() {} +Breaker::~Breaker() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ Breaker::getPossibleProfilesForAttributes() const return map; } - - - - - const char Breaker::debugName[] = "Breaker"; const char* Breaker::debugString() const { @@ -52,7 +47,7 @@ const char* Breaker::debugString() const void Breaker::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Breaker"), &Breaker_factory)); + factory_map.emplace("cim:Breaker", &Breaker_factory); } void Breaker::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/Breaker.hpp b/CGMES_2.4.13_18DEC2013/Breaker.hpp index d760e2518..812da0f56 100644 --- a/CGMES_2.4.13_18DEC2013/Breaker.hpp +++ b/CGMES_2.4.13_18DEC2013/Breaker.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A mechanical switching device capable of making, carrying, and breaking currents under normal circuit conditions and also making, carrying for a specified time, and breaking currents under specified abnormal circuit conditions e.g. those of short circuit. - */ + /** \brief A mechanical switching device capable of making, carrying, and breaking currents under normal circuit conditions and also making, carrying for a specified time, and breaking currents under specified abnormal circuit conditions e.g. those of short circuit. */ class Breaker : public ProtectedSwitch { public: @@ -26,7 +24,6 @@ namespace CIMPP Breaker(); ~Breaker() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/BusNameMarker.cpp b/CGMES_2.4.13_18DEC2013/BusNameMarker.cpp index ed137f2f8..24a10645f 100644 --- a/CGMES_2.4.13_18DEC2013/BusNameMarker.cpp +++ b/CGMES_2.4.13_18DEC2013/BusNameMarker.cpp @@ -8,14 +8,13 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "ReportingGroup.hpp" #include "ACDCTerminal.hpp" -#include "Integer.hpp" +#include "ReportingGroup.hpp" using namespace CIMPP; -BusNameMarker::BusNameMarker() : ReportingGroup(nullptr) {}; -BusNameMarker::~BusNameMarker() {}; +BusNameMarker::BusNameMarker() : ReportingGroup(nullptr) {} +BusNameMarker::~BusNameMarker() {} static const std::list PossibleProfilesForClass = { @@ -44,21 +43,6 @@ BusNameMarker::getPossibleProfilesForAttributes() const return map; } - -bool assign_BusNameMarker_priority(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (BusNameMarker* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->priority; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ReportingGroup_BusNameMarker(BaseClass*, BaseClass*); bool assign_BusNameMarker_ReportingGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -75,6 +59,7 @@ bool assign_BusNameMarker_ReportingGroup(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_ACDCTerminal_BusNameMarker(BaseClass*, BaseClass*); bool assign_BusNameMarker_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -92,24 +77,24 @@ bool assign_BusNameMarker_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseCla return false; } -bool get_BusNameMarker_priority(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_BusNameMarker_priority(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const BusNameMarker* element = dynamic_cast(BaseClass_ptr1)) + BusNameMarker* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->priority; - if (!buffer.str().empty()) + buffer >> element->priority; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_BusNameMarker_ReportingGroup(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const BusNameMarker* element = dynamic_cast(BaseClass_ptr1)) + const BusNameMarker* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ReportingGroup != 0) { @@ -121,6 +106,21 @@ bool get_BusNameMarker_ReportingGroup(const BaseClass* BaseClass_ptr1, std::list } +bool get_BusNameMarker_priority(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const BusNameMarker* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->priority; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + const char BusNameMarker::debugName[] = "BusNameMarker"; const char* BusNameMarker::debugString() const { @@ -129,18 +129,18 @@ const char* BusNameMarker::debugString() const void BusNameMarker::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:BusNameMarker"), &BusNameMarker_factory)); + factory_map.emplace("cim:BusNameMarker", &BusNameMarker_factory); } void BusNameMarker::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:BusNameMarker.priority"), &assign_BusNameMarker_priority)); + assign_map.emplace("cim:BusNameMarker.priority", &assign_BusNameMarker_priority); } void BusNameMarker::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:BusNameMarker.ReportingGroup"), &assign_BusNameMarker_ReportingGroup)); - assign_map.insert(std::make_pair(std::string("cim:BusNameMarker.Terminal"), &assign_BusNameMarker_Terminal)); + assign_map.emplace("cim:BusNameMarker.ReportingGroup", &assign_BusNameMarker_ReportingGroup); + assign_map.emplace("cim:BusNameMarker.Terminal", &assign_BusNameMarker_Terminal); } void BusNameMarker::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/BusNameMarker.hpp b/CGMES_2.4.13_18DEC2013/BusNameMarker.hpp index b3b3ec87f..7aa5a6d42 100644 --- a/CGMES_2.4.13_18DEC2013/BusNameMarker.hpp +++ b/CGMES_2.4.13_18DEC2013/BusNameMarker.hpp @@ -19,9 +19,7 @@ namespace CIMPP class ACDCTerminal; class ReportingGroup; - /* - Used to apply user standard names to topology buses. Typically used for "bus/branch" case generation. Associated with one or more terminals that are normally connected with the bus name. The associated terminals are normally connected by non-retained switches. For a ring bus station configuration, all busbar terminals in the ring are typically associated. For a breaker and a half scheme, both busbars would normally be associated. For a ring bus, all busbars would normally be associated. For a "straight" busbar configuration, normally only the main terminal at the busbar would be associated. - */ + /** \brief Used to apply user standard names to topology buses. Typically used for "bus/branch" case generation. Associated with one or more terminals that are normally connected with the bus name. The associated terminals are normally connected by non-retained switches. For a ring bus station configuration, all busbar terminals in the ring are typically associated. For a breaker and a half scheme, both busbars would normally be associated. For a ring bus, all busbars would normally be associated. For a "straight" busbar configuration, normally only the main terminal at the busbar would be associated. */ class BusNameMarker : public IdentifiedObject { public: @@ -29,9 +27,14 @@ namespace CIMPP BusNameMarker(); ~BusNameMarker() override; - CIMPP::ReportingGroup* ReportingGroup; /* The bus name markers that belong to this reporting group. Default: 0 */ - std::list Terminal; /* The terminals associated with this bus name marker. Default: 0 */ - CIMPP::Integer priority; /* Priority of bus name marker for use as topology bus name. Use 0 for don t care. Use 1 for highest priority. Use 2 as priority is less than 1 and so on. Default: 0 */ + /** \brief The bus name markers that belong to this reporting group. Default: 0 */ + CIMPP::ReportingGroup* ReportingGroup; + + /** \brief The terminals associated with this bus name marker. Default: 0 */ + std::list Terminal; + + /** \brief Priority of bus name marker for use as topology bus name. Use 0 for don t care. Use 1 for highest priority. Use 2 as priority is less than 1 and so on. Default: 0 */ + CIMPP::Integer priority; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/BusbarSection.cpp b/CGMES_2.4.13_18DEC2013/BusbarSection.cpp index f655a5c56..2b6048953 100644 --- a/CGMES_2.4.13_18DEC2013/BusbarSection.cpp +++ b/CGMES_2.4.13_18DEC2013/BusbarSection.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "CurrentFlow.hpp" using namespace CIMPP; -BusbarSection::BusbarSection() {}; -BusbarSection::~BusbarSection() {}; +BusbarSection::BusbarSection() {} +BusbarSection::~BusbarSection() {} static const std::list PossibleProfilesForClass = { @@ -40,25 +39,24 @@ BusbarSection::getPossibleProfilesForAttributes() const return map; } - -bool assign_BusbarSection_ipMax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_BusbarSection_ipMax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (BusbarSection* element = dynamic_cast(BaseClass_ptr1)) + BusbarSection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ipMax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_BusbarSection_ipMax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const BusbarSection* element = dynamic_cast(BaseClass_ptr1)) + const BusbarSection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ipMax; if (!buffer.str().empty()) @@ -70,8 +68,6 @@ bool get_BusbarSection_ipMax(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char BusbarSection::debugName[] = "BusbarSection"; const char* BusbarSection::debugString() const { @@ -80,12 +76,12 @@ const char* BusbarSection::debugString() const void BusbarSection::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:BusbarSection"), &BusbarSection_factory)); + factory_map.emplace("cim:BusbarSection", &BusbarSection_factory); } void BusbarSection::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:BusbarSection.ipMax"), &assign_BusbarSection_ipMax)); + assign_map.emplace("cim:BusbarSection.ipMax", &assign_BusbarSection_ipMax); } void BusbarSection::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/BusbarSection.hpp b/CGMES_2.4.13_18DEC2013/BusbarSection.hpp index f51b76da1..1fa53d221 100644 --- a/CGMES_2.4.13_18DEC2013/BusbarSection.hpp +++ b/CGMES_2.4.13_18DEC2013/BusbarSection.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A conductor, or group of conductors, with negligible impedance, that serve to connect other conducting equipment within a single substation. Voltage measurements are typically obtained from VoltageTransformers that are connected to busbar sections. A bus bar section may have many physical terminals but for analysis is modelled with exactly one logical terminal. - */ + /** \brief A conductor, or group of conductors, with negligible impedance, that serve to connect other conducting equipment within a single substation. Voltage measurements are typically obtained from VoltageTransformers that are connected to busbar sections. A bus bar section may have many physical terminals but for analysis is modelled with exactly one logical terminal. */ class BusbarSection : public Connector { public: @@ -27,7 +25,8 @@ namespace CIMPP BusbarSection(); ~BusbarSection() override; - CIMPP::CurrentFlow ipMax; /* Maximum allowable peak short-circuit current of busbar (Ipmax in the IEC 60909-0). Mechanical limit of the busbar in the substation itself. Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + /** \brief Maximum allowable peak short-circuit current of busbar (Ipmax in the IEC 60909-0). Mechanical limit of the busbar in the substation itself. Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::CurrentFlow ipMax; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/CGMESProfile.cpp b/CGMES_2.4.13_18DEC2013/CGMESProfile.cpp index ebabd3380..8f6a230cc 100644 --- a/CGMES_2.4.13_18DEC2013/CGMESProfile.cpp +++ b/CGMES_2.4.13_18DEC2013/CGMESProfile.cpp @@ -59,8 +59,6 @@ static const std::map> ProfileURIs = { CGMESProfile::TP_BD, { "http://entsoe.eu/CIM/TopologyBoundary/3/1", } }, }; -static const std::string CimNamespace = "http://iec.ch/TC57/2013/CIM-schema-cim16#"; - const std::list& getProfileList() { @@ -126,9 +124,3 @@ getProfileFromLongName(const std::string& name) } return UnknownProfile; } - -std::string -getCimNamespace() -{ - return CimNamespace; -} diff --git a/CGMES_2.4.13_18DEC2013/CGMESProfile.hpp b/CGMES_2.4.13_18DEC2013/CGMESProfile.hpp index 727c67459..f05e22e4b 100644 --- a/CGMES_2.4.13_18DEC2013/CGMESProfile.hpp +++ b/CGMES_2.4.13_18DEC2013/CGMESProfile.hpp @@ -31,6 +31,4 @@ const std::list& getProfileURIs(CGMESProfile profile); CGMESProfile getProfileFromShortName(const std::string& name); CGMESProfile getProfileFromLongName(const std::string& name); -std::string getCimNamespace(); - -#endif // CGMESPROFILE_HPP +#endif diff --git a/CGMES_2.4.13_18DEC2013/CIMClassList.hpp b/CGMES_2.4.13_18DEC2013/CIMClassList.hpp index 8a65daee6..09bc2fc2d 100644 --- a/CGMES_2.4.13_18DEC2013/CIMClassList.hpp +++ b/CGMES_2.4.13_18DEC2013/CIMClassList.hpp @@ -3,9 +3,14 @@ /* Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen */ + #include + +#include "BaseClassDefiner.hpp" #include "IEC61970.hpp" + using namespace CIMPP; + static std::list CIMClassList = { ACDCConverter::declare(), @@ -406,4 +411,4 @@ static std::list CIMClassList = WindType3or4UserDefined::declare(), UnknownType::declare(), }; -#endif // CIMCLASSLIST_H +#endif diff --git a/CGMES_2.4.13_18DEC2013/Capacitance.hpp b/CGMES_2.4.13_18DEC2013/Capacitance.hpp index 0f2f8bad2..f08217712 100644 --- a/CGMES_2.4.13_18DEC2013/Capacitance.hpp +++ b/CGMES_2.4.13_18DEC2013/Capacitance.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Capacitive part of reactance (imaginary part of impedance), at rated frequency. - */ + /** \brief Capacitive part of reactance (imaginary part of impedance), at rated frequency. */ class Capacitance { public: diff --git a/CGMES_2.4.13_18DEC2013/CapacitancePerLength.hpp b/CGMES_2.4.13_18DEC2013/CapacitancePerLength.hpp index b38d961b2..78266a09e 100644 --- a/CGMES_2.4.13_18DEC2013/CapacitancePerLength.hpp +++ b/CGMES_2.4.13_18DEC2013/CapacitancePerLength.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Capacitance per unit of length. - */ + /** \brief Capacitance per unit of length. */ class CapacitancePerLength { public: diff --git a/CGMES_2.4.13_18DEC2013/CimConstants.cpp b/CGMES_2.4.13_18DEC2013/CimConstants.cpp new file mode 100644 index 000000000..90fd6f269 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/CimConstants.cpp @@ -0,0 +1,14 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "CimConstants.hpp" + +const std::string CimVersion = "cgmes_v2_4_13"; + +const std::map NamespaceMap = +{ + { "cim", "http://iec.ch/TC57/2013/CIM-schema-cim16#" }, + { "entsoe", "http://entsoe.eu/CIM/SchemaExtension/3/1#" }, + { "md", "http://iec.ch/TC57/61970-552/ModelDescription/1#" }, + { "rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#" }, +}; diff --git a/CGMES_2.4.13_18DEC2013/CimConstants.hpp b/CGMES_2.4.13_18DEC2013/CimConstants.hpp new file mode 100644 index 000000000..124197842 --- /dev/null +++ b/CGMES_2.4.13_18DEC2013/CimConstants.hpp @@ -0,0 +1,16 @@ +#ifndef CIM_CONSTANTS_HPP +#define CIM_CONSTANTS_HPP +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +/** \brief CIM version string. */ +extern const std::string CimVersion; + +/** \brief Default namespaces used by CGMES. Map of namespace key to URL. */ +extern const std::map NamespaceMap; + +#endif diff --git a/CGMES_2.4.13_18DEC2013/Command.cpp b/CGMES_2.4.13_18DEC2013/Command.cpp index f12035edf..7a02eb36a 100644 --- a/CGMES_2.4.13_18DEC2013/Command.cpp +++ b/CGMES_2.4.13_18DEC2013/Command.cpp @@ -10,13 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "DiscreteValue.hpp" #include "ValueAliasSet.hpp" -#include "Integer.hpp" -#include "Integer.hpp" using namespace CIMPP; -Command::Command() : DiscreteValue(nullptr), ValueAliasSet(nullptr) {}; -Command::~Command() {}; +Command::Command() : DiscreteValue(nullptr), ValueAliasSet(nullptr) {} +Command::~Command() {} static const std::list PossibleProfilesForClass = { @@ -46,34 +44,6 @@ Command::getPossibleProfilesForAttributes() const return map; } - -bool assign_Command_normalValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (Command* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->normalValue; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_Command_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (Command* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->value; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_DiscreteValue_Command(BaseClass*, BaseClass*); bool assign_Command_DiscreteValue(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -90,6 +60,7 @@ bool assign_Command_DiscreteValue(BaseClass* BaseClass_ptr1, BaseClass* BaseClas } return false; } + bool assign_ValueAliasSet_Commands(BaseClass*, BaseClass*); bool assign_Command_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -107,38 +78,38 @@ bool assign_Command_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClas return false; } -bool get_Command_normalValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_Command_normalValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const Command* element = dynamic_cast(BaseClass_ptr1)) + Command* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->normalValue; - if (!buffer.str().empty()) + buffer >> element->normalValue; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_Command_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_Command_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const Command* element = dynamic_cast(BaseClass_ptr1)) + Command* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->value; - if (!buffer.str().empty()) + buffer >> element->value; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_Command_DiscreteValue(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Command* element = dynamic_cast(BaseClass_ptr1)) + const Command* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DiscreteValue != 0) { @@ -151,7 +122,8 @@ bool get_Command_DiscreteValue(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Command* element = dynamic_cast(BaseClass_ptr1)) + const Command* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ValueAliasSet != 0) { @@ -162,6 +134,35 @@ bool get_Command_ValueAliasSet(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->normalValue; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_Command_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const Command* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->value; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char Command::debugName[] = "Command"; const char* Command::debugString() const @@ -171,19 +172,19 @@ const char* Command::debugString() const void Command::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Command"), &Command_factory)); + factory_map.emplace("cim:Command", &Command_factory); } void Command::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Command.normalValue"), &assign_Command_normalValue)); - assign_map.insert(std::make_pair(std::string("cim:Command.value"), &assign_Command_value)); + assign_map.emplace("cim:Command.normalValue", &assign_Command_normalValue); + assign_map.emplace("cim:Command.value", &assign_Command_value); } void Command::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Command.DiscreteValue"), &assign_Command_DiscreteValue)); - assign_map.insert(std::make_pair(std::string("cim:Command.ValueAliasSet"), &assign_Command_ValueAliasSet)); + assign_map.emplace("cim:Command.DiscreteValue", &assign_Command_DiscreteValue); + assign_map.emplace("cim:Command.ValueAliasSet", &assign_Command_ValueAliasSet); } void Command::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/Command.hpp b/CGMES_2.4.13_18DEC2013/Command.hpp index 0c3e01e02..e91f39202 100644 --- a/CGMES_2.4.13_18DEC2013/Command.hpp +++ b/CGMES_2.4.13_18DEC2013/Command.hpp @@ -19,9 +19,7 @@ namespace CIMPP class DiscreteValue; class ValueAliasSet; - /* - A Command is a discrete control used for supervisory control. - */ + /** \brief A Command is a discrete control used for supervisory control. */ class Command : public Control { public: @@ -29,10 +27,17 @@ namespace CIMPP Command(); ~Command() override; - CIMPP::DiscreteValue* DiscreteValue; /* The Control variable associated with the MeasurementValue. Default: 0 */ - CIMPP::ValueAliasSet* ValueAliasSet; /* The ValueAliasSet used for translation of a Control value to a name. Default: 0 */ - CIMPP::Integer normalValue; /* Normal value for Control.value e.g. used for percentage scaling. Default: 0 */ - CIMPP::Integer value; /* The value representing the actuator output. Default: 0 */ + /** \brief The Control variable associated with the MeasurementValue. Default: 0 */ + CIMPP::DiscreteValue* DiscreteValue; + + /** \brief The ValueAliasSet used for translation of a Control value to a name. Default: 0 */ + CIMPP::ValueAliasSet* ValueAliasSet; + + /** \brief Normal value for Control.value e.g. used for percentage scaling. Default: 0 */ + CIMPP::Integer normalValue; + + /** \brief The value representing the actuator output. Default: 0 */ + CIMPP::Integer value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Conductance.hpp b/CGMES_2.4.13_18DEC2013/Conductance.hpp index 6a99df04e..08f09a881 100644 --- a/CGMES_2.4.13_18DEC2013/Conductance.hpp +++ b/CGMES_2.4.13_18DEC2013/Conductance.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Factor by which voltage must be multiplied to give corresponding power lost from a circuit. Real part of admittance. - */ + /** \brief Factor by which voltage must be multiplied to give corresponding power lost from a circuit. Real part of admittance. */ class Conductance { public: diff --git a/CGMES_2.4.13_18DEC2013/ConductingEquipment.cpp b/CGMES_2.4.13_18DEC2013/ConductingEquipment.cpp index 90458111d..77cbe0b92 100644 --- a/CGMES_2.4.13_18DEC2013/ConductingEquipment.cpp +++ b/CGMES_2.4.13_18DEC2013/ConductingEquipment.cpp @@ -14,8 +14,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ConductingEquipment::ConductingEquipment() : BaseVoltage(nullptr), SvStatus(nullptr) {}; -ConductingEquipment::~ConductingEquipment() {}; +ConductingEquipment::ConductingEquipment() : BaseVoltage(nullptr), SvStatus(nullptr) {} +ConductingEquipment::~ConductingEquipment() {} static const std::list PossibleProfilesForClass = { @@ -48,8 +48,6 @@ ConductingEquipment::getPossibleProfilesForAttributes() const return map; } - - bool assign_BaseVoltage_ConductingEquipment(BaseClass*, BaseClass*); bool assign_ConductingEquipment_BaseVoltage(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -66,6 +64,7 @@ bool assign_ConductingEquipment_BaseVoltage(BaseClass* BaseClass_ptr1, BaseClass } return false; } + bool assign_SvStatus_ConductingEquipment(BaseClass*, BaseClass*); bool assign_ConductingEquipment_SvStatus(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -82,6 +81,7 @@ bool assign_ConductingEquipment_SvStatus(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_Terminal_ConductingEquipment(BaseClass*, BaseClass*); bool assign_ConductingEquipment_Terminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -99,10 +99,10 @@ bool assign_ConductingEquipment_Terminals(BaseClass* BaseClass_ptr1, BaseClass* return false; } - bool get_ConductingEquipment_BaseVoltage(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ConductingEquipment* element = dynamic_cast(BaseClass_ptr1)) + const ConductingEquipment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->BaseVoltage != 0) { @@ -114,6 +114,7 @@ bool get_ConductingEquipment_BaseVoltage(const BaseClass* BaseClass_ptr1, std::l } + const char ConductingEquipment::debugName[] = "ConductingEquipment"; const char* ConductingEquipment::debugString() const { @@ -122,7 +123,7 @@ const char* ConductingEquipment::debugString() const void ConductingEquipment::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ConductingEquipment"), &ConductingEquipment_factory)); + factory_map.emplace("cim:ConductingEquipment", &ConductingEquipment_factory); } void ConductingEquipment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -131,9 +132,9 @@ void ConductingEquipment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ConductingEquipment.BaseVoltage"), &assign_ConductingEquipment_BaseVoltage)); - assign_map.insert(std::make_pair(std::string("cim:ConductingEquipment.SvStatus"), &assign_ConductingEquipment_SvStatus)); - assign_map.insert(std::make_pair(std::string("cim:ConductingEquipment.Terminals"), &assign_ConductingEquipment_Terminals)); + assign_map.emplace("cim:ConductingEquipment.BaseVoltage", &assign_ConductingEquipment_BaseVoltage); + assign_map.emplace("cim:ConductingEquipment.SvStatus", &assign_ConductingEquipment_SvStatus); + assign_map.emplace("cim:ConductingEquipment.Terminals", &assign_ConductingEquipment_Terminals); } void ConductingEquipment::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/ConductingEquipment.hpp b/CGMES_2.4.13_18DEC2013/ConductingEquipment.hpp index 43ce2c7e5..633a41871 100644 --- a/CGMES_2.4.13_18DEC2013/ConductingEquipment.hpp +++ b/CGMES_2.4.13_18DEC2013/ConductingEquipment.hpp @@ -19,9 +19,7 @@ namespace CIMPP class SvStatus; class Terminal; - /* - The parts of the AC power system that are designed to carry current or that are conductively connected through terminals. - */ + /** \brief The parts of the AC power system that are designed to carry current or that are conductively connected through terminals. */ class ConductingEquipment : public Equipment { public: @@ -29,9 +27,14 @@ namespace CIMPP ConductingEquipment(); ~ConductingEquipment() override; - CIMPP::BaseVoltage* BaseVoltage; /* All conducting equipment with this base voltage. Use only when there is no voltage level container used and only one base voltage applies. For example, not used for transformers. Default: 0 */ - CIMPP::SvStatus* SvStatus; /* The status state variable associated with this conducting equipment. Default: 0 */ - std::list Terminals; /* Conducting equipment have terminals that may be connected to other conducting equipment terminals via connectivity nodes or topological nodes. Default: 0 */ + /** \brief All conducting equipment with this base voltage. Use only when there is no voltage level container used and only one base voltage applies. For example, not used for transformers. Default: 0 */ + CIMPP::BaseVoltage* BaseVoltage; + + /** \brief The status state variable associated with this conducting equipment. Default: 0 */ + CIMPP::SvStatus* SvStatus; + + /** \brief Conducting equipment have terminals that may be connected to other conducting equipment terminals via connectivity nodes or topological nodes. Default: 0 */ + std::list Terminals; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Conductor.cpp b/CGMES_2.4.13_18DEC2013/Conductor.cpp index d0f5a4be4..c3579e253 100644 --- a/CGMES_2.4.13_18DEC2013/Conductor.cpp +++ b/CGMES_2.4.13_18DEC2013/Conductor.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Length.hpp" using namespace CIMPP; -Conductor::Conductor() {}; -Conductor::~Conductor() {}; +Conductor::Conductor() {} +Conductor::~Conductor() {} static const std::list PossibleProfilesForClass = { @@ -40,25 +39,24 @@ Conductor::getPossibleProfilesForAttributes() const return map; } - -bool assign_Conductor_length(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Conductor_length(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Conductor* element = dynamic_cast(BaseClass_ptr1)) + Conductor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->length; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_Conductor_length(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Conductor* element = dynamic_cast(BaseClass_ptr1)) + const Conductor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->length; if (!buffer.str().empty()) @@ -70,8 +68,6 @@ bool get_Conductor_length(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char Conductor::debugName[] = "Conductor"; const char* Conductor::debugString() const { @@ -80,12 +76,12 @@ const char* Conductor::debugString() const void Conductor::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Conductor"), &Conductor_factory)); + factory_map.emplace("cim:Conductor", &Conductor_factory); } void Conductor::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Conductor.length"), &assign_Conductor_length)); + assign_map.emplace("cim:Conductor.length", &assign_Conductor_length); } void Conductor::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/Conductor.hpp b/CGMES_2.4.13_18DEC2013/Conductor.hpp index f37df48b9..cb84bd42d 100644 --- a/CGMES_2.4.13_18DEC2013/Conductor.hpp +++ b/CGMES_2.4.13_18DEC2013/Conductor.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Combination of conducting material with consistent electrical characteristics, building a single electrical system, used to carry current between points in the power system. - */ + /** \brief Combination of conducting material with consistent electrical characteristics, building a single electrical system, used to carry current between points in the power system. */ class Conductor : public ConductingEquipment { public: @@ -27,7 +25,8 @@ namespace CIMPP Conductor(); ~Conductor() override; - CIMPP::Length length; /* Segment length for calculating line section capabilities Default: nullptr */ + /** \brief Segment length for calculating line section capabilities Default: nullptr */ + CIMPP::Length length; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ConformLoad.cpp b/CGMES_2.4.13_18DEC2013/ConformLoad.cpp index b83991aee..8e91acf2f 100644 --- a/CGMES_2.4.13_18DEC2013/ConformLoad.cpp +++ b/CGMES_2.4.13_18DEC2013/ConformLoad.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ConformLoad::ConformLoad() : LoadGroup(nullptr) {}; -ConformLoad::~ConformLoad() {}; +ConformLoad::ConformLoad() : LoadGroup(nullptr) {} +ConformLoad::~ConformLoad() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ ConformLoad::getPossibleProfilesForAttributes() const return map; } - - bool assign_ConformLoadGroup_EnergyConsumers(BaseClass*, BaseClass*); bool assign_ConformLoad_LoadGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_ConformLoad_LoadGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClas return false; } - bool get_ConformLoad_LoadGroup(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ConformLoad* element = dynamic_cast(BaseClass_ptr1)) + const ConformLoad* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->LoadGroup != 0) { @@ -73,7 +71,6 @@ bool get_ConformLoad_LoadGroup(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ConformLoad"), &ConformLoad_factory)); + factory_map.emplace("cim:ConformLoad", &ConformLoad_factory); } void ConformLoad::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void ConformLoad::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ConformLoad.LoadGroup"), &assign_ConformLoad_LoadGroup)); + assign_map.emplace("cim:ConformLoad.LoadGroup", &assign_ConformLoad_LoadGroup); } void ConformLoad::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/ConformLoad.hpp b/CGMES_2.4.13_18DEC2013/ConformLoad.hpp index 31946d05a..0448c6f96 100644 --- a/CGMES_2.4.13_18DEC2013/ConformLoad.hpp +++ b/CGMES_2.4.13_18DEC2013/ConformLoad.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class ConformLoadGroup; - /* - ConformLoad represent loads that follow a daily load change pattern where the pattern can be used to scale the load with a system load. - */ + /** \brief ConformLoad represent loads that follow a daily load change pattern where the pattern can be used to scale the load with a system load. */ class ConformLoad : public EnergyConsumer { public: @@ -27,7 +25,8 @@ namespace CIMPP ConformLoad(); ~ConformLoad() override; - CIMPP::ConformLoadGroup* LoadGroup; /* Group of this ConformLoad. Default: 0 */ + /** \brief Group of this ConformLoad. Default: 0 */ + CIMPP::ConformLoadGroup* LoadGroup; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ConformLoadGroup.cpp b/CGMES_2.4.13_18DEC2013/ConformLoadGroup.cpp index cccde6cb4..c8d5c15fa 100644 --- a/CGMES_2.4.13_18DEC2013/ConformLoadGroup.cpp +++ b/CGMES_2.4.13_18DEC2013/ConformLoadGroup.cpp @@ -8,13 +8,13 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "ConformLoadSchedule.hpp" #include "ConformLoad.hpp" +#include "ConformLoadSchedule.hpp" using namespace CIMPP; -ConformLoadGroup::ConformLoadGroup() {}; -ConformLoadGroup::~ConformLoadGroup() {}; +ConformLoadGroup::ConformLoadGroup() {} +ConformLoadGroup::~ConformLoadGroup() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ ConformLoadGroup::getPossibleProfilesForAttributes() const return map; } - - bool assign_ConformLoadSchedule_ConformLoadGroup(BaseClass*, BaseClass*); bool assign_ConformLoadGroup_ConformLoadSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_ConformLoadGroup_ConformLoadSchedules(BaseClass* BaseClass_ptr1, Bas } return false; } + bool assign_ConformLoad_LoadGroup(BaseClass*, BaseClass*); bool assign_ConformLoadGroup_EnergyConsumers(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -87,7 +86,7 @@ const char* ConformLoadGroup::debugString() const void ConformLoadGroup::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ConformLoadGroup"), &ConformLoadGroup_factory)); + factory_map.emplace("cim:ConformLoadGroup", &ConformLoadGroup_factory); } void ConformLoadGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -96,8 +95,8 @@ void ConformLoadGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ConformLoadGroup.ConformLoadSchedules"), &assign_ConformLoadGroup_ConformLoadSchedules)); - assign_map.insert(std::make_pair(std::string("cim:ConformLoadGroup.EnergyConsumers"), &assign_ConformLoadGroup_EnergyConsumers)); + assign_map.emplace("cim:ConformLoadGroup.ConformLoadSchedules", &assign_ConformLoadGroup_ConformLoadSchedules); + assign_map.emplace("cim:ConformLoadGroup.EnergyConsumers", &assign_ConformLoadGroup_EnergyConsumers); } void ConformLoadGroup::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/ConformLoadGroup.hpp b/CGMES_2.4.13_18DEC2013/ConformLoadGroup.hpp index 9c9ab4de7..5e59426da 100644 --- a/CGMES_2.4.13_18DEC2013/ConformLoadGroup.hpp +++ b/CGMES_2.4.13_18DEC2013/ConformLoadGroup.hpp @@ -18,9 +18,7 @@ namespace CIMPP class ConformLoad; class ConformLoadSchedule; - /* - A group of loads conforming to an allocation pattern. - */ + /** \brief A group of loads conforming to an allocation pattern. */ class ConformLoadGroup : public LoadGroup { public: @@ -28,8 +26,11 @@ namespace CIMPP ConformLoadGroup(); ~ConformLoadGroup() override; - std::list ConformLoadSchedules; /* The ConformLoadSchedules in the ConformLoadGroup. Default: 0 */ - std::list EnergyConsumers; /* Conform loads assigned to this ConformLoadGroup. Default: 0 */ + /** \brief The ConformLoadSchedules in the ConformLoadGroup. Default: 0 */ + std::list ConformLoadSchedules; + + /** \brief Conform loads assigned to this ConformLoadGroup. Default: 0 */ + std::list EnergyConsumers; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ConformLoadSchedule.cpp b/CGMES_2.4.13_18DEC2013/ConformLoadSchedule.cpp index 5f93ccf7f..51bb1e07b 100644 --- a/CGMES_2.4.13_18DEC2013/ConformLoadSchedule.cpp +++ b/CGMES_2.4.13_18DEC2013/ConformLoadSchedule.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ConformLoadSchedule::ConformLoadSchedule() : ConformLoadGroup(nullptr) {}; -ConformLoadSchedule::~ConformLoadSchedule() {}; +ConformLoadSchedule::ConformLoadSchedule() : ConformLoadGroup(nullptr) {} +ConformLoadSchedule::~ConformLoadSchedule() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ ConformLoadSchedule::getPossibleProfilesForAttributes() const return map; } - - bool assign_ConformLoadGroup_ConformLoadSchedules(BaseClass*, BaseClass*); bool assign_ConformLoadSchedule_ConformLoadGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_ConformLoadSchedule_ConformLoadGroup(BaseClass* BaseClass_ptr1, Base return false; } - bool get_ConformLoadSchedule_ConformLoadGroup(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ConformLoadSchedule* element = dynamic_cast(BaseClass_ptr1)) + const ConformLoadSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ConformLoadGroup != 0) { @@ -73,7 +71,6 @@ bool get_ConformLoadSchedule_ConformLoadGroup(const BaseClass* BaseClass_ptr1, s return false; } - const char ConformLoadSchedule::debugName[] = "ConformLoadSchedule"; const char* ConformLoadSchedule::debugString() const { @@ -82,7 +79,7 @@ const char* ConformLoadSchedule::debugString() const void ConformLoadSchedule::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ConformLoadSchedule"), &ConformLoadSchedule_factory)); + factory_map.emplace("cim:ConformLoadSchedule", &ConformLoadSchedule_factory); } void ConformLoadSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void ConformLoadSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ConformLoadSchedule.ConformLoadGroup"), &assign_ConformLoadSchedule_ConformLoadGroup)); + assign_map.emplace("cim:ConformLoadSchedule.ConformLoadGroup", &assign_ConformLoadSchedule_ConformLoadGroup); } void ConformLoadSchedule::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/ConformLoadSchedule.hpp b/CGMES_2.4.13_18DEC2013/ConformLoadSchedule.hpp index 9712fa6c4..72fd6f6af 100644 --- a/CGMES_2.4.13_18DEC2013/ConformLoadSchedule.hpp +++ b/CGMES_2.4.13_18DEC2013/ConformLoadSchedule.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class ConformLoadGroup; - /* - A curve of load versus time (X-axis) showing the active power values (Y1-axis) and reactive power (Y2-axis) for each unit of the period covered. This curve represents a typical pattern of load over the time period for a given day type and season. - */ + /** \brief A curve of load versus time (X-axis) showing the active power values (Y1-axis) and reactive power (Y2-axis) for each unit of the period covered. This curve represents a typical pattern of load over the time period for a given day type and season. */ class ConformLoadSchedule : public SeasonDayTypeSchedule { public: @@ -27,7 +25,8 @@ namespace CIMPP ConformLoadSchedule(); ~ConformLoadSchedule() override; - CIMPP::ConformLoadGroup* ConformLoadGroup; /* The ConformLoadGroup where the ConformLoadSchedule belongs. Default: 0 */ + /** \brief The ConformLoadGroup where the ConformLoadSchedule belongs. Default: 0 */ + CIMPP::ConformLoadGroup* ConformLoadGroup; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ConnectivityNode.cpp b/CGMES_2.4.13_18DEC2013/ConnectivityNode.cpp index 556c354ae..a387855d6 100644 --- a/CGMES_2.4.13_18DEC2013/ConnectivityNode.cpp +++ b/CGMES_2.4.13_18DEC2013/ConnectivityNode.cpp @@ -11,18 +11,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "ConnectivityNodeContainer.hpp" #include "Terminal.hpp" #include "TopologicalNode.hpp" -#include "Boolean.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -ConnectivityNode::ConnectivityNode() : ConnectivityNodeContainer(nullptr), TopologicalNode(nullptr) {}; -ConnectivityNode::~ConnectivityNode() {}; +ConnectivityNode::ConnectivityNode() : ConnectivityNodeContainer(nullptr), TopologicalNode(nullptr) {} +ConnectivityNode::~ConnectivityNode() {} static const std::list PossibleProfilesForClass = { @@ -61,151 +54,188 @@ ConnectivityNode::getPossibleProfilesForAttributes() const return map; } +bool assign_ConnectivityNodeContainer_ConnectivityNodes(BaseClass*, BaseClass*); +bool assign_ConnectivityNode_ConnectivityNodeContainer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + ConnectivityNodeContainer* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ConnectivityNodeContainer != element2) + { + element->ConnectivityNodeContainer = element2; + return assign_ConnectivityNodeContainer_ConnectivityNodes(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_ConnectivityNode_boundaryPoint(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Terminal_ConnectivityNode(BaseClass*, BaseClass*); +bool assign_ConnectivityNode_Terminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->boundaryPoint; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->Terminals.begin(), element->Terminals.end(), element2) == element->Terminals.end()) + { + element->Terminals.push_back(element2); + return assign_Terminal_ConnectivityNode(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_ConnectivityNode_fromEndIsoCode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologicalNode_ConnectivityNodes(BaseClass*, BaseClass*); +bool assign_ConnectivityNode_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - element->fromEndIsoCode = buffer.str(); - if (buffer.fail()) - return false; - else - return true; + if (element->TopologicalNode != element2) + { + element->TopologicalNode = element2; + return assign_TopologicalNode_ConnectivityNodes(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_ConnectivityNode_fromEndName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ConnectivityNode_boundaryPoint(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - element->fromEndName = buffer.str(); - if (buffer.fail()) - return false; - else + buffer >> element->boundaryPoint; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ConnectivityNode_fromEndNameTso(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ConnectivityNode_fromEndIsoCode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - element->fromEndNameTso = buffer.str(); - if (buffer.fail()) - return false; - else + element->fromEndIsoCode = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ConnectivityNode_toEndIsoCode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ConnectivityNode_fromEndName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - element->toEndIsoCode = buffer.str(); - if (buffer.fail()) - return false; - else + element->fromEndName = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ConnectivityNode_toEndName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ConnectivityNode_fromEndNameTso(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - element->toEndName = buffer.str(); - if (buffer.fail()) - return false; - else + element->fromEndNameTso = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ConnectivityNode_toEndNameTso(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ConnectivityNode_toEndIsoCode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - element->toEndNameTso = buffer.str(); - if (buffer.fail()) - return false; - else + element->toEndIsoCode = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_ConnectivityNodeContainer_ConnectivityNodes(BaseClass*, BaseClass*); -bool assign_ConnectivityNode_ConnectivityNodeContainer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_ConnectivityNode_toEndName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); - ConnectivityNodeContainer* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->ConnectivityNodeContainer != element2) + element->toEndName = buffer.str(); + if (!buffer.fail()) { - element->ConnectivityNodeContainer = element2; - return assign_ConnectivityNodeContainer_ConnectivityNodes(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_Terminal_ConnectivityNode(BaseClass*, BaseClass*); -bool assign_ConnectivityNode_Terminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_ConnectivityNode_toEndNameTso(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); - Terminal* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->Terminals.begin(), element->Terminals.end(), element2) == element->Terminals.end()) + element->toEndNameTso = buffer.str(); + if (!buffer.fail()) { - element->Terminals.push_back(element2); - return assign_Terminal_ConnectivityNode(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_TopologicalNode_ConnectivityNodes(BaseClass*, BaseClass*); -bool assign_ConnectivityNode_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool get_ConnectivityNode_ConnectivityNodeContainer(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); - TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->TopologicalNode != element2) + if (element->ConnectivityNodeContainer != 0) { - element->TopologicalNode = element2; - return assign_TopologicalNode_ConnectivityNodes(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->ConnectivityNodeContainer); + return true; + } + } + return false; +} + + +bool get_ConnectivityNode_TopologicalNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) +{ + const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + if (element->TopologicalNode != 0) + { + BaseClass_list.push_back(element->TopologicalNode); + return true; } - return true; } return false; } bool get_ConnectivityNode_boundaryPoint(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->boundaryPoint; if (!buffer.str().empty()) @@ -219,7 +249,8 @@ bool get_ConnectivityNode_boundaryPoint(const BaseClass* BaseClass_ptr1, std::st bool get_ConnectivityNode_fromEndIsoCode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fromEndIsoCode; if (!buffer.str().empty()) @@ -233,7 +264,8 @@ bool get_ConnectivityNode_fromEndIsoCode(const BaseClass* BaseClass_ptr1, std::s bool get_ConnectivityNode_fromEndName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fromEndName; if (!buffer.str().empty()) @@ -247,7 +279,8 @@ bool get_ConnectivityNode_fromEndName(const BaseClass* BaseClass_ptr1, std::stri bool get_ConnectivityNode_fromEndNameTso(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fromEndNameTso; if (!buffer.str().empty()) @@ -261,7 +294,8 @@ bool get_ConnectivityNode_fromEndNameTso(const BaseClass* BaseClass_ptr1, std::s bool get_ConnectivityNode_toEndIsoCode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->toEndIsoCode; if (!buffer.str().empty()) @@ -275,7 +309,8 @@ bool get_ConnectivityNode_toEndIsoCode(const BaseClass* BaseClass_ptr1, std::str bool get_ConnectivityNode_toEndName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->toEndName; if (!buffer.str().empty()) @@ -289,7 +324,8 @@ bool get_ConnectivityNode_toEndName(const BaseClass* BaseClass_ptr1, std::string bool get_ConnectivityNode_toEndNameTso(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->toEndNameTso; if (!buffer.str().empty()) @@ -301,34 +337,6 @@ bool get_ConnectivityNode_toEndNameTso(const BaseClass* BaseClass_ptr1, std::str return false; } - -bool get_ConnectivityNode_ConnectivityNodeContainer(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->ConnectivityNodeContainer != 0) - { - BaseClass_list.push_back(element->ConnectivityNodeContainer); - return true; - } - } - return false; -} - -bool get_ConnectivityNode_TopologicalNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->TopologicalNode != 0) - { - BaseClass_list.push_back(element->TopologicalNode); - return true; - } - } - return false; -} - - const char ConnectivityNode::debugName[] = "ConnectivityNode"; const char* ConnectivityNode::debugString() const { @@ -337,25 +345,25 @@ const char* ConnectivityNode::debugString() const void ConnectivityNode::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ConnectivityNode"), &ConnectivityNode_factory)); + factory_map.emplace("cim:ConnectivityNode", &ConnectivityNode_factory); } void ConnectivityNode::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNode.boundaryPoint"), &assign_ConnectivityNode_boundaryPoint)); - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNode.fromEndIsoCode"), &assign_ConnectivityNode_fromEndIsoCode)); - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNode.fromEndName"), &assign_ConnectivityNode_fromEndName)); - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNode.fromEndNameTso"), &assign_ConnectivityNode_fromEndNameTso)); - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNode.toEndIsoCode"), &assign_ConnectivityNode_toEndIsoCode)); - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNode.toEndName"), &assign_ConnectivityNode_toEndName)); - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNode.toEndNameTso"), &assign_ConnectivityNode_toEndNameTso)); + assign_map.emplace("cim:ConnectivityNode.boundaryPoint", &assign_ConnectivityNode_boundaryPoint); + assign_map.emplace("cim:ConnectivityNode.fromEndIsoCode", &assign_ConnectivityNode_fromEndIsoCode); + assign_map.emplace("cim:ConnectivityNode.fromEndName", &assign_ConnectivityNode_fromEndName); + assign_map.emplace("cim:ConnectivityNode.fromEndNameTso", &assign_ConnectivityNode_fromEndNameTso); + assign_map.emplace("cim:ConnectivityNode.toEndIsoCode", &assign_ConnectivityNode_toEndIsoCode); + assign_map.emplace("cim:ConnectivityNode.toEndName", &assign_ConnectivityNode_toEndName); + assign_map.emplace("cim:ConnectivityNode.toEndNameTso", &assign_ConnectivityNode_toEndNameTso); } void ConnectivityNode::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNode.ConnectivityNodeContainer"), &assign_ConnectivityNode_ConnectivityNodeContainer)); - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNode.Terminals"), &assign_ConnectivityNode_Terminals)); - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNode.TopologicalNode"), &assign_ConnectivityNode_TopologicalNode)); + assign_map.emplace("cim:ConnectivityNode.ConnectivityNodeContainer", &assign_ConnectivityNode_ConnectivityNodeContainer); + assign_map.emplace("cim:ConnectivityNode.Terminals", &assign_ConnectivityNode_Terminals); + assign_map.emplace("cim:ConnectivityNode.TopologicalNode", &assign_ConnectivityNode_TopologicalNode); } void ConnectivityNode::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/ConnectivityNode.hpp b/CGMES_2.4.13_18DEC2013/ConnectivityNode.hpp index a9390568d..d6b9bed98 100644 --- a/CGMES_2.4.13_18DEC2013/ConnectivityNode.hpp +++ b/CGMES_2.4.13_18DEC2013/ConnectivityNode.hpp @@ -21,9 +21,7 @@ namespace CIMPP class Terminal; class TopologicalNode; - /* - Connectivity nodes are points where terminals of AC conducting equipment are connected together with zero impedance. - */ + /** \brief Connectivity nodes are points where terminals of AC conducting equipment are connected together with zero impedance. */ class ConnectivityNode : public IdentifiedObject { public: @@ -31,16 +29,35 @@ namespace CIMPP ConnectivityNode(); ~ConnectivityNode() override; - CIMPP::ConnectivityNodeContainer* ConnectivityNodeContainer; /* Container of this connectivity node. Default: 0 */ - std::list Terminals; /* The connectivity node to which this terminal connects with zero impedance. Default: 0 */ - CIMPP::TopologicalNode* TopologicalNode; /* The topological node to which this connectivity node is assigned. May depend on the current state of switches in the network. Default: 0 */ - CIMPP::Boolean boundaryPoint; /* Identifies if a node is a BoundaryPoint. If boundaryPoint=true the ConnectivityNode or the TopologicalNode represents a BoundaryPoint. Default: false */ - CIMPP::String fromEndIsoCode; /* The attribute is used for an exchange of the ISO code of the region to which the `From` side of the Boundary point belongs to or it is connected to. The ISO code is two characters country code as defined by ISO 3166 (). The length of the string is 2 characters maximum. The attribute is a required for the Boundary Model Authority Set where this attribute is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ - CIMPP::String fromEndName; /* The attribute is used for an exchange of a human readable name with length of the string 32 characters maximum. The attribute covers two cases: The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ - CIMPP::String fromEndNameTso; /* The attribute is used for an exchange of the name of the TSO to which the `From` side of the Boundary point belongs to or it is connected to. The length of the string is 32 characters maximum. The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ - CIMPP::String toEndIsoCode; /* The attribute is used for an exchange of the ISO code of the region to which the `To` side of the Boundary point belongs to or it is connected to. The ISO code is two characters country code as defined by ISO 3166 (). The length of the string is 2 characters maximum. The attribute is a required for the Boundary Model Authority Set where this attribute is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ - CIMPP::String toEndName; /* The attribute is used for an exchange of a human readable name with length of the string 32 characters maximum. The attribute covers two cases: The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ - CIMPP::String toEndNameTso; /* The attribute is used for an exchange of the name of the TSO to which the `To` side of the Boundary point belongs to or it is connected to. The length of the string is 32 characters maximum. The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + /** \brief Container of this connectivity node. Default: 0 */ + CIMPP::ConnectivityNodeContainer* ConnectivityNodeContainer; + + /** \brief The connectivity node to which this terminal connects with zero impedance. Default: 0 */ + std::list Terminals; + + /** \brief The topological node to which this connectivity node is assigned. May depend on the current state of switches in the network. Default: 0 */ + CIMPP::TopologicalNode* TopologicalNode; + + /** \brief Identifies if a node is a BoundaryPoint. If boundaryPoint=true the ConnectivityNode or the TopologicalNode represents a BoundaryPoint. Default: false */ + CIMPP::Boolean boundaryPoint; + + /** \brief The attribute is used for an exchange of the ISO code of the region to which the `From` side of the Boundary point belongs to or it is connected to. The ISO code is two characters country code as defined by ISO 3166 (). The length of the string is 2 characters maximum. The attribute is a required for the Boundary Model Authority Set where this attribute is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + CIMPP::String fromEndIsoCode; + + /** \brief The attribute is used for an exchange of a human readable name with length of the string 32 characters maximum. The attribute covers two cases: The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + CIMPP::String fromEndName; + + /** \brief The attribute is used for an exchange of the name of the TSO to which the `From` side of the Boundary point belongs to or it is connected to. The length of the string is 32 characters maximum. The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + CIMPP::String fromEndNameTso; + + /** \brief The attribute is used for an exchange of the ISO code of the region to which the `To` side of the Boundary point belongs to or it is connected to. The ISO code is two characters country code as defined by ISO 3166 (). The length of the string is 2 characters maximum. The attribute is a required for the Boundary Model Authority Set where this attribute is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + CIMPP::String toEndIsoCode; + + /** \brief The attribute is used for an exchange of a human readable name with length of the string 32 characters maximum. The attribute covers two cases: The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + CIMPP::String toEndName; + + /** \brief The attribute is used for an exchange of the name of the TSO to which the `To` side of the Boundary point belongs to or it is connected to. The length of the string is 32 characters maximum. The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + CIMPP::String toEndNameTso; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ConnectivityNodeContainer.cpp b/CGMES_2.4.13_18DEC2013/ConnectivityNodeContainer.cpp index 72607921a..6e3459df3 100644 --- a/CGMES_2.4.13_18DEC2013/ConnectivityNodeContainer.cpp +++ b/CGMES_2.4.13_18DEC2013/ConnectivityNodeContainer.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ConnectivityNodeContainer::ConnectivityNodeContainer() {}; -ConnectivityNodeContainer::~ConnectivityNodeContainer() {}; +ConnectivityNodeContainer::ConnectivityNodeContainer() {} +ConnectivityNodeContainer::~ConnectivityNodeContainer() {} static const std::list PossibleProfilesForClass = { @@ -45,8 +45,6 @@ ConnectivityNodeContainer::getPossibleProfilesForAttributes() const return map; } - - bool assign_ConnectivityNode_ConnectivityNodeContainer(BaseClass*, BaseClass*); bool assign_ConnectivityNodeContainer_ConnectivityNodes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -63,6 +61,7 @@ bool assign_ConnectivityNodeContainer_ConnectivityNodes(BaseClass* BaseClass_ptr } return false; } + bool assign_TopologicalNode_ConnectivityNodeContainer(BaseClass*, BaseClass*); bool assign_ConnectivityNodeContainer_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -90,7 +89,7 @@ const char* ConnectivityNodeContainer::debugString() const void ConnectivityNodeContainer::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ConnectivityNodeContainer"), &ConnectivityNodeContainer_factory)); + factory_map.emplace("cim:ConnectivityNodeContainer", &ConnectivityNodeContainer_factory); } void ConnectivityNodeContainer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -99,8 +98,8 @@ void ConnectivityNodeContainer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNodeContainer.ConnectivityNodes"), &assign_ConnectivityNodeContainer_ConnectivityNodes)); - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNodeContainer.TopologicalNode"), &assign_ConnectivityNodeContainer_TopologicalNode)); + assign_map.emplace("cim:ConnectivityNodeContainer.ConnectivityNodes", &assign_ConnectivityNodeContainer_ConnectivityNodes); + assign_map.emplace("cim:ConnectivityNodeContainer.TopologicalNode", &assign_ConnectivityNodeContainer_TopologicalNode); } void ConnectivityNodeContainer::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/ConnectivityNodeContainer.hpp b/CGMES_2.4.13_18DEC2013/ConnectivityNodeContainer.hpp index 5ceabeeb0..4ab1c963f 100644 --- a/CGMES_2.4.13_18DEC2013/ConnectivityNodeContainer.hpp +++ b/CGMES_2.4.13_18DEC2013/ConnectivityNodeContainer.hpp @@ -18,9 +18,7 @@ namespace CIMPP class ConnectivityNode; class TopologicalNode; - /* - A base class for all objects that may contain connectivity nodes or topological nodes. - */ + /** \brief A base class for all objects that may contain connectivity nodes or topological nodes. */ class ConnectivityNodeContainer : public PowerSystemResource { public: @@ -28,8 +26,11 @@ namespace CIMPP ConnectivityNodeContainer(); ~ConnectivityNodeContainer() override; - std::list ConnectivityNodes; /* Connectivity nodes which belong to this connectivity node container. Default: 0 */ - std::list TopologicalNode; /* The topological nodes which belong to this connectivity node container. Default: 0 */ + /** \brief Connectivity nodes which belong to this connectivity node container. Default: 0 */ + std::list ConnectivityNodes; + + /** \brief The topological nodes which belong to this connectivity node container. Default: 0 */ + std::list TopologicalNode; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Connector.cpp b/CGMES_2.4.13_18DEC2013/Connector.cpp index ffe426068..207f85553 100644 --- a/CGMES_2.4.13_18DEC2013/Connector.cpp +++ b/CGMES_2.4.13_18DEC2013/Connector.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Connector::Connector() {}; -Connector::~Connector() {}; +Connector::Connector() {} +Connector::~Connector() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ Connector::getPossibleProfilesForAttributes() const return map; } - - - - - const char Connector::debugName[] = "Connector"; const char* Connector::debugString() const { @@ -52,7 +47,7 @@ const char* Connector::debugString() const void Connector::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Connector"), &Connector_factory)); + factory_map.emplace("cim:Connector", &Connector_factory); } void Connector::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/Connector.hpp b/CGMES_2.4.13_18DEC2013/Connector.hpp index c1a8e2267..0c319c834 100644 --- a/CGMES_2.4.13_18DEC2013/Connector.hpp +++ b/CGMES_2.4.13_18DEC2013/Connector.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A conductor, or group of conductors, with negligible impedance, that serve to connect other conducting equipment within a single substation and are modelled with a single logical terminal. - */ + /** \brief A conductor, or group of conductors, with negligible impedance, that serve to connect other conducting equipment within a single substation and are modelled with a single logical terminal. */ class Connector : public ConductingEquipment { public: @@ -26,7 +24,6 @@ namespace CIMPP Connector(); ~Connector() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Control.cpp b/CGMES_2.4.13_18DEC2013/Control.cpp index 7cd6c9fd1..9e90ef372 100644 --- a/CGMES_2.4.13_18DEC2013/Control.cpp +++ b/CGMES_2.4.13_18DEC2013/Control.cpp @@ -9,16 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "PowerSystemResource.hpp" -#include "String.hpp" -#include "Boolean.hpp" -#include "DateTime.hpp" -#include "UnitMultiplier.hpp" -#include "UnitSymbol.hpp" using namespace CIMPP; -Control::Control() : PowerSystemResource(nullptr) {}; -Control::~Control() {}; +Control::Control() : PowerSystemResource(nullptr) {} +Control::~Control() {} static const std::list PossibleProfilesForClass = { @@ -50,93 +45,111 @@ Control::getPossibleProfilesForAttributes() const return map; } +bool assign_PowerSystemResource_Controls(BaseClass*, BaseClass*); +bool assign_Control_PowerSystemResource(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Control* element = dynamic_cast(BaseClass_ptr1); + PowerSystemResource* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PowerSystemResource != element2) + { + element->PowerSystemResource = element2; + return assign_PowerSystemResource_Controls(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_Control_controlType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Control_controlType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Control* element = dynamic_cast(BaseClass_ptr1)) + Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->controlType = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Control_operationInProgress(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Control_operationInProgress(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Control* element = dynamic_cast(BaseClass_ptr1)) + Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->operationInProgress; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Control_timeStamp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Control_timeStamp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Control* element = dynamic_cast(BaseClass_ptr1)) + Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->timeStamp = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Control_unitMultiplier(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Control_unitMultiplier(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Control* element = dynamic_cast(BaseClass_ptr1)) + Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->unitMultiplier; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Control_unitSymbol(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Control_unitSymbol(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Control* element = dynamic_cast(BaseClass_ptr1)) + Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->unitSymbol; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_PowerSystemResource_Controls(BaseClass*, BaseClass*); -bool assign_Control_PowerSystemResource(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_Control_PowerSystemResource(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - Control* element = dynamic_cast(BaseClass_ptr1); - PowerSystemResource* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->PowerSystemResource != element2) + if (element->PowerSystemResource != 0) { - element->PowerSystemResource = element2; - return assign_PowerSystemResource_Controls(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->PowerSystemResource); + return true; } - return true; } return false; } bool get_Control_controlType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Control* element = dynamic_cast(BaseClass_ptr1)) + const Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->controlType; if (!buffer.str().empty()) @@ -150,7 +163,8 @@ bool get_Control_controlType(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_Control_operationInProgress(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Control* element = dynamic_cast(BaseClass_ptr1)) + const Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->operationInProgress; if (!buffer.str().empty()) @@ -164,7 +178,8 @@ bool get_Control_operationInProgress(const BaseClass* BaseClass_ptr1, std::strin bool get_Control_timeStamp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Control* element = dynamic_cast(BaseClass_ptr1)) + const Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->timeStamp; if (!buffer.str().empty()) @@ -176,24 +191,10 @@ bool get_Control_timeStamp(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - -bool get_Control_PowerSystemResource(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const Control* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->PowerSystemResource != 0) - { - BaseClass_list.push_back(element->PowerSystemResource); - return true; - } - } - return false; -} - - bool get_Control_unitMultiplier(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Control* element = dynamic_cast(BaseClass_ptr1)) + const Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->unitMultiplier; if (!buffer.str().empty()) @@ -207,7 +208,8 @@ bool get_Control_unitMultiplier(const BaseClass* BaseClass_ptr1, std::stringstre bool get_Control_unitSymbol(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Control* element = dynamic_cast(BaseClass_ptr1)) + const Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->unitSymbol; if (!buffer.str().empty()) @@ -227,21 +229,21 @@ const char* Control::debugString() const void Control::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Control"), &Control_factory)); + factory_map.emplace("cim:Control", &Control_factory); } void Control::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Control.controlType"), &assign_Control_controlType)); - assign_map.insert(std::make_pair(std::string("cim:Control.operationInProgress"), &assign_Control_operationInProgress)); - assign_map.insert(std::make_pair(std::string("cim:Control.timeStamp"), &assign_Control_timeStamp)); - assign_map.insert(std::make_pair(std::string("cim:Control.unitMultiplier"), &assign_Control_unitMultiplier)); - assign_map.insert(std::make_pair(std::string("cim:Control.unitSymbol"), &assign_Control_unitSymbol)); + assign_map.emplace("cim:Control.controlType", &assign_Control_controlType); + assign_map.emplace("cim:Control.operationInProgress", &assign_Control_operationInProgress); + assign_map.emplace("cim:Control.timeStamp", &assign_Control_timeStamp); + assign_map.emplace("cim:Control.unitMultiplier", &assign_Control_unitMultiplier); + assign_map.emplace("cim:Control.unitSymbol", &assign_Control_unitSymbol); } void Control::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Control.PowerSystemResource"), &assign_Control_PowerSystemResource)); + assign_map.emplace("cim:Control.PowerSystemResource", &assign_Control_PowerSystemResource); } void Control::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/Control.hpp b/CGMES_2.4.13_18DEC2013/Control.hpp index 80884239b..f0072bfae 100644 --- a/CGMES_2.4.13_18DEC2013/Control.hpp +++ b/CGMES_2.4.13_18DEC2013/Control.hpp @@ -22,9 +22,7 @@ namespace CIMPP { class PowerSystemResource; - /* - Control is used for supervisory/device control. It represents control outputs that are used to change the state in a process, e.g. close or open breaker, a set point value or a raise lower command. - */ + /** \brief Control is used for supervisory/device control. It represents control outputs that are used to change the state in a process, e.g. close or open breaker, a set point value or a raise lower command. */ class Control : public IdentifiedObject { public: @@ -32,12 +30,23 @@ namespace CIMPP Control(); ~Control() override; - CIMPP::PowerSystemResource* PowerSystemResource; /* The controller outputs used to actually govern a regulating device, e.g. the magnetization of a synchronous machine or capacitor bank breaker actuator. Default: 0 */ - CIMPP::String controlType; /* Specifies the type of Control, e.g. BreakerOn/Off, GeneratorVoltageSetPoint, TieLineFlow etc. The ControlType.name shall be unique among all specified types and describe the type. Default: '' */ - CIMPP::Boolean operationInProgress; /* Indicates that a client is currently sending control commands that has not completed. Default: false */ - CIMPP::DateTime timeStamp; /* The last time a control output was sent. Default: '' */ - CIMPP::UnitMultiplier unitMultiplier; /* The unit multiplier of the controlled quantity. Default: 0 */ - CIMPP::UnitSymbol unitSymbol; /* The unit of measure of the controlled quantity. Default: 0 */ + /** \brief The controller outputs used to actually govern a regulating device, e.g. the magnetization of a synchronous machine or capacitor bank breaker actuator. Default: 0 */ + CIMPP::PowerSystemResource* PowerSystemResource; + + /** \brief Specifies the type of Control, e.g. BreakerOn/Off, GeneratorVoltageSetPoint, TieLineFlow etc. The ControlType.name shall be unique among all specified types and describe the type. Default: '' */ + CIMPP::String controlType; + + /** \brief Indicates that a client is currently sending control commands that has not completed. Default: false */ + CIMPP::Boolean operationInProgress; + + /** \brief The last time a control output was sent. Default: '' */ + CIMPP::DateTime timeStamp; + + /** \brief The unit multiplier of the controlled quantity. Default: 0 */ + CIMPP::UnitMultiplier unitMultiplier; + + /** \brief The unit of measure of the controlled quantity. Default: 0 */ + CIMPP::UnitSymbol unitSymbol; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ControlArea.cpp b/CGMES_2.4.13_18DEC2013/ControlArea.cpp index 28cf13ad4..21c90385d 100644 --- a/CGMES_2.4.13_18DEC2013/ControlArea.cpp +++ b/CGMES_2.4.13_18DEC2013/ControlArea.cpp @@ -11,14 +11,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "ControlAreaGeneratingUnit.hpp" #include "EnergyArea.hpp" #include "TieFlow.hpp" -#include "ActivePower.hpp" -#include "ActivePower.hpp" -#include "ControlAreaTypeKind.hpp" using namespace CIMPP; -ControlArea::ControlArea() : EnergyArea(nullptr) {}; -ControlArea::~ControlArea() {}; +ControlArea::ControlArea() : EnergyArea(nullptr) {} +ControlArea::~ControlArea() {} static const std::list PossibleProfilesForClass = { @@ -51,47 +48,6 @@ ControlArea::getPossibleProfilesForAttributes() const return map; } - -bool assign_ControlArea_netInterchange(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ControlArea* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->netInterchange; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_ControlArea_pTolerance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ControlArea* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->pTolerance; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_ControlArea_type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ControlArea* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->type; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ControlAreaGeneratingUnit_ControlArea(BaseClass*, BaseClass*); bool assign_ControlArea_ControlAreaGeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -108,6 +64,7 @@ bool assign_ControlArea_ControlAreaGeneratingUnit(BaseClass* BaseClass_ptr1, Bas } return false; } + bool assign_EnergyArea_ControlArea(BaseClass*, BaseClass*); bool assign_ControlArea_EnergyArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -124,6 +81,7 @@ bool assign_ControlArea_EnergyArea(BaseClass* BaseClass_ptr1, BaseClass* BaseCla } return false; } + bool assign_TieFlow_ControlArea(BaseClass*, BaseClass*); bool assign_ControlArea_TieFlow(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -141,38 +99,53 @@ bool assign_ControlArea_TieFlow(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ return false; } -bool get_ControlArea_netInterchange(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_ControlArea_netInterchange(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const ControlArea* element = dynamic_cast(BaseClass_ptr1)) + ControlArea* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->netInterchange; - if (!buffer.str().empty()) + buffer >> element->netInterchange; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_ControlArea_pTolerance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_ControlArea_pTolerance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const ControlArea* element = dynamic_cast(BaseClass_ptr1)) + ControlArea* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->pTolerance; - if (!buffer.str().empty()) + buffer >> element->pTolerance; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + +bool assign_ControlArea_type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + ControlArea* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->type; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } bool get_ControlArea_EnergyArea(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ControlArea* element = dynamic_cast(BaseClass_ptr1)) + const ControlArea* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->EnergyArea != 0) { @@ -184,9 +157,40 @@ bool get_ControlArea_EnergyArea(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->netInterchange; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_ControlArea_pTolerance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ControlArea* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->pTolerance; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_ControlArea_type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ControlArea* element = dynamic_cast(BaseClass_ptr1)) + const ControlArea* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->type; if (!buffer.str().empty()) @@ -206,21 +210,21 @@ const char* ControlArea::debugString() const void ControlArea::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ControlArea"), &ControlArea_factory)); + factory_map.emplace("cim:ControlArea", &ControlArea_factory); } void ControlArea::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ControlArea.netInterchange"), &assign_ControlArea_netInterchange)); - assign_map.insert(std::make_pair(std::string("cim:ControlArea.pTolerance"), &assign_ControlArea_pTolerance)); - assign_map.insert(std::make_pair(std::string("cim:ControlArea.type"), &assign_ControlArea_type)); + assign_map.emplace("cim:ControlArea.netInterchange", &assign_ControlArea_netInterchange); + assign_map.emplace("cim:ControlArea.pTolerance", &assign_ControlArea_pTolerance); + assign_map.emplace("cim:ControlArea.type", &assign_ControlArea_type); } void ControlArea::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ControlArea.ControlAreaGeneratingUnit"), &assign_ControlArea_ControlAreaGeneratingUnit)); - assign_map.insert(std::make_pair(std::string("cim:ControlArea.EnergyArea"), &assign_ControlArea_EnergyArea)); - assign_map.insert(std::make_pair(std::string("cim:ControlArea.TieFlow"), &assign_ControlArea_TieFlow)); + assign_map.emplace("cim:ControlArea.ControlAreaGeneratingUnit", &assign_ControlArea_ControlAreaGeneratingUnit); + assign_map.emplace("cim:ControlArea.EnergyArea", &assign_ControlArea_EnergyArea); + assign_map.emplace("cim:ControlArea.TieFlow", &assign_ControlArea_TieFlow); } void ControlArea::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/ControlArea.hpp b/CGMES_2.4.13_18DEC2013/ControlArea.hpp index 93d512a0e..3231605bd 100644 --- a/CGMES_2.4.13_18DEC2013/ControlArea.hpp +++ b/CGMES_2.4.13_18DEC2013/ControlArea.hpp @@ -21,9 +21,7 @@ namespace CIMPP class EnergyArea; class TieFlow; - /* - A is a grouping of and/or loads and a cutset of tie lines (as ) which may be used for a variety of purposes including automatic generation control, powerflow solution area interchange control specification, and input to load forecasting. Note that any number of overlapping control area specifications can be superimposed on the physical model. - */ + /** \brief A is a grouping of and/or loads and a cutset of tie lines (as ) which may be used for a variety of purposes including automatic generation control, powerflow solution area interchange control specification, and input to load forecasting. Note that any number of overlapping control area specifications can be superimposed on the physical model. */ class ControlArea : public PowerSystemResource { public: @@ -31,12 +29,23 @@ namespace CIMPP ControlArea(); ~ControlArea() override; - std::list ControlAreaGeneratingUnit; /* The generating unit specificaitons for the control area. Default: 0 */ - CIMPP::EnergyArea* EnergyArea; /* The energy area that is forecast from this control area specification. Default: 0 */ - std::list TieFlow; /* The tie flows associated with the control area. Default: 0 */ - CIMPP::ActivePower netInterchange; /* The specified positive net interchange into the control area, i.e. positive sign means flow in to the area. Default: nullptr */ - CIMPP::ActivePower pTolerance; /* Active power net interchange tolerance Default: nullptr */ - CIMPP::ControlAreaTypeKind type; /* The type of control area definition used to determine if this is used for automatic generation control, for planning interchange control, or other purposes. Default: 0 */ + /** \brief The generating unit specificaitons for the control area. Default: 0 */ + std::list ControlAreaGeneratingUnit; + + /** \brief The energy area that is forecast from this control area specification. Default: 0 */ + CIMPP::EnergyArea* EnergyArea; + + /** \brief The tie flows associated with the control area. Default: 0 */ + std::list TieFlow; + + /** \brief The specified positive net interchange into the control area, i.e. positive sign means flow in to the area. Default: nullptr */ + CIMPP::ActivePower netInterchange; + + /** \brief Active power net interchange tolerance Default: nullptr */ + CIMPP::ActivePower pTolerance; + + /** \brief The type of control area definition used to determine if this is used for automatic generation control, for planning interchange control, or other purposes. Default: 0 */ + CIMPP::ControlAreaTypeKind type; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ControlAreaGeneratingUnit.cpp b/CGMES_2.4.13_18DEC2013/ControlAreaGeneratingUnit.cpp index 8512e2641..907553a54 100644 --- a/CGMES_2.4.13_18DEC2013/ControlAreaGeneratingUnit.cpp +++ b/CGMES_2.4.13_18DEC2013/ControlAreaGeneratingUnit.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ControlAreaGeneratingUnit::ControlAreaGeneratingUnit() : ControlArea(nullptr), GeneratingUnit(nullptr) {}; -ControlAreaGeneratingUnit::~ControlAreaGeneratingUnit() {}; +ControlAreaGeneratingUnit::ControlAreaGeneratingUnit() : ControlArea(nullptr), GeneratingUnit(nullptr) {} +ControlAreaGeneratingUnit::~ControlAreaGeneratingUnit() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ ControlAreaGeneratingUnit::getPossibleProfilesForAttributes() const return map; } - - bool assign_ControlArea_ControlAreaGeneratingUnit(BaseClass*, BaseClass*); bool assign_ControlAreaGeneratingUnit_ControlArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_ControlAreaGeneratingUnit_ControlArea(BaseClass* BaseClass_ptr1, Bas } return false; } + bool assign_GeneratingUnit_ControlAreaGeneratingUnit(BaseClass*, BaseClass*); bool assign_ControlAreaGeneratingUnit_GeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_ControlAreaGeneratingUnit_GeneratingUnit(BaseClass* BaseClass_ptr1, return false; } - bool get_ControlAreaGeneratingUnit_ControlArea(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ControlAreaGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const ControlAreaGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ControlArea != 0) { @@ -93,7 +92,8 @@ bool get_ControlAreaGeneratingUnit_ControlArea(const BaseClass* BaseClass_ptr1, bool get_ControlAreaGeneratingUnit_GeneratingUnit(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ControlAreaGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const ControlAreaGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->GeneratingUnit != 0) { @@ -104,7 +104,6 @@ bool get_ControlAreaGeneratingUnit_GeneratingUnit(const BaseClass* BaseClass_ptr return false; } - const char ControlAreaGeneratingUnit::debugName[] = "ControlAreaGeneratingUnit"; const char* ControlAreaGeneratingUnit::debugString() const { @@ -113,7 +112,7 @@ const char* ControlAreaGeneratingUnit::debugString() const void ControlAreaGeneratingUnit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ControlAreaGeneratingUnit"), &ControlAreaGeneratingUnit_factory)); + factory_map.emplace("cim:ControlAreaGeneratingUnit", &ControlAreaGeneratingUnit_factory); } void ControlAreaGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void ControlAreaGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ControlAreaGeneratingUnit.ControlArea"), &assign_ControlAreaGeneratingUnit_ControlArea)); - assign_map.insert(std::make_pair(std::string("cim:ControlAreaGeneratingUnit.GeneratingUnit"), &assign_ControlAreaGeneratingUnit_GeneratingUnit)); + assign_map.emplace("cim:ControlAreaGeneratingUnit.ControlArea", &assign_ControlAreaGeneratingUnit_ControlArea); + assign_map.emplace("cim:ControlAreaGeneratingUnit.GeneratingUnit", &assign_ControlAreaGeneratingUnit_GeneratingUnit); } void ControlAreaGeneratingUnit::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/ControlAreaGeneratingUnit.hpp b/CGMES_2.4.13_18DEC2013/ControlAreaGeneratingUnit.hpp index 6f41452fa..5dea42c34 100644 --- a/CGMES_2.4.13_18DEC2013/ControlAreaGeneratingUnit.hpp +++ b/CGMES_2.4.13_18DEC2013/ControlAreaGeneratingUnit.hpp @@ -18,9 +18,7 @@ namespace CIMPP class ControlArea; class GeneratingUnit; - /* - A control area generating unit. This class is needed so that alternate control area definitions may include the same generating unit. Note only one instance within a control area should reference a specific generating unit. - */ + /** \brief A control area generating unit. This class is needed so that alternate control area definitions may include the same generating unit. Note only one instance within a control area should reference a specific generating unit. */ class ControlAreaGeneratingUnit : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP ControlAreaGeneratingUnit(); ~ControlAreaGeneratingUnit() override; - CIMPP::ControlArea* ControlArea; /* The parent control area for the generating unit specifications. Default: 0 */ - CIMPP::GeneratingUnit* GeneratingUnit; /* The generating unit specified for this control area. Note that a control area should include a GeneratingUnit only once. Default: 0 */ + /** \brief The parent control area for the generating unit specifications. Default: 0 */ + CIMPP::ControlArea* ControlArea; + + /** \brief The generating unit specified for this control area. Note that a control area should include a GeneratingUnit only once. Default: 0 */ + CIMPP::GeneratingUnit* GeneratingUnit; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ControlAreaTypeKind.cpp b/CGMES_2.4.13_18DEC2013/ControlAreaTypeKind.cpp index 48f6c0cb5..21a7b1dec 100644 --- a/CGMES_2.4.13_18DEC2013/ControlAreaTypeKind.cpp +++ b/CGMES_2.4.13_18DEC2013/ControlAreaTypeKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "ControlAreaTypeKind") + if (EnumSymbol.substr(0, pos) != "ControlAreaTypeKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "AGC") + if (EnumSymbol == "AGC") { rop = ControlAreaTypeKind::AGC; return lop; } - if(EnumSymbol == "Forecast") + if (EnumSymbol == "Forecast") { rop = ControlAreaTypeKind::Forecast; return lop; } - if(EnumSymbol == "Interchange") + if (EnumSymbol == "Interchange") { rop = ControlAreaTypeKind::Interchange; return lop; diff --git a/CGMES_2.4.13_18DEC2013/ControlAreaTypeKind.hpp b/CGMES_2.4.13_18DEC2013/ControlAreaTypeKind.hpp index 025df1d5c..4597eedd8 100644 --- a/CGMES_2.4.13_18DEC2013/ControlAreaTypeKind.hpp +++ b/CGMES_2.4.13_18DEC2013/ControlAreaTypeKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The type of control area. - */ + /** \brief The type of control area. */ class ControlAreaTypeKind { public: enum ControlAreaTypeKind_ENUM { - /** - * Used for automatic generation control. - */ + /** Used for automatic generation control. */ AGC, - /** - * Used for load forecast. - */ + /** Used for load forecast. */ Forecast, - /** - * Used for interchange specification or control. - */ + /** Used for interchange specification or control. */ Interchange, }; diff --git a/CGMES_2.4.13_18DEC2013/CoordinateSystem.cpp b/CGMES_2.4.13_18DEC2013/CoordinateSystem.cpp index 223b2b2c1..56ef9a8b4 100644 --- a/CGMES_2.4.13_18DEC2013/CoordinateSystem.cpp +++ b/CGMES_2.4.13_18DEC2013/CoordinateSystem.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "Location.hpp" -#include "String.hpp" using namespace CIMPP; -CoordinateSystem::CoordinateSystem() {}; -CoordinateSystem::~CoordinateSystem() {}; +CoordinateSystem::CoordinateSystem() {} +CoordinateSystem::~CoordinateSystem() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ CoordinateSystem::getPossibleProfilesForAttributes() const return map; } - -bool assign_CoordinateSystem_crsUrn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (CoordinateSystem* element = dynamic_cast(BaseClass_ptr1)) - { - element->crsUrn = buffer.str(); - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_Location_CoordinateSystem(BaseClass*, BaseClass*); bool assign_CoordinateSystem_Location(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_CoordinateSystem_Location(BaseClass* BaseClass_ptr1, BaseClass* Base return false; } +bool assign_CoordinateSystem_crsUrn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + CoordinateSystem* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + element->crsUrn = buffer.str(); + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_CoordinateSystem_crsUrn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CoordinateSystem* element = dynamic_cast(BaseClass_ptr1)) + const CoordinateSystem* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->crsUrn; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_CoordinateSystem_crsUrn(const BaseClass* BaseClass_ptr1, std::stringstr return false; } - - const char CoordinateSystem::debugName[] = "CoordinateSystem"; const char* CoordinateSystem::debugString() const { @@ -98,17 +96,17 @@ const char* CoordinateSystem::debugString() const void CoordinateSystem::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:CoordinateSystem"), &CoordinateSystem_factory)); + factory_map.emplace("cim:CoordinateSystem", &CoordinateSystem_factory); } void CoordinateSystem::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:CoordinateSystem.crsUrn"), &assign_CoordinateSystem_crsUrn)); + assign_map.emplace("cim:CoordinateSystem.crsUrn", &assign_CoordinateSystem_crsUrn); } void CoordinateSystem::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:CoordinateSystem.Location"), &assign_CoordinateSystem_Location)); + assign_map.emplace("cim:CoordinateSystem.Location", &assign_CoordinateSystem_Location); } void CoordinateSystem::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/CoordinateSystem.hpp b/CGMES_2.4.13_18DEC2013/CoordinateSystem.hpp index 012c88433..46172486a 100644 --- a/CGMES_2.4.13_18DEC2013/CoordinateSystem.hpp +++ b/CGMES_2.4.13_18DEC2013/CoordinateSystem.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class Location; - /* - Coordinate reference system. - */ + /** \brief Coordinate reference system. */ class CoordinateSystem : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP CoordinateSystem(); ~CoordinateSystem() override; - std::list Location; /* All locations described with position points in this coordinate system. Default: 0 */ - CIMPP::String crsUrn; /* A Uniform Resource Name (URN) for the coordinate reference system (crs) used to define `Location.PositionPoints`. An example would be the European Petroleum Survey Group (EPSG) code for a coordinate reference system, defined in URN under the Open Geospatial Consortium (OGC) namespace as: urn:ogc:def:uom:EPSG::XXXX, where XXXX is an EPSG code (a full list of codes can be found at the EPSG Registry web site http://www.epsg-registry.org/). To define the coordinate system as being WGS84 (latitude, longitude) using an EPSG OGC, this attribute would be urn:ogc:def:uom:EPSG::4236. A profile should limit this code to a set of allowed URNs agreed to by all sending and receiving parties. Default: '' */ + /** \brief All locations described with position points in this coordinate system. Default: 0 */ + std::list Location; + + /** \brief A Uniform Resource Name (URN) for the coordinate reference system (crs) used to define `Location.PositionPoints`. An example would be the European Petroleum Survey Group (EPSG) code for a coordinate reference system, defined in URN under the Open Geospatial Consortium (OGC) namespace as: urn:ogc:def:uom:EPSG::XXXX, where XXXX is an EPSG code (a full list of codes can be found at the EPSG Registry web site http://www.epsg-registry.org/). To define the coordinate system as being WGS84 (latitude, longitude) using an EPSG OGC, this attribute would be urn:ogc:def:uom:EPSG::4236. A profile should limit this code to a set of allowed URNs agreed to by all sending and receiving parties. Default: '' */ + CIMPP::String crsUrn; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/CsConverter.cpp b/CGMES_2.4.13_18DEC2013/CsConverter.cpp index 6a9835a20..32000a24e 100644 --- a/CGMES_2.4.13_18DEC2013/CsConverter.cpp +++ b/CGMES_2.4.13_18DEC2013/CsConverter.cpp @@ -8,25 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "AngleDegrees.hpp" -#include "AngleDegrees.hpp" -#include "AngleDegrees.hpp" -#include "AngleDegrees.hpp" -#include "CurrentFlow.hpp" -#include "AngleDegrees.hpp" -#include "AngleDegrees.hpp" -#include "CurrentFlow.hpp" -#include "CsOperatingModeKind.hpp" -#include "CsPpccControlKind.hpp" -#include "CurrentFlow.hpp" -#include "AngleDegrees.hpp" -#include "AngleDegrees.hpp" -#include "CurrentFlow.hpp" using namespace CIMPP; -CsConverter::CsConverter() {}; -CsConverter::~CsConverter() {}; +CsConverter::CsConverter() {} +CsConverter::~CsConverter() {} static const std::list PossibleProfilesForClass = { @@ -68,194 +54,206 @@ CsConverter::getPossibleProfilesForAttributes() const return map; } - -bool assign_CsConverter_alpha(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_alpha(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->alpha; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_gamma(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_gamma(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gamma; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_maxAlpha(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_maxAlpha(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxAlpha; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_maxGamma(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_maxGamma(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxGamma; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_maxIdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_maxIdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxIdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_minAlpha(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_minAlpha(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minAlpha; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_minGamma(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_minGamma(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minGamma; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_minIdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_minIdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minIdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_operatingMode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_operatingMode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->operatingMode; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_pPccControl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_pPccControl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pPccControl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_ratedIdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_ratedIdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedIdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_targetAlpha(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_targetAlpha(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->targetAlpha; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_targetGamma(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_targetGamma(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->targetGamma; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_targetIdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_targetIdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->targetIdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_CsConverter_alpha(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->alpha; if (!buffer.str().empty()) @@ -269,7 +267,8 @@ bool get_CsConverter_alpha(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_CsConverter_gamma(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gamma; if (!buffer.str().empty()) @@ -283,7 +282,8 @@ bool get_CsConverter_gamma(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_CsConverter_maxAlpha(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxAlpha; if (!buffer.str().empty()) @@ -297,7 +297,8 @@ bool get_CsConverter_maxAlpha(const BaseClass* BaseClass_ptr1, std::stringstream bool get_CsConverter_maxGamma(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxGamma; if (!buffer.str().empty()) @@ -311,7 +312,8 @@ bool get_CsConverter_maxGamma(const BaseClass* BaseClass_ptr1, std::stringstream bool get_CsConverter_maxIdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxIdc; if (!buffer.str().empty()) @@ -325,7 +327,8 @@ bool get_CsConverter_maxIdc(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_CsConverter_minAlpha(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minAlpha; if (!buffer.str().empty()) @@ -339,7 +342,8 @@ bool get_CsConverter_minAlpha(const BaseClass* BaseClass_ptr1, std::stringstream bool get_CsConverter_minGamma(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minGamma; if (!buffer.str().empty()) @@ -353,7 +357,8 @@ bool get_CsConverter_minGamma(const BaseClass* BaseClass_ptr1, std::stringstream bool get_CsConverter_minIdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minIdc; if (!buffer.str().empty()) @@ -365,11 +370,12 @@ bool get_CsConverter_minIdc(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } -bool get_CsConverter_ratedIdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_CsConverter_operatingMode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->ratedIdc; + buffer << element->operatingMode; if (!buffer.str().empty()) { return true; @@ -379,11 +385,12 @@ bool get_CsConverter_ratedIdc(const BaseClass* BaseClass_ptr1, std::stringstream return false; } -bool get_CsConverter_targetAlpha(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_CsConverter_pPccControl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->targetAlpha; + buffer << element->pPccControl; if (!buffer.str().empty()) { return true; @@ -393,11 +400,12 @@ bool get_CsConverter_targetAlpha(const BaseClass* BaseClass_ptr1, std::stringstr return false; } -bool get_CsConverter_targetGamma(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_CsConverter_ratedIdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->targetGamma; + buffer << element->ratedIdc; if (!buffer.str().empty()) { return true; @@ -407,11 +415,12 @@ bool get_CsConverter_targetGamma(const BaseClass* BaseClass_ptr1, std::stringstr return false; } -bool get_CsConverter_targetIdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_CsConverter_targetAlpha(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->targetIdc; + buffer << element->targetAlpha; if (!buffer.str().empty()) { return true; @@ -421,13 +430,12 @@ bool get_CsConverter_targetIdc(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } - - -bool get_CsConverter_operatingMode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_CsConverter_targetGamma(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->operatingMode; + buffer << element->targetGamma; if (!buffer.str().empty()) { return true; @@ -437,11 +445,12 @@ bool get_CsConverter_operatingMode(const BaseClass* BaseClass_ptr1, std::strings return false; } -bool get_CsConverter_pPccControl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_CsConverter_targetIdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->pPccControl; + buffer << element->targetIdc; if (!buffer.str().empty()) { return true; @@ -459,25 +468,25 @@ const char* CsConverter::debugString() const void CsConverter::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:CsConverter"), &CsConverter_factory)); + factory_map.emplace("cim:CsConverter", &CsConverter_factory); } void CsConverter::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:CsConverter.alpha"), &assign_CsConverter_alpha)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.gamma"), &assign_CsConverter_gamma)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.maxAlpha"), &assign_CsConverter_maxAlpha)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.maxGamma"), &assign_CsConverter_maxGamma)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.maxIdc"), &assign_CsConverter_maxIdc)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.minAlpha"), &assign_CsConverter_minAlpha)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.minGamma"), &assign_CsConverter_minGamma)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.minIdc"), &assign_CsConverter_minIdc)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.operatingMode"), &assign_CsConverter_operatingMode)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.pPccControl"), &assign_CsConverter_pPccControl)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.ratedIdc"), &assign_CsConverter_ratedIdc)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.targetAlpha"), &assign_CsConverter_targetAlpha)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.targetGamma"), &assign_CsConverter_targetGamma)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.targetIdc"), &assign_CsConverter_targetIdc)); + assign_map.emplace("cim:CsConverter.alpha", &assign_CsConverter_alpha); + assign_map.emplace("cim:CsConverter.gamma", &assign_CsConverter_gamma); + assign_map.emplace("cim:CsConverter.maxAlpha", &assign_CsConverter_maxAlpha); + assign_map.emplace("cim:CsConverter.maxGamma", &assign_CsConverter_maxGamma); + assign_map.emplace("cim:CsConverter.maxIdc", &assign_CsConverter_maxIdc); + assign_map.emplace("cim:CsConverter.minAlpha", &assign_CsConverter_minAlpha); + assign_map.emplace("cim:CsConverter.minGamma", &assign_CsConverter_minGamma); + assign_map.emplace("cim:CsConverter.minIdc", &assign_CsConverter_minIdc); + assign_map.emplace("cim:CsConverter.operatingMode", &assign_CsConverter_operatingMode); + assign_map.emplace("cim:CsConverter.pPccControl", &assign_CsConverter_pPccControl); + assign_map.emplace("cim:CsConverter.ratedIdc", &assign_CsConverter_ratedIdc); + assign_map.emplace("cim:CsConverter.targetAlpha", &assign_CsConverter_targetAlpha); + assign_map.emplace("cim:CsConverter.targetGamma", &assign_CsConverter_targetGamma); + assign_map.emplace("cim:CsConverter.targetIdc", &assign_CsConverter_targetIdc); } void CsConverter::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/CsConverter.hpp b/CGMES_2.4.13_18DEC2013/CsConverter.hpp index 0ab9dd817..4d14a5460 100644 --- a/CGMES_2.4.13_18DEC2013/CsConverter.hpp +++ b/CGMES_2.4.13_18DEC2013/CsConverter.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - DC side of the current source converter (CSC). - */ + /** \brief DC side of the current source converter (CSC). */ class CsConverter : public ACDCConverter { public: @@ -30,20 +28,47 @@ namespace CIMPP CsConverter(); ~CsConverter() override; - CIMPP::AngleDegrees alpha; /* Firing angle, typical value between 10 and 18 degrees for a rectifier. CSC state variable, result from power flow. Default: nullptr */ - CIMPP::AngleDegrees gamma; /* Extinction angle. CSC state variable, result from power flow. Default: nullptr */ - CIMPP::AngleDegrees maxAlpha; /* Maximum firing angle. CSC configuration data used in power flow. Default: nullptr */ - CIMPP::AngleDegrees maxGamma; /* Maximum extinction angle. CSC configuration data used in power flow. Default: nullptr */ - CIMPP::CurrentFlow maxIdc; /* The maximum direct current (Id) on the DC side at which the converter should operate. Converter configuration data use in power flow. Default: nullptr */ - CIMPP::AngleDegrees minAlpha; /* Minimum firing angle. CSC configuration data used in power flow. Default: nullptr */ - CIMPP::AngleDegrees minGamma; /* Minimum extinction angle. CSC configuration data used in power flow. Default: nullptr */ - CIMPP::CurrentFlow minIdc; /* The minimum direct current (Id) on the DC side at which the converter should operate. CSC configuration data used in power flow. Default: nullptr */ - CIMPP::CsOperatingModeKind operatingMode; /* Indicates whether the DC pole is operating as an inverter or as a rectifier. CSC control variable used in power flow. Default: 0 */ - CIMPP::CsPpccControlKind pPccControl; /* Default: 0 */ - CIMPP::CurrentFlow ratedIdc; /* Rated converter DC current, also called IdN. Converter configuration data used in power flow. Default: nullptr */ - CIMPP::AngleDegrees targetAlpha; /* Target firing angle. CSC control variable used in power flow. Default: nullptr */ - CIMPP::AngleDegrees targetGamma; /* Target extinction angle. CSC control variable used in power flow. Default: nullptr */ - CIMPP::CurrentFlow targetIdc; /* DC current target value. CSC control variable used in power flow. Default: nullptr */ + /** \brief Firing angle, typical value between 10 and 18 degrees for a rectifier. CSC state variable, result from power flow. Default: nullptr */ + CIMPP::AngleDegrees alpha; + + /** \brief Extinction angle. CSC state variable, result from power flow. Default: nullptr */ + CIMPP::AngleDegrees gamma; + + /** \brief Maximum firing angle. CSC configuration data used in power flow. Default: nullptr */ + CIMPP::AngleDegrees maxAlpha; + + /** \brief Maximum extinction angle. CSC configuration data used in power flow. Default: nullptr */ + CIMPP::AngleDegrees maxGamma; + + /** \brief The maximum direct current (Id) on the DC side at which the converter should operate. Converter configuration data use in power flow. Default: nullptr */ + CIMPP::CurrentFlow maxIdc; + + /** \brief Minimum firing angle. CSC configuration data used in power flow. Default: nullptr */ + CIMPP::AngleDegrees minAlpha; + + /** \brief Minimum extinction angle. CSC configuration data used in power flow. Default: nullptr */ + CIMPP::AngleDegrees minGamma; + + /** \brief The minimum direct current (Id) on the DC side at which the converter should operate. CSC configuration data used in power flow. Default: nullptr */ + CIMPP::CurrentFlow minIdc; + + /** \brief Indicates whether the DC pole is operating as an inverter or as a rectifier. CSC control variable used in power flow. Default: 0 */ + CIMPP::CsOperatingModeKind operatingMode; + + /** \brief Default: 0 */ + CIMPP::CsPpccControlKind pPccControl; + + /** \brief Rated converter DC current, also called IdN. Converter configuration data used in power flow. Default: nullptr */ + CIMPP::CurrentFlow ratedIdc; + + /** \brief Target firing angle. CSC control variable used in power flow. Default: nullptr */ + CIMPP::AngleDegrees targetAlpha; + + /** \brief Target extinction angle. CSC control variable used in power flow. Default: nullptr */ + CIMPP::AngleDegrees targetGamma; + + /** \brief DC current target value. CSC control variable used in power flow. Default: nullptr */ + CIMPP::CurrentFlow targetIdc; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/CsOperatingModeKind.cpp b/CGMES_2.4.13_18DEC2013/CsOperatingModeKind.cpp index 61074c399..3f119efe8 100644 --- a/CGMES_2.4.13_18DEC2013/CsOperatingModeKind.cpp +++ b/CGMES_2.4.13_18DEC2013/CsOperatingModeKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "CsOperatingModeKind") + if (EnumSymbol.substr(0, pos) != "CsOperatingModeKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,12 +50,12 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "inverter") + if (EnumSymbol == "inverter") { rop = CsOperatingModeKind::inverter; return lop; } - if(EnumSymbol == "rectifier") + if (EnumSymbol == "rectifier") { rop = CsOperatingModeKind::rectifier; return lop; diff --git a/CGMES_2.4.13_18DEC2013/CsOperatingModeKind.hpp b/CGMES_2.4.13_18DEC2013/CsOperatingModeKind.hpp index eb2af30bf..dead78850 100644 --- a/CGMES_2.4.13_18DEC2013/CsOperatingModeKind.hpp +++ b/CGMES_2.4.13_18DEC2013/CsOperatingModeKind.hpp @@ -9,21 +9,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Operating mode for HVDC line operating as Current Source Converter. - */ + /** \brief Operating mode for HVDC line operating as Current Source Converter. */ class CsOperatingModeKind { public: enum CsOperatingModeKind_ENUM { - /** - * Operating as inverter - */ + /** Operating as inverter */ inverter, - /** - * Operating as rectifier. - */ + /** Operating as rectifier. */ rectifier, }; diff --git a/CGMES_2.4.13_18DEC2013/CsPpccControlKind.cpp b/CGMES_2.4.13_18DEC2013/CsPpccControlKind.cpp index e4e9aa9b2..ff79e272f 100644 --- a/CGMES_2.4.13_18DEC2013/CsPpccControlKind.cpp +++ b/CGMES_2.4.13_18DEC2013/CsPpccControlKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "CsPpccControlKind") + if (EnumSymbol.substr(0, pos) != "CsPpccControlKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "activePower") + if (EnumSymbol == "activePower") { rop = CsPpccControlKind::activePower; return lop; } - if(EnumSymbol == "dcVoltage") + if (EnumSymbol == "dcVoltage") { rop = CsPpccControlKind::dcVoltage; return lop; } - if(EnumSymbol == "dcCurrent") + if (EnumSymbol == "dcCurrent") { rop = CsPpccControlKind::dcCurrent; return lop; diff --git a/CGMES_2.4.13_18DEC2013/CsPpccControlKind.hpp b/CGMES_2.4.13_18DEC2013/CsPpccControlKind.hpp index 3c17709fb..1c5fdfdbf 100644 --- a/CGMES_2.4.13_18DEC2013/CsPpccControlKind.hpp +++ b/CGMES_2.4.13_18DEC2013/CsPpccControlKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Active power control modes for HVDC line operating as Current Source Converter. - */ + /** \brief Active power control modes for HVDC line operating as Current Source Converter. */ class CsPpccControlKind { public: enum CsPpccControlKind_ENUM { - /** - * Active power control at AC side. - */ + /** Active power control at AC side. */ activePower, - /** - * DC voltage control. - */ + /** DC voltage control. */ dcVoltage, - /** - * DC current control - */ + /** DC current control */ dcCurrent, }; diff --git a/CGMES_2.4.13_18DEC2013/Currency.cpp b/CGMES_2.4.13_18DEC2013/Currency.cpp index 0a4518071..4c73e10ce 100644 --- a/CGMES_2.4.13_18DEC2013/Currency.cpp +++ b/CGMES_2.4.13_18DEC2013/Currency.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "Currency") + if (EnumSymbol.substr(0, pos) != "Currency") { lop.setstate(std::ios::failbit); return lop; @@ -50,72 +50,72 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "USD") + if (EnumSymbol == "USD") { rop = Currency::USD; return lop; } - if(EnumSymbol == "EUR") + if (EnumSymbol == "EUR") { rop = Currency::EUR; return lop; } - if(EnumSymbol == "AUD") + if (EnumSymbol == "AUD") { rop = Currency::AUD; return lop; } - if(EnumSymbol == "CAD") + if (EnumSymbol == "CAD") { rop = Currency::CAD; return lop; } - if(EnumSymbol == "CHF") + if (EnumSymbol == "CHF") { rop = Currency::CHF; return lop; } - if(EnumSymbol == "CNY") + if (EnumSymbol == "CNY") { rop = Currency::CNY; return lop; } - if(EnumSymbol == "DKK") + if (EnumSymbol == "DKK") { rop = Currency::DKK; return lop; } - if(EnumSymbol == "GBP") + if (EnumSymbol == "GBP") { rop = Currency::GBP; return lop; } - if(EnumSymbol == "JPY") + if (EnumSymbol == "JPY") { rop = Currency::JPY; return lop; } - if(EnumSymbol == "NOK") + if (EnumSymbol == "NOK") { rop = Currency::NOK; return lop; } - if(EnumSymbol == "RUR") + if (EnumSymbol == "RUR") { rop = Currency::RUR; return lop; } - if(EnumSymbol == "SEK") + if (EnumSymbol == "SEK") { rop = Currency::SEK; return lop; } - if(EnumSymbol == "INR") + if (EnumSymbol == "INR") { rop = Currency::INR; return lop; } - if(EnumSymbol == "other") + if (EnumSymbol == "other") { rop = Currency::other; return lop; diff --git a/CGMES_2.4.13_18DEC2013/Currency.hpp b/CGMES_2.4.13_18DEC2013/Currency.hpp index f4de85751..d84836b48 100644 --- a/CGMES_2.4.13_18DEC2013/Currency.hpp +++ b/CGMES_2.4.13_18DEC2013/Currency.hpp @@ -9,69 +9,39 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Monetary currencies. Apologies for this list not being exhaustive. - */ + /** \brief Monetary currencies. Apologies for this list not being exhaustive. */ class Currency { public: enum Currency_ENUM { - /** - * US dollar - */ + /** US dollar */ USD, - /** - * European euro - */ + /** European euro */ EUR, - /** - * Australian dollar - */ + /** Australian dollar */ AUD, - /** - * Canadian dollar - */ + /** Canadian dollar */ CAD, - /** - * Swiss francs - */ + /** Swiss francs */ CHF, - /** - * Chinese yuan renminbi - */ + /** Chinese yuan renminbi */ CNY, - /** - * Danish crown - */ + /** Danish crown */ DKK, - /** - * British pound - */ + /** British pound */ GBP, - /** - * Japanese yen - */ + /** Japanese yen */ JPY, - /** - * Norwegian crown - */ + /** Norwegian crown */ NOK, - /** - * Russian ruble - */ + /** Russian ruble */ RUR, - /** - * Swedish crown - */ + /** Swedish crown */ SEK, - /** - * India rupees - */ + /** India rupees */ INR, - /** - * Another type of currency. - */ + /** Another type of currency. */ other, }; diff --git a/CGMES_2.4.13_18DEC2013/CurrentFlow.hpp b/CGMES_2.4.13_18DEC2013/CurrentFlow.hpp index 0f38f0f07..a606a845c 100644 --- a/CGMES_2.4.13_18DEC2013/CurrentFlow.hpp +++ b/CGMES_2.4.13_18DEC2013/CurrentFlow.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Electrical current with sign convention: positive flow is out of the conducting equipment into the connectivity node. Can be both AC and DC. - */ + /** \brief Electrical current with sign convention: positive flow is out of the conducting equipment into the connectivity node. Can be both AC and DC. */ class CurrentFlow { public: diff --git a/CGMES_2.4.13_18DEC2013/CurrentLimit.cpp b/CGMES_2.4.13_18DEC2013/CurrentLimit.cpp index b7fb76fd4..6b79e39d4 100644 --- a/CGMES_2.4.13_18DEC2013/CurrentLimit.cpp +++ b/CGMES_2.4.13_18DEC2013/CurrentLimit.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "CurrentFlow.hpp" using namespace CIMPP; -CurrentLimit::CurrentLimit() {}; -CurrentLimit::~CurrentLimit() {}; +CurrentLimit::CurrentLimit() {} +CurrentLimit::~CurrentLimit() {} static const std::list PossibleProfilesForClass = { @@ -40,25 +39,24 @@ CurrentLimit::getPossibleProfilesForAttributes() const return map; } - -bool assign_CurrentLimit_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CurrentLimit_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CurrentLimit* element = dynamic_cast(BaseClass_ptr1)) + CurrentLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->value; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_CurrentLimit_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CurrentLimit* element = dynamic_cast(BaseClass_ptr1)) + const CurrentLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value; if (!buffer.str().empty()) @@ -70,8 +68,6 @@ bool get_CurrentLimit_value(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char CurrentLimit::debugName[] = "CurrentLimit"; const char* CurrentLimit::debugString() const { @@ -80,12 +76,12 @@ const char* CurrentLimit::debugString() const void CurrentLimit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:CurrentLimit"), &CurrentLimit_factory)); + factory_map.emplace("cim:CurrentLimit", &CurrentLimit_factory); } void CurrentLimit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:CurrentLimit.value"), &assign_CurrentLimit_value)); + assign_map.emplace("cim:CurrentLimit.value", &assign_CurrentLimit_value); } void CurrentLimit::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/CurrentLimit.hpp b/CGMES_2.4.13_18DEC2013/CurrentLimit.hpp index dee18c3ef..b670b6c54 100644 --- a/CGMES_2.4.13_18DEC2013/CurrentLimit.hpp +++ b/CGMES_2.4.13_18DEC2013/CurrentLimit.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Operational limit on current. - */ + /** \brief Operational limit on current. */ class CurrentLimit : public OperationalLimit { public: @@ -27,7 +25,8 @@ namespace CIMPP CurrentLimit(); ~CurrentLimit() override; - CIMPP::CurrentFlow value; /* Limit on current flow. Default: nullptr */ + /** \brief Limit on current flow. Default: nullptr */ + CIMPP::CurrentFlow value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Curve.cpp b/CGMES_2.4.13_18DEC2013/Curve.cpp index 61495d0fa..776e5c46d 100644 --- a/CGMES_2.4.13_18DEC2013/Curve.cpp +++ b/CGMES_2.4.13_18DEC2013/Curve.cpp @@ -9,15 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "CurveData.hpp" -#include "CurveStyle.hpp" -#include "UnitSymbol.hpp" -#include "UnitSymbol.hpp" -#include "UnitSymbol.hpp" using namespace CIMPP; -Curve::Curve() {}; -Curve::~Curve() {}; +Curve::Curve() {} +Curve::~Curve() {} static const std::list PossibleProfilesForClass = { @@ -48,82 +44,84 @@ Curve::getPossibleProfilesForAttributes() const return map; } - -bool assign_Curve_curveStyle(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CurveData_Curve(BaseClass*, BaseClass*); +bool assign_Curve_CurveDatas(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (Curve* element = dynamic_cast(BaseClass_ptr1)) + Curve* element = dynamic_cast(BaseClass_ptr1); + CurveData* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->curveStyle; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->CurveDatas.begin(), element->CurveDatas.end(), element2) == element->CurveDatas.end()) + { + element->CurveDatas.push_back(element2); + return assign_CurveData_Curve(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_Curve_xUnit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Curve_curveStyle(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Curve* element = dynamic_cast(BaseClass_ptr1)) + Curve* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->xUnit; - if (buffer.fail()) - return false; - else + buffer >> element->curveStyle; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Curve_y1Unit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Curve_xUnit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Curve* element = dynamic_cast(BaseClass_ptr1)) + Curve* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->y1Unit; - if (buffer.fail()) - return false; - else + buffer >> element->xUnit; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Curve_y2Unit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Curve_y1Unit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Curve* element = dynamic_cast(BaseClass_ptr1)) + Curve* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->y2Unit; - if (buffer.fail()) - return false; - else + buffer >> element->y1Unit; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_CurveData_Curve(BaseClass*, BaseClass*); -bool assign_Curve_CurveDatas(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_Curve_y2Unit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { Curve* element = dynamic_cast(BaseClass_ptr1); - CurveData* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->CurveDatas.begin(), element->CurveDatas.end(), element2) == element->CurveDatas.end()) + buffer >> element->y2Unit; + if (!buffer.fail()) { - element->CurveDatas.push_back(element2); - return assign_CurveData_Curve(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } - bool get_Curve_curveStyle(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Curve* element = dynamic_cast(BaseClass_ptr1)) + const Curve* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->curveStyle; if (!buffer.str().empty()) @@ -137,7 +135,8 @@ bool get_Curve_curveStyle(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_Curve_xUnit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Curve* element = dynamic_cast(BaseClass_ptr1)) + const Curve* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xUnit; if (!buffer.str().empty()) @@ -151,7 +150,8 @@ bool get_Curve_xUnit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Curve_y1Unit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Curve* element = dynamic_cast(BaseClass_ptr1)) + const Curve* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->y1Unit; if (!buffer.str().empty()) @@ -165,7 +165,8 @@ bool get_Curve_y1Unit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_Curve_y2Unit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Curve* element = dynamic_cast(BaseClass_ptr1)) + const Curve* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->y2Unit; if (!buffer.str().empty()) @@ -185,20 +186,20 @@ const char* Curve::debugString() const void Curve::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Curve"), &Curve_factory)); + factory_map.emplace("cim:Curve", &Curve_factory); } void Curve::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Curve.curveStyle"), &assign_Curve_curveStyle)); - assign_map.insert(std::make_pair(std::string("cim:Curve.xUnit"), &assign_Curve_xUnit)); - assign_map.insert(std::make_pair(std::string("cim:Curve.y1Unit"), &assign_Curve_y1Unit)); - assign_map.insert(std::make_pair(std::string("cim:Curve.y2Unit"), &assign_Curve_y2Unit)); + assign_map.emplace("cim:Curve.curveStyle", &assign_Curve_curveStyle); + assign_map.emplace("cim:Curve.xUnit", &assign_Curve_xUnit); + assign_map.emplace("cim:Curve.y1Unit", &assign_Curve_y1Unit); + assign_map.emplace("cim:Curve.y2Unit", &assign_Curve_y2Unit); } void Curve::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Curve.CurveDatas"), &assign_Curve_CurveDatas)); + assign_map.emplace("cim:Curve.CurveDatas", &assign_Curve_CurveDatas); } void Curve::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/Curve.hpp b/CGMES_2.4.13_18DEC2013/Curve.hpp index bba8938f8..bb10f8a2b 100644 --- a/CGMES_2.4.13_18DEC2013/Curve.hpp +++ b/CGMES_2.4.13_18DEC2013/Curve.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class CurveData; - /* - A multi-purpose curve or functional relationship between an independent variable (X-axis) and dependent (Y-axis) variables. - */ + /** \brief A multi-purpose curve or functional relationship between an independent variable (X-axis) and dependent (Y-axis) variables. */ class Curve : public IdentifiedObject { public: @@ -29,11 +27,20 @@ namespace CIMPP Curve(); ~Curve() override; - std::list CurveDatas; /* The curve of this curve data point. Default: 0 */ - CIMPP::CurveStyle curveStyle; /* The style or shape of the curve. Default: 0 */ - CIMPP::UnitSymbol xUnit; /* The X-axis units of measure. Default: 0 */ - CIMPP::UnitSymbol y1Unit; /* The Y1-axis units of measure. Default: 0 */ - CIMPP::UnitSymbol y2Unit; /* The Y2-axis units of measure. Default: 0 */ + /** \brief The curve of this curve data point. Default: 0 */ + std::list CurveDatas; + + /** \brief The style or shape of the curve. Default: 0 */ + CIMPP::CurveStyle curveStyle; + + /** \brief The X-axis units of measure. Default: 0 */ + CIMPP::UnitSymbol xUnit; + + /** \brief The Y1-axis units of measure. Default: 0 */ + CIMPP::UnitSymbol y1Unit; + + /** \brief The Y2-axis units of measure. Default: 0 */ + CIMPP::UnitSymbol y2Unit; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/CurveData.cpp b/CGMES_2.4.13_18DEC2013/CurveData.cpp index eef59d94a..f2d46bf44 100644 --- a/CGMES_2.4.13_18DEC2013/CurveData.cpp +++ b/CGMES_2.4.13_18DEC2013/CurveData.cpp @@ -9,14 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "Curve.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -CurveData::CurveData() : Curve(nullptr) {}; -CurveData::~CurveData() {}; +CurveData::CurveData() : Curve(nullptr) {} +CurveData::~CurveData() {} static const std::list PossibleProfilesForClass = { @@ -46,67 +43,83 @@ CurveData::getPossibleProfilesForAttributes() const return map; } +bool assign_Curve_CurveDatas(BaseClass*, BaseClass*); +bool assign_CurveData_Curve(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + CurveData* element = dynamic_cast(BaseClass_ptr1); + Curve* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Curve != element2) + { + element->Curve = element2; + return assign_Curve_CurveDatas(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_CurveData_xvalue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CurveData_xvalue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CurveData* element = dynamic_cast(BaseClass_ptr1)) + CurveData* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xvalue; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CurveData_y1value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CurveData_y1value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CurveData* element = dynamic_cast(BaseClass_ptr1)) + CurveData* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->y1value; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CurveData_y2value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CurveData_y2value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CurveData* element = dynamic_cast(BaseClass_ptr1)) + CurveData* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->y2value; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_Curve_CurveDatas(BaseClass*, BaseClass*); -bool assign_CurveData_Curve(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_CurveData_Curve(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - CurveData* element = dynamic_cast(BaseClass_ptr1); - Curve* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const CurveData* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->Curve != element2) + if (element->Curve != 0) { - element->Curve = element2; - return assign_Curve_CurveDatas(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->Curve); + return true; } - return true; } return false; } bool get_CurveData_xvalue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CurveData* element = dynamic_cast(BaseClass_ptr1)) + const CurveData* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xvalue; if (!buffer.str().empty()) @@ -120,7 +133,8 @@ bool get_CurveData_xvalue(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_CurveData_y1value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CurveData* element = dynamic_cast(BaseClass_ptr1)) + const CurveData* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->y1value; if (!buffer.str().empty()) @@ -134,7 +148,8 @@ bool get_CurveData_y1value(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_CurveData_y2value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CurveData* element = dynamic_cast(BaseClass_ptr1)) + const CurveData* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->y2value; if (!buffer.str().empty()) @@ -146,21 +161,6 @@ bool get_CurveData_y2value(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - -bool get_CurveData_Curve(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const CurveData* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->Curve != 0) - { - BaseClass_list.push_back(element->Curve); - return true; - } - } - return false; -} - - const char CurveData::debugName[] = "CurveData"; const char* CurveData::debugString() const { @@ -169,19 +169,19 @@ const char* CurveData::debugString() const void CurveData::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:CurveData"), &CurveData_factory)); + factory_map.emplace("cim:CurveData", &CurveData_factory); } void CurveData::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:CurveData.xvalue"), &assign_CurveData_xvalue)); - assign_map.insert(std::make_pair(std::string("cim:CurveData.y1value"), &assign_CurveData_y1value)); - assign_map.insert(std::make_pair(std::string("cim:CurveData.y2value"), &assign_CurveData_y2value)); + assign_map.emplace("cim:CurveData.xvalue", &assign_CurveData_xvalue); + assign_map.emplace("cim:CurveData.y1value", &assign_CurveData_y1value); + assign_map.emplace("cim:CurveData.y2value", &assign_CurveData_y2value); } void CurveData::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:CurveData.Curve"), &assign_CurveData_Curve)); + assign_map.emplace("cim:CurveData.Curve", &assign_CurveData_Curve); } void CurveData::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/CurveData.hpp b/CGMES_2.4.13_18DEC2013/CurveData.hpp index 436ade08a..3bbd6ba03 100644 --- a/CGMES_2.4.13_18DEC2013/CurveData.hpp +++ b/CGMES_2.4.13_18DEC2013/CurveData.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class Curve; - /* - Multi-purpose data points for defining a curve. The use of this generic class is discouraged if a more specific class can be used to specify the x and y axis values along with their specific data types. - */ + /** \brief Multi-purpose data points for defining a curve. The use of this generic class is discouraged if a more specific class can be used to specify the x and y axis values along with their specific data types. */ class CurveData : public BaseClass { public: @@ -28,10 +26,17 @@ namespace CIMPP CurveData(); ~CurveData() override; - CIMPP::Curve* Curve; /* The point data values that define this curve. Default: 0 */ - CIMPP::Simple_Float xvalue; /* The data value of the X-axis variable, depending on the X-axis units. Default: nullptr */ - CIMPP::Simple_Float y1value; /* The data value of the first Y-axis variable, depending on the Y-axis units. Default: nullptr */ - CIMPP::Simple_Float y2value; /* The data value of the second Y-axis variable (if present), depending on the Y-axis units. Default: nullptr */ + /** \brief The point data values that define this curve. Default: 0 */ + CIMPP::Curve* Curve; + + /** \brief The data value of the X-axis variable, depending on the X-axis units. Default: nullptr */ + CIMPP::Simple_Float xvalue; + + /** \brief The data value of the first Y-axis variable, depending on the Y-axis units. Default: nullptr */ + CIMPP::Simple_Float y1value; + + /** \brief The data value of the second Y-axis variable (if present), depending on the Y-axis units. Default: nullptr */ + CIMPP::Simple_Float y2value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/CurveStyle.cpp b/CGMES_2.4.13_18DEC2013/CurveStyle.cpp index d28696151..bf78aeb7f 100644 --- a/CGMES_2.4.13_18DEC2013/CurveStyle.cpp +++ b/CGMES_2.4.13_18DEC2013/CurveStyle.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "CurveStyle") + if (EnumSymbol.substr(0, pos) != "CurveStyle") { lop.setstate(std::ios::failbit); return lop; @@ -50,12 +50,12 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "constantYValue") + if (EnumSymbol == "constantYValue") { rop = CurveStyle::constantYValue; return lop; } - if(EnumSymbol == "straightLineYValues") + if (EnumSymbol == "straightLineYValues") { rop = CurveStyle::straightLineYValues; return lop; diff --git a/CGMES_2.4.13_18DEC2013/CurveStyle.hpp b/CGMES_2.4.13_18DEC2013/CurveStyle.hpp index 72f95568c..0f72591f4 100644 --- a/CGMES_2.4.13_18DEC2013/CurveStyle.hpp +++ b/CGMES_2.4.13_18DEC2013/CurveStyle.hpp @@ -9,21 +9,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Style or shape of curve. - */ + /** \brief Style or shape of curve. */ class CurveStyle { public: enum CurveStyle_ENUM { - /** - * The Y-axis values are assumed constant until the next curve point and prior to the first curve point. - */ + /** The Y-axis values are assumed constant until the next curve point and prior to the first curve point. */ constantYValue, - /** - * The Y-axis values are assumed to be a straight line between values. Also known as linear interpolation. - */ + /** The Y-axis values are assumed to be a straight line between values. Also known as linear interpolation. */ straightLineYValues, }; diff --git a/CGMES_2.4.13_18DEC2013/DCBaseTerminal.cpp b/CGMES_2.4.13_18DEC2013/DCBaseTerminal.cpp index 46eb08199..d702d5b96 100644 --- a/CGMES_2.4.13_18DEC2013/DCBaseTerminal.cpp +++ b/CGMES_2.4.13_18DEC2013/DCBaseTerminal.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCBaseTerminal::DCBaseTerminal() : DCNode(nullptr), DCTopologicalNode(nullptr) {}; -DCBaseTerminal::~DCBaseTerminal() {}; +DCBaseTerminal::DCBaseTerminal() : DCNode(nullptr), DCTopologicalNode(nullptr) {} +DCBaseTerminal::~DCBaseTerminal() {} static const std::list PossibleProfilesForClass = { @@ -43,8 +43,6 @@ DCBaseTerminal::getPossibleProfilesForAttributes() const return map; } - - bool assign_DCNode_DCTerminals(BaseClass*, BaseClass*); bool assign_DCBaseTerminal_DCNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,6 +59,7 @@ bool assign_DCBaseTerminal_DCNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClas } return false; } + bool assign_DCTopologicalNode_DCTerminals(BaseClass*, BaseClass*); bool assign_DCBaseTerminal_DCTopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -78,10 +77,10 @@ bool assign_DCBaseTerminal_DCTopologicalNode(BaseClass* BaseClass_ptr1, BaseClas return false; } - bool get_DCBaseTerminal_DCNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DCBaseTerminal* element = dynamic_cast(BaseClass_ptr1)) + const DCBaseTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DCNode != 0) { @@ -94,7 +93,8 @@ bool get_DCBaseTerminal_DCNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DCBaseTerminal* element = dynamic_cast(BaseClass_ptr1)) + const DCBaseTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DCTopologicalNode != 0) { @@ -105,7 +105,6 @@ bool get_DCBaseTerminal_DCTopologicalNode(const BaseClass* BaseClass_ptr1, std:: return false; } - const char DCBaseTerminal::debugName[] = "DCBaseTerminal"; const char* DCBaseTerminal::debugString() const { @@ -114,7 +113,7 @@ const char* DCBaseTerminal::debugString() const void DCBaseTerminal::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCBaseTerminal"), &DCBaseTerminal_factory)); + factory_map.emplace("cim:DCBaseTerminal", &DCBaseTerminal_factory); } void DCBaseTerminal::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -123,8 +122,8 @@ void DCBaseTerminal::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCBaseTerminal.DCNode"), &assign_DCBaseTerminal_DCNode)); - assign_map.insert(std::make_pair(std::string("cim:DCBaseTerminal.DCTopologicalNode"), &assign_DCBaseTerminal_DCTopologicalNode)); + assign_map.emplace("cim:DCBaseTerminal.DCNode", &assign_DCBaseTerminal_DCNode); + assign_map.emplace("cim:DCBaseTerminal.DCTopologicalNode", &assign_DCBaseTerminal_DCTopologicalNode); } void DCBaseTerminal::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/DCBaseTerminal.hpp b/CGMES_2.4.13_18DEC2013/DCBaseTerminal.hpp index 98daff291..1538e8e05 100644 --- a/CGMES_2.4.13_18DEC2013/DCBaseTerminal.hpp +++ b/CGMES_2.4.13_18DEC2013/DCBaseTerminal.hpp @@ -25,8 +25,11 @@ namespace CIMPP DCBaseTerminal(); ~DCBaseTerminal() override; - CIMPP::DCNode* DCNode; /* Default: 0 */ - CIMPP::DCTopologicalNode* DCTopologicalNode; /* See association end TopologicalNode.Terminal. Default: 0 */ + /** \brief Default: 0 */ + CIMPP::DCNode* DCNode; + + /** \brief See association end TopologicalNode.Terminal. Default: 0 */ + CIMPP::DCTopologicalNode* DCTopologicalNode; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/DCBreaker.cpp b/CGMES_2.4.13_18DEC2013/DCBreaker.cpp index b00cbaa77..721524d6e 100644 --- a/CGMES_2.4.13_18DEC2013/DCBreaker.cpp +++ b/CGMES_2.4.13_18DEC2013/DCBreaker.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCBreaker::DCBreaker() {}; -DCBreaker::~DCBreaker() {}; +DCBreaker::DCBreaker() {} +DCBreaker::~DCBreaker() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ DCBreaker::getPossibleProfilesForAttributes() const return map; } - - - - - const char DCBreaker::debugName[] = "DCBreaker"; const char* DCBreaker::debugString() const { @@ -51,7 +46,7 @@ const char* DCBreaker::debugString() const void DCBreaker::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCBreaker"), &DCBreaker_factory)); + factory_map.emplace("cim:DCBreaker", &DCBreaker_factory); } void DCBreaker::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/DCBreaker.hpp b/CGMES_2.4.13_18DEC2013/DCBreaker.hpp index cfecf1c9c..51ebd5f70 100644 --- a/CGMES_2.4.13_18DEC2013/DCBreaker.hpp +++ b/CGMES_2.4.13_18DEC2013/DCBreaker.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A breaker within a DC system. - */ + /** \brief A breaker within a DC system. */ class DCBreaker : public DCSwitch { public: @@ -26,7 +24,6 @@ namespace CIMPP DCBreaker(); ~DCBreaker() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/DCBusbar.cpp b/CGMES_2.4.13_18DEC2013/DCBusbar.cpp index 99e4dbdbd..1ecf0f6fa 100644 --- a/CGMES_2.4.13_18DEC2013/DCBusbar.cpp +++ b/CGMES_2.4.13_18DEC2013/DCBusbar.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCBusbar::DCBusbar() {}; -DCBusbar::~DCBusbar() {}; +DCBusbar::DCBusbar() {} +DCBusbar::~DCBusbar() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ DCBusbar::getPossibleProfilesForAttributes() const return map; } - - - - - const char DCBusbar::debugName[] = "DCBusbar"; const char* DCBusbar::debugString() const { @@ -51,7 +46,7 @@ const char* DCBusbar::debugString() const void DCBusbar::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCBusbar"), &DCBusbar_factory)); + factory_map.emplace("cim:DCBusbar", &DCBusbar_factory); } void DCBusbar::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/DCBusbar.hpp b/CGMES_2.4.13_18DEC2013/DCBusbar.hpp index ac483b4bb..443ea1142 100644 --- a/CGMES_2.4.13_18DEC2013/DCBusbar.hpp +++ b/CGMES_2.4.13_18DEC2013/DCBusbar.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A busbar within a DC system. - */ + /** \brief A busbar within a DC system. */ class DCBusbar : public DCConductingEquipment { public: @@ -26,7 +24,6 @@ namespace CIMPP DCBusbar(); ~DCBusbar() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/DCChopper.cpp b/CGMES_2.4.13_18DEC2013/DCChopper.cpp index d0ae9bb6f..74dd30f11 100644 --- a/CGMES_2.4.13_18DEC2013/DCChopper.cpp +++ b/CGMES_2.4.13_18DEC2013/DCChopper.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCChopper::DCChopper() {}; -DCChopper::~DCChopper() {}; +DCChopper::DCChopper() {} +DCChopper::~DCChopper() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ DCChopper::getPossibleProfilesForAttributes() const return map; } - - - - - const char DCChopper::debugName[] = "DCChopper"; const char* DCChopper::debugString() const { @@ -51,7 +46,7 @@ const char* DCChopper::debugString() const void DCChopper::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCChopper"), &DCChopper_factory)); + factory_map.emplace("cim:DCChopper", &DCChopper_factory); } void DCChopper::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/DCChopper.hpp b/CGMES_2.4.13_18DEC2013/DCChopper.hpp index 2c1ae6e0b..69669fe03 100644 --- a/CGMES_2.4.13_18DEC2013/DCChopper.hpp +++ b/CGMES_2.4.13_18DEC2013/DCChopper.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Low resistance equipment used in the internal DC circuit to balance voltages. It has typically positive and negative pole terminals and a ground. - */ + /** \brief Low resistance equipment used in the internal DC circuit to balance voltages. It has typically positive and negative pole terminals and a ground. */ class DCChopper : public DCConductingEquipment { public: @@ -26,7 +24,6 @@ namespace CIMPP DCChopper(); ~DCChopper() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/DCConductingEquipment.cpp b/CGMES_2.4.13_18DEC2013/DCConductingEquipment.cpp index 40cf4f1b5..b837861c2 100644 --- a/CGMES_2.4.13_18DEC2013/DCConductingEquipment.cpp +++ b/CGMES_2.4.13_18DEC2013/DCConductingEquipment.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCConductingEquipment::DCConductingEquipment() {}; -DCConductingEquipment::~DCConductingEquipment() {}; +DCConductingEquipment::DCConductingEquipment() {} +DCConductingEquipment::~DCConductingEquipment() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ DCConductingEquipment::getPossibleProfilesForAttributes() const return map; } - - bool assign_DCTerminal_DCConductingEquipment(BaseClass*, BaseClass*); bool assign_DCConductingEquipment_DCTerminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,7 +59,6 @@ bool assign_DCConductingEquipment_DCTerminals(BaseClass* BaseClass_ptr1, BaseCla } - const char DCConductingEquipment::debugName[] = "DCConductingEquipment"; const char* DCConductingEquipment::debugString() const { @@ -70,7 +67,7 @@ const char* DCConductingEquipment::debugString() const void DCConductingEquipment::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCConductingEquipment"), &DCConductingEquipment_factory)); + factory_map.emplace("cim:DCConductingEquipment", &DCConductingEquipment_factory); } void DCConductingEquipment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -79,7 +76,7 @@ void DCConductingEquipment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCConductingEquipment.DCTerminals"), &assign_DCConductingEquipment_DCTerminals)); + assign_map.emplace("cim:DCConductingEquipment.DCTerminals", &assign_DCConductingEquipment_DCTerminals); } void DCConductingEquipment::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/DCConductingEquipment.hpp b/CGMES_2.4.13_18DEC2013/DCConductingEquipment.hpp index 1867a95eb..7ef261fec 100644 --- a/CGMES_2.4.13_18DEC2013/DCConductingEquipment.hpp +++ b/CGMES_2.4.13_18DEC2013/DCConductingEquipment.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class DCTerminal; - /* - The parts of the DC power system that are designed to carry current or that are conductively connected through DC terminals. - */ + /** \brief The parts of the DC power system that are designed to carry current or that are conductively connected through DC terminals. */ class DCConductingEquipment : public Equipment { public: @@ -27,7 +25,8 @@ namespace CIMPP DCConductingEquipment(); ~DCConductingEquipment() override; - std::list DCTerminals; /* Default: 0 */ + /** \brief Default: 0 */ + std::list DCTerminals; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/DCConverterOperatingModeKind.cpp b/CGMES_2.4.13_18DEC2013/DCConverterOperatingModeKind.cpp index 723e4594e..5119f9ba2 100644 --- a/CGMES_2.4.13_18DEC2013/DCConverterOperatingModeKind.cpp +++ b/CGMES_2.4.13_18DEC2013/DCConverterOperatingModeKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "DCConverterOperatingModeKind") + if (EnumSymbol.substr(0, pos) != "DCConverterOperatingModeKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "bipolar") + if (EnumSymbol == "bipolar") { rop = DCConverterOperatingModeKind::bipolar; return lop; } - if(EnumSymbol == "monopolarMetallicReturn") + if (EnumSymbol == "monopolarMetallicReturn") { rop = DCConverterOperatingModeKind::monopolarMetallicReturn; return lop; } - if(EnumSymbol == "monopolarGroundReturn") + if (EnumSymbol == "monopolarGroundReturn") { rop = DCConverterOperatingModeKind::monopolarGroundReturn; return lop; diff --git a/CGMES_2.4.13_18DEC2013/DCConverterOperatingModeKind.hpp b/CGMES_2.4.13_18DEC2013/DCConverterOperatingModeKind.hpp index eb7c9c456..6ed6a79c3 100644 --- a/CGMES_2.4.13_18DEC2013/DCConverterOperatingModeKind.hpp +++ b/CGMES_2.4.13_18DEC2013/DCConverterOperatingModeKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The operating mode of an HVDC bipole. - */ + /** \brief The operating mode of an HVDC bipole. */ class DCConverterOperatingModeKind { public: enum DCConverterOperatingModeKind_ENUM { - /** - * Bipolar operation. - */ + /** Bipolar operation. */ bipolar, - /** - * Monopolar operation with metallic return - */ + /** Monopolar operation with metallic return */ monopolarMetallicReturn, - /** - * Monopolar operation with ground return - */ + /** Monopolar operation with ground return */ monopolarGroundReturn, }; diff --git a/CGMES_2.4.13_18DEC2013/DCConverterUnit.cpp b/CGMES_2.4.13_18DEC2013/DCConverterUnit.cpp index f66280df5..2d1090ab2 100644 --- a/CGMES_2.4.13_18DEC2013/DCConverterUnit.cpp +++ b/CGMES_2.4.13_18DEC2013/DCConverterUnit.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "Substation.hpp" -#include "DCConverterOperatingModeKind.hpp" using namespace CIMPP; -DCConverterUnit::DCConverterUnit() : Substation(nullptr) {}; -DCConverterUnit::~DCConverterUnit() {}; +DCConverterUnit::DCConverterUnit() : Substation(nullptr) {} +DCConverterUnit::~DCConverterUnit() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ DCConverterUnit::getPossibleProfilesForAttributes() const return map; } - -bool assign_DCConverterUnit_operationMode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (DCConverterUnit* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->operationMode; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_Substation_DCConverterUnit(BaseClass*, BaseClass*); bool assign_DCConverterUnit_Substation(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,10 +58,24 @@ bool assign_DCConverterUnit_Substation(BaseClass* BaseClass_ptr1, BaseClass* Bas return false; } +bool assign_DCConverterUnit_operationMode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + DCConverterUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->operationMode; + if (!buffer.fail()) + { + return true; + } + } + return false; +} bool get_DCConverterUnit_Substation(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DCConverterUnit* element = dynamic_cast(BaseClass_ptr1)) + const DCConverterUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Substation != 0) { @@ -88,10 +86,10 @@ bool get_DCConverterUnit_Substation(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1)) + const DCConverterUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->operationMode; if (!buffer.str().empty()) @@ -111,17 +109,17 @@ const char* DCConverterUnit::debugString() const void DCConverterUnit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCConverterUnit"), &DCConverterUnit_factory)); + factory_map.emplace("cim:DCConverterUnit", &DCConverterUnit_factory); } void DCConverterUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCConverterUnit.operationMode"), &assign_DCConverterUnit_operationMode)); + assign_map.emplace("cim:DCConverterUnit.operationMode", &assign_DCConverterUnit_operationMode); } void DCConverterUnit::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCConverterUnit.Substation"), &assign_DCConverterUnit_Substation)); + assign_map.emplace("cim:DCConverterUnit.Substation", &assign_DCConverterUnit_Substation); } void DCConverterUnit::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/DCConverterUnit.hpp b/CGMES_2.4.13_18DEC2013/DCConverterUnit.hpp index 914e8ea3e..0ceada939 100644 --- a/CGMES_2.4.13_18DEC2013/DCConverterUnit.hpp +++ b/CGMES_2.4.13_18DEC2013/DCConverterUnit.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class Substation; - /* - Indivisible operative unit comprising all equipment between the point of common coupling on the AC side and the point of common coupling - DC side, essentially one or more converters, together with one or more converter transformers, converter control equipment, essential protective and switching devices and auxiliaries, if any, used for conversion. - */ + /** \brief Indivisible operative unit comprising all equipment between the point of common coupling on the AC side and the point of common coupling - DC side, essentially one or more converters, together with one or more converter transformers, converter control equipment, essential protective and switching devices and auxiliaries, if any, used for conversion. */ class DCConverterUnit : public DCEquipmentContainer { public: @@ -28,8 +26,11 @@ namespace CIMPP DCConverterUnit(); ~DCConverterUnit() override; - CIMPP::Substation* Substation; /* Default: 0 */ - CIMPP::DCConverterOperatingModeKind operationMode; /* Default: 0 */ + /** \brief Default: 0 */ + CIMPP::Substation* Substation; + + /** \brief Default: 0 */ + CIMPP::DCConverterOperatingModeKind operationMode; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/DCDisconnector.cpp b/CGMES_2.4.13_18DEC2013/DCDisconnector.cpp index 861bbeb7c..fe93c5903 100644 --- a/CGMES_2.4.13_18DEC2013/DCDisconnector.cpp +++ b/CGMES_2.4.13_18DEC2013/DCDisconnector.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCDisconnector::DCDisconnector() {}; -DCDisconnector::~DCDisconnector() {}; +DCDisconnector::DCDisconnector() {} +DCDisconnector::~DCDisconnector() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ DCDisconnector::getPossibleProfilesForAttributes() const return map; } - - - - - const char DCDisconnector::debugName[] = "DCDisconnector"; const char* DCDisconnector::debugString() const { @@ -51,7 +46,7 @@ const char* DCDisconnector::debugString() const void DCDisconnector::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCDisconnector"), &DCDisconnector_factory)); + factory_map.emplace("cim:DCDisconnector", &DCDisconnector_factory); } void DCDisconnector::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/DCDisconnector.hpp b/CGMES_2.4.13_18DEC2013/DCDisconnector.hpp index 3cc09932a..9000b268e 100644 --- a/CGMES_2.4.13_18DEC2013/DCDisconnector.hpp +++ b/CGMES_2.4.13_18DEC2013/DCDisconnector.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A disconnector within a DC system. - */ + /** \brief A disconnector within a DC system. */ class DCDisconnector : public DCSwitch { public: @@ -26,7 +24,6 @@ namespace CIMPP DCDisconnector(); ~DCDisconnector() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/DCEquipmentContainer.cpp b/CGMES_2.4.13_18DEC2013/DCEquipmentContainer.cpp index cedda07ed..0fc1f9398 100644 --- a/CGMES_2.4.13_18DEC2013/DCEquipmentContainer.cpp +++ b/CGMES_2.4.13_18DEC2013/DCEquipmentContainer.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCEquipmentContainer::DCEquipmentContainer() {}; -DCEquipmentContainer::~DCEquipmentContainer() {}; +DCEquipmentContainer::DCEquipmentContainer() {} +DCEquipmentContainer::~DCEquipmentContainer() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ DCEquipmentContainer::getPossibleProfilesForAttributes() const return map; } - - bool assign_DCTopologicalNode_DCEquipmentContainer(BaseClass*, BaseClass*); bool assign_DCEquipmentContainer_DCTopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,7 +59,6 @@ bool assign_DCEquipmentContainer_DCTopologicalNode(BaseClass* BaseClass_ptr1, Ba } - const char DCEquipmentContainer::debugName[] = "DCEquipmentContainer"; const char* DCEquipmentContainer::debugString() const { @@ -70,7 +67,7 @@ const char* DCEquipmentContainer::debugString() const void DCEquipmentContainer::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCEquipmentContainer"), &DCEquipmentContainer_factory)); + factory_map.emplace("cim:DCEquipmentContainer", &DCEquipmentContainer_factory); } void DCEquipmentContainer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -79,7 +76,7 @@ void DCEquipmentContainer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCEquipmentContainer.DCTopologicalNode"), &assign_DCEquipmentContainer_DCTopologicalNode)); + assign_map.emplace("cim:DCEquipmentContainer.DCTopologicalNode", &assign_DCEquipmentContainer_DCTopologicalNode); } void DCEquipmentContainer::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/DCEquipmentContainer.hpp b/CGMES_2.4.13_18DEC2013/DCEquipmentContainer.hpp index 5b504a850..e391253fd 100644 --- a/CGMES_2.4.13_18DEC2013/DCEquipmentContainer.hpp +++ b/CGMES_2.4.13_18DEC2013/DCEquipmentContainer.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class DCTopologicalNode; - /* - A modeling construct to provide a root class for containment of DC as well as AC equipment. The class differ from the EquipmentContaner for AC in that it may also contain DCNodes. Hence it can contain both AC and DC equipment. - */ + /** \brief A modeling construct to provide a root class for containment of DC as well as AC equipment. The class differ from the EquipmentContaner for AC in that it may also contain DCNodes. Hence it can contain both AC and DC equipment. */ class DCEquipmentContainer : public EquipmentContainer { public: @@ -27,7 +25,8 @@ namespace CIMPP DCEquipmentContainer(); ~DCEquipmentContainer() override; - std::list DCTopologicalNode; /* Default: 0 */ + /** \brief Default: 0 */ + std::list DCTopologicalNode; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/DCGround.cpp b/CGMES_2.4.13_18DEC2013/DCGround.cpp index 49c4c8fd1..116c3a350 100644 --- a/CGMES_2.4.13_18DEC2013/DCGround.cpp +++ b/CGMES_2.4.13_18DEC2013/DCGround.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCGround::DCGround() {}; -DCGround::~DCGround() {}; +DCGround::DCGround() {} +DCGround::~DCGround() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ DCGround::getPossibleProfilesForAttributes() const return map; } - - - - - const char DCGround::debugName[] = "DCGround"; const char* DCGround::debugString() const { @@ -51,7 +46,7 @@ const char* DCGround::debugString() const void DCGround::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCGround"), &DCGround_factory)); + factory_map.emplace("cim:DCGround", &DCGround_factory); } void DCGround::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/DCGround.hpp b/CGMES_2.4.13_18DEC2013/DCGround.hpp index c0b7a8122..02517bb29 100644 --- a/CGMES_2.4.13_18DEC2013/DCGround.hpp +++ b/CGMES_2.4.13_18DEC2013/DCGround.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A ground within a DC system. - */ + /** \brief A ground within a DC system. */ class DCGround : public DCConductingEquipment { public: @@ -26,7 +24,6 @@ namespace CIMPP DCGround(); ~DCGround() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/DCLine.cpp b/CGMES_2.4.13_18DEC2013/DCLine.cpp index cb4fb87ef..15f9c9331 100644 --- a/CGMES_2.4.13_18DEC2013/DCLine.cpp +++ b/CGMES_2.4.13_18DEC2013/DCLine.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCLine::DCLine() : Region(nullptr) {}; -DCLine::~DCLine() {}; +DCLine::DCLine() : Region(nullptr) {} +DCLine::~DCLine() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ DCLine::getPossibleProfilesForAttributes() const return map; } - - bool assign_SubGeographicalRegion_DCLines(BaseClass*, BaseClass*); bool assign_DCLine_Region(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_DCLine_Region(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) return false; } - bool get_DCLine_Region(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DCLine* element = dynamic_cast(BaseClass_ptr1)) + const DCLine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Region != 0) { @@ -73,7 +71,6 @@ bool get_DCLine_Region(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCLine"), &DCLine_factory)); + factory_map.emplace("cim:DCLine", &DCLine_factory); } void DCLine::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void DCLine::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCLine.Region"), &assign_DCLine_Region)); + assign_map.emplace("cim:DCLine.Region", &assign_DCLine_Region); } void DCLine::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/DCLine.hpp b/CGMES_2.4.13_18DEC2013/DCLine.hpp index f6b31465b..91657a003 100644 --- a/CGMES_2.4.13_18DEC2013/DCLine.hpp +++ b/CGMES_2.4.13_18DEC2013/DCLine.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class SubGeographicalRegion; - /* - Overhead lines and/or cables connecting two or more HVDC substations. - */ + /** \brief Overhead lines and/or cables connecting two or more HVDC substations. */ class DCLine : public DCEquipmentContainer { public: @@ -27,7 +25,8 @@ namespace CIMPP DCLine(); ~DCLine() override; - CIMPP::SubGeographicalRegion* Region; /* Default: 0 */ + /** \brief Default: 0 */ + CIMPP::SubGeographicalRegion* Region; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/DCLineSegment.cpp b/CGMES_2.4.13_18DEC2013/DCLineSegment.cpp index ec65717a6..3b5b3a411 100644 --- a/CGMES_2.4.13_18DEC2013/DCLineSegment.cpp +++ b/CGMES_2.4.13_18DEC2013/DCLineSegment.cpp @@ -9,15 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "PerLengthDCLineParameter.hpp" -#include "Capacitance.hpp" -#include "Inductance.hpp" -#include "Length.hpp" -#include "Resistance.hpp" using namespace CIMPP; -DCLineSegment::DCLineSegment() : PerLengthParameter(nullptr) {}; -DCLineSegment::~DCLineSegment() {}; +DCLineSegment::DCLineSegment() : PerLengthParameter(nullptr) {} +DCLineSegment::~DCLineSegment() {} static const std::list PossibleProfilesForClass = { @@ -48,80 +44,97 @@ DCLineSegment::getPossibleProfilesForAttributes() const return map; } +bool assign_PerLengthDCLineParameter_DCLineSegments(BaseClass*, BaseClass*); +bool assign_DCLineSegment_PerLengthParameter(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + PerLengthDCLineParameter* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PerLengthParameter != element2) + { + element->PerLengthParameter = element2; + return assign_PerLengthDCLineParameter_DCLineSegments(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_DCLineSegment_capacitance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCLineSegment_capacitance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->capacitance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DCLineSegment_inductance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCLineSegment_inductance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inductance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DCLineSegment_length(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCLineSegment_length(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->length; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DCLineSegment_resistance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCLineSegment_resistance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->resistance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_PerLengthDCLineParameter_DCLineSegments(BaseClass*, BaseClass*); -bool assign_DCLineSegment_PerLengthParameter(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_DCLineSegment_PerLengthParameter(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - DCLineSegment* element = dynamic_cast(BaseClass_ptr1); - PerLengthDCLineParameter* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->PerLengthParameter != element2) + if (element->PerLengthParameter != 0) { - element->PerLengthParameter = element2; - return assign_PerLengthDCLineParameter_DCLineSegments(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->PerLengthParameter); + return true; } - return true; } return false; } bool get_DCLineSegment_capacitance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->capacitance; if (!buffer.str().empty()) @@ -135,7 +148,8 @@ bool get_DCLineSegment_capacitance(const BaseClass* BaseClass_ptr1, std::strings bool get_DCLineSegment_inductance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inductance; if (!buffer.str().empty()) @@ -149,7 +163,8 @@ bool get_DCLineSegment_inductance(const BaseClass* BaseClass_ptr1, std::stringst bool get_DCLineSegment_length(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->length; if (!buffer.str().empty()) @@ -163,7 +178,8 @@ bool get_DCLineSegment_length(const BaseClass* BaseClass_ptr1, std::stringstream bool get_DCLineSegment_resistance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->resistance; if (!buffer.str().empty()) @@ -175,21 +191,6 @@ bool get_DCLineSegment_resistance(const BaseClass* BaseClass_ptr1, std::stringst return false; } - -bool get_DCLineSegment_PerLengthParameter(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->PerLengthParameter != 0) - { - BaseClass_list.push_back(element->PerLengthParameter); - return true; - } - } - return false; -} - - const char DCLineSegment::debugName[] = "DCLineSegment"; const char* DCLineSegment::debugString() const { @@ -198,20 +199,20 @@ const char* DCLineSegment::debugString() const void DCLineSegment::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCLineSegment"), &DCLineSegment_factory)); + factory_map.emplace("cim:DCLineSegment", &DCLineSegment_factory); } void DCLineSegment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCLineSegment.capacitance"), &assign_DCLineSegment_capacitance)); - assign_map.insert(std::make_pair(std::string("cim:DCLineSegment.inductance"), &assign_DCLineSegment_inductance)); - assign_map.insert(std::make_pair(std::string("cim:DCLineSegment.length"), &assign_DCLineSegment_length)); - assign_map.insert(std::make_pair(std::string("cim:DCLineSegment.resistance"), &assign_DCLineSegment_resistance)); + assign_map.emplace("cim:DCLineSegment.capacitance", &assign_DCLineSegment_capacitance); + assign_map.emplace("cim:DCLineSegment.inductance", &assign_DCLineSegment_inductance); + assign_map.emplace("cim:DCLineSegment.length", &assign_DCLineSegment_length); + assign_map.emplace("cim:DCLineSegment.resistance", &assign_DCLineSegment_resistance); } void DCLineSegment::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCLineSegment.PerLengthParameter"), &assign_DCLineSegment_PerLengthParameter)); + assign_map.emplace("cim:DCLineSegment.PerLengthParameter", &assign_DCLineSegment_PerLengthParameter); } void DCLineSegment::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/DCLineSegment.hpp b/CGMES_2.4.13_18DEC2013/DCLineSegment.hpp index 44cf90e5a..58c280fe1 100644 --- a/CGMES_2.4.13_18DEC2013/DCLineSegment.hpp +++ b/CGMES_2.4.13_18DEC2013/DCLineSegment.hpp @@ -21,9 +21,7 @@ namespace CIMPP { class PerLengthDCLineParameter; - /* - A wire or combination of wires not insulated from one another, with consistent electrical characteristics, used to carry direct current between points in the DC region of the power system. - */ + /** \brief A wire or combination of wires not insulated from one another, with consistent electrical characteristics, used to carry direct current between points in the DC region of the power system. */ class DCLineSegment : public DCConductingEquipment { public: @@ -31,11 +29,20 @@ namespace CIMPP DCLineSegment(); ~DCLineSegment() override; - CIMPP::PerLengthDCLineParameter* PerLengthParameter; /* Set of per-length parameters for this line segment. Default: 0 */ - CIMPP::Capacitance capacitance; /* Capacitance of the DC line segment. Significant for cables only. Default: nullptr */ - CIMPP::Inductance inductance; /* Inductance of the DC line segment. Neglectable compared with DCSeriesDevice used for smoothing. Default: nullptr */ - CIMPP::Length length; /* Segment length for calculating line section capabilities. Default: nullptr */ - CIMPP::Resistance resistance; /* Resistance of the DC line segment. Default: nullptr */ + /** \brief Set of per-length parameters for this line segment. Default: 0 */ + CIMPP::PerLengthDCLineParameter* PerLengthParameter; + + /** \brief Capacitance of the DC line segment. Significant for cables only. Default: nullptr */ + CIMPP::Capacitance capacitance; + + /** \brief Inductance of the DC line segment. Neglectable compared with DCSeriesDevice used for smoothing. Default: nullptr */ + CIMPP::Inductance inductance; + + /** \brief Segment length for calculating line section capabilities. Default: nullptr */ + CIMPP::Length length; + + /** \brief Resistance of the DC line segment. Default: nullptr */ + CIMPP::Resistance resistance; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/DCNode.cpp b/CGMES_2.4.13_18DEC2013/DCNode.cpp index 4cb68be11..c502c009c 100644 --- a/CGMES_2.4.13_18DEC2013/DCNode.cpp +++ b/CGMES_2.4.13_18DEC2013/DCNode.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCNode::DCNode() : DCTopologicalNode(nullptr) {}; -DCNode::~DCNode() {}; +DCNode::DCNode() : DCTopologicalNode(nullptr) {} +DCNode::~DCNode() {} static const std::list PossibleProfilesForClass = { @@ -43,8 +43,6 @@ DCNode::getPossibleProfilesForAttributes() const return map; } - - bool assign_DCBaseTerminal_DCNode(BaseClass*, BaseClass*); bool assign_DCNode_DCTerminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,6 +59,7 @@ bool assign_DCNode_DCTerminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_p } return false; } + bool assign_DCTopologicalNode_DCNodes(BaseClass*, BaseClass*); bool assign_DCNode_DCTopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -88,7 +87,7 @@ const char* DCNode::debugString() const void DCNode::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCNode"), &DCNode_factory)); + factory_map.emplace("cim:DCNode", &DCNode_factory); } void DCNode::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -97,8 +96,8 @@ void DCNode::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCNode.DCTerminals"), &assign_DCNode_DCTerminals)); - assign_map.insert(std::make_pair(std::string("cim:DCNode.DCTopologicalNode"), &assign_DCNode_DCTopologicalNode)); + assign_map.emplace("cim:DCNode.DCTerminals", &assign_DCNode_DCTerminals); + assign_map.emplace("cim:DCNode.DCTopologicalNode", &assign_DCNode_DCTopologicalNode); } void DCNode::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/DCNode.hpp b/CGMES_2.4.13_18DEC2013/DCNode.hpp index 86d4ebe76..7aaf96aef 100644 --- a/CGMES_2.4.13_18DEC2013/DCNode.hpp +++ b/CGMES_2.4.13_18DEC2013/DCNode.hpp @@ -18,9 +18,7 @@ namespace CIMPP class DCBaseTerminal; class DCTopologicalNode; - /* - DC nodes are points where terminals of DC conducting equipment are connected together with zero impedance. - */ + /** \brief DC nodes are points where terminals of DC conducting equipment are connected together with zero impedance. */ class DCNode : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP DCNode(); ~DCNode() override; - std::list DCTerminals; /* Default: 0 */ - CIMPP::DCTopologicalNode* DCTopologicalNode; /* See association end TopologicalNode.ConnectivityNodes. Default: 0 */ + /** \brief Default: 0 */ + std::list DCTerminals; + + /** \brief See association end TopologicalNode.ConnectivityNodes. Default: 0 */ + CIMPP::DCTopologicalNode* DCTopologicalNode; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/DCPolarityKind.cpp b/CGMES_2.4.13_18DEC2013/DCPolarityKind.cpp index a1a646248..5c159224e 100644 --- a/CGMES_2.4.13_18DEC2013/DCPolarityKind.cpp +++ b/CGMES_2.4.13_18DEC2013/DCPolarityKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "DCPolarityKind") + if (EnumSymbol.substr(0, pos) != "DCPolarityKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "positive") + if (EnumSymbol == "positive") { rop = DCPolarityKind::positive; return lop; } - if(EnumSymbol == "middle") + if (EnumSymbol == "middle") { rop = DCPolarityKind::middle; return lop; } - if(EnumSymbol == "negative") + if (EnumSymbol == "negative") { rop = DCPolarityKind::negative; return lop; diff --git a/CGMES_2.4.13_18DEC2013/DCPolarityKind.hpp b/CGMES_2.4.13_18DEC2013/DCPolarityKind.hpp index 8b3bd24e9..266ac5884 100644 --- a/CGMES_2.4.13_18DEC2013/DCPolarityKind.hpp +++ b/CGMES_2.4.13_18DEC2013/DCPolarityKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Polarity for DC circuits. - */ + /** \brief Polarity for DC circuits. */ class DCPolarityKind { public: enum DCPolarityKind_ENUM { - /** - * Positive pole. - */ + /** Positive pole. */ positive, - /** - * Middle pole, potentially grounded. - */ + /** Middle pole, potentially grounded. */ middle, - /** - * Negative pole. - */ + /** Negative pole. */ negative, }; diff --git a/CGMES_2.4.13_18DEC2013/DCSeriesDevice.cpp b/CGMES_2.4.13_18DEC2013/DCSeriesDevice.cpp index 043263bbf..4f042583c 100644 --- a/CGMES_2.4.13_18DEC2013/DCSeriesDevice.cpp +++ b/CGMES_2.4.13_18DEC2013/DCSeriesDevice.cpp @@ -8,14 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Inductance.hpp" -#include "Voltage.hpp" -#include "Resistance.hpp" using namespace CIMPP; -DCSeriesDevice::DCSeriesDevice() {}; -DCSeriesDevice::~DCSeriesDevice() {}; +DCSeriesDevice::DCSeriesDevice() {} +DCSeriesDevice::~DCSeriesDevice() {} static const std::list PossibleProfilesForClass = { @@ -44,51 +41,52 @@ DCSeriesDevice::getPossibleProfilesForAttributes() const return map; } - -bool assign_DCSeriesDevice_inductance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCSeriesDevice_inductance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1)) + DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inductance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DCSeriesDevice_ratedUdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCSeriesDevice_ratedUdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1)) + DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedUdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DCSeriesDevice_resistance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCSeriesDevice_resistance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1)) + DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->resistance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_DCSeriesDevice_inductance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1)) + const DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inductance; if (!buffer.str().empty()) @@ -102,7 +100,8 @@ bool get_DCSeriesDevice_inductance(const BaseClass* BaseClass_ptr1, std::strings bool get_DCSeriesDevice_ratedUdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1)) + const DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedUdc; if (!buffer.str().empty()) @@ -116,7 +115,8 @@ bool get_DCSeriesDevice_ratedUdc(const BaseClass* BaseClass_ptr1, std::stringstr bool get_DCSeriesDevice_resistance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1)) + const DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->resistance; if (!buffer.str().empty()) @@ -128,8 +128,6 @@ bool get_DCSeriesDevice_resistance(const BaseClass* BaseClass_ptr1, std::strings return false; } - - const char DCSeriesDevice::debugName[] = "DCSeriesDevice"; const char* DCSeriesDevice::debugString() const { @@ -138,14 +136,14 @@ const char* DCSeriesDevice::debugString() const void DCSeriesDevice::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCSeriesDevice"), &DCSeriesDevice_factory)); + factory_map.emplace("cim:DCSeriesDevice", &DCSeriesDevice_factory); } void DCSeriesDevice::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCSeriesDevice.inductance"), &assign_DCSeriesDevice_inductance)); - assign_map.insert(std::make_pair(std::string("cim:DCSeriesDevice.ratedUdc"), &assign_DCSeriesDevice_ratedUdc)); - assign_map.insert(std::make_pair(std::string("cim:DCSeriesDevice.resistance"), &assign_DCSeriesDevice_resistance)); + assign_map.emplace("cim:DCSeriesDevice.inductance", &assign_DCSeriesDevice_inductance); + assign_map.emplace("cim:DCSeriesDevice.ratedUdc", &assign_DCSeriesDevice_ratedUdc); + assign_map.emplace("cim:DCSeriesDevice.resistance", &assign_DCSeriesDevice_resistance); } void DCSeriesDevice::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/DCSeriesDevice.hpp b/CGMES_2.4.13_18DEC2013/DCSeriesDevice.hpp index 501b3201b..73436d451 100644 --- a/CGMES_2.4.13_18DEC2013/DCSeriesDevice.hpp +++ b/CGMES_2.4.13_18DEC2013/DCSeriesDevice.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A series device within the DC system, typically a reactor used for filtering or smoothing. Needed for transient and short circuit studies. - */ + /** \brief A series device within the DC system, typically a reactor used for filtering or smoothing. Needed for transient and short circuit studies. */ class DCSeriesDevice : public DCConductingEquipment { public: @@ -29,9 +27,14 @@ namespace CIMPP DCSeriesDevice(); ~DCSeriesDevice() override; - CIMPP::Inductance inductance; /* Inductance of the device. Default: nullptr */ - CIMPP::Voltage ratedUdc; /* Rated DC device voltage. Converter configuration data used in power flow. Default: nullptr */ - CIMPP::Resistance resistance; /* Resistance of the DC device. Default: nullptr */ + /** \brief Inductance of the device. Default: nullptr */ + CIMPP::Inductance inductance; + + /** \brief Rated DC device voltage. Converter configuration data used in power flow. Default: nullptr */ + CIMPP::Voltage ratedUdc; + + /** \brief Resistance of the DC device. Default: nullptr */ + CIMPP::Resistance resistance; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/DCShunt.cpp b/CGMES_2.4.13_18DEC2013/DCShunt.cpp index a28b3b57f..35992c09b 100644 --- a/CGMES_2.4.13_18DEC2013/DCShunt.cpp +++ b/CGMES_2.4.13_18DEC2013/DCShunt.cpp @@ -8,14 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Capacitance.hpp" -#include "Voltage.hpp" -#include "Resistance.hpp" using namespace CIMPP; -DCShunt::DCShunt() {}; -DCShunt::~DCShunt() {}; +DCShunt::DCShunt() {} +DCShunt::~DCShunt() {} static const std::list PossibleProfilesForClass = { @@ -44,51 +41,52 @@ DCShunt::getPossibleProfilesForAttributes() const return map; } - -bool assign_DCShunt_capacitance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCShunt_capacitance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCShunt* element = dynamic_cast(BaseClass_ptr1)) + DCShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->capacitance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DCShunt_ratedUdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCShunt_ratedUdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCShunt* element = dynamic_cast(BaseClass_ptr1)) + DCShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedUdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DCShunt_resistance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCShunt_resistance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCShunt* element = dynamic_cast(BaseClass_ptr1)) + DCShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->resistance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_DCShunt_capacitance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCShunt* element = dynamic_cast(BaseClass_ptr1)) + const DCShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->capacitance; if (!buffer.str().empty()) @@ -102,7 +100,8 @@ bool get_DCShunt_capacitance(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_DCShunt_ratedUdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCShunt* element = dynamic_cast(BaseClass_ptr1)) + const DCShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedUdc; if (!buffer.str().empty()) @@ -116,7 +115,8 @@ bool get_DCShunt_ratedUdc(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_DCShunt_resistance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCShunt* element = dynamic_cast(BaseClass_ptr1)) + const DCShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->resistance; if (!buffer.str().empty()) @@ -128,8 +128,6 @@ bool get_DCShunt_resistance(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char DCShunt::debugName[] = "DCShunt"; const char* DCShunt::debugString() const { @@ -138,14 +136,14 @@ const char* DCShunt::debugString() const void DCShunt::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCShunt"), &DCShunt_factory)); + factory_map.emplace("cim:DCShunt", &DCShunt_factory); } void DCShunt::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCShunt.capacitance"), &assign_DCShunt_capacitance)); - assign_map.insert(std::make_pair(std::string("cim:DCShunt.ratedUdc"), &assign_DCShunt_ratedUdc)); - assign_map.insert(std::make_pair(std::string("cim:DCShunt.resistance"), &assign_DCShunt_resistance)); + assign_map.emplace("cim:DCShunt.capacitance", &assign_DCShunt_capacitance); + assign_map.emplace("cim:DCShunt.ratedUdc", &assign_DCShunt_ratedUdc); + assign_map.emplace("cim:DCShunt.resistance", &assign_DCShunt_resistance); } void DCShunt::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/DCShunt.hpp b/CGMES_2.4.13_18DEC2013/DCShunt.hpp index 96b4dc373..401c9d74e 100644 --- a/CGMES_2.4.13_18DEC2013/DCShunt.hpp +++ b/CGMES_2.4.13_18DEC2013/DCShunt.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A shunt device within the DC system, typically used for filtering. Needed for transient and short circuit studies. - */ + /** \brief A shunt device within the DC system, typically used for filtering. Needed for transient and short circuit studies. */ class DCShunt : public DCConductingEquipment { public: @@ -29,9 +27,14 @@ namespace CIMPP DCShunt(); ~DCShunt() override; - CIMPP::Capacitance capacitance; /* Capacitance of the DC shunt. Default: nullptr */ - CIMPP::Voltage ratedUdc; /* Rated DC device voltage. Converter configuration data used in power flow. Default: nullptr */ - CIMPP::Resistance resistance; /* Resistance of the DC device. Default: nullptr */ + /** \brief Capacitance of the DC shunt. Default: nullptr */ + CIMPP::Capacitance capacitance; + + /** \brief Rated DC device voltage. Converter configuration data used in power flow. Default: nullptr */ + CIMPP::Voltage ratedUdc; + + /** \brief Resistance of the DC device. Default: nullptr */ + CIMPP::Resistance resistance; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/DCSwitch.cpp b/CGMES_2.4.13_18DEC2013/DCSwitch.cpp index b5fbfc7a0..2183c59a5 100644 --- a/CGMES_2.4.13_18DEC2013/DCSwitch.cpp +++ b/CGMES_2.4.13_18DEC2013/DCSwitch.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCSwitch::DCSwitch() {}; -DCSwitch::~DCSwitch() {}; +DCSwitch::DCSwitch() {} +DCSwitch::~DCSwitch() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ DCSwitch::getPossibleProfilesForAttributes() const return map; } - - - - - const char DCSwitch::debugName[] = "DCSwitch"; const char* DCSwitch::debugString() const { @@ -51,7 +46,7 @@ const char* DCSwitch::debugString() const void DCSwitch::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCSwitch"), &DCSwitch_factory)); + factory_map.emplace("cim:DCSwitch", &DCSwitch_factory); } void DCSwitch::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/DCSwitch.hpp b/CGMES_2.4.13_18DEC2013/DCSwitch.hpp index c24dfb18c..2512b3a78 100644 --- a/CGMES_2.4.13_18DEC2013/DCSwitch.hpp +++ b/CGMES_2.4.13_18DEC2013/DCSwitch.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A switch within the DC system. - */ + /** \brief A switch within the DC system. */ class DCSwitch : public DCConductingEquipment { public: @@ -26,7 +24,6 @@ namespace CIMPP DCSwitch(); ~DCSwitch() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/DCTerminal.cpp b/CGMES_2.4.13_18DEC2013/DCTerminal.cpp index c46e28df5..b845cb069 100644 --- a/CGMES_2.4.13_18DEC2013/DCTerminal.cpp +++ b/CGMES_2.4.13_18DEC2013/DCTerminal.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCTerminal::DCTerminal() : DCConductingEquipment(nullptr) {}; -DCTerminal::~DCTerminal() {}; +DCTerminal::DCTerminal() : DCConductingEquipment(nullptr) {} +DCTerminal::~DCTerminal() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ DCTerminal::getPossibleProfilesForAttributes() const return map; } - - bool assign_DCConductingEquipment_DCTerminals(BaseClass*, BaseClass*); bool assign_DCTerminal_DCConductingEquipment(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,10 +58,10 @@ bool assign_DCTerminal_DCConductingEquipment(BaseClass* BaseClass_ptr1, BaseClas return false; } - bool get_DCTerminal_DCConductingEquipment(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DCTerminal* element = dynamic_cast(BaseClass_ptr1)) + const DCTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DCConductingEquipment != 0) { @@ -74,7 +72,6 @@ bool get_DCTerminal_DCConductingEquipment(const BaseClass* BaseClass_ptr1, std:: return false; } - const char DCTerminal::debugName[] = "DCTerminal"; const char* DCTerminal::debugString() const { @@ -83,7 +80,7 @@ const char* DCTerminal::debugString() const void DCTerminal::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCTerminal"), &DCTerminal_factory)); + factory_map.emplace("cim:DCTerminal", &DCTerminal_factory); } void DCTerminal::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -92,7 +89,7 @@ void DCTerminal::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCTerminal.DCConductingEquipment"), &assign_DCTerminal_DCConductingEquipment)); + assign_map.emplace("cim:DCTerminal.DCConductingEquipment", &assign_DCTerminal_DCConductingEquipment); } void DCTerminal::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/DCTerminal.hpp b/CGMES_2.4.13_18DEC2013/DCTerminal.hpp index fcbea323f..b750fd4c5 100644 --- a/CGMES_2.4.13_18DEC2013/DCTerminal.hpp +++ b/CGMES_2.4.13_18DEC2013/DCTerminal.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class DCConductingEquipment; - /* - A DC electrical connection point to a piece of DC conducting equipment. Terminals are connected at physical connection points called DC nodes. - */ + /** \brief A DC electrical connection point to a piece of DC conducting equipment. Terminals are connected at physical connection points called DC nodes. */ class DCTerminal : public DCBaseTerminal { public: @@ -27,7 +25,8 @@ namespace CIMPP DCTerminal(); ~DCTerminal() override; - CIMPP::DCConductingEquipment* DCConductingEquipment; /* Default: 0 */ + /** \brief Default: 0 */ + CIMPP::DCConductingEquipment* DCConductingEquipment; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/DCTopologicalIsland.cpp b/CGMES_2.4.13_18DEC2013/DCTopologicalIsland.cpp index c75bdc26e..1e7a83ea2 100644 --- a/CGMES_2.4.13_18DEC2013/DCTopologicalIsland.cpp +++ b/CGMES_2.4.13_18DEC2013/DCTopologicalIsland.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCTopologicalIsland::DCTopologicalIsland() {}; -DCTopologicalIsland::~DCTopologicalIsland() {}; +DCTopologicalIsland::DCTopologicalIsland() {} +DCTopologicalIsland::~DCTopologicalIsland() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ DCTopologicalIsland::getPossibleProfilesForAttributes() const return map; } - - bool assign_DCTopologicalNode_DCTopologicalIsland(BaseClass*, BaseClass*); bool assign_DCTopologicalIsland_DCTopologicalNodes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_DCTopologicalIsland_DCTopologicalNodes(BaseClass* BaseClass_ptr1, Ba return false; } - bool get_DCTopologicalIsland_DCTopologicalNodes(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DCTopologicalIsland* element = dynamic_cast(BaseClass_ptr1)) + const DCTopologicalIsland* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { std::copy(element->DCTopologicalNodes.begin(), element->DCTopologicalNodes.end(), std::back_inserter(BaseClass_list)); return !BaseClass_list.empty(); @@ -70,7 +68,6 @@ bool get_DCTopologicalIsland_DCTopologicalNodes(const BaseClass* BaseClass_ptr1, return false; } - const char DCTopologicalIsland::debugName[] = "DCTopologicalIsland"; const char* DCTopologicalIsland::debugString() const { @@ -79,7 +76,7 @@ const char* DCTopologicalIsland::debugString() const void DCTopologicalIsland::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCTopologicalIsland"), &DCTopologicalIsland_factory)); + factory_map.emplace("cim:DCTopologicalIsland", &DCTopologicalIsland_factory); } void DCTopologicalIsland::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -88,7 +85,7 @@ void DCTopologicalIsland::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCTopologicalIsland.DCTopologicalNodes"), &assign_DCTopologicalIsland_DCTopologicalNodes)); + assign_map.emplace("cim:DCTopologicalIsland.DCTopologicalNodes", &assign_DCTopologicalIsland_DCTopologicalNodes); } void DCTopologicalIsland::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/DCTopologicalIsland.hpp b/CGMES_2.4.13_18DEC2013/DCTopologicalIsland.hpp index 2989980c0..35384ea69 100644 --- a/CGMES_2.4.13_18DEC2013/DCTopologicalIsland.hpp +++ b/CGMES_2.4.13_18DEC2013/DCTopologicalIsland.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class DCTopologicalNode; - /* - An electrically connected subset of the network. DC topological islands can change as the current network state changes: e.g. due to - disconnect switches or breakers change state in a SCADA/EMS - manual creation, change or deletion of topological nodes in a planning tool. - */ + /** \brief An electrically connected subset of the network. DC topological islands can change as the current network state changes: e.g. due to - disconnect switches or breakers change state in a SCADA/EMS - manual creation, change or deletion of topological nodes in a planning tool. */ class DCTopologicalIsland : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP DCTopologicalIsland(); ~DCTopologicalIsland() override; - std::list DCTopologicalNodes; /* Default: 0 */ + /** \brief Default: 0 */ + std::list DCTopologicalNodes; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/DCTopologicalNode.cpp b/CGMES_2.4.13_18DEC2013/DCTopologicalNode.cpp index a21c1f7d0..6c338a5f5 100644 --- a/CGMES_2.4.13_18DEC2013/DCTopologicalNode.cpp +++ b/CGMES_2.4.13_18DEC2013/DCTopologicalNode.cpp @@ -8,15 +8,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include +#include "DCBaseTerminal.hpp" #include "DCEquipmentContainer.hpp" #include "DCNode.hpp" -#include "DCBaseTerminal.hpp" #include "DCTopologicalIsland.hpp" using namespace CIMPP; -DCTopologicalNode::DCTopologicalNode() : DCEquipmentContainer(nullptr), DCTopologicalIsland(nullptr) {}; -DCTopologicalNode::~DCTopologicalNode() {}; +DCTopologicalNode::DCTopologicalNode() : DCEquipmentContainer(nullptr), DCTopologicalIsland(nullptr) {} +DCTopologicalNode::~DCTopologicalNode() {} static const std::list PossibleProfilesForClass = { @@ -47,8 +47,6 @@ DCTopologicalNode::getPossibleProfilesForAttributes() const return map; } - - bool assign_DCEquipmentContainer_DCTopologicalNode(BaseClass*, BaseClass*); bool assign_DCTopologicalNode_DCEquipmentContainer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -65,6 +63,7 @@ bool assign_DCTopologicalNode_DCEquipmentContainer(BaseClass* BaseClass_ptr1, Ba } return false; } + bool assign_DCNode_DCTopologicalNode(BaseClass*, BaseClass*); bool assign_DCTopologicalNode_DCNodes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -81,6 +80,7 @@ bool assign_DCTopologicalNode_DCNodes(BaseClass* BaseClass_ptr1, BaseClass* Base } return false; } + bool assign_DCBaseTerminal_DCTopologicalNode(BaseClass*, BaseClass*); bool assign_DCTopologicalNode_DCTerminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -97,6 +97,7 @@ bool assign_DCTopologicalNode_DCTerminals(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_DCTopologicalIsland_DCTopologicalNodes(BaseClass*, BaseClass*); bool assign_DCTopologicalNode_DCTopologicalIsland(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -114,10 +115,10 @@ bool assign_DCTopologicalNode_DCTopologicalIsland(BaseClass* BaseClass_ptr1, Bas return false; } - bool get_DCTopologicalNode_DCEquipmentContainer(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DCTopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + const DCTopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DCEquipmentContainer != 0) { @@ -130,7 +131,8 @@ bool get_DCTopologicalNode_DCEquipmentContainer(const BaseClass* BaseClass_ptr1, bool get_DCTopologicalNode_DCNodes(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DCTopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + const DCTopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { std::copy(element->DCNodes.begin(), element->DCNodes.end(), std::back_inserter(BaseClass_list)); return !BaseClass_list.empty(); @@ -139,6 +141,7 @@ bool get_DCTopologicalNode_DCNodes(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCTopologicalNode"), &DCTopologicalNode_factory)); + factory_map.emplace("cim:DCTopologicalNode", &DCTopologicalNode_factory); } void DCTopologicalNode::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -156,10 +159,10 @@ void DCTopologicalNode::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCTopologicalNode.DCEquipmentContainer"), &assign_DCTopologicalNode_DCEquipmentContainer)); - assign_map.insert(std::make_pair(std::string("cim:DCTopologicalNode.DCNodes"), &assign_DCTopologicalNode_DCNodes)); - assign_map.insert(std::make_pair(std::string("cim:DCTopologicalNode.DCTerminals"), &assign_DCTopologicalNode_DCTerminals)); - assign_map.insert(std::make_pair(std::string("cim:DCTopologicalNode.DCTopologicalIsland"), &assign_DCTopologicalNode_DCTopologicalIsland)); + assign_map.emplace("cim:DCTopologicalNode.DCEquipmentContainer", &assign_DCTopologicalNode_DCEquipmentContainer); + assign_map.emplace("cim:DCTopologicalNode.DCNodes", &assign_DCTopologicalNode_DCNodes); + assign_map.emplace("cim:DCTopologicalNode.DCTerminals", &assign_DCTopologicalNode_DCTerminals); + assign_map.emplace("cim:DCTopologicalNode.DCTopologicalIsland", &assign_DCTopologicalNode_DCTopologicalIsland); } void DCTopologicalNode::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/DCTopologicalNode.hpp b/CGMES_2.4.13_18DEC2013/DCTopologicalNode.hpp index 9a417fc78..893680baa 100644 --- a/CGMES_2.4.13_18DEC2013/DCTopologicalNode.hpp +++ b/CGMES_2.4.13_18DEC2013/DCTopologicalNode.hpp @@ -20,9 +20,7 @@ namespace CIMPP class DCNode; class DCTopologicalIsland; - /* - DC bus. - */ + /** \brief DC bus. */ class DCTopologicalNode : public IdentifiedObject { public: @@ -30,10 +28,17 @@ namespace CIMPP DCTopologicalNode(); ~DCTopologicalNode() override; - CIMPP::DCEquipmentContainer* DCEquipmentContainer; /* Default: 0 */ - std::list DCNodes; /* See association end ConnectivityNode.TopologicalNode. Default: 0 */ - std::list DCTerminals; /* See association end Terminal.TopologicalNode. Default: 0 */ - CIMPP::DCTopologicalIsland* DCTopologicalIsland; /* Default: 0 */ + /** \brief Default: 0 */ + CIMPP::DCEquipmentContainer* DCEquipmentContainer; + + /** \brief See association end ConnectivityNode.TopologicalNode. Default: 0 */ + std::list DCNodes; + + /** \brief See association end Terminal.TopologicalNode. Default: 0 */ + std::list DCTerminals; + + /** \brief Default: 0 */ + CIMPP::DCTopologicalIsland* DCTopologicalIsland; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Date.hpp b/CGMES_2.4.13_18DEC2013/Date.hpp index e2063f08d..2b1ac1788 100644 --- a/CGMES_2.4.13_18DEC2013/Date.hpp +++ b/CGMES_2.4.13_18DEC2013/Date.hpp @@ -4,22 +4,20 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen */ -#include #include #include +#include namespace CIMPP { - /* - Date as "yyyy-mm-dd", which conforms with ISO 8601. UTC time zone is specified as "yyyy-mm-ddZ". A local timezone relative UTC is specified as "yyyy-mm-dd(+/-)hh:mm". - */ + /** \brief Date as "yyyy-mm-dd", which conforms with ISO 8601. UTC time zone is specified as "yyyy-mm-ddZ". A local timezone relative UTC is specified as "yyyy-mm-dd(+/-)hh:mm". */ class Date { public: Date() : initialized(false) {} Date(const std::string& value) : value(value), initialized(true) {} - Date& operator=(const std::string &rop); + Date& operator=(const std::string& rop); operator std::string() const; std::string value; diff --git a/CGMES_2.4.13_18DEC2013/DateTime.hpp b/CGMES_2.4.13_18DEC2013/DateTime.hpp index 745e7583b..1e503d539 100644 --- a/CGMES_2.4.13_18DEC2013/DateTime.hpp +++ b/CGMES_2.4.13_18DEC2013/DateTime.hpp @@ -4,22 +4,20 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen */ -#include #include #include +#include namespace CIMPP { - /* - Date and time as "yyyy-mm-ddThh:mm:ss.sss", which conforms with ISO 8601. UTC time zone is specified as "yyyy-mm-ddThh:mm:ss.sssZ". A local timezone relative UTC is specified as "yyyy-mm-ddThh:mm:ss.sss-hh:mm". The second component (shown here as "ss.sss") could have any number of digits in its fractional part to allow any kind of precision beyond seconds. - */ + /** \brief Date and time as "yyyy-mm-ddThh:mm:ss.sss", which conforms with ISO 8601. UTC time zone is specified as "yyyy-mm-ddThh:mm:ss.sssZ". A local timezone relative UTC is specified as "yyyy-mm-ddThh:mm:ss.sss-hh:mm". The second component (shown here as "ss.sss") could have any number of digits in its fractional part to allow any kind of precision beyond seconds. */ class DateTime { public: DateTime() : initialized(false) {} DateTime(const std::string& value) : value(value), initialized(true) {} - DateTime& operator=(const std::string &rop); + DateTime& operator=(const std::string& rop); operator std::string() const; std::string value; diff --git a/CGMES_2.4.13_18DEC2013/DayType.cpp b/CGMES_2.4.13_18DEC2013/DayType.cpp index f97e62d1d..3783d542a 100644 --- a/CGMES_2.4.13_18DEC2013/DayType.cpp +++ b/CGMES_2.4.13_18DEC2013/DayType.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DayType::DayType() {}; -DayType::~DayType() {}; +DayType::DayType() {} +DayType::~DayType() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ DayType::getPossibleProfilesForAttributes() const return map; } - - bool assign_SeasonDayTypeSchedule_DayType(BaseClass*, BaseClass*); bool assign_DayType_SeasonDayTypeSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_DayType_SeasonDayTypeSchedules(BaseClass* BaseClass_ptr1, BaseClass* } - const char DayType::debugName[] = "DayType"; const char* DayType::debugString() const { @@ -69,7 +66,7 @@ const char* DayType::debugString() const void DayType::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DayType"), &DayType_factory)); + factory_map.emplace("cim:DayType", &DayType_factory); } void DayType::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void DayType::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DayType.SeasonDayTypeSchedules"), &assign_DayType_SeasonDayTypeSchedules)); + assign_map.emplace("cim:DayType.SeasonDayTypeSchedules", &assign_DayType_SeasonDayTypeSchedules); } void DayType::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/DayType.hpp b/CGMES_2.4.13_18DEC2013/DayType.hpp index a45e7e1f4..71436c000 100644 --- a/CGMES_2.4.13_18DEC2013/DayType.hpp +++ b/CGMES_2.4.13_18DEC2013/DayType.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class SeasonDayTypeSchedule; - /* - Group of similar days. For example it could be used to represent weekdays, weekend, or holidays. - */ + /** \brief Group of similar days. For example it could be used to represent weekdays, weekend, or holidays. */ class DayType : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP DayType(); ~DayType() override; - std::list SeasonDayTypeSchedules; /* DayType for the Schedule. Default: 0 */ + /** \brief DayType for the Schedule. Default: 0 */ + std::list SeasonDayTypeSchedules; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Decimal.hpp b/CGMES_2.4.13_18DEC2013/Decimal.hpp index fa74e37f8..0c8633d79 100644 --- a/CGMES_2.4.13_18DEC2013/Decimal.hpp +++ b/CGMES_2.4.13_18DEC2013/Decimal.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Decimal is the base-10 notational system for representing real numbers. - */ + /** \brief Decimal is the base-10 notational system for representing real numbers. */ class Decimal { public: diff --git a/CGMES_2.4.13_18DEC2013/Diagram.cpp b/CGMES_2.4.13_18DEC2013/Diagram.cpp index a3d865170..20da79106 100644 --- a/CGMES_2.4.13_18DEC2013/Diagram.cpp +++ b/CGMES_2.4.13_18DEC2013/Diagram.cpp @@ -10,16 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "DiagramObject.hpp" #include "DiagramStyle.hpp" -#include "OrientationKind.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -Diagram::Diagram() : DiagramStyle(nullptr) {}; -Diagram::~Diagram() {}; +Diagram::Diagram() : DiagramStyle(nullptr) {} +Diagram::~Diagram() {} static const std::list PossibleProfilesForClass = { @@ -52,125 +47,131 @@ Diagram::getPossibleProfilesForAttributes() const return map; } - -bool assign_Diagram_orientation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramObject_Diagram(BaseClass*, BaseClass*); +bool assign_Diagram_DiagramElements(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (Diagram* element = dynamic_cast(BaseClass_ptr1)) + Diagram* element = dynamic_cast(BaseClass_ptr1); + DiagramObject* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->orientation; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->DiagramElements.begin(), element->DiagramElements.end(), element2) == element->DiagramElements.end()) + { + element->DiagramElements.push_back(element2); + return assign_DiagramObject_Diagram(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_Diagram_x1InitialView(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramStyle_Diagram(BaseClass*, BaseClass*); +bool assign_Diagram_DiagramStyle(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (Diagram* element = dynamic_cast(BaseClass_ptr1)) + Diagram* element = dynamic_cast(BaseClass_ptr1); + DiagramStyle* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->x1InitialView; - if (buffer.fail()) - return false; - else - return true; + if (element->DiagramStyle != element2) + { + element->DiagramStyle = element2; + return assign_DiagramStyle_Diagram(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_Diagram_x2InitialView(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Diagram_orientation(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Diagram* element = dynamic_cast(BaseClass_ptr1)) + Diagram* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->x2InitialView; - if (buffer.fail()) - return false; - else + buffer >> element->orientation; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Diagram_y1InitialView(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Diagram_x1InitialView(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Diagram* element = dynamic_cast(BaseClass_ptr1)) + Diagram* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->y1InitialView; - if (buffer.fail()) - return false; - else + buffer >> element->x1InitialView; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Diagram_y2InitialView(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Diagram_x2InitialView(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Diagram* element = dynamic_cast(BaseClass_ptr1)) + Diagram* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->y2InitialView; - if (buffer.fail()) - return false; - else + buffer >> element->x2InitialView; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_DiagramObject_Diagram(BaseClass*, BaseClass*); -bool assign_Diagram_DiagramElements(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_Diagram_y1InitialView(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { Diagram* element = dynamic_cast(BaseClass_ptr1); - DiagramObject* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->DiagramElements.begin(), element->DiagramElements.end(), element2) == element->DiagramElements.end()) + buffer >> element->y1InitialView; + if (!buffer.fail()) { - element->DiagramElements.push_back(element2); - return assign_DiagramObject_Diagram(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_DiagramStyle_Diagram(BaseClass*, BaseClass*); -bool assign_Diagram_DiagramStyle(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_Diagram_y2InitialView(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { Diagram* element = dynamic_cast(BaseClass_ptr1); - DiagramStyle* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->DiagramStyle != element2) + buffer >> element->y2InitialView; + if (!buffer.fail()) { - element->DiagramStyle = element2; - return assign_DiagramStyle_Diagram(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool get_Diagram_x1InitialView(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) + +bool get_Diagram_DiagramStyle(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Diagram* element = dynamic_cast(BaseClass_ptr1)) + const Diagram* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->x1InitialView; - if (!buffer.str().empty()) + if (element->DiagramStyle != 0) { + BaseClass_list.push_back(element->DiagramStyle); return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_Diagram_x2InitialView(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_Diagram_orientation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Diagram* element = dynamic_cast(BaseClass_ptr1)) + const Diagram* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->x2InitialView; + buffer << element->orientation; if (!buffer.str().empty()) { return true; @@ -180,11 +181,12 @@ bool get_Diagram_x2InitialView(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } -bool get_Diagram_y1InitialView(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_Diagram_x1InitialView(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Diagram* element = dynamic_cast(BaseClass_ptr1)) + const Diagram* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->y1InitialView; + buffer << element->x1InitialView; if (!buffer.str().empty()) { return true; @@ -194,11 +196,12 @@ bool get_Diagram_y1InitialView(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } -bool get_Diagram_y2InitialView(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_Diagram_x2InitialView(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Diagram* element = dynamic_cast(BaseClass_ptr1)) + const Diagram* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->y2InitialView; + buffer << element->x2InitialView; if (!buffer.str().empty()) { return true; @@ -208,26 +211,27 @@ bool get_Diagram_y2InitialView(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } - -bool get_Diagram_DiagramStyle(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) +bool get_Diagram_y1InitialView(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Diagram* element = dynamic_cast(BaseClass_ptr1)) + const Diagram* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->DiagramStyle != 0) + buffer << element->y1InitialView; + if (!buffer.str().empty()) { - BaseClass_list.push_back(element->DiagramStyle); return true; } } + buffer.setstate(std::ios::failbit); return false; } - -bool get_Diagram_orientation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_Diagram_y2InitialView(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Diagram* element = dynamic_cast(BaseClass_ptr1)) + const Diagram* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->orientation; + buffer << element->y2InitialView; if (!buffer.str().empty()) { return true; @@ -245,22 +249,22 @@ const char* Diagram::debugString() const void Diagram::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Diagram"), &Diagram_factory)); + factory_map.emplace("cim:Diagram", &Diagram_factory); } void Diagram::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Diagram.orientation"), &assign_Diagram_orientation)); - assign_map.insert(std::make_pair(std::string("cim:Diagram.x1InitialView"), &assign_Diagram_x1InitialView)); - assign_map.insert(std::make_pair(std::string("cim:Diagram.x2InitialView"), &assign_Diagram_x2InitialView)); - assign_map.insert(std::make_pair(std::string("cim:Diagram.y1InitialView"), &assign_Diagram_y1InitialView)); - assign_map.insert(std::make_pair(std::string("cim:Diagram.y2InitialView"), &assign_Diagram_y2InitialView)); + assign_map.emplace("cim:Diagram.orientation", &assign_Diagram_orientation); + assign_map.emplace("cim:Diagram.x1InitialView", &assign_Diagram_x1InitialView); + assign_map.emplace("cim:Diagram.x2InitialView", &assign_Diagram_x2InitialView); + assign_map.emplace("cim:Diagram.y1InitialView", &assign_Diagram_y1InitialView); + assign_map.emplace("cim:Diagram.y2InitialView", &assign_Diagram_y2InitialView); } void Diagram::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Diagram.DiagramElements"), &assign_Diagram_DiagramElements)); - assign_map.insert(std::make_pair(std::string("cim:Diagram.DiagramStyle"), &assign_Diagram_DiagramStyle)); + assign_map.emplace("cim:Diagram.DiagramElements", &assign_Diagram_DiagramElements); + assign_map.emplace("cim:Diagram.DiagramStyle", &assign_Diagram_DiagramStyle); } void Diagram::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/Diagram.hpp b/CGMES_2.4.13_18DEC2013/Diagram.hpp index 4cad5f424..f8820ae2f 100644 --- a/CGMES_2.4.13_18DEC2013/Diagram.hpp +++ b/CGMES_2.4.13_18DEC2013/Diagram.hpp @@ -20,9 +20,7 @@ namespace CIMPP class DiagramObject; class DiagramStyle; - /* - The diagram being exchanged. The coordinate system is a standard Cartesian coordinate system and the orientation attribute defines the orientation. - */ + /** \brief The diagram being exchanged. The coordinate system is a standard Cartesian coordinate system and the orientation attribute defines the orientation. */ class Diagram : public IdentifiedObject { public: @@ -30,13 +28,26 @@ namespace CIMPP Diagram(); ~Diagram() override; - std::list DiagramElements; /* A diagram is made up of multiple diagram objects. Default: 0 */ - CIMPP::DiagramStyle* DiagramStyle; /* A Diagram may have a DiagramStyle. Default: 0 */ - CIMPP::OrientationKind orientation; /* Coordinate system orientation of the diagram. Default: 0 */ - CIMPP::Simple_Float x1InitialView; /* X coordinate of the first corner of the initial view. Default: nullptr */ - CIMPP::Simple_Float x2InitialView; /* X coordinate of the second corner of the initial view. Default: nullptr */ - CIMPP::Simple_Float y1InitialView; /* Y coordinate of the first corner of the initial view. Default: nullptr */ - CIMPP::Simple_Float y2InitialView; /* Y coordinate of the second corner of the initial view. Default: nullptr */ + /** \brief A diagram is made up of multiple diagram objects. Default: 0 */ + std::list DiagramElements; + + /** \brief A Diagram may have a DiagramStyle. Default: 0 */ + CIMPP::DiagramStyle* DiagramStyle; + + /** \brief Coordinate system orientation of the diagram. Default: 0 */ + CIMPP::OrientationKind orientation; + + /** \brief X coordinate of the first corner of the initial view. Default: nullptr */ + CIMPP::Simple_Float x1InitialView; + + /** \brief X coordinate of the second corner of the initial view. Default: nullptr */ + CIMPP::Simple_Float x2InitialView; + + /** \brief Y coordinate of the first corner of the initial view. Default: nullptr */ + CIMPP::Simple_Float y1InitialView; + + /** \brief Y coordinate of the second corner of the initial view. Default: nullptr */ + CIMPP::Simple_Float y2InitialView; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/DiagramLayoutVersion.cpp b/CGMES_2.4.13_18DEC2013/DiagramLayoutVersion.cpp index facaf59c2..55ea4f1cf 100644 --- a/CGMES_2.4.13_18DEC2013/DiagramLayoutVersion.cpp +++ b/CGMES_2.4.13_18DEC2013/DiagramLayoutVersion.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "String.hpp" -#include "String.hpp" -#include "Date.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -DiagramLayoutVersion::DiagramLayoutVersion() {}; -DiagramLayoutVersion::~DiagramLayoutVersion() {}; +DiagramLayoutVersion::DiagramLayoutVersion() {} +DiagramLayoutVersion::~DiagramLayoutVersion() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ DiagramLayoutVersion::getPossibleProfilesForAttributes() const return map; } - -bool assign_DiagramLayoutVersion_baseUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramLayoutVersion_baseUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiagramLayoutVersion_baseURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramLayoutVersion_baseURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiagramLayoutVersion_date(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramLayoutVersion_date(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->date = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiagramLayoutVersion_differenceModelURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramLayoutVersion_differenceModelURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->differenceModelURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiagramLayoutVersion_entsoeUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramLayoutVersion_entsoeUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiagramLayoutVersion_entsoeURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramLayoutVersion_entsoeURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiagramLayoutVersion_modelDescriptionURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramLayoutVersion_modelDescriptionURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->modelDescriptionURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiagramLayoutVersion_namespaceRDF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramLayoutVersion_namespaceRDF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceRDF = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiagramLayoutVersion_namespaceUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramLayoutVersion_namespaceUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiagramLayoutVersion_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramLayoutVersion_shortName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->shortName = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_DiagramLayoutVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseUML; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_DiagramLayoutVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stri bool get_DiagramLayoutVersion_baseURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseURI; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_DiagramLayoutVersion_baseURI(const BaseClass* BaseClass_ptr1, std::stri bool get_DiagramLayoutVersion_date(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->date; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_DiagramLayoutVersion_date(const BaseClass* BaseClass_ptr1, std::strings bool get_DiagramLayoutVersion_differenceModelURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->differenceModelURI; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_DiagramLayoutVersion_differenceModelURI(const BaseClass* BaseClass_ptr1 bool get_DiagramLayoutVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeUML; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_DiagramLayoutVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::st bool get_DiagramLayoutVersion_entsoeURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeURI; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_DiagramLayoutVersion_entsoeURI(const BaseClass* BaseClass_ptr1, std::st bool get_DiagramLayoutVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->modelDescriptionURI; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_DiagramLayoutVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr bool get_DiagramLayoutVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceRDF; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_DiagramLayoutVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std: bool get_DiagramLayoutVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceUML; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_DiagramLayoutVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std: bool get_DiagramLayoutVersion_shortName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortName; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_DiagramLayoutVersion_shortName(const BaseClass* BaseClass_ptr1, std::st return false; } - - const char DiagramLayoutVersion::debugName[] = "DiagramLayoutVersion"; const char* DiagramLayoutVersion::debugString() const { @@ -341,21 +346,21 @@ const char* DiagramLayoutVersion::debugString() const void DiagramLayoutVersion::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiagramLayoutVersion"), &DiagramLayoutVersion_factory)); + factory_map.emplace("cim:DiagramLayoutVersion", &DiagramLayoutVersion_factory); } void DiagramLayoutVersion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiagramLayoutVersion.baseUML"), &assign_DiagramLayoutVersion_baseUML)); - assign_map.insert(std::make_pair(std::string("cim:DiagramLayoutVersion.baseURI"), &assign_DiagramLayoutVersion_baseURI)); - assign_map.insert(std::make_pair(std::string("cim:DiagramLayoutVersion.date"), &assign_DiagramLayoutVersion_date)); - assign_map.insert(std::make_pair(std::string("cim:DiagramLayoutVersion.differenceModelURI"), &assign_DiagramLayoutVersion_differenceModelURI)); - assign_map.insert(std::make_pair(std::string("cim:DiagramLayoutVersion.entsoeUML"), &assign_DiagramLayoutVersion_entsoeUML)); - assign_map.insert(std::make_pair(std::string("cim:DiagramLayoutVersion.entsoeURI"), &assign_DiagramLayoutVersion_entsoeURI)); - assign_map.insert(std::make_pair(std::string("cim:DiagramLayoutVersion.modelDescriptionURI"), &assign_DiagramLayoutVersion_modelDescriptionURI)); - assign_map.insert(std::make_pair(std::string("cim:DiagramLayoutVersion.namespaceRDF"), &assign_DiagramLayoutVersion_namespaceRDF)); - assign_map.insert(std::make_pair(std::string("cim:DiagramLayoutVersion.namespaceUML"), &assign_DiagramLayoutVersion_namespaceUML)); - assign_map.insert(std::make_pair(std::string("cim:DiagramLayoutVersion.shortName"), &assign_DiagramLayoutVersion_shortName)); + assign_map.emplace("cim:DiagramLayoutVersion.baseUML", &assign_DiagramLayoutVersion_baseUML); + assign_map.emplace("cim:DiagramLayoutVersion.baseURI", &assign_DiagramLayoutVersion_baseURI); + assign_map.emplace("cim:DiagramLayoutVersion.date", &assign_DiagramLayoutVersion_date); + assign_map.emplace("cim:DiagramLayoutVersion.differenceModelURI", &assign_DiagramLayoutVersion_differenceModelURI); + assign_map.emplace("cim:DiagramLayoutVersion.entsoeUML", &assign_DiagramLayoutVersion_entsoeUML); + assign_map.emplace("cim:DiagramLayoutVersion.entsoeURI", &assign_DiagramLayoutVersion_entsoeURI); + assign_map.emplace("cim:DiagramLayoutVersion.modelDescriptionURI", &assign_DiagramLayoutVersion_modelDescriptionURI); + assign_map.emplace("cim:DiagramLayoutVersion.namespaceRDF", &assign_DiagramLayoutVersion_namespaceRDF); + assign_map.emplace("cim:DiagramLayoutVersion.namespaceUML", &assign_DiagramLayoutVersion_namespaceUML); + assign_map.emplace("cim:DiagramLayoutVersion.shortName", &assign_DiagramLayoutVersion_shortName); } void DiagramLayoutVersion::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/DiagramLayoutVersion.hpp b/CGMES_2.4.13_18DEC2013/DiagramLayoutVersion.hpp index e2ad534f1..e260f2faf 100644 --- a/CGMES_2.4.13_18DEC2013/DiagramLayoutVersion.hpp +++ b/CGMES_2.4.13_18DEC2013/DiagramLayoutVersion.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Version details. - */ + /** \brief Version details. */ class DiagramLayoutVersion : public BaseClass { public: @@ -28,16 +26,35 @@ namespace CIMPP DiagramLayoutVersion(); ~DiagramLayoutVersion() override; - CIMPP::String baseUML; /* Base UML provided by CIM model manager. Default: '' */ - CIMPP::String baseURI; /* Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ - CIMPP::Date date; /* Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ - CIMPP::String differenceModelURI; /* Difference model URI defined by IEC 61970-552. Default: '' */ - CIMPP::String entsoeUML; /* UML provided by ENTSO-E. Default: '' */ - CIMPP::String entsoeURI; /* Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/DiagramLayout/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ - CIMPP::String modelDescriptionURI; /* Model Description URI defined by IEC 61970-552. Default: '' */ - CIMPP::String namespaceRDF; /* RDF namespace. Default: '' */ - CIMPP::String namespaceUML; /* CIM UML namespace. Default: '' */ - CIMPP::String shortName; /* The short name of the profile used in profile documentation. Default: '' */ + /** \brief Base UML provided by CIM model manager. Default: '' */ + CIMPP::String baseUML; + + /** \brief Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ + CIMPP::String baseURI; + + /** \brief Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ + CIMPP::Date date; + + /** \brief Difference model URI defined by IEC 61970-552. Default: '' */ + CIMPP::String differenceModelURI; + + /** \brief UML provided by ENTSO-E. Default: '' */ + CIMPP::String entsoeUML; + + /** \brief Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/DiagramLayout/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ + CIMPP::String entsoeURI; + + /** \brief Model Description URI defined by IEC 61970-552. Default: '' */ + CIMPP::String modelDescriptionURI; + + /** \brief RDF namespace. Default: '' */ + CIMPP::String namespaceRDF; + + /** \brief CIM UML namespace. Default: '' */ + CIMPP::String namespaceUML; + + /** \brief The short name of the profile used in profile documentation. Default: '' */ + CIMPP::String shortName; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/DiagramObject.cpp b/CGMES_2.4.13_18DEC2013/DiagramObject.cpp index bb729a381..26515a78e 100644 --- a/CGMES_2.4.13_18DEC2013/DiagramObject.cpp +++ b/CGMES_2.4.13_18DEC2013/DiagramObject.cpp @@ -13,16 +13,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "DiagramObjectStyle.hpp" #include "IdentifiedObject.hpp" #include "VisibilityLayer.hpp" -#include "Integer.hpp" -#include "Boolean.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "AngleDegrees.hpp" using namespace CIMPP; -DiagramObject::DiagramObject() : Diagram(nullptr), DiagramObjectStyle(nullptr), IdentifiedObject(nullptr) {}; -DiagramObject::~DiagramObject() {}; +DiagramObject::DiagramObject() : Diagram(nullptr), DiagramObjectStyle(nullptr), IdentifiedObject(nullptr) {} +DiagramObject::~DiagramObject() {} static const std::list PossibleProfilesForClass = { @@ -58,73 +53,6 @@ DiagramObject::getPossibleProfilesForAttributes() const return map; } - -bool assign_DiagramObject_drawingOrder(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (DiagramObject* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->drawingOrder; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_DiagramObject_isPolygon(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (DiagramObject* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->isPolygon; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_DiagramObject_offsetX(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (DiagramObject* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->offsetX; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_DiagramObject_offsetY(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (DiagramObject* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->offsetY; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_DiagramObject_rotation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (DiagramObject* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->rotation; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_Diagram_DiagramElements(BaseClass*, BaseClass*); bool assign_DiagramObject_Diagram(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -141,6 +69,7 @@ bool assign_DiagramObject_Diagram(BaseClass* BaseClass_ptr1, BaseClass* BaseClas } return false; } + bool assign_DiagramObjectPoint_DiagramObject(BaseClass*, BaseClass*); bool assign_DiagramObject_DiagramObjectPoints(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -157,6 +86,7 @@ bool assign_DiagramObject_DiagramObjectPoints(BaseClass* BaseClass_ptr1, BaseCla } return false; } + bool assign_DiagramObjectStyle_StyledObjects(BaseClass*, BaseClass*); bool assign_DiagramObject_DiagramObjectStyle(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -173,6 +103,7 @@ bool assign_DiagramObject_DiagramObjectStyle(BaseClass* BaseClass_ptr1, BaseClas } return false; } + bool assign_IdentifiedObject_DiagramObjects(BaseClass*, BaseClass*); bool assign_DiagramObject_IdentifiedObject(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -189,6 +120,7 @@ bool assign_DiagramObject_IdentifiedObject(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_VisibilityLayer_VisibleObjects(BaseClass*, BaseClass*); bool assign_DiagramObject_VisibilityLayers(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -206,80 +138,80 @@ bool assign_DiagramObject_VisibilityLayers(BaseClass* BaseClass_ptr1, BaseClass* return false; } -bool get_DiagramObject_drawingOrder(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_DiagramObject_drawingOrder(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const DiagramObject* element = dynamic_cast(BaseClass_ptr1)) + DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->drawingOrder; - if (!buffer.str().empty()) + buffer >> element->drawingOrder; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_DiagramObject_isPolygon(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_DiagramObject_isPolygon(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const DiagramObject* element = dynamic_cast(BaseClass_ptr1)) + DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->isPolygon; - if (!buffer.str().empty()) + buffer >> element->isPolygon; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_DiagramObject_offsetX(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_DiagramObject_offsetX(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const DiagramObject* element = dynamic_cast(BaseClass_ptr1)) + DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->offsetX; - if (!buffer.str().empty()) + buffer >> element->offsetX; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_DiagramObject_offsetY(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_DiagramObject_offsetY(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const DiagramObject* element = dynamic_cast(BaseClass_ptr1)) + DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->offsetY; - if (!buffer.str().empty()) + buffer >> element->offsetY; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_DiagramObject_rotation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_DiagramObject_rotation(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const DiagramObject* element = dynamic_cast(BaseClass_ptr1)) + DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->rotation; - if (!buffer.str().empty()) + buffer >> element->rotation; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_DiagramObject_Diagram(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DiagramObject* element = dynamic_cast(BaseClass_ptr1)) + const DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Diagram != 0) { @@ -290,9 +222,11 @@ bool get_DiagramObject_Diagram(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DiagramObject* element = dynamic_cast(BaseClass_ptr1)) + const DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DiagramObjectStyle != 0) { @@ -305,7 +239,8 @@ bool get_DiagramObject_DiagramObjectStyle(const BaseClass* BaseClass_ptr1, std:: bool get_DiagramObject_IdentifiedObject(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DiagramObject* element = dynamic_cast(BaseClass_ptr1)) + const DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->IdentifiedObject != 0) { @@ -317,6 +252,81 @@ bool get_DiagramObject_IdentifiedObject(const BaseClass* BaseClass_ptr1, std::li } +bool get_DiagramObject_drawingOrder(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->drawingOrder; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_DiagramObject_isPolygon(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->isPolygon; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_DiagramObject_offsetX(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->offsetX; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_DiagramObject_offsetY(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->offsetY; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_DiagramObject_rotation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->rotation; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + const char DiagramObject::debugName[] = "DiagramObject"; const char* DiagramObject::debugString() const { @@ -325,25 +335,25 @@ const char* DiagramObject::debugString() const void DiagramObject::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiagramObject"), &DiagramObject_factory)); + factory_map.emplace("cim:DiagramObject", &DiagramObject_factory); } void DiagramObject::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.drawingOrder"), &assign_DiagramObject_drawingOrder)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.isPolygon"), &assign_DiagramObject_isPolygon)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.offsetX"), &assign_DiagramObject_offsetX)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.offsetY"), &assign_DiagramObject_offsetY)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.rotation"), &assign_DiagramObject_rotation)); + assign_map.emplace("cim:DiagramObject.drawingOrder", &assign_DiagramObject_drawingOrder); + assign_map.emplace("cim:DiagramObject.isPolygon", &assign_DiagramObject_isPolygon); + assign_map.emplace("cim:DiagramObject.offsetX", &assign_DiagramObject_offsetX); + assign_map.emplace("cim:DiagramObject.offsetY", &assign_DiagramObject_offsetY); + assign_map.emplace("cim:DiagramObject.rotation", &assign_DiagramObject_rotation); } void DiagramObject::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.Diagram"), &assign_DiagramObject_Diagram)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.DiagramObjectPoints"), &assign_DiagramObject_DiagramObjectPoints)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.DiagramObjectStyle"), &assign_DiagramObject_DiagramObjectStyle)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.IdentifiedObject"), &assign_DiagramObject_IdentifiedObject)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.VisibilityLayers"), &assign_DiagramObject_VisibilityLayers)); + assign_map.emplace("cim:DiagramObject.Diagram", &assign_DiagramObject_Diagram); + assign_map.emplace("cim:DiagramObject.DiagramObjectPoints", &assign_DiagramObject_DiagramObjectPoints); + assign_map.emplace("cim:DiagramObject.DiagramObjectStyle", &assign_DiagramObject_DiagramObjectStyle); + assign_map.emplace("cim:DiagramObject.IdentifiedObject", &assign_DiagramObject_IdentifiedObject); + assign_map.emplace("cim:DiagramObject.VisibilityLayers", &assign_DiagramObject_VisibilityLayers); } void DiagramObject::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/DiagramObject.hpp b/CGMES_2.4.13_18DEC2013/DiagramObject.hpp index 660135c59..b755a906d 100644 --- a/CGMES_2.4.13_18DEC2013/DiagramObject.hpp +++ b/CGMES_2.4.13_18DEC2013/DiagramObject.hpp @@ -25,9 +25,7 @@ namespace CIMPP class IdentifiedObject; class VisibilityLayer; - /* - An object that defines one or more points in a given space. This object can be associated with anything that specializes IdentifiedObject. For single line diagrams such objects typically include such items as analog values, breakers, disconnectors, power transformers, and transmission lines. - */ + /** \brief An object that defines one or more points in a given space. This object can be associated with anything that specializes IdentifiedObject. For single line diagrams such objects typically include such items as analog values, breakers, disconnectors, power transformers, and transmission lines. */ class DiagramObject : public BaseClass { public: @@ -35,16 +33,35 @@ namespace CIMPP DiagramObject(); ~DiagramObject() override; - CIMPP::Diagram* Diagram; /* A diagram object is part of a diagram. Default: 0 */ - std::list DiagramObjectPoints; /* A diagram object can have 0 or more points to reflect its layout position, routing (for polylines) or boundary (for polygons). Default: 0 */ - CIMPP::DiagramObjectStyle* DiagramObjectStyle; /* A diagram object has a style associated that provides a reference for the style used in the originating system. Default: 0 */ - CIMPP::IdentifiedObject* IdentifiedObject; /* The diagram objects that are associated with the domain object. Default: 0 */ - std::list VisibilityLayers; /* A diagram object can be part of multiple visibility layers. Default: 0 */ - CIMPP::Integer drawingOrder; /* The drawing order of this element. The higher the number, the later the element is drawn in sequence. This is used to ensure that elements that overlap are rendered in the correct order. Default: 0 */ - CIMPP::Boolean isPolygon; /* Defines whether or not the diagram objects points define the boundaries of a polygon or the routing of a polyline. If this value is true then a receiving application should consider the first and last points to be connected. Default: false */ - CIMPP::Simple_Float offsetX; /* The offset in the X direction. This is used for defining the offset from centre for rendering an icon (the default is that a single point specifies the centre of the icon). The offset is in per-unit with 0 indicating there is no offset from the horizontal centre of the icon. -0.5 indicates it is offset by 50% to the left and 0.5 indicates an offset of 50% to the right. Default: nullptr */ - CIMPP::Simple_Float offsetY; /* The offset in the Y direction. This is used for defining the offset from centre for rendering an icon (the default is that a single point specifies the centre of the icon). The offset is in per-unit with 0 indicating there is no offset from the vertical centre of the icon. The offset direction is dependent on the orientation of the diagram, with -0.5 and 0.5 indicating an offset of +/- 50% on the vertical axis. Default: nullptr */ - CIMPP::AngleDegrees rotation; /* Sets the angle of rotation of the diagram object. Zero degrees is pointing to the top of the diagram. Rotation is clockwise. Default: nullptr */ + /** \brief A diagram object is part of a diagram. Default: 0 */ + CIMPP::Diagram* Diagram; + + /** \brief A diagram object can have 0 or more points to reflect its layout position, routing (for polylines) or boundary (for polygons). Default: 0 */ + std::list DiagramObjectPoints; + + /** \brief A diagram object has a style associated that provides a reference for the style used in the originating system. Default: 0 */ + CIMPP::DiagramObjectStyle* DiagramObjectStyle; + + /** \brief The diagram objects that are associated with the domain object. Default: 0 */ + CIMPP::IdentifiedObject* IdentifiedObject; + + /** \brief A diagram object can be part of multiple visibility layers. Default: 0 */ + std::list VisibilityLayers; + + /** \brief The drawing order of this element. The higher the number, the later the element is drawn in sequence. This is used to ensure that elements that overlap are rendered in the correct order. Default: 0 */ + CIMPP::Integer drawingOrder; + + /** \brief Defines whether or not the diagram objects points define the boundaries of a polygon or the routing of a polyline. If this value is true then a receiving application should consider the first and last points to be connected. Default: false */ + CIMPP::Boolean isPolygon; + + /** \brief The offset in the X direction. This is used for defining the offset from centre for rendering an icon (the default is that a single point specifies the centre of the icon). The offset is in per-unit with 0 indicating there is no offset from the horizontal centre of the icon. -0.5 indicates it is offset by 50% to the left and 0.5 indicates an offset of 50% to the right. Default: nullptr */ + CIMPP::Simple_Float offsetX; + + /** \brief The offset in the Y direction. This is used for defining the offset from centre for rendering an icon (the default is that a single point specifies the centre of the icon). The offset is in per-unit with 0 indicating there is no offset from the vertical centre of the icon. The offset direction is dependent on the orientation of the diagram, with -0.5 and 0.5 indicating an offset of +/- 50% on the vertical axis. Default: nullptr */ + CIMPP::Simple_Float offsetY; + + /** \brief Sets the angle of rotation of the diagram object. Zero degrees is pointing to the top of the diagram. Rotation is clockwise. Default: nullptr */ + CIMPP::AngleDegrees rotation; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/DiagramObjectGluePoint.cpp b/CGMES_2.4.13_18DEC2013/DiagramObjectGluePoint.cpp index 256d139b9..eea8918f9 100644 --- a/CGMES_2.4.13_18DEC2013/DiagramObjectGluePoint.cpp +++ b/CGMES_2.4.13_18DEC2013/DiagramObjectGluePoint.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DiagramObjectGluePoint::DiagramObjectGluePoint() {}; -DiagramObjectGluePoint::~DiagramObjectGluePoint() {}; +DiagramObjectGluePoint::DiagramObjectGluePoint() {} +DiagramObjectGluePoint::~DiagramObjectGluePoint() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ DiagramObjectGluePoint::getPossibleProfilesForAttributes() const return map; } - - bool assign_DiagramObjectPoint_DiagramObjectGluePoint(BaseClass*, BaseClass*); bool assign_DiagramObjectGluePoint_DiagramObjectPoints(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_DiagramObjectGluePoint_DiagramObjectPoints(BaseClass* BaseClass_ptr1 } - const char DiagramObjectGluePoint::debugName[] = "DiagramObjectGluePoint"; const char* DiagramObjectGluePoint::debugString() const { @@ -69,7 +66,7 @@ const char* DiagramObjectGluePoint::debugString() const void DiagramObjectGluePoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiagramObjectGluePoint"), &DiagramObjectGluePoint_factory)); + factory_map.emplace("cim:DiagramObjectGluePoint", &DiagramObjectGluePoint_factory); } void DiagramObjectGluePoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void DiagramObjectGluePoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiagramObjectGluePoint.DiagramObjectPoints"), &assign_DiagramObjectGluePoint_DiagramObjectPoints)); + assign_map.emplace("cim:DiagramObjectGluePoint.DiagramObjectPoints", &assign_DiagramObjectGluePoint_DiagramObjectPoints); } void DiagramObjectGluePoint::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/DiagramObjectGluePoint.hpp b/CGMES_2.4.13_18DEC2013/DiagramObjectGluePoint.hpp index 4733c7d00..fec9f8e23 100644 --- a/CGMES_2.4.13_18DEC2013/DiagramObjectGluePoint.hpp +++ b/CGMES_2.4.13_18DEC2013/DiagramObjectGluePoint.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class DiagramObjectPoint; - /* - This is used for grouping diagram object points from different diagram objects that are considered to be glued together in a diagram even if they are not at the exact same coordinates. - */ + /** \brief This is used for grouping diagram object points from different diagram objects that are considered to be glued together in a diagram even if they are not at the exact same coordinates. */ class DiagramObjectGluePoint : public BaseClass { public: @@ -27,7 +25,8 @@ namespace CIMPP DiagramObjectGluePoint(); ~DiagramObjectGluePoint() override; - std::list DiagramObjectPoints; /* The `glue` point to which this point is associated. Default: 0 */ + /** \brief The `glue` point to which this point is associated. Default: 0 */ + std::list DiagramObjectPoints; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/DiagramObjectPoint.cpp b/CGMES_2.4.13_18DEC2013/DiagramObjectPoint.cpp index 96760a8d2..4afd45f45 100644 --- a/CGMES_2.4.13_18DEC2013/DiagramObjectPoint.cpp +++ b/CGMES_2.4.13_18DEC2013/DiagramObjectPoint.cpp @@ -10,15 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "DiagramObject.hpp" #include "DiagramObjectGluePoint.hpp" -#include "Integer.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -DiagramObjectPoint::DiagramObjectPoint() : DiagramObject(nullptr), DiagramObjectGluePoint(nullptr) {}; -DiagramObjectPoint::~DiagramObjectPoint() {}; +DiagramObjectPoint::DiagramObjectPoint() : DiagramObject(nullptr), DiagramObjectGluePoint(nullptr) {} +DiagramObjectPoint::~DiagramObjectPoint() {} static const std::list PossibleProfilesForClass = { @@ -50,126 +46,130 @@ DiagramObjectPoint::getPossibleProfilesForAttributes() const return map; } - -bool assign_DiagramObjectPoint_sequenceNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramObject_DiagramObjectPoints(BaseClass*, BaseClass*); +bool assign_DiagramObjectPoint_DiagramObject(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + DiagramObject* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->sequenceNumber; - if (buffer.fail()) - return false; - else - return true; + if (element->DiagramObject != element2) + { + element->DiagramObject = element2; + return assign_DiagramObject_DiagramObjectPoints(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_DiagramObjectPoint_xPosition(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramObjectGluePoint_DiagramObjectPoints(BaseClass*, BaseClass*); +bool assign_DiagramObjectPoint_DiagramObjectGluePoint(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + DiagramObjectGluePoint* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->xPosition; - if (buffer.fail()) - return false; - else - return true; + if (element->DiagramObjectGluePoint != element2) + { + element->DiagramObjectGluePoint = element2; + return assign_DiagramObjectGluePoint_DiagramObjectPoints(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_DiagramObjectPoint_yPosition(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramObjectPoint_sequenceNumber(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->yPosition; - if (buffer.fail()) - return false; - else + buffer >> element->sequenceNumber; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiagramObjectPoint_zPosition(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramObjectPoint_xPosition(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->zPosition; - if (buffer.fail()) - return false; - else + buffer >> element->xPosition; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_DiagramObject_DiagramObjectPoints(BaseClass*, BaseClass*); -bool assign_DiagramObjectPoint_DiagramObject(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_DiagramObjectPoint_yPosition(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); - DiagramObject* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->DiagramObject != element2) + buffer >> element->yPosition; + if (!buffer.fail()) { - element->DiagramObject = element2; - return assign_DiagramObject_DiagramObjectPoints(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_DiagramObjectGluePoint_DiagramObjectPoints(BaseClass*, BaseClass*); -bool assign_DiagramObjectPoint_DiagramObjectGluePoint(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_DiagramObjectPoint_zPosition(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); - DiagramObjectGluePoint* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->DiagramObjectGluePoint != element2) + buffer >> element->zPosition; + if (!buffer.fail()) { - element->DiagramObjectGluePoint = element2; - return assign_DiagramObjectGluePoint_DiagramObjectPoints(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool get_DiagramObjectPoint_sequenceNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_DiagramObjectPoint_DiagramObject(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->sequenceNumber; - if (!buffer.str().empty()) + if (element->DiagramObject != 0) { + BaseClass_list.push_back(element->DiagramObject); return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_DiagramObjectPoint_xPosition(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_DiagramObjectPoint_DiagramObjectGluePoint(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xPosition; - if (!buffer.str().empty()) + if (element->DiagramObjectGluePoint != 0) { + BaseClass_list.push_back(element->DiagramObjectGluePoint); return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_DiagramObjectPoint_yPosition(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_DiagramObjectPoint_sequenceNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->yPosition; + buffer << element->sequenceNumber; if (!buffer.str().empty()) { return true; @@ -179,11 +179,12 @@ bool get_DiagramObjectPoint_yPosition(const BaseClass* BaseClass_ptr1, std::stri return false; } -bool get_DiagramObjectPoint_zPosition(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_DiagramObjectPoint_xPosition(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->zPosition; + buffer << element->xPosition; if (!buffer.str().empty()) { return true; @@ -193,34 +194,36 @@ bool get_DiagramObjectPoint_zPosition(const BaseClass* BaseClass_ptr1, std::stri return false; } - -bool get_DiagramObjectPoint_DiagramObject(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) +bool get_DiagramObjectPoint_yPosition(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->DiagramObject != 0) + buffer << element->yPosition; + if (!buffer.str().empty()) { - BaseClass_list.push_back(element->DiagramObject); return true; } } + buffer.setstate(std::ios::failbit); return false; } -bool get_DiagramObjectPoint_DiagramObjectGluePoint(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) +bool get_DiagramObjectPoint_zPosition(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->DiagramObjectGluePoint != 0) + buffer << element->zPosition; + if (!buffer.str().empty()) { - BaseClass_list.push_back(element->DiagramObjectGluePoint); return true; } } + buffer.setstate(std::ios::failbit); return false; } - const char DiagramObjectPoint::debugName[] = "DiagramObjectPoint"; const char* DiagramObjectPoint::debugString() const { @@ -229,21 +232,21 @@ const char* DiagramObjectPoint::debugString() const void DiagramObjectPoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiagramObjectPoint"), &DiagramObjectPoint_factory)); + factory_map.emplace("cim:DiagramObjectPoint", &DiagramObjectPoint_factory); } void DiagramObjectPoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiagramObjectPoint.sequenceNumber"), &assign_DiagramObjectPoint_sequenceNumber)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObjectPoint.xPosition"), &assign_DiagramObjectPoint_xPosition)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObjectPoint.yPosition"), &assign_DiagramObjectPoint_yPosition)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObjectPoint.zPosition"), &assign_DiagramObjectPoint_zPosition)); + assign_map.emplace("cim:DiagramObjectPoint.sequenceNumber", &assign_DiagramObjectPoint_sequenceNumber); + assign_map.emplace("cim:DiagramObjectPoint.xPosition", &assign_DiagramObjectPoint_xPosition); + assign_map.emplace("cim:DiagramObjectPoint.yPosition", &assign_DiagramObjectPoint_yPosition); + assign_map.emplace("cim:DiagramObjectPoint.zPosition", &assign_DiagramObjectPoint_zPosition); } void DiagramObjectPoint::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiagramObjectPoint.DiagramObject"), &assign_DiagramObjectPoint_DiagramObject)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObjectPoint.DiagramObjectGluePoint"), &assign_DiagramObjectPoint_DiagramObjectGluePoint)); + assign_map.emplace("cim:DiagramObjectPoint.DiagramObject", &assign_DiagramObjectPoint_DiagramObject); + assign_map.emplace("cim:DiagramObjectPoint.DiagramObjectGluePoint", &assign_DiagramObjectPoint_DiagramObjectGluePoint); } void DiagramObjectPoint::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/DiagramObjectPoint.hpp b/CGMES_2.4.13_18DEC2013/DiagramObjectPoint.hpp index b58dd1b77..ed1f2dcc5 100644 --- a/CGMES_2.4.13_18DEC2013/DiagramObjectPoint.hpp +++ b/CGMES_2.4.13_18DEC2013/DiagramObjectPoint.hpp @@ -20,9 +20,7 @@ namespace CIMPP class DiagramObject; class DiagramObjectGluePoint; - /* - A point in a given space defined by 3 coordinates and associated to a diagram object. The coordinates may be positive or negative as the origin does not have to be in the corner of a diagram. - */ + /** \brief A point in a given space defined by 3 coordinates and associated to a diagram object. The coordinates may be positive or negative as the origin does not have to be in the corner of a diagram. */ class DiagramObjectPoint : public BaseClass { public: @@ -30,12 +28,23 @@ namespace CIMPP DiagramObjectPoint(); ~DiagramObjectPoint() override; - CIMPP::DiagramObject* DiagramObject; /* The diagram object with which the points are associated. Default: 0 */ - CIMPP::DiagramObjectGluePoint* DiagramObjectGluePoint; /* A diagram object glue point is associated with 2 or more object points that are considered to be `glued` together. Default: 0 */ - CIMPP::Integer sequenceNumber; /* The sequence position of the point, used for defining the order of points for diagram objects acting as a polyline or polygon with more than one point. Default: 0 */ - CIMPP::Simple_Float xPosition; /* The X coordinate of this point. Default: nullptr */ - CIMPP::Simple_Float yPosition; /* The Y coordinate of this point. Default: nullptr */ - CIMPP::Simple_Float zPosition; /* The Z coordinate of this point. Default: nullptr */ + /** \brief The diagram object with which the points are associated. Default: 0 */ + CIMPP::DiagramObject* DiagramObject; + + /** \brief A diagram object glue point is associated with 2 or more object points that are considered to be `glued` together. Default: 0 */ + CIMPP::DiagramObjectGluePoint* DiagramObjectGluePoint; + + /** \brief The sequence position of the point, used for defining the order of points for diagram objects acting as a polyline or polygon with more than one point. Default: 0 */ + CIMPP::Integer sequenceNumber; + + /** \brief The X coordinate of this point. Default: nullptr */ + CIMPP::Simple_Float xPosition; + + /** \brief The Y coordinate of this point. Default: nullptr */ + CIMPP::Simple_Float yPosition; + + /** \brief The Z coordinate of this point. Default: nullptr */ + CIMPP::Simple_Float zPosition; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/DiagramObjectStyle.cpp b/CGMES_2.4.13_18DEC2013/DiagramObjectStyle.cpp index 938c67bf3..db870f870 100644 --- a/CGMES_2.4.13_18DEC2013/DiagramObjectStyle.cpp +++ b/CGMES_2.4.13_18DEC2013/DiagramObjectStyle.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DiagramObjectStyle::DiagramObjectStyle() {}; -DiagramObjectStyle::~DiagramObjectStyle() {}; +DiagramObjectStyle::DiagramObjectStyle() {} +DiagramObjectStyle::~DiagramObjectStyle() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ DiagramObjectStyle::getPossibleProfilesForAttributes() const return map; } - - bool assign_DiagramObject_DiagramObjectStyle(BaseClass*, BaseClass*); bool assign_DiagramObjectStyle_StyledObjects(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_DiagramObjectStyle_StyledObjects(BaseClass* BaseClass_ptr1, BaseClas } - const char DiagramObjectStyle::debugName[] = "DiagramObjectStyle"; const char* DiagramObjectStyle::debugString() const { @@ -69,7 +66,7 @@ const char* DiagramObjectStyle::debugString() const void DiagramObjectStyle::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiagramObjectStyle"), &DiagramObjectStyle_factory)); + factory_map.emplace("cim:DiagramObjectStyle", &DiagramObjectStyle_factory); } void DiagramObjectStyle::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void DiagramObjectStyle::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiagramObjectStyle.StyledObjects"), &assign_DiagramObjectStyle_StyledObjects)); + assign_map.emplace("cim:DiagramObjectStyle.StyledObjects", &assign_DiagramObjectStyle_StyledObjects); } void DiagramObjectStyle::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/DiagramObjectStyle.hpp b/CGMES_2.4.13_18DEC2013/DiagramObjectStyle.hpp index 45b0add44..a2dc55692 100644 --- a/CGMES_2.4.13_18DEC2013/DiagramObjectStyle.hpp +++ b/CGMES_2.4.13_18DEC2013/DiagramObjectStyle.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class DiagramObject; - /* - A reference to a style used by the originating system for a diagram object. A diagram object style describes information such as line thickness, shape such as circle or rectangle etc, and color. - */ + /** \brief A reference to a style used by the originating system for a diagram object. A diagram object style describes information such as line thickness, shape such as circle or rectangle etc, and color. */ class DiagramObjectStyle : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP DiagramObjectStyle(); ~DiagramObjectStyle() override; - std::list StyledObjects; /* A style can be assigned to multiple diagram objects. Default: 0 */ + /** \brief A style can be assigned to multiple diagram objects. Default: 0 */ + std::list StyledObjects; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/DiagramStyle.cpp b/CGMES_2.4.13_18DEC2013/DiagramStyle.cpp index 3e3994231..dd98ebef0 100644 --- a/CGMES_2.4.13_18DEC2013/DiagramStyle.cpp +++ b/CGMES_2.4.13_18DEC2013/DiagramStyle.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DiagramStyle::DiagramStyle() {}; -DiagramStyle::~DiagramStyle() {}; +DiagramStyle::DiagramStyle() {} +DiagramStyle::~DiagramStyle() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ DiagramStyle::getPossibleProfilesForAttributes() const return map; } - - bool assign_Diagram_DiagramStyle(BaseClass*, BaseClass*); bool assign_DiagramStyle_Diagram(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_DiagramStyle_Diagram(BaseClass* BaseClass_ptr1, BaseClass* BaseClass } - const char DiagramStyle::debugName[] = "DiagramStyle"; const char* DiagramStyle::debugString() const { @@ -69,7 +66,7 @@ const char* DiagramStyle::debugString() const void DiagramStyle::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiagramStyle"), &DiagramStyle_factory)); + factory_map.emplace("cim:DiagramStyle", &DiagramStyle_factory); } void DiagramStyle::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void DiagramStyle::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiagramStyle.Diagram"), &assign_DiagramStyle_Diagram)); + assign_map.emplace("cim:DiagramStyle.Diagram", &assign_DiagramStyle_Diagram); } void DiagramStyle::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/DiagramStyle.hpp b/CGMES_2.4.13_18DEC2013/DiagramStyle.hpp index 6cc1fd5b0..76311dfe7 100644 --- a/CGMES_2.4.13_18DEC2013/DiagramStyle.hpp +++ b/CGMES_2.4.13_18DEC2013/DiagramStyle.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class Diagram; - /* - The diagram style refer to a style used by the originating system for a diagram. A diagram style describes information such as schematic, geographic, bus-branch etc. - */ + /** \brief The diagram style refer to a style used by the originating system for a diagram. A diagram style describes information such as schematic, geographic, bus-branch etc. */ class DiagramStyle : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP DiagramStyle(); ~DiagramStyle() override; - std::list Diagram; /* A DiagramStyle can be used by many Diagrams. Default: 0 */ + /** \brief A DiagramStyle can be used by many Diagrams. Default: 0 */ + std::list Diagram; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC1A.cpp b/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC1A.cpp index e139fd0d6..590aabc67 100644 --- a/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC1A.cpp +++ b/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC1A.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -DiscExcContIEEEDEC1A::DiscExcContIEEEDEC1A() {}; -DiscExcContIEEEDEC1A::~DiscExcContIEEEDEC1A() {}; +DiscExcContIEEEDEC1A::DiscExcContIEEEDEC1A() {} +DiscExcContIEEEDEC1A::~DiscExcContIEEEDEC1A() {} static const std::list PossibleProfilesForClass = { @@ -74,246 +56,262 @@ DiscExcContIEEEDEC1A::getPossibleProfilesForAttributes() const return map; } - -bool assign_DiscExcContIEEEDEC1A_esc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_esc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->esc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_kan(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_kan(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kan; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_ketl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_ketl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ketl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_tan(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_tan(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tan; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_tl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_tl1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_tl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_tl2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_tw5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_tw5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_val(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_val(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->val; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_vanmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_vanmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vanmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_vomax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_vomax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vomax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_vomin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_vomin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vomin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_vsmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_vsmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_vsmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_vsmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_vtc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_vtc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vtc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_vtlmt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_vtlmt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vtlmt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_vtm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_vtm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vtm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_vtn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_vtn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vtn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_DiscExcContIEEEDEC1A_esc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->esc; if (!buffer.str().empty()) @@ -327,7 +325,8 @@ bool get_DiscExcContIEEEDEC1A_esc(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC1A_kan(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kan; if (!buffer.str().empty()) @@ -341,7 +340,8 @@ bool get_DiscExcContIEEEDEC1A_kan(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC1A_ketl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ketl; if (!buffer.str().empty()) @@ -355,7 +355,8 @@ bool get_DiscExcContIEEEDEC1A_ketl(const BaseClass* BaseClass_ptr1, std::strings bool get_DiscExcContIEEEDEC1A_tan(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tan; if (!buffer.str().empty()) @@ -369,7 +370,8 @@ bool get_DiscExcContIEEEDEC1A_tan(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC1A_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -383,7 +385,8 @@ bool get_DiscExcContIEEEDEC1A_td(const BaseClass* BaseClass_ptr1, std::stringstr bool get_DiscExcContIEEEDEC1A_tl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl1; if (!buffer.str().empty()) @@ -397,7 +400,8 @@ bool get_DiscExcContIEEEDEC1A_tl1(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC1A_tl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl2; if (!buffer.str().empty()) @@ -411,7 +415,8 @@ bool get_DiscExcContIEEEDEC1A_tl2(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC1A_tw5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw5; if (!buffer.str().empty()) @@ -425,7 +430,8 @@ bool get_DiscExcContIEEEDEC1A_tw5(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC1A_val(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->val; if (!buffer.str().empty()) @@ -439,7 +445,8 @@ bool get_DiscExcContIEEEDEC1A_val(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC1A_vanmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vanmax; if (!buffer.str().empty()) @@ -453,7 +460,8 @@ bool get_DiscExcContIEEEDEC1A_vanmax(const BaseClass* BaseClass_ptr1, std::strin bool get_DiscExcContIEEEDEC1A_vomax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vomax; if (!buffer.str().empty()) @@ -467,7 +475,8 @@ bool get_DiscExcContIEEEDEC1A_vomax(const BaseClass* BaseClass_ptr1, std::string bool get_DiscExcContIEEEDEC1A_vomin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vomin; if (!buffer.str().empty()) @@ -481,7 +490,8 @@ bool get_DiscExcContIEEEDEC1A_vomin(const BaseClass* BaseClass_ptr1, std::string bool get_DiscExcContIEEEDEC1A_vsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmax; if (!buffer.str().empty()) @@ -495,7 +505,8 @@ bool get_DiscExcContIEEEDEC1A_vsmax(const BaseClass* BaseClass_ptr1, std::string bool get_DiscExcContIEEEDEC1A_vsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmin; if (!buffer.str().empty()) @@ -509,7 +520,8 @@ bool get_DiscExcContIEEEDEC1A_vsmin(const BaseClass* BaseClass_ptr1, std::string bool get_DiscExcContIEEEDEC1A_vtc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vtc; if (!buffer.str().empty()) @@ -523,7 +535,8 @@ bool get_DiscExcContIEEEDEC1A_vtc(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC1A_vtlmt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vtlmt; if (!buffer.str().empty()) @@ -537,7 +550,8 @@ bool get_DiscExcContIEEEDEC1A_vtlmt(const BaseClass* BaseClass_ptr1, std::string bool get_DiscExcContIEEEDEC1A_vtm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vtm; if (!buffer.str().empty()) @@ -551,7 +565,8 @@ bool get_DiscExcContIEEEDEC1A_vtm(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC1A_vtn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vtn; if (!buffer.str().empty()) @@ -563,8 +578,6 @@ bool get_DiscExcContIEEEDEC1A_vtn(const BaseClass* BaseClass_ptr1, std::stringst return false; } - - const char DiscExcContIEEEDEC1A::debugName[] = "DiscExcContIEEEDEC1A"; const char* DiscExcContIEEEDEC1A::debugString() const { @@ -573,29 +586,29 @@ const char* DiscExcContIEEEDEC1A::debugString() const void DiscExcContIEEEDEC1A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A"), &DiscExcContIEEEDEC1A_factory)); + factory_map.emplace("cim:DiscExcContIEEEDEC1A", &DiscExcContIEEEDEC1A_factory); } void DiscExcContIEEEDEC1A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.esc"), &assign_DiscExcContIEEEDEC1A_esc)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.kan"), &assign_DiscExcContIEEEDEC1A_kan)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.ketl"), &assign_DiscExcContIEEEDEC1A_ketl)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.tan"), &assign_DiscExcContIEEEDEC1A_tan)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.td"), &assign_DiscExcContIEEEDEC1A_td)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.tl1"), &assign_DiscExcContIEEEDEC1A_tl1)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.tl2"), &assign_DiscExcContIEEEDEC1A_tl2)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.tw5"), &assign_DiscExcContIEEEDEC1A_tw5)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.val"), &assign_DiscExcContIEEEDEC1A_val)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.vanmax"), &assign_DiscExcContIEEEDEC1A_vanmax)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.vomax"), &assign_DiscExcContIEEEDEC1A_vomax)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.vomin"), &assign_DiscExcContIEEEDEC1A_vomin)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.vsmax"), &assign_DiscExcContIEEEDEC1A_vsmax)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.vsmin"), &assign_DiscExcContIEEEDEC1A_vsmin)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.vtc"), &assign_DiscExcContIEEEDEC1A_vtc)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.vtlmt"), &assign_DiscExcContIEEEDEC1A_vtlmt)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.vtm"), &assign_DiscExcContIEEEDEC1A_vtm)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.vtn"), &assign_DiscExcContIEEEDEC1A_vtn)); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.esc", &assign_DiscExcContIEEEDEC1A_esc); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.kan", &assign_DiscExcContIEEEDEC1A_kan); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.ketl", &assign_DiscExcContIEEEDEC1A_ketl); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.tan", &assign_DiscExcContIEEEDEC1A_tan); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.td", &assign_DiscExcContIEEEDEC1A_td); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.tl1", &assign_DiscExcContIEEEDEC1A_tl1); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.tl2", &assign_DiscExcContIEEEDEC1A_tl2); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.tw5", &assign_DiscExcContIEEEDEC1A_tw5); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.val", &assign_DiscExcContIEEEDEC1A_val); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.vanmax", &assign_DiscExcContIEEEDEC1A_vanmax); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.vomax", &assign_DiscExcContIEEEDEC1A_vomax); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.vomin", &assign_DiscExcContIEEEDEC1A_vomin); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.vsmax", &assign_DiscExcContIEEEDEC1A_vsmax); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.vsmin", &assign_DiscExcContIEEEDEC1A_vsmin); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.vtc", &assign_DiscExcContIEEEDEC1A_vtc); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.vtlmt", &assign_DiscExcContIEEEDEC1A_vtlmt); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.vtm", &assign_DiscExcContIEEEDEC1A_vtm); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.vtn", &assign_DiscExcContIEEEDEC1A_vtn); } void DiscExcContIEEEDEC1A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC1A.hpp b/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC1A.hpp index 1c19ec3a7..d401f3ce2 100644 --- a/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC1A.hpp +++ b/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC1A.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Type DEC1A discontinuous excitation control model that boosts generator excitation to a level higher than that demanded by the voltage regulator and stabilizer immediately following a system fault. Reference: IEEE Standard 421.5-2005 Section 12.2. - */ + /** \brief The class represents IEEE Type DEC1A discontinuous excitation control model that boosts generator excitation to a level higher than that demanded by the voltage regulator and stabilizer immediately following a system fault. Reference: IEEE Standard 421.5-2005 Section 12.2. */ class DiscExcContIEEEDEC1A : public DiscontinuousExcitationControlDynamics { public: @@ -28,24 +26,59 @@ namespace CIMPP DiscExcContIEEEDEC1A(); ~DiscExcContIEEEDEC1A() override; - CIMPP::PU esc; /* Speed change reference (). Typical Value = 0.0015. Default: nullptr */ - CIMPP::PU kan; /* Discontinuous controller gain (). Typical Value = 400. Default: nullptr */ - CIMPP::PU ketl; /* Terminal voltage limiter gain (). Typical Value = 47. Default: nullptr */ - CIMPP::Seconds tan; /* Discontinuous controller time constant (). Typical Value = 0.08. Default: nullptr */ - CIMPP::Seconds td; /* Time constant (). Typical Value = 0.03. Default: nullptr */ - CIMPP::Seconds tl1; /* Time constant (). Typical Value = 0.025. Default: nullptr */ - CIMPP::Seconds tl2; /* Time constant (). Typical Value = 1.25. Default: nullptr */ - CIMPP::Seconds tw5; /* DEC washout time constant (). Typical Value = 5. Default: nullptr */ - CIMPP::PU val; /* Regulator voltage reference (). Typical Value = 5.5. Default: nullptr */ - CIMPP::PU vanmax; /* Limiter for Van (). Default: nullptr */ - CIMPP::PU vomax; /* Limiter (). Typical Value = 0.3. Default: nullptr */ - CIMPP::PU vomin; /* Limiter (). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU vsmax; /* Limiter (). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU vsmin; /* Limiter (). Typical Value = -0.066. Default: nullptr */ - CIMPP::PU vtc; /* Terminal voltage level reference (). Typical Value = 0.95. Default: nullptr */ - CIMPP::PU vtlmt; /* Voltage reference (). Typical Value = 1.1. Default: nullptr */ - CIMPP::PU vtm; /* Voltage limits (). Typical Value = 1.13. Default: nullptr */ - CIMPP::PU vtn; /* Voltage limits (). Typical Value = 1.12. Default: nullptr */ + /** \brief Speed change reference (). Typical Value = 0.0015. Default: nullptr */ + CIMPP::PU esc; + + /** \brief Discontinuous controller gain (). Typical Value = 400. Default: nullptr */ + CIMPP::PU kan; + + /** \brief Terminal voltage limiter gain (). Typical Value = 47. Default: nullptr */ + CIMPP::PU ketl; + + /** \brief Discontinuous controller time constant (). Typical Value = 0.08. Default: nullptr */ + CIMPP::Seconds tan; + + /** \brief Time constant (). Typical Value = 0.03. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Time constant (). Typical Value = 0.025. Default: nullptr */ + CIMPP::Seconds tl1; + + /** \brief Time constant (). Typical Value = 1.25. Default: nullptr */ + CIMPP::Seconds tl2; + + /** \brief DEC washout time constant (). Typical Value = 5. Default: nullptr */ + CIMPP::Seconds tw5; + + /** \brief Regulator voltage reference (). Typical Value = 5.5. Default: nullptr */ + CIMPP::PU val; + + /** \brief Limiter for Van (). Default: nullptr */ + CIMPP::PU vanmax; + + /** \brief Limiter (). Typical Value = 0.3. Default: nullptr */ + CIMPP::PU vomax; + + /** \brief Limiter (). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU vomin; + + /** \brief Limiter (). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU vsmax; + + /** \brief Limiter (). Typical Value = -0.066. Default: nullptr */ + CIMPP::PU vsmin; + + /** \brief Terminal voltage level reference (). Typical Value = 0.95. Default: nullptr */ + CIMPP::PU vtc; + + /** \brief Voltage reference (). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU vtlmt; + + /** \brief Voltage limits (). Typical Value = 1.13. Default: nullptr */ + CIMPP::PU vtm; + + /** \brief Voltage limits (). Typical Value = 1.12. Default: nullptr */ + CIMPP::PU vtn; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC2A.cpp b/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC2A.cpp index 55b638498..dc94e52c0 100644 --- a/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC2A.cpp +++ b/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC2A.cpp @@ -8,16 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -DiscExcContIEEEDEC2A::DiscExcContIEEEDEC2A() {}; -DiscExcContIEEEDEC2A::~DiscExcContIEEEDEC2A() {}; +DiscExcContIEEEDEC2A::DiscExcContIEEEDEC2A() {} +DiscExcContIEEEDEC2A::~DiscExcContIEEEDEC2A() {} static const std::list PossibleProfilesForClass = { @@ -48,77 +43,80 @@ DiscExcContIEEEDEC2A::getPossibleProfilesForAttributes() const return map; } - -bool assign_DiscExcContIEEEDEC2A_td1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC2A_td1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC2A_td2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC2A_td2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC2A_vdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC2A_vdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC2A_vdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC2A_vdmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vdmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC2A_vk(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC2A_vk(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vk; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_DiscExcContIEEEDEC2A_td1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td1; if (!buffer.str().empty()) @@ -132,7 +130,8 @@ bool get_DiscExcContIEEEDEC2A_td1(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC2A_td2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td2; if (!buffer.str().empty()) @@ -146,7 +145,8 @@ bool get_DiscExcContIEEEDEC2A_td2(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC2A_vdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vdmax; if (!buffer.str().empty()) @@ -160,7 +160,8 @@ bool get_DiscExcContIEEEDEC2A_vdmax(const BaseClass* BaseClass_ptr1, std::string bool get_DiscExcContIEEEDEC2A_vdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vdmin; if (!buffer.str().empty()) @@ -174,7 +175,8 @@ bool get_DiscExcContIEEEDEC2A_vdmin(const BaseClass* BaseClass_ptr1, std::string bool get_DiscExcContIEEEDEC2A_vk(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vk; if (!buffer.str().empty()) @@ -186,8 +188,6 @@ bool get_DiscExcContIEEEDEC2A_vk(const BaseClass* BaseClass_ptr1, std::stringstr return false; } - - const char DiscExcContIEEEDEC2A::debugName[] = "DiscExcContIEEEDEC2A"; const char* DiscExcContIEEEDEC2A::debugString() const { @@ -196,16 +196,16 @@ const char* DiscExcContIEEEDEC2A::debugString() const void DiscExcContIEEEDEC2A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC2A"), &DiscExcContIEEEDEC2A_factory)); + factory_map.emplace("cim:DiscExcContIEEEDEC2A", &DiscExcContIEEEDEC2A_factory); } void DiscExcContIEEEDEC2A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC2A.td1"), &assign_DiscExcContIEEEDEC2A_td1)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC2A.td2"), &assign_DiscExcContIEEEDEC2A_td2)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC2A.vdmax"), &assign_DiscExcContIEEEDEC2A_vdmax)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC2A.vdmin"), &assign_DiscExcContIEEEDEC2A_vdmin)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC2A.vk"), &assign_DiscExcContIEEEDEC2A_vk)); + assign_map.emplace("cim:DiscExcContIEEEDEC2A.td1", &assign_DiscExcContIEEEDEC2A_td1); + assign_map.emplace("cim:DiscExcContIEEEDEC2A.td2", &assign_DiscExcContIEEEDEC2A_td2); + assign_map.emplace("cim:DiscExcContIEEEDEC2A.vdmax", &assign_DiscExcContIEEEDEC2A_vdmax); + assign_map.emplace("cim:DiscExcContIEEEDEC2A.vdmin", &assign_DiscExcContIEEEDEC2A_vdmin); + assign_map.emplace("cim:DiscExcContIEEEDEC2A.vk", &assign_DiscExcContIEEEDEC2A_vk); } void DiscExcContIEEEDEC2A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC2A.hpp b/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC2A.hpp index 5b84b484a..0e8a5a1bd 100644 --- a/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC2A.hpp +++ b/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC2A.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Type DEC2A model for the discontinuous excitation control. This system provides transient excitation boosting via an open-loop control as initiated by a trigger signal generated remotely. Reference: IEEE Standard 421.5-2005 Section 12.3. - */ + /** \brief The class represents IEEE Type DEC2A model for the discontinuous excitation control. This system provides transient excitation boosting via an open-loop control as initiated by a trigger signal generated remotely. Reference: IEEE Standard 421.5-2005 Section 12.3. */ class DiscExcContIEEEDEC2A : public DiscontinuousExcitationControlDynamics { public: @@ -28,11 +26,20 @@ namespace CIMPP DiscExcContIEEEDEC2A(); ~DiscExcContIEEEDEC2A() override; - CIMPP::Seconds td1; /* Discontinuous controller time constant (). Default: nullptr */ - CIMPP::Seconds td2; /* Discontinuous controller washout time constant (). Default: nullptr */ - CIMPP::PU vdmax; /* Limiter (). Default: nullptr */ - CIMPP::PU vdmin; /* Limiter (). Default: nullptr */ - CIMPP::PU vk; /* Discontinuous controller input reference (). Default: nullptr */ + /** \brief Discontinuous controller time constant (). Default: nullptr */ + CIMPP::Seconds td1; + + /** \brief Discontinuous controller washout time constant (). Default: nullptr */ + CIMPP::Seconds td2; + + /** \brief Limiter (). Default: nullptr */ + CIMPP::PU vdmax; + + /** \brief Limiter (). Default: nullptr */ + CIMPP::PU vdmin; + + /** \brief Discontinuous controller input reference (). Default: nullptr */ + CIMPP::PU vk; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC3A.cpp b/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC3A.cpp index 194881795..67dd91242 100644 --- a/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC3A.cpp +++ b/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC3A.cpp @@ -8,13 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Seconds.hpp" -#include "PU.hpp" using namespace CIMPP; -DiscExcContIEEEDEC3A::DiscExcContIEEEDEC3A() {}; -DiscExcContIEEEDEC3A::~DiscExcContIEEEDEC3A() {}; +DiscExcContIEEEDEC3A::DiscExcContIEEEDEC3A() {} +DiscExcContIEEEDEC3A::~DiscExcContIEEEDEC3A() {} static const std::list PossibleProfilesForClass = { @@ -42,38 +40,38 @@ DiscExcContIEEEDEC3A::getPossibleProfilesForAttributes() const return map; } - -bool assign_DiscExcContIEEEDEC3A_tdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC3A_tdr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC3A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC3A_vtmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC3A_vtmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC3A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vtmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_DiscExcContIEEEDEC3A_tdr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC3A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdr; if (!buffer.str().empty()) @@ -87,7 +85,8 @@ bool get_DiscExcContIEEEDEC3A_tdr(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC3A_vtmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC3A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vtmin; if (!buffer.str().empty()) @@ -99,8 +98,6 @@ bool get_DiscExcContIEEEDEC3A_vtmin(const BaseClass* BaseClass_ptr1, std::string return false; } - - const char DiscExcContIEEEDEC3A::debugName[] = "DiscExcContIEEEDEC3A"; const char* DiscExcContIEEEDEC3A::debugString() const { @@ -109,13 +106,13 @@ const char* DiscExcContIEEEDEC3A::debugString() const void DiscExcContIEEEDEC3A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC3A"), &DiscExcContIEEEDEC3A_factory)); + factory_map.emplace("cim:DiscExcContIEEEDEC3A", &DiscExcContIEEEDEC3A_factory); } void DiscExcContIEEEDEC3A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC3A.tdr"), &assign_DiscExcContIEEEDEC3A_tdr)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC3A.vtmin"), &assign_DiscExcContIEEEDEC3A_vtmin)); + assign_map.emplace("cim:DiscExcContIEEEDEC3A.tdr", &assign_DiscExcContIEEEDEC3A_tdr); + assign_map.emplace("cim:DiscExcContIEEEDEC3A.vtmin", &assign_DiscExcContIEEEDEC3A_vtmin); } void DiscExcContIEEEDEC3A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC3A.hpp b/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC3A.hpp index 7cefe27db..24ceb2f88 100644 --- a/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC3A.hpp +++ b/CGMES_2.4.13_18DEC2013/DiscExcContIEEEDEC3A.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Type DEC3A model. In some systems, the stabilizer output is disconnected from the regulator immediately following a severe fault to prevent the stabilizer from competing with action of voltage regulator during the first swing. Reference: IEEE Standard 421.5-2005 Section 12.4. - */ + /** \brief The class represents IEEE Type DEC3A model. In some systems, the stabilizer output is disconnected from the regulator immediately following a severe fault to prevent the stabilizer from competing with action of voltage regulator during the first swing. Reference: IEEE Standard 421.5-2005 Section 12.4. */ class DiscExcContIEEEDEC3A : public DiscontinuousExcitationControlDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP DiscExcContIEEEDEC3A(); ~DiscExcContIEEEDEC3A() override; - CIMPP::Seconds tdr; /* Reset time delay (). Default: nullptr */ - CIMPP::PU vtmin; /* Terminal undervoltage comparison level (). Default: nullptr */ + /** \brief Reset time delay (). Default: nullptr */ + CIMPP::Seconds tdr; + + /** \brief Terminal undervoltage comparison level (). Default: nullptr */ + CIMPP::PU vtmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Disconnector.cpp b/CGMES_2.4.13_18DEC2013/Disconnector.cpp index c8dfe906e..e64c24d80 100644 --- a/CGMES_2.4.13_18DEC2013/Disconnector.cpp +++ b/CGMES_2.4.13_18DEC2013/Disconnector.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Disconnector::Disconnector() {}; -Disconnector::~Disconnector() {}; +Disconnector::Disconnector() {} +Disconnector::~Disconnector() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ Disconnector::getPossibleProfilesForAttributes() const return map; } - - - - - const char Disconnector::debugName[] = "Disconnector"; const char* Disconnector::debugString() const { @@ -52,7 +47,7 @@ const char* Disconnector::debugString() const void Disconnector::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Disconnector"), &Disconnector_factory)); + factory_map.emplace("cim:Disconnector", &Disconnector_factory); } void Disconnector::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/Disconnector.hpp b/CGMES_2.4.13_18DEC2013/Disconnector.hpp index ba606c776..844173634 100644 --- a/CGMES_2.4.13_18DEC2013/Disconnector.hpp +++ b/CGMES_2.4.13_18DEC2013/Disconnector.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A manually operated or motor operated mechanical switching device used for changing the connections in a circuit, or for isolating a circuit or equipment from a source of power. It is required to open or close circuits when negligible current is broken or made. - */ + /** \brief A manually operated or motor operated mechanical switching device used for changing the connections in a circuit, or for isolating a circuit or equipment from a source of power. It is required to open or close circuits when negligible current is broken or made. */ class Disconnector : public Switch { public: @@ -26,7 +24,6 @@ namespace CIMPP Disconnector(); ~Disconnector() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/DiscontinuousExcitationControlDynamics.cpp b/CGMES_2.4.13_18DEC2013/DiscontinuousExcitationControlDynamics.cpp index 351408515..1e6569ea1 100644 --- a/CGMES_2.4.13_18DEC2013/DiscontinuousExcitationControlDynamics.cpp +++ b/CGMES_2.4.13_18DEC2013/DiscontinuousExcitationControlDynamics.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DiscontinuousExcitationControlDynamics::DiscontinuousExcitationControlDynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr) {}; -DiscontinuousExcitationControlDynamics::~DiscontinuousExcitationControlDynamics() {}; +DiscontinuousExcitationControlDynamics::DiscontinuousExcitationControlDynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr) {} +DiscontinuousExcitationControlDynamics::~DiscontinuousExcitationControlDynamics() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ DiscontinuousExcitationControlDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_ExcitationSystemDynamics_DiscontinuousExcitationControlDynamics(BaseClass*, BaseClass*); bool assign_DiscontinuousExcitationControlDynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_DiscontinuousExcitationControlDynamics_ExcitationSystemDynamics(Base } return false; } + bool assign_RemoteInputSignal_DiscontinuousExcitationControlDynamics(BaseClass*, BaseClass*); bool assign_DiscontinuousExcitationControlDynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_DiscontinuousExcitationControlDynamics_RemoteInputSignal(BaseClass* return false; } - bool get_DiscontinuousExcitationControlDynamics_ExcitationSystemDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DiscontinuousExcitationControlDynamics* element = dynamic_cast(BaseClass_ptr1)) + const DiscontinuousExcitationControlDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ExcitationSystemDynamics != 0) { @@ -100,7 +99,7 @@ const char* DiscontinuousExcitationControlDynamics::debugString() const void DiscontinuousExcitationControlDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiscontinuousExcitationControlDynamics"), &DiscontinuousExcitationControlDynamics_factory)); + factory_map.emplace("cim:DiscontinuousExcitationControlDynamics", &DiscontinuousExcitationControlDynamics_factory); } void DiscontinuousExcitationControlDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -109,8 +108,8 @@ void DiscontinuousExcitationControlDynamics::addPrimitiveAssignFnsToMap(std::uno void DiscontinuousExcitationControlDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiscontinuousExcitationControlDynamics.ExcitationSystemDynamics"), &assign_DiscontinuousExcitationControlDynamics_ExcitationSystemDynamics)); - assign_map.insert(std::make_pair(std::string("cim:DiscontinuousExcitationControlDynamics.RemoteInputSignal"), &assign_DiscontinuousExcitationControlDynamics_RemoteInputSignal)); + assign_map.emplace("cim:DiscontinuousExcitationControlDynamics.ExcitationSystemDynamics", &assign_DiscontinuousExcitationControlDynamics_ExcitationSystemDynamics); + assign_map.emplace("cim:DiscontinuousExcitationControlDynamics.RemoteInputSignal", &assign_DiscontinuousExcitationControlDynamics_RemoteInputSignal); } void DiscontinuousExcitationControlDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/DiscontinuousExcitationControlDynamics.hpp b/CGMES_2.4.13_18DEC2013/DiscontinuousExcitationControlDynamics.hpp index f525539e5..e0a40c245 100644 --- a/CGMES_2.4.13_18DEC2013/DiscontinuousExcitationControlDynamics.hpp +++ b/CGMES_2.4.13_18DEC2013/DiscontinuousExcitationControlDynamics.hpp @@ -18,9 +18,7 @@ namespace CIMPP class ExcitationSystemDynamics; class RemoteInputSignal; - /* - Discontinuous excitation control function block whose behaviour is described by reference to a standard model . - */ + /** \brief Discontinuous excitation control function block whose behaviour is described by reference to a standard model . */ class DiscontinuousExcitationControlDynamics : public DynamicsFunctionBlock { public: @@ -28,8 +26,11 @@ namespace CIMPP DiscontinuousExcitationControlDynamics(); ~DiscontinuousExcitationControlDynamics() override; - CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; /* Excitation system model with which this discontinuous excitation control model is associated. Default: 0 */ - CIMPP::RemoteInputSignal* RemoteInputSignal; /* Remote input signal used by this discontinuous excitation control system model. Default: 0 */ + /** \brief Excitation system model with which this discontinuous excitation control model is associated. Default: 0 */ + CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; + + /** \brief Remote input signal used by this discontinuous excitation control system model. Default: 0 */ + CIMPP::RemoteInputSignal* RemoteInputSignal; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/DiscontinuousExcitationControlUserDefined.cpp b/CGMES_2.4.13_18DEC2013/DiscontinuousExcitationControlUserDefined.cpp index 9ff03969b..f2154bd03 100644 --- a/CGMES_2.4.13_18DEC2013/DiscontinuousExcitationControlUserDefined.cpp +++ b/CGMES_2.4.13_18DEC2013/DiscontinuousExcitationControlUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -DiscontinuousExcitationControlUserDefined::DiscontinuousExcitationControlUserDefined() {}; -DiscontinuousExcitationControlUserDefined::~DiscontinuousExcitationControlUserDefined() {}; +DiscontinuousExcitationControlUserDefined::DiscontinuousExcitationControlUserDefined() {} +DiscontinuousExcitationControlUserDefined::~DiscontinuousExcitationControlUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ DiscontinuousExcitationControlUserDefined::getPossibleProfilesForAttributes() co return map; } - -bool assign_DiscontinuousExcitationControlUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (DiscontinuousExcitationControlUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_DiscontinuousExcitationControlUserDefined(BaseClass*, BaseClass*); bool assign_DiscontinuousExcitationControlUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_DiscontinuousExcitationControlUserDefined_ProprietaryParameterDynami return false; } +bool assign_DiscontinuousExcitationControlUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + DiscontinuousExcitationControlUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_DiscontinuousExcitationControlUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscontinuousExcitationControlUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const DiscontinuousExcitationControlUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_DiscontinuousExcitationControlUserDefined_proprietary(const BaseClass* return false; } - - const char DiscontinuousExcitationControlUserDefined::debugName[] = "DiscontinuousExcitationControlUserDefined"; const char* DiscontinuousExcitationControlUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* DiscontinuousExcitationControlUserDefined::debugString() const void DiscontinuousExcitationControlUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiscontinuousExcitationControlUserDefined"), &DiscontinuousExcitationControlUserDefined_factory)); + factory_map.emplace("cim:DiscontinuousExcitationControlUserDefined", &DiscontinuousExcitationControlUserDefined_factory); } void DiscontinuousExcitationControlUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiscontinuousExcitationControlUserDefined.proprietary"), &assign_DiscontinuousExcitationControlUserDefined_proprietary)); + assign_map.emplace("cim:DiscontinuousExcitationControlUserDefined.proprietary", &assign_DiscontinuousExcitationControlUserDefined_proprietary); } void DiscontinuousExcitationControlUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiscontinuousExcitationControlUserDefined.ProprietaryParameterDynamics"), &assign_DiscontinuousExcitationControlUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:DiscontinuousExcitationControlUserDefined.ProprietaryParameterDynamics", &assign_DiscontinuousExcitationControlUserDefined_ProprietaryParameterDynamics); } void DiscontinuousExcitationControlUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/DiscontinuousExcitationControlUserDefined.hpp b/CGMES_2.4.13_18DEC2013/DiscontinuousExcitationControlUserDefined.hpp index 498b2150a..051d1a48d 100644 --- a/CGMES_2.4.13_18DEC2013/DiscontinuousExcitationControlUserDefined.hpp +++ b/CGMES_2.4.13_18DEC2013/DiscontinuousExcitationControlUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Discontinuous excitation control function block whose dynamic behaviour is described by - */ + /** \brief Discontinuous excitation control function block whose dynamic behaviour is described by */ class DiscontinuousExcitationControlUserDefined : public DiscontinuousExcitationControlDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP DiscontinuousExcitationControlUserDefined(); ~DiscontinuousExcitationControlUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Discrete.cpp b/CGMES_2.4.13_18DEC2013/Discrete.cpp index 6ad239122..bed7e18ab 100644 --- a/CGMES_2.4.13_18DEC2013/Discrete.cpp +++ b/CGMES_2.4.13_18DEC2013/Discrete.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Discrete::Discrete() : ValueAliasSet(nullptr) {}; -Discrete::~Discrete() {}; +Discrete::Discrete() : ValueAliasSet(nullptr) {} +Discrete::~Discrete() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ Discrete::getPossibleProfilesForAttributes() const return map; } - - bool assign_DiscreteValue_Discrete(BaseClass*, BaseClass*); bool assign_Discrete_DiscreteValues(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_Discrete_DiscreteValues(BaseClass* BaseClass_ptr1, BaseClass* BaseCl } return false; } + bool assign_ValueAliasSet_Discretes(BaseClass*, BaseClass*); bool assign_Discrete_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -80,7 +79,8 @@ bool assign_Discrete_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass* BaseCla bool get_Discrete_ValueAliasSet(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Discrete* element = dynamic_cast(BaseClass_ptr1)) + const Discrete* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ValueAliasSet != 0) { @@ -91,7 +91,6 @@ bool get_Discrete_ValueAliasSet(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Discrete"), &Discrete_factory)); + factory_map.emplace("cim:Discrete", &Discrete_factory); } void Discrete::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -109,8 +108,8 @@ void Discrete::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Discrete.DiscreteValues"), &assign_Discrete_DiscreteValues)); - assign_map.insert(std::make_pair(std::string("cim:Discrete.ValueAliasSet"), &assign_Discrete_ValueAliasSet)); + assign_map.emplace("cim:Discrete.DiscreteValues", &assign_Discrete_DiscreteValues); + assign_map.emplace("cim:Discrete.ValueAliasSet", &assign_Discrete_ValueAliasSet); } void Discrete::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/Discrete.hpp b/CGMES_2.4.13_18DEC2013/Discrete.hpp index 741c6ee67..2672d040b 100644 --- a/CGMES_2.4.13_18DEC2013/Discrete.hpp +++ b/CGMES_2.4.13_18DEC2013/Discrete.hpp @@ -18,9 +18,7 @@ namespace CIMPP class DiscreteValue; class ValueAliasSet; - /* - Discrete represents a discrete Measurement, i.e. a Measurement representing discrete values, e.g. a Breaker position. - */ + /** \brief Discrete represents a discrete Measurement, i.e. a Measurement representing discrete values, e.g. a Breaker position. */ class Discrete : public Measurement { public: @@ -28,8 +26,11 @@ namespace CIMPP Discrete(); ~Discrete() override; - std::list DiscreteValues; /* Measurement to which this value is connected. Default: 0 */ - CIMPP::ValueAliasSet* ValueAliasSet; /* The ValueAliasSet used for translation of a MeasurementValue.value to a name. Default: 0 */ + /** \brief Measurement to which this value is connected. Default: 0 */ + std::list DiscreteValues; + + /** \brief The ValueAliasSet used for translation of a MeasurementValue.value to a name. Default: 0 */ + CIMPP::ValueAliasSet* ValueAliasSet; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/DiscreteValue.cpp b/CGMES_2.4.13_18DEC2013/DiscreteValue.cpp index 2ea98ed31..a990c7895 100644 --- a/CGMES_2.4.13_18DEC2013/DiscreteValue.cpp +++ b/CGMES_2.4.13_18DEC2013/DiscreteValue.cpp @@ -10,12 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "Command.hpp" #include "Discrete.hpp" -#include "Integer.hpp" using namespace CIMPP; -DiscreteValue::DiscreteValue() : Command(nullptr), Discrete(nullptr) {}; -DiscreteValue::~DiscreteValue() {}; +DiscreteValue::DiscreteValue() : Command(nullptr), Discrete(nullptr) {} +DiscreteValue::~DiscreteValue() {} static const std::list PossibleProfilesForClass = { @@ -44,21 +43,6 @@ DiscreteValue::getPossibleProfilesForAttributes() const return map; } - -bool assign_DiscreteValue_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (DiscreteValue* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->value; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_Command_DiscreteValue(BaseClass*, BaseClass*); bool assign_DiscreteValue_Command(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -75,6 +59,7 @@ bool assign_DiscreteValue_Command(BaseClass* BaseClass_ptr1, BaseClass* BaseClas } return false; } + bool assign_Discrete_DiscreteValues(BaseClass*, BaseClass*); bool assign_DiscreteValue_Discrete(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -92,24 +77,25 @@ bool assign_DiscreteValue_Discrete(BaseClass* BaseClass_ptr1, BaseClass* BaseCla return false; } -bool get_DiscreteValue_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_DiscreteValue_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const DiscreteValue* element = dynamic_cast(BaseClass_ptr1)) + DiscreteValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->value; - if (!buffer.str().empty()) + buffer >> element->value; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } bool get_DiscreteValue_Discrete(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DiscreteValue* element = dynamic_cast(BaseClass_ptr1)) + const DiscreteValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Discrete != 0) { @@ -120,6 +106,20 @@ bool get_DiscreteValue_Discrete(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->value; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char DiscreteValue::debugName[] = "DiscreteValue"; const char* DiscreteValue::debugString() const @@ -129,18 +129,18 @@ const char* DiscreteValue::debugString() const void DiscreteValue::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiscreteValue"), &DiscreteValue_factory)); + factory_map.emplace("cim:DiscreteValue", &DiscreteValue_factory); } void DiscreteValue::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiscreteValue.value"), &assign_DiscreteValue_value)); + assign_map.emplace("cim:DiscreteValue.value", &assign_DiscreteValue_value); } void DiscreteValue::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiscreteValue.Command"), &assign_DiscreteValue_Command)); - assign_map.insert(std::make_pair(std::string("cim:DiscreteValue.Discrete"), &assign_DiscreteValue_Discrete)); + assign_map.emplace("cim:DiscreteValue.Command", &assign_DiscreteValue_Command); + assign_map.emplace("cim:DiscreteValue.Discrete", &assign_DiscreteValue_Discrete); } void DiscreteValue::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/DiscreteValue.hpp b/CGMES_2.4.13_18DEC2013/DiscreteValue.hpp index e2943d3ba..1fbc352c7 100644 --- a/CGMES_2.4.13_18DEC2013/DiscreteValue.hpp +++ b/CGMES_2.4.13_18DEC2013/DiscreteValue.hpp @@ -19,9 +19,7 @@ namespace CIMPP class Command; class Discrete; - /* - DiscreteValue represents a discrete MeasurementValue. - */ + /** \brief DiscreteValue represents a discrete MeasurementValue. */ class DiscreteValue : public MeasurementValue { public: @@ -29,9 +27,14 @@ namespace CIMPP DiscreteValue(); ~DiscreteValue() override; - CIMPP::Command* Command; /* The MeasurementValue that is controlled. Default: 0 */ - CIMPP::Discrete* Discrete; /* The values connected to this measurement. Default: 0 */ - CIMPP::Integer value; /* The value to supervise. Default: 0 */ + /** \brief The MeasurementValue that is controlled. Default: 0 */ + CIMPP::Command* Command; + + /** \brief The values connected to this measurement. Default: 0 */ + CIMPP::Discrete* Discrete; + + /** \brief The value to supervise. Default: 0 */ + CIMPP::Integer value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/DroopSignalFeedbackKind.cpp b/CGMES_2.4.13_18DEC2013/DroopSignalFeedbackKind.cpp index ca339f115..0f68d1992 100644 --- a/CGMES_2.4.13_18DEC2013/DroopSignalFeedbackKind.cpp +++ b/CGMES_2.4.13_18DEC2013/DroopSignalFeedbackKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "DroopSignalFeedbackKind") + if (EnumSymbol.substr(0, pos) != "DroopSignalFeedbackKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,22 +50,22 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "electricalPower") + if (EnumSymbol == "electricalPower") { rop = DroopSignalFeedbackKind::electricalPower; return lop; } - if(EnumSymbol == "none") + if (EnumSymbol == "none") { rop = DroopSignalFeedbackKind::none; return lop; } - if(EnumSymbol == "fuelValveStroke") + if (EnumSymbol == "fuelValveStroke") { rop = DroopSignalFeedbackKind::fuelValveStroke; return lop; } - if(EnumSymbol == "governorOutput") + if (EnumSymbol == "governorOutput") { rop = DroopSignalFeedbackKind::governorOutput; return lop; diff --git a/CGMES_2.4.13_18DEC2013/DroopSignalFeedbackKind.hpp b/CGMES_2.4.13_18DEC2013/DroopSignalFeedbackKind.hpp index de948a1bc..d68428bda 100644 --- a/CGMES_2.4.13_18DEC2013/DroopSignalFeedbackKind.hpp +++ b/CGMES_2.4.13_18DEC2013/DroopSignalFeedbackKind.hpp @@ -9,29 +9,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Governor droop signal feedback source. - */ + /** \brief Governor droop signal feedback source. */ class DroopSignalFeedbackKind { public: enum DroopSignalFeedbackKind_ENUM { - /** - * Electrical power feedback (connection indicated as 1 in the block diagrams of models, e.g. GovCT1, GovCT2). - */ + /** Electrical power feedback (connection indicated as 1 in the block diagrams of models, e.g. GovCT1, GovCT2). */ electricalPower, - /** - * No droop signal feedback, is isochronous governor. - */ + /** No droop signal feedback, is isochronous governor. */ none, - /** - * Fuel valve stroke feedback (true stroke) (connection indicated as 2 in the block diagrams of model, e.g. GovCT1, GovCT2). - */ + /** Fuel valve stroke feedback (true stroke) (connection indicated as 2 in the block diagrams of model, e.g. GovCT1, GovCT2). */ fuelValveStroke, - /** - * Governor output feedback (requested stroke) (connection indicated as 3 in the block diagrams of models, e.g. GovCT1, GovCT2). - */ + /** Governor output feedback (requested stroke) (connection indicated as 3 in the block diagrams of models, e.g. GovCT1, GovCT2). */ governorOutput, }; diff --git a/CGMES_2.4.13_18DEC2013/DynamicsFunctionBlock.cpp b/CGMES_2.4.13_18DEC2013/DynamicsFunctionBlock.cpp index 63b269772..3ed474991 100644 --- a/CGMES_2.4.13_18DEC2013/DynamicsFunctionBlock.cpp +++ b/CGMES_2.4.13_18DEC2013/DynamicsFunctionBlock.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" using namespace CIMPP; -DynamicsFunctionBlock::DynamicsFunctionBlock() {}; -DynamicsFunctionBlock::~DynamicsFunctionBlock() {}; +DynamicsFunctionBlock::DynamicsFunctionBlock() {} +DynamicsFunctionBlock::~DynamicsFunctionBlock() {} static const std::list PossibleProfilesForClass = { @@ -40,25 +39,24 @@ DynamicsFunctionBlock::getPossibleProfilesForAttributes() const return map; } - -bool assign_DynamicsFunctionBlock_enabled(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DynamicsFunctionBlock_enabled(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DynamicsFunctionBlock* element = dynamic_cast(BaseClass_ptr1)) + DynamicsFunctionBlock* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->enabled; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_DynamicsFunctionBlock_enabled(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DynamicsFunctionBlock* element = dynamic_cast(BaseClass_ptr1)) + const DynamicsFunctionBlock* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->enabled; if (!buffer.str().empty()) @@ -70,8 +68,6 @@ bool get_DynamicsFunctionBlock_enabled(const BaseClass* BaseClass_ptr1, std::str return false; } - - const char DynamicsFunctionBlock::debugName[] = "DynamicsFunctionBlock"; const char* DynamicsFunctionBlock::debugString() const { @@ -80,12 +76,12 @@ const char* DynamicsFunctionBlock::debugString() const void DynamicsFunctionBlock::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DynamicsFunctionBlock"), &DynamicsFunctionBlock_factory)); + factory_map.emplace("cim:DynamicsFunctionBlock", &DynamicsFunctionBlock_factory); } void DynamicsFunctionBlock::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DynamicsFunctionBlock.enabled"), &assign_DynamicsFunctionBlock_enabled)); + assign_map.emplace("cim:DynamicsFunctionBlock.enabled", &assign_DynamicsFunctionBlock_enabled); } void DynamicsFunctionBlock::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/DynamicsFunctionBlock.hpp b/CGMES_2.4.13_18DEC2013/DynamicsFunctionBlock.hpp index 4e9d7b9c9..cfce2f68e 100644 --- a/CGMES_2.4.13_18DEC2013/DynamicsFunctionBlock.hpp +++ b/CGMES_2.4.13_18DEC2013/DynamicsFunctionBlock.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Abstract parent class for all Dynamics function blocks. - */ + /** \brief Abstract parent class for all Dynamics function blocks. */ class DynamicsFunctionBlock : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP DynamicsFunctionBlock(); ~DynamicsFunctionBlock() override; - CIMPP::Boolean enabled; /* Function block used indicator. true = use of function block is enabled false = use of function block is disabled. Default: false */ + /** \brief Function block used indicator. true = use of function block is enabled false = use of function block is disabled. Default: false */ + CIMPP::Boolean enabled; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/DynamicsVersion.cpp b/CGMES_2.4.13_18DEC2013/DynamicsVersion.cpp index 439db56d8..4a2ca6829 100644 --- a/CGMES_2.4.13_18DEC2013/DynamicsVersion.cpp +++ b/CGMES_2.4.13_18DEC2013/DynamicsVersion.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "String.hpp" -#include "String.hpp" -#include "Date.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -DynamicsVersion::DynamicsVersion() {}; -DynamicsVersion::~DynamicsVersion() {}; +DynamicsVersion::DynamicsVersion() {} +DynamicsVersion::~DynamicsVersion() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ DynamicsVersion::getPossibleProfilesForAttributes() const return map; } - -bool assign_DynamicsVersion_baseUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DynamicsVersion_baseUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DynamicsVersion_baseURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DynamicsVersion_baseURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DynamicsVersion_date(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DynamicsVersion_date(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->date = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DynamicsVersion_differenceModelURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DynamicsVersion_differenceModelURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->differenceModelURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DynamicsVersion_entsoeUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DynamicsVersion_entsoeUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DynamicsVersion_entsoeURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DynamicsVersion_entsoeURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DynamicsVersion_modelDescriptionURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DynamicsVersion_modelDescriptionURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->modelDescriptionURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DynamicsVersion_namespaceRDF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DynamicsVersion_namespaceRDF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceRDF = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DynamicsVersion_namespaceUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DynamicsVersion_namespaceUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DynamicsVersion_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DynamicsVersion_shortName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->shortName = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_DynamicsVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseUML; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_DynamicsVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stringstr bool get_DynamicsVersion_baseURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseURI; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_DynamicsVersion_baseURI(const BaseClass* BaseClass_ptr1, std::stringstr bool get_DynamicsVersion_date(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->date; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_DynamicsVersion_date(const BaseClass* BaseClass_ptr1, std::stringstream bool get_DynamicsVersion_differenceModelURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->differenceModelURI; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_DynamicsVersion_differenceModelURI(const BaseClass* BaseClass_ptr1, std bool get_DynamicsVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeUML; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_DynamicsVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::strings bool get_DynamicsVersion_entsoeURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeURI; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_DynamicsVersion_entsoeURI(const BaseClass* BaseClass_ptr1, std::strings bool get_DynamicsVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->modelDescriptionURI; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_DynamicsVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr1, st bool get_DynamicsVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceRDF; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_DynamicsVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std::stri bool get_DynamicsVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceUML; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_DynamicsVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std::stri bool get_DynamicsVersion_shortName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortName; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_DynamicsVersion_shortName(const BaseClass* BaseClass_ptr1, std::strings return false; } - - const char DynamicsVersion::debugName[] = "DynamicsVersion"; const char* DynamicsVersion::debugString() const { @@ -341,21 +346,21 @@ const char* DynamicsVersion::debugString() const void DynamicsVersion::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DynamicsVersion"), &DynamicsVersion_factory)); + factory_map.emplace("cim:DynamicsVersion", &DynamicsVersion_factory); } void DynamicsVersion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DynamicsVersion.baseUML"), &assign_DynamicsVersion_baseUML)); - assign_map.insert(std::make_pair(std::string("cim:DynamicsVersion.baseURI"), &assign_DynamicsVersion_baseURI)); - assign_map.insert(std::make_pair(std::string("cim:DynamicsVersion.date"), &assign_DynamicsVersion_date)); - assign_map.insert(std::make_pair(std::string("cim:DynamicsVersion.differenceModelURI"), &assign_DynamicsVersion_differenceModelURI)); - assign_map.insert(std::make_pair(std::string("cim:DynamicsVersion.entsoeUML"), &assign_DynamicsVersion_entsoeUML)); - assign_map.insert(std::make_pair(std::string("cim:DynamicsVersion.entsoeURI"), &assign_DynamicsVersion_entsoeURI)); - assign_map.insert(std::make_pair(std::string("cim:DynamicsVersion.modelDescriptionURI"), &assign_DynamicsVersion_modelDescriptionURI)); - assign_map.insert(std::make_pair(std::string("cim:DynamicsVersion.namespaceRDF"), &assign_DynamicsVersion_namespaceRDF)); - assign_map.insert(std::make_pair(std::string("cim:DynamicsVersion.namespaceUML"), &assign_DynamicsVersion_namespaceUML)); - assign_map.insert(std::make_pair(std::string("cim:DynamicsVersion.shortName"), &assign_DynamicsVersion_shortName)); + assign_map.emplace("cim:DynamicsVersion.baseUML", &assign_DynamicsVersion_baseUML); + assign_map.emplace("cim:DynamicsVersion.baseURI", &assign_DynamicsVersion_baseURI); + assign_map.emplace("cim:DynamicsVersion.date", &assign_DynamicsVersion_date); + assign_map.emplace("cim:DynamicsVersion.differenceModelURI", &assign_DynamicsVersion_differenceModelURI); + assign_map.emplace("cim:DynamicsVersion.entsoeUML", &assign_DynamicsVersion_entsoeUML); + assign_map.emplace("cim:DynamicsVersion.entsoeURI", &assign_DynamicsVersion_entsoeURI); + assign_map.emplace("cim:DynamicsVersion.modelDescriptionURI", &assign_DynamicsVersion_modelDescriptionURI); + assign_map.emplace("cim:DynamicsVersion.namespaceRDF", &assign_DynamicsVersion_namespaceRDF); + assign_map.emplace("cim:DynamicsVersion.namespaceUML", &assign_DynamicsVersion_namespaceUML); + assign_map.emplace("cim:DynamicsVersion.shortName", &assign_DynamicsVersion_shortName); } void DynamicsVersion::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/DynamicsVersion.hpp b/CGMES_2.4.13_18DEC2013/DynamicsVersion.hpp index c21621cfb..67ae2df75 100644 --- a/CGMES_2.4.13_18DEC2013/DynamicsVersion.hpp +++ b/CGMES_2.4.13_18DEC2013/DynamicsVersion.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Version details. - */ + /** \brief Version details. */ class DynamicsVersion : public BaseClass { public: @@ -28,16 +26,35 @@ namespace CIMPP DynamicsVersion(); ~DynamicsVersion() override; - CIMPP::String baseUML; /* Base UML provided by CIM model manager. Default: '' */ - CIMPP::String baseURI; /* Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ - CIMPP::Date date; /* Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ - CIMPP::String differenceModelURI; /* Difference model URI defined by IEC 61970-552. Default: '' */ - CIMPP::String entsoeUML; /* UML provided by ENTSO-E. Default: '' */ - CIMPP::String entsoeURI; /* Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/Dynamics/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ - CIMPP::String modelDescriptionURI; /* Model Description URI defined by IEC 61970-552. Default: '' */ - CIMPP::String namespaceRDF; /* RDF namespace. Default: '' */ - CIMPP::String namespaceUML; /* CIM UML namespace. Default: '' */ - CIMPP::String shortName; /* The short name of the profile used in profile documentation. Default: '' */ + /** \brief Base UML provided by CIM model manager. Default: '' */ + CIMPP::String baseUML; + + /** \brief Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ + CIMPP::String baseURI; + + /** \brief Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ + CIMPP::Date date; + + /** \brief Difference model URI defined by IEC 61970-552. Default: '' */ + CIMPP::String differenceModelURI; + + /** \brief UML provided by ENTSO-E. Default: '' */ + CIMPP::String entsoeUML; + + /** \brief Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/Dynamics/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ + CIMPP::String entsoeURI; + + /** \brief Model Description URI defined by IEC 61970-552. Default: '' */ + CIMPP::String modelDescriptionURI; + + /** \brief RDF namespace. Default: '' */ + CIMPP::String namespaceRDF; + + /** \brief CIM UML namespace. Default: '' */ + CIMPP::String namespaceUML; + + /** \brief The short name of the profile used in profile documentation. Default: '' */ + CIMPP::String shortName; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/EarthFaultCompensator.cpp b/CGMES_2.4.13_18DEC2013/EarthFaultCompensator.cpp index 704e5d53f..f5411585b 100644 --- a/CGMES_2.4.13_18DEC2013/EarthFaultCompensator.cpp +++ b/CGMES_2.4.13_18DEC2013/EarthFaultCompensator.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Resistance.hpp" using namespace CIMPP; -EarthFaultCompensator::EarthFaultCompensator() {}; -EarthFaultCompensator::~EarthFaultCompensator() {}; +EarthFaultCompensator::EarthFaultCompensator() {} +EarthFaultCompensator::~EarthFaultCompensator() {} static const std::list PossibleProfilesForClass = { @@ -40,25 +39,24 @@ EarthFaultCompensator::getPossibleProfilesForAttributes() const return map; } - -bool assign_EarthFaultCompensator_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EarthFaultCompensator_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EarthFaultCompensator* element = dynamic_cast(BaseClass_ptr1)) + EarthFaultCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_EarthFaultCompensator_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EarthFaultCompensator* element = dynamic_cast(BaseClass_ptr1)) + const EarthFaultCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -70,8 +68,6 @@ bool get_EarthFaultCompensator_r(const BaseClass* BaseClass_ptr1, std::stringstr return false; } - - const char EarthFaultCompensator::debugName[] = "EarthFaultCompensator"; const char* EarthFaultCompensator::debugString() const { @@ -80,12 +76,12 @@ const char* EarthFaultCompensator::debugString() const void EarthFaultCompensator::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EarthFaultCompensator"), &EarthFaultCompensator_factory)); + factory_map.emplace("cim:EarthFaultCompensator", &EarthFaultCompensator_factory); } void EarthFaultCompensator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EarthFaultCompensator.r"), &assign_EarthFaultCompensator_r)); + assign_map.emplace("cim:EarthFaultCompensator.r", &assign_EarthFaultCompensator_r); } void EarthFaultCompensator::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/EarthFaultCompensator.hpp b/CGMES_2.4.13_18DEC2013/EarthFaultCompensator.hpp index 42b6561d1..5f16c7ac2 100644 --- a/CGMES_2.4.13_18DEC2013/EarthFaultCompensator.hpp +++ b/CGMES_2.4.13_18DEC2013/EarthFaultCompensator.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A conducting equipment used to represent a connection to ground which is typically used to compensate earth faults.. An earth fault compensator device modeled with a single terminal implies a second terminal solidly connected to ground. If two terminals are modeled, the ground is not assumed and normal connection rules apply. - */ + /** \brief A conducting equipment used to represent a connection to ground which is typically used to compensate earth faults.. An earth fault compensator device modeled with a single terminal implies a second terminal solidly connected to ground. If two terminals are modeled, the ground is not assumed and normal connection rules apply. */ class EarthFaultCompensator : public ConductingEquipment { public: @@ -27,7 +25,8 @@ namespace CIMPP EarthFaultCompensator(); ~EarthFaultCompensator() override; - CIMPP::Resistance r; /* Nominal resistance of device. Default: nullptr */ + /** \brief Nominal resistance of device. Default: nullptr */ + CIMPP::Resistance r; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/EnergyArea.cpp b/CGMES_2.4.13_18DEC2013/EnergyArea.cpp index 74d42606b..0df0b19c1 100644 --- a/CGMES_2.4.13_18DEC2013/EnergyArea.cpp +++ b/CGMES_2.4.13_18DEC2013/EnergyArea.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -EnergyArea::EnergyArea() : ControlArea(nullptr) {}; -EnergyArea::~EnergyArea() {}; +EnergyArea::EnergyArea() : ControlArea(nullptr) {} +EnergyArea::~EnergyArea() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ EnergyArea::getPossibleProfilesForAttributes() const return map; } - - bool assign_ControlArea_EnergyArea(BaseClass*, BaseClass*); bool assign_EnergyArea_ControlArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_EnergyArea_ControlArea(BaseClass* BaseClass_ptr1, BaseClass* BaseCla } - const char EnergyArea::debugName[] = "EnergyArea"; const char* EnergyArea::debugString() const { @@ -69,7 +66,7 @@ const char* EnergyArea::debugString() const void EnergyArea::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EnergyArea"), &EnergyArea_factory)); + factory_map.emplace("cim:EnergyArea", &EnergyArea_factory); } void EnergyArea::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void EnergyArea::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EnergyArea.ControlArea"), &assign_EnergyArea_ControlArea)); + assign_map.emplace("cim:EnergyArea.ControlArea", &assign_EnergyArea_ControlArea); } void EnergyArea::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/EnergyArea.hpp b/CGMES_2.4.13_18DEC2013/EnergyArea.hpp index b290920ee..ba0241fe1 100644 --- a/CGMES_2.4.13_18DEC2013/EnergyArea.hpp +++ b/CGMES_2.4.13_18DEC2013/EnergyArea.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class ControlArea; - /* - The class describes an area having energy production or consumption. - */ + /** \brief The class describes an area having energy production or consumption. */ class EnergyArea : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP EnergyArea(); ~EnergyArea() override; - CIMPP::ControlArea* ControlArea; /* The control area specification that is used for the load forecast. Default: 0 */ + /** \brief The control area specification that is used for the load forecast. Default: 0 */ + CIMPP::ControlArea* ControlArea; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/EnergyConsumer.cpp b/CGMES_2.4.13_18DEC2013/EnergyConsumer.cpp index cc1802647..b95cded7e 100644 --- a/CGMES_2.4.13_18DEC2013/EnergyConsumer.cpp +++ b/CGMES_2.4.13_18DEC2013/EnergyConsumer.cpp @@ -10,17 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "LoadDynamics.hpp" #include "LoadResponseCharacteristic.hpp" -#include "ActivePower.hpp" -#include "ActivePower.hpp" -#include "PerCent.hpp" -#include "ReactivePower.hpp" -#include "ReactivePower.hpp" -#include "PerCent.hpp" using namespace CIMPP; -EnergyConsumer::EnergyConsumer() : LoadDynamics(nullptr), LoadResponse(nullptr) {}; -EnergyConsumer::~EnergyConsumer() {}; +EnergyConsumer::EnergyConsumer() : LoadDynamics(nullptr), LoadResponse(nullptr) {} +EnergyConsumer::~EnergyConsumer() {} static const std::list PossibleProfilesForClass = { @@ -56,122 +50,156 @@ EnergyConsumer::getPossibleProfilesForAttributes() const return map; } +bool assign_LoadDynamics_EnergyConsumer(BaseClass*, BaseClass*); +bool assign_EnergyConsumer_LoadDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + LoadDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->LoadDynamics != element2) + { + element->LoadDynamics = element2; + return assign_LoadDynamics_EnergyConsumer(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_EnergyConsumer_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_EnergyConsumer(BaseClass*, BaseClass*); +bool assign_EnergyConsumer_LoadResponse(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + LoadResponseCharacteristic* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->LoadResponse != element2) + { + element->LoadResponse = element2; + return assign_LoadResponseCharacteristic_EnergyConsumer(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_EnergyConsumer_p(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergyConsumer_pfixed(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergyConsumer_pfixed(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pfixed; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergyConsumer_pfixedPct(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergyConsumer_pfixedPct(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pfixedPct; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergyConsumer_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergyConsumer_q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergyConsumer_qfixed(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergyConsumer_qfixed(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qfixed; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergyConsumer_qfixedPct(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergyConsumer_qfixedPct(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qfixedPct; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_LoadDynamics_EnergyConsumer(BaseClass*, BaseClass*); -bool assign_EnergyConsumer_LoadDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_EnergyConsumer_LoadDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); - LoadDynamics* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->LoadDynamics != element2) + if (element->LoadDynamics != 0) { - element->LoadDynamics = element2; - return assign_LoadDynamics_EnergyConsumer(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->LoadDynamics); + return true; } - return true; } return false; } -bool assign_LoadResponseCharacteristic_EnergyConsumer(BaseClass*, BaseClass*); -bool assign_EnergyConsumer_LoadResponse(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool get_EnergyConsumer_LoadResponse(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); - LoadResponseCharacteristic* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->LoadResponse != element2) + if (element->LoadResponse != 0) { - element->LoadResponse = element2; - return assign_LoadResponseCharacteristic_EnergyConsumer(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->LoadResponse); + return true; } - return true; } return false; } bool get_EnergyConsumer_p(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p; if (!buffer.str().empty()) @@ -185,7 +213,8 @@ bool get_EnergyConsumer_p(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_EnergyConsumer_pfixed(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pfixed; if (!buffer.str().empty()) @@ -199,7 +228,8 @@ bool get_EnergyConsumer_pfixed(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_EnergyConsumer_pfixedPct(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pfixedPct; if (!buffer.str().empty()) @@ -213,7 +243,8 @@ bool get_EnergyConsumer_pfixedPct(const BaseClass* BaseClass_ptr1, std::stringst bool get_EnergyConsumer_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q; if (!buffer.str().empty()) @@ -227,7 +258,8 @@ bool get_EnergyConsumer_q(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_EnergyConsumer_qfixed(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qfixed; if (!buffer.str().empty()) @@ -241,7 +273,8 @@ bool get_EnergyConsumer_qfixed(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_EnergyConsumer_qfixedPct(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qfixedPct; if (!buffer.str().empty()) @@ -253,34 +286,6 @@ bool get_EnergyConsumer_qfixedPct(const BaseClass* BaseClass_ptr1, std::stringst return false; } - -bool get_EnergyConsumer_LoadDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->LoadDynamics != 0) - { - BaseClass_list.push_back(element->LoadDynamics); - return true; - } - } - return false; -} - -bool get_EnergyConsumer_LoadResponse(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->LoadResponse != 0) - { - BaseClass_list.push_back(element->LoadResponse); - return true; - } - } - return false; -} - - const char EnergyConsumer::debugName[] = "EnergyConsumer"; const char* EnergyConsumer::debugString() const { @@ -289,23 +294,23 @@ const char* EnergyConsumer::debugString() const void EnergyConsumer::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EnergyConsumer"), &EnergyConsumer_factory)); + factory_map.emplace("cim:EnergyConsumer", &EnergyConsumer_factory); } void EnergyConsumer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EnergyConsumer.p"), &assign_EnergyConsumer_p)); - assign_map.insert(std::make_pair(std::string("cim:EnergyConsumer.pfixed"), &assign_EnergyConsumer_pfixed)); - assign_map.insert(std::make_pair(std::string("cim:EnergyConsumer.pfixedPct"), &assign_EnergyConsumer_pfixedPct)); - assign_map.insert(std::make_pair(std::string("cim:EnergyConsumer.q"), &assign_EnergyConsumer_q)); - assign_map.insert(std::make_pair(std::string("cim:EnergyConsumer.qfixed"), &assign_EnergyConsumer_qfixed)); - assign_map.insert(std::make_pair(std::string("cim:EnergyConsumer.qfixedPct"), &assign_EnergyConsumer_qfixedPct)); + assign_map.emplace("cim:EnergyConsumer.p", &assign_EnergyConsumer_p); + assign_map.emplace("cim:EnergyConsumer.pfixed", &assign_EnergyConsumer_pfixed); + assign_map.emplace("cim:EnergyConsumer.pfixedPct", &assign_EnergyConsumer_pfixedPct); + assign_map.emplace("cim:EnergyConsumer.q", &assign_EnergyConsumer_q); + assign_map.emplace("cim:EnergyConsumer.qfixed", &assign_EnergyConsumer_qfixed); + assign_map.emplace("cim:EnergyConsumer.qfixedPct", &assign_EnergyConsumer_qfixedPct); } void EnergyConsumer::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EnergyConsumer.LoadDynamics"), &assign_EnergyConsumer_LoadDynamics)); - assign_map.insert(std::make_pair(std::string("cim:EnergyConsumer.LoadResponse"), &assign_EnergyConsumer_LoadResponse)); + assign_map.emplace("cim:EnergyConsumer.LoadDynamics", &assign_EnergyConsumer_LoadDynamics); + assign_map.emplace("cim:EnergyConsumer.LoadResponse", &assign_EnergyConsumer_LoadResponse); } void EnergyConsumer::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/EnergyConsumer.hpp b/CGMES_2.4.13_18DEC2013/EnergyConsumer.hpp index ad20849d2..54d03c283 100644 --- a/CGMES_2.4.13_18DEC2013/EnergyConsumer.hpp +++ b/CGMES_2.4.13_18DEC2013/EnergyConsumer.hpp @@ -21,9 +21,7 @@ namespace CIMPP class LoadDynamics; class LoadResponseCharacteristic; - /* - Generic user of energy - a point of consumption on the power system model. - */ + /** \brief Generic user of energy - a point of consumption on the power system model. */ class EnergyConsumer : public ConductingEquipment { public: @@ -31,14 +29,29 @@ namespace CIMPP EnergyConsumer(); ~EnergyConsumer() override; - CIMPP::LoadDynamics* LoadDynamics; /* Load dynamics model used to describe dynamic behavior of this energy consumer. Default: 0 */ - CIMPP::LoadResponseCharacteristic* LoadResponse; /* The load response characteristic of this load. If missing, this load is assumed to be constant power. Default: 0 */ - CIMPP::ActivePower p; /* Active power of the load. Load sign convention is used, i.e. positive sign means flow out from a node. For voltage dependent loads the value is at rated voltage. Starting value for a steady state solution. Default: nullptr */ - CIMPP::ActivePower pfixed; /* Active power of the load that is a fixed quantity. Load sign convention is used, i.e. positive sign means flow out from a node. Default: nullptr */ - CIMPP::PerCent pfixedPct; /* Fixed active power as per cent of load group fixed active power. Load sign convention is used, i.e. positive sign means flow out from a node. Default: nullptr */ - CIMPP::ReactivePower q; /* Reactive power of the load. Load sign convention is used, i.e. positive sign means flow out from a node. For voltage dependent loads the value is at rated voltage. Starting value for a steady state solution. Default: nullptr */ - CIMPP::ReactivePower qfixed; /* Reactive power of the load that is a fixed quantity. Load sign convention is used, i.e. positive sign means flow out from a node. Default: nullptr */ - CIMPP::PerCent qfixedPct; /* Fixed reactive power as per cent of load group fixed reactive power. Load sign convention is used, i.e. positive sign means flow out from a node. Default: nullptr */ + /** \brief Load dynamics model used to describe dynamic behavior of this energy consumer. Default: 0 */ + CIMPP::LoadDynamics* LoadDynamics; + + /** \brief The load response characteristic of this load. If missing, this load is assumed to be constant power. Default: 0 */ + CIMPP::LoadResponseCharacteristic* LoadResponse; + + /** \brief Active power of the load. Load sign convention is used, i.e. positive sign means flow out from a node. For voltage dependent loads the value is at rated voltage. Starting value for a steady state solution. Default: nullptr */ + CIMPP::ActivePower p; + + /** \brief Active power of the load that is a fixed quantity. Load sign convention is used, i.e. positive sign means flow out from a node. Default: nullptr */ + CIMPP::ActivePower pfixed; + + /** \brief Fixed active power as per cent of load group fixed active power. Load sign convention is used, i.e. positive sign means flow out from a node. Default: nullptr */ + CIMPP::PerCent pfixedPct; + + /** \brief Reactive power of the load. Load sign convention is used, i.e. positive sign means flow out from a node. For voltage dependent loads the value is at rated voltage. Starting value for a steady state solution. Default: nullptr */ + CIMPP::ReactivePower q; + + /** \brief Reactive power of the load that is a fixed quantity. Load sign convention is used, i.e. positive sign means flow out from a node. Default: nullptr */ + CIMPP::ReactivePower qfixed; + + /** \brief Fixed reactive power as per cent of load group fixed reactive power. Load sign convention is used, i.e. positive sign means flow out from a node. Default: nullptr */ + CIMPP::PerCent qfixedPct; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/EnergySchedulingType.cpp b/CGMES_2.4.13_18DEC2013/EnergySchedulingType.cpp index 7cc838456..9a4007c0e 100644 --- a/CGMES_2.4.13_18DEC2013/EnergySchedulingType.cpp +++ b/CGMES_2.4.13_18DEC2013/EnergySchedulingType.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -EnergySchedulingType::EnergySchedulingType() {}; -EnergySchedulingType::~EnergySchedulingType() {}; +EnergySchedulingType::EnergySchedulingType() {} +EnergySchedulingType::~EnergySchedulingType() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ EnergySchedulingType::getPossibleProfilesForAttributes() const return map; } - - bool assign_EnergySource_EnergySchedulingType(BaseClass*, BaseClass*); bool assign_EnergySchedulingType_EnergySource(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,7 +59,6 @@ bool assign_EnergySchedulingType_EnergySource(BaseClass* BaseClass_ptr1, BaseCla } - const char EnergySchedulingType::debugName[] = "EnergySchedulingType"; const char* EnergySchedulingType::debugString() const { @@ -70,7 +67,7 @@ const char* EnergySchedulingType::debugString() const void EnergySchedulingType::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EnergySchedulingType"), &EnergySchedulingType_factory)); + factory_map.emplace("cim:EnergySchedulingType", &EnergySchedulingType_factory); } void EnergySchedulingType::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -79,7 +76,7 @@ void EnergySchedulingType::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EnergySchedulingType.EnergySource"), &assign_EnergySchedulingType_EnergySource)); + assign_map.emplace("cim:EnergySchedulingType.EnergySource", &assign_EnergySchedulingType_EnergySource); } void EnergySchedulingType::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/EnergySchedulingType.hpp b/CGMES_2.4.13_18DEC2013/EnergySchedulingType.hpp index 19ec45f6a..b3d0489f1 100644 --- a/CGMES_2.4.13_18DEC2013/EnergySchedulingType.hpp +++ b/CGMES_2.4.13_18DEC2013/EnergySchedulingType.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class EnergySource; - /* - Used to define the type of generation for scheduling purposes. - */ + /** \brief Used to define the type of generation for scheduling purposes. */ class EnergySchedulingType : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP EnergySchedulingType(); ~EnergySchedulingType() override; - std::list EnergySource; /* Energy Scheduling Type of an Energy Source Default: 0 */ + /** \brief Energy Scheduling Type of an Energy Source Default: 0 */ + std::list EnergySource; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/EnergySource.cpp b/CGMES_2.4.13_18DEC2013/EnergySource.cpp index df677eebb..487c67ebe 100644 --- a/CGMES_2.4.13_18DEC2013/EnergySource.cpp +++ b/CGMES_2.4.13_18DEC2013/EnergySource.cpp @@ -10,22 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "EnergySchedulingType.hpp" #include "WindTurbineType3or4Dynamics.hpp" -#include "ActivePower.hpp" -#include "Voltage.hpp" -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "ReactivePower.hpp" -#include "Resistance.hpp" -#include "AngleRadians.hpp" -#include "Voltage.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -EnergySource::EnergySource() : EnergySchedulingType(nullptr), WindTurbineType3or4Dynamics(nullptr) {}; -EnergySource::~EnergySource() {}; +EnergySource::EnergySource() : EnergySchedulingType(nullptr), WindTurbineType3or4Dynamics(nullptr) {} +EnergySource::~EnergySource() {} static const std::list PossibleProfilesForClass = { @@ -66,187 +55,213 @@ EnergySource::getPossibleProfilesForAttributes() const return map; } +bool assign_EnergySchedulingType_EnergySource(BaseClass*, BaseClass*); +bool assign_EnergySource_EnergySchedulingType(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + EnergySource* element = dynamic_cast(BaseClass_ptr1); + EnergySchedulingType* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->EnergySchedulingType != element2) + { + element->EnergySchedulingType = element2; + return assign_EnergySchedulingType_EnergySource(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindTurbineType3or4Dynamics_EnergySource(BaseClass*, BaseClass*); +bool assign_EnergySource_WindTurbineType3or4Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + EnergySource* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType3or4Dynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindTurbineType3or4Dynamics != element2) + { + element->WindTurbineType3or4Dynamics = element2; + return assign_WindTurbineType3or4Dynamics_EnergySource(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_EnergySource_activePower(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_activePower(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->activePower; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_nominalVoltage(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_nominalVoltage(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nominalVoltage; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_r0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_reactivePower(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_reactivePower(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->reactivePower; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_rn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_rn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_voltageAngle(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_voltageAngle(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->voltageAngle; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_voltageMagnitude(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_voltageMagnitude(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->voltageMagnitude; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_x(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_x0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x0; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_EnergySource_xn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->xn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_EnergySchedulingType_EnergySource(BaseClass*, BaseClass*); -bool assign_EnergySource_EnergySchedulingType(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_EnergySource_xn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { EnergySource* element = dynamic_cast(BaseClass_ptr1); - EnergySchedulingType* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->EnergySchedulingType != element2) + buffer >> element->xn; + if (!buffer.fail()) { - element->EnergySchedulingType = element2; - return assign_EnergySchedulingType_EnergySource(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_WindTurbineType3or4Dynamics_EnergySource(BaseClass*, BaseClass*); -bool assign_EnergySource_WindTurbineType3or4Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool get_EnergySource_EnergySchedulingType(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - EnergySource* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType3or4Dynamics* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->WindTurbineType3or4Dynamics != element2) + if (element->EnergySchedulingType != 0) { - element->WindTurbineType3or4Dynamics = element2; - return assign_WindTurbineType3or4Dynamics_EnergySource(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->EnergySchedulingType); + return true; } - return true; } return false; } + bool get_EnergySource_activePower(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->activePower; if (!buffer.str().empty()) @@ -260,7 +275,8 @@ bool get_EnergySource_activePower(const BaseClass* BaseClass_ptr1, std::stringst bool get_EnergySource_nominalVoltage(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nominalVoltage; if (!buffer.str().empty()) @@ -274,7 +290,8 @@ bool get_EnergySource_nominalVoltage(const BaseClass* BaseClass_ptr1, std::strin bool get_EnergySource_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -288,7 +305,8 @@ bool get_EnergySource_r(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_EnergySource_r0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r0; if (!buffer.str().empty()) @@ -302,7 +320,8 @@ bool get_EnergySource_r0(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_EnergySource_reactivePower(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->reactivePower; if (!buffer.str().empty()) @@ -316,7 +335,8 @@ bool get_EnergySource_reactivePower(const BaseClass* BaseClass_ptr1, std::string bool get_EnergySource_rn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rn; if (!buffer.str().empty()) @@ -330,7 +350,8 @@ bool get_EnergySource_rn(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_EnergySource_voltageAngle(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->voltageAngle; if (!buffer.str().empty()) @@ -344,7 +365,8 @@ bool get_EnergySource_voltageAngle(const BaseClass* BaseClass_ptr1, std::strings bool get_EnergySource_voltageMagnitude(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->voltageMagnitude; if (!buffer.str().empty()) @@ -358,7 +380,8 @@ bool get_EnergySource_voltageMagnitude(const BaseClass* BaseClass_ptr1, std::str bool get_EnergySource_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x; if (!buffer.str().empty()) @@ -372,7 +395,8 @@ bool get_EnergySource_x(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_EnergySource_x0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x0; if (!buffer.str().empty()) @@ -386,7 +410,8 @@ bool get_EnergySource_x0(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_EnergySource_xn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xn; if (!buffer.str().empty()) @@ -398,21 +423,6 @@ bool get_EnergySource_xn(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } - -bool get_EnergySource_EnergySchedulingType(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->EnergySchedulingType != 0) - { - BaseClass_list.push_back(element->EnergySchedulingType); - return true; - } - } - return false; -} - - const char EnergySource::debugName[] = "EnergySource"; const char* EnergySource::debugString() const { @@ -421,28 +431,28 @@ const char* EnergySource::debugString() const void EnergySource::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EnergySource"), &EnergySource_factory)); + factory_map.emplace("cim:EnergySource", &EnergySource_factory); } void EnergySource::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EnergySource.activePower"), &assign_EnergySource_activePower)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.nominalVoltage"), &assign_EnergySource_nominalVoltage)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.r"), &assign_EnergySource_r)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.r0"), &assign_EnergySource_r0)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.reactivePower"), &assign_EnergySource_reactivePower)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.rn"), &assign_EnergySource_rn)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.voltageAngle"), &assign_EnergySource_voltageAngle)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.voltageMagnitude"), &assign_EnergySource_voltageMagnitude)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.x"), &assign_EnergySource_x)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.x0"), &assign_EnergySource_x0)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.xn"), &assign_EnergySource_xn)); + assign_map.emplace("cim:EnergySource.activePower", &assign_EnergySource_activePower); + assign_map.emplace("cim:EnergySource.nominalVoltage", &assign_EnergySource_nominalVoltage); + assign_map.emplace("cim:EnergySource.r", &assign_EnergySource_r); + assign_map.emplace("cim:EnergySource.r0", &assign_EnergySource_r0); + assign_map.emplace("cim:EnergySource.reactivePower", &assign_EnergySource_reactivePower); + assign_map.emplace("cim:EnergySource.rn", &assign_EnergySource_rn); + assign_map.emplace("cim:EnergySource.voltageAngle", &assign_EnergySource_voltageAngle); + assign_map.emplace("cim:EnergySource.voltageMagnitude", &assign_EnergySource_voltageMagnitude); + assign_map.emplace("cim:EnergySource.x", &assign_EnergySource_x); + assign_map.emplace("cim:EnergySource.x0", &assign_EnergySource_x0); + assign_map.emplace("cim:EnergySource.xn", &assign_EnergySource_xn); } void EnergySource::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EnergySource.EnergySchedulingType"), &assign_EnergySource_EnergySchedulingType)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.WindTurbineType3or4Dynamics"), &assign_EnergySource_WindTurbineType3or4Dynamics)); + assign_map.emplace("cim:EnergySource.EnergySchedulingType", &assign_EnergySource_EnergySchedulingType); + assign_map.emplace("cim:EnergySource.WindTurbineType3or4Dynamics", &assign_EnergySource_WindTurbineType3or4Dynamics); } void EnergySource::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/EnergySource.hpp b/CGMES_2.4.13_18DEC2013/EnergySource.hpp index e0d550ed1..6472e47ce 100644 --- a/CGMES_2.4.13_18DEC2013/EnergySource.hpp +++ b/CGMES_2.4.13_18DEC2013/EnergySource.hpp @@ -24,9 +24,7 @@ namespace CIMPP class EnergySchedulingType; class WindTurbineType3or4Dynamics; - /* - A generic equivalent for an energy supplier on a transmission or distribution voltage level. - */ + /** \brief A generic equivalent for an energy supplier on a transmission or distribution voltage level. */ class EnergySource : public ConductingEquipment { public: @@ -34,19 +32,44 @@ namespace CIMPP EnergySource(); ~EnergySource() override; - CIMPP::EnergySchedulingType* EnergySchedulingType; /* Energy Source of a particular Energy Scheduling Type Default: 0 */ - CIMPP::WindTurbineType3or4Dynamics* WindTurbineType3or4Dynamics; /* Wind generator Type 3 or 4 dynamics model associated with this energy source. Default: 0 */ - CIMPP::ActivePower activePower; /* High voltage source active injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ - CIMPP::Voltage nominalVoltage; /* Phase-to-phase nominal voltage. Default: nullptr */ - CIMPP::Resistance r; /* Positive sequence Thevenin resistance. Default: nullptr */ - CIMPP::Resistance r0; /* Zero sequence Thevenin resistance. Default: nullptr */ - CIMPP::ReactivePower reactivePower; /* High voltage source reactive injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ - CIMPP::Resistance rn; /* Negative sequence Thevenin resistance. Default: nullptr */ - CIMPP::AngleRadians voltageAngle; /* Phase angle of a-phase open circuit. Default: nullptr */ - CIMPP::Voltage voltageMagnitude; /* Phase-to-phase open circuit voltage magnitude. Default: nullptr */ - CIMPP::Reactance x; /* Positive sequence Thevenin reactance. Default: nullptr */ - CIMPP::Reactance x0; /* Zero sequence Thevenin reactance. Default: nullptr */ - CIMPP::Reactance xn; /* Negative sequence Thevenin reactance. Default: nullptr */ + /** \brief Energy Source of a particular Energy Scheduling Type Default: 0 */ + CIMPP::EnergySchedulingType* EnergySchedulingType; + + /** \brief Wind generator Type 3 or 4 dynamics model associated with this energy source. Default: 0 */ + CIMPP::WindTurbineType3or4Dynamics* WindTurbineType3or4Dynamics; + + /** \brief High voltage source active injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ + CIMPP::ActivePower activePower; + + /** \brief Phase-to-phase nominal voltage. Default: nullptr */ + CIMPP::Voltage nominalVoltage; + + /** \brief Positive sequence Thevenin resistance. Default: nullptr */ + CIMPP::Resistance r; + + /** \brief Zero sequence Thevenin resistance. Default: nullptr */ + CIMPP::Resistance r0; + + /** \brief High voltage source reactive injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ + CIMPP::ReactivePower reactivePower; + + /** \brief Negative sequence Thevenin resistance. Default: nullptr */ + CIMPP::Resistance rn; + + /** \brief Phase angle of a-phase open circuit. Default: nullptr */ + CIMPP::AngleRadians voltageAngle; + + /** \brief Phase-to-phase open circuit voltage magnitude. Default: nullptr */ + CIMPP::Voltage voltageMagnitude; + + /** \brief Positive sequence Thevenin reactance. Default: nullptr */ + CIMPP::Reactance x; + + /** \brief Zero sequence Thevenin reactance. Default: nullptr */ + CIMPP::Reactance x0; + + /** \brief Negative sequence Thevenin reactance. Default: nullptr */ + CIMPP::Reactance xn; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Equipment.cpp b/CGMES_2.4.13_18DEC2013/Equipment.cpp index fe1b8a36e..1b08d8503 100644 --- a/CGMES_2.4.13_18DEC2013/Equipment.cpp +++ b/CGMES_2.4.13_18DEC2013/Equipment.cpp @@ -10,12 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "EquipmentContainer.hpp" #include "OperationalLimitSet.hpp" -#include "Boolean.hpp" using namespace CIMPP; -Equipment::Equipment() : EquipmentContainer(nullptr) {}; -Equipment::~Equipment() {}; +Equipment::Equipment() : EquipmentContainer(nullptr) {} +Equipment::~Equipment() {} static const std::list PossibleProfilesForClass = { @@ -46,21 +45,6 @@ Equipment::getPossibleProfilesForAttributes() const return map; } - -bool assign_Equipment_aggregate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (Equipment* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->aggregate; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_EquipmentContainer_Equipments(BaseClass*, BaseClass*); bool assign_Equipment_EquipmentContainer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,6 +61,7 @@ bool assign_Equipment_EquipmentContainer(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_OperationalLimitSet_Equipment(BaseClass*, BaseClass*); bool assign_Equipment_OperationalLimitSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -94,24 +79,24 @@ bool assign_Equipment_OperationalLimitSet(BaseClass* BaseClass_ptr1, BaseClass* return false; } -bool get_Equipment_aggregate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_Equipment_aggregate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const Equipment* element = dynamic_cast(BaseClass_ptr1)) + Equipment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->aggregate; - if (!buffer.str().empty()) + buffer >> element->aggregate; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_Equipment_EquipmentContainer(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Equipment* element = dynamic_cast(BaseClass_ptr1)) + const Equipment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->EquipmentContainer != 0) { @@ -123,6 +108,21 @@ bool get_Equipment_EquipmentContainer(const BaseClass* BaseClass_ptr1, std::list } +bool get_Equipment_aggregate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const Equipment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->aggregate; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + const char Equipment::debugName[] = "Equipment"; const char* Equipment::debugString() const { @@ -131,18 +131,18 @@ const char* Equipment::debugString() const void Equipment::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Equipment"), &Equipment_factory)); + factory_map.emplace("cim:Equipment", &Equipment_factory); } void Equipment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Equipment.aggregate"), &assign_Equipment_aggregate)); + assign_map.emplace("cim:Equipment.aggregate", &assign_Equipment_aggregate); } void Equipment::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Equipment.EquipmentContainer"), &assign_Equipment_EquipmentContainer)); - assign_map.insert(std::make_pair(std::string("cim:Equipment.OperationalLimitSet"), &assign_Equipment_OperationalLimitSet)); + assign_map.emplace("cim:Equipment.EquipmentContainer", &assign_Equipment_EquipmentContainer); + assign_map.emplace("cim:Equipment.OperationalLimitSet", &assign_Equipment_OperationalLimitSet); } void Equipment::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/Equipment.hpp b/CGMES_2.4.13_18DEC2013/Equipment.hpp index 9570e3b18..7a818843f 100644 --- a/CGMES_2.4.13_18DEC2013/Equipment.hpp +++ b/CGMES_2.4.13_18DEC2013/Equipment.hpp @@ -19,9 +19,7 @@ namespace CIMPP class EquipmentContainer; class OperationalLimitSet; - /* - The parts of a power system that are physical devices, electronic or mechanical. - */ + /** \brief The parts of a power system that are physical devices, electronic or mechanical. */ class Equipment : public PowerSystemResource { public: @@ -29,9 +27,14 @@ namespace CIMPP Equipment(); ~Equipment() override; - CIMPP::EquipmentContainer* EquipmentContainer; /* Container of this equipment. Default: 0 */ - std::list OperationalLimitSet; /* The operational limit sets associated with this equipment. Default: 0 */ - CIMPP::Boolean aggregate; /* The single instance of equipment represents multiple pieces of equipment that have been modeled together as an aggregate. Examples would be power transformers or synchronous machines operating in parallel modeled as a single aggregate power transformer or aggregate synchronous machine. This is not to be used to indicate equipment that is part of a group of interdependent equipment produced by a network production program. Default: false */ + /** \brief Container of this equipment. Default: 0 */ + CIMPP::EquipmentContainer* EquipmentContainer; + + /** \brief The operational limit sets associated with this equipment. Default: 0 */ + std::list OperationalLimitSet; + + /** \brief The single instance of equipment represents multiple pieces of equipment that have been modeled together as an aggregate. Examples would be power transformers or synchronous machines operating in parallel modeled as a single aggregate power transformer or aggregate synchronous machine. This is not to be used to indicate equipment that is part of a group of interdependent equipment produced by a network production program. Default: false */ + CIMPP::Boolean aggregate; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/EquipmentBoundaryVersion.cpp b/CGMES_2.4.13_18DEC2013/EquipmentBoundaryVersion.cpp index 50f212fdc..93b5017ab 100644 --- a/CGMES_2.4.13_18DEC2013/EquipmentBoundaryVersion.cpp +++ b/CGMES_2.4.13_18DEC2013/EquipmentBoundaryVersion.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "String.hpp" -#include "String.hpp" -#include "Date.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -EquipmentBoundaryVersion::EquipmentBoundaryVersion() {}; -EquipmentBoundaryVersion::~EquipmentBoundaryVersion() {}; +EquipmentBoundaryVersion::EquipmentBoundaryVersion() {} +EquipmentBoundaryVersion::~EquipmentBoundaryVersion() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ EquipmentBoundaryVersion::getPossibleProfilesForAttributes() const return map; } - -bool assign_EquipmentBoundaryVersion_baseUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentBoundaryVersion_baseUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentBoundaryVersion_baseURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentBoundaryVersion_baseURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentBoundaryVersion_date(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentBoundaryVersion_date(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->date = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentBoundaryVersion_differenceModelURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentBoundaryVersion_differenceModelURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->differenceModelURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentBoundaryVersion_entsoeUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentBoundaryVersion_entsoeUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentBoundaryVersion_entsoeURIcore(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentBoundaryVersion_entsoeURIcore(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeURIcore = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentBoundaryVersion_entsoeURIoperation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentBoundaryVersion_entsoeURIoperation(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeURIoperation = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentBoundaryVersion_modelDescriptionURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentBoundaryVersion_modelDescriptionURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->modelDescriptionURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentBoundaryVersion_namespaceRDF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentBoundaryVersion_namespaceRDF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceRDF = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentBoundaryVersion_namespaceUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentBoundaryVersion_namespaceUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentBoundaryVersion_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentBoundaryVersion_shortName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->shortName = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_EquipmentBoundaryVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseUML; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_EquipmentBoundaryVersion_baseUML(const BaseClass* BaseClass_ptr1, std:: bool get_EquipmentBoundaryVersion_baseURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseURI; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_EquipmentBoundaryVersion_baseURI(const BaseClass* BaseClass_ptr1, std:: bool get_EquipmentBoundaryVersion_date(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->date; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_EquipmentBoundaryVersion_date(const BaseClass* BaseClass_ptr1, std::str bool get_EquipmentBoundaryVersion_differenceModelURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->differenceModelURI; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_EquipmentBoundaryVersion_differenceModelURI(const BaseClass* BaseClass_ bool get_EquipmentBoundaryVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeUML; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_EquipmentBoundaryVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std bool get_EquipmentBoundaryVersion_entsoeURIcore(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeURIcore; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_EquipmentBoundaryVersion_entsoeURIcore(const BaseClass* BaseClass_ptr1, bool get_EquipmentBoundaryVersion_entsoeURIoperation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeURIoperation; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_EquipmentBoundaryVersion_entsoeURIoperation(const BaseClass* BaseClass_ bool get_EquipmentBoundaryVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->modelDescriptionURI; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_EquipmentBoundaryVersion_modelDescriptionURI(const BaseClass* BaseClass bool get_EquipmentBoundaryVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceRDF; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_EquipmentBoundaryVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, bool get_EquipmentBoundaryVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceUML; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_EquipmentBoundaryVersion_namespaceUML(const BaseClass* BaseClass_ptr1, bool get_EquipmentBoundaryVersion_shortName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortName; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_EquipmentBoundaryVersion_shortName(const BaseClass* BaseClass_ptr1, std return false; } - - const char EquipmentBoundaryVersion::debugName[] = "EquipmentBoundaryVersion"; const char* EquipmentBoundaryVersion::debugString() const { @@ -370,22 +376,22 @@ const char* EquipmentBoundaryVersion::debugString() const void EquipmentBoundaryVersion::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EquipmentBoundaryVersion"), &EquipmentBoundaryVersion_factory)); + factory_map.emplace("cim:EquipmentBoundaryVersion", &EquipmentBoundaryVersion_factory); } void EquipmentBoundaryVersion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EquipmentBoundaryVersion.baseUML"), &assign_EquipmentBoundaryVersion_baseUML)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentBoundaryVersion.baseURI"), &assign_EquipmentBoundaryVersion_baseURI)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentBoundaryVersion.date"), &assign_EquipmentBoundaryVersion_date)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentBoundaryVersion.differenceModelURI"), &assign_EquipmentBoundaryVersion_differenceModelURI)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentBoundaryVersion.entsoeUML"), &assign_EquipmentBoundaryVersion_entsoeUML)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentBoundaryVersion.entsoeURIcore"), &assign_EquipmentBoundaryVersion_entsoeURIcore)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentBoundaryVersion.entsoeURIoperation"), &assign_EquipmentBoundaryVersion_entsoeURIoperation)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentBoundaryVersion.modelDescriptionURI"), &assign_EquipmentBoundaryVersion_modelDescriptionURI)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentBoundaryVersion.namespaceRDF"), &assign_EquipmentBoundaryVersion_namespaceRDF)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentBoundaryVersion.namespaceUML"), &assign_EquipmentBoundaryVersion_namespaceUML)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentBoundaryVersion.shortName"), &assign_EquipmentBoundaryVersion_shortName)); + assign_map.emplace("cim:EquipmentBoundaryVersion.baseUML", &assign_EquipmentBoundaryVersion_baseUML); + assign_map.emplace("cim:EquipmentBoundaryVersion.baseURI", &assign_EquipmentBoundaryVersion_baseURI); + assign_map.emplace("cim:EquipmentBoundaryVersion.date", &assign_EquipmentBoundaryVersion_date); + assign_map.emplace("cim:EquipmentBoundaryVersion.differenceModelURI", &assign_EquipmentBoundaryVersion_differenceModelURI); + assign_map.emplace("cim:EquipmentBoundaryVersion.entsoeUML", &assign_EquipmentBoundaryVersion_entsoeUML); + assign_map.emplace("cim:EquipmentBoundaryVersion.entsoeURIcore", &assign_EquipmentBoundaryVersion_entsoeURIcore); + assign_map.emplace("cim:EquipmentBoundaryVersion.entsoeURIoperation", &assign_EquipmentBoundaryVersion_entsoeURIoperation); + assign_map.emplace("cim:EquipmentBoundaryVersion.modelDescriptionURI", &assign_EquipmentBoundaryVersion_modelDescriptionURI); + assign_map.emplace("cim:EquipmentBoundaryVersion.namespaceRDF", &assign_EquipmentBoundaryVersion_namespaceRDF); + assign_map.emplace("cim:EquipmentBoundaryVersion.namespaceUML", &assign_EquipmentBoundaryVersion_namespaceUML); + assign_map.emplace("cim:EquipmentBoundaryVersion.shortName", &assign_EquipmentBoundaryVersion_shortName); } void EquipmentBoundaryVersion::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/EquipmentBoundaryVersion.hpp b/CGMES_2.4.13_18DEC2013/EquipmentBoundaryVersion.hpp index b7339e8e3..7dce745e6 100644 --- a/CGMES_2.4.13_18DEC2013/EquipmentBoundaryVersion.hpp +++ b/CGMES_2.4.13_18DEC2013/EquipmentBoundaryVersion.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Profile version details. - */ + /** \brief Profile version details. */ class EquipmentBoundaryVersion : public BaseClass { public: @@ -28,17 +26,38 @@ namespace CIMPP EquipmentBoundaryVersion(); ~EquipmentBoundaryVersion() override; - CIMPP::String baseUML; /* Base UML provided by CIM model manager. Default: '' */ - CIMPP::String baseURI; /* Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ - CIMPP::Date date; /* Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ - CIMPP::String differenceModelURI; /* Difference model URI defined by IEC 61970-552. Default: '' */ - CIMPP::String entsoeUML; /* UML provided by ENTSO-E. Default: '' */ - CIMPP::String entsoeURIcore; /* Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/EquipmentBoundary/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ - CIMPP::String entsoeURIoperation; /* Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/EquipmentBoundaryOperation/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ - CIMPP::String modelDescriptionURI; /* Model Description URI defined by IEC 61970-552. Default: '' */ - CIMPP::String namespaceRDF; /* RDF namespace. Default: '' */ - CIMPP::String namespaceUML; /* CIM UML namespace. Default: '' */ - CIMPP::String shortName; /* The short name of the profile used in profile documentation. Default: '' */ + /** \brief Base UML provided by CIM model manager. Default: '' */ + CIMPP::String baseUML; + + /** \brief Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ + CIMPP::String baseURI; + + /** \brief Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ + CIMPP::Date date; + + /** \brief Difference model URI defined by IEC 61970-552. Default: '' */ + CIMPP::String differenceModelURI; + + /** \brief UML provided by ENTSO-E. Default: '' */ + CIMPP::String entsoeUML; + + /** \brief Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/EquipmentBoundary/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ + CIMPP::String entsoeURIcore; + + /** \brief Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/EquipmentBoundaryOperation/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ + CIMPP::String entsoeURIoperation; + + /** \brief Model Description URI defined by IEC 61970-552. Default: '' */ + CIMPP::String modelDescriptionURI; + + /** \brief RDF namespace. Default: '' */ + CIMPP::String namespaceRDF; + + /** \brief CIM UML namespace. Default: '' */ + CIMPP::String namespaceUML; + + /** \brief The short name of the profile used in profile documentation. Default: '' */ + CIMPP::String shortName; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/EquipmentContainer.cpp b/CGMES_2.4.13_18DEC2013/EquipmentContainer.cpp index 3d8d1262d..4c86d8c57 100644 --- a/CGMES_2.4.13_18DEC2013/EquipmentContainer.cpp +++ b/CGMES_2.4.13_18DEC2013/EquipmentContainer.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -EquipmentContainer::EquipmentContainer() {}; -EquipmentContainer::~EquipmentContainer() {}; +EquipmentContainer::EquipmentContainer() {} +EquipmentContainer::~EquipmentContainer() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ EquipmentContainer::getPossibleProfilesForAttributes() const return map; } - - bool assign_Equipment_EquipmentContainer(BaseClass*, BaseClass*); bool assign_EquipmentContainer_Equipments(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,7 +59,6 @@ bool assign_EquipmentContainer_Equipments(BaseClass* BaseClass_ptr1, BaseClass* } - const char EquipmentContainer::debugName[] = "EquipmentContainer"; const char* EquipmentContainer::debugString() const { @@ -70,7 +67,7 @@ const char* EquipmentContainer::debugString() const void EquipmentContainer::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EquipmentContainer"), &EquipmentContainer_factory)); + factory_map.emplace("cim:EquipmentContainer", &EquipmentContainer_factory); } void EquipmentContainer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -79,7 +76,7 @@ void EquipmentContainer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EquipmentContainer.Equipments"), &assign_EquipmentContainer_Equipments)); + assign_map.emplace("cim:EquipmentContainer.Equipments", &assign_EquipmentContainer_Equipments); } void EquipmentContainer::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/EquipmentContainer.hpp b/CGMES_2.4.13_18DEC2013/EquipmentContainer.hpp index ff3a58ec1..5a76e1707 100644 --- a/CGMES_2.4.13_18DEC2013/EquipmentContainer.hpp +++ b/CGMES_2.4.13_18DEC2013/EquipmentContainer.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class Equipment; - /* - A modeling construct to provide a root class for containing equipment. - */ + /** \brief A modeling construct to provide a root class for containing equipment. */ class EquipmentContainer : public ConnectivityNodeContainer { public: @@ -27,7 +25,8 @@ namespace CIMPP EquipmentContainer(); ~EquipmentContainer() override; - std::list Equipments; /* Contained equipment. Default: 0 */ + /** \brief Contained equipment. Default: 0 */ + std::list Equipments; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/EquipmentVersion.cpp b/CGMES_2.4.13_18DEC2013/EquipmentVersion.cpp index 0544887c3..e02b7f229 100644 --- a/CGMES_2.4.13_18DEC2013/EquipmentVersion.cpp +++ b/CGMES_2.4.13_18DEC2013/EquipmentVersion.cpp @@ -8,25 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "Date.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -EquipmentVersion::EquipmentVersion() {}; -EquipmentVersion::~EquipmentVersion() {}; +EquipmentVersion::EquipmentVersion() {} +EquipmentVersion::~EquipmentVersion() {} static const std::list PossibleProfilesForClass = { @@ -66,194 +52,206 @@ EquipmentVersion::getPossibleProfilesForAttributes() const return map; } - -bool assign_EquipmentVersion_baseUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_baseUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_baseURIcore(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_baseURIcore(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseURIcore = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_baseURIoperation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_baseURIoperation(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseURIoperation = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_baseURIshortCircuit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_baseURIshortCircuit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseURIshortCircuit = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_date(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_date(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->date = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_differenceModelURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_differenceModelURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->differenceModelURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_entsoeUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_entsoeUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_entsoeURIcore(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_entsoeURIcore(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeURIcore = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_entsoeURIoperation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_entsoeURIoperation(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeURIoperation = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_entsoeURIshortCircuit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_entsoeURIshortCircuit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeURIshortCircuit = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_modelDescriptionURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_modelDescriptionURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->modelDescriptionURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_namespaceRDF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_namespaceRDF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceRDF = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_namespaceUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_namespaceUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_shortName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->shortName = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_EquipmentVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseUML; if (!buffer.str().empty()) @@ -267,7 +265,8 @@ bool get_EquipmentVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stringst bool get_EquipmentVersion_baseURIcore(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseURIcore; if (!buffer.str().empty()) @@ -281,7 +280,8 @@ bool get_EquipmentVersion_baseURIcore(const BaseClass* BaseClass_ptr1, std::stri bool get_EquipmentVersion_baseURIoperation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseURIoperation; if (!buffer.str().empty()) @@ -295,7 +295,8 @@ bool get_EquipmentVersion_baseURIoperation(const BaseClass* BaseClass_ptr1, std: bool get_EquipmentVersion_baseURIshortCircuit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseURIshortCircuit; if (!buffer.str().empty()) @@ -309,7 +310,8 @@ bool get_EquipmentVersion_baseURIshortCircuit(const BaseClass* BaseClass_ptr1, s bool get_EquipmentVersion_date(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->date; if (!buffer.str().empty()) @@ -323,7 +325,8 @@ bool get_EquipmentVersion_date(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_EquipmentVersion_differenceModelURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->differenceModelURI; if (!buffer.str().empty()) @@ -337,7 +340,8 @@ bool get_EquipmentVersion_differenceModelURI(const BaseClass* BaseClass_ptr1, st bool get_EquipmentVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeUML; if (!buffer.str().empty()) @@ -351,7 +355,8 @@ bool get_EquipmentVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::string bool get_EquipmentVersion_entsoeURIcore(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeURIcore; if (!buffer.str().empty()) @@ -365,7 +370,8 @@ bool get_EquipmentVersion_entsoeURIcore(const BaseClass* BaseClass_ptr1, std::st bool get_EquipmentVersion_entsoeURIoperation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeURIoperation; if (!buffer.str().empty()) @@ -379,7 +385,8 @@ bool get_EquipmentVersion_entsoeURIoperation(const BaseClass* BaseClass_ptr1, st bool get_EquipmentVersion_entsoeURIshortCircuit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeURIshortCircuit; if (!buffer.str().empty()) @@ -393,7 +400,8 @@ bool get_EquipmentVersion_entsoeURIshortCircuit(const BaseClass* BaseClass_ptr1, bool get_EquipmentVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->modelDescriptionURI; if (!buffer.str().empty()) @@ -407,7 +415,8 @@ bool get_EquipmentVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr1, s bool get_EquipmentVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceRDF; if (!buffer.str().empty()) @@ -421,7 +430,8 @@ bool get_EquipmentVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std::str bool get_EquipmentVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceUML; if (!buffer.str().empty()) @@ -435,7 +445,8 @@ bool get_EquipmentVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std::str bool get_EquipmentVersion_shortName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortName; if (!buffer.str().empty()) @@ -447,8 +458,6 @@ bool get_EquipmentVersion_shortName(const BaseClass* BaseClass_ptr1, std::string return false; } - - const char EquipmentVersion::debugName[] = "EquipmentVersion"; const char* EquipmentVersion::debugString() const { @@ -457,25 +466,25 @@ const char* EquipmentVersion::debugString() const void EquipmentVersion::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EquipmentVersion"), &EquipmentVersion_factory)); + factory_map.emplace("cim:EquipmentVersion", &EquipmentVersion_factory); } void EquipmentVersion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.baseUML"), &assign_EquipmentVersion_baseUML)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.baseURIcore"), &assign_EquipmentVersion_baseURIcore)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.baseURIoperation"), &assign_EquipmentVersion_baseURIoperation)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.baseURIshortCircuit"), &assign_EquipmentVersion_baseURIshortCircuit)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.date"), &assign_EquipmentVersion_date)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.differenceModelURI"), &assign_EquipmentVersion_differenceModelURI)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.entsoeUML"), &assign_EquipmentVersion_entsoeUML)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.entsoeURIcore"), &assign_EquipmentVersion_entsoeURIcore)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.entsoeURIoperation"), &assign_EquipmentVersion_entsoeURIoperation)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.entsoeURIshortCircuit"), &assign_EquipmentVersion_entsoeURIshortCircuit)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.modelDescriptionURI"), &assign_EquipmentVersion_modelDescriptionURI)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.namespaceRDF"), &assign_EquipmentVersion_namespaceRDF)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.namespaceUML"), &assign_EquipmentVersion_namespaceUML)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.shortName"), &assign_EquipmentVersion_shortName)); + assign_map.emplace("cim:EquipmentVersion.baseUML", &assign_EquipmentVersion_baseUML); + assign_map.emplace("cim:EquipmentVersion.baseURIcore", &assign_EquipmentVersion_baseURIcore); + assign_map.emplace("cim:EquipmentVersion.baseURIoperation", &assign_EquipmentVersion_baseURIoperation); + assign_map.emplace("cim:EquipmentVersion.baseURIshortCircuit", &assign_EquipmentVersion_baseURIshortCircuit); + assign_map.emplace("cim:EquipmentVersion.date", &assign_EquipmentVersion_date); + assign_map.emplace("cim:EquipmentVersion.differenceModelURI", &assign_EquipmentVersion_differenceModelURI); + assign_map.emplace("cim:EquipmentVersion.entsoeUML", &assign_EquipmentVersion_entsoeUML); + assign_map.emplace("cim:EquipmentVersion.entsoeURIcore", &assign_EquipmentVersion_entsoeURIcore); + assign_map.emplace("cim:EquipmentVersion.entsoeURIoperation", &assign_EquipmentVersion_entsoeURIoperation); + assign_map.emplace("cim:EquipmentVersion.entsoeURIshortCircuit", &assign_EquipmentVersion_entsoeURIshortCircuit); + assign_map.emplace("cim:EquipmentVersion.modelDescriptionURI", &assign_EquipmentVersion_modelDescriptionURI); + assign_map.emplace("cim:EquipmentVersion.namespaceRDF", &assign_EquipmentVersion_namespaceRDF); + assign_map.emplace("cim:EquipmentVersion.namespaceUML", &assign_EquipmentVersion_namespaceUML); + assign_map.emplace("cim:EquipmentVersion.shortName", &assign_EquipmentVersion_shortName); } void EquipmentVersion::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/EquipmentVersion.hpp b/CGMES_2.4.13_18DEC2013/EquipmentVersion.hpp index 10e333e51..3de80068d 100644 --- a/CGMES_2.4.13_18DEC2013/EquipmentVersion.hpp +++ b/CGMES_2.4.13_18DEC2013/EquipmentVersion.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Version details. - */ + /** \brief Version details. */ class EquipmentVersion : public BaseClass { public: @@ -28,20 +26,47 @@ namespace CIMPP EquipmentVersion(); ~EquipmentVersion() override; - CIMPP::String baseUML; /* Base UML provided by CIM model manager. Default: '' */ - CIMPP::String baseURIcore; /* Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ - CIMPP::String baseURIoperation; /* Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ - CIMPP::String baseURIshortCircuit; /* Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ - CIMPP::Date date; /* Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ - CIMPP::String differenceModelURI; /* Difference model URI defined by IEC 61970-552. Default: '' */ - CIMPP::String entsoeUML; /* UML provided by ENTSO-E. Default: '' */ - CIMPP::String entsoeURIcore; /* Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/EquipmentCore/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ - CIMPP::String entsoeURIoperation; /* Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/EquipmentOperation/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ - CIMPP::String entsoeURIshortCircuit; /* Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/EquipmentShortCircuit/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ - CIMPP::String modelDescriptionURI; /* Model Description URI defined by IEC 61970-552. Default: '' */ - CIMPP::String namespaceRDF; /* RDF namespace. Default: '' */ - CIMPP::String namespaceUML; /* CIM UML namespace. Default: '' */ - CIMPP::String shortName; /* The short name of the profile used in profile documentation. Default: '' */ + /** \brief Base UML provided by CIM model manager. Default: '' */ + CIMPP::String baseUML; + + /** \brief Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ + CIMPP::String baseURIcore; + + /** \brief Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ + CIMPP::String baseURIoperation; + + /** \brief Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ + CIMPP::String baseURIshortCircuit; + + /** \brief Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ + CIMPP::Date date; + + /** \brief Difference model URI defined by IEC 61970-552. Default: '' */ + CIMPP::String differenceModelURI; + + /** \brief UML provided by ENTSO-E. Default: '' */ + CIMPP::String entsoeUML; + + /** \brief Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/EquipmentCore/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ + CIMPP::String entsoeURIcore; + + /** \brief Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/EquipmentOperation/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ + CIMPP::String entsoeURIoperation; + + /** \brief Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/EquipmentShortCircuit/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ + CIMPP::String entsoeURIshortCircuit; + + /** \brief Model Description URI defined by IEC 61970-552. Default: '' */ + CIMPP::String modelDescriptionURI; + + /** \brief RDF namespace. Default: '' */ + CIMPP::String namespaceRDF; + + /** \brief CIM UML namespace. Default: '' */ + CIMPP::String namespaceUML; + + /** \brief The short name of the profile used in profile documentation. Default: '' */ + CIMPP::String shortName; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/EquivalentBranch.cpp b/CGMES_2.4.13_18DEC2013/EquivalentBranch.cpp index d45842e8d..466b35022 100644 --- a/CGMES_2.4.13_18DEC2013/EquivalentBranch.cpp +++ b/CGMES_2.4.13_18DEC2013/EquivalentBranch.cpp @@ -8,27 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -EquivalentBranch::EquivalentBranch() {}; -EquivalentBranch::~EquivalentBranch() {}; +EquivalentBranch::EquivalentBranch() {} +EquivalentBranch::~EquivalentBranch() {} static const std::list PossibleProfilesForClass = { @@ -70,220 +54,234 @@ EquivalentBranch::getPossibleProfilesForAttributes() const return map; } - -bool assign_EquivalentBranch_negativeR12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_negativeR12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->negativeR12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_negativeR21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_negativeR21(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->negativeR21; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_negativeX12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_negativeX12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->negativeX12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_negativeX21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_negativeX21(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->negativeX21; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_positiveR12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_positiveR12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->positiveR12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_positiveR21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_positiveR21(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->positiveR21; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_positiveX12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_positiveX12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->positiveX12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_positiveX21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_positiveX21(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->positiveX21; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_r21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_r21(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r21; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_x(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_x21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_x21(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x21; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_zeroR12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_zeroR12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->zeroR12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_zeroR21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_zeroR21(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->zeroR21; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_zeroX12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_zeroX12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->zeroX12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_zeroX21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_zeroX21(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->zeroX21; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_EquivalentBranch_negativeR12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->negativeR12; if (!buffer.str().empty()) @@ -297,7 +295,8 @@ bool get_EquivalentBranch_negativeR12(const BaseClass* BaseClass_ptr1, std::stri bool get_EquivalentBranch_negativeR21(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->negativeR21; if (!buffer.str().empty()) @@ -311,7 +310,8 @@ bool get_EquivalentBranch_negativeR21(const BaseClass* BaseClass_ptr1, std::stri bool get_EquivalentBranch_negativeX12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->negativeX12; if (!buffer.str().empty()) @@ -325,7 +325,8 @@ bool get_EquivalentBranch_negativeX12(const BaseClass* BaseClass_ptr1, std::stri bool get_EquivalentBranch_negativeX21(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->negativeX21; if (!buffer.str().empty()) @@ -339,7 +340,8 @@ bool get_EquivalentBranch_negativeX21(const BaseClass* BaseClass_ptr1, std::stri bool get_EquivalentBranch_positiveR12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->positiveR12; if (!buffer.str().empty()) @@ -353,7 +355,8 @@ bool get_EquivalentBranch_positiveR12(const BaseClass* BaseClass_ptr1, std::stri bool get_EquivalentBranch_positiveR21(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->positiveR21; if (!buffer.str().empty()) @@ -367,7 +370,8 @@ bool get_EquivalentBranch_positiveR21(const BaseClass* BaseClass_ptr1, std::stri bool get_EquivalentBranch_positiveX12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->positiveX12; if (!buffer.str().empty()) @@ -381,7 +385,8 @@ bool get_EquivalentBranch_positiveX12(const BaseClass* BaseClass_ptr1, std::stri bool get_EquivalentBranch_positiveX21(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->positiveX21; if (!buffer.str().empty()) @@ -395,7 +400,8 @@ bool get_EquivalentBranch_positiveX21(const BaseClass* BaseClass_ptr1, std::stri bool get_EquivalentBranch_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -409,7 +415,8 @@ bool get_EquivalentBranch_r(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_EquivalentBranch_r21(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r21; if (!buffer.str().empty()) @@ -423,7 +430,8 @@ bool get_EquivalentBranch_r21(const BaseClass* BaseClass_ptr1, std::stringstream bool get_EquivalentBranch_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x; if (!buffer.str().empty()) @@ -437,7 +445,8 @@ bool get_EquivalentBranch_x(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_EquivalentBranch_x21(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x21; if (!buffer.str().empty()) @@ -451,7 +460,8 @@ bool get_EquivalentBranch_x21(const BaseClass* BaseClass_ptr1, std::stringstream bool get_EquivalentBranch_zeroR12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->zeroR12; if (!buffer.str().empty()) @@ -465,7 +475,8 @@ bool get_EquivalentBranch_zeroR12(const BaseClass* BaseClass_ptr1, std::stringst bool get_EquivalentBranch_zeroR21(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->zeroR21; if (!buffer.str().empty()) @@ -479,7 +490,8 @@ bool get_EquivalentBranch_zeroR21(const BaseClass* BaseClass_ptr1, std::stringst bool get_EquivalentBranch_zeroX12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->zeroX12; if (!buffer.str().empty()) @@ -493,7 +505,8 @@ bool get_EquivalentBranch_zeroX12(const BaseClass* BaseClass_ptr1, std::stringst bool get_EquivalentBranch_zeroX21(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->zeroX21; if (!buffer.str().empty()) @@ -505,8 +518,6 @@ bool get_EquivalentBranch_zeroX21(const BaseClass* BaseClass_ptr1, std::stringst return false; } - - const char EquivalentBranch::debugName[] = "EquivalentBranch"; const char* EquivalentBranch::debugString() const { @@ -515,27 +526,27 @@ const char* EquivalentBranch::debugString() const void EquivalentBranch::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EquivalentBranch"), &EquivalentBranch_factory)); + factory_map.emplace("cim:EquivalentBranch", &EquivalentBranch_factory); } void EquivalentBranch::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.negativeR12"), &assign_EquivalentBranch_negativeR12)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.negativeR21"), &assign_EquivalentBranch_negativeR21)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.negativeX12"), &assign_EquivalentBranch_negativeX12)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.negativeX21"), &assign_EquivalentBranch_negativeX21)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.positiveR12"), &assign_EquivalentBranch_positiveR12)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.positiveR21"), &assign_EquivalentBranch_positiveR21)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.positiveX12"), &assign_EquivalentBranch_positiveX12)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.positiveX21"), &assign_EquivalentBranch_positiveX21)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.r"), &assign_EquivalentBranch_r)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.r21"), &assign_EquivalentBranch_r21)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.x"), &assign_EquivalentBranch_x)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.x21"), &assign_EquivalentBranch_x21)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.zeroR12"), &assign_EquivalentBranch_zeroR12)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.zeroR21"), &assign_EquivalentBranch_zeroR21)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.zeroX12"), &assign_EquivalentBranch_zeroX12)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.zeroX21"), &assign_EquivalentBranch_zeroX21)); + assign_map.emplace("cim:EquivalentBranch.negativeR12", &assign_EquivalentBranch_negativeR12); + assign_map.emplace("cim:EquivalentBranch.negativeR21", &assign_EquivalentBranch_negativeR21); + assign_map.emplace("cim:EquivalentBranch.negativeX12", &assign_EquivalentBranch_negativeX12); + assign_map.emplace("cim:EquivalentBranch.negativeX21", &assign_EquivalentBranch_negativeX21); + assign_map.emplace("cim:EquivalentBranch.positiveR12", &assign_EquivalentBranch_positiveR12); + assign_map.emplace("cim:EquivalentBranch.positiveR21", &assign_EquivalentBranch_positiveR21); + assign_map.emplace("cim:EquivalentBranch.positiveX12", &assign_EquivalentBranch_positiveX12); + assign_map.emplace("cim:EquivalentBranch.positiveX21", &assign_EquivalentBranch_positiveX21); + assign_map.emplace("cim:EquivalentBranch.r", &assign_EquivalentBranch_r); + assign_map.emplace("cim:EquivalentBranch.r21", &assign_EquivalentBranch_r21); + assign_map.emplace("cim:EquivalentBranch.x", &assign_EquivalentBranch_x); + assign_map.emplace("cim:EquivalentBranch.x21", &assign_EquivalentBranch_x21); + assign_map.emplace("cim:EquivalentBranch.zeroR12", &assign_EquivalentBranch_zeroR12); + assign_map.emplace("cim:EquivalentBranch.zeroR21", &assign_EquivalentBranch_zeroR21); + assign_map.emplace("cim:EquivalentBranch.zeroX12", &assign_EquivalentBranch_zeroX12); + assign_map.emplace("cim:EquivalentBranch.zeroX21", &assign_EquivalentBranch_zeroX21); } void EquivalentBranch::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/EquivalentBranch.hpp b/CGMES_2.4.13_18DEC2013/EquivalentBranch.hpp index d9be97c39..5147c3fd5 100644 --- a/CGMES_2.4.13_18DEC2013/EquivalentBranch.hpp +++ b/CGMES_2.4.13_18DEC2013/EquivalentBranch.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents equivalent branches. - */ + /** \brief The class represents equivalent branches. */ class EquivalentBranch : public EquivalentEquipment { public: @@ -28,22 +26,53 @@ namespace CIMPP EquivalentBranch(); ~EquivalentBranch() override; - CIMPP::Resistance negativeR12; /* Negative sequence series resistance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909 EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ - CIMPP::Resistance negativeR21; /* Negative sequence series resistance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909 EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ - CIMPP::Reactance negativeX12; /* Negative sequence series reactance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ - CIMPP::Reactance negativeX21; /* Negative sequence series reactance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909. Usage: EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ - CIMPP::Resistance positiveR12; /* Positive sequence series resistance from terminal sequence 1 to terminal sequence 2 . Used for short circuit data exchange according to IEC 60909. EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Resistance positiveR21; /* Positive sequence series resistance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909 EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ - CIMPP::Reactance positiveX12; /* Positive sequence series reactance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ - CIMPP::Reactance positiveX21; /* Positive sequence series reactance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ - CIMPP::Resistance r; /* Positive sequence series resistance of the reduced branch. Default: nullptr */ - CIMPP::Resistance r21; /* Resistance from terminal sequence 2 to terminal sequence 1 .Used for steady state power flow. This attribute is optional and represent unbalanced network such as off-nominal phase shifter. If only EquivalentBranch.r is given, then EquivalentBranch.r21 is assumed equal to EquivalentBranch.r. Usage rule : EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Reactance x; /* Positive sequence series reactance of the reduced branch. Default: nullptr */ - CIMPP::Reactance x21; /* Reactance from terminal sequence 2 to terminal sequence 1 .Used for steady state power flow. This attribute is optional and represent unbalanced network such as off-nominal phase shifter. If only EquivalentBranch.x is given, then EquivalentBranch.x21 is assumed equal to EquivalentBranch.x. Usage rule : EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Resistance zeroR12; /* Zero sequence series resistance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909 EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ - CIMPP::Resistance zeroR21; /* Zero sequence series resistance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ - CIMPP::Reactance zeroX12; /* Zero sequence series reactance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ - CIMPP::Reactance zeroX21; /* Zero sequence series reactance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ + /** \brief Negative sequence series resistance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909 EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ + CIMPP::Resistance negativeR12; + + /** \brief Negative sequence series resistance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909 EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ + CIMPP::Resistance negativeR21; + + /** \brief Negative sequence series reactance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ + CIMPP::Reactance negativeX12; + + /** \brief Negative sequence series reactance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909. Usage: EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ + CIMPP::Reactance negativeX21; + + /** \brief Positive sequence series resistance from terminal sequence 1 to terminal sequence 2 . Used for short circuit data exchange according to IEC 60909. EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Resistance positiveR12; + + /** \brief Positive sequence series resistance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909 EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ + CIMPP::Resistance positiveR21; + + /** \brief Positive sequence series reactance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ + CIMPP::Reactance positiveX12; + + /** \brief Positive sequence series reactance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ + CIMPP::Reactance positiveX21; + + /** \brief Positive sequence series resistance of the reduced branch. Default: nullptr */ + CIMPP::Resistance r; + + /** \brief Resistance from terminal sequence 2 to terminal sequence 1 .Used for steady state power flow. This attribute is optional and represent unbalanced network such as off-nominal phase shifter. If only EquivalentBranch.r is given, then EquivalentBranch.r21 is assumed equal to EquivalentBranch.r. Usage rule : EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Resistance r21; + + /** \brief Positive sequence series reactance of the reduced branch. Default: nullptr */ + CIMPP::Reactance x; + + /** \brief Reactance from terminal sequence 2 to terminal sequence 1 .Used for steady state power flow. This attribute is optional and represent unbalanced network such as off-nominal phase shifter. If only EquivalentBranch.x is given, then EquivalentBranch.x21 is assumed equal to EquivalentBranch.x. Usage rule : EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Reactance x21; + + /** \brief Zero sequence series resistance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909 EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ + CIMPP::Resistance zeroR12; + + /** \brief Zero sequence series resistance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ + CIMPP::Resistance zeroR21; + + /** \brief Zero sequence series reactance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ + CIMPP::Reactance zeroX12; + + /** \brief Zero sequence series reactance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ + CIMPP::Reactance zeroX21; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/EquivalentEquipment.cpp b/CGMES_2.4.13_18DEC2013/EquivalentEquipment.cpp index 9d6f69531..a0b317564 100644 --- a/CGMES_2.4.13_18DEC2013/EquivalentEquipment.cpp +++ b/CGMES_2.4.13_18DEC2013/EquivalentEquipment.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -EquivalentEquipment::EquivalentEquipment() : EquivalentNetwork(nullptr) {}; -EquivalentEquipment::~EquivalentEquipment() {}; +EquivalentEquipment::EquivalentEquipment() : EquivalentNetwork(nullptr) {} +EquivalentEquipment::~EquivalentEquipment() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ EquivalentEquipment::getPossibleProfilesForAttributes() const return map; } - - bool assign_EquivalentNetwork_EquivalentEquipments(BaseClass*, BaseClass*); bool assign_EquivalentEquipment_EquivalentNetwork(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,10 +58,10 @@ bool assign_EquivalentEquipment_EquivalentNetwork(BaseClass* BaseClass_ptr1, Bas return false; } - bool get_EquivalentEquipment_EquivalentNetwork(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const EquivalentEquipment* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentEquipment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->EquivalentNetwork != 0) { @@ -74,7 +72,6 @@ bool get_EquivalentEquipment_EquivalentNetwork(const BaseClass* BaseClass_ptr1, return false; } - const char EquivalentEquipment::debugName[] = "EquivalentEquipment"; const char* EquivalentEquipment::debugString() const { @@ -83,7 +80,7 @@ const char* EquivalentEquipment::debugString() const void EquivalentEquipment::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EquivalentEquipment"), &EquivalentEquipment_factory)); + factory_map.emplace("cim:EquivalentEquipment", &EquivalentEquipment_factory); } void EquivalentEquipment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -92,7 +89,7 @@ void EquivalentEquipment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EquivalentEquipment.EquivalentNetwork"), &assign_EquivalentEquipment_EquivalentNetwork)); + assign_map.emplace("cim:EquivalentEquipment.EquivalentNetwork", &assign_EquivalentEquipment_EquivalentNetwork); } void EquivalentEquipment::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/EquivalentEquipment.hpp b/CGMES_2.4.13_18DEC2013/EquivalentEquipment.hpp index 7d0b8a0f3..3e375293f 100644 --- a/CGMES_2.4.13_18DEC2013/EquivalentEquipment.hpp +++ b/CGMES_2.4.13_18DEC2013/EquivalentEquipment.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class EquivalentNetwork; - /* - The class represents equivalent objects that are the result of a network reduction. The class is the base for equivalent objects of different types. - */ + /** \brief The class represents equivalent objects that are the result of a network reduction. The class is the base for equivalent objects of different types. */ class EquivalentEquipment : public ConductingEquipment { public: @@ -27,7 +25,8 @@ namespace CIMPP EquivalentEquipment(); ~EquivalentEquipment() override; - CIMPP::EquivalentNetwork* EquivalentNetwork; /* The associated reduced equivalents. Default: 0 */ + /** \brief The associated reduced equivalents. Default: 0 */ + CIMPP::EquivalentNetwork* EquivalentNetwork; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/EquivalentInjection.cpp b/CGMES_2.4.13_18DEC2013/EquivalentInjection.cpp index 3cd0ceefc..5b0b543b1 100644 --- a/CGMES_2.4.13_18DEC2013/EquivalentInjection.cpp +++ b/CGMES_2.4.13_18DEC2013/EquivalentInjection.cpp @@ -9,26 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ReactiveCapabilityCurve.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Voltage.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -EquivalentInjection::EquivalentInjection() : ReactiveCapabilityCurve(nullptr) {}; -EquivalentInjection::~EquivalentInjection() {}; +EquivalentInjection::EquivalentInjection() : ReactiveCapabilityCurve(nullptr) {} +EquivalentInjection::~EquivalentInjection() {} static const std::list PossibleProfilesForClass = { @@ -71,223 +56,251 @@ EquivalentInjection::getPossibleProfilesForAttributes() const return map; } +bool assign_ReactiveCapabilityCurve_EquivalentInjection(BaseClass*, BaseClass*); +bool assign_EquivalentInjection_ReactiveCapabilityCurve(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + ReactiveCapabilityCurve* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ReactiveCapabilityCurve != element2) + { + element->ReactiveCapabilityCurve = element2; + return assign_ReactiveCapabilityCurve_EquivalentInjection(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_EquivalentInjection_maxP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_maxP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_maxQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_maxQ(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxQ; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_minP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_minP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_minQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_minQ(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minQ; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_p(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_r0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_r2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_r2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_regulationCapability(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_regulationCapability(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->regulationCapability; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_regulationStatus(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_regulationStatus(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->regulationStatus; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_regulationTarget(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_regulationTarget(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->regulationTarget; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_x(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_x0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_x2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_x2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_ReactiveCapabilityCurve_EquivalentInjection(BaseClass*, BaseClass*); -bool assign_EquivalentInjection_ReactiveCapabilityCurve(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_EquivalentInjection_ReactiveCapabilityCurve(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); - ReactiveCapabilityCurve* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->ReactiveCapabilityCurve != element2) + if (element->ReactiveCapabilityCurve != 0) { - element->ReactiveCapabilityCurve = element2; - return assign_ReactiveCapabilityCurve_EquivalentInjection(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->ReactiveCapabilityCurve); + return true; } - return true; } return false; } bool get_EquivalentInjection_maxP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxP; if (!buffer.str().empty()) @@ -301,7 +314,8 @@ bool get_EquivalentInjection_maxP(const BaseClass* BaseClass_ptr1, std::stringst bool get_EquivalentInjection_maxQ(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxQ; if (!buffer.str().empty()) @@ -315,7 +329,8 @@ bool get_EquivalentInjection_maxQ(const BaseClass* BaseClass_ptr1, std::stringst bool get_EquivalentInjection_minP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minP; if (!buffer.str().empty()) @@ -329,7 +344,8 @@ bool get_EquivalentInjection_minP(const BaseClass* BaseClass_ptr1, std::stringst bool get_EquivalentInjection_minQ(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minQ; if (!buffer.str().empty()) @@ -343,7 +359,8 @@ bool get_EquivalentInjection_minQ(const BaseClass* BaseClass_ptr1, std::stringst bool get_EquivalentInjection_p(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p; if (!buffer.str().empty()) @@ -357,7 +374,8 @@ bool get_EquivalentInjection_p(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_EquivalentInjection_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q; if (!buffer.str().empty()) @@ -371,7 +389,8 @@ bool get_EquivalentInjection_q(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_EquivalentInjection_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -385,7 +404,8 @@ bool get_EquivalentInjection_r(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_EquivalentInjection_r0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r0; if (!buffer.str().empty()) @@ -399,7 +419,8 @@ bool get_EquivalentInjection_r0(const BaseClass* BaseClass_ptr1, std::stringstre bool get_EquivalentInjection_r2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r2; if (!buffer.str().empty()) @@ -413,7 +434,8 @@ bool get_EquivalentInjection_r2(const BaseClass* BaseClass_ptr1, std::stringstre bool get_EquivalentInjection_regulationCapability(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->regulationCapability; if (!buffer.str().empty()) @@ -427,7 +449,8 @@ bool get_EquivalentInjection_regulationCapability(const BaseClass* BaseClass_ptr bool get_EquivalentInjection_regulationStatus(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->regulationStatus; if (!buffer.str().empty()) @@ -441,7 +464,8 @@ bool get_EquivalentInjection_regulationStatus(const BaseClass* BaseClass_ptr1, s bool get_EquivalentInjection_regulationTarget(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->regulationTarget; if (!buffer.str().empty()) @@ -455,7 +479,8 @@ bool get_EquivalentInjection_regulationTarget(const BaseClass* BaseClass_ptr1, s bool get_EquivalentInjection_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x; if (!buffer.str().empty()) @@ -469,7 +494,8 @@ bool get_EquivalentInjection_x(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_EquivalentInjection_x0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x0; if (!buffer.str().empty()) @@ -483,7 +509,8 @@ bool get_EquivalentInjection_x0(const BaseClass* BaseClass_ptr1, std::stringstre bool get_EquivalentInjection_x2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x2; if (!buffer.str().empty()) @@ -495,21 +522,6 @@ bool get_EquivalentInjection_x2(const BaseClass* BaseClass_ptr1, std::stringstre return false; } - -bool get_EquivalentInjection_ReactiveCapabilityCurve(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->ReactiveCapabilityCurve != 0) - { - BaseClass_list.push_back(element->ReactiveCapabilityCurve); - return true; - } - } - return false; -} - - const char EquivalentInjection::debugName[] = "EquivalentInjection"; const char* EquivalentInjection::debugString() const { @@ -518,31 +530,31 @@ const char* EquivalentInjection::debugString() const void EquivalentInjection::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EquivalentInjection"), &EquivalentInjection_factory)); + factory_map.emplace("cim:EquivalentInjection", &EquivalentInjection_factory); } void EquivalentInjection::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.maxP"), &assign_EquivalentInjection_maxP)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.maxQ"), &assign_EquivalentInjection_maxQ)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.minP"), &assign_EquivalentInjection_minP)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.minQ"), &assign_EquivalentInjection_minQ)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.p"), &assign_EquivalentInjection_p)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.q"), &assign_EquivalentInjection_q)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.r"), &assign_EquivalentInjection_r)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.r0"), &assign_EquivalentInjection_r0)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.r2"), &assign_EquivalentInjection_r2)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.regulationCapability"), &assign_EquivalentInjection_regulationCapability)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.regulationStatus"), &assign_EquivalentInjection_regulationStatus)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.regulationTarget"), &assign_EquivalentInjection_regulationTarget)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.x"), &assign_EquivalentInjection_x)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.x0"), &assign_EquivalentInjection_x0)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.x2"), &assign_EquivalentInjection_x2)); + assign_map.emplace("cim:EquivalentInjection.maxP", &assign_EquivalentInjection_maxP); + assign_map.emplace("cim:EquivalentInjection.maxQ", &assign_EquivalentInjection_maxQ); + assign_map.emplace("cim:EquivalentInjection.minP", &assign_EquivalentInjection_minP); + assign_map.emplace("cim:EquivalentInjection.minQ", &assign_EquivalentInjection_minQ); + assign_map.emplace("cim:EquivalentInjection.p", &assign_EquivalentInjection_p); + assign_map.emplace("cim:EquivalentInjection.q", &assign_EquivalentInjection_q); + assign_map.emplace("cim:EquivalentInjection.r", &assign_EquivalentInjection_r); + assign_map.emplace("cim:EquivalentInjection.r0", &assign_EquivalentInjection_r0); + assign_map.emplace("cim:EquivalentInjection.r2", &assign_EquivalentInjection_r2); + assign_map.emplace("cim:EquivalentInjection.regulationCapability", &assign_EquivalentInjection_regulationCapability); + assign_map.emplace("cim:EquivalentInjection.regulationStatus", &assign_EquivalentInjection_regulationStatus); + assign_map.emplace("cim:EquivalentInjection.regulationTarget", &assign_EquivalentInjection_regulationTarget); + assign_map.emplace("cim:EquivalentInjection.x", &assign_EquivalentInjection_x); + assign_map.emplace("cim:EquivalentInjection.x0", &assign_EquivalentInjection_x0); + assign_map.emplace("cim:EquivalentInjection.x2", &assign_EquivalentInjection_x2); } void EquivalentInjection::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.ReactiveCapabilityCurve"), &assign_EquivalentInjection_ReactiveCapabilityCurve)); + assign_map.emplace("cim:EquivalentInjection.ReactiveCapabilityCurve", &assign_EquivalentInjection_ReactiveCapabilityCurve); } void EquivalentInjection::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/EquivalentInjection.hpp b/CGMES_2.4.13_18DEC2013/EquivalentInjection.hpp index 3b073046f..52d59c58c 100644 --- a/CGMES_2.4.13_18DEC2013/EquivalentInjection.hpp +++ b/CGMES_2.4.13_18DEC2013/EquivalentInjection.hpp @@ -23,9 +23,7 @@ namespace CIMPP { class ReactiveCapabilityCurve; - /* - This class represents equivalent injections (generation or load). Voltage regulation is allowed only at the point of connection. - */ + /** \brief This class represents equivalent injections (generation or load). Voltage regulation is allowed only at the point of connection. */ class EquivalentInjection : public EquivalentEquipment { public: @@ -33,22 +31,53 @@ namespace CIMPP EquivalentInjection(); ~EquivalentInjection() override; - CIMPP::ReactiveCapabilityCurve* ReactiveCapabilityCurve; /* The equivalent injection using this reactive capability curve. Default: 0 */ - CIMPP::ActivePower maxP; /* Maximum active power of the injection. Default: nullptr */ - CIMPP::ReactivePower maxQ; /* Used for modeling of infeed for load flow exchange. Not used for short circuit modeling. If maxQ and minQ are not used ReactiveCapabilityCurve can be used. Default: nullptr */ - CIMPP::ActivePower minP; /* Minimum active power of the injection. Default: nullptr */ - CIMPP::ReactivePower minQ; /* Used for modeling of infeed for load flow exchange. Not used for short circuit modeling. If maxQ and minQ are not used ReactiveCapabilityCurve can be used. Default: nullptr */ - CIMPP::ActivePower p; /* Equivalent active power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ - CIMPP::ReactivePower q; /* Equivalent reactive power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ - CIMPP::Resistance r; /* Positive sequence resistance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Resistance r0; /* Zero sequence resistance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Resistance r2; /* Negative sequence resistance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Boolean regulationCapability; /* Specifies whether or not the EquivalentInjection has the capability to regulate the local voltage. Default: false */ - CIMPP::Boolean regulationStatus; /* Specifies the default regulation status of the EquivalentInjection. True is regulating. False is not regulating. Default: false */ - CIMPP::Voltage regulationTarget; /* The target voltage for voltage regulation. Default: nullptr */ - CIMPP::Reactance x; /* Positive sequence reactance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Reactance x0; /* Zero sequence reactance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Reactance x2; /* Negative sequence reactance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ + /** \brief The equivalent injection using this reactive capability curve. Default: 0 */ + CIMPP::ReactiveCapabilityCurve* ReactiveCapabilityCurve; + + /** \brief Maximum active power of the injection. Default: nullptr */ + CIMPP::ActivePower maxP; + + /** \brief Used for modeling of infeed for load flow exchange. Not used for short circuit modeling. If maxQ and minQ are not used ReactiveCapabilityCurve can be used. Default: nullptr */ + CIMPP::ReactivePower maxQ; + + /** \brief Minimum active power of the injection. Default: nullptr */ + CIMPP::ActivePower minP; + + /** \brief Used for modeling of infeed for load flow exchange. Not used for short circuit modeling. If maxQ and minQ are not used ReactiveCapabilityCurve can be used. Default: nullptr */ + CIMPP::ReactivePower minQ; + + /** \brief Equivalent active power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ + CIMPP::ActivePower p; + + /** \brief Equivalent reactive power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ + CIMPP::ReactivePower q; + + /** \brief Positive sequence resistance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Resistance r; + + /** \brief Zero sequence resistance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Resistance r0; + + /** \brief Negative sequence resistance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Resistance r2; + + /** \brief Specifies whether or not the EquivalentInjection has the capability to regulate the local voltage. Default: false */ + CIMPP::Boolean regulationCapability; + + /** \brief Specifies the default regulation status of the EquivalentInjection. True is regulating. False is not regulating. Default: false */ + CIMPP::Boolean regulationStatus; + + /** \brief The target voltage for voltage regulation. Default: nullptr */ + CIMPP::Voltage regulationTarget; + + /** \brief Positive sequence reactance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Reactance x; + + /** \brief Zero sequence reactance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Reactance x0; + + /** \brief Negative sequence reactance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Reactance x2; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/EquivalentNetwork.cpp b/CGMES_2.4.13_18DEC2013/EquivalentNetwork.cpp index f08fd6d02..81b5286cd 100644 --- a/CGMES_2.4.13_18DEC2013/EquivalentNetwork.cpp +++ b/CGMES_2.4.13_18DEC2013/EquivalentNetwork.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -EquivalentNetwork::EquivalentNetwork() {}; -EquivalentNetwork::~EquivalentNetwork() {}; +EquivalentNetwork::EquivalentNetwork() {} +EquivalentNetwork::~EquivalentNetwork() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ EquivalentNetwork::getPossibleProfilesForAttributes() const return map; } - - bool assign_EquivalentEquipment_EquivalentNetwork(BaseClass*, BaseClass*); bool assign_EquivalentNetwork_EquivalentEquipments(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_EquivalentNetwork_EquivalentEquipments(BaseClass* BaseClass_ptr1, Ba } - const char EquivalentNetwork::debugName[] = "EquivalentNetwork"; const char* EquivalentNetwork::debugString() const { @@ -69,7 +66,7 @@ const char* EquivalentNetwork::debugString() const void EquivalentNetwork::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EquivalentNetwork"), &EquivalentNetwork_factory)); + factory_map.emplace("cim:EquivalentNetwork", &EquivalentNetwork_factory); } void EquivalentNetwork::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void EquivalentNetwork::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EquivalentNetwork.EquivalentEquipments"), &assign_EquivalentNetwork_EquivalentEquipments)); + assign_map.emplace("cim:EquivalentNetwork.EquivalentEquipments", &assign_EquivalentNetwork_EquivalentEquipments); } void EquivalentNetwork::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/EquivalentNetwork.hpp b/CGMES_2.4.13_18DEC2013/EquivalentNetwork.hpp index 369a69cd0..280054dc0 100644 --- a/CGMES_2.4.13_18DEC2013/EquivalentNetwork.hpp +++ b/CGMES_2.4.13_18DEC2013/EquivalentNetwork.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class EquivalentEquipment; - /* - A class that represents an external meshed network that has been reduced to an electrically equivalent model. The ConnectivityNodes contained in the equivalent are intended to reflect internal nodes of the equivalent. The boundary Connectivity nodes where the equivalent connects outside itself are NOT contained by the equivalent. - */ + /** \brief A class that represents an external meshed network that has been reduced to an electrically equivalent model. The ConnectivityNodes contained in the equivalent are intended to reflect internal nodes of the equivalent. The boundary Connectivity nodes where the equivalent connects outside itself are NOT contained by the equivalent. */ class EquivalentNetwork : public ConnectivityNodeContainer { public: @@ -27,7 +25,8 @@ namespace CIMPP EquivalentNetwork(); ~EquivalentNetwork() override; - std::list EquivalentEquipments; /* The equivalent where the reduced model belongs. Default: 0 */ + /** \brief The equivalent where the reduced model belongs. Default: 0 */ + std::list EquivalentEquipments; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/EquivalentShunt.cpp b/CGMES_2.4.13_18DEC2013/EquivalentShunt.cpp index 62dafdf33..3bee41ffb 100644 --- a/CGMES_2.4.13_18DEC2013/EquivalentShunt.cpp +++ b/CGMES_2.4.13_18DEC2013/EquivalentShunt.cpp @@ -8,13 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Susceptance.hpp" -#include "Conductance.hpp" using namespace CIMPP; -EquivalentShunt::EquivalentShunt() {}; -EquivalentShunt::~EquivalentShunt() {}; +EquivalentShunt::EquivalentShunt() {} +EquivalentShunt::~EquivalentShunt() {} static const std::list PossibleProfilesForClass = { @@ -42,38 +40,38 @@ EquivalentShunt::getPossibleProfilesForAttributes() const return map; } - -bool assign_EquivalentShunt_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentShunt_b(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentShunt* element = dynamic_cast(BaseClass_ptr1)) + EquivalentShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentShunt_g(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentShunt_g(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentShunt* element = dynamic_cast(BaseClass_ptr1)) + EquivalentShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_EquivalentShunt_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentShunt* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b; if (!buffer.str().empty()) @@ -87,7 +85,8 @@ bool get_EquivalentShunt_b(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_EquivalentShunt_g(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentShunt* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g; if (!buffer.str().empty()) @@ -99,8 +98,6 @@ bool get_EquivalentShunt_g(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char EquivalentShunt::debugName[] = "EquivalentShunt"; const char* EquivalentShunt::debugString() const { @@ -109,13 +106,13 @@ const char* EquivalentShunt::debugString() const void EquivalentShunt::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EquivalentShunt"), &EquivalentShunt_factory)); + factory_map.emplace("cim:EquivalentShunt", &EquivalentShunt_factory); } void EquivalentShunt::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EquivalentShunt.b"), &assign_EquivalentShunt_b)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentShunt.g"), &assign_EquivalentShunt_g)); + assign_map.emplace("cim:EquivalentShunt.b", &assign_EquivalentShunt_b); + assign_map.emplace("cim:EquivalentShunt.g", &assign_EquivalentShunt_g); } void EquivalentShunt::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/EquivalentShunt.hpp b/CGMES_2.4.13_18DEC2013/EquivalentShunt.hpp index 4a5204e86..4cd995dcf 100644 --- a/CGMES_2.4.13_18DEC2013/EquivalentShunt.hpp +++ b/CGMES_2.4.13_18DEC2013/EquivalentShunt.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents equivalent shunts. - */ + /** \brief The class represents equivalent shunts. */ class EquivalentShunt : public EquivalentEquipment { public: @@ -28,8 +26,11 @@ namespace CIMPP EquivalentShunt(); ~EquivalentShunt() override; - CIMPP::Susceptance b; /* Positive sequence shunt susceptance. Default: nullptr */ - CIMPP::Conductance g; /* Positive sequence shunt conductance. Default: nullptr */ + /** \brief Positive sequence shunt susceptance. Default: nullptr */ + CIMPP::Susceptance b; + + /** \brief Positive sequence shunt conductance. Default: nullptr */ + CIMPP::Conductance g; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcAC1A.cpp b/CGMES_2.4.13_18DEC2013/ExcAC1A.cpp index 60fb20902..d5bbdc7a5 100644 --- a/CGMES_2.4.13_18DEC2013/ExcAC1A.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcAC1A.cpp @@ -8,33 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAC1A::ExcAC1A() {}; -ExcAC1A::~ExcAC1A() {}; +ExcAC1A::ExcAC1A() {} +ExcAC1A::~ExcAC1A() {} static const std::list PossibleProfilesForClass = { @@ -82,298 +60,318 @@ ExcAC1A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAC1A_hvlvgates(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_hvlvgates(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->hvlvgates; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_kf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_kf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_kf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_kf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAC1A_hvlvgates(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hvlvgates; if (!buffer.str().empty()) @@ -387,7 +385,8 @@ bool get_ExcAC1A_hvlvgates(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcAC1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -401,7 +400,8 @@ bool get_ExcAC1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -415,7 +415,8 @@ bool get_ExcAC1A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -429,7 +430,8 @@ bool get_ExcAC1A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -443,7 +445,8 @@ bool get_ExcAC1A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -457,7 +460,8 @@ bool get_ExcAC1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_kf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf1; if (!buffer.str().empty()) @@ -471,7 +475,8 @@ bool get_ExcAC1A_kf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf2; if (!buffer.str().empty()) @@ -485,7 +490,8 @@ bool get_ExcAC1A_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -499,7 +505,8 @@ bool get_ExcAC1A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -513,7 +520,8 @@ bool get_ExcAC1A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC1A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -527,7 +535,8 @@ bool get_ExcAC1A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -541,7 +550,8 @@ bool get_ExcAC1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -555,7 +565,8 @@ bool get_ExcAC1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -569,7 +580,8 @@ bool get_ExcAC1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -583,7 +595,8 @@ bool get_ExcAC1A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -597,7 +610,8 @@ bool get_ExcAC1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -611,7 +625,8 @@ bool get_ExcAC1A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC1A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -625,7 +640,8 @@ bool get_ExcAC1A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC1A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -639,7 +655,8 @@ bool get_ExcAC1A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -653,7 +670,8 @@ bool get_ExcAC1A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -667,7 +685,8 @@ bool get_ExcAC1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -679,8 +698,6 @@ bool get_ExcAC1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcAC1A::debugName[] = "ExcAC1A"; const char* ExcAC1A::debugString() const { @@ -689,33 +706,33 @@ const char* ExcAC1A::debugString() const void ExcAC1A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAC1A"), &ExcAC1A_factory)); + factory_map.emplace("cim:ExcAC1A", &ExcAC1A_factory); } void ExcAC1A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.hvlvgates"), &assign_ExcAC1A_hvlvgates)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.ka"), &assign_ExcAC1A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.kc"), &assign_ExcAC1A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.kd"), &assign_ExcAC1A_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.ke"), &assign_ExcAC1A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.kf"), &assign_ExcAC1A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.kf1"), &assign_ExcAC1A_kf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.kf2"), &assign_ExcAC1A_kf2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.ks"), &assign_ExcAC1A_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.seve1"), &assign_ExcAC1A_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.seve2"), &assign_ExcAC1A_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.ta"), &assign_ExcAC1A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.tb"), &assign_ExcAC1A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.tc"), &assign_ExcAC1A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.te"), &assign_ExcAC1A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.tf"), &assign_ExcAC1A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.vamax"), &assign_ExcAC1A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.vamin"), &assign_ExcAC1A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.ve1"), &assign_ExcAC1A_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.ve2"), &assign_ExcAC1A_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.vrmax"), &assign_ExcAC1A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.vrmin"), &assign_ExcAC1A_vrmin)); + assign_map.emplace("cim:ExcAC1A.hvlvgates", &assign_ExcAC1A_hvlvgates); + assign_map.emplace("cim:ExcAC1A.ka", &assign_ExcAC1A_ka); + assign_map.emplace("cim:ExcAC1A.kc", &assign_ExcAC1A_kc); + assign_map.emplace("cim:ExcAC1A.kd", &assign_ExcAC1A_kd); + assign_map.emplace("cim:ExcAC1A.ke", &assign_ExcAC1A_ke); + assign_map.emplace("cim:ExcAC1A.kf", &assign_ExcAC1A_kf); + assign_map.emplace("cim:ExcAC1A.kf1", &assign_ExcAC1A_kf1); + assign_map.emplace("cim:ExcAC1A.kf2", &assign_ExcAC1A_kf2); + assign_map.emplace("cim:ExcAC1A.ks", &assign_ExcAC1A_ks); + assign_map.emplace("cim:ExcAC1A.seve1", &assign_ExcAC1A_seve1); + assign_map.emplace("cim:ExcAC1A.seve2", &assign_ExcAC1A_seve2); + assign_map.emplace("cim:ExcAC1A.ta", &assign_ExcAC1A_ta); + assign_map.emplace("cim:ExcAC1A.tb", &assign_ExcAC1A_tb); + assign_map.emplace("cim:ExcAC1A.tc", &assign_ExcAC1A_tc); + assign_map.emplace("cim:ExcAC1A.te", &assign_ExcAC1A_te); + assign_map.emplace("cim:ExcAC1A.tf", &assign_ExcAC1A_tf); + assign_map.emplace("cim:ExcAC1A.vamax", &assign_ExcAC1A_vamax); + assign_map.emplace("cim:ExcAC1A.vamin", &assign_ExcAC1A_vamin); + assign_map.emplace("cim:ExcAC1A.ve1", &assign_ExcAC1A_ve1); + assign_map.emplace("cim:ExcAC1A.ve2", &assign_ExcAC1A_ve2); + assign_map.emplace("cim:ExcAC1A.vrmax", &assign_ExcAC1A_vrmax); + assign_map.emplace("cim:ExcAC1A.vrmin", &assign_ExcAC1A_vrmin); } void ExcAC1A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcAC1A.hpp b/CGMES_2.4.13_18DEC2013/ExcAC1A.hpp index bdaece7c8..3a0fca2c2 100644 --- a/CGMES_2.4.13_18DEC2013/ExcAC1A.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcAC1A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE AC1A alternator-supplied rectifier excitation system with different rate feedback source. - */ + /** \brief Modified IEEE AC1A alternator-supplied rectifier excitation system with different rate feedback source. */ class ExcAC1A : public ExcitationSystemDynamics { public: @@ -30,28 +28,71 @@ namespace CIMPP ExcAC1A(); ~ExcAC1A() override; - CIMPP::Boolean hvlvgates; /* Indicates if both HV gate and LV gate are active (HVLVgates). true = gates are used false = gates are not used. Typical Value = true. Default: false */ - CIMPP::PU ka; /* Voltage regulator gain (Ka). Typical Value = 400. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (Kd). Typical Value = 0.38. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (Kf). Typical Value = 0.03. Default: nullptr */ - CIMPP::PU kf1; /* Coefficient to allow different usage of the model (Kf1). Typical Value = 0. Default: nullptr */ - CIMPP::PU kf2; /* Coefficient to allow different usage of the model (Kf2). Typical Value = 1. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, Ve1, back of commutating reactance (Se[Ve1]). Typical Value = 0.1. Default: nullptr */ - CIMPP::Simple_Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, Ve2, back of commutating reactance (Se[Ve2]). Typical Value = 0.03. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (Ta). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 0.8. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (Tf). Typical Value = 1. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (V). Typical Value = 14.5. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (V). Typical Value = -14.5. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve1). Typical Value = 4.18. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve2). Typical Value = 3.14. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator outputs (Vrmax). Typical Value = 6.03. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator outputs (Rrmin). Typical Value = -5.43. Default: nullptr */ + /** \brief Indicates if both HV gate and LV gate are active (HVLVgates). true = gates are used false = gates are not used. Typical Value = true. Default: false */ + CIMPP::Boolean hvlvgates; + + /** \brief Voltage regulator gain (Ka). Typical Value = 400. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (Kd). Typical Value = 0.38. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (Kf). Typical Value = 0.03. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Coefficient to allow different usage of the model (Kf1). Typical Value = 0. Default: nullptr */ + CIMPP::PU kf1; + + /** \brief Coefficient to allow different usage of the model (Kf2). Typical Value = 1. Default: nullptr */ + CIMPP::PU kf2; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Ve1, back of commutating reactance (Se[Ve1]). Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Ve2, back of commutating reactance (Se[Ve2]). Typical Value = 0.03. Default: nullptr */ + CIMPP::Simple_Float seve2; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 0.8. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (Tf). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage regulator output (V). Typical Value = 14.5. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -14.5. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve1). Typical Value = 4.18. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve2). Typical Value = 3.14. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Maximum voltage regulator outputs (Vrmax). Typical Value = 6.03. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator outputs (Rrmin). Typical Value = -5.43. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcAC2A.cpp b/CGMES_2.4.13_18DEC2013/ExcAC2A.cpp index 6b654a284..733be71b2 100644 --- a/CGMES_2.4.13_18DEC2013/ExcAC2A.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcAC2A.cpp @@ -8,39 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAC2A::ExcAC2A() {}; -ExcAC2A::~ExcAC2A() {}; +ExcAC2A::ExcAC2A() {} +ExcAC2A::~ExcAC2A() {} static const std::list PossibleProfilesForClass = { @@ -94,376 +66,402 @@ ExcAC2A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAC2A_hvgate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_hvgate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->hvgate; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_kb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_kb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_kb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_kb1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kb1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_kh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_kl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_kl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_kl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_kl1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_lvgate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_lvgate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lvgate; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_vfemax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfemax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_vlr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_vlr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vlr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAC2A_hvgate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hvgate; if (!buffer.str().empty()) @@ -477,7 +475,8 @@ bool get_ExcAC2A_hvgate(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcAC2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -491,7 +490,8 @@ bool get_ExcAC2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_kb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kb; if (!buffer.str().empty()) @@ -505,7 +505,8 @@ bool get_ExcAC2A_kb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_kb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kb1; if (!buffer.str().empty()) @@ -519,7 +520,8 @@ bool get_ExcAC2A_kb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -533,7 +535,8 @@ bool get_ExcAC2A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -547,7 +550,8 @@ bool get_ExcAC2A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -561,7 +565,8 @@ bool get_ExcAC2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -575,7 +580,8 @@ bool get_ExcAC2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh; if (!buffer.str().empty()) @@ -589,7 +595,8 @@ bool get_ExcAC2A_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl; if (!buffer.str().empty()) @@ -603,7 +610,8 @@ bool get_ExcAC2A_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_kl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl1; if (!buffer.str().empty()) @@ -617,7 +625,8 @@ bool get_ExcAC2A_kl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -631,7 +640,8 @@ bool get_ExcAC2A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_lvgate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lvgate; if (!buffer.str().empty()) @@ -645,7 +655,8 @@ bool get_ExcAC2A_lvgate(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcAC2A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -659,7 +670,8 @@ bool get_ExcAC2A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC2A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -673,7 +685,8 @@ bool get_ExcAC2A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -687,7 +700,8 @@ bool get_ExcAC2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -701,7 +715,8 @@ bool get_ExcAC2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -715,7 +730,8 @@ bool get_ExcAC2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -729,7 +745,8 @@ bool get_ExcAC2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -743,7 +760,8 @@ bool get_ExcAC2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -757,7 +775,8 @@ bool get_ExcAC2A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC2A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -771,7 +790,8 @@ bool get_ExcAC2A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC2A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -785,7 +805,8 @@ bool get_ExcAC2A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -799,7 +820,8 @@ bool get_ExcAC2A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfemax; if (!buffer.str().empty()) @@ -813,7 +835,8 @@ bool get_ExcAC2A_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcAC2A_vlr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vlr; if (!buffer.str().empty()) @@ -827,7 +850,8 @@ bool get_ExcAC2A_vlr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -841,7 +865,8 @@ bool get_ExcAC2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -853,8 +878,6 @@ bool get_ExcAC2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcAC2A::debugName[] = "ExcAC2A"; const char* ExcAC2A::debugString() const { @@ -863,39 +886,39 @@ const char* ExcAC2A::debugString() const void ExcAC2A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAC2A"), &ExcAC2A_factory)); + factory_map.emplace("cim:ExcAC2A", &ExcAC2A_factory); } void ExcAC2A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.hvgate"), &assign_ExcAC2A_hvgate)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.ka"), &assign_ExcAC2A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.kb"), &assign_ExcAC2A_kb)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.kb1"), &assign_ExcAC2A_kb1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.kc"), &assign_ExcAC2A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.kd"), &assign_ExcAC2A_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.ke"), &assign_ExcAC2A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.kf"), &assign_ExcAC2A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.kh"), &assign_ExcAC2A_kh)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.kl"), &assign_ExcAC2A_kl)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.kl1"), &assign_ExcAC2A_kl1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.ks"), &assign_ExcAC2A_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.lvgate"), &assign_ExcAC2A_lvgate)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.seve1"), &assign_ExcAC2A_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.seve2"), &assign_ExcAC2A_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.ta"), &assign_ExcAC2A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.tb"), &assign_ExcAC2A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.tc"), &assign_ExcAC2A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.te"), &assign_ExcAC2A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.tf"), &assign_ExcAC2A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.vamax"), &assign_ExcAC2A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.vamin"), &assign_ExcAC2A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.ve1"), &assign_ExcAC2A_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.ve2"), &assign_ExcAC2A_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.vfemax"), &assign_ExcAC2A_vfemax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.vlr"), &assign_ExcAC2A_vlr)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.vrmax"), &assign_ExcAC2A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.vrmin"), &assign_ExcAC2A_vrmin)); + assign_map.emplace("cim:ExcAC2A.hvgate", &assign_ExcAC2A_hvgate); + assign_map.emplace("cim:ExcAC2A.ka", &assign_ExcAC2A_ka); + assign_map.emplace("cim:ExcAC2A.kb", &assign_ExcAC2A_kb); + assign_map.emplace("cim:ExcAC2A.kb1", &assign_ExcAC2A_kb1); + assign_map.emplace("cim:ExcAC2A.kc", &assign_ExcAC2A_kc); + assign_map.emplace("cim:ExcAC2A.kd", &assign_ExcAC2A_kd); + assign_map.emplace("cim:ExcAC2A.ke", &assign_ExcAC2A_ke); + assign_map.emplace("cim:ExcAC2A.kf", &assign_ExcAC2A_kf); + assign_map.emplace("cim:ExcAC2A.kh", &assign_ExcAC2A_kh); + assign_map.emplace("cim:ExcAC2A.kl", &assign_ExcAC2A_kl); + assign_map.emplace("cim:ExcAC2A.kl1", &assign_ExcAC2A_kl1); + assign_map.emplace("cim:ExcAC2A.ks", &assign_ExcAC2A_ks); + assign_map.emplace("cim:ExcAC2A.lvgate", &assign_ExcAC2A_lvgate); + assign_map.emplace("cim:ExcAC2A.seve1", &assign_ExcAC2A_seve1); + assign_map.emplace("cim:ExcAC2A.seve2", &assign_ExcAC2A_seve2); + assign_map.emplace("cim:ExcAC2A.ta", &assign_ExcAC2A_ta); + assign_map.emplace("cim:ExcAC2A.tb", &assign_ExcAC2A_tb); + assign_map.emplace("cim:ExcAC2A.tc", &assign_ExcAC2A_tc); + assign_map.emplace("cim:ExcAC2A.te", &assign_ExcAC2A_te); + assign_map.emplace("cim:ExcAC2A.tf", &assign_ExcAC2A_tf); + assign_map.emplace("cim:ExcAC2A.vamax", &assign_ExcAC2A_vamax); + assign_map.emplace("cim:ExcAC2A.vamin", &assign_ExcAC2A_vamin); + assign_map.emplace("cim:ExcAC2A.ve1", &assign_ExcAC2A_ve1); + assign_map.emplace("cim:ExcAC2A.ve2", &assign_ExcAC2A_ve2); + assign_map.emplace("cim:ExcAC2A.vfemax", &assign_ExcAC2A_vfemax); + assign_map.emplace("cim:ExcAC2A.vlr", &assign_ExcAC2A_vlr); + assign_map.emplace("cim:ExcAC2A.vrmax", &assign_ExcAC2A_vrmax); + assign_map.emplace("cim:ExcAC2A.vrmin", &assign_ExcAC2A_vrmin); } void ExcAC2A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcAC2A.hpp b/CGMES_2.4.13_18DEC2013/ExcAC2A.hpp index 91174ea3e..902938d79 100644 --- a/CGMES_2.4.13_18DEC2013/ExcAC2A.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcAC2A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE AC2A alternator-supplied rectifier excitation system with different field current limit. - */ + /** \brief Modified IEEE AC2A alternator-supplied rectifier excitation system with different field current limit. */ class ExcAC2A : public ExcitationSystemDynamics { public: @@ -30,34 +28,89 @@ namespace CIMPP ExcAC2A(); ~ExcAC2A() override; - CIMPP::Boolean hvgate; /* Indicates if HV gate is active (HVgate). true = gate is used false = gate is not used. Typical Value = true. Default: false */ - CIMPP::PU ka; /* Voltage regulator gain (Ka). Typical Value = 400. Default: nullptr */ - CIMPP::PU kb; /* Second stage regulator gain (Kb) (>0). Exciter field current controller gain. Typical Value = 25. Default: nullptr */ - CIMPP::PU kb1; /* Second stage regulator gain (Kb1). It is exciter field current controller gain used as alternative to Kb to represent a variant of the ExcAC2A model. Typical Value = 25. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.28. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (Kd). Typical Value = 0.35. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (Kf). Typical Value = 0.03. Default: nullptr */ - CIMPP::PU kh; /* Exciter field current feedback gain (Kh). Typical Value = 1. Default: nullptr */ - CIMPP::PU kl; /* Exciter field current limiter gain (Kl). Typical Value = 10. Default: nullptr */ - CIMPP::PU kl1; /* Coefficient to allow different usage of the model (Kl1). Typical Value = 1. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ - CIMPP::Boolean lvgate; /* Indicates if LV gate is active (LVgate). true = gate is used false = gate is not used. Typical Value = true. Default: false */ - CIMPP::Simple_Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, Ve, back of commutating reactance (Se[Ve]). Typical Value = 0.037. Default: nullptr */ - CIMPP::Simple_Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, Ve, back of commutating reactance (Se[Ve]). Typical Value = 0.012. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (Ta). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 0.6. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (Tf). Typical Value = 1. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (V). Typical Value = 8. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (V). Typical Value = -8. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve). Typical Value = 4.4. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve). Typical Value = 3.3. Default: nullptr */ - CIMPP::PU vfemax; /* Exciter field current limit reference (Vfemax). Typical Value = 4.4. Default: nullptr */ - CIMPP::PU vlr; /* Maximum exciter field current (Vlr). Typical Value = 4.4. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator outputs (Vrmax). Typical Value = 105. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator outputs (Vrmin). Typical Value = -95. Default: nullptr */ + /** \brief Indicates if HV gate is active (HVgate). true = gate is used false = gate is not used. Typical Value = true. Default: false */ + CIMPP::Boolean hvgate; + + /** \brief Voltage regulator gain (Ka). Typical Value = 400. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Second stage regulator gain (Kb) (>0). Exciter field current controller gain. Typical Value = 25. Default: nullptr */ + CIMPP::PU kb; + + /** \brief Second stage regulator gain (Kb1). It is exciter field current controller gain used as alternative to Kb to represent a variant of the ExcAC2A model. Typical Value = 25. Default: nullptr */ + CIMPP::PU kb1; + + /** \brief Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.28. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (Kd). Typical Value = 0.35. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (Kf). Typical Value = 0.03. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Exciter field current feedback gain (Kh). Typical Value = 1. Default: nullptr */ + CIMPP::PU kh; + + /** \brief Exciter field current limiter gain (Kl). Typical Value = 10. Default: nullptr */ + CIMPP::PU kl; + + /** \brief Coefficient to allow different usage of the model (Kl1). Typical Value = 1. Default: nullptr */ + CIMPP::PU kl1; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Indicates if LV gate is active (LVgate). true = gate is used false = gate is not used. Typical Value = true. Default: false */ + CIMPP::Boolean lvgate; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Ve, back of commutating reactance (Se[Ve]). Typical Value = 0.037. Default: nullptr */ + CIMPP::Simple_Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Ve, back of commutating reactance (Se[Ve]). Typical Value = 0.012. Default: nullptr */ + CIMPP::Simple_Float seve2; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 0.6. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (Tf). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage regulator output (V). Typical Value = 8. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -8. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve). Typical Value = 4.4. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve). Typical Value = 3.3. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Exciter field current limit reference (Vfemax). Typical Value = 4.4. Default: nullptr */ + CIMPP::PU vfemax; + + /** \brief Maximum exciter field current (Vlr). Typical Value = 4.4. Default: nullptr */ + CIMPP::PU vlr; + + /** \brief Maximum voltage regulator outputs (Vrmax). Typical Value = 105. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator outputs (Vrmin). Typical Value = -95. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcAC3A.cpp b/CGMES_2.4.13_18DEC2013/ExcAC3A.cpp index 253f84f1c..254577cfa 100644 --- a/CGMES_2.4.13_18DEC2013/ExcAC3A.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcAC3A.cpp @@ -8,37 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAC3A::ExcAC3A() {}; -ExcAC3A::~ExcAC3A() {}; +ExcAC3A::ExcAC3A() {} +ExcAC3A::~ExcAC3A() {} static const std::list PossibleProfilesForClass = { @@ -90,350 +64,374 @@ ExcAC3A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAC3A_efdn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_efdn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_kf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_kf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_kf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_kf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_klv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_klv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->klv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_kn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_kn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_kr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_kr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_vemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_vemin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vemin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_vfemax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfemax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_vlv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_vlv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vlv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAC3A_efdn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdn; if (!buffer.str().empty()) @@ -447,7 +445,8 @@ bool get_ExcAC3A_efdn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAC3A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -461,7 +460,8 @@ bool get_ExcAC3A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -475,7 +475,8 @@ bool get_ExcAC3A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -489,7 +490,8 @@ bool get_ExcAC3A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -503,7 +505,8 @@ bool get_ExcAC3A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -517,7 +520,8 @@ bool get_ExcAC3A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_kf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf1; if (!buffer.str().empty()) @@ -531,7 +535,8 @@ bool get_ExcAC3A_kf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf2; if (!buffer.str().empty()) @@ -545,7 +550,8 @@ bool get_ExcAC3A_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_klv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->klv; if (!buffer.str().empty()) @@ -559,7 +565,8 @@ bool get_ExcAC3A_klv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_kn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kn; if (!buffer.str().empty()) @@ -573,7 +580,8 @@ bool get_ExcAC3A_kn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_kr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kr; if (!buffer.str().empty()) @@ -587,7 +595,8 @@ bool get_ExcAC3A_kr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -601,7 +610,8 @@ bool get_ExcAC3A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -615,7 +625,8 @@ bool get_ExcAC3A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC3A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -629,7 +640,8 @@ bool get_ExcAC3A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC3A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -643,7 +655,8 @@ bool get_ExcAC3A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -657,7 +670,8 @@ bool get_ExcAC3A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -671,7 +685,8 @@ bool get_ExcAC3A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -685,7 +700,8 @@ bool get_ExcAC3A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -699,7 +715,8 @@ bool get_ExcAC3A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -713,7 +730,8 @@ bool get_ExcAC3A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC3A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -727,7 +745,8 @@ bool get_ExcAC3A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC3A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -741,7 +760,8 @@ bool get_ExcAC3A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -755,7 +775,8 @@ bool get_ExcAC3A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vemin; if (!buffer.str().empty()) @@ -769,7 +790,8 @@ bool get_ExcAC3A_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC3A_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfemax; if (!buffer.str().empty()) @@ -783,7 +805,8 @@ bool get_ExcAC3A_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcAC3A_vlv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vlv; if (!buffer.str().empty()) @@ -795,8 +818,6 @@ bool get_ExcAC3A_vlv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcAC3A::debugName[] = "ExcAC3A"; const char* ExcAC3A::debugString() const { @@ -805,37 +826,37 @@ const char* ExcAC3A::debugString() const void ExcAC3A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAC3A"), &ExcAC3A_factory)); + factory_map.emplace("cim:ExcAC3A", &ExcAC3A_factory); } void ExcAC3A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.efdn"), &assign_ExcAC3A_efdn)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.ka"), &assign_ExcAC3A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.kc"), &assign_ExcAC3A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.kd"), &assign_ExcAC3A_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.ke"), &assign_ExcAC3A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.kf"), &assign_ExcAC3A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.kf1"), &assign_ExcAC3A_kf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.kf2"), &assign_ExcAC3A_kf2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.klv"), &assign_ExcAC3A_klv)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.kn"), &assign_ExcAC3A_kn)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.kr"), &assign_ExcAC3A_kr)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.ks"), &assign_ExcAC3A_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.seve1"), &assign_ExcAC3A_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.seve2"), &assign_ExcAC3A_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.ta"), &assign_ExcAC3A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.tb"), &assign_ExcAC3A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.tc"), &assign_ExcAC3A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.te"), &assign_ExcAC3A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.tf"), &assign_ExcAC3A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.vamax"), &assign_ExcAC3A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.vamin"), &assign_ExcAC3A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.ve1"), &assign_ExcAC3A_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.ve2"), &assign_ExcAC3A_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.vemin"), &assign_ExcAC3A_vemin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.vfemax"), &assign_ExcAC3A_vfemax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.vlv"), &assign_ExcAC3A_vlv)); + assign_map.emplace("cim:ExcAC3A.efdn", &assign_ExcAC3A_efdn); + assign_map.emplace("cim:ExcAC3A.ka", &assign_ExcAC3A_ka); + assign_map.emplace("cim:ExcAC3A.kc", &assign_ExcAC3A_kc); + assign_map.emplace("cim:ExcAC3A.kd", &assign_ExcAC3A_kd); + assign_map.emplace("cim:ExcAC3A.ke", &assign_ExcAC3A_ke); + assign_map.emplace("cim:ExcAC3A.kf", &assign_ExcAC3A_kf); + assign_map.emplace("cim:ExcAC3A.kf1", &assign_ExcAC3A_kf1); + assign_map.emplace("cim:ExcAC3A.kf2", &assign_ExcAC3A_kf2); + assign_map.emplace("cim:ExcAC3A.klv", &assign_ExcAC3A_klv); + assign_map.emplace("cim:ExcAC3A.kn", &assign_ExcAC3A_kn); + assign_map.emplace("cim:ExcAC3A.kr", &assign_ExcAC3A_kr); + assign_map.emplace("cim:ExcAC3A.ks", &assign_ExcAC3A_ks); + assign_map.emplace("cim:ExcAC3A.seve1", &assign_ExcAC3A_seve1); + assign_map.emplace("cim:ExcAC3A.seve2", &assign_ExcAC3A_seve2); + assign_map.emplace("cim:ExcAC3A.ta", &assign_ExcAC3A_ta); + assign_map.emplace("cim:ExcAC3A.tb", &assign_ExcAC3A_tb); + assign_map.emplace("cim:ExcAC3A.tc", &assign_ExcAC3A_tc); + assign_map.emplace("cim:ExcAC3A.te", &assign_ExcAC3A_te); + assign_map.emplace("cim:ExcAC3A.tf", &assign_ExcAC3A_tf); + assign_map.emplace("cim:ExcAC3A.vamax", &assign_ExcAC3A_vamax); + assign_map.emplace("cim:ExcAC3A.vamin", &assign_ExcAC3A_vamin); + assign_map.emplace("cim:ExcAC3A.ve1", &assign_ExcAC3A_ve1); + assign_map.emplace("cim:ExcAC3A.ve2", &assign_ExcAC3A_ve2); + assign_map.emplace("cim:ExcAC3A.vemin", &assign_ExcAC3A_vemin); + assign_map.emplace("cim:ExcAC3A.vfemax", &assign_ExcAC3A_vfemax); + assign_map.emplace("cim:ExcAC3A.vlv", &assign_ExcAC3A_vlv); } void ExcAC3A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcAC3A.hpp b/CGMES_2.4.13_18DEC2013/ExcAC3A.hpp index 51c4e355b..430ee5d27 100644 --- a/CGMES_2.4.13_18DEC2013/ExcAC3A.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcAC3A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE AC3A alternator-supplied rectifier excitation system with different field current limit. - */ + /** \brief Modified IEEE AC3A alternator-supplied rectifier excitation system with different field current limit. */ class ExcAC3A : public ExcitationSystemDynamics { public: @@ -29,32 +27,83 @@ namespace CIMPP ExcAC3A(); ~ExcAC3A() override; - CIMPP::PU efdn; /* Value of at which feedback gain changes (Efdn). Typical Value = 2.36. Default: nullptr */ - CIMPP::Seconds ka; /* Voltage regulator gain (Ka). Typical Value = 45.62. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.104. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (Kd). Typical Value = 0.499. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (Kf). Typical Value = 0.143. Default: nullptr */ - CIMPP::PU kf1; /* Coefficient to allow different usage of the model (Kf1). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf2; /* Coefficient to allow different usage of the model (Kf2). Typical Value = 0. Default: nullptr */ - CIMPP::PU klv; /* Gain used in the minimum field voltage limiter loop (Klv). Typical Value = 0.194. Default: nullptr */ - CIMPP::PU kn; /* Excitation control system stabilizer gain (Kn). Typical Value =0.05. Default: nullptr */ - CIMPP::PU kr; /* Constant associated with regulator and alternator field power supply (Kr). Typical Value =3.77. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, Ve, back of commutating reactance (Se[Ve]). Typical Value = 1.143. Default: nullptr */ - CIMPP::Simple_Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, Ve, back of commutating reactance (Se[Ve]). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU ta; /* Voltage regulator time constant (Ta). Typical Value = 0.013. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 1.17. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (Tf). Typical Value = 1. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (V). Typical Value = 1. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (V). Typical Value = -0.95. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve1) equals Vemax (Ve1). Typical Value = 6.24. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve). Typical Value = 4.68. Default: nullptr */ - CIMPP::PU vemin; /* Minimum exciter voltage output (Vemin). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU vfemax; /* Exciter field current limit reference (Vfemax). Typical Value = 16. Default: nullptr */ - CIMPP::PU vlv; /* Field voltage used in the minimum field voltage limiter loop (Vlv). Typical Value = 0.79. Default: nullptr */ + /** \brief Value of at which feedback gain changes (Efdn). Typical Value = 2.36. Default: nullptr */ + CIMPP::PU efdn; + + /** \brief Voltage regulator gain (Ka). Typical Value = 45.62. Default: nullptr */ + CIMPP::Seconds ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.104. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (Kd). Typical Value = 0.499. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (Kf). Typical Value = 0.143. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Coefficient to allow different usage of the model (Kf1). Typical Value = 1. Default: nullptr */ + CIMPP::PU kf1; + + /** \brief Coefficient to allow different usage of the model (Kf2). Typical Value = 0. Default: nullptr */ + CIMPP::PU kf2; + + /** \brief Gain used in the minimum field voltage limiter loop (Klv). Typical Value = 0.194. Default: nullptr */ + CIMPP::PU klv; + + /** \brief Excitation control system stabilizer gain (Kn). Typical Value =0.05. Default: nullptr */ + CIMPP::PU kn; + + /** \brief Constant associated with regulator and alternator field power supply (Kr). Typical Value =3.77. Default: nullptr */ + CIMPP::PU kr; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Ve, back of commutating reactance (Se[Ve]). Typical Value = 1.143. Default: nullptr */ + CIMPP::Simple_Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Ve, back of commutating reactance (Se[Ve]). Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float seve2; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0.013. Default: nullptr */ + CIMPP::PU ta; + + /** \brief Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 1.17. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (Tf). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage regulator output (V). Typical Value = 1. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -0.95. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve1) equals Vemax (Ve1). Typical Value = 6.24. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve). Typical Value = 4.68. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Minimum exciter voltage output (Vemin). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU vemin; + + /** \brief Exciter field current limit reference (Vfemax). Typical Value = 16. Default: nullptr */ + CIMPP::PU vfemax; + + /** \brief Field voltage used in the minimum field voltage limiter loop (Vlv). Typical Value = 0.79. Default: nullptr */ + CIMPP::PU vlv; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcAC4A.cpp b/CGMES_2.4.13_18DEC2013/ExcAC4A.cpp index f949b4ef8..ee9a03733 100644 --- a/CGMES_2.4.13_18DEC2013/ExcAC4A.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcAC4A.cpp @@ -8,20 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAC4A::ExcAC4A() {}; -ExcAC4A::~ExcAC4A() {}; +ExcAC4A::ExcAC4A() {} +ExcAC4A::~ExcAC4A() {} static const std::list PossibleProfilesForClass = { @@ -56,129 +47,136 @@ ExcAC4A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAC4A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC4A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC4A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC4A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC4A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC4A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC4A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC4A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC4A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC4A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC4A_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC4A_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC4A_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC4A_vimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC4A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC4A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC4A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC4A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAC4A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -192,7 +190,8 @@ bool get_ExcAC4A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC4A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -206,7 +205,8 @@ bool get_ExcAC4A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC4A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -220,7 +220,8 @@ bool get_ExcAC4A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC4A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -234,7 +235,8 @@ bool get_ExcAC4A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC4A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -248,7 +250,8 @@ bool get_ExcAC4A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC4A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -262,7 +265,8 @@ bool get_ExcAC4A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC4A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimin; if (!buffer.str().empty()) @@ -276,7 +280,8 @@ bool get_ExcAC4A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC4A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -290,7 +295,8 @@ bool get_ExcAC4A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC4A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -302,8 +308,6 @@ bool get_ExcAC4A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcAC4A::debugName[] = "ExcAC4A"; const char* ExcAC4A::debugString() const { @@ -312,20 +316,20 @@ const char* ExcAC4A::debugString() const void ExcAC4A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAC4A"), &ExcAC4A_factory)); + factory_map.emplace("cim:ExcAC4A", &ExcAC4A_factory); } void ExcAC4A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAC4A.ka"), &assign_ExcAC4A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC4A.kc"), &assign_ExcAC4A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC4A.ta"), &assign_ExcAC4A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC4A.tb"), &assign_ExcAC4A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC4A.tc"), &assign_ExcAC4A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC4A.vimax"), &assign_ExcAC4A_vimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC4A.vimin"), &assign_ExcAC4A_vimin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC4A.vrmax"), &assign_ExcAC4A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC4A.vrmin"), &assign_ExcAC4A_vrmin)); + assign_map.emplace("cim:ExcAC4A.ka", &assign_ExcAC4A_ka); + assign_map.emplace("cim:ExcAC4A.kc", &assign_ExcAC4A_kc); + assign_map.emplace("cim:ExcAC4A.ta", &assign_ExcAC4A_ta); + assign_map.emplace("cim:ExcAC4A.tb", &assign_ExcAC4A_tb); + assign_map.emplace("cim:ExcAC4A.tc", &assign_ExcAC4A_tc); + assign_map.emplace("cim:ExcAC4A.vimax", &assign_ExcAC4A_vimax); + assign_map.emplace("cim:ExcAC4A.vimin", &assign_ExcAC4A_vimin); + assign_map.emplace("cim:ExcAC4A.vrmax", &assign_ExcAC4A_vrmax); + assign_map.emplace("cim:ExcAC4A.vrmin", &assign_ExcAC4A_vrmin); } void ExcAC4A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcAC4A.hpp b/CGMES_2.4.13_18DEC2013/ExcAC4A.hpp index cbfe82616..d0fc847a7 100644 --- a/CGMES_2.4.13_18DEC2013/ExcAC4A.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcAC4A.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE AC4A alternator-supplied rectifier excitation system with different minimum controller output. - */ + /** \brief Modified IEEE AC4A alternator-supplied rectifier excitation system with different minimum controller output. */ class ExcAC4A : public ExcitationSystemDynamics { public: @@ -28,15 +26,32 @@ namespace CIMPP ExcAC4A(); ~ExcAC4A() override; - CIMPP::PU ka; /* Voltage regulator gain (Ka). Typical Value = 200. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (Ta). Typical Value = 0.015. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (Tb). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (Tc). Typical Value = 1. Default: nullptr */ - CIMPP::PU vimax; /* Maximum voltage regulator input limit (Vimax). Typical Value = 10. Default: nullptr */ - CIMPP::PU vimin; /* Minimum voltage regulator input limit (Vimin). Typical Value = -10. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (Vrmax). Typical Value = 5.64. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (Vrmin). Typical Value = -4.53. Default: nullptr */ + /** \brief Voltage regulator gain (Ka). Typical Value = 200. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0.015. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (Tb). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (Tc). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Maximum voltage regulator input limit (Vimax). Typical Value = 10. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Minimum voltage regulator input limit (Vimin). Typical Value = -10. Default: nullptr */ + CIMPP::PU vimin; + + /** \brief Maximum voltage regulator output (Vrmax). Typical Value = 5.64. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (Vrmin). Typical Value = -4.53. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcAC5A.cpp b/CGMES_2.4.13_18DEC2013/ExcAC5A.cpp index e44f1f114..c0836badb 100644 --- a/CGMES_2.4.13_18DEC2013/ExcAC5A.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcAC5A.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAC5A::ExcAC5A() {}; -ExcAC5A::~ExcAC5A() {}; +ExcAC5A::ExcAC5A() {} +ExcAC5A::~ExcAC5A() {} static const std::list PossibleProfilesForClass = { @@ -74,246 +56,262 @@ ExcAC5A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAC5A_a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_a(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_seefd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_seefd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_tf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_tf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_tf3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_tf3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAC5A_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a; if (!buffer.str().empty()) @@ -327,7 +325,8 @@ bool get_ExcAC5A_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -341,7 +340,8 @@ bool get_ExcAC5A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAC5A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -355,7 +355,8 @@ bool get_ExcAC5A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAC5A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -369,7 +370,8 @@ bool get_ExcAC5A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -383,7 +385,8 @@ bool get_ExcAC5A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -397,7 +400,8 @@ bool get_ExcAC5A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -411,7 +415,8 @@ bool get_ExcAC5A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd1; if (!buffer.str().empty()) @@ -425,7 +430,8 @@ bool get_ExcAC5A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcAC5A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd2; if (!buffer.str().empty()) @@ -439,7 +445,8 @@ bool get_ExcAC5A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcAC5A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -453,7 +460,8 @@ bool get_ExcAC5A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -467,7 +475,8 @@ bool get_ExcAC5A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -481,7 +490,8 @@ bool get_ExcAC5A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -495,7 +505,8 @@ bool get_ExcAC5A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf1; if (!buffer.str().empty()) @@ -509,7 +520,8 @@ bool get_ExcAC5A_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf2; if (!buffer.str().empty()) @@ -523,7 +535,8 @@ bool get_ExcAC5A_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_tf3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf3; if (!buffer.str().empty()) @@ -537,7 +550,8 @@ bool get_ExcAC5A_tf3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -551,7 +565,8 @@ bool get_ExcAC5A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC5A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -563,8 +578,6 @@ bool get_ExcAC5A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcAC5A::debugName[] = "ExcAC5A"; const char* ExcAC5A::debugString() const { @@ -573,29 +586,29 @@ const char* ExcAC5A::debugString() const void ExcAC5A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAC5A"), &ExcAC5A_factory)); + factory_map.emplace("cim:ExcAC5A", &ExcAC5A_factory); } void ExcAC5A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.a"), &assign_ExcAC5A_a)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.efd1"), &assign_ExcAC5A_efd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.efd2"), &assign_ExcAC5A_efd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.ka"), &assign_ExcAC5A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.ke"), &assign_ExcAC5A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.kf"), &assign_ExcAC5A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.ks"), &assign_ExcAC5A_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.seefd1"), &assign_ExcAC5A_seefd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.seefd2"), &assign_ExcAC5A_seefd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.ta"), &assign_ExcAC5A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.tb"), &assign_ExcAC5A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.tc"), &assign_ExcAC5A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.te"), &assign_ExcAC5A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.tf1"), &assign_ExcAC5A_tf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.tf2"), &assign_ExcAC5A_tf2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.tf3"), &assign_ExcAC5A_tf3)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.vrmax"), &assign_ExcAC5A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.vrmin"), &assign_ExcAC5A_vrmin)); + assign_map.emplace("cim:ExcAC5A.a", &assign_ExcAC5A_a); + assign_map.emplace("cim:ExcAC5A.efd1", &assign_ExcAC5A_efd1); + assign_map.emplace("cim:ExcAC5A.efd2", &assign_ExcAC5A_efd2); + assign_map.emplace("cim:ExcAC5A.ka", &assign_ExcAC5A_ka); + assign_map.emplace("cim:ExcAC5A.ke", &assign_ExcAC5A_ke); + assign_map.emplace("cim:ExcAC5A.kf", &assign_ExcAC5A_kf); + assign_map.emplace("cim:ExcAC5A.ks", &assign_ExcAC5A_ks); + assign_map.emplace("cim:ExcAC5A.seefd1", &assign_ExcAC5A_seefd1); + assign_map.emplace("cim:ExcAC5A.seefd2", &assign_ExcAC5A_seefd2); + assign_map.emplace("cim:ExcAC5A.ta", &assign_ExcAC5A_ta); + assign_map.emplace("cim:ExcAC5A.tb", &assign_ExcAC5A_tb); + assign_map.emplace("cim:ExcAC5A.tc", &assign_ExcAC5A_tc); + assign_map.emplace("cim:ExcAC5A.te", &assign_ExcAC5A_te); + assign_map.emplace("cim:ExcAC5A.tf1", &assign_ExcAC5A_tf1); + assign_map.emplace("cim:ExcAC5A.tf2", &assign_ExcAC5A_tf2); + assign_map.emplace("cim:ExcAC5A.tf3", &assign_ExcAC5A_tf3); + assign_map.emplace("cim:ExcAC5A.vrmax", &assign_ExcAC5A_vrmax); + assign_map.emplace("cim:ExcAC5A.vrmin", &assign_ExcAC5A_vrmin); } void ExcAC5A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcAC5A.hpp b/CGMES_2.4.13_18DEC2013/ExcAC5A.hpp index ea67ffeed..17c61ea36 100644 --- a/CGMES_2.4.13_18DEC2013/ExcAC5A.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcAC5A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE AC5A alternator-supplied rectifier excitation system with different minimum controller output. - */ + /** \brief Modified IEEE AC5A alternator-supplied rectifier excitation system with different minimum controller output. */ class ExcAC5A : public ExcitationSystemDynamics { public: @@ -29,24 +27,59 @@ namespace CIMPP ExcAC5A(); ~ExcAC5A() override; - CIMPP::Simple_Float a; /* Coefficient to allow different usage of the model (a). Typical Value = 1. Default: nullptr */ - CIMPP::PU efd1; /* Exciter voltage at which exciter saturation is defined (Efd1). Typical Value = 5.6. Default: nullptr */ - CIMPP::PU efd2; /* Exciter voltage at which exciter saturation is defined (Efd2). Typical Value = 4.2. Default: nullptr */ - CIMPP::PU ka; /* Voltage regulator gain (Ka). Typical Value = 400. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (Kf). Typical Value = 0.03. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float seefd1; /* Exciter saturation function value at the corresponding exciter voltage, Efd1 (S[Efd1]). Typical Value = 0.86. Default: nullptr */ - CIMPP::Simple_Float seefd2; /* Exciter saturation function value at the corresponding exciter voltage, Efd2 (S[Efd2]). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (Ta). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (Tc). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 0.8. Default: nullptr */ - CIMPP::Seconds tf1; /* Excitation control system stabilizer time constant (Tf1). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tf2; /* Excitation control system stabilizer time constant (Tf2). Typical Value = 0.8. Default: nullptr */ - CIMPP::Seconds tf3; /* Excitation control system stabilizer time constant (Tf3). Typical Value = 0. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (Vrmax). Typical Value = 7.3. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (Vrmin). Typical Value =-7.3. Default: nullptr */ + /** \brief Coefficient to allow different usage of the model (a). Typical Value = 1. Default: nullptr */ + CIMPP::Simple_Float a; + + /** \brief Exciter voltage at which exciter saturation is defined (Efd1). Typical Value = 5.6. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Exciter voltage at which exciter saturation is defined (Efd2). Typical Value = 4.2. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief Voltage regulator gain (Ka). Typical Value = 400. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (Kf). Typical Value = 0.03. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Efd1 (S[Efd1]). Typical Value = 0.86. Default: nullptr */ + CIMPP::Simple_Float seefd1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Efd2 (S[Efd2]). Typical Value = 0.5. Default: nullptr */ + CIMPP::Simple_Float seefd2; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (Tc). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 0.8. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (Tf1). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf1; + + /** \brief Excitation control system stabilizer time constant (Tf2). Typical Value = 0.8. Default: nullptr */ + CIMPP::Seconds tf2; + + /** \brief Excitation control system stabilizer time constant (Tf3). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tf3; + + /** \brief Maximum voltage regulator output (Vrmax). Typical Value = 7.3. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (Vrmin). Typical Value =-7.3. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcAC6A.cpp b/CGMES_2.4.13_18DEC2013/ExcAC6A.cpp index b30aa83fe..bcdd5fdcd 100644 --- a/CGMES_2.4.13_18DEC2013/ExcAC6A.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcAC6A.cpp @@ -8,34 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAC6A::ExcAC6A() {}; -ExcAC6A::~ExcAC6A() {}; +ExcAC6A::ExcAC6A() {} +ExcAC6A::~ExcAC6A() {} static const std::list PossibleProfilesForClass = { @@ -84,311 +61,332 @@ ExcAC6A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAC6A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_kh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_th(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_th(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_tj(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_tj(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tj; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_tk(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_tk(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tk; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_vfelim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_vfelim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfelim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_vhmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_vhmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vhmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAC6A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -402,7 +400,8 @@ bool get_ExcAC6A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -416,7 +415,8 @@ bool get_ExcAC6A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -430,7 +430,8 @@ bool get_ExcAC6A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -444,7 +445,8 @@ bool get_ExcAC6A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh; if (!buffer.str().empty()) @@ -458,7 +460,8 @@ bool get_ExcAC6A_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -472,7 +475,8 @@ bool get_ExcAC6A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -486,7 +490,8 @@ bool get_ExcAC6A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC6A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -500,7 +505,8 @@ bool get_ExcAC6A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC6A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -514,7 +520,8 @@ bool get_ExcAC6A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -528,7 +535,8 @@ bool get_ExcAC6A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -542,7 +550,8 @@ bool get_ExcAC6A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -556,7 +565,8 @@ bool get_ExcAC6A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_th(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th; if (!buffer.str().empty()) @@ -570,7 +580,8 @@ bool get_ExcAC6A_th(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_tj(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tj; if (!buffer.str().empty()) @@ -584,7 +595,8 @@ bool get_ExcAC6A_tj(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_tk(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tk; if (!buffer.str().empty()) @@ -598,7 +610,8 @@ bool get_ExcAC6A_tk(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -612,7 +625,8 @@ bool get_ExcAC6A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC6A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -626,7 +640,8 @@ bool get_ExcAC6A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC6A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -640,7 +655,8 @@ bool get_ExcAC6A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -654,7 +670,8 @@ bool get_ExcAC6A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_vfelim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfelim; if (!buffer.str().empty()) @@ -668,7 +685,8 @@ bool get_ExcAC6A_vfelim(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcAC6A_vhmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vhmax; if (!buffer.str().empty()) @@ -682,7 +700,8 @@ bool get_ExcAC6A_vhmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC6A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -696,7 +715,8 @@ bool get_ExcAC6A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC6A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -708,8 +728,6 @@ bool get_ExcAC6A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcAC6A::debugName[] = "ExcAC6A"; const char* ExcAC6A::debugString() const { @@ -718,34 +736,34 @@ const char* ExcAC6A::debugString() const void ExcAC6A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAC6A"), &ExcAC6A_factory)); + factory_map.emplace("cim:ExcAC6A", &ExcAC6A_factory); } void ExcAC6A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.ka"), &assign_ExcAC6A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.kc"), &assign_ExcAC6A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.kd"), &assign_ExcAC6A_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.ke"), &assign_ExcAC6A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.kh"), &assign_ExcAC6A_kh)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.ks"), &assign_ExcAC6A_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.seve1"), &assign_ExcAC6A_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.seve2"), &assign_ExcAC6A_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.ta"), &assign_ExcAC6A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.tb"), &assign_ExcAC6A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.tc"), &assign_ExcAC6A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.te"), &assign_ExcAC6A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.th"), &assign_ExcAC6A_th)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.tj"), &assign_ExcAC6A_tj)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.tk"), &assign_ExcAC6A_tk)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.vamax"), &assign_ExcAC6A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.vamin"), &assign_ExcAC6A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.ve1"), &assign_ExcAC6A_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.ve2"), &assign_ExcAC6A_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.vfelim"), &assign_ExcAC6A_vfelim)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.vhmax"), &assign_ExcAC6A_vhmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.vrmax"), &assign_ExcAC6A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.vrmin"), &assign_ExcAC6A_vrmin)); + assign_map.emplace("cim:ExcAC6A.ka", &assign_ExcAC6A_ka); + assign_map.emplace("cim:ExcAC6A.kc", &assign_ExcAC6A_kc); + assign_map.emplace("cim:ExcAC6A.kd", &assign_ExcAC6A_kd); + assign_map.emplace("cim:ExcAC6A.ke", &assign_ExcAC6A_ke); + assign_map.emplace("cim:ExcAC6A.kh", &assign_ExcAC6A_kh); + assign_map.emplace("cim:ExcAC6A.ks", &assign_ExcAC6A_ks); + assign_map.emplace("cim:ExcAC6A.seve1", &assign_ExcAC6A_seve1); + assign_map.emplace("cim:ExcAC6A.seve2", &assign_ExcAC6A_seve2); + assign_map.emplace("cim:ExcAC6A.ta", &assign_ExcAC6A_ta); + assign_map.emplace("cim:ExcAC6A.tb", &assign_ExcAC6A_tb); + assign_map.emplace("cim:ExcAC6A.tc", &assign_ExcAC6A_tc); + assign_map.emplace("cim:ExcAC6A.te", &assign_ExcAC6A_te); + assign_map.emplace("cim:ExcAC6A.th", &assign_ExcAC6A_th); + assign_map.emplace("cim:ExcAC6A.tj", &assign_ExcAC6A_tj); + assign_map.emplace("cim:ExcAC6A.tk", &assign_ExcAC6A_tk); + assign_map.emplace("cim:ExcAC6A.vamax", &assign_ExcAC6A_vamax); + assign_map.emplace("cim:ExcAC6A.vamin", &assign_ExcAC6A_vamin); + assign_map.emplace("cim:ExcAC6A.ve1", &assign_ExcAC6A_ve1); + assign_map.emplace("cim:ExcAC6A.ve2", &assign_ExcAC6A_ve2); + assign_map.emplace("cim:ExcAC6A.vfelim", &assign_ExcAC6A_vfelim); + assign_map.emplace("cim:ExcAC6A.vhmax", &assign_ExcAC6A_vhmax); + assign_map.emplace("cim:ExcAC6A.vrmax", &assign_ExcAC6A_vrmax); + assign_map.emplace("cim:ExcAC6A.vrmin", &assign_ExcAC6A_vrmin); } void ExcAC6A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcAC6A.hpp b/CGMES_2.4.13_18DEC2013/ExcAC6A.hpp index 0550a756b..9bc679ac4 100644 --- a/CGMES_2.4.13_18DEC2013/ExcAC6A.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcAC6A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE AC6A alternator-supplied rectifier excitation system with speed input. - */ + /** \brief Modified IEEE AC6A alternator-supplied rectifier excitation system with speed input. */ class ExcAC6A : public ExcitationSystemDynamics { public: @@ -29,29 +27,74 @@ namespace CIMPP ExcAC6A(); ~ExcAC6A() override; - CIMPP::PU ka; /* Voltage regulator gain (Ka). Typical Value = 536. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.173. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (Kd). Typical Value = 1.91. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (Ke). Typical Value = 1.6. Default: nullptr */ - CIMPP::PU kh; /* Exciter field current limiter gain (Kh). Typical Value = 92. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, Ve1, back of commutating reactance (Se[Ve1]). Typical Value = 0.214. Default: nullptr */ - CIMPP::Simple_Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, Ve2, back of commutating reactance (Se[Ve2]). Typical Value = 0.044. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (Ta). Typical Value = 0.086. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (Tb). Typical Value = 9. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (Tc). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds th; /* Exciter field current limiter time constant (Th). Typical Value = 0.08. Default: nullptr */ - CIMPP::Seconds tj; /* Exciter field current limiter time constant (Tj). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds tk; /* Voltage regulator time constant (Tk). Typical Value = 0.18. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (Vamax). Typical Value = 75. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (Vamin). Typical Value = -75. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve). Typical Value = 7.4. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve2). Typical Value = 5.55. Default: nullptr */ - CIMPP::PU vfelim; /* Exciter field current limit reference (Vfelim). Typical Value = 19. Default: nullptr */ - CIMPP::PU vhmax; /* Maximum field current limiter signal reference (Vhmax). Typical Value = 75. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (Vrmax). Typical Value = 44. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (Vrmin). Typical Value = -36. Default: nullptr */ + /** \brief Voltage regulator gain (Ka). Typical Value = 536. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.173. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (Kd). Typical Value = 1.91. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter constant related to self-excited field (Ke). Typical Value = 1.6. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Exciter field current limiter gain (Kh). Typical Value = 92. Default: nullptr */ + CIMPP::PU kh; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Ve1, back of commutating reactance (Se[Ve1]). Typical Value = 0.214. Default: nullptr */ + CIMPP::Simple_Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Ve2, back of commutating reactance (Se[Ve2]). Typical Value = 0.044. Default: nullptr */ + CIMPP::Simple_Float seve2; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0.086. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (Tb). Typical Value = 9. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (Tc). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Exciter field current limiter time constant (Th). Typical Value = 0.08. Default: nullptr */ + CIMPP::Seconds th; + + /** \brief Exciter field current limiter time constant (Tj). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds tj; + + /** \brief Voltage regulator time constant (Tk). Typical Value = 0.18. Default: nullptr */ + CIMPP::Seconds tk; + + /** \brief Maximum voltage regulator output (Vamax). Typical Value = 75. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (Vamin). Typical Value = -75. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve). Typical Value = 7.4. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve2). Typical Value = 5.55. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Exciter field current limit reference (Vfelim). Typical Value = 19. Default: nullptr */ + CIMPP::PU vfelim; + + /** \brief Maximum field current limiter signal reference (Vhmax). Typical Value = 75. Default: nullptr */ + CIMPP::PU vhmax; + + /** \brief Maximum voltage regulator output (Vrmax). Typical Value = 44. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (Vrmin). Typical Value = -36. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcAC8B.cpp b/CGMES_2.4.13_18DEC2013/ExcAC8B.cpp index b296f6aca..d43497172 100644 --- a/CGMES_2.4.13_18DEC2013/ExcAC8B.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcAC8B.cpp @@ -8,38 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" using namespace CIMPP; -ExcAC8B::ExcAC8B() {}; -ExcAC8B::~ExcAC8B() {}; +ExcAC8B::ExcAC8B() {} +ExcAC8B::~ExcAC8B() {} static const std::list PossibleProfilesForClass = { @@ -92,363 +65,388 @@ ExcAC8B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAC8B_inlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_inlim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inlim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_kdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_kdr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kdr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_kir(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_kir(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kir; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_kpr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_kpr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_pidlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_pidlim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pidlim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_tdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_tdr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_telim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_telim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->telim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_vemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_vemin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vemin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_vfemax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfemax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_vimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_vpidmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_vpidmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vpidmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_vpidmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_vpidmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vpidmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_vtmult(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_vtmult(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vtmult; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAC8B_inlim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inlim; if (!buffer.str().empty()) @@ -462,7 +460,8 @@ bool get_ExcAC8B_inlim(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC8B_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -476,7 +475,8 @@ bool get_ExcAC8B_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -490,7 +490,8 @@ bool get_ExcAC8B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -504,7 +505,8 @@ bool get_ExcAC8B_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_kdr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdr; if (!buffer.str().empty()) @@ -518,7 +520,8 @@ bool get_ExcAC8B_kdr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -532,7 +535,8 @@ bool get_ExcAC8B_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kir; if (!buffer.str().empty()) @@ -546,7 +550,8 @@ bool get_ExcAC8B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpr; if (!buffer.str().empty()) @@ -560,7 +565,8 @@ bool get_ExcAC8B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -574,7 +580,8 @@ bool get_ExcAC8B_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_pidlim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pidlim; if (!buffer.str().empty()) @@ -588,7 +595,8 @@ bool get_ExcAC8B_pidlim(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcAC8B_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -602,7 +610,8 @@ bool get_ExcAC8B_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC8B_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -616,7 +625,8 @@ bool get_ExcAC8B_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC8B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -630,7 +640,8 @@ bool get_ExcAC8B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_tdr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdr; if (!buffer.str().empty()) @@ -644,7 +655,8 @@ bool get_ExcAC8B_tdr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -658,7 +670,8 @@ bool get_ExcAC8B_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_telim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->telim; if (!buffer.str().empty()) @@ -672,7 +685,8 @@ bool get_ExcAC8B_telim(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC8B_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -686,7 +700,8 @@ bool get_ExcAC8B_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -700,7 +715,8 @@ bool get_ExcAC8B_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vemin; if (!buffer.str().empty()) @@ -714,7 +730,8 @@ bool get_ExcAC8B_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC8B_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfemax; if (!buffer.str().empty()) @@ -728,7 +745,8 @@ bool get_ExcAC8B_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcAC8B_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -742,7 +760,8 @@ bool get_ExcAC8B_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC8B_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimin; if (!buffer.str().empty()) @@ -756,7 +775,8 @@ bool get_ExcAC8B_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC8B_vpidmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vpidmax; if (!buffer.str().empty()) @@ -770,7 +790,8 @@ bool get_ExcAC8B_vpidmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcAC8B_vpidmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vpidmin; if (!buffer.str().empty()) @@ -784,7 +805,8 @@ bool get_ExcAC8B_vpidmin(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcAC8B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -798,7 +820,8 @@ bool get_ExcAC8B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC8B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -812,7 +835,8 @@ bool get_ExcAC8B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC8B_vtmult(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vtmult; if (!buffer.str().empty()) @@ -824,8 +848,6 @@ bool get_ExcAC8B_vtmult(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char ExcAC8B::debugName[] = "ExcAC8B"; const char* ExcAC8B::debugString() const { @@ -834,38 +856,38 @@ const char* ExcAC8B::debugString() const void ExcAC8B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAC8B"), &ExcAC8B_factory)); + factory_map.emplace("cim:ExcAC8B", &ExcAC8B_factory); } void ExcAC8B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.inlim"), &assign_ExcAC8B_inlim)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.ka"), &assign_ExcAC8B_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.kc"), &assign_ExcAC8B_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.kd"), &assign_ExcAC8B_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.kdr"), &assign_ExcAC8B_kdr)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.ke"), &assign_ExcAC8B_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.kir"), &assign_ExcAC8B_kir)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.kpr"), &assign_ExcAC8B_kpr)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.ks"), &assign_ExcAC8B_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.pidlim"), &assign_ExcAC8B_pidlim)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.seve1"), &assign_ExcAC8B_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.seve2"), &assign_ExcAC8B_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.ta"), &assign_ExcAC8B_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.tdr"), &assign_ExcAC8B_tdr)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.te"), &assign_ExcAC8B_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.telim"), &assign_ExcAC8B_telim)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.ve1"), &assign_ExcAC8B_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.ve2"), &assign_ExcAC8B_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.vemin"), &assign_ExcAC8B_vemin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.vfemax"), &assign_ExcAC8B_vfemax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.vimax"), &assign_ExcAC8B_vimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.vimin"), &assign_ExcAC8B_vimin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.vpidmax"), &assign_ExcAC8B_vpidmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.vpidmin"), &assign_ExcAC8B_vpidmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.vrmax"), &assign_ExcAC8B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.vrmin"), &assign_ExcAC8B_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.vtmult"), &assign_ExcAC8B_vtmult)); + assign_map.emplace("cim:ExcAC8B.inlim", &assign_ExcAC8B_inlim); + assign_map.emplace("cim:ExcAC8B.ka", &assign_ExcAC8B_ka); + assign_map.emplace("cim:ExcAC8B.kc", &assign_ExcAC8B_kc); + assign_map.emplace("cim:ExcAC8B.kd", &assign_ExcAC8B_kd); + assign_map.emplace("cim:ExcAC8B.kdr", &assign_ExcAC8B_kdr); + assign_map.emplace("cim:ExcAC8B.ke", &assign_ExcAC8B_ke); + assign_map.emplace("cim:ExcAC8B.kir", &assign_ExcAC8B_kir); + assign_map.emplace("cim:ExcAC8B.kpr", &assign_ExcAC8B_kpr); + assign_map.emplace("cim:ExcAC8B.ks", &assign_ExcAC8B_ks); + assign_map.emplace("cim:ExcAC8B.pidlim", &assign_ExcAC8B_pidlim); + assign_map.emplace("cim:ExcAC8B.seve1", &assign_ExcAC8B_seve1); + assign_map.emplace("cim:ExcAC8B.seve2", &assign_ExcAC8B_seve2); + assign_map.emplace("cim:ExcAC8B.ta", &assign_ExcAC8B_ta); + assign_map.emplace("cim:ExcAC8B.tdr", &assign_ExcAC8B_tdr); + assign_map.emplace("cim:ExcAC8B.te", &assign_ExcAC8B_te); + assign_map.emplace("cim:ExcAC8B.telim", &assign_ExcAC8B_telim); + assign_map.emplace("cim:ExcAC8B.ve1", &assign_ExcAC8B_ve1); + assign_map.emplace("cim:ExcAC8B.ve2", &assign_ExcAC8B_ve2); + assign_map.emplace("cim:ExcAC8B.vemin", &assign_ExcAC8B_vemin); + assign_map.emplace("cim:ExcAC8B.vfemax", &assign_ExcAC8B_vfemax); + assign_map.emplace("cim:ExcAC8B.vimax", &assign_ExcAC8B_vimax); + assign_map.emplace("cim:ExcAC8B.vimin", &assign_ExcAC8B_vimin); + assign_map.emplace("cim:ExcAC8B.vpidmax", &assign_ExcAC8B_vpidmax); + assign_map.emplace("cim:ExcAC8B.vpidmin", &assign_ExcAC8B_vpidmin); + assign_map.emplace("cim:ExcAC8B.vrmax", &assign_ExcAC8B_vrmax); + assign_map.emplace("cim:ExcAC8B.vrmin", &assign_ExcAC8B_vrmin); + assign_map.emplace("cim:ExcAC8B.vtmult", &assign_ExcAC8B_vtmult); } void ExcAC8B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcAC8B.hpp b/CGMES_2.4.13_18DEC2013/ExcAC8B.hpp index 7594c550a..3137771da 100644 --- a/CGMES_2.4.13_18DEC2013/ExcAC8B.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcAC8B.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE AC8B alternator-supplied rectifier excitation system with speed input and input limiter. - */ + /** \brief Modified IEEE AC8B alternator-supplied rectifier excitation system with speed input and input limiter. */ class ExcAC8B : public ExcitationSystemDynamics { public: @@ -30,33 +28,86 @@ namespace CIMPP ExcAC8B(); ~ExcAC8B() override; - CIMPP::Boolean inlim; /* Input limiter indicator. true = input limiter Vimax and Vimin is considered false = input limiter Vimax and Vimin is not considered. Typical Value = true. Default: false */ - CIMPP::PU ka; /* Voltage regulator gain (Ka). Typical Value = 1. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.55. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (Kd). Typical Value = 1.1. Default: nullptr */ - CIMPP::PU kdr; /* Voltage regulator derivative gain (Kdr). Typical Value = 10. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ - CIMPP::PU kir; /* Voltage regulator integral gain (Kir). Typical Value = 5. Default: nullptr */ - CIMPP::PU kpr; /* Voltage regulator proportional gain (Kpr). Typical Value = 80. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ - CIMPP::Boolean pidlim; /* PID limiter indicator. true = input limiter Vpidmax and Vpidmin is considered false = input limiter Vpidmax and Vpidmin is not considered. Typical Value = true. Default: false */ - CIMPP::Simple_Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, Ve, back of commutating reactance (Se[Ve1]). Typical Value = 0.3. Default: nullptr */ - CIMPP::Simple_Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, Ve, back of commutating reactance (Se[Ve2]). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (Ta). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tdr; /* Lag time constant (Tdr). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 1.2. Default: nullptr */ - CIMPP::Boolean telim; /* Selector for the limiter on the block [1/sTe]. See diagram for meaning of true and false. Typical Value = false. Default: false */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve) equals V (Ve1). Typical Value = 6.5. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve). Typical Value = 9. Default: nullptr */ - CIMPP::PU vemin; /* Minimum exciter voltage output (Vemin). Typical Value = 0. Default: nullptr */ - CIMPP::PU vfemax; /* Exciter field current limit reference (Vfemax). Typical Value = 6. Default: nullptr */ - CIMPP::PU vimax; /* Input signal maximum (Vimax). Typical Value = 35. Default: nullptr */ - CIMPP::PU vimin; /* Input signal minimum (Vimin). Typical Value = -10. Default: nullptr */ - CIMPP::PU vpidmax; /* PID maximum controller output (Vpidmax). Typical Value = 35. Default: nullptr */ - CIMPP::PU vpidmin; /* PID minimum controller output (Vpidmin). Typical Value = -10. Default: nullptr */ - CIMPP::PU vrmax; /* Input signal maximum (Vimax). Typical Value = 35. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (Vrmin). Typical Value = 0. Default: nullptr */ - CIMPP::Boolean vtmult; /* Multiply by generator`s terminal voltage indicator. true =the limits Vrmax and Vrmin are multiplied by the generator`s terminal voltage to represent a thyristor power stage fed from the generator terminals false = limits are not multiplied by generator`s terminal voltage. Typical Value = false. Default: false */ + /** \brief Input limiter indicator. true = input limiter Vimax and Vimin is considered false = input limiter Vimax and Vimin is not considered. Typical Value = true. Default: false */ + CIMPP::Boolean inlim; + + /** \brief Voltage regulator gain (Ka). Typical Value = 1. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.55. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (Kd). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Voltage regulator derivative gain (Kdr). Typical Value = 10. Default: nullptr */ + CIMPP::PU kdr; + + /** \brief Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Voltage regulator integral gain (Kir). Typical Value = 5. Default: nullptr */ + CIMPP::PU kir; + + /** \brief Voltage regulator proportional gain (Kpr). Typical Value = 80. Default: nullptr */ + CIMPP::PU kpr; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief PID limiter indicator. true = input limiter Vpidmax and Vpidmin is considered false = input limiter Vpidmax and Vpidmin is not considered. Typical Value = true. Default: false */ + CIMPP::Boolean pidlim; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Ve, back of commutating reactance (Se[Ve1]). Typical Value = 0.3. Default: nullptr */ + CIMPP::Simple_Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Ve, back of commutating reactance (Se[Ve2]). Typical Value = 3. Default: nullptr */ + CIMPP::Simple_Float seve2; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Lag time constant (Tdr). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tdr; + + /** \brief Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 1.2. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Selector for the limiter on the block [1/sTe]. See diagram for meaning of true and false. Typical Value = false. Default: false */ + CIMPP::Boolean telim; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve) equals V (Ve1). Typical Value = 6.5. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve). Typical Value = 9. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Minimum exciter voltage output (Vemin). Typical Value = 0. Default: nullptr */ + CIMPP::PU vemin; + + /** \brief Exciter field current limit reference (Vfemax). Typical Value = 6. Default: nullptr */ + CIMPP::PU vfemax; + + /** \brief Input signal maximum (Vimax). Typical Value = 35. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Input signal minimum (Vimin). Typical Value = -10. Default: nullptr */ + CIMPP::PU vimin; + + /** \brief PID maximum controller output (Vpidmax). Typical Value = 35. Default: nullptr */ + CIMPP::PU vpidmax; + + /** \brief PID minimum controller output (Vpidmin). Typical Value = -10. Default: nullptr */ + CIMPP::PU vpidmin; + + /** \brief Input signal maximum (Vimax). Typical Value = 35. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (Vrmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief Multiply by generator`s terminal voltage indicator. true =the limits Vrmax and Vrmin are multiplied by the generator`s terminal voltage to represent a thyristor power stage fed from the generator terminals false = limits are not multiplied by generator`s terminal voltage. Typical Value = false. Default: false */ + CIMPP::Boolean vtmult; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcANS.cpp b/CGMES_2.4.13_18DEC2013/ExcANS.cpp index 47d299ea9..afc2cb7d6 100644 --- a/CGMES_2.4.13_18DEC2013/ExcANS.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcANS.cpp @@ -8,25 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Integer.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Integer.hpp" -#include "Integer.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcANS::ExcANS() {}; -ExcANS::~ExcANS() {}; +ExcANS::ExcANS() {} +ExcANS::~ExcANS() {} static const std::list PossibleProfilesForClass = { @@ -66,194 +52,206 @@ ExcANS::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcANS_blint(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_blint(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->blint; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_ifmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_ifmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ifmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_ifmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_ifmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ifmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_kce(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_kce(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kce; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_krvecc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_krvecc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->krvecc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_kvfif(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_kvfif(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kvfif; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_vrmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_vrmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_vrmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_vrmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcANS_blint(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->blint; if (!buffer.str().empty()) @@ -267,7 +265,8 @@ bool get_ExcANS_blint(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcANS_ifmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ifmn; if (!buffer.str().empty()) @@ -281,7 +280,8 @@ bool get_ExcANS_ifmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_ifmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ifmx; if (!buffer.str().empty()) @@ -295,7 +295,8 @@ bool get_ExcANS_ifmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -309,7 +310,8 @@ bool get_ExcANS_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -323,7 +325,8 @@ bool get_ExcANS_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_kce(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kce; if (!buffer.str().empty()) @@ -337,7 +340,8 @@ bool get_ExcANS_kce(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_krvecc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->krvecc; if (!buffer.str().empty()) @@ -351,7 +355,8 @@ bool get_ExcANS_krvecc(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcANS_kvfif(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kvfif; if (!buffer.str().empty()) @@ -365,7 +370,8 @@ bool get_ExcANS_kvfif(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcANS_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -379,7 +385,8 @@ bool get_ExcANS_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -393,7 +400,8 @@ bool get_ExcANS_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -407,7 +415,8 @@ bool get_ExcANS_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -421,7 +430,8 @@ bool get_ExcANS_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmn; if (!buffer.str().empty()) @@ -435,7 +445,8 @@ bool get_ExcANS_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmx; if (!buffer.str().empty()) @@ -447,8 +458,6 @@ bool get_ExcANS_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcANS::debugName[] = "ExcANS"; const char* ExcANS::debugString() const { @@ -457,25 +466,25 @@ const char* ExcANS::debugString() const void ExcANS::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcANS"), &ExcANS_factory)); + factory_map.emplace("cim:ExcANS", &ExcANS_factory); } void ExcANS::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcANS.blint"), &assign_ExcANS_blint)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.ifmn"), &assign_ExcANS_ifmn)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.ifmx"), &assign_ExcANS_ifmx)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.k2"), &assign_ExcANS_k2)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.k3"), &assign_ExcANS_k3)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.kce"), &assign_ExcANS_kce)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.krvecc"), &assign_ExcANS_krvecc)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.kvfif"), &assign_ExcANS_kvfif)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.t1"), &assign_ExcANS_t1)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.t2"), &assign_ExcANS_t2)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.t3"), &assign_ExcANS_t3)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.tb"), &assign_ExcANS_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.vrmn"), &assign_ExcANS_vrmn)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.vrmx"), &assign_ExcANS_vrmx)); + assign_map.emplace("cim:ExcANS.blint", &assign_ExcANS_blint); + assign_map.emplace("cim:ExcANS.ifmn", &assign_ExcANS_ifmn); + assign_map.emplace("cim:ExcANS.ifmx", &assign_ExcANS_ifmx); + assign_map.emplace("cim:ExcANS.k2", &assign_ExcANS_k2); + assign_map.emplace("cim:ExcANS.k3", &assign_ExcANS_k3); + assign_map.emplace("cim:ExcANS.kce", &assign_ExcANS_kce); + assign_map.emplace("cim:ExcANS.krvecc", &assign_ExcANS_krvecc); + assign_map.emplace("cim:ExcANS.kvfif", &assign_ExcANS_kvfif); + assign_map.emplace("cim:ExcANS.t1", &assign_ExcANS_t1); + assign_map.emplace("cim:ExcANS.t2", &assign_ExcANS_t2); + assign_map.emplace("cim:ExcANS.t3", &assign_ExcANS_t3); + assign_map.emplace("cim:ExcANS.tb", &assign_ExcANS_tb); + assign_map.emplace("cim:ExcANS.vrmn", &assign_ExcANS_vrmn); + assign_map.emplace("cim:ExcANS.vrmx", &assign_ExcANS_vrmx); } void ExcANS::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcANS.hpp b/CGMES_2.4.13_18DEC2013/ExcANS.hpp index f7070ce55..b1ba9b1be 100644 --- a/CGMES_2.4.13_18DEC2013/ExcANS.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcANS.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Italian excitation system. It represents static field voltage or excitation current feedback excitation system. - */ + /** \brief Italian excitation system. It represents static field voltage or excitation current feedback excitation system. */ class ExcANS : public ExcitationSystemDynamics { public: @@ -30,20 +28,47 @@ namespace CIMPP ExcANS(); ~ExcANS() override; - CIMPP::Integer blint; /* Governor Control Flag (BLINT). 0 = lead-lag regulator 1 = proportional integral regulator. Typical Value = 0. Default: 0 */ - CIMPP::PU ifmn; /* Minimum exciter current (I). Typical Value = -5.2. Default: nullptr */ - CIMPP::PU ifmx; /* Maximum exciter current (I). Typical Value = 6.5. Default: nullptr */ - CIMPP::Simple_Float k2; /* Exciter gain (K). Typical Value = 20. Default: nullptr */ - CIMPP::Simple_Float k3; /* AVR gain (K). Typical Value = 1000. Default: nullptr */ - CIMPP::Simple_Float kce; /* Ceiling factor (K). Typical Value = 1. Default: nullptr */ - CIMPP::Integer krvecc; /* Feedback enabling (K). 0 = Open loop control 1 = Closed loop control. Typical Value = 1. Default: 0 */ - CIMPP::Integer kvfif; /* Rate feedback signal flag (K). 0 = output voltage of the exciter 1 = exciter field current. Typical Value = 0. Default: 0 */ - CIMPP::Seconds t1; /* Time constant (T). Typical Value = 20. Default: nullptr */ - CIMPP::Seconds t2; /* Time constant (T). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds t3; /* Time constant (T). Typical Value = 1.6. Default: nullptr */ - CIMPP::Seconds tb; /* Exciter time constant (T). Typical Value = 0.04. Default: nullptr */ - CIMPP::PU vrmn; /* Maximum AVR output (V). Typical Value = -5.2. Default: nullptr */ - CIMPP::PU vrmx; /* Minimum AVR output (V). Typical Value = 6.5. Default: nullptr */ + /** \brief Governor Control Flag (BLINT). 0 = lead-lag regulator 1 = proportional integral regulator. Typical Value = 0. Default: 0 */ + CIMPP::Integer blint; + + /** \brief Minimum exciter current (I). Typical Value = -5.2. Default: nullptr */ + CIMPP::PU ifmn; + + /** \brief Maximum exciter current (I). Typical Value = 6.5. Default: nullptr */ + CIMPP::PU ifmx; + + /** \brief Exciter gain (K). Typical Value = 20. Default: nullptr */ + CIMPP::Simple_Float k2; + + /** \brief AVR gain (K). Typical Value = 1000. Default: nullptr */ + CIMPP::Simple_Float k3; + + /** \brief Ceiling factor (K). Typical Value = 1. Default: nullptr */ + CIMPP::Simple_Float kce; + + /** \brief Feedback enabling (K). 0 = Open loop control 1 = Closed loop control. Typical Value = 1. Default: 0 */ + CIMPP::Integer krvecc; + + /** \brief Rate feedback signal flag (K). 0 = output voltage of the exciter 1 = exciter field current. Typical Value = 0. Default: 0 */ + CIMPP::Integer kvfif; + + /** \brief Time constant (T). Typical Value = 20. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Time constant (T). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Time constant (T). Typical Value = 1.6. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Exciter time constant (T). Typical Value = 0.04. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Maximum AVR output (V). Typical Value = -5.2. Default: nullptr */ + CIMPP::PU vrmn; + + /** \brief Minimum AVR output (V). Typical Value = 6.5. Default: nullptr */ + CIMPP::PU vrmx; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcAVR1.cpp b/CGMES_2.4.13_18DEC2013/ExcAVR1.cpp index ebacbeeaa..3daf41454 100644 --- a/CGMES_2.4.13_18DEC2013/ExcAVR1.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcAVR1.cpp @@ -8,23 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAVR1::ExcAVR1() {}; -ExcAVR1::~ExcAVR1() {}; +ExcAVR1::ExcAVR1() {} +ExcAVR1::~ExcAVR1() {} static const std::list PossibleProfilesForClass = { @@ -62,168 +50,178 @@ ExcAVR1::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAVR1_e1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_e1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_e2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_e2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_se1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_se1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_se2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_se2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_vrmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_vrmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_vrmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_vrmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAVR1_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e1; if (!buffer.str().empty()) @@ -237,7 +235,8 @@ bool get_ExcAVR1_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e2; if (!buffer.str().empty()) @@ -251,7 +250,8 @@ bool get_ExcAVR1_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -265,7 +265,8 @@ bool get_ExcAVR1_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -279,7 +280,8 @@ bool get_ExcAVR1_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se1; if (!buffer.str().empty()) @@ -293,7 +295,8 @@ bool get_ExcAVR1_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se2; if (!buffer.str().empty()) @@ -307,7 +310,8 @@ bool get_ExcAVR1_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -321,7 +325,8 @@ bool get_ExcAVR1_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -335,7 +340,8 @@ bool get_ExcAVR1_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -349,7 +355,8 @@ bool get_ExcAVR1_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -363,7 +370,8 @@ bool get_ExcAVR1_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmn; if (!buffer.str().empty()) @@ -377,7 +385,8 @@ bool get_ExcAVR1_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAVR1_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmx; if (!buffer.str().empty()) @@ -389,8 +398,6 @@ bool get_ExcAVR1_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char ExcAVR1::debugName[] = "ExcAVR1"; const char* ExcAVR1::debugString() const { @@ -399,23 +406,23 @@ const char* ExcAVR1::debugString() const void ExcAVR1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAVR1"), &ExcAVR1_factory)); + factory_map.emplace("cim:ExcAVR1", &ExcAVR1_factory); } void ExcAVR1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.e1"), &assign_ExcAVR1_e1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.e2"), &assign_ExcAVR1_e2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.ka"), &assign_ExcAVR1_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.kf"), &assign_ExcAVR1_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.se1"), &assign_ExcAVR1_se1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.se2"), &assign_ExcAVR1_se2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.ta"), &assign_ExcAVR1_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.tb"), &assign_ExcAVR1_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.te"), &assign_ExcAVR1_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.tf"), &assign_ExcAVR1_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.vrmn"), &assign_ExcAVR1_vrmn)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.vrmx"), &assign_ExcAVR1_vrmx)); + assign_map.emplace("cim:ExcAVR1.e1", &assign_ExcAVR1_e1); + assign_map.emplace("cim:ExcAVR1.e2", &assign_ExcAVR1_e2); + assign_map.emplace("cim:ExcAVR1.ka", &assign_ExcAVR1_ka); + assign_map.emplace("cim:ExcAVR1.kf", &assign_ExcAVR1_kf); + assign_map.emplace("cim:ExcAVR1.se1", &assign_ExcAVR1_se1); + assign_map.emplace("cim:ExcAVR1.se2", &assign_ExcAVR1_se2); + assign_map.emplace("cim:ExcAVR1.ta", &assign_ExcAVR1_ta); + assign_map.emplace("cim:ExcAVR1.tb", &assign_ExcAVR1_tb); + assign_map.emplace("cim:ExcAVR1.te", &assign_ExcAVR1_te); + assign_map.emplace("cim:ExcAVR1.tf", &assign_ExcAVR1_tf); + assign_map.emplace("cim:ExcAVR1.vrmn", &assign_ExcAVR1_vrmn); + assign_map.emplace("cim:ExcAVR1.vrmx", &assign_ExcAVR1_vrmx); } void ExcAVR1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcAVR1.hpp b/CGMES_2.4.13_18DEC2013/ExcAVR1.hpp index 7362bd560..867d7920d 100644 --- a/CGMES_2.4.13_18DEC2013/ExcAVR1.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcAVR1.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Italian excitation system corresponding to IEEE (1968) Type 1 Model. It represents exciter dynamo and electromechanical regulator. - */ + /** \brief Italian excitation system corresponding to IEEE (1968) Type 1 Model. It represents exciter dynamo and electromechanical regulator. */ class ExcAVR1 : public ExcitationSystemDynamics { public: @@ -29,18 +27,41 @@ namespace CIMPP ExcAVR1(); ~ExcAVR1() override; - CIMPP::PU e1; /* Field voltage value 1 (E1). Typical Value = 4.18. Default: nullptr */ - CIMPP::PU e2; /* Field voltage value 2 (E2). Typical Value = 3.14. Default: nullptr */ - CIMPP::Simple_Float ka; /* AVR gain (K). Typical Value = 500. Default: nullptr */ - CIMPP::Simple_Float kf; /* Rate feedback gain (K). Typical Value = 0.02. Default: nullptr */ - CIMPP::Simple_Float se1; /* Saturation factor at E1 (S(E1)). Typical Value = 0.1. Default: nullptr */ - CIMPP::Simple_Float se2; /* Saturation factor at E2 (S(E2)). Typical Value = 0.03. Default: nullptr */ - CIMPP::Seconds ta; /* AVR time constant (T). Typical Value = 0.2. Default: nullptr */ - CIMPP::Seconds tb; /* AVR time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tf; /* Rate feedback time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmn; /* Maximum AVR output (V). Typical Value = -6. Default: nullptr */ - CIMPP::PU vrmx; /* Minimum AVR output (V). Typical Value = 7. Default: nullptr */ + /** \brief Field voltage value 1 (E1). Typical Value = 4.18. Default: nullptr */ + CIMPP::PU e1; + + /** \brief Field voltage value 2 (E2). Typical Value = 3.14. Default: nullptr */ + CIMPP::PU e2; + + /** \brief AVR gain (K). Typical Value = 500. Default: nullptr */ + CIMPP::Simple_Float ka; + + /** \brief Rate feedback gain (K). Typical Value = 0.02. Default: nullptr */ + CIMPP::Simple_Float kf; + + /** \brief Saturation factor at E1 (S(E1)). Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float se1; + + /** \brief Saturation factor at E2 (S(E2)). Typical Value = 0.03. Default: nullptr */ + CIMPP::Simple_Float se2; + + /** \brief AVR time constant (T). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief AVR time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Exciter time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Rate feedback time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum AVR output (V). Typical Value = -6. Default: nullptr */ + CIMPP::PU vrmn; + + /** \brief Minimum AVR output (V). Typical Value = 7. Default: nullptr */ + CIMPP::PU vrmx; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcAVR2.cpp b/CGMES_2.4.13_18DEC2013/ExcAVR2.cpp index 8c06474e9..c9f8d13de 100644 --- a/CGMES_2.4.13_18DEC2013/ExcAVR2.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcAVR2.cpp @@ -8,24 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAVR2::ExcAVR2() {}; -ExcAVR2::~ExcAVR2() {}; +ExcAVR2::ExcAVR2() {} +ExcAVR2::~ExcAVR2() {} static const std::list PossibleProfilesForClass = { @@ -64,181 +51,192 @@ ExcAVR2::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAVR2_e1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_e1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_e2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_e2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_se1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_se1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_se2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_se2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_tf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_tf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_vrmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_vrmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_vrmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_vrmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAVR2_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e1; if (!buffer.str().empty()) @@ -252,7 +250,8 @@ bool get_ExcAVR2_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e2; if (!buffer.str().empty()) @@ -266,7 +265,8 @@ bool get_ExcAVR2_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -280,7 +280,8 @@ bool get_ExcAVR2_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -294,7 +295,8 @@ bool get_ExcAVR2_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se1; if (!buffer.str().empty()) @@ -308,7 +310,8 @@ bool get_ExcAVR2_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se2; if (!buffer.str().empty()) @@ -322,7 +325,8 @@ bool get_ExcAVR2_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -336,7 +340,8 @@ bool get_ExcAVR2_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -350,7 +355,8 @@ bool get_ExcAVR2_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -364,7 +370,8 @@ bool get_ExcAVR2_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf1; if (!buffer.str().empty()) @@ -378,7 +385,8 @@ bool get_ExcAVR2_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf2; if (!buffer.str().empty()) @@ -392,7 +400,8 @@ bool get_ExcAVR2_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmn; if (!buffer.str().empty()) @@ -406,7 +415,8 @@ bool get_ExcAVR2_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAVR2_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmx; if (!buffer.str().empty()) @@ -418,8 +428,6 @@ bool get_ExcAVR2_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char ExcAVR2::debugName[] = "ExcAVR2"; const char* ExcAVR2::debugString() const { @@ -428,24 +436,24 @@ const char* ExcAVR2::debugString() const void ExcAVR2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAVR2"), &ExcAVR2_factory)); + factory_map.emplace("cim:ExcAVR2", &ExcAVR2_factory); } void ExcAVR2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.e1"), &assign_ExcAVR2_e1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.e2"), &assign_ExcAVR2_e2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.ka"), &assign_ExcAVR2_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.kf"), &assign_ExcAVR2_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.se1"), &assign_ExcAVR2_se1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.se2"), &assign_ExcAVR2_se2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.ta"), &assign_ExcAVR2_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.tb"), &assign_ExcAVR2_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.te"), &assign_ExcAVR2_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.tf1"), &assign_ExcAVR2_tf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.tf2"), &assign_ExcAVR2_tf2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.vrmn"), &assign_ExcAVR2_vrmn)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.vrmx"), &assign_ExcAVR2_vrmx)); + assign_map.emplace("cim:ExcAVR2.e1", &assign_ExcAVR2_e1); + assign_map.emplace("cim:ExcAVR2.e2", &assign_ExcAVR2_e2); + assign_map.emplace("cim:ExcAVR2.ka", &assign_ExcAVR2_ka); + assign_map.emplace("cim:ExcAVR2.kf", &assign_ExcAVR2_kf); + assign_map.emplace("cim:ExcAVR2.se1", &assign_ExcAVR2_se1); + assign_map.emplace("cim:ExcAVR2.se2", &assign_ExcAVR2_se2); + assign_map.emplace("cim:ExcAVR2.ta", &assign_ExcAVR2_ta); + assign_map.emplace("cim:ExcAVR2.tb", &assign_ExcAVR2_tb); + assign_map.emplace("cim:ExcAVR2.te", &assign_ExcAVR2_te); + assign_map.emplace("cim:ExcAVR2.tf1", &assign_ExcAVR2_tf1); + assign_map.emplace("cim:ExcAVR2.tf2", &assign_ExcAVR2_tf2); + assign_map.emplace("cim:ExcAVR2.vrmn", &assign_ExcAVR2_vrmn); + assign_map.emplace("cim:ExcAVR2.vrmx", &assign_ExcAVR2_vrmx); } void ExcAVR2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcAVR2.hpp b/CGMES_2.4.13_18DEC2013/ExcAVR2.hpp index 7cbf8178f..4ef10bee6 100644 --- a/CGMES_2.4.13_18DEC2013/ExcAVR2.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcAVR2.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Italian excitation system corresponding to IEEE (1968) Type 2 Model. It represents alternator and rotating diodes and electromechanic voltage regulators. - */ + /** \brief Italian excitation system corresponding to IEEE (1968) Type 2 Model. It represents alternator and rotating diodes and electromechanic voltage regulators. */ class ExcAVR2 : public ExcitationSystemDynamics { public: @@ -29,19 +27,44 @@ namespace CIMPP ExcAVR2(); ~ExcAVR2() override; - CIMPP::PU e1; /* Field voltage value 1 (E1). Typical Value = 4.18. Default: nullptr */ - CIMPP::PU e2; /* Field voltage value 2 (E2). Typical Value = 3.14. Default: nullptr */ - CIMPP::Simple_Float ka; /* AVR gain (K). Typical Value = 500. Default: nullptr */ - CIMPP::Simple_Float kf; /* Rate feedback gain (K). Typical Value = 0.02. Default: nullptr */ - CIMPP::Simple_Float se1; /* Saturation factor at E1 (S(E1)). Typical Value = 0.1. Default: nullptr */ - CIMPP::Simple_Float se2; /* Saturation factor at E2 (S(E2)). Typical Value = 0.03. Default: nullptr */ - CIMPP::Seconds ta; /* AVR time constant (T). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds tb; /* AVR time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tf1; /* Rate feedback time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tf2; /* Rate feedback time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmn; /* Maximum AVR output (V). Typical Value = -6. Default: nullptr */ - CIMPP::PU vrmx; /* Minimum AVR output (V). Typical Value = 7. Default: nullptr */ + /** \brief Field voltage value 1 (E1). Typical Value = 4.18. Default: nullptr */ + CIMPP::PU e1; + + /** \brief Field voltage value 2 (E2). Typical Value = 3.14. Default: nullptr */ + CIMPP::PU e2; + + /** \brief AVR gain (K). Typical Value = 500. Default: nullptr */ + CIMPP::Simple_Float ka; + + /** \brief Rate feedback gain (K). Typical Value = 0.02. Default: nullptr */ + CIMPP::Simple_Float kf; + + /** \brief Saturation factor at E1 (S(E1)). Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float se1; + + /** \brief Saturation factor at E2 (S(E2)). Typical Value = 0.03. Default: nullptr */ + CIMPP::Simple_Float se2; + + /** \brief AVR time constant (T). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief AVR time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Exciter time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Rate feedback time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf1; + + /** \brief Rate feedback time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf2; + + /** \brief Maximum AVR output (V). Typical Value = -6. Default: nullptr */ + CIMPP::PU vrmn; + + /** \brief Minimum AVR output (V). Typical Value = 7. Default: nullptr */ + CIMPP::PU vrmx; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcAVR3.cpp b/CGMES_2.4.13_18DEC2013/ExcAVR3.cpp index 00da9f06e..a58bdda7d 100644 --- a/CGMES_2.4.13_18DEC2013/ExcAVR3.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcAVR3.cpp @@ -8,23 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAVR3::ExcAVR3() {}; -ExcAVR3::~ExcAVR3() {}; +ExcAVR3::ExcAVR3() {} +ExcAVR3::~ExcAVR3() {} static const std::list PossibleProfilesForClass = { @@ -62,168 +50,178 @@ ExcAVR3::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAVR3_e1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_e1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_e2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_e2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_se1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_se1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_se2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_se2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_vrmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_vrmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_vrmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_vrmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAVR3_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e1; if (!buffer.str().empty()) @@ -237,7 +235,8 @@ bool get_ExcAVR3_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e2; if (!buffer.str().empty()) @@ -251,7 +250,8 @@ bool get_ExcAVR3_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -265,7 +265,8 @@ bool get_ExcAVR3_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se1; if (!buffer.str().empty()) @@ -279,7 +280,8 @@ bool get_ExcAVR3_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se2; if (!buffer.str().empty()) @@ -293,7 +295,8 @@ bool get_ExcAVR3_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -307,7 +310,8 @@ bool get_ExcAVR3_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -321,7 +325,8 @@ bool get_ExcAVR3_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -335,7 +340,8 @@ bool get_ExcAVR3_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -349,7 +355,8 @@ bool get_ExcAVR3_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -363,7 +370,8 @@ bool get_ExcAVR3_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmn; if (!buffer.str().empty()) @@ -377,7 +385,8 @@ bool get_ExcAVR3_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAVR3_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmx; if (!buffer.str().empty()) @@ -389,8 +398,6 @@ bool get_ExcAVR3_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char ExcAVR3::debugName[] = "ExcAVR3"; const char* ExcAVR3::debugString() const { @@ -399,23 +406,23 @@ const char* ExcAVR3::debugString() const void ExcAVR3::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAVR3"), &ExcAVR3_factory)); + factory_map.emplace("cim:ExcAVR3", &ExcAVR3_factory); } void ExcAVR3::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.e1"), &assign_ExcAVR3_e1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.e2"), &assign_ExcAVR3_e2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.ka"), &assign_ExcAVR3_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.se1"), &assign_ExcAVR3_se1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.se2"), &assign_ExcAVR3_se2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.t1"), &assign_ExcAVR3_t1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.t2"), &assign_ExcAVR3_t2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.t3"), &assign_ExcAVR3_t3)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.t4"), &assign_ExcAVR3_t4)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.te"), &assign_ExcAVR3_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.vrmn"), &assign_ExcAVR3_vrmn)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.vrmx"), &assign_ExcAVR3_vrmx)); + assign_map.emplace("cim:ExcAVR3.e1", &assign_ExcAVR3_e1); + assign_map.emplace("cim:ExcAVR3.e2", &assign_ExcAVR3_e2); + assign_map.emplace("cim:ExcAVR3.ka", &assign_ExcAVR3_ka); + assign_map.emplace("cim:ExcAVR3.se1", &assign_ExcAVR3_se1); + assign_map.emplace("cim:ExcAVR3.se2", &assign_ExcAVR3_se2); + assign_map.emplace("cim:ExcAVR3.t1", &assign_ExcAVR3_t1); + assign_map.emplace("cim:ExcAVR3.t2", &assign_ExcAVR3_t2); + assign_map.emplace("cim:ExcAVR3.t3", &assign_ExcAVR3_t3); + assign_map.emplace("cim:ExcAVR3.t4", &assign_ExcAVR3_t4); + assign_map.emplace("cim:ExcAVR3.te", &assign_ExcAVR3_te); + assign_map.emplace("cim:ExcAVR3.vrmn", &assign_ExcAVR3_vrmn); + assign_map.emplace("cim:ExcAVR3.vrmx", &assign_ExcAVR3_vrmx); } void ExcAVR3::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcAVR3.hpp b/CGMES_2.4.13_18DEC2013/ExcAVR3.hpp index 6fe6dbd5a..9e24fc4b5 100644 --- a/CGMES_2.4.13_18DEC2013/ExcAVR3.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcAVR3.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Italian excitation system. It represents exciter dynamo and electric regulator. - */ + /** \brief Italian excitation system. It represents exciter dynamo and electric regulator. */ class ExcAVR3 : public ExcitationSystemDynamics { public: @@ -29,18 +27,41 @@ namespace CIMPP ExcAVR3(); ~ExcAVR3() override; - CIMPP::PU e1; /* Field voltage value 1 (E1). Typical Value = 4.18. Default: nullptr */ - CIMPP::PU e2; /* Field voltage value 2 (E2). Typical Value = 3.14. Default: nullptr */ - CIMPP::Simple_Float ka; /* AVR gain (K). Typical Value = 3000. Default: nullptr */ - CIMPP::Simple_Float se1; /* Saturation factor at E1 (S(E1)). Typical Value = 0.1. Default: nullptr */ - CIMPP::Simple_Float se2; /* Saturation factor at E2 (S(E2)). Typical Value = 0.03. Default: nullptr */ - CIMPP::Seconds t1; /* AVR time constant (T). Typical Value = 220. Default: nullptr */ - CIMPP::Seconds t2; /* AVR time constant (T). Typical Value = 1.6. Default: nullptr */ - CIMPP::Seconds t3; /* AVR time constant (T). Typical Value = 0.66. Default: nullptr */ - CIMPP::Seconds t4; /* AVR time constant (T). Typical Value = 0.07. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmn; /* Maximum AVR output (V). Typical Value = -7.5. Default: nullptr */ - CIMPP::PU vrmx; /* Minimum AVR output (V). Typical Value = 7.5. Default: nullptr */ + /** \brief Field voltage value 1 (E1). Typical Value = 4.18. Default: nullptr */ + CIMPP::PU e1; + + /** \brief Field voltage value 2 (E2). Typical Value = 3.14. Default: nullptr */ + CIMPP::PU e2; + + /** \brief AVR gain (K). Typical Value = 3000. Default: nullptr */ + CIMPP::Simple_Float ka; + + /** \brief Saturation factor at E1 (S(E1)). Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float se1; + + /** \brief Saturation factor at E2 (S(E2)). Typical Value = 0.03. Default: nullptr */ + CIMPP::Simple_Float se2; + + /** \brief AVR time constant (T). Typical Value = 220. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief AVR time constant (T). Typical Value = 1.6. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief AVR time constant (T). Typical Value = 0.66. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief AVR time constant (T). Typical Value = 0.07. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Exciter time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Maximum AVR output (V). Typical Value = -7.5. Default: nullptr */ + CIMPP::PU vrmn; + + /** \brief Minimum AVR output (V). Typical Value = 7.5. Default: nullptr */ + CIMPP::PU vrmx; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcAVR4.cpp b/CGMES_2.4.13_18DEC2013/ExcAVR4.cpp index a48063509..52fd9e5cd 100644 --- a/CGMES_2.4.13_18DEC2013/ExcAVR4.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcAVR4.cpp @@ -8,25 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAVR4::ExcAVR4() {}; -ExcAVR4::~ExcAVR4() {}; +ExcAVR4::ExcAVR4() {} +ExcAVR4::~ExcAVR4() {} static const std::list PossibleProfilesForClass = { @@ -66,194 +52,206 @@ ExcAVR4::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAVR4_imul(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_imul(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->imul; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_kif(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_kif(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kif; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_t1if(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_t1if(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1if; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_tif(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_tif(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tif; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_vfmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_vfmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_vfmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_vfmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_vrmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_vrmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_vrmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_vrmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAVR4_imul(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->imul; if (!buffer.str().empty()) @@ -267,7 +265,8 @@ bool get_ExcAVR4_imul(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAVR4_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -281,7 +280,8 @@ bool get_ExcAVR4_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR4_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -295,7 +295,8 @@ bool get_ExcAVR4_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR4_kif(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kif; if (!buffer.str().empty()) @@ -309,7 +310,8 @@ bool get_ExcAVR4_kif(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR4_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -323,7 +325,8 @@ bool get_ExcAVR4_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR4_t1if(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1if; if (!buffer.str().empty()) @@ -337,7 +340,8 @@ bool get_ExcAVR4_t1if(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAVR4_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -351,7 +355,8 @@ bool get_ExcAVR4_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR4_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -365,7 +370,8 @@ bool get_ExcAVR4_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR4_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -379,7 +385,8 @@ bool get_ExcAVR4_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR4_tif(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tif; if (!buffer.str().empty()) @@ -393,7 +400,8 @@ bool get_ExcAVR4_tif(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR4_vfmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfmn; if (!buffer.str().empty()) @@ -407,7 +415,8 @@ bool get_ExcAVR4_vfmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAVR4_vfmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfmx; if (!buffer.str().empty()) @@ -421,7 +430,8 @@ bool get_ExcAVR4_vfmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAVR4_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmn; if (!buffer.str().empty()) @@ -435,7 +445,8 @@ bool get_ExcAVR4_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAVR4_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmx; if (!buffer.str().empty()) @@ -447,8 +458,6 @@ bool get_ExcAVR4_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char ExcAVR4::debugName[] = "ExcAVR4"; const char* ExcAVR4::debugString() const { @@ -457,25 +466,25 @@ const char* ExcAVR4::debugString() const void ExcAVR4::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAVR4"), &ExcAVR4_factory)); + factory_map.emplace("cim:ExcAVR4", &ExcAVR4_factory); } void ExcAVR4::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.imul"), &assign_ExcAVR4_imul)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.ka"), &assign_ExcAVR4_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.ke"), &assign_ExcAVR4_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.kif"), &assign_ExcAVR4_kif)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.t1"), &assign_ExcAVR4_t1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.t1if"), &assign_ExcAVR4_t1if)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.t2"), &assign_ExcAVR4_t2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.t3"), &assign_ExcAVR4_t3)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.t4"), &assign_ExcAVR4_t4)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.tif"), &assign_ExcAVR4_tif)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.vfmn"), &assign_ExcAVR4_vfmn)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.vfmx"), &assign_ExcAVR4_vfmx)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.vrmn"), &assign_ExcAVR4_vrmn)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.vrmx"), &assign_ExcAVR4_vrmx)); + assign_map.emplace("cim:ExcAVR4.imul", &assign_ExcAVR4_imul); + assign_map.emplace("cim:ExcAVR4.ka", &assign_ExcAVR4_ka); + assign_map.emplace("cim:ExcAVR4.ke", &assign_ExcAVR4_ke); + assign_map.emplace("cim:ExcAVR4.kif", &assign_ExcAVR4_kif); + assign_map.emplace("cim:ExcAVR4.t1", &assign_ExcAVR4_t1); + assign_map.emplace("cim:ExcAVR4.t1if", &assign_ExcAVR4_t1if); + assign_map.emplace("cim:ExcAVR4.t2", &assign_ExcAVR4_t2); + assign_map.emplace("cim:ExcAVR4.t3", &assign_ExcAVR4_t3); + assign_map.emplace("cim:ExcAVR4.t4", &assign_ExcAVR4_t4); + assign_map.emplace("cim:ExcAVR4.tif", &assign_ExcAVR4_tif); + assign_map.emplace("cim:ExcAVR4.vfmn", &assign_ExcAVR4_vfmn); + assign_map.emplace("cim:ExcAVR4.vfmx", &assign_ExcAVR4_vfmx); + assign_map.emplace("cim:ExcAVR4.vrmn", &assign_ExcAVR4_vrmn); + assign_map.emplace("cim:ExcAVR4.vrmx", &assign_ExcAVR4_vrmx); } void ExcAVR4::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcAVR4.hpp b/CGMES_2.4.13_18DEC2013/ExcAVR4.hpp index c1d41dcdd..f77d11a15 100644 --- a/CGMES_2.4.13_18DEC2013/ExcAVR4.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcAVR4.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Italian excitation system. It represents static exciter and electric voltage regulator. - */ + /** \brief Italian excitation system. It represents static exciter and electric voltage regulator. */ class ExcAVR4 : public ExcitationSystemDynamics { public: @@ -30,20 +28,47 @@ namespace CIMPP ExcAVR4(); ~ExcAVR4() override; - CIMPP::Boolean imul; /* AVR output voltage dependency selector (Imul). true = selector is connected false = selector is not connected. Typical Value = true. Default: false */ - CIMPP::Simple_Float ka; /* AVR gain (K). Typical Value = 300. Default: nullptr */ - CIMPP::Simple_Float ke; /* Exciter gain (K). Typical Value = 1. Default: nullptr */ - CIMPP::Simple_Float kif; /* Exciter internal reactance (K). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t1; /* AVR time constant (T). Typical Value = 4.8. Default: nullptr */ - CIMPP::Seconds t1if; /* Exciter current feedback time constant (T). Typical Value = 60. Default: nullptr */ - CIMPP::Seconds t2; /* AVR time constant (T). Typical Value = 1.5. Default: nullptr */ - CIMPP::Seconds t3; /* AVR time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t4; /* AVR time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tif; /* Exciter current feedback time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::PU vfmn; /* Minimum exciter output (V). Typical Value = 0. Default: nullptr */ - CIMPP::PU vfmx; /* Maximum exciter output (V). Typical Value = 5. Default: nullptr */ - CIMPP::PU vrmn; /* Maximum AVR output (V). Typical Value = 0. Default: nullptr */ - CIMPP::PU vrmx; /* Minimum AVR output (V). Typical Value = 5. Default: nullptr */ + /** \brief AVR output voltage dependency selector (Imul). true = selector is connected false = selector is not connected. Typical Value = true. Default: false */ + CIMPP::Boolean imul; + + /** \brief AVR gain (K). Typical Value = 300. Default: nullptr */ + CIMPP::Simple_Float ka; + + /** \brief Exciter gain (K). Typical Value = 1. Default: nullptr */ + CIMPP::Simple_Float ke; + + /** \brief Exciter internal reactance (K). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float kif; + + /** \brief AVR time constant (T). Typical Value = 4.8. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Exciter current feedback time constant (T). Typical Value = 60. Default: nullptr */ + CIMPP::Seconds t1if; + + /** \brief AVR time constant (T). Typical Value = 1.5. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief AVR time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief AVR time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Exciter current feedback time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tif; + + /** \brief Minimum exciter output (V). Typical Value = 0. Default: nullptr */ + CIMPP::PU vfmn; + + /** \brief Maximum exciter output (V). Typical Value = 5. Default: nullptr */ + CIMPP::PU vfmx; + + /** \brief Maximum AVR output (V). Typical Value = 0. Default: nullptr */ + CIMPP::PU vrmn; + + /** \brief Minimum AVR output (V). Typical Value = 5. Default: nullptr */ + CIMPP::PU vrmx; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcAVR5.cpp b/CGMES_2.4.13_18DEC2013/ExcAVR5.cpp index 5cca6e163..3f6eb23fe 100644 --- a/CGMES_2.4.13_18DEC2013/ExcAVR5.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcAVR5.cpp @@ -8,14 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" using namespace CIMPP; -ExcAVR5::ExcAVR5() {}; -ExcAVR5::~ExcAVR5() {}; +ExcAVR5::ExcAVR5() {} +ExcAVR5::~ExcAVR5() {} static const std::list PossibleProfilesForClass = { @@ -44,51 +41,52 @@ ExcAVR5::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAVR5_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR5_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR5* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR5_rex(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR5_rex(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR5* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rex; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR5_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR5_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR5* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAVR5_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR5* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -102,7 +100,8 @@ bool get_ExcAVR5_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR5_rex(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR5* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rex; if (!buffer.str().empty()) @@ -116,7 +115,8 @@ bool get_ExcAVR5_rex(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR5_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR5* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -128,8 +128,6 @@ bool get_ExcAVR5_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcAVR5::debugName[] = "ExcAVR5"; const char* ExcAVR5::debugString() const { @@ -138,14 +136,14 @@ const char* ExcAVR5::debugString() const void ExcAVR5::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAVR5"), &ExcAVR5_factory)); + factory_map.emplace("cim:ExcAVR5", &ExcAVR5_factory); } void ExcAVR5::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAVR5.ka"), &assign_ExcAVR5_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR5.rex"), &assign_ExcAVR5_rex)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR5.ta"), &assign_ExcAVR5_ta)); + assign_map.emplace("cim:ExcAVR5.ka", &assign_ExcAVR5_ka); + assign_map.emplace("cim:ExcAVR5.rex", &assign_ExcAVR5_rex); + assign_map.emplace("cim:ExcAVR5.ta", &assign_ExcAVR5_ta); } void ExcAVR5::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcAVR5.hpp b/CGMES_2.4.13_18DEC2013/ExcAVR5.hpp index 82afdab11..ddd53d379 100644 --- a/CGMES_2.4.13_18DEC2013/ExcAVR5.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcAVR5.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Manual excitation control with field circuit resistance. This model can be used as a very simple representation of manual voltage control. - */ + /** \brief Manual excitation control with field circuit resistance. This model can be used as a very simple representation of manual voltage control. */ class ExcAVR5 : public ExcitationSystemDynamics { public: @@ -28,9 +26,14 @@ namespace CIMPP ExcAVR5(); ~ExcAVR5() override; - CIMPP::PU ka; /* Gain (Ka). Default: nullptr */ - CIMPP::PU rex; /* Effective Output Resistance (Rex). Rex represents the effective output resistance seen by the excitation system. Default: nullptr */ - CIMPP::Seconds ta; /* Time constant (Ta). Default: nullptr */ + /** \brief Gain (Ka). Default: nullptr */ + CIMPP::PU ka; + + /** \brief Effective Output Resistance (Rex). Rex represents the effective output resistance seen by the excitation system. Default: nullptr */ + CIMPP::PU rex; + + /** \brief Time constant (Ta). Default: nullptr */ + CIMPP::Seconds ta; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcAVR7.cpp b/CGMES_2.4.13_18DEC2013/ExcAVR7.cpp index 0ce874327..3568b24b1 100644 --- a/CGMES_2.4.13_18DEC2013/ExcAVR7.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcAVR7.cpp @@ -8,32 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAVR7::ExcAVR7() {}; -ExcAVR7::~ExcAVR7() {}; +ExcAVR7::ExcAVR7() {} +ExcAVR7::~ExcAVR7() {} static const std::list PossibleProfilesForClass = { @@ -80,285 +59,304 @@ ExcAVR7::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAVR7_a1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_a1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_a2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_a2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_a3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_a3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_a4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_a4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_a5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_a5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_a6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_a6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_k5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_k5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_vmax1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_vmax1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_vmax3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_vmax3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_vmax5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_vmax5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_vmin1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_vmin1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_vmin3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_vmin3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_vmin5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_vmin5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAVR7_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a1; if (!buffer.str().empty()) @@ -372,7 +370,8 @@ bool get_ExcAVR7_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a2; if (!buffer.str().empty()) @@ -386,7 +385,8 @@ bool get_ExcAVR7_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_a3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a3; if (!buffer.str().empty()) @@ -400,7 +400,8 @@ bool get_ExcAVR7_a3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_a4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a4; if (!buffer.str().empty()) @@ -414,7 +415,8 @@ bool get_ExcAVR7_a4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_a5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a5; if (!buffer.str().empty()) @@ -428,7 +430,8 @@ bool get_ExcAVR7_a5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_a6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a6; if (!buffer.str().empty()) @@ -442,7 +445,8 @@ bool get_ExcAVR7_a6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -456,7 +460,8 @@ bool get_ExcAVR7_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -470,7 +475,8 @@ bool get_ExcAVR7_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k5; if (!buffer.str().empty()) @@ -484,7 +490,8 @@ bool get_ExcAVR7_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -498,7 +505,8 @@ bool get_ExcAVR7_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -512,7 +520,8 @@ bool get_ExcAVR7_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -526,7 +535,8 @@ bool get_ExcAVR7_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -540,7 +550,8 @@ bool get_ExcAVR7_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -554,7 +565,8 @@ bool get_ExcAVR7_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -568,7 +580,8 @@ bool get_ExcAVR7_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_vmax1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmax1; if (!buffer.str().empty()) @@ -582,7 +595,8 @@ bool get_ExcAVR7_vmax1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAVR7_vmax3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmax3; if (!buffer.str().empty()) @@ -596,7 +610,8 @@ bool get_ExcAVR7_vmax3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAVR7_vmax5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmax5; if (!buffer.str().empty()) @@ -610,7 +625,8 @@ bool get_ExcAVR7_vmax5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAVR7_vmin1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmin1; if (!buffer.str().empty()) @@ -624,7 +640,8 @@ bool get_ExcAVR7_vmin1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAVR7_vmin3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmin3; if (!buffer.str().empty()) @@ -638,7 +655,8 @@ bool get_ExcAVR7_vmin3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAVR7_vmin5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmin5; if (!buffer.str().empty()) @@ -650,8 +668,6 @@ bool get_ExcAVR7_vmin5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcAVR7::debugName[] = "ExcAVR7"; const char* ExcAVR7::debugString() const { @@ -660,32 +676,32 @@ const char* ExcAVR7::debugString() const void ExcAVR7::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAVR7"), &ExcAVR7_factory)); + factory_map.emplace("cim:ExcAVR7", &ExcAVR7_factory); } void ExcAVR7::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.a1"), &assign_ExcAVR7_a1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.a2"), &assign_ExcAVR7_a2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.a3"), &assign_ExcAVR7_a3)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.a4"), &assign_ExcAVR7_a4)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.a5"), &assign_ExcAVR7_a5)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.a6"), &assign_ExcAVR7_a6)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.k1"), &assign_ExcAVR7_k1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.k3"), &assign_ExcAVR7_k3)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.k5"), &assign_ExcAVR7_k5)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.t1"), &assign_ExcAVR7_t1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.t2"), &assign_ExcAVR7_t2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.t3"), &assign_ExcAVR7_t3)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.t4"), &assign_ExcAVR7_t4)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.t5"), &assign_ExcAVR7_t5)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.t6"), &assign_ExcAVR7_t6)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.vmax1"), &assign_ExcAVR7_vmax1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.vmax3"), &assign_ExcAVR7_vmax3)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.vmax5"), &assign_ExcAVR7_vmax5)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.vmin1"), &assign_ExcAVR7_vmin1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.vmin3"), &assign_ExcAVR7_vmin3)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.vmin5"), &assign_ExcAVR7_vmin5)); + assign_map.emplace("cim:ExcAVR7.a1", &assign_ExcAVR7_a1); + assign_map.emplace("cim:ExcAVR7.a2", &assign_ExcAVR7_a2); + assign_map.emplace("cim:ExcAVR7.a3", &assign_ExcAVR7_a3); + assign_map.emplace("cim:ExcAVR7.a4", &assign_ExcAVR7_a4); + assign_map.emplace("cim:ExcAVR7.a5", &assign_ExcAVR7_a5); + assign_map.emplace("cim:ExcAVR7.a6", &assign_ExcAVR7_a6); + assign_map.emplace("cim:ExcAVR7.k1", &assign_ExcAVR7_k1); + assign_map.emplace("cim:ExcAVR7.k3", &assign_ExcAVR7_k3); + assign_map.emplace("cim:ExcAVR7.k5", &assign_ExcAVR7_k5); + assign_map.emplace("cim:ExcAVR7.t1", &assign_ExcAVR7_t1); + assign_map.emplace("cim:ExcAVR7.t2", &assign_ExcAVR7_t2); + assign_map.emplace("cim:ExcAVR7.t3", &assign_ExcAVR7_t3); + assign_map.emplace("cim:ExcAVR7.t4", &assign_ExcAVR7_t4); + assign_map.emplace("cim:ExcAVR7.t5", &assign_ExcAVR7_t5); + assign_map.emplace("cim:ExcAVR7.t6", &assign_ExcAVR7_t6); + assign_map.emplace("cim:ExcAVR7.vmax1", &assign_ExcAVR7_vmax1); + assign_map.emplace("cim:ExcAVR7.vmax3", &assign_ExcAVR7_vmax3); + assign_map.emplace("cim:ExcAVR7.vmax5", &assign_ExcAVR7_vmax5); + assign_map.emplace("cim:ExcAVR7.vmin1", &assign_ExcAVR7_vmin1); + assign_map.emplace("cim:ExcAVR7.vmin3", &assign_ExcAVR7_vmin3); + assign_map.emplace("cim:ExcAVR7.vmin5", &assign_ExcAVR7_vmin5); } void ExcAVR7::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcAVR7.hpp b/CGMES_2.4.13_18DEC2013/ExcAVR7.hpp index 20fdb3e54..5bd945535 100644 --- a/CGMES_2.4.13_18DEC2013/ExcAVR7.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcAVR7.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IVO excitation system. - */ + /** \brief IVO excitation system. */ class ExcAVR7 : public ExcitationSystemDynamics { public: @@ -28,27 +26,68 @@ namespace CIMPP ExcAVR7(); ~ExcAVR7() override; - CIMPP::PU a1; /* Lead coefficient (A1). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU a2; /* Lag coefficient (A2). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU a3; /* Lead coefficient (A3). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU a4; /* Lag coefficient (A4). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU a5; /* Lead coefficient (A5). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU a6; /* Lag coefficient (A6). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU k1; /* Gain (K1). Typical Value = 1. Default: nullptr */ - CIMPP::PU k3; /* Gain (K3). Typical Value = 3. Default: nullptr */ - CIMPP::PU k5; /* Gain (K5). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds t1; /* Lead time constant (T1). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds t2; /* Lag time constant (T2). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t3; /* Lead time constant (T3). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t4; /* Lag time constant (T4). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t5; /* Lead time constant (T5). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t6; /* Lag time constant (T6). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU vmax1; /* Lead-lag max. limit (Vmax1). Typical Value = 5. Default: nullptr */ - CIMPP::PU vmax3; /* Lead-lag max. limit (Vmax3). Typical Value = 5. Default: nullptr */ - CIMPP::PU vmax5; /* Lead-lag max. limit (Vmax5). Typical Value = 5. Default: nullptr */ - CIMPP::PU vmin1; /* Lead-lag min. limit (Vmin1). Typical Value = -5. Default: nullptr */ - CIMPP::PU vmin3; /* Lead-lag min. limit (Vmin3). Typical Value = -5. Default: nullptr */ - CIMPP::PU vmin5; /* Lead-lag min. limit (Vmin5). Typical Value = -2. Default: nullptr */ + /** \brief Lead coefficient (A1). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU a1; + + /** \brief Lag coefficient (A2). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU a2; + + /** \brief Lead coefficient (A3). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU a3; + + /** \brief Lag coefficient (A4). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU a4; + + /** \brief Lead coefficient (A5). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU a5; + + /** \brief Lag coefficient (A6). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU a6; + + /** \brief Gain (K1). Typical Value = 1. Default: nullptr */ + CIMPP::PU k1; + + /** \brief Gain (K3). Typical Value = 3. Default: nullptr */ + CIMPP::PU k3; + + /** \brief Gain (K5). Typical Value = 1. Default: nullptr */ + CIMPP::PU k5; + + /** \brief Lead time constant (T1). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Lag time constant (T2). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Lead time constant (T3). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Lag time constant (T4). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Lead time constant (T5). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Lag time constant (T6). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Lead-lag max. limit (Vmax1). Typical Value = 5. Default: nullptr */ + CIMPP::PU vmax1; + + /** \brief Lead-lag max. limit (Vmax3). Typical Value = 5. Default: nullptr */ + CIMPP::PU vmax3; + + /** \brief Lead-lag max. limit (Vmax5). Typical Value = 5. Default: nullptr */ + CIMPP::PU vmax5; + + /** \brief Lead-lag min. limit (Vmin1). Typical Value = -5. Default: nullptr */ + CIMPP::PU vmin1; + + /** \brief Lead-lag min. limit (Vmin3). Typical Value = -5. Default: nullptr */ + CIMPP::PU vmin3; + + /** \brief Lead-lag min. limit (Vmin5). Typical Value = -2. Default: nullptr */ + CIMPP::PU vmin5; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcBBC.cpp b/CGMES_2.4.13_18DEC2013/ExcBBC.cpp index fd155fba0..5ed4908bf 100644 --- a/CGMES_2.4.13_18DEC2013/ExcBBC.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcBBC.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcBBC::ExcBBC() {}; -ExcBBC::~ExcBBC() {}; +ExcBBC::ExcBBC() {} +ExcBBC::~ExcBBC() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ ExcBBC::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcBBC_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_efdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_efdmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_switch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_switch(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->_switch; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_xe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_xe(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xe; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcBBC_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmax; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_ExcBBC_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcBBC_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmin; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_ExcBBC_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcBBC_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_ExcBBC_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcBBC_switch(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->_switch; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_ExcBBC_switch(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcBBC_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_ExcBBC_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcBBC_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_ExcBBC_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcBBC_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_ExcBBC_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcBBC_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_ExcBBC_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcBBC_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_ExcBBC_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcBBC_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_ExcBBC_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcBBC_xe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xe; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_ExcBBC_xe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcBBC::debugName[] = "ExcBBC"; const char* ExcBBC::debugString() const { @@ -370,22 +376,22 @@ const char* ExcBBC::debugString() const void ExcBBC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcBBC"), &ExcBBC_factory)); + factory_map.emplace("cim:ExcBBC", &ExcBBC_factory); } void ExcBBC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.efdmax"), &assign_ExcBBC_efdmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.efdmin"), &assign_ExcBBC_efdmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.k"), &assign_ExcBBC_k)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.switch"), &assign_ExcBBC_switch)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.t1"), &assign_ExcBBC_t1)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.t2"), &assign_ExcBBC_t2)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.t3"), &assign_ExcBBC_t3)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.t4"), &assign_ExcBBC_t4)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.vrmax"), &assign_ExcBBC_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.vrmin"), &assign_ExcBBC_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.xe"), &assign_ExcBBC_xe)); + assign_map.emplace("cim:ExcBBC.efdmax", &assign_ExcBBC_efdmax); + assign_map.emplace("cim:ExcBBC.efdmin", &assign_ExcBBC_efdmin); + assign_map.emplace("cim:ExcBBC.k", &assign_ExcBBC_k); + assign_map.emplace("cim:ExcBBC.switch", &assign_ExcBBC_switch); + assign_map.emplace("cim:ExcBBC.t1", &assign_ExcBBC_t1); + assign_map.emplace("cim:ExcBBC.t2", &assign_ExcBBC_t2); + assign_map.emplace("cim:ExcBBC.t3", &assign_ExcBBC_t3); + assign_map.emplace("cim:ExcBBC.t4", &assign_ExcBBC_t4); + assign_map.emplace("cim:ExcBBC.vrmax", &assign_ExcBBC_vrmax); + assign_map.emplace("cim:ExcBBC.vrmin", &assign_ExcBBC_vrmin); + assign_map.emplace("cim:ExcBBC.xe", &assign_ExcBBC_xe); } void ExcBBC::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcBBC.hpp b/CGMES_2.4.13_18DEC2013/ExcBBC.hpp index a41a730ad..069831f27 100644 --- a/CGMES_2.4.13_18DEC2013/ExcBBC.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcBBC.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Transformer fed static excitation system (static with ABB regulator). This model represents a static excitation system in which a gated thyristor bridge fed by a transformer at the main generator terminals feeds the main generator directly. - */ + /** \brief Transformer fed static excitation system (static with ABB regulator). This model represents a static excitation system in which a gated thyristor bridge fed by a transformer at the main generator terminals feeds the main generator directly. */ class ExcBBC : public ExcitationSystemDynamics { public: @@ -29,17 +27,38 @@ namespace CIMPP ExcBBC(); ~ExcBBC() override; - CIMPP::PU efdmax; /* Maximum open circuit exciter voltage (Efdmax). Typical Value = 5. Default: nullptr */ - CIMPP::PU efdmin; /* Minimum open circuit exciter voltage (Efdmin). Typical Value = -5. Default: nullptr */ - CIMPP::PU k; /* Steady state gain (K). Typical Value = 300. Default: nullptr */ - CIMPP::Boolean _switch; /* Supplementary signal routing selector (switch). true = Vs connected to 3rd summing point false = Vs connected to 1st summing point (see diagram). Typical Value = true. Default: false */ - CIMPP::Seconds t1; /* Controller time constant (T1). Typical Value = 6. Default: nullptr */ - CIMPP::Seconds t2; /* Controller time constant (T2). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds t3; /* Lead/lag time constant (T3). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds t4; /* Lead/lag time constant (T4). Typical Value = 0.01. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum control element output (Vrmax). Typical Value = 5. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum control element output (Vrmin). Typical Value = -5. Default: nullptr */ - CIMPP::PU xe; /* Effective excitation transformer reactance (Xe). Typical Value = 0.05. Default: nullptr */ + /** \brief Maximum open circuit exciter voltage (Efdmax). Typical Value = 5. Default: nullptr */ + CIMPP::PU efdmax; + + /** \brief Minimum open circuit exciter voltage (Efdmin). Typical Value = -5. Default: nullptr */ + CIMPP::PU efdmin; + + /** \brief Steady state gain (K). Typical Value = 300. Default: nullptr */ + CIMPP::PU k; + + /** \brief Supplementary signal routing selector (switch). true = Vs connected to 3rd summing point false = Vs connected to 1st summing point (see diagram). Typical Value = true. Default: false */ + CIMPP::Boolean _switch; + + /** \brief Controller time constant (T1). Typical Value = 6. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Controller time constant (T2). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Lead/lag time constant (T3). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Lead/lag time constant (T4). Typical Value = 0.01. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Maximum control element output (Vrmax). Typical Value = 5. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum control element output (Vrmin). Typical Value = -5. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief Effective excitation transformer reactance (Xe). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU xe; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcCZ.cpp b/CGMES_2.4.13_18DEC2013/ExcCZ.cpp index 89b839416..836b963d1 100644 --- a/CGMES_2.4.13_18DEC2013/ExcCZ.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcCZ.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcCZ::ExcCZ() {}; -ExcCZ::~ExcCZ() {}; +ExcCZ::ExcCZ() {} +ExcCZ::~ExcCZ() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ ExcCZ::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcCZ_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_efdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcCZ_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_efdmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcCZ_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcCZ_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcCZ_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcCZ_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcCZ_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcCZ_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcCZ_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcCZ_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcCZ_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmax; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_ExcCZ_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcCZ_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmin; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_ExcCZ_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcCZ_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_ExcCZ_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcCZ_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_ExcCZ_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcCZ_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_ExcCZ_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcCZ_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_ExcCZ_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcCZ_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_ExcCZ_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcCZ_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_ExcCZ_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcCZ_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_ExcCZ_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcCZ_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_ExcCZ_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcCZ::debugName[] = "ExcCZ"; const char* ExcCZ::debugString() const { @@ -341,21 +346,21 @@ const char* ExcCZ::debugString() const void ExcCZ::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcCZ"), &ExcCZ_factory)); + factory_map.emplace("cim:ExcCZ", &ExcCZ_factory); } void ExcCZ::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.efdmax"), &assign_ExcCZ_efdmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.efdmin"), &assign_ExcCZ_efdmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.ka"), &assign_ExcCZ_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.ke"), &assign_ExcCZ_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.kp"), &assign_ExcCZ_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.ta"), &assign_ExcCZ_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.tc"), &assign_ExcCZ_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.te"), &assign_ExcCZ_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.vrmax"), &assign_ExcCZ_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.vrmin"), &assign_ExcCZ_vrmin)); + assign_map.emplace("cim:ExcCZ.efdmax", &assign_ExcCZ_efdmax); + assign_map.emplace("cim:ExcCZ.efdmin", &assign_ExcCZ_efdmin); + assign_map.emplace("cim:ExcCZ.ka", &assign_ExcCZ_ka); + assign_map.emplace("cim:ExcCZ.ke", &assign_ExcCZ_ke); + assign_map.emplace("cim:ExcCZ.kp", &assign_ExcCZ_kp); + assign_map.emplace("cim:ExcCZ.ta", &assign_ExcCZ_ta); + assign_map.emplace("cim:ExcCZ.tc", &assign_ExcCZ_tc); + assign_map.emplace("cim:ExcCZ.te", &assign_ExcCZ_te); + assign_map.emplace("cim:ExcCZ.vrmax", &assign_ExcCZ_vrmax); + assign_map.emplace("cim:ExcCZ.vrmin", &assign_ExcCZ_vrmin); } void ExcCZ::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcCZ.hpp b/CGMES_2.4.13_18DEC2013/ExcCZ.hpp index 1b99a72bd..535e79794 100644 --- a/CGMES_2.4.13_18DEC2013/ExcCZ.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcCZ.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Czech Proportion/Integral Exciter. - */ + /** \brief Czech Proportion/Integral Exciter. */ class ExcCZ : public ExcitationSystemDynamics { public: @@ -28,16 +26,35 @@ namespace CIMPP ExcCZ(); ~ExcCZ() override; - CIMPP::PU efdmax; /* Exciter output maximum limit (Efdmax). Default: nullptr */ - CIMPP::PU efdmin; /* Exciter output minimum limit (Efdmin). Default: nullptr */ - CIMPP::PU ka; /* Regulator gain (Ka). Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (Ke). Default: nullptr */ - CIMPP::PU kp; /* Regulator proportional gain (Kp). Default: nullptr */ - CIMPP::Seconds ta; /* Regulator time constant (Ta). Default: nullptr */ - CIMPP::Seconds tc; /* Regulator integral time constant (Tc). Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (Te). Default: nullptr */ - CIMPP::PU vrmax; /* Voltage regulator maximum limit (Vrmax). Default: nullptr */ - CIMPP::PU vrmin; /* Voltage regulator minimum limit (Vrmin). Default: nullptr */ + /** \brief Exciter output maximum limit (Efdmax). Default: nullptr */ + CIMPP::PU efdmax; + + /** \brief Exciter output minimum limit (Efdmin). Default: nullptr */ + CIMPP::PU efdmin; + + /** \brief Regulator gain (Ka). Default: nullptr */ + CIMPP::PU ka; + + /** \brief Exciter constant related to self-excited field (Ke). Default: nullptr */ + CIMPP::PU ke; + + /** \brief Regulator proportional gain (Kp). Default: nullptr */ + CIMPP::PU kp; + + /** \brief Regulator time constant (Ta). Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Regulator integral time constant (Tc). Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (Te). Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Voltage regulator maximum limit (Vrmax). Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Voltage regulator minimum limit (Vrmin). Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcDC1A.cpp b/CGMES_2.4.13_18DEC2013/ExcDC1A.cpp index 244755fe7..66f08bb53 100644 --- a/CGMES_2.4.13_18DEC2013/ExcDC1A.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcDC1A.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcDC1A::ExcDC1A() {}; -ExcDC1A::~ExcDC1A() {}; +ExcDC1A::ExcDC1A() {} +ExcDC1A::~ExcDC1A() {} static const std::list PossibleProfilesForClass = { @@ -74,246 +56,262 @@ ExcDC1A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcDC1A_edfmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_edfmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->edfmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_efdmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_exclim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exclim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_seefd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_seefd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcDC1A_edfmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->edfmax; if (!buffer.str().empty()) @@ -327,7 +325,8 @@ bool get_ExcDC1A_edfmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC1A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -341,7 +340,8 @@ bool get_ExcDC1A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcDC1A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -355,7 +355,8 @@ bool get_ExcDC1A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcDC1A_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmin; if (!buffer.str().empty()) @@ -369,7 +370,8 @@ bool get_ExcDC1A_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC1A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exclim; if (!buffer.str().empty()) @@ -383,7 +385,8 @@ bool get_ExcDC1A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -397,7 +400,8 @@ bool get_ExcDC1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC1A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -411,7 +415,8 @@ bool get_ExcDC1A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -425,7 +430,8 @@ bool get_ExcDC1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC1A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -439,7 +445,8 @@ bool get_ExcDC1A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC1A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd1; if (!buffer.str().empty()) @@ -453,7 +460,8 @@ bool get_ExcDC1A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC1A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd2; if (!buffer.str().empty()) @@ -467,7 +475,8 @@ bool get_ExcDC1A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -481,7 +490,8 @@ bool get_ExcDC1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -495,7 +505,8 @@ bool get_ExcDC1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -509,7 +520,8 @@ bool get_ExcDC1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC1A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -523,7 +535,8 @@ bool get_ExcDC1A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -537,7 +550,8 @@ bool get_ExcDC1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -551,7 +565,8 @@ bool get_ExcDC1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcDC1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -563,8 +578,6 @@ bool get_ExcDC1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcDC1A::debugName[] = "ExcDC1A"; const char* ExcDC1A::debugString() const { @@ -573,29 +586,29 @@ const char* ExcDC1A::debugString() const void ExcDC1A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcDC1A"), &ExcDC1A_factory)); + factory_map.emplace("cim:ExcDC1A", &ExcDC1A_factory); } void ExcDC1A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.edfmax"), &assign_ExcDC1A_edfmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.efd1"), &assign_ExcDC1A_efd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.efd2"), &assign_ExcDC1A_efd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.efdmin"), &assign_ExcDC1A_efdmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.exclim"), &assign_ExcDC1A_exclim)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.ka"), &assign_ExcDC1A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.ke"), &assign_ExcDC1A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.kf"), &assign_ExcDC1A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.ks"), &assign_ExcDC1A_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.seefd1"), &assign_ExcDC1A_seefd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.seefd2"), &assign_ExcDC1A_seefd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.ta"), &assign_ExcDC1A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.tb"), &assign_ExcDC1A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.tc"), &assign_ExcDC1A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.te"), &assign_ExcDC1A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.tf"), &assign_ExcDC1A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.vrmax"), &assign_ExcDC1A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.vrmin"), &assign_ExcDC1A_vrmin)); + assign_map.emplace("cim:ExcDC1A.edfmax", &assign_ExcDC1A_edfmax); + assign_map.emplace("cim:ExcDC1A.efd1", &assign_ExcDC1A_efd1); + assign_map.emplace("cim:ExcDC1A.efd2", &assign_ExcDC1A_efd2); + assign_map.emplace("cim:ExcDC1A.efdmin", &assign_ExcDC1A_efdmin); + assign_map.emplace("cim:ExcDC1A.exclim", &assign_ExcDC1A_exclim); + assign_map.emplace("cim:ExcDC1A.ka", &assign_ExcDC1A_ka); + assign_map.emplace("cim:ExcDC1A.ke", &assign_ExcDC1A_ke); + assign_map.emplace("cim:ExcDC1A.kf", &assign_ExcDC1A_kf); + assign_map.emplace("cim:ExcDC1A.ks", &assign_ExcDC1A_ks); + assign_map.emplace("cim:ExcDC1A.seefd1", &assign_ExcDC1A_seefd1); + assign_map.emplace("cim:ExcDC1A.seefd2", &assign_ExcDC1A_seefd2); + assign_map.emplace("cim:ExcDC1A.ta", &assign_ExcDC1A_ta); + assign_map.emplace("cim:ExcDC1A.tb", &assign_ExcDC1A_tb); + assign_map.emplace("cim:ExcDC1A.tc", &assign_ExcDC1A_tc); + assign_map.emplace("cim:ExcDC1A.te", &assign_ExcDC1A_te); + assign_map.emplace("cim:ExcDC1A.tf", &assign_ExcDC1A_tf); + assign_map.emplace("cim:ExcDC1A.vrmax", &assign_ExcDC1A_vrmax); + assign_map.emplace("cim:ExcDC1A.vrmin", &assign_ExcDC1A_vrmin); } void ExcDC1A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcDC1A.hpp b/CGMES_2.4.13_18DEC2013/ExcDC1A.hpp index 802c09866..5cff88d2f 100644 --- a/CGMES_2.4.13_18DEC2013/ExcDC1A.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcDC1A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE DC1A direct current commutator exciter with speed input and without underexcitation limiters (UEL) inputs. - */ + /** \brief Modified IEEE DC1A direct current commutator exciter with speed input and without underexcitation limiters (UEL) inputs. */ class ExcDC1A : public ExcitationSystemDynamics { public: @@ -30,24 +28,59 @@ namespace CIMPP ExcDC1A(); ~ExcDC1A() override; - CIMPP::PU edfmax; /* Maximum voltage exciter output limiter (Efdmax). Typical Value = 99. Default: nullptr */ - CIMPP::PU efd1; /* Exciter voltage at which exciter saturation is defined (Efd1). Typical Value = 3.1. Default: nullptr */ - CIMPP::PU efd2; /* Exciter voltage at which exciter saturation is defined (Efd2). Typical Value = 2.3. Default: nullptr */ - CIMPP::PU efdmin; /* Minimum voltage exciter output limiter (Efdmin). Typical Value = -99. Default: nullptr */ - CIMPP::Boolean exclim; /* (exclim). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero is not applied to integrator output. Typical Value = true. Default: false */ - CIMPP::PU ka; /* Voltage regulator gain (Ka). Typical Value = 46. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (Ke). Typical Value = 0. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gain (Kf). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float seefd1; /* Exciter saturation function value at the corresponding exciter voltage, Efd1 (Se[Eefd1]). Typical Value = 0.33. Default: nullptr */ - CIMPP::Simple_Float seefd2; /* Exciter saturation function value at the corresponding exciter voltage, Efd1 (Se[Eefd1]). Typical Value = 0.33. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (Ta). Typical Value = 0.06. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (Tc). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 0.46. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (Tf). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (Vrmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (Vrmin). Typical Value = -0.9. Default: nullptr */ + /** \brief Maximum voltage exciter output limiter (Efdmax). Typical Value = 99. Default: nullptr */ + CIMPP::PU edfmax; + + /** \brief Exciter voltage at which exciter saturation is defined (Efd1). Typical Value = 3.1. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Exciter voltage at which exciter saturation is defined (Efd2). Typical Value = 2.3. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief Minimum voltage exciter output limiter (Efdmin). Typical Value = -99. Default: nullptr */ + CIMPP::PU efdmin; + + /** \brief (exclim). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero is not applied to integrator output. Typical Value = true. Default: false */ + CIMPP::Boolean exclim; + + /** \brief Voltage regulator gain (Ka). Typical Value = 46. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Exciter constant related to self-excited field (Ke). Typical Value = 0. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gain (Kf). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Efd1 (Se[Eefd1]). Typical Value = 0.33. Default: nullptr */ + CIMPP::Simple_Float seefd1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Efd1 (Se[Eefd1]). Typical Value = 0.33. Default: nullptr */ + CIMPP::Simple_Float seefd2; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0.06. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (Tc). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 0.46. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (Tf). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage regulator output (Vrmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (Vrmin). Typical Value = -0.9. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcDC2A.cpp b/CGMES_2.4.13_18DEC2013/ExcDC2A.cpp index 912534708..79a98e618 100644 --- a/CGMES_2.4.13_18DEC2013/ExcDC2A.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcDC2A.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" using namespace CIMPP; -ExcDC2A::ExcDC2A() {}; -ExcDC2A::~ExcDC2A() {}; +ExcDC2A::ExcDC2A() {} +ExcDC2A::~ExcDC2A() {} static const std::list PossibleProfilesForClass = { @@ -74,246 +56,262 @@ ExcDC2A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcDC2A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_exclim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exclim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_seefd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_seefd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_tf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_vtlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_vtlim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vtlim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcDC2A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -327,7 +325,8 @@ bool get_ExcDC2A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcDC2A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -341,7 +340,8 @@ bool get_ExcDC2A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcDC2A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exclim; if (!buffer.str().empty()) @@ -355,7 +355,8 @@ bool get_ExcDC2A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -369,7 +370,8 @@ bool get_ExcDC2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -383,7 +385,8 @@ bool get_ExcDC2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -397,7 +400,8 @@ bool get_ExcDC2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -411,7 +415,8 @@ bool get_ExcDC2A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd1; if (!buffer.str().empty()) @@ -425,7 +430,8 @@ bool get_ExcDC2A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC2A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd2; if (!buffer.str().empty()) @@ -439,7 +445,8 @@ bool get_ExcDC2A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -453,7 +460,8 @@ bool get_ExcDC2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -467,7 +475,8 @@ bool get_ExcDC2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -481,7 +490,8 @@ bool get_ExcDC2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -495,7 +505,8 @@ bool get_ExcDC2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -509,7 +520,8 @@ bool get_ExcDC2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf1; if (!buffer.str().empty()) @@ -523,7 +535,8 @@ bool get_ExcDC2A_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -537,7 +550,8 @@ bool get_ExcDC2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcDC2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -551,7 +565,8 @@ bool get_ExcDC2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcDC2A_vtlim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vtlim; if (!buffer.str().empty()) @@ -563,8 +578,6 @@ bool get_ExcDC2A_vtlim(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcDC2A::debugName[] = "ExcDC2A"; const char* ExcDC2A::debugString() const { @@ -573,29 +586,29 @@ const char* ExcDC2A::debugString() const void ExcDC2A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcDC2A"), &ExcDC2A_factory)); + factory_map.emplace("cim:ExcDC2A", &ExcDC2A_factory); } void ExcDC2A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.efd1"), &assign_ExcDC2A_efd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.efd2"), &assign_ExcDC2A_efd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.exclim"), &assign_ExcDC2A_exclim)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.ka"), &assign_ExcDC2A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.ke"), &assign_ExcDC2A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.kf"), &assign_ExcDC2A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.ks"), &assign_ExcDC2A_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.seefd1"), &assign_ExcDC2A_seefd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.seefd2"), &assign_ExcDC2A_seefd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.ta"), &assign_ExcDC2A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.tb"), &assign_ExcDC2A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.tc"), &assign_ExcDC2A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.te"), &assign_ExcDC2A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.tf"), &assign_ExcDC2A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.tf1"), &assign_ExcDC2A_tf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.vrmax"), &assign_ExcDC2A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.vrmin"), &assign_ExcDC2A_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.vtlim"), &assign_ExcDC2A_vtlim)); + assign_map.emplace("cim:ExcDC2A.efd1", &assign_ExcDC2A_efd1); + assign_map.emplace("cim:ExcDC2A.efd2", &assign_ExcDC2A_efd2); + assign_map.emplace("cim:ExcDC2A.exclim", &assign_ExcDC2A_exclim); + assign_map.emplace("cim:ExcDC2A.ka", &assign_ExcDC2A_ka); + assign_map.emplace("cim:ExcDC2A.ke", &assign_ExcDC2A_ke); + assign_map.emplace("cim:ExcDC2A.kf", &assign_ExcDC2A_kf); + assign_map.emplace("cim:ExcDC2A.ks", &assign_ExcDC2A_ks); + assign_map.emplace("cim:ExcDC2A.seefd1", &assign_ExcDC2A_seefd1); + assign_map.emplace("cim:ExcDC2A.seefd2", &assign_ExcDC2A_seefd2); + assign_map.emplace("cim:ExcDC2A.ta", &assign_ExcDC2A_ta); + assign_map.emplace("cim:ExcDC2A.tb", &assign_ExcDC2A_tb); + assign_map.emplace("cim:ExcDC2A.tc", &assign_ExcDC2A_tc); + assign_map.emplace("cim:ExcDC2A.te", &assign_ExcDC2A_te); + assign_map.emplace("cim:ExcDC2A.tf", &assign_ExcDC2A_tf); + assign_map.emplace("cim:ExcDC2A.tf1", &assign_ExcDC2A_tf1); + assign_map.emplace("cim:ExcDC2A.vrmax", &assign_ExcDC2A_vrmax); + assign_map.emplace("cim:ExcDC2A.vrmin", &assign_ExcDC2A_vrmin); + assign_map.emplace("cim:ExcDC2A.vtlim", &assign_ExcDC2A_vtlim); } void ExcDC2A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcDC2A.hpp b/CGMES_2.4.13_18DEC2013/ExcDC2A.hpp index 2d76aa510..e317a7ea0 100644 --- a/CGMES_2.4.13_18DEC2013/ExcDC2A.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcDC2A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE DC2A direct current commutator exciters with speed input, one more leg block in feedback loop and without underexcitation limiters (UEL) inputs. DC type 2 excitation system model with added speed multiplier, added lead-lag, and voltage-dependent limits. - */ + /** \brief Modified IEEE DC2A direct current commutator exciters with speed input, one more leg block in feedback loop and without underexcitation limiters (UEL) inputs. DC type 2 excitation system model with added speed multiplier, added lead-lag, and voltage-dependent limits. */ class ExcDC2A : public ExcitationSystemDynamics { public: @@ -30,24 +28,59 @@ namespace CIMPP ExcDC2A(); ~ExcDC2A() override; - CIMPP::PU efd1; /* Exciter voltage at which exciter saturation is defined (Efd1). Typical Value = 3.05. Default: nullptr */ - CIMPP::PU efd2; /* Exciter voltage at which exciter saturation is defined (Efd2). Typical Value = 2.29. Default: nullptr */ - CIMPP::Boolean exclim; /* (exclim). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero is not applied to integrator output. Typical Value = true. Default: false */ - CIMPP::PU ka; /* Voltage regulator gain (Ka). Typical Value = 300. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (Ke). If Ke is entered as zero, the model calculates an effective value of Ke such that the initial condition value of Vr is zero. The zero value of Ke is not changed. If Ke is entered as non-zero, its value is used directly, without change. Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gain (Kf). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float seefd1; /* Exciter saturation function value at the corresponding exciter voltage, Efd1 (Se[Eefd1]). Typical Value = 0.279. Default: nullptr */ - CIMPP::Simple_Float seefd2; /* Exciter saturation function value at the corresponding exciter voltage, Efd2 (Se[Efd2]). Typical Value = 0.117. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (Ta). Typical Value = 0.01. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (Tc). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 1.33. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (Tf). Typical Value = 0.675. Default: nullptr */ - CIMPP::Seconds tf1; /* Excitation control system stabilizer time constant (Tf1). Typical Value = 0. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (Vrmax). Typical Value = 4.95. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (Vrmin). Typical Value = -4.9. Default: nullptr */ - CIMPP::Boolean vtlim; /* (Vtlim). true = limiter at the block [Ka/(1+sTa)] is dependent on Vt false = limiter at the block is not dependent on Vt. Typical Value = true. Default: false */ + /** \brief Exciter voltage at which exciter saturation is defined (Efd1). Typical Value = 3.05. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Exciter voltage at which exciter saturation is defined (Efd2). Typical Value = 2.29. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief (exclim). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero is not applied to integrator output. Typical Value = true. Default: false */ + CIMPP::Boolean exclim; + + /** \brief Voltage regulator gain (Ka). Typical Value = 300. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Exciter constant related to self-excited field (Ke). If Ke is entered as zero, the model calculates an effective value of Ke such that the initial condition value of Vr is zero. The zero value of Ke is not changed. If Ke is entered as non-zero, its value is used directly, without change. Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gain (Kf). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Efd1 (Se[Eefd1]). Typical Value = 0.279. Default: nullptr */ + CIMPP::Simple_Float seefd1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Efd2 (Se[Efd2]). Typical Value = 0.117. Default: nullptr */ + CIMPP::Simple_Float seefd2; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0.01. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (Tc). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 1.33. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (Tf). Typical Value = 0.675. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Excitation control system stabilizer time constant (Tf1). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tf1; + + /** \brief Maximum voltage regulator output (Vrmax). Typical Value = 4.95. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (Vrmin). Typical Value = -4.9. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief (Vtlim). true = limiter at the block [Ka/(1+sTa)] is dependent on Vt false = limiter at the block is not dependent on Vt. Typical Value = true. Default: false */ + CIMPP::Boolean vtlim; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcDC3A.cpp b/CGMES_2.4.13_18DEC2013/ExcDC3A.cpp index 1ad6521de..71b995f87 100644 --- a/CGMES_2.4.13_18DEC2013/ExcDC3A.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcDC3A.cpp @@ -8,27 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcDC3A::ExcDC3A() {}; -ExcDC3A::~ExcDC3A() {}; +ExcDC3A::ExcDC3A() {} +ExcDC3A::~ExcDC3A() {} static const std::list PossibleProfilesForClass = { @@ -70,220 +54,234 @@ ExcDC3A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcDC3A_edfmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_edfmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->edfmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_efdlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_efdlim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdlim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_efdmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_exclim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exclim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_kr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_kr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_kv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_kv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_seefd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_seefd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_trh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_trh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->trh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcDC3A_edfmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->edfmax; if (!buffer.str().empty()) @@ -297,7 +295,8 @@ bool get_ExcDC3A_edfmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC3A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -311,7 +310,8 @@ bool get_ExcDC3A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcDC3A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -325,7 +325,8 @@ bool get_ExcDC3A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcDC3A_efdlim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdlim; if (!buffer.str().empty()) @@ -339,7 +340,8 @@ bool get_ExcDC3A_efdlim(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC3A_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmin; if (!buffer.str().empty()) @@ -353,7 +355,8 @@ bool get_ExcDC3A_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC3A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exclim; if (!buffer.str().empty()) @@ -367,7 +370,8 @@ bool get_ExcDC3A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC3A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -381,7 +385,8 @@ bool get_ExcDC3A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A_kr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kr; if (!buffer.str().empty()) @@ -395,7 +400,8 @@ bool get_ExcDC3A_kr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -409,7 +415,8 @@ bool get_ExcDC3A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A_kv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kv; if (!buffer.str().empty()) @@ -423,7 +430,8 @@ bool get_ExcDC3A_kv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd1; if (!buffer.str().empty()) @@ -437,7 +445,8 @@ bool get_ExcDC3A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC3A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd2; if (!buffer.str().empty()) @@ -451,7 +460,8 @@ bool get_ExcDC3A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC3A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -465,7 +475,8 @@ bool get_ExcDC3A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A_trh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->trh; if (!buffer.str().empty()) @@ -479,7 +490,8 @@ bool get_ExcDC3A_trh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -493,7 +505,8 @@ bool get_ExcDC3A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcDC3A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -505,8 +518,6 @@ bool get_ExcDC3A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcDC3A::debugName[] = "ExcDC3A"; const char* ExcDC3A::debugString() const { @@ -515,27 +526,27 @@ const char* ExcDC3A::debugString() const void ExcDC3A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcDC3A"), &ExcDC3A_factory)); + factory_map.emplace("cim:ExcDC3A", &ExcDC3A_factory); } void ExcDC3A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.edfmax"), &assign_ExcDC3A_edfmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.efd1"), &assign_ExcDC3A_efd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.efd2"), &assign_ExcDC3A_efd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.efdlim"), &assign_ExcDC3A_efdlim)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.efdmin"), &assign_ExcDC3A_efdmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.exclim"), &assign_ExcDC3A_exclim)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.ke"), &assign_ExcDC3A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.kr"), &assign_ExcDC3A_kr)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.ks"), &assign_ExcDC3A_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.kv"), &assign_ExcDC3A_kv)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.seefd1"), &assign_ExcDC3A_seefd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.seefd2"), &assign_ExcDC3A_seefd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.te"), &assign_ExcDC3A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.trh"), &assign_ExcDC3A_trh)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.vrmax"), &assign_ExcDC3A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.vrmin"), &assign_ExcDC3A_vrmin)); + assign_map.emplace("cim:ExcDC3A.edfmax", &assign_ExcDC3A_edfmax); + assign_map.emplace("cim:ExcDC3A.efd1", &assign_ExcDC3A_efd1); + assign_map.emplace("cim:ExcDC3A.efd2", &assign_ExcDC3A_efd2); + assign_map.emplace("cim:ExcDC3A.efdlim", &assign_ExcDC3A_efdlim); + assign_map.emplace("cim:ExcDC3A.efdmin", &assign_ExcDC3A_efdmin); + assign_map.emplace("cim:ExcDC3A.exclim", &assign_ExcDC3A_exclim); + assign_map.emplace("cim:ExcDC3A.ke", &assign_ExcDC3A_ke); + assign_map.emplace("cim:ExcDC3A.kr", &assign_ExcDC3A_kr); + assign_map.emplace("cim:ExcDC3A.ks", &assign_ExcDC3A_ks); + assign_map.emplace("cim:ExcDC3A.kv", &assign_ExcDC3A_kv); + assign_map.emplace("cim:ExcDC3A.seefd1", &assign_ExcDC3A_seefd1); + assign_map.emplace("cim:ExcDC3A.seefd2", &assign_ExcDC3A_seefd2); + assign_map.emplace("cim:ExcDC3A.te", &assign_ExcDC3A_te); + assign_map.emplace("cim:ExcDC3A.trh", &assign_ExcDC3A_trh); + assign_map.emplace("cim:ExcDC3A.vrmax", &assign_ExcDC3A_vrmax); + assign_map.emplace("cim:ExcDC3A.vrmin", &assign_ExcDC3A_vrmin); } void ExcDC3A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcDC3A.hpp b/CGMES_2.4.13_18DEC2013/ExcDC3A.hpp index dde872208..53e5af5f0 100644 --- a/CGMES_2.4.13_18DEC2013/ExcDC3A.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcDC3A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - This is modified IEEE DC3A direct current commutator exciters with speed input, and death band. DC old type 4. - */ + /** \brief This is modified IEEE DC3A direct current commutator exciters with speed input, and death band. DC old type 4. */ class ExcDC3A : public ExcitationSystemDynamics { public: @@ -30,22 +28,53 @@ namespace CIMPP ExcDC3A(); ~ExcDC3A() override; - CIMPP::PU edfmax; /* Maximum voltage exciter output limiter (Efdmax). Typical Value = 99. Default: nullptr */ - CIMPP::PU efd1; /* Exciter voltage at which exciter saturation is defined (Efd1). Typical Value = 2.6. Default: nullptr */ - CIMPP::PU efd2; /* Exciter voltage at which exciter saturation is defined (Efd2). Typical Value = 3.45. Default: nullptr */ - CIMPP::Boolean efdlim; /* (Efdlim). true = exciter output limiter is active false = exciter output limiter not active. Typical Value = true. Default: false */ - CIMPP::PU efdmin; /* Minimum voltage exciter output limiter (Efdmin). Typical Value = -99. Default: nullptr */ - CIMPP::Boolean exclim; /* (exclim). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero not applied to integrator output. Typical Value = true. Default: false */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ - CIMPP::PU kr; /* Death band (Kr). If Kr is not zero, the voltage regulator input changes at a constant rate if Verr > Kr or Verr < -Kr as per the IEEE (1968) Type 4 model. If Kr is zero, the error signal drives the voltage regulator continuously as per the IEEE (1980) DC3 and IEEE (1992, 2005) DC3A models. Typical Value = 0. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ - CIMPP::PU kv; /* Fast raise/lower contact setting (Kv). Typical Value = 0.05. Default: nullptr */ - CIMPP::Simple_Float seefd1; /* Exciter saturation function value at the corresponding exciter voltage, Efd1 (Se[Eefd1]). Typical Value = 0.1. Default: nullptr */ - CIMPP::Simple_Float seefd2; /* Exciter saturation function value at the corresponding exciter voltage, Efd2 (Se[Efd2]). Typical Value = 0.35. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 1.83. Default: nullptr */ - CIMPP::Seconds trh; /* Rheostat travel time (Trh). Typical Value = 20. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (Vrmax). Typical Value = 5. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (Vrmin). Typical Value = 0. Default: nullptr */ + /** \brief Maximum voltage exciter output limiter (Efdmax). Typical Value = 99. Default: nullptr */ + CIMPP::PU edfmax; + + /** \brief Exciter voltage at which exciter saturation is defined (Efd1). Typical Value = 2.6. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Exciter voltage at which exciter saturation is defined (Efd2). Typical Value = 3.45. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief (Efdlim). true = exciter output limiter is active false = exciter output limiter not active. Typical Value = true. Default: false */ + CIMPP::Boolean efdlim; + + /** \brief Minimum voltage exciter output limiter (Efdmin). Typical Value = -99. Default: nullptr */ + CIMPP::PU efdmin; + + /** \brief (exclim). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero not applied to integrator output. Typical Value = true. Default: false */ + CIMPP::Boolean exclim; + + /** \brief Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Death band (Kr). If Kr is not zero, the voltage regulator input changes at a constant rate if Verr > Kr or Verr < -Kr as per the IEEE (1968) Type 4 model. If Kr is zero, the error signal drives the voltage regulator continuously as per the IEEE (1980) DC3 and IEEE (1992, 2005) DC3A models. Typical Value = 0. Default: nullptr */ + CIMPP::PU kr; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Fast raise/lower contact setting (Kv). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU kv; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Efd1 (Se[Eefd1]). Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float seefd1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Efd2 (Se[Efd2]). Typical Value = 0.35. Default: nullptr */ + CIMPP::Simple_Float seefd2; + + /** \brief Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 1.83. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Rheostat travel time (Trh). Typical Value = 20. Default: nullptr */ + CIMPP::Seconds trh; + + /** \brief Maximum voltage regulator output (Vrmax). Typical Value = 5. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (Vrmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcDC3A1.cpp b/CGMES_2.4.13_18DEC2013/ExcDC3A1.cpp index e8b7caeb6..4d46a92b7 100644 --- a/CGMES_2.4.13_18DEC2013/ExcDC3A1.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcDC3A1.cpp @@ -8,25 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcDC3A1::ExcDC3A1() {}; -ExcDC3A1::~ExcDC3A1() {}; +ExcDC3A1::ExcDC3A1() {} +ExcDC3A1::~ExcDC3A1() {} static const std::list PossibleProfilesForClass = { @@ -66,194 +52,206 @@ ExcDC3A1::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcDC3A1_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_exclim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exclim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_vb1max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_vb1max(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vb1max; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_vblim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_vblim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vblim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_vbmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_vbmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vbmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcDC3A1_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exclim; if (!buffer.str().empty()) @@ -267,7 +265,8 @@ bool get_ExcDC3A1_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcDC3A1_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -281,7 +280,8 @@ bool get_ExcDC3A1_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A1_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -295,7 +295,8 @@ bool get_ExcDC3A1_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A1_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -309,7 +310,8 @@ bool get_ExcDC3A1_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A1_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -323,7 +325,8 @@ bool get_ExcDC3A1_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A1_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -337,7 +340,8 @@ bool get_ExcDC3A1_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A1_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -351,7 +355,8 @@ bool get_ExcDC3A1_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A1_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -365,7 +370,8 @@ bool get_ExcDC3A1_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A1_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -379,7 +385,8 @@ bool get_ExcDC3A1_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A1_vb1max(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vb1max; if (!buffer.str().empty()) @@ -393,7 +400,8 @@ bool get_ExcDC3A1_vb1max(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcDC3A1_vblim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vblim; if (!buffer.str().empty()) @@ -407,7 +415,8 @@ bool get_ExcDC3A1_vblim(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC3A1_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vbmax; if (!buffer.str().empty()) @@ -421,7 +430,8 @@ bool get_ExcDC3A1_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC3A1_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -435,7 +445,8 @@ bool get_ExcDC3A1_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC3A1_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -447,8 +458,6 @@ bool get_ExcDC3A1_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char ExcDC3A1::debugName[] = "ExcDC3A1"; const char* ExcDC3A1::debugString() const { @@ -457,25 +466,25 @@ const char* ExcDC3A1::debugString() const void ExcDC3A1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcDC3A1"), &ExcDC3A1_factory)); + factory_map.emplace("cim:ExcDC3A1", &ExcDC3A1_factory); } void ExcDC3A1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.exclim"), &assign_ExcDC3A1_exclim)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.ka"), &assign_ExcDC3A1_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.ke"), &assign_ExcDC3A1_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.kf"), &assign_ExcDC3A1_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.ki"), &assign_ExcDC3A1_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.kp"), &assign_ExcDC3A1_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.ta"), &assign_ExcDC3A1_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.te"), &assign_ExcDC3A1_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.tf"), &assign_ExcDC3A1_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.vb1max"), &assign_ExcDC3A1_vb1max)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.vblim"), &assign_ExcDC3A1_vblim)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.vbmax"), &assign_ExcDC3A1_vbmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.vrmax"), &assign_ExcDC3A1_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.vrmin"), &assign_ExcDC3A1_vrmin)); + assign_map.emplace("cim:ExcDC3A1.exclim", &assign_ExcDC3A1_exclim); + assign_map.emplace("cim:ExcDC3A1.ka", &assign_ExcDC3A1_ka); + assign_map.emplace("cim:ExcDC3A1.ke", &assign_ExcDC3A1_ke); + assign_map.emplace("cim:ExcDC3A1.kf", &assign_ExcDC3A1_kf); + assign_map.emplace("cim:ExcDC3A1.ki", &assign_ExcDC3A1_ki); + assign_map.emplace("cim:ExcDC3A1.kp", &assign_ExcDC3A1_kp); + assign_map.emplace("cim:ExcDC3A1.ta", &assign_ExcDC3A1_ta); + assign_map.emplace("cim:ExcDC3A1.te", &assign_ExcDC3A1_te); + assign_map.emplace("cim:ExcDC3A1.tf", &assign_ExcDC3A1_tf); + assign_map.emplace("cim:ExcDC3A1.vb1max", &assign_ExcDC3A1_vb1max); + assign_map.emplace("cim:ExcDC3A1.vblim", &assign_ExcDC3A1_vblim); + assign_map.emplace("cim:ExcDC3A1.vbmax", &assign_ExcDC3A1_vbmax); + assign_map.emplace("cim:ExcDC3A1.vrmax", &assign_ExcDC3A1_vrmax); + assign_map.emplace("cim:ExcDC3A1.vrmin", &assign_ExcDC3A1_vrmin); } void ExcDC3A1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcDC3A1.hpp b/CGMES_2.4.13_18DEC2013/ExcDC3A1.hpp index e89d52595..e58f7643f 100644 --- a/CGMES_2.4.13_18DEC2013/ExcDC3A1.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcDC3A1.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - This is modified old IEEE type 3 excitation system. - */ + /** \brief This is modified old IEEE type 3 excitation system. */ class ExcDC3A1 : public ExcitationSystemDynamics { public: @@ -29,20 +27,47 @@ namespace CIMPP ExcDC3A1(); ~ExcDC3A1() override; - CIMPP::Boolean exclim; /* (exclim). true = lower limit of zero is applied to integrator output false = lower limit of zero not applied to integrator output. Typical Value = true. Default: false */ - CIMPP::PU ka; /* Voltage regulator gain (Ka). Typical Value = 300. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gain (Kf). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU ki; /* Potential circuit gain coefficient (Ki). Typical Value = 4.83. Default: nullptr */ - CIMPP::PU kp; /* Potential circuit gain coefficient (Kp). Typical Value = 4.37. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (Ta). Typical Value = 0.01. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 1.83. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (Tf). Typical Value = 0.675. Default: nullptr */ - CIMPP::PU vb1max; /* Available exciter voltage limiter (Vb1max). Typical Value = 11.63. Default: nullptr */ - CIMPP::Boolean vblim; /* Vb limiter indicator. true = exciter Vbmax limiter is active false = Vb1max is active. Typical Value = true. Default: false */ - CIMPP::PU vbmax; /* Available exciter voltage limiter (Vbmax). Typical Value = 11.63. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (Vrmax). Typical Value = 5. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (Vrmin). Typical Value = 0. Default: nullptr */ + /** \brief (exclim). true = lower limit of zero is applied to integrator output false = lower limit of zero not applied to integrator output. Typical Value = true. Default: false */ + CIMPP::Boolean exclim; + + /** \brief Voltage regulator gain (Ka). Typical Value = 300. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gain (Kf). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Potential circuit gain coefficient (Ki). Typical Value = 4.83. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Potential circuit gain coefficient (Kp). Typical Value = 4.37. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0.01. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 1.83. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (Tf). Typical Value = 0.675. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Available exciter voltage limiter (Vb1max). Typical Value = 11.63. Default: nullptr */ + CIMPP::PU vb1max; + + /** \brief Vb limiter indicator. true = exciter Vbmax limiter is active false = Vb1max is active. Typical Value = true. Default: false */ + CIMPP::Boolean vblim; + + /** \brief Available exciter voltage limiter (Vbmax). Typical Value = 11.63. Default: nullptr */ + CIMPP::PU vbmax; + + /** \brief Maximum voltage regulator output (Vrmax). Typical Value = 5. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (Vrmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcELIN1.cpp b/CGMES_2.4.13_18DEC2013/ExcELIN1.cpp index 38b5a12c4..449d03fd8 100644 --- a/CGMES_2.4.13_18DEC2013/ExcELIN1.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcELIN1.cpp @@ -8,26 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcELIN1::ExcELIN1() {}; -ExcELIN1::~ExcELIN1() {}; +ExcELIN1::ExcELIN1() {} +ExcELIN1::~ExcELIN1() {} static const std::list PossibleProfilesForClass = { @@ -68,207 +53,220 @@ ExcELIN1::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcELIN1_dpnf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_dpnf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dpnf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_efmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_efmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_efmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_efmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_ks1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_ks1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_ks2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_ks2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_smax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_smax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->smax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_tfi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_tfi(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tfi; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_tnu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_tnu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tnu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_ts1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_ts1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_ts2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_ts2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_tsw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_tsw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tsw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_vpi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_vpi(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vpi; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_vpnf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_vpnf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vpnf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_vpu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_vpu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vpu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_xe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_xe(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xe; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcELIN1_dpnf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dpnf; if (!buffer.str().empty()) @@ -282,7 +280,8 @@ bool get_ExcELIN1_dpnf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcELIN1_efmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efmax; if (!buffer.str().empty()) @@ -296,7 +295,8 @@ bool get_ExcELIN1_efmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcELIN1_efmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efmin; if (!buffer.str().empty()) @@ -310,7 +310,8 @@ bool get_ExcELIN1_efmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcELIN1_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks1; if (!buffer.str().empty()) @@ -324,7 +325,8 @@ bool get_ExcELIN1_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN1_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks2; if (!buffer.str().empty()) @@ -338,7 +340,8 @@ bool get_ExcELIN1_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN1_smax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->smax; if (!buffer.str().empty()) @@ -352,7 +355,8 @@ bool get_ExcELIN1_smax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcELIN1_tfi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tfi; if (!buffer.str().empty()) @@ -366,7 +370,8 @@ bool get_ExcELIN1_tfi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN1_tnu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tnu; if (!buffer.str().empty()) @@ -380,7 +385,8 @@ bool get_ExcELIN1_tnu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN1_ts1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts1; if (!buffer.str().empty()) @@ -394,7 +400,8 @@ bool get_ExcELIN1_ts1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN1_ts2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts2; if (!buffer.str().empty()) @@ -408,7 +415,8 @@ bool get_ExcELIN1_ts2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN1_tsw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tsw; if (!buffer.str().empty()) @@ -422,7 +430,8 @@ bool get_ExcELIN1_tsw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN1_vpi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vpi; if (!buffer.str().empty()) @@ -436,7 +445,8 @@ bool get_ExcELIN1_vpi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN1_vpnf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vpnf; if (!buffer.str().empty()) @@ -450,7 +460,8 @@ bool get_ExcELIN1_vpnf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcELIN1_vpu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vpu; if (!buffer.str().empty()) @@ -464,7 +475,8 @@ bool get_ExcELIN1_vpu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN1_xe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xe; if (!buffer.str().empty()) @@ -476,8 +488,6 @@ bool get_ExcELIN1_xe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcELIN1::debugName[] = "ExcELIN1"; const char* ExcELIN1::debugString() const { @@ -486,26 +496,26 @@ const char* ExcELIN1::debugString() const void ExcELIN1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcELIN1"), &ExcELIN1_factory)); + factory_map.emplace("cim:ExcELIN1", &ExcELIN1_factory); } void ExcELIN1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.dpnf"), &assign_ExcELIN1_dpnf)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.efmax"), &assign_ExcELIN1_efmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.efmin"), &assign_ExcELIN1_efmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.ks1"), &assign_ExcELIN1_ks1)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.ks2"), &assign_ExcELIN1_ks2)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.smax"), &assign_ExcELIN1_smax)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.tfi"), &assign_ExcELIN1_tfi)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.tnu"), &assign_ExcELIN1_tnu)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.ts1"), &assign_ExcELIN1_ts1)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.ts2"), &assign_ExcELIN1_ts2)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.tsw"), &assign_ExcELIN1_tsw)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.vpi"), &assign_ExcELIN1_vpi)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.vpnf"), &assign_ExcELIN1_vpnf)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.vpu"), &assign_ExcELIN1_vpu)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.xe"), &assign_ExcELIN1_xe)); + assign_map.emplace("cim:ExcELIN1.dpnf", &assign_ExcELIN1_dpnf); + assign_map.emplace("cim:ExcELIN1.efmax", &assign_ExcELIN1_efmax); + assign_map.emplace("cim:ExcELIN1.efmin", &assign_ExcELIN1_efmin); + assign_map.emplace("cim:ExcELIN1.ks1", &assign_ExcELIN1_ks1); + assign_map.emplace("cim:ExcELIN1.ks2", &assign_ExcELIN1_ks2); + assign_map.emplace("cim:ExcELIN1.smax", &assign_ExcELIN1_smax); + assign_map.emplace("cim:ExcELIN1.tfi", &assign_ExcELIN1_tfi); + assign_map.emplace("cim:ExcELIN1.tnu", &assign_ExcELIN1_tnu); + assign_map.emplace("cim:ExcELIN1.ts1", &assign_ExcELIN1_ts1); + assign_map.emplace("cim:ExcELIN1.ts2", &assign_ExcELIN1_ts2); + assign_map.emplace("cim:ExcELIN1.tsw", &assign_ExcELIN1_tsw); + assign_map.emplace("cim:ExcELIN1.vpi", &assign_ExcELIN1_vpi); + assign_map.emplace("cim:ExcELIN1.vpnf", &assign_ExcELIN1_vpnf); + assign_map.emplace("cim:ExcELIN1.vpu", &assign_ExcELIN1_vpu); + assign_map.emplace("cim:ExcELIN1.xe", &assign_ExcELIN1_xe); } void ExcELIN1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcELIN1.hpp b/CGMES_2.4.13_18DEC2013/ExcELIN1.hpp index 3260ddcae..91e784ce6 100644 --- a/CGMES_2.4.13_18DEC2013/ExcELIN1.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcELIN1.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Static PI transformer fed excitation system: ELIN (VATECH) - simplified model. This model represents an all-static excitation system. A PI voltage controller establishes a desired field current set point for a proportional current controller. The integrator of the PI controller has a follow-up input to match its signal to the present field current. A power system stabilizer with power input is included in the model. - */ + /** \brief Static PI transformer fed excitation system: ELIN (VATECH) - simplified model. This model represents an all-static excitation system. A PI voltage controller establishes a desired field current set point for a proportional current controller. The integrator of the PI controller has a follow-up input to match its signal to the present field current. A power system stabilizer with power input is included in the model. */ class ExcELIN1 : public ExcitationSystemDynamics { public: @@ -28,21 +26,50 @@ namespace CIMPP ExcELIN1(); ~ExcELIN1() override; - CIMPP::PU dpnf; /* Controller follow up dead band (Dpnf). Typical Value = 0. Default: nullptr */ - CIMPP::PU efmax; /* Maximum open circuit excitation voltage (Efmax). Typical Value = 5. Default: nullptr */ - CIMPP::PU efmin; /* Minimum open circuit excitation voltage (Efmin). Typical Value = -5. Default: nullptr */ - CIMPP::PU ks1; /* Stabilizer Gain 1 (Ks1). Typical Value = 0. Default: nullptr */ - CIMPP::PU ks2; /* Stabilizer Gain 2 (Ks2). Typical Value = 0. Default: nullptr */ - CIMPP::PU smax; /* Stabilizer Limit Output (smax). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tfi; /* Current transducer time constant (Tfi). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tnu; /* Controller reset time constant (Tnu). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds ts1; /* Stabilizer Phase Lag Time Constant (Ts1). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds ts2; /* Stabilizer Filter Time Constant (Ts2). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tsw; /* Stabilizer parameters (Tsw). Typical Value = 3. Default: nullptr */ - CIMPP::PU vpi; /* Current controller gain (Vpi). Typical Value = 12.45. Default: nullptr */ - CIMPP::PU vpnf; /* Controller follow up gain (Vpnf). Typical Value = 2. Default: nullptr */ - CIMPP::PU vpu; /* Voltage controller proportional gain (Vpu). Typical Value = 34.5. Default: nullptr */ - CIMPP::PU xe; /* Excitation transformer effective reactance (Xe) (>=0). Xe represents the regulation of the transformer/rectifier unit. Typical Value = 0.06. Default: nullptr */ + /** \brief Controller follow up dead band (Dpnf). Typical Value = 0. Default: nullptr */ + CIMPP::PU dpnf; + + /** \brief Maximum open circuit excitation voltage (Efmax). Typical Value = 5. Default: nullptr */ + CIMPP::PU efmax; + + /** \brief Minimum open circuit excitation voltage (Efmin). Typical Value = -5. Default: nullptr */ + CIMPP::PU efmin; + + /** \brief Stabilizer Gain 1 (Ks1). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks1; + + /** \brief Stabilizer Gain 2 (Ks2). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks2; + + /** \brief Stabilizer Limit Output (smax). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU smax; + + /** \brief Current transducer time constant (Tfi). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tfi; + + /** \brief Controller reset time constant (Tnu). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds tnu; + + /** \brief Stabilizer Phase Lag Time Constant (Ts1). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds ts1; + + /** \brief Stabilizer Filter Time Constant (Ts2). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds ts2; + + /** \brief Stabilizer parameters (Tsw). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds tsw; + + /** \brief Current controller gain (Vpi). Typical Value = 12.45. Default: nullptr */ + CIMPP::PU vpi; + + /** \brief Controller follow up gain (Vpnf). Typical Value = 2. Default: nullptr */ + CIMPP::PU vpnf; + + /** \brief Voltage controller proportional gain (Vpu). Typical Value = 34.5. Default: nullptr */ + CIMPP::PU vpu; + + /** \brief Excitation transformer effective reactance (Xe) (>=0). Xe represents the regulation of the transformer/rectifier unit. Typical Value = 0.06. Default: nullptr */ + CIMPP::PU xe; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcELIN2.cpp b/CGMES_2.4.13_18DEC2013/ExcELIN2.cpp index c61563e77..afd309820 100644 --- a/CGMES_2.4.13_18DEC2013/ExcELIN2.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcELIN2.cpp @@ -8,38 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcELIN2::ExcELIN2() {}; -ExcELIN2::~ExcELIN2() {}; +ExcELIN2::ExcELIN2() {} +ExcELIN2::~ExcELIN2() {} static const std::list PossibleProfilesForClass = { @@ -92,363 +65,388 @@ ExcELIN2::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcELIN2_efdbas(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_efdbas(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdbas; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_iefmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_iefmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->iefmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_iefmax2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_iefmax2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->iefmax2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_iefmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_iefmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->iefmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_k1ec(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_k1ec(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1ec; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_k4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_kd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_kd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_ke2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_ke2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_ketb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_ketb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ketb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_pid1max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_pid1max(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pid1max; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_tb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_tb1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_te2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_te2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_ti1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_ti1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_ti3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_ti3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_ti4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_ti4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_tr4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_tr4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_upmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_upmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->upmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_upmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_upmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->upmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_xp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_xp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcELIN2_efdbas(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdbas; if (!buffer.str().empty()) @@ -462,7 +460,8 @@ bool get_ExcELIN2_efdbas(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcELIN2_iefmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->iefmax; if (!buffer.str().empty()) @@ -476,7 +475,8 @@ bool get_ExcELIN2_iefmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcELIN2_iefmax2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->iefmax2; if (!buffer.str().empty()) @@ -490,7 +490,8 @@ bool get_ExcELIN2_iefmax2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcELIN2_iefmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->iefmin; if (!buffer.str().empty()) @@ -504,7 +505,8 @@ bool get_ExcELIN2_iefmin(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcELIN2_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -518,7 +520,8 @@ bool get_ExcELIN2_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcELIN2_k1ec(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1ec; if (!buffer.str().empty()) @@ -532,7 +535,8 @@ bool get_ExcELIN2_k1ec(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcELIN2_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -546,7 +550,8 @@ bool get_ExcELIN2_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcELIN2_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -560,7 +565,8 @@ bool get_ExcELIN2_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcELIN2_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k4; if (!buffer.str().empty()) @@ -574,7 +580,8 @@ bool get_ExcELIN2_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcELIN2_kd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd1; if (!buffer.str().empty()) @@ -588,7 +595,8 @@ bool get_ExcELIN2_kd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_ke2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke2; if (!buffer.str().empty()) @@ -602,7 +610,8 @@ bool get_ExcELIN2_ke2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_ketb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ketb; if (!buffer.str().empty()) @@ -616,7 +625,8 @@ bool get_ExcELIN2_ketb(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcELIN2_pid1max(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pid1max; if (!buffer.str().empty()) @@ -630,7 +640,8 @@ bool get_ExcELIN2_pid1max(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcELIN2_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -644,7 +655,8 @@ bool get_ExcELIN2_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcELIN2_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -658,7 +670,8 @@ bool get_ExcELIN2_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcELIN2_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb1; if (!buffer.str().empty()) @@ -672,7 +685,8 @@ bool get_ExcELIN2_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -686,7 +700,8 @@ bool get_ExcELIN2_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcELIN2_te2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te2; if (!buffer.str().empty()) @@ -700,7 +715,8 @@ bool get_ExcELIN2_te2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_ti1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti1; if (!buffer.str().empty()) @@ -714,7 +730,8 @@ bool get_ExcELIN2_ti1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_ti3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti3; if (!buffer.str().empty()) @@ -728,7 +745,8 @@ bool get_ExcELIN2_ti3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_ti4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti4; if (!buffer.str().empty()) @@ -742,7 +760,8 @@ bool get_ExcELIN2_ti4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_tr4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr4; if (!buffer.str().empty()) @@ -756,7 +775,8 @@ bool get_ExcELIN2_tr4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_upmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->upmax; if (!buffer.str().empty()) @@ -770,7 +790,8 @@ bool get_ExcELIN2_upmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcELIN2_upmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->upmin; if (!buffer.str().empty()) @@ -784,7 +805,8 @@ bool get_ExcELIN2_upmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcELIN2_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -798,7 +820,8 @@ bool get_ExcELIN2_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -812,7 +835,8 @@ bool get_ExcELIN2_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_xp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xp; if (!buffer.str().empty()) @@ -824,8 +848,6 @@ bool get_ExcELIN2_xp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcELIN2::debugName[] = "ExcELIN2"; const char* ExcELIN2::debugString() const { @@ -834,38 +856,38 @@ const char* ExcELIN2::debugString() const void ExcELIN2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcELIN2"), &ExcELIN2_factory)); + factory_map.emplace("cim:ExcELIN2", &ExcELIN2_factory); } void ExcELIN2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.efdbas"), &assign_ExcELIN2_efdbas)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.iefmax"), &assign_ExcELIN2_iefmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.iefmax2"), &assign_ExcELIN2_iefmax2)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.iefmin"), &assign_ExcELIN2_iefmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.k1"), &assign_ExcELIN2_k1)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.k1ec"), &assign_ExcELIN2_k1ec)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.k2"), &assign_ExcELIN2_k2)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.k3"), &assign_ExcELIN2_k3)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.k4"), &assign_ExcELIN2_k4)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.kd1"), &assign_ExcELIN2_kd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.ke2"), &assign_ExcELIN2_ke2)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.ketb"), &assign_ExcELIN2_ketb)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.pid1max"), &assign_ExcELIN2_pid1max)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.seve1"), &assign_ExcELIN2_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.seve2"), &assign_ExcELIN2_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.tb1"), &assign_ExcELIN2_tb1)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.te"), &assign_ExcELIN2_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.te2"), &assign_ExcELIN2_te2)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.ti1"), &assign_ExcELIN2_ti1)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.ti3"), &assign_ExcELIN2_ti3)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.ti4"), &assign_ExcELIN2_ti4)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.tr4"), &assign_ExcELIN2_tr4)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.upmax"), &assign_ExcELIN2_upmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.upmin"), &assign_ExcELIN2_upmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.ve1"), &assign_ExcELIN2_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.ve2"), &assign_ExcELIN2_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.xp"), &assign_ExcELIN2_xp)); + assign_map.emplace("cim:ExcELIN2.efdbas", &assign_ExcELIN2_efdbas); + assign_map.emplace("cim:ExcELIN2.iefmax", &assign_ExcELIN2_iefmax); + assign_map.emplace("cim:ExcELIN2.iefmax2", &assign_ExcELIN2_iefmax2); + assign_map.emplace("cim:ExcELIN2.iefmin", &assign_ExcELIN2_iefmin); + assign_map.emplace("cim:ExcELIN2.k1", &assign_ExcELIN2_k1); + assign_map.emplace("cim:ExcELIN2.k1ec", &assign_ExcELIN2_k1ec); + assign_map.emplace("cim:ExcELIN2.k2", &assign_ExcELIN2_k2); + assign_map.emplace("cim:ExcELIN2.k3", &assign_ExcELIN2_k3); + assign_map.emplace("cim:ExcELIN2.k4", &assign_ExcELIN2_k4); + assign_map.emplace("cim:ExcELIN2.kd1", &assign_ExcELIN2_kd1); + assign_map.emplace("cim:ExcELIN2.ke2", &assign_ExcELIN2_ke2); + assign_map.emplace("cim:ExcELIN2.ketb", &assign_ExcELIN2_ketb); + assign_map.emplace("cim:ExcELIN2.pid1max", &assign_ExcELIN2_pid1max); + assign_map.emplace("cim:ExcELIN2.seve1", &assign_ExcELIN2_seve1); + assign_map.emplace("cim:ExcELIN2.seve2", &assign_ExcELIN2_seve2); + assign_map.emplace("cim:ExcELIN2.tb1", &assign_ExcELIN2_tb1); + assign_map.emplace("cim:ExcELIN2.te", &assign_ExcELIN2_te); + assign_map.emplace("cim:ExcELIN2.te2", &assign_ExcELIN2_te2); + assign_map.emplace("cim:ExcELIN2.ti1", &assign_ExcELIN2_ti1); + assign_map.emplace("cim:ExcELIN2.ti3", &assign_ExcELIN2_ti3); + assign_map.emplace("cim:ExcELIN2.ti4", &assign_ExcELIN2_ti4); + assign_map.emplace("cim:ExcELIN2.tr4", &assign_ExcELIN2_tr4); + assign_map.emplace("cim:ExcELIN2.upmax", &assign_ExcELIN2_upmax); + assign_map.emplace("cim:ExcELIN2.upmin", &assign_ExcELIN2_upmin); + assign_map.emplace("cim:ExcELIN2.ve1", &assign_ExcELIN2_ve1); + assign_map.emplace("cim:ExcELIN2.ve2", &assign_ExcELIN2_ve2); + assign_map.emplace("cim:ExcELIN2.xp", &assign_ExcELIN2_xp); } void ExcELIN2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcELIN2.hpp b/CGMES_2.4.13_18DEC2013/ExcELIN2.hpp index e2588dab2..b68685963 100644 --- a/CGMES_2.4.13_18DEC2013/ExcELIN2.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcELIN2.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Detailed Excitation System Model - ELIN (VATECH). This model represents an all-static excitation system. A PI voltage controller establishes a desired field current set point for a proportional current controller. The integrator of the PI controller has a follow-up input to match its signal to the present field current. Power system stabilizer models used in conjunction with this excitation system model: PssELIN2, PssIEEE2B, Pss2B. - */ + /** \brief Detailed Excitation System Model - ELIN (VATECH). This model represents an all-static excitation system. A PI voltage controller establishes a desired field current set point for a proportional current controller. The integrator of the PI controller has a follow-up input to match its signal to the present field current. Power system stabilizer models used in conjunction with this excitation system model: PssELIN2, PssIEEE2B, Pss2B. */ class ExcELIN2 : public ExcitationSystemDynamics { public: @@ -28,33 +26,86 @@ namespace CIMPP ExcELIN2(); ~ExcELIN2() override; - CIMPP::PU efdbas; /* Gain (Efdbas). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU iefmax; /* Limiter (Iefmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU iefmax2; /* Minimum open circuit excitation voltage (Iefmax2). Typical Value = -5. Default: nullptr */ - CIMPP::PU iefmin; /* Limiter (Iefmin). Typical Value = 1. Default: nullptr */ - CIMPP::PU k1; /* Voltage regulator input gain (K1). Typical Value = 0. Default: nullptr */ - CIMPP::PU k1ec; /* Voltage regulator input limit (K1ec). Typical Value = 2. Default: nullptr */ - CIMPP::PU k2; /* Gain (K2). Typical Value = 5. Default: nullptr */ - CIMPP::PU k3; /* Gain (K3). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU k4; /* Gain (K4). Typical Value = 0. Default: nullptr */ - CIMPP::PU kd1; /* Voltage controller derivative gain (Kd1). Typical Value = 34.5. Default: nullptr */ - CIMPP::PU ke2; /* Gain (Ke2). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU ketb; /* Gain (Ketb). Typical Value = 0.06. Default: nullptr */ - CIMPP::PU pid1max; /* Controller follow up gain (PID1max). Typical Value = 2. Default: nullptr */ - CIMPP::PU seve1; /* Exciter saturation function value at the corresponding exciter voltage, Ve1, back of commutating reactance (Se[Ve1]). Typical Value = 0. Default: nullptr */ - CIMPP::PU seve2; /* Exciter saturation function value at the corresponding exciter voltage, Ve2, back of commutating reactance (Se[Ve2]). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tb1; /* Voltage controller derivative washout time constant (Tb1). Typical Value = 12.45. Default: nullptr */ - CIMPP::Seconds te; /* Time constant (Te). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te2; /* Time Constant (Te2). Typical Value = 1. Default: nullptr */ - CIMPP::PU ti1; /* Controller follow up dead band (Ti1). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ti3; /* Time constant (Ti3). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds ti4; /* Time constant (Ti4). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tr4; /* Time constant (Tr4). Typical Value = 1. Default: nullptr */ - CIMPP::PU upmax; /* Limiter (Upmax). Typical Value = 3. Default: nullptr */ - CIMPP::PU upmin; /* Limiter (Upmin). Typical Value = 0. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve1). Typical Value = 3. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve2). Typical Value = 0. Default: nullptr */ - CIMPP::PU xp; /* Excitation transformer effective reactance (Xp). Typical Value = 1. Default: nullptr */ + /** \brief Gain (Efdbas). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU efdbas; + + /** \brief Limiter (Iefmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU iefmax; + + /** \brief Minimum open circuit excitation voltage (Iefmax2). Typical Value = -5. Default: nullptr */ + CIMPP::PU iefmax2; + + /** \brief Limiter (Iefmin). Typical Value = 1. Default: nullptr */ + CIMPP::PU iefmin; + + /** \brief Voltage regulator input gain (K1). Typical Value = 0. Default: nullptr */ + CIMPP::PU k1; + + /** \brief Voltage regulator input limit (K1ec). Typical Value = 2. Default: nullptr */ + CIMPP::PU k1ec; + + /** \brief Gain (K2). Typical Value = 5. Default: nullptr */ + CIMPP::PU k2; + + /** \brief Gain (K3). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU k3; + + /** \brief Gain (K4). Typical Value = 0. Default: nullptr */ + CIMPP::PU k4; + + /** \brief Voltage controller derivative gain (Kd1). Typical Value = 34.5. Default: nullptr */ + CIMPP::PU kd1; + + /** \brief Gain (Ke2). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU ke2; + + /** \brief Gain (Ketb). Typical Value = 0.06. Default: nullptr */ + CIMPP::PU ketb; + + /** \brief Controller follow up gain (PID1max). Typical Value = 2. Default: nullptr */ + CIMPP::PU pid1max; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Ve1, back of commutating reactance (Se[Ve1]). Typical Value = 0. Default: nullptr */ + CIMPP::PU seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Ve2, back of commutating reactance (Se[Ve2]). Typical Value = 1. Default: nullptr */ + CIMPP::PU seve2; + + /** \brief Voltage controller derivative washout time constant (Tb1). Typical Value = 12.45. Default: nullptr */ + CIMPP::Seconds tb1; + + /** \brief Time constant (Te). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Time Constant (Te2). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds te2; + + /** \brief Controller follow up dead band (Ti1). Typical Value = 0. Default: nullptr */ + CIMPP::PU ti1; + + /** \brief Time constant (Ti3). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds ti3; + + /** \brief Time constant (Ti4). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ti4; + + /** \brief Time constant (Tr4). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tr4; + + /** \brief Limiter (Upmax). Typical Value = 3. Default: nullptr */ + CIMPP::PU upmax; + + /** \brief Limiter (Upmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU upmin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve1). Typical Value = 3. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve2). Typical Value = 0. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Excitation transformer effective reactance (Xp). Typical Value = 1. Default: nullptr */ + CIMPP::PU xp; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcHU.cpp b/CGMES_2.4.13_18DEC2013/ExcHU.cpp index d7531c435..d00bf89d8 100644 --- a/CGMES_2.4.13_18DEC2013/ExcHU.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcHU.cpp @@ -8,23 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -ExcHU::ExcHU() {}; -ExcHU::~ExcHU() {}; +ExcHU::ExcHU() {} +ExcHU::~ExcHU() {} static const std::list PossibleProfilesForClass = { @@ -62,168 +50,178 @@ ExcHU::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcHU_ae(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_ae(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ae; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_ai(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_ai(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ai; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_atr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_atr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->atr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_emax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_emax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->emax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_emin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_emin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->emin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_imax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_imax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->imax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_imin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_imin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->imin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_ti(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_ti(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcHU_ae(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ae; if (!buffer.str().empty()) @@ -237,7 +235,8 @@ bool get_ExcHU_ae(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_ai(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ai; if (!buffer.str().empty()) @@ -251,7 +250,8 @@ bool get_ExcHU_ai(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_atr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->atr; if (!buffer.str().empty()) @@ -265,7 +265,8 @@ bool get_ExcHU_atr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->emax; if (!buffer.str().empty()) @@ -279,7 +280,8 @@ bool get_ExcHU_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_emin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->emin; if (!buffer.str().empty()) @@ -293,7 +295,8 @@ bool get_ExcHU_emin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_imax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->imax; if (!buffer.str().empty()) @@ -307,7 +310,8 @@ bool get_ExcHU_imax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_imin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->imin; if (!buffer.str().empty()) @@ -321,7 +325,8 @@ bool get_ExcHU_imin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -335,7 +340,8 @@ bool get_ExcHU_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -349,7 +355,8 @@ bool get_ExcHU_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -363,7 +370,8 @@ bool get_ExcHU_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_ti(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti; if (!buffer.str().empty()) @@ -377,7 +385,8 @@ bool get_ExcHU_ti(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -389,8 +398,6 @@ bool get_ExcHU_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcHU::debugName[] = "ExcHU"; const char* ExcHU::debugString() const { @@ -399,23 +406,23 @@ const char* ExcHU::debugString() const void ExcHU::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcHU"), &ExcHU_factory)); + factory_map.emplace("cim:ExcHU", &ExcHU_factory); } void ExcHU::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcHU.ae"), &assign_ExcHU_ae)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.ai"), &assign_ExcHU_ai)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.atr"), &assign_ExcHU_atr)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.emax"), &assign_ExcHU_emax)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.emin"), &assign_ExcHU_emin)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.imax"), &assign_ExcHU_imax)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.imin"), &assign_ExcHU_imin)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.ke"), &assign_ExcHU_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.ki"), &assign_ExcHU_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.te"), &assign_ExcHU_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.ti"), &assign_ExcHU_ti)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.tr"), &assign_ExcHU_tr)); + assign_map.emplace("cim:ExcHU.ae", &assign_ExcHU_ae); + assign_map.emplace("cim:ExcHU.ai", &assign_ExcHU_ai); + assign_map.emplace("cim:ExcHU.atr", &assign_ExcHU_atr); + assign_map.emplace("cim:ExcHU.emax", &assign_ExcHU_emax); + assign_map.emplace("cim:ExcHU.emin", &assign_ExcHU_emin); + assign_map.emplace("cim:ExcHU.imax", &assign_ExcHU_imax); + assign_map.emplace("cim:ExcHU.imin", &assign_ExcHU_imin); + assign_map.emplace("cim:ExcHU.ke", &assign_ExcHU_ke); + assign_map.emplace("cim:ExcHU.ki", &assign_ExcHU_ki); + assign_map.emplace("cim:ExcHU.te", &assign_ExcHU_te); + assign_map.emplace("cim:ExcHU.ti", &assign_ExcHU_ti); + assign_map.emplace("cim:ExcHU.tr", &assign_ExcHU_tr); } void ExcHU::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcHU.hpp b/CGMES_2.4.13_18DEC2013/ExcHU.hpp index 2912bde7e..6e31eb84e 100644 --- a/CGMES_2.4.13_18DEC2013/ExcHU.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcHU.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Hungarian Excitation System Model, with built-in voltage transducer. - */ + /** \brief Hungarian Excitation System Model, with built-in voltage transducer. */ class ExcHU : public ExcitationSystemDynamics { public: @@ -29,18 +27,41 @@ namespace CIMPP ExcHU(); ~ExcHU() override; - CIMPP::PU ae; /* Major loop PI tag gain factor (Ae). Typical Value = 3. Default: nullptr */ - CIMPP::PU ai; /* Minor loop PI tag gain factor (Ai). Typical Value = 22. Default: nullptr */ - CIMPP::PU atr; /* AVR constant (Atr). Typical Value = 2.19. Default: nullptr */ - CIMPP::PU emax; /* Field voltage control signal upper limit on AVR base (Emax). Typical Value = 0.996. Default: nullptr */ - CIMPP::PU emin; /* Field voltage control signal lower limit on AVR base (Emin). Typical Value = -0.866. Default: nullptr */ - CIMPP::PU imax; /* Major loop PI tag output signal upper limit (Imax). Typical Value = 2.19. Default: nullptr */ - CIMPP::PU imin; /* Major loop PI tag output signal lower limit (Imin). Typical Value = 0.1. Default: nullptr */ - CIMPP::Simple_Float ke; /* Voltage base conversion constant (Ke). Typical Value = 4.666. Default: nullptr */ - CIMPP::Simple_Float ki; /* Current base conversion constant (Ki). Typical Value = 0.21428. Default: nullptr */ - CIMPP::Seconds te; /* Major loop PI tag integration time constant (Te). Typical Value = 0.154. Default: nullptr */ - CIMPP::Seconds ti; /* Minor loop PI control tag integration time constant (Ti). Typical Value = 0.01333. Default: nullptr */ - CIMPP::Seconds tr; /* Filter time constant (Tr). If a voltage compensator is used in conjunction with this excitation system model, Tr should be set to 0. Typical Value = 0.01. Default: nullptr */ + /** \brief Major loop PI tag gain factor (Ae). Typical Value = 3. Default: nullptr */ + CIMPP::PU ae; + + /** \brief Minor loop PI tag gain factor (Ai). Typical Value = 22. Default: nullptr */ + CIMPP::PU ai; + + /** \brief AVR constant (Atr). Typical Value = 2.19. Default: nullptr */ + CIMPP::PU atr; + + /** \brief Field voltage control signal upper limit on AVR base (Emax). Typical Value = 0.996. Default: nullptr */ + CIMPP::PU emax; + + /** \brief Field voltage control signal lower limit on AVR base (Emin). Typical Value = -0.866. Default: nullptr */ + CIMPP::PU emin; + + /** \brief Major loop PI tag output signal upper limit (Imax). Typical Value = 2.19. Default: nullptr */ + CIMPP::PU imax; + + /** \brief Major loop PI tag output signal lower limit (Imin). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU imin; + + /** \brief Voltage base conversion constant (Ke). Typical Value = 4.666. Default: nullptr */ + CIMPP::Simple_Float ke; + + /** \brief Current base conversion constant (Ki). Typical Value = 0.21428. Default: nullptr */ + CIMPP::Simple_Float ki; + + /** \brief Major loop PI tag integration time constant (Te). Typical Value = 0.154. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Minor loop PI control tag integration time constant (Ti). Typical Value = 0.01333. Default: nullptr */ + CIMPP::Seconds ti; + + /** \brief Filter time constant (Tr). If a voltage compensator is used in conjunction with this excitation system model, Tr should be set to 0. Typical Value = 0.01. Default: nullptr */ + CIMPP::Seconds tr; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEAC1A.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEAC1A.cpp index 20968d73e..9b4889e3d 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEAC1A.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEAC1A.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEAC1A::ExcIEEEAC1A() {}; -ExcIEEEAC1A::~ExcIEEEAC1A() {}; +ExcIEEEAC1A::ExcIEEEAC1A() {} +ExcIEEEAC1A::~ExcIEEEAC1A() {} static const std::list PossibleProfilesForClass = { @@ -74,246 +56,262 @@ ExcIEEEAC1A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEAC1A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEAC1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -327,7 +325,8 @@ bool get_ExcIEEEAC1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -341,7 +340,8 @@ bool get_ExcIEEEAC1A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -355,7 +355,8 @@ bool get_ExcIEEEAC1A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -369,7 +370,8 @@ bool get_ExcIEEEAC1A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -383,7 +385,8 @@ bool get_ExcIEEEAC1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -397,7 +400,8 @@ bool get_ExcIEEEAC1A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC1A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -411,7 +415,8 @@ bool get_ExcIEEEAC1A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -425,7 +430,8 @@ bool get_ExcIEEEAC1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -439,7 +445,8 @@ bool get_ExcIEEEAC1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -453,7 +460,8 @@ bool get_ExcIEEEAC1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -467,7 +475,8 @@ bool get_ExcIEEEAC1A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -481,7 +490,8 @@ bool get_ExcIEEEAC1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -495,7 +505,8 @@ bool get_ExcIEEEAC1A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC1A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -509,7 +520,8 @@ bool get_ExcIEEEAC1A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC1A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -523,7 +535,8 @@ bool get_ExcIEEEAC1A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC1A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -537,7 +550,8 @@ bool get_ExcIEEEAC1A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -551,7 +565,8 @@ bool get_ExcIEEEAC1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -563,8 +578,6 @@ bool get_ExcIEEEAC1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEAC1A::debugName[] = "ExcIEEEAC1A"; const char* ExcIEEEAC1A::debugString() const { @@ -573,29 +586,29 @@ const char* ExcIEEEAC1A::debugString() const void ExcIEEEAC1A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A"), &ExcIEEEAC1A_factory)); + factory_map.emplace("cim:ExcIEEEAC1A", &ExcIEEEAC1A_factory); } void ExcIEEEAC1A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.ka"), &assign_ExcIEEEAC1A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.kc"), &assign_ExcIEEEAC1A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.kd"), &assign_ExcIEEEAC1A_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.ke"), &assign_ExcIEEEAC1A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.kf"), &assign_ExcIEEEAC1A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.seve1"), &assign_ExcIEEEAC1A_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.seve2"), &assign_ExcIEEEAC1A_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.ta"), &assign_ExcIEEEAC1A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.tb"), &assign_ExcIEEEAC1A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.tc"), &assign_ExcIEEEAC1A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.te"), &assign_ExcIEEEAC1A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.tf"), &assign_ExcIEEEAC1A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.vamax"), &assign_ExcIEEEAC1A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.vamin"), &assign_ExcIEEEAC1A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.ve1"), &assign_ExcIEEEAC1A_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.ve2"), &assign_ExcIEEEAC1A_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.vrmax"), &assign_ExcIEEEAC1A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.vrmin"), &assign_ExcIEEEAC1A_vrmin)); + assign_map.emplace("cim:ExcIEEEAC1A.ka", &assign_ExcIEEEAC1A_ka); + assign_map.emplace("cim:ExcIEEEAC1A.kc", &assign_ExcIEEEAC1A_kc); + assign_map.emplace("cim:ExcIEEEAC1A.kd", &assign_ExcIEEEAC1A_kd); + assign_map.emplace("cim:ExcIEEEAC1A.ke", &assign_ExcIEEEAC1A_ke); + assign_map.emplace("cim:ExcIEEEAC1A.kf", &assign_ExcIEEEAC1A_kf); + assign_map.emplace("cim:ExcIEEEAC1A.seve1", &assign_ExcIEEEAC1A_seve1); + assign_map.emplace("cim:ExcIEEEAC1A.seve2", &assign_ExcIEEEAC1A_seve2); + assign_map.emplace("cim:ExcIEEEAC1A.ta", &assign_ExcIEEEAC1A_ta); + assign_map.emplace("cim:ExcIEEEAC1A.tb", &assign_ExcIEEEAC1A_tb); + assign_map.emplace("cim:ExcIEEEAC1A.tc", &assign_ExcIEEEAC1A_tc); + assign_map.emplace("cim:ExcIEEEAC1A.te", &assign_ExcIEEEAC1A_te); + assign_map.emplace("cim:ExcIEEEAC1A.tf", &assign_ExcIEEEAC1A_tf); + assign_map.emplace("cim:ExcIEEEAC1A.vamax", &assign_ExcIEEEAC1A_vamax); + assign_map.emplace("cim:ExcIEEEAC1A.vamin", &assign_ExcIEEEAC1A_vamin); + assign_map.emplace("cim:ExcIEEEAC1A.ve1", &assign_ExcIEEEAC1A_ve1); + assign_map.emplace("cim:ExcIEEEAC1A.ve2", &assign_ExcIEEEAC1A_ve2); + assign_map.emplace("cim:ExcIEEEAC1A.vrmax", &assign_ExcIEEEAC1A_vrmax); + assign_map.emplace("cim:ExcIEEEAC1A.vrmin", &assign_ExcIEEEAC1A_vrmin); } void ExcIEEEAC1A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEAC1A.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEAC1A.hpp index 1f0f92bab..a3d32c72f 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEAC1A.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEAC1A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type AC1A model. The model represents the field-controlled alternator-rectifier excitation systems designated Type AC1A. These excitation systems consist of an alternator main exciter with non-controlled rectifiers. Reference: IEEE Standard 421.5-2005 Section 6.1. - */ + /** \brief The class represents IEEE Std 421.5-2005 type AC1A model. The model represents the field-controlled alternator-rectifier excitation systems designated Type AC1A. These excitation systems consist of an alternator main exciter with non-controlled rectifiers. Reference: IEEE Standard 421.5-2005 Section 6.1. */ class ExcIEEEAC1A : public ExcitationSystemDynamics { public: @@ -29,24 +27,59 @@ namespace CIMPP ExcIEEEAC1A(); ~ExcIEEEAC1A() override; - CIMPP::PU ka; /* Voltage regulator gain (K). Typical Value = 400. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (K). Typical Value = 0.38. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (K). Typical Value = 0.03. Default: nullptr */ - CIMPP::Simple_Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.1. Default: nullptr */ - CIMPP::Simple_Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.03. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.8. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (V). Typical Value = 14.5. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (V). Typical Value = -14.5. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 4.18. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 3.14. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator outputs (V). Typical Value = 6.03. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator outputs (V). Typical Value = -5.43. Default: nullptr */ + /** \brief Voltage regulator gain (K). Typical Value = 400. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (K). Typical Value = 0.38. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (K). Typical Value = 0.03. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.03. Default: nullptr */ + CIMPP::Simple_Float seve2; + + /** \brief Voltage regulator time constant (T). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.8. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage regulator output (V). Typical Value = 14.5. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -14.5. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 4.18. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 3.14. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Maximum voltage regulator outputs (V). Typical Value = 6.03. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator outputs (V). Typical Value = -5.43. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEAC2A.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEAC2A.cpp index 527a60763..a6f4da576 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEAC2A.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEAC2A.cpp @@ -8,32 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEAC2A::ExcIEEEAC2A() {}; -ExcIEEEAC2A::~ExcIEEEAC2A() {}; +ExcIEEEAC2A::ExcIEEEAC2A() {} +ExcIEEEAC2A::~ExcIEEEAC2A() {} static const std::list PossibleProfilesForClass = { @@ -80,285 +59,304 @@ ExcIEEEAC2A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEAC2A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_kb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_kb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_kh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_vfemax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfemax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEAC2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -372,7 +370,8 @@ bool get_ExcIEEEAC2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_kb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kb; if (!buffer.str().empty()) @@ -386,7 +385,8 @@ bool get_ExcIEEEAC2A_kb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -400,7 +400,8 @@ bool get_ExcIEEEAC2A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -414,7 +415,8 @@ bool get_ExcIEEEAC2A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -428,7 +430,8 @@ bool get_ExcIEEEAC2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -442,7 +445,8 @@ bool get_ExcIEEEAC2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh; if (!buffer.str().empty()) @@ -456,7 +460,8 @@ bool get_ExcIEEEAC2A_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -470,7 +475,8 @@ bool get_ExcIEEEAC2A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC2A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -484,7 +490,8 @@ bool get_ExcIEEEAC2A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -498,7 +505,8 @@ bool get_ExcIEEEAC2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -512,7 +520,8 @@ bool get_ExcIEEEAC2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -526,7 +535,8 @@ bool get_ExcIEEEAC2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -540,7 +550,8 @@ bool get_ExcIEEEAC2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -554,7 +565,8 @@ bool get_ExcIEEEAC2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -568,7 +580,8 @@ bool get_ExcIEEEAC2A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC2A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -582,7 +595,8 @@ bool get_ExcIEEEAC2A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC2A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -596,7 +610,8 @@ bool get_ExcIEEEAC2A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC2A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -610,7 +625,8 @@ bool get_ExcIEEEAC2A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC2A_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfemax; if (!buffer.str().empty()) @@ -624,7 +640,8 @@ bool get_ExcIEEEAC2A_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEAC2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -638,7 +655,8 @@ bool get_ExcIEEEAC2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -650,8 +668,6 @@ bool get_ExcIEEEAC2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEAC2A::debugName[] = "ExcIEEEAC2A"; const char* ExcIEEEAC2A::debugString() const { @@ -660,32 +676,32 @@ const char* ExcIEEEAC2A::debugString() const void ExcIEEEAC2A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A"), &ExcIEEEAC2A_factory)); + factory_map.emplace("cim:ExcIEEEAC2A", &ExcIEEEAC2A_factory); } void ExcIEEEAC2A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.ka"), &assign_ExcIEEEAC2A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.kb"), &assign_ExcIEEEAC2A_kb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.kc"), &assign_ExcIEEEAC2A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.kd"), &assign_ExcIEEEAC2A_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.ke"), &assign_ExcIEEEAC2A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.kf"), &assign_ExcIEEEAC2A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.kh"), &assign_ExcIEEEAC2A_kh)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.seve1"), &assign_ExcIEEEAC2A_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.seve2"), &assign_ExcIEEEAC2A_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.ta"), &assign_ExcIEEEAC2A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.tb"), &assign_ExcIEEEAC2A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.tc"), &assign_ExcIEEEAC2A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.te"), &assign_ExcIEEEAC2A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.tf"), &assign_ExcIEEEAC2A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.vamax"), &assign_ExcIEEEAC2A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.vamin"), &assign_ExcIEEEAC2A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.ve1"), &assign_ExcIEEEAC2A_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.ve2"), &assign_ExcIEEEAC2A_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.vfemax"), &assign_ExcIEEEAC2A_vfemax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.vrmax"), &assign_ExcIEEEAC2A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.vrmin"), &assign_ExcIEEEAC2A_vrmin)); + assign_map.emplace("cim:ExcIEEEAC2A.ka", &assign_ExcIEEEAC2A_ka); + assign_map.emplace("cim:ExcIEEEAC2A.kb", &assign_ExcIEEEAC2A_kb); + assign_map.emplace("cim:ExcIEEEAC2A.kc", &assign_ExcIEEEAC2A_kc); + assign_map.emplace("cim:ExcIEEEAC2A.kd", &assign_ExcIEEEAC2A_kd); + assign_map.emplace("cim:ExcIEEEAC2A.ke", &assign_ExcIEEEAC2A_ke); + assign_map.emplace("cim:ExcIEEEAC2A.kf", &assign_ExcIEEEAC2A_kf); + assign_map.emplace("cim:ExcIEEEAC2A.kh", &assign_ExcIEEEAC2A_kh); + assign_map.emplace("cim:ExcIEEEAC2A.seve1", &assign_ExcIEEEAC2A_seve1); + assign_map.emplace("cim:ExcIEEEAC2A.seve2", &assign_ExcIEEEAC2A_seve2); + assign_map.emplace("cim:ExcIEEEAC2A.ta", &assign_ExcIEEEAC2A_ta); + assign_map.emplace("cim:ExcIEEEAC2A.tb", &assign_ExcIEEEAC2A_tb); + assign_map.emplace("cim:ExcIEEEAC2A.tc", &assign_ExcIEEEAC2A_tc); + assign_map.emplace("cim:ExcIEEEAC2A.te", &assign_ExcIEEEAC2A_te); + assign_map.emplace("cim:ExcIEEEAC2A.tf", &assign_ExcIEEEAC2A_tf); + assign_map.emplace("cim:ExcIEEEAC2A.vamax", &assign_ExcIEEEAC2A_vamax); + assign_map.emplace("cim:ExcIEEEAC2A.vamin", &assign_ExcIEEEAC2A_vamin); + assign_map.emplace("cim:ExcIEEEAC2A.ve1", &assign_ExcIEEEAC2A_ve1); + assign_map.emplace("cim:ExcIEEEAC2A.ve2", &assign_ExcIEEEAC2A_ve2); + assign_map.emplace("cim:ExcIEEEAC2A.vfemax", &assign_ExcIEEEAC2A_vfemax); + assign_map.emplace("cim:ExcIEEEAC2A.vrmax", &assign_ExcIEEEAC2A_vrmax); + assign_map.emplace("cim:ExcIEEEAC2A.vrmin", &assign_ExcIEEEAC2A_vrmin); } void ExcIEEEAC2A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEAC2A.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEAC2A.hpp index 6b56ae099..77dc89d3e 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEAC2A.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEAC2A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type AC2A model. The model represents a high initial response field-controlled alternator-rectifier excitation system. The alternator main exciter is used with non-controlled rectifiers. The Type AC2A model is similar to that of Type AC1A except for the inclusion of exciter time constant compensation and exciter field current limiting elements. Reference: IEEE Standard 421.5-2005 Section 6.2. - */ + /** \brief The class represents IEEE Std 421.5-2005 type AC2A model. The model represents a high initial response field-controlled alternator-rectifier excitation system. The alternator main exciter is used with non-controlled rectifiers. The Type AC2A model is similar to that of Type AC1A except for the inclusion of exciter time constant compensation and exciter field current limiting elements. Reference: IEEE Standard 421.5-2005 Section 6.2. */ class ExcIEEEAC2A : public ExcitationSystemDynamics { public: @@ -29,27 +27,68 @@ namespace CIMPP ExcIEEEAC2A(); ~ExcIEEEAC2A() override; - CIMPP::PU ka; /* Voltage regulator gain (K). Typical Value = 400. Default: nullptr */ - CIMPP::PU kb; /* Second stage regulator gain (K). Typical Value = 25. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.28. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (K). Typical Value = 0.35. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (K). Typical Value = 0.03. Default: nullptr */ - CIMPP::PU kh; /* Exciter field current feedback gain (K). Typical Value = 1. Default: nullptr */ - CIMPP::Simple_Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.037. Default: nullptr */ - CIMPP::Simple_Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.012. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.6. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (V). Typical Value = 8. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (V). Typical Value = -8. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 4.4. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 3.3. Default: nullptr */ - CIMPP::PU vfemax; /* Exciter field current limit reference (V). Typical Value = 4.4. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator outputs (V). Typical Value = 105. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator outputs (V). Typical Value = -95. Default: nullptr */ + /** \brief Voltage regulator gain (K). Typical Value = 400. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Second stage regulator gain (K). Typical Value = 25. Default: nullptr */ + CIMPP::PU kb; + + /** \brief Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.28. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (K). Typical Value = 0.35. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (K). Typical Value = 0.03. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Exciter field current feedback gain (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU kh; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.037. Default: nullptr */ + CIMPP::Simple_Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.012. Default: nullptr */ + CIMPP::Simple_Float seve2; + + /** \brief Voltage regulator time constant (T). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.6. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage regulator output (V). Typical Value = 8. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -8. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 4.4. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 3.3. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Exciter field current limit reference (V). Typical Value = 4.4. Default: nullptr */ + CIMPP::PU vfemax; + + /** \brief Maximum voltage regulator outputs (V). Typical Value = 105. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator outputs (V). Typical Value = -95. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEAC3A.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEAC3A.cpp index a1c6e8392..50d701a41 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEAC3A.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEAC3A.cpp @@ -8,34 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEAC3A::ExcIEEEAC3A() {}; -ExcIEEEAC3A::~ExcIEEEAC3A() {}; +ExcIEEEAC3A::ExcIEEEAC3A() {} +ExcIEEEAC3A::~ExcIEEEAC3A() {} static const std::list PossibleProfilesForClass = { @@ -84,311 +61,332 @@ ExcIEEEAC3A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEAC3A_efdn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_efdn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_klv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_klv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->klv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_kn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_kn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_kr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_kr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_vemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_vemin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vemin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_vfemax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfemax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_vlv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_vlv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vlv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEAC3A_efdn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdn; if (!buffer.str().empty()) @@ -402,7 +400,8 @@ bool get_ExcIEEEAC3A_efdn(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEAC3A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -416,7 +415,8 @@ bool get_ExcIEEEAC3A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -430,7 +430,8 @@ bool get_ExcIEEEAC3A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -444,7 +445,8 @@ bool get_ExcIEEEAC3A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -458,7 +460,8 @@ bool get_ExcIEEEAC3A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -472,7 +475,8 @@ bool get_ExcIEEEAC3A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_klv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->klv; if (!buffer.str().empty()) @@ -486,7 +490,8 @@ bool get_ExcIEEEAC3A_klv(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC3A_kn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kn; if (!buffer.str().empty()) @@ -500,7 +505,8 @@ bool get_ExcIEEEAC3A_kn(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_kr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kr; if (!buffer.str().empty()) @@ -514,7 +520,8 @@ bool get_ExcIEEEAC3A_kr(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -528,7 +535,8 @@ bool get_ExcIEEEAC3A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC3A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -542,7 +550,8 @@ bool get_ExcIEEEAC3A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC3A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -556,7 +565,8 @@ bool get_ExcIEEEAC3A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -570,7 +580,8 @@ bool get_ExcIEEEAC3A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -584,7 +595,8 @@ bool get_ExcIEEEAC3A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -598,7 +610,8 @@ bool get_ExcIEEEAC3A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -612,7 +625,8 @@ bool get_ExcIEEEAC3A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -626,7 +640,8 @@ bool get_ExcIEEEAC3A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC3A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -640,7 +655,8 @@ bool get_ExcIEEEAC3A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC3A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -654,7 +670,8 @@ bool get_ExcIEEEAC3A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC3A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -668,7 +685,8 @@ bool get_ExcIEEEAC3A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC3A_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vemin; if (!buffer.str().empty()) @@ -682,7 +700,8 @@ bool get_ExcIEEEAC3A_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC3A_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfemax; if (!buffer.str().empty()) @@ -696,7 +715,8 @@ bool get_ExcIEEEAC3A_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEAC3A_vlv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vlv; if (!buffer.str().empty()) @@ -708,8 +728,6 @@ bool get_ExcIEEEAC3A_vlv(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } - - const char ExcIEEEAC3A::debugName[] = "ExcIEEEAC3A"; const char* ExcIEEEAC3A::debugString() const { @@ -718,34 +736,34 @@ const char* ExcIEEEAC3A::debugString() const void ExcIEEEAC3A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A"), &ExcIEEEAC3A_factory)); + factory_map.emplace("cim:ExcIEEEAC3A", &ExcIEEEAC3A_factory); } void ExcIEEEAC3A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.efdn"), &assign_ExcIEEEAC3A_efdn)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.ka"), &assign_ExcIEEEAC3A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.kc"), &assign_ExcIEEEAC3A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.kd"), &assign_ExcIEEEAC3A_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.ke"), &assign_ExcIEEEAC3A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.kf"), &assign_ExcIEEEAC3A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.klv"), &assign_ExcIEEEAC3A_klv)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.kn"), &assign_ExcIEEEAC3A_kn)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.kr"), &assign_ExcIEEEAC3A_kr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.seve1"), &assign_ExcIEEEAC3A_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.seve2"), &assign_ExcIEEEAC3A_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.ta"), &assign_ExcIEEEAC3A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.tb"), &assign_ExcIEEEAC3A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.tc"), &assign_ExcIEEEAC3A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.te"), &assign_ExcIEEEAC3A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.tf"), &assign_ExcIEEEAC3A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.vamax"), &assign_ExcIEEEAC3A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.vamin"), &assign_ExcIEEEAC3A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.ve1"), &assign_ExcIEEEAC3A_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.ve2"), &assign_ExcIEEEAC3A_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.vemin"), &assign_ExcIEEEAC3A_vemin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.vfemax"), &assign_ExcIEEEAC3A_vfemax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.vlv"), &assign_ExcIEEEAC3A_vlv)); + assign_map.emplace("cim:ExcIEEEAC3A.efdn", &assign_ExcIEEEAC3A_efdn); + assign_map.emplace("cim:ExcIEEEAC3A.ka", &assign_ExcIEEEAC3A_ka); + assign_map.emplace("cim:ExcIEEEAC3A.kc", &assign_ExcIEEEAC3A_kc); + assign_map.emplace("cim:ExcIEEEAC3A.kd", &assign_ExcIEEEAC3A_kd); + assign_map.emplace("cim:ExcIEEEAC3A.ke", &assign_ExcIEEEAC3A_ke); + assign_map.emplace("cim:ExcIEEEAC3A.kf", &assign_ExcIEEEAC3A_kf); + assign_map.emplace("cim:ExcIEEEAC3A.klv", &assign_ExcIEEEAC3A_klv); + assign_map.emplace("cim:ExcIEEEAC3A.kn", &assign_ExcIEEEAC3A_kn); + assign_map.emplace("cim:ExcIEEEAC3A.kr", &assign_ExcIEEEAC3A_kr); + assign_map.emplace("cim:ExcIEEEAC3A.seve1", &assign_ExcIEEEAC3A_seve1); + assign_map.emplace("cim:ExcIEEEAC3A.seve2", &assign_ExcIEEEAC3A_seve2); + assign_map.emplace("cim:ExcIEEEAC3A.ta", &assign_ExcIEEEAC3A_ta); + assign_map.emplace("cim:ExcIEEEAC3A.tb", &assign_ExcIEEEAC3A_tb); + assign_map.emplace("cim:ExcIEEEAC3A.tc", &assign_ExcIEEEAC3A_tc); + assign_map.emplace("cim:ExcIEEEAC3A.te", &assign_ExcIEEEAC3A_te); + assign_map.emplace("cim:ExcIEEEAC3A.tf", &assign_ExcIEEEAC3A_tf); + assign_map.emplace("cim:ExcIEEEAC3A.vamax", &assign_ExcIEEEAC3A_vamax); + assign_map.emplace("cim:ExcIEEEAC3A.vamin", &assign_ExcIEEEAC3A_vamin); + assign_map.emplace("cim:ExcIEEEAC3A.ve1", &assign_ExcIEEEAC3A_ve1); + assign_map.emplace("cim:ExcIEEEAC3A.ve2", &assign_ExcIEEEAC3A_ve2); + assign_map.emplace("cim:ExcIEEEAC3A.vemin", &assign_ExcIEEEAC3A_vemin); + assign_map.emplace("cim:ExcIEEEAC3A.vfemax", &assign_ExcIEEEAC3A_vfemax); + assign_map.emplace("cim:ExcIEEEAC3A.vlv", &assign_ExcIEEEAC3A_vlv); } void ExcIEEEAC3A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEAC3A.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEAC3A.hpp index c96dae8ef..c8a67fb32 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEAC3A.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEAC3A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type AC3A model. The model represents the field-controlled alternator-rectifier excitation systems designated Type AC3A. These excitation systems include an alternator main exciter with non-controlled rectifiers. The exciter employs self-excitation, and the voltage regulator power is derived from the exciter output voltage. Therefore, this system has an additional nonlinearity, simulated by the use of a multiplier whose inputs are the voltage regulator command signal, , and the exciter output voltage, , times . This model is applicable to excitation systems employing static voltage regulators. Reference: IEEE Standard 421.5-2005 Section 6.3. - */ + /** \brief The class represents IEEE Std 421.5-2005 type AC3A model. The model represents the field-controlled alternator-rectifier excitation systems designated Type AC3A. These excitation systems include an alternator main exciter with non-controlled rectifiers. The exciter employs self-excitation, and the voltage regulator power is derived from the exciter output voltage. Therefore, this system has an additional nonlinearity, simulated by the use of a multiplier whose inputs are the voltage regulator command signal, , and the exciter output voltage, , times . This model is applicable to excitation systems employing static voltage regulators. Reference: IEEE Standard 421.5-2005 Section 6.3. */ class ExcIEEEAC3A : public ExcitationSystemDynamics { public: @@ -29,29 +27,74 @@ namespace CIMPP ExcIEEEAC3A(); ~ExcIEEEAC3A() override; - CIMPP::PU efdn; /* Value of at which feedback gain changes (E). Typical Value = 2.36. Default: nullptr */ - CIMPP::PU ka; /* Voltage regulator gain (K). Typical Value = 45.62. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.104. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (K). Typical Value = 0.499. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (K). Typical Value = 0.143. Default: nullptr */ - CIMPP::PU klv; /* Gain used in the minimum field voltage limiter loop (K). Typical Value = 0.194. Default: nullptr */ - CIMPP::PU kn; /* Excitation control system stabilizer gain (K). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU kr; /* Constant associated with regulator and alternator field power supply (K). Typical Value = 3.77. Default: nullptr */ - CIMPP::Simple_Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 1.143. Default: nullptr */ - CIMPP::Simple_Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0.013. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (T). Typical Value = 1.17. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (V). Typical Value = 1. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (V). Typical Value = -0.95. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (V) equals V(V). Typical Value = 6.24. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 4.68. Default: nullptr */ - CIMPP::PU vemin; /* Minimum exciter voltage output (V). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU vfemax; /* Exciter field current limit reference (V). Typical Value = 16. Default: nullptr */ - CIMPP::PU vlv; /* Field voltage used in the minimum field voltage limiter loop (V). Typical Value = 0.79. Default: nullptr */ + /** \brief Value of at which feedback gain changes (E). Typical Value = 2.36. Default: nullptr */ + CIMPP::PU efdn; + + /** \brief Voltage regulator gain (K). Typical Value = 45.62. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.104. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (K). Typical Value = 0.499. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (K). Typical Value = 0.143. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Gain used in the minimum field voltage limiter loop (K). Typical Value = 0.194. Default: nullptr */ + CIMPP::PU klv; + + /** \brief Excitation control system stabilizer gain (K). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU kn; + + /** \brief Constant associated with regulator and alternator field power supply (K). Typical Value = 3.77. Default: nullptr */ + CIMPP::PU kr; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 1.143. Default: nullptr */ + CIMPP::Simple_Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float seve2; + + /** \brief Voltage regulator time constant (T). Typical Value = 0.013. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (T). Typical Value = 1.17. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage regulator output (V). Typical Value = 1. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -0.95. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (V) equals V(V). Typical Value = 6.24. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 4.68. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Minimum exciter voltage output (V). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU vemin; + + /** \brief Exciter field current limit reference (V). Typical Value = 16. Default: nullptr */ + CIMPP::PU vfemax; + + /** \brief Field voltage used in the minimum field voltage limiter loop (V). Typical Value = 0.79. Default: nullptr */ + CIMPP::PU vlv; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEAC4A.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEAC4A.cpp index 59eeb54d8..e1510a699 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEAC4A.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEAC4A.cpp @@ -8,20 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEAC4A::ExcIEEEAC4A() {}; -ExcIEEEAC4A::~ExcIEEEAC4A() {}; +ExcIEEEAC4A::ExcIEEEAC4A() {} +ExcIEEEAC4A::~ExcIEEEAC4A() {} static const std::list PossibleProfilesForClass = { @@ -56,129 +47,136 @@ ExcIEEEAC4A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEAC4A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC4A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC4A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC4A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC4A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC4A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC4A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC4A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC4A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC4A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC4A_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC4A_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC4A_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC4A_vimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC4A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC4A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC4A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC4A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEAC4A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -192,7 +190,8 @@ bool get_ExcIEEEAC4A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC4A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -206,7 +205,8 @@ bool get_ExcIEEEAC4A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC4A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -220,7 +220,8 @@ bool get_ExcIEEEAC4A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC4A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -234,7 +235,8 @@ bool get_ExcIEEEAC4A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC4A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -248,7 +250,8 @@ bool get_ExcIEEEAC4A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC4A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -262,7 +265,8 @@ bool get_ExcIEEEAC4A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC4A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimin; if (!buffer.str().empty()) @@ -276,7 +280,8 @@ bool get_ExcIEEEAC4A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC4A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -290,7 +295,8 @@ bool get_ExcIEEEAC4A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC4A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -302,8 +308,6 @@ bool get_ExcIEEEAC4A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEAC4A::debugName[] = "ExcIEEEAC4A"; const char* ExcIEEEAC4A::debugString() const { @@ -312,20 +316,20 @@ const char* ExcIEEEAC4A::debugString() const void ExcIEEEAC4A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A"), &ExcIEEEAC4A_factory)); + factory_map.emplace("cim:ExcIEEEAC4A", &ExcIEEEAC4A_factory); } void ExcIEEEAC4A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A.ka"), &assign_ExcIEEEAC4A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A.kc"), &assign_ExcIEEEAC4A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A.ta"), &assign_ExcIEEEAC4A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A.tb"), &assign_ExcIEEEAC4A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A.tc"), &assign_ExcIEEEAC4A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A.vimax"), &assign_ExcIEEEAC4A_vimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A.vimin"), &assign_ExcIEEEAC4A_vimin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A.vrmax"), &assign_ExcIEEEAC4A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A.vrmin"), &assign_ExcIEEEAC4A_vrmin)); + assign_map.emplace("cim:ExcIEEEAC4A.ka", &assign_ExcIEEEAC4A_ka); + assign_map.emplace("cim:ExcIEEEAC4A.kc", &assign_ExcIEEEAC4A_kc); + assign_map.emplace("cim:ExcIEEEAC4A.ta", &assign_ExcIEEEAC4A_ta); + assign_map.emplace("cim:ExcIEEEAC4A.tb", &assign_ExcIEEEAC4A_tb); + assign_map.emplace("cim:ExcIEEEAC4A.tc", &assign_ExcIEEEAC4A_tc); + assign_map.emplace("cim:ExcIEEEAC4A.vimax", &assign_ExcIEEEAC4A_vimax); + assign_map.emplace("cim:ExcIEEEAC4A.vimin", &assign_ExcIEEEAC4A_vimin); + assign_map.emplace("cim:ExcIEEEAC4A.vrmax", &assign_ExcIEEEAC4A_vrmax); + assign_map.emplace("cim:ExcIEEEAC4A.vrmin", &assign_ExcIEEEAC4A_vrmin); } void ExcIEEEAC4A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEAC4A.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEAC4A.hpp index b47be4345..afdfb2fe2 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEAC4A.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEAC4A.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type AC4A model. The model represents type AC4A alternator-supplied controlled-rectifier excitation system which is quite different from the other type ac systems. This high initial response excitation system utilizes a full thyristor bridge in the exciter output circuit. The voltage regulator controls the firing of the thyristor bridges. The exciter alternator uses an independent voltage regulator to control its output voltage to a constant value. These effects are not modeled; however, transient loading effects on the exciter alternator are included. Reference: IEEE Standard 421.5-2005 Section 6.4. - */ + /** \brief The class represents IEEE Std 421.5-2005 type AC4A model. The model represents type AC4A alternator-supplied controlled-rectifier excitation system which is quite different from the other type ac systems. This high initial response excitation system utilizes a full thyristor bridge in the exciter output circuit. The voltage regulator controls the firing of the thyristor bridges. The exciter alternator uses an independent voltage regulator to control its output voltage to a constant value. These effects are not modeled; however, transient loading effects on the exciter alternator are included. Reference: IEEE Standard 421.5-2005 Section 6.4. */ class ExcIEEEAC4A : public ExcitationSystemDynamics { public: @@ -28,15 +26,32 @@ namespace CIMPP ExcIEEEAC4A(); ~ExcIEEEAC4A() override; - CIMPP::PU ka; /* Voltage regulator gain (K). Typical Value = 200. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0.015. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (T). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::PU vimax; /* Maximum voltage regulator input limit (V). Typical Value = 10. Default: nullptr */ - CIMPP::PU vimin; /* Minimum voltage regulator input limit (V). Typical Value = -10. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 5.64. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = -4.53. Default: nullptr */ + /** \brief Voltage regulator gain (K). Typical Value = 200. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Voltage regulator time constant (T). Typical Value = 0.015. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (T). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Maximum voltage regulator input limit (V). Typical Value = 10. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Minimum voltage regulator input limit (V). Typical Value = -10. Default: nullptr */ + CIMPP::PU vimin; + + /** \brief Maximum voltage regulator output (V). Typical Value = 5.64. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -4.53. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEAC5A.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEAC5A.cpp index d036ba505..8187407bd 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEAC5A.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEAC5A.cpp @@ -8,25 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEAC5A::ExcIEEEAC5A() {}; -ExcIEEEAC5A::~ExcIEEEAC5A() {}; +ExcIEEEAC5A::ExcIEEEAC5A() {} +ExcIEEEAC5A::~ExcIEEEAC5A() {} static const std::list PossibleProfilesForClass = { @@ -66,194 +52,206 @@ ExcIEEEAC5A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEAC5A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_seefd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_seefd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_tf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_tf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_tf3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_tf3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEAC5A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -267,7 +265,8 @@ bool get_ExcIEEEAC5A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEAC5A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -281,7 +280,8 @@ bool get_ExcIEEEAC5A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEAC5A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -295,7 +295,8 @@ bool get_ExcIEEEAC5A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC5A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -309,7 +310,8 @@ bool get_ExcIEEEAC5A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC5A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -323,7 +325,8 @@ bool get_ExcIEEEAC5A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC5A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd1; if (!buffer.str().empty()) @@ -337,7 +340,8 @@ bool get_ExcIEEEAC5A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEAC5A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd2; if (!buffer.str().empty()) @@ -351,7 +355,8 @@ bool get_ExcIEEEAC5A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEAC5A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -365,7 +370,8 @@ bool get_ExcIEEEAC5A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC5A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -379,7 +385,8 @@ bool get_ExcIEEEAC5A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC5A_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf1; if (!buffer.str().empty()) @@ -393,7 +400,8 @@ bool get_ExcIEEEAC5A_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC5A_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf2; if (!buffer.str().empty()) @@ -407,7 +415,8 @@ bool get_ExcIEEEAC5A_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC5A_tf3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf3; if (!buffer.str().empty()) @@ -421,7 +430,8 @@ bool get_ExcIEEEAC5A_tf3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC5A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -435,7 +445,8 @@ bool get_ExcIEEEAC5A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC5A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -447,8 +458,6 @@ bool get_ExcIEEEAC5A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEAC5A::debugName[] = "ExcIEEEAC5A"; const char* ExcIEEEAC5A::debugString() const { @@ -457,25 +466,25 @@ const char* ExcIEEEAC5A::debugString() const void ExcIEEEAC5A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A"), &ExcIEEEAC5A_factory)); + factory_map.emplace("cim:ExcIEEEAC5A", &ExcIEEEAC5A_factory); } void ExcIEEEAC5A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.efd1"), &assign_ExcIEEEAC5A_efd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.efd2"), &assign_ExcIEEEAC5A_efd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.ka"), &assign_ExcIEEEAC5A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.ke"), &assign_ExcIEEEAC5A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.kf"), &assign_ExcIEEEAC5A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.seefd1"), &assign_ExcIEEEAC5A_seefd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.seefd2"), &assign_ExcIEEEAC5A_seefd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.ta"), &assign_ExcIEEEAC5A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.te"), &assign_ExcIEEEAC5A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.tf1"), &assign_ExcIEEEAC5A_tf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.tf2"), &assign_ExcIEEEAC5A_tf2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.tf3"), &assign_ExcIEEEAC5A_tf3)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.vrmax"), &assign_ExcIEEEAC5A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.vrmin"), &assign_ExcIEEEAC5A_vrmin)); + assign_map.emplace("cim:ExcIEEEAC5A.efd1", &assign_ExcIEEEAC5A_efd1); + assign_map.emplace("cim:ExcIEEEAC5A.efd2", &assign_ExcIEEEAC5A_efd2); + assign_map.emplace("cim:ExcIEEEAC5A.ka", &assign_ExcIEEEAC5A_ka); + assign_map.emplace("cim:ExcIEEEAC5A.ke", &assign_ExcIEEEAC5A_ke); + assign_map.emplace("cim:ExcIEEEAC5A.kf", &assign_ExcIEEEAC5A_kf); + assign_map.emplace("cim:ExcIEEEAC5A.seefd1", &assign_ExcIEEEAC5A_seefd1); + assign_map.emplace("cim:ExcIEEEAC5A.seefd2", &assign_ExcIEEEAC5A_seefd2); + assign_map.emplace("cim:ExcIEEEAC5A.ta", &assign_ExcIEEEAC5A_ta); + assign_map.emplace("cim:ExcIEEEAC5A.te", &assign_ExcIEEEAC5A_te); + assign_map.emplace("cim:ExcIEEEAC5A.tf1", &assign_ExcIEEEAC5A_tf1); + assign_map.emplace("cim:ExcIEEEAC5A.tf2", &assign_ExcIEEEAC5A_tf2); + assign_map.emplace("cim:ExcIEEEAC5A.tf3", &assign_ExcIEEEAC5A_tf3); + assign_map.emplace("cim:ExcIEEEAC5A.vrmax", &assign_ExcIEEEAC5A_vrmax); + assign_map.emplace("cim:ExcIEEEAC5A.vrmin", &assign_ExcIEEEAC5A_vrmin); } void ExcIEEEAC5A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEAC5A.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEAC5A.hpp index ea97a435f..53b26311c 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEAC5A.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEAC5A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type AC5A model. The model represents a simplified model for brushless excitation systems. The regulator is supplied from a source, such as a permanent magnet generator, which is not affected by system disturbances. Unlike other ac models, this model uses loaded rather than open circuit exciter saturation data in the same way as it is used for the dc models. Because the model has been widely implemented by the industry, it is sometimes used to represent other types of systems when either detailed data for them are not available or simplified models are required. Reference: IEEE Standard 421.5-2005 Section 6.5. - */ + /** \brief The class represents IEEE Std 421.5-2005 type AC5A model. The model represents a simplified model for brushless excitation systems. The regulator is supplied from a source, such as a permanent magnet generator, which is not affected by system disturbances. Unlike other ac models, this model uses loaded rather than open circuit exciter saturation data in the same way as it is used for the dc models. Because the model has been widely implemented by the industry, it is sometimes used to represent other types of systems when either detailed data for them are not available or simplified models are required. Reference: IEEE Standard 421.5-2005 Section 6.5. */ class ExcIEEEAC5A : public ExcitationSystemDynamics { public: @@ -29,20 +27,47 @@ namespace CIMPP ExcIEEEAC5A(); ~ExcIEEEAC5A() override; - CIMPP::PU efd1; /* Exciter voltage at which exciter saturation is defined (E). Typical Value = 5.6. Default: nullptr */ - CIMPP::PU efd2; /* Exciter voltage at which exciter saturation is defined (E). Typical Value = 4.2. Default: nullptr */ - CIMPP::PU ka; /* Voltage regulator gain (K). Typical Value = 400. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (K). Typical Value = 0.03. Default: nullptr */ - CIMPP::Simple_Float seefd1; /* Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.86. Default: nullptr */ - CIMPP::Simple_Float seefd2; /* Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.8. Default: nullptr */ - CIMPP::Seconds tf1; /* Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tf2; /* Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tf3; /* Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 7.3. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = -7.3. Default: nullptr */ + /** \brief Exciter voltage at which exciter saturation is defined (E). Typical Value = 5.6. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Exciter voltage at which exciter saturation is defined (E). Typical Value = 4.2. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief Voltage regulator gain (K). Typical Value = 400. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (K). Typical Value = 0.03. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.86. Default: nullptr */ + CIMPP::Simple_Float seefd1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.5. Default: nullptr */ + CIMPP::Simple_Float seefd2; + + /** \brief Voltage regulator time constant (T). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.8. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf1; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf2; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf3; + + /** \brief Maximum voltage regulator output (V). Typical Value = 7.3. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -7.3. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEAC6A.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEAC6A.cpp index fb81c2571..cf956daff 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEAC6A.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEAC6A.cpp @@ -8,33 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEAC6A::ExcIEEEAC6A() {}; -ExcIEEEAC6A::~ExcIEEEAC6A() {}; +ExcIEEEAC6A::ExcIEEEAC6A() {} +ExcIEEEAC6A::~ExcIEEEAC6A() {} static const std::list PossibleProfilesForClass = { @@ -82,298 +60,318 @@ ExcIEEEAC6A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEAC6A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_kh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_th(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_th(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_tj(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_tj(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tj; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_tk(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_tk(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tk; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_vfelim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_vfelim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfelim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_vhmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_vhmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vhmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEAC6A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -387,7 +385,8 @@ bool get_ExcIEEEAC6A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -401,7 +400,8 @@ bool get_ExcIEEEAC6A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -415,7 +415,8 @@ bool get_ExcIEEEAC6A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -429,7 +430,8 @@ bool get_ExcIEEEAC6A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh; if (!buffer.str().empty()) @@ -443,7 +445,8 @@ bool get_ExcIEEEAC6A_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -457,7 +460,8 @@ bool get_ExcIEEEAC6A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC6A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -471,7 +475,8 @@ bool get_ExcIEEEAC6A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC6A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -485,7 +490,8 @@ bool get_ExcIEEEAC6A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -499,7 +505,8 @@ bool get_ExcIEEEAC6A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -513,7 +520,8 @@ bool get_ExcIEEEAC6A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -527,7 +535,8 @@ bool get_ExcIEEEAC6A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_th(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th; if (!buffer.str().empty()) @@ -541,7 +550,8 @@ bool get_ExcIEEEAC6A_th(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_tj(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tj; if (!buffer.str().empty()) @@ -555,7 +565,8 @@ bool get_ExcIEEEAC6A_tj(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_tk(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tk; if (!buffer.str().empty()) @@ -569,7 +580,8 @@ bool get_ExcIEEEAC6A_tk(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -583,7 +595,8 @@ bool get_ExcIEEEAC6A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC6A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -597,7 +610,8 @@ bool get_ExcIEEEAC6A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC6A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -611,7 +625,8 @@ bool get_ExcIEEEAC6A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC6A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -625,7 +640,8 @@ bool get_ExcIEEEAC6A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC6A_vfelim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfelim; if (!buffer.str().empty()) @@ -639,7 +655,8 @@ bool get_ExcIEEEAC6A_vfelim(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEAC6A_vhmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vhmax; if (!buffer.str().empty()) @@ -653,7 +670,8 @@ bool get_ExcIEEEAC6A_vhmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC6A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -667,7 +685,8 @@ bool get_ExcIEEEAC6A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC6A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -679,8 +698,6 @@ bool get_ExcIEEEAC6A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEAC6A::debugName[] = "ExcIEEEAC6A"; const char* ExcIEEEAC6A::debugString() const { @@ -689,33 +706,33 @@ const char* ExcIEEEAC6A::debugString() const void ExcIEEEAC6A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A"), &ExcIEEEAC6A_factory)); + factory_map.emplace("cim:ExcIEEEAC6A", &ExcIEEEAC6A_factory); } void ExcIEEEAC6A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.ka"), &assign_ExcIEEEAC6A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.kc"), &assign_ExcIEEEAC6A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.kd"), &assign_ExcIEEEAC6A_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.ke"), &assign_ExcIEEEAC6A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.kh"), &assign_ExcIEEEAC6A_kh)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.seve1"), &assign_ExcIEEEAC6A_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.seve2"), &assign_ExcIEEEAC6A_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.ta"), &assign_ExcIEEEAC6A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.tb"), &assign_ExcIEEEAC6A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.tc"), &assign_ExcIEEEAC6A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.te"), &assign_ExcIEEEAC6A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.th"), &assign_ExcIEEEAC6A_th)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.tj"), &assign_ExcIEEEAC6A_tj)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.tk"), &assign_ExcIEEEAC6A_tk)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.vamax"), &assign_ExcIEEEAC6A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.vamin"), &assign_ExcIEEEAC6A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.ve1"), &assign_ExcIEEEAC6A_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.ve2"), &assign_ExcIEEEAC6A_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.vfelim"), &assign_ExcIEEEAC6A_vfelim)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.vhmax"), &assign_ExcIEEEAC6A_vhmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.vrmax"), &assign_ExcIEEEAC6A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.vrmin"), &assign_ExcIEEEAC6A_vrmin)); + assign_map.emplace("cim:ExcIEEEAC6A.ka", &assign_ExcIEEEAC6A_ka); + assign_map.emplace("cim:ExcIEEEAC6A.kc", &assign_ExcIEEEAC6A_kc); + assign_map.emplace("cim:ExcIEEEAC6A.kd", &assign_ExcIEEEAC6A_kd); + assign_map.emplace("cim:ExcIEEEAC6A.ke", &assign_ExcIEEEAC6A_ke); + assign_map.emplace("cim:ExcIEEEAC6A.kh", &assign_ExcIEEEAC6A_kh); + assign_map.emplace("cim:ExcIEEEAC6A.seve1", &assign_ExcIEEEAC6A_seve1); + assign_map.emplace("cim:ExcIEEEAC6A.seve2", &assign_ExcIEEEAC6A_seve2); + assign_map.emplace("cim:ExcIEEEAC6A.ta", &assign_ExcIEEEAC6A_ta); + assign_map.emplace("cim:ExcIEEEAC6A.tb", &assign_ExcIEEEAC6A_tb); + assign_map.emplace("cim:ExcIEEEAC6A.tc", &assign_ExcIEEEAC6A_tc); + assign_map.emplace("cim:ExcIEEEAC6A.te", &assign_ExcIEEEAC6A_te); + assign_map.emplace("cim:ExcIEEEAC6A.th", &assign_ExcIEEEAC6A_th); + assign_map.emplace("cim:ExcIEEEAC6A.tj", &assign_ExcIEEEAC6A_tj); + assign_map.emplace("cim:ExcIEEEAC6A.tk", &assign_ExcIEEEAC6A_tk); + assign_map.emplace("cim:ExcIEEEAC6A.vamax", &assign_ExcIEEEAC6A_vamax); + assign_map.emplace("cim:ExcIEEEAC6A.vamin", &assign_ExcIEEEAC6A_vamin); + assign_map.emplace("cim:ExcIEEEAC6A.ve1", &assign_ExcIEEEAC6A_ve1); + assign_map.emplace("cim:ExcIEEEAC6A.ve2", &assign_ExcIEEEAC6A_ve2); + assign_map.emplace("cim:ExcIEEEAC6A.vfelim", &assign_ExcIEEEAC6A_vfelim); + assign_map.emplace("cim:ExcIEEEAC6A.vhmax", &assign_ExcIEEEAC6A_vhmax); + assign_map.emplace("cim:ExcIEEEAC6A.vrmax", &assign_ExcIEEEAC6A_vrmax); + assign_map.emplace("cim:ExcIEEEAC6A.vrmin", &assign_ExcIEEEAC6A_vrmin); } void ExcIEEEAC6A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEAC6A.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEAC6A.hpp index 8401ea7df..b32c16c38 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEAC6A.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEAC6A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type AC6A model. The model represents field-controlled alternator-rectifier excitation systems with system-supplied electronic voltage regulators. The maximum output of the regulator, , is a function of terminal voltage, . The field current limiter included in the original model AC6A remains in the 2005 update. Reference: IEEE Standard 421.5-2005 Section 6.6. - */ + /** \brief The class represents IEEE Std 421.5-2005 type AC6A model. The model represents field-controlled alternator-rectifier excitation systems with system-supplied electronic voltage regulators. The maximum output of the regulator, , is a function of terminal voltage, . The field current limiter included in the original model AC6A remains in the 2005 update. Reference: IEEE Standard 421.5-2005 Section 6.6. */ class ExcIEEEAC6A : public ExcitationSystemDynamics { public: @@ -29,28 +27,71 @@ namespace CIMPP ExcIEEEAC6A(); ~ExcIEEEAC6A() override; - CIMPP::PU ka; /* Voltage regulator gain (K). Typical Value = 536. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.173. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (K). Typical Value = 1.91. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (K). Typical Value = 1.6. Default: nullptr */ - CIMPP::PU kh; /* Exciter field current limiter gain (K). Typical Value = 92. Default: nullptr */ - CIMPP::Simple_Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.214. Default: nullptr */ - CIMPP::Simple_Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.044. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0.086. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (T). Typical Value = 9. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (T). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (T). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds th; /* Exciter field current limiter time constant (T). Typical Value = 0.08. Default: nullptr */ - CIMPP::Seconds tj; /* Exciter field current limiter time constant (T). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds tk; /* Voltage regulator time constant (T). Typical Value = 0.18. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (V). Typical Value = 75. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (V). Typical Value = -75. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (V) equals V(V). Typical Value = 7.4. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 5.55. Default: nullptr */ - CIMPP::PU vfelim; /* Exciter field current limit reference (V). Typical Value = 19. Default: nullptr */ - CIMPP::PU vhmax; /* Maximum field current limiter signal reference (V). Typical Value = 75. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 44. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = -36. Default: nullptr */ + /** \brief Voltage regulator gain (K). Typical Value = 536. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.173. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (K). Typical Value = 1.91. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter constant related to self-excited field (K). Typical Value = 1.6. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Exciter field current limiter gain (K). Typical Value = 92. Default: nullptr */ + CIMPP::PU kh; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.214. Default: nullptr */ + CIMPP::Simple_Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.044. Default: nullptr */ + CIMPP::Simple_Float seve2; + + /** \brief Voltage regulator time constant (T). Typical Value = 0.086. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (T). Typical Value = 9. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (T). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Exciter field current limiter time constant (T). Typical Value = 0.08. Default: nullptr */ + CIMPP::Seconds th; + + /** \brief Exciter field current limiter time constant (T). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds tj; + + /** \brief Voltage regulator time constant (T). Typical Value = 0.18. Default: nullptr */ + CIMPP::Seconds tk; + + /** \brief Maximum voltage regulator output (V). Typical Value = 75. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -75. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (V) equals V(V). Typical Value = 7.4. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 5.55. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Exciter field current limit reference (V). Typical Value = 19. Default: nullptr */ + CIMPP::PU vfelim; + + /** \brief Maximum field current limiter signal reference (V). Typical Value = 75. Default: nullptr */ + CIMPP::PU vhmax; + + /** \brief Maximum voltage regulator output (V). Typical Value = 44. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -36. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEAC7B.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEAC7B.cpp index 8d00c90d5..92658ed8f 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEAC7B.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEAC7B.cpp @@ -8,37 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEAC7B::ExcIEEEAC7B() {}; -ExcIEEEAC7B::~ExcIEEEAC7B() {}; +ExcIEEEAC7B::ExcIEEEAC7B() {} +ExcIEEEAC7B::~ExcIEEEAC7B() {} static const std::list PossibleProfilesForClass = { @@ -90,350 +64,374 @@ ExcIEEEAC7B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEAC7B_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kdr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kdr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kf3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kf3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kia(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kia; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kir(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kir(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kir; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kpa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kpa(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpa; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kpr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kpr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_tdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_tdr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_vemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_vemin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vemin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_vfemax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfemax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEAC7B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -447,7 +445,8 @@ bool get_ExcIEEEAC7B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC7B_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -461,7 +460,8 @@ bool get_ExcIEEEAC7B_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC7B_kdr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdr; if (!buffer.str().empty()) @@ -475,7 +475,8 @@ bool get_ExcIEEEAC7B_kdr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -489,7 +490,8 @@ bool get_ExcIEEEAC7B_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC7B_kf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf1; if (!buffer.str().empty()) @@ -503,7 +505,8 @@ bool get_ExcIEEEAC7B_kf1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf2; if (!buffer.str().empty()) @@ -517,7 +520,8 @@ bool get_ExcIEEEAC7B_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_kf3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf3; if (!buffer.str().empty()) @@ -531,7 +535,8 @@ bool get_ExcIEEEAC7B_kf3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kia; if (!buffer.str().empty()) @@ -545,7 +550,8 @@ bool get_ExcIEEEAC7B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kir; if (!buffer.str().empty()) @@ -559,7 +565,8 @@ bool get_ExcIEEEAC7B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl; if (!buffer.str().empty()) @@ -573,7 +580,8 @@ bool get_ExcIEEEAC7B_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC7B_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -587,7 +595,8 @@ bool get_ExcIEEEAC7B_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC7B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpa; if (!buffer.str().empty()) @@ -601,7 +610,8 @@ bool get_ExcIEEEAC7B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpr; if (!buffer.str().empty()) @@ -615,7 +625,8 @@ bool get_ExcIEEEAC7B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -629,7 +640,8 @@ bool get_ExcIEEEAC7B_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC7B_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -643,7 +655,8 @@ bool get_ExcIEEEAC7B_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC7B_tdr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdr; if (!buffer.str().empty()) @@ -657,7 +670,8 @@ bool get_ExcIEEEAC7B_tdr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -671,7 +685,8 @@ bool get_ExcIEEEAC7B_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC7B_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -685,7 +700,8 @@ bool get_ExcIEEEAC7B_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC7B_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -699,7 +715,8 @@ bool get_ExcIEEEAC7B_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC7B_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -713,7 +730,8 @@ bool get_ExcIEEEAC7B_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC7B_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -727,7 +745,8 @@ bool get_ExcIEEEAC7B_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -741,7 +760,8 @@ bool get_ExcIEEEAC7B_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vemin; if (!buffer.str().empty()) @@ -755,7 +775,8 @@ bool get_ExcIEEEAC7B_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC7B_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfemax; if (!buffer.str().empty()) @@ -769,7 +790,8 @@ bool get_ExcIEEEAC7B_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEAC7B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -783,7 +805,8 @@ bool get_ExcIEEEAC7B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC7B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -795,8 +818,6 @@ bool get_ExcIEEEAC7B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEAC7B::debugName[] = "ExcIEEEAC7B"; const char* ExcIEEEAC7B::debugString() const { @@ -805,37 +826,37 @@ const char* ExcIEEEAC7B::debugString() const void ExcIEEEAC7B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B"), &ExcIEEEAC7B_factory)); + factory_map.emplace("cim:ExcIEEEAC7B", &ExcIEEEAC7B_factory); } void ExcIEEEAC7B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kc"), &assign_ExcIEEEAC7B_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kd"), &assign_ExcIEEEAC7B_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kdr"), &assign_ExcIEEEAC7B_kdr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.ke"), &assign_ExcIEEEAC7B_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kf1"), &assign_ExcIEEEAC7B_kf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kf2"), &assign_ExcIEEEAC7B_kf2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kf3"), &assign_ExcIEEEAC7B_kf3)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kia"), &assign_ExcIEEEAC7B_kia)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kir"), &assign_ExcIEEEAC7B_kir)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kl"), &assign_ExcIEEEAC7B_kl)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kp"), &assign_ExcIEEEAC7B_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kpa"), &assign_ExcIEEEAC7B_kpa)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kpr"), &assign_ExcIEEEAC7B_kpr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.seve1"), &assign_ExcIEEEAC7B_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.seve2"), &assign_ExcIEEEAC7B_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.tdr"), &assign_ExcIEEEAC7B_tdr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.te"), &assign_ExcIEEEAC7B_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.tf"), &assign_ExcIEEEAC7B_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.vamax"), &assign_ExcIEEEAC7B_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.vamin"), &assign_ExcIEEEAC7B_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.ve1"), &assign_ExcIEEEAC7B_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.ve2"), &assign_ExcIEEEAC7B_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.vemin"), &assign_ExcIEEEAC7B_vemin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.vfemax"), &assign_ExcIEEEAC7B_vfemax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.vrmax"), &assign_ExcIEEEAC7B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.vrmin"), &assign_ExcIEEEAC7B_vrmin)); + assign_map.emplace("cim:ExcIEEEAC7B.kc", &assign_ExcIEEEAC7B_kc); + assign_map.emplace("cim:ExcIEEEAC7B.kd", &assign_ExcIEEEAC7B_kd); + assign_map.emplace("cim:ExcIEEEAC7B.kdr", &assign_ExcIEEEAC7B_kdr); + assign_map.emplace("cim:ExcIEEEAC7B.ke", &assign_ExcIEEEAC7B_ke); + assign_map.emplace("cim:ExcIEEEAC7B.kf1", &assign_ExcIEEEAC7B_kf1); + assign_map.emplace("cim:ExcIEEEAC7B.kf2", &assign_ExcIEEEAC7B_kf2); + assign_map.emplace("cim:ExcIEEEAC7B.kf3", &assign_ExcIEEEAC7B_kf3); + assign_map.emplace("cim:ExcIEEEAC7B.kia", &assign_ExcIEEEAC7B_kia); + assign_map.emplace("cim:ExcIEEEAC7B.kir", &assign_ExcIEEEAC7B_kir); + assign_map.emplace("cim:ExcIEEEAC7B.kl", &assign_ExcIEEEAC7B_kl); + assign_map.emplace("cim:ExcIEEEAC7B.kp", &assign_ExcIEEEAC7B_kp); + assign_map.emplace("cim:ExcIEEEAC7B.kpa", &assign_ExcIEEEAC7B_kpa); + assign_map.emplace("cim:ExcIEEEAC7B.kpr", &assign_ExcIEEEAC7B_kpr); + assign_map.emplace("cim:ExcIEEEAC7B.seve1", &assign_ExcIEEEAC7B_seve1); + assign_map.emplace("cim:ExcIEEEAC7B.seve2", &assign_ExcIEEEAC7B_seve2); + assign_map.emplace("cim:ExcIEEEAC7B.tdr", &assign_ExcIEEEAC7B_tdr); + assign_map.emplace("cim:ExcIEEEAC7B.te", &assign_ExcIEEEAC7B_te); + assign_map.emplace("cim:ExcIEEEAC7B.tf", &assign_ExcIEEEAC7B_tf); + assign_map.emplace("cim:ExcIEEEAC7B.vamax", &assign_ExcIEEEAC7B_vamax); + assign_map.emplace("cim:ExcIEEEAC7B.vamin", &assign_ExcIEEEAC7B_vamin); + assign_map.emplace("cim:ExcIEEEAC7B.ve1", &assign_ExcIEEEAC7B_ve1); + assign_map.emplace("cim:ExcIEEEAC7B.ve2", &assign_ExcIEEEAC7B_ve2); + assign_map.emplace("cim:ExcIEEEAC7B.vemin", &assign_ExcIEEEAC7B_vemin); + assign_map.emplace("cim:ExcIEEEAC7B.vfemax", &assign_ExcIEEEAC7B_vfemax); + assign_map.emplace("cim:ExcIEEEAC7B.vrmax", &assign_ExcIEEEAC7B_vrmax); + assign_map.emplace("cim:ExcIEEEAC7B.vrmin", &assign_ExcIEEEAC7B_vrmin); } void ExcIEEEAC7B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEAC7B.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEAC7B.hpp index cc9972108..8e6afa3e6 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEAC7B.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEAC7B.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type AC7B model. The model represents excitation systems which consist of an ac alternator with either stationary or rotating rectifiers to produce the dc field requirements. It is an upgrade to earlier ac excitation systems, which replace only the controls but retain the ac alternator and diode rectifier bridge. Reference: IEEE Standard 421.5-2005 Section 6.7. In the IEEE Standard 421.5 - 2005, the [1 / sT] block is shown as [1 / (1 + sT)], which is incorrect. - */ + /** \brief The class represents IEEE Std 421.5-2005 type AC7B model. The model represents excitation systems which consist of an ac alternator with either stationary or rotating rectifiers to produce the dc field requirements. It is an upgrade to earlier ac excitation systems, which replace only the controls but retain the ac alternator and diode rectifier bridge. Reference: IEEE Standard 421.5-2005 Section 6.7. In the IEEE Standard 421.5 - 2005, the [1 / sT] block is shown as [1 / (1 + sT)], which is incorrect. */ class ExcIEEEAC7B : public ExcitationSystemDynamics { public: @@ -29,32 +27,83 @@ namespace CIMPP ExcIEEEAC7B(); ~ExcIEEEAC7B() override; - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.18. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (K). Typical Value = 0.02. Default: nullptr */ - CIMPP::PU kdr; /* Voltage regulator derivative gain (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf1; /* Excitation control system stabilizer gain (K). Typical Value = 0.212. Default: nullptr */ - CIMPP::PU kf2; /* Excitation control system stabilizer gain (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU kf3; /* Excitation control system stabilizer gain (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU kia; /* Voltage regulator integral gain (K). Typical Value = 59.69. Default: nullptr */ - CIMPP::PU kir; /* Voltage regulator integral gain (K). Typical Value = 4.24. Default: nullptr */ - CIMPP::PU kl; /* Exciter field voltage lower limit parameter (K). Typical Value = 10. Default: nullptr */ - CIMPP::PU kp; /* Potential circuit gain coefficient (K). Typical Value = 4.96. Default: nullptr */ - CIMPP::PU kpa; /* Voltage regulator proportional gain (K). Typical Value = 65.36. Default: nullptr */ - CIMPP::PU kpr; /* Voltage regulator proportional gain (K). Typical Value = 4.24. Default: nullptr */ - CIMPP::Simple_Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.44. Default: nullptr */ - CIMPP::Simple_Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.075. Default: nullptr */ - CIMPP::Seconds tdr; /* Lag time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (T). Typical Value = 1.1. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (V). Typical Value = 1. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (V). Typical Value = -0.95. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (V) equals V (V). Typical Value = 6.3. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 3.02. Default: nullptr */ - CIMPP::PU vemin; /* Minimum exciter voltage output (V). Typical Value = 0. Default: nullptr */ - CIMPP::PU vfemax; /* Exciter field current limit reference (V). Typical Value = 6.9. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 5.79. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = -5.79. Default: nullptr */ + /** \brief Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.18. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (K). Typical Value = 0.02. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Voltage regulator derivative gain (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU kdr; + + /** \brief Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gain (K). Typical Value = 0.212. Default: nullptr */ + CIMPP::PU kf1; + + /** \brief Excitation control system stabilizer gain (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU kf2; + + /** \brief Excitation control system stabilizer gain (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU kf3; + + /** \brief Voltage regulator integral gain (K). Typical Value = 59.69. Default: nullptr */ + CIMPP::PU kia; + + /** \brief Voltage regulator integral gain (K). Typical Value = 4.24. Default: nullptr */ + CIMPP::PU kir; + + /** \brief Exciter field voltage lower limit parameter (K). Typical Value = 10. Default: nullptr */ + CIMPP::PU kl; + + /** \brief Potential circuit gain coefficient (K). Typical Value = 4.96. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Voltage regulator proportional gain (K). Typical Value = 65.36. Default: nullptr */ + CIMPP::PU kpa; + + /** \brief Voltage regulator proportional gain (K). Typical Value = 4.24. Default: nullptr */ + CIMPP::PU kpr; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.44. Default: nullptr */ + CIMPP::Simple_Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.075. Default: nullptr */ + CIMPP::Simple_Float seve2; + + /** \brief Lag time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tdr; + + /** \brief Exciter time constant, integration rate associated with exciter control (T). Typical Value = 1.1. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage regulator output (V). Typical Value = 1. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -0.95. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (V) equals V (V). Typical Value = 6.3. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 3.02. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Minimum exciter voltage output (V). Typical Value = 0. Default: nullptr */ + CIMPP::PU vemin; + + /** \brief Exciter field current limit reference (V). Typical Value = 6.9. Default: nullptr */ + CIMPP::PU vfemax; + + /** \brief Maximum voltage regulator output (V). Typical Value = 5.79. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -5.79. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEAC8B.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEAC8B.cpp index 110fc2e48..ebf326092 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEAC8B.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEAC8B.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEAC8B::ExcIEEEAC8B() {}; -ExcIEEEAC8B::~ExcIEEEAC8B() {}; +ExcIEEEAC8B::ExcIEEEAC8B() {} +ExcIEEEAC8B::~ExcIEEEAC8B() {} static const std::list PossibleProfilesForClass = { @@ -74,246 +56,262 @@ ExcIEEEAC8B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEAC8B_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_kdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_kdr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kdr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_kir(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_kir(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kir; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_kpr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_kpr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_tdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_tdr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_vemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_vemin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vemin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_vfemax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfemax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEAC8B_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -327,7 +325,8 @@ bool get_ExcIEEEAC8B_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC8B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -341,7 +340,8 @@ bool get_ExcIEEEAC8B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC8B_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -355,7 +355,8 @@ bool get_ExcIEEEAC8B_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC8B_kdr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdr; if (!buffer.str().empty()) @@ -369,7 +370,8 @@ bool get_ExcIEEEAC8B_kdr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC8B_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -383,7 +385,8 @@ bool get_ExcIEEEAC8B_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC8B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kir; if (!buffer.str().empty()) @@ -397,7 +400,8 @@ bool get_ExcIEEEAC8B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC8B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpr; if (!buffer.str().empty()) @@ -411,7 +415,8 @@ bool get_ExcIEEEAC8B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC8B_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -425,7 +430,8 @@ bool get_ExcIEEEAC8B_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC8B_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -439,7 +445,8 @@ bool get_ExcIEEEAC8B_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC8B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -453,7 +460,8 @@ bool get_ExcIEEEAC8B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC8B_tdr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdr; if (!buffer.str().empty()) @@ -467,7 +475,8 @@ bool get_ExcIEEEAC8B_tdr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC8B_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -481,7 +490,8 @@ bool get_ExcIEEEAC8B_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC8B_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -495,7 +505,8 @@ bool get_ExcIEEEAC8B_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC8B_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -509,7 +520,8 @@ bool get_ExcIEEEAC8B_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC8B_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vemin; if (!buffer.str().empty()) @@ -523,7 +535,8 @@ bool get_ExcIEEEAC8B_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC8B_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfemax; if (!buffer.str().empty()) @@ -537,7 +550,8 @@ bool get_ExcIEEEAC8B_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEAC8B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -551,7 +565,8 @@ bool get_ExcIEEEAC8B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC8B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -563,8 +578,6 @@ bool get_ExcIEEEAC8B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEAC8B::debugName[] = "ExcIEEEAC8B"; const char* ExcIEEEAC8B::debugString() const { @@ -573,29 +586,29 @@ const char* ExcIEEEAC8B::debugString() const void ExcIEEEAC8B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B"), &ExcIEEEAC8B_factory)); + factory_map.emplace("cim:ExcIEEEAC8B", &ExcIEEEAC8B_factory); } void ExcIEEEAC8B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.ka"), &assign_ExcIEEEAC8B_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.kc"), &assign_ExcIEEEAC8B_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.kd"), &assign_ExcIEEEAC8B_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.kdr"), &assign_ExcIEEEAC8B_kdr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.ke"), &assign_ExcIEEEAC8B_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.kir"), &assign_ExcIEEEAC8B_kir)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.kpr"), &assign_ExcIEEEAC8B_kpr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.seve1"), &assign_ExcIEEEAC8B_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.seve2"), &assign_ExcIEEEAC8B_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.ta"), &assign_ExcIEEEAC8B_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.tdr"), &assign_ExcIEEEAC8B_tdr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.te"), &assign_ExcIEEEAC8B_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.ve1"), &assign_ExcIEEEAC8B_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.ve2"), &assign_ExcIEEEAC8B_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.vemin"), &assign_ExcIEEEAC8B_vemin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.vfemax"), &assign_ExcIEEEAC8B_vfemax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.vrmax"), &assign_ExcIEEEAC8B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.vrmin"), &assign_ExcIEEEAC8B_vrmin)); + assign_map.emplace("cim:ExcIEEEAC8B.ka", &assign_ExcIEEEAC8B_ka); + assign_map.emplace("cim:ExcIEEEAC8B.kc", &assign_ExcIEEEAC8B_kc); + assign_map.emplace("cim:ExcIEEEAC8B.kd", &assign_ExcIEEEAC8B_kd); + assign_map.emplace("cim:ExcIEEEAC8B.kdr", &assign_ExcIEEEAC8B_kdr); + assign_map.emplace("cim:ExcIEEEAC8B.ke", &assign_ExcIEEEAC8B_ke); + assign_map.emplace("cim:ExcIEEEAC8B.kir", &assign_ExcIEEEAC8B_kir); + assign_map.emplace("cim:ExcIEEEAC8B.kpr", &assign_ExcIEEEAC8B_kpr); + assign_map.emplace("cim:ExcIEEEAC8B.seve1", &assign_ExcIEEEAC8B_seve1); + assign_map.emplace("cim:ExcIEEEAC8B.seve2", &assign_ExcIEEEAC8B_seve2); + assign_map.emplace("cim:ExcIEEEAC8B.ta", &assign_ExcIEEEAC8B_ta); + assign_map.emplace("cim:ExcIEEEAC8B.tdr", &assign_ExcIEEEAC8B_tdr); + assign_map.emplace("cim:ExcIEEEAC8B.te", &assign_ExcIEEEAC8B_te); + assign_map.emplace("cim:ExcIEEEAC8B.ve1", &assign_ExcIEEEAC8B_ve1); + assign_map.emplace("cim:ExcIEEEAC8B.ve2", &assign_ExcIEEEAC8B_ve2); + assign_map.emplace("cim:ExcIEEEAC8B.vemin", &assign_ExcIEEEAC8B_vemin); + assign_map.emplace("cim:ExcIEEEAC8B.vfemax", &assign_ExcIEEEAC8B_vfemax); + assign_map.emplace("cim:ExcIEEEAC8B.vrmax", &assign_ExcIEEEAC8B_vrmax); + assign_map.emplace("cim:ExcIEEEAC8B.vrmin", &assign_ExcIEEEAC8B_vrmin); } void ExcIEEEAC8B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEAC8B.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEAC8B.hpp index a5bb045a6..c9ca37813 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEAC8B.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEAC8B.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type AC8B model. This model represents a PID voltage regulator with either a brushless exciter or dc exciter. The AVR in this model consists of PID control, with separate constants for the proportional (), integral (), and derivative () gains. The representation of the brushless exciter (, , , , ) is similar to the model Type AC2A. The Type AC8B model can be used to represent static voltage regulators applied to brushless excitation systems. Digitally based voltage regulators feeding dc rotating main exciters can be represented with the AC Type AC8B model with the parameters and set to 0. For thyristor power stages fed from the generator terminals, the limits and should be a function of terminal voltage: * and * . Reference: IEEE Standard 421.5-2005 Section 6.8. - */ + /** \brief The class represents IEEE Std 421.5-2005 type AC8B model. This model represents a PID voltage regulator with either a brushless exciter or dc exciter. The AVR in this model consists of PID control, with separate constants for the proportional (), integral (), and derivative () gains. The representation of the brushless exciter (, , , , ) is similar to the model Type AC2A. The Type AC8B model can be used to represent static voltage regulators applied to brushless excitation systems. Digitally based voltage regulators feeding dc rotating main exciters can be represented with the AC Type AC8B model with the parameters and set to 0. For thyristor power stages fed from the generator terminals, the limits and should be a function of terminal voltage: * and * . Reference: IEEE Standard 421.5-2005 Section 6.8. */ class ExcIEEEAC8B : public ExcitationSystemDynamics { public: @@ -29,24 +27,59 @@ namespace CIMPP ExcIEEEAC8B(); ~ExcIEEEAC8B() override; - CIMPP::PU ka; /* Voltage regulator gain (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.55. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (K). Typical Value = 1.1. Default: nullptr */ - CIMPP::PU kdr; /* Voltage regulator derivative gain (K). Typical Value = 10. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kir; /* Voltage regulator integral gain (K). Typical Value = 5. Default: nullptr */ - CIMPP::PU kpr; /* Voltage regulator proportional gain (K). Typical Value = 80. Default: nullptr */ - CIMPP::Simple_Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.3. Default: nullptr */ - CIMPP::Simple_Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tdr; /* Lag time constant (T). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (T). Typical Value = 1.2. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (V) equals V (V). Typical Value = 6.5. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 9. Default: nullptr */ - CIMPP::PU vemin; /* Minimum exciter voltage output (V). Typical Value = 0. Default: nullptr */ - CIMPP::PU vfemax; /* Exciter field current limit reference (V). Typical Value = 6. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 35. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = 0. Default: nullptr */ + /** \brief Voltage regulator gain (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.55. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (K). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Voltage regulator derivative gain (K). Typical Value = 10. Default: nullptr */ + CIMPP::PU kdr; + + /** \brief Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Voltage regulator integral gain (K). Typical Value = 5. Default: nullptr */ + CIMPP::PU kir; + + /** \brief Voltage regulator proportional gain (K). Typical Value = 80. Default: nullptr */ + CIMPP::PU kpr; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.3. Default: nullptr */ + CIMPP::Simple_Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 3. Default: nullptr */ + CIMPP::Simple_Float seve2; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Lag time constant (T). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tdr; + + /** \brief Exciter time constant, integration rate associated with exciter control (T). Typical Value = 1.2. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (V) equals V (V). Typical Value = 6.5. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 9. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Minimum exciter voltage output (V). Typical Value = 0. Default: nullptr */ + CIMPP::PU vemin; + + /** \brief Exciter field current limit reference (V). Typical Value = 6. Default: nullptr */ + CIMPP::PU vfemax; + + /** \brief Maximum voltage regulator output (V). Typical Value = 35. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = 0. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEDC1A.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEDC1A.cpp index 9f8458ed2..51102e7b5 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEDC1A.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEDC1A.cpp @@ -8,27 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEDC1A::ExcIEEEDC1A() {}; -ExcIEEEDC1A::~ExcIEEEDC1A() {}; +ExcIEEEDC1A::ExcIEEEDC1A() {} +ExcIEEEDC1A::~ExcIEEEDC1A() {} static const std::list PossibleProfilesForClass = { @@ -70,220 +54,234 @@ ExcIEEEDC1A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEDC1A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_exclim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exclim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_seefd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_seefd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_uelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEDC1A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -297,7 +295,8 @@ bool get_ExcIEEEDC1A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEDC1A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -311,7 +310,8 @@ bool get_ExcIEEEDC1A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEDC1A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exclim; if (!buffer.str().empty()) @@ -325,7 +325,8 @@ bool get_ExcIEEEDC1A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -339,7 +340,8 @@ bool get_ExcIEEEDC1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC1A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -353,7 +355,8 @@ bool get_ExcIEEEDC1A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -367,7 +370,8 @@ bool get_ExcIEEEDC1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC1A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd1; if (!buffer.str().empty()) @@ -381,7 +385,8 @@ bool get_ExcIEEEDC1A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC1A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd2; if (!buffer.str().empty()) @@ -395,7 +400,8 @@ bool get_ExcIEEEDC1A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -409,7 +415,8 @@ bool get_ExcIEEEDC1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -423,7 +430,8 @@ bool get_ExcIEEEDC1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -437,7 +445,8 @@ bool get_ExcIEEEDC1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC1A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -451,7 +460,8 @@ bool get_ExcIEEEDC1A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -465,7 +475,8 @@ bool get_ExcIEEEDC1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC1A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uelin; if (!buffer.str().empty()) @@ -479,7 +490,8 @@ bool get_ExcIEEEDC1A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEDC1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -493,7 +505,8 @@ bool get_ExcIEEEDC1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEDC1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -505,8 +518,6 @@ bool get_ExcIEEEDC1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEDC1A::debugName[] = "ExcIEEEDC1A"; const char* ExcIEEEDC1A::debugString() const { @@ -515,27 +526,27 @@ const char* ExcIEEEDC1A::debugString() const void ExcIEEEDC1A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A"), &ExcIEEEDC1A_factory)); + factory_map.emplace("cim:ExcIEEEDC1A", &ExcIEEEDC1A_factory); } void ExcIEEEDC1A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.efd1"), &assign_ExcIEEEDC1A_efd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.efd2"), &assign_ExcIEEEDC1A_efd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.exclim"), &assign_ExcIEEEDC1A_exclim)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.ka"), &assign_ExcIEEEDC1A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.ke"), &assign_ExcIEEEDC1A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.kf"), &assign_ExcIEEEDC1A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.seefd1"), &assign_ExcIEEEDC1A_seefd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.seefd2"), &assign_ExcIEEEDC1A_seefd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.ta"), &assign_ExcIEEEDC1A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.tb"), &assign_ExcIEEEDC1A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.tc"), &assign_ExcIEEEDC1A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.te"), &assign_ExcIEEEDC1A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.tf"), &assign_ExcIEEEDC1A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.uelin"), &assign_ExcIEEEDC1A_uelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.vrmax"), &assign_ExcIEEEDC1A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.vrmin"), &assign_ExcIEEEDC1A_vrmin)); + assign_map.emplace("cim:ExcIEEEDC1A.efd1", &assign_ExcIEEEDC1A_efd1); + assign_map.emplace("cim:ExcIEEEDC1A.efd2", &assign_ExcIEEEDC1A_efd2); + assign_map.emplace("cim:ExcIEEEDC1A.exclim", &assign_ExcIEEEDC1A_exclim); + assign_map.emplace("cim:ExcIEEEDC1A.ka", &assign_ExcIEEEDC1A_ka); + assign_map.emplace("cim:ExcIEEEDC1A.ke", &assign_ExcIEEEDC1A_ke); + assign_map.emplace("cim:ExcIEEEDC1A.kf", &assign_ExcIEEEDC1A_kf); + assign_map.emplace("cim:ExcIEEEDC1A.seefd1", &assign_ExcIEEEDC1A_seefd1); + assign_map.emplace("cim:ExcIEEEDC1A.seefd2", &assign_ExcIEEEDC1A_seefd2); + assign_map.emplace("cim:ExcIEEEDC1A.ta", &assign_ExcIEEEDC1A_ta); + assign_map.emplace("cim:ExcIEEEDC1A.tb", &assign_ExcIEEEDC1A_tb); + assign_map.emplace("cim:ExcIEEEDC1A.tc", &assign_ExcIEEEDC1A_tc); + assign_map.emplace("cim:ExcIEEEDC1A.te", &assign_ExcIEEEDC1A_te); + assign_map.emplace("cim:ExcIEEEDC1A.tf", &assign_ExcIEEEDC1A_tf); + assign_map.emplace("cim:ExcIEEEDC1A.uelin", &assign_ExcIEEEDC1A_uelin); + assign_map.emplace("cim:ExcIEEEDC1A.vrmax", &assign_ExcIEEEDC1A_vrmax); + assign_map.emplace("cim:ExcIEEEDC1A.vrmin", &assign_ExcIEEEDC1A_vrmin); } void ExcIEEEDC1A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEDC1A.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEDC1A.hpp index f0f9307c6..b3f403da2 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEDC1A.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEDC1A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type DC1A model. This model represents field-controlled dc commutator exciters with continuously acting voltage regulators (especially the direct-acting rheostatic, rotating amplifier, and magnetic amplifier types). Because this model has been widely implemented by the industry, it is sometimes used to represent other types of systems when detailed data for them are not available or when a simplified model is required. Reference: IEEE Standard 421.5-2005 Section 5.1. - */ + /** \brief The class represents IEEE Std 421.5-2005 type DC1A model. This model represents field-controlled dc commutator exciters with continuously acting voltage regulators (especially the direct-acting rheostatic, rotating amplifier, and magnetic amplifier types). Because this model has been widely implemented by the industry, it is sometimes used to represent other types of systems when detailed data for them are not available or when a simplified model is required. Reference: IEEE Standard 421.5-2005 Section 5.1. */ class ExcIEEEDC1A : public ExcitationSystemDynamics { public: @@ -30,22 +28,53 @@ namespace CIMPP ExcIEEEDC1A(); ~ExcIEEEDC1A() override; - CIMPP::PU efd1; /* Exciter voltage at which exciter saturation is defined (E). Typical Value = 3.1. Default: nullptr */ - CIMPP::PU efd2; /* Exciter voltage at which exciter saturation is defined (E). Typical Value = 2.3. Default: nullptr */ - CIMPP::Boolean exclim; /* (exclim). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero is not applied to integrator output. Typical Value = true. Default: false */ - CIMPP::PU ka; /* Voltage regulator gain (K). Typical Value = 46. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gain (K). Typical Value = 0.1. Default: nullptr */ - CIMPP::Simple_Float seefd1; /* Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.33. Default: nullptr */ - CIMPP::Simple_Float seefd2; /* Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0.06. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.46. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::Boolean uelin; /* UEL input (uelin). true = input is connected to the HV gate false = input connects to the error signal. Typical Value = true. Default: false */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = -0.9. Default: nullptr */ + /** \brief Exciter voltage at which exciter saturation is defined (E). Typical Value = 3.1. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Exciter voltage at which exciter saturation is defined (E). Typical Value = 2.3. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief (exclim). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero is not applied to integrator output. Typical Value = true. Default: false */ + CIMPP::Boolean exclim; + + /** \brief Voltage regulator gain (K). Typical Value = 46. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Exciter constant related to self-excited field (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gain (K). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.33. Default: nullptr */ + CIMPP::Simple_Float seefd1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float seefd2; + + /** \brief Voltage regulator time constant (T). Typical Value = 0.06. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.46. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief UEL input (uelin). true = input is connected to the HV gate false = input connects to the error signal. Typical Value = true. Default: false */ + CIMPP::Boolean uelin; + + /** \brief Maximum voltage regulator output (V). Typical Value = 1. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -0.9. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEDC2A.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEDC2A.cpp index ec1f8a5a4..da3ebc726 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEDC2A.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEDC2A.cpp @@ -8,27 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEDC2A::ExcIEEEDC2A() {}; -ExcIEEEDC2A::~ExcIEEEDC2A() {}; +ExcIEEEDC2A::ExcIEEEDC2A() {} +ExcIEEEDC2A::~ExcIEEEDC2A() {} static const std::list PossibleProfilesForClass = { @@ -70,220 +54,234 @@ ExcIEEEDC2A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEDC2A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_exclim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exclim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_seefd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_seefd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_uelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEDC2A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -297,7 +295,8 @@ bool get_ExcIEEEDC2A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEDC2A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -311,7 +310,8 @@ bool get_ExcIEEEDC2A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEDC2A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exclim; if (!buffer.str().empty()) @@ -325,7 +325,8 @@ bool get_ExcIEEEDC2A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -339,7 +340,8 @@ bool get_ExcIEEEDC2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -353,7 +355,8 @@ bool get_ExcIEEEDC2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -367,7 +370,8 @@ bool get_ExcIEEEDC2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC2A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd1; if (!buffer.str().empty()) @@ -381,7 +385,8 @@ bool get_ExcIEEEDC2A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC2A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd2; if (!buffer.str().empty()) @@ -395,7 +400,8 @@ bool get_ExcIEEEDC2A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -409,7 +415,8 @@ bool get_ExcIEEEDC2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -423,7 +430,8 @@ bool get_ExcIEEEDC2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -437,7 +445,8 @@ bool get_ExcIEEEDC2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -451,7 +460,8 @@ bool get_ExcIEEEDC2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -465,7 +475,8 @@ bool get_ExcIEEEDC2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC2A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uelin; if (!buffer.str().empty()) @@ -479,7 +490,8 @@ bool get_ExcIEEEDC2A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEDC2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -493,7 +505,8 @@ bool get_ExcIEEEDC2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEDC2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -505,8 +518,6 @@ bool get_ExcIEEEDC2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEDC2A::debugName[] = "ExcIEEEDC2A"; const char* ExcIEEEDC2A::debugString() const { @@ -515,27 +526,27 @@ const char* ExcIEEEDC2A::debugString() const void ExcIEEEDC2A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A"), &ExcIEEEDC2A_factory)); + factory_map.emplace("cim:ExcIEEEDC2A", &ExcIEEEDC2A_factory); } void ExcIEEEDC2A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.efd1"), &assign_ExcIEEEDC2A_efd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.efd2"), &assign_ExcIEEEDC2A_efd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.exclim"), &assign_ExcIEEEDC2A_exclim)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.ka"), &assign_ExcIEEEDC2A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.ke"), &assign_ExcIEEEDC2A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.kf"), &assign_ExcIEEEDC2A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.seefd1"), &assign_ExcIEEEDC2A_seefd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.seefd2"), &assign_ExcIEEEDC2A_seefd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.ta"), &assign_ExcIEEEDC2A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.tb"), &assign_ExcIEEEDC2A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.tc"), &assign_ExcIEEEDC2A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.te"), &assign_ExcIEEEDC2A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.tf"), &assign_ExcIEEEDC2A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.uelin"), &assign_ExcIEEEDC2A_uelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.vrmax"), &assign_ExcIEEEDC2A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.vrmin"), &assign_ExcIEEEDC2A_vrmin)); + assign_map.emplace("cim:ExcIEEEDC2A.efd1", &assign_ExcIEEEDC2A_efd1); + assign_map.emplace("cim:ExcIEEEDC2A.efd2", &assign_ExcIEEEDC2A_efd2); + assign_map.emplace("cim:ExcIEEEDC2A.exclim", &assign_ExcIEEEDC2A_exclim); + assign_map.emplace("cim:ExcIEEEDC2A.ka", &assign_ExcIEEEDC2A_ka); + assign_map.emplace("cim:ExcIEEEDC2A.ke", &assign_ExcIEEEDC2A_ke); + assign_map.emplace("cim:ExcIEEEDC2A.kf", &assign_ExcIEEEDC2A_kf); + assign_map.emplace("cim:ExcIEEEDC2A.seefd1", &assign_ExcIEEEDC2A_seefd1); + assign_map.emplace("cim:ExcIEEEDC2A.seefd2", &assign_ExcIEEEDC2A_seefd2); + assign_map.emplace("cim:ExcIEEEDC2A.ta", &assign_ExcIEEEDC2A_ta); + assign_map.emplace("cim:ExcIEEEDC2A.tb", &assign_ExcIEEEDC2A_tb); + assign_map.emplace("cim:ExcIEEEDC2A.tc", &assign_ExcIEEEDC2A_tc); + assign_map.emplace("cim:ExcIEEEDC2A.te", &assign_ExcIEEEDC2A_te); + assign_map.emplace("cim:ExcIEEEDC2A.tf", &assign_ExcIEEEDC2A_tf); + assign_map.emplace("cim:ExcIEEEDC2A.uelin", &assign_ExcIEEEDC2A_uelin); + assign_map.emplace("cim:ExcIEEEDC2A.vrmax", &assign_ExcIEEEDC2A_vrmax); + assign_map.emplace("cim:ExcIEEEDC2A.vrmin", &assign_ExcIEEEDC2A_vrmin); } void ExcIEEEDC2A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEDC2A.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEDC2A.hpp index 86f48c3b7..eab87a37c 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEDC2A.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEDC2A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type DC2A model. This model represents represent field-controlled dc commutator exciters with continuously acting voltage regulators having supplies obtained from the generator or auxiliary bus. It differs from the Type DC1A model only in the voltage regulator output limits, which are now proportional to terminal voltage . It is representative of solid-state replacements for various forms of older mechanical and rotating amplifier regulating equipment connected to dc commutator exciters. Reference: IEEE Standard 421.5-2005 Section 5.2. - */ + /** \brief The class represents IEEE Std 421.5-2005 type DC2A model. This model represents represent field-controlled dc commutator exciters with continuously acting voltage regulators having supplies obtained from the generator or auxiliary bus. It differs from the Type DC1A model only in the voltage regulator output limits, which are now proportional to terminal voltage . It is representative of solid-state replacements for various forms of older mechanical and rotating amplifier regulating equipment connected to dc commutator exciters. Reference: IEEE Standard 421.5-2005 Section 5.2. */ class ExcIEEEDC2A : public ExcitationSystemDynamics { public: @@ -30,22 +28,53 @@ namespace CIMPP ExcIEEEDC2A(); ~ExcIEEEDC2A() override; - CIMPP::PU efd1; /* Exciter voltage at which exciter saturation is defined (E). Typical Value = 3.05. Default: nullptr */ - CIMPP::PU efd2; /* Exciter voltage at which exciter saturation is defined (E). Typical Value = 2.29. Default: nullptr */ - CIMPP::Boolean exclim; /* (exclim). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero is not applied to integrator output. Typical Value = true. Default: false */ - CIMPP::PU ka; /* Voltage regulator gain (K). Typical Value = 300. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gain (K). Typical Value = 0.1. Default: nullptr */ - CIMPP::Simple_Float seefd1; /* Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.279. Default: nullptr */ - CIMPP::Simple_Float seefd2; /* Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.117. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0.01. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (T). Typical Value = 1.33. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (T). Typical Value = 0.675. Default: nullptr */ - CIMPP::Boolean uelin; /* UEL input (uelin). true = input is connected to the HV gate false = input connects to the error signal. Typical Value = true. Default: false */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 4.95. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = -4.9. Default: nullptr */ + /** \brief Exciter voltage at which exciter saturation is defined (E). Typical Value = 3.05. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Exciter voltage at which exciter saturation is defined (E). Typical Value = 2.29. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief (exclim). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero is not applied to integrator output. Typical Value = true. Default: false */ + CIMPP::Boolean exclim; + + /** \brief Voltage regulator gain (K). Typical Value = 300. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gain (K). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.279. Default: nullptr */ + CIMPP::Simple_Float seefd1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.117. Default: nullptr */ + CIMPP::Simple_Float seefd2; + + /** \brief Voltage regulator time constant (T). Typical Value = 0.01. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (T). Typical Value = 1.33. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value = 0.675. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief UEL input (uelin). true = input is connected to the HV gate false = input connects to the error signal. Typical Value = true. Default: false */ + CIMPP::Boolean uelin; + + /** \brief Maximum voltage regulator output (V). Typical Value = 4.95. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -4.9. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEDC3A.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEDC3A.cpp index a137da293..0a3177ee8 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEDC3A.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEDC3A.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEDC3A::ExcIEEEDC3A() {}; -ExcIEEEDC3A::~ExcIEEEDC3A() {}; +ExcIEEEDC3A::ExcIEEEDC3A() {} +ExcIEEEDC3A::~ExcIEEEDC3A() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ ExcIEEEDC3A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEDC3A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_exclim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exclim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_kv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_kv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_seefd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_seefd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_trh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_trh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->trh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEDC3A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_ExcIEEEDC3A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEDC3A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_ExcIEEEDC3A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEDC3A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exclim; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_ExcIEEEDC3A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC3A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_ExcIEEEDC3A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC3A_kv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kv; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_ExcIEEEDC3A_kv(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC3A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd1; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_ExcIEEEDC3A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC3A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd2; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_ExcIEEEDC3A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC3A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_ExcIEEEDC3A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC3A_trh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->trh; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_ExcIEEEDC3A_trh(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEDC3A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_ExcIEEEDC3A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEDC3A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_ExcIEEEDC3A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEDC3A::debugName[] = "ExcIEEEDC3A"; const char* ExcIEEEDC3A::debugString() const { @@ -370,22 +376,22 @@ const char* ExcIEEEDC3A::debugString() const void ExcIEEEDC3A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A"), &ExcIEEEDC3A_factory)); + factory_map.emplace("cim:ExcIEEEDC3A", &ExcIEEEDC3A_factory); } void ExcIEEEDC3A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.efd1"), &assign_ExcIEEEDC3A_efd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.efd2"), &assign_ExcIEEEDC3A_efd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.exclim"), &assign_ExcIEEEDC3A_exclim)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.ke"), &assign_ExcIEEEDC3A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.kv"), &assign_ExcIEEEDC3A_kv)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.seefd1"), &assign_ExcIEEEDC3A_seefd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.seefd2"), &assign_ExcIEEEDC3A_seefd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.te"), &assign_ExcIEEEDC3A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.trh"), &assign_ExcIEEEDC3A_trh)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.vrmax"), &assign_ExcIEEEDC3A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.vrmin"), &assign_ExcIEEEDC3A_vrmin)); + assign_map.emplace("cim:ExcIEEEDC3A.efd1", &assign_ExcIEEEDC3A_efd1); + assign_map.emplace("cim:ExcIEEEDC3A.efd2", &assign_ExcIEEEDC3A_efd2); + assign_map.emplace("cim:ExcIEEEDC3A.exclim", &assign_ExcIEEEDC3A_exclim); + assign_map.emplace("cim:ExcIEEEDC3A.ke", &assign_ExcIEEEDC3A_ke); + assign_map.emplace("cim:ExcIEEEDC3A.kv", &assign_ExcIEEEDC3A_kv); + assign_map.emplace("cim:ExcIEEEDC3A.seefd1", &assign_ExcIEEEDC3A_seefd1); + assign_map.emplace("cim:ExcIEEEDC3A.seefd2", &assign_ExcIEEEDC3A_seefd2); + assign_map.emplace("cim:ExcIEEEDC3A.te", &assign_ExcIEEEDC3A_te); + assign_map.emplace("cim:ExcIEEEDC3A.trh", &assign_ExcIEEEDC3A_trh); + assign_map.emplace("cim:ExcIEEEDC3A.vrmax", &assign_ExcIEEEDC3A_vrmax); + assign_map.emplace("cim:ExcIEEEDC3A.vrmin", &assign_ExcIEEEDC3A_vrmin); } void ExcIEEEDC3A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEDC3A.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEDC3A.hpp index 2fa4ead2c..7c97b2656 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEDC3A.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEDC3A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type DC3A model. This model represents represent older systems, in particular those dc commutator exciters with non-continuously acting regulators that were commonly used before the development of the continuously acting varieties. These systems respond at basically two different rates, depending upon the magnitude of voltage error. For small errors, adjustment is made periodically with a signal to a motor-operated rheostat. Larger errors cause resistors to be quickly shorted or inserted and a strong forcing signal applied to the exciter. Continuous motion of the motor-operated rheostat occurs for these larger error signals, even though it is bypassed by contactor action. Reference: IEEE Standard 421.5-2005 Section 5.3. - */ + /** \brief The class represents IEEE Std 421.5-2005 type DC3A model. This model represents represent older systems, in particular those dc commutator exciters with non-continuously acting regulators that were commonly used before the development of the continuously acting varieties. These systems respond at basically two different rates, depending upon the magnitude of voltage error. For small errors, adjustment is made periodically with a signal to a motor-operated rheostat. Larger errors cause resistors to be quickly shorted or inserted and a strong forcing signal applied to the exciter. Continuous motion of the motor-operated rheostat occurs for these larger error signals, even though it is bypassed by contactor action. Reference: IEEE Standard 421.5-2005 Section 5.3. */ class ExcIEEEDC3A : public ExcitationSystemDynamics { public: @@ -30,17 +28,38 @@ namespace CIMPP ExcIEEEDC3A(); ~ExcIEEEDC3A() override; - CIMPP::PU efd1; /* Exciter voltage at which exciter saturation is defined (E). Typical Value = 3.375. Default: nullptr */ - CIMPP::PU efd2; /* Exciter voltage at which exciter saturation is defined (E). Typical Value = 3.15. Default: nullptr */ - CIMPP::Boolean exclim; /* (exclim). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero is not applied to integrator output. Typical Value = true. Default: false */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (K). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU kv; /* Fast raise/lower contact setting (K). Typical Value = 0.05. Default: nullptr */ - CIMPP::Simple_Float seefd1; /* Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.267. Default: nullptr */ - CIMPP::Simple_Float seefd2; /* Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.068. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds trh; /* Rheostat travel time (T). Typical Value = 20. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = 0. Default: nullptr */ + /** \brief Exciter voltage at which exciter saturation is defined (E). Typical Value = 3.375. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Exciter voltage at which exciter saturation is defined (E). Typical Value = 3.15. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief (exclim). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero is not applied to integrator output. Typical Value = true. Default: false */ + CIMPP::Boolean exclim; + + /** \brief Exciter constant related to self-excited field (K). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Fast raise/lower contact setting (K). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU kv; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.267. Default: nullptr */ + CIMPP::Simple_Float seefd1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.068. Default: nullptr */ + CIMPP::Simple_Float seefd2; + + /** \brief Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Rheostat travel time (T). Typical Value = 20. Default: nullptr */ + CIMPP::Seconds trh; + + /** \brief Maximum voltage regulator output (V). Typical Value = 1. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = 0. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEDC4B.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEDC4B.cpp index 662bf0390..7f3838589 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEDC4B.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEDC4B.cpp @@ -8,30 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEDC4B::ExcIEEEDC4B() {}; -ExcIEEEDC4B::~ExcIEEEDC4B() {}; +ExcIEEEDC4B::ExcIEEEDC4B() {} +ExcIEEEDC4B::~ExcIEEEDC4B() {} static const std::list PossibleProfilesForClass = { @@ -76,259 +57,276 @@ ExcIEEEDC4B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEDC4B_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_oelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_oelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->oelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_seefd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_seefd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_uelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_vemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_vemin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vemin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEDC4B_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -342,7 +340,8 @@ bool get_ExcIEEEDC4B_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEDC4B_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -356,7 +355,8 @@ bool get_ExcIEEEDC4B_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEDC4B_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -370,7 +370,8 @@ bool get_ExcIEEEDC4B_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -384,7 +385,8 @@ bool get_ExcIEEEDC4B_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -398,7 +400,8 @@ bool get_ExcIEEEDC4B_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -412,7 +415,8 @@ bool get_ExcIEEEDC4B_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -426,7 +430,8 @@ bool get_ExcIEEEDC4B_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -440,7 +445,8 @@ bool get_ExcIEEEDC4B_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->oelin; if (!buffer.str().empty()) @@ -454,7 +460,8 @@ bool get_ExcIEEEDC4B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEDC4B_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd1; if (!buffer.str().empty()) @@ -468,7 +475,8 @@ bool get_ExcIEEEDC4B_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC4B_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd2; if (!buffer.str().empty()) @@ -482,7 +490,8 @@ bool get_ExcIEEEDC4B_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC4B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -496,7 +505,8 @@ bool get_ExcIEEEDC4B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -510,7 +520,8 @@ bool get_ExcIEEEDC4B_td(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -524,7 +535,8 @@ bool get_ExcIEEEDC4B_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -538,7 +550,8 @@ bool get_ExcIEEEDC4B_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uelin; if (!buffer.str().empty()) @@ -552,7 +565,8 @@ bool get_ExcIEEEDC4B_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEDC4B_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vemin; if (!buffer.str().empty()) @@ -566,7 +580,8 @@ bool get_ExcIEEEDC4B_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEDC4B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -580,7 +595,8 @@ bool get_ExcIEEEDC4B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEDC4B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -592,8 +608,6 @@ bool get_ExcIEEEDC4B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEDC4B::debugName[] = "ExcIEEEDC4B"; const char* ExcIEEEDC4B::debugString() const { @@ -602,30 +616,30 @@ const char* ExcIEEEDC4B::debugString() const void ExcIEEEDC4B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B"), &ExcIEEEDC4B_factory)); + factory_map.emplace("cim:ExcIEEEDC4B", &ExcIEEEDC4B_factory); } void ExcIEEEDC4B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.efd1"), &assign_ExcIEEEDC4B_efd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.efd2"), &assign_ExcIEEEDC4B_efd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.ka"), &assign_ExcIEEEDC4B_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.kd"), &assign_ExcIEEEDC4B_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.ke"), &assign_ExcIEEEDC4B_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.kf"), &assign_ExcIEEEDC4B_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.ki"), &assign_ExcIEEEDC4B_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.kp"), &assign_ExcIEEEDC4B_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.oelin"), &assign_ExcIEEEDC4B_oelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.seefd1"), &assign_ExcIEEEDC4B_seefd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.seefd2"), &assign_ExcIEEEDC4B_seefd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.ta"), &assign_ExcIEEEDC4B_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.td"), &assign_ExcIEEEDC4B_td)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.te"), &assign_ExcIEEEDC4B_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.tf"), &assign_ExcIEEEDC4B_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.uelin"), &assign_ExcIEEEDC4B_uelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.vemin"), &assign_ExcIEEEDC4B_vemin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.vrmax"), &assign_ExcIEEEDC4B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.vrmin"), &assign_ExcIEEEDC4B_vrmin)); + assign_map.emplace("cim:ExcIEEEDC4B.efd1", &assign_ExcIEEEDC4B_efd1); + assign_map.emplace("cim:ExcIEEEDC4B.efd2", &assign_ExcIEEEDC4B_efd2); + assign_map.emplace("cim:ExcIEEEDC4B.ka", &assign_ExcIEEEDC4B_ka); + assign_map.emplace("cim:ExcIEEEDC4B.kd", &assign_ExcIEEEDC4B_kd); + assign_map.emplace("cim:ExcIEEEDC4B.ke", &assign_ExcIEEEDC4B_ke); + assign_map.emplace("cim:ExcIEEEDC4B.kf", &assign_ExcIEEEDC4B_kf); + assign_map.emplace("cim:ExcIEEEDC4B.ki", &assign_ExcIEEEDC4B_ki); + assign_map.emplace("cim:ExcIEEEDC4B.kp", &assign_ExcIEEEDC4B_kp); + assign_map.emplace("cim:ExcIEEEDC4B.oelin", &assign_ExcIEEEDC4B_oelin); + assign_map.emplace("cim:ExcIEEEDC4B.seefd1", &assign_ExcIEEEDC4B_seefd1); + assign_map.emplace("cim:ExcIEEEDC4B.seefd2", &assign_ExcIEEEDC4B_seefd2); + assign_map.emplace("cim:ExcIEEEDC4B.ta", &assign_ExcIEEEDC4B_ta); + assign_map.emplace("cim:ExcIEEEDC4B.td", &assign_ExcIEEEDC4B_td); + assign_map.emplace("cim:ExcIEEEDC4B.te", &assign_ExcIEEEDC4B_te); + assign_map.emplace("cim:ExcIEEEDC4B.tf", &assign_ExcIEEEDC4B_tf); + assign_map.emplace("cim:ExcIEEEDC4B.uelin", &assign_ExcIEEEDC4B_uelin); + assign_map.emplace("cim:ExcIEEEDC4B.vemin", &assign_ExcIEEEDC4B_vemin); + assign_map.emplace("cim:ExcIEEEDC4B.vrmax", &assign_ExcIEEEDC4B_vrmax); + assign_map.emplace("cim:ExcIEEEDC4B.vrmin", &assign_ExcIEEEDC4B_vrmin); } void ExcIEEEDC4B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEDC4B.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEDC4B.hpp index 94ae70070..b26843190 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEDC4B.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEDC4B.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type DC4B model. These excitation systems utilize a field-controlled dc commutator exciter with a continuously acting voltage regulator having supplies obtained from the generator or auxiliary bus. Reference: IEEE Standard 421.5-2005 Section 5.4. - */ + /** \brief The class represents IEEE Std 421.5-2005 type DC4B model. These excitation systems utilize a field-controlled dc commutator exciter with a continuously acting voltage regulator having supplies obtained from the generator or auxiliary bus. Reference: IEEE Standard 421.5-2005 Section 5.4. */ class ExcIEEEDC4B : public ExcitationSystemDynamics { public: @@ -30,25 +28,62 @@ namespace CIMPP ExcIEEEDC4B(); ~ExcIEEEDC4B() override; - CIMPP::PU efd1; /* Exciter voltage at which exciter saturation is defined (E). Typical Value = 1.75. Default: nullptr */ - CIMPP::PU efd2; /* Exciter voltage at which exciter saturation is defined (E). Typical Value = 2.33. Default: nullptr */ - CIMPP::PU ka; /* Voltage regulator gain (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kd; /* Regulator derivative gain (K). Typical Value = 20. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gain (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU ki; /* Regulator integral gain (K). Typical Value = 20. Default: nullptr */ - CIMPP::PU kp; /* Regulator proportional gain (K). Typical Value = 20. Default: nullptr */ - CIMPP::Boolean oelin; /* OEL input (OELin). true = LV gate false = subtract from error signal. Typical Value = true. Default: false */ - CIMPP::Simple_Float seefd1; /* Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.08. Default: nullptr */ - CIMPP::Simple_Float seefd2; /* Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.27. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0.2. Default: nullptr */ - CIMPP::Seconds td; /* Regulator derivative filter time constant(T). Typical Value = 0.01. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.8. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::Boolean uelin; /* UEL input (UELin). true = HV gate false = add to error signal. Typical Value = true. Default: false */ - CIMPP::PU vemin; /* Minimum exciter voltage output(V). Typical Value = 0. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 2.7. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = -0.9. Default: nullptr */ + /** \brief Exciter voltage at which exciter saturation is defined (E). Typical Value = 1.75. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Exciter voltage at which exciter saturation is defined (E). Typical Value = 2.33. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief Voltage regulator gain (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Regulator derivative gain (K). Typical Value = 20. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gain (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Regulator integral gain (K). Typical Value = 20. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Regulator proportional gain (K). Typical Value = 20. Default: nullptr */ + CIMPP::PU kp; + + /** \brief OEL input (OELin). true = LV gate false = subtract from error signal. Typical Value = true. Default: false */ + CIMPP::Boolean oelin; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.08. Default: nullptr */ + CIMPP::Simple_Float seefd1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.27. Default: nullptr */ + CIMPP::Simple_Float seefd2; + + /** \brief Voltage regulator time constant (T). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Regulator derivative filter time constant(T). Typical Value = 0.01. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.8. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief UEL input (UELin). true = HV gate false = add to error signal. Typical Value = true. Default: false */ + CIMPP::Boolean uelin; + + /** \brief Minimum exciter voltage output(V). Typical Value = 0. Default: nullptr */ + CIMPP::PU vemin; + + /** \brief Maximum voltage regulator output (V). Typical Value = 2.7. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -0.9. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEST1A.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEST1A.cpp index 2b5f7af83..17ef6c50f 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEST1A.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEST1A.cpp @@ -8,30 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "ExcIEEEST1AUELselectorKind.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEST1A::ExcIEEEST1A() {}; -ExcIEEEST1A::~ExcIEEEST1A() {}; +ExcIEEEST1A::ExcIEEEST1A() {} +ExcIEEEST1A::~ExcIEEEST1A() {} static const std::list PossibleProfilesForClass = { @@ -76,259 +57,276 @@ ExcIEEEST1A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEST1A_ilr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_ilr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ilr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_klr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_klr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->klr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_pssin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_pssin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pssin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_tb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_tb1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_tc1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_tc1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_uelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_vimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEST1A_ilr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ilr; if (!buffer.str().empty()) @@ -342,7 +340,8 @@ bool get_ExcIEEEST1A_ilr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -356,7 +355,8 @@ bool get_ExcIEEEST1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST1A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -370,7 +370,8 @@ bool get_ExcIEEEST1A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -384,7 +385,8 @@ bool get_ExcIEEEST1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST1A_klr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->klr; if (!buffer.str().empty()) @@ -398,7 +400,8 @@ bool get_ExcIEEEST1A_klr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST1A_pssin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pssin; if (!buffer.str().empty()) @@ -412,7 +415,8 @@ bool get_ExcIEEEST1A_pssin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -426,7 +430,8 @@ bool get_ExcIEEEST1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -440,7 +445,8 @@ bool get_ExcIEEEST1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST1A_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb1; if (!buffer.str().empty()) @@ -454,7 +460,8 @@ bool get_ExcIEEEST1A_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -468,7 +475,8 @@ bool get_ExcIEEEST1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST1A_tc1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc1; if (!buffer.str().empty()) @@ -482,7 +490,8 @@ bool get_ExcIEEEST1A_tc1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -494,9 +503,25 @@ bool get_ExcIEEEST1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } +bool get_ExcIEEEST1A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->uelin; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_ExcIEEEST1A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -510,7 +535,8 @@ bool get_ExcIEEEST1A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST1A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -524,7 +550,8 @@ bool get_ExcIEEEST1A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST1A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -538,7 +565,8 @@ bool get_ExcIEEEST1A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST1A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimin; if (!buffer.str().empty()) @@ -552,7 +580,8 @@ bool get_ExcIEEEST1A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -566,7 +595,8 @@ bool get_ExcIEEEST1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -578,22 +608,6 @@ bool get_ExcIEEEST1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - -bool get_ExcIEEEST1A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->uelin; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char ExcIEEEST1A::debugName[] = "ExcIEEEST1A"; const char* ExcIEEEST1A::debugString() const { @@ -602,30 +616,30 @@ const char* ExcIEEEST1A::debugString() const void ExcIEEEST1A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A"), &ExcIEEEST1A_factory)); + factory_map.emplace("cim:ExcIEEEST1A", &ExcIEEEST1A_factory); } void ExcIEEEST1A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.ilr"), &assign_ExcIEEEST1A_ilr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.ka"), &assign_ExcIEEEST1A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.kc"), &assign_ExcIEEEST1A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.kf"), &assign_ExcIEEEST1A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.klr"), &assign_ExcIEEEST1A_klr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.pssin"), &assign_ExcIEEEST1A_pssin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.ta"), &assign_ExcIEEEST1A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.tb"), &assign_ExcIEEEST1A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.tb1"), &assign_ExcIEEEST1A_tb1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.tc"), &assign_ExcIEEEST1A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.tc1"), &assign_ExcIEEEST1A_tc1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.tf"), &assign_ExcIEEEST1A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.uelin"), &assign_ExcIEEEST1A_uelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.vamax"), &assign_ExcIEEEST1A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.vamin"), &assign_ExcIEEEST1A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.vimax"), &assign_ExcIEEEST1A_vimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.vimin"), &assign_ExcIEEEST1A_vimin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.vrmax"), &assign_ExcIEEEST1A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.vrmin"), &assign_ExcIEEEST1A_vrmin)); + assign_map.emplace("cim:ExcIEEEST1A.ilr", &assign_ExcIEEEST1A_ilr); + assign_map.emplace("cim:ExcIEEEST1A.ka", &assign_ExcIEEEST1A_ka); + assign_map.emplace("cim:ExcIEEEST1A.kc", &assign_ExcIEEEST1A_kc); + assign_map.emplace("cim:ExcIEEEST1A.kf", &assign_ExcIEEEST1A_kf); + assign_map.emplace("cim:ExcIEEEST1A.klr", &assign_ExcIEEEST1A_klr); + assign_map.emplace("cim:ExcIEEEST1A.pssin", &assign_ExcIEEEST1A_pssin); + assign_map.emplace("cim:ExcIEEEST1A.ta", &assign_ExcIEEEST1A_ta); + assign_map.emplace("cim:ExcIEEEST1A.tb", &assign_ExcIEEEST1A_tb); + assign_map.emplace("cim:ExcIEEEST1A.tb1", &assign_ExcIEEEST1A_tb1); + assign_map.emplace("cim:ExcIEEEST1A.tc", &assign_ExcIEEEST1A_tc); + assign_map.emplace("cim:ExcIEEEST1A.tc1", &assign_ExcIEEEST1A_tc1); + assign_map.emplace("cim:ExcIEEEST1A.tf", &assign_ExcIEEEST1A_tf); + assign_map.emplace("cim:ExcIEEEST1A.uelin", &assign_ExcIEEEST1A_uelin); + assign_map.emplace("cim:ExcIEEEST1A.vamax", &assign_ExcIEEEST1A_vamax); + assign_map.emplace("cim:ExcIEEEST1A.vamin", &assign_ExcIEEEST1A_vamin); + assign_map.emplace("cim:ExcIEEEST1A.vimax", &assign_ExcIEEEST1A_vimax); + assign_map.emplace("cim:ExcIEEEST1A.vimin", &assign_ExcIEEEST1A_vimin); + assign_map.emplace("cim:ExcIEEEST1A.vrmax", &assign_ExcIEEEST1A_vrmax); + assign_map.emplace("cim:ExcIEEEST1A.vrmin", &assign_ExcIEEEST1A_vrmin); } void ExcIEEEST1A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEST1A.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEST1A.hpp index 76c53769f..66d916386 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEST1A.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEST1A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type ST1A model. This model represents systems in which excitation power is supplied through a transformer from the generator terminals (or the unit's auxiliary bus) and is regulated by a controlled rectifier. The maximum exciter voltage available from such systems is directly related to the generator terminal voltage. Reference: IEEE Standard 421.5-2005 Section 7.1. - */ + /** \brief The class represents IEEE Std 421.5-2005 type ST1A model. This model represents systems in which excitation power is supplied through a transformer from the generator terminals (or the unit's auxiliary bus) and is regulated by a controlled rectifier. The maximum exciter voltage available from such systems is directly related to the generator terminal voltage. Reference: IEEE Standard 421.5-2005 Section 7.1. */ class ExcIEEEST1A : public ExcitationSystemDynamics { public: @@ -30,25 +28,62 @@ namespace CIMPP ExcIEEEST1A(); ~ExcIEEEST1A() override; - CIMPP::PU ilr; /* Exciter output current limit reference (I). Typical Value = 0. Default: nullptr */ - CIMPP::PU ka; /* Voltage regulator gain (K). Typical Value = 190. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.08. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU klr; /* Exciter output current limiter gain (K). Typical Value = 0. Default: nullptr */ - CIMPP::Boolean pssin; /* Selector of the Power System Stabilizer (PSS) input (PSSin). true = PSS input (Vs) added to error signal false = PSS input (Vs) added to voltage regulator output. Typical Value = true. Default: false */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (T). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds tb1; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tc1; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::ExcIEEEST1AUELselectorKind uelin; /* Selector of the connection of the UEL input (UELin). Typical Value = ignoreUELsignal. Default: 0 */ - CIMPP::PU vamax; /* Maximum voltage regulator output (V). Typical Value = 14.5. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (V). Typical Value = -14.5. Default: nullptr */ - CIMPP::PU vimax; /* Maximum voltage regulator input limit (V). Typical Value = 999. Default: nullptr */ - CIMPP::PU vimin; /* Minimum voltage regulator input limit (V). Typical Value = -999. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator outputs (V). Typical Value = 7.8. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator outputs (V). Typical Value = -6.7. Default: nullptr */ + /** \brief Exciter output current limit reference (I). Typical Value = 0. Default: nullptr */ + CIMPP::PU ilr; + + /** \brief Voltage regulator gain (K). Typical Value = 190. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.08. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Excitation control system stabilizer gains (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Exciter output current limiter gain (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU klr; + + /** \brief Selector of the Power System Stabilizer (PSS) input (PSSin). true = PSS input (Vs) added to error signal false = PSS input (Vs) added to voltage regulator output. Typical Value = true. Default: false */ + CIMPP::Boolean pssin; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (T). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb1; + + /** \brief Voltage regulator time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc1; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Selector of the connection of the UEL input (UELin). Typical Value = ignoreUELsignal. Default: 0 */ + CIMPP::ExcIEEEST1AUELselectorKind uelin; + + /** \brief Maximum voltage regulator output (V). Typical Value = 14.5. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -14.5. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Maximum voltage regulator input limit (V). Typical Value = 999. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Minimum voltage regulator input limit (V). Typical Value = -999. Default: nullptr */ + CIMPP::PU vimin; + + /** \brief Maximum voltage regulator outputs (V). Typical Value = 7.8. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator outputs (V). Typical Value = -6.7. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEST1AUELselectorKind.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEST1AUELselectorKind.cpp index cac712136..bdc148294 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEST1AUELselectorKind.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEST1AUELselectorKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "ExcIEEEST1AUELselectorKind") + if (EnumSymbol.substr(0, pos) != "ExcIEEEST1AUELselectorKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,22 +50,22 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "ignoreUELsignal") + if (EnumSymbol == "ignoreUELsignal") { rop = ExcIEEEST1AUELselectorKind::ignoreUELsignal; return lop; } - if(EnumSymbol == "inputHVgateVoltageOutput") + if (EnumSymbol == "inputHVgateVoltageOutput") { rop = ExcIEEEST1AUELselectorKind::inputHVgateVoltageOutput; return lop; } - if(EnumSymbol == "inputHVgateErrorSignal") + if (EnumSymbol == "inputHVgateErrorSignal") { rop = ExcIEEEST1AUELselectorKind::inputHVgateErrorSignal; return lop; } - if(EnumSymbol == "inputAddedToErrorSignal") + if (EnumSymbol == "inputAddedToErrorSignal") { rop = ExcIEEEST1AUELselectorKind::inputAddedToErrorSignal; return lop; diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEST1AUELselectorKind.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEST1AUELselectorKind.hpp index 62cd07318..395d11a91 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEST1AUELselectorKind.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEST1AUELselectorKind.hpp @@ -9,29 +9,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of connection for the UEL input used in ExcIEEEST1A. - */ + /** \brief Type of connection for the UEL input used in ExcIEEEST1A. */ class ExcIEEEST1AUELselectorKind { public: enum ExcIEEEST1AUELselectorKind_ENUM { - /** - * Ignore UEL signal. - */ + /** Ignore UEL signal. */ ignoreUELsignal, - /** - * UEL input HV gate with voltage regulator output. - */ + /** UEL input HV gate with voltage regulator output. */ inputHVgateVoltageOutput, - /** - * UEL input HV gate with error signal. - */ + /** UEL input HV gate with error signal. */ inputHVgateErrorSignal, - /** - * UEL input added to error signal. - */ + /** UEL input added to error signal. */ inputAddedToErrorSignal, }; diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEST2A.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEST2A.cpp index aed479c9d..0d80e5ac3 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEST2A.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEST2A.cpp @@ -8,24 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEST2A::ExcIEEEST2A() {}; -ExcIEEEST2A::~ExcIEEEST2A() {}; +ExcIEEEST2A::ExcIEEEST2A() {} +ExcIEEEST2A::~ExcIEEEST2A() {} static const std::list PossibleProfilesForClass = { @@ -64,181 +51,192 @@ ExcIEEEST2A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEST2A_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_efdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_uelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEST2A_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmax; if (!buffer.str().empty()) @@ -252,7 +250,8 @@ bool get_ExcIEEEST2A_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEST2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -266,7 +265,8 @@ bool get_ExcIEEEST2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST2A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -280,7 +280,8 @@ bool get_ExcIEEEST2A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -294,7 +295,8 @@ bool get_ExcIEEEST2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -308,7 +310,8 @@ bool get_ExcIEEEST2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST2A_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -322,7 +325,8 @@ bool get_ExcIEEEST2A_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST2A_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -336,7 +340,8 @@ bool get_ExcIEEEST2A_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -350,7 +355,8 @@ bool get_ExcIEEEST2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -364,7 +370,8 @@ bool get_ExcIEEEST2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -378,7 +385,8 @@ bool get_ExcIEEEST2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST2A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uelin; if (!buffer.str().empty()) @@ -392,7 +400,8 @@ bool get_ExcIEEEST2A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -406,7 +415,8 @@ bool get_ExcIEEEST2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -418,8 +428,6 @@ bool get_ExcIEEEST2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEST2A::debugName[] = "ExcIEEEST2A"; const char* ExcIEEEST2A::debugString() const { @@ -428,24 +436,24 @@ const char* ExcIEEEST2A::debugString() const void ExcIEEEST2A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A"), &ExcIEEEST2A_factory)); + factory_map.emplace("cim:ExcIEEEST2A", &ExcIEEEST2A_factory); } void ExcIEEEST2A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.efdmax"), &assign_ExcIEEEST2A_efdmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.ka"), &assign_ExcIEEEST2A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.kc"), &assign_ExcIEEEST2A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.ke"), &assign_ExcIEEEST2A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.kf"), &assign_ExcIEEEST2A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.ki"), &assign_ExcIEEEST2A_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.kp"), &assign_ExcIEEEST2A_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.ta"), &assign_ExcIEEEST2A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.te"), &assign_ExcIEEEST2A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.tf"), &assign_ExcIEEEST2A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.uelin"), &assign_ExcIEEEST2A_uelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.vrmax"), &assign_ExcIEEEST2A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.vrmin"), &assign_ExcIEEEST2A_vrmin)); + assign_map.emplace("cim:ExcIEEEST2A.efdmax", &assign_ExcIEEEST2A_efdmax); + assign_map.emplace("cim:ExcIEEEST2A.ka", &assign_ExcIEEEST2A_ka); + assign_map.emplace("cim:ExcIEEEST2A.kc", &assign_ExcIEEEST2A_kc); + assign_map.emplace("cim:ExcIEEEST2A.ke", &assign_ExcIEEEST2A_ke); + assign_map.emplace("cim:ExcIEEEST2A.kf", &assign_ExcIEEEST2A_kf); + assign_map.emplace("cim:ExcIEEEST2A.ki", &assign_ExcIEEEST2A_ki); + assign_map.emplace("cim:ExcIEEEST2A.kp", &assign_ExcIEEEST2A_kp); + assign_map.emplace("cim:ExcIEEEST2A.ta", &assign_ExcIEEEST2A_ta); + assign_map.emplace("cim:ExcIEEEST2A.te", &assign_ExcIEEEST2A_te); + assign_map.emplace("cim:ExcIEEEST2A.tf", &assign_ExcIEEEST2A_tf); + assign_map.emplace("cim:ExcIEEEST2A.uelin", &assign_ExcIEEEST2A_uelin); + assign_map.emplace("cim:ExcIEEEST2A.vrmax", &assign_ExcIEEEST2A_vrmax); + assign_map.emplace("cim:ExcIEEEST2A.vrmin", &assign_ExcIEEEST2A_vrmin); } void ExcIEEEST2A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEST2A.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEST2A.hpp index c6419e711..14b7fc4ac 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEST2A.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEST2A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type ST2A model. Some static systems utilize both current and voltage sources (generator terminal quantities) to comprise the power source. The regulator controls the exciter output through controlled saturation of the power transformer components. These compound-source rectifier excitation systems are designated Type ST2A and are represented by ExcIEEEST2A. Reference: IEEE Standard 421.5-2005 Section 7.2. - */ + /** \brief The class represents IEEE Std 421.5-2005 type ST2A model. Some static systems utilize both current and voltage sources (generator terminal quantities) to comprise the power source. The regulator controls the exciter output through controlled saturation of the power transformer components. These compound-source rectifier excitation systems are designated Type ST2A and are represented by ExcIEEEST2A. Reference: IEEE Standard 421.5-2005 Section 7.2. */ class ExcIEEEST2A : public ExcitationSystemDynamics { public: @@ -29,19 +27,44 @@ namespace CIMPP ExcIEEEST2A(); ~ExcIEEEST2A() override; - CIMPP::PU efdmax; /* Maximum field voltage (E). Typical Value = 99. Default: nullptr */ - CIMPP::PU ka; /* Voltage regulator gain (K). Typical Value = 120. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (K). Typical Value = 1.82. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (K). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU ki; /* Potential circuit gain coefficient (K). Typical Value = 8. Default: nullptr */ - CIMPP::PU kp; /* Potential circuit gain coefficient (K). Typical Value = 4.88. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0.15. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::Boolean uelin; /* UEL input (UELin). true = HV gate false = add to error signal. Typical Value = true. Default: false */ - CIMPP::PU vrmax; /* Maximum voltage regulator outputs (V). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator outputs (V). Typical Value = 0. Default: nullptr */ + /** \brief Maximum field voltage (E). Typical Value = 99. Default: nullptr */ + CIMPP::PU efdmax; + + /** \brief Voltage regulator gain (K). Typical Value = 120. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (K). Typical Value = 1.82. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (K). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Potential circuit gain coefficient (K). Typical Value = 8. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Potential circuit gain coefficient (K). Typical Value = 4.88. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Voltage regulator time constant (T). Typical Value = 0.15. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief UEL input (UELin). true = HV gate false = add to error signal. Typical Value = true. Default: false */ + CIMPP::Boolean uelin; + + /** \brief Maximum voltage regulator outputs (V). Typical Value = 1. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator outputs (V). Typical Value = 0. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEST3A.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEST3A.cpp index 46dcb0087..143a70444 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEST3A.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEST3A.cpp @@ -8,31 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "AngleDegrees.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEST3A::ExcIEEEST3A() {}; -ExcIEEEST3A::~ExcIEEEST3A() {}; +ExcIEEEST3A::ExcIEEEST3A() {} +ExcIEEEST3A::~ExcIEEEST3A() {} static const std::list PossibleProfilesForClass = { @@ -78,272 +58,290 @@ ExcIEEEST3A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEST3A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_km(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_km(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->km; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_thetap(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_thetap(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->thetap; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_tm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_tm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_vbmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_vbmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vbmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_vgmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_vgmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vgmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_vimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_vmmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_vmmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_vmmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_vmmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_xl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_xl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEST3A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -357,7 +355,8 @@ bool get_ExcIEEEST3A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -371,7 +370,8 @@ bool get_ExcIEEEST3A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -385,7 +385,8 @@ bool get_ExcIEEEST3A_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -399,7 +400,8 @@ bool get_ExcIEEEST3A_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_km(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->km; if (!buffer.str().empty()) @@ -413,7 +415,8 @@ bool get_ExcIEEEST3A_km(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -427,7 +430,8 @@ bool get_ExcIEEEST3A_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -441,7 +445,8 @@ bool get_ExcIEEEST3A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -455,7 +460,8 @@ bool get_ExcIEEEST3A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -469,7 +475,8 @@ bool get_ExcIEEEST3A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_thetap(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thetap; if (!buffer.str().empty()) @@ -483,7 +490,8 @@ bool get_ExcIEEEST3A_thetap(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEST3A_tm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tm; if (!buffer.str().empty()) @@ -497,7 +505,8 @@ bool get_ExcIEEEST3A_tm(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vbmax; if (!buffer.str().empty()) @@ -511,7 +520,8 @@ bool get_ExcIEEEST3A_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST3A_vgmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vgmax; if (!buffer.str().empty()) @@ -525,7 +535,8 @@ bool get_ExcIEEEST3A_vgmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST3A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -539,7 +550,8 @@ bool get_ExcIEEEST3A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST3A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimin; if (!buffer.str().empty()) @@ -553,7 +565,8 @@ bool get_ExcIEEEST3A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST3A_vmmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmmax; if (!buffer.str().empty()) @@ -567,7 +580,8 @@ bool get_ExcIEEEST3A_vmmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST3A_vmmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmmin; if (!buffer.str().empty()) @@ -581,7 +595,8 @@ bool get_ExcIEEEST3A_vmmin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST3A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -595,7 +610,8 @@ bool get_ExcIEEEST3A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST3A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -609,7 +625,8 @@ bool get_ExcIEEEST3A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST3A_xl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xl; if (!buffer.str().empty()) @@ -621,8 +638,6 @@ bool get_ExcIEEEST3A_xl(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char ExcIEEEST3A::debugName[] = "ExcIEEEST3A"; const char* ExcIEEEST3A::debugString() const { @@ -631,31 +646,31 @@ const char* ExcIEEEST3A::debugString() const void ExcIEEEST3A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A"), &ExcIEEEST3A_factory)); + factory_map.emplace("cim:ExcIEEEST3A", &ExcIEEEST3A_factory); } void ExcIEEEST3A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.ka"), &assign_ExcIEEEST3A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.kc"), &assign_ExcIEEEST3A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.kg"), &assign_ExcIEEEST3A_kg)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.ki"), &assign_ExcIEEEST3A_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.km"), &assign_ExcIEEEST3A_km)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.kp"), &assign_ExcIEEEST3A_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.ta"), &assign_ExcIEEEST3A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.tb"), &assign_ExcIEEEST3A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.tc"), &assign_ExcIEEEST3A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.thetap"), &assign_ExcIEEEST3A_thetap)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.tm"), &assign_ExcIEEEST3A_tm)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.vbmax"), &assign_ExcIEEEST3A_vbmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.vgmax"), &assign_ExcIEEEST3A_vgmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.vimax"), &assign_ExcIEEEST3A_vimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.vimin"), &assign_ExcIEEEST3A_vimin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.vmmax"), &assign_ExcIEEEST3A_vmmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.vmmin"), &assign_ExcIEEEST3A_vmmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.vrmax"), &assign_ExcIEEEST3A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.vrmin"), &assign_ExcIEEEST3A_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.xl"), &assign_ExcIEEEST3A_xl)); + assign_map.emplace("cim:ExcIEEEST3A.ka", &assign_ExcIEEEST3A_ka); + assign_map.emplace("cim:ExcIEEEST3A.kc", &assign_ExcIEEEST3A_kc); + assign_map.emplace("cim:ExcIEEEST3A.kg", &assign_ExcIEEEST3A_kg); + assign_map.emplace("cim:ExcIEEEST3A.ki", &assign_ExcIEEEST3A_ki); + assign_map.emplace("cim:ExcIEEEST3A.km", &assign_ExcIEEEST3A_km); + assign_map.emplace("cim:ExcIEEEST3A.kp", &assign_ExcIEEEST3A_kp); + assign_map.emplace("cim:ExcIEEEST3A.ta", &assign_ExcIEEEST3A_ta); + assign_map.emplace("cim:ExcIEEEST3A.tb", &assign_ExcIEEEST3A_tb); + assign_map.emplace("cim:ExcIEEEST3A.tc", &assign_ExcIEEEST3A_tc); + assign_map.emplace("cim:ExcIEEEST3A.thetap", &assign_ExcIEEEST3A_thetap); + assign_map.emplace("cim:ExcIEEEST3A.tm", &assign_ExcIEEEST3A_tm); + assign_map.emplace("cim:ExcIEEEST3A.vbmax", &assign_ExcIEEEST3A_vbmax); + assign_map.emplace("cim:ExcIEEEST3A.vgmax", &assign_ExcIEEEST3A_vgmax); + assign_map.emplace("cim:ExcIEEEST3A.vimax", &assign_ExcIEEEST3A_vimax); + assign_map.emplace("cim:ExcIEEEST3A.vimin", &assign_ExcIEEEST3A_vimin); + assign_map.emplace("cim:ExcIEEEST3A.vmmax", &assign_ExcIEEEST3A_vmmax); + assign_map.emplace("cim:ExcIEEEST3A.vmmin", &assign_ExcIEEEST3A_vmmin); + assign_map.emplace("cim:ExcIEEEST3A.vrmax", &assign_ExcIEEEST3A_vrmax); + assign_map.emplace("cim:ExcIEEEST3A.vrmin", &assign_ExcIEEEST3A_vrmin); + assign_map.emplace("cim:ExcIEEEST3A.xl", &assign_ExcIEEEST3A_xl); } void ExcIEEEST3A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEST3A.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEST3A.hpp index ead8111ca..e2f7c6f05 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEST3A.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEST3A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type ST3A model. Some static systems utilize a field voltage control loop to linearize the exciter control characteristic. This also makes the output independent of supply source variations until supply limitations are reached. These systems utilize a variety of controlled-rectifier designs: full thyristor complements or hybrid bridges in either series or shunt configurations. The power source may consist of only a potential source, either fed from the machine terminals or from internal windings. Some designs may have compound power sources utilizing both machine potential and current. These power sources are represented as phasor combinations of machine terminal current and voltage and are accommodated by suitable parameters in model Type ST3A which is represented by ExcIEEEST3A. Reference: IEEE Standard 421.5-2005 Section 7.3. - */ + /** \brief The class represents IEEE Std 421.5-2005 type ST3A model. Some static systems utilize a field voltage control loop to linearize the exciter control characteristic. This also makes the output independent of supply source variations until supply limitations are reached. These systems utilize a variety of controlled-rectifier designs: full thyristor complements or hybrid bridges in either series or shunt configurations. The power source may consist of only a potential source, either fed from the machine terminals or from internal windings. Some designs may have compound power sources utilizing both machine potential and current. These power sources are represented as phasor combinations of machine terminal current and voltage and are accommodated by suitable parameters in model Type ST3A which is represented by ExcIEEEST3A. Reference: IEEE Standard 421.5-2005 Section 7.3. */ class ExcIEEEST3A : public ExcitationSystemDynamics { public: @@ -29,26 +27,65 @@ namespace CIMPP ExcIEEEST3A(); ~ExcIEEEST3A() override; - CIMPP::PU ka; /* Voltage regulator gain (K). This is parameter K in the IEEE Std. Typical Value = 200. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU kg; /* Feedback gain constant of the inner loop field regulator (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU ki; /* Potential circuit gain coefficient (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU km; /* Forward gain constant of the inner loop field regulator (K). Typical Value = 7.93. Default: nullptr */ - CIMPP::PU kp; /* Potential circuit gain coefficient (K). Typical Value = 6.15. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (T). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::AngleDegrees thetap; /* Potential circuit phase angle (thetap). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tm; /* Forward time constant of inner loop field regulator (T). Typical Value = 0.4. Default: nullptr */ - CIMPP::PU vbmax; /* Maximum excitation voltage (V). Typical Value = 6.9. Default: nullptr */ - CIMPP::PU vgmax; /* Maximum inner loop feedback voltage (V). Typical Value = 5.8. Default: nullptr */ - CIMPP::PU vimax; /* Maximum voltage regulator input limit (V). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU vimin; /* Minimum voltage regulator input limit (V). Typical Value = -0.2. Default: nullptr */ - CIMPP::PU vmmax; /* Maximum inner loop output (V). Typical Value = 1. Default: nullptr */ - CIMPP::PU vmmin; /* Minimum inner loop output (V). Typical Value = 0. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 10. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = -10. Default: nullptr */ - CIMPP::PU xl; /* Reactance associated with potential source (X). Typical Value = 0.081. Default: nullptr */ + /** \brief Voltage regulator gain (K). This is parameter K in the IEEE Std. Typical Value = 200. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Feedback gain constant of the inner loop field regulator (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Potential circuit gain coefficient (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Forward gain constant of the inner loop field regulator (K). Typical Value = 7.93. Default: nullptr */ + CIMPP::PU km; + + /** \brief Potential circuit gain coefficient (K). Typical Value = 6.15. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (T). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Potential circuit phase angle (thetap). Typical Value = 0. Default: nullptr */ + CIMPP::AngleDegrees thetap; + + /** \brief Forward time constant of inner loop field regulator (T). Typical Value = 0.4. Default: nullptr */ + CIMPP::Seconds tm; + + /** \brief Maximum excitation voltage (V). Typical Value = 6.9. Default: nullptr */ + CIMPP::PU vbmax; + + /** \brief Maximum inner loop feedback voltage (V). Typical Value = 5.8. Default: nullptr */ + CIMPP::PU vgmax; + + /** \brief Maximum voltage regulator input limit (V). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Minimum voltage regulator input limit (V). Typical Value = -0.2. Default: nullptr */ + CIMPP::PU vimin; + + /** \brief Maximum inner loop output (V). Typical Value = 1. Default: nullptr */ + CIMPP::PU vmmax; + + /** \brief Minimum inner loop output (V). Typical Value = 0. Default: nullptr */ + CIMPP::PU vmmin; + + /** \brief Maximum voltage regulator output (V). Typical Value = 10. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -10. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief Reactance associated with potential source (X). Typical Value = 0.081. Default: nullptr */ + CIMPP::PU xl; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEST4B.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEST4B.cpp index 007525a0f..9912a54a6 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEST4B.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEST4B.cpp @@ -8,27 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "AngleDegrees.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEST4B::ExcIEEEST4B() {}; -ExcIEEEST4B::~ExcIEEEST4B() {}; +ExcIEEEST4B::ExcIEEEST4B() {} +ExcIEEEST4B::~ExcIEEEST4B() {} static const std::list PossibleProfilesForClass = { @@ -70,220 +54,234 @@ ExcIEEEST4B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEST4B_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_kim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_kim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_kir(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_kir(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kir; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_kpm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_kpm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_kpr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_kpr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_thetap(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_thetap(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->thetap; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_vbmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_vbmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vbmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_vmmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_vmmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_vmmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_vmmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_xl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_xl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEST4B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -297,7 +295,8 @@ bool get_ExcIEEEST4B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST4B_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -311,7 +310,8 @@ bool get_ExcIEEEST4B_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST4B_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -325,7 +325,8 @@ bool get_ExcIEEEST4B_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST4B_kim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kim; if (!buffer.str().empty()) @@ -339,7 +340,8 @@ bool get_ExcIEEEST4B_kim(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST4B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kir; if (!buffer.str().empty()) @@ -353,7 +355,8 @@ bool get_ExcIEEEST4B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST4B_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -367,7 +370,8 @@ bool get_ExcIEEEST4B_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST4B_kpm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpm; if (!buffer.str().empty()) @@ -381,7 +385,8 @@ bool get_ExcIEEEST4B_kpm(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST4B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpr; if (!buffer.str().empty()) @@ -395,7 +400,8 @@ bool get_ExcIEEEST4B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST4B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -409,7 +415,8 @@ bool get_ExcIEEEST4B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST4B_thetap(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thetap; if (!buffer.str().empty()) @@ -423,7 +430,8 @@ bool get_ExcIEEEST4B_thetap(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEST4B_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vbmax; if (!buffer.str().empty()) @@ -437,7 +445,8 @@ bool get_ExcIEEEST4B_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST4B_vmmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmmax; if (!buffer.str().empty()) @@ -451,7 +460,8 @@ bool get_ExcIEEEST4B_vmmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST4B_vmmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmmin; if (!buffer.str().empty()) @@ -465,7 +475,8 @@ bool get_ExcIEEEST4B_vmmin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST4B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -479,7 +490,8 @@ bool get_ExcIEEEST4B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST4B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -493,7 +505,8 @@ bool get_ExcIEEEST4B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST4B_xl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xl; if (!buffer.str().empty()) @@ -505,8 +518,6 @@ bool get_ExcIEEEST4B_xl(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char ExcIEEEST4B::debugName[] = "ExcIEEEST4B"; const char* ExcIEEEST4B::debugString() const { @@ -515,27 +526,27 @@ const char* ExcIEEEST4B::debugString() const void ExcIEEEST4B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B"), &ExcIEEEST4B_factory)); + factory_map.emplace("cim:ExcIEEEST4B", &ExcIEEEST4B_factory); } void ExcIEEEST4B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.kc"), &assign_ExcIEEEST4B_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.kg"), &assign_ExcIEEEST4B_kg)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.ki"), &assign_ExcIEEEST4B_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.kim"), &assign_ExcIEEEST4B_kim)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.kir"), &assign_ExcIEEEST4B_kir)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.kp"), &assign_ExcIEEEST4B_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.kpm"), &assign_ExcIEEEST4B_kpm)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.kpr"), &assign_ExcIEEEST4B_kpr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.ta"), &assign_ExcIEEEST4B_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.thetap"), &assign_ExcIEEEST4B_thetap)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.vbmax"), &assign_ExcIEEEST4B_vbmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.vmmax"), &assign_ExcIEEEST4B_vmmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.vmmin"), &assign_ExcIEEEST4B_vmmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.vrmax"), &assign_ExcIEEEST4B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.vrmin"), &assign_ExcIEEEST4B_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.xl"), &assign_ExcIEEEST4B_xl)); + assign_map.emplace("cim:ExcIEEEST4B.kc", &assign_ExcIEEEST4B_kc); + assign_map.emplace("cim:ExcIEEEST4B.kg", &assign_ExcIEEEST4B_kg); + assign_map.emplace("cim:ExcIEEEST4B.ki", &assign_ExcIEEEST4B_ki); + assign_map.emplace("cim:ExcIEEEST4B.kim", &assign_ExcIEEEST4B_kim); + assign_map.emplace("cim:ExcIEEEST4B.kir", &assign_ExcIEEEST4B_kir); + assign_map.emplace("cim:ExcIEEEST4B.kp", &assign_ExcIEEEST4B_kp); + assign_map.emplace("cim:ExcIEEEST4B.kpm", &assign_ExcIEEEST4B_kpm); + assign_map.emplace("cim:ExcIEEEST4B.kpr", &assign_ExcIEEEST4B_kpr); + assign_map.emplace("cim:ExcIEEEST4B.ta", &assign_ExcIEEEST4B_ta); + assign_map.emplace("cim:ExcIEEEST4B.thetap", &assign_ExcIEEEST4B_thetap); + assign_map.emplace("cim:ExcIEEEST4B.vbmax", &assign_ExcIEEEST4B_vbmax); + assign_map.emplace("cim:ExcIEEEST4B.vmmax", &assign_ExcIEEEST4B_vmmax); + assign_map.emplace("cim:ExcIEEEST4B.vmmin", &assign_ExcIEEEST4B_vmmin); + assign_map.emplace("cim:ExcIEEEST4B.vrmax", &assign_ExcIEEEST4B_vrmax); + assign_map.emplace("cim:ExcIEEEST4B.vrmin", &assign_ExcIEEEST4B_vrmin); + assign_map.emplace("cim:ExcIEEEST4B.xl", &assign_ExcIEEEST4B_xl); } void ExcIEEEST4B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEST4B.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEST4B.hpp index 87751775d..b3ac3afe3 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEST4B.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEST4B.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type ST4B model. This model is a variation of the Type ST3A model, with a proportional plus integral (PI) regulator block replacing the lag-lead regulator characteristic that is in the ST3A model. Both potential and compound source rectifier excitation systems are modeled. The PI regulator blocks have non-windup limits that are represented. The voltage regulator of this model is typically implemented digitally. Reference: IEEE Standard 421.5-2005 Section 7.4. - */ + /** \brief The class represents IEEE Std 421.5-2005 type ST4B model. This model is a variation of the Type ST3A model, with a proportional plus integral (PI) regulator block replacing the lag-lead regulator characteristic that is in the ST3A model. Both potential and compound source rectifier excitation systems are modeled. The PI regulator blocks have non-windup limits that are represented. The voltage regulator of this model is typically implemented digitally. Reference: IEEE Standard 421.5-2005 Section 7.4. */ class ExcIEEEST4B : public ExcitationSystemDynamics { public: @@ -29,22 +27,53 @@ namespace CIMPP ExcIEEEST4B(); ~ExcIEEEST4B() override; - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.113. Default: nullptr */ - CIMPP::PU kg; /* Feedback gain constant of the inner loop field regulator (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU ki; /* Potential circuit gain coefficient (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU kim; /* Voltage regulator integral gain output (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU kir; /* Voltage regulator integral gain (K). Typical Value = 10.75. Default: nullptr */ - CIMPP::PU kp; /* Potential circuit gain coefficient (K). Typical Value = 9.3. Default: nullptr */ - CIMPP::PU kpm; /* Voltage regulator proportional gain output (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kpr; /* Voltage regulator proportional gain (K). Typical Value = 10.75. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0.02. Default: nullptr */ - CIMPP::AngleDegrees thetap; /* Potential circuit phase angle (thetap). Typical Value = 0. Default: nullptr */ - CIMPP::PU vbmax; /* Maximum excitation voltage (V). Typical Value = 11.63. Default: nullptr */ - CIMPP::PU vmmax; /* Maximum inner loop output (V). Typical Value = 99. Default: nullptr */ - CIMPP::PU vmmin; /* Minimum inner loop output (V). Typical Value = -99. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = -0.87. Default: nullptr */ - CIMPP::PU xl; /* Reactance associated with potential source (X). Typical Value = 0.124. Default: nullptr */ + /** \brief Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.113. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Feedback gain constant of the inner loop field regulator (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Potential circuit gain coefficient (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Voltage regulator integral gain output (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU kim; + + /** \brief Voltage regulator integral gain (K). Typical Value = 10.75. Default: nullptr */ + CIMPP::PU kir; + + /** \brief Potential circuit gain coefficient (K). Typical Value = 9.3. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Voltage regulator proportional gain output (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU kpm; + + /** \brief Voltage regulator proportional gain (K). Typical Value = 10.75. Default: nullptr */ + CIMPP::PU kpr; + + /** \brief Voltage regulator time constant (T). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Potential circuit phase angle (thetap). Typical Value = 0. Default: nullptr */ + CIMPP::AngleDegrees thetap; + + /** \brief Maximum excitation voltage (V). Typical Value = 11.63. Default: nullptr */ + CIMPP::PU vbmax; + + /** \brief Maximum inner loop output (V). Typical Value = 99. Default: nullptr */ + CIMPP::PU vmmax; + + /** \brief Minimum inner loop output (V). Typical Value = -99. Default: nullptr */ + CIMPP::PU vmmin; + + /** \brief Maximum voltage regulator output (V). Typical Value = 1. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -0.87. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief Reactance associated with potential source (X). Typical Value = 0.124. Default: nullptr */ + CIMPP::PU xl; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEST5B.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEST5B.cpp index 4312484ee..49f99553d 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEST5B.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEST5B.cpp @@ -8,28 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEST5B::ExcIEEEST5B() {}; -ExcIEEEST5B::~ExcIEEEST5B() {}; +ExcIEEEST5B::ExcIEEEST5B() {} +ExcIEEEST5B::~ExcIEEEST5B() {} static const std::list PossibleProfilesForClass = { @@ -72,233 +55,248 @@ ExcIEEEST5B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEST5B_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_kr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_kr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tb1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tb2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tb2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tc1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tc1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tc2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tc2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tob1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tob1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tob1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tob2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tob2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tob2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_toc1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_toc1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->toc1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_toc2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_toc2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->toc2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tub1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tub1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tub1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tub2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tub2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tub2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tuc1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tuc1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tuc1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tuc2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tuc2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tuc2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEST5B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -312,7 +310,8 @@ bool get_ExcIEEEST5B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST5B_kr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kr; if (!buffer.str().empty()) @@ -326,7 +325,8 @@ bool get_ExcIEEEST5B_kr(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST5B_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -340,7 +340,8 @@ bool get_ExcIEEEST5B_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST5B_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb1; if (!buffer.str().empty()) @@ -354,7 +355,8 @@ bool get_ExcIEEEST5B_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST5B_tb2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb2; if (!buffer.str().empty()) @@ -368,7 +370,8 @@ bool get_ExcIEEEST5B_tb2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST5B_tc1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc1; if (!buffer.str().empty()) @@ -382,7 +385,8 @@ bool get_ExcIEEEST5B_tc1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST5B_tc2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc2; if (!buffer.str().empty()) @@ -396,7 +400,8 @@ bool get_ExcIEEEST5B_tc2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST5B_tob1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tob1; if (!buffer.str().empty()) @@ -410,7 +415,8 @@ bool get_ExcIEEEST5B_tob1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEST5B_tob2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tob2; if (!buffer.str().empty()) @@ -424,7 +430,8 @@ bool get_ExcIEEEST5B_tob2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEST5B_toc1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->toc1; if (!buffer.str().empty()) @@ -438,7 +445,8 @@ bool get_ExcIEEEST5B_toc1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEST5B_toc2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->toc2; if (!buffer.str().empty()) @@ -452,7 +460,8 @@ bool get_ExcIEEEST5B_toc2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEST5B_tub1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tub1; if (!buffer.str().empty()) @@ -466,7 +475,8 @@ bool get_ExcIEEEST5B_tub1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEST5B_tub2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tub2; if (!buffer.str().empty()) @@ -480,7 +490,8 @@ bool get_ExcIEEEST5B_tub2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEST5B_tuc1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tuc1; if (!buffer.str().empty()) @@ -494,7 +505,8 @@ bool get_ExcIEEEST5B_tuc1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEST5B_tuc2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tuc2; if (!buffer.str().empty()) @@ -508,7 +520,8 @@ bool get_ExcIEEEST5B_tuc2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEST5B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -522,7 +535,8 @@ bool get_ExcIEEEST5B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST5B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -534,8 +548,6 @@ bool get_ExcIEEEST5B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEST5B::debugName[] = "ExcIEEEST5B"; const char* ExcIEEEST5B::debugString() const { @@ -544,28 +556,28 @@ const char* ExcIEEEST5B::debugString() const void ExcIEEEST5B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B"), &ExcIEEEST5B_factory)); + factory_map.emplace("cim:ExcIEEEST5B", &ExcIEEEST5B_factory); } void ExcIEEEST5B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.kc"), &assign_ExcIEEEST5B_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.kr"), &assign_ExcIEEEST5B_kr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.t1"), &assign_ExcIEEEST5B_t1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tb1"), &assign_ExcIEEEST5B_tb1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tb2"), &assign_ExcIEEEST5B_tb2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tc1"), &assign_ExcIEEEST5B_tc1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tc2"), &assign_ExcIEEEST5B_tc2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tob1"), &assign_ExcIEEEST5B_tob1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tob2"), &assign_ExcIEEEST5B_tob2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.toc1"), &assign_ExcIEEEST5B_toc1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.toc2"), &assign_ExcIEEEST5B_toc2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tub1"), &assign_ExcIEEEST5B_tub1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tub2"), &assign_ExcIEEEST5B_tub2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tuc1"), &assign_ExcIEEEST5B_tuc1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tuc2"), &assign_ExcIEEEST5B_tuc2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.vrmax"), &assign_ExcIEEEST5B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.vrmin"), &assign_ExcIEEEST5B_vrmin)); + assign_map.emplace("cim:ExcIEEEST5B.kc", &assign_ExcIEEEST5B_kc); + assign_map.emplace("cim:ExcIEEEST5B.kr", &assign_ExcIEEEST5B_kr); + assign_map.emplace("cim:ExcIEEEST5B.t1", &assign_ExcIEEEST5B_t1); + assign_map.emplace("cim:ExcIEEEST5B.tb1", &assign_ExcIEEEST5B_tb1); + assign_map.emplace("cim:ExcIEEEST5B.tb2", &assign_ExcIEEEST5B_tb2); + assign_map.emplace("cim:ExcIEEEST5B.tc1", &assign_ExcIEEEST5B_tc1); + assign_map.emplace("cim:ExcIEEEST5B.tc2", &assign_ExcIEEEST5B_tc2); + assign_map.emplace("cim:ExcIEEEST5B.tob1", &assign_ExcIEEEST5B_tob1); + assign_map.emplace("cim:ExcIEEEST5B.tob2", &assign_ExcIEEEST5B_tob2); + assign_map.emplace("cim:ExcIEEEST5B.toc1", &assign_ExcIEEEST5B_toc1); + assign_map.emplace("cim:ExcIEEEST5B.toc2", &assign_ExcIEEEST5B_toc2); + assign_map.emplace("cim:ExcIEEEST5B.tub1", &assign_ExcIEEEST5B_tub1); + assign_map.emplace("cim:ExcIEEEST5B.tub2", &assign_ExcIEEEST5B_tub2); + assign_map.emplace("cim:ExcIEEEST5B.tuc1", &assign_ExcIEEEST5B_tuc1); + assign_map.emplace("cim:ExcIEEEST5B.tuc2", &assign_ExcIEEEST5B_tuc2); + assign_map.emplace("cim:ExcIEEEST5B.vrmax", &assign_ExcIEEEST5B_vrmax); + assign_map.emplace("cim:ExcIEEEST5B.vrmin", &assign_ExcIEEEST5B_vrmin); } void ExcIEEEST5B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEST5B.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEST5B.hpp index 6b2d71d54..165696a4d 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEST5B.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEST5B.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type ST5B model. The Type ST5B excitation system is a variation of the Type ST1A model, with alternative overexcitation and underexcitation inputs and additional limits. Reference: IEEE Standard 421.5-2005 Section 7.5. - */ + /** \brief The class represents IEEE Std 421.5-2005 type ST5B model. The Type ST5B excitation system is a variation of the Type ST1A model, with alternative overexcitation and underexcitation inputs and additional limits. Reference: IEEE Standard 421.5-2005 Section 7.5. */ class ExcIEEEST5B : public ExcitationSystemDynamics { public: @@ -28,23 +26,56 @@ namespace CIMPP ExcIEEEST5B(); ~ExcIEEEST5B() override; - CIMPP::PU kc; /* Rectifier regulation factor (K). Typical Value = 0.004. Default: nullptr */ - CIMPP::PU kr; /* Regulator gain (K). Typical Value = 200. Default: nullptr */ - CIMPP::Seconds t1; /* Firing circuit time constant (T1). Typical Value = 0.004. Default: nullptr */ - CIMPP::Seconds tb1; /* Regulator lag time constant (T). Typical Value = 6. Default: nullptr */ - CIMPP::Seconds tb2; /* Regulator lag time constant (T). Typical Value = 0.01. Default: nullptr */ - CIMPP::Seconds tc1; /* Regulator lead time constant (T). Typical Value = 0.8. Default: nullptr */ - CIMPP::Seconds tc2; /* Regulator lead time constant (T). Typical Value = 0.08. Default: nullptr */ - CIMPP::Seconds tob1; /* OEL lag time constant (T). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds tob2; /* OEL lag time constant (T). Typical Value = 0.08. Default: nullptr */ - CIMPP::Seconds toc1; /* OEL lead time constant (T). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds toc2; /* OEL lead time constant (T). Typical Value = 0.08. Default: nullptr */ - CIMPP::Seconds tub1; /* UEL lag time constant (T). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds tub2; /* UEL lag time constant (T). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds tuc1; /* UEL lead time constant (T). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds tuc2; /* UEL lead time constant (T). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 5. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = -4. Default: nullptr */ + /** \brief Rectifier regulation factor (K). Typical Value = 0.004. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Regulator gain (K). Typical Value = 200. Default: nullptr */ + CIMPP::PU kr; + + /** \brief Firing circuit time constant (T1). Typical Value = 0.004. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Regulator lag time constant (T). Typical Value = 6. Default: nullptr */ + CIMPP::Seconds tb1; + + /** \brief Regulator lag time constant (T). Typical Value = 0.01. Default: nullptr */ + CIMPP::Seconds tb2; + + /** \brief Regulator lead time constant (T). Typical Value = 0.8. Default: nullptr */ + CIMPP::Seconds tc1; + + /** \brief Regulator lead time constant (T). Typical Value = 0.08. Default: nullptr */ + CIMPP::Seconds tc2; + + /** \brief OEL lag time constant (T). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds tob1; + + /** \brief OEL lag time constant (T). Typical Value = 0.08. Default: nullptr */ + CIMPP::Seconds tob2; + + /** \brief OEL lead time constant (T). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds toc1; + + /** \brief OEL lead time constant (T). Typical Value = 0.08. Default: nullptr */ + CIMPP::Seconds toc2; + + /** \brief UEL lag time constant (T). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds tub1; + + /** \brief UEL lag time constant (T). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds tub2; + + /** \brief UEL lead time constant (T). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds tuc1; + + /** \brief UEL lead time constant (T). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tuc2; + + /** \brief Maximum voltage regulator output (V). Typical Value = 5. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -4. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEST6B.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEST6B.cpp index f14ebf34b..46aac194f 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEST6B.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEST6B.cpp @@ -8,25 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ExcST6BOELselectorKind.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEST6B::ExcIEEEST6B() {}; -ExcIEEEST6B::~ExcIEEEST6B() {}; +ExcIEEEST6B::ExcIEEEST6B() {} +ExcIEEEST6B::~ExcIEEEST6B() {} static const std::list PossibleProfilesForClass = { @@ -66,194 +52,206 @@ ExcIEEEST6B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEST6B_ilr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_ilr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ilr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_kci(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_kci(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kci; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_kff(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_kff(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kff; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_kia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_kia(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kia; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_klr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_klr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->klr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_km(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_km(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->km; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_kpa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_kpa(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpa; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_oelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_oelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->oelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEST6B_ilr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ilr; if (!buffer.str().empty()) @@ -267,7 +265,8 @@ bool get_ExcIEEEST6B_ilr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST6B_kci(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kci; if (!buffer.str().empty()) @@ -281,7 +280,8 @@ bool get_ExcIEEEST6B_kci(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST6B_kff(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kff; if (!buffer.str().empty()) @@ -295,7 +295,8 @@ bool get_ExcIEEEST6B_kff(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST6B_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -309,7 +310,8 @@ bool get_ExcIEEEST6B_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST6B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kia; if (!buffer.str().empty()) @@ -323,7 +325,8 @@ bool get_ExcIEEEST6B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST6B_klr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->klr; if (!buffer.str().empty()) @@ -337,7 +340,8 @@ bool get_ExcIEEEST6B_klr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST6B_km(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->km; if (!buffer.str().empty()) @@ -351,7 +355,8 @@ bool get_ExcIEEEST6B_km(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST6B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpa; if (!buffer.str().empty()) @@ -363,11 +368,12 @@ bool get_ExcIEEEST6B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } -bool get_ExcIEEEST6B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST6B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tg; + buffer << element->oelin; if (!buffer.str().empty()) { return true; @@ -377,11 +383,12 @@ bool get_ExcIEEEST6B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } -bool get_ExcIEEEST6B_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST6B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vamax; + buffer << element->tg; if (!buffer.str().empty()) { return true; @@ -391,11 +398,12 @@ bool get_ExcIEEEST6B_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } -bool get_ExcIEEEST6B_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST6B_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vamin; + buffer << element->vamax; if (!buffer.str().empty()) { return true; @@ -405,11 +413,12 @@ bool get_ExcIEEEST6B_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } -bool get_ExcIEEEST6B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST6B_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vrmax; + buffer << element->vamin; if (!buffer.str().empty()) { return true; @@ -419,11 +428,12 @@ bool get_ExcIEEEST6B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } -bool get_ExcIEEEST6B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST6B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vrmin; + buffer << element->vrmax; if (!buffer.str().empty()) { return true; @@ -433,13 +443,12 @@ bool get_ExcIEEEST6B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - -bool get_ExcIEEEST6B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST6B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->oelin; + buffer << element->vrmin; if (!buffer.str().empty()) { return true; @@ -457,25 +466,25 @@ const char* ExcIEEEST6B::debugString() const void ExcIEEEST6B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B"), &ExcIEEEST6B_factory)); + factory_map.emplace("cim:ExcIEEEST6B", &ExcIEEEST6B_factory); } void ExcIEEEST6B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.ilr"), &assign_ExcIEEEST6B_ilr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.kci"), &assign_ExcIEEEST6B_kci)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.kff"), &assign_ExcIEEEST6B_kff)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.kg"), &assign_ExcIEEEST6B_kg)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.kia"), &assign_ExcIEEEST6B_kia)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.klr"), &assign_ExcIEEEST6B_klr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.km"), &assign_ExcIEEEST6B_km)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.kpa"), &assign_ExcIEEEST6B_kpa)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.oelin"), &assign_ExcIEEEST6B_oelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.tg"), &assign_ExcIEEEST6B_tg)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.vamax"), &assign_ExcIEEEST6B_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.vamin"), &assign_ExcIEEEST6B_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.vrmax"), &assign_ExcIEEEST6B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.vrmin"), &assign_ExcIEEEST6B_vrmin)); + assign_map.emplace("cim:ExcIEEEST6B.ilr", &assign_ExcIEEEST6B_ilr); + assign_map.emplace("cim:ExcIEEEST6B.kci", &assign_ExcIEEEST6B_kci); + assign_map.emplace("cim:ExcIEEEST6B.kff", &assign_ExcIEEEST6B_kff); + assign_map.emplace("cim:ExcIEEEST6B.kg", &assign_ExcIEEEST6B_kg); + assign_map.emplace("cim:ExcIEEEST6B.kia", &assign_ExcIEEEST6B_kia); + assign_map.emplace("cim:ExcIEEEST6B.klr", &assign_ExcIEEEST6B_klr); + assign_map.emplace("cim:ExcIEEEST6B.km", &assign_ExcIEEEST6B_km); + assign_map.emplace("cim:ExcIEEEST6B.kpa", &assign_ExcIEEEST6B_kpa); + assign_map.emplace("cim:ExcIEEEST6B.oelin", &assign_ExcIEEEST6B_oelin); + assign_map.emplace("cim:ExcIEEEST6B.tg", &assign_ExcIEEEST6B_tg); + assign_map.emplace("cim:ExcIEEEST6B.vamax", &assign_ExcIEEEST6B_vamax); + assign_map.emplace("cim:ExcIEEEST6B.vamin", &assign_ExcIEEEST6B_vamin); + assign_map.emplace("cim:ExcIEEEST6B.vrmax", &assign_ExcIEEEST6B_vrmax); + assign_map.emplace("cim:ExcIEEEST6B.vrmin", &assign_ExcIEEEST6B_vrmin); } void ExcIEEEST6B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEST6B.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEST6B.hpp index a44a3f043..554b6609b 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEST6B.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEST6B.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type ST6B model. This model consists of a PI voltage regulator with an inner loop field voltage regulator and pre-control. The field voltage regulator implements a proportional control. The pre-control and the delay in the feedback circuit increase the dynamic response. Reference: IEEE Standard 421.5-2005 Section 7.6. - */ + /** \brief The class represents IEEE Std 421.5-2005 type ST6B model. This model consists of a PI voltage regulator with an inner loop field voltage regulator and pre-control. The field voltage regulator implements a proportional control. The pre-control and the delay in the feedback circuit increase the dynamic response. Reference: IEEE Standard 421.5-2005 Section 7.6. */ class ExcIEEEST6B : public ExcitationSystemDynamics { public: @@ -29,20 +27,47 @@ namespace CIMPP ExcIEEEST6B(); ~ExcIEEEST6B() override; - CIMPP::PU ilr; /* Exciter output current limit reference (I). Typical Value = 4.164. Default: nullptr */ - CIMPP::PU kci; /* Exciter output current limit adjustment (K). Typical Value = 1.0577. Default: nullptr */ - CIMPP::PU kff; /* Pre-control gain constant of the inner loop field regulator (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kg; /* Feedback gain constant of the inner loop field regulator (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kia; /* Voltage regulator integral gain (K). Typical Value = 45.094. Default: nullptr */ - CIMPP::PU klr; /* Exciter output current limiter gain (K). Typical Value = 17.33. Default: nullptr */ - CIMPP::PU km; /* Forward gain constant of the inner loop field regulator (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kpa; /* Voltage regulator proportional gain (K). Typical Value = 18.038. Default: nullptr */ - CIMPP::ExcST6BOELselectorKind oelin; /* OEL input selector (OELin). Typical Value = noOELinput. Default: 0 */ - CIMPP::Seconds tg; /* Feedback time constant of inner loop field voltage regulator (T). Typical Value = 0.02. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (V). Typical Value = 4.81. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (V). Typical Value = -3.85. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 4.81. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = -3.85. Default: nullptr */ + /** \brief Exciter output current limit reference (I). Typical Value = 4.164. Default: nullptr */ + CIMPP::PU ilr; + + /** \brief Exciter output current limit adjustment (K). Typical Value = 1.0577. Default: nullptr */ + CIMPP::PU kci; + + /** \brief Pre-control gain constant of the inner loop field regulator (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU kff; + + /** \brief Feedback gain constant of the inner loop field regulator (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Voltage regulator integral gain (K). Typical Value = 45.094. Default: nullptr */ + CIMPP::PU kia; + + /** \brief Exciter output current limiter gain (K). Typical Value = 17.33. Default: nullptr */ + CIMPP::PU klr; + + /** \brief Forward gain constant of the inner loop field regulator (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU km; + + /** \brief Voltage regulator proportional gain (K). Typical Value = 18.038. Default: nullptr */ + CIMPP::PU kpa; + + /** \brief OEL input selector (OELin). Typical Value = noOELinput. Default: 0 */ + CIMPP::ExcST6BOELselectorKind oelin; + + /** \brief Feedback time constant of inner loop field voltage regulator (T). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Maximum voltage regulator output (V). Typical Value = 4.81. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -3.85. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Maximum voltage regulator output (V). Typical Value = 4.81. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -3.85. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEST7B.cpp b/CGMES_2.4.13_18DEC2013/ExcIEEEST7B.cpp index aad96d91b..20513a7f9 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEST7B.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEST7B.cpp @@ -8,26 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ExcST7BOELselectorKind.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "ExcST7BUELselectorKind.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEST7B::ExcIEEEST7B() {}; -ExcIEEEST7B::~ExcIEEEST7B() {}; +ExcIEEEST7B::ExcIEEEST7B() {} +ExcIEEEST7B::~ExcIEEEST7B() {} static const std::list PossibleProfilesForClass = { @@ -68,207 +53,220 @@ ExcIEEEST7B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEST7B_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_kh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_kia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_kia(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kia; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_kl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_kl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_kpa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_kpa(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpa; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_oelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_oelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->oelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_tia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_tia(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tia; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_uelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_vmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_vmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEST7B_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh; if (!buffer.str().empty()) @@ -282,7 +280,8 @@ bool get_ExcIEEEST7B_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST7B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kia; if (!buffer.str().empty()) @@ -296,7 +295,8 @@ bool get_ExcIEEEST7B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST7B_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl; if (!buffer.str().empty()) @@ -310,7 +310,8 @@ bool get_ExcIEEEST7B_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST7B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpa; if (!buffer.str().empty()) @@ -322,11 +323,12 @@ bool get_ExcIEEEST7B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } -bool get_ExcIEEEST7B_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tb; + buffer << element->oelin; if (!buffer.str().empty()) { return true; @@ -336,11 +338,12 @@ bool get_ExcIEEEST7B_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } -bool get_ExcIEEEST7B_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tc; + buffer << element->tb; if (!buffer.str().empty()) { return true; @@ -350,11 +353,12 @@ bool get_ExcIEEEST7B_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } -bool get_ExcIEEEST7B_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tf; + buffer << element->tc; if (!buffer.str().empty()) { return true; @@ -364,11 +368,12 @@ bool get_ExcIEEEST7B_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } -bool get_ExcIEEEST7B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tg; + buffer << element->tf; if (!buffer.str().empty()) { return true; @@ -378,11 +383,12 @@ bool get_ExcIEEEST7B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } -bool get_ExcIEEEST7B_tia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tia; + buffer << element->tg; if (!buffer.str().empty()) { return true; @@ -392,11 +398,12 @@ bool get_ExcIEEEST7B_tia(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } -bool get_ExcIEEEST7B_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_tia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vmax; + buffer << element->tia; if (!buffer.str().empty()) { return true; @@ -406,11 +413,12 @@ bool get_ExcIEEEST7B_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } -bool get_ExcIEEEST7B_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vmin; + buffer << element->uelin; if (!buffer.str().empty()) { return true; @@ -420,11 +428,12 @@ bool get_ExcIEEEST7B_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } -bool get_ExcIEEEST7B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vrmax; + buffer << element->vmax; if (!buffer.str().empty()) { return true; @@ -434,11 +443,12 @@ bool get_ExcIEEEST7B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } -bool get_ExcIEEEST7B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vrmin; + buffer << element->vmin; if (!buffer.str().empty()) { return true; @@ -448,13 +458,12 @@ bool get_ExcIEEEST7B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - -bool get_ExcIEEEST7B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->oelin; + buffer << element->vrmax; if (!buffer.str().empty()) { return true; @@ -464,11 +473,12 @@ bool get_ExcIEEEST7B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } -bool get_ExcIEEEST7B_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->uelin; + buffer << element->vrmin; if (!buffer.str().empty()) { return true; @@ -486,26 +496,26 @@ const char* ExcIEEEST7B::debugString() const void ExcIEEEST7B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B"), &ExcIEEEST7B_factory)); + factory_map.emplace("cim:ExcIEEEST7B", &ExcIEEEST7B_factory); } void ExcIEEEST7B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.kh"), &assign_ExcIEEEST7B_kh)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.kia"), &assign_ExcIEEEST7B_kia)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.kl"), &assign_ExcIEEEST7B_kl)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.kpa"), &assign_ExcIEEEST7B_kpa)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.oelin"), &assign_ExcIEEEST7B_oelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.tb"), &assign_ExcIEEEST7B_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.tc"), &assign_ExcIEEEST7B_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.tf"), &assign_ExcIEEEST7B_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.tg"), &assign_ExcIEEEST7B_tg)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.tia"), &assign_ExcIEEEST7B_tia)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.uelin"), &assign_ExcIEEEST7B_uelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.vmax"), &assign_ExcIEEEST7B_vmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.vmin"), &assign_ExcIEEEST7B_vmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.vrmax"), &assign_ExcIEEEST7B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.vrmin"), &assign_ExcIEEEST7B_vrmin)); + assign_map.emplace("cim:ExcIEEEST7B.kh", &assign_ExcIEEEST7B_kh); + assign_map.emplace("cim:ExcIEEEST7B.kia", &assign_ExcIEEEST7B_kia); + assign_map.emplace("cim:ExcIEEEST7B.kl", &assign_ExcIEEEST7B_kl); + assign_map.emplace("cim:ExcIEEEST7B.kpa", &assign_ExcIEEEST7B_kpa); + assign_map.emplace("cim:ExcIEEEST7B.oelin", &assign_ExcIEEEST7B_oelin); + assign_map.emplace("cim:ExcIEEEST7B.tb", &assign_ExcIEEEST7B_tb); + assign_map.emplace("cim:ExcIEEEST7B.tc", &assign_ExcIEEEST7B_tc); + assign_map.emplace("cim:ExcIEEEST7B.tf", &assign_ExcIEEEST7B_tf); + assign_map.emplace("cim:ExcIEEEST7B.tg", &assign_ExcIEEEST7B_tg); + assign_map.emplace("cim:ExcIEEEST7B.tia", &assign_ExcIEEEST7B_tia); + assign_map.emplace("cim:ExcIEEEST7B.uelin", &assign_ExcIEEEST7B_uelin); + assign_map.emplace("cim:ExcIEEEST7B.vmax", &assign_ExcIEEEST7B_vmax); + assign_map.emplace("cim:ExcIEEEST7B.vmin", &assign_ExcIEEEST7B_vmin); + assign_map.emplace("cim:ExcIEEEST7B.vrmax", &assign_ExcIEEEST7B_vrmax); + assign_map.emplace("cim:ExcIEEEST7B.vrmin", &assign_ExcIEEEST7B_vrmin); } void ExcIEEEST7B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcIEEEST7B.hpp b/CGMES_2.4.13_18DEC2013/ExcIEEEST7B.hpp index f38aee3af..d1428a0fe 100644 --- a/CGMES_2.4.13_18DEC2013/ExcIEEEST7B.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcIEEEST7B.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type ST7B model. This model is representative of static potential-source excitation systems. In this system, the AVR consists of a PI voltage regulator. A phase lead-lag filter in series allows introduction of a derivative function, typically used with brushless excitation systems. In that case, the regulator is of the PID type. In addition, the terminal voltage channel includes a phase lead-lag filter. The AVR includes the appropriate inputs on its reference for overexcitation limiter (OEL1), underexcitation limiter (UEL), stator current limiter (SCL), and current compensator (DROOP). All these limitations, when they work at voltage reference level, keep the PSS (VS signal from Type PSS1A, PSS2A, or PSS2B) in operation. However, the UEL limitation can also be transferred to the high value (HV) gate acting on the output signal. In addition, the output signal passes through a low value (LV) gate for a ceiling overexcitation limiter (OEL2). Reference: IEEE Standard 421.5-2005 Section 7.7. - */ + /** \brief The class represents IEEE Std 421.5-2005 type ST7B model. This model is representative of static potential-source excitation systems. In this system, the AVR consists of a PI voltage regulator. A phase lead-lag filter in series allows introduction of a derivative function, typically used with brushless excitation systems. In that case, the regulator is of the PID type. In addition, the terminal voltage channel includes a phase lead-lag filter. The AVR includes the appropriate inputs on its reference for overexcitation limiter (OEL1), underexcitation limiter (UEL), stator current limiter (SCL), and current compensator (DROOP). All these limitations, when they work at voltage reference level, keep the PSS (VS signal from Type PSS1A, PSS2A, or PSS2B) in operation. However, the UEL limitation can also be transferred to the high value (HV) gate acting on the output signal. In addition, the output signal passes through a low value (LV) gate for a ceiling overexcitation limiter (OEL2). Reference: IEEE Standard 421.5-2005 Section 7.7. */ class ExcIEEEST7B : public ExcitationSystemDynamics { public: @@ -30,21 +28,50 @@ namespace CIMPP ExcIEEEST7B(); ~ExcIEEEST7B() override; - CIMPP::PU kh; /* High-value gate feedback gain (K). Typical Value 1. Default: nullptr */ - CIMPP::PU kia; /* Voltage regulator integral gain (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kl; /* Low-value gate feedback gain (K). Typical Value 1. Default: nullptr */ - CIMPP::PU kpa; /* Voltage regulator proportional gain (K). Typical Value = 40. Default: nullptr */ - CIMPP::ExcST7BOELselectorKind oelin; /* OEL input selector (OELin). Typical Value = noOELinput. Default: 0 */ - CIMPP::Seconds tb; /* Regulator lag time constant (T). Typical Value 1. Default: nullptr */ - CIMPP::Seconds tc; /* Regulator lead time constant (T). Typical Value 1. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (T). Typical Value 1. Default: nullptr */ - CIMPP::Seconds tg; /* Feedback time constant of inner loop field voltage regulator (T). Typical Value 1. Default: nullptr */ - CIMPP::Seconds tia; /* Feedback time constant (T). Typical Value = 3. Default: nullptr */ - CIMPP::ExcST7BUELselectorKind uelin; /* UEL input selector (UELin). Typical Value = noUELinput. Default: 0 */ - CIMPP::PU vmax; /* Maximum voltage reference signal (V). Typical Value = 1.1. Default: nullptr */ - CIMPP::PU vmin; /* Minimum voltage reference signal (V). Typical Value = 0.9. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 5. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = -4.5. Default: nullptr */ + /** \brief High-value gate feedback gain (K). Typical Value 1. Default: nullptr */ + CIMPP::PU kh; + + /** \brief Voltage regulator integral gain (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU kia; + + /** \brief Low-value gate feedback gain (K). Typical Value 1. Default: nullptr */ + CIMPP::PU kl; + + /** \brief Voltage regulator proportional gain (K). Typical Value = 40. Default: nullptr */ + CIMPP::PU kpa; + + /** \brief OEL input selector (OELin). Typical Value = noOELinput. Default: 0 */ + CIMPP::ExcST7BOELselectorKind oelin; + + /** \brief Regulator lag time constant (T). Typical Value 1. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Regulator lead time constant (T). Typical Value 1. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Feedback time constant of inner loop field voltage regulator (T). Typical Value 1. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Feedback time constant (T). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds tia; + + /** \brief UEL input selector (UELin). Typical Value = noUELinput. Default: 0 */ + CIMPP::ExcST7BUELselectorKind uelin; + + /** \brief Maximum voltage reference signal (V). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU vmax; + + /** \brief Minimum voltage reference signal (V). Typical Value = 0.9. Default: nullptr */ + CIMPP::PU vmin; + + /** \brief Maximum voltage regulator output (V). Typical Value = 5. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -4.5. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcOEX3T.cpp b/CGMES_2.4.13_18DEC2013/ExcOEX3T.cpp index a3bfdb7a7..3fc422d40 100644 --- a/CGMES_2.4.13_18DEC2013/ExcOEX3T.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcOEX3T.cpp @@ -8,30 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcOEX3T::ExcOEX3T() {}; -ExcOEX3T::~ExcOEX3T() {}; +ExcOEX3T::ExcOEX3T() {} +ExcOEX3T::~ExcOEX3T() {} static const std::list PossibleProfilesForClass = { @@ -76,259 +57,276 @@ ExcOEX3T::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcOEX3T_e1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_e1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_e2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_e2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_see1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_see1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->see1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_see2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_see2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->see2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcOEX3T_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e1; if (!buffer.str().empty()) @@ -342,7 +340,8 @@ bool get_ExcOEX3T_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e2; if (!buffer.str().empty()) @@ -356,7 +355,8 @@ bool get_ExcOEX3T_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -370,7 +370,8 @@ bool get_ExcOEX3T_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -384,7 +385,8 @@ bool get_ExcOEX3T_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -398,7 +400,8 @@ bool get_ExcOEX3T_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -412,7 +415,8 @@ bool get_ExcOEX3T_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -426,7 +430,8 @@ bool get_ExcOEX3T_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_see1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->see1; if (!buffer.str().empty()) @@ -440,7 +445,8 @@ bool get_ExcOEX3T_see1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcOEX3T_see2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->see2; if (!buffer.str().empty()) @@ -454,7 +460,8 @@ bool get_ExcOEX3T_see2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcOEX3T_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -468,7 +475,8 @@ bool get_ExcOEX3T_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -482,7 +490,8 @@ bool get_ExcOEX3T_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -496,7 +505,8 @@ bool get_ExcOEX3T_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -510,7 +520,8 @@ bool get_ExcOEX3T_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -524,7 +535,8 @@ bool get_ExcOEX3T_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -538,7 +550,8 @@ bool get_ExcOEX3T_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -552,7 +565,8 @@ bool get_ExcOEX3T_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -566,7 +580,8 @@ bool get_ExcOEX3T_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -580,7 +595,8 @@ bool get_ExcOEX3T_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcOEX3T_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -592,8 +608,6 @@ bool get_ExcOEX3T_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char ExcOEX3T::debugName[] = "ExcOEX3T"; const char* ExcOEX3T::debugString() const { @@ -602,30 +616,30 @@ const char* ExcOEX3T::debugString() const void ExcOEX3T::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcOEX3T"), &ExcOEX3T_factory)); + factory_map.emplace("cim:ExcOEX3T", &ExcOEX3T_factory); } void ExcOEX3T::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.e1"), &assign_ExcOEX3T_e1)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.e2"), &assign_ExcOEX3T_e2)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.ka"), &assign_ExcOEX3T_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.kc"), &assign_ExcOEX3T_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.kd"), &assign_ExcOEX3T_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.ke"), &assign_ExcOEX3T_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.kf"), &assign_ExcOEX3T_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.see1"), &assign_ExcOEX3T_see1)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.see2"), &assign_ExcOEX3T_see2)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.t1"), &assign_ExcOEX3T_t1)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.t2"), &assign_ExcOEX3T_t2)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.t3"), &assign_ExcOEX3T_t3)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.t4"), &assign_ExcOEX3T_t4)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.t5"), &assign_ExcOEX3T_t5)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.t6"), &assign_ExcOEX3T_t6)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.te"), &assign_ExcOEX3T_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.tf"), &assign_ExcOEX3T_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.vrmax"), &assign_ExcOEX3T_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.vrmin"), &assign_ExcOEX3T_vrmin)); + assign_map.emplace("cim:ExcOEX3T.e1", &assign_ExcOEX3T_e1); + assign_map.emplace("cim:ExcOEX3T.e2", &assign_ExcOEX3T_e2); + assign_map.emplace("cim:ExcOEX3T.ka", &assign_ExcOEX3T_ka); + assign_map.emplace("cim:ExcOEX3T.kc", &assign_ExcOEX3T_kc); + assign_map.emplace("cim:ExcOEX3T.kd", &assign_ExcOEX3T_kd); + assign_map.emplace("cim:ExcOEX3T.ke", &assign_ExcOEX3T_ke); + assign_map.emplace("cim:ExcOEX3T.kf", &assign_ExcOEX3T_kf); + assign_map.emplace("cim:ExcOEX3T.see1", &assign_ExcOEX3T_see1); + assign_map.emplace("cim:ExcOEX3T.see2", &assign_ExcOEX3T_see2); + assign_map.emplace("cim:ExcOEX3T.t1", &assign_ExcOEX3T_t1); + assign_map.emplace("cim:ExcOEX3T.t2", &assign_ExcOEX3T_t2); + assign_map.emplace("cim:ExcOEX3T.t3", &assign_ExcOEX3T_t3); + assign_map.emplace("cim:ExcOEX3T.t4", &assign_ExcOEX3T_t4); + assign_map.emplace("cim:ExcOEX3T.t5", &assign_ExcOEX3T_t5); + assign_map.emplace("cim:ExcOEX3T.t6", &assign_ExcOEX3T_t6); + assign_map.emplace("cim:ExcOEX3T.te", &assign_ExcOEX3T_te); + assign_map.emplace("cim:ExcOEX3T.tf", &assign_ExcOEX3T_tf); + assign_map.emplace("cim:ExcOEX3T.vrmax", &assign_ExcOEX3T_vrmax); + assign_map.emplace("cim:ExcOEX3T.vrmin", &assign_ExcOEX3T_vrmin); } void ExcOEX3T::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcOEX3T.hpp b/CGMES_2.4.13_18DEC2013/ExcOEX3T.hpp index 16ec9cd48..da7bc97eb 100644 --- a/CGMES_2.4.13_18DEC2013/ExcOEX3T.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcOEX3T.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE Type ST1 Excitation System with semi-continuous and acting terminal voltage limiter. - */ + /** \brief Modified IEEE Type ST1 Excitation System with semi-continuous and acting terminal voltage limiter. */ class ExcOEX3T : public ExcitationSystemDynamics { public: @@ -28,25 +26,62 @@ namespace CIMPP ExcOEX3T(); ~ExcOEX3T() override; - CIMPP::PU e1; /* Saturation parameter (E). Default: nullptr */ - CIMPP::PU e2; /* Saturation parameter (E). Default: nullptr */ - CIMPP::PU ka; /* Gain (K). Default: nullptr */ - CIMPP::PU kc; /* Gain (K). Default: nullptr */ - CIMPP::PU kd; /* Gain (K). Default: nullptr */ - CIMPP::PU ke; /* Gain (K). Default: nullptr */ - CIMPP::PU kf; /* Gain (K). Default: nullptr */ - CIMPP::PU see1; /* Saturation parameter (S(E)). Default: nullptr */ - CIMPP::PU see2; /* Saturation parameter (S(E)). Default: nullptr */ - CIMPP::Seconds t1; /* Time constant (T). Default: nullptr */ - CIMPP::Seconds t2; /* Time constant (T). Default: nullptr */ - CIMPP::Seconds t3; /* Time constant (T). Default: nullptr */ - CIMPP::Seconds t4; /* Time constant (T). Default: nullptr */ - CIMPP::Seconds t5; /* Time constant (T). Default: nullptr */ - CIMPP::Seconds t6; /* Time constant (T). Default: nullptr */ - CIMPP::Seconds te; /* Time constant (T). Default: nullptr */ - CIMPP::Seconds tf; /* Time constant (T). Default: nullptr */ - CIMPP::PU vrmax; /* Limiter (V). Default: nullptr */ - CIMPP::PU vrmin; /* Limiter (V). Default: nullptr */ + /** \brief Saturation parameter (E). Default: nullptr */ + CIMPP::PU e1; + + /** \brief Saturation parameter (E). Default: nullptr */ + CIMPP::PU e2; + + /** \brief Gain (K). Default: nullptr */ + CIMPP::PU ka; + + /** \brief Gain (K). Default: nullptr */ + CIMPP::PU kc; + + /** \brief Gain (K). Default: nullptr */ + CIMPP::PU kd; + + /** \brief Gain (K). Default: nullptr */ + CIMPP::PU ke; + + /** \brief Gain (K). Default: nullptr */ + CIMPP::PU kf; + + /** \brief Saturation parameter (S(E)). Default: nullptr */ + CIMPP::PU see1; + + /** \brief Saturation parameter (S(E)). Default: nullptr */ + CIMPP::PU see2; + + /** \brief Time constant (T). Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Time constant (T). Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Time constant (T). Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Time constant (T). Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant (T). Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Time constant (T). Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time constant (T). Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Time constant (T). Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Limiter (V). Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Limiter (V). Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcPIC.cpp b/CGMES_2.4.13_18DEC2013/ExcPIC.cpp index e4c81265d..dbace3479 100644 --- a/CGMES_2.4.13_18DEC2013/ExcPIC.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcPIC.cpp @@ -8,34 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcPIC::ExcPIC() {}; -ExcPIC::~ExcPIC() {}; +ExcPIC::ExcPIC() {} +ExcPIC::~ExcPIC() {} static const std::list PossibleProfilesForClass = { @@ -84,311 +61,332 @@ ExcPIC::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcPIC_e1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_e1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_e2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_e2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_efdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_efdmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_se1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_se1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_se2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_se2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_ta1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_ta1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_ta2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_ta2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_ta3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_ta3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_ta4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_ta4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_tf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_tf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_vr1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_vr1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vr1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_vr2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_vr2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vr2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcPIC_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e1; if (!buffer.str().empty()) @@ -402,7 +400,8 @@ bool get_ExcPIC_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e2; if (!buffer.str().empty()) @@ -416,7 +415,8 @@ bool get_ExcPIC_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmax; if (!buffer.str().empty()) @@ -430,7 +430,8 @@ bool get_ExcPIC_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcPIC_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmin; if (!buffer.str().empty()) @@ -444,7 +445,8 @@ bool get_ExcPIC_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcPIC_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -458,7 +460,8 @@ bool get_ExcPIC_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -472,7 +475,8 @@ bool get_ExcPIC_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -486,7 +490,8 @@ bool get_ExcPIC_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -500,7 +505,8 @@ bool get_ExcPIC_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -514,7 +520,8 @@ bool get_ExcPIC_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -528,7 +535,8 @@ bool get_ExcPIC_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se1; if (!buffer.str().empty()) @@ -542,7 +550,8 @@ bool get_ExcPIC_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se2; if (!buffer.str().empty()) @@ -556,7 +565,8 @@ bool get_ExcPIC_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_ta1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta1; if (!buffer.str().empty()) @@ -570,7 +580,8 @@ bool get_ExcPIC_ta1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_ta2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta2; if (!buffer.str().empty()) @@ -584,7 +595,8 @@ bool get_ExcPIC_ta2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_ta3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta3; if (!buffer.str().empty()) @@ -598,7 +610,8 @@ bool get_ExcPIC_ta3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_ta4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta4; if (!buffer.str().empty()) @@ -612,7 +625,8 @@ bool get_ExcPIC_ta4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -626,7 +640,8 @@ bool get_ExcPIC_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf1; if (!buffer.str().empty()) @@ -640,7 +655,8 @@ bool get_ExcPIC_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf2; if (!buffer.str().empty()) @@ -654,7 +670,8 @@ bool get_ExcPIC_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_vr1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vr1; if (!buffer.str().empty()) @@ -668,7 +685,8 @@ bool get_ExcPIC_vr1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_vr2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vr2; if (!buffer.str().empty()) @@ -682,7 +700,8 @@ bool get_ExcPIC_vr2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -696,7 +715,8 @@ bool get_ExcPIC_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcPIC_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -708,8 +728,6 @@ bool get_ExcPIC_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char ExcPIC::debugName[] = "ExcPIC"; const char* ExcPIC::debugString() const { @@ -718,34 +736,34 @@ const char* ExcPIC::debugString() const void ExcPIC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcPIC"), &ExcPIC_factory)); + factory_map.emplace("cim:ExcPIC", &ExcPIC_factory); } void ExcPIC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.e1"), &assign_ExcPIC_e1)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.e2"), &assign_ExcPIC_e2)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.efdmax"), &assign_ExcPIC_efdmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.efdmin"), &assign_ExcPIC_efdmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.ka"), &assign_ExcPIC_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.kc"), &assign_ExcPIC_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.ke"), &assign_ExcPIC_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.kf"), &assign_ExcPIC_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.ki"), &assign_ExcPIC_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.kp"), &assign_ExcPIC_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.se1"), &assign_ExcPIC_se1)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.se2"), &assign_ExcPIC_se2)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.ta1"), &assign_ExcPIC_ta1)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.ta2"), &assign_ExcPIC_ta2)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.ta3"), &assign_ExcPIC_ta3)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.ta4"), &assign_ExcPIC_ta4)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.te"), &assign_ExcPIC_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.tf1"), &assign_ExcPIC_tf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.tf2"), &assign_ExcPIC_tf2)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.vr1"), &assign_ExcPIC_vr1)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.vr2"), &assign_ExcPIC_vr2)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.vrmax"), &assign_ExcPIC_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.vrmin"), &assign_ExcPIC_vrmin)); + assign_map.emplace("cim:ExcPIC.e1", &assign_ExcPIC_e1); + assign_map.emplace("cim:ExcPIC.e2", &assign_ExcPIC_e2); + assign_map.emplace("cim:ExcPIC.efdmax", &assign_ExcPIC_efdmax); + assign_map.emplace("cim:ExcPIC.efdmin", &assign_ExcPIC_efdmin); + assign_map.emplace("cim:ExcPIC.ka", &assign_ExcPIC_ka); + assign_map.emplace("cim:ExcPIC.kc", &assign_ExcPIC_kc); + assign_map.emplace("cim:ExcPIC.ke", &assign_ExcPIC_ke); + assign_map.emplace("cim:ExcPIC.kf", &assign_ExcPIC_kf); + assign_map.emplace("cim:ExcPIC.ki", &assign_ExcPIC_ki); + assign_map.emplace("cim:ExcPIC.kp", &assign_ExcPIC_kp); + assign_map.emplace("cim:ExcPIC.se1", &assign_ExcPIC_se1); + assign_map.emplace("cim:ExcPIC.se2", &assign_ExcPIC_se2); + assign_map.emplace("cim:ExcPIC.ta1", &assign_ExcPIC_ta1); + assign_map.emplace("cim:ExcPIC.ta2", &assign_ExcPIC_ta2); + assign_map.emplace("cim:ExcPIC.ta3", &assign_ExcPIC_ta3); + assign_map.emplace("cim:ExcPIC.ta4", &assign_ExcPIC_ta4); + assign_map.emplace("cim:ExcPIC.te", &assign_ExcPIC_te); + assign_map.emplace("cim:ExcPIC.tf1", &assign_ExcPIC_tf1); + assign_map.emplace("cim:ExcPIC.tf2", &assign_ExcPIC_tf2); + assign_map.emplace("cim:ExcPIC.vr1", &assign_ExcPIC_vr1); + assign_map.emplace("cim:ExcPIC.vr2", &assign_ExcPIC_vr2); + assign_map.emplace("cim:ExcPIC.vrmax", &assign_ExcPIC_vrmax); + assign_map.emplace("cim:ExcPIC.vrmin", &assign_ExcPIC_vrmin); } void ExcPIC::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcPIC.hpp b/CGMES_2.4.13_18DEC2013/ExcPIC.hpp index f3937ed14..152d86aa7 100644 --- a/CGMES_2.4.13_18DEC2013/ExcPIC.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcPIC.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Proportional/Integral Regulator Excitation System Model. This model can be used to represent excitation systems with a proportional-integral (PI) voltage regulator controller. - */ + /** \brief Proportional/Integral Regulator Excitation System Model. This model can be used to represent excitation systems with a proportional-integral (PI) voltage regulator controller. */ class ExcPIC : public ExcitationSystemDynamics { public: @@ -28,29 +26,74 @@ namespace CIMPP ExcPIC(); ~ExcPIC() override; - CIMPP::PU e1; /* Field voltage value 1 (E1). Typical Value = 0. Default: nullptr */ - CIMPP::PU e2; /* Field voltage value 2 (E2). Typical Value = 0. Default: nullptr */ - CIMPP::PU efdmax; /* Exciter maximum limit (Efdmax). Typical Value = 8. Default: nullptr */ - CIMPP::PU efdmin; /* Exciter minimum limit (Efdmin). Typical Value = -0.87. Default: nullptr */ - CIMPP::PU ka; /* PI controller gain (Ka). Typical Value = 3.15. Default: nullptr */ - CIMPP::PU kc; /* Exciter regulation factor (Kc). Typical Value = 0.08. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant (Ke). Typical Value = 0. Default: nullptr */ - CIMPP::PU kf; /* Rate feedback gain (Kf). Typical Value = 0. Default: nullptr */ - CIMPP::PU ki; /* Current source gain (Ki). Typical Value = 0. Default: nullptr */ - CIMPP::PU kp; /* Potential source gain (Kp). Typical Value = 6.5. Default: nullptr */ - CIMPP::PU se1; /* Saturation factor at E1 (Se1). Typical Value = 0. Default: nullptr */ - CIMPP::PU se2; /* Saturation factor at E2 (Se2). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ta1; /* PI controller time constant (Ta1). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds ta2; /* Voltage regulator time constant (Ta2). Typical Value = 0.01. Default: nullptr */ - CIMPP::Seconds ta3; /* Lead time constant (Ta3). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ta4; /* Lag time constant (Ta4). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant (Te). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tf1; /* Rate feedback time constant (Tf1). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tf2; /* Rate feedback lag time constant (Tf2). Typical Value = 0. Default: nullptr */ - CIMPP::PU vr1; /* PI maximum limit (Vr1). Typical Value = 1. Default: nullptr */ - CIMPP::PU vr2; /* PI minimum limit (Vr2). Typical Value = -0.87. Default: nullptr */ - CIMPP::PU vrmax; /* Voltage regulator maximum limit (Vrmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmin; /* Voltage regulator minimum limit (Vrmin). Typical Value = -0.87. Default: nullptr */ + /** \brief Field voltage value 1 (E1). Typical Value = 0. Default: nullptr */ + CIMPP::PU e1; + + /** \brief Field voltage value 2 (E2). Typical Value = 0. Default: nullptr */ + CIMPP::PU e2; + + /** \brief Exciter maximum limit (Efdmax). Typical Value = 8. Default: nullptr */ + CIMPP::PU efdmax; + + /** \brief Exciter minimum limit (Efdmin). Typical Value = -0.87. Default: nullptr */ + CIMPP::PU efdmin; + + /** \brief PI controller gain (Ka). Typical Value = 3.15. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Exciter regulation factor (Kc). Typical Value = 0.08. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Exciter constant (Ke). Typical Value = 0. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Rate feedback gain (Kf). Typical Value = 0. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Current source gain (Ki). Typical Value = 0. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Potential source gain (Kp). Typical Value = 6.5. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Saturation factor at E1 (Se1). Typical Value = 0. Default: nullptr */ + CIMPP::PU se1; + + /** \brief Saturation factor at E2 (Se2). Typical Value = 0. Default: nullptr */ + CIMPP::PU se2; + + /** \brief PI controller time constant (Ta1). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds ta1; + + /** \brief Voltage regulator time constant (Ta2). Typical Value = 0.01. Default: nullptr */ + CIMPP::Seconds ta2; + + /** \brief Lead time constant (Ta3). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ta3; + + /** \brief Lag time constant (Ta4). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ta4; + + /** \brief Exciter time constant (Te). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Rate feedback time constant (Tf1). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tf1; + + /** \brief Rate feedback lag time constant (Tf2). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tf2; + + /** \brief PI maximum limit (Vr1). Typical Value = 1. Default: nullptr */ + CIMPP::PU vr1; + + /** \brief PI minimum limit (Vr2). Typical Value = -0.87. Default: nullptr */ + CIMPP::PU vr2; + + /** \brief Voltage regulator maximum limit (Vrmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Voltage regulator minimum limit (Vrmin). Typical Value = -0.87. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcREXS.cpp b/CGMES_2.4.13_18DEC2013/ExcREXS.cpp index 8e0575509..7c198209c 100644 --- a/CGMES_2.4.13_18DEC2013/ExcREXS.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcREXS.cpp @@ -8,47 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "ExcREXSFeedbackSignalKind.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcREXS::ExcREXS() {}; -ExcREXS::~ExcREXS() {}; +ExcREXS::ExcREXS() {} +ExcREXS::~ExcREXS() {} static const std::list PossibleProfilesForClass = { @@ -110,480 +74,514 @@ ExcREXS::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcREXS_e1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_e1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_e2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_e2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_fbf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_fbf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fbf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_flimf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_flimf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flimf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kefd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kefd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kefd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kii(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kii(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kii; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kip(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kip; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kvi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kvi(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kvi; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kvp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kvp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kvp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kvphz(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kvphz(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kvphz; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_nvphz(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_nvphz(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nvphz; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_se1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_se1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_se2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_se2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_tb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_tb1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_tb2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_tb2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_tc1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_tc1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_tc2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_tc2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_tf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_tf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_vcmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_vcmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vcmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_vfmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_vfmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_vfmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_vfmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_xc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_xc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcREXS_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e1; if (!buffer.str().empty()) @@ -597,7 +595,8 @@ bool get_ExcREXS_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e2; if (!buffer.str().empty()) @@ -609,9 +608,25 @@ bool get_ExcREXS_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } +bool get_ExcREXS_fbf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->fbf; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_ExcREXS_flimf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flimf; if (!buffer.str().empty()) @@ -625,7 +640,8 @@ bool get_ExcREXS_flimf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcREXS_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -639,7 +655,8 @@ bool get_ExcREXS_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -653,7 +670,8 @@ bool get_ExcREXS_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -667,7 +685,8 @@ bool get_ExcREXS_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_kefd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kefd; if (!buffer.str().empty()) @@ -681,7 +700,8 @@ bool get_ExcREXS_kefd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcREXS_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -695,7 +715,8 @@ bool get_ExcREXS_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh; if (!buffer.str().empty()) @@ -709,7 +730,8 @@ bool get_ExcREXS_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_kii(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kii; if (!buffer.str().empty()) @@ -723,7 +745,8 @@ bool get_ExcREXS_kii(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_kip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kip; if (!buffer.str().empty()) @@ -737,7 +760,8 @@ bool get_ExcREXS_kip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -751,7 +775,8 @@ bool get_ExcREXS_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_kvi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kvi; if (!buffer.str().empty()) @@ -765,7 +790,8 @@ bool get_ExcREXS_kvi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_kvp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kvp; if (!buffer.str().empty()) @@ -779,7 +805,8 @@ bool get_ExcREXS_kvp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_kvphz(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kvphz; if (!buffer.str().empty()) @@ -793,7 +820,8 @@ bool get_ExcREXS_kvphz(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcREXS_nvphz(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nvphz; if (!buffer.str().empty()) @@ -807,7 +835,8 @@ bool get_ExcREXS_nvphz(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcREXS_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se1; if (!buffer.str().empty()) @@ -821,7 +850,8 @@ bool get_ExcREXS_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se2; if (!buffer.str().empty()) @@ -835,7 +865,8 @@ bool get_ExcREXS_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -849,7 +880,8 @@ bool get_ExcREXS_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb1; if (!buffer.str().empty()) @@ -863,7 +895,8 @@ bool get_ExcREXS_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_tb2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb2; if (!buffer.str().empty()) @@ -877,7 +910,8 @@ bool get_ExcREXS_tb2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_tc1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc1; if (!buffer.str().empty()) @@ -891,7 +925,8 @@ bool get_ExcREXS_tc1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_tc2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc2; if (!buffer.str().empty()) @@ -905,7 +940,8 @@ bool get_ExcREXS_tc2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -919,7 +955,8 @@ bool get_ExcREXS_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -933,7 +970,8 @@ bool get_ExcREXS_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf1; if (!buffer.str().empty()) @@ -947,7 +985,8 @@ bool get_ExcREXS_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf2; if (!buffer.str().empty()) @@ -961,7 +1000,8 @@ bool get_ExcREXS_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -975,7 +1015,8 @@ bool get_ExcREXS_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_vcmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vcmax; if (!buffer.str().empty()) @@ -989,7 +1030,8 @@ bool get_ExcREXS_vcmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcREXS_vfmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfmax; if (!buffer.str().empty()) @@ -1003,7 +1045,8 @@ bool get_ExcREXS_vfmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcREXS_vfmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfmin; if (!buffer.str().empty()) @@ -1017,7 +1060,8 @@ bool get_ExcREXS_vfmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcREXS_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -1031,7 +1075,8 @@ bool get_ExcREXS_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcREXS_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -1045,7 +1090,8 @@ bool get_ExcREXS_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcREXS_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -1059,7 +1105,8 @@ bool get_ExcREXS_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcREXS_xc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xc; if (!buffer.str().empty()) @@ -1071,22 +1118,6 @@ bool get_ExcREXS_xc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - -bool get_ExcREXS_fbf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->fbf; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char ExcREXS::debugName[] = "ExcREXS"; const char* ExcREXS::debugString() const { @@ -1095,47 +1126,47 @@ const char* ExcREXS::debugString() const void ExcREXS::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcREXS"), &ExcREXS_factory)); + factory_map.emplace("cim:ExcREXS", &ExcREXS_factory); } void ExcREXS::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.e1"), &assign_ExcREXS_e1)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.e2"), &assign_ExcREXS_e2)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.fbf"), &assign_ExcREXS_fbf)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.flimf"), &assign_ExcREXS_flimf)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kc"), &assign_ExcREXS_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kd"), &assign_ExcREXS_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.ke"), &assign_ExcREXS_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kefd"), &assign_ExcREXS_kefd)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kf"), &assign_ExcREXS_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kh"), &assign_ExcREXS_kh)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kii"), &assign_ExcREXS_kii)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kip"), &assign_ExcREXS_kip)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.ks"), &assign_ExcREXS_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kvi"), &assign_ExcREXS_kvi)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kvp"), &assign_ExcREXS_kvp)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kvphz"), &assign_ExcREXS_kvphz)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.nvphz"), &assign_ExcREXS_nvphz)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.se1"), &assign_ExcREXS_se1)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.se2"), &assign_ExcREXS_se2)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.ta"), &assign_ExcREXS_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.tb1"), &assign_ExcREXS_tb1)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.tb2"), &assign_ExcREXS_tb2)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.tc1"), &assign_ExcREXS_tc1)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.tc2"), &assign_ExcREXS_tc2)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.te"), &assign_ExcREXS_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.tf"), &assign_ExcREXS_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.tf1"), &assign_ExcREXS_tf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.tf2"), &assign_ExcREXS_tf2)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.tp"), &assign_ExcREXS_tp)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.vcmax"), &assign_ExcREXS_vcmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.vfmax"), &assign_ExcREXS_vfmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.vfmin"), &assign_ExcREXS_vfmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.vimax"), &assign_ExcREXS_vimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.vrmax"), &assign_ExcREXS_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.vrmin"), &assign_ExcREXS_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.xc"), &assign_ExcREXS_xc)); + assign_map.emplace("cim:ExcREXS.e1", &assign_ExcREXS_e1); + assign_map.emplace("cim:ExcREXS.e2", &assign_ExcREXS_e2); + assign_map.emplace("cim:ExcREXS.fbf", &assign_ExcREXS_fbf); + assign_map.emplace("cim:ExcREXS.flimf", &assign_ExcREXS_flimf); + assign_map.emplace("cim:ExcREXS.kc", &assign_ExcREXS_kc); + assign_map.emplace("cim:ExcREXS.kd", &assign_ExcREXS_kd); + assign_map.emplace("cim:ExcREXS.ke", &assign_ExcREXS_ke); + assign_map.emplace("cim:ExcREXS.kefd", &assign_ExcREXS_kefd); + assign_map.emplace("cim:ExcREXS.kf", &assign_ExcREXS_kf); + assign_map.emplace("cim:ExcREXS.kh", &assign_ExcREXS_kh); + assign_map.emplace("cim:ExcREXS.kii", &assign_ExcREXS_kii); + assign_map.emplace("cim:ExcREXS.kip", &assign_ExcREXS_kip); + assign_map.emplace("cim:ExcREXS.ks", &assign_ExcREXS_ks); + assign_map.emplace("cim:ExcREXS.kvi", &assign_ExcREXS_kvi); + assign_map.emplace("cim:ExcREXS.kvp", &assign_ExcREXS_kvp); + assign_map.emplace("cim:ExcREXS.kvphz", &assign_ExcREXS_kvphz); + assign_map.emplace("cim:ExcREXS.nvphz", &assign_ExcREXS_nvphz); + assign_map.emplace("cim:ExcREXS.se1", &assign_ExcREXS_se1); + assign_map.emplace("cim:ExcREXS.se2", &assign_ExcREXS_se2); + assign_map.emplace("cim:ExcREXS.ta", &assign_ExcREXS_ta); + assign_map.emplace("cim:ExcREXS.tb1", &assign_ExcREXS_tb1); + assign_map.emplace("cim:ExcREXS.tb2", &assign_ExcREXS_tb2); + assign_map.emplace("cim:ExcREXS.tc1", &assign_ExcREXS_tc1); + assign_map.emplace("cim:ExcREXS.tc2", &assign_ExcREXS_tc2); + assign_map.emplace("cim:ExcREXS.te", &assign_ExcREXS_te); + assign_map.emplace("cim:ExcREXS.tf", &assign_ExcREXS_tf); + assign_map.emplace("cim:ExcREXS.tf1", &assign_ExcREXS_tf1); + assign_map.emplace("cim:ExcREXS.tf2", &assign_ExcREXS_tf2); + assign_map.emplace("cim:ExcREXS.tp", &assign_ExcREXS_tp); + assign_map.emplace("cim:ExcREXS.vcmax", &assign_ExcREXS_vcmax); + assign_map.emplace("cim:ExcREXS.vfmax", &assign_ExcREXS_vfmax); + assign_map.emplace("cim:ExcREXS.vfmin", &assign_ExcREXS_vfmin); + assign_map.emplace("cim:ExcREXS.vimax", &assign_ExcREXS_vimax); + assign_map.emplace("cim:ExcREXS.vrmax", &assign_ExcREXS_vrmax); + assign_map.emplace("cim:ExcREXS.vrmin", &assign_ExcREXS_vrmin); + assign_map.emplace("cim:ExcREXS.xc", &assign_ExcREXS_xc); } void ExcREXS::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcREXS.hpp b/CGMES_2.4.13_18DEC2013/ExcREXS.hpp index 4d9138e12..18cd27ace 100644 --- a/CGMES_2.4.13_18DEC2013/ExcREXS.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcREXS.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - General Purpose Rotating Excitation System Model. This model can be used to represent a wide range of excitation systems whose DC power source is an AC or DC generator. It encompasses IEEE type AC1, AC2, DC1, and DC2 excitation system models. - */ + /** \brief General Purpose Rotating Excitation System Model. This model can be used to represent a wide range of excitation systems whose DC power source is an AC or DC generator. It encompasses IEEE type AC1, AC2, DC1, and DC2 excitation system models. */ class ExcREXS : public ExcitationSystemDynamics { public: @@ -29,42 +27,113 @@ namespace CIMPP ExcREXS(); ~ExcREXS() override; - CIMPP::PU e1; /* Field voltage value 1 (E1). Typical Value = 3. Default: nullptr */ - CIMPP::PU e2; /* Field voltage value 2 (E2). Typical Value = 4. Default: nullptr */ - CIMPP::ExcREXSFeedbackSignalKind fbf; /* Rate feedback signal flag (Fbf). Typical Value = fieldCurrent. Default: 0 */ - CIMPP::PU flimf; /* Limit type flag (Flimf). Typical Value = 0. Default: nullptr */ - CIMPP::PU kc; /* Rectifier regulation factor (Kc). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU kd; /* Exciter regulation factor (Kd). Typical Value = 2. Default: nullptr */ - CIMPP::PU ke; /* Exciter field proportional constant (Ke). Typical Value = 1. Default: nullptr */ - CIMPP::PU kefd; /* Field voltage feedback gain (Kefd). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds kf; /* Rate feedback gain (Kf). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU kh; /* Field voltage controller feedback gain (Kh). Typical Value = 0. Default: nullptr */ - CIMPP::PU kii; /* Field Current Regulator Integral Gain (Kii). Typical Value = 0. Default: nullptr */ - CIMPP::PU kip; /* Field Current Regulator Proportional Gain (Kip). Typical Value = 1. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ - CIMPP::PU kvi; /* Voltage Regulator Integral Gain (Kvi). Typical Value = 0. Default: nullptr */ - CIMPP::PU kvp; /* Voltage Regulator Proportional Gain (Kvp). Typical Value = 2800. Default: nullptr */ - CIMPP::PU kvphz; /* V/Hz limiter gain (Kvphz). Typical Value = 0. Default: nullptr */ - CIMPP::PU nvphz; /* Pickup speed of V/Hz limiter (Nvphz). Typical Value = 0. Default: nullptr */ - CIMPP::PU se1; /* Saturation factor at E1 (Se1). Typical Value = 0.0001. Default: nullptr */ - CIMPP::PU se2; /* Saturation factor at E2 (Se2). Typical Value = 0.001. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage Regulator time constant (Ta). Typical Value = 0.01. Default: nullptr */ - CIMPP::Seconds tb1; /* Lag time constant (Tb1). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tb2; /* Lag time constant (Tb2). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc1; /* Lead time constant (Tc1). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc2; /* Lead time constant (Tc2). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter field time constant (Te). Typical Value = 1.2. Default: nullptr */ - CIMPP::Seconds tf; /* Rate feedback time constant (Tf). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tf1; /* Feedback lead time constant (Tf1). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tf2; /* Feedback lag time constant (Tf2). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tp; /* Field current Bridge time constant (Tp). Typical Value = 0. Default: nullptr */ - CIMPP::PU vcmax; /* Maximum compounding voltage (Vcmax). Typical Value = 0. Default: nullptr */ - CIMPP::PU vfmax; /* Maximum Exciter Field Current (Vfmax). Typical Value = 47. Default: nullptr */ - CIMPP::PU vfmin; /* Minimum Exciter Field Current (Vfmin). Typical Value = -20. Default: nullptr */ - CIMPP::PU vimax; /* Voltage Regulator Input Limit (Vimax). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum controller output (Vrmax). Typical Value = 47. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum controller output (Vrmin). Typical Value = -20. Default: nullptr */ - CIMPP::PU xc; /* Exciter compounding reactance (Xc). Typical Value = 0. Default: nullptr */ + /** \brief Field voltage value 1 (E1). Typical Value = 3. Default: nullptr */ + CIMPP::PU e1; + + /** \brief Field voltage value 2 (E2). Typical Value = 4. Default: nullptr */ + CIMPP::PU e2; + + /** \brief Rate feedback signal flag (Fbf). Typical Value = fieldCurrent. Default: 0 */ + CIMPP::ExcREXSFeedbackSignalKind fbf; + + /** \brief Limit type flag (Flimf). Typical Value = 0. Default: nullptr */ + CIMPP::PU flimf; + + /** \brief Rectifier regulation factor (Kc). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Exciter regulation factor (Kd). Typical Value = 2. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter field proportional constant (Ke). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Field voltage feedback gain (Kefd). Typical Value = 0. Default: nullptr */ + CIMPP::PU kefd; + + /** \brief Rate feedback gain (Kf). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds kf; + + /** \brief Field voltage controller feedback gain (Kh). Typical Value = 0. Default: nullptr */ + CIMPP::PU kh; + + /** \brief Field Current Regulator Integral Gain (Kii). Typical Value = 0. Default: nullptr */ + CIMPP::PU kii; + + /** \brief Field Current Regulator Proportional Gain (Kip). Typical Value = 1. Default: nullptr */ + CIMPP::PU kip; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Voltage Regulator Integral Gain (Kvi). Typical Value = 0. Default: nullptr */ + CIMPP::PU kvi; + + /** \brief Voltage Regulator Proportional Gain (Kvp). Typical Value = 2800. Default: nullptr */ + CIMPP::PU kvp; + + /** \brief V/Hz limiter gain (Kvphz). Typical Value = 0. Default: nullptr */ + CIMPP::PU kvphz; + + /** \brief Pickup speed of V/Hz limiter (Nvphz). Typical Value = 0. Default: nullptr */ + CIMPP::PU nvphz; + + /** \brief Saturation factor at E1 (Se1). Typical Value = 0.0001. Default: nullptr */ + CIMPP::PU se1; + + /** \brief Saturation factor at E2 (Se2). Typical Value = 0.001. Default: nullptr */ + CIMPP::PU se2; + + /** \brief Voltage Regulator time constant (Ta). Typical Value = 0.01. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Lag time constant (Tb1). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb1; + + /** \brief Lag time constant (Tb2). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb2; + + /** \brief Lead time constant (Tc1). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc1; + + /** \brief Lead time constant (Tc2). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc2; + + /** \brief Exciter field time constant (Te). Typical Value = 1.2. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Rate feedback time constant (Tf). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Feedback lead time constant (Tf1). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tf1; + + /** \brief Feedback lag time constant (Tf2). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tf2; + + /** \brief Field current Bridge time constant (Tp). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Maximum compounding voltage (Vcmax). Typical Value = 0. Default: nullptr */ + CIMPP::PU vcmax; + + /** \brief Maximum Exciter Field Current (Vfmax). Typical Value = 47. Default: nullptr */ + CIMPP::PU vfmax; + + /** \brief Minimum Exciter Field Current (Vfmin). Typical Value = -20. Default: nullptr */ + CIMPP::PU vfmin; + + /** \brief Voltage Regulator Input Limit (Vimax). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Maximum controller output (Vrmax). Typical Value = 47. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum controller output (Vrmin). Typical Value = -20. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief Exciter compounding reactance (Xc). Typical Value = 0. Default: nullptr */ + CIMPP::PU xc; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcREXSFeedbackSignalKind.cpp b/CGMES_2.4.13_18DEC2013/ExcREXSFeedbackSignalKind.cpp index de55c6691..e05a1487d 100644 --- a/CGMES_2.4.13_18DEC2013/ExcREXSFeedbackSignalKind.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcREXSFeedbackSignalKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "ExcREXSFeedbackSignalKind") + if (EnumSymbol.substr(0, pos) != "ExcREXSFeedbackSignalKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "fieldVoltage") + if (EnumSymbol == "fieldVoltage") { rop = ExcREXSFeedbackSignalKind::fieldVoltage; return lop; } - if(EnumSymbol == "fieldCurrent") + if (EnumSymbol == "fieldCurrent") { rop = ExcREXSFeedbackSignalKind::fieldCurrent; return lop; } - if(EnumSymbol == "outputVoltage") + if (EnumSymbol == "outputVoltage") { rop = ExcREXSFeedbackSignalKind::outputVoltage; return lop; diff --git a/CGMES_2.4.13_18DEC2013/ExcREXSFeedbackSignalKind.hpp b/CGMES_2.4.13_18DEC2013/ExcREXSFeedbackSignalKind.hpp index 2ca199680..37cf82ab7 100644 --- a/CGMES_2.4.13_18DEC2013/ExcREXSFeedbackSignalKind.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcREXSFeedbackSignalKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of rate feedback signals. - */ + /** \brief Type of rate feedback signals. */ class ExcREXSFeedbackSignalKind { public: enum ExcREXSFeedbackSignalKind_ENUM { - /** - * The voltage regulator output voltage is used. It is the same as exciter field voltage. - */ + /** The voltage regulator output voltage is used. It is the same as exciter field voltage. */ fieldVoltage, - /** - * The exciter field current is used. - */ + /** The exciter field current is used. */ fieldCurrent, - /** - * The output voltage of the exciter is used. - */ + /** The output voltage of the exciter is used. */ outputVoltage, }; diff --git a/CGMES_2.4.13_18DEC2013/ExcSCRX.cpp b/CGMES_2.4.13_18DEC2013/ExcSCRX.cpp index 309ab1b3d..be7b304c3 100644 --- a/CGMES_2.4.13_18DEC2013/ExcSCRX.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcSCRX.cpp @@ -8,19 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -ExcSCRX::ExcSCRX() {}; -ExcSCRX::~ExcSCRX() {}; +ExcSCRX::ExcSCRX() {} +ExcSCRX::~ExcSCRX() {} static const std::list PossibleProfilesForClass = { @@ -54,116 +46,122 @@ ExcSCRX::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcSCRX_cswitch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSCRX_cswitch(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->cswitch; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSCRX_emax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSCRX_emax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->emax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSCRX_emin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSCRX_emin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->emin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSCRX_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSCRX_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSCRX_rcrfd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSCRX_rcrfd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rcrfd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSCRX_tatb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSCRX_tatb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tatb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSCRX_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSCRX_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSCRX_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSCRX_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcSCRX_cswitch(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + const ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->cswitch; if (!buffer.str().empty()) @@ -177,7 +175,8 @@ bool get_ExcSCRX_cswitch(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcSCRX_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + const ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->emax; if (!buffer.str().empty()) @@ -191,7 +190,8 @@ bool get_ExcSCRX_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcSCRX_emin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + const ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->emin; if (!buffer.str().empty()) @@ -205,7 +205,8 @@ bool get_ExcSCRX_emin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcSCRX_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + const ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -219,7 +220,8 @@ bool get_ExcSCRX_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSCRX_rcrfd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + const ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rcrfd; if (!buffer.str().empty()) @@ -233,7 +235,8 @@ bool get_ExcSCRX_rcrfd(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcSCRX_tatb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + const ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tatb; if (!buffer.str().empty()) @@ -247,7 +250,8 @@ bool get_ExcSCRX_tatb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcSCRX_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + const ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -261,7 +265,8 @@ bool get_ExcSCRX_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSCRX_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + const ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -273,8 +278,6 @@ bool get_ExcSCRX_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcSCRX::debugName[] = "ExcSCRX"; const char* ExcSCRX::debugString() const { @@ -283,19 +286,19 @@ const char* ExcSCRX::debugString() const void ExcSCRX::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcSCRX"), &ExcSCRX_factory)); + factory_map.emplace("cim:ExcSCRX", &ExcSCRX_factory); } void ExcSCRX::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcSCRX.cswitch"), &assign_ExcSCRX_cswitch)); - assign_map.insert(std::make_pair(std::string("cim:ExcSCRX.emax"), &assign_ExcSCRX_emax)); - assign_map.insert(std::make_pair(std::string("cim:ExcSCRX.emin"), &assign_ExcSCRX_emin)); - assign_map.insert(std::make_pair(std::string("cim:ExcSCRX.k"), &assign_ExcSCRX_k)); - assign_map.insert(std::make_pair(std::string("cim:ExcSCRX.rcrfd"), &assign_ExcSCRX_rcrfd)); - assign_map.insert(std::make_pair(std::string("cim:ExcSCRX.tatb"), &assign_ExcSCRX_tatb)); - assign_map.insert(std::make_pair(std::string("cim:ExcSCRX.tb"), &assign_ExcSCRX_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcSCRX.te"), &assign_ExcSCRX_te)); + assign_map.emplace("cim:ExcSCRX.cswitch", &assign_ExcSCRX_cswitch); + assign_map.emplace("cim:ExcSCRX.emax", &assign_ExcSCRX_emax); + assign_map.emplace("cim:ExcSCRX.emin", &assign_ExcSCRX_emin); + assign_map.emplace("cim:ExcSCRX.k", &assign_ExcSCRX_k); + assign_map.emplace("cim:ExcSCRX.rcrfd", &assign_ExcSCRX_rcrfd); + assign_map.emplace("cim:ExcSCRX.tatb", &assign_ExcSCRX_tatb); + assign_map.emplace("cim:ExcSCRX.tb", &assign_ExcSCRX_tb); + assign_map.emplace("cim:ExcSCRX.te", &assign_ExcSCRX_te); } void ExcSCRX::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcSCRX.hpp b/CGMES_2.4.13_18DEC2013/ExcSCRX.hpp index b99bbc5b2..5bf3e69b6 100644 --- a/CGMES_2.4.13_18DEC2013/ExcSCRX.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcSCRX.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Simple excitation system model representing generic characteristics of many excitation systems; intended for use where negative field current may be a problem. - */ + /** \brief Simple excitation system model representing generic characteristics of many excitation systems; intended for use where negative field current may be a problem. */ class ExcSCRX : public ExcitationSystemDynamics { public: @@ -30,14 +28,29 @@ namespace CIMPP ExcSCRX(); ~ExcSCRX() override; - CIMPP::Boolean cswitch; /* Power source switch (Cswitch). true = fixed voltage of 1.0 PU false = generator terminal voltage. Default: false */ - CIMPP::PU emax; /* Maximum field voltage output (Emax). Typical Value = 5. Default: nullptr */ - CIMPP::PU emin; /* Minimum field voltage output (Emin). Typical Value = 0. Default: nullptr */ - CIMPP::PU k; /* Gain (K) (>0). Typical Value = 200. Default: nullptr */ - CIMPP::Simple_Float rcrfd; /* Rc/Rfd - ratio of field discharge resistance to field winding resistance (RcRfd). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float tatb; /* Ta/Tb - gain reduction ratio of lag-lead element (TaTb). The parameter Ta is not defined explicitly. Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tb; /* Denominator time constant of lag-lead block (Tb). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds te; /* Time constant of gain block (Te) (>0). Typical Value = 0.02. Default: nullptr */ + /** \brief Power source switch (Cswitch). true = fixed voltage of 1.0 PU false = generator terminal voltage. Default: false */ + CIMPP::Boolean cswitch; + + /** \brief Maximum field voltage output (Emax). Typical Value = 5. Default: nullptr */ + CIMPP::PU emax; + + /** \brief Minimum field voltage output (Emin). Typical Value = 0. Default: nullptr */ + CIMPP::PU emin; + + /** \brief Gain (K) (>0). Typical Value = 200. Default: nullptr */ + CIMPP::PU k; + + /** \brief Rc/Rfd - ratio of field discharge resistance to field winding resistance (RcRfd). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float rcrfd; + + /** \brief Ta/Tb - gain reduction ratio of lag-lead element (TaTb). The parameter Ta is not defined explicitly. Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float tatb; + + /** \brief Denominator time constant of lag-lead block (Tb). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Time constant of gain block (Te) (>0). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds te; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcSEXS.cpp b/CGMES_2.4.13_18DEC2013/ExcSEXS.cpp index 2f9d7141a..e78222ab6 100644 --- a/CGMES_2.4.13_18DEC2013/ExcSEXS.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcSEXS.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -ExcSEXS::ExcSEXS() {}; -ExcSEXS::~ExcSEXS() {}; +ExcSEXS::ExcSEXS() {} +ExcSEXS::~ExcSEXS() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ ExcSEXS::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcSEXS_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_efdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSEXS_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_efdmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSEXS_emax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_emax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->emax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSEXS_emin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_emin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->emin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSEXS_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSEXS_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSEXS_tatb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_tatb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tatb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSEXS_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSEXS_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSEXS_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcSEXS_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmax; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_ExcSEXS_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcSEXS_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmin; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_ExcSEXS_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcSEXS_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->emax; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_ExcSEXS_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcSEXS_emin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->emin; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_ExcSEXS_emin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcSEXS_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_ExcSEXS_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSEXS_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_ExcSEXS_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSEXS_tatb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tatb; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_ExcSEXS_tatb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcSEXS_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_ExcSEXS_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSEXS_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_ExcSEXS_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSEXS_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_ExcSEXS_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcSEXS::debugName[] = "ExcSEXS"; const char* ExcSEXS::debugString() const { @@ -341,21 +346,21 @@ const char* ExcSEXS::debugString() const void ExcSEXS::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcSEXS"), &ExcSEXS_factory)); + factory_map.emplace("cim:ExcSEXS", &ExcSEXS_factory); } void ExcSEXS::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.efdmax"), &assign_ExcSEXS_efdmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.efdmin"), &assign_ExcSEXS_efdmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.emax"), &assign_ExcSEXS_emax)); - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.emin"), &assign_ExcSEXS_emin)); - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.k"), &assign_ExcSEXS_k)); - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.kc"), &assign_ExcSEXS_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.tatb"), &assign_ExcSEXS_tatb)); - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.tb"), &assign_ExcSEXS_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.tc"), &assign_ExcSEXS_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.te"), &assign_ExcSEXS_te)); + assign_map.emplace("cim:ExcSEXS.efdmax", &assign_ExcSEXS_efdmax); + assign_map.emplace("cim:ExcSEXS.efdmin", &assign_ExcSEXS_efdmin); + assign_map.emplace("cim:ExcSEXS.emax", &assign_ExcSEXS_emax); + assign_map.emplace("cim:ExcSEXS.emin", &assign_ExcSEXS_emin); + assign_map.emplace("cim:ExcSEXS.k", &assign_ExcSEXS_k); + assign_map.emplace("cim:ExcSEXS.kc", &assign_ExcSEXS_kc); + assign_map.emplace("cim:ExcSEXS.tatb", &assign_ExcSEXS_tatb); + assign_map.emplace("cim:ExcSEXS.tb", &assign_ExcSEXS_tb); + assign_map.emplace("cim:ExcSEXS.tc", &assign_ExcSEXS_tc); + assign_map.emplace("cim:ExcSEXS.te", &assign_ExcSEXS_te); } void ExcSEXS::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcSEXS.hpp b/CGMES_2.4.13_18DEC2013/ExcSEXS.hpp index fa02fc7ce..2b957eb4e 100644 --- a/CGMES_2.4.13_18DEC2013/ExcSEXS.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcSEXS.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Simplified Excitation System Model. - */ + /** \brief Simplified Excitation System Model. */ class ExcSEXS : public ExcitationSystemDynamics { public: @@ -29,16 +27,35 @@ namespace CIMPP ExcSEXS(); ~ExcSEXS() override; - CIMPP::PU efdmax; /* Field voltage clipping maximum limit (Efdmax). Typical Value = 5. Default: nullptr */ - CIMPP::PU efdmin; /* Field voltage clipping minimum limit (Efdmin). Typical Value = -5. Default: nullptr */ - CIMPP::PU emax; /* Maximum field voltage output (Emax). Typical Value = 5. Default: nullptr */ - CIMPP::PU emin; /* Minimum field voltage output (Emin). Typical Value = -5. Default: nullptr */ - CIMPP::PU k; /* Gain (K) (>0). Typical Value = 100. Default: nullptr */ - CIMPP::PU kc; /* PI controller gain (Kc). Typical Value = 0.08. Default: nullptr */ - CIMPP::Simple_Float tatb; /* Ta/Tb - gain reduction ratio of lag-lead element (TaTb). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tb; /* Denominator time constant of lag-lead block (Tb). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds tc; /* PI controller phase lead time constant (Tc). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Time constant of gain block (Te). Typical Value = 0.05. Default: nullptr */ + /** \brief Field voltage clipping maximum limit (Efdmax). Typical Value = 5. Default: nullptr */ + CIMPP::PU efdmax; + + /** \brief Field voltage clipping minimum limit (Efdmin). Typical Value = -5. Default: nullptr */ + CIMPP::PU efdmin; + + /** \brief Maximum field voltage output (Emax). Typical Value = 5. Default: nullptr */ + CIMPP::PU emax; + + /** \brief Minimum field voltage output (Emin). Typical Value = -5. Default: nullptr */ + CIMPP::PU emin; + + /** \brief Gain (K) (>0). Typical Value = 100. Default: nullptr */ + CIMPP::PU k; + + /** \brief PI controller gain (Kc). Typical Value = 0.08. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Ta/Tb - gain reduction ratio of lag-lead element (TaTb). Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float tatb; + + /** \brief Denominator time constant of lag-lead block (Tb). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief PI controller phase lead time constant (Tc). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Time constant of gain block (Te). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds te; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcSK.cpp b/CGMES_2.4.13_18DEC2013/ExcSK.cpp index cb3427545..0c8d97812 100644 --- a/CGMES_2.4.13_18DEC2013/ExcSK.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcSK.cpp @@ -8,43 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "ApparentPower.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcSK::ExcSK() {}; -ExcSK::~ExcSK() {}; +ExcSK::ExcSK() {} +ExcSK::~ExcSK() {} static const std::list PossibleProfilesForClass = { @@ -102,428 +70,458 @@ ExcSK::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcSK_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_efdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_efdmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_emax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_emax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->emax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_emin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_emin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->emin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_kce(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_kce(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kce; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_kgob(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_kgob(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kgob; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_kqi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_kqi(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kqi; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_kqob(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_kqob(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kqob; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_kqp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_kqp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kqp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_nq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_nq(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nq; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_qconoff(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_qconoff(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qconoff; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_qz(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_qz(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qz; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_remote(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_remote(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->remote; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_sbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_sbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->sbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_ti(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_ti(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_uimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_uimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_uimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_uimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_urmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_urmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->urmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_urmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_urmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->urmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_vtmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_vtmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vtmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_vtmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_vtmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vtmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_yp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_yp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->yp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcSK_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmax; if (!buffer.str().empty()) @@ -537,7 +535,8 @@ bool get_ExcSK_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcSK_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmin; if (!buffer.str().empty()) @@ -551,7 +550,8 @@ bool get_ExcSK_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcSK_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->emax; if (!buffer.str().empty()) @@ -565,7 +565,8 @@ bool get_ExcSK_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_emin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->emin; if (!buffer.str().empty()) @@ -579,7 +580,8 @@ bool get_ExcSK_emin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -593,7 +595,8 @@ bool get_ExcSK_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -607,7 +610,8 @@ bool get_ExcSK_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -621,7 +625,8 @@ bool get_ExcSK_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -635,7 +640,8 @@ bool get_ExcSK_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_kce(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kce; if (!buffer.str().empty()) @@ -649,7 +655,8 @@ bool get_ExcSK_kce(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -663,7 +670,8 @@ bool get_ExcSK_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_kgob(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kgob; if (!buffer.str().empty()) @@ -677,7 +685,8 @@ bool get_ExcSK_kgob(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -691,7 +700,8 @@ bool get_ExcSK_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_kqi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kqi; if (!buffer.str().empty()) @@ -705,7 +715,8 @@ bool get_ExcSK_kqi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_kqob(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kqob; if (!buffer.str().empty()) @@ -719,7 +730,8 @@ bool get_ExcSK_kqob(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_kqp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kqp; if (!buffer.str().empty()) @@ -733,7 +745,8 @@ bool get_ExcSK_kqp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_nq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nq; if (!buffer.str().empty()) @@ -747,7 +760,8 @@ bool get_ExcSK_nq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_qconoff(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qconoff; if (!buffer.str().empty()) @@ -761,7 +775,8 @@ bool get_ExcSK_qconoff(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcSK_qz(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qz; if (!buffer.str().empty()) @@ -775,7 +790,8 @@ bool get_ExcSK_qz(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_remote(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->remote; if (!buffer.str().empty()) @@ -789,7 +805,8 @@ bool get_ExcSK_remote(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcSK_sbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->sbase; if (!buffer.str().empty()) @@ -803,7 +820,8 @@ bool get_ExcSK_sbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -817,7 +835,8 @@ bool get_ExcSK_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -831,7 +850,8 @@ bool get_ExcSK_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_ti(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti; if (!buffer.str().empty()) @@ -845,7 +865,8 @@ bool get_ExcSK_ti(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -859,7 +880,8 @@ bool get_ExcSK_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -873,7 +895,8 @@ bool get_ExcSK_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_uimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uimax; if (!buffer.str().empty()) @@ -887,7 +910,8 @@ bool get_ExcSK_uimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_uimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uimin; if (!buffer.str().empty()) @@ -901,7 +925,8 @@ bool get_ExcSK_uimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_urmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->urmax; if (!buffer.str().empty()) @@ -915,7 +940,8 @@ bool get_ExcSK_urmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_urmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->urmin; if (!buffer.str().empty()) @@ -929,7 +955,8 @@ bool get_ExcSK_urmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_vtmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vtmax; if (!buffer.str().empty()) @@ -943,7 +970,8 @@ bool get_ExcSK_vtmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_vtmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vtmin; if (!buffer.str().empty()) @@ -957,7 +985,8 @@ bool get_ExcSK_vtmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_yp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->yp; if (!buffer.str().empty()) @@ -969,8 +998,6 @@ bool get_ExcSK_yp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcSK::debugName[] = "ExcSK"; const char* ExcSK::debugString() const { @@ -979,43 +1006,43 @@ const char* ExcSK::debugString() const void ExcSK::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcSK"), &ExcSK_factory)); + factory_map.emplace("cim:ExcSK", &ExcSK_factory); } void ExcSK::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcSK.efdmax"), &assign_ExcSK_efdmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.efdmin"), &assign_ExcSK_efdmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.emax"), &assign_ExcSK_emax)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.emin"), &assign_ExcSK_emin)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.k"), &assign_ExcSK_k)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.k1"), &assign_ExcSK_k1)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.k2"), &assign_ExcSK_k2)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.kc"), &assign_ExcSK_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.kce"), &assign_ExcSK_kce)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.kd"), &assign_ExcSK_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.kgob"), &assign_ExcSK_kgob)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.kp"), &assign_ExcSK_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.kqi"), &assign_ExcSK_kqi)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.kqob"), &assign_ExcSK_kqob)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.kqp"), &assign_ExcSK_kqp)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.nq"), &assign_ExcSK_nq)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.qconoff"), &assign_ExcSK_qconoff)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.qz"), &assign_ExcSK_qz)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.remote"), &assign_ExcSK_remote)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.sbase"), &assign_ExcSK_sbase)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.tc"), &assign_ExcSK_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.te"), &assign_ExcSK_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.ti"), &assign_ExcSK_ti)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.tp"), &assign_ExcSK_tp)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.tr"), &assign_ExcSK_tr)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.uimax"), &assign_ExcSK_uimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.uimin"), &assign_ExcSK_uimin)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.urmax"), &assign_ExcSK_urmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.urmin"), &assign_ExcSK_urmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.vtmax"), &assign_ExcSK_vtmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.vtmin"), &assign_ExcSK_vtmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.yp"), &assign_ExcSK_yp)); + assign_map.emplace("cim:ExcSK.efdmax", &assign_ExcSK_efdmax); + assign_map.emplace("cim:ExcSK.efdmin", &assign_ExcSK_efdmin); + assign_map.emplace("cim:ExcSK.emax", &assign_ExcSK_emax); + assign_map.emplace("cim:ExcSK.emin", &assign_ExcSK_emin); + assign_map.emplace("cim:ExcSK.k", &assign_ExcSK_k); + assign_map.emplace("cim:ExcSK.k1", &assign_ExcSK_k1); + assign_map.emplace("cim:ExcSK.k2", &assign_ExcSK_k2); + assign_map.emplace("cim:ExcSK.kc", &assign_ExcSK_kc); + assign_map.emplace("cim:ExcSK.kce", &assign_ExcSK_kce); + assign_map.emplace("cim:ExcSK.kd", &assign_ExcSK_kd); + assign_map.emplace("cim:ExcSK.kgob", &assign_ExcSK_kgob); + assign_map.emplace("cim:ExcSK.kp", &assign_ExcSK_kp); + assign_map.emplace("cim:ExcSK.kqi", &assign_ExcSK_kqi); + assign_map.emplace("cim:ExcSK.kqob", &assign_ExcSK_kqob); + assign_map.emplace("cim:ExcSK.kqp", &assign_ExcSK_kqp); + assign_map.emplace("cim:ExcSK.nq", &assign_ExcSK_nq); + assign_map.emplace("cim:ExcSK.qconoff", &assign_ExcSK_qconoff); + assign_map.emplace("cim:ExcSK.qz", &assign_ExcSK_qz); + assign_map.emplace("cim:ExcSK.remote", &assign_ExcSK_remote); + assign_map.emplace("cim:ExcSK.sbase", &assign_ExcSK_sbase); + assign_map.emplace("cim:ExcSK.tc", &assign_ExcSK_tc); + assign_map.emplace("cim:ExcSK.te", &assign_ExcSK_te); + assign_map.emplace("cim:ExcSK.ti", &assign_ExcSK_ti); + assign_map.emplace("cim:ExcSK.tp", &assign_ExcSK_tp); + assign_map.emplace("cim:ExcSK.tr", &assign_ExcSK_tr); + assign_map.emplace("cim:ExcSK.uimax", &assign_ExcSK_uimax); + assign_map.emplace("cim:ExcSK.uimin", &assign_ExcSK_uimin); + assign_map.emplace("cim:ExcSK.urmax", &assign_ExcSK_urmax); + assign_map.emplace("cim:ExcSK.urmin", &assign_ExcSK_urmin); + assign_map.emplace("cim:ExcSK.vtmax", &assign_ExcSK_vtmax); + assign_map.emplace("cim:ExcSK.vtmin", &assign_ExcSK_vtmin); + assign_map.emplace("cim:ExcSK.yp", &assign_ExcSK_yp); } void ExcSK::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcSK.hpp b/CGMES_2.4.13_18DEC2013/ExcSK.hpp index c151b3973..3d724e1da 100644 --- a/CGMES_2.4.13_18DEC2013/ExcSK.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcSK.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Slovakian Excitation System Model. UEL and secondary voltage control are included in this model. When this model is used, there cannot be a separate underexcitation limiter or VAr controller model. - */ + /** \brief Slovakian Excitation System Model. UEL and secondary voltage control are included in this model. When this model is used, there cannot be a separate underexcitation limiter or VAr controller model. */ class ExcSK : public ExcitationSystemDynamics { public: @@ -30,38 +28,101 @@ namespace CIMPP ExcSK(); ~ExcSK() override; - CIMPP::PU efdmax; /* Field voltage clipping limit (Efdmax). Default: nullptr */ - CIMPP::PU efdmin; /* Field voltage clipping limit (Efdmin). Default: nullptr */ - CIMPP::PU emax; /* Maximum field voltage output (Emax). Typical Value = 20. Default: nullptr */ - CIMPP::PU emin; /* Minimum field voltage output (Emin). Typical Value = -20. Default: nullptr */ - CIMPP::PU k; /* Gain (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU k1; /* Parameter of underexcitation limit (K1). Typical Value = 0.1364. Default: nullptr */ - CIMPP::PU k2; /* Parameter of underexcitation limit (K2). Typical Value = -0.3861. Default: nullptr */ - CIMPP::PU kc; /* PI controller gain (Kc). Typical Value = 70. Default: nullptr */ - CIMPP::PU kce; /* Rectifier regulation factor (Kce). Typical Value = 0. Default: nullptr */ - CIMPP::PU kd; /* Exciter internal reactance (Kd). Typical Value = 0. Default: nullptr */ - CIMPP::PU kgob; /* P controller gain (Kgob). Typical Value = 10. Default: nullptr */ - CIMPP::PU kp; /* PI controller gain (Kp). Typical Value = 1. Default: nullptr */ - CIMPP::PU kqi; /* PI controller gain of integral component (Kqi). Typical Value = 0. Default: nullptr */ - CIMPP::PU kqob; /* Rate of rise of the reactive power (Kqob). Default: nullptr */ - CIMPP::PU kqp; /* PI controller gain (Kqp). Typical Value = 0. Default: nullptr */ - CIMPP::PU nq; /* Dead band of reactive power (nq). Determines the range of sensitivity. Typical Value = 0.001. Default: nullptr */ - CIMPP::Boolean qconoff; /* Secondary voltage control state (Qc_on_off). true = secondary voltage control is ON false = secondary voltage control is OFF. Typical Value = false. Default: false */ - CIMPP::PU qz; /* Desired value (setpoint) of reactive power, manual setting (Qz). Default: nullptr */ - CIMPP::Boolean remote; /* Selector to apply automatic calculation in secondary controller model. true = automatic calculation is activated false = manual set is active; the use of desired value of reactive power (Qz) is required. Typical Value = true. Default: false */ - CIMPP::ApparentPower sbase; /* Apparent power of the unit (Sbase). Unit = MVA. Typical Value = 259. Default: nullptr */ - CIMPP::Seconds tc; /* PI controller phase lead time constant (Tc). Typical Value = 8. Default: nullptr */ - CIMPP::Seconds te; /* Time constant of gain block (Te). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds ti; /* PI controller phase lead time constant (Ti). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds tp; /* Time constant (Tp). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tr; /* Voltage transducer time constant (Tr). Typical Value = 0.01. Default: nullptr */ - CIMPP::PU uimax; /* Maximum error (Uimax). Typical Value = 10. Default: nullptr */ - CIMPP::PU uimin; /* Minimum error (UImin). Typical Value = -10. Default: nullptr */ - CIMPP::PU urmax; /* Maximum controller output (URmax). Typical Value = 10. Default: nullptr */ - CIMPP::PU urmin; /* Minimum controller output (URmin). Typical Value = -10. Default: nullptr */ - CIMPP::PU vtmax; /* Maximum terminal voltage input (Vtmax). Determines the range of voltage dead band. Typical Value = 1.05. Default: nullptr */ - CIMPP::PU vtmin; /* Minimum terminal voltage input (Vtmin). Determines the range of voltage dead band. Typical Value = 0.95. Default: nullptr */ - CIMPP::PU yp; /* Maximum output (Yp). Minimum output = 0. Typical Value = 1. Default: nullptr */ + /** \brief Field voltage clipping limit (Efdmax). Default: nullptr */ + CIMPP::PU efdmax; + + /** \brief Field voltage clipping limit (Efdmin). Default: nullptr */ + CIMPP::PU efdmin; + + /** \brief Maximum field voltage output (Emax). Typical Value = 20. Default: nullptr */ + CIMPP::PU emax; + + /** \brief Minimum field voltage output (Emin). Typical Value = -20. Default: nullptr */ + CIMPP::PU emin; + + /** \brief Gain (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU k; + + /** \brief Parameter of underexcitation limit (K1). Typical Value = 0.1364. Default: nullptr */ + CIMPP::PU k1; + + /** \brief Parameter of underexcitation limit (K2). Typical Value = -0.3861. Default: nullptr */ + CIMPP::PU k2; + + /** \brief PI controller gain (Kc). Typical Value = 70. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Rectifier regulation factor (Kce). Typical Value = 0. Default: nullptr */ + CIMPP::PU kce; + + /** \brief Exciter internal reactance (Kd). Typical Value = 0. Default: nullptr */ + CIMPP::PU kd; + + /** \brief P controller gain (Kgob). Typical Value = 10. Default: nullptr */ + CIMPP::PU kgob; + + /** \brief PI controller gain (Kp). Typical Value = 1. Default: nullptr */ + CIMPP::PU kp; + + /** \brief PI controller gain of integral component (Kqi). Typical Value = 0. Default: nullptr */ + CIMPP::PU kqi; + + /** \brief Rate of rise of the reactive power (Kqob). Default: nullptr */ + CIMPP::PU kqob; + + /** \brief PI controller gain (Kqp). Typical Value = 0. Default: nullptr */ + CIMPP::PU kqp; + + /** \brief Dead band of reactive power (nq). Determines the range of sensitivity. Typical Value = 0.001. Default: nullptr */ + CIMPP::PU nq; + + /** \brief Secondary voltage control state (Qc_on_off). true = secondary voltage control is ON false = secondary voltage control is OFF. Typical Value = false. Default: false */ + CIMPP::Boolean qconoff; + + /** \brief Desired value (setpoint) of reactive power, manual setting (Qz). Default: nullptr */ + CIMPP::PU qz; + + /** \brief Selector to apply automatic calculation in secondary controller model. true = automatic calculation is activated false = manual set is active; the use of desired value of reactive power (Qz) is required. Typical Value = true. Default: false */ + CIMPP::Boolean remote; + + /** \brief Apparent power of the unit (Sbase). Unit = MVA. Typical Value = 259. Default: nullptr */ + CIMPP::ApparentPower sbase; + + /** \brief PI controller phase lead time constant (Tc). Typical Value = 8. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Time constant of gain block (Te). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief PI controller phase lead time constant (Ti). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds ti; + + /** \brief Time constant (Tp). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Voltage transducer time constant (Tr). Typical Value = 0.01. Default: nullptr */ + CIMPP::Seconds tr; + + /** \brief Maximum error (Uimax). Typical Value = 10. Default: nullptr */ + CIMPP::PU uimax; + + /** \brief Minimum error (UImin). Typical Value = -10. Default: nullptr */ + CIMPP::PU uimin; + + /** \brief Maximum controller output (URmax). Typical Value = 10. Default: nullptr */ + CIMPP::PU urmax; + + /** \brief Minimum controller output (URmin). Typical Value = -10. Default: nullptr */ + CIMPP::PU urmin; + + /** \brief Maximum terminal voltage input (Vtmax). Determines the range of voltage dead band. Typical Value = 1.05. Default: nullptr */ + CIMPP::PU vtmax; + + /** \brief Minimum terminal voltage input (Vtmin). Determines the range of voltage dead band. Typical Value = 0.95. Default: nullptr */ + CIMPP::PU vtmin; + + /** \brief Maximum output (Yp). Minimum output = 0. Typical Value = 1. Default: nullptr */ + CIMPP::PU yp; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcST1A.cpp b/CGMES_2.4.13_18DEC2013/ExcST1A.cpp index 882df3069..f96434060 100644 --- a/CGMES_2.4.13_18DEC2013/ExcST1A.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcST1A.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcST1A::ExcST1A() {}; -ExcST1A::~ExcST1A() {}; +ExcST1A::ExcST1A() {} +ExcST1A::~ExcST1A() {} static const std::list PossibleProfilesForClass = { @@ -74,246 +56,262 @@ ExcST1A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcST1A_ilr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_ilr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ilr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_klr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_klr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->klr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_tb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_tb1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_tc1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_tc1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_vimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_xe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_xe(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xe; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcST1A_ilr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ilr; if (!buffer.str().empty()) @@ -327,7 +325,8 @@ bool get_ExcST1A_ilr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -341,7 +340,8 @@ bool get_ExcST1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -355,7 +355,8 @@ bool get_ExcST1A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -369,7 +370,8 @@ bool get_ExcST1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_klr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->klr; if (!buffer.str().empty()) @@ -383,7 +385,8 @@ bool get_ExcST1A_klr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -397,7 +400,8 @@ bool get_ExcST1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -411,7 +415,8 @@ bool get_ExcST1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb1; if (!buffer.str().empty()) @@ -425,7 +430,8 @@ bool get_ExcST1A_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -439,7 +445,8 @@ bool get_ExcST1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_tc1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc1; if (!buffer.str().empty()) @@ -453,7 +460,8 @@ bool get_ExcST1A_tc1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -467,7 +475,8 @@ bool get_ExcST1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -481,7 +490,8 @@ bool get_ExcST1A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST1A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -495,7 +505,8 @@ bool get_ExcST1A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST1A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -509,7 +520,8 @@ bool get_ExcST1A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST1A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimin; if (!buffer.str().empty()) @@ -523,7 +535,8 @@ bool get_ExcST1A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -537,7 +550,8 @@ bool get_ExcST1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -551,7 +565,8 @@ bool get_ExcST1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST1A_xe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xe; if (!buffer.str().empty()) @@ -563,8 +578,6 @@ bool get_ExcST1A_xe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcST1A::debugName[] = "ExcST1A"; const char* ExcST1A::debugString() const { @@ -573,29 +586,29 @@ const char* ExcST1A::debugString() const void ExcST1A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcST1A"), &ExcST1A_factory)); + factory_map.emplace("cim:ExcST1A", &ExcST1A_factory); } void ExcST1A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.ilr"), &assign_ExcST1A_ilr)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.ka"), &assign_ExcST1A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.kc"), &assign_ExcST1A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.kf"), &assign_ExcST1A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.klr"), &assign_ExcST1A_klr)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.ta"), &assign_ExcST1A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.tb"), &assign_ExcST1A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.tb1"), &assign_ExcST1A_tb1)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.tc"), &assign_ExcST1A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.tc1"), &assign_ExcST1A_tc1)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.tf"), &assign_ExcST1A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.vamax"), &assign_ExcST1A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.vamin"), &assign_ExcST1A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.vimax"), &assign_ExcST1A_vimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.vimin"), &assign_ExcST1A_vimin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.vrmax"), &assign_ExcST1A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.vrmin"), &assign_ExcST1A_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.xe"), &assign_ExcST1A_xe)); + assign_map.emplace("cim:ExcST1A.ilr", &assign_ExcST1A_ilr); + assign_map.emplace("cim:ExcST1A.ka", &assign_ExcST1A_ka); + assign_map.emplace("cim:ExcST1A.kc", &assign_ExcST1A_kc); + assign_map.emplace("cim:ExcST1A.kf", &assign_ExcST1A_kf); + assign_map.emplace("cim:ExcST1A.klr", &assign_ExcST1A_klr); + assign_map.emplace("cim:ExcST1A.ta", &assign_ExcST1A_ta); + assign_map.emplace("cim:ExcST1A.tb", &assign_ExcST1A_tb); + assign_map.emplace("cim:ExcST1A.tb1", &assign_ExcST1A_tb1); + assign_map.emplace("cim:ExcST1A.tc", &assign_ExcST1A_tc); + assign_map.emplace("cim:ExcST1A.tc1", &assign_ExcST1A_tc1); + assign_map.emplace("cim:ExcST1A.tf", &assign_ExcST1A_tf); + assign_map.emplace("cim:ExcST1A.vamax", &assign_ExcST1A_vamax); + assign_map.emplace("cim:ExcST1A.vamin", &assign_ExcST1A_vamin); + assign_map.emplace("cim:ExcST1A.vimax", &assign_ExcST1A_vimax); + assign_map.emplace("cim:ExcST1A.vimin", &assign_ExcST1A_vimin); + assign_map.emplace("cim:ExcST1A.vrmax", &assign_ExcST1A_vrmax); + assign_map.emplace("cim:ExcST1A.vrmin", &assign_ExcST1A_vrmin); + assign_map.emplace("cim:ExcST1A.xe", &assign_ExcST1A_xe); } void ExcST1A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcST1A.hpp b/CGMES_2.4.13_18DEC2013/ExcST1A.hpp index 820aa0bea..2c1805a46 100644 --- a/CGMES_2.4.13_18DEC2013/ExcST1A.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcST1A.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modification of an old IEEE ST1A static excitation system without overexcitation limiter (OEL) and underexcitation limiter (UEL). - */ + /** \brief Modification of an old IEEE ST1A static excitation system without overexcitation limiter (OEL) and underexcitation limiter (UEL). */ class ExcST1A : public ExcitationSystemDynamics { public: @@ -28,24 +26,59 @@ namespace CIMPP ExcST1A(); ~ExcST1A() override; - CIMPP::PU ilr; /* Exciter output current limit reference (Ilr). Typical Value = 0. Default: nullptr */ - CIMPP::PU ka; /* Voltage regulator gain (Ka). Typical Value = 190. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (Kf). Typical Value = 0. Default: nullptr */ - CIMPP::PU klr; /* Exciter output current limiter gain (Klr). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (Ta). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (Tb). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds tb1; /* Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (Tc). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tc1; /* Voltage regulator time constant (Tc). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (Tf). Typical Value = 1. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (Vamax). Typical Value = 999. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (Vamin). Typical Value = -999. Default: nullptr */ - CIMPP::PU vimax; /* Maximum voltage regulator input limit (Vimax). Typical Value = 999. Default: nullptr */ - CIMPP::PU vimin; /* Minimum voltage regulator input limit (Vimin). Typical Value = -999. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator outputs (Vrmax). Typical Value = 7.8. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator outputs (Vrmin). Typical Value = -6.7. Default: nullptr */ - CIMPP::PU xe; /* Excitation xfmr effective reactance (Xe). Typical Value = 0.04. Default: nullptr */ + /** \brief Exciter output current limit reference (Ilr). Typical Value = 0. Default: nullptr */ + CIMPP::PU ilr; + + /** \brief Voltage regulator gain (Ka). Typical Value = 190. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Excitation control system stabilizer gains (Kf). Typical Value = 0. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Exciter output current limiter gain (Klr). Typical Value = 0. Default: nullptr */ + CIMPP::PU klr; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (Tb). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb1; + + /** \brief Voltage regulator time constant (Tc). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Voltage regulator time constant (Tc). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc1; + + /** \brief Excitation control system stabilizer time constant (Tf). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage regulator output (Vamax). Typical Value = 999. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (Vamin). Typical Value = -999. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Maximum voltage regulator input limit (Vimax). Typical Value = 999. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Minimum voltage regulator input limit (Vimin). Typical Value = -999. Default: nullptr */ + CIMPP::PU vimin; + + /** \brief Maximum voltage regulator outputs (Vrmax). Typical Value = 7.8. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator outputs (Vrmin). Typical Value = -6.7. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief Excitation xfmr effective reactance (Xe). Typical Value = 0.04. Default: nullptr */ + CIMPP::PU xe; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcST2A.cpp b/CGMES_2.4.13_18DEC2013/ExcST2A.cpp index c9808278a..afa9e20ff 100644 --- a/CGMES_2.4.13_18DEC2013/ExcST2A.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcST2A.cpp @@ -8,26 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcST2A::ExcST2A() {}; -ExcST2A::~ExcST2A() {}; +ExcST2A::ExcST2A() {} +ExcST2A::~ExcST2A() {} static const std::list PossibleProfilesForClass = { @@ -68,207 +53,220 @@ ExcST2A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcST2A_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_efdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_uelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcST2A_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmax; if (!buffer.str().empty()) @@ -282,7 +280,8 @@ bool get_ExcST2A_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcST2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -296,7 +295,8 @@ bool get_ExcST2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -310,7 +310,8 @@ bool get_ExcST2A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -324,7 +325,8 @@ bool get_ExcST2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -338,7 +340,8 @@ bool get_ExcST2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -352,7 +355,8 @@ bool get_ExcST2A_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -366,7 +370,8 @@ bool get_ExcST2A_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -380,7 +385,8 @@ bool get_ExcST2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -394,7 +400,8 @@ bool get_ExcST2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -408,7 +415,8 @@ bool get_ExcST2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -422,7 +430,8 @@ bool get_ExcST2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -436,7 +445,8 @@ bool get_ExcST2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uelin; if (!buffer.str().empty()) @@ -450,7 +460,8 @@ bool get_ExcST2A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -464,7 +475,8 @@ bool get_ExcST2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -476,8 +488,6 @@ bool get_ExcST2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcST2A::debugName[] = "ExcST2A"; const char* ExcST2A::debugString() const { @@ -486,26 +496,26 @@ const char* ExcST2A::debugString() const void ExcST2A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcST2A"), &ExcST2A_factory)); + factory_map.emplace("cim:ExcST2A", &ExcST2A_factory); } void ExcST2A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.efdmax"), &assign_ExcST2A_efdmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.ka"), &assign_ExcST2A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.kc"), &assign_ExcST2A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.ke"), &assign_ExcST2A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.kf"), &assign_ExcST2A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.ki"), &assign_ExcST2A_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.kp"), &assign_ExcST2A_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.ta"), &assign_ExcST2A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.tb"), &assign_ExcST2A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.tc"), &assign_ExcST2A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.te"), &assign_ExcST2A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.tf"), &assign_ExcST2A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.uelin"), &assign_ExcST2A_uelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.vrmax"), &assign_ExcST2A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.vrmin"), &assign_ExcST2A_vrmin)); + assign_map.emplace("cim:ExcST2A.efdmax", &assign_ExcST2A_efdmax); + assign_map.emplace("cim:ExcST2A.ka", &assign_ExcST2A_ka); + assign_map.emplace("cim:ExcST2A.kc", &assign_ExcST2A_kc); + assign_map.emplace("cim:ExcST2A.ke", &assign_ExcST2A_ke); + assign_map.emplace("cim:ExcST2A.kf", &assign_ExcST2A_kf); + assign_map.emplace("cim:ExcST2A.ki", &assign_ExcST2A_ki); + assign_map.emplace("cim:ExcST2A.kp", &assign_ExcST2A_kp); + assign_map.emplace("cim:ExcST2A.ta", &assign_ExcST2A_ta); + assign_map.emplace("cim:ExcST2A.tb", &assign_ExcST2A_tb); + assign_map.emplace("cim:ExcST2A.tc", &assign_ExcST2A_tc); + assign_map.emplace("cim:ExcST2A.te", &assign_ExcST2A_te); + assign_map.emplace("cim:ExcST2A.tf", &assign_ExcST2A_tf); + assign_map.emplace("cim:ExcST2A.uelin", &assign_ExcST2A_uelin); + assign_map.emplace("cim:ExcST2A.vrmax", &assign_ExcST2A_vrmax); + assign_map.emplace("cim:ExcST2A.vrmin", &assign_ExcST2A_vrmin); } void ExcST2A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcST2A.hpp b/CGMES_2.4.13_18DEC2013/ExcST2A.hpp index b809b1ce3..1da9826e1 100644 --- a/CGMES_2.4.13_18DEC2013/ExcST2A.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcST2A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE ST2A static excitation system - another lead-lag block added to match the model defined by WECC. - */ + /** \brief Modified IEEE ST2A static excitation system - another lead-lag block added to match the model defined by WECC. */ class ExcST2A : public ExcitationSystemDynamics { public: @@ -29,21 +27,50 @@ namespace CIMPP ExcST2A(); ~ExcST2A() override; - CIMPP::PU efdmax; /* Maximum field voltage (Efdmax). Typical Value = 99. Default: nullptr */ - CIMPP::PU ka; /* Voltage regulator gain (Ka). Typical Value = 120. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 1.82. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (Kf). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU ki; /* Potential circuit gain coefficient (Ki). Typical Value = 8. Default: nullptr */ - CIMPP::PU kp; /* Potential circuit gain coefficient (Kp). Typical Value = 4.88. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (Ta). Typical Value = 0.15. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (Tc). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (Tf). Typical Value = 0.7. Default: nullptr */ - CIMPP::Boolean uelin; /* UEL input (UELin). true = HV gate false = add to error signal. Typical Value = false. Default: false */ - CIMPP::PU vrmax; /* Maximum voltage regulator outputs (Vrmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator outputs (Vrmin). Typical Value = -1. Default: nullptr */ + /** \brief Maximum field voltage (Efdmax). Typical Value = 99. Default: nullptr */ + CIMPP::PU efdmax; + + /** \brief Voltage regulator gain (Ka). Typical Value = 120. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 1.82. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (Kf). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Potential circuit gain coefficient (Ki). Typical Value = 8. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Potential circuit gain coefficient (Kp). Typical Value = 4.88. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0.15. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (Tc). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (Tf). Typical Value = 0.7. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief UEL input (UELin). true = HV gate false = add to error signal. Typical Value = false. Default: false */ + CIMPP::Boolean uelin; + + /** \brief Maximum voltage regulator outputs (Vrmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator outputs (Vrmin). Typical Value = -1. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcST3A.cpp b/CGMES_2.4.13_18DEC2013/ExcST3A.cpp index 1ecf6df79..e31c2b37c 100644 --- a/CGMES_2.4.13_18DEC2013/ExcST3A.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcST3A.cpp @@ -8,31 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "AngleDegrees.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcST3A::ExcST3A() {}; -ExcST3A::~ExcST3A() {}; +ExcST3A::ExcST3A() {} +ExcST3A::~ExcST3A() {} static const std::list PossibleProfilesForClass = { @@ -78,272 +58,290 @@ ExcST3A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcST3A_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_efdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_kj(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_kj(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kj; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_km(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_km(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->km; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_ks1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_ks1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_thetap(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_thetap(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->thetap; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_tm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_tm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_vbmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_vbmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vbmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_vgmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_vgmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vgmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_vimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_xl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_xl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcST3A_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmax; if (!buffer.str().empty()) @@ -357,7 +355,8 @@ bool get_ExcST3A_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcST3A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -371,7 +370,8 @@ bool get_ExcST3A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -385,7 +385,8 @@ bool get_ExcST3A_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -399,7 +400,8 @@ bool get_ExcST3A_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_kj(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kj; if (!buffer.str().empty()) @@ -413,7 +415,8 @@ bool get_ExcST3A_kj(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_km(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->km; if (!buffer.str().empty()) @@ -427,7 +430,8 @@ bool get_ExcST3A_km(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -441,7 +445,8 @@ bool get_ExcST3A_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -455,7 +460,8 @@ bool get_ExcST3A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks1; if (!buffer.str().empty()) @@ -469,7 +475,8 @@ bool get_ExcST3A_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -483,7 +490,8 @@ bool get_ExcST3A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -497,7 +505,8 @@ bool get_ExcST3A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_thetap(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thetap; if (!buffer.str().empty()) @@ -511,7 +520,8 @@ bool get_ExcST3A_thetap(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcST3A_tm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tm; if (!buffer.str().empty()) @@ -525,7 +535,8 @@ bool get_ExcST3A_tm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vbmax; if (!buffer.str().empty()) @@ -539,7 +550,8 @@ bool get_ExcST3A_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST3A_vgmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vgmax; if (!buffer.str().empty()) @@ -553,7 +565,8 @@ bool get_ExcST3A_vgmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST3A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -567,7 +580,8 @@ bool get_ExcST3A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST3A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimin; if (!buffer.str().empty()) @@ -581,7 +595,8 @@ bool get_ExcST3A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST3A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -595,7 +610,8 @@ bool get_ExcST3A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST3A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -609,7 +625,8 @@ bool get_ExcST3A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST3A_xl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xl; if (!buffer.str().empty()) @@ -621,8 +638,6 @@ bool get_ExcST3A_xl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcST3A::debugName[] = "ExcST3A"; const char* ExcST3A::debugString() const { @@ -631,31 +646,31 @@ const char* ExcST3A::debugString() const void ExcST3A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcST3A"), &ExcST3A_factory)); + factory_map.emplace("cim:ExcST3A", &ExcST3A_factory); } void ExcST3A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.efdmax"), &assign_ExcST3A_efdmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.kc"), &assign_ExcST3A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.kg"), &assign_ExcST3A_kg)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.ki"), &assign_ExcST3A_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.kj"), &assign_ExcST3A_kj)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.km"), &assign_ExcST3A_km)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.kp"), &assign_ExcST3A_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.ks"), &assign_ExcST3A_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.ks1"), &assign_ExcST3A_ks1)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.tb"), &assign_ExcST3A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.tc"), &assign_ExcST3A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.thetap"), &assign_ExcST3A_thetap)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.tm"), &assign_ExcST3A_tm)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.vbmax"), &assign_ExcST3A_vbmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.vgmax"), &assign_ExcST3A_vgmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.vimax"), &assign_ExcST3A_vimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.vimin"), &assign_ExcST3A_vimin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.vrmax"), &assign_ExcST3A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.vrmin"), &assign_ExcST3A_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.xl"), &assign_ExcST3A_xl)); + assign_map.emplace("cim:ExcST3A.efdmax", &assign_ExcST3A_efdmax); + assign_map.emplace("cim:ExcST3A.kc", &assign_ExcST3A_kc); + assign_map.emplace("cim:ExcST3A.kg", &assign_ExcST3A_kg); + assign_map.emplace("cim:ExcST3A.ki", &assign_ExcST3A_ki); + assign_map.emplace("cim:ExcST3A.kj", &assign_ExcST3A_kj); + assign_map.emplace("cim:ExcST3A.km", &assign_ExcST3A_km); + assign_map.emplace("cim:ExcST3A.kp", &assign_ExcST3A_kp); + assign_map.emplace("cim:ExcST3A.ks", &assign_ExcST3A_ks); + assign_map.emplace("cim:ExcST3A.ks1", &assign_ExcST3A_ks1); + assign_map.emplace("cim:ExcST3A.tb", &assign_ExcST3A_tb); + assign_map.emplace("cim:ExcST3A.tc", &assign_ExcST3A_tc); + assign_map.emplace("cim:ExcST3A.thetap", &assign_ExcST3A_thetap); + assign_map.emplace("cim:ExcST3A.tm", &assign_ExcST3A_tm); + assign_map.emplace("cim:ExcST3A.vbmax", &assign_ExcST3A_vbmax); + assign_map.emplace("cim:ExcST3A.vgmax", &assign_ExcST3A_vgmax); + assign_map.emplace("cim:ExcST3A.vimax", &assign_ExcST3A_vimax); + assign_map.emplace("cim:ExcST3A.vimin", &assign_ExcST3A_vimin); + assign_map.emplace("cim:ExcST3A.vrmax", &assign_ExcST3A_vrmax); + assign_map.emplace("cim:ExcST3A.vrmin", &assign_ExcST3A_vrmin); + assign_map.emplace("cim:ExcST3A.xl", &assign_ExcST3A_xl); } void ExcST3A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcST3A.hpp b/CGMES_2.4.13_18DEC2013/ExcST3A.hpp index 938915f89..522bb2633 100644 --- a/CGMES_2.4.13_18DEC2013/ExcST3A.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcST3A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE ST3A static excitation system with added speed multiplier. - */ + /** \brief Modified IEEE ST3A static excitation system with added speed multiplier. */ class ExcST3A : public ExcitationSystemDynamics { public: @@ -29,26 +27,65 @@ namespace CIMPP ExcST3A(); ~ExcST3A() override; - CIMPP::PU efdmax; /* Maximum AVR output (Efdmax). Typical Value = 6.9. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 1.1. Default: nullptr */ - CIMPP::PU kg; /* Feedback gain constant of the inner loop field regulator (Kg). Typical Value = 1. Default: nullptr */ - CIMPP::PU ki; /* Potential circuit gain coefficient (Ki). Typical Value = 4.83. Default: nullptr */ - CIMPP::PU kj; /* AVR gain (Kj). Typical Value = 200. Default: nullptr */ - CIMPP::PU km; /* Forward gain constant of the inner loop field regulator (Km). Typical Value = 7.04. Default: nullptr */ - CIMPP::PU kp; /* Potential source gain (Kp) (>0). Typical Value = 4.37. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ - CIMPP::PU ks1; /* Coefficient to allow different usage of the model-speed coefficient (Ks1). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (Tb). Typical Value = 6.67. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (Tc). Typical Value = 1. Default: nullptr */ - CIMPP::AngleDegrees thetap; /* Potential circuit phase angle (thetap). Typical Value = 20. Default: nullptr */ - CIMPP::Seconds tm; /* Forward time constant of inner loop field regulator (Tm). Typical Value = 1. Default: nullptr */ - CIMPP::PU vbmax; /* Maximum excitation voltage (Vbmax). Typical Value = 8.63. Default: nullptr */ - CIMPP::PU vgmax; /* Maximum inner loop feedback voltage (Vgmax). Typical Value = 6.53. Default: nullptr */ - CIMPP::PU vimax; /* Maximum voltage regulator input limit (Vimax). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU vimin; /* Minimum voltage regulator input limit (Vimin). Typical Value = -0.2. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (Vrmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (Vrmin). Typical Value = 0. Default: nullptr */ - CIMPP::PU xl; /* Reactance associated with potential source (Xl). Typical Value = 0.09. Default: nullptr */ + /** \brief Maximum AVR output (Efdmax). Typical Value = 6.9. Default: nullptr */ + CIMPP::PU efdmax; + + /** \brief Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Feedback gain constant of the inner loop field regulator (Kg). Typical Value = 1. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Potential circuit gain coefficient (Ki). Typical Value = 4.83. Default: nullptr */ + CIMPP::PU ki; + + /** \brief AVR gain (Kj). Typical Value = 200. Default: nullptr */ + CIMPP::PU kj; + + /** \brief Forward gain constant of the inner loop field regulator (Km). Typical Value = 7.04. Default: nullptr */ + CIMPP::PU km; + + /** \brief Potential source gain (Kp) (>0). Typical Value = 4.37. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (Ks1). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks1; + + /** \brief Voltage regulator time constant (Tb). Typical Value = 6.67. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (Tc). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Potential circuit phase angle (thetap). Typical Value = 20. Default: nullptr */ + CIMPP::AngleDegrees thetap; + + /** \brief Forward time constant of inner loop field regulator (Tm). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tm; + + /** \brief Maximum excitation voltage (Vbmax). Typical Value = 8.63. Default: nullptr */ + CIMPP::PU vbmax; + + /** \brief Maximum inner loop feedback voltage (Vgmax). Typical Value = 6.53. Default: nullptr */ + CIMPP::PU vgmax; + + /** \brief Maximum voltage regulator input limit (Vimax). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Minimum voltage regulator input limit (Vimin). Typical Value = -0.2. Default: nullptr */ + CIMPP::PU vimin; + + /** \brief Maximum voltage regulator output (Vrmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (Vrmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief Reactance associated with potential source (Xl). Typical Value = 0.09. Default: nullptr */ + CIMPP::PU xl; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcST4B.cpp b/CGMES_2.4.13_18DEC2013/ExcST4B.cpp index ecb63b6d4..b09570552 100644 --- a/CGMES_2.4.13_18DEC2013/ExcST4B.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcST4B.cpp @@ -8,30 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "AngleDegrees.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcST4B::ExcST4B() {}; -ExcST4B::~ExcST4B() {}; +ExcST4B::ExcST4B() {} +ExcST4B::~ExcST4B() {} static const std::list PossibleProfilesForClass = { @@ -76,259 +57,276 @@ ExcST4B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcST4B_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_kim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_kim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_kir(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_kir(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kir; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_kpm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_kpm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_kpr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_kpr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_lvgate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_lvgate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lvgate; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_thetap(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_thetap(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->thetap; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_uel(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_uel(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uel; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_vbmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_vbmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vbmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_vgmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_vgmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vgmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_vmmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_vmmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_vmmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_vmmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_xl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_xl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcST4B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -342,7 +340,8 @@ bool get_ExcST4B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -356,7 +355,8 @@ bool get_ExcST4B_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -370,7 +370,8 @@ bool get_ExcST4B_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_kim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kim; if (!buffer.str().empty()) @@ -384,7 +385,8 @@ bool get_ExcST4B_kim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kir; if (!buffer.str().empty()) @@ -398,7 +400,8 @@ bool get_ExcST4B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -412,7 +415,8 @@ bool get_ExcST4B_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_kpm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpm; if (!buffer.str().empty()) @@ -426,7 +430,8 @@ bool get_ExcST4B_kpm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpr; if (!buffer.str().empty()) @@ -440,7 +445,8 @@ bool get_ExcST4B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_lvgate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lvgate; if (!buffer.str().empty()) @@ -454,7 +460,8 @@ bool get_ExcST4B_lvgate(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcST4B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -468,7 +475,8 @@ bool get_ExcST4B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_thetap(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thetap; if (!buffer.str().empty()) @@ -482,7 +490,8 @@ bool get_ExcST4B_thetap(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcST4B_uel(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uel; if (!buffer.str().empty()) @@ -496,7 +505,8 @@ bool get_ExcST4B_uel(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vbmax; if (!buffer.str().empty()) @@ -510,7 +520,8 @@ bool get_ExcST4B_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST4B_vgmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vgmax; if (!buffer.str().empty()) @@ -524,7 +535,8 @@ bool get_ExcST4B_vgmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST4B_vmmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmmax; if (!buffer.str().empty()) @@ -538,7 +550,8 @@ bool get_ExcST4B_vmmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST4B_vmmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmmin; if (!buffer.str().empty()) @@ -552,7 +565,8 @@ bool get_ExcST4B_vmmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST4B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -566,7 +580,8 @@ bool get_ExcST4B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST4B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -580,7 +595,8 @@ bool get_ExcST4B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST4B_xl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xl; if (!buffer.str().empty()) @@ -592,8 +608,6 @@ bool get_ExcST4B_xl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcST4B::debugName[] = "ExcST4B"; const char* ExcST4B::debugString() const { @@ -602,30 +616,30 @@ const char* ExcST4B::debugString() const void ExcST4B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcST4B"), &ExcST4B_factory)); + factory_map.emplace("cim:ExcST4B", &ExcST4B_factory); } void ExcST4B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.kc"), &assign_ExcST4B_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.kg"), &assign_ExcST4B_kg)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.ki"), &assign_ExcST4B_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.kim"), &assign_ExcST4B_kim)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.kir"), &assign_ExcST4B_kir)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.kp"), &assign_ExcST4B_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.kpm"), &assign_ExcST4B_kpm)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.kpr"), &assign_ExcST4B_kpr)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.lvgate"), &assign_ExcST4B_lvgate)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.ta"), &assign_ExcST4B_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.thetap"), &assign_ExcST4B_thetap)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.uel"), &assign_ExcST4B_uel)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.vbmax"), &assign_ExcST4B_vbmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.vgmax"), &assign_ExcST4B_vgmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.vmmax"), &assign_ExcST4B_vmmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.vmmin"), &assign_ExcST4B_vmmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.vrmax"), &assign_ExcST4B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.vrmin"), &assign_ExcST4B_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.xl"), &assign_ExcST4B_xl)); + assign_map.emplace("cim:ExcST4B.kc", &assign_ExcST4B_kc); + assign_map.emplace("cim:ExcST4B.kg", &assign_ExcST4B_kg); + assign_map.emplace("cim:ExcST4B.ki", &assign_ExcST4B_ki); + assign_map.emplace("cim:ExcST4B.kim", &assign_ExcST4B_kim); + assign_map.emplace("cim:ExcST4B.kir", &assign_ExcST4B_kir); + assign_map.emplace("cim:ExcST4B.kp", &assign_ExcST4B_kp); + assign_map.emplace("cim:ExcST4B.kpm", &assign_ExcST4B_kpm); + assign_map.emplace("cim:ExcST4B.kpr", &assign_ExcST4B_kpr); + assign_map.emplace("cim:ExcST4B.lvgate", &assign_ExcST4B_lvgate); + assign_map.emplace("cim:ExcST4B.ta", &assign_ExcST4B_ta); + assign_map.emplace("cim:ExcST4B.thetap", &assign_ExcST4B_thetap); + assign_map.emplace("cim:ExcST4B.uel", &assign_ExcST4B_uel); + assign_map.emplace("cim:ExcST4B.vbmax", &assign_ExcST4B_vbmax); + assign_map.emplace("cim:ExcST4B.vgmax", &assign_ExcST4B_vgmax); + assign_map.emplace("cim:ExcST4B.vmmax", &assign_ExcST4B_vmmax); + assign_map.emplace("cim:ExcST4B.vmmin", &assign_ExcST4B_vmmin); + assign_map.emplace("cim:ExcST4B.vrmax", &assign_ExcST4B_vrmax); + assign_map.emplace("cim:ExcST4B.vrmin", &assign_ExcST4B_vrmin); + assign_map.emplace("cim:ExcST4B.xl", &assign_ExcST4B_xl); } void ExcST4B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcST4B.hpp b/CGMES_2.4.13_18DEC2013/ExcST4B.hpp index 9195981a2..5aa265787 100644 --- a/CGMES_2.4.13_18DEC2013/ExcST4B.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcST4B.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE ST4B static excitation system with maximum inner loop feedback gain . - */ + /** \brief Modified IEEE ST4B static excitation system with maximum inner loop feedback gain . */ class ExcST4B : public ExcitationSystemDynamics { public: @@ -30,25 +28,62 @@ namespace CIMPP ExcST4B(); ~ExcST4B() override; - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.113. Default: nullptr */ - CIMPP::PU kg; /* Feedback gain constant of the inner loop field regulator (Kg). Typical Value = 0. Default: nullptr */ - CIMPP::PU ki; /* Potential circuit gain coefficient (Ki). Typical Value = 0. Default: nullptr */ - CIMPP::PU kim; /* Voltage regulator integral gain output (Kim). Typical Value = 0. Default: nullptr */ - CIMPP::PU kir; /* Voltage regulator integral gain (Kir). Typical Value = 10.75. Default: nullptr */ - CIMPP::PU kp; /* Potential circuit gain coefficient (Kp). Typical Value = 9.3. Default: nullptr */ - CIMPP::PU kpm; /* Voltage regulator proportional gain output (Kpm). Typical Value = 1. Default: nullptr */ - CIMPP::PU kpr; /* Voltage regulator proportional gain (Kpr). Typical Value = 10.75. Default: nullptr */ - CIMPP::Boolean lvgate; /* Selector (LVgate). true = LVgate is part of the block diagram false = LVgate is not part of the block diagram. Typical Value = false. Default: false */ - CIMPP::Seconds ta; /* Voltage regulator time constant (Ta). Typical Value = 0.02. Default: nullptr */ - CIMPP::AngleDegrees thetap; /* Potential circuit phase angle (thetap). Typical Value = 0. Default: nullptr */ - CIMPP::Boolean uel; /* Selector (Uel). true = UEL is part of block diagram false = UEL is not part of block diagram. Typical Value = false. Default: false */ - CIMPP::PU vbmax; /* Maximum excitation voltage (Vbmax). Typical Value = 11.63. Default: nullptr */ - CIMPP::PU vgmax; /* Maximum inner loop feedback voltage (Vgmax). Typical Value = 5.8. Default: nullptr */ - CIMPP::PU vmmax; /* Maximum inner loop output (Vmmax). Typical Value = 99. Default: nullptr */ - CIMPP::PU vmmin; /* Minimum inner loop output (Vmmin). Typical Value = -99. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (Vrmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (Vrmin). Typical Value = -0.87. Default: nullptr */ - CIMPP::PU xl; /* Reactance associated with potential source (Xl). Typical Value = 0.124. Default: nullptr */ + /** \brief Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.113. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Feedback gain constant of the inner loop field regulator (Kg). Typical Value = 0. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Potential circuit gain coefficient (Ki). Typical Value = 0. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Voltage regulator integral gain output (Kim). Typical Value = 0. Default: nullptr */ + CIMPP::PU kim; + + /** \brief Voltage regulator integral gain (Kir). Typical Value = 10.75. Default: nullptr */ + CIMPP::PU kir; + + /** \brief Potential circuit gain coefficient (Kp). Typical Value = 9.3. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Voltage regulator proportional gain output (Kpm). Typical Value = 1. Default: nullptr */ + CIMPP::PU kpm; + + /** \brief Voltage regulator proportional gain (Kpr). Typical Value = 10.75. Default: nullptr */ + CIMPP::PU kpr; + + /** \brief Selector (LVgate). true = LVgate is part of the block diagram false = LVgate is not part of the block diagram. Typical Value = false. Default: false */ + CIMPP::Boolean lvgate; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Potential circuit phase angle (thetap). Typical Value = 0. Default: nullptr */ + CIMPP::AngleDegrees thetap; + + /** \brief Selector (Uel). true = UEL is part of block diagram false = UEL is not part of block diagram. Typical Value = false. Default: false */ + CIMPP::Boolean uel; + + /** \brief Maximum excitation voltage (Vbmax). Typical Value = 11.63. Default: nullptr */ + CIMPP::PU vbmax; + + /** \brief Maximum inner loop feedback voltage (Vgmax). Typical Value = 5.8. Default: nullptr */ + CIMPP::PU vgmax; + + /** \brief Maximum inner loop output (Vmmax). Typical Value = 99. Default: nullptr */ + CIMPP::PU vmmax; + + /** \brief Minimum inner loop output (Vmmin). Typical Value = -99. Default: nullptr */ + CIMPP::PU vmmin; + + /** \brief Maximum voltage regulator output (Vrmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (Vrmin). Typical Value = -0.87. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief Reactance associated with potential source (Xl). Typical Value = 0.124. Default: nullptr */ + CIMPP::PU xl; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcST6B.cpp b/CGMES_2.4.13_18DEC2013/ExcST6B.cpp index afee55093..9942e0b7a 100644 --- a/CGMES_2.4.13_18DEC2013/ExcST6B.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcST6B.cpp @@ -8,34 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ExcST6BOELselectorKind.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcST6B::ExcST6B() {}; -ExcST6B::~ExcST6B() {}; +ExcST6B::ExcST6B() {} +ExcST6B::~ExcST6B() {} static const std::list PossibleProfilesForClass = { @@ -84,311 +61,332 @@ ExcST6B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcST6B_ilr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_ilr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ilr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_kcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_kcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kcl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_kff(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_kff(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kff; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_kia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_kia(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kia; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_klr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_klr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->klr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_km(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_km(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->km; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_kpa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_kpa(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpa; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_kvd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_kvd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kvd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_oelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_oelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->oelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_ts(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_ts(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_tvd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_tvd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tvd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_vilim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_vilim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vilim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_vimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_vmult(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_vmult(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmult; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_xc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_xc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcST6B_ilr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ilr; if (!buffer.str().empty()) @@ -402,7 +400,8 @@ bool get_ExcST6B_ilr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -416,7 +415,8 @@ bool get_ExcST6B_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_kcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kcl; if (!buffer.str().empty()) @@ -430,7 +430,8 @@ bool get_ExcST6B_kcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_kff(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kff; if (!buffer.str().empty()) @@ -444,7 +445,8 @@ bool get_ExcST6B_kff(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -458,7 +460,8 @@ bool get_ExcST6B_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kia; if (!buffer.str().empty()) @@ -472,7 +475,8 @@ bool get_ExcST6B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_klr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->klr; if (!buffer.str().empty()) @@ -486,7 +490,8 @@ bool get_ExcST6B_klr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_km(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->km; if (!buffer.str().empty()) @@ -500,7 +505,8 @@ bool get_ExcST6B_km(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpa; if (!buffer.str().empty()) @@ -514,7 +520,8 @@ bool get_ExcST6B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_kvd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kvd; if (!buffer.str().empty()) @@ -526,9 +533,25 @@ bool get_ExcST6B_kvd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } +bool get_ExcST6B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->oelin; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_ExcST6B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -542,7 +565,8 @@ bool get_ExcST6B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_ts(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts; if (!buffer.str().empty()) @@ -556,7 +580,8 @@ bool get_ExcST6B_ts(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_tvd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tvd; if (!buffer.str().empty()) @@ -570,7 +595,8 @@ bool get_ExcST6B_tvd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -584,7 +610,8 @@ bool get_ExcST6B_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST6B_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -598,7 +625,8 @@ bool get_ExcST6B_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST6B_vilim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vilim; if (!buffer.str().empty()) @@ -612,7 +640,8 @@ bool get_ExcST6B_vilim(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST6B_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -626,7 +655,8 @@ bool get_ExcST6B_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST6B_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimin; if (!buffer.str().empty()) @@ -640,7 +670,8 @@ bool get_ExcST6B_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST6B_vmult(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmult; if (!buffer.str().empty()) @@ -654,7 +685,8 @@ bool get_ExcST6B_vmult(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST6B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -668,7 +700,8 @@ bool get_ExcST6B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST6B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -682,7 +715,8 @@ bool get_ExcST6B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST6B_xc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xc; if (!buffer.str().empty()) @@ -694,22 +728,6 @@ bool get_ExcST6B_xc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - -bool get_ExcST6B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->oelin; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char ExcST6B::debugName[] = "ExcST6B"; const char* ExcST6B::debugString() const { @@ -718,34 +736,34 @@ const char* ExcST6B::debugString() const void ExcST6B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcST6B"), &ExcST6B_factory)); + factory_map.emplace("cim:ExcST6B", &ExcST6B_factory); } void ExcST6B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.ilr"), &assign_ExcST6B_ilr)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.k1"), &assign_ExcST6B_k1)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.kcl"), &assign_ExcST6B_kcl)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.kff"), &assign_ExcST6B_kff)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.kg"), &assign_ExcST6B_kg)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.kia"), &assign_ExcST6B_kia)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.klr"), &assign_ExcST6B_klr)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.km"), &assign_ExcST6B_km)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.kpa"), &assign_ExcST6B_kpa)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.kvd"), &assign_ExcST6B_kvd)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.oelin"), &assign_ExcST6B_oelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.tg"), &assign_ExcST6B_tg)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.ts"), &assign_ExcST6B_ts)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.tvd"), &assign_ExcST6B_tvd)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.vamax"), &assign_ExcST6B_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.vamin"), &assign_ExcST6B_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.vilim"), &assign_ExcST6B_vilim)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.vimax"), &assign_ExcST6B_vimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.vimin"), &assign_ExcST6B_vimin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.vmult"), &assign_ExcST6B_vmult)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.vrmax"), &assign_ExcST6B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.vrmin"), &assign_ExcST6B_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.xc"), &assign_ExcST6B_xc)); + assign_map.emplace("cim:ExcST6B.ilr", &assign_ExcST6B_ilr); + assign_map.emplace("cim:ExcST6B.k1", &assign_ExcST6B_k1); + assign_map.emplace("cim:ExcST6B.kcl", &assign_ExcST6B_kcl); + assign_map.emplace("cim:ExcST6B.kff", &assign_ExcST6B_kff); + assign_map.emplace("cim:ExcST6B.kg", &assign_ExcST6B_kg); + assign_map.emplace("cim:ExcST6B.kia", &assign_ExcST6B_kia); + assign_map.emplace("cim:ExcST6B.klr", &assign_ExcST6B_klr); + assign_map.emplace("cim:ExcST6B.km", &assign_ExcST6B_km); + assign_map.emplace("cim:ExcST6B.kpa", &assign_ExcST6B_kpa); + assign_map.emplace("cim:ExcST6B.kvd", &assign_ExcST6B_kvd); + assign_map.emplace("cim:ExcST6B.oelin", &assign_ExcST6B_oelin); + assign_map.emplace("cim:ExcST6B.tg", &assign_ExcST6B_tg); + assign_map.emplace("cim:ExcST6B.ts", &assign_ExcST6B_ts); + assign_map.emplace("cim:ExcST6B.tvd", &assign_ExcST6B_tvd); + assign_map.emplace("cim:ExcST6B.vamax", &assign_ExcST6B_vamax); + assign_map.emplace("cim:ExcST6B.vamin", &assign_ExcST6B_vamin); + assign_map.emplace("cim:ExcST6B.vilim", &assign_ExcST6B_vilim); + assign_map.emplace("cim:ExcST6B.vimax", &assign_ExcST6B_vimax); + assign_map.emplace("cim:ExcST6B.vimin", &assign_ExcST6B_vimin); + assign_map.emplace("cim:ExcST6B.vmult", &assign_ExcST6B_vmult); + assign_map.emplace("cim:ExcST6B.vrmax", &assign_ExcST6B_vrmax); + assign_map.emplace("cim:ExcST6B.vrmin", &assign_ExcST6B_vrmin); + assign_map.emplace("cim:ExcST6B.xc", &assign_ExcST6B_xc); } void ExcST6B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcST6B.hpp b/CGMES_2.4.13_18DEC2013/ExcST6B.hpp index 2f7fef5c8..5b79ac602 100644 --- a/CGMES_2.4.13_18DEC2013/ExcST6B.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcST6B.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE ST6B static excitation system with PID controller and optional inner feedbacks loop. - */ + /** \brief Modified IEEE ST6B static excitation system with PID controller and optional inner feedbacks loop. */ class ExcST6B : public ExcitationSystemDynamics { public: @@ -30,29 +28,74 @@ namespace CIMPP ExcST6B(); ~ExcST6B() override; - CIMPP::PU ilr; /* Exciter output current limit reference (Ilr). Typical Value = 4.164. Default: nullptr */ - CIMPP::Boolean k1; /* Selector (K1). true = feedback is from Ifd false = feedback is not from Ifd. Typical Value = true. Default: false */ - CIMPP::PU kcl; /* Exciter output current limit adjustment (Kcl). Typical Value = 1.0577. Default: nullptr */ - CIMPP::PU kff; /* Pre-control gain constant of the inner loop field regulator (Kff). Typical Value = 1. Default: nullptr */ - CIMPP::PU kg; /* Feedback gain constant of the inner loop field regulator (Kg). Typical Value = 1. Default: nullptr */ - CIMPP::PU kia; /* Voltage regulator integral gain (Kia). Typical Value = 45.094. Default: nullptr */ - CIMPP::PU klr; /* Exciter output current limit adjustment (Kcl). Typical Value = 17.33. Default: nullptr */ - CIMPP::PU km; /* Forward gain constant of the inner loop field regulator (Km). Typical Value = 1. Default: nullptr */ - CIMPP::PU kpa; /* Voltage regulator proportional gain (Kpa). Typical Value = 18.038. Default: nullptr */ - CIMPP::PU kvd; /* Voltage regulator derivative gain (Kvd). Typical Value = 0. Default: nullptr */ - CIMPP::ExcST6BOELselectorKind oelin; /* OEL input selector (OELin). Typical Value = noOELinput. Default: 0 */ - CIMPP::Seconds tg; /* Feedback time constant of inner loop field voltage regulator (Tg). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds ts; /* Rectifier firing time constant (Ts). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tvd; /* Voltage regulator derivative gain (Tvd). Typical Value = 0. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (Vamax). Typical Value = 4.81. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (Vamin). Typical Value = -3.85. Default: nullptr */ - CIMPP::Boolean vilim; /* Selector (Vilim). true = Vimin-Vimax limiter is active false = Vimin-Vimax limiter is not active. Typical Value = true. Default: false */ - CIMPP::PU vimax; /* Maximum voltage regulator input limit (Vimax). Typical Value = 10. Default: nullptr */ - CIMPP::PU vimin; /* Minimum voltage regulator input limit (Vimin). Typical Value = -10. Default: nullptr */ - CIMPP::Boolean vmult; /* Selector (Vmult). true = multiply regulator output by terminal voltage false = do not multiply regulator output by terminal voltage. Typical Value = true. Default: false */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (Vrmax). Typical Value = 4.81. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (Vrmin). Typical Value = -3.85. Default: nullptr */ - CIMPP::PU xc; /* Excitation source reactance (Xc). Typical Value = 0.05. Default: nullptr */ + /** \brief Exciter output current limit reference (Ilr). Typical Value = 4.164. Default: nullptr */ + CIMPP::PU ilr; + + /** \brief Selector (K1). true = feedback is from Ifd false = feedback is not from Ifd. Typical Value = true. Default: false */ + CIMPP::Boolean k1; + + /** \brief Exciter output current limit adjustment (Kcl). Typical Value = 1.0577. Default: nullptr */ + CIMPP::PU kcl; + + /** \brief Pre-control gain constant of the inner loop field regulator (Kff). Typical Value = 1. Default: nullptr */ + CIMPP::PU kff; + + /** \brief Feedback gain constant of the inner loop field regulator (Kg). Typical Value = 1. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Voltage regulator integral gain (Kia). Typical Value = 45.094. Default: nullptr */ + CIMPP::PU kia; + + /** \brief Exciter output current limit adjustment (Kcl). Typical Value = 17.33. Default: nullptr */ + CIMPP::PU klr; + + /** \brief Forward gain constant of the inner loop field regulator (Km). Typical Value = 1. Default: nullptr */ + CIMPP::PU km; + + /** \brief Voltage regulator proportional gain (Kpa). Typical Value = 18.038. Default: nullptr */ + CIMPP::PU kpa; + + /** \brief Voltage regulator derivative gain (Kvd). Typical Value = 0. Default: nullptr */ + CIMPP::PU kvd; + + /** \brief OEL input selector (OELin). Typical Value = noOELinput. Default: 0 */ + CIMPP::ExcST6BOELselectorKind oelin; + + /** \brief Feedback time constant of inner loop field voltage regulator (Tg). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Rectifier firing time constant (Ts). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ts; + + /** \brief Voltage regulator derivative gain (Tvd). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tvd; + + /** \brief Maximum voltage regulator output (Vamax). Typical Value = 4.81. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (Vamin). Typical Value = -3.85. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Selector (Vilim). true = Vimin-Vimax limiter is active false = Vimin-Vimax limiter is not active. Typical Value = true. Default: false */ + CIMPP::Boolean vilim; + + /** \brief Maximum voltage regulator input limit (Vimax). Typical Value = 10. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Minimum voltage regulator input limit (Vimin). Typical Value = -10. Default: nullptr */ + CIMPP::PU vimin; + + /** \brief Selector (Vmult). true = multiply regulator output by terminal voltage false = do not multiply regulator output by terminal voltage. Typical Value = true. Default: false */ + CIMPP::Boolean vmult; + + /** \brief Maximum voltage regulator output (Vrmax). Typical Value = 4.81. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (Vrmin). Typical Value = -3.85. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief Excitation source reactance (Xc). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU xc; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcST6BOELselectorKind.cpp b/CGMES_2.4.13_18DEC2013/ExcST6BOELselectorKind.cpp index 4a1e0d921..51950ed6b 100644 --- a/CGMES_2.4.13_18DEC2013/ExcST6BOELselectorKind.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcST6BOELselectorKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "ExcST6BOELselectorKind") + if (EnumSymbol.substr(0, pos) != "ExcST6BOELselectorKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "noOELinput") + if (EnumSymbol == "noOELinput") { rop = ExcST6BOELselectorKind::noOELinput; return lop; } - if(EnumSymbol == "beforeUEL") + if (EnumSymbol == "beforeUEL") { rop = ExcST6BOELselectorKind::beforeUEL; return lop; } - if(EnumSymbol == "afterUEL") + if (EnumSymbol == "afterUEL") { rop = ExcST6BOELselectorKind::afterUEL; return lop; diff --git a/CGMES_2.4.13_18DEC2013/ExcST6BOELselectorKind.hpp b/CGMES_2.4.13_18DEC2013/ExcST6BOELselectorKind.hpp index b30b3b8df..da01aa9f6 100644 --- a/CGMES_2.4.13_18DEC2013/ExcST6BOELselectorKind.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcST6BOELselectorKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of connection for the OEL input used for static excitation systems type 6B. - */ + /** \brief Type of connection for the OEL input used for static excitation systems type 6B. */ class ExcST6BOELselectorKind { public: enum ExcST6BOELselectorKind_ENUM { - /** - * No OEL input is used. - */ + /** No OEL input is used. */ noOELinput, - /** - * The connection is before UEL. - */ + /** The connection is before UEL. */ beforeUEL, - /** - * The connection is after UEL. - */ + /** The connection is after UEL. */ afterUEL, }; diff --git a/CGMES_2.4.13_18DEC2013/ExcST7B.cpp b/CGMES_2.4.13_18DEC2013/ExcST7B.cpp index 1107dc70a..b353d3afa 100644 --- a/CGMES_2.4.13_18DEC2013/ExcST7B.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcST7B.cpp @@ -8,27 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ExcST7BOELselectorKind.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "ExcST7BUELselectorKind.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcST7B::ExcST7B() {}; -ExcST7B::~ExcST7B() {}; +ExcST7B::ExcST7B() {} +ExcST7B::~ExcST7B() {} static const std::list PossibleProfilesForClass = { @@ -70,220 +54,234 @@ ExcST7B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcST7B_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_kh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_kia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_kia(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kia; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_kl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_kl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_kpa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_kpa(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpa; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_oelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_oelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->oelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_tia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_tia(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tia; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_ts(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_ts(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_uelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_vmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_vmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcST7B_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh; if (!buffer.str().empty()) @@ -297,7 +295,8 @@ bool get_ExcST7B_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST7B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kia; if (!buffer.str().empty()) @@ -311,7 +310,8 @@ bool get_ExcST7B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST7B_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl; if (!buffer.str().empty()) @@ -325,7 +325,8 @@ bool get_ExcST7B_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST7B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpa; if (!buffer.str().empty()) @@ -337,9 +338,25 @@ bool get_ExcST7B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } +bool get_ExcST7B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->oelin; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_ExcST7B_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -353,7 +370,8 @@ bool get_ExcST7B_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST7B_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -367,7 +385,8 @@ bool get_ExcST7B_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST7B_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -381,7 +400,8 @@ bool get_ExcST7B_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST7B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -395,7 +415,8 @@ bool get_ExcST7B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST7B_tia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tia; if (!buffer.str().empty()) @@ -409,7 +430,8 @@ bool get_ExcST7B_tia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST7B_ts(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts; if (!buffer.str().empty()) @@ -421,25 +443,12 @@ bool get_ExcST7B_ts(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } -bool get_ExcST7B_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->vmax; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - -bool get_ExcST7B_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcST7B_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vmin; + buffer << element->uelin; if (!buffer.str().empty()) { return true; @@ -449,11 +458,12 @@ bool get_ExcST7B_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } -bool get_ExcST7B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcST7B_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vrmax; + buffer << element->vmax; if (!buffer.str().empty()) { return true; @@ -463,11 +473,12 @@ bool get_ExcST7B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } -bool get_ExcST7B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcST7B_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vrmin; + buffer << element->vmin; if (!buffer.str().empty()) { return true; @@ -477,13 +488,12 @@ bool get_ExcST7B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - -bool get_ExcST7B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcST7B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->oelin; + buffer << element->vrmax; if (!buffer.str().empty()) { return true; @@ -493,11 +503,12 @@ bool get_ExcST7B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } -bool get_ExcST7B_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcST7B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->uelin; + buffer << element->vrmin; if (!buffer.str().empty()) { return true; @@ -515,27 +526,27 @@ const char* ExcST7B::debugString() const void ExcST7B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcST7B"), &ExcST7B_factory)); + factory_map.emplace("cim:ExcST7B", &ExcST7B_factory); } void ExcST7B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.kh"), &assign_ExcST7B_kh)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.kia"), &assign_ExcST7B_kia)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.kl"), &assign_ExcST7B_kl)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.kpa"), &assign_ExcST7B_kpa)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.oelin"), &assign_ExcST7B_oelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.tb"), &assign_ExcST7B_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.tc"), &assign_ExcST7B_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.tf"), &assign_ExcST7B_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.tg"), &assign_ExcST7B_tg)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.tia"), &assign_ExcST7B_tia)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.ts"), &assign_ExcST7B_ts)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.uelin"), &assign_ExcST7B_uelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.vmax"), &assign_ExcST7B_vmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.vmin"), &assign_ExcST7B_vmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.vrmax"), &assign_ExcST7B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.vrmin"), &assign_ExcST7B_vrmin)); + assign_map.emplace("cim:ExcST7B.kh", &assign_ExcST7B_kh); + assign_map.emplace("cim:ExcST7B.kia", &assign_ExcST7B_kia); + assign_map.emplace("cim:ExcST7B.kl", &assign_ExcST7B_kl); + assign_map.emplace("cim:ExcST7B.kpa", &assign_ExcST7B_kpa); + assign_map.emplace("cim:ExcST7B.oelin", &assign_ExcST7B_oelin); + assign_map.emplace("cim:ExcST7B.tb", &assign_ExcST7B_tb); + assign_map.emplace("cim:ExcST7B.tc", &assign_ExcST7B_tc); + assign_map.emplace("cim:ExcST7B.tf", &assign_ExcST7B_tf); + assign_map.emplace("cim:ExcST7B.tg", &assign_ExcST7B_tg); + assign_map.emplace("cim:ExcST7B.tia", &assign_ExcST7B_tia); + assign_map.emplace("cim:ExcST7B.ts", &assign_ExcST7B_ts); + assign_map.emplace("cim:ExcST7B.uelin", &assign_ExcST7B_uelin); + assign_map.emplace("cim:ExcST7B.vmax", &assign_ExcST7B_vmax); + assign_map.emplace("cim:ExcST7B.vmin", &assign_ExcST7B_vmin); + assign_map.emplace("cim:ExcST7B.vrmax", &assign_ExcST7B_vrmax); + assign_map.emplace("cim:ExcST7B.vrmin", &assign_ExcST7B_vrmin); } void ExcST7B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExcST7B.hpp b/CGMES_2.4.13_18DEC2013/ExcST7B.hpp index 20c23baab..3a015ea97 100644 --- a/CGMES_2.4.13_18DEC2013/ExcST7B.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcST7B.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE ST7B static excitation system without stator current limiter (SCL) and current compensator (DROOP) inputs. - */ + /** \brief Modified IEEE ST7B static excitation system without stator current limiter (SCL) and current compensator (DROOP) inputs. */ class ExcST7B : public ExcitationSystemDynamics { public: @@ -30,22 +28,53 @@ namespace CIMPP ExcST7B(); ~ExcST7B() override; - CIMPP::PU kh; /* High-value gate feedback gain (Kh). Typical Value = 1. Default: nullptr */ - CIMPP::PU kia; /* Voltage regulator integral gain (Kia). Typical Value = 1. Default: nullptr */ - CIMPP::PU kl; /* Low-value gate feedback gain (Kl). Typical Value = 1. Default: nullptr */ - CIMPP::PU kpa; /* Voltage regulator proportional gain (Kpa). Typical Value = 40. Default: nullptr */ - CIMPP::ExcST7BOELselectorKind oelin; /* OEL input selector (OELin). Typical Value = noOELinput. Default: 0 */ - CIMPP::Seconds tb; /* Regulator lag time constant (Tb). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tc; /* Regulator lead time constant (Tc). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (Tf). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tg; /* Feedback time constant of inner loop field voltage regulator (Tg). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tia; /* Feedback time constant (Tia). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds ts; /* Rectifier firing time constant (Ts). Typical Value = 0. Default: nullptr */ - CIMPP::ExcST7BUELselectorKind uelin; /* UEL input selector (UELin). Typical Value = noUELinput. Default: 0 */ - CIMPP::PU vmax; /* Maximum voltage reference signal (Vmax). Typical Value = 1.1. Default: nullptr */ - CIMPP::PU vmin; /* Minimum voltage reference signal (Vmin). Typical Value = 0.9. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (Vrmax). Typical Value = 5. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (Vrmin). Typical Value = -4.5. Default: nullptr */ + /** \brief High-value gate feedback gain (Kh). Typical Value = 1. Default: nullptr */ + CIMPP::PU kh; + + /** \brief Voltage regulator integral gain (Kia). Typical Value = 1. Default: nullptr */ + CIMPP::PU kia; + + /** \brief Low-value gate feedback gain (Kl). Typical Value = 1. Default: nullptr */ + CIMPP::PU kl; + + /** \brief Voltage regulator proportional gain (Kpa). Typical Value = 40. Default: nullptr */ + CIMPP::PU kpa; + + /** \brief OEL input selector (OELin). Typical Value = noOELinput. Default: 0 */ + CIMPP::ExcST7BOELselectorKind oelin; + + /** \brief Regulator lag time constant (Tb). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Regulator lead time constant (Tc). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Excitation control system stabilizer time constant (Tf). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Feedback time constant of inner loop field voltage regulator (Tg). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Feedback time constant (Tia). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds tia; + + /** \brief Rectifier firing time constant (Ts). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ts; + + /** \brief UEL input selector (UELin). Typical Value = noUELinput. Default: 0 */ + CIMPP::ExcST7BUELselectorKind uelin; + + /** \brief Maximum voltage reference signal (Vmax). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU vmax; + + /** \brief Minimum voltage reference signal (Vmin). Typical Value = 0.9. Default: nullptr */ + CIMPP::PU vmin; + + /** \brief Maximum voltage regulator output (Vrmax). Typical Value = 5. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (Vrmin). Typical Value = -4.5. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcST7BOELselectorKind.cpp b/CGMES_2.4.13_18DEC2013/ExcST7BOELselectorKind.cpp index d400a7859..dada552c0 100644 --- a/CGMES_2.4.13_18DEC2013/ExcST7BOELselectorKind.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcST7BOELselectorKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "ExcST7BOELselectorKind") + if (EnumSymbol.substr(0, pos) != "ExcST7BOELselectorKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,22 +50,22 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "noOELinput") + if (EnumSymbol == "noOELinput") { rop = ExcST7BOELselectorKind::noOELinput; return lop; } - if(EnumSymbol == "addVref") + if (EnumSymbol == "addVref") { rop = ExcST7BOELselectorKind::addVref; return lop; } - if(EnumSymbol == "inputLVgate") + if (EnumSymbol == "inputLVgate") { rop = ExcST7BOELselectorKind::inputLVgate; return lop; } - if(EnumSymbol == "outputLVgate") + if (EnumSymbol == "outputLVgate") { rop = ExcST7BOELselectorKind::outputLVgate; return lop; diff --git a/CGMES_2.4.13_18DEC2013/ExcST7BOELselectorKind.hpp b/CGMES_2.4.13_18DEC2013/ExcST7BOELselectorKind.hpp index 66d97cdae..12dda93d8 100644 --- a/CGMES_2.4.13_18DEC2013/ExcST7BOELselectorKind.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcST7BOELselectorKind.hpp @@ -9,29 +9,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of connection for the OEL input used for static excitation systems type 7B. - */ + /** \brief Type of connection for the OEL input used for static excitation systems type 7B. */ class ExcST7BOELselectorKind { public: enum ExcST7BOELselectorKind_ENUM { - /** - * No OEL input is used. - */ + /** No OEL input is used. */ noOELinput, - /** - * The signal is added to Vref. - */ + /** The signal is added to Vref. */ addVref, - /** - * The signal is connected in the input of the LV gate. - */ + /** The signal is connected in the input of the LV gate. */ inputLVgate, - /** - * The signal is connected in the output of the LV gate. - */ + /** The signal is connected in the output of the LV gate. */ outputLVgate, }; diff --git a/CGMES_2.4.13_18DEC2013/ExcST7BUELselectorKind.cpp b/CGMES_2.4.13_18DEC2013/ExcST7BUELselectorKind.cpp index 2260a4e4d..b1e5d769d 100644 --- a/CGMES_2.4.13_18DEC2013/ExcST7BUELselectorKind.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcST7BUELselectorKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "ExcST7BUELselectorKind") + if (EnumSymbol.substr(0, pos) != "ExcST7BUELselectorKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,22 +50,22 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "noUELinput") + if (EnumSymbol == "noUELinput") { rop = ExcST7BUELselectorKind::noUELinput; return lop; } - if(EnumSymbol == "addVref") + if (EnumSymbol == "addVref") { rop = ExcST7BUELselectorKind::addVref; return lop; } - if(EnumSymbol == "inputHVgate") + if (EnumSymbol == "inputHVgate") { rop = ExcST7BUELselectorKind::inputHVgate; return lop; } - if(EnumSymbol == "outputHVgate") + if (EnumSymbol == "outputHVgate") { rop = ExcST7BUELselectorKind::outputHVgate; return lop; diff --git a/CGMES_2.4.13_18DEC2013/ExcST7BUELselectorKind.hpp b/CGMES_2.4.13_18DEC2013/ExcST7BUELselectorKind.hpp index b509d7dad..59ed16d28 100644 --- a/CGMES_2.4.13_18DEC2013/ExcST7BUELselectorKind.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcST7BUELselectorKind.hpp @@ -9,29 +9,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of connection for the UEL input used for static excitation systems type 7B. - */ + /** \brief Type of connection for the UEL input used for static excitation systems type 7B. */ class ExcST7BUELselectorKind { public: enum ExcST7BUELselectorKind_ENUM { - /** - * No UEL input is used. - */ + /** No UEL input is used. */ noUELinput, - /** - * The signal is added to Vref. - */ + /** The signal is added to Vref. */ addVref, - /** - * The signal is connected in the input of the HV gate. - */ + /** The signal is connected in the input of the HV gate. */ inputHVgate, - /** - * The signal is connected in the output of the HV gate. - */ + /** The signal is connected in the output of the HV gate. */ outputHVgate, }; diff --git a/CGMES_2.4.13_18DEC2013/ExcitationSystemDynamics.cpp b/CGMES_2.4.13_18DEC2013/ExcitationSystemDynamics.cpp index dcd25126a..540af8c6a 100644 --- a/CGMES_2.4.13_18DEC2013/ExcitationSystemDynamics.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcitationSystemDynamics.cpp @@ -19,8 +19,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ExcitationSystemDynamics::ExcitationSystemDynamics() : DiscontinuousExcitationControlDynamics(nullptr), OverexcitationLimiterDynamics(nullptr), PFVArControllerType1Dynamics(nullptr), PFVArControllerType2Dynamics(nullptr), PowerSystemStabilizerDynamics(nullptr), SynchronousMachineDynamics(nullptr), UnderexcitationLimiterDynamics(nullptr), VoltageCompensatorDynamics(nullptr) {}; -ExcitationSystemDynamics::~ExcitationSystemDynamics() {}; +ExcitationSystemDynamics::ExcitationSystemDynamics() : DiscontinuousExcitationControlDynamics(nullptr), OverexcitationLimiterDynamics(nullptr), PFVArControllerType1Dynamics(nullptr), PFVArControllerType2Dynamics(nullptr), PowerSystemStabilizerDynamics(nullptr), SynchronousMachineDynamics(nullptr), UnderexcitationLimiterDynamics(nullptr), VoltageCompensatorDynamics(nullptr) {} +ExcitationSystemDynamics::~ExcitationSystemDynamics() {} static const std::list PossibleProfilesForClass = { @@ -54,8 +54,6 @@ ExcitationSystemDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_DiscontinuousExcitationControlDynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); bool assign_ExcitationSystemDynamics_DiscontinuousExcitationControlDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -72,6 +70,7 @@ bool assign_ExcitationSystemDynamics_DiscontinuousExcitationControlDynamics(Base } return false; } + bool assign_OverexcitationLimiterDynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); bool assign_ExcitationSystemDynamics_OverexcitationLimiterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -88,6 +87,7 @@ bool assign_ExcitationSystemDynamics_OverexcitationLimiterDynamics(BaseClass* Ba } return false; } + bool assign_PFVArControllerType1Dynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); bool assign_ExcitationSystemDynamics_PFVArControllerType1Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -104,6 +104,7 @@ bool assign_ExcitationSystemDynamics_PFVArControllerType1Dynamics(BaseClass* Bas } return false; } + bool assign_PFVArControllerType2Dynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); bool assign_ExcitationSystemDynamics_PFVArControllerType2Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -120,6 +121,7 @@ bool assign_ExcitationSystemDynamics_PFVArControllerType2Dynamics(BaseClass* Bas } return false; } + bool assign_PowerSystemStabilizerDynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); bool assign_ExcitationSystemDynamics_PowerSystemStabilizerDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -136,6 +138,7 @@ bool assign_ExcitationSystemDynamics_PowerSystemStabilizerDynamics(BaseClass* Ba } return false; } + bool assign_SynchronousMachineDynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); bool assign_ExcitationSystemDynamics_SynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -152,6 +155,7 @@ bool assign_ExcitationSystemDynamics_SynchronousMachineDynamics(BaseClass* BaseC } return false; } + bool assign_UnderexcitationLimiterDynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); bool assign_ExcitationSystemDynamics_UnderexcitationLimiterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -168,6 +172,7 @@ bool assign_ExcitationSystemDynamics_UnderexcitationLimiterDynamics(BaseClass* B } return false; } + bool assign_VoltageCompensatorDynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); bool assign_ExcitationSystemDynamics_VoltageCompensatorDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -186,9 +191,14 @@ bool assign_ExcitationSystemDynamics_VoltageCompensatorDynamics(BaseClass* BaseC } + + + + bool get_ExcitationSystemDynamics_SynchronousMachineDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ExcitationSystemDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ExcitationSystemDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->SynchronousMachineDynamics != 0) { @@ -200,6 +210,7 @@ bool get_ExcitationSystemDynamics_SynchronousMachineDynamics(const BaseClass* Ba } + const char ExcitationSystemDynamics::debugName[] = "ExcitationSystemDynamics"; const char* ExcitationSystemDynamics::debugString() const { @@ -208,7 +219,7 @@ const char* ExcitationSystemDynamics::debugString() const void ExcitationSystemDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics"), &ExcitationSystemDynamics_factory)); + factory_map.emplace("cim:ExcitationSystemDynamics", &ExcitationSystemDynamics_factory); } void ExcitationSystemDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -217,14 +228,14 @@ void ExcitationSystemDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics.DiscontinuousExcitationControlDynamics"), &assign_ExcitationSystemDynamics_DiscontinuousExcitationControlDynamics)); - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics.OverexcitationLimiterDynamics"), &assign_ExcitationSystemDynamics_OverexcitationLimiterDynamics)); - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics.PFVArControllerType1Dynamics"), &assign_ExcitationSystemDynamics_PFVArControllerType1Dynamics)); - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics.PFVArControllerType2Dynamics"), &assign_ExcitationSystemDynamics_PFVArControllerType2Dynamics)); - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics.PowerSystemStabilizerDynamics"), &assign_ExcitationSystemDynamics_PowerSystemStabilizerDynamics)); - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics.SynchronousMachineDynamics"), &assign_ExcitationSystemDynamics_SynchronousMachineDynamics)); - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics.UnderexcitationLimiterDynamics"), &assign_ExcitationSystemDynamics_UnderexcitationLimiterDynamics)); - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics.VoltageCompensatorDynamics"), &assign_ExcitationSystemDynamics_VoltageCompensatorDynamics)); + assign_map.emplace("cim:ExcitationSystemDynamics.DiscontinuousExcitationControlDynamics", &assign_ExcitationSystemDynamics_DiscontinuousExcitationControlDynamics); + assign_map.emplace("cim:ExcitationSystemDynamics.OverexcitationLimiterDynamics", &assign_ExcitationSystemDynamics_OverexcitationLimiterDynamics); + assign_map.emplace("cim:ExcitationSystemDynamics.PFVArControllerType1Dynamics", &assign_ExcitationSystemDynamics_PFVArControllerType1Dynamics); + assign_map.emplace("cim:ExcitationSystemDynamics.PFVArControllerType2Dynamics", &assign_ExcitationSystemDynamics_PFVArControllerType2Dynamics); + assign_map.emplace("cim:ExcitationSystemDynamics.PowerSystemStabilizerDynamics", &assign_ExcitationSystemDynamics_PowerSystemStabilizerDynamics); + assign_map.emplace("cim:ExcitationSystemDynamics.SynchronousMachineDynamics", &assign_ExcitationSystemDynamics_SynchronousMachineDynamics); + assign_map.emplace("cim:ExcitationSystemDynamics.UnderexcitationLimiterDynamics", &assign_ExcitationSystemDynamics_UnderexcitationLimiterDynamics); + assign_map.emplace("cim:ExcitationSystemDynamics.VoltageCompensatorDynamics", &assign_ExcitationSystemDynamics_VoltageCompensatorDynamics); } void ExcitationSystemDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/ExcitationSystemDynamics.hpp b/CGMES_2.4.13_18DEC2013/ExcitationSystemDynamics.hpp index eb633b2b1..eb20de209 100644 --- a/CGMES_2.4.13_18DEC2013/ExcitationSystemDynamics.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcitationSystemDynamics.hpp @@ -24,9 +24,7 @@ namespace CIMPP class UnderexcitationLimiterDynamics; class VoltageCompensatorDynamics; - /* - Excitation system function block whose behavior is described by reference to a standard model - */ + /** \brief Excitation system function block whose behavior is described by reference to a standard model */ class ExcitationSystemDynamics : public DynamicsFunctionBlock { public: @@ -34,14 +32,29 @@ namespace CIMPP ExcitationSystemDynamics(); ~ExcitationSystemDynamics() override; - CIMPP::DiscontinuousExcitationControlDynamics* DiscontinuousExcitationControlDynamics; /* Discontinuous excitation control model associated with this excitation system model. Default: 0 */ - CIMPP::OverexcitationLimiterDynamics* OverexcitationLimiterDynamics; /* Overexcitation limiter model associated with this excitation system model. Default: 0 */ - CIMPP::PFVArControllerType1Dynamics* PFVArControllerType1Dynamics; /* Power Factor or VAr controller Type I model associated with this excitation system model. Default: 0 */ - CIMPP::PFVArControllerType2Dynamics* PFVArControllerType2Dynamics; /* Power Factor or VAr controller Type II model associated with this excitation system model. Default: 0 */ - CIMPP::PowerSystemStabilizerDynamics* PowerSystemStabilizerDynamics; /* Power system stabilizer model associated with this excitation system model. Default: 0 */ - CIMPP::SynchronousMachineDynamics* SynchronousMachineDynamics; /* Synchronous machine model with which this excitation system model is associated. Default: 0 */ - CIMPP::UnderexcitationLimiterDynamics* UnderexcitationLimiterDynamics; /* Undrexcitation limiter model associated with this excitation system model. Default: 0 */ - CIMPP::VoltageCompensatorDynamics* VoltageCompensatorDynamics; /* Voltage compensator model associated with this excitation system model. Default: 0 */ + /** \brief Discontinuous excitation control model associated with this excitation system model. Default: 0 */ + CIMPP::DiscontinuousExcitationControlDynamics* DiscontinuousExcitationControlDynamics; + + /** \brief Overexcitation limiter model associated with this excitation system model. Default: 0 */ + CIMPP::OverexcitationLimiterDynamics* OverexcitationLimiterDynamics; + + /** \brief Power Factor or VAr controller Type I model associated with this excitation system model. Default: 0 */ + CIMPP::PFVArControllerType1Dynamics* PFVArControllerType1Dynamics; + + /** \brief Power Factor or VAr controller Type II model associated with this excitation system model. Default: 0 */ + CIMPP::PFVArControllerType2Dynamics* PFVArControllerType2Dynamics; + + /** \brief Power system stabilizer model associated with this excitation system model. Default: 0 */ + CIMPP::PowerSystemStabilizerDynamics* PowerSystemStabilizerDynamics; + + /** \brief Synchronous machine model with which this excitation system model is associated. Default: 0 */ + CIMPP::SynchronousMachineDynamics* SynchronousMachineDynamics; + + /** \brief Undrexcitation limiter model associated with this excitation system model. Default: 0 */ + CIMPP::UnderexcitationLimiterDynamics* UnderexcitationLimiterDynamics; + + /** \brief Voltage compensator model associated with this excitation system model. Default: 0 */ + CIMPP::VoltageCompensatorDynamics* VoltageCompensatorDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExcitationSystemUserDefined.cpp b/CGMES_2.4.13_18DEC2013/ExcitationSystemUserDefined.cpp index 15f84f6b0..362ef357e 100644 --- a/CGMES_2.4.13_18DEC2013/ExcitationSystemUserDefined.cpp +++ b/CGMES_2.4.13_18DEC2013/ExcitationSystemUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -ExcitationSystemUserDefined::ExcitationSystemUserDefined() {}; -ExcitationSystemUserDefined::~ExcitationSystemUserDefined() {}; +ExcitationSystemUserDefined::ExcitationSystemUserDefined() {} +ExcitationSystemUserDefined::~ExcitationSystemUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ ExcitationSystemUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcitationSystemUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ExcitationSystemUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_ExcitationSystemUserDefined(BaseClass*, BaseClass*); bool assign_ExcitationSystemUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_ExcitationSystemUserDefined_ProprietaryParameterDynamics(BaseClass* return false; } +bool assign_ExcitationSystemUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + ExcitationSystemUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_ExcitationSystemUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcitationSystemUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const ExcitationSystemUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_ExcitationSystemUserDefined_proprietary(const BaseClass* BaseClass_ptr1 return false; } - - const char ExcitationSystemUserDefined::debugName[] = "ExcitationSystemUserDefined"; const char* ExcitationSystemUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* ExcitationSystemUserDefined::debugString() const void ExcitationSystemUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcitationSystemUserDefined"), &ExcitationSystemUserDefined_factory)); + factory_map.emplace("cim:ExcitationSystemUserDefined", &ExcitationSystemUserDefined_factory); } void ExcitationSystemUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemUserDefined.proprietary"), &assign_ExcitationSystemUserDefined_proprietary)); + assign_map.emplace("cim:ExcitationSystemUserDefined.proprietary", &assign_ExcitationSystemUserDefined_proprietary); } void ExcitationSystemUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemUserDefined.ProprietaryParameterDynamics"), &assign_ExcitationSystemUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:ExcitationSystemUserDefined.ProprietaryParameterDynamics", &assign_ExcitationSystemUserDefined_ProprietaryParameterDynamics); } void ExcitationSystemUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/ExcitationSystemUserDefined.hpp b/CGMES_2.4.13_18DEC2013/ExcitationSystemUserDefined.hpp index f5d11a2fe..02b86bd95 100644 --- a/CGMES_2.4.13_18DEC2013/ExcitationSystemUserDefined.hpp +++ b/CGMES_2.4.13_18DEC2013/ExcitationSystemUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Excitation system function block whose dynamic behaviour is described by - */ + /** \brief Excitation system function block whose dynamic behaviour is described by */ class ExcitationSystemUserDefined : public ExcitationSystemDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP ExcitationSystemUserDefined(); ~ExcitationSystemUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ExternalNetworkInjection.cpp b/CGMES_2.4.13_18DEC2013/ExternalNetworkInjection.cpp index 39d931fff..134627b99 100644 --- a/CGMES_2.4.13_18DEC2013/ExternalNetworkInjection.cpp +++ b/CGMES_2.4.13_18DEC2013/ExternalNetworkInjection.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "ActivePowerPerFrequency.hpp" -#include "Boolean.hpp" -#include "CurrentFlow.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "CurrentFlow.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" -#include "Integer.hpp" -#include "PU.hpp" using namespace CIMPP; -ExternalNetworkInjection::ExternalNetworkInjection() {}; -ExternalNetworkInjection::~ExternalNetworkInjection() {}; +ExternalNetworkInjection::ExternalNetworkInjection() {} +ExternalNetworkInjection::~ExternalNetworkInjection() {} static const std::list PossibleProfilesForClass = { @@ -75,246 +57,262 @@ ExternalNetworkInjection::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExternalNetworkInjection_governorSCD(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_governorSCD(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->governorSCD; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_ikSecond(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_ikSecond(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ikSecond; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_maxInitialSymShCCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_maxInitialSymShCCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxInitialSymShCCurrent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_maxP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_maxP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_maxQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_maxQ(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxQ; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_maxR0ToX0Ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_maxR0ToX0Ratio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxR0ToX0Ratio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_maxR1ToX1Ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_maxR1ToX1Ratio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxR1ToX1Ratio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_maxZ0ToZ1Ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_maxZ0ToZ1Ratio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxZ0ToZ1Ratio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_minInitialSymShCCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_minInitialSymShCCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minInitialSymShCCurrent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_minP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_minP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_minQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_minQ(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minQ; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_minR0ToX0Ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_minR0ToX0Ratio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minR0ToX0Ratio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_minR1ToX1Ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_minR1ToX1Ratio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minR1ToX1Ratio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_minZ0ToZ1Ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_minZ0ToZ1Ratio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minZ0ToZ1Ratio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_p(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_referencePriority(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_referencePriority(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->referencePriority; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_voltageFactor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_voltageFactor(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->voltageFactor; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExternalNetworkInjection_governorSCD(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->governorSCD; if (!buffer.str().empty()) @@ -328,7 +326,8 @@ bool get_ExternalNetworkInjection_governorSCD(const BaseClass* BaseClass_ptr1, s bool get_ExternalNetworkInjection_ikSecond(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ikSecond; if (!buffer.str().empty()) @@ -342,7 +341,8 @@ bool get_ExternalNetworkInjection_ikSecond(const BaseClass* BaseClass_ptr1, std: bool get_ExternalNetworkInjection_maxInitialSymShCCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxInitialSymShCCurrent; if (!buffer.str().empty()) @@ -356,7 +356,8 @@ bool get_ExternalNetworkInjection_maxInitialSymShCCurrent(const BaseClass* BaseC bool get_ExternalNetworkInjection_maxP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxP; if (!buffer.str().empty()) @@ -370,7 +371,8 @@ bool get_ExternalNetworkInjection_maxP(const BaseClass* BaseClass_ptr1, std::str bool get_ExternalNetworkInjection_maxQ(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxQ; if (!buffer.str().empty()) @@ -384,7 +386,8 @@ bool get_ExternalNetworkInjection_maxQ(const BaseClass* BaseClass_ptr1, std::str bool get_ExternalNetworkInjection_maxR0ToX0Ratio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxR0ToX0Ratio; if (!buffer.str().empty()) @@ -398,7 +401,8 @@ bool get_ExternalNetworkInjection_maxR0ToX0Ratio(const BaseClass* BaseClass_ptr1 bool get_ExternalNetworkInjection_maxR1ToX1Ratio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxR1ToX1Ratio; if (!buffer.str().empty()) @@ -412,7 +416,8 @@ bool get_ExternalNetworkInjection_maxR1ToX1Ratio(const BaseClass* BaseClass_ptr1 bool get_ExternalNetworkInjection_maxZ0ToZ1Ratio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxZ0ToZ1Ratio; if (!buffer.str().empty()) @@ -426,7 +431,8 @@ bool get_ExternalNetworkInjection_maxZ0ToZ1Ratio(const BaseClass* BaseClass_ptr1 bool get_ExternalNetworkInjection_minInitialSymShCCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minInitialSymShCCurrent; if (!buffer.str().empty()) @@ -440,7 +446,8 @@ bool get_ExternalNetworkInjection_minInitialSymShCCurrent(const BaseClass* BaseC bool get_ExternalNetworkInjection_minP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minP; if (!buffer.str().empty()) @@ -454,7 +461,8 @@ bool get_ExternalNetworkInjection_minP(const BaseClass* BaseClass_ptr1, std::str bool get_ExternalNetworkInjection_minQ(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minQ; if (!buffer.str().empty()) @@ -468,7 +476,8 @@ bool get_ExternalNetworkInjection_minQ(const BaseClass* BaseClass_ptr1, std::str bool get_ExternalNetworkInjection_minR0ToX0Ratio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minR0ToX0Ratio; if (!buffer.str().empty()) @@ -482,7 +491,8 @@ bool get_ExternalNetworkInjection_minR0ToX0Ratio(const BaseClass* BaseClass_ptr1 bool get_ExternalNetworkInjection_minR1ToX1Ratio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minR1ToX1Ratio; if (!buffer.str().empty()) @@ -496,7 +506,8 @@ bool get_ExternalNetworkInjection_minR1ToX1Ratio(const BaseClass* BaseClass_ptr1 bool get_ExternalNetworkInjection_minZ0ToZ1Ratio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minZ0ToZ1Ratio; if (!buffer.str().empty()) @@ -510,7 +521,8 @@ bool get_ExternalNetworkInjection_minZ0ToZ1Ratio(const BaseClass* BaseClass_ptr1 bool get_ExternalNetworkInjection_p(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p; if (!buffer.str().empty()) @@ -524,7 +536,8 @@ bool get_ExternalNetworkInjection_p(const BaseClass* BaseClass_ptr1, std::string bool get_ExternalNetworkInjection_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q; if (!buffer.str().empty()) @@ -538,7 +551,8 @@ bool get_ExternalNetworkInjection_q(const BaseClass* BaseClass_ptr1, std::string bool get_ExternalNetworkInjection_referencePriority(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->referencePriority; if (!buffer.str().empty()) @@ -552,7 +566,8 @@ bool get_ExternalNetworkInjection_referencePriority(const BaseClass* BaseClass_p bool get_ExternalNetworkInjection_voltageFactor(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->voltageFactor; if (!buffer.str().empty()) @@ -564,8 +579,6 @@ bool get_ExternalNetworkInjection_voltageFactor(const BaseClass* BaseClass_ptr1, return false; } - - const char ExternalNetworkInjection::debugName[] = "ExternalNetworkInjection"; const char* ExternalNetworkInjection::debugString() const { @@ -574,29 +587,29 @@ const char* ExternalNetworkInjection::debugString() const void ExternalNetworkInjection::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection"), &ExternalNetworkInjection_factory)); + factory_map.emplace("cim:ExternalNetworkInjection", &ExternalNetworkInjection_factory); } void ExternalNetworkInjection::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.governorSCD"), &assign_ExternalNetworkInjection_governorSCD)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.ikSecond"), &assign_ExternalNetworkInjection_ikSecond)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.maxInitialSymShCCurrent"), &assign_ExternalNetworkInjection_maxInitialSymShCCurrent)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.maxP"), &assign_ExternalNetworkInjection_maxP)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.maxQ"), &assign_ExternalNetworkInjection_maxQ)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.maxR0ToX0Ratio"), &assign_ExternalNetworkInjection_maxR0ToX0Ratio)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.maxR1ToX1Ratio"), &assign_ExternalNetworkInjection_maxR1ToX1Ratio)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.maxZ0ToZ1Ratio"), &assign_ExternalNetworkInjection_maxZ0ToZ1Ratio)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.minInitialSymShCCurrent"), &assign_ExternalNetworkInjection_minInitialSymShCCurrent)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.minP"), &assign_ExternalNetworkInjection_minP)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.minQ"), &assign_ExternalNetworkInjection_minQ)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.minR0ToX0Ratio"), &assign_ExternalNetworkInjection_minR0ToX0Ratio)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.minR1ToX1Ratio"), &assign_ExternalNetworkInjection_minR1ToX1Ratio)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.minZ0ToZ1Ratio"), &assign_ExternalNetworkInjection_minZ0ToZ1Ratio)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.p"), &assign_ExternalNetworkInjection_p)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.q"), &assign_ExternalNetworkInjection_q)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.referencePriority"), &assign_ExternalNetworkInjection_referencePriority)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.voltageFactor"), &assign_ExternalNetworkInjection_voltageFactor)); + assign_map.emplace("cim:ExternalNetworkInjection.governorSCD", &assign_ExternalNetworkInjection_governorSCD); + assign_map.emplace("cim:ExternalNetworkInjection.ikSecond", &assign_ExternalNetworkInjection_ikSecond); + assign_map.emplace("cim:ExternalNetworkInjection.maxInitialSymShCCurrent", &assign_ExternalNetworkInjection_maxInitialSymShCCurrent); + assign_map.emplace("cim:ExternalNetworkInjection.maxP", &assign_ExternalNetworkInjection_maxP); + assign_map.emplace("cim:ExternalNetworkInjection.maxQ", &assign_ExternalNetworkInjection_maxQ); + assign_map.emplace("cim:ExternalNetworkInjection.maxR0ToX0Ratio", &assign_ExternalNetworkInjection_maxR0ToX0Ratio); + assign_map.emplace("cim:ExternalNetworkInjection.maxR1ToX1Ratio", &assign_ExternalNetworkInjection_maxR1ToX1Ratio); + assign_map.emplace("cim:ExternalNetworkInjection.maxZ0ToZ1Ratio", &assign_ExternalNetworkInjection_maxZ0ToZ1Ratio); + assign_map.emplace("cim:ExternalNetworkInjection.minInitialSymShCCurrent", &assign_ExternalNetworkInjection_minInitialSymShCCurrent); + assign_map.emplace("cim:ExternalNetworkInjection.minP", &assign_ExternalNetworkInjection_minP); + assign_map.emplace("cim:ExternalNetworkInjection.minQ", &assign_ExternalNetworkInjection_minQ); + assign_map.emplace("cim:ExternalNetworkInjection.minR0ToX0Ratio", &assign_ExternalNetworkInjection_minR0ToX0Ratio); + assign_map.emplace("cim:ExternalNetworkInjection.minR1ToX1Ratio", &assign_ExternalNetworkInjection_minR1ToX1Ratio); + assign_map.emplace("cim:ExternalNetworkInjection.minZ0ToZ1Ratio", &assign_ExternalNetworkInjection_minZ0ToZ1Ratio); + assign_map.emplace("cim:ExternalNetworkInjection.p", &assign_ExternalNetworkInjection_p); + assign_map.emplace("cim:ExternalNetworkInjection.q", &assign_ExternalNetworkInjection_q); + assign_map.emplace("cim:ExternalNetworkInjection.referencePriority", &assign_ExternalNetworkInjection_referencePriority); + assign_map.emplace("cim:ExternalNetworkInjection.voltageFactor", &assign_ExternalNetworkInjection_voltageFactor); } void ExternalNetworkInjection::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ExternalNetworkInjection.hpp b/CGMES_2.4.13_18DEC2013/ExternalNetworkInjection.hpp index b74ba9ef6..e4e61c828 100644 --- a/CGMES_2.4.13_18DEC2013/ExternalNetworkInjection.hpp +++ b/CGMES_2.4.13_18DEC2013/ExternalNetworkInjection.hpp @@ -24,9 +24,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - This class represents external network and it is used for IEC 60909 calculations. - */ + /** \brief This class represents external network and it is used for IEC 60909 calculations. */ class ExternalNetworkInjection : public RegulatingCondEq { public: @@ -34,24 +32,59 @@ namespace CIMPP ExternalNetworkInjection(); ~ExternalNetworkInjection() override; - CIMPP::ActivePowerPerFrequency governorSCD; /* Power Frequency Bias. This is the change in power injection divided by the change in frequency and negated. A positive value of the power frequency bias provides additional power injection upon a drop in frequency. Default: nullptr */ - CIMPP::Boolean ikSecond; /* Indicates whether initial symmetrical short-circuit current and power have been calculated according to IEC (Ik`). Default: false */ - CIMPP::CurrentFlow maxInitialSymShCCurrent; /* Maximum initial symmetrical short-circuit currents (Ik` max) in A (Ik` = Sk`/(SQRT(3) Un)). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::ActivePower maxP; /* Maximum active power of the injection. Default: nullptr */ - CIMPP::ReactivePower maxQ; /* Not for short circuit modelling; It is used for modelling of infeed for load flow exchange. If maxQ and minQ are not used ReactiveCapabilityCurve can be used Default: nullptr */ - CIMPP::Simple_Float maxR0ToX0Ratio; /* Maximum ratio of zero sequence resistance of Network Feeder to its zero sequence reactance (R(0)/X(0) max). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::Simple_Float maxR1ToX1Ratio; /* Maximum ratio of positive sequence resistance of Network Feeder to its positive sequence reactance (R(1)/X(1) max). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::Simple_Float maxZ0ToZ1Ratio; /* Maximum ratio of zero sequence impedance to its positive sequence impedance (Z(0)/Z(1) max). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::CurrentFlow minInitialSymShCCurrent; /* Minimum initial symmetrical short-circuit currents (Ik` min) in A (Ik` = Sk`/(SQRT(3) Un)). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::ActivePower minP; /* Minimum active power of the injection. Default: nullptr */ - CIMPP::ReactivePower minQ; /* Not for short circuit modelling; It is used for modelling of infeed for load flow exchange. If maxQ and minQ are not used ReactiveCapabilityCurve can be used Default: nullptr */ - CIMPP::Simple_Float minR0ToX0Ratio; /* Indicates whether initial symmetrical short-circuit current and power have been calculated according to IEC (Ik`). Used for short circuit data exchange according to IEC 6090 Default: nullptr */ - CIMPP::Simple_Float minR1ToX1Ratio; /* Minimum ratio of positive sequence resistance of Network Feeder to its positive sequence reactance (R(1)/X(1) min). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::Simple_Float minZ0ToZ1Ratio; /* Minimum ratio of zero sequence impedance to its positive sequence impedance (Z(0)/Z(1) min). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::ActivePower p; /* Active power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ - CIMPP::ReactivePower q; /* Reactive power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ - CIMPP::Integer referencePriority; /* Priority of unit for use as powerflow voltage phase angle reference bus selection. 0 = don t care (default) 1 = highest priority. 2 is less than 1 and so on. Default: 0 */ - CIMPP::PU voltageFactor; /* Voltage factor in pu, which was used to calculate short-circuit current Ik` and power Sk`. Default: nullptr */ + /** \brief Power Frequency Bias. This is the change in power injection divided by the change in frequency and negated. A positive value of the power frequency bias provides additional power injection upon a drop in frequency. Default: nullptr */ + CIMPP::ActivePowerPerFrequency governorSCD; + + /** \brief Indicates whether initial symmetrical short-circuit current and power have been calculated according to IEC (Ik`). Default: false */ + CIMPP::Boolean ikSecond; + + /** \brief Maximum initial symmetrical short-circuit currents (Ik` max) in A (Ik` = Sk`/(SQRT(3) Un)). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::CurrentFlow maxInitialSymShCCurrent; + + /** \brief Maximum active power of the injection. Default: nullptr */ + CIMPP::ActivePower maxP; + + /** \brief Not for short circuit modelling; It is used for modelling of infeed for load flow exchange. If maxQ and minQ are not used ReactiveCapabilityCurve can be used Default: nullptr */ + CIMPP::ReactivePower maxQ; + + /** \brief Maximum ratio of zero sequence resistance of Network Feeder to its zero sequence reactance (R(0)/X(0) max). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::Simple_Float maxR0ToX0Ratio; + + /** \brief Maximum ratio of positive sequence resistance of Network Feeder to its positive sequence reactance (R(1)/X(1) max). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::Simple_Float maxR1ToX1Ratio; + + /** \brief Maximum ratio of zero sequence impedance to its positive sequence impedance (Z(0)/Z(1) max). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::Simple_Float maxZ0ToZ1Ratio; + + /** \brief Minimum initial symmetrical short-circuit currents (Ik` min) in A (Ik` = Sk`/(SQRT(3) Un)). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::CurrentFlow minInitialSymShCCurrent; + + /** \brief Minimum active power of the injection. Default: nullptr */ + CIMPP::ActivePower minP; + + /** \brief Not for short circuit modelling; It is used for modelling of infeed for load flow exchange. If maxQ and minQ are not used ReactiveCapabilityCurve can be used Default: nullptr */ + CIMPP::ReactivePower minQ; + + /** \brief Indicates whether initial symmetrical short-circuit current and power have been calculated according to IEC (Ik`). Used for short circuit data exchange according to IEC 6090 Default: nullptr */ + CIMPP::Simple_Float minR0ToX0Ratio; + + /** \brief Minimum ratio of positive sequence resistance of Network Feeder to its positive sequence reactance (R(1)/X(1) min). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::Simple_Float minR1ToX1Ratio; + + /** \brief Minimum ratio of zero sequence impedance to its positive sequence impedance (Z(0)/Z(1) min). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::Simple_Float minZ0ToZ1Ratio; + + /** \brief Active power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ + CIMPP::ActivePower p; + + /** \brief Reactive power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ + CIMPP::ReactivePower q; + + /** \brief Priority of unit for use as powerflow voltage phase angle reference bus selection. 0 = don t care (default) 1 = highest priority. 2 is less than 1 and so on. Default: 0 */ + CIMPP::Integer referencePriority; + + /** \brief Voltage factor in pu, which was used to calculate short-circuit current Ik` and power Sk`. Default: nullptr */ + CIMPP::PU voltageFactor; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Float.hpp b/CGMES_2.4.13_18DEC2013/Float.hpp index ede68d395..71ceca0e4 100644 --- a/CGMES_2.4.13_18DEC2013/Float.hpp +++ b/CGMES_2.4.13_18DEC2013/Float.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A floating point number. The range is unspecified and not limited. - */ + /** \brief A floating point number. The range is unspecified and not limited. */ class Float { public: diff --git a/CGMES_2.4.13_18DEC2013/FossilFuel.cpp b/CGMES_2.4.13_18DEC2013/FossilFuel.cpp index ae681b131..d8564bf4d 100644 --- a/CGMES_2.4.13_18DEC2013/FossilFuel.cpp +++ b/CGMES_2.4.13_18DEC2013/FossilFuel.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ThermalGeneratingUnit.hpp" -#include "FuelType.hpp" using namespace CIMPP; -FossilFuel::FossilFuel() : ThermalGeneratingUnit(nullptr) {}; -FossilFuel::~FossilFuel() {}; +FossilFuel::FossilFuel() : ThermalGeneratingUnit(nullptr) {} +FossilFuel::~FossilFuel() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ FossilFuel::getPossibleProfilesForAttributes() const return map; } - -bool assign_FossilFuel_fossilFuelType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (FossilFuel* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->fossilFuelType; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ThermalGeneratingUnit_FossilFuels(BaseClass*, BaseClass*); bool assign_FossilFuel_ThermalGeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,10 +58,24 @@ bool assign_FossilFuel_ThermalGeneratingUnit(BaseClass* BaseClass_ptr1, BaseClas return false; } +bool assign_FossilFuel_fossilFuelType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + FossilFuel* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->fossilFuelType; + if (!buffer.fail()) + { + return true; + } + } + return false; +} bool get_FossilFuel_ThermalGeneratingUnit(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const FossilFuel* element = dynamic_cast(BaseClass_ptr1)) + const FossilFuel* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ThermalGeneratingUnit != 0) { @@ -88,10 +86,10 @@ bool get_FossilFuel_ThermalGeneratingUnit(const BaseClass* BaseClass_ptr1, std:: return false; } - bool get_FossilFuel_fossilFuelType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const FossilFuel* element = dynamic_cast(BaseClass_ptr1)) + const FossilFuel* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fossilFuelType; if (!buffer.str().empty()) @@ -111,17 +109,17 @@ const char* FossilFuel::debugString() const void FossilFuel::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:FossilFuel"), &FossilFuel_factory)); + factory_map.emplace("cim:FossilFuel", &FossilFuel_factory); } void FossilFuel::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:FossilFuel.fossilFuelType"), &assign_FossilFuel_fossilFuelType)); + assign_map.emplace("cim:FossilFuel.fossilFuelType", &assign_FossilFuel_fossilFuelType); } void FossilFuel::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:FossilFuel.ThermalGeneratingUnit"), &assign_FossilFuel_ThermalGeneratingUnit)); + assign_map.emplace("cim:FossilFuel.ThermalGeneratingUnit", &assign_FossilFuel_ThermalGeneratingUnit); } void FossilFuel::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/FossilFuel.hpp b/CGMES_2.4.13_18DEC2013/FossilFuel.hpp index 02981bec5..8b402a908 100644 --- a/CGMES_2.4.13_18DEC2013/FossilFuel.hpp +++ b/CGMES_2.4.13_18DEC2013/FossilFuel.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ThermalGeneratingUnit; - /* - The fossil fuel consumed by the non-nuclear thermal generating unit. For example, coal, oil, gas, etc. This a the specific fuels that the generating unit can consume. - */ + /** \brief The fossil fuel consumed by the non-nuclear thermal generating unit. For example, coal, oil, gas, etc. This a the specific fuels that the generating unit can consume. */ class FossilFuel : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP FossilFuel(); ~FossilFuel() override; - CIMPP::ThermalGeneratingUnit* ThermalGeneratingUnit; /* A thermal generating unit may have one or more fossil fuels. Default: 0 */ - CIMPP::FuelType fossilFuelType; /* The type of fossil fuel, such as coal, oil, or gas. Default: 0 */ + /** \brief A thermal generating unit may have one or more fossil fuels. Default: 0 */ + CIMPP::ThermalGeneratingUnit* ThermalGeneratingUnit; + + /** \brief The type of fossil fuel, such as coal, oil, or gas. Default: 0 */ + CIMPP::FuelType fossilFuelType; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/FrancisGovernorControlKind.cpp b/CGMES_2.4.13_18DEC2013/FrancisGovernorControlKind.cpp index dd419372c..45933271f 100644 --- a/CGMES_2.4.13_18DEC2013/FrancisGovernorControlKind.cpp +++ b/CGMES_2.4.13_18DEC2013/FrancisGovernorControlKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "FrancisGovernorControlKind") + if (EnumSymbol.substr(0, pos) != "FrancisGovernorControlKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "mechanicHydrolicTachoAccelerator") + if (EnumSymbol == "mechanicHydrolicTachoAccelerator") { rop = FrancisGovernorControlKind::mechanicHydrolicTachoAccelerator; return lop; } - if(EnumSymbol == "mechanicHydraulicTransientFeedback") + if (EnumSymbol == "mechanicHydraulicTransientFeedback") { rop = FrancisGovernorControlKind::mechanicHydraulicTransientFeedback; return lop; } - if(EnumSymbol == "electromechanicalElectrohydraulic") + if (EnumSymbol == "electromechanicalElectrohydraulic") { rop = FrancisGovernorControlKind::electromechanicalElectrohydraulic; return lop; diff --git a/CGMES_2.4.13_18DEC2013/FrancisGovernorControlKind.hpp b/CGMES_2.4.13_18DEC2013/FrancisGovernorControlKind.hpp index a694f5429..703dda54c 100644 --- a/CGMES_2.4.13_18DEC2013/FrancisGovernorControlKind.hpp +++ b/CGMES_2.4.13_18DEC2013/FrancisGovernorControlKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Governor control flag for Francis hydro model. - */ + /** \brief Governor control flag for Francis hydro model. */ class FrancisGovernorControlKind { public: enum FrancisGovernorControlKind_ENUM { - /** - * Mechanic-hydraulic regulator with tacho-accelerometer (Cflag = 1). - */ + /** Mechanic-hydraulic regulator with tacho-accelerometer (Cflag = 1). */ mechanicHydrolicTachoAccelerator, - /** - * Mechanic-hydraulic regulator with transient feedback (Cflag=2). - */ + /** Mechanic-hydraulic regulator with transient feedback (Cflag=2). */ mechanicHydraulicTransientFeedback, - /** - * Electromechanical and electrohydraulic regulator (Cflag=3). - */ + /** Electromechanical and electrohydraulic regulator (Cflag=3). */ electromechanicalElectrohydraulic, }; diff --git a/CGMES_2.4.13_18DEC2013/Frequency.hpp b/CGMES_2.4.13_18DEC2013/Frequency.hpp index 28f5a1022..cca9a1dc8 100644 --- a/CGMES_2.4.13_18DEC2013/Frequency.hpp +++ b/CGMES_2.4.13_18DEC2013/Frequency.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Cycles per second. - */ + /** \brief Cycles per second. */ class Frequency { public: diff --git a/CGMES_2.4.13_18DEC2013/FuelType.cpp b/CGMES_2.4.13_18DEC2013/FuelType.cpp index e59bf1fd4..9b97cf206 100644 --- a/CGMES_2.4.13_18DEC2013/FuelType.cpp +++ b/CGMES_2.4.13_18DEC2013/FuelType.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "FuelType") + if (EnumSymbol.substr(0, pos) != "FuelType") { lop.setstate(std::ios::failbit); return lop; @@ -50,32 +50,32 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "coal") + if (EnumSymbol == "coal") { rop = FuelType::coal; return lop; } - if(EnumSymbol == "oil") + if (EnumSymbol == "oil") { rop = FuelType::oil; return lop; } - if(EnumSymbol == "gas") + if (EnumSymbol == "gas") { rop = FuelType::gas; return lop; } - if(EnumSymbol == "lignite") + if (EnumSymbol == "lignite") { rop = FuelType::lignite; return lop; } - if(EnumSymbol == "hardCoal") + if (EnumSymbol == "hardCoal") { rop = FuelType::hardCoal; return lop; } - if(EnumSymbol == "oilShale") + if (EnumSymbol == "oilShale") { rop = FuelType::oilShale; return lop; diff --git a/CGMES_2.4.13_18DEC2013/FuelType.hpp b/CGMES_2.4.13_18DEC2013/FuelType.hpp index 452590f12..980625028 100644 --- a/CGMES_2.4.13_18DEC2013/FuelType.hpp +++ b/CGMES_2.4.13_18DEC2013/FuelType.hpp @@ -9,37 +9,23 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of fuel. - */ + /** \brief Type of fuel. */ class FuelType { public: enum FuelType_ENUM { - /** - * Generic coal, not including lignite type. - */ + /** Generic coal, not including lignite type. */ coal, - /** - * Oil. - */ + /** Oil. */ oil, - /** - * Natural gas. - */ + /** Natural gas. */ gas, - /** - * The fuel is lignite coal. Note that this is a special type of coal, so the other enum of coal is reserved for hard coal types or if the exact type of coal is not known. - */ + /** The fuel is lignite coal. Note that this is a special type of coal, so the other enum of coal is reserved for hard coal types or if the exact type of coal is not known. */ lignite, - /** - * Hard coal - */ + /** Hard coal */ hardCoal, - /** - * Oil Shale - */ + /** Oil Shale */ oilShale, }; diff --git a/CGMES_2.4.13_18DEC2013/GenICompensationForGenJ.cpp b/CGMES_2.4.13_18DEC2013/GenICompensationForGenJ.cpp index a378b1488..ade258b3c 100644 --- a/CGMES_2.4.13_18DEC2013/GenICompensationForGenJ.cpp +++ b/CGMES_2.4.13_18DEC2013/GenICompensationForGenJ.cpp @@ -10,13 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "SynchronousMachineDynamics.hpp" #include "VCompIEEEType2.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -GenICompensationForGenJ::GenICompensationForGenJ() : SynchronousMachineDynamics(nullptr), VcompIEEEType2(nullptr) {}; -GenICompensationForGenJ::~GenICompensationForGenJ() {}; +GenICompensationForGenJ::GenICompensationForGenJ() : SynchronousMachineDynamics(nullptr), VcompIEEEType2(nullptr) {} +GenICompensationForGenJ::~GenICompensationForGenJ() {} static const std::list PossibleProfilesForClass = { @@ -46,34 +44,6 @@ GenICompensationForGenJ::getPossibleProfilesForAttributes() const return map; } - -bool assign_GenICompensationForGenJ_rcij(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->rcij; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_GenICompensationForGenJ_xcij(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->xcij; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_SynchronousMachineDynamics_GenICompensationForGenJ(BaseClass*, BaseClass*); bool assign_GenICompensationForGenJ_SynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -90,6 +60,7 @@ bool assign_GenICompensationForGenJ_SynchronousMachineDynamics(BaseClass* BaseCl } return false; } + bool assign_VCompIEEEType2_GenICompensationForGenJ(BaseClass*, BaseClass*); bool assign_GenICompensationForGenJ_VcompIEEEType2(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -107,38 +78,38 @@ bool assign_GenICompensationForGenJ_VcompIEEEType2(BaseClass* BaseClass_ptr1, Ba return false; } -bool get_GenICompensationForGenJ_rcij(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_GenICompensationForGenJ_rcij(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1)) + GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->rcij; - if (!buffer.str().empty()) + buffer >> element->rcij; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_GenICompensationForGenJ_xcij(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_GenICompensationForGenJ_xcij(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1)) + GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xcij; - if (!buffer.str().empty()) + buffer >> element->xcij; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_GenICompensationForGenJ_SynchronousMachineDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1)) + const GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->SynchronousMachineDynamics != 0) { @@ -151,7 +122,8 @@ bool get_GenICompensationForGenJ_SynchronousMachineDynamics(const BaseClass* Bas bool get_GenICompensationForGenJ_VcompIEEEType2(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1)) + const GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->VcompIEEEType2 != 0) { @@ -162,6 +134,35 @@ bool get_GenICompensationForGenJ_VcompIEEEType2(const BaseClass* BaseClass_ptr1, return false; } +bool get_GenICompensationForGenJ_rcij(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->rcij; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_GenICompensationForGenJ_xcij(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->xcij; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char GenICompensationForGenJ::debugName[] = "GenICompensationForGenJ"; const char* GenICompensationForGenJ::debugString() const @@ -171,19 +172,19 @@ const char* GenICompensationForGenJ::debugString() const void GenICompensationForGenJ::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GenICompensationForGenJ"), &GenICompensationForGenJ_factory)); + factory_map.emplace("cim:GenICompensationForGenJ", &GenICompensationForGenJ_factory); } void GenICompensationForGenJ::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GenICompensationForGenJ.rcij"), &assign_GenICompensationForGenJ_rcij)); - assign_map.insert(std::make_pair(std::string("cim:GenICompensationForGenJ.xcij"), &assign_GenICompensationForGenJ_xcij)); + assign_map.emplace("cim:GenICompensationForGenJ.rcij", &assign_GenICompensationForGenJ_rcij); + assign_map.emplace("cim:GenICompensationForGenJ.xcij", &assign_GenICompensationForGenJ_xcij); } void GenICompensationForGenJ::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GenICompensationForGenJ.SynchronousMachineDynamics"), &assign_GenICompensationForGenJ_SynchronousMachineDynamics)); - assign_map.insert(std::make_pair(std::string("cim:GenICompensationForGenJ.VcompIEEEType2"), &assign_GenICompensationForGenJ_VcompIEEEType2)); + assign_map.emplace("cim:GenICompensationForGenJ.SynchronousMachineDynamics", &assign_GenICompensationForGenJ_SynchronousMachineDynamics); + assign_map.emplace("cim:GenICompensationForGenJ.VcompIEEEType2", &assign_GenICompensationForGenJ_VcompIEEEType2); } void GenICompensationForGenJ::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/GenICompensationForGenJ.hpp b/CGMES_2.4.13_18DEC2013/GenICompensationForGenJ.hpp index 69b479b55..01a042d67 100644 --- a/CGMES_2.4.13_18DEC2013/GenICompensationForGenJ.hpp +++ b/CGMES_2.4.13_18DEC2013/GenICompensationForGenJ.hpp @@ -19,9 +19,7 @@ namespace CIMPP class SynchronousMachineDynamics; class VCompIEEEType2; - /* - This class provides the resistive and reactive components of compensation for the generator associated with the IEEE Type 2 voltage compensator for current flow out of one of the other generators in the interconnection. - */ + /** \brief This class provides the resistive and reactive components of compensation for the generator associated with the IEEE Type 2 voltage compensator for current flow out of one of the other generators in the interconnection. */ class GenICompensationForGenJ : public IdentifiedObject { public: @@ -29,10 +27,17 @@ namespace CIMPP GenICompensationForGenJ(); ~GenICompensationForGenJ() override; - CIMPP::SynchronousMachineDynamics* SynchronousMachineDynamics; /* Standard synchronous machine out of which current flow is being compensated for. Default: 0 */ - CIMPP::VCompIEEEType2* VcompIEEEType2; /* The standard IEEE Type 2 voltage compensator of this compensation. Default: 0 */ - CIMPP::PU rcij; /* Default: nullptr */ - CIMPP::PU xcij; /* Default: nullptr */ + /** \brief Standard synchronous machine out of which current flow is being compensated for. Default: 0 */ + CIMPP::SynchronousMachineDynamics* SynchronousMachineDynamics; + + /** \brief The standard IEEE Type 2 voltage compensator of this compensation. Default: 0 */ + CIMPP::VCompIEEEType2* VcompIEEEType2; + + /** \brief Default: nullptr */ + CIMPP::PU rcij; + + /** \brief Default: nullptr */ + CIMPP::PU xcij; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GeneratingUnit.cpp b/CGMES_2.4.13_18DEC2013/GeneratingUnit.cpp index 44d6506b9..247f593eb 100644 --- a/CGMES_2.4.13_18DEC2013/GeneratingUnit.cpp +++ b/CGMES_2.4.13_18DEC2013/GeneratingUnit.cpp @@ -11,27 +11,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "ControlAreaGeneratingUnit.hpp" #include "GrossToNetActivePowerCurve.hpp" #include "RotatingMachine.hpp" -#include "GeneratorControlSource.hpp" -#include "PerCent.hpp" -#include "ActivePower.hpp" -#include "Simple_Float.hpp" -#include "ActivePower.hpp" -#include "ActivePower.hpp" -#include "ActivePower.hpp" -#include "ActivePower.hpp" -#include "Simple_Float.hpp" -#include "ActivePower.hpp" -#include "ActivePower.hpp" -#include "ActivePower.hpp" -#include "Simple_Float.hpp" -#include "Money.hpp" -#include "PerCent.hpp" -#include "Money.hpp" using namespace CIMPP; -GeneratingUnit::GeneratingUnit() {}; -GeneratingUnit::~GeneratingUnit() {}; +GeneratingUnit::GeneratingUnit() {} +GeneratingUnit::~GeneratingUnit() {} static const std::list PossibleProfilesForClass = { @@ -77,268 +61,303 @@ GeneratingUnit::getPossibleProfilesForAttributes() const return map; } +bool assign_ControlAreaGeneratingUnit_GeneratingUnit(BaseClass*, BaseClass*); +bool assign_GeneratingUnit_ControlAreaGeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + ControlAreaGeneratingUnit* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ControlAreaGeneratingUnit.begin(), element->ControlAreaGeneratingUnit.end(), element2) == element->ControlAreaGeneratingUnit.end()) + { + element->ControlAreaGeneratingUnit.push_back(element2); + return assign_ControlAreaGeneratingUnit_GeneratingUnit(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_GeneratingUnit_genControlSource(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GrossToNetActivePowerCurve_GeneratingUnit(BaseClass*, BaseClass*); +bool assign_GeneratingUnit_GrossToNetActivePowerCurves(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + GrossToNetActivePowerCurve* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->GrossToNetActivePowerCurves.begin(), element->GrossToNetActivePowerCurves.end(), element2) == element->GrossToNetActivePowerCurves.end()) + { + element->GrossToNetActivePowerCurves.push_back(element2); + return assign_GrossToNetActivePowerCurve_GeneratingUnit(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_RotatingMachine_GeneratingUnit(BaseClass*, BaseClass*); +bool assign_GeneratingUnit_RotatingMachine(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + RotatingMachine* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->RotatingMachine.begin(), element->RotatingMachine.end(), element2) == element->RotatingMachine.end()) + { + element->RotatingMachine.push_back(element2); + return assign_RotatingMachine_GeneratingUnit(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_GeneratingUnit_genControlSource(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->genControlSource; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_governorSCD(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_governorSCD(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->governorSCD; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_initialP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_initialP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->initialP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_longPF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_longPF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->longPF; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_maxOperatingP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_maxOperatingP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxOperatingP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_maximumAllowableSpinningReserve(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_maximumAllowableSpinningReserve(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maximumAllowableSpinningReserve; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_minOperatingP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_minOperatingP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minOperatingP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_nominalP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_nominalP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nominalP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_normalPF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_normalPF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->normalPF; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_ratedGrossMaxP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_ratedGrossMaxP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedGrossMaxP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_ratedGrossMinP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_ratedGrossMinP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedGrossMinP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_ratedNetMaxP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_ratedNetMaxP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedNetMaxP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_shortPF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_shortPF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->shortPF; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_startupCost(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_startupCost(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->startupCost; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_totalEfficiency(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_totalEfficiency(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->totalEfficiency; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_variableCost(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_variableCost(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->variableCost; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ControlAreaGeneratingUnit_GeneratingUnit(BaseClass*, BaseClass*); -bool assign_GeneratingUnit_ControlAreaGeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) -{ - GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); - ControlAreaGeneratingUnit* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) - { - if (std::find(element->ControlAreaGeneratingUnit.begin(), element->ControlAreaGeneratingUnit.end(), element2) == element->ControlAreaGeneratingUnit.end()) - { - element->ControlAreaGeneratingUnit.push_back(element2); - return assign_ControlAreaGeneratingUnit_GeneratingUnit(BaseClass_ptr2, BaseClass_ptr1); - } - return true; - } - return false; -} -bool assign_GrossToNetActivePowerCurve_GeneratingUnit(BaseClass*, BaseClass*); -bool assign_GeneratingUnit_GrossToNetActivePowerCurves(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) -{ - GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); - GrossToNetActivePowerCurve* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) - { - if (std::find(element->GrossToNetActivePowerCurves.begin(), element->GrossToNetActivePowerCurves.end(), element2) == element->GrossToNetActivePowerCurves.end()) - { - element->GrossToNetActivePowerCurves.push_back(element2); - return assign_GrossToNetActivePowerCurve_GeneratingUnit(BaseClass_ptr2, BaseClass_ptr1); - } - return true; - } - return false; -} -bool assign_RotatingMachine_GeneratingUnit(BaseClass*, BaseClass*); -bool assign_GeneratingUnit_RotatingMachine(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + + +bool get_GeneratingUnit_genControlSource(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); - RotatingMachine* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (std::find(element->RotatingMachine.begin(), element->RotatingMachine.end(), element2) == element->RotatingMachine.end()) + buffer << element->genControlSource; + if (!buffer.str().empty()) { - element->RotatingMachine.push_back(element2); - return assign_RotatingMachine_GeneratingUnit(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } + buffer.setstate(std::ios::failbit); return false; } bool get_GeneratingUnit_governorSCD(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->governorSCD; if (!buffer.str().empty()) @@ -352,7 +371,8 @@ bool get_GeneratingUnit_governorSCD(const BaseClass* BaseClass_ptr1, std::string bool get_GeneratingUnit_initialP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->initialP; if (!buffer.str().empty()) @@ -366,7 +386,8 @@ bool get_GeneratingUnit_initialP(const BaseClass* BaseClass_ptr1, std::stringstr bool get_GeneratingUnit_longPF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->longPF; if (!buffer.str().empty()) @@ -380,7 +401,8 @@ bool get_GeneratingUnit_longPF(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_GeneratingUnit_maxOperatingP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxOperatingP; if (!buffer.str().empty()) @@ -394,7 +416,8 @@ bool get_GeneratingUnit_maxOperatingP(const BaseClass* BaseClass_ptr1, std::stri bool get_GeneratingUnit_maximumAllowableSpinningReserve(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maximumAllowableSpinningReserve; if (!buffer.str().empty()) @@ -408,7 +431,8 @@ bool get_GeneratingUnit_maximumAllowableSpinningReserve(const BaseClass* BaseCla bool get_GeneratingUnit_minOperatingP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minOperatingP; if (!buffer.str().empty()) @@ -422,7 +446,8 @@ bool get_GeneratingUnit_minOperatingP(const BaseClass* BaseClass_ptr1, std::stri bool get_GeneratingUnit_nominalP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nominalP; if (!buffer.str().empty()) @@ -436,7 +461,8 @@ bool get_GeneratingUnit_nominalP(const BaseClass* BaseClass_ptr1, std::stringstr bool get_GeneratingUnit_normalPF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->normalPF; if (!buffer.str().empty()) @@ -450,7 +476,8 @@ bool get_GeneratingUnit_normalPF(const BaseClass* BaseClass_ptr1, std::stringstr bool get_GeneratingUnit_ratedGrossMaxP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedGrossMaxP; if (!buffer.str().empty()) @@ -464,7 +491,8 @@ bool get_GeneratingUnit_ratedGrossMaxP(const BaseClass* BaseClass_ptr1, std::str bool get_GeneratingUnit_ratedGrossMinP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedGrossMinP; if (!buffer.str().empty()) @@ -478,7 +506,8 @@ bool get_GeneratingUnit_ratedGrossMinP(const BaseClass* BaseClass_ptr1, std::str bool get_GeneratingUnit_ratedNetMaxP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedNetMaxP; if (!buffer.str().empty()) @@ -492,7 +521,8 @@ bool get_GeneratingUnit_ratedNetMaxP(const BaseClass* BaseClass_ptr1, std::strin bool get_GeneratingUnit_shortPF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortPF; if (!buffer.str().empty()) @@ -506,7 +536,8 @@ bool get_GeneratingUnit_shortPF(const BaseClass* BaseClass_ptr1, std::stringstre bool get_GeneratingUnit_startupCost(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->startupCost; if (!buffer.str().empty()) @@ -520,7 +551,8 @@ bool get_GeneratingUnit_startupCost(const BaseClass* BaseClass_ptr1, std::string bool get_GeneratingUnit_totalEfficiency(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->totalEfficiency; if (!buffer.str().empty()) @@ -534,7 +566,8 @@ bool get_GeneratingUnit_totalEfficiency(const BaseClass* BaseClass_ptr1, std::st bool get_GeneratingUnit_variableCost(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->variableCost; if (!buffer.str().empty()) @@ -546,22 +579,6 @@ bool get_GeneratingUnit_variableCost(const BaseClass* BaseClass_ptr1, std::strin return false; } - - -bool get_GeneratingUnit_genControlSource(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->genControlSource; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char GeneratingUnit::debugName[] = "GeneratingUnit"; const char* GeneratingUnit::debugString() const { @@ -570,34 +587,34 @@ const char* GeneratingUnit::debugString() const void GeneratingUnit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GeneratingUnit"), &GeneratingUnit_factory)); + factory_map.emplace("cim:GeneratingUnit", &GeneratingUnit_factory); } void GeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.genControlSource"), &assign_GeneratingUnit_genControlSource)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.governorSCD"), &assign_GeneratingUnit_governorSCD)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.initialP"), &assign_GeneratingUnit_initialP)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.longPF"), &assign_GeneratingUnit_longPF)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.maxOperatingP"), &assign_GeneratingUnit_maxOperatingP)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.maximumAllowableSpinningReserve"), &assign_GeneratingUnit_maximumAllowableSpinningReserve)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.minOperatingP"), &assign_GeneratingUnit_minOperatingP)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.nominalP"), &assign_GeneratingUnit_nominalP)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.normalPF"), &assign_GeneratingUnit_normalPF)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.ratedGrossMaxP"), &assign_GeneratingUnit_ratedGrossMaxP)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.ratedGrossMinP"), &assign_GeneratingUnit_ratedGrossMinP)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.ratedNetMaxP"), &assign_GeneratingUnit_ratedNetMaxP)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.shortPF"), &assign_GeneratingUnit_shortPF)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.startupCost"), &assign_GeneratingUnit_startupCost)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.totalEfficiency"), &assign_GeneratingUnit_totalEfficiency)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.variableCost"), &assign_GeneratingUnit_variableCost)); + assign_map.emplace("cim:GeneratingUnit.genControlSource", &assign_GeneratingUnit_genControlSource); + assign_map.emplace("cim:GeneratingUnit.governorSCD", &assign_GeneratingUnit_governorSCD); + assign_map.emplace("cim:GeneratingUnit.initialP", &assign_GeneratingUnit_initialP); + assign_map.emplace("cim:GeneratingUnit.longPF", &assign_GeneratingUnit_longPF); + assign_map.emplace("cim:GeneratingUnit.maxOperatingP", &assign_GeneratingUnit_maxOperatingP); + assign_map.emplace("cim:GeneratingUnit.maximumAllowableSpinningReserve", &assign_GeneratingUnit_maximumAllowableSpinningReserve); + assign_map.emplace("cim:GeneratingUnit.minOperatingP", &assign_GeneratingUnit_minOperatingP); + assign_map.emplace("cim:GeneratingUnit.nominalP", &assign_GeneratingUnit_nominalP); + assign_map.emplace("cim:GeneratingUnit.normalPF", &assign_GeneratingUnit_normalPF); + assign_map.emplace("cim:GeneratingUnit.ratedGrossMaxP", &assign_GeneratingUnit_ratedGrossMaxP); + assign_map.emplace("cim:GeneratingUnit.ratedGrossMinP", &assign_GeneratingUnit_ratedGrossMinP); + assign_map.emplace("cim:GeneratingUnit.ratedNetMaxP", &assign_GeneratingUnit_ratedNetMaxP); + assign_map.emplace("cim:GeneratingUnit.shortPF", &assign_GeneratingUnit_shortPF); + assign_map.emplace("cim:GeneratingUnit.startupCost", &assign_GeneratingUnit_startupCost); + assign_map.emplace("cim:GeneratingUnit.totalEfficiency", &assign_GeneratingUnit_totalEfficiency); + assign_map.emplace("cim:GeneratingUnit.variableCost", &assign_GeneratingUnit_variableCost); } void GeneratingUnit::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.ControlAreaGeneratingUnit"), &assign_GeneratingUnit_ControlAreaGeneratingUnit)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.GrossToNetActivePowerCurves"), &assign_GeneratingUnit_GrossToNetActivePowerCurves)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.RotatingMachine"), &assign_GeneratingUnit_RotatingMachine)); + assign_map.emplace("cim:GeneratingUnit.ControlAreaGeneratingUnit", &assign_GeneratingUnit_ControlAreaGeneratingUnit); + assign_map.emplace("cim:GeneratingUnit.GrossToNetActivePowerCurves", &assign_GeneratingUnit_GrossToNetActivePowerCurves); + assign_map.emplace("cim:GeneratingUnit.RotatingMachine", &assign_GeneratingUnit_RotatingMachine); } void GeneratingUnit::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/GeneratingUnit.hpp b/CGMES_2.4.13_18DEC2013/GeneratingUnit.hpp index 06ad23551..6261629bb 100644 --- a/CGMES_2.4.13_18DEC2013/GeneratingUnit.hpp +++ b/CGMES_2.4.13_18DEC2013/GeneratingUnit.hpp @@ -24,9 +24,7 @@ namespace CIMPP class GrossToNetActivePowerCurve; class RotatingMachine; - /* - A single or set of synchronous machines for converting mechanical power into alternating-current power. For example, individual machines within a set may be defined for scheduling purposes while a single control signal is derived for the set. In this case there would be a GeneratingUnit for each member of the set and an additional GeneratingUnit corresponding to the set. - */ + /** \brief A single or set of synchronous machines for converting mechanical power into alternating-current power. For example, individual machines within a set may be defined for scheduling purposes while a single control signal is derived for the set. In this case there would be a GeneratingUnit for each member of the set and an additional GeneratingUnit corresponding to the set. */ class GeneratingUnit : public Equipment { public: @@ -34,25 +32,62 @@ namespace CIMPP GeneratingUnit(); ~GeneratingUnit() override; - std::list ControlAreaGeneratingUnit; /* ControlArea specifications for this generating unit. Default: 0 */ - std::list GrossToNetActivePowerCurves; /* A generating unit may have a gross active power to net active power curve, describing the losses and auxiliary power requirements of the unit. Default: 0 */ - std::list RotatingMachine; /* A synchronous machine may operate as a generator and as such becomes a member of a generating unit. Default: 0 */ - CIMPP::GeneratorControlSource genControlSource; /* The source of controls for a generating unit. Default: 0 */ - CIMPP::PerCent governorSCD; /* Governor Speed Changer Droop. This is the change in generator power output divided by the change in frequency normalized by the nominal power of the generator and the nominal frequency and expressed in percent and negated. A positive value of speed change droop provides additional generator output upon a drop in frequency. Default: nullptr */ - CIMPP::ActivePower initialP; /* Default initial active power which is used to store a powerflow result for the initial active power for this unit in this network configuration. Default: nullptr */ - CIMPP::Simple_Float longPF; /* Generating unit long term economic participation factor. Default: nullptr */ - CIMPP::ActivePower maxOperatingP; /* This is the maximum operating active power limit the dispatcher can enter for this unit. Default: nullptr */ - CIMPP::ActivePower maximumAllowableSpinningReserve; /* Maximum allowable spinning reserve. Spinning reserve will never be considered greater than this value regardless of the current operating point. Default: nullptr */ - CIMPP::ActivePower minOperatingP; /* This is the minimum operating active power limit the dispatcher can enter for this unit. Default: nullptr */ - CIMPP::ActivePower nominalP; /* The nominal power of the generating unit. Used to give precise meaning to percentage based attributes such as the governor speed change droop (governorSCD attribute). The attribute shall be a positive value equal or less than RotatingMachine.ratedS. Default: nullptr */ - CIMPP::Simple_Float normalPF; /* Generating unit economic participation factor. Default: nullptr */ - CIMPP::ActivePower ratedGrossMaxP; /* The unit`s gross rated maximum capacity (book value). Default: nullptr */ - CIMPP::ActivePower ratedGrossMinP; /* The gross rated minimum generation level which the unit can safely operate at while delivering power to the transmission grid. Default: nullptr */ - CIMPP::ActivePower ratedNetMaxP; /* The net rated maximum capacity determined by subtracting the auxiliary power used to operate the internal plant machinery from the rated gross maximum capacity. Default: nullptr */ - CIMPP::Simple_Float shortPF; /* Generating unit short term economic participation factor. Default: nullptr */ - CIMPP::Money startupCost; /* The initial startup cost incurred for each start of the GeneratingUnit. Default: nullptr */ - CIMPP::PerCent totalEfficiency; /* The efficiency of the unit in converting the fuel into electrical energy. Default: nullptr */ - CIMPP::Money variableCost; /* The variable cost component of production per unit of ActivePower. Default: nullptr */ + /** \brief ControlArea specifications for this generating unit. Default: 0 */ + std::list ControlAreaGeneratingUnit; + + /** \brief A generating unit may have a gross active power to net active power curve, describing the losses and auxiliary power requirements of the unit. Default: 0 */ + std::list GrossToNetActivePowerCurves; + + /** \brief A synchronous machine may operate as a generator and as such becomes a member of a generating unit. Default: 0 */ + std::list RotatingMachine; + + /** \brief The source of controls for a generating unit. Default: 0 */ + CIMPP::GeneratorControlSource genControlSource; + + /** \brief Governor Speed Changer Droop. This is the change in generator power output divided by the change in frequency normalized by the nominal power of the generator and the nominal frequency and expressed in percent and negated. A positive value of speed change droop provides additional generator output upon a drop in frequency. Default: nullptr */ + CIMPP::PerCent governorSCD; + + /** \brief Default initial active power which is used to store a powerflow result for the initial active power for this unit in this network configuration. Default: nullptr */ + CIMPP::ActivePower initialP; + + /** \brief Generating unit long term economic participation factor. Default: nullptr */ + CIMPP::Simple_Float longPF; + + /** \brief This is the maximum operating active power limit the dispatcher can enter for this unit. Default: nullptr */ + CIMPP::ActivePower maxOperatingP; + + /** \brief Maximum allowable spinning reserve. Spinning reserve will never be considered greater than this value regardless of the current operating point. Default: nullptr */ + CIMPP::ActivePower maximumAllowableSpinningReserve; + + /** \brief This is the minimum operating active power limit the dispatcher can enter for this unit. Default: nullptr */ + CIMPP::ActivePower minOperatingP; + + /** \brief The nominal power of the generating unit. Used to give precise meaning to percentage based attributes such as the governor speed change droop (governorSCD attribute). The attribute shall be a positive value equal or less than RotatingMachine.ratedS. Default: nullptr */ + CIMPP::ActivePower nominalP; + + /** \brief Generating unit economic participation factor. Default: nullptr */ + CIMPP::Simple_Float normalPF; + + /** \brief The unit`s gross rated maximum capacity (book value). Default: nullptr */ + CIMPP::ActivePower ratedGrossMaxP; + + /** \brief The gross rated minimum generation level which the unit can safely operate at while delivering power to the transmission grid. Default: nullptr */ + CIMPP::ActivePower ratedGrossMinP; + + /** \brief The net rated maximum capacity determined by subtracting the auxiliary power used to operate the internal plant machinery from the rated gross maximum capacity. Default: nullptr */ + CIMPP::ActivePower ratedNetMaxP; + + /** \brief Generating unit short term economic participation factor. Default: nullptr */ + CIMPP::Simple_Float shortPF; + + /** \brief The initial startup cost incurred for each start of the GeneratingUnit. Default: nullptr */ + CIMPP::Money startupCost; + + /** \brief The efficiency of the unit in converting the fuel into electrical energy. Default: nullptr */ + CIMPP::PerCent totalEfficiency; + + /** \brief The variable cost component of production per unit of ActivePower. Default: nullptr */ + CIMPP::Money variableCost; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GeneratorControlSource.cpp b/CGMES_2.4.13_18DEC2013/GeneratorControlSource.cpp index 1850d2514..dade3b6eb 100644 --- a/CGMES_2.4.13_18DEC2013/GeneratorControlSource.cpp +++ b/CGMES_2.4.13_18DEC2013/GeneratorControlSource.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "GeneratorControlSource") + if (EnumSymbol.substr(0, pos) != "GeneratorControlSource") { lop.setstate(std::ios::failbit); return lop; @@ -50,22 +50,22 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "unavailable") + if (EnumSymbol == "unavailable") { rop = GeneratorControlSource::unavailable; return lop; } - if(EnumSymbol == "offAGC") + if (EnumSymbol == "offAGC") { rop = GeneratorControlSource::offAGC; return lop; } - if(EnumSymbol == "onAGC") + if (EnumSymbol == "onAGC") { rop = GeneratorControlSource::onAGC; return lop; } - if(EnumSymbol == "plantControl") + if (EnumSymbol == "plantControl") { rop = GeneratorControlSource::plantControl; return lop; diff --git a/CGMES_2.4.13_18DEC2013/GeneratorControlSource.hpp b/CGMES_2.4.13_18DEC2013/GeneratorControlSource.hpp index 463a53ab3..28b3b722f 100644 --- a/CGMES_2.4.13_18DEC2013/GeneratorControlSource.hpp +++ b/CGMES_2.4.13_18DEC2013/GeneratorControlSource.hpp @@ -9,29 +9,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The source of controls for a generating unit. - */ + /** \brief The source of controls for a generating unit. */ class GeneratorControlSource { public: enum GeneratorControlSource_ENUM { - /** - * Not available. - */ + /** Not available. */ unavailable, - /** - * Off of automatic generation control (AGC). - */ + /** Off of automatic generation control (AGC). */ offAGC, - /** - * On automatic generation control (AGC). - */ + /** On automatic generation control (AGC). */ onAGC, - /** - * Plant is controlling. - */ + /** Plant is controlling. */ plantControl, }; diff --git a/CGMES_2.4.13_18DEC2013/GenericNonLinearLoadModelKind.cpp b/CGMES_2.4.13_18DEC2013/GenericNonLinearLoadModelKind.cpp index 2d1052ed1..037223a57 100644 --- a/CGMES_2.4.13_18DEC2013/GenericNonLinearLoadModelKind.cpp +++ b/CGMES_2.4.13_18DEC2013/GenericNonLinearLoadModelKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "GenericNonLinearLoadModelKind") + if (EnumSymbol.substr(0, pos) != "GenericNonLinearLoadModelKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,12 +50,12 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "exponentialRecovery") + if (EnumSymbol == "exponentialRecovery") { rop = GenericNonLinearLoadModelKind::exponentialRecovery; return lop; } - if(EnumSymbol == "loadAdaptive") + if (EnumSymbol == "loadAdaptive") { rop = GenericNonLinearLoadModelKind::loadAdaptive; return lop; diff --git a/CGMES_2.4.13_18DEC2013/GenericNonLinearLoadModelKind.hpp b/CGMES_2.4.13_18DEC2013/GenericNonLinearLoadModelKind.hpp index 7b6aa0c38..48f94578a 100644 --- a/CGMES_2.4.13_18DEC2013/GenericNonLinearLoadModelKind.hpp +++ b/CGMES_2.4.13_18DEC2013/GenericNonLinearLoadModelKind.hpp @@ -9,21 +9,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of generic non-linear load model. - */ + /** \brief Type of generic non-linear load model. */ class GenericNonLinearLoadModelKind { public: enum GenericNonLinearLoadModelKind_ENUM { - /** - * Exponential recovery model. - */ + /** Exponential recovery model. */ exponentialRecovery, - /** - * Load adaptive model. - */ + /** Load adaptive model. */ loadAdaptive, }; diff --git a/CGMES_2.4.13_18DEC2013/GeographicalLocationVersion.cpp b/CGMES_2.4.13_18DEC2013/GeographicalLocationVersion.cpp index d48c4690d..f7622e2dc 100644 --- a/CGMES_2.4.13_18DEC2013/GeographicalLocationVersion.cpp +++ b/CGMES_2.4.13_18DEC2013/GeographicalLocationVersion.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "String.hpp" -#include "String.hpp" -#include "Date.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -GeographicalLocationVersion::GeographicalLocationVersion() {}; -GeographicalLocationVersion::~GeographicalLocationVersion() {}; +GeographicalLocationVersion::GeographicalLocationVersion() {} +GeographicalLocationVersion::~GeographicalLocationVersion() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ GeographicalLocationVersion::getPossibleProfilesForAttributes() const return map; } - -bool assign_GeographicalLocationVersion_baseUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeographicalLocationVersion_baseUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeographicalLocationVersion_baseURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeographicalLocationVersion_baseURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeographicalLocationVersion_date(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeographicalLocationVersion_date(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->date = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeographicalLocationVersion_differenceModelURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeographicalLocationVersion_differenceModelURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->differenceModelURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeographicalLocationVersion_entsoeUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeographicalLocationVersion_entsoeUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeographicalLocationVersion_entsoeURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeographicalLocationVersion_entsoeURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeographicalLocationVersion_modelDescriptionURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeographicalLocationVersion_modelDescriptionURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->modelDescriptionURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeographicalLocationVersion_namespaceRDF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeographicalLocationVersion_namespaceRDF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceRDF = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeographicalLocationVersion_namespaceUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeographicalLocationVersion_namespaceUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeographicalLocationVersion_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeographicalLocationVersion_shortName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->shortName = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GeographicalLocationVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseUML; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_GeographicalLocationVersion_baseUML(const BaseClass* BaseClass_ptr1, st bool get_GeographicalLocationVersion_baseURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseURI; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_GeographicalLocationVersion_baseURI(const BaseClass* BaseClass_ptr1, st bool get_GeographicalLocationVersion_date(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->date; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_GeographicalLocationVersion_date(const BaseClass* BaseClass_ptr1, std:: bool get_GeographicalLocationVersion_differenceModelURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->differenceModelURI; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_GeographicalLocationVersion_differenceModelURI(const BaseClass* BaseCla bool get_GeographicalLocationVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeUML; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_GeographicalLocationVersion_entsoeUML(const BaseClass* BaseClass_ptr1, bool get_GeographicalLocationVersion_entsoeURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeURI; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_GeographicalLocationVersion_entsoeURI(const BaseClass* BaseClass_ptr1, bool get_GeographicalLocationVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->modelDescriptionURI; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_GeographicalLocationVersion_modelDescriptionURI(const BaseClass* BaseCl bool get_GeographicalLocationVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceRDF; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_GeographicalLocationVersion_namespaceRDF(const BaseClass* BaseClass_ptr bool get_GeographicalLocationVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceUML; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_GeographicalLocationVersion_namespaceUML(const BaseClass* BaseClass_ptr bool get_GeographicalLocationVersion_shortName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortName; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_GeographicalLocationVersion_shortName(const BaseClass* BaseClass_ptr1, return false; } - - const char GeographicalLocationVersion::debugName[] = "GeographicalLocationVersion"; const char* GeographicalLocationVersion::debugString() const { @@ -341,21 +346,21 @@ const char* GeographicalLocationVersion::debugString() const void GeographicalLocationVersion::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GeographicalLocationVersion"), &GeographicalLocationVersion_factory)); + factory_map.emplace("cim:GeographicalLocationVersion", &GeographicalLocationVersion_factory); } void GeographicalLocationVersion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GeographicalLocationVersion.baseUML"), &assign_GeographicalLocationVersion_baseUML)); - assign_map.insert(std::make_pair(std::string("cim:GeographicalLocationVersion.baseURI"), &assign_GeographicalLocationVersion_baseURI)); - assign_map.insert(std::make_pair(std::string("cim:GeographicalLocationVersion.date"), &assign_GeographicalLocationVersion_date)); - assign_map.insert(std::make_pair(std::string("cim:GeographicalLocationVersion.differenceModelURI"), &assign_GeographicalLocationVersion_differenceModelURI)); - assign_map.insert(std::make_pair(std::string("cim:GeographicalLocationVersion.entsoeUML"), &assign_GeographicalLocationVersion_entsoeUML)); - assign_map.insert(std::make_pair(std::string("cim:GeographicalLocationVersion.entsoeURI"), &assign_GeographicalLocationVersion_entsoeURI)); - assign_map.insert(std::make_pair(std::string("cim:GeographicalLocationVersion.modelDescriptionURI"), &assign_GeographicalLocationVersion_modelDescriptionURI)); - assign_map.insert(std::make_pair(std::string("cim:GeographicalLocationVersion.namespaceRDF"), &assign_GeographicalLocationVersion_namespaceRDF)); - assign_map.insert(std::make_pair(std::string("cim:GeographicalLocationVersion.namespaceUML"), &assign_GeographicalLocationVersion_namespaceUML)); - assign_map.insert(std::make_pair(std::string("cim:GeographicalLocationVersion.shortName"), &assign_GeographicalLocationVersion_shortName)); + assign_map.emplace("cim:GeographicalLocationVersion.baseUML", &assign_GeographicalLocationVersion_baseUML); + assign_map.emplace("cim:GeographicalLocationVersion.baseURI", &assign_GeographicalLocationVersion_baseURI); + assign_map.emplace("cim:GeographicalLocationVersion.date", &assign_GeographicalLocationVersion_date); + assign_map.emplace("cim:GeographicalLocationVersion.differenceModelURI", &assign_GeographicalLocationVersion_differenceModelURI); + assign_map.emplace("cim:GeographicalLocationVersion.entsoeUML", &assign_GeographicalLocationVersion_entsoeUML); + assign_map.emplace("cim:GeographicalLocationVersion.entsoeURI", &assign_GeographicalLocationVersion_entsoeURI); + assign_map.emplace("cim:GeographicalLocationVersion.modelDescriptionURI", &assign_GeographicalLocationVersion_modelDescriptionURI); + assign_map.emplace("cim:GeographicalLocationVersion.namespaceRDF", &assign_GeographicalLocationVersion_namespaceRDF); + assign_map.emplace("cim:GeographicalLocationVersion.namespaceUML", &assign_GeographicalLocationVersion_namespaceUML); + assign_map.emplace("cim:GeographicalLocationVersion.shortName", &assign_GeographicalLocationVersion_shortName); } void GeographicalLocationVersion::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/GeographicalLocationVersion.hpp b/CGMES_2.4.13_18DEC2013/GeographicalLocationVersion.hpp index 94d99aabb..b8b3523b3 100644 --- a/CGMES_2.4.13_18DEC2013/GeographicalLocationVersion.hpp +++ b/CGMES_2.4.13_18DEC2013/GeographicalLocationVersion.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Version details. - */ + /** \brief Version details. */ class GeographicalLocationVersion : public BaseClass { public: @@ -28,16 +26,35 @@ namespace CIMPP GeographicalLocationVersion(); ~GeographicalLocationVersion() override; - CIMPP::String baseUML; /* Base UML provided by CIM model manager. Default: '' */ - CIMPP::String baseURI; /* Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ - CIMPP::Date date; /* Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ - CIMPP::String differenceModelURI; /* Difference model URI defined by IEC 61970-552. Default: '' */ - CIMPP::String entsoeUML; /* UML provided by ENTSO-E. Default: '' */ - CIMPP::String entsoeURI; /* Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/GeographicalLocation/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ - CIMPP::String modelDescriptionURI; /* Model Description URI defined by IEC 61970-552. Default: '' */ - CIMPP::String namespaceRDF; /* RDF namespace. Default: '' */ - CIMPP::String namespaceUML; /* CIM UML namespace. Default: '' */ - CIMPP::String shortName; /* The short name of the profile used in profile documentation. Default: '' */ + /** \brief Base UML provided by CIM model manager. Default: '' */ + CIMPP::String baseUML; + + /** \brief Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ + CIMPP::String baseURI; + + /** \brief Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ + CIMPP::Date date; + + /** \brief Difference model URI defined by IEC 61970-552. Default: '' */ + CIMPP::String differenceModelURI; + + /** \brief UML provided by ENTSO-E. Default: '' */ + CIMPP::String entsoeUML; + + /** \brief Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/GeographicalLocation/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ + CIMPP::String entsoeURI; + + /** \brief Model Description URI defined by IEC 61970-552. Default: '' */ + CIMPP::String modelDescriptionURI; + + /** \brief RDF namespace. Default: '' */ + CIMPP::String namespaceRDF; + + /** \brief CIM UML namespace. Default: '' */ + CIMPP::String namespaceUML; + + /** \brief The short name of the profile used in profile documentation. Default: '' */ + CIMPP::String shortName; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GeographicalRegion.cpp b/CGMES_2.4.13_18DEC2013/GeographicalRegion.cpp index 8648eae7d..229df2030 100644 --- a/CGMES_2.4.13_18DEC2013/GeographicalRegion.cpp +++ b/CGMES_2.4.13_18DEC2013/GeographicalRegion.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -GeographicalRegion::GeographicalRegion() {}; -GeographicalRegion::~GeographicalRegion() {}; +GeographicalRegion::GeographicalRegion() {} +GeographicalRegion::~GeographicalRegion() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ GeographicalRegion::getPossibleProfilesForAttributes() const return map; } - - bool assign_SubGeographicalRegion_Region(BaseClass*, BaseClass*); bool assign_GeographicalRegion_Regions(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,7 +59,6 @@ bool assign_GeographicalRegion_Regions(BaseClass* BaseClass_ptr1, BaseClass* Bas } - const char GeographicalRegion::debugName[] = "GeographicalRegion"; const char* GeographicalRegion::debugString() const { @@ -70,7 +67,7 @@ const char* GeographicalRegion::debugString() const void GeographicalRegion::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GeographicalRegion"), &GeographicalRegion_factory)); + factory_map.emplace("cim:GeographicalRegion", &GeographicalRegion_factory); } void GeographicalRegion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -79,7 +76,7 @@ void GeographicalRegion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GeographicalRegion.Regions"), &assign_GeographicalRegion_Regions)); + assign_map.emplace("cim:GeographicalRegion.Regions", &assign_GeographicalRegion_Regions); } void GeographicalRegion::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/GeographicalRegion.hpp b/CGMES_2.4.13_18DEC2013/GeographicalRegion.hpp index 1ab108682..8e23a3694 100644 --- a/CGMES_2.4.13_18DEC2013/GeographicalRegion.hpp +++ b/CGMES_2.4.13_18DEC2013/GeographicalRegion.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class SubGeographicalRegion; - /* - A geographical region of a power system network model. - */ + /** \brief A geographical region of a power system network model. */ class GeographicalRegion : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP GeographicalRegion(); ~GeographicalRegion() override; - std::list Regions; /* All sub-geograhpical regions within this geographical region. Default: 0 */ + /** \brief All sub-geograhpical regions within this geographical region. Default: 0 */ + std::list Regions; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GovCT1.cpp b/CGMES_2.4.13_18DEC2013/GovCT1.cpp index 5146a1211..ce9795278 100644 --- a/CGMES_2.4.13_18DEC2013/GovCT1.cpp +++ b/CGMES_2.4.13_18DEC2013/GovCT1.cpp @@ -8,47 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "DroopSignalFeedbackKind.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" using namespace CIMPP; -GovCT1::GovCT1() {}; -GovCT1::~GovCT1() {}; +GovCT1::GovCT1() {} +GovCT1::~GovCT1() {} static const std::list PossibleProfilesForClass = { @@ -110,480 +74,514 @@ GovCT1::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovCT1_aset(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_aset(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->aset; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_db(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_db(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_dm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_dm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_kdgov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_kdgov(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kdgov; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_kigov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_kigov(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kigov; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_kiload(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_kiload(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kiload; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_kimw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_kimw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kimw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_kpgov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_kpgov(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpgov; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_kpload(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_kpload(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpload; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_kturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_kturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_ldref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_ldref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ldref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_maxerr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_maxerr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxerr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_minerr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_minerr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minerr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_pmwset(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_pmwset(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmwset; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_rclose(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_rclose(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rclose; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_rdown(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_rdown(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rdown; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_ropen(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_ropen(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ropen; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_rselect(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_rselect(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rselect; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_rup(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_rup(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rup; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_tact(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_tact(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tact; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_tdgov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_tdgov(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdgov; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_teng(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_teng(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->teng; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_tfload(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_tfload(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tfload; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_tpelec(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_tpelec(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpelec; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_tsa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_tsa(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tsa; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_tsb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_tsb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tsb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_vmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_vmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_wfnl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_wfnl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wfnl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_wfspd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_wfspd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wfspd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovCT1_aset(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->aset; if (!buffer.str().empty()) @@ -597,7 +595,8 @@ bool get_GovCT1_aset(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_db(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db; if (!buffer.str().empty()) @@ -611,7 +610,8 @@ bool get_GovCT1_db(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_dm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dm; if (!buffer.str().empty()) @@ -625,7 +625,8 @@ bool get_GovCT1_dm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -639,7 +640,8 @@ bool get_GovCT1_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_kdgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdgov; if (!buffer.str().empty()) @@ -653,7 +655,8 @@ bool get_GovCT1_kdgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT1_kigov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kigov; if (!buffer.str().empty()) @@ -667,7 +670,8 @@ bool get_GovCT1_kigov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT1_kiload(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kiload; if (!buffer.str().empty()) @@ -681,7 +685,8 @@ bool get_GovCT1_kiload(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT1_kimw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kimw; if (!buffer.str().empty()) @@ -695,7 +700,8 @@ bool get_GovCT1_kimw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_kpgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpgov; if (!buffer.str().empty()) @@ -709,7 +715,8 @@ bool get_GovCT1_kpgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT1_kpload(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpload; if (!buffer.str().empty()) @@ -723,7 +730,8 @@ bool get_GovCT1_kpload(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT1_kturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kturb; if (!buffer.str().empty()) @@ -737,7 +745,8 @@ bool get_GovCT1_kturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT1_ldref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ldref; if (!buffer.str().empty()) @@ -751,7 +760,8 @@ bool get_GovCT1_ldref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT1_maxerr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxerr; if (!buffer.str().empty()) @@ -765,7 +775,8 @@ bool get_GovCT1_maxerr(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT1_minerr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minerr; if (!buffer.str().empty()) @@ -779,7 +790,8 @@ bool get_GovCT1_minerr(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -793,7 +805,8 @@ bool get_GovCT1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT1_pmwset(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmwset; if (!buffer.str().empty()) @@ -807,7 +820,8 @@ bool get_GovCT1_pmwset(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT1_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -821,7 +835,8 @@ bool get_GovCT1_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_rclose(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rclose; if (!buffer.str().empty()) @@ -835,7 +850,8 @@ bool get_GovCT1_rclose(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT1_rdown(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rdown; if (!buffer.str().empty()) @@ -849,7 +865,8 @@ bool get_GovCT1_rdown(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT1_ropen(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ropen; if (!buffer.str().empty()) @@ -861,9 +878,25 @@ bool get_GovCT1_ropen(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } +bool get_GovCT1_rselect(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->rselect; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_GovCT1_rup(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rup; if (!buffer.str().empty()) @@ -877,7 +910,8 @@ bool get_GovCT1_rup(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -891,7 +925,8 @@ bool get_GovCT1_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_tact(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tact; if (!buffer.str().empty()) @@ -905,7 +940,8 @@ bool get_GovCT1_tact(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -919,7 +955,8 @@ bool get_GovCT1_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -933,7 +970,8 @@ bool get_GovCT1_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_tdgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdgov; if (!buffer.str().empty()) @@ -947,7 +985,8 @@ bool get_GovCT1_tdgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT1_teng(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->teng; if (!buffer.str().empty()) @@ -961,7 +1000,8 @@ bool get_GovCT1_teng(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_tfload(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tfload; if (!buffer.str().empty()) @@ -975,7 +1015,8 @@ bool get_GovCT1_tfload(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT1_tpelec(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpelec; if (!buffer.str().empty()) @@ -989,7 +1030,8 @@ bool get_GovCT1_tpelec(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT1_tsa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tsa; if (!buffer.str().empty()) @@ -1003,7 +1045,8 @@ bool get_GovCT1_tsa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_tsb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tsb; if (!buffer.str().empty()) @@ -1017,7 +1060,8 @@ bool get_GovCT1_tsb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmax; if (!buffer.str().empty()) @@ -1031,7 +1075,8 @@ bool get_GovCT1_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmin; if (!buffer.str().empty()) @@ -1045,7 +1090,8 @@ bool get_GovCT1_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_wfnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wfnl; if (!buffer.str().empty()) @@ -1059,7 +1105,8 @@ bool get_GovCT1_wfnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_wfspd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wfspd; if (!buffer.str().empty()) @@ -1071,22 +1118,6 @@ bool get_GovCT1_wfspd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - -bool get_GovCT1_rselect(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->rselect; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char GovCT1::debugName[] = "GovCT1"; const char* GovCT1::debugString() const { @@ -1095,47 +1126,47 @@ const char* GovCT1::debugString() const void GovCT1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovCT1"), &GovCT1_factory)); + factory_map.emplace("cim:GovCT1", &GovCT1_factory); } void GovCT1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovCT1.aset"), &assign_GovCT1_aset)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.db"), &assign_GovCT1_db)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.dm"), &assign_GovCT1_dm)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.ka"), &assign_GovCT1_ka)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.kdgov"), &assign_GovCT1_kdgov)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.kigov"), &assign_GovCT1_kigov)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.kiload"), &assign_GovCT1_kiload)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.kimw"), &assign_GovCT1_kimw)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.kpgov"), &assign_GovCT1_kpgov)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.kpload"), &assign_GovCT1_kpload)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.kturb"), &assign_GovCT1_kturb)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.ldref"), &assign_GovCT1_ldref)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.maxerr"), &assign_GovCT1_maxerr)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.minerr"), &assign_GovCT1_minerr)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.mwbase"), &assign_GovCT1_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.pmwset"), &assign_GovCT1_pmwset)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.r"), &assign_GovCT1_r)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.rclose"), &assign_GovCT1_rclose)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.rdown"), &assign_GovCT1_rdown)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.ropen"), &assign_GovCT1_ropen)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.rselect"), &assign_GovCT1_rselect)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.rup"), &assign_GovCT1_rup)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.ta"), &assign_GovCT1_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.tact"), &assign_GovCT1_tact)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.tb"), &assign_GovCT1_tb)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.tc"), &assign_GovCT1_tc)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.tdgov"), &assign_GovCT1_tdgov)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.teng"), &assign_GovCT1_teng)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.tfload"), &assign_GovCT1_tfload)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.tpelec"), &assign_GovCT1_tpelec)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.tsa"), &assign_GovCT1_tsa)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.tsb"), &assign_GovCT1_tsb)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.vmax"), &assign_GovCT1_vmax)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.vmin"), &assign_GovCT1_vmin)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.wfnl"), &assign_GovCT1_wfnl)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.wfspd"), &assign_GovCT1_wfspd)); + assign_map.emplace("cim:GovCT1.aset", &assign_GovCT1_aset); + assign_map.emplace("cim:GovCT1.db", &assign_GovCT1_db); + assign_map.emplace("cim:GovCT1.dm", &assign_GovCT1_dm); + assign_map.emplace("cim:GovCT1.ka", &assign_GovCT1_ka); + assign_map.emplace("cim:GovCT1.kdgov", &assign_GovCT1_kdgov); + assign_map.emplace("cim:GovCT1.kigov", &assign_GovCT1_kigov); + assign_map.emplace("cim:GovCT1.kiload", &assign_GovCT1_kiload); + assign_map.emplace("cim:GovCT1.kimw", &assign_GovCT1_kimw); + assign_map.emplace("cim:GovCT1.kpgov", &assign_GovCT1_kpgov); + assign_map.emplace("cim:GovCT1.kpload", &assign_GovCT1_kpload); + assign_map.emplace("cim:GovCT1.kturb", &assign_GovCT1_kturb); + assign_map.emplace("cim:GovCT1.ldref", &assign_GovCT1_ldref); + assign_map.emplace("cim:GovCT1.maxerr", &assign_GovCT1_maxerr); + assign_map.emplace("cim:GovCT1.minerr", &assign_GovCT1_minerr); + assign_map.emplace("cim:GovCT1.mwbase", &assign_GovCT1_mwbase); + assign_map.emplace("cim:GovCT1.pmwset", &assign_GovCT1_pmwset); + assign_map.emplace("cim:GovCT1.r", &assign_GovCT1_r); + assign_map.emplace("cim:GovCT1.rclose", &assign_GovCT1_rclose); + assign_map.emplace("cim:GovCT1.rdown", &assign_GovCT1_rdown); + assign_map.emplace("cim:GovCT1.ropen", &assign_GovCT1_ropen); + assign_map.emplace("cim:GovCT1.rselect", &assign_GovCT1_rselect); + assign_map.emplace("cim:GovCT1.rup", &assign_GovCT1_rup); + assign_map.emplace("cim:GovCT1.ta", &assign_GovCT1_ta); + assign_map.emplace("cim:GovCT1.tact", &assign_GovCT1_tact); + assign_map.emplace("cim:GovCT1.tb", &assign_GovCT1_tb); + assign_map.emplace("cim:GovCT1.tc", &assign_GovCT1_tc); + assign_map.emplace("cim:GovCT1.tdgov", &assign_GovCT1_tdgov); + assign_map.emplace("cim:GovCT1.teng", &assign_GovCT1_teng); + assign_map.emplace("cim:GovCT1.tfload", &assign_GovCT1_tfload); + assign_map.emplace("cim:GovCT1.tpelec", &assign_GovCT1_tpelec); + assign_map.emplace("cim:GovCT1.tsa", &assign_GovCT1_tsa); + assign_map.emplace("cim:GovCT1.tsb", &assign_GovCT1_tsb); + assign_map.emplace("cim:GovCT1.vmax", &assign_GovCT1_vmax); + assign_map.emplace("cim:GovCT1.vmin", &assign_GovCT1_vmin); + assign_map.emplace("cim:GovCT1.wfnl", &assign_GovCT1_wfnl); + assign_map.emplace("cim:GovCT1.wfspd", &assign_GovCT1_wfspd); } void GovCT1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/GovCT1.hpp b/CGMES_2.4.13_18DEC2013/GovCT1.hpp index 878249ba1..d4205a655 100644 --- a/CGMES_2.4.13_18DEC2013/GovCT1.hpp +++ b/CGMES_2.4.13_18DEC2013/GovCT1.hpp @@ -22,9 +22,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - General model for any prime mover with a PID governor, used primarily for combustion turbine and combined cycle units. This model can be used to represent a variety of prime movers controlled by PID governors. It is suitable, for example, for representation of Additional information on this model is available in the 2012 IEEE report, , section 3.1.2.3 page 3-4 (GGOV1). - */ + /** \brief General model for any prime mover with a PID governor, used primarily for combustion turbine and combined cycle units. This model can be used to represent a variety of prime movers controlled by PID governors. It is suitable, for example, for representation of Additional information on this model is available in the 2012 IEEE report, , section 3.1.2.3 page 3-4 (GGOV1). */ class GovCT1 : public TurbineGovernorDynamics { public: @@ -32,42 +30,113 @@ namespace CIMPP GovCT1(); ~GovCT1() override; - CIMPP::Simple_Float aset; /* Acceleration limiter setpoint (Aset). Unit = PU/sec. Typical Value = 0.01. Default: nullptr */ - CIMPP::PU db; /* Speed governor dead band in per unit speed (db). In the majority of applications, it is recommended that this value be set to zero. Typical Value = 0. Default: nullptr */ - CIMPP::PU dm; /* Speed sensitivity coefficient (Dm). Dm can represent either the variation of the engine power with the shaft speed or the variation of maximum power capability with shaft speed. If it is positive it describes the falling slope of the engine speed verses power characteristic as speed increases. A slightly falling characteristic is typical for reciprocating engines and some aero-derivative turbines. If it is negative the engine power is assumed to be unaffected by the shaft speed, but the maximum permissible fuel flow is taken to fall with falling shaft speed. This is characteristic of single-shaft industrial turbines due to exhaust temperature limits. Typical Value = 0. Default: nullptr */ - CIMPP::PU ka; /* Acceleration limiter gain (Ka). Typical Value = 10. Default: nullptr */ - CIMPP::PU kdgov; /* Governor derivative gain (Kdgov). Typical Value = 0. Default: nullptr */ - CIMPP::PU kigov; /* Governor integral gain (Kigov). Typical Value = 2. Default: nullptr */ - CIMPP::PU kiload; /* Load limiter integral gain for PI controller (Kiload). Typical Value = 0.67. Default: nullptr */ - CIMPP::PU kimw; /* Power controller (reset) gain (Kimw). The default value of 0.01 corresponds to a reset time of 100 seconds. A value of 0.001 corresponds to a relatively slow acting load controller. Typical Value = 0.01. Default: nullptr */ - CIMPP::PU kpgov; /* Governor proportional gain (Kpgov). Typical Value = 10. Default: nullptr */ - CIMPP::PU kpload; /* Load limiter proportional gain for PI controller (Kpload). Typical Value = 2. Default: nullptr */ - CIMPP::PU kturb; /* Turbine gain (Kturb) (>0). Typical Value = 1.5. Default: nullptr */ - CIMPP::PU ldref; /* Load limiter reference value (Ldref). Typical Value = 1. Default: nullptr */ - CIMPP::PU maxerr; /* Maximum value for speed error signal (maxerr). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU minerr; /* Minimum value for speed error signal (minerr). Typical Value = -0.05. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ - CIMPP::ActivePower pmwset; /* Power controller setpoint (Pmwset). Unit = MW. Typical Value = 80. Default: nullptr */ - CIMPP::PU r; /* Permanent droop (R). Typical Value = 0.04. Default: nullptr */ - CIMPP::Simple_Float rclose; /* Minimum valve closing rate (Rclose). Unit = PU/sec. Typical Value = -0.1. Default: nullptr */ - CIMPP::PU rdown; /* Maximum rate of load limit decrease (Rdown). Typical Value = -99. Default: nullptr */ - CIMPP::Simple_Float ropen; /* Maximum valve opening rate (Ropen). Unit = PU/sec. Typical Value = 0.10. Default: nullptr */ - CIMPP::DroopSignalFeedbackKind rselect; /* Feedback signal for droop (Rselect). Typical Value = electricalPower. Default: 0 */ - CIMPP::PU rup; /* Maximum rate of load limit increase (Rup). Typical Value = 99. Default: nullptr */ - CIMPP::Seconds ta; /* Acceleration limiter time constant (Ta) (>0). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tact; /* Actuator time constant (Tact). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tb; /* Turbine lag time constant (Tb) (>0). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tc; /* Turbine lead time constant (Tc). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tdgov; /* Governor derivative controller time constant (Tdgov). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds teng; /* Transport time delay for diesel engine used in representing diesel engines where there is a small but measurable transport delay between a change in fuel flow setting and the development of torque (Teng). Teng should be zero in all but special cases where this transport delay is of particular concern. Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tfload; /* Load Limiter time constant (Tfload) (>0). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds tpelec; /* Electrical power transducer time constant (Tpelec) (>0). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tsa; /* Temperature detection lead time constant (Tsa). Typical Value = 4. Default: nullptr */ - CIMPP::Seconds tsb; /* Temperature detection lag time constant (Tsb). Typical Value = 5. Default: nullptr */ - CIMPP::PU vmax; /* Maximum valve position limit (Vmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU vmin; /* Minimum valve position limit (Vmin). Typical Value = 0.15. Default: nullptr */ - CIMPP::PU wfnl; /* No load fuel flow (Wfnl). Typical Value = 0.2. Default: nullptr */ - CIMPP::Boolean wfspd; /* Switch for fuel source characteristic to recognize that fuel flow, for a given fuel valve stroke, can be proportional to engine speed (Wfspd). true = fuel flow proportional to speed (for some gas turbines and diesel engines with positive displacement fuel injectors) false = fuel control system keeps fuel flow independent of engine speed. Typical Value = true. Default: false */ + /** \brief Acceleration limiter setpoint (Aset). Unit = PU/sec. Typical Value = 0.01. Default: nullptr */ + CIMPP::Simple_Float aset; + + /** \brief Speed governor dead band in per unit speed (db). In the majority of applications, it is recommended that this value be set to zero. Typical Value = 0. Default: nullptr */ + CIMPP::PU db; + + /** \brief Speed sensitivity coefficient (Dm). Dm can represent either the variation of the engine power with the shaft speed or the variation of maximum power capability with shaft speed. If it is positive it describes the falling slope of the engine speed verses power characteristic as speed increases. A slightly falling characteristic is typical for reciprocating engines and some aero-derivative turbines. If it is negative the engine power is assumed to be unaffected by the shaft speed, but the maximum permissible fuel flow is taken to fall with falling shaft speed. This is characteristic of single-shaft industrial turbines due to exhaust temperature limits. Typical Value = 0. Default: nullptr */ + CIMPP::PU dm; + + /** \brief Acceleration limiter gain (Ka). Typical Value = 10. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Governor derivative gain (Kdgov). Typical Value = 0. Default: nullptr */ + CIMPP::PU kdgov; + + /** \brief Governor integral gain (Kigov). Typical Value = 2. Default: nullptr */ + CIMPP::PU kigov; + + /** \brief Load limiter integral gain for PI controller (Kiload). Typical Value = 0.67. Default: nullptr */ + CIMPP::PU kiload; + + /** \brief Power controller (reset) gain (Kimw). The default value of 0.01 corresponds to a reset time of 100 seconds. A value of 0.001 corresponds to a relatively slow acting load controller. Typical Value = 0.01. Default: nullptr */ + CIMPP::PU kimw; + + /** \brief Governor proportional gain (Kpgov). Typical Value = 10. Default: nullptr */ + CIMPP::PU kpgov; + + /** \brief Load limiter proportional gain for PI controller (Kpload). Typical Value = 2. Default: nullptr */ + CIMPP::PU kpload; + + /** \brief Turbine gain (Kturb) (>0). Typical Value = 1.5. Default: nullptr */ + CIMPP::PU kturb; + + /** \brief Load limiter reference value (Ldref). Typical Value = 1. Default: nullptr */ + CIMPP::PU ldref; + + /** \brief Maximum value for speed error signal (maxerr). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU maxerr; + + /** \brief Minimum value for speed error signal (minerr). Typical Value = -0.05. Default: nullptr */ + CIMPP::PU minerr; + + /** \brief Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Power controller setpoint (Pmwset). Unit = MW. Typical Value = 80. Default: nullptr */ + CIMPP::ActivePower pmwset; + + /** \brief Permanent droop (R). Typical Value = 0.04. Default: nullptr */ + CIMPP::PU r; + + /** \brief Minimum valve closing rate (Rclose). Unit = PU/sec. Typical Value = -0.1. Default: nullptr */ + CIMPP::Simple_Float rclose; + + /** \brief Maximum rate of load limit decrease (Rdown). Typical Value = -99. Default: nullptr */ + CIMPP::PU rdown; + + /** \brief Maximum valve opening rate (Ropen). Unit = PU/sec. Typical Value = 0.10. Default: nullptr */ + CIMPP::Simple_Float ropen; + + /** \brief Feedback signal for droop (Rselect). Typical Value = electricalPower. Default: 0 */ + CIMPP::DroopSignalFeedbackKind rselect; + + /** \brief Maximum rate of load limit increase (Rup). Typical Value = 99. Default: nullptr */ + CIMPP::PU rup; + + /** \brief Acceleration limiter time constant (Ta) (>0). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Actuator time constant (Tact). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds tact; + + /** \brief Turbine lag time constant (Tb) (>0). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Turbine lead time constant (Tc). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Governor derivative controller time constant (Tdgov). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tdgov; + + /** \brief Transport time delay for diesel engine used in representing diesel engines where there is a small but measurable transport delay between a change in fuel flow setting and the development of torque (Teng). Teng should be zero in all but special cases where this transport delay is of particular concern. Typical Value = 0. Default: nullptr */ + CIMPP::Seconds teng; + + /** \brief Load Limiter time constant (Tfload) (>0). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds tfload; + + /** \brief Electrical power transducer time constant (Tpelec) (>0). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tpelec; + + /** \brief Temperature detection lead time constant (Tsa). Typical Value = 4. Default: nullptr */ + CIMPP::Seconds tsa; + + /** \brief Temperature detection lag time constant (Tsb). Typical Value = 5. Default: nullptr */ + CIMPP::Seconds tsb; + + /** \brief Maximum valve position limit (Vmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU vmax; + + /** \brief Minimum valve position limit (Vmin). Typical Value = 0.15. Default: nullptr */ + CIMPP::PU vmin; + + /** \brief No load fuel flow (Wfnl). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU wfnl; + + /** \brief Switch for fuel source characteristic to recognize that fuel flow, for a given fuel valve stroke, can be proportional to engine speed (Wfspd). true = fuel flow proportional to speed (for some gas turbines and diesel engines with positive displacement fuel injectors) false = fuel control system keeps fuel flow independent of engine speed. Typical Value = true. Default: false */ + CIMPP::Boolean wfspd; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GovCT2.cpp b/CGMES_2.4.13_18DEC2013/GovCT2.cpp index d714050b4..b627f39fb 100644 --- a/CGMES_2.4.13_18DEC2013/GovCT2.cpp +++ b/CGMES_2.4.13_18DEC2013/GovCT2.cpp @@ -8,68 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "DroopSignalFeedbackKind.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" using namespace CIMPP; -GovCT2::GovCT2() {}; -GovCT2::~GovCT2() {}; +GovCT2::GovCT2() {} +GovCT2::~GovCT2() {} static const std::list PossibleProfilesForClass = { @@ -152,753 +95,808 @@ GovCT2::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovCT2_aset(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_aset(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->aset; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_db(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_db(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_dm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_dm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_kdgov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_kdgov(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kdgov; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_kigov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_kigov(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kigov; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_kiload(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_kiload(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kiload; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_kimw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_kimw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kimw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_kpgov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_kpgov(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpgov; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_kpload(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_kpload(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpload; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_kturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_kturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_ldref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_ldref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ldref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_maxerr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_maxerr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxerr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_minerr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_minerr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minerr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_pmwset(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_pmwset(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmwset; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_prate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_prate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->prate; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_rclose(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_rclose(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rclose; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_rdown(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_rdown(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rdown; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_ropen(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_ropen(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ropen; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_rselect(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_rselect(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rselect; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_rup(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_rup(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rup; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_tact(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_tact(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tact; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_tdgov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_tdgov(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdgov; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_teng(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_teng(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->teng; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_tfload(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_tfload(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tfload; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_tpelec(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_tpelec(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpelec; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_tsa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_tsa(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tsa; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_tsb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_tsb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tsb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_vmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_vmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_wfnl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_wfnl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wfnl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_wfspd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_wfspd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wfspd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovCT2_aset(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->aset; if (!buffer.str().empty()) @@ -912,7 +910,8 @@ bool get_GovCT2_aset(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_db(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db; if (!buffer.str().empty()) @@ -926,7 +925,8 @@ bool get_GovCT2_db(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_dm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dm; if (!buffer.str().empty()) @@ -940,7 +940,8 @@ bool get_GovCT2_dm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_flim1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim1; if (!buffer.str().empty()) @@ -954,7 +955,8 @@ bool get_GovCT2_flim1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_flim10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim10; if (!buffer.str().empty()) @@ -968,7 +970,8 @@ bool get_GovCT2_flim10(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_flim2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim2; if (!buffer.str().empty()) @@ -982,7 +985,8 @@ bool get_GovCT2_flim2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_flim3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim3; if (!buffer.str().empty()) @@ -996,7 +1000,8 @@ bool get_GovCT2_flim3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_flim4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim4; if (!buffer.str().empty()) @@ -1010,7 +1015,8 @@ bool get_GovCT2_flim4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_flim5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim5; if (!buffer.str().empty()) @@ -1024,7 +1030,8 @@ bool get_GovCT2_flim5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_flim6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim6; if (!buffer.str().empty()) @@ -1038,7 +1045,8 @@ bool get_GovCT2_flim6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_flim7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim7; if (!buffer.str().empty()) @@ -1052,7 +1060,8 @@ bool get_GovCT2_flim7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_flim8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim8; if (!buffer.str().empty()) @@ -1066,7 +1075,8 @@ bool get_GovCT2_flim8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_flim9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim9; if (!buffer.str().empty()) @@ -1080,7 +1090,8 @@ bool get_GovCT2_flim9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -1094,7 +1105,8 @@ bool get_GovCT2_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_kdgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdgov; if (!buffer.str().empty()) @@ -1108,7 +1120,8 @@ bool get_GovCT2_kdgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_kigov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kigov; if (!buffer.str().empty()) @@ -1122,7 +1135,8 @@ bool get_GovCT2_kigov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_kiload(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kiload; if (!buffer.str().empty()) @@ -1136,7 +1150,8 @@ bool get_GovCT2_kiload(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_kimw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kimw; if (!buffer.str().empty()) @@ -1150,7 +1165,8 @@ bool get_GovCT2_kimw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_kpgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpgov; if (!buffer.str().empty()) @@ -1164,7 +1180,8 @@ bool get_GovCT2_kpgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_kpload(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpload; if (!buffer.str().empty()) @@ -1178,7 +1195,8 @@ bool get_GovCT2_kpload(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_kturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kturb; if (!buffer.str().empty()) @@ -1192,7 +1210,8 @@ bool get_GovCT2_kturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_ldref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ldref; if (!buffer.str().empty()) @@ -1206,7 +1225,8 @@ bool get_GovCT2_ldref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_maxerr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxerr; if (!buffer.str().empty()) @@ -1220,7 +1240,8 @@ bool get_GovCT2_maxerr(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_minerr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minerr; if (!buffer.str().empty()) @@ -1234,7 +1255,8 @@ bool get_GovCT2_minerr(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -1248,7 +1270,8 @@ bool get_GovCT2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_plim1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim1; if (!buffer.str().empty()) @@ -1262,7 +1285,8 @@ bool get_GovCT2_plim1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_plim10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim10; if (!buffer.str().empty()) @@ -1276,7 +1300,8 @@ bool get_GovCT2_plim10(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_plim2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim2; if (!buffer.str().empty()) @@ -1290,7 +1315,8 @@ bool get_GovCT2_plim2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_plim3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim3; if (!buffer.str().empty()) @@ -1304,7 +1330,8 @@ bool get_GovCT2_plim3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_plim4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim4; if (!buffer.str().empty()) @@ -1318,7 +1345,8 @@ bool get_GovCT2_plim4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_plim5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim5; if (!buffer.str().empty()) @@ -1332,7 +1360,8 @@ bool get_GovCT2_plim5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_plim6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim6; if (!buffer.str().empty()) @@ -1346,7 +1375,8 @@ bool get_GovCT2_plim6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_plim7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim7; if (!buffer.str().empty()) @@ -1360,7 +1390,8 @@ bool get_GovCT2_plim7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_plim8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim8; if (!buffer.str().empty()) @@ -1374,7 +1405,8 @@ bool get_GovCT2_plim8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_plim9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim9; if (!buffer.str().empty()) @@ -1388,7 +1420,8 @@ bool get_GovCT2_plim9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_pmwset(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmwset; if (!buffer.str().empty()) @@ -1402,7 +1435,8 @@ bool get_GovCT2_pmwset(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_prate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->prate; if (!buffer.str().empty()) @@ -1416,7 +1450,8 @@ bool get_GovCT2_prate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -1430,7 +1465,8 @@ bool get_GovCT2_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_rclose(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rclose; if (!buffer.str().empty()) @@ -1444,7 +1480,8 @@ bool get_GovCT2_rclose(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_rdown(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rdown; if (!buffer.str().empty()) @@ -1458,7 +1495,8 @@ bool get_GovCT2_rdown(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_ropen(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ropen; if (!buffer.str().empty()) @@ -1470,9 +1508,25 @@ bool get_GovCT2_ropen(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } +bool get_GovCT2_rselect(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->rselect; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_GovCT2_rup(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rup; if (!buffer.str().empty()) @@ -1486,7 +1540,8 @@ bool get_GovCT2_rup(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -1500,7 +1555,8 @@ bool get_GovCT2_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_tact(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tact; if (!buffer.str().empty()) @@ -1514,7 +1570,8 @@ bool get_GovCT2_tact(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -1528,7 +1585,8 @@ bool get_GovCT2_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -1542,7 +1600,8 @@ bool get_GovCT2_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_tdgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdgov; if (!buffer.str().empty()) @@ -1556,7 +1615,8 @@ bool get_GovCT2_tdgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_teng(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->teng; if (!buffer.str().empty()) @@ -1570,7 +1630,8 @@ bool get_GovCT2_teng(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_tfload(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tfload; if (!buffer.str().empty()) @@ -1584,7 +1645,8 @@ bool get_GovCT2_tfload(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_tpelec(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpelec; if (!buffer.str().empty()) @@ -1598,7 +1660,8 @@ bool get_GovCT2_tpelec(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_tsa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tsa; if (!buffer.str().empty()) @@ -1612,7 +1675,8 @@ bool get_GovCT2_tsa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_tsb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tsb; if (!buffer.str().empty()) @@ -1626,7 +1690,8 @@ bool get_GovCT2_tsb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmax; if (!buffer.str().empty()) @@ -1640,7 +1705,8 @@ bool get_GovCT2_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmin; if (!buffer.str().empty()) @@ -1654,7 +1720,8 @@ bool get_GovCT2_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_wfnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wfnl; if (!buffer.str().empty()) @@ -1668,7 +1735,8 @@ bool get_GovCT2_wfnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_wfspd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wfspd; if (!buffer.str().empty()) @@ -1680,22 +1748,6 @@ bool get_GovCT2_wfspd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - -bool get_GovCT2_rselect(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->rselect; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char GovCT2::debugName[] = "GovCT2"; const char* GovCT2::debugString() const { @@ -1704,68 +1756,68 @@ const char* GovCT2::debugString() const void GovCT2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovCT2"), &GovCT2_factory)); + factory_map.emplace("cim:GovCT2", &GovCT2_factory); } void GovCT2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovCT2.aset"), &assign_GovCT2_aset)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.db"), &assign_GovCT2_db)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.dm"), &assign_GovCT2_dm)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim1"), &assign_GovCT2_flim1)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim10"), &assign_GovCT2_flim10)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim2"), &assign_GovCT2_flim2)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim3"), &assign_GovCT2_flim3)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim4"), &assign_GovCT2_flim4)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim5"), &assign_GovCT2_flim5)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim6"), &assign_GovCT2_flim6)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim7"), &assign_GovCT2_flim7)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim8"), &assign_GovCT2_flim8)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim9"), &assign_GovCT2_flim9)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.ka"), &assign_GovCT2_ka)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.kdgov"), &assign_GovCT2_kdgov)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.kigov"), &assign_GovCT2_kigov)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.kiload"), &assign_GovCT2_kiload)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.kimw"), &assign_GovCT2_kimw)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.kpgov"), &assign_GovCT2_kpgov)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.kpload"), &assign_GovCT2_kpload)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.kturb"), &assign_GovCT2_kturb)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.ldref"), &assign_GovCT2_ldref)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.maxerr"), &assign_GovCT2_maxerr)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.minerr"), &assign_GovCT2_minerr)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.mwbase"), &assign_GovCT2_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim1"), &assign_GovCT2_plim1)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim10"), &assign_GovCT2_plim10)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim2"), &assign_GovCT2_plim2)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim3"), &assign_GovCT2_plim3)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim4"), &assign_GovCT2_plim4)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim5"), &assign_GovCT2_plim5)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim6"), &assign_GovCT2_plim6)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim7"), &assign_GovCT2_plim7)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim8"), &assign_GovCT2_plim8)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim9"), &assign_GovCT2_plim9)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.pmwset"), &assign_GovCT2_pmwset)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.prate"), &assign_GovCT2_prate)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.r"), &assign_GovCT2_r)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.rclose"), &assign_GovCT2_rclose)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.rdown"), &assign_GovCT2_rdown)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.ropen"), &assign_GovCT2_ropen)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.rselect"), &assign_GovCT2_rselect)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.rup"), &assign_GovCT2_rup)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.ta"), &assign_GovCT2_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.tact"), &assign_GovCT2_tact)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.tb"), &assign_GovCT2_tb)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.tc"), &assign_GovCT2_tc)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.tdgov"), &assign_GovCT2_tdgov)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.teng"), &assign_GovCT2_teng)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.tfload"), &assign_GovCT2_tfload)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.tpelec"), &assign_GovCT2_tpelec)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.tsa"), &assign_GovCT2_tsa)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.tsb"), &assign_GovCT2_tsb)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.vmax"), &assign_GovCT2_vmax)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.vmin"), &assign_GovCT2_vmin)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.wfnl"), &assign_GovCT2_wfnl)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.wfspd"), &assign_GovCT2_wfspd)); + assign_map.emplace("cim:GovCT2.aset", &assign_GovCT2_aset); + assign_map.emplace("cim:GovCT2.db", &assign_GovCT2_db); + assign_map.emplace("cim:GovCT2.dm", &assign_GovCT2_dm); + assign_map.emplace("cim:GovCT2.flim1", &assign_GovCT2_flim1); + assign_map.emplace("cim:GovCT2.flim10", &assign_GovCT2_flim10); + assign_map.emplace("cim:GovCT2.flim2", &assign_GovCT2_flim2); + assign_map.emplace("cim:GovCT2.flim3", &assign_GovCT2_flim3); + assign_map.emplace("cim:GovCT2.flim4", &assign_GovCT2_flim4); + assign_map.emplace("cim:GovCT2.flim5", &assign_GovCT2_flim5); + assign_map.emplace("cim:GovCT2.flim6", &assign_GovCT2_flim6); + assign_map.emplace("cim:GovCT2.flim7", &assign_GovCT2_flim7); + assign_map.emplace("cim:GovCT2.flim8", &assign_GovCT2_flim8); + assign_map.emplace("cim:GovCT2.flim9", &assign_GovCT2_flim9); + assign_map.emplace("cim:GovCT2.ka", &assign_GovCT2_ka); + assign_map.emplace("cim:GovCT2.kdgov", &assign_GovCT2_kdgov); + assign_map.emplace("cim:GovCT2.kigov", &assign_GovCT2_kigov); + assign_map.emplace("cim:GovCT2.kiload", &assign_GovCT2_kiload); + assign_map.emplace("cim:GovCT2.kimw", &assign_GovCT2_kimw); + assign_map.emplace("cim:GovCT2.kpgov", &assign_GovCT2_kpgov); + assign_map.emplace("cim:GovCT2.kpload", &assign_GovCT2_kpload); + assign_map.emplace("cim:GovCT2.kturb", &assign_GovCT2_kturb); + assign_map.emplace("cim:GovCT2.ldref", &assign_GovCT2_ldref); + assign_map.emplace("cim:GovCT2.maxerr", &assign_GovCT2_maxerr); + assign_map.emplace("cim:GovCT2.minerr", &assign_GovCT2_minerr); + assign_map.emplace("cim:GovCT2.mwbase", &assign_GovCT2_mwbase); + assign_map.emplace("cim:GovCT2.plim1", &assign_GovCT2_plim1); + assign_map.emplace("cim:GovCT2.plim10", &assign_GovCT2_plim10); + assign_map.emplace("cim:GovCT2.plim2", &assign_GovCT2_plim2); + assign_map.emplace("cim:GovCT2.plim3", &assign_GovCT2_plim3); + assign_map.emplace("cim:GovCT2.plim4", &assign_GovCT2_plim4); + assign_map.emplace("cim:GovCT2.plim5", &assign_GovCT2_plim5); + assign_map.emplace("cim:GovCT2.plim6", &assign_GovCT2_plim6); + assign_map.emplace("cim:GovCT2.plim7", &assign_GovCT2_plim7); + assign_map.emplace("cim:GovCT2.plim8", &assign_GovCT2_plim8); + assign_map.emplace("cim:GovCT2.plim9", &assign_GovCT2_plim9); + assign_map.emplace("cim:GovCT2.pmwset", &assign_GovCT2_pmwset); + assign_map.emplace("cim:GovCT2.prate", &assign_GovCT2_prate); + assign_map.emplace("cim:GovCT2.r", &assign_GovCT2_r); + assign_map.emplace("cim:GovCT2.rclose", &assign_GovCT2_rclose); + assign_map.emplace("cim:GovCT2.rdown", &assign_GovCT2_rdown); + assign_map.emplace("cim:GovCT2.ropen", &assign_GovCT2_ropen); + assign_map.emplace("cim:GovCT2.rselect", &assign_GovCT2_rselect); + assign_map.emplace("cim:GovCT2.rup", &assign_GovCT2_rup); + assign_map.emplace("cim:GovCT2.ta", &assign_GovCT2_ta); + assign_map.emplace("cim:GovCT2.tact", &assign_GovCT2_tact); + assign_map.emplace("cim:GovCT2.tb", &assign_GovCT2_tb); + assign_map.emplace("cim:GovCT2.tc", &assign_GovCT2_tc); + assign_map.emplace("cim:GovCT2.tdgov", &assign_GovCT2_tdgov); + assign_map.emplace("cim:GovCT2.teng", &assign_GovCT2_teng); + assign_map.emplace("cim:GovCT2.tfload", &assign_GovCT2_tfload); + assign_map.emplace("cim:GovCT2.tpelec", &assign_GovCT2_tpelec); + assign_map.emplace("cim:GovCT2.tsa", &assign_GovCT2_tsa); + assign_map.emplace("cim:GovCT2.tsb", &assign_GovCT2_tsb); + assign_map.emplace("cim:GovCT2.vmax", &assign_GovCT2_vmax); + assign_map.emplace("cim:GovCT2.vmin", &assign_GovCT2_vmin); + assign_map.emplace("cim:GovCT2.wfnl", &assign_GovCT2_wfnl); + assign_map.emplace("cim:GovCT2.wfspd", &assign_GovCT2_wfspd); } void GovCT2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/GovCT2.hpp b/CGMES_2.4.13_18DEC2013/GovCT2.hpp index 5288e993b..e5089b39b 100644 --- a/CGMES_2.4.13_18DEC2013/GovCT2.hpp +++ b/CGMES_2.4.13_18DEC2013/GovCT2.hpp @@ -23,9 +23,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - General governor model with frequency-dependent fuel flow limit. This model is a modification of the GovCT1model in order to represent the frequency-dependent fuel flow limit of a specific gas turbine manufacturer. - */ + /** \brief General governor model with frequency-dependent fuel flow limit. This model is a modification of the GovCT1model in order to represent the frequency-dependent fuel flow limit of a specific gas turbine manufacturer. */ class GovCT2 : public TurbineGovernorDynamics { public: @@ -33,63 +31,176 @@ namespace CIMPP GovCT2(); ~GovCT2() override; - CIMPP::Simple_Float aset; /* Acceleration limiter setpoint (Aset). Unit = PU/sec. Typical Value = 10. Default: nullptr */ - CIMPP::PU db; /* Speed governor dead band in per unit speed (db). In the majority of applications, it is recommended that this value be set to zero. Typical Value = 0. Default: nullptr */ - CIMPP::PU dm; /* Speed sensitivity coefficient (Dm). Dm can represent either the variation of the engine power with the shaft speed or the variation of maximum power capability with shaft speed. If it is positive it describes the falling slope of the engine speed verses power characteristic as speed increases. A slightly falling characteristic is typical for reciprocating engines and some aero-derivative turbines. If it is negative the engine power is assumed to be unaffected by the shaft speed, but the maximum permissible fuel flow is taken to fall with falling shaft speed. This is characteristic of single-shaft industrial turbines due to exhaust temperature limits. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency flim1; /* Frequency threshold 1 (Flim1). Unit = Hz. Typical Value = 59. Default: nullptr */ - CIMPP::Frequency flim10; /* Frequency threshold 10 (Flim10). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency flim2; /* Frequency threshold 2 (Flim2). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency flim3; /* Frequency threshold 3 (Flim3). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency flim4; /* Frequency threshold 4 (Flim4). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency flim5; /* Frequency threshold 5 (Flim5). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency flim6; /* Frequency threshold 6 (Flim6). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency flim7; /* Frequency threshold 7 (Flim7). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency flim8; /* Frequency threshold 8 (Flim8). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency flim9; /* Frequency threshold 9 (Flim9). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::PU ka; /* Acceleration limiter Gain (Ka). Typical Value = 10. Default: nullptr */ - CIMPP::PU kdgov; /* Governor derivative gain (Kdgov). Typical Value = 0. Default: nullptr */ - CIMPP::PU kigov; /* Governor integral gain (Kigov). Typical Value = 0.45. Default: nullptr */ - CIMPP::PU kiload; /* Load limiter integral gain for PI controller (Kiload). Typical Value = 1. Default: nullptr */ - CIMPP::PU kimw; /* Power controller (reset) gain (Kimw). The default value of 0.01 corresponds to a reset time of 100 seconds. A value of 0.001 corresponds to a relatively slow acting load controller. Typical Value = 0. Default: nullptr */ - CIMPP::PU kpgov; /* Governor proportional gain (Kpgov). Typical Value = 4. Default: nullptr */ - CIMPP::PU kpload; /* Load limiter proportional gain for PI controller (Kpload). Typical Value = 1. Default: nullptr */ - CIMPP::PU kturb; /* Turbine gain (Kturb). Typical Value = 1.9168. Default: nullptr */ - CIMPP::PU ldref; /* Load limiter reference value (Ldref). Typical Value = 1. Default: nullptr */ - CIMPP::PU maxerr; /* Maximum value for speed error signal (Maxerr). Typical Value = 1. Default: nullptr */ - CIMPP::PU minerr; /* Minimum value for speed error signal (Minerr). Typical Value = -1. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ - CIMPP::PU plim1; /* Power limit 1 (Plim1). Typical Value = 0.8325. Default: nullptr */ - CIMPP::PU plim10; /* Power limit 10 (Plim10). Typical Value = 0. Default: nullptr */ - CIMPP::PU plim2; /* Power limit 2 (Plim2). Typical Value = 0. Default: nullptr */ - CIMPP::PU plim3; /* Power limit 3 (Plim3). Typical Value = 0. Default: nullptr */ - CIMPP::PU plim4; /* Power limit 4 (Plim4). Typical Value = 0. Default: nullptr */ - CIMPP::PU plim5; /* Power limit 5 (Plim5). Typical Value = 0. Default: nullptr */ - CIMPP::PU plim6; /* Power limit 6 (Plim6). Typical Value = 0. Default: nullptr */ - CIMPP::PU plim7; /* Power limit 7 (Plim7). Typical Value = 0. Default: nullptr */ - CIMPP::PU plim8; /* Power limit 8 (Plim8). Typical Value = 0. Default: nullptr */ - CIMPP::PU plim9; /* Power Limit 9 (Plim9). Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower pmwset; /* Power controller setpoint (Pmwset). Unit = MW. Typical Value = 0. Default: nullptr */ - CIMPP::PU prate; /* Ramp rate for frequency-dependent power limit (Prate). Typical Value = 0.017. Default: nullptr */ - CIMPP::PU r; /* Permanent droop (R). Typical Value = 0.05. Default: nullptr */ - CIMPP::Simple_Float rclose; /* Minimum valve closing rate (Rclose). Unit = PU/sec. Typical Value = -99. Default: nullptr */ - CIMPP::PU rdown; /* Maximum rate of load limit decrease (Rdown). Typical Value = -99. Default: nullptr */ - CIMPP::Simple_Float ropen; /* Maximum valve opening rate (Ropen). Unit = PU/sec. Typical Value = 99. Default: nullptr */ - CIMPP::DroopSignalFeedbackKind rselect; /* Feedback signal for droop (Rselect). Typical Value = electricalPower. Default: 0 */ - CIMPP::PU rup; /* Maximum rate of load limit increase (Rup). Typical Value = 99. Default: nullptr */ - CIMPP::Seconds ta; /* Acceleration limiter time constant (Ta). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tact; /* Actuator time constant (Tact). Typical Value = 0.4. Default: nullptr */ - CIMPP::Seconds tb; /* Turbine lag time constant (Tb). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tc; /* Turbine lead time constant (Tc). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tdgov; /* Governor derivative controller time constant (Tdgov). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds teng; /* Transport time delay for diesel engine used in representing diesel engines where there is a small but measurable transport delay between a change in fuel flow setting and the development of torque (Teng). Teng should be zero in all but special cases where this transport delay is of particular concern. Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tfload; /* Load Limiter time constant (Tfload). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds tpelec; /* Electrical power transducer time constant (Tpelec). Typical Value = 2.5. Default: nullptr */ - CIMPP::Seconds tsa; /* Temperature detection lead time constant (Tsa). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tsb; /* Temperature detection lag time constant (Tsb). Typical Value = 50. Default: nullptr */ - CIMPP::PU vmax; /* Maximum valve position limit (Vmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU vmin; /* Minimum valve position limit (Vmin). Typical Value = 0.175. Default: nullptr */ - CIMPP::PU wfnl; /* No load fuel flow (Wfnl). Typical Value = 0.187. Default: nullptr */ - CIMPP::Boolean wfspd; /* Switch for fuel source characteristic to recognize that fuel flow, for a given fuel valve stroke, can be proportional to engine speed (Wfspd). true = fuel flow proportional to speed (for some gas turbines and diesel engines with positive displacement fuel injectors) false = fuel control system keeps fuel flow independent of engine speed. Typical Value = false. Default: false */ + /** \brief Acceleration limiter setpoint (Aset). Unit = PU/sec. Typical Value = 10. Default: nullptr */ + CIMPP::Simple_Float aset; + + /** \brief Speed governor dead band in per unit speed (db). In the majority of applications, it is recommended that this value be set to zero. Typical Value = 0. Default: nullptr */ + CIMPP::PU db; + + /** \brief Speed sensitivity coefficient (Dm). Dm can represent either the variation of the engine power with the shaft speed or the variation of maximum power capability with shaft speed. If it is positive it describes the falling slope of the engine speed verses power characteristic as speed increases. A slightly falling characteristic is typical for reciprocating engines and some aero-derivative turbines. If it is negative the engine power is assumed to be unaffected by the shaft speed, but the maximum permissible fuel flow is taken to fall with falling shaft speed. This is characteristic of single-shaft industrial turbines due to exhaust temperature limits. Typical Value = 0. Default: nullptr */ + CIMPP::PU dm; + + /** \brief Frequency threshold 1 (Flim1). Unit = Hz. Typical Value = 59. Default: nullptr */ + CIMPP::Frequency flim1; + + /** \brief Frequency threshold 10 (Flim10). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency flim10; + + /** \brief Frequency threshold 2 (Flim2). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency flim2; + + /** \brief Frequency threshold 3 (Flim3). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency flim3; + + /** \brief Frequency threshold 4 (Flim4). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency flim4; + + /** \brief Frequency threshold 5 (Flim5). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency flim5; + + /** \brief Frequency threshold 6 (Flim6). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency flim6; + + /** \brief Frequency threshold 7 (Flim7). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency flim7; + + /** \brief Frequency threshold 8 (Flim8). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency flim8; + + /** \brief Frequency threshold 9 (Flim9). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency flim9; + + /** \brief Acceleration limiter Gain (Ka). Typical Value = 10. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Governor derivative gain (Kdgov). Typical Value = 0. Default: nullptr */ + CIMPP::PU kdgov; + + /** \brief Governor integral gain (Kigov). Typical Value = 0.45. Default: nullptr */ + CIMPP::PU kigov; + + /** \brief Load limiter integral gain for PI controller (Kiload). Typical Value = 1. Default: nullptr */ + CIMPP::PU kiload; + + /** \brief Power controller (reset) gain (Kimw). The default value of 0.01 corresponds to a reset time of 100 seconds. A value of 0.001 corresponds to a relatively slow acting load controller. Typical Value = 0. Default: nullptr */ + CIMPP::PU kimw; + + /** \brief Governor proportional gain (Kpgov). Typical Value = 4. Default: nullptr */ + CIMPP::PU kpgov; + + /** \brief Load limiter proportional gain for PI controller (Kpload). Typical Value = 1. Default: nullptr */ + CIMPP::PU kpload; + + /** \brief Turbine gain (Kturb). Typical Value = 1.9168. Default: nullptr */ + CIMPP::PU kturb; + + /** \brief Load limiter reference value (Ldref). Typical Value = 1. Default: nullptr */ + CIMPP::PU ldref; + + /** \brief Maximum value for speed error signal (Maxerr). Typical Value = 1. Default: nullptr */ + CIMPP::PU maxerr; + + /** \brief Minimum value for speed error signal (Minerr). Typical Value = -1. Default: nullptr */ + CIMPP::PU minerr; + + /** \brief Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Power limit 1 (Plim1). Typical Value = 0.8325. Default: nullptr */ + CIMPP::PU plim1; + + /** \brief Power limit 10 (Plim10). Typical Value = 0. Default: nullptr */ + CIMPP::PU plim10; + + /** \brief Power limit 2 (Plim2). Typical Value = 0. Default: nullptr */ + CIMPP::PU plim2; + + /** \brief Power limit 3 (Plim3). Typical Value = 0. Default: nullptr */ + CIMPP::PU plim3; + + /** \brief Power limit 4 (Plim4). Typical Value = 0. Default: nullptr */ + CIMPP::PU plim4; + + /** \brief Power limit 5 (Plim5). Typical Value = 0. Default: nullptr */ + CIMPP::PU plim5; + + /** \brief Power limit 6 (Plim6). Typical Value = 0. Default: nullptr */ + CIMPP::PU plim6; + + /** \brief Power limit 7 (Plim7). Typical Value = 0. Default: nullptr */ + CIMPP::PU plim7; + + /** \brief Power limit 8 (Plim8). Typical Value = 0. Default: nullptr */ + CIMPP::PU plim8; + + /** \brief Power Limit 9 (Plim9). Typical Value = 0. Default: nullptr */ + CIMPP::PU plim9; + + /** \brief Power controller setpoint (Pmwset). Unit = MW. Typical Value = 0. Default: nullptr */ + CIMPP::ActivePower pmwset; + + /** \brief Ramp rate for frequency-dependent power limit (Prate). Typical Value = 0.017. Default: nullptr */ + CIMPP::PU prate; + + /** \brief Permanent droop (R). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU r; + + /** \brief Minimum valve closing rate (Rclose). Unit = PU/sec. Typical Value = -99. Default: nullptr */ + CIMPP::Simple_Float rclose; + + /** \brief Maximum rate of load limit decrease (Rdown). Typical Value = -99. Default: nullptr */ + CIMPP::PU rdown; + + /** \brief Maximum valve opening rate (Ropen). Unit = PU/sec. Typical Value = 99. Default: nullptr */ + CIMPP::Simple_Float ropen; + + /** \brief Feedback signal for droop (Rselect). Typical Value = electricalPower. Default: 0 */ + CIMPP::DroopSignalFeedbackKind rselect; + + /** \brief Maximum rate of load limit increase (Rup). Typical Value = 99. Default: nullptr */ + CIMPP::PU rup; + + /** \brief Acceleration limiter time constant (Ta). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Actuator time constant (Tact). Typical Value = 0.4. Default: nullptr */ + CIMPP::Seconds tact; + + /** \brief Turbine lag time constant (Tb). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Turbine lead time constant (Tc). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Governor derivative controller time constant (Tdgov). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tdgov; + + /** \brief Transport time delay for diesel engine used in representing diesel engines where there is a small but measurable transport delay between a change in fuel flow setting and the development of torque (Teng). Teng should be zero in all but special cases where this transport delay is of particular concern. Typical Value = 0. Default: nullptr */ + CIMPP::Seconds teng; + + /** \brief Load Limiter time constant (Tfload). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds tfload; + + /** \brief Electrical power transducer time constant (Tpelec). Typical Value = 2.5. Default: nullptr */ + CIMPP::Seconds tpelec; + + /** \brief Temperature detection lead time constant (Tsa). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tsa; + + /** \brief Temperature detection lag time constant (Tsb). Typical Value = 50. Default: nullptr */ + CIMPP::Seconds tsb; + + /** \brief Maximum valve position limit (Vmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU vmax; + + /** \brief Minimum valve position limit (Vmin). Typical Value = 0.175. Default: nullptr */ + CIMPP::PU vmin; + + /** \brief No load fuel flow (Wfnl). Typical Value = 0.187. Default: nullptr */ + CIMPP::PU wfnl; + + /** \brief Switch for fuel source characteristic to recognize that fuel flow, for a given fuel valve stroke, can be proportional to engine speed (Wfspd). true = fuel flow proportional to speed (for some gas turbines and diesel engines with positive displacement fuel injectors) false = fuel control system keeps fuel flow independent of engine speed. Typical Value = false. Default: false */ + CIMPP::Boolean wfspd; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GovGAST.cpp b/CGMES_2.4.13_18DEC2013/GovGAST.cpp index d91027d02..cc94e78ad 100644 --- a/CGMES_2.4.13_18DEC2013/GovGAST.cpp +++ b/CGMES_2.4.13_18DEC2013/GovGAST.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -GovGAST::GovGAST() {}; -GovGAST::~GovGAST() {}; +GovGAST::GovGAST() {} +GovGAST::~GovGAST() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ GovGAST::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovGAST_at(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_at(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->at; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST_dturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_dturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST_kt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_kt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_vmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_vmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovGAST_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->at; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_GovGAST_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dturb; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_GovGAST_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST_kt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kt; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_GovGAST_kt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_GovGAST_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovGAST_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_GovGAST_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_GovGAST_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_GovGAST_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_GovGAST_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmax; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_GovGAST_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmin; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_GovGAST_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char GovGAST::debugName[] = "GovGAST"; const char* GovGAST::debugString() const { @@ -341,21 +346,21 @@ const char* GovGAST::debugString() const void GovGAST::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovGAST"), &GovGAST_factory)); + factory_map.emplace("cim:GovGAST", &GovGAST_factory); } void GovGAST::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovGAST.at"), &assign_GovGAST_at)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST.dturb"), &assign_GovGAST_dturb)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST.kt"), &assign_GovGAST_kt)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST.mwbase"), &assign_GovGAST_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST.r"), &assign_GovGAST_r)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST.t1"), &assign_GovGAST_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST.t2"), &assign_GovGAST_t2)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST.t3"), &assign_GovGAST_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST.vmax"), &assign_GovGAST_vmax)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST.vmin"), &assign_GovGAST_vmin)); + assign_map.emplace("cim:GovGAST.at", &assign_GovGAST_at); + assign_map.emplace("cim:GovGAST.dturb", &assign_GovGAST_dturb); + assign_map.emplace("cim:GovGAST.kt", &assign_GovGAST_kt); + assign_map.emplace("cim:GovGAST.mwbase", &assign_GovGAST_mwbase); + assign_map.emplace("cim:GovGAST.r", &assign_GovGAST_r); + assign_map.emplace("cim:GovGAST.t1", &assign_GovGAST_t1); + assign_map.emplace("cim:GovGAST.t2", &assign_GovGAST_t2); + assign_map.emplace("cim:GovGAST.t3", &assign_GovGAST_t3); + assign_map.emplace("cim:GovGAST.vmax", &assign_GovGAST_vmax); + assign_map.emplace("cim:GovGAST.vmin", &assign_GovGAST_vmin); } void GovGAST::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/GovGAST.hpp b/CGMES_2.4.13_18DEC2013/GovGAST.hpp index f29598550..497af8aa8 100644 --- a/CGMES_2.4.13_18DEC2013/GovGAST.hpp +++ b/CGMES_2.4.13_18DEC2013/GovGAST.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Single shaft gas turbine. - */ + /** \brief Single shaft gas turbine. */ class GovGAST : public TurbineGovernorDynamics { public: @@ -29,16 +27,35 @@ namespace CIMPP GovGAST(); ~GovGAST() override; - CIMPP::PU at; /* Ambient temperature load limit (Load Limit). Typical Value = 1. Default: nullptr */ - CIMPP::PU dturb; /* Turbine damping factor (Dturb). Typical Value = 0.18. Default: nullptr */ - CIMPP::PU kt; /* Temperature limiter gain (Kt). Typical Value = 3. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (> 0). Default: nullptr */ - CIMPP::PU r; /* Permanent droop (R). Typical Value = 0.04. Default: nullptr */ - CIMPP::Seconds t1; /* Governor mechanism time constant (T1). T1 represents the natural valve positioning time constant of the governor for small disturbances, as seen when rate limiting is not in effect. Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds t2; /* Turbine power time constant (T2). T2 represents delay due to internal energy storage of the gas turbine engine. T2 can be used to give a rough approximation to the delay associated with acceleration of the compressor spool of a multi-shaft engine, or with the compressibility of gas in the plenum of a the free power turbine of an aero-derivative unit, for example. Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds t3; /* Turbine exhaust temperature time constant (T3). Typical Value = 3. Default: nullptr */ - CIMPP::PU vmax; /* Maximum turbine power, PU of MWbase (Vmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU vmin; /* Minimum turbine power, PU of MWbase (Vmin). Typical Value = 0. Default: nullptr */ + /** \brief Ambient temperature load limit (Load Limit). Typical Value = 1. Default: nullptr */ + CIMPP::PU at; + + /** \brief Turbine damping factor (Dturb). Typical Value = 0.18. Default: nullptr */ + CIMPP::PU dturb; + + /** \brief Temperature limiter gain (Kt). Typical Value = 3. Default: nullptr */ + CIMPP::PU kt; + + /** \brief Base for power values (MWbase) (> 0). Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Permanent droop (R). Typical Value = 0.04. Default: nullptr */ + CIMPP::PU r; + + /** \brief Governor mechanism time constant (T1). T1 represents the natural valve positioning time constant of the governor for small disturbances, as seen when rate limiting is not in effect. Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Turbine power time constant (T2). T2 represents delay due to internal energy storage of the gas turbine engine. T2 can be used to give a rough approximation to the delay associated with acceleration of the compressor spool of a multi-shaft engine, or with the compressibility of gas in the plenum of a the free power turbine of an aero-derivative unit, for example. Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Turbine exhaust temperature time constant (T3). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Maximum turbine power, PU of MWbase (Vmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU vmax; + + /** \brief Minimum turbine power, PU of MWbase (Vmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU vmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GovGAST1.cpp b/CGMES_2.4.13_18DEC2013/GovGAST1.cpp index 10ed047f3..4acaed7db 100644 --- a/CGMES_2.4.13_18DEC2013/GovGAST1.cpp +++ b/CGMES_2.4.13_18DEC2013/GovGAST1.cpp @@ -8,45 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Frequency.hpp" -#include "ActivePower.hpp" -#include "Frequency.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -GovGAST1::GovGAST1() {}; -GovGAST1::~GovGAST1() {}; +GovGAST1::GovGAST1() {} +GovGAST1::~GovGAST1() {} static const std::list PossibleProfilesForClass = { @@ -106,454 +72,486 @@ GovGAST1::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovGAST1_a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_a(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_b(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_eps(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eps; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_fidle(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_fidle(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fidle; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_gv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_kt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_kt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_lmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_lmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_loadinc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_loadinc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->loadinc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_ltrate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_ltrate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ltrate; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_pgv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_rmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_rmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_tltr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_tltr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tltr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_vmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_vmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovGAST1_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a; if (!buffer.str().empty()) @@ -567,7 +565,8 @@ bool get_GovGAST1_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b; if (!buffer.str().empty()) @@ -581,7 +580,8 @@ bool get_GovGAST1_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -595,7 +595,8 @@ bool get_GovGAST1_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST1_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -609,7 +610,8 @@ bool get_GovGAST1_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST1_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eps; if (!buffer.str().empty()) @@ -623,7 +625,8 @@ bool get_GovGAST1_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST1_fidle(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fidle; if (!buffer.str().empty()) @@ -637,7 +640,8 @@ bool get_GovGAST1_fidle(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovGAST1_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -651,7 +655,8 @@ bool get_GovGAST1_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST1_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -665,7 +670,8 @@ bool get_GovGAST1_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST1_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -679,7 +685,8 @@ bool get_GovGAST1_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST1_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -693,7 +700,8 @@ bool get_GovGAST1_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST1_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -707,7 +715,8 @@ bool get_GovGAST1_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST1_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv6; if (!buffer.str().empty()) @@ -721,7 +730,8 @@ bool get_GovGAST1_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST1_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -735,7 +745,8 @@ bool get_GovGAST1_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_kt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kt; if (!buffer.str().empty()) @@ -749,7 +760,8 @@ bool get_GovGAST1_kt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_lmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lmax; if (!buffer.str().empty()) @@ -763,7 +775,8 @@ bool get_GovGAST1_lmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_loadinc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->loadinc; if (!buffer.str().empty()) @@ -777,7 +790,8 @@ bool get_GovGAST1_loadinc(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovGAST1_ltrate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ltrate; if (!buffer.str().empty()) @@ -791,7 +805,8 @@ bool get_GovGAST1_ltrate(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovGAST1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -805,7 +820,8 @@ bool get_GovGAST1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovGAST1_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -819,7 +835,8 @@ bool get_GovGAST1_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -833,7 +850,8 @@ bool get_GovGAST1_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -847,7 +865,8 @@ bool get_GovGAST1_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -861,7 +880,8 @@ bool get_GovGAST1_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -875,7 +895,8 @@ bool get_GovGAST1_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv6; if (!buffer.str().empty()) @@ -889,7 +910,8 @@ bool get_GovGAST1_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -903,7 +925,8 @@ bool get_GovGAST1_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_rmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rmax; if (!buffer.str().empty()) @@ -917,7 +940,8 @@ bool get_GovGAST1_rmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -931,7 +955,8 @@ bool get_GovGAST1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -945,7 +970,8 @@ bool get_GovGAST1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -959,7 +985,8 @@ bool get_GovGAST1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -973,7 +1000,8 @@ bool get_GovGAST1_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -987,7 +1015,8 @@ bool get_GovGAST1_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_tltr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tltr; if (!buffer.str().empty()) @@ -1001,7 +1030,8 @@ bool get_GovGAST1_tltr(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmax; if (!buffer.str().empty()) @@ -1015,7 +1045,8 @@ bool get_GovGAST1_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmin; if (!buffer.str().empty()) @@ -1027,8 +1058,6 @@ bool get_GovGAST1_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char GovGAST1::debugName[] = "GovGAST1"; const char* GovGAST1::debugString() const { @@ -1037,45 +1066,45 @@ const char* GovGAST1::debugString() const void GovGAST1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovGAST1"), &GovGAST1_factory)); + factory_map.emplace("cim:GovGAST1", &GovGAST1_factory); } void GovGAST1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.a"), &assign_GovGAST1_a)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.b"), &assign_GovGAST1_b)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.db1"), &assign_GovGAST1_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.db2"), &assign_GovGAST1_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.eps"), &assign_GovGAST1_eps)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.fidle"), &assign_GovGAST1_fidle)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.gv1"), &assign_GovGAST1_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.gv2"), &assign_GovGAST1_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.gv3"), &assign_GovGAST1_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.gv4"), &assign_GovGAST1_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.gv5"), &assign_GovGAST1_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.gv6"), &assign_GovGAST1_gv6)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.ka"), &assign_GovGAST1_ka)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.kt"), &assign_GovGAST1_kt)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.lmax"), &assign_GovGAST1_lmax)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.loadinc"), &assign_GovGAST1_loadinc)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.ltrate"), &assign_GovGAST1_ltrate)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.mwbase"), &assign_GovGAST1_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.pgv1"), &assign_GovGAST1_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.pgv2"), &assign_GovGAST1_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.pgv3"), &assign_GovGAST1_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.pgv4"), &assign_GovGAST1_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.pgv5"), &assign_GovGAST1_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.pgv6"), &assign_GovGAST1_pgv6)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.r"), &assign_GovGAST1_r)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.rmax"), &assign_GovGAST1_rmax)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.t1"), &assign_GovGAST1_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.t2"), &assign_GovGAST1_t2)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.t3"), &assign_GovGAST1_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.t4"), &assign_GovGAST1_t4)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.t5"), &assign_GovGAST1_t5)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.tltr"), &assign_GovGAST1_tltr)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.vmax"), &assign_GovGAST1_vmax)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.vmin"), &assign_GovGAST1_vmin)); + assign_map.emplace("cim:GovGAST1.a", &assign_GovGAST1_a); + assign_map.emplace("cim:GovGAST1.b", &assign_GovGAST1_b); + assign_map.emplace("cim:GovGAST1.db1", &assign_GovGAST1_db1); + assign_map.emplace("cim:GovGAST1.db2", &assign_GovGAST1_db2); + assign_map.emplace("cim:GovGAST1.eps", &assign_GovGAST1_eps); + assign_map.emplace("cim:GovGAST1.fidle", &assign_GovGAST1_fidle); + assign_map.emplace("cim:GovGAST1.gv1", &assign_GovGAST1_gv1); + assign_map.emplace("cim:GovGAST1.gv2", &assign_GovGAST1_gv2); + assign_map.emplace("cim:GovGAST1.gv3", &assign_GovGAST1_gv3); + assign_map.emplace("cim:GovGAST1.gv4", &assign_GovGAST1_gv4); + assign_map.emplace("cim:GovGAST1.gv5", &assign_GovGAST1_gv5); + assign_map.emplace("cim:GovGAST1.gv6", &assign_GovGAST1_gv6); + assign_map.emplace("cim:GovGAST1.ka", &assign_GovGAST1_ka); + assign_map.emplace("cim:GovGAST1.kt", &assign_GovGAST1_kt); + assign_map.emplace("cim:GovGAST1.lmax", &assign_GovGAST1_lmax); + assign_map.emplace("cim:GovGAST1.loadinc", &assign_GovGAST1_loadinc); + assign_map.emplace("cim:GovGAST1.ltrate", &assign_GovGAST1_ltrate); + assign_map.emplace("cim:GovGAST1.mwbase", &assign_GovGAST1_mwbase); + assign_map.emplace("cim:GovGAST1.pgv1", &assign_GovGAST1_pgv1); + assign_map.emplace("cim:GovGAST1.pgv2", &assign_GovGAST1_pgv2); + assign_map.emplace("cim:GovGAST1.pgv3", &assign_GovGAST1_pgv3); + assign_map.emplace("cim:GovGAST1.pgv4", &assign_GovGAST1_pgv4); + assign_map.emplace("cim:GovGAST1.pgv5", &assign_GovGAST1_pgv5); + assign_map.emplace("cim:GovGAST1.pgv6", &assign_GovGAST1_pgv6); + assign_map.emplace("cim:GovGAST1.r", &assign_GovGAST1_r); + assign_map.emplace("cim:GovGAST1.rmax", &assign_GovGAST1_rmax); + assign_map.emplace("cim:GovGAST1.t1", &assign_GovGAST1_t1); + assign_map.emplace("cim:GovGAST1.t2", &assign_GovGAST1_t2); + assign_map.emplace("cim:GovGAST1.t3", &assign_GovGAST1_t3); + assign_map.emplace("cim:GovGAST1.t4", &assign_GovGAST1_t4); + assign_map.emplace("cim:GovGAST1.t5", &assign_GovGAST1_t5); + assign_map.emplace("cim:GovGAST1.tltr", &assign_GovGAST1_tltr); + assign_map.emplace("cim:GovGAST1.vmax", &assign_GovGAST1_vmax); + assign_map.emplace("cim:GovGAST1.vmin", &assign_GovGAST1_vmin); } void GovGAST1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/GovGAST1.hpp b/CGMES_2.4.13_18DEC2013/GovGAST1.hpp index 6a950664b..2eaf845e2 100644 --- a/CGMES_2.4.13_18DEC2013/GovGAST1.hpp +++ b/CGMES_2.4.13_18DEC2013/GovGAST1.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified single shaft gas turbine. - */ + /** \brief Modified single shaft gas turbine. */ class GovGAST1 : public TurbineGovernorDynamics { public: @@ -31,40 +29,107 @@ namespace CIMPP GovGAST1(); ~GovGAST1() override; - CIMPP::Simple_Float a; /* Turbine power time constant numerator scale factor (a). Typical Value = 0.8. Default: nullptr */ - CIMPP::Simple_Float b; /* Turbine power time constant denominator scale factor (b). Typical Value = 1. Default: nullptr */ - CIMPP::Frequency db1; /* Intentional dead-band width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower db2; /* Unintentional dead-band (db2). Unit = MW. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency eps; /* Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::PU fidle; /* Fuel flow at zero power output (Fidle). Typical Value = 0.18. Default: nullptr */ - CIMPP::PU gv1; /* Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain point 2,PU gv (Gv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv6; /* Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU ka; /* Governor gain (Ka). Typical Value = 0. Default: nullptr */ - CIMPP::PU kt; /* Temperature limiter gain (Kt). Typical Value = 3. Default: nullptr */ - CIMPP::PU lmax; /* Ambient temperature load limit (Lmax). Lmax is the turbine power output corresponding to the limiting exhaust gas temperature. Typical Value = 1. Default: nullptr */ - CIMPP::PU loadinc; /* Valve position change allowed at fast rate (Loadinc). Typical Value = 0.05. Default: nullptr */ - CIMPP::Simple_Float ltrate; /* Maximum long term fuel valve opening rate (Ltrate). Typical Value = 0.02. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv6; /* Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU r; /* Permanent droop (R). Typical Value = 0.04. Default: nullptr */ - CIMPP::Simple_Float rmax; /* Maximum fuel valve opening rate (Rmax). Unit = PU/sec. Typical Value = 1. Default: nullptr */ - CIMPP::Seconds t1; /* Governor mechanism time constant (T1). T1 represents the natural valve positioning time constant of the governor for small disturbances, as seen when rate limiting is not in effect. Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds t2; /* Turbine power time constant (T2). T2 represents delay due to internal energy storage of the gas turbine engine. T2 can be used to give a rough approximation to the delay associated with acceleration of the compressor spool of a multi-shaft engine, or with the compressibility of gas in the plenum of the free power turbine of an aero-derivative unit, for example. Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds t3; /* Turbine exhaust temperature time constant (T3). T3 represents delay in the exhaust temperature and load limiting system. Typical Value = 3. Default: nullptr */ - CIMPP::Seconds t4; /* Governor lead time constant (T4). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t5; /* Governor lag time constant (T5). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tltr; /* Valve position averaging time constant (Tltr). Typical Value = 10. Default: nullptr */ - CIMPP::PU vmax; /* Maximum turbine power, PU of MWbase (Vmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU vmin; /* Minimum turbine power, PU of MWbase (Vmin). Typical Value = 0. Default: nullptr */ + /** \brief Turbine power time constant numerator scale factor (a). Typical Value = 0.8. Default: nullptr */ + CIMPP::Simple_Float a; + + /** \brief Turbine power time constant denominator scale factor (b). Typical Value = 1. Default: nullptr */ + CIMPP::Simple_Float b; + + /** \brief Intentional dead-band width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Unintentional dead-band (db2). Unit = MW. Typical Value = 0. Default: nullptr */ + CIMPP::ActivePower db2; + + /** \brief Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency eps; + + /** \brief Fuel flow at zero power output (Fidle). Typical Value = 0.18. Default: nullptr */ + CIMPP::PU fidle; + + /** \brief Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain point 2,PU gv (Gv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv6; + + /** \brief Governor gain (Ka). Typical Value = 0. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Temperature limiter gain (Kt). Typical Value = 3. Default: nullptr */ + CIMPP::PU kt; + + /** \brief Ambient temperature load limit (Lmax). Lmax is the turbine power output corresponding to the limiting exhaust gas temperature. Typical Value = 1. Default: nullptr */ + CIMPP::PU lmax; + + /** \brief Valve position change allowed at fast rate (Loadinc). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU loadinc; + + /** \brief Maximum long term fuel valve opening rate (Ltrate). Typical Value = 0.02. Default: nullptr */ + CIMPP::Simple_Float ltrate; + + /** \brief Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv6; + + /** \brief Permanent droop (R). Typical Value = 0.04. Default: nullptr */ + CIMPP::PU r; + + /** \brief Maximum fuel valve opening rate (Rmax). Unit = PU/sec. Typical Value = 1. Default: nullptr */ + CIMPP::Simple_Float rmax; + + /** \brief Governor mechanism time constant (T1). T1 represents the natural valve positioning time constant of the governor for small disturbances, as seen when rate limiting is not in effect. Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Turbine power time constant (T2). T2 represents delay due to internal energy storage of the gas turbine engine. T2 can be used to give a rough approximation to the delay associated with acceleration of the compressor spool of a multi-shaft engine, or with the compressibility of gas in the plenum of the free power turbine of an aero-derivative unit, for example. Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Turbine exhaust temperature time constant (T3). T3 represents delay in the exhaust temperature and load limiting system. Typical Value = 3. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Governor lead time constant (T4). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Governor lag time constant (T5). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Valve position averaging time constant (Tltr). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds tltr; + + /** \brief Maximum turbine power, PU of MWbase (Vmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU vmax; + + /** \brief Minimum turbine power, PU of MWbase (Vmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU vmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GovGAST2.cpp b/CGMES_2.4.13_18DEC2013/GovGAST2.cpp index fae415955..c78ffe45c 100644 --- a/CGMES_2.4.13_18DEC2013/GovGAST2.cpp +++ b/CGMES_2.4.13_18DEC2013/GovGAST2.cpp @@ -8,43 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Temperature.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Temperature.hpp" -#include "ActivePower.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" using namespace CIMPP; -GovGAST2::GovGAST2() {}; -GovGAST2::~GovGAST2() {}; +GovGAST2::GovGAST2() {} +GovGAST2::~GovGAST2() {} static const std::list PossibleProfilesForClass = { @@ -102,428 +70,458 @@ GovGAST2::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovGAST2_a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_a(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_af1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_af1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->af1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_af2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_af2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->af2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_b(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_bf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_bf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_bf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_bf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_c(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_c(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->c; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_cf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_cf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->cf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_ecr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_ecr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ecr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_etd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_etd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->etd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_k4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_k5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_k5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_k6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_k6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_t(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_t(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_tcd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_tcd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tcd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_tmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_tmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_tmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_tmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_trate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_trate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->trate; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_tt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_w(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_w(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->w; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_x(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_y(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_y(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->y; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_z(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_z(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->z; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovGAST2_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a; if (!buffer.str().empty()) @@ -537,7 +535,8 @@ bool get_GovGAST2_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_af1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->af1; if (!buffer.str().empty()) @@ -551,7 +550,8 @@ bool get_GovGAST2_af1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST2_af2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->af2; if (!buffer.str().empty()) @@ -565,7 +565,8 @@ bool get_GovGAST2_af2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST2_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b; if (!buffer.str().empty()) @@ -579,7 +580,8 @@ bool get_GovGAST2_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_bf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bf1; if (!buffer.str().empty()) @@ -593,7 +595,8 @@ bool get_GovGAST2_bf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST2_bf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bf2; if (!buffer.str().empty()) @@ -607,7 +610,8 @@ bool get_GovGAST2_bf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST2_c(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->c; if (!buffer.str().empty()) @@ -621,7 +625,8 @@ bool get_GovGAST2_c(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_cf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->cf2; if (!buffer.str().empty()) @@ -635,7 +640,8 @@ bool get_GovGAST2_cf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST2_ecr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ecr; if (!buffer.str().empty()) @@ -649,7 +655,8 @@ bool get_GovGAST2_ecr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST2_etd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->etd; if (!buffer.str().empty()) @@ -663,7 +670,8 @@ bool get_GovGAST2_etd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST2_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -677,7 +685,8 @@ bool get_GovGAST2_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k4; if (!buffer.str().empty()) @@ -691,7 +700,8 @@ bool get_GovGAST2_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k5; if (!buffer.str().empty()) @@ -705,7 +715,8 @@ bool get_GovGAST2_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_k6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k6; if (!buffer.str().empty()) @@ -719,7 +730,8 @@ bool get_GovGAST2_k6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -733,7 +745,8 @@ bool get_GovGAST2_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -747,7 +760,8 @@ bool get_GovGAST2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovGAST2_t(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t; if (!buffer.str().empty()) @@ -761,7 +775,8 @@ bool get_GovGAST2_t(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -775,7 +790,8 @@ bool get_GovGAST2_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -789,7 +805,8 @@ bool get_GovGAST2_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -803,7 +820,8 @@ bool get_GovGAST2_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -817,7 +835,8 @@ bool get_GovGAST2_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_tcd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tcd; if (!buffer.str().empty()) @@ -831,7 +850,8 @@ bool get_GovGAST2_tcd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST2_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -845,7 +865,8 @@ bool get_GovGAST2_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_tmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tmax; if (!buffer.str().empty()) @@ -859,7 +880,8 @@ bool get_GovGAST2_tmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST2_tmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tmin; if (!buffer.str().empty()) @@ -873,7 +895,8 @@ bool get_GovGAST2_tmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST2_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -887,7 +910,8 @@ bool get_GovGAST2_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_trate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->trate; if (!buffer.str().empty()) @@ -901,7 +925,8 @@ bool get_GovGAST2_trate(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovGAST2_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tt; if (!buffer.str().empty()) @@ -915,7 +940,8 @@ bool get_GovGAST2_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_w(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->w; if (!buffer.str().empty()) @@ -929,7 +955,8 @@ bool get_GovGAST2_w(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x; if (!buffer.str().empty()) @@ -943,7 +970,8 @@ bool get_GovGAST2_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_y(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->y; if (!buffer.str().empty()) @@ -957,7 +985,8 @@ bool get_GovGAST2_y(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_z(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->z; if (!buffer.str().empty()) @@ -969,8 +998,6 @@ bool get_GovGAST2_z(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char GovGAST2::debugName[] = "GovGAST2"; const char* GovGAST2::debugString() const { @@ -979,43 +1006,43 @@ const char* GovGAST2::debugString() const void GovGAST2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovGAST2"), &GovGAST2_factory)); + factory_map.emplace("cim:GovGAST2", &GovGAST2_factory); } void GovGAST2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.a"), &assign_GovGAST2_a)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.af1"), &assign_GovGAST2_af1)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.af2"), &assign_GovGAST2_af2)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.b"), &assign_GovGAST2_b)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.bf1"), &assign_GovGAST2_bf1)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.bf2"), &assign_GovGAST2_bf2)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.c"), &assign_GovGAST2_c)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.cf2"), &assign_GovGAST2_cf2)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.ecr"), &assign_GovGAST2_ecr)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.etd"), &assign_GovGAST2_etd)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.k3"), &assign_GovGAST2_k3)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.k4"), &assign_GovGAST2_k4)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.k5"), &assign_GovGAST2_k5)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.k6"), &assign_GovGAST2_k6)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.kf"), &assign_GovGAST2_kf)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.mwbase"), &assign_GovGAST2_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.t"), &assign_GovGAST2_t)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.t3"), &assign_GovGAST2_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.t4"), &assign_GovGAST2_t4)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.t5"), &assign_GovGAST2_t5)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.tc"), &assign_GovGAST2_tc)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.tcd"), &assign_GovGAST2_tcd)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.tf"), &assign_GovGAST2_tf)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.tmax"), &assign_GovGAST2_tmax)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.tmin"), &assign_GovGAST2_tmin)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.tr"), &assign_GovGAST2_tr)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.trate"), &assign_GovGAST2_trate)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.tt"), &assign_GovGAST2_tt)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.w"), &assign_GovGAST2_w)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.x"), &assign_GovGAST2_x)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.y"), &assign_GovGAST2_y)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.z"), &assign_GovGAST2_z)); + assign_map.emplace("cim:GovGAST2.a", &assign_GovGAST2_a); + assign_map.emplace("cim:GovGAST2.af1", &assign_GovGAST2_af1); + assign_map.emplace("cim:GovGAST2.af2", &assign_GovGAST2_af2); + assign_map.emplace("cim:GovGAST2.b", &assign_GovGAST2_b); + assign_map.emplace("cim:GovGAST2.bf1", &assign_GovGAST2_bf1); + assign_map.emplace("cim:GovGAST2.bf2", &assign_GovGAST2_bf2); + assign_map.emplace("cim:GovGAST2.c", &assign_GovGAST2_c); + assign_map.emplace("cim:GovGAST2.cf2", &assign_GovGAST2_cf2); + assign_map.emplace("cim:GovGAST2.ecr", &assign_GovGAST2_ecr); + assign_map.emplace("cim:GovGAST2.etd", &assign_GovGAST2_etd); + assign_map.emplace("cim:GovGAST2.k3", &assign_GovGAST2_k3); + assign_map.emplace("cim:GovGAST2.k4", &assign_GovGAST2_k4); + assign_map.emplace("cim:GovGAST2.k5", &assign_GovGAST2_k5); + assign_map.emplace("cim:GovGAST2.k6", &assign_GovGAST2_k6); + assign_map.emplace("cim:GovGAST2.kf", &assign_GovGAST2_kf); + assign_map.emplace("cim:GovGAST2.mwbase", &assign_GovGAST2_mwbase); + assign_map.emplace("cim:GovGAST2.t", &assign_GovGAST2_t); + assign_map.emplace("cim:GovGAST2.t3", &assign_GovGAST2_t3); + assign_map.emplace("cim:GovGAST2.t4", &assign_GovGAST2_t4); + assign_map.emplace("cim:GovGAST2.t5", &assign_GovGAST2_t5); + assign_map.emplace("cim:GovGAST2.tc", &assign_GovGAST2_tc); + assign_map.emplace("cim:GovGAST2.tcd", &assign_GovGAST2_tcd); + assign_map.emplace("cim:GovGAST2.tf", &assign_GovGAST2_tf); + assign_map.emplace("cim:GovGAST2.tmax", &assign_GovGAST2_tmax); + assign_map.emplace("cim:GovGAST2.tmin", &assign_GovGAST2_tmin); + assign_map.emplace("cim:GovGAST2.tr", &assign_GovGAST2_tr); + assign_map.emplace("cim:GovGAST2.trate", &assign_GovGAST2_trate); + assign_map.emplace("cim:GovGAST2.tt", &assign_GovGAST2_tt); + assign_map.emplace("cim:GovGAST2.w", &assign_GovGAST2_w); + assign_map.emplace("cim:GovGAST2.x", &assign_GovGAST2_x); + assign_map.emplace("cim:GovGAST2.y", &assign_GovGAST2_y); + assign_map.emplace("cim:GovGAST2.z", &assign_GovGAST2_z); } void GovGAST2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/GovGAST2.hpp b/CGMES_2.4.13_18DEC2013/GovGAST2.hpp index d761848e3..37de9cf50 100644 --- a/CGMES_2.4.13_18DEC2013/GovGAST2.hpp +++ b/CGMES_2.4.13_18DEC2013/GovGAST2.hpp @@ -22,9 +22,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Gas turbine model. - */ + /** \brief Gas turbine model. */ class GovGAST2 : public TurbineGovernorDynamics { public: @@ -32,38 +30,101 @@ namespace CIMPP GovGAST2(); ~GovGAST2() override; - CIMPP::Simple_Float a; /* Valve positioner (A). Default: nullptr */ - CIMPP::PU af1; /* Exhaust temperature Parameter (Af1). Unit = per unit temperature. Based on temperature in degrees C. Default: nullptr */ - CIMPP::PU af2; /* Coefficient equal to 0.5(1-speed) (Af2). Default: nullptr */ - CIMPP::Simple_Float b; /* Valve positioner (B). Default: nullptr */ - CIMPP::PU bf1; /* (Bf1). Bf1 = E(1-w) where E (speed sensitivity coefficient) is 0.55 to 0.65 x Tr. Unit = per unit temperature. Based on temperature in degrees C. Default: nullptr */ - CIMPP::PU bf2; /* Turbine Torque Coefficient K (depends on heating value of fuel stream in combustion chamber) (Bf2). Default: nullptr */ - CIMPP::Simple_Float c; /* Valve positioner (C). Default: nullptr */ - CIMPP::PU cf2; /* Coefficient defining fuel flow where power output is 0% (Cf2). Synchronous but no output. Typically 0.23 x K (23% fuel flow). Default: nullptr */ - CIMPP::Seconds ecr; /* Combustion reaction time delay (Ecr). Default: nullptr */ - CIMPP::Seconds etd; /* Turbine and exhaust delay (Etd). Default: nullptr */ - CIMPP::PU k3; /* Ratio of Fuel Adjustment (K3). Default: nullptr */ - CIMPP::PU k4; /* Gain of radiation shield (K4). Default: nullptr */ - CIMPP::PU k5; /* Gain of radiation shield (K5). Default: nullptr */ - CIMPP::PU k6; /* Minimum fuel flow (K6). Default: nullptr */ - CIMPP::PU kf; /* Fuel system feedback (Kf). Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ - CIMPP::Seconds t; /* Fuel Control Time Constant (T). Default: nullptr */ - CIMPP::Seconds t3; /* Radiation shield time constant (T3). Default: nullptr */ - CIMPP::Seconds t4; /* Thermocouple time constant (T4). Default: nullptr */ - CIMPP::Seconds t5; /* Temperature control time constant (T5). Default: nullptr */ - CIMPP::Temperature tc; /* Temperature control (Tc). Unit = [SYMBOL REMOVED]F or [SYMBOL REMOVED]C depending on constants Af1 and Bf1. Default: nullptr */ - CIMPP::Seconds tcd; /* Compressor discharge time constant (Tcd). Default: nullptr */ - CIMPP::Seconds tf; /* Fuel system time constant (Tf). Default: nullptr */ - CIMPP::PU tmax; /* Maximum Turbine limit (Tmax). Default: nullptr */ - CIMPP::PU tmin; /* Minimum Turbine limit (Tmin). Default: nullptr */ - CIMPP::Temperature tr; /* Rated temperature (Tr). Unit = [SYMBOL REMOVED]C depending on parameters Af1 and Bf1. Default: nullptr */ - CIMPP::ActivePower trate; /* Turbine rating (Trate). Unit = MW. Default: nullptr */ - CIMPP::Seconds tt; /* Temperature controller integration rate (Tt). Default: nullptr */ - CIMPP::PU w; /* Governor gain (1/droop) on turbine rating (W). Default: nullptr */ - CIMPP::Seconds x; /* Governor lead time constant (X). Default: nullptr */ - CIMPP::Seconds y; /* Governor lag time constant (Y) (>0). Default: nullptr */ - CIMPP::Boolean z; /* Governor mode (Z). true = Droop false = ISO. Default: false */ + /** \brief Valve positioner (A). Default: nullptr */ + CIMPP::Simple_Float a; + + /** \brief Exhaust temperature Parameter (Af1). Unit = per unit temperature. Based on temperature in degrees C. Default: nullptr */ + CIMPP::PU af1; + + /** \brief Coefficient equal to 0.5(1-speed) (Af2). Default: nullptr */ + CIMPP::PU af2; + + /** \brief Valve positioner (B). Default: nullptr */ + CIMPP::Simple_Float b; + + /** \brief (Bf1). Bf1 = E(1-w) where E (speed sensitivity coefficient) is 0.55 to 0.65 x Tr. Unit = per unit temperature. Based on temperature in degrees C. Default: nullptr */ + CIMPP::PU bf1; + + /** \brief Turbine Torque Coefficient K (depends on heating value of fuel stream in combustion chamber) (Bf2). Default: nullptr */ + CIMPP::PU bf2; + + /** \brief Valve positioner (C). Default: nullptr */ + CIMPP::Simple_Float c; + + /** \brief Coefficient defining fuel flow where power output is 0% (Cf2). Synchronous but no output. Typically 0.23 x K (23% fuel flow). Default: nullptr */ + CIMPP::PU cf2; + + /** \brief Combustion reaction time delay (Ecr). Default: nullptr */ + CIMPP::Seconds ecr; + + /** \brief Turbine and exhaust delay (Etd). Default: nullptr */ + CIMPP::Seconds etd; + + /** \brief Ratio of Fuel Adjustment (K3). Default: nullptr */ + CIMPP::PU k3; + + /** \brief Gain of radiation shield (K4). Default: nullptr */ + CIMPP::PU k4; + + /** \brief Gain of radiation shield (K5). Default: nullptr */ + CIMPP::PU k5; + + /** \brief Minimum fuel flow (K6). Default: nullptr */ + CIMPP::PU k6; + + /** \brief Fuel system feedback (Kf). Default: nullptr */ + CIMPP::PU kf; + + /** \brief Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Fuel Control Time Constant (T). Default: nullptr */ + CIMPP::Seconds t; + + /** \brief Radiation shield time constant (T3). Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Thermocouple time constant (T4). Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Temperature control time constant (T5). Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Temperature control (Tc). Unit = [SYMBOL REMOVED]F or [SYMBOL REMOVED]C depending on constants Af1 and Bf1. Default: nullptr */ + CIMPP::Temperature tc; + + /** \brief Compressor discharge time constant (Tcd). Default: nullptr */ + CIMPP::Seconds tcd; + + /** \brief Fuel system time constant (Tf). Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum Turbine limit (Tmax). Default: nullptr */ + CIMPP::PU tmax; + + /** \brief Minimum Turbine limit (Tmin). Default: nullptr */ + CIMPP::PU tmin; + + /** \brief Rated temperature (Tr). Unit = [SYMBOL REMOVED]C depending on parameters Af1 and Bf1. Default: nullptr */ + CIMPP::Temperature tr; + + /** \brief Turbine rating (Trate). Unit = MW. Default: nullptr */ + CIMPP::ActivePower trate; + + /** \brief Temperature controller integration rate (Tt). Default: nullptr */ + CIMPP::Seconds tt; + + /** \brief Governor gain (1/droop) on turbine rating (W). Default: nullptr */ + CIMPP::PU w; + + /** \brief Governor lead time constant (X). Default: nullptr */ + CIMPP::Seconds x; + + /** \brief Governor lag time constant (Y) (>0). Default: nullptr */ + CIMPP::Seconds y; + + /** \brief Governor mode (Z). true = Droop false = ISO. Default: false */ + CIMPP::Boolean z; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GovGAST3.cpp b/CGMES_2.4.13_18DEC2013/GovGAST3.cpp index 31493116e..d80998b75 100644 --- a/CGMES_2.4.13_18DEC2013/GovGAST3.cpp +++ b/CGMES_2.4.13_18DEC2013/GovGAST3.cpp @@ -8,32 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Temperature.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Temperature.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Temperature.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -GovGAST3::GovGAST3() {}; -GovGAST3::~GovGAST3() {}; +GovGAST3::GovGAST3() {} +GovGAST3::~GovGAST3() {} static const std::list PossibleProfilesForClass = { @@ -80,285 +59,304 @@ GovGAST3::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovGAST3_bca(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_bca(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bca; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_bp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_bp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_dtc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_dtc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dtc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_kac(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_kac(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kac; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_kca(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_kca(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kca; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_ksi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_ksi(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ksi; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_ky(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_ky(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ky; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_mnef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_mnef(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mnef; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_mxef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_mxef(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mxef; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_rcmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_rcmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rcmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_rcmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_rcmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rcmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_tac(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_tac(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tac; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_tfen(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_tfen(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tfen; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_tsi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_tsi(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tsi; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_tt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_ttc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_ttc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ttc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_ty(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_ty(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ty; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovGAST3_bca(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bca; if (!buffer.str().empty()) @@ -372,7 +370,8 @@ bool get_GovGAST3_bca(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST3_bp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bp; if (!buffer.str().empty()) @@ -386,7 +385,8 @@ bool get_GovGAST3_bp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST3_dtc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dtc; if (!buffer.str().empty()) @@ -400,7 +400,8 @@ bool get_GovGAST3_dtc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST3_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -414,7 +415,8 @@ bool get_GovGAST3_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST3_kac(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kac; if (!buffer.str().empty()) @@ -428,7 +430,8 @@ bool get_GovGAST3_kac(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST3_kca(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kca; if (!buffer.str().empty()) @@ -442,7 +445,8 @@ bool get_GovGAST3_kca(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST3_ksi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ksi; if (!buffer.str().empty()) @@ -456,7 +460,8 @@ bool get_GovGAST3_ksi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST3_ky(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ky; if (!buffer.str().empty()) @@ -470,7 +475,8 @@ bool get_GovGAST3_ky(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST3_mnef(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mnef; if (!buffer.str().empty()) @@ -484,7 +490,8 @@ bool get_GovGAST3_mnef(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST3_mxef(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mxef; if (!buffer.str().empty()) @@ -498,7 +505,8 @@ bool get_GovGAST3_mxef(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST3_rcmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rcmn; if (!buffer.str().empty()) @@ -512,7 +520,8 @@ bool get_GovGAST3_rcmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST3_rcmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rcmx; if (!buffer.str().empty()) @@ -526,7 +535,8 @@ bool get_GovGAST3_rcmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST3_tac(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tac; if (!buffer.str().empty()) @@ -540,7 +550,8 @@ bool get_GovGAST3_tac(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST3_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -554,7 +565,8 @@ bool get_GovGAST3_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST3_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -568,7 +580,8 @@ bool get_GovGAST3_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST3_tfen(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tfen; if (!buffer.str().empty()) @@ -582,7 +595,8 @@ bool get_GovGAST3_tfen(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST3_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -596,7 +610,8 @@ bool get_GovGAST3_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST3_tsi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tsi; if (!buffer.str().empty()) @@ -610,7 +625,8 @@ bool get_GovGAST3_tsi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST3_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tt; if (!buffer.str().empty()) @@ -624,7 +640,8 @@ bool get_GovGAST3_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST3_ttc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ttc; if (!buffer.str().empty()) @@ -638,7 +655,8 @@ bool get_GovGAST3_ttc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST3_ty(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ty; if (!buffer.str().empty()) @@ -650,8 +668,6 @@ bool get_GovGAST3_ty(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char GovGAST3::debugName[] = "GovGAST3"; const char* GovGAST3::debugString() const { @@ -660,32 +676,32 @@ const char* GovGAST3::debugString() const void GovGAST3::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovGAST3"), &GovGAST3_factory)); + factory_map.emplace("cim:GovGAST3", &GovGAST3_factory); } void GovGAST3::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.bca"), &assign_GovGAST3_bca)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.bp"), &assign_GovGAST3_bp)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.dtc"), &assign_GovGAST3_dtc)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.ka"), &assign_GovGAST3_ka)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.kac"), &assign_GovGAST3_kac)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.kca"), &assign_GovGAST3_kca)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.ksi"), &assign_GovGAST3_ksi)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.ky"), &assign_GovGAST3_ky)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.mnef"), &assign_GovGAST3_mnef)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.mxef"), &assign_GovGAST3_mxef)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.rcmn"), &assign_GovGAST3_rcmn)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.rcmx"), &assign_GovGAST3_rcmx)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.tac"), &assign_GovGAST3_tac)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.tc"), &assign_GovGAST3_tc)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.td"), &assign_GovGAST3_td)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.tfen"), &assign_GovGAST3_tfen)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.tg"), &assign_GovGAST3_tg)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.tsi"), &assign_GovGAST3_tsi)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.tt"), &assign_GovGAST3_tt)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.ttc"), &assign_GovGAST3_ttc)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.ty"), &assign_GovGAST3_ty)); + assign_map.emplace("cim:GovGAST3.bca", &assign_GovGAST3_bca); + assign_map.emplace("cim:GovGAST3.bp", &assign_GovGAST3_bp); + assign_map.emplace("cim:GovGAST3.dtc", &assign_GovGAST3_dtc); + assign_map.emplace("cim:GovGAST3.ka", &assign_GovGAST3_ka); + assign_map.emplace("cim:GovGAST3.kac", &assign_GovGAST3_kac); + assign_map.emplace("cim:GovGAST3.kca", &assign_GovGAST3_kca); + assign_map.emplace("cim:GovGAST3.ksi", &assign_GovGAST3_ksi); + assign_map.emplace("cim:GovGAST3.ky", &assign_GovGAST3_ky); + assign_map.emplace("cim:GovGAST3.mnef", &assign_GovGAST3_mnef); + assign_map.emplace("cim:GovGAST3.mxef", &assign_GovGAST3_mxef); + assign_map.emplace("cim:GovGAST3.rcmn", &assign_GovGAST3_rcmn); + assign_map.emplace("cim:GovGAST3.rcmx", &assign_GovGAST3_rcmx); + assign_map.emplace("cim:GovGAST3.tac", &assign_GovGAST3_tac); + assign_map.emplace("cim:GovGAST3.tc", &assign_GovGAST3_tc); + assign_map.emplace("cim:GovGAST3.td", &assign_GovGAST3_td); + assign_map.emplace("cim:GovGAST3.tfen", &assign_GovGAST3_tfen); + assign_map.emplace("cim:GovGAST3.tg", &assign_GovGAST3_tg); + assign_map.emplace("cim:GovGAST3.tsi", &assign_GovGAST3_tsi); + assign_map.emplace("cim:GovGAST3.tt", &assign_GovGAST3_tt); + assign_map.emplace("cim:GovGAST3.ttc", &assign_GovGAST3_ttc); + assign_map.emplace("cim:GovGAST3.ty", &assign_GovGAST3_ty); } void GovGAST3::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/GovGAST3.hpp b/CGMES_2.4.13_18DEC2013/GovGAST3.hpp index d943e9b85..8d460f127 100644 --- a/CGMES_2.4.13_18DEC2013/GovGAST3.hpp +++ b/CGMES_2.4.13_18DEC2013/GovGAST3.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Generic turbogas with acceleration and temperature controller. - */ + /** \brief Generic turbogas with acceleration and temperature controller. */ class GovGAST3 : public TurbineGovernorDynamics { public: @@ -30,27 +28,68 @@ namespace CIMPP GovGAST3(); ~GovGAST3() override; - CIMPP::Simple_Float bca; /* Acceleration limit set-point (Bca). Unit = 1/s. Typical Value = 0.01. Default: nullptr */ - CIMPP::PU bp; /* Droop (bp). Typical Value = 0.05. Default: nullptr */ - CIMPP::Temperature dtc; /* Exhaust temperature variation due to fuel flow increasing from 0 to 1 PU (deltaTc). Typical Value = 390. Default: nullptr */ - CIMPP::PU ka; /* Minimum fuel flow (Ka). Typical Value = 0.23. Default: nullptr */ - CIMPP::Simple_Float kac; /* Fuel system feedback (K). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float kca; /* Acceleration control integral gain (Kca). Unit = 1/s. Typical Value = 100. Default: nullptr */ - CIMPP::Simple_Float ksi; /* Gain of radiation shield (Ksi). Typical Value = 0.8. Default: nullptr */ - CIMPP::Simple_Float ky; /* Coefficient of transfer function of fuel valve positioner (Ky). Typical Value = 1. Default: nullptr */ - CIMPP::PU mnef; /* Fuel flow maximum negative error value (MN). Typical Value = -0.05. Default: nullptr */ - CIMPP::PU mxef; /* Fuel flow maximum positive error value (MX). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU rcmn; /* Minimum fuel flow (RCMN). Typical Value = -0.1. Default: nullptr */ - CIMPP::PU rcmx; /* Maximum fuel flow (RCMX). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tac; /* Fuel control time constant (Tac). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tc; /* Compressor discharge volume time constant (Tc). Typical Value = 0.2. Default: nullptr */ - CIMPP::Seconds td; /* Temperature controller derivative gain (Td). Typical Value = 3.3. Default: nullptr */ - CIMPP::Temperature tfen; /* Turbine rated exhaust temperature correspondent to Pm=1 PU (Tfen). Typical Value = 540. Default: nullptr */ - CIMPP::Seconds tg; /* Time constant of speed governor (Tg). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds tsi; /* Time constant of radiation shield (Tsi). Typical Value = 15. Default: nullptr */ - CIMPP::Temperature tt; /* Temperature controller integration rate (Tt). Typical Value = 250. Default: nullptr */ - CIMPP::Seconds ttc; /* Time constant of thermocouple (Ttc). Typical Value = 2.5. Default: nullptr */ - CIMPP::Seconds ty; /* Time constant of fuel valve positioner (Ty). Typical Value = 0.2. Default: nullptr */ + /** \brief Acceleration limit set-point (Bca). Unit = 1/s. Typical Value = 0.01. Default: nullptr */ + CIMPP::Simple_Float bca; + + /** \brief Droop (bp). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU bp; + + /** \brief Exhaust temperature variation due to fuel flow increasing from 0 to 1 PU (deltaTc). Typical Value = 390. Default: nullptr */ + CIMPP::Temperature dtc; + + /** \brief Minimum fuel flow (Ka). Typical Value = 0.23. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Fuel system feedback (K). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float kac; + + /** \brief Acceleration control integral gain (Kca). Unit = 1/s. Typical Value = 100. Default: nullptr */ + CIMPP::Simple_Float kca; + + /** \brief Gain of radiation shield (Ksi). Typical Value = 0.8. Default: nullptr */ + CIMPP::Simple_Float ksi; + + /** \brief Coefficient of transfer function of fuel valve positioner (Ky). Typical Value = 1. Default: nullptr */ + CIMPP::Simple_Float ky; + + /** \brief Fuel flow maximum negative error value (MN). Typical Value = -0.05. Default: nullptr */ + CIMPP::PU mnef; + + /** \brief Fuel flow maximum positive error value (MX). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU mxef; + + /** \brief Minimum fuel flow (RCMN). Typical Value = -0.1. Default: nullptr */ + CIMPP::PU rcmn; + + /** \brief Maximum fuel flow (RCMX). Typical Value = 1. Default: nullptr */ + CIMPP::PU rcmx; + + /** \brief Fuel control time constant (Tac). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tac; + + /** \brief Compressor discharge volume time constant (Tc). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Temperature controller derivative gain (Td). Typical Value = 3.3. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Turbine rated exhaust temperature correspondent to Pm=1 PU (Tfen). Typical Value = 540. Default: nullptr */ + CIMPP::Temperature tfen; + + /** \brief Time constant of speed governor (Tg). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Time constant of radiation shield (Tsi). Typical Value = 15. Default: nullptr */ + CIMPP::Seconds tsi; + + /** \brief Temperature controller integration rate (Tt). Typical Value = 250. Default: nullptr */ + CIMPP::Temperature tt; + + /** \brief Time constant of thermocouple (Ttc). Typical Value = 2.5. Default: nullptr */ + CIMPP::Seconds ttc; + + /** \brief Time constant of fuel valve positioner (Ty). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds ty; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GovGAST4.cpp b/CGMES_2.4.13_18DEC2013/GovGAST4.cpp index 5036fcf63..43052f31f 100644 --- a/CGMES_2.4.13_18DEC2013/GovGAST4.cpp +++ b/CGMES_2.4.13_18DEC2013/GovGAST4.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -GovGAST4::GovGAST4() {}; -GovGAST4::~GovGAST4() {}; +GovGAST4::GovGAST4() {} +GovGAST4::~GovGAST4() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ GovGAST4::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovGAST4_bp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_bp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_ktm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_ktm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ktm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_mnef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_mnef(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mnef; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_mxef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_mxef(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mxef; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_rymn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_rymn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rymn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_rymx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_rymx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rymx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_tcm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_tcm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tcm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_tm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_tm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_tv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_tv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovGAST4_bp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bp; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_GovGAST4_bp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST4_ktm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ktm; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_GovGAST4_ktm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST4_mnef(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mnef; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_GovGAST4_mnef(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST4_mxef(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mxef; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_GovGAST4_mxef(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST4_rymn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rymn; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_GovGAST4_rymn(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST4_rymx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rymx; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_GovGAST4_rymx(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST4_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_GovGAST4_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST4_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_GovGAST4_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST4_tcm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tcm; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_GovGAST4_tcm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST4_tm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tm; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_GovGAST4_tm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST4_tv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tv; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_GovGAST4_tv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char GovGAST4::debugName[] = "GovGAST4"; const char* GovGAST4::debugString() const { @@ -370,22 +376,22 @@ const char* GovGAST4::debugString() const void GovGAST4::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovGAST4"), &GovGAST4_factory)); + factory_map.emplace("cim:GovGAST4", &GovGAST4_factory); } void GovGAST4::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.bp"), &assign_GovGAST4_bp)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.ktm"), &assign_GovGAST4_ktm)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.mnef"), &assign_GovGAST4_mnef)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.mxef"), &assign_GovGAST4_mxef)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.rymn"), &assign_GovGAST4_rymn)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.rymx"), &assign_GovGAST4_rymx)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.ta"), &assign_GovGAST4_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.tc"), &assign_GovGAST4_tc)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.tcm"), &assign_GovGAST4_tcm)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.tm"), &assign_GovGAST4_tm)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.tv"), &assign_GovGAST4_tv)); + assign_map.emplace("cim:GovGAST4.bp", &assign_GovGAST4_bp); + assign_map.emplace("cim:GovGAST4.ktm", &assign_GovGAST4_ktm); + assign_map.emplace("cim:GovGAST4.mnef", &assign_GovGAST4_mnef); + assign_map.emplace("cim:GovGAST4.mxef", &assign_GovGAST4_mxef); + assign_map.emplace("cim:GovGAST4.rymn", &assign_GovGAST4_rymn); + assign_map.emplace("cim:GovGAST4.rymx", &assign_GovGAST4_rymx); + assign_map.emplace("cim:GovGAST4.ta", &assign_GovGAST4_ta); + assign_map.emplace("cim:GovGAST4.tc", &assign_GovGAST4_tc); + assign_map.emplace("cim:GovGAST4.tcm", &assign_GovGAST4_tcm); + assign_map.emplace("cim:GovGAST4.tm", &assign_GovGAST4_tm); + assign_map.emplace("cim:GovGAST4.tv", &assign_GovGAST4_tv); } void GovGAST4::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/GovGAST4.hpp b/CGMES_2.4.13_18DEC2013/GovGAST4.hpp index 901976bdd..aa017e229 100644 --- a/CGMES_2.4.13_18DEC2013/GovGAST4.hpp +++ b/CGMES_2.4.13_18DEC2013/GovGAST4.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Generic turbogas. - */ + /** \brief Generic turbogas. */ class GovGAST4 : public TurbineGovernorDynamics { public: @@ -28,17 +26,38 @@ namespace CIMPP GovGAST4(); ~GovGAST4() override; - CIMPP::PU bp; /* Droop (bp). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU ktm; /* Compressor gain (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU mnef; /* Fuel flow maximum negative error value (MN). Typical Value = -0.05. Default: nullptr */ - CIMPP::PU mxef; /* Fuel flow maximum positive error value (MX). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU rymn; /* Minimum valve opening (RYMN). Typical Value = 0. Default: nullptr */ - CIMPP::PU rymx; /* Maximum valve opening (RYMX). Typical Value = 1.1. Default: nullptr */ - CIMPP::Seconds ta; /* Maximum gate opening velocity (T). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds tc; /* Maximum gate closing velocity (T). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tcm; /* Fuel control time constant (T). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tm; /* Compressor discharge volume time constant (T). Typical Value = 0.2. Default: nullptr */ - CIMPP::Seconds tv; /* Time constant of fuel valve positioner (T). Typical Value = 0.1. Default: nullptr */ + /** \brief Droop (bp). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU bp; + + /** \brief Compressor gain (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU ktm; + + /** \brief Fuel flow maximum negative error value (MN). Typical Value = -0.05. Default: nullptr */ + CIMPP::PU mnef; + + /** \brief Fuel flow maximum positive error value (MX). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU mxef; + + /** \brief Minimum valve opening (RYMN). Typical Value = 0. Default: nullptr */ + CIMPP::PU rymn; + + /** \brief Maximum valve opening (RYMX). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU rymx; + + /** \brief Maximum gate opening velocity (T). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Maximum gate closing velocity (T). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Fuel control time constant (T). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tcm; + + /** \brief Compressor discharge volume time constant (T). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds tm; + + /** \brief Time constant of fuel valve positioner (T). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tv; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GovGASTWD.cpp b/CGMES_2.4.13_18DEC2013/GovGASTWD.cpp index 08890f106..06560d02d 100644 --- a/CGMES_2.4.13_18DEC2013/GovGASTWD.cpp +++ b/CGMES_2.4.13_18DEC2013/GovGASTWD.cpp @@ -8,44 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Temperature.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Temperature.hpp" -#include "ActivePower.hpp" -#include "Seconds.hpp" using namespace CIMPP; -GovGASTWD::GovGASTWD() {}; -GovGASTWD::~GovGASTWD() {}; +GovGASTWD::GovGASTWD() {} +GovGASTWD::~GovGASTWD() {} static const std::list PossibleProfilesForClass = { @@ -104,441 +71,472 @@ GovGASTWD::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovGASTWD_a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_a(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_af1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_af1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->af1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_af2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_af2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->af2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_b(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_bf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_bf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_bf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_bf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_c(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_c(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->c; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_cf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_cf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->cf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_ecr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_ecr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ecr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_etd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_etd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->etd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_k4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_k5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_k5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_k6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_k6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_kdroop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_kdroop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kdroop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_t(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_t(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_tcd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_tcd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tcd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_tmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_tmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_tmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_tmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_trate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_trate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->trate; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_tt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovGASTWD_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a; if (!buffer.str().empty()) @@ -552,7 +550,8 @@ bool get_GovGASTWD_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGASTWD_af1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->af1; if (!buffer.str().empty()) @@ -566,7 +565,8 @@ bool get_GovGASTWD_af1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGASTWD_af2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->af2; if (!buffer.str().empty()) @@ -580,7 +580,8 @@ bool get_GovGASTWD_af2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGASTWD_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b; if (!buffer.str().empty()) @@ -594,7 +595,8 @@ bool get_GovGASTWD_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGASTWD_bf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bf1; if (!buffer.str().empty()) @@ -608,7 +610,8 @@ bool get_GovGASTWD_bf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGASTWD_bf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bf2; if (!buffer.str().empty()) @@ -622,7 +625,8 @@ bool get_GovGASTWD_bf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGASTWD_c(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->c; if (!buffer.str().empty()) @@ -636,7 +640,8 @@ bool get_GovGASTWD_c(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGASTWD_cf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->cf2; if (!buffer.str().empty()) @@ -650,7 +655,8 @@ bool get_GovGASTWD_cf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGASTWD_ecr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ecr; if (!buffer.str().empty()) @@ -664,7 +670,8 @@ bool get_GovGASTWD_ecr(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGASTWD_etd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->etd; if (!buffer.str().empty()) @@ -678,7 +685,8 @@ bool get_GovGASTWD_etd(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGASTWD_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -692,7 +700,8 @@ bool get_GovGASTWD_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k4; if (!buffer.str().empty()) @@ -706,7 +715,8 @@ bool get_GovGASTWD_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k5; if (!buffer.str().empty()) @@ -720,7 +730,8 @@ bool get_GovGASTWD_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_k6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k6; if (!buffer.str().empty()) @@ -734,7 +745,8 @@ bool get_GovGASTWD_k6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -748,7 +760,8 @@ bool get_GovGASTWD_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_kdroop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdroop; if (!buffer.str().empty()) @@ -762,7 +775,8 @@ bool get_GovGASTWD_kdroop(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovGASTWD_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -776,7 +790,8 @@ bool get_GovGASTWD_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -790,7 +805,8 @@ bool get_GovGASTWD_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -804,7 +820,8 @@ bool get_GovGASTWD_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -818,7 +835,8 @@ bool get_GovGASTWD_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovGASTWD_t(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t; if (!buffer.str().empty()) @@ -832,7 +850,8 @@ bool get_GovGASTWD_t(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGASTWD_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -846,7 +865,8 @@ bool get_GovGASTWD_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -860,7 +880,8 @@ bool get_GovGASTWD_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -874,7 +895,8 @@ bool get_GovGASTWD_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -888,7 +910,8 @@ bool get_GovGASTWD_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_tcd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tcd; if (!buffer.str().empty()) @@ -902,7 +925,8 @@ bool get_GovGASTWD_tcd(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGASTWD_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -916,7 +940,8 @@ bool get_GovGASTWD_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -930,7 +955,8 @@ bool get_GovGASTWD_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_tmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tmax; if (!buffer.str().empty()) @@ -944,7 +970,8 @@ bool get_GovGASTWD_tmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovGASTWD_tmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tmin; if (!buffer.str().empty()) @@ -958,7 +985,8 @@ bool get_GovGASTWD_tmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovGASTWD_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -972,7 +1000,8 @@ bool get_GovGASTWD_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_trate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->trate; if (!buffer.str().empty()) @@ -986,7 +1015,8 @@ bool get_GovGASTWD_trate(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovGASTWD_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tt; if (!buffer.str().empty()) @@ -998,8 +1028,6 @@ bool get_GovGASTWD_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char GovGASTWD::debugName[] = "GovGASTWD"; const char* GovGASTWD::debugString() const { @@ -1008,44 +1036,44 @@ const char* GovGASTWD::debugString() const void GovGASTWD::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovGASTWD"), &GovGASTWD_factory)); + factory_map.emplace("cim:GovGASTWD", &GovGASTWD_factory); } void GovGASTWD::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.a"), &assign_GovGASTWD_a)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.af1"), &assign_GovGASTWD_af1)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.af2"), &assign_GovGASTWD_af2)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.b"), &assign_GovGASTWD_b)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.bf1"), &assign_GovGASTWD_bf1)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.bf2"), &assign_GovGASTWD_bf2)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.c"), &assign_GovGASTWD_c)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.cf2"), &assign_GovGASTWD_cf2)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.ecr"), &assign_GovGASTWD_ecr)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.etd"), &assign_GovGASTWD_etd)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.k3"), &assign_GovGASTWD_k3)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.k4"), &assign_GovGASTWD_k4)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.k5"), &assign_GovGASTWD_k5)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.k6"), &assign_GovGASTWD_k6)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.kd"), &assign_GovGASTWD_kd)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.kdroop"), &assign_GovGASTWD_kdroop)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.kf"), &assign_GovGASTWD_kf)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.ki"), &assign_GovGASTWD_ki)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.kp"), &assign_GovGASTWD_kp)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.mwbase"), &assign_GovGASTWD_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.t"), &assign_GovGASTWD_t)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.t3"), &assign_GovGASTWD_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.t4"), &assign_GovGASTWD_t4)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.t5"), &assign_GovGASTWD_t5)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.tc"), &assign_GovGASTWD_tc)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.tcd"), &assign_GovGASTWD_tcd)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.td"), &assign_GovGASTWD_td)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.tf"), &assign_GovGASTWD_tf)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.tmax"), &assign_GovGASTWD_tmax)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.tmin"), &assign_GovGASTWD_tmin)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.tr"), &assign_GovGASTWD_tr)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.trate"), &assign_GovGASTWD_trate)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.tt"), &assign_GovGASTWD_tt)); + assign_map.emplace("cim:GovGASTWD.a", &assign_GovGASTWD_a); + assign_map.emplace("cim:GovGASTWD.af1", &assign_GovGASTWD_af1); + assign_map.emplace("cim:GovGASTWD.af2", &assign_GovGASTWD_af2); + assign_map.emplace("cim:GovGASTWD.b", &assign_GovGASTWD_b); + assign_map.emplace("cim:GovGASTWD.bf1", &assign_GovGASTWD_bf1); + assign_map.emplace("cim:GovGASTWD.bf2", &assign_GovGASTWD_bf2); + assign_map.emplace("cim:GovGASTWD.c", &assign_GovGASTWD_c); + assign_map.emplace("cim:GovGASTWD.cf2", &assign_GovGASTWD_cf2); + assign_map.emplace("cim:GovGASTWD.ecr", &assign_GovGASTWD_ecr); + assign_map.emplace("cim:GovGASTWD.etd", &assign_GovGASTWD_etd); + assign_map.emplace("cim:GovGASTWD.k3", &assign_GovGASTWD_k3); + assign_map.emplace("cim:GovGASTWD.k4", &assign_GovGASTWD_k4); + assign_map.emplace("cim:GovGASTWD.k5", &assign_GovGASTWD_k5); + assign_map.emplace("cim:GovGASTWD.k6", &assign_GovGASTWD_k6); + assign_map.emplace("cim:GovGASTWD.kd", &assign_GovGASTWD_kd); + assign_map.emplace("cim:GovGASTWD.kdroop", &assign_GovGASTWD_kdroop); + assign_map.emplace("cim:GovGASTWD.kf", &assign_GovGASTWD_kf); + assign_map.emplace("cim:GovGASTWD.ki", &assign_GovGASTWD_ki); + assign_map.emplace("cim:GovGASTWD.kp", &assign_GovGASTWD_kp); + assign_map.emplace("cim:GovGASTWD.mwbase", &assign_GovGASTWD_mwbase); + assign_map.emplace("cim:GovGASTWD.t", &assign_GovGASTWD_t); + assign_map.emplace("cim:GovGASTWD.t3", &assign_GovGASTWD_t3); + assign_map.emplace("cim:GovGASTWD.t4", &assign_GovGASTWD_t4); + assign_map.emplace("cim:GovGASTWD.t5", &assign_GovGASTWD_t5); + assign_map.emplace("cim:GovGASTWD.tc", &assign_GovGASTWD_tc); + assign_map.emplace("cim:GovGASTWD.tcd", &assign_GovGASTWD_tcd); + assign_map.emplace("cim:GovGASTWD.td", &assign_GovGASTWD_td); + assign_map.emplace("cim:GovGASTWD.tf", &assign_GovGASTWD_tf); + assign_map.emplace("cim:GovGASTWD.tmax", &assign_GovGASTWD_tmax); + assign_map.emplace("cim:GovGASTWD.tmin", &assign_GovGASTWD_tmin); + assign_map.emplace("cim:GovGASTWD.tr", &assign_GovGASTWD_tr); + assign_map.emplace("cim:GovGASTWD.trate", &assign_GovGASTWD_trate); + assign_map.emplace("cim:GovGASTWD.tt", &assign_GovGASTWD_tt); } void GovGASTWD::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/GovGASTWD.hpp b/CGMES_2.4.13_18DEC2013/GovGASTWD.hpp index 5a33bd21d..8623cf082 100644 --- a/CGMES_2.4.13_18DEC2013/GovGASTWD.hpp +++ b/CGMES_2.4.13_18DEC2013/GovGASTWD.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Woodward Gas turbine governor model. - */ + /** \brief Woodward Gas turbine governor model. */ class GovGASTWD : public TurbineGovernorDynamics { public: @@ -31,39 +29,104 @@ namespace CIMPP GovGASTWD(); ~GovGASTWD() override; - CIMPP::Simple_Float a; /* Valve positioner (). Default: nullptr */ - CIMPP::PU af1; /* Exhaust temperature Parameter (Af1). Default: nullptr */ - CIMPP::PU af2; /* Coefficient equal to 0.5(1-speed) (Af2). Default: nullptr */ - CIMPP::Simple_Float b; /* Valve positioner (). Default: nullptr */ - CIMPP::PU bf1; /* (Bf1). Bf1 = E(1-w) where E (speed sensitivity coefficient) is 0.55 to 0.65 x Tr. Default: nullptr */ - CIMPP::PU bf2; /* Turbine Torque Coefficient K (depends on heating value of fuel stream in combustion chamber) (Bf2). Default: nullptr */ - CIMPP::Simple_Float c; /* Valve positioner (). Default: nullptr */ - CIMPP::PU cf2; /* Coefficient defining fuel flow where power output is 0% (Cf2). Synchronous but no output. Typically 0.23 x K(23% fuel flow). Default: nullptr */ - CIMPP::Seconds ecr; /* Combustion reaction time delay (Ecr). Default: nullptr */ - CIMPP::Seconds etd; /* Turbine and exhaust delay (Etd). Default: nullptr */ - CIMPP::PU k3; /* Ratio of Fuel Adjustment (K3). Default: nullptr */ - CIMPP::PU k4; /* Gain of radiation shield (K4). Default: nullptr */ - CIMPP::PU k5; /* Gain of radiation shield (K5). Default: nullptr */ - CIMPP::PU k6; /* Minimum fuel flow (K6). Default: nullptr */ - CIMPP::PU kd; /* Drop Governor Gain (Kd). Default: nullptr */ - CIMPP::PU kdroop; /* (Kdroop). Default: nullptr */ - CIMPP::PU kf; /* Fuel system feedback (Kf). Default: nullptr */ - CIMPP::PU ki; /* Isochronous Governor Gain (Ki). Default: nullptr */ - CIMPP::PU kp; /* PID Proportional gain (Kp). Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ - CIMPP::Seconds t; /* Fuel Control Time Constant (T). Default: nullptr */ - CIMPP::Seconds t3; /* Radiation shield time constant (T3). Default: nullptr */ - CIMPP::Seconds t4; /* Thermocouple time constant (T4). Default: nullptr */ - CIMPP::Seconds t5; /* Temperature control time constant (T5). Default: nullptr */ - CIMPP::Temperature tc; /* Temperature control (Tc). Default: nullptr */ - CIMPP::Seconds tcd; /* Compressor discharge time constant (Tcd). Default: nullptr */ - CIMPP::Seconds td; /* Power transducer time constant (Td). Default: nullptr */ - CIMPP::Seconds tf; /* Fuel system time constant (Tf). Default: nullptr */ - CIMPP::PU tmax; /* Maximum Turbine limit (Tmax). Default: nullptr */ - CIMPP::PU tmin; /* Minimum Turbine limit (Tmin). Default: nullptr */ - CIMPP::Temperature tr; /* Rated temperature (Tr). Default: nullptr */ - CIMPP::ActivePower trate; /* Turbine rating (Trate). Unit = MW. Default: nullptr */ - CIMPP::Seconds tt; /* Temperature controller integration rate (Tt). Default: nullptr */ + /** \brief Valve positioner (). Default: nullptr */ + CIMPP::Simple_Float a; + + /** \brief Exhaust temperature Parameter (Af1). Default: nullptr */ + CIMPP::PU af1; + + /** \brief Coefficient equal to 0.5(1-speed) (Af2). Default: nullptr */ + CIMPP::PU af2; + + /** \brief Valve positioner (). Default: nullptr */ + CIMPP::Simple_Float b; + + /** \brief (Bf1). Bf1 = E(1-w) where E (speed sensitivity coefficient) is 0.55 to 0.65 x Tr. Default: nullptr */ + CIMPP::PU bf1; + + /** \brief Turbine Torque Coefficient K (depends on heating value of fuel stream in combustion chamber) (Bf2). Default: nullptr */ + CIMPP::PU bf2; + + /** \brief Valve positioner (). Default: nullptr */ + CIMPP::Simple_Float c; + + /** \brief Coefficient defining fuel flow where power output is 0% (Cf2). Synchronous but no output. Typically 0.23 x K(23% fuel flow). Default: nullptr */ + CIMPP::PU cf2; + + /** \brief Combustion reaction time delay (Ecr). Default: nullptr */ + CIMPP::Seconds ecr; + + /** \brief Turbine and exhaust delay (Etd). Default: nullptr */ + CIMPP::Seconds etd; + + /** \brief Ratio of Fuel Adjustment (K3). Default: nullptr */ + CIMPP::PU k3; + + /** \brief Gain of radiation shield (K4). Default: nullptr */ + CIMPP::PU k4; + + /** \brief Gain of radiation shield (K5). Default: nullptr */ + CIMPP::PU k5; + + /** \brief Minimum fuel flow (K6). Default: nullptr */ + CIMPP::PU k6; + + /** \brief Drop Governor Gain (Kd). Default: nullptr */ + CIMPP::PU kd; + + /** \brief (Kdroop). Default: nullptr */ + CIMPP::PU kdroop; + + /** \brief Fuel system feedback (Kf). Default: nullptr */ + CIMPP::PU kf; + + /** \brief Isochronous Governor Gain (Ki). Default: nullptr */ + CIMPP::PU ki; + + /** \brief PID Proportional gain (Kp). Default: nullptr */ + CIMPP::PU kp; + + /** \brief Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Fuel Control Time Constant (T). Default: nullptr */ + CIMPP::Seconds t; + + /** \brief Radiation shield time constant (T3). Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Thermocouple time constant (T4). Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Temperature control time constant (T5). Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Temperature control (Tc). Default: nullptr */ + CIMPP::Temperature tc; + + /** \brief Compressor discharge time constant (Tcd). Default: nullptr */ + CIMPP::Seconds tcd; + + /** \brief Power transducer time constant (Td). Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Fuel system time constant (Tf). Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum Turbine limit (Tmax). Default: nullptr */ + CIMPP::PU tmax; + + /** \brief Minimum Turbine limit (Tmin). Default: nullptr */ + CIMPP::PU tmin; + + /** \brief Rated temperature (Tr). Default: nullptr */ + CIMPP::Temperature tr; + + /** \brief Turbine rating (Trate). Unit = MW. Default: nullptr */ + CIMPP::ActivePower trate; + + /** \brief Temperature controller integration rate (Tt). Default: nullptr */ + CIMPP::Seconds tt; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GovHydro1.cpp b/CGMES_2.4.13_18DEC2013/GovHydro1.cpp index d36e951b5..ba0d33f7d 100644 --- a/CGMES_2.4.13_18DEC2013/GovHydro1.cpp +++ b/CGMES_2.4.13_18DEC2013/GovHydro1.cpp @@ -8,25 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -GovHydro1::GovHydro1() {}; -GovHydro1::~GovHydro1() {}; +GovHydro1::GovHydro1() {} +GovHydro1::~GovHydro1() {} static const std::list PossibleProfilesForClass = { @@ -66,194 +52,206 @@ GovHydro1::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydro1_at(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_at(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->at; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_dturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_dturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_gmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_gmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_gmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_gmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_hdam(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_hdam(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->hdam; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_qnl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_qnl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qnl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_rperm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_rperm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rperm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_rtemp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_rtemp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rtemp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_velm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_velm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydro1_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->at; if (!buffer.str().empty()) @@ -267,7 +265,8 @@ bool get_GovHydro1_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro1_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dturb; if (!buffer.str().empty()) @@ -281,7 +280,8 @@ bool get_GovHydro1_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro1_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmax; if (!buffer.str().empty()) @@ -295,7 +295,8 @@ bool get_GovHydro1_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro1_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmin; if (!buffer.str().empty()) @@ -309,7 +310,8 @@ bool get_GovHydro1_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro1_hdam(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hdam; if (!buffer.str().empty()) @@ -323,7 +325,8 @@ bool get_GovHydro1_hdam(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -337,7 +340,8 @@ bool get_GovHydro1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydro1_qnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qnl; if (!buffer.str().empty()) @@ -351,7 +355,8 @@ bool get_GovHydro1_qnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro1_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rperm; if (!buffer.str().empty()) @@ -365,7 +370,8 @@ bool get_GovHydro1_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro1_rtemp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rtemp; if (!buffer.str().empty()) @@ -379,7 +385,8 @@ bool get_GovHydro1_rtemp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro1_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -393,7 +400,8 @@ bool get_GovHydro1_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro1_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -407,7 +415,8 @@ bool get_GovHydro1_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro1_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -421,7 +430,8 @@ bool get_GovHydro1_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro1_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -435,7 +445,8 @@ bool get_GovHydro1_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro1_velm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velm; if (!buffer.str().empty()) @@ -447,8 +458,6 @@ bool get_GovHydro1_velm(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char GovHydro1::debugName[] = "GovHydro1"; const char* GovHydro1::debugString() const { @@ -457,25 +466,25 @@ const char* GovHydro1::debugString() const void GovHydro1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydro1"), &GovHydro1_factory)); + factory_map.emplace("cim:GovHydro1", &GovHydro1_factory); } void GovHydro1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.at"), &assign_GovHydro1_at)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.dturb"), &assign_GovHydro1_dturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.gmax"), &assign_GovHydro1_gmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.gmin"), &assign_GovHydro1_gmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.hdam"), &assign_GovHydro1_hdam)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.mwbase"), &assign_GovHydro1_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.qnl"), &assign_GovHydro1_qnl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.rperm"), &assign_GovHydro1_rperm)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.rtemp"), &assign_GovHydro1_rtemp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.tf"), &assign_GovHydro1_tf)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.tg"), &assign_GovHydro1_tg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.tr"), &assign_GovHydro1_tr)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.tw"), &assign_GovHydro1_tw)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.velm"), &assign_GovHydro1_velm)); + assign_map.emplace("cim:GovHydro1.at", &assign_GovHydro1_at); + assign_map.emplace("cim:GovHydro1.dturb", &assign_GovHydro1_dturb); + assign_map.emplace("cim:GovHydro1.gmax", &assign_GovHydro1_gmax); + assign_map.emplace("cim:GovHydro1.gmin", &assign_GovHydro1_gmin); + assign_map.emplace("cim:GovHydro1.hdam", &assign_GovHydro1_hdam); + assign_map.emplace("cim:GovHydro1.mwbase", &assign_GovHydro1_mwbase); + assign_map.emplace("cim:GovHydro1.qnl", &assign_GovHydro1_qnl); + assign_map.emplace("cim:GovHydro1.rperm", &assign_GovHydro1_rperm); + assign_map.emplace("cim:GovHydro1.rtemp", &assign_GovHydro1_rtemp); + assign_map.emplace("cim:GovHydro1.tf", &assign_GovHydro1_tf); + assign_map.emplace("cim:GovHydro1.tg", &assign_GovHydro1_tg); + assign_map.emplace("cim:GovHydro1.tr", &assign_GovHydro1_tr); + assign_map.emplace("cim:GovHydro1.tw", &assign_GovHydro1_tw); + assign_map.emplace("cim:GovHydro1.velm", &assign_GovHydro1_velm); } void GovHydro1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/GovHydro1.hpp b/CGMES_2.4.13_18DEC2013/GovHydro1.hpp index 288576b07..f0f99628b 100644 --- a/CGMES_2.4.13_18DEC2013/GovHydro1.hpp +++ b/CGMES_2.4.13_18DEC2013/GovHydro1.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Basic Hydro turbine governor model. - */ + /** \brief Basic Hydro turbine governor model. */ class GovHydro1 : public TurbineGovernorDynamics { public: @@ -30,20 +28,47 @@ namespace CIMPP GovHydro1(); ~GovHydro1() override; - CIMPP::PU at; /* Turbine gain (At) (>0). Typical Value = 1.2. Default: nullptr */ - CIMPP::PU dturb; /* Turbine damping factor (Dturb) (>=0). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU gmax; /* Maximum gate opening (Gmax) (>0). Typical Value = 1. Default: nullptr */ - CIMPP::PU gmin; /* Minimum gate opening (Gmin) (>=0). Typical Value = 0. Default: nullptr */ - CIMPP::PU hdam; /* Turbine nominal head (hdam). Typical Value = 1. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ - CIMPP::PU qnl; /* No-load flow at nominal head (qnl) (>=0). Typical Value = 0.08. Default: nullptr */ - CIMPP::PU rperm; /* Permanent droop (R) (>0). Typical Value = 0.04. Default: nullptr */ - CIMPP::PU rtemp; /* Temporary droop (r) (>R). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds tf; /* Filter time constant () (>0). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds tg; /* Gate servo time constant (Tg) (>0). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tr; /* Washout time constant (Tr) (>0). Typical Value = 5. Default: nullptr */ - CIMPP::Seconds tw; /* Water inertia time constant (Tw) (>0). Typical Value = 1. Default: nullptr */ - CIMPP::Simple_Float velm; /* Maximum gate velocity (Vlem) (>0). Typical Value = 0.2. Default: nullptr */ + /** \brief Turbine gain (At) (>0). Typical Value = 1.2. Default: nullptr */ + CIMPP::PU at; + + /** \brief Turbine damping factor (Dturb) (>=0). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU dturb; + + /** \brief Maximum gate opening (Gmax) (>0). Typical Value = 1. Default: nullptr */ + CIMPP::PU gmax; + + /** \brief Minimum gate opening (Gmin) (>=0). Typical Value = 0. Default: nullptr */ + CIMPP::PU gmin; + + /** \brief Turbine nominal head (hdam). Typical Value = 1. Default: nullptr */ + CIMPP::PU hdam; + + /** \brief Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief No-load flow at nominal head (qnl) (>=0). Typical Value = 0.08. Default: nullptr */ + CIMPP::PU qnl; + + /** \brief Permanent droop (R) (>0). Typical Value = 0.04. Default: nullptr */ + CIMPP::PU rperm; + + /** \brief Temporary droop (r) (>R). Typical Value = 0.3. Default: nullptr */ + CIMPP::PU rtemp; + + /** \brief Filter time constant () (>0). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Gate servo time constant (Tg) (>0). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Washout time constant (Tr) (>0). Typical Value = 5. Default: nullptr */ + CIMPP::Seconds tr; + + /** \brief Water inertia time constant (Tw) (>0). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tw; + + /** \brief Maximum gate velocity (Vlem) (>0). Typical Value = 0.2. Default: nullptr */ + CIMPP::Simple_Float velm; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GovHydro2.cpp b/CGMES_2.4.13_18DEC2013/GovHydro2.cpp index a4fa05ccb..83cb2dbf7 100644 --- a/CGMES_2.4.13_18DEC2013/GovHydro2.cpp +++ b/CGMES_2.4.13_18DEC2013/GovHydro2.cpp @@ -8,40 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Frequency.hpp" -#include "ActivePower.hpp" -#include "Frequency.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -GovHydro2::GovHydro2() {}; -GovHydro2::~GovHydro2() {}; +GovHydro2::GovHydro2() {} +GovHydro2::~GovHydro2() {} static const std::list PossibleProfilesForClass = { @@ -96,389 +67,416 @@ GovHydro2::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydro2_aturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_aturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->aturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_bturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_bturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_eps(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eps; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_gv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_kturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_kturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_pgv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_rperm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_rperm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rperm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_rtemp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_rtemp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rtemp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_uc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_uo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_uo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydro2_aturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->aturb; if (!buffer.str().empty()) @@ -492,7 +490,8 @@ bool get_GovHydro2_aturb(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro2_bturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bturb; if (!buffer.str().empty()) @@ -506,7 +505,8 @@ bool get_GovHydro2_bturb(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro2_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -520,7 +520,8 @@ bool get_GovHydro2_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro2_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -534,7 +535,8 @@ bool get_GovHydro2_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro2_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eps; if (!buffer.str().empty()) @@ -548,7 +550,8 @@ bool get_GovHydro2_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro2_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -562,7 +565,8 @@ bool get_GovHydro2_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro2_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -576,7 +580,8 @@ bool get_GovHydro2_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro2_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -590,7 +595,8 @@ bool get_GovHydro2_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro2_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -604,7 +610,8 @@ bool get_GovHydro2_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro2_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -618,7 +625,8 @@ bool get_GovHydro2_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro2_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv6; if (!buffer.str().empty()) @@ -632,7 +640,8 @@ bool get_GovHydro2_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro2_kturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kturb; if (!buffer.str().empty()) @@ -646,7 +655,8 @@ bool get_GovHydro2_kturb(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -660,7 +670,8 @@ bool get_GovHydro2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydro2_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -674,7 +685,8 @@ bool get_GovHydro2_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro2_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -688,7 +700,8 @@ bool get_GovHydro2_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro2_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -702,7 +715,8 @@ bool get_GovHydro2_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro2_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -716,7 +730,8 @@ bool get_GovHydro2_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro2_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -730,7 +745,8 @@ bool get_GovHydro2_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro2_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv6; if (!buffer.str().empty()) @@ -744,7 +760,8 @@ bool get_GovHydro2_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro2_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -758,7 +775,8 @@ bool get_GovHydro2_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro2_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -772,7 +790,8 @@ bool get_GovHydro2_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro2_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rperm; if (!buffer.str().empty()) @@ -786,7 +805,8 @@ bool get_GovHydro2_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro2_rtemp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rtemp; if (!buffer.str().empty()) @@ -800,7 +820,8 @@ bool get_GovHydro2_rtemp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro2_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -814,7 +835,8 @@ bool get_GovHydro2_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro2_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -828,7 +850,8 @@ bool get_GovHydro2_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro2_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -842,7 +865,8 @@ bool get_GovHydro2_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro2_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -856,7 +880,8 @@ bool get_GovHydro2_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro2_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uc; if (!buffer.str().empty()) @@ -870,7 +895,8 @@ bool get_GovHydro2_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro2_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uo; if (!buffer.str().empty()) @@ -882,8 +908,6 @@ bool get_GovHydro2_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char GovHydro2::debugName[] = "GovHydro2"; const char* GovHydro2::debugString() const { @@ -892,40 +916,40 @@ const char* GovHydro2::debugString() const void GovHydro2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydro2"), &GovHydro2_factory)); + factory_map.emplace("cim:GovHydro2", &GovHydro2_factory); } void GovHydro2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.aturb"), &assign_GovHydro2_aturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.bturb"), &assign_GovHydro2_bturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.db1"), &assign_GovHydro2_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.db2"), &assign_GovHydro2_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.eps"), &assign_GovHydro2_eps)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.gv1"), &assign_GovHydro2_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.gv2"), &assign_GovHydro2_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.gv3"), &assign_GovHydro2_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.gv4"), &assign_GovHydro2_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.gv5"), &assign_GovHydro2_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.gv6"), &assign_GovHydro2_gv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.kturb"), &assign_GovHydro2_kturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.mwbase"), &assign_GovHydro2_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.pgv1"), &assign_GovHydro2_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.pgv2"), &assign_GovHydro2_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.pgv3"), &assign_GovHydro2_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.pgv4"), &assign_GovHydro2_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.pgv5"), &assign_GovHydro2_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.pgv6"), &assign_GovHydro2_pgv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.pmax"), &assign_GovHydro2_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.pmin"), &assign_GovHydro2_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.rperm"), &assign_GovHydro2_rperm)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.rtemp"), &assign_GovHydro2_rtemp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.tg"), &assign_GovHydro2_tg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.tp"), &assign_GovHydro2_tp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.tr"), &assign_GovHydro2_tr)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.tw"), &assign_GovHydro2_tw)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.uc"), &assign_GovHydro2_uc)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.uo"), &assign_GovHydro2_uo)); + assign_map.emplace("cim:GovHydro2.aturb", &assign_GovHydro2_aturb); + assign_map.emplace("cim:GovHydro2.bturb", &assign_GovHydro2_bturb); + assign_map.emplace("cim:GovHydro2.db1", &assign_GovHydro2_db1); + assign_map.emplace("cim:GovHydro2.db2", &assign_GovHydro2_db2); + assign_map.emplace("cim:GovHydro2.eps", &assign_GovHydro2_eps); + assign_map.emplace("cim:GovHydro2.gv1", &assign_GovHydro2_gv1); + assign_map.emplace("cim:GovHydro2.gv2", &assign_GovHydro2_gv2); + assign_map.emplace("cim:GovHydro2.gv3", &assign_GovHydro2_gv3); + assign_map.emplace("cim:GovHydro2.gv4", &assign_GovHydro2_gv4); + assign_map.emplace("cim:GovHydro2.gv5", &assign_GovHydro2_gv5); + assign_map.emplace("cim:GovHydro2.gv6", &assign_GovHydro2_gv6); + assign_map.emplace("cim:GovHydro2.kturb", &assign_GovHydro2_kturb); + assign_map.emplace("cim:GovHydro2.mwbase", &assign_GovHydro2_mwbase); + assign_map.emplace("cim:GovHydro2.pgv1", &assign_GovHydro2_pgv1); + assign_map.emplace("cim:GovHydro2.pgv2", &assign_GovHydro2_pgv2); + assign_map.emplace("cim:GovHydro2.pgv3", &assign_GovHydro2_pgv3); + assign_map.emplace("cim:GovHydro2.pgv4", &assign_GovHydro2_pgv4); + assign_map.emplace("cim:GovHydro2.pgv5", &assign_GovHydro2_pgv5); + assign_map.emplace("cim:GovHydro2.pgv6", &assign_GovHydro2_pgv6); + assign_map.emplace("cim:GovHydro2.pmax", &assign_GovHydro2_pmax); + assign_map.emplace("cim:GovHydro2.pmin", &assign_GovHydro2_pmin); + assign_map.emplace("cim:GovHydro2.rperm", &assign_GovHydro2_rperm); + assign_map.emplace("cim:GovHydro2.rtemp", &assign_GovHydro2_rtemp); + assign_map.emplace("cim:GovHydro2.tg", &assign_GovHydro2_tg); + assign_map.emplace("cim:GovHydro2.tp", &assign_GovHydro2_tp); + assign_map.emplace("cim:GovHydro2.tr", &assign_GovHydro2_tr); + assign_map.emplace("cim:GovHydro2.tw", &assign_GovHydro2_tw); + assign_map.emplace("cim:GovHydro2.uc", &assign_GovHydro2_uc); + assign_map.emplace("cim:GovHydro2.uo", &assign_GovHydro2_uo); } void GovHydro2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/GovHydro2.hpp b/CGMES_2.4.13_18DEC2013/GovHydro2.hpp index aaf315aa8..3919c3e7b 100644 --- a/CGMES_2.4.13_18DEC2013/GovHydro2.hpp +++ b/CGMES_2.4.13_18DEC2013/GovHydro2.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE hydro turbine governor model represents plants with straightforward penstock configurations and hydraulic-dashpot governors. - */ + /** \brief IEEE hydro turbine governor model represents plants with straightforward penstock configurations and hydraulic-dashpot governors. */ class GovHydro2 : public TurbineGovernorDynamics { public: @@ -31,35 +29,92 @@ namespace CIMPP GovHydro2(); ~GovHydro2() override; - CIMPP::PU aturb; /* Turbine numerator multiplier (Aturb). Typical Value = -1. Default: nullptr */ - CIMPP::PU bturb; /* Turbine denominator multiplier (Bturb). Typical Value = 0.5. Default: nullptr */ - CIMPP::Frequency db1; /* Intentional deadband width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower db2; /* Unintentional deadband (db2). Unit = MW. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency eps; /* Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::PU gv1; /* Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv6; /* Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU kturb; /* Turbine gain (Kturb). Typical Value = 1. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv6; /* Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU pmax; /* Maximum gate opening (Pmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum gate opening; (). Typical Value = 0. Default: nullptr */ - CIMPP::PU rperm; /* Permanent droop (Rperm). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU rtemp; /* Temporary droop (Rtemp). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tg; /* Gate servo time constant (Tg). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tp; /* Pilot servo valve time constant (Tp). Typical Value = 0.03. Default: nullptr */ - CIMPP::Seconds tr; /* Dashpot time constant (Tr). Typical Value = 12. Default: nullptr */ - CIMPP::Seconds tw; /* Water inertia time constant (Tw). Typical Value = 2. Default: nullptr */ - CIMPP::Simple_Float uc; /* Maximum gate closing velocity (Uc) (<0). Unit = PU/sec. Typical Value = -0.1. Default: nullptr */ - CIMPP::Simple_Float uo; /* Maximum gate opening velocity (Uo). Unit = PU/sec. Typical Value = 0.1. Default: nullptr */ + /** \brief Turbine numerator multiplier (Aturb). Typical Value = -1. Default: nullptr */ + CIMPP::PU aturb; + + /** \brief Turbine denominator multiplier (Bturb). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU bturb; + + /** \brief Intentional deadband width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Unintentional deadband (db2). Unit = MW. Typical Value = 0. Default: nullptr */ + CIMPP::ActivePower db2; + + /** \brief Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency eps; + + /** \brief Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv6; + + /** \brief Turbine gain (Kturb). Typical Value = 1. Default: nullptr */ + CIMPP::PU kturb; + + /** \brief Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv6; + + /** \brief Maximum gate opening (Pmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum gate opening; (). Typical Value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Permanent droop (Rperm). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU rperm; + + /** \brief Temporary droop (Rtemp). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU rtemp; + + /** \brief Gate servo time constant (Tg). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Pilot servo valve time constant (Tp). Typical Value = 0.03. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Dashpot time constant (Tr). Typical Value = 12. Default: nullptr */ + CIMPP::Seconds tr; + + /** \brief Water inertia time constant (Tw). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds tw; + + /** \brief Maximum gate closing velocity (Uc) (<0). Unit = PU/sec. Typical Value = -0.1. Default: nullptr */ + CIMPP::Simple_Float uc; + + /** \brief Maximum gate opening velocity (Uo). Unit = PU/sec. Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float uo; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GovHydro3.cpp b/CGMES_2.4.13_18DEC2013/GovHydro3.cpp index 4e6aeced8..e942b6ea1 100644 --- a/CGMES_2.4.13_18DEC2013/GovHydro3.cpp +++ b/CGMES_2.4.13_18DEC2013/GovHydro3.cpp @@ -8,47 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "Frequency.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "Frequency.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -GovHydro3::GovHydro3() {}; -GovHydro3::~GovHydro3() {}; +GovHydro3::GovHydro3() {} +GovHydro3::~GovHydro3() {} static const std::list PossibleProfilesForClass = { @@ -110,480 +74,514 @@ GovHydro3::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydro3_at(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_at(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->at; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_dturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_dturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_eps(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eps; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_governorControl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_governorControl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->governorControl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_gv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_h0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_h0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->h0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_pgv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_qnl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_qnl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qnl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_relec(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_relec(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->relec; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_rgate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_rgate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rgate; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_tt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_velcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_velcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velcl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_velop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_velop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydro3_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->at; if (!buffer.str().empty()) @@ -597,7 +595,8 @@ bool get_GovHydro3_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -611,7 +610,8 @@ bool get_GovHydro3_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -625,7 +625,8 @@ bool get_GovHydro3_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dturb; if (!buffer.str().empty()) @@ -639,7 +640,8 @@ bool get_GovHydro3_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro3_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eps; if (!buffer.str().empty()) @@ -653,7 +655,8 @@ bool get_GovHydro3_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_governorControl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->governorControl; if (!buffer.str().empty()) @@ -667,7 +670,8 @@ bool get_GovHydro3_governorControl(const BaseClass* BaseClass_ptr1, std::strings bool get_GovHydro3_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -681,7 +685,8 @@ bool get_GovHydro3_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -695,7 +700,8 @@ bool get_GovHydro3_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -709,7 +715,8 @@ bool get_GovHydro3_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -723,7 +730,8 @@ bool get_GovHydro3_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -737,7 +745,8 @@ bool get_GovHydro3_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv6; if (!buffer.str().empty()) @@ -751,7 +760,8 @@ bool get_GovHydro3_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_h0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->h0; if (!buffer.str().empty()) @@ -765,7 +775,8 @@ bool get_GovHydro3_h0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -779,7 +790,8 @@ bool get_GovHydro3_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -793,7 +805,8 @@ bool get_GovHydro3_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -807,7 +820,8 @@ bool get_GovHydro3_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -821,7 +835,8 @@ bool get_GovHydro3_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -835,7 +850,8 @@ bool get_GovHydro3_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydro3_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -849,7 +865,8 @@ bool get_GovHydro3_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro3_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -863,7 +880,8 @@ bool get_GovHydro3_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro3_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -877,7 +895,8 @@ bool get_GovHydro3_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro3_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -891,7 +910,8 @@ bool get_GovHydro3_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro3_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -905,7 +925,8 @@ bool get_GovHydro3_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro3_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv6; if (!buffer.str().empty()) @@ -919,7 +940,8 @@ bool get_GovHydro3_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro3_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -933,7 +955,8 @@ bool get_GovHydro3_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro3_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -947,7 +970,8 @@ bool get_GovHydro3_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro3_qnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qnl; if (!buffer.str().empty()) @@ -961,7 +985,8 @@ bool get_GovHydro3_qnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_relec(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->relec; if (!buffer.str().empty()) @@ -975,7 +1000,8 @@ bool get_GovHydro3_relec(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro3_rgate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rgate; if (!buffer.str().empty()) @@ -989,7 +1015,8 @@ bool get_GovHydro3_rgate(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro3_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -1003,7 +1030,8 @@ bool get_GovHydro3_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -1017,7 +1045,8 @@ bool get_GovHydro3_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -1031,7 +1060,8 @@ bool get_GovHydro3_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tt; if (!buffer.str().empty()) @@ -1045,7 +1075,8 @@ bool get_GovHydro3_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -1059,7 +1090,8 @@ bool get_GovHydro3_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_velcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velcl; if (!buffer.str().empty()) @@ -1073,7 +1105,8 @@ bool get_GovHydro3_velcl(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro3_velop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velop; if (!buffer.str().empty()) @@ -1085,8 +1118,6 @@ bool get_GovHydro3_velop(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } - - const char GovHydro3::debugName[] = "GovHydro3"; const char* GovHydro3::debugString() const { @@ -1095,47 +1126,47 @@ const char* GovHydro3::debugString() const void GovHydro3::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydro3"), &GovHydro3_factory)); + factory_map.emplace("cim:GovHydro3", &GovHydro3_factory); } void GovHydro3::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.at"), &assign_GovHydro3_at)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.db1"), &assign_GovHydro3_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.db2"), &assign_GovHydro3_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.dturb"), &assign_GovHydro3_dturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.eps"), &assign_GovHydro3_eps)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.governorControl"), &assign_GovHydro3_governorControl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.gv1"), &assign_GovHydro3_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.gv2"), &assign_GovHydro3_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.gv3"), &assign_GovHydro3_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.gv4"), &assign_GovHydro3_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.gv5"), &assign_GovHydro3_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.gv6"), &assign_GovHydro3_gv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.h0"), &assign_GovHydro3_h0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.k1"), &assign_GovHydro3_k1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.k2"), &assign_GovHydro3_k2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.kg"), &assign_GovHydro3_kg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.ki"), &assign_GovHydro3_ki)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.mwbase"), &assign_GovHydro3_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.pgv1"), &assign_GovHydro3_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.pgv2"), &assign_GovHydro3_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.pgv3"), &assign_GovHydro3_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.pgv4"), &assign_GovHydro3_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.pgv5"), &assign_GovHydro3_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.pgv6"), &assign_GovHydro3_pgv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.pmax"), &assign_GovHydro3_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.pmin"), &assign_GovHydro3_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.qnl"), &assign_GovHydro3_qnl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.relec"), &assign_GovHydro3_relec)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.rgate"), &assign_GovHydro3_rgate)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.td"), &assign_GovHydro3_td)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.tf"), &assign_GovHydro3_tf)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.tp"), &assign_GovHydro3_tp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.tt"), &assign_GovHydro3_tt)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.tw"), &assign_GovHydro3_tw)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.velcl"), &assign_GovHydro3_velcl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.velop"), &assign_GovHydro3_velop)); + assign_map.emplace("cim:GovHydro3.at", &assign_GovHydro3_at); + assign_map.emplace("cim:GovHydro3.db1", &assign_GovHydro3_db1); + assign_map.emplace("cim:GovHydro3.db2", &assign_GovHydro3_db2); + assign_map.emplace("cim:GovHydro3.dturb", &assign_GovHydro3_dturb); + assign_map.emplace("cim:GovHydro3.eps", &assign_GovHydro3_eps); + assign_map.emplace("cim:GovHydro3.governorControl", &assign_GovHydro3_governorControl); + assign_map.emplace("cim:GovHydro3.gv1", &assign_GovHydro3_gv1); + assign_map.emplace("cim:GovHydro3.gv2", &assign_GovHydro3_gv2); + assign_map.emplace("cim:GovHydro3.gv3", &assign_GovHydro3_gv3); + assign_map.emplace("cim:GovHydro3.gv4", &assign_GovHydro3_gv4); + assign_map.emplace("cim:GovHydro3.gv5", &assign_GovHydro3_gv5); + assign_map.emplace("cim:GovHydro3.gv6", &assign_GovHydro3_gv6); + assign_map.emplace("cim:GovHydro3.h0", &assign_GovHydro3_h0); + assign_map.emplace("cim:GovHydro3.k1", &assign_GovHydro3_k1); + assign_map.emplace("cim:GovHydro3.k2", &assign_GovHydro3_k2); + assign_map.emplace("cim:GovHydro3.kg", &assign_GovHydro3_kg); + assign_map.emplace("cim:GovHydro3.ki", &assign_GovHydro3_ki); + assign_map.emplace("cim:GovHydro3.mwbase", &assign_GovHydro3_mwbase); + assign_map.emplace("cim:GovHydro3.pgv1", &assign_GovHydro3_pgv1); + assign_map.emplace("cim:GovHydro3.pgv2", &assign_GovHydro3_pgv2); + assign_map.emplace("cim:GovHydro3.pgv3", &assign_GovHydro3_pgv3); + assign_map.emplace("cim:GovHydro3.pgv4", &assign_GovHydro3_pgv4); + assign_map.emplace("cim:GovHydro3.pgv5", &assign_GovHydro3_pgv5); + assign_map.emplace("cim:GovHydro3.pgv6", &assign_GovHydro3_pgv6); + assign_map.emplace("cim:GovHydro3.pmax", &assign_GovHydro3_pmax); + assign_map.emplace("cim:GovHydro3.pmin", &assign_GovHydro3_pmin); + assign_map.emplace("cim:GovHydro3.qnl", &assign_GovHydro3_qnl); + assign_map.emplace("cim:GovHydro3.relec", &assign_GovHydro3_relec); + assign_map.emplace("cim:GovHydro3.rgate", &assign_GovHydro3_rgate); + assign_map.emplace("cim:GovHydro3.td", &assign_GovHydro3_td); + assign_map.emplace("cim:GovHydro3.tf", &assign_GovHydro3_tf); + assign_map.emplace("cim:GovHydro3.tp", &assign_GovHydro3_tp); + assign_map.emplace("cim:GovHydro3.tt", &assign_GovHydro3_tt); + assign_map.emplace("cim:GovHydro3.tw", &assign_GovHydro3_tw); + assign_map.emplace("cim:GovHydro3.velcl", &assign_GovHydro3_velcl); + assign_map.emplace("cim:GovHydro3.velop", &assign_GovHydro3_velop); } void GovHydro3::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/GovHydro3.hpp b/CGMES_2.4.13_18DEC2013/GovHydro3.hpp index 8c61cac08..d3e458631 100644 --- a/CGMES_2.4.13_18DEC2013/GovHydro3.hpp +++ b/CGMES_2.4.13_18DEC2013/GovHydro3.hpp @@ -22,9 +22,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE Hydro Governor-Turbine Model. This model differs from that defined in the IEEE modeling guideline paper in that the limits on gate position and velocity do not permit "wind up" of the upstream signals. - */ + /** \brief Modified IEEE Hydro Governor-Turbine Model. This model differs from that defined in the IEEE modeling guideline paper in that the limits on gate position and velocity do not permit "wind up" of the upstream signals. */ class GovHydro3 : public TurbineGovernorDynamics { public: @@ -32,42 +30,113 @@ namespace CIMPP GovHydro3(); ~GovHydro3() override; - CIMPP::PU at; /* Turbine gain (At). Typical Value = 1.2. Default: nullptr */ - CIMPP::Frequency db1; /* Intentional dead-band width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower db2; /* Unintentional dead-band (db2). Unit = MW. Typical Value = 0. Default: nullptr */ - CIMPP::PU dturb; /* Turbine damping factor (Dturb). Typical Value = 0.2. Default: nullptr */ - CIMPP::Frequency eps; /* Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::Boolean governorControl; /* Governor control flag (Cflag). true = PID control is active false = double derivative control is active. Typical Value = true. Default: false */ - CIMPP::PU gv1; /* Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv6; /* Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU h0; /* Turbine nominal head (H0). Typical Value = 1. Default: nullptr */ - CIMPP::PU k1; /* Derivative gain (K1). Typical Value = 0.01. Default: nullptr */ - CIMPP::PU k2; /* Double derivative gain, if Cflag = -1 (K2). Typical Value = 2.5. Default: nullptr */ - CIMPP::PU kg; /* Gate servo gain (Kg). Typical Value = 2. Default: nullptr */ - CIMPP::PU ki; /* Integral gain (Ki). Typical Value = 0.5. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv6; /* Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU pmax; /* Maximum gate opening, PU of MWbase (Pmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum gate opening, PU of MWbase (Pmin). Typical Value = 0. Default: nullptr */ - CIMPP::PU qnl; /* No-load turbine flow at nominal head (Qnl). Typical Value = 0.08. Default: nullptr */ - CIMPP::PU relec; /* Steady-state droop, PU, for electrical power feedback (Relec). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU rgate; /* Steady-state droop, PU, for governor output feedback (Rgate). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds td; /* Input filter time constant (Td). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds tf; /* Washout time constant (Tf). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tp; /* Gate servo time constant (Tp). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds tt; /* Power feedback time constant (Tt). Typical Value = 0.2. Default: nullptr */ - CIMPP::Seconds tw; /* Water inertia time constant (Tw). Typical Value = 1. Default: nullptr */ - CIMPP::Simple_Float velcl; /* Maximum gate closing velocity (Velcl). Unit = PU/sec. Typical Value = -0.2. Default: nullptr */ - CIMPP::Simple_Float velop; /* Maximum gate opening velocity (Velop). Unit = PU/sec. Typical Value = 0.2. Default: nullptr */ + /** \brief Turbine gain (At). Typical Value = 1.2. Default: nullptr */ + CIMPP::PU at; + + /** \brief Intentional dead-band width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Unintentional dead-band (db2). Unit = MW. Typical Value = 0. Default: nullptr */ + CIMPP::ActivePower db2; + + /** \brief Turbine damping factor (Dturb). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU dturb; + + /** \brief Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency eps; + + /** \brief Governor control flag (Cflag). true = PID control is active false = double derivative control is active. Typical Value = true. Default: false */ + CIMPP::Boolean governorControl; + + /** \brief Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv6; + + /** \brief Turbine nominal head (H0). Typical Value = 1. Default: nullptr */ + CIMPP::PU h0; + + /** \brief Derivative gain (K1). Typical Value = 0.01. Default: nullptr */ + CIMPP::PU k1; + + /** \brief Double derivative gain, if Cflag = -1 (K2). Typical Value = 2.5. Default: nullptr */ + CIMPP::PU k2; + + /** \brief Gate servo gain (Kg). Typical Value = 2. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Integral gain (Ki). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv6; + + /** \brief Maximum gate opening, PU of MWbase (Pmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum gate opening, PU of MWbase (Pmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief No-load turbine flow at nominal head (Qnl). Typical Value = 0.08. Default: nullptr */ + CIMPP::PU qnl; + + /** \brief Steady-state droop, PU, for electrical power feedback (Relec). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU relec; + + /** \brief Steady-state droop, PU, for governor output feedback (Rgate). Typical Value = 0. Default: nullptr */ + CIMPP::PU rgate; + + /** \brief Input filter time constant (Td). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Washout time constant (Tf). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Gate servo time constant (Tp). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Power feedback time constant (Tt). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds tt; + + /** \brief Water inertia time constant (Tw). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tw; + + /** \brief Maximum gate closing velocity (Velcl). Unit = PU/sec. Typical Value = -0.2. Default: nullptr */ + CIMPP::Simple_Float velcl; + + /** \brief Maximum gate opening velocity (Velop). Unit = PU/sec. Typical Value = 0.2. Default: nullptr */ + CIMPP::Simple_Float velop; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GovHydro4.cpp b/CGMES_2.4.13_18DEC2013/GovHydro4.cpp index 0480e892e..4a841df9c 100644 --- a/CGMES_2.4.13_18DEC2013/GovHydro4.cpp +++ b/CGMES_2.4.13_18DEC2013/GovHydro4.cpp @@ -8,49 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Frequency.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "Frequency.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -GovHydro4::GovHydro4() {}; -GovHydro4::~GovHydro4() {}; +GovHydro4::GovHydro4() {} +GovHydro4::~GovHydro4() {} static const std::list PossibleProfilesForClass = { @@ -114,506 +76,542 @@ GovHydro4::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydro4_at(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_at(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->at; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_bgv0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_bgv0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bgv0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_bgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_bgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_bgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_bgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_bgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_bgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_bgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_bgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_bgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_bgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_bmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_bmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_dturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_dturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_eps(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eps; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_gmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_gmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_gmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_gmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_gv0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_gv0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_hdam(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_hdam(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->hdam; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_pgv0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_pgv0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_qn1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_qn1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qn1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_rperm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_rperm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rperm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_rtemp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_rtemp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rtemp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_tblade(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_tblade(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tblade; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_uc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_uo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_uo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydro4_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->at; if (!buffer.str().empty()) @@ -627,7 +625,8 @@ bool get_GovHydro4_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro4_bgv0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bgv0; if (!buffer.str().empty()) @@ -641,7 +640,8 @@ bool get_GovHydro4_bgv0(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_bgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bgv1; if (!buffer.str().empty()) @@ -655,7 +655,8 @@ bool get_GovHydro4_bgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_bgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bgv2; if (!buffer.str().empty()) @@ -669,7 +670,8 @@ bool get_GovHydro4_bgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_bgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bgv3; if (!buffer.str().empty()) @@ -683,7 +685,8 @@ bool get_GovHydro4_bgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_bgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bgv4; if (!buffer.str().empty()) @@ -697,7 +700,8 @@ bool get_GovHydro4_bgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_bgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bgv5; if (!buffer.str().empty()) @@ -711,7 +715,8 @@ bool get_GovHydro4_bgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_bmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bmax; if (!buffer.str().empty()) @@ -725,7 +730,8 @@ bool get_GovHydro4_bmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -739,7 +745,8 @@ bool get_GovHydro4_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -753,7 +760,8 @@ bool get_GovHydro4_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dturb; if (!buffer.str().empty()) @@ -767,7 +775,8 @@ bool get_GovHydro4_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro4_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eps; if (!buffer.str().empty()) @@ -781,7 +790,8 @@ bool get_GovHydro4_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmax; if (!buffer.str().empty()) @@ -795,7 +805,8 @@ bool get_GovHydro4_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmin; if (!buffer.str().empty()) @@ -809,7 +820,8 @@ bool get_GovHydro4_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_gv0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv0; if (!buffer.str().empty()) @@ -823,7 +835,8 @@ bool get_GovHydro4_gv0(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -837,7 +850,8 @@ bool get_GovHydro4_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -851,7 +865,8 @@ bool get_GovHydro4_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -865,7 +880,8 @@ bool get_GovHydro4_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -879,7 +895,8 @@ bool get_GovHydro4_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -893,7 +910,8 @@ bool get_GovHydro4_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_hdam(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hdam; if (!buffer.str().empty()) @@ -907,7 +925,8 @@ bool get_GovHydro4_hdam(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -921,7 +940,8 @@ bool get_GovHydro4_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydro4_pgv0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv0; if (!buffer.str().empty()) @@ -935,7 +955,8 @@ bool get_GovHydro4_pgv0(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -949,7 +970,8 @@ bool get_GovHydro4_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -963,7 +985,8 @@ bool get_GovHydro4_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -977,7 +1000,8 @@ bool get_GovHydro4_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -991,7 +1015,8 @@ bool get_GovHydro4_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -1005,7 +1030,8 @@ bool get_GovHydro4_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_qn1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qn1; if (!buffer.str().empty()) @@ -1019,7 +1045,8 @@ bool get_GovHydro4_qn1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rperm; if (!buffer.str().empty()) @@ -1033,7 +1060,8 @@ bool get_GovHydro4_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro4_rtemp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rtemp; if (!buffer.str().empty()) @@ -1047,7 +1075,8 @@ bool get_GovHydro4_rtemp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro4_tblade(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tblade; if (!buffer.str().empty()) @@ -1061,7 +1090,8 @@ bool get_GovHydro4_tblade(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydro4_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -1075,7 +1105,8 @@ bool get_GovHydro4_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro4_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -1089,7 +1120,8 @@ bool get_GovHydro4_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro4_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -1103,7 +1135,8 @@ bool get_GovHydro4_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro4_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -1117,7 +1150,8 @@ bool get_GovHydro4_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro4_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uc; if (!buffer.str().empty()) @@ -1131,7 +1165,8 @@ bool get_GovHydro4_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro4_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uo; if (!buffer.str().empty()) @@ -1143,8 +1178,6 @@ bool get_GovHydro4_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char GovHydro4::debugName[] = "GovHydro4"; const char* GovHydro4::debugString() const { @@ -1153,49 +1186,49 @@ const char* GovHydro4::debugString() const void GovHydro4::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydro4"), &GovHydro4_factory)); + factory_map.emplace("cim:GovHydro4", &GovHydro4_factory); } void GovHydro4::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.at"), &assign_GovHydro4_at)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.bgv0"), &assign_GovHydro4_bgv0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.bgv1"), &assign_GovHydro4_bgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.bgv2"), &assign_GovHydro4_bgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.bgv3"), &assign_GovHydro4_bgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.bgv4"), &assign_GovHydro4_bgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.bgv5"), &assign_GovHydro4_bgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.bmax"), &assign_GovHydro4_bmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.db1"), &assign_GovHydro4_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.db2"), &assign_GovHydro4_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.dturb"), &assign_GovHydro4_dturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.eps"), &assign_GovHydro4_eps)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.gmax"), &assign_GovHydro4_gmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.gmin"), &assign_GovHydro4_gmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.gv0"), &assign_GovHydro4_gv0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.gv1"), &assign_GovHydro4_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.gv2"), &assign_GovHydro4_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.gv3"), &assign_GovHydro4_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.gv4"), &assign_GovHydro4_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.gv5"), &assign_GovHydro4_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.hdam"), &assign_GovHydro4_hdam)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.mwbase"), &assign_GovHydro4_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.pgv0"), &assign_GovHydro4_pgv0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.pgv1"), &assign_GovHydro4_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.pgv2"), &assign_GovHydro4_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.pgv3"), &assign_GovHydro4_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.pgv4"), &assign_GovHydro4_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.pgv5"), &assign_GovHydro4_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.qn1"), &assign_GovHydro4_qn1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.rperm"), &assign_GovHydro4_rperm)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.rtemp"), &assign_GovHydro4_rtemp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.tblade"), &assign_GovHydro4_tblade)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.tg"), &assign_GovHydro4_tg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.tp"), &assign_GovHydro4_tp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.tr"), &assign_GovHydro4_tr)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.tw"), &assign_GovHydro4_tw)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.uc"), &assign_GovHydro4_uc)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.uo"), &assign_GovHydro4_uo)); + assign_map.emplace("cim:GovHydro4.at", &assign_GovHydro4_at); + assign_map.emplace("cim:GovHydro4.bgv0", &assign_GovHydro4_bgv0); + assign_map.emplace("cim:GovHydro4.bgv1", &assign_GovHydro4_bgv1); + assign_map.emplace("cim:GovHydro4.bgv2", &assign_GovHydro4_bgv2); + assign_map.emplace("cim:GovHydro4.bgv3", &assign_GovHydro4_bgv3); + assign_map.emplace("cim:GovHydro4.bgv4", &assign_GovHydro4_bgv4); + assign_map.emplace("cim:GovHydro4.bgv5", &assign_GovHydro4_bgv5); + assign_map.emplace("cim:GovHydro4.bmax", &assign_GovHydro4_bmax); + assign_map.emplace("cim:GovHydro4.db1", &assign_GovHydro4_db1); + assign_map.emplace("cim:GovHydro4.db2", &assign_GovHydro4_db2); + assign_map.emplace("cim:GovHydro4.dturb", &assign_GovHydro4_dturb); + assign_map.emplace("cim:GovHydro4.eps", &assign_GovHydro4_eps); + assign_map.emplace("cim:GovHydro4.gmax", &assign_GovHydro4_gmax); + assign_map.emplace("cim:GovHydro4.gmin", &assign_GovHydro4_gmin); + assign_map.emplace("cim:GovHydro4.gv0", &assign_GovHydro4_gv0); + assign_map.emplace("cim:GovHydro4.gv1", &assign_GovHydro4_gv1); + assign_map.emplace("cim:GovHydro4.gv2", &assign_GovHydro4_gv2); + assign_map.emplace("cim:GovHydro4.gv3", &assign_GovHydro4_gv3); + assign_map.emplace("cim:GovHydro4.gv4", &assign_GovHydro4_gv4); + assign_map.emplace("cim:GovHydro4.gv5", &assign_GovHydro4_gv5); + assign_map.emplace("cim:GovHydro4.hdam", &assign_GovHydro4_hdam); + assign_map.emplace("cim:GovHydro4.mwbase", &assign_GovHydro4_mwbase); + assign_map.emplace("cim:GovHydro4.pgv0", &assign_GovHydro4_pgv0); + assign_map.emplace("cim:GovHydro4.pgv1", &assign_GovHydro4_pgv1); + assign_map.emplace("cim:GovHydro4.pgv2", &assign_GovHydro4_pgv2); + assign_map.emplace("cim:GovHydro4.pgv3", &assign_GovHydro4_pgv3); + assign_map.emplace("cim:GovHydro4.pgv4", &assign_GovHydro4_pgv4); + assign_map.emplace("cim:GovHydro4.pgv5", &assign_GovHydro4_pgv5); + assign_map.emplace("cim:GovHydro4.qn1", &assign_GovHydro4_qn1); + assign_map.emplace("cim:GovHydro4.rperm", &assign_GovHydro4_rperm); + assign_map.emplace("cim:GovHydro4.rtemp", &assign_GovHydro4_rtemp); + assign_map.emplace("cim:GovHydro4.tblade", &assign_GovHydro4_tblade); + assign_map.emplace("cim:GovHydro4.tg", &assign_GovHydro4_tg); + assign_map.emplace("cim:GovHydro4.tp", &assign_GovHydro4_tp); + assign_map.emplace("cim:GovHydro4.tr", &assign_GovHydro4_tr); + assign_map.emplace("cim:GovHydro4.tw", &assign_GovHydro4_tw); + assign_map.emplace("cim:GovHydro4.uc", &assign_GovHydro4_uc); + assign_map.emplace("cim:GovHydro4.uo", &assign_GovHydro4_uo); } void GovHydro4::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/GovHydro4.hpp b/CGMES_2.4.13_18DEC2013/GovHydro4.hpp index cb020cb0a..f5165645e 100644 --- a/CGMES_2.4.13_18DEC2013/GovHydro4.hpp +++ b/CGMES_2.4.13_18DEC2013/GovHydro4.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Hydro turbine and governor. Represents plants with straight-forward penstock configurations and hydraulic governors of traditional 'dashpot' type. This model can be used to represent simple, Francis, Pelton or Kaplan turbines. - */ + /** \brief Hydro turbine and governor. Represents plants with straight-forward penstock configurations and hydraulic governors of traditional 'dashpot' type. This model can be used to represent simple, Francis, Pelton or Kaplan turbines. */ class GovHydro4 : public TurbineGovernorDynamics { public: @@ -31,44 +29,119 @@ namespace CIMPP GovHydro4(); ~GovHydro4() override; - CIMPP::PU at; /* Turbine gain (At). Typical Value = 1.2. Default: nullptr */ - CIMPP::PU bgv0; /* Kaplan blade servo point 0 (Bgv0). Typical Value = 0. Default: nullptr */ - CIMPP::PU bgv1; /* Kaplan blade servo point 1 (Bgv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU bgv2; /* Kaplan blade servo point 2 (Bgv2). Typical Value = 0. Typical Value Francis = 0, Kaplan = 0.1. Default: nullptr */ - CIMPP::PU bgv3; /* Kaplan blade servo point 3 (Bgv3). Typical Value = 0. Typical Value Francis = 0, Kaplan = 0.667. Default: nullptr */ - CIMPP::PU bgv4; /* Kaplan blade servo point 4 (Bgv4). Typical Value = 0. Typical Value Francis = 0, Kaplan = 0.9. Default: nullptr */ - CIMPP::PU bgv5; /* Kaplan blade servo point 5 (Bgv5). Typical Value = 0. Typical Value Francis = 0, Kaplan = 1. Default: nullptr */ - CIMPP::Simple_Float bmax; /* Maximum blade adjustment factor (Bmax). Typical Value = 0. Typical Value Francis = 0, Kaplan = 1.1276. Default: nullptr */ - CIMPP::Frequency db1; /* Intentional deadband width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower db2; /* Unintentional dead-band (db2). Unit = MW. Typical Value = 0. Default: nullptr */ - CIMPP::PU dturb; /* Turbine damping factor (Dturb). Unit = delta P (PU of MWbase) / delta speed (PU). Typical Value = 0.5. Typical Value Francis = 1.1, Kaplan = 1.1. Default: nullptr */ - CIMPP::Frequency eps; /* Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::PU gmax; /* Maximum gate opening, PU of MWbase (Gmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU gmin; /* Minimum gate opening, PU of MWbase (Gmin). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv0; /* Nonlinear gain point 0, PU gv (Gv0). Typical Value = 0. Typical Value Francis = 0.1, Kaplan = 0.1. Default: nullptr */ - CIMPP::PU gv1; /* Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Typical Value Francis = 0.4, Kaplan = 0.4. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Typical Value Francis = 0.5, Kaplan = 0.5. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Typical Value Francis = 0.7, Kaplan = 0.7. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Typical Value Francis = 0.8, Kaplan = 0.8. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Typical Value Francis = 0.9, Kaplan = 0.9. Default: nullptr */ - CIMPP::PU hdam; /* Head available at dam (hdam). Typical Value = 1. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv0; /* Nonlinear gain point 0, PU power (Pgv0). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Typical Value Francis = 0.42, Kaplan = 0.35. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Typical Value Francis = 0.56, Kaplan = 0.468. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Typical Value Francis = 0.8, Kaplan = 0.796. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Typical Value Francis = 0.9, Kaplan = 0.917. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Typical Value Francis = 0.97, Kaplan = 0.99. Default: nullptr */ - CIMPP::PU qn1; /* No-load flow at nominal head (Qnl). Typical Value = 0.08. Typical Value Francis = 0, Kaplan = 0. Default: nullptr */ - CIMPP::Seconds rperm; /* Permanent droop (Rperm). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds rtemp; /* Temporary droop (Rtemp). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds tblade; /* Blade servo time constant (Tblade). Typical Value = 100. Default: nullptr */ - CIMPP::Seconds tg; /* Gate servo time constant (Tg) (>0). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tp; /* Pilot servo time constant (Tp). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tr; /* Dashpot time constant (Tr) (>0). Typical Value = 5. Default: nullptr */ - CIMPP::Seconds tw; /* Water inertia time constant (Tw) (>0). Typical Value = 1. Default: nullptr */ - CIMPP::Simple_Float uc; /* Max gate closing velocity (Uc). Typical Value = 0.2. Default: nullptr */ - CIMPP::Simple_Float uo; /* Max gate opening velocity (Uo). Typical Vlaue = 0.2. Default: nullptr */ + /** \brief Turbine gain (At). Typical Value = 1.2. Default: nullptr */ + CIMPP::PU at; + + /** \brief Kaplan blade servo point 0 (Bgv0). Typical Value = 0. Default: nullptr */ + CIMPP::PU bgv0; + + /** \brief Kaplan blade servo point 1 (Bgv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU bgv1; + + /** \brief Kaplan blade servo point 2 (Bgv2). Typical Value = 0. Typical Value Francis = 0, Kaplan = 0.1. Default: nullptr */ + CIMPP::PU bgv2; + + /** \brief Kaplan blade servo point 3 (Bgv3). Typical Value = 0. Typical Value Francis = 0, Kaplan = 0.667. Default: nullptr */ + CIMPP::PU bgv3; + + /** \brief Kaplan blade servo point 4 (Bgv4). Typical Value = 0. Typical Value Francis = 0, Kaplan = 0.9. Default: nullptr */ + CIMPP::PU bgv4; + + /** \brief Kaplan blade servo point 5 (Bgv5). Typical Value = 0. Typical Value Francis = 0, Kaplan = 1. Default: nullptr */ + CIMPP::PU bgv5; + + /** \brief Maximum blade adjustment factor (Bmax). Typical Value = 0. Typical Value Francis = 0, Kaplan = 1.1276. Default: nullptr */ + CIMPP::Simple_Float bmax; + + /** \brief Intentional deadband width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Unintentional dead-band (db2). Unit = MW. Typical Value = 0. Default: nullptr */ + CIMPP::ActivePower db2; + + /** \brief Turbine damping factor (Dturb). Unit = delta P (PU of MWbase) / delta speed (PU). Typical Value = 0.5. Typical Value Francis = 1.1, Kaplan = 1.1. Default: nullptr */ + CIMPP::PU dturb; + + /** \brief Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency eps; + + /** \brief Maximum gate opening, PU of MWbase (Gmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU gmax; + + /** \brief Minimum gate opening, PU of MWbase (Gmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU gmin; + + /** \brief Nonlinear gain point 0, PU gv (Gv0). Typical Value = 0. Typical Value Francis = 0.1, Kaplan = 0.1. Default: nullptr */ + CIMPP::PU gv0; + + /** \brief Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Typical Value Francis = 0.4, Kaplan = 0.4. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Typical Value Francis = 0.5, Kaplan = 0.5. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Typical Value Francis = 0.7, Kaplan = 0.7. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Typical Value Francis = 0.8, Kaplan = 0.8. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Typical Value Francis = 0.9, Kaplan = 0.9. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Head available at dam (hdam). Typical Value = 1. Default: nullptr */ + CIMPP::PU hdam; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain point 0, PU power (Pgv0). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv0; + + /** \brief Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Typical Value Francis = 0.42, Kaplan = 0.35. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Typical Value Francis = 0.56, Kaplan = 0.468. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Typical Value Francis = 0.8, Kaplan = 0.796. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Typical Value Francis = 0.9, Kaplan = 0.917. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Typical Value Francis = 0.97, Kaplan = 0.99. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief No-load flow at nominal head (Qnl). Typical Value = 0.08. Typical Value Francis = 0, Kaplan = 0. Default: nullptr */ + CIMPP::PU qn1; + + /** \brief Permanent droop (Rperm). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds rperm; + + /** \brief Temporary droop (Rtemp). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds rtemp; + + /** \brief Blade servo time constant (Tblade). Typical Value = 100. Default: nullptr */ + CIMPP::Seconds tblade; + + /** \brief Gate servo time constant (Tg) (>0). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Pilot servo time constant (Tp). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Dashpot time constant (Tr) (>0). Typical Value = 5. Default: nullptr */ + CIMPP::Seconds tr; + + /** \brief Water inertia time constant (Tw) (>0). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tw; + + /** \brief Max gate closing velocity (Uc). Typical Value = 0.2. Default: nullptr */ + CIMPP::Simple_Float uc; + + /** \brief Max gate opening velocity (Uo). Typical Vlaue = 0.2. Default: nullptr */ + CIMPP::Simple_Float uo; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GovHydroDD.cpp b/CGMES_2.4.13_18DEC2013/GovHydroDD.cpp index f4baf7592..c7efe476c 100644 --- a/CGMES_2.4.13_18DEC2013/GovHydroDD.cpp +++ b/CGMES_2.4.13_18DEC2013/GovHydroDD.cpp @@ -8,46 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Frequency.hpp" -#include "ActivePower.hpp" -#include "Frequency.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -GovHydroDD::GovHydroDD() {}; -GovHydroDD::~GovHydroDD() {}; +GovHydroDD::GovHydroDD() {} +GovHydroDD::~GovHydroDD() {} static const std::list PossibleProfilesForClass = { @@ -108,467 +73,500 @@ GovHydroDD::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroDD_aturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_aturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->aturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_bturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_bturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_eps(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eps; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_gmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_gmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_gmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_gmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_gv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_inputSignal(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_inputSignal(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_pgv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_tt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_tturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_tturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_velcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_velcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velcl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_velop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_velop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroDD_aturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->aturb; if (!buffer.str().empty()) @@ -582,7 +580,8 @@ bool get_GovHydroDD_aturb(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroDD_bturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bturb; if (!buffer.str().empty()) @@ -596,7 +595,8 @@ bool get_GovHydroDD_bturb(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroDD_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -610,7 +610,8 @@ bool get_GovHydroDD_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroDD_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -624,7 +625,8 @@ bool get_GovHydroDD_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroDD_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eps; if (!buffer.str().empty()) @@ -638,7 +640,8 @@ bool get_GovHydroDD_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroDD_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmax; if (!buffer.str().empty()) @@ -652,7 +655,8 @@ bool get_GovHydroDD_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmin; if (!buffer.str().empty()) @@ -666,7 +670,8 @@ bool get_GovHydroDD_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -680,7 +685,8 @@ bool get_GovHydroDD_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroDD_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -694,7 +700,8 @@ bool get_GovHydroDD_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroDD_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -708,7 +715,8 @@ bool get_GovHydroDD_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroDD_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -722,7 +730,8 @@ bool get_GovHydroDD_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroDD_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -736,7 +745,8 @@ bool get_GovHydroDD_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroDD_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv6; if (!buffer.str().empty()) @@ -750,7 +760,8 @@ bool get_GovHydroDD_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroDD_inputSignal(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inputSignal; if (!buffer.str().empty()) @@ -764,7 +775,8 @@ bool get_GovHydroDD_inputSignal(const BaseClass* BaseClass_ptr1, std::stringstre bool get_GovHydroDD_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -778,7 +790,8 @@ bool get_GovHydroDD_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroDD_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -792,7 +805,8 @@ bool get_GovHydroDD_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroDD_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -806,7 +820,8 @@ bool get_GovHydroDD_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroDD_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -820,7 +835,8 @@ bool get_GovHydroDD_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroDD_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -834,7 +850,8 @@ bool get_GovHydroDD_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroDD_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -848,7 +865,8 @@ bool get_GovHydroDD_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -862,7 +880,8 @@ bool get_GovHydroDD_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -876,7 +895,8 @@ bool get_GovHydroDD_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -890,7 +910,8 @@ bool get_GovHydroDD_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -904,7 +925,8 @@ bool get_GovHydroDD_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv6; if (!buffer.str().empty()) @@ -918,7 +940,8 @@ bool get_GovHydroDD_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -932,7 +955,8 @@ bool get_GovHydroDD_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -946,7 +970,8 @@ bool get_GovHydroDD_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -960,7 +985,8 @@ bool get_GovHydroDD_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroDD_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -974,7 +1000,8 @@ bool get_GovHydroDD_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroDD_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -988,7 +1015,8 @@ bool get_GovHydroDD_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroDD_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -1002,7 +1030,8 @@ bool get_GovHydroDD_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroDD_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tt; if (!buffer.str().empty()) @@ -1016,7 +1045,8 @@ bool get_GovHydroDD_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroDD_tturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tturb; if (!buffer.str().empty()) @@ -1030,7 +1060,8 @@ bool get_GovHydroDD_tturb(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroDD_velcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velcl; if (!buffer.str().empty()) @@ -1044,7 +1075,8 @@ bool get_GovHydroDD_velcl(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroDD_velop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velop; if (!buffer.str().empty()) @@ -1056,8 +1088,6 @@ bool get_GovHydroDD_velop(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char GovHydroDD::debugName[] = "GovHydroDD"; const char* GovHydroDD::debugString() const { @@ -1066,46 +1096,46 @@ const char* GovHydroDD::debugString() const void GovHydroDD::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroDD"), &GovHydroDD_factory)); + factory_map.emplace("cim:GovHydroDD", &GovHydroDD_factory); } void GovHydroDD::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.aturb"), &assign_GovHydroDD_aturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.bturb"), &assign_GovHydroDD_bturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.db1"), &assign_GovHydroDD_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.db2"), &assign_GovHydroDD_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.eps"), &assign_GovHydroDD_eps)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.gmax"), &assign_GovHydroDD_gmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.gmin"), &assign_GovHydroDD_gmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.gv1"), &assign_GovHydroDD_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.gv2"), &assign_GovHydroDD_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.gv3"), &assign_GovHydroDD_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.gv4"), &assign_GovHydroDD_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.gv5"), &assign_GovHydroDD_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.gv6"), &assign_GovHydroDD_gv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.inputSignal"), &assign_GovHydroDD_inputSignal)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.k1"), &assign_GovHydroDD_k1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.k2"), &assign_GovHydroDD_k2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.kg"), &assign_GovHydroDD_kg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.ki"), &assign_GovHydroDD_ki)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.mwbase"), &assign_GovHydroDD_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.pgv1"), &assign_GovHydroDD_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.pgv2"), &assign_GovHydroDD_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.pgv3"), &assign_GovHydroDD_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.pgv4"), &assign_GovHydroDD_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.pgv5"), &assign_GovHydroDD_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.pgv6"), &assign_GovHydroDD_pgv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.pmax"), &assign_GovHydroDD_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.pmin"), &assign_GovHydroDD_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.r"), &assign_GovHydroDD_r)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.td"), &assign_GovHydroDD_td)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.tf"), &assign_GovHydroDD_tf)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.tp"), &assign_GovHydroDD_tp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.tt"), &assign_GovHydroDD_tt)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.tturb"), &assign_GovHydroDD_tturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.velcl"), &assign_GovHydroDD_velcl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.velop"), &assign_GovHydroDD_velop)); + assign_map.emplace("cim:GovHydroDD.aturb", &assign_GovHydroDD_aturb); + assign_map.emplace("cim:GovHydroDD.bturb", &assign_GovHydroDD_bturb); + assign_map.emplace("cim:GovHydroDD.db1", &assign_GovHydroDD_db1); + assign_map.emplace("cim:GovHydroDD.db2", &assign_GovHydroDD_db2); + assign_map.emplace("cim:GovHydroDD.eps", &assign_GovHydroDD_eps); + assign_map.emplace("cim:GovHydroDD.gmax", &assign_GovHydroDD_gmax); + assign_map.emplace("cim:GovHydroDD.gmin", &assign_GovHydroDD_gmin); + assign_map.emplace("cim:GovHydroDD.gv1", &assign_GovHydroDD_gv1); + assign_map.emplace("cim:GovHydroDD.gv2", &assign_GovHydroDD_gv2); + assign_map.emplace("cim:GovHydroDD.gv3", &assign_GovHydroDD_gv3); + assign_map.emplace("cim:GovHydroDD.gv4", &assign_GovHydroDD_gv4); + assign_map.emplace("cim:GovHydroDD.gv5", &assign_GovHydroDD_gv5); + assign_map.emplace("cim:GovHydroDD.gv6", &assign_GovHydroDD_gv6); + assign_map.emplace("cim:GovHydroDD.inputSignal", &assign_GovHydroDD_inputSignal); + assign_map.emplace("cim:GovHydroDD.k1", &assign_GovHydroDD_k1); + assign_map.emplace("cim:GovHydroDD.k2", &assign_GovHydroDD_k2); + assign_map.emplace("cim:GovHydroDD.kg", &assign_GovHydroDD_kg); + assign_map.emplace("cim:GovHydroDD.ki", &assign_GovHydroDD_ki); + assign_map.emplace("cim:GovHydroDD.mwbase", &assign_GovHydroDD_mwbase); + assign_map.emplace("cim:GovHydroDD.pgv1", &assign_GovHydroDD_pgv1); + assign_map.emplace("cim:GovHydroDD.pgv2", &assign_GovHydroDD_pgv2); + assign_map.emplace("cim:GovHydroDD.pgv3", &assign_GovHydroDD_pgv3); + assign_map.emplace("cim:GovHydroDD.pgv4", &assign_GovHydroDD_pgv4); + assign_map.emplace("cim:GovHydroDD.pgv5", &assign_GovHydroDD_pgv5); + assign_map.emplace("cim:GovHydroDD.pgv6", &assign_GovHydroDD_pgv6); + assign_map.emplace("cim:GovHydroDD.pmax", &assign_GovHydroDD_pmax); + assign_map.emplace("cim:GovHydroDD.pmin", &assign_GovHydroDD_pmin); + assign_map.emplace("cim:GovHydroDD.r", &assign_GovHydroDD_r); + assign_map.emplace("cim:GovHydroDD.td", &assign_GovHydroDD_td); + assign_map.emplace("cim:GovHydroDD.tf", &assign_GovHydroDD_tf); + assign_map.emplace("cim:GovHydroDD.tp", &assign_GovHydroDD_tp); + assign_map.emplace("cim:GovHydroDD.tt", &assign_GovHydroDD_tt); + assign_map.emplace("cim:GovHydroDD.tturb", &assign_GovHydroDD_tturb); + assign_map.emplace("cim:GovHydroDD.velcl", &assign_GovHydroDD_velcl); + assign_map.emplace("cim:GovHydroDD.velop", &assign_GovHydroDD_velop); } void GovHydroDD::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/GovHydroDD.hpp b/CGMES_2.4.13_18DEC2013/GovHydroDD.hpp index 67bc201c8..cca2ca2c0 100644 --- a/CGMES_2.4.13_18DEC2013/GovHydroDD.hpp +++ b/CGMES_2.4.13_18DEC2013/GovHydroDD.hpp @@ -22,9 +22,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Double derivative hydro governor and turbine. - */ + /** \brief Double derivative hydro governor and turbine. */ class GovHydroDD : public TurbineGovernorDynamics { public: @@ -32,41 +30,110 @@ namespace CIMPP GovHydroDD(); ~GovHydroDD() override; - CIMPP::PU aturb; /* Turbine numerator multiplier (Aturb) (note 3). Typical Value = -1. Default: nullptr */ - CIMPP::PU bturb; /* Turbine denominator multiplier (Bturb) (note 3). Typical Value = 0.5. Default: nullptr */ - CIMPP::Frequency db1; /* Intentional dead-band width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower db2; /* Unintentional dead-band (db2). Unit = MW. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency eps; /* Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::PU gmax; /* Maximum gate opening (Gmax). Typical Value = 0. Default: nullptr */ - CIMPP::PU gmin; /* Minimum gate opening (Gmin). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv1; /* Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv6; /* Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ - CIMPP::Boolean inputSignal; /* Input signal switch (Flag). true = Pe input is used false = feedback is received from CV. Flag is normally dependent on Tt. If Tf is zero, Flag is set to false. If Tf is not zero, Flag is set to true. Typical Value = true. Default: false */ - CIMPP::PU k1; /* Single derivative gain (K1). Typical Value = 3.6. Default: nullptr */ - CIMPP::PU k2; /* Double derivative gain (K2). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU kg; /* Gate servo gain (Kg). Typical Value = 3. Default: nullptr */ - CIMPP::PU ki; /* Integral gain (Ki). Typical Value = 1. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv6; /* Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU pmax; /* Maximum gate opening, PU of MWbase (Pmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum gate opening, PU of MWbase (Pmin). Typical Value = 0. Default: nullptr */ - CIMPP::PU r; /* Steady state droop (R). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds td; /* Input filter time constant (Td). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tf; /* Washout time constant (Tf). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tp; /* Gate servo time constant (Tp). Typical Value = 0.35. Default: nullptr */ - CIMPP::Seconds tt; /* Power feedback time constant (Tt). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds tturb; /* Turbine time constant (Tturb) (note 3). Typical Value = 0.8. Default: nullptr */ - CIMPP::Simple_Float velcl; /* Maximum gate closing velocity (Velcl). Unit = PU/sec. Typical Value = -0.14. Default: nullptr */ - CIMPP::Simple_Float velop; /* Maximum gate opening velocity (Velop). Unit = PU/sec. Typical Value = 0.09. Default: nullptr */ + /** \brief Turbine numerator multiplier (Aturb) (note 3). Typical Value = -1. Default: nullptr */ + CIMPP::PU aturb; + + /** \brief Turbine denominator multiplier (Bturb) (note 3). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU bturb; + + /** \brief Intentional dead-band width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Unintentional dead-band (db2). Unit = MW. Typical Value = 0. Default: nullptr */ + CIMPP::ActivePower db2; + + /** \brief Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency eps; + + /** \brief Maximum gate opening (Gmax). Typical Value = 0. Default: nullptr */ + CIMPP::PU gmax; + + /** \brief Minimum gate opening (Gmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU gmin; + + /** \brief Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv6; + + /** \brief Input signal switch (Flag). true = Pe input is used false = feedback is received from CV. Flag is normally dependent on Tt. If Tf is zero, Flag is set to false. If Tf is not zero, Flag is set to true. Typical Value = true. Default: false */ + CIMPP::Boolean inputSignal; + + /** \brief Single derivative gain (K1). Typical Value = 3.6. Default: nullptr */ + CIMPP::PU k1; + + /** \brief Double derivative gain (K2). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU k2; + + /** \brief Gate servo gain (Kg). Typical Value = 3. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Integral gain (Ki). Typical Value = 1. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv6; + + /** \brief Maximum gate opening, PU of MWbase (Pmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum gate opening, PU of MWbase (Pmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Steady state droop (R). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU r; + + /** \brief Input filter time constant (Td). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Washout time constant (Tf). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Gate servo time constant (Tp). Typical Value = 0.35. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Power feedback time constant (Tt). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds tt; + + /** \brief Turbine time constant (Tturb) (note 3). Typical Value = 0.8. Default: nullptr */ + CIMPP::Seconds tturb; + + /** \brief Maximum gate closing velocity (Velcl). Unit = PU/sec. Typical Value = -0.14. Default: nullptr */ + CIMPP::Simple_Float velcl; + + /** \brief Maximum gate opening velocity (Velop). Unit = PU/sec. Typical Value = 0.09. Default: nullptr */ + CIMPP::Simple_Float velop; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GovHydroFrancis.cpp b/CGMES_2.4.13_18DEC2013/GovHydroFrancis.cpp index ea80c6b88..92cca504b 100644 --- a/CGMES_2.4.13_18DEC2013/GovHydroFrancis.cpp +++ b/CGMES_2.4.13_18DEC2013/GovHydroFrancis.cpp @@ -8,38 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "Area.hpp" -#include "Area.hpp" -#include "PU.hpp" -#include "Frequency.hpp" -#include "PU.hpp" -#include "FrancisGovernorControlKind.hpp" -#include "Length.hpp" -#include "Length.hpp" -#include "Length.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "VolumeFlowRate.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Boolean.hpp" -#include "Length.hpp" using namespace CIMPP; -GovHydroFrancis::GovHydroFrancis() {}; -GovHydroFrancis::~GovHydroFrancis() {}; +GovHydroFrancis::GovHydroFrancis() {} +GovHydroFrancis::~GovHydroFrancis() {} static const std::list PossibleProfilesForClass = { @@ -92,363 +65,388 @@ GovHydroFrancis::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroFrancis_am(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_am(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->am; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_av0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_av0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->av0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_av1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_av1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->av1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_bp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_bp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_etamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_etamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->etamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_governorControl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_governorControl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->governorControl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_h1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_h1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->h1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_h2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_h2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->h2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_hn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_hn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->hn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_kt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_kt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_qc0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_qc0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qc0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_qn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_qn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_ts(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_ts(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_twnc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_twnc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->twnc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_twng(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_twng(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->twng; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_tx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_tx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_va(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_va(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->va; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_valvmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_valvmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->valvmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_valvmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_valvmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->valvmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_vc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_vc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_waterTunnelSurgeChamberSimulation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_waterTunnelSurgeChamberSimulation(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->waterTunnelSurgeChamberSimulation; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_zsfc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_zsfc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->zsfc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroFrancis_am(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->am; if (!buffer.str().empty()) @@ -462,7 +460,8 @@ bool get_GovHydroFrancis_am(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_av0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->av0; if (!buffer.str().empty()) @@ -476,7 +475,8 @@ bool get_GovHydroFrancis_av0(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_av1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->av1; if (!buffer.str().empty()) @@ -490,7 +490,8 @@ bool get_GovHydroFrancis_av1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_bp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bp; if (!buffer.str().empty()) @@ -504,7 +505,8 @@ bool get_GovHydroFrancis_bp(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -518,7 +520,8 @@ bool get_GovHydroFrancis_db1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_etamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->etamax; if (!buffer.str().empty()) @@ -530,9 +533,25 @@ bool get_GovHydroFrancis_etamax(const BaseClass* BaseClass_ptr1, std::stringstre return false; } +bool get_GovHydroFrancis_governorControl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->governorControl; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_GovHydroFrancis_h1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->h1; if (!buffer.str().empty()) @@ -546,7 +565,8 @@ bool get_GovHydroFrancis_h1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_h2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->h2; if (!buffer.str().empty()) @@ -560,7 +580,8 @@ bool get_GovHydroFrancis_h2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_hn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hn; if (!buffer.str().empty()) @@ -574,7 +595,8 @@ bool get_GovHydroFrancis_hn(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -588,7 +610,8 @@ bool get_GovHydroFrancis_kc(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -602,7 +625,8 @@ bool get_GovHydroFrancis_kg(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_kt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kt; if (!buffer.str().empty()) @@ -616,7 +640,8 @@ bool get_GovHydroFrancis_kt(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_qc0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qc0; if (!buffer.str().empty()) @@ -630,7 +655,8 @@ bool get_GovHydroFrancis_qc0(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_qn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qn; if (!buffer.str().empty()) @@ -644,7 +670,8 @@ bool get_GovHydroFrancis_qn(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -658,7 +685,8 @@ bool get_GovHydroFrancis_ta(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -672,7 +700,8 @@ bool get_GovHydroFrancis_td(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_ts(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts; if (!buffer.str().empty()) @@ -686,7 +715,8 @@ bool get_GovHydroFrancis_ts(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_twnc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twnc; if (!buffer.str().empty()) @@ -700,7 +730,8 @@ bool get_GovHydroFrancis_twnc(const BaseClass* BaseClass_ptr1, std::stringstream bool get_GovHydroFrancis_twng(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twng; if (!buffer.str().empty()) @@ -714,7 +745,8 @@ bool get_GovHydroFrancis_twng(const BaseClass* BaseClass_ptr1, std::stringstream bool get_GovHydroFrancis_tx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tx; if (!buffer.str().empty()) @@ -728,7 +760,8 @@ bool get_GovHydroFrancis_tx(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_va(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->va; if (!buffer.str().empty()) @@ -742,7 +775,8 @@ bool get_GovHydroFrancis_va(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_valvmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->valvmax; if (!buffer.str().empty()) @@ -756,7 +790,8 @@ bool get_GovHydroFrancis_valvmax(const BaseClass* BaseClass_ptr1, std::stringstr bool get_GovHydroFrancis_valvmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->valvmin; if (!buffer.str().empty()) @@ -770,7 +805,8 @@ bool get_GovHydroFrancis_valvmin(const BaseClass* BaseClass_ptr1, std::stringstr bool get_GovHydroFrancis_vc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vc; if (!buffer.str().empty()) @@ -784,7 +820,8 @@ bool get_GovHydroFrancis_vc(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_waterTunnelSurgeChamberSimulation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->waterTunnelSurgeChamberSimulation; if (!buffer.str().empty()) @@ -798,7 +835,8 @@ bool get_GovHydroFrancis_waterTunnelSurgeChamberSimulation(const BaseClass* Base bool get_GovHydroFrancis_zsfc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->zsfc; if (!buffer.str().empty()) @@ -810,22 +848,6 @@ bool get_GovHydroFrancis_zsfc(const BaseClass* BaseClass_ptr1, std::stringstream return false; } - - -bool get_GovHydroFrancis_governorControl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->governorControl; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char GovHydroFrancis::debugName[] = "GovHydroFrancis"; const char* GovHydroFrancis::debugString() const { @@ -834,38 +856,38 @@ const char* GovHydroFrancis::debugString() const void GovHydroFrancis::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroFrancis"), &GovHydroFrancis_factory)); + factory_map.emplace("cim:GovHydroFrancis", &GovHydroFrancis_factory); } void GovHydroFrancis::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.am"), &assign_GovHydroFrancis_am)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.av0"), &assign_GovHydroFrancis_av0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.av1"), &assign_GovHydroFrancis_av1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.bp"), &assign_GovHydroFrancis_bp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.db1"), &assign_GovHydroFrancis_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.etamax"), &assign_GovHydroFrancis_etamax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.governorControl"), &assign_GovHydroFrancis_governorControl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.h1"), &assign_GovHydroFrancis_h1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.h2"), &assign_GovHydroFrancis_h2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.hn"), &assign_GovHydroFrancis_hn)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.kc"), &assign_GovHydroFrancis_kc)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.kg"), &assign_GovHydroFrancis_kg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.kt"), &assign_GovHydroFrancis_kt)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.qc0"), &assign_GovHydroFrancis_qc0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.qn"), &assign_GovHydroFrancis_qn)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.ta"), &assign_GovHydroFrancis_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.td"), &assign_GovHydroFrancis_td)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.ts"), &assign_GovHydroFrancis_ts)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.twnc"), &assign_GovHydroFrancis_twnc)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.twng"), &assign_GovHydroFrancis_twng)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.tx"), &assign_GovHydroFrancis_tx)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.va"), &assign_GovHydroFrancis_va)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.valvmax"), &assign_GovHydroFrancis_valvmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.valvmin"), &assign_GovHydroFrancis_valvmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.vc"), &assign_GovHydroFrancis_vc)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.waterTunnelSurgeChamberSimulation"), &assign_GovHydroFrancis_waterTunnelSurgeChamberSimulation)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.zsfc"), &assign_GovHydroFrancis_zsfc)); + assign_map.emplace("cim:GovHydroFrancis.am", &assign_GovHydroFrancis_am); + assign_map.emplace("cim:GovHydroFrancis.av0", &assign_GovHydroFrancis_av0); + assign_map.emplace("cim:GovHydroFrancis.av1", &assign_GovHydroFrancis_av1); + assign_map.emplace("cim:GovHydroFrancis.bp", &assign_GovHydroFrancis_bp); + assign_map.emplace("cim:GovHydroFrancis.db1", &assign_GovHydroFrancis_db1); + assign_map.emplace("cim:GovHydroFrancis.etamax", &assign_GovHydroFrancis_etamax); + assign_map.emplace("cim:GovHydroFrancis.governorControl", &assign_GovHydroFrancis_governorControl); + assign_map.emplace("cim:GovHydroFrancis.h1", &assign_GovHydroFrancis_h1); + assign_map.emplace("cim:GovHydroFrancis.h2", &assign_GovHydroFrancis_h2); + assign_map.emplace("cim:GovHydroFrancis.hn", &assign_GovHydroFrancis_hn); + assign_map.emplace("cim:GovHydroFrancis.kc", &assign_GovHydroFrancis_kc); + assign_map.emplace("cim:GovHydroFrancis.kg", &assign_GovHydroFrancis_kg); + assign_map.emplace("cim:GovHydroFrancis.kt", &assign_GovHydroFrancis_kt); + assign_map.emplace("cim:GovHydroFrancis.qc0", &assign_GovHydroFrancis_qc0); + assign_map.emplace("cim:GovHydroFrancis.qn", &assign_GovHydroFrancis_qn); + assign_map.emplace("cim:GovHydroFrancis.ta", &assign_GovHydroFrancis_ta); + assign_map.emplace("cim:GovHydroFrancis.td", &assign_GovHydroFrancis_td); + assign_map.emplace("cim:GovHydroFrancis.ts", &assign_GovHydroFrancis_ts); + assign_map.emplace("cim:GovHydroFrancis.twnc", &assign_GovHydroFrancis_twnc); + assign_map.emplace("cim:GovHydroFrancis.twng", &assign_GovHydroFrancis_twng); + assign_map.emplace("cim:GovHydroFrancis.tx", &assign_GovHydroFrancis_tx); + assign_map.emplace("cim:GovHydroFrancis.va", &assign_GovHydroFrancis_va); + assign_map.emplace("cim:GovHydroFrancis.valvmax", &assign_GovHydroFrancis_valvmax); + assign_map.emplace("cim:GovHydroFrancis.valvmin", &assign_GovHydroFrancis_valvmin); + assign_map.emplace("cim:GovHydroFrancis.vc", &assign_GovHydroFrancis_vc); + assign_map.emplace("cim:GovHydroFrancis.waterTunnelSurgeChamberSimulation", &assign_GovHydroFrancis_waterTunnelSurgeChamberSimulation); + assign_map.emplace("cim:GovHydroFrancis.zsfc", &assign_GovHydroFrancis_zsfc); } void GovHydroFrancis::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/GovHydroFrancis.hpp b/CGMES_2.4.13_18DEC2013/GovHydroFrancis.hpp index 2a213b58f..a69654b37 100644 --- a/CGMES_2.4.13_18DEC2013/GovHydroFrancis.hpp +++ b/CGMES_2.4.13_18DEC2013/GovHydroFrancis.hpp @@ -25,9 +25,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Detailed hydro unit - Francis model. This model can be used to represent three types of governors. A schematic of the hydraulic system of detailed hydro unit models, like Francis and Pelton, is provided in the DetailedHydroModelHydraulicSystem diagram. - */ + /** \brief Detailed hydro unit - Francis model. This model can be used to represent three types of governors. A schematic of the hydraulic system of detailed hydro unit models, like Francis and Pelton, is provided in the DetailedHydroModelHydraulicSystem diagram. */ class GovHydroFrancis : public TurbineGovernorDynamics { public: @@ -35,33 +33,86 @@ namespace CIMPP GovHydroFrancis(); ~GovHydroFrancis() override; - CIMPP::PU am; /* Opening section S at the maximum efficiency (Am). Typical Value = 0.7. Default: nullptr */ - CIMPP::Area av0; /* Area of the surge tank (A). Unit = m. Typical Value = 30. Default: nullptr */ - CIMPP::Area av1; /* Area of the compensation tank (A). Unit = m. Typical Value = 700. Default: nullptr */ - CIMPP::PU bp; /* Droop (Bp). Typical Value = 0.05. Default: nullptr */ - CIMPP::Frequency db1; /* Intentional dead-band width (DB1). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::PU etamax; /* Maximum efficiency (EtaMax). Typical Value = 1.05. Default: nullptr */ - CIMPP::FrancisGovernorControlKind governorControl; /* Governor control flag (Cflag). Typical Value = mechanicHydrolicTachoAccelerator. Default: 0 */ - CIMPP::Length h1; /* Head of compensation chamber water level with respect to the level of penstock (H). Unit = m. Typical Value = 4. Default: nullptr */ - CIMPP::Length h2; /* Head of surge tank water level with respect to the level of penstock (H). Unit = m. Typical Value = 40. Default: nullptr */ - CIMPP::Length hn; /* Rated hydraulic head (H). Unit = m. Typical Value = 250. Default: nullptr */ - CIMPP::PU kc; /* Penstock loss coefficient (due to friction) (Kc). Typical Value = 0.025. Default: nullptr */ - CIMPP::PU kg; /* Water tunnel and surge chamber loss coefficient (due to friction) (Kg). Typical Value = 0.025. Default: nullptr */ - CIMPP::PU kt; /* Washout gain (Kt). Typical Value = 0.25. Default: nullptr */ - CIMPP::PU qc0; /* No-load turbine flow at nominal head (Qc0). Typical Value = 0.21. Default: nullptr */ - CIMPP::VolumeFlowRate qn; /* Rated flow (Q). Unit = m/s. Typical Value = 40. Default: nullptr */ - CIMPP::Seconds ta; /* Derivative gain (Ta). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds td; /* Washout time constant (Td). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds ts; /* Gate servo time constant (Ts). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds twnc; /* Water inertia time constant (Twnc). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds twng; /* Water tunnel and surge chamber inertia time constant (Twng). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds tx; /* Derivative feedback gain (Tx). Typical Value = 1. Default: nullptr */ - CIMPP::Simple_Float va; /* Maximum gate opening velocity (Va). Unit = PU/sec. Typical Value = 0.011. Default: nullptr */ - CIMPP::PU valvmax; /* Maximum gate opening (ValvMax). Typical Value = 1. Default: nullptr */ - CIMPP::PU valvmin; /* Minimum gate opening (ValvMin). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float vc; /* Maximum gate closing velocity (Vc). Unit = PU/sec. Typical Value = -0.011. Default: nullptr */ - CIMPP::Boolean waterTunnelSurgeChamberSimulation; /* Water tunnel and surge chamber simulation (Tflag). true = enable of water tunnel and surge chamber simulation false = inhibit of water tunnel and surge chamber simulation. Typical Value = false. Default: false */ - CIMPP::Length zsfc; /* Head of upper water level with respect to the level of penstock (Zsfc). Unit = m. Typical Value = 25. Default: nullptr */ + /** \brief Opening section S at the maximum efficiency (Am). Typical Value = 0.7. Default: nullptr */ + CIMPP::PU am; + + /** \brief Area of the surge tank (A). Unit = m. Typical Value = 30. Default: nullptr */ + CIMPP::Area av0; + + /** \brief Area of the compensation tank (A). Unit = m. Typical Value = 700. Default: nullptr */ + CIMPP::Area av1; + + /** \brief Droop (Bp). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU bp; + + /** \brief Intentional dead-band width (DB1). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Maximum efficiency (EtaMax). Typical Value = 1.05. Default: nullptr */ + CIMPP::PU etamax; + + /** \brief Governor control flag (Cflag). Typical Value = mechanicHydrolicTachoAccelerator. Default: 0 */ + CIMPP::FrancisGovernorControlKind governorControl; + + /** \brief Head of compensation chamber water level with respect to the level of penstock (H). Unit = m. Typical Value = 4. Default: nullptr */ + CIMPP::Length h1; + + /** \brief Head of surge tank water level with respect to the level of penstock (H). Unit = m. Typical Value = 40. Default: nullptr */ + CIMPP::Length h2; + + /** \brief Rated hydraulic head (H). Unit = m. Typical Value = 250. Default: nullptr */ + CIMPP::Length hn; + + /** \brief Penstock loss coefficient (due to friction) (Kc). Typical Value = 0.025. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Water tunnel and surge chamber loss coefficient (due to friction) (Kg). Typical Value = 0.025. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Washout gain (Kt). Typical Value = 0.25. Default: nullptr */ + CIMPP::PU kt; + + /** \brief No-load turbine flow at nominal head (Qc0). Typical Value = 0.21. Default: nullptr */ + CIMPP::PU qc0; + + /** \brief Rated flow (Q). Unit = m/s. Typical Value = 40. Default: nullptr */ + CIMPP::VolumeFlowRate qn; + + /** \brief Derivative gain (Ta). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Washout time constant (Td). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Gate servo time constant (Ts). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds ts; + + /** \brief Water inertia time constant (Twnc). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds twnc; + + /** \brief Water tunnel and surge chamber inertia time constant (Twng). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds twng; + + /** \brief Derivative feedback gain (Tx). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tx; + + /** \brief Maximum gate opening velocity (Va). Unit = PU/sec. Typical Value = 0.011. Default: nullptr */ + CIMPP::Simple_Float va; + + /** \brief Maximum gate opening (ValvMax). Typical Value = 1. Default: nullptr */ + CIMPP::PU valvmax; + + /** \brief Minimum gate opening (ValvMin). Typical Value = 0. Default: nullptr */ + CIMPP::PU valvmin; + + /** \brief Maximum gate closing velocity (Vc). Unit = PU/sec. Typical Value = -0.011. Default: nullptr */ + CIMPP::Simple_Float vc; + + /** \brief Water tunnel and surge chamber simulation (Tflag). true = enable of water tunnel and surge chamber simulation false = inhibit of water tunnel and surge chamber simulation. Typical Value = false. Default: false */ + CIMPP::Boolean waterTunnelSurgeChamberSimulation; + + /** \brief Head of upper water level with respect to the level of penstock (Zsfc). Unit = m. Typical Value = 25. Default: nullptr */ + CIMPP::Length zsfc; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GovHydroIEEE0.cpp b/CGMES_2.4.13_18DEC2013/GovHydroIEEE0.cpp index 1d00646d8..7038d0233 100644 --- a/CGMES_2.4.13_18DEC2013/GovHydroIEEE0.cpp +++ b/CGMES_2.4.13_18DEC2013/GovHydroIEEE0.cpp @@ -8,19 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -GovHydroIEEE0::GovHydroIEEE0() {}; -GovHydroIEEE0::~GovHydroIEEE0() {}; +GovHydroIEEE0::GovHydroIEEE0() {} +GovHydroIEEE0::~GovHydroIEEE0() {} static const std::list PossibleProfilesForClass = { @@ -54,116 +46,122 @@ GovHydroIEEE0::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroIEEE0_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE0_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE0_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE0_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE0_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE0_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE0_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE0_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE0_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE0_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE0_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE0_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE0_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE0_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE0_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE0_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroIEEE0_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -177,7 +175,8 @@ bool get_GovHydroIEEE0_k(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroIEEE0_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -191,7 +190,8 @@ bool get_GovHydroIEEE0_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream bool get_GovHydroIEEE0_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -205,7 +205,8 @@ bool get_GovHydroIEEE0_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE0_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -219,7 +220,8 @@ bool get_GovHydroIEEE0_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE0_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -233,7 +235,8 @@ bool get_GovHydroIEEE0_t1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroIEEE0_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -247,7 +250,8 @@ bool get_GovHydroIEEE0_t2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroIEEE0_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -261,7 +265,8 @@ bool get_GovHydroIEEE0_t3(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroIEEE0_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -273,8 +278,6 @@ bool get_GovHydroIEEE0_t4(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char GovHydroIEEE0::debugName[] = "GovHydroIEEE0"; const char* GovHydroIEEE0::debugString() const { @@ -283,19 +286,19 @@ const char* GovHydroIEEE0::debugString() const void GovHydroIEEE0::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroIEEE0"), &GovHydroIEEE0_factory)); + factory_map.emplace("cim:GovHydroIEEE0", &GovHydroIEEE0_factory); } void GovHydroIEEE0::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE0.k"), &assign_GovHydroIEEE0_k)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE0.mwbase"), &assign_GovHydroIEEE0_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE0.pmax"), &assign_GovHydroIEEE0_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE0.pmin"), &assign_GovHydroIEEE0_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE0.t1"), &assign_GovHydroIEEE0_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE0.t2"), &assign_GovHydroIEEE0_t2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE0.t3"), &assign_GovHydroIEEE0_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE0.t4"), &assign_GovHydroIEEE0_t4)); + assign_map.emplace("cim:GovHydroIEEE0.k", &assign_GovHydroIEEE0_k); + assign_map.emplace("cim:GovHydroIEEE0.mwbase", &assign_GovHydroIEEE0_mwbase); + assign_map.emplace("cim:GovHydroIEEE0.pmax", &assign_GovHydroIEEE0_pmax); + assign_map.emplace("cim:GovHydroIEEE0.pmin", &assign_GovHydroIEEE0_pmin); + assign_map.emplace("cim:GovHydroIEEE0.t1", &assign_GovHydroIEEE0_t1); + assign_map.emplace("cim:GovHydroIEEE0.t2", &assign_GovHydroIEEE0_t2); + assign_map.emplace("cim:GovHydroIEEE0.t3", &assign_GovHydroIEEE0_t3); + assign_map.emplace("cim:GovHydroIEEE0.t4", &assign_GovHydroIEEE0_t4); } void GovHydroIEEE0::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/GovHydroIEEE0.hpp b/CGMES_2.4.13_18DEC2013/GovHydroIEEE0.hpp index aafbd9a2a..715982cd2 100644 --- a/CGMES_2.4.13_18DEC2013/GovHydroIEEE0.hpp +++ b/CGMES_2.4.13_18DEC2013/GovHydroIEEE0.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE Simplified Hydro Governor-Turbine Model. Used for Mechanical-Hydraulic and Electro-Hydraulic turbine governors, with our without steam feedback. Typical values given are for Mechanical-Hydraulic. Ref - */ + /** \brief IEEE Simplified Hydro Governor-Turbine Model. Used for Mechanical-Hydraulic and Electro-Hydraulic turbine governors, with our without steam feedback. Typical values given are for Mechanical-Hydraulic. Ref */ class GovHydroIEEE0 : public TurbineGovernorDynamics { public: @@ -29,14 +27,29 @@ namespace CIMPP GovHydroIEEE0(); ~GovHydroIEEE0() override; - CIMPP::PU k; /* Governor gain (K. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ - CIMPP::PU pmax; /* Gate maximum (Pmax). Default: nullptr */ - CIMPP::PU pmin; /* Gate minimum (Pmin). Default: nullptr */ - CIMPP::Seconds t1; /* Governor lag time constant (T1). Typical Value = 0.25. Default: nullptr */ - CIMPP::Seconds t2; /* Governor lead time constant (T2. Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t3; /* Gate actuator time constant (T3). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t4; /* Water starting time (T4). Default: nullptr */ + /** \brief Governor gain (K. Default: nullptr */ + CIMPP::PU k; + + /** \brief Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Gate maximum (Pmax). Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Gate minimum (Pmin). Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Governor lag time constant (T1). Typical Value = 0.25. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Governor lead time constant (T2. Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Gate actuator time constant (T3). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Water starting time (T4). Default: nullptr */ + CIMPP::Seconds t4; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GovHydroIEEE2.cpp b/CGMES_2.4.13_18DEC2013/GovHydroIEEE2.cpp index 09445cf65..abbf5cf5e 100644 --- a/CGMES_2.4.13_18DEC2013/GovHydroIEEE2.cpp +++ b/CGMES_2.4.13_18DEC2013/GovHydroIEEE2.cpp @@ -8,37 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -GovHydroIEEE2::GovHydroIEEE2() {}; -GovHydroIEEE2::~GovHydroIEEE2() {}; +GovHydroIEEE2::GovHydroIEEE2() {} +GovHydroIEEE2::~GovHydroIEEE2() {} static const std::list PossibleProfilesForClass = { @@ -90,350 +64,374 @@ GovHydroIEEE2::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroIEEE2_aturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_aturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->aturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_bturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_bturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_gv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_kturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_kturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_pgv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_rperm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_rperm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rperm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_rtemp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_rtemp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rtemp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_uc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_uo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_uo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroIEEE2_aturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->aturb; if (!buffer.str().empty()) @@ -447,7 +445,8 @@ bool get_GovHydroIEEE2_aturb(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_bturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bturb; if (!buffer.str().empty()) @@ -461,7 +460,8 @@ bool get_GovHydroIEEE2_bturb(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -475,7 +475,8 @@ bool get_GovHydroIEEE2_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroIEEE2_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -489,7 +490,8 @@ bool get_GovHydroIEEE2_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroIEEE2_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -503,7 +505,8 @@ bool get_GovHydroIEEE2_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroIEEE2_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -517,7 +520,8 @@ bool get_GovHydroIEEE2_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroIEEE2_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -531,7 +535,8 @@ bool get_GovHydroIEEE2_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroIEEE2_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv6; if (!buffer.str().empty()) @@ -545,7 +550,8 @@ bool get_GovHydroIEEE2_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroIEEE2_kturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kturb; if (!buffer.str().empty()) @@ -559,7 +565,8 @@ bool get_GovHydroIEEE2_kturb(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -573,7 +580,8 @@ bool get_GovHydroIEEE2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream bool get_GovHydroIEEE2_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -587,7 +595,8 @@ bool get_GovHydroIEEE2_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -601,7 +610,8 @@ bool get_GovHydroIEEE2_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -615,7 +625,8 @@ bool get_GovHydroIEEE2_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -629,7 +640,8 @@ bool get_GovHydroIEEE2_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -643,7 +655,8 @@ bool get_GovHydroIEEE2_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv6; if (!buffer.str().empty()) @@ -657,7 +670,8 @@ bool get_GovHydroIEEE2_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -671,7 +685,8 @@ bool get_GovHydroIEEE2_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -685,7 +700,8 @@ bool get_GovHydroIEEE2_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rperm; if (!buffer.str().empty()) @@ -699,7 +715,8 @@ bool get_GovHydroIEEE2_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_rtemp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rtemp; if (!buffer.str().empty()) @@ -713,7 +730,8 @@ bool get_GovHydroIEEE2_rtemp(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -727,7 +745,8 @@ bool get_GovHydroIEEE2_tg(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroIEEE2_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -741,7 +760,8 @@ bool get_GovHydroIEEE2_tp(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroIEEE2_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -755,7 +775,8 @@ bool get_GovHydroIEEE2_tr(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroIEEE2_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -769,7 +790,8 @@ bool get_GovHydroIEEE2_tw(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroIEEE2_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uc; if (!buffer.str().empty()) @@ -783,7 +805,8 @@ bool get_GovHydroIEEE2_uc(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroIEEE2_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uo; if (!buffer.str().empty()) @@ -795,8 +818,6 @@ bool get_GovHydroIEEE2_uo(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char GovHydroIEEE2::debugName[] = "GovHydroIEEE2"; const char* GovHydroIEEE2::debugString() const { @@ -805,37 +826,37 @@ const char* GovHydroIEEE2::debugString() const void GovHydroIEEE2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2"), &GovHydroIEEE2_factory)); + factory_map.emplace("cim:GovHydroIEEE2", &GovHydroIEEE2_factory); } void GovHydroIEEE2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.aturb"), &assign_GovHydroIEEE2_aturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.bturb"), &assign_GovHydroIEEE2_bturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.gv1"), &assign_GovHydroIEEE2_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.gv2"), &assign_GovHydroIEEE2_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.gv3"), &assign_GovHydroIEEE2_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.gv4"), &assign_GovHydroIEEE2_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.gv5"), &assign_GovHydroIEEE2_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.gv6"), &assign_GovHydroIEEE2_gv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.kturb"), &assign_GovHydroIEEE2_kturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.mwbase"), &assign_GovHydroIEEE2_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.pgv1"), &assign_GovHydroIEEE2_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.pgv2"), &assign_GovHydroIEEE2_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.pgv3"), &assign_GovHydroIEEE2_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.pgv4"), &assign_GovHydroIEEE2_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.pgv5"), &assign_GovHydroIEEE2_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.pgv6"), &assign_GovHydroIEEE2_pgv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.pmax"), &assign_GovHydroIEEE2_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.pmin"), &assign_GovHydroIEEE2_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.rperm"), &assign_GovHydroIEEE2_rperm)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.rtemp"), &assign_GovHydroIEEE2_rtemp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.tg"), &assign_GovHydroIEEE2_tg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.tp"), &assign_GovHydroIEEE2_tp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.tr"), &assign_GovHydroIEEE2_tr)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.tw"), &assign_GovHydroIEEE2_tw)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.uc"), &assign_GovHydroIEEE2_uc)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.uo"), &assign_GovHydroIEEE2_uo)); + assign_map.emplace("cim:GovHydroIEEE2.aturb", &assign_GovHydroIEEE2_aturb); + assign_map.emplace("cim:GovHydroIEEE2.bturb", &assign_GovHydroIEEE2_bturb); + assign_map.emplace("cim:GovHydroIEEE2.gv1", &assign_GovHydroIEEE2_gv1); + assign_map.emplace("cim:GovHydroIEEE2.gv2", &assign_GovHydroIEEE2_gv2); + assign_map.emplace("cim:GovHydroIEEE2.gv3", &assign_GovHydroIEEE2_gv3); + assign_map.emplace("cim:GovHydroIEEE2.gv4", &assign_GovHydroIEEE2_gv4); + assign_map.emplace("cim:GovHydroIEEE2.gv5", &assign_GovHydroIEEE2_gv5); + assign_map.emplace("cim:GovHydroIEEE2.gv6", &assign_GovHydroIEEE2_gv6); + assign_map.emplace("cim:GovHydroIEEE2.kturb", &assign_GovHydroIEEE2_kturb); + assign_map.emplace("cim:GovHydroIEEE2.mwbase", &assign_GovHydroIEEE2_mwbase); + assign_map.emplace("cim:GovHydroIEEE2.pgv1", &assign_GovHydroIEEE2_pgv1); + assign_map.emplace("cim:GovHydroIEEE2.pgv2", &assign_GovHydroIEEE2_pgv2); + assign_map.emplace("cim:GovHydroIEEE2.pgv3", &assign_GovHydroIEEE2_pgv3); + assign_map.emplace("cim:GovHydroIEEE2.pgv4", &assign_GovHydroIEEE2_pgv4); + assign_map.emplace("cim:GovHydroIEEE2.pgv5", &assign_GovHydroIEEE2_pgv5); + assign_map.emplace("cim:GovHydroIEEE2.pgv6", &assign_GovHydroIEEE2_pgv6); + assign_map.emplace("cim:GovHydroIEEE2.pmax", &assign_GovHydroIEEE2_pmax); + assign_map.emplace("cim:GovHydroIEEE2.pmin", &assign_GovHydroIEEE2_pmin); + assign_map.emplace("cim:GovHydroIEEE2.rperm", &assign_GovHydroIEEE2_rperm); + assign_map.emplace("cim:GovHydroIEEE2.rtemp", &assign_GovHydroIEEE2_rtemp); + assign_map.emplace("cim:GovHydroIEEE2.tg", &assign_GovHydroIEEE2_tg); + assign_map.emplace("cim:GovHydroIEEE2.tp", &assign_GovHydroIEEE2_tp); + assign_map.emplace("cim:GovHydroIEEE2.tr", &assign_GovHydroIEEE2_tr); + assign_map.emplace("cim:GovHydroIEEE2.tw", &assign_GovHydroIEEE2_tw); + assign_map.emplace("cim:GovHydroIEEE2.uc", &assign_GovHydroIEEE2_uc); + assign_map.emplace("cim:GovHydroIEEE2.uo", &assign_GovHydroIEEE2_uo); } void GovHydroIEEE2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/GovHydroIEEE2.hpp b/CGMES_2.4.13_18DEC2013/GovHydroIEEE2.hpp index 579366ede..33d231831 100644 --- a/CGMES_2.4.13_18DEC2013/GovHydroIEEE2.hpp +++ b/CGMES_2.4.13_18DEC2013/GovHydroIEEE2.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE hydro turbine governor model represents plants with straightforward penstock configurations and hydraulic-dashpot governors. Ref - */ + /** \brief IEEE hydro turbine governor model represents plants with straightforward penstock configurations and hydraulic-dashpot governors. Ref */ class GovHydroIEEE2 : public TurbineGovernorDynamics { public: @@ -30,32 +28,83 @@ namespace CIMPP GovHydroIEEE2(); ~GovHydroIEEE2() override; - CIMPP::PU aturb; /* Turbine numerator multiplier (Aturb). Typical Value = -1. Default: nullptr */ - CIMPP::PU bturb; /* Turbine denominator multiplier (Bturb). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU gv1; /* Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv6; /* Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU kturb; /* Turbine gain (Kturb). Typical Value = 1. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv6; /* Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU pmax; /* Maximum gate opening (Pmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum gate opening (Pmin). Typical Value = 0. Default: nullptr */ - CIMPP::PU rperm; /* Permanent droop (Rperm). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU rtemp; /* Temporary droop (Rtemp). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tg; /* Gate servo time constant (Tg). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tp; /* Pilot servo valve time constant (Tp). Typical Value = 0.03. Default: nullptr */ - CIMPP::Seconds tr; /* Dashpot time constant (Tr). Typical Value = 12. Default: nullptr */ - CIMPP::Seconds tw; /* Water inertia time constant (Tw). Typical Value = 2. Default: nullptr */ - CIMPP::Simple_Float uc; /* Maximum gate closing velocity (Uc) (<0). Typical Value = -0.1. Default: nullptr */ - CIMPP::Simple_Float uo; /* Maximum gate opening velocity (Uo). Unit = PU/sec. Typical Value = 0.1. Default: nullptr */ + /** \brief Turbine numerator multiplier (Aturb). Typical Value = -1. Default: nullptr */ + CIMPP::PU aturb; + + /** \brief Turbine denominator multiplier (Bturb). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU bturb; + + /** \brief Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv6; + + /** \brief Turbine gain (Kturb). Typical Value = 1. Default: nullptr */ + CIMPP::PU kturb; + + /** \brief Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv6; + + /** \brief Maximum gate opening (Pmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum gate opening (Pmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Permanent droop (Rperm). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU rperm; + + /** \brief Temporary droop (Rtemp). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU rtemp; + + /** \brief Gate servo time constant (Tg). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Pilot servo valve time constant (Tp). Typical Value = 0.03. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Dashpot time constant (Tr). Typical Value = 12. Default: nullptr */ + CIMPP::Seconds tr; + + /** \brief Water inertia time constant (Tw). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds tw; + + /** \brief Maximum gate closing velocity (Uc) (<0). Typical Value = -0.1. Default: nullptr */ + CIMPP::Simple_Float uc; + + /** \brief Maximum gate opening velocity (Uo). Unit = PU/sec. Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float uo; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GovHydroPID.cpp b/CGMES_2.4.13_18DEC2013/GovHydroPID.cpp index 776008c7f..45136a44f 100644 --- a/CGMES_2.4.13_18DEC2013/GovHydroPID.cpp +++ b/CGMES_2.4.13_18DEC2013/GovHydroPID.cpp @@ -8,44 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Frequency.hpp" -#include "ActivePower.hpp" -#include "Frequency.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -GovHydroPID::GovHydroPID() {}; -GovHydroPID::~GovHydroPID() {}; +GovHydroPID::GovHydroPID() {} +GovHydroPID::~GovHydroPID() {} static const std::list PossibleProfilesForClass = { @@ -104,441 +71,472 @@ GovHydroPID::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroPID_aturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_aturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->aturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_bturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_bturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_eps(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eps; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_gv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_inputSignal(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_inputSignal(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_pgv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_tt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_tturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_tturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_velcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_velcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velcl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_velop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_velop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroPID_aturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->aturb; if (!buffer.str().empty()) @@ -552,7 +550,8 @@ bool get_GovHydroPID_aturb(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPID_bturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bturb; if (!buffer.str().empty()) @@ -566,7 +565,8 @@ bool get_GovHydroPID_bturb(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPID_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -580,7 +580,8 @@ bool get_GovHydroPID_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -594,7 +595,8 @@ bool get_GovHydroPID_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eps; if (!buffer.str().empty()) @@ -608,7 +610,8 @@ bool get_GovHydroPID_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -622,7 +625,8 @@ bool get_GovHydroPID_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -636,7 +640,8 @@ bool get_GovHydroPID_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -650,7 +655,8 @@ bool get_GovHydroPID_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -664,7 +670,8 @@ bool get_GovHydroPID_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -678,7 +685,8 @@ bool get_GovHydroPID_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv6; if (!buffer.str().empty()) @@ -692,7 +700,8 @@ bool get_GovHydroPID_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID_inputSignal(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inputSignal; if (!buffer.str().empty()) @@ -706,7 +715,8 @@ bool get_GovHydroPID_inputSignal(const BaseClass* BaseClass_ptr1, std::stringstr bool get_GovHydroPID_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -720,7 +730,8 @@ bool get_GovHydroPID_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroPID_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -734,7 +745,8 @@ bool get_GovHydroPID_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroPID_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -748,7 +760,8 @@ bool get_GovHydroPID_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroPID_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -762,7 +775,8 @@ bool get_GovHydroPID_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroPID_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -776,7 +790,8 @@ bool get_GovHydroPID_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPID_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -790,7 +805,8 @@ bool get_GovHydroPID_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroPID_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -804,7 +820,8 @@ bool get_GovHydroPID_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroPID_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -818,7 +835,8 @@ bool get_GovHydroPID_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroPID_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -832,7 +850,8 @@ bool get_GovHydroPID_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroPID_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -846,7 +865,8 @@ bool get_GovHydroPID_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroPID_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv6; if (!buffer.str().empty()) @@ -860,7 +880,8 @@ bool get_GovHydroPID_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroPID_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -874,7 +895,8 @@ bool get_GovHydroPID_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroPID_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -888,7 +910,8 @@ bool get_GovHydroPID_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroPID_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -902,7 +925,8 @@ bool get_GovHydroPID_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroPID_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -916,7 +940,8 @@ bool get_GovHydroPID_td(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroPID_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -930,7 +955,8 @@ bool get_GovHydroPID_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroPID_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -944,7 +970,8 @@ bool get_GovHydroPID_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroPID_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tt; if (!buffer.str().empty()) @@ -958,7 +985,8 @@ bool get_GovHydroPID_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroPID_tturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tturb; if (!buffer.str().empty()) @@ -972,7 +1000,8 @@ bool get_GovHydroPID_tturb(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPID_velcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velcl; if (!buffer.str().empty()) @@ -986,7 +1015,8 @@ bool get_GovHydroPID_velcl(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPID_velop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velop; if (!buffer.str().empty()) @@ -998,8 +1028,6 @@ bool get_GovHydroPID_velop(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char GovHydroPID::debugName[] = "GovHydroPID"; const char* GovHydroPID::debugString() const { @@ -1008,44 +1036,44 @@ const char* GovHydroPID::debugString() const void GovHydroPID::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroPID"), &GovHydroPID_factory)); + factory_map.emplace("cim:GovHydroPID", &GovHydroPID_factory); } void GovHydroPID::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.aturb"), &assign_GovHydroPID_aturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.bturb"), &assign_GovHydroPID_bturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.db1"), &assign_GovHydroPID_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.db2"), &assign_GovHydroPID_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.eps"), &assign_GovHydroPID_eps)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.gv1"), &assign_GovHydroPID_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.gv2"), &assign_GovHydroPID_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.gv3"), &assign_GovHydroPID_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.gv4"), &assign_GovHydroPID_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.gv5"), &assign_GovHydroPID_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.gv6"), &assign_GovHydroPID_gv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.inputSignal"), &assign_GovHydroPID_inputSignal)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.kd"), &assign_GovHydroPID_kd)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.kg"), &assign_GovHydroPID_kg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.ki"), &assign_GovHydroPID_ki)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.kp"), &assign_GovHydroPID_kp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.mwbase"), &assign_GovHydroPID_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.pgv1"), &assign_GovHydroPID_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.pgv2"), &assign_GovHydroPID_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.pgv3"), &assign_GovHydroPID_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.pgv4"), &assign_GovHydroPID_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.pgv5"), &assign_GovHydroPID_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.pgv6"), &assign_GovHydroPID_pgv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.pmax"), &assign_GovHydroPID_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.pmin"), &assign_GovHydroPID_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.r"), &assign_GovHydroPID_r)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.td"), &assign_GovHydroPID_td)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.tf"), &assign_GovHydroPID_tf)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.tp"), &assign_GovHydroPID_tp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.tt"), &assign_GovHydroPID_tt)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.tturb"), &assign_GovHydroPID_tturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.velcl"), &assign_GovHydroPID_velcl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.velop"), &assign_GovHydroPID_velop)); + assign_map.emplace("cim:GovHydroPID.aturb", &assign_GovHydroPID_aturb); + assign_map.emplace("cim:GovHydroPID.bturb", &assign_GovHydroPID_bturb); + assign_map.emplace("cim:GovHydroPID.db1", &assign_GovHydroPID_db1); + assign_map.emplace("cim:GovHydroPID.db2", &assign_GovHydroPID_db2); + assign_map.emplace("cim:GovHydroPID.eps", &assign_GovHydroPID_eps); + assign_map.emplace("cim:GovHydroPID.gv1", &assign_GovHydroPID_gv1); + assign_map.emplace("cim:GovHydroPID.gv2", &assign_GovHydroPID_gv2); + assign_map.emplace("cim:GovHydroPID.gv3", &assign_GovHydroPID_gv3); + assign_map.emplace("cim:GovHydroPID.gv4", &assign_GovHydroPID_gv4); + assign_map.emplace("cim:GovHydroPID.gv5", &assign_GovHydroPID_gv5); + assign_map.emplace("cim:GovHydroPID.gv6", &assign_GovHydroPID_gv6); + assign_map.emplace("cim:GovHydroPID.inputSignal", &assign_GovHydroPID_inputSignal); + assign_map.emplace("cim:GovHydroPID.kd", &assign_GovHydroPID_kd); + assign_map.emplace("cim:GovHydroPID.kg", &assign_GovHydroPID_kg); + assign_map.emplace("cim:GovHydroPID.ki", &assign_GovHydroPID_ki); + assign_map.emplace("cim:GovHydroPID.kp", &assign_GovHydroPID_kp); + assign_map.emplace("cim:GovHydroPID.mwbase", &assign_GovHydroPID_mwbase); + assign_map.emplace("cim:GovHydroPID.pgv1", &assign_GovHydroPID_pgv1); + assign_map.emplace("cim:GovHydroPID.pgv2", &assign_GovHydroPID_pgv2); + assign_map.emplace("cim:GovHydroPID.pgv3", &assign_GovHydroPID_pgv3); + assign_map.emplace("cim:GovHydroPID.pgv4", &assign_GovHydroPID_pgv4); + assign_map.emplace("cim:GovHydroPID.pgv5", &assign_GovHydroPID_pgv5); + assign_map.emplace("cim:GovHydroPID.pgv6", &assign_GovHydroPID_pgv6); + assign_map.emplace("cim:GovHydroPID.pmax", &assign_GovHydroPID_pmax); + assign_map.emplace("cim:GovHydroPID.pmin", &assign_GovHydroPID_pmin); + assign_map.emplace("cim:GovHydroPID.r", &assign_GovHydroPID_r); + assign_map.emplace("cim:GovHydroPID.td", &assign_GovHydroPID_td); + assign_map.emplace("cim:GovHydroPID.tf", &assign_GovHydroPID_tf); + assign_map.emplace("cim:GovHydroPID.tp", &assign_GovHydroPID_tp); + assign_map.emplace("cim:GovHydroPID.tt", &assign_GovHydroPID_tt); + assign_map.emplace("cim:GovHydroPID.tturb", &assign_GovHydroPID_tturb); + assign_map.emplace("cim:GovHydroPID.velcl", &assign_GovHydroPID_velcl); + assign_map.emplace("cim:GovHydroPID.velop", &assign_GovHydroPID_velop); } void GovHydroPID::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/GovHydroPID.hpp b/CGMES_2.4.13_18DEC2013/GovHydroPID.hpp index f39106205..2d69e696b 100644 --- a/CGMES_2.4.13_18DEC2013/GovHydroPID.hpp +++ b/CGMES_2.4.13_18DEC2013/GovHydroPID.hpp @@ -22,9 +22,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - PID governor and turbine. - */ + /** \brief PID governor and turbine. */ class GovHydroPID : public TurbineGovernorDynamics { public: @@ -32,39 +30,104 @@ namespace CIMPP GovHydroPID(); ~GovHydroPID() override; - CIMPP::PU aturb; /* Turbine numerator multiplier (Aturb) (note 3). Typical Value -1. Default: nullptr */ - CIMPP::PU bturb; /* Turbine denominator multiplier (Bturb) (note 3). Typical Value = 0.5. Default: nullptr */ - CIMPP::Frequency db1; /* Intentional dead-band width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower db2; /* Unintentional dead-band (db2). Unit = MW. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency eps; /* Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::PU gv1; /* Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv6; /* Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ - CIMPP::Boolean inputSignal; /* Input signal switch (Flag). true = Pe input is used false = feedback is received from CV. Flag is normally dependent on Tt. If Tf is zero, Flag is set to false. If Tf is not zero, Flag is set to true. Typical Value = true. Default: false */ - CIMPP::PU kd; /* Derivative gain (Kd). Typical Value = 1.11. Default: nullptr */ - CIMPP::PU kg; /* Gate servo gain (Kg). Typical Value = 2.5. Default: nullptr */ - CIMPP::PU ki; /* Integral gain (Ki). Typical Value = 0.36. Default: nullptr */ - CIMPP::PU kp; /* Proportional gain (Kp). Typical Value = 0.1. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv6; /* Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU pmax; /* Maximum gate opening, PU of MWbase (Pmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum gate opening, PU of MWbase (Pmin). Typical Value = 0. Default: nullptr */ - CIMPP::PU r; /* Steady state droop (R). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds td; /* Input filter time constant (Td). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tf; /* Washout time constant (Tf). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tp; /* Gate servo time constant (Tp). Typical Value = 0.35. Default: nullptr */ - CIMPP::Seconds tt; /* Power feedback time constant (Tt). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds tturb; /* Turbine time constant (Tturb) (note 3). Typical Value = 0.8. Default: nullptr */ - CIMPP::Simple_Float velcl; /* Maximum gate closing velocity (Velcl). Unit = PU/sec. Typical Value = -0.14. Default: nullptr */ - CIMPP::Simple_Float velop; /* Maximum gate opening velocity (Velop). Unit = PU/sec. Typical Value = 0.09. Default: nullptr */ + /** \brief Turbine numerator multiplier (Aturb) (note 3). Typical Value -1. Default: nullptr */ + CIMPP::PU aturb; + + /** \brief Turbine denominator multiplier (Bturb) (note 3). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU bturb; + + /** \brief Intentional dead-band width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Unintentional dead-band (db2). Unit = MW. Typical Value = 0. Default: nullptr */ + CIMPP::ActivePower db2; + + /** \brief Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency eps; + + /** \brief Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv6; + + /** \brief Input signal switch (Flag). true = Pe input is used false = feedback is received from CV. Flag is normally dependent on Tt. If Tf is zero, Flag is set to false. If Tf is not zero, Flag is set to true. Typical Value = true. Default: false */ + CIMPP::Boolean inputSignal; + + /** \brief Derivative gain (Kd). Typical Value = 1.11. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Gate servo gain (Kg). Typical Value = 2.5. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Integral gain (Ki). Typical Value = 0.36. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Proportional gain (Kp). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv6; + + /** \brief Maximum gate opening, PU of MWbase (Pmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum gate opening, PU of MWbase (Pmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Steady state droop (R). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU r; + + /** \brief Input filter time constant (Td). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Washout time constant (Tf). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Gate servo time constant (Tp). Typical Value = 0.35. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Power feedback time constant (Tt). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds tt; + + /** \brief Turbine time constant (Tturb) (note 3). Typical Value = 0.8. Default: nullptr */ + CIMPP::Seconds tturb; + + /** \brief Maximum gate closing velocity (Velcl). Unit = PU/sec. Typical Value = -0.14. Default: nullptr */ + CIMPP::Simple_Float velcl; + + /** \brief Maximum gate opening velocity (Velop). Unit = PU/sec. Typical Value = 0.09. Default: nullptr */ + CIMPP::Simple_Float velop; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GovHydroPID2.cpp b/CGMES_2.4.13_18DEC2013/GovHydroPID2.cpp index bbbbf968f..59654db7b 100644 --- a/CGMES_2.4.13_18DEC2013/GovHydroPID2.cpp +++ b/CGMES_2.4.13_18DEC2013/GovHydroPID2.cpp @@ -8,33 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -GovHydroPID2::GovHydroPID2() {}; -GovHydroPID2::~GovHydroPID2() {}; +GovHydroPID2::GovHydroPID2() {} +GovHydroPID2::~GovHydroPID2() {} static const std::list PossibleProfilesForClass = { @@ -82,298 +60,318 @@ GovHydroPID2::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroPID2_atw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_atw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->atw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_d(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->d; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_feedbackSignal(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_feedbackSignal(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->feedbackSignal; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_g0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_g0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_g1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_g1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_g2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_g2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_gmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_gmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_gmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_gmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_p1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_p1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_p2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_p2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_p3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_p3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_rperm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_rperm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rperm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_treg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_treg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->treg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_velmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_velmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_velmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_velmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroPID2_atw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->atw; if (!buffer.str().empty()) @@ -387,7 +385,8 @@ bool get_GovHydroPID2_atw(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroPID2_d(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->d; if (!buffer.str().empty()) @@ -401,7 +400,8 @@ bool get_GovHydroPID2_d(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroPID2_feedbackSignal(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->feedbackSignal; if (!buffer.str().empty()) @@ -415,7 +415,8 @@ bool get_GovHydroPID2_feedbackSignal(const BaseClass* BaseClass_ptr1, std::strin bool get_GovHydroPID2_g0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g0; if (!buffer.str().empty()) @@ -429,7 +430,8 @@ bool get_GovHydroPID2_g0(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_g1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g1; if (!buffer.str().empty()) @@ -443,7 +445,8 @@ bool get_GovHydroPID2_g1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_g2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g2; if (!buffer.str().empty()) @@ -457,7 +460,8 @@ bool get_GovHydroPID2_g2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmax; if (!buffer.str().empty()) @@ -471,7 +475,8 @@ bool get_GovHydroPID2_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPID2_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmin; if (!buffer.str().empty()) @@ -485,7 +490,8 @@ bool get_GovHydroPID2_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPID2_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -499,7 +505,8 @@ bool get_GovHydroPID2_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -513,7 +520,8 @@ bool get_GovHydroPID2_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -527,7 +535,8 @@ bool get_GovHydroPID2_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -541,7 +550,8 @@ bool get_GovHydroPID2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPID2_p1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p1; if (!buffer.str().empty()) @@ -555,7 +565,8 @@ bool get_GovHydroPID2_p1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_p2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p2; if (!buffer.str().empty()) @@ -569,7 +580,8 @@ bool get_GovHydroPID2_p2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_p3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p3; if (!buffer.str().empty()) @@ -583,7 +595,8 @@ bool get_GovHydroPID2_p3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rperm; if (!buffer.str().empty()) @@ -597,7 +610,8 @@ bool get_GovHydroPID2_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPID2_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -611,7 +625,8 @@ bool get_GovHydroPID2_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -625,7 +640,8 @@ bool get_GovHydroPID2_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_treg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->treg; if (!buffer.str().empty()) @@ -639,7 +655,8 @@ bool get_GovHydroPID2_treg(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPID2_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -653,7 +670,8 @@ bool get_GovHydroPID2_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_velmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velmax; if (!buffer.str().empty()) @@ -667,7 +685,8 @@ bool get_GovHydroPID2_velmax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPID2_velmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velmin; if (!buffer.str().empty()) @@ -679,8 +698,6 @@ bool get_GovHydroPID2_velmin(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char GovHydroPID2::debugName[] = "GovHydroPID2"; const char* GovHydroPID2::debugString() const { @@ -689,33 +706,33 @@ const char* GovHydroPID2::debugString() const void GovHydroPID2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroPID2"), &GovHydroPID2_factory)); + factory_map.emplace("cim:GovHydroPID2", &GovHydroPID2_factory); } void GovHydroPID2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.atw"), &assign_GovHydroPID2_atw)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.d"), &assign_GovHydroPID2_d)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.feedbackSignal"), &assign_GovHydroPID2_feedbackSignal)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.g0"), &assign_GovHydroPID2_g0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.g1"), &assign_GovHydroPID2_g1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.g2"), &assign_GovHydroPID2_g2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.gmax"), &assign_GovHydroPID2_gmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.gmin"), &assign_GovHydroPID2_gmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.kd"), &assign_GovHydroPID2_kd)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.ki"), &assign_GovHydroPID2_ki)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.kp"), &assign_GovHydroPID2_kp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.mwbase"), &assign_GovHydroPID2_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.p1"), &assign_GovHydroPID2_p1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.p2"), &assign_GovHydroPID2_p2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.p3"), &assign_GovHydroPID2_p3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.rperm"), &assign_GovHydroPID2_rperm)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.ta"), &assign_GovHydroPID2_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.tb"), &assign_GovHydroPID2_tb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.treg"), &assign_GovHydroPID2_treg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.tw"), &assign_GovHydroPID2_tw)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.velmax"), &assign_GovHydroPID2_velmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.velmin"), &assign_GovHydroPID2_velmin)); + assign_map.emplace("cim:GovHydroPID2.atw", &assign_GovHydroPID2_atw); + assign_map.emplace("cim:GovHydroPID2.d", &assign_GovHydroPID2_d); + assign_map.emplace("cim:GovHydroPID2.feedbackSignal", &assign_GovHydroPID2_feedbackSignal); + assign_map.emplace("cim:GovHydroPID2.g0", &assign_GovHydroPID2_g0); + assign_map.emplace("cim:GovHydroPID2.g1", &assign_GovHydroPID2_g1); + assign_map.emplace("cim:GovHydroPID2.g2", &assign_GovHydroPID2_g2); + assign_map.emplace("cim:GovHydroPID2.gmax", &assign_GovHydroPID2_gmax); + assign_map.emplace("cim:GovHydroPID2.gmin", &assign_GovHydroPID2_gmin); + assign_map.emplace("cim:GovHydroPID2.kd", &assign_GovHydroPID2_kd); + assign_map.emplace("cim:GovHydroPID2.ki", &assign_GovHydroPID2_ki); + assign_map.emplace("cim:GovHydroPID2.kp", &assign_GovHydroPID2_kp); + assign_map.emplace("cim:GovHydroPID2.mwbase", &assign_GovHydroPID2_mwbase); + assign_map.emplace("cim:GovHydroPID2.p1", &assign_GovHydroPID2_p1); + assign_map.emplace("cim:GovHydroPID2.p2", &assign_GovHydroPID2_p2); + assign_map.emplace("cim:GovHydroPID2.p3", &assign_GovHydroPID2_p3); + assign_map.emplace("cim:GovHydroPID2.rperm", &assign_GovHydroPID2_rperm); + assign_map.emplace("cim:GovHydroPID2.ta", &assign_GovHydroPID2_ta); + assign_map.emplace("cim:GovHydroPID2.tb", &assign_GovHydroPID2_tb); + assign_map.emplace("cim:GovHydroPID2.treg", &assign_GovHydroPID2_treg); + assign_map.emplace("cim:GovHydroPID2.tw", &assign_GovHydroPID2_tw); + assign_map.emplace("cim:GovHydroPID2.velmax", &assign_GovHydroPID2_velmax); + assign_map.emplace("cim:GovHydroPID2.velmin", &assign_GovHydroPID2_velmin); } void GovHydroPID2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/GovHydroPID2.hpp b/CGMES_2.4.13_18DEC2013/GovHydroPID2.hpp index 5f5d7c1fb..3bbeb694e 100644 --- a/CGMES_2.4.13_18DEC2013/GovHydroPID2.hpp +++ b/CGMES_2.4.13_18DEC2013/GovHydroPID2.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Hydro turbine and governor. Represents plants with straight forward penstock configurations and "three term" electro-hydraulic governors (i.e. Woodard electronic). - */ + /** \brief Hydro turbine and governor. Represents plants with straight forward penstock configurations and "three term" electro-hydraulic governors (i.e. Woodard electronic). */ class GovHydroPID2 : public TurbineGovernorDynamics { public: @@ -31,28 +29,71 @@ namespace CIMPP GovHydroPID2(); ~GovHydroPID2() override; - CIMPP::PU atw; /* Factor multiplying Tw (Atw). Typical Value = 0. Default: nullptr */ - CIMPP::PU d; /* Turbine damping factor (D). Unit = delta P / delta speed. Typical Value = 0. Default: nullptr */ - CIMPP::Boolean feedbackSignal; /* Feedback signal type flag (Flag). true = use gate position feedback signal false = use Pe. Default: false */ - CIMPP::PU g0; /* Gate opening at speed no load (G0). Typical Value = 0. Default: nullptr */ - CIMPP::PU g1; /* Intermediate gate opening (G1). Typical Value = 0. Default: nullptr */ - CIMPP::PU g2; /* Intermediate gate opening (G2). Typical Value = 0. Default: nullptr */ - CIMPP::PU gmax; /* Maximum gate opening (Gmax). Typical Value = 0. Default: nullptr */ - CIMPP::PU gmin; /* Minimum gate opening (Gmin). Typical Value = 0. Default: nullptr */ - CIMPP::PU kd; /* Derivative gain (Kd). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float ki; /* Reset gain (Ki). Unit = PU/ sec. Typical Value = 0. Default: nullptr */ - CIMPP::PU kp; /* Proportional gain (Kp). Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU p1; /* Power at gate opening G1 (P1). Typical Value = 0. Default: nullptr */ - CIMPP::PU p2; /* Power at gate opening G2 (P2). Typical Value = 0. Default: nullptr */ - CIMPP::PU p3; /* Power at full opened gate (P3). Typical Value = 0. Default: nullptr */ - CIMPP::PU rperm; /* Permanent drop (Rperm). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ta; /* Controller time constant (Ta) (>0). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tb; /* Gate servo time constant (Tb) (>0). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds treg; /* Speed detector time constant (Treg). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tw; /* Water inertia time constant (Tw) (>0). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float velmax; /* Maximum gate opening velocity (Velmax). Unit = PU/sec. Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float velmin; /* Maximum gate closing velocity (Velmin). Unit = PU/sec. Typical Value = 0. Default: nullptr */ + /** \brief Factor multiplying Tw (Atw). Typical Value = 0. Default: nullptr */ + CIMPP::PU atw; + + /** \brief Turbine damping factor (D). Unit = delta P / delta speed. Typical Value = 0. Default: nullptr */ + CIMPP::PU d; + + /** \brief Feedback signal type flag (Flag). true = use gate position feedback signal false = use Pe. Default: false */ + CIMPP::Boolean feedbackSignal; + + /** \brief Gate opening at speed no load (G0). Typical Value = 0. Default: nullptr */ + CIMPP::PU g0; + + /** \brief Intermediate gate opening (G1). Typical Value = 0. Default: nullptr */ + CIMPP::PU g1; + + /** \brief Intermediate gate opening (G2). Typical Value = 0. Default: nullptr */ + CIMPP::PU g2; + + /** \brief Maximum gate opening (Gmax). Typical Value = 0. Default: nullptr */ + CIMPP::PU gmax; + + /** \brief Minimum gate opening (Gmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU gmin; + + /** \brief Derivative gain (Kd). Typical Value = 0. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Reset gain (Ki). Unit = PU/ sec. Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float ki; + + /** \brief Proportional gain (Kp). Typical Value = 0. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Power at gate opening G1 (P1). Typical Value = 0. Default: nullptr */ + CIMPP::PU p1; + + /** \brief Power at gate opening G2 (P2). Typical Value = 0. Default: nullptr */ + CIMPP::PU p2; + + /** \brief Power at full opened gate (P3). Typical Value = 0. Default: nullptr */ + CIMPP::PU p3; + + /** \brief Permanent drop (Rperm). Typical Value = 0. Default: nullptr */ + CIMPP::PU rperm; + + /** \brief Controller time constant (Ta) (>0). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Gate servo time constant (Tb) (>0). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Speed detector time constant (Treg). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds treg; + + /** \brief Water inertia time constant (Tw) (>0). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tw; + + /** \brief Maximum gate opening velocity (Velmax). Unit = PU/sec. Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float velmax; + + /** \brief Maximum gate closing velocity (Velmin). Unit = PU/sec. Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float velmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GovHydroPelton.cpp b/CGMES_2.4.13_18DEC2013/GovHydroPelton.cpp index a2ef71006..1f8f2bbfe 100644 --- a/CGMES_2.4.13_18DEC2013/GovHydroPelton.cpp +++ b/CGMES_2.4.13_18DEC2013/GovHydroPelton.cpp @@ -8,39 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Area.hpp" -#include "Area.hpp" -#include "PU.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "Length.hpp" -#include "Length.hpp" -#include "Length.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "VolumeFlowRate.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Length.hpp" using namespace CIMPP; -GovHydroPelton::GovHydroPelton() {}; -GovHydroPelton::~GovHydroPelton() {}; +GovHydroPelton::GovHydroPelton() {} +GovHydroPelton::~GovHydroPelton() {} static const std::list PossibleProfilesForClass = { @@ -94,376 +66,402 @@ GovHydroPelton::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroPelton_av0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_av0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->av0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_av1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_av1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->av1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_bp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_bp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_h1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_h1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->h1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_h2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_h2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->h2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_hn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_hn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->hn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_qc0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_qc0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qc0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_qn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_qn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_simplifiedPelton(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_simplifiedPelton(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->simplifiedPelton; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_staticCompensating(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_staticCompensating(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->staticCompensating; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_ts(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_ts(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_tv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_tv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_twnc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_twnc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->twnc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_twng(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_twng(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->twng; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_tx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_tx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_va(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_va(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->va; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_valvmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_valvmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->valvmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_valvmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_valvmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->valvmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_vav(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_vav(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vav; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_vc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_vc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_vcv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_vcv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vcv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_waterTunnelSurgeChamberSimulation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_waterTunnelSurgeChamberSimulation(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->waterTunnelSurgeChamberSimulation; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_zsfc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_zsfc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->zsfc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroPelton_av0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->av0; if (!buffer.str().empty()) @@ -477,7 +475,8 @@ bool get_GovHydroPelton_av0(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPelton_av1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->av1; if (!buffer.str().empty()) @@ -491,7 +490,8 @@ bool get_GovHydroPelton_av1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPelton_bp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bp; if (!buffer.str().empty()) @@ -505,7 +505,8 @@ bool get_GovHydroPelton_bp(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -519,7 +520,8 @@ bool get_GovHydroPelton_db1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPelton_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -533,7 +535,8 @@ bool get_GovHydroPelton_db2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPelton_h1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->h1; if (!buffer.str().empty()) @@ -547,7 +550,8 @@ bool get_GovHydroPelton_h1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_h2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->h2; if (!buffer.str().empty()) @@ -561,7 +565,8 @@ bool get_GovHydroPelton_h2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_hn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hn; if (!buffer.str().empty()) @@ -575,7 +580,8 @@ bool get_GovHydroPelton_hn(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -589,7 +595,8 @@ bool get_GovHydroPelton_kc(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -603,7 +610,8 @@ bool get_GovHydroPelton_kg(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_qc0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qc0; if (!buffer.str().empty()) @@ -617,7 +625,8 @@ bool get_GovHydroPelton_qc0(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPelton_qn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qn; if (!buffer.str().empty()) @@ -631,7 +640,8 @@ bool get_GovHydroPelton_qn(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_simplifiedPelton(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->simplifiedPelton; if (!buffer.str().empty()) @@ -645,7 +655,8 @@ bool get_GovHydroPelton_simplifiedPelton(const BaseClass* BaseClass_ptr1, std::s bool get_GovHydroPelton_staticCompensating(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->staticCompensating; if (!buffer.str().empty()) @@ -659,7 +670,8 @@ bool get_GovHydroPelton_staticCompensating(const BaseClass* BaseClass_ptr1, std: bool get_GovHydroPelton_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -673,7 +685,8 @@ bool get_GovHydroPelton_ta(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_ts(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts; if (!buffer.str().empty()) @@ -687,7 +700,8 @@ bool get_GovHydroPelton_ts(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_tv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tv; if (!buffer.str().empty()) @@ -701,7 +715,8 @@ bool get_GovHydroPelton_tv(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_twnc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twnc; if (!buffer.str().empty()) @@ -715,7 +730,8 @@ bool get_GovHydroPelton_twnc(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPelton_twng(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twng; if (!buffer.str().empty()) @@ -729,7 +745,8 @@ bool get_GovHydroPelton_twng(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPelton_tx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tx; if (!buffer.str().empty()) @@ -743,7 +760,8 @@ bool get_GovHydroPelton_tx(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_va(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->va; if (!buffer.str().empty()) @@ -757,7 +775,8 @@ bool get_GovHydroPelton_va(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_valvmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->valvmax; if (!buffer.str().empty()) @@ -771,7 +790,8 @@ bool get_GovHydroPelton_valvmax(const BaseClass* BaseClass_ptr1, std::stringstre bool get_GovHydroPelton_valvmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->valvmin; if (!buffer.str().empty()) @@ -785,7 +805,8 @@ bool get_GovHydroPelton_valvmin(const BaseClass* BaseClass_ptr1, std::stringstre bool get_GovHydroPelton_vav(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vav; if (!buffer.str().empty()) @@ -799,7 +820,8 @@ bool get_GovHydroPelton_vav(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPelton_vc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vc; if (!buffer.str().empty()) @@ -813,7 +835,8 @@ bool get_GovHydroPelton_vc(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_vcv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vcv; if (!buffer.str().empty()) @@ -827,7 +850,8 @@ bool get_GovHydroPelton_vcv(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPelton_waterTunnelSurgeChamberSimulation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->waterTunnelSurgeChamberSimulation; if (!buffer.str().empty()) @@ -841,7 +865,8 @@ bool get_GovHydroPelton_waterTunnelSurgeChamberSimulation(const BaseClass* BaseC bool get_GovHydroPelton_zsfc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->zsfc; if (!buffer.str().empty()) @@ -853,8 +878,6 @@ bool get_GovHydroPelton_zsfc(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char GovHydroPelton::debugName[] = "GovHydroPelton"; const char* GovHydroPelton::debugString() const { @@ -863,39 +886,39 @@ const char* GovHydroPelton::debugString() const void GovHydroPelton::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroPelton"), &GovHydroPelton_factory)); + factory_map.emplace("cim:GovHydroPelton", &GovHydroPelton_factory); } void GovHydroPelton::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.av0"), &assign_GovHydroPelton_av0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.av1"), &assign_GovHydroPelton_av1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.bp"), &assign_GovHydroPelton_bp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.db1"), &assign_GovHydroPelton_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.db2"), &assign_GovHydroPelton_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.h1"), &assign_GovHydroPelton_h1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.h2"), &assign_GovHydroPelton_h2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.hn"), &assign_GovHydroPelton_hn)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.kc"), &assign_GovHydroPelton_kc)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.kg"), &assign_GovHydroPelton_kg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.qc0"), &assign_GovHydroPelton_qc0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.qn"), &assign_GovHydroPelton_qn)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.simplifiedPelton"), &assign_GovHydroPelton_simplifiedPelton)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.staticCompensating"), &assign_GovHydroPelton_staticCompensating)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.ta"), &assign_GovHydroPelton_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.ts"), &assign_GovHydroPelton_ts)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.tv"), &assign_GovHydroPelton_tv)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.twnc"), &assign_GovHydroPelton_twnc)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.twng"), &assign_GovHydroPelton_twng)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.tx"), &assign_GovHydroPelton_tx)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.va"), &assign_GovHydroPelton_va)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.valvmax"), &assign_GovHydroPelton_valvmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.valvmin"), &assign_GovHydroPelton_valvmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.vav"), &assign_GovHydroPelton_vav)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.vc"), &assign_GovHydroPelton_vc)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.vcv"), &assign_GovHydroPelton_vcv)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.waterTunnelSurgeChamberSimulation"), &assign_GovHydroPelton_waterTunnelSurgeChamberSimulation)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.zsfc"), &assign_GovHydroPelton_zsfc)); + assign_map.emplace("cim:GovHydroPelton.av0", &assign_GovHydroPelton_av0); + assign_map.emplace("cim:GovHydroPelton.av1", &assign_GovHydroPelton_av1); + assign_map.emplace("cim:GovHydroPelton.bp", &assign_GovHydroPelton_bp); + assign_map.emplace("cim:GovHydroPelton.db1", &assign_GovHydroPelton_db1); + assign_map.emplace("cim:GovHydroPelton.db2", &assign_GovHydroPelton_db2); + assign_map.emplace("cim:GovHydroPelton.h1", &assign_GovHydroPelton_h1); + assign_map.emplace("cim:GovHydroPelton.h2", &assign_GovHydroPelton_h2); + assign_map.emplace("cim:GovHydroPelton.hn", &assign_GovHydroPelton_hn); + assign_map.emplace("cim:GovHydroPelton.kc", &assign_GovHydroPelton_kc); + assign_map.emplace("cim:GovHydroPelton.kg", &assign_GovHydroPelton_kg); + assign_map.emplace("cim:GovHydroPelton.qc0", &assign_GovHydroPelton_qc0); + assign_map.emplace("cim:GovHydroPelton.qn", &assign_GovHydroPelton_qn); + assign_map.emplace("cim:GovHydroPelton.simplifiedPelton", &assign_GovHydroPelton_simplifiedPelton); + assign_map.emplace("cim:GovHydroPelton.staticCompensating", &assign_GovHydroPelton_staticCompensating); + assign_map.emplace("cim:GovHydroPelton.ta", &assign_GovHydroPelton_ta); + assign_map.emplace("cim:GovHydroPelton.ts", &assign_GovHydroPelton_ts); + assign_map.emplace("cim:GovHydroPelton.tv", &assign_GovHydroPelton_tv); + assign_map.emplace("cim:GovHydroPelton.twnc", &assign_GovHydroPelton_twnc); + assign_map.emplace("cim:GovHydroPelton.twng", &assign_GovHydroPelton_twng); + assign_map.emplace("cim:GovHydroPelton.tx", &assign_GovHydroPelton_tx); + assign_map.emplace("cim:GovHydroPelton.va", &assign_GovHydroPelton_va); + assign_map.emplace("cim:GovHydroPelton.valvmax", &assign_GovHydroPelton_valvmax); + assign_map.emplace("cim:GovHydroPelton.valvmin", &assign_GovHydroPelton_valvmin); + assign_map.emplace("cim:GovHydroPelton.vav", &assign_GovHydroPelton_vav); + assign_map.emplace("cim:GovHydroPelton.vc", &assign_GovHydroPelton_vc); + assign_map.emplace("cim:GovHydroPelton.vcv", &assign_GovHydroPelton_vcv); + assign_map.emplace("cim:GovHydroPelton.waterTunnelSurgeChamberSimulation", &assign_GovHydroPelton_waterTunnelSurgeChamberSimulation); + assign_map.emplace("cim:GovHydroPelton.zsfc", &assign_GovHydroPelton_zsfc); } void GovHydroPelton::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/GovHydroPelton.hpp b/CGMES_2.4.13_18DEC2013/GovHydroPelton.hpp index 53b3c0d70..8536bb331 100644 --- a/CGMES_2.4.13_18DEC2013/GovHydroPelton.hpp +++ b/CGMES_2.4.13_18DEC2013/GovHydroPelton.hpp @@ -24,9 +24,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Detailed hydro unit - Pelton model. This model can be used to represent the dynamic related to water tunnel and surge chamber. A schematic of the hydraulic system of detailed hydro unit models, like Francis and Pelton, is located under the GovHydroFrancis class. - */ + /** \brief Detailed hydro unit - Pelton model. This model can be used to represent the dynamic related to water tunnel and surge chamber. A schematic of the hydraulic system of detailed hydro unit models, like Francis and Pelton, is located under the GovHydroFrancis class. */ class GovHydroPelton : public TurbineGovernorDynamics { public: @@ -34,34 +32,89 @@ namespace CIMPP GovHydroPelton(); ~GovHydroPelton() override; - CIMPP::Area av0; /* Area of the surge tank (A). Unit = m. Typical Value = 30. Default: nullptr */ - CIMPP::Area av1; /* Area of the compensation tank (A). Unit = m. Typical Value = 700. Default: nullptr */ - CIMPP::PU bp; /* Droop (bp). Typical Value = 0.05. Default: nullptr */ - CIMPP::Frequency db1; /* Intentional dead-band width (DB1). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency db2; /* Intentional dead-band width of valve opening error (DB2). Unit = Hz. Typical Value = 0.01. Default: nullptr */ - CIMPP::Length h1; /* Head of compensation chamber water level with respect to the level of penstock (H). Unit = m. Typical Value = 4. Default: nullptr */ - CIMPP::Length h2; /* Head of surge tank water level with respect to the level of penstock (H). Unit = m. Typical Value = 40. Default: nullptr */ - CIMPP::Length hn; /* Rated hydraulic head (H). Unit = m. Typical Value = 250. Default: nullptr */ - CIMPP::PU kc; /* Penstock loss coefficient (due to friction) (Kc). Typical Value = 0.025. Default: nullptr */ - CIMPP::PU kg; /* Water tunnel and surge chamber loss coefficient (due to friction) (Kg). Typical Value = -0.025. Default: nullptr */ - CIMPP::PU qc0; /* No-load turbine flow at nominal head (Qc0). Typical Value = 0.05. Default: nullptr */ - CIMPP::VolumeFlowRate qn; /* Rated flow (Q). Unit = m/s. Typical Value = 40. Default: nullptr */ - CIMPP::Boolean simplifiedPelton; /* Simplified Pelton model simulation (Sflag). true = enable of simplified Pelton model simulation false = enable of complete Pelton model simulation (non linear gain). Typical Value = false. Default: false */ - CIMPP::Boolean staticCompensating; /* Static compensating characteristic (Cflag). true = enable of static compensating characteristic false = inhibit of static compensating characteristic. Typical Value = false. Default: false */ - CIMPP::Seconds ta; /* Derivative gain (accelerometer time constant) (Ta). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds ts; /* Gate servo time constant (Ts). Typical Value = 0.15. Default: nullptr */ - CIMPP::Seconds tv; /* Servomotor integrator time constant (TV). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds twnc; /* Water inertia time constant (Twnc). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds twng; /* Water tunnel and surge chamber inertia time constant (Twng). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds tx; /* Electronic integrator time constant (Tx). Typical Value = 0.5. Default: nullptr */ - CIMPP::Simple_Float va; /* Maximum gate opening velocity (Va). Unit = PU/sec. Typical Value = 0.016. Default: nullptr */ - CIMPP::PU valvmax; /* Maximum gate opening (ValvMax). Typical Value = 1. Default: nullptr */ - CIMPP::PU valvmin; /* Minimum gate opening (ValvMin). Typical Value = 0. Default: nullptr */ - CIMPP::PU vav; /* Maximum servomotor valve opening velocity (Vav). Typical Value = 0.017. Default: nullptr */ - CIMPP::Simple_Float vc; /* Maximum gate closing velocity (Vc). Unit = PU/sec. Typical Value = -0.016. Default: nullptr */ - CIMPP::PU vcv; /* Maximum servomotor valve closing velocity (Vcv). Typical Value = -0.017. Default: nullptr */ - CIMPP::Boolean waterTunnelSurgeChamberSimulation; /* Water tunnel and surge chamber simulation (Tflag). true = enable of water tunnel and surge chamber simulation false = inhibit of water tunnel and surge chamber simulation. Typical Value = false. Default: false */ - CIMPP::Length zsfc; /* Head of upper water level with respect to the level of penstock (Zsfc). Unit = m. Typical Value = 25. Default: nullptr */ + /** \brief Area of the surge tank (A). Unit = m. Typical Value = 30. Default: nullptr */ + CIMPP::Area av0; + + /** \brief Area of the compensation tank (A). Unit = m. Typical Value = 700. Default: nullptr */ + CIMPP::Area av1; + + /** \brief Droop (bp). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU bp; + + /** \brief Intentional dead-band width (DB1). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Intentional dead-band width of valve opening error (DB2). Unit = Hz. Typical Value = 0.01. Default: nullptr */ + CIMPP::Frequency db2; + + /** \brief Head of compensation chamber water level with respect to the level of penstock (H). Unit = m. Typical Value = 4. Default: nullptr */ + CIMPP::Length h1; + + /** \brief Head of surge tank water level with respect to the level of penstock (H). Unit = m. Typical Value = 40. Default: nullptr */ + CIMPP::Length h2; + + /** \brief Rated hydraulic head (H). Unit = m. Typical Value = 250. Default: nullptr */ + CIMPP::Length hn; + + /** \brief Penstock loss coefficient (due to friction) (Kc). Typical Value = 0.025. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Water tunnel and surge chamber loss coefficient (due to friction) (Kg). Typical Value = -0.025. Default: nullptr */ + CIMPP::PU kg; + + /** \brief No-load turbine flow at nominal head (Qc0). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU qc0; + + /** \brief Rated flow (Q). Unit = m/s. Typical Value = 40. Default: nullptr */ + CIMPP::VolumeFlowRate qn; + + /** \brief Simplified Pelton model simulation (Sflag). true = enable of simplified Pelton model simulation false = enable of complete Pelton model simulation (non linear gain). Typical Value = false. Default: false */ + CIMPP::Boolean simplifiedPelton; + + /** \brief Static compensating characteristic (Cflag). true = enable of static compensating characteristic false = inhibit of static compensating characteristic. Typical Value = false. Default: false */ + CIMPP::Boolean staticCompensating; + + /** \brief Derivative gain (accelerometer time constant) (Ta). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Gate servo time constant (Ts). Typical Value = 0.15. Default: nullptr */ + CIMPP::Seconds ts; + + /** \brief Servomotor integrator time constant (TV). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds tv; + + /** \brief Water inertia time constant (Twnc). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds twnc; + + /** \brief Water tunnel and surge chamber inertia time constant (Twng). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds twng; + + /** \brief Electronic integrator time constant (Tx). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds tx; + + /** \brief Maximum gate opening velocity (Va). Unit = PU/sec. Typical Value = 0.016. Default: nullptr */ + CIMPP::Simple_Float va; + + /** \brief Maximum gate opening (ValvMax). Typical Value = 1. Default: nullptr */ + CIMPP::PU valvmax; + + /** \brief Minimum gate opening (ValvMin). Typical Value = 0. Default: nullptr */ + CIMPP::PU valvmin; + + /** \brief Maximum servomotor valve opening velocity (Vav). Typical Value = 0.017. Default: nullptr */ + CIMPP::PU vav; + + /** \brief Maximum gate closing velocity (Vc). Unit = PU/sec. Typical Value = -0.016. Default: nullptr */ + CIMPP::Simple_Float vc; + + /** \brief Maximum servomotor valve closing velocity (Vcv). Typical Value = -0.017. Default: nullptr */ + CIMPP::PU vcv; + + /** \brief Water tunnel and surge chamber simulation (Tflag). true = enable of water tunnel and surge chamber simulation false = inhibit of water tunnel and surge chamber simulation. Typical Value = false. Default: false */ + CIMPP::Boolean waterTunnelSurgeChamberSimulation; + + /** \brief Head of upper water level with respect to the level of penstock (Zsfc). Unit = m. Typical Value = 25. Default: nullptr */ + CIMPP::Length zsfc; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GovHydroR.cpp b/CGMES_2.4.13_18DEC2013/GovHydroR.cpp index 37199eb2c..b98e8cfc6 100644 --- a/CGMES_2.4.13_18DEC2013/GovHydroR.cpp +++ b/CGMES_2.4.13_18DEC2013/GovHydroR.cpp @@ -8,53 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "Frequency.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "Frequency.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -GovHydroR::GovHydroR() {}; -GovHydroR::~GovHydroR() {}; +GovHydroR::GovHydroR() {} +GovHydroR::~GovHydroR() {} static const std::list PossibleProfilesForClass = { @@ -122,558 +80,598 @@ GovHydroR::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroR_at(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_at(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->at; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_dturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_dturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_eps(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eps; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_gmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_gmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_gmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_gmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_gv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_h0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_h0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->h0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_inputSignal(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_inputSignal(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_pgv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_qnl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_qnl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qnl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_t7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_t8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_t8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_tt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_velcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_velcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velcl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_velop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_velop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroR_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->at; if (!buffer.str().empty()) @@ -687,7 +685,8 @@ bool get_GovHydroR_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -701,7 +700,8 @@ bool get_GovHydroR_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -715,7 +715,8 @@ bool get_GovHydroR_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dturb; if (!buffer.str().empty()) @@ -729,7 +730,8 @@ bool get_GovHydroR_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroR_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eps; if (!buffer.str().empty()) @@ -743,7 +745,8 @@ bool get_GovHydroR_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmax; if (!buffer.str().empty()) @@ -757,7 +760,8 @@ bool get_GovHydroR_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmin; if (!buffer.str().empty()) @@ -771,7 +775,8 @@ bool get_GovHydroR_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -785,7 +790,8 @@ bool get_GovHydroR_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -799,7 +805,8 @@ bool get_GovHydroR_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -813,7 +820,8 @@ bool get_GovHydroR_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -827,7 +835,8 @@ bool get_GovHydroR_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -841,7 +850,8 @@ bool get_GovHydroR_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv6; if (!buffer.str().empty()) @@ -855,7 +865,8 @@ bool get_GovHydroR_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_h0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->h0; if (!buffer.str().empty()) @@ -869,7 +880,8 @@ bool get_GovHydroR_h0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_inputSignal(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inputSignal; if (!buffer.str().empty()) @@ -883,7 +895,8 @@ bool get_GovHydroR_inputSignal(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_GovHydroR_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -897,7 +910,8 @@ bool get_GovHydroR_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -911,7 +925,8 @@ bool get_GovHydroR_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -925,7 +940,8 @@ bool get_GovHydroR_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroR_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -939,7 +955,8 @@ bool get_GovHydroR_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -953,7 +970,8 @@ bool get_GovHydroR_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -967,7 +985,8 @@ bool get_GovHydroR_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -981,7 +1000,8 @@ bool get_GovHydroR_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -995,7 +1015,8 @@ bool get_GovHydroR_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv6; if (!buffer.str().empty()) @@ -1009,7 +1030,8 @@ bool get_GovHydroR_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -1023,7 +1045,8 @@ bool get_GovHydroR_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -1037,7 +1060,8 @@ bool get_GovHydroR_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_qnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qnl; if (!buffer.str().empty()) @@ -1051,7 +1075,8 @@ bool get_GovHydroR_qnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -1065,7 +1090,8 @@ bool get_GovHydroR_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovHydroR_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -1079,7 +1105,8 @@ bool get_GovHydroR_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -1093,7 +1120,8 @@ bool get_GovHydroR_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -1107,7 +1135,8 @@ bool get_GovHydroR_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -1121,7 +1150,8 @@ bool get_GovHydroR_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -1135,7 +1165,8 @@ bool get_GovHydroR_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -1149,7 +1180,8 @@ bool get_GovHydroR_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t7; if (!buffer.str().empty()) @@ -1163,7 +1195,8 @@ bool get_GovHydroR_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t8; if (!buffer.str().empty()) @@ -1177,7 +1210,8 @@ bool get_GovHydroR_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -1191,7 +1225,8 @@ bool get_GovHydroR_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -1205,7 +1240,8 @@ bool get_GovHydroR_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tt; if (!buffer.str().empty()) @@ -1219,7 +1255,8 @@ bool get_GovHydroR_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -1233,7 +1270,8 @@ bool get_GovHydroR_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_velcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velcl; if (!buffer.str().empty()) @@ -1247,7 +1285,8 @@ bool get_GovHydroR_velcl(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroR_velop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velop; if (!buffer.str().empty()) @@ -1259,8 +1298,6 @@ bool get_GovHydroR_velop(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } - - const char GovHydroR::debugName[] = "GovHydroR"; const char* GovHydroR::debugString() const { @@ -1269,53 +1306,53 @@ const char* GovHydroR::debugString() const void GovHydroR::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroR"), &GovHydroR_factory)); + factory_map.emplace("cim:GovHydroR", &GovHydroR_factory); } void GovHydroR::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.at"), &assign_GovHydroR_at)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.db1"), &assign_GovHydroR_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.db2"), &assign_GovHydroR_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.dturb"), &assign_GovHydroR_dturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.eps"), &assign_GovHydroR_eps)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.gmax"), &assign_GovHydroR_gmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.gmin"), &assign_GovHydroR_gmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.gv1"), &assign_GovHydroR_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.gv2"), &assign_GovHydroR_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.gv3"), &assign_GovHydroR_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.gv4"), &assign_GovHydroR_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.gv5"), &assign_GovHydroR_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.gv6"), &assign_GovHydroR_gv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.h0"), &assign_GovHydroR_h0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.inputSignal"), &assign_GovHydroR_inputSignal)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.kg"), &assign_GovHydroR_kg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.ki"), &assign_GovHydroR_ki)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.mwbase"), &assign_GovHydroR_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.pgv1"), &assign_GovHydroR_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.pgv2"), &assign_GovHydroR_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.pgv3"), &assign_GovHydroR_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.pgv4"), &assign_GovHydroR_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.pgv5"), &assign_GovHydroR_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.pgv6"), &assign_GovHydroR_pgv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.pmax"), &assign_GovHydroR_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.pmin"), &assign_GovHydroR_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.qnl"), &assign_GovHydroR_qnl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.r"), &assign_GovHydroR_r)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.t1"), &assign_GovHydroR_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.t2"), &assign_GovHydroR_t2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.t3"), &assign_GovHydroR_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.t4"), &assign_GovHydroR_t4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.t5"), &assign_GovHydroR_t5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.t6"), &assign_GovHydroR_t6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.t7"), &assign_GovHydroR_t7)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.t8"), &assign_GovHydroR_t8)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.td"), &assign_GovHydroR_td)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.tp"), &assign_GovHydroR_tp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.tt"), &assign_GovHydroR_tt)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.tw"), &assign_GovHydroR_tw)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.velcl"), &assign_GovHydroR_velcl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.velop"), &assign_GovHydroR_velop)); + assign_map.emplace("cim:GovHydroR.at", &assign_GovHydroR_at); + assign_map.emplace("cim:GovHydroR.db1", &assign_GovHydroR_db1); + assign_map.emplace("cim:GovHydroR.db2", &assign_GovHydroR_db2); + assign_map.emplace("cim:GovHydroR.dturb", &assign_GovHydroR_dturb); + assign_map.emplace("cim:GovHydroR.eps", &assign_GovHydroR_eps); + assign_map.emplace("cim:GovHydroR.gmax", &assign_GovHydroR_gmax); + assign_map.emplace("cim:GovHydroR.gmin", &assign_GovHydroR_gmin); + assign_map.emplace("cim:GovHydroR.gv1", &assign_GovHydroR_gv1); + assign_map.emplace("cim:GovHydroR.gv2", &assign_GovHydroR_gv2); + assign_map.emplace("cim:GovHydroR.gv3", &assign_GovHydroR_gv3); + assign_map.emplace("cim:GovHydroR.gv4", &assign_GovHydroR_gv4); + assign_map.emplace("cim:GovHydroR.gv5", &assign_GovHydroR_gv5); + assign_map.emplace("cim:GovHydroR.gv6", &assign_GovHydroR_gv6); + assign_map.emplace("cim:GovHydroR.h0", &assign_GovHydroR_h0); + assign_map.emplace("cim:GovHydroR.inputSignal", &assign_GovHydroR_inputSignal); + assign_map.emplace("cim:GovHydroR.kg", &assign_GovHydroR_kg); + assign_map.emplace("cim:GovHydroR.ki", &assign_GovHydroR_ki); + assign_map.emplace("cim:GovHydroR.mwbase", &assign_GovHydroR_mwbase); + assign_map.emplace("cim:GovHydroR.pgv1", &assign_GovHydroR_pgv1); + assign_map.emplace("cim:GovHydroR.pgv2", &assign_GovHydroR_pgv2); + assign_map.emplace("cim:GovHydroR.pgv3", &assign_GovHydroR_pgv3); + assign_map.emplace("cim:GovHydroR.pgv4", &assign_GovHydroR_pgv4); + assign_map.emplace("cim:GovHydroR.pgv5", &assign_GovHydroR_pgv5); + assign_map.emplace("cim:GovHydroR.pgv6", &assign_GovHydroR_pgv6); + assign_map.emplace("cim:GovHydroR.pmax", &assign_GovHydroR_pmax); + assign_map.emplace("cim:GovHydroR.pmin", &assign_GovHydroR_pmin); + assign_map.emplace("cim:GovHydroR.qnl", &assign_GovHydroR_qnl); + assign_map.emplace("cim:GovHydroR.r", &assign_GovHydroR_r); + assign_map.emplace("cim:GovHydroR.t1", &assign_GovHydroR_t1); + assign_map.emplace("cim:GovHydroR.t2", &assign_GovHydroR_t2); + assign_map.emplace("cim:GovHydroR.t3", &assign_GovHydroR_t3); + assign_map.emplace("cim:GovHydroR.t4", &assign_GovHydroR_t4); + assign_map.emplace("cim:GovHydroR.t5", &assign_GovHydroR_t5); + assign_map.emplace("cim:GovHydroR.t6", &assign_GovHydroR_t6); + assign_map.emplace("cim:GovHydroR.t7", &assign_GovHydroR_t7); + assign_map.emplace("cim:GovHydroR.t8", &assign_GovHydroR_t8); + assign_map.emplace("cim:GovHydroR.td", &assign_GovHydroR_td); + assign_map.emplace("cim:GovHydroR.tp", &assign_GovHydroR_tp); + assign_map.emplace("cim:GovHydroR.tt", &assign_GovHydroR_tt); + assign_map.emplace("cim:GovHydroR.tw", &assign_GovHydroR_tw); + assign_map.emplace("cim:GovHydroR.velcl", &assign_GovHydroR_velcl); + assign_map.emplace("cim:GovHydroR.velop", &assign_GovHydroR_velop); } void GovHydroR::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/GovHydroR.hpp b/CGMES_2.4.13_18DEC2013/GovHydroR.hpp index 77138dc46..a14a39e56 100644 --- a/CGMES_2.4.13_18DEC2013/GovHydroR.hpp +++ b/CGMES_2.4.13_18DEC2013/GovHydroR.hpp @@ -22,9 +22,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Fourth order lead-lag governor and hydro turbine. - */ + /** \brief Fourth order lead-lag governor and hydro turbine. */ class GovHydroR : public TurbineGovernorDynamics { public: @@ -32,48 +30,131 @@ namespace CIMPP GovHydroR(); ~GovHydroR() override; - CIMPP::PU at; /* Turbine gain (At). Typical Value = 1.2. Default: nullptr */ - CIMPP::Frequency db1; /* Intentional dead-band width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower db2; /* Unintentional dead-band (db2). Unit = MW. Typical Value = 0. Default: nullptr */ - CIMPP::PU dturb; /* Turbine damping factor (Dturb). Typical Value = 0.2. Default: nullptr */ - CIMPP::Frequency eps; /* Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::PU gmax; /* Maximum governor output (Gmax). Typical Value = 1.05. Default: nullptr */ - CIMPP::PU gmin; /* Minimum governor output (Gmin). Typical Value = -0.05. Default: nullptr */ - CIMPP::PU gv1; /* Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv6; /* Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU h0; /* Turbine nominal head (H0). Typical Value = 1. Default: nullptr */ - CIMPP::Boolean inputSignal; /* Input signal switch (Flag). true = Pe input is used false = feedback is received from CV. Flag is normally dependent on Tt. If Tf is zero, Flag is set to false. If Tf is not zero, Flag is set to true. Typical Value = true. Default: false */ - CIMPP::PU kg; /* Gate servo gain (Kg). Typical Value = 2. Default: nullptr */ - CIMPP::PU ki; /* Integral gain (Ki). Typical Value = 0.5. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv6; /* Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU pmax; /* Maximum gate opening, PU of MWbase (Pmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum gate opening, PU of MWbase (Pmin). Typical Value = 0. Default: nullptr */ - CIMPP::PU qnl; /* No-load turbine flow at nominal head (Qnl). Typical Value = 0.08. Default: nullptr */ - CIMPP::PU r; /* Steady-state droop (R). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds t1; /* Lead time constant 1 (T1). Typical Value = 1.5. Default: nullptr */ - CIMPP::Seconds t2; /* Lag time constant 1 (T2). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t3; /* Lead time constant 2 (T3). Typical Value = 1.5. Default: nullptr */ - CIMPP::Seconds t4; /* Lag time constant 2 (T4). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t5; /* Lead time constant 3 (T5). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t6; /* Lag time constant 3 (T6). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds t7; /* Lead time constant 4 (T7). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t8; /* Lag time constant 4 (T8). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds td; /* Input filter time constant (Td). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds tp; /* Gate servo time constant (Tp). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds tt; /* Power feedback time constant (Tt). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tw; /* Water inertia time constant (Tw). Typical Value = 1. Default: nullptr */ - CIMPP::Simple_Float velcl; /* Maximum gate closing velocity (Velcl). Unit = PU/sec. Typical Value = -0.2. Default: nullptr */ - CIMPP::Simple_Float velop; /* Maximum gate opening velocity (Velop). Unit = PU/sec. Typical Value = 0.2. Default: nullptr */ + /** \brief Turbine gain (At). Typical Value = 1.2. Default: nullptr */ + CIMPP::PU at; + + /** \brief Intentional dead-band width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Unintentional dead-band (db2). Unit = MW. Typical Value = 0. Default: nullptr */ + CIMPP::ActivePower db2; + + /** \brief Turbine damping factor (Dturb). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU dturb; + + /** \brief Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency eps; + + /** \brief Maximum governor output (Gmax). Typical Value = 1.05. Default: nullptr */ + CIMPP::PU gmax; + + /** \brief Minimum governor output (Gmin). Typical Value = -0.05. Default: nullptr */ + CIMPP::PU gmin; + + /** \brief Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv6; + + /** \brief Turbine nominal head (H0). Typical Value = 1. Default: nullptr */ + CIMPP::PU h0; + + /** \brief Input signal switch (Flag). true = Pe input is used false = feedback is received from CV. Flag is normally dependent on Tt. If Tf is zero, Flag is set to false. If Tf is not zero, Flag is set to true. Typical Value = true. Default: false */ + CIMPP::Boolean inputSignal; + + /** \brief Gate servo gain (Kg). Typical Value = 2. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Integral gain (Ki). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv6; + + /** \brief Maximum gate opening, PU of MWbase (Pmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum gate opening, PU of MWbase (Pmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief No-load turbine flow at nominal head (Qnl). Typical Value = 0.08. Default: nullptr */ + CIMPP::PU qnl; + + /** \brief Steady-state droop (R). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU r; + + /** \brief Lead time constant 1 (T1). Typical Value = 1.5. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Lag time constant 1 (T2). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Lead time constant 2 (T3). Typical Value = 1.5. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Lag time constant 2 (T4). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Lead time constant 3 (T5). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Lag time constant 3 (T6). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Lead time constant 4 (T7). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t7; + + /** \brief Lag time constant 4 (T8). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds t8; + + /** \brief Input filter time constant (Td). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Gate servo time constant (Tp). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Power feedback time constant (Tt). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tt; + + /** \brief Water inertia time constant (Tw). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tw; + + /** \brief Maximum gate closing velocity (Velcl). Unit = PU/sec. Typical Value = -0.2. Default: nullptr */ + CIMPP::Simple_Float velcl; + + /** \brief Maximum gate opening velocity (Velop). Unit = PU/sec. Typical Value = 0.2. Default: nullptr */ + CIMPP::Simple_Float velop; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GovHydroWEH.cpp b/CGMES_2.4.13_18DEC2013/GovHydroWEH.cpp index 7a8ac432b..a59096688 100644 --- a/CGMES_2.4.13_18DEC2013/GovHydroWEH.cpp +++ b/CGMES_2.4.13_18DEC2013/GovHydroWEH.cpp @@ -8,62 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -GovHydroWEH::GovHydroWEH() {}; -GovHydroWEH::~GovHydroWEH() {}; +GovHydroWEH::GovHydroWEH() {} +GovHydroWEH::~GovHydroWEH() {} static const std::list PossibleProfilesForClass = { @@ -140,675 +89,724 @@ GovHydroWEH::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroWEH_db(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_db(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_dicn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_dicn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dicn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_dpv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_dpv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dpv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_dturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_dturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_feedbackSignal(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_feedbackSignal(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->feedbackSignal; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fl1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fl1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fl2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fl2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fl3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fl3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fl3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fl4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fl4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fl4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fl5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fl5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fl5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_gmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_gmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_gmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_gmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_gtmxcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_gtmxcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gtmxcl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_gtmxop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_gtmxop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gtmxop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_rpg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_rpg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rpg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_rpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_rpp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rpp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_tdv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_tdv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_tpe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_tpe(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpe; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroWEH_db(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db; if (!buffer.str().empty()) @@ -822,7 +820,8 @@ bool get_GovHydroWEH_db(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroWEH_dicn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dicn; if (!buffer.str().empty()) @@ -836,7 +835,8 @@ bool get_GovHydroWEH_dicn(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroWEH_dpv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dpv; if (!buffer.str().empty()) @@ -850,7 +850,8 @@ bool get_GovHydroWEH_dpv(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dturb; if (!buffer.str().empty()) @@ -864,7 +865,8 @@ bool get_GovHydroWEH_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_feedbackSignal(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->feedbackSignal; if (!buffer.str().empty()) @@ -878,7 +880,8 @@ bool get_GovHydroWEH_feedbackSignal(const BaseClass* BaseClass_ptr1, std::string bool get_GovHydroWEH_fl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fl1; if (!buffer.str().empty()) @@ -892,7 +895,8 @@ bool get_GovHydroWEH_fl1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fl2; if (!buffer.str().empty()) @@ -906,7 +910,8 @@ bool get_GovHydroWEH_fl2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fl3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fl3; if (!buffer.str().empty()) @@ -920,7 +925,8 @@ bool get_GovHydroWEH_fl3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fl4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fl4; if (!buffer.str().empty()) @@ -934,7 +940,8 @@ bool get_GovHydroWEH_fl4(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fl5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fl5; if (!buffer.str().empty()) @@ -948,7 +955,8 @@ bool get_GovHydroWEH_fl5(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fp1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp1; if (!buffer.str().empty()) @@ -962,7 +970,8 @@ bool get_GovHydroWEH_fp1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fp10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp10; if (!buffer.str().empty()) @@ -976,7 +985,8 @@ bool get_GovHydroWEH_fp10(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroWEH_fp2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp2; if (!buffer.str().empty()) @@ -990,7 +1000,8 @@ bool get_GovHydroWEH_fp2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fp3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp3; if (!buffer.str().empty()) @@ -1004,7 +1015,8 @@ bool get_GovHydroWEH_fp3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fp4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp4; if (!buffer.str().empty()) @@ -1018,7 +1030,8 @@ bool get_GovHydroWEH_fp4(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fp5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp5; if (!buffer.str().empty()) @@ -1032,7 +1045,8 @@ bool get_GovHydroWEH_fp5(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fp6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp6; if (!buffer.str().empty()) @@ -1046,7 +1060,8 @@ bool get_GovHydroWEH_fp6(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fp7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp7; if (!buffer.str().empty()) @@ -1060,7 +1075,8 @@ bool get_GovHydroWEH_fp7(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fp8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp8; if (!buffer.str().empty()) @@ -1074,7 +1090,8 @@ bool get_GovHydroWEH_fp8(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fp9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp9; if (!buffer.str().empty()) @@ -1088,7 +1105,8 @@ bool get_GovHydroWEH_fp9(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmax; if (!buffer.str().empty()) @@ -1102,7 +1120,8 @@ bool get_GovHydroWEH_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroWEH_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmin; if (!buffer.str().empty()) @@ -1116,7 +1135,8 @@ bool get_GovHydroWEH_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroWEH_gtmxcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gtmxcl; if (!buffer.str().empty()) @@ -1130,7 +1150,8 @@ bool get_GovHydroWEH_gtmxcl(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroWEH_gtmxop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gtmxop; if (!buffer.str().empty()) @@ -1144,7 +1165,8 @@ bool get_GovHydroWEH_gtmxop(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroWEH_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -1158,7 +1180,8 @@ bool get_GovHydroWEH_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -1172,7 +1195,8 @@ bool get_GovHydroWEH_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -1186,7 +1210,8 @@ bool get_GovHydroWEH_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -1200,7 +1225,8 @@ bool get_GovHydroWEH_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -1214,7 +1240,8 @@ bool get_GovHydroWEH_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -1228,7 +1255,8 @@ bool get_GovHydroWEH_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroWEH_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -1242,7 +1270,8 @@ bool get_GovHydroWEH_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroWEH_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -1256,7 +1285,8 @@ bool get_GovHydroWEH_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroWEH_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -1270,7 +1300,8 @@ bool get_GovHydroWEH_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroWEH_pmss1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss1; if (!buffer.str().empty()) @@ -1284,7 +1315,8 @@ bool get_GovHydroWEH_pmss1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_pmss10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss10; if (!buffer.str().empty()) @@ -1298,7 +1330,8 @@ bool get_GovHydroWEH_pmss10(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroWEH_pmss2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss2; if (!buffer.str().empty()) @@ -1312,7 +1345,8 @@ bool get_GovHydroWEH_pmss2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_pmss3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss3; if (!buffer.str().empty()) @@ -1326,7 +1360,8 @@ bool get_GovHydroWEH_pmss3(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_pmss4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss4; if (!buffer.str().empty()) @@ -1340,7 +1375,8 @@ bool get_GovHydroWEH_pmss4(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_pmss5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss5; if (!buffer.str().empty()) @@ -1354,7 +1390,8 @@ bool get_GovHydroWEH_pmss5(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_pmss6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss6; if (!buffer.str().empty()) @@ -1368,7 +1405,8 @@ bool get_GovHydroWEH_pmss6(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_pmss7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss7; if (!buffer.str().empty()) @@ -1382,7 +1420,8 @@ bool get_GovHydroWEH_pmss7(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_pmss8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss8; if (!buffer.str().empty()) @@ -1396,7 +1435,8 @@ bool get_GovHydroWEH_pmss8(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_pmss9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss9; if (!buffer.str().empty()) @@ -1410,7 +1450,8 @@ bool get_GovHydroWEH_pmss9(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_rpg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rpg; if (!buffer.str().empty()) @@ -1424,7 +1465,8 @@ bool get_GovHydroWEH_rpg(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_rpp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rpp; if (!buffer.str().empty()) @@ -1438,7 +1480,8 @@ bool get_GovHydroWEH_rpp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -1452,7 +1495,8 @@ bool get_GovHydroWEH_td(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroWEH_tdv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdv; if (!buffer.str().empty()) @@ -1466,7 +1510,8 @@ bool get_GovHydroWEH_tdv(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -1480,7 +1525,8 @@ bool get_GovHydroWEH_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroWEH_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -1494,7 +1540,8 @@ bool get_GovHydroWEH_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroWEH_tpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpe; if (!buffer.str().empty()) @@ -1508,7 +1555,8 @@ bool get_GovHydroWEH_tpe(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -1520,8 +1568,6 @@ bool get_GovHydroWEH_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char GovHydroWEH::debugName[] = "GovHydroWEH"; const char* GovHydroWEH::debugString() const { @@ -1530,62 +1576,62 @@ const char* GovHydroWEH::debugString() const void GovHydroWEH::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroWEH"), &GovHydroWEH_factory)); + factory_map.emplace("cim:GovHydroWEH", &GovHydroWEH_factory); } void GovHydroWEH::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.db"), &assign_GovHydroWEH_db)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.dicn"), &assign_GovHydroWEH_dicn)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.dpv"), &assign_GovHydroWEH_dpv)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.dturb"), &assign_GovHydroWEH_dturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.feedbackSignal"), &assign_GovHydroWEH_feedbackSignal)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fl1"), &assign_GovHydroWEH_fl1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fl2"), &assign_GovHydroWEH_fl2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fl3"), &assign_GovHydroWEH_fl3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fl4"), &assign_GovHydroWEH_fl4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fl5"), &assign_GovHydroWEH_fl5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp1"), &assign_GovHydroWEH_fp1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp10"), &assign_GovHydroWEH_fp10)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp2"), &assign_GovHydroWEH_fp2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp3"), &assign_GovHydroWEH_fp3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp4"), &assign_GovHydroWEH_fp4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp5"), &assign_GovHydroWEH_fp5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp6"), &assign_GovHydroWEH_fp6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp7"), &assign_GovHydroWEH_fp7)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp8"), &assign_GovHydroWEH_fp8)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp9"), &assign_GovHydroWEH_fp9)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.gmax"), &assign_GovHydroWEH_gmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.gmin"), &assign_GovHydroWEH_gmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.gtmxcl"), &assign_GovHydroWEH_gtmxcl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.gtmxop"), &assign_GovHydroWEH_gtmxop)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.gv1"), &assign_GovHydroWEH_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.gv2"), &assign_GovHydroWEH_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.gv3"), &assign_GovHydroWEH_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.gv4"), &assign_GovHydroWEH_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.gv5"), &assign_GovHydroWEH_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.kd"), &assign_GovHydroWEH_kd)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.ki"), &assign_GovHydroWEH_ki)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.kp"), &assign_GovHydroWEH_kp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.mwbase"), &assign_GovHydroWEH_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss1"), &assign_GovHydroWEH_pmss1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss10"), &assign_GovHydroWEH_pmss10)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss2"), &assign_GovHydroWEH_pmss2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss3"), &assign_GovHydroWEH_pmss3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss4"), &assign_GovHydroWEH_pmss4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss5"), &assign_GovHydroWEH_pmss5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss6"), &assign_GovHydroWEH_pmss6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss7"), &assign_GovHydroWEH_pmss7)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss8"), &assign_GovHydroWEH_pmss8)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss9"), &assign_GovHydroWEH_pmss9)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.rpg"), &assign_GovHydroWEH_rpg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.rpp"), &assign_GovHydroWEH_rpp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.td"), &assign_GovHydroWEH_td)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.tdv"), &assign_GovHydroWEH_tdv)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.tg"), &assign_GovHydroWEH_tg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.tp"), &assign_GovHydroWEH_tp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.tpe"), &assign_GovHydroWEH_tpe)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.tw"), &assign_GovHydroWEH_tw)); + assign_map.emplace("cim:GovHydroWEH.db", &assign_GovHydroWEH_db); + assign_map.emplace("cim:GovHydroWEH.dicn", &assign_GovHydroWEH_dicn); + assign_map.emplace("cim:GovHydroWEH.dpv", &assign_GovHydroWEH_dpv); + assign_map.emplace("cim:GovHydroWEH.dturb", &assign_GovHydroWEH_dturb); + assign_map.emplace("cim:GovHydroWEH.feedbackSignal", &assign_GovHydroWEH_feedbackSignal); + assign_map.emplace("cim:GovHydroWEH.fl1", &assign_GovHydroWEH_fl1); + assign_map.emplace("cim:GovHydroWEH.fl2", &assign_GovHydroWEH_fl2); + assign_map.emplace("cim:GovHydroWEH.fl3", &assign_GovHydroWEH_fl3); + assign_map.emplace("cim:GovHydroWEH.fl4", &assign_GovHydroWEH_fl4); + assign_map.emplace("cim:GovHydroWEH.fl5", &assign_GovHydroWEH_fl5); + assign_map.emplace("cim:GovHydroWEH.fp1", &assign_GovHydroWEH_fp1); + assign_map.emplace("cim:GovHydroWEH.fp10", &assign_GovHydroWEH_fp10); + assign_map.emplace("cim:GovHydroWEH.fp2", &assign_GovHydroWEH_fp2); + assign_map.emplace("cim:GovHydroWEH.fp3", &assign_GovHydroWEH_fp3); + assign_map.emplace("cim:GovHydroWEH.fp4", &assign_GovHydroWEH_fp4); + assign_map.emplace("cim:GovHydroWEH.fp5", &assign_GovHydroWEH_fp5); + assign_map.emplace("cim:GovHydroWEH.fp6", &assign_GovHydroWEH_fp6); + assign_map.emplace("cim:GovHydroWEH.fp7", &assign_GovHydroWEH_fp7); + assign_map.emplace("cim:GovHydroWEH.fp8", &assign_GovHydroWEH_fp8); + assign_map.emplace("cim:GovHydroWEH.fp9", &assign_GovHydroWEH_fp9); + assign_map.emplace("cim:GovHydroWEH.gmax", &assign_GovHydroWEH_gmax); + assign_map.emplace("cim:GovHydroWEH.gmin", &assign_GovHydroWEH_gmin); + assign_map.emplace("cim:GovHydroWEH.gtmxcl", &assign_GovHydroWEH_gtmxcl); + assign_map.emplace("cim:GovHydroWEH.gtmxop", &assign_GovHydroWEH_gtmxop); + assign_map.emplace("cim:GovHydroWEH.gv1", &assign_GovHydroWEH_gv1); + assign_map.emplace("cim:GovHydroWEH.gv2", &assign_GovHydroWEH_gv2); + assign_map.emplace("cim:GovHydroWEH.gv3", &assign_GovHydroWEH_gv3); + assign_map.emplace("cim:GovHydroWEH.gv4", &assign_GovHydroWEH_gv4); + assign_map.emplace("cim:GovHydroWEH.gv5", &assign_GovHydroWEH_gv5); + assign_map.emplace("cim:GovHydroWEH.kd", &assign_GovHydroWEH_kd); + assign_map.emplace("cim:GovHydroWEH.ki", &assign_GovHydroWEH_ki); + assign_map.emplace("cim:GovHydroWEH.kp", &assign_GovHydroWEH_kp); + assign_map.emplace("cim:GovHydroWEH.mwbase", &assign_GovHydroWEH_mwbase); + assign_map.emplace("cim:GovHydroWEH.pmss1", &assign_GovHydroWEH_pmss1); + assign_map.emplace("cim:GovHydroWEH.pmss10", &assign_GovHydroWEH_pmss10); + assign_map.emplace("cim:GovHydroWEH.pmss2", &assign_GovHydroWEH_pmss2); + assign_map.emplace("cim:GovHydroWEH.pmss3", &assign_GovHydroWEH_pmss3); + assign_map.emplace("cim:GovHydroWEH.pmss4", &assign_GovHydroWEH_pmss4); + assign_map.emplace("cim:GovHydroWEH.pmss5", &assign_GovHydroWEH_pmss5); + assign_map.emplace("cim:GovHydroWEH.pmss6", &assign_GovHydroWEH_pmss6); + assign_map.emplace("cim:GovHydroWEH.pmss7", &assign_GovHydroWEH_pmss7); + assign_map.emplace("cim:GovHydroWEH.pmss8", &assign_GovHydroWEH_pmss8); + assign_map.emplace("cim:GovHydroWEH.pmss9", &assign_GovHydroWEH_pmss9); + assign_map.emplace("cim:GovHydroWEH.rpg", &assign_GovHydroWEH_rpg); + assign_map.emplace("cim:GovHydroWEH.rpp", &assign_GovHydroWEH_rpp); + assign_map.emplace("cim:GovHydroWEH.td", &assign_GovHydroWEH_td); + assign_map.emplace("cim:GovHydroWEH.tdv", &assign_GovHydroWEH_tdv); + assign_map.emplace("cim:GovHydroWEH.tg", &assign_GovHydroWEH_tg); + assign_map.emplace("cim:GovHydroWEH.tp", &assign_GovHydroWEH_tp); + assign_map.emplace("cim:GovHydroWEH.tpe", &assign_GovHydroWEH_tpe); + assign_map.emplace("cim:GovHydroWEH.tw", &assign_GovHydroWEH_tw); } void GovHydroWEH::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/GovHydroWEH.hpp b/CGMES_2.4.13_18DEC2013/GovHydroWEH.hpp index 687f3bd88..8417378d5 100644 --- a/CGMES_2.4.13_18DEC2013/GovHydroWEH.hpp +++ b/CGMES_2.4.13_18DEC2013/GovHydroWEH.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Woodward Electric Hydro Governor Model. - */ + /** \brief Woodward Electric Hydro Governor Model. */ class GovHydroWEH : public TurbineGovernorDynamics { public: @@ -31,57 +29,158 @@ namespace CIMPP GovHydroWEH(); ~GovHydroWEH() override; - CIMPP::PU db; /* Speed Dead Band (db). Default: nullptr */ - CIMPP::PU dicn; /* Value to allow the integral controller to advance beyond the gate limits (Dicn). Default: nullptr */ - CIMPP::PU dpv; /* Value to allow the Pilot valve controller to advance beyond the gate limits (Dpv). Default: nullptr */ - CIMPP::PU dturb; /* Turbine damping factor (Dturb). Unit = delta P (PU of MWbase) / delta speed (PU). Default: nullptr */ - CIMPP::Boolean feedbackSignal; /* Feedback signal selection (Sw). true = PID Output (if R-Perm-Gate=droop and R-Perm-Pe=0) false = Electrical Power (if R-Perm-Gate=0 and R-Perm-Pe=droop) or false = Gate Position (if R-Perm-Gate=droop and R-Perm-Pe=0). Default: false */ - CIMPP::PU fl1; /* Flow Gate 1 (Fl1). Flow value for gate position point 1 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU fl2; /* Flow Gate 2 (Fl2). Flow value for gate position point 2 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU fl3; /* Flow Gate 3 (Fl3). Flow value for gate position point 3 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU fl4; /* Flow Gate 4 (Fl4). Flow value for gate position point 4 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU fl5; /* Flow Gate 5 (Fl5). Flow value for gate position point 5 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU fp1; /* Flow P1 (Fp1). Turbine Flow value for point 1 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU fp10; /* Flow P10 (Fp10). Turbine Flow value for point 10 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU fp2; /* Flow P2 (Fp2). Turbine Flow value for point 2 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU fp3; /* Flow P3 (Fp3). Turbine Flow value for point 3 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU fp4; /* Flow P4 (Fp4). Turbine Flow value for point 4 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU fp5; /* Flow P5 (Fp5). Turbine Flow value for point 5 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU fp6; /* Flow P6 (Fp6). Turbine Flow value for point 6 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU fp7; /* Flow P7 (Fp7). Turbine Flow value for point 7 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU fp8; /* Flow P8 (Fp8). Turbine Flow value for point 8 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU fp9; /* Flow P9 (Fp9). Turbine Flow value for point 9 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU gmax; /* Maximum Gate Position (Gmax). Default: nullptr */ - CIMPP::PU gmin; /* Minimum Gate Position (Gmin). Default: nullptr */ - CIMPP::PU gtmxcl; /* Maximum gate closing rate (Gtmxcl). Default: nullptr */ - CIMPP::PU gtmxop; /* Maximum gate opening rate (Gtmxop). Default: nullptr */ - CIMPP::PU gv1; /* Gate 1 (Gv1). Gate Position value for point 1 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU gv2; /* Gate 2 (Gv2). Gate Position value for point 2 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU gv3; /* Gate 3 (Gv3). Gate Position value for point 3 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU gv4; /* Gate 4 (Gv4). Gate Position value for point 4 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU gv5; /* Gate 5 (Gv5). Gate Position value for point 5 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU kd; /* Derivative controller derivative gain (Kd). Default: nullptr */ - CIMPP::PU ki; /* Derivative controller Integral gain (Ki). Default: nullptr */ - CIMPP::PU kp; /* Derivative control gain (Kp). Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU pmss1; /* Pmss Flow P1 (Pmss1). Mechanical Power output Pmss for Turbine Flow point 1 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU pmss10; /* Pmss Flow P10 (Pmss10). Mechanical Power output Pmss for Turbine Flow point 10 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU pmss2; /* Pmss Flow P2 (Pmss2). Mechanical Power output Pmss for Turbine Flow point 2 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU pmss3; /* Pmss Flow P3 (Pmss3). Mechanical Power output Pmss for Turbine Flow point 3 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU pmss4; /* Pmss Flow P4 (Pmss4). Mechanical Power output Pmss for Turbine Flow point 4 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU pmss5; /* Pmss Flow P5 (Pmss5). Mechanical Power output Pmss for Turbine Flow point 5 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU pmss6; /* Pmss Flow P6 (Pmss6). Mechanical Power output Pmss for Turbine Flow point 6 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU pmss7; /* Pmss Flow P7 (Pmss7). Mechanical Power output Pmss for Turbine Flow point 7 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU pmss8; /* Pmss Flow P8 (Pmss8). Mechanical Power output Pmss for Turbine Flow point 8 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU pmss9; /* Pmss Flow P9 (Pmss9). Mechanical Power output Pmss for Turbine Flow point 9 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::Simple_Float rpg; /* Permanent droop for governor output feedback (R-Perm-Gate). Default: nullptr */ - CIMPP::Simple_Float rpp; /* Permanent droop for electrical power feedback (R-Perm-Pe). Default: nullptr */ - CIMPP::Seconds td; /* Derivative controller time constant to limit the derivative characteristic beyond a breakdown frequency to avoid amplification of high-frequency noise (Td). Default: nullptr */ - CIMPP::Seconds tdv; /* Distributive Valve time lag time constant (Tdv). Default: nullptr */ - CIMPP::Seconds tg; /* Value to allow the Distribution valve controller to advance beyond the gate movement rate limit (Tg). Default: nullptr */ - CIMPP::Seconds tp; /* Pilot Valve time lag time constant (Tp). Default: nullptr */ - CIMPP::Seconds tpe; /* Electrical power droop time constant (Tpe). Default: nullptr */ - CIMPP::Seconds tw; /* Water inertia time constant (Tw) (>0). Default: nullptr */ + /** \brief Speed Dead Band (db). Default: nullptr */ + CIMPP::PU db; + + /** \brief Value to allow the integral controller to advance beyond the gate limits (Dicn). Default: nullptr */ + CIMPP::PU dicn; + + /** \brief Value to allow the Pilot valve controller to advance beyond the gate limits (Dpv). Default: nullptr */ + CIMPP::PU dpv; + + /** \brief Turbine damping factor (Dturb). Unit = delta P (PU of MWbase) / delta speed (PU). Default: nullptr */ + CIMPP::PU dturb; + + /** \brief Feedback signal selection (Sw). true = PID Output (if R-Perm-Gate=droop and R-Perm-Pe=0) false = Electrical Power (if R-Perm-Gate=0 and R-Perm-Pe=droop) or false = Gate Position (if R-Perm-Gate=droop and R-Perm-Pe=0). Default: false */ + CIMPP::Boolean feedbackSignal; + + /** \brief Flow Gate 1 (Fl1). Flow value for gate position point 1 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU fl1; + + /** \brief Flow Gate 2 (Fl2). Flow value for gate position point 2 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU fl2; + + /** \brief Flow Gate 3 (Fl3). Flow value for gate position point 3 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU fl3; + + /** \brief Flow Gate 4 (Fl4). Flow value for gate position point 4 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU fl4; + + /** \brief Flow Gate 5 (Fl5). Flow value for gate position point 5 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU fl5; + + /** \brief Flow P1 (Fp1). Turbine Flow value for point 1 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp1; + + /** \brief Flow P10 (Fp10). Turbine Flow value for point 10 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp10; + + /** \brief Flow P2 (Fp2). Turbine Flow value for point 2 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp2; + + /** \brief Flow P3 (Fp3). Turbine Flow value for point 3 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp3; + + /** \brief Flow P4 (Fp4). Turbine Flow value for point 4 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp4; + + /** \brief Flow P5 (Fp5). Turbine Flow value for point 5 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp5; + + /** \brief Flow P6 (Fp6). Turbine Flow value for point 6 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp6; + + /** \brief Flow P7 (Fp7). Turbine Flow value for point 7 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp7; + + /** \brief Flow P8 (Fp8). Turbine Flow value for point 8 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp8; + + /** \brief Flow P9 (Fp9). Turbine Flow value for point 9 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp9; + + /** \brief Maximum Gate Position (Gmax). Default: nullptr */ + CIMPP::PU gmax; + + /** \brief Minimum Gate Position (Gmin). Default: nullptr */ + CIMPP::PU gmin; + + /** \brief Maximum gate closing rate (Gtmxcl). Default: nullptr */ + CIMPP::PU gtmxcl; + + /** \brief Maximum gate opening rate (Gtmxop). Default: nullptr */ + CIMPP::PU gtmxop; + + /** \brief Gate 1 (Gv1). Gate Position value for point 1 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Gate 2 (Gv2). Gate Position value for point 2 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Gate 3 (Gv3). Gate Position value for point 3 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Gate 4 (Gv4). Gate Position value for point 4 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Gate 5 (Gv5). Gate Position value for point 5 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Derivative controller derivative gain (Kd). Default: nullptr */ + CIMPP::PU kd; + + /** \brief Derivative controller Integral gain (Ki). Default: nullptr */ + CIMPP::PU ki; + + /** \brief Derivative control gain (Kp). Default: nullptr */ + CIMPP::PU kp; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Pmss Flow P1 (Pmss1). Mechanical Power output Pmss for Turbine Flow point 1 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss1; + + /** \brief Pmss Flow P10 (Pmss10). Mechanical Power output Pmss for Turbine Flow point 10 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss10; + + /** \brief Pmss Flow P2 (Pmss2). Mechanical Power output Pmss for Turbine Flow point 2 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss2; + + /** \brief Pmss Flow P3 (Pmss3). Mechanical Power output Pmss for Turbine Flow point 3 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss3; + + /** \brief Pmss Flow P4 (Pmss4). Mechanical Power output Pmss for Turbine Flow point 4 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss4; + + /** \brief Pmss Flow P5 (Pmss5). Mechanical Power output Pmss for Turbine Flow point 5 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss5; + + /** \brief Pmss Flow P6 (Pmss6). Mechanical Power output Pmss for Turbine Flow point 6 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss6; + + /** \brief Pmss Flow P7 (Pmss7). Mechanical Power output Pmss for Turbine Flow point 7 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss7; + + /** \brief Pmss Flow P8 (Pmss8). Mechanical Power output Pmss for Turbine Flow point 8 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss8; + + /** \brief Pmss Flow P9 (Pmss9). Mechanical Power output Pmss for Turbine Flow point 9 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss9; + + /** \brief Permanent droop for governor output feedback (R-Perm-Gate). Default: nullptr */ + CIMPP::Simple_Float rpg; + + /** \brief Permanent droop for electrical power feedback (R-Perm-Pe). Default: nullptr */ + CIMPP::Simple_Float rpp; + + /** \brief Derivative controller time constant to limit the derivative characteristic beyond a breakdown frequency to avoid amplification of high-frequency noise (Td). Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Distributive Valve time lag time constant (Tdv). Default: nullptr */ + CIMPP::Seconds tdv; + + /** \brief Value to allow the Distribution valve controller to advance beyond the gate movement rate limit (Tg). Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Pilot Valve time lag time constant (Tp). Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Electrical power droop time constant (Tpe). Default: nullptr */ + CIMPP::Seconds tpe; + + /** \brief Water inertia time constant (Tw) (>0). Default: nullptr */ + CIMPP::Seconds tw; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GovHydroWPID.cpp b/CGMES_2.4.13_18DEC2013/GovHydroWPID.cpp index 4a392e676..52c605514 100644 --- a/CGMES_2.4.13_18DEC2013/GovHydroWPID.cpp +++ b/CGMES_2.4.13_18DEC2013/GovHydroWPID.cpp @@ -8,33 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -GovHydroWPID::GovHydroWPID() {}; -GovHydroWPID::~GovHydroWPID() {}; +GovHydroWPID::GovHydroWPID() {} +GovHydroWPID::~GovHydroWPID() {} static const std::list PossibleProfilesForClass = { @@ -82,298 +60,318 @@ GovHydroWPID::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroWPID_d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_d(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->d; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_gatmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_gatmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gatmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_gatmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_gatmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gatmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_reg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_reg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->reg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_treg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_treg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->treg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_velmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_velmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_velmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_velmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroWPID_d(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->d; if (!buffer.str().empty()) @@ -387,7 +385,8 @@ bool get_GovHydroWPID_d(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroWPID_gatmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gatmax; if (!buffer.str().empty()) @@ -401,7 +400,8 @@ bool get_GovHydroWPID_gatmax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroWPID_gatmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gatmin; if (!buffer.str().empty()) @@ -415,7 +415,8 @@ bool get_GovHydroWPID_gatmin(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroWPID_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -429,7 +430,8 @@ bool get_GovHydroWPID_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroWPID_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -443,7 +445,8 @@ bool get_GovHydroWPID_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroWPID_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -457,7 +460,8 @@ bool get_GovHydroWPID_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroWPID_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -471,7 +475,8 @@ bool get_GovHydroWPID_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWPID_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -485,7 +490,8 @@ bool get_GovHydroWPID_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWPID_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -499,7 +505,8 @@ bool get_GovHydroWPID_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWPID_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -513,7 +520,8 @@ bool get_GovHydroWPID_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroWPID_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -527,7 +535,8 @@ bool get_GovHydroWPID_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWPID_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -541,7 +550,8 @@ bool get_GovHydroWPID_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWPID_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -555,7 +565,8 @@ bool get_GovHydroWPID_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWPID_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -569,7 +580,8 @@ bool get_GovHydroWPID_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWPID_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -583,7 +595,8 @@ bool get_GovHydroWPID_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWPID_reg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->reg; if (!buffer.str().empty()) @@ -597,7 +610,8 @@ bool get_GovHydroWPID_reg(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroWPID_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -611,7 +625,8 @@ bool get_GovHydroWPID_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWPID_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -625,7 +640,8 @@ bool get_GovHydroWPID_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWPID_treg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->treg; if (!buffer.str().empty()) @@ -639,7 +655,8 @@ bool get_GovHydroWPID_treg(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWPID_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -653,7 +670,8 @@ bool get_GovHydroWPID_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWPID_velmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velmax; if (!buffer.str().empty()) @@ -667,7 +685,8 @@ bool get_GovHydroWPID_velmax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroWPID_velmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velmin; if (!buffer.str().empty()) @@ -679,8 +698,6 @@ bool get_GovHydroWPID_velmin(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char GovHydroWPID::debugName[] = "GovHydroWPID"; const char* GovHydroWPID::debugString() const { @@ -689,33 +706,33 @@ const char* GovHydroWPID::debugString() const void GovHydroWPID::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroWPID"), &GovHydroWPID_factory)); + factory_map.emplace("cim:GovHydroWPID", &GovHydroWPID_factory); } void GovHydroWPID::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.d"), &assign_GovHydroWPID_d)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.gatmax"), &assign_GovHydroWPID_gatmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.gatmin"), &assign_GovHydroWPID_gatmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.gv1"), &assign_GovHydroWPID_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.gv2"), &assign_GovHydroWPID_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.gv3"), &assign_GovHydroWPID_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.kd"), &assign_GovHydroWPID_kd)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.ki"), &assign_GovHydroWPID_ki)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.kp"), &assign_GovHydroWPID_kp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.mwbase"), &assign_GovHydroWPID_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.pgv1"), &assign_GovHydroWPID_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.pgv2"), &assign_GovHydroWPID_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.pgv3"), &assign_GovHydroWPID_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.pmax"), &assign_GovHydroWPID_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.pmin"), &assign_GovHydroWPID_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.reg"), &assign_GovHydroWPID_reg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.ta"), &assign_GovHydroWPID_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.tb"), &assign_GovHydroWPID_tb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.treg"), &assign_GovHydroWPID_treg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.tw"), &assign_GovHydroWPID_tw)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.velmax"), &assign_GovHydroWPID_velmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.velmin"), &assign_GovHydroWPID_velmin)); + assign_map.emplace("cim:GovHydroWPID.d", &assign_GovHydroWPID_d); + assign_map.emplace("cim:GovHydroWPID.gatmax", &assign_GovHydroWPID_gatmax); + assign_map.emplace("cim:GovHydroWPID.gatmin", &assign_GovHydroWPID_gatmin); + assign_map.emplace("cim:GovHydroWPID.gv1", &assign_GovHydroWPID_gv1); + assign_map.emplace("cim:GovHydroWPID.gv2", &assign_GovHydroWPID_gv2); + assign_map.emplace("cim:GovHydroWPID.gv3", &assign_GovHydroWPID_gv3); + assign_map.emplace("cim:GovHydroWPID.kd", &assign_GovHydroWPID_kd); + assign_map.emplace("cim:GovHydroWPID.ki", &assign_GovHydroWPID_ki); + assign_map.emplace("cim:GovHydroWPID.kp", &assign_GovHydroWPID_kp); + assign_map.emplace("cim:GovHydroWPID.mwbase", &assign_GovHydroWPID_mwbase); + assign_map.emplace("cim:GovHydroWPID.pgv1", &assign_GovHydroWPID_pgv1); + assign_map.emplace("cim:GovHydroWPID.pgv2", &assign_GovHydroWPID_pgv2); + assign_map.emplace("cim:GovHydroWPID.pgv3", &assign_GovHydroWPID_pgv3); + assign_map.emplace("cim:GovHydroWPID.pmax", &assign_GovHydroWPID_pmax); + assign_map.emplace("cim:GovHydroWPID.pmin", &assign_GovHydroWPID_pmin); + assign_map.emplace("cim:GovHydroWPID.reg", &assign_GovHydroWPID_reg); + assign_map.emplace("cim:GovHydroWPID.ta", &assign_GovHydroWPID_ta); + assign_map.emplace("cim:GovHydroWPID.tb", &assign_GovHydroWPID_tb); + assign_map.emplace("cim:GovHydroWPID.treg", &assign_GovHydroWPID_treg); + assign_map.emplace("cim:GovHydroWPID.tw", &assign_GovHydroWPID_tw); + assign_map.emplace("cim:GovHydroWPID.velmax", &assign_GovHydroWPID_velmax); + assign_map.emplace("cim:GovHydroWPID.velmin", &assign_GovHydroWPID_velmin); } void GovHydroWPID::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/GovHydroWPID.hpp b/CGMES_2.4.13_18DEC2013/GovHydroWPID.hpp index de5f8f0c6..7c5d870fa 100644 --- a/CGMES_2.4.13_18DEC2013/GovHydroWPID.hpp +++ b/CGMES_2.4.13_18DEC2013/GovHydroWPID.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Woodward PID Hydro Governor. - */ + /** \brief Woodward PID Hydro Governor. */ class GovHydroWPID : public TurbineGovernorDynamics { public: @@ -29,28 +27,71 @@ namespace CIMPP GovHydroWPID(); ~GovHydroWPID() override; - CIMPP::PU d; /* Turbine damping factor (D). Unit = delta P / delta speed. Default: nullptr */ - CIMPP::PU gatmax; /* Gate opening Limit Maximum (Gatmax). Default: nullptr */ - CIMPP::PU gatmin; /* Gate opening Limit Minimum (Gatmin). Default: nullptr */ - CIMPP::PU gv1; /* Gate position 1 (Gv1). Default: nullptr */ - CIMPP::PU gv2; /* Gate position 2 (Gv2). Default: nullptr */ - CIMPP::PU gv3; /* Gate position 3 (Gv3). Default: nullptr */ - CIMPP::PU kd; /* Derivative gain (Kd). Typical Value = 1.11. Default: nullptr */ - CIMPP::PU ki; /* Reset gain (Ki). Typical Value = 0.36. Default: nullptr */ - CIMPP::PU kp; /* Proportional gain (Kp). Typical Value = 0.1. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Output at Gv1 PU of MWbase (Pgv1). Default: nullptr */ - CIMPP::PU pgv2; /* Output at Gv2 PU of MWbase (Pgv2). Default: nullptr */ - CIMPP::PU pgv3; /* Output at Gv3 PU of MWbase (Pgv3). Default: nullptr */ - CIMPP::PU pmax; /* Maximum Power Output (Pmax). Default: nullptr */ - CIMPP::PU pmin; /* Minimum Power Output (Pmin). Default: nullptr */ - CIMPP::PU reg; /* Permanent drop (Reg). Default: nullptr */ - CIMPP::Seconds ta; /* Controller time constant (Ta) (>0). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tb; /* Gate servo time constant (Tb) (>0). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds treg; /* Speed detector time constant (Treg). Default: nullptr */ - CIMPP::Seconds tw; /* Water inertia time constant (Tw) (>0). Typical Value = 0. Default: nullptr */ - CIMPP::PU velmax; /* Maximum gate opening velocity (Velmax). Unit = PU/sec. Typical Value = 0. Default: nullptr */ - CIMPP::PU velmin; /* Maximum gate closing velocity (Velmin). Unit = PU/sec. Typical Value = 0. Default: nullptr */ + /** \brief Turbine damping factor (D). Unit = delta P / delta speed. Default: nullptr */ + CIMPP::PU d; + + /** \brief Gate opening Limit Maximum (Gatmax). Default: nullptr */ + CIMPP::PU gatmax; + + /** \brief Gate opening Limit Minimum (Gatmin). Default: nullptr */ + CIMPP::PU gatmin; + + /** \brief Gate position 1 (Gv1). Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Gate position 2 (Gv2). Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Gate position 3 (Gv3). Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Derivative gain (Kd). Typical Value = 1.11. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Reset gain (Ki). Typical Value = 0.36. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Proportional gain (Kp). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Output at Gv1 PU of MWbase (Pgv1). Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Output at Gv2 PU of MWbase (Pgv2). Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Output at Gv3 PU of MWbase (Pgv3). Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Maximum Power Output (Pmax). Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum Power Output (Pmin). Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Permanent drop (Reg). Default: nullptr */ + CIMPP::PU reg; + + /** \brief Controller time constant (Ta) (>0). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Gate servo time constant (Tb) (>0). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Speed detector time constant (Treg). Default: nullptr */ + CIMPP::Seconds treg; + + /** \brief Water inertia time constant (Tw) (>0). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tw; + + /** \brief Maximum gate opening velocity (Velmax). Unit = PU/sec. Typical Value = 0. Default: nullptr */ + CIMPP::PU velmax; + + /** \brief Maximum gate closing velocity (Velmin). Unit = PU/sec. Typical Value = 0. Default: nullptr */ + CIMPP::PU velmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GovSteam0.cpp b/CGMES_2.4.13_18DEC2013/GovSteam0.cpp index 936ef9f65..cc1c74f62 100644 --- a/CGMES_2.4.13_18DEC2013/GovSteam0.cpp +++ b/CGMES_2.4.13_18DEC2013/GovSteam0.cpp @@ -8,19 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -GovSteam0::GovSteam0() {}; -GovSteam0::~GovSteam0() {}; +GovSteam0::GovSteam0() {} +GovSteam0::~GovSteam0() {} static const std::list PossibleProfilesForClass = { @@ -54,116 +46,122 @@ GovSteam0::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteam0_dt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam0_dt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam0_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam0_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam0_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam0_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam0_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam0_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam0_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam0_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam0_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam0_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam0_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam0_vmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam0_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam0_vmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteam0_dt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dt; if (!buffer.str().empty()) @@ -177,7 +175,8 @@ bool get_GovSteam0_dt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam0_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -191,7 +190,8 @@ bool get_GovSteam0_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteam0_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -205,7 +205,8 @@ bool get_GovSteam0_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovSteam0_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -219,7 +220,8 @@ bool get_GovSteam0_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam0_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -233,7 +235,8 @@ bool get_GovSteam0_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam0_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -247,7 +250,8 @@ bool get_GovSteam0_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam0_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmax; if (!buffer.str().empty()) @@ -261,7 +265,8 @@ bool get_GovSteam0_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam0_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmin; if (!buffer.str().empty()) @@ -273,8 +278,6 @@ bool get_GovSteam0_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char GovSteam0::debugName[] = "GovSteam0"; const char* GovSteam0::debugString() const { @@ -283,19 +286,19 @@ const char* GovSteam0::debugString() const void GovSteam0::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteam0"), &GovSteam0_factory)); + factory_map.emplace("cim:GovSteam0", &GovSteam0_factory); } void GovSteam0::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteam0.dt"), &assign_GovSteam0_dt)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam0.mwbase"), &assign_GovSteam0_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam0.r"), &assign_GovSteam0_r)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam0.t1"), &assign_GovSteam0_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam0.t2"), &assign_GovSteam0_t2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam0.t3"), &assign_GovSteam0_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam0.vmax"), &assign_GovSteam0_vmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam0.vmin"), &assign_GovSteam0_vmin)); + assign_map.emplace("cim:GovSteam0.dt", &assign_GovSteam0_dt); + assign_map.emplace("cim:GovSteam0.mwbase", &assign_GovSteam0_mwbase); + assign_map.emplace("cim:GovSteam0.r", &assign_GovSteam0_r); + assign_map.emplace("cim:GovSteam0.t1", &assign_GovSteam0_t1); + assign_map.emplace("cim:GovSteam0.t2", &assign_GovSteam0_t2); + assign_map.emplace("cim:GovSteam0.t3", &assign_GovSteam0_t3); + assign_map.emplace("cim:GovSteam0.vmax", &assign_GovSteam0_vmax); + assign_map.emplace("cim:GovSteam0.vmin", &assign_GovSteam0_vmin); } void GovSteam0::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/GovSteam0.hpp b/CGMES_2.4.13_18DEC2013/GovSteam0.hpp index 1a700ab1d..9929fe7ad 100644 --- a/CGMES_2.4.13_18DEC2013/GovSteam0.hpp +++ b/CGMES_2.4.13_18DEC2013/GovSteam0.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A simplified steam turbine governor model. - */ + /** \brief A simplified steam turbine governor model. */ class GovSteam0 : public TurbineGovernorDynamics { public: @@ -29,14 +27,29 @@ namespace CIMPP GovSteam0(); ~GovSteam0() override; - CIMPP::PU dt; /* Turbine damping coefficient (Dt). Unit = delta P / delta speed. Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU r; /* Permanent droop (R). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds t1; /* Steam bowl time constant (T1). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds t2; /* Numerator time constant of T2/T3 block (T2). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds t3; /* Reheater time constant (T3). Typical Value = 10. Default: nullptr */ - CIMPP::PU vmax; /* Maximum valve position, PU of mwcap (Vmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU vmin; /* Minimum valve position, PU of mwcap (Vmin). Typical Value = 0. Default: nullptr */ + /** \brief Turbine damping coefficient (Dt). Unit = delta P / delta speed. Typical Value = 0. Default: nullptr */ + CIMPP::PU dt; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Permanent droop (R). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU r; + + /** \brief Steam bowl time constant (T1). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Numerator time constant of T2/T3 block (T2). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Reheater time constant (T3). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Maximum valve position, PU of mwcap (Vmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU vmax; + + /** \brief Minimum valve position, PU of mwcap (Vmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU vmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GovSteam1.cpp b/CGMES_2.4.13_18DEC2013/GovSteam1.cpp index 0eb4ba0ba..9f3c107a5 100644 --- a/CGMES_2.4.13_18DEC2013/GovSteam1.cpp +++ b/CGMES_2.4.13_18DEC2013/GovSteam1.cpp @@ -8,50 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Frequency.hpp" -#include "ActivePower.hpp" -#include "Frequency.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Boolean.hpp" using namespace CIMPP; -GovSteam1::GovSteam1() {}; -GovSteam1::~GovSteam1() {}; +GovSteam1::GovSteam1() {} +GovSteam1::~GovSteam1() {} static const std::list PossibleProfilesForClass = { @@ -116,519 +77,556 @@ GovSteam1::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteam1_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_eps(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eps; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_gv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_k4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_k5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_k5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_k6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_k6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_k7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_k7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_k8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_k8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_pgv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_sdb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_sdb1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->sdb1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_sdb2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_sdb2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->sdb2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_t7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_uc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_uo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_uo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_valve(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_valve(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->valve; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteam1_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -642,7 +640,8 @@ bool get_GovSteam1_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam1_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -656,7 +655,8 @@ bool get_GovSteam1_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam1_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eps; if (!buffer.str().empty()) @@ -670,7 +670,8 @@ bool get_GovSteam1_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam1_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -684,7 +685,8 @@ bool get_GovSteam1_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam1_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -698,7 +700,8 @@ bool get_GovSteam1_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam1_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -712,7 +715,8 @@ bool get_GovSteam1_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam1_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -726,7 +730,8 @@ bool get_GovSteam1_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam1_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -740,7 +745,8 @@ bool get_GovSteam1_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam1_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv6; if (!buffer.str().empty()) @@ -754,7 +760,8 @@ bool get_GovSteam1_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam1_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -768,7 +775,8 @@ bool get_GovSteam1_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovSteam1_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -782,7 +790,8 @@ bool get_GovSteam1_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -796,7 +805,8 @@ bool get_GovSteam1_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -810,7 +820,8 @@ bool get_GovSteam1_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k4; if (!buffer.str().empty()) @@ -824,7 +835,8 @@ bool get_GovSteam1_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k5; if (!buffer.str().empty()) @@ -838,7 +850,8 @@ bool get_GovSteam1_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_k6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k6; if (!buffer.str().empty()) @@ -852,7 +865,8 @@ bool get_GovSteam1_k6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_k7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k7; if (!buffer.str().empty()) @@ -866,7 +880,8 @@ bool get_GovSteam1_k7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_k8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k8; if (!buffer.str().empty()) @@ -880,7 +895,8 @@ bool get_GovSteam1_k8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -894,7 +910,8 @@ bool get_GovSteam1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteam1_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -908,7 +925,8 @@ bool get_GovSteam1_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -922,7 +940,8 @@ bool get_GovSteam1_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -936,7 +955,8 @@ bool get_GovSteam1_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -950,7 +970,8 @@ bool get_GovSteam1_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -964,7 +985,8 @@ bool get_GovSteam1_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv6; if (!buffer.str().empty()) @@ -978,7 +1000,8 @@ bool get_GovSteam1_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -992,7 +1015,8 @@ bool get_GovSteam1_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -1006,7 +1030,8 @@ bool get_GovSteam1_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_sdb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->sdb1; if (!buffer.str().empty()) @@ -1020,7 +1045,8 @@ bool get_GovSteam1_sdb1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_sdb2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->sdb2; if (!buffer.str().empty()) @@ -1034,7 +1060,8 @@ bool get_GovSteam1_sdb2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -1048,7 +1075,8 @@ bool get_GovSteam1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -1062,7 +1090,8 @@ bool get_GovSteam1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -1076,7 +1105,8 @@ bool get_GovSteam1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -1090,7 +1120,8 @@ bool get_GovSteam1_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -1104,7 +1135,8 @@ bool get_GovSteam1_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -1118,7 +1150,8 @@ bool get_GovSteam1_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t7; if (!buffer.str().empty()) @@ -1132,7 +1165,8 @@ bool get_GovSteam1_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uc; if (!buffer.str().empty()) @@ -1146,7 +1180,8 @@ bool get_GovSteam1_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uo; if (!buffer.str().empty()) @@ -1160,7 +1195,8 @@ bool get_GovSteam1_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_valve(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->valve; if (!buffer.str().empty()) @@ -1172,8 +1208,6 @@ bool get_GovSteam1_valve(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } - - const char GovSteam1::debugName[] = "GovSteam1"; const char* GovSteam1::debugString() const { @@ -1182,50 +1216,50 @@ const char* GovSteam1::debugString() const void GovSteam1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteam1"), &GovSteam1_factory)); + factory_map.emplace("cim:GovSteam1", &GovSteam1_factory); } void GovSteam1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.db1"), &assign_GovSteam1_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.db2"), &assign_GovSteam1_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.eps"), &assign_GovSteam1_eps)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.gv1"), &assign_GovSteam1_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.gv2"), &assign_GovSteam1_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.gv3"), &assign_GovSteam1_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.gv4"), &assign_GovSteam1_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.gv5"), &assign_GovSteam1_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.gv6"), &assign_GovSteam1_gv6)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.k"), &assign_GovSteam1_k)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.k1"), &assign_GovSteam1_k1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.k2"), &assign_GovSteam1_k2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.k3"), &assign_GovSteam1_k3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.k4"), &assign_GovSteam1_k4)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.k5"), &assign_GovSteam1_k5)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.k6"), &assign_GovSteam1_k6)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.k7"), &assign_GovSteam1_k7)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.k8"), &assign_GovSteam1_k8)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.mwbase"), &assign_GovSteam1_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.pgv1"), &assign_GovSteam1_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.pgv2"), &assign_GovSteam1_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.pgv3"), &assign_GovSteam1_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.pgv4"), &assign_GovSteam1_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.pgv5"), &assign_GovSteam1_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.pgv6"), &assign_GovSteam1_pgv6)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.pmax"), &assign_GovSteam1_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.pmin"), &assign_GovSteam1_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.sdb1"), &assign_GovSteam1_sdb1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.sdb2"), &assign_GovSteam1_sdb2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.t1"), &assign_GovSteam1_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.t2"), &assign_GovSteam1_t2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.t3"), &assign_GovSteam1_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.t4"), &assign_GovSteam1_t4)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.t5"), &assign_GovSteam1_t5)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.t6"), &assign_GovSteam1_t6)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.t7"), &assign_GovSteam1_t7)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.uc"), &assign_GovSteam1_uc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.uo"), &assign_GovSteam1_uo)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.valve"), &assign_GovSteam1_valve)); + assign_map.emplace("cim:GovSteam1.db1", &assign_GovSteam1_db1); + assign_map.emplace("cim:GovSteam1.db2", &assign_GovSteam1_db2); + assign_map.emplace("cim:GovSteam1.eps", &assign_GovSteam1_eps); + assign_map.emplace("cim:GovSteam1.gv1", &assign_GovSteam1_gv1); + assign_map.emplace("cim:GovSteam1.gv2", &assign_GovSteam1_gv2); + assign_map.emplace("cim:GovSteam1.gv3", &assign_GovSteam1_gv3); + assign_map.emplace("cim:GovSteam1.gv4", &assign_GovSteam1_gv4); + assign_map.emplace("cim:GovSteam1.gv5", &assign_GovSteam1_gv5); + assign_map.emplace("cim:GovSteam1.gv6", &assign_GovSteam1_gv6); + assign_map.emplace("cim:GovSteam1.k", &assign_GovSteam1_k); + assign_map.emplace("cim:GovSteam1.k1", &assign_GovSteam1_k1); + assign_map.emplace("cim:GovSteam1.k2", &assign_GovSteam1_k2); + assign_map.emplace("cim:GovSteam1.k3", &assign_GovSteam1_k3); + assign_map.emplace("cim:GovSteam1.k4", &assign_GovSteam1_k4); + assign_map.emplace("cim:GovSteam1.k5", &assign_GovSteam1_k5); + assign_map.emplace("cim:GovSteam1.k6", &assign_GovSteam1_k6); + assign_map.emplace("cim:GovSteam1.k7", &assign_GovSteam1_k7); + assign_map.emplace("cim:GovSteam1.k8", &assign_GovSteam1_k8); + assign_map.emplace("cim:GovSteam1.mwbase", &assign_GovSteam1_mwbase); + assign_map.emplace("cim:GovSteam1.pgv1", &assign_GovSteam1_pgv1); + assign_map.emplace("cim:GovSteam1.pgv2", &assign_GovSteam1_pgv2); + assign_map.emplace("cim:GovSteam1.pgv3", &assign_GovSteam1_pgv3); + assign_map.emplace("cim:GovSteam1.pgv4", &assign_GovSteam1_pgv4); + assign_map.emplace("cim:GovSteam1.pgv5", &assign_GovSteam1_pgv5); + assign_map.emplace("cim:GovSteam1.pgv6", &assign_GovSteam1_pgv6); + assign_map.emplace("cim:GovSteam1.pmax", &assign_GovSteam1_pmax); + assign_map.emplace("cim:GovSteam1.pmin", &assign_GovSteam1_pmin); + assign_map.emplace("cim:GovSteam1.sdb1", &assign_GovSteam1_sdb1); + assign_map.emplace("cim:GovSteam1.sdb2", &assign_GovSteam1_sdb2); + assign_map.emplace("cim:GovSteam1.t1", &assign_GovSteam1_t1); + assign_map.emplace("cim:GovSteam1.t2", &assign_GovSteam1_t2); + assign_map.emplace("cim:GovSteam1.t3", &assign_GovSteam1_t3); + assign_map.emplace("cim:GovSteam1.t4", &assign_GovSteam1_t4); + assign_map.emplace("cim:GovSteam1.t5", &assign_GovSteam1_t5); + assign_map.emplace("cim:GovSteam1.t6", &assign_GovSteam1_t6); + assign_map.emplace("cim:GovSteam1.t7", &assign_GovSteam1_t7); + assign_map.emplace("cim:GovSteam1.uc", &assign_GovSteam1_uc); + assign_map.emplace("cim:GovSteam1.uo", &assign_GovSteam1_uo); + assign_map.emplace("cim:GovSteam1.valve", &assign_GovSteam1_valve); } void GovSteam1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/GovSteam1.hpp b/CGMES_2.4.13_18DEC2013/GovSteam1.hpp index 6600a3c67..da362ba99 100644 --- a/CGMES_2.4.13_18DEC2013/GovSteam1.hpp +++ b/CGMES_2.4.13_18DEC2013/GovSteam1.hpp @@ -22,9 +22,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Steam turbine governor model, based on the GovSteamIEEE1 model (with optional deadband and nonlinear valve gain added). - */ + /** \brief Steam turbine governor model, based on the GovSteamIEEE1 model (with optional deadband and nonlinear valve gain added). */ class GovSteam1 : public TurbineGovernorDynamics { public: @@ -32,45 +30,122 @@ namespace CIMPP GovSteam1(); ~GovSteam1() override; - CIMPP::Frequency db1; /* Intentional deadband width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower db2; /* Unintentional deadband (db2). Unit = MW. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency eps; /* Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::PU gv1; /* Nonlinear gain valve position point 1 (GV1). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain valve position point 2 (GV2). Typical Value = 0.4. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain valve position point 3 (GV3). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain valve position point 4 (GV4). Typical Value = 0.6. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain valve position point 5 (GV5). Typical Value = 1. Default: nullptr */ - CIMPP::PU gv6; /* Nonlinear gain valve position point 6 (GV6). Typical Value = 0. Default: nullptr */ - CIMPP::PU k; /* Governor gain (reciprocal of droop) (K) (>0). Typical Value = 25. Default: nullptr */ - CIMPP::Simple_Float k1; /* Fraction of HP shaft power after first boiler pass (K1). Typical Value = 0.2. Default: nullptr */ - CIMPP::Simple_Float k2; /* Fraction of LP shaft power after first boiler pass (K2). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float k3; /* Fraction of HP shaft power after second boiler pass (K3). Typical Value = 0.3. Default: nullptr */ - CIMPP::Simple_Float k4; /* Fraction of LP shaft power after second boiler pass (K4). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float k5; /* Fraction of HP shaft power after third boiler pass (K5). Typical Value = 0.5. Default: nullptr */ - CIMPP::Simple_Float k6; /* Fraction of LP shaft power after third boiler pass (K6). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float k7; /* Fraction of HP shaft power after fourth boiler pass (K7). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float k8; /* Fraction of LP shaft power after fourth boiler pass (K8). Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain power value point 1 (Pgv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain power value point 2 (Pgv2). Typical Value = 0.75. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain power value point 3 (Pgv3). Typical Value = 0.91. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain power value point 4 (Pgv4). Typical Value = 0.98. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain power value point 5 (Pgv5). Typical Value = 1. Default: nullptr */ - CIMPP::PU pgv6; /* Nonlinear gain power value point 6 (Pgv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU pmax; /* Maximum valve opening (Pmax) (> Pmin). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum valve opening (Pmin) (>=0). Typical Value = 0. Default: nullptr */ - CIMPP::Boolean sdb1; /* Intentional deadband indicator. true = intentional deadband is applied false = intentional deadband is not applied. Typical Value = true. Default: false */ - CIMPP::Boolean sdb2; /* Unintentional deadband location. true = intentional deadband is applied before point `A` false = intentional deadband is applied after point `A`. Typical Value = true. Default: false */ - CIMPP::Seconds t1; /* Governor lag time constant (T1). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t2; /* Governor lead time constant (T2). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t3; /* Valve positioner time constant (T3(>0). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t4; /* Inlet piping/steam bowl time constant (T4). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds t5; /* Time constant of second boiler pass (T5). Typical Value = 5. Default: nullptr */ - CIMPP::Seconds t6; /* Time constant of third boiler pass (T6). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds t7; /* Time constant of fourth boiler pass (T7). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float uc; /* Maximum valve closing velocity (Uc) (<0). Unit = PU/sec. Typical Value = -10. Default: nullptr */ - CIMPP::Simple_Float uo; /* Maximum valve opening velocity (Uo) (>0). Unit = PU/sec. Typical Value = 1. Default: nullptr */ - CIMPP::Boolean valve; /* Nonlinear valve characteristic. true = nonlinear valve characteristic is used false = nonlinear valve characteristic is not used. Typical Value = true. Default: false */ + /** \brief Intentional deadband width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Unintentional deadband (db2). Unit = MW. Typical Value = 0. Default: nullptr */ + CIMPP::ActivePower db2; + + /** \brief Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency eps; + + /** \brief Nonlinear gain valve position point 1 (GV1). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain valve position point 2 (GV2). Typical Value = 0.4. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain valve position point 3 (GV3). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain valve position point 4 (GV4). Typical Value = 0.6. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain valve position point 5 (GV5). Typical Value = 1. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Nonlinear gain valve position point 6 (GV6). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv6; + + /** \brief Governor gain (reciprocal of droop) (K) (>0). Typical Value = 25. Default: nullptr */ + CIMPP::PU k; + + /** \brief Fraction of HP shaft power after first boiler pass (K1). Typical Value = 0.2. Default: nullptr */ + CIMPP::Simple_Float k1; + + /** \brief Fraction of LP shaft power after first boiler pass (K2). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float k2; + + /** \brief Fraction of HP shaft power after second boiler pass (K3). Typical Value = 0.3. Default: nullptr */ + CIMPP::Simple_Float k3; + + /** \brief Fraction of LP shaft power after second boiler pass (K4). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float k4; + + /** \brief Fraction of HP shaft power after third boiler pass (K5). Typical Value = 0.5. Default: nullptr */ + CIMPP::Simple_Float k5; + + /** \brief Fraction of LP shaft power after third boiler pass (K6). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float k6; + + /** \brief Fraction of HP shaft power after fourth boiler pass (K7). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float k7; + + /** \brief Fraction of LP shaft power after fourth boiler pass (K8). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float k8; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain power value point 1 (Pgv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain power value point 2 (Pgv2). Typical Value = 0.75. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain power value point 3 (Pgv3). Typical Value = 0.91. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain power value point 4 (Pgv4). Typical Value = 0.98. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain power value point 5 (Pgv5). Typical Value = 1. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief Nonlinear gain power value point 6 (Pgv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv6; + + /** \brief Maximum valve opening (Pmax) (> Pmin). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum valve opening (Pmin) (>=0). Typical Value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Intentional deadband indicator. true = intentional deadband is applied false = intentional deadband is not applied. Typical Value = true. Default: false */ + CIMPP::Boolean sdb1; + + /** \brief Unintentional deadband location. true = intentional deadband is applied before point `A` false = intentional deadband is applied after point `A`. Typical Value = true. Default: false */ + CIMPP::Boolean sdb2; + + /** \brief Governor lag time constant (T1). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Governor lead time constant (T2). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Valve positioner time constant (T3(>0). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Inlet piping/steam bowl time constant (T4). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant of second boiler pass (T5). Typical Value = 5. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Time constant of third boiler pass (T6). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time constant of fourth boiler pass (T7). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t7; + + /** \brief Maximum valve closing velocity (Uc) (<0). Unit = PU/sec. Typical Value = -10. Default: nullptr */ + CIMPP::Simple_Float uc; + + /** \brief Maximum valve opening velocity (Uo) (>0). Unit = PU/sec. Typical Value = 1. Default: nullptr */ + CIMPP::Simple_Float uo; + + /** \brief Nonlinear valve characteristic. true = nonlinear valve characteristic is used false = nonlinear valve characteristic is not used. Typical Value = true. Default: false */ + CIMPP::Boolean valve; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GovSteam2.cpp b/CGMES_2.4.13_18DEC2013/GovSteam2.cpp index c67011777..8696d39ab 100644 --- a/CGMES_2.4.13_18DEC2013/GovSteam2.cpp +++ b/CGMES_2.4.13_18DEC2013/GovSteam2.cpp @@ -8,19 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -GovSteam2::GovSteam2() {}; -GovSteam2::~GovSteam2() {}; +GovSteam2::GovSteam2() {} +GovSteam2::~GovSteam2() {} static const std::list PossibleProfilesForClass = { @@ -54,116 +46,122 @@ GovSteam2::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteam2_dbf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam2_dbf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dbf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam2_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam2_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam2_mnef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam2_mnef(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mnef; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam2_mxef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam2_mxef(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mxef; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam2_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam2_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam2_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam2_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam2_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam2_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam2_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam2_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteam2_dbf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dbf; if (!buffer.str().empty()) @@ -177,7 +175,8 @@ bool get_GovSteam2_dbf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam2_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -191,7 +190,8 @@ bool get_GovSteam2_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovSteam2_mnef(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mnef; if (!buffer.str().empty()) @@ -205,7 +205,8 @@ bool get_GovSteam2_mnef(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam2_mxef(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mxef; if (!buffer.str().empty()) @@ -219,7 +220,8 @@ bool get_GovSteam2_mxef(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam2_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -233,7 +235,8 @@ bool get_GovSteam2_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam2_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -247,7 +250,8 @@ bool get_GovSteam2_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam2_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -261,7 +265,8 @@ bool get_GovSteam2_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam2_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -273,8 +278,6 @@ bool get_GovSteam2_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char GovSteam2::debugName[] = "GovSteam2"; const char* GovSteam2::debugString() const { @@ -283,19 +286,19 @@ const char* GovSteam2::debugString() const void GovSteam2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteam2"), &GovSteam2_factory)); + factory_map.emplace("cim:GovSteam2", &GovSteam2_factory); } void GovSteam2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteam2.dbf"), &assign_GovSteam2_dbf)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam2.k"), &assign_GovSteam2_k)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam2.mnef"), &assign_GovSteam2_mnef)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam2.mxef"), &assign_GovSteam2_mxef)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam2.pmax"), &assign_GovSteam2_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam2.pmin"), &assign_GovSteam2_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam2.t1"), &assign_GovSteam2_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam2.t2"), &assign_GovSteam2_t2)); + assign_map.emplace("cim:GovSteam2.dbf", &assign_GovSteam2_dbf); + assign_map.emplace("cim:GovSteam2.k", &assign_GovSteam2_k); + assign_map.emplace("cim:GovSteam2.mnef", &assign_GovSteam2_mnef); + assign_map.emplace("cim:GovSteam2.mxef", &assign_GovSteam2_mxef); + assign_map.emplace("cim:GovSteam2.pmax", &assign_GovSteam2_pmax); + assign_map.emplace("cim:GovSteam2.pmin", &assign_GovSteam2_pmin); + assign_map.emplace("cim:GovSteam2.t1", &assign_GovSteam2_t1); + assign_map.emplace("cim:GovSteam2.t2", &assign_GovSteam2_t2); } void GovSteam2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/GovSteam2.hpp b/CGMES_2.4.13_18DEC2013/GovSteam2.hpp index d3571354f..1968c0eb3 100644 --- a/CGMES_2.4.13_18DEC2013/GovSteam2.hpp +++ b/CGMES_2.4.13_18DEC2013/GovSteam2.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Simplified governor model. - */ + /** \brief Simplified governor model. */ class GovSteam2 : public TurbineGovernorDynamics { public: @@ -29,14 +27,29 @@ namespace CIMPP GovSteam2(); ~GovSteam2() override; - CIMPP::PU dbf; /* Frequency dead band (DBF). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float k; /* Governor gain (reciprocal of droop) (K). Typical Value = 20. Default: nullptr */ - CIMPP::PU mnef; /* Fuel flow maximum negative error value (MN). Typical Value = -1. Default: nullptr */ - CIMPP::PU mxef; /* Fuel flow maximum positive error value (MX). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmax; /* Maximum fuel flow (P). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum fuel flow (P). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t1; /* Governor lag time constant (T) (>0). Typical Value = 0.45. Default: nullptr */ - CIMPP::Seconds t2; /* Governor lead time constant (T) (may be 0). Typical Value = 0. Default: nullptr */ + /** \brief Frequency dead band (DBF). Typical Value = 0. Default: nullptr */ + CIMPP::PU dbf; + + /** \brief Governor gain (reciprocal of droop) (K). Typical Value = 20. Default: nullptr */ + CIMPP::Simple_Float k; + + /** \brief Fuel flow maximum negative error value (MN). Typical Value = -1. Default: nullptr */ + CIMPP::PU mnef; + + /** \brief Fuel flow maximum positive error value (MX). Typical Value = 1. Default: nullptr */ + CIMPP::PU mxef; + + /** \brief Maximum fuel flow (P). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum fuel flow (P). Typical Value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Governor lag time constant (T) (>0). Typical Value = 0.45. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Governor lead time constant (T) (may be 0). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t2; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GovSteamCC.cpp b/CGMES_2.4.13_18DEC2013/GovSteamCC.cpp index ba02e8c7f..9d214c83b 100644 --- a/CGMES_2.4.13_18DEC2013/GovSteamCC.cpp +++ b/CGMES_2.4.13_18DEC2013/GovSteamCC.cpp @@ -8,28 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -GovSteamCC::GovSteamCC() {}; -GovSteamCC::~GovSteamCC() {}; +GovSteamCC::GovSteamCC() {} +GovSteamCC::~GovSteamCC() {} static const std::list PossibleProfilesForClass = { @@ -72,233 +55,248 @@ GovSteamCC::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteamCC_dhp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_dhp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dhp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_dlp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_dlp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dlp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_fhp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_fhp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fhp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_flp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_flp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_pmaxhp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_pmaxhp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmaxhp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_pmaxlp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_pmaxlp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmaxlp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_rhp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_rhp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rhp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_rlp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_rlp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rlp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_t1hp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_t1hp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1hp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_t1lp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_t1lp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1lp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_t3hp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_t3hp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3hp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_t3lp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_t3lp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3lp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_t4hp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_t4hp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4hp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_t4lp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_t4lp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4lp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_t5hp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_t5hp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5hp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_t5lp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_t5lp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5lp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteamCC_dhp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dhp; if (!buffer.str().empty()) @@ -312,7 +310,8 @@ bool get_GovSteamCC_dhp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamCC_dlp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dlp; if (!buffer.str().empty()) @@ -326,7 +325,8 @@ bool get_GovSteamCC_dlp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamCC_fhp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fhp; if (!buffer.str().empty()) @@ -340,7 +340,8 @@ bool get_GovSteamCC_fhp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamCC_flp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flp; if (!buffer.str().empty()) @@ -354,7 +355,8 @@ bool get_GovSteamCC_flp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamCC_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -368,7 +370,8 @@ bool get_GovSteamCC_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamCC_pmaxhp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmaxhp; if (!buffer.str().empty()) @@ -382,7 +385,8 @@ bool get_GovSteamCC_pmaxhp(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamCC_pmaxlp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmaxlp; if (!buffer.str().empty()) @@ -396,7 +400,8 @@ bool get_GovSteamCC_pmaxlp(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamCC_rhp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rhp; if (!buffer.str().empty()) @@ -410,7 +415,8 @@ bool get_GovSteamCC_rhp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamCC_rlp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rlp; if (!buffer.str().empty()) @@ -424,7 +430,8 @@ bool get_GovSteamCC_rlp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamCC_t1hp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1hp; if (!buffer.str().empty()) @@ -438,7 +445,8 @@ bool get_GovSteamCC_t1hp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamCC_t1lp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1lp; if (!buffer.str().empty()) @@ -452,7 +460,8 @@ bool get_GovSteamCC_t1lp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamCC_t3hp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3hp; if (!buffer.str().empty()) @@ -466,7 +475,8 @@ bool get_GovSteamCC_t3hp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamCC_t3lp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3lp; if (!buffer.str().empty()) @@ -480,7 +490,8 @@ bool get_GovSteamCC_t3lp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamCC_t4hp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4hp; if (!buffer.str().empty()) @@ -494,7 +505,8 @@ bool get_GovSteamCC_t4hp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamCC_t4lp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4lp; if (!buffer.str().empty()) @@ -508,7 +520,8 @@ bool get_GovSteamCC_t4lp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamCC_t5hp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5hp; if (!buffer.str().empty()) @@ -522,7 +535,8 @@ bool get_GovSteamCC_t5hp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamCC_t5lp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5lp; if (!buffer.str().empty()) @@ -534,8 +548,6 @@ bool get_GovSteamCC_t5lp(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } - - const char GovSteamCC::debugName[] = "GovSteamCC"; const char* GovSteamCC::debugString() const { @@ -544,28 +556,28 @@ const char* GovSteamCC::debugString() const void GovSteamCC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteamCC"), &GovSteamCC_factory)); + factory_map.emplace("cim:GovSteamCC", &GovSteamCC_factory); } void GovSteamCC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.dhp"), &assign_GovSteamCC_dhp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.dlp"), &assign_GovSteamCC_dlp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.fhp"), &assign_GovSteamCC_fhp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.flp"), &assign_GovSteamCC_flp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.mwbase"), &assign_GovSteamCC_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.pmaxhp"), &assign_GovSteamCC_pmaxhp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.pmaxlp"), &assign_GovSteamCC_pmaxlp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.rhp"), &assign_GovSteamCC_rhp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.rlp"), &assign_GovSteamCC_rlp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.t1hp"), &assign_GovSteamCC_t1hp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.t1lp"), &assign_GovSteamCC_t1lp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.t3hp"), &assign_GovSteamCC_t3hp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.t3lp"), &assign_GovSteamCC_t3lp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.t4hp"), &assign_GovSteamCC_t4hp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.t4lp"), &assign_GovSteamCC_t4lp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.t5hp"), &assign_GovSteamCC_t5hp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.t5lp"), &assign_GovSteamCC_t5lp)); + assign_map.emplace("cim:GovSteamCC.dhp", &assign_GovSteamCC_dhp); + assign_map.emplace("cim:GovSteamCC.dlp", &assign_GovSteamCC_dlp); + assign_map.emplace("cim:GovSteamCC.fhp", &assign_GovSteamCC_fhp); + assign_map.emplace("cim:GovSteamCC.flp", &assign_GovSteamCC_flp); + assign_map.emplace("cim:GovSteamCC.mwbase", &assign_GovSteamCC_mwbase); + assign_map.emplace("cim:GovSteamCC.pmaxhp", &assign_GovSteamCC_pmaxhp); + assign_map.emplace("cim:GovSteamCC.pmaxlp", &assign_GovSteamCC_pmaxlp); + assign_map.emplace("cim:GovSteamCC.rhp", &assign_GovSteamCC_rhp); + assign_map.emplace("cim:GovSteamCC.rlp", &assign_GovSteamCC_rlp); + assign_map.emplace("cim:GovSteamCC.t1hp", &assign_GovSteamCC_t1hp); + assign_map.emplace("cim:GovSteamCC.t1lp", &assign_GovSteamCC_t1lp); + assign_map.emplace("cim:GovSteamCC.t3hp", &assign_GovSteamCC_t3hp); + assign_map.emplace("cim:GovSteamCC.t3lp", &assign_GovSteamCC_t3lp); + assign_map.emplace("cim:GovSteamCC.t4hp", &assign_GovSteamCC_t4hp); + assign_map.emplace("cim:GovSteamCC.t4lp", &assign_GovSteamCC_t4lp); + assign_map.emplace("cim:GovSteamCC.t5hp", &assign_GovSteamCC_t5hp); + assign_map.emplace("cim:GovSteamCC.t5lp", &assign_GovSteamCC_t5lp); } void GovSteamCC::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/GovSteamCC.hpp b/CGMES_2.4.13_18DEC2013/GovSteamCC.hpp index f29c2642d..1e7c7a97d 100644 --- a/CGMES_2.4.13_18DEC2013/GovSteamCC.hpp +++ b/CGMES_2.4.13_18DEC2013/GovSteamCC.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Cross compound turbine governor model. - */ + /** \brief Cross compound turbine governor model. */ class GovSteamCC : public TurbineGovernorDynamics { public: @@ -29,23 +27,56 @@ namespace CIMPP GovSteamCC(); ~GovSteamCC() override; - CIMPP::PU dhp; /* HP damping factor (Dhp). Typical Value = 0. Default: nullptr */ - CIMPP::PU dlp; /* LP damping factor (Dlp). Typical Value = 0. Default: nullptr */ - CIMPP::PU fhp; /* Fraction of HP power ahead of reheater (Fhp). Typical Value = 0.3. Default: nullptr */ - CIMPP::PU flp; /* Fraction of LP power ahead of reheater (Flp). Typical Value = 0.7. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU pmaxhp; /* Maximum HP value position (Pmaxhp). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmaxlp; /* Maximum LP value position (Pmaxlp). Typical Value = 1. Default: nullptr */ - CIMPP::PU rhp; /* HP governor droop (Rhp). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU rlp; /* LP governor droop (Rlp). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds t1hp; /* HP governor time constant (T1hp). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t1lp; /* LP governor time constant (T1lp). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t3hp; /* HP turbine time constant (T3hp). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t3lp; /* LP turbine time constant (T3lp). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t4hp; /* HP turbine time constant (T4hp). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t4lp; /* LP turbine time constant (T4lp). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t5hp; /* HP reheater time constant (T5hp). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds t5lp; /* LP reheater time constant (T5lp). Typical Value = 10. Default: nullptr */ + /** \brief HP damping factor (Dhp). Typical Value = 0. Default: nullptr */ + CIMPP::PU dhp; + + /** \brief LP damping factor (Dlp). Typical Value = 0. Default: nullptr */ + CIMPP::PU dlp; + + /** \brief Fraction of HP power ahead of reheater (Fhp). Typical Value = 0.3. Default: nullptr */ + CIMPP::PU fhp; + + /** \brief Fraction of LP power ahead of reheater (Flp). Typical Value = 0.7. Default: nullptr */ + CIMPP::PU flp; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Maximum HP value position (Pmaxhp). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmaxhp; + + /** \brief Maximum LP value position (Pmaxlp). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmaxlp; + + /** \brief HP governor droop (Rhp). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU rhp; + + /** \brief LP governor droop (Rlp). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU rlp; + + /** \brief HP governor time constant (T1hp). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t1hp; + + /** \brief LP governor time constant (T1lp). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t1lp; + + /** \brief HP turbine time constant (T3hp). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t3hp; + + /** \brief LP turbine time constant (T3lp). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t3lp; + + /** \brief HP turbine time constant (T4hp). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t4hp; + + /** \brief LP turbine time constant (T4lp). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t4lp; + + /** \brief HP reheater time constant (T5hp). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds t5hp; + + /** \brief LP reheater time constant (T5lp). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds t5lp; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GovSteamEU.cpp b/CGMES_2.4.13_18DEC2013/GovSteamEU.cpp index 892a23aad..79c47df8b 100644 --- a/CGMES_2.4.13_18DEC2013/GovSteamEU.cpp +++ b/CGMES_2.4.13_18DEC2013/GovSteamEU.cpp @@ -8,46 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -GovSteamEU::GovSteamEU() {}; -GovSteamEU::~GovSteamEU() {}; +GovSteamEU::GovSteamEU() {} +GovSteamEU::~GovSteamEU() {} static const std::list PossibleProfilesForClass = { @@ -108,467 +73,500 @@ GovSteamEU::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteamEU_chc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_chc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->chc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_cho(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_cho(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->cho; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_cic(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_cic(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->cic; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_cio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_cio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->cio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_hhpmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_hhpmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->hhpmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_kfcor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_kfcor(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kfcor; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_khp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_khp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->khp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_klp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_klp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->klp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_kwcor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_kwcor(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kwcor; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_prhmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_prhmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->prhmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_simx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_simx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->simx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tdp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tdp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_ten(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_ten(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ten; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tfp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tfp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tfp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_thp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_thp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->thp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tip(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tip; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tlp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tlp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tlp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_trh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_trh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->trh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tvhp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tvhp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tvhp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tvip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tvip(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tvip; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_wfmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_wfmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wfmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_wfmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_wfmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wfmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_wmax1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_wmax1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wmax1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_wmax2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_wmax2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wmax2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_wwmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_wwmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wwmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_wwmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_wwmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wwmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteamEU_chc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->chc; if (!buffer.str().empty()) @@ -582,7 +580,8 @@ bool get_GovSteamEU_chc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_cho(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->cho; if (!buffer.str().empty()) @@ -596,7 +595,8 @@ bool get_GovSteamEU_cho(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_cic(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->cic; if (!buffer.str().empty()) @@ -610,7 +610,8 @@ bool get_GovSteamEU_cic(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_cio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->cio; if (!buffer.str().empty()) @@ -624,7 +625,8 @@ bool get_GovSteamEU_cio(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -638,7 +640,8 @@ bool get_GovSteamEU_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -652,7 +655,8 @@ bool get_GovSteamEU_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_hhpmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hhpmax; if (!buffer.str().empty()) @@ -666,7 +670,8 @@ bool get_GovSteamEU_hhpmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamEU_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -680,7 +685,8 @@ bool get_GovSteamEU_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamEU_kfcor(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kfcor; if (!buffer.str().empty()) @@ -694,7 +700,8 @@ bool get_GovSteamEU_kfcor(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamEU_khp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->khp; if (!buffer.str().empty()) @@ -708,7 +715,8 @@ bool get_GovSteamEU_khp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_klp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->klp; if (!buffer.str().empty()) @@ -722,7 +730,8 @@ bool get_GovSteamEU_klp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_kwcor(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kwcor; if (!buffer.str().empty()) @@ -736,7 +745,8 @@ bool get_GovSteamEU_kwcor(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamEU_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -750,7 +760,8 @@ bool get_GovSteamEU_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamEU_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -764,7 +775,8 @@ bool get_GovSteamEU_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamEU_prhmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->prhmax; if (!buffer.str().empty()) @@ -778,7 +790,8 @@ bool get_GovSteamEU_prhmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamEU_simx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->simx; if (!buffer.str().empty()) @@ -792,7 +805,8 @@ bool get_GovSteamEU_simx(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamEU_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -806,7 +820,8 @@ bool get_GovSteamEU_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamEU_tdp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdp; if (!buffer.str().empty()) @@ -820,7 +835,8 @@ bool get_GovSteamEU_tdp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_ten(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ten; if (!buffer.str().empty()) @@ -834,7 +850,8 @@ bool get_GovSteamEU_ten(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -848,7 +865,8 @@ bool get_GovSteamEU_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamEU_tfp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tfp; if (!buffer.str().empty()) @@ -862,7 +880,8 @@ bool get_GovSteamEU_tfp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_thp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thp; if (!buffer.str().empty()) @@ -876,7 +895,8 @@ bool get_GovSteamEU_thp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_tip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tip; if (!buffer.str().empty()) @@ -890,7 +910,8 @@ bool get_GovSteamEU_tip(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_tlp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tlp; if (!buffer.str().empty()) @@ -904,7 +925,8 @@ bool get_GovSteamEU_tlp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -918,7 +940,8 @@ bool get_GovSteamEU_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamEU_trh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->trh; if (!buffer.str().empty()) @@ -932,7 +955,8 @@ bool get_GovSteamEU_trh(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_tvhp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tvhp; if (!buffer.str().empty()) @@ -946,7 +970,8 @@ bool get_GovSteamEU_tvhp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamEU_tvip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tvip; if (!buffer.str().empty()) @@ -960,7 +985,8 @@ bool get_GovSteamEU_tvip(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamEU_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -974,7 +1000,8 @@ bool get_GovSteamEU_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamEU_wfmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wfmax; if (!buffer.str().empty()) @@ -988,7 +1015,8 @@ bool get_GovSteamEU_wfmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamEU_wfmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wfmin; if (!buffer.str().empty()) @@ -1002,7 +1030,8 @@ bool get_GovSteamEU_wfmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamEU_wmax1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wmax1; if (!buffer.str().empty()) @@ -1016,7 +1045,8 @@ bool get_GovSteamEU_wmax1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamEU_wmax2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wmax2; if (!buffer.str().empty()) @@ -1030,7 +1060,8 @@ bool get_GovSteamEU_wmax2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamEU_wwmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wwmax; if (!buffer.str().empty()) @@ -1044,7 +1075,8 @@ bool get_GovSteamEU_wwmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamEU_wwmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wwmin; if (!buffer.str().empty()) @@ -1056,8 +1088,6 @@ bool get_GovSteamEU_wwmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char GovSteamEU::debugName[] = "GovSteamEU"; const char* GovSteamEU::debugString() const { @@ -1066,46 +1096,46 @@ const char* GovSteamEU::debugString() const void GovSteamEU::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteamEU"), &GovSteamEU_factory)); + factory_map.emplace("cim:GovSteamEU", &GovSteamEU_factory); } void GovSteamEU::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.chc"), &assign_GovSteamEU_chc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.cho"), &assign_GovSteamEU_cho)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.cic"), &assign_GovSteamEU_cic)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.cio"), &assign_GovSteamEU_cio)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.db1"), &assign_GovSteamEU_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.db2"), &assign_GovSteamEU_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.hhpmax"), &assign_GovSteamEU_hhpmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.ke"), &assign_GovSteamEU_ke)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.kfcor"), &assign_GovSteamEU_kfcor)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.khp"), &assign_GovSteamEU_khp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.klp"), &assign_GovSteamEU_klp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.kwcor"), &assign_GovSteamEU_kwcor)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.mwbase"), &assign_GovSteamEU_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.pmax"), &assign_GovSteamEU_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.prhmax"), &assign_GovSteamEU_prhmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.simx"), &assign_GovSteamEU_simx)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tb"), &assign_GovSteamEU_tb)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tdp"), &assign_GovSteamEU_tdp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.ten"), &assign_GovSteamEU_ten)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tf"), &assign_GovSteamEU_tf)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tfp"), &assign_GovSteamEU_tfp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.thp"), &assign_GovSteamEU_thp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tip"), &assign_GovSteamEU_tip)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tlp"), &assign_GovSteamEU_tlp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tp"), &assign_GovSteamEU_tp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.trh"), &assign_GovSteamEU_trh)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tvhp"), &assign_GovSteamEU_tvhp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tvip"), &assign_GovSteamEU_tvip)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tw"), &assign_GovSteamEU_tw)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.wfmax"), &assign_GovSteamEU_wfmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.wfmin"), &assign_GovSteamEU_wfmin)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.wmax1"), &assign_GovSteamEU_wmax1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.wmax2"), &assign_GovSteamEU_wmax2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.wwmax"), &assign_GovSteamEU_wwmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.wwmin"), &assign_GovSteamEU_wwmin)); + assign_map.emplace("cim:GovSteamEU.chc", &assign_GovSteamEU_chc); + assign_map.emplace("cim:GovSteamEU.cho", &assign_GovSteamEU_cho); + assign_map.emplace("cim:GovSteamEU.cic", &assign_GovSteamEU_cic); + assign_map.emplace("cim:GovSteamEU.cio", &assign_GovSteamEU_cio); + assign_map.emplace("cim:GovSteamEU.db1", &assign_GovSteamEU_db1); + assign_map.emplace("cim:GovSteamEU.db2", &assign_GovSteamEU_db2); + assign_map.emplace("cim:GovSteamEU.hhpmax", &assign_GovSteamEU_hhpmax); + assign_map.emplace("cim:GovSteamEU.ke", &assign_GovSteamEU_ke); + assign_map.emplace("cim:GovSteamEU.kfcor", &assign_GovSteamEU_kfcor); + assign_map.emplace("cim:GovSteamEU.khp", &assign_GovSteamEU_khp); + assign_map.emplace("cim:GovSteamEU.klp", &assign_GovSteamEU_klp); + assign_map.emplace("cim:GovSteamEU.kwcor", &assign_GovSteamEU_kwcor); + assign_map.emplace("cim:GovSteamEU.mwbase", &assign_GovSteamEU_mwbase); + assign_map.emplace("cim:GovSteamEU.pmax", &assign_GovSteamEU_pmax); + assign_map.emplace("cim:GovSteamEU.prhmax", &assign_GovSteamEU_prhmax); + assign_map.emplace("cim:GovSteamEU.simx", &assign_GovSteamEU_simx); + assign_map.emplace("cim:GovSteamEU.tb", &assign_GovSteamEU_tb); + assign_map.emplace("cim:GovSteamEU.tdp", &assign_GovSteamEU_tdp); + assign_map.emplace("cim:GovSteamEU.ten", &assign_GovSteamEU_ten); + assign_map.emplace("cim:GovSteamEU.tf", &assign_GovSteamEU_tf); + assign_map.emplace("cim:GovSteamEU.tfp", &assign_GovSteamEU_tfp); + assign_map.emplace("cim:GovSteamEU.thp", &assign_GovSteamEU_thp); + assign_map.emplace("cim:GovSteamEU.tip", &assign_GovSteamEU_tip); + assign_map.emplace("cim:GovSteamEU.tlp", &assign_GovSteamEU_tlp); + assign_map.emplace("cim:GovSteamEU.tp", &assign_GovSteamEU_tp); + assign_map.emplace("cim:GovSteamEU.trh", &assign_GovSteamEU_trh); + assign_map.emplace("cim:GovSteamEU.tvhp", &assign_GovSteamEU_tvhp); + assign_map.emplace("cim:GovSteamEU.tvip", &assign_GovSteamEU_tvip); + assign_map.emplace("cim:GovSteamEU.tw", &assign_GovSteamEU_tw); + assign_map.emplace("cim:GovSteamEU.wfmax", &assign_GovSteamEU_wfmax); + assign_map.emplace("cim:GovSteamEU.wfmin", &assign_GovSteamEU_wfmin); + assign_map.emplace("cim:GovSteamEU.wmax1", &assign_GovSteamEU_wmax1); + assign_map.emplace("cim:GovSteamEU.wmax2", &assign_GovSteamEU_wmax2); + assign_map.emplace("cim:GovSteamEU.wwmax", &assign_GovSteamEU_wwmax); + assign_map.emplace("cim:GovSteamEU.wwmin", &assign_GovSteamEU_wwmin); } void GovSteamEU::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/GovSteamEU.hpp b/CGMES_2.4.13_18DEC2013/GovSteamEU.hpp index 2203532f0..8a76be166 100644 --- a/CGMES_2.4.13_18DEC2013/GovSteamEU.hpp +++ b/CGMES_2.4.13_18DEC2013/GovSteamEU.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Simplified model of boiler and steam turbine with PID governor. - */ + /** \brief Simplified model of boiler and steam turbine with PID governor. */ class GovSteamEU : public TurbineGovernorDynamics { public: @@ -30,41 +28,110 @@ namespace CIMPP GovSteamEU(); ~GovSteamEU() override; - CIMPP::Simple_Float chc; /* Control valves rate closing limit (Chc). Unit = PU/sec. Typical Value = -3.3. Default: nullptr */ - CIMPP::Simple_Float cho; /* Control valves rate opening limit (Cho). Unit = PU/sec. Typical Value = 0.17. Default: nullptr */ - CIMPP::PU cic; /* Intercept valves rate closing limit (Cic). Typical Value = -2.2. Default: nullptr */ - CIMPP::PU cio; /* Intercept valves rate opening limit (Cio). Typical Value = 0.123. Default: nullptr */ - CIMPP::PU db1; /* Dead band of the frequency corrector (db1). Typical Value = 0. Default: nullptr */ - CIMPP::PU db2; /* Dead band of the speed governor (db2). Typical Value = 0.0004. Default: nullptr */ - CIMPP::PU hhpmax; /* Maximum control valve position (Hhpmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU ke; /* Gain of the power controller (Ke). Typical Value = 0.65. Default: nullptr */ - CIMPP::PU kfcor; /* Gain of the frequency corrector (Kfcor). Typical Value = 20. Default: nullptr */ - CIMPP::PU khp; /* Fraction of total turbine output generated by HP part (Khp). Typical Value = 0.277. Default: nullptr */ - CIMPP::PU klp; /* Fraction of total turbine output generated by HP part (Klp). Typical Value = 0.723. Default: nullptr */ - CIMPP::PU kwcor; /* Gain of the speed governor (Kwcor). Typical Value = 20. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU pmax; /* Maximal active power of the turbine (Pmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU prhmax; /* Maximum low pressure limit (Prhmax). Typical Value = 1.4. Default: nullptr */ - CIMPP::PU simx; /* Intercept valves transfer limit (Simx). Typical Value = 0.425. Default: nullptr */ - CIMPP::Seconds tb; /* Boiler time constant (Tb). Typical Value = 100. Default: nullptr */ - CIMPP::Seconds tdp; /* Derivative time constant of the power controller (Tdp). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ten; /* Electro hydraulic transducer (Ten). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tf; /* Frequency transducer time constant (Tf). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tfp; /* Time constant of the power controller (Tfp). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds thp; /* High pressure (HP) time constant of the turbine (Thp). Typical Value = 0.31. Default: nullptr */ - CIMPP::Seconds tip; /* Integral time constant of the power controller (Tip). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds tlp; /* Low pressure(LP) time constant of the turbine (Tlp). Typical Value = 0.45. Default: nullptr */ - CIMPP::Seconds tp; /* Power transducer time constant (Tp). Typical Value = 0.07. Default: nullptr */ - CIMPP::Seconds trh; /* Reheater time constant of the turbine (Trh). Typical Value = 8. Default: nullptr */ - CIMPP::Seconds tvhp; /* Control valves servo time constant (Tvhp). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tvip; /* Intercept valves servo time constant (Tvip). Typical Value = 0.15. Default: nullptr */ - CIMPP::Seconds tw; /* Speed transducer time constant (Tw). Typical Value = 0.02. Default: nullptr */ - CIMPP::PU wfmax; /* Upper limit for frequency correction (Wfmax). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU wfmin; /* Lower limit for frequency correction (Wfmin). Typical Value = -0.05. Default: nullptr */ - CIMPP::PU wmax1; /* Emergency speed control lower limit (wmax1). Typical Value = 1.025. Default: nullptr */ - CIMPP::PU wmax2; /* Emergency speed control upper limit (wmax2). Typical Value = 1.05. Default: nullptr */ - CIMPP::PU wwmax; /* Upper limit for the speed governor (Wwmax). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU wwmin; /* Lower limit for the speed governor frequency correction (Wwmin). Typical Value = -1. Default: nullptr */ + /** \brief Control valves rate closing limit (Chc). Unit = PU/sec. Typical Value = -3.3. Default: nullptr */ + CIMPP::Simple_Float chc; + + /** \brief Control valves rate opening limit (Cho). Unit = PU/sec. Typical Value = 0.17. Default: nullptr */ + CIMPP::Simple_Float cho; + + /** \brief Intercept valves rate closing limit (Cic). Typical Value = -2.2. Default: nullptr */ + CIMPP::PU cic; + + /** \brief Intercept valves rate opening limit (Cio). Typical Value = 0.123. Default: nullptr */ + CIMPP::PU cio; + + /** \brief Dead band of the frequency corrector (db1). Typical Value = 0. Default: nullptr */ + CIMPP::PU db1; + + /** \brief Dead band of the speed governor (db2). Typical Value = 0.0004. Default: nullptr */ + CIMPP::PU db2; + + /** \brief Maximum control valve position (Hhpmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU hhpmax; + + /** \brief Gain of the power controller (Ke). Typical Value = 0.65. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Gain of the frequency corrector (Kfcor). Typical Value = 20. Default: nullptr */ + CIMPP::PU kfcor; + + /** \brief Fraction of total turbine output generated by HP part (Khp). Typical Value = 0.277. Default: nullptr */ + CIMPP::PU khp; + + /** \brief Fraction of total turbine output generated by HP part (Klp). Typical Value = 0.723. Default: nullptr */ + CIMPP::PU klp; + + /** \brief Gain of the speed governor (Kwcor). Typical Value = 20. Default: nullptr */ + CIMPP::PU kwcor; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Maximal active power of the turbine (Pmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Maximum low pressure limit (Prhmax). Typical Value = 1.4. Default: nullptr */ + CIMPP::PU prhmax; + + /** \brief Intercept valves transfer limit (Simx). Typical Value = 0.425. Default: nullptr */ + CIMPP::PU simx; + + /** \brief Boiler time constant (Tb). Typical Value = 100. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Derivative time constant of the power controller (Tdp). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tdp; + + /** \brief Electro hydraulic transducer (Ten). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds ten; + + /** \brief Frequency transducer time constant (Tf). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Time constant of the power controller (Tfp). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tfp; + + /** \brief High pressure (HP) time constant of the turbine (Thp). Typical Value = 0.31. Default: nullptr */ + CIMPP::Seconds thp; + + /** \brief Integral time constant of the power controller (Tip). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds tip; + + /** \brief Low pressure(LP) time constant of the turbine (Tlp). Typical Value = 0.45. Default: nullptr */ + CIMPP::Seconds tlp; + + /** \brief Power transducer time constant (Tp). Typical Value = 0.07. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Reheater time constant of the turbine (Trh). Typical Value = 8. Default: nullptr */ + CIMPP::Seconds trh; + + /** \brief Control valves servo time constant (Tvhp). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tvhp; + + /** \brief Intercept valves servo time constant (Tvip). Typical Value = 0.15. Default: nullptr */ + CIMPP::Seconds tvip; + + /** \brief Speed transducer time constant (Tw). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds tw; + + /** \brief Upper limit for frequency correction (Wfmax). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU wfmax; + + /** \brief Lower limit for frequency correction (Wfmin). Typical Value = -0.05. Default: nullptr */ + CIMPP::PU wfmin; + + /** \brief Emergency speed control lower limit (wmax1). Typical Value = 1.025. Default: nullptr */ + CIMPP::PU wmax1; + + /** \brief Emergency speed control upper limit (wmax2). Typical Value = 1.05. Default: nullptr */ + CIMPP::PU wmax2; + + /** \brief Upper limit for the speed governor (Wwmax). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU wwmax; + + /** \brief Lower limit for the speed governor frequency correction (Wwmin). Typical Value = -1. Default: nullptr */ + CIMPP::PU wwmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GovSteamFV2.cpp b/CGMES_2.4.13_18DEC2013/GovSteamFV2.cpp index 39cd34463..2859415ca 100644 --- a/CGMES_2.4.13_18DEC2013/GovSteamFV2.cpp +++ b/CGMES_2.4.13_18DEC2013/GovSteamFV2.cpp @@ -8,24 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -GovSteamFV2::GovSteamFV2() {}; -GovSteamFV2::~GovSteamFV2() {}; +GovSteamFV2::GovSteamFV2() {} +GovSteamFV2::~GovSteamFV2() {} static const std::list PossibleProfilesForClass = { @@ -64,181 +51,192 @@ GovSteamFV2::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteamFV2_dt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_dt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_ti(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_ti(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_tt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_vmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_vmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteamFV2_dt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dt; if (!buffer.str().empty()) @@ -252,7 +250,8 @@ bool get_GovSteamFV2_dt(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV2_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -266,7 +265,8 @@ bool get_GovSteamFV2_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamFV2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -280,7 +280,8 @@ bool get_GovSteamFV2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovSteamFV2_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -294,7 +295,8 @@ bool get_GovSteamFV2_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamFV2_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -308,7 +310,8 @@ bool get_GovSteamFV2_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV2_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -322,7 +325,8 @@ bool get_GovSteamFV2_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV2_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -336,7 +340,8 @@ bool get_GovSteamFV2_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV2_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -350,7 +355,8 @@ bool get_GovSteamFV2_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV2_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -364,7 +370,8 @@ bool get_GovSteamFV2_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV2_ti(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti; if (!buffer.str().empty()) @@ -378,7 +385,8 @@ bool get_GovSteamFV2_ti(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV2_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tt; if (!buffer.str().empty()) @@ -392,7 +400,8 @@ bool get_GovSteamFV2_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV2_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmax; if (!buffer.str().empty()) @@ -406,7 +415,8 @@ bool get_GovSteamFV2_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV2_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmin; if (!buffer.str().empty()) @@ -418,8 +428,6 @@ bool get_GovSteamFV2_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char GovSteamFV2::debugName[] = "GovSteamFV2"; const char* GovSteamFV2::debugString() const { @@ -428,24 +436,24 @@ const char* GovSteamFV2::debugString() const void GovSteamFV2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteamFV2"), &GovSteamFV2_factory)); + factory_map.emplace("cim:GovSteamFV2", &GovSteamFV2_factory); } void GovSteamFV2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.dt"), &assign_GovSteamFV2_dt)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.k"), &assign_GovSteamFV2_k)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.mwbase"), &assign_GovSteamFV2_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.r"), &assign_GovSteamFV2_r)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.t1"), &assign_GovSteamFV2_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.t3"), &assign_GovSteamFV2_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.ta"), &assign_GovSteamFV2_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.tb"), &assign_GovSteamFV2_tb)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.tc"), &assign_GovSteamFV2_tc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.ti"), &assign_GovSteamFV2_ti)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.tt"), &assign_GovSteamFV2_tt)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.vmax"), &assign_GovSteamFV2_vmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.vmin"), &assign_GovSteamFV2_vmin)); + assign_map.emplace("cim:GovSteamFV2.dt", &assign_GovSteamFV2_dt); + assign_map.emplace("cim:GovSteamFV2.k", &assign_GovSteamFV2_k); + assign_map.emplace("cim:GovSteamFV2.mwbase", &assign_GovSteamFV2_mwbase); + assign_map.emplace("cim:GovSteamFV2.r", &assign_GovSteamFV2_r); + assign_map.emplace("cim:GovSteamFV2.t1", &assign_GovSteamFV2_t1); + assign_map.emplace("cim:GovSteamFV2.t3", &assign_GovSteamFV2_t3); + assign_map.emplace("cim:GovSteamFV2.ta", &assign_GovSteamFV2_ta); + assign_map.emplace("cim:GovSteamFV2.tb", &assign_GovSteamFV2_tb); + assign_map.emplace("cim:GovSteamFV2.tc", &assign_GovSteamFV2_tc); + assign_map.emplace("cim:GovSteamFV2.ti", &assign_GovSteamFV2_ti); + assign_map.emplace("cim:GovSteamFV2.tt", &assign_GovSteamFV2_tt); + assign_map.emplace("cim:GovSteamFV2.vmax", &assign_GovSteamFV2_vmax); + assign_map.emplace("cim:GovSteamFV2.vmin", &assign_GovSteamFV2_vmin); } void GovSteamFV2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/GovSteamFV2.hpp b/CGMES_2.4.13_18DEC2013/GovSteamFV2.hpp index b255ec8cc..7df266adb 100644 --- a/CGMES_2.4.13_18DEC2013/GovSteamFV2.hpp +++ b/CGMES_2.4.13_18DEC2013/GovSteamFV2.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Steam turbine governor with reheat time constants and modeling of the effects of fast valve closing to reduce mechanical power. - */ + /** \brief Steam turbine governor with reheat time constants and modeling of the effects of fast valve closing to reduce mechanical power. */ class GovSteamFV2 : public TurbineGovernorDynamics { public: @@ -29,19 +27,44 @@ namespace CIMPP GovSteamFV2(); ~GovSteamFV2() override; - CIMPP::PU dt; /* (Dt). Default: nullptr */ - CIMPP::PU k; /* Fraction of the turbine power developed by turbine sections not involved in fast valving (K). Default: nullptr */ - CIMPP::ActivePower mwbase; /* Alternate Base used instead of Machine base in equipment model if necessary (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU r; /* (R). Default: nullptr */ - CIMPP::Seconds t1; /* Governor time constant (T1). Default: nullptr */ - CIMPP::Seconds t3; /* Reheater time constant (T3). Default: nullptr */ - CIMPP::Seconds ta; /* Time after initial time for valve to close (Ta). Default: nullptr */ - CIMPP::Seconds tb; /* Time after initial time for valve to begin opening (Tb). Default: nullptr */ - CIMPP::Seconds tc; /* Time after initial time for valve to become fully open (Tc). Default: nullptr */ - CIMPP::Seconds ti; /* Initial time to begin fast valving (Ti). Default: nullptr */ - CIMPP::Seconds tt; /* Time constant with which power falls off after intercept valve closure (Tt). Default: nullptr */ - CIMPP::PU vmax; /* (Vmax). Default: nullptr */ - CIMPP::PU vmin; /* (Vmin). Default: nullptr */ + /** \brief (Dt). Default: nullptr */ + CIMPP::PU dt; + + /** \brief Fraction of the turbine power developed by turbine sections not involved in fast valving (K). Default: nullptr */ + CIMPP::PU k; + + /** \brief Alternate Base used instead of Machine base in equipment model if necessary (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief (R). Default: nullptr */ + CIMPP::PU r; + + /** \brief Governor time constant (T1). Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Reheater time constant (T3). Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Time after initial time for valve to close (Ta). Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Time after initial time for valve to begin opening (Tb). Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Time after initial time for valve to become fully open (Tc). Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Initial time to begin fast valving (Ti). Default: nullptr */ + CIMPP::Seconds ti; + + /** \brief Time constant with which power falls off after intercept valve closure (Tt). Default: nullptr */ + CIMPP::Seconds tt; + + /** \brief (Vmax). Default: nullptr */ + CIMPP::PU vmax; + + /** \brief (Vmin). Default: nullptr */ + CIMPP::PU vmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GovSteamFV3.cpp b/CGMES_2.4.13_18DEC2013/GovSteamFV3.cpp index c9f2c8a79..871238fb7 100644 --- a/CGMES_2.4.13_18DEC2013/GovSteamFV3.cpp +++ b/CGMES_2.4.13_18DEC2013/GovSteamFV3.cpp @@ -8,30 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -GovSteamFV3::GovSteamFV3() {}; -GovSteamFV3::~GovSteamFV3() {}; +GovSteamFV3::GovSteamFV3() {} +GovSteamFV3::~GovSteamFV3() {} static const std::list PossibleProfilesForClass = { @@ -76,259 +57,276 @@ GovSteamFV3::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteamFV3_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_prmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_prmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->prmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_uc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_uo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_uo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteamFV3_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -342,7 +340,8 @@ bool get_GovSteamFV3_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamFV3_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -356,7 +355,8 @@ bool get_GovSteamFV3_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -370,7 +370,8 @@ bool get_GovSteamFV3_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -384,7 +385,8 @@ bool get_GovSteamFV3_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -398,7 +400,8 @@ bool get_GovSteamFV3_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovSteamFV3_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -412,7 +415,8 @@ bool get_GovSteamFV3_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV3_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -426,7 +430,8 @@ bool get_GovSteamFV3_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV3_prmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->prmax; if (!buffer.str().empty()) @@ -440,7 +445,8 @@ bool get_GovSteamFV3_prmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamFV3_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -454,7 +460,8 @@ bool get_GovSteamFV3_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -468,7 +475,8 @@ bool get_GovSteamFV3_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -482,7 +490,8 @@ bool get_GovSteamFV3_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -496,7 +505,8 @@ bool get_GovSteamFV3_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -510,7 +520,8 @@ bool get_GovSteamFV3_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -524,7 +535,8 @@ bool get_GovSteamFV3_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -538,7 +550,8 @@ bool get_GovSteamFV3_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -552,7 +565,8 @@ bool get_GovSteamFV3_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -566,7 +580,8 @@ bool get_GovSteamFV3_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uc; if (!buffer.str().empty()) @@ -580,7 +595,8 @@ bool get_GovSteamFV3_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uo; if (!buffer.str().empty()) @@ -592,8 +608,6 @@ bool get_GovSteamFV3_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char GovSteamFV3::debugName[] = "GovSteamFV3"; const char* GovSteamFV3::debugString() const { @@ -602,30 +616,30 @@ const char* GovSteamFV3::debugString() const void GovSteamFV3::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteamFV3"), &GovSteamFV3_factory)); + factory_map.emplace("cim:GovSteamFV3", &GovSteamFV3_factory); } void GovSteamFV3::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.k"), &assign_GovSteamFV3_k)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.k1"), &assign_GovSteamFV3_k1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.k2"), &assign_GovSteamFV3_k2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.k3"), &assign_GovSteamFV3_k3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.mwbase"), &assign_GovSteamFV3_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.pmax"), &assign_GovSteamFV3_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.pmin"), &assign_GovSteamFV3_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.prmax"), &assign_GovSteamFV3_prmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.t1"), &assign_GovSteamFV3_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.t2"), &assign_GovSteamFV3_t2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.t3"), &assign_GovSteamFV3_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.t4"), &assign_GovSteamFV3_t4)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.t5"), &assign_GovSteamFV3_t5)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.t6"), &assign_GovSteamFV3_t6)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.ta"), &assign_GovSteamFV3_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.tb"), &assign_GovSteamFV3_tb)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.tc"), &assign_GovSteamFV3_tc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.uc"), &assign_GovSteamFV3_uc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.uo"), &assign_GovSteamFV3_uo)); + assign_map.emplace("cim:GovSteamFV3.k", &assign_GovSteamFV3_k); + assign_map.emplace("cim:GovSteamFV3.k1", &assign_GovSteamFV3_k1); + assign_map.emplace("cim:GovSteamFV3.k2", &assign_GovSteamFV3_k2); + assign_map.emplace("cim:GovSteamFV3.k3", &assign_GovSteamFV3_k3); + assign_map.emplace("cim:GovSteamFV3.mwbase", &assign_GovSteamFV3_mwbase); + assign_map.emplace("cim:GovSteamFV3.pmax", &assign_GovSteamFV3_pmax); + assign_map.emplace("cim:GovSteamFV3.pmin", &assign_GovSteamFV3_pmin); + assign_map.emplace("cim:GovSteamFV3.prmax", &assign_GovSteamFV3_prmax); + assign_map.emplace("cim:GovSteamFV3.t1", &assign_GovSteamFV3_t1); + assign_map.emplace("cim:GovSteamFV3.t2", &assign_GovSteamFV3_t2); + assign_map.emplace("cim:GovSteamFV3.t3", &assign_GovSteamFV3_t3); + assign_map.emplace("cim:GovSteamFV3.t4", &assign_GovSteamFV3_t4); + assign_map.emplace("cim:GovSteamFV3.t5", &assign_GovSteamFV3_t5); + assign_map.emplace("cim:GovSteamFV3.t6", &assign_GovSteamFV3_t6); + assign_map.emplace("cim:GovSteamFV3.ta", &assign_GovSteamFV3_ta); + assign_map.emplace("cim:GovSteamFV3.tb", &assign_GovSteamFV3_tb); + assign_map.emplace("cim:GovSteamFV3.tc", &assign_GovSteamFV3_tc); + assign_map.emplace("cim:GovSteamFV3.uc", &assign_GovSteamFV3_uc); + assign_map.emplace("cim:GovSteamFV3.uo", &assign_GovSteamFV3_uo); } void GovSteamFV3::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/GovSteamFV3.hpp b/CGMES_2.4.13_18DEC2013/GovSteamFV3.hpp index ac88cc953..d69d84dd6 100644 --- a/CGMES_2.4.13_18DEC2013/GovSteamFV3.hpp +++ b/CGMES_2.4.13_18DEC2013/GovSteamFV3.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Simplified GovSteamIEEE1 Steam turbine governor model with Prmax limit and fast valving. - */ + /** \brief Simplified GovSteamIEEE1 Steam turbine governor model with Prmax limit and fast valving. */ class GovSteamFV3 : public TurbineGovernorDynamics { public: @@ -30,25 +28,62 @@ namespace CIMPP GovSteamFV3(); ~GovSteamFV3() override; - CIMPP::PU k; /* Governor gain, (reciprocal of droop) (K). Typical Value = 20. Default: nullptr */ - CIMPP::PU k1; /* Fraction of turbine power developed after first boiler pass (K1). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU k2; /* Fraction of turbine power developed after second boiler pass (K2). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU k3; /* Fraction of hp turbine power developed after crossover or third boiler pass (K3). Typical Value = 0.6. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU pmax; /* Maximum valve opening, PU of MWbase (Pmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum valve opening, PU of MWbase (Pmin). Typical Value = 0. Default: nullptr */ - CIMPP::PU prmax; /* Max. pressure in reheater (Prmax). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds t1; /* Governor lead time constant (T1). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t2; /* Governor lag time constant (T2). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t3; /* Valve positioner time constant (T3). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t4; /* Inlet piping/steam bowl time constant (T4). Typical Value = 0.2. Default: nullptr */ - CIMPP::Seconds t5; /* Time constant of second boiler pass (i.e. reheater) (T5). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds t6; /* Time constant of crossover or third boiler pass (T6). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds ta; /* Time to close intercept valve (IV) (Ta). Typical Value = 0.97. Default: nullptr */ - CIMPP::Seconds tb; /* Time until IV starts to reopen (Tb). Typical Value = 0.98. Default: nullptr */ - CIMPP::Seconds tc; /* Time until IV is fully open (Tc). Typical Value = 0.99. Default: nullptr */ - CIMPP::Simple_Float uc; /* Maximum valve closing velocity (Uc). Unit = PU/sec. Typical Value = -1. Default: nullptr */ - CIMPP::Simple_Float uo; /* Maximum valve opening velocity (Uo). Unit = PU/sec. Typical Value = 0.1. Default: nullptr */ + /** \brief Governor gain, (reciprocal of droop) (K). Typical Value = 20. Default: nullptr */ + CIMPP::PU k; + + /** \brief Fraction of turbine power developed after first boiler pass (K1). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU k1; + + /** \brief Fraction of turbine power developed after second boiler pass (K2). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU k2; + + /** \brief Fraction of hp turbine power developed after crossover or third boiler pass (K3). Typical Value = 0.6. Default: nullptr */ + CIMPP::PU k3; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Maximum valve opening, PU of MWbase (Pmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum valve opening, PU of MWbase (Pmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Max. pressure in reheater (Prmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU prmax; + + /** \brief Governor lead time constant (T1). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Governor lag time constant (T2). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Valve positioner time constant (T3). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Inlet piping/steam bowl time constant (T4). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant of second boiler pass (i.e. reheater) (T5). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Time constant of crossover or third boiler pass (T6). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time to close intercept valve (IV) (Ta). Typical Value = 0.97. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Time until IV starts to reopen (Tb). Typical Value = 0.98. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Time until IV is fully open (Tc). Typical Value = 0.99. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Maximum valve closing velocity (Uc). Unit = PU/sec. Typical Value = -1. Default: nullptr */ + CIMPP::Simple_Float uc; + + /** \brief Maximum valve opening velocity (Uo). Unit = PU/sec. Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float uo; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GovSteamFV4.cpp b/CGMES_2.4.13_18DEC2013/GovSteamFV4.cpp index 3e0591698..18cb0f39c 100644 --- a/CGMES_2.4.13_18DEC2013/GovSteamFV4.cpp +++ b/CGMES_2.4.13_18DEC2013/GovSteamFV4.cpp @@ -8,62 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -GovSteamFV4::GovSteamFV4() {}; -GovSteamFV4::~GovSteamFV4() {}; +GovSteamFV4::GovSteamFV4() {} +GovSteamFV4::~GovSteamFV4() {} static const std::list PossibleProfilesForClass = { @@ -140,675 +89,724 @@ GovSteamFV4::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteamFV4_cpsmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_cpsmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->cpsmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_cpsmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_cpsmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->cpsmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_crmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_crmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->crmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_crmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_crmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->crmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kf3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kf3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_khp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_khp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->khp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kic(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kic(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kic; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kip(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kip; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kit; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kmp1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kmp1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kmp1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kmp2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kmp2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kmp2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kpc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kpc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kpp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kpt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kpt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_krc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_krc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->krc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_ksh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_ksh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ksh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_lpi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_lpi(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lpi; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_lps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_lps(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lps; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_mnef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_mnef(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mnef; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_mxef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_mxef(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mxef; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_pr1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_pr1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pr1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_pr2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_pr2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pr2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_psmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_psmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->psmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_rsmimn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_rsmimn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rsmimn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_rsmimx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_rsmimx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rsmimx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_rvgmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_rvgmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rvgmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_rvgmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_rvgmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rvgmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_srmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_srmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->srmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_srmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_srmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->srmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_srsmp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_srsmp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->srsmp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_svmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_svmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->svmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_svmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_svmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->svmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_tam(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_tam(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tam; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_tcm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_tcm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tcm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_tdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_tdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_tf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_tf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_thp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_thp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->thp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_tmp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_tmp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tmp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_trh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_trh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->trh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_tv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_tv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_ty(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_ty(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ty; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_y(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_y(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->y; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_yhpmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_yhpmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->yhpmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_yhpmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_yhpmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->yhpmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_ympmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_ympmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ympmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_ympmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_ympmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ympmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteamFV4_cpsmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->cpsmn; if (!buffer.str().empty()) @@ -822,7 +820,8 @@ bool get_GovSteamFV4_cpsmn(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamFV4_cpsmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->cpsmx; if (!buffer.str().empty()) @@ -836,7 +835,8 @@ bool get_GovSteamFV4_cpsmx(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamFV4_crmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->crmn; if (!buffer.str().empty()) @@ -850,7 +850,8 @@ bool get_GovSteamFV4_crmn(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_crmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->crmx; if (!buffer.str().empty()) @@ -864,7 +865,8 @@ bool get_GovSteamFV4_crmx(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_kdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdc; if (!buffer.str().empty()) @@ -878,7 +880,8 @@ bool get_GovSteamFV4_kdc(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_kf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf1; if (!buffer.str().empty()) @@ -892,7 +895,8 @@ bool get_GovSteamFV4_kf1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_kf3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf3; if (!buffer.str().empty()) @@ -906,7 +910,8 @@ bool get_GovSteamFV4_kf3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_khp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->khp; if (!buffer.str().empty()) @@ -920,7 +925,8 @@ bool get_GovSteamFV4_khp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_kic(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kic; if (!buffer.str().empty()) @@ -934,7 +940,8 @@ bool get_GovSteamFV4_kic(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_kip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kip; if (!buffer.str().empty()) @@ -948,7 +955,8 @@ bool get_GovSteamFV4_kip(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_kit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kit; if (!buffer.str().empty()) @@ -962,7 +970,8 @@ bool get_GovSteamFV4_kit(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_kmp1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kmp1; if (!buffer.str().empty()) @@ -976,7 +985,8 @@ bool get_GovSteamFV4_kmp1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_kmp2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kmp2; if (!buffer.str().empty()) @@ -990,7 +1000,8 @@ bool get_GovSteamFV4_kmp2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_kpc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpc; if (!buffer.str().empty()) @@ -1004,7 +1015,8 @@ bool get_GovSteamFV4_kpc(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_kpp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpp; if (!buffer.str().empty()) @@ -1018,7 +1030,8 @@ bool get_GovSteamFV4_kpp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_kpt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpt; if (!buffer.str().empty()) @@ -1032,7 +1045,8 @@ bool get_GovSteamFV4_kpt(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_krc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->krc; if (!buffer.str().empty()) @@ -1046,7 +1060,8 @@ bool get_GovSteamFV4_krc(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_ksh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ksh; if (!buffer.str().empty()) @@ -1060,7 +1075,8 @@ bool get_GovSteamFV4_ksh(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_lpi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lpi; if (!buffer.str().empty()) @@ -1074,7 +1090,8 @@ bool get_GovSteamFV4_lpi(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_lps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lps; if (!buffer.str().empty()) @@ -1088,7 +1105,8 @@ bool get_GovSteamFV4_lps(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_mnef(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mnef; if (!buffer.str().empty()) @@ -1102,7 +1120,8 @@ bool get_GovSteamFV4_mnef(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_mxef(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mxef; if (!buffer.str().empty()) @@ -1116,7 +1135,8 @@ bool get_GovSteamFV4_mxef(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_pr1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pr1; if (!buffer.str().empty()) @@ -1130,7 +1150,8 @@ bool get_GovSteamFV4_pr1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_pr2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pr2; if (!buffer.str().empty()) @@ -1144,7 +1165,8 @@ bool get_GovSteamFV4_pr2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_psmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->psmn; if (!buffer.str().empty()) @@ -1158,7 +1180,8 @@ bool get_GovSteamFV4_psmn(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_rsmimn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rsmimn; if (!buffer.str().empty()) @@ -1172,7 +1195,8 @@ bool get_GovSteamFV4_rsmimn(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovSteamFV4_rsmimx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rsmimx; if (!buffer.str().empty()) @@ -1186,7 +1210,8 @@ bool get_GovSteamFV4_rsmimx(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovSteamFV4_rvgmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rvgmn; if (!buffer.str().empty()) @@ -1200,7 +1225,8 @@ bool get_GovSteamFV4_rvgmn(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamFV4_rvgmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rvgmx; if (!buffer.str().empty()) @@ -1214,7 +1240,8 @@ bool get_GovSteamFV4_rvgmx(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamFV4_srmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->srmn; if (!buffer.str().empty()) @@ -1228,7 +1255,8 @@ bool get_GovSteamFV4_srmn(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_srmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->srmx; if (!buffer.str().empty()) @@ -1242,7 +1270,8 @@ bool get_GovSteamFV4_srmx(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_srsmp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->srsmp; if (!buffer.str().empty()) @@ -1256,7 +1285,8 @@ bool get_GovSteamFV4_srsmp(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamFV4_svmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->svmn; if (!buffer.str().empty()) @@ -1270,7 +1300,8 @@ bool get_GovSteamFV4_svmn(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_svmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->svmx; if (!buffer.str().empty()) @@ -1284,7 +1315,8 @@ bool get_GovSteamFV4_svmx(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -1298,7 +1330,8 @@ bool get_GovSteamFV4_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV4_tam(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tam; if (!buffer.str().empty()) @@ -1312,7 +1345,8 @@ bool get_GovSteamFV4_tam(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -1326,7 +1360,8 @@ bool get_GovSteamFV4_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV4_tcm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tcm; if (!buffer.str().empty()) @@ -1340,7 +1375,8 @@ bool get_GovSteamFV4_tcm(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_tdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdc; if (!buffer.str().empty()) @@ -1354,7 +1390,8 @@ bool get_GovSteamFV4_tdc(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf1; if (!buffer.str().empty()) @@ -1368,7 +1405,8 @@ bool get_GovSteamFV4_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf2; if (!buffer.str().empty()) @@ -1382,7 +1420,8 @@ bool get_GovSteamFV4_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_thp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thp; if (!buffer.str().empty()) @@ -1396,7 +1435,8 @@ bool get_GovSteamFV4_thp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_tmp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tmp; if (!buffer.str().empty()) @@ -1410,7 +1450,8 @@ bool get_GovSteamFV4_tmp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_trh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->trh; if (!buffer.str().empty()) @@ -1424,7 +1465,8 @@ bool get_GovSteamFV4_trh(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_tv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tv; if (!buffer.str().empty()) @@ -1438,7 +1480,8 @@ bool get_GovSteamFV4_tv(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV4_ty(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ty; if (!buffer.str().empty()) @@ -1452,7 +1495,8 @@ bool get_GovSteamFV4_ty(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV4_y(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->y; if (!buffer.str().empty()) @@ -1466,7 +1510,8 @@ bool get_GovSteamFV4_y(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamFV4_yhpmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->yhpmn; if (!buffer.str().empty()) @@ -1480,7 +1525,8 @@ bool get_GovSteamFV4_yhpmn(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamFV4_yhpmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->yhpmx; if (!buffer.str().empty()) @@ -1494,7 +1540,8 @@ bool get_GovSteamFV4_yhpmx(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamFV4_ympmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ympmn; if (!buffer.str().empty()) @@ -1508,7 +1555,8 @@ bool get_GovSteamFV4_ympmn(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamFV4_ympmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ympmx; if (!buffer.str().empty()) @@ -1520,8 +1568,6 @@ bool get_GovSteamFV4_ympmx(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char GovSteamFV4::debugName[] = "GovSteamFV4"; const char* GovSteamFV4::debugString() const { @@ -1530,62 +1576,62 @@ const char* GovSteamFV4::debugString() const void GovSteamFV4::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteamFV4"), &GovSteamFV4_factory)); + factory_map.emplace("cim:GovSteamFV4", &GovSteamFV4_factory); } void GovSteamFV4::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.cpsmn"), &assign_GovSteamFV4_cpsmn)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.cpsmx"), &assign_GovSteamFV4_cpsmx)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.crmn"), &assign_GovSteamFV4_crmn)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.crmx"), &assign_GovSteamFV4_crmx)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kdc"), &assign_GovSteamFV4_kdc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kf1"), &assign_GovSteamFV4_kf1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kf3"), &assign_GovSteamFV4_kf3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.khp"), &assign_GovSteamFV4_khp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kic"), &assign_GovSteamFV4_kic)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kip"), &assign_GovSteamFV4_kip)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kit"), &assign_GovSteamFV4_kit)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kmp1"), &assign_GovSteamFV4_kmp1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kmp2"), &assign_GovSteamFV4_kmp2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kpc"), &assign_GovSteamFV4_kpc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kpp"), &assign_GovSteamFV4_kpp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kpt"), &assign_GovSteamFV4_kpt)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.krc"), &assign_GovSteamFV4_krc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.ksh"), &assign_GovSteamFV4_ksh)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.lpi"), &assign_GovSteamFV4_lpi)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.lps"), &assign_GovSteamFV4_lps)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.mnef"), &assign_GovSteamFV4_mnef)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.mxef"), &assign_GovSteamFV4_mxef)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.pr1"), &assign_GovSteamFV4_pr1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.pr2"), &assign_GovSteamFV4_pr2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.psmn"), &assign_GovSteamFV4_psmn)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.rsmimn"), &assign_GovSteamFV4_rsmimn)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.rsmimx"), &assign_GovSteamFV4_rsmimx)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.rvgmn"), &assign_GovSteamFV4_rvgmn)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.rvgmx"), &assign_GovSteamFV4_rvgmx)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.srmn"), &assign_GovSteamFV4_srmn)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.srmx"), &assign_GovSteamFV4_srmx)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.srsmp"), &assign_GovSteamFV4_srsmp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.svmn"), &assign_GovSteamFV4_svmn)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.svmx"), &assign_GovSteamFV4_svmx)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.ta"), &assign_GovSteamFV4_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.tam"), &assign_GovSteamFV4_tam)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.tc"), &assign_GovSteamFV4_tc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.tcm"), &assign_GovSteamFV4_tcm)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.tdc"), &assign_GovSteamFV4_tdc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.tf1"), &assign_GovSteamFV4_tf1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.tf2"), &assign_GovSteamFV4_tf2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.thp"), &assign_GovSteamFV4_thp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.tmp"), &assign_GovSteamFV4_tmp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.trh"), &assign_GovSteamFV4_trh)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.tv"), &assign_GovSteamFV4_tv)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.ty"), &assign_GovSteamFV4_ty)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.y"), &assign_GovSteamFV4_y)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.yhpmn"), &assign_GovSteamFV4_yhpmn)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.yhpmx"), &assign_GovSteamFV4_yhpmx)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.ympmn"), &assign_GovSteamFV4_ympmn)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.ympmx"), &assign_GovSteamFV4_ympmx)); + assign_map.emplace("cim:GovSteamFV4.cpsmn", &assign_GovSteamFV4_cpsmn); + assign_map.emplace("cim:GovSteamFV4.cpsmx", &assign_GovSteamFV4_cpsmx); + assign_map.emplace("cim:GovSteamFV4.crmn", &assign_GovSteamFV4_crmn); + assign_map.emplace("cim:GovSteamFV4.crmx", &assign_GovSteamFV4_crmx); + assign_map.emplace("cim:GovSteamFV4.kdc", &assign_GovSteamFV4_kdc); + assign_map.emplace("cim:GovSteamFV4.kf1", &assign_GovSteamFV4_kf1); + assign_map.emplace("cim:GovSteamFV4.kf3", &assign_GovSteamFV4_kf3); + assign_map.emplace("cim:GovSteamFV4.khp", &assign_GovSteamFV4_khp); + assign_map.emplace("cim:GovSteamFV4.kic", &assign_GovSteamFV4_kic); + assign_map.emplace("cim:GovSteamFV4.kip", &assign_GovSteamFV4_kip); + assign_map.emplace("cim:GovSteamFV4.kit", &assign_GovSteamFV4_kit); + assign_map.emplace("cim:GovSteamFV4.kmp1", &assign_GovSteamFV4_kmp1); + assign_map.emplace("cim:GovSteamFV4.kmp2", &assign_GovSteamFV4_kmp2); + assign_map.emplace("cim:GovSteamFV4.kpc", &assign_GovSteamFV4_kpc); + assign_map.emplace("cim:GovSteamFV4.kpp", &assign_GovSteamFV4_kpp); + assign_map.emplace("cim:GovSteamFV4.kpt", &assign_GovSteamFV4_kpt); + assign_map.emplace("cim:GovSteamFV4.krc", &assign_GovSteamFV4_krc); + assign_map.emplace("cim:GovSteamFV4.ksh", &assign_GovSteamFV4_ksh); + assign_map.emplace("cim:GovSteamFV4.lpi", &assign_GovSteamFV4_lpi); + assign_map.emplace("cim:GovSteamFV4.lps", &assign_GovSteamFV4_lps); + assign_map.emplace("cim:GovSteamFV4.mnef", &assign_GovSteamFV4_mnef); + assign_map.emplace("cim:GovSteamFV4.mxef", &assign_GovSteamFV4_mxef); + assign_map.emplace("cim:GovSteamFV4.pr1", &assign_GovSteamFV4_pr1); + assign_map.emplace("cim:GovSteamFV4.pr2", &assign_GovSteamFV4_pr2); + assign_map.emplace("cim:GovSteamFV4.psmn", &assign_GovSteamFV4_psmn); + assign_map.emplace("cim:GovSteamFV4.rsmimn", &assign_GovSteamFV4_rsmimn); + assign_map.emplace("cim:GovSteamFV4.rsmimx", &assign_GovSteamFV4_rsmimx); + assign_map.emplace("cim:GovSteamFV4.rvgmn", &assign_GovSteamFV4_rvgmn); + assign_map.emplace("cim:GovSteamFV4.rvgmx", &assign_GovSteamFV4_rvgmx); + assign_map.emplace("cim:GovSteamFV4.srmn", &assign_GovSteamFV4_srmn); + assign_map.emplace("cim:GovSteamFV4.srmx", &assign_GovSteamFV4_srmx); + assign_map.emplace("cim:GovSteamFV4.srsmp", &assign_GovSteamFV4_srsmp); + assign_map.emplace("cim:GovSteamFV4.svmn", &assign_GovSteamFV4_svmn); + assign_map.emplace("cim:GovSteamFV4.svmx", &assign_GovSteamFV4_svmx); + assign_map.emplace("cim:GovSteamFV4.ta", &assign_GovSteamFV4_ta); + assign_map.emplace("cim:GovSteamFV4.tam", &assign_GovSteamFV4_tam); + assign_map.emplace("cim:GovSteamFV4.tc", &assign_GovSteamFV4_tc); + assign_map.emplace("cim:GovSteamFV4.tcm", &assign_GovSteamFV4_tcm); + assign_map.emplace("cim:GovSteamFV4.tdc", &assign_GovSteamFV4_tdc); + assign_map.emplace("cim:GovSteamFV4.tf1", &assign_GovSteamFV4_tf1); + assign_map.emplace("cim:GovSteamFV4.tf2", &assign_GovSteamFV4_tf2); + assign_map.emplace("cim:GovSteamFV4.thp", &assign_GovSteamFV4_thp); + assign_map.emplace("cim:GovSteamFV4.tmp", &assign_GovSteamFV4_tmp); + assign_map.emplace("cim:GovSteamFV4.trh", &assign_GovSteamFV4_trh); + assign_map.emplace("cim:GovSteamFV4.tv", &assign_GovSteamFV4_tv); + assign_map.emplace("cim:GovSteamFV4.ty", &assign_GovSteamFV4_ty); + assign_map.emplace("cim:GovSteamFV4.y", &assign_GovSteamFV4_y); + assign_map.emplace("cim:GovSteamFV4.yhpmn", &assign_GovSteamFV4_yhpmn); + assign_map.emplace("cim:GovSteamFV4.yhpmx", &assign_GovSteamFV4_yhpmx); + assign_map.emplace("cim:GovSteamFV4.ympmn", &assign_GovSteamFV4_ympmn); + assign_map.emplace("cim:GovSteamFV4.ympmx", &assign_GovSteamFV4_ympmx); } void GovSteamFV4::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/GovSteamFV4.hpp b/CGMES_2.4.13_18DEC2013/GovSteamFV4.hpp index 1797a634c..1a9e91160 100644 --- a/CGMES_2.4.13_18DEC2013/GovSteamFV4.hpp +++ b/CGMES_2.4.13_18DEC2013/GovSteamFV4.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Detailed electro-hydraulic governor for steam unit. - */ + /** \brief Detailed electro-hydraulic governor for steam unit. */ class GovSteamFV4 : public TurbineGovernorDynamics { public: @@ -29,57 +27,158 @@ namespace CIMPP GovSteamFV4(); ~GovSteamFV4() override; - CIMPP::PU cpsmn; /* Minimum value of pressure regulator output (Cpsmn). Typical Value = -1. Default: nullptr */ - CIMPP::PU cpsmx; /* Maximum value of pressure regulator output (Cpsmx). Typical Value = 1. Default: nullptr */ - CIMPP::PU crmn; /* Minimum value of regulator set-point (Crmn). Typical Value = 0. Default: nullptr */ - CIMPP::PU crmx; /* Maximum value of regulator set-point (Crmx). Typical Value = 1.2. Default: nullptr */ - CIMPP::PU kdc; /* Derivative gain of pressure regulator (Kdc). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf1; /* Frequency bias (reciprocal of droop) (Kf1). Typical Value = 20. Default: nullptr */ - CIMPP::PU kf3; /* Frequency control (reciprocal of droop) (Kf3). Typical Value = 20. Default: nullptr */ - CIMPP::PU khp; /* Fraction of total turbine output generated by HP part (Khp). Typical Value = 0.35. Default: nullptr */ - CIMPP::PU kic; /* Integral gain of pressure regulator (Kic). Typical Value = 0.0033. Default: nullptr */ - CIMPP::PU kip; /* Integral gain of pressure feedback regulator (Kip). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU kit; /* Integral gain of electro-hydraulic regulator (Kit). Typical Value = 0.04. Default: nullptr */ - CIMPP::PU kmp1; /* First gain coefficient of intercept valves characteristic (Kmp1). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU kmp2; /* Second gain coefficient of intercept valves characteristic (Kmp2). Typical Value = 3.5. Default: nullptr */ - CIMPP::PU kpc; /* Proportional gain of pressure regulator (Kpc). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU kpp; /* Proportional gain of pressure feedback regulator (Kpp). Typical Value = 1. Default: nullptr */ - CIMPP::PU kpt; /* Proportional gain of electro-hydraulic regulator (Kpt). Typical Value = 0.3. Default: nullptr */ - CIMPP::PU krc; /* Maximum variation of fuel flow (Krc). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU ksh; /* Pressure loss due to flow friction in the boiler tubes (Ksh). Typical Value = 0.08. Default: nullptr */ - CIMPP::PU lpi; /* Maximum negative power error (Lpi). Typical Value = -0.15. Default: nullptr */ - CIMPP::PU lps; /* Maximum positive power error (Lps). Typical Value = 0.03. Default: nullptr */ - CIMPP::PU mnef; /* Lower limit for frequency correction (MN). Typical Value = -0.05. Default: nullptr */ - CIMPP::PU mxef; /* Upper limit for frequency correction (MX). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU pr1; /* First value of pressure set point static characteristic (Pr1). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU pr2; /* Second value of pressure set point static characteristic, corresponding to Ps0 = 1.0 PU (Pr2). Typical Value = 0.75. Default: nullptr */ - CIMPP::PU psmn; /* Minimum value of pressure set point static characteristic (Psmn). Typical Value = 1. Default: nullptr */ - CIMPP::PU rsmimn; /* Minimum value of integral regulator (Rsmimn). Typical Value = 0. Default: nullptr */ - CIMPP::PU rsmimx; /* Maximum value of integral regulator (Rsmimx). Typical Value = 1.1. Default: nullptr */ - CIMPP::PU rvgmn; /* Minimum value of integral regulator (Rvgmn). Typical Value = 0. Default: nullptr */ - CIMPP::PU rvgmx; /* Maximum value of integral regulator (Rvgmx). Typical Value = 1.2. Default: nullptr */ - CIMPP::PU srmn; /* Minimum valve opening (Srmn). Typical Value = 0. Default: nullptr */ - CIMPP::PU srmx; /* Maximum valve opening (Srmx). Typical Value = 1.1. Default: nullptr */ - CIMPP::PU srsmp; /* Intercept valves characteristic discontinuity point (Srsmp). Typical Value = 0.43. Default: nullptr */ - CIMPP::Simple_Float svmn; /* Maximum regulator gate closing velocity (Svmn). Typical Value = -0.0333. Default: nullptr */ - CIMPP::Simple_Float svmx; /* Maximum regulator gate opening velocity (Svmx). Typical Value = 0.0333. Default: nullptr */ - CIMPP::Seconds ta; /* Control valves rate opening time (Ta). Typical Value = 0.8. Default: nullptr */ - CIMPP::Seconds tam; /* Intercept valves rate opening time (Tam). Typical Value = 0.8. Default: nullptr */ - CIMPP::Seconds tc; /* Control valves rate closing time (Tc). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tcm; /* Intercept valves rate closing time (Tcm). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tdc; /* Derivative time constant of pressure regulator (Tdc). Typical Value = 90. Default: nullptr */ - CIMPP::Seconds tf1; /* Time constant of fuel regulation (Tf1). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds tf2; /* Time constant of steam chest (Tf2). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds thp; /* High pressure (HP) time constant of the turbine (Thp). Typical Value = 0.15. Default: nullptr */ - CIMPP::Seconds tmp; /* Low pressure (LP) time constant of the turbine (Tmp). Typical Value = 0.4. Default: nullptr */ - CIMPP::Seconds trh; /* Reheater time constant of the turbine (Trh). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds tv; /* Boiler time constant (Tv). Typical Value = 60. Default: nullptr */ - CIMPP::Seconds ty; /* Control valves servo time constant (Ty). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU y; /* Coefficient of linearized equations of turbine (Stodola formulation) (Y). Typical Value = 0.13. Default: nullptr */ - CIMPP::PU yhpmn; /* Minimum control valve position (Yhpmn). Typical Value = 0. Default: nullptr */ - CIMPP::PU yhpmx; /* Maximum control valve position (Yhpmx). Typical Value = 1.1. Default: nullptr */ - CIMPP::PU ympmn; /* Minimum intercept valve position (Ympmn). Typical Value = 0. Default: nullptr */ - CIMPP::PU ympmx; /* Maximum intercept valve position (Ympmx). Typical Value = 1.1. Default: nullptr */ + /** \brief Minimum value of pressure regulator output (Cpsmn). Typical Value = -1. Default: nullptr */ + CIMPP::PU cpsmn; + + /** \brief Maximum value of pressure regulator output (Cpsmx). Typical Value = 1. Default: nullptr */ + CIMPP::PU cpsmx; + + /** \brief Minimum value of regulator set-point (Crmn). Typical Value = 0. Default: nullptr */ + CIMPP::PU crmn; + + /** \brief Maximum value of regulator set-point (Crmx). Typical Value = 1.2. Default: nullptr */ + CIMPP::PU crmx; + + /** \brief Derivative gain of pressure regulator (Kdc). Typical Value = 1. Default: nullptr */ + CIMPP::PU kdc; + + /** \brief Frequency bias (reciprocal of droop) (Kf1). Typical Value = 20. Default: nullptr */ + CIMPP::PU kf1; + + /** \brief Frequency control (reciprocal of droop) (Kf3). Typical Value = 20. Default: nullptr */ + CIMPP::PU kf3; + + /** \brief Fraction of total turbine output generated by HP part (Khp). Typical Value = 0.35. Default: nullptr */ + CIMPP::PU khp; + + /** \brief Integral gain of pressure regulator (Kic). Typical Value = 0.0033. Default: nullptr */ + CIMPP::PU kic; + + /** \brief Integral gain of pressure feedback regulator (Kip). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU kip; + + /** \brief Integral gain of electro-hydraulic regulator (Kit). Typical Value = 0.04. Default: nullptr */ + CIMPP::PU kit; + + /** \brief First gain coefficient of intercept valves characteristic (Kmp1). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU kmp1; + + /** \brief Second gain coefficient of intercept valves characteristic (Kmp2). Typical Value = 3.5. Default: nullptr */ + CIMPP::PU kmp2; + + /** \brief Proportional gain of pressure regulator (Kpc). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU kpc; + + /** \brief Proportional gain of pressure feedback regulator (Kpp). Typical Value = 1. Default: nullptr */ + CIMPP::PU kpp; + + /** \brief Proportional gain of electro-hydraulic regulator (Kpt). Typical Value = 0.3. Default: nullptr */ + CIMPP::PU kpt; + + /** \brief Maximum variation of fuel flow (Krc). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU krc; + + /** \brief Pressure loss due to flow friction in the boiler tubes (Ksh). Typical Value = 0.08. Default: nullptr */ + CIMPP::PU ksh; + + /** \brief Maximum negative power error (Lpi). Typical Value = -0.15. Default: nullptr */ + CIMPP::PU lpi; + + /** \brief Maximum positive power error (Lps). Typical Value = 0.03. Default: nullptr */ + CIMPP::PU lps; + + /** \brief Lower limit for frequency correction (MN). Typical Value = -0.05. Default: nullptr */ + CIMPP::PU mnef; + + /** \brief Upper limit for frequency correction (MX). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU mxef; + + /** \brief First value of pressure set point static characteristic (Pr1). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU pr1; + + /** \brief Second value of pressure set point static characteristic, corresponding to Ps0 = 1.0 PU (Pr2). Typical Value = 0.75. Default: nullptr */ + CIMPP::PU pr2; + + /** \brief Minimum value of pressure set point static characteristic (Psmn). Typical Value = 1. Default: nullptr */ + CIMPP::PU psmn; + + /** \brief Minimum value of integral regulator (Rsmimn). Typical Value = 0. Default: nullptr */ + CIMPP::PU rsmimn; + + /** \brief Maximum value of integral regulator (Rsmimx). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU rsmimx; + + /** \brief Minimum value of integral regulator (Rvgmn). Typical Value = 0. Default: nullptr */ + CIMPP::PU rvgmn; + + /** \brief Maximum value of integral regulator (Rvgmx). Typical Value = 1.2. Default: nullptr */ + CIMPP::PU rvgmx; + + /** \brief Minimum valve opening (Srmn). Typical Value = 0. Default: nullptr */ + CIMPP::PU srmn; + + /** \brief Maximum valve opening (Srmx). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU srmx; + + /** \brief Intercept valves characteristic discontinuity point (Srsmp). Typical Value = 0.43. Default: nullptr */ + CIMPP::PU srsmp; + + /** \brief Maximum regulator gate closing velocity (Svmn). Typical Value = -0.0333. Default: nullptr */ + CIMPP::Simple_Float svmn; + + /** \brief Maximum regulator gate opening velocity (Svmx). Typical Value = 0.0333. Default: nullptr */ + CIMPP::Simple_Float svmx; + + /** \brief Control valves rate opening time (Ta). Typical Value = 0.8. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Intercept valves rate opening time (Tam). Typical Value = 0.8. Default: nullptr */ + CIMPP::Seconds tam; + + /** \brief Control valves rate closing time (Tc). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Intercept valves rate closing time (Tcm). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds tcm; + + /** \brief Derivative time constant of pressure regulator (Tdc). Typical Value = 90. Default: nullptr */ + CIMPP::Seconds tdc; + + /** \brief Time constant of fuel regulation (Tf1). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds tf1; + + /** \brief Time constant of steam chest (Tf2). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds tf2; + + /** \brief High pressure (HP) time constant of the turbine (Thp). Typical Value = 0.15. Default: nullptr */ + CIMPP::Seconds thp; + + /** \brief Low pressure (LP) time constant of the turbine (Tmp). Typical Value = 0.4. Default: nullptr */ + CIMPP::Seconds tmp; + + /** \brief Reheater time constant of the turbine (Trh). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds trh; + + /** \brief Boiler time constant (Tv). Typical Value = 60. Default: nullptr */ + CIMPP::Seconds tv; + + /** \brief Control valves servo time constant (Ty). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds ty; + + /** \brief Coefficient of linearized equations of turbine (Stodola formulation) (Y). Typical Value = 0.13. Default: nullptr */ + CIMPP::PU y; + + /** \brief Minimum control valve position (Yhpmn). Typical Value = 0. Default: nullptr */ + CIMPP::PU yhpmn; + + /** \brief Maximum control valve position (Yhpmx). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU yhpmx; + + /** \brief Minimum intercept valve position (Ympmn). Typical Value = 0. Default: nullptr */ + CIMPP::PU ympmn; + + /** \brief Maximum intercept valve position (Ympmx). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU ympmx; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GovSteamIEEE1.cpp b/CGMES_2.4.13_18DEC2013/GovSteamIEEE1.cpp index c6207bca9..8dafb5bc6 100644 --- a/CGMES_2.4.13_18DEC2013/GovSteamIEEE1.cpp +++ b/CGMES_2.4.13_18DEC2013/GovSteamIEEE1.cpp @@ -8,32 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -GovSteamIEEE1::GovSteamIEEE1() {}; -GovSteamIEEE1::~GovSteamIEEE1() {}; +GovSteamIEEE1::GovSteamIEEE1() {} +GovSteamIEEE1::~GovSteamIEEE1() {} static const std::list PossibleProfilesForClass = { @@ -80,285 +59,304 @@ GovSteamIEEE1::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteamIEEE1_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_k4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_k5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_k5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_k6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_k6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_k7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_k7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_k8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_k8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_t7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_uc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_uo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_uo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteamIEEE1_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -372,7 +370,8 @@ bool get_GovSteamIEEE1_k(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamIEEE1_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -386,7 +385,8 @@ bool get_GovSteamIEEE1_k1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -400,7 +400,8 @@ bool get_GovSteamIEEE1_k2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -414,7 +415,8 @@ bool get_GovSteamIEEE1_k3(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k4; if (!buffer.str().empty()) @@ -428,7 +430,8 @@ bool get_GovSteamIEEE1_k4(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k5; if (!buffer.str().empty()) @@ -442,7 +445,8 @@ bool get_GovSteamIEEE1_k5(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_k6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k6; if (!buffer.str().empty()) @@ -456,7 +460,8 @@ bool get_GovSteamIEEE1_k6(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_k7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k7; if (!buffer.str().empty()) @@ -470,7 +475,8 @@ bool get_GovSteamIEEE1_k7(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_k8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k8; if (!buffer.str().empty()) @@ -484,7 +490,8 @@ bool get_GovSteamIEEE1_k8(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -498,7 +505,8 @@ bool get_GovSteamIEEE1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream bool get_GovSteamIEEE1_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -512,7 +520,8 @@ bool get_GovSteamIEEE1_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovSteamIEEE1_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -526,7 +535,8 @@ bool get_GovSteamIEEE1_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovSteamIEEE1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -540,7 +550,8 @@ bool get_GovSteamIEEE1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -554,7 +565,8 @@ bool get_GovSteamIEEE1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -568,7 +580,8 @@ bool get_GovSteamIEEE1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -582,7 +595,8 @@ bool get_GovSteamIEEE1_t4(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -596,7 +610,8 @@ bool get_GovSteamIEEE1_t5(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -610,7 +625,8 @@ bool get_GovSteamIEEE1_t6(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t7; if (!buffer.str().empty()) @@ -624,7 +640,8 @@ bool get_GovSteamIEEE1_t7(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uc; if (!buffer.str().empty()) @@ -638,7 +655,8 @@ bool get_GovSteamIEEE1_uc(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uo; if (!buffer.str().empty()) @@ -650,8 +668,6 @@ bool get_GovSteamIEEE1_uo(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char GovSteamIEEE1::debugName[] = "GovSteamIEEE1"; const char* GovSteamIEEE1::debugString() const { @@ -660,32 +676,32 @@ const char* GovSteamIEEE1::debugString() const void GovSteamIEEE1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1"), &GovSteamIEEE1_factory)); + factory_map.emplace("cim:GovSteamIEEE1", &GovSteamIEEE1_factory); } void GovSteamIEEE1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.k"), &assign_GovSteamIEEE1_k)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.k1"), &assign_GovSteamIEEE1_k1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.k2"), &assign_GovSteamIEEE1_k2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.k3"), &assign_GovSteamIEEE1_k3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.k4"), &assign_GovSteamIEEE1_k4)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.k5"), &assign_GovSteamIEEE1_k5)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.k6"), &assign_GovSteamIEEE1_k6)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.k7"), &assign_GovSteamIEEE1_k7)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.k8"), &assign_GovSteamIEEE1_k8)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.mwbase"), &assign_GovSteamIEEE1_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.pmax"), &assign_GovSteamIEEE1_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.pmin"), &assign_GovSteamIEEE1_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.t1"), &assign_GovSteamIEEE1_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.t2"), &assign_GovSteamIEEE1_t2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.t3"), &assign_GovSteamIEEE1_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.t4"), &assign_GovSteamIEEE1_t4)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.t5"), &assign_GovSteamIEEE1_t5)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.t6"), &assign_GovSteamIEEE1_t6)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.t7"), &assign_GovSteamIEEE1_t7)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.uc"), &assign_GovSteamIEEE1_uc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.uo"), &assign_GovSteamIEEE1_uo)); + assign_map.emplace("cim:GovSteamIEEE1.k", &assign_GovSteamIEEE1_k); + assign_map.emplace("cim:GovSteamIEEE1.k1", &assign_GovSteamIEEE1_k1); + assign_map.emplace("cim:GovSteamIEEE1.k2", &assign_GovSteamIEEE1_k2); + assign_map.emplace("cim:GovSteamIEEE1.k3", &assign_GovSteamIEEE1_k3); + assign_map.emplace("cim:GovSteamIEEE1.k4", &assign_GovSteamIEEE1_k4); + assign_map.emplace("cim:GovSteamIEEE1.k5", &assign_GovSteamIEEE1_k5); + assign_map.emplace("cim:GovSteamIEEE1.k6", &assign_GovSteamIEEE1_k6); + assign_map.emplace("cim:GovSteamIEEE1.k7", &assign_GovSteamIEEE1_k7); + assign_map.emplace("cim:GovSteamIEEE1.k8", &assign_GovSteamIEEE1_k8); + assign_map.emplace("cim:GovSteamIEEE1.mwbase", &assign_GovSteamIEEE1_mwbase); + assign_map.emplace("cim:GovSteamIEEE1.pmax", &assign_GovSteamIEEE1_pmax); + assign_map.emplace("cim:GovSteamIEEE1.pmin", &assign_GovSteamIEEE1_pmin); + assign_map.emplace("cim:GovSteamIEEE1.t1", &assign_GovSteamIEEE1_t1); + assign_map.emplace("cim:GovSteamIEEE1.t2", &assign_GovSteamIEEE1_t2); + assign_map.emplace("cim:GovSteamIEEE1.t3", &assign_GovSteamIEEE1_t3); + assign_map.emplace("cim:GovSteamIEEE1.t4", &assign_GovSteamIEEE1_t4); + assign_map.emplace("cim:GovSteamIEEE1.t5", &assign_GovSteamIEEE1_t5); + assign_map.emplace("cim:GovSteamIEEE1.t6", &assign_GovSteamIEEE1_t6); + assign_map.emplace("cim:GovSteamIEEE1.t7", &assign_GovSteamIEEE1_t7); + assign_map.emplace("cim:GovSteamIEEE1.uc", &assign_GovSteamIEEE1_uc); + assign_map.emplace("cim:GovSteamIEEE1.uo", &assign_GovSteamIEEE1_uo); } void GovSteamIEEE1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/GovSteamIEEE1.hpp b/CGMES_2.4.13_18DEC2013/GovSteamIEEE1.hpp index 83051bda8..23784774a 100644 --- a/CGMES_2.4.13_18DEC2013/GovSteamIEEE1.hpp +++ b/CGMES_2.4.13_18DEC2013/GovSteamIEEE1.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE steam turbine governor model. Ref - */ + /** \brief IEEE steam turbine governor model. Ref */ class GovSteamIEEE1 : public TurbineGovernorDynamics { public: @@ -30,27 +28,68 @@ namespace CIMPP GovSteamIEEE1(); ~GovSteamIEEE1() override; - CIMPP::PU k; /* Governor gain (reciprocal of droop) (K) (> 0). Typical Value = 25. Default: nullptr */ - CIMPP::Simple_Float k1; /* Fraction of HP shaft power after first boiler pass (K1). Typical Value = 0.2. Default: nullptr */ - CIMPP::Simple_Float k2; /* Fraction of LP shaft power after first boiler pass (K2). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float k3; /* Fraction of HP shaft power after second boiler pass (K3). Typical Value = 0.3. Default: nullptr */ - CIMPP::Simple_Float k4; /* Fraction of LP shaft power after second boiler pass (K4). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float k5; /* Fraction of HP shaft power after third boiler pass (K5). Typical Value = 0.5. Default: nullptr */ - CIMPP::Simple_Float k6; /* Fraction of LP shaft power after third boiler pass (K6). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float k7; /* Fraction of HP shaft power after fourth boiler pass (K7). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float k8; /* Fraction of LP shaft power after fourth boiler pass (K8). Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (> 0) Default: nullptr */ - CIMPP::PU pmax; /* Maximum valve opening (Pmax) (> Pmin). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum valve opening (Pmin) (>= 0). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t1; /* Governor lag time constant (T1). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t2; /* Governor lead time constant (T2). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t3; /* Valve positioner time constant (T3) (> 0). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t4; /* Inlet piping/steam bowl time constant (T4). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds t5; /* Time constant of second boiler pass (T5). Typical Value = 5. Default: nullptr */ - CIMPP::Seconds t6; /* Time constant of third boiler pass (T6). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds t7; /* Time constant of fourth boiler pass (T7). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float uc; /* Maximum valve closing velocity (Uc) (< 0). Unit = PU/sec. Typical Value = -10. Default: nullptr */ - CIMPP::Simple_Float uo; /* Maximum valve opening velocity (Uo) (> 0). Unit = PU/sec. Typical Value = 1. Default: nullptr */ + /** \brief Governor gain (reciprocal of droop) (K) (> 0). Typical Value = 25. Default: nullptr */ + CIMPP::PU k; + + /** \brief Fraction of HP shaft power after first boiler pass (K1). Typical Value = 0.2. Default: nullptr */ + CIMPP::Simple_Float k1; + + /** \brief Fraction of LP shaft power after first boiler pass (K2). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float k2; + + /** \brief Fraction of HP shaft power after second boiler pass (K3). Typical Value = 0.3. Default: nullptr */ + CIMPP::Simple_Float k3; + + /** \brief Fraction of LP shaft power after second boiler pass (K4). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float k4; + + /** \brief Fraction of HP shaft power after third boiler pass (K5). Typical Value = 0.5. Default: nullptr */ + CIMPP::Simple_Float k5; + + /** \brief Fraction of LP shaft power after third boiler pass (K6). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float k6; + + /** \brief Fraction of HP shaft power after fourth boiler pass (K7). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float k7; + + /** \brief Fraction of LP shaft power after fourth boiler pass (K8). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float k8; + + /** \brief Base for power values (MWbase) (> 0) Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Maximum valve opening (Pmax) (> Pmin). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum valve opening (Pmin) (>= 0). Typical Value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Governor lag time constant (T1). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Governor lead time constant (T2). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Valve positioner time constant (T3) (> 0). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Inlet piping/steam bowl time constant (T4). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant of second boiler pass (T5). Typical Value = 5. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Time constant of third boiler pass (T6). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time constant of fourth boiler pass (T7). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t7; + + /** \brief Maximum valve closing velocity (Uc) (< 0). Unit = PU/sec. Typical Value = -10. Default: nullptr */ + CIMPP::Simple_Float uc; + + /** \brief Maximum valve opening velocity (Uo) (> 0). Unit = PU/sec. Typical Value = 1. Default: nullptr */ + CIMPP::Simple_Float uo; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GovSteamSGO.cpp b/CGMES_2.4.13_18DEC2013/GovSteamSGO.cpp index dbe420a31..8b1ecdec7 100644 --- a/CGMES_2.4.13_18DEC2013/GovSteamSGO.cpp +++ b/CGMES_2.4.13_18DEC2013/GovSteamSGO.cpp @@ -8,23 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -GovSteamSGO::GovSteamSGO() {}; -GovSteamSGO::~GovSteamSGO() {}; +GovSteamSGO::GovSteamSGO() {} +GovSteamSGO::~GovSteamSGO() {} static const std::list PossibleProfilesForClass = { @@ -62,168 +50,178 @@ GovSteamSGO::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteamSGO_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteamSGO_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -237,7 +235,8 @@ bool get_GovSteamSGO_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamSGO_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -251,7 +250,8 @@ bool get_GovSteamSGO_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamSGO_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -265,7 +265,8 @@ bool get_GovSteamSGO_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamSGO_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -279,7 +280,8 @@ bool get_GovSteamSGO_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovSteamSGO_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -293,7 +295,8 @@ bool get_GovSteamSGO_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamSGO_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -307,7 +310,8 @@ bool get_GovSteamSGO_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamSGO_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -321,7 +325,8 @@ bool get_GovSteamSGO_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamSGO_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -335,7 +340,8 @@ bool get_GovSteamSGO_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamSGO_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -349,7 +355,8 @@ bool get_GovSteamSGO_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamSGO_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -363,7 +370,8 @@ bool get_GovSteamSGO_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamSGO_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -377,7 +385,8 @@ bool get_GovSteamSGO_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamSGO_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -389,8 +398,6 @@ bool get_GovSteamSGO_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char GovSteamSGO::debugName[] = "GovSteamSGO"; const char* GovSteamSGO::debugString() const { @@ -399,23 +406,23 @@ const char* GovSteamSGO::debugString() const void GovSteamSGO::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteamSGO"), &GovSteamSGO_factory)); + factory_map.emplace("cim:GovSteamSGO", &GovSteamSGO_factory); } void GovSteamSGO::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.k1"), &assign_GovSteamSGO_k1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.k2"), &assign_GovSteamSGO_k2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.k3"), &assign_GovSteamSGO_k3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.mwbase"), &assign_GovSteamSGO_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.pmax"), &assign_GovSteamSGO_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.pmin"), &assign_GovSteamSGO_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.t1"), &assign_GovSteamSGO_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.t2"), &assign_GovSteamSGO_t2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.t3"), &assign_GovSteamSGO_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.t4"), &assign_GovSteamSGO_t4)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.t5"), &assign_GovSteamSGO_t5)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.t6"), &assign_GovSteamSGO_t6)); + assign_map.emplace("cim:GovSteamSGO.k1", &assign_GovSteamSGO_k1); + assign_map.emplace("cim:GovSteamSGO.k2", &assign_GovSteamSGO_k2); + assign_map.emplace("cim:GovSteamSGO.k3", &assign_GovSteamSGO_k3); + assign_map.emplace("cim:GovSteamSGO.mwbase", &assign_GovSteamSGO_mwbase); + assign_map.emplace("cim:GovSteamSGO.pmax", &assign_GovSteamSGO_pmax); + assign_map.emplace("cim:GovSteamSGO.pmin", &assign_GovSteamSGO_pmin); + assign_map.emplace("cim:GovSteamSGO.t1", &assign_GovSteamSGO_t1); + assign_map.emplace("cim:GovSteamSGO.t2", &assign_GovSteamSGO_t2); + assign_map.emplace("cim:GovSteamSGO.t3", &assign_GovSteamSGO_t3); + assign_map.emplace("cim:GovSteamSGO.t4", &assign_GovSteamSGO_t4); + assign_map.emplace("cim:GovSteamSGO.t5", &assign_GovSteamSGO_t5); + assign_map.emplace("cim:GovSteamSGO.t6", &assign_GovSteamSGO_t6); } void GovSteamSGO::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/GovSteamSGO.hpp b/CGMES_2.4.13_18DEC2013/GovSteamSGO.hpp index 1f9d6d587..337ba6a63 100644 --- a/CGMES_2.4.13_18DEC2013/GovSteamSGO.hpp +++ b/CGMES_2.4.13_18DEC2013/GovSteamSGO.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Simplified Steam turbine governor model. - */ + /** \brief Simplified Steam turbine governor model. */ class GovSteamSGO : public TurbineGovernorDynamics { public: @@ -29,18 +27,41 @@ namespace CIMPP GovSteamSGO(); ~GovSteamSGO() override; - CIMPP::PU k1; /* One/per unit regulation (K1). Default: nullptr */ - CIMPP::PU k2; /* Fraction (K2). Default: nullptr */ - CIMPP::PU k3; /* Fraction (K3). Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU pmax; /* Upper power limit (Pmax). Default: nullptr */ - CIMPP::Seconds pmin; /* Lower power limit (Pmin). Default: nullptr */ - CIMPP::Seconds t1; /* Controller lag (T1). Default: nullptr */ - CIMPP::Seconds t2; /* Controller lead compensation (T2). Default: nullptr */ - CIMPP::Seconds t3; /* Governor lag (T3) (>0). Default: nullptr */ - CIMPP::Seconds t4; /* Delay due to steam inlet volumes associated with steam chest and inlet piping (T4). Default: nullptr */ - CIMPP::Seconds t5; /* Reheater delay including hot and cold leads (T5). Default: nullptr */ - CIMPP::Seconds t6; /* Delay due to IP-LP turbine, crossover pipes and LP end hoods (T6). Default: nullptr */ + /** \brief One/per unit regulation (K1). Default: nullptr */ + CIMPP::PU k1; + + /** \brief Fraction (K2). Default: nullptr */ + CIMPP::PU k2; + + /** \brief Fraction (K3). Default: nullptr */ + CIMPP::PU k3; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Upper power limit (Pmax). Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Lower power limit (Pmin). Default: nullptr */ + CIMPP::Seconds pmin; + + /** \brief Controller lag (T1). Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Controller lead compensation (T2). Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Governor lag (T3) (>0). Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Delay due to steam inlet volumes associated with steam chest and inlet piping (T4). Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Reheater delay including hot and cold leads (T5). Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Delay due to IP-LP turbine, crossover pipes and LP end hoods (T6). Default: nullptr */ + CIMPP::Seconds t6; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GrossToNetActivePowerCurve.cpp b/CGMES_2.4.13_18DEC2013/GrossToNetActivePowerCurve.cpp index 2e70aaac8..8e293b959 100644 --- a/CGMES_2.4.13_18DEC2013/GrossToNetActivePowerCurve.cpp +++ b/CGMES_2.4.13_18DEC2013/GrossToNetActivePowerCurve.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -GrossToNetActivePowerCurve::GrossToNetActivePowerCurve() : GeneratingUnit(nullptr) {}; -GrossToNetActivePowerCurve::~GrossToNetActivePowerCurve() {}; +GrossToNetActivePowerCurve::GrossToNetActivePowerCurve() : GeneratingUnit(nullptr) {} +GrossToNetActivePowerCurve::~GrossToNetActivePowerCurve() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ GrossToNetActivePowerCurve::getPossibleProfilesForAttributes() const return map; } - - bool assign_GeneratingUnit_GrossToNetActivePowerCurves(BaseClass*, BaseClass*); bool assign_GrossToNetActivePowerCurve_GeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_GrossToNetActivePowerCurve_GeneratingUnit(BaseClass* BaseClass_ptr1, return false; } - bool get_GrossToNetActivePowerCurve_GeneratingUnit(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const GrossToNetActivePowerCurve* element = dynamic_cast(BaseClass_ptr1)) + const GrossToNetActivePowerCurve* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->GeneratingUnit != 0) { @@ -73,7 +71,6 @@ bool get_GrossToNetActivePowerCurve_GeneratingUnit(const BaseClass* BaseClass_pt return false; } - const char GrossToNetActivePowerCurve::debugName[] = "GrossToNetActivePowerCurve"; const char* GrossToNetActivePowerCurve::debugString() const { @@ -82,7 +79,7 @@ const char* GrossToNetActivePowerCurve::debugString() const void GrossToNetActivePowerCurve::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GrossToNetActivePowerCurve"), &GrossToNetActivePowerCurve_factory)); + factory_map.emplace("cim:GrossToNetActivePowerCurve", &GrossToNetActivePowerCurve_factory); } void GrossToNetActivePowerCurve::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void GrossToNetActivePowerCurve::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GrossToNetActivePowerCurve.GeneratingUnit"), &assign_GrossToNetActivePowerCurve_GeneratingUnit)); + assign_map.emplace("cim:GrossToNetActivePowerCurve.GeneratingUnit", &assign_GrossToNetActivePowerCurve_GeneratingUnit); } void GrossToNetActivePowerCurve::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/GrossToNetActivePowerCurve.hpp b/CGMES_2.4.13_18DEC2013/GrossToNetActivePowerCurve.hpp index d3a65bedc..eb1b8ea60 100644 --- a/CGMES_2.4.13_18DEC2013/GrossToNetActivePowerCurve.hpp +++ b/CGMES_2.4.13_18DEC2013/GrossToNetActivePowerCurve.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class GeneratingUnit; - /* - Relationship between the generating unit's gross active power output on the X-axis (measured at the terminals of the machine(s)) and the generating unit's net active power output on the Y-axis (based on utility-defined measurements at the power station). Station service loads, when modeled, should be treated as non-conforming bus loads. There may be more than one curve, depending on the auxiliary equipment that is in service. - */ + /** \brief Relationship between the generating unit's gross active power output on the X-axis (measured at the terminals of the machine(s)) and the generating unit's net active power output on the Y-axis (based on utility-defined measurements at the power station). Station service loads, when modeled, should be treated as non-conforming bus loads. There may be more than one curve, depending on the auxiliary equipment that is in service. */ class GrossToNetActivePowerCurve : public Curve { public: @@ -27,7 +25,8 @@ namespace CIMPP GrossToNetActivePowerCurve(); ~GrossToNetActivePowerCurve() override; - CIMPP::GeneratingUnit* GeneratingUnit; /* A generating unit may have a gross active power to net active power curve, describing the losses and auxiliary power requirements of the unit. Default: 0 */ + /** \brief A generating unit may have a gross active power to net active power curve, describing the losses and auxiliary power requirements of the unit. Default: 0 */ + CIMPP::GeneratingUnit* GeneratingUnit; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Ground.cpp b/CGMES_2.4.13_18DEC2013/Ground.cpp index fa0b071bc..e2e2a0868 100644 --- a/CGMES_2.4.13_18DEC2013/Ground.cpp +++ b/CGMES_2.4.13_18DEC2013/Ground.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Ground::Ground() {}; -Ground::~Ground() {}; +Ground::Ground() {} +Ground::~Ground() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ Ground::getPossibleProfilesForAttributes() const return map; } - - - - - const char Ground::debugName[] = "Ground"; const char* Ground::debugString() const { @@ -51,7 +46,7 @@ const char* Ground::debugString() const void Ground::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Ground"), &Ground_factory)); + factory_map.emplace("cim:Ground", &Ground_factory); } void Ground::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/Ground.hpp b/CGMES_2.4.13_18DEC2013/Ground.hpp index 8ff5cf74f..56bd33323 100644 --- a/CGMES_2.4.13_18DEC2013/Ground.hpp +++ b/CGMES_2.4.13_18DEC2013/Ground.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A point where the system is grounded used for connecting conducting equipment to ground. The power system model can have any number of grounds. - */ + /** \brief A point where the system is grounded used for connecting conducting equipment to ground. The power system model can have any number of grounds. */ class Ground : public ConductingEquipment { public: @@ -26,7 +24,6 @@ namespace CIMPP Ground(); ~Ground() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GroundDisconnector.cpp b/CGMES_2.4.13_18DEC2013/GroundDisconnector.cpp index ebe1006e0..1926b56f9 100644 --- a/CGMES_2.4.13_18DEC2013/GroundDisconnector.cpp +++ b/CGMES_2.4.13_18DEC2013/GroundDisconnector.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -GroundDisconnector::GroundDisconnector() {}; -GroundDisconnector::~GroundDisconnector() {}; +GroundDisconnector::GroundDisconnector() {} +GroundDisconnector::~GroundDisconnector() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ GroundDisconnector::getPossibleProfilesForAttributes() const return map; } - - - - - const char GroundDisconnector::debugName[] = "GroundDisconnector"; const char* GroundDisconnector::debugString() const { @@ -52,7 +47,7 @@ const char* GroundDisconnector::debugString() const void GroundDisconnector::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GroundDisconnector"), &GroundDisconnector_factory)); + factory_map.emplace("cim:GroundDisconnector", &GroundDisconnector_factory); } void GroundDisconnector::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/GroundDisconnector.hpp b/CGMES_2.4.13_18DEC2013/GroundDisconnector.hpp index 0e06b381a..ccf2b2c27 100644 --- a/CGMES_2.4.13_18DEC2013/GroundDisconnector.hpp +++ b/CGMES_2.4.13_18DEC2013/GroundDisconnector.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A manually operated or motor operated mechanical switching device used for isolating a circuit or equipment from ground. - */ + /** \brief A manually operated or motor operated mechanical switching device used for isolating a circuit or equipment from ground. */ class GroundDisconnector : public Switch { public: @@ -26,7 +24,6 @@ namespace CIMPP GroundDisconnector(); ~GroundDisconnector() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/GroundingImpedance.cpp b/CGMES_2.4.13_18DEC2013/GroundingImpedance.cpp index 346a40027..db7a16992 100644 --- a/CGMES_2.4.13_18DEC2013/GroundingImpedance.cpp +++ b/CGMES_2.4.13_18DEC2013/GroundingImpedance.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Reactance.hpp" using namespace CIMPP; -GroundingImpedance::GroundingImpedance() {}; -GroundingImpedance::~GroundingImpedance() {}; +GroundingImpedance::GroundingImpedance() {} +GroundingImpedance::~GroundingImpedance() {} static const std::list PossibleProfilesForClass = { @@ -40,25 +39,24 @@ GroundingImpedance::getPossibleProfilesForAttributes() const return map; } - -bool assign_GroundingImpedance_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GroundingImpedance_x(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GroundingImpedance* element = dynamic_cast(BaseClass_ptr1)) + GroundingImpedance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GroundingImpedance_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GroundingImpedance* element = dynamic_cast(BaseClass_ptr1)) + const GroundingImpedance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x; if (!buffer.str().empty()) @@ -70,8 +68,6 @@ bool get_GroundingImpedance_x(const BaseClass* BaseClass_ptr1, std::stringstream return false; } - - const char GroundingImpedance::debugName[] = "GroundingImpedance"; const char* GroundingImpedance::debugString() const { @@ -80,12 +76,12 @@ const char* GroundingImpedance::debugString() const void GroundingImpedance::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GroundingImpedance"), &GroundingImpedance_factory)); + factory_map.emplace("cim:GroundingImpedance", &GroundingImpedance_factory); } void GroundingImpedance::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GroundingImpedance.x"), &assign_GroundingImpedance_x)); + assign_map.emplace("cim:GroundingImpedance.x", &assign_GroundingImpedance_x); } void GroundingImpedance::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/GroundingImpedance.hpp b/CGMES_2.4.13_18DEC2013/GroundingImpedance.hpp index f821443f8..ad05b5aaa 100644 --- a/CGMES_2.4.13_18DEC2013/GroundingImpedance.hpp +++ b/CGMES_2.4.13_18DEC2013/GroundingImpedance.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A fixed impedance device used for grounding. - */ + /** \brief A fixed impedance device used for grounding. */ class GroundingImpedance : public EarthFaultCompensator { public: @@ -27,7 +25,8 @@ namespace CIMPP GroundingImpedance(); ~GroundingImpedance() override; - CIMPP::Reactance x; /* Reactance of device. Default: nullptr */ + /** \brief Reactance of device. Default: nullptr */ + CIMPP::Reactance x; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/HydroEnergyConversionKind.cpp b/CGMES_2.4.13_18DEC2013/HydroEnergyConversionKind.cpp index 1bc81701f..aeddc62cb 100644 --- a/CGMES_2.4.13_18DEC2013/HydroEnergyConversionKind.cpp +++ b/CGMES_2.4.13_18DEC2013/HydroEnergyConversionKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "HydroEnergyConversionKind") + if (EnumSymbol.substr(0, pos) != "HydroEnergyConversionKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,12 +50,12 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "generator") + if (EnumSymbol == "generator") { rop = HydroEnergyConversionKind::generator; return lop; } - if(EnumSymbol == "pumpAndGenerator") + if (EnumSymbol == "pumpAndGenerator") { rop = HydroEnergyConversionKind::pumpAndGenerator; return lop; diff --git a/CGMES_2.4.13_18DEC2013/HydroEnergyConversionKind.hpp b/CGMES_2.4.13_18DEC2013/HydroEnergyConversionKind.hpp index fb666b097..968163466 100644 --- a/CGMES_2.4.13_18DEC2013/HydroEnergyConversionKind.hpp +++ b/CGMES_2.4.13_18DEC2013/HydroEnergyConversionKind.hpp @@ -9,21 +9,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Specifies the capability of the hydro generating unit to convert energy as a generator or pump. - */ + /** \brief Specifies the capability of the hydro generating unit to convert energy as a generator or pump. */ class HydroEnergyConversionKind { public: enum HydroEnergyConversionKind_ENUM { - /** - * Able to generate power, but not able to pump water for energy storage. - */ + /** Able to generate power, but not able to pump water for energy storage. */ generator, - /** - * Able to both generate power and pump water for energy storage. - */ + /** Able to both generate power and pump water for energy storage. */ pumpAndGenerator, }; diff --git a/CGMES_2.4.13_18DEC2013/HydroGeneratingUnit.cpp b/CGMES_2.4.13_18DEC2013/HydroGeneratingUnit.cpp index 5a146ad59..13c3f4210 100644 --- a/CGMES_2.4.13_18DEC2013/HydroGeneratingUnit.cpp +++ b/CGMES_2.4.13_18DEC2013/HydroGeneratingUnit.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "HydroPowerPlant.hpp" -#include "HydroEnergyConversionKind.hpp" using namespace CIMPP; -HydroGeneratingUnit::HydroGeneratingUnit() : HydroPowerPlant(nullptr) {}; -HydroGeneratingUnit::~HydroGeneratingUnit() {}; +HydroGeneratingUnit::HydroGeneratingUnit() : HydroPowerPlant(nullptr) {} +HydroGeneratingUnit::~HydroGeneratingUnit() {} static const std::list PossibleProfilesForClass = { @@ -43,21 +42,6 @@ HydroGeneratingUnit::getPossibleProfilesForAttributes() const return map; } - -bool assign_HydroGeneratingUnit_energyConversionCapability(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->energyConversionCapability; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_HydroPowerPlant_HydroGeneratingUnits(BaseClass*, BaseClass*); bool assign_HydroGeneratingUnit_HydroPowerPlant(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -75,10 +59,24 @@ bool assign_HydroGeneratingUnit_HydroPowerPlant(BaseClass* BaseClass_ptr1, BaseC return false; } +bool assign_HydroGeneratingUnit_energyConversionCapability(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->energyConversionCapability; + if (!buffer.fail()) + { + return true; + } + } + return false; +} bool get_HydroGeneratingUnit_HydroPowerPlant(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->HydroPowerPlant != 0) { @@ -89,10 +87,10 @@ bool get_HydroGeneratingUnit_HydroPowerPlant(const BaseClass* BaseClass_ptr1, st return false; } - bool get_HydroGeneratingUnit_energyConversionCapability(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->energyConversionCapability; if (!buffer.str().empty()) @@ -112,17 +110,17 @@ const char* HydroGeneratingUnit::debugString() const void HydroGeneratingUnit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:HydroGeneratingUnit"), &HydroGeneratingUnit_factory)); + factory_map.emplace("cim:HydroGeneratingUnit", &HydroGeneratingUnit_factory); } void HydroGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:HydroGeneratingUnit.energyConversionCapability"), &assign_HydroGeneratingUnit_energyConversionCapability)); + assign_map.emplace("cim:HydroGeneratingUnit.energyConversionCapability", &assign_HydroGeneratingUnit_energyConversionCapability); } void HydroGeneratingUnit::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:HydroGeneratingUnit.HydroPowerPlant"), &assign_HydroGeneratingUnit_HydroPowerPlant)); + assign_map.emplace("cim:HydroGeneratingUnit.HydroPowerPlant", &assign_HydroGeneratingUnit_HydroPowerPlant); } void HydroGeneratingUnit::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/HydroGeneratingUnit.hpp b/CGMES_2.4.13_18DEC2013/HydroGeneratingUnit.hpp index 39eda04a4..74455c5e9 100644 --- a/CGMES_2.4.13_18DEC2013/HydroGeneratingUnit.hpp +++ b/CGMES_2.4.13_18DEC2013/HydroGeneratingUnit.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class HydroPowerPlant; - /* - A generating unit whose prime mover is a hydraulic turbine (e.g., Francis, Pelton, Kaplan). - */ + /** \brief A generating unit whose prime mover is a hydraulic turbine (e.g., Francis, Pelton, Kaplan). */ class HydroGeneratingUnit : public GeneratingUnit { public: @@ -28,8 +26,11 @@ namespace CIMPP HydroGeneratingUnit(); ~HydroGeneratingUnit() override; - CIMPP::HydroPowerPlant* HydroPowerPlant; /* The hydro generating unit belongs to a hydro power plant. Default: 0 */ - CIMPP::HydroEnergyConversionKind energyConversionCapability; /* Energy conversion capability for generating. Default: 0 */ + /** \brief The hydro generating unit belongs to a hydro power plant. Default: 0 */ + CIMPP::HydroPowerPlant* HydroPowerPlant; + + /** \brief Energy conversion capability for generating. Default: 0 */ + CIMPP::HydroEnergyConversionKind energyConversionCapability; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/HydroPlantStorageKind.cpp b/CGMES_2.4.13_18DEC2013/HydroPlantStorageKind.cpp index 4930efb66..61d7d942b 100644 --- a/CGMES_2.4.13_18DEC2013/HydroPlantStorageKind.cpp +++ b/CGMES_2.4.13_18DEC2013/HydroPlantStorageKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "HydroPlantStorageKind") + if (EnumSymbol.substr(0, pos) != "HydroPlantStorageKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "runOfRiver") + if (EnumSymbol == "runOfRiver") { rop = HydroPlantStorageKind::runOfRiver; return lop; } - if(EnumSymbol == "pumpedStorage") + if (EnumSymbol == "pumpedStorage") { rop = HydroPlantStorageKind::pumpedStorage; return lop; } - if(EnumSymbol == "storage") + if (EnumSymbol == "storage") { rop = HydroPlantStorageKind::storage; return lop; diff --git a/CGMES_2.4.13_18DEC2013/HydroPlantStorageKind.hpp b/CGMES_2.4.13_18DEC2013/HydroPlantStorageKind.hpp index ddd375110..c5894a490 100644 --- a/CGMES_2.4.13_18DEC2013/HydroPlantStorageKind.hpp +++ b/CGMES_2.4.13_18DEC2013/HydroPlantStorageKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The type of hydro power plant. - */ + /** \brief The type of hydro power plant. */ class HydroPlantStorageKind { public: enum HydroPlantStorageKind_ENUM { - /** - * Run of river. - */ + /** Run of river. */ runOfRiver, - /** - * Pumped storage. - */ + /** Pumped storage. */ pumpedStorage, - /** - * Storage. - */ + /** Storage. */ storage, }; diff --git a/CGMES_2.4.13_18DEC2013/HydroPowerPlant.cpp b/CGMES_2.4.13_18DEC2013/HydroPowerPlant.cpp index 9d0c8c562..ad177ac88 100644 --- a/CGMES_2.4.13_18DEC2013/HydroPowerPlant.cpp +++ b/CGMES_2.4.13_18DEC2013/HydroPowerPlant.cpp @@ -10,12 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "HydroGeneratingUnit.hpp" #include "HydroPump.hpp" -#include "HydroPlantStorageKind.hpp" using namespace CIMPP; -HydroPowerPlant::HydroPowerPlant() {}; -HydroPowerPlant::~HydroPowerPlant() {}; +HydroPowerPlant::HydroPowerPlant() {} +HydroPowerPlant::~HydroPowerPlant() {} static const std::list PossibleProfilesForClass = { @@ -44,21 +43,6 @@ HydroPowerPlant::getPossibleProfilesForAttributes() const return map; } - -bool assign_HydroPowerPlant_hydroPlantStorageType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (HydroPowerPlant* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->hydroPlantStorageType; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_HydroGeneratingUnit_HydroPowerPlant(BaseClass*, BaseClass*); bool assign_HydroPowerPlant_HydroGeneratingUnits(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -75,6 +59,7 @@ bool assign_HydroPowerPlant_HydroGeneratingUnits(BaseClass* BaseClass_ptr1, Base } return false; } + bool assign_HydroPump_HydroPowerPlant(BaseClass*, BaseClass*); bool assign_HydroPowerPlant_HydroPumps(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -92,11 +77,26 @@ bool assign_HydroPowerPlant_HydroPumps(BaseClass* BaseClass_ptr1, BaseClass* Bas return false; } +bool assign_HydroPowerPlant_hydroPlantStorageType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + HydroPowerPlant* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->hydroPlantStorageType; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + bool get_HydroPowerPlant_hydroPlantStorageType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const HydroPowerPlant* element = dynamic_cast(BaseClass_ptr1)) + const HydroPowerPlant* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hydroPlantStorageType; if (!buffer.str().empty()) @@ -116,18 +116,18 @@ const char* HydroPowerPlant::debugString() const void HydroPowerPlant::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:HydroPowerPlant"), &HydroPowerPlant_factory)); + factory_map.emplace("cim:HydroPowerPlant", &HydroPowerPlant_factory); } void HydroPowerPlant::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:HydroPowerPlant.hydroPlantStorageType"), &assign_HydroPowerPlant_hydroPlantStorageType)); + assign_map.emplace("cim:HydroPowerPlant.hydroPlantStorageType", &assign_HydroPowerPlant_hydroPlantStorageType); } void HydroPowerPlant::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:HydroPowerPlant.HydroGeneratingUnits"), &assign_HydroPowerPlant_HydroGeneratingUnits)); - assign_map.insert(std::make_pair(std::string("cim:HydroPowerPlant.HydroPumps"), &assign_HydroPowerPlant_HydroPumps)); + assign_map.emplace("cim:HydroPowerPlant.HydroGeneratingUnits", &assign_HydroPowerPlant_HydroGeneratingUnits); + assign_map.emplace("cim:HydroPowerPlant.HydroPumps", &assign_HydroPowerPlant_HydroPumps); } void HydroPowerPlant::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/HydroPowerPlant.hpp b/CGMES_2.4.13_18DEC2013/HydroPowerPlant.hpp index 71bb379b4..ab7712608 100644 --- a/CGMES_2.4.13_18DEC2013/HydroPowerPlant.hpp +++ b/CGMES_2.4.13_18DEC2013/HydroPowerPlant.hpp @@ -19,9 +19,7 @@ namespace CIMPP class HydroGeneratingUnit; class HydroPump; - /* - A hydro power station which can generate or pump. When generating, the generator turbines receive water from an upper reservoir. When pumping, the pumps receive their water from a lower reservoir. - */ + /** \brief A hydro power station which can generate or pump. When generating, the generator turbines receive water from an upper reservoir. When pumping, the pumps receive their water from a lower reservoir. */ class HydroPowerPlant : public PowerSystemResource { public: @@ -29,9 +27,14 @@ namespace CIMPP HydroPowerPlant(); ~HydroPowerPlant() override; - std::list HydroGeneratingUnits; /* The hydro generating unit belongs to a hydro power plant. Default: 0 */ - std::list HydroPumps; /* The hydro pump may be a member of a pumped storage plant or a pump for distributing water. Default: 0 */ - CIMPP::HydroPlantStorageKind hydroPlantStorageType; /* The type of hydro power plant water storage. Default: 0 */ + /** \brief The hydro generating unit belongs to a hydro power plant. Default: 0 */ + std::list HydroGeneratingUnits; + + /** \brief The hydro pump may be a member of a pumped storage plant or a pump for distributing water. Default: 0 */ + std::list HydroPumps; + + /** \brief The type of hydro power plant water storage. Default: 0 */ + CIMPP::HydroPlantStorageKind hydroPlantStorageType; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/HydroPump.cpp b/CGMES_2.4.13_18DEC2013/HydroPump.cpp index 698253b53..8d0613e79 100644 --- a/CGMES_2.4.13_18DEC2013/HydroPump.cpp +++ b/CGMES_2.4.13_18DEC2013/HydroPump.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -HydroPump::HydroPump() : HydroPowerPlant(nullptr), RotatingMachine(nullptr) {}; -HydroPump::~HydroPump() {}; +HydroPump::HydroPump() : HydroPowerPlant(nullptr), RotatingMachine(nullptr) {} +HydroPump::~HydroPump() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ HydroPump::getPossibleProfilesForAttributes() const return map; } - - bool assign_HydroPowerPlant_HydroPumps(BaseClass*, BaseClass*); bool assign_HydroPump_HydroPowerPlant(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_HydroPump_HydroPowerPlant(BaseClass* BaseClass_ptr1, BaseClass* Base } return false; } + bool assign_RotatingMachine_HydroPump(BaseClass*, BaseClass*); bool assign_HydroPump_RotatingMachine(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_HydroPump_RotatingMachine(BaseClass* BaseClass_ptr1, BaseClass* Base return false; } - bool get_HydroPump_HydroPowerPlant(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const HydroPump* element = dynamic_cast(BaseClass_ptr1)) + const HydroPump* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->HydroPowerPlant != 0) { @@ -93,7 +92,8 @@ bool get_HydroPump_HydroPowerPlant(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const HydroPump* element = dynamic_cast(BaseClass_ptr1)) + const HydroPump* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->RotatingMachine != 0) { @@ -104,7 +104,6 @@ bool get_HydroPump_RotatingMachine(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:HydroPump"), &HydroPump_factory)); + factory_map.emplace("cim:HydroPump", &HydroPump_factory); } void HydroPump::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void HydroPump::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:HydroPump.HydroPowerPlant"), &assign_HydroPump_HydroPowerPlant)); - assign_map.insert(std::make_pair(std::string("cim:HydroPump.RotatingMachine"), &assign_HydroPump_RotatingMachine)); + assign_map.emplace("cim:HydroPump.HydroPowerPlant", &assign_HydroPump_HydroPowerPlant); + assign_map.emplace("cim:HydroPump.RotatingMachine", &assign_HydroPump_RotatingMachine); } void HydroPump::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/HydroPump.hpp b/CGMES_2.4.13_18DEC2013/HydroPump.hpp index d744a3728..9830eee7a 100644 --- a/CGMES_2.4.13_18DEC2013/HydroPump.hpp +++ b/CGMES_2.4.13_18DEC2013/HydroPump.hpp @@ -18,9 +18,7 @@ namespace CIMPP class HydroPowerPlant; class RotatingMachine; - /* - A synchronous motor-driven pump, typically associated with a pumped storage plant. - */ + /** \brief A synchronous motor-driven pump, typically associated with a pumped storage plant. */ class HydroPump : public Equipment { public: @@ -28,8 +26,11 @@ namespace CIMPP HydroPump(); ~HydroPump() override; - CIMPP::HydroPowerPlant* HydroPowerPlant; /* The hydro pump may be a member of a pumped storage plant or a pump for distributing water. Default: 0 */ - CIMPP::RotatingMachine* RotatingMachine; /* The synchronous machine drives the turbine which moves the water from a low elevation to a higher elevation. The direction of machine rotation for pumping may or may not be the same as for generating. Default: 0 */ + /** \brief The hydro pump may be a member of a pumped storage plant or a pump for distributing water. Default: 0 */ + CIMPP::HydroPowerPlant* HydroPowerPlant; + + /** \brief The synchronous machine drives the turbine which moves the water from a low elevation to a higher elevation. The direction of machine rotation for pumping may or may not be the same as for generating. Default: 0 */ + CIMPP::RotatingMachine* RotatingMachine; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/IEC61970.hpp b/CGMES_2.4.13_18DEC2013/IEC61970.hpp index 32e9abca4..b7bd2b2c1 100644 --- a/CGMES_2.4.13_18DEC2013/IEC61970.hpp +++ b/CGMES_2.4.13_18DEC2013/IEC61970.hpp @@ -401,4 +401,5 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindType1or2UserDefined.hpp" #include "WindType3or4UserDefined.hpp" #include "UnknownType.hpp" -#endif \ No newline at end of file + +#endif diff --git a/CGMES_2.4.13_18DEC2013/IdentifiedObject.cpp b/CGMES_2.4.13_18DEC2013/IdentifiedObject.cpp index f9ebb00b4..b32ec2f29 100644 --- a/CGMES_2.4.13_18DEC2013/IdentifiedObject.cpp +++ b/CGMES_2.4.13_18DEC2013/IdentifiedObject.cpp @@ -9,16 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "DiagramObject.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -IdentifiedObject::IdentifiedObject() {}; -IdentifiedObject::~IdentifiedObject() {}; +IdentifiedObject::IdentifiedObject() {} +IdentifiedObject::~IdentifiedObject() {} static const std::list PossibleProfilesForClass = { @@ -58,93 +53,98 @@ IdentifiedObject::getPossibleProfilesForAttributes() const return map; } - -bool assign_IdentifiedObject_description(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramObject_IdentifiedObject(BaseClass*, BaseClass*); +bool assign_IdentifiedObject_DiagramObjects(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + DiagramObject* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - element->description = buffer.str(); - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->DiagramObjects.begin(), element->DiagramObjects.end(), element2) == element->DiagramObjects.end()) + { + element->DiagramObjects.push_back(element2); + return assign_DiagramObject_IdentifiedObject(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_IdentifiedObject_energyIdentCodeEic(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_IdentifiedObject_description(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - element->energyIdentCodeEic = buffer.str(); - if (buffer.fail()) - return false; - else + element->description = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_IdentifiedObject_mRID(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_IdentifiedObject_energyIdentCodeEic(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - element->mRID = buffer.str(); - if (buffer.fail()) - return false; - else + element->energyIdentCodeEic = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_IdentifiedObject_name(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_IdentifiedObject_mRID(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - element->name = buffer.str(); - if (buffer.fail()) - return false; - else + element->mRID = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_IdentifiedObject_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_IdentifiedObject_name(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - element->shortName = buffer.str(); - if (buffer.fail()) - return false; - else + element->name = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_DiagramObject_IdentifiedObject(BaseClass*, BaseClass*); -bool assign_IdentifiedObject_DiagramObjects(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_IdentifiedObject_shortName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); - DiagramObject* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->DiagramObjects.begin(), element->DiagramObjects.end(), element2) == element->DiagramObjects.end()) + element->shortName = buffer.str(); + if (!buffer.fail()) { - element->DiagramObjects.push_back(element2); - return assign_DiagramObject_IdentifiedObject(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_IdentifiedObject_description(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->description; if (!buffer.str().empty()) @@ -158,7 +158,8 @@ bool get_IdentifiedObject_description(const BaseClass* BaseClass_ptr1, std::stri bool get_IdentifiedObject_energyIdentCodeEic(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->energyIdentCodeEic; if (!buffer.str().empty()) @@ -172,7 +173,8 @@ bool get_IdentifiedObject_energyIdentCodeEic(const BaseClass* BaseClass_ptr1, st bool get_IdentifiedObject_mRID(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mRID; if (!buffer.str().empty()) @@ -186,7 +188,8 @@ bool get_IdentifiedObject_mRID(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_IdentifiedObject_name(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->name; if (!buffer.str().empty()) @@ -200,7 +203,8 @@ bool get_IdentifiedObject_name(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_IdentifiedObject_shortName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortName; if (!buffer.str().empty()) @@ -212,8 +216,6 @@ bool get_IdentifiedObject_shortName(const BaseClass* BaseClass_ptr1, std::string return false; } - - const char IdentifiedObject::debugName[] = "IdentifiedObject"; const char* IdentifiedObject::debugString() const { @@ -222,21 +224,21 @@ const char* IdentifiedObject::debugString() const void IdentifiedObject::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:IdentifiedObject"), &IdentifiedObject_factory)); + factory_map.emplace("cim:IdentifiedObject", &IdentifiedObject_factory); } void IdentifiedObject::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:IdentifiedObject.description"), &assign_IdentifiedObject_description)); - assign_map.insert(std::make_pair(std::string("cim:IdentifiedObject.energyIdentCodeEic"), &assign_IdentifiedObject_energyIdentCodeEic)); - assign_map.insert(std::make_pair(std::string("cim:IdentifiedObject.mRID"), &assign_IdentifiedObject_mRID)); - assign_map.insert(std::make_pair(std::string("cim:IdentifiedObject.name"), &assign_IdentifiedObject_name)); - assign_map.insert(std::make_pair(std::string("cim:IdentifiedObject.shortName"), &assign_IdentifiedObject_shortName)); + assign_map.emplace("cim:IdentifiedObject.description", &assign_IdentifiedObject_description); + assign_map.emplace("cim:IdentifiedObject.energyIdentCodeEic", &assign_IdentifiedObject_energyIdentCodeEic); + assign_map.emplace("cim:IdentifiedObject.mRID", &assign_IdentifiedObject_mRID); + assign_map.emplace("cim:IdentifiedObject.name", &assign_IdentifiedObject_name); + assign_map.emplace("cim:IdentifiedObject.shortName", &assign_IdentifiedObject_shortName); } void IdentifiedObject::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:IdentifiedObject.DiagramObjects"), &assign_IdentifiedObject_DiagramObjects)); + assign_map.emplace("cim:IdentifiedObject.DiagramObjects", &assign_IdentifiedObject_DiagramObjects); } void IdentifiedObject::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/IdentifiedObject.hpp b/CGMES_2.4.13_18DEC2013/IdentifiedObject.hpp index 833b37c67..315354196 100644 --- a/CGMES_2.4.13_18DEC2013/IdentifiedObject.hpp +++ b/CGMES_2.4.13_18DEC2013/IdentifiedObject.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class DiagramObject; - /* - This is a root class to provide common identification for all classes needing identification and naming attributes. - */ + /** \brief This is a root class to provide common identification for all classes needing identification and naming attributes. */ class IdentifiedObject : public BaseClass { public: @@ -28,12 +26,23 @@ namespace CIMPP IdentifiedObject(); ~IdentifiedObject() override; - std::list DiagramObjects; /* The domain object to which this diagram object is associated. Default: 0 */ - CIMPP::String description; /* The description is a free human readable text describing or naming the object. It may be non unique and may not correlate to a naming hierarchy. Default: '' */ - CIMPP::String energyIdentCodeEic; /* The attribute is used for an exchange of the EIC code (Energy identification Code). The length of the string is 16 characters as defined by the EIC code. References: Default: '' */ - CIMPP::String mRID; /* Master resource identifier issued by a model authority. The mRID must semantically be a UUID as specified in RFC 4122. The mRID is globally unique. For CIMXML data files in RDF syntax, the mRID is mapped to rdf:ID or rdf:about attributes that identify CIM object elements. Default: '' */ - CIMPP::String name; /* The name is any free human readable and possibly non unique text naming the object. Default: '' */ - CIMPP::String shortName; /* The attribute is used for an exchange of a human readable short name with length of the string 12 characters maximum. Default: '' */ + /** \brief The domain object to which this diagram object is associated. Default: 0 */ + std::list DiagramObjects; + + /** \brief The description is a free human readable text describing or naming the object. It may be non unique and may not correlate to a naming hierarchy. Default: '' */ + CIMPP::String description; + + /** \brief The attribute is used for an exchange of the EIC code (Energy identification Code). The length of the string is 16 characters as defined by the EIC code. References: Default: '' */ + CIMPP::String energyIdentCodeEic; + + /** \brief Master resource identifier issued by a model authority. The mRID must semantically be a UUID as specified in RFC 4122. The mRID is globally unique. For CIMXML data files in RDF syntax, the mRID is mapped to rdf:ID or rdf:about attributes that identify CIM object elements. Default: '' */ + CIMPP::String mRID; + + /** \brief The name is any free human readable and possibly non unique text naming the object. Default: '' */ + CIMPP::String name; + + /** \brief The attribute is used for an exchange of a human readable short name with length of the string 12 characters maximum. Default: '' */ + CIMPP::String shortName; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/IfdBaseKind.cpp b/CGMES_2.4.13_18DEC2013/IfdBaseKind.cpp index 06c6513c2..d0777efc8 100644 --- a/CGMES_2.4.13_18DEC2013/IfdBaseKind.cpp +++ b/CGMES_2.4.13_18DEC2013/IfdBaseKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "IfdBaseKind") + if (EnumSymbol.substr(0, pos) != "IfdBaseKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,22 +50,22 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "ifag") + if (EnumSymbol == "ifag") { rop = IfdBaseKind::ifag; return lop; } - if(EnumSymbol == "ifnl") + if (EnumSymbol == "ifnl") { rop = IfdBaseKind::ifnl; return lop; } - if(EnumSymbol == "iffl") + if (EnumSymbol == "iffl") { rop = IfdBaseKind::iffl; return lop; } - if(EnumSymbol == "other") + if (EnumSymbol == "other") { rop = IfdBaseKind::other; return lop; diff --git a/CGMES_2.4.13_18DEC2013/IfdBaseKind.hpp b/CGMES_2.4.13_18DEC2013/IfdBaseKind.hpp index 6938195f3..29c9e79cb 100644 --- a/CGMES_2.4.13_18DEC2013/IfdBaseKind.hpp +++ b/CGMES_2.4.13_18DEC2013/IfdBaseKind.hpp @@ -9,29 +9,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Excitation base system mode. - */ + /** \brief Excitation base system mode. */ class IfdBaseKind { public: enum IfdBaseKind_ENUM { - /** - * Air gap line mode. ifdBaseValue is computed, not defined by the user, in this mode. - */ + /** Air gap line mode. ifdBaseValue is computed, not defined by the user, in this mode. */ ifag, - /** - * No load system with saturation mode. ifdBaseValue is computed, not defined by the user, in this mode. - */ + /** No load system with saturation mode. ifdBaseValue is computed, not defined by the user, in this mode. */ ifnl, - /** - * Full load system mode. ifdBaseValue is computed, not defined by the user, in this mode. - */ + /** Full load system mode. ifdBaseValue is computed, not defined by the user, in this mode. */ iffl, - /** - * Free mode. ifdBaseValue is defined by the user in this mode. - */ + /** Free mode. ifdBaseValue is defined by the user in this mode. */ other, }; diff --git a/CGMES_2.4.13_18DEC2013/Inductance.hpp b/CGMES_2.4.13_18DEC2013/Inductance.hpp index 9d5005915..f9b404e47 100644 --- a/CGMES_2.4.13_18DEC2013/Inductance.hpp +++ b/CGMES_2.4.13_18DEC2013/Inductance.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Inductive part of reactance (imaginary part of impedance), at rated frequency. - */ + /** \brief Inductive part of reactance (imaginary part of impedance), at rated frequency. */ class Inductance { public: diff --git a/CGMES_2.4.13_18DEC2013/InductancePerLength.hpp b/CGMES_2.4.13_18DEC2013/InductancePerLength.hpp index 8ede31f20..49ea2eb9c 100644 --- a/CGMES_2.4.13_18DEC2013/InductancePerLength.hpp +++ b/CGMES_2.4.13_18DEC2013/InductancePerLength.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Inductance per unit of length. - */ + /** \brief Inductance per unit of length. */ class InductancePerLength { public: diff --git a/CGMES_2.4.13_18DEC2013/InputSignalKind.cpp b/CGMES_2.4.13_18DEC2013/InputSignalKind.cpp index fc207f2f1..454514c57 100644 --- a/CGMES_2.4.13_18DEC2013/InputSignalKind.cpp +++ b/CGMES_2.4.13_18DEC2013/InputSignalKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "InputSignalKind") + if (EnumSymbol.substr(0, pos) != "InputSignalKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,52 +50,52 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "rotorSpeed") + if (EnumSymbol == "rotorSpeed") { rop = InputSignalKind::rotorSpeed; return lop; } - if(EnumSymbol == "rotorAngularFrequencyDeviation") + if (EnumSymbol == "rotorAngularFrequencyDeviation") { rop = InputSignalKind::rotorAngularFrequencyDeviation; return lop; } - if(EnumSymbol == "busFrequency") + if (EnumSymbol == "busFrequency") { rop = InputSignalKind::busFrequency; return lop; } - if(EnumSymbol == "busFrequencyDeviation") + if (EnumSymbol == "busFrequencyDeviation") { rop = InputSignalKind::busFrequencyDeviation; return lop; } - if(EnumSymbol == "generatorElectricalPower") + if (EnumSymbol == "generatorElectricalPower") { rop = InputSignalKind::generatorElectricalPower; return lop; } - if(EnumSymbol == "generatorAcceleratingPower") + if (EnumSymbol == "generatorAcceleratingPower") { rop = InputSignalKind::generatorAcceleratingPower; return lop; } - if(EnumSymbol == "busVoltage") + if (EnumSymbol == "busVoltage") { rop = InputSignalKind::busVoltage; return lop; } - if(EnumSymbol == "busVoltageDerivative") + if (EnumSymbol == "busVoltageDerivative") { rop = InputSignalKind::busVoltageDerivative; return lop; } - if(EnumSymbol == "branchCurrent") + if (EnumSymbol == "branchCurrent") { rop = InputSignalKind::branchCurrent; return lop; } - if(EnumSymbol == "fieldCurrent") + if (EnumSymbol == "fieldCurrent") { rop = InputSignalKind::fieldCurrent; return lop; diff --git a/CGMES_2.4.13_18DEC2013/InputSignalKind.hpp b/CGMES_2.4.13_18DEC2013/InputSignalKind.hpp index 98b85d1f8..bad391db9 100644 --- a/CGMES_2.4.13_18DEC2013/InputSignalKind.hpp +++ b/CGMES_2.4.13_18DEC2013/InputSignalKind.hpp @@ -9,53 +9,31 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Input signal type. In Dynamics modelling, commonly represented by j parameter. - */ + /** \brief Input signal type. In Dynamics modelling, commonly represented by j parameter. */ class InputSignalKind { public: enum InputSignalKind_ENUM { - /** - * Input signal is rotor or shaft speed (angular frequency). - */ + /** Input signal is rotor or shaft speed (angular frequency). */ rotorSpeed, - /** - * Input signal is rotor or shaft angular frequency deviation. - */ + /** Input signal is rotor or shaft angular frequency deviation. */ rotorAngularFrequencyDeviation, - /** - * Input signal is bus voltage fr - */ + /** Input signal is bus voltage fr */ busFrequency, - /** - * Input signal is deviation of bus voltage frequ - */ + /** Input signal is deviation of bus voltage frequ */ busFrequencyDeviation, - /** - * Input signal is generator electrical power on rated S. - */ + /** Input signal is generator electrical power on rated S. */ generatorElectricalPower, - /** - * Input signal is generating accelerating power. - */ + /** Input signal is generating accelerating power. */ generatorAcceleratingPower, - /** - * Input signal - */ + /** Input signal */ busVoltage, - /** - * Input signal is derivative of bus voltag - */ + /** Input signal is derivative of bus voltag */ busVoltageDerivative, - /** - * Input signal is amplitude of remote branch current. - */ + /** Input signal is amplitude of remote branch current. */ branchCurrent, - /** - * Input signal is generator field current. - */ + /** Input signal is generator field current. */ fieldCurrent, }; diff --git a/CGMES_2.4.13_18DEC2013/Junction.cpp b/CGMES_2.4.13_18DEC2013/Junction.cpp index 765819a3f..cd2b7c69d 100644 --- a/CGMES_2.4.13_18DEC2013/Junction.cpp +++ b/CGMES_2.4.13_18DEC2013/Junction.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Junction::Junction() {}; -Junction::~Junction() {}; +Junction::Junction() {} +Junction::~Junction() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ Junction::getPossibleProfilesForAttributes() const return map; } - - - - - const char Junction::debugName[] = "Junction"; const char* Junction::debugString() const { @@ -52,7 +47,7 @@ const char* Junction::debugString() const void Junction::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Junction"), &Junction_factory)); + factory_map.emplace("cim:Junction", &Junction_factory); } void Junction::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/Junction.hpp b/CGMES_2.4.13_18DEC2013/Junction.hpp index 656b24ae0..4f48dfc33 100644 --- a/CGMES_2.4.13_18DEC2013/Junction.hpp +++ b/CGMES_2.4.13_18DEC2013/Junction.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A point where one or more conducting equipments are connected with zero resistance. - */ + /** \brief A point where one or more conducting equipments are connected with zero resistance. */ class Junction : public Connector { public: @@ -26,7 +24,6 @@ namespace CIMPP Junction(); ~Junction() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Length.hpp b/CGMES_2.4.13_18DEC2013/Length.hpp index f3f5c9403..fe5c38711 100644 --- a/CGMES_2.4.13_18DEC2013/Length.hpp +++ b/CGMES_2.4.13_18DEC2013/Length.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Unit of length. Never negative. - */ + /** \brief Unit of length. Never negative. */ class Length { public: diff --git a/CGMES_2.4.13_18DEC2013/Limit.cpp b/CGMES_2.4.13_18DEC2013/Limit.cpp index 66f178e53..a83eaee0d 100644 --- a/CGMES_2.4.13_18DEC2013/Limit.cpp +++ b/CGMES_2.4.13_18DEC2013/Limit.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Limit::Limit() {}; -Limit::~Limit() {}; +Limit::Limit() {} +Limit::~Limit() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ Limit::getPossibleProfilesForAttributes() const return map; } - - - - - const char Limit::debugName[] = "Limit"; const char* Limit::debugString() const { @@ -51,7 +46,7 @@ const char* Limit::debugString() const void Limit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Limit"), &Limit_factory)); + factory_map.emplace("cim:Limit", &Limit_factory); } void Limit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/Limit.hpp b/CGMES_2.4.13_18DEC2013/Limit.hpp index 1ea9636e1..76b2b4799 100644 --- a/CGMES_2.4.13_18DEC2013/Limit.hpp +++ b/CGMES_2.4.13_18DEC2013/Limit.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Specifies one limit value for a Measurement. A Measurement typically has several limits that are kept together by the LimitSet class. The actual meaning and use of a Limit instance (i.e., if it is an alarm or warning limit or if it is a high or low limit) is not captured in the Limit class. However the name of a Limit instance may indicate both meaning and use. - */ + /** \brief Specifies one limit value for a Measurement. A Measurement typically has several limits that are kept together by the LimitSet class. The actual meaning and use of a Limit instance (i.e., if it is an alarm or warning limit or if it is a high or low limit) is not captured in the Limit class. However the name of a Limit instance may indicate both meaning and use. */ class Limit : public IdentifiedObject { public: @@ -26,7 +24,6 @@ namespace CIMPP Limit(); ~Limit() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/LimitSet.cpp b/CGMES_2.4.13_18DEC2013/LimitSet.cpp index c7bd9742f..8288ba4ff 100644 --- a/CGMES_2.4.13_18DEC2013/LimitSet.cpp +++ b/CGMES_2.4.13_18DEC2013/LimitSet.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -LimitSet::LimitSet() {}; -LimitSet::~LimitSet() {}; +LimitSet::LimitSet() {} +LimitSet::~LimitSet() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ LimitSet::getPossibleProfilesForAttributes() const return map; } - - - - - const char LimitSet::debugName[] = "LimitSet"; const char* LimitSet::debugString() const { @@ -51,7 +46,7 @@ const char* LimitSet::debugString() const void LimitSet::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LimitSet"), &LimitSet_factory)); + factory_map.emplace("cim:LimitSet", &LimitSet_factory); } void LimitSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/LimitSet.hpp b/CGMES_2.4.13_18DEC2013/LimitSet.hpp index 78b9ea8ea..95be9de6f 100644 --- a/CGMES_2.4.13_18DEC2013/LimitSet.hpp +++ b/CGMES_2.4.13_18DEC2013/LimitSet.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Specifies a set of Limits that are associated with a Measurement. A Measurement may have several LimitSets corresponding to seasonal or other changing conditions. The condition is captured in the name and description attributes. The same LimitSet may be used for several Measurements. In particular percentage limits are used this way. - */ + /** \brief Specifies a set of Limits that are associated with a Measurement. A Measurement may have several LimitSets corresponding to seasonal or other changing conditions. The condition is captured in the name and description attributes. The same LimitSet may be used for several Measurements. In particular percentage limits are used this way. */ class LimitSet : public IdentifiedObject { public: @@ -26,7 +24,6 @@ namespace CIMPP LimitSet(); ~LimitSet() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/LimitTypeKind.cpp b/CGMES_2.4.13_18DEC2013/LimitTypeKind.cpp index d6bf93a42..52e511c3f 100644 --- a/CGMES_2.4.13_18DEC2013/LimitTypeKind.cpp +++ b/CGMES_2.4.13_18DEC2013/LimitTypeKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "LimitTypeKind") + if (EnumSymbol.substr(0, pos) != "LimitTypeKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,37 +50,37 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "patl") + if (EnumSymbol == "patl") { rop = LimitTypeKind::patl; return lop; } - if(EnumSymbol == "patlt") + if (EnumSymbol == "patlt") { rop = LimitTypeKind::patlt; return lop; } - if(EnumSymbol == "tatl") + if (EnumSymbol == "tatl") { rop = LimitTypeKind::tatl; return lop; } - if(EnumSymbol == "tc") + if (EnumSymbol == "tc") { rop = LimitTypeKind::tc; return lop; } - if(EnumSymbol == "tct") + if (EnumSymbol == "tct") { rop = LimitTypeKind::tct; return lop; } - if(EnumSymbol == "highVoltage") + if (EnumSymbol == "highVoltage") { rop = LimitTypeKind::highVoltage; return lop; } - if(EnumSymbol == "lowVoltage") + if (EnumSymbol == "lowVoltage") { rop = LimitTypeKind::lowVoltage; return lop; diff --git a/CGMES_2.4.13_18DEC2013/LimitTypeKind.hpp b/CGMES_2.4.13_18DEC2013/LimitTypeKind.hpp index c39c34dc4..a375dce64 100644 --- a/CGMES_2.4.13_18DEC2013/LimitTypeKind.hpp +++ b/CGMES_2.4.13_18DEC2013/LimitTypeKind.hpp @@ -9,41 +9,25 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The enumeration defines the kinds of the limit types. - */ + /** \brief The enumeration defines the kinds of the limit types. */ class LimitTypeKind { public: enum LimitTypeKind_ENUM { - /** - * The Permanent Admissible Transmission Loading (PATL) is the loading in Amps, MVA or MW that can be accepted by a network branch for an unlimited duration without any risk for the material. The duration attribute is not used and shall be excluded for the PATL limit type. Hence only one limit value exists for the PATL type. - */ + /** The Permanent Admissible Transmission Loading (PATL) is the loading in Amps, MVA or MW that can be accepted by a network branch for an unlimited duration without any risk for the material. The duration attribute is not used and shall be excluded for the PATL limit type. Hence only one limit value exists for the PATL type. */ patl, - /** - * Permanent Admissible Transmission Loading Threshold (PATLT) is a percentage less than 100 of the PATL type intended to alert operators of an arising condition. - */ + /** Permanent Admissible Transmission Loading Threshold (PATLT) is a percentage less than 100 of the PATL type intended to alert operators of an arising condition. */ patlt, - /** - * Temporarily Admissible Transmission Loading (TATL) which is the loading in Amps, MVA or MW that can be accepted by a branch for a certain limited duration. The TATL can be defined in different ways: Such a definition of TATL can depend on the initial operating conditions of the network element (sag situation of a line). The duration attribute can be used define several TATL limit types. Hence multiple TATL limit values may exist having different durations. - */ + /** Temporarily Admissible Transmission Loading (TATL) which is the loading in Amps, MVA or MW that can be accepted by a branch for a certain limited duration. The TATL can be defined in different ways: Such a definition of TATL can depend on the initial operating conditions of the network element (sag situation of a line). The duration attribute can be used define several TATL limit types. Hence multiple TATL limit values may exist having different durations. */ tatl, - /** - * Tripping Current (TC) is the ultimate intensity without any delay. It is defined as the threshold the line will trip without any possible remedial actions. The tripping of the network element is ordered by protections against short circuits or by overload protections, but in any case, the activation delay of these protections is not compatible with the reaction delay of an operator (less than one minute). The duration is always zero and the duration attribute may be left out. Hence only one limit value exists for the TC type. - */ + /** Tripping Current (TC) is the ultimate intensity without any delay. It is defined as the threshold the line will trip without any possible remedial actions. The tripping of the network element is ordered by protections against short circuits or by overload protections, but in any case, the activation delay of these protections is not compatible with the reaction delay of an operator (less than one minute). The duration is always zero and the duration attribute may be left out. Hence only one limit value exists for the TC type. */ tc, - /** - * Tripping Current Threshold (TCT) is a percentage less than 100 of the TC type intended to alert operators of an arising condition. - */ + /** Tripping Current Threshold (TCT) is a percentage less than 100 of the TC type intended to alert operators of an arising condition. */ tct, - /** - * Referring to the rating of the equipments, a voltage too high can lead to accelerated ageing or the destruction of the equipment. This limit type may or may not have duration. - */ + /** Referring to the rating of the equipments, a voltage too high can lead to accelerated ageing or the destruction of the equipment. This limit type may or may not have duration. */ highVoltage, - /** - * A too low voltage can disturb the normal operation of some protections and transformer equipped with on-load tap changers, electronic power devices or can affect the behaviour of the auxiliaries of generation units. This limit type may or may not have duration. - */ + /** A too low voltage can disturb the normal operation of some protections and transformer equipped with on-load tap changers, electronic power devices or can affect the behaviour of the auxiliaries of generation units. This limit type may or may not have duration. */ lowVoltage, }; diff --git a/CGMES_2.4.13_18DEC2013/Line.cpp b/CGMES_2.4.13_18DEC2013/Line.cpp index 7586ae9a9..098452102 100644 --- a/CGMES_2.4.13_18DEC2013/Line.cpp +++ b/CGMES_2.4.13_18DEC2013/Line.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Line::Line() : Region(nullptr) {}; -Line::~Line() {}; +Line::Line() : Region(nullptr) {} +Line::~Line() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ Line::getPossibleProfilesForAttributes() const return map; } - - bool assign_SubGeographicalRegion_Lines(BaseClass*, BaseClass*); bool assign_Line_Region(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,10 +58,10 @@ bool assign_Line_Region(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) return false; } - bool get_Line_Region(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Line* element = dynamic_cast(BaseClass_ptr1)) + const Line* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Region != 0) { @@ -74,7 +72,6 @@ bool get_Line_Region(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Line"), &Line_factory)); + factory_map.emplace("cim:Line", &Line_factory); } void Line::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -92,7 +89,7 @@ void Line::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Line.Region"), &assign_Line_Region)); + assign_map.emplace("cim:Line.Region", &assign_Line_Region); } void Line::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/Line.hpp b/CGMES_2.4.13_18DEC2013/Line.hpp index 54de53581..5a544c8ac 100644 --- a/CGMES_2.4.13_18DEC2013/Line.hpp +++ b/CGMES_2.4.13_18DEC2013/Line.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class SubGeographicalRegion; - /* - Contains equipment beyond a substation belonging to a power transmission line. - */ + /** \brief Contains equipment beyond a substation belonging to a power transmission line. */ class Line : public EquipmentContainer { public: @@ -27,7 +25,8 @@ namespace CIMPP Line(); ~Line() override; - CIMPP::SubGeographicalRegion* Region; /* The lines within the sub-geographical region. Default: 0 */ + /** \brief The lines within the sub-geographical region. Default: 0 */ + CIMPP::SubGeographicalRegion* Region; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/LinearShuntCompensator.cpp b/CGMES_2.4.13_18DEC2013/LinearShuntCompensator.cpp index ff44c5b0e..e8914787f 100644 --- a/CGMES_2.4.13_18DEC2013/LinearShuntCompensator.cpp +++ b/CGMES_2.4.13_18DEC2013/LinearShuntCompensator.cpp @@ -8,15 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Susceptance.hpp" -#include "Susceptance.hpp" -#include "Conductance.hpp" -#include "Conductance.hpp" using namespace CIMPP; -LinearShuntCompensator::LinearShuntCompensator() {}; -LinearShuntCompensator::~LinearShuntCompensator() {}; +LinearShuntCompensator::LinearShuntCompensator() {} +LinearShuntCompensator::~LinearShuntCompensator() {} static const std::list PossibleProfilesForClass = { @@ -47,64 +43,66 @@ LinearShuntCompensator::getPossibleProfilesForAttributes() const return map; } - -bool assign_LinearShuntCompensator_b0PerSection(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LinearShuntCompensator_b0PerSection(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b0PerSection; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LinearShuntCompensator_bPerSection(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LinearShuntCompensator_bPerSection(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bPerSection; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LinearShuntCompensator_g0PerSection(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LinearShuntCompensator_g0PerSection(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g0PerSection; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LinearShuntCompensator_gPerSection(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LinearShuntCompensator_gPerSection(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gPerSection; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_LinearShuntCompensator_b0PerSection(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b0PerSection; if (!buffer.str().empty()) @@ -118,7 +116,8 @@ bool get_LinearShuntCompensator_b0PerSection(const BaseClass* BaseClass_ptr1, st bool get_LinearShuntCompensator_bPerSection(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bPerSection; if (!buffer.str().empty()) @@ -132,7 +131,8 @@ bool get_LinearShuntCompensator_bPerSection(const BaseClass* BaseClass_ptr1, std bool get_LinearShuntCompensator_g0PerSection(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g0PerSection; if (!buffer.str().empty()) @@ -146,7 +146,8 @@ bool get_LinearShuntCompensator_g0PerSection(const BaseClass* BaseClass_ptr1, st bool get_LinearShuntCompensator_gPerSection(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gPerSection; if (!buffer.str().empty()) @@ -158,8 +159,6 @@ bool get_LinearShuntCompensator_gPerSection(const BaseClass* BaseClass_ptr1, std return false; } - - const char LinearShuntCompensator::debugName[] = "LinearShuntCompensator"; const char* LinearShuntCompensator::debugString() const { @@ -168,15 +167,15 @@ const char* LinearShuntCompensator::debugString() const void LinearShuntCompensator::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LinearShuntCompensator"), &LinearShuntCompensator_factory)); + factory_map.emplace("cim:LinearShuntCompensator", &LinearShuntCompensator_factory); } void LinearShuntCompensator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LinearShuntCompensator.b0PerSection"), &assign_LinearShuntCompensator_b0PerSection)); - assign_map.insert(std::make_pair(std::string("cim:LinearShuntCompensator.bPerSection"), &assign_LinearShuntCompensator_bPerSection)); - assign_map.insert(std::make_pair(std::string("cim:LinearShuntCompensator.g0PerSection"), &assign_LinearShuntCompensator_g0PerSection)); - assign_map.insert(std::make_pair(std::string("cim:LinearShuntCompensator.gPerSection"), &assign_LinearShuntCompensator_gPerSection)); + assign_map.emplace("cim:LinearShuntCompensator.b0PerSection", &assign_LinearShuntCompensator_b0PerSection); + assign_map.emplace("cim:LinearShuntCompensator.bPerSection", &assign_LinearShuntCompensator_bPerSection); + assign_map.emplace("cim:LinearShuntCompensator.g0PerSection", &assign_LinearShuntCompensator_g0PerSection); + assign_map.emplace("cim:LinearShuntCompensator.gPerSection", &assign_LinearShuntCompensator_gPerSection); } void LinearShuntCompensator::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/LinearShuntCompensator.hpp b/CGMES_2.4.13_18DEC2013/LinearShuntCompensator.hpp index 0ad76bec1..135910c4f 100644 --- a/CGMES_2.4.13_18DEC2013/LinearShuntCompensator.hpp +++ b/CGMES_2.4.13_18DEC2013/LinearShuntCompensator.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A linear shunt compensator has banks or sections with equal admittance values. - */ + /** \brief A linear shunt compensator has banks or sections with equal admittance values. */ class LinearShuntCompensator : public ShuntCompensator { public: @@ -28,10 +26,17 @@ namespace CIMPP LinearShuntCompensator(); ~LinearShuntCompensator() override; - CIMPP::Susceptance b0PerSection; /* Zero sequence shunt (charging) susceptance per section Default: nullptr */ - CIMPP::Susceptance bPerSection; /* Positive sequence shunt (charging) susceptance per section Default: nullptr */ - CIMPP::Conductance g0PerSection; /* Zero sequence shunt (charging) conductance per section Default: nullptr */ - CIMPP::Conductance gPerSection; /* Positive sequence shunt (charging) conductance per section Default: nullptr */ + /** \brief Zero sequence shunt (charging) susceptance per section Default: nullptr */ + CIMPP::Susceptance b0PerSection; + + /** \brief Positive sequence shunt (charging) susceptance per section Default: nullptr */ + CIMPP::Susceptance bPerSection; + + /** \brief Zero sequence shunt (charging) conductance per section Default: nullptr */ + CIMPP::Conductance g0PerSection; + + /** \brief Positive sequence shunt (charging) conductance per section Default: nullptr */ + CIMPP::Conductance gPerSection; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/LoadAggregate.cpp b/CGMES_2.4.13_18DEC2013/LoadAggregate.cpp index 1af1aac26..56bc69716 100644 --- a/CGMES_2.4.13_18DEC2013/LoadAggregate.cpp +++ b/CGMES_2.4.13_18DEC2013/LoadAggregate.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -LoadAggregate::LoadAggregate() : LoadMotor(nullptr), LoadStatic(nullptr) {}; -LoadAggregate::~LoadAggregate() {}; +LoadAggregate::LoadAggregate() : LoadMotor(nullptr), LoadStatic(nullptr) {} +LoadAggregate::~LoadAggregate() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ LoadAggregate::getPossibleProfilesForAttributes() const return map; } - - bool assign_LoadMotor_LoadAggregate(BaseClass*, BaseClass*); bool assign_LoadAggregate_LoadMotor(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_LoadAggregate_LoadMotor(BaseClass* BaseClass_ptr1, BaseClass* BaseCl } return false; } + bool assign_LoadStatic_LoadAggregate(BaseClass*, BaseClass*); bool assign_LoadAggregate_LoadStatic(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -87,7 +86,7 @@ const char* LoadAggregate::debugString() const void LoadAggregate::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadAggregate"), &LoadAggregate_factory)); + factory_map.emplace("cim:LoadAggregate", &LoadAggregate_factory); } void LoadAggregate::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -96,8 +95,8 @@ void LoadAggregate::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadAggregate.LoadMotor"), &assign_LoadAggregate_LoadMotor)); - assign_map.insert(std::make_pair(std::string("cim:LoadAggregate.LoadStatic"), &assign_LoadAggregate_LoadStatic)); + assign_map.emplace("cim:LoadAggregate.LoadMotor", &assign_LoadAggregate_LoadMotor); + assign_map.emplace("cim:LoadAggregate.LoadStatic", &assign_LoadAggregate_LoadStatic); } void LoadAggregate::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/LoadAggregate.hpp b/CGMES_2.4.13_18DEC2013/LoadAggregate.hpp index 510b51ab5..4fb10931d 100644 --- a/CGMES_2.4.13_18DEC2013/LoadAggregate.hpp +++ b/CGMES_2.4.13_18DEC2013/LoadAggregate.hpp @@ -18,9 +18,7 @@ namespace CIMPP class LoadMotor; class LoadStatic; - /* - Standard aggregate load model comprised of static and/or dynamic components. A static load model represents the sensitivity of the real and reactive power consumed by the load to the amplitude and frequency of the bus voltage. A dynamic load model can used to represent the aggregate response of the motor components of the load. - */ + /** \brief Standard aggregate load model comprised of static and/or dynamic components. A static load model represents the sensitivity of the real and reactive power consumed by the load to the amplitude and frequency of the bus voltage. A dynamic load model can used to represent the aggregate response of the motor components of the load. */ class LoadAggregate : public LoadDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP LoadAggregate(); ~LoadAggregate() override; - CIMPP::LoadMotor* LoadMotor; /* Aggregate motor (dynamic) load associated with this aggregate load. Default: 0 */ - CIMPP::LoadStatic* LoadStatic; /* Aggregate static load associated with this aggregate load. Default: 0 */ + /** \brief Aggregate motor (dynamic) load associated with this aggregate load. Default: 0 */ + CIMPP::LoadMotor* LoadMotor; + + /** \brief Aggregate static load associated with this aggregate load. Default: 0 */ + CIMPP::LoadStatic* LoadStatic; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/LoadArea.cpp b/CGMES_2.4.13_18DEC2013/LoadArea.cpp index 1e019fe74..8154b9035 100644 --- a/CGMES_2.4.13_18DEC2013/LoadArea.cpp +++ b/CGMES_2.4.13_18DEC2013/LoadArea.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -LoadArea::LoadArea() {}; -LoadArea::~LoadArea() {}; +LoadArea::LoadArea() {} +LoadArea::~LoadArea() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ LoadArea::getPossibleProfilesForAttributes() const return map; } - - bool assign_SubLoadArea_LoadArea(BaseClass*, BaseClass*); bool assign_LoadArea_SubLoadAreas(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_LoadArea_SubLoadAreas(BaseClass* BaseClass_ptr1, BaseClass* BaseClas } - const char LoadArea::debugName[] = "LoadArea"; const char* LoadArea::debugString() const { @@ -69,7 +66,7 @@ const char* LoadArea::debugString() const void LoadArea::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadArea"), &LoadArea_factory)); + factory_map.emplace("cim:LoadArea", &LoadArea_factory); } void LoadArea::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void LoadArea::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadArea.SubLoadAreas"), &assign_LoadArea_SubLoadAreas)); + assign_map.emplace("cim:LoadArea.SubLoadAreas", &assign_LoadArea_SubLoadAreas); } void LoadArea::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/LoadArea.hpp b/CGMES_2.4.13_18DEC2013/LoadArea.hpp index 90ea4d907..9142620cd 100644 --- a/CGMES_2.4.13_18DEC2013/LoadArea.hpp +++ b/CGMES_2.4.13_18DEC2013/LoadArea.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class SubLoadArea; - /* - The class is the root or first level in a hierarchical structure for grouping of loads for the purpose of load flow load scaling. - */ + /** \brief The class is the root or first level in a hierarchical structure for grouping of loads for the purpose of load flow load scaling. */ class LoadArea : public EnergyArea { public: @@ -27,7 +25,8 @@ namespace CIMPP LoadArea(); ~LoadArea() override; - std::list SubLoadAreas; /* The SubLoadAreas in the LoadArea. Default: 0 */ + /** \brief The SubLoadAreas in the LoadArea. Default: 0 */ + std::list SubLoadAreas; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/LoadBreakSwitch.cpp b/CGMES_2.4.13_18DEC2013/LoadBreakSwitch.cpp index 2562f5898..881f3cd8a 100644 --- a/CGMES_2.4.13_18DEC2013/LoadBreakSwitch.cpp +++ b/CGMES_2.4.13_18DEC2013/LoadBreakSwitch.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -LoadBreakSwitch::LoadBreakSwitch() {}; -LoadBreakSwitch::~LoadBreakSwitch() {}; +LoadBreakSwitch::LoadBreakSwitch() {} +LoadBreakSwitch::~LoadBreakSwitch() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ LoadBreakSwitch::getPossibleProfilesForAttributes() const return map; } - - - - - const char LoadBreakSwitch::debugName[] = "LoadBreakSwitch"; const char* LoadBreakSwitch::debugString() const { @@ -52,7 +47,7 @@ const char* LoadBreakSwitch::debugString() const void LoadBreakSwitch::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadBreakSwitch"), &LoadBreakSwitch_factory)); + factory_map.emplace("cim:LoadBreakSwitch", &LoadBreakSwitch_factory); } void LoadBreakSwitch::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/LoadBreakSwitch.hpp b/CGMES_2.4.13_18DEC2013/LoadBreakSwitch.hpp index 4af01750e..e6c20cc50 100644 --- a/CGMES_2.4.13_18DEC2013/LoadBreakSwitch.hpp +++ b/CGMES_2.4.13_18DEC2013/LoadBreakSwitch.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A mechanical switching device capable of making, carrying, and breaking currents under normal operating conditions. - */ + /** \brief A mechanical switching device capable of making, carrying, and breaking currents under normal operating conditions. */ class LoadBreakSwitch : public ProtectedSwitch { public: @@ -26,7 +24,6 @@ namespace CIMPP LoadBreakSwitch(); ~LoadBreakSwitch() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/LoadComposite.cpp b/CGMES_2.4.13_18DEC2013/LoadComposite.cpp index bf3d70d0c..3502dc5ba 100644 --- a/CGMES_2.4.13_18DEC2013/LoadComposite.cpp +++ b/CGMES_2.4.13_18DEC2013/LoadComposite.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -LoadComposite::LoadComposite() {}; -LoadComposite::~LoadComposite() {}; +LoadComposite::LoadComposite() {} +LoadComposite::~LoadComposite() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ LoadComposite::getPossibleProfilesForAttributes() const return map; } - -bool assign_LoadComposite_epfd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_epfd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->epfd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_epfs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_epfs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->epfs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_epvd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_epvd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->epvd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_epvs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_epvs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->epvs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_eqfd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_eqfd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eqfd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_eqfs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_eqfs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eqfs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_eqvd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_eqvd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eqvd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_eqvs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_eqvs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eqvs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_h(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_h(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->h; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_lfrac(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_lfrac(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lfrac; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_pfrac(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_pfrac(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pfrac; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_LoadComposite_epfd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->epfd; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_LoadComposite_epfd(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_LoadComposite_epfs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->epfs; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_LoadComposite_epfs(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_LoadComposite_epvd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->epvd; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_LoadComposite_epvd(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_LoadComposite_epvs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->epvs; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_LoadComposite_epvs(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_LoadComposite_eqfd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eqfd; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_LoadComposite_eqfd(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_LoadComposite_eqfs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eqfs; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_LoadComposite_eqfs(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_LoadComposite_eqvd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eqvd; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_LoadComposite_eqvd(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_LoadComposite_eqvs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eqvs; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_LoadComposite_eqvs(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_LoadComposite_h(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->h; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_LoadComposite_h(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_LoadComposite_lfrac(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lfrac; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_LoadComposite_lfrac(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_LoadComposite_pfrac(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pfrac; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_LoadComposite_pfrac(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char LoadComposite::debugName[] = "LoadComposite"; const char* LoadComposite::debugString() const { @@ -370,22 +376,22 @@ const char* LoadComposite::debugString() const void LoadComposite::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadComposite"), &LoadComposite_factory)); + factory_map.emplace("cim:LoadComposite", &LoadComposite_factory); } void LoadComposite::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.epfd"), &assign_LoadComposite_epfd)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.epfs"), &assign_LoadComposite_epfs)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.epvd"), &assign_LoadComposite_epvd)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.epvs"), &assign_LoadComposite_epvs)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.eqfd"), &assign_LoadComposite_eqfd)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.eqfs"), &assign_LoadComposite_eqfs)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.eqvd"), &assign_LoadComposite_eqvd)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.eqvs"), &assign_LoadComposite_eqvs)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.h"), &assign_LoadComposite_h)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.lfrac"), &assign_LoadComposite_lfrac)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.pfrac"), &assign_LoadComposite_pfrac)); + assign_map.emplace("cim:LoadComposite.epfd", &assign_LoadComposite_epfd); + assign_map.emplace("cim:LoadComposite.epfs", &assign_LoadComposite_epfs); + assign_map.emplace("cim:LoadComposite.epvd", &assign_LoadComposite_epvd); + assign_map.emplace("cim:LoadComposite.epvs", &assign_LoadComposite_epvs); + assign_map.emplace("cim:LoadComposite.eqfd", &assign_LoadComposite_eqfd); + assign_map.emplace("cim:LoadComposite.eqfs", &assign_LoadComposite_eqfs); + assign_map.emplace("cim:LoadComposite.eqvd", &assign_LoadComposite_eqvd); + assign_map.emplace("cim:LoadComposite.eqvs", &assign_LoadComposite_eqvs); + assign_map.emplace("cim:LoadComposite.h", &assign_LoadComposite_h); + assign_map.emplace("cim:LoadComposite.lfrac", &assign_LoadComposite_lfrac); + assign_map.emplace("cim:LoadComposite.pfrac", &assign_LoadComposite_pfrac); } void LoadComposite::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/LoadComposite.hpp b/CGMES_2.4.13_18DEC2013/LoadComposite.hpp index 9ed68bc0c..37bbc8ac6 100644 --- a/CGMES_2.4.13_18DEC2013/LoadComposite.hpp +++ b/CGMES_2.4.13_18DEC2013/LoadComposite.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - This models combines static load and induction motor load effects. The dynamics of the motor are simplified by linearizing the induction machine equations. - */ + /** \brief This models combines static load and induction motor load effects. The dynamics of the motor are simplified by linearizing the induction machine equations. */ class LoadComposite : public LoadDynamics { public: @@ -28,17 +26,38 @@ namespace CIMPP LoadComposite(); ~LoadComposite() override; - CIMPP::Simple_Float epfd; /* Active load-frequency dependence index (dynamic) (Epfd). Typical Value = 1.5. Default: nullptr */ - CIMPP::Simple_Float epfs; /* Active load-frequency dependence index (static) (Epfs). Typical Value = 1.5. Default: nullptr */ - CIMPP::Simple_Float epvd; /* Active load-voltage dependence index (dynamic) (Epvd). Typical Value = 0.7. Default: nullptr */ - CIMPP::Simple_Float epvs; /* Active load-voltage dependence index (static) (Epvs). Typical Value = 0.7. Default: nullptr */ - CIMPP::Simple_Float eqfd; /* Reactive load-frequency dependence index (dynamic) (Eqfd). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float eqfs; /* Reactive load-frequency dependence index (static) (Eqfs). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float eqvd; /* Reactive load-voltage dependence index (dynamic) (Eqvd). Typical Value = 2. Default: nullptr */ - CIMPP::Simple_Float eqvs; /* Reactive load-voltage dependence index (static) (Eqvs). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds h; /* Inertia constant (H). Typical Value = 2.5. Default: nullptr */ - CIMPP::Simple_Float lfrac; /* Loading factor - ratio of initial P to motor MVA base (Lfrac). Typical Value = 0.8. Default: nullptr */ - CIMPP::Simple_Float pfrac; /* Fraction of constant-power load to be represented by this motor model (Pfrac) (>=0.0 and <=1.0). Typical Value = 0.5. Default: nullptr */ + /** \brief Active load-frequency dependence index (dynamic) (Epfd). Typical Value = 1.5. Default: nullptr */ + CIMPP::Simple_Float epfd; + + /** \brief Active load-frequency dependence index (static) (Epfs). Typical Value = 1.5. Default: nullptr */ + CIMPP::Simple_Float epfs; + + /** \brief Active load-voltage dependence index (dynamic) (Epvd). Typical Value = 0.7. Default: nullptr */ + CIMPP::Simple_Float epvd; + + /** \brief Active load-voltage dependence index (static) (Epvs). Typical Value = 0.7. Default: nullptr */ + CIMPP::Simple_Float epvs; + + /** \brief Reactive load-frequency dependence index (dynamic) (Eqfd). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float eqfd; + + /** \brief Reactive load-frequency dependence index (static) (Eqfs). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float eqfs; + + /** \brief Reactive load-voltage dependence index (dynamic) (Eqvd). Typical Value = 2. Default: nullptr */ + CIMPP::Simple_Float eqvd; + + /** \brief Reactive load-voltage dependence index (static) (Eqvs). Typical Value = 2. Default: nullptr */ + CIMPP::Simple_Float eqvs; + + /** \brief Inertia constant (H). Typical Value = 2.5. Default: nullptr */ + CIMPP::Seconds h; + + /** \brief Loading factor - ratio of initial P to motor MVA base (Lfrac). Typical Value = 0.8. Default: nullptr */ + CIMPP::Simple_Float lfrac; + + /** \brief Fraction of constant-power load to be represented by this motor model (Pfrac) (>=0.0 and <=1.0). Typical Value = 0.5. Default: nullptr */ + CIMPP::Simple_Float pfrac; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/LoadDynamics.cpp b/CGMES_2.4.13_18DEC2013/LoadDynamics.cpp index 0907fb345..35cf6f647 100644 --- a/CGMES_2.4.13_18DEC2013/LoadDynamics.cpp +++ b/CGMES_2.4.13_18DEC2013/LoadDynamics.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -LoadDynamics::LoadDynamics() {}; -LoadDynamics::~LoadDynamics() {}; +LoadDynamics::LoadDynamics() {} +LoadDynamics::~LoadDynamics() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ LoadDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_EnergyConsumer_LoadDynamics(BaseClass*, BaseClass*); bool assign_LoadDynamics_EnergyConsumer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_LoadDynamics_EnergyConsumer(BaseClass* BaseClass_ptr1, BaseClass* Ba } - const char LoadDynamics::debugName[] = "LoadDynamics"; const char* LoadDynamics::debugString() const { @@ -69,7 +66,7 @@ const char* LoadDynamics::debugString() const void LoadDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadDynamics"), &LoadDynamics_factory)); + factory_map.emplace("cim:LoadDynamics", &LoadDynamics_factory); } void LoadDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void LoadDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadDynamics.EnergyConsumer"), &assign_LoadDynamics_EnergyConsumer)); + assign_map.emplace("cim:LoadDynamics.EnergyConsumer", &assign_LoadDynamics_EnergyConsumer); } void LoadDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/LoadDynamics.hpp b/CGMES_2.4.13_18DEC2013/LoadDynamics.hpp index 35a9d29f8..ffaa8be53 100644 --- a/CGMES_2.4.13_18DEC2013/LoadDynamics.hpp +++ b/CGMES_2.4.13_18DEC2013/LoadDynamics.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class EnergyConsumer; - /* - Load whose behaviour is described by reference to a standard model A standard feature of dynamic load behaviour modelling is the ability to associate the same behaviour to multiple energy consumers by means of a single aggregate load definition. Aggregate loads are used to represent all or part of the real and reactive load from one or more loads in the static (power flow) data. This load is usually the aggregation of many individual load devices and the load model is approximate representation of the aggregate response of the load devices to system disturbances. The load model is always applied to individual bus loads (energy consumers) but a single set of load model parameters can used for all loads in the grouping. - */ + /** \brief Load whose behaviour is described by reference to a standard model A standard feature of dynamic load behaviour modelling is the ability to associate the same behaviour to multiple energy consumers by means of a single aggregate load definition. Aggregate loads are used to represent all or part of the real and reactive load from one or more loads in the static (power flow) data. This load is usually the aggregation of many individual load devices and the load model is approximate representation of the aggregate response of the load devices to system disturbances. The load model is always applied to individual bus loads (energy consumers) but a single set of load model parameters can used for all loads in the grouping. */ class LoadDynamics : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP LoadDynamics(); ~LoadDynamics() override; - std::list EnergyConsumer; /* Energy consumer to which this dynamics load model applies. Default: 0 */ + /** \brief Energy consumer to which this dynamics load model applies. Default: 0 */ + std::list EnergyConsumer; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/LoadGenericNonLinear.cpp b/CGMES_2.4.13_18DEC2013/LoadGenericNonLinear.cpp index e0e5491ff..9bae002fa 100644 --- a/CGMES_2.4.13_18DEC2013/LoadGenericNonLinear.cpp +++ b/CGMES_2.4.13_18DEC2013/LoadGenericNonLinear.cpp @@ -8,20 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "GenericNonLinearLoadModelKind.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -LoadGenericNonLinear::LoadGenericNonLinear() {}; -LoadGenericNonLinear::~LoadGenericNonLinear() {}; +LoadGenericNonLinear::LoadGenericNonLinear() {} +LoadGenericNonLinear::~LoadGenericNonLinear() {} static const std::list PossibleProfilesForClass = { @@ -56,129 +47,136 @@ LoadGenericNonLinear::getPossibleProfilesForAttributes() const return map; } - -bool assign_LoadGenericNonLinear_bs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadGenericNonLinear_bs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadGenericNonLinear_bt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadGenericNonLinear_bt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadGenericNonLinear_genericNonLinearLoadModelType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadGenericNonLinear_genericNonLinearLoadModelType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->genericNonLinearLoadModelType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadGenericNonLinear_ls(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadGenericNonLinear_ls(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ls; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadGenericNonLinear_lt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadGenericNonLinear_lt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadGenericNonLinear_pt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadGenericNonLinear_pt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadGenericNonLinear_qt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadGenericNonLinear_qt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadGenericNonLinear_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadGenericNonLinear_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadGenericNonLinear_tq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadGenericNonLinear_tq(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tq; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_LoadGenericNonLinear_bs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bs; if (!buffer.str().empty()) @@ -192,7 +190,8 @@ bool get_LoadGenericNonLinear_bs(const BaseClass* BaseClass_ptr1, std::stringstr bool get_LoadGenericNonLinear_bt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bt; if (!buffer.str().empty()) @@ -204,9 +203,25 @@ bool get_LoadGenericNonLinear_bt(const BaseClass* BaseClass_ptr1, std::stringstr return false; } +bool get_LoadGenericNonLinear_genericNonLinearLoadModelType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->genericNonLinearLoadModelType; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_LoadGenericNonLinear_ls(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ls; if (!buffer.str().empty()) @@ -220,7 +235,8 @@ bool get_LoadGenericNonLinear_ls(const BaseClass* BaseClass_ptr1, std::stringstr bool get_LoadGenericNonLinear_lt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lt; if (!buffer.str().empty()) @@ -234,7 +250,8 @@ bool get_LoadGenericNonLinear_lt(const BaseClass* BaseClass_ptr1, std::stringstr bool get_LoadGenericNonLinear_pt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pt; if (!buffer.str().empty()) @@ -248,7 +265,8 @@ bool get_LoadGenericNonLinear_pt(const BaseClass* BaseClass_ptr1, std::stringstr bool get_LoadGenericNonLinear_qt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qt; if (!buffer.str().empty()) @@ -262,7 +280,8 @@ bool get_LoadGenericNonLinear_qt(const BaseClass* BaseClass_ptr1, std::stringstr bool get_LoadGenericNonLinear_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -276,7 +295,8 @@ bool get_LoadGenericNonLinear_tp(const BaseClass* BaseClass_ptr1, std::stringstr bool get_LoadGenericNonLinear_tq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tq; if (!buffer.str().empty()) @@ -288,22 +308,6 @@ bool get_LoadGenericNonLinear_tq(const BaseClass* BaseClass_ptr1, std::stringstr return false; } - - -bool get_LoadGenericNonLinear_genericNonLinearLoadModelType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->genericNonLinearLoadModelType; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char LoadGenericNonLinear::debugName[] = "LoadGenericNonLinear"; const char* LoadGenericNonLinear::debugString() const { @@ -312,20 +316,20 @@ const char* LoadGenericNonLinear::debugString() const void LoadGenericNonLinear::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear"), &LoadGenericNonLinear_factory)); + factory_map.emplace("cim:LoadGenericNonLinear", &LoadGenericNonLinear_factory); } void LoadGenericNonLinear::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear.bs"), &assign_LoadGenericNonLinear_bs)); - assign_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear.bt"), &assign_LoadGenericNonLinear_bt)); - assign_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear.genericNonLinearLoadModelType"), &assign_LoadGenericNonLinear_genericNonLinearLoadModelType)); - assign_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear.ls"), &assign_LoadGenericNonLinear_ls)); - assign_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear.lt"), &assign_LoadGenericNonLinear_lt)); - assign_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear.pt"), &assign_LoadGenericNonLinear_pt)); - assign_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear.qt"), &assign_LoadGenericNonLinear_qt)); - assign_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear.tp"), &assign_LoadGenericNonLinear_tp)); - assign_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear.tq"), &assign_LoadGenericNonLinear_tq)); + assign_map.emplace("cim:LoadGenericNonLinear.bs", &assign_LoadGenericNonLinear_bs); + assign_map.emplace("cim:LoadGenericNonLinear.bt", &assign_LoadGenericNonLinear_bt); + assign_map.emplace("cim:LoadGenericNonLinear.genericNonLinearLoadModelType", &assign_LoadGenericNonLinear_genericNonLinearLoadModelType); + assign_map.emplace("cim:LoadGenericNonLinear.ls", &assign_LoadGenericNonLinear_ls); + assign_map.emplace("cim:LoadGenericNonLinear.lt", &assign_LoadGenericNonLinear_lt); + assign_map.emplace("cim:LoadGenericNonLinear.pt", &assign_LoadGenericNonLinear_pt); + assign_map.emplace("cim:LoadGenericNonLinear.qt", &assign_LoadGenericNonLinear_qt); + assign_map.emplace("cim:LoadGenericNonLinear.tp", &assign_LoadGenericNonLinear_tp); + assign_map.emplace("cim:LoadGenericNonLinear.tq", &assign_LoadGenericNonLinear_tq); } void LoadGenericNonLinear::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/LoadGenericNonLinear.hpp b/CGMES_2.4.13_18DEC2013/LoadGenericNonLinear.hpp index 4a840e93b..c291b52e3 100644 --- a/CGMES_2.4.13_18DEC2013/LoadGenericNonLinear.hpp +++ b/CGMES_2.4.13_18DEC2013/LoadGenericNonLinear.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - These load models (known also as generic non-linear dynamic (GNLD) load models) can be used in mid-term and long-term voltage stability simulations (i.e., to study voltage collapse), as they can replace a more detailed representation of aggregate load, including induction motors, thermostatically controlled and static loads. - */ + /** \brief These load models (known also as generic non-linear dynamic (GNLD) load models) can be used in mid-term and long-term voltage stability simulations (i.e., to study voltage collapse), as they can replace a more detailed representation of aggregate load, including induction motors, thermostatically controlled and static loads. */ class LoadGenericNonLinear : public LoadDynamics { public: @@ -29,15 +27,32 @@ namespace CIMPP LoadGenericNonLinear(); ~LoadGenericNonLinear() override; - CIMPP::Simple_Float bs; /* Steady state voltage index for reactive power (BS). Default: nullptr */ - CIMPP::Simple_Float bt; /* Transient voltage index for reactive power (BT). Default: nullptr */ - CIMPP::GenericNonLinearLoadModelKind genericNonLinearLoadModelType; /* Type of generic non-linear load model. Default: 0 */ - CIMPP::Simple_Float ls; /* Steady state voltage index for active power (LS). Default: nullptr */ - CIMPP::Simple_Float lt; /* Transient voltage index for active power (LT). Default: nullptr */ - CIMPP::Simple_Float pt; /* Dynamic portion of active load (P). Default: nullptr */ - CIMPP::Simple_Float qt; /* Dynamic portion of reactive load (Q). Default: nullptr */ - CIMPP::Seconds tp; /* Time constant of lag function of active power (T). Default: nullptr */ - CIMPP::Seconds tq; /* Time constant of lag function of reactive power (T). Default: nullptr */ + /** \brief Steady state voltage index for reactive power (BS). Default: nullptr */ + CIMPP::Simple_Float bs; + + /** \brief Transient voltage index for reactive power (BT). Default: nullptr */ + CIMPP::Simple_Float bt; + + /** \brief Type of generic non-linear load model. Default: 0 */ + CIMPP::GenericNonLinearLoadModelKind genericNonLinearLoadModelType; + + /** \brief Steady state voltage index for active power (LS). Default: nullptr */ + CIMPP::Simple_Float ls; + + /** \brief Transient voltage index for active power (LT). Default: nullptr */ + CIMPP::Simple_Float lt; + + /** \brief Dynamic portion of active load (P). Default: nullptr */ + CIMPP::Simple_Float pt; + + /** \brief Dynamic portion of reactive load (Q). Default: nullptr */ + CIMPP::Simple_Float qt; + + /** \brief Time constant of lag function of active power (T). Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Time constant of lag function of reactive power (T). Default: nullptr */ + CIMPP::Seconds tq; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/LoadGroup.cpp b/CGMES_2.4.13_18DEC2013/LoadGroup.cpp index 7580cae1b..142619bf7 100644 --- a/CGMES_2.4.13_18DEC2013/LoadGroup.cpp +++ b/CGMES_2.4.13_18DEC2013/LoadGroup.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -LoadGroup::LoadGroup() : SubLoadArea(nullptr) {}; -LoadGroup::~LoadGroup() {}; +LoadGroup::LoadGroup() : SubLoadArea(nullptr) {} +LoadGroup::~LoadGroup() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ LoadGroup::getPossibleProfilesForAttributes() const return map; } - - bool assign_SubLoadArea_LoadGroups(BaseClass*, BaseClass*); bool assign_LoadGroup_SubLoadArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_LoadGroup_SubLoadArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClas return false; } - bool get_LoadGroup_SubLoadArea(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const LoadGroup* element = dynamic_cast(BaseClass_ptr1)) + const LoadGroup* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->SubLoadArea != 0) { @@ -73,7 +71,6 @@ bool get_LoadGroup_SubLoadArea(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadGroup"), &LoadGroup_factory)); + factory_map.emplace("cim:LoadGroup", &LoadGroup_factory); } void LoadGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void LoadGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadGroup.SubLoadArea"), &assign_LoadGroup_SubLoadArea)); + assign_map.emplace("cim:LoadGroup.SubLoadArea", &assign_LoadGroup_SubLoadArea); } void LoadGroup::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/LoadGroup.hpp b/CGMES_2.4.13_18DEC2013/LoadGroup.hpp index 2e6a4a9b8..d0fa3dd27 100644 --- a/CGMES_2.4.13_18DEC2013/LoadGroup.hpp +++ b/CGMES_2.4.13_18DEC2013/LoadGroup.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class SubLoadArea; - /* - The class is the third level in a hierarchical structure for grouping of loads for the purpose of load flow load scaling. - */ + /** \brief The class is the third level in a hierarchical structure for grouping of loads for the purpose of load flow load scaling. */ class LoadGroup : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP LoadGroup(); ~LoadGroup() override; - CIMPP::SubLoadArea* SubLoadArea; /* The SubLoadArea where the Loadgroup belongs. Default: 0 */ + /** \brief The SubLoadArea where the Loadgroup belongs. Default: 0 */ + CIMPP::SubLoadArea* SubLoadArea; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/LoadMotor.cpp b/CGMES_2.4.13_18DEC2013/LoadMotor.cpp index 34d7be7a5..b1eddcd2a 100644 --- a/CGMES_2.4.13_18DEC2013/LoadMotor.cpp +++ b/CGMES_2.4.13_18DEC2013/LoadMotor.cpp @@ -9,24 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "LoadAggregate.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" using namespace CIMPP; -LoadMotor::LoadMotor() : LoadAggregate(nullptr) {}; -LoadMotor::~LoadMotor() {}; +LoadMotor::LoadMotor() : LoadAggregate(nullptr) {} +LoadMotor::~LoadMotor() {} static const std::list PossibleProfilesForClass = { @@ -66,197 +53,223 @@ LoadMotor::getPossibleProfilesForAttributes() const return map; } +bool assign_LoadAggregate_LoadMotor(BaseClass*, BaseClass*); +bool assign_LoadMotor_LoadAggregate(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + LoadAggregate* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->LoadAggregate != element2) + { + element->LoadAggregate = element2; + return assign_LoadAggregate_LoadMotor(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_LoadMotor_d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_d(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->d; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_h(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_h(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->h; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_lfac(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_lfac(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lfac; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_lp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_lp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_lpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_lpp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lpp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_ls(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_ls(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ls; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_pfrac(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_pfrac(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pfrac; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_ra(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_ra(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ra; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_tbkr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_tbkr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tbkr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_tpo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_tpo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_tppo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_tppo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tppo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_tv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_tv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_vt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_vt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_LoadAggregate_LoadMotor(BaseClass*, BaseClass*); -bool assign_LoadMotor_LoadAggregate(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_LoadMotor_LoadAggregate(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - LoadMotor* element = dynamic_cast(BaseClass_ptr1); - LoadAggregate* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->LoadAggregate != element2) + if (element->LoadAggregate != 0) { - element->LoadAggregate = element2; - return assign_LoadAggregate_LoadMotor(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->LoadAggregate); + return true; } - return true; } return false; } bool get_LoadMotor_d(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->d; if (!buffer.str().empty()) @@ -270,7 +283,8 @@ bool get_LoadMotor_d(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_LoadMotor_h(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->h; if (!buffer.str().empty()) @@ -284,7 +298,8 @@ bool get_LoadMotor_h(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_LoadMotor_lfac(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lfac; if (!buffer.str().empty()) @@ -298,7 +313,8 @@ bool get_LoadMotor_lfac(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadMotor_lp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lp; if (!buffer.str().empty()) @@ -312,7 +328,8 @@ bool get_LoadMotor_lp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_LoadMotor_lpp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lpp; if (!buffer.str().empty()) @@ -326,7 +343,8 @@ bool get_LoadMotor_lpp(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_LoadMotor_ls(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ls; if (!buffer.str().empty()) @@ -340,7 +358,8 @@ bool get_LoadMotor_ls(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_LoadMotor_pfrac(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pfrac; if (!buffer.str().empty()) @@ -354,7 +373,8 @@ bool get_LoadMotor_pfrac(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_LoadMotor_ra(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ra; if (!buffer.str().empty()) @@ -368,7 +388,8 @@ bool get_LoadMotor_ra(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_LoadMotor_tbkr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tbkr; if (!buffer.str().empty()) @@ -382,7 +403,8 @@ bool get_LoadMotor_tbkr(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadMotor_tpo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpo; if (!buffer.str().empty()) @@ -396,7 +418,8 @@ bool get_LoadMotor_tpo(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_LoadMotor_tppo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tppo; if (!buffer.str().empty()) @@ -410,7 +433,8 @@ bool get_LoadMotor_tppo(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadMotor_tv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tv; if (!buffer.str().empty()) @@ -424,7 +448,8 @@ bool get_LoadMotor_tv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_LoadMotor_vt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vt; if (!buffer.str().empty()) @@ -436,21 +461,6 @@ bool get_LoadMotor_vt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - -bool get_LoadMotor_LoadAggregate(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->LoadAggregate != 0) - { - BaseClass_list.push_back(element->LoadAggregate); - return true; - } - } - return false; -} - - const char LoadMotor::debugName[] = "LoadMotor"; const char* LoadMotor::debugString() const { @@ -459,29 +469,29 @@ const char* LoadMotor::debugString() const void LoadMotor::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadMotor"), &LoadMotor_factory)); + factory_map.emplace("cim:LoadMotor", &LoadMotor_factory); } void LoadMotor::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.d"), &assign_LoadMotor_d)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.h"), &assign_LoadMotor_h)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.lfac"), &assign_LoadMotor_lfac)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.lp"), &assign_LoadMotor_lp)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.lpp"), &assign_LoadMotor_lpp)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.ls"), &assign_LoadMotor_ls)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.pfrac"), &assign_LoadMotor_pfrac)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.ra"), &assign_LoadMotor_ra)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.tbkr"), &assign_LoadMotor_tbkr)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.tpo"), &assign_LoadMotor_tpo)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.tppo"), &assign_LoadMotor_tppo)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.tv"), &assign_LoadMotor_tv)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.vt"), &assign_LoadMotor_vt)); + assign_map.emplace("cim:LoadMotor.d", &assign_LoadMotor_d); + assign_map.emplace("cim:LoadMotor.h", &assign_LoadMotor_h); + assign_map.emplace("cim:LoadMotor.lfac", &assign_LoadMotor_lfac); + assign_map.emplace("cim:LoadMotor.lp", &assign_LoadMotor_lp); + assign_map.emplace("cim:LoadMotor.lpp", &assign_LoadMotor_lpp); + assign_map.emplace("cim:LoadMotor.ls", &assign_LoadMotor_ls); + assign_map.emplace("cim:LoadMotor.pfrac", &assign_LoadMotor_pfrac); + assign_map.emplace("cim:LoadMotor.ra", &assign_LoadMotor_ra); + assign_map.emplace("cim:LoadMotor.tbkr", &assign_LoadMotor_tbkr); + assign_map.emplace("cim:LoadMotor.tpo", &assign_LoadMotor_tpo); + assign_map.emplace("cim:LoadMotor.tppo", &assign_LoadMotor_tppo); + assign_map.emplace("cim:LoadMotor.tv", &assign_LoadMotor_tv); + assign_map.emplace("cim:LoadMotor.vt", &assign_LoadMotor_vt); } void LoadMotor::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.LoadAggregate"), &assign_LoadMotor_LoadAggregate)); + assign_map.emplace("cim:LoadMotor.LoadAggregate", &assign_LoadMotor_LoadAggregate); } void LoadMotor::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/LoadMotor.hpp b/CGMES_2.4.13_18DEC2013/LoadMotor.hpp index 5501f3611..66ad36cff 100644 --- a/CGMES_2.4.13_18DEC2013/LoadMotor.hpp +++ b/CGMES_2.4.13_18DEC2013/LoadMotor.hpp @@ -20,9 +20,7 @@ namespace CIMPP { class LoadAggregate; - /* - Aggregate induction motor load. This model is used to represent a fraction of an ordinary load as "induction motor load". It allows load that is treated as ordinary constant power in power flow analysis to be represented by an induction motor in dynamic simulation. If = 0. or = , or = 0., only one cage is represented. Magnetic saturation is not modelled. Either a "one-cage" or "two-cage" model of the induction machine can be modelled. Magnetic saturation is not modelled. This model is intended for representation of aggregations of many motors dispersed through a load represented at a high voltage bus but where there is no information on the characteristics of individual motors. This model treats a fraction of the constant power part of a load as a motor. During initialisation, the initial power drawn by the motor is set equal to times the constant part of the static load. The remainder of the load is left as static load. The reactive power demand of the motor is calculated during initialisation as a function of voltage at the load bus. This reactive power demand may be less than or greater than the constant component of the load. If the motor's reactive demand is greater than the constant component of the load, the model inserts a shunt capacitor at the terminal of the motor to bring its reactive demand down to equal the constant reactive load. If a motor model and a static load model are both present for a load, the motor is assumed to be subtracted from the power flow constant load before the static load model is applied. The remainder of the load, if any, is then represented by the static load model. - */ + /** \brief Aggregate induction motor load. This model is used to represent a fraction of an ordinary load as "induction motor load". It allows load that is treated as ordinary constant power in power flow analysis to be represented by an induction motor in dynamic simulation. If = 0. or = , or = 0., only one cage is represented. Magnetic saturation is not modelled. Either a "one-cage" or "two-cage" model of the induction machine can be modelled. Magnetic saturation is not modelled. This model is intended for representation of aggregations of many motors dispersed through a load represented at a high voltage bus but where there is no information on the characteristics of individual motors. This model treats a fraction of the constant power part of a load as a motor. During initialisation, the initial power drawn by the motor is set equal to times the constant part of the static load. The remainder of the load is left as static load. The reactive power demand of the motor is calculated during initialisation as a function of voltage at the load bus. This reactive power demand may be less than or greater than the constant component of the load. If the motor's reactive demand is greater than the constant component of the load, the model inserts a shunt capacitor at the terminal of the motor to bring its reactive demand down to equal the constant reactive load. If a motor model and a static load model are both present for a load, the motor is assumed to be subtracted from the power flow constant load before the static load model is applied. The remainder of the load, if any, is then represented by the static load model. */ class LoadMotor : public IdentifiedObject { public: @@ -30,20 +28,47 @@ namespace CIMPP LoadMotor(); ~LoadMotor() override; - CIMPP::LoadAggregate* LoadAggregate; /* Aggregate load to which this aggregate motor (dynamic) load belongs. Default: 0 */ - CIMPP::Simple_Float d; /* Damping factor (D). Unit = delta P/delta speed. Typical Value = 2. Default: nullptr */ - CIMPP::Seconds h; /* Inertia constant (H) (not=0). Typical Value = 0.4. Default: nullptr */ - CIMPP::Simple_Float lfac; /* Loading factor - ratio of initial P to motor MVA base (Lfac). Typical Value = 0.8. Default: nullptr */ - CIMPP::PU lp; /* Transient reactance (Lp). Typical Value = 0.15. Default: nullptr */ - CIMPP::PU lpp; /* Subtransient reactance (Lpp). Typical Value = 0.15. Default: nullptr */ - CIMPP::PU ls; /* Synchronous reactance (Ls). Typical Value = 3.2. Default: nullptr */ - CIMPP::Simple_Float pfrac; /* Fraction of constant-power load to be represented by this motor model (Pfrac) (>=0.0 and <=1.0). Typical Value = 0.3. Default: nullptr */ - CIMPP::PU ra; /* Stator resistance (Ra). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tbkr; /* Circuit breaker operating time (Tbkr). Typical Value = 0.08. Default: nullptr */ - CIMPP::Seconds tpo; /* Transient rotor time constant (Tpo) (not=0). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tppo; /* Subtransient rotor time constant (Tppo). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds tv; /* Voltage trip pickup time (Tv). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU vt; /* Voltage threshold for tripping (Vt). Typical Value = 0.7. Default: nullptr */ + /** \brief Aggregate load to which this aggregate motor (dynamic) load belongs. Default: 0 */ + CIMPP::LoadAggregate* LoadAggregate; + + /** \brief Damping factor (D). Unit = delta P/delta speed. Typical Value = 2. Default: nullptr */ + CIMPP::Simple_Float d; + + /** \brief Inertia constant (H) (not=0). Typical Value = 0.4. Default: nullptr */ + CIMPP::Seconds h; + + /** \brief Loading factor - ratio of initial P to motor MVA base (Lfac). Typical Value = 0.8. Default: nullptr */ + CIMPP::Simple_Float lfac; + + /** \brief Transient reactance (Lp). Typical Value = 0.15. Default: nullptr */ + CIMPP::PU lp; + + /** \brief Subtransient reactance (Lpp). Typical Value = 0.15. Default: nullptr */ + CIMPP::PU lpp; + + /** \brief Synchronous reactance (Ls). Typical Value = 3.2. Default: nullptr */ + CIMPP::PU ls; + + /** \brief Fraction of constant-power load to be represented by this motor model (Pfrac) (>=0.0 and <=1.0). Typical Value = 0.3. Default: nullptr */ + CIMPP::Simple_Float pfrac; + + /** \brief Stator resistance (Ra). Typical Value = 0. Default: nullptr */ + CIMPP::PU ra; + + /** \brief Circuit breaker operating time (Tbkr). Typical Value = 0.08. Default: nullptr */ + CIMPP::Seconds tbkr; + + /** \brief Transient rotor time constant (Tpo) (not=0). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tpo; + + /** \brief Subtransient rotor time constant (Tppo). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds tppo; + + /** \brief Voltage trip pickup time (Tv). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tv; + + /** \brief Voltage threshold for tripping (Vt). Typical Value = 0.7. Default: nullptr */ + CIMPP::PU vt; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/LoadResponseCharacteristic.cpp b/CGMES_2.4.13_18DEC2013/LoadResponseCharacteristic.cpp index 8bacbbe22..f4c2368ce 100644 --- a/CGMES_2.4.13_18DEC2013/LoadResponseCharacteristic.cpp +++ b/CGMES_2.4.13_18DEC2013/LoadResponseCharacteristic.cpp @@ -9,22 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "EnergyConsumer.hpp" -#include "Boolean.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -LoadResponseCharacteristic::LoadResponseCharacteristic() {}; -LoadResponseCharacteristic::~LoadResponseCharacteristic() {}; +LoadResponseCharacteristic::LoadResponseCharacteristic() {} +LoadResponseCharacteristic::~LoadResponseCharacteristic() {} static const std::list PossibleProfilesForClass = { @@ -62,171 +51,182 @@ LoadResponseCharacteristic::getPossibleProfilesForAttributes() const return map; } +bool assign_EnergyConsumer_LoadResponse(BaseClass*, BaseClass*); +bool assign_LoadResponseCharacteristic_EnergyConsumer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + EnergyConsumer* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->EnergyConsumer.begin(), element->EnergyConsumer.end(), element2) == element->EnergyConsumer.end()) + { + element->EnergyConsumer.push_back(element2); + return assign_EnergyConsumer_LoadResponse(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_LoadResponseCharacteristic_exponentModel(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_exponentModel(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exponentModel; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadResponseCharacteristic_pConstantCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_pConstantCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pConstantCurrent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadResponseCharacteristic_pConstantImpedance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_pConstantImpedance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pConstantImpedance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadResponseCharacteristic_pConstantPower(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_pConstantPower(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pConstantPower; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadResponseCharacteristic_pFrequencyExponent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_pFrequencyExponent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pFrequencyExponent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadResponseCharacteristic_pVoltageExponent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_pVoltageExponent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pVoltageExponent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadResponseCharacteristic_qConstantCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_qConstantCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qConstantCurrent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadResponseCharacteristic_qConstantImpedance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_qConstantImpedance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qConstantImpedance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadResponseCharacteristic_qConstantPower(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_qConstantPower(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qConstantPower; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadResponseCharacteristic_qFrequencyExponent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_qFrequencyExponent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qFrequencyExponent; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_LoadResponseCharacteristic_qVoltageExponent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->qVoltageExponent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_EnergyConsumer_LoadResponse(BaseClass*, BaseClass*); -bool assign_LoadResponseCharacteristic_EnergyConsumer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_LoadResponseCharacteristic_qVoltageExponent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); - EnergyConsumer* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->EnergyConsumer.begin(), element->EnergyConsumer.end(), element2) == element->EnergyConsumer.end()) + buffer >> element->qVoltageExponent; + if (!buffer.fail()) { - element->EnergyConsumer.push_back(element2); - return assign_EnergyConsumer_LoadResponse(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_LoadResponseCharacteristic_exponentModel(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exponentModel; if (!buffer.str().empty()) @@ -240,7 +240,8 @@ bool get_LoadResponseCharacteristic_exponentModel(const BaseClass* BaseClass_ptr bool get_LoadResponseCharacteristic_pConstantCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pConstantCurrent; if (!buffer.str().empty()) @@ -254,7 +255,8 @@ bool get_LoadResponseCharacteristic_pConstantCurrent(const BaseClass* BaseClass_ bool get_LoadResponseCharacteristic_pConstantImpedance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pConstantImpedance; if (!buffer.str().empty()) @@ -268,7 +270,8 @@ bool get_LoadResponseCharacteristic_pConstantImpedance(const BaseClass* BaseClas bool get_LoadResponseCharacteristic_pConstantPower(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pConstantPower; if (!buffer.str().empty()) @@ -282,7 +285,8 @@ bool get_LoadResponseCharacteristic_pConstantPower(const BaseClass* BaseClass_pt bool get_LoadResponseCharacteristic_pFrequencyExponent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pFrequencyExponent; if (!buffer.str().empty()) @@ -296,7 +300,8 @@ bool get_LoadResponseCharacteristic_pFrequencyExponent(const BaseClass* BaseClas bool get_LoadResponseCharacteristic_pVoltageExponent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pVoltageExponent; if (!buffer.str().empty()) @@ -310,7 +315,8 @@ bool get_LoadResponseCharacteristic_pVoltageExponent(const BaseClass* BaseClass_ bool get_LoadResponseCharacteristic_qConstantCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qConstantCurrent; if (!buffer.str().empty()) @@ -324,7 +330,8 @@ bool get_LoadResponseCharacteristic_qConstantCurrent(const BaseClass* BaseClass_ bool get_LoadResponseCharacteristic_qConstantImpedance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qConstantImpedance; if (!buffer.str().empty()) @@ -338,7 +345,8 @@ bool get_LoadResponseCharacteristic_qConstantImpedance(const BaseClass* BaseClas bool get_LoadResponseCharacteristic_qConstantPower(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qConstantPower; if (!buffer.str().empty()) @@ -352,7 +360,8 @@ bool get_LoadResponseCharacteristic_qConstantPower(const BaseClass* BaseClass_pt bool get_LoadResponseCharacteristic_qFrequencyExponent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qFrequencyExponent; if (!buffer.str().empty()) @@ -366,7 +375,8 @@ bool get_LoadResponseCharacteristic_qFrequencyExponent(const BaseClass* BaseClas bool get_LoadResponseCharacteristic_qVoltageExponent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qVoltageExponent; if (!buffer.str().empty()) @@ -378,8 +388,6 @@ bool get_LoadResponseCharacteristic_qVoltageExponent(const BaseClass* BaseClass_ return false; } - - const char LoadResponseCharacteristic::debugName[] = "LoadResponseCharacteristic"; const char* LoadResponseCharacteristic::debugString() const { @@ -388,27 +396,27 @@ const char* LoadResponseCharacteristic::debugString() const void LoadResponseCharacteristic::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic"), &LoadResponseCharacteristic_factory)); + factory_map.emplace("cim:LoadResponseCharacteristic", &LoadResponseCharacteristic_factory); } void LoadResponseCharacteristic::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.exponentModel"), &assign_LoadResponseCharacteristic_exponentModel)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.pConstantCurrent"), &assign_LoadResponseCharacteristic_pConstantCurrent)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.pConstantImpedance"), &assign_LoadResponseCharacteristic_pConstantImpedance)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.pConstantPower"), &assign_LoadResponseCharacteristic_pConstantPower)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.pFrequencyExponent"), &assign_LoadResponseCharacteristic_pFrequencyExponent)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.pVoltageExponent"), &assign_LoadResponseCharacteristic_pVoltageExponent)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.qConstantCurrent"), &assign_LoadResponseCharacteristic_qConstantCurrent)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.qConstantImpedance"), &assign_LoadResponseCharacteristic_qConstantImpedance)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.qConstantPower"), &assign_LoadResponseCharacteristic_qConstantPower)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.qFrequencyExponent"), &assign_LoadResponseCharacteristic_qFrequencyExponent)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.qVoltageExponent"), &assign_LoadResponseCharacteristic_qVoltageExponent)); + assign_map.emplace("cim:LoadResponseCharacteristic.exponentModel", &assign_LoadResponseCharacteristic_exponentModel); + assign_map.emplace("cim:LoadResponseCharacteristic.pConstantCurrent", &assign_LoadResponseCharacteristic_pConstantCurrent); + assign_map.emplace("cim:LoadResponseCharacteristic.pConstantImpedance", &assign_LoadResponseCharacteristic_pConstantImpedance); + assign_map.emplace("cim:LoadResponseCharacteristic.pConstantPower", &assign_LoadResponseCharacteristic_pConstantPower); + assign_map.emplace("cim:LoadResponseCharacteristic.pFrequencyExponent", &assign_LoadResponseCharacteristic_pFrequencyExponent); + assign_map.emplace("cim:LoadResponseCharacteristic.pVoltageExponent", &assign_LoadResponseCharacteristic_pVoltageExponent); + assign_map.emplace("cim:LoadResponseCharacteristic.qConstantCurrent", &assign_LoadResponseCharacteristic_qConstantCurrent); + assign_map.emplace("cim:LoadResponseCharacteristic.qConstantImpedance", &assign_LoadResponseCharacteristic_qConstantImpedance); + assign_map.emplace("cim:LoadResponseCharacteristic.qConstantPower", &assign_LoadResponseCharacteristic_qConstantPower); + assign_map.emplace("cim:LoadResponseCharacteristic.qFrequencyExponent", &assign_LoadResponseCharacteristic_qFrequencyExponent); + assign_map.emplace("cim:LoadResponseCharacteristic.qVoltageExponent", &assign_LoadResponseCharacteristic_qVoltageExponent); } void LoadResponseCharacteristic::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.EnergyConsumer"), &assign_LoadResponseCharacteristic_EnergyConsumer)); + assign_map.emplace("cim:LoadResponseCharacteristic.EnergyConsumer", &assign_LoadResponseCharacteristic_EnergyConsumer); } void LoadResponseCharacteristic::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/LoadResponseCharacteristic.hpp b/CGMES_2.4.13_18DEC2013/LoadResponseCharacteristic.hpp index f97b8dac4..48e1ab3ae 100644 --- a/CGMES_2.4.13_18DEC2013/LoadResponseCharacteristic.hpp +++ b/CGMES_2.4.13_18DEC2013/LoadResponseCharacteristic.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class EnergyConsumer; - /* - Models the characteristic response of the load demand due to changes in system conditions such as voltage and frequency. This is not related to demand response. If LoadResponseCharacteristic.exponentModel is True, the voltage exponents are specified and used as to calculate: Active power component = Pnominal * (Voltage/cim:BaseVoltage.nominalVoltage) ** cim:LoadResponseCharacteristic.pVoltageExponent Reactive power component = Qnominal * (Voltage/cim:BaseVoltage.nominalVoltage)** cim:LoadResponseCharacteristic.qVoltageExponent Where * means "multiply" and ** is "raised to power of". - */ + /** \brief Models the characteristic response of the load demand due to changes in system conditions such as voltage and frequency. This is not related to demand response. If LoadResponseCharacteristic.exponentModel is True, the voltage exponents are specified and used as to calculate: Active power component = Pnominal * (Voltage/cim:BaseVoltage.nominalVoltage) ** cim:LoadResponseCharacteristic.pVoltageExponent Reactive power component = Qnominal * (Voltage/cim:BaseVoltage.nominalVoltage)** cim:LoadResponseCharacteristic.qVoltageExponent Where * means "multiply" and ** is "raised to power of". */ class LoadResponseCharacteristic : public IdentifiedObject { public: @@ -29,18 +27,41 @@ namespace CIMPP LoadResponseCharacteristic(); ~LoadResponseCharacteristic() override; - std::list EnergyConsumer; /* The set of loads that have the response characteristics. Default: 0 */ - CIMPP::Boolean exponentModel; /* Indicates the exponential voltage dependency model is to be used. If false, the coefficient model is to be used. The exponential voltage dependency model consist of the attributes - pVoltageExponent - qVoltageExponent. The coefficient model consist of the attributes - pConstantImpedance - pConstantCurrent - pConstantPower - qConstantImpedance - qConstantCurrent - qConstantPower. The sum of pConstantImpedance, pConstantCurrent and pConstantPower shall equal 1. The sum of qConstantImpedance, qConstantCurrent and qConstantPower shall equal 1. Default: false */ - CIMPP::Simple_Float pConstantCurrent; /* Portion of active power load modeled as constant current. Default: nullptr */ - CIMPP::Simple_Float pConstantImpedance; /* Portion of active power load modeled as constant impedance. Default: nullptr */ - CIMPP::Simple_Float pConstantPower; /* Portion of active power load modeled as constant power. Default: nullptr */ - CIMPP::Simple_Float pFrequencyExponent; /* Exponent of per unit frequency effecting active power. Default: nullptr */ - CIMPP::Simple_Float pVoltageExponent; /* Exponent of per unit voltage effecting real power. Default: nullptr */ - CIMPP::Simple_Float qConstantCurrent; /* Portion of reactive power load modeled as constant current. Default: nullptr */ - CIMPP::Simple_Float qConstantImpedance; /* Portion of reactive power load modeled as constant impedance. Default: nullptr */ - CIMPP::Simple_Float qConstantPower; /* Portion of reactive power load modeled as constant power. Default: nullptr */ - CIMPP::Simple_Float qFrequencyExponent; /* Exponent of per unit frequency effecting reactive power. Default: nullptr */ - CIMPP::Simple_Float qVoltageExponent; /* Exponent of per unit voltage effecting reactive power. Default: nullptr */ + /** \brief The set of loads that have the response characteristics. Default: 0 */ + std::list EnergyConsumer; + + /** \brief Indicates the exponential voltage dependency model is to be used. If false, the coefficient model is to be used. The exponential voltage dependency model consist of the attributes - pVoltageExponent - qVoltageExponent. The coefficient model consist of the attributes - pConstantImpedance - pConstantCurrent - pConstantPower - qConstantImpedance - qConstantCurrent - qConstantPower. The sum of pConstantImpedance, pConstantCurrent and pConstantPower shall equal 1. The sum of qConstantImpedance, qConstantCurrent and qConstantPower shall equal 1. Default: false */ + CIMPP::Boolean exponentModel; + + /** \brief Portion of active power load modeled as constant current. Default: nullptr */ + CIMPP::Simple_Float pConstantCurrent; + + /** \brief Portion of active power load modeled as constant impedance. Default: nullptr */ + CIMPP::Simple_Float pConstantImpedance; + + /** \brief Portion of active power load modeled as constant power. Default: nullptr */ + CIMPP::Simple_Float pConstantPower; + + /** \brief Exponent of per unit frequency effecting active power. Default: nullptr */ + CIMPP::Simple_Float pFrequencyExponent; + + /** \brief Exponent of per unit voltage effecting real power. Default: nullptr */ + CIMPP::Simple_Float pVoltageExponent; + + /** \brief Portion of reactive power load modeled as constant current. Default: nullptr */ + CIMPP::Simple_Float qConstantCurrent; + + /** \brief Portion of reactive power load modeled as constant impedance. Default: nullptr */ + CIMPP::Simple_Float qConstantImpedance; + + /** \brief Portion of reactive power load modeled as constant power. Default: nullptr */ + CIMPP::Simple_Float qConstantPower; + + /** \brief Exponent of per unit frequency effecting reactive power. Default: nullptr */ + CIMPP::Simple_Float qFrequencyExponent; + + /** \brief Exponent of per unit voltage effecting reactive power. Default: nullptr */ + CIMPP::Simple_Float qVoltageExponent; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/LoadStatic.cpp b/CGMES_2.4.13_18DEC2013/LoadStatic.cpp index 929cd897f..1ae8c3ffb 100644 --- a/CGMES_2.4.13_18DEC2013/LoadStatic.cpp +++ b/CGMES_2.4.13_18DEC2013/LoadStatic.cpp @@ -9,28 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "LoadAggregate.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "StaticLoadModelKind.hpp" using namespace CIMPP; -LoadStatic::LoadStatic() : LoadAggregate(nullptr) {}; -LoadStatic::~LoadStatic() {}; +LoadStatic::LoadStatic() : LoadAggregate(nullptr) {} +LoadStatic::~LoadStatic() {} static const std::list PossibleProfilesForClass = { @@ -74,249 +57,279 @@ LoadStatic::getPossibleProfilesForAttributes() const return map; } +bool assign_LoadAggregate_LoadStatic(BaseClass*, BaseClass*); +bool assign_LoadStatic_LoadAggregate(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + LoadAggregate* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->LoadAggregate != element2) + { + element->LoadAggregate = element2; + return assign_LoadAggregate_LoadStatic(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_LoadStatic_ep1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_ep1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ep1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_ep2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_ep2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ep2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_ep3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_ep3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ep3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_eq1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_eq1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eq1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_eq2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_eq2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eq2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_eq3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_eq3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eq3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kp1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kp1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kp2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kp2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kp3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kp3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kp4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kp4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kpf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kpf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kq1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kq1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kq1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kq2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kq2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kq2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kq3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kq3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kq3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kq4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kq4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kq4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kqf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kqf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kqf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_staticLoadModelType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_staticLoadModelType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->staticLoadModelType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_LoadAggregate_LoadStatic(BaseClass*, BaseClass*); -bool assign_LoadStatic_LoadAggregate(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_LoadStatic_LoadAggregate(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - LoadStatic* element = dynamic_cast(BaseClass_ptr1); - LoadAggregate* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->LoadAggregate != element2) + if (element->LoadAggregate != 0) { - element->LoadAggregate = element2; - return assign_LoadAggregate_LoadStatic(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->LoadAggregate); + return true; } - return true; } return false; } bool get_LoadStatic_ep1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ep1; if (!buffer.str().empty()) @@ -330,7 +343,8 @@ bool get_LoadStatic_ep1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_ep2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ep2; if (!buffer.str().empty()) @@ -344,7 +358,8 @@ bool get_LoadStatic_ep2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_ep3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ep3; if (!buffer.str().empty()) @@ -358,7 +373,8 @@ bool get_LoadStatic_ep3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_eq1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eq1; if (!buffer.str().empty()) @@ -372,7 +388,8 @@ bool get_LoadStatic_eq1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_eq2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eq2; if (!buffer.str().empty()) @@ -386,7 +403,8 @@ bool get_LoadStatic_eq2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_eq3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eq3; if (!buffer.str().empty()) @@ -400,7 +418,8 @@ bool get_LoadStatic_eq3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kp1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp1; if (!buffer.str().empty()) @@ -414,7 +433,8 @@ bool get_LoadStatic_kp1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kp2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp2; if (!buffer.str().empty()) @@ -428,7 +448,8 @@ bool get_LoadStatic_kp2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kp3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp3; if (!buffer.str().empty()) @@ -442,7 +463,8 @@ bool get_LoadStatic_kp3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kp4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp4; if (!buffer.str().empty()) @@ -456,7 +478,8 @@ bool get_LoadStatic_kp4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kpf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpf; if (!buffer.str().empty()) @@ -470,7 +493,8 @@ bool get_LoadStatic_kpf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kq1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kq1; if (!buffer.str().empty()) @@ -484,7 +508,8 @@ bool get_LoadStatic_kq1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kq2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kq2; if (!buffer.str().empty()) @@ -498,7 +523,8 @@ bool get_LoadStatic_kq2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kq3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kq3; if (!buffer.str().empty()) @@ -512,7 +538,8 @@ bool get_LoadStatic_kq3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kq4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kq4; if (!buffer.str().empty()) @@ -526,7 +553,8 @@ bool get_LoadStatic_kq4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kqf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kqf; if (!buffer.str().empty()) @@ -538,24 +566,10 @@ bool get_LoadStatic_kqf(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - -bool get_LoadStatic_LoadAggregate(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->LoadAggregate != 0) - { - BaseClass_list.push_back(element->LoadAggregate); - return true; - } - } - return false; -} - - bool get_LoadStatic_staticLoadModelType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->staticLoadModelType; if (!buffer.str().empty()) @@ -575,33 +589,33 @@ const char* LoadStatic::debugString() const void LoadStatic::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadStatic"), &LoadStatic_factory)); + factory_map.emplace("cim:LoadStatic", &LoadStatic_factory); } void LoadStatic::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.ep1"), &assign_LoadStatic_ep1)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.ep2"), &assign_LoadStatic_ep2)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.ep3"), &assign_LoadStatic_ep3)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.eq1"), &assign_LoadStatic_eq1)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.eq2"), &assign_LoadStatic_eq2)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.eq3"), &assign_LoadStatic_eq3)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kp1"), &assign_LoadStatic_kp1)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kp2"), &assign_LoadStatic_kp2)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kp3"), &assign_LoadStatic_kp3)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kp4"), &assign_LoadStatic_kp4)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kpf"), &assign_LoadStatic_kpf)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kq1"), &assign_LoadStatic_kq1)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kq2"), &assign_LoadStatic_kq2)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kq3"), &assign_LoadStatic_kq3)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kq4"), &assign_LoadStatic_kq4)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kqf"), &assign_LoadStatic_kqf)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.staticLoadModelType"), &assign_LoadStatic_staticLoadModelType)); + assign_map.emplace("cim:LoadStatic.ep1", &assign_LoadStatic_ep1); + assign_map.emplace("cim:LoadStatic.ep2", &assign_LoadStatic_ep2); + assign_map.emplace("cim:LoadStatic.ep3", &assign_LoadStatic_ep3); + assign_map.emplace("cim:LoadStatic.eq1", &assign_LoadStatic_eq1); + assign_map.emplace("cim:LoadStatic.eq2", &assign_LoadStatic_eq2); + assign_map.emplace("cim:LoadStatic.eq3", &assign_LoadStatic_eq3); + assign_map.emplace("cim:LoadStatic.kp1", &assign_LoadStatic_kp1); + assign_map.emplace("cim:LoadStatic.kp2", &assign_LoadStatic_kp2); + assign_map.emplace("cim:LoadStatic.kp3", &assign_LoadStatic_kp3); + assign_map.emplace("cim:LoadStatic.kp4", &assign_LoadStatic_kp4); + assign_map.emplace("cim:LoadStatic.kpf", &assign_LoadStatic_kpf); + assign_map.emplace("cim:LoadStatic.kq1", &assign_LoadStatic_kq1); + assign_map.emplace("cim:LoadStatic.kq2", &assign_LoadStatic_kq2); + assign_map.emplace("cim:LoadStatic.kq3", &assign_LoadStatic_kq3); + assign_map.emplace("cim:LoadStatic.kq4", &assign_LoadStatic_kq4); + assign_map.emplace("cim:LoadStatic.kqf", &assign_LoadStatic_kqf); + assign_map.emplace("cim:LoadStatic.staticLoadModelType", &assign_LoadStatic_staticLoadModelType); } void LoadStatic::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.LoadAggregate"), &assign_LoadStatic_LoadAggregate)); + assign_map.emplace("cim:LoadStatic.LoadAggregate", &assign_LoadStatic_LoadAggregate); } void LoadStatic::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/LoadStatic.hpp b/CGMES_2.4.13_18DEC2013/LoadStatic.hpp index 58a50621a..7cea8b85f 100644 --- a/CGMES_2.4.13_18DEC2013/LoadStatic.hpp +++ b/CGMES_2.4.13_18DEC2013/LoadStatic.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class LoadAggregate; - /* - General static load model representing the sensitivity of the real and reactive power consumed by the load to the amplitude and frequency of the bus voltage. - */ + /** \brief General static load model representing the sensitivity of the real and reactive power consumed by the load to the amplitude and frequency of the bus voltage. */ class LoadStatic : public IdentifiedObject { public: @@ -29,24 +27,59 @@ namespace CIMPP LoadStatic(); ~LoadStatic() override; - CIMPP::LoadAggregate* LoadAggregate; /* Aggregate load to which this aggregate static load belongs. Default: 0 */ - CIMPP::Simple_Float ep1; /* First term voltage exponent for active power (Ep1). Used only when .staticLoadModelType = exponential. Default: nullptr */ - CIMPP::Simple_Float ep2; /* Second term voltage exponent for active power (Ep2). Used only when .staticLoadModelType = exponential. Default: nullptr */ - CIMPP::Simple_Float ep3; /* Third term voltage exponent for active power (Ep3). Used only when .staticLoadModelType = exponential. Default: nullptr */ - CIMPP::Simple_Float eq1; /* First term voltage exponent for reactive power (Eq1). Used only when .staticLoadModelType = exponential. Default: nullptr */ - CIMPP::Simple_Float eq2; /* Second term voltage exponent for reactive power (Eq2). Used only when .staticLoadModelType = exponential. Default: nullptr */ - CIMPP::Simple_Float eq3; /* Third term voltage exponent for reactive power (Eq3). Used only when .staticLoadModelType = exponential. Default: nullptr */ - CIMPP::Simple_Float kp1; /* First term voltage coefficient for active power (Kp1). Not used when .staticLoadModelType = constantZ. Default: nullptr */ - CIMPP::Simple_Float kp2; /* Second term voltage coefficient for active power (Kp2). Not used when .staticLoadModelType = constantZ. Default: nullptr */ - CIMPP::Simple_Float kp3; /* Third term voltage coefficient for active power (Kp3). Not used when .staticLoadModelType = constantZ. Default: nullptr */ - CIMPP::Simple_Float kp4; /* Frequency coefficient for active power (Kp4). Must be non-zero when .staticLoadModelType = ZIP2. Not used for all other values of .staticLoadModelType. Default: nullptr */ - CIMPP::Simple_Float kpf; /* Frequency deviation coefficient for active power (Kpf). Not used when .staticLoadModelType = constantZ. Default: nullptr */ - CIMPP::Simple_Float kq1; /* First term voltage coefficient for reactive power (Kq1). Not used when .staticLoadModelType = constantZ. Default: nullptr */ - CIMPP::Simple_Float kq2; /* Second term voltage coefficient for reactive power (Kq2). Not used when .staticLoadModelType = constantZ. Default: nullptr */ - CIMPP::Simple_Float kq3; /* Third term voltage coefficient for reactive power (Kq3). Not used when .staticLoadModelType = constantZ. Default: nullptr */ - CIMPP::Simple_Float kq4; /* Frequency coefficient for reactive power (Kq4). Must be non-zero when .staticLoadModelType = ZIP2. Not used for all other values of .staticLoadModelType. Default: nullptr */ - CIMPP::Simple_Float kqf; /* Frequency deviation coefficient for reactive power (Kqf). Not used when .staticLoadModelType = constantZ. Default: nullptr */ - CIMPP::StaticLoadModelKind staticLoadModelType; /* Type of static load model. Typical Value = constantZ. Default: 0 */ + /** \brief Aggregate load to which this aggregate static load belongs. Default: 0 */ + CIMPP::LoadAggregate* LoadAggregate; + + /** \brief First term voltage exponent for active power (Ep1). Used only when .staticLoadModelType = exponential. Default: nullptr */ + CIMPP::Simple_Float ep1; + + /** \brief Second term voltage exponent for active power (Ep2). Used only when .staticLoadModelType = exponential. Default: nullptr */ + CIMPP::Simple_Float ep2; + + /** \brief Third term voltage exponent for active power (Ep3). Used only when .staticLoadModelType = exponential. Default: nullptr */ + CIMPP::Simple_Float ep3; + + /** \brief First term voltage exponent for reactive power (Eq1). Used only when .staticLoadModelType = exponential. Default: nullptr */ + CIMPP::Simple_Float eq1; + + /** \brief Second term voltage exponent for reactive power (Eq2). Used only when .staticLoadModelType = exponential. Default: nullptr */ + CIMPP::Simple_Float eq2; + + /** \brief Third term voltage exponent for reactive power (Eq3). Used only when .staticLoadModelType = exponential. Default: nullptr */ + CIMPP::Simple_Float eq3; + + /** \brief First term voltage coefficient for active power (Kp1). Not used when .staticLoadModelType = constantZ. Default: nullptr */ + CIMPP::Simple_Float kp1; + + /** \brief Second term voltage coefficient for active power (Kp2). Not used when .staticLoadModelType = constantZ. Default: nullptr */ + CIMPP::Simple_Float kp2; + + /** \brief Third term voltage coefficient for active power (Kp3). Not used when .staticLoadModelType = constantZ. Default: nullptr */ + CIMPP::Simple_Float kp3; + + /** \brief Frequency coefficient for active power (Kp4). Must be non-zero when .staticLoadModelType = ZIP2. Not used for all other values of .staticLoadModelType. Default: nullptr */ + CIMPP::Simple_Float kp4; + + /** \brief Frequency deviation coefficient for active power (Kpf). Not used when .staticLoadModelType = constantZ. Default: nullptr */ + CIMPP::Simple_Float kpf; + + /** \brief First term voltage coefficient for reactive power (Kq1). Not used when .staticLoadModelType = constantZ. Default: nullptr */ + CIMPP::Simple_Float kq1; + + /** \brief Second term voltage coefficient for reactive power (Kq2). Not used when .staticLoadModelType = constantZ. Default: nullptr */ + CIMPP::Simple_Float kq2; + + /** \brief Third term voltage coefficient for reactive power (Kq3). Not used when .staticLoadModelType = constantZ. Default: nullptr */ + CIMPP::Simple_Float kq3; + + /** \brief Frequency coefficient for reactive power (Kq4). Must be non-zero when .staticLoadModelType = ZIP2. Not used for all other values of .staticLoadModelType. Default: nullptr */ + CIMPP::Simple_Float kq4; + + /** \brief Frequency deviation coefficient for reactive power (Kqf). Not used when .staticLoadModelType = constantZ. Default: nullptr */ + CIMPP::Simple_Float kqf; + + /** \brief Type of static load model. Typical Value = constantZ. Default: 0 */ + CIMPP::StaticLoadModelKind staticLoadModelType; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/LoadUserDefined.cpp b/CGMES_2.4.13_18DEC2013/LoadUserDefined.cpp index 976f5f8a4..ad0a491aa 100644 --- a/CGMES_2.4.13_18DEC2013/LoadUserDefined.cpp +++ b/CGMES_2.4.13_18DEC2013/LoadUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -LoadUserDefined::LoadUserDefined() {}; -LoadUserDefined::~LoadUserDefined() {}; +LoadUserDefined::LoadUserDefined() {} +LoadUserDefined::~LoadUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ LoadUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_LoadUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (LoadUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_LoadUserDefined(BaseClass*, BaseClass*); bool assign_LoadUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_LoadUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_pt return false; } +bool assign_LoadUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + LoadUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_LoadUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const LoadUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_LoadUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::strin return false; } - - const char LoadUserDefined::debugName[] = "LoadUserDefined"; const char* LoadUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* LoadUserDefined::debugString() const void LoadUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadUserDefined"), &LoadUserDefined_factory)); + factory_map.emplace("cim:LoadUserDefined", &LoadUserDefined_factory); } void LoadUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadUserDefined.proprietary"), &assign_LoadUserDefined_proprietary)); + assign_map.emplace("cim:LoadUserDefined.proprietary", &assign_LoadUserDefined_proprietary); } void LoadUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadUserDefined.ProprietaryParameterDynamics"), &assign_LoadUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:LoadUserDefined.ProprietaryParameterDynamics", &assign_LoadUserDefined_ProprietaryParameterDynamics); } void LoadUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/LoadUserDefined.hpp b/CGMES_2.4.13_18DEC2013/LoadUserDefined.hpp index 0c0faaf50..d9bea6707 100644 --- a/CGMES_2.4.13_18DEC2013/LoadUserDefined.hpp +++ b/CGMES_2.4.13_18DEC2013/LoadUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Load whose dynamic behaviour is described by a user-defined model. - */ + /** \brief Load whose dynamic behaviour is described by a user-defined model. */ class LoadUserDefined : public LoadDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP LoadUserDefined(); ~LoadUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Location.cpp b/CGMES_2.4.13_18DEC2013/Location.cpp index 7728072c8..d57fd2700 100644 --- a/CGMES_2.4.13_18DEC2013/Location.cpp +++ b/CGMES_2.4.13_18DEC2013/Location.cpp @@ -14,8 +14,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Location::Location() : CoordinateSystem(nullptr), PowerSystemResources(nullptr) {}; -Location::~Location() {}; +Location::Location() : CoordinateSystem(nullptr), PowerSystemResources(nullptr) {} +Location::~Location() {} static const std::list PossibleProfilesForClass = { @@ -44,8 +44,6 @@ Location::getPossibleProfilesForAttributes() const return map; } - - bool assign_CoordinateSystem_Location(BaseClass*, BaseClass*); bool assign_Location_CoordinateSystem(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -62,6 +60,7 @@ bool assign_Location_CoordinateSystem(BaseClass* BaseClass_ptr1, BaseClass* Base } return false; } + bool assign_PositionPoint_Location(BaseClass*, BaseClass*); bool assign_Location_PositionPoints(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -78,6 +77,7 @@ bool assign_Location_PositionPoints(BaseClass* BaseClass_ptr1, BaseClass* BaseCl } return false; } + bool assign_PowerSystemResource_Location(BaseClass*, BaseClass*); bool assign_Location_PowerSystemResources(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -95,10 +95,10 @@ bool assign_Location_PowerSystemResources(BaseClass* BaseClass_ptr1, BaseClass* return false; } - bool get_Location_CoordinateSystem(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Location* element = dynamic_cast(BaseClass_ptr1)) + const Location* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->CoordinateSystem != 0) { @@ -109,9 +109,11 @@ bool get_Location_CoordinateSystem(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Location* element = dynamic_cast(BaseClass_ptr1)) + const Location* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PowerSystemResources != 0) { @@ -122,7 +124,6 @@ bool get_Location_PowerSystemResources(const BaseClass* BaseClass_ptr1, std::lis return false; } - const char Location::debugName[] = "Location"; const char* Location::debugString() const { @@ -131,7 +132,7 @@ const char* Location::debugString() const void Location::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Location"), &Location_factory)); + factory_map.emplace("cim:Location", &Location_factory); } void Location::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -140,9 +141,9 @@ void Location::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Location.CoordinateSystem"), &assign_Location_CoordinateSystem)); - assign_map.insert(std::make_pair(std::string("cim:Location.PositionPoints"), &assign_Location_PositionPoints)); - assign_map.insert(std::make_pair(std::string("cim:Location.PowerSystemResources"), &assign_Location_PowerSystemResources)); + assign_map.emplace("cim:Location.CoordinateSystem", &assign_Location_CoordinateSystem); + assign_map.emplace("cim:Location.PositionPoints", &assign_Location_PositionPoints); + assign_map.emplace("cim:Location.PowerSystemResources", &assign_Location_PowerSystemResources); } void Location::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/Location.hpp b/CGMES_2.4.13_18DEC2013/Location.hpp index 9dbc8dcfb..4d10bdb15 100644 --- a/CGMES_2.4.13_18DEC2013/Location.hpp +++ b/CGMES_2.4.13_18DEC2013/Location.hpp @@ -19,9 +19,7 @@ namespace CIMPP class PositionPoint; class PowerSystemResource; - /* - The place, scene, or point of something where someone or something has been, is, and/or will be at a given moment in time. It can be defined with one or more postition points (coordinates) in a given coordinate system. - */ + /** \brief The place, scene, or point of something where someone or something has been, is, and/or will be at a given moment in time. It can be defined with one or more postition points (coordinates) in a given coordinate system. */ class Location : public IdentifiedObject { public: @@ -29,9 +27,14 @@ namespace CIMPP Location(); ~Location() override; - CIMPP::CoordinateSystem* CoordinateSystem; /* Coordinate system used to describe position points of this location. Default: 0 */ - std::list PositionPoints; /* Sequence of position points describing this location, expressed in coordinate system `Location.CoordinateSystem`. Default: 0 */ - CIMPP::PowerSystemResource* PowerSystemResources; /* All power system resources at this location. Default: 0 */ + /** \brief Coordinate system used to describe position points of this location. Default: 0 */ + CIMPP::CoordinateSystem* CoordinateSystem; + + /** \brief Sequence of position points describing this location, expressed in coordinate system `Location.CoordinateSystem`. Default: 0 */ + std::list PositionPoints; + + /** \brief All power system resources at this location. Default: 0 */ + CIMPP::PowerSystemResource* PowerSystemResources; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Measurement.cpp b/CGMES_2.4.13_18DEC2013/Measurement.cpp index 4d46ccab4..87a4ea88d 100644 --- a/CGMES_2.4.13_18DEC2013/Measurement.cpp +++ b/CGMES_2.4.13_18DEC2013/Measurement.cpp @@ -8,17 +8,13 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PowerSystemResource.hpp" #include "ACDCTerminal.hpp" -#include "String.hpp" -#include "PhaseCode.hpp" -#include "UnitMultiplier.hpp" -#include "UnitSymbol.hpp" +#include "PowerSystemResource.hpp" using namespace CIMPP; -Measurement::Measurement() : PowerSystemResource(nullptr), Terminal(nullptr) {}; -Measurement::~Measurement() {}; +Measurement::Measurement() : PowerSystemResource(nullptr), Terminal(nullptr) {} +Measurement::~Measurement() {} static const std::list PossibleProfilesForClass = { @@ -50,111 +46,100 @@ Measurement::getPossibleProfilesForAttributes() const return map; } - -bool assign_Measurement_measurementType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerSystemResource_Measurements(BaseClass*, BaseClass*); +bool assign_Measurement_PowerSystemResource(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (Measurement* element = dynamic_cast(BaseClass_ptr1)) + Measurement* element = dynamic_cast(BaseClass_ptr1); + PowerSystemResource* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - element->measurementType = buffer.str(); - if (buffer.fail()) - return false; - else - return true; + if (element->PowerSystemResource != element2) + { + element->PowerSystemResource = element2; + return assign_PowerSystemResource_Measurements(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_Measurement_phases(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCTerminal_Measurements(BaseClass*, BaseClass*); +bool assign_Measurement_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (Measurement* element = dynamic_cast(BaseClass_ptr1)) + Measurement* element = dynamic_cast(BaseClass_ptr1); + ACDCTerminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->phases; - if (buffer.fail()) - return false; - else - return true; + if (element->Terminal != element2) + { + element->Terminal = element2; + return assign_ACDCTerminal_Measurements(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_Measurement_unitMultiplier(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Measurement_measurementType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Measurement* element = dynamic_cast(BaseClass_ptr1)) + Measurement* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->unitMultiplier; - if (buffer.fail()) - return false; - else + element->measurementType = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Measurement_unitSymbol(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (Measurement* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->unitSymbol; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - -bool assign_PowerSystemResource_Measurements(BaseClass*, BaseClass*); -bool assign_Measurement_PowerSystemResource(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_Measurement_phases(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { Measurement* element = dynamic_cast(BaseClass_ptr1); - PowerSystemResource* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->PowerSystemResource != element2) + buffer >> element->phases; + if (!buffer.fail()) { - element->PowerSystemResource = element2; - return assign_PowerSystemResource_Measurements(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_ACDCTerminal_Measurements(BaseClass*, BaseClass*); -bool assign_Measurement_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_Measurement_unitMultiplier(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { Measurement* element = dynamic_cast(BaseClass_ptr1); - ACDCTerminal* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->Terminal != element2) + buffer >> element->unitMultiplier; + if (!buffer.fail()) { - element->Terminal = element2; - return assign_ACDCTerminal_Measurements(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool get_Measurement_measurementType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_Measurement_unitSymbol(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const Measurement* element = dynamic_cast(BaseClass_ptr1)) + Measurement* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->measurementType; - if (!buffer.str().empty()) + buffer >> element->unitSymbol; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_Measurement_PowerSystemResource(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Measurement* element = dynamic_cast(BaseClass_ptr1)) + const Measurement* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PowerSystemResource != 0) { @@ -167,7 +152,8 @@ bool get_Measurement_PowerSystemResource(const BaseClass* BaseClass_ptr1, std::l bool get_Measurement_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Measurement* element = dynamic_cast(BaseClass_ptr1)) + const Measurement* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Terminal != 0) { @@ -178,10 +164,25 @@ bool get_Measurement_Terminal(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->measurementType; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} bool get_Measurement_phases(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Measurement* element = dynamic_cast(BaseClass_ptr1)) + const Measurement* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->phases; if (!buffer.str().empty()) @@ -195,7 +196,8 @@ bool get_Measurement_phases(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_Measurement_unitMultiplier(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Measurement* element = dynamic_cast(BaseClass_ptr1)) + const Measurement* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->unitMultiplier; if (!buffer.str().empty()) @@ -209,7 +211,8 @@ bool get_Measurement_unitMultiplier(const BaseClass* BaseClass_ptr1, std::string bool get_Measurement_unitSymbol(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Measurement* element = dynamic_cast(BaseClass_ptr1)) + const Measurement* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->unitSymbol; if (!buffer.str().empty()) @@ -229,21 +232,21 @@ const char* Measurement::debugString() const void Measurement::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Measurement"), &Measurement_factory)); + factory_map.emplace("cim:Measurement", &Measurement_factory); } void Measurement::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Measurement.measurementType"), &assign_Measurement_measurementType)); - assign_map.insert(std::make_pair(std::string("cim:Measurement.phases"), &assign_Measurement_phases)); - assign_map.insert(std::make_pair(std::string("cim:Measurement.unitMultiplier"), &assign_Measurement_unitMultiplier)); - assign_map.insert(std::make_pair(std::string("cim:Measurement.unitSymbol"), &assign_Measurement_unitSymbol)); + assign_map.emplace("cim:Measurement.measurementType", &assign_Measurement_measurementType); + assign_map.emplace("cim:Measurement.phases", &assign_Measurement_phases); + assign_map.emplace("cim:Measurement.unitMultiplier", &assign_Measurement_unitMultiplier); + assign_map.emplace("cim:Measurement.unitSymbol", &assign_Measurement_unitSymbol); } void Measurement::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Measurement.PowerSystemResource"), &assign_Measurement_PowerSystemResource)); - assign_map.insert(std::make_pair(std::string("cim:Measurement.Terminal"), &assign_Measurement_Terminal)); + assign_map.emplace("cim:Measurement.PowerSystemResource", &assign_Measurement_PowerSystemResource); + assign_map.emplace("cim:Measurement.Terminal", &assign_Measurement_Terminal); } void Measurement::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/Measurement.hpp b/CGMES_2.4.13_18DEC2013/Measurement.hpp index 2d19ee4f7..60b15fbaf 100644 --- a/CGMES_2.4.13_18DEC2013/Measurement.hpp +++ b/CGMES_2.4.13_18DEC2013/Measurement.hpp @@ -22,9 +22,7 @@ namespace CIMPP class ACDCTerminal; class PowerSystemResource; - /* - A Measurement represents any measured, calculated or non-measured non-calculated quantity. Any piece of equipment may contain Measurements, e.g. a substation may have temperature measurements and door open indications, a transformer may have oil temperature and tank pressure measurements, a bay may contain a number of power flow measurements and a Breaker may contain a switch status measurement. The PSR - Measurement association is intended to capture this use of Measurement and is included in the naming hierarchy based on EquipmentContainer. The naming hierarchy typically has Measurements as leafs, e.g. Substation-VoltageLevel-Bay-Switch-Measurement. Some Measurements represent quantities related to a particular sensor location in the network, e.g. a voltage transformer (PT) at a busbar or a current transformer (CT) at the bar between a breaker and an isolator. The sensing position is not captured in the PSR - Measurement association. Instead it is captured by the Measurement - Terminal association that is used to define the sensing location in the network topology. The location is defined by the connection of the Terminal to ConductingEquipment. If both a Terminal and PSR are associated, and the PSR is of type ConductingEquipment, the associated Terminal should belong to that ConductingEquipment instance. When the sensor location is needed both Measurement-PSR and Measurement-Terminal are used. The Measurement-Terminal association is never used alone. - */ + /** \brief A Measurement represents any measured, calculated or non-measured non-calculated quantity. Any piece of equipment may contain Measurements, e.g. a substation may have temperature measurements and door open indications, a transformer may have oil temperature and tank pressure measurements, a bay may contain a number of power flow measurements and a Breaker may contain a switch status measurement. The PSR - Measurement association is intended to capture this use of Measurement and is included in the naming hierarchy based on EquipmentContainer. The naming hierarchy typically has Measurements as leafs, e.g. Substation-VoltageLevel-Bay-Switch-Measurement. Some Measurements represent quantities related to a particular sensor location in the network, e.g. a voltage transformer (PT) at a busbar or a current transformer (CT) at the bar between a breaker and an isolator. The sensing position is not captured in the PSR - Measurement association. Instead it is captured by the Measurement - Terminal association that is used to define the sensing location in the network topology. The location is defined by the connection of the Terminal to ConductingEquipment. If both a Terminal and PSR are associated, and the PSR is of type ConductingEquipment, the associated Terminal should belong to that ConductingEquipment instance. When the sensor location is needed both Measurement-PSR and Measurement-Terminal are used. The Measurement-Terminal association is never used alone. */ class Measurement : public IdentifiedObject { public: @@ -32,12 +30,23 @@ namespace CIMPP Measurement(); ~Measurement() override; - CIMPP::PowerSystemResource* PowerSystemResource; /* The measurements associated with this power system resource. Default: 0 */ - CIMPP::ACDCTerminal* Terminal; /* One or more measurements may be associated with a terminal in the network. Default: 0 */ - CIMPP::String measurementType; /* Specifies the type of measurement. For example, this specifies if the measurement represents an indoor temperature, outdoor temperature, bus voltage, line flow, etc. Default: '' */ - CIMPP::PhaseCode phases; /* Indicates to which phases the measurement applies and avoids the need to use `measurementType` to also encode phase information (which would explode the types). The phase information in Measurement, along with `measurementType` and `phases` uniquely defines a Measurement for a device, based on normal network phase. Their meaning will not change when the computed energizing phasing is changed due to jumpers or other reasons. If the attribute is missing three phases (ABC) shall be assumed. Default: 0 */ - CIMPP::UnitMultiplier unitMultiplier; /* The unit multiplier of the measured quantity. Default: 0 */ - CIMPP::UnitSymbol unitSymbol; /* The unit of measure of the measured quantity. Default: 0 */ + /** \brief The measurements associated with this power system resource. Default: 0 */ + CIMPP::PowerSystemResource* PowerSystemResource; + + /** \brief One or more measurements may be associated with a terminal in the network. Default: 0 */ + CIMPP::ACDCTerminal* Terminal; + + /** \brief Specifies the type of measurement. For example, this specifies if the measurement represents an indoor temperature, outdoor temperature, bus voltage, line flow, etc. Default: '' */ + CIMPP::String measurementType; + + /** \brief Indicates to which phases the measurement applies and avoids the need to use `measurementType` to also encode phase information (which would explode the types). The phase information in Measurement, along with `measurementType` and `phases` uniquely defines a Measurement for a device, based on normal network phase. Their meaning will not change when the computed energizing phasing is changed due to jumpers or other reasons. If the attribute is missing three phases (ABC) shall be assumed. Default: 0 */ + CIMPP::PhaseCode phases; + + /** \brief The unit multiplier of the measured quantity. Default: 0 */ + CIMPP::UnitMultiplier unitMultiplier; + + /** \brief The unit of measure of the measured quantity. Default: 0 */ + CIMPP::UnitSymbol unitSymbol; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/MeasurementValue.cpp b/CGMES_2.4.13_18DEC2013/MeasurementValue.cpp index e8f72157a..ed6bb5624 100644 --- a/CGMES_2.4.13_18DEC2013/MeasurementValue.cpp +++ b/CGMES_2.4.13_18DEC2013/MeasurementValue.cpp @@ -10,13 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "MeasurementValueQuality.hpp" #include "MeasurementValueSource.hpp" -#include "PerCent.hpp" -#include "DateTime.hpp" using namespace CIMPP; -MeasurementValue::MeasurementValue() : MeasurementValueQuality(nullptr), MeasurementValueSource(nullptr) {}; -MeasurementValue::~MeasurementValue() {}; +MeasurementValue::MeasurementValue() : MeasurementValueQuality(nullptr), MeasurementValueSource(nullptr) {} +MeasurementValue::~MeasurementValue() {} static const std::list PossibleProfilesForClass = { @@ -46,34 +44,6 @@ MeasurementValue::getPossibleProfilesForAttributes() const return map; } - -bool assign_MeasurementValue_sensorAccuracy(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (MeasurementValue* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->sensorAccuracy; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_MeasurementValue_timeStamp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (MeasurementValue* element = dynamic_cast(BaseClass_ptr1)) - { - element->timeStamp = buffer.str(); - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_MeasurementValueQuality_MeasurementValue(BaseClass*, BaseClass*); bool assign_MeasurementValue_MeasurementValueQuality(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -90,6 +60,7 @@ bool assign_MeasurementValue_MeasurementValueQuality(BaseClass* BaseClass_ptr1, } return false; } + bool assign_MeasurementValueSource_MeasurementValues(BaseClass*, BaseClass*); bool assign_MeasurementValue_MeasurementValueSource(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -107,38 +78,39 @@ bool assign_MeasurementValue_MeasurementValueSource(BaseClass* BaseClass_ptr1, B return false; } -bool get_MeasurementValue_sensorAccuracy(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_MeasurementValue_sensorAccuracy(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const MeasurementValue* element = dynamic_cast(BaseClass_ptr1)) + MeasurementValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->sensorAccuracy; - if (!buffer.str().empty()) + buffer >> element->sensorAccuracy; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_MeasurementValue_timeStamp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_MeasurementValue_timeStamp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const MeasurementValue* element = dynamic_cast(BaseClass_ptr1)) + MeasurementValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->timeStamp; - if (!buffer.str().empty()) + element->timeStamp = buffer.str(); + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } bool get_MeasurementValue_MeasurementValueSource(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const MeasurementValue* element = dynamic_cast(BaseClass_ptr1)) + const MeasurementValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->MeasurementValueSource != 0) { @@ -149,6 +121,35 @@ bool get_MeasurementValue_MeasurementValueSource(const BaseClass* BaseClass_ptr1 return false; } +bool get_MeasurementValue_sensorAccuracy(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const MeasurementValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->sensorAccuracy; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_MeasurementValue_timeStamp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const MeasurementValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->timeStamp; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char MeasurementValue::debugName[] = "MeasurementValue"; const char* MeasurementValue::debugString() const @@ -158,19 +159,19 @@ const char* MeasurementValue::debugString() const void MeasurementValue::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:MeasurementValue"), &MeasurementValue_factory)); + factory_map.emplace("cim:MeasurementValue", &MeasurementValue_factory); } void MeasurementValue::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MeasurementValue.sensorAccuracy"), &assign_MeasurementValue_sensorAccuracy)); - assign_map.insert(std::make_pair(std::string("cim:MeasurementValue.timeStamp"), &assign_MeasurementValue_timeStamp)); + assign_map.emplace("cim:MeasurementValue.sensorAccuracy", &assign_MeasurementValue_sensorAccuracy); + assign_map.emplace("cim:MeasurementValue.timeStamp", &assign_MeasurementValue_timeStamp); } void MeasurementValue::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MeasurementValue.MeasurementValueQuality"), &assign_MeasurementValue_MeasurementValueQuality)); - assign_map.insert(std::make_pair(std::string("cim:MeasurementValue.MeasurementValueSource"), &assign_MeasurementValue_MeasurementValueSource)); + assign_map.emplace("cim:MeasurementValue.MeasurementValueQuality", &assign_MeasurementValue_MeasurementValueQuality); + assign_map.emplace("cim:MeasurementValue.MeasurementValueSource", &assign_MeasurementValue_MeasurementValueSource); } void MeasurementValue::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/MeasurementValue.hpp b/CGMES_2.4.13_18DEC2013/MeasurementValue.hpp index 820a01378..5e4745ae7 100644 --- a/CGMES_2.4.13_18DEC2013/MeasurementValue.hpp +++ b/CGMES_2.4.13_18DEC2013/MeasurementValue.hpp @@ -20,9 +20,7 @@ namespace CIMPP class MeasurementValueQuality; class MeasurementValueSource; - /* - The current state for a measurement. A state value is an instance of a measurement from a specific source. Measurements can be associated with many state values, each representing a different source for the measurement. - */ + /** \brief The current state for a measurement. A state value is an instance of a measurement from a specific source. Measurements can be associated with many state values, each representing a different source for the measurement. */ class MeasurementValue : public IdentifiedObject { public: @@ -30,10 +28,17 @@ namespace CIMPP MeasurementValue(); ~MeasurementValue() override; - CIMPP::MeasurementValueQuality* MeasurementValueQuality; /* A MeasurementValue has a MeasurementValueQuality associated with it. Default: 0 */ - CIMPP::MeasurementValueSource* MeasurementValueSource; /* The MeasurementValues updated by the source. Default: 0 */ - CIMPP::PerCent sensorAccuracy; /* The limit, expressed as a percentage of the sensor maximum, that errors will not exceed when the sensor is used under reference conditions. Default: nullptr */ - CIMPP::DateTime timeStamp; /* The time when the value was last updated Default: '' */ + /** \brief A MeasurementValue has a MeasurementValueQuality associated with it. Default: 0 */ + CIMPP::MeasurementValueQuality* MeasurementValueQuality; + + /** \brief The MeasurementValues updated by the source. Default: 0 */ + CIMPP::MeasurementValueSource* MeasurementValueSource; + + /** \brief The limit, expressed as a percentage of the sensor maximum, that errors will not exceed when the sensor is used under reference conditions. Default: nullptr */ + CIMPP::PerCent sensorAccuracy; + + /** \brief The time when the value was last updated Default: '' */ + CIMPP::DateTime timeStamp; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/MeasurementValueQuality.cpp b/CGMES_2.4.13_18DEC2013/MeasurementValueQuality.cpp index 5bebd6fd7..2137766e7 100644 --- a/CGMES_2.4.13_18DEC2013/MeasurementValueQuality.cpp +++ b/CGMES_2.4.13_18DEC2013/MeasurementValueQuality.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -MeasurementValueQuality::MeasurementValueQuality() : MeasurementValue(nullptr) {}; -MeasurementValueQuality::~MeasurementValueQuality() {}; +MeasurementValueQuality::MeasurementValueQuality() : MeasurementValue(nullptr) {} +MeasurementValueQuality::~MeasurementValueQuality() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ MeasurementValueQuality::getPossibleProfilesForAttributes() const return map; } - - bool assign_MeasurementValue_MeasurementValueQuality(BaseClass*, BaseClass*); bool assign_MeasurementValueQuality_MeasurementValue(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_MeasurementValueQuality_MeasurementValue(BaseClass* BaseClass_ptr1, return false; } - bool get_MeasurementValueQuality_MeasurementValue(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const MeasurementValueQuality* element = dynamic_cast(BaseClass_ptr1)) + const MeasurementValueQuality* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->MeasurementValue != 0) { @@ -73,7 +71,6 @@ bool get_MeasurementValueQuality_MeasurementValue(const BaseClass* BaseClass_ptr return false; } - const char MeasurementValueQuality::debugName[] = "MeasurementValueQuality"; const char* MeasurementValueQuality::debugString() const { @@ -82,7 +79,7 @@ const char* MeasurementValueQuality::debugString() const void MeasurementValueQuality::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:MeasurementValueQuality"), &MeasurementValueQuality_factory)); + factory_map.emplace("cim:MeasurementValueQuality", &MeasurementValueQuality_factory); } void MeasurementValueQuality::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void MeasurementValueQuality::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MeasurementValueQuality.MeasurementValue"), &assign_MeasurementValueQuality_MeasurementValue)); + assign_map.emplace("cim:MeasurementValueQuality.MeasurementValue", &assign_MeasurementValueQuality_MeasurementValue); } void MeasurementValueQuality::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/MeasurementValueQuality.hpp b/CGMES_2.4.13_18DEC2013/MeasurementValueQuality.hpp index e4ee4d3db..bc0991186 100644 --- a/CGMES_2.4.13_18DEC2013/MeasurementValueQuality.hpp +++ b/CGMES_2.4.13_18DEC2013/MeasurementValueQuality.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class MeasurementValue; - /* - Measurement quality flags. Bits 0-10 are defined for substation automation in draft IEC 61850 part 7-3. Bits 11-15 are reserved for future expansion by that document. Bits 16-31 are reserved for EMS applications. - */ + /** \brief Measurement quality flags. Bits 0-10 are defined for substation automation in draft IEC 61850 part 7-3. Bits 11-15 are reserved for future expansion by that document. Bits 16-31 are reserved for EMS applications. */ class MeasurementValueQuality : public Quality61850 { public: @@ -27,7 +25,8 @@ namespace CIMPP MeasurementValueQuality(); ~MeasurementValueQuality() override; - CIMPP::MeasurementValue* MeasurementValue; /* A MeasurementValue has a MeasurementValueQuality associated with it. Default: 0 */ + /** \brief A MeasurementValue has a MeasurementValueQuality associated with it. Default: 0 */ + CIMPP::MeasurementValue* MeasurementValue; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/MeasurementValueSource.cpp b/CGMES_2.4.13_18DEC2013/MeasurementValueSource.cpp index ffb5a1545..b276344bf 100644 --- a/CGMES_2.4.13_18DEC2013/MeasurementValueSource.cpp +++ b/CGMES_2.4.13_18DEC2013/MeasurementValueSource.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -MeasurementValueSource::MeasurementValueSource() {}; -MeasurementValueSource::~MeasurementValueSource() {}; +MeasurementValueSource::MeasurementValueSource() {} +MeasurementValueSource::~MeasurementValueSource() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ MeasurementValueSource::getPossibleProfilesForAttributes() const return map; } - - bool assign_MeasurementValue_MeasurementValueSource(BaseClass*, BaseClass*); bool assign_MeasurementValueSource_MeasurementValues(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_MeasurementValueSource_MeasurementValues(BaseClass* BaseClass_ptr1, } - const char MeasurementValueSource::debugName[] = "MeasurementValueSource"; const char* MeasurementValueSource::debugString() const { @@ -69,7 +66,7 @@ const char* MeasurementValueSource::debugString() const void MeasurementValueSource::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:MeasurementValueSource"), &MeasurementValueSource_factory)); + factory_map.emplace("cim:MeasurementValueSource", &MeasurementValueSource_factory); } void MeasurementValueSource::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void MeasurementValueSource::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MeasurementValueSource.MeasurementValues"), &assign_MeasurementValueSource_MeasurementValues)); + assign_map.emplace("cim:MeasurementValueSource.MeasurementValues", &assign_MeasurementValueSource_MeasurementValues); } void MeasurementValueSource::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/MeasurementValueSource.hpp b/CGMES_2.4.13_18DEC2013/MeasurementValueSource.hpp index cbb8e256c..3411d326b 100644 --- a/CGMES_2.4.13_18DEC2013/MeasurementValueSource.hpp +++ b/CGMES_2.4.13_18DEC2013/MeasurementValueSource.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class MeasurementValue; - /* - MeasurementValueSource describes the alternative sources updating a MeasurementValue. User conventions for how to use the MeasurementValueSource attributes are described in the introduction to IEC 61970-301. - */ + /** \brief MeasurementValueSource describes the alternative sources updating a MeasurementValue. User conventions for how to use the MeasurementValueSource attributes are described in the introduction to IEC 61970-301. */ class MeasurementValueSource : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP MeasurementValueSource(); ~MeasurementValueSource() override; - std::list MeasurementValues; /* A reference to the type of source that updates the MeasurementValue, e.g. SCADA, CCLink, manual, etc. User conventions for the names of sources are contained in the introduction to IEC 61970-301. Default: 0 */ + /** \brief A reference to the type of source that updates the MeasurementValue, e.g. SCADA, CCLink, manual, etc. User conventions for the names of sources are contained in the introduction to IEC 61970-301. Default: 0 */ + std::list MeasurementValues; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/MechLoad1.cpp b/CGMES_2.4.13_18DEC2013/MechLoad1.cpp index 5aceb8f4b..7016b3c19 100644 --- a/CGMES_2.4.13_18DEC2013/MechLoad1.cpp +++ b/CGMES_2.4.13_18DEC2013/MechLoad1.cpp @@ -8,15 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -MechLoad1::MechLoad1() {}; -MechLoad1::~MechLoad1() {}; +MechLoad1::MechLoad1() {} +MechLoad1::~MechLoad1() {} static const std::list PossibleProfilesForClass = { @@ -46,64 +42,66 @@ MechLoad1::getPossibleProfilesForAttributes() const return map; } - -bool assign_MechLoad1_a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MechLoad1_a(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + MechLoad1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MechLoad1_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MechLoad1_b(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + MechLoad1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MechLoad1_d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MechLoad1_d(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + MechLoad1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->d; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MechLoad1_e(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MechLoad1_e(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + MechLoad1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_MechLoad1_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + const MechLoad1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a; if (!buffer.str().empty()) @@ -117,7 +115,8 @@ bool get_MechLoad1_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_MechLoad1_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + const MechLoad1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b; if (!buffer.str().empty()) @@ -131,7 +130,8 @@ bool get_MechLoad1_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_MechLoad1_d(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + const MechLoad1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->d; if (!buffer.str().empty()) @@ -145,7 +145,8 @@ bool get_MechLoad1_d(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_MechLoad1_e(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + const MechLoad1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e; if (!buffer.str().empty()) @@ -157,8 +158,6 @@ bool get_MechLoad1_e(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char MechLoad1::debugName[] = "MechLoad1"; const char* MechLoad1::debugString() const { @@ -167,15 +166,15 @@ const char* MechLoad1::debugString() const void MechLoad1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:MechLoad1"), &MechLoad1_factory)); + factory_map.emplace("cim:MechLoad1", &MechLoad1_factory); } void MechLoad1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MechLoad1.a"), &assign_MechLoad1_a)); - assign_map.insert(std::make_pair(std::string("cim:MechLoad1.b"), &assign_MechLoad1_b)); - assign_map.insert(std::make_pair(std::string("cim:MechLoad1.d"), &assign_MechLoad1_d)); - assign_map.insert(std::make_pair(std::string("cim:MechLoad1.e"), &assign_MechLoad1_e)); + assign_map.emplace("cim:MechLoad1.a", &assign_MechLoad1_a); + assign_map.emplace("cim:MechLoad1.b", &assign_MechLoad1_b); + assign_map.emplace("cim:MechLoad1.d", &assign_MechLoad1_d); + assign_map.emplace("cim:MechLoad1.e", &assign_MechLoad1_e); } void MechLoad1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/MechLoad1.hpp b/CGMES_2.4.13_18DEC2013/MechLoad1.hpp index 5fb5620bd..9b16f17c2 100644 --- a/CGMES_2.4.13_18DEC2013/MechLoad1.hpp +++ b/CGMES_2.4.13_18DEC2013/MechLoad1.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Mechanical load model type 1. - */ + /** \brief Mechanical load model type 1. */ class MechLoad1 : public MechanicalLoadDynamics { public: @@ -27,10 +25,17 @@ namespace CIMPP MechLoad1(); ~MechLoad1() override; - CIMPP::Simple_Float a; /* Speed squared coefficient (a). Default: nullptr */ - CIMPP::Simple_Float b; /* Speed coefficient (b). Default: nullptr */ - CIMPP::Simple_Float d; /* Speed to the exponent coefficient (d). Default: nullptr */ - CIMPP::Simple_Float e; /* Exponent (e). Default: nullptr */ + /** \brief Speed squared coefficient (a). Default: nullptr */ + CIMPP::Simple_Float a; + + /** \brief Speed coefficient (b). Default: nullptr */ + CIMPP::Simple_Float b; + + /** \brief Speed to the exponent coefficient (d). Default: nullptr */ + CIMPP::Simple_Float d; + + /** \brief Exponent (e). Default: nullptr */ + CIMPP::Simple_Float e; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/MechanicalLoadDynamics.cpp b/CGMES_2.4.13_18DEC2013/MechanicalLoadDynamics.cpp index 2235d8b48..dc44cac2d 100644 --- a/CGMES_2.4.13_18DEC2013/MechanicalLoadDynamics.cpp +++ b/CGMES_2.4.13_18DEC2013/MechanicalLoadDynamics.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -MechanicalLoadDynamics::MechanicalLoadDynamics() : AsynchronousMachineDynamics(nullptr), SynchronousMachineDynamics(nullptr) {}; -MechanicalLoadDynamics::~MechanicalLoadDynamics() {}; +MechanicalLoadDynamics::MechanicalLoadDynamics() : AsynchronousMachineDynamics(nullptr), SynchronousMachineDynamics(nullptr) {} +MechanicalLoadDynamics::~MechanicalLoadDynamics() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ MechanicalLoadDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_AsynchronousMachineDynamics_MechanicalLoadDynamics(BaseClass*, BaseClass*); bool assign_MechanicalLoadDynamics_AsynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_MechanicalLoadDynamics_AsynchronousMachineDynamics(BaseClass* BaseCl } return false; } + bool assign_SynchronousMachineDynamics_MechanicalLoadDynamics(BaseClass*, BaseClass*); bool assign_MechanicalLoadDynamics_SynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_MechanicalLoadDynamics_SynchronousMachineDynamics(BaseClass* BaseCla return false; } - bool get_MechanicalLoadDynamics_AsynchronousMachineDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const MechanicalLoadDynamics* element = dynamic_cast(BaseClass_ptr1)) + const MechanicalLoadDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->AsynchronousMachineDynamics != 0) { @@ -93,7 +92,8 @@ bool get_MechanicalLoadDynamics_AsynchronousMachineDynamics(const BaseClass* Bas bool get_MechanicalLoadDynamics_SynchronousMachineDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const MechanicalLoadDynamics* element = dynamic_cast(BaseClass_ptr1)) + const MechanicalLoadDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->SynchronousMachineDynamics != 0) { @@ -104,7 +104,6 @@ bool get_MechanicalLoadDynamics_SynchronousMachineDynamics(const BaseClass* Base return false; } - const char MechanicalLoadDynamics::debugName[] = "MechanicalLoadDynamics"; const char* MechanicalLoadDynamics::debugString() const { @@ -113,7 +112,7 @@ const char* MechanicalLoadDynamics::debugString() const void MechanicalLoadDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:MechanicalLoadDynamics"), &MechanicalLoadDynamics_factory)); + factory_map.emplace("cim:MechanicalLoadDynamics", &MechanicalLoadDynamics_factory); } void MechanicalLoadDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void MechanicalLoadDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MechanicalLoadDynamics.AsynchronousMachineDynamics"), &assign_MechanicalLoadDynamics_AsynchronousMachineDynamics)); - assign_map.insert(std::make_pair(std::string("cim:MechanicalLoadDynamics.SynchronousMachineDynamics"), &assign_MechanicalLoadDynamics_SynchronousMachineDynamics)); + assign_map.emplace("cim:MechanicalLoadDynamics.AsynchronousMachineDynamics", &assign_MechanicalLoadDynamics_AsynchronousMachineDynamics); + assign_map.emplace("cim:MechanicalLoadDynamics.SynchronousMachineDynamics", &assign_MechanicalLoadDynamics_SynchronousMachineDynamics); } void MechanicalLoadDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/MechanicalLoadDynamics.hpp b/CGMES_2.4.13_18DEC2013/MechanicalLoadDynamics.hpp index 58676855b..57b474f87 100644 --- a/CGMES_2.4.13_18DEC2013/MechanicalLoadDynamics.hpp +++ b/CGMES_2.4.13_18DEC2013/MechanicalLoadDynamics.hpp @@ -18,9 +18,7 @@ namespace CIMPP class AsynchronousMachineDynamics; class SynchronousMachineDynamics; - /* - Mechanical load function block whose behavior is described by reference to a standard model - */ + /** \brief Mechanical load function block whose behavior is described by reference to a standard model */ class MechanicalLoadDynamics : public DynamicsFunctionBlock { public: @@ -28,8 +26,11 @@ namespace CIMPP MechanicalLoadDynamics(); ~MechanicalLoadDynamics() override; - CIMPP::AsynchronousMachineDynamics* AsynchronousMachineDynamics; /* Asynchronous machine model with which this mechanical load model is associated. Default: 0 */ - CIMPP::SynchronousMachineDynamics* SynchronousMachineDynamics; /* Synchronous machine model with which this mechanical load model is associated. Default: 0 */ + /** \brief Asynchronous machine model with which this mechanical load model is associated. Default: 0 */ + CIMPP::AsynchronousMachineDynamics* AsynchronousMachineDynamics; + + /** \brief Synchronous machine model with which this mechanical load model is associated. Default: 0 */ + CIMPP::SynchronousMachineDynamics* SynchronousMachineDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/MechanicalLoadUserDefined.cpp b/CGMES_2.4.13_18DEC2013/MechanicalLoadUserDefined.cpp index e750697ad..0fcdb6dee 100644 --- a/CGMES_2.4.13_18DEC2013/MechanicalLoadUserDefined.cpp +++ b/CGMES_2.4.13_18DEC2013/MechanicalLoadUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -MechanicalLoadUserDefined::MechanicalLoadUserDefined() {}; -MechanicalLoadUserDefined::~MechanicalLoadUserDefined() {}; +MechanicalLoadUserDefined::MechanicalLoadUserDefined() {} +MechanicalLoadUserDefined::~MechanicalLoadUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ MechanicalLoadUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_MechanicalLoadUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (MechanicalLoadUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_MechanicalLoadUserDefined(BaseClass*, BaseClass*); bool assign_MechanicalLoadUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_MechanicalLoadUserDefined_ProprietaryParameterDynamics(BaseClass* Ba return false; } +bool assign_MechanicalLoadUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + MechanicalLoadUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_MechanicalLoadUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MechanicalLoadUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const MechanicalLoadUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_MechanicalLoadUserDefined_proprietary(const BaseClass* BaseClass_ptr1, return false; } - - const char MechanicalLoadUserDefined::debugName[] = "MechanicalLoadUserDefined"; const char* MechanicalLoadUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* MechanicalLoadUserDefined::debugString() const void MechanicalLoadUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:MechanicalLoadUserDefined"), &MechanicalLoadUserDefined_factory)); + factory_map.emplace("cim:MechanicalLoadUserDefined", &MechanicalLoadUserDefined_factory); } void MechanicalLoadUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MechanicalLoadUserDefined.proprietary"), &assign_MechanicalLoadUserDefined_proprietary)); + assign_map.emplace("cim:MechanicalLoadUserDefined.proprietary", &assign_MechanicalLoadUserDefined_proprietary); } void MechanicalLoadUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MechanicalLoadUserDefined.ProprietaryParameterDynamics"), &assign_MechanicalLoadUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:MechanicalLoadUserDefined.ProprietaryParameterDynamics", &assign_MechanicalLoadUserDefined_ProprietaryParameterDynamics); } void MechanicalLoadUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/MechanicalLoadUserDefined.hpp b/CGMES_2.4.13_18DEC2013/MechanicalLoadUserDefined.hpp index d48634cbc..474c01c3d 100644 --- a/CGMES_2.4.13_18DEC2013/MechanicalLoadUserDefined.hpp +++ b/CGMES_2.4.13_18DEC2013/MechanicalLoadUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Mechanical load function block whose dynamic behaviour is described by - */ + /** \brief Mechanical load function block whose dynamic behaviour is described by */ class MechanicalLoadUserDefined : public MechanicalLoadDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP MechanicalLoadUserDefined(); ~MechanicalLoadUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Money.hpp b/CGMES_2.4.13_18DEC2013/Money.hpp index b6c47f743..5a75488fd 100644 --- a/CGMES_2.4.13_18DEC2013/Money.hpp +++ b/CGMES_2.4.13_18DEC2013/Money.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Amount of money. - */ + /** \brief Amount of money. */ class Money { public: diff --git a/CGMES_2.4.13_18DEC2013/MonthDay.hpp b/CGMES_2.4.13_18DEC2013/MonthDay.hpp index 1669168fe..ae83a209f 100644 --- a/CGMES_2.4.13_18DEC2013/MonthDay.hpp +++ b/CGMES_2.4.13_18DEC2013/MonthDay.hpp @@ -4,22 +4,20 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen */ -#include #include #include +#include namespace CIMPP { - /* - MonthDay format as "--mm-dd", which conforms with XSD data type gMonthDay. - */ + /** \brief MonthDay format as "--mm-dd", which conforms with XSD data type gMonthDay. */ class MonthDay { public: MonthDay() : initialized(false) {} MonthDay(const std::string& value) : value(value), initialized(true) {} - MonthDay& operator=(const std::string &rop); + MonthDay& operator=(const std::string& rop); operator std::string() const; std::string value; diff --git a/CGMES_2.4.13_18DEC2013/MutualCoupling.cpp b/CGMES_2.4.13_18DEC2013/MutualCoupling.cpp index bbd4b5962..0b97f5f70 100644 --- a/CGMES_2.4.13_18DEC2013/MutualCoupling.cpp +++ b/CGMES_2.4.13_18DEC2013/MutualCoupling.cpp @@ -9,20 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "Terminal.hpp" -#include "Terminal.hpp" -#include "Susceptance.hpp" -#include "Length.hpp" -#include "Length.hpp" -#include "Length.hpp" -#include "Length.hpp" -#include "Conductance.hpp" -#include "Resistance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -MutualCoupling::MutualCoupling() : First_Terminal(nullptr), Second_Terminal(nullptr) {}; -MutualCoupling::~MutualCoupling() {}; +MutualCoupling::MutualCoupling() : First_Terminal(nullptr), Second_Terminal(nullptr) {} +MutualCoupling::~MutualCoupling() {} static const std::list PossibleProfilesForClass = { @@ -58,148 +49,184 @@ MutualCoupling::getPossibleProfilesForAttributes() const return map; } +bool assign_Terminal_HasFirstMutualCoupling(BaseClass*, BaseClass*); +bool assign_MutualCoupling_First_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->First_Terminal != element2) + { + element->First_Terminal = element2; + return assign_Terminal_HasFirstMutualCoupling(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Terminal_HasSecondMutualCoupling(BaseClass*, BaseClass*); +bool assign_MutualCoupling_Second_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Second_Terminal != element2) + { + element->Second_Terminal = element2; + return assign_Terminal_HasSecondMutualCoupling(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_MutualCoupling_b0ch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MutualCoupling_b0ch(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b0ch; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MutualCoupling_distance11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MutualCoupling_distance11(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->distance11; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MutualCoupling_distance12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MutualCoupling_distance12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->distance12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MutualCoupling_distance21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MutualCoupling_distance21(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->distance21; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MutualCoupling_distance22(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MutualCoupling_distance22(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->distance22; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MutualCoupling_g0ch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MutualCoupling_g0ch(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g0ch; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MutualCoupling_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MutualCoupling_r0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MutualCoupling_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MutualCoupling_x0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_Terminal_HasFirstMutualCoupling(BaseClass*, BaseClass*); -bool assign_MutualCoupling_First_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_MutualCoupling_First_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - MutualCoupling* element = dynamic_cast(BaseClass_ptr1); - Terminal* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->First_Terminal != element2) + if (element->First_Terminal != 0) { - element->First_Terminal = element2; - return assign_Terminal_HasFirstMutualCoupling(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->First_Terminal); + return true; } - return true; } return false; } -bool assign_Terminal_HasSecondMutualCoupling(BaseClass*, BaseClass*); -bool assign_MutualCoupling_Second_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool get_MutualCoupling_Second_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - MutualCoupling* element = dynamic_cast(BaseClass_ptr1); - Terminal* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->Second_Terminal != element2) + if (element->Second_Terminal != 0) { - element->Second_Terminal = element2; - return assign_Terminal_HasSecondMutualCoupling(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->Second_Terminal); + return true; } - return true; } return false; } bool get_MutualCoupling_b0ch(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b0ch; if (!buffer.str().empty()) @@ -213,7 +240,8 @@ bool get_MutualCoupling_b0ch(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_MutualCoupling_distance11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->distance11; if (!buffer.str().empty()) @@ -227,7 +255,8 @@ bool get_MutualCoupling_distance11(const BaseClass* BaseClass_ptr1, std::strings bool get_MutualCoupling_distance12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->distance12; if (!buffer.str().empty()) @@ -241,7 +270,8 @@ bool get_MutualCoupling_distance12(const BaseClass* BaseClass_ptr1, std::strings bool get_MutualCoupling_distance21(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->distance21; if (!buffer.str().empty()) @@ -255,7 +285,8 @@ bool get_MutualCoupling_distance21(const BaseClass* BaseClass_ptr1, std::strings bool get_MutualCoupling_distance22(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->distance22; if (!buffer.str().empty()) @@ -269,7 +300,8 @@ bool get_MutualCoupling_distance22(const BaseClass* BaseClass_ptr1, std::strings bool get_MutualCoupling_g0ch(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g0ch; if (!buffer.str().empty()) @@ -283,7 +315,8 @@ bool get_MutualCoupling_g0ch(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_MutualCoupling_r0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r0; if (!buffer.str().empty()) @@ -297,7 +330,8 @@ bool get_MutualCoupling_r0(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_MutualCoupling_x0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x0; if (!buffer.str().empty()) @@ -309,34 +343,6 @@ bool get_MutualCoupling_x0(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - -bool get_MutualCoupling_First_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->First_Terminal != 0) - { - BaseClass_list.push_back(element->First_Terminal); - return true; - } - } - return false; -} - -bool get_MutualCoupling_Second_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->Second_Terminal != 0) - { - BaseClass_list.push_back(element->Second_Terminal); - return true; - } - } - return false; -} - - const char MutualCoupling::debugName[] = "MutualCoupling"; const char* MutualCoupling::debugString() const { @@ -345,25 +351,25 @@ const char* MutualCoupling::debugString() const void MutualCoupling::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:MutualCoupling"), &MutualCoupling_factory)); + factory_map.emplace("cim:MutualCoupling", &MutualCoupling_factory); } void MutualCoupling::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.b0ch"), &assign_MutualCoupling_b0ch)); - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.distance11"), &assign_MutualCoupling_distance11)); - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.distance12"), &assign_MutualCoupling_distance12)); - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.distance21"), &assign_MutualCoupling_distance21)); - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.distance22"), &assign_MutualCoupling_distance22)); - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.g0ch"), &assign_MutualCoupling_g0ch)); - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.r0"), &assign_MutualCoupling_r0)); - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.x0"), &assign_MutualCoupling_x0)); + assign_map.emplace("cim:MutualCoupling.b0ch", &assign_MutualCoupling_b0ch); + assign_map.emplace("cim:MutualCoupling.distance11", &assign_MutualCoupling_distance11); + assign_map.emplace("cim:MutualCoupling.distance12", &assign_MutualCoupling_distance12); + assign_map.emplace("cim:MutualCoupling.distance21", &assign_MutualCoupling_distance21); + assign_map.emplace("cim:MutualCoupling.distance22", &assign_MutualCoupling_distance22); + assign_map.emplace("cim:MutualCoupling.g0ch", &assign_MutualCoupling_g0ch); + assign_map.emplace("cim:MutualCoupling.r0", &assign_MutualCoupling_r0); + assign_map.emplace("cim:MutualCoupling.x0", &assign_MutualCoupling_x0); } void MutualCoupling::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.First_Terminal"), &assign_MutualCoupling_First_Terminal)); - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.Second_Terminal"), &assign_MutualCoupling_Second_Terminal)); + assign_map.emplace("cim:MutualCoupling.First_Terminal", &assign_MutualCoupling_First_Terminal); + assign_map.emplace("cim:MutualCoupling.Second_Terminal", &assign_MutualCoupling_Second_Terminal); } void MutualCoupling::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/MutualCoupling.hpp b/CGMES_2.4.13_18DEC2013/MutualCoupling.hpp index a218d4c4a..00b130bed 100644 --- a/CGMES_2.4.13_18DEC2013/MutualCoupling.hpp +++ b/CGMES_2.4.13_18DEC2013/MutualCoupling.hpp @@ -22,9 +22,7 @@ namespace CIMPP { class Terminal; - /* - This class represents the zero sequence line mutual coupling. - */ + /** \brief This class represents the zero sequence line mutual coupling. */ class MutualCoupling : public IdentifiedObject { public: @@ -32,16 +30,35 @@ namespace CIMPP MutualCoupling(); ~MutualCoupling() override; - CIMPP::Terminal* First_Terminal; /* The starting terminal for the calculation of distances along the first branch of the mutual coupling. Normally MutualCoupling would only be used for terminals of AC line segments. The first and second terminals of a mutual coupling should point to different AC line segments. Default: 0 */ - CIMPP::Terminal* Second_Terminal; /* The starting terminal for the calculation of distances along the second branch of the mutual coupling. Default: 0 */ - CIMPP::Susceptance b0ch; /* Zero sequence mutual coupling shunt (charging) susceptance, uniformly distributed, of the entire line section. Default: nullptr */ - CIMPP::Length distance11; /* Distance to the start of the coupled region from the first line`s terminal having sequence number equal to 1. Default: nullptr */ - CIMPP::Length distance12; /* Distance to the end of the coupled region from the first line`s terminal with sequence number equal to 1. Default: nullptr */ - CIMPP::Length distance21; /* Distance to the start of coupled region from the second line`s terminal with sequence number equal to 1. Default: nullptr */ - CIMPP::Length distance22; /* Distance to the end of coupled region from the second line`s terminal with sequence number equal to 1. Default: nullptr */ - CIMPP::Conductance g0ch; /* Zero sequence mutual coupling shunt (charging) conductance, uniformly distributed, of the entire line section. Default: nullptr */ - CIMPP::Resistance r0; /* Zero sequence branch-to-branch mutual impedance coupling, resistance. Default: nullptr */ - CIMPP::Reactance x0; /* Zero sequence branch-to-branch mutual impedance coupling, reactance. Default: nullptr */ + /** \brief The starting terminal for the calculation of distances along the first branch of the mutual coupling. Normally MutualCoupling would only be used for terminals of AC line segments. The first and second terminals of a mutual coupling should point to different AC line segments. Default: 0 */ + CIMPP::Terminal* First_Terminal; + + /** \brief The starting terminal for the calculation of distances along the second branch of the mutual coupling. Default: 0 */ + CIMPP::Terminal* Second_Terminal; + + /** \brief Zero sequence mutual coupling shunt (charging) susceptance, uniformly distributed, of the entire line section. Default: nullptr */ + CIMPP::Susceptance b0ch; + + /** \brief Distance to the start of the coupled region from the first line`s terminal having sequence number equal to 1. Default: nullptr */ + CIMPP::Length distance11; + + /** \brief Distance to the end of the coupled region from the first line`s terminal with sequence number equal to 1. Default: nullptr */ + CIMPP::Length distance12; + + /** \brief Distance to the start of coupled region from the second line`s terminal with sequence number equal to 1. Default: nullptr */ + CIMPP::Length distance21; + + /** \brief Distance to the end of coupled region from the second line`s terminal with sequence number equal to 1. Default: nullptr */ + CIMPP::Length distance22; + + /** \brief Zero sequence mutual coupling shunt (charging) conductance, uniformly distributed, of the entire line section. Default: nullptr */ + CIMPP::Conductance g0ch; + + /** \brief Zero sequence branch-to-branch mutual impedance coupling, resistance. Default: nullptr */ + CIMPP::Resistance r0; + + /** \brief Zero sequence branch-to-branch mutual impedance coupling, reactance. Default: nullptr */ + CIMPP::Reactance x0; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/NonConformLoad.cpp b/CGMES_2.4.13_18DEC2013/NonConformLoad.cpp index aa7ad0696..7d66953ed 100644 --- a/CGMES_2.4.13_18DEC2013/NonConformLoad.cpp +++ b/CGMES_2.4.13_18DEC2013/NonConformLoad.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -NonConformLoad::NonConformLoad() : LoadGroup(nullptr) {}; -NonConformLoad::~NonConformLoad() {}; +NonConformLoad::NonConformLoad() : LoadGroup(nullptr) {} +NonConformLoad::~NonConformLoad() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ NonConformLoad::getPossibleProfilesForAttributes() const return map; } - - bool assign_NonConformLoadGroup_EnergyConsumers(BaseClass*, BaseClass*); bool assign_NonConformLoad_LoadGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_NonConformLoad_LoadGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseC return false; } - bool get_NonConformLoad_LoadGroup(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const NonConformLoad* element = dynamic_cast(BaseClass_ptr1)) + const NonConformLoad* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->LoadGroup != 0) { @@ -73,7 +71,6 @@ bool get_NonConformLoad_LoadGroup(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:NonConformLoad"), &NonConformLoad_factory)); + factory_map.emplace("cim:NonConformLoad", &NonConformLoad_factory); } void NonConformLoad::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void NonConformLoad::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:NonConformLoad.LoadGroup"), &assign_NonConformLoad_LoadGroup)); + assign_map.emplace("cim:NonConformLoad.LoadGroup", &assign_NonConformLoad_LoadGroup); } void NonConformLoad::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/NonConformLoad.hpp b/CGMES_2.4.13_18DEC2013/NonConformLoad.hpp index 2e336a8b1..d30929052 100644 --- a/CGMES_2.4.13_18DEC2013/NonConformLoad.hpp +++ b/CGMES_2.4.13_18DEC2013/NonConformLoad.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class NonConformLoadGroup; - /* - NonConformLoad represent loads that do not follow a daily load change pattern and changes are not correlated with the daily load change pattern. - */ + /** \brief NonConformLoad represent loads that do not follow a daily load change pattern and changes are not correlated with the daily load change pattern. */ class NonConformLoad : public EnergyConsumer { public: @@ -27,7 +25,8 @@ namespace CIMPP NonConformLoad(); ~NonConformLoad() override; - CIMPP::NonConformLoadGroup* LoadGroup; /* Conform loads assigned to this ConformLoadGroup. Default: 0 */ + /** \brief Conform loads assigned to this ConformLoadGroup. Default: 0 */ + CIMPP::NonConformLoadGroup* LoadGroup; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/NonConformLoadGroup.cpp b/CGMES_2.4.13_18DEC2013/NonConformLoadGroup.cpp index 23646be3e..0ffa2111f 100644 --- a/CGMES_2.4.13_18DEC2013/NonConformLoadGroup.cpp +++ b/CGMES_2.4.13_18DEC2013/NonConformLoadGroup.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -NonConformLoadGroup::NonConformLoadGroup() {}; -NonConformLoadGroup::~NonConformLoadGroup() {}; +NonConformLoadGroup::NonConformLoadGroup() {} +NonConformLoadGroup::~NonConformLoadGroup() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ NonConformLoadGroup::getPossibleProfilesForAttributes() const return map; } - - bool assign_NonConformLoad_LoadGroup(BaseClass*, BaseClass*); bool assign_NonConformLoadGroup_EnergyConsumers(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_NonConformLoadGroup_EnergyConsumers(BaseClass* BaseClass_ptr1, BaseC } return false; } + bool assign_NonConformLoadSchedule_NonConformLoadGroup(BaseClass*, BaseClass*); bool assign_NonConformLoadGroup_NonConformLoadSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -87,7 +86,7 @@ const char* NonConformLoadGroup::debugString() const void NonConformLoadGroup::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:NonConformLoadGroup"), &NonConformLoadGroup_factory)); + factory_map.emplace("cim:NonConformLoadGroup", &NonConformLoadGroup_factory); } void NonConformLoadGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -96,8 +95,8 @@ void NonConformLoadGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:NonConformLoadGroup.EnergyConsumers"), &assign_NonConformLoadGroup_EnergyConsumers)); - assign_map.insert(std::make_pair(std::string("cim:NonConformLoadGroup.NonConformLoadSchedules"), &assign_NonConformLoadGroup_NonConformLoadSchedules)); + assign_map.emplace("cim:NonConformLoadGroup.EnergyConsumers", &assign_NonConformLoadGroup_EnergyConsumers); + assign_map.emplace("cim:NonConformLoadGroup.NonConformLoadSchedules", &assign_NonConformLoadGroup_NonConformLoadSchedules); } void NonConformLoadGroup::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/NonConformLoadGroup.hpp b/CGMES_2.4.13_18DEC2013/NonConformLoadGroup.hpp index db8e81eaa..928188af7 100644 --- a/CGMES_2.4.13_18DEC2013/NonConformLoadGroup.hpp +++ b/CGMES_2.4.13_18DEC2013/NonConformLoadGroup.hpp @@ -18,9 +18,7 @@ namespace CIMPP class NonConformLoad; class NonConformLoadSchedule; - /* - Loads that do not follow a daily and seasonal load variation pattern. - */ + /** \brief Loads that do not follow a daily and seasonal load variation pattern. */ class NonConformLoadGroup : public LoadGroup { public: @@ -28,8 +26,11 @@ namespace CIMPP NonConformLoadGroup(); ~NonConformLoadGroup() override; - std::list EnergyConsumers; /* Group of this ConformLoad. Default: 0 */ - std::list NonConformLoadSchedules; /* The NonConformLoadSchedules in the NonConformLoadGroup. Default: 0 */ + /** \brief Group of this ConformLoad. Default: 0 */ + std::list EnergyConsumers; + + /** \brief The NonConformLoadSchedules in the NonConformLoadGroup. Default: 0 */ + std::list NonConformLoadSchedules; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/NonConformLoadSchedule.cpp b/CGMES_2.4.13_18DEC2013/NonConformLoadSchedule.cpp index c7ee3837c..f4a6a8203 100644 --- a/CGMES_2.4.13_18DEC2013/NonConformLoadSchedule.cpp +++ b/CGMES_2.4.13_18DEC2013/NonConformLoadSchedule.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -NonConformLoadSchedule::NonConformLoadSchedule() : NonConformLoadGroup(nullptr) {}; -NonConformLoadSchedule::~NonConformLoadSchedule() {}; +NonConformLoadSchedule::NonConformLoadSchedule() : NonConformLoadGroup(nullptr) {} +NonConformLoadSchedule::~NonConformLoadSchedule() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ NonConformLoadSchedule::getPossibleProfilesForAttributes() const return map; } - - bool assign_NonConformLoadGroup_NonConformLoadSchedules(BaseClass*, BaseClass*); bool assign_NonConformLoadSchedule_NonConformLoadGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_NonConformLoadSchedule_NonConformLoadGroup(BaseClass* BaseClass_ptr1 return false; } - bool get_NonConformLoadSchedule_NonConformLoadGroup(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const NonConformLoadSchedule* element = dynamic_cast(BaseClass_ptr1)) + const NonConformLoadSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->NonConformLoadGroup != 0) { @@ -73,7 +71,6 @@ bool get_NonConformLoadSchedule_NonConformLoadGroup(const BaseClass* BaseClass_p return false; } - const char NonConformLoadSchedule::debugName[] = "NonConformLoadSchedule"; const char* NonConformLoadSchedule::debugString() const { @@ -82,7 +79,7 @@ const char* NonConformLoadSchedule::debugString() const void NonConformLoadSchedule::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:NonConformLoadSchedule"), &NonConformLoadSchedule_factory)); + factory_map.emplace("cim:NonConformLoadSchedule", &NonConformLoadSchedule_factory); } void NonConformLoadSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void NonConformLoadSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:NonConformLoadSchedule.NonConformLoadGroup"), &assign_NonConformLoadSchedule_NonConformLoadGroup)); + assign_map.emplace("cim:NonConformLoadSchedule.NonConformLoadGroup", &assign_NonConformLoadSchedule_NonConformLoadGroup); } void NonConformLoadSchedule::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/NonConformLoadSchedule.hpp b/CGMES_2.4.13_18DEC2013/NonConformLoadSchedule.hpp index be2f843db..c0ae51ebb 100644 --- a/CGMES_2.4.13_18DEC2013/NonConformLoadSchedule.hpp +++ b/CGMES_2.4.13_18DEC2013/NonConformLoadSchedule.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class NonConformLoadGroup; - /* - An active power (Y1-axis) and reactive power (Y2-axis) schedule (curves) versus time (X-axis) for non-conforming loads, e.g., large industrial load or power station service (where modeled). - */ + /** \brief An active power (Y1-axis) and reactive power (Y2-axis) schedule (curves) versus time (X-axis) for non-conforming loads, e.g., large industrial load or power station service (where modeled). */ class NonConformLoadSchedule : public SeasonDayTypeSchedule { public: @@ -27,7 +25,8 @@ namespace CIMPP NonConformLoadSchedule(); ~NonConformLoadSchedule() override; - CIMPP::NonConformLoadGroup* NonConformLoadGroup; /* The NonConformLoadGroup where the NonConformLoadSchedule belongs. Default: 0 */ + /** \brief The NonConformLoadGroup where the NonConformLoadSchedule belongs. Default: 0 */ + CIMPP::NonConformLoadGroup* NonConformLoadGroup; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/NonlinearShuntCompensator.cpp b/CGMES_2.4.13_18DEC2013/NonlinearShuntCompensator.cpp index 13f02ad2f..5fd272895 100644 --- a/CGMES_2.4.13_18DEC2013/NonlinearShuntCompensator.cpp +++ b/CGMES_2.4.13_18DEC2013/NonlinearShuntCompensator.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -NonlinearShuntCompensator::NonlinearShuntCompensator() {}; -NonlinearShuntCompensator::~NonlinearShuntCompensator() {}; +NonlinearShuntCompensator::NonlinearShuntCompensator() {} +NonlinearShuntCompensator::~NonlinearShuntCompensator() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ NonlinearShuntCompensator::getPossibleProfilesForAttributes() const return map; } - - bool assign_NonlinearShuntCompensatorPoint_NonlinearShuntCompensator(BaseClass*, BaseClass*); bool assign_NonlinearShuntCompensator_NonlinearShuntCompensatorPoints(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,7 +59,6 @@ bool assign_NonlinearShuntCompensator_NonlinearShuntCompensatorPoints(BaseClass* } - const char NonlinearShuntCompensator::debugName[] = "NonlinearShuntCompensator"; const char* NonlinearShuntCompensator::debugString() const { @@ -70,7 +67,7 @@ const char* NonlinearShuntCompensator::debugString() const void NonlinearShuntCompensator::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensator"), &NonlinearShuntCompensator_factory)); + factory_map.emplace("cim:NonlinearShuntCompensator", &NonlinearShuntCompensator_factory); } void NonlinearShuntCompensator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -79,7 +76,7 @@ void NonlinearShuntCompensator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensator.NonlinearShuntCompensatorPoints"), &assign_NonlinearShuntCompensator_NonlinearShuntCompensatorPoints)); + assign_map.emplace("cim:NonlinearShuntCompensator.NonlinearShuntCompensatorPoints", &assign_NonlinearShuntCompensator_NonlinearShuntCompensatorPoints); } void NonlinearShuntCompensator::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/NonlinearShuntCompensator.hpp b/CGMES_2.4.13_18DEC2013/NonlinearShuntCompensator.hpp index c67ea0fa6..c39f1cb1f 100644 --- a/CGMES_2.4.13_18DEC2013/NonlinearShuntCompensator.hpp +++ b/CGMES_2.4.13_18DEC2013/NonlinearShuntCompensator.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class NonlinearShuntCompensatorPoint; - /* - A non linear shunt compensator has bank or section admittance values that differs. - */ + /** \brief A non linear shunt compensator has bank or section admittance values that differs. */ class NonlinearShuntCompensator : public ShuntCompensator { public: @@ -27,7 +25,8 @@ namespace CIMPP NonlinearShuntCompensator(); ~NonlinearShuntCompensator() override; - std::list NonlinearShuntCompensatorPoints; /* All points of the non-linear shunt compensator. Default: 0 */ + /** \brief All points of the non-linear shunt compensator. Default: 0 */ + std::list NonlinearShuntCompensatorPoints; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/NonlinearShuntCompensatorPoint.cpp b/CGMES_2.4.13_18DEC2013/NonlinearShuntCompensatorPoint.cpp index 527cb2218..39f049438 100644 --- a/CGMES_2.4.13_18DEC2013/NonlinearShuntCompensatorPoint.cpp +++ b/CGMES_2.4.13_18DEC2013/NonlinearShuntCompensatorPoint.cpp @@ -9,16 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "NonlinearShuntCompensator.hpp" -#include "Susceptance.hpp" -#include "Susceptance.hpp" -#include "Conductance.hpp" -#include "Conductance.hpp" -#include "Integer.hpp" using namespace CIMPP; -NonlinearShuntCompensatorPoint::NonlinearShuntCompensatorPoint() : NonlinearShuntCompensator(nullptr) {}; -NonlinearShuntCompensatorPoint::~NonlinearShuntCompensatorPoint() {}; +NonlinearShuntCompensatorPoint::NonlinearShuntCompensatorPoint() : NonlinearShuntCompensator(nullptr) {} +NonlinearShuntCompensatorPoint::~NonlinearShuntCompensatorPoint() {} static const std::list PossibleProfilesForClass = { @@ -50,93 +45,111 @@ NonlinearShuntCompensatorPoint::getPossibleProfilesForAttributes() const return map; } +bool assign_NonlinearShuntCompensator_NonlinearShuntCompensatorPoints(BaseClass*, BaseClass*); +bool assign_NonlinearShuntCompensatorPoint_NonlinearShuntCompensator(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + NonlinearShuntCompensator* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->NonlinearShuntCompensator != element2) + { + element->NonlinearShuntCompensator = element2; + return assign_NonlinearShuntCompensator_NonlinearShuntCompensatorPoints(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_NonlinearShuntCompensatorPoint_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_NonlinearShuntCompensatorPoint_b(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_NonlinearShuntCompensatorPoint_b0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_NonlinearShuntCompensatorPoint_b0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_NonlinearShuntCompensatorPoint_g(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_NonlinearShuntCompensatorPoint_g(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_NonlinearShuntCompensatorPoint_g0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_NonlinearShuntCompensatorPoint_g0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_NonlinearShuntCompensatorPoint_sectionNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_NonlinearShuntCompensatorPoint_sectionNumber(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->sectionNumber; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_NonlinearShuntCompensator_NonlinearShuntCompensatorPoints(BaseClass*, BaseClass*); -bool assign_NonlinearShuntCompensatorPoint_NonlinearShuntCompensator(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_NonlinearShuntCompensatorPoint_NonlinearShuntCompensator(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); - NonlinearShuntCompensator* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->NonlinearShuntCompensator != element2) + if (element->NonlinearShuntCompensator != 0) { - element->NonlinearShuntCompensator = element2; - return assign_NonlinearShuntCompensator_NonlinearShuntCompensatorPoints(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->NonlinearShuntCompensator); + return true; } - return true; } return false; } bool get_NonlinearShuntCompensatorPoint_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b; if (!buffer.str().empty()) @@ -150,7 +163,8 @@ bool get_NonlinearShuntCompensatorPoint_b(const BaseClass* BaseClass_ptr1, std:: bool get_NonlinearShuntCompensatorPoint_b0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b0; if (!buffer.str().empty()) @@ -164,7 +178,8 @@ bool get_NonlinearShuntCompensatorPoint_b0(const BaseClass* BaseClass_ptr1, std: bool get_NonlinearShuntCompensatorPoint_g(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g; if (!buffer.str().empty()) @@ -178,7 +193,8 @@ bool get_NonlinearShuntCompensatorPoint_g(const BaseClass* BaseClass_ptr1, std:: bool get_NonlinearShuntCompensatorPoint_g0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g0; if (!buffer.str().empty()) @@ -192,7 +208,8 @@ bool get_NonlinearShuntCompensatorPoint_g0(const BaseClass* BaseClass_ptr1, std: bool get_NonlinearShuntCompensatorPoint_sectionNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->sectionNumber; if (!buffer.str().empty()) @@ -204,21 +221,6 @@ bool get_NonlinearShuntCompensatorPoint_sectionNumber(const BaseClass* BaseClass return false; } - -bool get_NonlinearShuntCompensatorPoint_NonlinearShuntCompensator(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->NonlinearShuntCompensator != 0) - { - BaseClass_list.push_back(element->NonlinearShuntCompensator); - return true; - } - } - return false; -} - - const char NonlinearShuntCompensatorPoint::debugName[] = "NonlinearShuntCompensatorPoint"; const char* NonlinearShuntCompensatorPoint::debugString() const { @@ -227,21 +229,21 @@ const char* NonlinearShuntCompensatorPoint::debugString() const void NonlinearShuntCompensatorPoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensatorPoint"), &NonlinearShuntCompensatorPoint_factory)); + factory_map.emplace("cim:NonlinearShuntCompensatorPoint", &NonlinearShuntCompensatorPoint_factory); } void NonlinearShuntCompensatorPoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensatorPoint.b"), &assign_NonlinearShuntCompensatorPoint_b)); - assign_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensatorPoint.b0"), &assign_NonlinearShuntCompensatorPoint_b0)); - assign_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensatorPoint.g"), &assign_NonlinearShuntCompensatorPoint_g)); - assign_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensatorPoint.g0"), &assign_NonlinearShuntCompensatorPoint_g0)); - assign_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensatorPoint.sectionNumber"), &assign_NonlinearShuntCompensatorPoint_sectionNumber)); + assign_map.emplace("cim:NonlinearShuntCompensatorPoint.b", &assign_NonlinearShuntCompensatorPoint_b); + assign_map.emplace("cim:NonlinearShuntCompensatorPoint.b0", &assign_NonlinearShuntCompensatorPoint_b0); + assign_map.emplace("cim:NonlinearShuntCompensatorPoint.g", &assign_NonlinearShuntCompensatorPoint_g); + assign_map.emplace("cim:NonlinearShuntCompensatorPoint.g0", &assign_NonlinearShuntCompensatorPoint_g0); + assign_map.emplace("cim:NonlinearShuntCompensatorPoint.sectionNumber", &assign_NonlinearShuntCompensatorPoint_sectionNumber); } void NonlinearShuntCompensatorPoint::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensatorPoint.NonlinearShuntCompensator"), &assign_NonlinearShuntCompensatorPoint_NonlinearShuntCompensator)); + assign_map.emplace("cim:NonlinearShuntCompensatorPoint.NonlinearShuntCompensator", &assign_NonlinearShuntCompensatorPoint_NonlinearShuntCompensator); } void NonlinearShuntCompensatorPoint::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/NonlinearShuntCompensatorPoint.hpp b/CGMES_2.4.13_18DEC2013/NonlinearShuntCompensatorPoint.hpp index 7eaca08db..eaf108691 100644 --- a/CGMES_2.4.13_18DEC2013/NonlinearShuntCompensatorPoint.hpp +++ b/CGMES_2.4.13_18DEC2013/NonlinearShuntCompensatorPoint.hpp @@ -20,9 +20,7 @@ namespace CIMPP { class NonlinearShuntCompensator; - /* - A non linear shunt compensator bank or section admittance value. - */ + /** \brief A non linear shunt compensator bank or section admittance value. */ class NonlinearShuntCompensatorPoint : public BaseClass { public: @@ -30,12 +28,23 @@ namespace CIMPP NonlinearShuntCompensatorPoint(); ~NonlinearShuntCompensatorPoint() override; - CIMPP::NonlinearShuntCompensator* NonlinearShuntCompensator; /* Non-linear shunt compensator owning this point. Default: 0 */ - CIMPP::Susceptance b; /* Positive sequence shunt (charging) susceptance per section Default: nullptr */ - CIMPP::Susceptance b0; /* Zero sequence shunt (charging) susceptance per section Default: nullptr */ - CIMPP::Conductance g; /* Positive sequence shunt (charging) conductance per section Default: nullptr */ - CIMPP::Conductance g0; /* Zero sequence shunt (charging) conductance per section Default: nullptr */ - CIMPP::Integer sectionNumber; /* The number of the section. Default: 0 */ + /** \brief Non-linear shunt compensator owning this point. Default: 0 */ + CIMPP::NonlinearShuntCompensator* NonlinearShuntCompensator; + + /** \brief Positive sequence shunt (charging) susceptance per section Default: nullptr */ + CIMPP::Susceptance b; + + /** \brief Zero sequence shunt (charging) susceptance per section Default: nullptr */ + CIMPP::Susceptance b0; + + /** \brief Positive sequence shunt (charging) conductance per section Default: nullptr */ + CIMPP::Conductance g; + + /** \brief Zero sequence shunt (charging) conductance per section Default: nullptr */ + CIMPP::Conductance g0; + + /** \brief The number of the section. Default: 0 */ + CIMPP::Integer sectionNumber; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/NuclearGeneratingUnit.cpp b/CGMES_2.4.13_18DEC2013/NuclearGeneratingUnit.cpp index 9e3fcec38..3ce0ed75a 100644 --- a/CGMES_2.4.13_18DEC2013/NuclearGeneratingUnit.cpp +++ b/CGMES_2.4.13_18DEC2013/NuclearGeneratingUnit.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -NuclearGeneratingUnit::NuclearGeneratingUnit() {}; -NuclearGeneratingUnit::~NuclearGeneratingUnit() {}; +NuclearGeneratingUnit::NuclearGeneratingUnit() {} +NuclearGeneratingUnit::~NuclearGeneratingUnit() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ NuclearGeneratingUnit::getPossibleProfilesForAttributes() const return map; } - - - - - const char NuclearGeneratingUnit::debugName[] = "NuclearGeneratingUnit"; const char* NuclearGeneratingUnit::debugString() const { @@ -52,7 +47,7 @@ const char* NuclearGeneratingUnit::debugString() const void NuclearGeneratingUnit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:NuclearGeneratingUnit"), &NuclearGeneratingUnit_factory)); + factory_map.emplace("cim:NuclearGeneratingUnit", &NuclearGeneratingUnit_factory); } void NuclearGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/NuclearGeneratingUnit.hpp b/CGMES_2.4.13_18DEC2013/NuclearGeneratingUnit.hpp index 4ee5186cd..81ab7cd3d 100644 --- a/CGMES_2.4.13_18DEC2013/NuclearGeneratingUnit.hpp +++ b/CGMES_2.4.13_18DEC2013/NuclearGeneratingUnit.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A nuclear generating unit. - */ + /** \brief A nuclear generating unit. */ class NuclearGeneratingUnit : public GeneratingUnit { public: @@ -26,7 +24,6 @@ namespace CIMPP NuclearGeneratingUnit(); ~NuclearGeneratingUnit() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/OperationalLimit.cpp b/CGMES_2.4.13_18DEC2013/OperationalLimit.cpp index c32b84037..2f6e5f3f8 100644 --- a/CGMES_2.4.13_18DEC2013/OperationalLimit.cpp +++ b/CGMES_2.4.13_18DEC2013/OperationalLimit.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -OperationalLimit::OperationalLimit() : OperationalLimitSet(nullptr), OperationalLimitType(nullptr) {}; -OperationalLimit::~OperationalLimit() {}; +OperationalLimit::OperationalLimit() : OperationalLimitSet(nullptr), OperationalLimitType(nullptr) {} +OperationalLimit::~OperationalLimit() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ OperationalLimit::getPossibleProfilesForAttributes() const return map; } - - bool assign_OperationalLimitSet_OperationalLimitValue(BaseClass*, BaseClass*); bool assign_OperationalLimit_OperationalLimitSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_OperationalLimit_OperationalLimitSet(BaseClass* BaseClass_ptr1, Base } return false; } + bool assign_OperationalLimitType_OperationalLimit(BaseClass*, BaseClass*); bool assign_OperationalLimit_OperationalLimitType(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_OperationalLimit_OperationalLimitType(BaseClass* BaseClass_ptr1, Bas return false; } - bool get_OperationalLimit_OperationalLimitSet(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const OperationalLimit* element = dynamic_cast(BaseClass_ptr1)) + const OperationalLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->OperationalLimitSet != 0) { @@ -93,7 +92,8 @@ bool get_OperationalLimit_OperationalLimitSet(const BaseClass* BaseClass_ptr1, s bool get_OperationalLimit_OperationalLimitType(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const OperationalLimit* element = dynamic_cast(BaseClass_ptr1)) + const OperationalLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->OperationalLimitType != 0) { @@ -104,7 +104,6 @@ bool get_OperationalLimit_OperationalLimitType(const BaseClass* BaseClass_ptr1, return false; } - const char OperationalLimit::debugName[] = "OperationalLimit"; const char* OperationalLimit::debugString() const { @@ -113,7 +112,7 @@ const char* OperationalLimit::debugString() const void OperationalLimit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:OperationalLimit"), &OperationalLimit_factory)); + factory_map.emplace("cim:OperationalLimit", &OperationalLimit_factory); } void OperationalLimit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void OperationalLimit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OperationalLimit.OperationalLimitSet"), &assign_OperationalLimit_OperationalLimitSet)); - assign_map.insert(std::make_pair(std::string("cim:OperationalLimit.OperationalLimitType"), &assign_OperationalLimit_OperationalLimitType)); + assign_map.emplace("cim:OperationalLimit.OperationalLimitSet", &assign_OperationalLimit_OperationalLimitSet); + assign_map.emplace("cim:OperationalLimit.OperationalLimitType", &assign_OperationalLimit_OperationalLimitType); } void OperationalLimit::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/OperationalLimit.hpp b/CGMES_2.4.13_18DEC2013/OperationalLimit.hpp index 2d67bbf7a..1e167b812 100644 --- a/CGMES_2.4.13_18DEC2013/OperationalLimit.hpp +++ b/CGMES_2.4.13_18DEC2013/OperationalLimit.hpp @@ -18,9 +18,7 @@ namespace CIMPP class OperationalLimitSet; class OperationalLimitType; - /* - A value associated with a specific kind of limit. The sub class value attribute shall be positive. The sub class value attribute is inversely proportional to OperationalLimitType.acceptableDuration (acceptableDuration for short). A pair of value_x and acceptableDuration_x are related to each other as follows: if value_1 > value_2 > value_3 >... then acceptableDuration_1 < acceptableDuration_2 < acceptableDuration_3 < ... A value_x with direction="high" shall be greater than a value_y with direction="low". - */ + /** \brief A value associated with a specific kind of limit. The sub class value attribute shall be positive. The sub class value attribute is inversely proportional to OperationalLimitType.acceptableDuration (acceptableDuration for short). A pair of value_x and acceptableDuration_x are related to each other as follows: if value_1 > value_2 > value_3 >... then acceptableDuration_1 < acceptableDuration_2 < acceptableDuration_3 < ... A value_x with direction="high" shall be greater than a value_y with direction="low". */ class OperationalLimit : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP OperationalLimit(); ~OperationalLimit() override; - CIMPP::OperationalLimitSet* OperationalLimitSet; /* Values of equipment limits. Default: 0 */ - CIMPP::OperationalLimitType* OperationalLimitType; /* The limit type associated with this limit. Default: 0 */ + /** \brief Values of equipment limits. Default: 0 */ + CIMPP::OperationalLimitSet* OperationalLimitSet; + + /** \brief The limit type associated with this limit. Default: 0 */ + CIMPP::OperationalLimitType* OperationalLimitType; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/OperationalLimitDirectionKind.cpp b/CGMES_2.4.13_18DEC2013/OperationalLimitDirectionKind.cpp index 4aeb56e6d..77fce153e 100644 --- a/CGMES_2.4.13_18DEC2013/OperationalLimitDirectionKind.cpp +++ b/CGMES_2.4.13_18DEC2013/OperationalLimitDirectionKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "OperationalLimitDirectionKind") + if (EnumSymbol.substr(0, pos) != "OperationalLimitDirectionKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "high") + if (EnumSymbol == "high") { rop = OperationalLimitDirectionKind::high; return lop; } - if(EnumSymbol == "low") + if (EnumSymbol == "low") { rop = OperationalLimitDirectionKind::low; return lop; } - if(EnumSymbol == "absoluteValue") + if (EnumSymbol == "absoluteValue") { rop = OperationalLimitDirectionKind::absoluteValue; return lop; diff --git a/CGMES_2.4.13_18DEC2013/OperationalLimitDirectionKind.hpp b/CGMES_2.4.13_18DEC2013/OperationalLimitDirectionKind.hpp index 33d23f39a..295417e17 100644 --- a/CGMES_2.4.13_18DEC2013/OperationalLimitDirectionKind.hpp +++ b/CGMES_2.4.13_18DEC2013/OperationalLimitDirectionKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The direction attribute describes the side of a limit that is a violation. - */ + /** \brief The direction attribute describes the side of a limit that is a violation. */ class OperationalLimitDirectionKind { public: enum OperationalLimitDirectionKind_ENUM { - /** - * High means that a monitored value above the limit value is a violation. If applied to a terminal flow, the positive direction is into the terminal. - */ + /** High means that a monitored value above the limit value is a violation. If applied to a terminal flow, the positive direction is into the terminal. */ high, - /** - * Low means a monitored value below the limit is a violation. If applied to a terminal flow, the positive direction is into the terminal. - */ + /** Low means a monitored value below the limit is a violation. If applied to a terminal flow, the positive direction is into the terminal. */ low, - /** - * An absoluteValue limit means that a monitored absolute value above the limit value is a violation. - */ + /** An absoluteValue limit means that a monitored absolute value above the limit value is a violation. */ absoluteValue, }; diff --git a/CGMES_2.4.13_18DEC2013/OperationalLimitSet.cpp b/CGMES_2.4.13_18DEC2013/OperationalLimitSet.cpp index 615a0edcd..b2d24e3d4 100644 --- a/CGMES_2.4.13_18DEC2013/OperationalLimitSet.cpp +++ b/CGMES_2.4.13_18DEC2013/OperationalLimitSet.cpp @@ -8,14 +8,14 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include +#include "ACDCTerminal.hpp" #include "Equipment.hpp" #include "OperationalLimit.hpp" -#include "ACDCTerminal.hpp" using namespace CIMPP; -OperationalLimitSet::OperationalLimitSet() : Equipment(nullptr), Terminal(nullptr) {}; -OperationalLimitSet::~OperationalLimitSet() {}; +OperationalLimitSet::OperationalLimitSet() : Equipment(nullptr), Terminal(nullptr) {} +OperationalLimitSet::~OperationalLimitSet() {} static const std::list PossibleProfilesForClass = { @@ -44,8 +44,6 @@ OperationalLimitSet::getPossibleProfilesForAttributes() const return map; } - - bool assign_Equipment_OperationalLimitSet(BaseClass*, BaseClass*); bool assign_OperationalLimitSet_Equipment(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -62,6 +60,7 @@ bool assign_OperationalLimitSet_Equipment(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_OperationalLimit_OperationalLimitSet(BaseClass*, BaseClass*); bool assign_OperationalLimitSet_OperationalLimitValue(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -78,6 +77,7 @@ bool assign_OperationalLimitSet_OperationalLimitValue(BaseClass* BaseClass_ptr1, } return false; } + bool assign_ACDCTerminal_OperationalLimitSet(BaseClass*, BaseClass*); bool assign_OperationalLimitSet_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -95,10 +95,10 @@ bool assign_OperationalLimitSet_Terminal(BaseClass* BaseClass_ptr1, BaseClass* B return false; } - bool get_OperationalLimitSet_Equipment(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const OperationalLimitSet* element = dynamic_cast(BaseClass_ptr1)) + const OperationalLimitSet* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Equipment != 0) { @@ -109,9 +109,11 @@ bool get_OperationalLimitSet_Equipment(const BaseClass* BaseClass_ptr1, std::lis return false; } + bool get_OperationalLimitSet_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const OperationalLimitSet* element = dynamic_cast(BaseClass_ptr1)) + const OperationalLimitSet* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Terminal != 0) { @@ -122,7 +124,6 @@ bool get_OperationalLimitSet_Terminal(const BaseClass* BaseClass_ptr1, std::list return false; } - const char OperationalLimitSet::debugName[] = "OperationalLimitSet"; const char* OperationalLimitSet::debugString() const { @@ -131,7 +132,7 @@ const char* OperationalLimitSet::debugString() const void OperationalLimitSet::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:OperationalLimitSet"), &OperationalLimitSet_factory)); + factory_map.emplace("cim:OperationalLimitSet", &OperationalLimitSet_factory); } void OperationalLimitSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -140,9 +141,9 @@ void OperationalLimitSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OperationalLimitSet.Equipment"), &assign_OperationalLimitSet_Equipment)); - assign_map.insert(std::make_pair(std::string("cim:OperationalLimitSet.OperationalLimitValue"), &assign_OperationalLimitSet_OperationalLimitValue)); - assign_map.insert(std::make_pair(std::string("cim:OperationalLimitSet.Terminal"), &assign_OperationalLimitSet_Terminal)); + assign_map.emplace("cim:OperationalLimitSet.Equipment", &assign_OperationalLimitSet_Equipment); + assign_map.emplace("cim:OperationalLimitSet.OperationalLimitValue", &assign_OperationalLimitSet_OperationalLimitValue); + assign_map.emplace("cim:OperationalLimitSet.Terminal", &assign_OperationalLimitSet_Terminal); } void OperationalLimitSet::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/OperationalLimitSet.hpp b/CGMES_2.4.13_18DEC2013/OperationalLimitSet.hpp index 4c968db6d..97bb28d50 100644 --- a/CGMES_2.4.13_18DEC2013/OperationalLimitSet.hpp +++ b/CGMES_2.4.13_18DEC2013/OperationalLimitSet.hpp @@ -19,9 +19,7 @@ namespace CIMPP class Equipment; class OperationalLimit; - /* - A set of limits associated with equipment. Sets of limits might apply to a specific temperature, or season for example. A set of limits may contain different severities of limit levels that would apply to the same equipment. The set may contain limits of different types such as apparent power and current limits or high and low voltage limits that are logically applied together as a set. - */ + /** \brief A set of limits associated with equipment. Sets of limits might apply to a specific temperature, or season for example. A set of limits may contain different severities of limit levels that would apply to the same equipment. The set may contain limits of different types such as apparent power and current limits or high and low voltage limits that are logically applied together as a set. */ class OperationalLimitSet : public IdentifiedObject { public: @@ -29,9 +27,14 @@ namespace CIMPP OperationalLimitSet(); ~OperationalLimitSet() override; - CIMPP::Equipment* Equipment; /* The equipment to which the limit set applies. Default: 0 */ - std::list OperationalLimitValue; /* The limit set to which the limit values belong. Default: 0 */ - CIMPP::ACDCTerminal* Terminal; /* Default: 0 */ + /** \brief The equipment to which the limit set applies. Default: 0 */ + CIMPP::Equipment* Equipment; + + /** \brief The limit set to which the limit values belong. Default: 0 */ + std::list OperationalLimitValue; + + /** \brief Default: 0 */ + CIMPP::ACDCTerminal* Terminal; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/OperationalLimitType.cpp b/CGMES_2.4.13_18DEC2013/OperationalLimitType.cpp index 5f9534fef..d487e6145 100644 --- a/CGMES_2.4.13_18DEC2013/OperationalLimitType.cpp +++ b/CGMES_2.4.13_18DEC2013/OperationalLimitType.cpp @@ -9,14 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "OperationalLimit.hpp" -#include "Seconds.hpp" -#include "OperationalLimitDirectionKind.hpp" -#include "LimitTypeKind.hpp" using namespace CIMPP; -OperationalLimitType::OperationalLimitType() {}; -OperationalLimitType::~OperationalLimitType() {}; +OperationalLimitType::OperationalLimitType() {} +OperationalLimitType::~OperationalLimitType() {} static const std::list PossibleProfilesForClass = { @@ -46,67 +43,70 @@ OperationalLimitType::getPossibleProfilesForAttributes() const return map; } - -bool assign_OperationalLimitType_acceptableDuration(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OperationalLimit_OperationalLimitType(BaseClass*, BaseClass*); +bool assign_OperationalLimitType_OperationalLimit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (OperationalLimitType* element = dynamic_cast(BaseClass_ptr1)) + OperationalLimitType* element = dynamic_cast(BaseClass_ptr1); + OperationalLimit* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->acceptableDuration; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->OperationalLimit.begin(), element->OperationalLimit.end(), element2) == element->OperationalLimit.end()) + { + element->OperationalLimit.push_back(element2); + return assign_OperationalLimit_OperationalLimitType(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_OperationalLimitType_direction(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OperationalLimitType_acceptableDuration(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OperationalLimitType* element = dynamic_cast(BaseClass_ptr1)) + OperationalLimitType* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->direction; - if (buffer.fail()) - return false; - else + buffer >> element->acceptableDuration; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OperationalLimitType_limitType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OperationalLimitType_direction(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OperationalLimitType* element = dynamic_cast(BaseClass_ptr1)) + OperationalLimitType* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->limitType; - if (buffer.fail()) - return false; - else + buffer >> element->direction; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_OperationalLimit_OperationalLimitType(BaseClass*, BaseClass*); -bool assign_OperationalLimitType_OperationalLimit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_OperationalLimitType_limitType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { OperationalLimitType* element = dynamic_cast(BaseClass_ptr1); - OperationalLimit* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->OperationalLimit.begin(), element->OperationalLimit.end(), element2) == element->OperationalLimit.end()) + buffer >> element->limitType; + if (!buffer.fail()) { - element->OperationalLimit.push_back(element2); - return assign_OperationalLimit_OperationalLimitType(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_OperationalLimitType_acceptableDuration(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OperationalLimitType* element = dynamic_cast(BaseClass_ptr1)) + const OperationalLimitType* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->acceptableDuration; if (!buffer.str().empty()) @@ -118,11 +118,10 @@ bool get_OperationalLimitType_acceptableDuration(const BaseClass* BaseClass_ptr1 return false; } - - bool get_OperationalLimitType_direction(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OperationalLimitType* element = dynamic_cast(BaseClass_ptr1)) + const OperationalLimitType* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->direction; if (!buffer.str().empty()) @@ -136,7 +135,8 @@ bool get_OperationalLimitType_direction(const BaseClass* BaseClass_ptr1, std::st bool get_OperationalLimitType_limitType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OperationalLimitType* element = dynamic_cast(BaseClass_ptr1)) + const OperationalLimitType* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->limitType; if (!buffer.str().empty()) @@ -156,19 +156,19 @@ const char* OperationalLimitType::debugString() const void OperationalLimitType::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:OperationalLimitType"), &OperationalLimitType_factory)); + factory_map.emplace("cim:OperationalLimitType", &OperationalLimitType_factory); } void OperationalLimitType::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OperationalLimitType.acceptableDuration"), &assign_OperationalLimitType_acceptableDuration)); - assign_map.insert(std::make_pair(std::string("cim:OperationalLimitType.direction"), &assign_OperationalLimitType_direction)); - assign_map.insert(std::make_pair(std::string("cim:OperationalLimitType.limitType"), &assign_OperationalLimitType_limitType)); + assign_map.emplace("cim:OperationalLimitType.acceptableDuration", &assign_OperationalLimitType_acceptableDuration); + assign_map.emplace("cim:OperationalLimitType.direction", &assign_OperationalLimitType_direction); + assign_map.emplace("cim:OperationalLimitType.limitType", &assign_OperationalLimitType_limitType); } void OperationalLimitType::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OperationalLimitType.OperationalLimit"), &assign_OperationalLimitType_OperationalLimit)); + assign_map.emplace("cim:OperationalLimitType.OperationalLimit", &assign_OperationalLimitType_OperationalLimit); } void OperationalLimitType::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/OperationalLimitType.hpp b/CGMES_2.4.13_18DEC2013/OperationalLimitType.hpp index 5ff8db6ab..3b07eb447 100644 --- a/CGMES_2.4.13_18DEC2013/OperationalLimitType.hpp +++ b/CGMES_2.4.13_18DEC2013/OperationalLimitType.hpp @@ -20,9 +20,7 @@ namespace CIMPP { class OperationalLimit; - /* - The operational meaning of a category of limits. - */ + /** \brief The operational meaning of a category of limits. */ class OperationalLimitType : public IdentifiedObject { public: @@ -30,10 +28,17 @@ namespace CIMPP OperationalLimitType(); ~OperationalLimitType() override; - std::list OperationalLimit; /* The operational limits associated with this type of limit. Default: 0 */ - CIMPP::Seconds acceptableDuration; /* The nominal acceptable duration of the limit. Limits are commonly expressed in terms of the a time limit for which the limit is normally acceptable. The actual acceptable duration of a specific limit may depend on other local factors such as temperature or wind speed. Default: nullptr */ - CIMPP::OperationalLimitDirectionKind direction; /* The direction of the limit. Default: 0 */ - CIMPP::LimitTypeKind limitType; /* Types of limits defined in the ENTSO-E Operational Handbook Policy 3. Default: 0 */ + /** \brief The operational limits associated with this type of limit. Default: 0 */ + std::list OperationalLimit; + + /** \brief The nominal acceptable duration of the limit. Limits are commonly expressed in terms of the a time limit for which the limit is normally acceptable. The actual acceptable duration of a specific limit may depend on other local factors such as temperature or wind speed. Default: nullptr */ + CIMPP::Seconds acceptableDuration; + + /** \brief The direction of the limit. Default: 0 */ + CIMPP::OperationalLimitDirectionKind direction; + + /** \brief Types of limits defined in the ENTSO-E Operational Handbook Policy 3. Default: 0 */ + CIMPP::LimitTypeKind limitType; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/OrientationKind.cpp b/CGMES_2.4.13_18DEC2013/OrientationKind.cpp index e02a50057..ea4f69b21 100644 --- a/CGMES_2.4.13_18DEC2013/OrientationKind.cpp +++ b/CGMES_2.4.13_18DEC2013/OrientationKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "OrientationKind") + if (EnumSymbol.substr(0, pos) != "OrientationKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,7 +50,7 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "negative") + if (EnumSymbol == "negative") { rop = OrientationKind::negative; return lop; diff --git a/CGMES_2.4.13_18DEC2013/OrientationKind.hpp b/CGMES_2.4.13_18DEC2013/OrientationKind.hpp index 0ab661444..4666948b8 100644 --- a/CGMES_2.4.13_18DEC2013/OrientationKind.hpp +++ b/CGMES_2.4.13_18DEC2013/OrientationKind.hpp @@ -9,17 +9,13 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The orientation of the coordinate system with respect to top, left, and the coordinate number system. - */ + /** \brief The orientation of the coordinate system with respect to top, left, and the coordinate number system. */ class OrientationKind { public: enum OrientationKind_ENUM { - /** - * For 2D diagrams, a negative orientation gives the left-hand orientation (favoured by computer graphics displays) with X values increasing from left to right and Y values increasing from top to bottom. This is also known as a left hand orientation. - */ + /** For 2D diagrams, a negative orientation gives the left-hand orientation (favoured by computer graphics displays) with X values increasing from left to right and Y values increasing from top to bottom. This is also known as a left hand orientation. */ negative, }; diff --git a/CGMES_2.4.13_18DEC2013/OverexcLim2.cpp b/CGMES_2.4.13_18DEC2013/OverexcLim2.cpp index 72fdf8856..2e9009b9b 100644 --- a/CGMES_2.4.13_18DEC2013/OverexcLim2.cpp +++ b/CGMES_2.4.13_18DEC2013/OverexcLim2.cpp @@ -8,15 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -OverexcLim2::OverexcLim2() {}; -OverexcLim2::~OverexcLim2() {}; +OverexcLim2::OverexcLim2() {} +OverexcLim2::~OverexcLim2() {} static const std::list PossibleProfilesForClass = { @@ -46,64 +42,66 @@ OverexcLim2::getPossibleProfilesForAttributes() const return map; } - -bool assign_OverexcLim2_ifdlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLim2_ifdlim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLim2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ifdlim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLim2_koi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLim2_koi(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLim2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->koi; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLim2_voimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLim2_voimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLim2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->voimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLim2_voimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLim2_voimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLim2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->voimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_OverexcLim2_ifdlim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLim2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ifdlim; if (!buffer.str().empty()) @@ -117,7 +115,8 @@ bool get_OverexcLim2_ifdlim(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_OverexcLim2_koi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLim2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->koi; if (!buffer.str().empty()) @@ -131,7 +130,8 @@ bool get_OverexcLim2_koi(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_OverexcLim2_voimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLim2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->voimax; if (!buffer.str().empty()) @@ -145,7 +145,8 @@ bool get_OverexcLim2_voimax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_OverexcLim2_voimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLim2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->voimin; if (!buffer.str().empty()) @@ -157,8 +158,6 @@ bool get_OverexcLim2_voimin(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char OverexcLim2::debugName[] = "OverexcLim2"; const char* OverexcLim2::debugString() const { @@ -167,15 +166,15 @@ const char* OverexcLim2::debugString() const void OverexcLim2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:OverexcLim2"), &OverexcLim2_factory)); + factory_map.emplace("cim:OverexcLim2", &OverexcLim2_factory); } void OverexcLim2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OverexcLim2.ifdlim"), &assign_OverexcLim2_ifdlim)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLim2.koi"), &assign_OverexcLim2_koi)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLim2.voimax"), &assign_OverexcLim2_voimax)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLim2.voimin"), &assign_OverexcLim2_voimin)); + assign_map.emplace("cim:OverexcLim2.ifdlim", &assign_OverexcLim2_ifdlim); + assign_map.emplace("cim:OverexcLim2.koi", &assign_OverexcLim2_koi); + assign_map.emplace("cim:OverexcLim2.voimax", &assign_OverexcLim2_voimax); + assign_map.emplace("cim:OverexcLim2.voimin", &assign_OverexcLim2_voimin); } void OverexcLim2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/OverexcLim2.hpp b/CGMES_2.4.13_18DEC2013/OverexcLim2.hpp index 1160df132..0278bfc7e 100644 --- a/CGMES_2.4.13_18DEC2013/OverexcLim2.hpp +++ b/CGMES_2.4.13_18DEC2013/OverexcLim2.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Different from LimIEEEOEL, LimOEL2 has a fixed pickup threshold and reduces the excitation set-point by mean of non-windup integral regulator. Irated is the rated machine excitation current (calculated from nameplate conditions: V, P, CosPhi). - */ + /** \brief Different from LimIEEEOEL, LimOEL2 has a fixed pickup threshold and reduces the excitation set-point by mean of non-windup integral regulator. Irated is the rated machine excitation current (calculated from nameplate conditions: V, P, CosPhi). */ class OverexcLim2 : public OverexcitationLimiterDynamics { public: @@ -27,10 +25,17 @@ namespace CIMPP OverexcLim2(); ~OverexcLim2() override; - CIMPP::PU ifdlim; /* Limit value of rated field current (I). Typical Value = 1.05. Default: nullptr */ - CIMPP::PU koi; /* Gain Over excitation limiter (K). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU voimax; /* Maximum error signal (V). Typical Value = 0. Default: nullptr */ - CIMPP::PU voimin; /* Minimum error signal (V). Typical Value = -9999. Default: nullptr */ + /** \brief Limit value of rated field current (I). Typical Value = 1.05. Default: nullptr */ + CIMPP::PU ifdlim; + + /** \brief Gain Over excitation limiter (K). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU koi; + + /** \brief Maximum error signal (V). Typical Value = 0. Default: nullptr */ + CIMPP::PU voimax; + + /** \brief Minimum error signal (V). Typical Value = -9999. Default: nullptr */ + CIMPP::PU voimin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/OverexcLimIEEE.cpp b/CGMES_2.4.13_18DEC2013/OverexcLimIEEE.cpp index 5c44ec73e..0fb3e9857 100644 --- a/CGMES_2.4.13_18DEC2013/OverexcLimIEEE.cpp +++ b/CGMES_2.4.13_18DEC2013/OverexcLimIEEE.cpp @@ -8,17 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -OverexcLimIEEE::OverexcLimIEEE() {}; -OverexcLimIEEE::~OverexcLimIEEE() {}; +OverexcLimIEEE::OverexcLimIEEE() {} +OverexcLimIEEE::~OverexcLimIEEE() {} static const std::list PossibleProfilesForClass = { @@ -50,90 +44,94 @@ OverexcLimIEEE::getPossibleProfilesForAttributes() const return map; } - -bool assign_OverexcLimIEEE_hyst(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimIEEE_hyst(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->hyst; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimIEEE_ifdlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimIEEE_ifdlim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ifdlim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimIEEE_ifdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimIEEE_ifdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ifdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimIEEE_itfpu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimIEEE_itfpu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->itfpu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimIEEE_kcd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimIEEE_kcd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kcd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimIEEE_kramp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimIEEE_kramp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kramp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_OverexcLimIEEE_hyst(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hyst; if (!buffer.str().empty()) @@ -147,7 +145,8 @@ bool get_OverexcLimIEEE_hyst(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_OverexcLimIEEE_ifdlim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ifdlim; if (!buffer.str().empty()) @@ -161,7 +160,8 @@ bool get_OverexcLimIEEE_ifdlim(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_OverexcLimIEEE_ifdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ifdmax; if (!buffer.str().empty()) @@ -175,7 +175,8 @@ bool get_OverexcLimIEEE_ifdmax(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_OverexcLimIEEE_itfpu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->itfpu; if (!buffer.str().empty()) @@ -189,7 +190,8 @@ bool get_OverexcLimIEEE_itfpu(const BaseClass* BaseClass_ptr1, std::stringstream bool get_OverexcLimIEEE_kcd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kcd; if (!buffer.str().empty()) @@ -203,7 +205,8 @@ bool get_OverexcLimIEEE_kcd(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_OverexcLimIEEE_kramp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kramp; if (!buffer.str().empty()) @@ -215,8 +218,6 @@ bool get_OverexcLimIEEE_kramp(const BaseClass* BaseClass_ptr1, std::stringstream return false; } - - const char OverexcLimIEEE::debugName[] = "OverexcLimIEEE"; const char* OverexcLimIEEE::debugString() const { @@ -225,17 +226,17 @@ const char* OverexcLimIEEE::debugString() const void OverexcLimIEEE::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:OverexcLimIEEE"), &OverexcLimIEEE_factory)); + factory_map.emplace("cim:OverexcLimIEEE", &OverexcLimIEEE_factory); } void OverexcLimIEEE::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OverexcLimIEEE.hyst"), &assign_OverexcLimIEEE_hyst)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimIEEE.ifdlim"), &assign_OverexcLimIEEE_ifdlim)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimIEEE.ifdmax"), &assign_OverexcLimIEEE_ifdmax)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimIEEE.itfpu"), &assign_OverexcLimIEEE_itfpu)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimIEEE.kcd"), &assign_OverexcLimIEEE_kcd)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimIEEE.kramp"), &assign_OverexcLimIEEE_kramp)); + assign_map.emplace("cim:OverexcLimIEEE.hyst", &assign_OverexcLimIEEE_hyst); + assign_map.emplace("cim:OverexcLimIEEE.ifdlim", &assign_OverexcLimIEEE_ifdlim); + assign_map.emplace("cim:OverexcLimIEEE.ifdmax", &assign_OverexcLimIEEE_ifdmax); + assign_map.emplace("cim:OverexcLimIEEE.itfpu", &assign_OverexcLimIEEE_itfpu); + assign_map.emplace("cim:OverexcLimIEEE.kcd", &assign_OverexcLimIEEE_kcd); + assign_map.emplace("cim:OverexcLimIEEE.kramp", &assign_OverexcLimIEEE_kramp); } void OverexcLimIEEE::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/OverexcLimIEEE.hpp b/CGMES_2.4.13_18DEC2013/OverexcLimIEEE.hpp index 6159231e3..de8e58374 100644 --- a/CGMES_2.4.13_18DEC2013/OverexcLimIEEE.hpp +++ b/CGMES_2.4.13_18DEC2013/OverexcLimIEEE.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The over excitation limiter model is intended to represent the significant features of OELs necessary for some large-scale system studies. It is the result of a pragmatic approach to obtain a model that can be widely applied with attainable data from generator owners. An attempt to include all variations in the functionality of OELs and duplicate how they interact with the rest of the excitation systems would likely result in a level of application insufficient for the studies for which they are intended. Reference: IEEE OEL 421.5-2005 Section 9. - */ + /** \brief The over excitation limiter model is intended to represent the significant features of OELs necessary for some large-scale system studies. It is the result of a pragmatic approach to obtain a model that can be widely applied with attainable data from generator owners. An attempt to include all variations in the functionality of OELs and duplicate how they interact with the rest of the excitation systems would likely result in a level of application insufficient for the studies for which they are intended. Reference: IEEE OEL 421.5-2005 Section 9. */ class OverexcLimIEEE : public OverexcitationLimiterDynamics { public: @@ -28,12 +26,23 @@ namespace CIMPP OverexcLimIEEE(); ~OverexcLimIEEE() override; - CIMPP::PU hyst; /* OEL pickup/drop-out hysteresis (HYST). Typical Value = 0.03. Default: nullptr */ - CIMPP::PU ifdlim; /* OEL timed field current limit (I). Typical Value = 1.05. Default: nullptr */ - CIMPP::PU ifdmax; /* OEL instantaneous field current limit (I). Typical Value = 1.5. Default: nullptr */ - CIMPP::PU itfpu; /* OEL timed field current limiter pickup level (I). Typical Value = 1.05. Default: nullptr */ - CIMPP::PU kcd; /* OEL cooldown gain (K). Typical Value = 1. Default: nullptr */ - CIMPP::Simple_Float kramp; /* OEL ramped limit rate (K). Unit = PU/sec. Typical Value = 10. Default: nullptr */ + /** \brief OEL pickup/drop-out hysteresis (HYST). Typical Value = 0.03. Default: nullptr */ + CIMPP::PU hyst; + + /** \brief OEL timed field current limit (I). Typical Value = 1.05. Default: nullptr */ + CIMPP::PU ifdlim; + + /** \brief OEL instantaneous field current limit (I). Typical Value = 1.5. Default: nullptr */ + CIMPP::PU ifdmax; + + /** \brief OEL timed field current limiter pickup level (I). Typical Value = 1.05. Default: nullptr */ + CIMPP::PU itfpu; + + /** \brief OEL cooldown gain (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU kcd; + + /** \brief OEL ramped limit rate (K). Unit = PU/sec. Typical Value = 10. Default: nullptr */ + CIMPP::Simple_Float kramp; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/OverexcLimX1.cpp b/CGMES_2.4.13_18DEC2013/OverexcLimX1.cpp index 626fe56e4..c299b0d73 100644 --- a/CGMES_2.4.13_18DEC2013/OverexcLimX1.cpp +++ b/CGMES_2.4.13_18DEC2013/OverexcLimX1.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" using namespace CIMPP; -OverexcLimX1::OverexcLimX1() {}; -OverexcLimX1::~OverexcLimX1() {}; +OverexcLimX1::OverexcLimX1() {} +OverexcLimX1::~OverexcLimX1() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ OverexcLimX1::getPossibleProfilesForAttributes() const return map; } - -bool assign_OverexcLimX1_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX1_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX1_efd3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_efd3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX1_efddes(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_efddes(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efddes; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX1_efdrated(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_efdrated(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdrated; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX1_kmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_kmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX1_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX1_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX1_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX1_vlow(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_vlow(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vlow; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_OverexcLimX1_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_OverexcLimX1_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_OverexcLimX1_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_OverexcLimX1_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_OverexcLimX1_efd3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd3; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_OverexcLimX1_efd3(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_OverexcLimX1_efddes(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efddes; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_OverexcLimX1_efddes(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_OverexcLimX1_efdrated(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdrated; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_OverexcLimX1_efdrated(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_OverexcLimX1_kmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kmx; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_OverexcLimX1_kmx(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_OverexcLimX1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_OverexcLimX1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_OverexcLimX1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_OverexcLimX1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_OverexcLimX1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_OverexcLimX1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_OverexcLimX1_vlow(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vlow; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_OverexcLimX1_vlow(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char OverexcLimX1::debugName[] = "OverexcLimX1"; const char* OverexcLimX1::debugString() const { @@ -341,21 +346,21 @@ const char* OverexcLimX1::debugString() const void OverexcLimX1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:OverexcLimX1"), &OverexcLimX1_factory)); + factory_map.emplace("cim:OverexcLimX1", &OverexcLimX1_factory); } void OverexcLimX1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.efd1"), &assign_OverexcLimX1_efd1)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.efd2"), &assign_OverexcLimX1_efd2)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.efd3"), &assign_OverexcLimX1_efd3)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.efddes"), &assign_OverexcLimX1_efddes)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.efdrated"), &assign_OverexcLimX1_efdrated)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.kmx"), &assign_OverexcLimX1_kmx)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.t1"), &assign_OverexcLimX1_t1)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.t2"), &assign_OverexcLimX1_t2)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.t3"), &assign_OverexcLimX1_t3)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.vlow"), &assign_OverexcLimX1_vlow)); + assign_map.emplace("cim:OverexcLimX1.efd1", &assign_OverexcLimX1_efd1); + assign_map.emplace("cim:OverexcLimX1.efd2", &assign_OverexcLimX1_efd2); + assign_map.emplace("cim:OverexcLimX1.efd3", &assign_OverexcLimX1_efd3); + assign_map.emplace("cim:OverexcLimX1.efddes", &assign_OverexcLimX1_efddes); + assign_map.emplace("cim:OverexcLimX1.efdrated", &assign_OverexcLimX1_efdrated); + assign_map.emplace("cim:OverexcLimX1.kmx", &assign_OverexcLimX1_kmx); + assign_map.emplace("cim:OverexcLimX1.t1", &assign_OverexcLimX1_t1); + assign_map.emplace("cim:OverexcLimX1.t2", &assign_OverexcLimX1_t2); + assign_map.emplace("cim:OverexcLimX1.t3", &assign_OverexcLimX1_t3); + assign_map.emplace("cim:OverexcLimX1.vlow", &assign_OverexcLimX1_vlow); } void OverexcLimX1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/OverexcLimX1.hpp b/CGMES_2.4.13_18DEC2013/OverexcLimX1.hpp index f49d083aa..b0ac52a6c 100644 --- a/CGMES_2.4.13_18DEC2013/OverexcLimX1.hpp +++ b/CGMES_2.4.13_18DEC2013/OverexcLimX1.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Field voltage over excitation limiter. - */ + /** \brief Field voltage over excitation limiter. */ class OverexcLimX1 : public OverexcitationLimiterDynamics { public: @@ -28,16 +26,35 @@ namespace CIMPP OverexcLimX1(); ~OverexcLimX1() override; - CIMPP::PU efd1; /* Low voltage point on the inverse time characteristic (EFD). Typical Value = 1.1. Default: nullptr */ - CIMPP::PU efd2; /* Mid voltage point on the inverse time characteristic (EFD). Typical Value = 1.2. Default: nullptr */ - CIMPP::PU efd3; /* High voltage point on the inverse time characteristic (EFD). Typical Value = 1.5. Default: nullptr */ - CIMPP::PU efddes; /* Desired field voltage (EFD). Typical Value = 0.9. Default: nullptr */ - CIMPP::PU efdrated; /* Rated field voltage (EFD). Typical Value = 1.05. Default: nullptr */ - CIMPP::PU kmx; /* Gain (K). Typical Value = 0.01. Default: nullptr */ - CIMPP::Seconds t1; /* Time to trip the exciter at the low voltage point on the inverse time characteristic (TIME). Typical Value = 120. Default: nullptr */ - CIMPP::Seconds t2; /* Time to trip the exciter at the mid voltage point on the inverse time characteristic (TIME). Typical Value = 40. Default: nullptr */ - CIMPP::Seconds t3; /* Time to trip the exciter at the high voltage point on the inverse time characteristic (TIME). Typical Value = 15. Default: nullptr */ - CIMPP::PU vlow; /* Low voltage limit (V) (>0). Default: nullptr */ + /** \brief Low voltage point on the inverse time characteristic (EFD). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Mid voltage point on the inverse time characteristic (EFD). Typical Value = 1.2. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief High voltage point on the inverse time characteristic (EFD). Typical Value = 1.5. Default: nullptr */ + CIMPP::PU efd3; + + /** \brief Desired field voltage (EFD). Typical Value = 0.9. Default: nullptr */ + CIMPP::PU efddes; + + /** \brief Rated field voltage (EFD). Typical Value = 1.05. Default: nullptr */ + CIMPP::PU efdrated; + + /** \brief Gain (K). Typical Value = 0.01. Default: nullptr */ + CIMPP::PU kmx; + + /** \brief Time to trip the exciter at the low voltage point on the inverse time characteristic (TIME). Typical Value = 120. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Time to trip the exciter at the mid voltage point on the inverse time characteristic (TIME). Typical Value = 40. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Time to trip the exciter at the high voltage point on the inverse time characteristic (TIME). Typical Value = 15. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Low voltage limit (V) (>0). Default: nullptr */ + CIMPP::PU vlow; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/OverexcLimX2.cpp b/CGMES_2.4.13_18DEC2013/OverexcLimX2.cpp index 687643215..0a0443e80 100644 --- a/CGMES_2.4.13_18DEC2013/OverexcLimX2.cpp +++ b/CGMES_2.4.13_18DEC2013/OverexcLimX2.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" using namespace CIMPP; -OverexcLimX2::OverexcLimX2() {}; -OverexcLimX2::~OverexcLimX2() {}; +OverexcLimX2::OverexcLimX2() {} +OverexcLimX2::~OverexcLimX2() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ OverexcLimX2::getPossibleProfilesForAttributes() const return map; } - -bool assign_OverexcLimX2_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_efd3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_efd3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_efddes(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_efddes(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efddes; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_efdrated(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_efdrated(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdrated; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_kmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_kmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_m(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_m(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->m; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_vlow(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_vlow(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vlow; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_OverexcLimX2_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_OverexcLimX2_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_OverexcLimX2_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_OverexcLimX2_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_OverexcLimX2_efd3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd3; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_OverexcLimX2_efd3(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_OverexcLimX2_efddes(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efddes; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_OverexcLimX2_efddes(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_OverexcLimX2_efdrated(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdrated; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_OverexcLimX2_efdrated(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_OverexcLimX2_kmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kmx; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_OverexcLimX2_kmx(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_OverexcLimX2_m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->m; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_OverexcLimX2_m(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_OverexcLimX2_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_OverexcLimX2_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_OverexcLimX2_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_OverexcLimX2_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_OverexcLimX2_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_OverexcLimX2_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_OverexcLimX2_vlow(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vlow; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_OverexcLimX2_vlow(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char OverexcLimX2::debugName[] = "OverexcLimX2"; const char* OverexcLimX2::debugString() const { @@ -370,22 +376,22 @@ const char* OverexcLimX2::debugString() const void OverexcLimX2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:OverexcLimX2"), &OverexcLimX2_factory)); + factory_map.emplace("cim:OverexcLimX2", &OverexcLimX2_factory); } void OverexcLimX2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.efd1"), &assign_OverexcLimX2_efd1)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.efd2"), &assign_OverexcLimX2_efd2)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.efd3"), &assign_OverexcLimX2_efd3)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.efddes"), &assign_OverexcLimX2_efddes)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.efdrated"), &assign_OverexcLimX2_efdrated)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.kmx"), &assign_OverexcLimX2_kmx)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.m"), &assign_OverexcLimX2_m)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.t1"), &assign_OverexcLimX2_t1)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.t2"), &assign_OverexcLimX2_t2)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.t3"), &assign_OverexcLimX2_t3)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.vlow"), &assign_OverexcLimX2_vlow)); + assign_map.emplace("cim:OverexcLimX2.efd1", &assign_OverexcLimX2_efd1); + assign_map.emplace("cim:OverexcLimX2.efd2", &assign_OverexcLimX2_efd2); + assign_map.emplace("cim:OverexcLimX2.efd3", &assign_OverexcLimX2_efd3); + assign_map.emplace("cim:OverexcLimX2.efddes", &assign_OverexcLimX2_efddes); + assign_map.emplace("cim:OverexcLimX2.efdrated", &assign_OverexcLimX2_efdrated); + assign_map.emplace("cim:OverexcLimX2.kmx", &assign_OverexcLimX2_kmx); + assign_map.emplace("cim:OverexcLimX2.m", &assign_OverexcLimX2_m); + assign_map.emplace("cim:OverexcLimX2.t1", &assign_OverexcLimX2_t1); + assign_map.emplace("cim:OverexcLimX2.t2", &assign_OverexcLimX2_t2); + assign_map.emplace("cim:OverexcLimX2.t3", &assign_OverexcLimX2_t3); + assign_map.emplace("cim:OverexcLimX2.vlow", &assign_OverexcLimX2_vlow); } void OverexcLimX2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/OverexcLimX2.hpp b/CGMES_2.4.13_18DEC2013/OverexcLimX2.hpp index dc1b719b4..c361d076c 100644 --- a/CGMES_2.4.13_18DEC2013/OverexcLimX2.hpp +++ b/CGMES_2.4.13_18DEC2013/OverexcLimX2.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Field Voltage or Current overexcitation limiter designed to protect the generator field of an AC machine with automatic excitation control from overheating due to prolonged overexcitation. - */ + /** \brief Field Voltage or Current overexcitation limiter designed to protect the generator field of an AC machine with automatic excitation control from overheating due to prolonged overexcitation. */ class OverexcLimX2 : public OverexcitationLimiterDynamics { public: @@ -29,17 +27,38 @@ namespace CIMPP OverexcLimX2(); ~OverexcLimX2() override; - CIMPP::PU efd1; /* Low voltage or current point on the inverse time characteristic (EFD). Typical Value = 1.1. Default: nullptr */ - CIMPP::PU efd2; /* Mid voltage or current point on the inverse time characteristic (EFD). Typical Value = 1.2. Default: nullptr */ - CIMPP::PU efd3; /* High voltage or current point on the inverse time characteristic (EFD). Typical Value = 1.5. Default: nullptr */ - CIMPP::PU efddes; /* Desired field voltage if m=F or field current if m=T (EFD). Typical Value = 1. Default: nullptr */ - CIMPP::PU efdrated; /* Rated field voltage if m=F or field current if m=T (EFD). Typical Value = 1.05. Default: nullptr */ - CIMPP::PU kmx; /* Gain (K). Typical Value = 0.002. Default: nullptr */ - CIMPP::Boolean m; /* (m). true = IFD limiting false = EFD limiting. Default: false */ - CIMPP::Seconds t1; /* Time to trip the exciter at the low voltage or current point on the inverse time characteristic (TIME). Typical Value = 120. Default: nullptr */ - CIMPP::Seconds t2; /* Time to trip the exciter at the mid voltage or current point on the inverse time characteristic (TIME). Typical Value = 40. Default: nullptr */ - CIMPP::Seconds t3; /* Time to trip the exciter at the high voltage or current point on the inverse time characteristic (TIME). Typical Value = 15. Default: nullptr */ - CIMPP::PU vlow; /* Low voltage limit (V) (>0). Default: nullptr */ + /** \brief Low voltage or current point on the inverse time characteristic (EFD). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Mid voltage or current point on the inverse time characteristic (EFD). Typical Value = 1.2. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief High voltage or current point on the inverse time characteristic (EFD). Typical Value = 1.5. Default: nullptr */ + CIMPP::PU efd3; + + /** \brief Desired field voltage if m=F or field current if m=T (EFD). Typical Value = 1. Default: nullptr */ + CIMPP::PU efddes; + + /** \brief Rated field voltage if m=F or field current if m=T (EFD). Typical Value = 1.05. Default: nullptr */ + CIMPP::PU efdrated; + + /** \brief Gain (K). Typical Value = 0.002. Default: nullptr */ + CIMPP::PU kmx; + + /** \brief (m). true = IFD limiting false = EFD limiting. Default: false */ + CIMPP::Boolean m; + + /** \brief Time to trip the exciter at the low voltage or current point on the inverse time characteristic (TIME). Typical Value = 120. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Time to trip the exciter at the mid voltage or current point on the inverse time characteristic (TIME). Typical Value = 40. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Time to trip the exciter at the high voltage or current point on the inverse time characteristic (TIME). Typical Value = 15. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Low voltage limit (V) (>0). Default: nullptr */ + CIMPP::PU vlow; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/OverexcitationLimiterDynamics.cpp b/CGMES_2.4.13_18DEC2013/OverexcitationLimiterDynamics.cpp index d21fcf0aa..bab89ee82 100644 --- a/CGMES_2.4.13_18DEC2013/OverexcitationLimiterDynamics.cpp +++ b/CGMES_2.4.13_18DEC2013/OverexcitationLimiterDynamics.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -OverexcitationLimiterDynamics::OverexcitationLimiterDynamics() : ExcitationSystemDynamics(nullptr) {}; -OverexcitationLimiterDynamics::~OverexcitationLimiterDynamics() {}; +OverexcitationLimiterDynamics::OverexcitationLimiterDynamics() : ExcitationSystemDynamics(nullptr) {} +OverexcitationLimiterDynamics::~OverexcitationLimiterDynamics() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ OverexcitationLimiterDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_ExcitationSystemDynamics_OverexcitationLimiterDynamics(BaseClass*, BaseClass*); bool assign_OverexcitationLimiterDynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_OverexcitationLimiterDynamics_ExcitationSystemDynamics(BaseClass* Ba return false; } - bool get_OverexcitationLimiterDynamics_ExcitationSystemDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const OverexcitationLimiterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const OverexcitationLimiterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ExcitationSystemDynamics != 0) { @@ -73,7 +71,6 @@ bool get_OverexcitationLimiterDynamics_ExcitationSystemDynamics(const BaseClass* return false; } - const char OverexcitationLimiterDynamics::debugName[] = "OverexcitationLimiterDynamics"; const char* OverexcitationLimiterDynamics::debugString() const { @@ -82,7 +79,7 @@ const char* OverexcitationLimiterDynamics::debugString() const void OverexcitationLimiterDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:OverexcitationLimiterDynamics"), &OverexcitationLimiterDynamics_factory)); + factory_map.emplace("cim:OverexcitationLimiterDynamics", &OverexcitationLimiterDynamics_factory); } void OverexcitationLimiterDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void OverexcitationLimiterDynamics::addPrimitiveAssignFnsToMap(std::unordered_ma void OverexcitationLimiterDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OverexcitationLimiterDynamics.ExcitationSystemDynamics"), &assign_OverexcitationLimiterDynamics_ExcitationSystemDynamics)); + assign_map.emplace("cim:OverexcitationLimiterDynamics.ExcitationSystemDynamics", &assign_OverexcitationLimiterDynamics_ExcitationSystemDynamics); } void OverexcitationLimiterDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/OverexcitationLimiterDynamics.hpp b/CGMES_2.4.13_18DEC2013/OverexcitationLimiterDynamics.hpp index eb6bbd80b..ec4713524 100644 --- a/CGMES_2.4.13_18DEC2013/OverexcitationLimiterDynamics.hpp +++ b/CGMES_2.4.13_18DEC2013/OverexcitationLimiterDynamics.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class ExcitationSystemDynamics; - /* - Overexcitation limiter function block whose behaviour is described by reference to a standard model - */ + /** \brief Overexcitation limiter function block whose behaviour is described by reference to a standard model */ class OverexcitationLimiterDynamics : public DynamicsFunctionBlock { public: @@ -27,7 +25,8 @@ namespace CIMPP OverexcitationLimiterDynamics(); ~OverexcitationLimiterDynamics() override; - CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; /* Excitation system model with which this overexcitation limiter model is associated. Default: 0 */ + /** \brief Excitation system model with which this overexcitation limiter model is associated. Default: 0 */ + CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/OverexcitationLimiterUserDefined.cpp b/CGMES_2.4.13_18DEC2013/OverexcitationLimiterUserDefined.cpp index d5969a0f7..18a97fc36 100644 --- a/CGMES_2.4.13_18DEC2013/OverexcitationLimiterUserDefined.cpp +++ b/CGMES_2.4.13_18DEC2013/OverexcitationLimiterUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -OverexcitationLimiterUserDefined::OverexcitationLimiterUserDefined() {}; -OverexcitationLimiterUserDefined::~OverexcitationLimiterUserDefined() {}; +OverexcitationLimiterUserDefined::OverexcitationLimiterUserDefined() {} +OverexcitationLimiterUserDefined::~OverexcitationLimiterUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ OverexcitationLimiterUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_OverexcitationLimiterUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (OverexcitationLimiterUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_OverexcitationLimiterUserDefined(BaseClass*, BaseClass*); bool assign_OverexcitationLimiterUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_OverexcitationLimiterUserDefined_ProprietaryParameterDynamics(BaseCl return false; } +bool assign_OverexcitationLimiterUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + OverexcitationLimiterUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_OverexcitationLimiterUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcitationLimiterUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const OverexcitationLimiterUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_OverexcitationLimiterUserDefined_proprietary(const BaseClass* BaseClass return false; } - - const char OverexcitationLimiterUserDefined::debugName[] = "OverexcitationLimiterUserDefined"; const char* OverexcitationLimiterUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* OverexcitationLimiterUserDefined::debugString() const void OverexcitationLimiterUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:OverexcitationLimiterUserDefined"), &OverexcitationLimiterUserDefined_factory)); + factory_map.emplace("cim:OverexcitationLimiterUserDefined", &OverexcitationLimiterUserDefined_factory); } void OverexcitationLimiterUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OverexcitationLimiterUserDefined.proprietary"), &assign_OverexcitationLimiterUserDefined_proprietary)); + assign_map.emplace("cim:OverexcitationLimiterUserDefined.proprietary", &assign_OverexcitationLimiterUserDefined_proprietary); } void OverexcitationLimiterUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OverexcitationLimiterUserDefined.ProprietaryParameterDynamics"), &assign_OverexcitationLimiterUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:OverexcitationLimiterUserDefined.ProprietaryParameterDynamics", &assign_OverexcitationLimiterUserDefined_ProprietaryParameterDynamics); } void OverexcitationLimiterUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/OverexcitationLimiterUserDefined.hpp b/CGMES_2.4.13_18DEC2013/OverexcitationLimiterUserDefined.hpp index 66680b8f8..385c02fb4 100644 --- a/CGMES_2.4.13_18DEC2013/OverexcitationLimiterUserDefined.hpp +++ b/CGMES_2.4.13_18DEC2013/OverexcitationLimiterUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Overexcitation limiter system function block whose dynamic behaviour is described by - */ + /** \brief Overexcitation limiter system function block whose dynamic behaviour is described by */ class OverexcitationLimiterUserDefined : public OverexcitationLimiterDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP OverexcitationLimiterUserDefined(); ~OverexcitationLimiterUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/PFVArControllerType1Dynamics.cpp b/CGMES_2.4.13_18DEC2013/PFVArControllerType1Dynamics.cpp index 544174545..a9e1de1b5 100644 --- a/CGMES_2.4.13_18DEC2013/PFVArControllerType1Dynamics.cpp +++ b/CGMES_2.4.13_18DEC2013/PFVArControllerType1Dynamics.cpp @@ -14,8 +14,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -PFVArControllerType1Dynamics::PFVArControllerType1Dynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr), VoltageAdjusterDynamics(nullptr) {}; -PFVArControllerType1Dynamics::~PFVArControllerType1Dynamics() {}; +PFVArControllerType1Dynamics::PFVArControllerType1Dynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr), VoltageAdjusterDynamics(nullptr) {} +PFVArControllerType1Dynamics::~PFVArControllerType1Dynamics() {} static const std::list PossibleProfilesForClass = { @@ -44,8 +44,6 @@ PFVArControllerType1Dynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_ExcitationSystemDynamics_PFVArControllerType1Dynamics(BaseClass*, BaseClass*); bool assign_PFVArControllerType1Dynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -62,6 +60,7 @@ bool assign_PFVArControllerType1Dynamics_ExcitationSystemDynamics(BaseClass* Bas } return false; } + bool assign_RemoteInputSignal_PFVArControllerType1Dynamics(BaseClass*, BaseClass*); bool assign_PFVArControllerType1Dynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -78,6 +77,7 @@ bool assign_PFVArControllerType1Dynamics_RemoteInputSignal(BaseClass* BaseClass_ } return false; } + bool assign_VoltageAdjusterDynamics_PFVArControllerType1Dynamics(BaseClass*, BaseClass*); bool assign_PFVArControllerType1Dynamics_VoltageAdjusterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -95,10 +95,10 @@ bool assign_PFVArControllerType1Dynamics_VoltageAdjusterDynamics(BaseClass* Base return false; } - bool get_PFVArControllerType1Dynamics_ExcitationSystemDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const PFVArControllerType1Dynamics* element = dynamic_cast(BaseClass_ptr1)) + const PFVArControllerType1Dynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ExcitationSystemDynamics != 0) { @@ -110,6 +110,7 @@ bool get_PFVArControllerType1Dynamics_ExcitationSystemDynamics(const BaseClass* } + const char PFVArControllerType1Dynamics::debugName[] = "PFVArControllerType1Dynamics"; const char* PFVArControllerType1Dynamics::debugString() const { @@ -118,7 +119,7 @@ const char* PFVArControllerType1Dynamics::debugString() const void PFVArControllerType1Dynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PFVArControllerType1Dynamics"), &PFVArControllerType1Dynamics_factory)); + factory_map.emplace("cim:PFVArControllerType1Dynamics", &PFVArControllerType1Dynamics_factory); } void PFVArControllerType1Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -127,9 +128,9 @@ void PFVArControllerType1Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map void PFVArControllerType1Dynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType1Dynamics.ExcitationSystemDynamics"), &assign_PFVArControllerType1Dynamics_ExcitationSystemDynamics)); - assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType1Dynamics.RemoteInputSignal"), &assign_PFVArControllerType1Dynamics_RemoteInputSignal)); - assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType1Dynamics.VoltageAdjusterDynamics"), &assign_PFVArControllerType1Dynamics_VoltageAdjusterDynamics)); + assign_map.emplace("cim:PFVArControllerType1Dynamics.ExcitationSystemDynamics", &assign_PFVArControllerType1Dynamics_ExcitationSystemDynamics); + assign_map.emplace("cim:PFVArControllerType1Dynamics.RemoteInputSignal", &assign_PFVArControllerType1Dynamics_RemoteInputSignal); + assign_map.emplace("cim:PFVArControllerType1Dynamics.VoltageAdjusterDynamics", &assign_PFVArControllerType1Dynamics_VoltageAdjusterDynamics); } void PFVArControllerType1Dynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/PFVArControllerType1Dynamics.hpp b/CGMES_2.4.13_18DEC2013/PFVArControllerType1Dynamics.hpp index e9005ed20..722dc238b 100644 --- a/CGMES_2.4.13_18DEC2013/PFVArControllerType1Dynamics.hpp +++ b/CGMES_2.4.13_18DEC2013/PFVArControllerType1Dynamics.hpp @@ -19,9 +19,7 @@ namespace CIMPP class RemoteInputSignal; class VoltageAdjusterDynamics; - /* - Power Factor or VAr controller Type I function block whose behaviour is described by reference to a standard model - */ + /** \brief Power Factor or VAr controller Type I function block whose behaviour is described by reference to a standard model */ class PFVArControllerType1Dynamics : public DynamicsFunctionBlock { public: @@ -29,9 +27,14 @@ namespace CIMPP PFVArControllerType1Dynamics(); ~PFVArControllerType1Dynamics() override; - CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; /* Excitation system model with which this Power Factor or VAr controller Type I model is associated. Default: 0 */ - CIMPP::RemoteInputSignal* RemoteInputSignal; /* Remote input signal used by this Power Factor or VAr controller Type I model. Default: 0 */ - CIMPP::VoltageAdjusterDynamics* VoltageAdjusterDynamics; /* Voltage adjuster model associated with this Power Factor or VA controller Type I model. Default: 0 */ + /** \brief Excitation system model with which this Power Factor or VAr controller Type I model is associated. Default: 0 */ + CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; + + /** \brief Remote input signal used by this Power Factor or VAr controller Type I model. Default: 0 */ + CIMPP::RemoteInputSignal* RemoteInputSignal; + + /** \brief Voltage adjuster model associated with this Power Factor or VA controller Type I model. Default: 0 */ + CIMPP::VoltageAdjusterDynamics* VoltageAdjusterDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/PFVArControllerType1UserDefined.cpp b/CGMES_2.4.13_18DEC2013/PFVArControllerType1UserDefined.cpp index e539e26f4..10b773647 100644 --- a/CGMES_2.4.13_18DEC2013/PFVArControllerType1UserDefined.cpp +++ b/CGMES_2.4.13_18DEC2013/PFVArControllerType1UserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -PFVArControllerType1UserDefined::PFVArControllerType1UserDefined() {}; -PFVArControllerType1UserDefined::~PFVArControllerType1UserDefined() {}; +PFVArControllerType1UserDefined::PFVArControllerType1UserDefined() {} +PFVArControllerType1UserDefined::~PFVArControllerType1UserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ PFVArControllerType1UserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_PFVArControllerType1UserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (PFVArControllerType1UserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_PFVArControllerType1UserDefined(BaseClass*, BaseClass*); bool assign_PFVArControllerType1UserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_PFVArControllerType1UserDefined_ProprietaryParameterDynamics(BaseCla return false; } +bool assign_PFVArControllerType1UserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + PFVArControllerType1UserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_PFVArControllerType1UserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArControllerType1UserDefined* element = dynamic_cast(BaseClass_ptr1)) + const PFVArControllerType1UserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_PFVArControllerType1UserDefined_proprietary(const BaseClass* BaseClass_ return false; } - - const char PFVArControllerType1UserDefined::debugName[] = "PFVArControllerType1UserDefined"; const char* PFVArControllerType1UserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* PFVArControllerType1UserDefined::debugString() const void PFVArControllerType1UserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PFVArControllerType1UserDefined"), &PFVArControllerType1UserDefined_factory)); + factory_map.emplace("cim:PFVArControllerType1UserDefined", &PFVArControllerType1UserDefined_factory); } void PFVArControllerType1UserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType1UserDefined.proprietary"), &assign_PFVArControllerType1UserDefined_proprietary)); + assign_map.emplace("cim:PFVArControllerType1UserDefined.proprietary", &assign_PFVArControllerType1UserDefined_proprietary); } void PFVArControllerType1UserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType1UserDefined.ProprietaryParameterDynamics"), &assign_PFVArControllerType1UserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:PFVArControllerType1UserDefined.ProprietaryParameterDynamics", &assign_PFVArControllerType1UserDefined_ProprietaryParameterDynamics); } void PFVArControllerType1UserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/PFVArControllerType1UserDefined.hpp b/CGMES_2.4.13_18DEC2013/PFVArControllerType1UserDefined.hpp index 8fe7e1e23..c324b0c9f 100644 --- a/CGMES_2.4.13_18DEC2013/PFVArControllerType1UserDefined.hpp +++ b/CGMES_2.4.13_18DEC2013/PFVArControllerType1UserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Power Factor or VAr controller Type I function block whose dynamic behaviour is described by - */ + /** \brief Power Factor or VAr controller Type I function block whose dynamic behaviour is described by */ class PFVArControllerType1UserDefined : public PFVArControllerType1Dynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP PFVArControllerType1UserDefined(); ~PFVArControllerType1UserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/PFVArControllerType2Dynamics.cpp b/CGMES_2.4.13_18DEC2013/PFVArControllerType2Dynamics.cpp index c595f575a..e6c875b3a 100644 --- a/CGMES_2.4.13_18DEC2013/PFVArControllerType2Dynamics.cpp +++ b/CGMES_2.4.13_18DEC2013/PFVArControllerType2Dynamics.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -PFVArControllerType2Dynamics::PFVArControllerType2Dynamics() : ExcitationSystemDynamics(nullptr) {}; -PFVArControllerType2Dynamics::~PFVArControllerType2Dynamics() {}; +PFVArControllerType2Dynamics::PFVArControllerType2Dynamics() : ExcitationSystemDynamics(nullptr) {} +PFVArControllerType2Dynamics::~PFVArControllerType2Dynamics() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ PFVArControllerType2Dynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_ExcitationSystemDynamics_PFVArControllerType2Dynamics(BaseClass*, BaseClass*); bool assign_PFVArControllerType2Dynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_PFVArControllerType2Dynamics_ExcitationSystemDynamics(BaseClass* Bas return false; } - bool get_PFVArControllerType2Dynamics_ExcitationSystemDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const PFVArControllerType2Dynamics* element = dynamic_cast(BaseClass_ptr1)) + const PFVArControllerType2Dynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ExcitationSystemDynamics != 0) { @@ -73,7 +71,6 @@ bool get_PFVArControllerType2Dynamics_ExcitationSystemDynamics(const BaseClass* return false; } - const char PFVArControllerType2Dynamics::debugName[] = "PFVArControllerType2Dynamics"; const char* PFVArControllerType2Dynamics::debugString() const { @@ -82,7 +79,7 @@ const char* PFVArControllerType2Dynamics::debugString() const void PFVArControllerType2Dynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PFVArControllerType2Dynamics"), &PFVArControllerType2Dynamics_factory)); + factory_map.emplace("cim:PFVArControllerType2Dynamics", &PFVArControllerType2Dynamics_factory); } void PFVArControllerType2Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void PFVArControllerType2Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map void PFVArControllerType2Dynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType2Dynamics.ExcitationSystemDynamics"), &assign_PFVArControllerType2Dynamics_ExcitationSystemDynamics)); + assign_map.emplace("cim:PFVArControllerType2Dynamics.ExcitationSystemDynamics", &assign_PFVArControllerType2Dynamics_ExcitationSystemDynamics); } void PFVArControllerType2Dynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/PFVArControllerType2Dynamics.hpp b/CGMES_2.4.13_18DEC2013/PFVArControllerType2Dynamics.hpp index 4c3b5e3eb..28e466647 100644 --- a/CGMES_2.4.13_18DEC2013/PFVArControllerType2Dynamics.hpp +++ b/CGMES_2.4.13_18DEC2013/PFVArControllerType2Dynamics.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class ExcitationSystemDynamics; - /* - Power Factor or VAr controller Type II function block whose behaviour is described by reference to a standard model - */ + /** \brief Power Factor or VAr controller Type II function block whose behaviour is described by reference to a standard model */ class PFVArControllerType2Dynamics : public DynamicsFunctionBlock { public: @@ -27,7 +25,8 @@ namespace CIMPP PFVArControllerType2Dynamics(); ~PFVArControllerType2Dynamics() override; - CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; /* Excitation system model with which this Power Factor or VAr controller Type II is associated. Default: 0 */ + /** \brief Excitation system model with which this Power Factor or VAr controller Type II is associated. Default: 0 */ + CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/PFVArControllerType2UserDefined.cpp b/CGMES_2.4.13_18DEC2013/PFVArControllerType2UserDefined.cpp index 4862d275e..166ceecea 100644 --- a/CGMES_2.4.13_18DEC2013/PFVArControllerType2UserDefined.cpp +++ b/CGMES_2.4.13_18DEC2013/PFVArControllerType2UserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -PFVArControllerType2UserDefined::PFVArControllerType2UserDefined() {}; -PFVArControllerType2UserDefined::~PFVArControllerType2UserDefined() {}; +PFVArControllerType2UserDefined::PFVArControllerType2UserDefined() {} +PFVArControllerType2UserDefined::~PFVArControllerType2UserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ PFVArControllerType2UserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_PFVArControllerType2UserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (PFVArControllerType2UserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_PFVArControllerType2UserDefined(BaseClass*, BaseClass*); bool assign_PFVArControllerType2UserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_PFVArControllerType2UserDefined_ProprietaryParameterDynamics(BaseCla return false; } +bool assign_PFVArControllerType2UserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + PFVArControllerType2UserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_PFVArControllerType2UserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArControllerType2UserDefined* element = dynamic_cast(BaseClass_ptr1)) + const PFVArControllerType2UserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_PFVArControllerType2UserDefined_proprietary(const BaseClass* BaseClass_ return false; } - - const char PFVArControllerType2UserDefined::debugName[] = "PFVArControllerType2UserDefined"; const char* PFVArControllerType2UserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* PFVArControllerType2UserDefined::debugString() const void PFVArControllerType2UserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PFVArControllerType2UserDefined"), &PFVArControllerType2UserDefined_factory)); + factory_map.emplace("cim:PFVArControllerType2UserDefined", &PFVArControllerType2UserDefined_factory); } void PFVArControllerType2UserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType2UserDefined.proprietary"), &assign_PFVArControllerType2UserDefined_proprietary)); + assign_map.emplace("cim:PFVArControllerType2UserDefined.proprietary", &assign_PFVArControllerType2UserDefined_proprietary); } void PFVArControllerType2UserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType2UserDefined.ProprietaryParameterDynamics"), &assign_PFVArControllerType2UserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:PFVArControllerType2UserDefined.ProprietaryParameterDynamics", &assign_PFVArControllerType2UserDefined_ProprietaryParameterDynamics); } void PFVArControllerType2UserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/PFVArControllerType2UserDefined.hpp b/CGMES_2.4.13_18DEC2013/PFVArControllerType2UserDefined.hpp index c549ea396..7a58fa35b 100644 --- a/CGMES_2.4.13_18DEC2013/PFVArControllerType2UserDefined.hpp +++ b/CGMES_2.4.13_18DEC2013/PFVArControllerType2UserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Power Factor or VAr controller Type II function block whose dynamic behaviour is described by - */ + /** \brief Power Factor or VAr controller Type II function block whose dynamic behaviour is described by */ class PFVArControllerType2UserDefined : public PFVArControllerType2Dynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP PFVArControllerType2UserDefined(); ~PFVArControllerType2UserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/PFVArType1IEEEPFController.cpp b/CGMES_2.4.13_18DEC2013/PFVArType1IEEEPFController.cpp index a805b5c82..0bce66721 100644 --- a/CGMES_2.4.13_18DEC2013/PFVArType1IEEEPFController.cpp +++ b/CGMES_2.4.13_18DEC2013/PFVArType1IEEEPFController.cpp @@ -8,19 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PFVArType1IEEEPFController::PFVArType1IEEEPFController() {}; -PFVArType1IEEEPFController::~PFVArType1IEEEPFController() {}; +PFVArType1IEEEPFController::PFVArType1IEEEPFController() {} +PFVArType1IEEEPFController::~PFVArType1IEEEPFController() {} static const std::list PossibleProfilesForClass = { @@ -54,116 +46,122 @@ PFVArType1IEEEPFController::getPossibleProfilesForAttributes() const return map; } - -bool assign_PFVArType1IEEEPFController_ovex(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEPFController_ovex(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ovex; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEPFController_tpfc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEPFController_tpfc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpfc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEPFController_vitmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEPFController_vitmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vitmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEPFController_vpf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEPFController_vpf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vpf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEPFController_vpfcbw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEPFController_vpfcbw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vpfcbw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEPFController_vpfref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEPFController_vpfref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vpfref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEPFController_vvtmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEPFController_vvtmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vvtmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEPFController_vvtmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEPFController_vvtmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vvtmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PFVArType1IEEEPFController_ovex(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ovex; if (!buffer.str().empty()) @@ -177,7 +175,8 @@ bool get_PFVArType1IEEEPFController_ovex(const BaseClass* BaseClass_ptr1, std::s bool get_PFVArType1IEEEPFController_tpfc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpfc; if (!buffer.str().empty()) @@ -191,7 +190,8 @@ bool get_PFVArType1IEEEPFController_tpfc(const BaseClass* BaseClass_ptr1, std::s bool get_PFVArType1IEEEPFController_vitmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vitmin; if (!buffer.str().empty()) @@ -205,7 +205,8 @@ bool get_PFVArType1IEEEPFController_vitmin(const BaseClass* BaseClass_ptr1, std: bool get_PFVArType1IEEEPFController_vpf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vpf; if (!buffer.str().empty()) @@ -219,7 +220,8 @@ bool get_PFVArType1IEEEPFController_vpf(const BaseClass* BaseClass_ptr1, std::st bool get_PFVArType1IEEEPFController_vpfcbw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vpfcbw; if (!buffer.str().empty()) @@ -233,7 +235,8 @@ bool get_PFVArType1IEEEPFController_vpfcbw(const BaseClass* BaseClass_ptr1, std: bool get_PFVArType1IEEEPFController_vpfref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vpfref; if (!buffer.str().empty()) @@ -247,7 +250,8 @@ bool get_PFVArType1IEEEPFController_vpfref(const BaseClass* BaseClass_ptr1, std: bool get_PFVArType1IEEEPFController_vvtmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vvtmax; if (!buffer.str().empty()) @@ -261,7 +265,8 @@ bool get_PFVArType1IEEEPFController_vvtmax(const BaseClass* BaseClass_ptr1, std: bool get_PFVArType1IEEEPFController_vvtmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vvtmin; if (!buffer.str().empty()) @@ -273,8 +278,6 @@ bool get_PFVArType1IEEEPFController_vvtmin(const BaseClass* BaseClass_ptr1, std: return false; } - - const char PFVArType1IEEEPFController::debugName[] = "PFVArType1IEEEPFController"; const char* PFVArType1IEEEPFController::debugString() const { @@ -283,19 +286,19 @@ const char* PFVArType1IEEEPFController::debugString() const void PFVArType1IEEEPFController::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEPFController"), &PFVArType1IEEEPFController_factory)); + factory_map.emplace("cim:PFVArType1IEEEPFController", &PFVArType1IEEEPFController_factory); } void PFVArType1IEEEPFController::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEPFController.ovex"), &assign_PFVArType1IEEEPFController_ovex)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEPFController.tpfc"), &assign_PFVArType1IEEEPFController_tpfc)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEPFController.vitmin"), &assign_PFVArType1IEEEPFController_vitmin)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEPFController.vpf"), &assign_PFVArType1IEEEPFController_vpf)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEPFController.vpfcbw"), &assign_PFVArType1IEEEPFController_vpfcbw)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEPFController.vpfref"), &assign_PFVArType1IEEEPFController_vpfref)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEPFController.vvtmax"), &assign_PFVArType1IEEEPFController_vvtmax)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEPFController.vvtmin"), &assign_PFVArType1IEEEPFController_vvtmin)); + assign_map.emplace("cim:PFVArType1IEEEPFController.ovex", &assign_PFVArType1IEEEPFController_ovex); + assign_map.emplace("cim:PFVArType1IEEEPFController.tpfc", &assign_PFVArType1IEEEPFController_tpfc); + assign_map.emplace("cim:PFVArType1IEEEPFController.vitmin", &assign_PFVArType1IEEEPFController_vitmin); + assign_map.emplace("cim:PFVArType1IEEEPFController.vpf", &assign_PFVArType1IEEEPFController_vpf); + assign_map.emplace("cim:PFVArType1IEEEPFController.vpfcbw", &assign_PFVArType1IEEEPFController_vpfcbw); + assign_map.emplace("cim:PFVArType1IEEEPFController.vpfref", &assign_PFVArType1IEEEPFController_vpfref); + assign_map.emplace("cim:PFVArType1IEEEPFController.vvtmax", &assign_PFVArType1IEEEPFController_vvtmax); + assign_map.emplace("cim:PFVArType1IEEEPFController.vvtmin", &assign_PFVArType1IEEEPFController_vvtmin); } void PFVArType1IEEEPFController::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/PFVArType1IEEEPFController.hpp b/CGMES_2.4.13_18DEC2013/PFVArType1IEEEPFController.hpp index 106df1541..752d31f36 100644 --- a/CGMES_2.4.13_18DEC2013/PFVArType1IEEEPFController.hpp +++ b/CGMES_2.4.13_18DEC2013/PFVArType1IEEEPFController.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE PF Controller Type 1 which operates by moving the voltage reference directly. Reference: IEEE Standard 421.5-2005 Section 11.2. - */ + /** \brief The class represents IEEE PF Controller Type 1 which operates by moving the voltage reference directly. Reference: IEEE Standard 421.5-2005 Section 11.2. */ class PFVArType1IEEEPFController : public PFVArControllerType1Dynamics { public: @@ -30,14 +28,29 @@ namespace CIMPP PFVArType1IEEEPFController(); ~PFVArType1IEEEPFController() override; - CIMPP::Boolean ovex; /* Overexcitation Flag () true = overexcited false = underexcited. Default: false */ - CIMPP::Seconds tpfc; /* PF controller time delay (). Typical Value = 5. Default: nullptr */ - CIMPP::PU vitmin; /* Minimum machine terminal current needed to enable pf/var controller (). Default: nullptr */ - CIMPP::PU vpf; /* Synchronous machine power factor (). Default: nullptr */ - CIMPP::Simple_Float vpfcbw; /* PF controller dead band (). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU vpfref; /* PF controller reference (). Default: nullptr */ - CIMPP::PU vvtmax; /* Maximum machine terminal voltage needed for pf/var controller to be enabled (). Default: nullptr */ - CIMPP::PU vvtmin; /* Minimum machine terminal voltage needed to enable pf/var controller (). Default: nullptr */ + /** \brief Overexcitation Flag () true = overexcited false = underexcited. Default: false */ + CIMPP::Boolean ovex; + + /** \brief PF controller time delay (). Typical Value = 5. Default: nullptr */ + CIMPP::Seconds tpfc; + + /** \brief Minimum machine terminal current needed to enable pf/var controller (). Default: nullptr */ + CIMPP::PU vitmin; + + /** \brief Synchronous machine power factor (). Default: nullptr */ + CIMPP::PU vpf; + + /** \brief PF controller dead band (). Typical Value = 0.05. Default: nullptr */ + CIMPP::Simple_Float vpfcbw; + + /** \brief PF controller reference (). Default: nullptr */ + CIMPP::PU vpfref; + + /** \brief Maximum machine terminal voltage needed for pf/var controller to be enabled (). Default: nullptr */ + CIMPP::PU vvtmax; + + /** \brief Minimum machine terminal voltage needed to enable pf/var controller (). Default: nullptr */ + CIMPP::PU vvtmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/PFVArType1IEEEVArController.cpp b/CGMES_2.4.13_18DEC2013/PFVArType1IEEEVArController.cpp index cab3906b3..589dd60a6 100644 --- a/CGMES_2.4.13_18DEC2013/PFVArType1IEEEVArController.cpp +++ b/CGMES_2.4.13_18DEC2013/PFVArType1IEEEVArController.cpp @@ -8,17 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Seconds.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PFVArType1IEEEVArController::PFVArType1IEEEVArController() {}; -PFVArType1IEEEVArController::~PFVArType1IEEEVArController() {}; +PFVArType1IEEEVArController::PFVArType1IEEEVArController() {} +PFVArType1IEEEVArController::~PFVArType1IEEEVArController() {} static const std::list PossibleProfilesForClass = { @@ -50,90 +44,94 @@ PFVArType1IEEEVArController::getPossibleProfilesForAttributes() const return map; } - -bool assign_PFVArType1IEEEVArController_tvarc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEVArController_tvarc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tvarc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEVArController_vvar(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEVArController_vvar(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vvar; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEVArController_vvarcbw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEVArController_vvarcbw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vvarcbw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEVArController_vvarref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEVArController_vvarref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vvarref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEVArController_vvtmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEVArController_vvtmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vvtmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEVArController_vvtmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEVArController_vvtmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vvtmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PFVArType1IEEEVArController_tvarc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tvarc; if (!buffer.str().empty()) @@ -147,7 +145,8 @@ bool get_PFVArType1IEEEVArController_tvarc(const BaseClass* BaseClass_ptr1, std: bool get_PFVArType1IEEEVArController_vvar(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vvar; if (!buffer.str().empty()) @@ -161,7 +160,8 @@ bool get_PFVArType1IEEEVArController_vvar(const BaseClass* BaseClass_ptr1, std:: bool get_PFVArType1IEEEVArController_vvarcbw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vvarcbw; if (!buffer.str().empty()) @@ -175,7 +175,8 @@ bool get_PFVArType1IEEEVArController_vvarcbw(const BaseClass* BaseClass_ptr1, st bool get_PFVArType1IEEEVArController_vvarref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vvarref; if (!buffer.str().empty()) @@ -189,7 +190,8 @@ bool get_PFVArType1IEEEVArController_vvarref(const BaseClass* BaseClass_ptr1, st bool get_PFVArType1IEEEVArController_vvtmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vvtmax; if (!buffer.str().empty()) @@ -203,7 +205,8 @@ bool get_PFVArType1IEEEVArController_vvtmax(const BaseClass* BaseClass_ptr1, std bool get_PFVArType1IEEEVArController_vvtmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vvtmin; if (!buffer.str().empty()) @@ -215,8 +218,6 @@ bool get_PFVArType1IEEEVArController_vvtmin(const BaseClass* BaseClass_ptr1, std return false; } - - const char PFVArType1IEEEVArController::debugName[] = "PFVArType1IEEEVArController"; const char* PFVArType1IEEEVArController::debugString() const { @@ -225,17 +226,17 @@ const char* PFVArType1IEEEVArController::debugString() const void PFVArType1IEEEVArController::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEVArController"), &PFVArType1IEEEVArController_factory)); + factory_map.emplace("cim:PFVArType1IEEEVArController", &PFVArType1IEEEVArController_factory); } void PFVArType1IEEEVArController::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEVArController.tvarc"), &assign_PFVArType1IEEEVArController_tvarc)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEVArController.vvar"), &assign_PFVArType1IEEEVArController_vvar)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEVArController.vvarcbw"), &assign_PFVArType1IEEEVArController_vvarcbw)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEVArController.vvarref"), &assign_PFVArType1IEEEVArController_vvarref)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEVArController.vvtmax"), &assign_PFVArType1IEEEVArController_vvtmax)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEVArController.vvtmin"), &assign_PFVArType1IEEEVArController_vvtmin)); + assign_map.emplace("cim:PFVArType1IEEEVArController.tvarc", &assign_PFVArType1IEEEVArController_tvarc); + assign_map.emplace("cim:PFVArType1IEEEVArController.vvar", &assign_PFVArType1IEEEVArController_vvar); + assign_map.emplace("cim:PFVArType1IEEEVArController.vvarcbw", &assign_PFVArType1IEEEVArController_vvarcbw); + assign_map.emplace("cim:PFVArType1IEEEVArController.vvarref", &assign_PFVArType1IEEEVArController_vvarref); + assign_map.emplace("cim:PFVArType1IEEEVArController.vvtmax", &assign_PFVArType1IEEEVArController_vvtmax); + assign_map.emplace("cim:PFVArType1IEEEVArController.vvtmin", &assign_PFVArType1IEEEVArController_vvtmin); } void PFVArType1IEEEVArController::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/PFVArType1IEEEVArController.hpp b/CGMES_2.4.13_18DEC2013/PFVArType1IEEEVArController.hpp index 0927c56e5..ccc74b4a4 100644 --- a/CGMES_2.4.13_18DEC2013/PFVArType1IEEEVArController.hpp +++ b/CGMES_2.4.13_18DEC2013/PFVArType1IEEEVArController.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE VAR Controller Type 1 which operates by moving the voltage reference directly. Reference: IEEE Standard 421.5-2005 Section 11.3. - */ + /** \brief The class represents IEEE VAR Controller Type 1 which operates by moving the voltage reference directly. Reference: IEEE Standard 421.5-2005 Section 11.3. */ class PFVArType1IEEEVArController : public PFVArControllerType1Dynamics { public: @@ -29,12 +27,23 @@ namespace CIMPP PFVArType1IEEEVArController(); ~PFVArType1IEEEVArController() override; - CIMPP::Seconds tvarc; /* Var controller time delay (). Typical Value = 5. Default: nullptr */ - CIMPP::PU vvar; /* Synchronous machine power factor (). Default: nullptr */ - CIMPP::Simple_Float vvarcbw; /* Var controller dead band (). Typical Value = 0.02. Default: nullptr */ - CIMPP::PU vvarref; /* Var controller reference (). Default: nullptr */ - CIMPP::PU vvtmax; /* Maximum machine terminal voltage needed for pf/var controller to be enabled (). Default: nullptr */ - CIMPP::PU vvtmin; /* Minimum machine terminal voltage needed to enable pf/var controller (). Default: nullptr */ + /** \brief Var controller time delay (). Typical Value = 5. Default: nullptr */ + CIMPP::Seconds tvarc; + + /** \brief Synchronous machine power factor (). Default: nullptr */ + CIMPP::PU vvar; + + /** \brief Var controller dead band (). Typical Value = 0.02. Default: nullptr */ + CIMPP::Simple_Float vvarcbw; + + /** \brief Var controller reference (). Default: nullptr */ + CIMPP::PU vvarref; + + /** \brief Maximum machine terminal voltage needed for pf/var controller to be enabled (). Default: nullptr */ + CIMPP::PU vvtmax; + + /** \brief Minimum machine terminal voltage needed to enable pf/var controller (). Default: nullptr */ + CIMPP::PU vvtmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/PFVArType2Common1.cpp b/CGMES_2.4.13_18DEC2013/PFVArType2Common1.cpp index 90a818731..8bd6aecd5 100644 --- a/CGMES_2.4.13_18DEC2013/PFVArType2Common1.cpp +++ b/CGMES_2.4.13_18DEC2013/PFVArType2Common1.cpp @@ -8,16 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PFVArType2Common1::PFVArType2Common1() {}; -PFVArType2Common1::~PFVArType2Common1() {}; +PFVArType2Common1::PFVArType2Common1() {} +PFVArType2Common1::~PFVArType2Common1() {} static const std::list PossibleProfilesForClass = { @@ -48,77 +43,80 @@ PFVArType2Common1::getPossibleProfilesForAttributes() const return map; } - -bool assign_PFVArType2Common1_j(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2Common1_j(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->j; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2Common1_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2Common1_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2Common1_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2Common1_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2Common1_max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2Common1_max(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->max; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2Common1_ref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2Common1_ref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PFVArType2Common1_j(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->j; if (!buffer.str().empty()) @@ -132,7 +130,8 @@ bool get_PFVArType2Common1_j(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_PFVArType2Common1_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -146,7 +145,8 @@ bool get_PFVArType2Common1_ki(const BaseClass* BaseClass_ptr1, std::stringstream bool get_PFVArType2Common1_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -160,7 +160,8 @@ bool get_PFVArType2Common1_kp(const BaseClass* BaseClass_ptr1, std::stringstream bool get_PFVArType2Common1_max(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->max; if (!buffer.str().empty()) @@ -174,7 +175,8 @@ bool get_PFVArType2Common1_max(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_PFVArType2Common1_ref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ref; if (!buffer.str().empty()) @@ -186,8 +188,6 @@ bool get_PFVArType2Common1_ref(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } - - const char PFVArType2Common1::debugName[] = "PFVArType2Common1"; const char* PFVArType2Common1::debugString() const { @@ -196,16 +196,16 @@ const char* PFVArType2Common1::debugString() const void PFVArType2Common1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PFVArType2Common1"), &PFVArType2Common1_factory)); + factory_map.emplace("cim:PFVArType2Common1", &PFVArType2Common1_factory); } void PFVArType2Common1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArType2Common1.j"), &assign_PFVArType2Common1_j)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2Common1.ki"), &assign_PFVArType2Common1_ki)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2Common1.kp"), &assign_PFVArType2Common1_kp)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2Common1.max"), &assign_PFVArType2Common1_max)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2Common1.ref"), &assign_PFVArType2Common1_ref)); + assign_map.emplace("cim:PFVArType2Common1.j", &assign_PFVArType2Common1_j); + assign_map.emplace("cim:PFVArType2Common1.ki", &assign_PFVArType2Common1_ki); + assign_map.emplace("cim:PFVArType2Common1.kp", &assign_PFVArType2Common1_kp); + assign_map.emplace("cim:PFVArType2Common1.max", &assign_PFVArType2Common1_max); + assign_map.emplace("cim:PFVArType2Common1.ref", &assign_PFVArType2Common1_ref); } void PFVArType2Common1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/PFVArType2Common1.hpp b/CGMES_2.4.13_18DEC2013/PFVArType2Common1.hpp index 9ea37bc5b..e6ccc4d7a 100644 --- a/CGMES_2.4.13_18DEC2013/PFVArType2Common1.hpp +++ b/CGMES_2.4.13_18DEC2013/PFVArType2Common1.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Power factor / Reactive power regulator. This model represents the power factor or reactive power controller such as the Basler SCP-250. The controller measures power factor or reactive power (PU on generator rated power) and compares it with the operator's set point. - */ + /** \brief Power factor / Reactive power regulator. This model represents the power factor or reactive power controller such as the Basler SCP-250. The controller measures power factor or reactive power (PU on generator rated power) and compares it with the operator's set point. */ class PFVArType2Common1 : public PFVArControllerType2Dynamics { public: @@ -28,11 +26,20 @@ namespace CIMPP PFVArType2Common1(); ~PFVArType2Common1() override; - CIMPP::Boolean j; /* Selector (J). true = control mode for reactive power false = control mode for power factor. Default: false */ - CIMPP::PU ki; /* Reset gain (Ki). Default: nullptr */ - CIMPP::PU kp; /* Proportional gain (Kp). Default: nullptr */ - CIMPP::PU max; /* Output limit (max). Default: nullptr */ - CIMPP::PU ref; /* Reference value of reactive power or power factor (Ref). The reference value is initialised by this model. This initialisation may override the value exchanged by this attribute to represent a plant operator`s change of the reference setting. Default: nullptr */ + /** \brief Selector (J). true = control mode for reactive power false = control mode for power factor. Default: false */ + CIMPP::Boolean j; + + /** \brief Reset gain (Ki). Default: nullptr */ + CIMPP::PU ki; + + /** \brief Proportional gain (Kp). Default: nullptr */ + CIMPP::PU kp; + + /** \brief Output limit (max). Default: nullptr */ + CIMPP::PU max; + + /** \brief Reference value of reactive power or power factor (Ref). The reference value is initialised by this model. This initialisation may override the value exchanged by this attribute to represent a plant operator`s change of the reference setting. Default: nullptr */ + CIMPP::PU ref; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/PFVArType2IEEEPFController.cpp b/CGMES_2.4.13_18DEC2013/PFVArType2IEEEPFController.cpp index bca2a4b63..bdf95df85 100644 --- a/CGMES_2.4.13_18DEC2013/PFVArType2IEEEPFController.cpp +++ b/CGMES_2.4.13_18DEC2013/PFVArType2IEEEPFController.cpp @@ -8,18 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -PFVArType2IEEEPFController::PFVArType2IEEEPFController() {}; -PFVArType2IEEEPFController::~PFVArType2IEEEPFController() {}; +PFVArType2IEEEPFController::PFVArType2IEEEPFController() {} +PFVArType2IEEEPFController::~PFVArType2IEEEPFController() {} static const std::list PossibleProfilesForClass = { @@ -52,103 +45,108 @@ PFVArType2IEEEPFController::getPossibleProfilesForAttributes() const return map; } - -bool assign_PFVArType2IEEEPFController_exlon(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEPFController_exlon(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exlon; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEPFController_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEPFController_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEPFController_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEPFController_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEPFController_pfref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEPFController_pfref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pfref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEPFController_vclmt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEPFController_vclmt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vclmt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEPFController_vref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEPFController_vref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEPFController_vs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEPFController_vs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PFVArType2IEEEPFController_exlon(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exlon; if (!buffer.str().empty()) @@ -162,7 +160,8 @@ bool get_PFVArType2IEEEPFController_exlon(const BaseClass* BaseClass_ptr1, std:: bool get_PFVArType2IEEEPFController_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -176,7 +175,8 @@ bool get_PFVArType2IEEEPFController_ki(const BaseClass* BaseClass_ptr1, std::str bool get_PFVArType2IEEEPFController_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -190,7 +190,8 @@ bool get_PFVArType2IEEEPFController_kp(const BaseClass* BaseClass_ptr1, std::str bool get_PFVArType2IEEEPFController_pfref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pfref; if (!buffer.str().empty()) @@ -204,7 +205,8 @@ bool get_PFVArType2IEEEPFController_pfref(const BaseClass* BaseClass_ptr1, std:: bool get_PFVArType2IEEEPFController_vclmt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vclmt; if (!buffer.str().empty()) @@ -218,7 +220,8 @@ bool get_PFVArType2IEEEPFController_vclmt(const BaseClass* BaseClass_ptr1, std:: bool get_PFVArType2IEEEPFController_vref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vref; if (!buffer.str().empty()) @@ -232,7 +235,8 @@ bool get_PFVArType2IEEEPFController_vref(const BaseClass* BaseClass_ptr1, std::s bool get_PFVArType2IEEEPFController_vs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vs; if (!buffer.str().empty()) @@ -244,8 +248,6 @@ bool get_PFVArType2IEEEPFController_vs(const BaseClass* BaseClass_ptr1, std::str return false; } - - const char PFVArType2IEEEPFController::debugName[] = "PFVArType2IEEEPFController"; const char* PFVArType2IEEEPFController::debugString() const { @@ -254,18 +256,18 @@ const char* PFVArType2IEEEPFController::debugString() const void PFVArType2IEEEPFController::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEPFController"), &PFVArType2IEEEPFController_factory)); + factory_map.emplace("cim:PFVArType2IEEEPFController", &PFVArType2IEEEPFController_factory); } void PFVArType2IEEEPFController::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEPFController.exlon"), &assign_PFVArType2IEEEPFController_exlon)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEPFController.ki"), &assign_PFVArType2IEEEPFController_ki)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEPFController.kp"), &assign_PFVArType2IEEEPFController_kp)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEPFController.pfref"), &assign_PFVArType2IEEEPFController_pfref)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEPFController.vclmt"), &assign_PFVArType2IEEEPFController_vclmt)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEPFController.vref"), &assign_PFVArType2IEEEPFController_vref)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEPFController.vs"), &assign_PFVArType2IEEEPFController_vs)); + assign_map.emplace("cim:PFVArType2IEEEPFController.exlon", &assign_PFVArType2IEEEPFController_exlon); + assign_map.emplace("cim:PFVArType2IEEEPFController.ki", &assign_PFVArType2IEEEPFController_ki); + assign_map.emplace("cim:PFVArType2IEEEPFController.kp", &assign_PFVArType2IEEEPFController_kp); + assign_map.emplace("cim:PFVArType2IEEEPFController.pfref", &assign_PFVArType2IEEEPFController_pfref); + assign_map.emplace("cim:PFVArType2IEEEPFController.vclmt", &assign_PFVArType2IEEEPFController_vclmt); + assign_map.emplace("cim:PFVArType2IEEEPFController.vref", &assign_PFVArType2IEEEPFController_vref); + assign_map.emplace("cim:PFVArType2IEEEPFController.vs", &assign_PFVArType2IEEEPFController_vs); } void PFVArType2IEEEPFController::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/PFVArType2IEEEPFController.hpp b/CGMES_2.4.13_18DEC2013/PFVArType2IEEEPFController.hpp index 19aebd703..b75160448 100644 --- a/CGMES_2.4.13_18DEC2013/PFVArType2IEEEPFController.hpp +++ b/CGMES_2.4.13_18DEC2013/PFVArType2IEEEPFController.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE PF Controller Type 2 which is a summing point type controller and makes up the outside loop of a two-loop system. This controller is implemented as a slow PI type controller. The voltage regulator forms the inner loop and is implemented as a fast controller. Reference: IEEE Standard 421.5-2005 Section 11.4. - */ + /** \brief The class represents IEEE PF Controller Type 2 which is a summing point type controller and makes up the outside loop of a two-loop system. This controller is implemented as a slow PI type controller. The voltage regulator forms the inner loop and is implemented as a fast controller. Reference: IEEE Standard 421.5-2005 Section 11.4. */ class PFVArType2IEEEPFController : public PFVArControllerType2Dynamics { public: @@ -29,13 +27,26 @@ namespace CIMPP PFVArType2IEEEPFController(); ~PFVArType2IEEEPFController() override; - CIMPP::Boolean exlon; /* Overexcitation or under excitation flag () true = 1 (not in the overexcitation or underexcitation state, integral action is active) false = 0 (in the overexcitation or underexcitation state, so integral action is disabled to allow the limiter to play its role). Default: false */ - CIMPP::PU ki; /* Integral gain of the pf controller (). Typical Value = 1. Default: nullptr */ - CIMPP::PU kp; /* Proportional gain of the pf controller (). Typical Value = 1. Default: nullptr */ - CIMPP::PU pfref; /* Power factor reference (). Default: nullptr */ - CIMPP::PU vclmt; /* Maximum output of the pf controller (). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU vref; /* Voltage regulator reference (). Default: nullptr */ - CIMPP::Simple_Float vs; /* Generator sensing voltage (). Default: nullptr */ + /** \brief Overexcitation or under excitation flag () true = 1 (not in the overexcitation or underexcitation state, integral action is active) false = 0 (in the overexcitation or underexcitation state, so integral action is disabled to allow the limiter to play its role). Default: false */ + CIMPP::Boolean exlon; + + /** \brief Integral gain of the pf controller (). Typical Value = 1. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Proportional gain of the pf controller (). Typical Value = 1. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Power factor reference (). Default: nullptr */ + CIMPP::PU pfref; + + /** \brief Maximum output of the pf controller (). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU vclmt; + + /** \brief Voltage regulator reference (). Default: nullptr */ + CIMPP::PU vref; + + /** \brief Generator sensing voltage (). Default: nullptr */ + CIMPP::Simple_Float vs; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/PFVArType2IEEEVArController.cpp b/CGMES_2.4.13_18DEC2013/PFVArType2IEEEVArController.cpp index ac0459fe6..56e3c29b0 100644 --- a/CGMES_2.4.13_18DEC2013/PFVArType2IEEEVArController.cpp +++ b/CGMES_2.4.13_18DEC2013/PFVArType2IEEEVArController.cpp @@ -8,18 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -PFVArType2IEEEVArController::PFVArType2IEEEVArController() {}; -PFVArType2IEEEVArController::~PFVArType2IEEEVArController() {}; +PFVArType2IEEEVArController::PFVArType2IEEEVArController() {} +PFVArType2IEEEVArController::~PFVArType2IEEEVArController() {} static const std::list PossibleProfilesForClass = { @@ -52,103 +45,108 @@ PFVArType2IEEEVArController::getPossibleProfilesForAttributes() const return map; } - -bool assign_PFVArType2IEEEVArController_exlon(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEVArController_exlon(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exlon; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEVArController_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEVArController_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEVArController_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEVArController_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEVArController_qref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEVArController_qref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEVArController_vclmt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEVArController_vclmt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vclmt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEVArController_vref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEVArController_vref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEVArController_vs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEVArController_vs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PFVArType2IEEEVArController_exlon(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exlon; if (!buffer.str().empty()) @@ -162,7 +160,8 @@ bool get_PFVArType2IEEEVArController_exlon(const BaseClass* BaseClass_ptr1, std: bool get_PFVArType2IEEEVArController_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -176,7 +175,8 @@ bool get_PFVArType2IEEEVArController_ki(const BaseClass* BaseClass_ptr1, std::st bool get_PFVArType2IEEEVArController_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -190,7 +190,8 @@ bool get_PFVArType2IEEEVArController_kp(const BaseClass* BaseClass_ptr1, std::st bool get_PFVArType2IEEEVArController_qref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qref; if (!buffer.str().empty()) @@ -204,7 +205,8 @@ bool get_PFVArType2IEEEVArController_qref(const BaseClass* BaseClass_ptr1, std:: bool get_PFVArType2IEEEVArController_vclmt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vclmt; if (!buffer.str().empty()) @@ -218,7 +220,8 @@ bool get_PFVArType2IEEEVArController_vclmt(const BaseClass* BaseClass_ptr1, std: bool get_PFVArType2IEEEVArController_vref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vref; if (!buffer.str().empty()) @@ -232,7 +235,8 @@ bool get_PFVArType2IEEEVArController_vref(const BaseClass* BaseClass_ptr1, std:: bool get_PFVArType2IEEEVArController_vs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vs; if (!buffer.str().empty()) @@ -244,8 +248,6 @@ bool get_PFVArType2IEEEVArController_vs(const BaseClass* BaseClass_ptr1, std::st return false; } - - const char PFVArType2IEEEVArController::debugName[] = "PFVArType2IEEEVArController"; const char* PFVArType2IEEEVArController::debugString() const { @@ -254,18 +256,18 @@ const char* PFVArType2IEEEVArController::debugString() const void PFVArType2IEEEVArController::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEVArController"), &PFVArType2IEEEVArController_factory)); + factory_map.emplace("cim:PFVArType2IEEEVArController", &PFVArType2IEEEVArController_factory); } void PFVArType2IEEEVArController::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEVArController.exlon"), &assign_PFVArType2IEEEVArController_exlon)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEVArController.ki"), &assign_PFVArType2IEEEVArController_ki)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEVArController.kp"), &assign_PFVArType2IEEEVArController_kp)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEVArController.qref"), &assign_PFVArType2IEEEVArController_qref)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEVArController.vclmt"), &assign_PFVArType2IEEEVArController_vclmt)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEVArController.vref"), &assign_PFVArType2IEEEVArController_vref)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEVArController.vs"), &assign_PFVArType2IEEEVArController_vs)); + assign_map.emplace("cim:PFVArType2IEEEVArController.exlon", &assign_PFVArType2IEEEVArController_exlon); + assign_map.emplace("cim:PFVArType2IEEEVArController.ki", &assign_PFVArType2IEEEVArController_ki); + assign_map.emplace("cim:PFVArType2IEEEVArController.kp", &assign_PFVArType2IEEEVArController_kp); + assign_map.emplace("cim:PFVArType2IEEEVArController.qref", &assign_PFVArType2IEEEVArController_qref); + assign_map.emplace("cim:PFVArType2IEEEVArController.vclmt", &assign_PFVArType2IEEEVArController_vclmt); + assign_map.emplace("cim:PFVArType2IEEEVArController.vref", &assign_PFVArType2IEEEVArController_vref); + assign_map.emplace("cim:PFVArType2IEEEVArController.vs", &assign_PFVArType2IEEEVArController_vs); } void PFVArType2IEEEVArController::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/PFVArType2IEEEVArController.hpp b/CGMES_2.4.13_18DEC2013/PFVArType2IEEEVArController.hpp index 746687398..e5a578551 100644 --- a/CGMES_2.4.13_18DEC2013/PFVArType2IEEEVArController.hpp +++ b/CGMES_2.4.13_18DEC2013/PFVArType2IEEEVArController.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE VAR Controller Type 2 which is a summing point type controller. It makes up the outside loop of a two-loop system. This controller is implemented as a slow PI type controller, and the voltage regulator forms the inner loop and is implemented as a fast controller. Reference: IEEE Standard 421.5-2005 Section 11.5. - */ + /** \brief The class represents IEEE VAR Controller Type 2 which is a summing point type controller. It makes up the outside loop of a two-loop system. This controller is implemented as a slow PI type controller, and the voltage regulator forms the inner loop and is implemented as a fast controller. Reference: IEEE Standard 421.5-2005 Section 11.5. */ class PFVArType2IEEEVArController : public PFVArControllerType2Dynamics { public: @@ -29,13 +27,26 @@ namespace CIMPP PFVArType2IEEEVArController(); ~PFVArType2IEEEVArController() override; - CIMPP::Boolean exlon; /* Overexcitation or under excitation flag () true = 1 (not in the overexcitation or underexcitation state, integral action is active) false = 0 (in the overexcitation or underexcitation state, so integral action is disabled to allow the limiter to play its role). Default: false */ - CIMPP::PU ki; /* Integral gain of the pf controller (). Default: nullptr */ - CIMPP::PU kp; /* Proportional gain of the pf controller (). Default: nullptr */ - CIMPP::PU qref; /* Reactive power reference (). Default: nullptr */ - CIMPP::PU vclmt; /* Maximum output of the pf controller (). Default: nullptr */ - CIMPP::PU vref; /* Voltage regulator reference (). Default: nullptr */ - CIMPP::Simple_Float vs; /* Generator sensing voltage (). Default: nullptr */ + /** \brief Overexcitation or under excitation flag () true = 1 (not in the overexcitation or underexcitation state, integral action is active) false = 0 (in the overexcitation or underexcitation state, so integral action is disabled to allow the limiter to play its role). Default: false */ + CIMPP::Boolean exlon; + + /** \brief Integral gain of the pf controller (). Default: nullptr */ + CIMPP::PU ki; + + /** \brief Proportional gain of the pf controller (). Default: nullptr */ + CIMPP::PU kp; + + /** \brief Reactive power reference (). Default: nullptr */ + CIMPP::PU qref; + + /** \brief Maximum output of the pf controller (). Default: nullptr */ + CIMPP::PU vclmt; + + /** \brief Voltage regulator reference (). Default: nullptr */ + CIMPP::PU vref; + + /** \brief Generator sensing voltage (). Default: nullptr */ + CIMPP::Simple_Float vs; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/PU.hpp b/CGMES_2.4.13_18DEC2013/PU.hpp index 51a1d1117..623ad9e3b 100644 --- a/CGMES_2.4.13_18DEC2013/PU.hpp +++ b/CGMES_2.4.13_18DEC2013/PU.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Per Unit - a positive or negative value referred to a defined base. Values typically range from -10 to +10. - */ + /** \brief Per Unit - a positive or negative value referred to a defined base. Values typically range from -10 to +10. */ class PU { public: diff --git a/CGMES_2.4.13_18DEC2013/PerCent.hpp b/CGMES_2.4.13_18DEC2013/PerCent.hpp index 67bb36e78..d395c6119 100644 --- a/CGMES_2.4.13_18DEC2013/PerCent.hpp +++ b/CGMES_2.4.13_18DEC2013/PerCent.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Percentage on a defined base. For example, specify as 100 to indicate at the defined base. - */ + /** \brief Percentage on a defined base. For example, specify as 100 to indicate at the defined base. */ class PerCent { public: diff --git a/CGMES_2.4.13_18DEC2013/PerLengthDCLineParameter.cpp b/CGMES_2.4.13_18DEC2013/PerLengthDCLineParameter.cpp index b0b2d3ade..f92329e76 100644 --- a/CGMES_2.4.13_18DEC2013/PerLengthDCLineParameter.cpp +++ b/CGMES_2.4.13_18DEC2013/PerLengthDCLineParameter.cpp @@ -9,14 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "DCLineSegment.hpp" -#include "CapacitancePerLength.hpp" -#include "InductancePerLength.hpp" -#include "ResistancePerLength.hpp" using namespace CIMPP; -PerLengthDCLineParameter::PerLengthDCLineParameter() {}; -PerLengthDCLineParameter::~PerLengthDCLineParameter() {}; +PerLengthDCLineParameter::PerLengthDCLineParameter() {} +PerLengthDCLineParameter::~PerLengthDCLineParameter() {} static const std::list PossibleProfilesForClass = { @@ -46,67 +43,70 @@ PerLengthDCLineParameter::getPossibleProfilesForAttributes() const return map; } - -bool assign_PerLengthDCLineParameter_capacitance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCLineSegment_PerLengthParameter(BaseClass*, BaseClass*); +bool assign_PerLengthDCLineParameter_DCLineSegments(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1)) + PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1); + DCLineSegment* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->capacitance; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->DCLineSegments.begin(), element->DCLineSegments.end(), element2) == element->DCLineSegments.end()) + { + element->DCLineSegments.push_back(element2); + return assign_DCLineSegment_PerLengthParameter(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_PerLengthDCLineParameter_inductance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PerLengthDCLineParameter_capacitance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1)) + PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->inductance; - if (buffer.fail()) - return false; - else + buffer >> element->capacitance; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PerLengthDCLineParameter_resistance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PerLengthDCLineParameter_inductance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1)) + PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->resistance; - if (buffer.fail()) - return false; - else + buffer >> element->inductance; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_DCLineSegment_PerLengthParameter(BaseClass*, BaseClass*); -bool assign_PerLengthDCLineParameter_DCLineSegments(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_PerLengthDCLineParameter_resistance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1); - DCLineSegment* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->DCLineSegments.begin(), element->DCLineSegments.end(), element2) == element->DCLineSegments.end()) + buffer >> element->resistance; + if (!buffer.fail()) { - element->DCLineSegments.push_back(element2); - return assign_DCLineSegment_PerLengthParameter(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_PerLengthDCLineParameter_capacitance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1)) + const PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->capacitance; if (!buffer.str().empty()) @@ -120,7 +120,8 @@ bool get_PerLengthDCLineParameter_capacitance(const BaseClass* BaseClass_ptr1, s bool get_PerLengthDCLineParameter_inductance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1)) + const PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inductance; if (!buffer.str().empty()) @@ -134,7 +135,8 @@ bool get_PerLengthDCLineParameter_inductance(const BaseClass* BaseClass_ptr1, st bool get_PerLengthDCLineParameter_resistance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1)) + const PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->resistance; if (!buffer.str().empty()) @@ -146,8 +148,6 @@ bool get_PerLengthDCLineParameter_resistance(const BaseClass* BaseClass_ptr1, st return false; } - - const char PerLengthDCLineParameter::debugName[] = "PerLengthDCLineParameter"; const char* PerLengthDCLineParameter::debugString() const { @@ -156,19 +156,19 @@ const char* PerLengthDCLineParameter::debugString() const void PerLengthDCLineParameter::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PerLengthDCLineParameter"), &PerLengthDCLineParameter_factory)); + factory_map.emplace("cim:PerLengthDCLineParameter", &PerLengthDCLineParameter_factory); } void PerLengthDCLineParameter::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PerLengthDCLineParameter.capacitance"), &assign_PerLengthDCLineParameter_capacitance)); - assign_map.insert(std::make_pair(std::string("cim:PerLengthDCLineParameter.inductance"), &assign_PerLengthDCLineParameter_inductance)); - assign_map.insert(std::make_pair(std::string("cim:PerLengthDCLineParameter.resistance"), &assign_PerLengthDCLineParameter_resistance)); + assign_map.emplace("cim:PerLengthDCLineParameter.capacitance", &assign_PerLengthDCLineParameter_capacitance); + assign_map.emplace("cim:PerLengthDCLineParameter.inductance", &assign_PerLengthDCLineParameter_inductance); + assign_map.emplace("cim:PerLengthDCLineParameter.resistance", &assign_PerLengthDCLineParameter_resistance); } void PerLengthDCLineParameter::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PerLengthDCLineParameter.DCLineSegments"), &assign_PerLengthDCLineParameter_DCLineSegments)); + assign_map.emplace("cim:PerLengthDCLineParameter.DCLineSegments", &assign_PerLengthDCLineParameter_DCLineSegments); } void PerLengthDCLineParameter::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/PerLengthDCLineParameter.hpp b/CGMES_2.4.13_18DEC2013/PerLengthDCLineParameter.hpp index 9fc92a350..5f5cadcde 100644 --- a/CGMES_2.4.13_18DEC2013/PerLengthDCLineParameter.hpp +++ b/CGMES_2.4.13_18DEC2013/PerLengthDCLineParameter.hpp @@ -27,10 +27,17 @@ namespace CIMPP PerLengthDCLineParameter(); ~PerLengthDCLineParameter() override; - std::list DCLineSegments; /* All line segments described by this set of per-length parameters. Default: 0 */ - CIMPP::CapacitancePerLength capacitance; /* Capacitance per unit of length of the DC line segment; significant for cables only. Default: nullptr */ - CIMPP::InductancePerLength inductance; /* Inductance per unit of length of the DC line segment. Default: nullptr */ - CIMPP::ResistancePerLength resistance; /* Resistance per length of the DC line segment. Default: nullptr */ + /** \brief All line segments described by this set of per-length parameters. Default: 0 */ + std::list DCLineSegments; + + /** \brief Capacitance per unit of length of the DC line segment; significant for cables only. Default: nullptr */ + CIMPP::CapacitancePerLength capacitance; + + /** \brief Inductance per unit of length of the DC line segment. Default: nullptr */ + CIMPP::InductancePerLength inductance; + + /** \brief Resistance per length of the DC line segment. Default: nullptr */ + CIMPP::ResistancePerLength resistance; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/PetersenCoil.cpp b/CGMES_2.4.13_18DEC2013/PetersenCoil.cpp index 61cbe6c5a..d19f1fbad 100644 --- a/CGMES_2.4.13_18DEC2013/PetersenCoil.cpp +++ b/CGMES_2.4.13_18DEC2013/PetersenCoil.cpp @@ -8,18 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PetersenCoilModeKind.hpp" -#include "Voltage.hpp" -#include "CurrentFlow.hpp" -#include "CurrentFlow.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -PetersenCoil::PetersenCoil() {}; -PetersenCoil::~PetersenCoil() {}; +PetersenCoil::PetersenCoil() {} +PetersenCoil::~PetersenCoil() {} static const std::list PossibleProfilesForClass = { @@ -52,103 +45,123 @@ PetersenCoil::getPossibleProfilesForAttributes() const return map; } - -bool assign_PetersenCoil_mode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PetersenCoil_mode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mode; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PetersenCoil_nominalU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PetersenCoil_nominalU(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nominalU; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PetersenCoil_offsetCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PetersenCoil_offsetCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->offsetCurrent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PetersenCoil_positionCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PetersenCoil_positionCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->positionCurrent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PetersenCoil_xGroundMax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PetersenCoil_xGroundMax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xGroundMax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PetersenCoil_xGroundMin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PetersenCoil_xGroundMin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xGroundMin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PetersenCoil_xGroundNominal(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PetersenCoil_xGroundNominal(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xGroundNominal; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - +bool get_PetersenCoil_mode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->mode; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} bool get_PetersenCoil_nominalU(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + const PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nominalU; if (!buffer.str().empty()) @@ -162,7 +175,8 @@ bool get_PetersenCoil_nominalU(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_PetersenCoil_offsetCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + const PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->offsetCurrent; if (!buffer.str().empty()) @@ -176,7 +190,8 @@ bool get_PetersenCoil_offsetCurrent(const BaseClass* BaseClass_ptr1, std::string bool get_PetersenCoil_positionCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + const PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->positionCurrent; if (!buffer.str().empty()) @@ -190,7 +205,8 @@ bool get_PetersenCoil_positionCurrent(const BaseClass* BaseClass_ptr1, std::stri bool get_PetersenCoil_xGroundMax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + const PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xGroundMax; if (!buffer.str().empty()) @@ -204,7 +220,8 @@ bool get_PetersenCoil_xGroundMax(const BaseClass* BaseClass_ptr1, std::stringstr bool get_PetersenCoil_xGroundMin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + const PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xGroundMin; if (!buffer.str().empty()) @@ -218,7 +235,8 @@ bool get_PetersenCoil_xGroundMin(const BaseClass* BaseClass_ptr1, std::stringstr bool get_PetersenCoil_xGroundNominal(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + const PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xGroundNominal; if (!buffer.str().empty()) @@ -230,22 +248,6 @@ bool get_PetersenCoil_xGroundNominal(const BaseClass* BaseClass_ptr1, std::strin return false; } - - -bool get_PetersenCoil_mode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->mode; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char PetersenCoil::debugName[] = "PetersenCoil"; const char* PetersenCoil::debugString() const { @@ -254,18 +256,18 @@ const char* PetersenCoil::debugString() const void PetersenCoil::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PetersenCoil"), &PetersenCoil_factory)); + factory_map.emplace("cim:PetersenCoil", &PetersenCoil_factory); } void PetersenCoil::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PetersenCoil.mode"), &assign_PetersenCoil_mode)); - assign_map.insert(std::make_pair(std::string("cim:PetersenCoil.nominalU"), &assign_PetersenCoil_nominalU)); - assign_map.insert(std::make_pair(std::string("cim:PetersenCoil.offsetCurrent"), &assign_PetersenCoil_offsetCurrent)); - assign_map.insert(std::make_pair(std::string("cim:PetersenCoil.positionCurrent"), &assign_PetersenCoil_positionCurrent)); - assign_map.insert(std::make_pair(std::string("cim:PetersenCoil.xGroundMax"), &assign_PetersenCoil_xGroundMax)); - assign_map.insert(std::make_pair(std::string("cim:PetersenCoil.xGroundMin"), &assign_PetersenCoil_xGroundMin)); - assign_map.insert(std::make_pair(std::string("cim:PetersenCoil.xGroundNominal"), &assign_PetersenCoil_xGroundNominal)); + assign_map.emplace("cim:PetersenCoil.mode", &assign_PetersenCoil_mode); + assign_map.emplace("cim:PetersenCoil.nominalU", &assign_PetersenCoil_nominalU); + assign_map.emplace("cim:PetersenCoil.offsetCurrent", &assign_PetersenCoil_offsetCurrent); + assign_map.emplace("cim:PetersenCoil.positionCurrent", &assign_PetersenCoil_positionCurrent); + assign_map.emplace("cim:PetersenCoil.xGroundMax", &assign_PetersenCoil_xGroundMax); + assign_map.emplace("cim:PetersenCoil.xGroundMin", &assign_PetersenCoil_xGroundMin); + assign_map.emplace("cim:PetersenCoil.xGroundNominal", &assign_PetersenCoil_xGroundNominal); } void PetersenCoil::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/PetersenCoil.hpp b/CGMES_2.4.13_18DEC2013/PetersenCoil.hpp index 3aa9c3444..3fcf3a91b 100644 --- a/CGMES_2.4.13_18DEC2013/PetersenCoil.hpp +++ b/CGMES_2.4.13_18DEC2013/PetersenCoil.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A tunable impedance device normally used to offset line charging during single line faults in an ungrounded section of network. - */ + /** \brief A tunable impedance device normally used to offset line charging during single line faults in an ungrounded section of network. */ class PetersenCoil : public EarthFaultCompensator { public: @@ -30,13 +28,26 @@ namespace CIMPP PetersenCoil(); ~PetersenCoil() override; - CIMPP::PetersenCoilModeKind mode; /* The mode of operation of the Petersen coil. Default: 0 */ - CIMPP::Voltage nominalU; /* The nominal voltage for which the coil is designed. Default: nullptr */ - CIMPP::CurrentFlow offsetCurrent; /* The offset current that the Petersen coil controller is operating from the resonant point. This is normally a fixed amount for which the controller is configured and could be positive or negative. Typically 0 to 60 Amperes depending on voltage and resonance conditions. Default: nullptr */ - CIMPP::CurrentFlow positionCurrent; /* The control current used to control the Petersen coil also known as the position current. Typically in the range of 20-200mA. Default: nullptr */ - CIMPP::Reactance xGroundMax; /* The maximum reactance. Default: nullptr */ - CIMPP::Reactance xGroundMin; /* The minimum reactance. Default: nullptr */ - CIMPP::Reactance xGroundNominal; /* The nominal reactance. This is the operating point (normally over compensation) that is defined based on the resonance point in the healthy network condition. The impedance is calculated based on nominal voltage divided by position current. Default: nullptr */ + /** \brief The mode of operation of the Petersen coil. Default: 0 */ + CIMPP::PetersenCoilModeKind mode; + + /** \brief The nominal voltage for which the coil is designed. Default: nullptr */ + CIMPP::Voltage nominalU; + + /** \brief The offset current that the Petersen coil controller is operating from the resonant point. This is normally a fixed amount for which the controller is configured and could be positive or negative. Typically 0 to 60 Amperes depending on voltage and resonance conditions. Default: nullptr */ + CIMPP::CurrentFlow offsetCurrent; + + /** \brief The control current used to control the Petersen coil also known as the position current. Typically in the range of 20-200mA. Default: nullptr */ + CIMPP::CurrentFlow positionCurrent; + + /** \brief The maximum reactance. Default: nullptr */ + CIMPP::Reactance xGroundMax; + + /** \brief The minimum reactance. Default: nullptr */ + CIMPP::Reactance xGroundMin; + + /** \brief The nominal reactance. This is the operating point (normally over compensation) that is defined based on the resonance point in the healthy network condition. The impedance is calculated based on nominal voltage divided by position current. Default: nullptr */ + CIMPP::Reactance xGroundNominal; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/PetersenCoilModeKind.cpp b/CGMES_2.4.13_18DEC2013/PetersenCoilModeKind.cpp index a2e6dcbf7..441a95595 100644 --- a/CGMES_2.4.13_18DEC2013/PetersenCoilModeKind.cpp +++ b/CGMES_2.4.13_18DEC2013/PetersenCoilModeKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "PetersenCoilModeKind") + if (EnumSymbol.substr(0, pos) != "PetersenCoilModeKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "fixed") + if (EnumSymbol == "fixed") { rop = PetersenCoilModeKind::fixed; return lop; } - if(EnumSymbol == "manual") + if (EnumSymbol == "manual") { rop = PetersenCoilModeKind::manual; return lop; } - if(EnumSymbol == "automaticPositioning") + if (EnumSymbol == "automaticPositioning") { rop = PetersenCoilModeKind::automaticPositioning; return lop; diff --git a/CGMES_2.4.13_18DEC2013/PetersenCoilModeKind.hpp b/CGMES_2.4.13_18DEC2013/PetersenCoilModeKind.hpp index 6bfff0ea0..07e6e819e 100644 --- a/CGMES_2.4.13_18DEC2013/PetersenCoilModeKind.hpp +++ b/CGMES_2.4.13_18DEC2013/PetersenCoilModeKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The mode of operation for a Petersen coil. - */ + /** \brief The mode of operation for a Petersen coil. */ class PetersenCoilModeKind { public: enum PetersenCoilModeKind_ENUM { - /** - * Fixed position. - */ + /** Fixed position. */ fixed, - /** - * Manual positioning. - */ + /** Manual positioning. */ manual, - /** - * Automatic positioning. - */ + /** Automatic positioning. */ automaticPositioning, }; diff --git a/CGMES_2.4.13_18DEC2013/PhaseCode.cpp b/CGMES_2.4.13_18DEC2013/PhaseCode.cpp index 49aa040c7..d8fe957a4 100644 --- a/CGMES_2.4.13_18DEC2013/PhaseCode.cpp +++ b/CGMES_2.4.13_18DEC2013/PhaseCode.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "PhaseCode") + if (EnumSymbol.substr(0, pos) != "PhaseCode") { lop.setstate(std::ios::failbit); return lop; @@ -50,107 +50,107 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "ABCN") + if (EnumSymbol == "ABCN") { rop = PhaseCode::ABCN; return lop; } - if(EnumSymbol == "ABC") + if (EnumSymbol == "ABC") { rop = PhaseCode::ABC; return lop; } - if(EnumSymbol == "ABN") + if (EnumSymbol == "ABN") { rop = PhaseCode::ABN; return lop; } - if(EnumSymbol == "ACN") + if (EnumSymbol == "ACN") { rop = PhaseCode::ACN; return lop; } - if(EnumSymbol == "BCN") + if (EnumSymbol == "BCN") { rop = PhaseCode::BCN; return lop; } - if(EnumSymbol == "AB") + if (EnumSymbol == "AB") { rop = PhaseCode::AB; return lop; } - if(EnumSymbol == "AC") + if (EnumSymbol == "AC") { rop = PhaseCode::AC; return lop; } - if(EnumSymbol == "BC") + if (EnumSymbol == "BC") { rop = PhaseCode::BC; return lop; } - if(EnumSymbol == "AN") + if (EnumSymbol == "AN") { rop = PhaseCode::AN; return lop; } - if(EnumSymbol == "BN") + if (EnumSymbol == "BN") { rop = PhaseCode::BN; return lop; } - if(EnumSymbol == "CN") + if (EnumSymbol == "CN") { rop = PhaseCode::CN; return lop; } - if(EnumSymbol == "A") + if (EnumSymbol == "A") { rop = PhaseCode::A; return lop; } - if(EnumSymbol == "B") + if (EnumSymbol == "B") { rop = PhaseCode::B; return lop; } - if(EnumSymbol == "C") + if (EnumSymbol == "C") { rop = PhaseCode::C; return lop; } - if(EnumSymbol == "N") + if (EnumSymbol == "N") { rop = PhaseCode::N; return lop; } - if(EnumSymbol == "s1N") + if (EnumSymbol == "s1N") { rop = PhaseCode::s1N; return lop; } - if(EnumSymbol == "s2N") + if (EnumSymbol == "s2N") { rop = PhaseCode::s2N; return lop; } - if(EnumSymbol == "s12N") + if (EnumSymbol == "s12N") { rop = PhaseCode::s12N; return lop; } - if(EnumSymbol == "s1") + if (EnumSymbol == "s1") { rop = PhaseCode::s1; return lop; } - if(EnumSymbol == "s2") + if (EnumSymbol == "s2") { rop = PhaseCode::s2; return lop; } - if(EnumSymbol == "s12") + if (EnumSymbol == "s12") { rop = PhaseCode::s12; return lop; diff --git a/CGMES_2.4.13_18DEC2013/PhaseCode.hpp b/CGMES_2.4.13_18DEC2013/PhaseCode.hpp index 37a523ed2..bca621aca 100644 --- a/CGMES_2.4.13_18DEC2013/PhaseCode.hpp +++ b/CGMES_2.4.13_18DEC2013/PhaseCode.hpp @@ -9,97 +9,53 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Enumeration of phase identifiers. Allows designation of phases for both transmission and distribution equipment, circuits and loads. Residential and small commercial loads are often served from single-phase, or split-phase, secondary circuits. For example of s12N, phases 1 and 2 refer to hot wires that are 180 degrees out of phase, while N refers to the neutral wire. Through single-phase transformer connections, these secondary circuits may be served from one or two of the primary phases A, B, and C. For three-phase loads, use the A, B, C phase codes instead of s12N. - */ + /** \brief Enumeration of phase identifiers. Allows designation of phases for both transmission and distribution equipment, circuits and loads. Residential and small commercial loads are often served from single-phase, or split-phase, secondary circuits. For example of s12N, phases 1 and 2 refer to hot wires that are 180 degrees out of phase, while N refers to the neutral wire. Through single-phase transformer connections, these secondary circuits may be served from one or two of the primary phases A, B, and C. For three-phase loads, use the A, B, C phase codes instead of s12N. */ class PhaseCode { public: enum PhaseCode_ENUM { - /** - * Phases A, B, C, and N. - */ + /** Phases A, B, C, and N. */ ABCN, - /** - * Phases A, B, and C. - */ + /** Phases A, B, and C. */ ABC, - /** - * Phases A, B, and neutral. - */ + /** Phases A, B, and neutral. */ ABN, - /** - * Phases A, C and neutral. - */ + /** Phases A, C and neutral. */ ACN, - /** - * Phases B, C, and neutral. - */ + /** Phases B, C, and neutral. */ BCN, - /** - * Phases A and B. - */ + /** Phases A and B. */ AB, - /** - * Phases A and C. - */ + /** Phases A and C. */ AC, - /** - * Phases B and C. - */ + /** Phases B and C. */ BC, - /** - * Phases A and neutral. - */ + /** Phases A and neutral. */ AN, - /** - * Phases B and neutral. - */ + /** Phases B and neutral. */ BN, - /** - * Phases C and neutral. - */ + /** Phases C and neutral. */ CN, - /** - * Phase A. - */ + /** Phase A. */ A, - /** - * Phase B. - */ + /** Phase B. */ B, - /** - * Phase C. - */ + /** Phase C. */ C, - /** - * Neutral phase. - */ + /** Neutral phase. */ N, - /** - * Secondary phase 1 and neutral. - */ + /** Secondary phase 1 and neutral. */ s1N, - /** - * Secondary phase 2 and neutral. - */ + /** Secondary phase 2 and neutral. */ s2N, - /** - * Secondary phases 1, 2, and neutral. - */ + /** Secondary phases 1, 2, and neutral. */ s12N, - /** - * Secondary phase 1. - */ + /** Secondary phase 1. */ s1, - /** - * Secondary phase 2. - */ + /** Secondary phase 2. */ s2, - /** - * Secondary phase 1 and 2. - */ + /** Secondary phase 1 and 2. */ s12, }; diff --git a/CGMES_2.4.13_18DEC2013/PhaseTapChanger.cpp b/CGMES_2.4.13_18DEC2013/PhaseTapChanger.cpp index c04fc4118..71a0b044e 100644 --- a/CGMES_2.4.13_18DEC2013/PhaseTapChanger.cpp +++ b/CGMES_2.4.13_18DEC2013/PhaseTapChanger.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -PhaseTapChanger::PhaseTapChanger() : TransformerEnd(nullptr) {}; -PhaseTapChanger::~PhaseTapChanger() {}; +PhaseTapChanger::PhaseTapChanger() : TransformerEnd(nullptr) {} +PhaseTapChanger::~PhaseTapChanger() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ PhaseTapChanger::getPossibleProfilesForAttributes() const return map; } - - bool assign_TransformerEnd_PhaseTapChanger(BaseClass*, BaseClass*); bool assign_PhaseTapChanger_TransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_PhaseTapChanger_TransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* return false; } - bool get_PhaseTapChanger_TransformerEnd(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const PhaseTapChanger* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->TransformerEnd != 0) { @@ -73,7 +71,6 @@ bool get_PhaseTapChanger_TransformerEnd(const BaseClass* BaseClass_ptr1, std::li return false; } - const char PhaseTapChanger::debugName[] = "PhaseTapChanger"; const char* PhaseTapChanger::debugString() const { @@ -82,7 +79,7 @@ const char* PhaseTapChanger::debugString() const void PhaseTapChanger::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PhaseTapChanger"), &PhaseTapChanger_factory)); + factory_map.emplace("cim:PhaseTapChanger", &PhaseTapChanger_factory); } void PhaseTapChanger::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void PhaseTapChanger::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChanger.TransformerEnd"), &assign_PhaseTapChanger_TransformerEnd)); + assign_map.emplace("cim:PhaseTapChanger.TransformerEnd", &assign_PhaseTapChanger_TransformerEnd); } void PhaseTapChanger::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/PhaseTapChanger.hpp b/CGMES_2.4.13_18DEC2013/PhaseTapChanger.hpp index 37489a23b..9fdaa4aa7 100644 --- a/CGMES_2.4.13_18DEC2013/PhaseTapChanger.hpp +++ b/CGMES_2.4.13_18DEC2013/PhaseTapChanger.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class TransformerEnd; - /* - A transformer phase shifting tap model that controls the phase angle difference across the power transformer and potentially the active power flow through the power transformer. This phase tap model may also impact the voltage magnitude. - */ + /** \brief A transformer phase shifting tap model that controls the phase angle difference across the power transformer and potentially the active power flow through the power transformer. This phase tap model may also impact the voltage magnitude. */ class PhaseTapChanger : public TapChanger { public: @@ -27,7 +25,8 @@ namespace CIMPP PhaseTapChanger(); ~PhaseTapChanger() override; - CIMPP::TransformerEnd* TransformerEnd; /* Phase tap changer associated with this transformer end. Default: 0 */ + /** \brief Phase tap changer associated with this transformer end. Default: 0 */ + CIMPP::TransformerEnd* TransformerEnd; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/PhaseTapChangerAsymmetrical.cpp b/CGMES_2.4.13_18DEC2013/PhaseTapChangerAsymmetrical.cpp index adc6bbd93..c776e0826 100644 --- a/CGMES_2.4.13_18DEC2013/PhaseTapChangerAsymmetrical.cpp +++ b/CGMES_2.4.13_18DEC2013/PhaseTapChangerAsymmetrical.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "AngleDegrees.hpp" using namespace CIMPP; -PhaseTapChangerAsymmetrical::PhaseTapChangerAsymmetrical() {}; -PhaseTapChangerAsymmetrical::~PhaseTapChangerAsymmetrical() {}; +PhaseTapChangerAsymmetrical::PhaseTapChangerAsymmetrical() {} +PhaseTapChangerAsymmetrical::~PhaseTapChangerAsymmetrical() {} static const std::list PossibleProfilesForClass = { @@ -40,25 +39,24 @@ PhaseTapChangerAsymmetrical::getPossibleProfilesForAttributes() const return map; } - -bool assign_PhaseTapChangerAsymmetrical_windingConnectionAngle(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PhaseTapChangerAsymmetrical_windingConnectionAngle(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PhaseTapChangerAsymmetrical* element = dynamic_cast(BaseClass_ptr1)) + PhaseTapChangerAsymmetrical* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->windingConnectionAngle; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PhaseTapChangerAsymmetrical_windingConnectionAngle(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PhaseTapChangerAsymmetrical* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChangerAsymmetrical* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->windingConnectionAngle; if (!buffer.str().empty()) @@ -70,8 +68,6 @@ bool get_PhaseTapChangerAsymmetrical_windingConnectionAngle(const BaseClass* Bas return false; } - - const char PhaseTapChangerAsymmetrical::debugName[] = "PhaseTapChangerAsymmetrical"; const char* PhaseTapChangerAsymmetrical::debugString() const { @@ -80,12 +76,12 @@ const char* PhaseTapChangerAsymmetrical::debugString() const void PhaseTapChangerAsymmetrical::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PhaseTapChangerAsymmetrical"), &PhaseTapChangerAsymmetrical_factory)); + factory_map.emplace("cim:PhaseTapChangerAsymmetrical", &PhaseTapChangerAsymmetrical_factory); } void PhaseTapChangerAsymmetrical::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerAsymmetrical.windingConnectionAngle"), &assign_PhaseTapChangerAsymmetrical_windingConnectionAngle)); + assign_map.emplace("cim:PhaseTapChangerAsymmetrical.windingConnectionAngle", &assign_PhaseTapChangerAsymmetrical_windingConnectionAngle); } void PhaseTapChangerAsymmetrical::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/PhaseTapChangerAsymmetrical.hpp b/CGMES_2.4.13_18DEC2013/PhaseTapChangerAsymmetrical.hpp index 6f6bbc14c..580e7ca49 100644 --- a/CGMES_2.4.13_18DEC2013/PhaseTapChangerAsymmetrical.hpp +++ b/CGMES_2.4.13_18DEC2013/PhaseTapChangerAsymmetrical.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Describes the tap model for an asymmetrical phase shifting transformer in which the difference voltage vector adds to the primary side voltage. The angle between the primary side voltage and the difference voltage is named the winding connection angle. The phase shift depends on both the difference voltage magnitude and the winding connection angle. - */ + /** \brief Describes the tap model for an asymmetrical phase shifting transformer in which the difference voltage vector adds to the primary side voltage. The angle between the primary side voltage and the difference voltage is named the winding connection angle. The phase shift depends on both the difference voltage magnitude and the winding connection angle. */ class PhaseTapChangerAsymmetrical : public PhaseTapChangerNonLinear { public: @@ -27,7 +25,8 @@ namespace CIMPP PhaseTapChangerAsymmetrical(); ~PhaseTapChangerAsymmetrical() override; - CIMPP::AngleDegrees windingConnectionAngle; /* The phase angle between the in-phase winding and the out-of -phase winding used for creating phase shift. The out-of-phase winding produces what is known as the difference voltage. Setting this angle to 90 degrees is not the same as a symmemtrical transformer. Default: nullptr */ + /** \brief The phase angle between the in-phase winding and the out-of -phase winding used for creating phase shift. The out-of-phase winding produces what is known as the difference voltage. Setting this angle to 90 degrees is not the same as a symmemtrical transformer. Default: nullptr */ + CIMPP::AngleDegrees windingConnectionAngle; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/PhaseTapChangerLinear.cpp b/CGMES_2.4.13_18DEC2013/PhaseTapChangerLinear.cpp index e3738acca..f6945cb77 100644 --- a/CGMES_2.4.13_18DEC2013/PhaseTapChangerLinear.cpp +++ b/CGMES_2.4.13_18DEC2013/PhaseTapChangerLinear.cpp @@ -8,14 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "AngleDegrees.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -PhaseTapChangerLinear::PhaseTapChangerLinear() {}; -PhaseTapChangerLinear::~PhaseTapChangerLinear() {}; +PhaseTapChangerLinear::PhaseTapChangerLinear() {} +PhaseTapChangerLinear::~PhaseTapChangerLinear() {} static const std::list PossibleProfilesForClass = { @@ -44,51 +41,52 @@ PhaseTapChangerLinear::getPossibleProfilesForAttributes() const return map; } - -bool assign_PhaseTapChangerLinear_stepPhaseShiftIncrement(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PhaseTapChangerLinear_stepPhaseShiftIncrement(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1)) + PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->stepPhaseShiftIncrement; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PhaseTapChangerLinear_xMax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PhaseTapChangerLinear_xMax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1)) + PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xMax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PhaseTapChangerLinear_xMin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PhaseTapChangerLinear_xMin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1)) + PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xMin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PhaseTapChangerLinear_stepPhaseShiftIncrement(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->stepPhaseShiftIncrement; if (!buffer.str().empty()) @@ -102,7 +100,8 @@ bool get_PhaseTapChangerLinear_stepPhaseShiftIncrement(const BaseClass* BaseClas bool get_PhaseTapChangerLinear_xMax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xMax; if (!buffer.str().empty()) @@ -116,7 +115,8 @@ bool get_PhaseTapChangerLinear_xMax(const BaseClass* BaseClass_ptr1, std::string bool get_PhaseTapChangerLinear_xMin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xMin; if (!buffer.str().empty()) @@ -128,8 +128,6 @@ bool get_PhaseTapChangerLinear_xMin(const BaseClass* BaseClass_ptr1, std::string return false; } - - const char PhaseTapChangerLinear::debugName[] = "PhaseTapChangerLinear"; const char* PhaseTapChangerLinear::debugString() const { @@ -138,14 +136,14 @@ const char* PhaseTapChangerLinear::debugString() const void PhaseTapChangerLinear::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PhaseTapChangerLinear"), &PhaseTapChangerLinear_factory)); + factory_map.emplace("cim:PhaseTapChangerLinear", &PhaseTapChangerLinear_factory); } void PhaseTapChangerLinear::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerLinear.stepPhaseShiftIncrement"), &assign_PhaseTapChangerLinear_stepPhaseShiftIncrement)); - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerLinear.xMax"), &assign_PhaseTapChangerLinear_xMax)); - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerLinear.xMin"), &assign_PhaseTapChangerLinear_xMin)); + assign_map.emplace("cim:PhaseTapChangerLinear.stepPhaseShiftIncrement", &assign_PhaseTapChangerLinear_stepPhaseShiftIncrement); + assign_map.emplace("cim:PhaseTapChangerLinear.xMax", &assign_PhaseTapChangerLinear_xMax); + assign_map.emplace("cim:PhaseTapChangerLinear.xMin", &assign_PhaseTapChangerLinear_xMin); } void PhaseTapChangerLinear::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/PhaseTapChangerLinear.hpp b/CGMES_2.4.13_18DEC2013/PhaseTapChangerLinear.hpp index 81c711cca..fb4655393 100644 --- a/CGMES_2.4.13_18DEC2013/PhaseTapChangerLinear.hpp +++ b/CGMES_2.4.13_18DEC2013/PhaseTapChangerLinear.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Describes a tap changer with a linear relation between the tap step and the phase angle difference across the transformer. This is a mathematical model that is an approximation of a real phase tap changer. The phase angle is computed as stepPhaseShitfIncrement times the tap position. The secondary side voltage magnitude is the same as at the primary side. - */ + /** \brief Describes a tap changer with a linear relation between the tap step and the phase angle difference across the transformer. This is a mathematical model that is an approximation of a real phase tap changer. The phase angle is computed as stepPhaseShitfIncrement times the tap position. The secondary side voltage magnitude is the same as at the primary side. */ class PhaseTapChangerLinear : public PhaseTapChanger { public: @@ -28,9 +26,14 @@ namespace CIMPP PhaseTapChangerLinear(); ~PhaseTapChangerLinear() override; - CIMPP::AngleDegrees stepPhaseShiftIncrement; /* Phase shift per step position. A positive value indicates a positive phase shift from the winding where the tap is located to the other winding (for a two-winding transformer). The actual phase shift increment might be more accurately computed from the symmetrical or asymmetrical models or a tap step table lookup if those are available. Default: nullptr */ - CIMPP::Reactance xMax; /* The reactance depend on the tap position according to a `u` shaped curve. The maximum reactance (xMax) appear at the low and high tap positions. Default: nullptr */ - CIMPP::Reactance xMin; /* The reactance depend on the tap position according to a `u` shaped curve. The minimum reactance (xMin) appear at the mid tap position. Default: nullptr */ + /** \brief Phase shift per step position. A positive value indicates a positive phase shift from the winding where the tap is located to the other winding (for a two-winding transformer). The actual phase shift increment might be more accurately computed from the symmetrical or asymmetrical models or a tap step table lookup if those are available. Default: nullptr */ + CIMPP::AngleDegrees stepPhaseShiftIncrement; + + /** \brief The reactance depend on the tap position according to a `u` shaped curve. The maximum reactance (xMax) appear at the low and high tap positions. Default: nullptr */ + CIMPP::Reactance xMax; + + /** \brief The reactance depend on the tap position according to a `u` shaped curve. The minimum reactance (xMin) appear at the mid tap position. Default: nullptr */ + CIMPP::Reactance xMin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/PhaseTapChangerNonLinear.cpp b/CGMES_2.4.13_18DEC2013/PhaseTapChangerNonLinear.cpp index 001625db3..fa16a2960 100644 --- a/CGMES_2.4.13_18DEC2013/PhaseTapChangerNonLinear.cpp +++ b/CGMES_2.4.13_18DEC2013/PhaseTapChangerNonLinear.cpp @@ -8,14 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PerCent.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -PhaseTapChangerNonLinear::PhaseTapChangerNonLinear() {}; -PhaseTapChangerNonLinear::~PhaseTapChangerNonLinear() {}; +PhaseTapChangerNonLinear::PhaseTapChangerNonLinear() {} +PhaseTapChangerNonLinear::~PhaseTapChangerNonLinear() {} static const std::list PossibleProfilesForClass = { @@ -44,51 +41,52 @@ PhaseTapChangerNonLinear::getPossibleProfilesForAttributes() const return map; } - -bool assign_PhaseTapChangerNonLinear_voltageStepIncrement(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PhaseTapChangerNonLinear_voltageStepIncrement(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1)) + PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->voltageStepIncrement; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PhaseTapChangerNonLinear_xMax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PhaseTapChangerNonLinear_xMax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1)) + PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xMax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PhaseTapChangerNonLinear_xMin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PhaseTapChangerNonLinear_xMin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1)) + PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xMin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PhaseTapChangerNonLinear_voltageStepIncrement(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->voltageStepIncrement; if (!buffer.str().empty()) @@ -102,7 +100,8 @@ bool get_PhaseTapChangerNonLinear_voltageStepIncrement(const BaseClass* BaseClas bool get_PhaseTapChangerNonLinear_xMax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xMax; if (!buffer.str().empty()) @@ -116,7 +115,8 @@ bool get_PhaseTapChangerNonLinear_xMax(const BaseClass* BaseClass_ptr1, std::str bool get_PhaseTapChangerNonLinear_xMin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xMin; if (!buffer.str().empty()) @@ -128,8 +128,6 @@ bool get_PhaseTapChangerNonLinear_xMin(const BaseClass* BaseClass_ptr1, std::str return false; } - - const char PhaseTapChangerNonLinear::debugName[] = "PhaseTapChangerNonLinear"; const char* PhaseTapChangerNonLinear::debugString() const { @@ -138,14 +136,14 @@ const char* PhaseTapChangerNonLinear::debugString() const void PhaseTapChangerNonLinear::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PhaseTapChangerNonLinear"), &PhaseTapChangerNonLinear_factory)); + factory_map.emplace("cim:PhaseTapChangerNonLinear", &PhaseTapChangerNonLinear_factory); } void PhaseTapChangerNonLinear::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerNonLinear.voltageStepIncrement"), &assign_PhaseTapChangerNonLinear_voltageStepIncrement)); - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerNonLinear.xMax"), &assign_PhaseTapChangerNonLinear_xMax)); - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerNonLinear.xMin"), &assign_PhaseTapChangerNonLinear_xMin)); + assign_map.emplace("cim:PhaseTapChangerNonLinear.voltageStepIncrement", &assign_PhaseTapChangerNonLinear_voltageStepIncrement); + assign_map.emplace("cim:PhaseTapChangerNonLinear.xMax", &assign_PhaseTapChangerNonLinear_xMax); + assign_map.emplace("cim:PhaseTapChangerNonLinear.xMin", &assign_PhaseTapChangerNonLinear_xMin); } void PhaseTapChangerNonLinear::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/PhaseTapChangerNonLinear.hpp b/CGMES_2.4.13_18DEC2013/PhaseTapChangerNonLinear.hpp index a35713ecc..f45bdb493 100644 --- a/CGMES_2.4.13_18DEC2013/PhaseTapChangerNonLinear.hpp +++ b/CGMES_2.4.13_18DEC2013/PhaseTapChangerNonLinear.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The non-linear phase tap changer describes the non-linear behavior of a phase tap changer. This is a base class for the symmetrical and asymmetrical phase tap changer models. The details of these models can be found in the IEC 61970-301 document. - */ + /** \brief The non-linear phase tap changer describes the non-linear behavior of a phase tap changer. This is a base class for the symmetrical and asymmetrical phase tap changer models. The details of these models can be found in the IEC 61970-301 document. */ class PhaseTapChangerNonLinear : public PhaseTapChanger { public: @@ -28,9 +26,14 @@ namespace CIMPP PhaseTapChangerNonLinear(); ~PhaseTapChangerNonLinear() override; - CIMPP::PerCent voltageStepIncrement; /* The voltage step increment on the out of phase winding specified in percent of nominal voltage of the transformer end. Default: nullptr */ - CIMPP::Reactance xMax; /* The reactance depend on the tap position according to a `u` shaped curve. The maximum reactance (xMax) appear at the low and high tap positions. Default: nullptr */ - CIMPP::Reactance xMin; /* The reactance depend on the tap position according to a `u` shaped curve. The minimum reactance (xMin) appear at the mid tap position. Default: nullptr */ + /** \brief The voltage step increment on the out of phase winding specified in percent of nominal voltage of the transformer end. Default: nullptr */ + CIMPP::PerCent voltageStepIncrement; + + /** \brief The reactance depend on the tap position according to a `u` shaped curve. The maximum reactance (xMax) appear at the low and high tap positions. Default: nullptr */ + CIMPP::Reactance xMax; + + /** \brief The reactance depend on the tap position according to a `u` shaped curve. The minimum reactance (xMin) appear at the mid tap position. Default: nullptr */ + CIMPP::Reactance xMin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/PhaseTapChangerSymmetrical.cpp b/CGMES_2.4.13_18DEC2013/PhaseTapChangerSymmetrical.cpp index e248e97a5..dc762e6d2 100644 --- a/CGMES_2.4.13_18DEC2013/PhaseTapChangerSymmetrical.cpp +++ b/CGMES_2.4.13_18DEC2013/PhaseTapChangerSymmetrical.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -PhaseTapChangerSymmetrical::PhaseTapChangerSymmetrical() {}; -PhaseTapChangerSymmetrical::~PhaseTapChangerSymmetrical() {}; +PhaseTapChangerSymmetrical::PhaseTapChangerSymmetrical() {} +PhaseTapChangerSymmetrical::~PhaseTapChangerSymmetrical() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ PhaseTapChangerSymmetrical::getPossibleProfilesForAttributes() const return map; } - - - - - const char PhaseTapChangerSymmetrical::debugName[] = "PhaseTapChangerSymmetrical"; const char* PhaseTapChangerSymmetrical::debugString() const { @@ -51,7 +46,7 @@ const char* PhaseTapChangerSymmetrical::debugString() const void PhaseTapChangerSymmetrical::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PhaseTapChangerSymmetrical"), &PhaseTapChangerSymmetrical_factory)); + factory_map.emplace("cim:PhaseTapChangerSymmetrical", &PhaseTapChangerSymmetrical_factory); } void PhaseTapChangerSymmetrical::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/PhaseTapChangerSymmetrical.hpp b/CGMES_2.4.13_18DEC2013/PhaseTapChangerSymmetrical.hpp index 736a21f3c..ee1910790 100644 --- a/CGMES_2.4.13_18DEC2013/PhaseTapChangerSymmetrical.hpp +++ b/CGMES_2.4.13_18DEC2013/PhaseTapChangerSymmetrical.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Describes a symmetrical phase shifting transformer tap model in which the secondary side voltage magnitude is the same as at the primary side. The difference voltage magnitude is the base in an equal-sided triangle where the sides corresponds to the primary and secondary voltages. The phase angle difference corresponds to the top angle and can be expressed as twice the arctangent of half the total difference voltage. - */ + /** \brief Describes a symmetrical phase shifting transformer tap model in which the secondary side voltage magnitude is the same as at the primary side. The difference voltage magnitude is the base in an equal-sided triangle where the sides corresponds to the primary and secondary voltages. The phase angle difference corresponds to the top angle and can be expressed as twice the arctangent of half the total difference voltage. */ class PhaseTapChangerSymmetrical : public PhaseTapChangerNonLinear { public: @@ -26,7 +24,6 @@ namespace CIMPP PhaseTapChangerSymmetrical(); ~PhaseTapChangerSymmetrical() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/PhaseTapChangerTable.cpp b/CGMES_2.4.13_18DEC2013/PhaseTapChangerTable.cpp index b9d353812..81e747699 100644 --- a/CGMES_2.4.13_18DEC2013/PhaseTapChangerTable.cpp +++ b/CGMES_2.4.13_18DEC2013/PhaseTapChangerTable.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -PhaseTapChangerTable::PhaseTapChangerTable() {}; -PhaseTapChangerTable::~PhaseTapChangerTable() {}; +PhaseTapChangerTable::PhaseTapChangerTable() {} +PhaseTapChangerTable::~PhaseTapChangerTable() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ PhaseTapChangerTable::getPossibleProfilesForAttributes() const return map; } - - bool assign_PhaseTapChangerTablePoint_PhaseTapChangerTable(BaseClass*, BaseClass*); bool assign_PhaseTapChangerTable_PhaseTapChangerTablePoint(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_PhaseTapChangerTable_PhaseTapChangerTablePoint(BaseClass* BaseClass_ } return false; } + bool assign_PhaseTapChangerTabular_PhaseTapChangerTable(BaseClass*, BaseClass*); bool assign_PhaseTapChangerTable_PhaseTapChangerTabular(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -87,7 +86,7 @@ const char* PhaseTapChangerTable::debugString() const void PhaseTapChangerTable::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTable"), &PhaseTapChangerTable_factory)); + factory_map.emplace("cim:PhaseTapChangerTable", &PhaseTapChangerTable_factory); } void PhaseTapChangerTable::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -96,8 +95,8 @@ void PhaseTapChangerTable::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTable.PhaseTapChangerTablePoint"), &assign_PhaseTapChangerTable_PhaseTapChangerTablePoint)); - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTable.PhaseTapChangerTabular"), &assign_PhaseTapChangerTable_PhaseTapChangerTabular)); + assign_map.emplace("cim:PhaseTapChangerTable.PhaseTapChangerTablePoint", &assign_PhaseTapChangerTable_PhaseTapChangerTablePoint); + assign_map.emplace("cim:PhaseTapChangerTable.PhaseTapChangerTabular", &assign_PhaseTapChangerTable_PhaseTapChangerTabular); } void PhaseTapChangerTable::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/PhaseTapChangerTable.hpp b/CGMES_2.4.13_18DEC2013/PhaseTapChangerTable.hpp index 6291c316c..9b76ee650 100644 --- a/CGMES_2.4.13_18DEC2013/PhaseTapChangerTable.hpp +++ b/CGMES_2.4.13_18DEC2013/PhaseTapChangerTable.hpp @@ -18,9 +18,7 @@ namespace CIMPP class PhaseTapChangerTablePoint; class PhaseTapChangerTabular; - /* - Describes a tabular curve for how the phase angle difference and impedance varies with the tap step. - */ + /** \brief Describes a tabular curve for how the phase angle difference and impedance varies with the tap step. */ class PhaseTapChangerTable : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP PhaseTapChangerTable(); ~PhaseTapChangerTable() override; - std::list PhaseTapChangerTablePoint; /* The points of this table. Default: 0 */ - std::list PhaseTapChangerTabular; /* The phase tap changers to which this phase tap table applies. Default: 0 */ + /** \brief The points of this table. Default: 0 */ + std::list PhaseTapChangerTablePoint; + + /** \brief The phase tap changers to which this phase tap table applies. Default: 0 */ + std::list PhaseTapChangerTabular; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/PhaseTapChangerTablePoint.cpp b/CGMES_2.4.13_18DEC2013/PhaseTapChangerTablePoint.cpp index 156dcecab..e4c877019 100644 --- a/CGMES_2.4.13_18DEC2013/PhaseTapChangerTablePoint.cpp +++ b/CGMES_2.4.13_18DEC2013/PhaseTapChangerTablePoint.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "PhaseTapChangerTable.hpp" -#include "AngleDegrees.hpp" using namespace CIMPP; -PhaseTapChangerTablePoint::PhaseTapChangerTablePoint() : PhaseTapChangerTable(nullptr) {}; -PhaseTapChangerTablePoint::~PhaseTapChangerTablePoint() {}; +PhaseTapChangerTablePoint::PhaseTapChangerTablePoint() : PhaseTapChangerTable(nullptr) {} +PhaseTapChangerTablePoint::~PhaseTapChangerTablePoint() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ PhaseTapChangerTablePoint::getPossibleProfilesForAttributes() const return map; } - -bool assign_PhaseTapChangerTablePoint_angle(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (PhaseTapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->angle; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_PhaseTapChangerTable_PhaseTapChangerTablePoint(BaseClass*, BaseClass*); bool assign_PhaseTapChangerTablePoint_PhaseTapChangerTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_PhaseTapChangerTablePoint_PhaseTapChangerTable(BaseClass* BaseClass_ return false; } -bool get_PhaseTapChangerTablePoint_angle(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_PhaseTapChangerTablePoint_angle(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const PhaseTapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + PhaseTapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->angle; - if (!buffer.str().empty()) + buffer >> element->angle; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_PhaseTapChangerTablePoint_PhaseTapChangerTable(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const PhaseTapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PhaseTapChangerTable != 0) { @@ -102,6 +86,20 @@ bool get_PhaseTapChangerTablePoint_PhaseTapChangerTable(const BaseClass* BaseCla return false; } +bool get_PhaseTapChangerTablePoint_angle(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const PhaseTapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->angle; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char PhaseTapChangerTablePoint::debugName[] = "PhaseTapChangerTablePoint"; const char* PhaseTapChangerTablePoint::debugString() const @@ -111,17 +109,17 @@ const char* PhaseTapChangerTablePoint::debugString() const void PhaseTapChangerTablePoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTablePoint"), &PhaseTapChangerTablePoint_factory)); + factory_map.emplace("cim:PhaseTapChangerTablePoint", &PhaseTapChangerTablePoint_factory); } void PhaseTapChangerTablePoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTablePoint.angle"), &assign_PhaseTapChangerTablePoint_angle)); + assign_map.emplace("cim:PhaseTapChangerTablePoint.angle", &assign_PhaseTapChangerTablePoint_angle); } void PhaseTapChangerTablePoint::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTablePoint.PhaseTapChangerTable"), &assign_PhaseTapChangerTablePoint_PhaseTapChangerTable)); + assign_map.emplace("cim:PhaseTapChangerTablePoint.PhaseTapChangerTable", &assign_PhaseTapChangerTablePoint_PhaseTapChangerTable); } void PhaseTapChangerTablePoint::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/PhaseTapChangerTablePoint.hpp b/CGMES_2.4.13_18DEC2013/PhaseTapChangerTablePoint.hpp index 333ffbc2e..451bb17ad 100644 --- a/CGMES_2.4.13_18DEC2013/PhaseTapChangerTablePoint.hpp +++ b/CGMES_2.4.13_18DEC2013/PhaseTapChangerTablePoint.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class PhaseTapChangerTable; - /* - Describes each tap step in the phase tap changer tabular curve. - */ + /** \brief Describes each tap step in the phase tap changer tabular curve. */ class PhaseTapChangerTablePoint : public TapChangerTablePoint { public: @@ -28,8 +26,11 @@ namespace CIMPP PhaseTapChangerTablePoint(); ~PhaseTapChangerTablePoint() override; - CIMPP::PhaseTapChangerTable* PhaseTapChangerTable; /* The table of this point. Default: 0 */ - CIMPP::AngleDegrees angle; /* The angle difference in degrees. Default: nullptr */ + /** \brief The table of this point. Default: 0 */ + CIMPP::PhaseTapChangerTable* PhaseTapChangerTable; + + /** \brief The angle difference in degrees. Default: nullptr */ + CIMPP::AngleDegrees angle; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/PhaseTapChangerTabular.cpp b/CGMES_2.4.13_18DEC2013/PhaseTapChangerTabular.cpp index e08d2dc31..4d55ad1ae 100644 --- a/CGMES_2.4.13_18DEC2013/PhaseTapChangerTabular.cpp +++ b/CGMES_2.4.13_18DEC2013/PhaseTapChangerTabular.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -PhaseTapChangerTabular::PhaseTapChangerTabular() : PhaseTapChangerTable(nullptr) {}; -PhaseTapChangerTabular::~PhaseTapChangerTabular() {}; +PhaseTapChangerTabular::PhaseTapChangerTabular() : PhaseTapChangerTable(nullptr) {} +PhaseTapChangerTabular::~PhaseTapChangerTabular() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ PhaseTapChangerTabular::getPossibleProfilesForAttributes() const return map; } - - bool assign_PhaseTapChangerTable_PhaseTapChangerTabular(BaseClass*, BaseClass*); bool assign_PhaseTapChangerTabular_PhaseTapChangerTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_PhaseTapChangerTabular_PhaseTapChangerTable(BaseClass* BaseClass_ptr return false; } - bool get_PhaseTapChangerTabular_PhaseTapChangerTable(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const PhaseTapChangerTabular* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChangerTabular* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PhaseTapChangerTable != 0) { @@ -73,7 +71,6 @@ bool get_PhaseTapChangerTabular_PhaseTapChangerTable(const BaseClass* BaseClass_ return false; } - const char PhaseTapChangerTabular::debugName[] = "PhaseTapChangerTabular"; const char* PhaseTapChangerTabular::debugString() const { @@ -82,7 +79,7 @@ const char* PhaseTapChangerTabular::debugString() const void PhaseTapChangerTabular::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTabular"), &PhaseTapChangerTabular_factory)); + factory_map.emplace("cim:PhaseTapChangerTabular", &PhaseTapChangerTabular_factory); } void PhaseTapChangerTabular::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void PhaseTapChangerTabular::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTabular.PhaseTapChangerTable"), &assign_PhaseTapChangerTabular_PhaseTapChangerTable)); + assign_map.emplace("cim:PhaseTapChangerTabular.PhaseTapChangerTable", &assign_PhaseTapChangerTabular_PhaseTapChangerTable); } void PhaseTapChangerTabular::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/PhaseTapChangerTabular.hpp b/CGMES_2.4.13_18DEC2013/PhaseTapChangerTabular.hpp index 9d5d9053e..85b69cbec 100644 --- a/CGMES_2.4.13_18DEC2013/PhaseTapChangerTabular.hpp +++ b/CGMES_2.4.13_18DEC2013/PhaseTapChangerTabular.hpp @@ -24,7 +24,8 @@ namespace CIMPP PhaseTapChangerTabular(); ~PhaseTapChangerTabular() override; - CIMPP::PhaseTapChangerTable* PhaseTapChangerTable; /* The phase tap changer table for this phase tap changer. Default: 0 */ + /** \brief The phase tap changer table for this phase tap changer. Default: 0 */ + CIMPP::PhaseTapChangerTable* PhaseTapChangerTable; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/PositionPoint.cpp b/CGMES_2.4.13_18DEC2013/PositionPoint.cpp index 2944edacc..9fbc902cc 100644 --- a/CGMES_2.4.13_18DEC2013/PositionPoint.cpp +++ b/CGMES_2.4.13_18DEC2013/PositionPoint.cpp @@ -9,15 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "Location.hpp" -#include "Integer.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -PositionPoint::PositionPoint() : Location(nullptr) {}; -PositionPoint::~PositionPoint() {}; +PositionPoint::PositionPoint() : Location(nullptr) {} +PositionPoint::~PositionPoint() {} static const std::list PossibleProfilesForClass = { @@ -48,80 +44,97 @@ PositionPoint::getPossibleProfilesForAttributes() const return map; } +bool assign_Location_PositionPoints(BaseClass*, BaseClass*); +bool assign_PositionPoint_Location(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PositionPoint* element = dynamic_cast(BaseClass_ptr1); + Location* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Location != element2) + { + element->Location = element2; + return assign_Location_PositionPoints(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_PositionPoint_sequenceNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PositionPoint_sequenceNumber(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + PositionPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->sequenceNumber; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PositionPoint_xPosition(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PositionPoint_xPosition(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + PositionPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->xPosition = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PositionPoint_yPosition(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PositionPoint_yPosition(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + PositionPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->yPosition = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PositionPoint_zPosition(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PositionPoint_zPosition(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + PositionPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->zPosition = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_Location_PositionPoints(BaseClass*, BaseClass*); -bool assign_PositionPoint_Location(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_PositionPoint_Location(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - PositionPoint* element = dynamic_cast(BaseClass_ptr1); - Location* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const PositionPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->Location != element2) + if (element->Location != 0) { - element->Location = element2; - return assign_Location_PositionPoints(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->Location); + return true; } - return true; } return false; } bool get_PositionPoint_sequenceNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + const PositionPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->sequenceNumber; if (!buffer.str().empty()) @@ -135,7 +148,8 @@ bool get_PositionPoint_sequenceNumber(const BaseClass* BaseClass_ptr1, std::stri bool get_PositionPoint_xPosition(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + const PositionPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xPosition; if (!buffer.str().empty()) @@ -149,7 +163,8 @@ bool get_PositionPoint_xPosition(const BaseClass* BaseClass_ptr1, std::stringstr bool get_PositionPoint_yPosition(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + const PositionPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->yPosition; if (!buffer.str().empty()) @@ -163,7 +178,8 @@ bool get_PositionPoint_yPosition(const BaseClass* BaseClass_ptr1, std::stringstr bool get_PositionPoint_zPosition(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + const PositionPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->zPosition; if (!buffer.str().empty()) @@ -175,21 +191,6 @@ bool get_PositionPoint_zPosition(const BaseClass* BaseClass_ptr1, std::stringstr return false; } - -bool get_PositionPoint_Location(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const PositionPoint* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->Location != 0) - { - BaseClass_list.push_back(element->Location); - return true; - } - } - return false; -} - - const char PositionPoint::debugName[] = "PositionPoint"; const char* PositionPoint::debugString() const { @@ -198,20 +199,20 @@ const char* PositionPoint::debugString() const void PositionPoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PositionPoint"), &PositionPoint_factory)); + factory_map.emplace("cim:PositionPoint", &PositionPoint_factory); } void PositionPoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PositionPoint.sequenceNumber"), &assign_PositionPoint_sequenceNumber)); - assign_map.insert(std::make_pair(std::string("cim:PositionPoint.xPosition"), &assign_PositionPoint_xPosition)); - assign_map.insert(std::make_pair(std::string("cim:PositionPoint.yPosition"), &assign_PositionPoint_yPosition)); - assign_map.insert(std::make_pair(std::string("cim:PositionPoint.zPosition"), &assign_PositionPoint_zPosition)); + assign_map.emplace("cim:PositionPoint.sequenceNumber", &assign_PositionPoint_sequenceNumber); + assign_map.emplace("cim:PositionPoint.xPosition", &assign_PositionPoint_xPosition); + assign_map.emplace("cim:PositionPoint.yPosition", &assign_PositionPoint_yPosition); + assign_map.emplace("cim:PositionPoint.zPosition", &assign_PositionPoint_zPosition); } void PositionPoint::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PositionPoint.Location"), &assign_PositionPoint_Location)); + assign_map.emplace("cim:PositionPoint.Location", &assign_PositionPoint_Location); } void PositionPoint::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/PositionPoint.hpp b/CGMES_2.4.13_18DEC2013/PositionPoint.hpp index b3b6be209..b7eead20b 100644 --- a/CGMES_2.4.13_18DEC2013/PositionPoint.hpp +++ b/CGMES_2.4.13_18DEC2013/PositionPoint.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class Location; - /* - Set of spatial coordinates that determine a point, defined in the coordinate system specified in 'Location.CoordinateSystem'. Use a single position point instance to desribe a point-oriented location. Use a sequence of position points to describe a line-oriented object (physical location of non-point oriented objects like cables or lines), or area of an object (like a substation or a geographical zone - in this case, have first and last position point with the same values). - */ + /** \brief Set of spatial coordinates that determine a point, defined in the coordinate system specified in 'Location.CoordinateSystem'. Use a single position point instance to desribe a point-oriented location. Use a sequence of position points to describe a line-oriented object (physical location of non-point oriented objects like cables or lines), or area of an object (like a substation or a geographical zone - in this case, have first and last position point with the same values). */ class PositionPoint : public BaseClass { public: @@ -29,11 +27,20 @@ namespace CIMPP PositionPoint(); ~PositionPoint() override; - CIMPP::Location* Location; /* Location described by this position point. Default: 0 */ - CIMPP::Integer sequenceNumber; /* Zero-relative sequence number of this point within a series of points. Default: 0 */ - CIMPP::String xPosition; /* X axis position. Default: '' */ - CIMPP::String yPosition; /* Y axis position. Default: '' */ - CIMPP::String zPosition; /* (if applicable) Z axis position. Default: '' */ + /** \brief Location described by this position point. Default: 0 */ + CIMPP::Location* Location; + + /** \brief Zero-relative sequence number of this point within a series of points. Default: 0 */ + CIMPP::Integer sequenceNumber; + + /** \brief X axis position. Default: '' */ + CIMPP::String xPosition; + + /** \brief Y axis position. Default: '' */ + CIMPP::String yPosition; + + /** \brief (if applicable) Z axis position. Default: '' */ + CIMPP::String zPosition; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/PowerSystemResource.cpp b/CGMES_2.4.13_18DEC2013/PowerSystemResource.cpp index 073756be0..dd4878f2c 100644 --- a/CGMES_2.4.13_18DEC2013/PowerSystemResource.cpp +++ b/CGMES_2.4.13_18DEC2013/PowerSystemResource.cpp @@ -14,8 +14,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -PowerSystemResource::PowerSystemResource() : Location(nullptr) {}; -PowerSystemResource::~PowerSystemResource() {}; +PowerSystemResource::PowerSystemResource() : Location(nullptr) {} +PowerSystemResource::~PowerSystemResource() {} static const std::list PossibleProfilesForClass = { @@ -48,8 +48,6 @@ PowerSystemResource::getPossibleProfilesForAttributes() const return map; } - - bool assign_Control_PowerSystemResource(BaseClass*, BaseClass*); bool assign_PowerSystemResource_Controls(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -66,6 +64,7 @@ bool assign_PowerSystemResource_Controls(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_Location_PowerSystemResources(BaseClass*, BaseClass*); bool assign_PowerSystemResource_Location(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -82,6 +81,7 @@ bool assign_PowerSystemResource_Location(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_Measurement_PowerSystemResource(BaseClass*, BaseClass*); bool assign_PowerSystemResource_Measurements(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -101,6 +101,7 @@ bool assign_PowerSystemResource_Measurements(BaseClass* BaseClass_ptr1, BaseClas + const char PowerSystemResource::debugName[] = "PowerSystemResource"; const char* PowerSystemResource::debugString() const { @@ -109,7 +110,7 @@ const char* PowerSystemResource::debugString() const void PowerSystemResource::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PowerSystemResource"), &PowerSystemResource_factory)); + factory_map.emplace("cim:PowerSystemResource", &PowerSystemResource_factory); } void PowerSystemResource::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -118,9 +119,9 @@ void PowerSystemResource::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PowerSystemResource.Controls"), &assign_PowerSystemResource_Controls)); - assign_map.insert(std::make_pair(std::string("cim:PowerSystemResource.Location"), &assign_PowerSystemResource_Location)); - assign_map.insert(std::make_pair(std::string("cim:PowerSystemResource.Measurements"), &assign_PowerSystemResource_Measurements)); + assign_map.emplace("cim:PowerSystemResource.Controls", &assign_PowerSystemResource_Controls); + assign_map.emplace("cim:PowerSystemResource.Location", &assign_PowerSystemResource_Location); + assign_map.emplace("cim:PowerSystemResource.Measurements", &assign_PowerSystemResource_Measurements); } void PowerSystemResource::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/PowerSystemResource.hpp b/CGMES_2.4.13_18DEC2013/PowerSystemResource.hpp index be028a916..ddf8d2070 100644 --- a/CGMES_2.4.13_18DEC2013/PowerSystemResource.hpp +++ b/CGMES_2.4.13_18DEC2013/PowerSystemResource.hpp @@ -19,9 +19,7 @@ namespace CIMPP class Location; class Measurement; - /* - A power system resource can be an item of equipment such as a switch, an equipment container containing many individual items of equipment such as a substation, or an organisational entity such as sub-control area. Power system resources can have measurements associated. - */ + /** \brief A power system resource can be an item of equipment such as a switch, an equipment container containing many individual items of equipment such as a substation, or an organisational entity such as sub-control area. Power system resources can have measurements associated. */ class PowerSystemResource : public IdentifiedObject { public: @@ -29,9 +27,14 @@ namespace CIMPP PowerSystemResource(); ~PowerSystemResource() override; - std::list Controls; /* Regulating device governed by this control output. Default: 0 */ - CIMPP::Location* Location; /* Location of this power system resource. Default: 0 */ - std::list Measurements; /* The power system resource that contains the measurement. Default: 0 */ + /** \brief Regulating device governed by this control output. Default: 0 */ + std::list Controls; + + /** \brief Location of this power system resource. Default: 0 */ + CIMPP::Location* Location; + + /** \brief The power system resource that contains the measurement. Default: 0 */ + std::list Measurements; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/PowerSystemStabilizerDynamics.cpp b/CGMES_2.4.13_18DEC2013/PowerSystemStabilizerDynamics.cpp index a961e08aa..fb50d8a2e 100644 --- a/CGMES_2.4.13_18DEC2013/PowerSystemStabilizerDynamics.cpp +++ b/CGMES_2.4.13_18DEC2013/PowerSystemStabilizerDynamics.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -PowerSystemStabilizerDynamics::PowerSystemStabilizerDynamics() : ExcitationSystemDynamics(nullptr) {}; -PowerSystemStabilizerDynamics::~PowerSystemStabilizerDynamics() {}; +PowerSystemStabilizerDynamics::PowerSystemStabilizerDynamics() : ExcitationSystemDynamics(nullptr) {} +PowerSystemStabilizerDynamics::~PowerSystemStabilizerDynamics() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ PowerSystemStabilizerDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_ExcitationSystemDynamics_PowerSystemStabilizerDynamics(BaseClass*, BaseClass*); bool assign_PowerSystemStabilizerDynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_PowerSystemStabilizerDynamics_ExcitationSystemDynamics(BaseClass* Ba } return false; } + bool assign_RemoteInputSignal_PowerSystemStabilizerDynamics(BaseClass*, BaseClass*); bool assign_PowerSystemStabilizerDynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_PowerSystemStabilizerDynamics_RemoteInputSignal(BaseClass* BaseClass return false; } - bool get_PowerSystemStabilizerDynamics_ExcitationSystemDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const PowerSystemStabilizerDynamics* element = dynamic_cast(BaseClass_ptr1)) + const PowerSystemStabilizerDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ExcitationSystemDynamics != 0) { @@ -100,7 +99,7 @@ const char* PowerSystemStabilizerDynamics::debugString() const void PowerSystemStabilizerDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PowerSystemStabilizerDynamics"), &PowerSystemStabilizerDynamics_factory)); + factory_map.emplace("cim:PowerSystemStabilizerDynamics", &PowerSystemStabilizerDynamics_factory); } void PowerSystemStabilizerDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -109,8 +108,8 @@ void PowerSystemStabilizerDynamics::addPrimitiveAssignFnsToMap(std::unordered_ma void PowerSystemStabilizerDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PowerSystemStabilizerDynamics.ExcitationSystemDynamics"), &assign_PowerSystemStabilizerDynamics_ExcitationSystemDynamics)); - assign_map.insert(std::make_pair(std::string("cim:PowerSystemStabilizerDynamics.RemoteInputSignal"), &assign_PowerSystemStabilizerDynamics_RemoteInputSignal)); + assign_map.emplace("cim:PowerSystemStabilizerDynamics.ExcitationSystemDynamics", &assign_PowerSystemStabilizerDynamics_ExcitationSystemDynamics); + assign_map.emplace("cim:PowerSystemStabilizerDynamics.RemoteInputSignal", &assign_PowerSystemStabilizerDynamics_RemoteInputSignal); } void PowerSystemStabilizerDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/PowerSystemStabilizerDynamics.hpp b/CGMES_2.4.13_18DEC2013/PowerSystemStabilizerDynamics.hpp index 6dec17c33..949c55171 100644 --- a/CGMES_2.4.13_18DEC2013/PowerSystemStabilizerDynamics.hpp +++ b/CGMES_2.4.13_18DEC2013/PowerSystemStabilizerDynamics.hpp @@ -18,9 +18,7 @@ namespace CIMPP class ExcitationSystemDynamics; class RemoteInputSignal; - /* - Power system stabilizer function block whose behaviour is described by reference to a standard model - */ + /** \brief Power system stabilizer function block whose behaviour is described by reference to a standard model */ class PowerSystemStabilizerDynamics : public DynamicsFunctionBlock { public: @@ -28,8 +26,11 @@ namespace CIMPP PowerSystemStabilizerDynamics(); ~PowerSystemStabilizerDynamics() override; - CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; /* Excitation system model with which this power system stabilizer model is associated. Default: 0 */ - std::list RemoteInputSignal; /* Remote input signal used by this power system stabilizer model. Default: 0 */ + /** \brief Excitation system model with which this power system stabilizer model is associated. Default: 0 */ + CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; + + /** \brief Remote input signal used by this power system stabilizer model. Default: 0 */ + std::list RemoteInputSignal; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/PowerSystemStabilizerUserDefined.cpp b/CGMES_2.4.13_18DEC2013/PowerSystemStabilizerUserDefined.cpp index 03243c2a0..a444c0d8b 100644 --- a/CGMES_2.4.13_18DEC2013/PowerSystemStabilizerUserDefined.cpp +++ b/CGMES_2.4.13_18DEC2013/PowerSystemStabilizerUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -PowerSystemStabilizerUserDefined::PowerSystemStabilizerUserDefined() {}; -PowerSystemStabilizerUserDefined::~PowerSystemStabilizerUserDefined() {}; +PowerSystemStabilizerUserDefined::PowerSystemStabilizerUserDefined() {} +PowerSystemStabilizerUserDefined::~PowerSystemStabilizerUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ PowerSystemStabilizerUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_PowerSystemStabilizerUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (PowerSystemStabilizerUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_PowerSystemStabilizerUserDefined(BaseClass*, BaseClass*); bool assign_PowerSystemStabilizerUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_PowerSystemStabilizerUserDefined_ProprietaryParameterDynamics(BaseCl return false; } +bool assign_PowerSystemStabilizerUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + PowerSystemStabilizerUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_PowerSystemStabilizerUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerSystemStabilizerUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const PowerSystemStabilizerUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_PowerSystemStabilizerUserDefined_proprietary(const BaseClass* BaseClass return false; } - - const char PowerSystemStabilizerUserDefined::debugName[] = "PowerSystemStabilizerUserDefined"; const char* PowerSystemStabilizerUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* PowerSystemStabilizerUserDefined::debugString() const void PowerSystemStabilizerUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PowerSystemStabilizerUserDefined"), &PowerSystemStabilizerUserDefined_factory)); + factory_map.emplace("cim:PowerSystemStabilizerUserDefined", &PowerSystemStabilizerUserDefined_factory); } void PowerSystemStabilizerUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PowerSystemStabilizerUserDefined.proprietary"), &assign_PowerSystemStabilizerUserDefined_proprietary)); + assign_map.emplace("cim:PowerSystemStabilizerUserDefined.proprietary", &assign_PowerSystemStabilizerUserDefined_proprietary); } void PowerSystemStabilizerUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PowerSystemStabilizerUserDefined.ProprietaryParameterDynamics"), &assign_PowerSystemStabilizerUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:PowerSystemStabilizerUserDefined.ProprietaryParameterDynamics", &assign_PowerSystemStabilizerUserDefined_ProprietaryParameterDynamics); } void PowerSystemStabilizerUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/PowerSystemStabilizerUserDefined.hpp b/CGMES_2.4.13_18DEC2013/PowerSystemStabilizerUserDefined.hpp index 3622772dc..db8af6276 100644 --- a/CGMES_2.4.13_18DEC2013/PowerSystemStabilizerUserDefined.hpp +++ b/CGMES_2.4.13_18DEC2013/PowerSystemStabilizerUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - function block whose dynamic behaviour is described by - */ + /** \brief function block whose dynamic behaviour is described by */ class PowerSystemStabilizerUserDefined : public PowerSystemStabilizerDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP PowerSystemStabilizerUserDefined(); ~PowerSystemStabilizerUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/PowerTransformer.cpp b/CGMES_2.4.13_18DEC2013/PowerTransformer.cpp index 43ba53d05..80ac17033 100644 --- a/CGMES_2.4.13_18DEC2013/PowerTransformer.cpp +++ b/CGMES_2.4.13_18DEC2013/PowerTransformer.cpp @@ -9,17 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "PowerTransformerEnd.hpp" -#include "CurrentFlow.hpp" -#include "Voltage.hpp" -#include "AngleDegrees.hpp" -#include "Voltage.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" using namespace CIMPP; -PowerTransformer::PowerTransformer() {}; -PowerTransformer::~PowerTransformer() {}; +PowerTransformer::PowerTransformer() {} +PowerTransformer::~PowerTransformer() {} static const std::list PossibleProfilesForClass = { @@ -52,106 +46,112 @@ PowerTransformer::getPossibleProfilesForAttributes() const return map; } - -bool assign_PowerTransformer_beforeShCircuitHighestOperatingCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_PowerTransformer(BaseClass*, BaseClass*); +bool assign_PowerTransformer_PowerTransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + PowerTransformerEnd* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->beforeShCircuitHighestOperatingCurrent; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->PowerTransformerEnd.begin(), element->PowerTransformerEnd.end(), element2) == element->PowerTransformerEnd.end()) + { + element->PowerTransformerEnd.push_back(element2); + return assign_PowerTransformerEnd_PowerTransformer(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_PowerTransformer_beforeShCircuitHighestOperatingVoltage(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformer_beforeShCircuitHighestOperatingCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->beforeShCircuitHighestOperatingVoltage; - if (buffer.fail()) - return false; - else + buffer >> element->beforeShCircuitHighestOperatingCurrent; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformer_beforeShortCircuitAnglePf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformer_beforeShCircuitHighestOperatingVoltage(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->beforeShortCircuitAnglePf; - if (buffer.fail()) - return false; - else + buffer >> element->beforeShCircuitHighestOperatingVoltage; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformer_highSideMinOperatingU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformer_beforeShortCircuitAnglePf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->highSideMinOperatingU; - if (buffer.fail()) - return false; - else + buffer >> element->beforeShortCircuitAnglePf; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformer_isPartOfGeneratorUnit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformer_highSideMinOperatingU(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->isPartOfGeneratorUnit; - if (buffer.fail()) - return false; - else + buffer >> element->highSideMinOperatingU; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformer_operationalValuesConsidered(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformer_isPartOfGeneratorUnit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->operationalValuesConsidered; - if (buffer.fail()) - return false; - else + buffer >> element->isPartOfGeneratorUnit; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_PowerTransformerEnd_PowerTransformer(BaseClass*, BaseClass*); -bool assign_PowerTransformer_PowerTransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_PowerTransformer_operationalValuesConsidered(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { PowerTransformer* element = dynamic_cast(BaseClass_ptr1); - PowerTransformerEnd* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->PowerTransformerEnd.begin(), element->PowerTransformerEnd.end(), element2) == element->PowerTransformerEnd.end()) + buffer >> element->operationalValuesConsidered; + if (!buffer.fail()) { - element->PowerTransformerEnd.push_back(element2); - return assign_PowerTransformerEnd_PowerTransformer(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_PowerTransformer_beforeShCircuitHighestOperatingCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->beforeShCircuitHighestOperatingCurrent; if (!buffer.str().empty()) @@ -165,7 +165,8 @@ bool get_PowerTransformer_beforeShCircuitHighestOperatingCurrent(const BaseClass bool get_PowerTransformer_beforeShCircuitHighestOperatingVoltage(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->beforeShCircuitHighestOperatingVoltage; if (!buffer.str().empty()) @@ -179,7 +180,8 @@ bool get_PowerTransformer_beforeShCircuitHighestOperatingVoltage(const BaseClass bool get_PowerTransformer_beforeShortCircuitAnglePf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->beforeShortCircuitAnglePf; if (!buffer.str().empty()) @@ -193,7 +195,8 @@ bool get_PowerTransformer_beforeShortCircuitAnglePf(const BaseClass* BaseClass_p bool get_PowerTransformer_highSideMinOperatingU(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->highSideMinOperatingU; if (!buffer.str().empty()) @@ -207,7 +210,8 @@ bool get_PowerTransformer_highSideMinOperatingU(const BaseClass* BaseClass_ptr1, bool get_PowerTransformer_isPartOfGeneratorUnit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->isPartOfGeneratorUnit; if (!buffer.str().empty()) @@ -221,7 +225,8 @@ bool get_PowerTransformer_isPartOfGeneratorUnit(const BaseClass* BaseClass_ptr1, bool get_PowerTransformer_operationalValuesConsidered(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->operationalValuesConsidered; if (!buffer.str().empty()) @@ -233,8 +238,6 @@ bool get_PowerTransformer_operationalValuesConsidered(const BaseClass* BaseClass return false; } - - const char PowerTransformer::debugName[] = "PowerTransformer"; const char* PowerTransformer::debugString() const { @@ -243,22 +246,22 @@ const char* PowerTransformer::debugString() const void PowerTransformer::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PowerTransformer"), &PowerTransformer_factory)); + factory_map.emplace("cim:PowerTransformer", &PowerTransformer_factory); } void PowerTransformer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PowerTransformer.beforeShCircuitHighestOperatingCurrent"), &assign_PowerTransformer_beforeShCircuitHighestOperatingCurrent)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformer.beforeShCircuitHighestOperatingVoltage"), &assign_PowerTransformer_beforeShCircuitHighestOperatingVoltage)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformer.beforeShortCircuitAnglePf"), &assign_PowerTransformer_beforeShortCircuitAnglePf)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformer.highSideMinOperatingU"), &assign_PowerTransformer_highSideMinOperatingU)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformer.isPartOfGeneratorUnit"), &assign_PowerTransformer_isPartOfGeneratorUnit)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformer.operationalValuesConsidered"), &assign_PowerTransformer_operationalValuesConsidered)); + assign_map.emplace("cim:PowerTransformer.beforeShCircuitHighestOperatingCurrent", &assign_PowerTransformer_beforeShCircuitHighestOperatingCurrent); + assign_map.emplace("cim:PowerTransformer.beforeShCircuitHighestOperatingVoltage", &assign_PowerTransformer_beforeShCircuitHighestOperatingVoltage); + assign_map.emplace("cim:PowerTransformer.beforeShortCircuitAnglePf", &assign_PowerTransformer_beforeShortCircuitAnglePf); + assign_map.emplace("cim:PowerTransformer.highSideMinOperatingU", &assign_PowerTransformer_highSideMinOperatingU); + assign_map.emplace("cim:PowerTransformer.isPartOfGeneratorUnit", &assign_PowerTransformer_isPartOfGeneratorUnit); + assign_map.emplace("cim:PowerTransformer.operationalValuesConsidered", &assign_PowerTransformer_operationalValuesConsidered); } void PowerTransformer::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PowerTransformer.PowerTransformerEnd"), &assign_PowerTransformer_PowerTransformerEnd)); + assign_map.emplace("cim:PowerTransformer.PowerTransformerEnd", &assign_PowerTransformer_PowerTransformerEnd); } void PowerTransformer::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/PowerTransformer.hpp b/CGMES_2.4.13_18DEC2013/PowerTransformer.hpp index 277963531..0970df0d5 100644 --- a/CGMES_2.4.13_18DEC2013/PowerTransformer.hpp +++ b/CGMES_2.4.13_18DEC2013/PowerTransformer.hpp @@ -21,9 +21,7 @@ namespace CIMPP { class PowerTransformerEnd; - /* - An electrical device consisting of two or more coupled windings, with or without a magnetic core, for introducing mutual coupling between electric circuits. Transformers can be used to control voltage and phase shift (active power flow). A power transformer may be composed of separate transformer tanks that need not be identical. A power transformer can be modeled with or without tanks and is intended for use in both balanced and unbalanced representations. A power transformer typically has two terminals, but may have one (grounding), three or more terminals. The inherited association ConductingEquipment.BaseVoltage should not be used. The association from TransformerEnd to BaseVoltage should be used instead. - */ + /** \brief An electrical device consisting of two or more coupled windings, with or without a magnetic core, for introducing mutual coupling between electric circuits. Transformers can be used to control voltage and phase shift (active power flow). A power transformer may be composed of separate transformer tanks that need not be identical. A power transformer can be modeled with or without tanks and is intended for use in both balanced and unbalanced representations. A power transformer typically has two terminals, but may have one (grounding), three or more terminals. The inherited association ConductingEquipment.BaseVoltage should not be used. The association from TransformerEnd to BaseVoltage should be used instead. */ class PowerTransformer : public ConductingEquipment { public: @@ -31,13 +29,26 @@ namespace CIMPP PowerTransformer(); ~PowerTransformer() override; - std::list PowerTransformerEnd; /* The power transformer of this power transformer end. Default: 0 */ - CIMPP::CurrentFlow beforeShCircuitHighestOperatingCurrent; /* The highest operating current (Ib in the IEC 60909-0) before short circuit (depends on network configuration and relevant reliability philosophy). It is used for calculation of the impedance correction factor KT defined in IEC 60909-0. Default: nullptr */ - CIMPP::Voltage beforeShCircuitHighestOperatingVoltage; /* The highest operating voltage (Ub in the IEC 60909-0) before short circuit. It is used for calculation of the impedance correction factor KT defined in IEC 60909-0. This is worst case voltage on the low side winding (Section 3.7.1 in the standard). Used to define operating conditions. Default: nullptr */ - CIMPP::AngleDegrees beforeShortCircuitAnglePf; /* The angle of power factor before short circuit (phib in the IEC 60909-0). It is used for calculation of the impedance correction factor KT defined in IEC 60909-0. This is the worst case power factor. Used to define operating conditions. Default: nullptr */ - CIMPP::Voltage highSideMinOperatingU; /* The minimum operating voltage (uQmin in the IEC 60909-0) at the high voltage side (Q side) of the unit transformer of the power station unit. A value well established from long-term operating experience of the system. It is used for calculation of the impedance correction factor KG defined in IEC 60909-0 Default: nullptr */ - CIMPP::Boolean isPartOfGeneratorUnit; /* Indicates whether the machine is part of a power station unit. Used for short circuit data exchange according to IEC 60909 Default: false */ - CIMPP::Boolean operationalValuesConsidered; /* It is used to define if the data (other attributes related to short circuit data exchange) defines long term operational conditions or not. Used for short circuit data exchange according to IEC 60909. Default: false */ + /** \brief The power transformer of this power transformer end. Default: 0 */ + std::list PowerTransformerEnd; + + /** \brief The highest operating current (Ib in the IEC 60909-0) before short circuit (depends on network configuration and relevant reliability philosophy). It is used for calculation of the impedance correction factor KT defined in IEC 60909-0. Default: nullptr */ + CIMPP::CurrentFlow beforeShCircuitHighestOperatingCurrent; + + /** \brief The highest operating voltage (Ub in the IEC 60909-0) before short circuit. It is used for calculation of the impedance correction factor KT defined in IEC 60909-0. This is worst case voltage on the low side winding (Section 3.7.1 in the standard). Used to define operating conditions. Default: nullptr */ + CIMPP::Voltage beforeShCircuitHighestOperatingVoltage; + + /** \brief The angle of power factor before short circuit (phib in the IEC 60909-0). It is used for calculation of the impedance correction factor KT defined in IEC 60909-0. This is the worst case power factor. Used to define operating conditions. Default: nullptr */ + CIMPP::AngleDegrees beforeShortCircuitAnglePf; + + /** \brief The minimum operating voltage (uQmin in the IEC 60909-0) at the high voltage side (Q side) of the unit transformer of the power station unit. A value well established from long-term operating experience of the system. It is used for calculation of the impedance correction factor KG defined in IEC 60909-0 Default: nullptr */ + CIMPP::Voltage highSideMinOperatingU; + + /** \brief Indicates whether the machine is part of a power station unit. Used for short circuit data exchange according to IEC 60909 Default: false */ + CIMPP::Boolean isPartOfGeneratorUnit; + + /** \brief It is used to define if the data (other attributes related to short circuit data exchange) defines long term operational conditions or not. Used for short circuit data exchange according to IEC 60909. Default: false */ + CIMPP::Boolean operationalValuesConsidered; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/PowerTransformerEnd.cpp b/CGMES_2.4.13_18DEC2013/PowerTransformerEnd.cpp index beb25fa82..cb0bb8628 100644 --- a/CGMES_2.4.13_18DEC2013/PowerTransformerEnd.cpp +++ b/CGMES_2.4.13_18DEC2013/PowerTransformerEnd.cpp @@ -9,23 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "PowerTransformer.hpp" -#include "Susceptance.hpp" -#include "Susceptance.hpp" -#include "WindingConnection.hpp" -#include "Conductance.hpp" -#include "Conductance.hpp" -#include "Integer.hpp" -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "ApparentPower.hpp" -#include "Voltage.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -PowerTransformerEnd::PowerTransformerEnd() : PowerTransformer(nullptr) {}; -PowerTransformerEnd::~PowerTransformerEnd() {}; +PowerTransformerEnd::PowerTransformerEnd() : PowerTransformer(nullptr) {} +PowerTransformerEnd::~PowerTransformerEnd() {} static const std::list PossibleProfilesForClass = { @@ -64,184 +52,209 @@ PowerTransformerEnd::getPossibleProfilesForAttributes() const return map; } +bool assign_PowerTransformer_PowerTransformerEnd(BaseClass*, BaseClass*); +bool assign_PowerTransformerEnd_PowerTransformer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + PowerTransformer* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PowerTransformer != element2) + { + element->PowerTransformer = element2; + return assign_PowerTransformer_PowerTransformerEnd(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_PowerTransformerEnd_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_b(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_b0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_b0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_connectionKind(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_connectionKind(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->connectionKind; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_g(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_g(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_g0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_g0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_phaseAngleClock(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_phaseAngleClock(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->phaseAngleClock; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_r0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_ratedS(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_ratedS(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedS; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_ratedU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_ratedU(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedU; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_x(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_x0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_PowerTransformer_PowerTransformerEnd(BaseClass*, BaseClass*); -bool assign_PowerTransformerEnd_PowerTransformer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_PowerTransformerEnd_PowerTransformer(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); - PowerTransformer* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->PowerTransformer != element2) + if (element->PowerTransformer != 0) { - element->PowerTransformer = element2; - return assign_PowerTransformer_PowerTransformerEnd(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->PowerTransformer); + return true; } - return true; } return false; } bool get_PowerTransformerEnd_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b; if (!buffer.str().empty()) @@ -255,7 +268,8 @@ bool get_PowerTransformerEnd_b(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_PowerTransformerEnd_b0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b0; if (!buffer.str().empty()) @@ -267,9 +281,25 @@ bool get_PowerTransformerEnd_b0(const BaseClass* BaseClass_ptr1, std::stringstre return false; } +bool get_PowerTransformerEnd_connectionKind(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->connectionKind; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_PowerTransformerEnd_g(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g; if (!buffer.str().empty()) @@ -283,7 +313,8 @@ bool get_PowerTransformerEnd_g(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_PowerTransformerEnd_g0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g0; if (!buffer.str().empty()) @@ -297,7 +328,8 @@ bool get_PowerTransformerEnd_g0(const BaseClass* BaseClass_ptr1, std::stringstre bool get_PowerTransformerEnd_phaseAngleClock(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->phaseAngleClock; if (!buffer.str().empty()) @@ -311,7 +343,8 @@ bool get_PowerTransformerEnd_phaseAngleClock(const BaseClass* BaseClass_ptr1, st bool get_PowerTransformerEnd_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -325,7 +358,8 @@ bool get_PowerTransformerEnd_r(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_PowerTransformerEnd_r0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r0; if (!buffer.str().empty()) @@ -339,7 +373,8 @@ bool get_PowerTransformerEnd_r0(const BaseClass* BaseClass_ptr1, std::stringstre bool get_PowerTransformerEnd_ratedS(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedS; if (!buffer.str().empty()) @@ -353,7 +388,8 @@ bool get_PowerTransformerEnd_ratedS(const BaseClass* BaseClass_ptr1, std::string bool get_PowerTransformerEnd_ratedU(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedU; if (!buffer.str().empty()) @@ -367,7 +403,8 @@ bool get_PowerTransformerEnd_ratedU(const BaseClass* BaseClass_ptr1, std::string bool get_PowerTransformerEnd_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x; if (!buffer.str().empty()) @@ -381,7 +418,8 @@ bool get_PowerTransformerEnd_x(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_PowerTransformerEnd_x0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x0; if (!buffer.str().empty()) @@ -393,35 +431,6 @@ bool get_PowerTransformerEnd_x0(const BaseClass* BaseClass_ptr1, std::stringstre return false; } - -bool get_PowerTransformerEnd_PowerTransformer(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->PowerTransformer != 0) - { - BaseClass_list.push_back(element->PowerTransformer); - return true; - } - } - return false; -} - - -bool get_PowerTransformerEnd_connectionKind(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->connectionKind; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char PowerTransformerEnd::debugName[] = "PowerTransformerEnd"; const char* PowerTransformerEnd::debugString() const { @@ -430,28 +439,28 @@ const char* PowerTransformerEnd::debugString() const void PowerTransformerEnd::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd"), &PowerTransformerEnd_factory)); + factory_map.emplace("cim:PowerTransformerEnd", &PowerTransformerEnd_factory); } void PowerTransformerEnd::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.b"), &assign_PowerTransformerEnd_b)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.b0"), &assign_PowerTransformerEnd_b0)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.connectionKind"), &assign_PowerTransformerEnd_connectionKind)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.g"), &assign_PowerTransformerEnd_g)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.g0"), &assign_PowerTransformerEnd_g0)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.phaseAngleClock"), &assign_PowerTransformerEnd_phaseAngleClock)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.r"), &assign_PowerTransformerEnd_r)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.r0"), &assign_PowerTransformerEnd_r0)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.ratedS"), &assign_PowerTransformerEnd_ratedS)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.ratedU"), &assign_PowerTransformerEnd_ratedU)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.x"), &assign_PowerTransformerEnd_x)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.x0"), &assign_PowerTransformerEnd_x0)); + assign_map.emplace("cim:PowerTransformerEnd.b", &assign_PowerTransformerEnd_b); + assign_map.emplace("cim:PowerTransformerEnd.b0", &assign_PowerTransformerEnd_b0); + assign_map.emplace("cim:PowerTransformerEnd.connectionKind", &assign_PowerTransformerEnd_connectionKind); + assign_map.emplace("cim:PowerTransformerEnd.g", &assign_PowerTransformerEnd_g); + assign_map.emplace("cim:PowerTransformerEnd.g0", &assign_PowerTransformerEnd_g0); + assign_map.emplace("cim:PowerTransformerEnd.phaseAngleClock", &assign_PowerTransformerEnd_phaseAngleClock); + assign_map.emplace("cim:PowerTransformerEnd.r", &assign_PowerTransformerEnd_r); + assign_map.emplace("cim:PowerTransformerEnd.r0", &assign_PowerTransformerEnd_r0); + assign_map.emplace("cim:PowerTransformerEnd.ratedS", &assign_PowerTransformerEnd_ratedS); + assign_map.emplace("cim:PowerTransformerEnd.ratedU", &assign_PowerTransformerEnd_ratedU); + assign_map.emplace("cim:PowerTransformerEnd.x", &assign_PowerTransformerEnd_x); + assign_map.emplace("cim:PowerTransformerEnd.x0", &assign_PowerTransformerEnd_x0); } void PowerTransformerEnd::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.PowerTransformer"), &assign_PowerTransformerEnd_PowerTransformer)); + assign_map.emplace("cim:PowerTransformerEnd.PowerTransformer", &assign_PowerTransformerEnd_PowerTransformer); } void PowerTransformerEnd::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/PowerTransformerEnd.hpp b/CGMES_2.4.13_18DEC2013/PowerTransformerEnd.hpp index bb20e0c1f..b4f4de48e 100644 --- a/CGMES_2.4.13_18DEC2013/PowerTransformerEnd.hpp +++ b/CGMES_2.4.13_18DEC2013/PowerTransformerEnd.hpp @@ -25,9 +25,7 @@ namespace CIMPP { class PowerTransformer; - /* - A PowerTransformerEnd is associated with each Terminal of a PowerTransformer. The impedance values r, r0, x, and x0 of a PowerTransformerEnd represents a star equivalent as follows 1) for a two Terminal PowerTransformer the high voltage PowerTransformerEnd has non zero values on r, r0, x, and x0 while the low voltage PowerTransformerEnd has zero values for r, r0, x, and x0. 2) for a three Terminal PowerTransformer the three PowerTransformerEnds represents a star equivalent with each leg in the star represented by r, r0, x, and x0 values. 3) for a PowerTransformer with more than three Terminals the PowerTransformerEnd impedance values cannot be used. Instead use the TransformerMeshImpedance or split the transformer into multiple PowerTransformers. - */ + /** \brief A PowerTransformerEnd is associated with each Terminal of a PowerTransformer. The impedance values r, r0, x, and x0 of a PowerTransformerEnd represents a star equivalent as follows 1) for a two Terminal PowerTransformer the high voltage PowerTransformerEnd has non zero values on r, r0, x, and x0 while the low voltage PowerTransformerEnd has zero values for r, r0, x, and x0. 2) for a three Terminal PowerTransformer the three PowerTransformerEnds represents a star equivalent with each leg in the star represented by r, r0, x, and x0 values. 3) for a PowerTransformer with more than three Terminals the PowerTransformerEnd impedance values cannot be used. Instead use the TransformerMeshImpedance or split the transformer into multiple PowerTransformers. */ class PowerTransformerEnd : public TransformerEnd { public: @@ -35,19 +33,44 @@ namespace CIMPP PowerTransformerEnd(); ~PowerTransformerEnd() override; - CIMPP::PowerTransformer* PowerTransformer; /* The ends of this power transformer. Default: 0 */ - CIMPP::Susceptance b; /* Magnetizing branch susceptance (B mag). The value can be positive or negative. Default: nullptr */ - CIMPP::Susceptance b0; /* Zero sequence magnetizing branch susceptance. Default: nullptr */ - CIMPP::WindingConnection connectionKind; /* Kind of connection. Default: 0 */ - CIMPP::Conductance g; /* Magnetizing branch conductance. Default: nullptr */ - CIMPP::Conductance g0; /* Zero sequence magnetizing branch conductance (star-model). Default: nullptr */ - CIMPP::Integer phaseAngleClock; /* Terminal voltage phase angle displacement where 360 degrees are represented with clock hours. The valid values are 0 to 11. For example, for the secondary side end of a transformer with vector group code of `Dyn11`, specify the connection kind as wye with neutral and specify the phase angle of the clock as 11. The clock value of the transformer end number specified as 1, is assumed to be zero. Note the transformer end number is not assumed to be the same as the terminal sequence number. Default: 0 */ - CIMPP::Resistance r; /* Resistance (star-model) of the transformer end. The attribute shall be equal or greater than zero for non-equivalent transformers. Default: nullptr */ - CIMPP::Resistance r0; /* Zero sequence series resistance (star-model) of the transformer end. Default: nullptr */ - CIMPP::ApparentPower ratedS; /* Normal apparent power rating. The attribute shall be a positive value. For a two-winding transformer the values for the high and low voltage sides shall be identical. Default: nullptr */ - CIMPP::Voltage ratedU; /* Rated voltage: phase-phase for three-phase windings, and either phase-phase or phase-neutral for single-phase windings. A high voltage side, as given by TransformerEnd.endNumber, shall have a ratedU that is greater or equal than ratedU for the lower voltage sides. Default: nullptr */ - CIMPP::Reactance x; /* Positive sequence series reactance (star-model) of the transformer end. Default: nullptr */ - CIMPP::Reactance x0; /* Zero sequence series reactance of the transformer end. Default: nullptr */ + /** \brief The ends of this power transformer. Default: 0 */ + CIMPP::PowerTransformer* PowerTransformer; + + /** \brief Magnetizing branch susceptance (B mag). The value can be positive or negative. Default: nullptr */ + CIMPP::Susceptance b; + + /** \brief Zero sequence magnetizing branch susceptance. Default: nullptr */ + CIMPP::Susceptance b0; + + /** \brief Kind of connection. Default: 0 */ + CIMPP::WindingConnection connectionKind; + + /** \brief Magnetizing branch conductance. Default: nullptr */ + CIMPP::Conductance g; + + /** \brief Zero sequence magnetizing branch conductance (star-model). Default: nullptr */ + CIMPP::Conductance g0; + + /** \brief Terminal voltage phase angle displacement where 360 degrees are represented with clock hours. The valid values are 0 to 11. For example, for the secondary side end of a transformer with vector group code of `Dyn11`, specify the connection kind as wye with neutral and specify the phase angle of the clock as 11. The clock value of the transformer end number specified as 1, is assumed to be zero. Note the transformer end number is not assumed to be the same as the terminal sequence number. Default: 0 */ + CIMPP::Integer phaseAngleClock; + + /** \brief Resistance (star-model) of the transformer end. The attribute shall be equal or greater than zero for non-equivalent transformers. Default: nullptr */ + CIMPP::Resistance r; + + /** \brief Zero sequence series resistance (star-model) of the transformer end. Default: nullptr */ + CIMPP::Resistance r0; + + /** \brief Normal apparent power rating. The attribute shall be a positive value. For a two-winding transformer the values for the high and low voltage sides shall be identical. Default: nullptr */ + CIMPP::ApparentPower ratedS; + + /** \brief Rated voltage: phase-phase for three-phase windings, and either phase-phase or phase-neutral for single-phase windings. A high voltage side, as given by TransformerEnd.endNumber, shall have a ratedU that is greater or equal than ratedU for the lower voltage sides. Default: nullptr */ + CIMPP::Voltage ratedU; + + /** \brief Positive sequence series reactance (star-model) of the transformer end. Default: nullptr */ + CIMPP::Reactance x; + + /** \brief Zero sequence series reactance of the transformer end. Default: nullptr */ + CIMPP::Reactance x0; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ProprietaryParameterDynamics.cpp b/CGMES_2.4.13_18DEC2013/ProprietaryParameterDynamics.cpp index eeaf20aaf..cc1ac6f02 100644 --- a/CGMES_2.4.13_18DEC2013/ProprietaryParameterDynamics.cpp +++ b/CGMES_2.4.13_18DEC2013/ProprietaryParameterDynamics.cpp @@ -26,15 +26,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindPlantUserDefined.hpp" #include "WindType1or2UserDefined.hpp" #include "WindType3or4UserDefined.hpp" -#include "Boolean.hpp" -#include "Simple_Float.hpp" -#include "Integer.hpp" -#include "Integer.hpp" using namespace CIMPP; -ProprietaryParameterDynamics::ProprietaryParameterDynamics() : AsynchronousMachineUserDefined(nullptr), DiscontinuousExcitationControlUserDefined(nullptr), ExcitationSystemUserDefined(nullptr), LoadUserDefined(nullptr), MechanicalLoadUserDefined(nullptr), OverexcitationLimiterUserDefined(nullptr), PFVArControllerType1UserDefined(nullptr), PFVArControllerType2UserDefined(nullptr), PowerSystemStabilizerUserDefined(nullptr), SynchronousMachineUserDefined(nullptr), TurbineGovernorUserDefined(nullptr), TurbineLoadControllerUserDefined(nullptr), UnderexcitationLimiterUserDefined(nullptr), VoltageAdjusterUserDefined(nullptr), VoltageCompensatorUserDefined(nullptr), WindPlantUserDefined(nullptr), WindType1or2UserDefined(nullptr), WindType3or4UserDefined(nullptr) {}; -ProprietaryParameterDynamics::~ProprietaryParameterDynamics() {}; +ProprietaryParameterDynamics::ProprietaryParameterDynamics() : AsynchronousMachineUserDefined(nullptr), DiscontinuousExcitationControlUserDefined(nullptr), ExcitationSystemUserDefined(nullptr), LoadUserDefined(nullptr), MechanicalLoadUserDefined(nullptr), OverexcitationLimiterUserDefined(nullptr), PFVArControllerType1UserDefined(nullptr), PFVArControllerType2UserDefined(nullptr), PowerSystemStabilizerUserDefined(nullptr), SynchronousMachineUserDefined(nullptr), TurbineGovernorUserDefined(nullptr), TurbineLoadControllerUserDefined(nullptr), UnderexcitationLimiterUserDefined(nullptr), VoltageAdjusterUserDefined(nullptr), VoltageCompensatorUserDefined(nullptr), WindPlantUserDefined(nullptr), WindType1or2UserDefined(nullptr), WindType3or4UserDefined(nullptr) {} +ProprietaryParameterDynamics::~ProprietaryParameterDynamics() {} static const std::list PossibleProfilesForClass = { @@ -82,60 +78,6 @@ ProprietaryParameterDynamics::getPossibleProfilesForAttributes() const return map; } - -bool assign_ProprietaryParameterDynamics_booleanParameterValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->booleanParameterValue; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_ProprietaryParameterDynamics_floatParameterValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->floatParameterValue; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_ProprietaryParameterDynamics_integerParameterValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->integerParameterValue; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_ProprietaryParameterDynamics_parameterNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->parameterNumber; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_AsynchronousMachineUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_AsynchronousMachineUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -152,6 +94,7 @@ bool assign_ProprietaryParameterDynamics_AsynchronousMachineUserDefined(BaseClas } return false; } + bool assign_DiscontinuousExcitationControlUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_DiscontinuousExcitationControlUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -168,6 +111,7 @@ bool assign_ProprietaryParameterDynamics_DiscontinuousExcitationControlUserDefin } return false; } + bool assign_ExcitationSystemUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_ExcitationSystemUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -184,6 +128,7 @@ bool assign_ProprietaryParameterDynamics_ExcitationSystemUserDefined(BaseClass* } return false; } + bool assign_LoadUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_LoadUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -200,6 +145,7 @@ bool assign_ProprietaryParameterDynamics_LoadUserDefined(BaseClass* BaseClass_pt } return false; } + bool assign_MechanicalLoadUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_MechanicalLoadUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -216,6 +162,7 @@ bool assign_ProprietaryParameterDynamics_MechanicalLoadUserDefined(BaseClass* Ba } return false; } + bool assign_OverexcitationLimiterUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_OverexcitationLimiterUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -232,6 +179,7 @@ bool assign_ProprietaryParameterDynamics_OverexcitationLimiterUserDefined(BaseCl } return false; } + bool assign_PFVArControllerType1UserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_PFVArControllerType1UserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -248,6 +196,7 @@ bool assign_ProprietaryParameterDynamics_PFVArControllerType1UserDefined(BaseCla } return false; } + bool assign_PFVArControllerType2UserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_PFVArControllerType2UserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -264,6 +213,7 @@ bool assign_ProprietaryParameterDynamics_PFVArControllerType2UserDefined(BaseCla } return false; } + bool assign_PowerSystemStabilizerUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_PowerSystemStabilizerUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -280,6 +230,7 @@ bool assign_ProprietaryParameterDynamics_PowerSystemStabilizerUserDefined(BaseCl } return false; } + bool assign_SynchronousMachineUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_SynchronousMachineUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -296,6 +247,7 @@ bool assign_ProprietaryParameterDynamics_SynchronousMachineUserDefined(BaseClass } return false; } + bool assign_TurbineGovernorUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_TurbineGovernorUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -312,6 +264,7 @@ bool assign_ProprietaryParameterDynamics_TurbineGovernorUserDefined(BaseClass* B } return false; } + bool assign_TurbineLoadControllerUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_TurbineLoadControllerUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -328,6 +281,7 @@ bool assign_ProprietaryParameterDynamics_TurbineLoadControllerUserDefined(BaseCl } return false; } + bool assign_UnderexcitationLimiterUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_UnderexcitationLimiterUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -344,6 +298,7 @@ bool assign_ProprietaryParameterDynamics_UnderexcitationLimiterUserDefined(BaseC } return false; } + bool assign_VoltageAdjusterUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_VoltageAdjusterUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -360,6 +315,7 @@ bool assign_ProprietaryParameterDynamics_VoltageAdjusterUserDefined(BaseClass* B } return false; } + bool assign_VoltageCompensatorUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_VoltageCompensatorUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -376,6 +332,7 @@ bool assign_ProprietaryParameterDynamics_VoltageCompensatorUserDefined(BaseClass } return false; } + bool assign_WindPlantUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_WindPlantUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -392,6 +349,7 @@ bool assign_ProprietaryParameterDynamics_WindPlantUserDefined(BaseClass* BaseCla } return false; } + bool assign_WindType1or2UserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_WindType1or2UserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -408,6 +366,7 @@ bool assign_ProprietaryParameterDynamics_WindType1or2UserDefined(BaseClass* Base } return false; } + bool assign_WindType3or4UserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_WindType3or4UserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -425,66 +384,66 @@ bool assign_ProprietaryParameterDynamics_WindType3or4UserDefined(BaseClass* Base return false; } -bool get_ProprietaryParameterDynamics_booleanParameterValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_ProprietaryParameterDynamics_booleanParameterValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->booleanParameterValue; - if (!buffer.str().empty()) + buffer >> element->booleanParameterValue; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_ProprietaryParameterDynamics_floatParameterValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_ProprietaryParameterDynamics_floatParameterValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->floatParameterValue; - if (!buffer.str().empty()) + buffer >> element->floatParameterValue; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_ProprietaryParameterDynamics_integerParameterValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_ProprietaryParameterDynamics_integerParameterValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->integerParameterValue; - if (!buffer.str().empty()) + buffer >> element->integerParameterValue; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_ProprietaryParameterDynamics_parameterNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_ProprietaryParameterDynamics_parameterNumber(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->parameterNumber; - if (!buffer.str().empty()) + buffer >> element->parameterNumber; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_ProprietaryParameterDynamics_AsynchronousMachineUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->AsynchronousMachineUserDefined != 0) { @@ -497,7 +456,8 @@ bool get_ProprietaryParameterDynamics_AsynchronousMachineUserDefined(const BaseC bool get_ProprietaryParameterDynamics_DiscontinuousExcitationControlUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DiscontinuousExcitationControlUserDefined != 0) { @@ -510,7 +470,8 @@ bool get_ProprietaryParameterDynamics_DiscontinuousExcitationControlUserDefined( bool get_ProprietaryParameterDynamics_ExcitationSystemUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ExcitationSystemUserDefined != 0) { @@ -523,7 +484,8 @@ bool get_ProprietaryParameterDynamics_ExcitationSystemUserDefined(const BaseClas bool get_ProprietaryParameterDynamics_LoadUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->LoadUserDefined != 0) { @@ -536,7 +498,8 @@ bool get_ProprietaryParameterDynamics_LoadUserDefined(const BaseClass* BaseClass bool get_ProprietaryParameterDynamics_MechanicalLoadUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->MechanicalLoadUserDefined != 0) { @@ -549,7 +512,8 @@ bool get_ProprietaryParameterDynamics_MechanicalLoadUserDefined(const BaseClass* bool get_ProprietaryParameterDynamics_OverexcitationLimiterUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->OverexcitationLimiterUserDefined != 0) { @@ -562,7 +526,8 @@ bool get_ProprietaryParameterDynamics_OverexcitationLimiterUserDefined(const Bas bool get_ProprietaryParameterDynamics_PFVArControllerType1UserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PFVArControllerType1UserDefined != 0) { @@ -575,7 +540,8 @@ bool get_ProprietaryParameterDynamics_PFVArControllerType1UserDefined(const Base bool get_ProprietaryParameterDynamics_PFVArControllerType2UserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PFVArControllerType2UserDefined != 0) { @@ -588,7 +554,8 @@ bool get_ProprietaryParameterDynamics_PFVArControllerType2UserDefined(const Base bool get_ProprietaryParameterDynamics_PowerSystemStabilizerUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PowerSystemStabilizerUserDefined != 0) { @@ -601,7 +568,8 @@ bool get_ProprietaryParameterDynamics_PowerSystemStabilizerUserDefined(const Bas bool get_ProprietaryParameterDynamics_SynchronousMachineUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->SynchronousMachineUserDefined != 0) { @@ -614,7 +582,8 @@ bool get_ProprietaryParameterDynamics_SynchronousMachineUserDefined(const BaseCl bool get_ProprietaryParameterDynamics_TurbineGovernorUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->TurbineGovernorUserDefined != 0) { @@ -627,7 +596,8 @@ bool get_ProprietaryParameterDynamics_TurbineGovernorUserDefined(const BaseClass bool get_ProprietaryParameterDynamics_TurbineLoadControllerUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->TurbineLoadControllerUserDefined != 0) { @@ -640,7 +610,8 @@ bool get_ProprietaryParameterDynamics_TurbineLoadControllerUserDefined(const Bas bool get_ProprietaryParameterDynamics_UnderexcitationLimiterUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->UnderexcitationLimiterUserDefined != 0) { @@ -653,7 +624,8 @@ bool get_ProprietaryParameterDynamics_UnderexcitationLimiterUserDefined(const Ba bool get_ProprietaryParameterDynamics_VoltageAdjusterUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->VoltageAdjusterUserDefined != 0) { @@ -666,7 +638,8 @@ bool get_ProprietaryParameterDynamics_VoltageAdjusterUserDefined(const BaseClass bool get_ProprietaryParameterDynamics_VoltageCompensatorUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->VoltageCompensatorUserDefined != 0) { @@ -679,7 +652,8 @@ bool get_ProprietaryParameterDynamics_VoltageCompensatorUserDefined(const BaseCl bool get_ProprietaryParameterDynamics_WindPlantUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindPlantUserDefined != 0) { @@ -692,7 +666,8 @@ bool get_ProprietaryParameterDynamics_WindPlantUserDefined(const BaseClass* Base bool get_ProprietaryParameterDynamics_WindType1or2UserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindType1or2UserDefined != 0) { @@ -705,7 +680,8 @@ bool get_ProprietaryParameterDynamics_WindType1or2UserDefined(const BaseClass* B bool get_ProprietaryParameterDynamics_WindType3or4UserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindType3or4UserDefined != 0) { @@ -716,6 +692,65 @@ bool get_ProprietaryParameterDynamics_WindType3or4UserDefined(const BaseClass* B return false; } +bool get_ProprietaryParameterDynamics_booleanParameterValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->booleanParameterValue; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_ProprietaryParameterDynamics_floatParameterValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->floatParameterValue; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_ProprietaryParameterDynamics_integerParameterValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->integerParameterValue; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_ProprietaryParameterDynamics_parameterNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->parameterNumber; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char ProprietaryParameterDynamics::debugName[] = "ProprietaryParameterDynamics"; const char* ProprietaryParameterDynamics::debugString() const @@ -725,37 +760,37 @@ const char* ProprietaryParameterDynamics::debugString() const void ProprietaryParameterDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics"), &ProprietaryParameterDynamics_factory)); + factory_map.emplace("cim:ProprietaryParameterDynamics", &ProprietaryParameterDynamics_factory); } void ProprietaryParameterDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.booleanParameterValue"), &assign_ProprietaryParameterDynamics_booleanParameterValue)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.floatParameterValue"), &assign_ProprietaryParameterDynamics_floatParameterValue)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.integerParameterValue"), &assign_ProprietaryParameterDynamics_integerParameterValue)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.parameterNumber"), &assign_ProprietaryParameterDynamics_parameterNumber)); + assign_map.emplace("cim:ProprietaryParameterDynamics.booleanParameterValue", &assign_ProprietaryParameterDynamics_booleanParameterValue); + assign_map.emplace("cim:ProprietaryParameterDynamics.floatParameterValue", &assign_ProprietaryParameterDynamics_floatParameterValue); + assign_map.emplace("cim:ProprietaryParameterDynamics.integerParameterValue", &assign_ProprietaryParameterDynamics_integerParameterValue); + assign_map.emplace("cim:ProprietaryParameterDynamics.parameterNumber", &assign_ProprietaryParameterDynamics_parameterNumber); } void ProprietaryParameterDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.AsynchronousMachineUserDefined"), &assign_ProprietaryParameterDynamics_AsynchronousMachineUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.DiscontinuousExcitationControlUserDefined"), &assign_ProprietaryParameterDynamics_DiscontinuousExcitationControlUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.ExcitationSystemUserDefined"), &assign_ProprietaryParameterDynamics_ExcitationSystemUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.LoadUserDefined"), &assign_ProprietaryParameterDynamics_LoadUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.MechanicalLoadUserDefined"), &assign_ProprietaryParameterDynamics_MechanicalLoadUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.OverexcitationLimiterUserDefined"), &assign_ProprietaryParameterDynamics_OverexcitationLimiterUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.PFVArControllerType1UserDefined"), &assign_ProprietaryParameterDynamics_PFVArControllerType1UserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.PFVArControllerType2UserDefined"), &assign_ProprietaryParameterDynamics_PFVArControllerType2UserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.PowerSystemStabilizerUserDefined"), &assign_ProprietaryParameterDynamics_PowerSystemStabilizerUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.SynchronousMachineUserDefined"), &assign_ProprietaryParameterDynamics_SynchronousMachineUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.TurbineGovernorUserDefined"), &assign_ProprietaryParameterDynamics_TurbineGovernorUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.TurbineLoadControllerUserDefined"), &assign_ProprietaryParameterDynamics_TurbineLoadControllerUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.UnderexcitationLimiterUserDefined"), &assign_ProprietaryParameterDynamics_UnderexcitationLimiterUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.VoltageAdjusterUserDefined"), &assign_ProprietaryParameterDynamics_VoltageAdjusterUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.VoltageCompensatorUserDefined"), &assign_ProprietaryParameterDynamics_VoltageCompensatorUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.WindPlantUserDefined"), &assign_ProprietaryParameterDynamics_WindPlantUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.WindType1or2UserDefined"), &assign_ProprietaryParameterDynamics_WindType1or2UserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.WindType3or4UserDefined"), &assign_ProprietaryParameterDynamics_WindType3or4UserDefined)); + assign_map.emplace("cim:ProprietaryParameterDynamics.AsynchronousMachineUserDefined", &assign_ProprietaryParameterDynamics_AsynchronousMachineUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.DiscontinuousExcitationControlUserDefined", &assign_ProprietaryParameterDynamics_DiscontinuousExcitationControlUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.ExcitationSystemUserDefined", &assign_ProprietaryParameterDynamics_ExcitationSystemUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.LoadUserDefined", &assign_ProprietaryParameterDynamics_LoadUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.MechanicalLoadUserDefined", &assign_ProprietaryParameterDynamics_MechanicalLoadUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.OverexcitationLimiterUserDefined", &assign_ProprietaryParameterDynamics_OverexcitationLimiterUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.PFVArControllerType1UserDefined", &assign_ProprietaryParameterDynamics_PFVArControllerType1UserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.PFVArControllerType2UserDefined", &assign_ProprietaryParameterDynamics_PFVArControllerType2UserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.PowerSystemStabilizerUserDefined", &assign_ProprietaryParameterDynamics_PowerSystemStabilizerUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.SynchronousMachineUserDefined", &assign_ProprietaryParameterDynamics_SynchronousMachineUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.TurbineGovernorUserDefined", &assign_ProprietaryParameterDynamics_TurbineGovernorUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.TurbineLoadControllerUserDefined", &assign_ProprietaryParameterDynamics_TurbineLoadControllerUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.UnderexcitationLimiterUserDefined", &assign_ProprietaryParameterDynamics_UnderexcitationLimiterUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.VoltageAdjusterUserDefined", &assign_ProprietaryParameterDynamics_VoltageAdjusterUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.VoltageCompensatorUserDefined", &assign_ProprietaryParameterDynamics_VoltageCompensatorUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.WindPlantUserDefined", &assign_ProprietaryParameterDynamics_WindPlantUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.WindType1or2UserDefined", &assign_ProprietaryParameterDynamics_WindType1or2UserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.WindType3or4UserDefined", &assign_ProprietaryParameterDynamics_WindType3or4UserDefined); } void ProprietaryParameterDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/ProprietaryParameterDynamics.hpp b/CGMES_2.4.13_18DEC2013/ProprietaryParameterDynamics.hpp index a8d49dc07..3aa47cdc9 100644 --- a/CGMES_2.4.13_18DEC2013/ProprietaryParameterDynamics.hpp +++ b/CGMES_2.4.13_18DEC2013/ProprietaryParameterDynamics.hpp @@ -37,9 +37,7 @@ namespace CIMPP class WindType1or2UserDefined; class WindType3or4UserDefined; - /* - Supports definition of one or more parameters of several different datatypes for use by proprietary user-defined models. NOTE: This class does not inherit from IdentifiedObject since it is not intended that a single instance of it be referenced by more than one proprietary user-defined model instance. - */ + /** \brief Supports definition of one or more parameters of several different datatypes for use by proprietary user-defined models. NOTE: This class does not inherit from IdentifiedObject since it is not intended that a single instance of it be referenced by more than one proprietary user-defined model instance. */ class ProprietaryParameterDynamics : public BaseClass { public: @@ -47,28 +45,71 @@ namespace CIMPP ProprietaryParameterDynamics(); ~ProprietaryParameterDynamics() override; - CIMPP::AsynchronousMachineUserDefined* AsynchronousMachineUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::DiscontinuousExcitationControlUserDefined* DiscontinuousExcitationControlUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::ExcitationSystemUserDefined* ExcitationSystemUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::LoadUserDefined* LoadUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::MechanicalLoadUserDefined* MechanicalLoadUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::OverexcitationLimiterUserDefined* OverexcitationLimiterUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::PFVArControllerType1UserDefined* PFVArControllerType1UserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::PFVArControllerType2UserDefined* PFVArControllerType2UserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::PowerSystemStabilizerUserDefined* PowerSystemStabilizerUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::SynchronousMachineUserDefined* SynchronousMachineUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::TurbineGovernorUserDefined* TurbineGovernorUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::TurbineLoadControllerUserDefined* TurbineLoadControllerUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::UnderexcitationLimiterUserDefined* UnderexcitationLimiterUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::VoltageAdjusterUserDefined* VoltageAdjusterUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::VoltageCompensatorUserDefined* VoltageCompensatorUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::WindPlantUserDefined* WindPlantUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::WindType1or2UserDefined* WindType1or2UserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::WindType3or4UserDefined* WindType3or4UserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::Boolean booleanParameterValue; /* Used for boolean parameter value. If this attribute is populated, integerParameterValue and floatParameterValue will not be. Default: false */ - CIMPP::Simple_Float floatParameterValue; /* Used for floating point parameter value. If this attribute is populated, booleanParameterValue and integerParameterValue will not be. Default: nullptr */ - CIMPP::Integer integerParameterValue; /* Used for integer parameter value. If this attribute is populated, booleanParameterValue and floatParameterValue will not be. Default: 0 */ - CIMPP::Integer parameterNumber; /* Sequence number of the parameter among the set of parameters associated with the related proprietary user-defined model. Default: 0 */ + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::AsynchronousMachineUserDefined* AsynchronousMachineUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::DiscontinuousExcitationControlUserDefined* DiscontinuousExcitationControlUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::ExcitationSystemUserDefined* ExcitationSystemUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::LoadUserDefined* LoadUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::MechanicalLoadUserDefined* MechanicalLoadUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::OverexcitationLimiterUserDefined* OverexcitationLimiterUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::PFVArControllerType1UserDefined* PFVArControllerType1UserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::PFVArControllerType2UserDefined* PFVArControllerType2UserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::PowerSystemStabilizerUserDefined* PowerSystemStabilizerUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::SynchronousMachineUserDefined* SynchronousMachineUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::TurbineGovernorUserDefined* TurbineGovernorUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::TurbineLoadControllerUserDefined* TurbineLoadControllerUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::UnderexcitationLimiterUserDefined* UnderexcitationLimiterUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::VoltageAdjusterUserDefined* VoltageAdjusterUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::VoltageCompensatorUserDefined* VoltageCompensatorUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::WindPlantUserDefined* WindPlantUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::WindType1or2UserDefined* WindType1or2UserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::WindType3or4UserDefined* WindType3or4UserDefined; + + /** \brief Used for boolean parameter value. If this attribute is populated, integerParameterValue and floatParameterValue will not be. Default: false */ + CIMPP::Boolean booleanParameterValue; + + /** \brief Used for floating point parameter value. If this attribute is populated, booleanParameterValue and integerParameterValue will not be. Default: nullptr */ + CIMPP::Simple_Float floatParameterValue; + + /** \brief Used for integer parameter value. If this attribute is populated, booleanParameterValue and floatParameterValue will not be. Default: 0 */ + CIMPP::Integer integerParameterValue; + + /** \brief Sequence number of the parameter among the set of parameters associated with the related proprietary user-defined model. Default: 0 */ + CIMPP::Integer parameterNumber; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ProtectedSwitch.cpp b/CGMES_2.4.13_18DEC2013/ProtectedSwitch.cpp index f80191fcf..2b6f24097 100644 --- a/CGMES_2.4.13_18DEC2013/ProtectedSwitch.cpp +++ b/CGMES_2.4.13_18DEC2013/ProtectedSwitch.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ProtectedSwitch::ProtectedSwitch() {}; -ProtectedSwitch::~ProtectedSwitch() {}; +ProtectedSwitch::ProtectedSwitch() {} +ProtectedSwitch::~ProtectedSwitch() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ ProtectedSwitch::getPossibleProfilesForAttributes() const return map; } - - - - - const char ProtectedSwitch::debugName[] = "ProtectedSwitch"; const char* ProtectedSwitch::debugString() const { @@ -52,7 +47,7 @@ const char* ProtectedSwitch::debugString() const void ProtectedSwitch::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ProtectedSwitch"), &ProtectedSwitch_factory)); + factory_map.emplace("cim:ProtectedSwitch", &ProtectedSwitch_factory); } void ProtectedSwitch::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/ProtectedSwitch.hpp b/CGMES_2.4.13_18DEC2013/ProtectedSwitch.hpp index 188feccca..e7161aa71 100644 --- a/CGMES_2.4.13_18DEC2013/ProtectedSwitch.hpp +++ b/CGMES_2.4.13_18DEC2013/ProtectedSwitch.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A ProtectedSwitch is a switching device that can be operated by ProtectionEquipment. - */ + /** \brief A ProtectedSwitch is a switching device that can be operated by ProtectionEquipment. */ class ProtectedSwitch : public Switch { public: @@ -26,7 +24,6 @@ namespace CIMPP ProtectedSwitch(); ~ProtectedSwitch() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Pss1.cpp b/CGMES_2.4.13_18DEC2013/Pss1.cpp index 1dd19fafc..a1bc68391 100644 --- a/CGMES_2.4.13_18DEC2013/Pss1.cpp +++ b/CGMES_2.4.13_18DEC2013/Pss1.cpp @@ -8,26 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -Pss1::Pss1() {}; -Pss1::~Pss1() {}; +Pss1::Pss1() {} +Pss1::~Pss1() {} static const std::list PossibleProfilesForClass = { @@ -68,207 +53,220 @@ Pss1::getPossibleProfilesForAttributes() const return map; } - -bool assign_Pss1_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_kpe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_kpe(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpe; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_kw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_kw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_t10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_t10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_t7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_t8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_t8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_t9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_t9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_tpe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_tpe(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpe; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_vadat(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_vadat(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vadat; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_vsmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_vsmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_vsmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_vsmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_Pss1_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -282,7 +280,8 @@ bool get_Pss1_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_kpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpe; if (!buffer.str().empty()) @@ -296,7 +295,8 @@ bool get_Pss1_kpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -310,7 +310,8 @@ bool get_Pss1_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_kw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kw; if (!buffer.str().empty()) @@ -324,7 +325,8 @@ bool get_Pss1_kw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -338,7 +340,8 @@ bool get_Pss1_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t10; if (!buffer.str().empty()) @@ -352,7 +355,8 @@ bool get_Pss1_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -366,7 +370,8 @@ bool get_Pss1_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -380,7 +385,8 @@ bool get_Pss1_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t7; if (!buffer.str().empty()) @@ -394,7 +400,8 @@ bool get_Pss1_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t8; if (!buffer.str().empty()) @@ -408,7 +415,8 @@ bool get_Pss1_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t9; if (!buffer.str().empty()) @@ -422,7 +430,8 @@ bool get_Pss1_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_tpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpe; if (!buffer.str().empty()) @@ -436,7 +445,8 @@ bool get_Pss1_tpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_vadat(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vadat; if (!buffer.str().empty()) @@ -450,7 +460,8 @@ bool get_Pss1_vadat(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_vsmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmn; if (!buffer.str().empty()) @@ -464,7 +475,8 @@ bool get_Pss1_vsmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_vsmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmx; if (!buffer.str().empty()) @@ -476,8 +488,6 @@ bool get_Pss1_vsmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char Pss1::debugName[] = "Pss1"; const char* Pss1::debugString() const { @@ -486,26 +496,26 @@ const char* Pss1::debugString() const void Pss1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Pss1"), &Pss1_factory)); + factory_map.emplace("cim:Pss1", &Pss1_factory); } void Pss1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Pss1.kf"), &assign_Pss1_kf)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.kpe"), &assign_Pss1_kpe)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.ks"), &assign_Pss1_ks)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.kw"), &assign_Pss1_kw)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.pmin"), &assign_Pss1_pmin)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.t10"), &assign_Pss1_t10)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.t5"), &assign_Pss1_t5)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.t6"), &assign_Pss1_t6)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.t7"), &assign_Pss1_t7)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.t8"), &assign_Pss1_t8)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.t9"), &assign_Pss1_t9)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.tpe"), &assign_Pss1_tpe)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.vadat"), &assign_Pss1_vadat)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.vsmn"), &assign_Pss1_vsmn)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.vsmx"), &assign_Pss1_vsmx)); + assign_map.emplace("cim:Pss1.kf", &assign_Pss1_kf); + assign_map.emplace("cim:Pss1.kpe", &assign_Pss1_kpe); + assign_map.emplace("cim:Pss1.ks", &assign_Pss1_ks); + assign_map.emplace("cim:Pss1.kw", &assign_Pss1_kw); + assign_map.emplace("cim:Pss1.pmin", &assign_Pss1_pmin); + assign_map.emplace("cim:Pss1.t10", &assign_Pss1_t10); + assign_map.emplace("cim:Pss1.t5", &assign_Pss1_t5); + assign_map.emplace("cim:Pss1.t6", &assign_Pss1_t6); + assign_map.emplace("cim:Pss1.t7", &assign_Pss1_t7); + assign_map.emplace("cim:Pss1.t8", &assign_Pss1_t8); + assign_map.emplace("cim:Pss1.t9", &assign_Pss1_t9); + assign_map.emplace("cim:Pss1.tpe", &assign_Pss1_tpe); + assign_map.emplace("cim:Pss1.vadat", &assign_Pss1_vadat); + assign_map.emplace("cim:Pss1.vsmn", &assign_Pss1_vsmn); + assign_map.emplace("cim:Pss1.vsmx", &assign_Pss1_vsmx); } void Pss1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/Pss1.hpp b/CGMES_2.4.13_18DEC2013/Pss1.hpp index 1a0e315e9..d0b00aadb 100644 --- a/CGMES_2.4.13_18DEC2013/Pss1.hpp +++ b/CGMES_2.4.13_18DEC2013/Pss1.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Italian PSS - three input PSS (speed, frequency, power). - */ + /** \brief Italian PSS - three input PSS (speed, frequency, power). */ class Pss1 : public PowerSystemStabilizerDynamics { public: @@ -30,21 +28,50 @@ namespace CIMPP Pss1(); ~Pss1() override; - CIMPP::Simple_Float kf; /* Frequency power input gain (K). Typical Value = 5. Default: nullptr */ - CIMPP::Simple_Float kpe; /* Electric power input gain (K). Typical Value = 0.3. Default: nullptr */ - CIMPP::Simple_Float ks; /* PSS gain (K). Typical Value = 1. Default: nullptr */ - CIMPP::Simple_Float kw; /* Shaft speed power input gain (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU pmin; /* Minimum power PSS enabling (P). Typical Value = 0.25. Default: nullptr */ - CIMPP::Seconds t10; /* Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t5; /* Washout (T). Typical Value = 3.5. Default: nullptr */ - CIMPP::Seconds t6; /* Filter time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t7; /* Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t8; /* Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t9; /* Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tpe; /* Electric power filter time constant (T). Typical Value = 0.05. Default: nullptr */ - CIMPP::Boolean vadat; /* Default: false */ - CIMPP::PU vsmn; /* Stabilizer output max limit (V). Typical Value = -0.06. Default: nullptr */ - CIMPP::PU vsmx; /* Stabilizer output min limit (V). Typical Value = 0.06. Default: nullptr */ + /** \brief Frequency power input gain (K). Typical Value = 5. Default: nullptr */ + CIMPP::Simple_Float kf; + + /** \brief Electric power input gain (K). Typical Value = 0.3. Default: nullptr */ + CIMPP::Simple_Float kpe; + + /** \brief PSS gain (K). Typical Value = 1. Default: nullptr */ + CIMPP::Simple_Float ks; + + /** \brief Shaft speed power input gain (K). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float kw; + + /** \brief Minimum power PSS enabling (P). Typical Value = 0.25. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t10; + + /** \brief Washout (T). Typical Value = 3.5. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Filter time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t7; + + /** \brief Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t8; + + /** \brief Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t9; + + /** \brief Electric power filter time constant (T). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds tpe; + + /** \brief Default: false */ + CIMPP::Boolean vadat; + + /** \brief Stabilizer output max limit (V). Typical Value = -0.06. Default: nullptr */ + CIMPP::PU vsmn; + + /** \brief Stabilizer output min limit (V). Typical Value = 0.06. Default: nullptr */ + CIMPP::PU vsmx; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Pss1A.cpp b/CGMES_2.4.13_18DEC2013/Pss1A.cpp index 9f69780d8..219c3f935 100644 --- a/CGMES_2.4.13_18DEC2013/Pss1A.cpp +++ b/CGMES_2.4.13_18DEC2013/Pss1A.cpp @@ -8,33 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "InputSignalKind.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -Pss1A::Pss1A() {}; -Pss1A::~Pss1A() {}; +Pss1A::Pss1A() {} +Pss1A::~Pss1A() {} static const std::list PossibleProfilesForClass = { @@ -82,298 +60,318 @@ Pss1A::getPossibleProfilesForAttributes() const return map; } - -bool assign_Pss1A_a1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_a1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_a2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_a2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_a3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_a3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_a4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_a4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_a5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_a5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_a6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_a6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_a7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_a7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_a8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_a8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_inputSignalType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_inputSignalType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignalType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_tdelay(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_tdelay(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdelay; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_vcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_vcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vcl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_vcu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_vcu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vcu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_Pss1A_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a1; if (!buffer.str().empty()) @@ -387,7 +385,8 @@ bool get_Pss1A_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a2; if (!buffer.str().empty()) @@ -401,7 +400,8 @@ bool get_Pss1A_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_a3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a3; if (!buffer.str().empty()) @@ -415,7 +415,8 @@ bool get_Pss1A_a3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_a4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a4; if (!buffer.str().empty()) @@ -429,7 +430,8 @@ bool get_Pss1A_a4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_a5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a5; if (!buffer.str().empty()) @@ -443,7 +445,8 @@ bool get_Pss1A_a5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_a6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a6; if (!buffer.str().empty()) @@ -457,7 +460,8 @@ bool get_Pss1A_a6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_a7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a7; if (!buffer.str().empty()) @@ -471,7 +475,8 @@ bool get_Pss1A_a7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_a8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a8; if (!buffer.str().empty()) @@ -483,9 +488,25 @@ bool get_Pss1A_a8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } +bool get_Pss1A_inputSignalType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignalType; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_Pss1A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -499,7 +520,8 @@ bool get_Pss1A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -513,7 +535,8 @@ bool get_Pss1A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -527,7 +550,8 @@ bool get_Pss1A_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -541,7 +565,8 @@ bool get_Pss1A_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -555,7 +580,8 @@ bool get_Pss1A_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -569,7 +595,8 @@ bool get_Pss1A_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -583,7 +610,8 @@ bool get_Pss1A_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -597,7 +625,8 @@ bool get_Pss1A_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_tdelay(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdelay; if (!buffer.str().empty()) @@ -611,7 +640,8 @@ bool get_Pss1A_tdelay(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_Pss1A_vcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vcl; if (!buffer.str().empty()) @@ -625,7 +655,8 @@ bool get_Pss1A_vcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_vcu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vcu; if (!buffer.str().empty()) @@ -639,7 +670,8 @@ bool get_Pss1A_vcu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -653,7 +685,8 @@ bool get_Pss1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -665,22 +698,6 @@ bool get_Pss1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - -bool get_Pss1A_inputSignalType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignalType; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char Pss1A::debugName[] = "Pss1A"; const char* Pss1A::debugString() const { @@ -689,33 +706,33 @@ const char* Pss1A::debugString() const void Pss1A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Pss1A"), &Pss1A_factory)); + factory_map.emplace("cim:Pss1A", &Pss1A_factory); } void Pss1A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Pss1A.a1"), &assign_Pss1A_a1)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.a2"), &assign_Pss1A_a2)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.a3"), &assign_Pss1A_a3)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.a4"), &assign_Pss1A_a4)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.a5"), &assign_Pss1A_a5)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.a6"), &assign_Pss1A_a6)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.a7"), &assign_Pss1A_a7)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.a8"), &assign_Pss1A_a8)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.inputSignalType"), &assign_Pss1A_inputSignalType)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.kd"), &assign_Pss1A_kd)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.ks"), &assign_Pss1A_ks)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.t1"), &assign_Pss1A_t1)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.t2"), &assign_Pss1A_t2)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.t3"), &assign_Pss1A_t3)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.t4"), &assign_Pss1A_t4)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.t5"), &assign_Pss1A_t5)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.t6"), &assign_Pss1A_t6)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.tdelay"), &assign_Pss1A_tdelay)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.vcl"), &assign_Pss1A_vcl)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.vcu"), &assign_Pss1A_vcu)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.vrmax"), &assign_Pss1A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.vrmin"), &assign_Pss1A_vrmin)); + assign_map.emplace("cim:Pss1A.a1", &assign_Pss1A_a1); + assign_map.emplace("cim:Pss1A.a2", &assign_Pss1A_a2); + assign_map.emplace("cim:Pss1A.a3", &assign_Pss1A_a3); + assign_map.emplace("cim:Pss1A.a4", &assign_Pss1A_a4); + assign_map.emplace("cim:Pss1A.a5", &assign_Pss1A_a5); + assign_map.emplace("cim:Pss1A.a6", &assign_Pss1A_a6); + assign_map.emplace("cim:Pss1A.a7", &assign_Pss1A_a7); + assign_map.emplace("cim:Pss1A.a8", &assign_Pss1A_a8); + assign_map.emplace("cim:Pss1A.inputSignalType", &assign_Pss1A_inputSignalType); + assign_map.emplace("cim:Pss1A.kd", &assign_Pss1A_kd); + assign_map.emplace("cim:Pss1A.ks", &assign_Pss1A_ks); + assign_map.emplace("cim:Pss1A.t1", &assign_Pss1A_t1); + assign_map.emplace("cim:Pss1A.t2", &assign_Pss1A_t2); + assign_map.emplace("cim:Pss1A.t3", &assign_Pss1A_t3); + assign_map.emplace("cim:Pss1A.t4", &assign_Pss1A_t4); + assign_map.emplace("cim:Pss1A.t5", &assign_Pss1A_t5); + assign_map.emplace("cim:Pss1A.t6", &assign_Pss1A_t6); + assign_map.emplace("cim:Pss1A.tdelay", &assign_Pss1A_tdelay); + assign_map.emplace("cim:Pss1A.vcl", &assign_Pss1A_vcl); + assign_map.emplace("cim:Pss1A.vcu", &assign_Pss1A_vcu); + assign_map.emplace("cim:Pss1A.vrmax", &assign_Pss1A_vrmax); + assign_map.emplace("cim:Pss1A.vrmin", &assign_Pss1A_vrmin); } void Pss1A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/Pss1A.hpp b/CGMES_2.4.13_18DEC2013/Pss1A.hpp index 17cb944a4..e1b282d6d 100644 --- a/CGMES_2.4.13_18DEC2013/Pss1A.hpp +++ b/CGMES_2.4.13_18DEC2013/Pss1A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Single input power system stabilizer. It is a modified version in order to allow representation of various vendors' implementations on PSS type 1A. - */ + /** \brief Single input power system stabilizer. It is a modified version in order to allow representation of various vendors' implementations on PSS type 1A. */ class Pss1A : public PowerSystemStabilizerDynamics { public: @@ -30,28 +28,71 @@ namespace CIMPP Pss1A(); ~Pss1A() override; - CIMPP::PU a1; /* Notch filter parameter (A1). Default: nullptr */ - CIMPP::PU a2; /* Notch filter parameter (A2). Default: nullptr */ - CIMPP::PU a3; /* Notch filter parameter (A3). Default: nullptr */ - CIMPP::PU a4; /* Notch filter parameter (A4). Default: nullptr */ - CIMPP::PU a5; /* Notch filter parameter (A5). Default: nullptr */ - CIMPP::PU a6; /* Notch filter parameter (A6). Default: nullptr */ - CIMPP::PU a7; /* Notch filter parameter (A7). Default: nullptr */ - CIMPP::PU a8; /* Notch filter parameter (A8). Default: nullptr */ - CIMPP::InputSignalKind inputSignalType; /* Type of input signal. Default: 0 */ - CIMPP::Boolean kd; /* Selector (Kd). true = e used false = e not used. Default: false */ - CIMPP::PU ks; /* Stabilizer gain (Ks). Default: nullptr */ - CIMPP::Seconds t1; /* Lead/lag time constant (T1). Default: nullptr */ - CIMPP::Seconds t2; /* Lead/lag time constant (T2). Default: nullptr */ - CIMPP::Seconds t3; /* Lead/lag time constant (T3). Default: nullptr */ - CIMPP::Seconds t4; /* Lead/lag time constant (T4). Default: nullptr */ - CIMPP::Seconds t5; /* Washout time constant (T5). Default: nullptr */ - CIMPP::Seconds t6; /* Transducer time constant (T6). Default: nullptr */ - CIMPP::Seconds tdelay; /* Time constant (Tdelay). Default: nullptr */ - CIMPP::PU vcl; /* Stabilizer input cutoff threshold (Vcl). Default: nullptr */ - CIMPP::PU vcu; /* Stabilizer input cutoff threshold (Vcu). Default: nullptr */ - CIMPP::PU vrmax; /* Maximum stabilizer output (Vrmax). Default: nullptr */ - CIMPP::PU vrmin; /* Minimum stabilizer output (Vrmin). Default: nullptr */ + /** \brief Notch filter parameter (A1). Default: nullptr */ + CIMPP::PU a1; + + /** \brief Notch filter parameter (A2). Default: nullptr */ + CIMPP::PU a2; + + /** \brief Notch filter parameter (A3). Default: nullptr */ + CIMPP::PU a3; + + /** \brief Notch filter parameter (A4). Default: nullptr */ + CIMPP::PU a4; + + /** \brief Notch filter parameter (A5). Default: nullptr */ + CIMPP::PU a5; + + /** \brief Notch filter parameter (A6). Default: nullptr */ + CIMPP::PU a6; + + /** \brief Notch filter parameter (A7). Default: nullptr */ + CIMPP::PU a7; + + /** \brief Notch filter parameter (A8). Default: nullptr */ + CIMPP::PU a8; + + /** \brief Type of input signal. Default: 0 */ + CIMPP::InputSignalKind inputSignalType; + + /** \brief Selector (Kd). true = e used false = e not used. Default: false */ + CIMPP::Boolean kd; + + /** \brief Stabilizer gain (Ks). Default: nullptr */ + CIMPP::PU ks; + + /** \brief Lead/lag time constant (T1). Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Lead/lag time constant (T2). Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Lead/lag time constant (T3). Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Lead/lag time constant (T4). Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Washout time constant (T5). Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Transducer time constant (T6). Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time constant (Tdelay). Default: nullptr */ + CIMPP::Seconds tdelay; + + /** \brief Stabilizer input cutoff threshold (Vcl). Default: nullptr */ + CIMPP::PU vcl; + + /** \brief Stabilizer input cutoff threshold (Vcu). Default: nullptr */ + CIMPP::PU vcu; + + /** \brief Maximum stabilizer output (Vrmax). Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum stabilizer output (Vrmin). Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Pss2B.cpp b/CGMES_2.4.13_18DEC2013/Pss2B.cpp index c5cde1d14..71b0429d6 100644 --- a/CGMES_2.4.13_18DEC2013/Pss2B.cpp +++ b/CGMES_2.4.13_18DEC2013/Pss2B.cpp @@ -8,42 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "InputSignalKind.hpp" -#include "InputSignalKind.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Integer.hpp" -#include "Integer.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -Pss2B::Pss2B() {}; -Pss2B::~Pss2B() {}; +Pss2B::Pss2B() {} +Pss2B::~Pss2B() {} static const std::list PossibleProfilesForClass = { @@ -100,415 +69,444 @@ Pss2B::getPossibleProfilesForAttributes() const return map; } - -bool assign_Pss2B_a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_a(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_inputSignal1Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_inputSignal1Type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal1Type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_inputSignal2Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_inputSignal2Type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal2Type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_ks1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_ks1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_ks2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_ks2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_ks3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_ks3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_ks4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_ks4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_m(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_m(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->m; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_n(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_n(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->n; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t11(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t11; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_tw1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_tw1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_tw2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_tw2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_tw3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_tw3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_tw4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_tw4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_vsi1max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_vsi1max(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsi1max; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_vsi1min(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_vsi1min(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsi1min; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_vsi2max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_vsi2max(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsi2max; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_vsi2min(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_vsi2min(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsi2min; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_vstmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_vstmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vstmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_vstmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_vstmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vstmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_Pss2B_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a; if (!buffer.str().empty()) @@ -520,9 +518,40 @@ bool get_Pss2B_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } +bool get_Pss2B_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignal1Type; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_Pss2B_inputSignal2Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignal2Type; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_Pss2B_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks1; if (!buffer.str().empty()) @@ -536,7 +565,8 @@ bool get_Pss2B_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks2; if (!buffer.str().empty()) @@ -550,7 +580,8 @@ bool get_Pss2B_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_ks3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks3; if (!buffer.str().empty()) @@ -564,7 +595,8 @@ bool get_Pss2B_ks3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_ks4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks4; if (!buffer.str().empty()) @@ -578,7 +610,8 @@ bool get_Pss2B_ks4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->m; if (!buffer.str().empty()) @@ -592,7 +625,8 @@ bool get_Pss2B_m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_n(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->n; if (!buffer.str().empty()) @@ -606,7 +640,8 @@ bool get_Pss2B_n(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -620,7 +655,8 @@ bool get_Pss2B_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t10; if (!buffer.str().empty()) @@ -634,7 +670,8 @@ bool get_Pss2B_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t11; if (!buffer.str().empty()) @@ -648,7 +685,8 @@ bool get_Pss2B_t11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -662,7 +700,8 @@ bool get_Pss2B_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -676,7 +715,8 @@ bool get_Pss2B_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -690,7 +730,8 @@ bool get_Pss2B_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -704,7 +745,8 @@ bool get_Pss2B_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t7; if (!buffer.str().empty()) @@ -718,7 +760,8 @@ bool get_Pss2B_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t8; if (!buffer.str().empty()) @@ -732,7 +775,8 @@ bool get_Pss2B_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t9; if (!buffer.str().empty()) @@ -746,7 +790,8 @@ bool get_Pss2B_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -760,7 +805,8 @@ bool get_Pss2B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -774,7 +820,8 @@ bool get_Pss2B_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_tw1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw1; if (!buffer.str().empty()) @@ -788,7 +835,8 @@ bool get_Pss2B_tw1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_tw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw2; if (!buffer.str().empty()) @@ -802,7 +850,8 @@ bool get_Pss2B_tw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_tw3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw3; if (!buffer.str().empty()) @@ -816,7 +865,8 @@ bool get_Pss2B_tw3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_tw4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw4; if (!buffer.str().empty()) @@ -830,7 +880,8 @@ bool get_Pss2B_tw4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_vsi1max(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsi1max; if (!buffer.str().empty()) @@ -844,7 +895,8 @@ bool get_Pss2B_vsi1max(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_Pss2B_vsi1min(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsi1min; if (!buffer.str().empty()) @@ -858,7 +910,8 @@ bool get_Pss2B_vsi1min(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_Pss2B_vsi2max(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsi2max; if (!buffer.str().empty()) @@ -872,7 +925,8 @@ bool get_Pss2B_vsi2max(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_Pss2B_vsi2min(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsi2min; if (!buffer.str().empty()) @@ -886,7 +940,8 @@ bool get_Pss2B_vsi2min(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_Pss2B_vstmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vstmax; if (!buffer.str().empty()) @@ -900,7 +955,8 @@ bool get_Pss2B_vstmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_Pss2B_vstmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vstmin; if (!buffer.str().empty()) @@ -912,36 +968,6 @@ bool get_Pss2B_vstmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - -bool get_Pss2B_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignal1Type; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - -bool get_Pss2B_inputSignal2Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignal2Type; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char Pss2B::debugName[] = "Pss2B"; const char* Pss2B::debugString() const { @@ -950,42 +976,42 @@ const char* Pss2B::debugString() const void Pss2B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Pss2B"), &Pss2B_factory)); + factory_map.emplace("cim:Pss2B", &Pss2B_factory); } void Pss2B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Pss2B.a"), &assign_Pss2B_a)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.inputSignal1Type"), &assign_Pss2B_inputSignal1Type)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.inputSignal2Type"), &assign_Pss2B_inputSignal2Type)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.ks1"), &assign_Pss2B_ks1)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.ks2"), &assign_Pss2B_ks2)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.ks3"), &assign_Pss2B_ks3)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.ks4"), &assign_Pss2B_ks4)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.m"), &assign_Pss2B_m)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.n"), &assign_Pss2B_n)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t1"), &assign_Pss2B_t1)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t10"), &assign_Pss2B_t10)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t11"), &assign_Pss2B_t11)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t2"), &assign_Pss2B_t2)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t3"), &assign_Pss2B_t3)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t4"), &assign_Pss2B_t4)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t6"), &assign_Pss2B_t6)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t7"), &assign_Pss2B_t7)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t8"), &assign_Pss2B_t8)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t9"), &assign_Pss2B_t9)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.ta"), &assign_Pss2B_ta)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.tb"), &assign_Pss2B_tb)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.tw1"), &assign_Pss2B_tw1)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.tw2"), &assign_Pss2B_tw2)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.tw3"), &assign_Pss2B_tw3)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.tw4"), &assign_Pss2B_tw4)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.vsi1max"), &assign_Pss2B_vsi1max)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.vsi1min"), &assign_Pss2B_vsi1min)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.vsi2max"), &assign_Pss2B_vsi2max)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.vsi2min"), &assign_Pss2B_vsi2min)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.vstmax"), &assign_Pss2B_vstmax)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.vstmin"), &assign_Pss2B_vstmin)); + assign_map.emplace("cim:Pss2B.a", &assign_Pss2B_a); + assign_map.emplace("cim:Pss2B.inputSignal1Type", &assign_Pss2B_inputSignal1Type); + assign_map.emplace("cim:Pss2B.inputSignal2Type", &assign_Pss2B_inputSignal2Type); + assign_map.emplace("cim:Pss2B.ks1", &assign_Pss2B_ks1); + assign_map.emplace("cim:Pss2B.ks2", &assign_Pss2B_ks2); + assign_map.emplace("cim:Pss2B.ks3", &assign_Pss2B_ks3); + assign_map.emplace("cim:Pss2B.ks4", &assign_Pss2B_ks4); + assign_map.emplace("cim:Pss2B.m", &assign_Pss2B_m); + assign_map.emplace("cim:Pss2B.n", &assign_Pss2B_n); + assign_map.emplace("cim:Pss2B.t1", &assign_Pss2B_t1); + assign_map.emplace("cim:Pss2B.t10", &assign_Pss2B_t10); + assign_map.emplace("cim:Pss2B.t11", &assign_Pss2B_t11); + assign_map.emplace("cim:Pss2B.t2", &assign_Pss2B_t2); + assign_map.emplace("cim:Pss2B.t3", &assign_Pss2B_t3); + assign_map.emplace("cim:Pss2B.t4", &assign_Pss2B_t4); + assign_map.emplace("cim:Pss2B.t6", &assign_Pss2B_t6); + assign_map.emplace("cim:Pss2B.t7", &assign_Pss2B_t7); + assign_map.emplace("cim:Pss2B.t8", &assign_Pss2B_t8); + assign_map.emplace("cim:Pss2B.t9", &assign_Pss2B_t9); + assign_map.emplace("cim:Pss2B.ta", &assign_Pss2B_ta); + assign_map.emplace("cim:Pss2B.tb", &assign_Pss2B_tb); + assign_map.emplace("cim:Pss2B.tw1", &assign_Pss2B_tw1); + assign_map.emplace("cim:Pss2B.tw2", &assign_Pss2B_tw2); + assign_map.emplace("cim:Pss2B.tw3", &assign_Pss2B_tw3); + assign_map.emplace("cim:Pss2B.tw4", &assign_Pss2B_tw4); + assign_map.emplace("cim:Pss2B.vsi1max", &assign_Pss2B_vsi1max); + assign_map.emplace("cim:Pss2B.vsi1min", &assign_Pss2B_vsi1min); + assign_map.emplace("cim:Pss2B.vsi2max", &assign_Pss2B_vsi2max); + assign_map.emplace("cim:Pss2B.vsi2min", &assign_Pss2B_vsi2min); + assign_map.emplace("cim:Pss2B.vstmax", &assign_Pss2B_vstmax); + assign_map.emplace("cim:Pss2B.vstmin", &assign_Pss2B_vstmin); } void Pss2B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/Pss2B.hpp b/CGMES_2.4.13_18DEC2013/Pss2B.hpp index 55c64c3fc..90e74ab8e 100644 --- a/CGMES_2.4.13_18DEC2013/Pss2B.hpp +++ b/CGMES_2.4.13_18DEC2013/Pss2B.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE PSS2B Model. Extra lead/lag (or rate) block added at end (up to 4 lead/lags total). - */ + /** \brief Modified IEEE PSS2B Model. Extra lead/lag (or rate) block added at end (up to 4 lead/lags total). */ class Pss2B : public PowerSystemStabilizerDynamics { public: @@ -31,37 +29,98 @@ namespace CIMPP Pss2B(); ~Pss2B() override; - CIMPP::Simple_Float a; /* Numerator constant (a). Typical Value = 1. Default: nullptr */ - CIMPP::InputSignalKind inputSignal1Type; /* Type of input signal #1. Typical Value = rotorSpeed. Default: 0 */ - CIMPP::InputSignalKind inputSignal2Type; /* Type of input signal #2. Typical Value = generatorElectricalPower. Default: 0 */ - CIMPP::PU ks1; /* Stabilizer gain (Ks1). Typical Value = 12. Default: nullptr */ - CIMPP::PU ks2; /* Gain on signal #2 (Ks2). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU ks3; /* Gain on signal #2 input before ramp-tracking filter (Ks3). Typical Value = 1. Default: nullptr */ - CIMPP::PU ks4; /* Gain on signal #2 input after ramp-tracking filter (Ks4). Typical Value = 1. Default: nullptr */ - CIMPP::Integer m; /* Denominator order of ramp tracking filter (M). Typical Value = 5. Default: 0 */ - CIMPP::Integer n; /* Order of ramp tracking filter (N). Typical Value = 1. Default: 0 */ - CIMPP::Seconds t1; /* Lead/lag time constant (T1). Typical Value = 0.12. Default: nullptr */ - CIMPP::Seconds t10; /* Lead/lag time constant (T10). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t11; /* Lead/lag time constant (T11). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t2; /* Lead/lag time constant (T2). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds t3; /* Lead/lag time constant (T3). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds t4; /* Lead/lag time constant (T4). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds t6; /* Time constant on signal #1 (T6). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t7; /* Time constant on signal #2 (T7). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds t8; /* Lead of ramp tracking filter (T8). Typical Value = 0.2. Default: nullptr */ - CIMPP::Seconds t9; /* Lag of ramp tracking filter (T9). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds ta; /* Lead constant (Ta). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tb; /* Lag time constant (Tb). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tw1; /* First washout on signal #1 (Tw1). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds tw2; /* Second washout on signal #1 (Tw2). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds tw3; /* First washout on signal #2 (Tw3). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds tw4; /* Second washout on signal #2 (Tw4). Typical Value = 0. Default: nullptr */ - CIMPP::PU vsi1max; /* Input signal #1 max limit (Vsi1max). Typical Value = 2. Default: nullptr */ - CIMPP::PU vsi1min; /* Input signal #1 min limit (Vsi1min). Typical Value = -2. Default: nullptr */ - CIMPP::PU vsi2max; /* Input signal #2 max limit (Vsi2max). Typical Value = 2. Default: nullptr */ - CIMPP::PU vsi2min; /* Input signal #2 min limit (Vsi2min). Typical Value = -2. Default: nullptr */ - CIMPP::PU vstmax; /* Stabilizer output max limit (Vstmax). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU vstmin; /* Stabilizer output min limit (Vstmin). Typical Value = -0.1. Default: nullptr */ + /** \brief Numerator constant (a). Typical Value = 1. Default: nullptr */ + CIMPP::Simple_Float a; + + /** \brief Type of input signal #1. Typical Value = rotorSpeed. Default: 0 */ + CIMPP::InputSignalKind inputSignal1Type; + + /** \brief Type of input signal #2. Typical Value = generatorElectricalPower. Default: 0 */ + CIMPP::InputSignalKind inputSignal2Type; + + /** \brief Stabilizer gain (Ks1). Typical Value = 12. Default: nullptr */ + CIMPP::PU ks1; + + /** \brief Gain on signal #2 (Ks2). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU ks2; + + /** \brief Gain on signal #2 input before ramp-tracking filter (Ks3). Typical Value = 1. Default: nullptr */ + CIMPP::PU ks3; + + /** \brief Gain on signal #2 input after ramp-tracking filter (Ks4). Typical Value = 1. Default: nullptr */ + CIMPP::PU ks4; + + /** \brief Denominator order of ramp tracking filter (M). Typical Value = 5. Default: 0 */ + CIMPP::Integer m; + + /** \brief Order of ramp tracking filter (N). Typical Value = 1. Default: 0 */ + CIMPP::Integer n; + + /** \brief Lead/lag time constant (T1). Typical Value = 0.12. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Lead/lag time constant (T10). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t10; + + /** \brief Lead/lag time constant (T11). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t11; + + /** \brief Lead/lag time constant (T2). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Lead/lag time constant (T3). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Lead/lag time constant (T4). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant on signal #1 (T6). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time constant on signal #2 (T7). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds t7; + + /** \brief Lead of ramp tracking filter (T8). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds t8; + + /** \brief Lag of ramp tracking filter (T9). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t9; + + /** \brief Lead constant (Ta). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Lag time constant (Tb). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief First washout on signal #1 (Tw1). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds tw1; + + /** \brief Second washout on signal #1 (Tw2). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds tw2; + + /** \brief First washout on signal #2 (Tw3). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds tw3; + + /** \brief Second washout on signal #2 (Tw4). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tw4; + + /** \brief Input signal #1 max limit (Vsi1max). Typical Value = 2. Default: nullptr */ + CIMPP::PU vsi1max; + + /** \brief Input signal #1 min limit (Vsi1min). Typical Value = -2. Default: nullptr */ + CIMPP::PU vsi1min; + + /** \brief Input signal #2 max limit (Vsi2max). Typical Value = 2. Default: nullptr */ + CIMPP::PU vsi2max; + + /** \brief Input signal #2 min limit (Vsi2min). Typical Value = -2. Default: nullptr */ + CIMPP::PU vsi2min; + + /** \brief Stabilizer output max limit (Vstmax). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU vstmax; + + /** \brief Stabilizer output min limit (Vstmin). Typical Value = -0.1. Default: nullptr */ + CIMPP::PU vstmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Pss2ST.cpp b/CGMES_2.4.13_18DEC2013/Pss2ST.cpp index d66a34602..9a42e067c 100644 --- a/CGMES_2.4.13_18DEC2013/Pss2ST.cpp +++ b/CGMES_2.4.13_18DEC2013/Pss2ST.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "InputSignalKind.hpp" -#include "InputSignalKind.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -Pss2ST::Pss2ST() {}; -Pss2ST::~Pss2ST() {}; +Pss2ST::Pss2ST() {} +Pss2ST::~Pss2ST() {} static const std::list PossibleProfilesForClass = { @@ -74,246 +56,292 @@ Pss2ST::getPossibleProfilesForAttributes() const return map; } - -bool assign_Pss2ST_inputSignal1Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_inputSignal1Type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal1Type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_inputSignal2Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_inputSignal2Type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal2Type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_lsmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_lsmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lsmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_lsmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_lsmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lsmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_vcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_vcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vcl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_vcu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_vcu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vcu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } +bool get_Pss2ST_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignal1Type; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} +bool get_Pss2ST_inputSignal2Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignal2Type; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} bool get_Pss2ST_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -327,7 +355,8 @@ bool get_Pss2ST_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -341,7 +370,8 @@ bool get_Pss2ST_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_lsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lsmax; if (!buffer.str().empty()) @@ -355,7 +385,8 @@ bool get_Pss2ST_lsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_Pss2ST_lsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lsmin; if (!buffer.str().empty()) @@ -369,7 +400,8 @@ bool get_Pss2ST_lsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_Pss2ST_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -383,7 +415,8 @@ bool get_Pss2ST_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t10; if (!buffer.str().empty()) @@ -397,7 +430,8 @@ bool get_Pss2ST_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -411,7 +445,8 @@ bool get_Pss2ST_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -425,7 +460,8 @@ bool get_Pss2ST_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -439,7 +475,8 @@ bool get_Pss2ST_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -453,7 +490,8 @@ bool get_Pss2ST_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -467,7 +505,8 @@ bool get_Pss2ST_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t7; if (!buffer.str().empty()) @@ -481,7 +520,8 @@ bool get_Pss2ST_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t8; if (!buffer.str().empty()) @@ -495,7 +535,8 @@ bool get_Pss2ST_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t9; if (!buffer.str().empty()) @@ -509,7 +550,8 @@ bool get_Pss2ST_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_vcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vcl; if (!buffer.str().empty()) @@ -523,7 +565,8 @@ bool get_Pss2ST_vcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_vcu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vcu; if (!buffer.str().empty()) @@ -535,36 +578,6 @@ bool get_Pss2ST_vcu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - -bool get_Pss2ST_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignal1Type; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - -bool get_Pss2ST_inputSignal2Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignal2Type; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char Pss2ST::debugName[] = "Pss2ST"; const char* Pss2ST::debugString() const { @@ -573,29 +586,29 @@ const char* Pss2ST::debugString() const void Pss2ST::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Pss2ST"), &Pss2ST_factory)); + factory_map.emplace("cim:Pss2ST", &Pss2ST_factory); } void Pss2ST::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.inputSignal1Type"), &assign_Pss2ST_inputSignal1Type)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.inputSignal2Type"), &assign_Pss2ST_inputSignal2Type)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.k1"), &assign_Pss2ST_k1)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.k2"), &assign_Pss2ST_k2)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.lsmax"), &assign_Pss2ST_lsmax)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.lsmin"), &assign_Pss2ST_lsmin)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t1"), &assign_Pss2ST_t1)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t10"), &assign_Pss2ST_t10)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t2"), &assign_Pss2ST_t2)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t3"), &assign_Pss2ST_t3)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t4"), &assign_Pss2ST_t4)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t5"), &assign_Pss2ST_t5)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t6"), &assign_Pss2ST_t6)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t7"), &assign_Pss2ST_t7)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t8"), &assign_Pss2ST_t8)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t9"), &assign_Pss2ST_t9)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.vcl"), &assign_Pss2ST_vcl)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.vcu"), &assign_Pss2ST_vcu)); + assign_map.emplace("cim:Pss2ST.inputSignal1Type", &assign_Pss2ST_inputSignal1Type); + assign_map.emplace("cim:Pss2ST.inputSignal2Type", &assign_Pss2ST_inputSignal2Type); + assign_map.emplace("cim:Pss2ST.k1", &assign_Pss2ST_k1); + assign_map.emplace("cim:Pss2ST.k2", &assign_Pss2ST_k2); + assign_map.emplace("cim:Pss2ST.lsmax", &assign_Pss2ST_lsmax); + assign_map.emplace("cim:Pss2ST.lsmin", &assign_Pss2ST_lsmin); + assign_map.emplace("cim:Pss2ST.t1", &assign_Pss2ST_t1); + assign_map.emplace("cim:Pss2ST.t10", &assign_Pss2ST_t10); + assign_map.emplace("cim:Pss2ST.t2", &assign_Pss2ST_t2); + assign_map.emplace("cim:Pss2ST.t3", &assign_Pss2ST_t3); + assign_map.emplace("cim:Pss2ST.t4", &assign_Pss2ST_t4); + assign_map.emplace("cim:Pss2ST.t5", &assign_Pss2ST_t5); + assign_map.emplace("cim:Pss2ST.t6", &assign_Pss2ST_t6); + assign_map.emplace("cim:Pss2ST.t7", &assign_Pss2ST_t7); + assign_map.emplace("cim:Pss2ST.t8", &assign_Pss2ST_t8); + assign_map.emplace("cim:Pss2ST.t9", &assign_Pss2ST_t9); + assign_map.emplace("cim:Pss2ST.vcl", &assign_Pss2ST_vcl); + assign_map.emplace("cim:Pss2ST.vcu", &assign_Pss2ST_vcu); } void Pss2ST::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/Pss2ST.hpp b/CGMES_2.4.13_18DEC2013/Pss2ST.hpp index c37d7fa68..abd31dcb0 100644 --- a/CGMES_2.4.13_18DEC2013/Pss2ST.hpp +++ b/CGMES_2.4.13_18DEC2013/Pss2ST.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - PTI Microprocessor-Based Stabilizer type 1. - */ + /** \brief PTI Microprocessor-Based Stabilizer type 1. */ class Pss2ST : public PowerSystemStabilizerDynamics { public: @@ -29,24 +27,59 @@ namespace CIMPP Pss2ST(); ~Pss2ST() override; - CIMPP::InputSignalKind inputSignal1Type; /* Type of input signal #1. Typical Value = rotorAngularFrequencyDeviation. Default: 0 */ - CIMPP::InputSignalKind inputSignal2Type; /* Type of input signal #2. Typical Value = generatorElectricalPower. Default: 0 */ - CIMPP::PU k1; /* Gain (K1). Default: nullptr */ - CIMPP::PU k2; /* Gain (K2). Default: nullptr */ - CIMPP::PU lsmax; /* Limiter (Lsmax). Default: nullptr */ - CIMPP::PU lsmin; /* Limiter (Lsmin). Default: nullptr */ - CIMPP::Seconds t1; /* Time constant (T1). Default: nullptr */ - CIMPP::Seconds t10; /* Time constant (T10). Default: nullptr */ - CIMPP::Seconds t2; /* Time constant (T2). Default: nullptr */ - CIMPP::Seconds t3; /* Time constant (T3). Default: nullptr */ - CIMPP::Seconds t4; /* Time constant (T4). Default: nullptr */ - CIMPP::Seconds t5; /* Time constant (T5). Default: nullptr */ - CIMPP::Seconds t6; /* Time constant (T6). Default: nullptr */ - CIMPP::Seconds t7; /* Time constant (T7). Default: nullptr */ - CIMPP::Seconds t8; /* Time constant (T8). Default: nullptr */ - CIMPP::Seconds t9; /* Time constant (T9). Default: nullptr */ - CIMPP::PU vcl; /* Cutoff limiter (Vcl). Default: nullptr */ - CIMPP::PU vcu; /* Cutoff limiter (Vcu). Default: nullptr */ + /** \brief Type of input signal #1. Typical Value = rotorAngularFrequencyDeviation. Default: 0 */ + CIMPP::InputSignalKind inputSignal1Type; + + /** \brief Type of input signal #2. Typical Value = generatorElectricalPower. Default: 0 */ + CIMPP::InputSignalKind inputSignal2Type; + + /** \brief Gain (K1). Default: nullptr */ + CIMPP::PU k1; + + /** \brief Gain (K2). Default: nullptr */ + CIMPP::PU k2; + + /** \brief Limiter (Lsmax). Default: nullptr */ + CIMPP::PU lsmax; + + /** \brief Limiter (Lsmin). Default: nullptr */ + CIMPP::PU lsmin; + + /** \brief Time constant (T1). Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Time constant (T10). Default: nullptr */ + CIMPP::Seconds t10; + + /** \brief Time constant (T2). Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Time constant (T3). Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Time constant (T4). Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant (T5). Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Time constant (T6). Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time constant (T7). Default: nullptr */ + CIMPP::Seconds t7; + + /** \brief Time constant (T8). Default: nullptr */ + CIMPP::Seconds t8; + + /** \brief Time constant (T9). Default: nullptr */ + CIMPP::Seconds t9; + + /** \brief Cutoff limiter (Vcl). Default: nullptr */ + CIMPP::PU vcl; + + /** \brief Cutoff limiter (Vcu). Default: nullptr */ + CIMPP::PU vcu; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Pss5.cpp b/CGMES_2.4.13_18DEC2013/Pss5.cpp index 3c55da9e1..41a4f0631 100644 --- a/CGMES_2.4.13_18DEC2013/Pss5.cpp +++ b/CGMES_2.4.13_18DEC2013/Pss5.cpp @@ -8,28 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -Pss5::Pss5() {}; -Pss5::~Pss5() {}; +Pss5::Pss5() {} +Pss5::~Pss5() {} static const std::list PossibleProfilesForClass = { @@ -72,233 +55,248 @@ Pss5::getPossibleProfilesForAttributes() const return map; } - -bool assign_Pss5_ctw2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_ctw2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ctw2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_deadband(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_deadband(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->deadband; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_isfreq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_isfreq(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->isfreq; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_kpe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_kpe(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpe; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_kpss(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_kpss(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpss; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_pmm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_pmm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_tl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_tl1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_tl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_tl2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_tl3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_tl3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_tl4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_tl4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_tpe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_tpe(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpe; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_tw1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_tw1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_tw2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_tw2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_vadat(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_vadat(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vadat; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_vsmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_vsmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_vsmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_vsmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_Pss5_ctw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ctw2; if (!buffer.str().empty()) @@ -312,7 +310,8 @@ bool get_Pss5_ctw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_deadband(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->deadband; if (!buffer.str().empty()) @@ -326,7 +325,8 @@ bool get_Pss5_deadband(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_Pss5_isfreq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->isfreq; if (!buffer.str().empty()) @@ -340,7 +340,8 @@ bool get_Pss5_isfreq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -354,7 +355,8 @@ bool get_Pss5_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_kpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpe; if (!buffer.str().empty()) @@ -368,7 +370,8 @@ bool get_Pss5_kpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_kpss(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpss; if (!buffer.str().empty()) @@ -382,7 +385,8 @@ bool get_Pss5_kpss(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_pmm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmm; if (!buffer.str().empty()) @@ -396,7 +400,8 @@ bool get_Pss5_pmm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_tl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl1; if (!buffer.str().empty()) @@ -410,7 +415,8 @@ bool get_Pss5_tl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_tl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl2; if (!buffer.str().empty()) @@ -424,7 +430,8 @@ bool get_Pss5_tl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_tl3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl3; if (!buffer.str().empty()) @@ -438,7 +445,8 @@ bool get_Pss5_tl3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_tl4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl4; if (!buffer.str().empty()) @@ -452,7 +460,8 @@ bool get_Pss5_tl4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_tpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpe; if (!buffer.str().empty()) @@ -466,7 +475,8 @@ bool get_Pss5_tpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_tw1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw1; if (!buffer.str().empty()) @@ -480,7 +490,8 @@ bool get_Pss5_tw1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_tw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw2; if (!buffer.str().empty()) @@ -494,7 +505,8 @@ bool get_Pss5_tw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_vadat(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vadat; if (!buffer.str().empty()) @@ -508,7 +520,8 @@ bool get_Pss5_vadat(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_vsmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmn; if (!buffer.str().empty()) @@ -522,7 +535,8 @@ bool get_Pss5_vsmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_vsmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmx; if (!buffer.str().empty()) @@ -534,8 +548,6 @@ bool get_Pss5_vsmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char Pss5::debugName[] = "Pss5"; const char* Pss5::debugString() const { @@ -544,28 +556,28 @@ const char* Pss5::debugString() const void Pss5::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Pss5"), &Pss5_factory)); + factory_map.emplace("cim:Pss5", &Pss5_factory); } void Pss5::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Pss5.ctw2"), &assign_Pss5_ctw2)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.deadband"), &assign_Pss5_deadband)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.isfreq"), &assign_Pss5_isfreq)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.kf"), &assign_Pss5_kf)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.kpe"), &assign_Pss5_kpe)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.kpss"), &assign_Pss5_kpss)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.pmm"), &assign_Pss5_pmm)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.tl1"), &assign_Pss5_tl1)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.tl2"), &assign_Pss5_tl2)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.tl3"), &assign_Pss5_tl3)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.tl4"), &assign_Pss5_tl4)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.tpe"), &assign_Pss5_tpe)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.tw1"), &assign_Pss5_tw1)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.tw2"), &assign_Pss5_tw2)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.vadat"), &assign_Pss5_vadat)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.vsmn"), &assign_Pss5_vsmn)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.vsmx"), &assign_Pss5_vsmx)); + assign_map.emplace("cim:Pss5.ctw2", &assign_Pss5_ctw2); + assign_map.emplace("cim:Pss5.deadband", &assign_Pss5_deadband); + assign_map.emplace("cim:Pss5.isfreq", &assign_Pss5_isfreq); + assign_map.emplace("cim:Pss5.kf", &assign_Pss5_kf); + assign_map.emplace("cim:Pss5.kpe", &assign_Pss5_kpe); + assign_map.emplace("cim:Pss5.kpss", &assign_Pss5_kpss); + assign_map.emplace("cim:Pss5.pmm", &assign_Pss5_pmm); + assign_map.emplace("cim:Pss5.tl1", &assign_Pss5_tl1); + assign_map.emplace("cim:Pss5.tl2", &assign_Pss5_tl2); + assign_map.emplace("cim:Pss5.tl3", &assign_Pss5_tl3); + assign_map.emplace("cim:Pss5.tl4", &assign_Pss5_tl4); + assign_map.emplace("cim:Pss5.tpe", &assign_Pss5_tpe); + assign_map.emplace("cim:Pss5.tw1", &assign_Pss5_tw1); + assign_map.emplace("cim:Pss5.tw2", &assign_Pss5_tw2); + assign_map.emplace("cim:Pss5.vadat", &assign_Pss5_vadat); + assign_map.emplace("cim:Pss5.vsmn", &assign_Pss5_vsmn); + assign_map.emplace("cim:Pss5.vsmx", &assign_Pss5_vsmx); } void Pss5::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/Pss5.hpp b/CGMES_2.4.13_18DEC2013/Pss5.hpp index 2f2c5a10c..9855524fa 100644 --- a/CGMES_2.4.13_18DEC2013/Pss5.hpp +++ b/CGMES_2.4.13_18DEC2013/Pss5.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Italian PSS - Detailed PSS. - */ + /** \brief Italian PSS - Detailed PSS. */ class Pss5 : public PowerSystemStabilizerDynamics { public: @@ -30,23 +28,56 @@ namespace CIMPP Pss5(); ~Pss5() override; - CIMPP::Boolean ctw2; /* Selector for Second washout enabling (C). true = second washout filter is bypassed false = second washout filter in use. Typical Value = true. Default: false */ - CIMPP::PU deadband; /* Stabilizer output dead band (DeadBand). Typical Value = 0. Default: nullptr */ - CIMPP::Boolean isfreq; /* Selector for Frequency/shaft speed input (IsFreq). true = speed false = frequency. Typical Value = true. Default: false */ - CIMPP::Simple_Float kf; /* Frequency/shaft speed input gain (K). Typical Value = 5. Default: nullptr */ - CIMPP::Simple_Float kpe; /* Electric power input gain (K). Typical Value = 0.3. Default: nullptr */ - CIMPP::Simple_Float kpss; /* PSS gain (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmm; /* Minimum power PSS enabling (P). Typical Value = 0.25. Default: nullptr */ - CIMPP::Seconds tl1; /* Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tl2; /* Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tl3; /* Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tl4; /* Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tpe; /* Electric power filter time constant (T). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds tw1; /* First WashOut (T). Typical Value = 3.5. Default: nullptr */ - CIMPP::Seconds tw2; /* Second WashOut (T). Typical Value = 0. Default: nullptr */ - CIMPP::Boolean vadat; /* Default: false */ - CIMPP::PU vsmn; /* Stabilizer output max limit (V). Typical Value = -0.1. Default: nullptr */ - CIMPP::PU vsmx; /* Stabilizer output min limit (V). Typical Value = 0.1. Default: nullptr */ + /** \brief Selector for Second washout enabling (C). true = second washout filter is bypassed false = second washout filter in use. Typical Value = true. Default: false */ + CIMPP::Boolean ctw2; + + /** \brief Stabilizer output dead band (DeadBand). Typical Value = 0. Default: nullptr */ + CIMPP::PU deadband; + + /** \brief Selector for Frequency/shaft speed input (IsFreq). true = speed false = frequency. Typical Value = true. Default: false */ + CIMPP::Boolean isfreq; + + /** \brief Frequency/shaft speed input gain (K). Typical Value = 5. Default: nullptr */ + CIMPP::Simple_Float kf; + + /** \brief Electric power input gain (K). Typical Value = 0.3. Default: nullptr */ + CIMPP::Simple_Float kpe; + + /** \brief PSS gain (K). Typical Value = 1. Default: nullptr */ + CIMPP::Simple_Float kpss; + + /** \brief Minimum power PSS enabling (P). Typical Value = 0.25. Default: nullptr */ + CIMPP::PU pmm; + + /** \brief Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tl1; + + /** \brief Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tl2; + + /** \brief Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tl3; + + /** \brief Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tl4; + + /** \brief Electric power filter time constant (T). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds tpe; + + /** \brief First WashOut (T). Typical Value = 3.5. Default: nullptr */ + CIMPP::Seconds tw1; + + /** \brief Second WashOut (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tw2; + + /** \brief Default: false */ + CIMPP::Boolean vadat; + + /** \brief Stabilizer output max limit (V). Typical Value = -0.1. Default: nullptr */ + CIMPP::PU vsmn; + + /** \brief Stabilizer output min limit (V). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU vsmx; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/PssELIN2.cpp b/CGMES_2.4.13_18DEC2013/PssELIN2.cpp index d7e853587..394cf185f 100644 --- a/CGMES_2.4.13_18DEC2013/PssELIN2.cpp +++ b/CGMES_2.4.13_18DEC2013/PssELIN2.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -PssELIN2::PssELIN2() {}; -PssELIN2::~PssELIN2() {}; +PssELIN2::PssELIN2() {} +PssELIN2::~PssELIN2() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ PssELIN2::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssELIN2_apss(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_apss(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->apss; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_ks1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_ks1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_ks2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_ks2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_ppss(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_ppss(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ppss; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_psslim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_psslim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->psslim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_ts1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_ts1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_ts2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_ts2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_ts3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_ts3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_ts4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_ts4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_ts5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_ts5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_ts6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_ts6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssELIN2_apss(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->apss; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_PssELIN2_apss(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssELIN2_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks1; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_PssELIN2_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssELIN2_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks2; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_PssELIN2_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssELIN2_ppss(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ppss; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_PssELIN2_ppss(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssELIN2_psslim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->psslim; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_PssELIN2_psslim(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_PssELIN2_ts1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts1; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_PssELIN2_ts1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssELIN2_ts2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts2; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_PssELIN2_ts2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssELIN2_ts3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts3; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_PssELIN2_ts3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssELIN2_ts4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts4; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_PssELIN2_ts4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssELIN2_ts5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts5; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_PssELIN2_ts5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssELIN2_ts6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts6; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_PssELIN2_ts6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char PssELIN2::debugName[] = "PssELIN2"; const char* PssELIN2::debugString() const { @@ -370,22 +376,22 @@ const char* PssELIN2::debugString() const void PssELIN2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssELIN2"), &PssELIN2_factory)); + factory_map.emplace("cim:PssELIN2", &PssELIN2_factory); } void PssELIN2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.apss"), &assign_PssELIN2_apss)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.ks1"), &assign_PssELIN2_ks1)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.ks2"), &assign_PssELIN2_ks2)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.ppss"), &assign_PssELIN2_ppss)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.psslim"), &assign_PssELIN2_psslim)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.ts1"), &assign_PssELIN2_ts1)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.ts2"), &assign_PssELIN2_ts2)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.ts3"), &assign_PssELIN2_ts3)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.ts4"), &assign_PssELIN2_ts4)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.ts5"), &assign_PssELIN2_ts5)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.ts6"), &assign_PssELIN2_ts6)); + assign_map.emplace("cim:PssELIN2.apss", &assign_PssELIN2_apss); + assign_map.emplace("cim:PssELIN2.ks1", &assign_PssELIN2_ks1); + assign_map.emplace("cim:PssELIN2.ks2", &assign_PssELIN2_ks2); + assign_map.emplace("cim:PssELIN2.ppss", &assign_PssELIN2_ppss); + assign_map.emplace("cim:PssELIN2.psslim", &assign_PssELIN2_psslim); + assign_map.emplace("cim:PssELIN2.ts1", &assign_PssELIN2_ts1); + assign_map.emplace("cim:PssELIN2.ts2", &assign_PssELIN2_ts2); + assign_map.emplace("cim:PssELIN2.ts3", &assign_PssELIN2_ts3); + assign_map.emplace("cim:PssELIN2.ts4", &assign_PssELIN2_ts4); + assign_map.emplace("cim:PssELIN2.ts5", &assign_PssELIN2_ts5); + assign_map.emplace("cim:PssELIN2.ts6", &assign_PssELIN2_ts6); } void PssELIN2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/PssELIN2.hpp b/CGMES_2.4.13_18DEC2013/PssELIN2.hpp index 082facadc..d5ebed820 100644 --- a/CGMES_2.4.13_18DEC2013/PssELIN2.hpp +++ b/CGMES_2.4.13_18DEC2013/PssELIN2.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Power system stabilizer typically associated with ExcELIN2 (though PssIEEE2B or Pss2B can also be used). - */ + /** \brief Power system stabilizer typically associated with ExcELIN2 (though PssIEEE2B or Pss2B can also be used). */ class PssELIN2 : public PowerSystemStabilizerDynamics { public: @@ -28,17 +26,38 @@ namespace CIMPP PssELIN2(); ~PssELIN2() override; - CIMPP::PU apss; /* Coefficient (a_PSS). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU ks1; /* Gain (Ks1). Typical Value = 1. Default: nullptr */ - CIMPP::PU ks2; /* Gain (Ks2). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU ppss; /* Coefficient (p_PSS) (>=0 and <=4). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU psslim; /* PSS limiter (psslim). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds ts1; /* Time constant (Ts1). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ts2; /* Time constant (Ts2). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds ts3; /* Time constant (Ts3). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds ts4; /* Time constant (Ts4). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds ts5; /* Time constant (Ts5). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ts6; /* Time constant (Ts6). Typical Value = 1. Default: nullptr */ + /** \brief Coefficient (a_PSS). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU apss; + + /** \brief Gain (Ks1). Typical Value = 1. Default: nullptr */ + CIMPP::PU ks1; + + /** \brief Gain (Ks2). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU ks2; + + /** \brief Coefficient (p_PSS) (>=0 and <=4). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU ppss; + + /** \brief PSS limiter (psslim). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU psslim; + + /** \brief Time constant (Ts1). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ts1; + + /** \brief Time constant (Ts2). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds ts2; + + /** \brief Time constant (Ts3). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds ts3; + + /** \brief Time constant (Ts4). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds ts4; + + /** \brief Time constant (Ts5). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ts5; + + /** \brief Time constant (Ts6). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds ts6; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/PssIEEE1A.cpp b/CGMES_2.4.13_18DEC2013/PssIEEE1A.cpp index c6de783ee..7387ba08e 100644 --- a/CGMES_2.4.13_18DEC2013/PssIEEE1A.cpp +++ b/CGMES_2.4.13_18DEC2013/PssIEEE1A.cpp @@ -8,23 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "InputSignalKind.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PssIEEE1A::PssIEEE1A() {}; -PssIEEE1A::~PssIEEE1A() {}; +PssIEEE1A::PssIEEE1A() {} +PssIEEE1A::~PssIEEE1A() {} static const std::list PossibleProfilesForClass = { @@ -62,168 +50,178 @@ PssIEEE1A::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssIEEE1A_a1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_a1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_a2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_a2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_inputSignalType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_inputSignalType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignalType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssIEEE1A_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a1; if (!buffer.str().empty()) @@ -237,7 +235,8 @@ bool get_PssIEEE1A_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE1A_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a2; if (!buffer.str().empty()) @@ -249,9 +248,25 @@ bool get_PssIEEE1A_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } +bool get_PssIEEE1A_inputSignalType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignalType; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_PssIEEE1A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -265,7 +280,8 @@ bool get_PssIEEE1A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE1A_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -279,7 +295,8 @@ bool get_PssIEEE1A_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE1A_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -293,7 +310,8 @@ bool get_PssIEEE1A_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE1A_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -307,7 +325,8 @@ bool get_PssIEEE1A_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE1A_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -321,7 +340,8 @@ bool get_PssIEEE1A_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE1A_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -335,7 +355,8 @@ bool get_PssIEEE1A_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE1A_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -349,7 +370,8 @@ bool get_PssIEEE1A_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -363,7 +385,8 @@ bool get_PssIEEE1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_PssIEEE1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -375,22 +398,6 @@ bool get_PssIEEE1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } - - -bool get_PssIEEE1A_inputSignalType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignalType; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char PssIEEE1A::debugName[] = "PssIEEE1A"; const char* PssIEEE1A::debugString() const { @@ -399,23 +406,23 @@ const char* PssIEEE1A::debugString() const void PssIEEE1A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssIEEE1A"), &PssIEEE1A_factory)); + factory_map.emplace("cim:PssIEEE1A", &PssIEEE1A_factory); } void PssIEEE1A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.a1"), &assign_PssIEEE1A_a1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.a2"), &assign_PssIEEE1A_a2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.inputSignalType"), &assign_PssIEEE1A_inputSignalType)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.ks"), &assign_PssIEEE1A_ks)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.t1"), &assign_PssIEEE1A_t1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.t2"), &assign_PssIEEE1A_t2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.t3"), &assign_PssIEEE1A_t3)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.t4"), &assign_PssIEEE1A_t4)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.t5"), &assign_PssIEEE1A_t5)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.t6"), &assign_PssIEEE1A_t6)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.vrmax"), &assign_PssIEEE1A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.vrmin"), &assign_PssIEEE1A_vrmin)); + assign_map.emplace("cim:PssIEEE1A.a1", &assign_PssIEEE1A_a1); + assign_map.emplace("cim:PssIEEE1A.a2", &assign_PssIEEE1A_a2); + assign_map.emplace("cim:PssIEEE1A.inputSignalType", &assign_PssIEEE1A_inputSignalType); + assign_map.emplace("cim:PssIEEE1A.ks", &assign_PssIEEE1A_ks); + assign_map.emplace("cim:PssIEEE1A.t1", &assign_PssIEEE1A_t1); + assign_map.emplace("cim:PssIEEE1A.t2", &assign_PssIEEE1A_t2); + assign_map.emplace("cim:PssIEEE1A.t3", &assign_PssIEEE1A_t3); + assign_map.emplace("cim:PssIEEE1A.t4", &assign_PssIEEE1A_t4); + assign_map.emplace("cim:PssIEEE1A.t5", &assign_PssIEEE1A_t5); + assign_map.emplace("cim:PssIEEE1A.t6", &assign_PssIEEE1A_t6); + assign_map.emplace("cim:PssIEEE1A.vrmax", &assign_PssIEEE1A_vrmax); + assign_map.emplace("cim:PssIEEE1A.vrmin", &assign_PssIEEE1A_vrmin); } void PssIEEE1A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/PssIEEE1A.hpp b/CGMES_2.4.13_18DEC2013/PssIEEE1A.hpp index cec8ba246..783b9d15e 100644 --- a/CGMES_2.4.13_18DEC2013/PssIEEE1A.hpp +++ b/CGMES_2.4.13_18DEC2013/PssIEEE1A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type PSS1A power system stabilizer model. PSS1A is the generalized form of a PSS with a single input. Some common stabilizer input signals are speed, frequency, and power. Reference: IEEE 1A 421.5-2005 Section 8.1. - */ + /** \brief The class represents IEEE Std 421.5-2005 type PSS1A power system stabilizer model. PSS1A is the generalized form of a PSS with a single input. Some common stabilizer input signals are speed, frequency, and power. Reference: IEEE 1A 421.5-2005 Section 8.1. */ class PssIEEE1A : public PowerSystemStabilizerDynamics { public: @@ -29,18 +27,41 @@ namespace CIMPP PssIEEE1A(); ~PssIEEE1A() override; - CIMPP::PU a1; /* PSS signal conditioning frequency filter constant (A1). Typical Value = 0.061. Default: nullptr */ - CIMPP::PU a2; /* PSS signal conditioning frequency filter constant (A2). Typical Value = 0.0017. Default: nullptr */ - CIMPP::InputSignalKind inputSignalType; /* Type of input signal. Typical Value = rotorAngularFrequencyDeviation. Default: 0 */ - CIMPP::PU ks; /* Stabilizer gain (Ks). Typical Value = 5. Default: nullptr */ - CIMPP::Seconds t1; /* Lead/lag time constant (T1). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds t2; /* Lead/lag time constant (T2). Typical Value = 0.03. Default: nullptr */ - CIMPP::Seconds t3; /* Lead/lag time constant (T3). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds t4; /* Lead/lag time constant (T4). Typical Value = 0.03. Default: nullptr */ - CIMPP::Seconds t5; /* Washout time constant (T5). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds t6; /* Transducer time constant (T6). Typical Value = 0.01. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum stabilizer output (Vrmax). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum stabilizer output (Vrmin). Typical Value = -0.05. Default: nullptr */ + /** \brief PSS signal conditioning frequency filter constant (A1). Typical Value = 0.061. Default: nullptr */ + CIMPP::PU a1; + + /** \brief PSS signal conditioning frequency filter constant (A2). Typical Value = 0.0017. Default: nullptr */ + CIMPP::PU a2; + + /** \brief Type of input signal. Typical Value = rotorAngularFrequencyDeviation. Default: 0 */ + CIMPP::InputSignalKind inputSignalType; + + /** \brief Stabilizer gain (Ks). Typical Value = 5. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Lead/lag time constant (T1). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Lead/lag time constant (T2). Typical Value = 0.03. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Lead/lag time constant (T3). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Lead/lag time constant (T4). Typical Value = 0.03. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Washout time constant (T5). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Transducer time constant (T6). Typical Value = 0.01. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Maximum stabilizer output (Vrmax). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum stabilizer output (Vrmin). Typical Value = -0.05. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/PssIEEE2B.cpp b/CGMES_2.4.13_18DEC2013/PssIEEE2B.cpp index 39ac7e801..7b46362be 100644 --- a/CGMES_2.4.13_18DEC2013/PssIEEE2B.cpp +++ b/CGMES_2.4.13_18DEC2013/PssIEEE2B.cpp @@ -8,38 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "InputSignalKind.hpp" -#include "InputSignalKind.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Integer.hpp" -#include "Integer.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PssIEEE2B::PssIEEE2B() {}; -PssIEEE2B::~PssIEEE2B() {}; +PssIEEE2B::PssIEEE2B() {} +PssIEEE2B::~PssIEEE2B() {} static const std::list PossibleProfilesForClass = { @@ -92,363 +65,418 @@ PssIEEE2B::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssIEEE2B_inputSignal1Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_inputSignal1Type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal1Type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_inputSignal2Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_inputSignal2Type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal2Type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_ks1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_ks1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_ks2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_ks2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_ks3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_ks3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_m(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_m(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->m; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_n(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_n(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->n; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t11(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t11; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_tw1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_tw1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_tw2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_tw2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_tw3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_tw3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_tw4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_tw4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_vsi1max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_vsi1max(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsi1max; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_vsi1min(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_vsi1min(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsi1min; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_vsi2max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_vsi2max(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsi2max; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_vsi2min(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_vsi2min(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsi2min; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_vstmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_vstmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vstmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_vstmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_vstmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vstmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } +bool get_PssIEEE2B_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignal1Type; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} +bool get_PssIEEE2B_inputSignal2Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignal2Type; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} bool get_PssIEEE2B_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks1; if (!buffer.str().empty()) @@ -462,7 +490,8 @@ bool get_PssIEEE2B_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE2B_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks2; if (!buffer.str().empty()) @@ -476,7 +505,8 @@ bool get_PssIEEE2B_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE2B_ks3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks3; if (!buffer.str().empty()) @@ -490,7 +520,8 @@ bool get_PssIEEE2B_ks3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE2B_m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->m; if (!buffer.str().empty()) @@ -504,7 +535,8 @@ bool get_PssIEEE2B_m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssIEEE2B_n(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->n; if (!buffer.str().empty()) @@ -518,7 +550,8 @@ bool get_PssIEEE2B_n(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssIEEE2B_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -532,7 +565,8 @@ bool get_PssIEEE2B_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE2B_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t10; if (!buffer.str().empty()) @@ -546,7 +580,8 @@ bool get_PssIEEE2B_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE2B_t11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t11; if (!buffer.str().empty()) @@ -560,7 +595,8 @@ bool get_PssIEEE2B_t11(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE2B_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -574,7 +610,8 @@ bool get_PssIEEE2B_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE2B_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -588,7 +625,8 @@ bool get_PssIEEE2B_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE2B_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -602,7 +640,8 @@ bool get_PssIEEE2B_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE2B_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -616,7 +655,8 @@ bool get_PssIEEE2B_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE2B_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t7; if (!buffer.str().empty()) @@ -630,7 +670,8 @@ bool get_PssIEEE2B_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE2B_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t8; if (!buffer.str().empty()) @@ -644,7 +685,8 @@ bool get_PssIEEE2B_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE2B_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t9; if (!buffer.str().empty()) @@ -658,7 +700,8 @@ bool get_PssIEEE2B_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE2B_tw1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw1; if (!buffer.str().empty()) @@ -672,7 +715,8 @@ bool get_PssIEEE2B_tw1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE2B_tw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw2; if (!buffer.str().empty()) @@ -686,7 +730,8 @@ bool get_PssIEEE2B_tw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE2B_tw3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw3; if (!buffer.str().empty()) @@ -700,7 +745,8 @@ bool get_PssIEEE2B_tw3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE2B_tw4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw4; if (!buffer.str().empty()) @@ -714,7 +760,8 @@ bool get_PssIEEE2B_tw4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE2B_vsi1max(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsi1max; if (!buffer.str().empty()) @@ -728,7 +775,8 @@ bool get_PssIEEE2B_vsi1max(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_PssIEEE2B_vsi1min(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsi1min; if (!buffer.str().empty()) @@ -742,7 +790,8 @@ bool get_PssIEEE2B_vsi1min(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_PssIEEE2B_vsi2max(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsi2max; if (!buffer.str().empty()) @@ -756,7 +805,8 @@ bool get_PssIEEE2B_vsi2max(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_PssIEEE2B_vsi2min(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsi2min; if (!buffer.str().empty()) @@ -770,7 +820,8 @@ bool get_PssIEEE2B_vsi2min(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_PssIEEE2B_vstmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vstmax; if (!buffer.str().empty()) @@ -784,7 +835,8 @@ bool get_PssIEEE2B_vstmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_PssIEEE2B_vstmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vstmin; if (!buffer.str().empty()) @@ -796,36 +848,6 @@ bool get_PssIEEE2B_vstmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - -bool get_PssIEEE2B_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignal1Type; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - -bool get_PssIEEE2B_inputSignal2Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignal2Type; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char PssIEEE2B::debugName[] = "PssIEEE2B"; const char* PssIEEE2B::debugString() const { @@ -834,38 +856,38 @@ const char* PssIEEE2B::debugString() const void PssIEEE2B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssIEEE2B"), &PssIEEE2B_factory)); + factory_map.emplace("cim:PssIEEE2B", &PssIEEE2B_factory); } void PssIEEE2B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.inputSignal1Type"), &assign_PssIEEE2B_inputSignal1Type)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.inputSignal2Type"), &assign_PssIEEE2B_inputSignal2Type)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.ks1"), &assign_PssIEEE2B_ks1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.ks2"), &assign_PssIEEE2B_ks2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.ks3"), &assign_PssIEEE2B_ks3)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.m"), &assign_PssIEEE2B_m)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.n"), &assign_PssIEEE2B_n)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t1"), &assign_PssIEEE2B_t1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t10"), &assign_PssIEEE2B_t10)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t11"), &assign_PssIEEE2B_t11)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t2"), &assign_PssIEEE2B_t2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t3"), &assign_PssIEEE2B_t3)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t4"), &assign_PssIEEE2B_t4)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t6"), &assign_PssIEEE2B_t6)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t7"), &assign_PssIEEE2B_t7)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t8"), &assign_PssIEEE2B_t8)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t9"), &assign_PssIEEE2B_t9)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.tw1"), &assign_PssIEEE2B_tw1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.tw2"), &assign_PssIEEE2B_tw2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.tw3"), &assign_PssIEEE2B_tw3)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.tw4"), &assign_PssIEEE2B_tw4)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.vsi1max"), &assign_PssIEEE2B_vsi1max)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.vsi1min"), &assign_PssIEEE2B_vsi1min)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.vsi2max"), &assign_PssIEEE2B_vsi2max)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.vsi2min"), &assign_PssIEEE2B_vsi2min)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.vstmax"), &assign_PssIEEE2B_vstmax)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.vstmin"), &assign_PssIEEE2B_vstmin)); + assign_map.emplace("cim:PssIEEE2B.inputSignal1Type", &assign_PssIEEE2B_inputSignal1Type); + assign_map.emplace("cim:PssIEEE2B.inputSignal2Type", &assign_PssIEEE2B_inputSignal2Type); + assign_map.emplace("cim:PssIEEE2B.ks1", &assign_PssIEEE2B_ks1); + assign_map.emplace("cim:PssIEEE2B.ks2", &assign_PssIEEE2B_ks2); + assign_map.emplace("cim:PssIEEE2B.ks3", &assign_PssIEEE2B_ks3); + assign_map.emplace("cim:PssIEEE2B.m", &assign_PssIEEE2B_m); + assign_map.emplace("cim:PssIEEE2B.n", &assign_PssIEEE2B_n); + assign_map.emplace("cim:PssIEEE2B.t1", &assign_PssIEEE2B_t1); + assign_map.emplace("cim:PssIEEE2B.t10", &assign_PssIEEE2B_t10); + assign_map.emplace("cim:PssIEEE2B.t11", &assign_PssIEEE2B_t11); + assign_map.emplace("cim:PssIEEE2B.t2", &assign_PssIEEE2B_t2); + assign_map.emplace("cim:PssIEEE2B.t3", &assign_PssIEEE2B_t3); + assign_map.emplace("cim:PssIEEE2B.t4", &assign_PssIEEE2B_t4); + assign_map.emplace("cim:PssIEEE2B.t6", &assign_PssIEEE2B_t6); + assign_map.emplace("cim:PssIEEE2B.t7", &assign_PssIEEE2B_t7); + assign_map.emplace("cim:PssIEEE2B.t8", &assign_PssIEEE2B_t8); + assign_map.emplace("cim:PssIEEE2B.t9", &assign_PssIEEE2B_t9); + assign_map.emplace("cim:PssIEEE2B.tw1", &assign_PssIEEE2B_tw1); + assign_map.emplace("cim:PssIEEE2B.tw2", &assign_PssIEEE2B_tw2); + assign_map.emplace("cim:PssIEEE2B.tw3", &assign_PssIEEE2B_tw3); + assign_map.emplace("cim:PssIEEE2B.tw4", &assign_PssIEEE2B_tw4); + assign_map.emplace("cim:PssIEEE2B.vsi1max", &assign_PssIEEE2B_vsi1max); + assign_map.emplace("cim:PssIEEE2B.vsi1min", &assign_PssIEEE2B_vsi1min); + assign_map.emplace("cim:PssIEEE2B.vsi2max", &assign_PssIEEE2B_vsi2max); + assign_map.emplace("cim:PssIEEE2B.vsi2min", &assign_PssIEEE2B_vsi2min); + assign_map.emplace("cim:PssIEEE2B.vstmax", &assign_PssIEEE2B_vstmax); + assign_map.emplace("cim:PssIEEE2B.vstmin", &assign_PssIEEE2B_vstmin); } void PssIEEE2B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/PssIEEE2B.hpp b/CGMES_2.4.13_18DEC2013/PssIEEE2B.hpp index b38886649..0a629b803 100644 --- a/CGMES_2.4.13_18DEC2013/PssIEEE2B.hpp +++ b/CGMES_2.4.13_18DEC2013/PssIEEE2B.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type PSS2B power system stabilizer model. This stabilizer model is designed to represent a variety of dual-input stabilizers, which normally use combinations of power and speed or frequency to derive the stabilizing signal. Reference: IEEE 2B 421.5-2005 Section 8.2. - */ + /** \brief The class represents IEEE Std 421.5-2005 type PSS2B power system stabilizer model. This stabilizer model is designed to represent a variety of dual-input stabilizers, which normally use combinations of power and speed or frequency to derive the stabilizing signal. Reference: IEEE 2B 421.5-2005 Section 8.2. */ class PssIEEE2B : public PowerSystemStabilizerDynamics { public: @@ -30,33 +28,86 @@ namespace CIMPP PssIEEE2B(); ~PssIEEE2B() override; - CIMPP::InputSignalKind inputSignal1Type; /* Type of input signal #1. Typical Value = rotorSpeed. Default: 0 */ - CIMPP::InputSignalKind inputSignal2Type; /* Type of input signal #2. Typical Value = generatorElectricalPower. Default: 0 */ - CIMPP::PU ks1; /* Stabilizer gain (Ks1). Typical Value = 12. Default: nullptr */ - CIMPP::PU ks2; /* Gain on signal #2 (Ks2). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU ks3; /* Gain on signal #2 input before ramp-tracking filter (Ks3). Typical Value = 1. Default: nullptr */ - CIMPP::Integer m; /* Denominator order of ramp tracking filter (M). Typical Value = 5. Default: 0 */ - CIMPP::Integer n; /* Order of ramp tracking filter (N). Typical Value = 1. Default: 0 */ - CIMPP::Seconds t1; /* Lead/lag time constant (T1). Typical Value = 0.12. Default: nullptr */ - CIMPP::Seconds t10; /* Lead/lag time constant (T10). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t11; /* Lead/lag time constant (T11). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t2; /* Lead/lag time constant (T2). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds t3; /* Lead/lag time constant (T3). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds t4; /* Lead/lag time constant (T4). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds t6; /* Time constant on signal #1 (T6). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t7; /* Time constant on signal #2 (T7). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds t8; /* Lead of ramp tracking filter (T8). Typical Value = 0.2. Default: nullptr */ - CIMPP::Seconds t9; /* Lag of ramp tracking filter (T9). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tw1; /* First washout on signal #1 (Tw1). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds tw2; /* Second washout on signal #1 (Tw2). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds tw3; /* First washout on signal #2 (Tw3). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds tw4; /* Second washout on signal #2 (Tw4). Typical Value = 0. Default: nullptr */ - CIMPP::PU vsi1max; /* Input signal #1 max limit (Vsi1max). Typical Value = 2. Default: nullptr */ - CIMPP::PU vsi1min; /* Input signal #1 min limit (Vsi1min). Typical Value = -2. Default: nullptr */ - CIMPP::PU vsi2max; /* Input signal #2 max limit (Vsi2max). Typical Value = 2. Default: nullptr */ - CIMPP::PU vsi2min; /* Input signal #2 min limit (Vsi2min). Typical Value = -2. Default: nullptr */ - CIMPP::PU vstmax; /* Stabilizer output max limit (Vstmax). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU vstmin; /* Stabilizer output min limit (Vstmin). Typical Value = -0.1. Default: nullptr */ + /** \brief Type of input signal #1. Typical Value = rotorSpeed. Default: 0 */ + CIMPP::InputSignalKind inputSignal1Type; + + /** \brief Type of input signal #2. Typical Value = generatorElectricalPower. Default: 0 */ + CIMPP::InputSignalKind inputSignal2Type; + + /** \brief Stabilizer gain (Ks1). Typical Value = 12. Default: nullptr */ + CIMPP::PU ks1; + + /** \brief Gain on signal #2 (Ks2). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU ks2; + + /** \brief Gain on signal #2 input before ramp-tracking filter (Ks3). Typical Value = 1. Default: nullptr */ + CIMPP::PU ks3; + + /** \brief Denominator order of ramp tracking filter (M). Typical Value = 5. Default: 0 */ + CIMPP::Integer m; + + /** \brief Order of ramp tracking filter (N). Typical Value = 1. Default: 0 */ + CIMPP::Integer n; + + /** \brief Lead/lag time constant (T1). Typical Value = 0.12. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Lead/lag time constant (T10). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t10; + + /** \brief Lead/lag time constant (T11). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t11; + + /** \brief Lead/lag time constant (T2). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Lead/lag time constant (T3). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Lead/lag time constant (T4). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant on signal #1 (T6). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time constant on signal #2 (T7). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds t7; + + /** \brief Lead of ramp tracking filter (T8). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds t8; + + /** \brief Lag of ramp tracking filter (T9). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t9; + + /** \brief First washout on signal #1 (Tw1). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds tw1; + + /** \brief Second washout on signal #1 (Tw2). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds tw2; + + /** \brief First washout on signal #2 (Tw3). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds tw3; + + /** \brief Second washout on signal #2 (Tw4). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tw4; + + /** \brief Input signal #1 max limit (Vsi1max). Typical Value = 2. Default: nullptr */ + CIMPP::PU vsi1max; + + /** \brief Input signal #1 min limit (Vsi1min). Typical Value = -2. Default: nullptr */ + CIMPP::PU vsi1min; + + /** \brief Input signal #2 max limit (Vsi2max). Typical Value = 2. Default: nullptr */ + CIMPP::PU vsi2max; + + /** \brief Input signal #2 min limit (Vsi2min). Typical Value = -2. Default: nullptr */ + CIMPP::PU vsi2min; + + /** \brief Stabilizer output max limit (Vstmax). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU vstmax; + + /** \brief Stabilizer output min limit (Vstmin). Typical Value = -0.1. Default: nullptr */ + CIMPP::PU vstmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/PssIEEE3B.cpp b/CGMES_2.4.13_18DEC2013/PssIEEE3B.cpp index 8fc5552af..f4cf47980 100644 --- a/CGMES_2.4.13_18DEC2013/PssIEEE3B.cpp +++ b/CGMES_2.4.13_18DEC2013/PssIEEE3B.cpp @@ -8,30 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "InputSignalKind.hpp" -#include "InputSignalKind.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PssIEEE3B::PssIEEE3B() {}; -PssIEEE3B::~PssIEEE3B() {}; +PssIEEE3B::PssIEEE3B() {} +PssIEEE3B::~PssIEEE3B() {} static const std::list PossibleProfilesForClass = { @@ -76,259 +57,276 @@ PssIEEE3B::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssIEEE3B_a1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_a1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_a2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_a2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_a3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_a3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_a4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_a4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_a5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_a5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_a6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_a6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_a7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_a7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_a8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_a8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_inputSignal1Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_inputSignal1Type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal1Type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_inputSignal2Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_inputSignal2Type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal2Type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_ks1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_ks1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_ks2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_ks2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_tw1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_tw1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_tw2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_tw2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_tw3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_tw3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_vstmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_vstmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vstmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_vstmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_vstmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vstmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssIEEE3B_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a1; if (!buffer.str().empty()) @@ -342,7 +340,8 @@ bool get_PssIEEE3B_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE3B_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a2; if (!buffer.str().empty()) @@ -356,7 +355,8 @@ bool get_PssIEEE3B_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE3B_a3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a3; if (!buffer.str().empty()) @@ -370,7 +370,8 @@ bool get_PssIEEE3B_a3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE3B_a4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a4; if (!buffer.str().empty()) @@ -384,7 +385,8 @@ bool get_PssIEEE3B_a4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE3B_a5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a5; if (!buffer.str().empty()) @@ -398,7 +400,8 @@ bool get_PssIEEE3B_a5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE3B_a6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a6; if (!buffer.str().empty()) @@ -412,7 +415,8 @@ bool get_PssIEEE3B_a6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE3B_a7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a7; if (!buffer.str().empty()) @@ -426,7 +430,8 @@ bool get_PssIEEE3B_a7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE3B_a8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a8; if (!buffer.str().empty()) @@ -438,11 +443,12 @@ bool get_PssIEEE3B_a8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } -bool get_PssIEEE3B_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_PssIEEE3B_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->ks1; + buffer << element->inputSignal1Type; if (!buffer.str().empty()) { return true; @@ -452,11 +458,12 @@ bool get_PssIEEE3B_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } -bool get_PssIEEE3B_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_PssIEEE3B_inputSignal2Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->ks2; + buffer << element->inputSignal2Type; if (!buffer.str().empty()) { return true; @@ -466,11 +473,12 @@ bool get_PssIEEE3B_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } -bool get_PssIEEE3B_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_PssIEEE3B_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->t1; + buffer << element->ks1; if (!buffer.str().empty()) { return true; @@ -480,11 +488,12 @@ bool get_PssIEEE3B_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } -bool get_PssIEEE3B_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_PssIEEE3B_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->t2; + buffer << element->ks2; if (!buffer.str().empty()) { return true; @@ -494,11 +503,12 @@ bool get_PssIEEE3B_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } -bool get_PssIEEE3B_tw1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_PssIEEE3B_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tw1; + buffer << element->t1; if (!buffer.str().empty()) { return true; @@ -508,11 +518,12 @@ bool get_PssIEEE3B_tw1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } -bool get_PssIEEE3B_tw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_PssIEEE3B_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tw2; + buffer << element->t2; if (!buffer.str().empty()) { return true; @@ -522,11 +533,12 @@ bool get_PssIEEE3B_tw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } -bool get_PssIEEE3B_tw3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_PssIEEE3B_tw1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tw3; + buffer << element->tw1; if (!buffer.str().empty()) { return true; @@ -536,11 +548,12 @@ bool get_PssIEEE3B_tw3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } -bool get_PssIEEE3B_vstmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_PssIEEE3B_tw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vstmax; + buffer << element->tw2; if (!buffer.str().empty()) { return true; @@ -550,11 +563,12 @@ bool get_PssIEEE3B_vstmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } -bool get_PssIEEE3B_vstmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_PssIEEE3B_tw3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vstmin; + buffer << element->tw3; if (!buffer.str().empty()) { return true; @@ -564,13 +578,12 @@ bool get_PssIEEE3B_vstmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - -bool get_PssIEEE3B_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_PssIEEE3B_vstmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->inputSignal1Type; + buffer << element->vstmax; if (!buffer.str().empty()) { return true; @@ -580,11 +593,12 @@ bool get_PssIEEE3B_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::string return false; } -bool get_PssIEEE3B_inputSignal2Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_PssIEEE3B_vstmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->inputSignal2Type; + buffer << element->vstmin; if (!buffer.str().empty()) { return true; @@ -602,30 +616,30 @@ const char* PssIEEE3B::debugString() const void PssIEEE3B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssIEEE3B"), &PssIEEE3B_factory)); + factory_map.emplace("cim:PssIEEE3B", &PssIEEE3B_factory); } void PssIEEE3B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.a1"), &assign_PssIEEE3B_a1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.a2"), &assign_PssIEEE3B_a2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.a3"), &assign_PssIEEE3B_a3)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.a4"), &assign_PssIEEE3B_a4)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.a5"), &assign_PssIEEE3B_a5)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.a6"), &assign_PssIEEE3B_a6)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.a7"), &assign_PssIEEE3B_a7)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.a8"), &assign_PssIEEE3B_a8)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.inputSignal1Type"), &assign_PssIEEE3B_inputSignal1Type)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.inputSignal2Type"), &assign_PssIEEE3B_inputSignal2Type)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.ks1"), &assign_PssIEEE3B_ks1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.ks2"), &assign_PssIEEE3B_ks2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.t1"), &assign_PssIEEE3B_t1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.t2"), &assign_PssIEEE3B_t2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.tw1"), &assign_PssIEEE3B_tw1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.tw2"), &assign_PssIEEE3B_tw2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.tw3"), &assign_PssIEEE3B_tw3)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.vstmax"), &assign_PssIEEE3B_vstmax)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.vstmin"), &assign_PssIEEE3B_vstmin)); + assign_map.emplace("cim:PssIEEE3B.a1", &assign_PssIEEE3B_a1); + assign_map.emplace("cim:PssIEEE3B.a2", &assign_PssIEEE3B_a2); + assign_map.emplace("cim:PssIEEE3B.a3", &assign_PssIEEE3B_a3); + assign_map.emplace("cim:PssIEEE3B.a4", &assign_PssIEEE3B_a4); + assign_map.emplace("cim:PssIEEE3B.a5", &assign_PssIEEE3B_a5); + assign_map.emplace("cim:PssIEEE3B.a6", &assign_PssIEEE3B_a6); + assign_map.emplace("cim:PssIEEE3B.a7", &assign_PssIEEE3B_a7); + assign_map.emplace("cim:PssIEEE3B.a8", &assign_PssIEEE3B_a8); + assign_map.emplace("cim:PssIEEE3B.inputSignal1Type", &assign_PssIEEE3B_inputSignal1Type); + assign_map.emplace("cim:PssIEEE3B.inputSignal2Type", &assign_PssIEEE3B_inputSignal2Type); + assign_map.emplace("cim:PssIEEE3B.ks1", &assign_PssIEEE3B_ks1); + assign_map.emplace("cim:PssIEEE3B.ks2", &assign_PssIEEE3B_ks2); + assign_map.emplace("cim:PssIEEE3B.t1", &assign_PssIEEE3B_t1); + assign_map.emplace("cim:PssIEEE3B.t2", &assign_PssIEEE3B_t2); + assign_map.emplace("cim:PssIEEE3B.tw1", &assign_PssIEEE3B_tw1); + assign_map.emplace("cim:PssIEEE3B.tw2", &assign_PssIEEE3B_tw2); + assign_map.emplace("cim:PssIEEE3B.tw3", &assign_PssIEEE3B_tw3); + assign_map.emplace("cim:PssIEEE3B.vstmax", &assign_PssIEEE3B_vstmax); + assign_map.emplace("cim:PssIEEE3B.vstmin", &assign_PssIEEE3B_vstmin); } void PssIEEE3B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/PssIEEE3B.hpp b/CGMES_2.4.13_18DEC2013/PssIEEE3B.hpp index 98e5144a8..8f5a867f9 100644 --- a/CGMES_2.4.13_18DEC2013/PssIEEE3B.hpp +++ b/CGMES_2.4.13_18DEC2013/PssIEEE3B.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type PSS3B power system stabilizer model. The PSS model PSS3B has dual inputs of electrical power and rotor angular frequency deviation. The signals are used to derive an equivalent mechanical power signal. Reference: IEEE 3B 421.5-2005 Section 8.3. - */ + /** \brief The class represents IEEE Std 421.5-2005 type PSS3B power system stabilizer model. The PSS model PSS3B has dual inputs of electrical power and rotor angular frequency deviation. The signals are used to derive an equivalent mechanical power signal. Reference: IEEE 3B 421.5-2005 Section 8.3. */ class PssIEEE3B : public PowerSystemStabilizerDynamics { public: @@ -29,25 +27,62 @@ namespace CIMPP PssIEEE3B(); ~PssIEEE3B() override; - CIMPP::PU a1; /* Notch filter parameter (A1). Typical Value = 0.359. Default: nullptr */ - CIMPP::PU a2; /* Notch filter parameter (A2). Typical Value = 0.586. Default: nullptr */ - CIMPP::PU a3; /* Notch filter parameter (A3). Typical Value = 0.429. Default: nullptr */ - CIMPP::PU a4; /* Notch filter parameter (A4). Typical Value = 0.564. Default: nullptr */ - CIMPP::PU a5; /* Notch filter parameter (A5). Typical Value = 0.001. Default: nullptr */ - CIMPP::PU a6; /* Notch filter parameter (A6). Typical Value = 0. Default: nullptr */ - CIMPP::PU a7; /* Notch filter parameter (A7). Typical Value = 0.031. Default: nullptr */ - CIMPP::PU a8; /* Notch filter parameter (A8). Typical Value = 0. Default: nullptr */ - CIMPP::InputSignalKind inputSignal1Type; /* Type of input signal #1. Typical Value = generatorElectricalPower. Default: 0 */ - CIMPP::InputSignalKind inputSignal2Type; /* Type of input signal #2. Typical Value = rotorSpeed. Default: 0 */ - CIMPP::PU ks1; /* Gain on signal # 1 (Ks1). Typical Value = -0.602. Default: nullptr */ - CIMPP::PU ks2; /* Gain on signal # 2 (Ks2). Typical Value = 30.12. Default: nullptr */ - CIMPP::Seconds t1; /* Transducer time constant (T1). Typical Value = 0.012. Default: nullptr */ - CIMPP::Seconds t2; /* Transducer time constant (T2). Typical Value = 0.012. Default: nullptr */ - CIMPP::Seconds tw1; /* Washout time constant (Tw1). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds tw2; /* Washout time constant (Tw2). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds tw3; /* Washout time constant (Tw3). Typical Value = 0.6. Default: nullptr */ - CIMPP::PU vstmax; /* Stabilizer output max limit (Vstmax). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU vstmin; /* Stabilizer output min limit (Vstmin). Typical Value = -0.1. Default: nullptr */ + /** \brief Notch filter parameter (A1). Typical Value = 0.359. Default: nullptr */ + CIMPP::PU a1; + + /** \brief Notch filter parameter (A2). Typical Value = 0.586. Default: nullptr */ + CIMPP::PU a2; + + /** \brief Notch filter parameter (A3). Typical Value = 0.429. Default: nullptr */ + CIMPP::PU a3; + + /** \brief Notch filter parameter (A4). Typical Value = 0.564. Default: nullptr */ + CIMPP::PU a4; + + /** \brief Notch filter parameter (A5). Typical Value = 0.001. Default: nullptr */ + CIMPP::PU a5; + + /** \brief Notch filter parameter (A6). Typical Value = 0. Default: nullptr */ + CIMPP::PU a6; + + /** \brief Notch filter parameter (A7). Typical Value = 0.031. Default: nullptr */ + CIMPP::PU a7; + + /** \brief Notch filter parameter (A8). Typical Value = 0. Default: nullptr */ + CIMPP::PU a8; + + /** \brief Type of input signal #1. Typical Value = generatorElectricalPower. Default: 0 */ + CIMPP::InputSignalKind inputSignal1Type; + + /** \brief Type of input signal #2. Typical Value = rotorSpeed. Default: 0 */ + CIMPP::InputSignalKind inputSignal2Type; + + /** \brief Gain on signal # 1 (Ks1). Typical Value = -0.602. Default: nullptr */ + CIMPP::PU ks1; + + /** \brief Gain on signal # 2 (Ks2). Typical Value = 30.12. Default: nullptr */ + CIMPP::PU ks2; + + /** \brief Transducer time constant (T1). Typical Value = 0.012. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Transducer time constant (T2). Typical Value = 0.012. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Washout time constant (Tw1). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds tw1; + + /** \brief Washout time constant (Tw2). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds tw2; + + /** \brief Washout time constant (Tw3). Typical Value = 0.6. Default: nullptr */ + CIMPP::Seconds tw3; + + /** \brief Stabilizer output max limit (Vstmax). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU vstmax; + + /** \brief Stabilizer output min limit (Vstmin). Typical Value = -0.1. Default: nullptr */ + CIMPP::PU vstmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/PssIEEE4B.cpp b/CGMES_2.4.13_18DEC2013/PssIEEE4B.cpp index 6e02a3798..34e2cae91 100644 --- a/CGMES_2.4.13_18DEC2013/PssIEEE4B.cpp +++ b/CGMES_2.4.13_18DEC2013/PssIEEE4B.cpp @@ -8,72 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PssIEEE4B::PssIEEE4B() {}; -PssIEEE4B::~PssIEEE4B() {}; +PssIEEE4B::PssIEEE4B() {} +PssIEEE4B::~PssIEEE4B() {} static const std::list PossibleProfilesForClass = { @@ -160,805 +99,864 @@ PssIEEE4B::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssIEEE4B_bwi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_bwi(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bwi; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kh1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kh1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kh11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kh11(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh11; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kh17(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kh17(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh17; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kh2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kh2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ki1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ki1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ki11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ki11(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki11; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ki17(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ki17(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki17; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ki2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ki2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kl1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kl11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kl11(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl11; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kl17(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kl17(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl17; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kl2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_omegani(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_omegani(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->omegani; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th11(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th11; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti11(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti11; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl11(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl11; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_vhmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_vhmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vhmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_vhmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_vhmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vhmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_vimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_vlmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_vlmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vlmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_vlmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_vlmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vlmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_vstmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_vstmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vstmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_vstmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_vstmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vstmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssIEEE4B_bwi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bwi; if (!buffer.str().empty()) @@ -972,7 +970,8 @@ bool get_PssIEEE4B_bwi(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh; if (!buffer.str().empty()) @@ -986,7 +985,8 @@ bool get_PssIEEE4B_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE4B_kh1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh1; if (!buffer.str().empty()) @@ -1000,7 +1000,8 @@ bool get_PssIEEE4B_kh1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_kh11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh11; if (!buffer.str().empty()) @@ -1014,7 +1015,8 @@ bool get_PssIEEE4B_kh11(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_kh17(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh17; if (!buffer.str().empty()) @@ -1028,7 +1030,8 @@ bool get_PssIEEE4B_kh17(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_kh2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh2; if (!buffer.str().empty()) @@ -1042,7 +1045,8 @@ bool get_PssIEEE4B_kh2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -1056,7 +1060,8 @@ bool get_PssIEEE4B_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE4B_ki1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki1; if (!buffer.str().empty()) @@ -1070,7 +1075,8 @@ bool get_PssIEEE4B_ki1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ki11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki11; if (!buffer.str().empty()) @@ -1084,7 +1090,8 @@ bool get_PssIEEE4B_ki11(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_ki17(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki17; if (!buffer.str().empty()) @@ -1098,7 +1105,8 @@ bool get_PssIEEE4B_ki17(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_ki2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki2; if (!buffer.str().empty()) @@ -1112,7 +1120,8 @@ bool get_PssIEEE4B_ki2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl; if (!buffer.str().empty()) @@ -1126,7 +1135,8 @@ bool get_PssIEEE4B_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE4B_kl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl1; if (!buffer.str().empty()) @@ -1140,7 +1150,8 @@ bool get_PssIEEE4B_kl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_kl11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl11; if (!buffer.str().empty()) @@ -1154,7 +1165,8 @@ bool get_PssIEEE4B_kl11(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_kl17(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl17; if (!buffer.str().empty()) @@ -1168,7 +1180,8 @@ bool get_PssIEEE4B_kl17(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_kl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl2; if (!buffer.str().empty()) @@ -1182,7 +1195,8 @@ bool get_PssIEEE4B_kl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_omegani(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->omegani; if (!buffer.str().empty()) @@ -1196,7 +1210,8 @@ bool get_PssIEEE4B_omegani(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_PssIEEE4B_th1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th1; if (!buffer.str().empty()) @@ -1210,7 +1225,8 @@ bool get_PssIEEE4B_th1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_th10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th10; if (!buffer.str().empty()) @@ -1224,7 +1240,8 @@ bool get_PssIEEE4B_th10(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_th11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th11; if (!buffer.str().empty()) @@ -1238,7 +1255,8 @@ bool get_PssIEEE4B_th11(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_th12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th12; if (!buffer.str().empty()) @@ -1252,7 +1270,8 @@ bool get_PssIEEE4B_th12(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_th2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th2; if (!buffer.str().empty()) @@ -1266,7 +1285,8 @@ bool get_PssIEEE4B_th2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_th3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th3; if (!buffer.str().empty()) @@ -1280,7 +1300,8 @@ bool get_PssIEEE4B_th3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_th4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th4; if (!buffer.str().empty()) @@ -1294,7 +1315,8 @@ bool get_PssIEEE4B_th4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_th5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th5; if (!buffer.str().empty()) @@ -1308,7 +1330,8 @@ bool get_PssIEEE4B_th5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_th6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th6; if (!buffer.str().empty()) @@ -1322,7 +1345,8 @@ bool get_PssIEEE4B_th6(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_th7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th7; if (!buffer.str().empty()) @@ -1336,7 +1360,8 @@ bool get_PssIEEE4B_th7(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_th8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th8; if (!buffer.str().empty()) @@ -1350,7 +1375,8 @@ bool get_PssIEEE4B_th8(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_th9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th9; if (!buffer.str().empty()) @@ -1364,7 +1390,8 @@ bool get_PssIEEE4B_th9(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ti1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti1; if (!buffer.str().empty()) @@ -1378,7 +1405,8 @@ bool get_PssIEEE4B_ti1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ti10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti10; if (!buffer.str().empty()) @@ -1392,7 +1420,8 @@ bool get_PssIEEE4B_ti10(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_ti11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti11; if (!buffer.str().empty()) @@ -1406,7 +1435,8 @@ bool get_PssIEEE4B_ti11(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_ti12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti12; if (!buffer.str().empty()) @@ -1420,7 +1450,8 @@ bool get_PssIEEE4B_ti12(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_ti2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti2; if (!buffer.str().empty()) @@ -1434,7 +1465,8 @@ bool get_PssIEEE4B_ti2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ti3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti3; if (!buffer.str().empty()) @@ -1448,7 +1480,8 @@ bool get_PssIEEE4B_ti3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ti4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti4; if (!buffer.str().empty()) @@ -1462,7 +1495,8 @@ bool get_PssIEEE4B_ti4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ti5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti5; if (!buffer.str().empty()) @@ -1476,7 +1510,8 @@ bool get_PssIEEE4B_ti5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ti6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti6; if (!buffer.str().empty()) @@ -1490,7 +1525,8 @@ bool get_PssIEEE4B_ti6(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ti7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti7; if (!buffer.str().empty()) @@ -1504,7 +1540,8 @@ bool get_PssIEEE4B_ti7(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ti8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti8; if (!buffer.str().empty()) @@ -1518,7 +1555,8 @@ bool get_PssIEEE4B_ti8(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ti9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti9; if (!buffer.str().empty()) @@ -1532,7 +1570,8 @@ bool get_PssIEEE4B_ti9(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_tl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl1; if (!buffer.str().empty()) @@ -1546,7 +1585,8 @@ bool get_PssIEEE4B_tl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_tl10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl10; if (!buffer.str().empty()) @@ -1560,7 +1600,8 @@ bool get_PssIEEE4B_tl10(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_tl11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl11; if (!buffer.str().empty()) @@ -1574,7 +1615,8 @@ bool get_PssIEEE4B_tl11(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_tl12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl12; if (!buffer.str().empty()) @@ -1588,7 +1630,8 @@ bool get_PssIEEE4B_tl12(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_tl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl2; if (!buffer.str().empty()) @@ -1602,7 +1645,8 @@ bool get_PssIEEE4B_tl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_tl3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl3; if (!buffer.str().empty()) @@ -1616,7 +1660,8 @@ bool get_PssIEEE4B_tl3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_tl4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl4; if (!buffer.str().empty()) @@ -1630,7 +1675,8 @@ bool get_PssIEEE4B_tl4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_tl5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl5; if (!buffer.str().empty()) @@ -1644,7 +1690,8 @@ bool get_PssIEEE4B_tl5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_tl6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl6; if (!buffer.str().empty()) @@ -1658,7 +1705,8 @@ bool get_PssIEEE4B_tl6(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_tl7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl7; if (!buffer.str().empty()) @@ -1672,7 +1720,8 @@ bool get_PssIEEE4B_tl7(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_tl8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl8; if (!buffer.str().empty()) @@ -1686,7 +1735,8 @@ bool get_PssIEEE4B_tl8(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_tl9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl9; if (!buffer.str().empty()) @@ -1700,7 +1750,8 @@ bool get_PssIEEE4B_tl9(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_vhmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vhmax; if (!buffer.str().empty()) @@ -1714,7 +1765,8 @@ bool get_PssIEEE4B_vhmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_PssIEEE4B_vhmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vhmin; if (!buffer.str().empty()) @@ -1728,7 +1780,8 @@ bool get_PssIEEE4B_vhmin(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_PssIEEE4B_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -1742,7 +1795,8 @@ bool get_PssIEEE4B_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_PssIEEE4B_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimin; if (!buffer.str().empty()) @@ -1756,7 +1810,8 @@ bool get_PssIEEE4B_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_PssIEEE4B_vlmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vlmax; if (!buffer.str().empty()) @@ -1770,7 +1825,8 @@ bool get_PssIEEE4B_vlmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_PssIEEE4B_vlmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vlmin; if (!buffer.str().empty()) @@ -1784,7 +1840,8 @@ bool get_PssIEEE4B_vlmin(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_PssIEEE4B_vstmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vstmax; if (!buffer.str().empty()) @@ -1798,7 +1855,8 @@ bool get_PssIEEE4B_vstmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_PssIEEE4B_vstmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vstmin; if (!buffer.str().empty()) @@ -1810,8 +1868,6 @@ bool get_PssIEEE4B_vstmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char PssIEEE4B::debugName[] = "PssIEEE4B"; const char* PssIEEE4B::debugString() const { @@ -1820,72 +1876,72 @@ const char* PssIEEE4B::debugString() const void PssIEEE4B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssIEEE4B"), &PssIEEE4B_factory)); + factory_map.emplace("cim:PssIEEE4B", &PssIEEE4B_factory); } void PssIEEE4B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.bwi"), &assign_PssIEEE4B_bwi)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kh"), &assign_PssIEEE4B_kh)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kh1"), &assign_PssIEEE4B_kh1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kh11"), &assign_PssIEEE4B_kh11)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kh17"), &assign_PssIEEE4B_kh17)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kh2"), &assign_PssIEEE4B_kh2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ki"), &assign_PssIEEE4B_ki)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ki1"), &assign_PssIEEE4B_ki1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ki11"), &assign_PssIEEE4B_ki11)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ki17"), &assign_PssIEEE4B_ki17)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ki2"), &assign_PssIEEE4B_ki2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kl"), &assign_PssIEEE4B_kl)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kl1"), &assign_PssIEEE4B_kl1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kl11"), &assign_PssIEEE4B_kl11)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kl17"), &assign_PssIEEE4B_kl17)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kl2"), &assign_PssIEEE4B_kl2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.omegani"), &assign_PssIEEE4B_omegani)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th1"), &assign_PssIEEE4B_th1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th10"), &assign_PssIEEE4B_th10)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th11"), &assign_PssIEEE4B_th11)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th12"), &assign_PssIEEE4B_th12)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th2"), &assign_PssIEEE4B_th2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th3"), &assign_PssIEEE4B_th3)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th4"), &assign_PssIEEE4B_th4)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th5"), &assign_PssIEEE4B_th5)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th6"), &assign_PssIEEE4B_th6)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th7"), &assign_PssIEEE4B_th7)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th8"), &assign_PssIEEE4B_th8)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th9"), &assign_PssIEEE4B_th9)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti1"), &assign_PssIEEE4B_ti1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti10"), &assign_PssIEEE4B_ti10)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti11"), &assign_PssIEEE4B_ti11)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti12"), &assign_PssIEEE4B_ti12)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti2"), &assign_PssIEEE4B_ti2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti3"), &assign_PssIEEE4B_ti3)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti4"), &assign_PssIEEE4B_ti4)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti5"), &assign_PssIEEE4B_ti5)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti6"), &assign_PssIEEE4B_ti6)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti7"), &assign_PssIEEE4B_ti7)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti8"), &assign_PssIEEE4B_ti8)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti9"), &assign_PssIEEE4B_ti9)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl1"), &assign_PssIEEE4B_tl1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl10"), &assign_PssIEEE4B_tl10)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl11"), &assign_PssIEEE4B_tl11)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl12"), &assign_PssIEEE4B_tl12)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl2"), &assign_PssIEEE4B_tl2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl3"), &assign_PssIEEE4B_tl3)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl4"), &assign_PssIEEE4B_tl4)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl5"), &assign_PssIEEE4B_tl5)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl6"), &assign_PssIEEE4B_tl6)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl7"), &assign_PssIEEE4B_tl7)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl8"), &assign_PssIEEE4B_tl8)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl9"), &assign_PssIEEE4B_tl9)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.vhmax"), &assign_PssIEEE4B_vhmax)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.vhmin"), &assign_PssIEEE4B_vhmin)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.vimax"), &assign_PssIEEE4B_vimax)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.vimin"), &assign_PssIEEE4B_vimin)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.vlmax"), &assign_PssIEEE4B_vlmax)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.vlmin"), &assign_PssIEEE4B_vlmin)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.vstmax"), &assign_PssIEEE4B_vstmax)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.vstmin"), &assign_PssIEEE4B_vstmin)); + assign_map.emplace("cim:PssIEEE4B.bwi", &assign_PssIEEE4B_bwi); + assign_map.emplace("cim:PssIEEE4B.kh", &assign_PssIEEE4B_kh); + assign_map.emplace("cim:PssIEEE4B.kh1", &assign_PssIEEE4B_kh1); + assign_map.emplace("cim:PssIEEE4B.kh11", &assign_PssIEEE4B_kh11); + assign_map.emplace("cim:PssIEEE4B.kh17", &assign_PssIEEE4B_kh17); + assign_map.emplace("cim:PssIEEE4B.kh2", &assign_PssIEEE4B_kh2); + assign_map.emplace("cim:PssIEEE4B.ki", &assign_PssIEEE4B_ki); + assign_map.emplace("cim:PssIEEE4B.ki1", &assign_PssIEEE4B_ki1); + assign_map.emplace("cim:PssIEEE4B.ki11", &assign_PssIEEE4B_ki11); + assign_map.emplace("cim:PssIEEE4B.ki17", &assign_PssIEEE4B_ki17); + assign_map.emplace("cim:PssIEEE4B.ki2", &assign_PssIEEE4B_ki2); + assign_map.emplace("cim:PssIEEE4B.kl", &assign_PssIEEE4B_kl); + assign_map.emplace("cim:PssIEEE4B.kl1", &assign_PssIEEE4B_kl1); + assign_map.emplace("cim:PssIEEE4B.kl11", &assign_PssIEEE4B_kl11); + assign_map.emplace("cim:PssIEEE4B.kl17", &assign_PssIEEE4B_kl17); + assign_map.emplace("cim:PssIEEE4B.kl2", &assign_PssIEEE4B_kl2); + assign_map.emplace("cim:PssIEEE4B.omegani", &assign_PssIEEE4B_omegani); + assign_map.emplace("cim:PssIEEE4B.th1", &assign_PssIEEE4B_th1); + assign_map.emplace("cim:PssIEEE4B.th10", &assign_PssIEEE4B_th10); + assign_map.emplace("cim:PssIEEE4B.th11", &assign_PssIEEE4B_th11); + assign_map.emplace("cim:PssIEEE4B.th12", &assign_PssIEEE4B_th12); + assign_map.emplace("cim:PssIEEE4B.th2", &assign_PssIEEE4B_th2); + assign_map.emplace("cim:PssIEEE4B.th3", &assign_PssIEEE4B_th3); + assign_map.emplace("cim:PssIEEE4B.th4", &assign_PssIEEE4B_th4); + assign_map.emplace("cim:PssIEEE4B.th5", &assign_PssIEEE4B_th5); + assign_map.emplace("cim:PssIEEE4B.th6", &assign_PssIEEE4B_th6); + assign_map.emplace("cim:PssIEEE4B.th7", &assign_PssIEEE4B_th7); + assign_map.emplace("cim:PssIEEE4B.th8", &assign_PssIEEE4B_th8); + assign_map.emplace("cim:PssIEEE4B.th9", &assign_PssIEEE4B_th9); + assign_map.emplace("cim:PssIEEE4B.ti1", &assign_PssIEEE4B_ti1); + assign_map.emplace("cim:PssIEEE4B.ti10", &assign_PssIEEE4B_ti10); + assign_map.emplace("cim:PssIEEE4B.ti11", &assign_PssIEEE4B_ti11); + assign_map.emplace("cim:PssIEEE4B.ti12", &assign_PssIEEE4B_ti12); + assign_map.emplace("cim:PssIEEE4B.ti2", &assign_PssIEEE4B_ti2); + assign_map.emplace("cim:PssIEEE4B.ti3", &assign_PssIEEE4B_ti3); + assign_map.emplace("cim:PssIEEE4B.ti4", &assign_PssIEEE4B_ti4); + assign_map.emplace("cim:PssIEEE4B.ti5", &assign_PssIEEE4B_ti5); + assign_map.emplace("cim:PssIEEE4B.ti6", &assign_PssIEEE4B_ti6); + assign_map.emplace("cim:PssIEEE4B.ti7", &assign_PssIEEE4B_ti7); + assign_map.emplace("cim:PssIEEE4B.ti8", &assign_PssIEEE4B_ti8); + assign_map.emplace("cim:PssIEEE4B.ti9", &assign_PssIEEE4B_ti9); + assign_map.emplace("cim:PssIEEE4B.tl1", &assign_PssIEEE4B_tl1); + assign_map.emplace("cim:PssIEEE4B.tl10", &assign_PssIEEE4B_tl10); + assign_map.emplace("cim:PssIEEE4B.tl11", &assign_PssIEEE4B_tl11); + assign_map.emplace("cim:PssIEEE4B.tl12", &assign_PssIEEE4B_tl12); + assign_map.emplace("cim:PssIEEE4B.tl2", &assign_PssIEEE4B_tl2); + assign_map.emplace("cim:PssIEEE4B.tl3", &assign_PssIEEE4B_tl3); + assign_map.emplace("cim:PssIEEE4B.tl4", &assign_PssIEEE4B_tl4); + assign_map.emplace("cim:PssIEEE4B.tl5", &assign_PssIEEE4B_tl5); + assign_map.emplace("cim:PssIEEE4B.tl6", &assign_PssIEEE4B_tl6); + assign_map.emplace("cim:PssIEEE4B.tl7", &assign_PssIEEE4B_tl7); + assign_map.emplace("cim:PssIEEE4B.tl8", &assign_PssIEEE4B_tl8); + assign_map.emplace("cim:PssIEEE4B.tl9", &assign_PssIEEE4B_tl9); + assign_map.emplace("cim:PssIEEE4B.vhmax", &assign_PssIEEE4B_vhmax); + assign_map.emplace("cim:PssIEEE4B.vhmin", &assign_PssIEEE4B_vhmin); + assign_map.emplace("cim:PssIEEE4B.vimax", &assign_PssIEEE4B_vimax); + assign_map.emplace("cim:PssIEEE4B.vimin", &assign_PssIEEE4B_vimin); + assign_map.emplace("cim:PssIEEE4B.vlmax", &assign_PssIEEE4B_vlmax); + assign_map.emplace("cim:PssIEEE4B.vlmin", &assign_PssIEEE4B_vlmin); + assign_map.emplace("cim:PssIEEE4B.vstmax", &assign_PssIEEE4B_vstmax); + assign_map.emplace("cim:PssIEEE4B.vstmin", &assign_PssIEEE4B_vstmin); } void PssIEEE4B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/PssIEEE4B.hpp b/CGMES_2.4.13_18DEC2013/PssIEEE4B.hpp index d3b4dab3b..7d1b81937 100644 --- a/CGMES_2.4.13_18DEC2013/PssIEEE4B.hpp +++ b/CGMES_2.4.13_18DEC2013/PssIEEE4B.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type PSS2B power system stabilizer model. The PSS4B model represents a structure based on multiple working frequency bands. Three separate bands, respectively dedicated to the low-, intermediate- and high-frequency modes of oscillations, are used in this delta-omega (speed input) PSS. Reference: IEEE 4B 421.5-2005 Section 8.4. - */ + /** \brief The class represents IEEE Std 421.5-2005 type PSS2B power system stabilizer model. The PSS4B model represents a structure based on multiple working frequency bands. Three separate bands, respectively dedicated to the low-, intermediate- and high-frequency modes of oscillations, are used in this delta-omega (speed input) PSS. Reference: IEEE 4B 421.5-2005 Section 8.4. */ class PssIEEE4B : public PowerSystemStabilizerDynamics { public: @@ -29,67 +27,188 @@ namespace CIMPP PssIEEE4B(); ~PssIEEE4B() override; - CIMPP::Simple_Float bwi; /* Three dB bandwidth (B). Default: nullptr */ - CIMPP::PU kh; /* High band gain (K). Typical Value = 120. Default: nullptr */ - CIMPP::PU kh1; /* High band differential filter gain (K). Typical Value = 66. Default: nullptr */ - CIMPP::PU kh11; /* High band first lead-lag blocks coefficient (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kh17; /* High band first lead-lag blocks coefficient (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kh2; /* High band differential filter gain (K). Typical Value = 66. Default: nullptr */ - CIMPP::PU ki; /* Intermediate band gain (K). Typical Value = 30. Default: nullptr */ - CIMPP::PU ki1; /* Intermediate band differential filter gain (K). Typical Value = 66. Default: nullptr */ - CIMPP::PU ki11; /* Intermediate band first lead-lag blocks coefficient (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU ki17; /* Intermediate band first lead-lag blocks coefficient (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU ki2; /* Intermediate band differential filter gain (K). Typical Value = 66. Default: nullptr */ - CIMPP::PU kl; /* Low band gain (K). Typical Value = 7.5. Default: nullptr */ - CIMPP::PU kl1; /* Low band differential filter gain (K). Typical Value = 66. Default: nullptr */ - CIMPP::PU kl11; /* Low band first lead-lag blocks coefficient (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kl17; /* Low band first lead-lag blocks coefficient (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kl2; /* Low band differential filter gain (K). Typical Value = 66. Default: nullptr */ - CIMPP::Simple_Float omegani; /* Notch filter: filter frequency (omega). Default: nullptr */ - CIMPP::Seconds th1; /* High band time constant (T). Typical Value = 0.01513. Default: nullptr */ - CIMPP::Seconds th10; /* High band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds th11; /* High band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds th12; /* High band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds th2; /* High band time constant (T). Typical Value = 0.01816. Default: nullptr */ - CIMPP::Seconds th3; /* High band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds th4; /* High band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds th5; /* High band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds th6; /* High band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds th7; /* High band time constant (T). Typical Value = 0.01816. Default: nullptr */ - CIMPP::Seconds th8; /* High band time constant (T). Typical Value = 0.02179. Default: nullptr */ - CIMPP::Seconds th9; /* High band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ti1; /* Intermediate band time constant (T). Typical Value = 0.173. Default: nullptr */ - CIMPP::Seconds ti10; /* Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ti11; /* Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ti12; /* Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ti2; /* Intermediate band time constant (T). Typical Value = 0.2075. Default: nullptr */ - CIMPP::Seconds ti3; /* Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ti4; /* Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ti5; /* Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ti6; /* Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ti7; /* Intermediate band time constant (T). Typical Value = 0.2075. Default: nullptr */ - CIMPP::Seconds ti8; /* Intermediate band time constant (T). Typical Value = 0.2491. Default: nullptr */ - CIMPP::Seconds ti9; /* Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tl1; /* Low band time constant (T). Typical Value = 1.73. Default: nullptr */ - CIMPP::Seconds tl10; /* Low band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tl11; /* Low band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tl12; /* Low band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tl2; /* Low band time constant (T). Typical Value = 2.075. Default: nullptr */ - CIMPP::Seconds tl3; /* Low band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tl4; /* Low band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tl5; /* Low band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tl6; /* Low band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tl7; /* Low band time constant (T). Typical Value = 2.075. Default: nullptr */ - CIMPP::Seconds tl8; /* Low band time constant (T). Typical Value = 2.491. Default: nullptr */ - CIMPP::Seconds tl9; /* Low band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::PU vhmax; /* High band output maximum limit (V). Typical Value = 0.6. Default: nullptr */ - CIMPP::PU vhmin; /* High band output minimum limit (V). Typical Value = -0.6. Default: nullptr */ - CIMPP::PU vimax; /* Intermediate band output maximum limit (V). Typical Value = 0.6. Default: nullptr */ - CIMPP::PU vimin; /* Intermediate band output minimum limit (V). Typical Value = -0.6. Default: nullptr */ - CIMPP::PU vlmax; /* Low band output maximum limit (V). Typical Value = 0.075. Default: nullptr */ - CIMPP::PU vlmin; /* Low band output minimum limit (V). Typical Value = -0.075. Default: nullptr */ - CIMPP::PU vstmax; /* PSS output maximum limit (V). Typical Value = 0.15. Default: nullptr */ - CIMPP::PU vstmin; /* PSS output minimum limit (V). Typical Value = -0.15. Default: nullptr */ + /** \brief Three dB bandwidth (B). Default: nullptr */ + CIMPP::Simple_Float bwi; + + /** \brief High band gain (K). Typical Value = 120. Default: nullptr */ + CIMPP::PU kh; + + /** \brief High band differential filter gain (K). Typical Value = 66. Default: nullptr */ + CIMPP::PU kh1; + + /** \brief High band first lead-lag blocks coefficient (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU kh11; + + /** \brief High band first lead-lag blocks coefficient (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU kh17; + + /** \brief High band differential filter gain (K). Typical Value = 66. Default: nullptr */ + CIMPP::PU kh2; + + /** \brief Intermediate band gain (K). Typical Value = 30. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Intermediate band differential filter gain (K). Typical Value = 66. Default: nullptr */ + CIMPP::PU ki1; + + /** \brief Intermediate band first lead-lag blocks coefficient (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ki11; + + /** \brief Intermediate band first lead-lag blocks coefficient (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ki17; + + /** \brief Intermediate band differential filter gain (K). Typical Value = 66. Default: nullptr */ + CIMPP::PU ki2; + + /** \brief Low band gain (K). Typical Value = 7.5. Default: nullptr */ + CIMPP::PU kl; + + /** \brief Low band differential filter gain (K). Typical Value = 66. Default: nullptr */ + CIMPP::PU kl1; + + /** \brief Low band first lead-lag blocks coefficient (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU kl11; + + /** \brief Low band first lead-lag blocks coefficient (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU kl17; + + /** \brief Low band differential filter gain (K). Typical Value = 66. Default: nullptr */ + CIMPP::PU kl2; + + /** \brief Notch filter: filter frequency (omega). Default: nullptr */ + CIMPP::Simple_Float omegani; + + /** \brief High band time constant (T). Typical Value = 0.01513. Default: nullptr */ + CIMPP::Seconds th1; + + /** \brief High band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds th10; + + /** \brief High band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds th11; + + /** \brief High band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds th12; + + /** \brief High band time constant (T). Typical Value = 0.01816. Default: nullptr */ + CIMPP::Seconds th2; + + /** \brief High band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds th3; + + /** \brief High band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds th4; + + /** \brief High band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds th5; + + /** \brief High band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds th6; + + /** \brief High band time constant (T). Typical Value = 0.01816. Default: nullptr */ + CIMPP::Seconds th7; + + /** \brief High band time constant (T). Typical Value = 0.02179. Default: nullptr */ + CIMPP::Seconds th8; + + /** \brief High band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds th9; + + /** \brief Intermediate band time constant (T). Typical Value = 0.173. Default: nullptr */ + CIMPP::Seconds ti1; + + /** \brief Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ti10; + + /** \brief Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ti11; + + /** \brief Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ti12; + + /** \brief Intermediate band time constant (T). Typical Value = 0.2075. Default: nullptr */ + CIMPP::Seconds ti2; + + /** \brief Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ti3; + + /** \brief Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ti4; + + /** \brief Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ti5; + + /** \brief Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ti6; + + /** \brief Intermediate band time constant (T). Typical Value = 0.2075. Default: nullptr */ + CIMPP::Seconds ti7; + + /** \brief Intermediate band time constant (T). Typical Value = 0.2491. Default: nullptr */ + CIMPP::Seconds ti8; + + /** \brief Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ti9; + + /** \brief Low band time constant (T). Typical Value = 1.73. Default: nullptr */ + CIMPP::Seconds tl1; + + /** \brief Low band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tl10; + + /** \brief Low band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tl11; + + /** \brief Low band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tl12; + + /** \brief Low band time constant (T). Typical Value = 2.075. Default: nullptr */ + CIMPP::Seconds tl2; + + /** \brief Low band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tl3; + + /** \brief Low band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tl4; + + /** \brief Low band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tl5; + + /** \brief Low band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tl6; + + /** \brief Low band time constant (T). Typical Value = 2.075. Default: nullptr */ + CIMPP::Seconds tl7; + + /** \brief Low band time constant (T). Typical Value = 2.491. Default: nullptr */ + CIMPP::Seconds tl8; + + /** \brief Low band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tl9; + + /** \brief High band output maximum limit (V). Typical Value = 0.6. Default: nullptr */ + CIMPP::PU vhmax; + + /** \brief High band output minimum limit (V). Typical Value = -0.6. Default: nullptr */ + CIMPP::PU vhmin; + + /** \brief Intermediate band output maximum limit (V). Typical Value = 0.6. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Intermediate band output minimum limit (V). Typical Value = -0.6. Default: nullptr */ + CIMPP::PU vimin; + + /** \brief Low band output maximum limit (V). Typical Value = 0.075. Default: nullptr */ + CIMPP::PU vlmax; + + /** \brief Low band output minimum limit (V). Typical Value = -0.075. Default: nullptr */ + CIMPP::PU vlmin; + + /** \brief PSS output maximum limit (V). Typical Value = 0.15. Default: nullptr */ + CIMPP::PU vstmax; + + /** \brief PSS output minimum limit (V). Typical Value = -0.15. Default: nullptr */ + CIMPP::PU vstmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/PssPTIST1.cpp b/CGMES_2.4.13_18DEC2013/PssPTIST1.cpp index c3f386e9f..beea82b09 100644 --- a/CGMES_2.4.13_18DEC2013/PssPTIST1.cpp +++ b/CGMES_2.4.13_18DEC2013/PssPTIST1.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -PssPTIST1::PssPTIST1() {}; -PssPTIST1::~PssPTIST1() {}; +PssPTIST1::PssPTIST1() {} +PssPTIST1::~PssPTIST1() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ PssPTIST1::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssPTIST1_dtc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_dtc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dtc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_dtf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_dtf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dtf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_dtp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_dtp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dtp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_m(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_m(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->m; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssPTIST1_dtc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dtc; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_PssPTIST1_dtc(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST1_dtf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dtf; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_PssPTIST1_dtf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST1_dtp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dtp; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_PssPTIST1_dtp(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST1_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_PssPTIST1_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssPTIST1_m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->m; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_PssPTIST1_m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssPTIST1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_PssPTIST1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_PssPTIST1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_PssPTIST1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST1_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_PssPTIST1_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST1_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_PssPTIST1_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST1_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_PssPTIST1_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char PssPTIST1::debugName[] = "PssPTIST1"; const char* PssPTIST1::debugString() const { @@ -370,22 +376,22 @@ const char* PssPTIST1::debugString() const void PssPTIST1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssPTIST1"), &PssPTIST1_factory)); + factory_map.emplace("cim:PssPTIST1", &PssPTIST1_factory); } void PssPTIST1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.dtc"), &assign_PssPTIST1_dtc)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.dtf"), &assign_PssPTIST1_dtf)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.dtp"), &assign_PssPTIST1_dtp)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.k"), &assign_PssPTIST1_k)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.m"), &assign_PssPTIST1_m)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.t1"), &assign_PssPTIST1_t1)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.t2"), &assign_PssPTIST1_t2)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.t3"), &assign_PssPTIST1_t3)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.t4"), &assign_PssPTIST1_t4)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.tf"), &assign_PssPTIST1_tf)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.tp"), &assign_PssPTIST1_tp)); + assign_map.emplace("cim:PssPTIST1.dtc", &assign_PssPTIST1_dtc); + assign_map.emplace("cim:PssPTIST1.dtf", &assign_PssPTIST1_dtf); + assign_map.emplace("cim:PssPTIST1.dtp", &assign_PssPTIST1_dtp); + assign_map.emplace("cim:PssPTIST1.k", &assign_PssPTIST1_k); + assign_map.emplace("cim:PssPTIST1.m", &assign_PssPTIST1_m); + assign_map.emplace("cim:PssPTIST1.t1", &assign_PssPTIST1_t1); + assign_map.emplace("cim:PssPTIST1.t2", &assign_PssPTIST1_t2); + assign_map.emplace("cim:PssPTIST1.t3", &assign_PssPTIST1_t3); + assign_map.emplace("cim:PssPTIST1.t4", &assign_PssPTIST1_t4); + assign_map.emplace("cim:PssPTIST1.tf", &assign_PssPTIST1_tf); + assign_map.emplace("cim:PssPTIST1.tp", &assign_PssPTIST1_tp); } void PssPTIST1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/PssPTIST1.hpp b/CGMES_2.4.13_18DEC2013/PssPTIST1.hpp index 9dd1c12e6..b48716169 100644 --- a/CGMES_2.4.13_18DEC2013/PssPTIST1.hpp +++ b/CGMES_2.4.13_18DEC2013/PssPTIST1.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - PTI Microprocessor-Based Stabilizer type 1. - */ + /** \brief PTI Microprocessor-Based Stabilizer type 1. */ class PssPTIST1 : public PowerSystemStabilizerDynamics { public: @@ -28,17 +26,38 @@ namespace CIMPP PssPTIST1(); ~PssPTIST1() override; - CIMPP::Seconds dtc; /* Time step related to activation of controls (Dtc). Typical Value = 0.025. Default: nullptr */ - CIMPP::Seconds dtf; /* Time step frequency calculation (Dtf). Typical Value = 0.025. Default: nullptr */ - CIMPP::Seconds dtp; /* Time step active power calculation (Dtp). Typical Value = 0.0125. Default: nullptr */ - CIMPP::PU k; /* Gain (K). Typical Value = 9. Default: nullptr */ - CIMPP::PU m; /* (M). M=2*H. Typical Value = 5. Default: nullptr */ - CIMPP::Seconds t1; /* Time constant (T1). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds t2; /* Time constant (T2). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds t3; /* Time constant (T3). Typical Value = 0.2. Default: nullptr */ - CIMPP::Seconds t4; /* Time constant (T4). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds tf; /* Time constant (Tf). Typical Value = 0.2. Default: nullptr */ - CIMPP::Seconds tp; /* Time constant (Tp). Typical Value = 0.2. Default: nullptr */ + /** \brief Time step related to activation of controls (Dtc). Typical Value = 0.025. Default: nullptr */ + CIMPP::Seconds dtc; + + /** \brief Time step frequency calculation (Dtf). Typical Value = 0.025. Default: nullptr */ + CIMPP::Seconds dtf; + + /** \brief Time step active power calculation (Dtp). Typical Value = 0.0125. Default: nullptr */ + CIMPP::Seconds dtp; + + /** \brief Gain (K). Typical Value = 9. Default: nullptr */ + CIMPP::PU k; + + /** \brief (M). M=2*H. Typical Value = 5. Default: nullptr */ + CIMPP::PU m; + + /** \brief Time constant (T1). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Time constant (T2). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Time constant (T3). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Time constant (T4). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant (Tf). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Time constant (Tp). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds tp; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/PssPTIST3.cpp b/CGMES_2.4.13_18DEC2013/PssPTIST3.cpp index d563abbea..42a3072e3 100644 --- a/CGMES_2.4.13_18DEC2013/PssPTIST3.cpp +++ b/CGMES_2.4.13_18DEC2013/PssPTIST3.cpp @@ -8,45 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -PssPTIST3::PssPTIST3() {}; -PssPTIST3::~PssPTIST3() {}; +PssPTIST3::PssPTIST3() {} +PssPTIST3::~PssPTIST3() {} static const std::list PossibleProfilesForClass = { @@ -106,454 +72,486 @@ PssPTIST3::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssPTIST3_a0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_a0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_a1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_a1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_a2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_a2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_a3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_a3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_a4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_a4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_a5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_a5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_al(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_al(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->al; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_athres(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_athres(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->athres; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_b0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_b0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_b1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_b1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_b2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_b2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_b3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_b3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_b4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_b4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_b5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_b5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_dl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_dl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_dtc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_dtc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dtc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_dtf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_dtf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dtf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_dtp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_dtp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dtp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_isw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_isw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->isw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_lthres(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_lthres(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lthres; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_m(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_m(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->m; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_nav(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_nav(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nav; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_ncl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_ncl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ncl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_ncr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_ncr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ncr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssPTIST3_a0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a0; if (!buffer.str().empty()) @@ -567,7 +565,8 @@ bool get_PssPTIST3_a0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a1; if (!buffer.str().empty()) @@ -581,7 +580,8 @@ bool get_PssPTIST3_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a2; if (!buffer.str().empty()) @@ -595,7 +595,8 @@ bool get_PssPTIST3_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_a3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a3; if (!buffer.str().empty()) @@ -609,7 +610,8 @@ bool get_PssPTIST3_a3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_a4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a4; if (!buffer.str().empty()) @@ -623,7 +625,8 @@ bool get_PssPTIST3_a4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_a5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a5; if (!buffer.str().empty()) @@ -637,7 +640,8 @@ bool get_PssPTIST3_a5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_al(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->al; if (!buffer.str().empty()) @@ -651,7 +655,8 @@ bool get_PssPTIST3_al(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_athres(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->athres; if (!buffer.str().empty()) @@ -665,7 +670,8 @@ bool get_PssPTIST3_athres(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_PssPTIST3_b0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b0; if (!buffer.str().empty()) @@ -679,7 +685,8 @@ bool get_PssPTIST3_b0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_b1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b1; if (!buffer.str().empty()) @@ -693,7 +700,8 @@ bool get_PssPTIST3_b1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_b2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b2; if (!buffer.str().empty()) @@ -707,7 +715,8 @@ bool get_PssPTIST3_b2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_b3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b3; if (!buffer.str().empty()) @@ -721,7 +730,8 @@ bool get_PssPTIST3_b3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_b4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b4; if (!buffer.str().empty()) @@ -735,7 +745,8 @@ bool get_PssPTIST3_b4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_b5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b5; if (!buffer.str().empty()) @@ -749,7 +760,8 @@ bool get_PssPTIST3_b5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_dl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dl; if (!buffer.str().empty()) @@ -763,7 +775,8 @@ bool get_PssPTIST3_dl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_dtc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dtc; if (!buffer.str().empty()) @@ -777,7 +790,8 @@ bool get_PssPTIST3_dtc(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST3_dtf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dtf; if (!buffer.str().empty()) @@ -791,7 +805,8 @@ bool get_PssPTIST3_dtf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST3_dtp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dtp; if (!buffer.str().empty()) @@ -805,7 +820,8 @@ bool get_PssPTIST3_dtp(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST3_isw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->isw; if (!buffer.str().empty()) @@ -819,7 +835,8 @@ bool get_PssPTIST3_isw(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST3_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -833,7 +850,8 @@ bool get_PssPTIST3_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssPTIST3_lthres(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lthres; if (!buffer.str().empty()) @@ -847,7 +865,8 @@ bool get_PssPTIST3_lthres(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_PssPTIST3_m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->m; if (!buffer.str().empty()) @@ -861,7 +880,8 @@ bool get_PssPTIST3_m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssPTIST3_nav(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nav; if (!buffer.str().empty()) @@ -875,7 +895,8 @@ bool get_PssPTIST3_nav(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST3_ncl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ncl; if (!buffer.str().empty()) @@ -889,7 +910,8 @@ bool get_PssPTIST3_ncl(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST3_ncr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ncr; if (!buffer.str().empty()) @@ -903,7 +925,8 @@ bool get_PssPTIST3_ncr(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST3_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -917,7 +940,8 @@ bool get_PssPTIST3_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssPTIST3_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -931,7 +955,8 @@ bool get_PssPTIST3_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -945,7 +970,8 @@ bool get_PssPTIST3_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -959,7 +985,8 @@ bool get_PssPTIST3_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -973,7 +1000,8 @@ bool get_PssPTIST3_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -987,7 +1015,8 @@ bool get_PssPTIST3_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -1001,7 +1030,8 @@ bool get_PssPTIST3_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -1015,7 +1045,8 @@ bool get_PssPTIST3_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -1027,8 +1058,6 @@ bool get_PssPTIST3_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char PssPTIST3::debugName[] = "PssPTIST3"; const char* PssPTIST3::debugString() const { @@ -1037,45 +1066,45 @@ const char* PssPTIST3::debugString() const void PssPTIST3::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssPTIST3"), &PssPTIST3_factory)); + factory_map.emplace("cim:PssPTIST3", &PssPTIST3_factory); } void PssPTIST3::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.a0"), &assign_PssPTIST3_a0)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.a1"), &assign_PssPTIST3_a1)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.a2"), &assign_PssPTIST3_a2)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.a3"), &assign_PssPTIST3_a3)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.a4"), &assign_PssPTIST3_a4)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.a5"), &assign_PssPTIST3_a5)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.al"), &assign_PssPTIST3_al)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.athres"), &assign_PssPTIST3_athres)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.b0"), &assign_PssPTIST3_b0)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.b1"), &assign_PssPTIST3_b1)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.b2"), &assign_PssPTIST3_b2)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.b3"), &assign_PssPTIST3_b3)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.b4"), &assign_PssPTIST3_b4)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.b5"), &assign_PssPTIST3_b5)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.dl"), &assign_PssPTIST3_dl)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.dtc"), &assign_PssPTIST3_dtc)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.dtf"), &assign_PssPTIST3_dtf)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.dtp"), &assign_PssPTIST3_dtp)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.isw"), &assign_PssPTIST3_isw)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.k"), &assign_PssPTIST3_k)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.lthres"), &assign_PssPTIST3_lthres)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.m"), &assign_PssPTIST3_m)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.nav"), &assign_PssPTIST3_nav)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.ncl"), &assign_PssPTIST3_ncl)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.ncr"), &assign_PssPTIST3_ncr)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.pmin"), &assign_PssPTIST3_pmin)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.t1"), &assign_PssPTIST3_t1)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.t2"), &assign_PssPTIST3_t2)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.t3"), &assign_PssPTIST3_t3)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.t4"), &assign_PssPTIST3_t4)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.t5"), &assign_PssPTIST3_t5)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.t6"), &assign_PssPTIST3_t6)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.tf"), &assign_PssPTIST3_tf)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.tp"), &assign_PssPTIST3_tp)); + assign_map.emplace("cim:PssPTIST3.a0", &assign_PssPTIST3_a0); + assign_map.emplace("cim:PssPTIST3.a1", &assign_PssPTIST3_a1); + assign_map.emplace("cim:PssPTIST3.a2", &assign_PssPTIST3_a2); + assign_map.emplace("cim:PssPTIST3.a3", &assign_PssPTIST3_a3); + assign_map.emplace("cim:PssPTIST3.a4", &assign_PssPTIST3_a4); + assign_map.emplace("cim:PssPTIST3.a5", &assign_PssPTIST3_a5); + assign_map.emplace("cim:PssPTIST3.al", &assign_PssPTIST3_al); + assign_map.emplace("cim:PssPTIST3.athres", &assign_PssPTIST3_athres); + assign_map.emplace("cim:PssPTIST3.b0", &assign_PssPTIST3_b0); + assign_map.emplace("cim:PssPTIST3.b1", &assign_PssPTIST3_b1); + assign_map.emplace("cim:PssPTIST3.b2", &assign_PssPTIST3_b2); + assign_map.emplace("cim:PssPTIST3.b3", &assign_PssPTIST3_b3); + assign_map.emplace("cim:PssPTIST3.b4", &assign_PssPTIST3_b4); + assign_map.emplace("cim:PssPTIST3.b5", &assign_PssPTIST3_b5); + assign_map.emplace("cim:PssPTIST3.dl", &assign_PssPTIST3_dl); + assign_map.emplace("cim:PssPTIST3.dtc", &assign_PssPTIST3_dtc); + assign_map.emplace("cim:PssPTIST3.dtf", &assign_PssPTIST3_dtf); + assign_map.emplace("cim:PssPTIST3.dtp", &assign_PssPTIST3_dtp); + assign_map.emplace("cim:PssPTIST3.isw", &assign_PssPTIST3_isw); + assign_map.emplace("cim:PssPTIST3.k", &assign_PssPTIST3_k); + assign_map.emplace("cim:PssPTIST3.lthres", &assign_PssPTIST3_lthres); + assign_map.emplace("cim:PssPTIST3.m", &assign_PssPTIST3_m); + assign_map.emplace("cim:PssPTIST3.nav", &assign_PssPTIST3_nav); + assign_map.emplace("cim:PssPTIST3.ncl", &assign_PssPTIST3_ncl); + assign_map.emplace("cim:PssPTIST3.ncr", &assign_PssPTIST3_ncr); + assign_map.emplace("cim:PssPTIST3.pmin", &assign_PssPTIST3_pmin); + assign_map.emplace("cim:PssPTIST3.t1", &assign_PssPTIST3_t1); + assign_map.emplace("cim:PssPTIST3.t2", &assign_PssPTIST3_t2); + assign_map.emplace("cim:PssPTIST3.t3", &assign_PssPTIST3_t3); + assign_map.emplace("cim:PssPTIST3.t4", &assign_PssPTIST3_t4); + assign_map.emplace("cim:PssPTIST3.t5", &assign_PssPTIST3_t5); + assign_map.emplace("cim:PssPTIST3.t6", &assign_PssPTIST3_t6); + assign_map.emplace("cim:PssPTIST3.tf", &assign_PssPTIST3_tf); + assign_map.emplace("cim:PssPTIST3.tp", &assign_PssPTIST3_tp); } void PssPTIST3::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/PssPTIST3.hpp b/CGMES_2.4.13_18DEC2013/PssPTIST3.hpp index 1faa7df62..84ac9463b 100644 --- a/CGMES_2.4.13_18DEC2013/PssPTIST3.hpp +++ b/CGMES_2.4.13_18DEC2013/PssPTIST3.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - PTI Microprocessor-Based Stabilizer type 3. - */ + /** \brief PTI Microprocessor-Based Stabilizer type 3. */ class PssPTIST3 : public PowerSystemStabilizerDynamics { public: @@ -30,40 +28,107 @@ namespace CIMPP PssPTIST3(); ~PssPTIST3() override; - CIMPP::PU a0; /* Filter coefficient (A0). Default: nullptr */ - CIMPP::PU a1; /* Limiter (Al). Default: nullptr */ - CIMPP::PU a2; /* Filter coefficient (A2). Default: nullptr */ - CIMPP::PU a3; /* Filter coefficient (A3). Default: nullptr */ - CIMPP::PU a4; /* Filter coefficient (A4). Default: nullptr */ - CIMPP::PU a5; /* Filter coefficient (A5). Default: nullptr */ - CIMPP::PU al; /* Limiter (Al). Default: nullptr */ - CIMPP::PU athres; /* Threshold value above which output averaging will be bypassed (Athres). Typical Value = 0.005. Default: nullptr */ - CIMPP::PU b0; /* Filter coefficient (B0). Default: nullptr */ - CIMPP::PU b1; /* Filter coefficient (B1). Default: nullptr */ - CIMPP::PU b2; /* Filter coefficient (B2). Default: nullptr */ - CIMPP::PU b3; /* Filter coefficient (B3). Default: nullptr */ - CIMPP::PU b4; /* Filter coefficient (B4). Default: nullptr */ - CIMPP::PU b5; /* Filter coefficient (B5). Default: nullptr */ - CIMPP::PU dl; /* Limiter (Dl). Default: nullptr */ - CIMPP::Seconds dtc; /* Time step related to activation of controls (0.03 for 50 Hz) (Dtc). Typical Value = 0.025. Default: nullptr */ - CIMPP::Seconds dtf; /* Time step frequency calculation (0.03 for 50 Hz) (Dtf). Typical Value = 0.025. Default: nullptr */ - CIMPP::Seconds dtp; /* Time step active power calculation (0.015 for 50 Hz) (Dtp). Typical Value = 0.0125. Default: nullptr */ - CIMPP::Boolean isw; /* Digital/analog output switch (Isw). true = produce analog output false = convert to digital output, using tap selection table. Default: false */ - CIMPP::PU k; /* Gain (K). Typical Value = 9. Default: nullptr */ - CIMPP::PU lthres; /* Threshold value (Lthres). Default: nullptr */ - CIMPP::PU m; /* (M). M=2*H. Typical Value = 5. Default: nullptr */ - CIMPP::Simple_Float nav; /* Number of control outputs to average (Nav) (1 <= Nav <= 16). Typical Value = 4. Default: nullptr */ - CIMPP::Simple_Float ncl; /* Number of counts at limit to active limit function (Ncl) (>0). Default: nullptr */ - CIMPP::Simple_Float ncr; /* Number of counts until reset after limit function is triggered (Ncr). Default: nullptr */ - CIMPP::PU pmin; /* (Pmin). Default: nullptr */ - CIMPP::Seconds t1; /* Time constant (T1). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds t2; /* Time constant (T2). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds t3; /* Time constant (T3). Typical Value = 0.2. Default: nullptr */ - CIMPP::Seconds t4; /* Time constant (T4). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds t5; /* Time constant (T5). Default: nullptr */ - CIMPP::Seconds t6; /* Time constant (T6). Default: nullptr */ - CIMPP::Seconds tf; /* Time constant (Tf). Typical Value = 0.2. Default: nullptr */ - CIMPP::Seconds tp; /* Time constant (Tp). Typical Value = 0.2. Default: nullptr */ + /** \brief Filter coefficient (A0). Default: nullptr */ + CIMPP::PU a0; + + /** \brief Limiter (Al). Default: nullptr */ + CIMPP::PU a1; + + /** \brief Filter coefficient (A2). Default: nullptr */ + CIMPP::PU a2; + + /** \brief Filter coefficient (A3). Default: nullptr */ + CIMPP::PU a3; + + /** \brief Filter coefficient (A4). Default: nullptr */ + CIMPP::PU a4; + + /** \brief Filter coefficient (A5). Default: nullptr */ + CIMPP::PU a5; + + /** \brief Limiter (Al). Default: nullptr */ + CIMPP::PU al; + + /** \brief Threshold value above which output averaging will be bypassed (Athres). Typical Value = 0.005. Default: nullptr */ + CIMPP::PU athres; + + /** \brief Filter coefficient (B0). Default: nullptr */ + CIMPP::PU b0; + + /** \brief Filter coefficient (B1). Default: nullptr */ + CIMPP::PU b1; + + /** \brief Filter coefficient (B2). Default: nullptr */ + CIMPP::PU b2; + + /** \brief Filter coefficient (B3). Default: nullptr */ + CIMPP::PU b3; + + /** \brief Filter coefficient (B4). Default: nullptr */ + CIMPP::PU b4; + + /** \brief Filter coefficient (B5). Default: nullptr */ + CIMPP::PU b5; + + /** \brief Limiter (Dl). Default: nullptr */ + CIMPP::PU dl; + + /** \brief Time step related to activation of controls (0.03 for 50 Hz) (Dtc). Typical Value = 0.025. Default: nullptr */ + CIMPP::Seconds dtc; + + /** \brief Time step frequency calculation (0.03 for 50 Hz) (Dtf). Typical Value = 0.025. Default: nullptr */ + CIMPP::Seconds dtf; + + /** \brief Time step active power calculation (0.015 for 50 Hz) (Dtp). Typical Value = 0.0125. Default: nullptr */ + CIMPP::Seconds dtp; + + /** \brief Digital/analog output switch (Isw). true = produce analog output false = convert to digital output, using tap selection table. Default: false */ + CIMPP::Boolean isw; + + /** \brief Gain (K). Typical Value = 9. Default: nullptr */ + CIMPP::PU k; + + /** \brief Threshold value (Lthres). Default: nullptr */ + CIMPP::PU lthres; + + /** \brief (M). M=2*H. Typical Value = 5. Default: nullptr */ + CIMPP::PU m; + + /** \brief Number of control outputs to average (Nav) (1 <= Nav <= 16). Typical Value = 4. Default: nullptr */ + CIMPP::Simple_Float nav; + + /** \brief Number of counts at limit to active limit function (Ncl) (>0). Default: nullptr */ + CIMPP::Simple_Float ncl; + + /** \brief Number of counts until reset after limit function is triggered (Ncr). Default: nullptr */ + CIMPP::Simple_Float ncr; + + /** \brief (Pmin). Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Time constant (T1). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Time constant (T2). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Time constant (T3). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Time constant (T4). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant (T5). Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Time constant (T6). Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time constant (Tf). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Time constant (Tp). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds tp; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/PssSB4.cpp b/CGMES_2.4.13_18DEC2013/PssSB4.cpp index 886022e1c..ff54c429f 100644 --- a/CGMES_2.4.13_18DEC2013/PssSB4.cpp +++ b/CGMES_2.4.13_18DEC2013/PssSB4.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PssSB4::PssSB4() {}; -PssSB4::~PssSB4() {}; +PssSB4::PssSB4() {} +PssSB4::~PssSB4() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ PssSB4::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssSB4_kx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_kx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_tt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_tx1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_tx1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tx1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_tx2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_tx2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tx2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_vsmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_vsmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_vsmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_vsmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssSB4_kx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kx; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_PssSB4_kx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSB4_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_PssSB4_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSB4_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_PssSB4_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSB4_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_PssSB4_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSB4_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_PssSB4_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSB4_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_PssSB4_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSB4_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tt; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_PssSB4_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSB4_tx1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tx1; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_PssSB4_tx1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSB4_tx2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tx2; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_PssSB4_tx2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSB4_vsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmax; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_PssSB4_vsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssSB4_vsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmin; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_PssSB4_vsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char PssSB4::debugName[] = "PssSB4"; const char* PssSB4::debugString() const { @@ -370,22 +376,22 @@ const char* PssSB4::debugString() const void PssSB4::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssSB4"), &PssSB4_factory)); + factory_map.emplace("cim:PssSB4", &PssSB4_factory); } void PssSB4::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssSB4.kx"), &assign_PssSB4_kx)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.ta"), &assign_PssSB4_ta)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.tb"), &assign_PssSB4_tb)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.tc"), &assign_PssSB4_tc)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.td"), &assign_PssSB4_td)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.te"), &assign_PssSB4_te)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.tt"), &assign_PssSB4_tt)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.tx1"), &assign_PssSB4_tx1)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.tx2"), &assign_PssSB4_tx2)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.vsmax"), &assign_PssSB4_vsmax)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.vsmin"), &assign_PssSB4_vsmin)); + assign_map.emplace("cim:PssSB4.kx", &assign_PssSB4_kx); + assign_map.emplace("cim:PssSB4.ta", &assign_PssSB4_ta); + assign_map.emplace("cim:PssSB4.tb", &assign_PssSB4_tb); + assign_map.emplace("cim:PssSB4.tc", &assign_PssSB4_tc); + assign_map.emplace("cim:PssSB4.td", &assign_PssSB4_td); + assign_map.emplace("cim:PssSB4.te", &assign_PssSB4_te); + assign_map.emplace("cim:PssSB4.tt", &assign_PssSB4_tt); + assign_map.emplace("cim:PssSB4.tx1", &assign_PssSB4_tx1); + assign_map.emplace("cim:PssSB4.tx2", &assign_PssSB4_tx2); + assign_map.emplace("cim:PssSB4.vsmax", &assign_PssSB4_vsmax); + assign_map.emplace("cim:PssSB4.vsmin", &assign_PssSB4_vsmin); } void PssSB4::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/PssSB4.hpp b/CGMES_2.4.13_18DEC2013/PssSB4.hpp index e54b13b13..4fb9cc24a 100644 --- a/CGMES_2.4.13_18DEC2013/PssSB4.hpp +++ b/CGMES_2.4.13_18DEC2013/PssSB4.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Power sensitive stabilizer model. - */ + /** \brief Power sensitive stabilizer model. */ class PssSB4 : public PowerSystemStabilizerDynamics { public: @@ -28,17 +26,38 @@ namespace CIMPP PssSB4(); ~PssSB4() override; - CIMPP::PU kx; /* Gain (Kx). Default: nullptr */ - CIMPP::Seconds ta; /* Time constant (Ta). Default: nullptr */ - CIMPP::Seconds tb; /* Time constant (Tb). Default: nullptr */ - CIMPP::Seconds tc; /* Time constant (Tc). Default: nullptr */ - CIMPP::Seconds td; /* Time constant (Td). Default: nullptr */ - CIMPP::Seconds te; /* Time constant (Te). Default: nullptr */ - CIMPP::Seconds tt; /* Time constant (Tt). Default: nullptr */ - CIMPP::Seconds tx1; /* Reset time constant (Tx1). Default: nullptr */ - CIMPP::Seconds tx2; /* Time constant (Tx2). Default: nullptr */ - CIMPP::PU vsmax; /* Limiter (Vsmax). Default: nullptr */ - CIMPP::PU vsmin; /* Limiter (Vsmin). Default: nullptr */ + /** \brief Gain (Kx). Default: nullptr */ + CIMPP::PU kx; + + /** \brief Time constant (Ta). Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Time constant (Tb). Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Time constant (Tc). Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Time constant (Td). Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Time constant (Te). Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Time constant (Tt). Default: nullptr */ + CIMPP::Seconds tt; + + /** \brief Reset time constant (Tx1). Default: nullptr */ + CIMPP::Seconds tx1; + + /** \brief Time constant (Tx2). Default: nullptr */ + CIMPP::Seconds tx2; + + /** \brief Limiter (Vsmax). Default: nullptr */ + CIMPP::PU vsmax; + + /** \brief Limiter (Vsmin). Default: nullptr */ + CIMPP::PU vsmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/PssSH.cpp b/CGMES_2.4.13_18DEC2013/PssSH.cpp index eb34d8442..5e06369a1 100644 --- a/CGMES_2.4.13_18DEC2013/PssSH.cpp +++ b/CGMES_2.4.13_18DEC2013/PssSH.cpp @@ -8,24 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PssSH::PssSH() {}; -PssSH::~PssSH() {}; +PssSH::PssSH() {} +PssSH::~PssSH() {} static const std::list PossibleProfilesForClass = { @@ -64,181 +51,192 @@ PssSH::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssSH_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_k0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_k0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_k4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_vsmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_vsmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_vsmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_vsmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssSH_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -252,7 +250,8 @@ bool get_PssSH_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_k0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k0; if (!buffer.str().empty()) @@ -266,7 +265,8 @@ bool get_PssSH_k0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -280,7 +280,8 @@ bool get_PssSH_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -294,7 +295,8 @@ bool get_PssSH_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -308,7 +310,8 @@ bool get_PssSH_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k4; if (!buffer.str().empty()) @@ -322,7 +325,8 @@ bool get_PssSH_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -336,7 +340,8 @@ bool get_PssSH_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -350,7 +355,8 @@ bool get_PssSH_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -364,7 +370,8 @@ bool get_PssSH_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -378,7 +385,8 @@ bool get_PssSH_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -392,7 +400,8 @@ bool get_PssSH_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_vsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmax; if (!buffer.str().empty()) @@ -406,7 +415,8 @@ bool get_PssSH_vsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_vsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmin; if (!buffer.str().empty()) @@ -418,8 +428,6 @@ bool get_PssSH_vsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char PssSH::debugName[] = "PssSH"; const char* PssSH::debugString() const { @@ -428,24 +436,24 @@ const char* PssSH::debugString() const void PssSH::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssSH"), &PssSH_factory)); + factory_map.emplace("cim:PssSH", &PssSH_factory); } void PssSH::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssSH.k"), &assign_PssSH_k)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.k0"), &assign_PssSH_k0)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.k1"), &assign_PssSH_k1)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.k2"), &assign_PssSH_k2)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.k3"), &assign_PssSH_k3)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.k4"), &assign_PssSH_k4)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.t1"), &assign_PssSH_t1)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.t2"), &assign_PssSH_t2)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.t3"), &assign_PssSH_t3)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.t4"), &assign_PssSH_t4)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.td"), &assign_PssSH_td)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.vsmax"), &assign_PssSH_vsmax)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.vsmin"), &assign_PssSH_vsmin)); + assign_map.emplace("cim:PssSH.k", &assign_PssSH_k); + assign_map.emplace("cim:PssSH.k0", &assign_PssSH_k0); + assign_map.emplace("cim:PssSH.k1", &assign_PssSH_k1); + assign_map.emplace("cim:PssSH.k2", &assign_PssSH_k2); + assign_map.emplace("cim:PssSH.k3", &assign_PssSH_k3); + assign_map.emplace("cim:PssSH.k4", &assign_PssSH_k4); + assign_map.emplace("cim:PssSH.t1", &assign_PssSH_t1); + assign_map.emplace("cim:PssSH.t2", &assign_PssSH_t2); + assign_map.emplace("cim:PssSH.t3", &assign_PssSH_t3); + assign_map.emplace("cim:PssSH.t4", &assign_PssSH_t4); + assign_map.emplace("cim:PssSH.td", &assign_PssSH_td); + assign_map.emplace("cim:PssSH.vsmax", &assign_PssSH_vsmax); + assign_map.emplace("cim:PssSH.vsmin", &assign_PssSH_vsmin); } void PssSH::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/PssSH.hpp b/CGMES_2.4.13_18DEC2013/PssSH.hpp index e08fdce49..f93e0ee7b 100644 --- a/CGMES_2.4.13_18DEC2013/PssSH.hpp +++ b/CGMES_2.4.13_18DEC2013/PssSH.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Model for Siemens "H infinity" power system stabilizer with generator electrical power input. - */ + /** \brief Model for Siemens "H infinity" power system stabilizer with generator electrical power input. */ class PssSH : public PowerSystemStabilizerDynamics { public: @@ -28,19 +26,44 @@ namespace CIMPP PssSH(); ~PssSH() override; - CIMPP::PU k; /* Main gain (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU k0; /* Gain 0 (K0). Typical Value = 0.012. Default: nullptr */ - CIMPP::PU k1; /* Gain 1 (K1). Typical Value = 0.488. Default: nullptr */ - CIMPP::PU k2; /* Gain 2 (K2). Typical Value = 0.064. Default: nullptr */ - CIMPP::PU k3; /* Gain 3 (K3). Typical Value = 0.224. Default: nullptr */ - CIMPP::PU k4; /* Gain 4 (K4). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t1; /* Time constant 1 (T1). Typical Value = 0.076. Default: nullptr */ - CIMPP::Seconds t2; /* Time constant 2 (T2). Typical Value = 0.086. Default: nullptr */ - CIMPP::Seconds t3; /* Time constant 3 (T3). Typical Value = 1.068. Default: nullptr */ - CIMPP::Seconds t4; /* Time constant 4 (T4). Typical Value = 1.913. Default: nullptr */ - CIMPP::Seconds td; /* Input time constant (Td). Typical Value = 10. Default: nullptr */ - CIMPP::PU vsmax; /* Output maximum limit (Vsmax). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU vsmin; /* Output minimum limit (Vsmin). Typical Value = -0.1. Default: nullptr */ + /** \brief Main gain (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU k; + + /** \brief Gain 0 (K0). Typical Value = 0.012. Default: nullptr */ + CIMPP::PU k0; + + /** \brief Gain 1 (K1). Typical Value = 0.488. Default: nullptr */ + CIMPP::PU k1; + + /** \brief Gain 2 (K2). Typical Value = 0.064. Default: nullptr */ + CIMPP::PU k2; + + /** \brief Gain 3 (K3). Typical Value = 0.224. Default: nullptr */ + CIMPP::PU k3; + + /** \brief Gain 4 (K4). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU k4; + + /** \brief Time constant 1 (T1). Typical Value = 0.076. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Time constant 2 (T2). Typical Value = 0.086. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Time constant 3 (T3). Typical Value = 1.068. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Time constant 4 (T4). Typical Value = 1.913. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Input time constant (Td). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Output maximum limit (Vsmax). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU vsmax; + + /** \brief Output minimum limit (Vsmin). Typical Value = -0.1. Default: nullptr */ + CIMPP::PU vsmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/PssSK.cpp b/CGMES_2.4.13_18DEC2013/PssSK.cpp index 21e59004b..1c23f5dbd 100644 --- a/CGMES_2.4.13_18DEC2013/PssSK.cpp +++ b/CGMES_2.4.13_18DEC2013/PssSK.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PssSK::PssSK() {}; -PssSK::~PssSK() {}; +PssSK::PssSK() {} +PssSK::~PssSK() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ PssSK::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssSK_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_vsmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_vsmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_vsmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_vsmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssSK_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_PssSK_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_PssSK_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_PssSK_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_PssSK_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_PssSK_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_PssSK_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_PssSK_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_PssSK_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_PssSK_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_vsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmax; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_PssSK_vsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_vsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmin; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_PssSK_vsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char PssSK::debugName[] = "PssSK"; const char* PssSK::debugString() const { @@ -370,22 +376,22 @@ const char* PssSK::debugString() const void PssSK::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssSK"), &PssSK_factory)); + factory_map.emplace("cim:PssSK", &PssSK_factory); } void PssSK::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssSK.k1"), &assign_PssSK_k1)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.k2"), &assign_PssSK_k2)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.k3"), &assign_PssSK_k3)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.t1"), &assign_PssSK_t1)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.t2"), &assign_PssSK_t2)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.t3"), &assign_PssSK_t3)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.t4"), &assign_PssSK_t4)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.t5"), &assign_PssSK_t5)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.t6"), &assign_PssSK_t6)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.vsmax"), &assign_PssSK_vsmax)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.vsmin"), &assign_PssSK_vsmin)); + assign_map.emplace("cim:PssSK.k1", &assign_PssSK_k1); + assign_map.emplace("cim:PssSK.k2", &assign_PssSK_k2); + assign_map.emplace("cim:PssSK.k3", &assign_PssSK_k3); + assign_map.emplace("cim:PssSK.t1", &assign_PssSK_t1); + assign_map.emplace("cim:PssSK.t2", &assign_PssSK_t2); + assign_map.emplace("cim:PssSK.t3", &assign_PssSK_t3); + assign_map.emplace("cim:PssSK.t4", &assign_PssSK_t4); + assign_map.emplace("cim:PssSK.t5", &assign_PssSK_t5); + assign_map.emplace("cim:PssSK.t6", &assign_PssSK_t6); + assign_map.emplace("cim:PssSK.vsmax", &assign_PssSK_vsmax); + assign_map.emplace("cim:PssSK.vsmin", &assign_PssSK_vsmin); } void PssSK::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/PssSK.hpp b/CGMES_2.4.13_18DEC2013/PssSK.hpp index 285b28244..1af0641d1 100644 --- a/CGMES_2.4.13_18DEC2013/PssSK.hpp +++ b/CGMES_2.4.13_18DEC2013/PssSK.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - PSS Slovakian type - three inputs. - */ + /** \brief PSS Slovakian type - three inputs. */ class PssSK : public PowerSystemStabilizerDynamics { public: @@ -28,17 +26,38 @@ namespace CIMPP PssSK(); ~PssSK() override; - CIMPP::PU k1; /* Gain P (K1). Typical Value = -0.3. Default: nullptr */ - CIMPP::PU k2; /* Gain fe (K2). Typical Value = -0.15. Default: nullptr */ - CIMPP::PU k3; /* Gain If (K3). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds t1; /* Denominator time constant (T1). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds t2; /* Filter time constant (T2). Typical Value = 0.35. Default: nullptr */ - CIMPP::Seconds t3; /* Denominator time constant (T3). Typical Value = 0.22. Default: nullptr */ - CIMPP::Seconds t4; /* Filter time constant (T4). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds t5; /* Denominator time constant (T5). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds t6; /* Filter time constant (T6). Typical Value = 0.02. Default: nullptr */ - CIMPP::PU vsmax; /* Stabilizer output max limit (Vsmax). Typical Value = 0.4. Default: nullptr */ - CIMPP::PU vsmin; /* Stabilizer output min limit (Vsmin). Typical Value = -0.4. Default: nullptr */ + /** \brief Gain P (K1). Typical Value = -0.3. Default: nullptr */ + CIMPP::PU k1; + + /** \brief Gain fe (K2). Typical Value = -0.15. Default: nullptr */ + CIMPP::PU k2; + + /** \brief Gain If (K3). Typical Value = 10. Default: nullptr */ + CIMPP::PU k3; + + /** \brief Denominator time constant (T1). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Filter time constant (T2). Typical Value = 0.35. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Denominator time constant (T3). Typical Value = 0.22. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Filter time constant (T4). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Denominator time constant (T5). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Filter time constant (T6). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Stabilizer output max limit (Vsmax). Typical Value = 0.4. Default: nullptr */ + CIMPP::PU vsmax; + + /** \brief Stabilizer output min limit (Vsmin). Typical Value = -0.4. Default: nullptr */ + CIMPP::PU vsmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/PssWECC.cpp b/CGMES_2.4.13_18DEC2013/PssWECC.cpp index 40f8e2a16..e3044b133 100644 --- a/CGMES_2.4.13_18DEC2013/PssWECC.cpp +++ b/CGMES_2.4.13_18DEC2013/PssWECC.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "InputSignalKind.hpp" -#include "InputSignalKind.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PssWECC::PssWECC() {}; -PssWECC::~PssWECC() {}; +PssWECC::PssWECC() {} +PssWECC::~PssWECC() {} static const std::list PossibleProfilesForClass = { @@ -74,246 +56,292 @@ PssWECC::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssWECC_inputSignal1Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_inputSignal1Type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal1Type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_inputSignal2Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_inputSignal2Type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal2Type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_vcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_vcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vcl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_vcu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_vcu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vcu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_vsmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_vsmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_vsmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_vsmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } +bool get_PssWECC_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignal1Type; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} +bool get_PssWECC_inputSignal2Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignal2Type; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} bool get_PssWECC_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -327,7 +355,8 @@ bool get_PssWECC_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -341,7 +370,8 @@ bool get_PssWECC_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -355,7 +385,8 @@ bool get_PssWECC_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t10; if (!buffer.str().empty()) @@ -369,7 +400,8 @@ bool get_PssWECC_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -383,7 +415,8 @@ bool get_PssWECC_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -397,7 +430,8 @@ bool get_PssWECC_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -411,7 +445,8 @@ bool get_PssWECC_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -425,7 +460,8 @@ bool get_PssWECC_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -439,7 +475,8 @@ bool get_PssWECC_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t7; if (!buffer.str().empty()) @@ -453,7 +490,8 @@ bool get_PssWECC_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t8; if (!buffer.str().empty()) @@ -467,7 +505,8 @@ bool get_PssWECC_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t9; if (!buffer.str().empty()) @@ -481,7 +520,8 @@ bool get_PssWECC_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_vcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vcl; if (!buffer.str().empty()) @@ -495,7 +535,8 @@ bool get_PssWECC_vcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_vcu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vcu; if (!buffer.str().empty()) @@ -509,7 +550,8 @@ bool get_PssWECC_vcu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_vsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmax; if (!buffer.str().empty()) @@ -523,7 +565,8 @@ bool get_PssWECC_vsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssWECC_vsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmin; if (!buffer.str().empty()) @@ -535,36 +578,6 @@ bool get_PssWECC_vsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - -bool get_PssWECC_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignal1Type; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - -bool get_PssWECC_inputSignal2Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignal2Type; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char PssWECC::debugName[] = "PssWECC"; const char* PssWECC::debugString() const { @@ -573,29 +586,29 @@ const char* PssWECC::debugString() const void PssWECC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssWECC"), &PssWECC_factory)); + factory_map.emplace("cim:PssWECC", &PssWECC_factory); } void PssWECC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssWECC.inputSignal1Type"), &assign_PssWECC_inputSignal1Type)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.inputSignal2Type"), &assign_PssWECC_inputSignal2Type)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.k1"), &assign_PssWECC_k1)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.k2"), &assign_PssWECC_k2)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t1"), &assign_PssWECC_t1)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t10"), &assign_PssWECC_t10)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t2"), &assign_PssWECC_t2)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t3"), &assign_PssWECC_t3)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t4"), &assign_PssWECC_t4)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t5"), &assign_PssWECC_t5)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t6"), &assign_PssWECC_t6)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t7"), &assign_PssWECC_t7)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t8"), &assign_PssWECC_t8)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t9"), &assign_PssWECC_t9)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.vcl"), &assign_PssWECC_vcl)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.vcu"), &assign_PssWECC_vcu)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.vsmax"), &assign_PssWECC_vsmax)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.vsmin"), &assign_PssWECC_vsmin)); + assign_map.emplace("cim:PssWECC.inputSignal1Type", &assign_PssWECC_inputSignal1Type); + assign_map.emplace("cim:PssWECC.inputSignal2Type", &assign_PssWECC_inputSignal2Type); + assign_map.emplace("cim:PssWECC.k1", &assign_PssWECC_k1); + assign_map.emplace("cim:PssWECC.k2", &assign_PssWECC_k2); + assign_map.emplace("cim:PssWECC.t1", &assign_PssWECC_t1); + assign_map.emplace("cim:PssWECC.t10", &assign_PssWECC_t10); + assign_map.emplace("cim:PssWECC.t2", &assign_PssWECC_t2); + assign_map.emplace("cim:PssWECC.t3", &assign_PssWECC_t3); + assign_map.emplace("cim:PssWECC.t4", &assign_PssWECC_t4); + assign_map.emplace("cim:PssWECC.t5", &assign_PssWECC_t5); + assign_map.emplace("cim:PssWECC.t6", &assign_PssWECC_t6); + assign_map.emplace("cim:PssWECC.t7", &assign_PssWECC_t7); + assign_map.emplace("cim:PssWECC.t8", &assign_PssWECC_t8); + assign_map.emplace("cim:PssWECC.t9", &assign_PssWECC_t9); + assign_map.emplace("cim:PssWECC.vcl", &assign_PssWECC_vcl); + assign_map.emplace("cim:PssWECC.vcu", &assign_PssWECC_vcu); + assign_map.emplace("cim:PssWECC.vsmax", &assign_PssWECC_vsmax); + assign_map.emplace("cim:PssWECC.vsmin", &assign_PssWECC_vsmin); } void PssWECC::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/PssWECC.hpp b/CGMES_2.4.13_18DEC2013/PssWECC.hpp index 4edb4f4af..a5bb2c5de 100644 --- a/CGMES_2.4.13_18DEC2013/PssWECC.hpp +++ b/CGMES_2.4.13_18DEC2013/PssWECC.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Dual input Power System Stabilizer, based on IEEE type 2, with modified output limiter defined by WECC (Western Electricity Coordinating Council, USA). - */ + /** \brief Dual input Power System Stabilizer, based on IEEE type 2, with modified output limiter defined by WECC (Western Electricity Coordinating Council, USA). */ class PssWECC : public PowerSystemStabilizerDynamics { public: @@ -29,24 +27,59 @@ namespace CIMPP PssWECC(); ~PssWECC() override; - CIMPP::InputSignalKind inputSignal1Type; /* Type of input signal #1. Default: 0 */ - CIMPP::InputSignalKind inputSignal2Type; /* Type of input signal #2. Default: 0 */ - CIMPP::PU k1; /* Input signal 1 gain (K). Default: nullptr */ - CIMPP::PU k2; /* Input signal 2 gain (K). Default: nullptr */ - CIMPP::Seconds t1; /* Input signal 1 transducer time constant (T). Default: nullptr */ - CIMPP::Seconds t10; /* Lag time constant (T). Default: nullptr */ - CIMPP::Seconds t2; /* Input signal 2 transducer time constant (T). Default: nullptr */ - CIMPP::Seconds t3; /* Stabilizer washout time constant (T). Default: nullptr */ - CIMPP::Seconds t4; /* Stabilizer washout time lag constant (T) (>0). Default: nullptr */ - CIMPP::Seconds t5; /* Lead time constant (T). Default: nullptr */ - CIMPP::Seconds t6; /* Lag time constant (T). Default: nullptr */ - CIMPP::Seconds t7; /* Lead time constant (T). Default: nullptr */ - CIMPP::Seconds t8; /* Lag time constant (T). Default: nullptr */ - CIMPP::Seconds t9; /* Lead time constant (T). Default: nullptr */ - CIMPP::PU vcl; /* Minimum value for voltage compensator output (V). Default: nullptr */ - CIMPP::PU vcu; /* Maximum value for voltage compensator output (V). Default: nullptr */ - CIMPP::PU vsmax; /* Maximum output signal (Vsmax). Default: nullptr */ - CIMPP::PU vsmin; /* Minimum output signal (Vsmin). Default: nullptr */ + /** \brief Type of input signal #1. Default: 0 */ + CIMPP::InputSignalKind inputSignal1Type; + + /** \brief Type of input signal #2. Default: 0 */ + CIMPP::InputSignalKind inputSignal2Type; + + /** \brief Input signal 1 gain (K). Default: nullptr */ + CIMPP::PU k1; + + /** \brief Input signal 2 gain (K). Default: nullptr */ + CIMPP::PU k2; + + /** \brief Input signal 1 transducer time constant (T). Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Lag time constant (T). Default: nullptr */ + CIMPP::Seconds t10; + + /** \brief Input signal 2 transducer time constant (T). Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Stabilizer washout time constant (T). Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Stabilizer washout time lag constant (T) (>0). Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Lead time constant (T). Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Lag time constant (T). Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Lead time constant (T). Default: nullptr */ + CIMPP::Seconds t7; + + /** \brief Lag time constant (T). Default: nullptr */ + CIMPP::Seconds t8; + + /** \brief Lead time constant (T). Default: nullptr */ + CIMPP::Seconds t9; + + /** \brief Minimum value for voltage compensator output (V). Default: nullptr */ + CIMPP::PU vcl; + + /** \brief Maximum value for voltage compensator output (V). Default: nullptr */ + CIMPP::PU vcu; + + /** \brief Maximum output signal (Vsmax). Default: nullptr */ + CIMPP::PU vsmax; + + /** \brief Minimum output signal (Vsmin). Default: nullptr */ + CIMPP::PU vsmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Quality61850.cpp b/CGMES_2.4.13_18DEC2013/Quality61850.cpp index 9771f8dda..99169f619 100644 --- a/CGMES_2.4.13_18DEC2013/Quality61850.cpp +++ b/CGMES_2.4.13_18DEC2013/Quality61850.cpp @@ -8,23 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Source.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Validity.hpp" using namespace CIMPP; -Quality61850::Quality61850() {}; -Quality61850::~Quality61850() {}; +Quality61850::Quality61850() {} +Quality61850::~Quality61850() {} static const std::list PossibleProfilesForClass = { @@ -62,168 +50,178 @@ Quality61850::getPossibleProfilesForAttributes() const return map; } - -bool assign_Quality61850_badReference(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_badReference(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->badReference; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_estimatorReplaced(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_estimatorReplaced(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->estimatorReplaced; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_failure(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_failure(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->failure; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_oldData(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_oldData(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->oldData; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_operatorBlocked(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_operatorBlocked(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->operatorBlocked; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_oscillatory(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_oscillatory(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->oscillatory; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_outOfRange(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_outOfRange(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->outOfRange; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_overFlow(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_overFlow(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->overFlow; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_source(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_source(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->source; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_suspect(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_suspect(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->suspect; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_test(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_test(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->test; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_validity(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_validity(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->validity; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_Quality61850_badReference(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->badReference; if (!buffer.str().empty()) @@ -237,7 +235,8 @@ bool get_Quality61850_badReference(const BaseClass* BaseClass_ptr1, std::strings bool get_Quality61850_estimatorReplaced(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->estimatorReplaced; if (!buffer.str().empty()) @@ -251,7 +250,8 @@ bool get_Quality61850_estimatorReplaced(const BaseClass* BaseClass_ptr1, std::st bool get_Quality61850_failure(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->failure; if (!buffer.str().empty()) @@ -265,7 +265,8 @@ bool get_Quality61850_failure(const BaseClass* BaseClass_ptr1, std::stringstream bool get_Quality61850_oldData(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->oldData; if (!buffer.str().empty()) @@ -279,7 +280,8 @@ bool get_Quality61850_oldData(const BaseClass* BaseClass_ptr1, std::stringstream bool get_Quality61850_operatorBlocked(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->operatorBlocked; if (!buffer.str().empty()) @@ -293,7 +295,8 @@ bool get_Quality61850_operatorBlocked(const BaseClass* BaseClass_ptr1, std::stri bool get_Quality61850_oscillatory(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->oscillatory; if (!buffer.str().empty()) @@ -307,7 +310,8 @@ bool get_Quality61850_oscillatory(const BaseClass* BaseClass_ptr1, std::stringst bool get_Quality61850_outOfRange(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->outOfRange; if (!buffer.str().empty()) @@ -321,7 +325,8 @@ bool get_Quality61850_outOfRange(const BaseClass* BaseClass_ptr1, std::stringstr bool get_Quality61850_overFlow(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->overFlow; if (!buffer.str().empty()) @@ -333,11 +338,12 @@ bool get_Quality61850_overFlow(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } -bool get_Quality61850_suspect(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_Quality61850_source(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->suspect; + buffer << element->source; if (!buffer.str().empty()) { return true; @@ -347,11 +353,12 @@ bool get_Quality61850_suspect(const BaseClass* BaseClass_ptr1, std::stringstream return false; } -bool get_Quality61850_test(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_Quality61850_suspect(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->test; + buffer << element->suspect; if (!buffer.str().empty()) { return true; @@ -361,13 +368,12 @@ bool get_Quality61850_test(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - -bool get_Quality61850_source(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_Quality61850_test(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->source; + buffer << element->test; if (!buffer.str().empty()) { return true; @@ -379,7 +385,8 @@ bool get_Quality61850_source(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_Quality61850_validity(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->validity; if (!buffer.str().empty()) @@ -399,23 +406,23 @@ const char* Quality61850::debugString() const void Quality61850::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Quality61850"), &Quality61850_factory)); + factory_map.emplace("cim:Quality61850", &Quality61850_factory); } void Quality61850::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Quality61850.badReference"), &assign_Quality61850_badReference)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.estimatorReplaced"), &assign_Quality61850_estimatorReplaced)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.failure"), &assign_Quality61850_failure)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.oldData"), &assign_Quality61850_oldData)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.operatorBlocked"), &assign_Quality61850_operatorBlocked)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.oscillatory"), &assign_Quality61850_oscillatory)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.outOfRange"), &assign_Quality61850_outOfRange)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.overFlow"), &assign_Quality61850_overFlow)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.source"), &assign_Quality61850_source)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.suspect"), &assign_Quality61850_suspect)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.test"), &assign_Quality61850_test)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.validity"), &assign_Quality61850_validity)); + assign_map.emplace("cim:Quality61850.badReference", &assign_Quality61850_badReference); + assign_map.emplace("cim:Quality61850.estimatorReplaced", &assign_Quality61850_estimatorReplaced); + assign_map.emplace("cim:Quality61850.failure", &assign_Quality61850_failure); + assign_map.emplace("cim:Quality61850.oldData", &assign_Quality61850_oldData); + assign_map.emplace("cim:Quality61850.operatorBlocked", &assign_Quality61850_operatorBlocked); + assign_map.emplace("cim:Quality61850.oscillatory", &assign_Quality61850_oscillatory); + assign_map.emplace("cim:Quality61850.outOfRange", &assign_Quality61850_outOfRange); + assign_map.emplace("cim:Quality61850.overFlow", &assign_Quality61850_overFlow); + assign_map.emplace("cim:Quality61850.source", &assign_Quality61850_source); + assign_map.emplace("cim:Quality61850.suspect", &assign_Quality61850_suspect); + assign_map.emplace("cim:Quality61850.test", &assign_Quality61850_test); + assign_map.emplace("cim:Quality61850.validity", &assign_Quality61850_validity); } void Quality61850::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/Quality61850.hpp b/CGMES_2.4.13_18DEC2013/Quality61850.hpp index 84109cd81..455802f53 100644 --- a/CGMES_2.4.13_18DEC2013/Quality61850.hpp +++ b/CGMES_2.4.13_18DEC2013/Quality61850.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Quality flags in this class are as defined in IEC 61850, except for estimatorReplaced, which has been included in this class for convenience. - */ + /** \brief Quality flags in this class are as defined in IEC 61850, except for estimatorReplaced, which has been included in this class for convenience. */ class Quality61850 : public BaseClass { public: @@ -29,18 +27,41 @@ namespace CIMPP Quality61850(); ~Quality61850() override; - CIMPP::Boolean badReference; /* Measurement value may be incorrect due to a reference being out of calibration. Default: false */ - CIMPP::Boolean estimatorReplaced; /* Value has been replaced by State Estimator. estimatorReplaced is not an IEC61850 quality bit but has been put in this class for convenience. Default: false */ - CIMPP::Boolean failure; /* This identifier indicates that a supervision function has detected an internal or external failure, e.g. communication failure. Default: false */ - CIMPP::Boolean oldData; /* Measurement value is old and possibly invalid, as it has not been successfully updated during a specified time interval. Default: false */ - CIMPP::Boolean operatorBlocked; /* Measurement value is blocked and hence unavailable for transmission. Default: false */ - CIMPP::Boolean oscillatory; /* To prevent some overload of the communication it is sensible to detect and suppress oscillating (fast changing) binary inputs. If a signal changes in a defined time (tosc) twice in the same direction (from 0 to 1 or from 1 to 0) then oscillation is detected and the detail quality identifier `oscillatory` is set. If it is detected a configured numbers of transient changes could be passed by. In this time the validity status `questionable` is set. If after this defined numbers of changes the signal is still in the oscillating state the value shall be set either to the opposite state of the previous stable value or to a defined default value. In this case the validity status `questionable` is reset and `invalid` is set as long as the signal is oscillating. If it is configured such that no transient changes should be passed by then the validity status `invalid` is set immediately in addition to the detail quality identifier `oscillatory` (used for status information only). Default: false */ - CIMPP::Boolean outOfRange; /* Measurement value is beyond a predefined range of value. Default: false */ - CIMPP::Boolean overFlow; /* Measurement value is beyond the capability of being represented properly. For example, a counter value overflows from maximum count back to a value of zero. Default: false */ - CIMPP::Source source; /* Source gives information related to the origin of a value. The value may be acquired from the process, defaulted or substituted. Default: 0 */ - CIMPP::Boolean suspect; /* A correlation function has detected that the value is not consitent with other values. Typically set by a network State Estimator. Default: false */ - CIMPP::Boolean test; /* Measurement value is transmitted for test purposes. Default: false */ - CIMPP::Validity validity; /* Validity of the measurement value. Default: 0 */ + /** \brief Measurement value may be incorrect due to a reference being out of calibration. Default: false */ + CIMPP::Boolean badReference; + + /** \brief Value has been replaced by State Estimator. estimatorReplaced is not an IEC61850 quality bit but has been put in this class for convenience. Default: false */ + CIMPP::Boolean estimatorReplaced; + + /** \brief This identifier indicates that a supervision function has detected an internal or external failure, e.g. communication failure. Default: false */ + CIMPP::Boolean failure; + + /** \brief Measurement value is old and possibly invalid, as it has not been successfully updated during a specified time interval. Default: false */ + CIMPP::Boolean oldData; + + /** \brief Measurement value is blocked and hence unavailable for transmission. Default: false */ + CIMPP::Boolean operatorBlocked; + + /** \brief To prevent some overload of the communication it is sensible to detect and suppress oscillating (fast changing) binary inputs. If a signal changes in a defined time (tosc) twice in the same direction (from 0 to 1 or from 1 to 0) then oscillation is detected and the detail quality identifier `oscillatory` is set. If it is detected a configured numbers of transient changes could be passed by. In this time the validity status `questionable` is set. If after this defined numbers of changes the signal is still in the oscillating state the value shall be set either to the opposite state of the previous stable value or to a defined default value. In this case the validity status `questionable` is reset and `invalid` is set as long as the signal is oscillating. If it is configured such that no transient changes should be passed by then the validity status `invalid` is set immediately in addition to the detail quality identifier `oscillatory` (used for status information only). Default: false */ + CIMPP::Boolean oscillatory; + + /** \brief Measurement value is beyond a predefined range of value. Default: false */ + CIMPP::Boolean outOfRange; + + /** \brief Measurement value is beyond the capability of being represented properly. For example, a counter value overflows from maximum count back to a value of zero. Default: false */ + CIMPP::Boolean overFlow; + + /** \brief Source gives information related to the origin of a value. The value may be acquired from the process, defaulted or substituted. Default: 0 */ + CIMPP::Source source; + + /** \brief A correlation function has detected that the value is not consitent with other values. Typically set by a network State Estimator. Default: false */ + CIMPP::Boolean suspect; + + /** \brief Measurement value is transmitted for test purposes. Default: false */ + CIMPP::Boolean test; + + /** \brief Validity of the measurement value. Default: 0 */ + CIMPP::Validity validity; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/RaiseLowerCommand.cpp b/CGMES_2.4.13_18DEC2013/RaiseLowerCommand.cpp index ba30e7516..59622eff6 100644 --- a/CGMES_2.4.13_18DEC2013/RaiseLowerCommand.cpp +++ b/CGMES_2.4.13_18DEC2013/RaiseLowerCommand.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -RaiseLowerCommand::RaiseLowerCommand() : ValueAliasSet(nullptr) {}; -RaiseLowerCommand::~RaiseLowerCommand() {}; +RaiseLowerCommand::RaiseLowerCommand() : ValueAliasSet(nullptr) {} +RaiseLowerCommand::~RaiseLowerCommand() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ RaiseLowerCommand::getPossibleProfilesForAttributes() const return map; } - - bool assign_ValueAliasSet_RaiseLowerCommands(BaseClass*, BaseClass*); bool assign_RaiseLowerCommand_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_RaiseLowerCommand_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass return false; } - bool get_RaiseLowerCommand_ValueAliasSet(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RaiseLowerCommand* element = dynamic_cast(BaseClass_ptr1)) + const RaiseLowerCommand* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ValueAliasSet != 0) { @@ -73,7 +71,6 @@ bool get_RaiseLowerCommand_ValueAliasSet(const BaseClass* BaseClass_ptr1, std::l return false; } - const char RaiseLowerCommand::debugName[] = "RaiseLowerCommand"; const char* RaiseLowerCommand::debugString() const { @@ -82,7 +79,7 @@ const char* RaiseLowerCommand::debugString() const void RaiseLowerCommand::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RaiseLowerCommand"), &RaiseLowerCommand_factory)); + factory_map.emplace("cim:RaiseLowerCommand", &RaiseLowerCommand_factory); } void RaiseLowerCommand::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void RaiseLowerCommand::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RaiseLowerCommand.ValueAliasSet"), &assign_RaiseLowerCommand_ValueAliasSet)); + assign_map.emplace("cim:RaiseLowerCommand.ValueAliasSet", &assign_RaiseLowerCommand_ValueAliasSet); } void RaiseLowerCommand::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/RaiseLowerCommand.hpp b/CGMES_2.4.13_18DEC2013/RaiseLowerCommand.hpp index a6b9dba1e..97530d3cb 100644 --- a/CGMES_2.4.13_18DEC2013/RaiseLowerCommand.hpp +++ b/CGMES_2.4.13_18DEC2013/RaiseLowerCommand.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class ValueAliasSet; - /* - An analog control that increase or decrease a set point value with pulses. - */ + /** \brief An analog control that increase or decrease a set point value with pulses. */ class RaiseLowerCommand : public AnalogControl { public: @@ -27,7 +25,8 @@ namespace CIMPP RaiseLowerCommand(); ~RaiseLowerCommand() override; - CIMPP::ValueAliasSet* ValueAliasSet; /* The ValueAliasSet used for translation of a Control value to a name. Default: 0 */ + /** \brief The ValueAliasSet used for translation of a Control value to a name. Default: 0 */ + CIMPP::ValueAliasSet* ValueAliasSet; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/RatioTapChanger.cpp b/CGMES_2.4.13_18DEC2013/RatioTapChanger.cpp index 738ea09ad..caab6003e 100644 --- a/CGMES_2.4.13_18DEC2013/RatioTapChanger.cpp +++ b/CGMES_2.4.13_18DEC2013/RatioTapChanger.cpp @@ -10,13 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "RatioTapChangerTable.hpp" #include "TransformerEnd.hpp" -#include "PerCent.hpp" -#include "TransformerControlMode.hpp" using namespace CIMPP; -RatioTapChanger::RatioTapChanger() : RatioTapChangerTable(nullptr), TransformerEnd(nullptr) {}; -RatioTapChanger::~RatioTapChanger() {}; +RatioTapChanger::RatioTapChanger() : RatioTapChangerTable(nullptr), TransformerEnd(nullptr) {} +RatioTapChanger::~RatioTapChanger() {} static const std::list PossibleProfilesForClass = { @@ -46,34 +44,6 @@ RatioTapChanger::getPossibleProfilesForAttributes() const return map; } - -bool assign_RatioTapChanger_stepVoltageIncrement(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (RatioTapChanger* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->stepVoltageIncrement; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_RatioTapChanger_tculControlMode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (RatioTapChanger* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->tculControlMode; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_RatioTapChangerTable_RatioTapChanger(BaseClass*, BaseClass*); bool assign_RatioTapChanger_RatioTapChangerTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -90,6 +60,7 @@ bool assign_RatioTapChanger_RatioTapChangerTable(BaseClass* BaseClass_ptr1, Base } return false; } + bool assign_TransformerEnd_RatioTapChanger(BaseClass*, BaseClass*); bool assign_RatioTapChanger_TransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -107,24 +78,38 @@ bool assign_RatioTapChanger_TransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* return false; } -bool get_RatioTapChanger_stepVoltageIncrement(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_RatioTapChanger_stepVoltageIncrement(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const RatioTapChanger* element = dynamic_cast(BaseClass_ptr1)) + RatioTapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->stepVoltageIncrement; - if (!buffer.str().empty()) + buffer >> element->stepVoltageIncrement; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } +bool assign_RatioTapChanger_tculControlMode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + RatioTapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->tculControlMode; + if (!buffer.fail()) + { + return true; + } + } + return false; +} bool get_RatioTapChanger_RatioTapChangerTable(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RatioTapChanger* element = dynamic_cast(BaseClass_ptr1)) + const RatioTapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->RatioTapChangerTable != 0) { @@ -137,7 +122,8 @@ bool get_RatioTapChanger_RatioTapChangerTable(const BaseClass* BaseClass_ptr1, s bool get_RatioTapChanger_TransformerEnd(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RatioTapChanger* element = dynamic_cast(BaseClass_ptr1)) + const RatioTapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->TransformerEnd != 0) { @@ -148,10 +134,25 @@ bool get_RatioTapChanger_TransformerEnd(const BaseClass* BaseClass_ptr1, std::li return false; } +bool get_RatioTapChanger_stepVoltageIncrement(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const RatioTapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->stepVoltageIncrement; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} bool get_RatioTapChanger_tculControlMode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RatioTapChanger* element = dynamic_cast(BaseClass_ptr1)) + const RatioTapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tculControlMode; if (!buffer.str().empty()) @@ -171,19 +172,19 @@ const char* RatioTapChanger::debugString() const void RatioTapChanger::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RatioTapChanger"), &RatioTapChanger_factory)); + factory_map.emplace("cim:RatioTapChanger", &RatioTapChanger_factory); } void RatioTapChanger::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RatioTapChanger.stepVoltageIncrement"), &assign_RatioTapChanger_stepVoltageIncrement)); - assign_map.insert(std::make_pair(std::string("cim:RatioTapChanger.tculControlMode"), &assign_RatioTapChanger_tculControlMode)); + assign_map.emplace("cim:RatioTapChanger.stepVoltageIncrement", &assign_RatioTapChanger_stepVoltageIncrement); + assign_map.emplace("cim:RatioTapChanger.tculControlMode", &assign_RatioTapChanger_tculControlMode); } void RatioTapChanger::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RatioTapChanger.RatioTapChangerTable"), &assign_RatioTapChanger_RatioTapChangerTable)); - assign_map.insert(std::make_pair(std::string("cim:RatioTapChanger.TransformerEnd"), &assign_RatioTapChanger_TransformerEnd)); + assign_map.emplace("cim:RatioTapChanger.RatioTapChangerTable", &assign_RatioTapChanger_RatioTapChangerTable); + assign_map.emplace("cim:RatioTapChanger.TransformerEnd", &assign_RatioTapChanger_TransformerEnd); } void RatioTapChanger::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/RatioTapChanger.hpp b/CGMES_2.4.13_18DEC2013/RatioTapChanger.hpp index 9e01cd807..fafbcad25 100644 --- a/CGMES_2.4.13_18DEC2013/RatioTapChanger.hpp +++ b/CGMES_2.4.13_18DEC2013/RatioTapChanger.hpp @@ -20,9 +20,7 @@ namespace CIMPP class RatioTapChangerTable; class TransformerEnd; - /* - A tap changer that changes the voltage ratio impacting the voltage magnitude but not the phase angle across the transformer. - */ + /** \brief A tap changer that changes the voltage ratio impacting the voltage magnitude but not the phase angle across the transformer. */ class RatioTapChanger : public TapChanger { public: @@ -30,10 +28,17 @@ namespace CIMPP RatioTapChanger(); ~RatioTapChanger() override; - CIMPP::RatioTapChangerTable* RatioTapChangerTable; /* The ratio tap changer of this tap ratio table. Default: 0 */ - CIMPP::TransformerEnd* TransformerEnd; /* Ratio tap changer associated with this transformer end. Default: 0 */ - CIMPP::PerCent stepVoltageIncrement; /* Tap step increment, in per cent of nominal voltage, per step position. Default: nullptr */ - CIMPP::TransformerControlMode tculControlMode; /* Specifies the regulation control mode (voltage or reactive) of the RatioTapChanger. Default: 0 */ + /** \brief The ratio tap changer of this tap ratio table. Default: 0 */ + CIMPP::RatioTapChangerTable* RatioTapChangerTable; + + /** \brief Ratio tap changer associated with this transformer end. Default: 0 */ + CIMPP::TransformerEnd* TransformerEnd; + + /** \brief Tap step increment, in per cent of nominal voltage, per step position. Default: nullptr */ + CIMPP::PerCent stepVoltageIncrement; + + /** \brief Specifies the regulation control mode (voltage or reactive) of the RatioTapChanger. Default: 0 */ + CIMPP::TransformerControlMode tculControlMode; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/RatioTapChangerTable.cpp b/CGMES_2.4.13_18DEC2013/RatioTapChangerTable.cpp index 3088057a7..1c743986f 100644 --- a/CGMES_2.4.13_18DEC2013/RatioTapChangerTable.cpp +++ b/CGMES_2.4.13_18DEC2013/RatioTapChangerTable.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -RatioTapChangerTable::RatioTapChangerTable() {}; -RatioTapChangerTable::~RatioTapChangerTable() {}; +RatioTapChangerTable::RatioTapChangerTable() {} +RatioTapChangerTable::~RatioTapChangerTable() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ RatioTapChangerTable::getPossibleProfilesForAttributes() const return map; } - - bool assign_RatioTapChanger_RatioTapChangerTable(BaseClass*, BaseClass*); bool assign_RatioTapChangerTable_RatioTapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_RatioTapChangerTable_RatioTapChanger(BaseClass* BaseClass_ptr1, Base } return false; } + bool assign_RatioTapChangerTablePoint_RatioTapChangerTable(BaseClass*, BaseClass*); bool assign_RatioTapChangerTable_RatioTapChangerTablePoint(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -87,7 +86,7 @@ const char* RatioTapChangerTable::debugString() const void RatioTapChangerTable::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RatioTapChangerTable"), &RatioTapChangerTable_factory)); + factory_map.emplace("cim:RatioTapChangerTable", &RatioTapChangerTable_factory); } void RatioTapChangerTable::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -96,8 +95,8 @@ void RatioTapChangerTable::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RatioTapChangerTable.RatioTapChanger"), &assign_RatioTapChangerTable_RatioTapChanger)); - assign_map.insert(std::make_pair(std::string("cim:RatioTapChangerTable.RatioTapChangerTablePoint"), &assign_RatioTapChangerTable_RatioTapChangerTablePoint)); + assign_map.emplace("cim:RatioTapChangerTable.RatioTapChanger", &assign_RatioTapChangerTable_RatioTapChanger); + assign_map.emplace("cim:RatioTapChangerTable.RatioTapChangerTablePoint", &assign_RatioTapChangerTable_RatioTapChangerTablePoint); } void RatioTapChangerTable::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/RatioTapChangerTable.hpp b/CGMES_2.4.13_18DEC2013/RatioTapChangerTable.hpp index 932fd0e42..fdb0e4be4 100644 --- a/CGMES_2.4.13_18DEC2013/RatioTapChangerTable.hpp +++ b/CGMES_2.4.13_18DEC2013/RatioTapChangerTable.hpp @@ -18,9 +18,7 @@ namespace CIMPP class RatioTapChanger; class RatioTapChangerTablePoint; - /* - Describes a curve for how the voltage magnitude and impedance varies with the tap step. - */ + /** \brief Describes a curve for how the voltage magnitude and impedance varies with the tap step. */ class RatioTapChangerTable : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP RatioTapChangerTable(); ~RatioTapChangerTable() override; - std::list RatioTapChanger; /* The tap ratio table for this ratio tap changer. Default: 0 */ - std::list RatioTapChangerTablePoint; /* Table of this point. Default: 0 */ + /** \brief The tap ratio table for this ratio tap changer. Default: 0 */ + std::list RatioTapChanger; + + /** \brief Table of this point. Default: 0 */ + std::list RatioTapChangerTablePoint; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/RatioTapChangerTablePoint.cpp b/CGMES_2.4.13_18DEC2013/RatioTapChangerTablePoint.cpp index 358496d9f..fb837e687 100644 --- a/CGMES_2.4.13_18DEC2013/RatioTapChangerTablePoint.cpp +++ b/CGMES_2.4.13_18DEC2013/RatioTapChangerTablePoint.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -RatioTapChangerTablePoint::RatioTapChangerTablePoint() : RatioTapChangerTable(nullptr) {}; -RatioTapChangerTablePoint::~RatioTapChangerTablePoint() {}; +RatioTapChangerTablePoint::RatioTapChangerTablePoint() : RatioTapChangerTable(nullptr) {} +RatioTapChangerTablePoint::~RatioTapChangerTablePoint() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ RatioTapChangerTablePoint::getPossibleProfilesForAttributes() const return map; } - - bool assign_RatioTapChangerTable_RatioTapChangerTablePoint(BaseClass*, BaseClass*); bool assign_RatioTapChangerTablePoint_RatioTapChangerTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_RatioTapChangerTablePoint_RatioTapChangerTable(BaseClass* BaseClass_ return false; } - bool get_RatioTapChangerTablePoint_RatioTapChangerTable(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RatioTapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + const RatioTapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->RatioTapChangerTable != 0) { @@ -73,7 +71,6 @@ bool get_RatioTapChangerTablePoint_RatioTapChangerTable(const BaseClass* BaseCla return false; } - const char RatioTapChangerTablePoint::debugName[] = "RatioTapChangerTablePoint"; const char* RatioTapChangerTablePoint::debugString() const { @@ -82,7 +79,7 @@ const char* RatioTapChangerTablePoint::debugString() const void RatioTapChangerTablePoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RatioTapChangerTablePoint"), &RatioTapChangerTablePoint_factory)); + factory_map.emplace("cim:RatioTapChangerTablePoint", &RatioTapChangerTablePoint_factory); } void RatioTapChangerTablePoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void RatioTapChangerTablePoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RatioTapChangerTablePoint.RatioTapChangerTable"), &assign_RatioTapChangerTablePoint_RatioTapChangerTable)); + assign_map.emplace("cim:RatioTapChangerTablePoint.RatioTapChangerTable", &assign_RatioTapChangerTablePoint_RatioTapChangerTable); } void RatioTapChangerTablePoint::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/RatioTapChangerTablePoint.hpp b/CGMES_2.4.13_18DEC2013/RatioTapChangerTablePoint.hpp index fb2c87124..a2a695328 100644 --- a/CGMES_2.4.13_18DEC2013/RatioTapChangerTablePoint.hpp +++ b/CGMES_2.4.13_18DEC2013/RatioTapChangerTablePoint.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class RatioTapChangerTable; - /* - Describes each tap step in the ratio tap changer tabular curve. - */ + /** \brief Describes each tap step in the ratio tap changer tabular curve. */ class RatioTapChangerTablePoint : public TapChangerTablePoint { public: @@ -27,7 +25,8 @@ namespace CIMPP RatioTapChangerTablePoint(); ~RatioTapChangerTablePoint() override; - CIMPP::RatioTapChangerTable* RatioTapChangerTable; /* Points of this table. Default: 0 */ + /** \brief Points of this table. Default: 0 */ + CIMPP::RatioTapChangerTable* RatioTapChangerTable; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Reactance.hpp b/CGMES_2.4.13_18DEC2013/Reactance.hpp index a811d499a..e49646947 100644 --- a/CGMES_2.4.13_18DEC2013/Reactance.hpp +++ b/CGMES_2.4.13_18DEC2013/Reactance.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Reactance (imaginary part of impedance), at rated frequency. - */ + /** \brief Reactance (imaginary part of impedance), at rated frequency. */ class Reactance { public: diff --git a/CGMES_2.4.13_18DEC2013/ReactiveCapabilityCurve.cpp b/CGMES_2.4.13_18DEC2013/ReactiveCapabilityCurve.cpp index e82001919..5d3fe1f54 100644 --- a/CGMES_2.4.13_18DEC2013/ReactiveCapabilityCurve.cpp +++ b/CGMES_2.4.13_18DEC2013/ReactiveCapabilityCurve.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ReactiveCapabilityCurve::ReactiveCapabilityCurve() {}; -ReactiveCapabilityCurve::~ReactiveCapabilityCurve() {}; +ReactiveCapabilityCurve::ReactiveCapabilityCurve() {} +ReactiveCapabilityCurve::~ReactiveCapabilityCurve() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ ReactiveCapabilityCurve::getPossibleProfilesForAttributes() const return map; } - - bool assign_EquivalentInjection_ReactiveCapabilityCurve(BaseClass*, BaseClass*); bool assign_ReactiveCapabilityCurve_EquivalentInjection(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_ReactiveCapabilityCurve_EquivalentInjection(BaseClass* BaseClass_ptr } return false; } + bool assign_SynchronousMachine_InitialReactiveCapabilityCurve(BaseClass*, BaseClass*); bool assign_ReactiveCapabilityCurve_InitiallyUsedBySynchronousMachines(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -87,7 +86,7 @@ const char* ReactiveCapabilityCurve::debugString() const void ReactiveCapabilityCurve::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ReactiveCapabilityCurve"), &ReactiveCapabilityCurve_factory)); + factory_map.emplace("cim:ReactiveCapabilityCurve", &ReactiveCapabilityCurve_factory); } void ReactiveCapabilityCurve::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -96,8 +95,8 @@ void ReactiveCapabilityCurve::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ReactiveCapabilityCurve.EquivalentInjection"), &assign_ReactiveCapabilityCurve_EquivalentInjection)); - assign_map.insert(std::make_pair(std::string("cim:ReactiveCapabilityCurve.InitiallyUsedBySynchronousMachines"), &assign_ReactiveCapabilityCurve_InitiallyUsedBySynchronousMachines)); + assign_map.emplace("cim:ReactiveCapabilityCurve.EquivalentInjection", &assign_ReactiveCapabilityCurve_EquivalentInjection); + assign_map.emplace("cim:ReactiveCapabilityCurve.InitiallyUsedBySynchronousMachines", &assign_ReactiveCapabilityCurve_InitiallyUsedBySynchronousMachines); } void ReactiveCapabilityCurve::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/ReactiveCapabilityCurve.hpp b/CGMES_2.4.13_18DEC2013/ReactiveCapabilityCurve.hpp index 26c52f7e3..e843629e2 100644 --- a/CGMES_2.4.13_18DEC2013/ReactiveCapabilityCurve.hpp +++ b/CGMES_2.4.13_18DEC2013/ReactiveCapabilityCurve.hpp @@ -18,9 +18,7 @@ namespace CIMPP class EquivalentInjection; class SynchronousMachine; - /* - Reactive power rating envelope versus the synchronous machine's active power, in both the generating and motoring modes. For each active power value there is a corresponding high and low reactive power limit value. Typically there will be a separate curve for each coolant condition, such as hydrogen pressure. The Y1 axis values represent reactive minimum and the Y2 axis values represent reactive maximum. - */ + /** \brief Reactive power rating envelope versus the synchronous machine's active power, in both the generating and motoring modes. For each active power value there is a corresponding high and low reactive power limit value. Typically there will be a separate curve for each coolant condition, such as hydrogen pressure. The Y1 axis values represent reactive minimum and the Y2 axis values represent reactive maximum. */ class ReactiveCapabilityCurve : public Curve { public: @@ -28,8 +26,11 @@ namespace CIMPP ReactiveCapabilityCurve(); ~ReactiveCapabilityCurve() override; - std::list EquivalentInjection; /* The reactive capability curve used by this equivalent injection. Default: 0 */ - std::list InitiallyUsedBySynchronousMachines; /* The default reactive capability curve for use by a synchronous machine. Default: 0 */ + /** \brief The reactive capability curve used by this equivalent injection. Default: 0 */ + std::list EquivalentInjection; + + /** \brief The default reactive capability curve for use by a synchronous machine. Default: 0 */ + std::list InitiallyUsedBySynchronousMachines; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ReactivePower.hpp b/CGMES_2.4.13_18DEC2013/ReactivePower.hpp index e80659b92..28e434b24 100644 --- a/CGMES_2.4.13_18DEC2013/ReactivePower.hpp +++ b/CGMES_2.4.13_18DEC2013/ReactivePower.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Product of RMS value of the voltage and the RMS value of the quadrature component of the current. - */ + /** \brief Product of RMS value of the voltage and the RMS value of the quadrature component of the current. */ class ReactivePower { public: diff --git a/CGMES_2.4.13_18DEC2013/RegularIntervalSchedule.cpp b/CGMES_2.4.13_18DEC2013/RegularIntervalSchedule.cpp index 28f390358..604197cd4 100644 --- a/CGMES_2.4.13_18DEC2013/RegularIntervalSchedule.cpp +++ b/CGMES_2.4.13_18DEC2013/RegularIntervalSchedule.cpp @@ -9,13 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "RegularTimePoint.hpp" -#include "DateTime.hpp" -#include "Seconds.hpp" using namespace CIMPP; -RegularIntervalSchedule::RegularIntervalSchedule() {}; -RegularIntervalSchedule::~RegularIntervalSchedule() {}; +RegularIntervalSchedule::RegularIntervalSchedule() {} +RegularIntervalSchedule::~RegularIntervalSchedule() {} static const std::list PossibleProfilesForClass = { @@ -44,54 +42,56 @@ RegularIntervalSchedule::getPossibleProfilesForAttributes() const return map; } - -bool assign_RegularIntervalSchedule_endTime(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegularTimePoint_IntervalSchedule(BaseClass*, BaseClass*); +bool assign_RegularIntervalSchedule_TimePoints(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + RegularTimePoint* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - element->endTime = buffer.str(); - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->TimePoints.begin(), element->TimePoints.end(), element2) == element->TimePoints.end()) + { + element->TimePoints.push_back(element2); + return assign_RegularTimePoint_IntervalSchedule(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_RegularIntervalSchedule_timeStep(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegularIntervalSchedule_endTime(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->timeStep; - if (buffer.fail()) - return false; - else + element->endTime = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_RegularTimePoint_IntervalSchedule(BaseClass*, BaseClass*); -bool assign_RegularIntervalSchedule_TimePoints(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_RegularIntervalSchedule_timeStep(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); - RegularTimePoint* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->TimePoints.begin(), element->TimePoints.end(), element2) == element->TimePoints.end()) + buffer >> element->timeStep; + if (!buffer.fail()) { - element->TimePoints.push_back(element2); - return assign_RegularTimePoint_IntervalSchedule(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_RegularIntervalSchedule_endTime(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + const RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->endTime; if (!buffer.str().empty()) @@ -105,7 +105,8 @@ bool get_RegularIntervalSchedule_endTime(const BaseClass* BaseClass_ptr1, std::s bool get_RegularIntervalSchedule_timeStep(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + const RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->timeStep; if (!buffer.str().empty()) @@ -117,8 +118,6 @@ bool get_RegularIntervalSchedule_timeStep(const BaseClass* BaseClass_ptr1, std:: return false; } - - const char RegularIntervalSchedule::debugName[] = "RegularIntervalSchedule"; const char* RegularIntervalSchedule::debugString() const { @@ -127,18 +126,18 @@ const char* RegularIntervalSchedule::debugString() const void RegularIntervalSchedule::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RegularIntervalSchedule"), &RegularIntervalSchedule_factory)); + factory_map.emplace("cim:RegularIntervalSchedule", &RegularIntervalSchedule_factory); } void RegularIntervalSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RegularIntervalSchedule.endTime"), &assign_RegularIntervalSchedule_endTime)); - assign_map.insert(std::make_pair(std::string("cim:RegularIntervalSchedule.timeStep"), &assign_RegularIntervalSchedule_timeStep)); + assign_map.emplace("cim:RegularIntervalSchedule.endTime", &assign_RegularIntervalSchedule_endTime); + assign_map.emplace("cim:RegularIntervalSchedule.timeStep", &assign_RegularIntervalSchedule_timeStep); } void RegularIntervalSchedule::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RegularIntervalSchedule.TimePoints"), &assign_RegularIntervalSchedule_TimePoints)); + assign_map.emplace("cim:RegularIntervalSchedule.TimePoints", &assign_RegularIntervalSchedule_TimePoints); } void RegularIntervalSchedule::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/RegularIntervalSchedule.hpp b/CGMES_2.4.13_18DEC2013/RegularIntervalSchedule.hpp index 95a998d55..d34235f88 100644 --- a/CGMES_2.4.13_18DEC2013/RegularIntervalSchedule.hpp +++ b/CGMES_2.4.13_18DEC2013/RegularIntervalSchedule.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class RegularTimePoint; - /* - The schedule has time points where the time between them is constant. - */ + /** \brief The schedule has time points where the time between them is constant. */ class RegularIntervalSchedule : public BasicIntervalSchedule { public: @@ -29,9 +27,14 @@ namespace CIMPP RegularIntervalSchedule(); ~RegularIntervalSchedule() override; - std::list TimePoints; /* The regular interval time point data values that define this schedule. Default: 0 */ - CIMPP::DateTime endTime; /* The time for the last time point. Default: '' */ - CIMPP::Seconds timeStep; /* The time between each pair of subsequent regular time points in sequence order. Default: nullptr */ + /** \brief The regular interval time point data values that define this schedule. Default: 0 */ + std::list TimePoints; + + /** \brief The time for the last time point. Default: '' */ + CIMPP::DateTime endTime; + + /** \brief The time between each pair of subsequent regular time points in sequence order. Default: nullptr */ + CIMPP::Seconds timeStep; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/RegularTimePoint.cpp b/CGMES_2.4.13_18DEC2013/RegularTimePoint.cpp index 500197fc4..5903ad467 100644 --- a/CGMES_2.4.13_18DEC2013/RegularTimePoint.cpp +++ b/CGMES_2.4.13_18DEC2013/RegularTimePoint.cpp @@ -9,14 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "RegularIntervalSchedule.hpp" -#include "Integer.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -RegularTimePoint::RegularTimePoint() : IntervalSchedule(nullptr) {}; -RegularTimePoint::~RegularTimePoint() {}; +RegularTimePoint::RegularTimePoint() : IntervalSchedule(nullptr) {} +RegularTimePoint::~RegularTimePoint() {} static const std::list PossibleProfilesForClass = { @@ -46,67 +43,83 @@ RegularTimePoint::getPossibleProfilesForAttributes() const return map; } +bool assign_RegularIntervalSchedule_TimePoints(BaseClass*, BaseClass*); +bool assign_RegularTimePoint_IntervalSchedule(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RegularTimePoint* element = dynamic_cast(BaseClass_ptr1); + RegularIntervalSchedule* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->IntervalSchedule != element2) + { + element->IntervalSchedule = element2; + return assign_RegularIntervalSchedule_TimePoints(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_RegularTimePoint_sequenceNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegularTimePoint_sequenceNumber(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RegularTimePoint* element = dynamic_cast(BaseClass_ptr1)) + RegularTimePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->sequenceNumber; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RegularTimePoint_value1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegularTimePoint_value1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RegularTimePoint* element = dynamic_cast(BaseClass_ptr1)) + RegularTimePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->value1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RegularTimePoint_value2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegularTimePoint_value2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RegularTimePoint* element = dynamic_cast(BaseClass_ptr1)) + RegularTimePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->value2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_RegularIntervalSchedule_TimePoints(BaseClass*, BaseClass*); -bool assign_RegularTimePoint_IntervalSchedule(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_RegularTimePoint_IntervalSchedule(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - RegularTimePoint* element = dynamic_cast(BaseClass_ptr1); - RegularIntervalSchedule* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const RegularTimePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->IntervalSchedule != element2) + if (element->IntervalSchedule != 0) { - element->IntervalSchedule = element2; - return assign_RegularIntervalSchedule_TimePoints(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->IntervalSchedule); + return true; } - return true; } return false; } bool get_RegularTimePoint_sequenceNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegularTimePoint* element = dynamic_cast(BaseClass_ptr1)) + const RegularTimePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->sequenceNumber; if (!buffer.str().empty()) @@ -120,7 +133,8 @@ bool get_RegularTimePoint_sequenceNumber(const BaseClass* BaseClass_ptr1, std::s bool get_RegularTimePoint_value1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegularTimePoint* element = dynamic_cast(BaseClass_ptr1)) + const RegularTimePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value1; if (!buffer.str().empty()) @@ -134,7 +148,8 @@ bool get_RegularTimePoint_value1(const BaseClass* BaseClass_ptr1, std::stringstr bool get_RegularTimePoint_value2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegularTimePoint* element = dynamic_cast(BaseClass_ptr1)) + const RegularTimePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value2; if (!buffer.str().empty()) @@ -146,21 +161,6 @@ bool get_RegularTimePoint_value2(const BaseClass* BaseClass_ptr1, std::stringstr return false; } - -bool get_RegularTimePoint_IntervalSchedule(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const RegularTimePoint* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->IntervalSchedule != 0) - { - BaseClass_list.push_back(element->IntervalSchedule); - return true; - } - } - return false; -} - - const char RegularTimePoint::debugName[] = "RegularTimePoint"; const char* RegularTimePoint::debugString() const { @@ -169,19 +169,19 @@ const char* RegularTimePoint::debugString() const void RegularTimePoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RegularTimePoint"), &RegularTimePoint_factory)); + factory_map.emplace("cim:RegularTimePoint", &RegularTimePoint_factory); } void RegularTimePoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RegularTimePoint.sequenceNumber"), &assign_RegularTimePoint_sequenceNumber)); - assign_map.insert(std::make_pair(std::string("cim:RegularTimePoint.value1"), &assign_RegularTimePoint_value1)); - assign_map.insert(std::make_pair(std::string("cim:RegularTimePoint.value2"), &assign_RegularTimePoint_value2)); + assign_map.emplace("cim:RegularTimePoint.sequenceNumber", &assign_RegularTimePoint_sequenceNumber); + assign_map.emplace("cim:RegularTimePoint.value1", &assign_RegularTimePoint_value1); + assign_map.emplace("cim:RegularTimePoint.value2", &assign_RegularTimePoint_value2); } void RegularTimePoint::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RegularTimePoint.IntervalSchedule"), &assign_RegularTimePoint_IntervalSchedule)); + assign_map.emplace("cim:RegularTimePoint.IntervalSchedule", &assign_RegularTimePoint_IntervalSchedule); } void RegularTimePoint::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/RegularTimePoint.hpp b/CGMES_2.4.13_18DEC2013/RegularTimePoint.hpp index 160814cc9..1d84dddda 100644 --- a/CGMES_2.4.13_18DEC2013/RegularTimePoint.hpp +++ b/CGMES_2.4.13_18DEC2013/RegularTimePoint.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class RegularIntervalSchedule; - /* - Time point for a schedule where the time between the consecutive points is constant. - */ + /** \brief Time point for a schedule where the time between the consecutive points is constant. */ class RegularTimePoint : public BaseClass { public: @@ -29,10 +27,17 @@ namespace CIMPP RegularTimePoint(); ~RegularTimePoint() override; - CIMPP::RegularIntervalSchedule* IntervalSchedule; /* Regular interval schedule containing this time point. Default: 0 */ - CIMPP::Integer sequenceNumber; /* The position of the regular time point in the sequence. Note that time points don`t have to be sequential, i.e. time points may be omitted. The actual time for a RegularTimePoint is computed by multiplying the associated regular interval schedule`s time step with the regular time point sequence number and adding the associated schedules start time. Default: 0 */ - CIMPP::Simple_Float value1; /* The first value at the time. The meaning of the value is defined by the derived type of the associated schedule. Default: nullptr */ - CIMPP::Simple_Float value2; /* The second value at the time. The meaning of the value is defined by the derived type of the associated schedule. Default: nullptr */ + /** \brief Regular interval schedule containing this time point. Default: 0 */ + CIMPP::RegularIntervalSchedule* IntervalSchedule; + + /** \brief The position of the regular time point in the sequence. Note that time points don`t have to be sequential, i.e. time points may be omitted. The actual time for a RegularTimePoint is computed by multiplying the associated regular interval schedule`s time step with the regular time point sequence number and adding the associated schedules start time. Default: 0 */ + CIMPP::Integer sequenceNumber; + + /** \brief The first value at the time. The meaning of the value is defined by the derived type of the associated schedule. Default: nullptr */ + CIMPP::Simple_Float value1; + + /** \brief The second value at the time. The meaning of the value is defined by the derived type of the associated schedule. Default: nullptr */ + CIMPP::Simple_Float value2; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/RegulatingCondEq.cpp b/CGMES_2.4.13_18DEC2013/RegulatingCondEq.cpp index 57a92235e..19a2d09e9 100644 --- a/CGMES_2.4.13_18DEC2013/RegulatingCondEq.cpp +++ b/CGMES_2.4.13_18DEC2013/RegulatingCondEq.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "RegulatingControl.hpp" -#include "Boolean.hpp" using namespace CIMPP; -RegulatingCondEq::RegulatingCondEq() : RegulatingControl(nullptr) {}; -RegulatingCondEq::~RegulatingCondEq() {}; +RegulatingCondEq::RegulatingCondEq() : RegulatingControl(nullptr) {} +RegulatingCondEq::~RegulatingCondEq() {} static const std::list PossibleProfilesForClass = { @@ -44,21 +43,6 @@ RegulatingCondEq::getPossibleProfilesForAttributes() const return map; } - -bool assign_RegulatingCondEq_controlEnabled(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (RegulatingCondEq* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->controlEnabled; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_RegulatingControl_RegulatingCondEq(BaseClass*, BaseClass*); bool assign_RegulatingCondEq_RegulatingControl(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -76,24 +60,24 @@ bool assign_RegulatingCondEq_RegulatingControl(BaseClass* BaseClass_ptr1, BaseCl return false; } -bool get_RegulatingCondEq_controlEnabled(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_RegulatingCondEq_controlEnabled(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const RegulatingCondEq* element = dynamic_cast(BaseClass_ptr1)) + RegulatingCondEq* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->controlEnabled; - if (!buffer.str().empty()) + buffer >> element->controlEnabled; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_RegulatingCondEq_RegulatingControl(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RegulatingCondEq* element = dynamic_cast(BaseClass_ptr1)) + const RegulatingCondEq* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->RegulatingControl != 0) { @@ -104,6 +88,20 @@ bool get_RegulatingCondEq_RegulatingControl(const BaseClass* BaseClass_ptr1, std return false; } +bool get_RegulatingCondEq_controlEnabled(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const RegulatingCondEq* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->controlEnabled; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char RegulatingCondEq::debugName[] = "RegulatingCondEq"; const char* RegulatingCondEq::debugString() const @@ -113,17 +111,17 @@ const char* RegulatingCondEq::debugString() const void RegulatingCondEq::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RegulatingCondEq"), &RegulatingCondEq_factory)); + factory_map.emplace("cim:RegulatingCondEq", &RegulatingCondEq_factory); } void RegulatingCondEq::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RegulatingCondEq.controlEnabled"), &assign_RegulatingCondEq_controlEnabled)); + assign_map.emplace("cim:RegulatingCondEq.controlEnabled", &assign_RegulatingCondEq_controlEnabled); } void RegulatingCondEq::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RegulatingCondEq.RegulatingControl"), &assign_RegulatingCondEq_RegulatingControl)); + assign_map.emplace("cim:RegulatingCondEq.RegulatingControl", &assign_RegulatingCondEq_RegulatingControl); } void RegulatingCondEq::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/RegulatingCondEq.hpp b/CGMES_2.4.13_18DEC2013/RegulatingCondEq.hpp index a18f5b481..9df3386a1 100644 --- a/CGMES_2.4.13_18DEC2013/RegulatingCondEq.hpp +++ b/CGMES_2.4.13_18DEC2013/RegulatingCondEq.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class RegulatingControl; - /* - A type of conducting equipment that can regulate a quantity (i.e. voltage or flow) at a specific point in the network. - */ + /** \brief A type of conducting equipment that can regulate a quantity (i.e. voltage or flow) at a specific point in the network. */ class RegulatingCondEq : public ConductingEquipment { public: @@ -28,8 +26,11 @@ namespace CIMPP RegulatingCondEq(); ~RegulatingCondEq() override; - CIMPP::RegulatingControl* RegulatingControl; /* The regulating control scheme in which this equipment participates. Default: 0 */ - CIMPP::Boolean controlEnabled; /* Specifies the regulation status of the equipment. True is regulating, false is not regulating. Default: false */ + /** \brief The regulating control scheme in which this equipment participates. Default: 0 */ + CIMPP::RegulatingControl* RegulatingControl; + + /** \brief Specifies the regulation status of the equipment. True is regulating, false is not regulating. Default: false */ + CIMPP::Boolean controlEnabled; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/RegulatingControl.cpp b/CGMES_2.4.13_18DEC2013/RegulatingControl.cpp index d892aad6c..7f14bad90 100644 --- a/CGMES_2.4.13_18DEC2013/RegulatingControl.cpp +++ b/CGMES_2.4.13_18DEC2013/RegulatingControl.cpp @@ -11,17 +11,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "RegulatingCondEq.hpp" #include "RegulationSchedule.hpp" #include "Terminal.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "RegulatingControlModeKind.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "UnitMultiplier.hpp" using namespace CIMPP; -RegulatingControl::RegulatingControl() : Terminal(nullptr) {}; -RegulatingControl::~RegulatingControl() {}; +RegulatingControl::RegulatingControl() : Terminal(nullptr) {} +RegulatingControl::~RegulatingControl() {} static const std::list PossibleProfilesForClass = { @@ -57,154 +51,163 @@ RegulatingControl::getPossibleProfilesForAttributes() const return map; } - -bool assign_RegulatingControl_discrete(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegulatingCondEq_RegulatingControl(BaseClass*, BaseClass*); +bool assign_RegulatingControl_RegulatingCondEq(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + RegulatingCondEq* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->discrete; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->RegulatingCondEq.begin(), element->RegulatingCondEq.end(), element2) == element->RegulatingCondEq.end()) + { + element->RegulatingCondEq.push_back(element2); + return assign_RegulatingCondEq_RegulatingControl(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_RegulatingControl_enabled(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegulationSchedule_RegulatingControl(BaseClass*, BaseClass*); +bool assign_RegulatingControl_RegulationSchedule(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + RegulationSchedule* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->enabled; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->RegulationSchedule.begin(), element->RegulationSchedule.end(), element2) == element->RegulationSchedule.end()) + { + element->RegulationSchedule.push_back(element2); + return assign_RegulationSchedule_RegulatingControl(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_RegulatingControl_mode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Terminal_RegulatingControl(BaseClass*, BaseClass*); +bool assign_RegulatingControl_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->mode; - if (buffer.fail()) - return false; - else - return true; + if (element->Terminal != element2) + { + element->Terminal = element2; + return assign_Terminal_RegulatingControl(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_RegulatingControl_targetDeadband(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegulatingControl_discrete(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->targetDeadband; - if (buffer.fail()) - return false; - else + buffer >> element->discrete; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RegulatingControl_targetValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegulatingControl_enabled(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->targetValue; - if (buffer.fail()) - return false; - else + buffer >> element->enabled; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RegulatingControl_targetValueUnitMultiplier(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegulatingControl_mode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->targetValueUnitMultiplier; - if (buffer.fail()) - return false; - else + buffer >> element->mode; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_RegulatingCondEq_RegulatingControl(BaseClass*, BaseClass*); -bool assign_RegulatingControl_RegulatingCondEq(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_RegulatingControl_targetDeadband(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { RegulatingControl* element = dynamic_cast(BaseClass_ptr1); - RegulatingCondEq* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->RegulatingCondEq.begin(), element->RegulatingCondEq.end(), element2) == element->RegulatingCondEq.end()) + buffer >> element->targetDeadband; + if (!buffer.fail()) { - element->RegulatingCondEq.push_back(element2); - return assign_RegulatingCondEq_RegulatingControl(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_RegulationSchedule_RegulatingControl(BaseClass*, BaseClass*); -bool assign_RegulatingControl_RegulationSchedule(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_RegulatingControl_targetValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { RegulatingControl* element = dynamic_cast(BaseClass_ptr1); - RegulationSchedule* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->RegulationSchedule.begin(), element->RegulationSchedule.end(), element2) == element->RegulationSchedule.end()) + buffer >> element->targetValue; + if (!buffer.fail()) { - element->RegulationSchedule.push_back(element2); - return assign_RegulationSchedule_RegulatingControl(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_Terminal_RegulatingControl(BaseClass*, BaseClass*); -bool assign_RegulatingControl_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_RegulatingControl_targetValueUnitMultiplier(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { RegulatingControl* element = dynamic_cast(BaseClass_ptr1); - Terminal* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->Terminal != element2) + buffer >> element->targetValueUnitMultiplier; + if (!buffer.fail()) { - element->Terminal = element2; - return assign_Terminal_RegulatingControl(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool get_RegulatingControl_discrete(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) + + +bool get_RegulatingControl_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + const RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->discrete; - if (!buffer.str().empty()) + if (element->Terminal != 0) { + BaseClass_list.push_back(element->Terminal); return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_RegulatingControl_enabled(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_RegulatingControl_discrete(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + const RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->enabled; + buffer << element->discrete; if (!buffer.str().empty()) { return true; @@ -214,11 +217,12 @@ bool get_RegulatingControl_enabled(const BaseClass* BaseClass_ptr1, std::strings return false; } -bool get_RegulatingControl_targetDeadband(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_RegulatingControl_enabled(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + const RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->targetDeadband; + buffer << element->enabled; if (!buffer.str().empty()) { return true; @@ -228,11 +232,12 @@ bool get_RegulatingControl_targetDeadband(const BaseClass* BaseClass_ptr1, std:: return false; } -bool get_RegulatingControl_targetValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_RegulatingControl_mode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + const RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->targetValue; + buffer << element->mode; if (!buffer.str().empty()) { return true; @@ -242,26 +247,27 @@ bool get_RegulatingControl_targetValue(const BaseClass* BaseClass_ptr1, std::str return false; } - -bool get_RegulatingControl_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) +bool get_RegulatingControl_targetDeadband(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + const RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->Terminal != 0) + buffer << element->targetDeadband; + if (!buffer.str().empty()) { - BaseClass_list.push_back(element->Terminal); return true; } } + buffer.setstate(std::ios::failbit); return false; } - -bool get_RegulatingControl_mode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_RegulatingControl_targetValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + const RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->mode; + buffer << element->targetValue; if (!buffer.str().empty()) { return true; @@ -273,7 +279,8 @@ bool get_RegulatingControl_mode(const BaseClass* BaseClass_ptr1, std::stringstre bool get_RegulatingControl_targetValueUnitMultiplier(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + const RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->targetValueUnitMultiplier; if (!buffer.str().empty()) @@ -293,24 +300,24 @@ const char* RegulatingControl::debugString() const void RegulatingControl::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RegulatingControl"), &RegulatingControl_factory)); + factory_map.emplace("cim:RegulatingControl", &RegulatingControl_factory); } void RegulatingControl::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.discrete"), &assign_RegulatingControl_discrete)); - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.enabled"), &assign_RegulatingControl_enabled)); - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.mode"), &assign_RegulatingControl_mode)); - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.targetDeadband"), &assign_RegulatingControl_targetDeadband)); - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.targetValue"), &assign_RegulatingControl_targetValue)); - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.targetValueUnitMultiplier"), &assign_RegulatingControl_targetValueUnitMultiplier)); + assign_map.emplace("cim:RegulatingControl.discrete", &assign_RegulatingControl_discrete); + assign_map.emplace("cim:RegulatingControl.enabled", &assign_RegulatingControl_enabled); + assign_map.emplace("cim:RegulatingControl.mode", &assign_RegulatingControl_mode); + assign_map.emplace("cim:RegulatingControl.targetDeadband", &assign_RegulatingControl_targetDeadband); + assign_map.emplace("cim:RegulatingControl.targetValue", &assign_RegulatingControl_targetValue); + assign_map.emplace("cim:RegulatingControl.targetValueUnitMultiplier", &assign_RegulatingControl_targetValueUnitMultiplier); } void RegulatingControl::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.RegulatingCondEq"), &assign_RegulatingControl_RegulatingCondEq)); - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.RegulationSchedule"), &assign_RegulatingControl_RegulationSchedule)); - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.Terminal"), &assign_RegulatingControl_Terminal)); + assign_map.emplace("cim:RegulatingControl.RegulatingCondEq", &assign_RegulatingControl_RegulatingCondEq); + assign_map.emplace("cim:RegulatingControl.RegulationSchedule", &assign_RegulatingControl_RegulationSchedule); + assign_map.emplace("cim:RegulatingControl.Terminal", &assign_RegulatingControl_Terminal); } void RegulatingControl::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/RegulatingControl.hpp b/CGMES_2.4.13_18DEC2013/RegulatingControl.hpp index 6b2c95eae..f6be989fc 100644 --- a/CGMES_2.4.13_18DEC2013/RegulatingControl.hpp +++ b/CGMES_2.4.13_18DEC2013/RegulatingControl.hpp @@ -23,9 +23,7 @@ namespace CIMPP class RegulationSchedule; class Terminal; - /* - Specifies a set of equipment that works together to control a power system quantity such as voltage or flow. Remote bus voltage control is possible by specifying the controlled terminal located at some place remote from the controlling equipment. In case multiple equipment, possibly of different types, control same terminal there must be only one RegulatingControl at that terminal. The most specific subtype of RegulatingControl shall be used in case such equipment participate in the control, e.g. TapChangerControl for tap changers. For flow control load sign convention is used, i.e. positive sign means flow out from a TopologicalNode (bus) into the conducting equipment. - */ + /** \brief Specifies a set of equipment that works together to control a power system quantity such as voltage or flow. Remote bus voltage control is possible by specifying the controlled terminal located at some place remote from the controlling equipment. In case multiple equipment, possibly of different types, control same terminal there must be only one RegulatingControl at that terminal. The most specific subtype of RegulatingControl shall be used in case such equipment participate in the control, e.g. TapChangerControl for tap changers. For flow control load sign convention is used, i.e. positive sign means flow out from a TopologicalNode (bus) into the conducting equipment. */ class RegulatingControl : public PowerSystemResource { public: @@ -33,15 +31,32 @@ namespace CIMPP RegulatingControl(); ~RegulatingControl() override; - std::list RegulatingCondEq; /* The equipment that participates in this regulating control scheme. Default: 0 */ - std::list RegulationSchedule; /* Schedule for this Regulating regulating control. Default: 0 */ - CIMPP::Terminal* Terminal; /* The controls regulating this terminal. Default: 0 */ - CIMPP::Boolean discrete; /* The regulation is performed in a discrete mode. This applies to equipment with discrete controls, e.g. tap changers and shunt compensators. Default: false */ - CIMPP::Boolean enabled; /* The flag tells if regulation is enabled. Default: false */ - CIMPP::RegulatingControlModeKind mode; /* The regulating control mode presently available. This specification allows for determining the kind of regulation without need for obtaining the units from a schedule. Default: 0 */ - CIMPP::Simple_Float targetDeadband; /* This is a deadband used with discrete control to avoid excessive update of controls like tap changers and shunt compensator banks while regulating. The units of those appropriate for the mode. Default: nullptr */ - CIMPP::Simple_Float targetValue; /* The target value specified for case input. This value can be used for the target value without the use of schedules. The value has the units appropriate to the mode attribute. Default: nullptr */ - CIMPP::UnitMultiplier targetValueUnitMultiplier; /* Specify the multiplier for used for the targetValue. Default: 0 */ + /** \brief The equipment that participates in this regulating control scheme. Default: 0 */ + std::list RegulatingCondEq; + + /** \brief Schedule for this Regulating regulating control. Default: 0 */ + std::list RegulationSchedule; + + /** \brief The controls regulating this terminal. Default: 0 */ + CIMPP::Terminal* Terminal; + + /** \brief The regulation is performed in a discrete mode. This applies to equipment with discrete controls, e.g. tap changers and shunt compensators. Default: false */ + CIMPP::Boolean discrete; + + /** \brief The flag tells if regulation is enabled. Default: false */ + CIMPP::Boolean enabled; + + /** \brief The regulating control mode presently available. This specification allows for determining the kind of regulation without need for obtaining the units from a schedule. Default: 0 */ + CIMPP::RegulatingControlModeKind mode; + + /** \brief This is a deadband used with discrete control to avoid excessive update of controls like tap changers and shunt compensator banks while regulating. The units of those appropriate for the mode. Default: nullptr */ + CIMPP::Simple_Float targetDeadband; + + /** \brief The target value specified for case input. This value can be used for the target value without the use of schedules. The value has the units appropriate to the mode attribute. Default: nullptr */ + CIMPP::Simple_Float targetValue; + + /** \brief Specify the multiplier for used for the targetValue. Default: 0 */ + CIMPP::UnitMultiplier targetValueUnitMultiplier; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/RegulatingControlModeKind.cpp b/CGMES_2.4.13_18DEC2013/RegulatingControlModeKind.cpp index 7ac923d24..e30b5adcc 100644 --- a/CGMES_2.4.13_18DEC2013/RegulatingControlModeKind.cpp +++ b/CGMES_2.4.13_18DEC2013/RegulatingControlModeKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "RegulatingControlModeKind") + if (EnumSymbol.substr(0, pos) != "RegulatingControlModeKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,42 +50,42 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "voltage") + if (EnumSymbol == "voltage") { rop = RegulatingControlModeKind::voltage; return lop; } - if(EnumSymbol == "activePower") + if (EnumSymbol == "activePower") { rop = RegulatingControlModeKind::activePower; return lop; } - if(EnumSymbol == "reactivePower") + if (EnumSymbol == "reactivePower") { rop = RegulatingControlModeKind::reactivePower; return lop; } - if(EnumSymbol == "currentFlow") + if (EnumSymbol == "currentFlow") { rop = RegulatingControlModeKind::currentFlow; return lop; } - if(EnumSymbol == "admittance") + if (EnumSymbol == "admittance") { rop = RegulatingControlModeKind::admittance; return lop; } - if(EnumSymbol == "timeScheduled") + if (EnumSymbol == "timeScheduled") { rop = RegulatingControlModeKind::timeScheduled; return lop; } - if(EnumSymbol == "temperature") + if (EnumSymbol == "temperature") { rop = RegulatingControlModeKind::temperature; return lop; } - if(EnumSymbol == "powerFactor") + if (EnumSymbol == "powerFactor") { rop = RegulatingControlModeKind::powerFactor; return lop; diff --git a/CGMES_2.4.13_18DEC2013/RegulatingControlModeKind.hpp b/CGMES_2.4.13_18DEC2013/RegulatingControlModeKind.hpp index ed5351e3e..d47d046cd 100644 --- a/CGMES_2.4.13_18DEC2013/RegulatingControlModeKind.hpp +++ b/CGMES_2.4.13_18DEC2013/RegulatingControlModeKind.hpp @@ -9,45 +9,27 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The kind of regulation model. For example regulating voltage, reactive power, active power, etc. - */ + /** \brief The kind of regulation model. For example regulating voltage, reactive power, active power, etc. */ class RegulatingControlModeKind { public: enum RegulatingControlModeKind_ENUM { - /** - * Voltage is specified. - */ + /** Voltage is specified. */ voltage, - /** - * Active power is specified. - */ + /** Active power is specified. */ activePower, - /** - * Reactive power is specified. - */ + /** Reactive power is specified. */ reactivePower, - /** - * Current flow is specified. - */ + /** Current flow is specified. */ currentFlow, - /** - * Admittance is specified. - */ + /** Admittance is specified. */ admittance, - /** - * Control switches on/off by time of day. The times may change on the weekend, or in different seasons. - */ + /** Control switches on/off by time of day. The times may change on the weekend, or in different seasons. */ timeScheduled, - /** - * Control switches on/off based on the local temperature (i.e., a thermostat). - */ + /** Control switches on/off based on the local temperature (i.e., a thermostat). */ temperature, - /** - * Power factor is specified. - */ + /** Power factor is specified. */ powerFactor, }; diff --git a/CGMES_2.4.13_18DEC2013/RegulationSchedule.cpp b/CGMES_2.4.13_18DEC2013/RegulationSchedule.cpp index 521188f5f..8750abb1a 100644 --- a/CGMES_2.4.13_18DEC2013/RegulationSchedule.cpp +++ b/CGMES_2.4.13_18DEC2013/RegulationSchedule.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -RegulationSchedule::RegulationSchedule() : RegulatingControl(nullptr) {}; -RegulationSchedule::~RegulationSchedule() {}; +RegulationSchedule::RegulationSchedule() : RegulatingControl(nullptr) {} +RegulationSchedule::~RegulationSchedule() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ RegulationSchedule::getPossibleProfilesForAttributes() const return map; } - - bool assign_RegulatingControl_RegulationSchedule(BaseClass*, BaseClass*); bool assign_RegulationSchedule_RegulatingControl(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_RegulationSchedule_RegulatingControl(BaseClass* BaseClass_ptr1, Base return false; } - bool get_RegulationSchedule_RegulatingControl(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RegulationSchedule* element = dynamic_cast(BaseClass_ptr1)) + const RegulationSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->RegulatingControl != 0) { @@ -73,7 +71,6 @@ bool get_RegulationSchedule_RegulatingControl(const BaseClass* BaseClass_ptr1, s return false; } - const char RegulationSchedule::debugName[] = "RegulationSchedule"; const char* RegulationSchedule::debugString() const { @@ -82,7 +79,7 @@ const char* RegulationSchedule::debugString() const void RegulationSchedule::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RegulationSchedule"), &RegulationSchedule_factory)); + factory_map.emplace("cim:RegulationSchedule", &RegulationSchedule_factory); } void RegulationSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void RegulationSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RegulationSchedule.RegulatingControl"), &assign_RegulationSchedule_RegulatingControl)); + assign_map.emplace("cim:RegulationSchedule.RegulatingControl", &assign_RegulationSchedule_RegulatingControl); } void RegulationSchedule::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/RegulationSchedule.hpp b/CGMES_2.4.13_18DEC2013/RegulationSchedule.hpp index 14d6d58f9..4b0f45cec 100644 --- a/CGMES_2.4.13_18DEC2013/RegulationSchedule.hpp +++ b/CGMES_2.4.13_18DEC2013/RegulationSchedule.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class RegulatingControl; - /* - A pre-established pattern over time for a controlled variable, e.g., busbar voltage. - */ + /** \brief A pre-established pattern over time for a controlled variable, e.g., busbar voltage. */ class RegulationSchedule : public SeasonDayTypeSchedule { public: @@ -27,7 +25,8 @@ namespace CIMPP RegulationSchedule(); ~RegulationSchedule() override; - CIMPP::RegulatingControl* RegulatingControl; /* Regulating controls that have this Schedule. Default: 0 */ + /** \brief Regulating controls that have this Schedule. Default: 0 */ + CIMPP::RegulatingControl* RegulatingControl; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/RemoteInputSignal.cpp b/CGMES_2.4.13_18DEC2013/RemoteInputSignal.cpp index f5926461c..f187b941e 100644 --- a/CGMES_2.4.13_18DEC2013/RemoteInputSignal.cpp +++ b/CGMES_2.4.13_18DEC2013/RemoteInputSignal.cpp @@ -17,12 +17,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindPlantDynamics.hpp" #include "WindTurbineType1or2Dynamics.hpp" #include "WindTurbineType3or4Dynamics.hpp" -#include "RemoteSignalKind.hpp" using namespace CIMPP; -RemoteInputSignal::RemoteInputSignal() : DiscontinuousExcitationControlDynamics(nullptr), PFVArControllerType1Dynamics(nullptr), PowerSystemStabilizerDynamics(nullptr), Terminal(nullptr), UnderexcitationLimiterDynamics(nullptr), VoltageCompensatorDynamics(nullptr), WindPlantDynamics(nullptr), WindTurbineType1or2Dynamics(nullptr), WindTurbineType3or4Dynamics(nullptr) {}; -RemoteInputSignal::~RemoteInputSignal() {}; +RemoteInputSignal::RemoteInputSignal() : DiscontinuousExcitationControlDynamics(nullptr), PFVArControllerType1Dynamics(nullptr), PowerSystemStabilizerDynamics(nullptr), Terminal(nullptr), UnderexcitationLimiterDynamics(nullptr), VoltageCompensatorDynamics(nullptr), WindPlantDynamics(nullptr), WindTurbineType1or2Dynamics(nullptr), WindTurbineType3or4Dynamics(nullptr) {} +RemoteInputSignal::~RemoteInputSignal() {} static const std::list PossibleProfilesForClass = { @@ -58,21 +57,6 @@ RemoteInputSignal::getPossibleProfilesForAttributes() const return map; } - -bool assign_RemoteInputSignal_remoteSignalType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->remoteSignalType; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_DiscontinuousExcitationControlDynamics_RemoteInputSignal(BaseClass*, BaseClass*); bool assign_RemoteInputSignal_DiscontinuousExcitationControlDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -89,6 +73,7 @@ bool assign_RemoteInputSignal_DiscontinuousExcitationControlDynamics(BaseClass* } return false; } + bool assign_PFVArControllerType1Dynamics_RemoteInputSignal(BaseClass*, BaseClass*); bool assign_RemoteInputSignal_PFVArControllerType1Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -105,6 +90,7 @@ bool assign_RemoteInputSignal_PFVArControllerType1Dynamics(BaseClass* BaseClass_ } return false; } + bool assign_PowerSystemStabilizerDynamics_RemoteInputSignal(BaseClass*, BaseClass*); bool assign_RemoteInputSignal_PowerSystemStabilizerDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -121,6 +107,7 @@ bool assign_RemoteInputSignal_PowerSystemStabilizerDynamics(BaseClass* BaseClass } return false; } + bool assign_Terminal_RemoteInputSignal(BaseClass*, BaseClass*); bool assign_RemoteInputSignal_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -137,6 +124,7 @@ bool assign_RemoteInputSignal_Terminal(BaseClass* BaseClass_ptr1, BaseClass* Bas } return false; } + bool assign_UnderexcitationLimiterDynamics_RemoteInputSignal(BaseClass*, BaseClass*); bool assign_RemoteInputSignal_UnderexcitationLimiterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -153,6 +141,7 @@ bool assign_RemoteInputSignal_UnderexcitationLimiterDynamics(BaseClass* BaseClas } return false; } + bool assign_VoltageCompensatorDynamics_RemoteInputSignal(BaseClass*, BaseClass*); bool assign_RemoteInputSignal_VoltageCompensatorDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -169,6 +158,7 @@ bool assign_RemoteInputSignal_VoltageCompensatorDynamics(BaseClass* BaseClass_pt } return false; } + bool assign_WindPlantDynamics_RemoteInputSignal(BaseClass*, BaseClass*); bool assign_RemoteInputSignal_WindPlantDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -185,6 +175,7 @@ bool assign_RemoteInputSignal_WindPlantDynamics(BaseClass* BaseClass_ptr1, BaseC } return false; } + bool assign_WindTurbineType1or2Dynamics_RemoteInputSignal(BaseClass*, BaseClass*); bool assign_RemoteInputSignal_WindTurbineType1or2Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -201,6 +192,7 @@ bool assign_RemoteInputSignal_WindTurbineType1or2Dynamics(BaseClass* BaseClass_p } return false; } + bool assign_WindTurbineType3or4Dynamics_RemoteInputSignal(BaseClass*, BaseClass*); bool assign_RemoteInputSignal_WindTurbineType3or4Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -218,10 +210,24 @@ bool assign_RemoteInputSignal_WindTurbineType3or4Dynamics(BaseClass* BaseClass_p return false; } +bool assign_RemoteInputSignal_remoteSignalType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->remoteSignalType; + if (!buffer.fail()) + { + return true; + } + } + return false; +} bool get_RemoteInputSignal_DiscontinuousExcitationControlDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1)) + const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DiscontinuousExcitationControlDynamics != 0) { @@ -234,7 +240,8 @@ bool get_RemoteInputSignal_DiscontinuousExcitationControlDynamics(const BaseClas bool get_RemoteInputSignal_PFVArControllerType1Dynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1)) + const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PFVArControllerType1Dynamics != 0) { @@ -247,7 +254,8 @@ bool get_RemoteInputSignal_PFVArControllerType1Dynamics(const BaseClass* BaseCla bool get_RemoteInputSignal_PowerSystemStabilizerDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1)) + const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PowerSystemStabilizerDynamics != 0) { @@ -260,7 +268,8 @@ bool get_RemoteInputSignal_PowerSystemStabilizerDynamics(const BaseClass* BaseCl bool get_RemoteInputSignal_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1)) + const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Terminal != 0) { @@ -273,7 +282,8 @@ bool get_RemoteInputSignal_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1)) + const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->UnderexcitationLimiterDynamics != 0) { @@ -286,7 +296,8 @@ bool get_RemoteInputSignal_UnderexcitationLimiterDynamics(const BaseClass* BaseC bool get_RemoteInputSignal_VoltageCompensatorDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1)) + const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->VoltageCompensatorDynamics != 0) { @@ -298,9 +309,12 @@ bool get_RemoteInputSignal_VoltageCompensatorDynamics(const BaseClass* BaseClass } + + bool get_RemoteInputSignal_remoteSignalType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1)) + const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->remoteSignalType; if (!buffer.str().empty()) @@ -320,25 +334,25 @@ const char* RemoteInputSignal::debugString() const void RemoteInputSignal::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RemoteInputSignal"), &RemoteInputSignal_factory)); + factory_map.emplace("cim:RemoteInputSignal", &RemoteInputSignal_factory); } void RemoteInputSignal::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.remoteSignalType"), &assign_RemoteInputSignal_remoteSignalType)); + assign_map.emplace("cim:RemoteInputSignal.remoteSignalType", &assign_RemoteInputSignal_remoteSignalType); } void RemoteInputSignal::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.DiscontinuousExcitationControlDynamics"), &assign_RemoteInputSignal_DiscontinuousExcitationControlDynamics)); - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.PFVArControllerType1Dynamics"), &assign_RemoteInputSignal_PFVArControllerType1Dynamics)); - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.PowerSystemStabilizerDynamics"), &assign_RemoteInputSignal_PowerSystemStabilizerDynamics)); - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.Terminal"), &assign_RemoteInputSignal_Terminal)); - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.UnderexcitationLimiterDynamics"), &assign_RemoteInputSignal_UnderexcitationLimiterDynamics)); - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.VoltageCompensatorDynamics"), &assign_RemoteInputSignal_VoltageCompensatorDynamics)); - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.WindPlantDynamics"), &assign_RemoteInputSignal_WindPlantDynamics)); - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.WindTurbineType1or2Dynamics"), &assign_RemoteInputSignal_WindTurbineType1or2Dynamics)); - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.WindTurbineType3or4Dynamics"), &assign_RemoteInputSignal_WindTurbineType3or4Dynamics)); + assign_map.emplace("cim:RemoteInputSignal.DiscontinuousExcitationControlDynamics", &assign_RemoteInputSignal_DiscontinuousExcitationControlDynamics); + assign_map.emplace("cim:RemoteInputSignal.PFVArControllerType1Dynamics", &assign_RemoteInputSignal_PFVArControllerType1Dynamics); + assign_map.emplace("cim:RemoteInputSignal.PowerSystemStabilizerDynamics", &assign_RemoteInputSignal_PowerSystemStabilizerDynamics); + assign_map.emplace("cim:RemoteInputSignal.Terminal", &assign_RemoteInputSignal_Terminal); + assign_map.emplace("cim:RemoteInputSignal.UnderexcitationLimiterDynamics", &assign_RemoteInputSignal_UnderexcitationLimiterDynamics); + assign_map.emplace("cim:RemoteInputSignal.VoltageCompensatorDynamics", &assign_RemoteInputSignal_VoltageCompensatorDynamics); + assign_map.emplace("cim:RemoteInputSignal.WindPlantDynamics", &assign_RemoteInputSignal_WindPlantDynamics); + assign_map.emplace("cim:RemoteInputSignal.WindTurbineType1or2Dynamics", &assign_RemoteInputSignal_WindTurbineType1or2Dynamics); + assign_map.emplace("cim:RemoteInputSignal.WindTurbineType3or4Dynamics", &assign_RemoteInputSignal_WindTurbineType3or4Dynamics); } void RemoteInputSignal::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/RemoteInputSignal.hpp b/CGMES_2.4.13_18DEC2013/RemoteInputSignal.hpp index 30da288a7..f33baab80 100644 --- a/CGMES_2.4.13_18DEC2013/RemoteInputSignal.hpp +++ b/CGMES_2.4.13_18DEC2013/RemoteInputSignal.hpp @@ -26,9 +26,7 @@ namespace CIMPP class WindTurbineType1or2Dynamics; class WindTurbineType3or4Dynamics; - /* - Supports connection to a terminal associated with a remote bus from which an input signal of a specific type is coming. - */ + /** \brief Supports connection to a terminal associated with a remote bus from which an input signal of a specific type is coming. */ class RemoteInputSignal : public IdentifiedObject { public: @@ -36,16 +34,35 @@ namespace CIMPP RemoteInputSignal(); ~RemoteInputSignal() override; - CIMPP::DiscontinuousExcitationControlDynamics* DiscontinuousExcitationControlDynamics; /* Discontinuous excitation control model using this remote input signal. Default: 0 */ - CIMPP::PFVArControllerType1Dynamics* PFVArControllerType1Dynamics; /* Power Factor or VAr controller Type I model using this remote input signal. Default: 0 */ - CIMPP::PowerSystemStabilizerDynamics* PowerSystemStabilizerDynamics; /* Power system stabilizer model using this remote input signal. Default: 0 */ - CIMPP::Terminal* Terminal; /* Remote terminal with which this input signal is associated. Default: 0 */ - CIMPP::UnderexcitationLimiterDynamics* UnderexcitationLimiterDynamics; /* Underexcitation limiter model using this remote input signal. Default: 0 */ - CIMPP::VoltageCompensatorDynamics* VoltageCompensatorDynamics; /* Voltage compensator model using this remote input signal. Default: 0 */ - CIMPP::WindPlantDynamics* WindPlantDynamics; /* The remote signal with which this power plant is associated. Default: 0 */ - CIMPP::WindTurbineType1or2Dynamics* WindTurbineType1or2Dynamics; /* Wind generator Type 1 or Type 2 model using this remote input signal. Default: 0 */ - CIMPP::WindTurbineType3or4Dynamics* WindTurbineType3or4Dynamics; /* Remote input signal used by these wind turbine Type 3 or 4 models. Default: 0 */ - CIMPP::RemoteSignalKind remoteSignalType; /* Type of input signal. Default: 0 */ + /** \brief Discontinuous excitation control model using this remote input signal. Default: 0 */ + CIMPP::DiscontinuousExcitationControlDynamics* DiscontinuousExcitationControlDynamics; + + /** \brief Power Factor or VAr controller Type I model using this remote input signal. Default: 0 */ + CIMPP::PFVArControllerType1Dynamics* PFVArControllerType1Dynamics; + + /** \brief Power system stabilizer model using this remote input signal. Default: 0 */ + CIMPP::PowerSystemStabilizerDynamics* PowerSystemStabilizerDynamics; + + /** \brief Remote terminal with which this input signal is associated. Default: 0 */ + CIMPP::Terminal* Terminal; + + /** \brief Underexcitation limiter model using this remote input signal. Default: 0 */ + CIMPP::UnderexcitationLimiterDynamics* UnderexcitationLimiterDynamics; + + /** \brief Voltage compensator model using this remote input signal. Default: 0 */ + CIMPP::VoltageCompensatorDynamics* VoltageCompensatorDynamics; + + /** \brief The remote signal with which this power plant is associated. Default: 0 */ + CIMPP::WindPlantDynamics* WindPlantDynamics; + + /** \brief Wind generator Type 1 or Type 2 model using this remote input signal. Default: 0 */ + CIMPP::WindTurbineType1or2Dynamics* WindTurbineType1or2Dynamics; + + /** \brief Remote input signal used by these wind turbine Type 3 or 4 models. Default: 0 */ + CIMPP::WindTurbineType3or4Dynamics* WindTurbineType3or4Dynamics; + + /** \brief Type of input signal. Default: 0 */ + CIMPP::RemoteSignalKind remoteSignalType; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/RemoteSignalKind.cpp b/CGMES_2.4.13_18DEC2013/RemoteSignalKind.cpp index e1cd4d2e7..a5b95bd01 100644 --- a/CGMES_2.4.13_18DEC2013/RemoteSignalKind.cpp +++ b/CGMES_2.4.13_18DEC2013/RemoteSignalKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "RemoteSignalKind") + if (EnumSymbol.substr(0, pos) != "RemoteSignalKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,47 +50,47 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "remoteBusVoltageFrequency") + if (EnumSymbol == "remoteBusVoltageFrequency") { rop = RemoteSignalKind::remoteBusVoltageFrequency; return lop; } - if(EnumSymbol == "remoteBusVoltageFrequencyDeviation") + if (EnumSymbol == "remoteBusVoltageFrequencyDeviation") { rop = RemoteSignalKind::remoteBusVoltageFrequencyDeviation; return lop; } - if(EnumSymbol == "remoteBusFrequency") + if (EnumSymbol == "remoteBusFrequency") { rop = RemoteSignalKind::remoteBusFrequency; return lop; } - if(EnumSymbol == "remoteBusFrequencyDeviation") + if (EnumSymbol == "remoteBusFrequencyDeviation") { rop = RemoteSignalKind::remoteBusFrequencyDeviation; return lop; } - if(EnumSymbol == "remoteBusVoltageAmplitude") + if (EnumSymbol == "remoteBusVoltageAmplitude") { rop = RemoteSignalKind::remoteBusVoltageAmplitude; return lop; } - if(EnumSymbol == "remoteBusVoltage") + if (EnumSymbol == "remoteBusVoltage") { rop = RemoteSignalKind::remoteBusVoltage; return lop; } - if(EnumSymbol == "remoteBranchCurrentAmplitude") + if (EnumSymbol == "remoteBranchCurrentAmplitude") { rop = RemoteSignalKind::remoteBranchCurrentAmplitude; return lop; } - if(EnumSymbol == "remoteBusVoltageAmplitudeDerivative") + if (EnumSymbol == "remoteBusVoltageAmplitudeDerivative") { rop = RemoteSignalKind::remoteBusVoltageAmplitudeDerivative; return lop; } - if(EnumSymbol == "remotePuBusVoltageDerivative") + if (EnumSymbol == "remotePuBusVoltageDerivative") { rop = RemoteSignalKind::remotePuBusVoltageDerivative; return lop; diff --git a/CGMES_2.4.13_18DEC2013/RemoteSignalKind.hpp b/CGMES_2.4.13_18DEC2013/RemoteSignalKind.hpp index 17a1358d3..ebdf3d268 100644 --- a/CGMES_2.4.13_18DEC2013/RemoteSignalKind.hpp +++ b/CGMES_2.4.13_18DEC2013/RemoteSignalKind.hpp @@ -9,49 +9,29 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of input signal coming from remote bus. - */ + /** \brief Type of input signal coming from remote bus. */ class RemoteSignalKind { public: enum RemoteSignalKind_ENUM { - /** - * Input is voltage frequency from remote terminal bus. - */ + /** Input is voltage frequency from remote terminal bus. */ remoteBusVoltageFrequency, - /** - * Input is voltage frequency deviation from remote terminal bus. - */ + /** Input is voltage frequency deviation from remote terminal bus. */ remoteBusVoltageFrequencyDeviation, - /** - * Input is frequency from remote terminal bus. - */ + /** Input is frequency from remote terminal bus. */ remoteBusFrequency, - /** - * Input is frequency deviation from remote terminal bus. - */ + /** Input is frequency deviation from remote terminal bus. */ remoteBusFrequencyDeviation, - /** - * Input is voltage amplitude from remote terminal bus. - */ + /** Input is voltage amplitude from remote terminal bus. */ remoteBusVoltageAmplitude, - /** - * Input is voltage from remote terminal bus. - */ + /** Input is voltage from remote terminal bus. */ remoteBusVoltage, - /** - * Input is branch current amplitude from remote terminal bus. - */ + /** Input is branch current amplitude from remote terminal bus. */ remoteBranchCurrentAmplitude, - /** - * Input is branch current amplitude derivative from remote terminal bus. - */ + /** Input is branch current amplitude derivative from remote terminal bus. */ remoteBusVoltageAmplitudeDerivative, - /** - * Input is PU voltage derivative from remote terminal bus. - */ + /** Input is PU voltage derivative from remote terminal bus. */ remotePuBusVoltageDerivative, }; diff --git a/CGMES_2.4.13_18DEC2013/ReportingGroup.cpp b/CGMES_2.4.13_18DEC2013/ReportingGroup.cpp index bb65d3090..5a8463cce 100644 --- a/CGMES_2.4.13_18DEC2013/ReportingGroup.cpp +++ b/CGMES_2.4.13_18DEC2013/ReportingGroup.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ReportingGroup::ReportingGroup() {}; -ReportingGroup::~ReportingGroup() {}; +ReportingGroup::ReportingGroup() {} +ReportingGroup::~ReportingGroup() {} static const std::list PossibleProfilesForClass = { @@ -43,8 +43,6 @@ ReportingGroup::getPossibleProfilesForAttributes() const return map; } - - bool assign_BusNameMarker_ReportingGroup(BaseClass*, BaseClass*); bool assign_ReportingGroup_BusNameMarker(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,6 +59,7 @@ bool assign_ReportingGroup_BusNameMarker(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_TopologicalNode_ReportingGroup(BaseClass*, BaseClass*); bool assign_ReportingGroup_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -88,7 +87,7 @@ const char* ReportingGroup::debugString() const void ReportingGroup::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ReportingGroup"), &ReportingGroup_factory)); + factory_map.emplace("cim:ReportingGroup", &ReportingGroup_factory); } void ReportingGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -97,8 +96,8 @@ void ReportingGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ReportingGroup.BusNameMarker"), &assign_ReportingGroup_BusNameMarker)); - assign_map.insert(std::make_pair(std::string("cim:ReportingGroup.TopologicalNode"), &assign_ReportingGroup_TopologicalNode)); + assign_map.emplace("cim:ReportingGroup.BusNameMarker", &assign_ReportingGroup_BusNameMarker); + assign_map.emplace("cim:ReportingGroup.TopologicalNode", &assign_ReportingGroup_TopologicalNode); } void ReportingGroup::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/ReportingGroup.hpp b/CGMES_2.4.13_18DEC2013/ReportingGroup.hpp index ddefec6f2..bed31d9d8 100644 --- a/CGMES_2.4.13_18DEC2013/ReportingGroup.hpp +++ b/CGMES_2.4.13_18DEC2013/ReportingGroup.hpp @@ -18,9 +18,7 @@ namespace CIMPP class BusNameMarker; class TopologicalNode; - /* - A reporting group is used for various ad-hoc groupings used for reporting. - */ + /** \brief A reporting group is used for various ad-hoc groupings used for reporting. */ class ReportingGroup : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP ReportingGroup(); ~ReportingGroup() override; - std::list BusNameMarker; /* The reporting group to which this bus name marker belongs. Default: 0 */ - std::list TopologicalNode; /* The reporting group to which the topological node belongs. Default: 0 */ + /** \brief The reporting group to which this bus name marker belongs. Default: 0 */ + std::list BusNameMarker; + + /** \brief The reporting group to which the topological node belongs. Default: 0 */ + std::list TopologicalNode; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Resistance.hpp b/CGMES_2.4.13_18DEC2013/Resistance.hpp index cd68a214f..ebb467d82 100644 --- a/CGMES_2.4.13_18DEC2013/Resistance.hpp +++ b/CGMES_2.4.13_18DEC2013/Resistance.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Resistance (real part of impedance). - */ + /** \brief Resistance (real part of impedance). */ class Resistance { public: diff --git a/CGMES_2.4.13_18DEC2013/ResistancePerLength.hpp b/CGMES_2.4.13_18DEC2013/ResistancePerLength.hpp index dc8f5da8d..e87d6316a 100644 --- a/CGMES_2.4.13_18DEC2013/ResistancePerLength.hpp +++ b/CGMES_2.4.13_18DEC2013/ResistancePerLength.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Resistance (real part of impedance) per unit of length. - */ + /** \brief Resistance (real part of impedance) per unit of length. */ class ResistancePerLength { public: diff --git a/CGMES_2.4.13_18DEC2013/RotatingMachine.cpp b/CGMES_2.4.13_18DEC2013/RotatingMachine.cpp index c36cd704f..167772853 100644 --- a/CGMES_2.4.13_18DEC2013/RotatingMachine.cpp +++ b/CGMES_2.4.13_18DEC2013/RotatingMachine.cpp @@ -10,16 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "GeneratingUnit.hpp" #include "HydroPump.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" -#include "Simple_Float.hpp" -#include "ApparentPower.hpp" -#include "Voltage.hpp" using namespace CIMPP; -RotatingMachine::RotatingMachine() : GeneratingUnit(nullptr), HydroPump(nullptr) {}; -RotatingMachine::~RotatingMachine() {}; +RotatingMachine::RotatingMachine() : GeneratingUnit(nullptr), HydroPump(nullptr) {} +RotatingMachine::~RotatingMachine() {} static const std::list PossibleProfilesForClass = { @@ -54,109 +49,129 @@ RotatingMachine::getPossibleProfilesForAttributes() const return map; } +bool assign_GeneratingUnit_RotatingMachine(BaseClass*, BaseClass*); +bool assign_RotatingMachine_GeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + GeneratingUnit* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->GeneratingUnit != element2) + { + element->GeneratingUnit = element2; + return assign_GeneratingUnit_RotatingMachine(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_RotatingMachine_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_HydroPump_RotatingMachine(BaseClass*, BaseClass*); +bool assign_RotatingMachine_HydroPump(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + HydroPump* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->p; - if (buffer.fail()) - return false; - else - return true; + if (element->HydroPump != element2) + { + element->HydroPump = element2; + return assign_HydroPump_RotatingMachine(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_RotatingMachine_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachine_p(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->q; - if (buffer.fail()) - return false; - else + buffer >> element->p; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RotatingMachine_ratedPowerFactor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachine_q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->ratedPowerFactor; - if (buffer.fail()) - return false; - else + buffer >> element->q; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RotatingMachine_ratedS(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachine_ratedPowerFactor(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->ratedS; - if (buffer.fail()) - return false; - else + buffer >> element->ratedPowerFactor; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RotatingMachine_ratedU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachine_ratedS(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->ratedU; - if (buffer.fail()) - return false; - else + buffer >> element->ratedS; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_GeneratingUnit_RotatingMachine(BaseClass*, BaseClass*); -bool assign_RotatingMachine_GeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_RotatingMachine_ratedU(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { RotatingMachine* element = dynamic_cast(BaseClass_ptr1); - GeneratingUnit* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->GeneratingUnit != element2) + buffer >> element->ratedU; + if (!buffer.fail()) { - element->GeneratingUnit = element2; - return assign_GeneratingUnit_RotatingMachine(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_HydroPump_RotatingMachine(BaseClass*, BaseClass*); -bool assign_RotatingMachine_HydroPump(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool get_RotatingMachine_GeneratingUnit(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - RotatingMachine* element = dynamic_cast(BaseClass_ptr1); - HydroPump* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->HydroPump != element2) + if (element->GeneratingUnit != 0) { - element->HydroPump = element2; - return assign_HydroPump_RotatingMachine(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->GeneratingUnit); + return true; } - return true; } return false; } + bool get_RotatingMachine_p(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p; if (!buffer.str().empty()) @@ -170,7 +185,8 @@ bool get_RotatingMachine_p(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_RotatingMachine_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q; if (!buffer.str().empty()) @@ -184,7 +200,8 @@ bool get_RotatingMachine_q(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_RotatingMachine_ratedPowerFactor(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedPowerFactor; if (!buffer.str().empty()) @@ -198,7 +215,8 @@ bool get_RotatingMachine_ratedPowerFactor(const BaseClass* BaseClass_ptr1, std:: bool get_RotatingMachine_ratedS(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedS; if (!buffer.str().empty()) @@ -212,7 +230,8 @@ bool get_RotatingMachine_ratedS(const BaseClass* BaseClass_ptr1, std::stringstre bool get_RotatingMachine_ratedU(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedU; if (!buffer.str().empty()) @@ -224,21 +243,6 @@ bool get_RotatingMachine_ratedU(const BaseClass* BaseClass_ptr1, std::stringstre return false; } - -bool get_RotatingMachine_GeneratingUnit(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->GeneratingUnit != 0) - { - BaseClass_list.push_back(element->GeneratingUnit); - return true; - } - } - return false; -} - - const char RotatingMachine::debugName[] = "RotatingMachine"; const char* RotatingMachine::debugString() const { @@ -247,22 +251,22 @@ const char* RotatingMachine::debugString() const void RotatingMachine::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RotatingMachine"), &RotatingMachine_factory)); + factory_map.emplace("cim:RotatingMachine", &RotatingMachine_factory); } void RotatingMachine::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RotatingMachine.p"), &assign_RotatingMachine_p)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachine.q"), &assign_RotatingMachine_q)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachine.ratedPowerFactor"), &assign_RotatingMachine_ratedPowerFactor)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachine.ratedS"), &assign_RotatingMachine_ratedS)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachine.ratedU"), &assign_RotatingMachine_ratedU)); + assign_map.emplace("cim:RotatingMachine.p", &assign_RotatingMachine_p); + assign_map.emplace("cim:RotatingMachine.q", &assign_RotatingMachine_q); + assign_map.emplace("cim:RotatingMachine.ratedPowerFactor", &assign_RotatingMachine_ratedPowerFactor); + assign_map.emplace("cim:RotatingMachine.ratedS", &assign_RotatingMachine_ratedS); + assign_map.emplace("cim:RotatingMachine.ratedU", &assign_RotatingMachine_ratedU); } void RotatingMachine::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RotatingMachine.GeneratingUnit"), &assign_RotatingMachine_GeneratingUnit)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachine.HydroPump"), &assign_RotatingMachine_HydroPump)); + assign_map.emplace("cim:RotatingMachine.GeneratingUnit", &assign_RotatingMachine_GeneratingUnit); + assign_map.emplace("cim:RotatingMachine.HydroPump", &assign_RotatingMachine_HydroPump); } void RotatingMachine::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/RotatingMachine.hpp b/CGMES_2.4.13_18DEC2013/RotatingMachine.hpp index 14a963aad..94e3078ed 100644 --- a/CGMES_2.4.13_18DEC2013/RotatingMachine.hpp +++ b/CGMES_2.4.13_18DEC2013/RotatingMachine.hpp @@ -23,9 +23,7 @@ namespace CIMPP class GeneratingUnit; class HydroPump; - /* - A rotating machine which may be used as a generator or motor. - */ + /** \brief A rotating machine which may be used as a generator or motor. */ class RotatingMachine : public RegulatingCondEq { public: @@ -33,13 +31,26 @@ namespace CIMPP RotatingMachine(); ~RotatingMachine() override; - CIMPP::GeneratingUnit* GeneratingUnit; /* A synchronous machine may operate as a generator and as such becomes a member of a generating unit. Default: 0 */ - CIMPP::HydroPump* HydroPump; /* The synchronous machine drives the turbine which moves the water from a low elevation to a higher elevation. The direction of machine rotation for pumping may or may not be the same as for generating. Default: 0 */ - CIMPP::ActivePower p; /* Active power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution. Default: nullptr */ - CIMPP::ReactivePower q; /* Reactive power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution. Default: nullptr */ - CIMPP::Simple_Float ratedPowerFactor; /* Power factor (nameplate data). It is primarily used for short circuit data exchange according to IEC 60909. Default: nullptr */ - CIMPP::ApparentPower ratedS; /* Nameplate apparent power rating for the unit. The attribute shall have a positive value. Default: nullptr */ - CIMPP::Voltage ratedU; /* Rated voltage (nameplate data, Ur in IEC 60909-0). It is primarily used for short circuit data exchange according to IEC 60909. Default: nullptr */ + /** \brief A synchronous machine may operate as a generator and as such becomes a member of a generating unit. Default: 0 */ + CIMPP::GeneratingUnit* GeneratingUnit; + + /** \brief The synchronous machine drives the turbine which moves the water from a low elevation to a higher elevation. The direction of machine rotation for pumping may or may not be the same as for generating. Default: 0 */ + CIMPP::HydroPump* HydroPump; + + /** \brief Active power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution. Default: nullptr */ + CIMPP::ActivePower p; + + /** \brief Reactive power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution. Default: nullptr */ + CIMPP::ReactivePower q; + + /** \brief Power factor (nameplate data). It is primarily used for short circuit data exchange according to IEC 60909. Default: nullptr */ + CIMPP::Simple_Float ratedPowerFactor; + + /** \brief Nameplate apparent power rating for the unit. The attribute shall have a positive value. Default: nullptr */ + CIMPP::ApparentPower ratedS; + + /** \brief Rated voltage (nameplate data, Ur in IEC 60909-0). It is primarily used for short circuit data exchange according to IEC 60909. Default: nullptr */ + CIMPP::Voltage ratedU; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/RotatingMachineDynamics.cpp b/CGMES_2.4.13_18DEC2013/RotatingMachineDynamics.cpp index 81cc6d9d1..57dd9d608 100644 --- a/CGMES_2.4.13_18DEC2013/RotatingMachineDynamics.cpp +++ b/CGMES_2.4.13_18DEC2013/RotatingMachineDynamics.cpp @@ -8,17 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -RotatingMachineDynamics::RotatingMachineDynamics() {}; -RotatingMachineDynamics::~RotatingMachineDynamics() {}; +RotatingMachineDynamics::RotatingMachineDynamics() {} +RotatingMachineDynamics::~RotatingMachineDynamics() {} static const std::list PossibleProfilesForClass = { @@ -50,90 +44,94 @@ RotatingMachineDynamics::getPossibleProfilesForAttributes() const return map; } - -bool assign_RotatingMachineDynamics_damping(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachineDynamics_damping(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->damping; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RotatingMachineDynamics_inertia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachineDynamics_inertia(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inertia; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RotatingMachineDynamics_saturationFactor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachineDynamics_saturationFactor(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->saturationFactor; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RotatingMachineDynamics_saturationFactor120(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachineDynamics_saturationFactor120(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->saturationFactor120; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RotatingMachineDynamics_statorLeakageReactance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachineDynamics_statorLeakageReactance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->statorLeakageReactance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RotatingMachineDynamics_statorResistance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachineDynamics_statorResistance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->statorResistance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_RotatingMachineDynamics_damping(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->damping; if (!buffer.str().empty()) @@ -147,7 +145,8 @@ bool get_RotatingMachineDynamics_damping(const BaseClass* BaseClass_ptr1, std::s bool get_RotatingMachineDynamics_inertia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inertia; if (!buffer.str().empty()) @@ -161,7 +160,8 @@ bool get_RotatingMachineDynamics_inertia(const BaseClass* BaseClass_ptr1, std::s bool get_RotatingMachineDynamics_saturationFactor(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->saturationFactor; if (!buffer.str().empty()) @@ -175,7 +175,8 @@ bool get_RotatingMachineDynamics_saturationFactor(const BaseClass* BaseClass_ptr bool get_RotatingMachineDynamics_saturationFactor120(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->saturationFactor120; if (!buffer.str().empty()) @@ -189,7 +190,8 @@ bool get_RotatingMachineDynamics_saturationFactor120(const BaseClass* BaseClass_ bool get_RotatingMachineDynamics_statorLeakageReactance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->statorLeakageReactance; if (!buffer.str().empty()) @@ -203,7 +205,8 @@ bool get_RotatingMachineDynamics_statorLeakageReactance(const BaseClass* BaseCla bool get_RotatingMachineDynamics_statorResistance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->statorResistance; if (!buffer.str().empty()) @@ -215,8 +218,6 @@ bool get_RotatingMachineDynamics_statorResistance(const BaseClass* BaseClass_ptr return false; } - - const char RotatingMachineDynamics::debugName[] = "RotatingMachineDynamics"; const char* RotatingMachineDynamics::debugString() const { @@ -225,17 +226,17 @@ const char* RotatingMachineDynamics::debugString() const void RotatingMachineDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RotatingMachineDynamics"), &RotatingMachineDynamics_factory)); + factory_map.emplace("cim:RotatingMachineDynamics", &RotatingMachineDynamics_factory); } void RotatingMachineDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RotatingMachineDynamics.damping"), &assign_RotatingMachineDynamics_damping)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachineDynamics.inertia"), &assign_RotatingMachineDynamics_inertia)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachineDynamics.saturationFactor"), &assign_RotatingMachineDynamics_saturationFactor)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachineDynamics.saturationFactor120"), &assign_RotatingMachineDynamics_saturationFactor120)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachineDynamics.statorLeakageReactance"), &assign_RotatingMachineDynamics_statorLeakageReactance)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachineDynamics.statorResistance"), &assign_RotatingMachineDynamics_statorResistance)); + assign_map.emplace("cim:RotatingMachineDynamics.damping", &assign_RotatingMachineDynamics_damping); + assign_map.emplace("cim:RotatingMachineDynamics.inertia", &assign_RotatingMachineDynamics_inertia); + assign_map.emplace("cim:RotatingMachineDynamics.saturationFactor", &assign_RotatingMachineDynamics_saturationFactor); + assign_map.emplace("cim:RotatingMachineDynamics.saturationFactor120", &assign_RotatingMachineDynamics_saturationFactor120); + assign_map.emplace("cim:RotatingMachineDynamics.statorLeakageReactance", &assign_RotatingMachineDynamics_statorLeakageReactance); + assign_map.emplace("cim:RotatingMachineDynamics.statorResistance", &assign_RotatingMachineDynamics_statorResistance); } void RotatingMachineDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/RotatingMachineDynamics.hpp b/CGMES_2.4.13_18DEC2013/RotatingMachineDynamics.hpp index b6a308942..97a2d57c7 100644 --- a/CGMES_2.4.13_18DEC2013/RotatingMachineDynamics.hpp +++ b/CGMES_2.4.13_18DEC2013/RotatingMachineDynamics.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Abstract parent class for all synchronous and asynchronous machine standard models. - */ + /** \brief Abstract parent class for all synchronous and asynchronous machine standard models. */ class RotatingMachineDynamics : public DynamicsFunctionBlock { public: @@ -29,12 +27,23 @@ namespace CIMPP RotatingMachineDynamics(); ~RotatingMachineDynamics() override; - CIMPP::Simple_Float damping; /* Damping torque coefficient (D). A proportionality constant that, when multiplied by the angular velocity of the rotor poles with respect to the magnetic field (frequency), results in the damping torque. This value is often zero when the sources of damping torques (generator damper windings, load damping effects, etc.) are modelled in detail. Typical Value = 0. Default: nullptr */ - CIMPP::Seconds inertia; /* Inertia constant of generator or motor and mechanical load (H) (>0). This is the specification for the stored energy in the rotating mass when operating at rated speed. For a generator, this includes the generator plus all other elements (turbine, exciter) on the same shaft and has units of MW*sec. For a motor, it includes the motor plus its mechanical load. Conventional units are per unit on the generator MVA base, usually expressed as MW*second/MVA or just second. This value is used in the accelerating power reference frame for operator training simulator solutions. Typical Value = 3. Default: nullptr */ - CIMPP::Simple_Float saturationFactor; /* Saturation factor at rated terminal voltage (S1) (> or =0). Not used by simplified model. Defined by defined by S(E1) in the SynchronousMachineSaturationParameters diagram. Typical Value = 0.02. Default: nullptr */ - CIMPP::Simple_Float saturationFactor120; /* Saturation factor at 120% of rated terminal voltage (S12) (> or =S1). Not used by the simplified model, defined by S(E2) in the SynchronousMachineSaturationParameters diagram. Typical Value = 0.12. Default: nullptr */ - CIMPP::PU statorLeakageReactance; /* Stator leakage reactance (Xl) (> or =0). Typical Value = 0.15. Default: nullptr */ - CIMPP::PU statorResistance; /* Stator (armature) resistance (Rs) (> or =0). Typical Value = 0.005. Default: nullptr */ + /** \brief Damping torque coefficient (D). A proportionality constant that, when multiplied by the angular velocity of the rotor poles with respect to the magnetic field (frequency), results in the damping torque. This value is often zero when the sources of damping torques (generator damper windings, load damping effects, etc.) are modelled in detail. Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float damping; + + /** \brief Inertia constant of generator or motor and mechanical load (H) (>0). This is the specification for the stored energy in the rotating mass when operating at rated speed. For a generator, this includes the generator plus all other elements (turbine, exciter) on the same shaft and has units of MW*sec. For a motor, it includes the motor plus its mechanical load. Conventional units are per unit on the generator MVA base, usually expressed as MW*second/MVA or just second. This value is used in the accelerating power reference frame for operator training simulator solutions. Typical Value = 3. Default: nullptr */ + CIMPP::Seconds inertia; + + /** \brief Saturation factor at rated terminal voltage (S1) (> or =0). Not used by simplified model. Defined by defined by S(E1) in the SynchronousMachineSaturationParameters diagram. Typical Value = 0.02. Default: nullptr */ + CIMPP::Simple_Float saturationFactor; + + /** \brief Saturation factor at 120% of rated terminal voltage (S12) (> or =S1). Not used by the simplified model, defined by S(E2) in the SynchronousMachineSaturationParameters diagram. Typical Value = 0.12. Default: nullptr */ + CIMPP::Simple_Float saturationFactor120; + + /** \brief Stator leakage reactance (Xl) (> or =0). Typical Value = 0.15. Default: nullptr */ + CIMPP::PU statorLeakageReactance; + + /** \brief Stator (armature) resistance (Rs) (> or =0). Typical Value = 0.005. Default: nullptr */ + CIMPP::PU statorResistance; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/RotationSpeed.hpp b/CGMES_2.4.13_18DEC2013/RotationSpeed.hpp index 20dae4027..3ffdcb396 100644 --- a/CGMES_2.4.13_18DEC2013/RotationSpeed.hpp +++ b/CGMES_2.4.13_18DEC2013/RotationSpeed.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Number of revolutions per second. - */ + /** \brief Number of revolutions per second. */ class RotationSpeed { public: diff --git a/CGMES_2.4.13_18DEC2013/RotorKind.cpp b/CGMES_2.4.13_18DEC2013/RotorKind.cpp index 155faceec..5474d65a5 100644 --- a/CGMES_2.4.13_18DEC2013/RotorKind.cpp +++ b/CGMES_2.4.13_18DEC2013/RotorKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "RotorKind") + if (EnumSymbol.substr(0, pos) != "RotorKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,12 +50,12 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "roundRotor") + if (EnumSymbol == "roundRotor") { rop = RotorKind::roundRotor; return lop; } - if(EnumSymbol == "salientPole") + if (EnumSymbol == "salientPole") { rop = RotorKind::salientPole; return lop; diff --git a/CGMES_2.4.13_18DEC2013/RotorKind.hpp b/CGMES_2.4.13_18DEC2013/RotorKind.hpp index d86eccaa1..1208e8979 100644 --- a/CGMES_2.4.13_18DEC2013/RotorKind.hpp +++ b/CGMES_2.4.13_18DEC2013/RotorKind.hpp @@ -9,21 +9,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of rotor on physical machine. - */ + /** \brief Type of rotor on physical machine. */ class RotorKind { public: enum RotorKind_ENUM { - /** - * Round rotor type of synchronous machine. - */ + /** Round rotor type of synchronous machine. */ roundRotor, - /** - * Salient pole type of synchronous machine. - */ + /** Salient pole type of synchronous machine. */ salientPole, }; diff --git a/CGMES_2.4.13_18DEC2013/SVCControlMode.cpp b/CGMES_2.4.13_18DEC2013/SVCControlMode.cpp index 4ccad37d6..d065e0216 100644 --- a/CGMES_2.4.13_18DEC2013/SVCControlMode.cpp +++ b/CGMES_2.4.13_18DEC2013/SVCControlMode.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "SVCControlMode") + if (EnumSymbol.substr(0, pos) != "SVCControlMode") { lop.setstate(std::ios::failbit); return lop; @@ -50,12 +50,12 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "reactivePower") + if (EnumSymbol == "reactivePower") { rop = SVCControlMode::reactivePower; return lop; } - if(EnumSymbol == "voltage") + if (EnumSymbol == "voltage") { rop = SVCControlMode::voltage; return lop; diff --git a/CGMES_2.4.13_18DEC2013/SVCControlMode.hpp b/CGMES_2.4.13_18DEC2013/SVCControlMode.hpp index 52da28bad..43127f392 100644 --- a/CGMES_2.4.13_18DEC2013/SVCControlMode.hpp +++ b/CGMES_2.4.13_18DEC2013/SVCControlMode.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Static VAr Compensator control mode. - */ + /** \brief Static VAr Compensator control mode. */ class SVCControlMode { public: diff --git a/CGMES_2.4.13_18DEC2013/Season.cpp b/CGMES_2.4.13_18DEC2013/Season.cpp index 02f2e0db6..bd79ad860 100644 --- a/CGMES_2.4.13_18DEC2013/Season.cpp +++ b/CGMES_2.4.13_18DEC2013/Season.cpp @@ -9,13 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "SeasonDayTypeSchedule.hpp" -#include "MonthDay.hpp" -#include "MonthDay.hpp" using namespace CIMPP; -Season::Season() {}; -Season::~Season() {}; +Season::Season() {} +Season::~Season() {} static const std::list PossibleProfilesForClass = { @@ -44,54 +42,56 @@ Season::getPossibleProfilesForAttributes() const return map; } - -bool assign_Season_endDate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SeasonDayTypeSchedule_Season(BaseClass*, BaseClass*); +bool assign_Season_SeasonDayTypeSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (Season* element = dynamic_cast(BaseClass_ptr1)) + Season* element = dynamic_cast(BaseClass_ptr1); + SeasonDayTypeSchedule* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - element->endDate = buffer.str(); - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->SeasonDayTypeSchedules.begin(), element->SeasonDayTypeSchedules.end(), element2) == element->SeasonDayTypeSchedules.end()) + { + element->SeasonDayTypeSchedules.push_back(element2); + return assign_SeasonDayTypeSchedule_Season(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_Season_startDate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Season_endDate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Season* element = dynamic_cast(BaseClass_ptr1)) + Season* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - element->startDate = buffer.str(); - if (buffer.fail()) - return false; - else + element->endDate = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_SeasonDayTypeSchedule_Season(BaseClass*, BaseClass*); -bool assign_Season_SeasonDayTypeSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_Season_startDate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { Season* element = dynamic_cast(BaseClass_ptr1); - SeasonDayTypeSchedule* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->SeasonDayTypeSchedules.begin(), element->SeasonDayTypeSchedules.end(), element2) == element->SeasonDayTypeSchedules.end()) + element->startDate = buffer.str(); + if (!buffer.fail()) { - element->SeasonDayTypeSchedules.push_back(element2); - return assign_SeasonDayTypeSchedule_Season(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_Season_endDate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Season* element = dynamic_cast(BaseClass_ptr1)) + const Season* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->endDate; if (!buffer.str().empty()) @@ -105,7 +105,8 @@ bool get_Season_endDate(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_Season_startDate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Season* element = dynamic_cast(BaseClass_ptr1)) + const Season* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->startDate; if (!buffer.str().empty()) @@ -117,8 +118,6 @@ bool get_Season_startDate(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char Season::debugName[] = "Season"; const char* Season::debugString() const { @@ -127,18 +126,18 @@ const char* Season::debugString() const void Season::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Season"), &Season_factory)); + factory_map.emplace("cim:Season", &Season_factory); } void Season::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Season.endDate"), &assign_Season_endDate)); - assign_map.insert(std::make_pair(std::string("cim:Season.startDate"), &assign_Season_startDate)); + assign_map.emplace("cim:Season.endDate", &assign_Season_endDate); + assign_map.emplace("cim:Season.startDate", &assign_Season_startDate); } void Season::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Season.SeasonDayTypeSchedules"), &assign_Season_SeasonDayTypeSchedules)); + assign_map.emplace("cim:Season.SeasonDayTypeSchedules", &assign_Season_SeasonDayTypeSchedules); } void Season::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/Season.hpp b/CGMES_2.4.13_18DEC2013/Season.hpp index f56c355a0..884a07e64 100644 --- a/CGMES_2.4.13_18DEC2013/Season.hpp +++ b/CGMES_2.4.13_18DEC2013/Season.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class SeasonDayTypeSchedule; - /* - A specified time period of the year. - */ + /** \brief A specified time period of the year. */ class Season : public IdentifiedObject { public: @@ -28,9 +26,14 @@ namespace CIMPP Season(); ~Season() override; - std::list SeasonDayTypeSchedules; /* Season for the Schedule. Default: 0 */ - CIMPP::MonthDay endDate; /* Date season ends. Default: nullptr */ - CIMPP::MonthDay startDate; /* Date season starts. Default: nullptr */ + /** \brief Season for the Schedule. Default: 0 */ + std::list SeasonDayTypeSchedules; + + /** \brief Date season ends. Default: nullptr */ + CIMPP::MonthDay endDate; + + /** \brief Date season starts. Default: nullptr */ + CIMPP::MonthDay startDate; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/SeasonDayTypeSchedule.cpp b/CGMES_2.4.13_18DEC2013/SeasonDayTypeSchedule.cpp index 284c63264..dcc36cca0 100644 --- a/CGMES_2.4.13_18DEC2013/SeasonDayTypeSchedule.cpp +++ b/CGMES_2.4.13_18DEC2013/SeasonDayTypeSchedule.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -SeasonDayTypeSchedule::SeasonDayTypeSchedule() : DayType(nullptr), Season(nullptr) {}; -SeasonDayTypeSchedule::~SeasonDayTypeSchedule() {}; +SeasonDayTypeSchedule::SeasonDayTypeSchedule() : DayType(nullptr), Season(nullptr) {} +SeasonDayTypeSchedule::~SeasonDayTypeSchedule() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ SeasonDayTypeSchedule::getPossibleProfilesForAttributes() const return map; } - - bool assign_DayType_SeasonDayTypeSchedules(BaseClass*, BaseClass*); bool assign_SeasonDayTypeSchedule_DayType(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_SeasonDayTypeSchedule_DayType(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_Season_SeasonDayTypeSchedules(BaseClass*, BaseClass*); bool assign_SeasonDayTypeSchedule_Season(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_SeasonDayTypeSchedule_Season(BaseClass* BaseClass_ptr1, BaseClass* B return false; } - bool get_SeasonDayTypeSchedule_DayType(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SeasonDayTypeSchedule* element = dynamic_cast(BaseClass_ptr1)) + const SeasonDayTypeSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DayType != 0) { @@ -93,7 +92,8 @@ bool get_SeasonDayTypeSchedule_DayType(const BaseClass* BaseClass_ptr1, std::lis bool get_SeasonDayTypeSchedule_Season(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SeasonDayTypeSchedule* element = dynamic_cast(BaseClass_ptr1)) + const SeasonDayTypeSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Season != 0) { @@ -104,7 +104,6 @@ bool get_SeasonDayTypeSchedule_Season(const BaseClass* BaseClass_ptr1, std::list return false; } - const char SeasonDayTypeSchedule::debugName[] = "SeasonDayTypeSchedule"; const char* SeasonDayTypeSchedule::debugString() const { @@ -113,7 +112,7 @@ const char* SeasonDayTypeSchedule::debugString() const void SeasonDayTypeSchedule::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SeasonDayTypeSchedule"), &SeasonDayTypeSchedule_factory)); + factory_map.emplace("cim:SeasonDayTypeSchedule", &SeasonDayTypeSchedule_factory); } void SeasonDayTypeSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void SeasonDayTypeSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SeasonDayTypeSchedule.DayType"), &assign_SeasonDayTypeSchedule_DayType)); - assign_map.insert(std::make_pair(std::string("cim:SeasonDayTypeSchedule.Season"), &assign_SeasonDayTypeSchedule_Season)); + assign_map.emplace("cim:SeasonDayTypeSchedule.DayType", &assign_SeasonDayTypeSchedule_DayType); + assign_map.emplace("cim:SeasonDayTypeSchedule.Season", &assign_SeasonDayTypeSchedule_Season); } void SeasonDayTypeSchedule::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/SeasonDayTypeSchedule.hpp b/CGMES_2.4.13_18DEC2013/SeasonDayTypeSchedule.hpp index 8658cffe8..bb3b41a35 100644 --- a/CGMES_2.4.13_18DEC2013/SeasonDayTypeSchedule.hpp +++ b/CGMES_2.4.13_18DEC2013/SeasonDayTypeSchedule.hpp @@ -18,9 +18,7 @@ namespace CIMPP class DayType; class Season; - /* - A time schedule covering a 24 hour period, with curve data for a specific type of season and day. - */ + /** \brief A time schedule covering a 24 hour period, with curve data for a specific type of season and day. */ class SeasonDayTypeSchedule : public RegularIntervalSchedule { public: @@ -28,8 +26,11 @@ namespace CIMPP SeasonDayTypeSchedule(); ~SeasonDayTypeSchedule() override; - CIMPP::DayType* DayType; /* Schedules that use this DayType. Default: 0 */ - CIMPP::Season* Season; /* Schedules that use this Season. Default: 0 */ + /** \brief Schedules that use this DayType. Default: 0 */ + CIMPP::DayType* DayType; + + /** \brief Schedules that use this Season. Default: 0 */ + CIMPP::Season* Season; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Seconds.hpp b/CGMES_2.4.13_18DEC2013/Seconds.hpp index 60e9a668b..9284aa059 100644 --- a/CGMES_2.4.13_18DEC2013/Seconds.hpp +++ b/CGMES_2.4.13_18DEC2013/Seconds.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Time, in seconds. - */ + /** \brief Time, in seconds. */ class Seconds { public: diff --git a/CGMES_2.4.13_18DEC2013/SeriesCompensator.cpp b/CGMES_2.4.13_18DEC2013/SeriesCompensator.cpp index bf05698f2..291e18404 100644 --- a/CGMES_2.4.13_18DEC2013/SeriesCompensator.cpp +++ b/CGMES_2.4.13_18DEC2013/SeriesCompensator.cpp @@ -8,18 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "Boolean.hpp" -#include "CurrentFlow.hpp" -#include "Voltage.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -SeriesCompensator::SeriesCompensator() {}; -SeriesCompensator::~SeriesCompensator() {}; +SeriesCompensator::SeriesCompensator() {} +SeriesCompensator::~SeriesCompensator() {} static const std::list PossibleProfilesForClass = { @@ -52,103 +45,108 @@ SeriesCompensator::getPossibleProfilesForAttributes() const return map; } - -bool assign_SeriesCompensator_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SeriesCompensator_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SeriesCompensator_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SeriesCompensator_r0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SeriesCompensator_varistorPresent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SeriesCompensator_varistorPresent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->varistorPresent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SeriesCompensator_varistorRatedCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SeriesCompensator_varistorRatedCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->varistorRatedCurrent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SeriesCompensator_varistorVoltageThreshold(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SeriesCompensator_varistorVoltageThreshold(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->varistorVoltageThreshold; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SeriesCompensator_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SeriesCompensator_x(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SeriesCompensator_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SeriesCompensator_x0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_SeriesCompensator_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -162,7 +160,8 @@ bool get_SeriesCompensator_r(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_SeriesCompensator_r0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r0; if (!buffer.str().empty()) @@ -176,7 +175,8 @@ bool get_SeriesCompensator_r0(const BaseClass* BaseClass_ptr1, std::stringstream bool get_SeriesCompensator_varistorPresent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->varistorPresent; if (!buffer.str().empty()) @@ -190,7 +190,8 @@ bool get_SeriesCompensator_varistorPresent(const BaseClass* BaseClass_ptr1, std: bool get_SeriesCompensator_varistorRatedCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->varistorRatedCurrent; if (!buffer.str().empty()) @@ -204,7 +205,8 @@ bool get_SeriesCompensator_varistorRatedCurrent(const BaseClass* BaseClass_ptr1, bool get_SeriesCompensator_varistorVoltageThreshold(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->varistorVoltageThreshold; if (!buffer.str().empty()) @@ -218,7 +220,8 @@ bool get_SeriesCompensator_varistorVoltageThreshold(const BaseClass* BaseClass_p bool get_SeriesCompensator_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x; if (!buffer.str().empty()) @@ -232,7 +235,8 @@ bool get_SeriesCompensator_x(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_SeriesCompensator_x0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x0; if (!buffer.str().empty()) @@ -244,8 +248,6 @@ bool get_SeriesCompensator_x0(const BaseClass* BaseClass_ptr1, std::stringstream return false; } - - const char SeriesCompensator::debugName[] = "SeriesCompensator"; const char* SeriesCompensator::debugString() const { @@ -254,18 +256,18 @@ const char* SeriesCompensator::debugString() const void SeriesCompensator::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SeriesCompensator"), &SeriesCompensator_factory)); + factory_map.emplace("cim:SeriesCompensator", &SeriesCompensator_factory); } void SeriesCompensator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SeriesCompensator.r"), &assign_SeriesCompensator_r)); - assign_map.insert(std::make_pair(std::string("cim:SeriesCompensator.r0"), &assign_SeriesCompensator_r0)); - assign_map.insert(std::make_pair(std::string("cim:SeriesCompensator.varistorPresent"), &assign_SeriesCompensator_varistorPresent)); - assign_map.insert(std::make_pair(std::string("cim:SeriesCompensator.varistorRatedCurrent"), &assign_SeriesCompensator_varistorRatedCurrent)); - assign_map.insert(std::make_pair(std::string("cim:SeriesCompensator.varistorVoltageThreshold"), &assign_SeriesCompensator_varistorVoltageThreshold)); - assign_map.insert(std::make_pair(std::string("cim:SeriesCompensator.x"), &assign_SeriesCompensator_x)); - assign_map.insert(std::make_pair(std::string("cim:SeriesCompensator.x0"), &assign_SeriesCompensator_x0)); + assign_map.emplace("cim:SeriesCompensator.r", &assign_SeriesCompensator_r); + assign_map.emplace("cim:SeriesCompensator.r0", &assign_SeriesCompensator_r0); + assign_map.emplace("cim:SeriesCompensator.varistorPresent", &assign_SeriesCompensator_varistorPresent); + assign_map.emplace("cim:SeriesCompensator.varistorRatedCurrent", &assign_SeriesCompensator_varistorRatedCurrent); + assign_map.emplace("cim:SeriesCompensator.varistorVoltageThreshold", &assign_SeriesCompensator_varistorVoltageThreshold); + assign_map.emplace("cim:SeriesCompensator.x", &assign_SeriesCompensator_x); + assign_map.emplace("cim:SeriesCompensator.x0", &assign_SeriesCompensator_x0); } void SeriesCompensator::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/SeriesCompensator.hpp b/CGMES_2.4.13_18DEC2013/SeriesCompensator.hpp index 858b49588..8d77b514a 100644 --- a/CGMES_2.4.13_18DEC2013/SeriesCompensator.hpp +++ b/CGMES_2.4.13_18DEC2013/SeriesCompensator.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A Series Compensator is a series capacitor or reactor or an AC transmission line without charging susceptance. It is a two terminal device. - */ + /** \brief A Series Compensator is a series capacitor or reactor or an AC transmission line without charging susceptance. It is a two terminal device. */ class SeriesCompensator : public ConductingEquipment { public: @@ -31,13 +29,26 @@ namespace CIMPP SeriesCompensator(); ~SeriesCompensator() override; - CIMPP::Resistance r; /* Positive sequence resistance. Default: nullptr */ - CIMPP::Resistance r0; /* Zero sequence resistance. Default: nullptr */ - CIMPP::Boolean varistorPresent; /* Describe if a metal oxide varistor (mov) for over voltage protection is configured at the series compensator. Default: false */ - CIMPP::CurrentFlow varistorRatedCurrent; /* The maximum current the varistor is designed to handle at specified duration. Default: nullptr */ - CIMPP::Voltage varistorVoltageThreshold; /* The dc voltage at which the varistor start conducting. Default: nullptr */ - CIMPP::Reactance x; /* Positive sequence reactance. Default: nullptr */ - CIMPP::Reactance x0; /* Zero sequence reactance. Default: nullptr */ + /** \brief Positive sequence resistance. Default: nullptr */ + CIMPP::Resistance r; + + /** \brief Zero sequence resistance. Default: nullptr */ + CIMPP::Resistance r0; + + /** \brief Describe if a metal oxide varistor (mov) for over voltage protection is configured at the series compensator. Default: false */ + CIMPP::Boolean varistorPresent; + + /** \brief The maximum current the varistor is designed to handle at specified duration. Default: nullptr */ + CIMPP::CurrentFlow varistorRatedCurrent; + + /** \brief The dc voltage at which the varistor start conducting. Default: nullptr */ + CIMPP::Voltage varistorVoltageThreshold; + + /** \brief Positive sequence reactance. Default: nullptr */ + CIMPP::Reactance x; + + /** \brief Zero sequence reactance. Default: nullptr */ + CIMPP::Reactance x0; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/SetPoint.cpp b/CGMES_2.4.13_18DEC2013/SetPoint.cpp index efd3b8575..5282827e5 100644 --- a/CGMES_2.4.13_18DEC2013/SetPoint.cpp +++ b/CGMES_2.4.13_18DEC2013/SetPoint.cpp @@ -8,13 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -SetPoint::SetPoint() {}; -SetPoint::~SetPoint() {}; +SetPoint::SetPoint() {} +SetPoint::~SetPoint() {} static const std::list PossibleProfilesForClass = { @@ -42,38 +40,38 @@ SetPoint::getPossibleProfilesForAttributes() const return map; } - -bool assign_SetPoint_normalValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SetPoint_normalValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SetPoint* element = dynamic_cast(BaseClass_ptr1)) + SetPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->normalValue; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SetPoint_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SetPoint_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SetPoint* element = dynamic_cast(BaseClass_ptr1)) + SetPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->value; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_SetPoint_normalValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SetPoint* element = dynamic_cast(BaseClass_ptr1)) + const SetPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->normalValue; if (!buffer.str().empty()) @@ -87,7 +85,8 @@ bool get_SetPoint_normalValue(const BaseClass* BaseClass_ptr1, std::stringstream bool get_SetPoint_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SetPoint* element = dynamic_cast(BaseClass_ptr1)) + const SetPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value; if (!buffer.str().empty()) @@ -99,8 +98,6 @@ bool get_SetPoint_value(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char SetPoint::debugName[] = "SetPoint"; const char* SetPoint::debugString() const { @@ -109,13 +106,13 @@ const char* SetPoint::debugString() const void SetPoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SetPoint"), &SetPoint_factory)); + factory_map.emplace("cim:SetPoint", &SetPoint_factory); } void SetPoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SetPoint.normalValue"), &assign_SetPoint_normalValue)); - assign_map.insert(std::make_pair(std::string("cim:SetPoint.value"), &assign_SetPoint_value)); + assign_map.emplace("cim:SetPoint.normalValue", &assign_SetPoint_normalValue); + assign_map.emplace("cim:SetPoint.value", &assign_SetPoint_value); } void SetPoint::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/SetPoint.hpp b/CGMES_2.4.13_18DEC2013/SetPoint.hpp index b88b8246b..373731845 100644 --- a/CGMES_2.4.13_18DEC2013/SetPoint.hpp +++ b/CGMES_2.4.13_18DEC2013/SetPoint.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - An analog control that issue a set point value. - */ + /** \brief An analog control that issue a set point value. */ class SetPoint : public AnalogControl { public: @@ -27,8 +25,11 @@ namespace CIMPP SetPoint(); ~SetPoint() override; - CIMPP::Simple_Float normalValue; /* Normal value for Control.value e.g. used for percentage scaling. Default: nullptr */ - CIMPP::Simple_Float value; /* The value representing the actuator output. Default: nullptr */ + /** \brief Normal value for Control.value e.g. used for percentage scaling. Default: nullptr */ + CIMPP::Simple_Float normalValue; + + /** \brief The value representing the actuator output. Default: nullptr */ + CIMPP::Simple_Float value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ShortCircuitRotorKind.cpp b/CGMES_2.4.13_18DEC2013/ShortCircuitRotorKind.cpp index 9e7ea1852..8c6e07eb8 100644 --- a/CGMES_2.4.13_18DEC2013/ShortCircuitRotorKind.cpp +++ b/CGMES_2.4.13_18DEC2013/ShortCircuitRotorKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "ShortCircuitRotorKind") + if (EnumSymbol.substr(0, pos) != "ShortCircuitRotorKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,22 +50,22 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "salientPole1") + if (EnumSymbol == "salientPole1") { rop = ShortCircuitRotorKind::salientPole1; return lop; } - if(EnumSymbol == "salientPole2") + if (EnumSymbol == "salientPole2") { rop = ShortCircuitRotorKind::salientPole2; return lop; } - if(EnumSymbol == "turboSeries1") + if (EnumSymbol == "turboSeries1") { rop = ShortCircuitRotorKind::turboSeries1; return lop; } - if(EnumSymbol == "turboSeries2") + if (EnumSymbol == "turboSeries2") { rop = ShortCircuitRotorKind::turboSeries2; return lop; diff --git a/CGMES_2.4.13_18DEC2013/ShortCircuitRotorKind.hpp b/CGMES_2.4.13_18DEC2013/ShortCircuitRotorKind.hpp index 76f473214..71b3acfc3 100644 --- a/CGMES_2.4.13_18DEC2013/ShortCircuitRotorKind.hpp +++ b/CGMES_2.4.13_18DEC2013/ShortCircuitRotorKind.hpp @@ -9,29 +9,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of rotor, used by short circuit applications. - */ + /** \brief Type of rotor, used by short circuit applications. */ class ShortCircuitRotorKind { public: enum ShortCircuitRotorKind_ENUM { - /** - * Salient pole 1 in the IEC 60909 - */ + /** Salient pole 1 in the IEC 60909 */ salientPole1, - /** - * Salient pole 2 in IEC 60909 - */ + /** Salient pole 2 in IEC 60909 */ salientPole2, - /** - * Turbo Series 1 in the IEC 60909 - */ + /** Turbo Series 1 in the IEC 60909 */ turboSeries1, - /** - * Turbo series 2 in IEC 60909 - */ + /** Turbo series 2 in IEC 60909 */ turboSeries2, }; diff --git a/CGMES_2.4.13_18DEC2013/ShuntCompensator.cpp b/CGMES_2.4.13_18DEC2013/ShuntCompensator.cpp index c6ffcbea0..53878ebfa 100644 --- a/CGMES_2.4.13_18DEC2013/ShuntCompensator.cpp +++ b/CGMES_2.4.13_18DEC2013/ShuntCompensator.cpp @@ -9,20 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "SvShuntCompensatorSections.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "Integer.hpp" -#include "Voltage.hpp" -#include "Integer.hpp" -#include "Simple_Float.hpp" -#include "Integer.hpp" -#include "DateTime.hpp" -#include "VoltagePerReactivePower.hpp" using namespace CIMPP; -ShuntCompensator::ShuntCompensator() : SvShuntCompensatorSections(nullptr) {}; -ShuntCompensator::~ShuntCompensator() {}; +ShuntCompensator::ShuntCompensator() : SvShuntCompensatorSections(nullptr) {} +ShuntCompensator::~ShuntCompensator() {} static const std::list PossibleProfilesForClass = { @@ -60,145 +51,154 @@ ShuntCompensator::getPossibleProfilesForAttributes() const return map; } +bool assign_SvShuntCompensatorSections_ShuntCompensator(BaseClass*, BaseClass*); +bool assign_ShuntCompensator_SvShuntCompensatorSections(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + SvShuntCompensatorSections* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->SvShuntCompensatorSections != element2) + { + element->SvShuntCompensatorSections = element2; + return assign_SvShuntCompensatorSections_ShuntCompensator(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_ShuntCompensator_aVRDelay(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ShuntCompensator_aVRDelay(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->aVRDelay; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ShuntCompensator_grounded(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ShuntCompensator_grounded(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->grounded; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ShuntCompensator_maximumSections(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ShuntCompensator_maximumSections(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maximumSections; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ShuntCompensator_nomU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ShuntCompensator_nomU(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nomU; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ShuntCompensator_normalSections(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ShuntCompensator_normalSections(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->normalSections; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ShuntCompensator_sections(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ShuntCompensator_sections(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->sections; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ShuntCompensator_switchOnCount(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ShuntCompensator_switchOnCount(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->switchOnCount; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ShuntCompensator_switchOnDate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ShuntCompensator_switchOnDate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->switchOnDate = buffer.str(); - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_ShuntCompensator_voltageSensitivity(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->voltageSensitivity; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_SvShuntCompensatorSections_ShuntCompensator(BaseClass*, BaseClass*); -bool assign_ShuntCompensator_SvShuntCompensatorSections(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_ShuntCompensator_voltageSensitivity(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); - SvShuntCompensatorSections* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->SvShuntCompensatorSections != element2) + buffer >> element->voltageSensitivity; + if (!buffer.fail()) { - element->SvShuntCompensatorSections = element2; - return assign_SvShuntCompensatorSections_ShuntCompensator(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_ShuntCompensator_aVRDelay(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->aVRDelay; if (!buffer.str().empty()) @@ -212,7 +212,8 @@ bool get_ShuntCompensator_aVRDelay(const BaseClass* BaseClass_ptr1, std::strings bool get_ShuntCompensator_grounded(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->grounded; if (!buffer.str().empty()) @@ -226,7 +227,8 @@ bool get_ShuntCompensator_grounded(const BaseClass* BaseClass_ptr1, std::strings bool get_ShuntCompensator_maximumSections(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maximumSections; if (!buffer.str().empty()) @@ -240,7 +242,8 @@ bool get_ShuntCompensator_maximumSections(const BaseClass* BaseClass_ptr1, std:: bool get_ShuntCompensator_nomU(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nomU; if (!buffer.str().empty()) @@ -254,7 +257,8 @@ bool get_ShuntCompensator_nomU(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_ShuntCompensator_normalSections(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->normalSections; if (!buffer.str().empty()) @@ -268,7 +272,8 @@ bool get_ShuntCompensator_normalSections(const BaseClass* BaseClass_ptr1, std::s bool get_ShuntCompensator_sections(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->sections; if (!buffer.str().empty()) @@ -282,7 +287,8 @@ bool get_ShuntCompensator_sections(const BaseClass* BaseClass_ptr1, std::strings bool get_ShuntCompensator_switchOnCount(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->switchOnCount; if (!buffer.str().empty()) @@ -296,7 +302,8 @@ bool get_ShuntCompensator_switchOnCount(const BaseClass* BaseClass_ptr1, std::st bool get_ShuntCompensator_switchOnDate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->switchOnDate; if (!buffer.str().empty()) @@ -310,7 +317,8 @@ bool get_ShuntCompensator_switchOnDate(const BaseClass* BaseClass_ptr1, std::str bool get_ShuntCompensator_voltageSensitivity(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->voltageSensitivity; if (!buffer.str().empty()) @@ -322,8 +330,6 @@ bool get_ShuntCompensator_voltageSensitivity(const BaseClass* BaseClass_ptr1, st return false; } - - const char ShuntCompensator::debugName[] = "ShuntCompensator"; const char* ShuntCompensator::debugString() const { @@ -332,25 +338,25 @@ const char* ShuntCompensator::debugString() const void ShuntCompensator::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ShuntCompensator"), &ShuntCompensator_factory)); + factory_map.emplace("cim:ShuntCompensator", &ShuntCompensator_factory); } void ShuntCompensator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.aVRDelay"), &assign_ShuntCompensator_aVRDelay)); - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.grounded"), &assign_ShuntCompensator_grounded)); - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.maximumSections"), &assign_ShuntCompensator_maximumSections)); - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.nomU"), &assign_ShuntCompensator_nomU)); - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.normalSections"), &assign_ShuntCompensator_normalSections)); - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.sections"), &assign_ShuntCompensator_sections)); - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.switchOnCount"), &assign_ShuntCompensator_switchOnCount)); - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.switchOnDate"), &assign_ShuntCompensator_switchOnDate)); - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.voltageSensitivity"), &assign_ShuntCompensator_voltageSensitivity)); + assign_map.emplace("cim:ShuntCompensator.aVRDelay", &assign_ShuntCompensator_aVRDelay); + assign_map.emplace("cim:ShuntCompensator.grounded", &assign_ShuntCompensator_grounded); + assign_map.emplace("cim:ShuntCompensator.maximumSections", &assign_ShuntCompensator_maximumSections); + assign_map.emplace("cim:ShuntCompensator.nomU", &assign_ShuntCompensator_nomU); + assign_map.emplace("cim:ShuntCompensator.normalSections", &assign_ShuntCompensator_normalSections); + assign_map.emplace("cim:ShuntCompensator.sections", &assign_ShuntCompensator_sections); + assign_map.emplace("cim:ShuntCompensator.switchOnCount", &assign_ShuntCompensator_switchOnCount); + assign_map.emplace("cim:ShuntCompensator.switchOnDate", &assign_ShuntCompensator_switchOnDate); + assign_map.emplace("cim:ShuntCompensator.voltageSensitivity", &assign_ShuntCompensator_voltageSensitivity); } void ShuntCompensator::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.SvShuntCompensatorSections"), &assign_ShuntCompensator_SvShuntCompensatorSections)); + assign_map.emplace("cim:ShuntCompensator.SvShuntCompensatorSections", &assign_ShuntCompensator_SvShuntCompensatorSections); } void ShuntCompensator::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/ShuntCompensator.hpp b/CGMES_2.4.13_18DEC2013/ShuntCompensator.hpp index f49148733..96927b2f6 100644 --- a/CGMES_2.4.13_18DEC2013/ShuntCompensator.hpp +++ b/CGMES_2.4.13_18DEC2013/ShuntCompensator.hpp @@ -24,9 +24,7 @@ namespace CIMPP { class SvShuntCompensatorSections; - /* - A shunt capacitor or reactor or switchable bank of shunt capacitors or reactors. A section of a shunt compensator is an individual capacitor or reactor. A negative value for reactivePerSection indicates that the compensator is a reactor. ShuntCompensator is a single terminal device. Ground is implied. - */ + /** \brief A shunt capacitor or reactor or switchable bank of shunt capacitors or reactors. A section of a shunt compensator is an individual capacitor or reactor. A negative value for reactivePerSection indicates that the compensator is a reactor. ShuntCompensator is a single terminal device. Ground is implied. */ class ShuntCompensator : public RegulatingCondEq { public: @@ -34,16 +32,35 @@ namespace CIMPP ShuntCompensator(); ~ShuntCompensator() override; - CIMPP::SvShuntCompensatorSections* SvShuntCompensatorSections; /* The state for the number of shunt compensator sections in service. Default: 0 */ - CIMPP::Seconds aVRDelay; /* Time delay required for the device to be connected or disconnected by automatic voltage regulation (AVR). Default: nullptr */ - CIMPP::Boolean grounded; /* Used for Yn and Zn connections. True if the neutral is solidly grounded. Default: false */ - CIMPP::Integer maximumSections; /* The maximum number of sections that may be switched in. Default: 0 */ - CIMPP::Voltage nomU; /* The voltage at which the nominal reactive power may be calculated. This should normally be within 10% of the voltage at which the capacitor is connected to the network. Default: nullptr */ - CIMPP::Integer normalSections; /* The normal number of sections switched in. Default: 0 */ - CIMPP::Simple_Float sections; /* Shunt compensator sections in use. Starting value for steady state solution. Non integer values are allowed to support continuous variables. The reasons for continuous value are to support study cases where no discrete shunt compensators has yet been designed, a solutions where a narrow voltage band force the sections to oscillate or accommodate for a continuous solution as input. Default: nullptr */ - CIMPP::Integer switchOnCount; /* The switch on count since the capacitor count was last reset or initialized. Default: 0 */ - CIMPP::DateTime switchOnDate; /* The date and time when the capacitor bank was last switched on. Default: '' */ - CIMPP::VoltagePerReactivePower voltageSensitivity; /* Voltage sensitivity required for the device to regulate the bus voltage, in voltage/reactive power. Default: nullptr */ + /** \brief The state for the number of shunt compensator sections in service. Default: 0 */ + CIMPP::SvShuntCompensatorSections* SvShuntCompensatorSections; + + /** \brief Time delay required for the device to be connected or disconnected by automatic voltage regulation (AVR). Default: nullptr */ + CIMPP::Seconds aVRDelay; + + /** \brief Used for Yn and Zn connections. True if the neutral is solidly grounded. Default: false */ + CIMPP::Boolean grounded; + + /** \brief The maximum number of sections that may be switched in. Default: 0 */ + CIMPP::Integer maximumSections; + + /** \brief The voltage at which the nominal reactive power may be calculated. This should normally be within 10% of the voltage at which the capacitor is connected to the network. Default: nullptr */ + CIMPP::Voltage nomU; + + /** \brief The normal number of sections switched in. Default: 0 */ + CIMPP::Integer normalSections; + + /** \brief Shunt compensator sections in use. Starting value for steady state solution. Non integer values are allowed to support continuous variables. The reasons for continuous value are to support study cases where no discrete shunt compensators has yet been designed, a solutions where a narrow voltage band force the sections to oscillate or accommodate for a continuous solution as input. Default: nullptr */ + CIMPP::Simple_Float sections; + + /** \brief The switch on count since the capacitor count was last reset or initialized. Default: 0 */ + CIMPP::Integer switchOnCount; + + /** \brief The date and time when the capacitor bank was last switched on. Default: '' */ + CIMPP::DateTime switchOnDate; + + /** \brief Voltage sensitivity required for the device to regulate the bus voltage, in voltage/reactive power. Default: nullptr */ + CIMPP::VoltagePerReactivePower voltageSensitivity; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Simple_Float.hpp b/CGMES_2.4.13_18DEC2013/Simple_Float.hpp index 58d48ce8f..c8918cd32 100644 --- a/CGMES_2.4.13_18DEC2013/Simple_Float.hpp +++ b/CGMES_2.4.13_18DEC2013/Simple_Float.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A floating point number. The range is unspecified and not limited. - */ + /** \brief A floating point number. The range is unspecified and not limited. */ class Simple_Float { public: diff --git a/CGMES_2.4.13_18DEC2013/SolarGeneratingUnit.cpp b/CGMES_2.4.13_18DEC2013/SolarGeneratingUnit.cpp index 065a49e1f..0887d1cbb 100644 --- a/CGMES_2.4.13_18DEC2013/SolarGeneratingUnit.cpp +++ b/CGMES_2.4.13_18DEC2013/SolarGeneratingUnit.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -SolarGeneratingUnit::SolarGeneratingUnit() {}; -SolarGeneratingUnit::~SolarGeneratingUnit() {}; +SolarGeneratingUnit::SolarGeneratingUnit() {} +SolarGeneratingUnit::~SolarGeneratingUnit() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ SolarGeneratingUnit::getPossibleProfilesForAttributes() const return map; } - - - - - const char SolarGeneratingUnit::debugName[] = "SolarGeneratingUnit"; const char* SolarGeneratingUnit::debugString() const { @@ -52,7 +47,7 @@ const char* SolarGeneratingUnit::debugString() const void SolarGeneratingUnit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SolarGeneratingUnit"), &SolarGeneratingUnit_factory)); + factory_map.emplace("cim:SolarGeneratingUnit", &SolarGeneratingUnit_factory); } void SolarGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/SolarGeneratingUnit.hpp b/CGMES_2.4.13_18DEC2013/SolarGeneratingUnit.hpp index 7292ac264..30f338f85 100644 --- a/CGMES_2.4.13_18DEC2013/SolarGeneratingUnit.hpp +++ b/CGMES_2.4.13_18DEC2013/SolarGeneratingUnit.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A solar thermal generating unit. - */ + /** \brief A solar thermal generating unit. */ class SolarGeneratingUnit : public GeneratingUnit { public: @@ -26,7 +24,6 @@ namespace CIMPP SolarGeneratingUnit(); ~SolarGeneratingUnit() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Source.cpp b/CGMES_2.4.13_18DEC2013/Source.cpp index 54f9266b5..c3fcca81b 100644 --- a/CGMES_2.4.13_18DEC2013/Source.cpp +++ b/CGMES_2.4.13_18DEC2013/Source.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "Source") + if (EnumSymbol.substr(0, pos) != "Source") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "PROCESS") + if (EnumSymbol == "PROCESS") { rop = Source::PROCESS; return lop; } - if(EnumSymbol == "DEFAULTED") + if (EnumSymbol == "DEFAULTED") { rop = Source::DEFAULTED; return lop; } - if(EnumSymbol == "SUBSTITUTED") + if (EnumSymbol == "SUBSTITUTED") { rop = Source::SUBSTITUTED; return lop; diff --git a/CGMES_2.4.13_18DEC2013/Source.hpp b/CGMES_2.4.13_18DEC2013/Source.hpp index 0cbf17fb0..a4c8dd465 100644 --- a/CGMES_2.4.13_18DEC2013/Source.hpp +++ b/CGMES_2.4.13_18DEC2013/Source.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Source gives information related to the origin of a value. - */ + /** \brief Source gives information related to the origin of a value. */ class Source { public: enum Source_ENUM { - /** - * The value is provided by input from the process I/O or being calculated from some function. - */ + /** The value is provided by input from the process I/O or being calculated from some function. */ PROCESS, - /** - * The value contains a default value. - */ + /** The value contains a default value. */ DEFAULTED, - /** - * The value is provided by input of an operator or by an automatic source. - */ + /** The value is provided by input of an operator or by an automatic source. */ SUBSTITUTED, }; diff --git a/CGMES_2.4.13_18DEC2013/StateVariablesVersion.cpp b/CGMES_2.4.13_18DEC2013/StateVariablesVersion.cpp index 6cb121be2..f123f86d6 100644 --- a/CGMES_2.4.13_18DEC2013/StateVariablesVersion.cpp +++ b/CGMES_2.4.13_18DEC2013/StateVariablesVersion.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "String.hpp" -#include "String.hpp" -#include "Date.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -StateVariablesVersion::StateVariablesVersion() {}; -StateVariablesVersion::~StateVariablesVersion() {}; +StateVariablesVersion::StateVariablesVersion() {} +StateVariablesVersion::~StateVariablesVersion() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ StateVariablesVersion::getPossibleProfilesForAttributes() const return map; } - -bool assign_StateVariablesVersion_baseUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StateVariablesVersion_baseUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StateVariablesVersion_baseURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StateVariablesVersion_baseURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StateVariablesVersion_date(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StateVariablesVersion_date(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->date = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StateVariablesVersion_differenceModelURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StateVariablesVersion_differenceModelURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->differenceModelURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StateVariablesVersion_entsoeUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StateVariablesVersion_entsoeUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StateVariablesVersion_entsoeURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StateVariablesVersion_entsoeURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StateVariablesVersion_modelDescriptionURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StateVariablesVersion_modelDescriptionURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->modelDescriptionURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StateVariablesVersion_namespaceRDF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StateVariablesVersion_namespaceRDF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceRDF = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StateVariablesVersion_namespaceUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StateVariablesVersion_namespaceUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StateVariablesVersion_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StateVariablesVersion_shortName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->shortName = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_StateVariablesVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseUML; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_StateVariablesVersion_baseUML(const BaseClass* BaseClass_ptr1, std::str bool get_StateVariablesVersion_baseURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseURI; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_StateVariablesVersion_baseURI(const BaseClass* BaseClass_ptr1, std::str bool get_StateVariablesVersion_date(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->date; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_StateVariablesVersion_date(const BaseClass* BaseClass_ptr1, std::string bool get_StateVariablesVersion_differenceModelURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->differenceModelURI; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_StateVariablesVersion_differenceModelURI(const BaseClass* BaseClass_ptr bool get_StateVariablesVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeUML; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_StateVariablesVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::s bool get_StateVariablesVersion_entsoeURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeURI; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_StateVariablesVersion_entsoeURI(const BaseClass* BaseClass_ptr1, std::s bool get_StateVariablesVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->modelDescriptionURI; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_StateVariablesVersion_modelDescriptionURI(const BaseClass* BaseClass_pt bool get_StateVariablesVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceRDF; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_StateVariablesVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std bool get_StateVariablesVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceUML; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_StateVariablesVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std bool get_StateVariablesVersion_shortName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortName; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_StateVariablesVersion_shortName(const BaseClass* BaseClass_ptr1, std::s return false; } - - const char StateVariablesVersion::debugName[] = "StateVariablesVersion"; const char* StateVariablesVersion::debugString() const { @@ -341,21 +346,21 @@ const char* StateVariablesVersion::debugString() const void StateVariablesVersion::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:StateVariablesVersion"), &StateVariablesVersion_factory)); + factory_map.emplace("cim:StateVariablesVersion", &StateVariablesVersion_factory); } void StateVariablesVersion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:StateVariablesVersion.baseUML"), &assign_StateVariablesVersion_baseUML)); - assign_map.insert(std::make_pair(std::string("cim:StateVariablesVersion.baseURI"), &assign_StateVariablesVersion_baseURI)); - assign_map.insert(std::make_pair(std::string("cim:StateVariablesVersion.date"), &assign_StateVariablesVersion_date)); - assign_map.insert(std::make_pair(std::string("cim:StateVariablesVersion.differenceModelURI"), &assign_StateVariablesVersion_differenceModelURI)); - assign_map.insert(std::make_pair(std::string("cim:StateVariablesVersion.entsoeUML"), &assign_StateVariablesVersion_entsoeUML)); - assign_map.insert(std::make_pair(std::string("cim:StateVariablesVersion.entsoeURI"), &assign_StateVariablesVersion_entsoeURI)); - assign_map.insert(std::make_pair(std::string("cim:StateVariablesVersion.modelDescriptionURI"), &assign_StateVariablesVersion_modelDescriptionURI)); - assign_map.insert(std::make_pair(std::string("cim:StateVariablesVersion.namespaceRDF"), &assign_StateVariablesVersion_namespaceRDF)); - assign_map.insert(std::make_pair(std::string("cim:StateVariablesVersion.namespaceUML"), &assign_StateVariablesVersion_namespaceUML)); - assign_map.insert(std::make_pair(std::string("cim:StateVariablesVersion.shortName"), &assign_StateVariablesVersion_shortName)); + assign_map.emplace("cim:StateVariablesVersion.baseUML", &assign_StateVariablesVersion_baseUML); + assign_map.emplace("cim:StateVariablesVersion.baseURI", &assign_StateVariablesVersion_baseURI); + assign_map.emplace("cim:StateVariablesVersion.date", &assign_StateVariablesVersion_date); + assign_map.emplace("cim:StateVariablesVersion.differenceModelURI", &assign_StateVariablesVersion_differenceModelURI); + assign_map.emplace("cim:StateVariablesVersion.entsoeUML", &assign_StateVariablesVersion_entsoeUML); + assign_map.emplace("cim:StateVariablesVersion.entsoeURI", &assign_StateVariablesVersion_entsoeURI); + assign_map.emplace("cim:StateVariablesVersion.modelDescriptionURI", &assign_StateVariablesVersion_modelDescriptionURI); + assign_map.emplace("cim:StateVariablesVersion.namespaceRDF", &assign_StateVariablesVersion_namespaceRDF); + assign_map.emplace("cim:StateVariablesVersion.namespaceUML", &assign_StateVariablesVersion_namespaceUML); + assign_map.emplace("cim:StateVariablesVersion.shortName", &assign_StateVariablesVersion_shortName); } void StateVariablesVersion::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/StateVariablesVersion.hpp b/CGMES_2.4.13_18DEC2013/StateVariablesVersion.hpp index f9f24fef7..d6263d5d7 100644 --- a/CGMES_2.4.13_18DEC2013/StateVariablesVersion.hpp +++ b/CGMES_2.4.13_18DEC2013/StateVariablesVersion.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Version details. - */ + /** \brief Version details. */ class StateVariablesVersion : public BaseClass { public: @@ -28,16 +26,35 @@ namespace CIMPP StateVariablesVersion(); ~StateVariablesVersion() override; - CIMPP::String baseUML; /* Base UML provided by CIM model manager. Default: '' */ - CIMPP::String baseURI; /* Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ - CIMPP::Date date; /* Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ - CIMPP::String differenceModelURI; /* Difference model URI defined by IEC 61970-552. Default: '' */ - CIMPP::String entsoeUML; /* UML provided by ENTSO-E. Default: '' */ - CIMPP::String entsoeURI; /* Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/StateVariables/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ - CIMPP::String modelDescriptionURI; /* Model Description URI defined by IEC 61970-552. Default: '' */ - CIMPP::String namespaceRDF; /* RDF namespace. Default: '' */ - CIMPP::String namespaceUML; /* CIM UML namespace. Default: '' */ - CIMPP::String shortName; /* The short name of the profile used in profile documentation. Default: '' */ + /** \brief Base UML provided by CIM model manager. Default: '' */ + CIMPP::String baseUML; + + /** \brief Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ + CIMPP::String baseURI; + + /** \brief Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ + CIMPP::Date date; + + /** \brief Difference model URI defined by IEC 61970-552. Default: '' */ + CIMPP::String differenceModelURI; + + /** \brief UML provided by ENTSO-E. Default: '' */ + CIMPP::String entsoeUML; + + /** \brief Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/StateVariables/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ + CIMPP::String entsoeURI; + + /** \brief Model Description URI defined by IEC 61970-552. Default: '' */ + CIMPP::String modelDescriptionURI; + + /** \brief RDF namespace. Default: '' */ + CIMPP::String namespaceRDF; + + /** \brief CIM UML namespace. Default: '' */ + CIMPP::String namespaceUML; + + /** \brief The short name of the profile used in profile documentation. Default: '' */ + CIMPP::String shortName; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/StaticLoadModelKind.cpp b/CGMES_2.4.13_18DEC2013/StaticLoadModelKind.cpp index e3d149299..20695a176 100644 --- a/CGMES_2.4.13_18DEC2013/StaticLoadModelKind.cpp +++ b/CGMES_2.4.13_18DEC2013/StaticLoadModelKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "StaticLoadModelKind") + if (EnumSymbol.substr(0, pos) != "StaticLoadModelKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,22 +50,22 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "exponential") + if (EnumSymbol == "exponential") { rop = StaticLoadModelKind::exponential; return lop; } - if(EnumSymbol == "zIP1") + if (EnumSymbol == "zIP1") { rop = StaticLoadModelKind::zIP1; return lop; } - if(EnumSymbol == "zIP2") + if (EnumSymbol == "zIP2") { rop = StaticLoadModelKind::zIP2; return lop; } - if(EnumSymbol == "constantZ") + if (EnumSymbol == "constantZ") { rop = StaticLoadModelKind::constantZ; return lop; diff --git a/CGMES_2.4.13_18DEC2013/StaticLoadModelKind.hpp b/CGMES_2.4.13_18DEC2013/StaticLoadModelKind.hpp index 362cca7ea..2cd61a19c 100644 --- a/CGMES_2.4.13_18DEC2013/StaticLoadModelKind.hpp +++ b/CGMES_2.4.13_18DEC2013/StaticLoadModelKind.hpp @@ -9,29 +9,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of static load model. - */ + /** \brief Type of static load model. */ class StaticLoadModelKind { public: enum StaticLoadModelKind_ENUM { - /** - * Exponential P and Q equations are used and the following attributes are required: kp1, kp2, kp3, kpf, ep1, ep2, ep3 kq1, kq2, kq3, kqf, eq1, eq2, eq3. - */ + /** Exponential P and Q equations are used and the following attributes are required: kp1, kp2, kp3, kpf, ep1, ep2, ep3 kq1, kq2, kq3, kqf, eq1, eq2, eq3. */ exponential, - /** - * ZIP1 P and Q equations are used and the following attributes are required: kp1, kp2, kp3, kpf kq1, kq2, kq3, kqf. - */ + /** ZIP1 P and Q equations are used and the following attributes are required: kp1, kp2, kp3, kpf kq1, kq2, kq3, kqf. */ zIP1, - /** - * This model separates the frequency-dependent load (primarily motors) from other load. ZIP2 P and Q equations are used and the following attributes are required: kp1, kp2, kp3, kq4, kpf kq1, kq2, kq3, kq4, kqf. - */ + /** This model separates the frequency-dependent load (primarily motors) from other load. ZIP2 P and Q equations are used and the following attributes are required: kp1, kp2, kp3, kq4, kpf kq1, kq2, kq3, kq4, kqf. */ zIP2, - /** - * The load is represented as a constant impedance. ConstantZ P and Q equations are used and no attributes are required. - */ + /** The load is represented as a constant impedance. ConstantZ P and Q equations are used and no attributes are required. */ constantZ, }; diff --git a/CGMES_2.4.13_18DEC2013/StaticVarCompensator.cpp b/CGMES_2.4.13_18DEC2013/StaticVarCompensator.cpp index 2bff984da..ae413174a 100644 --- a/CGMES_2.4.13_18DEC2013/StaticVarCompensator.cpp +++ b/CGMES_2.4.13_18DEC2013/StaticVarCompensator.cpp @@ -8,17 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Reactance.hpp" -#include "Reactance.hpp" -#include "ReactivePower.hpp" -#include "SVCControlMode.hpp" -#include "VoltagePerReactivePower.hpp" -#include "Voltage.hpp" using namespace CIMPP; -StaticVarCompensator::StaticVarCompensator() {}; -StaticVarCompensator::~StaticVarCompensator() {}; +StaticVarCompensator::StaticVarCompensator() {} +StaticVarCompensator::~StaticVarCompensator() {} static const std::list PossibleProfilesForClass = { @@ -51,90 +45,94 @@ StaticVarCompensator::getPossibleProfilesForAttributes() const return map; } - -bool assign_StaticVarCompensator_capacitiveRating(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StaticVarCompensator_capacitiveRating(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->capacitiveRating; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StaticVarCompensator_inductiveRating(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StaticVarCompensator_inductiveRating(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inductiveRating; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StaticVarCompensator_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StaticVarCompensator_q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StaticVarCompensator_sVCControlMode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StaticVarCompensator_sVCControlMode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->sVCControlMode; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StaticVarCompensator_slope(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StaticVarCompensator_slope(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->slope; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StaticVarCompensator_voltageSetPoint(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StaticVarCompensator_voltageSetPoint(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->voltageSetPoint; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_StaticVarCompensator_capacitiveRating(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->capacitiveRating; if (!buffer.str().empty()) @@ -148,7 +146,8 @@ bool get_StaticVarCompensator_capacitiveRating(const BaseClass* BaseClass_ptr1, bool get_StaticVarCompensator_inductiveRating(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inductiveRating; if (!buffer.str().empty()) @@ -162,7 +161,8 @@ bool get_StaticVarCompensator_inductiveRating(const BaseClass* BaseClass_ptr1, s bool get_StaticVarCompensator_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q; if (!buffer.str().empty()) @@ -174,11 +174,12 @@ bool get_StaticVarCompensator_q(const BaseClass* BaseClass_ptr1, std::stringstre return false; } -bool get_StaticVarCompensator_slope(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_StaticVarCompensator_sVCControlMode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->slope; + buffer << element->sVCControlMode; if (!buffer.str().empty()) { return true; @@ -188,11 +189,12 @@ bool get_StaticVarCompensator_slope(const BaseClass* BaseClass_ptr1, std::string return false; } -bool get_StaticVarCompensator_voltageSetPoint(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_StaticVarCompensator_slope(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->voltageSetPoint; + buffer << element->slope; if (!buffer.str().empty()) { return true; @@ -202,13 +204,12 @@ bool get_StaticVarCompensator_voltageSetPoint(const BaseClass* BaseClass_ptr1, s return false; } - - -bool get_StaticVarCompensator_sVCControlMode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_StaticVarCompensator_voltageSetPoint(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->sVCControlMode; + buffer << element->voltageSetPoint; if (!buffer.str().empty()) { return true; @@ -226,17 +227,17 @@ const char* StaticVarCompensator::debugString() const void StaticVarCompensator::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:StaticVarCompensator"), &StaticVarCompensator_factory)); + factory_map.emplace("cim:StaticVarCompensator", &StaticVarCompensator_factory); } void StaticVarCompensator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:StaticVarCompensator.capacitiveRating"), &assign_StaticVarCompensator_capacitiveRating)); - assign_map.insert(std::make_pair(std::string("cim:StaticVarCompensator.inductiveRating"), &assign_StaticVarCompensator_inductiveRating)); - assign_map.insert(std::make_pair(std::string("cim:StaticVarCompensator.q"), &assign_StaticVarCompensator_q)); - assign_map.insert(std::make_pair(std::string("cim:StaticVarCompensator.sVCControlMode"), &assign_StaticVarCompensator_sVCControlMode)); - assign_map.insert(std::make_pair(std::string("cim:StaticVarCompensator.slope"), &assign_StaticVarCompensator_slope)); - assign_map.insert(std::make_pair(std::string("cim:StaticVarCompensator.voltageSetPoint"), &assign_StaticVarCompensator_voltageSetPoint)); + assign_map.emplace("cim:StaticVarCompensator.capacitiveRating", &assign_StaticVarCompensator_capacitiveRating); + assign_map.emplace("cim:StaticVarCompensator.inductiveRating", &assign_StaticVarCompensator_inductiveRating); + assign_map.emplace("cim:StaticVarCompensator.q", &assign_StaticVarCompensator_q); + assign_map.emplace("cim:StaticVarCompensator.sVCControlMode", &assign_StaticVarCompensator_sVCControlMode); + assign_map.emplace("cim:StaticVarCompensator.slope", &assign_StaticVarCompensator_slope); + assign_map.emplace("cim:StaticVarCompensator.voltageSetPoint", &assign_StaticVarCompensator_voltageSetPoint); } void StaticVarCompensator::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/StaticVarCompensator.hpp b/CGMES_2.4.13_18DEC2013/StaticVarCompensator.hpp index 02e2be550..b6770d818 100644 --- a/CGMES_2.4.13_18DEC2013/StaticVarCompensator.hpp +++ b/CGMES_2.4.13_18DEC2013/StaticVarCompensator.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A facility for providing variable and controllable shunt reactive power. The SVC typically consists of a stepdown transformer, filter, thyristor-controlled reactor, and thyristor-switched capacitor arms. The SVC may operate in fixed MVar output mode or in voltage control mode. When in voltage control mode, the output of the SVC will be proportional to the deviation of voltage at the controlled bus from the voltage setpoint. The SVC characteristic slope defines the proportion. If the voltage at the controlled bus is equal to the voltage setpoint, the SVC MVar output is zero. - */ + /** \brief A facility for providing variable and controllable shunt reactive power. The SVC typically consists of a stepdown transformer, filter, thyristor-controlled reactor, and thyristor-switched capacitor arms. The SVC may operate in fixed MVar output mode or in voltage control mode. When in voltage control mode, the output of the SVC will be proportional to the deviation of voltage at the controlled bus from the voltage setpoint. The SVC characteristic slope defines the proportion. If the voltage at the controlled bus is equal to the voltage setpoint, the SVC MVar output is zero. */ class StaticVarCompensator : public RegulatingCondEq { public: @@ -31,12 +29,23 @@ namespace CIMPP StaticVarCompensator(); ~StaticVarCompensator() override; - CIMPP::Reactance capacitiveRating; /* Maximum available capacitive reactance. Default: nullptr */ - CIMPP::Reactance inductiveRating; /* Maximum available inductive reactance. Default: nullptr */ - CIMPP::ReactivePower q; /* Reactive power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution. Default: nullptr */ - CIMPP::SVCControlMode sVCControlMode; /* SVC control mode. Default: 0 */ - CIMPP::VoltagePerReactivePower slope; /* The characteristics slope of an SVC defines how the reactive power output changes in proportion to the difference between the regulated bus voltage and the voltage setpoint. Default: nullptr */ - CIMPP::Voltage voltageSetPoint; /* The reactive power output of the SVC is proportional to the difference between the voltage at the regulated bus and the voltage setpoint. When the regulated bus voltage is equal to the voltage setpoint, the reactive power output is zero. Default: nullptr */ + /** \brief Maximum available capacitive reactance. Default: nullptr */ + CIMPP::Reactance capacitiveRating; + + /** \brief Maximum available inductive reactance. Default: nullptr */ + CIMPP::Reactance inductiveRating; + + /** \brief Reactive power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution. Default: nullptr */ + CIMPP::ReactivePower q; + + /** \brief SVC control mode. Default: 0 */ + CIMPP::SVCControlMode sVCControlMode; + + /** \brief The characteristics slope of an SVC defines how the reactive power output changes in proportion to the difference between the regulated bus voltage and the voltage setpoint. Default: nullptr */ + CIMPP::VoltagePerReactivePower slope; + + /** \brief The reactive power output of the SVC is proportional to the difference between the voltage at the regulated bus and the voltage setpoint. When the regulated bus voltage is equal to the voltage setpoint, the reactive power output is zero. Default: nullptr */ + CIMPP::Voltage voltageSetPoint; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/StationSupply.cpp b/CGMES_2.4.13_18DEC2013/StationSupply.cpp index 674843f23..6a252d26e 100644 --- a/CGMES_2.4.13_18DEC2013/StationSupply.cpp +++ b/CGMES_2.4.13_18DEC2013/StationSupply.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -StationSupply::StationSupply() {}; -StationSupply::~StationSupply() {}; +StationSupply::StationSupply() {} +StationSupply::~StationSupply() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ StationSupply::getPossibleProfilesForAttributes() const return map; } - - - - - const char StationSupply::debugName[] = "StationSupply"; const char* StationSupply::debugString() const { @@ -51,7 +46,7 @@ const char* StationSupply::debugString() const void StationSupply::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:StationSupply"), &StationSupply_factory)); + factory_map.emplace("cim:StationSupply", &StationSupply_factory); } void StationSupply::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/StationSupply.hpp b/CGMES_2.4.13_18DEC2013/StationSupply.hpp index 728fd30bb..f95e7ce94 100644 --- a/CGMES_2.4.13_18DEC2013/StationSupply.hpp +++ b/CGMES_2.4.13_18DEC2013/StationSupply.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Station supply with load derived from the station output. - */ + /** \brief Station supply with load derived from the station output. */ class StationSupply : public EnergyConsumer { public: @@ -26,7 +24,6 @@ namespace CIMPP StationSupply(); ~StationSupply() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/SteadyStateHypothesisVersion.cpp b/CGMES_2.4.13_18DEC2013/SteadyStateHypothesisVersion.cpp index 802514ff4..3a521cfe8 100644 --- a/CGMES_2.4.13_18DEC2013/SteadyStateHypothesisVersion.cpp +++ b/CGMES_2.4.13_18DEC2013/SteadyStateHypothesisVersion.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "String.hpp" -#include "String.hpp" -#include "Date.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -SteadyStateHypothesisVersion::SteadyStateHypothesisVersion() {}; -SteadyStateHypothesisVersion::~SteadyStateHypothesisVersion() {}; +SteadyStateHypothesisVersion::SteadyStateHypothesisVersion() {} +SteadyStateHypothesisVersion::~SteadyStateHypothesisVersion() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ SteadyStateHypothesisVersion::getPossibleProfilesForAttributes() const return map; } - -bool assign_SteadyStateHypothesisVersion_baseUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SteadyStateHypothesisVersion_baseUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SteadyStateHypothesisVersion_baseURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SteadyStateHypothesisVersion_baseURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SteadyStateHypothesisVersion_date(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SteadyStateHypothesisVersion_date(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->date = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SteadyStateHypothesisVersion_differenceModelURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SteadyStateHypothesisVersion_differenceModelURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->differenceModelURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SteadyStateHypothesisVersion_entsoeUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SteadyStateHypothesisVersion_entsoeUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SteadyStateHypothesisVersion_entsoeURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SteadyStateHypothesisVersion_entsoeURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SteadyStateHypothesisVersion_modelDescriptionURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SteadyStateHypothesisVersion_modelDescriptionURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->modelDescriptionURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SteadyStateHypothesisVersion_namespaceRDF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SteadyStateHypothesisVersion_namespaceRDF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceRDF = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SteadyStateHypothesisVersion_namespaceUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SteadyStateHypothesisVersion_namespaceUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SteadyStateHypothesisVersion_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SteadyStateHypothesisVersion_shortName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->shortName = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_SteadyStateHypothesisVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseUML; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_SteadyStateHypothesisVersion_baseUML(const BaseClass* BaseClass_ptr1, s bool get_SteadyStateHypothesisVersion_baseURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseURI; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_SteadyStateHypothesisVersion_baseURI(const BaseClass* BaseClass_ptr1, s bool get_SteadyStateHypothesisVersion_date(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->date; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_SteadyStateHypothesisVersion_date(const BaseClass* BaseClass_ptr1, std: bool get_SteadyStateHypothesisVersion_differenceModelURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->differenceModelURI; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_SteadyStateHypothesisVersion_differenceModelURI(const BaseClass* BaseCl bool get_SteadyStateHypothesisVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeUML; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_SteadyStateHypothesisVersion_entsoeUML(const BaseClass* BaseClass_ptr1, bool get_SteadyStateHypothesisVersion_entsoeURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeURI; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_SteadyStateHypothesisVersion_entsoeURI(const BaseClass* BaseClass_ptr1, bool get_SteadyStateHypothesisVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->modelDescriptionURI; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_SteadyStateHypothesisVersion_modelDescriptionURI(const BaseClass* BaseC bool get_SteadyStateHypothesisVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceRDF; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_SteadyStateHypothesisVersion_namespaceRDF(const BaseClass* BaseClass_pt bool get_SteadyStateHypothesisVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceUML; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_SteadyStateHypothesisVersion_namespaceUML(const BaseClass* BaseClass_pt bool get_SteadyStateHypothesisVersion_shortName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortName; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_SteadyStateHypothesisVersion_shortName(const BaseClass* BaseClass_ptr1, return false; } - - const char SteadyStateHypothesisVersion::debugName[] = "SteadyStateHypothesisVersion"; const char* SteadyStateHypothesisVersion::debugString() const { @@ -341,21 +346,21 @@ const char* SteadyStateHypothesisVersion::debugString() const void SteadyStateHypothesisVersion::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SteadyStateHypothesisVersion"), &SteadyStateHypothesisVersion_factory)); + factory_map.emplace("cim:SteadyStateHypothesisVersion", &SteadyStateHypothesisVersion_factory); } void SteadyStateHypothesisVersion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SteadyStateHypothesisVersion.baseUML"), &assign_SteadyStateHypothesisVersion_baseUML)); - assign_map.insert(std::make_pair(std::string("cim:SteadyStateHypothesisVersion.baseURI"), &assign_SteadyStateHypothesisVersion_baseURI)); - assign_map.insert(std::make_pair(std::string("cim:SteadyStateHypothesisVersion.date"), &assign_SteadyStateHypothesisVersion_date)); - assign_map.insert(std::make_pair(std::string("cim:SteadyStateHypothesisVersion.differenceModelURI"), &assign_SteadyStateHypothesisVersion_differenceModelURI)); - assign_map.insert(std::make_pair(std::string("cim:SteadyStateHypothesisVersion.entsoeUML"), &assign_SteadyStateHypothesisVersion_entsoeUML)); - assign_map.insert(std::make_pair(std::string("cim:SteadyStateHypothesisVersion.entsoeURI"), &assign_SteadyStateHypothesisVersion_entsoeURI)); - assign_map.insert(std::make_pair(std::string("cim:SteadyStateHypothesisVersion.modelDescriptionURI"), &assign_SteadyStateHypothesisVersion_modelDescriptionURI)); - assign_map.insert(std::make_pair(std::string("cim:SteadyStateHypothesisVersion.namespaceRDF"), &assign_SteadyStateHypothesisVersion_namespaceRDF)); - assign_map.insert(std::make_pair(std::string("cim:SteadyStateHypothesisVersion.namespaceUML"), &assign_SteadyStateHypothesisVersion_namespaceUML)); - assign_map.insert(std::make_pair(std::string("cim:SteadyStateHypothesisVersion.shortName"), &assign_SteadyStateHypothesisVersion_shortName)); + assign_map.emplace("cim:SteadyStateHypothesisVersion.baseUML", &assign_SteadyStateHypothesisVersion_baseUML); + assign_map.emplace("cim:SteadyStateHypothesisVersion.baseURI", &assign_SteadyStateHypothesisVersion_baseURI); + assign_map.emplace("cim:SteadyStateHypothesisVersion.date", &assign_SteadyStateHypothesisVersion_date); + assign_map.emplace("cim:SteadyStateHypothesisVersion.differenceModelURI", &assign_SteadyStateHypothesisVersion_differenceModelURI); + assign_map.emplace("cim:SteadyStateHypothesisVersion.entsoeUML", &assign_SteadyStateHypothesisVersion_entsoeUML); + assign_map.emplace("cim:SteadyStateHypothesisVersion.entsoeURI", &assign_SteadyStateHypothesisVersion_entsoeURI); + assign_map.emplace("cim:SteadyStateHypothesisVersion.modelDescriptionURI", &assign_SteadyStateHypothesisVersion_modelDescriptionURI); + assign_map.emplace("cim:SteadyStateHypothesisVersion.namespaceRDF", &assign_SteadyStateHypothesisVersion_namespaceRDF); + assign_map.emplace("cim:SteadyStateHypothesisVersion.namespaceUML", &assign_SteadyStateHypothesisVersion_namespaceUML); + assign_map.emplace("cim:SteadyStateHypothesisVersion.shortName", &assign_SteadyStateHypothesisVersion_shortName); } void SteadyStateHypothesisVersion::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/SteadyStateHypothesisVersion.hpp b/CGMES_2.4.13_18DEC2013/SteadyStateHypothesisVersion.hpp index 007f35230..a856a19e7 100644 --- a/CGMES_2.4.13_18DEC2013/SteadyStateHypothesisVersion.hpp +++ b/CGMES_2.4.13_18DEC2013/SteadyStateHypothesisVersion.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Version details. - */ + /** \brief Version details. */ class SteadyStateHypothesisVersion : public BaseClass { public: @@ -28,16 +26,35 @@ namespace CIMPP SteadyStateHypothesisVersion(); ~SteadyStateHypothesisVersion() override; - CIMPP::String baseUML; /* Base UML provided by CIM model manager. Default: '' */ - CIMPP::String baseURI; /* Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ - CIMPP::Date date; /* Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ - CIMPP::String differenceModelURI; /* Difference model URI defined by IEC 61970-552. Default: '' */ - CIMPP::String entsoeUML; /* UML provided by ENTSO-E. Default: '' */ - CIMPP::String entsoeURI; /* Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/SteadyStateHypothesis/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ - CIMPP::String modelDescriptionURI; /* Model Description URI defined by IEC 61970-552. Default: '' */ - CIMPP::String namespaceRDF; /* RDF namespace. Default: '' */ - CIMPP::String namespaceUML; /* CIM UML namespace. Default: '' */ - CIMPP::String shortName; /* The short name of the profile used in profile documentation. Default: '' */ + /** \brief Base UML provided by CIM model manager. Default: '' */ + CIMPP::String baseUML; + + /** \brief Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ + CIMPP::String baseURI; + + /** \brief Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ + CIMPP::Date date; + + /** \brief Difference model URI defined by IEC 61970-552. Default: '' */ + CIMPP::String differenceModelURI; + + /** \brief UML provided by ENTSO-E. Default: '' */ + CIMPP::String entsoeUML; + + /** \brief Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/SteadyStateHypothesis/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ + CIMPP::String entsoeURI; + + /** \brief Model Description URI defined by IEC 61970-552. Default: '' */ + CIMPP::String modelDescriptionURI; + + /** \brief RDF namespace. Default: '' */ + CIMPP::String namespaceRDF; + + /** \brief CIM UML namespace. Default: '' */ + CIMPP::String namespaceUML; + + /** \brief The short name of the profile used in profile documentation. Default: '' */ + CIMPP::String shortName; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/String.hpp b/CGMES_2.4.13_18DEC2013/String.hpp index 60fcbbbc0..8c3dbedcf 100644 --- a/CGMES_2.4.13_18DEC2013/String.hpp +++ b/CGMES_2.4.13_18DEC2013/String.hpp @@ -4,22 +4,20 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen */ -#include #include #include +#include namespace CIMPP { - /* - A string consisting of a sequence of characters. The character encoding is UTF-8. The string length is unspecified and unlimited. - */ + /** \brief A string consisting of a sequence of characters. The character encoding is UTF-8. The string length is unspecified and unlimited. */ class String { public: String() : initialized(false) {} String(const std::string& value) : value(value), initialized(true) {} - String& operator=(const std::string &rop); + String& operator=(const std::string& rop); operator std::string() const; std::string value; diff --git a/CGMES_2.4.13_18DEC2013/StringMeasurement.cpp b/CGMES_2.4.13_18DEC2013/StringMeasurement.cpp index 6b03b449d..ca7025e57 100644 --- a/CGMES_2.4.13_18DEC2013/StringMeasurement.cpp +++ b/CGMES_2.4.13_18DEC2013/StringMeasurement.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -StringMeasurement::StringMeasurement() {}; -StringMeasurement::~StringMeasurement() {}; +StringMeasurement::StringMeasurement() {} +StringMeasurement::~StringMeasurement() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ StringMeasurement::getPossibleProfilesForAttributes() const return map; } - - bool assign_StringMeasurementValue_StringMeasurement(BaseClass*, BaseClass*); bool assign_StringMeasurement_StringMeasurementValues(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_StringMeasurement_StringMeasurementValues(BaseClass* BaseClass_ptr1, } - const char StringMeasurement::debugName[] = "StringMeasurement"; const char* StringMeasurement::debugString() const { @@ -69,7 +66,7 @@ const char* StringMeasurement::debugString() const void StringMeasurement::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:StringMeasurement"), &StringMeasurement_factory)); + factory_map.emplace("cim:StringMeasurement", &StringMeasurement_factory); } void StringMeasurement::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void StringMeasurement::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:StringMeasurement.StringMeasurementValues"), &assign_StringMeasurement_StringMeasurementValues)); + assign_map.emplace("cim:StringMeasurement.StringMeasurementValues", &assign_StringMeasurement_StringMeasurementValues); } void StringMeasurement::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/StringMeasurement.hpp b/CGMES_2.4.13_18DEC2013/StringMeasurement.hpp index a4e95edb8..21841ff08 100644 --- a/CGMES_2.4.13_18DEC2013/StringMeasurement.hpp +++ b/CGMES_2.4.13_18DEC2013/StringMeasurement.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class StringMeasurementValue; - /* - StringMeasurement represents a measurement with values of type string. - */ + /** \brief StringMeasurement represents a measurement with values of type string. */ class StringMeasurement : public Measurement { public: @@ -27,7 +25,8 @@ namespace CIMPP StringMeasurement(); ~StringMeasurement() override; - std::list StringMeasurementValues; /* The values connected to this measurement. Default: 0 */ + /** \brief The values connected to this measurement. Default: 0 */ + std::list StringMeasurementValues; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/StringMeasurementValue.cpp b/CGMES_2.4.13_18DEC2013/StringMeasurementValue.cpp index 57ab9da48..217c82c6c 100644 --- a/CGMES_2.4.13_18DEC2013/StringMeasurementValue.cpp +++ b/CGMES_2.4.13_18DEC2013/StringMeasurementValue.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "StringMeasurement.hpp" -#include "String.hpp" using namespace CIMPP; -StringMeasurementValue::StringMeasurementValue() : StringMeasurement(nullptr) {}; -StringMeasurementValue::~StringMeasurementValue() {}; +StringMeasurementValue::StringMeasurementValue() : StringMeasurement(nullptr) {} +StringMeasurementValue::~StringMeasurementValue() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ StringMeasurementValue::getPossibleProfilesForAttributes() const return map; } - -bool assign_StringMeasurementValue_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (StringMeasurementValue* element = dynamic_cast(BaseClass_ptr1)) - { - element->value = buffer.str(); - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_StringMeasurement_StringMeasurementValues(BaseClass*, BaseClass*); bool assign_StringMeasurementValue_StringMeasurement(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_StringMeasurementValue_StringMeasurement(BaseClass* BaseClass_ptr1, return false; } -bool get_StringMeasurementValue_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_StringMeasurementValue_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const StringMeasurementValue* element = dynamic_cast(BaseClass_ptr1)) + StringMeasurementValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->value; - if (!buffer.str().empty()) + element->value = buffer.str(); + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_StringMeasurementValue_StringMeasurement(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const StringMeasurementValue* element = dynamic_cast(BaseClass_ptr1)) + const StringMeasurementValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->StringMeasurement != 0) { @@ -102,6 +86,20 @@ bool get_StringMeasurementValue_StringMeasurement(const BaseClass* BaseClass_ptr return false; } +bool get_StringMeasurementValue_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const StringMeasurementValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->value; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char StringMeasurementValue::debugName[] = "StringMeasurementValue"; const char* StringMeasurementValue::debugString() const @@ -111,17 +109,17 @@ const char* StringMeasurementValue::debugString() const void StringMeasurementValue::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:StringMeasurementValue"), &StringMeasurementValue_factory)); + factory_map.emplace("cim:StringMeasurementValue", &StringMeasurementValue_factory); } void StringMeasurementValue::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:StringMeasurementValue.value"), &assign_StringMeasurementValue_value)); + assign_map.emplace("cim:StringMeasurementValue.value", &assign_StringMeasurementValue_value); } void StringMeasurementValue::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:StringMeasurementValue.StringMeasurement"), &assign_StringMeasurementValue_StringMeasurement)); + assign_map.emplace("cim:StringMeasurementValue.StringMeasurement", &assign_StringMeasurementValue_StringMeasurement); } void StringMeasurementValue::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/StringMeasurementValue.hpp b/CGMES_2.4.13_18DEC2013/StringMeasurementValue.hpp index 2c22c626b..1207671b5 100644 --- a/CGMES_2.4.13_18DEC2013/StringMeasurementValue.hpp +++ b/CGMES_2.4.13_18DEC2013/StringMeasurementValue.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class StringMeasurement; - /* - StringMeasurementValue represents a measurement value of type string. - */ + /** \brief StringMeasurementValue represents a measurement value of type string. */ class StringMeasurementValue : public MeasurementValue { public: @@ -28,8 +26,11 @@ namespace CIMPP StringMeasurementValue(); ~StringMeasurementValue() override; - CIMPP::StringMeasurement* StringMeasurement; /* Measurement to which this value is connected. Default: 0 */ - CIMPP::String value; /* The value to supervise. Default: '' */ + /** \brief Measurement to which this value is connected. Default: 0 */ + CIMPP::StringMeasurement* StringMeasurement; + + /** \brief The value to supervise. Default: '' */ + CIMPP::String value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/SubGeographicalRegion.cpp b/CGMES_2.4.13_18DEC2013/SubGeographicalRegion.cpp index ed9222e4d..2bc1a8c1b 100644 --- a/CGMES_2.4.13_18DEC2013/SubGeographicalRegion.cpp +++ b/CGMES_2.4.13_18DEC2013/SubGeographicalRegion.cpp @@ -9,14 +9,14 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "DCLine.hpp" -#include "Line.hpp" #include "GeographicalRegion.hpp" +#include "Line.hpp" #include "Substation.hpp" using namespace CIMPP; -SubGeographicalRegion::SubGeographicalRegion() : Region(nullptr) {}; -SubGeographicalRegion::~SubGeographicalRegion() {}; +SubGeographicalRegion::SubGeographicalRegion() : Region(nullptr) {} +SubGeographicalRegion::~SubGeographicalRegion() {} static const std::list PossibleProfilesForClass = { @@ -47,8 +47,6 @@ SubGeographicalRegion::getPossibleProfilesForAttributes() const return map; } - - bool assign_DCLine_Region(BaseClass*, BaseClass*); bool assign_SubGeographicalRegion_DCLines(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -65,6 +63,7 @@ bool assign_SubGeographicalRegion_DCLines(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_Line_Region(BaseClass*, BaseClass*); bool assign_SubGeographicalRegion_Lines(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -81,6 +80,7 @@ bool assign_SubGeographicalRegion_Lines(BaseClass* BaseClass_ptr1, BaseClass* Ba } return false; } + bool assign_GeographicalRegion_Regions(BaseClass*, BaseClass*); bool assign_SubGeographicalRegion_Region(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -97,6 +97,7 @@ bool assign_SubGeographicalRegion_Region(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_Substation_Region(BaseClass*, BaseClass*); bool assign_SubGeographicalRegion_Substations(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -115,9 +116,11 @@ bool assign_SubGeographicalRegion_Substations(BaseClass* BaseClass_ptr1, BaseCla } + bool get_SubGeographicalRegion_Region(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SubGeographicalRegion* element = dynamic_cast(BaseClass_ptr1)) + const SubGeographicalRegion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Region != 0) { @@ -137,7 +140,7 @@ const char* SubGeographicalRegion::debugString() const void SubGeographicalRegion::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SubGeographicalRegion"), &SubGeographicalRegion_factory)); + factory_map.emplace("cim:SubGeographicalRegion", &SubGeographicalRegion_factory); } void SubGeographicalRegion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -146,10 +149,10 @@ void SubGeographicalRegion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SubGeographicalRegion.DCLines"), &assign_SubGeographicalRegion_DCLines)); - assign_map.insert(std::make_pair(std::string("cim:SubGeographicalRegion.Lines"), &assign_SubGeographicalRegion_Lines)); - assign_map.insert(std::make_pair(std::string("cim:SubGeographicalRegion.Region"), &assign_SubGeographicalRegion_Region)); - assign_map.insert(std::make_pair(std::string("cim:SubGeographicalRegion.Substations"), &assign_SubGeographicalRegion_Substations)); + assign_map.emplace("cim:SubGeographicalRegion.DCLines", &assign_SubGeographicalRegion_DCLines); + assign_map.emplace("cim:SubGeographicalRegion.Lines", &assign_SubGeographicalRegion_Lines); + assign_map.emplace("cim:SubGeographicalRegion.Region", &assign_SubGeographicalRegion_Region); + assign_map.emplace("cim:SubGeographicalRegion.Substations", &assign_SubGeographicalRegion_Substations); } void SubGeographicalRegion::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/SubGeographicalRegion.hpp b/CGMES_2.4.13_18DEC2013/SubGeographicalRegion.hpp index 72c6f96f9..27232b895 100644 --- a/CGMES_2.4.13_18DEC2013/SubGeographicalRegion.hpp +++ b/CGMES_2.4.13_18DEC2013/SubGeographicalRegion.hpp @@ -20,9 +20,7 @@ namespace CIMPP class Line; class Substation; - /* - A subset of a geographical region of a power system network model. - */ + /** \brief A subset of a geographical region of a power system network model. */ class SubGeographicalRegion : public IdentifiedObject { public: @@ -30,10 +28,17 @@ namespace CIMPP SubGeographicalRegion(); ~SubGeographicalRegion() override; - std::list DCLines; /* Default: 0 */ - std::list Lines; /* The sub-geographical region of the line. Default: 0 */ - CIMPP::GeographicalRegion* Region; /* The geographical region to which this sub-geographical region is within. Default: 0 */ - std::list Substations; /* The substations in this sub-geographical region. Default: 0 */ + /** \brief Default: 0 */ + std::list DCLines; + + /** \brief The sub-geographical region of the line. Default: 0 */ + std::list Lines; + + /** \brief The geographical region to which this sub-geographical region is within. Default: 0 */ + CIMPP::GeographicalRegion* Region; + + /** \brief The substations in this sub-geographical region. Default: 0 */ + std::list Substations; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/SubLoadArea.cpp b/CGMES_2.4.13_18DEC2013/SubLoadArea.cpp index 6cf7e03f8..b14f7db79 100644 --- a/CGMES_2.4.13_18DEC2013/SubLoadArea.cpp +++ b/CGMES_2.4.13_18DEC2013/SubLoadArea.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -SubLoadArea::SubLoadArea() : LoadArea(nullptr) {}; -SubLoadArea::~SubLoadArea() {}; +SubLoadArea::SubLoadArea() : LoadArea(nullptr) {} +SubLoadArea::~SubLoadArea() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ SubLoadArea::getPossibleProfilesForAttributes() const return map; } - - bool assign_LoadArea_SubLoadAreas(BaseClass*, BaseClass*); bool assign_SubLoadArea_LoadArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_SubLoadArea_LoadArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass } return false; } + bool assign_LoadGroup_SubLoadArea(BaseClass*, BaseClass*); bool assign_SubLoadArea_LoadGroups(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_SubLoadArea_LoadGroups(BaseClass* BaseClass_ptr1, BaseClass* BaseCla return false; } - bool get_SubLoadArea_LoadArea(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SubLoadArea* element = dynamic_cast(BaseClass_ptr1)) + const SubLoadArea* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->LoadArea != 0) { @@ -100,7 +99,7 @@ const char* SubLoadArea::debugString() const void SubLoadArea::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SubLoadArea"), &SubLoadArea_factory)); + factory_map.emplace("cim:SubLoadArea", &SubLoadArea_factory); } void SubLoadArea::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -109,8 +108,8 @@ void SubLoadArea::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SubLoadArea.LoadArea"), &assign_SubLoadArea_LoadArea)); - assign_map.insert(std::make_pair(std::string("cim:SubLoadArea.LoadGroups"), &assign_SubLoadArea_LoadGroups)); + assign_map.emplace("cim:SubLoadArea.LoadArea", &assign_SubLoadArea_LoadArea); + assign_map.emplace("cim:SubLoadArea.LoadGroups", &assign_SubLoadArea_LoadGroups); } void SubLoadArea::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/SubLoadArea.hpp b/CGMES_2.4.13_18DEC2013/SubLoadArea.hpp index 6d39dc9ee..eb2947510 100644 --- a/CGMES_2.4.13_18DEC2013/SubLoadArea.hpp +++ b/CGMES_2.4.13_18DEC2013/SubLoadArea.hpp @@ -18,9 +18,7 @@ namespace CIMPP class LoadArea; class LoadGroup; - /* - The class is the second level in a hierarchical structure for grouping of loads for the purpose of load flow load scaling. - */ + /** \brief The class is the second level in a hierarchical structure for grouping of loads for the purpose of load flow load scaling. */ class SubLoadArea : public EnergyArea { public: @@ -28,8 +26,11 @@ namespace CIMPP SubLoadArea(); ~SubLoadArea() override; - CIMPP::LoadArea* LoadArea; /* The LoadArea where the SubLoadArea belongs. Default: 0 */ - std::list LoadGroups; /* The Loadgroups in the SubLoadArea. Default: 0 */ + /** \brief The LoadArea where the SubLoadArea belongs. Default: 0 */ + CIMPP::LoadArea* LoadArea; + + /** \brief The Loadgroups in the SubLoadArea. Default: 0 */ + std::list LoadGroups; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Substation.cpp b/CGMES_2.4.13_18DEC2013/Substation.cpp index 8a8f525bf..d0d5471ff 100644 --- a/CGMES_2.4.13_18DEC2013/Substation.cpp +++ b/CGMES_2.4.13_18DEC2013/Substation.cpp @@ -14,8 +14,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Substation::Substation() : Region(nullptr) {}; -Substation::~Substation() {}; +Substation::Substation() : Region(nullptr) {} +Substation::~Substation() {} static const std::list PossibleProfilesForClass = { @@ -44,8 +44,6 @@ Substation::getPossibleProfilesForAttributes() const return map; } - - bool assign_DCConverterUnit_Substation(BaseClass*, BaseClass*); bool assign_Substation_DCConverterUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -62,6 +60,7 @@ bool assign_Substation_DCConverterUnit(BaseClass* BaseClass_ptr1, BaseClass* Bas } return false; } + bool assign_SubGeographicalRegion_Substations(BaseClass*, BaseClass*); bool assign_Substation_Region(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -78,6 +77,7 @@ bool assign_Substation_Region(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_pt } return false; } + bool assign_VoltageLevel_Substation(BaseClass*, BaseClass*); bool assign_Substation_VoltageLevels(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -98,7 +98,8 @@ bool assign_Substation_VoltageLevels(BaseClass* BaseClass_ptr1, BaseClass* BaseC bool get_Substation_Region(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Substation* element = dynamic_cast(BaseClass_ptr1)) + const Substation* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Region != 0) { @@ -118,7 +119,7 @@ const char* Substation::debugString() const void Substation::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Substation"), &Substation_factory)); + factory_map.emplace("cim:Substation", &Substation_factory); } void Substation::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -127,9 +128,9 @@ void Substation::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Substation.DCConverterUnit"), &assign_Substation_DCConverterUnit)); - assign_map.insert(std::make_pair(std::string("cim:Substation.Region"), &assign_Substation_Region)); - assign_map.insert(std::make_pair(std::string("cim:Substation.VoltageLevels"), &assign_Substation_VoltageLevels)); + assign_map.emplace("cim:Substation.DCConverterUnit", &assign_Substation_DCConverterUnit); + assign_map.emplace("cim:Substation.Region", &assign_Substation_Region); + assign_map.emplace("cim:Substation.VoltageLevels", &assign_Substation_VoltageLevels); } void Substation::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/Substation.hpp b/CGMES_2.4.13_18DEC2013/Substation.hpp index ddeb6c98f..57ef9396c 100644 --- a/CGMES_2.4.13_18DEC2013/Substation.hpp +++ b/CGMES_2.4.13_18DEC2013/Substation.hpp @@ -19,9 +19,7 @@ namespace CIMPP class SubGeographicalRegion; class VoltageLevel; - /* - A collection of equipment for purposes other than generation or utilization, through which electric energy in bulk is passed for the purposes of switching or modifying its characteristics. - */ + /** \brief A collection of equipment for purposes other than generation or utilization, through which electric energy in bulk is passed for the purposes of switching or modifying its characteristics. */ class Substation : public EquipmentContainer { public: @@ -29,9 +27,14 @@ namespace CIMPP Substation(); ~Substation() override; - std::list DCConverterUnit; /* Default: 0 */ - CIMPP::SubGeographicalRegion* Region; /* The SubGeographicalRegion containing the substation. Default: 0 */ - std::list VoltageLevels; /* The voltage levels within this substation. Default: 0 */ + /** \brief Default: 0 */ + std::list DCConverterUnit; + + /** \brief The SubGeographicalRegion containing the substation. Default: 0 */ + CIMPP::SubGeographicalRegion* Region; + + /** \brief The voltage levels within this substation. Default: 0 */ + std::list VoltageLevels; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Susceptance.hpp b/CGMES_2.4.13_18DEC2013/Susceptance.hpp index c213337b1..f98655834 100644 --- a/CGMES_2.4.13_18DEC2013/Susceptance.hpp +++ b/CGMES_2.4.13_18DEC2013/Susceptance.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Imaginary part of admittance. - */ + /** \brief Imaginary part of admittance. */ class Susceptance { public: diff --git a/CGMES_2.4.13_18DEC2013/SvInjection.cpp b/CGMES_2.4.13_18DEC2013/SvInjection.cpp index 568fdb45e..4b2198756 100644 --- a/CGMES_2.4.13_18DEC2013/SvInjection.cpp +++ b/CGMES_2.4.13_18DEC2013/SvInjection.cpp @@ -9,13 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "TopologicalNode.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" using namespace CIMPP; -SvInjection::SvInjection() : TopologicalNode(nullptr) {}; -SvInjection::~SvInjection() {}; +SvInjection::SvInjection() : TopologicalNode(nullptr) {} +SvInjection::~SvInjection() {} static const std::list PossibleProfilesForClass = { @@ -44,70 +42,71 @@ SvInjection::getPossibleProfilesForAttributes() const return map; } - -bool assign_SvInjection_pInjection(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologicalNode_SvInjection(BaseClass*, BaseClass*); +bool assign_SvInjection_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (SvInjection* element = dynamic_cast(BaseClass_ptr1)) + SvInjection* element = dynamic_cast(BaseClass_ptr1); + TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->pInjection; - if (buffer.fail()) - return false; - else - return true; + if (element->TopologicalNode != element2) + { + element->TopologicalNode = element2; + return assign_TopologicalNode_SvInjection(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_SvInjection_qInjection(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SvInjection_pInjection(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SvInjection* element = dynamic_cast(BaseClass_ptr1)) + SvInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->qInjection; - if (buffer.fail()) - return false; - else + buffer >> element->pInjection; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_TopologicalNode_SvInjection(BaseClass*, BaseClass*); -bool assign_SvInjection_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_SvInjection_qInjection(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { SvInjection* element = dynamic_cast(BaseClass_ptr1); - TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->TopologicalNode != element2) + buffer >> element->qInjection; + if (!buffer.fail()) { - element->TopologicalNode = element2; - return assign_TopologicalNode_SvInjection(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool get_SvInjection_pInjection(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SvInjection_TopologicalNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SvInjection* element = dynamic_cast(BaseClass_ptr1)) + const SvInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->pInjection; - if (!buffer.str().empty()) + if (element->TopologicalNode != 0) { + BaseClass_list.push_back(element->TopologicalNode); return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_SvInjection_qInjection(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SvInjection_pInjection(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SvInjection* element = dynamic_cast(BaseClass_ptr1)) + const SvInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->qInjection; + buffer << element->pInjection; if (!buffer.str().empty()) { return true; @@ -117,21 +116,21 @@ bool get_SvInjection_qInjection(const BaseClass* BaseClass_ptr1, std::stringstre return false; } - -bool get_SvInjection_TopologicalNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) +bool get_SvInjection_qInjection(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SvInjection* element = dynamic_cast(BaseClass_ptr1)) + const SvInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->TopologicalNode != 0) + buffer << element->qInjection; + if (!buffer.str().empty()) { - BaseClass_list.push_back(element->TopologicalNode); return true; } } + buffer.setstate(std::ios::failbit); return false; } - const char SvInjection::debugName[] = "SvInjection"; const char* SvInjection::debugString() const { @@ -140,18 +139,18 @@ const char* SvInjection::debugString() const void SvInjection::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SvInjection"), &SvInjection_factory)); + factory_map.emplace("cim:SvInjection", &SvInjection_factory); } void SvInjection::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvInjection.pInjection"), &assign_SvInjection_pInjection)); - assign_map.insert(std::make_pair(std::string("cim:SvInjection.qInjection"), &assign_SvInjection_qInjection)); + assign_map.emplace("cim:SvInjection.pInjection", &assign_SvInjection_pInjection); + assign_map.emplace("cim:SvInjection.qInjection", &assign_SvInjection_qInjection); } void SvInjection::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvInjection.TopologicalNode"), &assign_SvInjection_TopologicalNode)); + assign_map.emplace("cim:SvInjection.TopologicalNode", &assign_SvInjection_TopologicalNode); } void SvInjection::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/SvInjection.hpp b/CGMES_2.4.13_18DEC2013/SvInjection.hpp index 88e58a1b2..73b97137a 100644 --- a/CGMES_2.4.13_18DEC2013/SvInjection.hpp +++ b/CGMES_2.4.13_18DEC2013/SvInjection.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class TopologicalNode; - /* - The SvInjection is reporting the calculated bus injection minus the sum of the terminal flows. The terminal flow is positive out from the bus (load sign convention) and bus injection has positive flow into the bus. SvInjection may have the remainder after state estimation or slack after power flow calculation. - */ + /** \brief The SvInjection is reporting the calculated bus injection minus the sum of the terminal flows. The terminal flow is positive out from the bus (load sign convention) and bus injection has positive flow into the bus. SvInjection may have the remainder after state estimation or slack after power flow calculation. */ class SvInjection : public BaseClass { public: @@ -29,9 +27,14 @@ namespace CIMPP SvInjection(); ~SvInjection() override; - CIMPP::TopologicalNode* TopologicalNode; /* The injection flows state variables associated with the topological node. Default: 0 */ - CIMPP::ActivePower pInjection; /* The active power injected into the bus in addition to injections from equipment terminals. Positive sign means injection into the TopologicalNode (bus). Default: nullptr */ - CIMPP::ReactivePower qInjection; /* The reactive power injected into the bus in addition to injections from equipment terminals. Positive sign means injection into the TopologicalNode (bus). Default: nullptr */ + /** \brief The injection flows state variables associated with the topological node. Default: 0 */ + CIMPP::TopologicalNode* TopologicalNode; + + /** \brief The active power injected into the bus in addition to injections from equipment terminals. Positive sign means injection into the TopologicalNode (bus). Default: nullptr */ + CIMPP::ActivePower pInjection; + + /** \brief The reactive power injected into the bus in addition to injections from equipment terminals. Positive sign means injection into the TopologicalNode (bus). Default: nullptr */ + CIMPP::ReactivePower qInjection; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/SvPowerFlow.cpp b/CGMES_2.4.13_18DEC2013/SvPowerFlow.cpp index c2d0e86a0..dfc4eab2e 100644 --- a/CGMES_2.4.13_18DEC2013/SvPowerFlow.cpp +++ b/CGMES_2.4.13_18DEC2013/SvPowerFlow.cpp @@ -9,13 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "Terminal.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" using namespace CIMPP; -SvPowerFlow::SvPowerFlow() : Terminal(nullptr) {}; -SvPowerFlow::~SvPowerFlow() {}; +SvPowerFlow::SvPowerFlow() : Terminal(nullptr) {} +SvPowerFlow::~SvPowerFlow() {} static const std::list PossibleProfilesForClass = { @@ -44,70 +42,71 @@ SvPowerFlow::getPossibleProfilesForAttributes() const return map; } - -bool assign_SvPowerFlow_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Terminal_SvPowerFlow(BaseClass*, BaseClass*); +bool assign_SvPowerFlow_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (SvPowerFlow* element = dynamic_cast(BaseClass_ptr1)) + SvPowerFlow* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->p; - if (buffer.fail()) - return false; - else - return true; + if (element->Terminal != element2) + { + element->Terminal = element2; + return assign_Terminal_SvPowerFlow(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_SvPowerFlow_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SvPowerFlow_p(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SvPowerFlow* element = dynamic_cast(BaseClass_ptr1)) + SvPowerFlow* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->q; - if (buffer.fail()) - return false; - else + buffer >> element->p; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_Terminal_SvPowerFlow(BaseClass*, BaseClass*); -bool assign_SvPowerFlow_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_SvPowerFlow_q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { SvPowerFlow* element = dynamic_cast(BaseClass_ptr1); - Terminal* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->Terminal != element2) + buffer >> element->q; + if (!buffer.fail()) { - element->Terminal = element2; - return assign_Terminal_SvPowerFlow(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool get_SvPowerFlow_p(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SvPowerFlow_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SvPowerFlow* element = dynamic_cast(BaseClass_ptr1)) + const SvPowerFlow* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->p; - if (!buffer.str().empty()) + if (element->Terminal != 0) { + BaseClass_list.push_back(element->Terminal); return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_SvPowerFlow_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SvPowerFlow_p(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SvPowerFlow* element = dynamic_cast(BaseClass_ptr1)) + const SvPowerFlow* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->q; + buffer << element->p; if (!buffer.str().empty()) { return true; @@ -117,21 +116,21 @@ bool get_SvPowerFlow_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - -bool get_SvPowerFlow_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) +bool get_SvPowerFlow_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SvPowerFlow* element = dynamic_cast(BaseClass_ptr1)) + const SvPowerFlow* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->Terminal != 0) + buffer << element->q; + if (!buffer.str().empty()) { - BaseClass_list.push_back(element->Terminal); return true; } } + buffer.setstate(std::ios::failbit); return false; } - const char SvPowerFlow::debugName[] = "SvPowerFlow"; const char* SvPowerFlow::debugString() const { @@ -140,18 +139,18 @@ const char* SvPowerFlow::debugString() const void SvPowerFlow::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SvPowerFlow"), &SvPowerFlow_factory)); + factory_map.emplace("cim:SvPowerFlow", &SvPowerFlow_factory); } void SvPowerFlow::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvPowerFlow.p"), &assign_SvPowerFlow_p)); - assign_map.insert(std::make_pair(std::string("cim:SvPowerFlow.q"), &assign_SvPowerFlow_q)); + assign_map.emplace("cim:SvPowerFlow.p", &assign_SvPowerFlow_p); + assign_map.emplace("cim:SvPowerFlow.q", &assign_SvPowerFlow_q); } void SvPowerFlow::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvPowerFlow.Terminal"), &assign_SvPowerFlow_Terminal)); + assign_map.emplace("cim:SvPowerFlow.Terminal", &assign_SvPowerFlow_Terminal); } void SvPowerFlow::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/SvPowerFlow.hpp b/CGMES_2.4.13_18DEC2013/SvPowerFlow.hpp index b42f057c1..a27cce2a2 100644 --- a/CGMES_2.4.13_18DEC2013/SvPowerFlow.hpp +++ b/CGMES_2.4.13_18DEC2013/SvPowerFlow.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class Terminal; - /* - State variable for power flow. Load convention is used for flow direction. This means flow out from the TopologicalNode into the equipment is positive. - */ + /** \brief State variable for power flow. Load convention is used for flow direction. This means flow out from the TopologicalNode into the equipment is positive. */ class SvPowerFlow : public BaseClass { public: @@ -29,9 +27,14 @@ namespace CIMPP SvPowerFlow(); ~SvPowerFlow() override; - CIMPP::Terminal* Terminal; /* The terminal associated with the power flow state variable. Default: 0 */ - CIMPP::ActivePower p; /* The active power flow. Load sign convention is used, i.e. positive sign means flow out from a TopologicalNode (bus) into the conducting equipment. Default: nullptr */ - CIMPP::ReactivePower q; /* The reactive power flow. Load sign convention is used, i.e. positive sign means flow out from a TopologicalNode (bus) into the conducting equipment. Default: nullptr */ + /** \brief The terminal associated with the power flow state variable. Default: 0 */ + CIMPP::Terminal* Terminal; + + /** \brief The active power flow. Load sign convention is used, i.e. positive sign means flow out from a TopologicalNode (bus) into the conducting equipment. Default: nullptr */ + CIMPP::ActivePower p; + + /** \brief The reactive power flow. Load sign convention is used, i.e. positive sign means flow out from a TopologicalNode (bus) into the conducting equipment. Default: nullptr */ + CIMPP::ReactivePower q; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/SvShuntCompensatorSections.cpp b/CGMES_2.4.13_18DEC2013/SvShuntCompensatorSections.cpp index ea26dfa08..a14be0d1b 100644 --- a/CGMES_2.4.13_18DEC2013/SvShuntCompensatorSections.cpp +++ b/CGMES_2.4.13_18DEC2013/SvShuntCompensatorSections.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ShuntCompensator.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -SvShuntCompensatorSections::SvShuntCompensatorSections() : ShuntCompensator(nullptr) {}; -SvShuntCompensatorSections::~SvShuntCompensatorSections() {}; +SvShuntCompensatorSections::SvShuntCompensatorSections() : ShuntCompensator(nullptr) {} +SvShuntCompensatorSections::~SvShuntCompensatorSections() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ SvShuntCompensatorSections::getPossibleProfilesForAttributes() const return map; } - -bool assign_SvShuntCompensatorSections_sections(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (SvShuntCompensatorSections* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->sections; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ShuntCompensator_SvShuntCompensatorSections(BaseClass*, BaseClass*); bool assign_SvShuntCompensatorSections_ShuntCompensator(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_SvShuntCompensatorSections_ShuntCompensator(BaseClass* BaseClass_ptr return false; } -bool get_SvShuntCompensatorSections_sections(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_SvShuntCompensatorSections_sections(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const SvShuntCompensatorSections* element = dynamic_cast(BaseClass_ptr1)) + SvShuntCompensatorSections* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->sections; - if (!buffer.str().empty()) + buffer >> element->sections; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_SvShuntCompensatorSections_ShuntCompensator(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SvShuntCompensatorSections* element = dynamic_cast(BaseClass_ptr1)) + const SvShuntCompensatorSections* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ShuntCompensator != 0) { @@ -102,6 +86,20 @@ bool get_SvShuntCompensatorSections_ShuntCompensator(const BaseClass* BaseClass_ return false; } +bool get_SvShuntCompensatorSections_sections(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const SvShuntCompensatorSections* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->sections; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char SvShuntCompensatorSections::debugName[] = "SvShuntCompensatorSections"; const char* SvShuntCompensatorSections::debugString() const @@ -111,17 +109,17 @@ const char* SvShuntCompensatorSections::debugString() const void SvShuntCompensatorSections::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SvShuntCompensatorSections"), &SvShuntCompensatorSections_factory)); + factory_map.emplace("cim:SvShuntCompensatorSections", &SvShuntCompensatorSections_factory); } void SvShuntCompensatorSections::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvShuntCompensatorSections.sections"), &assign_SvShuntCompensatorSections_sections)); + assign_map.emplace("cim:SvShuntCompensatorSections.sections", &assign_SvShuntCompensatorSections_sections); } void SvShuntCompensatorSections::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvShuntCompensatorSections.ShuntCompensator"), &assign_SvShuntCompensatorSections_ShuntCompensator)); + assign_map.emplace("cim:SvShuntCompensatorSections.ShuntCompensator", &assign_SvShuntCompensatorSections_ShuntCompensator); } void SvShuntCompensatorSections::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/SvShuntCompensatorSections.hpp b/CGMES_2.4.13_18DEC2013/SvShuntCompensatorSections.hpp index 5fbb8611d..357a98c95 100644 --- a/CGMES_2.4.13_18DEC2013/SvShuntCompensatorSections.hpp +++ b/CGMES_2.4.13_18DEC2013/SvShuntCompensatorSections.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ShuntCompensator; - /* - State variable for the number of sections in service for a shunt compensator. - */ + /** \brief State variable for the number of sections in service for a shunt compensator. */ class SvShuntCompensatorSections : public BaseClass { public: @@ -28,8 +26,11 @@ namespace CIMPP SvShuntCompensatorSections(); ~SvShuntCompensatorSections() override; - CIMPP::ShuntCompensator* ShuntCompensator; /* The shunt compensator for which the state applies. Default: 0 */ - CIMPP::Simple_Float sections; /* The number of sections in service as a continous variable. To get integer value scale with ShuntCompensator.bPerSection. Default: nullptr */ + /** \brief The shunt compensator for which the state applies. Default: 0 */ + CIMPP::ShuntCompensator* ShuntCompensator; + + /** \brief The number of sections in service as a continous variable. To get integer value scale with ShuntCompensator.bPerSection. Default: nullptr */ + CIMPP::Simple_Float sections; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/SvStatus.cpp b/CGMES_2.4.13_18DEC2013/SvStatus.cpp index 3ab5f6a66..17aca7359 100644 --- a/CGMES_2.4.13_18DEC2013/SvStatus.cpp +++ b/CGMES_2.4.13_18DEC2013/SvStatus.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ConductingEquipment.hpp" -#include "Boolean.hpp" using namespace CIMPP; -SvStatus::SvStatus() : ConductingEquipment(nullptr) {}; -SvStatus::~SvStatus() {}; +SvStatus::SvStatus() : ConductingEquipment(nullptr) {} +SvStatus::~SvStatus() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ SvStatus::getPossibleProfilesForAttributes() const return map; } - -bool assign_SvStatus_inService(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (SvStatus* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->inService; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ConductingEquipment_SvStatus(BaseClass*, BaseClass*); bool assign_SvStatus_ConductingEquipment(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_SvStatus_ConductingEquipment(BaseClass* BaseClass_ptr1, BaseClass* B return false; } -bool get_SvStatus_inService(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_SvStatus_inService(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const SvStatus* element = dynamic_cast(BaseClass_ptr1)) + SvStatus* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->inService; - if (!buffer.str().empty()) + buffer >> element->inService; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_SvStatus_ConductingEquipment(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SvStatus* element = dynamic_cast(BaseClass_ptr1)) + const SvStatus* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ConductingEquipment != 0) { @@ -102,6 +86,20 @@ bool get_SvStatus_ConductingEquipment(const BaseClass* BaseClass_ptr1, std::list return false; } +bool get_SvStatus_inService(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const SvStatus* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inService; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char SvStatus::debugName[] = "SvStatus"; const char* SvStatus::debugString() const @@ -111,17 +109,17 @@ const char* SvStatus::debugString() const void SvStatus::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SvStatus"), &SvStatus_factory)); + factory_map.emplace("cim:SvStatus", &SvStatus_factory); } void SvStatus::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvStatus.inService"), &assign_SvStatus_inService)); + assign_map.emplace("cim:SvStatus.inService", &assign_SvStatus_inService); } void SvStatus::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvStatus.ConductingEquipment"), &assign_SvStatus_ConductingEquipment)); + assign_map.emplace("cim:SvStatus.ConductingEquipment", &assign_SvStatus_ConductingEquipment); } void SvStatus::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/SvStatus.hpp b/CGMES_2.4.13_18DEC2013/SvStatus.hpp index e93a0b476..e1b7266b5 100644 --- a/CGMES_2.4.13_18DEC2013/SvStatus.hpp +++ b/CGMES_2.4.13_18DEC2013/SvStatus.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ConductingEquipment; - /* - State variable for status. - */ + /** \brief State variable for status. */ class SvStatus : public BaseClass { public: @@ -28,8 +26,11 @@ namespace CIMPP SvStatus(); ~SvStatus() override; - CIMPP::ConductingEquipment* ConductingEquipment; /* The conducting equipment associated with the status state variable. Default: 0 */ - CIMPP::Boolean inService; /* The in service status as a result of topology processing. Default: false */ + /** \brief The conducting equipment associated with the status state variable. Default: 0 */ + CIMPP::ConductingEquipment* ConductingEquipment; + + /** \brief The in service status as a result of topology processing. Default: false */ + CIMPP::Boolean inService; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/SvTapStep.cpp b/CGMES_2.4.13_18DEC2013/SvTapStep.cpp index 63dafc3ea..717c92b1a 100644 --- a/CGMES_2.4.13_18DEC2013/SvTapStep.cpp +++ b/CGMES_2.4.13_18DEC2013/SvTapStep.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "TapChanger.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -SvTapStep::SvTapStep() : TapChanger(nullptr) {}; -SvTapStep::~SvTapStep() {}; +SvTapStep::SvTapStep() : TapChanger(nullptr) {} +SvTapStep::~SvTapStep() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ SvTapStep::getPossibleProfilesForAttributes() const return map; } - -bool assign_SvTapStep_position(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (SvTapStep* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->position; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_TapChanger_SvTapStep(BaseClass*, BaseClass*); bool assign_SvTapStep_TapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_SvTapStep_TapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass return false; } -bool get_SvTapStep_position(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_SvTapStep_position(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const SvTapStep* element = dynamic_cast(BaseClass_ptr1)) + SvTapStep* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->position; - if (!buffer.str().empty()) + buffer >> element->position; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_SvTapStep_TapChanger(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SvTapStep* element = dynamic_cast(BaseClass_ptr1)) + const SvTapStep* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->TapChanger != 0) { @@ -102,6 +86,20 @@ bool get_SvTapStep_TapChanger(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->position; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char SvTapStep::debugName[] = "SvTapStep"; const char* SvTapStep::debugString() const @@ -111,17 +109,17 @@ const char* SvTapStep::debugString() const void SvTapStep::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SvTapStep"), &SvTapStep_factory)); + factory_map.emplace("cim:SvTapStep", &SvTapStep_factory); } void SvTapStep::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvTapStep.position"), &assign_SvTapStep_position)); + assign_map.emplace("cim:SvTapStep.position", &assign_SvTapStep_position); } void SvTapStep::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvTapStep.TapChanger"), &assign_SvTapStep_TapChanger)); + assign_map.emplace("cim:SvTapStep.TapChanger", &assign_SvTapStep_TapChanger); } void SvTapStep::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/SvTapStep.hpp b/CGMES_2.4.13_18DEC2013/SvTapStep.hpp index 7a0d6e63e..57f08cda1 100644 --- a/CGMES_2.4.13_18DEC2013/SvTapStep.hpp +++ b/CGMES_2.4.13_18DEC2013/SvTapStep.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class TapChanger; - /* - State variable for transformer tap step. This class is to be used for taps of LTC (load tap changing) transformers, not fixed tap transformers. - */ + /** \brief State variable for transformer tap step. This class is to be used for taps of LTC (load tap changing) transformers, not fixed tap transformers. */ class SvTapStep : public BaseClass { public: @@ -28,8 +26,11 @@ namespace CIMPP SvTapStep(); ~SvTapStep() override; - CIMPP::TapChanger* TapChanger; /* The tap changer associated with the tap step state. Default: 0 */ - CIMPP::Simple_Float position; /* The floating point tap position. This is not the tap ratio, but rather the tap step position as defined by the related tap changer model and normally is constrained to be within the range of minimum and maximum tap positions. Default: nullptr */ + /** \brief The tap changer associated with the tap step state. Default: 0 */ + CIMPP::TapChanger* TapChanger; + + /** \brief The floating point tap position. This is not the tap ratio, but rather the tap step position as defined by the related tap changer model and normally is constrained to be within the range of minimum and maximum tap positions. Default: nullptr */ + CIMPP::Simple_Float position; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/SvVoltage.cpp b/CGMES_2.4.13_18DEC2013/SvVoltage.cpp index 9d4c2a6dd..697cd57c5 100644 --- a/CGMES_2.4.13_18DEC2013/SvVoltage.cpp +++ b/CGMES_2.4.13_18DEC2013/SvVoltage.cpp @@ -9,13 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "TopologicalNode.hpp" -#include "AngleDegrees.hpp" -#include "Voltage.hpp" using namespace CIMPP; -SvVoltage::SvVoltage() : TopologicalNode(nullptr) {}; -SvVoltage::~SvVoltage() {}; +SvVoltage::SvVoltage() : TopologicalNode(nullptr) {} +SvVoltage::~SvVoltage() {} static const std::list PossibleProfilesForClass = { @@ -44,70 +42,71 @@ SvVoltage::getPossibleProfilesForAttributes() const return map; } - -bool assign_SvVoltage_angle(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologicalNode_SvVoltage(BaseClass*, BaseClass*); +bool assign_SvVoltage_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (SvVoltage* element = dynamic_cast(BaseClass_ptr1)) + SvVoltage* element = dynamic_cast(BaseClass_ptr1); + TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->angle; - if (buffer.fail()) - return false; - else - return true; + if (element->TopologicalNode != element2) + { + element->TopologicalNode = element2; + return assign_TopologicalNode_SvVoltage(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_SvVoltage_v(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SvVoltage_angle(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SvVoltage* element = dynamic_cast(BaseClass_ptr1)) + SvVoltage* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->v; - if (buffer.fail()) - return false; - else + buffer >> element->angle; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_TopologicalNode_SvVoltage(BaseClass*, BaseClass*); -bool assign_SvVoltage_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_SvVoltage_v(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { SvVoltage* element = dynamic_cast(BaseClass_ptr1); - TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->TopologicalNode != element2) + buffer >> element->v; + if (!buffer.fail()) { - element->TopologicalNode = element2; - return assign_TopologicalNode_SvVoltage(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool get_SvVoltage_angle(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SvVoltage_TopologicalNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SvVoltage* element = dynamic_cast(BaseClass_ptr1)) + const SvVoltage* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->angle; - if (!buffer.str().empty()) + if (element->TopologicalNode != 0) { + BaseClass_list.push_back(element->TopologicalNode); return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_SvVoltage_v(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SvVoltage_angle(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SvVoltage* element = dynamic_cast(BaseClass_ptr1)) + const SvVoltage* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->v; + buffer << element->angle; if (!buffer.str().empty()) { return true; @@ -117,21 +116,21 @@ bool get_SvVoltage_v(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - -bool get_SvVoltage_TopologicalNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) +bool get_SvVoltage_v(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SvVoltage* element = dynamic_cast(BaseClass_ptr1)) + const SvVoltage* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->TopologicalNode != 0) + buffer << element->v; + if (!buffer.str().empty()) { - BaseClass_list.push_back(element->TopologicalNode); return true; } } + buffer.setstate(std::ios::failbit); return false; } - const char SvVoltage::debugName[] = "SvVoltage"; const char* SvVoltage::debugString() const { @@ -140,18 +139,18 @@ const char* SvVoltage::debugString() const void SvVoltage::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SvVoltage"), &SvVoltage_factory)); + factory_map.emplace("cim:SvVoltage", &SvVoltage_factory); } void SvVoltage::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvVoltage.angle"), &assign_SvVoltage_angle)); - assign_map.insert(std::make_pair(std::string("cim:SvVoltage.v"), &assign_SvVoltage_v)); + assign_map.emplace("cim:SvVoltage.angle", &assign_SvVoltage_angle); + assign_map.emplace("cim:SvVoltage.v", &assign_SvVoltage_v); } void SvVoltage::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvVoltage.TopologicalNode"), &assign_SvVoltage_TopologicalNode)); + assign_map.emplace("cim:SvVoltage.TopologicalNode", &assign_SvVoltage_TopologicalNode); } void SvVoltage::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/SvVoltage.hpp b/CGMES_2.4.13_18DEC2013/SvVoltage.hpp index 629e92f49..04595982a 100644 --- a/CGMES_2.4.13_18DEC2013/SvVoltage.hpp +++ b/CGMES_2.4.13_18DEC2013/SvVoltage.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class TopologicalNode; - /* - State variable for voltage. - */ + /** \brief State variable for voltage. */ class SvVoltage : public BaseClass { public: @@ -29,9 +27,14 @@ namespace CIMPP SvVoltage(); ~SvVoltage() override; - CIMPP::TopologicalNode* TopologicalNode; /* The state voltage associated with the topological node. Default: 0 */ - CIMPP::AngleDegrees angle; /* The voltage angle of the topological node complex voltage with respect to system reference. Default: nullptr */ - CIMPP::Voltage v; /* The voltage magnitude of the topological node. Default: nullptr */ + /** \brief The state voltage associated with the topological node. Default: 0 */ + CIMPP::TopologicalNode* TopologicalNode; + + /** \brief The voltage angle of the topological node complex voltage with respect to system reference. Default: nullptr */ + CIMPP::AngleDegrees angle; + + /** \brief The voltage magnitude of the topological node. Default: nullptr */ + CIMPP::Voltage v; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Switch.cpp b/CGMES_2.4.13_18DEC2013/Switch.cpp index bcd8d6aca..5f84a2d7a 100644 --- a/CGMES_2.4.13_18DEC2013/Switch.cpp +++ b/CGMES_2.4.13_18DEC2013/Switch.cpp @@ -9,15 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "SwitchSchedule.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "CurrentFlow.hpp" -#include "Boolean.hpp" using namespace CIMPP; -Switch::Switch() {}; -Switch::~Switch() {}; +Switch::Switch() {} +Switch::~Switch() {} static const std::list PossibleProfilesForClass = { @@ -49,80 +45,84 @@ Switch::getPossibleProfilesForAttributes() const return map; } - -bool assign_Switch_normalOpen(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SwitchSchedule_Switch(BaseClass*, BaseClass*); +bool assign_Switch_SwitchSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (Switch* element = dynamic_cast(BaseClass_ptr1)) + Switch* element = dynamic_cast(BaseClass_ptr1); + SwitchSchedule* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->normalOpen; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->SwitchSchedules.begin(), element->SwitchSchedules.end(), element2) == element->SwitchSchedules.end()) + { + element->SwitchSchedules.push_back(element2); + return assign_SwitchSchedule_Switch(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_Switch_open(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Switch_normalOpen(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Switch* element = dynamic_cast(BaseClass_ptr1)) + Switch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->open; - if (buffer.fail()) - return false; - else + buffer >> element->normalOpen; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Switch_ratedCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Switch_open(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Switch* element = dynamic_cast(BaseClass_ptr1)) + Switch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->ratedCurrent; - if (buffer.fail()) - return false; - else + buffer >> element->open; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Switch_retained(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Switch_ratedCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Switch* element = dynamic_cast(BaseClass_ptr1)) + Switch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->retained; - if (buffer.fail()) - return false; - else + buffer >> element->ratedCurrent; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_SwitchSchedule_Switch(BaseClass*, BaseClass*); -bool assign_Switch_SwitchSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_Switch_retained(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { Switch* element = dynamic_cast(BaseClass_ptr1); - SwitchSchedule* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->SwitchSchedules.begin(), element->SwitchSchedules.end(), element2) == element->SwitchSchedules.end()) + buffer >> element->retained; + if (!buffer.fail()) { - element->SwitchSchedules.push_back(element2); - return assign_SwitchSchedule_Switch(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_Switch_normalOpen(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Switch* element = dynamic_cast(BaseClass_ptr1)) + const Switch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->normalOpen; if (!buffer.str().empty()) @@ -136,7 +136,8 @@ bool get_Switch_normalOpen(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_Switch_open(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Switch* element = dynamic_cast(BaseClass_ptr1)) + const Switch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->open; if (!buffer.str().empty()) @@ -150,7 +151,8 @@ bool get_Switch_open(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Switch_ratedCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Switch* element = dynamic_cast(BaseClass_ptr1)) + const Switch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedCurrent; if (!buffer.str().empty()) @@ -164,7 +166,8 @@ bool get_Switch_ratedCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_Switch_retained(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Switch* element = dynamic_cast(BaseClass_ptr1)) + const Switch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->retained; if (!buffer.str().empty()) @@ -176,8 +179,6 @@ bool get_Switch_retained(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } - - const char Switch::debugName[] = "Switch"; const char* Switch::debugString() const { @@ -186,20 +187,20 @@ const char* Switch::debugString() const void Switch::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Switch"), &Switch_factory)); + factory_map.emplace("cim:Switch", &Switch_factory); } void Switch::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Switch.normalOpen"), &assign_Switch_normalOpen)); - assign_map.insert(std::make_pair(std::string("cim:Switch.open"), &assign_Switch_open)); - assign_map.insert(std::make_pair(std::string("cim:Switch.ratedCurrent"), &assign_Switch_ratedCurrent)); - assign_map.insert(std::make_pair(std::string("cim:Switch.retained"), &assign_Switch_retained)); + assign_map.emplace("cim:Switch.normalOpen", &assign_Switch_normalOpen); + assign_map.emplace("cim:Switch.open", &assign_Switch_open); + assign_map.emplace("cim:Switch.ratedCurrent", &assign_Switch_ratedCurrent); + assign_map.emplace("cim:Switch.retained", &assign_Switch_retained); } void Switch::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Switch.SwitchSchedules"), &assign_Switch_SwitchSchedules)); + assign_map.emplace("cim:Switch.SwitchSchedules", &assign_Switch_SwitchSchedules); } void Switch::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/Switch.hpp b/CGMES_2.4.13_18DEC2013/Switch.hpp index 4139a8582..1b8c13160 100644 --- a/CGMES_2.4.13_18DEC2013/Switch.hpp +++ b/CGMES_2.4.13_18DEC2013/Switch.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class SwitchSchedule; - /* - A generic device designed to close, or open, or both, one or more electric circuits. All switches are two terminal devices including grounding switches. - */ + /** \brief A generic device designed to close, or open, or both, one or more electric circuits. All switches are two terminal devices including grounding switches. */ class Switch : public ConductingEquipment { public: @@ -29,11 +27,20 @@ namespace CIMPP Switch(); ~Switch() override; - std::list SwitchSchedules; /* A SwitchSchedule is associated with a Switch. Default: 0 */ - CIMPP::Boolean normalOpen; /* The attribute is used in cases when no Measurement for the status value is present. If the Switch has a status measurement the Discrete.normalValue is expected to match with the Switch.normalOpen. Default: false */ - CIMPP::Boolean open; /* The attribute tells if the switch is considered open when used as input to topology processing. Default: false */ - CIMPP::CurrentFlow ratedCurrent; /* The maximum continuous current carrying capacity in amps governed by the device material and construction. Default: nullptr */ - CIMPP::Boolean retained; /* Branch is retained in a bus branch model. The flow through retained switches will normally be calculated in power flow. Default: false */ + /** \brief A SwitchSchedule is associated with a Switch. Default: 0 */ + std::list SwitchSchedules; + + /** \brief The attribute is used in cases when no Measurement for the status value is present. If the Switch has a status measurement the Discrete.normalValue is expected to match with the Switch.normalOpen. Default: false */ + CIMPP::Boolean normalOpen; + + /** \brief The attribute tells if the switch is considered open when used as input to topology processing. Default: false */ + CIMPP::Boolean open; + + /** \brief The maximum continuous current carrying capacity in amps governed by the device material and construction. Default: nullptr */ + CIMPP::CurrentFlow ratedCurrent; + + /** \brief Branch is retained in a bus branch model. The flow through retained switches will normally be calculated in power flow. Default: false */ + CIMPP::Boolean retained; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/SwitchSchedule.cpp b/CGMES_2.4.13_18DEC2013/SwitchSchedule.cpp index 01f9175cf..17357887b 100644 --- a/CGMES_2.4.13_18DEC2013/SwitchSchedule.cpp +++ b/CGMES_2.4.13_18DEC2013/SwitchSchedule.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -SwitchSchedule::SwitchSchedule() : Switch(nullptr) {}; -SwitchSchedule::~SwitchSchedule() {}; +SwitchSchedule::SwitchSchedule() : Switch(nullptr) {} +SwitchSchedule::~SwitchSchedule() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ SwitchSchedule::getPossibleProfilesForAttributes() const return map; } - - bool assign_Switch_SwitchSchedules(BaseClass*, BaseClass*); bool assign_SwitchSchedule_Switch(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_SwitchSchedule_Switch(BaseClass* BaseClass_ptr1, BaseClass* BaseClas return false; } - bool get_SwitchSchedule_Switch(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SwitchSchedule* element = dynamic_cast(BaseClass_ptr1)) + const SwitchSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Switch != 0) { @@ -73,7 +71,6 @@ bool get_SwitchSchedule_Switch(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SwitchSchedule"), &SwitchSchedule_factory)); + factory_map.emplace("cim:SwitchSchedule", &SwitchSchedule_factory); } void SwitchSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void SwitchSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SwitchSchedule.Switch"), &assign_SwitchSchedule_Switch)); + assign_map.emplace("cim:SwitchSchedule.Switch", &assign_SwitchSchedule_Switch); } void SwitchSchedule::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/SwitchSchedule.hpp b/CGMES_2.4.13_18DEC2013/SwitchSchedule.hpp index 7304bc07e..929ce0e77 100644 --- a/CGMES_2.4.13_18DEC2013/SwitchSchedule.hpp +++ b/CGMES_2.4.13_18DEC2013/SwitchSchedule.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class Switch; - /* - A schedule of switch positions. If RegularTimePoint.value1 is 0, the switch is open. If 1, the switch is closed. - */ + /** \brief A schedule of switch positions. If RegularTimePoint.value1 is 0, the switch is open. If 1, the switch is closed. */ class SwitchSchedule : public SeasonDayTypeSchedule { public: @@ -27,7 +25,8 @@ namespace CIMPP SwitchSchedule(); ~SwitchSchedule() override; - CIMPP::Switch* Switch; /* A Switch can be associated with SwitchSchedules. Default: 0 */ + /** \brief A Switch can be associated with SwitchSchedules. Default: 0 */ + CIMPP::Switch* Switch; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachine.cpp b/CGMES_2.4.13_18DEC2013/SynchronousMachine.cpp index 5949e61f1..775effb85 100644 --- a/CGMES_2.4.13_18DEC2013/SynchronousMachine.cpp +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachine.cpp @@ -10,32 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "ReactiveCapabilityCurve.hpp" #include "SynchronousMachineDynamics.hpp" -#include "Boolean.hpp" -#include "Resistance.hpp" -#include "Reactance.hpp" -#include "CurrentFlow.hpp" -#include "ReactivePower.hpp" -#include "ReactivePower.hpp" -#include "Simple_Float.hpp" -#include "SynchronousMachineOperatingMode.hpp" -#include "PerCent.hpp" -#include "Resistance.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Integer.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ShortCircuitRotorKind.hpp" -#include "SynchronousMachineKind.hpp" -#include "PerCent.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -SynchronousMachine::SynchronousMachine() : InitialReactiveCapabilityCurve(nullptr), SynchronousMachineDynamics(nullptr) {}; -SynchronousMachine::~SynchronousMachine() {}; +SynchronousMachine::SynchronousMachine() : InitialReactiveCapabilityCurve(nullptr), SynchronousMachineDynamics(nullptr) {} +SynchronousMachine::~SynchronousMachine() {} static const std::list PossibleProfilesForClass = { @@ -86,317 +65,353 @@ SynchronousMachine::getPossibleProfilesForAttributes() const return map; } +bool assign_ReactiveCapabilityCurve_InitiallyUsedBySynchronousMachines(BaseClass*, BaseClass*); +bool assign_SynchronousMachine_InitialReactiveCapabilityCurve(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + ReactiveCapabilityCurve* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->InitialReactiveCapabilityCurve != element2) + { + element->InitialReactiveCapabilityCurve = element2; + return assign_ReactiveCapabilityCurve_InitiallyUsedBySynchronousMachines(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_SynchronousMachine_earthing(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineDynamics_SynchronousMachine(BaseClass*, BaseClass*); +bool assign_SynchronousMachine_SynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + SynchronousMachineDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->SynchronousMachineDynamics != element2) + { + element->SynchronousMachineDynamics = element2; + return assign_SynchronousMachineDynamics_SynchronousMachine(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_SynchronousMachine_earthing(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->earthing; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_earthingStarPointR(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_earthingStarPointR(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->earthingStarPointR; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_earthingStarPointX(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_earthingStarPointX(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->earthingStarPointX; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_ikk(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_ikk(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ikk; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_maxQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_maxQ(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxQ; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_minQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_minQ(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minQ; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_mu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_mu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_operatingMode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_operatingMode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->operatingMode; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_qPercent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_qPercent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qPercent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_r0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_r2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_r2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_referencePriority(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_referencePriority(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->referencePriority; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_satDirectSubtransX(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_satDirectSubtransX(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->satDirectSubtransX; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_satDirectSyncX(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_satDirectSyncX(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->satDirectSyncX; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_satDirectTransX(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_satDirectTransX(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->satDirectTransX; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_shortCircuitRotorType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_shortCircuitRotorType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->shortCircuitRotorType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_voltageRegulationRange(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_voltageRegulationRange(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->voltageRegulationRange; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_x0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x0; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_SynchronousMachine_x2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->x2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_ReactiveCapabilityCurve_InitiallyUsedBySynchronousMachines(BaseClass*, BaseClass*); -bool assign_SynchronousMachine_InitialReactiveCapabilityCurve(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_SynchronousMachine_x2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); - ReactiveCapabilityCurve* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->InitialReactiveCapabilityCurve != element2) + buffer >> element->x2; + if (!buffer.fail()) { - element->InitialReactiveCapabilityCurve = element2; - return assign_ReactiveCapabilityCurve_InitiallyUsedBySynchronousMachines(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_SynchronousMachineDynamics_SynchronousMachine(BaseClass*, BaseClass*); -bool assign_SynchronousMachine_SynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool get_SynchronousMachine_InitialReactiveCapabilityCurve(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); - SynchronousMachineDynamics* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->SynchronousMachineDynamics != element2) + if (element->InitialReactiveCapabilityCurve != 0) { - element->SynchronousMachineDynamics = element2; - return assign_SynchronousMachineDynamics_SynchronousMachine(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->InitialReactiveCapabilityCurve); + return true; } - return true; } return false; } + bool get_SynchronousMachine_earthing(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->earthing; if (!buffer.str().empty()) @@ -410,7 +425,8 @@ bool get_SynchronousMachine_earthing(const BaseClass* BaseClass_ptr1, std::strin bool get_SynchronousMachine_earthingStarPointR(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->earthingStarPointR; if (!buffer.str().empty()) @@ -424,7 +440,8 @@ bool get_SynchronousMachine_earthingStarPointR(const BaseClass* BaseClass_ptr1, bool get_SynchronousMachine_earthingStarPointX(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->earthingStarPointX; if (!buffer.str().empty()) @@ -438,7 +455,8 @@ bool get_SynchronousMachine_earthingStarPointX(const BaseClass* BaseClass_ptr1, bool get_SynchronousMachine_ikk(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ikk; if (!buffer.str().empty()) @@ -452,7 +470,8 @@ bool get_SynchronousMachine_ikk(const BaseClass* BaseClass_ptr1, std::stringstre bool get_SynchronousMachine_maxQ(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxQ; if (!buffer.str().empty()) @@ -466,7 +485,8 @@ bool get_SynchronousMachine_maxQ(const BaseClass* BaseClass_ptr1, std::stringstr bool get_SynchronousMachine_minQ(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minQ; if (!buffer.str().empty()) @@ -480,7 +500,8 @@ bool get_SynchronousMachine_minQ(const BaseClass* BaseClass_ptr1, std::stringstr bool get_SynchronousMachine_mu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mu; if (!buffer.str().empty()) @@ -492,9 +513,25 @@ bool get_SynchronousMachine_mu(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } +bool get_SynchronousMachine_operatingMode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->operatingMode; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_SynchronousMachine_qPercent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qPercent; if (!buffer.str().empty()) @@ -508,7 +545,8 @@ bool get_SynchronousMachine_qPercent(const BaseClass* BaseClass_ptr1, std::strin bool get_SynchronousMachine_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -522,7 +560,8 @@ bool get_SynchronousMachine_r(const BaseClass* BaseClass_ptr1, std::stringstream bool get_SynchronousMachine_r0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r0; if (!buffer.str().empty()) @@ -536,7 +575,8 @@ bool get_SynchronousMachine_r0(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_SynchronousMachine_r2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r2; if (!buffer.str().empty()) @@ -550,7 +590,8 @@ bool get_SynchronousMachine_r2(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_SynchronousMachine_referencePriority(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->referencePriority; if (!buffer.str().empty()) @@ -564,7 +605,8 @@ bool get_SynchronousMachine_referencePriority(const BaseClass* BaseClass_ptr1, s bool get_SynchronousMachine_satDirectSubtransX(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->satDirectSubtransX; if (!buffer.str().empty()) @@ -578,7 +620,8 @@ bool get_SynchronousMachine_satDirectSubtransX(const BaseClass* BaseClass_ptr1, bool get_SynchronousMachine_satDirectSyncX(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->satDirectSyncX; if (!buffer.str().empty()) @@ -592,7 +635,8 @@ bool get_SynchronousMachine_satDirectSyncX(const BaseClass* BaseClass_ptr1, std: bool get_SynchronousMachine_satDirectTransX(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->satDirectTransX; if (!buffer.str().empty()) @@ -604,25 +648,12 @@ bool get_SynchronousMachine_satDirectTransX(const BaseClass* BaseClass_ptr1, std return false; } -bool get_SynchronousMachine_voltageRegulationRange(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->voltageRegulationRange; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - -bool get_SynchronousMachine_x0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachine_shortCircuitRotorType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->x0; + buffer << element->shortCircuitRotorType; if (!buffer.str().empty()) { return true; @@ -632,11 +663,12 @@ bool get_SynchronousMachine_x0(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } -bool get_SynchronousMachine_x2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachine_type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->x2; + buffer << element->type; if (!buffer.str().empty()) { return true; @@ -646,26 +678,12 @@ bool get_SynchronousMachine_x2(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } - -bool get_SynchronousMachine_InitialReactiveCapabilityCurve(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->InitialReactiveCapabilityCurve != 0) - { - BaseClass_list.push_back(element->InitialReactiveCapabilityCurve); - return true; - } - } - return false; -} - - -bool get_SynchronousMachine_operatingMode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachine_voltageRegulationRange(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->operatingMode; + buffer << element->voltageRegulationRange; if (!buffer.str().empty()) { return true; @@ -675,11 +693,12 @@ bool get_SynchronousMachine_operatingMode(const BaseClass* BaseClass_ptr1, std:: return false; } -bool get_SynchronousMachine_shortCircuitRotorType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachine_x0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->shortCircuitRotorType; + buffer << element->x0; if (!buffer.str().empty()) { return true; @@ -689,11 +708,12 @@ bool get_SynchronousMachine_shortCircuitRotorType(const BaseClass* BaseClass_ptr return false; } -bool get_SynchronousMachine_type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachine_x2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->type; + buffer << element->x2; if (!buffer.str().empty()) { return true; @@ -711,38 +731,38 @@ const char* SynchronousMachine::debugString() const void SynchronousMachine::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SynchronousMachine"), &SynchronousMachine_factory)); + factory_map.emplace("cim:SynchronousMachine", &SynchronousMachine_factory); } void SynchronousMachine::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.earthing"), &assign_SynchronousMachine_earthing)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.earthingStarPointR"), &assign_SynchronousMachine_earthingStarPointR)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.earthingStarPointX"), &assign_SynchronousMachine_earthingStarPointX)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.ikk"), &assign_SynchronousMachine_ikk)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.maxQ"), &assign_SynchronousMachine_maxQ)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.minQ"), &assign_SynchronousMachine_minQ)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.mu"), &assign_SynchronousMachine_mu)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.operatingMode"), &assign_SynchronousMachine_operatingMode)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.qPercent"), &assign_SynchronousMachine_qPercent)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.r"), &assign_SynchronousMachine_r)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.r0"), &assign_SynchronousMachine_r0)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.r2"), &assign_SynchronousMachine_r2)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.referencePriority"), &assign_SynchronousMachine_referencePriority)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.satDirectSubtransX"), &assign_SynchronousMachine_satDirectSubtransX)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.satDirectSyncX"), &assign_SynchronousMachine_satDirectSyncX)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.satDirectTransX"), &assign_SynchronousMachine_satDirectTransX)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.shortCircuitRotorType"), &assign_SynchronousMachine_shortCircuitRotorType)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.type"), &assign_SynchronousMachine_type)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.voltageRegulationRange"), &assign_SynchronousMachine_voltageRegulationRange)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.x0"), &assign_SynchronousMachine_x0)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.x2"), &assign_SynchronousMachine_x2)); + assign_map.emplace("cim:SynchronousMachine.earthing", &assign_SynchronousMachine_earthing); + assign_map.emplace("cim:SynchronousMachine.earthingStarPointR", &assign_SynchronousMachine_earthingStarPointR); + assign_map.emplace("cim:SynchronousMachine.earthingStarPointX", &assign_SynchronousMachine_earthingStarPointX); + assign_map.emplace("cim:SynchronousMachine.ikk", &assign_SynchronousMachine_ikk); + assign_map.emplace("cim:SynchronousMachine.maxQ", &assign_SynchronousMachine_maxQ); + assign_map.emplace("cim:SynchronousMachine.minQ", &assign_SynchronousMachine_minQ); + assign_map.emplace("cim:SynchronousMachine.mu", &assign_SynchronousMachine_mu); + assign_map.emplace("cim:SynchronousMachine.operatingMode", &assign_SynchronousMachine_operatingMode); + assign_map.emplace("cim:SynchronousMachine.qPercent", &assign_SynchronousMachine_qPercent); + assign_map.emplace("cim:SynchronousMachine.r", &assign_SynchronousMachine_r); + assign_map.emplace("cim:SynchronousMachine.r0", &assign_SynchronousMachine_r0); + assign_map.emplace("cim:SynchronousMachine.r2", &assign_SynchronousMachine_r2); + assign_map.emplace("cim:SynchronousMachine.referencePriority", &assign_SynchronousMachine_referencePriority); + assign_map.emplace("cim:SynchronousMachine.satDirectSubtransX", &assign_SynchronousMachine_satDirectSubtransX); + assign_map.emplace("cim:SynchronousMachine.satDirectSyncX", &assign_SynchronousMachine_satDirectSyncX); + assign_map.emplace("cim:SynchronousMachine.satDirectTransX", &assign_SynchronousMachine_satDirectTransX); + assign_map.emplace("cim:SynchronousMachine.shortCircuitRotorType", &assign_SynchronousMachine_shortCircuitRotorType); + assign_map.emplace("cim:SynchronousMachine.type", &assign_SynchronousMachine_type); + assign_map.emplace("cim:SynchronousMachine.voltageRegulationRange", &assign_SynchronousMachine_voltageRegulationRange); + assign_map.emplace("cim:SynchronousMachine.x0", &assign_SynchronousMachine_x0); + assign_map.emplace("cim:SynchronousMachine.x2", &assign_SynchronousMachine_x2); } void SynchronousMachine::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.InitialReactiveCapabilityCurve"), &assign_SynchronousMachine_InitialReactiveCapabilityCurve)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.SynchronousMachineDynamics"), &assign_SynchronousMachine_SynchronousMachineDynamics)); + assign_map.emplace("cim:SynchronousMachine.InitialReactiveCapabilityCurve", &assign_SynchronousMachine_InitialReactiveCapabilityCurve); + assign_map.emplace("cim:SynchronousMachine.SynchronousMachineDynamics", &assign_SynchronousMachine_SynchronousMachineDynamics); } void SynchronousMachine::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachine.hpp b/CGMES_2.4.13_18DEC2013/SynchronousMachine.hpp index 6af1d5ade..91fe2995e 100644 --- a/CGMES_2.4.13_18DEC2013/SynchronousMachine.hpp +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachine.hpp @@ -30,9 +30,7 @@ namespace CIMPP class ReactiveCapabilityCurve; class SynchronousMachineDynamics; - /* - An electromechanical device that operates with shaft rotating synchronously with the network. It is a single machine operating either as a generator or synchronous condenser or pump. - */ + /** \brief An electromechanical device that operates with shaft rotating synchronously with the network. It is a single machine operating either as a generator or synchronous condenser or pump. */ class SynchronousMachine : public RotatingMachine { public: @@ -40,29 +38,74 @@ namespace CIMPP SynchronousMachine(); ~SynchronousMachine() override; - CIMPP::ReactiveCapabilityCurve* InitialReactiveCapabilityCurve; /* Synchronous machines using this curve as default. Default: 0 */ - CIMPP::SynchronousMachineDynamics* SynchronousMachineDynamics; /* Synchronous machine dynamics model used to describe dynamic behavior of this synchronous machine. Default: 0 */ - CIMPP::Boolean earthing; /* Indicates whether or not the generator is earthed. Used for short circuit data exchange according to IEC 60909 Default: false */ - CIMPP::Resistance earthingStarPointR; /* Generator star point earthing resistance (Re). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::Reactance earthingStarPointX; /* Generator star point earthing reactance (Xe). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::CurrentFlow ikk; /* Steady-state short-circuit current (in A for the profile) of generator with compound excitation during 3-phase short circuit. - Ikk=0: Generator with no compound excitation. - Ikk?0: Generator with compound excitation. Ikk is used to calculate the minimum steady-state short-circuit current for generators with compound excitation (Section 4.6.1.2 in the IEC 60909-0) Used only for single fed short circuit on a generator. (Section 4.3.4.2. in the IEC 60909-0) Default: nullptr */ - CIMPP::ReactivePower maxQ; /* Maximum reactive power limit. This is the maximum (nameplate) limit for the unit. Default: nullptr */ - CIMPP::ReactivePower minQ; /* Minimum reactive power limit for the unit. Default: nullptr */ - CIMPP::Simple_Float mu; /* Factor to calculate the breaking current (Section 4.5.2.1 in the IEC 60909-0). Used only for single fed short circuit on a generator (Section 4.3.4.2. in the IEC 60909-0). Default: nullptr */ - CIMPP::SynchronousMachineOperatingMode operatingMode; /* Current mode of operation. Default: 0 */ - CIMPP::PerCent qPercent; /* Percent of the coordinated reactive control that comes from this machine. Default: nullptr */ - CIMPP::Resistance r; /* Equivalent resistance (RG) of generator. RG is considered for the calculation of all currents, except for the calculation of the peak current ip. Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::PU r0; /* Zero sequence resistance of the synchronous machine. Default: nullptr */ - CIMPP::PU r2; /* Negative sequence resistance. Default: nullptr */ - CIMPP::Integer referencePriority; /* Priority of unit for use as powerflow voltage phase angle reference bus selection. 0 = don t care (default) 1 = highest priority. 2 is less than 1 and so on. Default: 0 */ - CIMPP::PU satDirectSubtransX; /* Direct-axis subtransient reactance saturated, also known as Xd`sat. Default: nullptr */ - CIMPP::PU satDirectSyncX; /* Direct-axes saturated synchronous reactance (xdsat); reciprocal of short-circuit ration. Used for short circuit data exchange, only for single fed short circuit on a generator. (Section 4.3.4.2. in the IEC 60909-0). Default: nullptr */ - CIMPP::PU satDirectTransX; /* Saturated Direct-axis transient reactance. The attribute is primarily used for short circuit calculations according to ANSI. Default: nullptr */ - CIMPP::ShortCircuitRotorKind shortCircuitRotorType; /* Type of rotor, used by short circuit applications, only for single fed short circuit according to IEC 60909. Default: 0 */ - CIMPP::SynchronousMachineKind type; /* Modes that this synchronous machine can operate in. Default: 0 */ - CIMPP::PerCent voltageRegulationRange; /* Range of generator voltage regulation (PG in the IEC 60909-0) used for calculation of the impedance correction factor KG defined in IEC 60909-0 This attribute is used to describe the operating voltage of the generating unit. Default: nullptr */ - CIMPP::PU x0; /* Zero sequence reactance of the synchronous machine. Default: nullptr */ - CIMPP::PU x2; /* Negative sequence reactance. Default: nullptr */ + /** \brief Synchronous machines using this curve as default. Default: 0 */ + CIMPP::ReactiveCapabilityCurve* InitialReactiveCapabilityCurve; + + /** \brief Synchronous machine dynamics model used to describe dynamic behavior of this synchronous machine. Default: 0 */ + CIMPP::SynchronousMachineDynamics* SynchronousMachineDynamics; + + /** \brief Indicates whether or not the generator is earthed. Used for short circuit data exchange according to IEC 60909 Default: false */ + CIMPP::Boolean earthing; + + /** \brief Generator star point earthing resistance (Re). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::Resistance earthingStarPointR; + + /** \brief Generator star point earthing reactance (Xe). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::Reactance earthingStarPointX; + + /** \brief Steady-state short-circuit current (in A for the profile) of generator with compound excitation during 3-phase short circuit. - Ikk=0: Generator with no compound excitation. - Ikk?0: Generator with compound excitation. Ikk is used to calculate the minimum steady-state short-circuit current for generators with compound excitation (Section 4.6.1.2 in the IEC 60909-0) Used only for single fed short circuit on a generator. (Section 4.3.4.2. in the IEC 60909-0) Default: nullptr */ + CIMPP::CurrentFlow ikk; + + /** \brief Maximum reactive power limit. This is the maximum (nameplate) limit for the unit. Default: nullptr */ + CIMPP::ReactivePower maxQ; + + /** \brief Minimum reactive power limit for the unit. Default: nullptr */ + CIMPP::ReactivePower minQ; + + /** \brief Factor to calculate the breaking current (Section 4.5.2.1 in the IEC 60909-0). Used only for single fed short circuit on a generator (Section 4.3.4.2. in the IEC 60909-0). Default: nullptr */ + CIMPP::Simple_Float mu; + + /** \brief Current mode of operation. Default: 0 */ + CIMPP::SynchronousMachineOperatingMode operatingMode; + + /** \brief Percent of the coordinated reactive control that comes from this machine. Default: nullptr */ + CIMPP::PerCent qPercent; + + /** \brief Equivalent resistance (RG) of generator. RG is considered for the calculation of all currents, except for the calculation of the peak current ip. Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::Resistance r; + + /** \brief Zero sequence resistance of the synchronous machine. Default: nullptr */ + CIMPP::PU r0; + + /** \brief Negative sequence resistance. Default: nullptr */ + CIMPP::PU r2; + + /** \brief Priority of unit for use as powerflow voltage phase angle reference bus selection. 0 = don t care (default) 1 = highest priority. 2 is less than 1 and so on. Default: 0 */ + CIMPP::Integer referencePriority; + + /** \brief Direct-axis subtransient reactance saturated, also known as Xd`sat. Default: nullptr */ + CIMPP::PU satDirectSubtransX; + + /** \brief Direct-axes saturated synchronous reactance (xdsat); reciprocal of short-circuit ration. Used for short circuit data exchange, only for single fed short circuit on a generator. (Section 4.3.4.2. in the IEC 60909-0). Default: nullptr */ + CIMPP::PU satDirectSyncX; + + /** \brief Saturated Direct-axis transient reactance. The attribute is primarily used for short circuit calculations according to ANSI. Default: nullptr */ + CIMPP::PU satDirectTransX; + + /** \brief Type of rotor, used by short circuit applications, only for single fed short circuit according to IEC 60909. Default: 0 */ + CIMPP::ShortCircuitRotorKind shortCircuitRotorType; + + /** \brief Modes that this synchronous machine can operate in. Default: 0 */ + CIMPP::SynchronousMachineKind type; + + /** \brief Range of generator voltage regulation (PG in the IEC 60909-0) used for calculation of the impedance correction factor KG defined in IEC 60909-0 This attribute is used to describe the operating voltage of the generating unit. Default: nullptr */ + CIMPP::PerCent voltageRegulationRange; + + /** \brief Zero sequence reactance of the synchronous machine. Default: nullptr */ + CIMPP::PU x0; + + /** \brief Negative sequence reactance. Default: nullptr */ + CIMPP::PU x2; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachineDetailed.cpp b/CGMES_2.4.13_18DEC2013/SynchronousMachineDetailed.cpp index 97a329b93..b24f3e4d9 100644 --- a/CGMES_2.4.13_18DEC2013/SynchronousMachineDetailed.cpp +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachineDetailed.cpp @@ -8,16 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "IfdBaseKind.hpp" -#include "CurrentFlow.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -SynchronousMachineDetailed::SynchronousMachineDetailed() {}; -SynchronousMachineDetailed::~SynchronousMachineDetailed() {}; +SynchronousMachineDetailed::SynchronousMachineDetailed() {} +SynchronousMachineDetailed::~SynchronousMachineDetailed() {} static const std::list PossibleProfilesForClass = { @@ -48,77 +43,80 @@ SynchronousMachineDetailed::getPossibleProfilesForAttributes() const return map; } - -bool assign_SynchronousMachineDetailed_efdBaseRatio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineDetailed_efdBaseRatio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdBaseRatio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineDetailed_ifdBaseType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineDetailed_ifdBaseType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ifdBaseType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineDetailed_ifdBaseValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineDetailed_ifdBaseValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ifdBaseValue; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineDetailed_saturationFactor120QAxis(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineDetailed_saturationFactor120QAxis(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->saturationFactor120QAxis; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineDetailed_saturationFactorQAxis(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineDetailed_saturationFactorQAxis(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->saturationFactorQAxis; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_SynchronousMachineDetailed_efdBaseRatio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdBaseRatio; if (!buffer.str().empty()) @@ -130,11 +128,12 @@ bool get_SynchronousMachineDetailed_efdBaseRatio(const BaseClass* BaseClass_ptr1 return false; } -bool get_SynchronousMachineDetailed_ifdBaseValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineDetailed_ifdBaseType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->ifdBaseValue; + buffer << element->ifdBaseType; if (!buffer.str().empty()) { return true; @@ -144,11 +143,12 @@ bool get_SynchronousMachineDetailed_ifdBaseValue(const BaseClass* BaseClass_ptr1 return false; } -bool get_SynchronousMachineDetailed_saturationFactor120QAxis(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineDetailed_ifdBaseValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->saturationFactor120QAxis; + buffer << element->ifdBaseValue; if (!buffer.str().empty()) { return true; @@ -158,11 +158,12 @@ bool get_SynchronousMachineDetailed_saturationFactor120QAxis(const BaseClass* Ba return false; } -bool get_SynchronousMachineDetailed_saturationFactorQAxis(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineDetailed_saturationFactor120QAxis(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->saturationFactorQAxis; + buffer << element->saturationFactor120QAxis; if (!buffer.str().empty()) { return true; @@ -172,13 +173,12 @@ bool get_SynchronousMachineDetailed_saturationFactorQAxis(const BaseClass* BaseC return false; } - - -bool get_SynchronousMachineDetailed_ifdBaseType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineDetailed_saturationFactorQAxis(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->ifdBaseType; + buffer << element->saturationFactorQAxis; if (!buffer.str().empty()) { return true; @@ -196,16 +196,16 @@ const char* SynchronousMachineDetailed::debugString() const void SynchronousMachineDetailed::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SynchronousMachineDetailed"), &SynchronousMachineDetailed_factory)); + factory_map.emplace("cim:SynchronousMachineDetailed", &SynchronousMachineDetailed_factory); } void SynchronousMachineDetailed::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDetailed.efdBaseRatio"), &assign_SynchronousMachineDetailed_efdBaseRatio)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDetailed.ifdBaseType"), &assign_SynchronousMachineDetailed_ifdBaseType)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDetailed.ifdBaseValue"), &assign_SynchronousMachineDetailed_ifdBaseValue)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDetailed.saturationFactor120QAxis"), &assign_SynchronousMachineDetailed_saturationFactor120QAxis)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDetailed.saturationFactorQAxis"), &assign_SynchronousMachineDetailed_saturationFactorQAxis)); + assign_map.emplace("cim:SynchronousMachineDetailed.efdBaseRatio", &assign_SynchronousMachineDetailed_efdBaseRatio); + assign_map.emplace("cim:SynchronousMachineDetailed.ifdBaseType", &assign_SynchronousMachineDetailed_ifdBaseType); + assign_map.emplace("cim:SynchronousMachineDetailed.ifdBaseValue", &assign_SynchronousMachineDetailed_ifdBaseValue); + assign_map.emplace("cim:SynchronousMachineDetailed.saturationFactor120QAxis", &assign_SynchronousMachineDetailed_saturationFactor120QAxis); + assign_map.emplace("cim:SynchronousMachineDetailed.saturationFactorQAxis", &assign_SynchronousMachineDetailed_saturationFactorQAxis); } void SynchronousMachineDetailed::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachineDetailed.hpp b/CGMES_2.4.13_18DEC2013/SynchronousMachineDetailed.hpp index c50628bb3..877ee12bc 100644 --- a/CGMES_2.4.13_18DEC2013/SynchronousMachineDetailed.hpp +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachineDetailed.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - All synchronous machine detailed types use a subset of the same data parameters and input/output variables. The several variations differ in the following ways: It is not necessary for each simulation tool to have separate models for each of the model types. The same model can often be used for several types by alternative logic within the model. Also, differences in saturation representation may not result in significant model performance differences so model substitutions are often acceptable. - */ + /** \brief All synchronous machine detailed types use a subset of the same data parameters and input/output variables. The several variations differ in the following ways: It is not necessary for each simulation tool to have separate models for each of the model types. The same model can often be used for several types by alternative logic within the model. Also, differences in saturation representation may not result in significant model performance differences so model substitutions are often acceptable. */ class SynchronousMachineDetailed : public SynchronousMachineDynamics { public: @@ -29,11 +27,20 @@ namespace CIMPP SynchronousMachineDetailed(); ~SynchronousMachineDetailed() override; - CIMPP::Simple_Float efdBaseRatio; /* Ratio of Efd bases of exciter and generator models. Typical Value = 1. Default: nullptr */ - CIMPP::IfdBaseKind ifdBaseType; /* Excitation base system mode. Typical Value = ifag. Default: 0 */ - CIMPP::CurrentFlow ifdBaseValue; /* Ifd base current if .ifdBaseType = other. Not needed if .ifdBaseType not = other. Unit = A. Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float saturationFactor120QAxis; /* Q-axis saturation factor at 120% of rated terminal voltage (S12q) (>=S1q). Typical Value = 0.12. Default: nullptr */ - CIMPP::Simple_Float saturationFactorQAxis; /* Q-axis saturation factor at rated terminal voltage (S1q) (>= 0). Typical Value = 0.02. Default: nullptr */ + /** \brief Ratio of Efd bases of exciter and generator models. Typical Value = 1. Default: nullptr */ + CIMPP::Simple_Float efdBaseRatio; + + /** \brief Excitation base system mode. Typical Value = ifag. Default: 0 */ + CIMPP::IfdBaseKind ifdBaseType; + + /** \brief Ifd base current if .ifdBaseType = other. Not needed if .ifdBaseType not = other. Unit = A. Typical Value = 0. Default: nullptr */ + CIMPP::CurrentFlow ifdBaseValue; + + /** \brief Q-axis saturation factor at 120% of rated terminal voltage (S12q) (>=S1q). Typical Value = 0.12. Default: nullptr */ + CIMPP::Simple_Float saturationFactor120QAxis; + + /** \brief Q-axis saturation factor at rated terminal voltage (S1q) (>= 0). Typical Value = 0.02. Default: nullptr */ + CIMPP::Simple_Float saturationFactorQAxis; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachineDynamics.cpp b/CGMES_2.4.13_18DEC2013/SynchronousMachineDynamics.cpp index bb961da54..c26909c88 100644 --- a/CGMES_2.4.13_18DEC2013/SynchronousMachineDynamics.cpp +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachineDynamics.cpp @@ -16,8 +16,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -SynchronousMachineDynamics::SynchronousMachineDynamics() : ExcitationSystemDynamics(nullptr), MechanicalLoadDynamics(nullptr), SynchronousMachine(nullptr) {}; -SynchronousMachineDynamics::~SynchronousMachineDynamics() {}; +SynchronousMachineDynamics::SynchronousMachineDynamics() : ExcitationSystemDynamics(nullptr), MechanicalLoadDynamics(nullptr), SynchronousMachine(nullptr) {} +SynchronousMachineDynamics::~SynchronousMachineDynamics() {} static const std::list PossibleProfilesForClass = { @@ -48,8 +48,6 @@ SynchronousMachineDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_ExcitationSystemDynamics_SynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_SynchronousMachineDynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -66,6 +64,7 @@ bool assign_SynchronousMachineDynamics_ExcitationSystemDynamics(BaseClass* BaseC } return false; } + bool assign_GenICompensationForGenJ_SynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_SynchronousMachineDynamics_GenICompensationForGenJ(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -82,6 +81,7 @@ bool assign_SynchronousMachineDynamics_GenICompensationForGenJ(BaseClass* BaseCl } return false; } + bool assign_MechanicalLoadDynamics_SynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_SynchronousMachineDynamics_MechanicalLoadDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -98,6 +98,7 @@ bool assign_SynchronousMachineDynamics_MechanicalLoadDynamics(BaseClass* BaseCla } return false; } + bool assign_SynchronousMachine_SynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_SynchronousMachineDynamics_SynchronousMachine(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -114,6 +115,7 @@ bool assign_SynchronousMachineDynamics_SynchronousMachine(BaseClass* BaseClass_p } return false; } + bool assign_TurbineGovernorDynamics_SynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_SynchronousMachineDynamics_TurbineGovernorDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -132,9 +134,12 @@ bool assign_SynchronousMachineDynamics_TurbineGovernorDynamics(BaseClass* BaseCl } + + bool get_SynchronousMachineDynamics_SynchronousMachine(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SynchronousMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->SynchronousMachine != 0) { @@ -154,7 +159,7 @@ const char* SynchronousMachineDynamics::debugString() const void SynchronousMachineDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SynchronousMachineDynamics"), &SynchronousMachineDynamics_factory)); + factory_map.emplace("cim:SynchronousMachineDynamics", &SynchronousMachineDynamics_factory); } void SynchronousMachineDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -163,11 +168,11 @@ void SynchronousMachineDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDynamics.ExcitationSystemDynamics"), &assign_SynchronousMachineDynamics_ExcitationSystemDynamics)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDynamics.GenICompensationForGenJ"), &assign_SynchronousMachineDynamics_GenICompensationForGenJ)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDynamics.MechanicalLoadDynamics"), &assign_SynchronousMachineDynamics_MechanicalLoadDynamics)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDynamics.SynchronousMachine"), &assign_SynchronousMachineDynamics_SynchronousMachine)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDynamics.TurbineGovernorDynamics"), &assign_SynchronousMachineDynamics_TurbineGovernorDynamics)); + assign_map.emplace("cim:SynchronousMachineDynamics.ExcitationSystemDynamics", &assign_SynchronousMachineDynamics_ExcitationSystemDynamics); + assign_map.emplace("cim:SynchronousMachineDynamics.GenICompensationForGenJ", &assign_SynchronousMachineDynamics_GenICompensationForGenJ); + assign_map.emplace("cim:SynchronousMachineDynamics.MechanicalLoadDynamics", &assign_SynchronousMachineDynamics_MechanicalLoadDynamics); + assign_map.emplace("cim:SynchronousMachineDynamics.SynchronousMachine", &assign_SynchronousMachineDynamics_SynchronousMachine); + assign_map.emplace("cim:SynchronousMachineDynamics.TurbineGovernorDynamics", &assign_SynchronousMachineDynamics_TurbineGovernorDynamics); } void SynchronousMachineDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachineDynamics.hpp b/CGMES_2.4.13_18DEC2013/SynchronousMachineDynamics.hpp index b3b34f00b..77e6df94e 100644 --- a/CGMES_2.4.13_18DEC2013/SynchronousMachineDynamics.hpp +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachineDynamics.hpp @@ -21,9 +21,7 @@ namespace CIMPP class SynchronousMachine; class TurbineGovernorDynamics; - /* - Synchronous machine whose behaviour is described by reference to a standard model expressed in one of the following forms: - */ + /** \brief Synchronous machine whose behaviour is described by reference to a standard model expressed in one of the following forms: */ class SynchronousMachineDynamics : public RotatingMachineDynamics { public: @@ -31,11 +29,20 @@ namespace CIMPP SynchronousMachineDynamics(); ~SynchronousMachineDynamics() override; - CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; /* Excitation system model associated with this synchronous machine model. Default: 0 */ - std::list GenICompensationForGenJ; /* Compensation of voltage compensator`s generator for current flow out of this generator. Default: 0 */ - CIMPP::MechanicalLoadDynamics* MechanicalLoadDynamics; /* Mechanical load model associated with this synchronous machine model. Default: 0 */ - CIMPP::SynchronousMachine* SynchronousMachine; /* Synchronous machine to which synchronous machine dynamics model applies. Default: 0 */ - std::list TurbineGovernorDynamics; /* Synchronous machine model with which this turbine-governor model is associated. Default: 0 */ + /** \brief Excitation system model associated with this synchronous machine model. Default: 0 */ + CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; + + /** \brief Compensation of voltage compensator`s generator for current flow out of this generator. Default: 0 */ + std::list GenICompensationForGenJ; + + /** \brief Mechanical load model associated with this synchronous machine model. Default: 0 */ + CIMPP::MechanicalLoadDynamics* MechanicalLoadDynamics; + + /** \brief Synchronous machine to which synchronous machine dynamics model applies. Default: 0 */ + CIMPP::SynchronousMachine* SynchronousMachine; + + /** \brief Synchronous machine model with which this turbine-governor model is associated. Default: 0 */ + std::list TurbineGovernorDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachineEquivalentCircuit.cpp b/CGMES_2.4.13_18DEC2013/SynchronousMachineEquivalentCircuit.cpp index b64fe290e..7ef58f9f7 100644 --- a/CGMES_2.4.13_18DEC2013/SynchronousMachineEquivalentCircuit.cpp +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachineEquivalentCircuit.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -SynchronousMachineEquivalentCircuit::SynchronousMachineEquivalentCircuit() {}; -SynchronousMachineEquivalentCircuit::~SynchronousMachineEquivalentCircuit() {}; +SynchronousMachineEquivalentCircuit::SynchronousMachineEquivalentCircuit() {} +SynchronousMachineEquivalentCircuit::~SynchronousMachineEquivalentCircuit() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ SynchronousMachineEquivalentCircuit::getPossibleProfilesForAttributes() const return map; } - -bool assign_SynchronousMachineEquivalentCircuit_r1d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_r1d(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r1d; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_r1q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_r1q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r1q; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_r2q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_r2q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r2q; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_rfd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_rfd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rfd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_x1d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_x1d(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x1d; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_x1q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_x1q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x1q; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_x2q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_x2q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x2q; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_xad(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_xad(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xad; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_xaq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_xaq(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xaq; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_xf1d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_xf1d(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xf1d; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_xfd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_xfd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xfd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_SynchronousMachineEquivalentCircuit_r1d(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r1d; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_SynchronousMachineEquivalentCircuit_r1d(const BaseClass* BaseClass_ptr1 bool get_SynchronousMachineEquivalentCircuit_r1q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r1q; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_SynchronousMachineEquivalentCircuit_r1q(const BaseClass* BaseClass_ptr1 bool get_SynchronousMachineEquivalentCircuit_r2q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r2q; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_SynchronousMachineEquivalentCircuit_r2q(const BaseClass* BaseClass_ptr1 bool get_SynchronousMachineEquivalentCircuit_rfd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rfd; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_SynchronousMachineEquivalentCircuit_rfd(const BaseClass* BaseClass_ptr1 bool get_SynchronousMachineEquivalentCircuit_x1d(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x1d; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_SynchronousMachineEquivalentCircuit_x1d(const BaseClass* BaseClass_ptr1 bool get_SynchronousMachineEquivalentCircuit_x1q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x1q; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_SynchronousMachineEquivalentCircuit_x1q(const BaseClass* BaseClass_ptr1 bool get_SynchronousMachineEquivalentCircuit_x2q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x2q; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_SynchronousMachineEquivalentCircuit_x2q(const BaseClass* BaseClass_ptr1 bool get_SynchronousMachineEquivalentCircuit_xad(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xad; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_SynchronousMachineEquivalentCircuit_xad(const BaseClass* BaseClass_ptr1 bool get_SynchronousMachineEquivalentCircuit_xaq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xaq; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_SynchronousMachineEquivalentCircuit_xaq(const BaseClass* BaseClass_ptr1 bool get_SynchronousMachineEquivalentCircuit_xf1d(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xf1d; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_SynchronousMachineEquivalentCircuit_xf1d(const BaseClass* BaseClass_ptr bool get_SynchronousMachineEquivalentCircuit_xfd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xfd; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_SynchronousMachineEquivalentCircuit_xfd(const BaseClass* BaseClass_ptr1 return false; } - - const char SynchronousMachineEquivalentCircuit::debugName[] = "SynchronousMachineEquivalentCircuit"; const char* SynchronousMachineEquivalentCircuit::debugString() const { @@ -370,22 +376,22 @@ const char* SynchronousMachineEquivalentCircuit::debugString() const void SynchronousMachineEquivalentCircuit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit"), &SynchronousMachineEquivalentCircuit_factory)); + factory_map.emplace("cim:SynchronousMachineEquivalentCircuit", &SynchronousMachineEquivalentCircuit_factory); } void SynchronousMachineEquivalentCircuit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.r1d"), &assign_SynchronousMachineEquivalentCircuit_r1d)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.r1q"), &assign_SynchronousMachineEquivalentCircuit_r1q)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.r2q"), &assign_SynchronousMachineEquivalentCircuit_r2q)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.rfd"), &assign_SynchronousMachineEquivalentCircuit_rfd)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.x1d"), &assign_SynchronousMachineEquivalentCircuit_x1d)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.x1q"), &assign_SynchronousMachineEquivalentCircuit_x1q)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.x2q"), &assign_SynchronousMachineEquivalentCircuit_x2q)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.xad"), &assign_SynchronousMachineEquivalentCircuit_xad)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.xaq"), &assign_SynchronousMachineEquivalentCircuit_xaq)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.xf1d"), &assign_SynchronousMachineEquivalentCircuit_xf1d)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.xfd"), &assign_SynchronousMachineEquivalentCircuit_xfd)); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.r1d", &assign_SynchronousMachineEquivalentCircuit_r1d); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.r1q", &assign_SynchronousMachineEquivalentCircuit_r1q); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.r2q", &assign_SynchronousMachineEquivalentCircuit_r2q); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.rfd", &assign_SynchronousMachineEquivalentCircuit_rfd); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.x1d", &assign_SynchronousMachineEquivalentCircuit_x1d); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.x1q", &assign_SynchronousMachineEquivalentCircuit_x1q); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.x2q", &assign_SynchronousMachineEquivalentCircuit_x2q); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.xad", &assign_SynchronousMachineEquivalentCircuit_xad); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.xaq", &assign_SynchronousMachineEquivalentCircuit_xaq); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.xf1d", &assign_SynchronousMachineEquivalentCircuit_xf1d); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.xfd", &assign_SynchronousMachineEquivalentCircuit_xfd); } void SynchronousMachineEquivalentCircuit::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachineEquivalentCircuit.hpp b/CGMES_2.4.13_18DEC2013/SynchronousMachineEquivalentCircuit.hpp index 7df6c9f41..bc55bc9cd 100644 --- a/CGMES_2.4.13_18DEC2013/SynchronousMachineEquivalentCircuit.hpp +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachineEquivalentCircuit.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The electrical equations for all variations of the synchronous models are based on the SynchronousEquivalentCircuit diagram for the direct and quadrature axes. = + = + * / ( + ) = + * * / ( * + * + * ) = + = + * / (+ ) = + ** / ( * + * + * ) = ( + ) / ( * ) = ( * + * + * ) / ( * * ( + ) = ( + ) / ( * ) = ( * + * + * )/ ( * * ( + ) Same equations using CIM attributes from SynchronousMachineTimeConstantReactance class on left of = sign and SynchronousMachineEquivalentCircuit class on right (except as noted): xDirectSync = xad + RotatingMachineDynamics.statorLeakageReactance xDirectTrans = RotatingMachineDynamics.statorLeakageReactance + xad * xfd / (xad + xfd) xDirectSubtrans = RotatingMachineDynamics.statorLeakageReactance + xad * xfd * x1d / (xad * xfd + xad * x1d + xfd * x1d) xQuadSync = xaq + RotatingMachineDynamics.statorLeakageReactance xQuadTrans = RotatingMachineDynamics.statorLeakageReactance + xaq * x1q / (xaq+ x1q) xQuadSubtrans = RotatingMachineDynamics.statorLeakageReactance + xaq * x1q* x2q / (xaq * x1q + xaq * x2q + x1q * x2q) tpdo = (xad + xfd) / (2*pi*nominal frequency * rfd) tppdo = (xad * xfd + xad * x1d + xfd * x1d) / (2*pi*nominal frequency * r1d * (xad + xfd) tpqo = (xaq + x1q) / (2*pi*nominal frequency * r1q) tppqo = (xaq * x1q + xaq * x2q + x1q * x2q)/ (2*pi*nominal frequency * r2q * (xaq + x1q). Are only valid for a simplified model where "Canay" reactance is zero. - */ + /** \brief The electrical equations for all variations of the synchronous models are based on the SynchronousEquivalentCircuit diagram for the direct and quadrature axes. = + = + * / ( + ) = + * * / ( * + * + * ) = + = + * / (+ ) = + ** / ( * + * + * ) = ( + ) / ( * ) = ( * + * + * ) / ( * * ( + ) = ( + ) / ( * ) = ( * + * + * )/ ( * * ( + ) Same equations using CIM attributes from SynchronousMachineTimeConstantReactance class on left of = sign and SynchronousMachineEquivalentCircuit class on right (except as noted): xDirectSync = xad + RotatingMachineDynamics.statorLeakageReactance xDirectTrans = RotatingMachineDynamics.statorLeakageReactance + xad * xfd / (xad + xfd) xDirectSubtrans = RotatingMachineDynamics.statorLeakageReactance + xad * xfd * x1d / (xad * xfd + xad * x1d + xfd * x1d) xQuadSync = xaq + RotatingMachineDynamics.statorLeakageReactance xQuadTrans = RotatingMachineDynamics.statorLeakageReactance + xaq * x1q / (xaq+ x1q) xQuadSubtrans = RotatingMachineDynamics.statorLeakageReactance + xaq * x1q* x2q / (xaq * x1q + xaq * x2q + x1q * x2q) tpdo = (xad + xfd) / (2*pi*nominal frequency * rfd) tppdo = (xad * xfd + xad * x1d + xfd * x1d) / (2*pi*nominal frequency * r1d * (xad + xfd) tpqo = (xaq + x1q) / (2*pi*nominal frequency * r1q) tppqo = (xaq * x1q + xaq * x2q + x1q * x2q)/ (2*pi*nominal frequency * r2q * (xaq + x1q). Are only valid for a simplified model where "Canay" reactance is zero. */ class SynchronousMachineEquivalentCircuit : public SynchronousMachineDetailed { public: @@ -27,17 +25,38 @@ namespace CIMPP SynchronousMachineEquivalentCircuit(); ~SynchronousMachineEquivalentCircuit() override; - CIMPP::PU r1d; /* D-axis damper 1 winding resistance. Default: nullptr */ - CIMPP::PU r1q; /* Q-axis damper 1 winding resistance. Default: nullptr */ - CIMPP::PU r2q; /* Q-axis damper 2 winding resistance. Default: nullptr */ - CIMPP::PU rfd; /* Field winding resistance. Default: nullptr */ - CIMPP::PU x1d; /* D-axis damper 1 winding leakage reactance. Default: nullptr */ - CIMPP::PU x1q; /* Q-axis damper 1 winding leakage reactance. Default: nullptr */ - CIMPP::PU x2q; /* Q-axis damper 2 winding leakage reactance. Default: nullptr */ - CIMPP::PU xad; /* D-axis mutual reactance. Default: nullptr */ - CIMPP::PU xaq; /* Q-axis mutual reactance. Default: nullptr */ - CIMPP::PU xf1d; /* Differential mutual (`Canay`) reactance. Default: nullptr */ - CIMPP::PU xfd; /* Field winding leakage reactance. Default: nullptr */ + /** \brief D-axis damper 1 winding resistance. Default: nullptr */ + CIMPP::PU r1d; + + /** \brief Q-axis damper 1 winding resistance. Default: nullptr */ + CIMPP::PU r1q; + + /** \brief Q-axis damper 2 winding resistance. Default: nullptr */ + CIMPP::PU r2q; + + /** \brief Field winding resistance. Default: nullptr */ + CIMPP::PU rfd; + + /** \brief D-axis damper 1 winding leakage reactance. Default: nullptr */ + CIMPP::PU x1d; + + /** \brief Q-axis damper 1 winding leakage reactance. Default: nullptr */ + CIMPP::PU x1q; + + /** \brief Q-axis damper 2 winding leakage reactance. Default: nullptr */ + CIMPP::PU x2q; + + /** \brief D-axis mutual reactance. Default: nullptr */ + CIMPP::PU xad; + + /** \brief Q-axis mutual reactance. Default: nullptr */ + CIMPP::PU xaq; + + /** \brief Differential mutual (`Canay`) reactance. Default: nullptr */ + CIMPP::PU xf1d; + + /** \brief Field winding leakage reactance. Default: nullptr */ + CIMPP::PU xfd; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachineKind.cpp b/CGMES_2.4.13_18DEC2013/SynchronousMachineKind.cpp index 55bd958b0..26781d9bd 100644 --- a/CGMES_2.4.13_18DEC2013/SynchronousMachineKind.cpp +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachineKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "SynchronousMachineKind") + if (EnumSymbol.substr(0, pos) != "SynchronousMachineKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,37 +50,37 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "generator") + if (EnumSymbol == "generator") { rop = SynchronousMachineKind::generator; return lop; } - if(EnumSymbol == "condenser") + if (EnumSymbol == "condenser") { rop = SynchronousMachineKind::condenser; return lop; } - if(EnumSymbol == "generatorOrCondenser") + if (EnumSymbol == "generatorOrCondenser") { rop = SynchronousMachineKind::generatorOrCondenser; return lop; } - if(EnumSymbol == "motor") + if (EnumSymbol == "motor") { rop = SynchronousMachineKind::motor; return lop; } - if(EnumSymbol == "generatorOrMotor") + if (EnumSymbol == "generatorOrMotor") { rop = SynchronousMachineKind::generatorOrMotor; return lop; } - if(EnumSymbol == "motorOrCondenser") + if (EnumSymbol == "motorOrCondenser") { rop = SynchronousMachineKind::motorOrCondenser; return lop; } - if(EnumSymbol == "generatorOrCondenserOrMotor") + if (EnumSymbol == "generatorOrCondenserOrMotor") { rop = SynchronousMachineKind::generatorOrCondenserOrMotor; return lop; diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachineKind.hpp b/CGMES_2.4.13_18DEC2013/SynchronousMachineKind.hpp index 9b3eaf71b..fa2868489 100644 --- a/CGMES_2.4.13_18DEC2013/SynchronousMachineKind.hpp +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachineKind.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Synchronous machine type. - */ + /** \brief Synchronous machine type. */ class SynchronousMachineKind { public: diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachineModelKind.cpp b/CGMES_2.4.13_18DEC2013/SynchronousMachineModelKind.cpp index 10460ede1..761cee9cb 100644 --- a/CGMES_2.4.13_18DEC2013/SynchronousMachineModelKind.cpp +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachineModelKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "SynchronousMachineModelKind") + if (EnumSymbol.substr(0, pos) != "SynchronousMachineModelKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,27 +50,27 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "subtransient") + if (EnumSymbol == "subtransient") { rop = SynchronousMachineModelKind::subtransient; return lop; } - if(EnumSymbol == "subtransientTypeF") + if (EnumSymbol == "subtransientTypeF") { rop = SynchronousMachineModelKind::subtransientTypeF; return lop; } - if(EnumSymbol == "subtransientTypeJ") + if (EnumSymbol == "subtransientTypeJ") { rop = SynchronousMachineModelKind::subtransientTypeJ; return lop; } - if(EnumSymbol == "subtransientSimplified") + if (EnumSymbol == "subtransientSimplified") { rop = SynchronousMachineModelKind::subtransientSimplified; return lop; } - if(EnumSymbol == "subtransientSimplifiedDirectAxis") + if (EnumSymbol == "subtransientSimplifiedDirectAxis") { rop = SynchronousMachineModelKind::subtransientSimplifiedDirectAxis; return lop; diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachineModelKind.hpp b/CGMES_2.4.13_18DEC2013/SynchronousMachineModelKind.hpp index 06da8b2b5..fadb85ac5 100644 --- a/CGMES_2.4.13_18DEC2013/SynchronousMachineModelKind.hpp +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachineModelKind.hpp @@ -9,33 +9,21 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of synchronous machine model used in Dynamic simulation applications. - */ + /** \brief Type of synchronous machine model used in Dynamic simulation applications. */ class SynchronousMachineModelKind { public: enum SynchronousMachineModelKind_ENUM { - /** - * Subtransient synchronous machine model. - */ + /** Subtransient synchronous machine model. */ subtransient, - /** - * WECC Type F variant of subtransient synchronous machine model. - */ + /** WECC Type F variant of subtransient synchronous machine model. */ subtransientTypeF, - /** - * WECC Type J variant of subtransient synchronous machine model. - */ + /** WECC Type J variant of subtransient synchronous machine model. */ subtransientTypeJ, - /** - * Simplified version of subtransient synchronous machine model where magnetic coupling between the direct and quadrature axes is ignored. - */ + /** Simplified version of subtransient synchronous machine model where magnetic coupling between the direct and quadrature axes is ignored. */ subtransientSimplified, - /** - * Simplified version of a subtransient synchronous machine model with no damper circuit on d-axis. - */ + /** Simplified version of a subtransient synchronous machine model with no damper circuit on d-axis. */ subtransientSimplifiedDirectAxis, }; diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachineOperatingMode.cpp b/CGMES_2.4.13_18DEC2013/SynchronousMachineOperatingMode.cpp index 92b1e2cc3..bca6dbe66 100644 --- a/CGMES_2.4.13_18DEC2013/SynchronousMachineOperatingMode.cpp +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachineOperatingMode.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "SynchronousMachineOperatingMode") + if (EnumSymbol.substr(0, pos) != "SynchronousMachineOperatingMode") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "generator") + if (EnumSymbol == "generator") { rop = SynchronousMachineOperatingMode::generator; return lop; } - if(EnumSymbol == "condenser") + if (EnumSymbol == "condenser") { rop = SynchronousMachineOperatingMode::condenser; return lop; } - if(EnumSymbol == "motor") + if (EnumSymbol == "motor") { rop = SynchronousMachineOperatingMode::motor; return lop; diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachineOperatingMode.hpp b/CGMES_2.4.13_18DEC2013/SynchronousMachineOperatingMode.hpp index 464590a5b..1272878d5 100644 --- a/CGMES_2.4.13_18DEC2013/SynchronousMachineOperatingMode.hpp +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachineOperatingMode.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Synchronous machine operating mode. - */ + /** \brief Synchronous machine operating mode. */ class SynchronousMachineOperatingMode { public: diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachineSimplified.cpp b/CGMES_2.4.13_18DEC2013/SynchronousMachineSimplified.cpp index 78f5ae00d..565a93b19 100644 --- a/CGMES_2.4.13_18DEC2013/SynchronousMachineSimplified.cpp +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachineSimplified.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -SynchronousMachineSimplified::SynchronousMachineSimplified() {}; -SynchronousMachineSimplified::~SynchronousMachineSimplified() {}; +SynchronousMachineSimplified::SynchronousMachineSimplified() {} +SynchronousMachineSimplified::~SynchronousMachineSimplified() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ SynchronousMachineSimplified::getPossibleProfilesForAttributes() const return map; } - - - - - const char SynchronousMachineSimplified::debugName[] = "SynchronousMachineSimplified"; const char* SynchronousMachineSimplified::debugString() const { @@ -51,7 +46,7 @@ const char* SynchronousMachineSimplified::debugString() const void SynchronousMachineSimplified::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SynchronousMachineSimplified"), &SynchronousMachineSimplified_factory)); + factory_map.emplace("cim:SynchronousMachineSimplified", &SynchronousMachineSimplified_factory); } void SynchronousMachineSimplified::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachineSimplified.hpp b/CGMES_2.4.13_18DEC2013/SynchronousMachineSimplified.hpp index 4523e6baf..0de0ea229 100644 --- a/CGMES_2.4.13_18DEC2013/SynchronousMachineSimplified.hpp +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachineSimplified.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The simplified model represents a synchronous generator as a constant internal voltage behind an impedance ( + ) as shown in the Simplified diagram. Since internal voltage is held constant, there is no input and any excitation system model will be ignored. There is also no output. This model should not be used for representing a real generator except, perhaps, small generators whose response is insignificant. The parameters used for the Simplified model include: - */ + /** \brief The simplified model represents a synchronous generator as a constant internal voltage behind an impedance ( + ) as shown in the Simplified diagram. Since internal voltage is held constant, there is no input and any excitation system model will be ignored. There is also no output. This model should not be used for representing a real generator except, perhaps, small generators whose response is insignificant. The parameters used for the Simplified model include: */ class SynchronousMachineSimplified : public SynchronousMachineDynamics { public: @@ -26,7 +24,6 @@ namespace CIMPP SynchronousMachineSimplified(); ~SynchronousMachineSimplified() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachineTimeConstantReactance.cpp b/CGMES_2.4.13_18DEC2013/SynchronousMachineTimeConstantReactance.cpp index 39c775b65..0abb79508 100644 --- a/CGMES_2.4.13_18DEC2013/SynchronousMachineTimeConstantReactance.cpp +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachineTimeConstantReactance.cpp @@ -8,25 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "SynchronousMachineModelKind.hpp" -#include "RotorKind.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -SynchronousMachineTimeConstantReactance::SynchronousMachineTimeConstantReactance() {}; -SynchronousMachineTimeConstantReactance::~SynchronousMachineTimeConstantReactance() {}; +SynchronousMachineTimeConstantReactance::SynchronousMachineTimeConstantReactance() {} +SynchronousMachineTimeConstantReactance::~SynchronousMachineTimeConstantReactance() {} static const std::list PossibleProfilesForClass = { @@ -66,194 +52,206 @@ SynchronousMachineTimeConstantReactance::getPossibleProfilesForAttributes() cons return map; } - -bool assign_SynchronousMachineTimeConstantReactance_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_modelType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_modelType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->modelType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_rotorType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_rotorType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rotorType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_tpdo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_tpdo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpdo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_tppdo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_tppdo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tppdo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_tppqo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_tppqo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tppqo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_tpqo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_tpqo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpqo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_xDirectSubtrans(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_xDirectSubtrans(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xDirectSubtrans; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_xDirectSync(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_xDirectSync(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xDirectSync; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_xDirectTrans(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_xDirectTrans(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xDirectTrans; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_xQuadSubtrans(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_xQuadSubtrans(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xQuadSubtrans; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_xQuadSync(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_xQuadSync(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xQuadSync; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_xQuadTrans(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_xQuadTrans(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xQuadTrans; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_SynchronousMachineTimeConstantReactance_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -265,11 +263,12 @@ bool get_SynchronousMachineTimeConstantReactance_ks(const BaseClass* BaseClass_p return false; } -bool get_SynchronousMachineTimeConstantReactance_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_modelType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tc; + buffer << element->modelType; if (!buffer.str().empty()) { return true; @@ -279,11 +278,12 @@ bool get_SynchronousMachineTimeConstantReactance_tc(const BaseClass* BaseClass_p return false; } -bool get_SynchronousMachineTimeConstantReactance_tpdo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_rotorType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tpdo; + buffer << element->rotorType; if (!buffer.str().empty()) { return true; @@ -293,11 +293,12 @@ bool get_SynchronousMachineTimeConstantReactance_tpdo(const BaseClass* BaseClass return false; } -bool get_SynchronousMachineTimeConstantReactance_tppdo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tppdo; + buffer << element->tc; if (!buffer.str().empty()) { return true; @@ -307,11 +308,12 @@ bool get_SynchronousMachineTimeConstantReactance_tppdo(const BaseClass* BaseClas return false; } -bool get_SynchronousMachineTimeConstantReactance_tppqo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_tpdo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tppqo; + buffer << element->tpdo; if (!buffer.str().empty()) { return true; @@ -321,11 +323,12 @@ bool get_SynchronousMachineTimeConstantReactance_tppqo(const BaseClass* BaseClas return false; } -bool get_SynchronousMachineTimeConstantReactance_tpqo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_tppdo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tpqo; + buffer << element->tppdo; if (!buffer.str().empty()) { return true; @@ -335,11 +338,12 @@ bool get_SynchronousMachineTimeConstantReactance_tpqo(const BaseClass* BaseClass return false; } -bool get_SynchronousMachineTimeConstantReactance_xDirectSubtrans(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_tppqo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xDirectSubtrans; + buffer << element->tppqo; if (!buffer.str().empty()) { return true; @@ -349,11 +353,12 @@ bool get_SynchronousMachineTimeConstantReactance_xDirectSubtrans(const BaseClass return false; } -bool get_SynchronousMachineTimeConstantReactance_xDirectSync(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_tpqo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xDirectSync; + buffer << element->tpqo; if (!buffer.str().empty()) { return true; @@ -363,11 +368,12 @@ bool get_SynchronousMachineTimeConstantReactance_xDirectSync(const BaseClass* Ba return false; } -bool get_SynchronousMachineTimeConstantReactance_xDirectTrans(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_xDirectSubtrans(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xDirectTrans; + buffer << element->xDirectSubtrans; if (!buffer.str().empty()) { return true; @@ -377,11 +383,12 @@ bool get_SynchronousMachineTimeConstantReactance_xDirectTrans(const BaseClass* B return false; } -bool get_SynchronousMachineTimeConstantReactance_xQuadSubtrans(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_xDirectSync(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xQuadSubtrans; + buffer << element->xDirectSync; if (!buffer.str().empty()) { return true; @@ -391,11 +398,12 @@ bool get_SynchronousMachineTimeConstantReactance_xQuadSubtrans(const BaseClass* return false; } -bool get_SynchronousMachineTimeConstantReactance_xQuadSync(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_xDirectTrans(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xQuadSync; + buffer << element->xDirectTrans; if (!buffer.str().empty()) { return true; @@ -405,11 +413,12 @@ bool get_SynchronousMachineTimeConstantReactance_xQuadSync(const BaseClass* Base return false; } -bool get_SynchronousMachineTimeConstantReactance_xQuadTrans(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_xQuadSubtrans(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xQuadTrans; + buffer << element->xQuadSubtrans; if (!buffer.str().empty()) { return true; @@ -419,13 +428,12 @@ bool get_SynchronousMachineTimeConstantReactance_xQuadTrans(const BaseClass* Bas return false; } - - -bool get_SynchronousMachineTimeConstantReactance_modelType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_xQuadSync(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->modelType; + buffer << element->xQuadSync; if (!buffer.str().empty()) { return true; @@ -435,11 +443,12 @@ bool get_SynchronousMachineTimeConstantReactance_modelType(const BaseClass* Base return false; } -bool get_SynchronousMachineTimeConstantReactance_rotorType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_xQuadTrans(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->rotorType; + buffer << element->xQuadTrans; if (!buffer.str().empty()) { return true; @@ -457,25 +466,25 @@ const char* SynchronousMachineTimeConstantReactance::debugString() const void SynchronousMachineTimeConstantReactance::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance"), &SynchronousMachineTimeConstantReactance_factory)); + factory_map.emplace("cim:SynchronousMachineTimeConstantReactance", &SynchronousMachineTimeConstantReactance_factory); } void SynchronousMachineTimeConstantReactance::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.ks"), &assign_SynchronousMachineTimeConstantReactance_ks)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.modelType"), &assign_SynchronousMachineTimeConstantReactance_modelType)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.rotorType"), &assign_SynchronousMachineTimeConstantReactance_rotorType)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.tc"), &assign_SynchronousMachineTimeConstantReactance_tc)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.tpdo"), &assign_SynchronousMachineTimeConstantReactance_tpdo)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.tppdo"), &assign_SynchronousMachineTimeConstantReactance_tppdo)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.tppqo"), &assign_SynchronousMachineTimeConstantReactance_tppqo)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.tpqo"), &assign_SynchronousMachineTimeConstantReactance_tpqo)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.xDirectSubtrans"), &assign_SynchronousMachineTimeConstantReactance_xDirectSubtrans)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.xDirectSync"), &assign_SynchronousMachineTimeConstantReactance_xDirectSync)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.xDirectTrans"), &assign_SynchronousMachineTimeConstantReactance_xDirectTrans)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.xQuadSubtrans"), &assign_SynchronousMachineTimeConstantReactance_xQuadSubtrans)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.xQuadSync"), &assign_SynchronousMachineTimeConstantReactance_xQuadSync)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.xQuadTrans"), &assign_SynchronousMachineTimeConstantReactance_xQuadTrans)); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.ks", &assign_SynchronousMachineTimeConstantReactance_ks); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.modelType", &assign_SynchronousMachineTimeConstantReactance_modelType); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.rotorType", &assign_SynchronousMachineTimeConstantReactance_rotorType); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.tc", &assign_SynchronousMachineTimeConstantReactance_tc); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.tpdo", &assign_SynchronousMachineTimeConstantReactance_tpdo); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.tppdo", &assign_SynchronousMachineTimeConstantReactance_tppdo); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.tppqo", &assign_SynchronousMachineTimeConstantReactance_tppqo); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.tpqo", &assign_SynchronousMachineTimeConstantReactance_tpqo); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.xDirectSubtrans", &assign_SynchronousMachineTimeConstantReactance_xDirectSubtrans); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.xDirectSync", &assign_SynchronousMachineTimeConstantReactance_xDirectSync); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.xDirectTrans", &assign_SynchronousMachineTimeConstantReactance_xDirectTrans); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.xQuadSubtrans", &assign_SynchronousMachineTimeConstantReactance_xQuadSubtrans); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.xQuadSync", &assign_SynchronousMachineTimeConstantReactance_xQuadSync); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.xQuadTrans", &assign_SynchronousMachineTimeConstantReactance_xQuadTrans); } void SynchronousMachineTimeConstantReactance::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachineTimeConstantReactance.hpp b/CGMES_2.4.13_18DEC2013/SynchronousMachineTimeConstantReactance.hpp index 8d9ac309a..51a881b24 100644 --- a/CGMES_2.4.13_18DEC2013/SynchronousMachineTimeConstantReactance.hpp +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachineTimeConstantReactance.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Synchronous machine detailed modelling types are defined by the combination of the attributes SynchronousMachineTimeConstantReactance.modelType and SynchronousMachineTimeConstantReactance.rotorType. The parameters used for models expressed in time constant reactance form include: - */ + /** \brief Synchronous machine detailed modelling types are defined by the combination of the attributes SynchronousMachineTimeConstantReactance.modelType and SynchronousMachineTimeConstantReactance.rotorType. The parameters used for models expressed in time constant reactance form include: */ class SynchronousMachineTimeConstantReactance : public SynchronousMachineDetailed { public: @@ -31,20 +29,47 @@ namespace CIMPP SynchronousMachineTimeConstantReactance(); ~SynchronousMachineTimeConstantReactance() override; - CIMPP::Simple_Float ks; /* Saturation loading correction factor (Ks) (>= 0). Used only by Type J model. Typical Value = 0. Default: nullptr */ - CIMPP::SynchronousMachineModelKind modelType; /* Type of synchronous machine model used in Dynamic simulation applications. Default: 0 */ - CIMPP::RotorKind rotorType; /* Type of rotor on physical machine. Default: 0 */ - CIMPP::Seconds tc; /* Damping time constant for `Canay` reactance. Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tpdo; /* Direct-axis transient rotor time constant (T`do) (> T``do). Typical Value = 5. Default: nullptr */ - CIMPP::Seconds tppdo; /* Direct-axis subtransient rotor time constant (T``do) (> 0). Typical Value = 0.03. Default: nullptr */ - CIMPP::Seconds tppqo; /* Quadrature-axis subtransient rotor time constant (T``qo) (> 0). Typical Value = 0.03. Default: nullptr */ - CIMPP::Seconds tpqo; /* Quadrature-axis transient rotor time constant (T`qo) (> T``qo). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU xDirectSubtrans; /* Direct-axis subtransient reactance (unsaturated) (X``d) (> Xl). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU xDirectSync; /* Direct-axis synchronous reactance (Xd) (>= X`d). The quotient of a sustained value of that AC component of armature voltage that is produced by the total direct-axis flux due to direct-axis armature current and the value of the AC component of this current, the machine running at rated speed. Typical Value = 1.8. Default: nullptr */ - CIMPP::PU xDirectTrans; /* Direct-axis transient reactance (unsaturated) (X`d) (> =X``d). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU xQuadSubtrans; /* Quadrature-axis subtransient reactance (X``q) (> Xl). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU xQuadSync; /* Quadrature-axis synchronous reactance (Xq) (> =X`q). The ratio of the component of reactive armature voltage, due to the quadrature-axis component of armature current, to this component of current, under steady state conditions and at rated frequency. Typical Value = 1.6. Default: nullptr */ - CIMPP::PU xQuadTrans; /* Quadrature-axis transient reactance (X`q) (> =X``q). Typical Value = 0.3. Default: nullptr */ + /** \brief Saturation loading correction factor (Ks) (>= 0). Used only by Type J model. Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float ks; + + /** \brief Type of synchronous machine model used in Dynamic simulation applications. Default: 0 */ + CIMPP::SynchronousMachineModelKind modelType; + + /** \brief Type of rotor on physical machine. Default: 0 */ + CIMPP::RotorKind rotorType; + + /** \brief Damping time constant for `Canay` reactance. Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Direct-axis transient rotor time constant (T`do) (> T``do). Typical Value = 5. Default: nullptr */ + CIMPP::Seconds tpdo; + + /** \brief Direct-axis subtransient rotor time constant (T``do) (> 0). Typical Value = 0.03. Default: nullptr */ + CIMPP::Seconds tppdo; + + /** \brief Quadrature-axis subtransient rotor time constant (T``qo) (> 0). Typical Value = 0.03. Default: nullptr */ + CIMPP::Seconds tppqo; + + /** \brief Quadrature-axis transient rotor time constant (T`qo) (> T``qo). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds tpqo; + + /** \brief Direct-axis subtransient reactance (unsaturated) (X``d) (> Xl). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU xDirectSubtrans; + + /** \brief Direct-axis synchronous reactance (Xd) (>= X`d). The quotient of a sustained value of that AC component of armature voltage that is produced by the total direct-axis flux due to direct-axis armature current and the value of the AC component of this current, the machine running at rated speed. Typical Value = 1.8. Default: nullptr */ + CIMPP::PU xDirectSync; + + /** \brief Direct-axis transient reactance (unsaturated) (X`d) (> =X``d). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU xDirectTrans; + + /** \brief Quadrature-axis subtransient reactance (X``q) (> Xl). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU xQuadSubtrans; + + /** \brief Quadrature-axis synchronous reactance (Xq) (> =X`q). The ratio of the component of reactive armature voltage, due to the quadrature-axis component of armature current, to this component of current, under steady state conditions and at rated frequency. Typical Value = 1.6. Default: nullptr */ + CIMPP::PU xQuadSync; + + /** \brief Quadrature-axis transient reactance (X`q) (> =X``q). Typical Value = 0.3. Default: nullptr */ + CIMPP::PU xQuadTrans; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachineUserDefined.cpp b/CGMES_2.4.13_18DEC2013/SynchronousMachineUserDefined.cpp index 80f8bfed6..9bdfab19d 100644 --- a/CGMES_2.4.13_18DEC2013/SynchronousMachineUserDefined.cpp +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachineUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -SynchronousMachineUserDefined::SynchronousMachineUserDefined() {}; -SynchronousMachineUserDefined::~SynchronousMachineUserDefined() {}; +SynchronousMachineUserDefined::SynchronousMachineUserDefined() {} +SynchronousMachineUserDefined::~SynchronousMachineUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ SynchronousMachineUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_SynchronousMachineUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (SynchronousMachineUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_SynchronousMachineUserDefined(BaseClass*, BaseClass*); bool assign_SynchronousMachineUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_SynchronousMachineUserDefined_ProprietaryParameterDynamics(BaseClass return false; } +bool assign_SynchronousMachineUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + SynchronousMachineUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_SynchronousMachineUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_SynchronousMachineUserDefined_proprietary(const BaseClass* BaseClass_pt return false; } - - const char SynchronousMachineUserDefined::debugName[] = "SynchronousMachineUserDefined"; const char* SynchronousMachineUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* SynchronousMachineUserDefined::debugString() const void SynchronousMachineUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SynchronousMachineUserDefined"), &SynchronousMachineUserDefined_factory)); + factory_map.emplace("cim:SynchronousMachineUserDefined", &SynchronousMachineUserDefined_factory); } void SynchronousMachineUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineUserDefined.proprietary"), &assign_SynchronousMachineUserDefined_proprietary)); + assign_map.emplace("cim:SynchronousMachineUserDefined.proprietary", &assign_SynchronousMachineUserDefined_proprietary); } void SynchronousMachineUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineUserDefined.ProprietaryParameterDynamics"), &assign_SynchronousMachineUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:SynchronousMachineUserDefined.ProprietaryParameterDynamics", &assign_SynchronousMachineUserDefined_ProprietaryParameterDynamics); } void SynchronousMachineUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/SynchronousMachineUserDefined.hpp b/CGMES_2.4.13_18DEC2013/SynchronousMachineUserDefined.hpp index e575390b2..6a9b6c7f7 100644 --- a/CGMES_2.4.13_18DEC2013/SynchronousMachineUserDefined.hpp +++ b/CGMES_2.4.13_18DEC2013/SynchronousMachineUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Synchronous machine whose dynamic behaviour is described by a user-defined model. - */ + /** \brief Synchronous machine whose dynamic behaviour is described by a user-defined model. */ class SynchronousMachineUserDefined : public SynchronousMachineDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP SynchronousMachineUserDefined(); ~SynchronousMachineUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/TapChanger.cpp b/CGMES_2.4.13_18DEC2013/TapChanger.cpp index 9d1a3cdd3..eeecf62b0 100644 --- a/CGMES_2.4.13_18DEC2013/TapChanger.cpp +++ b/CGMES_2.4.13_18DEC2013/TapChanger.cpp @@ -11,19 +11,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "SvTapStep.hpp" #include "TapChangerControl.hpp" #include "TapSchedule.hpp" -#include "Boolean.hpp" -#include "Integer.hpp" -#include "Integer.hpp" -#include "Boolean.hpp" -#include "Integer.hpp" -#include "Voltage.hpp" -#include "Integer.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -TapChanger::TapChanger() : SvTapStep(nullptr), TapChangerControl(nullptr) {}; -TapChanger::~TapChanger() {}; +TapChanger::TapChanger() : SvTapStep(nullptr), TapChangerControl(nullptr) {} +TapChanger::~TapChanger() {} static const std::list PossibleProfilesForClass = { @@ -62,164 +54,189 @@ TapChanger::getPossibleProfilesForAttributes() const return map; } +bool assign_SvTapStep_TapChanger(BaseClass*, BaseClass*); +bool assign_TapChanger_SvTapStep(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TapChanger* element = dynamic_cast(BaseClass_ptr1); + SvTapStep* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->SvTapStep != element2) + { + element->SvTapStep = element2; + return assign_SvTapStep_TapChanger(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_TapChanger_controlEnabled(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChangerControl_TapChanger(BaseClass*, BaseClass*); +bool assign_TapChanger_TapChangerControl(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + TapChanger* element = dynamic_cast(BaseClass_ptr1); + TapChangerControl* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->controlEnabled; - if (buffer.fail()) - return false; - else - return true; + if (element->TapChangerControl != element2) + { + element->TapChangerControl = element2; + return assign_TapChangerControl_TapChanger(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_TapChanger_highStep(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapSchedule_TapChanger(BaseClass*, BaseClass*); +bool assign_TapChanger_TapSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + TapChanger* element = dynamic_cast(BaseClass_ptr1); + TapSchedule* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->highStep; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->TapSchedules.begin(), element->TapSchedules.end(), element2) == element->TapSchedules.end()) + { + element->TapSchedules.push_back(element2); + return assign_TapSchedule_TapChanger(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_TapChanger_lowStep(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChanger_controlEnabled(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->lowStep; - if (buffer.fail()) - return false; - else + buffer >> element->controlEnabled; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChanger_ltcFlag(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChanger_highStep(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->ltcFlag; - if (buffer.fail()) - return false; - else + buffer >> element->highStep; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChanger_neutralStep(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChanger_lowStep(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->neutralStep; - if (buffer.fail()) - return false; - else + buffer >> element->lowStep; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChanger_neutralU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChanger_ltcFlag(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->neutralU; - if (buffer.fail()) - return false; - else + buffer >> element->ltcFlag; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChanger_normalStep(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChanger_neutralStep(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->normalStep; - if (buffer.fail()) - return false; - else + buffer >> element->neutralStep; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChanger_step(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChanger_neutralU(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->step; - if (buffer.fail()) - return false; - else + buffer >> element->neutralU; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_SvTapStep_TapChanger(BaseClass*, BaseClass*); -bool assign_TapChanger_SvTapStep(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_TapChanger_normalStep(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { TapChanger* element = dynamic_cast(BaseClass_ptr1); - SvTapStep* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->SvTapStep != element2) + buffer >> element->normalStep; + if (!buffer.fail()) { - element->SvTapStep = element2; - return assign_SvTapStep_TapChanger(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_TapChangerControl_TapChanger(BaseClass*, BaseClass*); -bool assign_TapChanger_TapChangerControl(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_TapChanger_step(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { TapChanger* element = dynamic_cast(BaseClass_ptr1); - TapChangerControl* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->TapChangerControl != element2) + buffer >> element->step; + if (!buffer.fail()) { - element->TapChangerControl = element2; - return assign_TapChangerControl_TapChanger(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_TapSchedule_TapChanger(BaseClass*, BaseClass*); -bool assign_TapChanger_TapSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + + +bool get_TapChanger_TapChangerControl(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - TapChanger* element = dynamic_cast(BaseClass_ptr1); - TapSchedule* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (std::find(element->TapSchedules.begin(), element->TapSchedules.end(), element2) == element->TapSchedules.end()) + if (element->TapChangerControl != 0) { - element->TapSchedules.push_back(element2); - return assign_TapSchedule_TapChanger(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->TapChangerControl); + return true; } - return true; } return false; } + bool get_TapChanger_controlEnabled(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChanger* element = dynamic_cast(BaseClass_ptr1)) + const TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->controlEnabled; if (!buffer.str().empty()) @@ -233,7 +250,8 @@ bool get_TapChanger_controlEnabled(const BaseClass* BaseClass_ptr1, std::strings bool get_TapChanger_highStep(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChanger* element = dynamic_cast(BaseClass_ptr1)) + const TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->highStep; if (!buffer.str().empty()) @@ -247,7 +265,8 @@ bool get_TapChanger_highStep(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_TapChanger_lowStep(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChanger* element = dynamic_cast(BaseClass_ptr1)) + const TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lowStep; if (!buffer.str().empty()) @@ -261,7 +280,8 @@ bool get_TapChanger_lowStep(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_TapChanger_ltcFlag(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChanger* element = dynamic_cast(BaseClass_ptr1)) + const TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ltcFlag; if (!buffer.str().empty()) @@ -275,7 +295,8 @@ bool get_TapChanger_ltcFlag(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_TapChanger_neutralStep(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChanger* element = dynamic_cast(BaseClass_ptr1)) + const TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->neutralStep; if (!buffer.str().empty()) @@ -289,7 +310,8 @@ bool get_TapChanger_neutralStep(const BaseClass* BaseClass_ptr1, std::stringstre bool get_TapChanger_neutralU(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChanger* element = dynamic_cast(BaseClass_ptr1)) + const TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->neutralU; if (!buffer.str().empty()) @@ -303,7 +325,8 @@ bool get_TapChanger_neutralU(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_TapChanger_normalStep(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChanger* element = dynamic_cast(BaseClass_ptr1)) + const TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->normalStep; if (!buffer.str().empty()) @@ -317,7 +340,8 @@ bool get_TapChanger_normalStep(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_TapChanger_step(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChanger* element = dynamic_cast(BaseClass_ptr1)) + const TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->step; if (!buffer.str().empty()) @@ -329,21 +353,6 @@ bool get_TapChanger_step(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } - -bool get_TapChanger_TapChangerControl(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const TapChanger* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->TapChangerControl != 0) - { - BaseClass_list.push_back(element->TapChangerControl); - return true; - } - } - return false; -} - - const char TapChanger::debugName[] = "TapChanger"; const char* TapChanger::debugString() const { @@ -352,26 +361,26 @@ const char* TapChanger::debugString() const void TapChanger::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TapChanger"), &TapChanger_factory)); + factory_map.emplace("cim:TapChanger", &TapChanger_factory); } void TapChanger::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TapChanger.controlEnabled"), &assign_TapChanger_controlEnabled)); - assign_map.insert(std::make_pair(std::string("cim:TapChanger.highStep"), &assign_TapChanger_highStep)); - assign_map.insert(std::make_pair(std::string("cim:TapChanger.lowStep"), &assign_TapChanger_lowStep)); - assign_map.insert(std::make_pair(std::string("cim:TapChanger.ltcFlag"), &assign_TapChanger_ltcFlag)); - assign_map.insert(std::make_pair(std::string("cim:TapChanger.neutralStep"), &assign_TapChanger_neutralStep)); - assign_map.insert(std::make_pair(std::string("cim:TapChanger.neutralU"), &assign_TapChanger_neutralU)); - assign_map.insert(std::make_pair(std::string("cim:TapChanger.normalStep"), &assign_TapChanger_normalStep)); - assign_map.insert(std::make_pair(std::string("cim:TapChanger.step"), &assign_TapChanger_step)); + assign_map.emplace("cim:TapChanger.controlEnabled", &assign_TapChanger_controlEnabled); + assign_map.emplace("cim:TapChanger.highStep", &assign_TapChanger_highStep); + assign_map.emplace("cim:TapChanger.lowStep", &assign_TapChanger_lowStep); + assign_map.emplace("cim:TapChanger.ltcFlag", &assign_TapChanger_ltcFlag); + assign_map.emplace("cim:TapChanger.neutralStep", &assign_TapChanger_neutralStep); + assign_map.emplace("cim:TapChanger.neutralU", &assign_TapChanger_neutralU); + assign_map.emplace("cim:TapChanger.normalStep", &assign_TapChanger_normalStep); + assign_map.emplace("cim:TapChanger.step", &assign_TapChanger_step); } void TapChanger::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TapChanger.SvTapStep"), &assign_TapChanger_SvTapStep)); - assign_map.insert(std::make_pair(std::string("cim:TapChanger.TapChangerControl"), &assign_TapChanger_TapChangerControl)); - assign_map.insert(std::make_pair(std::string("cim:TapChanger.TapSchedules"), &assign_TapChanger_TapSchedules)); + assign_map.emplace("cim:TapChanger.SvTapStep", &assign_TapChanger_SvTapStep); + assign_map.emplace("cim:TapChanger.TapChangerControl", &assign_TapChanger_TapChangerControl); + assign_map.emplace("cim:TapChanger.TapSchedules", &assign_TapChanger_TapSchedules); } void TapChanger::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/TapChanger.hpp b/CGMES_2.4.13_18DEC2013/TapChanger.hpp index bf60d5805..f76517308 100644 --- a/CGMES_2.4.13_18DEC2013/TapChanger.hpp +++ b/CGMES_2.4.13_18DEC2013/TapChanger.hpp @@ -23,9 +23,7 @@ namespace CIMPP class TapChangerControl; class TapSchedule; - /* - Mechanism for changing transformer winding tap positions. - */ + /** \brief Mechanism for changing transformer winding tap positions. */ class TapChanger : public PowerSystemResource { public: @@ -33,17 +31,38 @@ namespace CIMPP TapChanger(); ~TapChanger() override; - CIMPP::SvTapStep* SvTapStep; /* The tap step state associated with the tap changer. Default: 0 */ - CIMPP::TapChangerControl* TapChangerControl; /* The tap changers that participates in this regulating tap control scheme. Default: 0 */ - std::list TapSchedules; /* A TapSchedule is associated with a TapChanger. Default: 0 */ - CIMPP::Boolean controlEnabled; /* Specifies the regulation status of the equipment. True is regulating, false is not regulating. Default: false */ - CIMPP::Integer highStep; /* Highest possible tap step position, advance from neutral. The attribute shall be greater than lowStep. Default: 0 */ - CIMPP::Integer lowStep; /* Lowest possible tap step position, retard from neutral Default: 0 */ - CIMPP::Boolean ltcFlag; /* Specifies whether or not a TapChanger has load tap changing capabilities. Default: false */ - CIMPP::Integer neutralStep; /* The neutral tap step position for this winding. The attribute shall be equal or greater than lowStep and equal or less than highStep. Default: 0 */ - CIMPP::Voltage neutralU; /* Voltage at which the winding operates at the neutral tap setting. Default: nullptr */ - CIMPP::Integer normalStep; /* The tap step position used in `normal` network operation for this winding. For a `Fixed` tap changer indicates the current physical tap setting. The attribute shall be equal or greater than lowStep and equal or less than highStep. Default: 0 */ - CIMPP::Simple_Float step; /* Tap changer position. Starting step for a steady state solution. Non integer values are allowed to support continuous tap variables. The reasons for continuous value are to support study cases where no discrete tap changers has yet been designed, a solutions where a narrow voltage band force the tap step to oscillate or accommodate for a continuous solution as input. The attribute shall be equal or greater than lowStep and equal or less than highStep. Default: nullptr */ + /** \brief The tap step state associated with the tap changer. Default: 0 */ + CIMPP::SvTapStep* SvTapStep; + + /** \brief The tap changers that participates in this regulating tap control scheme. Default: 0 */ + CIMPP::TapChangerControl* TapChangerControl; + + /** \brief A TapSchedule is associated with a TapChanger. Default: 0 */ + std::list TapSchedules; + + /** \brief Specifies the regulation status of the equipment. True is regulating, false is not regulating. Default: false */ + CIMPP::Boolean controlEnabled; + + /** \brief Highest possible tap step position, advance from neutral. The attribute shall be greater than lowStep. Default: 0 */ + CIMPP::Integer highStep; + + /** \brief Lowest possible tap step position, retard from neutral Default: 0 */ + CIMPP::Integer lowStep; + + /** \brief Specifies whether or not a TapChanger has load tap changing capabilities. Default: false */ + CIMPP::Boolean ltcFlag; + + /** \brief The neutral tap step position for this winding. The attribute shall be equal or greater than lowStep and equal or less than highStep. Default: 0 */ + CIMPP::Integer neutralStep; + + /** \brief Voltage at which the winding operates at the neutral tap setting. Default: nullptr */ + CIMPP::Voltage neutralU; + + /** \brief The tap step position used in `normal` network operation for this winding. For a `Fixed` tap changer indicates the current physical tap setting. The attribute shall be equal or greater than lowStep and equal or less than highStep. Default: 0 */ + CIMPP::Integer normalStep; + + /** \brief Tap changer position. Starting step for a steady state solution. Non integer values are allowed to support continuous tap variables. The reasons for continuous value are to support study cases where no discrete tap changers has yet been designed, a solutions where a narrow voltage band force the tap step to oscillate or accommodate for a continuous solution as input. The attribute shall be equal or greater than lowStep and equal or less than highStep. Default: nullptr */ + CIMPP::Simple_Float step; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/TapChangerControl.cpp b/CGMES_2.4.13_18DEC2013/TapChangerControl.cpp index 7464977a9..7c6239dff 100644 --- a/CGMES_2.4.13_18DEC2013/TapChangerControl.cpp +++ b/CGMES_2.4.13_18DEC2013/TapChangerControl.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -TapChangerControl::TapChangerControl() {}; -TapChangerControl::~TapChangerControl() {}; +TapChangerControl::TapChangerControl() {} +TapChangerControl::~TapChangerControl() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ TapChangerControl::getPossibleProfilesForAttributes() const return map; } - - bool assign_TapChanger_TapChangerControl(BaseClass*, BaseClass*); bool assign_TapChangerControl_TapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_TapChangerControl_TapChanger(BaseClass* BaseClass_ptr1, BaseClass* B } - const char TapChangerControl::debugName[] = "TapChangerControl"; const char* TapChangerControl::debugString() const { @@ -69,7 +66,7 @@ const char* TapChangerControl::debugString() const void TapChangerControl::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TapChangerControl"), &TapChangerControl_factory)); + factory_map.emplace("cim:TapChangerControl", &TapChangerControl_factory); } void TapChangerControl::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void TapChangerControl::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TapChangerControl.TapChanger"), &assign_TapChangerControl_TapChanger)); + assign_map.emplace("cim:TapChangerControl.TapChanger", &assign_TapChangerControl_TapChanger); } void TapChangerControl::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/TapChangerControl.hpp b/CGMES_2.4.13_18DEC2013/TapChangerControl.hpp index c42973e2f..ee70475dc 100644 --- a/CGMES_2.4.13_18DEC2013/TapChangerControl.hpp +++ b/CGMES_2.4.13_18DEC2013/TapChangerControl.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class TapChanger; - /* - Describes behavior specific to tap changers, e.g. how the voltage at the end of a line varies with the load level and compensation of the voltage drop by tap adjustment. - */ + /** \brief Describes behavior specific to tap changers, e.g. how the voltage at the end of a line varies with the load level and compensation of the voltage drop by tap adjustment. */ class TapChangerControl : public RegulatingControl { public: @@ -27,7 +25,8 @@ namespace CIMPP TapChangerControl(); ~TapChangerControl() override; - std::list TapChanger; /* The regulating control scheme in which this tap changer participates. Default: 0 */ + /** \brief The regulating control scheme in which this tap changer participates. Default: 0 */ + std::list TapChanger; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/TapChangerTablePoint.cpp b/CGMES_2.4.13_18DEC2013/TapChangerTablePoint.cpp index 3f0e77404..2044a9212 100644 --- a/CGMES_2.4.13_18DEC2013/TapChangerTablePoint.cpp +++ b/CGMES_2.4.13_18DEC2013/TapChangerTablePoint.cpp @@ -8,17 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PerCent.hpp" -#include "PerCent.hpp" -#include "PerCent.hpp" -#include "Simple_Float.hpp" -#include "Integer.hpp" -#include "PerCent.hpp" using namespace CIMPP; -TapChangerTablePoint::TapChangerTablePoint() {}; -TapChangerTablePoint::~TapChangerTablePoint() {}; +TapChangerTablePoint::TapChangerTablePoint() {} +TapChangerTablePoint::~TapChangerTablePoint() {} static const std::list PossibleProfilesForClass = { @@ -50,90 +44,94 @@ TapChangerTablePoint::getPossibleProfilesForAttributes() const return map; } - -bool assign_TapChangerTablePoint_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChangerTablePoint_b(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChangerTablePoint_g(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChangerTablePoint_g(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChangerTablePoint_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChangerTablePoint_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChangerTablePoint_ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChangerTablePoint_ratio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChangerTablePoint_step(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChangerTablePoint_step(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->step; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChangerTablePoint_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChangerTablePoint_x(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_TapChangerTablePoint_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b; if (!buffer.str().empty()) @@ -147,7 +145,8 @@ bool get_TapChangerTablePoint_b(const BaseClass* BaseClass_ptr1, std::stringstre bool get_TapChangerTablePoint_g(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g; if (!buffer.str().empty()) @@ -161,7 +160,8 @@ bool get_TapChangerTablePoint_g(const BaseClass* BaseClass_ptr1, std::stringstre bool get_TapChangerTablePoint_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -175,7 +175,8 @@ bool get_TapChangerTablePoint_r(const BaseClass* BaseClass_ptr1, std::stringstre bool get_TapChangerTablePoint_ratio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratio; if (!buffer.str().empty()) @@ -189,7 +190,8 @@ bool get_TapChangerTablePoint_ratio(const BaseClass* BaseClass_ptr1, std::string bool get_TapChangerTablePoint_step(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->step; if (!buffer.str().empty()) @@ -203,7 +205,8 @@ bool get_TapChangerTablePoint_step(const BaseClass* BaseClass_ptr1, std::strings bool get_TapChangerTablePoint_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x; if (!buffer.str().empty()) @@ -215,8 +218,6 @@ bool get_TapChangerTablePoint_x(const BaseClass* BaseClass_ptr1, std::stringstre return false; } - - const char TapChangerTablePoint::debugName[] = "TapChangerTablePoint"; const char* TapChangerTablePoint::debugString() const { @@ -225,17 +226,17 @@ const char* TapChangerTablePoint::debugString() const void TapChangerTablePoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TapChangerTablePoint"), &TapChangerTablePoint_factory)); + factory_map.emplace("cim:TapChangerTablePoint", &TapChangerTablePoint_factory); } void TapChangerTablePoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TapChangerTablePoint.b"), &assign_TapChangerTablePoint_b)); - assign_map.insert(std::make_pair(std::string("cim:TapChangerTablePoint.g"), &assign_TapChangerTablePoint_g)); - assign_map.insert(std::make_pair(std::string("cim:TapChangerTablePoint.r"), &assign_TapChangerTablePoint_r)); - assign_map.insert(std::make_pair(std::string("cim:TapChangerTablePoint.ratio"), &assign_TapChangerTablePoint_ratio)); - assign_map.insert(std::make_pair(std::string("cim:TapChangerTablePoint.step"), &assign_TapChangerTablePoint_step)); - assign_map.insert(std::make_pair(std::string("cim:TapChangerTablePoint.x"), &assign_TapChangerTablePoint_x)); + assign_map.emplace("cim:TapChangerTablePoint.b", &assign_TapChangerTablePoint_b); + assign_map.emplace("cim:TapChangerTablePoint.g", &assign_TapChangerTablePoint_g); + assign_map.emplace("cim:TapChangerTablePoint.r", &assign_TapChangerTablePoint_r); + assign_map.emplace("cim:TapChangerTablePoint.ratio", &assign_TapChangerTablePoint_ratio); + assign_map.emplace("cim:TapChangerTablePoint.step", &assign_TapChangerTablePoint_step); + assign_map.emplace("cim:TapChangerTablePoint.x", &assign_TapChangerTablePoint_x); } void TapChangerTablePoint::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/TapChangerTablePoint.hpp b/CGMES_2.4.13_18DEC2013/TapChangerTablePoint.hpp index 58c557043..aa6327644 100644 --- a/CGMES_2.4.13_18DEC2013/TapChangerTablePoint.hpp +++ b/CGMES_2.4.13_18DEC2013/TapChangerTablePoint.hpp @@ -26,12 +26,23 @@ namespace CIMPP TapChangerTablePoint(); ~TapChangerTablePoint() override; - CIMPP::PerCent b; /* The magnetizing branch susceptance deviation in percent of nominal value. The actual susceptance is calculated as follows: calculated magnetizing susceptance = b(nominal) * (1 + b(from this class)/100). The b(nominal) is defined as the static magnetizing susceptance on the associated power transformer end or ends. This model assumes the star impedance (pi model) form. Default: nullptr */ - CIMPP::PerCent g; /* The magnetizing branch conductance deviation in percent of nominal value. The actual conductance is calculated as follows: calculated magnetizing conductance = g(nominal) * (1 + g(from this class)/100). The g(nominal) is defined as the static magnetizing conductance on the associated power transformer end or ends. This model assumes the star impedance (pi model) form. Default: nullptr */ - CIMPP::PerCent r; /* The resistance deviation in percent of nominal value. The actual reactance is calculated as follows: calculated resistance = r(nominal) * (1 + r(from this class)/100). The r(nominal) is defined as the static resistance on the associated power transformer end or ends. This model assumes the star impedance (pi model) form. Default: nullptr */ - CIMPP::Simple_Float ratio; /* The voltage ratio in per unit. Hence this is a value close to one. Default: nullptr */ - CIMPP::Integer step; /* The tap step. Default: 0 */ - CIMPP::PerCent x; /* The series reactance deviation in percent of nominal value. The actual reactance is calculated as follows: calculated reactance = x(nominal) * (1 + x(from this class)/100). The x(nominal) is defined as the static series reactance on the associated power transformer end or ends. This model assumes the star impedance (pi model) form. Default: nullptr */ + /** \brief The magnetizing branch susceptance deviation in percent of nominal value. The actual susceptance is calculated as follows: calculated magnetizing susceptance = b(nominal) * (1 + b(from this class)/100). The b(nominal) is defined as the static magnetizing susceptance on the associated power transformer end or ends. This model assumes the star impedance (pi model) form. Default: nullptr */ + CIMPP::PerCent b; + + /** \brief The magnetizing branch conductance deviation in percent of nominal value. The actual conductance is calculated as follows: calculated magnetizing conductance = g(nominal) * (1 + g(from this class)/100). The g(nominal) is defined as the static magnetizing conductance on the associated power transformer end or ends. This model assumes the star impedance (pi model) form. Default: nullptr */ + CIMPP::PerCent g; + + /** \brief The resistance deviation in percent of nominal value. The actual reactance is calculated as follows: calculated resistance = r(nominal) * (1 + r(from this class)/100). The r(nominal) is defined as the static resistance on the associated power transformer end or ends. This model assumes the star impedance (pi model) form. Default: nullptr */ + CIMPP::PerCent r; + + /** \brief The voltage ratio in per unit. Hence this is a value close to one. Default: nullptr */ + CIMPP::Simple_Float ratio; + + /** \brief The tap step. Default: 0 */ + CIMPP::Integer step; + + /** \brief The series reactance deviation in percent of nominal value. The actual reactance is calculated as follows: calculated reactance = x(nominal) * (1 + x(from this class)/100). The x(nominal) is defined as the static series reactance on the associated power transformer end or ends. This model assumes the star impedance (pi model) form. Default: nullptr */ + CIMPP::PerCent x; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/TapSchedule.cpp b/CGMES_2.4.13_18DEC2013/TapSchedule.cpp index d294bd984..039a79967 100644 --- a/CGMES_2.4.13_18DEC2013/TapSchedule.cpp +++ b/CGMES_2.4.13_18DEC2013/TapSchedule.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -TapSchedule::TapSchedule() : TapChanger(nullptr) {}; -TapSchedule::~TapSchedule() {}; +TapSchedule::TapSchedule() : TapChanger(nullptr) {} +TapSchedule::~TapSchedule() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ TapSchedule::getPossibleProfilesForAttributes() const return map; } - - bool assign_TapChanger_TapSchedules(BaseClass*, BaseClass*); bool assign_TapSchedule_TapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_TapSchedule_TapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseCla return false; } - bool get_TapSchedule_TapChanger(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TapSchedule* element = dynamic_cast(BaseClass_ptr1)) + const TapSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->TapChanger != 0) { @@ -73,7 +71,6 @@ bool get_TapSchedule_TapChanger(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TapSchedule"), &TapSchedule_factory)); + factory_map.emplace("cim:TapSchedule", &TapSchedule_factory); } void TapSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void TapSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TapSchedule.TapChanger"), &assign_TapSchedule_TapChanger)); + assign_map.emplace("cim:TapSchedule.TapChanger", &assign_TapSchedule_TapChanger); } void TapSchedule::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/TapSchedule.hpp b/CGMES_2.4.13_18DEC2013/TapSchedule.hpp index 3f391e682..70565884c 100644 --- a/CGMES_2.4.13_18DEC2013/TapSchedule.hpp +++ b/CGMES_2.4.13_18DEC2013/TapSchedule.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class TapChanger; - /* - A pre-established pattern over time for a tap step. - */ + /** \brief A pre-established pattern over time for a tap step. */ class TapSchedule : public SeasonDayTypeSchedule { public: @@ -27,7 +25,8 @@ namespace CIMPP TapSchedule(); ~TapSchedule() override; - CIMPP::TapChanger* TapChanger; /* A TapChanger can have TapSchedules. Default: 0 */ + /** \brief A TapChanger can have TapSchedules. Default: 0 */ + CIMPP::TapChanger* TapChanger; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Temperature.hpp b/CGMES_2.4.13_18DEC2013/Temperature.hpp index 33ba8ea2b..b7dfa3115 100644 --- a/CGMES_2.4.13_18DEC2013/Temperature.hpp +++ b/CGMES_2.4.13_18DEC2013/Temperature.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Value of temperature in degrees Celsius. - */ + /** \brief Value of temperature in degrees Celsius. */ class Temperature { public: diff --git a/CGMES_2.4.13_18DEC2013/Terminal.cpp b/CGMES_2.4.13_18DEC2013/Terminal.cpp index b3b9ab2ef..25d0c3a25 100644 --- a/CGMES_2.4.13_18DEC2013/Terminal.cpp +++ b/CGMES_2.4.13_18DEC2013/Terminal.cpp @@ -8,10 +8,9 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include +#include "ACDCConverter.hpp" #include "ConductingEquipment.hpp" #include "ConnectivityNode.hpp" -#include "ACDCConverter.hpp" -#include "MutualCoupling.hpp" #include "MutualCoupling.hpp" #include "RegulatingControl.hpp" #include "RemoteInputSignal.hpp" @@ -19,12 +18,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "TieFlow.hpp" #include "TopologicalNode.hpp" #include "TransformerEnd.hpp" -#include "PhaseCode.hpp" using namespace CIMPP; -Terminal::Terminal() : ConductingEquipment(nullptr), ConnectivityNode(nullptr), RegulatingControl(nullptr), SvPowerFlow(nullptr), TopologicalNode(nullptr) {}; -Terminal::~Terminal() {}; +Terminal::Terminal() : ConductingEquipment(nullptr), ConnectivityNode(nullptr), RegulatingControl(nullptr), SvPowerFlow(nullptr), TopologicalNode(nullptr) {} +Terminal::~Terminal() {} static const std::list PossibleProfilesForClass = { @@ -67,21 +65,6 @@ Terminal::getPossibleProfilesForAttributes() const return map; } - -bool assign_Terminal_phases(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (Terminal* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->phases; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ConductingEquipment_Terminals(BaseClass*, BaseClass*); bool assign_Terminal_ConductingEquipment(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -98,6 +81,7 @@ bool assign_Terminal_ConductingEquipment(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_ConnectivityNode_Terminals(BaseClass*, BaseClass*); bool assign_Terminal_ConnectivityNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -114,6 +98,7 @@ bool assign_Terminal_ConnectivityNode(BaseClass* BaseClass_ptr1, BaseClass* Base } return false; } + bool assign_ACDCConverter_PccTerminal(BaseClass*, BaseClass*); bool assign_Terminal_ConverterDCSides(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -130,6 +115,7 @@ bool assign_Terminal_ConverterDCSides(BaseClass* BaseClass_ptr1, BaseClass* Base } return false; } + bool assign_MutualCoupling_First_Terminal(BaseClass*, BaseClass*); bool assign_Terminal_HasFirstMutualCoupling(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -146,6 +132,7 @@ bool assign_Terminal_HasFirstMutualCoupling(BaseClass* BaseClass_ptr1, BaseClass } return false; } + bool assign_MutualCoupling_Second_Terminal(BaseClass*, BaseClass*); bool assign_Terminal_HasSecondMutualCoupling(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -162,6 +149,7 @@ bool assign_Terminal_HasSecondMutualCoupling(BaseClass* BaseClass_ptr1, BaseClas } return false; } + bool assign_RegulatingControl_Terminal(BaseClass*, BaseClass*); bool assign_Terminal_RegulatingControl(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -178,6 +166,7 @@ bool assign_Terminal_RegulatingControl(BaseClass* BaseClass_ptr1, BaseClass* Bas } return false; } + bool assign_RemoteInputSignal_Terminal(BaseClass*, BaseClass*); bool assign_Terminal_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -194,6 +183,7 @@ bool assign_Terminal_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* Bas } return false; } + bool assign_SvPowerFlow_Terminal(BaseClass*, BaseClass*); bool assign_Terminal_SvPowerFlow(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -210,6 +200,7 @@ bool assign_Terminal_SvPowerFlow(BaseClass* BaseClass_ptr1, BaseClass* BaseClass } return false; } + bool assign_TieFlow_Terminal(BaseClass*, BaseClass*); bool assign_Terminal_TieFlow(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -226,6 +217,7 @@ bool assign_Terminal_TieFlow(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr } return false; } + bool assign_TopologicalNode_Terminal(BaseClass*, BaseClass*); bool assign_Terminal_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -242,6 +234,7 @@ bool assign_Terminal_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseC } return false; } + bool assign_TransformerEnd_Terminal(BaseClass*, BaseClass*); bool assign_Terminal_TransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -259,10 +252,24 @@ bool assign_Terminal_TransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* BaseCl return false; } +bool assign_Terminal_phases(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + Terminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->phases; + if (!buffer.fail()) + { + return true; + } + } + return false; +} bool get_Terminal_ConductingEquipment(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Terminal* element = dynamic_cast(BaseClass_ptr1)) + const Terminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ConductingEquipment != 0) { @@ -275,7 +282,8 @@ bool get_Terminal_ConductingEquipment(const BaseClass* BaseClass_ptr1, std::list bool get_Terminal_ConnectivityNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Terminal* element = dynamic_cast(BaseClass_ptr1)) + const Terminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ConnectivityNode != 0) { @@ -286,9 +294,17 @@ bool get_Terminal_ConnectivityNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Terminal* element = dynamic_cast(BaseClass_ptr1)) + const Terminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->TopologicalNode != 0) { @@ -302,7 +318,8 @@ bool get_Terminal_TopologicalNode(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1)) + const Terminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->phases; if (!buffer.str().empty()) @@ -322,27 +339,27 @@ const char* Terminal::debugString() const void Terminal::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Terminal"), &Terminal_factory)); + factory_map.emplace("cim:Terminal", &Terminal_factory); } void Terminal::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Terminal.phases"), &assign_Terminal_phases)); + assign_map.emplace("cim:Terminal.phases", &assign_Terminal_phases); } void Terminal::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Terminal.ConductingEquipment"), &assign_Terminal_ConductingEquipment)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.ConnectivityNode"), &assign_Terminal_ConnectivityNode)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.ConverterDCSides"), &assign_Terminal_ConverterDCSides)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.HasFirstMutualCoupling"), &assign_Terminal_HasFirstMutualCoupling)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.HasSecondMutualCoupling"), &assign_Terminal_HasSecondMutualCoupling)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.RegulatingControl"), &assign_Terminal_RegulatingControl)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.RemoteInputSignal"), &assign_Terminal_RemoteInputSignal)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.SvPowerFlow"), &assign_Terminal_SvPowerFlow)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.TieFlow"), &assign_Terminal_TieFlow)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.TopologicalNode"), &assign_Terminal_TopologicalNode)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.TransformerEnd"), &assign_Terminal_TransformerEnd)); + assign_map.emplace("cim:Terminal.ConductingEquipment", &assign_Terminal_ConductingEquipment); + assign_map.emplace("cim:Terminal.ConnectivityNode", &assign_Terminal_ConnectivityNode); + assign_map.emplace("cim:Terminal.ConverterDCSides", &assign_Terminal_ConverterDCSides); + assign_map.emplace("cim:Terminal.HasFirstMutualCoupling", &assign_Terminal_HasFirstMutualCoupling); + assign_map.emplace("cim:Terminal.HasSecondMutualCoupling", &assign_Terminal_HasSecondMutualCoupling); + assign_map.emplace("cim:Terminal.RegulatingControl", &assign_Terminal_RegulatingControl); + assign_map.emplace("cim:Terminal.RemoteInputSignal", &assign_Terminal_RemoteInputSignal); + assign_map.emplace("cim:Terminal.SvPowerFlow", &assign_Terminal_SvPowerFlow); + assign_map.emplace("cim:Terminal.TieFlow", &assign_Terminal_TieFlow); + assign_map.emplace("cim:Terminal.TopologicalNode", &assign_Terminal_TopologicalNode); + assign_map.emplace("cim:Terminal.TransformerEnd", &assign_Terminal_TransformerEnd); } void Terminal::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/Terminal.hpp b/CGMES_2.4.13_18DEC2013/Terminal.hpp index 9551684a2..58895e261 100644 --- a/CGMES_2.4.13_18DEC2013/Terminal.hpp +++ b/CGMES_2.4.13_18DEC2013/Terminal.hpp @@ -27,9 +27,7 @@ namespace CIMPP class TopologicalNode; class TransformerEnd; - /* - An AC electrical connection point to a piece of conducting equipment. Terminals are connected at physical connection points called connectivity nodes. - */ + /** \brief An AC electrical connection point to a piece of conducting equipment. Terminals are connected at physical connection points called connectivity nodes. */ class Terminal : public ACDCTerminal { public: @@ -37,18 +35,41 @@ namespace CIMPP Terminal(); ~Terminal() override; - CIMPP::ConductingEquipment* ConductingEquipment; /* The conducting equipment of the terminal. Conducting equipment have terminals that may be connected to other conducting equipment terminals via connectivity nodes or topological nodes. Default: 0 */ - CIMPP::ConnectivityNode* ConnectivityNode; /* Terminals interconnected with zero impedance at a this connectivity node. Default: 0 */ - std::list ConverterDCSides; /* Point of common coupling terminal for this converter DC side. It is typically the terminal on the power transformer (or switch) closest to the AC network. The power flow measurement must be the sum of all flows into the transformer. Default: 0 */ - std::list HasFirstMutualCoupling; /* Mutual couplings associated with the branch as the first branch. Default: 0 */ - std::list HasSecondMutualCoupling; /* Mutual couplings with the branch associated as the first branch. Default: 0 */ - CIMPP::RegulatingControl* RegulatingControl; /* The terminal associated with this regulating control. The terminal is associated instead of a node, since the terminal could connect into either a topological node (bus in bus-branch model) or a connectivity node (detailed switch model). Sometimes it is useful to model regulation at a terminal of a bus bar object since the bus bar can be present in both a bus-branch model or a model with switch detail. Default: 0 */ - std::list RemoteInputSignal; /* Input signal coming from this terminal. Default: 0 */ - CIMPP::SvPowerFlow* SvPowerFlow; /* The power flow state variable associated with the terminal. Default: 0 */ - std::list TieFlow; /* The control area tie flows to which this terminal associates. Default: 0 */ - CIMPP::TopologicalNode* TopologicalNode; /* The terminals associated with the topological node. This can be used as an alternative to the connectivity node path to terminal, thus making it unneccesary to model connectivity nodes in some cases. Note that if connectivity nodes are in the model, this association would probably not be used as an input specification. Default: 0 */ - std::list TransformerEnd; /* All transformer ends connected at this terminal. Default: 0 */ - CIMPP::PhaseCode phases; /* Represents the normal network phasing condition. If the attribute is missing three phases (ABC or ABCN) shall be assumed. Default: 0 */ + /** \brief The conducting equipment of the terminal. Conducting equipment have terminals that may be connected to other conducting equipment terminals via connectivity nodes or topological nodes. Default: 0 */ + CIMPP::ConductingEquipment* ConductingEquipment; + + /** \brief Terminals interconnected with zero impedance at a this connectivity node. Default: 0 */ + CIMPP::ConnectivityNode* ConnectivityNode; + + /** \brief Point of common coupling terminal for this converter DC side. It is typically the terminal on the power transformer (or switch) closest to the AC network. The power flow measurement must be the sum of all flows into the transformer. Default: 0 */ + std::list ConverterDCSides; + + /** \brief Mutual couplings associated with the branch as the first branch. Default: 0 */ + std::list HasFirstMutualCoupling; + + /** \brief Mutual couplings with the branch associated as the first branch. Default: 0 */ + std::list HasSecondMutualCoupling; + + /** \brief The terminal associated with this regulating control. The terminal is associated instead of a node, since the terminal could connect into either a topological node (bus in bus-branch model) or a connectivity node (detailed switch model). Sometimes it is useful to model regulation at a terminal of a bus bar object since the bus bar can be present in both a bus-branch model or a model with switch detail. Default: 0 */ + CIMPP::RegulatingControl* RegulatingControl; + + /** \brief Input signal coming from this terminal. Default: 0 */ + std::list RemoteInputSignal; + + /** \brief The power flow state variable associated with the terminal. Default: 0 */ + CIMPP::SvPowerFlow* SvPowerFlow; + + /** \brief The control area tie flows to which this terminal associates. Default: 0 */ + std::list TieFlow; + + /** \brief The terminals associated with the topological node. This can be used as an alternative to the connectivity node path to terminal, thus making it unneccesary to model connectivity nodes in some cases. Note that if connectivity nodes are in the model, this association would probably not be used as an input specification. Default: 0 */ + CIMPP::TopologicalNode* TopologicalNode; + + /** \brief All transformer ends connected at this terminal. Default: 0 */ + std::list TransformerEnd; + + /** \brief Represents the normal network phasing condition. If the attribute is missing three phases (ABC or ABCN) shall be assumed. Default: 0 */ + CIMPP::PhaseCode phases; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/TextDiagramObject.cpp b/CGMES_2.4.13_18DEC2013/TextDiagramObject.cpp index d9738a22b..684542b39 100644 --- a/CGMES_2.4.13_18DEC2013/TextDiagramObject.cpp +++ b/CGMES_2.4.13_18DEC2013/TextDiagramObject.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "String.hpp" using namespace CIMPP; -TextDiagramObject::TextDiagramObject() {}; -TextDiagramObject::~TextDiagramObject() {}; +TextDiagramObject::TextDiagramObject() {} +TextDiagramObject::~TextDiagramObject() {} static const std::list PossibleProfilesForClass = { @@ -40,25 +39,24 @@ TextDiagramObject::getPossibleProfilesForAttributes() const return map; } - -bool assign_TextDiagramObject_text(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TextDiagramObject_text(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TextDiagramObject* element = dynamic_cast(BaseClass_ptr1)) + TextDiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->text = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_TextDiagramObject_text(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TextDiagramObject* element = dynamic_cast(BaseClass_ptr1)) + const TextDiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->text; if (!buffer.str().empty()) @@ -70,8 +68,6 @@ bool get_TextDiagramObject_text(const BaseClass* BaseClass_ptr1, std::stringstre return false; } - - const char TextDiagramObject::debugName[] = "TextDiagramObject"; const char* TextDiagramObject::debugString() const { @@ -80,12 +76,12 @@ const char* TextDiagramObject::debugString() const void TextDiagramObject::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TextDiagramObject"), &TextDiagramObject_factory)); + factory_map.emplace("cim:TextDiagramObject", &TextDiagramObject_factory); } void TextDiagramObject::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TextDiagramObject.text"), &assign_TextDiagramObject_text)); + assign_map.emplace("cim:TextDiagramObject.text", &assign_TextDiagramObject_text); } void TextDiagramObject::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/TextDiagramObject.hpp b/CGMES_2.4.13_18DEC2013/TextDiagramObject.hpp index 3328c0922..188381ff3 100644 --- a/CGMES_2.4.13_18DEC2013/TextDiagramObject.hpp +++ b/CGMES_2.4.13_18DEC2013/TextDiagramObject.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A diagram object for placing free-text or text derived from an associated domain object. - */ + /** \brief A diagram object for placing free-text or text derived from an associated domain object. */ class TextDiagramObject : public DiagramObject { public: @@ -27,7 +25,8 @@ namespace CIMPP TextDiagramObject(); ~TextDiagramObject() override; - CIMPP::String text; /* The text that is displayed by this text diagram object. Default: '' */ + /** \brief The text that is displayed by this text diagram object. Default: '' */ + CIMPP::String text; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ThermalGeneratingUnit.cpp b/CGMES_2.4.13_18DEC2013/ThermalGeneratingUnit.cpp index c789d053f..ee36322aa 100644 --- a/CGMES_2.4.13_18DEC2013/ThermalGeneratingUnit.cpp +++ b/CGMES_2.4.13_18DEC2013/ThermalGeneratingUnit.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ThermalGeneratingUnit::ThermalGeneratingUnit() {}; -ThermalGeneratingUnit::~ThermalGeneratingUnit() {}; +ThermalGeneratingUnit::ThermalGeneratingUnit() {} +ThermalGeneratingUnit::~ThermalGeneratingUnit() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ ThermalGeneratingUnit::getPossibleProfilesForAttributes() const return map; } - - bool assign_FossilFuel_ThermalGeneratingUnit(BaseClass*, BaseClass*); bool assign_ThermalGeneratingUnit_FossilFuels(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,7 +59,6 @@ bool assign_ThermalGeneratingUnit_FossilFuels(BaseClass* BaseClass_ptr1, BaseCla } - const char ThermalGeneratingUnit::debugName[] = "ThermalGeneratingUnit"; const char* ThermalGeneratingUnit::debugString() const { @@ -70,7 +67,7 @@ const char* ThermalGeneratingUnit::debugString() const void ThermalGeneratingUnit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ThermalGeneratingUnit"), &ThermalGeneratingUnit_factory)); + factory_map.emplace("cim:ThermalGeneratingUnit", &ThermalGeneratingUnit_factory); } void ThermalGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -79,7 +76,7 @@ void ThermalGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ThermalGeneratingUnit.FossilFuels"), &assign_ThermalGeneratingUnit_FossilFuels)); + assign_map.emplace("cim:ThermalGeneratingUnit.FossilFuels", &assign_ThermalGeneratingUnit_FossilFuels); } void ThermalGeneratingUnit::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/ThermalGeneratingUnit.hpp b/CGMES_2.4.13_18DEC2013/ThermalGeneratingUnit.hpp index 68b3885e4..2bbb34a5f 100644 --- a/CGMES_2.4.13_18DEC2013/ThermalGeneratingUnit.hpp +++ b/CGMES_2.4.13_18DEC2013/ThermalGeneratingUnit.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class FossilFuel; - /* - A generating unit whose prime mover could be a steam turbine, combustion turbine, or diesel engine. - */ + /** \brief A generating unit whose prime mover could be a steam turbine, combustion turbine, or diesel engine. */ class ThermalGeneratingUnit : public GeneratingUnit { public: @@ -27,7 +25,8 @@ namespace CIMPP ThermalGeneratingUnit(); ~ThermalGeneratingUnit() override; - std::list FossilFuels; /* A thermal generating unit may have one or more fossil fuels. Default: 0 */ + /** \brief A thermal generating unit may have one or more fossil fuels. Default: 0 */ + std::list FossilFuels; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/TieFlow.cpp b/CGMES_2.4.13_18DEC2013/TieFlow.cpp index 1c2a320b7..324dce327 100644 --- a/CGMES_2.4.13_18DEC2013/TieFlow.cpp +++ b/CGMES_2.4.13_18DEC2013/TieFlow.cpp @@ -10,12 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "ControlArea.hpp" #include "Terminal.hpp" -#include "Boolean.hpp" using namespace CIMPP; -TieFlow::TieFlow() : ControlArea(nullptr), Terminal(nullptr) {}; -TieFlow::~TieFlow() {}; +TieFlow::TieFlow() : ControlArea(nullptr), Terminal(nullptr) {} +TieFlow::~TieFlow() {} static const std::list PossibleProfilesForClass = { @@ -44,21 +43,6 @@ TieFlow::getPossibleProfilesForAttributes() const return map; } - -bool assign_TieFlow_positiveFlowIn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TieFlow* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->positiveFlowIn; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ControlArea_TieFlow(BaseClass*, BaseClass*); bool assign_TieFlow_ControlArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -75,6 +59,7 @@ bool assign_TieFlow_ControlArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ } return false; } + bool assign_Terminal_TieFlow(BaseClass*, BaseClass*); bool assign_TieFlow_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -92,24 +77,24 @@ bool assign_TieFlow_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr return false; } -bool get_TieFlow_positiveFlowIn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TieFlow_positiveFlowIn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TieFlow* element = dynamic_cast(BaseClass_ptr1)) + TieFlow* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->positiveFlowIn; - if (!buffer.str().empty()) + buffer >> element->positiveFlowIn; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_TieFlow_ControlArea(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TieFlow* element = dynamic_cast(BaseClass_ptr1)) + const TieFlow* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ControlArea != 0) { @@ -122,7 +107,8 @@ bool get_TieFlow_ControlArea(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TieFlow* element = dynamic_cast(BaseClass_ptr1)) + const TieFlow* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Terminal != 0) { @@ -133,6 +119,20 @@ bool get_TieFlow_Terminal(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->positiveFlowIn; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char TieFlow::debugName[] = "TieFlow"; const char* TieFlow::debugString() const @@ -142,18 +142,18 @@ const char* TieFlow::debugString() const void TieFlow::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TieFlow"), &TieFlow_factory)); + factory_map.emplace("cim:TieFlow", &TieFlow_factory); } void TieFlow::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TieFlow.positiveFlowIn"), &assign_TieFlow_positiveFlowIn)); + assign_map.emplace("cim:TieFlow.positiveFlowIn", &assign_TieFlow_positiveFlowIn); } void TieFlow::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TieFlow.ControlArea"), &assign_TieFlow_ControlArea)); - assign_map.insert(std::make_pair(std::string("cim:TieFlow.Terminal"), &assign_TieFlow_Terminal)); + assign_map.emplace("cim:TieFlow.ControlArea", &assign_TieFlow_ControlArea); + assign_map.emplace("cim:TieFlow.Terminal", &assign_TieFlow_Terminal); } void TieFlow::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/TieFlow.hpp b/CGMES_2.4.13_18DEC2013/TieFlow.hpp index 5b7a975f9..b25ac939b 100644 --- a/CGMES_2.4.13_18DEC2013/TieFlow.hpp +++ b/CGMES_2.4.13_18DEC2013/TieFlow.hpp @@ -19,9 +19,7 @@ namespace CIMPP class ControlArea; class Terminal; - /* - A flow specification in terms of location and direction for a control area. - */ + /** \brief A flow specification in terms of location and direction for a control area. */ class TieFlow : public BaseClass { public: @@ -29,9 +27,14 @@ namespace CIMPP TieFlow(); ~TieFlow() override; - CIMPP::ControlArea* ControlArea; /* The control area of the tie flows. Default: 0 */ - CIMPP::Terminal* Terminal; /* The terminal to which this tie flow belongs. Default: 0 */ - CIMPP::Boolean positiveFlowIn; /* True if the flow into the terminal (load convention) is also flow into the control area. For example, this attribute should be true if using the tie line terminal further away from the control area. For example to represent a tie to a shunt component (like a load or generator) in another area, this is the near end of a branch and this attribute would be specified as false. Default: false */ + /** \brief The control area of the tie flows. Default: 0 */ + CIMPP::ControlArea* ControlArea; + + /** \brief The terminal to which this tie flow belongs. Default: 0 */ + CIMPP::Terminal* Terminal; + + /** \brief True if the flow into the terminal (load convention) is also flow into the control area. For example, this attribute should be true if using the tie line terminal further away from the control area. For example to represent a tie to a shunt component (like a load or generator) in another area, this is the near end of a branch and this attribute would be specified as false. Default: false */ + CIMPP::Boolean positiveFlowIn; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/TopologicalIsland.cpp b/CGMES_2.4.13_18DEC2013/TopologicalIsland.cpp index 03db597fa..46b353666 100644 --- a/CGMES_2.4.13_18DEC2013/TopologicalIsland.cpp +++ b/CGMES_2.4.13_18DEC2013/TopologicalIsland.cpp @@ -8,13 +8,12 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "TopologicalNode.hpp" #include "TopologicalNode.hpp" using namespace CIMPP; -TopologicalIsland::TopologicalIsland() : AngleRefTopologicalNode(nullptr) {}; -TopologicalIsland::~TopologicalIsland() {}; +TopologicalIsland::TopologicalIsland() : AngleRefTopologicalNode(nullptr) {} +TopologicalIsland::~TopologicalIsland() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +41,6 @@ TopologicalIsland::getPossibleProfilesForAttributes() const return map; } - - bool assign_TopologicalNode_AngleRefTopologicalIsland(BaseClass*, BaseClass*); bool assign_TopologicalIsland_AngleRefTopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +57,7 @@ bool assign_TopologicalIsland_AngleRefTopologicalNode(BaseClass* BaseClass_ptr1, } return false; } + bool assign_TopologicalNode_TopologicalIsland(BaseClass*, BaseClass*); bool assign_TopologicalIsland_TopologicalNodes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +75,10 @@ bool assign_TopologicalIsland_TopologicalNodes(BaseClass* BaseClass_ptr1, BaseCl return false; } - bool get_TopologicalIsland_AngleRefTopologicalNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TopologicalIsland* element = dynamic_cast(BaseClass_ptr1)) + const TopologicalIsland* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->AngleRefTopologicalNode != 0) { @@ -93,7 +91,8 @@ bool get_TopologicalIsland_AngleRefTopologicalNode(const BaseClass* BaseClass_pt bool get_TopologicalIsland_TopologicalNodes(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TopologicalIsland* element = dynamic_cast(BaseClass_ptr1)) + const TopologicalIsland* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { std::copy(element->TopologicalNodes.begin(), element->TopologicalNodes.end(), std::back_inserter(BaseClass_list)); return !BaseClass_list.empty(); @@ -101,7 +100,6 @@ bool get_TopologicalIsland_TopologicalNodes(const BaseClass* BaseClass_ptr1, std return false; } - const char TopologicalIsland::debugName[] = "TopologicalIsland"; const char* TopologicalIsland::debugString() const { @@ -110,7 +108,7 @@ const char* TopologicalIsland::debugString() const void TopologicalIsland::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TopologicalIsland"), &TopologicalIsland_factory)); + factory_map.emplace("cim:TopologicalIsland", &TopologicalIsland_factory); } void TopologicalIsland::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -119,8 +117,8 @@ void TopologicalIsland::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TopologicalIsland.AngleRefTopologicalNode"), &assign_TopologicalIsland_AngleRefTopologicalNode)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalIsland.TopologicalNodes"), &assign_TopologicalIsland_TopologicalNodes)); + assign_map.emplace("cim:TopologicalIsland.AngleRefTopologicalNode", &assign_TopologicalIsland_AngleRefTopologicalNode); + assign_map.emplace("cim:TopologicalIsland.TopologicalNodes", &assign_TopologicalIsland_TopologicalNodes); } void TopologicalIsland::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/TopologicalIsland.hpp b/CGMES_2.4.13_18DEC2013/TopologicalIsland.hpp index 26dc94200..a6c5a898c 100644 --- a/CGMES_2.4.13_18DEC2013/TopologicalIsland.hpp +++ b/CGMES_2.4.13_18DEC2013/TopologicalIsland.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class TopologicalNode; - /* - An electrically connected subset of the network. Topological islands can change as the current network state changes: e.g. due to - disconnect switches or breakers change state in a SCADA/EMS - manual creation, change or deletion of topological nodes in a planning tool. - */ + /** \brief An electrically connected subset of the network. Topological islands can change as the current network state changes: e.g. due to - disconnect switches or breakers change state in a SCADA/EMS - manual creation, change or deletion of topological nodes in a planning tool. */ class TopologicalIsland : public IdentifiedObject { public: @@ -27,8 +25,11 @@ namespace CIMPP TopologicalIsland(); ~TopologicalIsland() override; - CIMPP::TopologicalNode* AngleRefTopologicalNode; /* The angle reference for the island. Normally there is one TopologicalNode that is selected as the angle reference for each island. Other reference schemes exist, so the association is typically optional. Default: 0 */ - std::list TopologicalNodes; /* A topological node belongs to a topological island. Default: 0 */ + /** \brief The angle reference for the island. Normally there is one TopologicalNode that is selected as the angle reference for each island. Other reference schemes exist, so the association is typically optional. Default: 0 */ + CIMPP::TopologicalNode* AngleRefTopologicalNode; + + /** \brief A topological node belongs to a topological island. Default: 0 */ + std::list TopologicalNodes; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/TopologicalNode.cpp b/CGMES_2.4.13_18DEC2013/TopologicalNode.cpp index 07fba3691..962a0d94b 100644 --- a/CGMES_2.4.13_18DEC2013/TopologicalNode.cpp +++ b/CGMES_2.4.13_18DEC2013/TopologicalNode.cpp @@ -8,27 +8,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "TopologicalIsland.hpp" #include "BaseVoltage.hpp" -#include "ConnectivityNodeContainer.hpp" #include "ConnectivityNode.hpp" +#include "ConnectivityNodeContainer.hpp" #include "ReportingGroup.hpp" #include "SvInjection.hpp" #include "SvVoltage.hpp" #include "Terminal.hpp" #include "TopologicalIsland.hpp" -#include "Boolean.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -TopologicalNode::TopologicalNode() : AngleRefTopologicalIsland(nullptr), BaseVoltage(nullptr), ConnectivityNodeContainer(nullptr), ReportingGroup(nullptr), SvInjection(nullptr), SvVoltage(nullptr), TopologicalIsland(nullptr) {}; -TopologicalNode::~TopologicalNode() {}; +TopologicalNode::TopologicalNode() : AngleRefTopologicalIsland(nullptr), BaseVoltage(nullptr), ConnectivityNodeContainer(nullptr), ReportingGroup(nullptr), SvInjection(nullptr), SvVoltage(nullptr), TopologicalIsland(nullptr) {} +TopologicalNode::~TopologicalNode() {} static const std::list PossibleProfilesForClass = { @@ -72,99 +64,6 @@ TopologicalNode::getPossibleProfilesForAttributes() const return map; } - -bool assign_TopologicalNode_boundaryPoint(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->boundaryPoint; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_TopologicalNode_fromEndIsoCode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) - { - element->fromEndIsoCode = buffer.str(); - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_TopologicalNode_fromEndName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) - { - element->fromEndName = buffer.str(); - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_TopologicalNode_fromEndNameTso(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) - { - element->fromEndNameTso = buffer.str(); - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_TopologicalNode_toEndIsoCode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) - { - element->toEndIsoCode = buffer.str(); - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_TopologicalNode_toEndName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) - { - element->toEndName = buffer.str(); - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_TopologicalNode_toEndNameTso(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) - { - element->toEndNameTso = buffer.str(); - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_TopologicalIsland_AngleRefTopologicalNode(BaseClass*, BaseClass*); bool assign_TopologicalNode_AngleRefTopologicalIsland(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -181,6 +80,7 @@ bool assign_TopologicalNode_AngleRefTopologicalIsland(BaseClass* BaseClass_ptr1, } return false; } + bool assign_BaseVoltage_TopologicalNode(BaseClass*, BaseClass*); bool assign_TopologicalNode_BaseVoltage(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -197,6 +97,7 @@ bool assign_TopologicalNode_BaseVoltage(BaseClass* BaseClass_ptr1, BaseClass* Ba } return false; } + bool assign_ConnectivityNodeContainer_TopologicalNode(BaseClass*, BaseClass*); bool assign_TopologicalNode_ConnectivityNodeContainer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -213,6 +114,7 @@ bool assign_TopologicalNode_ConnectivityNodeContainer(BaseClass* BaseClass_ptr1, } return false; } + bool assign_ConnectivityNode_TopologicalNode(BaseClass*, BaseClass*); bool assign_TopologicalNode_ConnectivityNodes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -229,6 +131,7 @@ bool assign_TopologicalNode_ConnectivityNodes(BaseClass* BaseClass_ptr1, BaseCla } return false; } + bool assign_ReportingGroup_TopologicalNode(BaseClass*, BaseClass*); bool assign_TopologicalNode_ReportingGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -245,6 +148,7 @@ bool assign_TopologicalNode_ReportingGroup(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_SvInjection_TopologicalNode(BaseClass*, BaseClass*); bool assign_TopologicalNode_SvInjection(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -261,6 +165,7 @@ bool assign_TopologicalNode_SvInjection(BaseClass* BaseClass_ptr1, BaseClass* Ba } return false; } + bool assign_SvVoltage_TopologicalNode(BaseClass*, BaseClass*); bool assign_TopologicalNode_SvVoltage(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -277,6 +182,7 @@ bool assign_TopologicalNode_SvVoltage(BaseClass* BaseClass_ptr1, BaseClass* Base } return false; } + bool assign_Terminal_TopologicalNode(BaseClass*, BaseClass*); bool assign_TopologicalNode_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -293,6 +199,7 @@ bool assign_TopologicalNode_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseC } return false; } + bool assign_TopologicalIsland_TopologicalNodes(BaseClass*, BaseClass*); bool assign_TopologicalNode_TopologicalIsland(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -310,108 +217,109 @@ bool assign_TopologicalNode_TopologicalIsland(BaseClass* BaseClass_ptr1, BaseCla return false; } -bool get_TopologicalNode_boundaryPoint(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TopologicalNode_boundaryPoint(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->boundaryPoint; - if (!buffer.str().empty()) + buffer >> element->boundaryPoint; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_TopologicalNode_fromEndIsoCode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TopologicalNode_fromEndIsoCode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->fromEndIsoCode; - if (!buffer.str().empty()) + element->fromEndIsoCode = buffer.str(); + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_TopologicalNode_fromEndName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TopologicalNode_fromEndName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->fromEndName; - if (!buffer.str().empty()) + element->fromEndName = buffer.str(); + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_TopologicalNode_fromEndNameTso(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TopologicalNode_fromEndNameTso(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->fromEndNameTso; - if (!buffer.str().empty()) + element->fromEndNameTso = buffer.str(); + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_TopologicalNode_toEndIsoCode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TopologicalNode_toEndIsoCode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->toEndIsoCode; - if (!buffer.str().empty()) + element->toEndIsoCode = buffer.str(); + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_TopologicalNode_toEndName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TopologicalNode_toEndName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->toEndName; - if (!buffer.str().empty()) + element->toEndName = buffer.str(); + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_TopologicalNode_toEndNameTso(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TopologicalNode_toEndNameTso(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->toEndNameTso; - if (!buffer.str().empty()) + element->toEndNameTso = buffer.str(); + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } bool get_TopologicalNode_BaseVoltage(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + const TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->BaseVoltage != 0) { @@ -424,7 +332,8 @@ bool get_TopologicalNode_BaseVoltage(const BaseClass* BaseClass_ptr1, std::list< bool get_TopologicalNode_ConnectivityNodeContainer(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + const TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ConnectivityNodeContainer != 0) { @@ -435,9 +344,11 @@ bool get_TopologicalNode_ConnectivityNodeContainer(const BaseClass* BaseClass_pt return false; } + bool get_TopologicalNode_ReportingGroup(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + const TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ReportingGroup != 0) { @@ -449,6 +360,114 @@ bool get_TopologicalNode_ReportingGroup(const BaseClass* BaseClass_ptr1, std::li } + + + +bool get_TopologicalNode_boundaryPoint(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->boundaryPoint; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_TopologicalNode_fromEndIsoCode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->fromEndIsoCode; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_TopologicalNode_fromEndName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->fromEndName; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_TopologicalNode_fromEndNameTso(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->fromEndNameTso; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_TopologicalNode_toEndIsoCode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->toEndIsoCode; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_TopologicalNode_toEndName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->toEndName; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_TopologicalNode_toEndNameTso(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->toEndNameTso; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + const char TopologicalNode::debugName[] = "TopologicalNode"; const char* TopologicalNode::debugString() const { @@ -457,31 +476,31 @@ const char* TopologicalNode::debugString() const void TopologicalNode::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TopologicalNode"), &TopologicalNode_factory)); + factory_map.emplace("cim:TopologicalNode", &TopologicalNode_factory); } void TopologicalNode::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.boundaryPoint"), &assign_TopologicalNode_boundaryPoint)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.fromEndIsoCode"), &assign_TopologicalNode_fromEndIsoCode)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.fromEndName"), &assign_TopologicalNode_fromEndName)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.fromEndNameTso"), &assign_TopologicalNode_fromEndNameTso)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.toEndIsoCode"), &assign_TopologicalNode_toEndIsoCode)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.toEndName"), &assign_TopologicalNode_toEndName)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.toEndNameTso"), &assign_TopologicalNode_toEndNameTso)); + assign_map.emplace("cim:TopologicalNode.boundaryPoint", &assign_TopologicalNode_boundaryPoint); + assign_map.emplace("cim:TopologicalNode.fromEndIsoCode", &assign_TopologicalNode_fromEndIsoCode); + assign_map.emplace("cim:TopologicalNode.fromEndName", &assign_TopologicalNode_fromEndName); + assign_map.emplace("cim:TopologicalNode.fromEndNameTso", &assign_TopologicalNode_fromEndNameTso); + assign_map.emplace("cim:TopologicalNode.toEndIsoCode", &assign_TopologicalNode_toEndIsoCode); + assign_map.emplace("cim:TopologicalNode.toEndName", &assign_TopologicalNode_toEndName); + assign_map.emplace("cim:TopologicalNode.toEndNameTso", &assign_TopologicalNode_toEndNameTso); } void TopologicalNode::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.AngleRefTopologicalIsland"), &assign_TopologicalNode_AngleRefTopologicalIsland)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.BaseVoltage"), &assign_TopologicalNode_BaseVoltage)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.ConnectivityNodeContainer"), &assign_TopologicalNode_ConnectivityNodeContainer)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.ConnectivityNodes"), &assign_TopologicalNode_ConnectivityNodes)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.ReportingGroup"), &assign_TopologicalNode_ReportingGroup)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.SvInjection"), &assign_TopologicalNode_SvInjection)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.SvVoltage"), &assign_TopologicalNode_SvVoltage)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.Terminal"), &assign_TopologicalNode_Terminal)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.TopologicalIsland"), &assign_TopologicalNode_TopologicalIsland)); + assign_map.emplace("cim:TopologicalNode.AngleRefTopologicalIsland", &assign_TopologicalNode_AngleRefTopologicalIsland); + assign_map.emplace("cim:TopologicalNode.BaseVoltage", &assign_TopologicalNode_BaseVoltage); + assign_map.emplace("cim:TopologicalNode.ConnectivityNodeContainer", &assign_TopologicalNode_ConnectivityNodeContainer); + assign_map.emplace("cim:TopologicalNode.ConnectivityNodes", &assign_TopologicalNode_ConnectivityNodes); + assign_map.emplace("cim:TopologicalNode.ReportingGroup", &assign_TopologicalNode_ReportingGroup); + assign_map.emplace("cim:TopologicalNode.SvInjection", &assign_TopologicalNode_SvInjection); + assign_map.emplace("cim:TopologicalNode.SvVoltage", &assign_TopologicalNode_SvVoltage); + assign_map.emplace("cim:TopologicalNode.Terminal", &assign_TopologicalNode_Terminal); + assign_map.emplace("cim:TopologicalNode.TopologicalIsland", &assign_TopologicalNode_TopologicalIsland); } void TopologicalNode::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/TopologicalNode.hpp b/CGMES_2.4.13_18DEC2013/TopologicalNode.hpp index 0dfb99b0c..b9eecea3e 100644 --- a/CGMES_2.4.13_18DEC2013/TopologicalNode.hpp +++ b/CGMES_2.4.13_18DEC2013/TopologicalNode.hpp @@ -26,9 +26,7 @@ namespace CIMPP class Terminal; class TopologicalIsland; - /* - For a detailed substation model a topological node is a set of connectivity nodes that, in the current network state, are connected together through any type of closed switches, including jumpers. Topological nodes change as the current network state changes (i.e., switches, breakers, etc. change state). For a planning model, switch statuses are not used to form topological nodes. Instead they are manually created or deleted in a model builder tool. Topological nodes maintained this way are also called "busses". - */ + /** \brief For a detailed substation model a topological node is a set of connectivity nodes that, in the current network state, are connected together through any type of closed switches, including jumpers. Topological nodes change as the current network state changes (i.e., switches, breakers, etc. change state). For a planning model, switch statuses are not used to form topological nodes. Instead they are manually created or deleted in a model builder tool. Topological nodes maintained this way are also called "busses". */ class TopologicalNode : public IdentifiedObject { public: @@ -36,22 +34,53 @@ namespace CIMPP TopologicalNode(); ~TopologicalNode() override; - CIMPP::TopologicalIsland* AngleRefTopologicalIsland; /* The island for which the node is an angle reference. Normally there is one angle reference node for each island. Default: 0 */ - CIMPP::BaseVoltage* BaseVoltage; /* The base voltage of the topologocial node. Default: 0 */ - CIMPP::ConnectivityNodeContainer* ConnectivityNodeContainer; /* The connectivity node container to which the toplogical node belongs. Default: 0 */ - std::list ConnectivityNodes; /* The connectivity nodes combine together to form this topological node. May depend on the current state of switches in the network. Default: 0 */ - CIMPP::ReportingGroup* ReportingGroup; /* The topological nodes that belong to the reporting group. Default: 0 */ - CIMPP::SvInjection* SvInjection; /* The topological node associated with the flow injection state variable. Default: 0 */ - CIMPP::SvVoltage* SvVoltage; /* The topological node associated with the voltage state. Default: 0 */ - std::list Terminal; /* The topological node associated with the terminal. This can be used as an alternative to the connectivity node path to topological node, thus making it unneccesary to model connectivity nodes in some cases. Note that the if connectivity nodes are in the model, this association would probably not be used as an input specification. Default: 0 */ - CIMPP::TopologicalIsland* TopologicalIsland; /* A topological node belongs to a topological island. Default: 0 */ - CIMPP::Boolean boundaryPoint; /* Identifies if a node is a BoundaryPoint. If boundaryPoint=true the ConnectivityNode or the TopologicalNode represents a BoundaryPoint. Default: false */ - CIMPP::String fromEndIsoCode; /* The attribute is used for an exchange of the ISO code of the region to which the `From` side of the Boundary point belongs to or it is connected to. The ISO code is two characters country code as defined by ISO 3166 (). The length of the string is 2 characters maximum. The attribute is a required for the Boundary Model Authority Set where this attribute is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ - CIMPP::String fromEndName; /* The attribute is used for an exchange of a human readable name with length of the string 32 characters maximum. The attribute covers two cases: The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ - CIMPP::String fromEndNameTso; /* The attribute is used for an exchange of the name of the TSO to which the `From` side of the Boundary point belongs to or it is connected to. The length of the string is 32 characters maximum. The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ - CIMPP::String toEndIsoCode; /* The attribute is used for an exchange of the ISO code of the region to which the `To` side of the Boundary point belongs to or it is connected to. The ISO code is two characters country code as defined by ISO 3166 (). The length of the string is 2 characters maximum. The attribute is a required for the Boundary Model Authority Set where this attribute is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ - CIMPP::String toEndName; /* The attribute is used for an exchange of a human readable name with length of the string 32 characters maximum. The attribute covers two cases: The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ - CIMPP::String toEndNameTso; /* The attribute is used for an exchange of the name of the TSO to which the `To` side of the Boundary point belongs to or it is connected to. The length of the string is 32 characters maximum. The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + /** \brief The island for which the node is an angle reference. Normally there is one angle reference node for each island. Default: 0 */ + CIMPP::TopologicalIsland* AngleRefTopologicalIsland; + + /** \brief The base voltage of the topologocial node. Default: 0 */ + CIMPP::BaseVoltage* BaseVoltage; + + /** \brief The connectivity node container to which the toplogical node belongs. Default: 0 */ + CIMPP::ConnectivityNodeContainer* ConnectivityNodeContainer; + + /** \brief The connectivity nodes combine together to form this topological node. May depend on the current state of switches in the network. Default: 0 */ + std::list ConnectivityNodes; + + /** \brief The topological nodes that belong to the reporting group. Default: 0 */ + CIMPP::ReportingGroup* ReportingGroup; + + /** \brief The topological node associated with the flow injection state variable. Default: 0 */ + CIMPP::SvInjection* SvInjection; + + /** \brief The topological node associated with the voltage state. Default: 0 */ + CIMPP::SvVoltage* SvVoltage; + + /** \brief The topological node associated with the terminal. This can be used as an alternative to the connectivity node path to topological node, thus making it unneccesary to model connectivity nodes in some cases. Note that the if connectivity nodes are in the model, this association would probably not be used as an input specification. Default: 0 */ + std::list Terminal; + + /** \brief A topological node belongs to a topological island. Default: 0 */ + CIMPP::TopologicalIsland* TopologicalIsland; + + /** \brief Identifies if a node is a BoundaryPoint. If boundaryPoint=true the ConnectivityNode or the TopologicalNode represents a BoundaryPoint. Default: false */ + CIMPP::Boolean boundaryPoint; + + /** \brief The attribute is used for an exchange of the ISO code of the region to which the `From` side of the Boundary point belongs to or it is connected to. The ISO code is two characters country code as defined by ISO 3166 (). The length of the string is 2 characters maximum. The attribute is a required for the Boundary Model Authority Set where this attribute is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + CIMPP::String fromEndIsoCode; + + /** \brief The attribute is used for an exchange of a human readable name with length of the string 32 characters maximum. The attribute covers two cases: The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + CIMPP::String fromEndName; + + /** \brief The attribute is used for an exchange of the name of the TSO to which the `From` side of the Boundary point belongs to or it is connected to. The length of the string is 32 characters maximum. The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + CIMPP::String fromEndNameTso; + + /** \brief The attribute is used for an exchange of the ISO code of the region to which the `To` side of the Boundary point belongs to or it is connected to. The ISO code is two characters country code as defined by ISO 3166 (). The length of the string is 2 characters maximum. The attribute is a required for the Boundary Model Authority Set where this attribute is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + CIMPP::String toEndIsoCode; + + /** \brief The attribute is used for an exchange of a human readable name with length of the string 32 characters maximum. The attribute covers two cases: The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + CIMPP::String toEndName; + + /** \brief The attribute is used for an exchange of the name of the TSO to which the `To` side of the Boundary point belongs to or it is connected to. The length of the string is 32 characters maximum. The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + CIMPP::String toEndNameTso; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/TopologyBoundaryVersion.cpp b/CGMES_2.4.13_18DEC2013/TopologyBoundaryVersion.cpp index 5fd7f7165..ca78ca44d 100644 --- a/CGMES_2.4.13_18DEC2013/TopologyBoundaryVersion.cpp +++ b/CGMES_2.4.13_18DEC2013/TopologyBoundaryVersion.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "String.hpp" -#include "String.hpp" -#include "Date.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -TopologyBoundaryVersion::TopologyBoundaryVersion() {}; -TopologyBoundaryVersion::~TopologyBoundaryVersion() {}; +TopologyBoundaryVersion::TopologyBoundaryVersion() {} +TopologyBoundaryVersion::~TopologyBoundaryVersion() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ TopologyBoundaryVersion::getPossibleProfilesForAttributes() const return map; } - -bool assign_TopologyBoundaryVersion_baseUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyBoundaryVersion_baseUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyBoundaryVersion_baseURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyBoundaryVersion_baseURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyBoundaryVersion_date(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyBoundaryVersion_date(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->date = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyBoundaryVersion_differenceModelURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyBoundaryVersion_differenceModelURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->differenceModelURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyBoundaryVersion_entsoeUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyBoundaryVersion_entsoeUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyBoundaryVersion_entsoeURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyBoundaryVersion_entsoeURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyBoundaryVersion_modelDescriptionURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyBoundaryVersion_modelDescriptionURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->modelDescriptionURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyBoundaryVersion_namespaceRDF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyBoundaryVersion_namespaceRDF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceRDF = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyBoundaryVersion_namespaceUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyBoundaryVersion_namespaceUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyBoundaryVersion_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyBoundaryVersion_shortName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->shortName = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_TopologyBoundaryVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseUML; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_TopologyBoundaryVersion_baseUML(const BaseClass* BaseClass_ptr1, std::s bool get_TopologyBoundaryVersion_baseURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseURI; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_TopologyBoundaryVersion_baseURI(const BaseClass* BaseClass_ptr1, std::s bool get_TopologyBoundaryVersion_date(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->date; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_TopologyBoundaryVersion_date(const BaseClass* BaseClass_ptr1, std::stri bool get_TopologyBoundaryVersion_differenceModelURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->differenceModelURI; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_TopologyBoundaryVersion_differenceModelURI(const BaseClass* BaseClass_p bool get_TopologyBoundaryVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeUML; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_TopologyBoundaryVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std: bool get_TopologyBoundaryVersion_entsoeURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeURI; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_TopologyBoundaryVersion_entsoeURI(const BaseClass* BaseClass_ptr1, std: bool get_TopologyBoundaryVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->modelDescriptionURI; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_TopologyBoundaryVersion_modelDescriptionURI(const BaseClass* BaseClass_ bool get_TopologyBoundaryVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceRDF; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_TopologyBoundaryVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, s bool get_TopologyBoundaryVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceUML; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_TopologyBoundaryVersion_namespaceUML(const BaseClass* BaseClass_ptr1, s bool get_TopologyBoundaryVersion_shortName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortName; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_TopologyBoundaryVersion_shortName(const BaseClass* BaseClass_ptr1, std: return false; } - - const char TopologyBoundaryVersion::debugName[] = "TopologyBoundaryVersion"; const char* TopologyBoundaryVersion::debugString() const { @@ -341,21 +346,21 @@ const char* TopologyBoundaryVersion::debugString() const void TopologyBoundaryVersion::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TopologyBoundaryVersion"), &TopologyBoundaryVersion_factory)); + factory_map.emplace("cim:TopologyBoundaryVersion", &TopologyBoundaryVersion_factory); } void TopologyBoundaryVersion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TopologyBoundaryVersion.baseUML"), &assign_TopologyBoundaryVersion_baseUML)); - assign_map.insert(std::make_pair(std::string("cim:TopologyBoundaryVersion.baseURI"), &assign_TopologyBoundaryVersion_baseURI)); - assign_map.insert(std::make_pair(std::string("cim:TopologyBoundaryVersion.date"), &assign_TopologyBoundaryVersion_date)); - assign_map.insert(std::make_pair(std::string("cim:TopologyBoundaryVersion.differenceModelURI"), &assign_TopologyBoundaryVersion_differenceModelURI)); - assign_map.insert(std::make_pair(std::string("cim:TopologyBoundaryVersion.entsoeUML"), &assign_TopologyBoundaryVersion_entsoeUML)); - assign_map.insert(std::make_pair(std::string("cim:TopologyBoundaryVersion.entsoeURI"), &assign_TopologyBoundaryVersion_entsoeURI)); - assign_map.insert(std::make_pair(std::string("cim:TopologyBoundaryVersion.modelDescriptionURI"), &assign_TopologyBoundaryVersion_modelDescriptionURI)); - assign_map.insert(std::make_pair(std::string("cim:TopologyBoundaryVersion.namespaceRDF"), &assign_TopologyBoundaryVersion_namespaceRDF)); - assign_map.insert(std::make_pair(std::string("cim:TopologyBoundaryVersion.namespaceUML"), &assign_TopologyBoundaryVersion_namespaceUML)); - assign_map.insert(std::make_pair(std::string("cim:TopologyBoundaryVersion.shortName"), &assign_TopologyBoundaryVersion_shortName)); + assign_map.emplace("cim:TopologyBoundaryVersion.baseUML", &assign_TopologyBoundaryVersion_baseUML); + assign_map.emplace("cim:TopologyBoundaryVersion.baseURI", &assign_TopologyBoundaryVersion_baseURI); + assign_map.emplace("cim:TopologyBoundaryVersion.date", &assign_TopologyBoundaryVersion_date); + assign_map.emplace("cim:TopologyBoundaryVersion.differenceModelURI", &assign_TopologyBoundaryVersion_differenceModelURI); + assign_map.emplace("cim:TopologyBoundaryVersion.entsoeUML", &assign_TopologyBoundaryVersion_entsoeUML); + assign_map.emplace("cim:TopologyBoundaryVersion.entsoeURI", &assign_TopologyBoundaryVersion_entsoeURI); + assign_map.emplace("cim:TopologyBoundaryVersion.modelDescriptionURI", &assign_TopologyBoundaryVersion_modelDescriptionURI); + assign_map.emplace("cim:TopologyBoundaryVersion.namespaceRDF", &assign_TopologyBoundaryVersion_namespaceRDF); + assign_map.emplace("cim:TopologyBoundaryVersion.namespaceUML", &assign_TopologyBoundaryVersion_namespaceUML); + assign_map.emplace("cim:TopologyBoundaryVersion.shortName", &assign_TopologyBoundaryVersion_shortName); } void TopologyBoundaryVersion::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/TopologyBoundaryVersion.hpp b/CGMES_2.4.13_18DEC2013/TopologyBoundaryVersion.hpp index 4a7c617ba..54e049f56 100644 --- a/CGMES_2.4.13_18DEC2013/TopologyBoundaryVersion.hpp +++ b/CGMES_2.4.13_18DEC2013/TopologyBoundaryVersion.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Version details. - */ + /** \brief Version details. */ class TopologyBoundaryVersion : public BaseClass { public: @@ -28,16 +26,35 @@ namespace CIMPP TopologyBoundaryVersion(); ~TopologyBoundaryVersion() override; - CIMPP::String baseUML; /* Base UML provided by CIM model manager. Default: '' */ - CIMPP::String baseURI; /* Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ - CIMPP::Date date; /* Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ - CIMPP::String differenceModelURI; /* Difference model URI defined by IEC 61970-552. Default: '' */ - CIMPP::String entsoeUML; /* UML provided by ENTSO-E. Default: '' */ - CIMPP::String entsoeURI; /* Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/TopologyBoundary/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ - CIMPP::String modelDescriptionURI; /* Model Description URI defined by IEC 61970-552. Default: '' */ - CIMPP::String namespaceRDF; /* RDF namespace. Default: '' */ - CIMPP::String namespaceUML; /* CIM UML namespace. Default: '' */ - CIMPP::String shortName; /* The short name of the profile used in profile documentation. Default: '' */ + /** \brief Base UML provided by CIM model manager. Default: '' */ + CIMPP::String baseUML; + + /** \brief Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ + CIMPP::String baseURI; + + /** \brief Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ + CIMPP::Date date; + + /** \brief Difference model URI defined by IEC 61970-552. Default: '' */ + CIMPP::String differenceModelURI; + + /** \brief UML provided by ENTSO-E. Default: '' */ + CIMPP::String entsoeUML; + + /** \brief Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/TopologyBoundary/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ + CIMPP::String entsoeURI; + + /** \brief Model Description URI defined by IEC 61970-552. Default: '' */ + CIMPP::String modelDescriptionURI; + + /** \brief RDF namespace. Default: '' */ + CIMPP::String namespaceRDF; + + /** \brief CIM UML namespace. Default: '' */ + CIMPP::String namespaceUML; + + /** \brief The short name of the profile used in profile documentation. Default: '' */ + CIMPP::String shortName; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/TopologyVersion.cpp b/CGMES_2.4.13_18DEC2013/TopologyVersion.cpp index c8bfafdca..e54da7674 100644 --- a/CGMES_2.4.13_18DEC2013/TopologyVersion.cpp +++ b/CGMES_2.4.13_18DEC2013/TopologyVersion.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "String.hpp" -#include "String.hpp" -#include "Date.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -TopologyVersion::TopologyVersion() {}; -TopologyVersion::~TopologyVersion() {}; +TopologyVersion::TopologyVersion() {} +TopologyVersion::~TopologyVersion() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ TopologyVersion::getPossibleProfilesForAttributes() const return map; } - -bool assign_TopologyVersion_baseUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyVersion_baseUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyVersion_baseURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyVersion_baseURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyVersion_date(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyVersion_date(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->date = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyVersion_differenceModelURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyVersion_differenceModelURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->differenceModelURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyVersion_entsoeUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyVersion_entsoeUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyVersion_entsoeURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyVersion_entsoeURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyVersion_modelDescriptionURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyVersion_modelDescriptionURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->modelDescriptionURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyVersion_namespaceRDF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyVersion_namespaceRDF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceRDF = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyVersion_namespaceUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyVersion_namespaceUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyVersion_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyVersion_shortName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->shortName = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_TopologyVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseUML; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_TopologyVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stringstr bool get_TopologyVersion_baseURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseURI; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_TopologyVersion_baseURI(const BaseClass* BaseClass_ptr1, std::stringstr bool get_TopologyVersion_date(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->date; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_TopologyVersion_date(const BaseClass* BaseClass_ptr1, std::stringstream bool get_TopologyVersion_differenceModelURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->differenceModelURI; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_TopologyVersion_differenceModelURI(const BaseClass* BaseClass_ptr1, std bool get_TopologyVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeUML; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_TopologyVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::strings bool get_TopologyVersion_entsoeURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeURI; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_TopologyVersion_entsoeURI(const BaseClass* BaseClass_ptr1, std::strings bool get_TopologyVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->modelDescriptionURI; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_TopologyVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr1, st bool get_TopologyVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceRDF; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_TopologyVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std::stri bool get_TopologyVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceUML; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_TopologyVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std::stri bool get_TopologyVersion_shortName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortName; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_TopologyVersion_shortName(const BaseClass* BaseClass_ptr1, std::strings return false; } - - const char TopologyVersion::debugName[] = "TopologyVersion"; const char* TopologyVersion::debugString() const { @@ -341,21 +346,21 @@ const char* TopologyVersion::debugString() const void TopologyVersion::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TopologyVersion"), &TopologyVersion_factory)); + factory_map.emplace("cim:TopologyVersion", &TopologyVersion_factory); } void TopologyVersion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TopologyVersion.baseUML"), &assign_TopologyVersion_baseUML)); - assign_map.insert(std::make_pair(std::string("cim:TopologyVersion.baseURI"), &assign_TopologyVersion_baseURI)); - assign_map.insert(std::make_pair(std::string("cim:TopologyVersion.date"), &assign_TopologyVersion_date)); - assign_map.insert(std::make_pair(std::string("cim:TopologyVersion.differenceModelURI"), &assign_TopologyVersion_differenceModelURI)); - assign_map.insert(std::make_pair(std::string("cim:TopologyVersion.entsoeUML"), &assign_TopologyVersion_entsoeUML)); - assign_map.insert(std::make_pair(std::string("cim:TopologyVersion.entsoeURI"), &assign_TopologyVersion_entsoeURI)); - assign_map.insert(std::make_pair(std::string("cim:TopologyVersion.modelDescriptionURI"), &assign_TopologyVersion_modelDescriptionURI)); - assign_map.insert(std::make_pair(std::string("cim:TopologyVersion.namespaceRDF"), &assign_TopologyVersion_namespaceRDF)); - assign_map.insert(std::make_pair(std::string("cim:TopologyVersion.namespaceUML"), &assign_TopologyVersion_namespaceUML)); - assign_map.insert(std::make_pair(std::string("cim:TopologyVersion.shortName"), &assign_TopologyVersion_shortName)); + assign_map.emplace("cim:TopologyVersion.baseUML", &assign_TopologyVersion_baseUML); + assign_map.emplace("cim:TopologyVersion.baseURI", &assign_TopologyVersion_baseURI); + assign_map.emplace("cim:TopologyVersion.date", &assign_TopologyVersion_date); + assign_map.emplace("cim:TopologyVersion.differenceModelURI", &assign_TopologyVersion_differenceModelURI); + assign_map.emplace("cim:TopologyVersion.entsoeUML", &assign_TopologyVersion_entsoeUML); + assign_map.emplace("cim:TopologyVersion.entsoeURI", &assign_TopologyVersion_entsoeURI); + assign_map.emplace("cim:TopologyVersion.modelDescriptionURI", &assign_TopologyVersion_modelDescriptionURI); + assign_map.emplace("cim:TopologyVersion.namespaceRDF", &assign_TopologyVersion_namespaceRDF); + assign_map.emplace("cim:TopologyVersion.namespaceUML", &assign_TopologyVersion_namespaceUML); + assign_map.emplace("cim:TopologyVersion.shortName", &assign_TopologyVersion_shortName); } void TopologyVersion::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/TopologyVersion.hpp b/CGMES_2.4.13_18DEC2013/TopologyVersion.hpp index 7e0f6da91..5c9119a35 100644 --- a/CGMES_2.4.13_18DEC2013/TopologyVersion.hpp +++ b/CGMES_2.4.13_18DEC2013/TopologyVersion.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Version details. - */ + /** \brief Version details. */ class TopologyVersion : public BaseClass { public: @@ -28,16 +26,35 @@ namespace CIMPP TopologyVersion(); ~TopologyVersion() override; - CIMPP::String baseUML; /* Base UML provided by CIM model manager. Default: '' */ - CIMPP::String baseURI; /* Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ - CIMPP::Date date; /* Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ - CIMPP::String differenceModelURI; /* Difference model URI defined by IEC 61970-552. Default: '' */ - CIMPP::String entsoeUML; /* UML provided by ENTSO-E. Default: '' */ - CIMPP::String entsoeURI; /* Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/Topology/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ - CIMPP::String modelDescriptionURI; /* Model Description URI defined by IEC 61970-552. Default: '' */ - CIMPP::String namespaceRDF; /* RDF namespace. Default: '' */ - CIMPP::String namespaceUML; /* CIM UML namespace. Default: '' */ - CIMPP::String shortName; /* The short name of the profile used in profile documentation. Default: '' */ + /** \brief Base UML provided by CIM model manager. Default: '' */ + CIMPP::String baseUML; + + /** \brief Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ + CIMPP::String baseURI; + + /** \brief Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ + CIMPP::Date date; + + /** \brief Difference model URI defined by IEC 61970-552. Default: '' */ + CIMPP::String differenceModelURI; + + /** \brief UML provided by ENTSO-E. Default: '' */ + CIMPP::String entsoeUML; + + /** \brief Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/Topology/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ + CIMPP::String entsoeURI; + + /** \brief Model Description URI defined by IEC 61970-552. Default: '' */ + CIMPP::String modelDescriptionURI; + + /** \brief RDF namespace. Default: '' */ + CIMPP::String namespaceRDF; + + /** \brief CIM UML namespace. Default: '' */ + CIMPP::String namespaceUML; + + /** \brief The short name of the profile used in profile documentation. Default: '' */ + CIMPP::String shortName; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/TransformerControlMode.cpp b/CGMES_2.4.13_18DEC2013/TransformerControlMode.cpp index 3f49e0952..520a5e156 100644 --- a/CGMES_2.4.13_18DEC2013/TransformerControlMode.cpp +++ b/CGMES_2.4.13_18DEC2013/TransformerControlMode.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "TransformerControlMode") + if (EnumSymbol.substr(0, pos) != "TransformerControlMode") { lop.setstate(std::ios::failbit); return lop; @@ -50,12 +50,12 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "volt") + if (EnumSymbol == "volt") { rop = TransformerControlMode::volt; return lop; } - if(EnumSymbol == "reactive") + if (EnumSymbol == "reactive") { rop = TransformerControlMode::reactive; return lop; diff --git a/CGMES_2.4.13_18DEC2013/TransformerControlMode.hpp b/CGMES_2.4.13_18DEC2013/TransformerControlMode.hpp index 563b222e5..4007f385c 100644 --- a/CGMES_2.4.13_18DEC2013/TransformerControlMode.hpp +++ b/CGMES_2.4.13_18DEC2013/TransformerControlMode.hpp @@ -9,21 +9,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Control modes for a transformer. - */ + /** \brief Control modes for a transformer. */ class TransformerControlMode { public: enum TransformerControlMode_ENUM { - /** - * Voltage control - */ + /** Voltage control */ volt, - /** - * Reactive power flow control - */ + /** Reactive power flow control */ reactive, }; diff --git a/CGMES_2.4.13_18DEC2013/TransformerEnd.cpp b/CGMES_2.4.13_18DEC2013/TransformerEnd.cpp index dd8bb4fa1..86e31752c 100644 --- a/CGMES_2.4.13_18DEC2013/TransformerEnd.cpp +++ b/CGMES_2.4.13_18DEC2013/TransformerEnd.cpp @@ -12,15 +12,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "PhaseTapChanger.hpp" #include "RatioTapChanger.hpp" #include "Terminal.hpp" -#include "Integer.hpp" -#include "Boolean.hpp" -#include "Resistance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -TransformerEnd::TransformerEnd() : BaseVoltage(nullptr), PhaseTapChanger(nullptr), RatioTapChanger(nullptr), Terminal(nullptr) {}; -TransformerEnd::~TransformerEnd() {}; +TransformerEnd::TransformerEnd() : BaseVoltage(nullptr), PhaseTapChanger(nullptr), RatioTapChanger(nullptr), Terminal(nullptr) {} +TransformerEnd::~TransformerEnd() {} static const std::list PossibleProfilesForClass = { @@ -54,60 +50,6 @@ TransformerEnd::getPossibleProfilesForAttributes() const return map; } - -bool assign_TransformerEnd_endNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->endNumber; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_TransformerEnd_grounded(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->grounded; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_TransformerEnd_rground(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->rground; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_TransformerEnd_xground(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->xground; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_BaseVoltage_TransformerEnds(BaseClass*, BaseClass*); bool assign_TransformerEnd_BaseVoltage(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -124,6 +66,7 @@ bool assign_TransformerEnd_BaseVoltage(BaseClass* BaseClass_ptr1, BaseClass* Bas } return false; } + bool assign_PhaseTapChanger_TransformerEnd(BaseClass*, BaseClass*); bool assign_TransformerEnd_PhaseTapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -140,6 +83,7 @@ bool assign_TransformerEnd_PhaseTapChanger(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_RatioTapChanger_TransformerEnd(BaseClass*, BaseClass*); bool assign_TransformerEnd_RatioTapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -156,6 +100,7 @@ bool assign_TransformerEnd_RatioTapChanger(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_Terminal_TransformerEnd(BaseClass*, BaseClass*); bool assign_TransformerEnd_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -173,66 +118,66 @@ bool assign_TransformerEnd_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseCl return false; } -bool get_TransformerEnd_endNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TransformerEnd_endNumber(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->endNumber; - if (!buffer.str().empty()) + buffer >> element->endNumber; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_TransformerEnd_grounded(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TransformerEnd_grounded(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->grounded; - if (!buffer.str().empty()) + buffer >> element->grounded; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_TransformerEnd_rground(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TransformerEnd_rground(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->rground; - if (!buffer.str().empty()) + buffer >> element->rground; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_TransformerEnd_xground(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TransformerEnd_xground(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xground; - if (!buffer.str().empty()) + buffer >> element->xground; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_TransformerEnd_BaseVoltage(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->BaseVoltage != 0) { @@ -243,9 +188,12 @@ bool get_TransformerEnd_BaseVoltage(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Terminal != 0) { @@ -256,6 +204,65 @@ bool get_TransformerEnd_Terminal(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->endNumber; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_TransformerEnd_grounded(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->grounded; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_TransformerEnd_rground(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->rground; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_TransformerEnd_xground(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->xground; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char TransformerEnd::debugName[] = "TransformerEnd"; const char* TransformerEnd::debugString() const @@ -265,23 +272,23 @@ const char* TransformerEnd::debugString() const void TransformerEnd::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TransformerEnd"), &TransformerEnd_factory)); + factory_map.emplace("cim:TransformerEnd", &TransformerEnd_factory); } void TransformerEnd::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TransformerEnd.endNumber"), &assign_TransformerEnd_endNumber)); - assign_map.insert(std::make_pair(std::string("cim:TransformerEnd.grounded"), &assign_TransformerEnd_grounded)); - assign_map.insert(std::make_pair(std::string("cim:TransformerEnd.rground"), &assign_TransformerEnd_rground)); - assign_map.insert(std::make_pair(std::string("cim:TransformerEnd.xground"), &assign_TransformerEnd_xground)); + assign_map.emplace("cim:TransformerEnd.endNumber", &assign_TransformerEnd_endNumber); + assign_map.emplace("cim:TransformerEnd.grounded", &assign_TransformerEnd_grounded); + assign_map.emplace("cim:TransformerEnd.rground", &assign_TransformerEnd_rground); + assign_map.emplace("cim:TransformerEnd.xground", &assign_TransformerEnd_xground); } void TransformerEnd::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TransformerEnd.BaseVoltage"), &assign_TransformerEnd_BaseVoltage)); - assign_map.insert(std::make_pair(std::string("cim:TransformerEnd.PhaseTapChanger"), &assign_TransformerEnd_PhaseTapChanger)); - assign_map.insert(std::make_pair(std::string("cim:TransformerEnd.RatioTapChanger"), &assign_TransformerEnd_RatioTapChanger)); - assign_map.insert(std::make_pair(std::string("cim:TransformerEnd.Terminal"), &assign_TransformerEnd_Terminal)); + assign_map.emplace("cim:TransformerEnd.BaseVoltage", &assign_TransformerEnd_BaseVoltage); + assign_map.emplace("cim:TransformerEnd.PhaseTapChanger", &assign_TransformerEnd_PhaseTapChanger); + assign_map.emplace("cim:TransformerEnd.RatioTapChanger", &assign_TransformerEnd_RatioTapChanger); + assign_map.emplace("cim:TransformerEnd.Terminal", &assign_TransformerEnd_Terminal); } void TransformerEnd::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/TransformerEnd.hpp b/CGMES_2.4.13_18DEC2013/TransformerEnd.hpp index 557e221a1..163603fd7 100644 --- a/CGMES_2.4.13_18DEC2013/TransformerEnd.hpp +++ b/CGMES_2.4.13_18DEC2013/TransformerEnd.hpp @@ -24,9 +24,7 @@ namespace CIMPP class RatioTapChanger; class Terminal; - /* - A conducting connection point of a power transformer. It corresponds to a physical transformer winding terminal. In earlier CIM versions, the TransformerWinding class served a similar purpose, but this class is more flexible because it associates to terminal but is not a specialization of ConductingEquipment. - */ + /** \brief A conducting connection point of a power transformer. It corresponds to a physical transformer winding terminal. In earlier CIM versions, the TransformerWinding class served a similar purpose, but this class is more flexible because it associates to terminal but is not a specialization of ConductingEquipment. */ class TransformerEnd : public IdentifiedObject { public: @@ -34,14 +32,29 @@ namespace CIMPP TransformerEnd(); ~TransformerEnd() override; - CIMPP::BaseVoltage* BaseVoltage; /* Base voltage of the transformer end. This is essential for PU calculation. Default: 0 */ - CIMPP::PhaseTapChanger* PhaseTapChanger; /* Transformer end to which this phase tap changer belongs. Default: 0 */ - CIMPP::RatioTapChanger* RatioTapChanger; /* Transformer end to which this ratio tap changer belongs. Default: 0 */ - CIMPP::Terminal* Terminal; /* Terminal of the power transformer to which this transformer end belongs. Default: 0 */ - CIMPP::Integer endNumber; /* Number for this transformer end, corresponding to the end`s order in the power transformer vector group or phase angle clock number. Highest voltage winding should be 1. Each end within a power transformer should have a unique subsequent end number. Note the transformer end number need not match the terminal sequence number. Default: 0 */ - CIMPP::Boolean grounded; /* (for Yn and Zn connections) True if the neutral is solidly grounded. Default: false */ - CIMPP::Resistance rground; /* (for Yn and Zn connections) Resistance part of neutral impedance where `grounded` is true. Default: nullptr */ - CIMPP::Reactance xground; /* (for Yn and Zn connections) Reactive part of neutral impedance where `grounded` is true. Default: nullptr */ + /** \brief Base voltage of the transformer end. This is essential for PU calculation. Default: 0 */ + CIMPP::BaseVoltage* BaseVoltage; + + /** \brief Transformer end to which this phase tap changer belongs. Default: 0 */ + CIMPP::PhaseTapChanger* PhaseTapChanger; + + /** \brief Transformer end to which this ratio tap changer belongs. Default: 0 */ + CIMPP::RatioTapChanger* RatioTapChanger; + + /** \brief Terminal of the power transformer to which this transformer end belongs. Default: 0 */ + CIMPP::Terminal* Terminal; + + /** \brief Number for this transformer end, corresponding to the end`s order in the power transformer vector group or phase angle clock number. Highest voltage winding should be 1. Each end within a power transformer should have a unique subsequent end number. Note the transformer end number need not match the terminal sequence number. Default: 0 */ + CIMPP::Integer endNumber; + + /** \brief (for Yn and Zn connections) True if the neutral is solidly grounded. Default: false */ + CIMPP::Boolean grounded; + + /** \brief (for Yn and Zn connections) Resistance part of neutral impedance where `grounded` is true. Default: nullptr */ + CIMPP::Resistance rground; + + /** \brief (for Yn and Zn connections) Reactive part of neutral impedance where `grounded` is true. Default: nullptr */ + CIMPP::Reactance xground; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/TurbLCFB1.cpp b/CGMES_2.4.13_18DEC2013/TurbLCFB1.cpp index a193582c6..338c975ef 100644 --- a/CGMES_2.4.13_18DEC2013/TurbLCFB1.cpp +++ b/CGMES_2.4.13_18DEC2013/TurbLCFB1.cpp @@ -8,23 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "Boolean.hpp" -#include "ActivePower.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" using namespace CIMPP; -TurbLCFB1::TurbLCFB1() {}; -TurbLCFB1::~TurbLCFB1() {}; +TurbLCFB1::TurbLCFB1() {} +TurbLCFB1::~TurbLCFB1() {} static const std::list PossibleProfilesForClass = { @@ -62,168 +50,178 @@ TurbLCFB1::getPossibleProfilesForAttributes() const return map; } - -bool assign_TurbLCFB1_db(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_db(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_emax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_emax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->emax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_fb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_fb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_fbf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_fbf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fbf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_irmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_irmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->irmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_pbf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_pbf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pbf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_pmwset(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_pmwset(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmwset; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_speedReferenceGovernor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_speedReferenceGovernor(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->speedReferenceGovernor; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_tpelec(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_tpelec(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpelec; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_TurbLCFB1_db(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db; if (!buffer.str().empty()) @@ -237,7 +235,8 @@ bool get_TurbLCFB1_db(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_TurbLCFB1_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->emax; if (!buffer.str().empty()) @@ -251,7 +250,8 @@ bool get_TurbLCFB1_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_TurbLCFB1_fb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fb; if (!buffer.str().empty()) @@ -265,7 +265,8 @@ bool get_TurbLCFB1_fb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_TurbLCFB1_fbf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fbf; if (!buffer.str().empty()) @@ -279,7 +280,8 @@ bool get_TurbLCFB1_fbf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_TurbLCFB1_irmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->irmax; if (!buffer.str().empty()) @@ -293,7 +295,8 @@ bool get_TurbLCFB1_irmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_TurbLCFB1_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -307,7 +310,8 @@ bool get_TurbLCFB1_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_TurbLCFB1_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -321,7 +325,8 @@ bool get_TurbLCFB1_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_TurbLCFB1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -335,7 +340,8 @@ bool get_TurbLCFB1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_TurbLCFB1_pbf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pbf; if (!buffer.str().empty()) @@ -349,7 +355,8 @@ bool get_TurbLCFB1_pbf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_TurbLCFB1_pmwset(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmwset; if (!buffer.str().empty()) @@ -363,7 +370,8 @@ bool get_TurbLCFB1_pmwset(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_TurbLCFB1_speedReferenceGovernor(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->speedReferenceGovernor; if (!buffer.str().empty()) @@ -377,7 +385,8 @@ bool get_TurbLCFB1_speedReferenceGovernor(const BaseClass* BaseClass_ptr1, std:: bool get_TurbLCFB1_tpelec(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpelec; if (!buffer.str().empty()) @@ -389,8 +398,6 @@ bool get_TurbLCFB1_tpelec(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char TurbLCFB1::debugName[] = "TurbLCFB1"; const char* TurbLCFB1::debugString() const { @@ -399,23 +406,23 @@ const char* TurbLCFB1::debugString() const void TurbLCFB1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TurbLCFB1"), &TurbLCFB1_factory)); + factory_map.emplace("cim:TurbLCFB1", &TurbLCFB1_factory); } void TurbLCFB1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.db"), &assign_TurbLCFB1_db)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.emax"), &assign_TurbLCFB1_emax)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.fb"), &assign_TurbLCFB1_fb)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.fbf"), &assign_TurbLCFB1_fbf)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.irmax"), &assign_TurbLCFB1_irmax)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.ki"), &assign_TurbLCFB1_ki)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.kp"), &assign_TurbLCFB1_kp)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.mwbase"), &assign_TurbLCFB1_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.pbf"), &assign_TurbLCFB1_pbf)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.pmwset"), &assign_TurbLCFB1_pmwset)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.speedReferenceGovernor"), &assign_TurbLCFB1_speedReferenceGovernor)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.tpelec"), &assign_TurbLCFB1_tpelec)); + assign_map.emplace("cim:TurbLCFB1.db", &assign_TurbLCFB1_db); + assign_map.emplace("cim:TurbLCFB1.emax", &assign_TurbLCFB1_emax); + assign_map.emplace("cim:TurbLCFB1.fb", &assign_TurbLCFB1_fb); + assign_map.emplace("cim:TurbLCFB1.fbf", &assign_TurbLCFB1_fbf); + assign_map.emplace("cim:TurbLCFB1.irmax", &assign_TurbLCFB1_irmax); + assign_map.emplace("cim:TurbLCFB1.ki", &assign_TurbLCFB1_ki); + assign_map.emplace("cim:TurbLCFB1.kp", &assign_TurbLCFB1_kp); + assign_map.emplace("cim:TurbLCFB1.mwbase", &assign_TurbLCFB1_mwbase); + assign_map.emplace("cim:TurbLCFB1.pbf", &assign_TurbLCFB1_pbf); + assign_map.emplace("cim:TurbLCFB1.pmwset", &assign_TurbLCFB1_pmwset); + assign_map.emplace("cim:TurbLCFB1.speedReferenceGovernor", &assign_TurbLCFB1_speedReferenceGovernor); + assign_map.emplace("cim:TurbLCFB1.tpelec", &assign_TurbLCFB1_tpelec); } void TurbLCFB1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/TurbLCFB1.hpp b/CGMES_2.4.13_18DEC2013/TurbLCFB1.hpp index 9a057c88b..f45fd978f 100644 --- a/CGMES_2.4.13_18DEC2013/TurbLCFB1.hpp +++ b/CGMES_2.4.13_18DEC2013/TurbLCFB1.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Turbine Load Controller model developed in the WECC. This model represents a supervisory turbine load controller that acts to maintain turbine power at a set value by continuous adjustment of the turbine governor speed-load reference. This model is intended to represent slow reset 'outer loop' controllers managing the action of the turbine governor. - */ + /** \brief Turbine Load Controller model developed in the WECC. This model represents a supervisory turbine load controller that acts to maintain turbine power at a set value by continuous adjustment of the turbine governor speed-load reference. This model is intended to represent slow reset 'outer loop' controllers managing the action of the turbine governor. */ class TurbLCFB1 : public TurbineLoadControllerDynamics { public: @@ -30,18 +28,41 @@ namespace CIMPP TurbLCFB1(); ~TurbLCFB1() override; - CIMPP::PU db; /* Controller dead band (db). Typical Value = 0. Default: nullptr */ - CIMPP::PU emax; /* Maximum control error (Emax) (note 4). Typical Value = 0.02. Default: nullptr */ - CIMPP::PU fb; /* Frequency bias gain (Fb). Typical Value = 0. Default: nullptr */ - CIMPP::Boolean fbf; /* Frequency bias flag (Fbf). true = enable frequency bias false = disable frequency bias. Typical Value = false. Default: false */ - CIMPP::PU irmax; /* Maximum turbine speed/load reference bias (Irmax) (note 3). Typical Value = 0. Default: nullptr */ - CIMPP::PU ki; /* Integral gain (Ki). Typical Value = 0. Default: nullptr */ - CIMPP::PU kp; /* Proportional gain (Kp). Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::Boolean pbf; /* Power controller flag (Pbf). true = enable load controller false = disable load controller. Typical Value = false. Default: false */ - CIMPP::ActivePower pmwset; /* Power controller setpoint (Pmwset) (note 1). Unit = MW. Typical Value = 0. Default: nullptr */ - CIMPP::Boolean speedReferenceGovernor; /* Type of turbine governor reference (Type). true = speed reference governor false = load reference governor. Typical Value = true. Default: false */ - CIMPP::Seconds tpelec; /* Power transducer time constant (Tpelec). Typical Value = 0. Default: nullptr */ + /** \brief Controller dead band (db). Typical Value = 0. Default: nullptr */ + CIMPP::PU db; + + /** \brief Maximum control error (Emax) (note 4). Typical Value = 0.02. Default: nullptr */ + CIMPP::PU emax; + + /** \brief Frequency bias gain (Fb). Typical Value = 0. Default: nullptr */ + CIMPP::PU fb; + + /** \brief Frequency bias flag (Fbf). true = enable frequency bias false = disable frequency bias. Typical Value = false. Default: false */ + CIMPP::Boolean fbf; + + /** \brief Maximum turbine speed/load reference bias (Irmax) (note 3). Typical Value = 0. Default: nullptr */ + CIMPP::PU irmax; + + /** \brief Integral gain (Ki). Typical Value = 0. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Proportional gain (Kp). Typical Value = 0. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Power controller flag (Pbf). true = enable load controller false = disable load controller. Typical Value = false. Default: false */ + CIMPP::Boolean pbf; + + /** \brief Power controller setpoint (Pmwset) (note 1). Unit = MW. Typical Value = 0. Default: nullptr */ + CIMPP::ActivePower pmwset; + + /** \brief Type of turbine governor reference (Type). true = speed reference governor false = load reference governor. Typical Value = true. Default: false */ + CIMPP::Boolean speedReferenceGovernor; + + /** \brief Power transducer time constant (Tpelec). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tpelec; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/TurbineGovernorDynamics.cpp b/CGMES_2.4.13_18DEC2013/TurbineGovernorDynamics.cpp index 8c08348f9..cebece4b4 100644 --- a/CGMES_2.4.13_18DEC2013/TurbineGovernorDynamics.cpp +++ b/CGMES_2.4.13_18DEC2013/TurbineGovernorDynamics.cpp @@ -14,8 +14,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -TurbineGovernorDynamics::TurbineGovernorDynamics() : AsynchronousMachineDynamics(nullptr), TurbineLoadControllerDynamics(nullptr) {}; -TurbineGovernorDynamics::~TurbineGovernorDynamics() {}; +TurbineGovernorDynamics::TurbineGovernorDynamics() : AsynchronousMachineDynamics(nullptr), TurbineLoadControllerDynamics(nullptr) {} +TurbineGovernorDynamics::~TurbineGovernorDynamics() {} static const std::list PossibleProfilesForClass = { @@ -44,8 +44,6 @@ TurbineGovernorDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_AsynchronousMachineDynamics_TurbineGovernorDynamics(BaseClass*, BaseClass*); bool assign_TurbineGovernorDynamics_AsynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -62,6 +60,7 @@ bool assign_TurbineGovernorDynamics_AsynchronousMachineDynamics(BaseClass* BaseC } return false; } + bool assign_SynchronousMachineDynamics_TurbineGovernorDynamics(BaseClass*, BaseClass*); bool assign_TurbineGovernorDynamics_SynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -78,6 +77,7 @@ bool assign_TurbineGovernorDynamics_SynchronousMachineDynamics(BaseClass* BaseCl } return false; } + bool assign_TurbineLoadControllerDynamics_TurbineGovernorDynamics(BaseClass*, BaseClass*); bool assign_TurbineGovernorDynamics_TurbineLoadControllerDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -95,10 +95,10 @@ bool assign_TurbineGovernorDynamics_TurbineLoadControllerDynamics(BaseClass* Bas return false; } - bool get_TurbineGovernorDynamics_AsynchronousMachineDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TurbineGovernorDynamics* element = dynamic_cast(BaseClass_ptr1)) + const TurbineGovernorDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->AsynchronousMachineDynamics != 0) { @@ -111,7 +111,8 @@ bool get_TurbineGovernorDynamics_AsynchronousMachineDynamics(const BaseClass* Ba bool get_TurbineGovernorDynamics_SynchronousMachineDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TurbineGovernorDynamics* element = dynamic_cast(BaseClass_ptr1)) + const TurbineGovernorDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { std::copy(element->SynchronousMachineDynamics.begin(), element->SynchronousMachineDynamics.end(), std::back_inserter(BaseClass_list)); return !BaseClass_list.empty(); @@ -128,7 +129,7 @@ const char* TurbineGovernorDynamics::debugString() const void TurbineGovernorDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TurbineGovernorDynamics"), &TurbineGovernorDynamics_factory)); + factory_map.emplace("cim:TurbineGovernorDynamics", &TurbineGovernorDynamics_factory); } void TurbineGovernorDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -137,9 +138,9 @@ void TurbineGovernorDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TurbineGovernorDynamics.AsynchronousMachineDynamics"), &assign_TurbineGovernorDynamics_AsynchronousMachineDynamics)); - assign_map.insert(std::make_pair(std::string("cim:TurbineGovernorDynamics.SynchronousMachineDynamics"), &assign_TurbineGovernorDynamics_SynchronousMachineDynamics)); - assign_map.insert(std::make_pair(std::string("cim:TurbineGovernorDynamics.TurbineLoadControllerDynamics"), &assign_TurbineGovernorDynamics_TurbineLoadControllerDynamics)); + assign_map.emplace("cim:TurbineGovernorDynamics.AsynchronousMachineDynamics", &assign_TurbineGovernorDynamics_AsynchronousMachineDynamics); + assign_map.emplace("cim:TurbineGovernorDynamics.SynchronousMachineDynamics", &assign_TurbineGovernorDynamics_SynchronousMachineDynamics); + assign_map.emplace("cim:TurbineGovernorDynamics.TurbineLoadControllerDynamics", &assign_TurbineGovernorDynamics_TurbineLoadControllerDynamics); } void TurbineGovernorDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/TurbineGovernorDynamics.hpp b/CGMES_2.4.13_18DEC2013/TurbineGovernorDynamics.hpp index 1e521e825..dda79cfd7 100644 --- a/CGMES_2.4.13_18DEC2013/TurbineGovernorDynamics.hpp +++ b/CGMES_2.4.13_18DEC2013/TurbineGovernorDynamics.hpp @@ -19,9 +19,7 @@ namespace CIMPP class SynchronousMachineDynamics; class TurbineLoadControllerDynamics; - /* - Turbine-governor function block whose behavior is described by reference to a standard model - */ + /** \brief Turbine-governor function block whose behavior is described by reference to a standard model */ class TurbineGovernorDynamics : public DynamicsFunctionBlock { public: @@ -29,9 +27,14 @@ namespace CIMPP TurbineGovernorDynamics(); ~TurbineGovernorDynamics() override; - CIMPP::AsynchronousMachineDynamics* AsynchronousMachineDynamics; /* Asynchronous machine model with which this turbine-governor model is associated. Default: 0 */ - std::list SynchronousMachineDynamics; /* Turbine-governor model associated with this synchronous machine model. Default: 0 */ - CIMPP::TurbineLoadControllerDynamics* TurbineLoadControllerDynamics; /* Turbine load controller providing input to this turbine-governor. Default: 0 */ + /** \brief Asynchronous machine model with which this turbine-governor model is associated. Default: 0 */ + CIMPP::AsynchronousMachineDynamics* AsynchronousMachineDynamics; + + /** \brief Turbine-governor model associated with this synchronous machine model. Default: 0 */ + std::list SynchronousMachineDynamics; + + /** \brief Turbine load controller providing input to this turbine-governor. Default: 0 */ + CIMPP::TurbineLoadControllerDynamics* TurbineLoadControllerDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/TurbineGovernorUserDefined.cpp b/CGMES_2.4.13_18DEC2013/TurbineGovernorUserDefined.cpp index cbaea87d3..ad7d7ef5f 100644 --- a/CGMES_2.4.13_18DEC2013/TurbineGovernorUserDefined.cpp +++ b/CGMES_2.4.13_18DEC2013/TurbineGovernorUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -TurbineGovernorUserDefined::TurbineGovernorUserDefined() {}; -TurbineGovernorUserDefined::~TurbineGovernorUserDefined() {}; +TurbineGovernorUserDefined::TurbineGovernorUserDefined() {} +TurbineGovernorUserDefined::~TurbineGovernorUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ TurbineGovernorUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_TurbineGovernorUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TurbineGovernorUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_TurbineGovernorUserDefined(BaseClass*, BaseClass*); bool assign_TurbineGovernorUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_TurbineGovernorUserDefined_ProprietaryParameterDynamics(BaseClass* B return false; } +bool assign_TurbineGovernorUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + TurbineGovernorUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_TurbineGovernorUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbineGovernorUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const TurbineGovernorUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_TurbineGovernorUserDefined_proprietary(const BaseClass* BaseClass_ptr1, return false; } - - const char TurbineGovernorUserDefined::debugName[] = "TurbineGovernorUserDefined"; const char* TurbineGovernorUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* TurbineGovernorUserDefined::debugString() const void TurbineGovernorUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TurbineGovernorUserDefined"), &TurbineGovernorUserDefined_factory)); + factory_map.emplace("cim:TurbineGovernorUserDefined", &TurbineGovernorUserDefined_factory); } void TurbineGovernorUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TurbineGovernorUserDefined.proprietary"), &assign_TurbineGovernorUserDefined_proprietary)); + assign_map.emplace("cim:TurbineGovernorUserDefined.proprietary", &assign_TurbineGovernorUserDefined_proprietary); } void TurbineGovernorUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TurbineGovernorUserDefined.ProprietaryParameterDynamics"), &assign_TurbineGovernorUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:TurbineGovernorUserDefined.ProprietaryParameterDynamics", &assign_TurbineGovernorUserDefined_ProprietaryParameterDynamics); } void TurbineGovernorUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/TurbineGovernorUserDefined.hpp b/CGMES_2.4.13_18DEC2013/TurbineGovernorUserDefined.hpp index 515cd55e9..47aa48210 100644 --- a/CGMES_2.4.13_18DEC2013/TurbineGovernorUserDefined.hpp +++ b/CGMES_2.4.13_18DEC2013/TurbineGovernorUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Turbine-governor function block whose dynamic behaviour is described by - */ + /** \brief Turbine-governor function block whose dynamic behaviour is described by */ class TurbineGovernorUserDefined : public TurbineGovernorDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP TurbineGovernorUserDefined(); ~TurbineGovernorUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/TurbineLoadControllerDynamics.cpp b/CGMES_2.4.13_18DEC2013/TurbineLoadControllerDynamics.cpp index fe5f1ad16..d9ae03d4f 100644 --- a/CGMES_2.4.13_18DEC2013/TurbineLoadControllerDynamics.cpp +++ b/CGMES_2.4.13_18DEC2013/TurbineLoadControllerDynamics.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -TurbineLoadControllerDynamics::TurbineLoadControllerDynamics() : TurbineGovernorDynamics(nullptr) {}; -TurbineLoadControllerDynamics::~TurbineLoadControllerDynamics() {}; +TurbineLoadControllerDynamics::TurbineLoadControllerDynamics() : TurbineGovernorDynamics(nullptr) {} +TurbineLoadControllerDynamics::~TurbineLoadControllerDynamics() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ TurbineLoadControllerDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_TurbineGovernorDynamics_TurbineLoadControllerDynamics(BaseClass*, BaseClass*); bool assign_TurbineLoadControllerDynamics_TurbineGovernorDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_TurbineLoadControllerDynamics_TurbineGovernorDynamics(BaseClass* Bas return false; } - bool get_TurbineLoadControllerDynamics_TurbineGovernorDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TurbineLoadControllerDynamics* element = dynamic_cast(BaseClass_ptr1)) + const TurbineLoadControllerDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->TurbineGovernorDynamics != 0) { @@ -73,7 +71,6 @@ bool get_TurbineLoadControllerDynamics_TurbineGovernorDynamics(const BaseClass* return false; } - const char TurbineLoadControllerDynamics::debugName[] = "TurbineLoadControllerDynamics"; const char* TurbineLoadControllerDynamics::debugString() const { @@ -82,7 +79,7 @@ const char* TurbineLoadControllerDynamics::debugString() const void TurbineLoadControllerDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TurbineLoadControllerDynamics"), &TurbineLoadControllerDynamics_factory)); + factory_map.emplace("cim:TurbineLoadControllerDynamics", &TurbineLoadControllerDynamics_factory); } void TurbineLoadControllerDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void TurbineLoadControllerDynamics::addPrimitiveAssignFnsToMap(std::unordered_ma void TurbineLoadControllerDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TurbineLoadControllerDynamics.TurbineGovernorDynamics"), &assign_TurbineLoadControllerDynamics_TurbineGovernorDynamics)); + assign_map.emplace("cim:TurbineLoadControllerDynamics.TurbineGovernorDynamics", &assign_TurbineLoadControllerDynamics_TurbineGovernorDynamics); } void TurbineLoadControllerDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/TurbineLoadControllerDynamics.hpp b/CGMES_2.4.13_18DEC2013/TurbineLoadControllerDynamics.hpp index eb7210c2d..12ec05aec 100644 --- a/CGMES_2.4.13_18DEC2013/TurbineLoadControllerDynamics.hpp +++ b/CGMES_2.4.13_18DEC2013/TurbineLoadControllerDynamics.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class TurbineGovernorDynamics; - /* - Turbine load controller function block whose behavior is described by reference to a standard model - */ + /** \brief Turbine load controller function block whose behavior is described by reference to a standard model */ class TurbineLoadControllerDynamics : public DynamicsFunctionBlock { public: @@ -27,7 +25,8 @@ namespace CIMPP TurbineLoadControllerDynamics(); ~TurbineLoadControllerDynamics() override; - CIMPP::TurbineGovernorDynamics* TurbineGovernorDynamics; /* Turbine-governor controlled by this turbine load controller. Default: 0 */ + /** \brief Turbine-governor controlled by this turbine load controller. Default: 0 */ + CIMPP::TurbineGovernorDynamics* TurbineGovernorDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/TurbineLoadControllerUserDefined.cpp b/CGMES_2.4.13_18DEC2013/TurbineLoadControllerUserDefined.cpp index a46c191e9..842adf4c4 100644 --- a/CGMES_2.4.13_18DEC2013/TurbineLoadControllerUserDefined.cpp +++ b/CGMES_2.4.13_18DEC2013/TurbineLoadControllerUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -TurbineLoadControllerUserDefined::TurbineLoadControllerUserDefined() {}; -TurbineLoadControllerUserDefined::~TurbineLoadControllerUserDefined() {}; +TurbineLoadControllerUserDefined::TurbineLoadControllerUserDefined() {} +TurbineLoadControllerUserDefined::~TurbineLoadControllerUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ TurbineLoadControllerUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_TurbineLoadControllerUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TurbineLoadControllerUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_TurbineLoadControllerUserDefined(BaseClass*, BaseClass*); bool assign_TurbineLoadControllerUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_TurbineLoadControllerUserDefined_ProprietaryParameterDynamics(BaseCl return false; } +bool assign_TurbineLoadControllerUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + TurbineLoadControllerUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_TurbineLoadControllerUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbineLoadControllerUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const TurbineLoadControllerUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_TurbineLoadControllerUserDefined_proprietary(const BaseClass* BaseClass return false; } - - const char TurbineLoadControllerUserDefined::debugName[] = "TurbineLoadControllerUserDefined"; const char* TurbineLoadControllerUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* TurbineLoadControllerUserDefined::debugString() const void TurbineLoadControllerUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TurbineLoadControllerUserDefined"), &TurbineLoadControllerUserDefined_factory)); + factory_map.emplace("cim:TurbineLoadControllerUserDefined", &TurbineLoadControllerUserDefined_factory); } void TurbineLoadControllerUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TurbineLoadControllerUserDefined.proprietary"), &assign_TurbineLoadControllerUserDefined_proprietary)); + assign_map.emplace("cim:TurbineLoadControllerUserDefined.proprietary", &assign_TurbineLoadControllerUserDefined_proprietary); } void TurbineLoadControllerUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TurbineLoadControllerUserDefined.ProprietaryParameterDynamics"), &assign_TurbineLoadControllerUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:TurbineLoadControllerUserDefined.ProprietaryParameterDynamics", &assign_TurbineLoadControllerUserDefined_ProprietaryParameterDynamics); } void TurbineLoadControllerUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/TurbineLoadControllerUserDefined.hpp b/CGMES_2.4.13_18DEC2013/TurbineLoadControllerUserDefined.hpp index 20fe71ab6..ce15803d0 100644 --- a/CGMES_2.4.13_18DEC2013/TurbineLoadControllerUserDefined.hpp +++ b/CGMES_2.4.13_18DEC2013/TurbineLoadControllerUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Turbine load controller function block whose dynamic behaviour is described by - */ + /** \brief Turbine load controller function block whose dynamic behaviour is described by */ class TurbineLoadControllerUserDefined : public TurbineLoadControllerDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP TurbineLoadControllerUserDefined(); ~TurbineLoadControllerUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/UnderexcLim2Simplified.cpp b/CGMES_2.4.13_18DEC2013/UnderexcLim2Simplified.cpp index f26bd20ff..d3524b97d 100644 --- a/CGMES_2.4.13_18DEC2013/UnderexcLim2Simplified.cpp +++ b/CGMES_2.4.13_18DEC2013/UnderexcLim2Simplified.cpp @@ -8,18 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -UnderexcLim2Simplified::UnderexcLim2Simplified() {}; -UnderexcLim2Simplified::~UnderexcLim2Simplified() {}; +UnderexcLim2Simplified::UnderexcLim2Simplified() {} +UnderexcLim2Simplified::~UnderexcLim2Simplified() {} static const std::list PossibleProfilesForClass = { @@ -52,103 +45,108 @@ UnderexcLim2Simplified::getPossibleProfilesForAttributes() const return map; } - -bool assign_UnderexcLim2Simplified_kui(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLim2Simplified_kui(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kui; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLim2Simplified_p0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLim2Simplified_p0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLim2Simplified_p1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLim2Simplified_p1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLim2Simplified_q0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLim2Simplified_q0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLim2Simplified_q1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLim2Simplified_q1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLim2Simplified_vuimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLim2Simplified_vuimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vuimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLim2Simplified_vuimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLim2Simplified_vuimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vuimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_UnderexcLim2Simplified_kui(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kui; if (!buffer.str().empty()) @@ -162,7 +160,8 @@ bool get_UnderexcLim2Simplified_kui(const BaseClass* BaseClass_ptr1, std::string bool get_UnderexcLim2Simplified_p0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p0; if (!buffer.str().empty()) @@ -176,7 +175,8 @@ bool get_UnderexcLim2Simplified_p0(const BaseClass* BaseClass_ptr1, std::strings bool get_UnderexcLim2Simplified_p1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p1; if (!buffer.str().empty()) @@ -190,7 +190,8 @@ bool get_UnderexcLim2Simplified_p1(const BaseClass* BaseClass_ptr1, std::strings bool get_UnderexcLim2Simplified_q0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q0; if (!buffer.str().empty()) @@ -204,7 +205,8 @@ bool get_UnderexcLim2Simplified_q0(const BaseClass* BaseClass_ptr1, std::strings bool get_UnderexcLim2Simplified_q1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q1; if (!buffer.str().empty()) @@ -218,7 +220,8 @@ bool get_UnderexcLim2Simplified_q1(const BaseClass* BaseClass_ptr1, std::strings bool get_UnderexcLim2Simplified_vuimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vuimax; if (!buffer.str().empty()) @@ -232,7 +235,8 @@ bool get_UnderexcLim2Simplified_vuimax(const BaseClass* BaseClass_ptr1, std::str bool get_UnderexcLim2Simplified_vuimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vuimin; if (!buffer.str().empty()) @@ -244,8 +248,6 @@ bool get_UnderexcLim2Simplified_vuimin(const BaseClass* BaseClass_ptr1, std::str return false; } - - const char UnderexcLim2Simplified::debugName[] = "UnderexcLim2Simplified"; const char* UnderexcLim2Simplified::debugString() const { @@ -254,18 +256,18 @@ const char* UnderexcLim2Simplified::debugString() const void UnderexcLim2Simplified::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:UnderexcLim2Simplified"), &UnderexcLim2Simplified_factory)); + factory_map.emplace("cim:UnderexcLim2Simplified", &UnderexcLim2Simplified_factory); } void UnderexcLim2Simplified::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:UnderexcLim2Simplified.kui"), &assign_UnderexcLim2Simplified_kui)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLim2Simplified.p0"), &assign_UnderexcLim2Simplified_p0)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLim2Simplified.p1"), &assign_UnderexcLim2Simplified_p1)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLim2Simplified.q0"), &assign_UnderexcLim2Simplified_q0)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLim2Simplified.q1"), &assign_UnderexcLim2Simplified_q1)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLim2Simplified.vuimax"), &assign_UnderexcLim2Simplified_vuimax)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLim2Simplified.vuimin"), &assign_UnderexcLim2Simplified_vuimin)); + assign_map.emplace("cim:UnderexcLim2Simplified.kui", &assign_UnderexcLim2Simplified_kui); + assign_map.emplace("cim:UnderexcLim2Simplified.p0", &assign_UnderexcLim2Simplified_p0); + assign_map.emplace("cim:UnderexcLim2Simplified.p1", &assign_UnderexcLim2Simplified_p1); + assign_map.emplace("cim:UnderexcLim2Simplified.q0", &assign_UnderexcLim2Simplified_q0); + assign_map.emplace("cim:UnderexcLim2Simplified.q1", &assign_UnderexcLim2Simplified_q1); + assign_map.emplace("cim:UnderexcLim2Simplified.vuimax", &assign_UnderexcLim2Simplified_vuimax); + assign_map.emplace("cim:UnderexcLim2Simplified.vuimin", &assign_UnderexcLim2Simplified_vuimin); } void UnderexcLim2Simplified::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/UnderexcLim2Simplified.hpp b/CGMES_2.4.13_18DEC2013/UnderexcLim2Simplified.hpp index b6f8d0494..5c1e361db 100644 --- a/CGMES_2.4.13_18DEC2013/UnderexcLim2Simplified.hpp +++ b/CGMES_2.4.13_18DEC2013/UnderexcLim2Simplified.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - This model can be derived from UnderexcLimIEEE2. The limit characteristic (look -up table) is a single straight-line, the same as UnderexcLimIEEE2 (see Figure 10.4 (p 32), IEEE 421.5-2005 Section 10.2). - */ + /** \brief This model can be derived from UnderexcLimIEEE2. The limit characteristic (look -up table) is a single straight-line, the same as UnderexcLimIEEE2 (see Figure 10.4 (p 32), IEEE 421.5-2005 Section 10.2). */ class UnderexcLim2Simplified : public UnderexcitationLimiterDynamics { public: @@ -27,13 +25,26 @@ namespace CIMPP UnderexcLim2Simplified(); ~UnderexcLim2Simplified() override; - CIMPP::PU kui; /* Gain Under excitation limiter (Kui). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU p0; /* Segment P initial point (P0). Typical Value = 0. Default: nullptr */ - CIMPP::PU p1; /* Segment P end point (P1). Typical Value = 1. Default: nullptr */ - CIMPP::PU q0; /* Segment Q initial point (Q0). Typical Value = -0.31. Default: nullptr */ - CIMPP::PU q1; /* Segment Q end point (Q1). Typical Value = -0.1. Default: nullptr */ - CIMPP::PU vuimax; /* Maximum error signal (V). Typical Value = 1. Default: nullptr */ - CIMPP::PU vuimin; /* Minimum error signal (V). Typical Value = 0. Default: nullptr */ + /** \brief Gain Under excitation limiter (Kui). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU kui; + + /** \brief Segment P initial point (P0). Typical Value = 0. Default: nullptr */ + CIMPP::PU p0; + + /** \brief Segment P end point (P1). Typical Value = 1. Default: nullptr */ + CIMPP::PU p1; + + /** \brief Segment Q initial point (Q0). Typical Value = -0.31. Default: nullptr */ + CIMPP::PU q0; + + /** \brief Segment Q end point (Q1). Typical Value = -0.1. Default: nullptr */ + CIMPP::PU q1; + + /** \brief Maximum error signal (V). Typical Value = 1. Default: nullptr */ + CIMPP::PU vuimax; + + /** \brief Minimum error signal (V). Typical Value = 0. Default: nullptr */ + CIMPP::PU vuimin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/UnderexcLimIEEE1.cpp b/CGMES_2.4.13_18DEC2013/UnderexcLimIEEE1.cpp index 56b0a574b..ed960945f 100644 --- a/CGMES_2.4.13_18DEC2013/UnderexcLimIEEE1.cpp +++ b/CGMES_2.4.13_18DEC2013/UnderexcLimIEEE1.cpp @@ -8,26 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -UnderexcLimIEEE1::UnderexcLimIEEE1() {}; -UnderexcLimIEEE1::~UnderexcLimIEEE1() {}; +UnderexcLimIEEE1::UnderexcLimIEEE1() {} +UnderexcLimIEEE1::~UnderexcLimIEEE1() {} static const std::list PossibleProfilesForClass = { @@ -68,207 +53,220 @@ UnderexcLimIEEE1::getPossibleProfilesForAttributes() const return map; } - -bool assign_UnderexcLimIEEE1_kuc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_kuc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kuc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_kuf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_kuf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kuf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_kui(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_kui(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kui; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_kul(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_kul(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kul; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_kur(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_kur(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kur; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_tu1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_tu1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tu1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_tu2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_tu2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tu2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_tu3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_tu3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tu3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_tu4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_tu4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tu4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_vucmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_vucmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vucmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_vuimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_vuimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vuimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_vuimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_vuimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vuimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_vulmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_vulmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vulmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_vulmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_vulmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vulmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_vurmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_vurmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vurmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_UnderexcLimIEEE1_kuc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kuc; if (!buffer.str().empty()) @@ -282,7 +280,8 @@ bool get_UnderexcLimIEEE1_kuc(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE1_kuf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kuf; if (!buffer.str().empty()) @@ -296,7 +295,8 @@ bool get_UnderexcLimIEEE1_kuf(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE1_kui(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kui; if (!buffer.str().empty()) @@ -310,7 +310,8 @@ bool get_UnderexcLimIEEE1_kui(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE1_kul(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kul; if (!buffer.str().empty()) @@ -324,7 +325,8 @@ bool get_UnderexcLimIEEE1_kul(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE1_kur(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kur; if (!buffer.str().empty()) @@ -338,7 +340,8 @@ bool get_UnderexcLimIEEE1_kur(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE1_tu1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tu1; if (!buffer.str().empty()) @@ -352,7 +355,8 @@ bool get_UnderexcLimIEEE1_tu1(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE1_tu2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tu2; if (!buffer.str().empty()) @@ -366,7 +370,8 @@ bool get_UnderexcLimIEEE1_tu2(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE1_tu3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tu3; if (!buffer.str().empty()) @@ -380,7 +385,8 @@ bool get_UnderexcLimIEEE1_tu3(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE1_tu4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tu4; if (!buffer.str().empty()) @@ -394,7 +400,8 @@ bool get_UnderexcLimIEEE1_tu4(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE1_vucmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vucmax; if (!buffer.str().empty()) @@ -408,7 +415,8 @@ bool get_UnderexcLimIEEE1_vucmax(const BaseClass* BaseClass_ptr1, std::stringstr bool get_UnderexcLimIEEE1_vuimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vuimax; if (!buffer.str().empty()) @@ -422,7 +430,8 @@ bool get_UnderexcLimIEEE1_vuimax(const BaseClass* BaseClass_ptr1, std::stringstr bool get_UnderexcLimIEEE1_vuimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vuimin; if (!buffer.str().empty()) @@ -436,7 +445,8 @@ bool get_UnderexcLimIEEE1_vuimin(const BaseClass* BaseClass_ptr1, std::stringstr bool get_UnderexcLimIEEE1_vulmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vulmax; if (!buffer.str().empty()) @@ -450,7 +460,8 @@ bool get_UnderexcLimIEEE1_vulmax(const BaseClass* BaseClass_ptr1, std::stringstr bool get_UnderexcLimIEEE1_vulmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vulmin; if (!buffer.str().empty()) @@ -464,7 +475,8 @@ bool get_UnderexcLimIEEE1_vulmin(const BaseClass* BaseClass_ptr1, std::stringstr bool get_UnderexcLimIEEE1_vurmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vurmax; if (!buffer.str().empty()) @@ -476,8 +488,6 @@ bool get_UnderexcLimIEEE1_vurmax(const BaseClass* BaseClass_ptr1, std::stringstr return false; } - - const char UnderexcLimIEEE1::debugName[] = "UnderexcLimIEEE1"; const char* UnderexcLimIEEE1::debugString() const { @@ -486,26 +496,26 @@ const char* UnderexcLimIEEE1::debugString() const void UnderexcLimIEEE1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1"), &UnderexcLimIEEE1_factory)); + factory_map.emplace("cim:UnderexcLimIEEE1", &UnderexcLimIEEE1_factory); } void UnderexcLimIEEE1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.kuc"), &assign_UnderexcLimIEEE1_kuc)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.kuf"), &assign_UnderexcLimIEEE1_kuf)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.kui"), &assign_UnderexcLimIEEE1_kui)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.kul"), &assign_UnderexcLimIEEE1_kul)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.kur"), &assign_UnderexcLimIEEE1_kur)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.tu1"), &assign_UnderexcLimIEEE1_tu1)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.tu2"), &assign_UnderexcLimIEEE1_tu2)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.tu3"), &assign_UnderexcLimIEEE1_tu3)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.tu4"), &assign_UnderexcLimIEEE1_tu4)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.vucmax"), &assign_UnderexcLimIEEE1_vucmax)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.vuimax"), &assign_UnderexcLimIEEE1_vuimax)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.vuimin"), &assign_UnderexcLimIEEE1_vuimin)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.vulmax"), &assign_UnderexcLimIEEE1_vulmax)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.vulmin"), &assign_UnderexcLimIEEE1_vulmin)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.vurmax"), &assign_UnderexcLimIEEE1_vurmax)); + assign_map.emplace("cim:UnderexcLimIEEE1.kuc", &assign_UnderexcLimIEEE1_kuc); + assign_map.emplace("cim:UnderexcLimIEEE1.kuf", &assign_UnderexcLimIEEE1_kuf); + assign_map.emplace("cim:UnderexcLimIEEE1.kui", &assign_UnderexcLimIEEE1_kui); + assign_map.emplace("cim:UnderexcLimIEEE1.kul", &assign_UnderexcLimIEEE1_kul); + assign_map.emplace("cim:UnderexcLimIEEE1.kur", &assign_UnderexcLimIEEE1_kur); + assign_map.emplace("cim:UnderexcLimIEEE1.tu1", &assign_UnderexcLimIEEE1_tu1); + assign_map.emplace("cim:UnderexcLimIEEE1.tu2", &assign_UnderexcLimIEEE1_tu2); + assign_map.emplace("cim:UnderexcLimIEEE1.tu3", &assign_UnderexcLimIEEE1_tu3); + assign_map.emplace("cim:UnderexcLimIEEE1.tu4", &assign_UnderexcLimIEEE1_tu4); + assign_map.emplace("cim:UnderexcLimIEEE1.vucmax", &assign_UnderexcLimIEEE1_vucmax); + assign_map.emplace("cim:UnderexcLimIEEE1.vuimax", &assign_UnderexcLimIEEE1_vuimax); + assign_map.emplace("cim:UnderexcLimIEEE1.vuimin", &assign_UnderexcLimIEEE1_vuimin); + assign_map.emplace("cim:UnderexcLimIEEE1.vulmax", &assign_UnderexcLimIEEE1_vulmax); + assign_map.emplace("cim:UnderexcLimIEEE1.vulmin", &assign_UnderexcLimIEEE1_vulmin); + assign_map.emplace("cim:UnderexcLimIEEE1.vurmax", &assign_UnderexcLimIEEE1_vurmax); } void UnderexcLimIEEE1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/UnderexcLimIEEE1.hpp b/CGMES_2.4.13_18DEC2013/UnderexcLimIEEE1.hpp index 153211aa7..7e60e75df 100644 --- a/CGMES_2.4.13_18DEC2013/UnderexcLimIEEE1.hpp +++ b/CGMES_2.4.13_18DEC2013/UnderexcLimIEEE1.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents the Type UEL1 model which has a circular limit boundary when plotted in terms of machine reactive power vs. real power output. Reference: IEEE UEL1 421.5-2005 Section 10.1. - */ + /** \brief The class represents the Type UEL1 model which has a circular limit boundary when plotted in terms of machine reactive power vs. real power output. Reference: IEEE UEL1 421.5-2005 Section 10.1. */ class UnderexcLimIEEE1 : public UnderexcitationLimiterDynamics { public: @@ -28,21 +26,50 @@ namespace CIMPP UnderexcLimIEEE1(); ~UnderexcLimIEEE1() override; - CIMPP::PU kuc; /* UEL center setting (K). Typical Value = 1.38. Default: nullptr */ - CIMPP::PU kuf; /* UEL excitation system stabilizer gain (K). Typical Value = 3.3. Default: nullptr */ - CIMPP::PU kui; /* UEL integral gain (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU kul; /* UEL proportional gain (K). Typical Value = 100. Default: nullptr */ - CIMPP::PU kur; /* UEL radius setting (K). Typical Value = 1.95. Default: nullptr */ - CIMPP::Seconds tu1; /* UEL lead time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tu2; /* UEL lag time constant (T). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds tu3; /* UEL lead time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tu4; /* UEL lag time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::PU vucmax; /* UEL maximum limit for operating point phasor magnitude (V). Typical Value = 5.8. Default: nullptr */ - CIMPP::PU vuimax; /* UEL integrator output maximum limit (V). Default: nullptr */ - CIMPP::PU vuimin; /* UEL integrator output minimum limit (V). Default: nullptr */ - CIMPP::PU vulmax; /* UEL output maximum limit (V). Typical Value = 18. Default: nullptr */ - CIMPP::PU vulmin; /* UEL output minimum limit (V). Typical Value = -18. Default: nullptr */ - CIMPP::PU vurmax; /* UEL maximum limit for radius phasor magnitude (V). Typical Value = 5.8. Default: nullptr */ + /** \brief UEL center setting (K). Typical Value = 1.38. Default: nullptr */ + CIMPP::PU kuc; + + /** \brief UEL excitation system stabilizer gain (K). Typical Value = 3.3. Default: nullptr */ + CIMPP::PU kuf; + + /** \brief UEL integral gain (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU kui; + + /** \brief UEL proportional gain (K). Typical Value = 100. Default: nullptr */ + CIMPP::PU kul; + + /** \brief UEL radius setting (K). Typical Value = 1.95. Default: nullptr */ + CIMPP::PU kur; + + /** \brief UEL lead time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tu1; + + /** \brief UEL lag time constant (T). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds tu2; + + /** \brief UEL lead time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tu3; + + /** \brief UEL lag time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tu4; + + /** \brief UEL maximum limit for operating point phasor magnitude (V). Typical Value = 5.8. Default: nullptr */ + CIMPP::PU vucmax; + + /** \brief UEL integrator output maximum limit (V). Default: nullptr */ + CIMPP::PU vuimax; + + /** \brief UEL integrator output minimum limit (V). Default: nullptr */ + CIMPP::PU vuimin; + + /** \brief UEL output maximum limit (V). Typical Value = 18. Default: nullptr */ + CIMPP::PU vulmax; + + /** \brief UEL output minimum limit (V). Typical Value = -18. Default: nullptr */ + CIMPP::PU vulmin; + + /** \brief UEL maximum limit for radius phasor magnitude (V). Typical Value = 5.8. Default: nullptr */ + CIMPP::PU vurmax; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/UnderexcLimIEEE2.cpp b/CGMES_2.4.13_18DEC2013/UnderexcLimIEEE2.cpp index 8a0cd3c3a..da9274105 100644 --- a/CGMES_2.4.13_18DEC2013/UnderexcLimIEEE2.cpp +++ b/CGMES_2.4.13_18DEC2013/UnderexcLimIEEE2.cpp @@ -8,51 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -UnderexcLimIEEE2::UnderexcLimIEEE2() {}; -UnderexcLimIEEE2::~UnderexcLimIEEE2() {}; +UnderexcLimIEEE2::UnderexcLimIEEE2() {} +UnderexcLimIEEE2::~UnderexcLimIEEE2() {} static const std::list PossibleProfilesForClass = { @@ -118,532 +78,570 @@ UnderexcLimIEEE2::getPossibleProfilesForAttributes() const return map; } - -bool assign_UnderexcLimIEEE2_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_kfb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_kfb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kfb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_kuf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_kuf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kuf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_kui(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_kui(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kui; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_kul(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_kul(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kul; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_tu1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_tu1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tu1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_tu2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_tu2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tu2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_tu3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_tu3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tu3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_tu4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_tu4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tu4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_tul(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_tul(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tul; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_tup(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_tup(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tup; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_tuq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_tuq(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tuq; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_tuv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_tuv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tuv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_vuimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_vuimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vuimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_vuimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_vuimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vuimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_vulmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_vulmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vulmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_vulmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_vulmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vulmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_UnderexcLimIEEE2_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -657,7 +655,8 @@ bool get_UnderexcLimIEEE2_k1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -671,7 +670,8 @@ bool get_UnderexcLimIEEE2_k2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_kfb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kfb; if (!buffer.str().empty()) @@ -685,7 +685,8 @@ bool get_UnderexcLimIEEE2_kfb(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_kuf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kuf; if (!buffer.str().empty()) @@ -699,7 +700,8 @@ bool get_UnderexcLimIEEE2_kuf(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_kui(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kui; if (!buffer.str().empty()) @@ -713,7 +715,8 @@ bool get_UnderexcLimIEEE2_kui(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_kul(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kul; if (!buffer.str().empty()) @@ -727,7 +730,8 @@ bool get_UnderexcLimIEEE2_kul(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_p0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p0; if (!buffer.str().empty()) @@ -741,7 +745,8 @@ bool get_UnderexcLimIEEE2_p0(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_p1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p1; if (!buffer.str().empty()) @@ -755,7 +760,8 @@ bool get_UnderexcLimIEEE2_p1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_p10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p10; if (!buffer.str().empty()) @@ -769,7 +775,8 @@ bool get_UnderexcLimIEEE2_p10(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_p2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p2; if (!buffer.str().empty()) @@ -783,7 +790,8 @@ bool get_UnderexcLimIEEE2_p2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_p3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p3; if (!buffer.str().empty()) @@ -797,7 +805,8 @@ bool get_UnderexcLimIEEE2_p3(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_p4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p4; if (!buffer.str().empty()) @@ -811,7 +820,8 @@ bool get_UnderexcLimIEEE2_p4(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_p5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p5; if (!buffer.str().empty()) @@ -825,7 +835,8 @@ bool get_UnderexcLimIEEE2_p5(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_p6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p6; if (!buffer.str().empty()) @@ -839,7 +850,8 @@ bool get_UnderexcLimIEEE2_p6(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_p7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p7; if (!buffer.str().empty()) @@ -853,7 +865,8 @@ bool get_UnderexcLimIEEE2_p7(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_p8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p8; if (!buffer.str().empty()) @@ -867,7 +880,8 @@ bool get_UnderexcLimIEEE2_p8(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_p9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p9; if (!buffer.str().empty()) @@ -881,7 +895,8 @@ bool get_UnderexcLimIEEE2_p9(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q0; if (!buffer.str().empty()) @@ -895,7 +910,8 @@ bool get_UnderexcLimIEEE2_q0(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q1; if (!buffer.str().empty()) @@ -909,7 +925,8 @@ bool get_UnderexcLimIEEE2_q1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q10; if (!buffer.str().empty()) @@ -923,7 +940,8 @@ bool get_UnderexcLimIEEE2_q10(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_q2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q2; if (!buffer.str().empty()) @@ -937,7 +955,8 @@ bool get_UnderexcLimIEEE2_q2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q3; if (!buffer.str().empty()) @@ -951,7 +970,8 @@ bool get_UnderexcLimIEEE2_q3(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q4; if (!buffer.str().empty()) @@ -965,7 +985,8 @@ bool get_UnderexcLimIEEE2_q4(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q5; if (!buffer.str().empty()) @@ -979,7 +1000,8 @@ bool get_UnderexcLimIEEE2_q5(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q6; if (!buffer.str().empty()) @@ -993,7 +1015,8 @@ bool get_UnderexcLimIEEE2_q6(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q7; if (!buffer.str().empty()) @@ -1007,7 +1030,8 @@ bool get_UnderexcLimIEEE2_q7(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q8; if (!buffer.str().empty()) @@ -1021,7 +1045,8 @@ bool get_UnderexcLimIEEE2_q8(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q9; if (!buffer.str().empty()) @@ -1035,7 +1060,8 @@ bool get_UnderexcLimIEEE2_q9(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_tu1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tu1; if (!buffer.str().empty()) @@ -1049,7 +1075,8 @@ bool get_UnderexcLimIEEE2_tu1(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_tu2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tu2; if (!buffer.str().empty()) @@ -1063,7 +1090,8 @@ bool get_UnderexcLimIEEE2_tu2(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_tu3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tu3; if (!buffer.str().empty()) @@ -1077,7 +1105,8 @@ bool get_UnderexcLimIEEE2_tu3(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_tu4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tu4; if (!buffer.str().empty()) @@ -1091,7 +1120,8 @@ bool get_UnderexcLimIEEE2_tu4(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_tul(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tul; if (!buffer.str().empty()) @@ -1105,7 +1135,8 @@ bool get_UnderexcLimIEEE2_tul(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_tup(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tup; if (!buffer.str().empty()) @@ -1119,7 +1150,8 @@ bool get_UnderexcLimIEEE2_tup(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_tuq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tuq; if (!buffer.str().empty()) @@ -1133,7 +1165,8 @@ bool get_UnderexcLimIEEE2_tuq(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_tuv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tuv; if (!buffer.str().empty()) @@ -1147,7 +1180,8 @@ bool get_UnderexcLimIEEE2_tuv(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_vuimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vuimax; if (!buffer.str().empty()) @@ -1161,7 +1195,8 @@ bool get_UnderexcLimIEEE2_vuimax(const BaseClass* BaseClass_ptr1, std::stringstr bool get_UnderexcLimIEEE2_vuimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vuimin; if (!buffer.str().empty()) @@ -1175,7 +1210,8 @@ bool get_UnderexcLimIEEE2_vuimin(const BaseClass* BaseClass_ptr1, std::stringstr bool get_UnderexcLimIEEE2_vulmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vulmax; if (!buffer.str().empty()) @@ -1189,7 +1225,8 @@ bool get_UnderexcLimIEEE2_vulmax(const BaseClass* BaseClass_ptr1, std::stringstr bool get_UnderexcLimIEEE2_vulmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vulmin; if (!buffer.str().empty()) @@ -1201,8 +1238,6 @@ bool get_UnderexcLimIEEE2_vulmin(const BaseClass* BaseClass_ptr1, std::stringstr return false; } - - const char UnderexcLimIEEE2::debugName[] = "UnderexcLimIEEE2"; const char* UnderexcLimIEEE2::debugString() const { @@ -1211,51 +1246,51 @@ const char* UnderexcLimIEEE2::debugString() const void UnderexcLimIEEE2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2"), &UnderexcLimIEEE2_factory)); + factory_map.emplace("cim:UnderexcLimIEEE2", &UnderexcLimIEEE2_factory); } void UnderexcLimIEEE2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.k1"), &assign_UnderexcLimIEEE2_k1)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.k2"), &assign_UnderexcLimIEEE2_k2)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.kfb"), &assign_UnderexcLimIEEE2_kfb)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.kuf"), &assign_UnderexcLimIEEE2_kuf)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.kui"), &assign_UnderexcLimIEEE2_kui)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.kul"), &assign_UnderexcLimIEEE2_kul)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p0"), &assign_UnderexcLimIEEE2_p0)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p1"), &assign_UnderexcLimIEEE2_p1)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p10"), &assign_UnderexcLimIEEE2_p10)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p2"), &assign_UnderexcLimIEEE2_p2)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p3"), &assign_UnderexcLimIEEE2_p3)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p4"), &assign_UnderexcLimIEEE2_p4)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p5"), &assign_UnderexcLimIEEE2_p5)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p6"), &assign_UnderexcLimIEEE2_p6)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p7"), &assign_UnderexcLimIEEE2_p7)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p8"), &assign_UnderexcLimIEEE2_p8)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p9"), &assign_UnderexcLimIEEE2_p9)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q0"), &assign_UnderexcLimIEEE2_q0)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q1"), &assign_UnderexcLimIEEE2_q1)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q10"), &assign_UnderexcLimIEEE2_q10)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q2"), &assign_UnderexcLimIEEE2_q2)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q3"), &assign_UnderexcLimIEEE2_q3)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q4"), &assign_UnderexcLimIEEE2_q4)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q5"), &assign_UnderexcLimIEEE2_q5)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q6"), &assign_UnderexcLimIEEE2_q6)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q7"), &assign_UnderexcLimIEEE2_q7)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q8"), &assign_UnderexcLimIEEE2_q8)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q9"), &assign_UnderexcLimIEEE2_q9)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.tu1"), &assign_UnderexcLimIEEE2_tu1)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.tu2"), &assign_UnderexcLimIEEE2_tu2)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.tu3"), &assign_UnderexcLimIEEE2_tu3)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.tu4"), &assign_UnderexcLimIEEE2_tu4)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.tul"), &assign_UnderexcLimIEEE2_tul)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.tup"), &assign_UnderexcLimIEEE2_tup)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.tuq"), &assign_UnderexcLimIEEE2_tuq)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.tuv"), &assign_UnderexcLimIEEE2_tuv)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.vuimax"), &assign_UnderexcLimIEEE2_vuimax)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.vuimin"), &assign_UnderexcLimIEEE2_vuimin)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.vulmax"), &assign_UnderexcLimIEEE2_vulmax)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.vulmin"), &assign_UnderexcLimIEEE2_vulmin)); + assign_map.emplace("cim:UnderexcLimIEEE2.k1", &assign_UnderexcLimIEEE2_k1); + assign_map.emplace("cim:UnderexcLimIEEE2.k2", &assign_UnderexcLimIEEE2_k2); + assign_map.emplace("cim:UnderexcLimIEEE2.kfb", &assign_UnderexcLimIEEE2_kfb); + assign_map.emplace("cim:UnderexcLimIEEE2.kuf", &assign_UnderexcLimIEEE2_kuf); + assign_map.emplace("cim:UnderexcLimIEEE2.kui", &assign_UnderexcLimIEEE2_kui); + assign_map.emplace("cim:UnderexcLimIEEE2.kul", &assign_UnderexcLimIEEE2_kul); + assign_map.emplace("cim:UnderexcLimIEEE2.p0", &assign_UnderexcLimIEEE2_p0); + assign_map.emplace("cim:UnderexcLimIEEE2.p1", &assign_UnderexcLimIEEE2_p1); + assign_map.emplace("cim:UnderexcLimIEEE2.p10", &assign_UnderexcLimIEEE2_p10); + assign_map.emplace("cim:UnderexcLimIEEE2.p2", &assign_UnderexcLimIEEE2_p2); + assign_map.emplace("cim:UnderexcLimIEEE2.p3", &assign_UnderexcLimIEEE2_p3); + assign_map.emplace("cim:UnderexcLimIEEE2.p4", &assign_UnderexcLimIEEE2_p4); + assign_map.emplace("cim:UnderexcLimIEEE2.p5", &assign_UnderexcLimIEEE2_p5); + assign_map.emplace("cim:UnderexcLimIEEE2.p6", &assign_UnderexcLimIEEE2_p6); + assign_map.emplace("cim:UnderexcLimIEEE2.p7", &assign_UnderexcLimIEEE2_p7); + assign_map.emplace("cim:UnderexcLimIEEE2.p8", &assign_UnderexcLimIEEE2_p8); + assign_map.emplace("cim:UnderexcLimIEEE2.p9", &assign_UnderexcLimIEEE2_p9); + assign_map.emplace("cim:UnderexcLimIEEE2.q0", &assign_UnderexcLimIEEE2_q0); + assign_map.emplace("cim:UnderexcLimIEEE2.q1", &assign_UnderexcLimIEEE2_q1); + assign_map.emplace("cim:UnderexcLimIEEE2.q10", &assign_UnderexcLimIEEE2_q10); + assign_map.emplace("cim:UnderexcLimIEEE2.q2", &assign_UnderexcLimIEEE2_q2); + assign_map.emplace("cim:UnderexcLimIEEE2.q3", &assign_UnderexcLimIEEE2_q3); + assign_map.emplace("cim:UnderexcLimIEEE2.q4", &assign_UnderexcLimIEEE2_q4); + assign_map.emplace("cim:UnderexcLimIEEE2.q5", &assign_UnderexcLimIEEE2_q5); + assign_map.emplace("cim:UnderexcLimIEEE2.q6", &assign_UnderexcLimIEEE2_q6); + assign_map.emplace("cim:UnderexcLimIEEE2.q7", &assign_UnderexcLimIEEE2_q7); + assign_map.emplace("cim:UnderexcLimIEEE2.q8", &assign_UnderexcLimIEEE2_q8); + assign_map.emplace("cim:UnderexcLimIEEE2.q9", &assign_UnderexcLimIEEE2_q9); + assign_map.emplace("cim:UnderexcLimIEEE2.tu1", &assign_UnderexcLimIEEE2_tu1); + assign_map.emplace("cim:UnderexcLimIEEE2.tu2", &assign_UnderexcLimIEEE2_tu2); + assign_map.emplace("cim:UnderexcLimIEEE2.tu3", &assign_UnderexcLimIEEE2_tu3); + assign_map.emplace("cim:UnderexcLimIEEE2.tu4", &assign_UnderexcLimIEEE2_tu4); + assign_map.emplace("cim:UnderexcLimIEEE2.tul", &assign_UnderexcLimIEEE2_tul); + assign_map.emplace("cim:UnderexcLimIEEE2.tup", &assign_UnderexcLimIEEE2_tup); + assign_map.emplace("cim:UnderexcLimIEEE2.tuq", &assign_UnderexcLimIEEE2_tuq); + assign_map.emplace("cim:UnderexcLimIEEE2.tuv", &assign_UnderexcLimIEEE2_tuv); + assign_map.emplace("cim:UnderexcLimIEEE2.vuimax", &assign_UnderexcLimIEEE2_vuimax); + assign_map.emplace("cim:UnderexcLimIEEE2.vuimin", &assign_UnderexcLimIEEE2_vuimin); + assign_map.emplace("cim:UnderexcLimIEEE2.vulmax", &assign_UnderexcLimIEEE2_vulmax); + assign_map.emplace("cim:UnderexcLimIEEE2.vulmin", &assign_UnderexcLimIEEE2_vulmin); } void UnderexcLimIEEE2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/UnderexcLimIEEE2.hpp b/CGMES_2.4.13_18DEC2013/UnderexcLimIEEE2.hpp index db393d18a..1a95ced19 100644 --- a/CGMES_2.4.13_18DEC2013/UnderexcLimIEEE2.hpp +++ b/CGMES_2.4.13_18DEC2013/UnderexcLimIEEE2.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents the Type UEL2 which has either a straight-line or multi-segment characteristic when plotted in terms of machine reactive power output vs. real power output. Reference: IEEE UEL2 421.5-2005 Section 10.2. (Limit characteristic lookup table shown in Figure 10.4 (p 32) of the standard). - */ + /** \brief The class represents the Type UEL2 which has either a straight-line or multi-segment characteristic when plotted in terms of machine reactive power output vs. real power output. Reference: IEEE UEL2 421.5-2005 Section 10.2. (Limit characteristic lookup table shown in Figure 10.4 (p 32) of the standard). */ class UnderexcLimIEEE2 : public UnderexcitationLimiterDynamics { public: @@ -29,46 +27,125 @@ namespace CIMPP UnderexcLimIEEE2(); ~UnderexcLimIEEE2() override; - CIMPP::Simple_Float k1; /* UEL terminal voltage exponent applied to real power input to UEL limit look-up table (k1). Typical Value = 2. Default: nullptr */ - CIMPP::Simple_Float k2; /* UEL terminal voltage exponent applied to reactive power output from UEL limit look-up table (k2). Typical Value = 2. Default: nullptr */ - CIMPP::PU kfb; /* Gain associated with optional integrator feedback input signal to UEL (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU kuf; /* UEL excitation system stabilizer gain (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU kui; /* UEL integral gain (K). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU kul; /* UEL proportional gain (K). Typical Value = 0.8. Default: nullptr */ - CIMPP::PU p0; /* Real power values for endpoints (P). Typical Value = 0. Default: nullptr */ - CIMPP::PU p1; /* Real power values for endpoints (P). Typical Value = 0.3. Default: nullptr */ - CIMPP::PU p10; /* Real power values for endpoints (P). Default: nullptr */ - CIMPP::PU p2; /* Real power values for endpoints (P). Typical Value = 0.6. Default: nullptr */ - CIMPP::PU p3; /* Real power values for endpoints (P). Typical Value = 0.9. Default: nullptr */ - CIMPP::PU p4; /* Real power values for endpoints (P). Typical Value = 1.02. Default: nullptr */ - CIMPP::PU p5; /* Real power values for endpoints (P). Default: nullptr */ - CIMPP::PU p6; /* Real power values for endpoints (P). Default: nullptr */ - CIMPP::PU p7; /* Real power values for endpoints (P). Default: nullptr */ - CIMPP::PU p8; /* Real power values for endpoints (P). Default: nullptr */ - CIMPP::PU p9; /* Real power values for endpoints (P). Default: nullptr */ - CIMPP::PU q0; /* Reactive power values for endpoints (Q). Typical Value = -0.31. Default: nullptr */ - CIMPP::PU q1; /* Reactive power values for endpoints (Q). Typical Value = -0.31. Default: nullptr */ - CIMPP::PU q10; /* Reactive power values for endpoints (Q). Default: nullptr */ - CIMPP::PU q2; /* Reactive power values for endpoints (Q). Typical Value = -0.28. Default: nullptr */ - CIMPP::PU q3; /* Reactive power values for endpoints (Q). Typical Value = -0.21. Default: nullptr */ - CIMPP::PU q4; /* Reactive power values for endpoints (Q). Typical Value = 0. Default: nullptr */ - CIMPP::PU q5; /* Reactive power values for endpoints (Q). Default: nullptr */ - CIMPP::PU q6; /* Reactive power values for endpoints (Q). Default: nullptr */ - CIMPP::PU q7; /* Reactive power values for endpoints (Q). Default: nullptr */ - CIMPP::PU q8; /* Reactive power values for endpoints (Q). Default: nullptr */ - CIMPP::PU q9; /* Reactive power values for endpoints (Q). Default: nullptr */ - CIMPP::Seconds tu1; /* UEL lead time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tu2; /* UEL lag time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tu3; /* UEL lead time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tu4; /* UEL lag time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tul; /* Time constant associated with optional integrator feedback input signal to UEL (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tup; /* Real power filter time constant (T). Typical Value = 5. Default: nullptr */ - CIMPP::Seconds tuq; /* Reactive power filter time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tuv; /* Voltage filter time constant (T). Typical Value = 5. Default: nullptr */ - CIMPP::PU vuimax; /* UEL integrator output maximum limit (V). Typical Value = 0.25. Default: nullptr */ - CIMPP::PU vuimin; /* UEL integrator output minimum limit (V). Typical Value = 0. Default: nullptr */ - CIMPP::PU vulmax; /* UEL output maximum limit (V). Typical Value = 0.25. Default: nullptr */ - CIMPP::PU vulmin; /* UEL output minimum limit (V). Typical Value = 0. Default: nullptr */ + /** \brief UEL terminal voltage exponent applied to real power input to UEL limit look-up table (k1). Typical Value = 2. Default: nullptr */ + CIMPP::Simple_Float k1; + + /** \brief UEL terminal voltage exponent applied to reactive power output from UEL limit look-up table (k2). Typical Value = 2. Default: nullptr */ + CIMPP::Simple_Float k2; + + /** \brief Gain associated with optional integrator feedback input signal to UEL (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU kfb; + + /** \brief UEL excitation system stabilizer gain (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU kuf; + + /** \brief UEL integral gain (K). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU kui; + + /** \brief UEL proportional gain (K). Typical Value = 0.8. Default: nullptr */ + CIMPP::PU kul; + + /** \brief Real power values for endpoints (P). Typical Value = 0. Default: nullptr */ + CIMPP::PU p0; + + /** \brief Real power values for endpoints (P). Typical Value = 0.3. Default: nullptr */ + CIMPP::PU p1; + + /** \brief Real power values for endpoints (P). Default: nullptr */ + CIMPP::PU p10; + + /** \brief Real power values for endpoints (P). Typical Value = 0.6. Default: nullptr */ + CIMPP::PU p2; + + /** \brief Real power values for endpoints (P). Typical Value = 0.9. Default: nullptr */ + CIMPP::PU p3; + + /** \brief Real power values for endpoints (P). Typical Value = 1.02. Default: nullptr */ + CIMPP::PU p4; + + /** \brief Real power values for endpoints (P). Default: nullptr */ + CIMPP::PU p5; + + /** \brief Real power values for endpoints (P). Default: nullptr */ + CIMPP::PU p6; + + /** \brief Real power values for endpoints (P). Default: nullptr */ + CIMPP::PU p7; + + /** \brief Real power values for endpoints (P). Default: nullptr */ + CIMPP::PU p8; + + /** \brief Real power values for endpoints (P). Default: nullptr */ + CIMPP::PU p9; + + /** \brief Reactive power values for endpoints (Q). Typical Value = -0.31. Default: nullptr */ + CIMPP::PU q0; + + /** \brief Reactive power values for endpoints (Q). Typical Value = -0.31. Default: nullptr */ + CIMPP::PU q1; + + /** \brief Reactive power values for endpoints (Q). Default: nullptr */ + CIMPP::PU q10; + + /** \brief Reactive power values for endpoints (Q). Typical Value = -0.28. Default: nullptr */ + CIMPP::PU q2; + + /** \brief Reactive power values for endpoints (Q). Typical Value = -0.21. Default: nullptr */ + CIMPP::PU q3; + + /** \brief Reactive power values for endpoints (Q). Typical Value = 0. Default: nullptr */ + CIMPP::PU q4; + + /** \brief Reactive power values for endpoints (Q). Default: nullptr */ + CIMPP::PU q5; + + /** \brief Reactive power values for endpoints (Q). Default: nullptr */ + CIMPP::PU q6; + + /** \brief Reactive power values for endpoints (Q). Default: nullptr */ + CIMPP::PU q7; + + /** \brief Reactive power values for endpoints (Q). Default: nullptr */ + CIMPP::PU q8; + + /** \brief Reactive power values for endpoints (Q). Default: nullptr */ + CIMPP::PU q9; + + /** \brief UEL lead time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tu1; + + /** \brief UEL lag time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tu2; + + /** \brief UEL lead time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tu3; + + /** \brief UEL lag time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tu4; + + /** \brief Time constant associated with optional integrator feedback input signal to UEL (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tul; + + /** \brief Real power filter time constant (T). Typical Value = 5. Default: nullptr */ + CIMPP::Seconds tup; + + /** \brief Reactive power filter time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tuq; + + /** \brief Voltage filter time constant (T). Typical Value = 5. Default: nullptr */ + CIMPP::Seconds tuv; + + /** \brief UEL integrator output maximum limit (V). Typical Value = 0.25. Default: nullptr */ + CIMPP::PU vuimax; + + /** \brief UEL integrator output minimum limit (V). Typical Value = 0. Default: nullptr */ + CIMPP::PU vuimin; + + /** \brief UEL output maximum limit (V). Typical Value = 0.25. Default: nullptr */ + CIMPP::PU vulmax; + + /** \brief UEL output minimum limit (V). Typical Value = 0. Default: nullptr */ + CIMPP::PU vulmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/UnderexcLimX1.cpp b/CGMES_2.4.13_18DEC2013/UnderexcLimX1.cpp index cba09ede6..a14d1ce69 100644 --- a/CGMES_2.4.13_18DEC2013/UnderexcLimX1.cpp +++ b/CGMES_2.4.13_18DEC2013/UnderexcLimX1.cpp @@ -8,17 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -UnderexcLimX1::UnderexcLimX1() {}; -UnderexcLimX1::~UnderexcLimX1() {}; +UnderexcLimX1::UnderexcLimX1() {} +UnderexcLimX1::~UnderexcLimX1() {} static const std::list PossibleProfilesForClass = { @@ -50,90 +44,94 @@ UnderexcLimX1::getPossibleProfilesForAttributes() const return map; } - -bool assign_UnderexcLimX1_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX1_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX1_kf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX1_kf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX1_km(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX1_km(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->km; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX1_melmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX1_melmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->melmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX1_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX1_tf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX1_tm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX1_tm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_UnderexcLimX1_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -147,7 +145,8 @@ bool get_UnderexcLimX1_k(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_UnderexcLimX1_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf2; if (!buffer.str().empty()) @@ -161,7 +160,8 @@ bool get_UnderexcLimX1_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_UnderexcLimX1_km(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->km; if (!buffer.str().empty()) @@ -175,7 +175,8 @@ bool get_UnderexcLimX1_km(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_UnderexcLimX1_melmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->melmax; if (!buffer.str().empty()) @@ -189,7 +190,8 @@ bool get_UnderexcLimX1_melmax(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimX1_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf2; if (!buffer.str().empty()) @@ -203,7 +205,8 @@ bool get_UnderexcLimX1_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_UnderexcLimX1_tm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tm; if (!buffer.str().empty()) @@ -215,8 +218,6 @@ bool get_UnderexcLimX1_tm(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char UnderexcLimX1::debugName[] = "UnderexcLimX1"; const char* UnderexcLimX1::debugString() const { @@ -225,17 +226,17 @@ const char* UnderexcLimX1::debugString() const void UnderexcLimX1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:UnderexcLimX1"), &UnderexcLimX1_factory)); + factory_map.emplace("cim:UnderexcLimX1", &UnderexcLimX1_factory); } void UnderexcLimX1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX1.k"), &assign_UnderexcLimX1_k)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX1.kf2"), &assign_UnderexcLimX1_kf2)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX1.km"), &assign_UnderexcLimX1_km)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX1.melmax"), &assign_UnderexcLimX1_melmax)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX1.tf2"), &assign_UnderexcLimX1_tf2)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX1.tm"), &assign_UnderexcLimX1_tm)); + assign_map.emplace("cim:UnderexcLimX1.k", &assign_UnderexcLimX1_k); + assign_map.emplace("cim:UnderexcLimX1.kf2", &assign_UnderexcLimX1_kf2); + assign_map.emplace("cim:UnderexcLimX1.km", &assign_UnderexcLimX1_km); + assign_map.emplace("cim:UnderexcLimX1.melmax", &assign_UnderexcLimX1_melmax); + assign_map.emplace("cim:UnderexcLimX1.tf2", &assign_UnderexcLimX1_tf2); + assign_map.emplace("cim:UnderexcLimX1.tm", &assign_UnderexcLimX1_tm); } void UnderexcLimX1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/UnderexcLimX1.hpp b/CGMES_2.4.13_18DEC2013/UnderexcLimX1.hpp index 44648be8c..cd15dda37 100644 --- a/CGMES_2.4.13_18DEC2013/UnderexcLimX1.hpp +++ b/CGMES_2.4.13_18DEC2013/UnderexcLimX1.hpp @@ -25,12 +25,23 @@ namespace CIMPP UnderexcLimX1(); ~UnderexcLimX1() override; - CIMPP::PU k; /* Minimum excitation limit slope (K) (>0). Default: nullptr */ - CIMPP::PU kf2; /* Differential gain (Kf2). Default: nullptr */ - CIMPP::PU km; /* Minimum excitation limit gain (Km). Default: nullptr */ - CIMPP::PU melmax; /* Minimum excitation limit value (MELMAX). Default: nullptr */ - CIMPP::Seconds tf2; /* Differential time constant (Tf2) (>0). Default: nullptr */ - CIMPP::Seconds tm; /* Minimum excitation limit time constant (Tm). Default: nullptr */ + /** \brief Minimum excitation limit slope (K) (>0). Default: nullptr */ + CIMPP::PU k; + + /** \brief Differential gain (Kf2). Default: nullptr */ + CIMPP::PU kf2; + + /** \brief Minimum excitation limit gain (Km). Default: nullptr */ + CIMPP::PU km; + + /** \brief Minimum excitation limit value (MELMAX). Default: nullptr */ + CIMPP::PU melmax; + + /** \brief Differential time constant (Tf2) (>0). Default: nullptr */ + CIMPP::Seconds tf2; + + /** \brief Minimum excitation limit time constant (Tm). Default: nullptr */ + CIMPP::Seconds tm; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/UnderexcLimX2.cpp b/CGMES_2.4.13_18DEC2013/UnderexcLimX2.cpp index 31ded8424..64bf7f3c5 100644 --- a/CGMES_2.4.13_18DEC2013/UnderexcLimX2.cpp +++ b/CGMES_2.4.13_18DEC2013/UnderexcLimX2.cpp @@ -8,18 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -UnderexcLimX2::UnderexcLimX2() {}; -UnderexcLimX2::~UnderexcLimX2() {}; +UnderexcLimX2::UnderexcLimX2() {} +UnderexcLimX2::~UnderexcLimX2() {} static const std::list PossibleProfilesForClass = { @@ -52,103 +45,108 @@ UnderexcLimX2::getPossibleProfilesForAttributes() const return map; } - -bool assign_UnderexcLimX2_kf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX2_kf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX2_km(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX2_km(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->km; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX2_melmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX2_melmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->melmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX2_qo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX2_qo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX2_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX2_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX2_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX2_tf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX2_tm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX2_tm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_UnderexcLimX2_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf2; if (!buffer.str().empty()) @@ -162,7 +160,8 @@ bool get_UnderexcLimX2_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_UnderexcLimX2_km(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->km; if (!buffer.str().empty()) @@ -176,7 +175,8 @@ bool get_UnderexcLimX2_km(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_UnderexcLimX2_melmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->melmax; if (!buffer.str().empty()) @@ -190,7 +190,8 @@ bool get_UnderexcLimX2_melmax(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimX2_qo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qo; if (!buffer.str().empty()) @@ -204,7 +205,8 @@ bool get_UnderexcLimX2_qo(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_UnderexcLimX2_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -218,7 +220,8 @@ bool get_UnderexcLimX2_r(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_UnderexcLimX2_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf2; if (!buffer.str().empty()) @@ -232,7 +235,8 @@ bool get_UnderexcLimX2_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_UnderexcLimX2_tm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tm; if (!buffer.str().empty()) @@ -244,8 +248,6 @@ bool get_UnderexcLimX2_tm(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char UnderexcLimX2::debugName[] = "UnderexcLimX2"; const char* UnderexcLimX2::debugString() const { @@ -254,18 +256,18 @@ const char* UnderexcLimX2::debugString() const void UnderexcLimX2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:UnderexcLimX2"), &UnderexcLimX2_factory)); + factory_map.emplace("cim:UnderexcLimX2", &UnderexcLimX2_factory); } void UnderexcLimX2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX2.kf2"), &assign_UnderexcLimX2_kf2)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX2.km"), &assign_UnderexcLimX2_km)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX2.melmax"), &assign_UnderexcLimX2_melmax)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX2.qo"), &assign_UnderexcLimX2_qo)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX2.r"), &assign_UnderexcLimX2_r)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX2.tf2"), &assign_UnderexcLimX2_tf2)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX2.tm"), &assign_UnderexcLimX2_tm)); + assign_map.emplace("cim:UnderexcLimX2.kf2", &assign_UnderexcLimX2_kf2); + assign_map.emplace("cim:UnderexcLimX2.km", &assign_UnderexcLimX2_km); + assign_map.emplace("cim:UnderexcLimX2.melmax", &assign_UnderexcLimX2_melmax); + assign_map.emplace("cim:UnderexcLimX2.qo", &assign_UnderexcLimX2_qo); + assign_map.emplace("cim:UnderexcLimX2.r", &assign_UnderexcLimX2_r); + assign_map.emplace("cim:UnderexcLimX2.tf2", &assign_UnderexcLimX2_tf2); + assign_map.emplace("cim:UnderexcLimX2.tm", &assign_UnderexcLimX2_tm); } void UnderexcLimX2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/UnderexcLimX2.hpp b/CGMES_2.4.13_18DEC2013/UnderexcLimX2.hpp index f1f3ce17b..43f2bfa49 100644 --- a/CGMES_2.4.13_18DEC2013/UnderexcLimX2.hpp +++ b/CGMES_2.4.13_18DEC2013/UnderexcLimX2.hpp @@ -25,13 +25,26 @@ namespace CIMPP UnderexcLimX2(); ~UnderexcLimX2() override; - CIMPP::PU kf2; /* Differential gain (Kf2). Default: nullptr */ - CIMPP::PU km; /* Minimum excitation limit gain (Km). Default: nullptr */ - CIMPP::PU melmax; /* Minimum excitation limit value (MELMAX). Default: nullptr */ - CIMPP::PU qo; /* Excitation center setting (Qo). Default: nullptr */ - CIMPP::PU r; /* Excitation radius (R). Default: nullptr */ - CIMPP::Seconds tf2; /* Differential time constant (Tf2) (>0). Default: nullptr */ - CIMPP::Seconds tm; /* Minimum excitation limit time constant (Tm). Default: nullptr */ + /** \brief Differential gain (Kf2). Default: nullptr */ + CIMPP::PU kf2; + + /** \brief Minimum excitation limit gain (Km). Default: nullptr */ + CIMPP::PU km; + + /** \brief Minimum excitation limit value (MELMAX). Default: nullptr */ + CIMPP::PU melmax; + + /** \brief Excitation center setting (Qo). Default: nullptr */ + CIMPP::PU qo; + + /** \brief Excitation radius (R). Default: nullptr */ + CIMPP::PU r; + + /** \brief Differential time constant (Tf2) (>0). Default: nullptr */ + CIMPP::Seconds tf2; + + /** \brief Minimum excitation limit time constant (Tm). Default: nullptr */ + CIMPP::Seconds tm; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/UnderexcitationLimiterDynamics.cpp b/CGMES_2.4.13_18DEC2013/UnderexcitationLimiterDynamics.cpp index 9d024e743..18ef7b3ec 100644 --- a/CGMES_2.4.13_18DEC2013/UnderexcitationLimiterDynamics.cpp +++ b/CGMES_2.4.13_18DEC2013/UnderexcitationLimiterDynamics.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -UnderexcitationLimiterDynamics::UnderexcitationLimiterDynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr) {}; -UnderexcitationLimiterDynamics::~UnderexcitationLimiterDynamics() {}; +UnderexcitationLimiterDynamics::UnderexcitationLimiterDynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr) {} +UnderexcitationLimiterDynamics::~UnderexcitationLimiterDynamics() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ UnderexcitationLimiterDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_ExcitationSystemDynamics_UnderexcitationLimiterDynamics(BaseClass*, BaseClass*); bool assign_UnderexcitationLimiterDynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_UnderexcitationLimiterDynamics_ExcitationSystemDynamics(BaseClass* B } return false; } + bool assign_RemoteInputSignal_UnderexcitationLimiterDynamics(BaseClass*, BaseClass*); bool assign_UnderexcitationLimiterDynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_UnderexcitationLimiterDynamics_RemoteInputSignal(BaseClass* BaseClas return false; } - bool get_UnderexcitationLimiterDynamics_ExcitationSystemDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const UnderexcitationLimiterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcitationLimiterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ExcitationSystemDynamics != 0) { @@ -100,7 +99,7 @@ const char* UnderexcitationLimiterDynamics::debugString() const void UnderexcitationLimiterDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:UnderexcitationLimiterDynamics"), &UnderexcitationLimiterDynamics_factory)); + factory_map.emplace("cim:UnderexcitationLimiterDynamics", &UnderexcitationLimiterDynamics_factory); } void UnderexcitationLimiterDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -109,8 +108,8 @@ void UnderexcitationLimiterDynamics::addPrimitiveAssignFnsToMap(std::unordered_m void UnderexcitationLimiterDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:UnderexcitationLimiterDynamics.ExcitationSystemDynamics"), &assign_UnderexcitationLimiterDynamics_ExcitationSystemDynamics)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcitationLimiterDynamics.RemoteInputSignal"), &assign_UnderexcitationLimiterDynamics_RemoteInputSignal)); + assign_map.emplace("cim:UnderexcitationLimiterDynamics.ExcitationSystemDynamics", &assign_UnderexcitationLimiterDynamics_ExcitationSystemDynamics); + assign_map.emplace("cim:UnderexcitationLimiterDynamics.RemoteInputSignal", &assign_UnderexcitationLimiterDynamics_RemoteInputSignal); } void UnderexcitationLimiterDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/UnderexcitationLimiterDynamics.hpp b/CGMES_2.4.13_18DEC2013/UnderexcitationLimiterDynamics.hpp index cbb670151..3836bf4cc 100644 --- a/CGMES_2.4.13_18DEC2013/UnderexcitationLimiterDynamics.hpp +++ b/CGMES_2.4.13_18DEC2013/UnderexcitationLimiterDynamics.hpp @@ -18,9 +18,7 @@ namespace CIMPP class ExcitationSystemDynamics; class RemoteInputSignal; - /* - Underexcitation limiter function block whose behaviour is described by reference to a standard model - */ + /** \brief Underexcitation limiter function block whose behaviour is described by reference to a standard model */ class UnderexcitationLimiterDynamics : public DynamicsFunctionBlock { public: @@ -28,8 +26,11 @@ namespace CIMPP UnderexcitationLimiterDynamics(); ~UnderexcitationLimiterDynamics() override; - CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; /* Excitation system model with which this underexcitation limiter model is associated. Default: 0 */ - CIMPP::RemoteInputSignal* RemoteInputSignal; /* Remote input signal used by this underexcitation limiter model. Default: 0 */ + /** \brief Excitation system model with which this underexcitation limiter model is associated. Default: 0 */ + CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; + + /** \brief Remote input signal used by this underexcitation limiter model. Default: 0 */ + CIMPP::RemoteInputSignal* RemoteInputSignal; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/UnderexcitationLimiterUserDefined.cpp b/CGMES_2.4.13_18DEC2013/UnderexcitationLimiterUserDefined.cpp index 87727bcc9..fb5ad61c2 100644 --- a/CGMES_2.4.13_18DEC2013/UnderexcitationLimiterUserDefined.cpp +++ b/CGMES_2.4.13_18DEC2013/UnderexcitationLimiterUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -UnderexcitationLimiterUserDefined::UnderexcitationLimiterUserDefined() {}; -UnderexcitationLimiterUserDefined::~UnderexcitationLimiterUserDefined() {}; +UnderexcitationLimiterUserDefined::UnderexcitationLimiterUserDefined() {} +UnderexcitationLimiterUserDefined::~UnderexcitationLimiterUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ UnderexcitationLimiterUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_UnderexcitationLimiterUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (UnderexcitationLimiterUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_UnderexcitationLimiterUserDefined(BaseClass*, BaseClass*); bool assign_UnderexcitationLimiterUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_UnderexcitationLimiterUserDefined_ProprietaryParameterDynamics(BaseC return false; } +bool assign_UnderexcitationLimiterUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + UnderexcitationLimiterUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_UnderexcitationLimiterUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcitationLimiterUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcitationLimiterUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_UnderexcitationLimiterUserDefined_proprietary(const BaseClass* BaseClas return false; } - - const char UnderexcitationLimiterUserDefined::debugName[] = "UnderexcitationLimiterUserDefined"; const char* UnderexcitationLimiterUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* UnderexcitationLimiterUserDefined::debugString() const void UnderexcitationLimiterUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:UnderexcitationLimiterUserDefined"), &UnderexcitationLimiterUserDefined_factory)); + factory_map.emplace("cim:UnderexcitationLimiterUserDefined", &UnderexcitationLimiterUserDefined_factory); } void UnderexcitationLimiterUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:UnderexcitationLimiterUserDefined.proprietary"), &assign_UnderexcitationLimiterUserDefined_proprietary)); + assign_map.emplace("cim:UnderexcitationLimiterUserDefined.proprietary", &assign_UnderexcitationLimiterUserDefined_proprietary); } void UnderexcitationLimiterUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:UnderexcitationLimiterUserDefined.ProprietaryParameterDynamics"), &assign_UnderexcitationLimiterUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:UnderexcitationLimiterUserDefined.ProprietaryParameterDynamics", &assign_UnderexcitationLimiterUserDefined_ProprietaryParameterDynamics); } void UnderexcitationLimiterUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/UnderexcitationLimiterUserDefined.hpp b/CGMES_2.4.13_18DEC2013/UnderexcitationLimiterUserDefined.hpp index 4e7c237b2..5971269bc 100644 --- a/CGMES_2.4.13_18DEC2013/UnderexcitationLimiterUserDefined.hpp +++ b/CGMES_2.4.13_18DEC2013/UnderexcitationLimiterUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Underexcitation limiter function block whose dynamic behaviour is described by - */ + /** \brief Underexcitation limiter function block whose dynamic behaviour is described by */ class UnderexcitationLimiterUserDefined : public UnderexcitationLimiterDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP UnderexcitationLimiterUserDefined(); ~UnderexcitationLimiterUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/UnitMultiplier.cpp b/CGMES_2.4.13_18DEC2013/UnitMultiplier.cpp index 51e68a621..8bfba0220 100644 --- a/CGMES_2.4.13_18DEC2013/UnitMultiplier.cpp +++ b/CGMES_2.4.13_18DEC2013/UnitMultiplier.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "UnitMultiplier") + if (EnumSymbol.substr(0, pos) != "UnitMultiplier") { lop.setstate(std::ios::failbit); return lop; @@ -50,57 +50,57 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "p") + if (EnumSymbol == "p") { rop = UnitMultiplier::p; return lop; } - if(EnumSymbol == "n") + if (EnumSymbol == "n") { rop = UnitMultiplier::n; return lop; } - if(EnumSymbol == "micro") + if (EnumSymbol == "micro") { rop = UnitMultiplier::micro; return lop; } - if(EnumSymbol == "m") + if (EnumSymbol == "m") { rop = UnitMultiplier::m; return lop; } - if(EnumSymbol == "c") + if (EnumSymbol == "c") { rop = UnitMultiplier::c; return lop; } - if(EnumSymbol == "d") + if (EnumSymbol == "d") { rop = UnitMultiplier::d; return lop; } - if(EnumSymbol == "k") + if (EnumSymbol == "k") { rop = UnitMultiplier::k; return lop; } - if(EnumSymbol == "M") + if (EnumSymbol == "M") { rop = UnitMultiplier::M; return lop; } - if(EnumSymbol == "G") + if (EnumSymbol == "G") { rop = UnitMultiplier::G; return lop; } - if(EnumSymbol == "T") + if (EnumSymbol == "T") { rop = UnitMultiplier::T; return lop; } - if(EnumSymbol == "none") + if (EnumSymbol == "none") { rop = UnitMultiplier::none; return lop; diff --git a/CGMES_2.4.13_18DEC2013/UnitMultiplier.hpp b/CGMES_2.4.13_18DEC2013/UnitMultiplier.hpp index 710c6f153..622b2d589 100644 --- a/CGMES_2.4.13_18DEC2013/UnitMultiplier.hpp +++ b/CGMES_2.4.13_18DEC2013/UnitMultiplier.hpp @@ -9,57 +9,33 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The unit multipliers defined for the CIM. - */ + /** \brief The unit multipliers defined for the CIM. */ class UnitMultiplier { public: enum UnitMultiplier_ENUM { - /** - * Pico 10**-12. - */ + /** Pico 10**-12. */ p, - /** - * Nano 10**-9. - */ + /** Nano 10**-9. */ n, - /** - * Micro 10**-6. - */ + /** Micro 10**-6. */ micro, - /** - * Milli 10**-3. - */ + /** Milli 10**-3. */ m, - /** - * Centi 10**-2. - */ + /** Centi 10**-2. */ c, - /** - * Deci 10**-1. - */ + /** Deci 10**-1. */ d, - /** - * Kilo 10**3. - */ + /** Kilo 10**3. */ k, - /** - * Mega 10**6. - */ + /** Mega 10**6. */ M, - /** - * Giga 10**9. - */ + /** Giga 10**9. */ G, - /** - * Tera 10**12. - */ + /** Tera 10**12. */ T, - /** - * No multiplier or equivalently multiply by 1. - */ + /** No multiplier or equivalently multiply by 1. */ none, }; diff --git a/CGMES_2.4.13_18DEC2013/UnitSymbol.cpp b/CGMES_2.4.13_18DEC2013/UnitSymbol.cpp index 8812cdffb..92f259356 100644 --- a/CGMES_2.4.13_18DEC2013/UnitSymbol.cpp +++ b/CGMES_2.4.13_18DEC2013/UnitSymbol.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "UnitSymbol") + if (EnumSymbol.substr(0, pos) != "UnitSymbol") { lop.setstate(std::ios::failbit); return lop; @@ -50,137 +50,137 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "VA") + if (EnumSymbol == "VA") { rop = UnitSymbol::VA; return lop; } - if(EnumSymbol == "W") + if (EnumSymbol == "W") { rop = UnitSymbol::W; return lop; } - if(EnumSymbol == "VAr") + if (EnumSymbol == "VAr") { rop = UnitSymbol::VAr; return lop; } - if(EnumSymbol == "VAh") + if (EnumSymbol == "VAh") { rop = UnitSymbol::VAh; return lop; } - if(EnumSymbol == "Wh") + if (EnumSymbol == "Wh") { rop = UnitSymbol::Wh; return lop; } - if(EnumSymbol == "VArh") + if (EnumSymbol == "VArh") { rop = UnitSymbol::VArh; return lop; } - if(EnumSymbol == "V") + if (EnumSymbol == "V") { rop = UnitSymbol::V; return lop; } - if(EnumSymbol == "ohm") + if (EnumSymbol == "ohm") { rop = UnitSymbol::ohm; return lop; } - if(EnumSymbol == "A") + if (EnumSymbol == "A") { rop = UnitSymbol::A; return lop; } - if(EnumSymbol == "F") + if (EnumSymbol == "F") { rop = UnitSymbol::F; return lop; } - if(EnumSymbol == "H") + if (EnumSymbol == "H") { rop = UnitSymbol::H; return lop; } - if(EnumSymbol == "degC") + if (EnumSymbol == "degC") { rop = UnitSymbol::degC; return lop; } - if(EnumSymbol == "s") + if (EnumSymbol == "s") { rop = UnitSymbol::s; return lop; } - if(EnumSymbol == "min") + if (EnumSymbol == "min") { rop = UnitSymbol::min; return lop; } - if(EnumSymbol == "h") + if (EnumSymbol == "h") { rop = UnitSymbol::h; return lop; } - if(EnumSymbol == "deg") + if (EnumSymbol == "deg") { rop = UnitSymbol::deg; return lop; } - if(EnumSymbol == "rad") + if (EnumSymbol == "rad") { rop = UnitSymbol::rad; return lop; } - if(EnumSymbol == "J") + if (EnumSymbol == "J") { rop = UnitSymbol::J; return lop; } - if(EnumSymbol == "N") + if (EnumSymbol == "N") { rop = UnitSymbol::N; return lop; } - if(EnumSymbol == "S") + if (EnumSymbol == "S") { rop = UnitSymbol::S; return lop; } - if(EnumSymbol == "none") + if (EnumSymbol == "none") { rop = UnitSymbol::none; return lop; } - if(EnumSymbol == "Hz") + if (EnumSymbol == "Hz") { rop = UnitSymbol::Hz; return lop; } - if(EnumSymbol == "g") + if (EnumSymbol == "g") { rop = UnitSymbol::g; return lop; } - if(EnumSymbol == "Pa") + if (EnumSymbol == "Pa") { rop = UnitSymbol::Pa; return lop; } - if(EnumSymbol == "m") + if (EnumSymbol == "m") { rop = UnitSymbol::m; return lop; } - if(EnumSymbol == "m2") + if (EnumSymbol == "m2") { rop = UnitSymbol::m2; return lop; } - if(EnumSymbol == "m3") + if (EnumSymbol == "m3") { rop = UnitSymbol::m3; return lop; diff --git a/CGMES_2.4.13_18DEC2013/UnitSymbol.hpp b/CGMES_2.4.13_18DEC2013/UnitSymbol.hpp index b63a20465..6cf87bb05 100644 --- a/CGMES_2.4.13_18DEC2013/UnitSymbol.hpp +++ b/CGMES_2.4.13_18DEC2013/UnitSymbol.hpp @@ -9,121 +9,65 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The units defined for usage in the CIM. - */ + /** \brief The units defined for usage in the CIM. */ class UnitSymbol { public: enum UnitSymbol_ENUM { - /** - * Apparent power in volt ampere. - */ + /** Apparent power in volt ampere. */ VA, - /** - * Active power in watt. - */ + /** Active power in watt. */ W, - /** - * Reactive power in volt ampere reactive. - */ + /** Reactive power in volt ampere reactive. */ VAr, - /** - * Apparent energy in volt ampere hours. - */ + /** Apparent energy in volt ampere hours. */ VAh, - /** - * Real energy in what hours. - */ + /** Real energy in what hours. */ Wh, - /** - * Reactive energy in volt ampere reactive hours. - */ + /** Reactive energy in volt ampere reactive hours. */ VArh, - /** - * Voltage in volt. - */ + /** Voltage in volt. */ V, - /** - * Resistance in ohm. - */ + /** Resistance in ohm. */ ohm, - /** - * Current in ampere. - */ + /** Current in ampere. */ A, - /** - * Capacitance in farad. - */ + /** Capacitance in farad. */ F, - /** - * Inductance in henry. - */ + /** Inductance in henry. */ H, - /** - * Relative temperature in degrees Celsius. In the SI unit system the symbol is [SYMBOL REMOVED]C. Electric charge is measured in coulomb that has the unit symbol C. To distinguish degree Celsius form coulomb the symbol used in the UML is degC. Reason for not using [SYMBOL REMOVED]C is the special character [SYMBOL REMOVED] is difficult to manage in software. - */ + /** Relative temperature in degrees Celsius. In the SI unit system the symbol is [SYMBOL REMOVED]C. Electric charge is measured in coulomb that has the unit symbol C. To distinguish degree Celsius form coulomb the symbol used in the UML is degC. Reason for not using [SYMBOL REMOVED]C is the special character [SYMBOL REMOVED] is difficult to manage in software. */ degC, - /** - * Time in seconds. - */ + /** Time in seconds. */ s, - /** - * Time in minutes. - */ + /** Time in minutes. */ min, - /** - * Time in hours. - */ + /** Time in hours. */ h, - /** - * Plane angle in degrees. - */ + /** Plane angle in degrees. */ deg, - /** - * Plane angle in radians. - */ + /** Plane angle in radians. */ rad, - /** - * Energy in joule. - */ + /** Energy in joule. */ J, - /** - * Force in newton. - */ + /** Force in newton. */ N, - /** - * Conductance in siemens. - */ + /** Conductance in siemens. */ S, - /** - * Dimension less quantity, e.g. count, per unit, etc. - */ + /** Dimension less quantity, e.g. count, per unit, etc. */ none, - /** - * Frequency in hertz. - */ + /** Frequency in hertz. */ Hz, - /** - * Mass in gram. - */ + /** Mass in gram. */ g, - /** - * Pressure in pascal (n/m2). - */ + /** Pressure in pascal (n/m2). */ Pa, - /** - * Length in meter. - */ + /** Length in meter. */ m, - /** - * Area in square meters. - */ + /** Area in square meters. */ m2, - /** - * Volume in cubic meters. - */ + /** Volume in cubic meters. */ m3, }; diff --git a/CGMES_2.4.13_18DEC2013/VAdjIEEE.cpp b/CGMES_2.4.13_18DEC2013/VAdjIEEE.cpp index b5043b34b..f62f88f4f 100644 --- a/CGMES_2.4.13_18DEC2013/VAdjIEEE.cpp +++ b/CGMES_2.4.13_18DEC2013/VAdjIEEE.cpp @@ -8,17 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -VAdjIEEE::VAdjIEEE() {}; -VAdjIEEE::~VAdjIEEE() {}; +VAdjIEEE::VAdjIEEE() {} +VAdjIEEE::~VAdjIEEE() {} static const std::list PossibleProfilesForClass = { @@ -50,90 +44,94 @@ VAdjIEEE::getPossibleProfilesForAttributes() const return map; } - -bool assign_VAdjIEEE_adjslew(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VAdjIEEE_adjslew(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->adjslew; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VAdjIEEE_taoff(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VAdjIEEE_taoff(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->taoff; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VAdjIEEE_taon(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VAdjIEEE_taon(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->taon; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VAdjIEEE_vadjf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VAdjIEEE_vadjf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vadjf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VAdjIEEE_vadjmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VAdjIEEE_vadjmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vadjmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VAdjIEEE_vadjmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VAdjIEEE_vadjmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vadjmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_VAdjIEEE_adjslew(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->adjslew; if (!buffer.str().empty()) @@ -147,7 +145,8 @@ bool get_VAdjIEEE_adjslew(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_VAdjIEEE_taoff(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->taoff; if (!buffer.str().empty()) @@ -161,7 +160,8 @@ bool get_VAdjIEEE_taoff(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_VAdjIEEE_taon(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->taon; if (!buffer.str().empty()) @@ -175,7 +175,8 @@ bool get_VAdjIEEE_taon(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_VAdjIEEE_vadjf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vadjf; if (!buffer.str().empty()) @@ -189,7 +190,8 @@ bool get_VAdjIEEE_vadjf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_VAdjIEEE_vadjmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vadjmax; if (!buffer.str().empty()) @@ -203,7 +205,8 @@ bool get_VAdjIEEE_vadjmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_VAdjIEEE_vadjmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vadjmin; if (!buffer.str().empty()) @@ -215,8 +218,6 @@ bool get_VAdjIEEE_vadjmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char VAdjIEEE::debugName[] = "VAdjIEEE"; const char* VAdjIEEE::debugString() const { @@ -225,17 +226,17 @@ const char* VAdjIEEE::debugString() const void VAdjIEEE::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VAdjIEEE"), &VAdjIEEE_factory)); + factory_map.emplace("cim:VAdjIEEE", &VAdjIEEE_factory); } void VAdjIEEE::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VAdjIEEE.adjslew"), &assign_VAdjIEEE_adjslew)); - assign_map.insert(std::make_pair(std::string("cim:VAdjIEEE.taoff"), &assign_VAdjIEEE_taoff)); - assign_map.insert(std::make_pair(std::string("cim:VAdjIEEE.taon"), &assign_VAdjIEEE_taon)); - assign_map.insert(std::make_pair(std::string("cim:VAdjIEEE.vadjf"), &assign_VAdjIEEE_vadjf)); - assign_map.insert(std::make_pair(std::string("cim:VAdjIEEE.vadjmax"), &assign_VAdjIEEE_vadjmax)); - assign_map.insert(std::make_pair(std::string("cim:VAdjIEEE.vadjmin"), &assign_VAdjIEEE_vadjmin)); + assign_map.emplace("cim:VAdjIEEE.adjslew", &assign_VAdjIEEE_adjslew); + assign_map.emplace("cim:VAdjIEEE.taoff", &assign_VAdjIEEE_taoff); + assign_map.emplace("cim:VAdjIEEE.taon", &assign_VAdjIEEE_taon); + assign_map.emplace("cim:VAdjIEEE.vadjf", &assign_VAdjIEEE_vadjf); + assign_map.emplace("cim:VAdjIEEE.vadjmax", &assign_VAdjIEEE_vadjmax); + assign_map.emplace("cim:VAdjIEEE.vadjmin", &assign_VAdjIEEE_vadjmin); } void VAdjIEEE::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/VAdjIEEE.hpp b/CGMES_2.4.13_18DEC2013/VAdjIEEE.hpp index 747098fe2..8ada8dfb7 100644 --- a/CGMES_2.4.13_18DEC2013/VAdjIEEE.hpp +++ b/CGMES_2.4.13_18DEC2013/VAdjIEEE.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Voltage Adjuster which is used to represent the voltage adjuster in either a power factor or var control system. Reference: IEEE Standard 421.5-2005 Section 11.1. - */ + /** \brief The class represents IEEE Voltage Adjuster which is used to represent the voltage adjuster in either a power factor or var control system. Reference: IEEE Standard 421.5-2005 Section 11.1. */ class VAdjIEEE : public VoltageAdjusterDynamics { public: @@ -29,12 +27,23 @@ namespace CIMPP VAdjIEEE(); ~VAdjIEEE() override; - CIMPP::Simple_Float adjslew; /* Rate at which output of adjuster changes (). Unit = sec./PU. Typical Value = 300. Default: nullptr */ - CIMPP::Seconds taoff; /* Time that adjuster pulses are off (). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds taon; /* Time that adjuster pulses are on (). Typical Value = 0.1. Default: nullptr */ - CIMPP::Simple_Float vadjf; /* Set high to provide a continuous raise or lower (). Default: nullptr */ - CIMPP::PU vadjmax; /* Maximum output of the adjuster (). Typical Value = 1.1. Default: nullptr */ - CIMPP::PU vadjmin; /* Minimum output of the adjuster (). Typical Value = 0.9. Default: nullptr */ + /** \brief Rate at which output of adjuster changes (). Unit = sec./PU. Typical Value = 300. Default: nullptr */ + CIMPP::Simple_Float adjslew; + + /** \brief Time that adjuster pulses are off (). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds taoff; + + /** \brief Time that adjuster pulses are on (). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds taon; + + /** \brief Set high to provide a continuous raise or lower (). Default: nullptr */ + CIMPP::Simple_Float vadjf; + + /** \brief Maximum output of the adjuster (). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU vadjmax; + + /** \brief Minimum output of the adjuster (). Typical Value = 0.9. Default: nullptr */ + CIMPP::PU vadjmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/VCompIEEEType1.cpp b/CGMES_2.4.13_18DEC2013/VCompIEEEType1.cpp index c229ab6cb..92cbabebb 100644 --- a/CGMES_2.4.13_18DEC2013/VCompIEEEType1.cpp +++ b/CGMES_2.4.13_18DEC2013/VCompIEEEType1.cpp @@ -8,14 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "Seconds.hpp" -#include "PU.hpp" using namespace CIMPP; -VCompIEEEType1::VCompIEEEType1() {}; -VCompIEEEType1::~VCompIEEEType1() {}; +VCompIEEEType1::VCompIEEEType1() {} +VCompIEEEType1::~VCompIEEEType1() {} static const std::list PossibleProfilesForClass = { @@ -44,51 +41,52 @@ VCompIEEEType1::getPossibleProfilesForAttributes() const return map; } - -bool assign_VCompIEEEType1_rc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VCompIEEEType1_rc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1)) + VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VCompIEEEType1_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VCompIEEEType1_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1)) + VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VCompIEEEType1_xc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VCompIEEEType1_xc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1)) + VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_VCompIEEEType1_rc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1)) + const VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rc; if (!buffer.str().empty()) @@ -102,7 +100,8 @@ bool get_VCompIEEEType1_rc(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_VCompIEEEType1_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1)) + const VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -116,7 +115,8 @@ bool get_VCompIEEEType1_tr(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_VCompIEEEType1_xc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1)) + const VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xc; if (!buffer.str().empty()) @@ -128,8 +128,6 @@ bool get_VCompIEEEType1_xc(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char VCompIEEEType1::debugName[] = "VCompIEEEType1"; const char* VCompIEEEType1::debugString() const { @@ -138,14 +136,14 @@ const char* VCompIEEEType1::debugString() const void VCompIEEEType1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VCompIEEEType1"), &VCompIEEEType1_factory)); + factory_map.emplace("cim:VCompIEEEType1", &VCompIEEEType1_factory); } void VCompIEEEType1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VCompIEEEType1.rc"), &assign_VCompIEEEType1_rc)); - assign_map.insert(std::make_pair(std::string("cim:VCompIEEEType1.tr"), &assign_VCompIEEEType1_tr)); - assign_map.insert(std::make_pair(std::string("cim:VCompIEEEType1.xc"), &assign_VCompIEEEType1_xc)); + assign_map.emplace("cim:VCompIEEEType1.rc", &assign_VCompIEEEType1_rc); + assign_map.emplace("cim:VCompIEEEType1.tr", &assign_VCompIEEEType1_tr); + assign_map.emplace("cim:VCompIEEEType1.xc", &assign_VCompIEEEType1_xc); } void VCompIEEEType1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/VCompIEEEType1.hpp b/CGMES_2.4.13_18DEC2013/VCompIEEEType1.hpp index 520521f70..d5232a748 100644 --- a/CGMES_2.4.13_18DEC2013/VCompIEEEType1.hpp +++ b/CGMES_2.4.13_18DEC2013/VCompIEEEType1.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Reference: IEEE Standard 421.5-2005 Section 4. - */ + /** \brief Reference: IEEE Standard 421.5-2005 Section 4. */ class VCompIEEEType1 : public VoltageCompensatorDynamics { public: @@ -28,9 +26,14 @@ namespace CIMPP VCompIEEEType1(); ~VCompIEEEType1() override; - CIMPP::PU rc; /* Default: nullptr */ - CIMPP::Seconds tr; /* Default: nullptr */ - CIMPP::PU xc; /* Default: nullptr */ + /** \brief Default: nullptr */ + CIMPP::PU rc; + + /** \brief Default: nullptr */ + CIMPP::Seconds tr; + + /** \brief Default: nullptr */ + CIMPP::PU xc; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/VCompIEEEType2.cpp b/CGMES_2.4.13_18DEC2013/VCompIEEEType2.cpp index 9317fd9a8..1377d7b30 100644 --- a/CGMES_2.4.13_18DEC2013/VCompIEEEType2.cpp +++ b/CGMES_2.4.13_18DEC2013/VCompIEEEType2.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "GenICompensationForGenJ.hpp" -#include "Seconds.hpp" using namespace CIMPP; -VCompIEEEType2::VCompIEEEType2() {}; -VCompIEEEType2::~VCompIEEEType2() {}; +VCompIEEEType2::VCompIEEEType2() {} +VCompIEEEType2::~VCompIEEEType2() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ VCompIEEEType2::getPossibleProfilesForAttributes() const return map; } - -bool assign_VCompIEEEType2_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (VCompIEEEType2* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->tr; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_GenICompensationForGenJ_VcompIEEEType2(BaseClass*, BaseClass*); bool assign_VCompIEEEType2_GenICompensationForGenJ(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_VCompIEEEType2_GenICompensationForGenJ(BaseClass* BaseClass_ptr1, Ba return false; } +bool assign_VCompIEEEType2_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + VCompIEEEType2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->tr; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_VCompIEEEType2_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VCompIEEEType2* element = dynamic_cast(BaseClass_ptr1)) + const VCompIEEEType2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_VCompIEEEType2_tr(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char VCompIEEEType2::debugName[] = "VCompIEEEType2"; const char* VCompIEEEType2::debugString() const { @@ -98,17 +96,17 @@ const char* VCompIEEEType2::debugString() const void VCompIEEEType2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VCompIEEEType2"), &VCompIEEEType2_factory)); + factory_map.emplace("cim:VCompIEEEType2", &VCompIEEEType2_factory); } void VCompIEEEType2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VCompIEEEType2.tr"), &assign_VCompIEEEType2_tr)); + assign_map.emplace("cim:VCompIEEEType2.tr", &assign_VCompIEEEType2_tr); } void VCompIEEEType2::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VCompIEEEType2.GenICompensationForGenJ"), &assign_VCompIEEEType2_GenICompensationForGenJ)); + assign_map.emplace("cim:VCompIEEEType2.GenICompensationForGenJ", &assign_VCompIEEEType2_GenICompensationForGenJ); } void VCompIEEEType2::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/VCompIEEEType2.hpp b/CGMES_2.4.13_18DEC2013/VCompIEEEType2.hpp index 939a3436f..67fe38c34 100644 --- a/CGMES_2.4.13_18DEC2013/VCompIEEEType2.hpp +++ b/CGMES_2.4.13_18DEC2013/VCompIEEEType2.hpp @@ -25,8 +25,11 @@ namespace CIMPP VCompIEEEType2(); ~VCompIEEEType2() override; - std::list GenICompensationForGenJ; /* Compensation of this voltage compensator`s generator for current flow out of another generator. Default: 0 */ - CIMPP::Seconds tr; /* Default: nullptr */ + /** \brief Compensation of this voltage compensator`s generator for current flow out of another generator. Default: 0 */ + std::list GenICompensationForGenJ; + + /** \brief Default: nullptr */ + CIMPP::Seconds tr; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Validity.cpp b/CGMES_2.4.13_18DEC2013/Validity.cpp index 9796a2efa..02845a923 100644 --- a/CGMES_2.4.13_18DEC2013/Validity.cpp +++ b/CGMES_2.4.13_18DEC2013/Validity.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "Validity") + if (EnumSymbol.substr(0, pos) != "Validity") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "GOOD") + if (EnumSymbol == "GOOD") { rop = Validity::GOOD; return lop; } - if(EnumSymbol == "QUESTIONABLE") + if (EnumSymbol == "QUESTIONABLE") { rop = Validity::QUESTIONABLE; return lop; } - if(EnumSymbol == "INVALID") + if (EnumSymbol == "INVALID") { rop = Validity::INVALID; return lop; diff --git a/CGMES_2.4.13_18DEC2013/Validity.hpp b/CGMES_2.4.13_18DEC2013/Validity.hpp index fb4d8ce56..73e0f28c5 100644 --- a/CGMES_2.4.13_18DEC2013/Validity.hpp +++ b/CGMES_2.4.13_18DEC2013/Validity.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Validity for MeasurementValue. - */ + /** \brief Validity for MeasurementValue. */ class Validity { public: enum Validity_ENUM { - /** - * The value is marked good if no abnormal condition of the acquisition function or the information source is detected. - */ + /** The value is marked good if no abnormal condition of the acquisition function or the information source is detected. */ GOOD, - /** - * The value is marked questionable if a supervision function detects an abnormal behaviour, however the value could still be valid. The client is responsible for determining whether or not values marked "questionable" should be used. - */ + /** The value is marked questionable if a supervision function detects an abnormal behaviour, however the value could still be valid. The client is responsible for determining whether or not values marked "questionable" should be used. */ QUESTIONABLE, - /** - * The value is marked invalid when a supervision function recognises abnormal conditions of the acquisition function or the information source (missing or non-operating updating devices). The value is not defined under this condition. The mark invalid is used to indicate to the client that the value may be incorrect and shall not be used. - */ + /** The value is marked invalid when a supervision function recognises abnormal conditions of the acquisition function or the information source (missing or non-operating updating devices). The value is not defined under this condition. The mark invalid is used to indicate to the client that the value may be incorrect and shall not be used. */ INVALID, }; diff --git a/CGMES_2.4.13_18DEC2013/ValueAliasSet.cpp b/CGMES_2.4.13_18DEC2013/ValueAliasSet.cpp index b6a111e61..1ba46808c 100644 --- a/CGMES_2.4.13_18DEC2013/ValueAliasSet.cpp +++ b/CGMES_2.4.13_18DEC2013/ValueAliasSet.cpp @@ -15,8 +15,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ValueAliasSet::ValueAliasSet() {}; -ValueAliasSet::~ValueAliasSet() {}; +ValueAliasSet::ValueAliasSet() {} +ValueAliasSet::~ValueAliasSet() {} static const std::list PossibleProfilesForClass = { @@ -46,8 +46,6 @@ ValueAliasSet::getPossibleProfilesForAttributes() const return map; } - - bool assign_Command_ValueAliasSet(BaseClass*, BaseClass*); bool assign_ValueAliasSet_Commands(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -64,6 +62,7 @@ bool assign_ValueAliasSet_Commands(BaseClass* BaseClass_ptr1, BaseClass* BaseCla } return false; } + bool assign_Discrete_ValueAliasSet(BaseClass*, BaseClass*); bool assign_ValueAliasSet_Discretes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -80,6 +79,7 @@ bool assign_ValueAliasSet_Discretes(BaseClass* BaseClass_ptr1, BaseClass* BaseCl } return false; } + bool assign_RaiseLowerCommand_ValueAliasSet(BaseClass*, BaseClass*); bool assign_ValueAliasSet_RaiseLowerCommands(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -96,6 +96,7 @@ bool assign_ValueAliasSet_RaiseLowerCommands(BaseClass* BaseClass_ptr1, BaseClas } return false; } + bool assign_ValueToAlias_ValueAliasSet(BaseClass*, BaseClass*); bool assign_ValueAliasSet_Values(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -115,6 +116,8 @@ bool assign_ValueAliasSet_Values(BaseClass* BaseClass_ptr1, BaseClass* BaseClass + + const char ValueAliasSet::debugName[] = "ValueAliasSet"; const char* ValueAliasSet::debugString() const { @@ -123,7 +126,7 @@ const char* ValueAliasSet::debugString() const void ValueAliasSet::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ValueAliasSet"), &ValueAliasSet_factory)); + factory_map.emplace("cim:ValueAliasSet", &ValueAliasSet_factory); } void ValueAliasSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -132,10 +135,10 @@ void ValueAliasSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ValueAliasSet.Commands"), &assign_ValueAliasSet_Commands)); - assign_map.insert(std::make_pair(std::string("cim:ValueAliasSet.Discretes"), &assign_ValueAliasSet_Discretes)); - assign_map.insert(std::make_pair(std::string("cim:ValueAliasSet.RaiseLowerCommands"), &assign_ValueAliasSet_RaiseLowerCommands)); - assign_map.insert(std::make_pair(std::string("cim:ValueAliasSet.Values"), &assign_ValueAliasSet_Values)); + assign_map.emplace("cim:ValueAliasSet.Commands", &assign_ValueAliasSet_Commands); + assign_map.emplace("cim:ValueAliasSet.Discretes", &assign_ValueAliasSet_Discretes); + assign_map.emplace("cim:ValueAliasSet.RaiseLowerCommands", &assign_ValueAliasSet_RaiseLowerCommands); + assign_map.emplace("cim:ValueAliasSet.Values", &assign_ValueAliasSet_Values); } void ValueAliasSet::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/ValueAliasSet.hpp b/CGMES_2.4.13_18DEC2013/ValueAliasSet.hpp index 66dcbd455..80a9bad49 100644 --- a/CGMES_2.4.13_18DEC2013/ValueAliasSet.hpp +++ b/CGMES_2.4.13_18DEC2013/ValueAliasSet.hpp @@ -20,9 +20,7 @@ namespace CIMPP class RaiseLowerCommand; class ValueToAlias; - /* - Describes the translation of a set of values into a name and is intendend to facilitate cusom translations. Each ValueAliasSet has a name, description etc. A specific Measurement may represent a discrete state like Open, Closed, Intermediate etc. This requires a translation from the MeasurementValue.value number to a string, e.g. 0->"Invalid", 1->"Open", 2->"Closed", 3->"Intermediate". Each ValueToAlias member in ValueAliasSet.Value describe a mapping for one particular value to a name. - */ + /** \brief Describes the translation of a set of values into a name and is intendend to facilitate cusom translations. Each ValueAliasSet has a name, description etc. A specific Measurement may represent a discrete state like Open, Closed, Intermediate etc. This requires a translation from the MeasurementValue.value number to a string, e.g. 0->"Invalid", 1->"Open", 2->"Closed", 3->"Intermediate". Each ValueToAlias member in ValueAliasSet.Value describe a mapping for one particular value to a name. */ class ValueAliasSet : public IdentifiedObject { public: @@ -30,10 +28,17 @@ namespace CIMPP ValueAliasSet(); ~ValueAliasSet() override; - std::list Commands; /* The Commands using the set for translation. Default: 0 */ - std::list Discretes; /* The Measurements using the set for translation. Default: 0 */ - std::list RaiseLowerCommands; /* The Commands using the set for translation. Default: 0 */ - std::list Values; /* The ValueAliasSet having the ValueToAlias mappings. Default: 0 */ + /** \brief The Commands using the set for translation. Default: 0 */ + std::list Commands; + + /** \brief The Measurements using the set for translation. Default: 0 */ + std::list Discretes; + + /** \brief The Commands using the set for translation. Default: 0 */ + std::list RaiseLowerCommands; + + /** \brief The ValueAliasSet having the ValueToAlias mappings. Default: 0 */ + std::list Values; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/ValueToAlias.cpp b/CGMES_2.4.13_18DEC2013/ValueToAlias.cpp index dc6fbcec4..e0b3ae3d9 100644 --- a/CGMES_2.4.13_18DEC2013/ValueToAlias.cpp +++ b/CGMES_2.4.13_18DEC2013/ValueToAlias.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ValueAliasSet.hpp" -#include "Integer.hpp" using namespace CIMPP; -ValueToAlias::ValueToAlias() : ValueAliasSet(nullptr) {}; -ValueToAlias::~ValueToAlias() {}; +ValueToAlias::ValueToAlias() : ValueAliasSet(nullptr) {} +ValueToAlias::~ValueToAlias() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ ValueToAlias::getPossibleProfilesForAttributes() const return map; } - -bool assign_ValueToAlias_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ValueToAlias* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->value; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ValueAliasSet_Values(BaseClass*, BaseClass*); bool assign_ValueToAlias_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_ValueToAlias_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass* Bas return false; } -bool get_ValueToAlias_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_ValueToAlias_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const ValueToAlias* element = dynamic_cast(BaseClass_ptr1)) + ValueToAlias* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->value; - if (!buffer.str().empty()) + buffer >> element->value; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_ValueToAlias_ValueAliasSet(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ValueToAlias* element = dynamic_cast(BaseClass_ptr1)) + const ValueToAlias* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ValueAliasSet != 0) { @@ -102,6 +86,20 @@ bool get_ValueToAlias_ValueAliasSet(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->value; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char ValueToAlias::debugName[] = "ValueToAlias"; const char* ValueToAlias::debugString() const @@ -111,17 +109,17 @@ const char* ValueToAlias::debugString() const void ValueToAlias::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ValueToAlias"), &ValueToAlias_factory)); + factory_map.emplace("cim:ValueToAlias", &ValueToAlias_factory); } void ValueToAlias::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ValueToAlias.value"), &assign_ValueToAlias_value)); + assign_map.emplace("cim:ValueToAlias.value", &assign_ValueToAlias_value); } void ValueToAlias::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ValueToAlias.ValueAliasSet"), &assign_ValueToAlias_ValueAliasSet)); + assign_map.emplace("cim:ValueToAlias.ValueAliasSet", &assign_ValueToAlias_ValueAliasSet); } void ValueToAlias::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/ValueToAlias.hpp b/CGMES_2.4.13_18DEC2013/ValueToAlias.hpp index 7df4daa8e..f2faa5f11 100644 --- a/CGMES_2.4.13_18DEC2013/ValueToAlias.hpp +++ b/CGMES_2.4.13_18DEC2013/ValueToAlias.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ValueAliasSet; - /* - Describes the translation of one particular value into a name, e.g. 1 as "Open". - */ + /** \brief Describes the translation of one particular value into a name, e.g. 1 as "Open". */ class ValueToAlias : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP ValueToAlias(); ~ValueToAlias() override; - CIMPP::ValueAliasSet* ValueAliasSet; /* The ValueToAlias mappings included in the set. Default: 0 */ - CIMPP::Integer value; /* The value that is mapped. Default: 0 */ + /** \brief The ValueToAlias mappings included in the set. Default: 0 */ + CIMPP::ValueAliasSet* ValueAliasSet; + + /** \brief The value that is mapped. Default: 0 */ + CIMPP::Integer value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/VisibilityLayer.cpp b/CGMES_2.4.13_18DEC2013/VisibilityLayer.cpp index 763004423..342592e16 100644 --- a/CGMES_2.4.13_18DEC2013/VisibilityLayer.cpp +++ b/CGMES_2.4.13_18DEC2013/VisibilityLayer.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "DiagramObject.hpp" -#include "Integer.hpp" using namespace CIMPP; -VisibilityLayer::VisibilityLayer() {}; -VisibilityLayer::~VisibilityLayer() {}; +VisibilityLayer::VisibilityLayer() {} +VisibilityLayer::~VisibilityLayer() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ VisibilityLayer::getPossibleProfilesForAttributes() const return map; } - -bool assign_VisibilityLayer_drawingOrder(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (VisibilityLayer* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->drawingOrder; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_DiagramObject_VisibilityLayers(BaseClass*, BaseClass*); bool assign_VisibilityLayer_VisibleObjects(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_VisibilityLayer_VisibleObjects(BaseClass* BaseClass_ptr1, BaseClass* return false; } -bool get_VisibilityLayer_drawingOrder(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_VisibilityLayer_drawingOrder(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const VisibilityLayer* element = dynamic_cast(BaseClass_ptr1)) + VisibilityLayer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->drawingOrder; - if (!buffer.str().empty()) + buffer >> element->drawingOrder; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_VisibilityLayer_VisibleObjects(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const VisibilityLayer* element = dynamic_cast(BaseClass_ptr1)) + const VisibilityLayer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { std::copy(element->VisibleObjects.begin(), element->VisibleObjects.end(), std::back_inserter(BaseClass_list)); return !BaseClass_list.empty(); @@ -99,6 +83,20 @@ bool get_VisibilityLayer_VisibleObjects(const BaseClass* BaseClass_ptr1, std::li return false; } +bool get_VisibilityLayer_drawingOrder(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const VisibilityLayer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->drawingOrder; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char VisibilityLayer::debugName[] = "VisibilityLayer"; const char* VisibilityLayer::debugString() const @@ -108,17 +106,17 @@ const char* VisibilityLayer::debugString() const void VisibilityLayer::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VisibilityLayer"), &VisibilityLayer_factory)); + factory_map.emplace("cim:VisibilityLayer", &VisibilityLayer_factory); } void VisibilityLayer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VisibilityLayer.drawingOrder"), &assign_VisibilityLayer_drawingOrder)); + assign_map.emplace("cim:VisibilityLayer.drawingOrder", &assign_VisibilityLayer_drawingOrder); } void VisibilityLayer::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VisibilityLayer.VisibleObjects"), &assign_VisibilityLayer_VisibleObjects)); + assign_map.emplace("cim:VisibilityLayer.VisibleObjects", &assign_VisibilityLayer_VisibleObjects); } void VisibilityLayer::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/VisibilityLayer.hpp b/CGMES_2.4.13_18DEC2013/VisibilityLayer.hpp index 0eb4565e2..20a6810e6 100644 --- a/CGMES_2.4.13_18DEC2013/VisibilityLayer.hpp +++ b/CGMES_2.4.13_18DEC2013/VisibilityLayer.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class DiagramObject; - /* - Layers are typically used for grouping diagram objects according to themes and scales. Themes are used to display or hide certain information (e.g., lakes, borders), while scales are used for hiding or displaying information depending on the current zoom level (hide text when it is too small to be read, or when it exceeds the screen size). This is also called de-cluttering. CIM based graphics exchange will support an m:n relationship between diagram objects and layers. It will be the task of the importing system to convert an m:n case into an appropriate 1:n representation if the importing system does not support m:n. - */ + /** \brief Layers are typically used for grouping diagram objects according to themes and scales. Themes are used to display or hide certain information (e.g., lakes, borders), while scales are used for hiding or displaying information depending on the current zoom level (hide text when it is too small to be read, or when it exceeds the screen size). This is also called de-cluttering. CIM based graphics exchange will support an m:n relationship between diagram objects and layers. It will be the task of the importing system to convert an m:n case into an appropriate 1:n representation if the importing system does not support m:n. */ class VisibilityLayer : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP VisibilityLayer(); ~VisibilityLayer() override; - std::list VisibleObjects; /* A visibility layer can contain one or more diagram objects. Default: 0 */ - CIMPP::Integer drawingOrder; /* The drawing order for this layer. The higher the number, the later the layer and the objects within it are rendered. Default: 0 */ + /** \brief A visibility layer can contain one or more diagram objects. Default: 0 */ + std::list VisibleObjects; + + /** \brief The drawing order for this layer. The higher the number, the later the layer and the objects within it are rendered. Default: 0 */ + CIMPP::Integer drawingOrder; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/Voltage.hpp b/CGMES_2.4.13_18DEC2013/Voltage.hpp index 12eb87179..a0682e3d6 100644 --- a/CGMES_2.4.13_18DEC2013/Voltage.hpp +++ b/CGMES_2.4.13_18DEC2013/Voltage.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Electrical voltage, can be both AC and DC. - */ + /** \brief Electrical voltage, can be both AC and DC. */ class Voltage { public: diff --git a/CGMES_2.4.13_18DEC2013/VoltageAdjusterDynamics.cpp b/CGMES_2.4.13_18DEC2013/VoltageAdjusterDynamics.cpp index a3ef9d037..5ab8b68ac 100644 --- a/CGMES_2.4.13_18DEC2013/VoltageAdjusterDynamics.cpp +++ b/CGMES_2.4.13_18DEC2013/VoltageAdjusterDynamics.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -VoltageAdjusterDynamics::VoltageAdjusterDynamics() : PFVArControllerType1Dynamics(nullptr) {}; -VoltageAdjusterDynamics::~VoltageAdjusterDynamics() {}; +VoltageAdjusterDynamics::VoltageAdjusterDynamics() : PFVArControllerType1Dynamics(nullptr) {} +VoltageAdjusterDynamics::~VoltageAdjusterDynamics() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ VoltageAdjusterDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_PFVArControllerType1Dynamics_VoltageAdjusterDynamics(BaseClass*, BaseClass*); bool assign_VoltageAdjusterDynamics_PFVArControllerType1Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_VoltageAdjusterDynamics_PFVArControllerType1Dynamics(BaseClass* Base return false; } - bool get_VoltageAdjusterDynamics_PFVArControllerType1Dynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const VoltageAdjusterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const VoltageAdjusterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PFVArControllerType1Dynamics != 0) { @@ -73,7 +71,6 @@ bool get_VoltageAdjusterDynamics_PFVArControllerType1Dynamics(const BaseClass* B return false; } - const char VoltageAdjusterDynamics::debugName[] = "VoltageAdjusterDynamics"; const char* VoltageAdjusterDynamics::debugString() const { @@ -82,7 +79,7 @@ const char* VoltageAdjusterDynamics::debugString() const void VoltageAdjusterDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VoltageAdjusterDynamics"), &VoltageAdjusterDynamics_factory)); + factory_map.emplace("cim:VoltageAdjusterDynamics", &VoltageAdjusterDynamics_factory); } void VoltageAdjusterDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void VoltageAdjusterDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VoltageAdjusterDynamics.PFVArControllerType1Dynamics"), &assign_VoltageAdjusterDynamics_PFVArControllerType1Dynamics)); + assign_map.emplace("cim:VoltageAdjusterDynamics.PFVArControllerType1Dynamics", &assign_VoltageAdjusterDynamics_PFVArControllerType1Dynamics); } void VoltageAdjusterDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/VoltageAdjusterDynamics.hpp b/CGMES_2.4.13_18DEC2013/VoltageAdjusterDynamics.hpp index 16d132c96..38c64482e 100644 --- a/CGMES_2.4.13_18DEC2013/VoltageAdjusterDynamics.hpp +++ b/CGMES_2.4.13_18DEC2013/VoltageAdjusterDynamics.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class PFVArControllerType1Dynamics; - /* - Voltage adjuster function block whose behaviour is described by reference to a standard model - */ + /** \brief Voltage adjuster function block whose behaviour is described by reference to a standard model */ class VoltageAdjusterDynamics : public DynamicsFunctionBlock { public: @@ -27,7 +25,8 @@ namespace CIMPP VoltageAdjusterDynamics(); ~VoltageAdjusterDynamics() override; - CIMPP::PFVArControllerType1Dynamics* PFVArControllerType1Dynamics; /* Power Factor or VAr controller Type I model with which this voltage adjuster is associated. Default: 0 */ + /** \brief Power Factor or VAr controller Type I model with which this voltage adjuster is associated. Default: 0 */ + CIMPP::PFVArControllerType1Dynamics* PFVArControllerType1Dynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/VoltageAdjusterUserDefined.cpp b/CGMES_2.4.13_18DEC2013/VoltageAdjusterUserDefined.cpp index 4a51799ed..c89e76a0e 100644 --- a/CGMES_2.4.13_18DEC2013/VoltageAdjusterUserDefined.cpp +++ b/CGMES_2.4.13_18DEC2013/VoltageAdjusterUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -VoltageAdjusterUserDefined::VoltageAdjusterUserDefined() {}; -VoltageAdjusterUserDefined::~VoltageAdjusterUserDefined() {}; +VoltageAdjusterUserDefined::VoltageAdjusterUserDefined() {} +VoltageAdjusterUserDefined::~VoltageAdjusterUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ VoltageAdjusterUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_VoltageAdjusterUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (VoltageAdjusterUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_VoltageAdjusterUserDefined(BaseClass*, BaseClass*); bool assign_VoltageAdjusterUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_VoltageAdjusterUserDefined_ProprietaryParameterDynamics(BaseClass* B return false; } +bool assign_VoltageAdjusterUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + VoltageAdjusterUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_VoltageAdjusterUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VoltageAdjusterUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const VoltageAdjusterUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_VoltageAdjusterUserDefined_proprietary(const BaseClass* BaseClass_ptr1, return false; } - - const char VoltageAdjusterUserDefined::debugName[] = "VoltageAdjusterUserDefined"; const char* VoltageAdjusterUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* VoltageAdjusterUserDefined::debugString() const void VoltageAdjusterUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VoltageAdjusterUserDefined"), &VoltageAdjusterUserDefined_factory)); + factory_map.emplace("cim:VoltageAdjusterUserDefined", &VoltageAdjusterUserDefined_factory); } void VoltageAdjusterUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VoltageAdjusterUserDefined.proprietary"), &assign_VoltageAdjusterUserDefined_proprietary)); + assign_map.emplace("cim:VoltageAdjusterUserDefined.proprietary", &assign_VoltageAdjusterUserDefined_proprietary); } void VoltageAdjusterUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VoltageAdjusterUserDefined.ProprietaryParameterDynamics"), &assign_VoltageAdjusterUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:VoltageAdjusterUserDefined.ProprietaryParameterDynamics", &assign_VoltageAdjusterUserDefined_ProprietaryParameterDynamics); } void VoltageAdjusterUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/VoltageAdjusterUserDefined.hpp b/CGMES_2.4.13_18DEC2013/VoltageAdjusterUserDefined.hpp index 9f9c707a9..b1e9da031 100644 --- a/CGMES_2.4.13_18DEC2013/VoltageAdjusterUserDefined.hpp +++ b/CGMES_2.4.13_18DEC2013/VoltageAdjusterUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - function block whose dynamic behaviour is described by - */ + /** \brief function block whose dynamic behaviour is described by */ class VoltageAdjusterUserDefined : public VoltageAdjusterDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP VoltageAdjusterUserDefined(); ~VoltageAdjusterUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/VoltageCompensatorDynamics.cpp b/CGMES_2.4.13_18DEC2013/VoltageCompensatorDynamics.cpp index d255c5a7b..b1b3c20fd 100644 --- a/CGMES_2.4.13_18DEC2013/VoltageCompensatorDynamics.cpp +++ b/CGMES_2.4.13_18DEC2013/VoltageCompensatorDynamics.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -VoltageCompensatorDynamics::VoltageCompensatorDynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr) {}; -VoltageCompensatorDynamics::~VoltageCompensatorDynamics() {}; +VoltageCompensatorDynamics::VoltageCompensatorDynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr) {} +VoltageCompensatorDynamics::~VoltageCompensatorDynamics() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ VoltageCompensatorDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_ExcitationSystemDynamics_VoltageCompensatorDynamics(BaseClass*, BaseClass*); bool assign_VoltageCompensatorDynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_VoltageCompensatorDynamics_ExcitationSystemDynamics(BaseClass* BaseC } return false; } + bool assign_RemoteInputSignal_VoltageCompensatorDynamics(BaseClass*, BaseClass*); bool assign_VoltageCompensatorDynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_VoltageCompensatorDynamics_RemoteInputSignal(BaseClass* BaseClass_pt return false; } - bool get_VoltageCompensatorDynamics_ExcitationSystemDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const VoltageCompensatorDynamics* element = dynamic_cast(BaseClass_ptr1)) + const VoltageCompensatorDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ExcitationSystemDynamics != 0) { @@ -100,7 +99,7 @@ const char* VoltageCompensatorDynamics::debugString() const void VoltageCompensatorDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VoltageCompensatorDynamics"), &VoltageCompensatorDynamics_factory)); + factory_map.emplace("cim:VoltageCompensatorDynamics", &VoltageCompensatorDynamics_factory); } void VoltageCompensatorDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -109,8 +108,8 @@ void VoltageCompensatorDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VoltageCompensatorDynamics.ExcitationSystemDynamics"), &assign_VoltageCompensatorDynamics_ExcitationSystemDynamics)); - assign_map.insert(std::make_pair(std::string("cim:VoltageCompensatorDynamics.RemoteInputSignal"), &assign_VoltageCompensatorDynamics_RemoteInputSignal)); + assign_map.emplace("cim:VoltageCompensatorDynamics.ExcitationSystemDynamics", &assign_VoltageCompensatorDynamics_ExcitationSystemDynamics); + assign_map.emplace("cim:VoltageCompensatorDynamics.RemoteInputSignal", &assign_VoltageCompensatorDynamics_RemoteInputSignal); } void VoltageCompensatorDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/VoltageCompensatorDynamics.hpp b/CGMES_2.4.13_18DEC2013/VoltageCompensatorDynamics.hpp index 9f1b0d557..858af27b2 100644 --- a/CGMES_2.4.13_18DEC2013/VoltageCompensatorDynamics.hpp +++ b/CGMES_2.4.13_18DEC2013/VoltageCompensatorDynamics.hpp @@ -18,9 +18,7 @@ namespace CIMPP class ExcitationSystemDynamics; class RemoteInputSignal; - /* - Voltage compensator function block whose behaviour is described by reference to a standard model - */ + /** \brief Voltage compensator function block whose behaviour is described by reference to a standard model */ class VoltageCompensatorDynamics : public DynamicsFunctionBlock { public: @@ -28,8 +26,11 @@ namespace CIMPP VoltageCompensatorDynamics(); ~VoltageCompensatorDynamics() override; - CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; /* Excitation system model with which this voltage compensator is associated. Default: 0 */ - CIMPP::RemoteInputSignal* RemoteInputSignal; /* Remote input signal used by this voltage compensator model. Default: 0 */ + /** \brief Excitation system model with which this voltage compensator is associated. Default: 0 */ + CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; + + /** \brief Remote input signal used by this voltage compensator model. Default: 0 */ + CIMPP::RemoteInputSignal* RemoteInputSignal; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/VoltageCompensatorUserDefined.cpp b/CGMES_2.4.13_18DEC2013/VoltageCompensatorUserDefined.cpp index 54c2e492b..dc3b5ff50 100644 --- a/CGMES_2.4.13_18DEC2013/VoltageCompensatorUserDefined.cpp +++ b/CGMES_2.4.13_18DEC2013/VoltageCompensatorUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -VoltageCompensatorUserDefined::VoltageCompensatorUserDefined() {}; -VoltageCompensatorUserDefined::~VoltageCompensatorUserDefined() {}; +VoltageCompensatorUserDefined::VoltageCompensatorUserDefined() {} +VoltageCompensatorUserDefined::~VoltageCompensatorUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ VoltageCompensatorUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_VoltageCompensatorUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (VoltageCompensatorUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_VoltageCompensatorUserDefined(BaseClass*, BaseClass*); bool assign_VoltageCompensatorUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_VoltageCompensatorUserDefined_ProprietaryParameterDynamics(BaseClass return false; } +bool assign_VoltageCompensatorUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + VoltageCompensatorUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_VoltageCompensatorUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VoltageCompensatorUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const VoltageCompensatorUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_VoltageCompensatorUserDefined_proprietary(const BaseClass* BaseClass_pt return false; } - - const char VoltageCompensatorUserDefined::debugName[] = "VoltageCompensatorUserDefined"; const char* VoltageCompensatorUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* VoltageCompensatorUserDefined::debugString() const void VoltageCompensatorUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VoltageCompensatorUserDefined"), &VoltageCompensatorUserDefined_factory)); + factory_map.emplace("cim:VoltageCompensatorUserDefined", &VoltageCompensatorUserDefined_factory); } void VoltageCompensatorUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VoltageCompensatorUserDefined.proprietary"), &assign_VoltageCompensatorUserDefined_proprietary)); + assign_map.emplace("cim:VoltageCompensatorUserDefined.proprietary", &assign_VoltageCompensatorUserDefined_proprietary); } void VoltageCompensatorUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VoltageCompensatorUserDefined.ProprietaryParameterDynamics"), &assign_VoltageCompensatorUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:VoltageCompensatorUserDefined.ProprietaryParameterDynamics", &assign_VoltageCompensatorUserDefined_ProprietaryParameterDynamics); } void VoltageCompensatorUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/VoltageCompensatorUserDefined.hpp b/CGMES_2.4.13_18DEC2013/VoltageCompensatorUserDefined.hpp index 924914260..7f6055be5 100644 --- a/CGMES_2.4.13_18DEC2013/VoltageCompensatorUserDefined.hpp +++ b/CGMES_2.4.13_18DEC2013/VoltageCompensatorUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Voltage compensator function block whose dynamic behaviour is described by - */ + /** \brief Voltage compensator function block whose dynamic behaviour is described by */ class VoltageCompensatorUserDefined : public VoltageCompensatorDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP VoltageCompensatorUserDefined(); ~VoltageCompensatorUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/VoltageLevel.cpp b/CGMES_2.4.13_18DEC2013/VoltageLevel.cpp index 4f42553d2..31ba7dc6a 100644 --- a/CGMES_2.4.13_18DEC2013/VoltageLevel.cpp +++ b/CGMES_2.4.13_18DEC2013/VoltageLevel.cpp @@ -11,13 +11,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "BaseVoltage.hpp" #include "Bay.hpp" #include "Substation.hpp" -#include "Voltage.hpp" -#include "Voltage.hpp" using namespace CIMPP; -VoltageLevel::VoltageLevel() : BaseVoltage(nullptr), Substation(nullptr) {}; -VoltageLevel::~VoltageLevel() {}; +VoltageLevel::VoltageLevel() : BaseVoltage(nullptr), Substation(nullptr) {} +VoltageLevel::~VoltageLevel() {} static const std::list PossibleProfilesForClass = { @@ -48,34 +46,6 @@ VoltageLevel::getPossibleProfilesForAttributes() const return map; } - -bool assign_VoltageLevel_highVoltageLimit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (VoltageLevel* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->highVoltageLimit; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_VoltageLevel_lowVoltageLimit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (VoltageLevel* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->lowVoltageLimit; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_BaseVoltage_VoltageLevel(BaseClass*, BaseClass*); bool assign_VoltageLevel_BaseVoltage(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -92,6 +62,7 @@ bool assign_VoltageLevel_BaseVoltage(BaseClass* BaseClass_ptr1, BaseClass* BaseC } return false; } + bool assign_Bay_VoltageLevel(BaseClass*, BaseClass*); bool assign_VoltageLevel_Bays(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -108,6 +79,7 @@ bool assign_VoltageLevel_Bays(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_pt } return false; } + bool assign_Substation_VoltageLevels(BaseClass*, BaseClass*); bool assign_VoltageLevel_Substation(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -125,38 +97,38 @@ bool assign_VoltageLevel_Substation(BaseClass* BaseClass_ptr1, BaseClass* BaseCl return false; } -bool get_VoltageLevel_highVoltageLimit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_VoltageLevel_highVoltageLimit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const VoltageLevel* element = dynamic_cast(BaseClass_ptr1)) + VoltageLevel* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->highVoltageLimit; - if (!buffer.str().empty()) + buffer >> element->highVoltageLimit; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_VoltageLevel_lowVoltageLimit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_VoltageLevel_lowVoltageLimit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const VoltageLevel* element = dynamic_cast(BaseClass_ptr1)) + VoltageLevel* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->lowVoltageLimit; - if (!buffer.str().empty()) + buffer >> element->lowVoltageLimit; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_VoltageLevel_BaseVoltage(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const VoltageLevel* element = dynamic_cast(BaseClass_ptr1)) + const VoltageLevel* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->BaseVoltage != 0) { @@ -167,9 +139,11 @@ bool get_VoltageLevel_BaseVoltage(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const VoltageLevel* element = dynamic_cast(BaseClass_ptr1)) + const VoltageLevel* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Substation != 0) { @@ -180,6 +154,35 @@ bool get_VoltageLevel_Substation(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->highVoltageLimit; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_VoltageLevel_lowVoltageLimit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const VoltageLevel* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->lowVoltageLimit; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char VoltageLevel::debugName[] = "VoltageLevel"; const char* VoltageLevel::debugString() const @@ -189,20 +192,20 @@ const char* VoltageLevel::debugString() const void VoltageLevel::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VoltageLevel"), &VoltageLevel_factory)); + factory_map.emplace("cim:VoltageLevel", &VoltageLevel_factory); } void VoltageLevel::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VoltageLevel.highVoltageLimit"), &assign_VoltageLevel_highVoltageLimit)); - assign_map.insert(std::make_pair(std::string("cim:VoltageLevel.lowVoltageLimit"), &assign_VoltageLevel_lowVoltageLimit)); + assign_map.emplace("cim:VoltageLevel.highVoltageLimit", &assign_VoltageLevel_highVoltageLimit); + assign_map.emplace("cim:VoltageLevel.lowVoltageLimit", &assign_VoltageLevel_lowVoltageLimit); } void VoltageLevel::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VoltageLevel.BaseVoltage"), &assign_VoltageLevel_BaseVoltage)); - assign_map.insert(std::make_pair(std::string("cim:VoltageLevel.Bays"), &assign_VoltageLevel_Bays)); - assign_map.insert(std::make_pair(std::string("cim:VoltageLevel.Substation"), &assign_VoltageLevel_Substation)); + assign_map.emplace("cim:VoltageLevel.BaseVoltage", &assign_VoltageLevel_BaseVoltage); + assign_map.emplace("cim:VoltageLevel.Bays", &assign_VoltageLevel_Bays); + assign_map.emplace("cim:VoltageLevel.Substation", &assign_VoltageLevel_Substation); } void VoltageLevel::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/VoltageLevel.hpp b/CGMES_2.4.13_18DEC2013/VoltageLevel.hpp index fe71f62cc..5b32798e6 100644 --- a/CGMES_2.4.13_18DEC2013/VoltageLevel.hpp +++ b/CGMES_2.4.13_18DEC2013/VoltageLevel.hpp @@ -20,9 +20,7 @@ namespace CIMPP class Bay; class Substation; - /* - A collection of equipment at one common system voltage forming a switchgear. The equipment typically consist of breakers, busbars, instrumentation, control, regulation and protection devices as well as assemblies of all these. - */ + /** \brief A collection of equipment at one common system voltage forming a switchgear. The equipment typically consist of breakers, busbars, instrumentation, control, regulation and protection devices as well as assemblies of all these. */ class VoltageLevel : public EquipmentContainer { public: @@ -30,11 +28,20 @@ namespace CIMPP VoltageLevel(); ~VoltageLevel() override; - CIMPP::BaseVoltage* BaseVoltage; /* The base voltage used for all equipment within the voltage level. Default: 0 */ - std::list Bays; /* The bays within this voltage level. Default: 0 */ - CIMPP::Substation* Substation; /* The substation of the voltage level. Default: 0 */ - CIMPP::Voltage highVoltageLimit; /* The bus bar`s high voltage limit Default: nullptr */ - CIMPP::Voltage lowVoltageLimit; /* The bus bar`s low voltage limit Default: nullptr */ + /** \brief The base voltage used for all equipment within the voltage level. Default: 0 */ + CIMPP::BaseVoltage* BaseVoltage; + + /** \brief The bays within this voltage level. Default: 0 */ + std::list Bays; + + /** \brief The substation of the voltage level. Default: 0 */ + CIMPP::Substation* Substation; + + /** \brief The bus bar`s high voltage limit Default: nullptr */ + CIMPP::Voltage highVoltageLimit; + + /** \brief The bus bar`s low voltage limit Default: nullptr */ + CIMPP::Voltage lowVoltageLimit; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/VoltageLimit.cpp b/CGMES_2.4.13_18DEC2013/VoltageLimit.cpp index 5eec5d9ff..b8a2d59db 100644 --- a/CGMES_2.4.13_18DEC2013/VoltageLimit.cpp +++ b/CGMES_2.4.13_18DEC2013/VoltageLimit.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Voltage.hpp" using namespace CIMPP; -VoltageLimit::VoltageLimit() {}; -VoltageLimit::~VoltageLimit() {}; +VoltageLimit::VoltageLimit() {} +VoltageLimit::~VoltageLimit() {} static const std::list PossibleProfilesForClass = { @@ -40,25 +39,24 @@ VoltageLimit::getPossibleProfilesForAttributes() const return map; } - -bool assign_VoltageLimit_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VoltageLimit_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VoltageLimit* element = dynamic_cast(BaseClass_ptr1)) + VoltageLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->value; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_VoltageLimit_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VoltageLimit* element = dynamic_cast(BaseClass_ptr1)) + const VoltageLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value; if (!buffer.str().empty()) @@ -70,8 +68,6 @@ bool get_VoltageLimit_value(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char VoltageLimit::debugName[] = "VoltageLimit"; const char* VoltageLimit::debugString() const { @@ -80,12 +76,12 @@ const char* VoltageLimit::debugString() const void VoltageLimit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VoltageLimit"), &VoltageLimit_factory)); + factory_map.emplace("cim:VoltageLimit", &VoltageLimit_factory); } void VoltageLimit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VoltageLimit.value"), &assign_VoltageLimit_value)); + assign_map.emplace("cim:VoltageLimit.value", &assign_VoltageLimit_value); } void VoltageLimit::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/VoltageLimit.hpp b/CGMES_2.4.13_18DEC2013/VoltageLimit.hpp index 8673e3ee2..7f2ddc83a 100644 --- a/CGMES_2.4.13_18DEC2013/VoltageLimit.hpp +++ b/CGMES_2.4.13_18DEC2013/VoltageLimit.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Operational limit applied to voltage. - */ + /** \brief Operational limit applied to voltage. */ class VoltageLimit : public OperationalLimit { public: @@ -27,7 +25,8 @@ namespace CIMPP VoltageLimit(); ~VoltageLimit() override; - CIMPP::Voltage value; /* Limit on voltage. High or low limit nature of the limit depends upon the properties of the operational limit type. Default: nullptr */ + /** \brief Limit on voltage. High or low limit nature of the limit depends upon the properties of the operational limit type. Default: nullptr */ + CIMPP::Voltage value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/VoltagePerReactivePower.hpp b/CGMES_2.4.13_18DEC2013/VoltagePerReactivePower.hpp index 51ef9b955..521c38a90 100644 --- a/CGMES_2.4.13_18DEC2013/VoltagePerReactivePower.hpp +++ b/CGMES_2.4.13_18DEC2013/VoltagePerReactivePower.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Voltage variation with reactive power. - */ + /** \brief Voltage variation with reactive power. */ class VoltagePerReactivePower { public: diff --git a/CGMES_2.4.13_18DEC2013/VolumeFlowRate.hpp b/CGMES_2.4.13_18DEC2013/VolumeFlowRate.hpp index 256cf7e18..4c78de832 100644 --- a/CGMES_2.4.13_18DEC2013/VolumeFlowRate.hpp +++ b/CGMES_2.4.13_18DEC2013/VolumeFlowRate.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Volume per time. - */ + /** \brief Volume per time. */ class VolumeFlowRate { public: diff --git a/CGMES_2.4.13_18DEC2013/VsCapabilityCurve.cpp b/CGMES_2.4.13_18DEC2013/VsCapabilityCurve.cpp index b1e03e9fd..5a75f1880 100644 --- a/CGMES_2.4.13_18DEC2013/VsCapabilityCurve.cpp +++ b/CGMES_2.4.13_18DEC2013/VsCapabilityCurve.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -VsCapabilityCurve::VsCapabilityCurve() {}; -VsCapabilityCurve::~VsCapabilityCurve() {}; +VsCapabilityCurve::VsCapabilityCurve() {} +VsCapabilityCurve::~VsCapabilityCurve() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ VsCapabilityCurve::getPossibleProfilesForAttributes() const return map; } - - bool assign_VsConverter_CapabilityCurve(BaseClass*, BaseClass*); bool assign_VsCapabilityCurve_VsConverterDCSides(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_VsCapabilityCurve_VsConverterDCSides(BaseClass* BaseClass_ptr1, Base } - const char VsCapabilityCurve::debugName[] = "VsCapabilityCurve"; const char* VsCapabilityCurve::debugString() const { @@ -69,7 +66,7 @@ const char* VsCapabilityCurve::debugString() const void VsCapabilityCurve::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VsCapabilityCurve"), &VsCapabilityCurve_factory)); + factory_map.emplace("cim:VsCapabilityCurve", &VsCapabilityCurve_factory); } void VsCapabilityCurve::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void VsCapabilityCurve::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VsCapabilityCurve.VsConverterDCSides"), &assign_VsCapabilityCurve_VsConverterDCSides)); + assign_map.emplace("cim:VsCapabilityCurve.VsConverterDCSides", &assign_VsCapabilityCurve_VsConverterDCSides); } void VsCapabilityCurve::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/VsCapabilityCurve.hpp b/CGMES_2.4.13_18DEC2013/VsCapabilityCurve.hpp index 7794e4b4f..9eaa77b41 100644 --- a/CGMES_2.4.13_18DEC2013/VsCapabilityCurve.hpp +++ b/CGMES_2.4.13_18DEC2013/VsCapabilityCurve.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class VsConverter; - /* - The P-Q capability curve for a voltage source converter, with P on x-axis and Qmin and Qmax on y1-axis and y2-axis. - */ + /** \brief The P-Q capability curve for a voltage source converter, with P on x-axis and Qmin and Qmax on y1-axis and y2-axis. */ class VsCapabilityCurve : public Curve { public: @@ -27,7 +25,8 @@ namespace CIMPP VsCapabilityCurve(); ~VsCapabilityCurve() override; - std::list VsConverterDCSides; /* Capability curve of this converter. Default: 0 */ + /** \brief Capability curve of this converter. Default: 0 */ + std::list VsConverterDCSides; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/VsConverter.cpp b/CGMES_2.4.13_18DEC2013/VsConverter.cpp index 18df31fb9..3cc9a7c0c 100644 --- a/CGMES_2.4.13_18DEC2013/VsConverter.cpp +++ b/CGMES_2.4.13_18DEC2013/VsConverter.cpp @@ -9,22 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "VsCapabilityCurve.hpp" -#include "AngleDegrees.hpp" -#include "PU.hpp" -#include "Resistance.hpp" -#include "Simple_Float.hpp" -#include "CurrentFlow.hpp" -#include "VsPpccControlKind.hpp" -#include "VsQpccControlKind.hpp" -#include "PerCent.hpp" -#include "ReactivePower.hpp" -#include "Voltage.hpp" -#include "Voltage.hpp" using namespace CIMPP; -VsConverter::VsConverter() : CapabilityCurve(nullptr) {}; -VsConverter::~VsConverter() {}; +VsConverter::VsConverter() : CapabilityCurve(nullptr) {} +VsConverter::~VsConverter() {} static const std::list PossibleProfilesForClass = { @@ -64,171 +53,195 @@ VsConverter::getPossibleProfilesForAttributes() const return map; } +bool assign_VsCapabilityCurve_VsConverterDCSides(BaseClass*, BaseClass*); +bool assign_VsConverter_CapabilityCurve(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + VsConverter* element = dynamic_cast(BaseClass_ptr1); + VsCapabilityCurve* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->CapabilityCurve != element2) + { + element->CapabilityCurve = element2; + return assign_VsCapabilityCurve_VsConverterDCSides(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_VsConverter_delta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_delta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->delta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_droop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_droop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->droop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_droopCompensation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_droopCompensation(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->droopCompensation; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_maxModulationIndex(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_maxModulationIndex(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxModulationIndex; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_maxValveCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_maxValveCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxValveCurrent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_pPccControl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_pPccControl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pPccControl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_qPccControl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_qPccControl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qPccControl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_qShare(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_qShare(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qShare; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_targetQpcc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_targetQpcc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->targetQpcc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_targetUpcc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_targetUpcc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->targetUpcc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_uf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_uf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_VsCapabilityCurve_VsConverterDCSides(BaseClass*, BaseClass*); -bool assign_VsConverter_CapabilityCurve(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_VsConverter_CapabilityCurve(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - VsConverter* element = dynamic_cast(BaseClass_ptr1); - VsCapabilityCurve* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->CapabilityCurve != element2) + if (element->CapabilityCurve != 0) { - element->CapabilityCurve = element2; - return assign_VsCapabilityCurve_VsConverterDCSides(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->CapabilityCurve); + return true; } - return true; } return false; } bool get_VsConverter_delta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->delta; if (!buffer.str().empty()) @@ -242,7 +255,8 @@ bool get_VsConverter_delta(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_VsConverter_droop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->droop; if (!buffer.str().empty()) @@ -256,7 +270,8 @@ bool get_VsConverter_droop(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_VsConverter_droopCompensation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->droopCompensation; if (!buffer.str().empty()) @@ -270,7 +285,8 @@ bool get_VsConverter_droopCompensation(const BaseClass* BaseClass_ptr1, std::str bool get_VsConverter_maxModulationIndex(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxModulationIndex; if (!buffer.str().empty()) @@ -284,7 +300,8 @@ bool get_VsConverter_maxModulationIndex(const BaseClass* BaseClass_ptr1, std::st bool get_VsConverter_maxValveCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxValveCurrent; if (!buffer.str().empty()) @@ -296,11 +313,12 @@ bool get_VsConverter_maxValveCurrent(const BaseClass* BaseClass_ptr1, std::strin return false; } -bool get_VsConverter_qShare(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_VsConverter_pPccControl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->qShare; + buffer << element->pPccControl; if (!buffer.str().empty()) { return true; @@ -310,11 +328,12 @@ bool get_VsConverter_qShare(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } -bool get_VsConverter_targetQpcc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_VsConverter_qPccControl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->targetQpcc; + buffer << element->qPccControl; if (!buffer.str().empty()) { return true; @@ -324,11 +343,12 @@ bool get_VsConverter_targetQpcc(const BaseClass* BaseClass_ptr1, std::stringstre return false; } -bool get_VsConverter_targetUpcc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_VsConverter_qShare(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->targetUpcc; + buffer << element->qShare; if (!buffer.str().empty()) { return true; @@ -338,11 +358,12 @@ bool get_VsConverter_targetUpcc(const BaseClass* BaseClass_ptr1, std::stringstre return false; } -bool get_VsConverter_uf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_VsConverter_targetQpcc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->uf; + buffer << element->targetQpcc; if (!buffer.str().empty()) { return true; @@ -352,26 +373,12 @@ bool get_VsConverter_uf(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - -bool get_VsConverter_CapabilityCurve(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->CapabilityCurve != 0) - { - BaseClass_list.push_back(element->CapabilityCurve); - return true; - } - } - return false; -} - - -bool get_VsConverter_pPccControl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_VsConverter_targetUpcc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->pPccControl; + buffer << element->targetUpcc; if (!buffer.str().empty()) { return true; @@ -381,11 +388,12 @@ bool get_VsConverter_pPccControl(const BaseClass* BaseClass_ptr1, std::stringstr return false; } -bool get_VsConverter_qPccControl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_VsConverter_uf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->qPccControl; + buffer << element->uf; if (!buffer.str().empty()) { return true; @@ -403,27 +411,27 @@ const char* VsConverter::debugString() const void VsConverter::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VsConverter"), &VsConverter_factory)); + factory_map.emplace("cim:VsConverter", &VsConverter_factory); } void VsConverter::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VsConverter.delta"), &assign_VsConverter_delta)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.droop"), &assign_VsConverter_droop)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.droopCompensation"), &assign_VsConverter_droopCompensation)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.maxModulationIndex"), &assign_VsConverter_maxModulationIndex)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.maxValveCurrent"), &assign_VsConverter_maxValveCurrent)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.pPccControl"), &assign_VsConverter_pPccControl)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.qPccControl"), &assign_VsConverter_qPccControl)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.qShare"), &assign_VsConverter_qShare)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.targetQpcc"), &assign_VsConverter_targetQpcc)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.targetUpcc"), &assign_VsConverter_targetUpcc)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.uf"), &assign_VsConverter_uf)); + assign_map.emplace("cim:VsConverter.delta", &assign_VsConverter_delta); + assign_map.emplace("cim:VsConverter.droop", &assign_VsConverter_droop); + assign_map.emplace("cim:VsConverter.droopCompensation", &assign_VsConverter_droopCompensation); + assign_map.emplace("cim:VsConverter.maxModulationIndex", &assign_VsConverter_maxModulationIndex); + assign_map.emplace("cim:VsConverter.maxValveCurrent", &assign_VsConverter_maxValveCurrent); + assign_map.emplace("cim:VsConverter.pPccControl", &assign_VsConverter_pPccControl); + assign_map.emplace("cim:VsConverter.qPccControl", &assign_VsConverter_qPccControl); + assign_map.emplace("cim:VsConverter.qShare", &assign_VsConverter_qShare); + assign_map.emplace("cim:VsConverter.targetQpcc", &assign_VsConverter_targetQpcc); + assign_map.emplace("cim:VsConverter.targetUpcc", &assign_VsConverter_targetUpcc); + assign_map.emplace("cim:VsConverter.uf", &assign_VsConverter_uf); } void VsConverter::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VsConverter.CapabilityCurve"), &assign_VsConverter_CapabilityCurve)); + assign_map.emplace("cim:VsConverter.CapabilityCurve", &assign_VsConverter_CapabilityCurve); } void VsConverter::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/VsConverter.hpp b/CGMES_2.4.13_18DEC2013/VsConverter.hpp index 37bf00c28..046abdfd8 100644 --- a/CGMES_2.4.13_18DEC2013/VsConverter.hpp +++ b/CGMES_2.4.13_18DEC2013/VsConverter.hpp @@ -27,9 +27,7 @@ namespace CIMPP { class VsCapabilityCurve; - /* - DC side of the voltage source converter (VSC). - */ + /** \brief DC side of the voltage source converter (VSC). */ class VsConverter : public ACDCConverter { public: @@ -37,18 +35,41 @@ namespace CIMPP VsConverter(); ~VsConverter() override; - CIMPP::VsCapabilityCurve* CapabilityCurve; /* All converters with this capability curve. Default: 0 */ - CIMPP::AngleDegrees delta; /* Angle between uf and uc. Converter state variable used in power flow. Default: nullptr */ - CIMPP::PU droop; /* Droop constant; pu value is obtained as D [kV^2 / MW] x Sb / Ubdc^2. Default: nullptr */ - CIMPP::Resistance droopCompensation; /* Compensation (resistance) constant. Used to compensate for voltage drop when controlling voltage at a distant bus. Default: nullptr */ - CIMPP::Simple_Float maxModulationIndex; /* The max quotient between the AC converter voltage (Uc) and DC voltage (Ud). A factor typically less than 1. VSC configuration data used in power flow. Default: nullptr */ - CIMPP::CurrentFlow maxValveCurrent; /* The maximum current through a valve. This current limit is the basis for calculating the capability diagram. VSC configuration data. Default: nullptr */ - CIMPP::VsPpccControlKind pPccControl; /* Kind of control of real power and/or DC voltage. Default: 0 */ - CIMPP::VsQpccControlKind qPccControl; /* Default: 0 */ - CIMPP::PerCent qShare; /* Reactive power sharing factor among parallel converters on Uac control. Default: nullptr */ - CIMPP::ReactivePower targetQpcc; /* Reactive power injection target in AC grid, at point of common coupling. Default: nullptr */ - CIMPP::Voltage targetUpcc; /* Voltage target in AC grid, at point of common coupling. Default: nullptr */ - CIMPP::Voltage uf; /* Filter bus voltage. Converter state variable, result from power flow. Default: nullptr */ + /** \brief All converters with this capability curve. Default: 0 */ + CIMPP::VsCapabilityCurve* CapabilityCurve; + + /** \brief Angle between uf and uc. Converter state variable used in power flow. Default: nullptr */ + CIMPP::AngleDegrees delta; + + /** \brief Droop constant; pu value is obtained as D [kV^2 / MW] x Sb / Ubdc^2. Default: nullptr */ + CIMPP::PU droop; + + /** \brief Compensation (resistance) constant. Used to compensate for voltage drop when controlling voltage at a distant bus. Default: nullptr */ + CIMPP::Resistance droopCompensation; + + /** \brief The max quotient between the AC converter voltage (Uc) and DC voltage (Ud). A factor typically less than 1. VSC configuration data used in power flow. Default: nullptr */ + CIMPP::Simple_Float maxModulationIndex; + + /** \brief The maximum current through a valve. This current limit is the basis for calculating the capability diagram. VSC configuration data. Default: nullptr */ + CIMPP::CurrentFlow maxValveCurrent; + + /** \brief Kind of control of real power and/or DC voltage. Default: 0 */ + CIMPP::VsPpccControlKind pPccControl; + + /** \brief Default: 0 */ + CIMPP::VsQpccControlKind qPccControl; + + /** \brief Reactive power sharing factor among parallel converters on Uac control. Default: nullptr */ + CIMPP::PerCent qShare; + + /** \brief Reactive power injection target in AC grid, at point of common coupling. Default: nullptr */ + CIMPP::ReactivePower targetQpcc; + + /** \brief Voltage target in AC grid, at point of common coupling. Default: nullptr */ + CIMPP::Voltage targetUpcc; + + /** \brief Filter bus voltage. Converter state variable, result from power flow. Default: nullptr */ + CIMPP::Voltage uf; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/VsPpccControlKind.cpp b/CGMES_2.4.13_18DEC2013/VsPpccControlKind.cpp index bc8b2d84a..9fc07a8bc 100644 --- a/CGMES_2.4.13_18DEC2013/VsPpccControlKind.cpp +++ b/CGMES_2.4.13_18DEC2013/VsPpccControlKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "VsPpccControlKind") + if (EnumSymbol.substr(0, pos) != "VsPpccControlKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,27 +50,27 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "pPcc") + if (EnumSymbol == "pPcc") { rop = VsPpccControlKind::pPcc; return lop; } - if(EnumSymbol == "udc") + if (EnumSymbol == "udc") { rop = VsPpccControlKind::udc; return lop; } - if(EnumSymbol == "pPccAndUdcDroop") + if (EnumSymbol == "pPccAndUdcDroop") { rop = VsPpccControlKind::pPccAndUdcDroop; return lop; } - if(EnumSymbol == "pPccAndUdcDroopWithCompensation") + if (EnumSymbol == "pPccAndUdcDroopWithCompensation") { rop = VsPpccControlKind::pPccAndUdcDroopWithCompensation; return lop; } - if(EnumSymbol == "pPccAndUdcDroopPilot") + if (EnumSymbol == "pPccAndUdcDroopPilot") { rop = VsPpccControlKind::pPccAndUdcDroopPilot; return lop; diff --git a/CGMES_2.4.13_18DEC2013/VsPpccControlKind.hpp b/CGMES_2.4.13_18DEC2013/VsPpccControlKind.hpp index 3aec56bb0..b7f76babe 100644 --- a/CGMES_2.4.13_18DEC2013/VsPpccControlKind.hpp +++ b/CGMES_2.4.13_18DEC2013/VsPpccControlKind.hpp @@ -9,33 +9,21 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Types applicable to the control of real power and/or DC voltage by voltage source converter. - */ + /** \brief Types applicable to the control of real power and/or DC voltage by voltage source converter. */ class VsPpccControlKind { public: enum VsPpccControlKind_ENUM { - /** - * Control variable (target) is real power at PCC bus. - */ + /** Control variable (target) is real power at PCC bus. */ pPcc, - /** - * Control variable (target) is DC voltage and real power at PCC bus is derived. - */ + /** Control variable (target) is DC voltage and real power at PCC bus is derived. */ udc, - /** - * Control variables (targets) are both active power at point of common coupling and local DC voltage, with the droop. - */ + /** Control variables (targets) are both active power at point of common coupling and local DC voltage, with the droop. */ pPccAndUdcDroop, - /** - * Control variables (targets) are both active power at point of common coupling and compensated DC voltage, with the droop; compensation factor is the resistance, as an approximation of the DC voltage of a common (real or virtual) node in the DC network. - */ + /** Control variables (targets) are both active power at point of common coupling and compensated DC voltage, with the droop; compensation factor is the resistance, as an approximation of the DC voltage of a common (real or virtual) node in the DC network. */ pPccAndUdcDroopWithCompensation, - /** - * Control variables (targets) are both active power at point of common coupling and the pilot DC voltage, with the droop. - */ + /** Control variables (targets) are both active power at point of common coupling and the pilot DC voltage, with the droop. */ pPccAndUdcDroopPilot, }; diff --git a/CGMES_2.4.13_18DEC2013/VsQpccControlKind.cpp b/CGMES_2.4.13_18DEC2013/VsQpccControlKind.cpp index 7f438e41c..34cd1e0de 100644 --- a/CGMES_2.4.13_18DEC2013/VsQpccControlKind.cpp +++ b/CGMES_2.4.13_18DEC2013/VsQpccControlKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "VsQpccControlKind") + if (EnumSymbol.substr(0, pos) != "VsQpccControlKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "reactivePcc") + if (EnumSymbol == "reactivePcc") { rop = VsQpccControlKind::reactivePcc; return lop; } - if(EnumSymbol == "voltagePcc") + if (EnumSymbol == "voltagePcc") { rop = VsQpccControlKind::voltagePcc; return lop; } - if(EnumSymbol == "powerFactorPcc") + if (EnumSymbol == "powerFactorPcc") { rop = VsQpccControlKind::powerFactorPcc; return lop; diff --git a/CGMES_2.4.13_18DEC2013/WindAeroConstIEC.cpp b/CGMES_2.4.13_18DEC2013/WindAeroConstIEC.cpp index 0b2323f45..62ae00aaa 100644 --- a/CGMES_2.4.13_18DEC2013/WindAeroConstIEC.cpp +++ b/CGMES_2.4.13_18DEC2013/WindAeroConstIEC.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindAeroConstIEC::WindAeroConstIEC() : WindGenTurbineType1IEC(nullptr) {}; -WindAeroConstIEC::~WindAeroConstIEC() {}; +WindAeroConstIEC::WindAeroConstIEC() : WindGenTurbineType1IEC(nullptr) {} +WindAeroConstIEC::~WindAeroConstIEC() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ WindAeroConstIEC::getPossibleProfilesForAttributes() const return map; } - - bool assign_WindGenTurbineType1IEC_WindAeroConstIEC(BaseClass*, BaseClass*); bool assign_WindAeroConstIEC_WindGenTurbineType1IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_WindAeroConstIEC_WindGenTurbineType1IEC(BaseClass* BaseClass_ptr1, B } - const char WindAeroConstIEC::debugName[] = "WindAeroConstIEC"; const char* WindAeroConstIEC::debugString() const { @@ -69,7 +66,7 @@ const char* WindAeroConstIEC::debugString() const void WindAeroConstIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindAeroConstIEC"), &WindAeroConstIEC_factory)); + factory_map.emplace("cim:WindAeroConstIEC", &WindAeroConstIEC_factory); } void WindAeroConstIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void WindAeroConstIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindAeroConstIEC.WindGenTurbineType1IEC"), &assign_WindAeroConstIEC_WindGenTurbineType1IEC)); + assign_map.emplace("cim:WindAeroConstIEC.WindGenTurbineType1IEC", &assign_WindAeroConstIEC_WindGenTurbineType1IEC); } void WindAeroConstIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/WindAeroConstIEC.hpp b/CGMES_2.4.13_18DEC2013/WindAeroConstIEC.hpp index a36d11654..f6ed16d26 100644 --- a/CGMES_2.4.13_18DEC2013/WindAeroConstIEC.hpp +++ b/CGMES_2.4.13_18DEC2013/WindAeroConstIEC.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class WindGenTurbineType1IEC; - /* - The constant aerodynamic torque model assumes that the aerodynamic torque is constant. Reference: IEC Standard 61400-27-1 Section 6.6.1.1. - */ + /** \brief The constant aerodynamic torque model assumes that the aerodynamic torque is constant. Reference: IEC Standard 61400-27-1 Section 6.6.1.1. */ class WindAeroConstIEC : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP WindAeroConstIEC(); ~WindAeroConstIEC() override; - CIMPP::WindGenTurbineType1IEC* WindGenTurbineType1IEC; /* Wind turbine type 1 model with which this wind aerodynamic model is associated. Default: 0 */ + /** \brief Wind turbine type 1 model with which this wind aerodynamic model is associated. Default: 0 */ + CIMPP::WindGenTurbineType1IEC* WindGenTurbineType1IEC; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/WindAeroLinearIEC.cpp b/CGMES_2.4.13_18DEC2013/WindAeroLinearIEC.cpp index bc59b364a..9301ffa49 100644 --- a/CGMES_2.4.13_18DEC2013/WindAeroLinearIEC.cpp +++ b/CGMES_2.4.13_18DEC2013/WindAeroLinearIEC.cpp @@ -9,16 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "WindGenTurbineType3IEC.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "AngleDegrees.hpp" using namespace CIMPP; -WindAeroLinearIEC::WindAeroLinearIEC() : WindGenTurbineType3IEC(nullptr) {}; -WindAeroLinearIEC::~WindAeroLinearIEC() {}; +WindAeroLinearIEC::WindAeroLinearIEC() : WindGenTurbineType3IEC(nullptr) {} +WindAeroLinearIEC::~WindAeroLinearIEC() {} static const std::list PossibleProfilesForClass = { @@ -50,93 +45,98 @@ WindAeroLinearIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindAeroLinearIEC_dpomega(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType3IEC_WindAeroLinearIEC(BaseClass*, BaseClass*); +bool assign_WindAeroLinearIEC_WindGenTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1)) + WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1); + WindGenTurbineType3IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->dpomega; - if (buffer.fail()) - return false; - else - return true; + if (element->WindGenTurbineType3IEC != element2) + { + element->WindGenTurbineType3IEC = element2; + return assign_WindGenTurbineType3IEC_WindAeroLinearIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindAeroLinearIEC_dptheta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindAeroLinearIEC_dpomega(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1)) + WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->dptheta; - if (buffer.fail()) - return false; - else + buffer >> element->dpomega; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindAeroLinearIEC_omegazero(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindAeroLinearIEC_dptheta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1)) + WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->omegazero; - if (buffer.fail()) - return false; - else + buffer >> element->dptheta; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindAeroLinearIEC_pavail(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindAeroLinearIEC_omegazero(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1)) + WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->pavail; - if (buffer.fail()) - return false; - else + buffer >> element->omegazero; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindAeroLinearIEC_thetazero(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindAeroLinearIEC_pavail(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1)) + WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->thetazero; - if (buffer.fail()) - return false; - else + buffer >> element->pavail; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindGenTurbineType3IEC_WindAeroLinearIEC(BaseClass*, BaseClass*); -bool assign_WindAeroLinearIEC_WindGenTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindAeroLinearIEC_thetazero(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1); - WindGenTurbineType3IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindGenTurbineType3IEC != element2) + buffer >> element->thetazero; + if (!buffer.fail()) { - element->WindGenTurbineType3IEC = element2; - return assign_WindGenTurbineType3IEC_WindAeroLinearIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_WindAeroLinearIEC_dpomega(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dpomega; if (!buffer.str().empty()) @@ -150,7 +150,8 @@ bool get_WindAeroLinearIEC_dpomega(const BaseClass* BaseClass_ptr1, std::strings bool get_WindAeroLinearIEC_dptheta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dptheta; if (!buffer.str().empty()) @@ -164,7 +165,8 @@ bool get_WindAeroLinearIEC_dptheta(const BaseClass* BaseClass_ptr1, std::strings bool get_WindAeroLinearIEC_omegazero(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->omegazero; if (!buffer.str().empty()) @@ -178,7 +180,8 @@ bool get_WindAeroLinearIEC_omegazero(const BaseClass* BaseClass_ptr1, std::strin bool get_WindAeroLinearIEC_pavail(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pavail; if (!buffer.str().empty()) @@ -192,7 +195,8 @@ bool get_WindAeroLinearIEC_pavail(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindAeroLinearIEC_thetazero(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thetazero; if (!buffer.str().empty()) @@ -204,8 +208,6 @@ bool get_WindAeroLinearIEC_thetazero(const BaseClass* BaseClass_ptr1, std::strin return false; } - - const char WindAeroLinearIEC::debugName[] = "WindAeroLinearIEC"; const char* WindAeroLinearIEC::debugString() const { @@ -214,21 +216,21 @@ const char* WindAeroLinearIEC::debugString() const void WindAeroLinearIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindAeroLinearIEC"), &WindAeroLinearIEC_factory)); + factory_map.emplace("cim:WindAeroLinearIEC", &WindAeroLinearIEC_factory); } void WindAeroLinearIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindAeroLinearIEC.dpomega"), &assign_WindAeroLinearIEC_dpomega)); - assign_map.insert(std::make_pair(std::string("cim:WindAeroLinearIEC.dptheta"), &assign_WindAeroLinearIEC_dptheta)); - assign_map.insert(std::make_pair(std::string("cim:WindAeroLinearIEC.omegazero"), &assign_WindAeroLinearIEC_omegazero)); - assign_map.insert(std::make_pair(std::string("cim:WindAeroLinearIEC.pavail"), &assign_WindAeroLinearIEC_pavail)); - assign_map.insert(std::make_pair(std::string("cim:WindAeroLinearIEC.thetazero"), &assign_WindAeroLinearIEC_thetazero)); + assign_map.emplace("cim:WindAeroLinearIEC.dpomega", &assign_WindAeroLinearIEC_dpomega); + assign_map.emplace("cim:WindAeroLinearIEC.dptheta", &assign_WindAeroLinearIEC_dptheta); + assign_map.emplace("cim:WindAeroLinearIEC.omegazero", &assign_WindAeroLinearIEC_omegazero); + assign_map.emplace("cim:WindAeroLinearIEC.pavail", &assign_WindAeroLinearIEC_pavail); + assign_map.emplace("cim:WindAeroLinearIEC.thetazero", &assign_WindAeroLinearIEC_thetazero); } void WindAeroLinearIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindAeroLinearIEC.WindGenTurbineType3IEC"), &assign_WindAeroLinearIEC_WindGenTurbineType3IEC)); + assign_map.emplace("cim:WindAeroLinearIEC.WindGenTurbineType3IEC", &assign_WindAeroLinearIEC_WindGenTurbineType3IEC); } void WindAeroLinearIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/WindAeroLinearIEC.hpp b/CGMES_2.4.13_18DEC2013/WindAeroLinearIEC.hpp index d7d0521b1..0e71d0eb4 100644 --- a/CGMES_2.4.13_18DEC2013/WindAeroLinearIEC.hpp +++ b/CGMES_2.4.13_18DEC2013/WindAeroLinearIEC.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class WindGenTurbineType3IEC; - /* - The linearised aerodynamic model. Reference: IEC Standard 614000-27-1 Section 6.6.1.2. - */ + /** \brief The linearised aerodynamic model. Reference: IEC Standard 614000-27-1 Section 6.6.1.2. */ class WindAeroLinearIEC : public IdentifiedObject { public: @@ -29,12 +27,23 @@ namespace CIMPP WindAeroLinearIEC(); ~WindAeroLinearIEC() override; - CIMPP::WindGenTurbineType3IEC* WindGenTurbineType3IEC; /* Wind generator type 3 model with which this wind aerodynamic model is associated. Default: 0 */ - CIMPP::PU dpomega; /* Partial derivative of aerodynamic power with respect to changes in WTR speed (). It is case dependent parameter. Default: nullptr */ - CIMPP::PU dptheta; /* Partial derivative of aerodynamic power with respect to changes in pitch angle (). It is case dependent parameter. Default: nullptr */ - CIMPP::PU omegazero; /* Rotor speed if the wind turbine is not derated (). It is case dependent parameter. Default: nullptr */ - CIMPP::PU pavail; /* Available aerodynamic power (). It is case dependent parameter. Default: nullptr */ - CIMPP::AngleDegrees thetazero; /* Pitch angle if the wind turbine is not derated (). It is case dependent parameter. Default: nullptr */ + /** \brief Wind generator type 3 model with which this wind aerodynamic model is associated. Default: 0 */ + CIMPP::WindGenTurbineType3IEC* WindGenTurbineType3IEC; + + /** \brief Partial derivative of aerodynamic power with respect to changes in WTR speed (). It is case dependent parameter. Default: nullptr */ + CIMPP::PU dpomega; + + /** \brief Partial derivative of aerodynamic power with respect to changes in pitch angle (). It is case dependent parameter. Default: nullptr */ + CIMPP::PU dptheta; + + /** \brief Rotor speed if the wind turbine is not derated (). It is case dependent parameter. Default: nullptr */ + CIMPP::PU omegazero; + + /** \brief Available aerodynamic power (). It is case dependent parameter. Default: nullptr */ + CIMPP::PU pavail; + + /** \brief Pitch angle if the wind turbine is not derated (). It is case dependent parameter. Default: nullptr */ + CIMPP::AngleDegrees thetazero; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/WindContCurrLimIEC.cpp b/CGMES_2.4.13_18DEC2013/WindContCurrLimIEC.cpp index 917cb4c05..68e2ece08 100644 --- a/CGMES_2.4.13_18DEC2013/WindContCurrLimIEC.cpp +++ b/CGMES_2.4.13_18DEC2013/WindContCurrLimIEC.cpp @@ -10,16 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindDynamicsLookupTable.hpp" #include "WindTurbineType3or4IEC.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" using namespace CIMPP; -WindContCurrLimIEC::WindContCurrLimIEC() : WindTurbineType3or4IEC(nullptr) {}; -WindContCurrLimIEC::~WindContCurrLimIEC() {}; +WindContCurrLimIEC::WindContCurrLimIEC() : WindTurbineType3or4IEC(nullptr) {} +WindContCurrLimIEC::~WindContCurrLimIEC() {} static const std::list PossibleProfilesForClass = { @@ -52,109 +47,116 @@ WindContCurrLimIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindContCurrLimIEC_imax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindDynamicsLookupTable_WindContCurrLimIEC(BaseClass*, BaseClass*); +bool assign_WindContCurrLimIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->imax; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) + { + element->WindDynamicsLookupTable.push_back(element2); + return assign_WindDynamicsLookupTable_WindContCurrLimIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindContCurrLimIEC_imaxdip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType3or4IEC_WindContCurrLimIEC(BaseClass*, BaseClass*); +bool assign_WindContCurrLimIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType3or4IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->imaxdip; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType3or4IEC != element2) + { + element->WindTurbineType3or4IEC = element2; + return assign_WindTurbineType3or4IEC_WindContCurrLimIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindContCurrLimIEC_mdfslim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContCurrLimIEC_imax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->mdfslim; - if (buffer.fail()) - return false; - else + buffer >> element->imax; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContCurrLimIEC_mqpri(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContCurrLimIEC_imaxdip(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->mqpri; - if (buffer.fail()) - return false; - else + buffer >> element->imaxdip; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContCurrLimIEC_tufilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContCurrLimIEC_mdfslim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tufilt; - if (buffer.fail()) - return false; - else + buffer >> element->mdfslim; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindDynamicsLookupTable_WindContCurrLimIEC(BaseClass*, BaseClass*); -bool assign_WindContCurrLimIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindContCurrLimIEC_mqpri(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); - WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) + buffer >> element->mqpri; + if (!buffer.fail()) { - element->WindDynamicsLookupTable.push_back(element2); - return assign_WindDynamicsLookupTable_WindContCurrLimIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_WindTurbineType3or4IEC_WindContCurrLimIEC(BaseClass*, BaseClass*); -bool assign_WindContCurrLimIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_WindContCurrLimIEC_tufilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType3or4IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType3or4IEC != element2) + buffer >> element->tufilt; + if (!buffer.fail()) { - element->WindTurbineType3or4IEC = element2; - return assign_WindTurbineType3or4IEC_WindContCurrLimIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + + bool get_WindContCurrLimIEC_imax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->imax; if (!buffer.str().empty()) @@ -168,7 +170,8 @@ bool get_WindContCurrLimIEC_imax(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindContCurrLimIEC_imaxdip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->imaxdip; if (!buffer.str().empty()) @@ -182,7 +185,8 @@ bool get_WindContCurrLimIEC_imaxdip(const BaseClass* BaseClass_ptr1, std::string bool get_WindContCurrLimIEC_mdfslim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mdfslim; if (!buffer.str().empty()) @@ -196,7 +200,8 @@ bool get_WindContCurrLimIEC_mdfslim(const BaseClass* BaseClass_ptr1, std::string bool get_WindContCurrLimIEC_mqpri(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mqpri; if (!buffer.str().empty()) @@ -210,7 +215,8 @@ bool get_WindContCurrLimIEC_mqpri(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindContCurrLimIEC_tufilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tufilt; if (!buffer.str().empty()) @@ -222,8 +228,6 @@ bool get_WindContCurrLimIEC_tufilt(const BaseClass* BaseClass_ptr1, std::strings return false; } - - const char WindContCurrLimIEC::debugName[] = "WindContCurrLimIEC"; const char* WindContCurrLimIEC::debugString() const { @@ -232,22 +236,22 @@ const char* WindContCurrLimIEC::debugString() const void WindContCurrLimIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindContCurrLimIEC"), &WindContCurrLimIEC_factory)); + factory_map.emplace("cim:WindContCurrLimIEC", &WindContCurrLimIEC_factory); } void WindContCurrLimIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContCurrLimIEC.imax"), &assign_WindContCurrLimIEC_imax)); - assign_map.insert(std::make_pair(std::string("cim:WindContCurrLimIEC.imaxdip"), &assign_WindContCurrLimIEC_imaxdip)); - assign_map.insert(std::make_pair(std::string("cim:WindContCurrLimIEC.mdfslim"), &assign_WindContCurrLimIEC_mdfslim)); - assign_map.insert(std::make_pair(std::string("cim:WindContCurrLimIEC.mqpri"), &assign_WindContCurrLimIEC_mqpri)); - assign_map.insert(std::make_pair(std::string("cim:WindContCurrLimIEC.tufilt"), &assign_WindContCurrLimIEC_tufilt)); + assign_map.emplace("cim:WindContCurrLimIEC.imax", &assign_WindContCurrLimIEC_imax); + assign_map.emplace("cim:WindContCurrLimIEC.imaxdip", &assign_WindContCurrLimIEC_imaxdip); + assign_map.emplace("cim:WindContCurrLimIEC.mdfslim", &assign_WindContCurrLimIEC_mdfslim); + assign_map.emplace("cim:WindContCurrLimIEC.mqpri", &assign_WindContCurrLimIEC_mqpri); + assign_map.emplace("cim:WindContCurrLimIEC.tufilt", &assign_WindContCurrLimIEC_tufilt); } void WindContCurrLimIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContCurrLimIEC.WindDynamicsLookupTable"), &assign_WindContCurrLimIEC_WindDynamicsLookupTable)); - assign_map.insert(std::make_pair(std::string("cim:WindContCurrLimIEC.WindTurbineType3or4IEC"), &assign_WindContCurrLimIEC_WindTurbineType3or4IEC)); + assign_map.emplace("cim:WindContCurrLimIEC.WindDynamicsLookupTable", &assign_WindContCurrLimIEC_WindDynamicsLookupTable); + assign_map.emplace("cim:WindContCurrLimIEC.WindTurbineType3or4IEC", &assign_WindContCurrLimIEC_WindTurbineType3or4IEC); } void WindContCurrLimIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/WindContCurrLimIEC.hpp b/CGMES_2.4.13_18DEC2013/WindContCurrLimIEC.hpp index 96153b35a..eee20358c 100644 --- a/CGMES_2.4.13_18DEC2013/WindContCurrLimIEC.hpp +++ b/CGMES_2.4.13_18DEC2013/WindContCurrLimIEC.hpp @@ -21,9 +21,7 @@ namespace CIMPP class WindDynamicsLookupTable; class WindTurbineType3or4IEC; - /* - Current limitation model. The current limitation model combines the physical limits. Reference: IEC Standard 61400-27-1 Section 6.6.5.7. - */ + /** \brief Current limitation model. The current limitation model combines the physical limits. Reference: IEC Standard 61400-27-1 Section 6.6.5.7. */ class WindContCurrLimIEC : public IdentifiedObject { public: @@ -31,13 +29,26 @@ namespace CIMPP WindContCurrLimIEC(); ~WindContCurrLimIEC() override; - std::list WindDynamicsLookupTable; /* The current control limitation model with which this wind dynamics lookup table is associated. Default: 0 */ - CIMPP::WindTurbineType3or4IEC* WindTurbineType3or4IEC; /* Wind turbine type 3 or 4 model with which this wind control current limitation model is associated. Default: 0 */ - CIMPP::PU imax; /* Maximum continuous current at the wind turbine terminals (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU imaxdip; /* Maximum current during voltage dip at the wind turbine terminals (). It is project dependent parameter. Default: nullptr */ - CIMPP::Boolean mdfslim; /* Limitation of type 3 stator current (): - false=0: total current limitation, - true=1: stator current limitation). It is type dependent parameter. Default: false */ - CIMPP::Boolean mqpri; /* Prioritisation of q control during LVRT (): - true = 1: reactive power priority, - false = 0: active power priority. It is project dependent parameter. Default: false */ - CIMPP::Seconds tufilt; /* Voltage measurement filter time constant (). It is type dependent parameter. Default: nullptr */ + /** \brief The current control limitation model with which this wind dynamics lookup table is associated. Default: 0 */ + std::list WindDynamicsLookupTable; + + /** \brief Wind turbine type 3 or 4 model with which this wind control current limitation model is associated. Default: 0 */ + CIMPP::WindTurbineType3or4IEC* WindTurbineType3or4IEC; + + /** \brief Maximum continuous current at the wind turbine terminals (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU imax; + + /** \brief Maximum current during voltage dip at the wind turbine terminals (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU imaxdip; + + /** \brief Limitation of type 3 stator current (): - false=0: total current limitation, - true=1: stator current limitation). It is type dependent parameter. Default: false */ + CIMPP::Boolean mdfslim; + + /** \brief Prioritisation of q control during LVRT (): - true = 1: reactive power priority, - false = 0: active power priority. It is project dependent parameter. Default: false */ + CIMPP::Boolean mqpri; + + /** \brief Voltage measurement filter time constant (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tufilt; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/WindContPType3IEC.cpp b/CGMES_2.4.13_18DEC2013/WindContPType3IEC.cpp index c34b16422..441be1a61 100644 --- a/CGMES_2.4.13_18DEC2013/WindContPType3IEC.cpp +++ b/CGMES_2.4.13_18DEC2013/WindContPType3IEC.cpp @@ -10,32 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindDynamicsLookupTable.hpp" #include "WindGenTurbineType3IEC.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -WindContPType3IEC::WindContPType3IEC() : WindGenTurbineType3IEC(nullptr) {}; -WindContPType3IEC::~WindContPType3IEC() {}; +WindContPType3IEC::WindContPType3IEC() : WindGenTurbineType3IEC(nullptr) {} +WindContPType3IEC::~WindContPType3IEC() {} static const std::list PossibleProfilesForClass = { @@ -84,317 +63,340 @@ WindContPType3IEC::getPossibleProfilesForAttributes() const return map; } +bool assign_WindDynamicsLookupTable_WindContPType3IEC(BaseClass*, BaseClass*); +bool assign_WindContPType3IEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) + { + element->WindDynamicsLookupTable.push_back(element2); + return assign_WindDynamicsLookupTable_WindContPType3IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_WindContPType3IEC_dpmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType3IEC_WindContPType3IEC(BaseClass*, BaseClass*); +bool assign_WindContPType3IEC_WindGenTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + WindGenTurbineType3IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindGenTurbineType3IEC != element2) + { + element->WindGenTurbineType3IEC = element2; + return assign_WindGenTurbineType3IEC_WindContPType3IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindContPType3IEC_dpmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dpmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_dtrisemaxlvrt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_dtrisemaxlvrt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dtrisemaxlvrt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_kdtd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_kdtd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kdtd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_kip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_kip(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kip; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_kpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_kpp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_mplvrt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_mplvrt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mplvrt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_omegaoffset(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_omegaoffset(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->omegaoffset; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_pdtdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_pdtdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pdtdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_rramp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_rramp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rramp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_tdvs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_tdvs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdvs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_temin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_temin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->temin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_tomegafilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_tomegafilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tomegafilt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_tpfilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_tpfilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpfilt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_tpord(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_tpord(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpord; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_tufilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_tufilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tufilt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_tuscale(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_tuscale(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tuscale; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_twref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_twref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->twref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_udvs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_udvs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->udvs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_updip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_updip(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->updip; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_wdtd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_wdtd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wdtd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_zeta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_zeta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->zeta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindDynamicsLookupTable_WindContPType3IEC(BaseClass*, BaseClass*); -bool assign_WindContPType3IEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) -{ - WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); - WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) - { - if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) - { - element->WindDynamicsLookupTable.push_back(element2); - return assign_WindDynamicsLookupTable_WindContPType3IEC(BaseClass_ptr2, BaseClass_ptr1); - } - return true; - } - return false; -} -bool assign_WindGenTurbineType3IEC_WindContPType3IEC(BaseClass*, BaseClass*); -bool assign_WindContPType3IEC_WindGenTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) -{ - WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); - WindGenTurbineType3IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) - { - if (element->WindGenTurbineType3IEC != element2) - { - element->WindGenTurbineType3IEC = element2; - return assign_WindGenTurbineType3IEC_WindContPType3IEC(BaseClass_ptr2, BaseClass_ptr1); - } - return true; - } - return false; -} bool get_WindContPType3IEC_dpmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dpmax; if (!buffer.str().empty()) @@ -408,7 +410,8 @@ bool get_WindContPType3IEC_dpmax(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindContPType3IEC_dtrisemaxlvrt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dtrisemaxlvrt; if (!buffer.str().empty()) @@ -422,7 +425,8 @@ bool get_WindContPType3IEC_dtrisemaxlvrt(const BaseClass* BaseClass_ptr1, std::s bool get_WindContPType3IEC_kdtd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdtd; if (!buffer.str().empty()) @@ -436,7 +440,8 @@ bool get_WindContPType3IEC_kdtd(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindContPType3IEC_kip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kip; if (!buffer.str().empty()) @@ -450,7 +455,8 @@ bool get_WindContPType3IEC_kip(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_WindContPType3IEC_kpp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpp; if (!buffer.str().empty()) @@ -464,7 +470,8 @@ bool get_WindContPType3IEC_kpp(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_WindContPType3IEC_mplvrt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mplvrt; if (!buffer.str().empty()) @@ -478,7 +485,8 @@ bool get_WindContPType3IEC_mplvrt(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindContPType3IEC_omegaoffset(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->omegaoffset; if (!buffer.str().empty()) @@ -492,7 +500,8 @@ bool get_WindContPType3IEC_omegaoffset(const BaseClass* BaseClass_ptr1, std::str bool get_WindContPType3IEC_pdtdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pdtdmax; if (!buffer.str().empty()) @@ -506,7 +515,8 @@ bool get_WindContPType3IEC_pdtdmax(const BaseClass* BaseClass_ptr1, std::strings bool get_WindContPType3IEC_rramp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rramp; if (!buffer.str().empty()) @@ -520,7 +530,8 @@ bool get_WindContPType3IEC_rramp(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindContPType3IEC_tdvs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdvs; if (!buffer.str().empty()) @@ -534,7 +545,8 @@ bool get_WindContPType3IEC_tdvs(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindContPType3IEC_temin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->temin; if (!buffer.str().empty()) @@ -548,7 +560,8 @@ bool get_WindContPType3IEC_temin(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindContPType3IEC_tomegafilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tomegafilt; if (!buffer.str().empty()) @@ -562,7 +575,8 @@ bool get_WindContPType3IEC_tomegafilt(const BaseClass* BaseClass_ptr1, std::stri bool get_WindContPType3IEC_tpfilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpfilt; if (!buffer.str().empty()) @@ -576,7 +590,8 @@ bool get_WindContPType3IEC_tpfilt(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindContPType3IEC_tpord(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpord; if (!buffer.str().empty()) @@ -590,7 +605,8 @@ bool get_WindContPType3IEC_tpord(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindContPType3IEC_tufilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tufilt; if (!buffer.str().empty()) @@ -604,7 +620,8 @@ bool get_WindContPType3IEC_tufilt(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindContPType3IEC_tuscale(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tuscale; if (!buffer.str().empty()) @@ -618,7 +635,8 @@ bool get_WindContPType3IEC_tuscale(const BaseClass* BaseClass_ptr1, std::strings bool get_WindContPType3IEC_twref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twref; if (!buffer.str().empty()) @@ -632,7 +650,8 @@ bool get_WindContPType3IEC_twref(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindContPType3IEC_udvs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->udvs; if (!buffer.str().empty()) @@ -646,7 +665,8 @@ bool get_WindContPType3IEC_udvs(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindContPType3IEC_updip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->updip; if (!buffer.str().empty()) @@ -660,7 +680,8 @@ bool get_WindContPType3IEC_updip(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindContPType3IEC_wdtd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wdtd; if (!buffer.str().empty()) @@ -674,7 +695,8 @@ bool get_WindContPType3IEC_wdtd(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindContPType3IEC_zeta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->zeta; if (!buffer.str().empty()) @@ -686,8 +708,6 @@ bool get_WindContPType3IEC_zeta(const BaseClass* BaseClass_ptr1, std::stringstre return false; } - - const char WindContPType3IEC::debugName[] = "WindContPType3IEC"; const char* WindContPType3IEC::debugString() const { @@ -696,38 +716,38 @@ const char* WindContPType3IEC::debugString() const void WindContPType3IEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindContPType3IEC"), &WindContPType3IEC_factory)); + factory_map.emplace("cim:WindContPType3IEC", &WindContPType3IEC_factory); } void WindContPType3IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.dpmax"), &assign_WindContPType3IEC_dpmax)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.dtrisemaxlvrt"), &assign_WindContPType3IEC_dtrisemaxlvrt)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.kdtd"), &assign_WindContPType3IEC_kdtd)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.kip"), &assign_WindContPType3IEC_kip)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.kpp"), &assign_WindContPType3IEC_kpp)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.mplvrt"), &assign_WindContPType3IEC_mplvrt)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.omegaoffset"), &assign_WindContPType3IEC_omegaoffset)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.pdtdmax"), &assign_WindContPType3IEC_pdtdmax)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.rramp"), &assign_WindContPType3IEC_rramp)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.tdvs"), &assign_WindContPType3IEC_tdvs)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.temin"), &assign_WindContPType3IEC_temin)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.tomegafilt"), &assign_WindContPType3IEC_tomegafilt)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.tpfilt"), &assign_WindContPType3IEC_tpfilt)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.tpord"), &assign_WindContPType3IEC_tpord)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.tufilt"), &assign_WindContPType3IEC_tufilt)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.tuscale"), &assign_WindContPType3IEC_tuscale)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.twref"), &assign_WindContPType3IEC_twref)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.udvs"), &assign_WindContPType3IEC_udvs)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.updip"), &assign_WindContPType3IEC_updip)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.wdtd"), &assign_WindContPType3IEC_wdtd)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.zeta"), &assign_WindContPType3IEC_zeta)); + assign_map.emplace("cim:WindContPType3IEC.dpmax", &assign_WindContPType3IEC_dpmax); + assign_map.emplace("cim:WindContPType3IEC.dtrisemaxlvrt", &assign_WindContPType3IEC_dtrisemaxlvrt); + assign_map.emplace("cim:WindContPType3IEC.kdtd", &assign_WindContPType3IEC_kdtd); + assign_map.emplace("cim:WindContPType3IEC.kip", &assign_WindContPType3IEC_kip); + assign_map.emplace("cim:WindContPType3IEC.kpp", &assign_WindContPType3IEC_kpp); + assign_map.emplace("cim:WindContPType3IEC.mplvrt", &assign_WindContPType3IEC_mplvrt); + assign_map.emplace("cim:WindContPType3IEC.omegaoffset", &assign_WindContPType3IEC_omegaoffset); + assign_map.emplace("cim:WindContPType3IEC.pdtdmax", &assign_WindContPType3IEC_pdtdmax); + assign_map.emplace("cim:WindContPType3IEC.rramp", &assign_WindContPType3IEC_rramp); + assign_map.emplace("cim:WindContPType3IEC.tdvs", &assign_WindContPType3IEC_tdvs); + assign_map.emplace("cim:WindContPType3IEC.temin", &assign_WindContPType3IEC_temin); + assign_map.emplace("cim:WindContPType3IEC.tomegafilt", &assign_WindContPType3IEC_tomegafilt); + assign_map.emplace("cim:WindContPType3IEC.tpfilt", &assign_WindContPType3IEC_tpfilt); + assign_map.emplace("cim:WindContPType3IEC.tpord", &assign_WindContPType3IEC_tpord); + assign_map.emplace("cim:WindContPType3IEC.tufilt", &assign_WindContPType3IEC_tufilt); + assign_map.emplace("cim:WindContPType3IEC.tuscale", &assign_WindContPType3IEC_tuscale); + assign_map.emplace("cim:WindContPType3IEC.twref", &assign_WindContPType3IEC_twref); + assign_map.emplace("cim:WindContPType3IEC.udvs", &assign_WindContPType3IEC_udvs); + assign_map.emplace("cim:WindContPType3IEC.updip", &assign_WindContPType3IEC_updip); + assign_map.emplace("cim:WindContPType3IEC.wdtd", &assign_WindContPType3IEC_wdtd); + assign_map.emplace("cim:WindContPType3IEC.zeta", &assign_WindContPType3IEC_zeta); } void WindContPType3IEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.WindDynamicsLookupTable"), &assign_WindContPType3IEC_WindDynamicsLookupTable)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.WindGenTurbineType3IEC"), &assign_WindContPType3IEC_WindGenTurbineType3IEC)); + assign_map.emplace("cim:WindContPType3IEC.WindDynamicsLookupTable", &assign_WindContPType3IEC_WindDynamicsLookupTable); + assign_map.emplace("cim:WindContPType3IEC.WindGenTurbineType3IEC", &assign_WindContPType3IEC_WindGenTurbineType3IEC); } void WindContPType3IEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/WindContPType3IEC.hpp b/CGMES_2.4.13_18DEC2013/WindContPType3IEC.hpp index 4731d4ce7..f73e04869 100644 --- a/CGMES_2.4.13_18DEC2013/WindContPType3IEC.hpp +++ b/CGMES_2.4.13_18DEC2013/WindContPType3IEC.hpp @@ -22,9 +22,7 @@ namespace CIMPP class WindDynamicsLookupTable; class WindGenTurbineType3IEC; - /* - P control model Type 3. Reference: IEC Standard 61400-27-1 Section 6.6.5.3. - */ + /** \brief P control model Type 3. Reference: IEC Standard 61400-27-1 Section 6.6.5.3. */ class WindContPType3IEC : public IdentifiedObject { public: @@ -32,29 +30,74 @@ namespace CIMPP WindContPType3IEC(); ~WindContPType3IEC() override; - std::list WindDynamicsLookupTable; /* The P control type 3 model with which this wind dynamics lookup table is associated. Default: 0 */ - CIMPP::WindGenTurbineType3IEC* WindGenTurbineType3IEC; /* Wind turbine type 3 model with which this Wind control P type 3 model is associated. Default: 0 */ - CIMPP::PU dpmax; /* Maximum wind turbine power ramp rate (). It is project dependent parameter. Default: nullptr */ - CIMPP::PU dtrisemaxlvrt; /* Limitation of torque rise rate during LVRT for S (d). It is project dependent parameter. Default: nullptr */ - CIMPP::PU kdtd; /* Gain for active drive train damping (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kip; /* PI controller integration parameter (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kpp; /* PI controller proportional gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::Boolean mplvrt; /* Enable LVRT power control mode (M true = 1: voltage control false = 0: reactive power control. It is project dependent parameter. Default: false */ - CIMPP::PU omegaoffset; /* Offset to reference value that limits controller action during rotor speed changes (omega). It is case dependent parameter. Default: nullptr */ - CIMPP::PU pdtdmax; /* Maximum active drive train damping power (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU rramp; /* Ramp limitation of torque, required in some grid codes (). It is project dependent parameter. Default: nullptr */ - CIMPP::Seconds tdvs; /* Timedelay after deep voltage sags (T). It is project dependent parameter. Default: nullptr */ - CIMPP::PU temin; /* Minimum electrical generator torque (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tomegafilt; /* Filter time constant for generator speed measurement (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tpfilt; /* Filter time constant for power measurement (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU tpord; /* Time constant in power order lag (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tufilt; /* Filter time constant for voltage measurement (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU tuscale; /* Voltage scaling factor of reset-torque (T). It is project dependent parameter. Default: nullptr */ - CIMPP::Seconds twref; /* Time constant in speed reference filter (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU udvs; /* Voltage limit for hold LVRT status after deep voltage sags (). It is project dependent parameter. Default: nullptr */ - CIMPP::PU updip; /* Voltage dip threshold for P-control (). Part of turbine control, often different (e.g 0.8) from converter thresholds. It is project dependent parameter. Default: nullptr */ - CIMPP::PU wdtd; /* Active drive train damping frequency (omega). It can be calculated from two mass model parameters. It is type dependent parameter. Default: nullptr */ - CIMPP::Simple_Float zeta; /* Coefficient for active drive train damping (zeta). It is type dependent parameter. Default: nullptr */ + /** \brief The P control type 3 model with which this wind dynamics lookup table is associated. Default: 0 */ + std::list WindDynamicsLookupTable; + + /** \brief Wind turbine type 3 model with which this Wind control P type 3 model is associated. Default: 0 */ + CIMPP::WindGenTurbineType3IEC* WindGenTurbineType3IEC; + + /** \brief Maximum wind turbine power ramp rate (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU dpmax; + + /** \brief Limitation of torque rise rate during LVRT for S (d). It is project dependent parameter. Default: nullptr */ + CIMPP::PU dtrisemaxlvrt; + + /** \brief Gain for active drive train damping (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kdtd; + + /** \brief PI controller integration parameter (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kip; + + /** \brief PI controller proportional gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kpp; + + /** \brief Enable LVRT power control mode (M true = 1: voltage control false = 0: reactive power control. It is project dependent parameter. Default: false */ + CIMPP::Boolean mplvrt; + + /** \brief Offset to reference value that limits controller action during rotor speed changes (omega). It is case dependent parameter. Default: nullptr */ + CIMPP::PU omegaoffset; + + /** \brief Maximum active drive train damping power (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU pdtdmax; + + /** \brief Ramp limitation of torque, required in some grid codes (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU rramp; + + /** \brief Timedelay after deep voltage sags (T). It is project dependent parameter. Default: nullptr */ + CIMPP::Seconds tdvs; + + /** \brief Minimum electrical generator torque (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU temin; + + /** \brief Filter time constant for generator speed measurement (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tomegafilt; + + /** \brief Filter time constant for power measurement (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tpfilt; + + /** \brief Time constant in power order lag (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU tpord; + + /** \brief Filter time constant for voltage measurement (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tufilt; + + /** \brief Voltage scaling factor of reset-torque (T). It is project dependent parameter. Default: nullptr */ + CIMPP::PU tuscale; + + /** \brief Time constant in speed reference filter (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds twref; + + /** \brief Voltage limit for hold LVRT status after deep voltage sags (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU udvs; + + /** \brief Voltage dip threshold for P-control (). Part of turbine control, often different (e.g 0.8) from converter thresholds. It is project dependent parameter. Default: nullptr */ + CIMPP::PU updip; + + /** \brief Active drive train damping frequency (omega). It can be calculated from two mass model parameters. It is type dependent parameter. Default: nullptr */ + CIMPP::PU wdtd; + + /** \brief Coefficient for active drive train damping (zeta). It is type dependent parameter. Default: nullptr */ + CIMPP::Simple_Float zeta; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/WindContPType4aIEC.cpp b/CGMES_2.4.13_18DEC2013/WindContPType4aIEC.cpp index ef175b49d..1c26a76c5 100644 --- a/CGMES_2.4.13_18DEC2013/WindContPType4aIEC.cpp +++ b/CGMES_2.4.13_18DEC2013/WindContPType4aIEC.cpp @@ -9,14 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "WindTurbineType4aIEC.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -WindContPType4aIEC::WindContPType4aIEC() : WindTurbineType4aIEC(nullptr) {}; -WindContPType4aIEC::~WindContPType4aIEC() {}; +WindContPType4aIEC::WindContPType4aIEC() : WindTurbineType4aIEC(nullptr) {} +WindContPType4aIEC::~WindContPType4aIEC() {} static const std::list PossibleProfilesForClass = { @@ -46,67 +43,70 @@ WindContPType4aIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindContPType4aIEC_dpmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType4aIEC_WindContPType4aIEC(BaseClass*, BaseClass*); +bool assign_WindContPType4aIEC_WindTurbineType4aIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType4aIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->dpmax; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType4aIEC != element2) + { + element->WindTurbineType4aIEC = element2; + return assign_WindTurbineType4aIEC_WindContPType4aIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindContPType4aIEC_tpord(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType4aIEC_dpmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tpord; - if (buffer.fail()) - return false; - else + buffer >> element->dpmax; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType4aIEC_tufilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType4aIEC_tpord(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tufilt; - if (buffer.fail()) - return false; - else + buffer >> element->tpord; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindTurbineType4aIEC_WindContPType4aIEC(BaseClass*, BaseClass*); -bool assign_WindContPType4aIEC_WindTurbineType4aIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindContPType4aIEC_tufilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType4aIEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType4aIEC != element2) + buffer >> element->tufilt; + if (!buffer.fail()) { - element->WindTurbineType4aIEC = element2; - return assign_WindTurbineType4aIEC_WindContPType4aIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_WindContPType4aIEC_dpmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dpmax; if (!buffer.str().empty()) @@ -120,7 +120,8 @@ bool get_WindContPType4aIEC_dpmax(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindContPType4aIEC_tpord(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpord; if (!buffer.str().empty()) @@ -134,7 +135,8 @@ bool get_WindContPType4aIEC_tpord(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindContPType4aIEC_tufilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tufilt; if (!buffer.str().empty()) @@ -146,8 +148,6 @@ bool get_WindContPType4aIEC_tufilt(const BaseClass* BaseClass_ptr1, std::strings return false; } - - const char WindContPType4aIEC::debugName[] = "WindContPType4aIEC"; const char* WindContPType4aIEC::debugString() const { @@ -156,19 +156,19 @@ const char* WindContPType4aIEC::debugString() const void WindContPType4aIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindContPType4aIEC"), &WindContPType4aIEC_factory)); + factory_map.emplace("cim:WindContPType4aIEC", &WindContPType4aIEC_factory); } void WindContPType4aIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContPType4aIEC.dpmax"), &assign_WindContPType4aIEC_dpmax)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType4aIEC.tpord"), &assign_WindContPType4aIEC_tpord)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType4aIEC.tufilt"), &assign_WindContPType4aIEC_tufilt)); + assign_map.emplace("cim:WindContPType4aIEC.dpmax", &assign_WindContPType4aIEC_dpmax); + assign_map.emplace("cim:WindContPType4aIEC.tpord", &assign_WindContPType4aIEC_tpord); + assign_map.emplace("cim:WindContPType4aIEC.tufilt", &assign_WindContPType4aIEC_tufilt); } void WindContPType4aIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContPType4aIEC.WindTurbineType4aIEC"), &assign_WindContPType4aIEC_WindTurbineType4aIEC)); + assign_map.emplace("cim:WindContPType4aIEC.WindTurbineType4aIEC", &assign_WindContPType4aIEC_WindTurbineType4aIEC); } void WindContPType4aIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/WindContPType4aIEC.hpp b/CGMES_2.4.13_18DEC2013/WindContPType4aIEC.hpp index 43e01221f..da1dc150e 100644 --- a/CGMES_2.4.13_18DEC2013/WindContPType4aIEC.hpp +++ b/CGMES_2.4.13_18DEC2013/WindContPType4aIEC.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class WindTurbineType4aIEC; - /* - P control model Type 4A. Reference: IEC Standard 61400-27-1 Section 6.6.5.4. - */ + /** \brief P control model Type 4A. Reference: IEC Standard 61400-27-1 Section 6.6.5.4. */ class WindContPType4aIEC : public IdentifiedObject { public: @@ -29,10 +27,17 @@ namespace CIMPP WindContPType4aIEC(); ~WindContPType4aIEC() override; - CIMPP::WindTurbineType4aIEC* WindTurbineType4aIEC; /* Wind turbine type 4A model with which this wind control P type 4A model is associated. Default: 0 */ - CIMPP::PU dpmax; /* Maximum wind turbine power ramp rate (). It is project dependent parameter. Default: nullptr */ - CIMPP::Seconds tpord; /* Time constant in power order lag (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tufilt; /* Voltage measurement filter time constant (). It is type dependent parameter. Default: nullptr */ + /** \brief Wind turbine type 4A model with which this wind control P type 4A model is associated. Default: 0 */ + CIMPP::WindTurbineType4aIEC* WindTurbineType4aIEC; + + /** \brief Maximum wind turbine power ramp rate (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU dpmax; + + /** \brief Time constant in power order lag (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tpord; + + /** \brief Voltage measurement filter time constant (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tufilt; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/WindContPType4bIEC.cpp b/CGMES_2.4.13_18DEC2013/WindContPType4bIEC.cpp index 85291e38c..63bf79cac 100644 --- a/CGMES_2.4.13_18DEC2013/WindContPType4bIEC.cpp +++ b/CGMES_2.4.13_18DEC2013/WindContPType4bIEC.cpp @@ -9,15 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "WindTurbineType4bIEC.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -WindContPType4bIEC::WindContPType4bIEC() : WindTurbineType4bIEC(nullptr) {}; -WindContPType4bIEC::~WindContPType4bIEC() {}; +WindContPType4bIEC::WindContPType4bIEC() : WindTurbineType4bIEC(nullptr) {} +WindContPType4bIEC::~WindContPType4bIEC() {} static const std::list PossibleProfilesForClass = { @@ -48,80 +44,84 @@ WindContPType4bIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindContPType4bIEC_dpmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType4bIEC_WindContPType4bIEC(BaseClass*, BaseClass*); +bool assign_WindContPType4bIEC_WindTurbineType4bIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType4bIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->dpmax; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType4bIEC != element2) + { + element->WindTurbineType4bIEC = element2; + return assign_WindTurbineType4bIEC_WindContPType4bIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindContPType4bIEC_tpaero(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType4bIEC_dpmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tpaero; - if (buffer.fail()) - return false; - else + buffer >> element->dpmax; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType4bIEC_tpord(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType4bIEC_tpaero(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tpord; - if (buffer.fail()) - return false; - else + buffer >> element->tpaero; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType4bIEC_tufilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType4bIEC_tpord(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tufilt; - if (buffer.fail()) - return false; - else + buffer >> element->tpord; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindTurbineType4bIEC_WindContPType4bIEC(BaseClass*, BaseClass*); -bool assign_WindContPType4bIEC_WindTurbineType4bIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindContPType4bIEC_tufilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType4bIEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType4bIEC != element2) + buffer >> element->tufilt; + if (!buffer.fail()) { - element->WindTurbineType4bIEC = element2; - return assign_WindTurbineType4bIEC_WindContPType4bIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_WindContPType4bIEC_dpmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dpmax; if (!buffer.str().empty()) @@ -135,7 +135,8 @@ bool get_WindContPType4bIEC_dpmax(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindContPType4bIEC_tpaero(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpaero; if (!buffer.str().empty()) @@ -149,7 +150,8 @@ bool get_WindContPType4bIEC_tpaero(const BaseClass* BaseClass_ptr1, std::strings bool get_WindContPType4bIEC_tpord(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpord; if (!buffer.str().empty()) @@ -163,7 +165,8 @@ bool get_WindContPType4bIEC_tpord(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindContPType4bIEC_tufilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tufilt; if (!buffer.str().empty()) @@ -175,8 +178,6 @@ bool get_WindContPType4bIEC_tufilt(const BaseClass* BaseClass_ptr1, std::strings return false; } - - const char WindContPType4bIEC::debugName[] = "WindContPType4bIEC"; const char* WindContPType4bIEC::debugString() const { @@ -185,20 +186,20 @@ const char* WindContPType4bIEC::debugString() const void WindContPType4bIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindContPType4bIEC"), &WindContPType4bIEC_factory)); + factory_map.emplace("cim:WindContPType4bIEC", &WindContPType4bIEC_factory); } void WindContPType4bIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContPType4bIEC.dpmax"), &assign_WindContPType4bIEC_dpmax)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType4bIEC.tpaero"), &assign_WindContPType4bIEC_tpaero)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType4bIEC.tpord"), &assign_WindContPType4bIEC_tpord)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType4bIEC.tufilt"), &assign_WindContPType4bIEC_tufilt)); + assign_map.emplace("cim:WindContPType4bIEC.dpmax", &assign_WindContPType4bIEC_dpmax); + assign_map.emplace("cim:WindContPType4bIEC.tpaero", &assign_WindContPType4bIEC_tpaero); + assign_map.emplace("cim:WindContPType4bIEC.tpord", &assign_WindContPType4bIEC_tpord); + assign_map.emplace("cim:WindContPType4bIEC.tufilt", &assign_WindContPType4bIEC_tufilt); } void WindContPType4bIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContPType4bIEC.WindTurbineType4bIEC"), &assign_WindContPType4bIEC_WindTurbineType4bIEC)); + assign_map.emplace("cim:WindContPType4bIEC.WindTurbineType4bIEC", &assign_WindContPType4bIEC_WindTurbineType4bIEC); } void WindContPType4bIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/WindContPType4bIEC.hpp b/CGMES_2.4.13_18DEC2013/WindContPType4bIEC.hpp index 3b49ddcb4..945825f0c 100644 --- a/CGMES_2.4.13_18DEC2013/WindContPType4bIEC.hpp +++ b/CGMES_2.4.13_18DEC2013/WindContPType4bIEC.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class WindTurbineType4bIEC; - /* - P control model Type 4B. Reference: IEC Standard 61400-27-1 Section 6.6.5.5. - */ + /** \brief P control model Type 4B. Reference: IEC Standard 61400-27-1 Section 6.6.5.5. */ class WindContPType4bIEC : public IdentifiedObject { public: @@ -29,11 +27,20 @@ namespace CIMPP WindContPType4bIEC(); ~WindContPType4bIEC() override; - CIMPP::WindTurbineType4bIEC* WindTurbineType4bIEC; /* Wind turbine type 4B model with which this wind control P type 4B model is associated. Default: 0 */ - CIMPP::PU dpmax; /* Maximum wind turbine power ramp rate (). It is project dependent parameter. Default: nullptr */ - CIMPP::Seconds tpaero; /* Time constant in aerodynamic power response (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tpord; /* Time constant in power order lag (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tufilt; /* Voltage measurement filter time constant (). It is type dependent parameter. Default: nullptr */ + /** \brief Wind turbine type 4B model with which this wind control P type 4B model is associated. Default: 0 */ + CIMPP::WindTurbineType4bIEC* WindTurbineType4bIEC; + + /** \brief Maximum wind turbine power ramp rate (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU dpmax; + + /** \brief Time constant in aerodynamic power response (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tpaero; + + /** \brief Time constant in power order lag (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tpord; + + /** \brief Voltage measurement filter time constant (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tufilt; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/WindContPitchAngleIEC.cpp b/CGMES_2.4.13_18DEC2013/WindContPitchAngleIEC.cpp index c7658e6fb..055ba9674 100644 --- a/CGMES_2.4.13_18DEC2013/WindContPitchAngleIEC.cpp +++ b/CGMES_2.4.13_18DEC2013/WindContPitchAngleIEC.cpp @@ -9,21 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "WindGenTurbineType3IEC.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "AngleDegrees.hpp" -#include "AngleDegrees.hpp" -#include "Seconds.hpp" using namespace CIMPP; -WindContPitchAngleIEC::WindContPitchAngleIEC() : WindGenTurbineType3IEC(nullptr) {}; -WindContPitchAngleIEC::~WindContPitchAngleIEC() {}; +WindContPitchAngleIEC::WindContPitchAngleIEC() : WindGenTurbineType3IEC(nullptr) {} +WindContPitchAngleIEC::~WindContPitchAngleIEC() {} static const std::list PossibleProfilesForClass = { @@ -60,158 +50,168 @@ WindContPitchAngleIEC::getPossibleProfilesForAttributes() const return map; } +bool assign_WindGenTurbineType3IEC_WindContPitchAngleIEC(BaseClass*, BaseClass*); +bool assign_WindContPitchAngleIEC_WindGenTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + WindGenTurbineType3IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindGenTurbineType3IEC != element2) + { + element->WindGenTurbineType3IEC = element2; + return assign_WindGenTurbineType3IEC_WindContPitchAngleIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_WindContPitchAngleIEC_dthetamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPitchAngleIEC_dthetamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dthetamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPitchAngleIEC_dthetamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPitchAngleIEC_dthetamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dthetamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPitchAngleIEC_kic(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPitchAngleIEC_kic(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kic; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPitchAngleIEC_kiomega(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPitchAngleIEC_kiomega(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kiomega; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPitchAngleIEC_kpc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPitchAngleIEC_kpc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPitchAngleIEC_kpomega(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPitchAngleIEC_kpomega(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpomega; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPitchAngleIEC_kpx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPitchAngleIEC_kpx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPitchAngleIEC_thetamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPitchAngleIEC_thetamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->thetamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPitchAngleIEC_thetamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPitchAngleIEC_thetamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->thetamin; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_WindContPitchAngleIEC_ttheta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->ttheta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindGenTurbineType3IEC_WindContPitchAngleIEC(BaseClass*, BaseClass*); -bool assign_WindContPitchAngleIEC_WindGenTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindContPitchAngleIEC_ttheta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); - WindGenTurbineType3IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindGenTurbineType3IEC != element2) + buffer >> element->ttheta; + if (!buffer.fail()) { - element->WindGenTurbineType3IEC = element2; - return assign_WindGenTurbineType3IEC_WindContPitchAngleIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_WindContPitchAngleIEC_dthetamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dthetamax; if (!buffer.str().empty()) @@ -225,7 +225,8 @@ bool get_WindContPitchAngleIEC_dthetamax(const BaseClass* BaseClass_ptr1, std::s bool get_WindContPitchAngleIEC_dthetamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dthetamin; if (!buffer.str().empty()) @@ -239,7 +240,8 @@ bool get_WindContPitchAngleIEC_dthetamin(const BaseClass* BaseClass_ptr1, std::s bool get_WindContPitchAngleIEC_kic(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kic; if (!buffer.str().empty()) @@ -253,7 +255,8 @@ bool get_WindContPitchAngleIEC_kic(const BaseClass* BaseClass_ptr1, std::strings bool get_WindContPitchAngleIEC_kiomega(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kiomega; if (!buffer.str().empty()) @@ -267,7 +270,8 @@ bool get_WindContPitchAngleIEC_kiomega(const BaseClass* BaseClass_ptr1, std::str bool get_WindContPitchAngleIEC_kpc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpc; if (!buffer.str().empty()) @@ -281,7 +285,8 @@ bool get_WindContPitchAngleIEC_kpc(const BaseClass* BaseClass_ptr1, std::strings bool get_WindContPitchAngleIEC_kpomega(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpomega; if (!buffer.str().empty()) @@ -295,7 +300,8 @@ bool get_WindContPitchAngleIEC_kpomega(const BaseClass* BaseClass_ptr1, std::str bool get_WindContPitchAngleIEC_kpx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpx; if (!buffer.str().empty()) @@ -309,7 +315,8 @@ bool get_WindContPitchAngleIEC_kpx(const BaseClass* BaseClass_ptr1, std::strings bool get_WindContPitchAngleIEC_thetamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thetamax; if (!buffer.str().empty()) @@ -323,7 +330,8 @@ bool get_WindContPitchAngleIEC_thetamax(const BaseClass* BaseClass_ptr1, std::st bool get_WindContPitchAngleIEC_thetamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thetamin; if (!buffer.str().empty()) @@ -337,7 +345,8 @@ bool get_WindContPitchAngleIEC_thetamin(const BaseClass* BaseClass_ptr1, std::st bool get_WindContPitchAngleIEC_ttheta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ttheta; if (!buffer.str().empty()) @@ -349,8 +358,6 @@ bool get_WindContPitchAngleIEC_ttheta(const BaseClass* BaseClass_ptr1, std::stri return false; } - - const char WindContPitchAngleIEC::debugName[] = "WindContPitchAngleIEC"; const char* WindContPitchAngleIEC::debugString() const { @@ -359,26 +366,26 @@ const char* WindContPitchAngleIEC::debugString() const void WindContPitchAngleIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC"), &WindContPitchAngleIEC_factory)); + factory_map.emplace("cim:WindContPitchAngleIEC", &WindContPitchAngleIEC_factory); } void WindContPitchAngleIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.dthetamax"), &assign_WindContPitchAngleIEC_dthetamax)); - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.dthetamin"), &assign_WindContPitchAngleIEC_dthetamin)); - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.kic"), &assign_WindContPitchAngleIEC_kic)); - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.kiomega"), &assign_WindContPitchAngleIEC_kiomega)); - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.kpc"), &assign_WindContPitchAngleIEC_kpc)); - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.kpomega"), &assign_WindContPitchAngleIEC_kpomega)); - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.kpx"), &assign_WindContPitchAngleIEC_kpx)); - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.thetamax"), &assign_WindContPitchAngleIEC_thetamax)); - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.thetamin"), &assign_WindContPitchAngleIEC_thetamin)); - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.ttheta"), &assign_WindContPitchAngleIEC_ttheta)); + assign_map.emplace("cim:WindContPitchAngleIEC.dthetamax", &assign_WindContPitchAngleIEC_dthetamax); + assign_map.emplace("cim:WindContPitchAngleIEC.dthetamin", &assign_WindContPitchAngleIEC_dthetamin); + assign_map.emplace("cim:WindContPitchAngleIEC.kic", &assign_WindContPitchAngleIEC_kic); + assign_map.emplace("cim:WindContPitchAngleIEC.kiomega", &assign_WindContPitchAngleIEC_kiomega); + assign_map.emplace("cim:WindContPitchAngleIEC.kpc", &assign_WindContPitchAngleIEC_kpc); + assign_map.emplace("cim:WindContPitchAngleIEC.kpomega", &assign_WindContPitchAngleIEC_kpomega); + assign_map.emplace("cim:WindContPitchAngleIEC.kpx", &assign_WindContPitchAngleIEC_kpx); + assign_map.emplace("cim:WindContPitchAngleIEC.thetamax", &assign_WindContPitchAngleIEC_thetamax); + assign_map.emplace("cim:WindContPitchAngleIEC.thetamin", &assign_WindContPitchAngleIEC_thetamin); + assign_map.emplace("cim:WindContPitchAngleIEC.ttheta", &assign_WindContPitchAngleIEC_ttheta); } void WindContPitchAngleIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.WindGenTurbineType3IEC"), &assign_WindContPitchAngleIEC_WindGenTurbineType3IEC)); + assign_map.emplace("cim:WindContPitchAngleIEC.WindGenTurbineType3IEC", &assign_WindContPitchAngleIEC_WindGenTurbineType3IEC); } void WindContPitchAngleIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/WindContPitchAngleIEC.hpp b/CGMES_2.4.13_18DEC2013/WindContPitchAngleIEC.hpp index 58a74453d..57dd765dc 100644 --- a/CGMES_2.4.13_18DEC2013/WindContPitchAngleIEC.hpp +++ b/CGMES_2.4.13_18DEC2013/WindContPitchAngleIEC.hpp @@ -21,9 +21,7 @@ namespace CIMPP { class WindGenTurbineType3IEC; - /* - Pitch angle control model. Reference: IEC Standard 61400-27-1 Section 6.6.5.8. - */ + /** \brief Pitch angle control model. Reference: IEC Standard 61400-27-1 Section 6.6.5.8. */ class WindContPitchAngleIEC : public IdentifiedObject { public: @@ -31,17 +29,38 @@ namespace CIMPP WindContPitchAngleIEC(); ~WindContPitchAngleIEC() override; - CIMPP::WindGenTurbineType3IEC* WindGenTurbineType3IEC; /* Wind turbine type 3 model with which this pitch control model is associated. Default: 0 */ - CIMPP::Simple_Float dthetamax; /* Maximum pitch positive ramp rate (d). It is type dependent parameter. Unit = degrees/sec. Default: nullptr */ - CIMPP::Simple_Float dthetamin; /* Maximum pitch negative ramp rate (d). It is type dependent parameter. Unit = degrees/sec. Default: nullptr */ - CIMPP::PU kic; /* Power PI controller integration gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kiomega; /* Speed PI controller integration gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kpc; /* Power PI controller proportional gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kpomega; /* Speed PI controller proportional gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kpx; /* Pitch cross coupling gain (K). It is type dependent parameter. Default: nullptr */ - CIMPP::AngleDegrees thetamax; /* Maximum pitch angle (). It is type dependent parameter. Default: nullptr */ - CIMPP::AngleDegrees thetamin; /* Minimum pitch angle (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds ttheta; /* Pitch time constant (t). It is type dependent parameter. Default: nullptr */ + /** \brief Wind turbine type 3 model with which this pitch control model is associated. Default: 0 */ + CIMPP::WindGenTurbineType3IEC* WindGenTurbineType3IEC; + + /** \brief Maximum pitch positive ramp rate (d). It is type dependent parameter. Unit = degrees/sec. Default: nullptr */ + CIMPP::Simple_Float dthetamax; + + /** \brief Maximum pitch negative ramp rate (d). It is type dependent parameter. Unit = degrees/sec. Default: nullptr */ + CIMPP::Simple_Float dthetamin; + + /** \brief Power PI controller integration gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kic; + + /** \brief Speed PI controller integration gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kiomega; + + /** \brief Power PI controller proportional gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kpc; + + /** \brief Speed PI controller proportional gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kpomega; + + /** \brief Pitch cross coupling gain (K). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kpx; + + /** \brief Maximum pitch angle (). It is type dependent parameter. Default: nullptr */ + CIMPP::AngleDegrees thetamax; + + /** \brief Minimum pitch angle (). It is type dependent parameter. Default: nullptr */ + CIMPP::AngleDegrees thetamin; + + /** \brief Pitch time constant (t). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds ttheta; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/WindContQIEC.cpp b/CGMES_2.4.13_18DEC2013/WindContQIEC.cpp index 12fe80123..2b20f6ee7 100644 --- a/CGMES_2.4.13_18DEC2013/WindContQIEC.cpp +++ b/CGMES_2.4.13_18DEC2013/WindContQIEC.cpp @@ -9,37 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "WindTurbineType3or4IEC.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "WindLVRTQcontrolModesKind.hpp" -#include "WindQcontrolModesKind.hpp" -#include "PU.hpp" using namespace CIMPP; -WindContQIEC::WindContQIEC() : WindTurbineType3or4IEC(nullptr) {}; -WindContQIEC::~WindContQIEC() {}; +WindContQIEC::WindContQIEC() : WindTurbineType3or4IEC(nullptr) {} +WindContQIEC::~WindContQIEC() {} static const std::list PossibleProfilesForClass = { @@ -92,366 +66,392 @@ WindContQIEC::getPossibleProfilesForAttributes() const return map; } +bool assign_WindTurbineType3or4IEC_WIndContQIEC(BaseClass*, BaseClass*); +bool assign_WindContQIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType3or4IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindTurbineType3or4IEC != element2) + { + element->WindTurbineType3or4IEC = element2; + return assign_WindTurbineType3or4IEC_WIndContQIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_WindContQIEC_iqh1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_iqh1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->iqh1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_iqmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_iqmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->iqmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_iqmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_iqmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->iqmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_iqpost(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_iqpost(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->iqpost; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_kiq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_kiq(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kiq; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_kiu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_kiu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kiu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_kpq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_kpq(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpq; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_kpu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_kpu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_kqv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_kqv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kqv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_qmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_qmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_qmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_qmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_rdroop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_rdroop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rdroop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_tiq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_tiq(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tiq; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_tpfilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_tpfilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpfilt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_tpost(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_tpost(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpost; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_tqord(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_tqord(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tqord; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_tufilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_tufilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tufilt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_udb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_udb1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->udb1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_udb2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_udb2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->udb2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_umax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_umax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->umax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_umin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_umin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->umin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_uqdip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_uqdip(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uqdip; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_uref0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_uref0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uref0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_windLVRTQcontrolModesType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_windLVRTQcontrolModesType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->windLVRTQcontrolModesType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_windQcontrolModesType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_windQcontrolModesType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->windQcontrolModesType; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_WindContQIEC_xdroop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->xdroop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindTurbineType3or4IEC_WIndContQIEC(BaseClass*, BaseClass*); -bool assign_WindContQIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindContQIEC_xdroop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindContQIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType3or4IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType3or4IEC != element2) + buffer >> element->xdroop; + if (!buffer.fail()) { - element->WindTurbineType3or4IEC = element2; - return assign_WindTurbineType3or4IEC_WIndContQIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_WindContQIEC_iqh1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->iqh1; if (!buffer.str().empty()) @@ -465,7 +465,8 @@ bool get_WindContQIEC_iqh1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_WindContQIEC_iqmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->iqmax; if (!buffer.str().empty()) @@ -479,7 +480,8 @@ bool get_WindContQIEC_iqmax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_WindContQIEC_iqmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->iqmin; if (!buffer.str().empty()) @@ -493,7 +495,8 @@ bool get_WindContQIEC_iqmin(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_WindContQIEC_iqpost(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->iqpost; if (!buffer.str().empty()) @@ -507,7 +510,8 @@ bool get_WindContQIEC_iqpost(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_WindContQIEC_kiq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kiq; if (!buffer.str().empty()) @@ -521,7 +525,8 @@ bool get_WindContQIEC_kiq(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_WindContQIEC_kiu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kiu; if (!buffer.str().empty()) @@ -535,7 +540,8 @@ bool get_WindContQIEC_kiu(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_WindContQIEC_kpq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpq; if (!buffer.str().empty()) @@ -549,7 +555,8 @@ bool get_WindContQIEC_kpq(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_WindContQIEC_kpu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpu; if (!buffer.str().empty()) @@ -563,7 +570,8 @@ bool get_WindContQIEC_kpu(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_WindContQIEC_kqv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kqv; if (!buffer.str().empty()) @@ -577,7 +585,8 @@ bool get_WindContQIEC_kqv(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_WindContQIEC_qmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qmax; if (!buffer.str().empty()) @@ -591,7 +600,8 @@ bool get_WindContQIEC_qmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_WindContQIEC_qmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qmin; if (!buffer.str().empty()) @@ -605,7 +615,8 @@ bool get_WindContQIEC_qmin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_WindContQIEC_rdroop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rdroop; if (!buffer.str().empty()) @@ -619,7 +630,8 @@ bool get_WindContQIEC_rdroop(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_WindContQIEC_tiq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tiq; if (!buffer.str().empty()) @@ -633,7 +645,8 @@ bool get_WindContQIEC_tiq(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_WindContQIEC_tpfilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpfilt; if (!buffer.str().empty()) @@ -647,7 +660,8 @@ bool get_WindContQIEC_tpfilt(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_WindContQIEC_tpost(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpost; if (!buffer.str().empty()) @@ -661,7 +675,8 @@ bool get_WindContQIEC_tpost(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_WindContQIEC_tqord(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tqord; if (!buffer.str().empty()) @@ -675,7 +690,8 @@ bool get_WindContQIEC_tqord(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_WindContQIEC_tufilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tufilt; if (!buffer.str().empty()) @@ -689,7 +705,8 @@ bool get_WindContQIEC_tufilt(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_WindContQIEC_udb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->udb1; if (!buffer.str().empty()) @@ -703,7 +720,8 @@ bool get_WindContQIEC_udb1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_WindContQIEC_udb2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->udb2; if (!buffer.str().empty()) @@ -717,7 +735,8 @@ bool get_WindContQIEC_udb2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_WindContQIEC_umax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->umax; if (!buffer.str().empty()) @@ -731,7 +750,8 @@ bool get_WindContQIEC_umax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_WindContQIEC_umin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->umin; if (!buffer.str().empty()) @@ -745,7 +765,8 @@ bool get_WindContQIEC_umin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_WindContQIEC_uqdip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uqdip; if (!buffer.str().empty()) @@ -759,7 +780,8 @@ bool get_WindContQIEC_uqdip(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_WindContQIEC_uref0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uref0; if (!buffer.str().empty()) @@ -771,11 +793,12 @@ bool get_WindContQIEC_uref0(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } -bool get_WindContQIEC_xdroop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_WindContQIEC_windLVRTQcontrolModesType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xdroop; + buffer << element->windLVRTQcontrolModesType; if (!buffer.str().empty()) { return true; @@ -785,13 +808,12 @@ bool get_WindContQIEC_xdroop(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - -bool get_WindContQIEC_windLVRTQcontrolModesType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_WindContQIEC_windQcontrolModesType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->windLVRTQcontrolModesType; + buffer << element->windQcontrolModesType; if (!buffer.str().empty()) { return true; @@ -801,11 +823,12 @@ bool get_WindContQIEC_windLVRTQcontrolModesType(const BaseClass* BaseClass_ptr1, return false; } -bool get_WindContQIEC_windQcontrolModesType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_WindContQIEC_xdroop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->windQcontrolModesType; + buffer << element->xdroop; if (!buffer.str().empty()) { return true; @@ -823,42 +846,42 @@ const char* WindContQIEC::debugString() const void WindContQIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindContQIEC"), &WindContQIEC_factory)); + factory_map.emplace("cim:WindContQIEC", &WindContQIEC_factory); } void WindContQIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.iqh1"), &assign_WindContQIEC_iqh1)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.iqmax"), &assign_WindContQIEC_iqmax)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.iqmin"), &assign_WindContQIEC_iqmin)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.iqpost"), &assign_WindContQIEC_iqpost)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.kiq"), &assign_WindContQIEC_kiq)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.kiu"), &assign_WindContQIEC_kiu)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.kpq"), &assign_WindContQIEC_kpq)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.kpu"), &assign_WindContQIEC_kpu)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.kqv"), &assign_WindContQIEC_kqv)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.qmax"), &assign_WindContQIEC_qmax)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.qmin"), &assign_WindContQIEC_qmin)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.rdroop"), &assign_WindContQIEC_rdroop)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.tiq"), &assign_WindContQIEC_tiq)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.tpfilt"), &assign_WindContQIEC_tpfilt)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.tpost"), &assign_WindContQIEC_tpost)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.tqord"), &assign_WindContQIEC_tqord)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.tufilt"), &assign_WindContQIEC_tufilt)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.udb1"), &assign_WindContQIEC_udb1)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.udb2"), &assign_WindContQIEC_udb2)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.umax"), &assign_WindContQIEC_umax)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.umin"), &assign_WindContQIEC_umin)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.uqdip"), &assign_WindContQIEC_uqdip)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.uref0"), &assign_WindContQIEC_uref0)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.windLVRTQcontrolModesType"), &assign_WindContQIEC_windLVRTQcontrolModesType)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.windQcontrolModesType"), &assign_WindContQIEC_windQcontrolModesType)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.xdroop"), &assign_WindContQIEC_xdroop)); + assign_map.emplace("cim:WindContQIEC.iqh1", &assign_WindContQIEC_iqh1); + assign_map.emplace("cim:WindContQIEC.iqmax", &assign_WindContQIEC_iqmax); + assign_map.emplace("cim:WindContQIEC.iqmin", &assign_WindContQIEC_iqmin); + assign_map.emplace("cim:WindContQIEC.iqpost", &assign_WindContQIEC_iqpost); + assign_map.emplace("cim:WindContQIEC.kiq", &assign_WindContQIEC_kiq); + assign_map.emplace("cim:WindContQIEC.kiu", &assign_WindContQIEC_kiu); + assign_map.emplace("cim:WindContQIEC.kpq", &assign_WindContQIEC_kpq); + assign_map.emplace("cim:WindContQIEC.kpu", &assign_WindContQIEC_kpu); + assign_map.emplace("cim:WindContQIEC.kqv", &assign_WindContQIEC_kqv); + assign_map.emplace("cim:WindContQIEC.qmax", &assign_WindContQIEC_qmax); + assign_map.emplace("cim:WindContQIEC.qmin", &assign_WindContQIEC_qmin); + assign_map.emplace("cim:WindContQIEC.rdroop", &assign_WindContQIEC_rdroop); + assign_map.emplace("cim:WindContQIEC.tiq", &assign_WindContQIEC_tiq); + assign_map.emplace("cim:WindContQIEC.tpfilt", &assign_WindContQIEC_tpfilt); + assign_map.emplace("cim:WindContQIEC.tpost", &assign_WindContQIEC_tpost); + assign_map.emplace("cim:WindContQIEC.tqord", &assign_WindContQIEC_tqord); + assign_map.emplace("cim:WindContQIEC.tufilt", &assign_WindContQIEC_tufilt); + assign_map.emplace("cim:WindContQIEC.udb1", &assign_WindContQIEC_udb1); + assign_map.emplace("cim:WindContQIEC.udb2", &assign_WindContQIEC_udb2); + assign_map.emplace("cim:WindContQIEC.umax", &assign_WindContQIEC_umax); + assign_map.emplace("cim:WindContQIEC.umin", &assign_WindContQIEC_umin); + assign_map.emplace("cim:WindContQIEC.uqdip", &assign_WindContQIEC_uqdip); + assign_map.emplace("cim:WindContQIEC.uref0", &assign_WindContQIEC_uref0); + assign_map.emplace("cim:WindContQIEC.windLVRTQcontrolModesType", &assign_WindContQIEC_windLVRTQcontrolModesType); + assign_map.emplace("cim:WindContQIEC.windQcontrolModesType", &assign_WindContQIEC_windQcontrolModesType); + assign_map.emplace("cim:WindContQIEC.xdroop", &assign_WindContQIEC_xdroop); } void WindContQIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.WindTurbineType3or4IEC"), &assign_WindContQIEC_WindTurbineType3or4IEC)); + assign_map.emplace("cim:WindContQIEC.WindTurbineType3or4IEC", &assign_WindContQIEC_WindTurbineType3or4IEC); } void WindContQIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/WindContQIEC.hpp b/CGMES_2.4.13_18DEC2013/WindContQIEC.hpp index 461131d55..024e73ccd 100644 --- a/CGMES_2.4.13_18DEC2013/WindContQIEC.hpp +++ b/CGMES_2.4.13_18DEC2013/WindContQIEC.hpp @@ -21,9 +21,7 @@ namespace CIMPP { class WindTurbineType3or4IEC; - /* - Q control model. Reference: IEC Standard 61400-27-1 Section 6.6.5.6. - */ + /** \brief Q control model. Reference: IEC Standard 61400-27-1 Section 6.6.5.6. */ class WindContQIEC : public IdentifiedObject { public: @@ -31,33 +29,86 @@ namespace CIMPP WindContQIEC(); ~WindContQIEC() override; - CIMPP::WindTurbineType3or4IEC* WindTurbineType3or4IEC; /* Wind turbine type 3 or 4 model with which this reactive control mode is associated. Default: 0 */ - CIMPP::PU iqh1; /* Maximum reactive current injection during dip (i). It is type dependent parameter. Default: nullptr */ - CIMPP::PU iqmax; /* Maximum reactive current injection (i). It is type dependent parameter. Default: nullptr */ - CIMPP::PU iqmin; /* Minimum reactive current injection (i). It is type dependent parameter. Default: nullptr */ - CIMPP::PU iqpost; /* Post fault reactive current injection (). It is project dependent parameter. Default: nullptr */ - CIMPP::PU kiq; /* Reactive power PI controller integration gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kiu; /* Voltage PI controller integration gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kpq; /* Reactive power PI controller proportional gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kpu; /* Voltage PI controller proportional gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kqv; /* Voltage scaling factor for LVRT current (). It is project dependent parameter. Default: nullptr */ - CIMPP::PU qmax; /* Maximum reactive power (q). It is type dependent parameter. Default: nullptr */ - CIMPP::PU qmin; /* Minimum reactive power (q). It is type dependent parameter. Default: nullptr */ - CIMPP::PU rdroop; /* Resistive component of voltage drop impedance (). It is project dependent parameter. Default: nullptr */ - CIMPP::Seconds tiq; /* Time constant in reactive current lag (T). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tpfilt; /* Power measurement filter time constant (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tpost; /* Length of time period where post fault reactive power is injected (). It is project dependent parameter. Default: nullptr */ - CIMPP::Seconds tqord; /* Time constant in reactive power order lag (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tufilt; /* Voltage measurement filter time constant (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU udb1; /* Voltage dead band lower limit (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU udb2; /* Voltage dead band upper limit (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU umax; /* Maximum voltage in voltage PI controller integral term (u). It is type dependent parameter. Default: nullptr */ - CIMPP::PU umin; /* Minimum voltage in voltage PI controller integral term (u). It is type dependent parameter. Default: nullptr */ - CIMPP::PU uqdip; /* Voltage threshold for LVRT detection in q control (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU uref0; /* User defined bias in voltage reference (), used when =. It is case dependent parameter. Default: nullptr */ - CIMPP::WindLVRTQcontrolModesKind windLVRTQcontrolModesType; /* Types of LVRT Q control modes (). It is project dependent parameter. Default: 0 */ - CIMPP::WindQcontrolModesKind windQcontrolModesType; /* Types of general wind turbine Q control modes (). It is project dependent parameter. Default: 0 */ - CIMPP::PU xdroop; /* Inductive component of voltage drop impedance (). It is project dependent parameter. Default: nullptr */ + /** \brief Wind turbine type 3 or 4 model with which this reactive control mode is associated. Default: 0 */ + CIMPP::WindTurbineType3or4IEC* WindTurbineType3or4IEC; + + /** \brief Maximum reactive current injection during dip (i). It is type dependent parameter. Default: nullptr */ + CIMPP::PU iqh1; + + /** \brief Maximum reactive current injection (i). It is type dependent parameter. Default: nullptr */ + CIMPP::PU iqmax; + + /** \brief Minimum reactive current injection (i). It is type dependent parameter. Default: nullptr */ + CIMPP::PU iqmin; + + /** \brief Post fault reactive current injection (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU iqpost; + + /** \brief Reactive power PI controller integration gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kiq; + + /** \brief Voltage PI controller integration gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kiu; + + /** \brief Reactive power PI controller proportional gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kpq; + + /** \brief Voltage PI controller proportional gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kpu; + + /** \brief Voltage scaling factor for LVRT current (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU kqv; + + /** \brief Maximum reactive power (q). It is type dependent parameter. Default: nullptr */ + CIMPP::PU qmax; + + /** \brief Minimum reactive power (q). It is type dependent parameter. Default: nullptr */ + CIMPP::PU qmin; + + /** \brief Resistive component of voltage drop impedance (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU rdroop; + + /** \brief Time constant in reactive current lag (T). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tiq; + + /** \brief Power measurement filter time constant (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tpfilt; + + /** \brief Length of time period where post fault reactive power is injected (). It is project dependent parameter. Default: nullptr */ + CIMPP::Seconds tpost; + + /** \brief Time constant in reactive power order lag (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tqord; + + /** \brief Voltage measurement filter time constant (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tufilt; + + /** \brief Voltage dead band lower limit (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU udb1; + + /** \brief Voltage dead band upper limit (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU udb2; + + /** \brief Maximum voltage in voltage PI controller integral term (u). It is type dependent parameter. Default: nullptr */ + CIMPP::PU umax; + + /** \brief Minimum voltage in voltage PI controller integral term (u). It is type dependent parameter. Default: nullptr */ + CIMPP::PU umin; + + /** \brief Voltage threshold for LVRT detection in q control (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU uqdip; + + /** \brief User defined bias in voltage reference (), used when =. It is case dependent parameter. Default: nullptr */ + CIMPP::PU uref0; + + /** \brief Types of LVRT Q control modes (). It is project dependent parameter. Default: 0 */ + CIMPP::WindLVRTQcontrolModesKind windLVRTQcontrolModesType; + + /** \brief Types of general wind turbine Q control modes (). It is project dependent parameter. Default: 0 */ + CIMPP::WindQcontrolModesKind windQcontrolModesType; + + /** \brief Inductive component of voltage drop impedance (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU xdroop; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/WindContRotorRIEC.cpp b/CGMES_2.4.13_18DEC2013/WindContRotorRIEC.cpp index 2f2775fa0..67c95d633 100644 --- a/CGMES_2.4.13_18DEC2013/WindContRotorRIEC.cpp +++ b/CGMES_2.4.13_18DEC2013/WindContRotorRIEC.cpp @@ -10,19 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindDynamicsLookupTable.hpp" #include "WindGenTurbineType2IEC.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -WindContRotorRIEC::WindContRotorRIEC() : WindGenTurbineType2IEC(nullptr) {}; -WindContRotorRIEC::~WindContRotorRIEC() {}; +WindContRotorRIEC::WindContRotorRIEC() : WindGenTurbineType2IEC(nullptr) {} +WindContRotorRIEC::~WindContRotorRIEC() {} static const std::list PossibleProfilesForClass = { @@ -58,148 +50,158 @@ WindContRotorRIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindContRotorRIEC_kirr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindDynamicsLookupTable_WindContRotorRIEC(BaseClass*, BaseClass*); +bool assign_WindContRotorRIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->kirr; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) + { + element->WindDynamicsLookupTable.push_back(element2); + return assign_WindDynamicsLookupTable_WindContRotorRIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindContRotorRIEC_komegafilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType2IEC_WindContRotorRIEC(BaseClass*, BaseClass*); +bool assign_WindContRotorRIEC_WindGenTurbineType2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + WindGenTurbineType2IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->komegafilt; - if (buffer.fail()) - return false; - else - return true; + if (element->WindGenTurbineType2IEC != element2) + { + element->WindGenTurbineType2IEC = element2; + return assign_WindGenTurbineType2IEC_WindContRotorRIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindContRotorRIEC_kpfilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContRotorRIEC_kirr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->kpfilt; - if (buffer.fail()) - return false; - else + buffer >> element->kirr; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContRotorRIEC_kprr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContRotorRIEC_komegafilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->kprr; - if (buffer.fail()) - return false; - else + buffer >> element->komegafilt; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContRotorRIEC_rmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContRotorRIEC_kpfilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->rmax; - if (buffer.fail()) - return false; - else + buffer >> element->kpfilt; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContRotorRIEC_rmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContRotorRIEC_kprr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->rmin; - if (buffer.fail()) - return false; - else + buffer >> element->kprr; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContRotorRIEC_tomegafilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContRotorRIEC_rmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tomegafilt; - if (buffer.fail()) - return false; - else + buffer >> element->rmax; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContRotorRIEC_tpfilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContRotorRIEC_rmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tpfilt; - if (buffer.fail()) - return false; - else + buffer >> element->rmin; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindDynamicsLookupTable_WindContRotorRIEC(BaseClass*, BaseClass*); -bool assign_WindContRotorRIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindContRotorRIEC_tomegafilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); - WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) + buffer >> element->tomegafilt; + if (!buffer.fail()) { - element->WindDynamicsLookupTable.push_back(element2); - return assign_WindDynamicsLookupTable_WindContRotorRIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_WindGenTurbineType2IEC_WindContRotorRIEC(BaseClass*, BaseClass*); -bool assign_WindContRotorRIEC_WindGenTurbineType2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_WindContRotorRIEC_tpfilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); - WindGenTurbineType2IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindGenTurbineType2IEC != element2) + buffer >> element->tpfilt; + if (!buffer.fail()) { - element->WindGenTurbineType2IEC = element2; - return assign_WindGenTurbineType2IEC_WindContRotorRIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + + bool get_WindContRotorRIEC_kirr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kirr; if (!buffer.str().empty()) @@ -213,7 +215,8 @@ bool get_WindContRotorRIEC_kirr(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindContRotorRIEC_komegafilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->komegafilt; if (!buffer.str().empty()) @@ -227,7 +230,8 @@ bool get_WindContRotorRIEC_komegafilt(const BaseClass* BaseClass_ptr1, std::stri bool get_WindContRotorRIEC_kpfilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpfilt; if (!buffer.str().empty()) @@ -241,7 +245,8 @@ bool get_WindContRotorRIEC_kpfilt(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindContRotorRIEC_kprr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kprr; if (!buffer.str().empty()) @@ -255,7 +260,8 @@ bool get_WindContRotorRIEC_kprr(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindContRotorRIEC_rmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rmax; if (!buffer.str().empty()) @@ -269,7 +275,8 @@ bool get_WindContRotorRIEC_rmax(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindContRotorRIEC_rmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rmin; if (!buffer.str().empty()) @@ -283,7 +290,8 @@ bool get_WindContRotorRIEC_rmin(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindContRotorRIEC_tomegafilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tomegafilt; if (!buffer.str().empty()) @@ -297,7 +305,8 @@ bool get_WindContRotorRIEC_tomegafilt(const BaseClass* BaseClass_ptr1, std::stri bool get_WindContRotorRIEC_tpfilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpfilt; if (!buffer.str().empty()) @@ -309,8 +318,6 @@ bool get_WindContRotorRIEC_tpfilt(const BaseClass* BaseClass_ptr1, std::stringst return false; } - - const char WindContRotorRIEC::debugName[] = "WindContRotorRIEC"; const char* WindContRotorRIEC::debugString() const { @@ -319,25 +326,25 @@ const char* WindContRotorRIEC::debugString() const void WindContRotorRIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC"), &WindContRotorRIEC_factory)); + factory_map.emplace("cim:WindContRotorRIEC", &WindContRotorRIEC_factory); } void WindContRotorRIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.kirr"), &assign_WindContRotorRIEC_kirr)); - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.komegafilt"), &assign_WindContRotorRIEC_komegafilt)); - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.kpfilt"), &assign_WindContRotorRIEC_kpfilt)); - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.kprr"), &assign_WindContRotorRIEC_kprr)); - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.rmax"), &assign_WindContRotorRIEC_rmax)); - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.rmin"), &assign_WindContRotorRIEC_rmin)); - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.tomegafilt"), &assign_WindContRotorRIEC_tomegafilt)); - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.tpfilt"), &assign_WindContRotorRIEC_tpfilt)); + assign_map.emplace("cim:WindContRotorRIEC.kirr", &assign_WindContRotorRIEC_kirr); + assign_map.emplace("cim:WindContRotorRIEC.komegafilt", &assign_WindContRotorRIEC_komegafilt); + assign_map.emplace("cim:WindContRotorRIEC.kpfilt", &assign_WindContRotorRIEC_kpfilt); + assign_map.emplace("cim:WindContRotorRIEC.kprr", &assign_WindContRotorRIEC_kprr); + assign_map.emplace("cim:WindContRotorRIEC.rmax", &assign_WindContRotorRIEC_rmax); + assign_map.emplace("cim:WindContRotorRIEC.rmin", &assign_WindContRotorRIEC_rmin); + assign_map.emplace("cim:WindContRotorRIEC.tomegafilt", &assign_WindContRotorRIEC_tomegafilt); + assign_map.emplace("cim:WindContRotorRIEC.tpfilt", &assign_WindContRotorRIEC_tpfilt); } void WindContRotorRIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.WindDynamicsLookupTable"), &assign_WindContRotorRIEC_WindDynamicsLookupTable)); - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.WindGenTurbineType2IEC"), &assign_WindContRotorRIEC_WindGenTurbineType2IEC)); + assign_map.emplace("cim:WindContRotorRIEC.WindDynamicsLookupTable", &assign_WindContRotorRIEC_WindDynamicsLookupTable); + assign_map.emplace("cim:WindContRotorRIEC.WindGenTurbineType2IEC", &assign_WindContRotorRIEC_WindGenTurbineType2IEC); } void WindContRotorRIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/WindContRotorRIEC.hpp b/CGMES_2.4.13_18DEC2013/WindContRotorRIEC.hpp index 52b6df6d7..50c215acb 100644 --- a/CGMES_2.4.13_18DEC2013/WindContRotorRIEC.hpp +++ b/CGMES_2.4.13_18DEC2013/WindContRotorRIEC.hpp @@ -21,9 +21,7 @@ namespace CIMPP class WindDynamicsLookupTable; class WindGenTurbineType2IEC; - /* - Rotor resistance control model. Reference: IEC Standard 61400-27-1 Section 6.6.5.2. - */ + /** \brief Rotor resistance control model. Reference: IEC Standard 61400-27-1 Section 6.6.5.2. */ class WindContRotorRIEC : public IdentifiedObject { public: @@ -31,16 +29,35 @@ namespace CIMPP WindContRotorRIEC(); ~WindContRotorRIEC() override; - std::list WindDynamicsLookupTable; /* The wind dynamics lookup table associated with this rotor resistance control model. Default: 0 */ - CIMPP::WindGenTurbineType2IEC* WindGenTurbineType2IEC; /* Wind turbine type 2 model with whitch this wind control rotor resistance model is associated. Default: 0 */ - CIMPP::PU kirr; /* Integral gain in rotor resistance PI controller (). It is type dependent parameter. Default: nullptr */ - CIMPP::Simple_Float komegafilt; /* Filter gain for generator speed measurement (K). It is type dependent parameter. Default: nullptr */ - CIMPP::Simple_Float kpfilt; /* Filter gain for power measurement (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kprr; /* Proportional gain in rotor resistance PI controller (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU rmax; /* Maximum rotor resistance (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU rmin; /* Minimum rotor resistance (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tomegafilt; /* Filter time constant for generator speed measurement (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tpfilt; /* Filter time constant for power measurement (). It is type dependent parameter. Default: nullptr */ + /** \brief The wind dynamics lookup table associated with this rotor resistance control model. Default: 0 */ + std::list WindDynamicsLookupTable; + + /** \brief Wind turbine type 2 model with whitch this wind control rotor resistance model is associated. Default: 0 */ + CIMPP::WindGenTurbineType2IEC* WindGenTurbineType2IEC; + + /** \brief Integral gain in rotor resistance PI controller (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kirr; + + /** \brief Filter gain for generator speed measurement (K). It is type dependent parameter. Default: nullptr */ + CIMPP::Simple_Float komegafilt; + + /** \brief Filter gain for power measurement (). It is type dependent parameter. Default: nullptr */ + CIMPP::Simple_Float kpfilt; + + /** \brief Proportional gain in rotor resistance PI controller (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kprr; + + /** \brief Maximum rotor resistance (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU rmax; + + /** \brief Minimum rotor resistance (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU rmin; + + /** \brief Filter time constant for generator speed measurement (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tomegafilt; + + /** \brief Filter time constant for power measurement (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tpfilt; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/WindDynamicsLookupTable.cpp b/CGMES_2.4.13_18DEC2013/WindDynamicsLookupTable.cpp index a688de86e..e88345af5 100644 --- a/CGMES_2.4.13_18DEC2013/WindDynamicsLookupTable.cpp +++ b/CGMES_2.4.13_18DEC2013/WindDynamicsLookupTable.cpp @@ -12,15 +12,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindContPType3IEC.hpp" #include "WindContRotorRIEC.hpp" #include "WindPlantFreqPcontrolIEC.hpp" -#include "Simple_Float.hpp" -#include "WindLookupTableFunctionKind.hpp" -#include "Simple_Float.hpp" -#include "Integer.hpp" using namespace CIMPP; -WindDynamicsLookupTable::WindDynamicsLookupTable() : WindContCurrLimIEC(nullptr), WindContPType3IEC(nullptr), WindContRotorRIEC(nullptr), WindPlantFreqPcontrolIEC(nullptr) {}; -WindDynamicsLookupTable::~WindDynamicsLookupTable() {}; +WindDynamicsLookupTable::WindDynamicsLookupTable() : WindContCurrLimIEC(nullptr), WindContPType3IEC(nullptr), WindContRotorRIEC(nullptr), WindPlantFreqPcontrolIEC(nullptr) {} +WindDynamicsLookupTable::~WindDynamicsLookupTable() {} static const std::list PossibleProfilesForClass = { @@ -54,60 +50,6 @@ WindDynamicsLookupTable::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindDynamicsLookupTable_input(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->input; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_WindDynamicsLookupTable_lookupTableFunctionType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->lookupTableFunctionType; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_WindDynamicsLookupTable_output(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->output; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_WindDynamicsLookupTable_sequence(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->sequence; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_WindContCurrLimIEC_WindDynamicsLookupTable(BaseClass*, BaseClass*); bool assign_WindDynamicsLookupTable_WindContCurrLimIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -124,6 +66,7 @@ bool assign_WindDynamicsLookupTable_WindContCurrLimIEC(BaseClass* BaseClass_ptr1 } return false; } + bool assign_WindContPType3IEC_WindDynamicsLookupTable(BaseClass*, BaseClass*); bool assign_WindDynamicsLookupTable_WindContPType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -140,6 +83,7 @@ bool assign_WindDynamicsLookupTable_WindContPType3IEC(BaseClass* BaseClass_ptr1, } return false; } + bool assign_WindContRotorRIEC_WindDynamicsLookupTable(BaseClass*, BaseClass*); bool assign_WindDynamicsLookupTable_WindContRotorRIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -156,6 +100,7 @@ bool assign_WindDynamicsLookupTable_WindContRotorRIEC(BaseClass* BaseClass_ptr1, } return false; } + bool assign_WindPlantFreqPcontrolIEC_WindDynamicsLookupTable(BaseClass*, BaseClass*); bool assign_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -173,52 +118,66 @@ bool assign_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC(BaseClass* BaseClas return false; } -bool get_WindDynamicsLookupTable_input(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_WindDynamicsLookupTable_input(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->input; - if (!buffer.str().empty()) + buffer >> element->input; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_WindDynamicsLookupTable_output(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_WindDynamicsLookupTable_lookupTableFunctionType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->output; - if (!buffer.str().empty()) + buffer >> element->lookupTableFunctionType; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_WindDynamicsLookupTable_sequence(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_WindDynamicsLookupTable_output(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->sequence; - if (!buffer.str().empty()) + buffer >> element->output; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } +bool assign_WindDynamicsLookupTable_sequence(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->sequence; + if (!buffer.fail()) + { + return true; + } + } + return false; +} bool get_WindDynamicsLookupTable_WindContCurrLimIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContCurrLimIEC != 0) { @@ -231,7 +190,8 @@ bool get_WindDynamicsLookupTable_WindContCurrLimIEC(const BaseClass* BaseClass_p bool get_WindDynamicsLookupTable_WindContPType3IEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContPType3IEC != 0) { @@ -244,7 +204,8 @@ bool get_WindDynamicsLookupTable_WindContPType3IEC(const BaseClass* BaseClass_pt bool get_WindDynamicsLookupTable_WindContRotorRIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContRotorRIEC != 0) { @@ -257,7 +218,8 @@ bool get_WindDynamicsLookupTable_WindContRotorRIEC(const BaseClass* BaseClass_pt bool get_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindPlantFreqPcontrolIEC != 0) { @@ -268,10 +230,25 @@ bool get_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC(const BaseClass* BaseC return false; } +bool get_WindDynamicsLookupTable_input(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->input; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} bool get_WindDynamicsLookupTable_lookupTableFunctionType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lookupTableFunctionType; if (!buffer.str().empty()) @@ -283,6 +260,36 @@ bool get_WindDynamicsLookupTable_lookupTableFunctionType(const BaseClass* BaseCl return false; } +bool get_WindDynamicsLookupTable_output(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->output; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_WindDynamicsLookupTable_sequence(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->sequence; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + const char WindDynamicsLookupTable::debugName[] = "WindDynamicsLookupTable"; const char* WindDynamicsLookupTable::debugString() const { @@ -291,23 +298,23 @@ const char* WindDynamicsLookupTable::debugString() const void WindDynamicsLookupTable::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable"), &WindDynamicsLookupTable_factory)); + factory_map.emplace("cim:WindDynamicsLookupTable", &WindDynamicsLookupTable_factory); } void WindDynamicsLookupTable::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.input"), &assign_WindDynamicsLookupTable_input)); - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.lookupTableFunctionType"), &assign_WindDynamicsLookupTable_lookupTableFunctionType)); - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.output"), &assign_WindDynamicsLookupTable_output)); - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.sequence"), &assign_WindDynamicsLookupTable_sequence)); + assign_map.emplace("cim:WindDynamicsLookupTable.input", &assign_WindDynamicsLookupTable_input); + assign_map.emplace("cim:WindDynamicsLookupTable.lookupTableFunctionType", &assign_WindDynamicsLookupTable_lookupTableFunctionType); + assign_map.emplace("cim:WindDynamicsLookupTable.output", &assign_WindDynamicsLookupTable_output); + assign_map.emplace("cim:WindDynamicsLookupTable.sequence", &assign_WindDynamicsLookupTable_sequence); } void WindDynamicsLookupTable::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.WindContCurrLimIEC"), &assign_WindDynamicsLookupTable_WindContCurrLimIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.WindContPType3IEC"), &assign_WindDynamicsLookupTable_WindContPType3IEC)); - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.WindContRotorRIEC"), &assign_WindDynamicsLookupTable_WindContRotorRIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.WindPlantFreqPcontrolIEC"), &assign_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC)); + assign_map.emplace("cim:WindDynamicsLookupTable.WindContCurrLimIEC", &assign_WindDynamicsLookupTable_WindContCurrLimIEC); + assign_map.emplace("cim:WindDynamicsLookupTable.WindContPType3IEC", &assign_WindDynamicsLookupTable_WindContPType3IEC); + assign_map.emplace("cim:WindDynamicsLookupTable.WindContRotorRIEC", &assign_WindDynamicsLookupTable_WindContRotorRIEC); + assign_map.emplace("cim:WindDynamicsLookupTable.WindPlantFreqPcontrolIEC", &assign_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC); } void WindDynamicsLookupTable::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/WindDynamicsLookupTable.hpp b/CGMES_2.4.13_18DEC2013/WindDynamicsLookupTable.hpp index 8c0e3c1cb..06d99ff11 100644 --- a/CGMES_2.4.13_18DEC2013/WindDynamicsLookupTable.hpp +++ b/CGMES_2.4.13_18DEC2013/WindDynamicsLookupTable.hpp @@ -23,9 +23,7 @@ namespace CIMPP class WindContRotorRIEC; class WindPlantFreqPcontrolIEC; - /* - The class models a look up table for the purpose of wind standard models. - */ + /** \brief The class models a look up table for the purpose of wind standard models. */ class WindDynamicsLookupTable : public IdentifiedObject { public: @@ -33,14 +31,29 @@ namespace CIMPP WindDynamicsLookupTable(); ~WindDynamicsLookupTable() override; - CIMPP::WindContCurrLimIEC* WindContCurrLimIEC; /* The wind dynamics lookup table associated with this current control limitation model. Default: 0 */ - CIMPP::WindContPType3IEC* WindContPType3IEC; /* The wind dynamics lookup table associated with this P control type 3 model. Default: 0 */ - CIMPP::WindContRotorRIEC* WindContRotorRIEC; /* The rotor resistance control model with which this wind dynamics lookup table is associated. Default: 0 */ - CIMPP::WindPlantFreqPcontrolIEC* WindPlantFreqPcontrolIEC; /* The wind dynamics lookup table associated with this frequency and active power wind plant model. Default: 0 */ - CIMPP::Simple_Float input; /* Input value (x) for the lookup table function. Default: nullptr */ - CIMPP::WindLookupTableFunctionKind lookupTableFunctionType; /* Type of the lookup table function. Default: 0 */ - CIMPP::Simple_Float output; /* Output value (y) for the lookup table function. Default: nullptr */ - CIMPP::Integer sequence; /* Sequence numbers of the pairs of the input (x) and the output (y) of the lookup table function. Default: 0 */ + /** \brief The wind dynamics lookup table associated with this current control limitation model. Default: 0 */ + CIMPP::WindContCurrLimIEC* WindContCurrLimIEC; + + /** \brief The wind dynamics lookup table associated with this P control type 3 model. Default: 0 */ + CIMPP::WindContPType3IEC* WindContPType3IEC; + + /** \brief The rotor resistance control model with which this wind dynamics lookup table is associated. Default: 0 */ + CIMPP::WindContRotorRIEC* WindContRotorRIEC; + + /** \brief The wind dynamics lookup table associated with this frequency and active power wind plant model. Default: 0 */ + CIMPP::WindPlantFreqPcontrolIEC* WindPlantFreqPcontrolIEC; + + /** \brief Input value (x) for the lookup table function. Default: nullptr */ + CIMPP::Simple_Float input; + + /** \brief Type of the lookup table function. Default: 0 */ + CIMPP::WindLookupTableFunctionKind lookupTableFunctionType; + + /** \brief Output value (y) for the lookup table function. Default: nullptr */ + CIMPP::Simple_Float output; + + /** \brief Sequence numbers of the pairs of the input (x) and the output (y) of the lookup table function. Default: 0 */ + CIMPP::Integer sequence; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/WindGenTurbineType1IEC.cpp b/CGMES_2.4.13_18DEC2013/WindGenTurbineType1IEC.cpp index 0233c9ed6..3b78fca73 100644 --- a/CGMES_2.4.13_18DEC2013/WindGenTurbineType1IEC.cpp +++ b/CGMES_2.4.13_18DEC2013/WindGenTurbineType1IEC.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindGenTurbineType1IEC::WindGenTurbineType1IEC() : WindAeroConstIEC(nullptr) {}; -WindGenTurbineType1IEC::~WindGenTurbineType1IEC() {}; +WindGenTurbineType1IEC::WindGenTurbineType1IEC() : WindAeroConstIEC(nullptr) {} +WindGenTurbineType1IEC::~WindGenTurbineType1IEC() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ WindGenTurbineType1IEC::getPossibleProfilesForAttributes() const return map; } - - bool assign_WindAeroConstIEC_WindGenTurbineType1IEC(BaseClass*, BaseClass*); bool assign_WindGenTurbineType1IEC_WindAeroConstIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_WindGenTurbineType1IEC_WindAeroConstIEC(BaseClass* BaseClass_ptr1, B return false; } - bool get_WindGenTurbineType1IEC_WindAeroConstIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindGenTurbineType1IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType1IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindAeroConstIEC != 0) { @@ -73,7 +71,6 @@ bool get_WindGenTurbineType1IEC_WindAeroConstIEC(const BaseClass* BaseClass_ptr1 return false; } - const char WindGenTurbineType1IEC::debugName[] = "WindGenTurbineType1IEC"; const char* WindGenTurbineType1IEC::debugString() const { @@ -82,7 +79,7 @@ const char* WindGenTurbineType1IEC::debugString() const void WindGenTurbineType1IEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindGenTurbineType1IEC"), &WindGenTurbineType1IEC_factory)); + factory_map.emplace("cim:WindGenTurbineType1IEC", &WindGenTurbineType1IEC_factory); } void WindGenTurbineType1IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void WindGenTurbineType1IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType1IEC.WindAeroConstIEC"), &assign_WindGenTurbineType1IEC_WindAeroConstIEC)); + assign_map.emplace("cim:WindGenTurbineType1IEC.WindAeroConstIEC", &assign_WindGenTurbineType1IEC_WindAeroConstIEC); } void WindGenTurbineType1IEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/WindGenTurbineType1IEC.hpp b/CGMES_2.4.13_18DEC2013/WindGenTurbineType1IEC.hpp index aafdadbcf..d4e30e4cc 100644 --- a/CGMES_2.4.13_18DEC2013/WindGenTurbineType1IEC.hpp +++ b/CGMES_2.4.13_18DEC2013/WindGenTurbineType1IEC.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class WindAeroConstIEC; - /* - Wind turbine IEC Type 1. Reference: IEC Standard 61400-27-1, section 6.5.2. - */ + /** \brief Wind turbine IEC Type 1. Reference: IEC Standard 61400-27-1, section 6.5.2. */ class WindGenTurbineType1IEC : public WindTurbineType1or2IEC { public: @@ -27,7 +25,8 @@ namespace CIMPP WindGenTurbineType1IEC(); ~WindGenTurbineType1IEC() override; - CIMPP::WindAeroConstIEC* WindAeroConstIEC; /* Wind aerodynamic model associated with this wind turbine type 1 model. Default: 0 */ + /** \brief Wind aerodynamic model associated with this wind turbine type 1 model. Default: 0 */ + CIMPP::WindAeroConstIEC* WindAeroConstIEC; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/WindGenTurbineType2IEC.cpp b/CGMES_2.4.13_18DEC2013/WindGenTurbineType2IEC.cpp index a637739a7..145486473 100644 --- a/CGMES_2.4.13_18DEC2013/WindGenTurbineType2IEC.cpp +++ b/CGMES_2.4.13_18DEC2013/WindGenTurbineType2IEC.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindGenTurbineType2IEC::WindGenTurbineType2IEC() : WindContRotorRIEC(nullptr), WindPitchContEmulIEC(nullptr) {}; -WindGenTurbineType2IEC::~WindGenTurbineType2IEC() {}; +WindGenTurbineType2IEC::WindGenTurbineType2IEC() : WindContRotorRIEC(nullptr), WindPitchContEmulIEC(nullptr) {} +WindGenTurbineType2IEC::~WindGenTurbineType2IEC() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ WindGenTurbineType2IEC::getPossibleProfilesForAttributes() const return map; } - - bool assign_WindContRotorRIEC_WindGenTurbineType2IEC(BaseClass*, BaseClass*); bool assign_WindGenTurbineType2IEC_WindContRotorRIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_WindGenTurbineType2IEC_WindContRotorRIEC(BaseClass* BaseClass_ptr1, } return false; } + bool assign_WindPitchContEmulIEC_WindGenTurbineType2IEC(BaseClass*, BaseClass*); bool assign_WindGenTurbineType2IEC_WindPitchContEmulIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_WindGenTurbineType2IEC_WindPitchContEmulIEC(BaseClass* BaseClass_ptr return false; } - bool get_WindGenTurbineType2IEC_WindContRotorRIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindGenTurbineType2IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType2IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContRotorRIEC != 0) { @@ -93,7 +92,8 @@ bool get_WindGenTurbineType2IEC_WindContRotorRIEC(const BaseClass* BaseClass_ptr bool get_WindGenTurbineType2IEC_WindPitchContEmulIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindGenTurbineType2IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType2IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindPitchContEmulIEC != 0) { @@ -104,7 +104,6 @@ bool get_WindGenTurbineType2IEC_WindPitchContEmulIEC(const BaseClass* BaseClass_ return false; } - const char WindGenTurbineType2IEC::debugName[] = "WindGenTurbineType2IEC"; const char* WindGenTurbineType2IEC::debugString() const { @@ -113,7 +112,7 @@ const char* WindGenTurbineType2IEC::debugString() const void WindGenTurbineType2IEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindGenTurbineType2IEC"), &WindGenTurbineType2IEC_factory)); + factory_map.emplace("cim:WindGenTurbineType2IEC", &WindGenTurbineType2IEC_factory); } void WindGenTurbineType2IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void WindGenTurbineType2IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType2IEC.WindContRotorRIEC"), &assign_WindGenTurbineType2IEC_WindContRotorRIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType2IEC.WindPitchContEmulIEC"), &assign_WindGenTurbineType2IEC_WindPitchContEmulIEC)); + assign_map.emplace("cim:WindGenTurbineType2IEC.WindContRotorRIEC", &assign_WindGenTurbineType2IEC_WindContRotorRIEC); + assign_map.emplace("cim:WindGenTurbineType2IEC.WindPitchContEmulIEC", &assign_WindGenTurbineType2IEC_WindPitchContEmulIEC); } void WindGenTurbineType2IEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/WindGenTurbineType2IEC.hpp b/CGMES_2.4.13_18DEC2013/WindGenTurbineType2IEC.hpp index f323b7d53..435504800 100644 --- a/CGMES_2.4.13_18DEC2013/WindGenTurbineType2IEC.hpp +++ b/CGMES_2.4.13_18DEC2013/WindGenTurbineType2IEC.hpp @@ -18,9 +18,7 @@ namespace CIMPP class WindContRotorRIEC; class WindPitchContEmulIEC; - /* - Wind turbine IEC Type 2. Reference: IEC Standard 61400-27-1, section 6.5.3. - */ + /** \brief Wind turbine IEC Type 2. Reference: IEC Standard 61400-27-1, section 6.5.3. */ class WindGenTurbineType2IEC : public WindTurbineType1or2IEC { public: @@ -28,8 +26,11 @@ namespace CIMPP WindGenTurbineType2IEC(); ~WindGenTurbineType2IEC() override; - CIMPP::WindContRotorRIEC* WindContRotorRIEC; /* Wind control rotor resistance model associated with wind turbine type 2 model. Default: 0 */ - CIMPP::WindPitchContEmulIEC* WindPitchContEmulIEC; /* Pitch control emulator model associated with this wind turbine type 2 model. Default: 0 */ + /** \brief Wind control rotor resistance model associated with wind turbine type 2 model. Default: 0 */ + CIMPP::WindContRotorRIEC* WindContRotorRIEC; + + /** \brief Pitch control emulator model associated with this wind turbine type 2 model. Default: 0 */ + CIMPP::WindPitchContEmulIEC* WindPitchContEmulIEC; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/WindGenTurbineType3IEC.cpp b/CGMES_2.4.13_18DEC2013/WindGenTurbineType3IEC.cpp index a3dc45672..06d7e4bf4 100644 --- a/CGMES_2.4.13_18DEC2013/WindGenTurbineType3IEC.cpp +++ b/CGMES_2.4.13_18DEC2013/WindGenTurbineType3IEC.cpp @@ -12,13 +12,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindContPType3IEC.hpp" #include "WindContPitchAngleIEC.hpp" #include "WindMechIEC.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -WindGenTurbineType3IEC::WindGenTurbineType3IEC() : WindAeroLinearIEC(nullptr), WindContPType3IEC(nullptr), WindContPitchAngleIEC(nullptr), WindMechIEC(nullptr) {}; -WindGenTurbineType3IEC::~WindGenTurbineType3IEC() {}; +WindGenTurbineType3IEC::WindGenTurbineType3IEC() : WindAeroLinearIEC(nullptr), WindContPType3IEC(nullptr), WindContPitchAngleIEC(nullptr), WindMechIEC(nullptr) {} +WindGenTurbineType3IEC::~WindGenTurbineType3IEC() {} static const std::list PossibleProfilesForClass = { @@ -50,34 +48,6 @@ WindGenTurbineType3IEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindGenTurbineType3IEC_dipmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->dipmax; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_WindGenTurbineType3IEC_diqmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->diqmax; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_WindAeroLinearIEC_WindGenTurbineType3IEC(BaseClass*, BaseClass*); bool assign_WindGenTurbineType3IEC_WindAeroLinearIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -94,6 +64,7 @@ bool assign_WindGenTurbineType3IEC_WindAeroLinearIEC(BaseClass* BaseClass_ptr1, } return false; } + bool assign_WindContPType3IEC_WindGenTurbineType3IEC(BaseClass*, BaseClass*); bool assign_WindGenTurbineType3IEC_WindContPType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -110,6 +81,7 @@ bool assign_WindGenTurbineType3IEC_WindContPType3IEC(BaseClass* BaseClass_ptr1, } return false; } + bool assign_WindContPitchAngleIEC_WindGenTurbineType3IEC(BaseClass*, BaseClass*); bool assign_WindGenTurbineType3IEC_WindContPitchAngleIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -126,6 +98,7 @@ bool assign_WindGenTurbineType3IEC_WindContPitchAngleIEC(BaseClass* BaseClass_pt } return false; } + bool assign_WindMechIEC_WindGenTurbineType3IEC(BaseClass*, BaseClass*); bool assign_WindGenTurbineType3IEC_WindMechIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -143,38 +116,38 @@ bool assign_WindGenTurbineType3IEC_WindMechIEC(BaseClass* BaseClass_ptr1, BaseCl return false; } -bool get_WindGenTurbineType3IEC_dipmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_WindGenTurbineType3IEC_dipmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->dipmax; - if (!buffer.str().empty()) + buffer >> element->dipmax; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_WindGenTurbineType3IEC_diqmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_WindGenTurbineType3IEC_diqmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->diqmax; - if (!buffer.str().empty()) + buffer >> element->diqmax; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_WindGenTurbineType3IEC_WindAeroLinearIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindAeroLinearIEC != 0) { @@ -187,7 +160,8 @@ bool get_WindGenTurbineType3IEC_WindAeroLinearIEC(const BaseClass* BaseClass_ptr bool get_WindGenTurbineType3IEC_WindContPType3IEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContPType3IEC != 0) { @@ -200,7 +174,8 @@ bool get_WindGenTurbineType3IEC_WindContPType3IEC(const BaseClass* BaseClass_ptr bool get_WindGenTurbineType3IEC_WindContPitchAngleIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContPitchAngleIEC != 0) { @@ -213,7 +188,8 @@ bool get_WindGenTurbineType3IEC_WindContPitchAngleIEC(const BaseClass* BaseClass bool get_WindGenTurbineType3IEC_WindMechIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindMechIEC != 0) { @@ -224,6 +200,35 @@ bool get_WindGenTurbineType3IEC_WindMechIEC(const BaseClass* BaseClass_ptr1, std return false; } +bool get_WindGenTurbineType3IEC_dipmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->dipmax; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_WindGenTurbineType3IEC_diqmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->diqmax; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char WindGenTurbineType3IEC::debugName[] = "WindGenTurbineType3IEC"; const char* WindGenTurbineType3IEC::debugString() const @@ -233,21 +238,21 @@ const char* WindGenTurbineType3IEC::debugString() const void WindGenTurbineType3IEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3IEC"), &WindGenTurbineType3IEC_factory)); + factory_map.emplace("cim:WindGenTurbineType3IEC", &WindGenTurbineType3IEC_factory); } void WindGenTurbineType3IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3IEC.dipmax"), &assign_WindGenTurbineType3IEC_dipmax)); - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3IEC.diqmax"), &assign_WindGenTurbineType3IEC_diqmax)); + assign_map.emplace("cim:WindGenTurbineType3IEC.dipmax", &assign_WindGenTurbineType3IEC_dipmax); + assign_map.emplace("cim:WindGenTurbineType3IEC.diqmax", &assign_WindGenTurbineType3IEC_diqmax); } void WindGenTurbineType3IEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3IEC.WindAeroLinearIEC"), &assign_WindGenTurbineType3IEC_WindAeroLinearIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3IEC.WindContPType3IEC"), &assign_WindGenTurbineType3IEC_WindContPType3IEC)); - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3IEC.WindContPitchAngleIEC"), &assign_WindGenTurbineType3IEC_WindContPitchAngleIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3IEC.WindMechIEC"), &assign_WindGenTurbineType3IEC_WindMechIEC)); + assign_map.emplace("cim:WindGenTurbineType3IEC.WindAeroLinearIEC", &assign_WindGenTurbineType3IEC_WindAeroLinearIEC); + assign_map.emplace("cim:WindGenTurbineType3IEC.WindContPType3IEC", &assign_WindGenTurbineType3IEC_WindContPType3IEC); + assign_map.emplace("cim:WindGenTurbineType3IEC.WindContPitchAngleIEC", &assign_WindGenTurbineType3IEC_WindContPitchAngleIEC); + assign_map.emplace("cim:WindGenTurbineType3IEC.WindMechIEC", &assign_WindGenTurbineType3IEC_WindMechIEC); } void WindGenTurbineType3IEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/WindGenTurbineType3IEC.hpp b/CGMES_2.4.13_18DEC2013/WindGenTurbineType3IEC.hpp index b968e187a..f51005682 100644 --- a/CGMES_2.4.13_18DEC2013/WindGenTurbineType3IEC.hpp +++ b/CGMES_2.4.13_18DEC2013/WindGenTurbineType3IEC.hpp @@ -21,9 +21,7 @@ namespace CIMPP class WindContPitchAngleIEC; class WindMechIEC; - /* - Generator model for wind turbines of IEC type 3A and 3B. - */ + /** \brief Generator model for wind turbines of IEC type 3A and 3B. */ class WindGenTurbineType3IEC : public WindTurbineType3or4IEC { public: @@ -31,12 +29,23 @@ namespace CIMPP WindGenTurbineType3IEC(); ~WindGenTurbineType3IEC() override; - CIMPP::WindAeroLinearIEC* WindAeroLinearIEC; /* Wind aerodynamic model associated with this wind generator type 3 model. Default: 0 */ - CIMPP::WindContPType3IEC* WindContPType3IEC; /* Wind control P type 3 model associated with this wind turbine type 3 model. Default: 0 */ - CIMPP::WindContPitchAngleIEC* WindContPitchAngleIEC; /* Wind control pitch angle model associated with this wind turbine type 3. Default: 0 */ - CIMPP::WindMechIEC* WindMechIEC; /* Wind mechanical model associated with this wind turbine Type 3 model. Default: 0 */ - CIMPP::PU dipmax; /* Maximum active current ramp rate (di). It is project dependent parameter. Default: nullptr */ - CIMPP::PU diqmax; /* Maximum reactive current ramp rate (di). It is project dependent parameter. Default: nullptr */ + /** \brief Wind aerodynamic model associated with this wind generator type 3 model. Default: 0 */ + CIMPP::WindAeroLinearIEC* WindAeroLinearIEC; + + /** \brief Wind control P type 3 model associated with this wind turbine type 3 model. Default: 0 */ + CIMPP::WindContPType3IEC* WindContPType3IEC; + + /** \brief Wind control pitch angle model associated with this wind turbine type 3. Default: 0 */ + CIMPP::WindContPitchAngleIEC* WindContPitchAngleIEC; + + /** \brief Wind mechanical model associated with this wind turbine Type 3 model. Default: 0 */ + CIMPP::WindMechIEC* WindMechIEC; + + /** \brief Maximum active current ramp rate (di). It is project dependent parameter. Default: nullptr */ + CIMPP::PU dipmax; + + /** \brief Maximum reactive current ramp rate (di). It is project dependent parameter. Default: nullptr */ + CIMPP::PU diqmax; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/WindGenTurbineType3aIEC.cpp b/CGMES_2.4.13_18DEC2013/WindGenTurbineType3aIEC.cpp index 4488af1f2..e72c76ed4 100644 --- a/CGMES_2.4.13_18DEC2013/WindGenTurbineType3aIEC.cpp +++ b/CGMES_2.4.13_18DEC2013/WindGenTurbineType3aIEC.cpp @@ -8,14 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "PU.hpp" using namespace CIMPP; -WindGenTurbineType3aIEC::WindGenTurbineType3aIEC() {}; -WindGenTurbineType3aIEC::~WindGenTurbineType3aIEC() {}; +WindGenTurbineType3aIEC::WindGenTurbineType3aIEC() {} +WindGenTurbineType3aIEC::~WindGenTurbineType3aIEC() {} static const std::list PossibleProfilesForClass = { @@ -44,51 +41,52 @@ WindGenTurbineType3aIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindGenTurbineType3aIEC_kpc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType3aIEC_kpc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindGenTurbineType3aIEC_tic(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType3aIEC_tic(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tic; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindGenTurbineType3aIEC_xs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType3aIEC_xs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_WindGenTurbineType3aIEC_kpc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpc; if (!buffer.str().empty()) @@ -102,7 +100,8 @@ bool get_WindGenTurbineType3aIEC_kpc(const BaseClass* BaseClass_ptr1, std::strin bool get_WindGenTurbineType3aIEC_tic(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tic; if (!buffer.str().empty()) @@ -116,7 +115,8 @@ bool get_WindGenTurbineType3aIEC_tic(const BaseClass* BaseClass_ptr1, std::strin bool get_WindGenTurbineType3aIEC_xs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xs; if (!buffer.str().empty()) @@ -128,8 +128,6 @@ bool get_WindGenTurbineType3aIEC_xs(const BaseClass* BaseClass_ptr1, std::string return false; } - - const char WindGenTurbineType3aIEC::debugName[] = "WindGenTurbineType3aIEC"; const char* WindGenTurbineType3aIEC::debugString() const { @@ -138,14 +136,14 @@ const char* WindGenTurbineType3aIEC::debugString() const void WindGenTurbineType3aIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3aIEC"), &WindGenTurbineType3aIEC_factory)); + factory_map.emplace("cim:WindGenTurbineType3aIEC", &WindGenTurbineType3aIEC_factory); } void WindGenTurbineType3aIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3aIEC.kpc"), &assign_WindGenTurbineType3aIEC_kpc)); - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3aIEC.tic"), &assign_WindGenTurbineType3aIEC_tic)); - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3aIEC.xs"), &assign_WindGenTurbineType3aIEC_xs)); + assign_map.emplace("cim:WindGenTurbineType3aIEC.kpc", &assign_WindGenTurbineType3aIEC_kpc); + assign_map.emplace("cim:WindGenTurbineType3aIEC.tic", &assign_WindGenTurbineType3aIEC_tic); + assign_map.emplace("cim:WindGenTurbineType3aIEC.xs", &assign_WindGenTurbineType3aIEC_xs); } void WindGenTurbineType3aIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/WindGenTurbineType3aIEC.hpp b/CGMES_2.4.13_18DEC2013/WindGenTurbineType3aIEC.hpp index 09582f1b1..027ac9e1b 100644 --- a/CGMES_2.4.13_18DEC2013/WindGenTurbineType3aIEC.hpp +++ b/CGMES_2.4.13_18DEC2013/WindGenTurbineType3aIEC.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEC Type 3A generator set model. Reference: IEC Standard 61400-27-1 Section 6.6.3.2. - */ + /** \brief IEC Type 3A generator set model. Reference: IEC Standard 61400-27-1 Section 6.6.3.2. */ class WindGenTurbineType3aIEC : public WindGenTurbineType3IEC { public: @@ -29,9 +27,14 @@ namespace CIMPP WindGenTurbineType3aIEC(); ~WindGenTurbineType3aIEC() override; - CIMPP::Simple_Float kpc; /* Current PI controller proportional gain (K). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tic; /* Current PI controller integration time constant (T). It is type dependent parameter. Default: nullptr */ - CIMPP::PU xs; /* Electromagnetic transient reactance (x). It is type dependent parameter. Default: nullptr */ + /** \brief Current PI controller proportional gain (K). It is type dependent parameter. Default: nullptr */ + CIMPP::Simple_Float kpc; + + /** \brief Current PI controller integration time constant (T). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tic; + + /** \brief Electromagnetic transient reactance (x). It is type dependent parameter. Default: nullptr */ + CIMPP::PU xs; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/WindGenTurbineType3bIEC.cpp b/CGMES_2.4.13_18DEC2013/WindGenTurbineType3bIEC.cpp index 01d8c1ec4..bd7b7fba3 100644 --- a/CGMES_2.4.13_18DEC2013/WindGenTurbineType3bIEC.cpp +++ b/CGMES_2.4.13_18DEC2013/WindGenTurbineType3bIEC.cpp @@ -8,16 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" using namespace CIMPP; -WindGenTurbineType3bIEC::WindGenTurbineType3bIEC() {}; -WindGenTurbineType3bIEC::~WindGenTurbineType3bIEC() {}; +WindGenTurbineType3bIEC::WindGenTurbineType3bIEC() {} +WindGenTurbineType3bIEC::~WindGenTurbineType3bIEC() {} static const std::list PossibleProfilesForClass = { @@ -48,77 +43,80 @@ WindGenTurbineType3bIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindGenTurbineType3bIEC_fducw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType3bIEC_fducw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fducw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindGenTurbineType3bIEC_mwtcwp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType3bIEC_mwtcwp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwtcwp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindGenTurbineType3bIEC_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType3bIEC_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindGenTurbineType3bIEC_two(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType3bIEC_two(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->two; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindGenTurbineType3bIEC_xs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType3bIEC_xs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_WindGenTurbineType3bIEC_fducw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fducw; if (!buffer.str().empty()) @@ -132,7 +130,8 @@ bool get_WindGenTurbineType3bIEC_fducw(const BaseClass* BaseClass_ptr1, std::str bool get_WindGenTurbineType3bIEC_mwtcwp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwtcwp; if (!buffer.str().empty()) @@ -146,7 +145,8 @@ bool get_WindGenTurbineType3bIEC_mwtcwp(const BaseClass* BaseClass_ptr1, std::st bool get_WindGenTurbineType3bIEC_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -160,7 +160,8 @@ bool get_WindGenTurbineType3bIEC_tg(const BaseClass* BaseClass_ptr1, std::string bool get_WindGenTurbineType3bIEC_two(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->two; if (!buffer.str().empty()) @@ -174,7 +175,8 @@ bool get_WindGenTurbineType3bIEC_two(const BaseClass* BaseClass_ptr1, std::strin bool get_WindGenTurbineType3bIEC_xs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xs; if (!buffer.str().empty()) @@ -186,8 +188,6 @@ bool get_WindGenTurbineType3bIEC_xs(const BaseClass* BaseClass_ptr1, std::string return false; } - - const char WindGenTurbineType3bIEC::debugName[] = "WindGenTurbineType3bIEC"; const char* WindGenTurbineType3bIEC::debugString() const { @@ -196,16 +196,16 @@ const char* WindGenTurbineType3bIEC::debugString() const void WindGenTurbineType3bIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3bIEC"), &WindGenTurbineType3bIEC_factory)); + factory_map.emplace("cim:WindGenTurbineType3bIEC", &WindGenTurbineType3bIEC_factory); } void WindGenTurbineType3bIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3bIEC.fducw"), &assign_WindGenTurbineType3bIEC_fducw)); - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3bIEC.mwtcwp"), &assign_WindGenTurbineType3bIEC_mwtcwp)); - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3bIEC.tg"), &assign_WindGenTurbineType3bIEC_tg)); - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3bIEC.two"), &assign_WindGenTurbineType3bIEC_two)); - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3bIEC.xs"), &assign_WindGenTurbineType3bIEC_xs)); + assign_map.emplace("cim:WindGenTurbineType3bIEC.fducw", &assign_WindGenTurbineType3bIEC_fducw); + assign_map.emplace("cim:WindGenTurbineType3bIEC.mwtcwp", &assign_WindGenTurbineType3bIEC_mwtcwp); + assign_map.emplace("cim:WindGenTurbineType3bIEC.tg", &assign_WindGenTurbineType3bIEC_tg); + assign_map.emplace("cim:WindGenTurbineType3bIEC.two", &assign_WindGenTurbineType3bIEC_two); + assign_map.emplace("cim:WindGenTurbineType3bIEC.xs", &assign_WindGenTurbineType3bIEC_xs); } void WindGenTurbineType3bIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/WindGenTurbineType3bIEC.hpp b/CGMES_2.4.13_18DEC2013/WindGenTurbineType3bIEC.hpp index d97a6b792..37a684772 100644 --- a/CGMES_2.4.13_18DEC2013/WindGenTurbineType3bIEC.hpp +++ b/CGMES_2.4.13_18DEC2013/WindGenTurbineType3bIEC.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEC Type 3B generator set model. Reference: IEC Standard 61400-27-1 Section 6.6.3.3. - */ + /** \brief IEC Type 3B generator set model. Reference: IEC Standard 61400-27-1 Section 6.6.3.3. */ class WindGenTurbineType3bIEC : public WindGenTurbineType3IEC { public: @@ -30,11 +28,20 @@ namespace CIMPP WindGenTurbineType3bIEC(); ~WindGenTurbineType3bIEC() override; - CIMPP::Simple_Float fducw; /* Crowbar duration versus voltage variation look-up table (f()). It is case dependent parameter. Default: nullptr */ - CIMPP::Boolean mwtcwp; /* Crowbar control mode (). The parameter is case dependent parameter. Default: false */ - CIMPP::Seconds tg; /* Current generation Time constant (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds two; /* Time constant for crowbar washout filter (). It is case dependent parameter. Default: nullptr */ - CIMPP::PU xs; /* Electromagnetic transient reactance (x). It is type dependent parameter. Default: nullptr */ + /** \brief Crowbar duration versus voltage variation look-up table (f()). It is case dependent parameter. Default: nullptr */ + CIMPP::Simple_Float fducw; + + /** \brief Crowbar control mode (). The parameter is case dependent parameter. Default: false */ + CIMPP::Boolean mwtcwp; + + /** \brief Current generation Time constant (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Time constant for crowbar washout filter (). It is case dependent parameter. Default: nullptr */ + CIMPP::Seconds two; + + /** \brief Electromagnetic transient reactance (x). It is type dependent parameter. Default: nullptr */ + CIMPP::PU xs; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/WindGenType4IEC.cpp b/CGMES_2.4.13_18DEC2013/WindGenType4IEC.cpp index 0161a30cf..103b066bf 100644 --- a/CGMES_2.4.13_18DEC2013/WindGenType4IEC.cpp +++ b/CGMES_2.4.13_18DEC2013/WindGenType4IEC.cpp @@ -8,15 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" using namespace CIMPP; -WindGenType4IEC::WindGenType4IEC() {}; -WindGenType4IEC::~WindGenType4IEC() {}; +WindGenType4IEC::WindGenType4IEC() {} +WindGenType4IEC::~WindGenType4IEC() {} static const std::list PossibleProfilesForClass = { @@ -46,64 +42,66 @@ WindGenType4IEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindGenType4IEC_dipmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenType4IEC_dipmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dipmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindGenType4IEC_diqmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenType4IEC_diqmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->diqmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindGenType4IEC_diqmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenType4IEC_diqmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->diqmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindGenType4IEC_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenType4IEC_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_WindGenType4IEC_dipmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dipmax; if (!buffer.str().empty()) @@ -117,7 +115,8 @@ bool get_WindGenType4IEC_dipmax(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindGenType4IEC_diqmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->diqmax; if (!buffer.str().empty()) @@ -131,7 +130,8 @@ bool get_WindGenType4IEC_diqmax(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindGenType4IEC_diqmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->diqmin; if (!buffer.str().empty()) @@ -145,7 +145,8 @@ bool get_WindGenType4IEC_diqmin(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindGenType4IEC_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -157,8 +158,6 @@ bool get_WindGenType4IEC_tg(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char WindGenType4IEC::debugName[] = "WindGenType4IEC"; const char* WindGenType4IEC::debugString() const { @@ -167,15 +166,15 @@ const char* WindGenType4IEC::debugString() const void WindGenType4IEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindGenType4IEC"), &WindGenType4IEC_factory)); + factory_map.emplace("cim:WindGenType4IEC", &WindGenType4IEC_factory); } void WindGenType4IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGenType4IEC.dipmax"), &assign_WindGenType4IEC_dipmax)); - assign_map.insert(std::make_pair(std::string("cim:WindGenType4IEC.diqmax"), &assign_WindGenType4IEC_diqmax)); - assign_map.insert(std::make_pair(std::string("cim:WindGenType4IEC.diqmin"), &assign_WindGenType4IEC_diqmin)); - assign_map.insert(std::make_pair(std::string("cim:WindGenType4IEC.tg"), &assign_WindGenType4IEC_tg)); + assign_map.emplace("cim:WindGenType4IEC.dipmax", &assign_WindGenType4IEC_dipmax); + assign_map.emplace("cim:WindGenType4IEC.diqmax", &assign_WindGenType4IEC_diqmax); + assign_map.emplace("cim:WindGenType4IEC.diqmin", &assign_WindGenType4IEC_diqmin); + assign_map.emplace("cim:WindGenType4IEC.tg", &assign_WindGenType4IEC_tg); } void WindGenType4IEC::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/WindGenType4IEC.hpp b/CGMES_2.4.13_18DEC2013/WindGenType4IEC.hpp index ce8bb4469..f76748389 100644 --- a/CGMES_2.4.13_18DEC2013/WindGenType4IEC.hpp +++ b/CGMES_2.4.13_18DEC2013/WindGenType4IEC.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEC Type 4 generator set model. Reference: IEC Standard 61400-27-1 Section 6.6.3.4. - */ + /** \brief IEC Type 4 generator set model. Reference: IEC Standard 61400-27-1 Section 6.6.3.4. */ class WindGenType4IEC : public WindTurbineType3or4IEC { public: @@ -28,10 +26,17 @@ namespace CIMPP WindGenType4IEC(); ~WindGenType4IEC() override; - CIMPP::PU dipmax; /* Maximum active current ramp rate (di). It is project dependent parameter. Default: nullptr */ - CIMPP::PU diqmax; /* Maximum reactive current ramp rate (di). It is project dependent parameter. Default: nullptr */ - CIMPP::PU diqmin; /* Minimum reactive current ramp rate (d). It is case dependent parameter. Default: nullptr */ - CIMPP::Seconds tg; /* Time constant (T). It is type dependent parameter. Default: nullptr */ + /** \brief Maximum active current ramp rate (di). It is project dependent parameter. Default: nullptr */ + CIMPP::PU dipmax; + + /** \brief Maximum reactive current ramp rate (di). It is project dependent parameter. Default: nullptr */ + CIMPP::PU diqmax; + + /** \brief Minimum reactive current ramp rate (d). It is case dependent parameter. Default: nullptr */ + CIMPP::PU diqmin; + + /** \brief Time constant (T). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tg; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/WindGenUnitKind.cpp b/CGMES_2.4.13_18DEC2013/WindGenUnitKind.cpp index f92814598..c2290d973 100644 --- a/CGMES_2.4.13_18DEC2013/WindGenUnitKind.cpp +++ b/CGMES_2.4.13_18DEC2013/WindGenUnitKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "WindGenUnitKind") + if (EnumSymbol.substr(0, pos) != "WindGenUnitKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,12 +50,12 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "offshore") + if (EnumSymbol == "offshore") { rop = WindGenUnitKind::offshore; return lop; } - if(EnumSymbol == "onshore") + if (EnumSymbol == "onshore") { rop = WindGenUnitKind::onshore; return lop; diff --git a/CGMES_2.4.13_18DEC2013/WindGenUnitKind.hpp b/CGMES_2.4.13_18DEC2013/WindGenUnitKind.hpp index 4aa57c46c..52d17765c 100644 --- a/CGMES_2.4.13_18DEC2013/WindGenUnitKind.hpp +++ b/CGMES_2.4.13_18DEC2013/WindGenUnitKind.hpp @@ -9,21 +9,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Kind of wind generating unit. - */ + /** \brief Kind of wind generating unit. */ class WindGenUnitKind { public: enum WindGenUnitKind_ENUM { - /** - * The wind generating unit is located offshore. - */ + /** The wind generating unit is located offshore. */ offshore, - /** - * The wind generating unit is located onshore. - */ + /** The wind generating unit is located onshore. */ onshore, }; diff --git a/CGMES_2.4.13_18DEC2013/WindGeneratingUnit.cpp b/CGMES_2.4.13_18DEC2013/WindGeneratingUnit.cpp index c3eb51f99..d2764afc7 100644 --- a/CGMES_2.4.13_18DEC2013/WindGeneratingUnit.cpp +++ b/CGMES_2.4.13_18DEC2013/WindGeneratingUnit.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "WindGenUnitKind.hpp" using namespace CIMPP; -WindGeneratingUnit::WindGeneratingUnit() {}; -WindGeneratingUnit::~WindGeneratingUnit() {}; +WindGeneratingUnit::WindGeneratingUnit() {} +WindGeneratingUnit::~WindGeneratingUnit() {} static const std::list PossibleProfilesForClass = { @@ -41,27 +40,24 @@ WindGeneratingUnit::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindGeneratingUnit_windGenUnitType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGeneratingUnit_windGenUnitType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + WindGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->windGenUnitType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - - - bool get_WindGeneratingUnit_windGenUnitType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const WindGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->windGenUnitType; if (!buffer.str().empty()) @@ -81,12 +77,12 @@ const char* WindGeneratingUnit::debugString() const void WindGeneratingUnit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindGeneratingUnit"), &WindGeneratingUnit_factory)); + factory_map.emplace("cim:WindGeneratingUnit", &WindGeneratingUnit_factory); } void WindGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGeneratingUnit.windGenUnitType"), &assign_WindGeneratingUnit_windGenUnitType)); + assign_map.emplace("cim:WindGeneratingUnit.windGenUnitType", &assign_WindGeneratingUnit_windGenUnitType); } void WindGeneratingUnit::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.13_18DEC2013/WindGeneratingUnit.hpp b/CGMES_2.4.13_18DEC2013/WindGeneratingUnit.hpp index 9289c1160..d6f2ffd7f 100644 --- a/CGMES_2.4.13_18DEC2013/WindGeneratingUnit.hpp +++ b/CGMES_2.4.13_18DEC2013/WindGeneratingUnit.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A wind driven generating unit. May be used to represent a single turbine or an aggregation. - */ + /** \brief A wind driven generating unit. May be used to represent a single turbine or an aggregation. */ class WindGeneratingUnit : public GeneratingUnit { public: @@ -27,7 +25,8 @@ namespace CIMPP WindGeneratingUnit(); ~WindGeneratingUnit() override; - CIMPP::WindGenUnitKind windGenUnitType; /* The kind of wind generating unit Default: 0 */ + /** \brief The kind of wind generating unit Default: 0 */ + CIMPP::WindGenUnitKind windGenUnitType; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/WindLVRTQcontrolModesKind.cpp b/CGMES_2.4.13_18DEC2013/WindLVRTQcontrolModesKind.cpp index 1cd506474..32c42c5fd 100644 --- a/CGMES_2.4.13_18DEC2013/WindLVRTQcontrolModesKind.cpp +++ b/CGMES_2.4.13_18DEC2013/WindLVRTQcontrolModesKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "WindLVRTQcontrolModesKind") + if (EnumSymbol.substr(0, pos) != "WindLVRTQcontrolModesKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "mode1") + if (EnumSymbol == "mode1") { rop = WindLVRTQcontrolModesKind::mode1; return lop; } - if(EnumSymbol == "mode2") + if (EnumSymbol == "mode2") { rop = WindLVRTQcontrolModesKind::mode2; return lop; } - if(EnumSymbol == "mode3") + if (EnumSymbol == "mode3") { rop = WindLVRTQcontrolModesKind::mode3; return lop; diff --git a/CGMES_2.4.13_18DEC2013/WindLVRTQcontrolModesKind.hpp b/CGMES_2.4.13_18DEC2013/WindLVRTQcontrolModesKind.hpp index 7b731082a..3f5f0d084 100644 --- a/CGMES_2.4.13_18DEC2013/WindLVRTQcontrolModesKind.hpp +++ b/CGMES_2.4.13_18DEC2013/WindLVRTQcontrolModesKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - LVRT Q control modes . - */ + /** \brief LVRT Q control modes . */ class WindLVRTQcontrolModesKind { public: enum WindLVRTQcontrolModesKind_ENUM { - /** - * Voltage dependent reactive current injection (). - */ + /** Voltage dependent reactive current injection (). */ mode1, - /** - * Reactive current injection controlled as the pre-fault value plus an additional voltage dependent reactive current injection (). - */ + /** Reactive current injection controlled as the pre-fault value plus an additional voltage dependent reactive current injection (). */ mode2, - /** - * Reactive current injection controlled as the pre-fault value plus an additional voltage dependent reactive current injection during fault, and as the pre-fault value plus an additional constant reactive current injection post fault (). - */ + /** Reactive current injection controlled as the pre-fault value plus an additional voltage dependent reactive current injection during fault, and as the pre-fault value plus an additional constant reactive current injection post fault (). */ mode3, }; diff --git a/CGMES_2.4.13_18DEC2013/WindLookupTableFunctionKind.cpp b/CGMES_2.4.13_18DEC2013/WindLookupTableFunctionKind.cpp index e6d94391f..ff9a280cc 100644 --- a/CGMES_2.4.13_18DEC2013/WindLookupTableFunctionKind.cpp +++ b/CGMES_2.4.13_18DEC2013/WindLookupTableFunctionKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "WindLookupTableFunctionKind") + if (EnumSymbol.substr(0, pos) != "WindLookupTableFunctionKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,27 +50,27 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "fpslip") + if (EnumSymbol == "fpslip") { rop = WindLookupTableFunctionKind::fpslip; return lop; } - if(EnumSymbol == "fpomega") + if (EnumSymbol == "fpomega") { rop = WindLookupTableFunctionKind::fpomega; return lop; } - if(EnumSymbol == "ipvdl") + if (EnumSymbol == "ipvdl") { rop = WindLookupTableFunctionKind::ipvdl; return lop; } - if(EnumSymbol == "iqvdl") + if (EnumSymbol == "iqvdl") { rop = WindLookupTableFunctionKind::iqvdl; return lop; } - if(EnumSymbol == "fdpf") + if (EnumSymbol == "fdpf") { rop = WindLookupTableFunctionKind::fdpf; return lop; diff --git a/CGMES_2.4.13_18DEC2013/WindLookupTableFunctionKind.hpp b/CGMES_2.4.13_18DEC2013/WindLookupTableFunctionKind.hpp index 98f42e4fa..e055847de 100644 --- a/CGMES_2.4.13_18DEC2013/WindLookupTableFunctionKind.hpp +++ b/CGMES_2.4.13_18DEC2013/WindLookupTableFunctionKind.hpp @@ -9,33 +9,21 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Function of the lookup table. - */ + /** \brief Function of the lookup table. */ class WindLookupTableFunctionKind { public: enum WindLookupTableFunctionKind_ENUM { - /** - * Power versus slip lookup table (f()). It is used for rotor resistance control model, IEC 61400-27-1, section 6.6.5.2. - */ + /** Power versus slip lookup table (f()). It is used for rotor resistance control model, IEC 61400-27-1, section 6.6.5.2. */ fpslip, - /** - * Power vs. speed lookup table (f()). It is used for P control model type 3, IEC 61400-27-1, section 6.6.5.3. - */ + /** Power vs. speed lookup table (f()). It is used for P control model type 3, IEC 61400-27-1, section 6.6.5.3. */ fpomega, - /** - * Lookup table for voltage dependency of active current limits (i()). It is used for current limitation model, IEC 61400-27-1, section 6.6.5.7. - */ + /** Lookup table for voltage dependency of active current limits (i()). It is used for current limitation model, IEC 61400-27-1, section 6.6.5.7. */ ipvdl, - /** - * Lookup table for voltage dependency of reactive current limits (i()). It is used for current limitation model, IEC 61400-27-1, section 6.6.5.7. - */ + /** Lookup table for voltage dependency of reactive current limits (i()). It is used for current limitation model, IEC 61400-27-1, section 6.6.5.7. */ iqvdl, - /** - * Power vs. frequency lookup table (()). It is used for wind power plant frequency and active power control model, IEC 61400-27-1, Annex E. - */ + /** Power vs. frequency lookup table (()). It is used for wind power plant frequency and active power control model, IEC 61400-27-1, Annex E. */ fdpf, }; diff --git a/CGMES_2.4.13_18DEC2013/WindMechIEC.cpp b/CGMES_2.4.13_18DEC2013/WindMechIEC.cpp index b52b48f35..358889264 100644 --- a/CGMES_2.4.13_18DEC2013/WindMechIEC.cpp +++ b/CGMES_2.4.13_18DEC2013/WindMechIEC.cpp @@ -11,15 +11,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindGenTurbineType3IEC.hpp" #include "WindTurbineType1or2IEC.hpp" #include "WindTurbineType4bIEC.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" using namespace CIMPP; -WindMechIEC::WindMechIEC() : WindGenTurbineType3IEC(nullptr), WindTurbineType1or2IEC(nullptr), WindTurbineType4bIEC(nullptr) {}; -WindMechIEC::~WindMechIEC() {}; +WindMechIEC::WindMechIEC() : WindGenTurbineType3IEC(nullptr), WindTurbineType1or2IEC(nullptr), WindTurbineType4bIEC(nullptr) {} +WindMechIEC::~WindMechIEC() {} static const std::list PossibleProfilesForClass = { @@ -52,112 +48,120 @@ WindMechIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindMechIEC_cdrt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType3IEC_WindMechIEC(BaseClass*, BaseClass*); +bool assign_WindMechIEC_WindGenTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + WindMechIEC* element = dynamic_cast(BaseClass_ptr1); + WindGenTurbineType3IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->cdrt; - if (buffer.fail()) - return false; - else - return true; + if (element->WindGenTurbineType3IEC != element2) + { + element->WindGenTurbineType3IEC = element2; + return assign_WindGenTurbineType3IEC_WindMechIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindMechIEC_hgen(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType1or2IEC_WindMechIEC(BaseClass*, BaseClass*); +bool assign_WindMechIEC_WindTurbineType1or2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + WindMechIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType1or2IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->hgen; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType1or2IEC != element2) + { + element->WindTurbineType1or2IEC = element2; + return assign_WindTurbineType1or2IEC_WindMechIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindMechIEC_hwtr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType4bIEC_WindMechIEC(BaseClass*, BaseClass*); +bool assign_WindMechIEC_WindTurbineType4bIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + WindMechIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType4bIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->hwtr; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType4bIEC != element2) + { + element->WindTurbineType4bIEC = element2; + return assign_WindTurbineType4bIEC_WindMechIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindMechIEC_kdrt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindMechIEC_cdrt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + WindMechIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->kdrt; - if (buffer.fail()) - return false; - else + buffer >> element->cdrt; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindGenTurbineType3IEC_WindMechIEC(BaseClass*, BaseClass*); -bool assign_WindMechIEC_WindGenTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindMechIEC_hgen(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindMechIEC* element = dynamic_cast(BaseClass_ptr1); - WindGenTurbineType3IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindGenTurbineType3IEC != element2) + buffer >> element->hgen; + if (!buffer.fail()) { - element->WindGenTurbineType3IEC = element2; - return assign_WindGenTurbineType3IEC_WindMechIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_WindTurbineType1or2IEC_WindMechIEC(BaseClass*, BaseClass*); -bool assign_WindMechIEC_WindTurbineType1or2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_WindMechIEC_hwtr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindMechIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType1or2IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType1or2IEC != element2) + buffer >> element->hwtr; + if (!buffer.fail()) { - element->WindTurbineType1or2IEC = element2; - return assign_WindTurbineType1or2IEC_WindMechIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_WindTurbineType4bIEC_WindMechIEC(BaseClass*, BaseClass*); -bool assign_WindMechIEC_WindTurbineType4bIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_WindMechIEC_kdrt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindMechIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType4bIEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType4bIEC != element2) + buffer >> element->kdrt; + if (!buffer.fail()) { - element->WindTurbineType4bIEC = element2; - return assign_WindTurbineType4bIEC_WindMechIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + + + bool get_WindMechIEC_cdrt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindMechIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->cdrt; if (!buffer.str().empty()) @@ -171,7 +175,8 @@ bool get_WindMechIEC_cdrt(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_WindMechIEC_hgen(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindMechIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hgen; if (!buffer.str().empty()) @@ -185,7 +190,8 @@ bool get_WindMechIEC_hgen(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_WindMechIEC_hwtr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindMechIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hwtr; if (!buffer.str().empty()) @@ -199,7 +205,8 @@ bool get_WindMechIEC_hwtr(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_WindMechIEC_kdrt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindMechIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdrt; if (!buffer.str().empty()) @@ -211,8 +218,6 @@ bool get_WindMechIEC_kdrt(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char WindMechIEC::debugName[] = "WindMechIEC"; const char* WindMechIEC::debugString() const { @@ -221,22 +226,22 @@ const char* WindMechIEC::debugString() const void WindMechIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindMechIEC"), &WindMechIEC_factory)); + factory_map.emplace("cim:WindMechIEC", &WindMechIEC_factory); } void WindMechIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindMechIEC.cdrt"), &assign_WindMechIEC_cdrt)); - assign_map.insert(std::make_pair(std::string("cim:WindMechIEC.hgen"), &assign_WindMechIEC_hgen)); - assign_map.insert(std::make_pair(std::string("cim:WindMechIEC.hwtr"), &assign_WindMechIEC_hwtr)); - assign_map.insert(std::make_pair(std::string("cim:WindMechIEC.kdrt"), &assign_WindMechIEC_kdrt)); + assign_map.emplace("cim:WindMechIEC.cdrt", &assign_WindMechIEC_cdrt); + assign_map.emplace("cim:WindMechIEC.hgen", &assign_WindMechIEC_hgen); + assign_map.emplace("cim:WindMechIEC.hwtr", &assign_WindMechIEC_hwtr); + assign_map.emplace("cim:WindMechIEC.kdrt", &assign_WindMechIEC_kdrt); } void WindMechIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindMechIEC.WindGenTurbineType3IEC"), &assign_WindMechIEC_WindGenTurbineType3IEC)); - assign_map.insert(std::make_pair(std::string("cim:WindMechIEC.WindTurbineType1or2IEC"), &assign_WindMechIEC_WindTurbineType1or2IEC)); - assign_map.insert(std::make_pair(std::string("cim:WindMechIEC.WindTurbineType4bIEC"), &assign_WindMechIEC_WindTurbineType4bIEC)); + assign_map.emplace("cim:WindMechIEC.WindGenTurbineType3IEC", &assign_WindMechIEC_WindGenTurbineType3IEC); + assign_map.emplace("cim:WindMechIEC.WindTurbineType1or2IEC", &assign_WindMechIEC_WindTurbineType1or2IEC); + assign_map.emplace("cim:WindMechIEC.WindTurbineType4bIEC", &assign_WindMechIEC_WindTurbineType4bIEC); } void WindMechIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/WindMechIEC.hpp b/CGMES_2.4.13_18DEC2013/WindMechIEC.hpp index 650d95c77..59019c1ae 100644 --- a/CGMES_2.4.13_18DEC2013/WindMechIEC.hpp +++ b/CGMES_2.4.13_18DEC2013/WindMechIEC.hpp @@ -21,9 +21,7 @@ namespace CIMPP class WindTurbineType1or2IEC; class WindTurbineType4bIEC; - /* - Two mass model. Reference: IEC Standard 61400-27-1 Section 6.6.2.1. - */ + /** \brief Two mass model. Reference: IEC Standard 61400-27-1 Section 6.6.2.1. */ class WindMechIEC : public IdentifiedObject { public: @@ -31,13 +29,26 @@ namespace CIMPP WindMechIEC(); ~WindMechIEC() override; - CIMPP::WindGenTurbineType3IEC* WindGenTurbineType3IEC; /* Wind turbine Type 3 model with which this wind mechanical model is associated. Default: 0 */ - CIMPP::WindTurbineType1or2IEC* WindTurbineType1or2IEC; /* Wind generator type 1 or 2 model with which this wind mechanical model is associated. Default: 0 */ - CIMPP::WindTurbineType4bIEC* WindTurbineType4bIEC; /* Wind turbine type 4B model with which this wind mechanical model is associated. Default: 0 */ - CIMPP::PU cdrt; /* Drive train damping (. It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds hgen; /* Inertia constant of generator (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds hwtr; /* Inertia constant of wind turbine rotor (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kdrt; /* Drive train stiffness (). It is type dependent parameter. Default: nullptr */ + /** \brief Wind turbine Type 3 model with which this wind mechanical model is associated. Default: 0 */ + CIMPP::WindGenTurbineType3IEC* WindGenTurbineType3IEC; + + /** \brief Wind generator type 1 or 2 model with which this wind mechanical model is associated. Default: 0 */ + CIMPP::WindTurbineType1or2IEC* WindTurbineType1or2IEC; + + /** \brief Wind turbine type 4B model with which this wind mechanical model is associated. Default: 0 */ + CIMPP::WindTurbineType4bIEC* WindTurbineType4bIEC; + + /** \brief Drive train damping (. It is type dependent parameter. Default: nullptr */ + CIMPP::PU cdrt; + + /** \brief Inertia constant of generator (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds hgen; + + /** \brief Inertia constant of wind turbine rotor (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds hwtr; + + /** \brief Drive train stiffness (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kdrt; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/WindPitchContEmulIEC.cpp b/CGMES_2.4.13_18DEC2013/WindPitchContEmulIEC.cpp index 19756384e..c78632e74 100644 --- a/CGMES_2.4.13_18DEC2013/WindPitchContEmulIEC.cpp +++ b/CGMES_2.4.13_18DEC2013/WindPitchContEmulIEC.cpp @@ -9,21 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "WindGenTurbineType2IEC.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -WindPitchContEmulIEC::WindPitchContEmulIEC() : WindGenTurbineType2IEC(nullptr) {}; -WindPitchContEmulIEC::~WindPitchContEmulIEC() {}; +WindPitchContEmulIEC::WindPitchContEmulIEC() : WindGenTurbineType2IEC(nullptr) {} +WindPitchContEmulIEC::~WindPitchContEmulIEC() {} static const std::list PossibleProfilesForClass = { @@ -60,158 +50,168 @@ WindPitchContEmulIEC::getPossibleProfilesForAttributes() const return map; } +bool assign_WindGenTurbineType2IEC_WindPitchContEmulIEC(BaseClass*, BaseClass*); +bool assign_WindPitchContEmulIEC_WindGenTurbineType2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + WindGenTurbineType2IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindGenTurbineType2IEC != element2) + { + element->WindGenTurbineType2IEC = element2; + return assign_WindGenTurbineType2IEC_WindPitchContEmulIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_WindPitchContEmulIEC_kdroop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPitchContEmulIEC_kdroop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kdroop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPitchContEmulIEC_kipce(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPitchContEmulIEC_kipce(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kipce; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPitchContEmulIEC_komegaaero(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPitchContEmulIEC_komegaaero(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->komegaaero; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPitchContEmulIEC_kppce(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPitchContEmulIEC_kppce(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kppce; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPitchContEmulIEC_omegaref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPitchContEmulIEC_omegaref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->omegaref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPitchContEmulIEC_pimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPitchContEmulIEC_pimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPitchContEmulIEC_pimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPitchContEmulIEC_pimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPitchContEmulIEC_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPitchContEmulIEC_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPitchContEmulIEC_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPitchContEmulIEC_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_WindPitchContEmulIEC_tpe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->tpe; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindGenTurbineType2IEC_WindPitchContEmulIEC(BaseClass*, BaseClass*); -bool assign_WindPitchContEmulIEC_WindGenTurbineType2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindPitchContEmulIEC_tpe(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); - WindGenTurbineType2IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindGenTurbineType2IEC != element2) + buffer >> element->tpe; + if (!buffer.fail()) { - element->WindGenTurbineType2IEC = element2; - return assign_WindGenTurbineType2IEC_WindPitchContEmulIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_WindPitchContEmulIEC_kdroop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdroop; if (!buffer.str().empty()) @@ -225,7 +225,8 @@ bool get_WindPitchContEmulIEC_kdroop(const BaseClass* BaseClass_ptr1, std::strin bool get_WindPitchContEmulIEC_kipce(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kipce; if (!buffer.str().empty()) @@ -239,7 +240,8 @@ bool get_WindPitchContEmulIEC_kipce(const BaseClass* BaseClass_ptr1, std::string bool get_WindPitchContEmulIEC_komegaaero(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->komegaaero; if (!buffer.str().empty()) @@ -253,7 +255,8 @@ bool get_WindPitchContEmulIEC_komegaaero(const BaseClass* BaseClass_ptr1, std::s bool get_WindPitchContEmulIEC_kppce(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kppce; if (!buffer.str().empty()) @@ -267,7 +270,8 @@ bool get_WindPitchContEmulIEC_kppce(const BaseClass* BaseClass_ptr1, std::string bool get_WindPitchContEmulIEC_omegaref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->omegaref; if (!buffer.str().empty()) @@ -281,7 +285,8 @@ bool get_WindPitchContEmulIEC_omegaref(const BaseClass* BaseClass_ptr1, std::str bool get_WindPitchContEmulIEC_pimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pimax; if (!buffer.str().empty()) @@ -295,7 +300,8 @@ bool get_WindPitchContEmulIEC_pimax(const BaseClass* BaseClass_ptr1, std::string bool get_WindPitchContEmulIEC_pimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pimin; if (!buffer.str().empty()) @@ -309,7 +315,8 @@ bool get_WindPitchContEmulIEC_pimin(const BaseClass* BaseClass_ptr1, std::string bool get_WindPitchContEmulIEC_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -323,7 +330,8 @@ bool get_WindPitchContEmulIEC_t1(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindPitchContEmulIEC_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -337,7 +345,8 @@ bool get_WindPitchContEmulIEC_t2(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindPitchContEmulIEC_tpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpe; if (!buffer.str().empty()) @@ -349,8 +358,6 @@ bool get_WindPitchContEmulIEC_tpe(const BaseClass* BaseClass_ptr1, std::stringst return false; } - - const char WindPitchContEmulIEC::debugName[] = "WindPitchContEmulIEC"; const char* WindPitchContEmulIEC::debugString() const { @@ -359,26 +366,26 @@ const char* WindPitchContEmulIEC::debugString() const void WindPitchContEmulIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC"), &WindPitchContEmulIEC_factory)); + factory_map.emplace("cim:WindPitchContEmulIEC", &WindPitchContEmulIEC_factory); } void WindPitchContEmulIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC.kdroop"), &assign_WindPitchContEmulIEC_kdroop)); - assign_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC.kipce"), &assign_WindPitchContEmulIEC_kipce)); - assign_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC.komegaaero"), &assign_WindPitchContEmulIEC_komegaaero)); - assign_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC.kppce"), &assign_WindPitchContEmulIEC_kppce)); - assign_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC.omegaref"), &assign_WindPitchContEmulIEC_omegaref)); - assign_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC.pimax"), &assign_WindPitchContEmulIEC_pimax)); - assign_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC.pimin"), &assign_WindPitchContEmulIEC_pimin)); - assign_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC.t1"), &assign_WindPitchContEmulIEC_t1)); - assign_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC.t2"), &assign_WindPitchContEmulIEC_t2)); - assign_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC.tpe"), &assign_WindPitchContEmulIEC_tpe)); + assign_map.emplace("cim:WindPitchContEmulIEC.kdroop", &assign_WindPitchContEmulIEC_kdroop); + assign_map.emplace("cim:WindPitchContEmulIEC.kipce", &assign_WindPitchContEmulIEC_kipce); + assign_map.emplace("cim:WindPitchContEmulIEC.komegaaero", &assign_WindPitchContEmulIEC_komegaaero); + assign_map.emplace("cim:WindPitchContEmulIEC.kppce", &assign_WindPitchContEmulIEC_kppce); + assign_map.emplace("cim:WindPitchContEmulIEC.omegaref", &assign_WindPitchContEmulIEC_omegaref); + assign_map.emplace("cim:WindPitchContEmulIEC.pimax", &assign_WindPitchContEmulIEC_pimax); + assign_map.emplace("cim:WindPitchContEmulIEC.pimin", &assign_WindPitchContEmulIEC_pimin); + assign_map.emplace("cim:WindPitchContEmulIEC.t1", &assign_WindPitchContEmulIEC_t1); + assign_map.emplace("cim:WindPitchContEmulIEC.t2", &assign_WindPitchContEmulIEC_t2); + assign_map.emplace("cim:WindPitchContEmulIEC.tpe", &assign_WindPitchContEmulIEC_tpe); } void WindPitchContEmulIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC.WindGenTurbineType2IEC"), &assign_WindPitchContEmulIEC_WindGenTurbineType2IEC)); + assign_map.emplace("cim:WindPitchContEmulIEC.WindGenTurbineType2IEC", &assign_WindPitchContEmulIEC_WindGenTurbineType2IEC); } void WindPitchContEmulIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/WindPitchContEmulIEC.hpp b/CGMES_2.4.13_18DEC2013/WindPitchContEmulIEC.hpp index ba0894a15..dcdefc9bb 100644 --- a/CGMES_2.4.13_18DEC2013/WindPitchContEmulIEC.hpp +++ b/CGMES_2.4.13_18DEC2013/WindPitchContEmulIEC.hpp @@ -20,9 +20,7 @@ namespace CIMPP { class WindGenTurbineType2IEC; - /* - Pitch control emulator model. Reference: IEC Standard 61400-27-1 Section 6.6.5.1. - */ + /** \brief Pitch control emulator model. Reference: IEC Standard 61400-27-1 Section 6.6.5.1. */ class WindPitchContEmulIEC : public IdentifiedObject { public: @@ -30,17 +28,38 @@ namespace CIMPP WindPitchContEmulIEC(); ~WindPitchContEmulIEC() override; - CIMPP::WindGenTurbineType2IEC* WindGenTurbineType2IEC; /* Wind turbine type 2 model with which this Pitch control emulator model is associated. Default: 0 */ - CIMPP::Simple_Float kdroop; /* Power error gain (). It is case dependent parameter. Default: nullptr */ - CIMPP::Simple_Float kipce; /* Pitch control emulator integral constant (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU komegaaero; /* Aerodynamic power change vs. omegachange (). It is case dependent parameter. Default: nullptr */ - CIMPP::Simple_Float kppce; /* Pitch control emulator proportional constant (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU omegaref; /* Rotor speed in initial steady state (omega). It is case dependent parameter. Default: nullptr */ - CIMPP::PU pimax; /* Maximum steady state power (). It is case dependent parameter. Default: nullptr */ - CIMPP::PU pimin; /* Minimum steady state power (). It is case dependent parameter. Default: nullptr */ - CIMPP::Seconds t1; /* First time constant in pitch control lag (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds t2; /* Second time constant in pitch control lag (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tpe; /* Time constant in generator air gap power lag (). It is type dependent parameter. Default: nullptr */ + /** \brief Wind turbine type 2 model with which this Pitch control emulator model is associated. Default: 0 */ + CIMPP::WindGenTurbineType2IEC* WindGenTurbineType2IEC; + + /** \brief Power error gain (). It is case dependent parameter. Default: nullptr */ + CIMPP::Simple_Float kdroop; + + /** \brief Pitch control emulator integral constant (). It is type dependent parameter. Default: nullptr */ + CIMPP::Simple_Float kipce; + + /** \brief Aerodynamic power change vs. omegachange (). It is case dependent parameter. Default: nullptr */ + CIMPP::PU komegaaero; + + /** \brief Pitch control emulator proportional constant (). It is type dependent parameter. Default: nullptr */ + CIMPP::Simple_Float kppce; + + /** \brief Rotor speed in initial steady state (omega). It is case dependent parameter. Default: nullptr */ + CIMPP::PU omegaref; + + /** \brief Maximum steady state power (). It is case dependent parameter. Default: nullptr */ + CIMPP::PU pimax; + + /** \brief Minimum steady state power (). It is case dependent parameter. Default: nullptr */ + CIMPP::PU pimin; + + /** \brief First time constant in pitch control lag (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Second time constant in pitch control lag (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Time constant in generator air gap power lag (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tpe; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/WindPlantDynamics.cpp b/CGMES_2.4.13_18DEC2013/WindPlantDynamics.cpp index 07c27bcf5..c89fc1bb8 100644 --- a/CGMES_2.4.13_18DEC2013/WindPlantDynamics.cpp +++ b/CGMES_2.4.13_18DEC2013/WindPlantDynamics.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindPlantDynamics::WindPlantDynamics() : RemoteInputSignal(nullptr) {}; -WindPlantDynamics::~WindPlantDynamics() {}; +WindPlantDynamics::WindPlantDynamics() : RemoteInputSignal(nullptr) {} +WindPlantDynamics::~WindPlantDynamics() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ WindPlantDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_RemoteInputSignal_WindPlantDynamics(BaseClass*, BaseClass*); bool assign_WindPlantDynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_WindPlantDynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseC } return false; } + bool assign_WindTurbineType3or4Dynamics_WindPlantDynamics(BaseClass*, BaseClass*); bool assign_WindPlantDynamics_WindTurbineType3or4Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_WindPlantDynamics_WindTurbineType3or4Dynamics(BaseClass* BaseClass_p return false; } - bool get_WindPlantDynamics_RemoteInputSignal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindPlantDynamics* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->RemoteInputSignal != 0) { @@ -100,7 +99,7 @@ const char* WindPlantDynamics::debugString() const void WindPlantDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindPlantDynamics"), &WindPlantDynamics_factory)); + factory_map.emplace("cim:WindPlantDynamics", &WindPlantDynamics_factory); } void WindPlantDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -109,8 +108,8 @@ void WindPlantDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPlantDynamics.RemoteInputSignal"), &assign_WindPlantDynamics_RemoteInputSignal)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantDynamics.WindTurbineType3or4Dynamics"), &assign_WindPlantDynamics_WindTurbineType3or4Dynamics)); + assign_map.emplace("cim:WindPlantDynamics.RemoteInputSignal", &assign_WindPlantDynamics_RemoteInputSignal); + assign_map.emplace("cim:WindPlantDynamics.WindTurbineType3or4Dynamics", &assign_WindPlantDynamics_WindTurbineType3or4Dynamics); } void WindPlantDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/WindPlantDynamics.hpp b/CGMES_2.4.13_18DEC2013/WindPlantDynamics.hpp index 2ac516cd6..0b8314fc3 100644 --- a/CGMES_2.4.13_18DEC2013/WindPlantDynamics.hpp +++ b/CGMES_2.4.13_18DEC2013/WindPlantDynamics.hpp @@ -18,9 +18,7 @@ namespace CIMPP class RemoteInputSignal; class WindTurbineType3or4Dynamics; - /* - Parent class supporting relationships to wind turbines Type 3 and 4 and wind plant IEC and user defined wind plants including their control models. - */ + /** \brief Parent class supporting relationships to wind turbines Type 3 and 4 and wind plant IEC and user defined wind plants including their control models. */ class WindPlantDynamics : public DynamicsFunctionBlock { public: @@ -28,8 +26,11 @@ namespace CIMPP WindPlantDynamics(); ~WindPlantDynamics() override; - CIMPP::RemoteInputSignal* RemoteInputSignal; /* The wind plant using the remote signal. Default: 0 */ - std::list WindTurbineType3or4Dynamics; /* The wind turbine type 3 or 4 associated with this wind plant. Default: 0 */ + /** \brief The wind plant using the remote signal. Default: 0 */ + CIMPP::RemoteInputSignal* RemoteInputSignal; + + /** \brief The wind turbine type 3 or 4 associated with this wind plant. Default: 0 */ + std::list WindTurbineType3or4Dynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/WindPlantFreqPcontrolIEC.cpp b/CGMES_2.4.13_18DEC2013/WindPlantFreqPcontrolIEC.cpp index e7c7ac1c6..f21322dd3 100644 --- a/CGMES_2.4.13_18DEC2013/WindPlantFreqPcontrolIEC.cpp +++ b/CGMES_2.4.13_18DEC2013/WindPlantFreqPcontrolIEC.cpp @@ -10,21 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindDynamicsLookupTable.hpp" #include "WindPlantIEC.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -WindPlantFreqPcontrolIEC::WindPlantFreqPcontrolIEC() : WindPlantIEC(nullptr) {}; -WindPlantFreqPcontrolIEC::~WindPlantFreqPcontrolIEC() {}; +WindPlantFreqPcontrolIEC::WindPlantFreqPcontrolIEC() : WindPlantIEC(nullptr) {} +WindPlantFreqPcontrolIEC::~WindPlantFreqPcontrolIEC() {} static const std::list PossibleProfilesForClass = { @@ -62,174 +52,186 @@ WindPlantFreqPcontrolIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindPlantFreqPcontrolIEC_dprefmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC(BaseClass*, BaseClass*); +bool assign_WindPlantFreqPcontrolIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->dprefmax; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) + { + element->WindDynamicsLookupTable.push_back(element2); + return assign_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindPlantFreqPcontrolIEC_dprefmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantIEC_WindPlantFreqPcontrolIEC(BaseClass*, BaseClass*); +bool assign_WindPlantFreqPcontrolIEC_WindPlantIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + WindPlantIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->dprefmin; - if (buffer.fail()) - return false; - else - return true; + if (element->WindPlantIEC != element2) + { + element->WindPlantIEC = element2; + return assign_WindPlantIEC_WindPlantFreqPcontrolIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindPlantFreqPcontrolIEC_kiwpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_dprefmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->kiwpp; - if (buffer.fail()) - return false; - else + buffer >> element->dprefmax; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantFreqPcontrolIEC_kpwpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_dprefmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->kpwpp; - if (buffer.fail()) - return false; - else + buffer >> element->dprefmin; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantFreqPcontrolIEC_prefmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_kiwpp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->prefmax; - if (buffer.fail()) - return false; - else + buffer >> element->kiwpp; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantFreqPcontrolIEC_prefmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_kpwpp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->prefmin; - if (buffer.fail()) - return false; - else + buffer >> element->kpwpp; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantFreqPcontrolIEC_tpft(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_prefmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tpft; - if (buffer.fail()) - return false; - else + buffer >> element->prefmax; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantFreqPcontrolIEC_tpfv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_prefmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tpfv; - if (buffer.fail()) - return false; - else + buffer >> element->prefmin; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantFreqPcontrolIEC_twpffilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_tpft(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->twpffilt; - if (buffer.fail()) - return false; - else + buffer >> element->tpft; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantFreqPcontrolIEC_twppfilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_tpfv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->twppfilt; - if (buffer.fail()) - return false; - else + buffer >> element->tpfv; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC(BaseClass*, BaseClass*); -bool assign_WindPlantFreqPcontrolIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindPlantFreqPcontrolIEC_twpffilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); - WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) + buffer >> element->twpffilt; + if (!buffer.fail()) { - element->WindDynamicsLookupTable.push_back(element2); - return assign_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_WindPlantIEC_WindPlantFreqPcontrolIEC(BaseClass*, BaseClass*); -bool assign_WindPlantFreqPcontrolIEC_WindPlantIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_WindPlantFreqPcontrolIEC_twppfilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); - WindPlantIEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindPlantIEC != element2) + buffer >> element->twppfilt; + if (!buffer.fail()) { - element->WindPlantIEC = element2; - return assign_WindPlantIEC_WindPlantFreqPcontrolIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + + bool get_WindPlantFreqPcontrolIEC_dprefmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dprefmax; if (!buffer.str().empty()) @@ -243,7 +245,8 @@ bool get_WindPlantFreqPcontrolIEC_dprefmax(const BaseClass* BaseClass_ptr1, std: bool get_WindPlantFreqPcontrolIEC_dprefmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dprefmin; if (!buffer.str().empty()) @@ -257,7 +260,8 @@ bool get_WindPlantFreqPcontrolIEC_dprefmin(const BaseClass* BaseClass_ptr1, std: bool get_WindPlantFreqPcontrolIEC_kiwpp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kiwpp; if (!buffer.str().empty()) @@ -271,7 +275,8 @@ bool get_WindPlantFreqPcontrolIEC_kiwpp(const BaseClass* BaseClass_ptr1, std::st bool get_WindPlantFreqPcontrolIEC_kpwpp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpwpp; if (!buffer.str().empty()) @@ -285,7 +290,8 @@ bool get_WindPlantFreqPcontrolIEC_kpwpp(const BaseClass* BaseClass_ptr1, std::st bool get_WindPlantFreqPcontrolIEC_prefmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->prefmax; if (!buffer.str().empty()) @@ -299,7 +305,8 @@ bool get_WindPlantFreqPcontrolIEC_prefmax(const BaseClass* BaseClass_ptr1, std:: bool get_WindPlantFreqPcontrolIEC_prefmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->prefmin; if (!buffer.str().empty()) @@ -313,7 +320,8 @@ bool get_WindPlantFreqPcontrolIEC_prefmin(const BaseClass* BaseClass_ptr1, std:: bool get_WindPlantFreqPcontrolIEC_tpft(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpft; if (!buffer.str().empty()) @@ -327,7 +335,8 @@ bool get_WindPlantFreqPcontrolIEC_tpft(const BaseClass* BaseClass_ptr1, std::str bool get_WindPlantFreqPcontrolIEC_tpfv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpfv; if (!buffer.str().empty()) @@ -341,7 +350,8 @@ bool get_WindPlantFreqPcontrolIEC_tpfv(const BaseClass* BaseClass_ptr1, std::str bool get_WindPlantFreqPcontrolIEC_twpffilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twpffilt; if (!buffer.str().empty()) @@ -355,7 +365,8 @@ bool get_WindPlantFreqPcontrolIEC_twpffilt(const BaseClass* BaseClass_ptr1, std: bool get_WindPlantFreqPcontrolIEC_twppfilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twppfilt; if (!buffer.str().empty()) @@ -367,8 +378,6 @@ bool get_WindPlantFreqPcontrolIEC_twppfilt(const BaseClass* BaseClass_ptr1, std: return false; } - - const char WindPlantFreqPcontrolIEC::debugName[] = "WindPlantFreqPcontrolIEC"; const char* WindPlantFreqPcontrolIEC::debugString() const { @@ -377,27 +386,27 @@ const char* WindPlantFreqPcontrolIEC::debugString() const void WindPlantFreqPcontrolIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC"), &WindPlantFreqPcontrolIEC_factory)); + factory_map.emplace("cim:WindPlantFreqPcontrolIEC", &WindPlantFreqPcontrolIEC_factory); } void WindPlantFreqPcontrolIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.dprefmax"), &assign_WindPlantFreqPcontrolIEC_dprefmax)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.dprefmin"), &assign_WindPlantFreqPcontrolIEC_dprefmin)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.kiwpp"), &assign_WindPlantFreqPcontrolIEC_kiwpp)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.kpwpp"), &assign_WindPlantFreqPcontrolIEC_kpwpp)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.prefmax"), &assign_WindPlantFreqPcontrolIEC_prefmax)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.prefmin"), &assign_WindPlantFreqPcontrolIEC_prefmin)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.tpft"), &assign_WindPlantFreqPcontrolIEC_tpft)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.tpfv"), &assign_WindPlantFreqPcontrolIEC_tpfv)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.twpffilt"), &assign_WindPlantFreqPcontrolIEC_twpffilt)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.twppfilt"), &assign_WindPlantFreqPcontrolIEC_twppfilt)); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.dprefmax", &assign_WindPlantFreqPcontrolIEC_dprefmax); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.dprefmin", &assign_WindPlantFreqPcontrolIEC_dprefmin); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.kiwpp", &assign_WindPlantFreqPcontrolIEC_kiwpp); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.kpwpp", &assign_WindPlantFreqPcontrolIEC_kpwpp); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.prefmax", &assign_WindPlantFreqPcontrolIEC_prefmax); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.prefmin", &assign_WindPlantFreqPcontrolIEC_prefmin); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.tpft", &assign_WindPlantFreqPcontrolIEC_tpft); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.tpfv", &assign_WindPlantFreqPcontrolIEC_tpfv); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.twpffilt", &assign_WindPlantFreqPcontrolIEC_twpffilt); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.twppfilt", &assign_WindPlantFreqPcontrolIEC_twppfilt); } void WindPlantFreqPcontrolIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.WindDynamicsLookupTable"), &assign_WindPlantFreqPcontrolIEC_WindDynamicsLookupTable)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.WindPlantIEC"), &assign_WindPlantFreqPcontrolIEC_WindPlantIEC)); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.WindDynamicsLookupTable", &assign_WindPlantFreqPcontrolIEC_WindDynamicsLookupTable); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.WindPlantIEC", &assign_WindPlantFreqPcontrolIEC_WindPlantIEC); } void WindPlantFreqPcontrolIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/WindPlantFreqPcontrolIEC.hpp b/CGMES_2.4.13_18DEC2013/WindPlantFreqPcontrolIEC.hpp index 4ce4f541a..069d958c9 100644 --- a/CGMES_2.4.13_18DEC2013/WindPlantFreqPcontrolIEC.hpp +++ b/CGMES_2.4.13_18DEC2013/WindPlantFreqPcontrolIEC.hpp @@ -21,9 +21,7 @@ namespace CIMPP class WindDynamicsLookupTable; class WindPlantIEC; - /* - Frequency and active power controller model. Reference: IEC Standard 61400-27-1 Annex E. - */ + /** \brief Frequency and active power controller model. Reference: IEC Standard 61400-27-1 Annex E. */ class WindPlantFreqPcontrolIEC : public IdentifiedObject { public: @@ -31,18 +29,41 @@ namespace CIMPP WindPlantFreqPcontrolIEC(); ~WindPlantFreqPcontrolIEC() override; - std::list WindDynamicsLookupTable; /* The frequency and active power wind plant control model with which this wind dynamics lookup table is associated. Default: 0 */ - CIMPP::WindPlantIEC* WindPlantIEC; /* Wind plant model with which this wind plant frequency and active power control is associated. Default: 0 */ - CIMPP::PU dprefmax; /* Maximum ramp rate of request from the plant controller to the wind turbines (). It is project dependent parameter. Default: nullptr */ - CIMPP::PU dprefmin; /* Minimum (negative) ramp rate of request from the plant controller to the wind turbines (). It is project dependent parameter. Default: nullptr */ - CIMPP::Simple_Float kiwpp; /* Plant P controller integral gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::Simple_Float kpwpp; /* Plant P controller proportional gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU prefmax; /* Maximum request from the plant controller to the wind turbines (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU prefmin; /* Minimum request from the plant controller to the wind turbines (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tpft; /* Lead time constant in reference value transfer function (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tpfv; /* Lag time constant in reference value transfer function (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds twpffilt; /* Filter time constant for frequency measurement (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds twppfilt; /* Filter time constant for active power measurement (). It is type dependent parameter. Default: nullptr */ + /** \brief The frequency and active power wind plant control model with which this wind dynamics lookup table is associated. Default: 0 */ + std::list WindDynamicsLookupTable; + + /** \brief Wind plant model with which this wind plant frequency and active power control is associated. Default: 0 */ + CIMPP::WindPlantIEC* WindPlantIEC; + + /** \brief Maximum ramp rate of request from the plant controller to the wind turbines (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU dprefmax; + + /** \brief Minimum (negative) ramp rate of request from the plant controller to the wind turbines (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU dprefmin; + + /** \brief Plant P controller integral gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::Simple_Float kiwpp; + + /** \brief Plant P controller proportional gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::Simple_Float kpwpp; + + /** \brief Maximum request from the plant controller to the wind turbines (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU prefmax; + + /** \brief Minimum request from the plant controller to the wind turbines (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU prefmin; + + /** \brief Lead time constant in reference value transfer function (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tpft; + + /** \brief Lag time constant in reference value transfer function (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tpfv; + + /** \brief Filter time constant for frequency measurement (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds twpffilt; + + /** \brief Filter time constant for active power measurement (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds twppfilt; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/WindPlantIEC.cpp b/CGMES_2.4.13_18DEC2013/WindPlantIEC.cpp index 5e9a20c83..b455a5284 100644 --- a/CGMES_2.4.13_18DEC2013/WindPlantIEC.cpp +++ b/CGMES_2.4.13_18DEC2013/WindPlantIEC.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindPlantIEC::WindPlantIEC() : WindPlantFreqPcontrolIEC(nullptr), WindPlantReactiveControlIEC(nullptr) {}; -WindPlantIEC::~WindPlantIEC() {}; +WindPlantIEC::WindPlantIEC() : WindPlantFreqPcontrolIEC(nullptr), WindPlantReactiveControlIEC(nullptr) {} +WindPlantIEC::~WindPlantIEC() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ WindPlantIEC::getPossibleProfilesForAttributes() const return map; } - - bool assign_WindPlantFreqPcontrolIEC_WindPlantIEC(BaseClass*, BaseClass*); bool assign_WindPlantIEC_WindPlantFreqPcontrolIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_WindPlantIEC_WindPlantFreqPcontrolIEC(BaseClass* BaseClass_ptr1, Bas } return false; } + bool assign_WindPlantReactiveControlIEC_WindPlantIEC(BaseClass*, BaseClass*); bool assign_WindPlantIEC_WindPlantReactiveControlIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_WindPlantIEC_WindPlantReactiveControlIEC(BaseClass* BaseClass_ptr1, return false; } - bool get_WindPlantIEC_WindPlantFreqPcontrolIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindPlantIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindPlantFreqPcontrolIEC != 0) { @@ -93,7 +92,8 @@ bool get_WindPlantIEC_WindPlantFreqPcontrolIEC(const BaseClass* BaseClass_ptr1, bool get_WindPlantIEC_WindPlantReactiveControlIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindPlantIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindPlantReactiveControlIEC != 0) { @@ -104,7 +104,6 @@ bool get_WindPlantIEC_WindPlantReactiveControlIEC(const BaseClass* BaseClass_ptr return false; } - const char WindPlantIEC::debugName[] = "WindPlantIEC"; const char* WindPlantIEC::debugString() const { @@ -113,7 +112,7 @@ const char* WindPlantIEC::debugString() const void WindPlantIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindPlantIEC"), &WindPlantIEC_factory)); + factory_map.emplace("cim:WindPlantIEC", &WindPlantIEC_factory); } void WindPlantIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void WindPlantIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPlantIEC.WindPlantFreqPcontrolIEC"), &assign_WindPlantIEC_WindPlantFreqPcontrolIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantIEC.WindPlantReactiveControlIEC"), &assign_WindPlantIEC_WindPlantReactiveControlIEC)); + assign_map.emplace("cim:WindPlantIEC.WindPlantFreqPcontrolIEC", &assign_WindPlantIEC_WindPlantFreqPcontrolIEC); + assign_map.emplace("cim:WindPlantIEC.WindPlantReactiveControlIEC", &assign_WindPlantIEC_WindPlantReactiveControlIEC); } void WindPlantIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/WindPlantIEC.hpp b/CGMES_2.4.13_18DEC2013/WindPlantIEC.hpp index 4b2d8e239..8f277cafa 100644 --- a/CGMES_2.4.13_18DEC2013/WindPlantIEC.hpp +++ b/CGMES_2.4.13_18DEC2013/WindPlantIEC.hpp @@ -18,9 +18,7 @@ namespace CIMPP class WindPlantFreqPcontrolIEC; class WindPlantReactiveControlIEC; - /* - Simplified IEC type plant level model. Reference: IEC 61400-27-1, AnnexE. - */ + /** \brief Simplified IEC type plant level model. Reference: IEC 61400-27-1, AnnexE. */ class WindPlantIEC : public WindPlantDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP WindPlantIEC(); ~WindPlantIEC() override; - CIMPP::WindPlantFreqPcontrolIEC* WindPlantFreqPcontrolIEC; /* Wind plant frequency and active power control model associated with this wind plant. Default: 0 */ - CIMPP::WindPlantReactiveControlIEC* WindPlantReactiveControlIEC; /* Wind plant reactive control model associated with this wind plant. Default: 0 */ + /** \brief Wind plant frequency and active power control model associated with this wind plant. Default: 0 */ + CIMPP::WindPlantFreqPcontrolIEC* WindPlantFreqPcontrolIEC; + + /** \brief Wind plant reactive control model associated with this wind plant. Default: 0 */ + CIMPP::WindPlantReactiveControlIEC* WindPlantReactiveControlIEC; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/WindPlantReactiveControlIEC.cpp b/CGMES_2.4.13_18DEC2013/WindPlantReactiveControlIEC.cpp index b37d33409..8135d692c 100644 --- a/CGMES_2.4.13_18DEC2013/WindPlantReactiveControlIEC.cpp +++ b/CGMES_2.4.13_18DEC2013/WindPlantReactiveControlIEC.cpp @@ -9,24 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "WindPlantIEC.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -WindPlantReactiveControlIEC::WindPlantReactiveControlIEC() : WindPlantIEC(nullptr) {}; -WindPlantReactiveControlIEC::~WindPlantReactiveControlIEC() {}; +WindPlantReactiveControlIEC::WindPlantReactiveControlIEC() : WindPlantIEC(nullptr) {} +WindPlantReactiveControlIEC::~WindPlantReactiveControlIEC() {} static const std::list PossibleProfilesForClass = { @@ -66,197 +53,210 @@ WindPlantReactiveControlIEC::getPossibleProfilesForAttributes() const return map; } +bool assign_WindPlantIEC_WindPlantReactiveControlIEC(BaseClass*, BaseClass*); +bool assign_WindPlantReactiveControlIEC_WindPlantIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + WindPlantIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindPlantIEC != element2) + { + element->WindPlantIEC = element2; + return assign_WindPlantIEC_WindPlantReactiveControlIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_WindPlantReactiveControlIEC_kiwpx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_kiwpx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kiwpx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_kpwpx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_kpwpx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpwpx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_kwpqu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_kwpqu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kwpqu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_mwppf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_mwppf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwppf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_mwpu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_mwpu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwpu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_twppfilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_twppfilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->twppfilt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_twpqfilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_twpqfilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->twpqfilt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_twpufilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_twpufilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->twpufilt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_txft(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_txft(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->txft; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_txfv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_txfv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->txfv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_uwpqdip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_uwpqdip(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uwpqdip; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_xrefmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_xrefmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xrefmax; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_WindPlantReactiveControlIEC_xrefmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->xrefmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindPlantIEC_WindPlantReactiveControlIEC(BaseClass*, BaseClass*); -bool assign_WindPlantReactiveControlIEC_WindPlantIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindPlantReactiveControlIEC_xrefmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); - WindPlantIEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindPlantIEC != element2) + buffer >> element->xrefmin; + if (!buffer.fail()) { - element->WindPlantIEC = element2; - return assign_WindPlantIEC_WindPlantReactiveControlIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_WindPlantReactiveControlIEC_kiwpx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kiwpx; if (!buffer.str().empty()) @@ -270,7 +270,8 @@ bool get_WindPlantReactiveControlIEC_kiwpx(const BaseClass* BaseClass_ptr1, std: bool get_WindPlantReactiveControlIEC_kpwpx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpwpx; if (!buffer.str().empty()) @@ -284,7 +285,8 @@ bool get_WindPlantReactiveControlIEC_kpwpx(const BaseClass* BaseClass_ptr1, std: bool get_WindPlantReactiveControlIEC_kwpqu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kwpqu; if (!buffer.str().empty()) @@ -298,7 +300,8 @@ bool get_WindPlantReactiveControlIEC_kwpqu(const BaseClass* BaseClass_ptr1, std: bool get_WindPlantReactiveControlIEC_mwppf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwppf; if (!buffer.str().empty()) @@ -312,7 +315,8 @@ bool get_WindPlantReactiveControlIEC_mwppf(const BaseClass* BaseClass_ptr1, std: bool get_WindPlantReactiveControlIEC_mwpu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwpu; if (!buffer.str().empty()) @@ -326,7 +330,8 @@ bool get_WindPlantReactiveControlIEC_mwpu(const BaseClass* BaseClass_ptr1, std:: bool get_WindPlantReactiveControlIEC_twppfilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twppfilt; if (!buffer.str().empty()) @@ -340,7 +345,8 @@ bool get_WindPlantReactiveControlIEC_twppfilt(const BaseClass* BaseClass_ptr1, s bool get_WindPlantReactiveControlIEC_twpqfilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twpqfilt; if (!buffer.str().empty()) @@ -354,7 +360,8 @@ bool get_WindPlantReactiveControlIEC_twpqfilt(const BaseClass* BaseClass_ptr1, s bool get_WindPlantReactiveControlIEC_twpufilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twpufilt; if (!buffer.str().empty()) @@ -368,7 +375,8 @@ bool get_WindPlantReactiveControlIEC_twpufilt(const BaseClass* BaseClass_ptr1, s bool get_WindPlantReactiveControlIEC_txft(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->txft; if (!buffer.str().empty()) @@ -382,7 +390,8 @@ bool get_WindPlantReactiveControlIEC_txft(const BaseClass* BaseClass_ptr1, std:: bool get_WindPlantReactiveControlIEC_txfv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->txfv; if (!buffer.str().empty()) @@ -396,7 +405,8 @@ bool get_WindPlantReactiveControlIEC_txfv(const BaseClass* BaseClass_ptr1, std:: bool get_WindPlantReactiveControlIEC_uwpqdip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uwpqdip; if (!buffer.str().empty()) @@ -410,7 +420,8 @@ bool get_WindPlantReactiveControlIEC_uwpqdip(const BaseClass* BaseClass_ptr1, st bool get_WindPlantReactiveControlIEC_xrefmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xrefmax; if (!buffer.str().empty()) @@ -424,7 +435,8 @@ bool get_WindPlantReactiveControlIEC_xrefmax(const BaseClass* BaseClass_ptr1, st bool get_WindPlantReactiveControlIEC_xrefmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xrefmin; if (!buffer.str().empty()) @@ -436,8 +448,6 @@ bool get_WindPlantReactiveControlIEC_xrefmin(const BaseClass* BaseClass_ptr1, st return false; } - - const char WindPlantReactiveControlIEC::debugName[] = "WindPlantReactiveControlIEC"; const char* WindPlantReactiveControlIEC::debugString() const { @@ -446,29 +456,29 @@ const char* WindPlantReactiveControlIEC::debugString() const void WindPlantReactiveControlIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC"), &WindPlantReactiveControlIEC_factory)); + factory_map.emplace("cim:WindPlantReactiveControlIEC", &WindPlantReactiveControlIEC_factory); } void WindPlantReactiveControlIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.kiwpx"), &assign_WindPlantReactiveControlIEC_kiwpx)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.kpwpx"), &assign_WindPlantReactiveControlIEC_kpwpx)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.kwpqu"), &assign_WindPlantReactiveControlIEC_kwpqu)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.mwppf"), &assign_WindPlantReactiveControlIEC_mwppf)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.mwpu"), &assign_WindPlantReactiveControlIEC_mwpu)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.twppfilt"), &assign_WindPlantReactiveControlIEC_twppfilt)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.twpqfilt"), &assign_WindPlantReactiveControlIEC_twpqfilt)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.twpufilt"), &assign_WindPlantReactiveControlIEC_twpufilt)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.txft"), &assign_WindPlantReactiveControlIEC_txft)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.txfv"), &assign_WindPlantReactiveControlIEC_txfv)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.uwpqdip"), &assign_WindPlantReactiveControlIEC_uwpqdip)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.xrefmax"), &assign_WindPlantReactiveControlIEC_xrefmax)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.xrefmin"), &assign_WindPlantReactiveControlIEC_xrefmin)); + assign_map.emplace("cim:WindPlantReactiveControlIEC.kiwpx", &assign_WindPlantReactiveControlIEC_kiwpx); + assign_map.emplace("cim:WindPlantReactiveControlIEC.kpwpx", &assign_WindPlantReactiveControlIEC_kpwpx); + assign_map.emplace("cim:WindPlantReactiveControlIEC.kwpqu", &assign_WindPlantReactiveControlIEC_kwpqu); + assign_map.emplace("cim:WindPlantReactiveControlIEC.mwppf", &assign_WindPlantReactiveControlIEC_mwppf); + assign_map.emplace("cim:WindPlantReactiveControlIEC.mwpu", &assign_WindPlantReactiveControlIEC_mwpu); + assign_map.emplace("cim:WindPlantReactiveControlIEC.twppfilt", &assign_WindPlantReactiveControlIEC_twppfilt); + assign_map.emplace("cim:WindPlantReactiveControlIEC.twpqfilt", &assign_WindPlantReactiveControlIEC_twpqfilt); + assign_map.emplace("cim:WindPlantReactiveControlIEC.twpufilt", &assign_WindPlantReactiveControlIEC_twpufilt); + assign_map.emplace("cim:WindPlantReactiveControlIEC.txft", &assign_WindPlantReactiveControlIEC_txft); + assign_map.emplace("cim:WindPlantReactiveControlIEC.txfv", &assign_WindPlantReactiveControlIEC_txfv); + assign_map.emplace("cim:WindPlantReactiveControlIEC.uwpqdip", &assign_WindPlantReactiveControlIEC_uwpqdip); + assign_map.emplace("cim:WindPlantReactiveControlIEC.xrefmax", &assign_WindPlantReactiveControlIEC_xrefmax); + assign_map.emplace("cim:WindPlantReactiveControlIEC.xrefmin", &assign_WindPlantReactiveControlIEC_xrefmin); } void WindPlantReactiveControlIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.WindPlantIEC"), &assign_WindPlantReactiveControlIEC_WindPlantIEC)); + assign_map.emplace("cim:WindPlantReactiveControlIEC.WindPlantIEC", &assign_WindPlantReactiveControlIEC_WindPlantIEC); } void WindPlantReactiveControlIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/WindPlantReactiveControlIEC.hpp b/CGMES_2.4.13_18DEC2013/WindPlantReactiveControlIEC.hpp index 963b7f804..fdcfe8416 100644 --- a/CGMES_2.4.13_18DEC2013/WindPlantReactiveControlIEC.hpp +++ b/CGMES_2.4.13_18DEC2013/WindPlantReactiveControlIEC.hpp @@ -21,9 +21,7 @@ namespace CIMPP { class WindPlantIEC; - /* - Simplified plant voltage and reactive power control model for use with type 3 and type 4 wind turbine models. Reference: IEC Standard 61400-27-1 Annex E. - */ + /** \brief Simplified plant voltage and reactive power control model for use with type 3 and type 4 wind turbine models. Reference: IEC Standard 61400-27-1 Annex E. */ class WindPlantReactiveControlIEC : public IdentifiedObject { public: @@ -31,20 +29,47 @@ namespace CIMPP WindPlantReactiveControlIEC(); ~WindPlantReactiveControlIEC() override; - CIMPP::WindPlantIEC* WindPlantIEC; /* Wind plant model with which this wind reactive control is associated. Default: 0 */ - CIMPP::Simple_Float kiwpx; /* Plant Q controller integral gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::Simple_Float kpwpx; /* Plant Q controller proportional gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kwpqu; /* Plant voltage control droop (). It is project dependent parameter. Default: nullptr */ - CIMPP::Boolean mwppf; /* Power factor control modes selector (). Used only if mwpu is set to false. true = 1: power factor control false = 0: reactive power control. It is project dependent parameter. Default: false */ - CIMPP::Boolean mwpu; /* Reactive power control modes selector (). true = 1: voltage control false = 0: reactive power control. It is project dependent parameter. Default: false */ - CIMPP::Seconds twppfilt; /* Filter time constant for active power measurement (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds twpqfilt; /* Filter time constant for reactive power measurement (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds twpufilt; /* Filter time constant for voltage measurement (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds txft; /* Lead time constant in reference value transfer function (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds txfv; /* Lag time constant in reference value transfer function (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU uwpqdip; /* Voltage threshold for LVRT detection in q control (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU xrefmax; /* Maximum ( or delta ) request from the plant controller (). It is project dependent parameter. Default: nullptr */ - CIMPP::PU xrefmin; /* Minimum ( or delta) request from the plant controller (). It is project dependent parameter. Default: nullptr */ + /** \brief Wind plant model with which this wind reactive control is associated. Default: 0 */ + CIMPP::WindPlantIEC* WindPlantIEC; + + /** \brief Plant Q controller integral gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::Simple_Float kiwpx; + + /** \brief Plant Q controller proportional gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::Simple_Float kpwpx; + + /** \brief Plant voltage control droop (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU kwpqu; + + /** \brief Power factor control modes selector (). Used only if mwpu is set to false. true = 1: power factor control false = 0: reactive power control. It is project dependent parameter. Default: false */ + CIMPP::Boolean mwppf; + + /** \brief Reactive power control modes selector (). true = 1: voltage control false = 0: reactive power control. It is project dependent parameter. Default: false */ + CIMPP::Boolean mwpu; + + /** \brief Filter time constant for active power measurement (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds twppfilt; + + /** \brief Filter time constant for reactive power measurement (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds twpqfilt; + + /** \brief Filter time constant for voltage measurement (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds twpufilt; + + /** \brief Lead time constant in reference value transfer function (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds txft; + + /** \brief Lag time constant in reference value transfer function (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds txfv; + + /** \brief Voltage threshold for LVRT detection in q control (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU uwpqdip; + + /** \brief Maximum ( or delta ) request from the plant controller (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU xrefmax; + + /** \brief Minimum ( or delta) request from the plant controller (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU xrefmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/WindPlantUserDefined.cpp b/CGMES_2.4.13_18DEC2013/WindPlantUserDefined.cpp index 8c93c7a24..549a06449 100644 --- a/CGMES_2.4.13_18DEC2013/WindPlantUserDefined.cpp +++ b/CGMES_2.4.13_18DEC2013/WindPlantUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -WindPlantUserDefined::WindPlantUserDefined() {}; -WindPlantUserDefined::~WindPlantUserDefined() {}; +WindPlantUserDefined::WindPlantUserDefined() {} +WindPlantUserDefined::~WindPlantUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ WindPlantUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindPlantUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindPlantUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_WindPlantUserDefined(BaseClass*, BaseClass*); bool assign_WindPlantUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_WindPlantUserDefined_ProprietaryParameterDynamics(BaseClass* BaseCla return false; } +bool assign_WindPlantUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + WindPlantUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_WindPlantUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_WindPlantUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std:: return false; } - - const char WindPlantUserDefined::debugName[] = "WindPlantUserDefined"; const char* WindPlantUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* WindPlantUserDefined::debugString() const void WindPlantUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindPlantUserDefined"), &WindPlantUserDefined_factory)); + factory_map.emplace("cim:WindPlantUserDefined", &WindPlantUserDefined_factory); } void WindPlantUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPlantUserDefined.proprietary"), &assign_WindPlantUserDefined_proprietary)); + assign_map.emplace("cim:WindPlantUserDefined.proprietary", &assign_WindPlantUserDefined_proprietary); } void WindPlantUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPlantUserDefined.ProprietaryParameterDynamics"), &assign_WindPlantUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:WindPlantUserDefined.ProprietaryParameterDynamics", &assign_WindPlantUserDefined_ProprietaryParameterDynamics); } void WindPlantUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/WindPlantUserDefined.hpp b/CGMES_2.4.13_18DEC2013/WindPlantUserDefined.hpp index 127fde57f..d64898dfb 100644 --- a/CGMES_2.4.13_18DEC2013/WindPlantUserDefined.hpp +++ b/CGMES_2.4.13_18DEC2013/WindPlantUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Wind plant function block whose dynamic behaviour is described by - */ + /** \brief Wind plant function block whose dynamic behaviour is described by */ class WindPlantUserDefined : public WindPlantDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP WindPlantUserDefined(); ~WindPlantUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/WindProtectionIEC.cpp b/CGMES_2.4.13_18DEC2013/WindProtectionIEC.cpp index 5f0532fb0..b9bcdc44e 100644 --- a/CGMES_2.4.13_18DEC2013/WindProtectionIEC.cpp +++ b/CGMES_2.4.13_18DEC2013/WindProtectionIEC.cpp @@ -10,19 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindTurbineType1or2IEC.hpp" #include "WindTurbineType3or4IEC.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -WindProtectionIEC::WindProtectionIEC() : WindTurbineType1or2IEC(nullptr), WindTurbineType3or4IEC(nullptr) {}; -WindProtectionIEC::~WindProtectionIEC() {}; +WindProtectionIEC::WindProtectionIEC() : WindTurbineType1or2IEC(nullptr), WindTurbineType3or4IEC(nullptr) {} +WindProtectionIEC::~WindProtectionIEC() {} static const std::list PossibleProfilesForClass = { @@ -58,148 +50,158 @@ WindProtectionIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindProtectionIEC_fover(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType1or2IEC_WindProtectionIEC(BaseClass*, BaseClass*); +bool assign_WindProtectionIEC_WindTurbineType1or2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType1or2IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->fover; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType1or2IEC != element2) + { + element->WindTurbineType1or2IEC = element2; + return assign_WindTurbineType1or2IEC_WindProtectionIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindProtectionIEC_funder(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType3or4IEC_WindProtectionIEC(BaseClass*, BaseClass*); +bool assign_WindProtectionIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType3or4IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->funder; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType3or4IEC != element2) + { + element->WindTurbineType3or4IEC = element2; + return assign_WindTurbineType3or4IEC_WindProtectionIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindProtectionIEC_tfover(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindProtectionIEC_fover(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tfover; - if (buffer.fail()) - return false; - else + buffer >> element->fover; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindProtectionIEC_tfunder(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindProtectionIEC_funder(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tfunder; - if (buffer.fail()) - return false; - else + buffer >> element->funder; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindProtectionIEC_tuover(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindProtectionIEC_tfover(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tuover; - if (buffer.fail()) - return false; - else + buffer >> element->tfover; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindProtectionIEC_tuunder(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindProtectionIEC_tfunder(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tuunder; - if (buffer.fail()) - return false; - else + buffer >> element->tfunder; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindProtectionIEC_uover(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindProtectionIEC_tuover(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->uover; - if (buffer.fail()) - return false; - else + buffer >> element->tuover; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindProtectionIEC_uunder(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindProtectionIEC_tuunder(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->uunder; - if (buffer.fail()) - return false; - else + buffer >> element->tuunder; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindTurbineType1or2IEC_WindProtectionIEC(BaseClass*, BaseClass*); -bool assign_WindProtectionIEC_WindTurbineType1or2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindProtectionIEC_uover(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType1or2IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType1or2IEC != element2) + buffer >> element->uover; + if (!buffer.fail()) { - element->WindTurbineType1or2IEC = element2; - return assign_WindTurbineType1or2IEC_WindProtectionIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_WindTurbineType3or4IEC_WindProtectionIEC(BaseClass*, BaseClass*); -bool assign_WindProtectionIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_WindProtectionIEC_uunder(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType3or4IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType3or4IEC != element2) + buffer >> element->uunder; + if (!buffer.fail()) { - element->WindTurbineType3or4IEC = element2; - return assign_WindTurbineType3or4IEC_WindProtectionIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + + bool get_WindProtectionIEC_fover(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fover; if (!buffer.str().empty()) @@ -213,7 +215,8 @@ bool get_WindProtectionIEC_fover(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindProtectionIEC_funder(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->funder; if (!buffer.str().empty()) @@ -227,7 +230,8 @@ bool get_WindProtectionIEC_funder(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindProtectionIEC_tfover(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tfover; if (!buffer.str().empty()) @@ -241,7 +245,8 @@ bool get_WindProtectionIEC_tfover(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindProtectionIEC_tfunder(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tfunder; if (!buffer.str().empty()) @@ -255,7 +260,8 @@ bool get_WindProtectionIEC_tfunder(const BaseClass* BaseClass_ptr1, std::strings bool get_WindProtectionIEC_tuover(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tuover; if (!buffer.str().empty()) @@ -269,7 +275,8 @@ bool get_WindProtectionIEC_tuover(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindProtectionIEC_tuunder(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tuunder; if (!buffer.str().empty()) @@ -283,7 +290,8 @@ bool get_WindProtectionIEC_tuunder(const BaseClass* BaseClass_ptr1, std::strings bool get_WindProtectionIEC_uover(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uover; if (!buffer.str().empty()) @@ -297,7 +305,8 @@ bool get_WindProtectionIEC_uover(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindProtectionIEC_uunder(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uunder; if (!buffer.str().empty()) @@ -309,8 +318,6 @@ bool get_WindProtectionIEC_uunder(const BaseClass* BaseClass_ptr1, std::stringst return false; } - - const char WindProtectionIEC::debugName[] = "WindProtectionIEC"; const char* WindProtectionIEC::debugString() const { @@ -319,25 +326,25 @@ const char* WindProtectionIEC::debugString() const void WindProtectionIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindProtectionIEC"), &WindProtectionIEC_factory)); + factory_map.emplace("cim:WindProtectionIEC", &WindProtectionIEC_factory); } void WindProtectionIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.fover"), &assign_WindProtectionIEC_fover)); - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.funder"), &assign_WindProtectionIEC_funder)); - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.tfover"), &assign_WindProtectionIEC_tfover)); - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.tfunder"), &assign_WindProtectionIEC_tfunder)); - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.tuover"), &assign_WindProtectionIEC_tuover)); - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.tuunder"), &assign_WindProtectionIEC_tuunder)); - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.uover"), &assign_WindProtectionIEC_uover)); - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.uunder"), &assign_WindProtectionIEC_uunder)); + assign_map.emplace("cim:WindProtectionIEC.fover", &assign_WindProtectionIEC_fover); + assign_map.emplace("cim:WindProtectionIEC.funder", &assign_WindProtectionIEC_funder); + assign_map.emplace("cim:WindProtectionIEC.tfover", &assign_WindProtectionIEC_tfover); + assign_map.emplace("cim:WindProtectionIEC.tfunder", &assign_WindProtectionIEC_tfunder); + assign_map.emplace("cim:WindProtectionIEC.tuover", &assign_WindProtectionIEC_tuover); + assign_map.emplace("cim:WindProtectionIEC.tuunder", &assign_WindProtectionIEC_tuunder); + assign_map.emplace("cim:WindProtectionIEC.uover", &assign_WindProtectionIEC_uover); + assign_map.emplace("cim:WindProtectionIEC.uunder", &assign_WindProtectionIEC_uunder); } void WindProtectionIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.WindTurbineType1or2IEC"), &assign_WindProtectionIEC_WindTurbineType1or2IEC)); - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.WindTurbineType3or4IEC"), &assign_WindProtectionIEC_WindTurbineType3or4IEC)); + assign_map.emplace("cim:WindProtectionIEC.WindTurbineType1or2IEC", &assign_WindProtectionIEC_WindTurbineType1or2IEC); + assign_map.emplace("cim:WindProtectionIEC.WindTurbineType3or4IEC", &assign_WindProtectionIEC_WindTurbineType3or4IEC); } void WindProtectionIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/WindProtectionIEC.hpp b/CGMES_2.4.13_18DEC2013/WindProtectionIEC.hpp index bcc203c4d..38c2e8b1a 100644 --- a/CGMES_2.4.13_18DEC2013/WindProtectionIEC.hpp +++ b/CGMES_2.4.13_18DEC2013/WindProtectionIEC.hpp @@ -20,9 +20,7 @@ namespace CIMPP class WindTurbineType1or2IEC; class WindTurbineType3or4IEC; - /* - The grid protection model includes protection against over and under voltage, and against over and under frequency. Reference: IEC Standard 614000-27-1 Section 6.6.6. - */ + /** \brief The grid protection model includes protection against over and under voltage, and against over and under frequency. Reference: IEC Standard 614000-27-1 Section 6.6.6. */ class WindProtectionIEC : public IdentifiedObject { public: @@ -30,16 +28,35 @@ namespace CIMPP WindProtectionIEC(); ~WindProtectionIEC() override; - CIMPP::WindTurbineType1or2IEC* WindTurbineType1or2IEC; /* Wind generator type 1 or 2 model with which this wind turbine protection model is associated. Default: 0 */ - CIMPP::WindTurbineType3or4IEC* WindTurbineType3or4IEC; /* Wind generator type 3 or 4 model with which this wind turbine protection model is associated. Default: 0 */ - CIMPP::PU fover; /* Set of wind turbine over frequency protection levels (). It is project dependent parameter. Default: nullptr */ - CIMPP::PU funder; /* Set of wind turbine under frequency protection levels (). It is project dependent parameter. Default: nullptr */ - CIMPP::Seconds tfover; /* Set of corresponding wind turbine over frequency protection disconnection times (). It is project dependent parameter. Default: nullptr */ - CIMPP::Seconds tfunder; /* Set of corresponding wind turbine under frequency protection disconnection times (). It is project dependent parameter. Default: nullptr */ - CIMPP::Seconds tuover; /* Set of corresponding wind turbine over voltage protection disconnection times (). It is project dependent parameter. Default: nullptr */ - CIMPP::Seconds tuunder; /* Set of corresponding wind turbine under voltage protection disconnection times (). It is project dependent parameter. Default: nullptr */ - CIMPP::PU uover; /* Set of wind turbine over voltage protection levels (). It is project dependent parameter. Default: nullptr */ - CIMPP::PU uunder; /* Set of wind turbine under voltage protection levels (). It is project dependent parameter. Default: nullptr */ + /** \brief Wind generator type 1 or 2 model with which this wind turbine protection model is associated. Default: 0 */ + CIMPP::WindTurbineType1or2IEC* WindTurbineType1or2IEC; + + /** \brief Wind generator type 3 or 4 model with which this wind turbine protection model is associated. Default: 0 */ + CIMPP::WindTurbineType3or4IEC* WindTurbineType3or4IEC; + + /** \brief Set of wind turbine over frequency protection levels (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU fover; + + /** \brief Set of wind turbine under frequency protection levels (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU funder; + + /** \brief Set of corresponding wind turbine over frequency protection disconnection times (). It is project dependent parameter. Default: nullptr */ + CIMPP::Seconds tfover; + + /** \brief Set of corresponding wind turbine under frequency protection disconnection times (). It is project dependent parameter. Default: nullptr */ + CIMPP::Seconds tfunder; + + /** \brief Set of corresponding wind turbine over voltage protection disconnection times (). It is project dependent parameter. Default: nullptr */ + CIMPP::Seconds tuover; + + /** \brief Set of corresponding wind turbine under voltage protection disconnection times (). It is project dependent parameter. Default: nullptr */ + CIMPP::Seconds tuunder; + + /** \brief Set of wind turbine over voltage protection levels (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU uover; + + /** \brief Set of wind turbine under voltage protection levels (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU uunder; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/WindQcontrolModesKind.cpp b/CGMES_2.4.13_18DEC2013/WindQcontrolModesKind.cpp index b5c887e96..3e9f617b5 100644 --- a/CGMES_2.4.13_18DEC2013/WindQcontrolModesKind.cpp +++ b/CGMES_2.4.13_18DEC2013/WindQcontrolModesKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "WindQcontrolModesKind") + if (EnumSymbol.substr(0, pos) != "WindQcontrolModesKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,22 +50,22 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "voltage") + if (EnumSymbol == "voltage") { rop = WindQcontrolModesKind::voltage; return lop; } - if(EnumSymbol == "reactivePower") + if (EnumSymbol == "reactivePower") { rop = WindQcontrolModesKind::reactivePower; return lop; } - if(EnumSymbol == "openLoopReactivePower") + if (EnumSymbol == "openLoopReactivePower") { rop = WindQcontrolModesKind::openLoopReactivePower; return lop; } - if(EnumSymbol == "powerFactor") + if (EnumSymbol == "powerFactor") { rop = WindQcontrolModesKind::powerFactor; return lop; diff --git a/CGMES_2.4.13_18DEC2013/WindQcontrolModesKind.hpp b/CGMES_2.4.13_18DEC2013/WindQcontrolModesKind.hpp index 770a20720..de75bba95 100644 --- a/CGMES_2.4.13_18DEC2013/WindQcontrolModesKind.hpp +++ b/CGMES_2.4.13_18DEC2013/WindQcontrolModesKind.hpp @@ -9,29 +9,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - General wind turbine Q control modes . - */ + /** \brief General wind turbine Q control modes . */ class WindQcontrolModesKind { public: enum WindQcontrolModesKind_ENUM { - /** - * Voltage control (). - */ + /** Voltage control (). */ voltage, - /** - * Reactive power control (). - */ + /** Reactive power control (). */ reactivePower, - /** - * Open loop reactive power control (only used with closed loop at plant level) (). - */ + /** Open loop reactive power control (only used with closed loop at plant level) (). */ openLoopReactivePower, - /** - * Power factor control (). - */ + /** Power factor control (). */ powerFactor, }; diff --git a/CGMES_2.4.13_18DEC2013/WindTurbineType1or2Dynamics.cpp b/CGMES_2.4.13_18DEC2013/WindTurbineType1or2Dynamics.cpp index 0b1deb098..2d438018b 100644 --- a/CGMES_2.4.13_18DEC2013/WindTurbineType1or2Dynamics.cpp +++ b/CGMES_2.4.13_18DEC2013/WindTurbineType1or2Dynamics.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindTurbineType1or2Dynamics::WindTurbineType1or2Dynamics() : AsynchronousMachineDynamics(nullptr), RemoteInputSignal(nullptr) {}; -WindTurbineType1or2Dynamics::~WindTurbineType1or2Dynamics() {}; +WindTurbineType1or2Dynamics::WindTurbineType1or2Dynamics() : AsynchronousMachineDynamics(nullptr), RemoteInputSignal(nullptr) {} +WindTurbineType1or2Dynamics::~WindTurbineType1or2Dynamics() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ WindTurbineType1or2Dynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_AsynchronousMachineDynamics_WindTurbineType1or2Dynamics(BaseClass*, BaseClass*); bool assign_WindTurbineType1or2Dynamics_AsynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_WindTurbineType1or2Dynamics_AsynchronousMachineDynamics(BaseClass* B } return false; } + bool assign_RemoteInputSignal_WindTurbineType1or2Dynamics(BaseClass*, BaseClass*); bool assign_WindTurbineType1or2Dynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_WindTurbineType1or2Dynamics_RemoteInputSignal(BaseClass* BaseClass_p return false; } - bool get_WindTurbineType1or2Dynamics_AsynchronousMachineDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType1or2Dynamics* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType1or2Dynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->AsynchronousMachineDynamics != 0) { @@ -93,7 +92,8 @@ bool get_WindTurbineType1or2Dynamics_AsynchronousMachineDynamics(const BaseClass bool get_WindTurbineType1or2Dynamics_RemoteInputSignal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType1or2Dynamics* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType1or2Dynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->RemoteInputSignal != 0) { @@ -104,7 +104,6 @@ bool get_WindTurbineType1or2Dynamics_RemoteInputSignal(const BaseClass* BaseClas return false; } - const char WindTurbineType1or2Dynamics::debugName[] = "WindTurbineType1or2Dynamics"; const char* WindTurbineType1or2Dynamics::debugString() const { @@ -113,7 +112,7 @@ const char* WindTurbineType1or2Dynamics::debugString() const void WindTurbineType1or2Dynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindTurbineType1or2Dynamics"), &WindTurbineType1or2Dynamics_factory)); + factory_map.emplace("cim:WindTurbineType1or2Dynamics", &WindTurbineType1or2Dynamics_factory); } void WindTurbineType1or2Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void WindTurbineType1or2Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map< void WindTurbineType1or2Dynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType1or2Dynamics.AsynchronousMachineDynamics"), &assign_WindTurbineType1or2Dynamics_AsynchronousMachineDynamics)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType1or2Dynamics.RemoteInputSignal"), &assign_WindTurbineType1or2Dynamics_RemoteInputSignal)); + assign_map.emplace("cim:WindTurbineType1or2Dynamics.AsynchronousMachineDynamics", &assign_WindTurbineType1or2Dynamics_AsynchronousMachineDynamics); + assign_map.emplace("cim:WindTurbineType1or2Dynamics.RemoteInputSignal", &assign_WindTurbineType1or2Dynamics_RemoteInputSignal); } void WindTurbineType1or2Dynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/WindTurbineType1or2Dynamics.hpp b/CGMES_2.4.13_18DEC2013/WindTurbineType1or2Dynamics.hpp index 00bfc307a..9cd8ce493 100644 --- a/CGMES_2.4.13_18DEC2013/WindTurbineType1or2Dynamics.hpp +++ b/CGMES_2.4.13_18DEC2013/WindTurbineType1or2Dynamics.hpp @@ -18,9 +18,7 @@ namespace CIMPP class AsynchronousMachineDynamics; class RemoteInputSignal; - /* - Parent class supporting relationships to wind turbines Type 1 and 2 and their control models. - */ + /** \brief Parent class supporting relationships to wind turbines Type 1 and 2 and their control models. */ class WindTurbineType1or2Dynamics : public DynamicsFunctionBlock { public: @@ -28,8 +26,11 @@ namespace CIMPP WindTurbineType1or2Dynamics(); ~WindTurbineType1or2Dynamics() override; - CIMPP::AsynchronousMachineDynamics* AsynchronousMachineDynamics; /* Asynchronous machine model with which this wind generator type 1 or 2 model is associated. Default: 0 */ - CIMPP::RemoteInputSignal* RemoteInputSignal; /* Remote input signal used by this wind generator Type 1 or Type 2 model. Default: 0 */ + /** \brief Asynchronous machine model with which this wind generator type 1 or 2 model is associated. Default: 0 */ + CIMPP::AsynchronousMachineDynamics* AsynchronousMachineDynamics; + + /** \brief Remote input signal used by this wind generator Type 1 or Type 2 model. Default: 0 */ + CIMPP::RemoteInputSignal* RemoteInputSignal; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/WindTurbineType1or2IEC.cpp b/CGMES_2.4.13_18DEC2013/WindTurbineType1or2IEC.cpp index f27dc7912..251c07766 100644 --- a/CGMES_2.4.13_18DEC2013/WindTurbineType1or2IEC.cpp +++ b/CGMES_2.4.13_18DEC2013/WindTurbineType1or2IEC.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindTurbineType1or2IEC::WindTurbineType1or2IEC() : WindMechIEC(nullptr), WindProtectionIEC(nullptr) {}; -WindTurbineType1or2IEC::~WindTurbineType1or2IEC() {}; +WindTurbineType1or2IEC::WindTurbineType1or2IEC() : WindMechIEC(nullptr), WindProtectionIEC(nullptr) {} +WindTurbineType1or2IEC::~WindTurbineType1or2IEC() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ WindTurbineType1or2IEC::getPossibleProfilesForAttributes() const return map; } - - bool assign_WindMechIEC_WindTurbineType1or2IEC(BaseClass*, BaseClass*); bool assign_WindTurbineType1or2IEC_WindMechIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_WindTurbineType1or2IEC_WindMechIEC(BaseClass* BaseClass_ptr1, BaseCl } return false; } + bool assign_WindProtectionIEC_WindTurbineType1or2IEC(BaseClass*, BaseClass*); bool assign_WindTurbineType1or2IEC_WindProtectionIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_WindTurbineType1or2IEC_WindProtectionIEC(BaseClass* BaseClass_ptr1, return false; } - bool get_WindTurbineType1or2IEC_WindMechIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType1or2IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType1or2IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindMechIEC != 0) { @@ -93,7 +92,8 @@ bool get_WindTurbineType1or2IEC_WindMechIEC(const BaseClass* BaseClass_ptr1, std bool get_WindTurbineType1or2IEC_WindProtectionIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType1or2IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType1or2IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindProtectionIEC != 0) { @@ -104,7 +104,6 @@ bool get_WindTurbineType1or2IEC_WindProtectionIEC(const BaseClass* BaseClass_ptr return false; } - const char WindTurbineType1or2IEC::debugName[] = "WindTurbineType1or2IEC"; const char* WindTurbineType1or2IEC::debugString() const { @@ -113,7 +112,7 @@ const char* WindTurbineType1or2IEC::debugString() const void WindTurbineType1or2IEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindTurbineType1or2IEC"), &WindTurbineType1or2IEC_factory)); + factory_map.emplace("cim:WindTurbineType1or2IEC", &WindTurbineType1or2IEC_factory); } void WindTurbineType1or2IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void WindTurbineType1or2IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType1or2IEC.WindMechIEC"), &assign_WindTurbineType1or2IEC_WindMechIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType1or2IEC.WindProtectionIEC"), &assign_WindTurbineType1or2IEC_WindProtectionIEC)); + assign_map.emplace("cim:WindTurbineType1or2IEC.WindMechIEC", &assign_WindTurbineType1or2IEC_WindMechIEC); + assign_map.emplace("cim:WindTurbineType1or2IEC.WindProtectionIEC", &assign_WindTurbineType1or2IEC_WindProtectionIEC); } void WindTurbineType1or2IEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/WindTurbineType1or2IEC.hpp b/CGMES_2.4.13_18DEC2013/WindTurbineType1or2IEC.hpp index e120fa228..909b188a3 100644 --- a/CGMES_2.4.13_18DEC2013/WindTurbineType1or2IEC.hpp +++ b/CGMES_2.4.13_18DEC2013/WindTurbineType1or2IEC.hpp @@ -18,9 +18,7 @@ namespace CIMPP class WindMechIEC; class WindProtectionIEC; - /* - Generator model for wind turbine of IEC Type 1 or Type 2 is a standard asynchronous generator model. Reference: IEC Standard 614000-27-1 Section 6.6.3.1. - */ + /** \brief Generator model for wind turbine of IEC Type 1 or Type 2 is a standard asynchronous generator model. Reference: IEC Standard 614000-27-1 Section 6.6.3.1. */ class WindTurbineType1or2IEC : public WindTurbineType1or2Dynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP WindTurbineType1or2IEC(); ~WindTurbineType1or2IEC() override; - CIMPP::WindMechIEC* WindMechIEC; /* Wind mechanical model associated with this wind generator type 1 or 2 model. Default: 0 */ - CIMPP::WindProtectionIEC* WindProtectionIEC; /* Wind turbune protection model associated with this wind generator type 1 or 2 model. Default: 0 */ + /** \brief Wind mechanical model associated with this wind generator type 1 or 2 model. Default: 0 */ + CIMPP::WindMechIEC* WindMechIEC; + + /** \brief Wind turbune protection model associated with this wind generator type 1 or 2 model. Default: 0 */ + CIMPP::WindProtectionIEC* WindProtectionIEC; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/WindTurbineType3or4Dynamics.cpp b/CGMES_2.4.13_18DEC2013/WindTurbineType3or4Dynamics.cpp index a33613f66..921087b71 100644 --- a/CGMES_2.4.13_18DEC2013/WindTurbineType3or4Dynamics.cpp +++ b/CGMES_2.4.13_18DEC2013/WindTurbineType3or4Dynamics.cpp @@ -14,8 +14,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindTurbineType3or4Dynamics::WindTurbineType3or4Dynamics() : EnergySource(nullptr), RemoteInputSignal(nullptr), WindPlantDynamics(nullptr) {}; -WindTurbineType3or4Dynamics::~WindTurbineType3or4Dynamics() {}; +WindTurbineType3or4Dynamics::WindTurbineType3or4Dynamics() : EnergySource(nullptr), RemoteInputSignal(nullptr), WindPlantDynamics(nullptr) {} +WindTurbineType3or4Dynamics::~WindTurbineType3or4Dynamics() {} static const std::list PossibleProfilesForClass = { @@ -44,8 +44,6 @@ WindTurbineType3or4Dynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_EnergySource_WindTurbineType3or4Dynamics(BaseClass*, BaseClass*); bool assign_WindTurbineType3or4Dynamics_EnergySource(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -62,6 +60,7 @@ bool assign_WindTurbineType3or4Dynamics_EnergySource(BaseClass* BaseClass_ptr1, } return false; } + bool assign_RemoteInputSignal_WindTurbineType3or4Dynamics(BaseClass*, BaseClass*); bool assign_WindTurbineType3or4Dynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -78,6 +77,7 @@ bool assign_WindTurbineType3or4Dynamics_RemoteInputSignal(BaseClass* BaseClass_p } return false; } + bool assign_WindPlantDynamics_WindTurbineType3or4Dynamics(BaseClass*, BaseClass*); bool assign_WindTurbineType3or4Dynamics_WindPlantDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -95,10 +95,10 @@ bool assign_WindTurbineType3or4Dynamics_WindPlantDynamics(BaseClass* BaseClass_p return false; } - bool get_WindTurbineType3or4Dynamics_EnergySource(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType3or4Dynamics* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType3or4Dynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->EnergySource != 0) { @@ -111,7 +111,8 @@ bool get_WindTurbineType3or4Dynamics_EnergySource(const BaseClass* BaseClass_ptr bool get_WindTurbineType3or4Dynamics_RemoteInputSignal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType3or4Dynamics* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType3or4Dynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->RemoteInputSignal != 0) { @@ -124,7 +125,8 @@ bool get_WindTurbineType3or4Dynamics_RemoteInputSignal(const BaseClass* BaseClas bool get_WindTurbineType3or4Dynamics_WindPlantDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType3or4Dynamics* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType3or4Dynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindPlantDynamics != 0) { @@ -135,7 +137,6 @@ bool get_WindTurbineType3or4Dynamics_WindPlantDynamics(const BaseClass* BaseClas return false; } - const char WindTurbineType3or4Dynamics::debugName[] = "WindTurbineType3or4Dynamics"; const char* WindTurbineType3or4Dynamics::debugString() const { @@ -144,7 +145,7 @@ const char* WindTurbineType3or4Dynamics::debugString() const void WindTurbineType3or4Dynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4Dynamics"), &WindTurbineType3or4Dynamics_factory)); + factory_map.emplace("cim:WindTurbineType3or4Dynamics", &WindTurbineType3or4Dynamics_factory); } void WindTurbineType3or4Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -153,9 +154,9 @@ void WindTurbineType3or4Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map< void WindTurbineType3or4Dynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4Dynamics.EnergySource"), &assign_WindTurbineType3or4Dynamics_EnergySource)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4Dynamics.RemoteInputSignal"), &assign_WindTurbineType3or4Dynamics_RemoteInputSignal)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4Dynamics.WindPlantDynamics"), &assign_WindTurbineType3or4Dynamics_WindPlantDynamics)); + assign_map.emplace("cim:WindTurbineType3or4Dynamics.EnergySource", &assign_WindTurbineType3or4Dynamics_EnergySource); + assign_map.emplace("cim:WindTurbineType3or4Dynamics.RemoteInputSignal", &assign_WindTurbineType3or4Dynamics_RemoteInputSignal); + assign_map.emplace("cim:WindTurbineType3or4Dynamics.WindPlantDynamics", &assign_WindTurbineType3or4Dynamics_WindPlantDynamics); } void WindTurbineType3or4Dynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/WindTurbineType3or4Dynamics.hpp b/CGMES_2.4.13_18DEC2013/WindTurbineType3or4Dynamics.hpp index 581bfb43b..9c123fe1d 100644 --- a/CGMES_2.4.13_18DEC2013/WindTurbineType3or4Dynamics.hpp +++ b/CGMES_2.4.13_18DEC2013/WindTurbineType3or4Dynamics.hpp @@ -19,9 +19,7 @@ namespace CIMPP class RemoteInputSignal; class WindPlantDynamics; - /* - Parent class supporting relationships to wind turbines Type 3 and 4 and wind plant including their control models. - */ + /** \brief Parent class supporting relationships to wind turbines Type 3 and 4 and wind plant including their control models. */ class WindTurbineType3or4Dynamics : public DynamicsFunctionBlock { public: @@ -29,9 +27,14 @@ namespace CIMPP WindTurbineType3or4Dynamics(); ~WindTurbineType3or4Dynamics() override; - CIMPP::EnergySource* EnergySource; /* Energy Source (current source) with which this wind Type 3 or 4 dynamics model is asoociated. Default: 0 */ - CIMPP::RemoteInputSignal* RemoteInputSignal; /* Wind turbine Type 3 or 4 models using this remote input signal. Default: 0 */ - CIMPP::WindPlantDynamics* WindPlantDynamics; /* The wind plant with which the wind turbines type 3 or 4 are associated. Default: 0 */ + /** \brief Energy Source (current source) with which this wind Type 3 or 4 dynamics model is asoociated. Default: 0 */ + CIMPP::EnergySource* EnergySource; + + /** \brief Wind turbine Type 3 or 4 models using this remote input signal. Default: 0 */ + CIMPP::RemoteInputSignal* RemoteInputSignal; + + /** \brief The wind plant with which the wind turbines type 3 or 4 are associated. Default: 0 */ + CIMPP::WindPlantDynamics* WindPlantDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/WindTurbineType3or4IEC.cpp b/CGMES_2.4.13_18DEC2013/WindTurbineType3or4IEC.cpp index 2d1dd0fc6..7dd415768 100644 --- a/CGMES_2.4.13_18DEC2013/WindTurbineType3or4IEC.cpp +++ b/CGMES_2.4.13_18DEC2013/WindTurbineType3or4IEC.cpp @@ -8,14 +8,14 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "WindContQIEC.hpp" #include "WindContCurrLimIEC.hpp" +#include "WindContQIEC.hpp" #include "WindProtectionIEC.hpp" using namespace CIMPP; -WindTurbineType3or4IEC::WindTurbineType3or4IEC() : WIndContQIEC(nullptr), WindContCurrLimIEC(nullptr), WindProtectionIEC(nullptr) {}; -WindTurbineType3or4IEC::~WindTurbineType3or4IEC() {}; +WindTurbineType3or4IEC::WindTurbineType3or4IEC() : WIndContQIEC(nullptr), WindContCurrLimIEC(nullptr), WindProtectionIEC(nullptr) {} +WindTurbineType3or4IEC::~WindTurbineType3or4IEC() {} static const std::list PossibleProfilesForClass = { @@ -44,8 +44,6 @@ WindTurbineType3or4IEC::getPossibleProfilesForAttributes() const return map; } - - bool assign_WindContQIEC_WindTurbineType3or4IEC(BaseClass*, BaseClass*); bool assign_WindTurbineType3or4IEC_WIndContQIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -62,6 +60,7 @@ bool assign_WindTurbineType3or4IEC_WIndContQIEC(BaseClass* BaseClass_ptr1, BaseC } return false; } + bool assign_WindContCurrLimIEC_WindTurbineType3or4IEC(BaseClass*, BaseClass*); bool assign_WindTurbineType3or4IEC_WindContCurrLimIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -78,6 +77,7 @@ bool assign_WindTurbineType3or4IEC_WindContCurrLimIEC(BaseClass* BaseClass_ptr1, } return false; } + bool assign_WindProtectionIEC_WindTurbineType3or4IEC(BaseClass*, BaseClass*); bool assign_WindTurbineType3or4IEC_WindProtectionIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -95,10 +95,10 @@ bool assign_WindTurbineType3or4IEC_WindProtectionIEC(BaseClass* BaseClass_ptr1, return false; } - bool get_WindTurbineType3or4IEC_WIndContQIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WIndContQIEC != 0) { @@ -111,7 +111,8 @@ bool get_WindTurbineType3or4IEC_WIndContQIEC(const BaseClass* BaseClass_ptr1, st bool get_WindTurbineType3or4IEC_WindContCurrLimIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContCurrLimIEC != 0) { @@ -124,7 +125,8 @@ bool get_WindTurbineType3or4IEC_WindContCurrLimIEC(const BaseClass* BaseClass_pt bool get_WindTurbineType3or4IEC_WindProtectionIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindProtectionIEC != 0) { @@ -135,7 +137,6 @@ bool get_WindTurbineType3or4IEC_WindProtectionIEC(const BaseClass* BaseClass_ptr return false; } - const char WindTurbineType3or4IEC::debugName[] = "WindTurbineType3or4IEC"; const char* WindTurbineType3or4IEC::debugString() const { @@ -144,7 +145,7 @@ const char* WindTurbineType3or4IEC::debugString() const void WindTurbineType3or4IEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4IEC"), &WindTurbineType3or4IEC_factory)); + factory_map.emplace("cim:WindTurbineType3or4IEC", &WindTurbineType3or4IEC_factory); } void WindTurbineType3or4IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -153,9 +154,9 @@ void WindTurbineType3or4IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4IEC.WIndContQIEC"), &assign_WindTurbineType3or4IEC_WIndContQIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4IEC.WindContCurrLimIEC"), &assign_WindTurbineType3or4IEC_WindContCurrLimIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4IEC.WindProtectionIEC"), &assign_WindTurbineType3or4IEC_WindProtectionIEC)); + assign_map.emplace("cim:WindTurbineType3or4IEC.WIndContQIEC", &assign_WindTurbineType3or4IEC_WIndContQIEC); + assign_map.emplace("cim:WindTurbineType3or4IEC.WindContCurrLimIEC", &assign_WindTurbineType3or4IEC_WindContCurrLimIEC); + assign_map.emplace("cim:WindTurbineType3or4IEC.WindProtectionIEC", &assign_WindTurbineType3or4IEC_WindProtectionIEC); } void WindTurbineType3or4IEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/WindTurbineType3or4IEC.hpp b/CGMES_2.4.13_18DEC2013/WindTurbineType3or4IEC.hpp index 3808a1eae..8246ead01 100644 --- a/CGMES_2.4.13_18DEC2013/WindTurbineType3or4IEC.hpp +++ b/CGMES_2.4.13_18DEC2013/WindTurbineType3or4IEC.hpp @@ -19,9 +19,7 @@ namespace CIMPP class WindContQIEC; class WindProtectionIEC; - /* - Parent class supporting relationships to IEC wind turbines Type 3 and 4 and wind plant including their control models. - */ + /** \brief Parent class supporting relationships to IEC wind turbines Type 3 and 4 and wind plant including their control models. */ class WindTurbineType3or4IEC : public WindTurbineType3or4Dynamics { public: @@ -29,9 +27,14 @@ namespace CIMPP WindTurbineType3or4IEC(); ~WindTurbineType3or4IEC() override; - CIMPP::WindContQIEC* WIndContQIEC; /* Wind control Q model associated with this wind turbine type 3 or 4 model. Default: 0 */ - CIMPP::WindContCurrLimIEC* WindContCurrLimIEC; /* Wind control current limitation model associated with this wind turbine type 3 or 4 model. Default: 0 */ - CIMPP::WindProtectionIEC* WindProtectionIEC; /* Wind turbune protection model associated with this wind generator type 3 or 4 model. Default: 0 */ + /** \brief Wind control Q model associated with this wind turbine type 3 or 4 model. Default: 0 */ + CIMPP::WindContQIEC* WIndContQIEC; + + /** \brief Wind control current limitation model associated with this wind turbine type 3 or 4 model. Default: 0 */ + CIMPP::WindContCurrLimIEC* WindContCurrLimIEC; + + /** \brief Wind turbune protection model associated with this wind generator type 3 or 4 model. Default: 0 */ + CIMPP::WindProtectionIEC* WindProtectionIEC; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/WindTurbineType4aIEC.cpp b/CGMES_2.4.13_18DEC2013/WindTurbineType4aIEC.cpp index f1170dc4c..19a53dd03 100644 --- a/CGMES_2.4.13_18DEC2013/WindTurbineType4aIEC.cpp +++ b/CGMES_2.4.13_18DEC2013/WindTurbineType4aIEC.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindTurbineType4aIEC::WindTurbineType4aIEC() : WindContPType4aIEC(nullptr) {}; -WindTurbineType4aIEC::~WindTurbineType4aIEC() {}; +WindTurbineType4aIEC::WindTurbineType4aIEC() : WindContPType4aIEC(nullptr) {} +WindTurbineType4aIEC::~WindTurbineType4aIEC() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ WindTurbineType4aIEC::getPossibleProfilesForAttributes() const return map; } - - bool assign_WindContPType4aIEC_WindTurbineType4aIEC(BaseClass*, BaseClass*); bool assign_WindTurbineType4aIEC_WindContPType4aIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_WindTurbineType4aIEC_WindContPType4aIEC(BaseClass* BaseClass_ptr1, B return false; } - bool get_WindTurbineType4aIEC_WindContPType4aIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType4aIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType4aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContPType4aIEC != 0) { @@ -73,7 +71,6 @@ bool get_WindTurbineType4aIEC_WindContPType4aIEC(const BaseClass* BaseClass_ptr1 return false; } - const char WindTurbineType4aIEC::debugName[] = "WindTurbineType4aIEC"; const char* WindTurbineType4aIEC::debugString() const { @@ -82,7 +79,7 @@ const char* WindTurbineType4aIEC::debugString() const void WindTurbineType4aIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindTurbineType4aIEC"), &WindTurbineType4aIEC_factory)); + factory_map.emplace("cim:WindTurbineType4aIEC", &WindTurbineType4aIEC_factory); } void WindTurbineType4aIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void WindTurbineType4aIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType4aIEC.WindContPType4aIEC"), &assign_WindTurbineType4aIEC_WindContPType4aIEC)); + assign_map.emplace("cim:WindTurbineType4aIEC.WindContPType4aIEC", &assign_WindTurbineType4aIEC_WindContPType4aIEC); } void WindTurbineType4aIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/WindTurbineType4aIEC.hpp b/CGMES_2.4.13_18DEC2013/WindTurbineType4aIEC.hpp index 980d5388d..67bcd203b 100644 --- a/CGMES_2.4.13_18DEC2013/WindTurbineType4aIEC.hpp +++ b/CGMES_2.4.13_18DEC2013/WindTurbineType4aIEC.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class WindContPType4aIEC; - /* - Wind turbine IEC Type 4A. Reference: IEC Standard 61400-27-1, section 6.5.5.2. - */ + /** \brief Wind turbine IEC Type 4A. Reference: IEC Standard 61400-27-1, section 6.5.5.2. */ class WindTurbineType4aIEC : public WindGenType4IEC { public: @@ -27,7 +25,8 @@ namespace CIMPP WindTurbineType4aIEC(); ~WindTurbineType4aIEC() override; - CIMPP::WindContPType4aIEC* WindContPType4aIEC; /* Wind control P type 4A model associated with this wind turbine type 4A model. Default: 0 */ + /** \brief Wind control P type 4A model associated with this wind turbine type 4A model. Default: 0 */ + CIMPP::WindContPType4aIEC* WindContPType4aIEC; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/WindTurbineType4bIEC.cpp b/CGMES_2.4.13_18DEC2013/WindTurbineType4bIEC.cpp index 1dd86053d..ad7a668db 100644 --- a/CGMES_2.4.13_18DEC2013/WindTurbineType4bIEC.cpp +++ b/CGMES_2.4.13_18DEC2013/WindTurbineType4bIEC.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindTurbineType4bIEC::WindTurbineType4bIEC() : WindContPType4bIEC(nullptr), WindMechIEC(nullptr) {}; -WindTurbineType4bIEC::~WindTurbineType4bIEC() {}; +WindTurbineType4bIEC::WindTurbineType4bIEC() : WindContPType4bIEC(nullptr), WindMechIEC(nullptr) {} +WindTurbineType4bIEC::~WindTurbineType4bIEC() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ WindTurbineType4bIEC::getPossibleProfilesForAttributes() const return map; } - - bool assign_WindContPType4bIEC_WindTurbineType4bIEC(BaseClass*, BaseClass*); bool assign_WindTurbineType4bIEC_WindContPType4bIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_WindTurbineType4bIEC_WindContPType4bIEC(BaseClass* BaseClass_ptr1, B } return false; } + bool assign_WindMechIEC_WindTurbineType4bIEC(BaseClass*, BaseClass*); bool assign_WindTurbineType4bIEC_WindMechIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_WindTurbineType4bIEC_WindMechIEC(BaseClass* BaseClass_ptr1, BaseClas return false; } - bool get_WindTurbineType4bIEC_WindContPType4bIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContPType4bIEC != 0) { @@ -93,7 +92,8 @@ bool get_WindTurbineType4bIEC_WindContPType4bIEC(const BaseClass* BaseClass_ptr1 bool get_WindTurbineType4bIEC_WindMechIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindMechIEC != 0) { @@ -104,7 +104,6 @@ bool get_WindTurbineType4bIEC_WindMechIEC(const BaseClass* BaseClass_ptr1, std:: return false; } - const char WindTurbineType4bIEC::debugName[] = "WindTurbineType4bIEC"; const char* WindTurbineType4bIEC::debugString() const { @@ -113,7 +112,7 @@ const char* WindTurbineType4bIEC::debugString() const void WindTurbineType4bIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindTurbineType4bIEC"), &WindTurbineType4bIEC_factory)); + factory_map.emplace("cim:WindTurbineType4bIEC", &WindTurbineType4bIEC_factory); } void WindTurbineType4bIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void WindTurbineType4bIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType4bIEC.WindContPType4bIEC"), &assign_WindTurbineType4bIEC_WindContPType4bIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType4bIEC.WindMechIEC"), &assign_WindTurbineType4bIEC_WindMechIEC)); + assign_map.emplace("cim:WindTurbineType4bIEC.WindContPType4bIEC", &assign_WindTurbineType4bIEC_WindContPType4bIEC); + assign_map.emplace("cim:WindTurbineType4bIEC.WindMechIEC", &assign_WindTurbineType4bIEC_WindMechIEC); } void WindTurbineType4bIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/WindTurbineType4bIEC.hpp b/CGMES_2.4.13_18DEC2013/WindTurbineType4bIEC.hpp index ad1094a43..26da27746 100644 --- a/CGMES_2.4.13_18DEC2013/WindTurbineType4bIEC.hpp +++ b/CGMES_2.4.13_18DEC2013/WindTurbineType4bIEC.hpp @@ -18,9 +18,7 @@ namespace CIMPP class WindContPType4bIEC; class WindMechIEC; - /* - Wind turbine IEC Type 4A. Reference: IEC Standard 61400-27-1, section 6.5.5.3. - */ + /** \brief Wind turbine IEC Type 4A. Reference: IEC Standard 61400-27-1, section 6.5.5.3. */ class WindTurbineType4bIEC : public WindGenType4IEC { public: @@ -28,8 +26,11 @@ namespace CIMPP WindTurbineType4bIEC(); ~WindTurbineType4bIEC() override; - CIMPP::WindContPType4bIEC* WindContPType4bIEC; /* Wind control P type 4B model associated with this wind turbine type 4B model. Default: 0 */ - CIMPP::WindMechIEC* WindMechIEC; /* Wind mechanical model associated with this wind turbine Type 4B model. Default: 0 */ + /** \brief Wind control P type 4B model associated with this wind turbine type 4B model. Default: 0 */ + CIMPP::WindContPType4bIEC* WindContPType4bIEC; + + /** \brief Wind mechanical model associated with this wind turbine Type 4B model. Default: 0 */ + CIMPP::WindMechIEC* WindMechIEC; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/WindType1or2UserDefined.cpp b/CGMES_2.4.13_18DEC2013/WindType1or2UserDefined.cpp index 9a6a86bd9..be1daa797 100644 --- a/CGMES_2.4.13_18DEC2013/WindType1or2UserDefined.cpp +++ b/CGMES_2.4.13_18DEC2013/WindType1or2UserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -WindType1or2UserDefined::WindType1or2UserDefined() {}; -WindType1or2UserDefined::~WindType1or2UserDefined() {}; +WindType1or2UserDefined::WindType1or2UserDefined() {} +WindType1or2UserDefined::~WindType1or2UserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ WindType1or2UserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindType1or2UserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindType1or2UserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_WindType1or2UserDefined(BaseClass*, BaseClass*); bool assign_WindType1or2UserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_WindType1or2UserDefined_ProprietaryParameterDynamics(BaseClass* Base return false; } +bool assign_WindType1or2UserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + WindType1or2UserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_WindType1or2UserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindType1or2UserDefined* element = dynamic_cast(BaseClass_ptr1)) + const WindType1or2UserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_WindType1or2UserDefined_proprietary(const BaseClass* BaseClass_ptr1, st return false; } - - const char WindType1or2UserDefined::debugName[] = "WindType1or2UserDefined"; const char* WindType1or2UserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* WindType1or2UserDefined::debugString() const void WindType1or2UserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindType1or2UserDefined"), &WindType1or2UserDefined_factory)); + factory_map.emplace("cim:WindType1or2UserDefined", &WindType1or2UserDefined_factory); } void WindType1or2UserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindType1or2UserDefined.proprietary"), &assign_WindType1or2UserDefined_proprietary)); + assign_map.emplace("cim:WindType1or2UserDefined.proprietary", &assign_WindType1or2UserDefined_proprietary); } void WindType1or2UserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindType1or2UserDefined.ProprietaryParameterDynamics"), &assign_WindType1or2UserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:WindType1or2UserDefined.ProprietaryParameterDynamics", &assign_WindType1or2UserDefined_ProprietaryParameterDynamics); } void WindType1or2UserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/WindType1or2UserDefined.hpp b/CGMES_2.4.13_18DEC2013/WindType1or2UserDefined.hpp index 9d7145ff4..dc0abcc62 100644 --- a/CGMES_2.4.13_18DEC2013/WindType1or2UserDefined.hpp +++ b/CGMES_2.4.13_18DEC2013/WindType1or2UserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Wind Type 1 or Type 2 function block whose dynamic behaviour is described by - */ + /** \brief Wind Type 1 or Type 2 function block whose dynamic behaviour is described by */ class WindType1or2UserDefined : public WindTurbineType1or2Dynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP WindType1or2UserDefined(); ~WindType1or2UserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/WindType3or4UserDefined.cpp b/CGMES_2.4.13_18DEC2013/WindType3or4UserDefined.cpp index d749efa43..300908ba4 100644 --- a/CGMES_2.4.13_18DEC2013/WindType3or4UserDefined.cpp +++ b/CGMES_2.4.13_18DEC2013/WindType3or4UserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -WindType3or4UserDefined::WindType3or4UserDefined() {}; -WindType3or4UserDefined::~WindType3or4UserDefined() {}; +WindType3or4UserDefined::WindType3or4UserDefined() {} +WindType3or4UserDefined::~WindType3or4UserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ WindType3or4UserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindType3or4UserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindType3or4UserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_WindType3or4UserDefined(BaseClass*, BaseClass*); bool assign_WindType3or4UserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_WindType3or4UserDefined_ProprietaryParameterDynamics(BaseClass* Base return false; } +bool assign_WindType3or4UserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + WindType3or4UserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_WindType3or4UserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindType3or4UserDefined* element = dynamic_cast(BaseClass_ptr1)) + const WindType3or4UserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_WindType3or4UserDefined_proprietary(const BaseClass* BaseClass_ptr1, st return false; } - - const char WindType3or4UserDefined::debugName[] = "WindType3or4UserDefined"; const char* WindType3or4UserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* WindType3or4UserDefined::debugString() const void WindType3or4UserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindType3or4UserDefined"), &WindType3or4UserDefined_factory)); + factory_map.emplace("cim:WindType3or4UserDefined", &WindType3or4UserDefined_factory); } void WindType3or4UserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindType3or4UserDefined.proprietary"), &assign_WindType3or4UserDefined_proprietary)); + assign_map.emplace("cim:WindType3or4UserDefined.proprietary", &assign_WindType3or4UserDefined_proprietary); } void WindType3or4UserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindType3or4UserDefined.ProprietaryParameterDynamics"), &assign_WindType3or4UserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:WindType3or4UserDefined.ProprietaryParameterDynamics", &assign_WindType3or4UserDefined_ProprietaryParameterDynamics); } void WindType3or4UserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.13_18DEC2013/WindType3or4UserDefined.hpp b/CGMES_2.4.13_18DEC2013/WindType3or4UserDefined.hpp index 2e8317b5f..5259b5916 100644 --- a/CGMES_2.4.13_18DEC2013/WindType3or4UserDefined.hpp +++ b/CGMES_2.4.13_18DEC2013/WindType3or4UserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Wind Type 3 or Type 4 function block whose dynamic behaviour is described by - */ + /** \brief Wind Type 3 or Type 4 function block whose dynamic behaviour is described by */ class WindType3or4UserDefined : public WindTurbineType3or4Dynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP WindType3or4UserDefined(); ~WindType3or4UserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.13_18DEC2013/WindingConnection.cpp b/CGMES_2.4.13_18DEC2013/WindingConnection.cpp index 498dcbe94..90e8fc5af 100644 --- a/CGMES_2.4.13_18DEC2013/WindingConnection.cpp +++ b/CGMES_2.4.13_18DEC2013/WindingConnection.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "WindingConnection") + if (EnumSymbol.substr(0, pos) != "WindingConnection") { lop.setstate(std::ios::failbit); return lop; @@ -50,37 +50,37 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "D") + if (EnumSymbol == "D") { rop = WindingConnection::D; return lop; } - if(EnumSymbol == "Y") + if (EnumSymbol == "Y") { rop = WindingConnection::Y; return lop; } - if(EnumSymbol == "Z") + if (EnumSymbol == "Z") { rop = WindingConnection::Z; return lop; } - if(EnumSymbol == "Yn") + if (EnumSymbol == "Yn") { rop = WindingConnection::Yn; return lop; } - if(EnumSymbol == "Zn") + if (EnumSymbol == "Zn") { rop = WindingConnection::Zn; return lop; } - if(EnumSymbol == "A") + if (EnumSymbol == "A") { rop = WindingConnection::A; return lop; } - if(EnumSymbol == "I") + if (EnumSymbol == "I") { rop = WindingConnection::I; return lop; diff --git a/CGMES_2.4.13_18DEC2013/WindingConnection.hpp b/CGMES_2.4.13_18DEC2013/WindingConnection.hpp index 398f89ecf..897bb3e00 100644 --- a/CGMES_2.4.13_18DEC2013/WindingConnection.hpp +++ b/CGMES_2.4.13_18DEC2013/WindingConnection.hpp @@ -9,41 +9,25 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Winding connection type. - */ + /** \brief Winding connection type. */ class WindingConnection { public: enum WindingConnection_ENUM { - /** - * Delta - */ + /** Delta */ D, - /** - * Wye - */ + /** Wye */ Y, - /** - * ZigZag - */ + /** ZigZag */ Z, - /** - * Wye, with neutral brought out for grounding. - */ + /** Wye, with neutral brought out for grounding. */ Yn, - /** - * ZigZag, with neutral brought out for grounding. - */ + /** ZigZag, with neutral brought out for grounding. */ Zn, - /** - * Autotransformer common winding - */ + /** Autotransformer common winding */ A, - /** - * Independent winding, for single-phase connections - */ + /** Independent winding, for single-phase connections */ I, }; diff --git a/CGMES_2.4.15_16FEB2016/ACDCConverter.cpp b/CGMES_2.4.15_16FEB2016/ACDCConverter.cpp index 2e6e2ffc3..77117a179 100644 --- a/CGMES_2.4.15_16FEB2016/ACDCConverter.cpp +++ b/CGMES_2.4.15_16FEB2016/ACDCConverter.cpp @@ -10,28 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "ACDCConverterDCTerminal.hpp" #include "Terminal.hpp" -#include "ApparentPower.hpp" -#include "CurrentFlow.hpp" -#include "ActivePower.hpp" -#include "Voltage.hpp" -#include "Voltage.hpp" -#include "Integer.hpp" -#include "ActivePower.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" -#include "Voltage.hpp" -#include "Resistance.hpp" -#include "ActivePowerPerCurrentFlow.hpp" -#include "ActivePower.hpp" -#include "Voltage.hpp" -#include "Voltage.hpp" -#include "Voltage.hpp" -#include "Voltage.hpp" using namespace CIMPP; -ACDCConverter::ACDCConverter() : PccTerminal(nullptr) {}; -ACDCConverter::~ACDCConverter() {}; +ACDCConverter::ACDCConverter() : PccTerminal(nullptr) {} +ACDCConverter::~ACDCConverter() {} static const std::list PossibleProfilesForClass = { @@ -78,265 +61,297 @@ ACDCConverter::getPossibleProfilesForAttributes() const return map; } +bool assign_ACDCConverterDCTerminal_DCConductingEquipment(BaseClass*, BaseClass*); +bool assign_ACDCConverter_DCTerminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + ACDCConverterDCTerminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->DCTerminals.begin(), element->DCTerminals.end(), element2) == element->DCTerminals.end()) + { + element->DCTerminals.push_back(element2); + return assign_ACDCConverterDCTerminal_DCConductingEquipment(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Terminal_ConverterDCSides(BaseClass*, BaseClass*); +bool assign_ACDCConverter_PccTerminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PccTerminal != element2) + { + element->PccTerminal = element2; + return assign_Terminal_ConverterDCSides(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_ACDCConverter_baseS(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_baseS(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->baseS; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_idc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_idc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->idc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_idleLoss(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_idleLoss(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->idleLoss; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_maxUdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_maxUdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxUdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_minUdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_minUdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minUdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_numberOfValves(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_numberOfValves(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->numberOfValves; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_p(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_poleLossP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_poleLossP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->poleLossP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_ratedUdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_ratedUdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedUdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_resistiveLoss(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_resistiveLoss(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->resistiveLoss; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_switchingLoss(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_switchingLoss(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->switchingLoss; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_targetPpcc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_targetPpcc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->targetPpcc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_targetUdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_targetUdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->targetUdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_uc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_udc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_udc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->udc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_valveU0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_valveU0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->valveU0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverterDCTerminal_DCConductingEquipment(BaseClass*, BaseClass*); -bool assign_ACDCConverter_DCTerminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) -{ - ACDCConverter* element = dynamic_cast(BaseClass_ptr1); - ACDCConverterDCTerminal* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) - { - if (std::find(element->DCTerminals.begin(), element->DCTerminals.end(), element2) == element->DCTerminals.end()) - { - element->DCTerminals.push_back(element2); - return assign_ACDCConverterDCTerminal_DCConductingEquipment(BaseClass_ptr2, BaseClass_ptr1); - } - return true; - } - return false; -} -bool assign_Terminal_ConverterDCSides(BaseClass*, BaseClass*); -bool assign_ACDCConverter_PccTerminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_ACDCConverter_PccTerminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - ACDCConverter* element = dynamic_cast(BaseClass_ptr1); - Terminal* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->PccTerminal != element2) + if (element->PccTerminal != 0) { - element->PccTerminal = element2; - return assign_Terminal_ConverterDCSides(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->PccTerminal); + return true; } - return true; } return false; } bool get_ACDCConverter_baseS(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseS; if (!buffer.str().empty()) @@ -350,7 +365,8 @@ bool get_ACDCConverter_baseS(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ACDCConverter_idc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->idc; if (!buffer.str().empty()) @@ -364,7 +380,8 @@ bool get_ACDCConverter_idc(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ACDCConverter_idleLoss(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->idleLoss; if (!buffer.str().empty()) @@ -378,7 +395,8 @@ bool get_ACDCConverter_idleLoss(const BaseClass* BaseClass_ptr1, std::stringstre bool get_ACDCConverter_maxUdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxUdc; if (!buffer.str().empty()) @@ -392,7 +410,8 @@ bool get_ACDCConverter_maxUdc(const BaseClass* BaseClass_ptr1, std::stringstream bool get_ACDCConverter_minUdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minUdc; if (!buffer.str().empty()) @@ -406,7 +425,8 @@ bool get_ACDCConverter_minUdc(const BaseClass* BaseClass_ptr1, std::stringstream bool get_ACDCConverter_numberOfValves(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->numberOfValves; if (!buffer.str().empty()) @@ -420,7 +440,8 @@ bool get_ACDCConverter_numberOfValves(const BaseClass* BaseClass_ptr1, std::stri bool get_ACDCConverter_p(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p; if (!buffer.str().empty()) @@ -434,7 +455,8 @@ bool get_ACDCConverter_p(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ACDCConverter_poleLossP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->poleLossP; if (!buffer.str().empty()) @@ -448,7 +470,8 @@ bool get_ACDCConverter_poleLossP(const BaseClass* BaseClass_ptr1, std::stringstr bool get_ACDCConverter_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q; if (!buffer.str().empty()) @@ -462,7 +485,8 @@ bool get_ACDCConverter_q(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ACDCConverter_ratedUdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedUdc; if (!buffer.str().empty()) @@ -476,7 +500,8 @@ bool get_ACDCConverter_ratedUdc(const BaseClass* BaseClass_ptr1, std::stringstre bool get_ACDCConverter_resistiveLoss(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->resistiveLoss; if (!buffer.str().empty()) @@ -490,7 +515,8 @@ bool get_ACDCConverter_resistiveLoss(const BaseClass* BaseClass_ptr1, std::strin bool get_ACDCConverter_switchingLoss(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->switchingLoss; if (!buffer.str().empty()) @@ -504,7 +530,8 @@ bool get_ACDCConverter_switchingLoss(const BaseClass* BaseClass_ptr1, std::strin bool get_ACDCConverter_targetPpcc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->targetPpcc; if (!buffer.str().empty()) @@ -518,7 +545,8 @@ bool get_ACDCConverter_targetPpcc(const BaseClass* BaseClass_ptr1, std::stringst bool get_ACDCConverter_targetUdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->targetUdc; if (!buffer.str().empty()) @@ -532,7 +560,8 @@ bool get_ACDCConverter_targetUdc(const BaseClass* BaseClass_ptr1, std::stringstr bool get_ACDCConverter_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uc; if (!buffer.str().empty()) @@ -546,7 +575,8 @@ bool get_ACDCConverter_uc(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ACDCConverter_udc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->udc; if (!buffer.str().empty()) @@ -560,7 +590,8 @@ bool get_ACDCConverter_udc(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ACDCConverter_valveU0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->valveU0; if (!buffer.str().empty()) @@ -572,21 +603,6 @@ bool get_ACDCConverter_valveU0(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } - -bool get_ACDCConverter_PccTerminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->PccTerminal != 0) - { - BaseClass_list.push_back(element->PccTerminal); - return true; - } - } - return false; -} - - const char ACDCConverter::debugName[] = "ACDCConverter"; const char* ACDCConverter::debugString() const { @@ -595,34 +611,34 @@ const char* ACDCConverter::debugString() const void ACDCConverter::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ACDCConverter"), &ACDCConverter_factory)); + factory_map.emplace("cim:ACDCConverter", &ACDCConverter_factory); } void ACDCConverter::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.baseS"), &assign_ACDCConverter_baseS)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.idc"), &assign_ACDCConverter_idc)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.idleLoss"), &assign_ACDCConverter_idleLoss)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.maxUdc"), &assign_ACDCConverter_maxUdc)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.minUdc"), &assign_ACDCConverter_minUdc)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.numberOfValves"), &assign_ACDCConverter_numberOfValves)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.p"), &assign_ACDCConverter_p)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.poleLossP"), &assign_ACDCConverter_poleLossP)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.q"), &assign_ACDCConverter_q)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.ratedUdc"), &assign_ACDCConverter_ratedUdc)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.resistiveLoss"), &assign_ACDCConverter_resistiveLoss)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.switchingLoss"), &assign_ACDCConverter_switchingLoss)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.targetPpcc"), &assign_ACDCConverter_targetPpcc)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.targetUdc"), &assign_ACDCConverter_targetUdc)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.uc"), &assign_ACDCConverter_uc)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.udc"), &assign_ACDCConverter_udc)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.valveU0"), &assign_ACDCConverter_valveU0)); + assign_map.emplace("cim:ACDCConverter.baseS", &assign_ACDCConverter_baseS); + assign_map.emplace("cim:ACDCConverter.idc", &assign_ACDCConverter_idc); + assign_map.emplace("cim:ACDCConverter.idleLoss", &assign_ACDCConverter_idleLoss); + assign_map.emplace("cim:ACDCConverter.maxUdc", &assign_ACDCConverter_maxUdc); + assign_map.emplace("cim:ACDCConverter.minUdc", &assign_ACDCConverter_minUdc); + assign_map.emplace("cim:ACDCConverter.numberOfValves", &assign_ACDCConverter_numberOfValves); + assign_map.emplace("cim:ACDCConverter.p", &assign_ACDCConverter_p); + assign_map.emplace("cim:ACDCConverter.poleLossP", &assign_ACDCConverter_poleLossP); + assign_map.emplace("cim:ACDCConverter.q", &assign_ACDCConverter_q); + assign_map.emplace("cim:ACDCConverter.ratedUdc", &assign_ACDCConverter_ratedUdc); + assign_map.emplace("cim:ACDCConverter.resistiveLoss", &assign_ACDCConverter_resistiveLoss); + assign_map.emplace("cim:ACDCConverter.switchingLoss", &assign_ACDCConverter_switchingLoss); + assign_map.emplace("cim:ACDCConverter.targetPpcc", &assign_ACDCConverter_targetPpcc); + assign_map.emplace("cim:ACDCConverter.targetUdc", &assign_ACDCConverter_targetUdc); + assign_map.emplace("cim:ACDCConverter.uc", &assign_ACDCConverter_uc); + assign_map.emplace("cim:ACDCConverter.udc", &assign_ACDCConverter_udc); + assign_map.emplace("cim:ACDCConverter.valveU0", &assign_ACDCConverter_valveU0); } void ACDCConverter::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.DCTerminals"), &assign_ACDCConverter_DCTerminals)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.PccTerminal"), &assign_ACDCConverter_PccTerminal)); + assign_map.emplace("cim:ACDCConverter.DCTerminals", &assign_ACDCConverter_DCTerminals); + assign_map.emplace("cim:ACDCConverter.PccTerminal", &assign_ACDCConverter_PccTerminal); } void ACDCConverter::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/ACDCConverter.hpp b/CGMES_2.4.15_16FEB2016/ACDCConverter.hpp index cbef1099e..1621353d5 100644 --- a/CGMES_2.4.15_16FEB2016/ACDCConverter.hpp +++ b/CGMES_2.4.15_16FEB2016/ACDCConverter.hpp @@ -26,9 +26,7 @@ namespace CIMPP class ACDCConverterDCTerminal; class Terminal; - /* - A unit with valves for three phases, together with unit control equipment, essential protective and switching devices, DC storage capacitors, phase reactors and auxiliaries, if any, used for conversion. - */ + /** \brief A unit with valves for three phases, together with unit control equipment, essential protective and switching devices, DC storage capacitors, phase reactors and auxiliaries, if any, used for conversion. */ class ACDCConverter : public ConductingEquipment { public: @@ -36,25 +34,62 @@ namespace CIMPP ACDCConverter(); ~ACDCConverter() override; - std::list DCTerminals; /* Default: 0 */ - CIMPP::Terminal* PccTerminal; /* All converters` DC sides linked to this point of common coupling terminal. Default: 0 */ - CIMPP::ApparentPower baseS; /* Base apparent power of the converter pole. Default: nullptr */ - CIMPP::CurrentFlow idc; /* Converter DC current, also called Id. Converter state variable, result from power flow. Default: nullptr */ - CIMPP::ActivePower idleLoss; /* Active power loss in pole at no power transfer. Converter configuration data used in power flow. Default: nullptr */ - CIMPP::Voltage maxUdc; /* The maximum voltage on the DC side at which the converter should operate. Converter configuration data used in power flow. Default: nullptr */ - CIMPP::Voltage minUdc; /* Min allowed converter DC voltage. Converter configuration data used in power flow. Default: nullptr */ - CIMPP::Integer numberOfValves; /* Number of valves in the converter. Used in loss calculations. Default: 0 */ - CIMPP::ActivePower p; /* Active power at the point of common coupling. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution in the case a simplified power flow model is used. Default: nullptr */ - CIMPP::ActivePower poleLossP; /* The active power loss at a DC Pole = idleLoss + switchingLoss*|Idc| + resitiveLoss*Idc^2 For lossless operation Pdc=Pac For rectifier operation with losses Pdc=Pac-lossP For inverter operation with losses Pdc=Pac+lossP Converter state variable used in power flow. Default: nullptr */ - CIMPP::ReactivePower q; /* Reactive power at the point of common coupling. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution in the case a simplified power flow model is used. Default: nullptr */ - CIMPP::Voltage ratedUdc; /* Rated converter DC voltage, also called UdN. Converter configuration data used in power flow. Default: nullptr */ - CIMPP::Resistance resistiveLoss; /* Converter configuration data used in power flow. Refer to poleLossP. Default: nullptr */ - CIMPP::ActivePowerPerCurrentFlow switchingLoss; /* Switching losses, relative to the base apparent power `baseS`. Refer to poleLossP. Default: nullptr */ - CIMPP::ActivePower targetPpcc; /* Real power injection target in AC grid, at point of common coupling. Default: nullptr */ - CIMPP::Voltage targetUdc; /* Target value for DC voltage magnitude. Default: nullptr */ - CIMPP::Voltage uc; /* Converter voltage, the voltage at the AC side of the bridge. Converter state variable, result from power flow. Default: nullptr */ - CIMPP::Voltage udc; /* Converter voltage at the DC side, also called Ud. Converter state variable, result from power flow. Default: nullptr */ - CIMPP::Voltage valveU0; /* Valve threshold voltage. Forward voltage drop when the valve is conducting. Used in loss calculations, i.e. the switchLoss depend on numberOfValves * valveU0. Default: nullptr */ + /** \brief Default: 0 */ + std::list DCTerminals; + + /** \brief All converters` DC sides linked to this point of common coupling terminal. Default: 0 */ + CIMPP::Terminal* PccTerminal; + + /** \brief Base apparent power of the converter pole. Default: nullptr */ + CIMPP::ApparentPower baseS; + + /** \brief Converter DC current, also called Id. Converter state variable, result from power flow. Default: nullptr */ + CIMPP::CurrentFlow idc; + + /** \brief Active power loss in pole at no power transfer. Converter configuration data used in power flow. Default: nullptr */ + CIMPP::ActivePower idleLoss; + + /** \brief The maximum voltage on the DC side at which the converter should operate. Converter configuration data used in power flow. Default: nullptr */ + CIMPP::Voltage maxUdc; + + /** \brief Min allowed converter DC voltage. Converter configuration data used in power flow. Default: nullptr */ + CIMPP::Voltage minUdc; + + /** \brief Number of valves in the converter. Used in loss calculations. Default: 0 */ + CIMPP::Integer numberOfValves; + + /** \brief Active power at the point of common coupling. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution in the case a simplified power flow model is used. Default: nullptr */ + CIMPP::ActivePower p; + + /** \brief The active power loss at a DC Pole = idleLoss + switchingLoss*|Idc| + resitiveLoss*Idc^2 For lossless operation Pdc=Pac For rectifier operation with losses Pdc=Pac-lossP For inverter operation with losses Pdc=Pac+lossP Converter state variable used in power flow. Default: nullptr */ + CIMPP::ActivePower poleLossP; + + /** \brief Reactive power at the point of common coupling. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution in the case a simplified power flow model is used. Default: nullptr */ + CIMPP::ReactivePower q; + + /** \brief Rated converter DC voltage, also called UdN. Converter configuration data used in power flow. Default: nullptr */ + CIMPP::Voltage ratedUdc; + + /** \brief Converter configuration data used in power flow. Refer to poleLossP. Default: nullptr */ + CIMPP::Resistance resistiveLoss; + + /** \brief Switching losses, relative to the base apparent power `baseS`. Refer to poleLossP. Default: nullptr */ + CIMPP::ActivePowerPerCurrentFlow switchingLoss; + + /** \brief Real power injection target in AC grid, at point of common coupling. Default: nullptr */ + CIMPP::ActivePower targetPpcc; + + /** \brief Target value for DC voltage magnitude. Default: nullptr */ + CIMPP::Voltage targetUdc; + + /** \brief Converter voltage, the voltage at the AC side of the bridge. Converter state variable, result from power flow. Default: nullptr */ + CIMPP::Voltage uc; + + /** \brief Converter voltage at the DC side, also called Ud. Converter state variable, result from power flow. Default: nullptr */ + CIMPP::Voltage udc; + + /** \brief Valve threshold voltage. Forward voltage drop when the valve is conducting. Used in loss calculations, i.e. the switchLoss depend on numberOfValves * valveU0. Default: nullptr */ + CIMPP::Voltage valveU0; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ACDCConverterDCTerminal.cpp b/CGMES_2.4.15_16FEB2016/ACDCConverterDCTerminal.cpp index c524cfbe9..1f445f5c1 100644 --- a/CGMES_2.4.15_16FEB2016/ACDCConverterDCTerminal.cpp +++ b/CGMES_2.4.15_16FEB2016/ACDCConverterDCTerminal.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ACDCConverter.hpp" -#include "DCPolarityKind.hpp" using namespace CIMPP; -ACDCConverterDCTerminal::ACDCConverterDCTerminal() : DCConductingEquipment(nullptr) {}; -ACDCConverterDCTerminal::~ACDCConverterDCTerminal() {}; +ACDCConverterDCTerminal::ACDCConverterDCTerminal() : DCConductingEquipment(nullptr) {} +ACDCConverterDCTerminal::~ACDCConverterDCTerminal() {} static const std::list PossibleProfilesForClass = { @@ -44,21 +43,6 @@ ACDCConverterDCTerminal::getPossibleProfilesForAttributes() const return map; } - -bool assign_ACDCConverterDCTerminal_polarity(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ACDCConverterDCTerminal* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->polarity; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ACDCConverter_DCTerminals(BaseClass*, BaseClass*); bool assign_ACDCConverterDCTerminal_DCConductingEquipment(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -76,10 +60,24 @@ bool assign_ACDCConverterDCTerminal_DCConductingEquipment(BaseClass* BaseClass_p return false; } +bool assign_ACDCConverterDCTerminal_polarity(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + ACDCConverterDCTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->polarity; + if (!buffer.fail()) + { + return true; + } + } + return false; +} bool get_ACDCConverterDCTerminal_DCConductingEquipment(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ACDCConverterDCTerminal* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverterDCTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DCConductingEquipment != 0) { @@ -90,10 +88,10 @@ bool get_ACDCConverterDCTerminal_DCConductingEquipment(const BaseClass* BaseClas return false; } - bool get_ACDCConverterDCTerminal_polarity(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverterDCTerminal* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverterDCTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->polarity; if (!buffer.str().empty()) @@ -113,17 +111,17 @@ const char* ACDCConverterDCTerminal::debugString() const void ACDCConverterDCTerminal::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ACDCConverterDCTerminal"), &ACDCConverterDCTerminal_factory)); + factory_map.emplace("cim:ACDCConverterDCTerminal", &ACDCConverterDCTerminal_factory); } void ACDCConverterDCTerminal::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ACDCConverterDCTerminal.polarity"), &assign_ACDCConverterDCTerminal_polarity)); + assign_map.emplace("cim:ACDCConverterDCTerminal.polarity", &assign_ACDCConverterDCTerminal_polarity); } void ACDCConverterDCTerminal::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ACDCConverterDCTerminal.DCConductingEquipment"), &assign_ACDCConverterDCTerminal_DCConductingEquipment)); + assign_map.emplace("cim:ACDCConverterDCTerminal.DCConductingEquipment", &assign_ACDCConverterDCTerminal_DCConductingEquipment); } void ACDCConverterDCTerminal::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/ACDCConverterDCTerminal.hpp b/CGMES_2.4.15_16FEB2016/ACDCConverterDCTerminal.hpp index 432be1cfd..f8cebc33a 100644 --- a/CGMES_2.4.15_16FEB2016/ACDCConverterDCTerminal.hpp +++ b/CGMES_2.4.15_16FEB2016/ACDCConverterDCTerminal.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ACDCConverter; - /* - A DC electrical connection point at the AC/DC converter. The AC/DC converter is electrically connected also to the AC side. The AC connection is inherited from the AC conducting equipment in the same way as any other AC equipment. The AC/DC converter DC terminal is separate from generic DC terminal to restrict the connection with the AC side to AC/DC converter and so that no other DC conducting equipment can be connected to the AC side. - */ + /** \brief A DC electrical connection point at the AC/DC converter. The AC/DC converter is electrically connected also to the AC side. The AC connection is inherited from the AC conducting equipment in the same way as any other AC equipment. The AC/DC converter DC terminal is separate from generic DC terminal to restrict the connection with the AC side to AC/DC converter and so that no other DC conducting equipment can be connected to the AC side. */ class ACDCConverterDCTerminal : public DCBaseTerminal { public: @@ -28,8 +26,11 @@ namespace CIMPP ACDCConverterDCTerminal(); ~ACDCConverterDCTerminal() override; - CIMPP::ACDCConverter* DCConductingEquipment; /* Default: 0 */ - CIMPP::DCPolarityKind polarity; /* Represents the normal network polarity condition. Default: 0 */ + /** \brief Default: 0 */ + CIMPP::ACDCConverter* DCConductingEquipment; + + /** \brief Represents the normal network polarity condition. Default: 0 */ + CIMPP::DCPolarityKind polarity; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ACDCTerminal.cpp b/CGMES_2.4.15_16FEB2016/ACDCTerminal.cpp index 8220bb67b..d4cc5c048 100644 --- a/CGMES_2.4.15_16FEB2016/ACDCTerminal.cpp +++ b/CGMES_2.4.15_16FEB2016/ACDCTerminal.cpp @@ -11,13 +11,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "BusNameMarker.hpp" #include "Measurement.hpp" #include "OperationalLimitSet.hpp" -#include "Boolean.hpp" -#include "Integer.hpp" using namespace CIMPP; -ACDCTerminal::ACDCTerminal() : BusNameMarker(nullptr) {}; -ACDCTerminal::~ACDCTerminal() {}; +ACDCTerminal::ACDCTerminal() : BusNameMarker(nullptr) {} +ACDCTerminal::~ACDCTerminal() {} static const std::list PossibleProfilesForClass = { @@ -52,34 +50,6 @@ ACDCTerminal::getPossibleProfilesForAttributes() const return map; } - -bool assign_ACDCTerminal_connected(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ACDCTerminal* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->connected; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_ACDCTerminal_sequenceNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ACDCTerminal* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->sequenceNumber; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_BusNameMarker_Terminal(BaseClass*, BaseClass*); bool assign_ACDCTerminal_BusNameMarker(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -96,6 +66,7 @@ bool assign_ACDCTerminal_BusNameMarker(BaseClass* BaseClass_ptr1, BaseClass* Bas } return false; } + bool assign_Measurement_Terminal(BaseClass*, BaseClass*); bool assign_ACDCTerminal_Measurements(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -112,6 +83,7 @@ bool assign_ACDCTerminal_Measurements(BaseClass* BaseClass_ptr1, BaseClass* Base } return false; } + bool assign_OperationalLimitSet_Terminal(BaseClass*, BaseClass*); bool assign_ACDCTerminal_OperationalLimitSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -129,38 +101,38 @@ bool assign_ACDCTerminal_OperationalLimitSet(BaseClass* BaseClass_ptr1, BaseClas return false; } -bool get_ACDCTerminal_connected(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_ACDCTerminal_connected(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const ACDCTerminal* element = dynamic_cast(BaseClass_ptr1)) + ACDCTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->connected; - if (!buffer.str().empty()) + buffer >> element->connected; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_ACDCTerminal_sequenceNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_ACDCTerminal_sequenceNumber(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const ACDCTerminal* element = dynamic_cast(BaseClass_ptr1)) + ACDCTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->sequenceNumber; - if (!buffer.str().empty()) + buffer >> element->sequenceNumber; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_ACDCTerminal_BusNameMarker(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ACDCTerminal* element = dynamic_cast(BaseClass_ptr1)) + const ACDCTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->BusNameMarker != 0) { @@ -172,6 +144,37 @@ bool get_ACDCTerminal_BusNameMarker(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->connected; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_ACDCTerminal_sequenceNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ACDCTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->sequenceNumber; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + const char ACDCTerminal::debugName[] = "ACDCTerminal"; const char* ACDCTerminal::debugString() const { @@ -180,20 +183,20 @@ const char* ACDCTerminal::debugString() const void ACDCTerminal::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ACDCTerminal"), &ACDCTerminal_factory)); + factory_map.emplace("cim:ACDCTerminal", &ACDCTerminal_factory); } void ACDCTerminal::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ACDCTerminal.connected"), &assign_ACDCTerminal_connected)); - assign_map.insert(std::make_pair(std::string("cim:ACDCTerminal.sequenceNumber"), &assign_ACDCTerminal_sequenceNumber)); + assign_map.emplace("cim:ACDCTerminal.connected", &assign_ACDCTerminal_connected); + assign_map.emplace("cim:ACDCTerminal.sequenceNumber", &assign_ACDCTerminal_sequenceNumber); } void ACDCTerminal::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ACDCTerminal.BusNameMarker"), &assign_ACDCTerminal_BusNameMarker)); - assign_map.insert(std::make_pair(std::string("cim:ACDCTerminal.Measurements"), &assign_ACDCTerminal_Measurements)); - assign_map.insert(std::make_pair(std::string("cim:ACDCTerminal.OperationalLimitSet"), &assign_ACDCTerminal_OperationalLimitSet)); + assign_map.emplace("cim:ACDCTerminal.BusNameMarker", &assign_ACDCTerminal_BusNameMarker); + assign_map.emplace("cim:ACDCTerminal.Measurements", &assign_ACDCTerminal_Measurements); + assign_map.emplace("cim:ACDCTerminal.OperationalLimitSet", &assign_ACDCTerminal_OperationalLimitSet); } void ACDCTerminal::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/ACDCTerminal.hpp b/CGMES_2.4.15_16FEB2016/ACDCTerminal.hpp index 6dcc095d5..ed29f46b5 100644 --- a/CGMES_2.4.15_16FEB2016/ACDCTerminal.hpp +++ b/CGMES_2.4.15_16FEB2016/ACDCTerminal.hpp @@ -21,9 +21,7 @@ namespace CIMPP class Measurement; class OperationalLimitSet; - /* - An electrical connection point (AC or DC) to a piece of conducting equipment. Terminals are connected at physical connection points called connectivity nodes. - */ + /** \brief An electrical connection point (AC or DC) to a piece of conducting equipment. Terminals are connected at physical connection points called connectivity nodes. */ class ACDCTerminal : public IdentifiedObject { public: @@ -31,11 +29,20 @@ namespace CIMPP ACDCTerminal(); ~ACDCTerminal() override; - CIMPP::BusNameMarker* BusNameMarker; /* The bus name marker used to name the bus (topological node). Default: 0 */ - std::list Measurements; /* Measurements associated with this terminal defining where the measurement is placed in the network topology. It may be used, for instance, to capture the sensor position, such as a voltage transformer (PT) at a busbar or a current transformer (CT) at the bar between a breaker and an isolator. Default: 0 */ - std::list OperationalLimitSet; /* Default: 0 */ - CIMPP::Boolean connected; /* The connected status is related to a bus-branch model and the topological node to terminal relation. True implies the terminal is connected to the related topological node and false implies it is not. In a bus-branch model, the connected status is used to tell if equipment is disconnected without having to change the connectivity described by the topological node to terminal relation. A valid case is that conducting equipment can be connected in one end and open in the other. In particular for an AC line segment, where the reactive line charging can be significant, this is a relevant case. Default: false */ - CIMPP::Integer sequenceNumber; /* The orientation of the terminal connections for a multiple terminal conducting equipment. The sequence numbering starts with 1 and additional terminals should follow in increasing order. The first terminal is the `starting point` for a two terminal branch. Default: 0 */ + /** \brief The bus name marker used to name the bus (topological node). Default: 0 */ + CIMPP::BusNameMarker* BusNameMarker; + + /** \brief Measurements associated with this terminal defining where the measurement is placed in the network topology. It may be used, for instance, to capture the sensor position, such as a voltage transformer (PT) at a busbar or a current transformer (CT) at the bar between a breaker and an isolator. Default: 0 */ + std::list Measurements; + + /** \brief Default: 0 */ + std::list OperationalLimitSet; + + /** \brief The connected status is related to a bus-branch model and the topological node to terminal relation. True implies the terminal is connected to the related topological node and false implies it is not. In a bus-branch model, the connected status is used to tell if equipment is disconnected without having to change the connectivity described by the topological node to terminal relation. A valid case is that conducting equipment can be connected in one end and open in the other. In particular for an AC line segment, where the reactive line charging can be significant, this is a relevant case. Default: false */ + CIMPP::Boolean connected; + + /** \brief The orientation of the terminal connections for a multiple terminal conducting equipment. The sequence numbering starts with 1 and additional terminals should follow in increasing order. The first terminal is the `starting point` for a two terminal branch. Default: 0 */ + CIMPP::Integer sequenceNumber; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ACLineSegment.cpp b/CGMES_2.4.15_16FEB2016/ACLineSegment.cpp index fb7cbca77..baecc7103 100644 --- a/CGMES_2.4.15_16FEB2016/ACLineSegment.cpp +++ b/CGMES_2.4.15_16FEB2016/ACLineSegment.cpp @@ -8,20 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Susceptance.hpp" -#include "Susceptance.hpp" -#include "Conductance.hpp" -#include "Conductance.hpp" -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "Temperature.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -ACLineSegment::ACLineSegment() {}; -ACLineSegment::~ACLineSegment() {}; +ACLineSegment::ACLineSegment() {} +ACLineSegment::~ACLineSegment() {} static const std::list PossibleProfilesForClass = { @@ -56,129 +47,136 @@ ACLineSegment::getPossibleProfilesForAttributes() const return map; } - -bool assign_ACLineSegment_b0ch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACLineSegment_b0ch(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b0ch; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACLineSegment_bch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACLineSegment_bch(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bch; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACLineSegment_g0ch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACLineSegment_g0ch(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g0ch; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACLineSegment_gch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACLineSegment_gch(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gch; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACLineSegment_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACLineSegment_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACLineSegment_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACLineSegment_r0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACLineSegment_shortCircuitEndTemperature(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACLineSegment_shortCircuitEndTemperature(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->shortCircuitEndTemperature; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACLineSegment_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACLineSegment_x(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACLineSegment_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACLineSegment_x0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ACLineSegment_b0ch(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b0ch; if (!buffer.str().empty()) @@ -192,7 +190,8 @@ bool get_ACLineSegment_b0ch(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ACLineSegment_bch(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bch; if (!buffer.str().empty()) @@ -206,7 +205,8 @@ bool get_ACLineSegment_bch(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ACLineSegment_g0ch(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g0ch; if (!buffer.str().empty()) @@ -220,7 +220,8 @@ bool get_ACLineSegment_g0ch(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ACLineSegment_gch(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gch; if (!buffer.str().empty()) @@ -234,7 +235,8 @@ bool get_ACLineSegment_gch(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ACLineSegment_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -248,7 +250,8 @@ bool get_ACLineSegment_r(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ACLineSegment_r0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r0; if (!buffer.str().empty()) @@ -262,7 +265,8 @@ bool get_ACLineSegment_r0(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ACLineSegment_shortCircuitEndTemperature(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortCircuitEndTemperature; if (!buffer.str().empty()) @@ -276,7 +280,8 @@ bool get_ACLineSegment_shortCircuitEndTemperature(const BaseClass* BaseClass_ptr bool get_ACLineSegment_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x; if (!buffer.str().empty()) @@ -290,7 +295,8 @@ bool get_ACLineSegment_x(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ACLineSegment_x0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x0; if (!buffer.str().empty()) @@ -302,8 +308,6 @@ bool get_ACLineSegment_x0(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char ACLineSegment::debugName[] = "ACLineSegment"; const char* ACLineSegment::debugString() const { @@ -312,20 +316,20 @@ const char* ACLineSegment::debugString() const void ACLineSegment::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ACLineSegment"), &ACLineSegment_factory)); + factory_map.emplace("cim:ACLineSegment", &ACLineSegment_factory); } void ACLineSegment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.b0ch"), &assign_ACLineSegment_b0ch)); - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.bch"), &assign_ACLineSegment_bch)); - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.g0ch"), &assign_ACLineSegment_g0ch)); - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.gch"), &assign_ACLineSegment_gch)); - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.r"), &assign_ACLineSegment_r)); - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.r0"), &assign_ACLineSegment_r0)); - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.shortCircuitEndTemperature"), &assign_ACLineSegment_shortCircuitEndTemperature)); - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.x"), &assign_ACLineSegment_x)); - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.x0"), &assign_ACLineSegment_x0)); + assign_map.emplace("cim:ACLineSegment.b0ch", &assign_ACLineSegment_b0ch); + assign_map.emplace("cim:ACLineSegment.bch", &assign_ACLineSegment_bch); + assign_map.emplace("cim:ACLineSegment.g0ch", &assign_ACLineSegment_g0ch); + assign_map.emplace("cim:ACLineSegment.gch", &assign_ACLineSegment_gch); + assign_map.emplace("cim:ACLineSegment.r", &assign_ACLineSegment_r); + assign_map.emplace("cim:ACLineSegment.r0", &assign_ACLineSegment_r0); + assign_map.emplace("cim:ACLineSegment.shortCircuitEndTemperature", &assign_ACLineSegment_shortCircuitEndTemperature); + assign_map.emplace("cim:ACLineSegment.x", &assign_ACLineSegment_x); + assign_map.emplace("cim:ACLineSegment.x0", &assign_ACLineSegment_x0); } void ACLineSegment::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ACLineSegment.hpp b/CGMES_2.4.15_16FEB2016/ACLineSegment.hpp index f03651a21..21be2e6c6 100644 --- a/CGMES_2.4.15_16FEB2016/ACLineSegment.hpp +++ b/CGMES_2.4.15_16FEB2016/ACLineSegment.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A wire or combination of wires, with consistent electrical characteristics, building a single electrical system, used to carry alternating current between points in the power system. For symmetrical, transposed 3ph lines, it is sufficient to use attributes of the line segment, which describe impedances and admittances for the entire length of the segment. Additionally impedances can be computed by using length and associated per length impedances. The BaseVoltage at the two ends of ACLineSegments in a Line shall have the same BaseVoltage.nominalVoltage. However, boundary lines may have slightly different BaseVoltage.nominalVoltages and variation is allowed. Larger voltage difference in general requires use of an equivalent branch. - */ + /** \brief A wire or combination of wires, with consistent electrical characteristics, building a single electrical system, used to carry alternating current between points in the power system. For symmetrical, transposed 3ph lines, it is sufficient to use attributes of the line segment, which describe impedances and admittances for the entire length of the segment. Additionally impedances can be computed by using length and associated per length impedances. The BaseVoltage at the two ends of ACLineSegments in a Line shall have the same BaseVoltage.nominalVoltage. However, boundary lines may have slightly different BaseVoltage.nominalVoltages and variation is allowed. Larger voltage difference in general requires use of an equivalent branch. */ class ACLineSegment : public Conductor { public: @@ -31,15 +29,32 @@ namespace CIMPP ACLineSegment(); ~ACLineSegment() override; - CIMPP::Susceptance b0ch; /* Zero sequence shunt (charging) susceptance, uniformly distributed, of the entire line section. Default: nullptr */ - CIMPP::Susceptance bch; /* Positive sequence shunt (charging) susceptance, uniformly distributed, of the entire line section. This value represents the full charging over the full length of the line. Default: nullptr */ - CIMPP::Conductance g0ch; /* Zero sequence shunt (charging) conductance, uniformly distributed, of the entire line section. Default: nullptr */ - CIMPP::Conductance gch; /* Positive sequence shunt (charging) conductance, uniformly distributed, of the entire line section. Default: nullptr */ - CIMPP::Resistance r; /* Positive sequence series resistance of the entire line section. Default: nullptr */ - CIMPP::Resistance r0; /* Zero sequence series resistance of the entire line section. Default: nullptr */ - CIMPP::Temperature shortCircuitEndTemperature; /* Maximum permitted temperature at the end of SC for the calculation of minimum short-circuit currents. Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::Reactance x; /* Positive sequence series reactance of the entire line section. Default: nullptr */ - CIMPP::Reactance x0; /* Zero sequence series reactance of the entire line section. Default: nullptr */ + /** \brief Zero sequence shunt (charging) susceptance, uniformly distributed, of the entire line section. Default: nullptr */ + CIMPP::Susceptance b0ch; + + /** \brief Positive sequence shunt (charging) susceptance, uniformly distributed, of the entire line section. This value represents the full charging over the full length of the line. Default: nullptr */ + CIMPP::Susceptance bch; + + /** \brief Zero sequence shunt (charging) conductance, uniformly distributed, of the entire line section. Default: nullptr */ + CIMPP::Conductance g0ch; + + /** \brief Positive sequence shunt (charging) conductance, uniformly distributed, of the entire line section. Default: nullptr */ + CIMPP::Conductance gch; + + /** \brief Positive sequence series resistance of the entire line section. Default: nullptr */ + CIMPP::Resistance r; + + /** \brief Zero sequence series resistance of the entire line section. Default: nullptr */ + CIMPP::Resistance r0; + + /** \brief Maximum permitted temperature at the end of SC for the calculation of minimum short-circuit currents. Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::Temperature shortCircuitEndTemperature; + + /** \brief Positive sequence series reactance of the entire line section. Default: nullptr */ + CIMPP::Reactance x; + + /** \brief Zero sequence series reactance of the entire line section. Default: nullptr */ + CIMPP::Reactance x0; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Accumulator.cpp b/CGMES_2.4.15_16FEB2016/Accumulator.cpp index accb2f53f..0f56cb3a0 100644 --- a/CGMES_2.4.15_16FEB2016/Accumulator.cpp +++ b/CGMES_2.4.15_16FEB2016/Accumulator.cpp @@ -8,13 +8,13 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "AccumulatorValue.hpp" #include "AccumulatorLimitSet.hpp" +#include "AccumulatorValue.hpp" using namespace CIMPP; -Accumulator::Accumulator() {}; -Accumulator::~Accumulator() {}; +Accumulator::Accumulator() {} +Accumulator::~Accumulator() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ Accumulator::getPossibleProfilesForAttributes() const return map; } - - bool assign_AccumulatorValue_Accumulator(BaseClass*, BaseClass*); bool assign_Accumulator_AccumulatorValues(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_Accumulator_AccumulatorValues(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_AccumulatorLimitSet_Measurements(BaseClass*, BaseClass*); bool assign_Accumulator_LimitSets(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -87,7 +86,7 @@ const char* Accumulator::debugString() const void Accumulator::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Accumulator"), &Accumulator_factory)); + factory_map.emplace("cim:Accumulator", &Accumulator_factory); } void Accumulator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -96,8 +95,8 @@ void Accumulator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Accumulator.AccumulatorValues"), &assign_Accumulator_AccumulatorValues)); - assign_map.insert(std::make_pair(std::string("cim:Accumulator.LimitSets"), &assign_Accumulator_LimitSets)); + assign_map.emplace("cim:Accumulator.AccumulatorValues", &assign_Accumulator_AccumulatorValues); + assign_map.emplace("cim:Accumulator.LimitSets", &assign_Accumulator_LimitSets); } void Accumulator::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/Accumulator.hpp b/CGMES_2.4.15_16FEB2016/Accumulator.hpp index 4d851c20d..0ea3177cb 100644 --- a/CGMES_2.4.15_16FEB2016/Accumulator.hpp +++ b/CGMES_2.4.15_16FEB2016/Accumulator.hpp @@ -18,9 +18,7 @@ namespace CIMPP class AccumulatorLimitSet; class AccumulatorValue; - /* - Accumulator represents an accumulated (counted) Measurement, e.g. an energy value. - */ + /** \brief Accumulator represents an accumulated (counted) Measurement, e.g. an energy value. */ class Accumulator : public Measurement { public: @@ -28,8 +26,11 @@ namespace CIMPP Accumulator(); ~Accumulator() override; - std::list AccumulatorValues; /* Measurement to which this value is connected. Default: 0 */ - std::list LimitSets; /* The Measurements using the LimitSet. Default: 0 */ + /** \brief Measurement to which this value is connected. Default: 0 */ + std::list AccumulatorValues; + + /** \brief The Measurements using the LimitSet. Default: 0 */ + std::list LimitSets; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/AccumulatorLimit.cpp b/CGMES_2.4.15_16FEB2016/AccumulatorLimit.cpp index f876fc8c7..f04f7dc98 100644 --- a/CGMES_2.4.15_16FEB2016/AccumulatorLimit.cpp +++ b/CGMES_2.4.15_16FEB2016/AccumulatorLimit.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "AccumulatorLimitSet.hpp" -#include "Integer.hpp" using namespace CIMPP; -AccumulatorLimit::AccumulatorLimit() : LimitSet(nullptr) {}; -AccumulatorLimit::~AccumulatorLimit() {}; +AccumulatorLimit::AccumulatorLimit() : LimitSet(nullptr) {} +AccumulatorLimit::~AccumulatorLimit() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ AccumulatorLimit::getPossibleProfilesForAttributes() const return map; } - -bool assign_AccumulatorLimit_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (AccumulatorLimit* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->value; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_AccumulatorLimitSet_Limits(BaseClass*, BaseClass*); bool assign_AccumulatorLimit_LimitSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_AccumulatorLimit_LimitSet(BaseClass* BaseClass_ptr1, BaseClass* Base return false; } -bool get_AccumulatorLimit_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_AccumulatorLimit_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const AccumulatorLimit* element = dynamic_cast(BaseClass_ptr1)) + AccumulatorLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->value; - if (!buffer.str().empty()) + buffer >> element->value; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_AccumulatorLimit_LimitSet(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AccumulatorLimit* element = dynamic_cast(BaseClass_ptr1)) + const AccumulatorLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->LimitSet != 0) { @@ -102,6 +86,20 @@ bool get_AccumulatorLimit_LimitSet(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->value; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char AccumulatorLimit::debugName[] = "AccumulatorLimit"; const char* AccumulatorLimit::debugString() const @@ -111,17 +109,17 @@ const char* AccumulatorLimit::debugString() const void AccumulatorLimit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AccumulatorLimit"), &AccumulatorLimit_factory)); + factory_map.emplace("cim:AccumulatorLimit", &AccumulatorLimit_factory); } void AccumulatorLimit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AccumulatorLimit.value"), &assign_AccumulatorLimit_value)); + assign_map.emplace("cim:AccumulatorLimit.value", &assign_AccumulatorLimit_value); } void AccumulatorLimit::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AccumulatorLimit.LimitSet"), &assign_AccumulatorLimit_LimitSet)); + assign_map.emplace("cim:AccumulatorLimit.LimitSet", &assign_AccumulatorLimit_LimitSet); } void AccumulatorLimit::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/AccumulatorLimit.hpp b/CGMES_2.4.15_16FEB2016/AccumulatorLimit.hpp index d64fc8fab..e49dffefb 100644 --- a/CGMES_2.4.15_16FEB2016/AccumulatorLimit.hpp +++ b/CGMES_2.4.15_16FEB2016/AccumulatorLimit.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class AccumulatorLimitSet; - /* - Limit values for Accumulator measurements. - */ + /** \brief Limit values for Accumulator measurements. */ class AccumulatorLimit : public Limit { public: @@ -28,8 +26,11 @@ namespace CIMPP AccumulatorLimit(); ~AccumulatorLimit() override; - CIMPP::AccumulatorLimitSet* LimitSet; /* The limit values used for supervision of Measurements. Default: 0 */ - CIMPP::Integer value; /* The value to supervise against. The value is positive. Default: 0 */ + /** \brief The limit values used for supervision of Measurements. Default: 0 */ + CIMPP::AccumulatorLimitSet* LimitSet; + + /** \brief The value to supervise against. The value is positive. Default: 0 */ + CIMPP::Integer value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/AccumulatorLimitSet.cpp b/CGMES_2.4.15_16FEB2016/AccumulatorLimitSet.cpp index 2d49d0a1f..d67146814 100644 --- a/CGMES_2.4.15_16FEB2016/AccumulatorLimitSet.cpp +++ b/CGMES_2.4.15_16FEB2016/AccumulatorLimitSet.cpp @@ -8,13 +8,13 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "AccumulatorLimit.hpp" #include "Accumulator.hpp" +#include "AccumulatorLimit.hpp" using namespace CIMPP; -AccumulatorLimitSet::AccumulatorLimitSet() {}; -AccumulatorLimitSet::~AccumulatorLimitSet() {}; +AccumulatorLimitSet::AccumulatorLimitSet() {} +AccumulatorLimitSet::~AccumulatorLimitSet() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ AccumulatorLimitSet::getPossibleProfilesForAttributes() const return map; } - - bool assign_AccumulatorLimit_LimitSet(BaseClass*, BaseClass*); bool assign_AccumulatorLimitSet_Limits(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_AccumulatorLimitSet_Limits(BaseClass* BaseClass_ptr1, BaseClass* Bas } return false; } + bool assign_Accumulator_LimitSets(BaseClass*, BaseClass*); bool assign_AccumulatorLimitSet_Measurements(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -80,7 +79,8 @@ bool assign_AccumulatorLimitSet_Measurements(BaseClass* BaseClass_ptr1, BaseClas bool get_AccumulatorLimitSet_Measurements(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AccumulatorLimitSet* element = dynamic_cast(BaseClass_ptr1)) + const AccumulatorLimitSet* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { std::copy(element->Measurements.begin(), element->Measurements.end(), std::back_inserter(BaseClass_list)); return !BaseClass_list.empty(); @@ -88,7 +88,6 @@ bool get_AccumulatorLimitSet_Measurements(const BaseClass* BaseClass_ptr1, std:: return false; } - const char AccumulatorLimitSet::debugName[] = "AccumulatorLimitSet"; const char* AccumulatorLimitSet::debugString() const { @@ -97,7 +96,7 @@ const char* AccumulatorLimitSet::debugString() const void AccumulatorLimitSet::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AccumulatorLimitSet"), &AccumulatorLimitSet_factory)); + factory_map.emplace("cim:AccumulatorLimitSet", &AccumulatorLimitSet_factory); } void AccumulatorLimitSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -106,8 +105,8 @@ void AccumulatorLimitSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AccumulatorLimitSet.Limits"), &assign_AccumulatorLimitSet_Limits)); - assign_map.insert(std::make_pair(std::string("cim:AccumulatorLimitSet.Measurements"), &assign_AccumulatorLimitSet_Measurements)); + assign_map.emplace("cim:AccumulatorLimitSet.Limits", &assign_AccumulatorLimitSet_Limits); + assign_map.emplace("cim:AccumulatorLimitSet.Measurements", &assign_AccumulatorLimitSet_Measurements); } void AccumulatorLimitSet::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/AccumulatorLimitSet.hpp b/CGMES_2.4.15_16FEB2016/AccumulatorLimitSet.hpp index a914ab48a..3da387ef1 100644 --- a/CGMES_2.4.15_16FEB2016/AccumulatorLimitSet.hpp +++ b/CGMES_2.4.15_16FEB2016/AccumulatorLimitSet.hpp @@ -18,9 +18,7 @@ namespace CIMPP class Accumulator; class AccumulatorLimit; - /* - An AccumulatorLimitSet specifies a set of Limits that are associated with an Accumulator measurement. - */ + /** \brief An AccumulatorLimitSet specifies a set of Limits that are associated with an Accumulator measurement. */ class AccumulatorLimitSet : public LimitSet { public: @@ -28,8 +26,11 @@ namespace CIMPP AccumulatorLimitSet(); ~AccumulatorLimitSet() override; - std::list Limits; /* The set of limits. Default: 0 */ - std::list Measurements; /* A measurement may have zero or more limit ranges defined for it. Default: 0 */ + /** \brief The set of limits. Default: 0 */ + std::list Limits; + + /** \brief A measurement may have zero or more limit ranges defined for it. Default: 0 */ + std::list Measurements; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/AccumulatorReset.cpp b/CGMES_2.4.15_16FEB2016/AccumulatorReset.cpp index 4fcaaba29..ae3e698db 100644 --- a/CGMES_2.4.15_16FEB2016/AccumulatorReset.cpp +++ b/CGMES_2.4.15_16FEB2016/AccumulatorReset.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -AccumulatorReset::AccumulatorReset() : AccumulatorValue(nullptr) {}; -AccumulatorReset::~AccumulatorReset() {}; +AccumulatorReset::AccumulatorReset() : AccumulatorValue(nullptr) {} +AccumulatorReset::~AccumulatorReset() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ AccumulatorReset::getPossibleProfilesForAttributes() const return map; } - - bool assign_AccumulatorValue_AccumulatorReset(BaseClass*, BaseClass*); bool assign_AccumulatorReset_AccumulatorValue(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_AccumulatorReset_AccumulatorValue(BaseClass* BaseClass_ptr1, BaseCla return false; } - bool get_AccumulatorReset_AccumulatorValue(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AccumulatorReset* element = dynamic_cast(BaseClass_ptr1)) + const AccumulatorReset* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->AccumulatorValue != 0) { @@ -73,7 +71,6 @@ bool get_AccumulatorReset_AccumulatorValue(const BaseClass* BaseClass_ptr1, std: return false; } - const char AccumulatorReset::debugName[] = "AccumulatorReset"; const char* AccumulatorReset::debugString() const { @@ -82,7 +79,7 @@ const char* AccumulatorReset::debugString() const void AccumulatorReset::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AccumulatorReset"), &AccumulatorReset_factory)); + factory_map.emplace("cim:AccumulatorReset", &AccumulatorReset_factory); } void AccumulatorReset::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void AccumulatorReset::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AccumulatorReset.AccumulatorValue"), &assign_AccumulatorReset_AccumulatorValue)); + assign_map.emplace("cim:AccumulatorReset.AccumulatorValue", &assign_AccumulatorReset_AccumulatorValue); } void AccumulatorReset::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/AccumulatorReset.hpp b/CGMES_2.4.15_16FEB2016/AccumulatorReset.hpp index d474cb11c..8c35f6e44 100644 --- a/CGMES_2.4.15_16FEB2016/AccumulatorReset.hpp +++ b/CGMES_2.4.15_16FEB2016/AccumulatorReset.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class AccumulatorValue; - /* - This command reset the counter value to zero. - */ + /** \brief This command reset the counter value to zero. */ class AccumulatorReset : public Control { public: @@ -27,7 +25,8 @@ namespace CIMPP AccumulatorReset(); ~AccumulatorReset() override; - CIMPP::AccumulatorValue* AccumulatorValue; /* The accumulator value that is reset by the command. Default: 0 */ + /** \brief The accumulator value that is reset by the command. Default: 0 */ + CIMPP::AccumulatorValue* AccumulatorValue; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/AccumulatorValue.cpp b/CGMES_2.4.15_16FEB2016/AccumulatorValue.cpp index b26655b9b..7311c3091 100644 --- a/CGMES_2.4.15_16FEB2016/AccumulatorValue.cpp +++ b/CGMES_2.4.15_16FEB2016/AccumulatorValue.cpp @@ -10,12 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "Accumulator.hpp" #include "AccumulatorReset.hpp" -#include "Integer.hpp" using namespace CIMPP; -AccumulatorValue::AccumulatorValue() : Accumulator(nullptr), AccumulatorReset(nullptr) {}; -AccumulatorValue::~AccumulatorValue() {}; +AccumulatorValue::AccumulatorValue() : Accumulator(nullptr), AccumulatorReset(nullptr) {} +AccumulatorValue::~AccumulatorValue() {} static const std::list PossibleProfilesForClass = { @@ -44,21 +43,6 @@ AccumulatorValue::getPossibleProfilesForAttributes() const return map; } - -bool assign_AccumulatorValue_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (AccumulatorValue* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->value; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_Accumulator_AccumulatorValues(BaseClass*, BaseClass*); bool assign_AccumulatorValue_Accumulator(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -75,6 +59,7 @@ bool assign_AccumulatorValue_Accumulator(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_AccumulatorReset_AccumulatorValue(BaseClass*, BaseClass*); bool assign_AccumulatorValue_AccumulatorReset(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -92,24 +77,24 @@ bool assign_AccumulatorValue_AccumulatorReset(BaseClass* BaseClass_ptr1, BaseCla return false; } -bool get_AccumulatorValue_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_AccumulatorValue_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const AccumulatorValue* element = dynamic_cast(BaseClass_ptr1)) + AccumulatorValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->value; - if (!buffer.str().empty()) + buffer >> element->value; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_AccumulatorValue_Accumulator(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AccumulatorValue* element = dynamic_cast(BaseClass_ptr1)) + const AccumulatorValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Accumulator != 0) { @@ -121,6 +106,21 @@ bool get_AccumulatorValue_Accumulator(const BaseClass* BaseClass_ptr1, std::list } +bool get_AccumulatorValue_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const AccumulatorValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->value; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + const char AccumulatorValue::debugName[] = "AccumulatorValue"; const char* AccumulatorValue::debugString() const { @@ -129,18 +129,18 @@ const char* AccumulatorValue::debugString() const void AccumulatorValue::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AccumulatorValue"), &AccumulatorValue_factory)); + factory_map.emplace("cim:AccumulatorValue", &AccumulatorValue_factory); } void AccumulatorValue::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AccumulatorValue.value"), &assign_AccumulatorValue_value)); + assign_map.emplace("cim:AccumulatorValue.value", &assign_AccumulatorValue_value); } void AccumulatorValue::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AccumulatorValue.Accumulator"), &assign_AccumulatorValue_Accumulator)); - assign_map.insert(std::make_pair(std::string("cim:AccumulatorValue.AccumulatorReset"), &assign_AccumulatorValue_AccumulatorReset)); + assign_map.emplace("cim:AccumulatorValue.Accumulator", &assign_AccumulatorValue_Accumulator); + assign_map.emplace("cim:AccumulatorValue.AccumulatorReset", &assign_AccumulatorValue_AccumulatorReset); } void AccumulatorValue::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/AccumulatorValue.hpp b/CGMES_2.4.15_16FEB2016/AccumulatorValue.hpp index 715cf4a55..3a573eb45 100644 --- a/CGMES_2.4.15_16FEB2016/AccumulatorValue.hpp +++ b/CGMES_2.4.15_16FEB2016/AccumulatorValue.hpp @@ -19,9 +19,7 @@ namespace CIMPP class Accumulator; class AccumulatorReset; - /* - AccumulatorValue represents an accumulated (counted) MeasurementValue. - */ + /** \brief AccumulatorValue represents an accumulated (counted) MeasurementValue. */ class AccumulatorValue : public MeasurementValue { public: @@ -29,9 +27,14 @@ namespace CIMPP AccumulatorValue(); ~AccumulatorValue() override; - CIMPP::Accumulator* Accumulator; /* The values connected to this measurement. Default: 0 */ - CIMPP::AccumulatorReset* AccumulatorReset; /* The command that reset the accumulator value. Default: 0 */ - CIMPP::Integer value; /* The value to supervise. The value is positive. Default: 0 */ + /** \brief The values connected to this measurement. Default: 0 */ + CIMPP::Accumulator* Accumulator; + + /** \brief The command that reset the accumulator value. Default: 0 */ + CIMPP::AccumulatorReset* AccumulatorReset; + + /** \brief The value to supervise. The value is positive. Default: 0 */ + CIMPP::Integer value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ActivePower.hpp b/CGMES_2.4.15_16FEB2016/ActivePower.hpp index d1a142af8..37f33d93d 100644 --- a/CGMES_2.4.15_16FEB2016/ActivePower.hpp +++ b/CGMES_2.4.15_16FEB2016/ActivePower.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Product of RMS value of the voltage and the RMS value of the in-phase component of the current. - */ + /** \brief Product of RMS value of the voltage and the RMS value of the in-phase component of the current. */ class ActivePower { public: diff --git a/CGMES_2.4.15_16FEB2016/ActivePowerLimit.cpp b/CGMES_2.4.15_16FEB2016/ActivePowerLimit.cpp index 587b83aff..d05a279c9 100644 --- a/CGMES_2.4.15_16FEB2016/ActivePowerLimit.cpp +++ b/CGMES_2.4.15_16FEB2016/ActivePowerLimit.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "ActivePower.hpp" using namespace CIMPP; -ActivePowerLimit::ActivePowerLimit() {}; -ActivePowerLimit::~ActivePowerLimit() {}; +ActivePowerLimit::ActivePowerLimit() {} +ActivePowerLimit::~ActivePowerLimit() {} static const std::list PossibleProfilesForClass = { @@ -40,25 +39,24 @@ ActivePowerLimit::getPossibleProfilesForAttributes() const return map; } - -bool assign_ActivePowerLimit_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ActivePowerLimit_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ActivePowerLimit* element = dynamic_cast(BaseClass_ptr1)) + ActivePowerLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->value; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ActivePowerLimit_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ActivePowerLimit* element = dynamic_cast(BaseClass_ptr1)) + const ActivePowerLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value; if (!buffer.str().empty()) @@ -70,8 +68,6 @@ bool get_ActivePowerLimit_value(const BaseClass* BaseClass_ptr1, std::stringstre return false; } - - const char ActivePowerLimit::debugName[] = "ActivePowerLimit"; const char* ActivePowerLimit::debugString() const { @@ -80,12 +76,12 @@ const char* ActivePowerLimit::debugString() const void ActivePowerLimit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ActivePowerLimit"), &ActivePowerLimit_factory)); + factory_map.emplace("cim:ActivePowerLimit", &ActivePowerLimit_factory); } void ActivePowerLimit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ActivePowerLimit.value"), &assign_ActivePowerLimit_value)); + assign_map.emplace("cim:ActivePowerLimit.value", &assign_ActivePowerLimit_value); } void ActivePowerLimit::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ActivePowerLimit.hpp b/CGMES_2.4.15_16FEB2016/ActivePowerLimit.hpp index b13c05c4a..cdf99235b 100644 --- a/CGMES_2.4.15_16FEB2016/ActivePowerLimit.hpp +++ b/CGMES_2.4.15_16FEB2016/ActivePowerLimit.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Limit on active power flow. - */ + /** \brief Limit on active power flow. */ class ActivePowerLimit : public OperationalLimit { public: @@ -27,7 +25,8 @@ namespace CIMPP ActivePowerLimit(); ~ActivePowerLimit() override; - CIMPP::ActivePower value; /* Value of active power limit. Default: nullptr */ + /** \brief Value of active power limit. Default: nullptr */ + CIMPP::ActivePower value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ActivePowerPerFrequency.hpp b/CGMES_2.4.15_16FEB2016/ActivePowerPerFrequency.hpp index f8b5bd3ab..dbbdb347e 100644 --- a/CGMES_2.4.15_16FEB2016/ActivePowerPerFrequency.hpp +++ b/CGMES_2.4.15_16FEB2016/ActivePowerPerFrequency.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Active power variation with frequency. - */ + /** \brief Active power variation with frequency. */ class ActivePowerPerFrequency { public: diff --git a/CGMES_2.4.15_16FEB2016/Analog.cpp b/CGMES_2.4.15_16FEB2016/Analog.cpp index 2721f0af2..d11d78a05 100644 --- a/CGMES_2.4.15_16FEB2016/Analog.cpp +++ b/CGMES_2.4.15_16FEB2016/Analog.cpp @@ -8,14 +8,13 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "AnalogValue.hpp" #include "AnalogLimitSet.hpp" -#include "Boolean.hpp" +#include "AnalogValue.hpp" using namespace CIMPP; -Analog::Analog() {}; -Analog::~Analog() {}; +Analog::Analog() {} +Analog::~Analog() {} static const std::list PossibleProfilesForClass = { @@ -44,21 +43,6 @@ Analog::getPossibleProfilesForAttributes() const return map; } - -bool assign_Analog_positiveFlowIn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (Analog* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->positiveFlowIn; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_AnalogValue_Analog(BaseClass*, BaseClass*); bool assign_Analog_AnalogValues(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -75,6 +59,7 @@ bool assign_Analog_AnalogValues(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ } return false; } + bool assign_AnalogLimitSet_Measurements(BaseClass*, BaseClass*); bool assign_Analog_LimitSets(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -92,9 +77,26 @@ bool assign_Analog_LimitSets(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr return false; } +bool assign_Analog_positiveFlowIn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + Analog* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->positiveFlowIn; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + + bool get_Analog_positiveFlowIn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Analog* element = dynamic_cast(BaseClass_ptr1)) + const Analog* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->positiveFlowIn; if (!buffer.str().empty()) @@ -106,8 +108,6 @@ bool get_Analog_positiveFlowIn(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } - - const char Analog::debugName[] = "Analog"; const char* Analog::debugString() const { @@ -116,18 +116,18 @@ const char* Analog::debugString() const void Analog::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Analog"), &Analog_factory)); + factory_map.emplace("cim:Analog", &Analog_factory); } void Analog::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Analog.positiveFlowIn"), &assign_Analog_positiveFlowIn)); + assign_map.emplace("cim:Analog.positiveFlowIn", &assign_Analog_positiveFlowIn); } void Analog::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Analog.AnalogValues"), &assign_Analog_AnalogValues)); - assign_map.insert(std::make_pair(std::string("cim:Analog.LimitSets"), &assign_Analog_LimitSets)); + assign_map.emplace("cim:Analog.AnalogValues", &assign_Analog_AnalogValues); + assign_map.emplace("cim:Analog.LimitSets", &assign_Analog_LimitSets); } void Analog::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/Analog.hpp b/CGMES_2.4.15_16FEB2016/Analog.hpp index 667a90c4f..38ba38c37 100644 --- a/CGMES_2.4.15_16FEB2016/Analog.hpp +++ b/CGMES_2.4.15_16FEB2016/Analog.hpp @@ -19,9 +19,7 @@ namespace CIMPP class AnalogLimitSet; class AnalogValue; - /* - Analog represents an analog Measurement. - */ + /** \brief Analog represents an analog Measurement. */ class Analog : public Measurement { public: @@ -29,9 +27,14 @@ namespace CIMPP Analog(); ~Analog() override; - std::list AnalogValues; /* Measurement to which this value is connected. Default: 0 */ - std::list LimitSets; /* The Measurements using the LimitSet. Default: 0 */ - CIMPP::Boolean positiveFlowIn; /* If true then this measurement is an active power, reactive power or current with the convention that a positive value measured at the Terminal means power is flowing into the related PowerSystemResource. Default: false */ + /** \brief Measurement to which this value is connected. Default: 0 */ + std::list AnalogValues; + + /** \brief The Measurements using the LimitSet. Default: 0 */ + std::list LimitSets; + + /** \brief If true then this measurement is an active power, reactive power or current with the convention that a positive value measured at the Terminal means power is flowing into the related PowerSystemResource. Default: false */ + CIMPP::Boolean positiveFlowIn; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/AnalogControl.cpp b/CGMES_2.4.15_16FEB2016/AnalogControl.cpp index 1e6f809f9..aba858065 100644 --- a/CGMES_2.4.15_16FEB2016/AnalogControl.cpp +++ b/CGMES_2.4.15_16FEB2016/AnalogControl.cpp @@ -9,13 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "AnalogValue.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -AnalogControl::AnalogControl() : AnalogValue(nullptr) {}; -AnalogControl::~AnalogControl() {}; +AnalogControl::AnalogControl() : AnalogValue(nullptr) {} +AnalogControl::~AnalogControl() {} static const std::list PossibleProfilesForClass = { @@ -44,70 +42,71 @@ AnalogControl::getPossibleProfilesForAttributes() const return map; } - -bool assign_AnalogControl_maxValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AnalogValue_AnalogControl(BaseClass*, BaseClass*); +bool assign_AnalogControl_AnalogValue(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (AnalogControl* element = dynamic_cast(BaseClass_ptr1)) + AnalogControl* element = dynamic_cast(BaseClass_ptr1); + AnalogValue* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->maxValue; - if (buffer.fail()) - return false; - else - return true; + if (element->AnalogValue != element2) + { + element->AnalogValue = element2; + return assign_AnalogValue_AnalogControl(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_AnalogControl_minValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AnalogControl_maxValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AnalogControl* element = dynamic_cast(BaseClass_ptr1)) + AnalogControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->minValue; - if (buffer.fail()) - return false; - else + buffer >> element->maxValue; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_AnalogValue_AnalogControl(BaseClass*, BaseClass*); -bool assign_AnalogControl_AnalogValue(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_AnalogControl_minValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { AnalogControl* element = dynamic_cast(BaseClass_ptr1); - AnalogValue* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->AnalogValue != element2) + buffer >> element->minValue; + if (!buffer.fail()) { - element->AnalogValue = element2; - return assign_AnalogValue_AnalogControl(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool get_AnalogControl_maxValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_AnalogControl_AnalogValue(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AnalogControl* element = dynamic_cast(BaseClass_ptr1)) + const AnalogControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->maxValue; - if (!buffer.str().empty()) + if (element->AnalogValue != 0) { + BaseClass_list.push_back(element->AnalogValue); return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_AnalogControl_minValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_AnalogControl_maxValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AnalogControl* element = dynamic_cast(BaseClass_ptr1)) + const AnalogControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->minValue; + buffer << element->maxValue; if (!buffer.str().empty()) { return true; @@ -117,21 +116,21 @@ bool get_AnalogControl_minValue(const BaseClass* BaseClass_ptr1, std::stringstre return false; } - -bool get_AnalogControl_AnalogValue(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) +bool get_AnalogControl_minValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AnalogControl* element = dynamic_cast(BaseClass_ptr1)) + const AnalogControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->AnalogValue != 0) + buffer << element->minValue; + if (!buffer.str().empty()) { - BaseClass_list.push_back(element->AnalogValue); return true; } } + buffer.setstate(std::ios::failbit); return false; } - const char AnalogControl::debugName[] = "AnalogControl"; const char* AnalogControl::debugString() const { @@ -140,18 +139,18 @@ const char* AnalogControl::debugString() const void AnalogControl::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AnalogControl"), &AnalogControl_factory)); + factory_map.emplace("cim:AnalogControl", &AnalogControl_factory); } void AnalogControl::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AnalogControl.maxValue"), &assign_AnalogControl_maxValue)); - assign_map.insert(std::make_pair(std::string("cim:AnalogControl.minValue"), &assign_AnalogControl_minValue)); + assign_map.emplace("cim:AnalogControl.maxValue", &assign_AnalogControl_maxValue); + assign_map.emplace("cim:AnalogControl.minValue", &assign_AnalogControl_minValue); } void AnalogControl::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AnalogControl.AnalogValue"), &assign_AnalogControl_AnalogValue)); + assign_map.emplace("cim:AnalogControl.AnalogValue", &assign_AnalogControl_AnalogValue); } void AnalogControl::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/AnalogControl.hpp b/CGMES_2.4.15_16FEB2016/AnalogControl.hpp index 546706c40..8185c302e 100644 --- a/CGMES_2.4.15_16FEB2016/AnalogControl.hpp +++ b/CGMES_2.4.15_16FEB2016/AnalogControl.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class AnalogValue; - /* - An analog control used for supervisory control. - */ + /** \brief An analog control used for supervisory control. */ class AnalogControl : public Control { public: @@ -28,9 +26,14 @@ namespace CIMPP AnalogControl(); ~AnalogControl() override; - CIMPP::AnalogValue* AnalogValue; /* The Control variable associated with the MeasurementValue. Default: 0 */ - CIMPP::Simple_Float maxValue; /* Normal value range maximum for any of the Control.value. Used for scaling, e.g. in bar graphs. Default: nullptr */ - CIMPP::Simple_Float minValue; /* Normal value range minimum for any of the Control.value. Used for scaling, e.g. in bar graphs. Default: nullptr */ + /** \brief The Control variable associated with the MeasurementValue. Default: 0 */ + CIMPP::AnalogValue* AnalogValue; + + /** \brief Normal value range maximum for any of the Control.value. Used for scaling, e.g. in bar graphs. Default: nullptr */ + CIMPP::Simple_Float maxValue; + + /** \brief Normal value range minimum for any of the Control.value. Used for scaling, e.g. in bar graphs. Default: nullptr */ + CIMPP::Simple_Float minValue; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/AnalogLimit.cpp b/CGMES_2.4.15_16FEB2016/AnalogLimit.cpp index 0408b5298..007d1c5d0 100644 --- a/CGMES_2.4.15_16FEB2016/AnalogLimit.cpp +++ b/CGMES_2.4.15_16FEB2016/AnalogLimit.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "AnalogLimitSet.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -AnalogLimit::AnalogLimit() : LimitSet(nullptr) {}; -AnalogLimit::~AnalogLimit() {}; +AnalogLimit::AnalogLimit() : LimitSet(nullptr) {} +AnalogLimit::~AnalogLimit() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ AnalogLimit::getPossibleProfilesForAttributes() const return map; } - -bool assign_AnalogLimit_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (AnalogLimit* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->value; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_AnalogLimitSet_Limits(BaseClass*, BaseClass*); bool assign_AnalogLimit_LimitSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_AnalogLimit_LimitSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass return false; } -bool get_AnalogLimit_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_AnalogLimit_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const AnalogLimit* element = dynamic_cast(BaseClass_ptr1)) + AnalogLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->value; - if (!buffer.str().empty()) + buffer >> element->value; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_AnalogLimit_LimitSet(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AnalogLimit* element = dynamic_cast(BaseClass_ptr1)) + const AnalogLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->LimitSet != 0) { @@ -102,6 +86,20 @@ bool get_AnalogLimit_LimitSet(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->value; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char AnalogLimit::debugName[] = "AnalogLimit"; const char* AnalogLimit::debugString() const @@ -111,17 +109,17 @@ const char* AnalogLimit::debugString() const void AnalogLimit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AnalogLimit"), &AnalogLimit_factory)); + factory_map.emplace("cim:AnalogLimit", &AnalogLimit_factory); } void AnalogLimit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AnalogLimit.value"), &assign_AnalogLimit_value)); + assign_map.emplace("cim:AnalogLimit.value", &assign_AnalogLimit_value); } void AnalogLimit::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AnalogLimit.LimitSet"), &assign_AnalogLimit_LimitSet)); + assign_map.emplace("cim:AnalogLimit.LimitSet", &assign_AnalogLimit_LimitSet); } void AnalogLimit::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/AnalogLimit.hpp b/CGMES_2.4.15_16FEB2016/AnalogLimit.hpp index 1d0aefb00..58ddbd984 100644 --- a/CGMES_2.4.15_16FEB2016/AnalogLimit.hpp +++ b/CGMES_2.4.15_16FEB2016/AnalogLimit.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class AnalogLimitSet; - /* - Limit values for Analog measurements. - */ + /** \brief Limit values for Analog measurements. */ class AnalogLimit : public Limit { public: @@ -28,8 +26,11 @@ namespace CIMPP AnalogLimit(); ~AnalogLimit() override; - CIMPP::AnalogLimitSet* LimitSet; /* The limit values used for supervision of Measurements. Default: 0 */ - CIMPP::Simple_Float value; /* The value to supervise against. Default: nullptr */ + /** \brief The limit values used for supervision of Measurements. Default: 0 */ + CIMPP::AnalogLimitSet* LimitSet; + + /** \brief The value to supervise against. Default: nullptr */ + CIMPP::Simple_Float value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/AnalogLimitSet.cpp b/CGMES_2.4.15_16FEB2016/AnalogLimitSet.cpp index 2fd97f4a4..ecf5a0e67 100644 --- a/CGMES_2.4.15_16FEB2016/AnalogLimitSet.cpp +++ b/CGMES_2.4.15_16FEB2016/AnalogLimitSet.cpp @@ -8,13 +8,13 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "AnalogLimit.hpp" #include "Analog.hpp" +#include "AnalogLimit.hpp" using namespace CIMPP; -AnalogLimitSet::AnalogLimitSet() {}; -AnalogLimitSet::~AnalogLimitSet() {}; +AnalogLimitSet::AnalogLimitSet() {} +AnalogLimitSet::~AnalogLimitSet() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ AnalogLimitSet::getPossibleProfilesForAttributes() const return map; } - - bool assign_AnalogLimit_LimitSet(BaseClass*, BaseClass*); bool assign_AnalogLimitSet_Limits(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_AnalogLimitSet_Limits(BaseClass* BaseClass_ptr1, BaseClass* BaseClas } return false; } + bool assign_Analog_LimitSets(BaseClass*, BaseClass*); bool assign_AnalogLimitSet_Measurements(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -80,7 +79,8 @@ bool assign_AnalogLimitSet_Measurements(BaseClass* BaseClass_ptr1, BaseClass* Ba bool get_AnalogLimitSet_Measurements(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AnalogLimitSet* element = dynamic_cast(BaseClass_ptr1)) + const AnalogLimitSet* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { std::copy(element->Measurements.begin(), element->Measurements.end(), std::back_inserter(BaseClass_list)); return !BaseClass_list.empty(); @@ -88,7 +88,6 @@ bool get_AnalogLimitSet_Measurements(const BaseClass* BaseClass_ptr1, std::list< return false; } - const char AnalogLimitSet::debugName[] = "AnalogLimitSet"; const char* AnalogLimitSet::debugString() const { @@ -97,7 +96,7 @@ const char* AnalogLimitSet::debugString() const void AnalogLimitSet::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AnalogLimitSet"), &AnalogLimitSet_factory)); + factory_map.emplace("cim:AnalogLimitSet", &AnalogLimitSet_factory); } void AnalogLimitSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -106,8 +105,8 @@ void AnalogLimitSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AnalogLimitSet.Limits"), &assign_AnalogLimitSet_Limits)); - assign_map.insert(std::make_pair(std::string("cim:AnalogLimitSet.Measurements"), &assign_AnalogLimitSet_Measurements)); + assign_map.emplace("cim:AnalogLimitSet.Limits", &assign_AnalogLimitSet_Limits); + assign_map.emplace("cim:AnalogLimitSet.Measurements", &assign_AnalogLimitSet_Measurements); } void AnalogLimitSet::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/AnalogLimitSet.hpp b/CGMES_2.4.15_16FEB2016/AnalogLimitSet.hpp index f7dbba7be..e5ecf9619 100644 --- a/CGMES_2.4.15_16FEB2016/AnalogLimitSet.hpp +++ b/CGMES_2.4.15_16FEB2016/AnalogLimitSet.hpp @@ -18,9 +18,7 @@ namespace CIMPP class Analog; class AnalogLimit; - /* - An AnalogLimitSet specifies a set of Limits that are associated with an Analog measurement. - */ + /** \brief An AnalogLimitSet specifies a set of Limits that are associated with an Analog measurement. */ class AnalogLimitSet : public LimitSet { public: @@ -28,8 +26,11 @@ namespace CIMPP AnalogLimitSet(); ~AnalogLimitSet() override; - std::list Limits; /* The set of limits. Default: 0 */ - std::list Measurements; /* A measurement may have zero or more limit ranges defined for it. Default: 0 */ + /** \brief The set of limits. Default: 0 */ + std::list Limits; + + /** \brief A measurement may have zero or more limit ranges defined for it. Default: 0 */ + std::list Measurements; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/AnalogValue.cpp b/CGMES_2.4.15_16FEB2016/AnalogValue.cpp index eac1a231b..2c9ec60f2 100644 --- a/CGMES_2.4.15_16FEB2016/AnalogValue.cpp +++ b/CGMES_2.4.15_16FEB2016/AnalogValue.cpp @@ -10,12 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "Analog.hpp" #include "AnalogControl.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -AnalogValue::AnalogValue() : Analog(nullptr), AnalogControl(nullptr) {}; -AnalogValue::~AnalogValue() {}; +AnalogValue::AnalogValue() : Analog(nullptr), AnalogControl(nullptr) {} +AnalogValue::~AnalogValue() {} static const std::list PossibleProfilesForClass = { @@ -44,21 +43,6 @@ AnalogValue::getPossibleProfilesForAttributes() const return map; } - -bool assign_AnalogValue_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (AnalogValue* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->value; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_Analog_AnalogValues(BaseClass*, BaseClass*); bool assign_AnalogValue_Analog(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -75,6 +59,7 @@ bool assign_AnalogValue_Analog(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_p } return false; } + bool assign_AnalogControl_AnalogValue(BaseClass*, BaseClass*); bool assign_AnalogValue_AnalogControl(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -92,24 +77,24 @@ bool assign_AnalogValue_AnalogControl(BaseClass* BaseClass_ptr1, BaseClass* Base return false; } -bool get_AnalogValue_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_AnalogValue_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const AnalogValue* element = dynamic_cast(BaseClass_ptr1)) + AnalogValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->value; - if (!buffer.str().empty()) + buffer >> element->value; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_AnalogValue_Analog(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AnalogValue* element = dynamic_cast(BaseClass_ptr1)) + const AnalogValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Analog != 0) { @@ -121,6 +106,21 @@ bool get_AnalogValue_Analog(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->value; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + const char AnalogValue::debugName[] = "AnalogValue"; const char* AnalogValue::debugString() const { @@ -129,18 +129,18 @@ const char* AnalogValue::debugString() const void AnalogValue::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AnalogValue"), &AnalogValue_factory)); + factory_map.emplace("cim:AnalogValue", &AnalogValue_factory); } void AnalogValue::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AnalogValue.value"), &assign_AnalogValue_value)); + assign_map.emplace("cim:AnalogValue.value", &assign_AnalogValue_value); } void AnalogValue::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AnalogValue.Analog"), &assign_AnalogValue_Analog)); - assign_map.insert(std::make_pair(std::string("cim:AnalogValue.AnalogControl"), &assign_AnalogValue_AnalogControl)); + assign_map.emplace("cim:AnalogValue.Analog", &assign_AnalogValue_Analog); + assign_map.emplace("cim:AnalogValue.AnalogControl", &assign_AnalogValue_AnalogControl); } void AnalogValue::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/AnalogValue.hpp b/CGMES_2.4.15_16FEB2016/AnalogValue.hpp index e8bc8c0fc..6a1f17faf 100644 --- a/CGMES_2.4.15_16FEB2016/AnalogValue.hpp +++ b/CGMES_2.4.15_16FEB2016/AnalogValue.hpp @@ -19,9 +19,7 @@ namespace CIMPP class Analog; class AnalogControl; - /* - AnalogValue represents an analog MeasurementValue. - */ + /** \brief AnalogValue represents an analog MeasurementValue. */ class AnalogValue : public MeasurementValue { public: @@ -29,9 +27,14 @@ namespace CIMPP AnalogValue(); ~AnalogValue() override; - CIMPP::Analog* Analog; /* The values connected to this measurement. Default: 0 */ - CIMPP::AnalogControl* AnalogControl; /* The MeasurementValue that is controlled. Default: 0 */ - CIMPP::Simple_Float value; /* The value to supervise. Default: nullptr */ + /** \brief The values connected to this measurement. Default: 0 */ + CIMPP::Analog* Analog; + + /** \brief The MeasurementValue that is controlled. Default: 0 */ + CIMPP::AnalogControl* AnalogControl; + + /** \brief The value to supervise. Default: nullptr */ + CIMPP::Simple_Float value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/AngleDegrees.hpp b/CGMES_2.4.15_16FEB2016/AngleDegrees.hpp index 39204363b..99fe46c0d 100644 --- a/CGMES_2.4.15_16FEB2016/AngleDegrees.hpp +++ b/CGMES_2.4.15_16FEB2016/AngleDegrees.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Measurement of angle in degrees. - */ + /** \brief Measurement of angle in degrees. */ class AngleDegrees { public: diff --git a/CGMES_2.4.15_16FEB2016/AngleRadians.hpp b/CGMES_2.4.15_16FEB2016/AngleRadians.hpp index 2ac29ff28..8f1659629 100644 --- a/CGMES_2.4.15_16FEB2016/AngleRadians.hpp +++ b/CGMES_2.4.15_16FEB2016/AngleRadians.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Phase angle in radians. - */ + /** \brief Phase angle in radians. */ class AngleRadians { public: diff --git a/CGMES_2.4.15_16FEB2016/ApparentPower.hpp b/CGMES_2.4.15_16FEB2016/ApparentPower.hpp index bcb8201e6..0142a98c0 100644 --- a/CGMES_2.4.15_16FEB2016/ApparentPower.hpp +++ b/CGMES_2.4.15_16FEB2016/ApparentPower.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Product of the RMS value of the voltage and the RMS value of the current. - */ + /** \brief Product of the RMS value of the voltage and the RMS value of the current. */ class ApparentPower { public: diff --git a/CGMES_2.4.15_16FEB2016/ApparentPowerLimit.cpp b/CGMES_2.4.15_16FEB2016/ApparentPowerLimit.cpp index ae3fa464c..adbb44d3c 100644 --- a/CGMES_2.4.15_16FEB2016/ApparentPowerLimit.cpp +++ b/CGMES_2.4.15_16FEB2016/ApparentPowerLimit.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "ApparentPower.hpp" using namespace CIMPP; -ApparentPowerLimit::ApparentPowerLimit() {}; -ApparentPowerLimit::~ApparentPowerLimit() {}; +ApparentPowerLimit::ApparentPowerLimit() {} +ApparentPowerLimit::~ApparentPowerLimit() {} static const std::list PossibleProfilesForClass = { @@ -40,25 +39,24 @@ ApparentPowerLimit::getPossibleProfilesForAttributes() const return map; } - -bool assign_ApparentPowerLimit_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ApparentPowerLimit_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ApparentPowerLimit* element = dynamic_cast(BaseClass_ptr1)) + ApparentPowerLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->value; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ApparentPowerLimit_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ApparentPowerLimit* element = dynamic_cast(BaseClass_ptr1)) + const ApparentPowerLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value; if (!buffer.str().empty()) @@ -70,8 +68,6 @@ bool get_ApparentPowerLimit_value(const BaseClass* BaseClass_ptr1, std::stringst return false; } - - const char ApparentPowerLimit::debugName[] = "ApparentPowerLimit"; const char* ApparentPowerLimit::debugString() const { @@ -80,12 +76,12 @@ const char* ApparentPowerLimit::debugString() const void ApparentPowerLimit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ApparentPowerLimit"), &ApparentPowerLimit_factory)); + factory_map.emplace("cim:ApparentPowerLimit", &ApparentPowerLimit_factory); } void ApparentPowerLimit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ApparentPowerLimit.value"), &assign_ApparentPowerLimit_value)); + assign_map.emplace("cim:ApparentPowerLimit.value", &assign_ApparentPowerLimit_value); } void ApparentPowerLimit::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ApparentPowerLimit.hpp b/CGMES_2.4.15_16FEB2016/ApparentPowerLimit.hpp index 77b406d8a..c9bf47334 100644 --- a/CGMES_2.4.15_16FEB2016/ApparentPowerLimit.hpp +++ b/CGMES_2.4.15_16FEB2016/ApparentPowerLimit.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Apparent power limit. - */ + /** \brief Apparent power limit. */ class ApparentPowerLimit : public OperationalLimit { public: @@ -27,7 +25,8 @@ namespace CIMPP ApparentPowerLimit(); ~ApparentPowerLimit() override; - CIMPP::ApparentPower value; /* The apparent power limit. Default: nullptr */ + /** \brief The apparent power limit. Default: nullptr */ + CIMPP::ApparentPower value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Area.hpp b/CGMES_2.4.15_16FEB2016/Area.hpp index 681c909b6..847a38b94 100644 --- a/CGMES_2.4.15_16FEB2016/Area.hpp +++ b/CGMES_2.4.15_16FEB2016/Area.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Area. - */ + /** \brief Area. */ class Area { public: diff --git a/CGMES_2.4.15_16FEB2016/AsynchronousMachine.cpp b/CGMES_2.4.15_16FEB2016/AsynchronousMachine.cpp index bad87183c..934692393 100644 --- a/CGMES_2.4.15_16FEB2016/AsynchronousMachine.cpp +++ b/CGMES_2.4.15_16FEB2016/AsynchronousMachine.cpp @@ -9,21 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "AsynchronousMachineDynamics.hpp" -#include "AsynchronousMachineKind.hpp" -#include "Boolean.hpp" -#include "PerCent.hpp" -#include "Simple_Float.hpp" -#include "Frequency.hpp" -#include "RotationSpeed.hpp" -#include "Integer.hpp" -#include "ActivePower.hpp" -#include "Boolean.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -AsynchronousMachine::AsynchronousMachine() : AsynchronousMachineDynamics(nullptr) {}; -AsynchronousMachine::~AsynchronousMachine() {}; +AsynchronousMachine::AsynchronousMachine() : AsynchronousMachineDynamics(nullptr) {} +AsynchronousMachine::~AsynchronousMachine() {} static const std::list PossibleProfilesForClass = { @@ -62,158 +52,183 @@ AsynchronousMachine::getPossibleProfilesForAttributes() const return map; } +bool assign_AsynchronousMachineDynamics_AsynchronousMachine(BaseClass*, BaseClass*); +bool assign_AsynchronousMachine_AsynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + AsynchronousMachineDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->AsynchronousMachineDynamics != element2) + { + element->AsynchronousMachineDynamics = element2; + return assign_AsynchronousMachineDynamics_AsynchronousMachine(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_AsynchronousMachine_asynchronousMachineType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_asynchronousMachineType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->asynchronousMachineType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachine_converterFedDrive(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_converterFedDrive(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->converterFedDrive; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachine_efficiency(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_efficiency(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efficiency; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachine_iaIrRatio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_iaIrRatio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->iaIrRatio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachine_nominalFrequency(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_nominalFrequency(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nominalFrequency; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachine_nominalSpeed(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_nominalSpeed(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nominalSpeed; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachine_polePairNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_polePairNumber(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->polePairNumber; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachine_ratedMechanicalPower(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_ratedMechanicalPower(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedMechanicalPower; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachine_reversible(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_reversible(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->reversible; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachine_rxLockedRotorRatio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_rxLockedRotorRatio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rxLockedRotorRatio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachineDynamics_AsynchronousMachine(BaseClass*, BaseClass*); -bool assign_AsynchronousMachine_AsynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_AsynchronousMachine_asynchronousMachineType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); - AsynchronousMachineDynamics* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->AsynchronousMachineDynamics != element2) + buffer << element->asynchronousMachineType; + if (!buffer.str().empty()) { - element->AsynchronousMachineDynamics = element2; - return assign_AsynchronousMachineDynamics_AsynchronousMachine(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } + buffer.setstate(std::ios::failbit); return false; } bool get_AsynchronousMachine_converterFedDrive(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->converterFedDrive; if (!buffer.str().empty()) @@ -227,7 +242,8 @@ bool get_AsynchronousMachine_converterFedDrive(const BaseClass* BaseClass_ptr1, bool get_AsynchronousMachine_efficiency(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efficiency; if (!buffer.str().empty()) @@ -241,7 +257,8 @@ bool get_AsynchronousMachine_efficiency(const BaseClass* BaseClass_ptr1, std::st bool get_AsynchronousMachine_iaIrRatio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->iaIrRatio; if (!buffer.str().empty()) @@ -255,7 +272,8 @@ bool get_AsynchronousMachine_iaIrRatio(const BaseClass* BaseClass_ptr1, std::str bool get_AsynchronousMachine_nominalFrequency(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nominalFrequency; if (!buffer.str().empty()) @@ -269,7 +287,8 @@ bool get_AsynchronousMachine_nominalFrequency(const BaseClass* BaseClass_ptr1, s bool get_AsynchronousMachine_nominalSpeed(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nominalSpeed; if (!buffer.str().empty()) @@ -283,7 +302,8 @@ bool get_AsynchronousMachine_nominalSpeed(const BaseClass* BaseClass_ptr1, std:: bool get_AsynchronousMachine_polePairNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->polePairNumber; if (!buffer.str().empty()) @@ -297,7 +317,8 @@ bool get_AsynchronousMachine_polePairNumber(const BaseClass* BaseClass_ptr1, std bool get_AsynchronousMachine_ratedMechanicalPower(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedMechanicalPower; if (!buffer.str().empty()) @@ -311,7 +332,8 @@ bool get_AsynchronousMachine_ratedMechanicalPower(const BaseClass* BaseClass_ptr bool get_AsynchronousMachine_reversible(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->reversible; if (!buffer.str().empty()) @@ -325,7 +347,8 @@ bool get_AsynchronousMachine_reversible(const BaseClass* BaseClass_ptr1, std::st bool get_AsynchronousMachine_rxLockedRotorRatio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rxLockedRotorRatio; if (!buffer.str().empty()) @@ -337,22 +360,6 @@ bool get_AsynchronousMachine_rxLockedRotorRatio(const BaseClass* BaseClass_ptr1, return false; } - - -bool get_AsynchronousMachine_asynchronousMachineType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->asynchronousMachineType; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char AsynchronousMachine::debugName[] = "AsynchronousMachine"; const char* AsynchronousMachine::debugString() const { @@ -361,26 +368,26 @@ const char* AsynchronousMachine::debugString() const void AsynchronousMachine::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AsynchronousMachine"), &AsynchronousMachine_factory)); + factory_map.emplace("cim:AsynchronousMachine", &AsynchronousMachine_factory); } void AsynchronousMachine::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.asynchronousMachineType"), &assign_AsynchronousMachine_asynchronousMachineType)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.converterFedDrive"), &assign_AsynchronousMachine_converterFedDrive)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.efficiency"), &assign_AsynchronousMachine_efficiency)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.iaIrRatio"), &assign_AsynchronousMachine_iaIrRatio)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.nominalFrequency"), &assign_AsynchronousMachine_nominalFrequency)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.nominalSpeed"), &assign_AsynchronousMachine_nominalSpeed)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.polePairNumber"), &assign_AsynchronousMachine_polePairNumber)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.ratedMechanicalPower"), &assign_AsynchronousMachine_ratedMechanicalPower)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.reversible"), &assign_AsynchronousMachine_reversible)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.rxLockedRotorRatio"), &assign_AsynchronousMachine_rxLockedRotorRatio)); + assign_map.emplace("cim:AsynchronousMachine.asynchronousMachineType", &assign_AsynchronousMachine_asynchronousMachineType); + assign_map.emplace("cim:AsynchronousMachine.converterFedDrive", &assign_AsynchronousMachine_converterFedDrive); + assign_map.emplace("cim:AsynchronousMachine.efficiency", &assign_AsynchronousMachine_efficiency); + assign_map.emplace("cim:AsynchronousMachine.iaIrRatio", &assign_AsynchronousMachine_iaIrRatio); + assign_map.emplace("cim:AsynchronousMachine.nominalFrequency", &assign_AsynchronousMachine_nominalFrequency); + assign_map.emplace("cim:AsynchronousMachine.nominalSpeed", &assign_AsynchronousMachine_nominalSpeed); + assign_map.emplace("cim:AsynchronousMachine.polePairNumber", &assign_AsynchronousMachine_polePairNumber); + assign_map.emplace("cim:AsynchronousMachine.ratedMechanicalPower", &assign_AsynchronousMachine_ratedMechanicalPower); + assign_map.emplace("cim:AsynchronousMachine.reversible", &assign_AsynchronousMachine_reversible); + assign_map.emplace("cim:AsynchronousMachine.rxLockedRotorRatio", &assign_AsynchronousMachine_rxLockedRotorRatio); } void AsynchronousMachine::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.AsynchronousMachineDynamics"), &assign_AsynchronousMachine_AsynchronousMachineDynamics)); + assign_map.emplace("cim:AsynchronousMachine.AsynchronousMachineDynamics", &assign_AsynchronousMachine_AsynchronousMachineDynamics); } void AsynchronousMachine::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/AsynchronousMachine.hpp b/CGMES_2.4.15_16FEB2016/AsynchronousMachine.hpp index 099479f8b..9808c783d 100644 --- a/CGMES_2.4.15_16FEB2016/AsynchronousMachine.hpp +++ b/CGMES_2.4.15_16FEB2016/AsynchronousMachine.hpp @@ -25,9 +25,7 @@ namespace CIMPP { class AsynchronousMachineDynamics; - /* - A rotating machine whose shaft rotates asynchronously with the electrical field. Also known as an induction machine with no external connection to the rotor windings, e.g squirrel-cage induction machine. - */ + /** \brief A rotating machine whose shaft rotates asynchronously with the electrical field. Also known as an induction machine with no external connection to the rotor windings, e.g squirrel-cage induction machine. */ class AsynchronousMachine : public RotatingMachine { public: @@ -35,17 +33,38 @@ namespace CIMPP AsynchronousMachine(); ~AsynchronousMachine() override; - CIMPP::AsynchronousMachineDynamics* AsynchronousMachineDynamics; /* Asynchronous machine dynamics model used to describe dynamic behavior of this asynchronous machine. Default: 0 */ - CIMPP::AsynchronousMachineKind asynchronousMachineType; /* Indicates the type of Asynchronous Machine (motor or generator). Default: 0 */ - CIMPP::Boolean converterFedDrive; /* Indicates whether the machine is a converter fed drive. Used for short circuit data exchange according to IEC 60909 Default: false */ - CIMPP::PerCent efficiency; /* Efficiency of the asynchronous machine at nominal operation in percent. Indicator for converter drive motors. Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::Simple_Float iaIrRatio; /* Ratio of locked-rotor current to the rated current of the motor (Ia/Ir). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::Frequency nominalFrequency; /* Nameplate data indicates if the machine is 50 or 60 Hz. Default: nullptr */ - CIMPP::RotationSpeed nominalSpeed; /* Nameplate data. Depends on the slip and number of pole pairs. Default: nullptr */ - CIMPP::Integer polePairNumber; /* Number of pole pairs of stator. Used for short circuit data exchange according to IEC 60909 Default: 0 */ - CIMPP::ActivePower ratedMechanicalPower; /* Rated mechanical power (Pr in the IEC 60909-0). Used for short circuit data exchange according to IEC 60909. Default: nullptr */ - CIMPP::Boolean reversible; /* Indicates for converter drive motors if the power can be reversible. Used for short circuit data exchange according to IEC 60909 Default: false */ - CIMPP::Simple_Float rxLockedRotorRatio; /* Locked rotor ratio (R/X). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + /** \brief Asynchronous machine dynamics model used to describe dynamic behavior of this asynchronous machine. Default: 0 */ + CIMPP::AsynchronousMachineDynamics* AsynchronousMachineDynamics; + + /** \brief Indicates the type of Asynchronous Machine (motor or generator). Default: 0 */ + CIMPP::AsynchronousMachineKind asynchronousMachineType; + + /** \brief Indicates whether the machine is a converter fed drive. Used for short circuit data exchange according to IEC 60909 Default: false */ + CIMPP::Boolean converterFedDrive; + + /** \brief Efficiency of the asynchronous machine at nominal operation in percent. Indicator for converter drive motors. Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::PerCent efficiency; + + /** \brief Ratio of locked-rotor current to the rated current of the motor (Ia/Ir). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::Simple_Float iaIrRatio; + + /** \brief Nameplate data indicates if the machine is 50 or 60 Hz. Default: nullptr */ + CIMPP::Frequency nominalFrequency; + + /** \brief Nameplate data. Depends on the slip and number of pole pairs. Default: nullptr */ + CIMPP::RotationSpeed nominalSpeed; + + /** \brief Number of pole pairs of stator. Used for short circuit data exchange according to IEC 60909 Default: 0 */ + CIMPP::Integer polePairNumber; + + /** \brief Rated mechanical power (Pr in the IEC 60909-0). Used for short circuit data exchange according to IEC 60909. Default: nullptr */ + CIMPP::ActivePower ratedMechanicalPower; + + /** \brief Indicates for converter drive motors if the power can be reversible. Used for short circuit data exchange according to IEC 60909 Default: false */ + CIMPP::Boolean reversible; + + /** \brief Locked rotor ratio (R/X). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::Simple_Float rxLockedRotorRatio; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/AsynchronousMachineDynamics.cpp b/CGMES_2.4.15_16FEB2016/AsynchronousMachineDynamics.cpp index bfe9a4fb3..a7e89471f 100644 --- a/CGMES_2.4.15_16FEB2016/AsynchronousMachineDynamics.cpp +++ b/CGMES_2.4.15_16FEB2016/AsynchronousMachineDynamics.cpp @@ -15,8 +15,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -AsynchronousMachineDynamics::AsynchronousMachineDynamics() : AsynchronousMachine(nullptr), MechanicalLoadDynamics(nullptr), TurbineGovernorDynamics(nullptr), WindTurbineType1or2Dynamics(nullptr) {}; -AsynchronousMachineDynamics::~AsynchronousMachineDynamics() {}; +AsynchronousMachineDynamics::AsynchronousMachineDynamics() : AsynchronousMachine(nullptr), MechanicalLoadDynamics(nullptr), TurbineGovernorDynamics(nullptr), WindTurbineType1or2Dynamics(nullptr) {} +AsynchronousMachineDynamics::~AsynchronousMachineDynamics() {} static const std::list PossibleProfilesForClass = { @@ -46,8 +46,6 @@ AsynchronousMachineDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_AsynchronousMachine_AsynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_AsynchronousMachineDynamics_AsynchronousMachine(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -64,6 +62,7 @@ bool assign_AsynchronousMachineDynamics_AsynchronousMachine(BaseClass* BaseClass } return false; } + bool assign_MechanicalLoadDynamics_AsynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_AsynchronousMachineDynamics_MechanicalLoadDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -80,6 +79,7 @@ bool assign_AsynchronousMachineDynamics_MechanicalLoadDynamics(BaseClass* BaseCl } return false; } + bool assign_TurbineGovernorDynamics_AsynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_AsynchronousMachineDynamics_TurbineGovernorDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -96,6 +96,7 @@ bool assign_AsynchronousMachineDynamics_TurbineGovernorDynamics(BaseClass* BaseC } return false; } + bool assign_WindTurbineType1or2Dynamics_AsynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_AsynchronousMachineDynamics_WindTurbineType1or2Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -113,10 +114,10 @@ bool assign_AsynchronousMachineDynamics_WindTurbineType1or2Dynamics(BaseClass* B return false; } - bool get_AsynchronousMachineDynamics_AsynchronousMachine(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AsynchronousMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->AsynchronousMachine != 0) { @@ -128,6 +129,8 @@ bool get_AsynchronousMachineDynamics_AsynchronousMachine(const BaseClass* BaseCl } + + const char AsynchronousMachineDynamics::debugName[] = "AsynchronousMachineDynamics"; const char* AsynchronousMachineDynamics::debugString() const { @@ -136,7 +139,7 @@ const char* AsynchronousMachineDynamics::debugString() const void AsynchronousMachineDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AsynchronousMachineDynamics"), &AsynchronousMachineDynamics_factory)); + factory_map.emplace("cim:AsynchronousMachineDynamics", &AsynchronousMachineDynamics_factory); } void AsynchronousMachineDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -145,10 +148,10 @@ void AsynchronousMachineDynamics::addPrimitiveAssignFnsToMap(std::unordered_map< void AsynchronousMachineDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineDynamics.AsynchronousMachine"), &assign_AsynchronousMachineDynamics_AsynchronousMachine)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineDynamics.MechanicalLoadDynamics"), &assign_AsynchronousMachineDynamics_MechanicalLoadDynamics)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineDynamics.TurbineGovernorDynamics"), &assign_AsynchronousMachineDynamics_TurbineGovernorDynamics)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineDynamics.WindTurbineType1or2Dynamics"), &assign_AsynchronousMachineDynamics_WindTurbineType1or2Dynamics)); + assign_map.emplace("cim:AsynchronousMachineDynamics.AsynchronousMachine", &assign_AsynchronousMachineDynamics_AsynchronousMachine); + assign_map.emplace("cim:AsynchronousMachineDynamics.MechanicalLoadDynamics", &assign_AsynchronousMachineDynamics_MechanicalLoadDynamics); + assign_map.emplace("cim:AsynchronousMachineDynamics.TurbineGovernorDynamics", &assign_AsynchronousMachineDynamics_TurbineGovernorDynamics); + assign_map.emplace("cim:AsynchronousMachineDynamics.WindTurbineType1or2Dynamics", &assign_AsynchronousMachineDynamics_WindTurbineType1or2Dynamics); } void AsynchronousMachineDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/AsynchronousMachineDynamics.hpp b/CGMES_2.4.15_16FEB2016/AsynchronousMachineDynamics.hpp index c800b8543..bc0e2a13d 100644 --- a/CGMES_2.4.15_16FEB2016/AsynchronousMachineDynamics.hpp +++ b/CGMES_2.4.15_16FEB2016/AsynchronousMachineDynamics.hpp @@ -20,9 +20,7 @@ namespace CIMPP class TurbineGovernorDynamics; class WindTurbineType1or2Dynamics; - /* - Asynchronous machine whose behaviour is described by reference to a standard model expressed in either time constant reactance form or equivalent circuit form - */ + /** \brief Asynchronous machine whose behaviour is described by reference to a standard model expressed in either time constant reactance form or equivalent circuit form */ class AsynchronousMachineDynamics : public RotatingMachineDynamics { public: @@ -30,10 +28,17 @@ namespace CIMPP AsynchronousMachineDynamics(); ~AsynchronousMachineDynamics() override; - CIMPP::AsynchronousMachine* AsynchronousMachine; /* Asynchronous machine to which this asynchronous machine dynamics model applies. Default: 0 */ - CIMPP::MechanicalLoadDynamics* MechanicalLoadDynamics; /* Mechanical load model associated with this asynchronous machine model. Default: 0 */ - CIMPP::TurbineGovernorDynamics* TurbineGovernorDynamics; /* Turbine-governor model associated with this asynchronous machine model. Default: 0 */ - CIMPP::WindTurbineType1or2Dynamics* WindTurbineType1or2Dynamics; /* Wind generator type 1 or 2 model associated with this asynchronous machine model. Default: 0 */ + /** \brief Asynchronous machine to which this asynchronous machine dynamics model applies. Default: 0 */ + CIMPP::AsynchronousMachine* AsynchronousMachine; + + /** \brief Mechanical load model associated with this asynchronous machine model. Default: 0 */ + CIMPP::MechanicalLoadDynamics* MechanicalLoadDynamics; + + /** \brief Turbine-governor model associated with this asynchronous machine model. Default: 0 */ + CIMPP::TurbineGovernorDynamics* TurbineGovernorDynamics; + + /** \brief Wind generator type 1 or 2 model associated with this asynchronous machine model. Default: 0 */ + CIMPP::WindTurbineType1or2Dynamics* WindTurbineType1or2Dynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/AsynchronousMachineEquivalentCircuit.cpp b/CGMES_2.4.15_16FEB2016/AsynchronousMachineEquivalentCircuit.cpp index 8aed225a4..5ed52c82d 100644 --- a/CGMES_2.4.15_16FEB2016/AsynchronousMachineEquivalentCircuit.cpp +++ b/CGMES_2.4.15_16FEB2016/AsynchronousMachineEquivalentCircuit.cpp @@ -8,16 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -AsynchronousMachineEquivalentCircuit::AsynchronousMachineEquivalentCircuit() {}; -AsynchronousMachineEquivalentCircuit::~AsynchronousMachineEquivalentCircuit() {}; +AsynchronousMachineEquivalentCircuit::AsynchronousMachineEquivalentCircuit() {} +AsynchronousMachineEquivalentCircuit::~AsynchronousMachineEquivalentCircuit() {} static const std::list PossibleProfilesForClass = { @@ -48,77 +43,80 @@ AsynchronousMachineEquivalentCircuit::getPossibleProfilesForAttributes() const return map; } - -bool assign_AsynchronousMachineEquivalentCircuit_rr1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineEquivalentCircuit_rr1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rr1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachineEquivalentCircuit_rr2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineEquivalentCircuit_rr2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rr2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachineEquivalentCircuit_xlr1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineEquivalentCircuit_xlr1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xlr1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachineEquivalentCircuit_xlr2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineEquivalentCircuit_xlr2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xlr2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachineEquivalentCircuit_xm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineEquivalentCircuit_xm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_AsynchronousMachineEquivalentCircuit_rr1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rr1; if (!buffer.str().empty()) @@ -132,7 +130,8 @@ bool get_AsynchronousMachineEquivalentCircuit_rr1(const BaseClass* BaseClass_ptr bool get_AsynchronousMachineEquivalentCircuit_rr2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rr2; if (!buffer.str().empty()) @@ -146,7 +145,8 @@ bool get_AsynchronousMachineEquivalentCircuit_rr2(const BaseClass* BaseClass_ptr bool get_AsynchronousMachineEquivalentCircuit_xlr1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xlr1; if (!buffer.str().empty()) @@ -160,7 +160,8 @@ bool get_AsynchronousMachineEquivalentCircuit_xlr1(const BaseClass* BaseClass_pt bool get_AsynchronousMachineEquivalentCircuit_xlr2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xlr2; if (!buffer.str().empty()) @@ -174,7 +175,8 @@ bool get_AsynchronousMachineEquivalentCircuit_xlr2(const BaseClass* BaseClass_pt bool get_AsynchronousMachineEquivalentCircuit_xm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xm; if (!buffer.str().empty()) @@ -186,8 +188,6 @@ bool get_AsynchronousMachineEquivalentCircuit_xm(const BaseClass* BaseClass_ptr1 return false; } - - const char AsynchronousMachineEquivalentCircuit::debugName[] = "AsynchronousMachineEquivalentCircuit"; const char* AsynchronousMachineEquivalentCircuit::debugString() const { @@ -196,16 +196,16 @@ const char* AsynchronousMachineEquivalentCircuit::debugString() const void AsynchronousMachineEquivalentCircuit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AsynchronousMachineEquivalentCircuit"), &AsynchronousMachineEquivalentCircuit_factory)); + factory_map.emplace("cim:AsynchronousMachineEquivalentCircuit", &AsynchronousMachineEquivalentCircuit_factory); } void AsynchronousMachineEquivalentCircuit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineEquivalentCircuit.rr1"), &assign_AsynchronousMachineEquivalentCircuit_rr1)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineEquivalentCircuit.rr2"), &assign_AsynchronousMachineEquivalentCircuit_rr2)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineEquivalentCircuit.xlr1"), &assign_AsynchronousMachineEquivalentCircuit_xlr1)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineEquivalentCircuit.xlr2"), &assign_AsynchronousMachineEquivalentCircuit_xlr2)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineEquivalentCircuit.xm"), &assign_AsynchronousMachineEquivalentCircuit_xm)); + assign_map.emplace("cim:AsynchronousMachineEquivalentCircuit.rr1", &assign_AsynchronousMachineEquivalentCircuit_rr1); + assign_map.emplace("cim:AsynchronousMachineEquivalentCircuit.rr2", &assign_AsynchronousMachineEquivalentCircuit_rr2); + assign_map.emplace("cim:AsynchronousMachineEquivalentCircuit.xlr1", &assign_AsynchronousMachineEquivalentCircuit_xlr1); + assign_map.emplace("cim:AsynchronousMachineEquivalentCircuit.xlr2", &assign_AsynchronousMachineEquivalentCircuit_xlr2); + assign_map.emplace("cim:AsynchronousMachineEquivalentCircuit.xm", &assign_AsynchronousMachineEquivalentCircuit_xm); } void AsynchronousMachineEquivalentCircuit::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/AsynchronousMachineEquivalentCircuit.hpp b/CGMES_2.4.15_16FEB2016/AsynchronousMachineEquivalentCircuit.hpp index 9e711c649..0280d8e3e 100644 --- a/CGMES_2.4.15_16FEB2016/AsynchronousMachineEquivalentCircuit.hpp +++ b/CGMES_2.4.15_16FEB2016/AsynchronousMachineEquivalentCircuit.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The electrical equations of all variations of the asynchronous model are based on the AsynchronousEquivalentCircuit diagram for the direct and quadrature axes, with two equivalent rotor windings in each axis. = + = + * / ( + ) = + * * / ( * + * + * ) = ( + ) / ( * ) = ( * + * + * ) / ( * * (+ ) Same equations using CIM attributes from AsynchronousMachineTimeConstantReactance class on left of = sign and AsynchronousMachineEquivalentCircuit class on right (except as noted): xs = xm + RotatingMachineDynamics.statorLeakageReactance xp = RotatingMachineDynamics.statorLeakageReactance + xm * xlr1 / (xm + xlr1) xpp = RotatingMachineDynamics.statorLeakageReactance + xm * xlr1* xlr2 / (xm * xlr1 + xm * xlr2 + xlr1 * xlr2) tpo = (xm + xlr1) / (2*pi*nominal frequency * rr1) tppo = (xm * xlr1 + xm * xlr2 + xlr1 * xlr2) / (2*pi*nominal frequency * rr2 * (xm + xlr1). - */ + /** \brief The electrical equations of all variations of the asynchronous model are based on the AsynchronousEquivalentCircuit diagram for the direct and quadrature axes, with two equivalent rotor windings in each axis. = + = + * / ( + ) = + * * / ( * + * + * ) = ( + ) / ( * ) = ( * + * + * ) / ( * * (+ ) Same equations using CIM attributes from AsynchronousMachineTimeConstantReactance class on left of = sign and AsynchronousMachineEquivalentCircuit class on right (except as noted): xs = xm + RotatingMachineDynamics.statorLeakageReactance xp = RotatingMachineDynamics.statorLeakageReactance + xm * xlr1 / (xm + xlr1) xpp = RotatingMachineDynamics.statorLeakageReactance + xm * xlr1* xlr2 / (xm * xlr1 + xm * xlr2 + xlr1 * xlr2) tpo = (xm + xlr1) / (2*pi*nominal frequency * rr1) tppo = (xm * xlr1 + xm * xlr2 + xlr1 * xlr2) / (2*pi*nominal frequency * rr2 * (xm + xlr1). */ class AsynchronousMachineEquivalentCircuit : public AsynchronousMachineDynamics { public: @@ -27,11 +25,20 @@ namespace CIMPP AsynchronousMachineEquivalentCircuit(); ~AsynchronousMachineEquivalentCircuit() override; - CIMPP::PU rr1; /* Damper 1 winding resistance. Default: nullptr */ - CIMPP::PU rr2; /* Damper 2 winding resistance. Default: nullptr */ - CIMPP::PU xlr1; /* Damper 1 winding leakage reactance. Default: nullptr */ - CIMPP::PU xlr2; /* Damper 2 winding leakage reactance. Default: nullptr */ - CIMPP::PU xm; /* Magnetizing reactance. Default: nullptr */ + /** \brief Damper 1 winding resistance. Default: nullptr */ + CIMPP::PU rr1; + + /** \brief Damper 2 winding resistance. Default: nullptr */ + CIMPP::PU rr2; + + /** \brief Damper 1 winding leakage reactance. Default: nullptr */ + CIMPP::PU xlr1; + + /** \brief Damper 2 winding leakage reactance. Default: nullptr */ + CIMPP::PU xlr2; + + /** \brief Magnetizing reactance. Default: nullptr */ + CIMPP::PU xm; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/AsynchronousMachineKind.cpp b/CGMES_2.4.15_16FEB2016/AsynchronousMachineKind.cpp index d9b39ecb0..795ae96ee 100644 --- a/CGMES_2.4.15_16FEB2016/AsynchronousMachineKind.cpp +++ b/CGMES_2.4.15_16FEB2016/AsynchronousMachineKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "AsynchronousMachineKind") + if (EnumSymbol.substr(0, pos) != "AsynchronousMachineKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,12 +50,12 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "generator") + if (EnumSymbol == "generator") { rop = AsynchronousMachineKind::generator; return lop; } - if(EnumSymbol == "motor") + if (EnumSymbol == "motor") { rop = AsynchronousMachineKind::motor; return lop; diff --git a/CGMES_2.4.15_16FEB2016/AsynchronousMachineKind.hpp b/CGMES_2.4.15_16FEB2016/AsynchronousMachineKind.hpp index 8b8e54e57..f82a69df1 100644 --- a/CGMES_2.4.15_16FEB2016/AsynchronousMachineKind.hpp +++ b/CGMES_2.4.15_16FEB2016/AsynchronousMachineKind.hpp @@ -9,21 +9,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Kind of Asynchronous Machine. - */ + /** \brief Kind of Asynchronous Machine. */ class AsynchronousMachineKind { public: enum AsynchronousMachineKind_ENUM { - /** - * The Asynchronous Machine is a generator. - */ + /** The Asynchronous Machine is a generator. */ generator, - /** - * The Asynchronous Machine is a motor. - */ + /** The Asynchronous Machine is a motor. */ motor, }; diff --git a/CGMES_2.4.15_16FEB2016/AsynchronousMachineTimeConstantReactance.cpp b/CGMES_2.4.15_16FEB2016/AsynchronousMachineTimeConstantReactance.cpp index dd33a441b..4f8d1492d 100644 --- a/CGMES_2.4.15_16FEB2016/AsynchronousMachineTimeConstantReactance.cpp +++ b/CGMES_2.4.15_16FEB2016/AsynchronousMachineTimeConstantReactance.cpp @@ -8,16 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -AsynchronousMachineTimeConstantReactance::AsynchronousMachineTimeConstantReactance() {}; -AsynchronousMachineTimeConstantReactance::~AsynchronousMachineTimeConstantReactance() {}; +AsynchronousMachineTimeConstantReactance::AsynchronousMachineTimeConstantReactance() {} +AsynchronousMachineTimeConstantReactance::~AsynchronousMachineTimeConstantReactance() {} static const std::list PossibleProfilesForClass = { @@ -48,77 +43,80 @@ AsynchronousMachineTimeConstantReactance::getPossibleProfilesForAttributes() con return map; } - -bool assign_AsynchronousMachineTimeConstantReactance_tpo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineTimeConstantReactance_tpo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachineTimeConstantReactance_tppo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineTimeConstantReactance_tppo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tppo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachineTimeConstantReactance_xp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineTimeConstantReactance_xp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachineTimeConstantReactance_xpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineTimeConstantReactance_xpp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xpp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachineTimeConstantReactance_xs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineTimeConstantReactance_xs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_AsynchronousMachineTimeConstantReactance_tpo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpo; if (!buffer.str().empty()) @@ -132,7 +130,8 @@ bool get_AsynchronousMachineTimeConstantReactance_tpo(const BaseClass* BaseClass bool get_AsynchronousMachineTimeConstantReactance_tppo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tppo; if (!buffer.str().empty()) @@ -146,7 +145,8 @@ bool get_AsynchronousMachineTimeConstantReactance_tppo(const BaseClass* BaseClas bool get_AsynchronousMachineTimeConstantReactance_xp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xp; if (!buffer.str().empty()) @@ -160,7 +160,8 @@ bool get_AsynchronousMachineTimeConstantReactance_xp(const BaseClass* BaseClass_ bool get_AsynchronousMachineTimeConstantReactance_xpp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xpp; if (!buffer.str().empty()) @@ -174,7 +175,8 @@ bool get_AsynchronousMachineTimeConstantReactance_xpp(const BaseClass* BaseClass bool get_AsynchronousMachineTimeConstantReactance_xs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xs; if (!buffer.str().empty()) @@ -186,8 +188,6 @@ bool get_AsynchronousMachineTimeConstantReactance_xs(const BaseClass* BaseClass_ return false; } - - const char AsynchronousMachineTimeConstantReactance::debugName[] = "AsynchronousMachineTimeConstantReactance"; const char* AsynchronousMachineTimeConstantReactance::debugString() const { @@ -196,16 +196,16 @@ const char* AsynchronousMachineTimeConstantReactance::debugString() const void AsynchronousMachineTimeConstantReactance::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AsynchronousMachineTimeConstantReactance"), &AsynchronousMachineTimeConstantReactance_factory)); + factory_map.emplace("cim:AsynchronousMachineTimeConstantReactance", &AsynchronousMachineTimeConstantReactance_factory); } void AsynchronousMachineTimeConstantReactance::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineTimeConstantReactance.tpo"), &assign_AsynchronousMachineTimeConstantReactance_tpo)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineTimeConstantReactance.tppo"), &assign_AsynchronousMachineTimeConstantReactance_tppo)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineTimeConstantReactance.xp"), &assign_AsynchronousMachineTimeConstantReactance_xp)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineTimeConstantReactance.xpp"), &assign_AsynchronousMachineTimeConstantReactance_xpp)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineTimeConstantReactance.xs"), &assign_AsynchronousMachineTimeConstantReactance_xs)); + assign_map.emplace("cim:AsynchronousMachineTimeConstantReactance.tpo", &assign_AsynchronousMachineTimeConstantReactance_tpo); + assign_map.emplace("cim:AsynchronousMachineTimeConstantReactance.tppo", &assign_AsynchronousMachineTimeConstantReactance_tppo); + assign_map.emplace("cim:AsynchronousMachineTimeConstantReactance.xp", &assign_AsynchronousMachineTimeConstantReactance_xp); + assign_map.emplace("cim:AsynchronousMachineTimeConstantReactance.xpp", &assign_AsynchronousMachineTimeConstantReactance_xpp); + assign_map.emplace("cim:AsynchronousMachineTimeConstantReactance.xs", &assign_AsynchronousMachineTimeConstantReactance_xs); } void AsynchronousMachineTimeConstantReactance::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/AsynchronousMachineTimeConstantReactance.hpp b/CGMES_2.4.15_16FEB2016/AsynchronousMachineTimeConstantReactance.hpp index bdce8fd68..8c5a0b3f6 100644 --- a/CGMES_2.4.15_16FEB2016/AsynchronousMachineTimeConstantReactance.hpp +++ b/CGMES_2.4.15_16FEB2016/AsynchronousMachineTimeConstantReactance.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The parameters used for models expressed in time constant reactance form include: - */ + /** \brief The parameters used for models expressed in time constant reactance form include: */ class AsynchronousMachineTimeConstantReactance : public AsynchronousMachineDynamics { public: @@ -28,11 +26,20 @@ namespace CIMPP AsynchronousMachineTimeConstantReactance(); ~AsynchronousMachineTimeConstantReactance() override; - CIMPP::Seconds tpo; /* Transient rotor time constant (T`o) (> T``o). Typical Value = 5. Default: nullptr */ - CIMPP::Seconds tppo; /* Subtransient rotor time constant (T``o) (> 0). Typical Value = 0.03. Default: nullptr */ - CIMPP::PU xp; /* Transient reactance (unsaturated) (X`) (>=X``). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU xpp; /* Subtransient reactance (unsaturated) (X``) (> Xl). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU xs; /* Synchronous reactance (Xs) (>= X`). Typical Value = 1.8. Default: nullptr */ + /** \brief Transient rotor time constant (T`o) (> T``o). Typical Value = 5. Default: nullptr */ + CIMPP::Seconds tpo; + + /** \brief Subtransient rotor time constant (T``o) (> 0). Typical Value = 0.03. Default: nullptr */ + CIMPP::Seconds tppo; + + /** \brief Transient reactance (unsaturated) (X`) (>=X``). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU xp; + + /** \brief Subtransient reactance (unsaturated) (X``) (> Xl). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU xpp; + + /** \brief Synchronous reactance (Xs) (>= X`). Typical Value = 1.8. Default: nullptr */ + CIMPP::PU xs; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/AsynchronousMachineUserDefined.cpp b/CGMES_2.4.15_16FEB2016/AsynchronousMachineUserDefined.cpp index dd1fad853..df2454abf 100644 --- a/CGMES_2.4.15_16FEB2016/AsynchronousMachineUserDefined.cpp +++ b/CGMES_2.4.15_16FEB2016/AsynchronousMachineUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -AsynchronousMachineUserDefined::AsynchronousMachineUserDefined() {}; -AsynchronousMachineUserDefined::~AsynchronousMachineUserDefined() {}; +AsynchronousMachineUserDefined::AsynchronousMachineUserDefined() {} +AsynchronousMachineUserDefined::~AsynchronousMachineUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ AsynchronousMachineUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_AsynchronousMachineUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (AsynchronousMachineUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_AsynchronousMachineUserDefined(BaseClass*, BaseClass*); bool assign_AsynchronousMachineUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_AsynchronousMachineUserDefined_ProprietaryParameterDynamics(BaseClas return false; } +bool assign_AsynchronousMachineUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + AsynchronousMachineUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_AsynchronousMachineUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_AsynchronousMachineUserDefined_proprietary(const BaseClass* BaseClass_p return false; } - - const char AsynchronousMachineUserDefined::debugName[] = "AsynchronousMachineUserDefined"; const char* AsynchronousMachineUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* AsynchronousMachineUserDefined::debugString() const void AsynchronousMachineUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AsynchronousMachineUserDefined"), &AsynchronousMachineUserDefined_factory)); + factory_map.emplace("cim:AsynchronousMachineUserDefined", &AsynchronousMachineUserDefined_factory); } void AsynchronousMachineUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineUserDefined.proprietary"), &assign_AsynchronousMachineUserDefined_proprietary)); + assign_map.emplace("cim:AsynchronousMachineUserDefined.proprietary", &assign_AsynchronousMachineUserDefined_proprietary); } void AsynchronousMachineUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineUserDefined.ProprietaryParameterDynamics"), &assign_AsynchronousMachineUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:AsynchronousMachineUserDefined.ProprietaryParameterDynamics", &assign_AsynchronousMachineUserDefined_ProprietaryParameterDynamics); } void AsynchronousMachineUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/AsynchronousMachineUserDefined.hpp b/CGMES_2.4.15_16FEB2016/AsynchronousMachineUserDefined.hpp index 5aa08aed8..76f2416f2 100644 --- a/CGMES_2.4.15_16FEB2016/AsynchronousMachineUserDefined.hpp +++ b/CGMES_2.4.15_16FEB2016/AsynchronousMachineUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Asynchronous machine whose dynamic behaviour is described by a user-defined model. - */ + /** \brief Asynchronous machine whose dynamic behaviour is described by a user-defined model. */ class AsynchronousMachineUserDefined : public AsynchronousMachineDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP AsynchronousMachineUserDefined(); ~AsynchronousMachineUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/BaseVoltage.cpp b/CGMES_2.4.15_16FEB2016/BaseVoltage.cpp index 23fb97916..b4ba1e5da 100644 --- a/CGMES_2.4.15_16FEB2016/BaseVoltage.cpp +++ b/CGMES_2.4.15_16FEB2016/BaseVoltage.cpp @@ -12,12 +12,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "TopologicalNode.hpp" #include "TransformerEnd.hpp" #include "VoltageLevel.hpp" -#include "Voltage.hpp" using namespace CIMPP; -BaseVoltage::BaseVoltage() {}; -BaseVoltage::~BaseVoltage() {}; +BaseVoltage::BaseVoltage() {} +BaseVoltage::~BaseVoltage() {} static const std::list PossibleProfilesForClass = { @@ -51,21 +50,6 @@ BaseVoltage::getPossibleProfilesForAttributes() const return map; } - -bool assign_BaseVoltage_nominalVoltage(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (BaseVoltage* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->nominalVoltage; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ConductingEquipment_BaseVoltage(BaseClass*, BaseClass*); bool assign_BaseVoltage_ConductingEquipment(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -82,6 +66,7 @@ bool assign_BaseVoltage_ConductingEquipment(BaseClass* BaseClass_ptr1, BaseClass } return false; } + bool assign_TopologicalNode_BaseVoltage(BaseClass*, BaseClass*); bool assign_BaseVoltage_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -98,6 +83,7 @@ bool assign_BaseVoltage_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* Ba } return false; } + bool assign_TransformerEnd_BaseVoltage(BaseClass*, BaseClass*); bool assign_BaseVoltage_TransformerEnds(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -114,6 +100,7 @@ bool assign_BaseVoltage_TransformerEnds(BaseClass* BaseClass_ptr1, BaseClass* Ba } return false; } + bool assign_VoltageLevel_BaseVoltage(BaseClass*, BaseClass*); bool assign_BaseVoltage_VoltageLevel(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -131,9 +118,28 @@ bool assign_BaseVoltage_VoltageLevel(BaseClass* BaseClass_ptr1, BaseClass* BaseC return false; } +bool assign_BaseVoltage_nominalVoltage(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + BaseVoltage* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->nominalVoltage; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + + + + bool get_BaseVoltage_nominalVoltage(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const BaseVoltage* element = dynamic_cast(BaseClass_ptr1)) + const BaseVoltage* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nominalVoltage; if (!buffer.str().empty()) @@ -145,8 +151,6 @@ bool get_BaseVoltage_nominalVoltage(const BaseClass* BaseClass_ptr1, std::string return false; } - - const char BaseVoltage::debugName[] = "BaseVoltage"; const char* BaseVoltage::debugString() const { @@ -155,20 +159,20 @@ const char* BaseVoltage::debugString() const void BaseVoltage::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:BaseVoltage"), &BaseVoltage_factory)); + factory_map.emplace("cim:BaseVoltage", &BaseVoltage_factory); } void BaseVoltage::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:BaseVoltage.nominalVoltage"), &assign_BaseVoltage_nominalVoltage)); + assign_map.emplace("cim:BaseVoltage.nominalVoltage", &assign_BaseVoltage_nominalVoltage); } void BaseVoltage::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:BaseVoltage.ConductingEquipment"), &assign_BaseVoltage_ConductingEquipment)); - assign_map.insert(std::make_pair(std::string("cim:BaseVoltage.TopologicalNode"), &assign_BaseVoltage_TopologicalNode)); - assign_map.insert(std::make_pair(std::string("cim:BaseVoltage.TransformerEnds"), &assign_BaseVoltage_TransformerEnds)); - assign_map.insert(std::make_pair(std::string("cim:BaseVoltage.VoltageLevel"), &assign_BaseVoltage_VoltageLevel)); + assign_map.emplace("cim:BaseVoltage.ConductingEquipment", &assign_BaseVoltage_ConductingEquipment); + assign_map.emplace("cim:BaseVoltage.TopologicalNode", &assign_BaseVoltage_TopologicalNode); + assign_map.emplace("cim:BaseVoltage.TransformerEnds", &assign_BaseVoltage_TransformerEnds); + assign_map.emplace("cim:BaseVoltage.VoltageLevel", &assign_BaseVoltage_VoltageLevel); } void BaseVoltage::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/BaseVoltage.hpp b/CGMES_2.4.15_16FEB2016/BaseVoltage.hpp index 1faae4d7a..5e04e5f8a 100644 --- a/CGMES_2.4.15_16FEB2016/BaseVoltage.hpp +++ b/CGMES_2.4.15_16FEB2016/BaseVoltage.hpp @@ -21,9 +21,7 @@ namespace CIMPP class TransformerEnd; class VoltageLevel; - /* - Defines a system base voltage which is referenced. - */ + /** \brief Defines a system base voltage which is referenced. */ class BaseVoltage : public IdentifiedObject { public: @@ -31,11 +29,20 @@ namespace CIMPP BaseVoltage(); ~BaseVoltage() override; - std::list ConductingEquipment; /* Base voltage of this conducting equipment. Use only when there is no voltage level container used and only one base voltage applies. For example, not used for transformers. Default: 0 */ - std::list TopologicalNode; /* The topological nodes at the base voltage. Default: 0 */ - std::list TransformerEnds; /* Transformer ends at the base voltage. This is essential for PU calculation. Default: 0 */ - std::list VoltageLevel; /* The voltage levels having this base voltage. Default: 0 */ - CIMPP::Voltage nominalVoltage; /* The power system resource`s base voltage. Default: nullptr */ + /** \brief Base voltage of this conducting equipment. Use only when there is no voltage level container used and only one base voltage applies. For example, not used for transformers. Default: 0 */ + std::list ConductingEquipment; + + /** \brief The topological nodes at the base voltage. Default: 0 */ + std::list TopologicalNode; + + /** \brief Transformer ends at the base voltage. This is essential for PU calculation. Default: 0 */ + std::list TransformerEnds; + + /** \brief The voltage levels having this base voltage. Default: 0 */ + std::list VoltageLevel; + + /** \brief The power system resource`s base voltage. Default: nullptr */ + CIMPP::Voltage nominalVoltage; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/BasicIntervalSchedule.cpp b/CGMES_2.4.15_16FEB2016/BasicIntervalSchedule.cpp index 876fcee65..2daa4c674 100644 --- a/CGMES_2.4.15_16FEB2016/BasicIntervalSchedule.cpp +++ b/CGMES_2.4.15_16FEB2016/BasicIntervalSchedule.cpp @@ -8,14 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "DateTime.hpp" -#include "UnitSymbol.hpp" -#include "UnitSymbol.hpp" using namespace CIMPP; -BasicIntervalSchedule::BasicIntervalSchedule() {}; -BasicIntervalSchedule::~BasicIntervalSchedule() {}; +BasicIntervalSchedule::BasicIntervalSchedule() {} +BasicIntervalSchedule::~BasicIntervalSchedule() {} static const std::list PossibleProfilesForClass = { @@ -44,51 +41,52 @@ BasicIntervalSchedule::getPossibleProfilesForAttributes() const return map; } - -bool assign_BasicIntervalSchedule_startTime(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_BasicIntervalSchedule_startTime(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->startTime = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_BasicIntervalSchedule_value1Unit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_BasicIntervalSchedule_value1Unit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->value1Unit; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_BasicIntervalSchedule_value2Unit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_BasicIntervalSchedule_value2Unit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->value2Unit; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_BasicIntervalSchedule_startTime(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + const BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->startTime; if (!buffer.str().empty()) @@ -100,11 +98,10 @@ bool get_BasicIntervalSchedule_startTime(const BaseClass* BaseClass_ptr1, std::s return false; } - - bool get_BasicIntervalSchedule_value1Unit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + const BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value1Unit; if (!buffer.str().empty()) @@ -118,7 +115,8 @@ bool get_BasicIntervalSchedule_value1Unit(const BaseClass* BaseClass_ptr1, std:: bool get_BasicIntervalSchedule_value2Unit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + const BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value2Unit; if (!buffer.str().empty()) @@ -138,14 +136,14 @@ const char* BasicIntervalSchedule::debugString() const void BasicIntervalSchedule::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:BasicIntervalSchedule"), &BasicIntervalSchedule_factory)); + factory_map.emplace("cim:BasicIntervalSchedule", &BasicIntervalSchedule_factory); } void BasicIntervalSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:BasicIntervalSchedule.startTime"), &assign_BasicIntervalSchedule_startTime)); - assign_map.insert(std::make_pair(std::string("cim:BasicIntervalSchedule.value1Unit"), &assign_BasicIntervalSchedule_value1Unit)); - assign_map.insert(std::make_pair(std::string("cim:BasicIntervalSchedule.value2Unit"), &assign_BasicIntervalSchedule_value2Unit)); + assign_map.emplace("cim:BasicIntervalSchedule.startTime", &assign_BasicIntervalSchedule_startTime); + assign_map.emplace("cim:BasicIntervalSchedule.value1Unit", &assign_BasicIntervalSchedule_value1Unit); + assign_map.emplace("cim:BasicIntervalSchedule.value2Unit", &assign_BasicIntervalSchedule_value2Unit); } void BasicIntervalSchedule::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/BasicIntervalSchedule.hpp b/CGMES_2.4.15_16FEB2016/BasicIntervalSchedule.hpp index b629ba700..610f2e7d6 100644 --- a/CGMES_2.4.15_16FEB2016/BasicIntervalSchedule.hpp +++ b/CGMES_2.4.15_16FEB2016/BasicIntervalSchedule.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Schedule of values at points in time. - */ + /** \brief Schedule of values at points in time. */ class BasicIntervalSchedule : public IdentifiedObject { public: @@ -28,9 +26,14 @@ namespace CIMPP BasicIntervalSchedule(); ~BasicIntervalSchedule() override; - CIMPP::DateTime startTime; /* The time for the first time point. Default: '' */ - CIMPP::UnitSymbol value1Unit; /* Value1 units of measure. Default: 0 */ - CIMPP::UnitSymbol value2Unit; /* Value2 units of measure. Default: 0 */ + /** \brief The time for the first time point. Default: '' */ + CIMPP::DateTime startTime; + + /** \brief Value1 units of measure. Default: 0 */ + CIMPP::UnitSymbol value1Unit; + + /** \brief Value2 units of measure. Default: 0 */ + CIMPP::UnitSymbol value2Unit; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Bay.cpp b/CGMES_2.4.15_16FEB2016/Bay.cpp index c951dd9ec..bf629aae8 100644 --- a/CGMES_2.4.15_16FEB2016/Bay.cpp +++ b/CGMES_2.4.15_16FEB2016/Bay.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Bay::Bay() : VoltageLevel(nullptr) {}; -Bay::~Bay() {}; +Bay::Bay() : VoltageLevel(nullptr) {} +Bay::~Bay() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ Bay::getPossibleProfilesForAttributes() const return map; } - - bool assign_VoltageLevel_Bays(BaseClass*, BaseClass*); bool assign_Bay_VoltageLevel(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_Bay_VoltageLevel(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr return false; } - bool get_Bay_VoltageLevel(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Bay* element = dynamic_cast(BaseClass_ptr1)) + const Bay* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->VoltageLevel != 0) { @@ -73,7 +71,6 @@ bool get_Bay_VoltageLevel(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Bay"), &Bay_factory)); + factory_map.emplace("cim:Bay", &Bay_factory); } void Bay::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void Bay::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Bay.VoltageLevel"), &assign_Bay_VoltageLevel)); + assign_map.emplace("cim:Bay.VoltageLevel", &assign_Bay_VoltageLevel); } void Bay::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/Bay.hpp b/CGMES_2.4.15_16FEB2016/Bay.hpp index b9ff9679a..7d30425e4 100644 --- a/CGMES_2.4.15_16FEB2016/Bay.hpp +++ b/CGMES_2.4.15_16FEB2016/Bay.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class VoltageLevel; - /* - A collection of power system resources (within a given substation) including conducting equipment, protection relays, measurements, and telemetry. A bay typically represents a physical grouping related to modularization of equipment. - */ + /** \brief A collection of power system resources (within a given substation) including conducting equipment, protection relays, measurements, and telemetry. A bay typically represents a physical grouping related to modularization of equipment. */ class Bay : public EquipmentContainer { public: @@ -27,7 +25,8 @@ namespace CIMPP Bay(); ~Bay() override; - CIMPP::VoltageLevel* VoltageLevel; /* The voltage level containing this bay. Default: 0 */ + /** \brief The voltage level containing this bay. Default: 0 */ + CIMPP::VoltageLevel* VoltageLevel; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Breaker.cpp b/CGMES_2.4.15_16FEB2016/Breaker.cpp index 88a01ff00..034b1ee93 100644 --- a/CGMES_2.4.15_16FEB2016/Breaker.cpp +++ b/CGMES_2.4.15_16FEB2016/Breaker.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Breaker::Breaker() {}; -Breaker::~Breaker() {}; +Breaker::Breaker() {} +Breaker::~Breaker() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ Breaker::getPossibleProfilesForAttributes() const return map; } - - - - - const char Breaker::debugName[] = "Breaker"; const char* Breaker::debugString() const { @@ -52,7 +47,7 @@ const char* Breaker::debugString() const void Breaker::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Breaker"), &Breaker_factory)); + factory_map.emplace("cim:Breaker", &Breaker_factory); } void Breaker::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/Breaker.hpp b/CGMES_2.4.15_16FEB2016/Breaker.hpp index d760e2518..812da0f56 100644 --- a/CGMES_2.4.15_16FEB2016/Breaker.hpp +++ b/CGMES_2.4.15_16FEB2016/Breaker.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A mechanical switching device capable of making, carrying, and breaking currents under normal circuit conditions and also making, carrying for a specified time, and breaking currents under specified abnormal circuit conditions e.g. those of short circuit. - */ + /** \brief A mechanical switching device capable of making, carrying, and breaking currents under normal circuit conditions and also making, carrying for a specified time, and breaking currents under specified abnormal circuit conditions e.g. those of short circuit. */ class Breaker : public ProtectedSwitch { public: @@ -26,7 +24,6 @@ namespace CIMPP Breaker(); ~Breaker() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/BusNameMarker.cpp b/CGMES_2.4.15_16FEB2016/BusNameMarker.cpp index ed137f2f8..24a10645f 100644 --- a/CGMES_2.4.15_16FEB2016/BusNameMarker.cpp +++ b/CGMES_2.4.15_16FEB2016/BusNameMarker.cpp @@ -8,14 +8,13 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "ReportingGroup.hpp" #include "ACDCTerminal.hpp" -#include "Integer.hpp" +#include "ReportingGroup.hpp" using namespace CIMPP; -BusNameMarker::BusNameMarker() : ReportingGroup(nullptr) {}; -BusNameMarker::~BusNameMarker() {}; +BusNameMarker::BusNameMarker() : ReportingGroup(nullptr) {} +BusNameMarker::~BusNameMarker() {} static const std::list PossibleProfilesForClass = { @@ -44,21 +43,6 @@ BusNameMarker::getPossibleProfilesForAttributes() const return map; } - -bool assign_BusNameMarker_priority(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (BusNameMarker* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->priority; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ReportingGroup_BusNameMarker(BaseClass*, BaseClass*); bool assign_BusNameMarker_ReportingGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -75,6 +59,7 @@ bool assign_BusNameMarker_ReportingGroup(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_ACDCTerminal_BusNameMarker(BaseClass*, BaseClass*); bool assign_BusNameMarker_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -92,24 +77,24 @@ bool assign_BusNameMarker_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseCla return false; } -bool get_BusNameMarker_priority(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_BusNameMarker_priority(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const BusNameMarker* element = dynamic_cast(BaseClass_ptr1)) + BusNameMarker* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->priority; - if (!buffer.str().empty()) + buffer >> element->priority; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_BusNameMarker_ReportingGroup(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const BusNameMarker* element = dynamic_cast(BaseClass_ptr1)) + const BusNameMarker* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ReportingGroup != 0) { @@ -121,6 +106,21 @@ bool get_BusNameMarker_ReportingGroup(const BaseClass* BaseClass_ptr1, std::list } +bool get_BusNameMarker_priority(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const BusNameMarker* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->priority; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + const char BusNameMarker::debugName[] = "BusNameMarker"; const char* BusNameMarker::debugString() const { @@ -129,18 +129,18 @@ const char* BusNameMarker::debugString() const void BusNameMarker::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:BusNameMarker"), &BusNameMarker_factory)); + factory_map.emplace("cim:BusNameMarker", &BusNameMarker_factory); } void BusNameMarker::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:BusNameMarker.priority"), &assign_BusNameMarker_priority)); + assign_map.emplace("cim:BusNameMarker.priority", &assign_BusNameMarker_priority); } void BusNameMarker::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:BusNameMarker.ReportingGroup"), &assign_BusNameMarker_ReportingGroup)); - assign_map.insert(std::make_pair(std::string("cim:BusNameMarker.Terminal"), &assign_BusNameMarker_Terminal)); + assign_map.emplace("cim:BusNameMarker.ReportingGroup", &assign_BusNameMarker_ReportingGroup); + assign_map.emplace("cim:BusNameMarker.Terminal", &assign_BusNameMarker_Terminal); } void BusNameMarker::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/BusNameMarker.hpp b/CGMES_2.4.15_16FEB2016/BusNameMarker.hpp index b3b3ec87f..7aa5a6d42 100644 --- a/CGMES_2.4.15_16FEB2016/BusNameMarker.hpp +++ b/CGMES_2.4.15_16FEB2016/BusNameMarker.hpp @@ -19,9 +19,7 @@ namespace CIMPP class ACDCTerminal; class ReportingGroup; - /* - Used to apply user standard names to topology buses. Typically used for "bus/branch" case generation. Associated with one or more terminals that are normally connected with the bus name. The associated terminals are normally connected by non-retained switches. For a ring bus station configuration, all busbar terminals in the ring are typically associated. For a breaker and a half scheme, both busbars would normally be associated. For a ring bus, all busbars would normally be associated. For a "straight" busbar configuration, normally only the main terminal at the busbar would be associated. - */ + /** \brief Used to apply user standard names to topology buses. Typically used for "bus/branch" case generation. Associated with one or more terminals that are normally connected with the bus name. The associated terminals are normally connected by non-retained switches. For a ring bus station configuration, all busbar terminals in the ring are typically associated. For a breaker and a half scheme, both busbars would normally be associated. For a ring bus, all busbars would normally be associated. For a "straight" busbar configuration, normally only the main terminal at the busbar would be associated. */ class BusNameMarker : public IdentifiedObject { public: @@ -29,9 +27,14 @@ namespace CIMPP BusNameMarker(); ~BusNameMarker() override; - CIMPP::ReportingGroup* ReportingGroup; /* The bus name markers that belong to this reporting group. Default: 0 */ - std::list Terminal; /* The terminals associated with this bus name marker. Default: 0 */ - CIMPP::Integer priority; /* Priority of bus name marker for use as topology bus name. Use 0 for don t care. Use 1 for highest priority. Use 2 as priority is less than 1 and so on. Default: 0 */ + /** \brief The bus name markers that belong to this reporting group. Default: 0 */ + CIMPP::ReportingGroup* ReportingGroup; + + /** \brief The terminals associated with this bus name marker. Default: 0 */ + std::list Terminal; + + /** \brief Priority of bus name marker for use as topology bus name. Use 0 for don t care. Use 1 for highest priority. Use 2 as priority is less than 1 and so on. Default: 0 */ + CIMPP::Integer priority; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/BusbarSection.cpp b/CGMES_2.4.15_16FEB2016/BusbarSection.cpp index f655a5c56..2b6048953 100644 --- a/CGMES_2.4.15_16FEB2016/BusbarSection.cpp +++ b/CGMES_2.4.15_16FEB2016/BusbarSection.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "CurrentFlow.hpp" using namespace CIMPP; -BusbarSection::BusbarSection() {}; -BusbarSection::~BusbarSection() {}; +BusbarSection::BusbarSection() {} +BusbarSection::~BusbarSection() {} static const std::list PossibleProfilesForClass = { @@ -40,25 +39,24 @@ BusbarSection::getPossibleProfilesForAttributes() const return map; } - -bool assign_BusbarSection_ipMax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_BusbarSection_ipMax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (BusbarSection* element = dynamic_cast(BaseClass_ptr1)) + BusbarSection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ipMax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_BusbarSection_ipMax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const BusbarSection* element = dynamic_cast(BaseClass_ptr1)) + const BusbarSection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ipMax; if (!buffer.str().empty()) @@ -70,8 +68,6 @@ bool get_BusbarSection_ipMax(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char BusbarSection::debugName[] = "BusbarSection"; const char* BusbarSection::debugString() const { @@ -80,12 +76,12 @@ const char* BusbarSection::debugString() const void BusbarSection::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:BusbarSection"), &BusbarSection_factory)); + factory_map.emplace("cim:BusbarSection", &BusbarSection_factory); } void BusbarSection::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:BusbarSection.ipMax"), &assign_BusbarSection_ipMax)); + assign_map.emplace("cim:BusbarSection.ipMax", &assign_BusbarSection_ipMax); } void BusbarSection::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/BusbarSection.hpp b/CGMES_2.4.15_16FEB2016/BusbarSection.hpp index f51b76da1..1fa53d221 100644 --- a/CGMES_2.4.15_16FEB2016/BusbarSection.hpp +++ b/CGMES_2.4.15_16FEB2016/BusbarSection.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A conductor, or group of conductors, with negligible impedance, that serve to connect other conducting equipment within a single substation. Voltage measurements are typically obtained from VoltageTransformers that are connected to busbar sections. A bus bar section may have many physical terminals but for analysis is modelled with exactly one logical terminal. - */ + /** \brief A conductor, or group of conductors, with negligible impedance, that serve to connect other conducting equipment within a single substation. Voltage measurements are typically obtained from VoltageTransformers that are connected to busbar sections. A bus bar section may have many physical terminals but for analysis is modelled with exactly one logical terminal. */ class BusbarSection : public Connector { public: @@ -27,7 +25,8 @@ namespace CIMPP BusbarSection(); ~BusbarSection() override; - CIMPP::CurrentFlow ipMax; /* Maximum allowable peak short-circuit current of busbar (Ipmax in the IEC 60909-0). Mechanical limit of the busbar in the substation itself. Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + /** \brief Maximum allowable peak short-circuit current of busbar (Ipmax in the IEC 60909-0). Mechanical limit of the busbar in the substation itself. Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::CurrentFlow ipMax; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/CGMESProfile.cpp b/CGMES_2.4.15_16FEB2016/CGMESProfile.cpp index ebabd3380..8f6a230cc 100644 --- a/CGMES_2.4.15_16FEB2016/CGMESProfile.cpp +++ b/CGMES_2.4.15_16FEB2016/CGMESProfile.cpp @@ -59,8 +59,6 @@ static const std::map> ProfileURIs = { CGMESProfile::TP_BD, { "http://entsoe.eu/CIM/TopologyBoundary/3/1", } }, }; -static const std::string CimNamespace = "http://iec.ch/TC57/2013/CIM-schema-cim16#"; - const std::list& getProfileList() { @@ -126,9 +124,3 @@ getProfileFromLongName(const std::string& name) } return UnknownProfile; } - -std::string -getCimNamespace() -{ - return CimNamespace; -} diff --git a/CGMES_2.4.15_16FEB2016/CGMESProfile.hpp b/CGMES_2.4.15_16FEB2016/CGMESProfile.hpp index 727c67459..f05e22e4b 100644 --- a/CGMES_2.4.15_16FEB2016/CGMESProfile.hpp +++ b/CGMES_2.4.15_16FEB2016/CGMESProfile.hpp @@ -31,6 +31,4 @@ const std::list& getProfileURIs(CGMESProfile profile); CGMESProfile getProfileFromShortName(const std::string& name); CGMESProfile getProfileFromLongName(const std::string& name); -std::string getCimNamespace(); - -#endif // CGMESPROFILE_HPP +#endif diff --git a/CGMES_2.4.15_16FEB2016/CIMClassList.hpp b/CGMES_2.4.15_16FEB2016/CIMClassList.hpp index 8a65daee6..09bc2fc2d 100644 --- a/CGMES_2.4.15_16FEB2016/CIMClassList.hpp +++ b/CGMES_2.4.15_16FEB2016/CIMClassList.hpp @@ -3,9 +3,14 @@ /* Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen */ + #include + +#include "BaseClassDefiner.hpp" #include "IEC61970.hpp" + using namespace CIMPP; + static std::list CIMClassList = { ACDCConverter::declare(), @@ -406,4 +411,4 @@ static std::list CIMClassList = WindType3or4UserDefined::declare(), UnknownType::declare(), }; -#endif // CIMCLASSLIST_H +#endif diff --git a/CGMES_2.4.15_16FEB2016/Capacitance.hpp b/CGMES_2.4.15_16FEB2016/Capacitance.hpp index 0f2f8bad2..f08217712 100644 --- a/CGMES_2.4.15_16FEB2016/Capacitance.hpp +++ b/CGMES_2.4.15_16FEB2016/Capacitance.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Capacitive part of reactance (imaginary part of impedance), at rated frequency. - */ + /** \brief Capacitive part of reactance (imaginary part of impedance), at rated frequency. */ class Capacitance { public: diff --git a/CGMES_2.4.15_16FEB2016/CapacitancePerLength.hpp b/CGMES_2.4.15_16FEB2016/CapacitancePerLength.hpp index b38d961b2..78266a09e 100644 --- a/CGMES_2.4.15_16FEB2016/CapacitancePerLength.hpp +++ b/CGMES_2.4.15_16FEB2016/CapacitancePerLength.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Capacitance per unit of length. - */ + /** \brief Capacitance per unit of length. */ class CapacitancePerLength { public: diff --git a/CGMES_2.4.15_16FEB2016/CimConstants.cpp b/CGMES_2.4.15_16FEB2016/CimConstants.cpp new file mode 100644 index 000000000..3aa765859 --- /dev/null +++ b/CGMES_2.4.15_16FEB2016/CimConstants.cpp @@ -0,0 +1,14 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "CimConstants.hpp" + +const std::string CimVersion = "cgmes_v2_4_15"; + +const std::map NamespaceMap = +{ + { "cim", "http://iec.ch/TC57/2013/CIM-schema-cim16#" }, + { "entsoe", "http://entsoe.eu/CIM/SchemaExtension/3/1#" }, + { "md", "http://iec.ch/TC57/61970-552/ModelDescription/1#" }, + { "rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#" }, +}; diff --git a/CGMES_2.4.15_16FEB2016/CimConstants.hpp b/CGMES_2.4.15_16FEB2016/CimConstants.hpp new file mode 100644 index 000000000..124197842 --- /dev/null +++ b/CGMES_2.4.15_16FEB2016/CimConstants.hpp @@ -0,0 +1,16 @@ +#ifndef CIM_CONSTANTS_HPP +#define CIM_CONSTANTS_HPP +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +/** \brief CIM version string. */ +extern const std::string CimVersion; + +/** \brief Default namespaces used by CGMES. Map of namespace key to URL. */ +extern const std::map NamespaceMap; + +#endif diff --git a/CGMES_2.4.15_16FEB2016/Command.cpp b/CGMES_2.4.15_16FEB2016/Command.cpp index f12035edf..7a02eb36a 100644 --- a/CGMES_2.4.15_16FEB2016/Command.cpp +++ b/CGMES_2.4.15_16FEB2016/Command.cpp @@ -10,13 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "DiscreteValue.hpp" #include "ValueAliasSet.hpp" -#include "Integer.hpp" -#include "Integer.hpp" using namespace CIMPP; -Command::Command() : DiscreteValue(nullptr), ValueAliasSet(nullptr) {}; -Command::~Command() {}; +Command::Command() : DiscreteValue(nullptr), ValueAliasSet(nullptr) {} +Command::~Command() {} static const std::list PossibleProfilesForClass = { @@ -46,34 +44,6 @@ Command::getPossibleProfilesForAttributes() const return map; } - -bool assign_Command_normalValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (Command* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->normalValue; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_Command_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (Command* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->value; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_DiscreteValue_Command(BaseClass*, BaseClass*); bool assign_Command_DiscreteValue(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -90,6 +60,7 @@ bool assign_Command_DiscreteValue(BaseClass* BaseClass_ptr1, BaseClass* BaseClas } return false; } + bool assign_ValueAliasSet_Commands(BaseClass*, BaseClass*); bool assign_Command_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -107,38 +78,38 @@ bool assign_Command_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClas return false; } -bool get_Command_normalValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_Command_normalValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const Command* element = dynamic_cast(BaseClass_ptr1)) + Command* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->normalValue; - if (!buffer.str().empty()) + buffer >> element->normalValue; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_Command_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_Command_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const Command* element = dynamic_cast(BaseClass_ptr1)) + Command* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->value; - if (!buffer.str().empty()) + buffer >> element->value; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_Command_DiscreteValue(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Command* element = dynamic_cast(BaseClass_ptr1)) + const Command* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DiscreteValue != 0) { @@ -151,7 +122,8 @@ bool get_Command_DiscreteValue(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Command* element = dynamic_cast(BaseClass_ptr1)) + const Command* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ValueAliasSet != 0) { @@ -162,6 +134,35 @@ bool get_Command_ValueAliasSet(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->normalValue; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_Command_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const Command* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->value; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char Command::debugName[] = "Command"; const char* Command::debugString() const @@ -171,19 +172,19 @@ const char* Command::debugString() const void Command::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Command"), &Command_factory)); + factory_map.emplace("cim:Command", &Command_factory); } void Command::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Command.normalValue"), &assign_Command_normalValue)); - assign_map.insert(std::make_pair(std::string("cim:Command.value"), &assign_Command_value)); + assign_map.emplace("cim:Command.normalValue", &assign_Command_normalValue); + assign_map.emplace("cim:Command.value", &assign_Command_value); } void Command::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Command.DiscreteValue"), &assign_Command_DiscreteValue)); - assign_map.insert(std::make_pair(std::string("cim:Command.ValueAliasSet"), &assign_Command_ValueAliasSet)); + assign_map.emplace("cim:Command.DiscreteValue", &assign_Command_DiscreteValue); + assign_map.emplace("cim:Command.ValueAliasSet", &assign_Command_ValueAliasSet); } void Command::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/Command.hpp b/CGMES_2.4.15_16FEB2016/Command.hpp index 0c3e01e02..e91f39202 100644 --- a/CGMES_2.4.15_16FEB2016/Command.hpp +++ b/CGMES_2.4.15_16FEB2016/Command.hpp @@ -19,9 +19,7 @@ namespace CIMPP class DiscreteValue; class ValueAliasSet; - /* - A Command is a discrete control used for supervisory control. - */ + /** \brief A Command is a discrete control used for supervisory control. */ class Command : public Control { public: @@ -29,10 +27,17 @@ namespace CIMPP Command(); ~Command() override; - CIMPP::DiscreteValue* DiscreteValue; /* The Control variable associated with the MeasurementValue. Default: 0 */ - CIMPP::ValueAliasSet* ValueAliasSet; /* The ValueAliasSet used for translation of a Control value to a name. Default: 0 */ - CIMPP::Integer normalValue; /* Normal value for Control.value e.g. used for percentage scaling. Default: 0 */ - CIMPP::Integer value; /* The value representing the actuator output. Default: 0 */ + /** \brief The Control variable associated with the MeasurementValue. Default: 0 */ + CIMPP::DiscreteValue* DiscreteValue; + + /** \brief The ValueAliasSet used for translation of a Control value to a name. Default: 0 */ + CIMPP::ValueAliasSet* ValueAliasSet; + + /** \brief Normal value for Control.value e.g. used for percentage scaling. Default: 0 */ + CIMPP::Integer normalValue; + + /** \brief The value representing the actuator output. Default: 0 */ + CIMPP::Integer value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Conductance.hpp b/CGMES_2.4.15_16FEB2016/Conductance.hpp index 6a99df04e..08f09a881 100644 --- a/CGMES_2.4.15_16FEB2016/Conductance.hpp +++ b/CGMES_2.4.15_16FEB2016/Conductance.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Factor by which voltage must be multiplied to give corresponding power lost from a circuit. Real part of admittance. - */ + /** \brief Factor by which voltage must be multiplied to give corresponding power lost from a circuit. Real part of admittance. */ class Conductance { public: diff --git a/CGMES_2.4.15_16FEB2016/ConductingEquipment.cpp b/CGMES_2.4.15_16FEB2016/ConductingEquipment.cpp index 90458111d..77cbe0b92 100644 --- a/CGMES_2.4.15_16FEB2016/ConductingEquipment.cpp +++ b/CGMES_2.4.15_16FEB2016/ConductingEquipment.cpp @@ -14,8 +14,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ConductingEquipment::ConductingEquipment() : BaseVoltage(nullptr), SvStatus(nullptr) {}; -ConductingEquipment::~ConductingEquipment() {}; +ConductingEquipment::ConductingEquipment() : BaseVoltage(nullptr), SvStatus(nullptr) {} +ConductingEquipment::~ConductingEquipment() {} static const std::list PossibleProfilesForClass = { @@ -48,8 +48,6 @@ ConductingEquipment::getPossibleProfilesForAttributes() const return map; } - - bool assign_BaseVoltage_ConductingEquipment(BaseClass*, BaseClass*); bool assign_ConductingEquipment_BaseVoltage(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -66,6 +64,7 @@ bool assign_ConductingEquipment_BaseVoltage(BaseClass* BaseClass_ptr1, BaseClass } return false; } + bool assign_SvStatus_ConductingEquipment(BaseClass*, BaseClass*); bool assign_ConductingEquipment_SvStatus(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -82,6 +81,7 @@ bool assign_ConductingEquipment_SvStatus(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_Terminal_ConductingEquipment(BaseClass*, BaseClass*); bool assign_ConductingEquipment_Terminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -99,10 +99,10 @@ bool assign_ConductingEquipment_Terminals(BaseClass* BaseClass_ptr1, BaseClass* return false; } - bool get_ConductingEquipment_BaseVoltage(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ConductingEquipment* element = dynamic_cast(BaseClass_ptr1)) + const ConductingEquipment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->BaseVoltage != 0) { @@ -114,6 +114,7 @@ bool get_ConductingEquipment_BaseVoltage(const BaseClass* BaseClass_ptr1, std::l } + const char ConductingEquipment::debugName[] = "ConductingEquipment"; const char* ConductingEquipment::debugString() const { @@ -122,7 +123,7 @@ const char* ConductingEquipment::debugString() const void ConductingEquipment::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ConductingEquipment"), &ConductingEquipment_factory)); + factory_map.emplace("cim:ConductingEquipment", &ConductingEquipment_factory); } void ConductingEquipment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -131,9 +132,9 @@ void ConductingEquipment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ConductingEquipment.BaseVoltage"), &assign_ConductingEquipment_BaseVoltage)); - assign_map.insert(std::make_pair(std::string("cim:ConductingEquipment.SvStatus"), &assign_ConductingEquipment_SvStatus)); - assign_map.insert(std::make_pair(std::string("cim:ConductingEquipment.Terminals"), &assign_ConductingEquipment_Terminals)); + assign_map.emplace("cim:ConductingEquipment.BaseVoltage", &assign_ConductingEquipment_BaseVoltage); + assign_map.emplace("cim:ConductingEquipment.SvStatus", &assign_ConductingEquipment_SvStatus); + assign_map.emplace("cim:ConductingEquipment.Terminals", &assign_ConductingEquipment_Terminals); } void ConductingEquipment::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/ConductingEquipment.hpp b/CGMES_2.4.15_16FEB2016/ConductingEquipment.hpp index 43ce2c7e5..633a41871 100644 --- a/CGMES_2.4.15_16FEB2016/ConductingEquipment.hpp +++ b/CGMES_2.4.15_16FEB2016/ConductingEquipment.hpp @@ -19,9 +19,7 @@ namespace CIMPP class SvStatus; class Terminal; - /* - The parts of the AC power system that are designed to carry current or that are conductively connected through terminals. - */ + /** \brief The parts of the AC power system that are designed to carry current or that are conductively connected through terminals. */ class ConductingEquipment : public Equipment { public: @@ -29,9 +27,14 @@ namespace CIMPP ConductingEquipment(); ~ConductingEquipment() override; - CIMPP::BaseVoltage* BaseVoltage; /* All conducting equipment with this base voltage. Use only when there is no voltage level container used and only one base voltage applies. For example, not used for transformers. Default: 0 */ - CIMPP::SvStatus* SvStatus; /* The status state variable associated with this conducting equipment. Default: 0 */ - std::list Terminals; /* Conducting equipment have terminals that may be connected to other conducting equipment terminals via connectivity nodes or topological nodes. Default: 0 */ + /** \brief All conducting equipment with this base voltage. Use only when there is no voltage level container used and only one base voltage applies. For example, not used for transformers. Default: 0 */ + CIMPP::BaseVoltage* BaseVoltage; + + /** \brief The status state variable associated with this conducting equipment. Default: 0 */ + CIMPP::SvStatus* SvStatus; + + /** \brief Conducting equipment have terminals that may be connected to other conducting equipment terminals via connectivity nodes or topological nodes. Default: 0 */ + std::list Terminals; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Conductor.cpp b/CGMES_2.4.15_16FEB2016/Conductor.cpp index d0f5a4be4..c3579e253 100644 --- a/CGMES_2.4.15_16FEB2016/Conductor.cpp +++ b/CGMES_2.4.15_16FEB2016/Conductor.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Length.hpp" using namespace CIMPP; -Conductor::Conductor() {}; -Conductor::~Conductor() {}; +Conductor::Conductor() {} +Conductor::~Conductor() {} static const std::list PossibleProfilesForClass = { @@ -40,25 +39,24 @@ Conductor::getPossibleProfilesForAttributes() const return map; } - -bool assign_Conductor_length(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Conductor_length(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Conductor* element = dynamic_cast(BaseClass_ptr1)) + Conductor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->length; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_Conductor_length(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Conductor* element = dynamic_cast(BaseClass_ptr1)) + const Conductor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->length; if (!buffer.str().empty()) @@ -70,8 +68,6 @@ bool get_Conductor_length(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char Conductor::debugName[] = "Conductor"; const char* Conductor::debugString() const { @@ -80,12 +76,12 @@ const char* Conductor::debugString() const void Conductor::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Conductor"), &Conductor_factory)); + factory_map.emplace("cim:Conductor", &Conductor_factory); } void Conductor::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Conductor.length"), &assign_Conductor_length)); + assign_map.emplace("cim:Conductor.length", &assign_Conductor_length); } void Conductor::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/Conductor.hpp b/CGMES_2.4.15_16FEB2016/Conductor.hpp index f37df48b9..cb84bd42d 100644 --- a/CGMES_2.4.15_16FEB2016/Conductor.hpp +++ b/CGMES_2.4.15_16FEB2016/Conductor.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Combination of conducting material with consistent electrical characteristics, building a single electrical system, used to carry current between points in the power system. - */ + /** \brief Combination of conducting material with consistent electrical characteristics, building a single electrical system, used to carry current between points in the power system. */ class Conductor : public ConductingEquipment { public: @@ -27,7 +25,8 @@ namespace CIMPP Conductor(); ~Conductor() override; - CIMPP::Length length; /* Segment length for calculating line section capabilities Default: nullptr */ + /** \brief Segment length for calculating line section capabilities Default: nullptr */ + CIMPP::Length length; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ConformLoad.cpp b/CGMES_2.4.15_16FEB2016/ConformLoad.cpp index a71db54b1..ab5e59f20 100644 --- a/CGMES_2.4.15_16FEB2016/ConformLoad.cpp +++ b/CGMES_2.4.15_16FEB2016/ConformLoad.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ConformLoad::ConformLoad() : LoadGroup(nullptr) {}; -ConformLoad::~ConformLoad() {}; +ConformLoad::ConformLoad() : LoadGroup(nullptr) {} +ConformLoad::~ConformLoad() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ ConformLoad::getPossibleProfilesForAttributes() const return map; } - - bool assign_ConformLoadGroup_EnergyConsumers(BaseClass*, BaseClass*); bool assign_ConformLoad_LoadGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,10 +58,10 @@ bool assign_ConformLoad_LoadGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClas return false; } - bool get_ConformLoad_LoadGroup(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ConformLoad* element = dynamic_cast(BaseClass_ptr1)) + const ConformLoad* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->LoadGroup != 0) { @@ -74,7 +72,6 @@ bool get_ConformLoad_LoadGroup(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ConformLoad"), &ConformLoad_factory)); + factory_map.emplace("cim:ConformLoad", &ConformLoad_factory); } void ConformLoad::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -92,7 +89,7 @@ void ConformLoad::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ConformLoad.LoadGroup"), &assign_ConformLoad_LoadGroup)); + assign_map.emplace("cim:ConformLoad.LoadGroup", &assign_ConformLoad_LoadGroup); } void ConformLoad::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/ConformLoad.hpp b/CGMES_2.4.15_16FEB2016/ConformLoad.hpp index 31946d05a..0448c6f96 100644 --- a/CGMES_2.4.15_16FEB2016/ConformLoad.hpp +++ b/CGMES_2.4.15_16FEB2016/ConformLoad.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class ConformLoadGroup; - /* - ConformLoad represent loads that follow a daily load change pattern where the pattern can be used to scale the load with a system load. - */ + /** \brief ConformLoad represent loads that follow a daily load change pattern where the pattern can be used to scale the load with a system load. */ class ConformLoad : public EnergyConsumer { public: @@ -27,7 +25,8 @@ namespace CIMPP ConformLoad(); ~ConformLoad() override; - CIMPP::ConformLoadGroup* LoadGroup; /* Group of this ConformLoad. Default: 0 */ + /** \brief Group of this ConformLoad. Default: 0 */ + CIMPP::ConformLoadGroup* LoadGroup; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ConformLoadGroup.cpp b/CGMES_2.4.15_16FEB2016/ConformLoadGroup.cpp index cccde6cb4..c8d5c15fa 100644 --- a/CGMES_2.4.15_16FEB2016/ConformLoadGroup.cpp +++ b/CGMES_2.4.15_16FEB2016/ConformLoadGroup.cpp @@ -8,13 +8,13 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "ConformLoadSchedule.hpp" #include "ConformLoad.hpp" +#include "ConformLoadSchedule.hpp" using namespace CIMPP; -ConformLoadGroup::ConformLoadGroup() {}; -ConformLoadGroup::~ConformLoadGroup() {}; +ConformLoadGroup::ConformLoadGroup() {} +ConformLoadGroup::~ConformLoadGroup() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ ConformLoadGroup::getPossibleProfilesForAttributes() const return map; } - - bool assign_ConformLoadSchedule_ConformLoadGroup(BaseClass*, BaseClass*); bool assign_ConformLoadGroup_ConformLoadSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_ConformLoadGroup_ConformLoadSchedules(BaseClass* BaseClass_ptr1, Bas } return false; } + bool assign_ConformLoad_LoadGroup(BaseClass*, BaseClass*); bool assign_ConformLoadGroup_EnergyConsumers(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -87,7 +86,7 @@ const char* ConformLoadGroup::debugString() const void ConformLoadGroup::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ConformLoadGroup"), &ConformLoadGroup_factory)); + factory_map.emplace("cim:ConformLoadGroup", &ConformLoadGroup_factory); } void ConformLoadGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -96,8 +95,8 @@ void ConformLoadGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ConformLoadGroup.ConformLoadSchedules"), &assign_ConformLoadGroup_ConformLoadSchedules)); - assign_map.insert(std::make_pair(std::string("cim:ConformLoadGroup.EnergyConsumers"), &assign_ConformLoadGroup_EnergyConsumers)); + assign_map.emplace("cim:ConformLoadGroup.ConformLoadSchedules", &assign_ConformLoadGroup_ConformLoadSchedules); + assign_map.emplace("cim:ConformLoadGroup.EnergyConsumers", &assign_ConformLoadGroup_EnergyConsumers); } void ConformLoadGroup::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/ConformLoadGroup.hpp b/CGMES_2.4.15_16FEB2016/ConformLoadGroup.hpp index 9c9ab4de7..5e59426da 100644 --- a/CGMES_2.4.15_16FEB2016/ConformLoadGroup.hpp +++ b/CGMES_2.4.15_16FEB2016/ConformLoadGroup.hpp @@ -18,9 +18,7 @@ namespace CIMPP class ConformLoad; class ConformLoadSchedule; - /* - A group of loads conforming to an allocation pattern. - */ + /** \brief A group of loads conforming to an allocation pattern. */ class ConformLoadGroup : public LoadGroup { public: @@ -28,8 +26,11 @@ namespace CIMPP ConformLoadGroup(); ~ConformLoadGroup() override; - std::list ConformLoadSchedules; /* The ConformLoadSchedules in the ConformLoadGroup. Default: 0 */ - std::list EnergyConsumers; /* Conform loads assigned to this ConformLoadGroup. Default: 0 */ + /** \brief The ConformLoadSchedules in the ConformLoadGroup. Default: 0 */ + std::list ConformLoadSchedules; + + /** \brief Conform loads assigned to this ConformLoadGroup. Default: 0 */ + std::list EnergyConsumers; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ConformLoadSchedule.cpp b/CGMES_2.4.15_16FEB2016/ConformLoadSchedule.cpp index 5f93ccf7f..51bb1e07b 100644 --- a/CGMES_2.4.15_16FEB2016/ConformLoadSchedule.cpp +++ b/CGMES_2.4.15_16FEB2016/ConformLoadSchedule.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ConformLoadSchedule::ConformLoadSchedule() : ConformLoadGroup(nullptr) {}; -ConformLoadSchedule::~ConformLoadSchedule() {}; +ConformLoadSchedule::ConformLoadSchedule() : ConformLoadGroup(nullptr) {} +ConformLoadSchedule::~ConformLoadSchedule() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ ConformLoadSchedule::getPossibleProfilesForAttributes() const return map; } - - bool assign_ConformLoadGroup_ConformLoadSchedules(BaseClass*, BaseClass*); bool assign_ConformLoadSchedule_ConformLoadGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_ConformLoadSchedule_ConformLoadGroup(BaseClass* BaseClass_ptr1, Base return false; } - bool get_ConformLoadSchedule_ConformLoadGroup(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ConformLoadSchedule* element = dynamic_cast(BaseClass_ptr1)) + const ConformLoadSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ConformLoadGroup != 0) { @@ -73,7 +71,6 @@ bool get_ConformLoadSchedule_ConformLoadGroup(const BaseClass* BaseClass_ptr1, s return false; } - const char ConformLoadSchedule::debugName[] = "ConformLoadSchedule"; const char* ConformLoadSchedule::debugString() const { @@ -82,7 +79,7 @@ const char* ConformLoadSchedule::debugString() const void ConformLoadSchedule::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ConformLoadSchedule"), &ConformLoadSchedule_factory)); + factory_map.emplace("cim:ConformLoadSchedule", &ConformLoadSchedule_factory); } void ConformLoadSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void ConformLoadSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ConformLoadSchedule.ConformLoadGroup"), &assign_ConformLoadSchedule_ConformLoadGroup)); + assign_map.emplace("cim:ConformLoadSchedule.ConformLoadGroup", &assign_ConformLoadSchedule_ConformLoadGroup); } void ConformLoadSchedule::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/ConformLoadSchedule.hpp b/CGMES_2.4.15_16FEB2016/ConformLoadSchedule.hpp index 9712fa6c4..72fd6f6af 100644 --- a/CGMES_2.4.15_16FEB2016/ConformLoadSchedule.hpp +++ b/CGMES_2.4.15_16FEB2016/ConformLoadSchedule.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class ConformLoadGroup; - /* - A curve of load versus time (X-axis) showing the active power values (Y1-axis) and reactive power (Y2-axis) for each unit of the period covered. This curve represents a typical pattern of load over the time period for a given day type and season. - */ + /** \brief A curve of load versus time (X-axis) showing the active power values (Y1-axis) and reactive power (Y2-axis) for each unit of the period covered. This curve represents a typical pattern of load over the time period for a given day type and season. */ class ConformLoadSchedule : public SeasonDayTypeSchedule { public: @@ -27,7 +25,8 @@ namespace CIMPP ConformLoadSchedule(); ~ConformLoadSchedule() override; - CIMPP::ConformLoadGroup* ConformLoadGroup; /* The ConformLoadGroup where the ConformLoadSchedule belongs. Default: 0 */ + /** \brief The ConformLoadGroup where the ConformLoadSchedule belongs. Default: 0 */ + CIMPP::ConformLoadGroup* ConformLoadGroup; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ConnectivityNode.cpp b/CGMES_2.4.15_16FEB2016/ConnectivityNode.cpp index 556c354ae..a387855d6 100644 --- a/CGMES_2.4.15_16FEB2016/ConnectivityNode.cpp +++ b/CGMES_2.4.15_16FEB2016/ConnectivityNode.cpp @@ -11,18 +11,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "ConnectivityNodeContainer.hpp" #include "Terminal.hpp" #include "TopologicalNode.hpp" -#include "Boolean.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -ConnectivityNode::ConnectivityNode() : ConnectivityNodeContainer(nullptr), TopologicalNode(nullptr) {}; -ConnectivityNode::~ConnectivityNode() {}; +ConnectivityNode::ConnectivityNode() : ConnectivityNodeContainer(nullptr), TopologicalNode(nullptr) {} +ConnectivityNode::~ConnectivityNode() {} static const std::list PossibleProfilesForClass = { @@ -61,151 +54,188 @@ ConnectivityNode::getPossibleProfilesForAttributes() const return map; } +bool assign_ConnectivityNodeContainer_ConnectivityNodes(BaseClass*, BaseClass*); +bool assign_ConnectivityNode_ConnectivityNodeContainer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + ConnectivityNodeContainer* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ConnectivityNodeContainer != element2) + { + element->ConnectivityNodeContainer = element2; + return assign_ConnectivityNodeContainer_ConnectivityNodes(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_ConnectivityNode_boundaryPoint(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Terminal_ConnectivityNode(BaseClass*, BaseClass*); +bool assign_ConnectivityNode_Terminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->boundaryPoint; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->Terminals.begin(), element->Terminals.end(), element2) == element->Terminals.end()) + { + element->Terminals.push_back(element2); + return assign_Terminal_ConnectivityNode(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_ConnectivityNode_fromEndIsoCode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologicalNode_ConnectivityNodes(BaseClass*, BaseClass*); +bool assign_ConnectivityNode_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - element->fromEndIsoCode = buffer.str(); - if (buffer.fail()) - return false; - else - return true; + if (element->TopologicalNode != element2) + { + element->TopologicalNode = element2; + return assign_TopologicalNode_ConnectivityNodes(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_ConnectivityNode_fromEndName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ConnectivityNode_boundaryPoint(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - element->fromEndName = buffer.str(); - if (buffer.fail()) - return false; - else + buffer >> element->boundaryPoint; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ConnectivityNode_fromEndNameTso(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ConnectivityNode_fromEndIsoCode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - element->fromEndNameTso = buffer.str(); - if (buffer.fail()) - return false; - else + element->fromEndIsoCode = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ConnectivityNode_toEndIsoCode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ConnectivityNode_fromEndName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - element->toEndIsoCode = buffer.str(); - if (buffer.fail()) - return false; - else + element->fromEndName = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ConnectivityNode_toEndName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ConnectivityNode_fromEndNameTso(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - element->toEndName = buffer.str(); - if (buffer.fail()) - return false; - else + element->fromEndNameTso = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ConnectivityNode_toEndNameTso(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ConnectivityNode_toEndIsoCode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - element->toEndNameTso = buffer.str(); - if (buffer.fail()) - return false; - else + element->toEndIsoCode = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_ConnectivityNodeContainer_ConnectivityNodes(BaseClass*, BaseClass*); -bool assign_ConnectivityNode_ConnectivityNodeContainer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_ConnectivityNode_toEndName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); - ConnectivityNodeContainer* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->ConnectivityNodeContainer != element2) + element->toEndName = buffer.str(); + if (!buffer.fail()) { - element->ConnectivityNodeContainer = element2; - return assign_ConnectivityNodeContainer_ConnectivityNodes(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_Terminal_ConnectivityNode(BaseClass*, BaseClass*); -bool assign_ConnectivityNode_Terminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_ConnectivityNode_toEndNameTso(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); - Terminal* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->Terminals.begin(), element->Terminals.end(), element2) == element->Terminals.end()) + element->toEndNameTso = buffer.str(); + if (!buffer.fail()) { - element->Terminals.push_back(element2); - return assign_Terminal_ConnectivityNode(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_TopologicalNode_ConnectivityNodes(BaseClass*, BaseClass*); -bool assign_ConnectivityNode_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool get_ConnectivityNode_ConnectivityNodeContainer(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); - TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->TopologicalNode != element2) + if (element->ConnectivityNodeContainer != 0) { - element->TopologicalNode = element2; - return assign_TopologicalNode_ConnectivityNodes(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->ConnectivityNodeContainer); + return true; + } + } + return false; +} + + +bool get_ConnectivityNode_TopologicalNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) +{ + const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + if (element->TopologicalNode != 0) + { + BaseClass_list.push_back(element->TopologicalNode); + return true; } - return true; } return false; } bool get_ConnectivityNode_boundaryPoint(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->boundaryPoint; if (!buffer.str().empty()) @@ -219,7 +249,8 @@ bool get_ConnectivityNode_boundaryPoint(const BaseClass* BaseClass_ptr1, std::st bool get_ConnectivityNode_fromEndIsoCode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fromEndIsoCode; if (!buffer.str().empty()) @@ -233,7 +264,8 @@ bool get_ConnectivityNode_fromEndIsoCode(const BaseClass* BaseClass_ptr1, std::s bool get_ConnectivityNode_fromEndName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fromEndName; if (!buffer.str().empty()) @@ -247,7 +279,8 @@ bool get_ConnectivityNode_fromEndName(const BaseClass* BaseClass_ptr1, std::stri bool get_ConnectivityNode_fromEndNameTso(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fromEndNameTso; if (!buffer.str().empty()) @@ -261,7 +294,8 @@ bool get_ConnectivityNode_fromEndNameTso(const BaseClass* BaseClass_ptr1, std::s bool get_ConnectivityNode_toEndIsoCode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->toEndIsoCode; if (!buffer.str().empty()) @@ -275,7 +309,8 @@ bool get_ConnectivityNode_toEndIsoCode(const BaseClass* BaseClass_ptr1, std::str bool get_ConnectivityNode_toEndName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->toEndName; if (!buffer.str().empty()) @@ -289,7 +324,8 @@ bool get_ConnectivityNode_toEndName(const BaseClass* BaseClass_ptr1, std::string bool get_ConnectivityNode_toEndNameTso(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->toEndNameTso; if (!buffer.str().empty()) @@ -301,34 +337,6 @@ bool get_ConnectivityNode_toEndNameTso(const BaseClass* BaseClass_ptr1, std::str return false; } - -bool get_ConnectivityNode_ConnectivityNodeContainer(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->ConnectivityNodeContainer != 0) - { - BaseClass_list.push_back(element->ConnectivityNodeContainer); - return true; - } - } - return false; -} - -bool get_ConnectivityNode_TopologicalNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->TopologicalNode != 0) - { - BaseClass_list.push_back(element->TopologicalNode); - return true; - } - } - return false; -} - - const char ConnectivityNode::debugName[] = "ConnectivityNode"; const char* ConnectivityNode::debugString() const { @@ -337,25 +345,25 @@ const char* ConnectivityNode::debugString() const void ConnectivityNode::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ConnectivityNode"), &ConnectivityNode_factory)); + factory_map.emplace("cim:ConnectivityNode", &ConnectivityNode_factory); } void ConnectivityNode::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNode.boundaryPoint"), &assign_ConnectivityNode_boundaryPoint)); - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNode.fromEndIsoCode"), &assign_ConnectivityNode_fromEndIsoCode)); - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNode.fromEndName"), &assign_ConnectivityNode_fromEndName)); - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNode.fromEndNameTso"), &assign_ConnectivityNode_fromEndNameTso)); - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNode.toEndIsoCode"), &assign_ConnectivityNode_toEndIsoCode)); - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNode.toEndName"), &assign_ConnectivityNode_toEndName)); - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNode.toEndNameTso"), &assign_ConnectivityNode_toEndNameTso)); + assign_map.emplace("cim:ConnectivityNode.boundaryPoint", &assign_ConnectivityNode_boundaryPoint); + assign_map.emplace("cim:ConnectivityNode.fromEndIsoCode", &assign_ConnectivityNode_fromEndIsoCode); + assign_map.emplace("cim:ConnectivityNode.fromEndName", &assign_ConnectivityNode_fromEndName); + assign_map.emplace("cim:ConnectivityNode.fromEndNameTso", &assign_ConnectivityNode_fromEndNameTso); + assign_map.emplace("cim:ConnectivityNode.toEndIsoCode", &assign_ConnectivityNode_toEndIsoCode); + assign_map.emplace("cim:ConnectivityNode.toEndName", &assign_ConnectivityNode_toEndName); + assign_map.emplace("cim:ConnectivityNode.toEndNameTso", &assign_ConnectivityNode_toEndNameTso); } void ConnectivityNode::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNode.ConnectivityNodeContainer"), &assign_ConnectivityNode_ConnectivityNodeContainer)); - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNode.Terminals"), &assign_ConnectivityNode_Terminals)); - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNode.TopologicalNode"), &assign_ConnectivityNode_TopologicalNode)); + assign_map.emplace("cim:ConnectivityNode.ConnectivityNodeContainer", &assign_ConnectivityNode_ConnectivityNodeContainer); + assign_map.emplace("cim:ConnectivityNode.Terminals", &assign_ConnectivityNode_Terminals); + assign_map.emplace("cim:ConnectivityNode.TopologicalNode", &assign_ConnectivityNode_TopologicalNode); } void ConnectivityNode::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/ConnectivityNode.hpp b/CGMES_2.4.15_16FEB2016/ConnectivityNode.hpp index a9390568d..d6b9bed98 100644 --- a/CGMES_2.4.15_16FEB2016/ConnectivityNode.hpp +++ b/CGMES_2.4.15_16FEB2016/ConnectivityNode.hpp @@ -21,9 +21,7 @@ namespace CIMPP class Terminal; class TopologicalNode; - /* - Connectivity nodes are points where terminals of AC conducting equipment are connected together with zero impedance. - */ + /** \brief Connectivity nodes are points where terminals of AC conducting equipment are connected together with zero impedance. */ class ConnectivityNode : public IdentifiedObject { public: @@ -31,16 +29,35 @@ namespace CIMPP ConnectivityNode(); ~ConnectivityNode() override; - CIMPP::ConnectivityNodeContainer* ConnectivityNodeContainer; /* Container of this connectivity node. Default: 0 */ - std::list Terminals; /* The connectivity node to which this terminal connects with zero impedance. Default: 0 */ - CIMPP::TopologicalNode* TopologicalNode; /* The topological node to which this connectivity node is assigned. May depend on the current state of switches in the network. Default: 0 */ - CIMPP::Boolean boundaryPoint; /* Identifies if a node is a BoundaryPoint. If boundaryPoint=true the ConnectivityNode or the TopologicalNode represents a BoundaryPoint. Default: false */ - CIMPP::String fromEndIsoCode; /* The attribute is used for an exchange of the ISO code of the region to which the `From` side of the Boundary point belongs to or it is connected to. The ISO code is two characters country code as defined by ISO 3166 (). The length of the string is 2 characters maximum. The attribute is a required for the Boundary Model Authority Set where this attribute is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ - CIMPP::String fromEndName; /* The attribute is used for an exchange of a human readable name with length of the string 32 characters maximum. The attribute covers two cases: The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ - CIMPP::String fromEndNameTso; /* The attribute is used for an exchange of the name of the TSO to which the `From` side of the Boundary point belongs to or it is connected to. The length of the string is 32 characters maximum. The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ - CIMPP::String toEndIsoCode; /* The attribute is used for an exchange of the ISO code of the region to which the `To` side of the Boundary point belongs to or it is connected to. The ISO code is two characters country code as defined by ISO 3166 (). The length of the string is 2 characters maximum. The attribute is a required for the Boundary Model Authority Set where this attribute is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ - CIMPP::String toEndName; /* The attribute is used for an exchange of a human readable name with length of the string 32 characters maximum. The attribute covers two cases: The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ - CIMPP::String toEndNameTso; /* The attribute is used for an exchange of the name of the TSO to which the `To` side of the Boundary point belongs to or it is connected to. The length of the string is 32 characters maximum. The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + /** \brief Container of this connectivity node. Default: 0 */ + CIMPP::ConnectivityNodeContainer* ConnectivityNodeContainer; + + /** \brief The connectivity node to which this terminal connects with zero impedance. Default: 0 */ + std::list Terminals; + + /** \brief The topological node to which this connectivity node is assigned. May depend on the current state of switches in the network. Default: 0 */ + CIMPP::TopologicalNode* TopologicalNode; + + /** \brief Identifies if a node is a BoundaryPoint. If boundaryPoint=true the ConnectivityNode or the TopologicalNode represents a BoundaryPoint. Default: false */ + CIMPP::Boolean boundaryPoint; + + /** \brief The attribute is used for an exchange of the ISO code of the region to which the `From` side of the Boundary point belongs to or it is connected to. The ISO code is two characters country code as defined by ISO 3166 (). The length of the string is 2 characters maximum. The attribute is a required for the Boundary Model Authority Set where this attribute is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + CIMPP::String fromEndIsoCode; + + /** \brief The attribute is used for an exchange of a human readable name with length of the string 32 characters maximum. The attribute covers two cases: The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + CIMPP::String fromEndName; + + /** \brief The attribute is used for an exchange of the name of the TSO to which the `From` side of the Boundary point belongs to or it is connected to. The length of the string is 32 characters maximum. The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + CIMPP::String fromEndNameTso; + + /** \brief The attribute is used for an exchange of the ISO code of the region to which the `To` side of the Boundary point belongs to or it is connected to. The ISO code is two characters country code as defined by ISO 3166 (). The length of the string is 2 characters maximum. The attribute is a required for the Boundary Model Authority Set where this attribute is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + CIMPP::String toEndIsoCode; + + /** \brief The attribute is used for an exchange of a human readable name with length of the string 32 characters maximum. The attribute covers two cases: The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + CIMPP::String toEndName; + + /** \brief The attribute is used for an exchange of the name of the TSO to which the `To` side of the Boundary point belongs to or it is connected to. The length of the string is 32 characters maximum. The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + CIMPP::String toEndNameTso; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ConnectivityNodeContainer.cpp b/CGMES_2.4.15_16FEB2016/ConnectivityNodeContainer.cpp index 72607921a..6e3459df3 100644 --- a/CGMES_2.4.15_16FEB2016/ConnectivityNodeContainer.cpp +++ b/CGMES_2.4.15_16FEB2016/ConnectivityNodeContainer.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ConnectivityNodeContainer::ConnectivityNodeContainer() {}; -ConnectivityNodeContainer::~ConnectivityNodeContainer() {}; +ConnectivityNodeContainer::ConnectivityNodeContainer() {} +ConnectivityNodeContainer::~ConnectivityNodeContainer() {} static const std::list PossibleProfilesForClass = { @@ -45,8 +45,6 @@ ConnectivityNodeContainer::getPossibleProfilesForAttributes() const return map; } - - bool assign_ConnectivityNode_ConnectivityNodeContainer(BaseClass*, BaseClass*); bool assign_ConnectivityNodeContainer_ConnectivityNodes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -63,6 +61,7 @@ bool assign_ConnectivityNodeContainer_ConnectivityNodes(BaseClass* BaseClass_ptr } return false; } + bool assign_TopologicalNode_ConnectivityNodeContainer(BaseClass*, BaseClass*); bool assign_ConnectivityNodeContainer_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -90,7 +89,7 @@ const char* ConnectivityNodeContainer::debugString() const void ConnectivityNodeContainer::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ConnectivityNodeContainer"), &ConnectivityNodeContainer_factory)); + factory_map.emplace("cim:ConnectivityNodeContainer", &ConnectivityNodeContainer_factory); } void ConnectivityNodeContainer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -99,8 +98,8 @@ void ConnectivityNodeContainer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNodeContainer.ConnectivityNodes"), &assign_ConnectivityNodeContainer_ConnectivityNodes)); - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNodeContainer.TopologicalNode"), &assign_ConnectivityNodeContainer_TopologicalNode)); + assign_map.emplace("cim:ConnectivityNodeContainer.ConnectivityNodes", &assign_ConnectivityNodeContainer_ConnectivityNodes); + assign_map.emplace("cim:ConnectivityNodeContainer.TopologicalNode", &assign_ConnectivityNodeContainer_TopologicalNode); } void ConnectivityNodeContainer::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/ConnectivityNodeContainer.hpp b/CGMES_2.4.15_16FEB2016/ConnectivityNodeContainer.hpp index 5ceabeeb0..4ab1c963f 100644 --- a/CGMES_2.4.15_16FEB2016/ConnectivityNodeContainer.hpp +++ b/CGMES_2.4.15_16FEB2016/ConnectivityNodeContainer.hpp @@ -18,9 +18,7 @@ namespace CIMPP class ConnectivityNode; class TopologicalNode; - /* - A base class for all objects that may contain connectivity nodes or topological nodes. - */ + /** \brief A base class for all objects that may contain connectivity nodes or topological nodes. */ class ConnectivityNodeContainer : public PowerSystemResource { public: @@ -28,8 +26,11 @@ namespace CIMPP ConnectivityNodeContainer(); ~ConnectivityNodeContainer() override; - std::list ConnectivityNodes; /* Connectivity nodes which belong to this connectivity node container. Default: 0 */ - std::list TopologicalNode; /* The topological nodes which belong to this connectivity node container. Default: 0 */ + /** \brief Connectivity nodes which belong to this connectivity node container. Default: 0 */ + std::list ConnectivityNodes; + + /** \brief The topological nodes which belong to this connectivity node container. Default: 0 */ + std::list TopologicalNode; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Connector.cpp b/CGMES_2.4.15_16FEB2016/Connector.cpp index ffe426068..207f85553 100644 --- a/CGMES_2.4.15_16FEB2016/Connector.cpp +++ b/CGMES_2.4.15_16FEB2016/Connector.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Connector::Connector() {}; -Connector::~Connector() {}; +Connector::Connector() {} +Connector::~Connector() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ Connector::getPossibleProfilesForAttributes() const return map; } - - - - - const char Connector::debugName[] = "Connector"; const char* Connector::debugString() const { @@ -52,7 +47,7 @@ const char* Connector::debugString() const void Connector::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Connector"), &Connector_factory)); + factory_map.emplace("cim:Connector", &Connector_factory); } void Connector::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/Connector.hpp b/CGMES_2.4.15_16FEB2016/Connector.hpp index c1a8e2267..0c319c834 100644 --- a/CGMES_2.4.15_16FEB2016/Connector.hpp +++ b/CGMES_2.4.15_16FEB2016/Connector.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A conductor, or group of conductors, with negligible impedance, that serve to connect other conducting equipment within a single substation and are modelled with a single logical terminal. - */ + /** \brief A conductor, or group of conductors, with negligible impedance, that serve to connect other conducting equipment within a single substation and are modelled with a single logical terminal. */ class Connector : public ConductingEquipment { public: @@ -26,7 +24,6 @@ namespace CIMPP Connector(); ~Connector() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Control.cpp b/CGMES_2.4.15_16FEB2016/Control.cpp index 7cd6c9fd1..9e90ef372 100644 --- a/CGMES_2.4.15_16FEB2016/Control.cpp +++ b/CGMES_2.4.15_16FEB2016/Control.cpp @@ -9,16 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "PowerSystemResource.hpp" -#include "String.hpp" -#include "Boolean.hpp" -#include "DateTime.hpp" -#include "UnitMultiplier.hpp" -#include "UnitSymbol.hpp" using namespace CIMPP; -Control::Control() : PowerSystemResource(nullptr) {}; -Control::~Control() {}; +Control::Control() : PowerSystemResource(nullptr) {} +Control::~Control() {} static const std::list PossibleProfilesForClass = { @@ -50,93 +45,111 @@ Control::getPossibleProfilesForAttributes() const return map; } +bool assign_PowerSystemResource_Controls(BaseClass*, BaseClass*); +bool assign_Control_PowerSystemResource(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Control* element = dynamic_cast(BaseClass_ptr1); + PowerSystemResource* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PowerSystemResource != element2) + { + element->PowerSystemResource = element2; + return assign_PowerSystemResource_Controls(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_Control_controlType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Control_controlType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Control* element = dynamic_cast(BaseClass_ptr1)) + Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->controlType = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Control_operationInProgress(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Control_operationInProgress(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Control* element = dynamic_cast(BaseClass_ptr1)) + Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->operationInProgress; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Control_timeStamp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Control_timeStamp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Control* element = dynamic_cast(BaseClass_ptr1)) + Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->timeStamp = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Control_unitMultiplier(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Control_unitMultiplier(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Control* element = dynamic_cast(BaseClass_ptr1)) + Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->unitMultiplier; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Control_unitSymbol(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Control_unitSymbol(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Control* element = dynamic_cast(BaseClass_ptr1)) + Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->unitSymbol; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_PowerSystemResource_Controls(BaseClass*, BaseClass*); -bool assign_Control_PowerSystemResource(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_Control_PowerSystemResource(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - Control* element = dynamic_cast(BaseClass_ptr1); - PowerSystemResource* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->PowerSystemResource != element2) + if (element->PowerSystemResource != 0) { - element->PowerSystemResource = element2; - return assign_PowerSystemResource_Controls(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->PowerSystemResource); + return true; } - return true; } return false; } bool get_Control_controlType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Control* element = dynamic_cast(BaseClass_ptr1)) + const Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->controlType; if (!buffer.str().empty()) @@ -150,7 +163,8 @@ bool get_Control_controlType(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_Control_operationInProgress(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Control* element = dynamic_cast(BaseClass_ptr1)) + const Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->operationInProgress; if (!buffer.str().empty()) @@ -164,7 +178,8 @@ bool get_Control_operationInProgress(const BaseClass* BaseClass_ptr1, std::strin bool get_Control_timeStamp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Control* element = dynamic_cast(BaseClass_ptr1)) + const Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->timeStamp; if (!buffer.str().empty()) @@ -176,24 +191,10 @@ bool get_Control_timeStamp(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - -bool get_Control_PowerSystemResource(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const Control* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->PowerSystemResource != 0) - { - BaseClass_list.push_back(element->PowerSystemResource); - return true; - } - } - return false; -} - - bool get_Control_unitMultiplier(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Control* element = dynamic_cast(BaseClass_ptr1)) + const Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->unitMultiplier; if (!buffer.str().empty()) @@ -207,7 +208,8 @@ bool get_Control_unitMultiplier(const BaseClass* BaseClass_ptr1, std::stringstre bool get_Control_unitSymbol(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Control* element = dynamic_cast(BaseClass_ptr1)) + const Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->unitSymbol; if (!buffer.str().empty()) @@ -227,21 +229,21 @@ const char* Control::debugString() const void Control::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Control"), &Control_factory)); + factory_map.emplace("cim:Control", &Control_factory); } void Control::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Control.controlType"), &assign_Control_controlType)); - assign_map.insert(std::make_pair(std::string("cim:Control.operationInProgress"), &assign_Control_operationInProgress)); - assign_map.insert(std::make_pair(std::string("cim:Control.timeStamp"), &assign_Control_timeStamp)); - assign_map.insert(std::make_pair(std::string("cim:Control.unitMultiplier"), &assign_Control_unitMultiplier)); - assign_map.insert(std::make_pair(std::string("cim:Control.unitSymbol"), &assign_Control_unitSymbol)); + assign_map.emplace("cim:Control.controlType", &assign_Control_controlType); + assign_map.emplace("cim:Control.operationInProgress", &assign_Control_operationInProgress); + assign_map.emplace("cim:Control.timeStamp", &assign_Control_timeStamp); + assign_map.emplace("cim:Control.unitMultiplier", &assign_Control_unitMultiplier); + assign_map.emplace("cim:Control.unitSymbol", &assign_Control_unitSymbol); } void Control::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Control.PowerSystemResource"), &assign_Control_PowerSystemResource)); + assign_map.emplace("cim:Control.PowerSystemResource", &assign_Control_PowerSystemResource); } void Control::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/Control.hpp b/CGMES_2.4.15_16FEB2016/Control.hpp index 80884239b..f0072bfae 100644 --- a/CGMES_2.4.15_16FEB2016/Control.hpp +++ b/CGMES_2.4.15_16FEB2016/Control.hpp @@ -22,9 +22,7 @@ namespace CIMPP { class PowerSystemResource; - /* - Control is used for supervisory/device control. It represents control outputs that are used to change the state in a process, e.g. close or open breaker, a set point value or a raise lower command. - */ + /** \brief Control is used for supervisory/device control. It represents control outputs that are used to change the state in a process, e.g. close or open breaker, a set point value or a raise lower command. */ class Control : public IdentifiedObject { public: @@ -32,12 +30,23 @@ namespace CIMPP Control(); ~Control() override; - CIMPP::PowerSystemResource* PowerSystemResource; /* The controller outputs used to actually govern a regulating device, e.g. the magnetization of a synchronous machine or capacitor bank breaker actuator. Default: 0 */ - CIMPP::String controlType; /* Specifies the type of Control, e.g. BreakerOn/Off, GeneratorVoltageSetPoint, TieLineFlow etc. The ControlType.name shall be unique among all specified types and describe the type. Default: '' */ - CIMPP::Boolean operationInProgress; /* Indicates that a client is currently sending control commands that has not completed. Default: false */ - CIMPP::DateTime timeStamp; /* The last time a control output was sent. Default: '' */ - CIMPP::UnitMultiplier unitMultiplier; /* The unit multiplier of the controlled quantity. Default: 0 */ - CIMPP::UnitSymbol unitSymbol; /* The unit of measure of the controlled quantity. Default: 0 */ + /** \brief The controller outputs used to actually govern a regulating device, e.g. the magnetization of a synchronous machine or capacitor bank breaker actuator. Default: 0 */ + CIMPP::PowerSystemResource* PowerSystemResource; + + /** \brief Specifies the type of Control, e.g. BreakerOn/Off, GeneratorVoltageSetPoint, TieLineFlow etc. The ControlType.name shall be unique among all specified types and describe the type. Default: '' */ + CIMPP::String controlType; + + /** \brief Indicates that a client is currently sending control commands that has not completed. Default: false */ + CIMPP::Boolean operationInProgress; + + /** \brief The last time a control output was sent. Default: '' */ + CIMPP::DateTime timeStamp; + + /** \brief The unit multiplier of the controlled quantity. Default: 0 */ + CIMPP::UnitMultiplier unitMultiplier; + + /** \brief The unit of measure of the controlled quantity. Default: 0 */ + CIMPP::UnitSymbol unitSymbol; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ControlArea.cpp b/CGMES_2.4.15_16FEB2016/ControlArea.cpp index 28cf13ad4..21c90385d 100644 --- a/CGMES_2.4.15_16FEB2016/ControlArea.cpp +++ b/CGMES_2.4.15_16FEB2016/ControlArea.cpp @@ -11,14 +11,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "ControlAreaGeneratingUnit.hpp" #include "EnergyArea.hpp" #include "TieFlow.hpp" -#include "ActivePower.hpp" -#include "ActivePower.hpp" -#include "ControlAreaTypeKind.hpp" using namespace CIMPP; -ControlArea::ControlArea() : EnergyArea(nullptr) {}; -ControlArea::~ControlArea() {}; +ControlArea::ControlArea() : EnergyArea(nullptr) {} +ControlArea::~ControlArea() {} static const std::list PossibleProfilesForClass = { @@ -51,47 +48,6 @@ ControlArea::getPossibleProfilesForAttributes() const return map; } - -bool assign_ControlArea_netInterchange(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ControlArea* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->netInterchange; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_ControlArea_pTolerance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ControlArea* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->pTolerance; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_ControlArea_type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ControlArea* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->type; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ControlAreaGeneratingUnit_ControlArea(BaseClass*, BaseClass*); bool assign_ControlArea_ControlAreaGeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -108,6 +64,7 @@ bool assign_ControlArea_ControlAreaGeneratingUnit(BaseClass* BaseClass_ptr1, Bas } return false; } + bool assign_EnergyArea_ControlArea(BaseClass*, BaseClass*); bool assign_ControlArea_EnergyArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -124,6 +81,7 @@ bool assign_ControlArea_EnergyArea(BaseClass* BaseClass_ptr1, BaseClass* BaseCla } return false; } + bool assign_TieFlow_ControlArea(BaseClass*, BaseClass*); bool assign_ControlArea_TieFlow(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -141,38 +99,53 @@ bool assign_ControlArea_TieFlow(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ return false; } -bool get_ControlArea_netInterchange(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_ControlArea_netInterchange(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const ControlArea* element = dynamic_cast(BaseClass_ptr1)) + ControlArea* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->netInterchange; - if (!buffer.str().empty()) + buffer >> element->netInterchange; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_ControlArea_pTolerance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_ControlArea_pTolerance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const ControlArea* element = dynamic_cast(BaseClass_ptr1)) + ControlArea* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->pTolerance; - if (!buffer.str().empty()) + buffer >> element->pTolerance; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + +bool assign_ControlArea_type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + ControlArea* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->type; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } bool get_ControlArea_EnergyArea(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ControlArea* element = dynamic_cast(BaseClass_ptr1)) + const ControlArea* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->EnergyArea != 0) { @@ -184,9 +157,40 @@ bool get_ControlArea_EnergyArea(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->netInterchange; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_ControlArea_pTolerance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ControlArea* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->pTolerance; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_ControlArea_type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ControlArea* element = dynamic_cast(BaseClass_ptr1)) + const ControlArea* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->type; if (!buffer.str().empty()) @@ -206,21 +210,21 @@ const char* ControlArea::debugString() const void ControlArea::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ControlArea"), &ControlArea_factory)); + factory_map.emplace("cim:ControlArea", &ControlArea_factory); } void ControlArea::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ControlArea.netInterchange"), &assign_ControlArea_netInterchange)); - assign_map.insert(std::make_pair(std::string("cim:ControlArea.pTolerance"), &assign_ControlArea_pTolerance)); - assign_map.insert(std::make_pair(std::string("cim:ControlArea.type"), &assign_ControlArea_type)); + assign_map.emplace("cim:ControlArea.netInterchange", &assign_ControlArea_netInterchange); + assign_map.emplace("cim:ControlArea.pTolerance", &assign_ControlArea_pTolerance); + assign_map.emplace("cim:ControlArea.type", &assign_ControlArea_type); } void ControlArea::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ControlArea.ControlAreaGeneratingUnit"), &assign_ControlArea_ControlAreaGeneratingUnit)); - assign_map.insert(std::make_pair(std::string("cim:ControlArea.EnergyArea"), &assign_ControlArea_EnergyArea)); - assign_map.insert(std::make_pair(std::string("cim:ControlArea.TieFlow"), &assign_ControlArea_TieFlow)); + assign_map.emplace("cim:ControlArea.ControlAreaGeneratingUnit", &assign_ControlArea_ControlAreaGeneratingUnit); + assign_map.emplace("cim:ControlArea.EnergyArea", &assign_ControlArea_EnergyArea); + assign_map.emplace("cim:ControlArea.TieFlow", &assign_ControlArea_TieFlow); } void ControlArea::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/ControlArea.hpp b/CGMES_2.4.15_16FEB2016/ControlArea.hpp index 7bc7fa50a..cb9d727e4 100644 --- a/CGMES_2.4.15_16FEB2016/ControlArea.hpp +++ b/CGMES_2.4.15_16FEB2016/ControlArea.hpp @@ -21,9 +21,7 @@ namespace CIMPP class EnergyArea; class TieFlow; - /* - A control areais a grouping of generating units and/or loads and a cutset of tie lines (as terminals) which may be used for a variety of purposes including automatic generation control, powerflow solution area interchange control specification, and input to load forecasting. Note that any number of overlapping control area specifications can be superimposed on the physical model. - */ + /** \brief A control areais a grouping of generating units and/or loads and a cutset of tie lines (as terminals) which may be used for a variety of purposes including automatic generation control, powerflow solution area interchange control specification, and input to load forecasting. Note that any number of overlapping control area specifications can be superimposed on the physical model. */ class ControlArea : public PowerSystemResource { public: @@ -31,12 +29,23 @@ namespace CIMPP ControlArea(); ~ControlArea() override; - std::list ControlAreaGeneratingUnit; /* The generating unit specificaitons for the control area. Default: 0 */ - CIMPP::EnergyArea* EnergyArea; /* The energy area that is forecast from this control area specification. Default: 0 */ - std::list TieFlow; /* The tie flows associated with the control area. Default: 0 */ - CIMPP::ActivePower netInterchange; /* The specified positive net interchange into the control area, i.e. positive sign means flow in to the area. Default: nullptr */ - CIMPP::ActivePower pTolerance; /* Active power net interchange tolerance Default: nullptr */ - CIMPP::ControlAreaTypeKind type; /* The primary type of control area definition used to determine if this is used for automatic generation control, for planning interchange control, or other purposes. A control area specified with primary type of automatic generation control could still be forecast and used as an interchange area in power flow analysis. Default: 0 */ + /** \brief The generating unit specificaitons for the control area. Default: 0 */ + std::list ControlAreaGeneratingUnit; + + /** \brief The energy area that is forecast from this control area specification. Default: 0 */ + CIMPP::EnergyArea* EnergyArea; + + /** \brief The tie flows associated with the control area. Default: 0 */ + std::list TieFlow; + + /** \brief The specified positive net interchange into the control area, i.e. positive sign means flow in to the area. Default: nullptr */ + CIMPP::ActivePower netInterchange; + + /** \brief Active power net interchange tolerance Default: nullptr */ + CIMPP::ActivePower pTolerance; + + /** \brief The primary type of control area definition used to determine if this is used for automatic generation control, for planning interchange control, or other purposes. A control area specified with primary type of automatic generation control could still be forecast and used as an interchange area in power flow analysis. Default: 0 */ + CIMPP::ControlAreaTypeKind type; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ControlAreaGeneratingUnit.cpp b/CGMES_2.4.15_16FEB2016/ControlAreaGeneratingUnit.cpp index 8512e2641..907553a54 100644 --- a/CGMES_2.4.15_16FEB2016/ControlAreaGeneratingUnit.cpp +++ b/CGMES_2.4.15_16FEB2016/ControlAreaGeneratingUnit.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ControlAreaGeneratingUnit::ControlAreaGeneratingUnit() : ControlArea(nullptr), GeneratingUnit(nullptr) {}; -ControlAreaGeneratingUnit::~ControlAreaGeneratingUnit() {}; +ControlAreaGeneratingUnit::ControlAreaGeneratingUnit() : ControlArea(nullptr), GeneratingUnit(nullptr) {} +ControlAreaGeneratingUnit::~ControlAreaGeneratingUnit() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ ControlAreaGeneratingUnit::getPossibleProfilesForAttributes() const return map; } - - bool assign_ControlArea_ControlAreaGeneratingUnit(BaseClass*, BaseClass*); bool assign_ControlAreaGeneratingUnit_ControlArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_ControlAreaGeneratingUnit_ControlArea(BaseClass* BaseClass_ptr1, Bas } return false; } + bool assign_GeneratingUnit_ControlAreaGeneratingUnit(BaseClass*, BaseClass*); bool assign_ControlAreaGeneratingUnit_GeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_ControlAreaGeneratingUnit_GeneratingUnit(BaseClass* BaseClass_ptr1, return false; } - bool get_ControlAreaGeneratingUnit_ControlArea(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ControlAreaGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const ControlAreaGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ControlArea != 0) { @@ -93,7 +92,8 @@ bool get_ControlAreaGeneratingUnit_ControlArea(const BaseClass* BaseClass_ptr1, bool get_ControlAreaGeneratingUnit_GeneratingUnit(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ControlAreaGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const ControlAreaGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->GeneratingUnit != 0) { @@ -104,7 +104,6 @@ bool get_ControlAreaGeneratingUnit_GeneratingUnit(const BaseClass* BaseClass_ptr return false; } - const char ControlAreaGeneratingUnit::debugName[] = "ControlAreaGeneratingUnit"; const char* ControlAreaGeneratingUnit::debugString() const { @@ -113,7 +112,7 @@ const char* ControlAreaGeneratingUnit::debugString() const void ControlAreaGeneratingUnit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ControlAreaGeneratingUnit"), &ControlAreaGeneratingUnit_factory)); + factory_map.emplace("cim:ControlAreaGeneratingUnit", &ControlAreaGeneratingUnit_factory); } void ControlAreaGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void ControlAreaGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ControlAreaGeneratingUnit.ControlArea"), &assign_ControlAreaGeneratingUnit_ControlArea)); - assign_map.insert(std::make_pair(std::string("cim:ControlAreaGeneratingUnit.GeneratingUnit"), &assign_ControlAreaGeneratingUnit_GeneratingUnit)); + assign_map.emplace("cim:ControlAreaGeneratingUnit.ControlArea", &assign_ControlAreaGeneratingUnit_ControlArea); + assign_map.emplace("cim:ControlAreaGeneratingUnit.GeneratingUnit", &assign_ControlAreaGeneratingUnit_GeneratingUnit); } void ControlAreaGeneratingUnit::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/ControlAreaGeneratingUnit.hpp b/CGMES_2.4.15_16FEB2016/ControlAreaGeneratingUnit.hpp index 6f41452fa..5dea42c34 100644 --- a/CGMES_2.4.15_16FEB2016/ControlAreaGeneratingUnit.hpp +++ b/CGMES_2.4.15_16FEB2016/ControlAreaGeneratingUnit.hpp @@ -18,9 +18,7 @@ namespace CIMPP class ControlArea; class GeneratingUnit; - /* - A control area generating unit. This class is needed so that alternate control area definitions may include the same generating unit. Note only one instance within a control area should reference a specific generating unit. - */ + /** \brief A control area generating unit. This class is needed so that alternate control area definitions may include the same generating unit. Note only one instance within a control area should reference a specific generating unit. */ class ControlAreaGeneratingUnit : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP ControlAreaGeneratingUnit(); ~ControlAreaGeneratingUnit() override; - CIMPP::ControlArea* ControlArea; /* The parent control area for the generating unit specifications. Default: 0 */ - CIMPP::GeneratingUnit* GeneratingUnit; /* The generating unit specified for this control area. Note that a control area should include a GeneratingUnit only once. Default: 0 */ + /** \brief The parent control area for the generating unit specifications. Default: 0 */ + CIMPP::ControlArea* ControlArea; + + /** \brief The generating unit specified for this control area. Note that a control area should include a GeneratingUnit only once. Default: 0 */ + CIMPP::GeneratingUnit* GeneratingUnit; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ControlAreaTypeKind.cpp b/CGMES_2.4.15_16FEB2016/ControlAreaTypeKind.cpp index 48f6c0cb5..21a7b1dec 100644 --- a/CGMES_2.4.15_16FEB2016/ControlAreaTypeKind.cpp +++ b/CGMES_2.4.15_16FEB2016/ControlAreaTypeKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "ControlAreaTypeKind") + if (EnumSymbol.substr(0, pos) != "ControlAreaTypeKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "AGC") + if (EnumSymbol == "AGC") { rop = ControlAreaTypeKind::AGC; return lop; } - if(EnumSymbol == "Forecast") + if (EnumSymbol == "Forecast") { rop = ControlAreaTypeKind::Forecast; return lop; } - if(EnumSymbol == "Interchange") + if (EnumSymbol == "Interchange") { rop = ControlAreaTypeKind::Interchange; return lop; diff --git a/CGMES_2.4.15_16FEB2016/ControlAreaTypeKind.hpp b/CGMES_2.4.15_16FEB2016/ControlAreaTypeKind.hpp index 025df1d5c..4597eedd8 100644 --- a/CGMES_2.4.15_16FEB2016/ControlAreaTypeKind.hpp +++ b/CGMES_2.4.15_16FEB2016/ControlAreaTypeKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The type of control area. - */ + /** \brief The type of control area. */ class ControlAreaTypeKind { public: enum ControlAreaTypeKind_ENUM { - /** - * Used for automatic generation control. - */ + /** Used for automatic generation control. */ AGC, - /** - * Used for load forecast. - */ + /** Used for load forecast. */ Forecast, - /** - * Used for interchange specification or control. - */ + /** Used for interchange specification or control. */ Interchange, }; diff --git a/CGMES_2.4.15_16FEB2016/CoordinateSystem.cpp b/CGMES_2.4.15_16FEB2016/CoordinateSystem.cpp index 223b2b2c1..56ef9a8b4 100644 --- a/CGMES_2.4.15_16FEB2016/CoordinateSystem.cpp +++ b/CGMES_2.4.15_16FEB2016/CoordinateSystem.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "Location.hpp" -#include "String.hpp" using namespace CIMPP; -CoordinateSystem::CoordinateSystem() {}; -CoordinateSystem::~CoordinateSystem() {}; +CoordinateSystem::CoordinateSystem() {} +CoordinateSystem::~CoordinateSystem() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ CoordinateSystem::getPossibleProfilesForAttributes() const return map; } - -bool assign_CoordinateSystem_crsUrn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (CoordinateSystem* element = dynamic_cast(BaseClass_ptr1)) - { - element->crsUrn = buffer.str(); - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_Location_CoordinateSystem(BaseClass*, BaseClass*); bool assign_CoordinateSystem_Location(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_CoordinateSystem_Location(BaseClass* BaseClass_ptr1, BaseClass* Base return false; } +bool assign_CoordinateSystem_crsUrn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + CoordinateSystem* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + element->crsUrn = buffer.str(); + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_CoordinateSystem_crsUrn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CoordinateSystem* element = dynamic_cast(BaseClass_ptr1)) + const CoordinateSystem* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->crsUrn; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_CoordinateSystem_crsUrn(const BaseClass* BaseClass_ptr1, std::stringstr return false; } - - const char CoordinateSystem::debugName[] = "CoordinateSystem"; const char* CoordinateSystem::debugString() const { @@ -98,17 +96,17 @@ const char* CoordinateSystem::debugString() const void CoordinateSystem::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:CoordinateSystem"), &CoordinateSystem_factory)); + factory_map.emplace("cim:CoordinateSystem", &CoordinateSystem_factory); } void CoordinateSystem::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:CoordinateSystem.crsUrn"), &assign_CoordinateSystem_crsUrn)); + assign_map.emplace("cim:CoordinateSystem.crsUrn", &assign_CoordinateSystem_crsUrn); } void CoordinateSystem::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:CoordinateSystem.Location"), &assign_CoordinateSystem_Location)); + assign_map.emplace("cim:CoordinateSystem.Location", &assign_CoordinateSystem_Location); } void CoordinateSystem::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/CoordinateSystem.hpp b/CGMES_2.4.15_16FEB2016/CoordinateSystem.hpp index 012c88433..46172486a 100644 --- a/CGMES_2.4.15_16FEB2016/CoordinateSystem.hpp +++ b/CGMES_2.4.15_16FEB2016/CoordinateSystem.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class Location; - /* - Coordinate reference system. - */ + /** \brief Coordinate reference system. */ class CoordinateSystem : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP CoordinateSystem(); ~CoordinateSystem() override; - std::list Location; /* All locations described with position points in this coordinate system. Default: 0 */ - CIMPP::String crsUrn; /* A Uniform Resource Name (URN) for the coordinate reference system (crs) used to define `Location.PositionPoints`. An example would be the European Petroleum Survey Group (EPSG) code for a coordinate reference system, defined in URN under the Open Geospatial Consortium (OGC) namespace as: urn:ogc:def:uom:EPSG::XXXX, where XXXX is an EPSG code (a full list of codes can be found at the EPSG Registry web site http://www.epsg-registry.org/). To define the coordinate system as being WGS84 (latitude, longitude) using an EPSG OGC, this attribute would be urn:ogc:def:uom:EPSG::4236. A profile should limit this code to a set of allowed URNs agreed to by all sending and receiving parties. Default: '' */ + /** \brief All locations described with position points in this coordinate system. Default: 0 */ + std::list Location; + + /** \brief A Uniform Resource Name (URN) for the coordinate reference system (crs) used to define `Location.PositionPoints`. An example would be the European Petroleum Survey Group (EPSG) code for a coordinate reference system, defined in URN under the Open Geospatial Consortium (OGC) namespace as: urn:ogc:def:uom:EPSG::XXXX, where XXXX is an EPSG code (a full list of codes can be found at the EPSG Registry web site http://www.epsg-registry.org/). To define the coordinate system as being WGS84 (latitude, longitude) using an EPSG OGC, this attribute would be urn:ogc:def:uom:EPSG::4236. A profile should limit this code to a set of allowed URNs agreed to by all sending and receiving parties. Default: '' */ + CIMPP::String crsUrn; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/CsConverter.cpp b/CGMES_2.4.15_16FEB2016/CsConverter.cpp index 6a9835a20..32000a24e 100644 --- a/CGMES_2.4.15_16FEB2016/CsConverter.cpp +++ b/CGMES_2.4.15_16FEB2016/CsConverter.cpp @@ -8,25 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "AngleDegrees.hpp" -#include "AngleDegrees.hpp" -#include "AngleDegrees.hpp" -#include "AngleDegrees.hpp" -#include "CurrentFlow.hpp" -#include "AngleDegrees.hpp" -#include "AngleDegrees.hpp" -#include "CurrentFlow.hpp" -#include "CsOperatingModeKind.hpp" -#include "CsPpccControlKind.hpp" -#include "CurrentFlow.hpp" -#include "AngleDegrees.hpp" -#include "AngleDegrees.hpp" -#include "CurrentFlow.hpp" using namespace CIMPP; -CsConverter::CsConverter() {}; -CsConverter::~CsConverter() {}; +CsConverter::CsConverter() {} +CsConverter::~CsConverter() {} static const std::list PossibleProfilesForClass = { @@ -68,194 +54,206 @@ CsConverter::getPossibleProfilesForAttributes() const return map; } - -bool assign_CsConverter_alpha(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_alpha(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->alpha; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_gamma(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_gamma(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gamma; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_maxAlpha(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_maxAlpha(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxAlpha; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_maxGamma(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_maxGamma(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxGamma; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_maxIdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_maxIdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxIdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_minAlpha(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_minAlpha(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minAlpha; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_minGamma(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_minGamma(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minGamma; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_minIdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_minIdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minIdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_operatingMode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_operatingMode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->operatingMode; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_pPccControl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_pPccControl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pPccControl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_ratedIdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_ratedIdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedIdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_targetAlpha(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_targetAlpha(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->targetAlpha; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_targetGamma(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_targetGamma(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->targetGamma; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_targetIdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_targetIdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->targetIdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_CsConverter_alpha(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->alpha; if (!buffer.str().empty()) @@ -269,7 +267,8 @@ bool get_CsConverter_alpha(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_CsConverter_gamma(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gamma; if (!buffer.str().empty()) @@ -283,7 +282,8 @@ bool get_CsConverter_gamma(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_CsConverter_maxAlpha(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxAlpha; if (!buffer.str().empty()) @@ -297,7 +297,8 @@ bool get_CsConverter_maxAlpha(const BaseClass* BaseClass_ptr1, std::stringstream bool get_CsConverter_maxGamma(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxGamma; if (!buffer.str().empty()) @@ -311,7 +312,8 @@ bool get_CsConverter_maxGamma(const BaseClass* BaseClass_ptr1, std::stringstream bool get_CsConverter_maxIdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxIdc; if (!buffer.str().empty()) @@ -325,7 +327,8 @@ bool get_CsConverter_maxIdc(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_CsConverter_minAlpha(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minAlpha; if (!buffer.str().empty()) @@ -339,7 +342,8 @@ bool get_CsConverter_minAlpha(const BaseClass* BaseClass_ptr1, std::stringstream bool get_CsConverter_minGamma(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minGamma; if (!buffer.str().empty()) @@ -353,7 +357,8 @@ bool get_CsConverter_minGamma(const BaseClass* BaseClass_ptr1, std::stringstream bool get_CsConverter_minIdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minIdc; if (!buffer.str().empty()) @@ -365,11 +370,12 @@ bool get_CsConverter_minIdc(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } -bool get_CsConverter_ratedIdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_CsConverter_operatingMode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->ratedIdc; + buffer << element->operatingMode; if (!buffer.str().empty()) { return true; @@ -379,11 +385,12 @@ bool get_CsConverter_ratedIdc(const BaseClass* BaseClass_ptr1, std::stringstream return false; } -bool get_CsConverter_targetAlpha(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_CsConverter_pPccControl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->targetAlpha; + buffer << element->pPccControl; if (!buffer.str().empty()) { return true; @@ -393,11 +400,12 @@ bool get_CsConverter_targetAlpha(const BaseClass* BaseClass_ptr1, std::stringstr return false; } -bool get_CsConverter_targetGamma(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_CsConverter_ratedIdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->targetGamma; + buffer << element->ratedIdc; if (!buffer.str().empty()) { return true; @@ -407,11 +415,12 @@ bool get_CsConverter_targetGamma(const BaseClass* BaseClass_ptr1, std::stringstr return false; } -bool get_CsConverter_targetIdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_CsConverter_targetAlpha(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->targetIdc; + buffer << element->targetAlpha; if (!buffer.str().empty()) { return true; @@ -421,13 +430,12 @@ bool get_CsConverter_targetIdc(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } - - -bool get_CsConverter_operatingMode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_CsConverter_targetGamma(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->operatingMode; + buffer << element->targetGamma; if (!buffer.str().empty()) { return true; @@ -437,11 +445,12 @@ bool get_CsConverter_operatingMode(const BaseClass* BaseClass_ptr1, std::strings return false; } -bool get_CsConverter_pPccControl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_CsConverter_targetIdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->pPccControl; + buffer << element->targetIdc; if (!buffer.str().empty()) { return true; @@ -459,25 +468,25 @@ const char* CsConverter::debugString() const void CsConverter::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:CsConverter"), &CsConverter_factory)); + factory_map.emplace("cim:CsConverter", &CsConverter_factory); } void CsConverter::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:CsConverter.alpha"), &assign_CsConverter_alpha)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.gamma"), &assign_CsConverter_gamma)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.maxAlpha"), &assign_CsConverter_maxAlpha)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.maxGamma"), &assign_CsConverter_maxGamma)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.maxIdc"), &assign_CsConverter_maxIdc)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.minAlpha"), &assign_CsConverter_minAlpha)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.minGamma"), &assign_CsConverter_minGamma)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.minIdc"), &assign_CsConverter_minIdc)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.operatingMode"), &assign_CsConverter_operatingMode)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.pPccControl"), &assign_CsConverter_pPccControl)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.ratedIdc"), &assign_CsConverter_ratedIdc)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.targetAlpha"), &assign_CsConverter_targetAlpha)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.targetGamma"), &assign_CsConverter_targetGamma)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.targetIdc"), &assign_CsConverter_targetIdc)); + assign_map.emplace("cim:CsConverter.alpha", &assign_CsConverter_alpha); + assign_map.emplace("cim:CsConverter.gamma", &assign_CsConverter_gamma); + assign_map.emplace("cim:CsConverter.maxAlpha", &assign_CsConverter_maxAlpha); + assign_map.emplace("cim:CsConverter.maxGamma", &assign_CsConverter_maxGamma); + assign_map.emplace("cim:CsConverter.maxIdc", &assign_CsConverter_maxIdc); + assign_map.emplace("cim:CsConverter.minAlpha", &assign_CsConverter_minAlpha); + assign_map.emplace("cim:CsConverter.minGamma", &assign_CsConverter_minGamma); + assign_map.emplace("cim:CsConverter.minIdc", &assign_CsConverter_minIdc); + assign_map.emplace("cim:CsConverter.operatingMode", &assign_CsConverter_operatingMode); + assign_map.emplace("cim:CsConverter.pPccControl", &assign_CsConverter_pPccControl); + assign_map.emplace("cim:CsConverter.ratedIdc", &assign_CsConverter_ratedIdc); + assign_map.emplace("cim:CsConverter.targetAlpha", &assign_CsConverter_targetAlpha); + assign_map.emplace("cim:CsConverter.targetGamma", &assign_CsConverter_targetGamma); + assign_map.emplace("cim:CsConverter.targetIdc", &assign_CsConverter_targetIdc); } void CsConverter::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/CsConverter.hpp b/CGMES_2.4.15_16FEB2016/CsConverter.hpp index 0ab9dd817..4d14a5460 100644 --- a/CGMES_2.4.15_16FEB2016/CsConverter.hpp +++ b/CGMES_2.4.15_16FEB2016/CsConverter.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - DC side of the current source converter (CSC). - */ + /** \brief DC side of the current source converter (CSC). */ class CsConverter : public ACDCConverter { public: @@ -30,20 +28,47 @@ namespace CIMPP CsConverter(); ~CsConverter() override; - CIMPP::AngleDegrees alpha; /* Firing angle, typical value between 10 and 18 degrees for a rectifier. CSC state variable, result from power flow. Default: nullptr */ - CIMPP::AngleDegrees gamma; /* Extinction angle. CSC state variable, result from power flow. Default: nullptr */ - CIMPP::AngleDegrees maxAlpha; /* Maximum firing angle. CSC configuration data used in power flow. Default: nullptr */ - CIMPP::AngleDegrees maxGamma; /* Maximum extinction angle. CSC configuration data used in power flow. Default: nullptr */ - CIMPP::CurrentFlow maxIdc; /* The maximum direct current (Id) on the DC side at which the converter should operate. Converter configuration data use in power flow. Default: nullptr */ - CIMPP::AngleDegrees minAlpha; /* Minimum firing angle. CSC configuration data used in power flow. Default: nullptr */ - CIMPP::AngleDegrees minGamma; /* Minimum extinction angle. CSC configuration data used in power flow. Default: nullptr */ - CIMPP::CurrentFlow minIdc; /* The minimum direct current (Id) on the DC side at which the converter should operate. CSC configuration data used in power flow. Default: nullptr */ - CIMPP::CsOperatingModeKind operatingMode; /* Indicates whether the DC pole is operating as an inverter or as a rectifier. CSC control variable used in power flow. Default: 0 */ - CIMPP::CsPpccControlKind pPccControl; /* Default: 0 */ - CIMPP::CurrentFlow ratedIdc; /* Rated converter DC current, also called IdN. Converter configuration data used in power flow. Default: nullptr */ - CIMPP::AngleDegrees targetAlpha; /* Target firing angle. CSC control variable used in power flow. Default: nullptr */ - CIMPP::AngleDegrees targetGamma; /* Target extinction angle. CSC control variable used in power flow. Default: nullptr */ - CIMPP::CurrentFlow targetIdc; /* DC current target value. CSC control variable used in power flow. Default: nullptr */ + /** \brief Firing angle, typical value between 10 and 18 degrees for a rectifier. CSC state variable, result from power flow. Default: nullptr */ + CIMPP::AngleDegrees alpha; + + /** \brief Extinction angle. CSC state variable, result from power flow. Default: nullptr */ + CIMPP::AngleDegrees gamma; + + /** \brief Maximum firing angle. CSC configuration data used in power flow. Default: nullptr */ + CIMPP::AngleDegrees maxAlpha; + + /** \brief Maximum extinction angle. CSC configuration data used in power flow. Default: nullptr */ + CIMPP::AngleDegrees maxGamma; + + /** \brief The maximum direct current (Id) on the DC side at which the converter should operate. Converter configuration data use in power flow. Default: nullptr */ + CIMPP::CurrentFlow maxIdc; + + /** \brief Minimum firing angle. CSC configuration data used in power flow. Default: nullptr */ + CIMPP::AngleDegrees minAlpha; + + /** \brief Minimum extinction angle. CSC configuration data used in power flow. Default: nullptr */ + CIMPP::AngleDegrees minGamma; + + /** \brief The minimum direct current (Id) on the DC side at which the converter should operate. CSC configuration data used in power flow. Default: nullptr */ + CIMPP::CurrentFlow minIdc; + + /** \brief Indicates whether the DC pole is operating as an inverter or as a rectifier. CSC control variable used in power flow. Default: 0 */ + CIMPP::CsOperatingModeKind operatingMode; + + /** \brief Default: 0 */ + CIMPP::CsPpccControlKind pPccControl; + + /** \brief Rated converter DC current, also called IdN. Converter configuration data used in power flow. Default: nullptr */ + CIMPP::CurrentFlow ratedIdc; + + /** \brief Target firing angle. CSC control variable used in power flow. Default: nullptr */ + CIMPP::AngleDegrees targetAlpha; + + /** \brief Target extinction angle. CSC control variable used in power flow. Default: nullptr */ + CIMPP::AngleDegrees targetGamma; + + /** \brief DC current target value. CSC control variable used in power flow. Default: nullptr */ + CIMPP::CurrentFlow targetIdc; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/CsOperatingModeKind.cpp b/CGMES_2.4.15_16FEB2016/CsOperatingModeKind.cpp index 61074c399..3f119efe8 100644 --- a/CGMES_2.4.15_16FEB2016/CsOperatingModeKind.cpp +++ b/CGMES_2.4.15_16FEB2016/CsOperatingModeKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "CsOperatingModeKind") + if (EnumSymbol.substr(0, pos) != "CsOperatingModeKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,12 +50,12 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "inverter") + if (EnumSymbol == "inverter") { rop = CsOperatingModeKind::inverter; return lop; } - if(EnumSymbol == "rectifier") + if (EnumSymbol == "rectifier") { rop = CsOperatingModeKind::rectifier; return lop; diff --git a/CGMES_2.4.15_16FEB2016/CsOperatingModeKind.hpp b/CGMES_2.4.15_16FEB2016/CsOperatingModeKind.hpp index eb2af30bf..dead78850 100644 --- a/CGMES_2.4.15_16FEB2016/CsOperatingModeKind.hpp +++ b/CGMES_2.4.15_16FEB2016/CsOperatingModeKind.hpp @@ -9,21 +9,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Operating mode for HVDC line operating as Current Source Converter. - */ + /** \brief Operating mode for HVDC line operating as Current Source Converter. */ class CsOperatingModeKind { public: enum CsOperatingModeKind_ENUM { - /** - * Operating as inverter - */ + /** Operating as inverter */ inverter, - /** - * Operating as rectifier. - */ + /** Operating as rectifier. */ rectifier, }; diff --git a/CGMES_2.4.15_16FEB2016/CsPpccControlKind.cpp b/CGMES_2.4.15_16FEB2016/CsPpccControlKind.cpp index e4e9aa9b2..ff79e272f 100644 --- a/CGMES_2.4.15_16FEB2016/CsPpccControlKind.cpp +++ b/CGMES_2.4.15_16FEB2016/CsPpccControlKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "CsPpccControlKind") + if (EnumSymbol.substr(0, pos) != "CsPpccControlKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "activePower") + if (EnumSymbol == "activePower") { rop = CsPpccControlKind::activePower; return lop; } - if(EnumSymbol == "dcVoltage") + if (EnumSymbol == "dcVoltage") { rop = CsPpccControlKind::dcVoltage; return lop; } - if(EnumSymbol == "dcCurrent") + if (EnumSymbol == "dcCurrent") { rop = CsPpccControlKind::dcCurrent; return lop; diff --git a/CGMES_2.4.15_16FEB2016/CsPpccControlKind.hpp b/CGMES_2.4.15_16FEB2016/CsPpccControlKind.hpp index 3c17709fb..1c5fdfdbf 100644 --- a/CGMES_2.4.15_16FEB2016/CsPpccControlKind.hpp +++ b/CGMES_2.4.15_16FEB2016/CsPpccControlKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Active power control modes for HVDC line operating as Current Source Converter. - */ + /** \brief Active power control modes for HVDC line operating as Current Source Converter. */ class CsPpccControlKind { public: enum CsPpccControlKind_ENUM { - /** - * Active power control at AC side. - */ + /** Active power control at AC side. */ activePower, - /** - * DC voltage control. - */ + /** DC voltage control. */ dcVoltage, - /** - * DC current control - */ + /** DC current control */ dcCurrent, }; diff --git a/CGMES_2.4.15_16FEB2016/Currency.cpp b/CGMES_2.4.15_16FEB2016/Currency.cpp index 0a4518071..4c73e10ce 100644 --- a/CGMES_2.4.15_16FEB2016/Currency.cpp +++ b/CGMES_2.4.15_16FEB2016/Currency.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "Currency") + if (EnumSymbol.substr(0, pos) != "Currency") { lop.setstate(std::ios::failbit); return lop; @@ -50,72 +50,72 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "USD") + if (EnumSymbol == "USD") { rop = Currency::USD; return lop; } - if(EnumSymbol == "EUR") + if (EnumSymbol == "EUR") { rop = Currency::EUR; return lop; } - if(EnumSymbol == "AUD") + if (EnumSymbol == "AUD") { rop = Currency::AUD; return lop; } - if(EnumSymbol == "CAD") + if (EnumSymbol == "CAD") { rop = Currency::CAD; return lop; } - if(EnumSymbol == "CHF") + if (EnumSymbol == "CHF") { rop = Currency::CHF; return lop; } - if(EnumSymbol == "CNY") + if (EnumSymbol == "CNY") { rop = Currency::CNY; return lop; } - if(EnumSymbol == "DKK") + if (EnumSymbol == "DKK") { rop = Currency::DKK; return lop; } - if(EnumSymbol == "GBP") + if (EnumSymbol == "GBP") { rop = Currency::GBP; return lop; } - if(EnumSymbol == "JPY") + if (EnumSymbol == "JPY") { rop = Currency::JPY; return lop; } - if(EnumSymbol == "NOK") + if (EnumSymbol == "NOK") { rop = Currency::NOK; return lop; } - if(EnumSymbol == "RUR") + if (EnumSymbol == "RUR") { rop = Currency::RUR; return lop; } - if(EnumSymbol == "SEK") + if (EnumSymbol == "SEK") { rop = Currency::SEK; return lop; } - if(EnumSymbol == "INR") + if (EnumSymbol == "INR") { rop = Currency::INR; return lop; } - if(EnumSymbol == "other") + if (EnumSymbol == "other") { rop = Currency::other; return lop; diff --git a/CGMES_2.4.15_16FEB2016/Currency.hpp b/CGMES_2.4.15_16FEB2016/Currency.hpp index f4de85751..d84836b48 100644 --- a/CGMES_2.4.15_16FEB2016/Currency.hpp +++ b/CGMES_2.4.15_16FEB2016/Currency.hpp @@ -9,69 +9,39 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Monetary currencies. Apologies for this list not being exhaustive. - */ + /** \brief Monetary currencies. Apologies for this list not being exhaustive. */ class Currency { public: enum Currency_ENUM { - /** - * US dollar - */ + /** US dollar */ USD, - /** - * European euro - */ + /** European euro */ EUR, - /** - * Australian dollar - */ + /** Australian dollar */ AUD, - /** - * Canadian dollar - */ + /** Canadian dollar */ CAD, - /** - * Swiss francs - */ + /** Swiss francs */ CHF, - /** - * Chinese yuan renminbi - */ + /** Chinese yuan renminbi */ CNY, - /** - * Danish crown - */ + /** Danish crown */ DKK, - /** - * British pound - */ + /** British pound */ GBP, - /** - * Japanese yen - */ + /** Japanese yen */ JPY, - /** - * Norwegian crown - */ + /** Norwegian crown */ NOK, - /** - * Russian ruble - */ + /** Russian ruble */ RUR, - /** - * Swedish crown - */ + /** Swedish crown */ SEK, - /** - * India rupees - */ + /** India rupees */ INR, - /** - * Another type of currency. - */ + /** Another type of currency. */ other, }; diff --git a/CGMES_2.4.15_16FEB2016/CurrentFlow.hpp b/CGMES_2.4.15_16FEB2016/CurrentFlow.hpp index 0f38f0f07..a606a845c 100644 --- a/CGMES_2.4.15_16FEB2016/CurrentFlow.hpp +++ b/CGMES_2.4.15_16FEB2016/CurrentFlow.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Electrical current with sign convention: positive flow is out of the conducting equipment into the connectivity node. Can be both AC and DC. - */ + /** \brief Electrical current with sign convention: positive flow is out of the conducting equipment into the connectivity node. Can be both AC and DC. */ class CurrentFlow { public: diff --git a/CGMES_2.4.15_16FEB2016/CurrentLimit.cpp b/CGMES_2.4.15_16FEB2016/CurrentLimit.cpp index b7fb76fd4..6b79e39d4 100644 --- a/CGMES_2.4.15_16FEB2016/CurrentLimit.cpp +++ b/CGMES_2.4.15_16FEB2016/CurrentLimit.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "CurrentFlow.hpp" using namespace CIMPP; -CurrentLimit::CurrentLimit() {}; -CurrentLimit::~CurrentLimit() {}; +CurrentLimit::CurrentLimit() {} +CurrentLimit::~CurrentLimit() {} static const std::list PossibleProfilesForClass = { @@ -40,25 +39,24 @@ CurrentLimit::getPossibleProfilesForAttributes() const return map; } - -bool assign_CurrentLimit_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CurrentLimit_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CurrentLimit* element = dynamic_cast(BaseClass_ptr1)) + CurrentLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->value; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_CurrentLimit_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CurrentLimit* element = dynamic_cast(BaseClass_ptr1)) + const CurrentLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value; if (!buffer.str().empty()) @@ -70,8 +68,6 @@ bool get_CurrentLimit_value(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char CurrentLimit::debugName[] = "CurrentLimit"; const char* CurrentLimit::debugString() const { @@ -80,12 +76,12 @@ const char* CurrentLimit::debugString() const void CurrentLimit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:CurrentLimit"), &CurrentLimit_factory)); + factory_map.emplace("cim:CurrentLimit", &CurrentLimit_factory); } void CurrentLimit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:CurrentLimit.value"), &assign_CurrentLimit_value)); + assign_map.emplace("cim:CurrentLimit.value", &assign_CurrentLimit_value); } void CurrentLimit::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/CurrentLimit.hpp b/CGMES_2.4.15_16FEB2016/CurrentLimit.hpp index dee18c3ef..b670b6c54 100644 --- a/CGMES_2.4.15_16FEB2016/CurrentLimit.hpp +++ b/CGMES_2.4.15_16FEB2016/CurrentLimit.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Operational limit on current. - */ + /** \brief Operational limit on current. */ class CurrentLimit : public OperationalLimit { public: @@ -27,7 +25,8 @@ namespace CIMPP CurrentLimit(); ~CurrentLimit() override; - CIMPP::CurrentFlow value; /* Limit on current flow. Default: nullptr */ + /** \brief Limit on current flow. Default: nullptr */ + CIMPP::CurrentFlow value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Curve.cpp b/CGMES_2.4.15_16FEB2016/Curve.cpp index 61495d0fa..776e5c46d 100644 --- a/CGMES_2.4.15_16FEB2016/Curve.cpp +++ b/CGMES_2.4.15_16FEB2016/Curve.cpp @@ -9,15 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "CurveData.hpp" -#include "CurveStyle.hpp" -#include "UnitSymbol.hpp" -#include "UnitSymbol.hpp" -#include "UnitSymbol.hpp" using namespace CIMPP; -Curve::Curve() {}; -Curve::~Curve() {}; +Curve::Curve() {} +Curve::~Curve() {} static const std::list PossibleProfilesForClass = { @@ -48,82 +44,84 @@ Curve::getPossibleProfilesForAttributes() const return map; } - -bool assign_Curve_curveStyle(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CurveData_Curve(BaseClass*, BaseClass*); +bool assign_Curve_CurveDatas(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (Curve* element = dynamic_cast(BaseClass_ptr1)) + Curve* element = dynamic_cast(BaseClass_ptr1); + CurveData* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->curveStyle; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->CurveDatas.begin(), element->CurveDatas.end(), element2) == element->CurveDatas.end()) + { + element->CurveDatas.push_back(element2); + return assign_CurveData_Curve(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_Curve_xUnit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Curve_curveStyle(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Curve* element = dynamic_cast(BaseClass_ptr1)) + Curve* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->xUnit; - if (buffer.fail()) - return false; - else + buffer >> element->curveStyle; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Curve_y1Unit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Curve_xUnit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Curve* element = dynamic_cast(BaseClass_ptr1)) + Curve* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->y1Unit; - if (buffer.fail()) - return false; - else + buffer >> element->xUnit; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Curve_y2Unit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Curve_y1Unit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Curve* element = dynamic_cast(BaseClass_ptr1)) + Curve* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->y2Unit; - if (buffer.fail()) - return false; - else + buffer >> element->y1Unit; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_CurveData_Curve(BaseClass*, BaseClass*); -bool assign_Curve_CurveDatas(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_Curve_y2Unit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { Curve* element = dynamic_cast(BaseClass_ptr1); - CurveData* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->CurveDatas.begin(), element->CurveDatas.end(), element2) == element->CurveDatas.end()) + buffer >> element->y2Unit; + if (!buffer.fail()) { - element->CurveDatas.push_back(element2); - return assign_CurveData_Curve(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } - bool get_Curve_curveStyle(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Curve* element = dynamic_cast(BaseClass_ptr1)) + const Curve* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->curveStyle; if (!buffer.str().empty()) @@ -137,7 +135,8 @@ bool get_Curve_curveStyle(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_Curve_xUnit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Curve* element = dynamic_cast(BaseClass_ptr1)) + const Curve* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xUnit; if (!buffer.str().empty()) @@ -151,7 +150,8 @@ bool get_Curve_xUnit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Curve_y1Unit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Curve* element = dynamic_cast(BaseClass_ptr1)) + const Curve* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->y1Unit; if (!buffer.str().empty()) @@ -165,7 +165,8 @@ bool get_Curve_y1Unit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_Curve_y2Unit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Curve* element = dynamic_cast(BaseClass_ptr1)) + const Curve* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->y2Unit; if (!buffer.str().empty()) @@ -185,20 +186,20 @@ const char* Curve::debugString() const void Curve::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Curve"), &Curve_factory)); + factory_map.emplace("cim:Curve", &Curve_factory); } void Curve::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Curve.curveStyle"), &assign_Curve_curveStyle)); - assign_map.insert(std::make_pair(std::string("cim:Curve.xUnit"), &assign_Curve_xUnit)); - assign_map.insert(std::make_pair(std::string("cim:Curve.y1Unit"), &assign_Curve_y1Unit)); - assign_map.insert(std::make_pair(std::string("cim:Curve.y2Unit"), &assign_Curve_y2Unit)); + assign_map.emplace("cim:Curve.curveStyle", &assign_Curve_curveStyle); + assign_map.emplace("cim:Curve.xUnit", &assign_Curve_xUnit); + assign_map.emplace("cim:Curve.y1Unit", &assign_Curve_y1Unit); + assign_map.emplace("cim:Curve.y2Unit", &assign_Curve_y2Unit); } void Curve::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Curve.CurveDatas"), &assign_Curve_CurveDatas)); + assign_map.emplace("cim:Curve.CurveDatas", &assign_Curve_CurveDatas); } void Curve::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/Curve.hpp b/CGMES_2.4.15_16FEB2016/Curve.hpp index bba8938f8..bb10f8a2b 100644 --- a/CGMES_2.4.15_16FEB2016/Curve.hpp +++ b/CGMES_2.4.15_16FEB2016/Curve.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class CurveData; - /* - A multi-purpose curve or functional relationship between an independent variable (X-axis) and dependent (Y-axis) variables. - */ + /** \brief A multi-purpose curve or functional relationship between an independent variable (X-axis) and dependent (Y-axis) variables. */ class Curve : public IdentifiedObject { public: @@ -29,11 +27,20 @@ namespace CIMPP Curve(); ~Curve() override; - std::list CurveDatas; /* The curve of this curve data point. Default: 0 */ - CIMPP::CurveStyle curveStyle; /* The style or shape of the curve. Default: 0 */ - CIMPP::UnitSymbol xUnit; /* The X-axis units of measure. Default: 0 */ - CIMPP::UnitSymbol y1Unit; /* The Y1-axis units of measure. Default: 0 */ - CIMPP::UnitSymbol y2Unit; /* The Y2-axis units of measure. Default: 0 */ + /** \brief The curve of this curve data point. Default: 0 */ + std::list CurveDatas; + + /** \brief The style or shape of the curve. Default: 0 */ + CIMPP::CurveStyle curveStyle; + + /** \brief The X-axis units of measure. Default: 0 */ + CIMPP::UnitSymbol xUnit; + + /** \brief The Y1-axis units of measure. Default: 0 */ + CIMPP::UnitSymbol y1Unit; + + /** \brief The Y2-axis units of measure. Default: 0 */ + CIMPP::UnitSymbol y2Unit; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/CurveData.cpp b/CGMES_2.4.15_16FEB2016/CurveData.cpp index eef59d94a..f2d46bf44 100644 --- a/CGMES_2.4.15_16FEB2016/CurveData.cpp +++ b/CGMES_2.4.15_16FEB2016/CurveData.cpp @@ -9,14 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "Curve.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -CurveData::CurveData() : Curve(nullptr) {}; -CurveData::~CurveData() {}; +CurveData::CurveData() : Curve(nullptr) {} +CurveData::~CurveData() {} static const std::list PossibleProfilesForClass = { @@ -46,67 +43,83 @@ CurveData::getPossibleProfilesForAttributes() const return map; } +bool assign_Curve_CurveDatas(BaseClass*, BaseClass*); +bool assign_CurveData_Curve(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + CurveData* element = dynamic_cast(BaseClass_ptr1); + Curve* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Curve != element2) + { + element->Curve = element2; + return assign_Curve_CurveDatas(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_CurveData_xvalue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CurveData_xvalue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CurveData* element = dynamic_cast(BaseClass_ptr1)) + CurveData* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xvalue; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CurveData_y1value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CurveData_y1value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CurveData* element = dynamic_cast(BaseClass_ptr1)) + CurveData* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->y1value; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CurveData_y2value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CurveData_y2value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CurveData* element = dynamic_cast(BaseClass_ptr1)) + CurveData* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->y2value; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_Curve_CurveDatas(BaseClass*, BaseClass*); -bool assign_CurveData_Curve(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_CurveData_Curve(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - CurveData* element = dynamic_cast(BaseClass_ptr1); - Curve* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const CurveData* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->Curve != element2) + if (element->Curve != 0) { - element->Curve = element2; - return assign_Curve_CurveDatas(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->Curve); + return true; } - return true; } return false; } bool get_CurveData_xvalue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CurveData* element = dynamic_cast(BaseClass_ptr1)) + const CurveData* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xvalue; if (!buffer.str().empty()) @@ -120,7 +133,8 @@ bool get_CurveData_xvalue(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_CurveData_y1value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CurveData* element = dynamic_cast(BaseClass_ptr1)) + const CurveData* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->y1value; if (!buffer.str().empty()) @@ -134,7 +148,8 @@ bool get_CurveData_y1value(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_CurveData_y2value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CurveData* element = dynamic_cast(BaseClass_ptr1)) + const CurveData* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->y2value; if (!buffer.str().empty()) @@ -146,21 +161,6 @@ bool get_CurveData_y2value(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - -bool get_CurveData_Curve(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const CurveData* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->Curve != 0) - { - BaseClass_list.push_back(element->Curve); - return true; - } - } - return false; -} - - const char CurveData::debugName[] = "CurveData"; const char* CurveData::debugString() const { @@ -169,19 +169,19 @@ const char* CurveData::debugString() const void CurveData::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:CurveData"), &CurveData_factory)); + factory_map.emplace("cim:CurveData", &CurveData_factory); } void CurveData::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:CurveData.xvalue"), &assign_CurveData_xvalue)); - assign_map.insert(std::make_pair(std::string("cim:CurveData.y1value"), &assign_CurveData_y1value)); - assign_map.insert(std::make_pair(std::string("cim:CurveData.y2value"), &assign_CurveData_y2value)); + assign_map.emplace("cim:CurveData.xvalue", &assign_CurveData_xvalue); + assign_map.emplace("cim:CurveData.y1value", &assign_CurveData_y1value); + assign_map.emplace("cim:CurveData.y2value", &assign_CurveData_y2value); } void CurveData::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:CurveData.Curve"), &assign_CurveData_Curve)); + assign_map.emplace("cim:CurveData.Curve", &assign_CurveData_Curve); } void CurveData::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/CurveData.hpp b/CGMES_2.4.15_16FEB2016/CurveData.hpp index 436ade08a..3bbd6ba03 100644 --- a/CGMES_2.4.15_16FEB2016/CurveData.hpp +++ b/CGMES_2.4.15_16FEB2016/CurveData.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class Curve; - /* - Multi-purpose data points for defining a curve. The use of this generic class is discouraged if a more specific class can be used to specify the x and y axis values along with their specific data types. - */ + /** \brief Multi-purpose data points for defining a curve. The use of this generic class is discouraged if a more specific class can be used to specify the x and y axis values along with their specific data types. */ class CurveData : public BaseClass { public: @@ -28,10 +26,17 @@ namespace CIMPP CurveData(); ~CurveData() override; - CIMPP::Curve* Curve; /* The point data values that define this curve. Default: 0 */ - CIMPP::Simple_Float xvalue; /* The data value of the X-axis variable, depending on the X-axis units. Default: nullptr */ - CIMPP::Simple_Float y1value; /* The data value of the first Y-axis variable, depending on the Y-axis units. Default: nullptr */ - CIMPP::Simple_Float y2value; /* The data value of the second Y-axis variable (if present), depending on the Y-axis units. Default: nullptr */ + /** \brief The point data values that define this curve. Default: 0 */ + CIMPP::Curve* Curve; + + /** \brief The data value of the X-axis variable, depending on the X-axis units. Default: nullptr */ + CIMPP::Simple_Float xvalue; + + /** \brief The data value of the first Y-axis variable, depending on the Y-axis units. Default: nullptr */ + CIMPP::Simple_Float y1value; + + /** \brief The data value of the second Y-axis variable (if present), depending on the Y-axis units. Default: nullptr */ + CIMPP::Simple_Float y2value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/CurveStyle.cpp b/CGMES_2.4.15_16FEB2016/CurveStyle.cpp index d28696151..bf78aeb7f 100644 --- a/CGMES_2.4.15_16FEB2016/CurveStyle.cpp +++ b/CGMES_2.4.15_16FEB2016/CurveStyle.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "CurveStyle") + if (EnumSymbol.substr(0, pos) != "CurveStyle") { lop.setstate(std::ios::failbit); return lop; @@ -50,12 +50,12 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "constantYValue") + if (EnumSymbol == "constantYValue") { rop = CurveStyle::constantYValue; return lop; } - if(EnumSymbol == "straightLineYValues") + if (EnumSymbol == "straightLineYValues") { rop = CurveStyle::straightLineYValues; return lop; diff --git a/CGMES_2.4.15_16FEB2016/CurveStyle.hpp b/CGMES_2.4.15_16FEB2016/CurveStyle.hpp index 72f95568c..0f72591f4 100644 --- a/CGMES_2.4.15_16FEB2016/CurveStyle.hpp +++ b/CGMES_2.4.15_16FEB2016/CurveStyle.hpp @@ -9,21 +9,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Style or shape of curve. - */ + /** \brief Style or shape of curve. */ class CurveStyle { public: enum CurveStyle_ENUM { - /** - * The Y-axis values are assumed constant until the next curve point and prior to the first curve point. - */ + /** The Y-axis values are assumed constant until the next curve point and prior to the first curve point. */ constantYValue, - /** - * The Y-axis values are assumed to be a straight line between values. Also known as linear interpolation. - */ + /** The Y-axis values are assumed to be a straight line between values. Also known as linear interpolation. */ straightLineYValues, }; diff --git a/CGMES_2.4.15_16FEB2016/DCBaseTerminal.cpp b/CGMES_2.4.15_16FEB2016/DCBaseTerminal.cpp index e423a7004..e7814b878 100644 --- a/CGMES_2.4.15_16FEB2016/DCBaseTerminal.cpp +++ b/CGMES_2.4.15_16FEB2016/DCBaseTerminal.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCBaseTerminal::DCBaseTerminal() : DCNode(nullptr), DCTopologicalNode(nullptr) {}; -DCBaseTerminal::~DCBaseTerminal() {}; +DCBaseTerminal::DCBaseTerminal() : DCNode(nullptr), DCTopologicalNode(nullptr) {} +DCBaseTerminal::~DCBaseTerminal() {} static const std::list PossibleProfilesForClass = { @@ -44,8 +44,6 @@ DCBaseTerminal::getPossibleProfilesForAttributes() const return map; } - - bool assign_DCNode_DCTerminals(BaseClass*, BaseClass*); bool assign_DCBaseTerminal_DCNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -62,6 +60,7 @@ bool assign_DCBaseTerminal_DCNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClas } return false; } + bool assign_DCTopologicalNode_DCTerminals(BaseClass*, BaseClass*); bool assign_DCBaseTerminal_DCTopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -79,10 +78,10 @@ bool assign_DCBaseTerminal_DCTopologicalNode(BaseClass* BaseClass_ptr1, BaseClas return false; } - bool get_DCBaseTerminal_DCNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DCBaseTerminal* element = dynamic_cast(BaseClass_ptr1)) + const DCBaseTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DCNode != 0) { @@ -95,7 +94,8 @@ bool get_DCBaseTerminal_DCNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DCBaseTerminal* element = dynamic_cast(BaseClass_ptr1)) + const DCBaseTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DCTopologicalNode != 0) { @@ -106,7 +106,6 @@ bool get_DCBaseTerminal_DCTopologicalNode(const BaseClass* BaseClass_ptr1, std:: return false; } - const char DCBaseTerminal::debugName[] = "DCBaseTerminal"; const char* DCBaseTerminal::debugString() const { @@ -115,7 +114,7 @@ const char* DCBaseTerminal::debugString() const void DCBaseTerminal::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCBaseTerminal"), &DCBaseTerminal_factory)); + factory_map.emplace("cim:DCBaseTerminal", &DCBaseTerminal_factory); } void DCBaseTerminal::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -124,8 +123,8 @@ void DCBaseTerminal::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCBaseTerminal.DCNode"), &assign_DCBaseTerminal_DCNode)); - assign_map.insert(std::make_pair(std::string("cim:DCBaseTerminal.DCTopologicalNode"), &assign_DCBaseTerminal_DCTopologicalNode)); + assign_map.emplace("cim:DCBaseTerminal.DCNode", &assign_DCBaseTerminal_DCNode); + assign_map.emplace("cim:DCBaseTerminal.DCTopologicalNode", &assign_DCBaseTerminal_DCTopologicalNode); } void DCBaseTerminal::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/DCBaseTerminal.hpp b/CGMES_2.4.15_16FEB2016/DCBaseTerminal.hpp index 6aa4878cb..8c0b90332 100644 --- a/CGMES_2.4.15_16FEB2016/DCBaseTerminal.hpp +++ b/CGMES_2.4.15_16FEB2016/DCBaseTerminal.hpp @@ -18,9 +18,7 @@ namespace CIMPP class DCNode; class DCTopologicalNode; - /* - An electrical connection point at a piece of DC conducting equipment. DC terminals are connected at one physical DC node that may have multiple DC terminals connected. A DC node is similar to an AC connectivity node. The model enforces that DC connections are distinct from AC connections. - */ + /** \brief An electrical connection point at a piece of DC conducting equipment. DC terminals are connected at one physical DC node that may have multiple DC terminals connected. A DC node is similar to an AC connectivity node. The model enforces that DC connections are distinct from AC connections. */ class DCBaseTerminal : public ACDCTerminal { public: @@ -28,8 +26,11 @@ namespace CIMPP DCBaseTerminal(); ~DCBaseTerminal() override; - CIMPP::DCNode* DCNode; /* Default: 0 */ - CIMPP::DCTopologicalNode* DCTopologicalNode; /* See association end TopologicalNode.Terminal. Default: 0 */ + /** \brief Default: 0 */ + CIMPP::DCNode* DCNode; + + /** \brief See association end TopologicalNode.Terminal. Default: 0 */ + CIMPP::DCTopologicalNode* DCTopologicalNode; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/DCBreaker.cpp b/CGMES_2.4.15_16FEB2016/DCBreaker.cpp index b00cbaa77..721524d6e 100644 --- a/CGMES_2.4.15_16FEB2016/DCBreaker.cpp +++ b/CGMES_2.4.15_16FEB2016/DCBreaker.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCBreaker::DCBreaker() {}; -DCBreaker::~DCBreaker() {}; +DCBreaker::DCBreaker() {} +DCBreaker::~DCBreaker() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ DCBreaker::getPossibleProfilesForAttributes() const return map; } - - - - - const char DCBreaker::debugName[] = "DCBreaker"; const char* DCBreaker::debugString() const { @@ -51,7 +46,7 @@ const char* DCBreaker::debugString() const void DCBreaker::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCBreaker"), &DCBreaker_factory)); + factory_map.emplace("cim:DCBreaker", &DCBreaker_factory); } void DCBreaker::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/DCBreaker.hpp b/CGMES_2.4.15_16FEB2016/DCBreaker.hpp index cfecf1c9c..51ebd5f70 100644 --- a/CGMES_2.4.15_16FEB2016/DCBreaker.hpp +++ b/CGMES_2.4.15_16FEB2016/DCBreaker.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A breaker within a DC system. - */ + /** \brief A breaker within a DC system. */ class DCBreaker : public DCSwitch { public: @@ -26,7 +24,6 @@ namespace CIMPP DCBreaker(); ~DCBreaker() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/DCBusbar.cpp b/CGMES_2.4.15_16FEB2016/DCBusbar.cpp index 99e4dbdbd..1ecf0f6fa 100644 --- a/CGMES_2.4.15_16FEB2016/DCBusbar.cpp +++ b/CGMES_2.4.15_16FEB2016/DCBusbar.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCBusbar::DCBusbar() {}; -DCBusbar::~DCBusbar() {}; +DCBusbar::DCBusbar() {} +DCBusbar::~DCBusbar() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ DCBusbar::getPossibleProfilesForAttributes() const return map; } - - - - - const char DCBusbar::debugName[] = "DCBusbar"; const char* DCBusbar::debugString() const { @@ -51,7 +46,7 @@ const char* DCBusbar::debugString() const void DCBusbar::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCBusbar"), &DCBusbar_factory)); + factory_map.emplace("cim:DCBusbar", &DCBusbar_factory); } void DCBusbar::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/DCBusbar.hpp b/CGMES_2.4.15_16FEB2016/DCBusbar.hpp index ac483b4bb..443ea1142 100644 --- a/CGMES_2.4.15_16FEB2016/DCBusbar.hpp +++ b/CGMES_2.4.15_16FEB2016/DCBusbar.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A busbar within a DC system. - */ + /** \brief A busbar within a DC system. */ class DCBusbar : public DCConductingEquipment { public: @@ -26,7 +24,6 @@ namespace CIMPP DCBusbar(); ~DCBusbar() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/DCChopper.cpp b/CGMES_2.4.15_16FEB2016/DCChopper.cpp index d0ae9bb6f..74dd30f11 100644 --- a/CGMES_2.4.15_16FEB2016/DCChopper.cpp +++ b/CGMES_2.4.15_16FEB2016/DCChopper.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCChopper::DCChopper() {}; -DCChopper::~DCChopper() {}; +DCChopper::DCChopper() {} +DCChopper::~DCChopper() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ DCChopper::getPossibleProfilesForAttributes() const return map; } - - - - - const char DCChopper::debugName[] = "DCChopper"; const char* DCChopper::debugString() const { @@ -51,7 +46,7 @@ const char* DCChopper::debugString() const void DCChopper::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCChopper"), &DCChopper_factory)); + factory_map.emplace("cim:DCChopper", &DCChopper_factory); } void DCChopper::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/DCChopper.hpp b/CGMES_2.4.15_16FEB2016/DCChopper.hpp index 2c1ae6e0b..69669fe03 100644 --- a/CGMES_2.4.15_16FEB2016/DCChopper.hpp +++ b/CGMES_2.4.15_16FEB2016/DCChopper.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Low resistance equipment used in the internal DC circuit to balance voltages. It has typically positive and negative pole terminals and a ground. - */ + /** \brief Low resistance equipment used in the internal DC circuit to balance voltages. It has typically positive and negative pole terminals and a ground. */ class DCChopper : public DCConductingEquipment { public: @@ -26,7 +24,6 @@ namespace CIMPP DCChopper(); ~DCChopper() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/DCConductingEquipment.cpp b/CGMES_2.4.15_16FEB2016/DCConductingEquipment.cpp index 1442df0aa..dbf6d1e77 100644 --- a/CGMES_2.4.15_16FEB2016/DCConductingEquipment.cpp +++ b/CGMES_2.4.15_16FEB2016/DCConductingEquipment.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCConductingEquipment::DCConductingEquipment() {}; -DCConductingEquipment::~DCConductingEquipment() {}; +DCConductingEquipment::DCConductingEquipment() {} +DCConductingEquipment::~DCConductingEquipment() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ DCConductingEquipment::getPossibleProfilesForAttributes() const return map; } - - bool assign_DCTerminal_DCConductingEquipment(BaseClass*, BaseClass*); bool assign_DCConductingEquipment_DCTerminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_DCConductingEquipment_DCTerminals(BaseClass* BaseClass_ptr1, BaseCla } - const char DCConductingEquipment::debugName[] = "DCConductingEquipment"; const char* DCConductingEquipment::debugString() const { @@ -69,7 +66,7 @@ const char* DCConductingEquipment::debugString() const void DCConductingEquipment::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCConductingEquipment"), &DCConductingEquipment_factory)); + factory_map.emplace("cim:DCConductingEquipment", &DCConductingEquipment_factory); } void DCConductingEquipment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void DCConductingEquipment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCConductingEquipment.DCTerminals"), &assign_DCConductingEquipment_DCTerminals)); + assign_map.emplace("cim:DCConductingEquipment.DCTerminals", &assign_DCConductingEquipment_DCTerminals); } void DCConductingEquipment::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/DCConductingEquipment.hpp b/CGMES_2.4.15_16FEB2016/DCConductingEquipment.hpp index 1867a95eb..7ef261fec 100644 --- a/CGMES_2.4.15_16FEB2016/DCConductingEquipment.hpp +++ b/CGMES_2.4.15_16FEB2016/DCConductingEquipment.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class DCTerminal; - /* - The parts of the DC power system that are designed to carry current or that are conductively connected through DC terminals. - */ + /** \brief The parts of the DC power system that are designed to carry current or that are conductively connected through DC terminals. */ class DCConductingEquipment : public Equipment { public: @@ -27,7 +25,8 @@ namespace CIMPP DCConductingEquipment(); ~DCConductingEquipment() override; - std::list DCTerminals; /* Default: 0 */ + /** \brief Default: 0 */ + std::list DCTerminals; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/DCConverterOperatingModeKind.cpp b/CGMES_2.4.15_16FEB2016/DCConverterOperatingModeKind.cpp index 723e4594e..5119f9ba2 100644 --- a/CGMES_2.4.15_16FEB2016/DCConverterOperatingModeKind.cpp +++ b/CGMES_2.4.15_16FEB2016/DCConverterOperatingModeKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "DCConverterOperatingModeKind") + if (EnumSymbol.substr(0, pos) != "DCConverterOperatingModeKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "bipolar") + if (EnumSymbol == "bipolar") { rop = DCConverterOperatingModeKind::bipolar; return lop; } - if(EnumSymbol == "monopolarMetallicReturn") + if (EnumSymbol == "monopolarMetallicReturn") { rop = DCConverterOperatingModeKind::monopolarMetallicReturn; return lop; } - if(EnumSymbol == "monopolarGroundReturn") + if (EnumSymbol == "monopolarGroundReturn") { rop = DCConverterOperatingModeKind::monopolarGroundReturn; return lop; diff --git a/CGMES_2.4.15_16FEB2016/DCConverterOperatingModeKind.hpp b/CGMES_2.4.15_16FEB2016/DCConverterOperatingModeKind.hpp index eb7c9c456..6ed6a79c3 100644 --- a/CGMES_2.4.15_16FEB2016/DCConverterOperatingModeKind.hpp +++ b/CGMES_2.4.15_16FEB2016/DCConverterOperatingModeKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The operating mode of an HVDC bipole. - */ + /** \brief The operating mode of an HVDC bipole. */ class DCConverterOperatingModeKind { public: enum DCConverterOperatingModeKind_ENUM { - /** - * Bipolar operation. - */ + /** Bipolar operation. */ bipolar, - /** - * Monopolar operation with metallic return - */ + /** Monopolar operation with metallic return */ monopolarMetallicReturn, - /** - * Monopolar operation with ground return - */ + /** Monopolar operation with ground return */ monopolarGroundReturn, }; diff --git a/CGMES_2.4.15_16FEB2016/DCConverterUnit.cpp b/CGMES_2.4.15_16FEB2016/DCConverterUnit.cpp index f66280df5..2d1090ab2 100644 --- a/CGMES_2.4.15_16FEB2016/DCConverterUnit.cpp +++ b/CGMES_2.4.15_16FEB2016/DCConverterUnit.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "Substation.hpp" -#include "DCConverterOperatingModeKind.hpp" using namespace CIMPP; -DCConverterUnit::DCConverterUnit() : Substation(nullptr) {}; -DCConverterUnit::~DCConverterUnit() {}; +DCConverterUnit::DCConverterUnit() : Substation(nullptr) {} +DCConverterUnit::~DCConverterUnit() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ DCConverterUnit::getPossibleProfilesForAttributes() const return map; } - -bool assign_DCConverterUnit_operationMode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (DCConverterUnit* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->operationMode; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_Substation_DCConverterUnit(BaseClass*, BaseClass*); bool assign_DCConverterUnit_Substation(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,10 +58,24 @@ bool assign_DCConverterUnit_Substation(BaseClass* BaseClass_ptr1, BaseClass* Bas return false; } +bool assign_DCConverterUnit_operationMode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + DCConverterUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->operationMode; + if (!buffer.fail()) + { + return true; + } + } + return false; +} bool get_DCConverterUnit_Substation(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DCConverterUnit* element = dynamic_cast(BaseClass_ptr1)) + const DCConverterUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Substation != 0) { @@ -88,10 +86,10 @@ bool get_DCConverterUnit_Substation(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1)) + const DCConverterUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->operationMode; if (!buffer.str().empty()) @@ -111,17 +109,17 @@ const char* DCConverterUnit::debugString() const void DCConverterUnit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCConverterUnit"), &DCConverterUnit_factory)); + factory_map.emplace("cim:DCConverterUnit", &DCConverterUnit_factory); } void DCConverterUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCConverterUnit.operationMode"), &assign_DCConverterUnit_operationMode)); + assign_map.emplace("cim:DCConverterUnit.operationMode", &assign_DCConverterUnit_operationMode); } void DCConverterUnit::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCConverterUnit.Substation"), &assign_DCConverterUnit_Substation)); + assign_map.emplace("cim:DCConverterUnit.Substation", &assign_DCConverterUnit_Substation); } void DCConverterUnit::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/DCConverterUnit.hpp b/CGMES_2.4.15_16FEB2016/DCConverterUnit.hpp index 914e8ea3e..0ceada939 100644 --- a/CGMES_2.4.15_16FEB2016/DCConverterUnit.hpp +++ b/CGMES_2.4.15_16FEB2016/DCConverterUnit.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class Substation; - /* - Indivisible operative unit comprising all equipment between the point of common coupling on the AC side and the point of common coupling - DC side, essentially one or more converters, together with one or more converter transformers, converter control equipment, essential protective and switching devices and auxiliaries, if any, used for conversion. - */ + /** \brief Indivisible operative unit comprising all equipment between the point of common coupling on the AC side and the point of common coupling - DC side, essentially one or more converters, together with one or more converter transformers, converter control equipment, essential protective and switching devices and auxiliaries, if any, used for conversion. */ class DCConverterUnit : public DCEquipmentContainer { public: @@ -28,8 +26,11 @@ namespace CIMPP DCConverterUnit(); ~DCConverterUnit() override; - CIMPP::Substation* Substation; /* Default: 0 */ - CIMPP::DCConverterOperatingModeKind operationMode; /* Default: 0 */ + /** \brief Default: 0 */ + CIMPP::Substation* Substation; + + /** \brief Default: 0 */ + CIMPP::DCConverterOperatingModeKind operationMode; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/DCDisconnector.cpp b/CGMES_2.4.15_16FEB2016/DCDisconnector.cpp index 861bbeb7c..fe93c5903 100644 --- a/CGMES_2.4.15_16FEB2016/DCDisconnector.cpp +++ b/CGMES_2.4.15_16FEB2016/DCDisconnector.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCDisconnector::DCDisconnector() {}; -DCDisconnector::~DCDisconnector() {}; +DCDisconnector::DCDisconnector() {} +DCDisconnector::~DCDisconnector() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ DCDisconnector::getPossibleProfilesForAttributes() const return map; } - - - - - const char DCDisconnector::debugName[] = "DCDisconnector"; const char* DCDisconnector::debugString() const { @@ -51,7 +46,7 @@ const char* DCDisconnector::debugString() const void DCDisconnector::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCDisconnector"), &DCDisconnector_factory)); + factory_map.emplace("cim:DCDisconnector", &DCDisconnector_factory); } void DCDisconnector::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/DCDisconnector.hpp b/CGMES_2.4.15_16FEB2016/DCDisconnector.hpp index 3cc09932a..9000b268e 100644 --- a/CGMES_2.4.15_16FEB2016/DCDisconnector.hpp +++ b/CGMES_2.4.15_16FEB2016/DCDisconnector.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A disconnector within a DC system. - */ + /** \brief A disconnector within a DC system. */ class DCDisconnector : public DCSwitch { public: @@ -26,7 +24,6 @@ namespace CIMPP DCDisconnector(); ~DCDisconnector() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/DCEquipmentContainer.cpp b/CGMES_2.4.15_16FEB2016/DCEquipmentContainer.cpp index 46467353c..63f808f42 100644 --- a/CGMES_2.4.15_16FEB2016/DCEquipmentContainer.cpp +++ b/CGMES_2.4.15_16FEB2016/DCEquipmentContainer.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCEquipmentContainer::DCEquipmentContainer() {}; -DCEquipmentContainer::~DCEquipmentContainer() {}; +DCEquipmentContainer::DCEquipmentContainer() {} +DCEquipmentContainer::~DCEquipmentContainer() {} static const std::list PossibleProfilesForClass = { @@ -43,8 +43,6 @@ DCEquipmentContainer::getPossibleProfilesForAttributes() const return map; } - - bool assign_DCNode_DCEquipmentContainer(BaseClass*, BaseClass*); bool assign_DCEquipmentContainer_DCNodes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,6 +59,7 @@ bool assign_DCEquipmentContainer_DCNodes(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_DCTopologicalNode_DCEquipmentContainer(BaseClass*, BaseClass*); bool assign_DCEquipmentContainer_DCTopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -88,7 +87,7 @@ const char* DCEquipmentContainer::debugString() const void DCEquipmentContainer::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCEquipmentContainer"), &DCEquipmentContainer_factory)); + factory_map.emplace("cim:DCEquipmentContainer", &DCEquipmentContainer_factory); } void DCEquipmentContainer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -97,8 +96,8 @@ void DCEquipmentContainer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCEquipmentContainer.DCNodes"), &assign_DCEquipmentContainer_DCNodes)); - assign_map.insert(std::make_pair(std::string("cim:DCEquipmentContainer.DCTopologicalNode"), &assign_DCEquipmentContainer_DCTopologicalNode)); + assign_map.emplace("cim:DCEquipmentContainer.DCNodes", &assign_DCEquipmentContainer_DCNodes); + assign_map.emplace("cim:DCEquipmentContainer.DCTopologicalNode", &assign_DCEquipmentContainer_DCTopologicalNode); } void DCEquipmentContainer::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/DCEquipmentContainer.hpp b/CGMES_2.4.15_16FEB2016/DCEquipmentContainer.hpp index a38f051bf..6defc5761 100644 --- a/CGMES_2.4.15_16FEB2016/DCEquipmentContainer.hpp +++ b/CGMES_2.4.15_16FEB2016/DCEquipmentContainer.hpp @@ -18,9 +18,7 @@ namespace CIMPP class DCNode; class DCTopologicalNode; - /* - A modeling construct to provide a root class for containment of DC as well as AC equipment. The class differ from the EquipmentContaner for AC in that it may also contain DCNodes. Hence it can contain both AC and DC equipment. - */ + /** \brief A modeling construct to provide a root class for containment of DC as well as AC equipment. The class differ from the EquipmentContaner for AC in that it may also contain DCNodes. Hence it can contain both AC and DC equipment. */ class DCEquipmentContainer : public EquipmentContainer { public: @@ -28,8 +26,11 @@ namespace CIMPP DCEquipmentContainer(); ~DCEquipmentContainer() override; - std::list DCNodes; /* Default: 0 */ - std::list DCTopologicalNode; /* Default: 0 */ + /** \brief Default: 0 */ + std::list DCNodes; + + /** \brief Default: 0 */ + std::list DCTopologicalNode; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/DCGround.cpp b/CGMES_2.4.15_16FEB2016/DCGround.cpp index 22f7382fa..07d7f35f7 100644 --- a/CGMES_2.4.15_16FEB2016/DCGround.cpp +++ b/CGMES_2.4.15_16FEB2016/DCGround.cpp @@ -8,13 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Inductance.hpp" -#include "Resistance.hpp" using namespace CIMPP; -DCGround::DCGround() {}; -DCGround::~DCGround() {}; +DCGround::DCGround() {} +DCGround::~DCGround() {} static const std::list PossibleProfilesForClass = { @@ -42,38 +40,38 @@ DCGround::getPossibleProfilesForAttributes() const return map; } - -bool assign_DCGround_inductance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCGround_inductance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCGround* element = dynamic_cast(BaseClass_ptr1)) + DCGround* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inductance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DCGround_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCGround_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCGround* element = dynamic_cast(BaseClass_ptr1)) + DCGround* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_DCGround_inductance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCGround* element = dynamic_cast(BaseClass_ptr1)) + const DCGround* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inductance; if (!buffer.str().empty()) @@ -87,7 +85,8 @@ bool get_DCGround_inductance(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_DCGround_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCGround* element = dynamic_cast(BaseClass_ptr1)) + const DCGround* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -99,8 +98,6 @@ bool get_DCGround_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char DCGround::debugName[] = "DCGround"; const char* DCGround::debugString() const { @@ -109,13 +106,13 @@ const char* DCGround::debugString() const void DCGround::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCGround"), &DCGround_factory)); + factory_map.emplace("cim:DCGround", &DCGround_factory); } void DCGround::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCGround.inductance"), &assign_DCGround_inductance)); - assign_map.insert(std::make_pair(std::string("cim:DCGround.r"), &assign_DCGround_r)); + assign_map.emplace("cim:DCGround.inductance", &assign_DCGround_inductance); + assign_map.emplace("cim:DCGround.r", &assign_DCGround_r); } void DCGround::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/DCGround.hpp b/CGMES_2.4.15_16FEB2016/DCGround.hpp index 182760c0b..5321d8f49 100644 --- a/CGMES_2.4.15_16FEB2016/DCGround.hpp +++ b/CGMES_2.4.15_16FEB2016/DCGround.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A ground within a DC system. - */ + /** \brief A ground within a DC system. */ class DCGround : public DCConductingEquipment { public: @@ -28,8 +26,11 @@ namespace CIMPP DCGround(); ~DCGround() override; - CIMPP::Inductance inductance; /* Inductance to ground. Default: nullptr */ - CIMPP::Resistance r; /* Resistance to ground. Default: nullptr */ + /** \brief Inductance to ground. Default: nullptr */ + CIMPP::Inductance inductance; + + /** \brief Resistance to ground. Default: nullptr */ + CIMPP::Resistance r; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/DCLine.cpp b/CGMES_2.4.15_16FEB2016/DCLine.cpp index cb4fb87ef..15f9c9331 100644 --- a/CGMES_2.4.15_16FEB2016/DCLine.cpp +++ b/CGMES_2.4.15_16FEB2016/DCLine.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCLine::DCLine() : Region(nullptr) {}; -DCLine::~DCLine() {}; +DCLine::DCLine() : Region(nullptr) {} +DCLine::~DCLine() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ DCLine::getPossibleProfilesForAttributes() const return map; } - - bool assign_SubGeographicalRegion_DCLines(BaseClass*, BaseClass*); bool assign_DCLine_Region(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_DCLine_Region(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) return false; } - bool get_DCLine_Region(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DCLine* element = dynamic_cast(BaseClass_ptr1)) + const DCLine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Region != 0) { @@ -73,7 +71,6 @@ bool get_DCLine_Region(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCLine"), &DCLine_factory)); + factory_map.emplace("cim:DCLine", &DCLine_factory); } void DCLine::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void DCLine::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCLine.Region"), &assign_DCLine_Region)); + assign_map.emplace("cim:DCLine.Region", &assign_DCLine_Region); } void DCLine::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/DCLine.hpp b/CGMES_2.4.15_16FEB2016/DCLine.hpp index f6b31465b..91657a003 100644 --- a/CGMES_2.4.15_16FEB2016/DCLine.hpp +++ b/CGMES_2.4.15_16FEB2016/DCLine.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class SubGeographicalRegion; - /* - Overhead lines and/or cables connecting two or more HVDC substations. - */ + /** \brief Overhead lines and/or cables connecting two or more HVDC substations. */ class DCLine : public DCEquipmentContainer { public: @@ -27,7 +25,8 @@ namespace CIMPP DCLine(); ~DCLine() override; - CIMPP::SubGeographicalRegion* Region; /* Default: 0 */ + /** \brief Default: 0 */ + CIMPP::SubGeographicalRegion* Region; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/DCLineSegment.cpp b/CGMES_2.4.15_16FEB2016/DCLineSegment.cpp index ec65717a6..3b5b3a411 100644 --- a/CGMES_2.4.15_16FEB2016/DCLineSegment.cpp +++ b/CGMES_2.4.15_16FEB2016/DCLineSegment.cpp @@ -9,15 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "PerLengthDCLineParameter.hpp" -#include "Capacitance.hpp" -#include "Inductance.hpp" -#include "Length.hpp" -#include "Resistance.hpp" using namespace CIMPP; -DCLineSegment::DCLineSegment() : PerLengthParameter(nullptr) {}; -DCLineSegment::~DCLineSegment() {}; +DCLineSegment::DCLineSegment() : PerLengthParameter(nullptr) {} +DCLineSegment::~DCLineSegment() {} static const std::list PossibleProfilesForClass = { @@ -48,80 +44,97 @@ DCLineSegment::getPossibleProfilesForAttributes() const return map; } +bool assign_PerLengthDCLineParameter_DCLineSegments(BaseClass*, BaseClass*); +bool assign_DCLineSegment_PerLengthParameter(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + PerLengthDCLineParameter* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PerLengthParameter != element2) + { + element->PerLengthParameter = element2; + return assign_PerLengthDCLineParameter_DCLineSegments(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_DCLineSegment_capacitance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCLineSegment_capacitance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->capacitance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DCLineSegment_inductance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCLineSegment_inductance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inductance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DCLineSegment_length(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCLineSegment_length(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->length; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DCLineSegment_resistance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCLineSegment_resistance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->resistance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_PerLengthDCLineParameter_DCLineSegments(BaseClass*, BaseClass*); -bool assign_DCLineSegment_PerLengthParameter(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_DCLineSegment_PerLengthParameter(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - DCLineSegment* element = dynamic_cast(BaseClass_ptr1); - PerLengthDCLineParameter* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->PerLengthParameter != element2) + if (element->PerLengthParameter != 0) { - element->PerLengthParameter = element2; - return assign_PerLengthDCLineParameter_DCLineSegments(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->PerLengthParameter); + return true; } - return true; } return false; } bool get_DCLineSegment_capacitance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->capacitance; if (!buffer.str().empty()) @@ -135,7 +148,8 @@ bool get_DCLineSegment_capacitance(const BaseClass* BaseClass_ptr1, std::strings bool get_DCLineSegment_inductance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inductance; if (!buffer.str().empty()) @@ -149,7 +163,8 @@ bool get_DCLineSegment_inductance(const BaseClass* BaseClass_ptr1, std::stringst bool get_DCLineSegment_length(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->length; if (!buffer.str().empty()) @@ -163,7 +178,8 @@ bool get_DCLineSegment_length(const BaseClass* BaseClass_ptr1, std::stringstream bool get_DCLineSegment_resistance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->resistance; if (!buffer.str().empty()) @@ -175,21 +191,6 @@ bool get_DCLineSegment_resistance(const BaseClass* BaseClass_ptr1, std::stringst return false; } - -bool get_DCLineSegment_PerLengthParameter(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->PerLengthParameter != 0) - { - BaseClass_list.push_back(element->PerLengthParameter); - return true; - } - } - return false; -} - - const char DCLineSegment::debugName[] = "DCLineSegment"; const char* DCLineSegment::debugString() const { @@ -198,20 +199,20 @@ const char* DCLineSegment::debugString() const void DCLineSegment::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCLineSegment"), &DCLineSegment_factory)); + factory_map.emplace("cim:DCLineSegment", &DCLineSegment_factory); } void DCLineSegment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCLineSegment.capacitance"), &assign_DCLineSegment_capacitance)); - assign_map.insert(std::make_pair(std::string("cim:DCLineSegment.inductance"), &assign_DCLineSegment_inductance)); - assign_map.insert(std::make_pair(std::string("cim:DCLineSegment.length"), &assign_DCLineSegment_length)); - assign_map.insert(std::make_pair(std::string("cim:DCLineSegment.resistance"), &assign_DCLineSegment_resistance)); + assign_map.emplace("cim:DCLineSegment.capacitance", &assign_DCLineSegment_capacitance); + assign_map.emplace("cim:DCLineSegment.inductance", &assign_DCLineSegment_inductance); + assign_map.emplace("cim:DCLineSegment.length", &assign_DCLineSegment_length); + assign_map.emplace("cim:DCLineSegment.resistance", &assign_DCLineSegment_resistance); } void DCLineSegment::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCLineSegment.PerLengthParameter"), &assign_DCLineSegment_PerLengthParameter)); + assign_map.emplace("cim:DCLineSegment.PerLengthParameter", &assign_DCLineSegment_PerLengthParameter); } void DCLineSegment::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/DCLineSegment.hpp b/CGMES_2.4.15_16FEB2016/DCLineSegment.hpp index 44cf90e5a..58c280fe1 100644 --- a/CGMES_2.4.15_16FEB2016/DCLineSegment.hpp +++ b/CGMES_2.4.15_16FEB2016/DCLineSegment.hpp @@ -21,9 +21,7 @@ namespace CIMPP { class PerLengthDCLineParameter; - /* - A wire or combination of wires not insulated from one another, with consistent electrical characteristics, used to carry direct current between points in the DC region of the power system. - */ + /** \brief A wire or combination of wires not insulated from one another, with consistent electrical characteristics, used to carry direct current between points in the DC region of the power system. */ class DCLineSegment : public DCConductingEquipment { public: @@ -31,11 +29,20 @@ namespace CIMPP DCLineSegment(); ~DCLineSegment() override; - CIMPP::PerLengthDCLineParameter* PerLengthParameter; /* Set of per-length parameters for this line segment. Default: 0 */ - CIMPP::Capacitance capacitance; /* Capacitance of the DC line segment. Significant for cables only. Default: nullptr */ - CIMPP::Inductance inductance; /* Inductance of the DC line segment. Neglectable compared with DCSeriesDevice used for smoothing. Default: nullptr */ - CIMPP::Length length; /* Segment length for calculating line section capabilities. Default: nullptr */ - CIMPP::Resistance resistance; /* Resistance of the DC line segment. Default: nullptr */ + /** \brief Set of per-length parameters for this line segment. Default: 0 */ + CIMPP::PerLengthDCLineParameter* PerLengthParameter; + + /** \brief Capacitance of the DC line segment. Significant for cables only. Default: nullptr */ + CIMPP::Capacitance capacitance; + + /** \brief Inductance of the DC line segment. Neglectable compared with DCSeriesDevice used for smoothing. Default: nullptr */ + CIMPP::Inductance inductance; + + /** \brief Segment length for calculating line section capabilities. Default: nullptr */ + CIMPP::Length length; + + /** \brief Resistance of the DC line segment. Default: nullptr */ + CIMPP::Resistance resistance; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/DCNode.cpp b/CGMES_2.4.15_16FEB2016/DCNode.cpp index 38bacaf43..8fd69d983 100644 --- a/CGMES_2.4.15_16FEB2016/DCNode.cpp +++ b/CGMES_2.4.15_16FEB2016/DCNode.cpp @@ -8,14 +8,14 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "DCEquipmentContainer.hpp" #include "DCBaseTerminal.hpp" +#include "DCEquipmentContainer.hpp" #include "DCTopologicalNode.hpp" using namespace CIMPP; -DCNode::DCNode() : DCEquipmentContainer(nullptr), DCTopologicalNode(nullptr) {}; -DCNode::~DCNode() {}; +DCNode::DCNode() : DCEquipmentContainer(nullptr), DCTopologicalNode(nullptr) {} +DCNode::~DCNode() {} static const std::list PossibleProfilesForClass = { @@ -45,8 +45,6 @@ DCNode::getPossibleProfilesForAttributes() const return map; } - - bool assign_DCEquipmentContainer_DCNodes(BaseClass*, BaseClass*); bool assign_DCNode_DCEquipmentContainer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -63,6 +61,7 @@ bool assign_DCNode_DCEquipmentContainer(BaseClass* BaseClass_ptr1, BaseClass* Ba } return false; } + bool assign_DCBaseTerminal_DCNode(BaseClass*, BaseClass*); bool assign_DCNode_DCTerminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -79,6 +78,7 @@ bool assign_DCNode_DCTerminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_p } return false; } + bool assign_DCTopologicalNode_DCNodes(BaseClass*, BaseClass*); bool assign_DCNode_DCTopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -96,10 +96,10 @@ bool assign_DCNode_DCTopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseC return false; } - bool get_DCNode_DCEquipmentContainer(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DCNode* element = dynamic_cast(BaseClass_ptr1)) + const DCNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DCEquipmentContainer != 0) { @@ -110,9 +110,11 @@ bool get_DCNode_DCEquipmentContainer(const BaseClass* BaseClass_ptr1, std::list< return false; } + bool get_DCNode_DCTopologicalNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DCNode* element = dynamic_cast(BaseClass_ptr1)) + const DCNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DCTopologicalNode != 0) { @@ -123,7 +125,6 @@ bool get_DCNode_DCTopologicalNode(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCNode"), &DCNode_factory)); + factory_map.emplace("cim:DCNode", &DCNode_factory); } void DCNode::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -141,9 +142,9 @@ void DCNode::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCNode.DCEquipmentContainer"), &assign_DCNode_DCEquipmentContainer)); - assign_map.insert(std::make_pair(std::string("cim:DCNode.DCTerminals"), &assign_DCNode_DCTerminals)); - assign_map.insert(std::make_pair(std::string("cim:DCNode.DCTopologicalNode"), &assign_DCNode_DCTopologicalNode)); + assign_map.emplace("cim:DCNode.DCEquipmentContainer", &assign_DCNode_DCEquipmentContainer); + assign_map.emplace("cim:DCNode.DCTerminals", &assign_DCNode_DCTerminals); + assign_map.emplace("cim:DCNode.DCTopologicalNode", &assign_DCNode_DCTopologicalNode); } void DCNode::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/DCNode.hpp b/CGMES_2.4.15_16FEB2016/DCNode.hpp index 85161f647..9fdbe0a20 100644 --- a/CGMES_2.4.15_16FEB2016/DCNode.hpp +++ b/CGMES_2.4.15_16FEB2016/DCNode.hpp @@ -19,9 +19,7 @@ namespace CIMPP class DCEquipmentContainer; class DCTopologicalNode; - /* - DC nodes are points where terminals of DC conducting equipment are connected together with zero impedance. - */ + /** \brief DC nodes are points where terminals of DC conducting equipment are connected together with zero impedance. */ class DCNode : public IdentifiedObject { public: @@ -29,9 +27,14 @@ namespace CIMPP DCNode(); ~DCNode() override; - CIMPP::DCEquipmentContainer* DCEquipmentContainer; /* Default: 0 */ - std::list DCTerminals; /* Default: 0 */ - CIMPP::DCTopologicalNode* DCTopologicalNode; /* See association end TopologicalNode.ConnectivityNodes. Default: 0 */ + /** \brief Default: 0 */ + CIMPP::DCEquipmentContainer* DCEquipmentContainer; + + /** \brief Default: 0 */ + std::list DCTerminals; + + /** \brief See association end TopologicalNode.ConnectivityNodes. Default: 0 */ + CIMPP::DCTopologicalNode* DCTopologicalNode; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/DCPolarityKind.cpp b/CGMES_2.4.15_16FEB2016/DCPolarityKind.cpp index a1a646248..5c159224e 100644 --- a/CGMES_2.4.15_16FEB2016/DCPolarityKind.cpp +++ b/CGMES_2.4.15_16FEB2016/DCPolarityKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "DCPolarityKind") + if (EnumSymbol.substr(0, pos) != "DCPolarityKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "positive") + if (EnumSymbol == "positive") { rop = DCPolarityKind::positive; return lop; } - if(EnumSymbol == "middle") + if (EnumSymbol == "middle") { rop = DCPolarityKind::middle; return lop; } - if(EnumSymbol == "negative") + if (EnumSymbol == "negative") { rop = DCPolarityKind::negative; return lop; diff --git a/CGMES_2.4.15_16FEB2016/DCPolarityKind.hpp b/CGMES_2.4.15_16FEB2016/DCPolarityKind.hpp index 8b3bd24e9..266ac5884 100644 --- a/CGMES_2.4.15_16FEB2016/DCPolarityKind.hpp +++ b/CGMES_2.4.15_16FEB2016/DCPolarityKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Polarity for DC circuits. - */ + /** \brief Polarity for DC circuits. */ class DCPolarityKind { public: enum DCPolarityKind_ENUM { - /** - * Positive pole. - */ + /** Positive pole. */ positive, - /** - * Middle pole, potentially grounded. - */ + /** Middle pole, potentially grounded. */ middle, - /** - * Negative pole. - */ + /** Negative pole. */ negative, }; diff --git a/CGMES_2.4.15_16FEB2016/DCSeriesDevice.cpp b/CGMES_2.4.15_16FEB2016/DCSeriesDevice.cpp index 043263bbf..4f042583c 100644 --- a/CGMES_2.4.15_16FEB2016/DCSeriesDevice.cpp +++ b/CGMES_2.4.15_16FEB2016/DCSeriesDevice.cpp @@ -8,14 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Inductance.hpp" -#include "Voltage.hpp" -#include "Resistance.hpp" using namespace CIMPP; -DCSeriesDevice::DCSeriesDevice() {}; -DCSeriesDevice::~DCSeriesDevice() {}; +DCSeriesDevice::DCSeriesDevice() {} +DCSeriesDevice::~DCSeriesDevice() {} static const std::list PossibleProfilesForClass = { @@ -44,51 +41,52 @@ DCSeriesDevice::getPossibleProfilesForAttributes() const return map; } - -bool assign_DCSeriesDevice_inductance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCSeriesDevice_inductance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1)) + DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inductance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DCSeriesDevice_ratedUdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCSeriesDevice_ratedUdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1)) + DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedUdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DCSeriesDevice_resistance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCSeriesDevice_resistance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1)) + DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->resistance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_DCSeriesDevice_inductance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1)) + const DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inductance; if (!buffer.str().empty()) @@ -102,7 +100,8 @@ bool get_DCSeriesDevice_inductance(const BaseClass* BaseClass_ptr1, std::strings bool get_DCSeriesDevice_ratedUdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1)) + const DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedUdc; if (!buffer.str().empty()) @@ -116,7 +115,8 @@ bool get_DCSeriesDevice_ratedUdc(const BaseClass* BaseClass_ptr1, std::stringstr bool get_DCSeriesDevice_resistance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1)) + const DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->resistance; if (!buffer.str().empty()) @@ -128,8 +128,6 @@ bool get_DCSeriesDevice_resistance(const BaseClass* BaseClass_ptr1, std::strings return false; } - - const char DCSeriesDevice::debugName[] = "DCSeriesDevice"; const char* DCSeriesDevice::debugString() const { @@ -138,14 +136,14 @@ const char* DCSeriesDevice::debugString() const void DCSeriesDevice::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCSeriesDevice"), &DCSeriesDevice_factory)); + factory_map.emplace("cim:DCSeriesDevice", &DCSeriesDevice_factory); } void DCSeriesDevice::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCSeriesDevice.inductance"), &assign_DCSeriesDevice_inductance)); - assign_map.insert(std::make_pair(std::string("cim:DCSeriesDevice.ratedUdc"), &assign_DCSeriesDevice_ratedUdc)); - assign_map.insert(std::make_pair(std::string("cim:DCSeriesDevice.resistance"), &assign_DCSeriesDevice_resistance)); + assign_map.emplace("cim:DCSeriesDevice.inductance", &assign_DCSeriesDevice_inductance); + assign_map.emplace("cim:DCSeriesDevice.ratedUdc", &assign_DCSeriesDevice_ratedUdc); + assign_map.emplace("cim:DCSeriesDevice.resistance", &assign_DCSeriesDevice_resistance); } void DCSeriesDevice::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/DCSeriesDevice.hpp b/CGMES_2.4.15_16FEB2016/DCSeriesDevice.hpp index 501b3201b..73436d451 100644 --- a/CGMES_2.4.15_16FEB2016/DCSeriesDevice.hpp +++ b/CGMES_2.4.15_16FEB2016/DCSeriesDevice.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A series device within the DC system, typically a reactor used for filtering or smoothing. Needed for transient and short circuit studies. - */ + /** \brief A series device within the DC system, typically a reactor used for filtering or smoothing. Needed for transient and short circuit studies. */ class DCSeriesDevice : public DCConductingEquipment { public: @@ -29,9 +27,14 @@ namespace CIMPP DCSeriesDevice(); ~DCSeriesDevice() override; - CIMPP::Inductance inductance; /* Inductance of the device. Default: nullptr */ - CIMPP::Voltage ratedUdc; /* Rated DC device voltage. Converter configuration data used in power flow. Default: nullptr */ - CIMPP::Resistance resistance; /* Resistance of the DC device. Default: nullptr */ + /** \brief Inductance of the device. Default: nullptr */ + CIMPP::Inductance inductance; + + /** \brief Rated DC device voltage. Converter configuration data used in power flow. Default: nullptr */ + CIMPP::Voltage ratedUdc; + + /** \brief Resistance of the DC device. Default: nullptr */ + CIMPP::Resistance resistance; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/DCShunt.cpp b/CGMES_2.4.15_16FEB2016/DCShunt.cpp index a28b3b57f..35992c09b 100644 --- a/CGMES_2.4.15_16FEB2016/DCShunt.cpp +++ b/CGMES_2.4.15_16FEB2016/DCShunt.cpp @@ -8,14 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Capacitance.hpp" -#include "Voltage.hpp" -#include "Resistance.hpp" using namespace CIMPP; -DCShunt::DCShunt() {}; -DCShunt::~DCShunt() {}; +DCShunt::DCShunt() {} +DCShunt::~DCShunt() {} static const std::list PossibleProfilesForClass = { @@ -44,51 +41,52 @@ DCShunt::getPossibleProfilesForAttributes() const return map; } - -bool assign_DCShunt_capacitance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCShunt_capacitance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCShunt* element = dynamic_cast(BaseClass_ptr1)) + DCShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->capacitance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DCShunt_ratedUdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCShunt_ratedUdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCShunt* element = dynamic_cast(BaseClass_ptr1)) + DCShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedUdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DCShunt_resistance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCShunt_resistance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCShunt* element = dynamic_cast(BaseClass_ptr1)) + DCShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->resistance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_DCShunt_capacitance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCShunt* element = dynamic_cast(BaseClass_ptr1)) + const DCShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->capacitance; if (!buffer.str().empty()) @@ -102,7 +100,8 @@ bool get_DCShunt_capacitance(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_DCShunt_ratedUdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCShunt* element = dynamic_cast(BaseClass_ptr1)) + const DCShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedUdc; if (!buffer.str().empty()) @@ -116,7 +115,8 @@ bool get_DCShunt_ratedUdc(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_DCShunt_resistance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCShunt* element = dynamic_cast(BaseClass_ptr1)) + const DCShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->resistance; if (!buffer.str().empty()) @@ -128,8 +128,6 @@ bool get_DCShunt_resistance(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char DCShunt::debugName[] = "DCShunt"; const char* DCShunt::debugString() const { @@ -138,14 +136,14 @@ const char* DCShunt::debugString() const void DCShunt::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCShunt"), &DCShunt_factory)); + factory_map.emplace("cim:DCShunt", &DCShunt_factory); } void DCShunt::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCShunt.capacitance"), &assign_DCShunt_capacitance)); - assign_map.insert(std::make_pair(std::string("cim:DCShunt.ratedUdc"), &assign_DCShunt_ratedUdc)); - assign_map.insert(std::make_pair(std::string("cim:DCShunt.resistance"), &assign_DCShunt_resistance)); + assign_map.emplace("cim:DCShunt.capacitance", &assign_DCShunt_capacitance); + assign_map.emplace("cim:DCShunt.ratedUdc", &assign_DCShunt_ratedUdc); + assign_map.emplace("cim:DCShunt.resistance", &assign_DCShunt_resistance); } void DCShunt::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/DCShunt.hpp b/CGMES_2.4.15_16FEB2016/DCShunt.hpp index 96b4dc373..401c9d74e 100644 --- a/CGMES_2.4.15_16FEB2016/DCShunt.hpp +++ b/CGMES_2.4.15_16FEB2016/DCShunt.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A shunt device within the DC system, typically used for filtering. Needed for transient and short circuit studies. - */ + /** \brief A shunt device within the DC system, typically used for filtering. Needed for transient and short circuit studies. */ class DCShunt : public DCConductingEquipment { public: @@ -29,9 +27,14 @@ namespace CIMPP DCShunt(); ~DCShunt() override; - CIMPP::Capacitance capacitance; /* Capacitance of the DC shunt. Default: nullptr */ - CIMPP::Voltage ratedUdc; /* Rated DC device voltage. Converter configuration data used in power flow. Default: nullptr */ - CIMPP::Resistance resistance; /* Resistance of the DC device. Default: nullptr */ + /** \brief Capacitance of the DC shunt. Default: nullptr */ + CIMPP::Capacitance capacitance; + + /** \brief Rated DC device voltage. Converter configuration data used in power flow. Default: nullptr */ + CIMPP::Voltage ratedUdc; + + /** \brief Resistance of the DC device. Default: nullptr */ + CIMPP::Resistance resistance; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/DCSwitch.cpp b/CGMES_2.4.15_16FEB2016/DCSwitch.cpp index b5fbfc7a0..2183c59a5 100644 --- a/CGMES_2.4.15_16FEB2016/DCSwitch.cpp +++ b/CGMES_2.4.15_16FEB2016/DCSwitch.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCSwitch::DCSwitch() {}; -DCSwitch::~DCSwitch() {}; +DCSwitch::DCSwitch() {} +DCSwitch::~DCSwitch() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ DCSwitch::getPossibleProfilesForAttributes() const return map; } - - - - - const char DCSwitch::debugName[] = "DCSwitch"; const char* DCSwitch::debugString() const { @@ -51,7 +46,7 @@ const char* DCSwitch::debugString() const void DCSwitch::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCSwitch"), &DCSwitch_factory)); + factory_map.emplace("cim:DCSwitch", &DCSwitch_factory); } void DCSwitch::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/DCSwitch.hpp b/CGMES_2.4.15_16FEB2016/DCSwitch.hpp index c24dfb18c..2512b3a78 100644 --- a/CGMES_2.4.15_16FEB2016/DCSwitch.hpp +++ b/CGMES_2.4.15_16FEB2016/DCSwitch.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A switch within the DC system. - */ + /** \brief A switch within the DC system. */ class DCSwitch : public DCConductingEquipment { public: @@ -26,7 +24,6 @@ namespace CIMPP DCSwitch(); ~DCSwitch() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/DCTerminal.cpp b/CGMES_2.4.15_16FEB2016/DCTerminal.cpp index f71b265b9..b33606f5f 100644 --- a/CGMES_2.4.15_16FEB2016/DCTerminal.cpp +++ b/CGMES_2.4.15_16FEB2016/DCTerminal.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCTerminal::DCTerminal() : DCConductingEquipment(nullptr) {}; -DCTerminal::~DCTerminal() {}; +DCTerminal::DCTerminal() : DCConductingEquipment(nullptr) {} +DCTerminal::~DCTerminal() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ DCTerminal::getPossibleProfilesForAttributes() const return map; } - - bool assign_DCConductingEquipment_DCTerminals(BaseClass*, BaseClass*); bool assign_DCTerminal_DCConductingEquipment(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,10 +59,10 @@ bool assign_DCTerminal_DCConductingEquipment(BaseClass* BaseClass_ptr1, BaseClas return false; } - bool get_DCTerminal_DCConductingEquipment(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DCTerminal* element = dynamic_cast(BaseClass_ptr1)) + const DCTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DCConductingEquipment != 0) { @@ -75,7 +73,6 @@ bool get_DCTerminal_DCConductingEquipment(const BaseClass* BaseClass_ptr1, std:: return false; } - const char DCTerminal::debugName[] = "DCTerminal"; const char* DCTerminal::debugString() const { @@ -84,7 +81,7 @@ const char* DCTerminal::debugString() const void DCTerminal::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCTerminal"), &DCTerminal_factory)); + factory_map.emplace("cim:DCTerminal", &DCTerminal_factory); } void DCTerminal::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -93,7 +90,7 @@ void DCTerminal::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCTerminal.DCConductingEquipment"), &assign_DCTerminal_DCConductingEquipment)); + assign_map.emplace("cim:DCTerminal.DCConductingEquipment", &assign_DCTerminal_DCConductingEquipment); } void DCTerminal::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/DCTerminal.hpp b/CGMES_2.4.15_16FEB2016/DCTerminal.hpp index 64cd3ac9e..46a315342 100644 --- a/CGMES_2.4.15_16FEB2016/DCTerminal.hpp +++ b/CGMES_2.4.15_16FEB2016/DCTerminal.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class DCConductingEquipment; - /* - An electrical connection point to generic DC conducting equipment. - */ + /** \brief An electrical connection point to generic DC conducting equipment. */ class DCTerminal : public DCBaseTerminal { public: @@ -27,7 +25,8 @@ namespace CIMPP DCTerminal(); ~DCTerminal() override; - CIMPP::DCConductingEquipment* DCConductingEquipment; /* Default: 0 */ + /** \brief Default: 0 */ + CIMPP::DCConductingEquipment* DCConductingEquipment; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/DCTopologicalIsland.cpp b/CGMES_2.4.15_16FEB2016/DCTopologicalIsland.cpp index c75bdc26e..1e7a83ea2 100644 --- a/CGMES_2.4.15_16FEB2016/DCTopologicalIsland.cpp +++ b/CGMES_2.4.15_16FEB2016/DCTopologicalIsland.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCTopologicalIsland::DCTopologicalIsland() {}; -DCTopologicalIsland::~DCTopologicalIsland() {}; +DCTopologicalIsland::DCTopologicalIsland() {} +DCTopologicalIsland::~DCTopologicalIsland() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ DCTopologicalIsland::getPossibleProfilesForAttributes() const return map; } - - bool assign_DCTopologicalNode_DCTopologicalIsland(BaseClass*, BaseClass*); bool assign_DCTopologicalIsland_DCTopologicalNodes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_DCTopologicalIsland_DCTopologicalNodes(BaseClass* BaseClass_ptr1, Ba return false; } - bool get_DCTopologicalIsland_DCTopologicalNodes(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DCTopologicalIsland* element = dynamic_cast(BaseClass_ptr1)) + const DCTopologicalIsland* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { std::copy(element->DCTopologicalNodes.begin(), element->DCTopologicalNodes.end(), std::back_inserter(BaseClass_list)); return !BaseClass_list.empty(); @@ -70,7 +68,6 @@ bool get_DCTopologicalIsland_DCTopologicalNodes(const BaseClass* BaseClass_ptr1, return false; } - const char DCTopologicalIsland::debugName[] = "DCTopologicalIsland"; const char* DCTopologicalIsland::debugString() const { @@ -79,7 +76,7 @@ const char* DCTopologicalIsland::debugString() const void DCTopologicalIsland::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCTopologicalIsland"), &DCTopologicalIsland_factory)); + factory_map.emplace("cim:DCTopologicalIsland", &DCTopologicalIsland_factory); } void DCTopologicalIsland::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -88,7 +85,7 @@ void DCTopologicalIsland::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCTopologicalIsland.DCTopologicalNodes"), &assign_DCTopologicalIsland_DCTopologicalNodes)); + assign_map.emplace("cim:DCTopologicalIsland.DCTopologicalNodes", &assign_DCTopologicalIsland_DCTopologicalNodes); } void DCTopologicalIsland::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/DCTopologicalIsland.hpp b/CGMES_2.4.15_16FEB2016/DCTopologicalIsland.hpp index 2989980c0..35384ea69 100644 --- a/CGMES_2.4.15_16FEB2016/DCTopologicalIsland.hpp +++ b/CGMES_2.4.15_16FEB2016/DCTopologicalIsland.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class DCTopologicalNode; - /* - An electrically connected subset of the network. DC topological islands can change as the current network state changes: e.g. due to - disconnect switches or breakers change state in a SCADA/EMS - manual creation, change or deletion of topological nodes in a planning tool. - */ + /** \brief An electrically connected subset of the network. DC topological islands can change as the current network state changes: e.g. due to - disconnect switches or breakers change state in a SCADA/EMS - manual creation, change or deletion of topological nodes in a planning tool. */ class DCTopologicalIsland : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP DCTopologicalIsland(); ~DCTopologicalIsland() override; - std::list DCTopologicalNodes; /* Default: 0 */ + /** \brief Default: 0 */ + std::list DCTopologicalNodes; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/DCTopologicalNode.cpp b/CGMES_2.4.15_16FEB2016/DCTopologicalNode.cpp index 72a2e0655..86481b2ec 100644 --- a/CGMES_2.4.15_16FEB2016/DCTopologicalNode.cpp +++ b/CGMES_2.4.15_16FEB2016/DCTopologicalNode.cpp @@ -8,15 +8,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include +#include "DCBaseTerminal.hpp" #include "DCEquipmentContainer.hpp" #include "DCNode.hpp" -#include "DCBaseTerminal.hpp" #include "DCTopologicalIsland.hpp" using namespace CIMPP; -DCTopologicalNode::DCTopologicalNode() : DCEquipmentContainer(nullptr), DCTopologicalIsland(nullptr) {}; -DCTopologicalNode::~DCTopologicalNode() {}; +DCTopologicalNode::DCTopologicalNode() : DCEquipmentContainer(nullptr), DCTopologicalIsland(nullptr) {} +DCTopologicalNode::~DCTopologicalNode() {} static const std::list PossibleProfilesForClass = { @@ -47,8 +47,6 @@ DCTopologicalNode::getPossibleProfilesForAttributes() const return map; } - - bool assign_DCEquipmentContainer_DCTopologicalNode(BaseClass*, BaseClass*); bool assign_DCTopologicalNode_DCEquipmentContainer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -65,6 +63,7 @@ bool assign_DCTopologicalNode_DCEquipmentContainer(BaseClass* BaseClass_ptr1, Ba } return false; } + bool assign_DCNode_DCTopologicalNode(BaseClass*, BaseClass*); bool assign_DCTopologicalNode_DCNodes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -81,6 +80,7 @@ bool assign_DCTopologicalNode_DCNodes(BaseClass* BaseClass_ptr1, BaseClass* Base } return false; } + bool assign_DCBaseTerminal_DCTopologicalNode(BaseClass*, BaseClass*); bool assign_DCTopologicalNode_DCTerminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -97,6 +97,7 @@ bool assign_DCTopologicalNode_DCTerminals(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_DCTopologicalIsland_DCTopologicalNodes(BaseClass*, BaseClass*); bool assign_DCTopologicalNode_DCTopologicalIsland(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -114,10 +115,10 @@ bool assign_DCTopologicalNode_DCTopologicalIsland(BaseClass* BaseClass_ptr1, Bas return false; } - bool get_DCTopologicalNode_DCEquipmentContainer(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DCTopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + const DCTopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DCEquipmentContainer != 0) { @@ -129,6 +130,8 @@ bool get_DCTopologicalNode_DCEquipmentContainer(const BaseClass* BaseClass_ptr1, } + + const char DCTopologicalNode::debugName[] = "DCTopologicalNode"; const char* DCTopologicalNode::debugString() const { @@ -137,7 +140,7 @@ const char* DCTopologicalNode::debugString() const void DCTopologicalNode::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCTopologicalNode"), &DCTopologicalNode_factory)); + factory_map.emplace("cim:DCTopologicalNode", &DCTopologicalNode_factory); } void DCTopologicalNode::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -146,10 +149,10 @@ void DCTopologicalNode::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCTopologicalNode.DCEquipmentContainer"), &assign_DCTopologicalNode_DCEquipmentContainer)); - assign_map.insert(std::make_pair(std::string("cim:DCTopologicalNode.DCNodes"), &assign_DCTopologicalNode_DCNodes)); - assign_map.insert(std::make_pair(std::string("cim:DCTopologicalNode.DCTerminals"), &assign_DCTopologicalNode_DCTerminals)); - assign_map.insert(std::make_pair(std::string("cim:DCTopologicalNode.DCTopologicalIsland"), &assign_DCTopologicalNode_DCTopologicalIsland)); + assign_map.emplace("cim:DCTopologicalNode.DCEquipmentContainer", &assign_DCTopologicalNode_DCEquipmentContainer); + assign_map.emplace("cim:DCTopologicalNode.DCNodes", &assign_DCTopologicalNode_DCNodes); + assign_map.emplace("cim:DCTopologicalNode.DCTerminals", &assign_DCTopologicalNode_DCTerminals); + assign_map.emplace("cim:DCTopologicalNode.DCTopologicalIsland", &assign_DCTopologicalNode_DCTopologicalIsland); } void DCTopologicalNode::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/DCTopologicalNode.hpp b/CGMES_2.4.15_16FEB2016/DCTopologicalNode.hpp index 9a417fc78..893680baa 100644 --- a/CGMES_2.4.15_16FEB2016/DCTopologicalNode.hpp +++ b/CGMES_2.4.15_16FEB2016/DCTopologicalNode.hpp @@ -20,9 +20,7 @@ namespace CIMPP class DCNode; class DCTopologicalIsland; - /* - DC bus. - */ + /** \brief DC bus. */ class DCTopologicalNode : public IdentifiedObject { public: @@ -30,10 +28,17 @@ namespace CIMPP DCTopologicalNode(); ~DCTopologicalNode() override; - CIMPP::DCEquipmentContainer* DCEquipmentContainer; /* Default: 0 */ - std::list DCNodes; /* See association end ConnectivityNode.TopologicalNode. Default: 0 */ - std::list DCTerminals; /* See association end Terminal.TopologicalNode. Default: 0 */ - CIMPP::DCTopologicalIsland* DCTopologicalIsland; /* Default: 0 */ + /** \brief Default: 0 */ + CIMPP::DCEquipmentContainer* DCEquipmentContainer; + + /** \brief See association end ConnectivityNode.TopologicalNode. Default: 0 */ + std::list DCNodes; + + /** \brief See association end Terminal.TopologicalNode. Default: 0 */ + std::list DCTerminals; + + /** \brief Default: 0 */ + CIMPP::DCTopologicalIsland* DCTopologicalIsland; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Date.hpp b/CGMES_2.4.15_16FEB2016/Date.hpp index e2063f08d..2b1ac1788 100644 --- a/CGMES_2.4.15_16FEB2016/Date.hpp +++ b/CGMES_2.4.15_16FEB2016/Date.hpp @@ -4,22 +4,20 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen */ -#include #include #include +#include namespace CIMPP { - /* - Date as "yyyy-mm-dd", which conforms with ISO 8601. UTC time zone is specified as "yyyy-mm-ddZ". A local timezone relative UTC is specified as "yyyy-mm-dd(+/-)hh:mm". - */ + /** \brief Date as "yyyy-mm-dd", which conforms with ISO 8601. UTC time zone is specified as "yyyy-mm-ddZ". A local timezone relative UTC is specified as "yyyy-mm-dd(+/-)hh:mm". */ class Date { public: Date() : initialized(false) {} Date(const std::string& value) : value(value), initialized(true) {} - Date& operator=(const std::string &rop); + Date& operator=(const std::string& rop); operator std::string() const; std::string value; diff --git a/CGMES_2.4.15_16FEB2016/DateTime.hpp b/CGMES_2.4.15_16FEB2016/DateTime.hpp index 745e7583b..1e503d539 100644 --- a/CGMES_2.4.15_16FEB2016/DateTime.hpp +++ b/CGMES_2.4.15_16FEB2016/DateTime.hpp @@ -4,22 +4,20 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen */ -#include #include #include +#include namespace CIMPP { - /* - Date and time as "yyyy-mm-ddThh:mm:ss.sss", which conforms with ISO 8601. UTC time zone is specified as "yyyy-mm-ddThh:mm:ss.sssZ". A local timezone relative UTC is specified as "yyyy-mm-ddThh:mm:ss.sss-hh:mm". The second component (shown here as "ss.sss") could have any number of digits in its fractional part to allow any kind of precision beyond seconds. - */ + /** \brief Date and time as "yyyy-mm-ddThh:mm:ss.sss", which conforms with ISO 8601. UTC time zone is specified as "yyyy-mm-ddThh:mm:ss.sssZ". A local timezone relative UTC is specified as "yyyy-mm-ddThh:mm:ss.sss-hh:mm". The second component (shown here as "ss.sss") could have any number of digits in its fractional part to allow any kind of precision beyond seconds. */ class DateTime { public: DateTime() : initialized(false) {} DateTime(const std::string& value) : value(value), initialized(true) {} - DateTime& operator=(const std::string &rop); + DateTime& operator=(const std::string& rop); operator std::string() const; std::string value; diff --git a/CGMES_2.4.15_16FEB2016/DayType.cpp b/CGMES_2.4.15_16FEB2016/DayType.cpp index f97e62d1d..3783d542a 100644 --- a/CGMES_2.4.15_16FEB2016/DayType.cpp +++ b/CGMES_2.4.15_16FEB2016/DayType.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DayType::DayType() {}; -DayType::~DayType() {}; +DayType::DayType() {} +DayType::~DayType() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ DayType::getPossibleProfilesForAttributes() const return map; } - - bool assign_SeasonDayTypeSchedule_DayType(BaseClass*, BaseClass*); bool assign_DayType_SeasonDayTypeSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_DayType_SeasonDayTypeSchedules(BaseClass* BaseClass_ptr1, BaseClass* } - const char DayType::debugName[] = "DayType"; const char* DayType::debugString() const { @@ -69,7 +66,7 @@ const char* DayType::debugString() const void DayType::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DayType"), &DayType_factory)); + factory_map.emplace("cim:DayType", &DayType_factory); } void DayType::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void DayType::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DayType.SeasonDayTypeSchedules"), &assign_DayType_SeasonDayTypeSchedules)); + assign_map.emplace("cim:DayType.SeasonDayTypeSchedules", &assign_DayType_SeasonDayTypeSchedules); } void DayType::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/DayType.hpp b/CGMES_2.4.15_16FEB2016/DayType.hpp index a45e7e1f4..71436c000 100644 --- a/CGMES_2.4.15_16FEB2016/DayType.hpp +++ b/CGMES_2.4.15_16FEB2016/DayType.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class SeasonDayTypeSchedule; - /* - Group of similar days. For example it could be used to represent weekdays, weekend, or holidays. - */ + /** \brief Group of similar days. For example it could be used to represent weekdays, weekend, or holidays. */ class DayType : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP DayType(); ~DayType() override; - std::list SeasonDayTypeSchedules; /* DayType for the Schedule. Default: 0 */ + /** \brief DayType for the Schedule. Default: 0 */ + std::list SeasonDayTypeSchedules; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Decimal.hpp b/CGMES_2.4.15_16FEB2016/Decimal.hpp index fa74e37f8..0c8633d79 100644 --- a/CGMES_2.4.15_16FEB2016/Decimal.hpp +++ b/CGMES_2.4.15_16FEB2016/Decimal.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Decimal is the base-10 notational system for representing real numbers. - */ + /** \brief Decimal is the base-10 notational system for representing real numbers. */ class Decimal { public: diff --git a/CGMES_2.4.15_16FEB2016/Diagram.cpp b/CGMES_2.4.15_16FEB2016/Diagram.cpp index a3d865170..20da79106 100644 --- a/CGMES_2.4.15_16FEB2016/Diagram.cpp +++ b/CGMES_2.4.15_16FEB2016/Diagram.cpp @@ -10,16 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "DiagramObject.hpp" #include "DiagramStyle.hpp" -#include "OrientationKind.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -Diagram::Diagram() : DiagramStyle(nullptr) {}; -Diagram::~Diagram() {}; +Diagram::Diagram() : DiagramStyle(nullptr) {} +Diagram::~Diagram() {} static const std::list PossibleProfilesForClass = { @@ -52,125 +47,131 @@ Diagram::getPossibleProfilesForAttributes() const return map; } - -bool assign_Diagram_orientation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramObject_Diagram(BaseClass*, BaseClass*); +bool assign_Diagram_DiagramElements(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (Diagram* element = dynamic_cast(BaseClass_ptr1)) + Diagram* element = dynamic_cast(BaseClass_ptr1); + DiagramObject* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->orientation; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->DiagramElements.begin(), element->DiagramElements.end(), element2) == element->DiagramElements.end()) + { + element->DiagramElements.push_back(element2); + return assign_DiagramObject_Diagram(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_Diagram_x1InitialView(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramStyle_Diagram(BaseClass*, BaseClass*); +bool assign_Diagram_DiagramStyle(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (Diagram* element = dynamic_cast(BaseClass_ptr1)) + Diagram* element = dynamic_cast(BaseClass_ptr1); + DiagramStyle* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->x1InitialView; - if (buffer.fail()) - return false; - else - return true; + if (element->DiagramStyle != element2) + { + element->DiagramStyle = element2; + return assign_DiagramStyle_Diagram(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_Diagram_x2InitialView(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Diagram_orientation(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Diagram* element = dynamic_cast(BaseClass_ptr1)) + Diagram* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->x2InitialView; - if (buffer.fail()) - return false; - else + buffer >> element->orientation; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Diagram_y1InitialView(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Diagram_x1InitialView(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Diagram* element = dynamic_cast(BaseClass_ptr1)) + Diagram* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->y1InitialView; - if (buffer.fail()) - return false; - else + buffer >> element->x1InitialView; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Diagram_y2InitialView(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Diagram_x2InitialView(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Diagram* element = dynamic_cast(BaseClass_ptr1)) + Diagram* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->y2InitialView; - if (buffer.fail()) - return false; - else + buffer >> element->x2InitialView; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_DiagramObject_Diagram(BaseClass*, BaseClass*); -bool assign_Diagram_DiagramElements(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_Diagram_y1InitialView(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { Diagram* element = dynamic_cast(BaseClass_ptr1); - DiagramObject* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->DiagramElements.begin(), element->DiagramElements.end(), element2) == element->DiagramElements.end()) + buffer >> element->y1InitialView; + if (!buffer.fail()) { - element->DiagramElements.push_back(element2); - return assign_DiagramObject_Diagram(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_DiagramStyle_Diagram(BaseClass*, BaseClass*); -bool assign_Diagram_DiagramStyle(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_Diagram_y2InitialView(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { Diagram* element = dynamic_cast(BaseClass_ptr1); - DiagramStyle* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->DiagramStyle != element2) + buffer >> element->y2InitialView; + if (!buffer.fail()) { - element->DiagramStyle = element2; - return assign_DiagramStyle_Diagram(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool get_Diagram_x1InitialView(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) + +bool get_Diagram_DiagramStyle(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Diagram* element = dynamic_cast(BaseClass_ptr1)) + const Diagram* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->x1InitialView; - if (!buffer.str().empty()) + if (element->DiagramStyle != 0) { + BaseClass_list.push_back(element->DiagramStyle); return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_Diagram_x2InitialView(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_Diagram_orientation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Diagram* element = dynamic_cast(BaseClass_ptr1)) + const Diagram* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->x2InitialView; + buffer << element->orientation; if (!buffer.str().empty()) { return true; @@ -180,11 +181,12 @@ bool get_Diagram_x2InitialView(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } -bool get_Diagram_y1InitialView(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_Diagram_x1InitialView(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Diagram* element = dynamic_cast(BaseClass_ptr1)) + const Diagram* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->y1InitialView; + buffer << element->x1InitialView; if (!buffer.str().empty()) { return true; @@ -194,11 +196,12 @@ bool get_Diagram_y1InitialView(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } -bool get_Diagram_y2InitialView(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_Diagram_x2InitialView(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Diagram* element = dynamic_cast(BaseClass_ptr1)) + const Diagram* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->y2InitialView; + buffer << element->x2InitialView; if (!buffer.str().empty()) { return true; @@ -208,26 +211,27 @@ bool get_Diagram_y2InitialView(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } - -bool get_Diagram_DiagramStyle(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) +bool get_Diagram_y1InitialView(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Diagram* element = dynamic_cast(BaseClass_ptr1)) + const Diagram* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->DiagramStyle != 0) + buffer << element->y1InitialView; + if (!buffer.str().empty()) { - BaseClass_list.push_back(element->DiagramStyle); return true; } } + buffer.setstate(std::ios::failbit); return false; } - -bool get_Diagram_orientation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_Diagram_y2InitialView(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Diagram* element = dynamic_cast(BaseClass_ptr1)) + const Diagram* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->orientation; + buffer << element->y2InitialView; if (!buffer.str().empty()) { return true; @@ -245,22 +249,22 @@ const char* Diagram::debugString() const void Diagram::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Diagram"), &Diagram_factory)); + factory_map.emplace("cim:Diagram", &Diagram_factory); } void Diagram::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Diagram.orientation"), &assign_Diagram_orientation)); - assign_map.insert(std::make_pair(std::string("cim:Diagram.x1InitialView"), &assign_Diagram_x1InitialView)); - assign_map.insert(std::make_pair(std::string("cim:Diagram.x2InitialView"), &assign_Diagram_x2InitialView)); - assign_map.insert(std::make_pair(std::string("cim:Diagram.y1InitialView"), &assign_Diagram_y1InitialView)); - assign_map.insert(std::make_pair(std::string("cim:Diagram.y2InitialView"), &assign_Diagram_y2InitialView)); + assign_map.emplace("cim:Diagram.orientation", &assign_Diagram_orientation); + assign_map.emplace("cim:Diagram.x1InitialView", &assign_Diagram_x1InitialView); + assign_map.emplace("cim:Diagram.x2InitialView", &assign_Diagram_x2InitialView); + assign_map.emplace("cim:Diagram.y1InitialView", &assign_Diagram_y1InitialView); + assign_map.emplace("cim:Diagram.y2InitialView", &assign_Diagram_y2InitialView); } void Diagram::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Diagram.DiagramElements"), &assign_Diagram_DiagramElements)); - assign_map.insert(std::make_pair(std::string("cim:Diagram.DiagramStyle"), &assign_Diagram_DiagramStyle)); + assign_map.emplace("cim:Diagram.DiagramElements", &assign_Diagram_DiagramElements); + assign_map.emplace("cim:Diagram.DiagramStyle", &assign_Diagram_DiagramStyle); } void Diagram::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/Diagram.hpp b/CGMES_2.4.15_16FEB2016/Diagram.hpp index 4cad5f424..f8820ae2f 100644 --- a/CGMES_2.4.15_16FEB2016/Diagram.hpp +++ b/CGMES_2.4.15_16FEB2016/Diagram.hpp @@ -20,9 +20,7 @@ namespace CIMPP class DiagramObject; class DiagramStyle; - /* - The diagram being exchanged. The coordinate system is a standard Cartesian coordinate system and the orientation attribute defines the orientation. - */ + /** \brief The diagram being exchanged. The coordinate system is a standard Cartesian coordinate system and the orientation attribute defines the orientation. */ class Diagram : public IdentifiedObject { public: @@ -30,13 +28,26 @@ namespace CIMPP Diagram(); ~Diagram() override; - std::list DiagramElements; /* A diagram is made up of multiple diagram objects. Default: 0 */ - CIMPP::DiagramStyle* DiagramStyle; /* A Diagram may have a DiagramStyle. Default: 0 */ - CIMPP::OrientationKind orientation; /* Coordinate system orientation of the diagram. Default: 0 */ - CIMPP::Simple_Float x1InitialView; /* X coordinate of the first corner of the initial view. Default: nullptr */ - CIMPP::Simple_Float x2InitialView; /* X coordinate of the second corner of the initial view. Default: nullptr */ - CIMPP::Simple_Float y1InitialView; /* Y coordinate of the first corner of the initial view. Default: nullptr */ - CIMPP::Simple_Float y2InitialView; /* Y coordinate of the second corner of the initial view. Default: nullptr */ + /** \brief A diagram is made up of multiple diagram objects. Default: 0 */ + std::list DiagramElements; + + /** \brief A Diagram may have a DiagramStyle. Default: 0 */ + CIMPP::DiagramStyle* DiagramStyle; + + /** \brief Coordinate system orientation of the diagram. Default: 0 */ + CIMPP::OrientationKind orientation; + + /** \brief X coordinate of the first corner of the initial view. Default: nullptr */ + CIMPP::Simple_Float x1InitialView; + + /** \brief X coordinate of the second corner of the initial view. Default: nullptr */ + CIMPP::Simple_Float x2InitialView; + + /** \brief Y coordinate of the first corner of the initial view. Default: nullptr */ + CIMPP::Simple_Float y1InitialView; + + /** \brief Y coordinate of the second corner of the initial view. Default: nullptr */ + CIMPP::Simple_Float y2InitialView; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/DiagramLayoutVersion.cpp b/CGMES_2.4.15_16FEB2016/DiagramLayoutVersion.cpp index facaf59c2..55ea4f1cf 100644 --- a/CGMES_2.4.15_16FEB2016/DiagramLayoutVersion.cpp +++ b/CGMES_2.4.15_16FEB2016/DiagramLayoutVersion.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "String.hpp" -#include "String.hpp" -#include "Date.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -DiagramLayoutVersion::DiagramLayoutVersion() {}; -DiagramLayoutVersion::~DiagramLayoutVersion() {}; +DiagramLayoutVersion::DiagramLayoutVersion() {} +DiagramLayoutVersion::~DiagramLayoutVersion() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ DiagramLayoutVersion::getPossibleProfilesForAttributes() const return map; } - -bool assign_DiagramLayoutVersion_baseUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramLayoutVersion_baseUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiagramLayoutVersion_baseURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramLayoutVersion_baseURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiagramLayoutVersion_date(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramLayoutVersion_date(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->date = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiagramLayoutVersion_differenceModelURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramLayoutVersion_differenceModelURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->differenceModelURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiagramLayoutVersion_entsoeUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramLayoutVersion_entsoeUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiagramLayoutVersion_entsoeURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramLayoutVersion_entsoeURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiagramLayoutVersion_modelDescriptionURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramLayoutVersion_modelDescriptionURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->modelDescriptionURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiagramLayoutVersion_namespaceRDF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramLayoutVersion_namespaceRDF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceRDF = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiagramLayoutVersion_namespaceUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramLayoutVersion_namespaceUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiagramLayoutVersion_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramLayoutVersion_shortName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->shortName = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_DiagramLayoutVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseUML; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_DiagramLayoutVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stri bool get_DiagramLayoutVersion_baseURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseURI; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_DiagramLayoutVersion_baseURI(const BaseClass* BaseClass_ptr1, std::stri bool get_DiagramLayoutVersion_date(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->date; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_DiagramLayoutVersion_date(const BaseClass* BaseClass_ptr1, std::strings bool get_DiagramLayoutVersion_differenceModelURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->differenceModelURI; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_DiagramLayoutVersion_differenceModelURI(const BaseClass* BaseClass_ptr1 bool get_DiagramLayoutVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeUML; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_DiagramLayoutVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::st bool get_DiagramLayoutVersion_entsoeURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeURI; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_DiagramLayoutVersion_entsoeURI(const BaseClass* BaseClass_ptr1, std::st bool get_DiagramLayoutVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->modelDescriptionURI; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_DiagramLayoutVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr bool get_DiagramLayoutVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceRDF; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_DiagramLayoutVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std: bool get_DiagramLayoutVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceUML; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_DiagramLayoutVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std: bool get_DiagramLayoutVersion_shortName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortName; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_DiagramLayoutVersion_shortName(const BaseClass* BaseClass_ptr1, std::st return false; } - - const char DiagramLayoutVersion::debugName[] = "DiagramLayoutVersion"; const char* DiagramLayoutVersion::debugString() const { @@ -341,21 +346,21 @@ const char* DiagramLayoutVersion::debugString() const void DiagramLayoutVersion::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiagramLayoutVersion"), &DiagramLayoutVersion_factory)); + factory_map.emplace("cim:DiagramLayoutVersion", &DiagramLayoutVersion_factory); } void DiagramLayoutVersion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiagramLayoutVersion.baseUML"), &assign_DiagramLayoutVersion_baseUML)); - assign_map.insert(std::make_pair(std::string("cim:DiagramLayoutVersion.baseURI"), &assign_DiagramLayoutVersion_baseURI)); - assign_map.insert(std::make_pair(std::string("cim:DiagramLayoutVersion.date"), &assign_DiagramLayoutVersion_date)); - assign_map.insert(std::make_pair(std::string("cim:DiagramLayoutVersion.differenceModelURI"), &assign_DiagramLayoutVersion_differenceModelURI)); - assign_map.insert(std::make_pair(std::string("cim:DiagramLayoutVersion.entsoeUML"), &assign_DiagramLayoutVersion_entsoeUML)); - assign_map.insert(std::make_pair(std::string("cim:DiagramLayoutVersion.entsoeURI"), &assign_DiagramLayoutVersion_entsoeURI)); - assign_map.insert(std::make_pair(std::string("cim:DiagramLayoutVersion.modelDescriptionURI"), &assign_DiagramLayoutVersion_modelDescriptionURI)); - assign_map.insert(std::make_pair(std::string("cim:DiagramLayoutVersion.namespaceRDF"), &assign_DiagramLayoutVersion_namespaceRDF)); - assign_map.insert(std::make_pair(std::string("cim:DiagramLayoutVersion.namespaceUML"), &assign_DiagramLayoutVersion_namespaceUML)); - assign_map.insert(std::make_pair(std::string("cim:DiagramLayoutVersion.shortName"), &assign_DiagramLayoutVersion_shortName)); + assign_map.emplace("cim:DiagramLayoutVersion.baseUML", &assign_DiagramLayoutVersion_baseUML); + assign_map.emplace("cim:DiagramLayoutVersion.baseURI", &assign_DiagramLayoutVersion_baseURI); + assign_map.emplace("cim:DiagramLayoutVersion.date", &assign_DiagramLayoutVersion_date); + assign_map.emplace("cim:DiagramLayoutVersion.differenceModelURI", &assign_DiagramLayoutVersion_differenceModelURI); + assign_map.emplace("cim:DiagramLayoutVersion.entsoeUML", &assign_DiagramLayoutVersion_entsoeUML); + assign_map.emplace("cim:DiagramLayoutVersion.entsoeURI", &assign_DiagramLayoutVersion_entsoeURI); + assign_map.emplace("cim:DiagramLayoutVersion.modelDescriptionURI", &assign_DiagramLayoutVersion_modelDescriptionURI); + assign_map.emplace("cim:DiagramLayoutVersion.namespaceRDF", &assign_DiagramLayoutVersion_namespaceRDF); + assign_map.emplace("cim:DiagramLayoutVersion.namespaceUML", &assign_DiagramLayoutVersion_namespaceUML); + assign_map.emplace("cim:DiagramLayoutVersion.shortName", &assign_DiagramLayoutVersion_shortName); } void DiagramLayoutVersion::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/DiagramLayoutVersion.hpp b/CGMES_2.4.15_16FEB2016/DiagramLayoutVersion.hpp index e2ad534f1..e260f2faf 100644 --- a/CGMES_2.4.15_16FEB2016/DiagramLayoutVersion.hpp +++ b/CGMES_2.4.15_16FEB2016/DiagramLayoutVersion.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Version details. - */ + /** \brief Version details. */ class DiagramLayoutVersion : public BaseClass { public: @@ -28,16 +26,35 @@ namespace CIMPP DiagramLayoutVersion(); ~DiagramLayoutVersion() override; - CIMPP::String baseUML; /* Base UML provided by CIM model manager. Default: '' */ - CIMPP::String baseURI; /* Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ - CIMPP::Date date; /* Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ - CIMPP::String differenceModelURI; /* Difference model URI defined by IEC 61970-552. Default: '' */ - CIMPP::String entsoeUML; /* UML provided by ENTSO-E. Default: '' */ - CIMPP::String entsoeURI; /* Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/DiagramLayout/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ - CIMPP::String modelDescriptionURI; /* Model Description URI defined by IEC 61970-552. Default: '' */ - CIMPP::String namespaceRDF; /* RDF namespace. Default: '' */ - CIMPP::String namespaceUML; /* CIM UML namespace. Default: '' */ - CIMPP::String shortName; /* The short name of the profile used in profile documentation. Default: '' */ + /** \brief Base UML provided by CIM model manager. Default: '' */ + CIMPP::String baseUML; + + /** \brief Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ + CIMPP::String baseURI; + + /** \brief Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ + CIMPP::Date date; + + /** \brief Difference model URI defined by IEC 61970-552. Default: '' */ + CIMPP::String differenceModelURI; + + /** \brief UML provided by ENTSO-E. Default: '' */ + CIMPP::String entsoeUML; + + /** \brief Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/DiagramLayout/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ + CIMPP::String entsoeURI; + + /** \brief Model Description URI defined by IEC 61970-552. Default: '' */ + CIMPP::String modelDescriptionURI; + + /** \brief RDF namespace. Default: '' */ + CIMPP::String namespaceRDF; + + /** \brief CIM UML namespace. Default: '' */ + CIMPP::String namespaceUML; + + /** \brief The short name of the profile used in profile documentation. Default: '' */ + CIMPP::String shortName; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/DiagramObject.cpp b/CGMES_2.4.15_16FEB2016/DiagramObject.cpp index b873b7bb3..b85c6e596 100644 --- a/CGMES_2.4.15_16FEB2016/DiagramObject.cpp +++ b/CGMES_2.4.15_16FEB2016/DiagramObject.cpp @@ -13,16 +13,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "DiagramObjectStyle.hpp" #include "IdentifiedObject.hpp" #include "VisibilityLayer.hpp" -#include "Integer.hpp" -#include "Boolean.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "AngleDegrees.hpp" using namespace CIMPP; -DiagramObject::DiagramObject() : Diagram(nullptr), DiagramObjectStyle(nullptr), IdentifiedObject(nullptr) {}; -DiagramObject::~DiagramObject() {}; +DiagramObject::DiagramObject() : Diagram(nullptr), DiagramObjectStyle(nullptr), IdentifiedObject(nullptr) {} +DiagramObject::~DiagramObject() {} static const std::list PossibleProfilesForClass = { @@ -58,73 +53,6 @@ DiagramObject::getPossibleProfilesForAttributes() const return map; } - -bool assign_DiagramObject_drawingOrder(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (DiagramObject* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->drawingOrder; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_DiagramObject_isPolygon(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (DiagramObject* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->isPolygon; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_DiagramObject_offsetX(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (DiagramObject* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->offsetX; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_DiagramObject_offsetY(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (DiagramObject* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->offsetY; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_DiagramObject_rotation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (DiagramObject* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->rotation; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_Diagram_DiagramElements(BaseClass*, BaseClass*); bool assign_DiagramObject_Diagram(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -141,6 +69,7 @@ bool assign_DiagramObject_Diagram(BaseClass* BaseClass_ptr1, BaseClass* BaseClas } return false; } + bool assign_DiagramObjectPoint_DiagramObject(BaseClass*, BaseClass*); bool assign_DiagramObject_DiagramObjectPoints(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -157,6 +86,7 @@ bool assign_DiagramObject_DiagramObjectPoints(BaseClass* BaseClass_ptr1, BaseCla } return false; } + bool assign_DiagramObjectStyle_StyledObjects(BaseClass*, BaseClass*); bool assign_DiagramObject_DiagramObjectStyle(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -173,6 +103,7 @@ bool assign_DiagramObject_DiagramObjectStyle(BaseClass* BaseClass_ptr1, BaseClas } return false; } + bool assign_IdentifiedObject_DiagramObjects(BaseClass*, BaseClass*); bool assign_DiagramObject_IdentifiedObject(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -189,6 +120,7 @@ bool assign_DiagramObject_IdentifiedObject(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_VisibilityLayer_VisibleObjects(BaseClass*, BaseClass*); bool assign_DiagramObject_VisibilityLayers(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -206,80 +138,80 @@ bool assign_DiagramObject_VisibilityLayers(BaseClass* BaseClass_ptr1, BaseClass* return false; } -bool get_DiagramObject_drawingOrder(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_DiagramObject_drawingOrder(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const DiagramObject* element = dynamic_cast(BaseClass_ptr1)) + DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->drawingOrder; - if (!buffer.str().empty()) + buffer >> element->drawingOrder; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_DiagramObject_isPolygon(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_DiagramObject_isPolygon(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const DiagramObject* element = dynamic_cast(BaseClass_ptr1)) + DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->isPolygon; - if (!buffer.str().empty()) + buffer >> element->isPolygon; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_DiagramObject_offsetX(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_DiagramObject_offsetX(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const DiagramObject* element = dynamic_cast(BaseClass_ptr1)) + DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->offsetX; - if (!buffer.str().empty()) + buffer >> element->offsetX; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_DiagramObject_offsetY(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_DiagramObject_offsetY(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const DiagramObject* element = dynamic_cast(BaseClass_ptr1)) + DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->offsetY; - if (!buffer.str().empty()) + buffer >> element->offsetY; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_DiagramObject_rotation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_DiagramObject_rotation(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const DiagramObject* element = dynamic_cast(BaseClass_ptr1)) + DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->rotation; - if (!buffer.str().empty()) + buffer >> element->rotation; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_DiagramObject_Diagram(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DiagramObject* element = dynamic_cast(BaseClass_ptr1)) + const DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Diagram != 0) { @@ -290,9 +222,11 @@ bool get_DiagramObject_Diagram(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DiagramObject* element = dynamic_cast(BaseClass_ptr1)) + const DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DiagramObjectStyle != 0) { @@ -305,7 +239,8 @@ bool get_DiagramObject_DiagramObjectStyle(const BaseClass* BaseClass_ptr1, std:: bool get_DiagramObject_IdentifiedObject(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DiagramObject* element = dynamic_cast(BaseClass_ptr1)) + const DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->IdentifiedObject != 0) { @@ -317,6 +252,81 @@ bool get_DiagramObject_IdentifiedObject(const BaseClass* BaseClass_ptr1, std::li } +bool get_DiagramObject_drawingOrder(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->drawingOrder; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_DiagramObject_isPolygon(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->isPolygon; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_DiagramObject_offsetX(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->offsetX; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_DiagramObject_offsetY(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->offsetY; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_DiagramObject_rotation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->rotation; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + const char DiagramObject::debugName[] = "DiagramObject"; const char* DiagramObject::debugString() const { @@ -325,25 +335,25 @@ const char* DiagramObject::debugString() const void DiagramObject::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiagramObject"), &DiagramObject_factory)); + factory_map.emplace("cim:DiagramObject", &DiagramObject_factory); } void DiagramObject::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.drawingOrder"), &assign_DiagramObject_drawingOrder)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.isPolygon"), &assign_DiagramObject_isPolygon)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.offsetX"), &assign_DiagramObject_offsetX)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.offsetY"), &assign_DiagramObject_offsetY)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.rotation"), &assign_DiagramObject_rotation)); + assign_map.emplace("cim:DiagramObject.drawingOrder", &assign_DiagramObject_drawingOrder); + assign_map.emplace("cim:DiagramObject.isPolygon", &assign_DiagramObject_isPolygon); + assign_map.emplace("cim:DiagramObject.offsetX", &assign_DiagramObject_offsetX); + assign_map.emplace("cim:DiagramObject.offsetY", &assign_DiagramObject_offsetY); + assign_map.emplace("cim:DiagramObject.rotation", &assign_DiagramObject_rotation); } void DiagramObject::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.Diagram"), &assign_DiagramObject_Diagram)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.DiagramObjectPoints"), &assign_DiagramObject_DiagramObjectPoints)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.DiagramObjectStyle"), &assign_DiagramObject_DiagramObjectStyle)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.IdentifiedObject"), &assign_DiagramObject_IdentifiedObject)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.VisibilityLayers"), &assign_DiagramObject_VisibilityLayers)); + assign_map.emplace("cim:DiagramObject.Diagram", &assign_DiagramObject_Diagram); + assign_map.emplace("cim:DiagramObject.DiagramObjectPoints", &assign_DiagramObject_DiagramObjectPoints); + assign_map.emplace("cim:DiagramObject.DiagramObjectStyle", &assign_DiagramObject_DiagramObjectStyle); + assign_map.emplace("cim:DiagramObject.IdentifiedObject", &assign_DiagramObject_IdentifiedObject); + assign_map.emplace("cim:DiagramObject.VisibilityLayers", &assign_DiagramObject_VisibilityLayers); } void DiagramObject::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/DiagramObject.hpp b/CGMES_2.4.15_16FEB2016/DiagramObject.hpp index dc75789fb..0c1745a1f 100644 --- a/CGMES_2.4.15_16FEB2016/DiagramObject.hpp +++ b/CGMES_2.4.15_16FEB2016/DiagramObject.hpp @@ -25,9 +25,7 @@ namespace CIMPP class IdentifiedObject; class VisibilityLayer; - /* - An object that defines one or more points in a given space. This object can be associated with anything that specializes IdentifiedObject. For single line diagrams such objects typically include such items as analog values, breakers, disconnectors, power transformers, and transmission lines. - */ + /** \brief An object that defines one or more points in a given space. This object can be associated with anything that specializes IdentifiedObject. For single line diagrams such objects typically include such items as analog values, breakers, disconnectors, power transformers, and transmission lines. */ class DiagramObject : public IdentifiedObject { public: @@ -35,16 +33,35 @@ namespace CIMPP DiagramObject(); ~DiagramObject() override; - CIMPP::Diagram* Diagram; /* A diagram object is part of a diagram. Default: 0 */ - std::list DiagramObjectPoints; /* A diagram object can have 0 or more points to reflect its layout position, routing (for polylines) or boundary (for polygons). Default: 0 */ - CIMPP::DiagramObjectStyle* DiagramObjectStyle; /* A diagram object has a style associated that provides a reference for the style used in the originating system. Default: 0 */ - CIMPP::IdentifiedObject* IdentifiedObject; /* The diagram objects that are associated with the domain object. Default: 0 */ - std::list VisibilityLayers; /* A diagram object can be part of multiple visibility layers. Default: 0 */ - CIMPP::Integer drawingOrder; /* The drawing order of this element. The higher the number, the later the element is drawn in sequence. This is used to ensure that elements that overlap are rendered in the correct order. Default: 0 */ - CIMPP::Boolean isPolygon; /* Defines whether or not the diagram objects points define the boundaries of a polygon or the routing of a polyline. If this value is true then a receiving application should consider the first and last points to be connected. Default: false */ - CIMPP::Simple_Float offsetX; /* The offset in the X direction. This is used for defining the offset from centre for rendering an icon (the default is that a single point specifies the centre of the icon). The offset is in per-unit with 0 indicating there is no offset from the horizontal centre of the icon. -0.5 indicates it is offset by 50% to the left and 0.5 indicates an offset of 50% to the right. Default: nullptr */ - CIMPP::Simple_Float offsetY; /* The offset in the Y direction. This is used for defining the offset from centre for rendering an icon (the default is that a single point specifies the centre of the icon). The offset is in per-unit with 0 indicating there is no offset from the vertical centre of the icon. The offset direction is dependent on the orientation of the diagram, with -0.5 and 0.5 indicating an offset of +/- 50% on the vertical axis. Default: nullptr */ - CIMPP::AngleDegrees rotation; /* Sets the angle of rotation of the diagram object. Zero degrees is pointing to the top of the diagram. Rotation is clockwise. Default: nullptr */ + /** \brief A diagram object is part of a diagram. Default: 0 */ + CIMPP::Diagram* Diagram; + + /** \brief A diagram object can have 0 or more points to reflect its layout position, routing (for polylines) or boundary (for polygons). Default: 0 */ + std::list DiagramObjectPoints; + + /** \brief A diagram object has a style associated that provides a reference for the style used in the originating system. Default: 0 */ + CIMPP::DiagramObjectStyle* DiagramObjectStyle; + + /** \brief The diagram objects that are associated with the domain object. Default: 0 */ + CIMPP::IdentifiedObject* IdentifiedObject; + + /** \brief A diagram object can be part of multiple visibility layers. Default: 0 */ + std::list VisibilityLayers; + + /** \brief The drawing order of this element. The higher the number, the later the element is drawn in sequence. This is used to ensure that elements that overlap are rendered in the correct order. Default: 0 */ + CIMPP::Integer drawingOrder; + + /** \brief Defines whether or not the diagram objects points define the boundaries of a polygon or the routing of a polyline. If this value is true then a receiving application should consider the first and last points to be connected. Default: false */ + CIMPP::Boolean isPolygon; + + /** \brief The offset in the X direction. This is used for defining the offset from centre for rendering an icon (the default is that a single point specifies the centre of the icon). The offset is in per-unit with 0 indicating there is no offset from the horizontal centre of the icon. -0.5 indicates it is offset by 50% to the left and 0.5 indicates an offset of 50% to the right. Default: nullptr */ + CIMPP::Simple_Float offsetX; + + /** \brief The offset in the Y direction. This is used for defining the offset from centre for rendering an icon (the default is that a single point specifies the centre of the icon). The offset is in per-unit with 0 indicating there is no offset from the vertical centre of the icon. The offset direction is dependent on the orientation of the diagram, with -0.5 and 0.5 indicating an offset of +/- 50% on the vertical axis. Default: nullptr */ + CIMPP::Simple_Float offsetY; + + /** \brief Sets the angle of rotation of the diagram object. Zero degrees is pointing to the top of the diagram. Rotation is clockwise. Default: nullptr */ + CIMPP::AngleDegrees rotation; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/DiagramObjectGluePoint.cpp b/CGMES_2.4.15_16FEB2016/DiagramObjectGluePoint.cpp index 256d139b9..eea8918f9 100644 --- a/CGMES_2.4.15_16FEB2016/DiagramObjectGluePoint.cpp +++ b/CGMES_2.4.15_16FEB2016/DiagramObjectGluePoint.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DiagramObjectGluePoint::DiagramObjectGluePoint() {}; -DiagramObjectGluePoint::~DiagramObjectGluePoint() {}; +DiagramObjectGluePoint::DiagramObjectGluePoint() {} +DiagramObjectGluePoint::~DiagramObjectGluePoint() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ DiagramObjectGluePoint::getPossibleProfilesForAttributes() const return map; } - - bool assign_DiagramObjectPoint_DiagramObjectGluePoint(BaseClass*, BaseClass*); bool assign_DiagramObjectGluePoint_DiagramObjectPoints(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_DiagramObjectGluePoint_DiagramObjectPoints(BaseClass* BaseClass_ptr1 } - const char DiagramObjectGluePoint::debugName[] = "DiagramObjectGluePoint"; const char* DiagramObjectGluePoint::debugString() const { @@ -69,7 +66,7 @@ const char* DiagramObjectGluePoint::debugString() const void DiagramObjectGluePoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiagramObjectGluePoint"), &DiagramObjectGluePoint_factory)); + factory_map.emplace("cim:DiagramObjectGluePoint", &DiagramObjectGluePoint_factory); } void DiagramObjectGluePoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void DiagramObjectGluePoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiagramObjectGluePoint.DiagramObjectPoints"), &assign_DiagramObjectGluePoint_DiagramObjectPoints)); + assign_map.emplace("cim:DiagramObjectGluePoint.DiagramObjectPoints", &assign_DiagramObjectGluePoint_DiagramObjectPoints); } void DiagramObjectGluePoint::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/DiagramObjectGluePoint.hpp b/CGMES_2.4.15_16FEB2016/DiagramObjectGluePoint.hpp index 4733c7d00..fec9f8e23 100644 --- a/CGMES_2.4.15_16FEB2016/DiagramObjectGluePoint.hpp +++ b/CGMES_2.4.15_16FEB2016/DiagramObjectGluePoint.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class DiagramObjectPoint; - /* - This is used for grouping diagram object points from different diagram objects that are considered to be glued together in a diagram even if they are not at the exact same coordinates. - */ + /** \brief This is used for grouping diagram object points from different diagram objects that are considered to be glued together in a diagram even if they are not at the exact same coordinates. */ class DiagramObjectGluePoint : public BaseClass { public: @@ -27,7 +25,8 @@ namespace CIMPP DiagramObjectGluePoint(); ~DiagramObjectGluePoint() override; - std::list DiagramObjectPoints; /* The `glue` point to which this point is associated. Default: 0 */ + /** \brief The `glue` point to which this point is associated. Default: 0 */ + std::list DiagramObjectPoints; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/DiagramObjectPoint.cpp b/CGMES_2.4.15_16FEB2016/DiagramObjectPoint.cpp index 96760a8d2..4afd45f45 100644 --- a/CGMES_2.4.15_16FEB2016/DiagramObjectPoint.cpp +++ b/CGMES_2.4.15_16FEB2016/DiagramObjectPoint.cpp @@ -10,15 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "DiagramObject.hpp" #include "DiagramObjectGluePoint.hpp" -#include "Integer.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -DiagramObjectPoint::DiagramObjectPoint() : DiagramObject(nullptr), DiagramObjectGluePoint(nullptr) {}; -DiagramObjectPoint::~DiagramObjectPoint() {}; +DiagramObjectPoint::DiagramObjectPoint() : DiagramObject(nullptr), DiagramObjectGluePoint(nullptr) {} +DiagramObjectPoint::~DiagramObjectPoint() {} static const std::list PossibleProfilesForClass = { @@ -50,126 +46,130 @@ DiagramObjectPoint::getPossibleProfilesForAttributes() const return map; } - -bool assign_DiagramObjectPoint_sequenceNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramObject_DiagramObjectPoints(BaseClass*, BaseClass*); +bool assign_DiagramObjectPoint_DiagramObject(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + DiagramObject* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->sequenceNumber; - if (buffer.fail()) - return false; - else - return true; + if (element->DiagramObject != element2) + { + element->DiagramObject = element2; + return assign_DiagramObject_DiagramObjectPoints(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_DiagramObjectPoint_xPosition(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramObjectGluePoint_DiagramObjectPoints(BaseClass*, BaseClass*); +bool assign_DiagramObjectPoint_DiagramObjectGluePoint(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + DiagramObjectGluePoint* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->xPosition; - if (buffer.fail()) - return false; - else - return true; + if (element->DiagramObjectGluePoint != element2) + { + element->DiagramObjectGluePoint = element2; + return assign_DiagramObjectGluePoint_DiagramObjectPoints(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_DiagramObjectPoint_yPosition(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramObjectPoint_sequenceNumber(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->yPosition; - if (buffer.fail()) - return false; - else + buffer >> element->sequenceNumber; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiagramObjectPoint_zPosition(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramObjectPoint_xPosition(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->zPosition; - if (buffer.fail()) - return false; - else + buffer >> element->xPosition; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_DiagramObject_DiagramObjectPoints(BaseClass*, BaseClass*); -bool assign_DiagramObjectPoint_DiagramObject(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_DiagramObjectPoint_yPosition(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); - DiagramObject* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->DiagramObject != element2) + buffer >> element->yPosition; + if (!buffer.fail()) { - element->DiagramObject = element2; - return assign_DiagramObject_DiagramObjectPoints(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_DiagramObjectGluePoint_DiagramObjectPoints(BaseClass*, BaseClass*); -bool assign_DiagramObjectPoint_DiagramObjectGluePoint(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_DiagramObjectPoint_zPosition(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); - DiagramObjectGluePoint* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->DiagramObjectGluePoint != element2) + buffer >> element->zPosition; + if (!buffer.fail()) { - element->DiagramObjectGluePoint = element2; - return assign_DiagramObjectGluePoint_DiagramObjectPoints(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool get_DiagramObjectPoint_sequenceNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_DiagramObjectPoint_DiagramObject(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->sequenceNumber; - if (!buffer.str().empty()) + if (element->DiagramObject != 0) { + BaseClass_list.push_back(element->DiagramObject); return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_DiagramObjectPoint_xPosition(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_DiagramObjectPoint_DiagramObjectGluePoint(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xPosition; - if (!buffer.str().empty()) + if (element->DiagramObjectGluePoint != 0) { + BaseClass_list.push_back(element->DiagramObjectGluePoint); return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_DiagramObjectPoint_yPosition(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_DiagramObjectPoint_sequenceNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->yPosition; + buffer << element->sequenceNumber; if (!buffer.str().empty()) { return true; @@ -179,11 +179,12 @@ bool get_DiagramObjectPoint_yPosition(const BaseClass* BaseClass_ptr1, std::stri return false; } -bool get_DiagramObjectPoint_zPosition(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_DiagramObjectPoint_xPosition(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->zPosition; + buffer << element->xPosition; if (!buffer.str().empty()) { return true; @@ -193,34 +194,36 @@ bool get_DiagramObjectPoint_zPosition(const BaseClass* BaseClass_ptr1, std::stri return false; } - -bool get_DiagramObjectPoint_DiagramObject(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) +bool get_DiagramObjectPoint_yPosition(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->DiagramObject != 0) + buffer << element->yPosition; + if (!buffer.str().empty()) { - BaseClass_list.push_back(element->DiagramObject); return true; } } + buffer.setstate(std::ios::failbit); return false; } -bool get_DiagramObjectPoint_DiagramObjectGluePoint(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) +bool get_DiagramObjectPoint_zPosition(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->DiagramObjectGluePoint != 0) + buffer << element->zPosition; + if (!buffer.str().empty()) { - BaseClass_list.push_back(element->DiagramObjectGluePoint); return true; } } + buffer.setstate(std::ios::failbit); return false; } - const char DiagramObjectPoint::debugName[] = "DiagramObjectPoint"; const char* DiagramObjectPoint::debugString() const { @@ -229,21 +232,21 @@ const char* DiagramObjectPoint::debugString() const void DiagramObjectPoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiagramObjectPoint"), &DiagramObjectPoint_factory)); + factory_map.emplace("cim:DiagramObjectPoint", &DiagramObjectPoint_factory); } void DiagramObjectPoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiagramObjectPoint.sequenceNumber"), &assign_DiagramObjectPoint_sequenceNumber)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObjectPoint.xPosition"), &assign_DiagramObjectPoint_xPosition)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObjectPoint.yPosition"), &assign_DiagramObjectPoint_yPosition)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObjectPoint.zPosition"), &assign_DiagramObjectPoint_zPosition)); + assign_map.emplace("cim:DiagramObjectPoint.sequenceNumber", &assign_DiagramObjectPoint_sequenceNumber); + assign_map.emplace("cim:DiagramObjectPoint.xPosition", &assign_DiagramObjectPoint_xPosition); + assign_map.emplace("cim:DiagramObjectPoint.yPosition", &assign_DiagramObjectPoint_yPosition); + assign_map.emplace("cim:DiagramObjectPoint.zPosition", &assign_DiagramObjectPoint_zPosition); } void DiagramObjectPoint::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiagramObjectPoint.DiagramObject"), &assign_DiagramObjectPoint_DiagramObject)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObjectPoint.DiagramObjectGluePoint"), &assign_DiagramObjectPoint_DiagramObjectGluePoint)); + assign_map.emplace("cim:DiagramObjectPoint.DiagramObject", &assign_DiagramObjectPoint_DiagramObject); + assign_map.emplace("cim:DiagramObjectPoint.DiagramObjectGluePoint", &assign_DiagramObjectPoint_DiagramObjectGluePoint); } void DiagramObjectPoint::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/DiagramObjectPoint.hpp b/CGMES_2.4.15_16FEB2016/DiagramObjectPoint.hpp index b58dd1b77..ed1f2dcc5 100644 --- a/CGMES_2.4.15_16FEB2016/DiagramObjectPoint.hpp +++ b/CGMES_2.4.15_16FEB2016/DiagramObjectPoint.hpp @@ -20,9 +20,7 @@ namespace CIMPP class DiagramObject; class DiagramObjectGluePoint; - /* - A point in a given space defined by 3 coordinates and associated to a diagram object. The coordinates may be positive or negative as the origin does not have to be in the corner of a diagram. - */ + /** \brief A point in a given space defined by 3 coordinates and associated to a diagram object. The coordinates may be positive or negative as the origin does not have to be in the corner of a diagram. */ class DiagramObjectPoint : public BaseClass { public: @@ -30,12 +28,23 @@ namespace CIMPP DiagramObjectPoint(); ~DiagramObjectPoint() override; - CIMPP::DiagramObject* DiagramObject; /* The diagram object with which the points are associated. Default: 0 */ - CIMPP::DiagramObjectGluePoint* DiagramObjectGluePoint; /* A diagram object glue point is associated with 2 or more object points that are considered to be `glued` together. Default: 0 */ - CIMPP::Integer sequenceNumber; /* The sequence position of the point, used for defining the order of points for diagram objects acting as a polyline or polygon with more than one point. Default: 0 */ - CIMPP::Simple_Float xPosition; /* The X coordinate of this point. Default: nullptr */ - CIMPP::Simple_Float yPosition; /* The Y coordinate of this point. Default: nullptr */ - CIMPP::Simple_Float zPosition; /* The Z coordinate of this point. Default: nullptr */ + /** \brief The diagram object with which the points are associated. Default: 0 */ + CIMPP::DiagramObject* DiagramObject; + + /** \brief A diagram object glue point is associated with 2 or more object points that are considered to be `glued` together. Default: 0 */ + CIMPP::DiagramObjectGluePoint* DiagramObjectGluePoint; + + /** \brief The sequence position of the point, used for defining the order of points for diagram objects acting as a polyline or polygon with more than one point. Default: 0 */ + CIMPP::Integer sequenceNumber; + + /** \brief The X coordinate of this point. Default: nullptr */ + CIMPP::Simple_Float xPosition; + + /** \brief The Y coordinate of this point. Default: nullptr */ + CIMPP::Simple_Float yPosition; + + /** \brief The Z coordinate of this point. Default: nullptr */ + CIMPP::Simple_Float zPosition; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/DiagramObjectStyle.cpp b/CGMES_2.4.15_16FEB2016/DiagramObjectStyle.cpp index 938c67bf3..db870f870 100644 --- a/CGMES_2.4.15_16FEB2016/DiagramObjectStyle.cpp +++ b/CGMES_2.4.15_16FEB2016/DiagramObjectStyle.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DiagramObjectStyle::DiagramObjectStyle() {}; -DiagramObjectStyle::~DiagramObjectStyle() {}; +DiagramObjectStyle::DiagramObjectStyle() {} +DiagramObjectStyle::~DiagramObjectStyle() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ DiagramObjectStyle::getPossibleProfilesForAttributes() const return map; } - - bool assign_DiagramObject_DiagramObjectStyle(BaseClass*, BaseClass*); bool assign_DiagramObjectStyle_StyledObjects(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_DiagramObjectStyle_StyledObjects(BaseClass* BaseClass_ptr1, BaseClas } - const char DiagramObjectStyle::debugName[] = "DiagramObjectStyle"; const char* DiagramObjectStyle::debugString() const { @@ -69,7 +66,7 @@ const char* DiagramObjectStyle::debugString() const void DiagramObjectStyle::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiagramObjectStyle"), &DiagramObjectStyle_factory)); + factory_map.emplace("cim:DiagramObjectStyle", &DiagramObjectStyle_factory); } void DiagramObjectStyle::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void DiagramObjectStyle::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiagramObjectStyle.StyledObjects"), &assign_DiagramObjectStyle_StyledObjects)); + assign_map.emplace("cim:DiagramObjectStyle.StyledObjects", &assign_DiagramObjectStyle_StyledObjects); } void DiagramObjectStyle::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/DiagramObjectStyle.hpp b/CGMES_2.4.15_16FEB2016/DiagramObjectStyle.hpp index 45b0add44..a2dc55692 100644 --- a/CGMES_2.4.15_16FEB2016/DiagramObjectStyle.hpp +++ b/CGMES_2.4.15_16FEB2016/DiagramObjectStyle.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class DiagramObject; - /* - A reference to a style used by the originating system for a diagram object. A diagram object style describes information such as line thickness, shape such as circle or rectangle etc, and color. - */ + /** \brief A reference to a style used by the originating system for a diagram object. A diagram object style describes information such as line thickness, shape such as circle or rectangle etc, and color. */ class DiagramObjectStyle : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP DiagramObjectStyle(); ~DiagramObjectStyle() override; - std::list StyledObjects; /* A style can be assigned to multiple diagram objects. Default: 0 */ + /** \brief A style can be assigned to multiple diagram objects. Default: 0 */ + std::list StyledObjects; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/DiagramStyle.cpp b/CGMES_2.4.15_16FEB2016/DiagramStyle.cpp index 3e3994231..dd98ebef0 100644 --- a/CGMES_2.4.15_16FEB2016/DiagramStyle.cpp +++ b/CGMES_2.4.15_16FEB2016/DiagramStyle.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DiagramStyle::DiagramStyle() {}; -DiagramStyle::~DiagramStyle() {}; +DiagramStyle::DiagramStyle() {} +DiagramStyle::~DiagramStyle() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ DiagramStyle::getPossibleProfilesForAttributes() const return map; } - - bool assign_Diagram_DiagramStyle(BaseClass*, BaseClass*); bool assign_DiagramStyle_Diagram(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_DiagramStyle_Diagram(BaseClass* BaseClass_ptr1, BaseClass* BaseClass } - const char DiagramStyle::debugName[] = "DiagramStyle"; const char* DiagramStyle::debugString() const { @@ -69,7 +66,7 @@ const char* DiagramStyle::debugString() const void DiagramStyle::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiagramStyle"), &DiagramStyle_factory)); + factory_map.emplace("cim:DiagramStyle", &DiagramStyle_factory); } void DiagramStyle::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void DiagramStyle::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiagramStyle.Diagram"), &assign_DiagramStyle_Diagram)); + assign_map.emplace("cim:DiagramStyle.Diagram", &assign_DiagramStyle_Diagram); } void DiagramStyle::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/DiagramStyle.hpp b/CGMES_2.4.15_16FEB2016/DiagramStyle.hpp index 6cc1fd5b0..76311dfe7 100644 --- a/CGMES_2.4.15_16FEB2016/DiagramStyle.hpp +++ b/CGMES_2.4.15_16FEB2016/DiagramStyle.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class Diagram; - /* - The diagram style refer to a style used by the originating system for a diagram. A diagram style describes information such as schematic, geographic, bus-branch etc. - */ + /** \brief The diagram style refer to a style used by the originating system for a diagram. A diagram style describes information such as schematic, geographic, bus-branch etc. */ class DiagramStyle : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP DiagramStyle(); ~DiagramStyle() override; - std::list Diagram; /* A DiagramStyle can be used by many Diagrams. Default: 0 */ + /** \brief A DiagramStyle can be used by many Diagrams. Default: 0 */ + std::list Diagram; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/DiscExcContIEEEDEC1A.cpp b/CGMES_2.4.15_16FEB2016/DiscExcContIEEEDEC1A.cpp index e139fd0d6..590aabc67 100644 --- a/CGMES_2.4.15_16FEB2016/DiscExcContIEEEDEC1A.cpp +++ b/CGMES_2.4.15_16FEB2016/DiscExcContIEEEDEC1A.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -DiscExcContIEEEDEC1A::DiscExcContIEEEDEC1A() {}; -DiscExcContIEEEDEC1A::~DiscExcContIEEEDEC1A() {}; +DiscExcContIEEEDEC1A::DiscExcContIEEEDEC1A() {} +DiscExcContIEEEDEC1A::~DiscExcContIEEEDEC1A() {} static const std::list PossibleProfilesForClass = { @@ -74,246 +56,262 @@ DiscExcContIEEEDEC1A::getPossibleProfilesForAttributes() const return map; } - -bool assign_DiscExcContIEEEDEC1A_esc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_esc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->esc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_kan(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_kan(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kan; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_ketl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_ketl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ketl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_tan(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_tan(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tan; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_tl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_tl1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_tl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_tl2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_tw5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_tw5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_val(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_val(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->val; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_vanmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_vanmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vanmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_vomax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_vomax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vomax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_vomin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_vomin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vomin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_vsmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_vsmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_vsmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_vsmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_vtc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_vtc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vtc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_vtlmt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_vtlmt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vtlmt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_vtm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_vtm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vtm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_vtn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_vtn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vtn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_DiscExcContIEEEDEC1A_esc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->esc; if (!buffer.str().empty()) @@ -327,7 +325,8 @@ bool get_DiscExcContIEEEDEC1A_esc(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC1A_kan(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kan; if (!buffer.str().empty()) @@ -341,7 +340,8 @@ bool get_DiscExcContIEEEDEC1A_kan(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC1A_ketl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ketl; if (!buffer.str().empty()) @@ -355,7 +355,8 @@ bool get_DiscExcContIEEEDEC1A_ketl(const BaseClass* BaseClass_ptr1, std::strings bool get_DiscExcContIEEEDEC1A_tan(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tan; if (!buffer.str().empty()) @@ -369,7 +370,8 @@ bool get_DiscExcContIEEEDEC1A_tan(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC1A_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -383,7 +385,8 @@ bool get_DiscExcContIEEEDEC1A_td(const BaseClass* BaseClass_ptr1, std::stringstr bool get_DiscExcContIEEEDEC1A_tl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl1; if (!buffer.str().empty()) @@ -397,7 +400,8 @@ bool get_DiscExcContIEEEDEC1A_tl1(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC1A_tl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl2; if (!buffer.str().empty()) @@ -411,7 +415,8 @@ bool get_DiscExcContIEEEDEC1A_tl2(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC1A_tw5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw5; if (!buffer.str().empty()) @@ -425,7 +430,8 @@ bool get_DiscExcContIEEEDEC1A_tw5(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC1A_val(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->val; if (!buffer.str().empty()) @@ -439,7 +445,8 @@ bool get_DiscExcContIEEEDEC1A_val(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC1A_vanmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vanmax; if (!buffer.str().empty()) @@ -453,7 +460,8 @@ bool get_DiscExcContIEEEDEC1A_vanmax(const BaseClass* BaseClass_ptr1, std::strin bool get_DiscExcContIEEEDEC1A_vomax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vomax; if (!buffer.str().empty()) @@ -467,7 +475,8 @@ bool get_DiscExcContIEEEDEC1A_vomax(const BaseClass* BaseClass_ptr1, std::string bool get_DiscExcContIEEEDEC1A_vomin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vomin; if (!buffer.str().empty()) @@ -481,7 +490,8 @@ bool get_DiscExcContIEEEDEC1A_vomin(const BaseClass* BaseClass_ptr1, std::string bool get_DiscExcContIEEEDEC1A_vsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmax; if (!buffer.str().empty()) @@ -495,7 +505,8 @@ bool get_DiscExcContIEEEDEC1A_vsmax(const BaseClass* BaseClass_ptr1, std::string bool get_DiscExcContIEEEDEC1A_vsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmin; if (!buffer.str().empty()) @@ -509,7 +520,8 @@ bool get_DiscExcContIEEEDEC1A_vsmin(const BaseClass* BaseClass_ptr1, std::string bool get_DiscExcContIEEEDEC1A_vtc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vtc; if (!buffer.str().empty()) @@ -523,7 +535,8 @@ bool get_DiscExcContIEEEDEC1A_vtc(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC1A_vtlmt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vtlmt; if (!buffer.str().empty()) @@ -537,7 +550,8 @@ bool get_DiscExcContIEEEDEC1A_vtlmt(const BaseClass* BaseClass_ptr1, std::string bool get_DiscExcContIEEEDEC1A_vtm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vtm; if (!buffer.str().empty()) @@ -551,7 +565,8 @@ bool get_DiscExcContIEEEDEC1A_vtm(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC1A_vtn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vtn; if (!buffer.str().empty()) @@ -563,8 +578,6 @@ bool get_DiscExcContIEEEDEC1A_vtn(const BaseClass* BaseClass_ptr1, std::stringst return false; } - - const char DiscExcContIEEEDEC1A::debugName[] = "DiscExcContIEEEDEC1A"; const char* DiscExcContIEEEDEC1A::debugString() const { @@ -573,29 +586,29 @@ const char* DiscExcContIEEEDEC1A::debugString() const void DiscExcContIEEEDEC1A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A"), &DiscExcContIEEEDEC1A_factory)); + factory_map.emplace("cim:DiscExcContIEEEDEC1A", &DiscExcContIEEEDEC1A_factory); } void DiscExcContIEEEDEC1A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.esc"), &assign_DiscExcContIEEEDEC1A_esc)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.kan"), &assign_DiscExcContIEEEDEC1A_kan)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.ketl"), &assign_DiscExcContIEEEDEC1A_ketl)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.tan"), &assign_DiscExcContIEEEDEC1A_tan)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.td"), &assign_DiscExcContIEEEDEC1A_td)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.tl1"), &assign_DiscExcContIEEEDEC1A_tl1)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.tl2"), &assign_DiscExcContIEEEDEC1A_tl2)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.tw5"), &assign_DiscExcContIEEEDEC1A_tw5)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.val"), &assign_DiscExcContIEEEDEC1A_val)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.vanmax"), &assign_DiscExcContIEEEDEC1A_vanmax)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.vomax"), &assign_DiscExcContIEEEDEC1A_vomax)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.vomin"), &assign_DiscExcContIEEEDEC1A_vomin)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.vsmax"), &assign_DiscExcContIEEEDEC1A_vsmax)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.vsmin"), &assign_DiscExcContIEEEDEC1A_vsmin)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.vtc"), &assign_DiscExcContIEEEDEC1A_vtc)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.vtlmt"), &assign_DiscExcContIEEEDEC1A_vtlmt)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.vtm"), &assign_DiscExcContIEEEDEC1A_vtm)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.vtn"), &assign_DiscExcContIEEEDEC1A_vtn)); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.esc", &assign_DiscExcContIEEEDEC1A_esc); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.kan", &assign_DiscExcContIEEEDEC1A_kan); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.ketl", &assign_DiscExcContIEEEDEC1A_ketl); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.tan", &assign_DiscExcContIEEEDEC1A_tan); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.td", &assign_DiscExcContIEEEDEC1A_td); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.tl1", &assign_DiscExcContIEEEDEC1A_tl1); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.tl2", &assign_DiscExcContIEEEDEC1A_tl2); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.tw5", &assign_DiscExcContIEEEDEC1A_tw5); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.val", &assign_DiscExcContIEEEDEC1A_val); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.vanmax", &assign_DiscExcContIEEEDEC1A_vanmax); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.vomax", &assign_DiscExcContIEEEDEC1A_vomax); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.vomin", &assign_DiscExcContIEEEDEC1A_vomin); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.vsmax", &assign_DiscExcContIEEEDEC1A_vsmax); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.vsmin", &assign_DiscExcContIEEEDEC1A_vsmin); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.vtc", &assign_DiscExcContIEEEDEC1A_vtc); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.vtlmt", &assign_DiscExcContIEEEDEC1A_vtlmt); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.vtm", &assign_DiscExcContIEEEDEC1A_vtm); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.vtn", &assign_DiscExcContIEEEDEC1A_vtn); } void DiscExcContIEEEDEC1A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/DiscExcContIEEEDEC1A.hpp b/CGMES_2.4.15_16FEB2016/DiscExcContIEEEDEC1A.hpp index 1c19ec3a7..d401f3ce2 100644 --- a/CGMES_2.4.15_16FEB2016/DiscExcContIEEEDEC1A.hpp +++ b/CGMES_2.4.15_16FEB2016/DiscExcContIEEEDEC1A.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Type DEC1A discontinuous excitation control model that boosts generator excitation to a level higher than that demanded by the voltage regulator and stabilizer immediately following a system fault. Reference: IEEE Standard 421.5-2005 Section 12.2. - */ + /** \brief The class represents IEEE Type DEC1A discontinuous excitation control model that boosts generator excitation to a level higher than that demanded by the voltage regulator and stabilizer immediately following a system fault. Reference: IEEE Standard 421.5-2005 Section 12.2. */ class DiscExcContIEEEDEC1A : public DiscontinuousExcitationControlDynamics { public: @@ -28,24 +26,59 @@ namespace CIMPP DiscExcContIEEEDEC1A(); ~DiscExcContIEEEDEC1A() override; - CIMPP::PU esc; /* Speed change reference (). Typical Value = 0.0015. Default: nullptr */ - CIMPP::PU kan; /* Discontinuous controller gain (). Typical Value = 400. Default: nullptr */ - CIMPP::PU ketl; /* Terminal voltage limiter gain (). Typical Value = 47. Default: nullptr */ - CIMPP::Seconds tan; /* Discontinuous controller time constant (). Typical Value = 0.08. Default: nullptr */ - CIMPP::Seconds td; /* Time constant (). Typical Value = 0.03. Default: nullptr */ - CIMPP::Seconds tl1; /* Time constant (). Typical Value = 0.025. Default: nullptr */ - CIMPP::Seconds tl2; /* Time constant (). Typical Value = 1.25. Default: nullptr */ - CIMPP::Seconds tw5; /* DEC washout time constant (). Typical Value = 5. Default: nullptr */ - CIMPP::PU val; /* Regulator voltage reference (). Typical Value = 5.5. Default: nullptr */ - CIMPP::PU vanmax; /* Limiter for Van (). Default: nullptr */ - CIMPP::PU vomax; /* Limiter (). Typical Value = 0.3. Default: nullptr */ - CIMPP::PU vomin; /* Limiter (). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU vsmax; /* Limiter (). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU vsmin; /* Limiter (). Typical Value = -0.066. Default: nullptr */ - CIMPP::PU vtc; /* Terminal voltage level reference (). Typical Value = 0.95. Default: nullptr */ - CIMPP::PU vtlmt; /* Voltage reference (). Typical Value = 1.1. Default: nullptr */ - CIMPP::PU vtm; /* Voltage limits (). Typical Value = 1.13. Default: nullptr */ - CIMPP::PU vtn; /* Voltage limits (). Typical Value = 1.12. Default: nullptr */ + /** \brief Speed change reference (). Typical Value = 0.0015. Default: nullptr */ + CIMPP::PU esc; + + /** \brief Discontinuous controller gain (). Typical Value = 400. Default: nullptr */ + CIMPP::PU kan; + + /** \brief Terminal voltage limiter gain (). Typical Value = 47. Default: nullptr */ + CIMPP::PU ketl; + + /** \brief Discontinuous controller time constant (). Typical Value = 0.08. Default: nullptr */ + CIMPP::Seconds tan; + + /** \brief Time constant (). Typical Value = 0.03. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Time constant (). Typical Value = 0.025. Default: nullptr */ + CIMPP::Seconds tl1; + + /** \brief Time constant (). Typical Value = 1.25. Default: nullptr */ + CIMPP::Seconds tl2; + + /** \brief DEC washout time constant (). Typical Value = 5. Default: nullptr */ + CIMPP::Seconds tw5; + + /** \brief Regulator voltage reference (). Typical Value = 5.5. Default: nullptr */ + CIMPP::PU val; + + /** \brief Limiter for Van (). Default: nullptr */ + CIMPP::PU vanmax; + + /** \brief Limiter (). Typical Value = 0.3. Default: nullptr */ + CIMPP::PU vomax; + + /** \brief Limiter (). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU vomin; + + /** \brief Limiter (). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU vsmax; + + /** \brief Limiter (). Typical Value = -0.066. Default: nullptr */ + CIMPP::PU vsmin; + + /** \brief Terminal voltage level reference (). Typical Value = 0.95. Default: nullptr */ + CIMPP::PU vtc; + + /** \brief Voltage reference (). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU vtlmt; + + /** \brief Voltage limits (). Typical Value = 1.13. Default: nullptr */ + CIMPP::PU vtm; + + /** \brief Voltage limits (). Typical Value = 1.12. Default: nullptr */ + CIMPP::PU vtn; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/DiscExcContIEEEDEC2A.cpp b/CGMES_2.4.15_16FEB2016/DiscExcContIEEEDEC2A.cpp index 55b638498..dc94e52c0 100644 --- a/CGMES_2.4.15_16FEB2016/DiscExcContIEEEDEC2A.cpp +++ b/CGMES_2.4.15_16FEB2016/DiscExcContIEEEDEC2A.cpp @@ -8,16 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -DiscExcContIEEEDEC2A::DiscExcContIEEEDEC2A() {}; -DiscExcContIEEEDEC2A::~DiscExcContIEEEDEC2A() {}; +DiscExcContIEEEDEC2A::DiscExcContIEEEDEC2A() {} +DiscExcContIEEEDEC2A::~DiscExcContIEEEDEC2A() {} static const std::list PossibleProfilesForClass = { @@ -48,77 +43,80 @@ DiscExcContIEEEDEC2A::getPossibleProfilesForAttributes() const return map; } - -bool assign_DiscExcContIEEEDEC2A_td1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC2A_td1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC2A_td2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC2A_td2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC2A_vdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC2A_vdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC2A_vdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC2A_vdmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vdmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC2A_vk(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC2A_vk(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vk; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_DiscExcContIEEEDEC2A_td1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td1; if (!buffer.str().empty()) @@ -132,7 +130,8 @@ bool get_DiscExcContIEEEDEC2A_td1(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC2A_td2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td2; if (!buffer.str().empty()) @@ -146,7 +145,8 @@ bool get_DiscExcContIEEEDEC2A_td2(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC2A_vdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vdmax; if (!buffer.str().empty()) @@ -160,7 +160,8 @@ bool get_DiscExcContIEEEDEC2A_vdmax(const BaseClass* BaseClass_ptr1, std::string bool get_DiscExcContIEEEDEC2A_vdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vdmin; if (!buffer.str().empty()) @@ -174,7 +175,8 @@ bool get_DiscExcContIEEEDEC2A_vdmin(const BaseClass* BaseClass_ptr1, std::string bool get_DiscExcContIEEEDEC2A_vk(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vk; if (!buffer.str().empty()) @@ -186,8 +188,6 @@ bool get_DiscExcContIEEEDEC2A_vk(const BaseClass* BaseClass_ptr1, std::stringstr return false; } - - const char DiscExcContIEEEDEC2A::debugName[] = "DiscExcContIEEEDEC2A"; const char* DiscExcContIEEEDEC2A::debugString() const { @@ -196,16 +196,16 @@ const char* DiscExcContIEEEDEC2A::debugString() const void DiscExcContIEEEDEC2A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC2A"), &DiscExcContIEEEDEC2A_factory)); + factory_map.emplace("cim:DiscExcContIEEEDEC2A", &DiscExcContIEEEDEC2A_factory); } void DiscExcContIEEEDEC2A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC2A.td1"), &assign_DiscExcContIEEEDEC2A_td1)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC2A.td2"), &assign_DiscExcContIEEEDEC2A_td2)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC2A.vdmax"), &assign_DiscExcContIEEEDEC2A_vdmax)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC2A.vdmin"), &assign_DiscExcContIEEEDEC2A_vdmin)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC2A.vk"), &assign_DiscExcContIEEEDEC2A_vk)); + assign_map.emplace("cim:DiscExcContIEEEDEC2A.td1", &assign_DiscExcContIEEEDEC2A_td1); + assign_map.emplace("cim:DiscExcContIEEEDEC2A.td2", &assign_DiscExcContIEEEDEC2A_td2); + assign_map.emplace("cim:DiscExcContIEEEDEC2A.vdmax", &assign_DiscExcContIEEEDEC2A_vdmax); + assign_map.emplace("cim:DiscExcContIEEEDEC2A.vdmin", &assign_DiscExcContIEEEDEC2A_vdmin); + assign_map.emplace("cim:DiscExcContIEEEDEC2A.vk", &assign_DiscExcContIEEEDEC2A_vk); } void DiscExcContIEEEDEC2A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/DiscExcContIEEEDEC2A.hpp b/CGMES_2.4.15_16FEB2016/DiscExcContIEEEDEC2A.hpp index 5b84b484a..0e8a5a1bd 100644 --- a/CGMES_2.4.15_16FEB2016/DiscExcContIEEEDEC2A.hpp +++ b/CGMES_2.4.15_16FEB2016/DiscExcContIEEEDEC2A.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Type DEC2A model for the discontinuous excitation control. This system provides transient excitation boosting via an open-loop control as initiated by a trigger signal generated remotely. Reference: IEEE Standard 421.5-2005 Section 12.3. - */ + /** \brief The class represents IEEE Type DEC2A model for the discontinuous excitation control. This system provides transient excitation boosting via an open-loop control as initiated by a trigger signal generated remotely. Reference: IEEE Standard 421.5-2005 Section 12.3. */ class DiscExcContIEEEDEC2A : public DiscontinuousExcitationControlDynamics { public: @@ -28,11 +26,20 @@ namespace CIMPP DiscExcContIEEEDEC2A(); ~DiscExcContIEEEDEC2A() override; - CIMPP::Seconds td1; /* Discontinuous controller time constant (). Default: nullptr */ - CIMPP::Seconds td2; /* Discontinuous controller washout time constant (). Default: nullptr */ - CIMPP::PU vdmax; /* Limiter (). Default: nullptr */ - CIMPP::PU vdmin; /* Limiter (). Default: nullptr */ - CIMPP::PU vk; /* Discontinuous controller input reference (). Default: nullptr */ + /** \brief Discontinuous controller time constant (). Default: nullptr */ + CIMPP::Seconds td1; + + /** \brief Discontinuous controller washout time constant (). Default: nullptr */ + CIMPP::Seconds td2; + + /** \brief Limiter (). Default: nullptr */ + CIMPP::PU vdmax; + + /** \brief Limiter (). Default: nullptr */ + CIMPP::PU vdmin; + + /** \brief Discontinuous controller input reference (). Default: nullptr */ + CIMPP::PU vk; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/DiscExcContIEEEDEC3A.cpp b/CGMES_2.4.15_16FEB2016/DiscExcContIEEEDEC3A.cpp index 194881795..67dd91242 100644 --- a/CGMES_2.4.15_16FEB2016/DiscExcContIEEEDEC3A.cpp +++ b/CGMES_2.4.15_16FEB2016/DiscExcContIEEEDEC3A.cpp @@ -8,13 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Seconds.hpp" -#include "PU.hpp" using namespace CIMPP; -DiscExcContIEEEDEC3A::DiscExcContIEEEDEC3A() {}; -DiscExcContIEEEDEC3A::~DiscExcContIEEEDEC3A() {}; +DiscExcContIEEEDEC3A::DiscExcContIEEEDEC3A() {} +DiscExcContIEEEDEC3A::~DiscExcContIEEEDEC3A() {} static const std::list PossibleProfilesForClass = { @@ -42,38 +40,38 @@ DiscExcContIEEEDEC3A::getPossibleProfilesForAttributes() const return map; } - -bool assign_DiscExcContIEEEDEC3A_tdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC3A_tdr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC3A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC3A_vtmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC3A_vtmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC3A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vtmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_DiscExcContIEEEDEC3A_tdr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC3A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdr; if (!buffer.str().empty()) @@ -87,7 +85,8 @@ bool get_DiscExcContIEEEDEC3A_tdr(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC3A_vtmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC3A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vtmin; if (!buffer.str().empty()) @@ -99,8 +98,6 @@ bool get_DiscExcContIEEEDEC3A_vtmin(const BaseClass* BaseClass_ptr1, std::string return false; } - - const char DiscExcContIEEEDEC3A::debugName[] = "DiscExcContIEEEDEC3A"; const char* DiscExcContIEEEDEC3A::debugString() const { @@ -109,13 +106,13 @@ const char* DiscExcContIEEEDEC3A::debugString() const void DiscExcContIEEEDEC3A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC3A"), &DiscExcContIEEEDEC3A_factory)); + factory_map.emplace("cim:DiscExcContIEEEDEC3A", &DiscExcContIEEEDEC3A_factory); } void DiscExcContIEEEDEC3A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC3A.tdr"), &assign_DiscExcContIEEEDEC3A_tdr)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC3A.vtmin"), &assign_DiscExcContIEEEDEC3A_vtmin)); + assign_map.emplace("cim:DiscExcContIEEEDEC3A.tdr", &assign_DiscExcContIEEEDEC3A_tdr); + assign_map.emplace("cim:DiscExcContIEEEDEC3A.vtmin", &assign_DiscExcContIEEEDEC3A_vtmin); } void DiscExcContIEEEDEC3A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/DiscExcContIEEEDEC3A.hpp b/CGMES_2.4.15_16FEB2016/DiscExcContIEEEDEC3A.hpp index 7cefe27db..24ceb2f88 100644 --- a/CGMES_2.4.15_16FEB2016/DiscExcContIEEEDEC3A.hpp +++ b/CGMES_2.4.15_16FEB2016/DiscExcContIEEEDEC3A.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Type DEC3A model. In some systems, the stabilizer output is disconnected from the regulator immediately following a severe fault to prevent the stabilizer from competing with action of voltage regulator during the first swing. Reference: IEEE Standard 421.5-2005 Section 12.4. - */ + /** \brief The class represents IEEE Type DEC3A model. In some systems, the stabilizer output is disconnected from the regulator immediately following a severe fault to prevent the stabilizer from competing with action of voltage regulator during the first swing. Reference: IEEE Standard 421.5-2005 Section 12.4. */ class DiscExcContIEEEDEC3A : public DiscontinuousExcitationControlDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP DiscExcContIEEEDEC3A(); ~DiscExcContIEEEDEC3A() override; - CIMPP::Seconds tdr; /* Reset time delay (). Default: nullptr */ - CIMPP::PU vtmin; /* Terminal undervoltage comparison level (). Default: nullptr */ + /** \brief Reset time delay (). Default: nullptr */ + CIMPP::Seconds tdr; + + /** \brief Terminal undervoltage comparison level (). Default: nullptr */ + CIMPP::PU vtmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Disconnector.cpp b/CGMES_2.4.15_16FEB2016/Disconnector.cpp index c8dfe906e..e64c24d80 100644 --- a/CGMES_2.4.15_16FEB2016/Disconnector.cpp +++ b/CGMES_2.4.15_16FEB2016/Disconnector.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Disconnector::Disconnector() {}; -Disconnector::~Disconnector() {}; +Disconnector::Disconnector() {} +Disconnector::~Disconnector() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ Disconnector::getPossibleProfilesForAttributes() const return map; } - - - - - const char Disconnector::debugName[] = "Disconnector"; const char* Disconnector::debugString() const { @@ -52,7 +47,7 @@ const char* Disconnector::debugString() const void Disconnector::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Disconnector"), &Disconnector_factory)); + factory_map.emplace("cim:Disconnector", &Disconnector_factory); } void Disconnector::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/Disconnector.hpp b/CGMES_2.4.15_16FEB2016/Disconnector.hpp index ba606c776..844173634 100644 --- a/CGMES_2.4.15_16FEB2016/Disconnector.hpp +++ b/CGMES_2.4.15_16FEB2016/Disconnector.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A manually operated or motor operated mechanical switching device used for changing the connections in a circuit, or for isolating a circuit or equipment from a source of power. It is required to open or close circuits when negligible current is broken or made. - */ + /** \brief A manually operated or motor operated mechanical switching device used for changing the connections in a circuit, or for isolating a circuit or equipment from a source of power. It is required to open or close circuits when negligible current is broken or made. */ class Disconnector : public Switch { public: @@ -26,7 +24,6 @@ namespace CIMPP Disconnector(); ~Disconnector() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/DiscontinuousExcitationControlDynamics.cpp b/CGMES_2.4.15_16FEB2016/DiscontinuousExcitationControlDynamics.cpp index 351408515..1e6569ea1 100644 --- a/CGMES_2.4.15_16FEB2016/DiscontinuousExcitationControlDynamics.cpp +++ b/CGMES_2.4.15_16FEB2016/DiscontinuousExcitationControlDynamics.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DiscontinuousExcitationControlDynamics::DiscontinuousExcitationControlDynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr) {}; -DiscontinuousExcitationControlDynamics::~DiscontinuousExcitationControlDynamics() {}; +DiscontinuousExcitationControlDynamics::DiscontinuousExcitationControlDynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr) {} +DiscontinuousExcitationControlDynamics::~DiscontinuousExcitationControlDynamics() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ DiscontinuousExcitationControlDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_ExcitationSystemDynamics_DiscontinuousExcitationControlDynamics(BaseClass*, BaseClass*); bool assign_DiscontinuousExcitationControlDynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_DiscontinuousExcitationControlDynamics_ExcitationSystemDynamics(Base } return false; } + bool assign_RemoteInputSignal_DiscontinuousExcitationControlDynamics(BaseClass*, BaseClass*); bool assign_DiscontinuousExcitationControlDynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_DiscontinuousExcitationControlDynamics_RemoteInputSignal(BaseClass* return false; } - bool get_DiscontinuousExcitationControlDynamics_ExcitationSystemDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DiscontinuousExcitationControlDynamics* element = dynamic_cast(BaseClass_ptr1)) + const DiscontinuousExcitationControlDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ExcitationSystemDynamics != 0) { @@ -100,7 +99,7 @@ const char* DiscontinuousExcitationControlDynamics::debugString() const void DiscontinuousExcitationControlDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiscontinuousExcitationControlDynamics"), &DiscontinuousExcitationControlDynamics_factory)); + factory_map.emplace("cim:DiscontinuousExcitationControlDynamics", &DiscontinuousExcitationControlDynamics_factory); } void DiscontinuousExcitationControlDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -109,8 +108,8 @@ void DiscontinuousExcitationControlDynamics::addPrimitiveAssignFnsToMap(std::uno void DiscontinuousExcitationControlDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiscontinuousExcitationControlDynamics.ExcitationSystemDynamics"), &assign_DiscontinuousExcitationControlDynamics_ExcitationSystemDynamics)); - assign_map.insert(std::make_pair(std::string("cim:DiscontinuousExcitationControlDynamics.RemoteInputSignal"), &assign_DiscontinuousExcitationControlDynamics_RemoteInputSignal)); + assign_map.emplace("cim:DiscontinuousExcitationControlDynamics.ExcitationSystemDynamics", &assign_DiscontinuousExcitationControlDynamics_ExcitationSystemDynamics); + assign_map.emplace("cim:DiscontinuousExcitationControlDynamics.RemoteInputSignal", &assign_DiscontinuousExcitationControlDynamics_RemoteInputSignal); } void DiscontinuousExcitationControlDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/DiscontinuousExcitationControlDynamics.hpp b/CGMES_2.4.15_16FEB2016/DiscontinuousExcitationControlDynamics.hpp index f525539e5..e0a40c245 100644 --- a/CGMES_2.4.15_16FEB2016/DiscontinuousExcitationControlDynamics.hpp +++ b/CGMES_2.4.15_16FEB2016/DiscontinuousExcitationControlDynamics.hpp @@ -18,9 +18,7 @@ namespace CIMPP class ExcitationSystemDynamics; class RemoteInputSignal; - /* - Discontinuous excitation control function block whose behaviour is described by reference to a standard model . - */ + /** \brief Discontinuous excitation control function block whose behaviour is described by reference to a standard model . */ class DiscontinuousExcitationControlDynamics : public DynamicsFunctionBlock { public: @@ -28,8 +26,11 @@ namespace CIMPP DiscontinuousExcitationControlDynamics(); ~DiscontinuousExcitationControlDynamics() override; - CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; /* Excitation system model with which this discontinuous excitation control model is associated. Default: 0 */ - CIMPP::RemoteInputSignal* RemoteInputSignal; /* Remote input signal used by this discontinuous excitation control system model. Default: 0 */ + /** \brief Excitation system model with which this discontinuous excitation control model is associated. Default: 0 */ + CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; + + /** \brief Remote input signal used by this discontinuous excitation control system model. Default: 0 */ + CIMPP::RemoteInputSignal* RemoteInputSignal; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/DiscontinuousExcitationControlUserDefined.cpp b/CGMES_2.4.15_16FEB2016/DiscontinuousExcitationControlUserDefined.cpp index 9ff03969b..f2154bd03 100644 --- a/CGMES_2.4.15_16FEB2016/DiscontinuousExcitationControlUserDefined.cpp +++ b/CGMES_2.4.15_16FEB2016/DiscontinuousExcitationControlUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -DiscontinuousExcitationControlUserDefined::DiscontinuousExcitationControlUserDefined() {}; -DiscontinuousExcitationControlUserDefined::~DiscontinuousExcitationControlUserDefined() {}; +DiscontinuousExcitationControlUserDefined::DiscontinuousExcitationControlUserDefined() {} +DiscontinuousExcitationControlUserDefined::~DiscontinuousExcitationControlUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ DiscontinuousExcitationControlUserDefined::getPossibleProfilesForAttributes() co return map; } - -bool assign_DiscontinuousExcitationControlUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (DiscontinuousExcitationControlUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_DiscontinuousExcitationControlUserDefined(BaseClass*, BaseClass*); bool assign_DiscontinuousExcitationControlUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_DiscontinuousExcitationControlUserDefined_ProprietaryParameterDynami return false; } +bool assign_DiscontinuousExcitationControlUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + DiscontinuousExcitationControlUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_DiscontinuousExcitationControlUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscontinuousExcitationControlUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const DiscontinuousExcitationControlUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_DiscontinuousExcitationControlUserDefined_proprietary(const BaseClass* return false; } - - const char DiscontinuousExcitationControlUserDefined::debugName[] = "DiscontinuousExcitationControlUserDefined"; const char* DiscontinuousExcitationControlUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* DiscontinuousExcitationControlUserDefined::debugString() const void DiscontinuousExcitationControlUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiscontinuousExcitationControlUserDefined"), &DiscontinuousExcitationControlUserDefined_factory)); + factory_map.emplace("cim:DiscontinuousExcitationControlUserDefined", &DiscontinuousExcitationControlUserDefined_factory); } void DiscontinuousExcitationControlUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiscontinuousExcitationControlUserDefined.proprietary"), &assign_DiscontinuousExcitationControlUserDefined_proprietary)); + assign_map.emplace("cim:DiscontinuousExcitationControlUserDefined.proprietary", &assign_DiscontinuousExcitationControlUserDefined_proprietary); } void DiscontinuousExcitationControlUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiscontinuousExcitationControlUserDefined.ProprietaryParameterDynamics"), &assign_DiscontinuousExcitationControlUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:DiscontinuousExcitationControlUserDefined.ProprietaryParameterDynamics", &assign_DiscontinuousExcitationControlUserDefined_ProprietaryParameterDynamics); } void DiscontinuousExcitationControlUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/DiscontinuousExcitationControlUserDefined.hpp b/CGMES_2.4.15_16FEB2016/DiscontinuousExcitationControlUserDefined.hpp index 498b2150a..051d1a48d 100644 --- a/CGMES_2.4.15_16FEB2016/DiscontinuousExcitationControlUserDefined.hpp +++ b/CGMES_2.4.15_16FEB2016/DiscontinuousExcitationControlUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Discontinuous excitation control function block whose dynamic behaviour is described by - */ + /** \brief Discontinuous excitation control function block whose dynamic behaviour is described by */ class DiscontinuousExcitationControlUserDefined : public DiscontinuousExcitationControlDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP DiscontinuousExcitationControlUserDefined(); ~DiscontinuousExcitationControlUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Discrete.cpp b/CGMES_2.4.15_16FEB2016/Discrete.cpp index 6ad239122..bed7e18ab 100644 --- a/CGMES_2.4.15_16FEB2016/Discrete.cpp +++ b/CGMES_2.4.15_16FEB2016/Discrete.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Discrete::Discrete() : ValueAliasSet(nullptr) {}; -Discrete::~Discrete() {}; +Discrete::Discrete() : ValueAliasSet(nullptr) {} +Discrete::~Discrete() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ Discrete::getPossibleProfilesForAttributes() const return map; } - - bool assign_DiscreteValue_Discrete(BaseClass*, BaseClass*); bool assign_Discrete_DiscreteValues(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_Discrete_DiscreteValues(BaseClass* BaseClass_ptr1, BaseClass* BaseCl } return false; } + bool assign_ValueAliasSet_Discretes(BaseClass*, BaseClass*); bool assign_Discrete_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -80,7 +79,8 @@ bool assign_Discrete_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass* BaseCla bool get_Discrete_ValueAliasSet(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Discrete* element = dynamic_cast(BaseClass_ptr1)) + const Discrete* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ValueAliasSet != 0) { @@ -91,7 +91,6 @@ bool get_Discrete_ValueAliasSet(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Discrete"), &Discrete_factory)); + factory_map.emplace("cim:Discrete", &Discrete_factory); } void Discrete::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -109,8 +108,8 @@ void Discrete::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Discrete.DiscreteValues"), &assign_Discrete_DiscreteValues)); - assign_map.insert(std::make_pair(std::string("cim:Discrete.ValueAliasSet"), &assign_Discrete_ValueAliasSet)); + assign_map.emplace("cim:Discrete.DiscreteValues", &assign_Discrete_DiscreteValues); + assign_map.emplace("cim:Discrete.ValueAliasSet", &assign_Discrete_ValueAliasSet); } void Discrete::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/Discrete.hpp b/CGMES_2.4.15_16FEB2016/Discrete.hpp index 741c6ee67..2672d040b 100644 --- a/CGMES_2.4.15_16FEB2016/Discrete.hpp +++ b/CGMES_2.4.15_16FEB2016/Discrete.hpp @@ -18,9 +18,7 @@ namespace CIMPP class DiscreteValue; class ValueAliasSet; - /* - Discrete represents a discrete Measurement, i.e. a Measurement representing discrete values, e.g. a Breaker position. - */ + /** \brief Discrete represents a discrete Measurement, i.e. a Measurement representing discrete values, e.g. a Breaker position. */ class Discrete : public Measurement { public: @@ -28,8 +26,11 @@ namespace CIMPP Discrete(); ~Discrete() override; - std::list DiscreteValues; /* Measurement to which this value is connected. Default: 0 */ - CIMPP::ValueAliasSet* ValueAliasSet; /* The ValueAliasSet used for translation of a MeasurementValue.value to a name. Default: 0 */ + /** \brief Measurement to which this value is connected. Default: 0 */ + std::list DiscreteValues; + + /** \brief The ValueAliasSet used for translation of a MeasurementValue.value to a name. Default: 0 */ + CIMPP::ValueAliasSet* ValueAliasSet; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/DiscreteValue.cpp b/CGMES_2.4.15_16FEB2016/DiscreteValue.cpp index 2ea98ed31..a990c7895 100644 --- a/CGMES_2.4.15_16FEB2016/DiscreteValue.cpp +++ b/CGMES_2.4.15_16FEB2016/DiscreteValue.cpp @@ -10,12 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "Command.hpp" #include "Discrete.hpp" -#include "Integer.hpp" using namespace CIMPP; -DiscreteValue::DiscreteValue() : Command(nullptr), Discrete(nullptr) {}; -DiscreteValue::~DiscreteValue() {}; +DiscreteValue::DiscreteValue() : Command(nullptr), Discrete(nullptr) {} +DiscreteValue::~DiscreteValue() {} static const std::list PossibleProfilesForClass = { @@ -44,21 +43,6 @@ DiscreteValue::getPossibleProfilesForAttributes() const return map; } - -bool assign_DiscreteValue_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (DiscreteValue* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->value; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_Command_DiscreteValue(BaseClass*, BaseClass*); bool assign_DiscreteValue_Command(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -75,6 +59,7 @@ bool assign_DiscreteValue_Command(BaseClass* BaseClass_ptr1, BaseClass* BaseClas } return false; } + bool assign_Discrete_DiscreteValues(BaseClass*, BaseClass*); bool assign_DiscreteValue_Discrete(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -92,24 +77,25 @@ bool assign_DiscreteValue_Discrete(BaseClass* BaseClass_ptr1, BaseClass* BaseCla return false; } -bool get_DiscreteValue_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_DiscreteValue_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const DiscreteValue* element = dynamic_cast(BaseClass_ptr1)) + DiscreteValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->value; - if (!buffer.str().empty()) + buffer >> element->value; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } bool get_DiscreteValue_Discrete(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DiscreteValue* element = dynamic_cast(BaseClass_ptr1)) + const DiscreteValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Discrete != 0) { @@ -120,6 +106,20 @@ bool get_DiscreteValue_Discrete(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->value; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char DiscreteValue::debugName[] = "DiscreteValue"; const char* DiscreteValue::debugString() const @@ -129,18 +129,18 @@ const char* DiscreteValue::debugString() const void DiscreteValue::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiscreteValue"), &DiscreteValue_factory)); + factory_map.emplace("cim:DiscreteValue", &DiscreteValue_factory); } void DiscreteValue::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiscreteValue.value"), &assign_DiscreteValue_value)); + assign_map.emplace("cim:DiscreteValue.value", &assign_DiscreteValue_value); } void DiscreteValue::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiscreteValue.Command"), &assign_DiscreteValue_Command)); - assign_map.insert(std::make_pair(std::string("cim:DiscreteValue.Discrete"), &assign_DiscreteValue_Discrete)); + assign_map.emplace("cim:DiscreteValue.Command", &assign_DiscreteValue_Command); + assign_map.emplace("cim:DiscreteValue.Discrete", &assign_DiscreteValue_Discrete); } void DiscreteValue::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/DiscreteValue.hpp b/CGMES_2.4.15_16FEB2016/DiscreteValue.hpp index e2943d3ba..1fbc352c7 100644 --- a/CGMES_2.4.15_16FEB2016/DiscreteValue.hpp +++ b/CGMES_2.4.15_16FEB2016/DiscreteValue.hpp @@ -19,9 +19,7 @@ namespace CIMPP class Command; class Discrete; - /* - DiscreteValue represents a discrete MeasurementValue. - */ + /** \brief DiscreteValue represents a discrete MeasurementValue. */ class DiscreteValue : public MeasurementValue { public: @@ -29,9 +27,14 @@ namespace CIMPP DiscreteValue(); ~DiscreteValue() override; - CIMPP::Command* Command; /* The MeasurementValue that is controlled. Default: 0 */ - CIMPP::Discrete* Discrete; /* The values connected to this measurement. Default: 0 */ - CIMPP::Integer value; /* The value to supervise. Default: 0 */ + /** \brief The MeasurementValue that is controlled. Default: 0 */ + CIMPP::Command* Command; + + /** \brief The values connected to this measurement. Default: 0 */ + CIMPP::Discrete* Discrete; + + /** \brief The value to supervise. Default: 0 */ + CIMPP::Integer value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/DroopSignalFeedbackKind.cpp b/CGMES_2.4.15_16FEB2016/DroopSignalFeedbackKind.cpp index ca339f115..0f68d1992 100644 --- a/CGMES_2.4.15_16FEB2016/DroopSignalFeedbackKind.cpp +++ b/CGMES_2.4.15_16FEB2016/DroopSignalFeedbackKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "DroopSignalFeedbackKind") + if (EnumSymbol.substr(0, pos) != "DroopSignalFeedbackKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,22 +50,22 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "electricalPower") + if (EnumSymbol == "electricalPower") { rop = DroopSignalFeedbackKind::electricalPower; return lop; } - if(EnumSymbol == "none") + if (EnumSymbol == "none") { rop = DroopSignalFeedbackKind::none; return lop; } - if(EnumSymbol == "fuelValveStroke") + if (EnumSymbol == "fuelValveStroke") { rop = DroopSignalFeedbackKind::fuelValveStroke; return lop; } - if(EnumSymbol == "governorOutput") + if (EnumSymbol == "governorOutput") { rop = DroopSignalFeedbackKind::governorOutput; return lop; diff --git a/CGMES_2.4.15_16FEB2016/DroopSignalFeedbackKind.hpp b/CGMES_2.4.15_16FEB2016/DroopSignalFeedbackKind.hpp index de948a1bc..d68428bda 100644 --- a/CGMES_2.4.15_16FEB2016/DroopSignalFeedbackKind.hpp +++ b/CGMES_2.4.15_16FEB2016/DroopSignalFeedbackKind.hpp @@ -9,29 +9,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Governor droop signal feedback source. - */ + /** \brief Governor droop signal feedback source. */ class DroopSignalFeedbackKind { public: enum DroopSignalFeedbackKind_ENUM { - /** - * Electrical power feedback (connection indicated as 1 in the block diagrams of models, e.g. GovCT1, GovCT2). - */ + /** Electrical power feedback (connection indicated as 1 in the block diagrams of models, e.g. GovCT1, GovCT2). */ electricalPower, - /** - * No droop signal feedback, is isochronous governor. - */ + /** No droop signal feedback, is isochronous governor. */ none, - /** - * Fuel valve stroke feedback (true stroke) (connection indicated as 2 in the block diagrams of model, e.g. GovCT1, GovCT2). - */ + /** Fuel valve stroke feedback (true stroke) (connection indicated as 2 in the block diagrams of model, e.g. GovCT1, GovCT2). */ fuelValveStroke, - /** - * Governor output feedback (requested stroke) (connection indicated as 3 in the block diagrams of models, e.g. GovCT1, GovCT2). - */ + /** Governor output feedback (requested stroke) (connection indicated as 3 in the block diagrams of models, e.g. GovCT1, GovCT2). */ governorOutput, }; diff --git a/CGMES_2.4.15_16FEB2016/DynamicsFunctionBlock.cpp b/CGMES_2.4.15_16FEB2016/DynamicsFunctionBlock.cpp index 63b269772..3ed474991 100644 --- a/CGMES_2.4.15_16FEB2016/DynamicsFunctionBlock.cpp +++ b/CGMES_2.4.15_16FEB2016/DynamicsFunctionBlock.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" using namespace CIMPP; -DynamicsFunctionBlock::DynamicsFunctionBlock() {}; -DynamicsFunctionBlock::~DynamicsFunctionBlock() {}; +DynamicsFunctionBlock::DynamicsFunctionBlock() {} +DynamicsFunctionBlock::~DynamicsFunctionBlock() {} static const std::list PossibleProfilesForClass = { @@ -40,25 +39,24 @@ DynamicsFunctionBlock::getPossibleProfilesForAttributes() const return map; } - -bool assign_DynamicsFunctionBlock_enabled(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DynamicsFunctionBlock_enabled(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DynamicsFunctionBlock* element = dynamic_cast(BaseClass_ptr1)) + DynamicsFunctionBlock* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->enabled; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_DynamicsFunctionBlock_enabled(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DynamicsFunctionBlock* element = dynamic_cast(BaseClass_ptr1)) + const DynamicsFunctionBlock* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->enabled; if (!buffer.str().empty()) @@ -70,8 +68,6 @@ bool get_DynamicsFunctionBlock_enabled(const BaseClass* BaseClass_ptr1, std::str return false; } - - const char DynamicsFunctionBlock::debugName[] = "DynamicsFunctionBlock"; const char* DynamicsFunctionBlock::debugString() const { @@ -80,12 +76,12 @@ const char* DynamicsFunctionBlock::debugString() const void DynamicsFunctionBlock::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DynamicsFunctionBlock"), &DynamicsFunctionBlock_factory)); + factory_map.emplace("cim:DynamicsFunctionBlock", &DynamicsFunctionBlock_factory); } void DynamicsFunctionBlock::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DynamicsFunctionBlock.enabled"), &assign_DynamicsFunctionBlock_enabled)); + assign_map.emplace("cim:DynamicsFunctionBlock.enabled", &assign_DynamicsFunctionBlock_enabled); } void DynamicsFunctionBlock::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/DynamicsFunctionBlock.hpp b/CGMES_2.4.15_16FEB2016/DynamicsFunctionBlock.hpp index 4e9d7b9c9..cfce2f68e 100644 --- a/CGMES_2.4.15_16FEB2016/DynamicsFunctionBlock.hpp +++ b/CGMES_2.4.15_16FEB2016/DynamicsFunctionBlock.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Abstract parent class for all Dynamics function blocks. - */ + /** \brief Abstract parent class for all Dynamics function blocks. */ class DynamicsFunctionBlock : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP DynamicsFunctionBlock(); ~DynamicsFunctionBlock() override; - CIMPP::Boolean enabled; /* Function block used indicator. true = use of function block is enabled false = use of function block is disabled. Default: false */ + /** \brief Function block used indicator. true = use of function block is enabled false = use of function block is disabled. Default: false */ + CIMPP::Boolean enabled; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/DynamicsVersion.cpp b/CGMES_2.4.15_16FEB2016/DynamicsVersion.cpp index 439db56d8..4a2ca6829 100644 --- a/CGMES_2.4.15_16FEB2016/DynamicsVersion.cpp +++ b/CGMES_2.4.15_16FEB2016/DynamicsVersion.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "String.hpp" -#include "String.hpp" -#include "Date.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -DynamicsVersion::DynamicsVersion() {}; -DynamicsVersion::~DynamicsVersion() {}; +DynamicsVersion::DynamicsVersion() {} +DynamicsVersion::~DynamicsVersion() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ DynamicsVersion::getPossibleProfilesForAttributes() const return map; } - -bool assign_DynamicsVersion_baseUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DynamicsVersion_baseUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DynamicsVersion_baseURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DynamicsVersion_baseURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DynamicsVersion_date(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DynamicsVersion_date(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->date = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DynamicsVersion_differenceModelURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DynamicsVersion_differenceModelURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->differenceModelURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DynamicsVersion_entsoeUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DynamicsVersion_entsoeUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DynamicsVersion_entsoeURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DynamicsVersion_entsoeURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DynamicsVersion_modelDescriptionURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DynamicsVersion_modelDescriptionURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->modelDescriptionURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DynamicsVersion_namespaceRDF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DynamicsVersion_namespaceRDF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceRDF = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DynamicsVersion_namespaceUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DynamicsVersion_namespaceUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DynamicsVersion_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DynamicsVersion_shortName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->shortName = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_DynamicsVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseUML; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_DynamicsVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stringstr bool get_DynamicsVersion_baseURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseURI; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_DynamicsVersion_baseURI(const BaseClass* BaseClass_ptr1, std::stringstr bool get_DynamicsVersion_date(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->date; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_DynamicsVersion_date(const BaseClass* BaseClass_ptr1, std::stringstream bool get_DynamicsVersion_differenceModelURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->differenceModelURI; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_DynamicsVersion_differenceModelURI(const BaseClass* BaseClass_ptr1, std bool get_DynamicsVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeUML; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_DynamicsVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::strings bool get_DynamicsVersion_entsoeURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeURI; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_DynamicsVersion_entsoeURI(const BaseClass* BaseClass_ptr1, std::strings bool get_DynamicsVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->modelDescriptionURI; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_DynamicsVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr1, st bool get_DynamicsVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceRDF; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_DynamicsVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std::stri bool get_DynamicsVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceUML; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_DynamicsVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std::stri bool get_DynamicsVersion_shortName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortName; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_DynamicsVersion_shortName(const BaseClass* BaseClass_ptr1, std::strings return false; } - - const char DynamicsVersion::debugName[] = "DynamicsVersion"; const char* DynamicsVersion::debugString() const { @@ -341,21 +346,21 @@ const char* DynamicsVersion::debugString() const void DynamicsVersion::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DynamicsVersion"), &DynamicsVersion_factory)); + factory_map.emplace("cim:DynamicsVersion", &DynamicsVersion_factory); } void DynamicsVersion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DynamicsVersion.baseUML"), &assign_DynamicsVersion_baseUML)); - assign_map.insert(std::make_pair(std::string("cim:DynamicsVersion.baseURI"), &assign_DynamicsVersion_baseURI)); - assign_map.insert(std::make_pair(std::string("cim:DynamicsVersion.date"), &assign_DynamicsVersion_date)); - assign_map.insert(std::make_pair(std::string("cim:DynamicsVersion.differenceModelURI"), &assign_DynamicsVersion_differenceModelURI)); - assign_map.insert(std::make_pair(std::string("cim:DynamicsVersion.entsoeUML"), &assign_DynamicsVersion_entsoeUML)); - assign_map.insert(std::make_pair(std::string("cim:DynamicsVersion.entsoeURI"), &assign_DynamicsVersion_entsoeURI)); - assign_map.insert(std::make_pair(std::string("cim:DynamicsVersion.modelDescriptionURI"), &assign_DynamicsVersion_modelDescriptionURI)); - assign_map.insert(std::make_pair(std::string("cim:DynamicsVersion.namespaceRDF"), &assign_DynamicsVersion_namespaceRDF)); - assign_map.insert(std::make_pair(std::string("cim:DynamicsVersion.namespaceUML"), &assign_DynamicsVersion_namespaceUML)); - assign_map.insert(std::make_pair(std::string("cim:DynamicsVersion.shortName"), &assign_DynamicsVersion_shortName)); + assign_map.emplace("cim:DynamicsVersion.baseUML", &assign_DynamicsVersion_baseUML); + assign_map.emplace("cim:DynamicsVersion.baseURI", &assign_DynamicsVersion_baseURI); + assign_map.emplace("cim:DynamicsVersion.date", &assign_DynamicsVersion_date); + assign_map.emplace("cim:DynamicsVersion.differenceModelURI", &assign_DynamicsVersion_differenceModelURI); + assign_map.emplace("cim:DynamicsVersion.entsoeUML", &assign_DynamicsVersion_entsoeUML); + assign_map.emplace("cim:DynamicsVersion.entsoeURI", &assign_DynamicsVersion_entsoeURI); + assign_map.emplace("cim:DynamicsVersion.modelDescriptionURI", &assign_DynamicsVersion_modelDescriptionURI); + assign_map.emplace("cim:DynamicsVersion.namespaceRDF", &assign_DynamicsVersion_namespaceRDF); + assign_map.emplace("cim:DynamicsVersion.namespaceUML", &assign_DynamicsVersion_namespaceUML); + assign_map.emplace("cim:DynamicsVersion.shortName", &assign_DynamicsVersion_shortName); } void DynamicsVersion::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/DynamicsVersion.hpp b/CGMES_2.4.15_16FEB2016/DynamicsVersion.hpp index c21621cfb..67ae2df75 100644 --- a/CGMES_2.4.15_16FEB2016/DynamicsVersion.hpp +++ b/CGMES_2.4.15_16FEB2016/DynamicsVersion.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Version details. - */ + /** \brief Version details. */ class DynamicsVersion : public BaseClass { public: @@ -28,16 +26,35 @@ namespace CIMPP DynamicsVersion(); ~DynamicsVersion() override; - CIMPP::String baseUML; /* Base UML provided by CIM model manager. Default: '' */ - CIMPP::String baseURI; /* Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ - CIMPP::Date date; /* Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ - CIMPP::String differenceModelURI; /* Difference model URI defined by IEC 61970-552. Default: '' */ - CIMPP::String entsoeUML; /* UML provided by ENTSO-E. Default: '' */ - CIMPP::String entsoeURI; /* Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/Dynamics/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ - CIMPP::String modelDescriptionURI; /* Model Description URI defined by IEC 61970-552. Default: '' */ - CIMPP::String namespaceRDF; /* RDF namespace. Default: '' */ - CIMPP::String namespaceUML; /* CIM UML namespace. Default: '' */ - CIMPP::String shortName; /* The short name of the profile used in profile documentation. Default: '' */ + /** \brief Base UML provided by CIM model manager. Default: '' */ + CIMPP::String baseUML; + + /** \brief Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ + CIMPP::String baseURI; + + /** \brief Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ + CIMPP::Date date; + + /** \brief Difference model URI defined by IEC 61970-552. Default: '' */ + CIMPP::String differenceModelURI; + + /** \brief UML provided by ENTSO-E. Default: '' */ + CIMPP::String entsoeUML; + + /** \brief Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/Dynamics/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ + CIMPP::String entsoeURI; + + /** \brief Model Description URI defined by IEC 61970-552. Default: '' */ + CIMPP::String modelDescriptionURI; + + /** \brief RDF namespace. Default: '' */ + CIMPP::String namespaceRDF; + + /** \brief CIM UML namespace. Default: '' */ + CIMPP::String namespaceUML; + + /** \brief The short name of the profile used in profile documentation. Default: '' */ + CIMPP::String shortName; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/EarthFaultCompensator.cpp b/CGMES_2.4.15_16FEB2016/EarthFaultCompensator.cpp index 704e5d53f..f5411585b 100644 --- a/CGMES_2.4.15_16FEB2016/EarthFaultCompensator.cpp +++ b/CGMES_2.4.15_16FEB2016/EarthFaultCompensator.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Resistance.hpp" using namespace CIMPP; -EarthFaultCompensator::EarthFaultCompensator() {}; -EarthFaultCompensator::~EarthFaultCompensator() {}; +EarthFaultCompensator::EarthFaultCompensator() {} +EarthFaultCompensator::~EarthFaultCompensator() {} static const std::list PossibleProfilesForClass = { @@ -40,25 +39,24 @@ EarthFaultCompensator::getPossibleProfilesForAttributes() const return map; } - -bool assign_EarthFaultCompensator_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EarthFaultCompensator_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EarthFaultCompensator* element = dynamic_cast(BaseClass_ptr1)) + EarthFaultCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_EarthFaultCompensator_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EarthFaultCompensator* element = dynamic_cast(BaseClass_ptr1)) + const EarthFaultCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -70,8 +68,6 @@ bool get_EarthFaultCompensator_r(const BaseClass* BaseClass_ptr1, std::stringstr return false; } - - const char EarthFaultCompensator::debugName[] = "EarthFaultCompensator"; const char* EarthFaultCompensator::debugString() const { @@ -80,12 +76,12 @@ const char* EarthFaultCompensator::debugString() const void EarthFaultCompensator::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EarthFaultCompensator"), &EarthFaultCompensator_factory)); + factory_map.emplace("cim:EarthFaultCompensator", &EarthFaultCompensator_factory); } void EarthFaultCompensator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EarthFaultCompensator.r"), &assign_EarthFaultCompensator_r)); + assign_map.emplace("cim:EarthFaultCompensator.r", &assign_EarthFaultCompensator_r); } void EarthFaultCompensator::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/EarthFaultCompensator.hpp b/CGMES_2.4.15_16FEB2016/EarthFaultCompensator.hpp index 42b6561d1..5f16c7ac2 100644 --- a/CGMES_2.4.15_16FEB2016/EarthFaultCompensator.hpp +++ b/CGMES_2.4.15_16FEB2016/EarthFaultCompensator.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A conducting equipment used to represent a connection to ground which is typically used to compensate earth faults.. An earth fault compensator device modeled with a single terminal implies a second terminal solidly connected to ground. If two terminals are modeled, the ground is not assumed and normal connection rules apply. - */ + /** \brief A conducting equipment used to represent a connection to ground which is typically used to compensate earth faults.. An earth fault compensator device modeled with a single terminal implies a second terminal solidly connected to ground. If two terminals are modeled, the ground is not assumed and normal connection rules apply. */ class EarthFaultCompensator : public ConductingEquipment { public: @@ -27,7 +25,8 @@ namespace CIMPP EarthFaultCompensator(); ~EarthFaultCompensator() override; - CIMPP::Resistance r; /* Nominal resistance of device. Default: nullptr */ + /** \brief Nominal resistance of device. Default: nullptr */ + CIMPP::Resistance r; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/EnergyArea.cpp b/CGMES_2.4.15_16FEB2016/EnergyArea.cpp index 74d42606b..0df0b19c1 100644 --- a/CGMES_2.4.15_16FEB2016/EnergyArea.cpp +++ b/CGMES_2.4.15_16FEB2016/EnergyArea.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -EnergyArea::EnergyArea() : ControlArea(nullptr) {}; -EnergyArea::~EnergyArea() {}; +EnergyArea::EnergyArea() : ControlArea(nullptr) {} +EnergyArea::~EnergyArea() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ EnergyArea::getPossibleProfilesForAttributes() const return map; } - - bool assign_ControlArea_EnergyArea(BaseClass*, BaseClass*); bool assign_EnergyArea_ControlArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_EnergyArea_ControlArea(BaseClass* BaseClass_ptr1, BaseClass* BaseCla } - const char EnergyArea::debugName[] = "EnergyArea"; const char* EnergyArea::debugString() const { @@ -69,7 +66,7 @@ const char* EnergyArea::debugString() const void EnergyArea::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EnergyArea"), &EnergyArea_factory)); + factory_map.emplace("cim:EnergyArea", &EnergyArea_factory); } void EnergyArea::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void EnergyArea::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EnergyArea.ControlArea"), &assign_EnergyArea_ControlArea)); + assign_map.emplace("cim:EnergyArea.ControlArea", &assign_EnergyArea_ControlArea); } void EnergyArea::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/EnergyArea.hpp b/CGMES_2.4.15_16FEB2016/EnergyArea.hpp index 2958fc787..7d58dfca7 100644 --- a/CGMES_2.4.15_16FEB2016/EnergyArea.hpp +++ b/CGMES_2.4.15_16FEB2016/EnergyArea.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class ControlArea; - /* - Describes an area having energy production or consumption. Specializations are intended to support the load allocation function as typically required in energy management systems or planning studies to allocate hypothesized load levels to individual load points for power flow analysis. Often the energy area can be linked to both measured and forecast load levels. - */ + /** \brief Describes an area having energy production or consumption. Specializations are intended to support the load allocation function as typically required in energy management systems or planning studies to allocate hypothesized load levels to individual load points for power flow analysis. Often the energy area can be linked to both measured and forecast load levels. */ class EnergyArea : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP EnergyArea(); ~EnergyArea() override; - CIMPP::ControlArea* ControlArea; /* The control area specification that is used for the load forecast. Default: 0 */ + /** \brief The control area specification that is used for the load forecast. Default: 0 */ + CIMPP::ControlArea* ControlArea; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/EnergyConsumer.cpp b/CGMES_2.4.15_16FEB2016/EnergyConsumer.cpp index cc1802647..b95cded7e 100644 --- a/CGMES_2.4.15_16FEB2016/EnergyConsumer.cpp +++ b/CGMES_2.4.15_16FEB2016/EnergyConsumer.cpp @@ -10,17 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "LoadDynamics.hpp" #include "LoadResponseCharacteristic.hpp" -#include "ActivePower.hpp" -#include "ActivePower.hpp" -#include "PerCent.hpp" -#include "ReactivePower.hpp" -#include "ReactivePower.hpp" -#include "PerCent.hpp" using namespace CIMPP; -EnergyConsumer::EnergyConsumer() : LoadDynamics(nullptr), LoadResponse(nullptr) {}; -EnergyConsumer::~EnergyConsumer() {}; +EnergyConsumer::EnergyConsumer() : LoadDynamics(nullptr), LoadResponse(nullptr) {} +EnergyConsumer::~EnergyConsumer() {} static const std::list PossibleProfilesForClass = { @@ -56,122 +50,156 @@ EnergyConsumer::getPossibleProfilesForAttributes() const return map; } +bool assign_LoadDynamics_EnergyConsumer(BaseClass*, BaseClass*); +bool assign_EnergyConsumer_LoadDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + LoadDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->LoadDynamics != element2) + { + element->LoadDynamics = element2; + return assign_LoadDynamics_EnergyConsumer(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_EnergyConsumer_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_EnergyConsumer(BaseClass*, BaseClass*); +bool assign_EnergyConsumer_LoadResponse(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + LoadResponseCharacteristic* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->LoadResponse != element2) + { + element->LoadResponse = element2; + return assign_LoadResponseCharacteristic_EnergyConsumer(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_EnergyConsumer_p(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergyConsumer_pfixed(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergyConsumer_pfixed(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pfixed; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergyConsumer_pfixedPct(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergyConsumer_pfixedPct(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pfixedPct; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergyConsumer_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergyConsumer_q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergyConsumer_qfixed(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergyConsumer_qfixed(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qfixed; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergyConsumer_qfixedPct(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergyConsumer_qfixedPct(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qfixedPct; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_LoadDynamics_EnergyConsumer(BaseClass*, BaseClass*); -bool assign_EnergyConsumer_LoadDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_EnergyConsumer_LoadDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); - LoadDynamics* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->LoadDynamics != element2) + if (element->LoadDynamics != 0) { - element->LoadDynamics = element2; - return assign_LoadDynamics_EnergyConsumer(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->LoadDynamics); + return true; } - return true; } return false; } -bool assign_LoadResponseCharacteristic_EnergyConsumer(BaseClass*, BaseClass*); -bool assign_EnergyConsumer_LoadResponse(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool get_EnergyConsumer_LoadResponse(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); - LoadResponseCharacteristic* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->LoadResponse != element2) + if (element->LoadResponse != 0) { - element->LoadResponse = element2; - return assign_LoadResponseCharacteristic_EnergyConsumer(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->LoadResponse); + return true; } - return true; } return false; } bool get_EnergyConsumer_p(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p; if (!buffer.str().empty()) @@ -185,7 +213,8 @@ bool get_EnergyConsumer_p(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_EnergyConsumer_pfixed(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pfixed; if (!buffer.str().empty()) @@ -199,7 +228,8 @@ bool get_EnergyConsumer_pfixed(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_EnergyConsumer_pfixedPct(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pfixedPct; if (!buffer.str().empty()) @@ -213,7 +243,8 @@ bool get_EnergyConsumer_pfixedPct(const BaseClass* BaseClass_ptr1, std::stringst bool get_EnergyConsumer_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q; if (!buffer.str().empty()) @@ -227,7 +258,8 @@ bool get_EnergyConsumer_q(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_EnergyConsumer_qfixed(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qfixed; if (!buffer.str().empty()) @@ -241,7 +273,8 @@ bool get_EnergyConsumer_qfixed(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_EnergyConsumer_qfixedPct(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qfixedPct; if (!buffer.str().empty()) @@ -253,34 +286,6 @@ bool get_EnergyConsumer_qfixedPct(const BaseClass* BaseClass_ptr1, std::stringst return false; } - -bool get_EnergyConsumer_LoadDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->LoadDynamics != 0) - { - BaseClass_list.push_back(element->LoadDynamics); - return true; - } - } - return false; -} - -bool get_EnergyConsumer_LoadResponse(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->LoadResponse != 0) - { - BaseClass_list.push_back(element->LoadResponse); - return true; - } - } - return false; -} - - const char EnergyConsumer::debugName[] = "EnergyConsumer"; const char* EnergyConsumer::debugString() const { @@ -289,23 +294,23 @@ const char* EnergyConsumer::debugString() const void EnergyConsumer::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EnergyConsumer"), &EnergyConsumer_factory)); + factory_map.emplace("cim:EnergyConsumer", &EnergyConsumer_factory); } void EnergyConsumer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EnergyConsumer.p"), &assign_EnergyConsumer_p)); - assign_map.insert(std::make_pair(std::string("cim:EnergyConsumer.pfixed"), &assign_EnergyConsumer_pfixed)); - assign_map.insert(std::make_pair(std::string("cim:EnergyConsumer.pfixedPct"), &assign_EnergyConsumer_pfixedPct)); - assign_map.insert(std::make_pair(std::string("cim:EnergyConsumer.q"), &assign_EnergyConsumer_q)); - assign_map.insert(std::make_pair(std::string("cim:EnergyConsumer.qfixed"), &assign_EnergyConsumer_qfixed)); - assign_map.insert(std::make_pair(std::string("cim:EnergyConsumer.qfixedPct"), &assign_EnergyConsumer_qfixedPct)); + assign_map.emplace("cim:EnergyConsumer.p", &assign_EnergyConsumer_p); + assign_map.emplace("cim:EnergyConsumer.pfixed", &assign_EnergyConsumer_pfixed); + assign_map.emplace("cim:EnergyConsumer.pfixedPct", &assign_EnergyConsumer_pfixedPct); + assign_map.emplace("cim:EnergyConsumer.q", &assign_EnergyConsumer_q); + assign_map.emplace("cim:EnergyConsumer.qfixed", &assign_EnergyConsumer_qfixed); + assign_map.emplace("cim:EnergyConsumer.qfixedPct", &assign_EnergyConsumer_qfixedPct); } void EnergyConsumer::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EnergyConsumer.LoadDynamics"), &assign_EnergyConsumer_LoadDynamics)); - assign_map.insert(std::make_pair(std::string("cim:EnergyConsumer.LoadResponse"), &assign_EnergyConsumer_LoadResponse)); + assign_map.emplace("cim:EnergyConsumer.LoadDynamics", &assign_EnergyConsumer_LoadDynamics); + assign_map.emplace("cim:EnergyConsumer.LoadResponse", &assign_EnergyConsumer_LoadResponse); } void EnergyConsumer::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/EnergyConsumer.hpp b/CGMES_2.4.15_16FEB2016/EnergyConsumer.hpp index ad20849d2..54d03c283 100644 --- a/CGMES_2.4.15_16FEB2016/EnergyConsumer.hpp +++ b/CGMES_2.4.15_16FEB2016/EnergyConsumer.hpp @@ -21,9 +21,7 @@ namespace CIMPP class LoadDynamics; class LoadResponseCharacteristic; - /* - Generic user of energy - a point of consumption on the power system model. - */ + /** \brief Generic user of energy - a point of consumption on the power system model. */ class EnergyConsumer : public ConductingEquipment { public: @@ -31,14 +29,29 @@ namespace CIMPP EnergyConsumer(); ~EnergyConsumer() override; - CIMPP::LoadDynamics* LoadDynamics; /* Load dynamics model used to describe dynamic behavior of this energy consumer. Default: 0 */ - CIMPP::LoadResponseCharacteristic* LoadResponse; /* The load response characteristic of this load. If missing, this load is assumed to be constant power. Default: 0 */ - CIMPP::ActivePower p; /* Active power of the load. Load sign convention is used, i.e. positive sign means flow out from a node. For voltage dependent loads the value is at rated voltage. Starting value for a steady state solution. Default: nullptr */ - CIMPP::ActivePower pfixed; /* Active power of the load that is a fixed quantity. Load sign convention is used, i.e. positive sign means flow out from a node. Default: nullptr */ - CIMPP::PerCent pfixedPct; /* Fixed active power as per cent of load group fixed active power. Load sign convention is used, i.e. positive sign means flow out from a node. Default: nullptr */ - CIMPP::ReactivePower q; /* Reactive power of the load. Load sign convention is used, i.e. positive sign means flow out from a node. For voltage dependent loads the value is at rated voltage. Starting value for a steady state solution. Default: nullptr */ - CIMPP::ReactivePower qfixed; /* Reactive power of the load that is a fixed quantity. Load sign convention is used, i.e. positive sign means flow out from a node. Default: nullptr */ - CIMPP::PerCent qfixedPct; /* Fixed reactive power as per cent of load group fixed reactive power. Load sign convention is used, i.e. positive sign means flow out from a node. Default: nullptr */ + /** \brief Load dynamics model used to describe dynamic behavior of this energy consumer. Default: 0 */ + CIMPP::LoadDynamics* LoadDynamics; + + /** \brief The load response characteristic of this load. If missing, this load is assumed to be constant power. Default: 0 */ + CIMPP::LoadResponseCharacteristic* LoadResponse; + + /** \brief Active power of the load. Load sign convention is used, i.e. positive sign means flow out from a node. For voltage dependent loads the value is at rated voltage. Starting value for a steady state solution. Default: nullptr */ + CIMPP::ActivePower p; + + /** \brief Active power of the load that is a fixed quantity. Load sign convention is used, i.e. positive sign means flow out from a node. Default: nullptr */ + CIMPP::ActivePower pfixed; + + /** \brief Fixed active power as per cent of load group fixed active power. Load sign convention is used, i.e. positive sign means flow out from a node. Default: nullptr */ + CIMPP::PerCent pfixedPct; + + /** \brief Reactive power of the load. Load sign convention is used, i.e. positive sign means flow out from a node. For voltage dependent loads the value is at rated voltage. Starting value for a steady state solution. Default: nullptr */ + CIMPP::ReactivePower q; + + /** \brief Reactive power of the load that is a fixed quantity. Load sign convention is used, i.e. positive sign means flow out from a node. Default: nullptr */ + CIMPP::ReactivePower qfixed; + + /** \brief Fixed reactive power as per cent of load group fixed reactive power. Load sign convention is used, i.e. positive sign means flow out from a node. Default: nullptr */ + CIMPP::PerCent qfixedPct; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/EnergySchedulingType.cpp b/CGMES_2.4.15_16FEB2016/EnergySchedulingType.cpp index 5cd380bcf..a0f451af9 100644 --- a/CGMES_2.4.15_16FEB2016/EnergySchedulingType.cpp +++ b/CGMES_2.4.15_16FEB2016/EnergySchedulingType.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -EnergySchedulingType::EnergySchedulingType() {}; -EnergySchedulingType::~EnergySchedulingType() {}; +EnergySchedulingType::EnergySchedulingType() {} +EnergySchedulingType::~EnergySchedulingType() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ EnergySchedulingType::getPossibleProfilesForAttributes() const return map; } - - bool assign_EnergySource_EnergySchedulingType(BaseClass*, BaseClass*); bool assign_EnergySchedulingType_EnergySource(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,7 +59,6 @@ bool assign_EnergySchedulingType_EnergySource(BaseClass* BaseClass_ptr1, BaseCla } - const char EnergySchedulingType::debugName[] = "EnergySchedulingType"; const char* EnergySchedulingType::debugString() const { @@ -70,7 +67,7 @@ const char* EnergySchedulingType::debugString() const void EnergySchedulingType::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EnergySchedulingType"), &EnergySchedulingType_factory)); + factory_map.emplace("cim:EnergySchedulingType", &EnergySchedulingType_factory); } void EnergySchedulingType::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -79,7 +76,7 @@ void EnergySchedulingType::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EnergySchedulingType.EnergySource"), &assign_EnergySchedulingType_EnergySource)); + assign_map.emplace("cim:EnergySchedulingType.EnergySource", &assign_EnergySchedulingType_EnergySource); } void EnergySchedulingType::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/EnergySchedulingType.hpp b/CGMES_2.4.15_16FEB2016/EnergySchedulingType.hpp index e324c3ead..eac7cbf2c 100644 --- a/CGMES_2.4.15_16FEB2016/EnergySchedulingType.hpp +++ b/CGMES_2.4.15_16FEB2016/EnergySchedulingType.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class EnergySource; - /* - Used to define the type of generation for scheduling purposes. - */ + /** \brief Used to define the type of generation for scheduling purposes. */ class EnergySchedulingType : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP EnergySchedulingType(); ~EnergySchedulingType() override; - std::list EnergySource; /* Energy Source of a particular Energy Scheduling Type Default: 0 */ + /** \brief Energy Source of a particular Energy Scheduling Type Default: 0 */ + std::list EnergySource; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/EnergySource.cpp b/CGMES_2.4.15_16FEB2016/EnergySource.cpp index 64d73c4ee..e4cedfe4b 100644 --- a/CGMES_2.4.15_16FEB2016/EnergySource.cpp +++ b/CGMES_2.4.15_16FEB2016/EnergySource.cpp @@ -10,22 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "EnergySchedulingType.hpp" #include "WindTurbineType3or4Dynamics.hpp" -#include "ActivePower.hpp" -#include "Voltage.hpp" -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "ReactivePower.hpp" -#include "Resistance.hpp" -#include "AngleRadians.hpp" -#include "Voltage.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -EnergySource::EnergySource() : EnergySchedulingType(nullptr), WindTurbineType3or4Dynamics(nullptr) {}; -EnergySource::~EnergySource() {}; +EnergySource::EnergySource() : EnergySchedulingType(nullptr), WindTurbineType3or4Dynamics(nullptr) {} +EnergySource::~EnergySource() {} static const std::list PossibleProfilesForClass = { @@ -67,187 +56,213 @@ EnergySource::getPossibleProfilesForAttributes() const return map; } +bool assign_EnergySchedulingType_EnergySource(BaseClass*, BaseClass*); +bool assign_EnergySource_EnergySchedulingType(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + EnergySource* element = dynamic_cast(BaseClass_ptr1); + EnergySchedulingType* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->EnergySchedulingType != element2) + { + element->EnergySchedulingType = element2; + return assign_EnergySchedulingType_EnergySource(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindTurbineType3or4Dynamics_EnergySource(BaseClass*, BaseClass*); +bool assign_EnergySource_WindTurbineType3or4Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + EnergySource* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType3or4Dynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindTurbineType3or4Dynamics != element2) + { + element->WindTurbineType3or4Dynamics = element2; + return assign_WindTurbineType3or4Dynamics_EnergySource(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_EnergySource_activePower(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_activePower(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->activePower; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_nominalVoltage(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_nominalVoltage(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nominalVoltage; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_r0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_reactivePower(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_reactivePower(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->reactivePower; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_rn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_rn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_voltageAngle(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_voltageAngle(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->voltageAngle; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_voltageMagnitude(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_voltageMagnitude(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->voltageMagnitude; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_x(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_x0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x0; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_EnergySource_xn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->xn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_EnergySchedulingType_EnergySource(BaseClass*, BaseClass*); -bool assign_EnergySource_EnergySchedulingType(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_EnergySource_xn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { EnergySource* element = dynamic_cast(BaseClass_ptr1); - EnergySchedulingType* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->EnergySchedulingType != element2) + buffer >> element->xn; + if (!buffer.fail()) { - element->EnergySchedulingType = element2; - return assign_EnergySchedulingType_EnergySource(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_WindTurbineType3or4Dynamics_EnergySource(BaseClass*, BaseClass*); -bool assign_EnergySource_WindTurbineType3or4Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool get_EnergySource_EnergySchedulingType(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - EnergySource* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType3or4Dynamics* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->WindTurbineType3or4Dynamics != element2) + if (element->EnergySchedulingType != 0) { - element->WindTurbineType3or4Dynamics = element2; - return assign_WindTurbineType3or4Dynamics_EnergySource(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->EnergySchedulingType); + return true; } - return true; } return false; } + bool get_EnergySource_activePower(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->activePower; if (!buffer.str().empty()) @@ -261,7 +276,8 @@ bool get_EnergySource_activePower(const BaseClass* BaseClass_ptr1, std::stringst bool get_EnergySource_nominalVoltage(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nominalVoltage; if (!buffer.str().empty()) @@ -275,7 +291,8 @@ bool get_EnergySource_nominalVoltage(const BaseClass* BaseClass_ptr1, std::strin bool get_EnergySource_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -289,7 +306,8 @@ bool get_EnergySource_r(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_EnergySource_r0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r0; if (!buffer.str().empty()) @@ -303,7 +321,8 @@ bool get_EnergySource_r0(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_EnergySource_reactivePower(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->reactivePower; if (!buffer.str().empty()) @@ -317,7 +336,8 @@ bool get_EnergySource_reactivePower(const BaseClass* BaseClass_ptr1, std::string bool get_EnergySource_rn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rn; if (!buffer.str().empty()) @@ -331,7 +351,8 @@ bool get_EnergySource_rn(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_EnergySource_voltageAngle(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->voltageAngle; if (!buffer.str().empty()) @@ -345,7 +366,8 @@ bool get_EnergySource_voltageAngle(const BaseClass* BaseClass_ptr1, std::strings bool get_EnergySource_voltageMagnitude(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->voltageMagnitude; if (!buffer.str().empty()) @@ -359,7 +381,8 @@ bool get_EnergySource_voltageMagnitude(const BaseClass* BaseClass_ptr1, std::str bool get_EnergySource_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x; if (!buffer.str().empty()) @@ -373,7 +396,8 @@ bool get_EnergySource_x(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_EnergySource_x0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x0; if (!buffer.str().empty()) @@ -387,7 +411,8 @@ bool get_EnergySource_x0(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_EnergySource_xn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xn; if (!buffer.str().empty()) @@ -399,21 +424,6 @@ bool get_EnergySource_xn(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } - -bool get_EnergySource_EnergySchedulingType(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->EnergySchedulingType != 0) - { - BaseClass_list.push_back(element->EnergySchedulingType); - return true; - } - } - return false; -} - - const char EnergySource::debugName[] = "EnergySource"; const char* EnergySource::debugString() const { @@ -422,28 +432,28 @@ const char* EnergySource::debugString() const void EnergySource::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EnergySource"), &EnergySource_factory)); + factory_map.emplace("cim:EnergySource", &EnergySource_factory); } void EnergySource::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EnergySource.activePower"), &assign_EnergySource_activePower)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.nominalVoltage"), &assign_EnergySource_nominalVoltage)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.r"), &assign_EnergySource_r)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.r0"), &assign_EnergySource_r0)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.reactivePower"), &assign_EnergySource_reactivePower)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.rn"), &assign_EnergySource_rn)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.voltageAngle"), &assign_EnergySource_voltageAngle)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.voltageMagnitude"), &assign_EnergySource_voltageMagnitude)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.x"), &assign_EnergySource_x)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.x0"), &assign_EnergySource_x0)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.xn"), &assign_EnergySource_xn)); + assign_map.emplace("cim:EnergySource.activePower", &assign_EnergySource_activePower); + assign_map.emplace("cim:EnergySource.nominalVoltage", &assign_EnergySource_nominalVoltage); + assign_map.emplace("cim:EnergySource.r", &assign_EnergySource_r); + assign_map.emplace("cim:EnergySource.r0", &assign_EnergySource_r0); + assign_map.emplace("cim:EnergySource.reactivePower", &assign_EnergySource_reactivePower); + assign_map.emplace("cim:EnergySource.rn", &assign_EnergySource_rn); + assign_map.emplace("cim:EnergySource.voltageAngle", &assign_EnergySource_voltageAngle); + assign_map.emplace("cim:EnergySource.voltageMagnitude", &assign_EnergySource_voltageMagnitude); + assign_map.emplace("cim:EnergySource.x", &assign_EnergySource_x); + assign_map.emplace("cim:EnergySource.x0", &assign_EnergySource_x0); + assign_map.emplace("cim:EnergySource.xn", &assign_EnergySource_xn); } void EnergySource::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EnergySource.EnergySchedulingType"), &assign_EnergySource_EnergySchedulingType)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.WindTurbineType3or4Dynamics"), &assign_EnergySource_WindTurbineType3or4Dynamics)); + assign_map.emplace("cim:EnergySource.EnergySchedulingType", &assign_EnergySource_EnergySchedulingType); + assign_map.emplace("cim:EnergySource.WindTurbineType3or4Dynamics", &assign_EnergySource_WindTurbineType3or4Dynamics); } void EnergySource::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/EnergySource.hpp b/CGMES_2.4.15_16FEB2016/EnergySource.hpp index cdcaefece..44dc8214a 100644 --- a/CGMES_2.4.15_16FEB2016/EnergySource.hpp +++ b/CGMES_2.4.15_16FEB2016/EnergySource.hpp @@ -24,9 +24,7 @@ namespace CIMPP class EnergySchedulingType; class WindTurbineType3or4Dynamics; - /* - A generic equivalent for an energy supplier on a transmission or distribution voltage level. - */ + /** \brief A generic equivalent for an energy supplier on a transmission or distribution voltage level. */ class EnergySource : public ConductingEquipment { public: @@ -34,19 +32,44 @@ namespace CIMPP EnergySource(); ~EnergySource() override; - CIMPP::EnergySchedulingType* EnergySchedulingType; /* Energy Scheduling Type of an Energy Source Default: 0 */ - CIMPP::WindTurbineType3or4Dynamics* WindTurbineType3or4Dynamics; /* Wind generator Type 3 or 4 dynamics model associated with this energy source. Default: 0 */ - CIMPP::ActivePower activePower; /* High voltage source active injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ - CIMPP::Voltage nominalVoltage; /* Phase-to-phase nominal voltage. Default: nullptr */ - CIMPP::Resistance r; /* Positive sequence Thevenin resistance. Default: nullptr */ - CIMPP::Resistance r0; /* Zero sequence Thevenin resistance. Default: nullptr */ - CIMPP::ReactivePower reactivePower; /* High voltage source reactive injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ - CIMPP::Resistance rn; /* Negative sequence Thevenin resistance. Default: nullptr */ - CIMPP::AngleRadians voltageAngle; /* Phase angle of a-phase open circuit. Default: nullptr */ - CIMPP::Voltage voltageMagnitude; /* Phase-to-phase open circuit voltage magnitude. Default: nullptr */ - CIMPP::Reactance x; /* Positive sequence Thevenin reactance. Default: nullptr */ - CIMPP::Reactance x0; /* Zero sequence Thevenin reactance. Default: nullptr */ - CIMPP::Reactance xn; /* Negative sequence Thevenin reactance. Default: nullptr */ + /** \brief Energy Scheduling Type of an Energy Source Default: 0 */ + CIMPP::EnergySchedulingType* EnergySchedulingType; + + /** \brief Wind generator Type 3 or 4 dynamics model associated with this energy source. Default: 0 */ + CIMPP::WindTurbineType3or4Dynamics* WindTurbineType3or4Dynamics; + + /** \brief High voltage source active injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ + CIMPP::ActivePower activePower; + + /** \brief Phase-to-phase nominal voltage. Default: nullptr */ + CIMPP::Voltage nominalVoltage; + + /** \brief Positive sequence Thevenin resistance. Default: nullptr */ + CIMPP::Resistance r; + + /** \brief Zero sequence Thevenin resistance. Default: nullptr */ + CIMPP::Resistance r0; + + /** \brief High voltage source reactive injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ + CIMPP::ReactivePower reactivePower; + + /** \brief Negative sequence Thevenin resistance. Default: nullptr */ + CIMPP::Resistance rn; + + /** \brief Phase angle of a-phase open circuit. Default: nullptr */ + CIMPP::AngleRadians voltageAngle; + + /** \brief Phase-to-phase open circuit voltage magnitude. Default: nullptr */ + CIMPP::Voltage voltageMagnitude; + + /** \brief Positive sequence Thevenin reactance. Default: nullptr */ + CIMPP::Reactance x; + + /** \brief Zero sequence Thevenin reactance. Default: nullptr */ + CIMPP::Reactance x0; + + /** \brief Negative sequence Thevenin reactance. Default: nullptr */ + CIMPP::Reactance xn; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Equipment.cpp b/CGMES_2.4.15_16FEB2016/Equipment.cpp index 71c4ba73e..eb6382a63 100644 --- a/CGMES_2.4.15_16FEB2016/Equipment.cpp +++ b/CGMES_2.4.15_16FEB2016/Equipment.cpp @@ -10,12 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "EquipmentContainer.hpp" #include "OperationalLimitSet.hpp" -#include "Boolean.hpp" using namespace CIMPP; -Equipment::Equipment() : EquipmentContainer(nullptr) {}; -Equipment::~Equipment() {}; +Equipment::Equipment() : EquipmentContainer(nullptr) {} +Equipment::~Equipment() {} static const std::list PossibleProfilesForClass = { @@ -47,21 +46,6 @@ Equipment::getPossibleProfilesForAttributes() const return map; } - -bool assign_Equipment_aggregate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (Equipment* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->aggregate; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_EquipmentContainer_Equipments(BaseClass*, BaseClass*); bool assign_Equipment_EquipmentContainer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -78,6 +62,7 @@ bool assign_Equipment_EquipmentContainer(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_OperationalLimitSet_Equipment(BaseClass*, BaseClass*); bool assign_Equipment_OperationalLimitSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -95,24 +80,24 @@ bool assign_Equipment_OperationalLimitSet(BaseClass* BaseClass_ptr1, BaseClass* return false; } -bool get_Equipment_aggregate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_Equipment_aggregate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const Equipment* element = dynamic_cast(BaseClass_ptr1)) + Equipment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->aggregate; - if (!buffer.str().empty()) + buffer >> element->aggregate; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_Equipment_EquipmentContainer(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Equipment* element = dynamic_cast(BaseClass_ptr1)) + const Equipment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->EquipmentContainer != 0) { @@ -124,6 +109,21 @@ bool get_Equipment_EquipmentContainer(const BaseClass* BaseClass_ptr1, std::list } +bool get_Equipment_aggregate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const Equipment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->aggregate; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + const char Equipment::debugName[] = "Equipment"; const char* Equipment::debugString() const { @@ -132,18 +132,18 @@ const char* Equipment::debugString() const void Equipment::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Equipment"), &Equipment_factory)); + factory_map.emplace("cim:Equipment", &Equipment_factory); } void Equipment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Equipment.aggregate"), &assign_Equipment_aggregate)); + assign_map.emplace("cim:Equipment.aggregate", &assign_Equipment_aggregate); } void Equipment::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Equipment.EquipmentContainer"), &assign_Equipment_EquipmentContainer)); - assign_map.insert(std::make_pair(std::string("cim:Equipment.OperationalLimitSet"), &assign_Equipment_OperationalLimitSet)); + assign_map.emplace("cim:Equipment.EquipmentContainer", &assign_Equipment_EquipmentContainer); + assign_map.emplace("cim:Equipment.OperationalLimitSet", &assign_Equipment_OperationalLimitSet); } void Equipment::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/Equipment.hpp b/CGMES_2.4.15_16FEB2016/Equipment.hpp index 9570e3b18..7a818843f 100644 --- a/CGMES_2.4.15_16FEB2016/Equipment.hpp +++ b/CGMES_2.4.15_16FEB2016/Equipment.hpp @@ -19,9 +19,7 @@ namespace CIMPP class EquipmentContainer; class OperationalLimitSet; - /* - The parts of a power system that are physical devices, electronic or mechanical. - */ + /** \brief The parts of a power system that are physical devices, electronic or mechanical. */ class Equipment : public PowerSystemResource { public: @@ -29,9 +27,14 @@ namespace CIMPP Equipment(); ~Equipment() override; - CIMPP::EquipmentContainer* EquipmentContainer; /* Container of this equipment. Default: 0 */ - std::list OperationalLimitSet; /* The operational limit sets associated with this equipment. Default: 0 */ - CIMPP::Boolean aggregate; /* The single instance of equipment represents multiple pieces of equipment that have been modeled together as an aggregate. Examples would be power transformers or synchronous machines operating in parallel modeled as a single aggregate power transformer or aggregate synchronous machine. This is not to be used to indicate equipment that is part of a group of interdependent equipment produced by a network production program. Default: false */ + /** \brief Container of this equipment. Default: 0 */ + CIMPP::EquipmentContainer* EquipmentContainer; + + /** \brief The operational limit sets associated with this equipment. Default: 0 */ + std::list OperationalLimitSet; + + /** \brief The single instance of equipment represents multiple pieces of equipment that have been modeled together as an aggregate. Examples would be power transformers or synchronous machines operating in parallel modeled as a single aggregate power transformer or aggregate synchronous machine. This is not to be used to indicate equipment that is part of a group of interdependent equipment produced by a network production program. Default: false */ + CIMPP::Boolean aggregate; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/EquipmentBoundaryVersion.cpp b/CGMES_2.4.15_16FEB2016/EquipmentBoundaryVersion.cpp index 50f212fdc..93b5017ab 100644 --- a/CGMES_2.4.15_16FEB2016/EquipmentBoundaryVersion.cpp +++ b/CGMES_2.4.15_16FEB2016/EquipmentBoundaryVersion.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "String.hpp" -#include "String.hpp" -#include "Date.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -EquipmentBoundaryVersion::EquipmentBoundaryVersion() {}; -EquipmentBoundaryVersion::~EquipmentBoundaryVersion() {}; +EquipmentBoundaryVersion::EquipmentBoundaryVersion() {} +EquipmentBoundaryVersion::~EquipmentBoundaryVersion() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ EquipmentBoundaryVersion::getPossibleProfilesForAttributes() const return map; } - -bool assign_EquipmentBoundaryVersion_baseUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentBoundaryVersion_baseUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentBoundaryVersion_baseURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentBoundaryVersion_baseURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentBoundaryVersion_date(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentBoundaryVersion_date(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->date = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentBoundaryVersion_differenceModelURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentBoundaryVersion_differenceModelURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->differenceModelURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentBoundaryVersion_entsoeUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentBoundaryVersion_entsoeUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentBoundaryVersion_entsoeURIcore(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentBoundaryVersion_entsoeURIcore(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeURIcore = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentBoundaryVersion_entsoeURIoperation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentBoundaryVersion_entsoeURIoperation(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeURIoperation = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentBoundaryVersion_modelDescriptionURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentBoundaryVersion_modelDescriptionURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->modelDescriptionURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentBoundaryVersion_namespaceRDF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentBoundaryVersion_namespaceRDF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceRDF = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentBoundaryVersion_namespaceUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentBoundaryVersion_namespaceUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentBoundaryVersion_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentBoundaryVersion_shortName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->shortName = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_EquipmentBoundaryVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseUML; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_EquipmentBoundaryVersion_baseUML(const BaseClass* BaseClass_ptr1, std:: bool get_EquipmentBoundaryVersion_baseURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseURI; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_EquipmentBoundaryVersion_baseURI(const BaseClass* BaseClass_ptr1, std:: bool get_EquipmentBoundaryVersion_date(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->date; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_EquipmentBoundaryVersion_date(const BaseClass* BaseClass_ptr1, std::str bool get_EquipmentBoundaryVersion_differenceModelURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->differenceModelURI; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_EquipmentBoundaryVersion_differenceModelURI(const BaseClass* BaseClass_ bool get_EquipmentBoundaryVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeUML; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_EquipmentBoundaryVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std bool get_EquipmentBoundaryVersion_entsoeURIcore(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeURIcore; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_EquipmentBoundaryVersion_entsoeURIcore(const BaseClass* BaseClass_ptr1, bool get_EquipmentBoundaryVersion_entsoeURIoperation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeURIoperation; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_EquipmentBoundaryVersion_entsoeURIoperation(const BaseClass* BaseClass_ bool get_EquipmentBoundaryVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->modelDescriptionURI; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_EquipmentBoundaryVersion_modelDescriptionURI(const BaseClass* BaseClass bool get_EquipmentBoundaryVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceRDF; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_EquipmentBoundaryVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, bool get_EquipmentBoundaryVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceUML; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_EquipmentBoundaryVersion_namespaceUML(const BaseClass* BaseClass_ptr1, bool get_EquipmentBoundaryVersion_shortName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortName; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_EquipmentBoundaryVersion_shortName(const BaseClass* BaseClass_ptr1, std return false; } - - const char EquipmentBoundaryVersion::debugName[] = "EquipmentBoundaryVersion"; const char* EquipmentBoundaryVersion::debugString() const { @@ -370,22 +376,22 @@ const char* EquipmentBoundaryVersion::debugString() const void EquipmentBoundaryVersion::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EquipmentBoundaryVersion"), &EquipmentBoundaryVersion_factory)); + factory_map.emplace("cim:EquipmentBoundaryVersion", &EquipmentBoundaryVersion_factory); } void EquipmentBoundaryVersion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EquipmentBoundaryVersion.baseUML"), &assign_EquipmentBoundaryVersion_baseUML)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentBoundaryVersion.baseURI"), &assign_EquipmentBoundaryVersion_baseURI)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentBoundaryVersion.date"), &assign_EquipmentBoundaryVersion_date)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentBoundaryVersion.differenceModelURI"), &assign_EquipmentBoundaryVersion_differenceModelURI)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentBoundaryVersion.entsoeUML"), &assign_EquipmentBoundaryVersion_entsoeUML)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentBoundaryVersion.entsoeURIcore"), &assign_EquipmentBoundaryVersion_entsoeURIcore)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentBoundaryVersion.entsoeURIoperation"), &assign_EquipmentBoundaryVersion_entsoeURIoperation)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentBoundaryVersion.modelDescriptionURI"), &assign_EquipmentBoundaryVersion_modelDescriptionURI)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentBoundaryVersion.namespaceRDF"), &assign_EquipmentBoundaryVersion_namespaceRDF)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentBoundaryVersion.namespaceUML"), &assign_EquipmentBoundaryVersion_namespaceUML)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentBoundaryVersion.shortName"), &assign_EquipmentBoundaryVersion_shortName)); + assign_map.emplace("cim:EquipmentBoundaryVersion.baseUML", &assign_EquipmentBoundaryVersion_baseUML); + assign_map.emplace("cim:EquipmentBoundaryVersion.baseURI", &assign_EquipmentBoundaryVersion_baseURI); + assign_map.emplace("cim:EquipmentBoundaryVersion.date", &assign_EquipmentBoundaryVersion_date); + assign_map.emplace("cim:EquipmentBoundaryVersion.differenceModelURI", &assign_EquipmentBoundaryVersion_differenceModelURI); + assign_map.emplace("cim:EquipmentBoundaryVersion.entsoeUML", &assign_EquipmentBoundaryVersion_entsoeUML); + assign_map.emplace("cim:EquipmentBoundaryVersion.entsoeURIcore", &assign_EquipmentBoundaryVersion_entsoeURIcore); + assign_map.emplace("cim:EquipmentBoundaryVersion.entsoeURIoperation", &assign_EquipmentBoundaryVersion_entsoeURIoperation); + assign_map.emplace("cim:EquipmentBoundaryVersion.modelDescriptionURI", &assign_EquipmentBoundaryVersion_modelDescriptionURI); + assign_map.emplace("cim:EquipmentBoundaryVersion.namespaceRDF", &assign_EquipmentBoundaryVersion_namespaceRDF); + assign_map.emplace("cim:EquipmentBoundaryVersion.namespaceUML", &assign_EquipmentBoundaryVersion_namespaceUML); + assign_map.emplace("cim:EquipmentBoundaryVersion.shortName", &assign_EquipmentBoundaryVersion_shortName); } void EquipmentBoundaryVersion::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/EquipmentBoundaryVersion.hpp b/CGMES_2.4.15_16FEB2016/EquipmentBoundaryVersion.hpp index b7339e8e3..7dce745e6 100644 --- a/CGMES_2.4.15_16FEB2016/EquipmentBoundaryVersion.hpp +++ b/CGMES_2.4.15_16FEB2016/EquipmentBoundaryVersion.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Profile version details. - */ + /** \brief Profile version details. */ class EquipmentBoundaryVersion : public BaseClass { public: @@ -28,17 +26,38 @@ namespace CIMPP EquipmentBoundaryVersion(); ~EquipmentBoundaryVersion() override; - CIMPP::String baseUML; /* Base UML provided by CIM model manager. Default: '' */ - CIMPP::String baseURI; /* Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ - CIMPP::Date date; /* Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ - CIMPP::String differenceModelURI; /* Difference model URI defined by IEC 61970-552. Default: '' */ - CIMPP::String entsoeUML; /* UML provided by ENTSO-E. Default: '' */ - CIMPP::String entsoeURIcore; /* Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/EquipmentBoundary/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ - CIMPP::String entsoeURIoperation; /* Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/EquipmentBoundaryOperation/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ - CIMPP::String modelDescriptionURI; /* Model Description URI defined by IEC 61970-552. Default: '' */ - CIMPP::String namespaceRDF; /* RDF namespace. Default: '' */ - CIMPP::String namespaceUML; /* CIM UML namespace. Default: '' */ - CIMPP::String shortName; /* The short name of the profile used in profile documentation. Default: '' */ + /** \brief Base UML provided by CIM model manager. Default: '' */ + CIMPP::String baseUML; + + /** \brief Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ + CIMPP::String baseURI; + + /** \brief Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ + CIMPP::Date date; + + /** \brief Difference model URI defined by IEC 61970-552. Default: '' */ + CIMPP::String differenceModelURI; + + /** \brief UML provided by ENTSO-E. Default: '' */ + CIMPP::String entsoeUML; + + /** \brief Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/EquipmentBoundary/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ + CIMPP::String entsoeURIcore; + + /** \brief Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/EquipmentBoundaryOperation/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ + CIMPP::String entsoeURIoperation; + + /** \brief Model Description URI defined by IEC 61970-552. Default: '' */ + CIMPP::String modelDescriptionURI; + + /** \brief RDF namespace. Default: '' */ + CIMPP::String namespaceRDF; + + /** \brief CIM UML namespace. Default: '' */ + CIMPP::String namespaceUML; + + /** \brief The short name of the profile used in profile documentation. Default: '' */ + CIMPP::String shortName; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/EquipmentContainer.cpp b/CGMES_2.4.15_16FEB2016/EquipmentContainer.cpp index fc74206b6..d7b51080d 100644 --- a/CGMES_2.4.15_16FEB2016/EquipmentContainer.cpp +++ b/CGMES_2.4.15_16FEB2016/EquipmentContainer.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -EquipmentContainer::EquipmentContainer() {}; -EquipmentContainer::~EquipmentContainer() {}; +EquipmentContainer::EquipmentContainer() {} +EquipmentContainer::~EquipmentContainer() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ EquipmentContainer::getPossibleProfilesForAttributes() const return map; } - - bool assign_Equipment_EquipmentContainer(BaseClass*, BaseClass*); bool assign_EquipmentContainer_Equipments(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,7 +59,6 @@ bool assign_EquipmentContainer_Equipments(BaseClass* BaseClass_ptr1, BaseClass* } - const char EquipmentContainer::debugName[] = "EquipmentContainer"; const char* EquipmentContainer::debugString() const { @@ -70,7 +67,7 @@ const char* EquipmentContainer::debugString() const void EquipmentContainer::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EquipmentContainer"), &EquipmentContainer_factory)); + factory_map.emplace("cim:EquipmentContainer", &EquipmentContainer_factory); } void EquipmentContainer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -79,7 +76,7 @@ void EquipmentContainer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EquipmentContainer.Equipments"), &assign_EquipmentContainer_Equipments)); + assign_map.emplace("cim:EquipmentContainer.Equipments", &assign_EquipmentContainer_Equipments); } void EquipmentContainer::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/EquipmentContainer.hpp b/CGMES_2.4.15_16FEB2016/EquipmentContainer.hpp index ff3a58ec1..5a76e1707 100644 --- a/CGMES_2.4.15_16FEB2016/EquipmentContainer.hpp +++ b/CGMES_2.4.15_16FEB2016/EquipmentContainer.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class Equipment; - /* - A modeling construct to provide a root class for containing equipment. - */ + /** \brief A modeling construct to provide a root class for containing equipment. */ class EquipmentContainer : public ConnectivityNodeContainer { public: @@ -27,7 +25,8 @@ namespace CIMPP EquipmentContainer(); ~EquipmentContainer() override; - std::list Equipments; /* Contained equipment. Default: 0 */ + /** \brief Contained equipment. Default: 0 */ + std::list Equipments; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/EquipmentVersion.cpp b/CGMES_2.4.15_16FEB2016/EquipmentVersion.cpp index 0544887c3..e02b7f229 100644 --- a/CGMES_2.4.15_16FEB2016/EquipmentVersion.cpp +++ b/CGMES_2.4.15_16FEB2016/EquipmentVersion.cpp @@ -8,25 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "Date.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -EquipmentVersion::EquipmentVersion() {}; -EquipmentVersion::~EquipmentVersion() {}; +EquipmentVersion::EquipmentVersion() {} +EquipmentVersion::~EquipmentVersion() {} static const std::list PossibleProfilesForClass = { @@ -66,194 +52,206 @@ EquipmentVersion::getPossibleProfilesForAttributes() const return map; } - -bool assign_EquipmentVersion_baseUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_baseUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_baseURIcore(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_baseURIcore(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseURIcore = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_baseURIoperation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_baseURIoperation(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseURIoperation = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_baseURIshortCircuit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_baseURIshortCircuit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseURIshortCircuit = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_date(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_date(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->date = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_differenceModelURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_differenceModelURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->differenceModelURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_entsoeUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_entsoeUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_entsoeURIcore(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_entsoeURIcore(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeURIcore = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_entsoeURIoperation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_entsoeURIoperation(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeURIoperation = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_entsoeURIshortCircuit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_entsoeURIshortCircuit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeURIshortCircuit = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_modelDescriptionURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_modelDescriptionURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->modelDescriptionURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_namespaceRDF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_namespaceRDF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceRDF = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_namespaceUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_namespaceUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_shortName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->shortName = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_EquipmentVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseUML; if (!buffer.str().empty()) @@ -267,7 +265,8 @@ bool get_EquipmentVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stringst bool get_EquipmentVersion_baseURIcore(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseURIcore; if (!buffer.str().empty()) @@ -281,7 +280,8 @@ bool get_EquipmentVersion_baseURIcore(const BaseClass* BaseClass_ptr1, std::stri bool get_EquipmentVersion_baseURIoperation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseURIoperation; if (!buffer.str().empty()) @@ -295,7 +295,8 @@ bool get_EquipmentVersion_baseURIoperation(const BaseClass* BaseClass_ptr1, std: bool get_EquipmentVersion_baseURIshortCircuit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseURIshortCircuit; if (!buffer.str().empty()) @@ -309,7 +310,8 @@ bool get_EquipmentVersion_baseURIshortCircuit(const BaseClass* BaseClass_ptr1, s bool get_EquipmentVersion_date(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->date; if (!buffer.str().empty()) @@ -323,7 +325,8 @@ bool get_EquipmentVersion_date(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_EquipmentVersion_differenceModelURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->differenceModelURI; if (!buffer.str().empty()) @@ -337,7 +340,8 @@ bool get_EquipmentVersion_differenceModelURI(const BaseClass* BaseClass_ptr1, st bool get_EquipmentVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeUML; if (!buffer.str().empty()) @@ -351,7 +355,8 @@ bool get_EquipmentVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::string bool get_EquipmentVersion_entsoeURIcore(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeURIcore; if (!buffer.str().empty()) @@ -365,7 +370,8 @@ bool get_EquipmentVersion_entsoeURIcore(const BaseClass* BaseClass_ptr1, std::st bool get_EquipmentVersion_entsoeURIoperation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeURIoperation; if (!buffer.str().empty()) @@ -379,7 +385,8 @@ bool get_EquipmentVersion_entsoeURIoperation(const BaseClass* BaseClass_ptr1, st bool get_EquipmentVersion_entsoeURIshortCircuit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeURIshortCircuit; if (!buffer.str().empty()) @@ -393,7 +400,8 @@ bool get_EquipmentVersion_entsoeURIshortCircuit(const BaseClass* BaseClass_ptr1, bool get_EquipmentVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->modelDescriptionURI; if (!buffer.str().empty()) @@ -407,7 +415,8 @@ bool get_EquipmentVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr1, s bool get_EquipmentVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceRDF; if (!buffer.str().empty()) @@ -421,7 +430,8 @@ bool get_EquipmentVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std::str bool get_EquipmentVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceUML; if (!buffer.str().empty()) @@ -435,7 +445,8 @@ bool get_EquipmentVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std::str bool get_EquipmentVersion_shortName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortName; if (!buffer.str().empty()) @@ -447,8 +458,6 @@ bool get_EquipmentVersion_shortName(const BaseClass* BaseClass_ptr1, std::string return false; } - - const char EquipmentVersion::debugName[] = "EquipmentVersion"; const char* EquipmentVersion::debugString() const { @@ -457,25 +466,25 @@ const char* EquipmentVersion::debugString() const void EquipmentVersion::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EquipmentVersion"), &EquipmentVersion_factory)); + factory_map.emplace("cim:EquipmentVersion", &EquipmentVersion_factory); } void EquipmentVersion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.baseUML"), &assign_EquipmentVersion_baseUML)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.baseURIcore"), &assign_EquipmentVersion_baseURIcore)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.baseURIoperation"), &assign_EquipmentVersion_baseURIoperation)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.baseURIshortCircuit"), &assign_EquipmentVersion_baseURIshortCircuit)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.date"), &assign_EquipmentVersion_date)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.differenceModelURI"), &assign_EquipmentVersion_differenceModelURI)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.entsoeUML"), &assign_EquipmentVersion_entsoeUML)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.entsoeURIcore"), &assign_EquipmentVersion_entsoeURIcore)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.entsoeURIoperation"), &assign_EquipmentVersion_entsoeURIoperation)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.entsoeURIshortCircuit"), &assign_EquipmentVersion_entsoeURIshortCircuit)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.modelDescriptionURI"), &assign_EquipmentVersion_modelDescriptionURI)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.namespaceRDF"), &assign_EquipmentVersion_namespaceRDF)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.namespaceUML"), &assign_EquipmentVersion_namespaceUML)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.shortName"), &assign_EquipmentVersion_shortName)); + assign_map.emplace("cim:EquipmentVersion.baseUML", &assign_EquipmentVersion_baseUML); + assign_map.emplace("cim:EquipmentVersion.baseURIcore", &assign_EquipmentVersion_baseURIcore); + assign_map.emplace("cim:EquipmentVersion.baseURIoperation", &assign_EquipmentVersion_baseURIoperation); + assign_map.emplace("cim:EquipmentVersion.baseURIshortCircuit", &assign_EquipmentVersion_baseURIshortCircuit); + assign_map.emplace("cim:EquipmentVersion.date", &assign_EquipmentVersion_date); + assign_map.emplace("cim:EquipmentVersion.differenceModelURI", &assign_EquipmentVersion_differenceModelURI); + assign_map.emplace("cim:EquipmentVersion.entsoeUML", &assign_EquipmentVersion_entsoeUML); + assign_map.emplace("cim:EquipmentVersion.entsoeURIcore", &assign_EquipmentVersion_entsoeURIcore); + assign_map.emplace("cim:EquipmentVersion.entsoeURIoperation", &assign_EquipmentVersion_entsoeURIoperation); + assign_map.emplace("cim:EquipmentVersion.entsoeURIshortCircuit", &assign_EquipmentVersion_entsoeURIshortCircuit); + assign_map.emplace("cim:EquipmentVersion.modelDescriptionURI", &assign_EquipmentVersion_modelDescriptionURI); + assign_map.emplace("cim:EquipmentVersion.namespaceRDF", &assign_EquipmentVersion_namespaceRDF); + assign_map.emplace("cim:EquipmentVersion.namespaceUML", &assign_EquipmentVersion_namespaceUML); + assign_map.emplace("cim:EquipmentVersion.shortName", &assign_EquipmentVersion_shortName); } void EquipmentVersion::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/EquipmentVersion.hpp b/CGMES_2.4.15_16FEB2016/EquipmentVersion.hpp index 10e333e51..3de80068d 100644 --- a/CGMES_2.4.15_16FEB2016/EquipmentVersion.hpp +++ b/CGMES_2.4.15_16FEB2016/EquipmentVersion.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Version details. - */ + /** \brief Version details. */ class EquipmentVersion : public BaseClass { public: @@ -28,20 +26,47 @@ namespace CIMPP EquipmentVersion(); ~EquipmentVersion() override; - CIMPP::String baseUML; /* Base UML provided by CIM model manager. Default: '' */ - CIMPP::String baseURIcore; /* Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ - CIMPP::String baseURIoperation; /* Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ - CIMPP::String baseURIshortCircuit; /* Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ - CIMPP::Date date; /* Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ - CIMPP::String differenceModelURI; /* Difference model URI defined by IEC 61970-552. Default: '' */ - CIMPP::String entsoeUML; /* UML provided by ENTSO-E. Default: '' */ - CIMPP::String entsoeURIcore; /* Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/EquipmentCore/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ - CIMPP::String entsoeURIoperation; /* Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/EquipmentOperation/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ - CIMPP::String entsoeURIshortCircuit; /* Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/EquipmentShortCircuit/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ - CIMPP::String modelDescriptionURI; /* Model Description URI defined by IEC 61970-552. Default: '' */ - CIMPP::String namespaceRDF; /* RDF namespace. Default: '' */ - CIMPP::String namespaceUML; /* CIM UML namespace. Default: '' */ - CIMPP::String shortName; /* The short name of the profile used in profile documentation. Default: '' */ + /** \brief Base UML provided by CIM model manager. Default: '' */ + CIMPP::String baseUML; + + /** \brief Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ + CIMPP::String baseURIcore; + + /** \brief Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ + CIMPP::String baseURIoperation; + + /** \brief Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ + CIMPP::String baseURIshortCircuit; + + /** \brief Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ + CIMPP::Date date; + + /** \brief Difference model URI defined by IEC 61970-552. Default: '' */ + CIMPP::String differenceModelURI; + + /** \brief UML provided by ENTSO-E. Default: '' */ + CIMPP::String entsoeUML; + + /** \brief Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/EquipmentCore/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ + CIMPP::String entsoeURIcore; + + /** \brief Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/EquipmentOperation/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ + CIMPP::String entsoeURIoperation; + + /** \brief Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/EquipmentShortCircuit/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ + CIMPP::String entsoeURIshortCircuit; + + /** \brief Model Description URI defined by IEC 61970-552. Default: '' */ + CIMPP::String modelDescriptionURI; + + /** \brief RDF namespace. Default: '' */ + CIMPP::String namespaceRDF; + + /** \brief CIM UML namespace. Default: '' */ + CIMPP::String namespaceUML; + + /** \brief The short name of the profile used in profile documentation. Default: '' */ + CIMPP::String shortName; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/EquivalentBranch.cpp b/CGMES_2.4.15_16FEB2016/EquivalentBranch.cpp index d45842e8d..466b35022 100644 --- a/CGMES_2.4.15_16FEB2016/EquivalentBranch.cpp +++ b/CGMES_2.4.15_16FEB2016/EquivalentBranch.cpp @@ -8,27 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -EquivalentBranch::EquivalentBranch() {}; -EquivalentBranch::~EquivalentBranch() {}; +EquivalentBranch::EquivalentBranch() {} +EquivalentBranch::~EquivalentBranch() {} static const std::list PossibleProfilesForClass = { @@ -70,220 +54,234 @@ EquivalentBranch::getPossibleProfilesForAttributes() const return map; } - -bool assign_EquivalentBranch_negativeR12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_negativeR12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->negativeR12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_negativeR21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_negativeR21(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->negativeR21; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_negativeX12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_negativeX12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->negativeX12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_negativeX21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_negativeX21(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->negativeX21; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_positiveR12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_positiveR12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->positiveR12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_positiveR21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_positiveR21(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->positiveR21; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_positiveX12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_positiveX12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->positiveX12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_positiveX21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_positiveX21(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->positiveX21; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_r21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_r21(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r21; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_x(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_x21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_x21(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x21; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_zeroR12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_zeroR12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->zeroR12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_zeroR21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_zeroR21(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->zeroR21; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_zeroX12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_zeroX12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->zeroX12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_zeroX21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_zeroX21(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->zeroX21; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_EquivalentBranch_negativeR12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->negativeR12; if (!buffer.str().empty()) @@ -297,7 +295,8 @@ bool get_EquivalentBranch_negativeR12(const BaseClass* BaseClass_ptr1, std::stri bool get_EquivalentBranch_negativeR21(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->negativeR21; if (!buffer.str().empty()) @@ -311,7 +310,8 @@ bool get_EquivalentBranch_negativeR21(const BaseClass* BaseClass_ptr1, std::stri bool get_EquivalentBranch_negativeX12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->negativeX12; if (!buffer.str().empty()) @@ -325,7 +325,8 @@ bool get_EquivalentBranch_negativeX12(const BaseClass* BaseClass_ptr1, std::stri bool get_EquivalentBranch_negativeX21(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->negativeX21; if (!buffer.str().empty()) @@ -339,7 +340,8 @@ bool get_EquivalentBranch_negativeX21(const BaseClass* BaseClass_ptr1, std::stri bool get_EquivalentBranch_positiveR12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->positiveR12; if (!buffer.str().empty()) @@ -353,7 +355,8 @@ bool get_EquivalentBranch_positiveR12(const BaseClass* BaseClass_ptr1, std::stri bool get_EquivalentBranch_positiveR21(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->positiveR21; if (!buffer.str().empty()) @@ -367,7 +370,8 @@ bool get_EquivalentBranch_positiveR21(const BaseClass* BaseClass_ptr1, std::stri bool get_EquivalentBranch_positiveX12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->positiveX12; if (!buffer.str().empty()) @@ -381,7 +385,8 @@ bool get_EquivalentBranch_positiveX12(const BaseClass* BaseClass_ptr1, std::stri bool get_EquivalentBranch_positiveX21(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->positiveX21; if (!buffer.str().empty()) @@ -395,7 +400,8 @@ bool get_EquivalentBranch_positiveX21(const BaseClass* BaseClass_ptr1, std::stri bool get_EquivalentBranch_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -409,7 +415,8 @@ bool get_EquivalentBranch_r(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_EquivalentBranch_r21(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r21; if (!buffer.str().empty()) @@ -423,7 +430,8 @@ bool get_EquivalentBranch_r21(const BaseClass* BaseClass_ptr1, std::stringstream bool get_EquivalentBranch_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x; if (!buffer.str().empty()) @@ -437,7 +445,8 @@ bool get_EquivalentBranch_x(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_EquivalentBranch_x21(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x21; if (!buffer.str().empty()) @@ -451,7 +460,8 @@ bool get_EquivalentBranch_x21(const BaseClass* BaseClass_ptr1, std::stringstream bool get_EquivalentBranch_zeroR12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->zeroR12; if (!buffer.str().empty()) @@ -465,7 +475,8 @@ bool get_EquivalentBranch_zeroR12(const BaseClass* BaseClass_ptr1, std::stringst bool get_EquivalentBranch_zeroR21(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->zeroR21; if (!buffer.str().empty()) @@ -479,7 +490,8 @@ bool get_EquivalentBranch_zeroR21(const BaseClass* BaseClass_ptr1, std::stringst bool get_EquivalentBranch_zeroX12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->zeroX12; if (!buffer.str().empty()) @@ -493,7 +505,8 @@ bool get_EquivalentBranch_zeroX12(const BaseClass* BaseClass_ptr1, std::stringst bool get_EquivalentBranch_zeroX21(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->zeroX21; if (!buffer.str().empty()) @@ -505,8 +518,6 @@ bool get_EquivalentBranch_zeroX21(const BaseClass* BaseClass_ptr1, std::stringst return false; } - - const char EquivalentBranch::debugName[] = "EquivalentBranch"; const char* EquivalentBranch::debugString() const { @@ -515,27 +526,27 @@ const char* EquivalentBranch::debugString() const void EquivalentBranch::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EquivalentBranch"), &EquivalentBranch_factory)); + factory_map.emplace("cim:EquivalentBranch", &EquivalentBranch_factory); } void EquivalentBranch::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.negativeR12"), &assign_EquivalentBranch_negativeR12)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.negativeR21"), &assign_EquivalentBranch_negativeR21)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.negativeX12"), &assign_EquivalentBranch_negativeX12)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.negativeX21"), &assign_EquivalentBranch_negativeX21)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.positiveR12"), &assign_EquivalentBranch_positiveR12)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.positiveR21"), &assign_EquivalentBranch_positiveR21)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.positiveX12"), &assign_EquivalentBranch_positiveX12)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.positiveX21"), &assign_EquivalentBranch_positiveX21)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.r"), &assign_EquivalentBranch_r)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.r21"), &assign_EquivalentBranch_r21)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.x"), &assign_EquivalentBranch_x)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.x21"), &assign_EquivalentBranch_x21)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.zeroR12"), &assign_EquivalentBranch_zeroR12)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.zeroR21"), &assign_EquivalentBranch_zeroR21)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.zeroX12"), &assign_EquivalentBranch_zeroX12)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.zeroX21"), &assign_EquivalentBranch_zeroX21)); + assign_map.emplace("cim:EquivalentBranch.negativeR12", &assign_EquivalentBranch_negativeR12); + assign_map.emplace("cim:EquivalentBranch.negativeR21", &assign_EquivalentBranch_negativeR21); + assign_map.emplace("cim:EquivalentBranch.negativeX12", &assign_EquivalentBranch_negativeX12); + assign_map.emplace("cim:EquivalentBranch.negativeX21", &assign_EquivalentBranch_negativeX21); + assign_map.emplace("cim:EquivalentBranch.positiveR12", &assign_EquivalentBranch_positiveR12); + assign_map.emplace("cim:EquivalentBranch.positiveR21", &assign_EquivalentBranch_positiveR21); + assign_map.emplace("cim:EquivalentBranch.positiveX12", &assign_EquivalentBranch_positiveX12); + assign_map.emplace("cim:EquivalentBranch.positiveX21", &assign_EquivalentBranch_positiveX21); + assign_map.emplace("cim:EquivalentBranch.r", &assign_EquivalentBranch_r); + assign_map.emplace("cim:EquivalentBranch.r21", &assign_EquivalentBranch_r21); + assign_map.emplace("cim:EquivalentBranch.x", &assign_EquivalentBranch_x); + assign_map.emplace("cim:EquivalentBranch.x21", &assign_EquivalentBranch_x21); + assign_map.emplace("cim:EquivalentBranch.zeroR12", &assign_EquivalentBranch_zeroR12); + assign_map.emplace("cim:EquivalentBranch.zeroR21", &assign_EquivalentBranch_zeroR21); + assign_map.emplace("cim:EquivalentBranch.zeroX12", &assign_EquivalentBranch_zeroX12); + assign_map.emplace("cim:EquivalentBranch.zeroX21", &assign_EquivalentBranch_zeroX21); } void EquivalentBranch::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/EquivalentBranch.hpp b/CGMES_2.4.15_16FEB2016/EquivalentBranch.hpp index d9be97c39..5147c3fd5 100644 --- a/CGMES_2.4.15_16FEB2016/EquivalentBranch.hpp +++ b/CGMES_2.4.15_16FEB2016/EquivalentBranch.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents equivalent branches. - */ + /** \brief The class represents equivalent branches. */ class EquivalentBranch : public EquivalentEquipment { public: @@ -28,22 +26,53 @@ namespace CIMPP EquivalentBranch(); ~EquivalentBranch() override; - CIMPP::Resistance negativeR12; /* Negative sequence series resistance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909 EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ - CIMPP::Resistance negativeR21; /* Negative sequence series resistance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909 EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ - CIMPP::Reactance negativeX12; /* Negative sequence series reactance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ - CIMPP::Reactance negativeX21; /* Negative sequence series reactance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909. Usage: EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ - CIMPP::Resistance positiveR12; /* Positive sequence series resistance from terminal sequence 1 to terminal sequence 2 . Used for short circuit data exchange according to IEC 60909. EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Resistance positiveR21; /* Positive sequence series resistance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909 EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ - CIMPP::Reactance positiveX12; /* Positive sequence series reactance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ - CIMPP::Reactance positiveX21; /* Positive sequence series reactance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ - CIMPP::Resistance r; /* Positive sequence series resistance of the reduced branch. Default: nullptr */ - CIMPP::Resistance r21; /* Resistance from terminal sequence 2 to terminal sequence 1 .Used for steady state power flow. This attribute is optional and represent unbalanced network such as off-nominal phase shifter. If only EquivalentBranch.r is given, then EquivalentBranch.r21 is assumed equal to EquivalentBranch.r. Usage rule : EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Reactance x; /* Positive sequence series reactance of the reduced branch. Default: nullptr */ - CIMPP::Reactance x21; /* Reactance from terminal sequence 2 to terminal sequence 1 .Used for steady state power flow. This attribute is optional and represent unbalanced network such as off-nominal phase shifter. If only EquivalentBranch.x is given, then EquivalentBranch.x21 is assumed equal to EquivalentBranch.x. Usage rule : EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Resistance zeroR12; /* Zero sequence series resistance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909 EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ - CIMPP::Resistance zeroR21; /* Zero sequence series resistance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ - CIMPP::Reactance zeroX12; /* Zero sequence series reactance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ - CIMPP::Reactance zeroX21; /* Zero sequence series reactance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ + /** \brief Negative sequence series resistance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909 EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ + CIMPP::Resistance negativeR12; + + /** \brief Negative sequence series resistance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909 EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ + CIMPP::Resistance negativeR21; + + /** \brief Negative sequence series reactance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ + CIMPP::Reactance negativeX12; + + /** \brief Negative sequence series reactance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909. Usage: EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ + CIMPP::Reactance negativeX21; + + /** \brief Positive sequence series resistance from terminal sequence 1 to terminal sequence 2 . Used for short circuit data exchange according to IEC 60909. EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Resistance positiveR12; + + /** \brief Positive sequence series resistance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909 EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ + CIMPP::Resistance positiveR21; + + /** \brief Positive sequence series reactance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ + CIMPP::Reactance positiveX12; + + /** \brief Positive sequence series reactance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ + CIMPP::Reactance positiveX21; + + /** \brief Positive sequence series resistance of the reduced branch. Default: nullptr */ + CIMPP::Resistance r; + + /** \brief Resistance from terminal sequence 2 to terminal sequence 1 .Used for steady state power flow. This attribute is optional and represent unbalanced network such as off-nominal phase shifter. If only EquivalentBranch.r is given, then EquivalentBranch.r21 is assumed equal to EquivalentBranch.r. Usage rule : EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Resistance r21; + + /** \brief Positive sequence series reactance of the reduced branch. Default: nullptr */ + CIMPP::Reactance x; + + /** \brief Reactance from terminal sequence 2 to terminal sequence 1 .Used for steady state power flow. This attribute is optional and represent unbalanced network such as off-nominal phase shifter. If only EquivalentBranch.x is given, then EquivalentBranch.x21 is assumed equal to EquivalentBranch.x. Usage rule : EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Reactance x21; + + /** \brief Zero sequence series resistance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909 EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ + CIMPP::Resistance zeroR12; + + /** \brief Zero sequence series resistance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ + CIMPP::Resistance zeroR21; + + /** \brief Zero sequence series reactance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ + CIMPP::Reactance zeroX12; + + /** \brief Zero sequence series reactance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ + CIMPP::Reactance zeroX21; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/EquivalentEquipment.cpp b/CGMES_2.4.15_16FEB2016/EquivalentEquipment.cpp index 9d6f69531..a0b317564 100644 --- a/CGMES_2.4.15_16FEB2016/EquivalentEquipment.cpp +++ b/CGMES_2.4.15_16FEB2016/EquivalentEquipment.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -EquivalentEquipment::EquivalentEquipment() : EquivalentNetwork(nullptr) {}; -EquivalentEquipment::~EquivalentEquipment() {}; +EquivalentEquipment::EquivalentEquipment() : EquivalentNetwork(nullptr) {} +EquivalentEquipment::~EquivalentEquipment() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ EquivalentEquipment::getPossibleProfilesForAttributes() const return map; } - - bool assign_EquivalentNetwork_EquivalentEquipments(BaseClass*, BaseClass*); bool assign_EquivalentEquipment_EquivalentNetwork(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,10 +58,10 @@ bool assign_EquivalentEquipment_EquivalentNetwork(BaseClass* BaseClass_ptr1, Bas return false; } - bool get_EquivalentEquipment_EquivalentNetwork(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const EquivalentEquipment* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentEquipment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->EquivalentNetwork != 0) { @@ -74,7 +72,6 @@ bool get_EquivalentEquipment_EquivalentNetwork(const BaseClass* BaseClass_ptr1, return false; } - const char EquivalentEquipment::debugName[] = "EquivalentEquipment"; const char* EquivalentEquipment::debugString() const { @@ -83,7 +80,7 @@ const char* EquivalentEquipment::debugString() const void EquivalentEquipment::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EquivalentEquipment"), &EquivalentEquipment_factory)); + factory_map.emplace("cim:EquivalentEquipment", &EquivalentEquipment_factory); } void EquivalentEquipment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -92,7 +89,7 @@ void EquivalentEquipment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EquivalentEquipment.EquivalentNetwork"), &assign_EquivalentEquipment_EquivalentNetwork)); + assign_map.emplace("cim:EquivalentEquipment.EquivalentNetwork", &assign_EquivalentEquipment_EquivalentNetwork); } void EquivalentEquipment::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/EquivalentEquipment.hpp b/CGMES_2.4.15_16FEB2016/EquivalentEquipment.hpp index 7d0b8a0f3..3e375293f 100644 --- a/CGMES_2.4.15_16FEB2016/EquivalentEquipment.hpp +++ b/CGMES_2.4.15_16FEB2016/EquivalentEquipment.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class EquivalentNetwork; - /* - The class represents equivalent objects that are the result of a network reduction. The class is the base for equivalent objects of different types. - */ + /** \brief The class represents equivalent objects that are the result of a network reduction. The class is the base for equivalent objects of different types. */ class EquivalentEquipment : public ConductingEquipment { public: @@ -27,7 +25,8 @@ namespace CIMPP EquivalentEquipment(); ~EquivalentEquipment() override; - CIMPP::EquivalentNetwork* EquivalentNetwork; /* The associated reduced equivalents. Default: 0 */ + /** \brief The associated reduced equivalents. Default: 0 */ + CIMPP::EquivalentNetwork* EquivalentNetwork; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/EquivalentInjection.cpp b/CGMES_2.4.15_16FEB2016/EquivalentInjection.cpp index 3cd0ceefc..5b0b543b1 100644 --- a/CGMES_2.4.15_16FEB2016/EquivalentInjection.cpp +++ b/CGMES_2.4.15_16FEB2016/EquivalentInjection.cpp @@ -9,26 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ReactiveCapabilityCurve.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Voltage.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -EquivalentInjection::EquivalentInjection() : ReactiveCapabilityCurve(nullptr) {}; -EquivalentInjection::~EquivalentInjection() {}; +EquivalentInjection::EquivalentInjection() : ReactiveCapabilityCurve(nullptr) {} +EquivalentInjection::~EquivalentInjection() {} static const std::list PossibleProfilesForClass = { @@ -71,223 +56,251 @@ EquivalentInjection::getPossibleProfilesForAttributes() const return map; } +bool assign_ReactiveCapabilityCurve_EquivalentInjection(BaseClass*, BaseClass*); +bool assign_EquivalentInjection_ReactiveCapabilityCurve(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + ReactiveCapabilityCurve* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ReactiveCapabilityCurve != element2) + { + element->ReactiveCapabilityCurve = element2; + return assign_ReactiveCapabilityCurve_EquivalentInjection(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_EquivalentInjection_maxP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_maxP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_maxQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_maxQ(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxQ; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_minP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_minP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_minQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_minQ(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minQ; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_p(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_r0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_r2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_r2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_regulationCapability(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_regulationCapability(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->regulationCapability; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_regulationStatus(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_regulationStatus(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->regulationStatus; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_regulationTarget(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_regulationTarget(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->regulationTarget; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_x(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_x0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_x2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_x2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_ReactiveCapabilityCurve_EquivalentInjection(BaseClass*, BaseClass*); -bool assign_EquivalentInjection_ReactiveCapabilityCurve(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_EquivalentInjection_ReactiveCapabilityCurve(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); - ReactiveCapabilityCurve* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->ReactiveCapabilityCurve != element2) + if (element->ReactiveCapabilityCurve != 0) { - element->ReactiveCapabilityCurve = element2; - return assign_ReactiveCapabilityCurve_EquivalentInjection(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->ReactiveCapabilityCurve); + return true; } - return true; } return false; } bool get_EquivalentInjection_maxP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxP; if (!buffer.str().empty()) @@ -301,7 +314,8 @@ bool get_EquivalentInjection_maxP(const BaseClass* BaseClass_ptr1, std::stringst bool get_EquivalentInjection_maxQ(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxQ; if (!buffer.str().empty()) @@ -315,7 +329,8 @@ bool get_EquivalentInjection_maxQ(const BaseClass* BaseClass_ptr1, std::stringst bool get_EquivalentInjection_minP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minP; if (!buffer.str().empty()) @@ -329,7 +344,8 @@ bool get_EquivalentInjection_minP(const BaseClass* BaseClass_ptr1, std::stringst bool get_EquivalentInjection_minQ(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minQ; if (!buffer.str().empty()) @@ -343,7 +359,8 @@ bool get_EquivalentInjection_minQ(const BaseClass* BaseClass_ptr1, std::stringst bool get_EquivalentInjection_p(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p; if (!buffer.str().empty()) @@ -357,7 +374,8 @@ bool get_EquivalentInjection_p(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_EquivalentInjection_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q; if (!buffer.str().empty()) @@ -371,7 +389,8 @@ bool get_EquivalentInjection_q(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_EquivalentInjection_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -385,7 +404,8 @@ bool get_EquivalentInjection_r(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_EquivalentInjection_r0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r0; if (!buffer.str().empty()) @@ -399,7 +419,8 @@ bool get_EquivalentInjection_r0(const BaseClass* BaseClass_ptr1, std::stringstre bool get_EquivalentInjection_r2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r2; if (!buffer.str().empty()) @@ -413,7 +434,8 @@ bool get_EquivalentInjection_r2(const BaseClass* BaseClass_ptr1, std::stringstre bool get_EquivalentInjection_regulationCapability(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->regulationCapability; if (!buffer.str().empty()) @@ -427,7 +449,8 @@ bool get_EquivalentInjection_regulationCapability(const BaseClass* BaseClass_ptr bool get_EquivalentInjection_regulationStatus(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->regulationStatus; if (!buffer.str().empty()) @@ -441,7 +464,8 @@ bool get_EquivalentInjection_regulationStatus(const BaseClass* BaseClass_ptr1, s bool get_EquivalentInjection_regulationTarget(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->regulationTarget; if (!buffer.str().empty()) @@ -455,7 +479,8 @@ bool get_EquivalentInjection_regulationTarget(const BaseClass* BaseClass_ptr1, s bool get_EquivalentInjection_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x; if (!buffer.str().empty()) @@ -469,7 +494,8 @@ bool get_EquivalentInjection_x(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_EquivalentInjection_x0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x0; if (!buffer.str().empty()) @@ -483,7 +509,8 @@ bool get_EquivalentInjection_x0(const BaseClass* BaseClass_ptr1, std::stringstre bool get_EquivalentInjection_x2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x2; if (!buffer.str().empty()) @@ -495,21 +522,6 @@ bool get_EquivalentInjection_x2(const BaseClass* BaseClass_ptr1, std::stringstre return false; } - -bool get_EquivalentInjection_ReactiveCapabilityCurve(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->ReactiveCapabilityCurve != 0) - { - BaseClass_list.push_back(element->ReactiveCapabilityCurve); - return true; - } - } - return false; -} - - const char EquivalentInjection::debugName[] = "EquivalentInjection"; const char* EquivalentInjection::debugString() const { @@ -518,31 +530,31 @@ const char* EquivalentInjection::debugString() const void EquivalentInjection::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EquivalentInjection"), &EquivalentInjection_factory)); + factory_map.emplace("cim:EquivalentInjection", &EquivalentInjection_factory); } void EquivalentInjection::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.maxP"), &assign_EquivalentInjection_maxP)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.maxQ"), &assign_EquivalentInjection_maxQ)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.minP"), &assign_EquivalentInjection_minP)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.minQ"), &assign_EquivalentInjection_minQ)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.p"), &assign_EquivalentInjection_p)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.q"), &assign_EquivalentInjection_q)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.r"), &assign_EquivalentInjection_r)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.r0"), &assign_EquivalentInjection_r0)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.r2"), &assign_EquivalentInjection_r2)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.regulationCapability"), &assign_EquivalentInjection_regulationCapability)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.regulationStatus"), &assign_EquivalentInjection_regulationStatus)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.regulationTarget"), &assign_EquivalentInjection_regulationTarget)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.x"), &assign_EquivalentInjection_x)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.x0"), &assign_EquivalentInjection_x0)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.x2"), &assign_EquivalentInjection_x2)); + assign_map.emplace("cim:EquivalentInjection.maxP", &assign_EquivalentInjection_maxP); + assign_map.emplace("cim:EquivalentInjection.maxQ", &assign_EquivalentInjection_maxQ); + assign_map.emplace("cim:EquivalentInjection.minP", &assign_EquivalentInjection_minP); + assign_map.emplace("cim:EquivalentInjection.minQ", &assign_EquivalentInjection_minQ); + assign_map.emplace("cim:EquivalentInjection.p", &assign_EquivalentInjection_p); + assign_map.emplace("cim:EquivalentInjection.q", &assign_EquivalentInjection_q); + assign_map.emplace("cim:EquivalentInjection.r", &assign_EquivalentInjection_r); + assign_map.emplace("cim:EquivalentInjection.r0", &assign_EquivalentInjection_r0); + assign_map.emplace("cim:EquivalentInjection.r2", &assign_EquivalentInjection_r2); + assign_map.emplace("cim:EquivalentInjection.regulationCapability", &assign_EquivalentInjection_regulationCapability); + assign_map.emplace("cim:EquivalentInjection.regulationStatus", &assign_EquivalentInjection_regulationStatus); + assign_map.emplace("cim:EquivalentInjection.regulationTarget", &assign_EquivalentInjection_regulationTarget); + assign_map.emplace("cim:EquivalentInjection.x", &assign_EquivalentInjection_x); + assign_map.emplace("cim:EquivalentInjection.x0", &assign_EquivalentInjection_x0); + assign_map.emplace("cim:EquivalentInjection.x2", &assign_EquivalentInjection_x2); } void EquivalentInjection::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.ReactiveCapabilityCurve"), &assign_EquivalentInjection_ReactiveCapabilityCurve)); + assign_map.emplace("cim:EquivalentInjection.ReactiveCapabilityCurve", &assign_EquivalentInjection_ReactiveCapabilityCurve); } void EquivalentInjection::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/EquivalentInjection.hpp b/CGMES_2.4.15_16FEB2016/EquivalentInjection.hpp index 3b073046f..52d59c58c 100644 --- a/CGMES_2.4.15_16FEB2016/EquivalentInjection.hpp +++ b/CGMES_2.4.15_16FEB2016/EquivalentInjection.hpp @@ -23,9 +23,7 @@ namespace CIMPP { class ReactiveCapabilityCurve; - /* - This class represents equivalent injections (generation or load). Voltage regulation is allowed only at the point of connection. - */ + /** \brief This class represents equivalent injections (generation or load). Voltage regulation is allowed only at the point of connection. */ class EquivalentInjection : public EquivalentEquipment { public: @@ -33,22 +31,53 @@ namespace CIMPP EquivalentInjection(); ~EquivalentInjection() override; - CIMPP::ReactiveCapabilityCurve* ReactiveCapabilityCurve; /* The equivalent injection using this reactive capability curve. Default: 0 */ - CIMPP::ActivePower maxP; /* Maximum active power of the injection. Default: nullptr */ - CIMPP::ReactivePower maxQ; /* Used for modeling of infeed for load flow exchange. Not used for short circuit modeling. If maxQ and minQ are not used ReactiveCapabilityCurve can be used. Default: nullptr */ - CIMPP::ActivePower minP; /* Minimum active power of the injection. Default: nullptr */ - CIMPP::ReactivePower minQ; /* Used for modeling of infeed for load flow exchange. Not used for short circuit modeling. If maxQ and minQ are not used ReactiveCapabilityCurve can be used. Default: nullptr */ - CIMPP::ActivePower p; /* Equivalent active power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ - CIMPP::ReactivePower q; /* Equivalent reactive power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ - CIMPP::Resistance r; /* Positive sequence resistance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Resistance r0; /* Zero sequence resistance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Resistance r2; /* Negative sequence resistance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Boolean regulationCapability; /* Specifies whether or not the EquivalentInjection has the capability to regulate the local voltage. Default: false */ - CIMPP::Boolean regulationStatus; /* Specifies the default regulation status of the EquivalentInjection. True is regulating. False is not regulating. Default: false */ - CIMPP::Voltage regulationTarget; /* The target voltage for voltage regulation. Default: nullptr */ - CIMPP::Reactance x; /* Positive sequence reactance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Reactance x0; /* Zero sequence reactance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Reactance x2; /* Negative sequence reactance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ + /** \brief The equivalent injection using this reactive capability curve. Default: 0 */ + CIMPP::ReactiveCapabilityCurve* ReactiveCapabilityCurve; + + /** \brief Maximum active power of the injection. Default: nullptr */ + CIMPP::ActivePower maxP; + + /** \brief Used for modeling of infeed for load flow exchange. Not used for short circuit modeling. If maxQ and minQ are not used ReactiveCapabilityCurve can be used. Default: nullptr */ + CIMPP::ReactivePower maxQ; + + /** \brief Minimum active power of the injection. Default: nullptr */ + CIMPP::ActivePower minP; + + /** \brief Used for modeling of infeed for load flow exchange. Not used for short circuit modeling. If maxQ and minQ are not used ReactiveCapabilityCurve can be used. Default: nullptr */ + CIMPP::ReactivePower minQ; + + /** \brief Equivalent active power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ + CIMPP::ActivePower p; + + /** \brief Equivalent reactive power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ + CIMPP::ReactivePower q; + + /** \brief Positive sequence resistance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Resistance r; + + /** \brief Zero sequence resistance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Resistance r0; + + /** \brief Negative sequence resistance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Resistance r2; + + /** \brief Specifies whether or not the EquivalentInjection has the capability to regulate the local voltage. Default: false */ + CIMPP::Boolean regulationCapability; + + /** \brief Specifies the default regulation status of the EquivalentInjection. True is regulating. False is not regulating. Default: false */ + CIMPP::Boolean regulationStatus; + + /** \brief The target voltage for voltage regulation. Default: nullptr */ + CIMPP::Voltage regulationTarget; + + /** \brief Positive sequence reactance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Reactance x; + + /** \brief Zero sequence reactance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Reactance x0; + + /** \brief Negative sequence reactance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Reactance x2; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/EquivalentNetwork.cpp b/CGMES_2.4.15_16FEB2016/EquivalentNetwork.cpp index f08fd6d02..81b5286cd 100644 --- a/CGMES_2.4.15_16FEB2016/EquivalentNetwork.cpp +++ b/CGMES_2.4.15_16FEB2016/EquivalentNetwork.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -EquivalentNetwork::EquivalentNetwork() {}; -EquivalentNetwork::~EquivalentNetwork() {}; +EquivalentNetwork::EquivalentNetwork() {} +EquivalentNetwork::~EquivalentNetwork() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ EquivalentNetwork::getPossibleProfilesForAttributes() const return map; } - - bool assign_EquivalentEquipment_EquivalentNetwork(BaseClass*, BaseClass*); bool assign_EquivalentNetwork_EquivalentEquipments(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_EquivalentNetwork_EquivalentEquipments(BaseClass* BaseClass_ptr1, Ba } - const char EquivalentNetwork::debugName[] = "EquivalentNetwork"; const char* EquivalentNetwork::debugString() const { @@ -69,7 +66,7 @@ const char* EquivalentNetwork::debugString() const void EquivalentNetwork::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EquivalentNetwork"), &EquivalentNetwork_factory)); + factory_map.emplace("cim:EquivalentNetwork", &EquivalentNetwork_factory); } void EquivalentNetwork::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void EquivalentNetwork::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EquivalentNetwork.EquivalentEquipments"), &assign_EquivalentNetwork_EquivalentEquipments)); + assign_map.emplace("cim:EquivalentNetwork.EquivalentEquipments", &assign_EquivalentNetwork_EquivalentEquipments); } void EquivalentNetwork::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/EquivalentNetwork.hpp b/CGMES_2.4.15_16FEB2016/EquivalentNetwork.hpp index 369a69cd0..280054dc0 100644 --- a/CGMES_2.4.15_16FEB2016/EquivalentNetwork.hpp +++ b/CGMES_2.4.15_16FEB2016/EquivalentNetwork.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class EquivalentEquipment; - /* - A class that represents an external meshed network that has been reduced to an electrically equivalent model. The ConnectivityNodes contained in the equivalent are intended to reflect internal nodes of the equivalent. The boundary Connectivity nodes where the equivalent connects outside itself are NOT contained by the equivalent. - */ + /** \brief A class that represents an external meshed network that has been reduced to an electrically equivalent model. The ConnectivityNodes contained in the equivalent are intended to reflect internal nodes of the equivalent. The boundary Connectivity nodes where the equivalent connects outside itself are NOT contained by the equivalent. */ class EquivalentNetwork : public ConnectivityNodeContainer { public: @@ -27,7 +25,8 @@ namespace CIMPP EquivalentNetwork(); ~EquivalentNetwork() override; - std::list EquivalentEquipments; /* The equivalent where the reduced model belongs. Default: 0 */ + /** \brief The equivalent where the reduced model belongs. Default: 0 */ + std::list EquivalentEquipments; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/EquivalentShunt.cpp b/CGMES_2.4.15_16FEB2016/EquivalentShunt.cpp index 62dafdf33..3bee41ffb 100644 --- a/CGMES_2.4.15_16FEB2016/EquivalentShunt.cpp +++ b/CGMES_2.4.15_16FEB2016/EquivalentShunt.cpp @@ -8,13 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Susceptance.hpp" -#include "Conductance.hpp" using namespace CIMPP; -EquivalentShunt::EquivalentShunt() {}; -EquivalentShunt::~EquivalentShunt() {}; +EquivalentShunt::EquivalentShunt() {} +EquivalentShunt::~EquivalentShunt() {} static const std::list PossibleProfilesForClass = { @@ -42,38 +40,38 @@ EquivalentShunt::getPossibleProfilesForAttributes() const return map; } - -bool assign_EquivalentShunt_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentShunt_b(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentShunt* element = dynamic_cast(BaseClass_ptr1)) + EquivalentShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentShunt_g(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentShunt_g(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentShunt* element = dynamic_cast(BaseClass_ptr1)) + EquivalentShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_EquivalentShunt_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentShunt* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b; if (!buffer.str().empty()) @@ -87,7 +85,8 @@ bool get_EquivalentShunt_b(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_EquivalentShunt_g(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentShunt* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g; if (!buffer.str().empty()) @@ -99,8 +98,6 @@ bool get_EquivalentShunt_g(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char EquivalentShunt::debugName[] = "EquivalentShunt"; const char* EquivalentShunt::debugString() const { @@ -109,13 +106,13 @@ const char* EquivalentShunt::debugString() const void EquivalentShunt::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EquivalentShunt"), &EquivalentShunt_factory)); + factory_map.emplace("cim:EquivalentShunt", &EquivalentShunt_factory); } void EquivalentShunt::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EquivalentShunt.b"), &assign_EquivalentShunt_b)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentShunt.g"), &assign_EquivalentShunt_g)); + assign_map.emplace("cim:EquivalentShunt.b", &assign_EquivalentShunt_b); + assign_map.emplace("cim:EquivalentShunt.g", &assign_EquivalentShunt_g); } void EquivalentShunt::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/EquivalentShunt.hpp b/CGMES_2.4.15_16FEB2016/EquivalentShunt.hpp index 4a5204e86..4cd995dcf 100644 --- a/CGMES_2.4.15_16FEB2016/EquivalentShunt.hpp +++ b/CGMES_2.4.15_16FEB2016/EquivalentShunt.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents equivalent shunts. - */ + /** \brief The class represents equivalent shunts. */ class EquivalentShunt : public EquivalentEquipment { public: @@ -28,8 +26,11 @@ namespace CIMPP EquivalentShunt(); ~EquivalentShunt() override; - CIMPP::Susceptance b; /* Positive sequence shunt susceptance. Default: nullptr */ - CIMPP::Conductance g; /* Positive sequence shunt conductance. Default: nullptr */ + /** \brief Positive sequence shunt susceptance. Default: nullptr */ + CIMPP::Susceptance b; + + /** \brief Positive sequence shunt conductance. Default: nullptr */ + CIMPP::Conductance g; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcAC1A.cpp b/CGMES_2.4.15_16FEB2016/ExcAC1A.cpp index 60fb20902..d5bbdc7a5 100644 --- a/CGMES_2.4.15_16FEB2016/ExcAC1A.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcAC1A.cpp @@ -8,33 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAC1A::ExcAC1A() {}; -ExcAC1A::~ExcAC1A() {}; +ExcAC1A::ExcAC1A() {} +ExcAC1A::~ExcAC1A() {} static const std::list PossibleProfilesForClass = { @@ -82,298 +60,318 @@ ExcAC1A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAC1A_hvlvgates(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_hvlvgates(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->hvlvgates; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_kf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_kf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_kf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_kf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAC1A_hvlvgates(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hvlvgates; if (!buffer.str().empty()) @@ -387,7 +385,8 @@ bool get_ExcAC1A_hvlvgates(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcAC1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -401,7 +400,8 @@ bool get_ExcAC1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -415,7 +415,8 @@ bool get_ExcAC1A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -429,7 +430,8 @@ bool get_ExcAC1A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -443,7 +445,8 @@ bool get_ExcAC1A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -457,7 +460,8 @@ bool get_ExcAC1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_kf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf1; if (!buffer.str().empty()) @@ -471,7 +475,8 @@ bool get_ExcAC1A_kf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf2; if (!buffer.str().empty()) @@ -485,7 +490,8 @@ bool get_ExcAC1A_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -499,7 +505,8 @@ bool get_ExcAC1A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -513,7 +520,8 @@ bool get_ExcAC1A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC1A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -527,7 +535,8 @@ bool get_ExcAC1A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -541,7 +550,8 @@ bool get_ExcAC1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -555,7 +565,8 @@ bool get_ExcAC1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -569,7 +580,8 @@ bool get_ExcAC1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -583,7 +595,8 @@ bool get_ExcAC1A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -597,7 +610,8 @@ bool get_ExcAC1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -611,7 +625,8 @@ bool get_ExcAC1A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC1A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -625,7 +640,8 @@ bool get_ExcAC1A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC1A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -639,7 +655,8 @@ bool get_ExcAC1A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -653,7 +670,8 @@ bool get_ExcAC1A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -667,7 +685,8 @@ bool get_ExcAC1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -679,8 +698,6 @@ bool get_ExcAC1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcAC1A::debugName[] = "ExcAC1A"; const char* ExcAC1A::debugString() const { @@ -689,33 +706,33 @@ const char* ExcAC1A::debugString() const void ExcAC1A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAC1A"), &ExcAC1A_factory)); + factory_map.emplace("cim:ExcAC1A", &ExcAC1A_factory); } void ExcAC1A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.hvlvgates"), &assign_ExcAC1A_hvlvgates)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.ka"), &assign_ExcAC1A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.kc"), &assign_ExcAC1A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.kd"), &assign_ExcAC1A_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.ke"), &assign_ExcAC1A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.kf"), &assign_ExcAC1A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.kf1"), &assign_ExcAC1A_kf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.kf2"), &assign_ExcAC1A_kf2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.ks"), &assign_ExcAC1A_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.seve1"), &assign_ExcAC1A_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.seve2"), &assign_ExcAC1A_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.ta"), &assign_ExcAC1A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.tb"), &assign_ExcAC1A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.tc"), &assign_ExcAC1A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.te"), &assign_ExcAC1A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.tf"), &assign_ExcAC1A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.vamax"), &assign_ExcAC1A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.vamin"), &assign_ExcAC1A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.ve1"), &assign_ExcAC1A_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.ve2"), &assign_ExcAC1A_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.vrmax"), &assign_ExcAC1A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.vrmin"), &assign_ExcAC1A_vrmin)); + assign_map.emplace("cim:ExcAC1A.hvlvgates", &assign_ExcAC1A_hvlvgates); + assign_map.emplace("cim:ExcAC1A.ka", &assign_ExcAC1A_ka); + assign_map.emplace("cim:ExcAC1A.kc", &assign_ExcAC1A_kc); + assign_map.emplace("cim:ExcAC1A.kd", &assign_ExcAC1A_kd); + assign_map.emplace("cim:ExcAC1A.ke", &assign_ExcAC1A_ke); + assign_map.emplace("cim:ExcAC1A.kf", &assign_ExcAC1A_kf); + assign_map.emplace("cim:ExcAC1A.kf1", &assign_ExcAC1A_kf1); + assign_map.emplace("cim:ExcAC1A.kf2", &assign_ExcAC1A_kf2); + assign_map.emplace("cim:ExcAC1A.ks", &assign_ExcAC1A_ks); + assign_map.emplace("cim:ExcAC1A.seve1", &assign_ExcAC1A_seve1); + assign_map.emplace("cim:ExcAC1A.seve2", &assign_ExcAC1A_seve2); + assign_map.emplace("cim:ExcAC1A.ta", &assign_ExcAC1A_ta); + assign_map.emplace("cim:ExcAC1A.tb", &assign_ExcAC1A_tb); + assign_map.emplace("cim:ExcAC1A.tc", &assign_ExcAC1A_tc); + assign_map.emplace("cim:ExcAC1A.te", &assign_ExcAC1A_te); + assign_map.emplace("cim:ExcAC1A.tf", &assign_ExcAC1A_tf); + assign_map.emplace("cim:ExcAC1A.vamax", &assign_ExcAC1A_vamax); + assign_map.emplace("cim:ExcAC1A.vamin", &assign_ExcAC1A_vamin); + assign_map.emplace("cim:ExcAC1A.ve1", &assign_ExcAC1A_ve1); + assign_map.emplace("cim:ExcAC1A.ve2", &assign_ExcAC1A_ve2); + assign_map.emplace("cim:ExcAC1A.vrmax", &assign_ExcAC1A_vrmax); + assign_map.emplace("cim:ExcAC1A.vrmin", &assign_ExcAC1A_vrmin); } void ExcAC1A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcAC1A.hpp b/CGMES_2.4.15_16FEB2016/ExcAC1A.hpp index bdaece7c8..3a0fca2c2 100644 --- a/CGMES_2.4.15_16FEB2016/ExcAC1A.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcAC1A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE AC1A alternator-supplied rectifier excitation system with different rate feedback source. - */ + /** \brief Modified IEEE AC1A alternator-supplied rectifier excitation system with different rate feedback source. */ class ExcAC1A : public ExcitationSystemDynamics { public: @@ -30,28 +28,71 @@ namespace CIMPP ExcAC1A(); ~ExcAC1A() override; - CIMPP::Boolean hvlvgates; /* Indicates if both HV gate and LV gate are active (HVLVgates). true = gates are used false = gates are not used. Typical Value = true. Default: false */ - CIMPP::PU ka; /* Voltage regulator gain (Ka). Typical Value = 400. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (Kd). Typical Value = 0.38. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (Kf). Typical Value = 0.03. Default: nullptr */ - CIMPP::PU kf1; /* Coefficient to allow different usage of the model (Kf1). Typical Value = 0. Default: nullptr */ - CIMPP::PU kf2; /* Coefficient to allow different usage of the model (Kf2). Typical Value = 1. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, Ve1, back of commutating reactance (Se[Ve1]). Typical Value = 0.1. Default: nullptr */ - CIMPP::Simple_Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, Ve2, back of commutating reactance (Se[Ve2]). Typical Value = 0.03. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (Ta). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 0.8. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (Tf). Typical Value = 1. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (V). Typical Value = 14.5. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (V). Typical Value = -14.5. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve1). Typical Value = 4.18. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve2). Typical Value = 3.14. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator outputs (Vrmax). Typical Value = 6.03. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator outputs (Rrmin). Typical Value = -5.43. Default: nullptr */ + /** \brief Indicates if both HV gate and LV gate are active (HVLVgates). true = gates are used false = gates are not used. Typical Value = true. Default: false */ + CIMPP::Boolean hvlvgates; + + /** \brief Voltage regulator gain (Ka). Typical Value = 400. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (Kd). Typical Value = 0.38. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (Kf). Typical Value = 0.03. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Coefficient to allow different usage of the model (Kf1). Typical Value = 0. Default: nullptr */ + CIMPP::PU kf1; + + /** \brief Coefficient to allow different usage of the model (Kf2). Typical Value = 1. Default: nullptr */ + CIMPP::PU kf2; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Ve1, back of commutating reactance (Se[Ve1]). Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Ve2, back of commutating reactance (Se[Ve2]). Typical Value = 0.03. Default: nullptr */ + CIMPP::Simple_Float seve2; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 0.8. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (Tf). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage regulator output (V). Typical Value = 14.5. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -14.5. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve1). Typical Value = 4.18. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve2). Typical Value = 3.14. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Maximum voltage regulator outputs (Vrmax). Typical Value = 6.03. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator outputs (Rrmin). Typical Value = -5.43. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcAC2A.cpp b/CGMES_2.4.15_16FEB2016/ExcAC2A.cpp index 6b654a284..733be71b2 100644 --- a/CGMES_2.4.15_16FEB2016/ExcAC2A.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcAC2A.cpp @@ -8,39 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAC2A::ExcAC2A() {}; -ExcAC2A::~ExcAC2A() {}; +ExcAC2A::ExcAC2A() {} +ExcAC2A::~ExcAC2A() {} static const std::list PossibleProfilesForClass = { @@ -94,376 +66,402 @@ ExcAC2A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAC2A_hvgate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_hvgate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->hvgate; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_kb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_kb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_kb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_kb1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kb1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_kh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_kl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_kl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_kl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_kl1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_lvgate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_lvgate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lvgate; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_vfemax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfemax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_vlr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_vlr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vlr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAC2A_hvgate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hvgate; if (!buffer.str().empty()) @@ -477,7 +475,8 @@ bool get_ExcAC2A_hvgate(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcAC2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -491,7 +490,8 @@ bool get_ExcAC2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_kb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kb; if (!buffer.str().empty()) @@ -505,7 +505,8 @@ bool get_ExcAC2A_kb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_kb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kb1; if (!buffer.str().empty()) @@ -519,7 +520,8 @@ bool get_ExcAC2A_kb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -533,7 +535,8 @@ bool get_ExcAC2A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -547,7 +550,8 @@ bool get_ExcAC2A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -561,7 +565,8 @@ bool get_ExcAC2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -575,7 +580,8 @@ bool get_ExcAC2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh; if (!buffer.str().empty()) @@ -589,7 +595,8 @@ bool get_ExcAC2A_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl; if (!buffer.str().empty()) @@ -603,7 +610,8 @@ bool get_ExcAC2A_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_kl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl1; if (!buffer.str().empty()) @@ -617,7 +625,8 @@ bool get_ExcAC2A_kl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -631,7 +640,8 @@ bool get_ExcAC2A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_lvgate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lvgate; if (!buffer.str().empty()) @@ -645,7 +655,8 @@ bool get_ExcAC2A_lvgate(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcAC2A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -659,7 +670,8 @@ bool get_ExcAC2A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC2A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -673,7 +685,8 @@ bool get_ExcAC2A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -687,7 +700,8 @@ bool get_ExcAC2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -701,7 +715,8 @@ bool get_ExcAC2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -715,7 +730,8 @@ bool get_ExcAC2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -729,7 +745,8 @@ bool get_ExcAC2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -743,7 +760,8 @@ bool get_ExcAC2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -757,7 +775,8 @@ bool get_ExcAC2A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC2A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -771,7 +790,8 @@ bool get_ExcAC2A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC2A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -785,7 +805,8 @@ bool get_ExcAC2A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -799,7 +820,8 @@ bool get_ExcAC2A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfemax; if (!buffer.str().empty()) @@ -813,7 +835,8 @@ bool get_ExcAC2A_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcAC2A_vlr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vlr; if (!buffer.str().empty()) @@ -827,7 +850,8 @@ bool get_ExcAC2A_vlr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -841,7 +865,8 @@ bool get_ExcAC2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -853,8 +878,6 @@ bool get_ExcAC2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcAC2A::debugName[] = "ExcAC2A"; const char* ExcAC2A::debugString() const { @@ -863,39 +886,39 @@ const char* ExcAC2A::debugString() const void ExcAC2A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAC2A"), &ExcAC2A_factory)); + factory_map.emplace("cim:ExcAC2A", &ExcAC2A_factory); } void ExcAC2A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.hvgate"), &assign_ExcAC2A_hvgate)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.ka"), &assign_ExcAC2A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.kb"), &assign_ExcAC2A_kb)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.kb1"), &assign_ExcAC2A_kb1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.kc"), &assign_ExcAC2A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.kd"), &assign_ExcAC2A_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.ke"), &assign_ExcAC2A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.kf"), &assign_ExcAC2A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.kh"), &assign_ExcAC2A_kh)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.kl"), &assign_ExcAC2A_kl)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.kl1"), &assign_ExcAC2A_kl1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.ks"), &assign_ExcAC2A_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.lvgate"), &assign_ExcAC2A_lvgate)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.seve1"), &assign_ExcAC2A_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.seve2"), &assign_ExcAC2A_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.ta"), &assign_ExcAC2A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.tb"), &assign_ExcAC2A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.tc"), &assign_ExcAC2A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.te"), &assign_ExcAC2A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.tf"), &assign_ExcAC2A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.vamax"), &assign_ExcAC2A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.vamin"), &assign_ExcAC2A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.ve1"), &assign_ExcAC2A_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.ve2"), &assign_ExcAC2A_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.vfemax"), &assign_ExcAC2A_vfemax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.vlr"), &assign_ExcAC2A_vlr)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.vrmax"), &assign_ExcAC2A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.vrmin"), &assign_ExcAC2A_vrmin)); + assign_map.emplace("cim:ExcAC2A.hvgate", &assign_ExcAC2A_hvgate); + assign_map.emplace("cim:ExcAC2A.ka", &assign_ExcAC2A_ka); + assign_map.emplace("cim:ExcAC2A.kb", &assign_ExcAC2A_kb); + assign_map.emplace("cim:ExcAC2A.kb1", &assign_ExcAC2A_kb1); + assign_map.emplace("cim:ExcAC2A.kc", &assign_ExcAC2A_kc); + assign_map.emplace("cim:ExcAC2A.kd", &assign_ExcAC2A_kd); + assign_map.emplace("cim:ExcAC2A.ke", &assign_ExcAC2A_ke); + assign_map.emplace("cim:ExcAC2A.kf", &assign_ExcAC2A_kf); + assign_map.emplace("cim:ExcAC2A.kh", &assign_ExcAC2A_kh); + assign_map.emplace("cim:ExcAC2A.kl", &assign_ExcAC2A_kl); + assign_map.emplace("cim:ExcAC2A.kl1", &assign_ExcAC2A_kl1); + assign_map.emplace("cim:ExcAC2A.ks", &assign_ExcAC2A_ks); + assign_map.emplace("cim:ExcAC2A.lvgate", &assign_ExcAC2A_lvgate); + assign_map.emplace("cim:ExcAC2A.seve1", &assign_ExcAC2A_seve1); + assign_map.emplace("cim:ExcAC2A.seve2", &assign_ExcAC2A_seve2); + assign_map.emplace("cim:ExcAC2A.ta", &assign_ExcAC2A_ta); + assign_map.emplace("cim:ExcAC2A.tb", &assign_ExcAC2A_tb); + assign_map.emplace("cim:ExcAC2A.tc", &assign_ExcAC2A_tc); + assign_map.emplace("cim:ExcAC2A.te", &assign_ExcAC2A_te); + assign_map.emplace("cim:ExcAC2A.tf", &assign_ExcAC2A_tf); + assign_map.emplace("cim:ExcAC2A.vamax", &assign_ExcAC2A_vamax); + assign_map.emplace("cim:ExcAC2A.vamin", &assign_ExcAC2A_vamin); + assign_map.emplace("cim:ExcAC2A.ve1", &assign_ExcAC2A_ve1); + assign_map.emplace("cim:ExcAC2A.ve2", &assign_ExcAC2A_ve2); + assign_map.emplace("cim:ExcAC2A.vfemax", &assign_ExcAC2A_vfemax); + assign_map.emplace("cim:ExcAC2A.vlr", &assign_ExcAC2A_vlr); + assign_map.emplace("cim:ExcAC2A.vrmax", &assign_ExcAC2A_vrmax); + assign_map.emplace("cim:ExcAC2A.vrmin", &assign_ExcAC2A_vrmin); } void ExcAC2A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcAC2A.hpp b/CGMES_2.4.15_16FEB2016/ExcAC2A.hpp index 91174ea3e..902938d79 100644 --- a/CGMES_2.4.15_16FEB2016/ExcAC2A.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcAC2A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE AC2A alternator-supplied rectifier excitation system with different field current limit. - */ + /** \brief Modified IEEE AC2A alternator-supplied rectifier excitation system with different field current limit. */ class ExcAC2A : public ExcitationSystemDynamics { public: @@ -30,34 +28,89 @@ namespace CIMPP ExcAC2A(); ~ExcAC2A() override; - CIMPP::Boolean hvgate; /* Indicates if HV gate is active (HVgate). true = gate is used false = gate is not used. Typical Value = true. Default: false */ - CIMPP::PU ka; /* Voltage regulator gain (Ka). Typical Value = 400. Default: nullptr */ - CIMPP::PU kb; /* Second stage regulator gain (Kb) (>0). Exciter field current controller gain. Typical Value = 25. Default: nullptr */ - CIMPP::PU kb1; /* Second stage regulator gain (Kb1). It is exciter field current controller gain used as alternative to Kb to represent a variant of the ExcAC2A model. Typical Value = 25. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.28. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (Kd). Typical Value = 0.35. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (Kf). Typical Value = 0.03. Default: nullptr */ - CIMPP::PU kh; /* Exciter field current feedback gain (Kh). Typical Value = 1. Default: nullptr */ - CIMPP::PU kl; /* Exciter field current limiter gain (Kl). Typical Value = 10. Default: nullptr */ - CIMPP::PU kl1; /* Coefficient to allow different usage of the model (Kl1). Typical Value = 1. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ - CIMPP::Boolean lvgate; /* Indicates if LV gate is active (LVgate). true = gate is used false = gate is not used. Typical Value = true. Default: false */ - CIMPP::Simple_Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, Ve, back of commutating reactance (Se[Ve]). Typical Value = 0.037. Default: nullptr */ - CIMPP::Simple_Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, Ve, back of commutating reactance (Se[Ve]). Typical Value = 0.012. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (Ta). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 0.6. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (Tf). Typical Value = 1. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (V). Typical Value = 8. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (V). Typical Value = -8. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve). Typical Value = 4.4. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve). Typical Value = 3.3. Default: nullptr */ - CIMPP::PU vfemax; /* Exciter field current limit reference (Vfemax). Typical Value = 4.4. Default: nullptr */ - CIMPP::PU vlr; /* Maximum exciter field current (Vlr). Typical Value = 4.4. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator outputs (Vrmax). Typical Value = 105. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator outputs (Vrmin). Typical Value = -95. Default: nullptr */ + /** \brief Indicates if HV gate is active (HVgate). true = gate is used false = gate is not used. Typical Value = true. Default: false */ + CIMPP::Boolean hvgate; + + /** \brief Voltage regulator gain (Ka). Typical Value = 400. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Second stage regulator gain (Kb) (>0). Exciter field current controller gain. Typical Value = 25. Default: nullptr */ + CIMPP::PU kb; + + /** \brief Second stage regulator gain (Kb1). It is exciter field current controller gain used as alternative to Kb to represent a variant of the ExcAC2A model. Typical Value = 25. Default: nullptr */ + CIMPP::PU kb1; + + /** \brief Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.28. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (Kd). Typical Value = 0.35. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (Kf). Typical Value = 0.03. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Exciter field current feedback gain (Kh). Typical Value = 1. Default: nullptr */ + CIMPP::PU kh; + + /** \brief Exciter field current limiter gain (Kl). Typical Value = 10. Default: nullptr */ + CIMPP::PU kl; + + /** \brief Coefficient to allow different usage of the model (Kl1). Typical Value = 1. Default: nullptr */ + CIMPP::PU kl1; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Indicates if LV gate is active (LVgate). true = gate is used false = gate is not used. Typical Value = true. Default: false */ + CIMPP::Boolean lvgate; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Ve, back of commutating reactance (Se[Ve]). Typical Value = 0.037. Default: nullptr */ + CIMPP::Simple_Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Ve, back of commutating reactance (Se[Ve]). Typical Value = 0.012. Default: nullptr */ + CIMPP::Simple_Float seve2; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 0.6. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (Tf). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage regulator output (V). Typical Value = 8. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -8. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve). Typical Value = 4.4. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve). Typical Value = 3.3. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Exciter field current limit reference (Vfemax). Typical Value = 4.4. Default: nullptr */ + CIMPP::PU vfemax; + + /** \brief Maximum exciter field current (Vlr). Typical Value = 4.4. Default: nullptr */ + CIMPP::PU vlr; + + /** \brief Maximum voltage regulator outputs (Vrmax). Typical Value = 105. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator outputs (Vrmin). Typical Value = -95. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcAC3A.cpp b/CGMES_2.4.15_16FEB2016/ExcAC3A.cpp index 253f84f1c..254577cfa 100644 --- a/CGMES_2.4.15_16FEB2016/ExcAC3A.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcAC3A.cpp @@ -8,37 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAC3A::ExcAC3A() {}; -ExcAC3A::~ExcAC3A() {}; +ExcAC3A::ExcAC3A() {} +ExcAC3A::~ExcAC3A() {} static const std::list PossibleProfilesForClass = { @@ -90,350 +64,374 @@ ExcAC3A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAC3A_efdn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_efdn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_kf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_kf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_kf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_kf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_klv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_klv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->klv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_kn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_kn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_kr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_kr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_vemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_vemin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vemin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_vfemax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfemax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_vlv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_vlv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vlv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAC3A_efdn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdn; if (!buffer.str().empty()) @@ -447,7 +445,8 @@ bool get_ExcAC3A_efdn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAC3A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -461,7 +460,8 @@ bool get_ExcAC3A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -475,7 +475,8 @@ bool get_ExcAC3A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -489,7 +490,8 @@ bool get_ExcAC3A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -503,7 +505,8 @@ bool get_ExcAC3A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -517,7 +520,8 @@ bool get_ExcAC3A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_kf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf1; if (!buffer.str().empty()) @@ -531,7 +535,8 @@ bool get_ExcAC3A_kf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf2; if (!buffer.str().empty()) @@ -545,7 +550,8 @@ bool get_ExcAC3A_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_klv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->klv; if (!buffer.str().empty()) @@ -559,7 +565,8 @@ bool get_ExcAC3A_klv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_kn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kn; if (!buffer.str().empty()) @@ -573,7 +580,8 @@ bool get_ExcAC3A_kn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_kr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kr; if (!buffer.str().empty()) @@ -587,7 +595,8 @@ bool get_ExcAC3A_kr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -601,7 +610,8 @@ bool get_ExcAC3A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -615,7 +625,8 @@ bool get_ExcAC3A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC3A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -629,7 +640,8 @@ bool get_ExcAC3A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC3A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -643,7 +655,8 @@ bool get_ExcAC3A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -657,7 +670,8 @@ bool get_ExcAC3A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -671,7 +685,8 @@ bool get_ExcAC3A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -685,7 +700,8 @@ bool get_ExcAC3A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -699,7 +715,8 @@ bool get_ExcAC3A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -713,7 +730,8 @@ bool get_ExcAC3A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC3A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -727,7 +745,8 @@ bool get_ExcAC3A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC3A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -741,7 +760,8 @@ bool get_ExcAC3A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -755,7 +775,8 @@ bool get_ExcAC3A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vemin; if (!buffer.str().empty()) @@ -769,7 +790,8 @@ bool get_ExcAC3A_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC3A_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfemax; if (!buffer.str().empty()) @@ -783,7 +805,8 @@ bool get_ExcAC3A_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcAC3A_vlv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vlv; if (!buffer.str().empty()) @@ -795,8 +818,6 @@ bool get_ExcAC3A_vlv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcAC3A::debugName[] = "ExcAC3A"; const char* ExcAC3A::debugString() const { @@ -805,37 +826,37 @@ const char* ExcAC3A::debugString() const void ExcAC3A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAC3A"), &ExcAC3A_factory)); + factory_map.emplace("cim:ExcAC3A", &ExcAC3A_factory); } void ExcAC3A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.efdn"), &assign_ExcAC3A_efdn)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.ka"), &assign_ExcAC3A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.kc"), &assign_ExcAC3A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.kd"), &assign_ExcAC3A_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.ke"), &assign_ExcAC3A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.kf"), &assign_ExcAC3A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.kf1"), &assign_ExcAC3A_kf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.kf2"), &assign_ExcAC3A_kf2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.klv"), &assign_ExcAC3A_klv)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.kn"), &assign_ExcAC3A_kn)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.kr"), &assign_ExcAC3A_kr)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.ks"), &assign_ExcAC3A_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.seve1"), &assign_ExcAC3A_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.seve2"), &assign_ExcAC3A_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.ta"), &assign_ExcAC3A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.tb"), &assign_ExcAC3A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.tc"), &assign_ExcAC3A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.te"), &assign_ExcAC3A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.tf"), &assign_ExcAC3A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.vamax"), &assign_ExcAC3A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.vamin"), &assign_ExcAC3A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.ve1"), &assign_ExcAC3A_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.ve2"), &assign_ExcAC3A_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.vemin"), &assign_ExcAC3A_vemin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.vfemax"), &assign_ExcAC3A_vfemax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.vlv"), &assign_ExcAC3A_vlv)); + assign_map.emplace("cim:ExcAC3A.efdn", &assign_ExcAC3A_efdn); + assign_map.emplace("cim:ExcAC3A.ka", &assign_ExcAC3A_ka); + assign_map.emplace("cim:ExcAC3A.kc", &assign_ExcAC3A_kc); + assign_map.emplace("cim:ExcAC3A.kd", &assign_ExcAC3A_kd); + assign_map.emplace("cim:ExcAC3A.ke", &assign_ExcAC3A_ke); + assign_map.emplace("cim:ExcAC3A.kf", &assign_ExcAC3A_kf); + assign_map.emplace("cim:ExcAC3A.kf1", &assign_ExcAC3A_kf1); + assign_map.emplace("cim:ExcAC3A.kf2", &assign_ExcAC3A_kf2); + assign_map.emplace("cim:ExcAC3A.klv", &assign_ExcAC3A_klv); + assign_map.emplace("cim:ExcAC3A.kn", &assign_ExcAC3A_kn); + assign_map.emplace("cim:ExcAC3A.kr", &assign_ExcAC3A_kr); + assign_map.emplace("cim:ExcAC3A.ks", &assign_ExcAC3A_ks); + assign_map.emplace("cim:ExcAC3A.seve1", &assign_ExcAC3A_seve1); + assign_map.emplace("cim:ExcAC3A.seve2", &assign_ExcAC3A_seve2); + assign_map.emplace("cim:ExcAC3A.ta", &assign_ExcAC3A_ta); + assign_map.emplace("cim:ExcAC3A.tb", &assign_ExcAC3A_tb); + assign_map.emplace("cim:ExcAC3A.tc", &assign_ExcAC3A_tc); + assign_map.emplace("cim:ExcAC3A.te", &assign_ExcAC3A_te); + assign_map.emplace("cim:ExcAC3A.tf", &assign_ExcAC3A_tf); + assign_map.emplace("cim:ExcAC3A.vamax", &assign_ExcAC3A_vamax); + assign_map.emplace("cim:ExcAC3A.vamin", &assign_ExcAC3A_vamin); + assign_map.emplace("cim:ExcAC3A.ve1", &assign_ExcAC3A_ve1); + assign_map.emplace("cim:ExcAC3A.ve2", &assign_ExcAC3A_ve2); + assign_map.emplace("cim:ExcAC3A.vemin", &assign_ExcAC3A_vemin); + assign_map.emplace("cim:ExcAC3A.vfemax", &assign_ExcAC3A_vfemax); + assign_map.emplace("cim:ExcAC3A.vlv", &assign_ExcAC3A_vlv); } void ExcAC3A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcAC3A.hpp b/CGMES_2.4.15_16FEB2016/ExcAC3A.hpp index 51c4e355b..430ee5d27 100644 --- a/CGMES_2.4.15_16FEB2016/ExcAC3A.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcAC3A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE AC3A alternator-supplied rectifier excitation system with different field current limit. - */ + /** \brief Modified IEEE AC3A alternator-supplied rectifier excitation system with different field current limit. */ class ExcAC3A : public ExcitationSystemDynamics { public: @@ -29,32 +27,83 @@ namespace CIMPP ExcAC3A(); ~ExcAC3A() override; - CIMPP::PU efdn; /* Value of at which feedback gain changes (Efdn). Typical Value = 2.36. Default: nullptr */ - CIMPP::Seconds ka; /* Voltage regulator gain (Ka). Typical Value = 45.62. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.104. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (Kd). Typical Value = 0.499. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (Kf). Typical Value = 0.143. Default: nullptr */ - CIMPP::PU kf1; /* Coefficient to allow different usage of the model (Kf1). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf2; /* Coefficient to allow different usage of the model (Kf2). Typical Value = 0. Default: nullptr */ - CIMPP::PU klv; /* Gain used in the minimum field voltage limiter loop (Klv). Typical Value = 0.194. Default: nullptr */ - CIMPP::PU kn; /* Excitation control system stabilizer gain (Kn). Typical Value =0.05. Default: nullptr */ - CIMPP::PU kr; /* Constant associated with regulator and alternator field power supply (Kr). Typical Value =3.77. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, Ve, back of commutating reactance (Se[Ve]). Typical Value = 1.143. Default: nullptr */ - CIMPP::Simple_Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, Ve, back of commutating reactance (Se[Ve]). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU ta; /* Voltage regulator time constant (Ta). Typical Value = 0.013. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 1.17. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (Tf). Typical Value = 1. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (V). Typical Value = 1. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (V). Typical Value = -0.95. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve1) equals Vemax (Ve1). Typical Value = 6.24. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve). Typical Value = 4.68. Default: nullptr */ - CIMPP::PU vemin; /* Minimum exciter voltage output (Vemin). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU vfemax; /* Exciter field current limit reference (Vfemax). Typical Value = 16. Default: nullptr */ - CIMPP::PU vlv; /* Field voltage used in the minimum field voltage limiter loop (Vlv). Typical Value = 0.79. Default: nullptr */ + /** \brief Value of at which feedback gain changes (Efdn). Typical Value = 2.36. Default: nullptr */ + CIMPP::PU efdn; + + /** \brief Voltage regulator gain (Ka). Typical Value = 45.62. Default: nullptr */ + CIMPP::Seconds ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.104. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (Kd). Typical Value = 0.499. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (Kf). Typical Value = 0.143. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Coefficient to allow different usage of the model (Kf1). Typical Value = 1. Default: nullptr */ + CIMPP::PU kf1; + + /** \brief Coefficient to allow different usage of the model (Kf2). Typical Value = 0. Default: nullptr */ + CIMPP::PU kf2; + + /** \brief Gain used in the minimum field voltage limiter loop (Klv). Typical Value = 0.194. Default: nullptr */ + CIMPP::PU klv; + + /** \brief Excitation control system stabilizer gain (Kn). Typical Value =0.05. Default: nullptr */ + CIMPP::PU kn; + + /** \brief Constant associated with regulator and alternator field power supply (Kr). Typical Value =3.77. Default: nullptr */ + CIMPP::PU kr; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Ve, back of commutating reactance (Se[Ve]). Typical Value = 1.143. Default: nullptr */ + CIMPP::Simple_Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Ve, back of commutating reactance (Se[Ve]). Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float seve2; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0.013. Default: nullptr */ + CIMPP::PU ta; + + /** \brief Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 1.17. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (Tf). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage regulator output (V). Typical Value = 1. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -0.95. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve1) equals Vemax (Ve1). Typical Value = 6.24. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve). Typical Value = 4.68. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Minimum exciter voltage output (Vemin). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU vemin; + + /** \brief Exciter field current limit reference (Vfemax). Typical Value = 16. Default: nullptr */ + CIMPP::PU vfemax; + + /** \brief Field voltage used in the minimum field voltage limiter loop (Vlv). Typical Value = 0.79. Default: nullptr */ + CIMPP::PU vlv; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcAC4A.cpp b/CGMES_2.4.15_16FEB2016/ExcAC4A.cpp index f949b4ef8..ee9a03733 100644 --- a/CGMES_2.4.15_16FEB2016/ExcAC4A.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcAC4A.cpp @@ -8,20 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAC4A::ExcAC4A() {}; -ExcAC4A::~ExcAC4A() {}; +ExcAC4A::ExcAC4A() {} +ExcAC4A::~ExcAC4A() {} static const std::list PossibleProfilesForClass = { @@ -56,129 +47,136 @@ ExcAC4A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAC4A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC4A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC4A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC4A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC4A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC4A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC4A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC4A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC4A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC4A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC4A_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC4A_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC4A_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC4A_vimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC4A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC4A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC4A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC4A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAC4A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -192,7 +190,8 @@ bool get_ExcAC4A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC4A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -206,7 +205,8 @@ bool get_ExcAC4A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC4A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -220,7 +220,8 @@ bool get_ExcAC4A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC4A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -234,7 +235,8 @@ bool get_ExcAC4A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC4A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -248,7 +250,8 @@ bool get_ExcAC4A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC4A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -262,7 +265,8 @@ bool get_ExcAC4A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC4A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimin; if (!buffer.str().empty()) @@ -276,7 +280,8 @@ bool get_ExcAC4A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC4A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -290,7 +295,8 @@ bool get_ExcAC4A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC4A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -302,8 +308,6 @@ bool get_ExcAC4A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcAC4A::debugName[] = "ExcAC4A"; const char* ExcAC4A::debugString() const { @@ -312,20 +316,20 @@ const char* ExcAC4A::debugString() const void ExcAC4A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAC4A"), &ExcAC4A_factory)); + factory_map.emplace("cim:ExcAC4A", &ExcAC4A_factory); } void ExcAC4A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAC4A.ka"), &assign_ExcAC4A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC4A.kc"), &assign_ExcAC4A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC4A.ta"), &assign_ExcAC4A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC4A.tb"), &assign_ExcAC4A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC4A.tc"), &assign_ExcAC4A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC4A.vimax"), &assign_ExcAC4A_vimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC4A.vimin"), &assign_ExcAC4A_vimin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC4A.vrmax"), &assign_ExcAC4A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC4A.vrmin"), &assign_ExcAC4A_vrmin)); + assign_map.emplace("cim:ExcAC4A.ka", &assign_ExcAC4A_ka); + assign_map.emplace("cim:ExcAC4A.kc", &assign_ExcAC4A_kc); + assign_map.emplace("cim:ExcAC4A.ta", &assign_ExcAC4A_ta); + assign_map.emplace("cim:ExcAC4A.tb", &assign_ExcAC4A_tb); + assign_map.emplace("cim:ExcAC4A.tc", &assign_ExcAC4A_tc); + assign_map.emplace("cim:ExcAC4A.vimax", &assign_ExcAC4A_vimax); + assign_map.emplace("cim:ExcAC4A.vimin", &assign_ExcAC4A_vimin); + assign_map.emplace("cim:ExcAC4A.vrmax", &assign_ExcAC4A_vrmax); + assign_map.emplace("cim:ExcAC4A.vrmin", &assign_ExcAC4A_vrmin); } void ExcAC4A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcAC4A.hpp b/CGMES_2.4.15_16FEB2016/ExcAC4A.hpp index cbfe82616..d0fc847a7 100644 --- a/CGMES_2.4.15_16FEB2016/ExcAC4A.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcAC4A.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE AC4A alternator-supplied rectifier excitation system with different minimum controller output. - */ + /** \brief Modified IEEE AC4A alternator-supplied rectifier excitation system with different minimum controller output. */ class ExcAC4A : public ExcitationSystemDynamics { public: @@ -28,15 +26,32 @@ namespace CIMPP ExcAC4A(); ~ExcAC4A() override; - CIMPP::PU ka; /* Voltage regulator gain (Ka). Typical Value = 200. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (Ta). Typical Value = 0.015. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (Tb). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (Tc). Typical Value = 1. Default: nullptr */ - CIMPP::PU vimax; /* Maximum voltage regulator input limit (Vimax). Typical Value = 10. Default: nullptr */ - CIMPP::PU vimin; /* Minimum voltage regulator input limit (Vimin). Typical Value = -10. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (Vrmax). Typical Value = 5.64. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (Vrmin). Typical Value = -4.53. Default: nullptr */ + /** \brief Voltage regulator gain (Ka). Typical Value = 200. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0.015. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (Tb). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (Tc). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Maximum voltage regulator input limit (Vimax). Typical Value = 10. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Minimum voltage regulator input limit (Vimin). Typical Value = -10. Default: nullptr */ + CIMPP::PU vimin; + + /** \brief Maximum voltage regulator output (Vrmax). Typical Value = 5.64. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (Vrmin). Typical Value = -4.53. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcAC5A.cpp b/CGMES_2.4.15_16FEB2016/ExcAC5A.cpp index e44f1f114..c0836badb 100644 --- a/CGMES_2.4.15_16FEB2016/ExcAC5A.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcAC5A.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAC5A::ExcAC5A() {}; -ExcAC5A::~ExcAC5A() {}; +ExcAC5A::ExcAC5A() {} +ExcAC5A::~ExcAC5A() {} static const std::list PossibleProfilesForClass = { @@ -74,246 +56,262 @@ ExcAC5A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAC5A_a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_a(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_seefd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_seefd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_tf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_tf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_tf3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_tf3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAC5A_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a; if (!buffer.str().empty()) @@ -327,7 +325,8 @@ bool get_ExcAC5A_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -341,7 +340,8 @@ bool get_ExcAC5A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAC5A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -355,7 +355,8 @@ bool get_ExcAC5A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAC5A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -369,7 +370,8 @@ bool get_ExcAC5A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -383,7 +385,8 @@ bool get_ExcAC5A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -397,7 +400,8 @@ bool get_ExcAC5A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -411,7 +415,8 @@ bool get_ExcAC5A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd1; if (!buffer.str().empty()) @@ -425,7 +430,8 @@ bool get_ExcAC5A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcAC5A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd2; if (!buffer.str().empty()) @@ -439,7 +445,8 @@ bool get_ExcAC5A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcAC5A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -453,7 +460,8 @@ bool get_ExcAC5A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -467,7 +475,8 @@ bool get_ExcAC5A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -481,7 +490,8 @@ bool get_ExcAC5A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -495,7 +505,8 @@ bool get_ExcAC5A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf1; if (!buffer.str().empty()) @@ -509,7 +520,8 @@ bool get_ExcAC5A_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf2; if (!buffer.str().empty()) @@ -523,7 +535,8 @@ bool get_ExcAC5A_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_tf3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf3; if (!buffer.str().empty()) @@ -537,7 +550,8 @@ bool get_ExcAC5A_tf3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -551,7 +565,8 @@ bool get_ExcAC5A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC5A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -563,8 +578,6 @@ bool get_ExcAC5A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcAC5A::debugName[] = "ExcAC5A"; const char* ExcAC5A::debugString() const { @@ -573,29 +586,29 @@ const char* ExcAC5A::debugString() const void ExcAC5A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAC5A"), &ExcAC5A_factory)); + factory_map.emplace("cim:ExcAC5A", &ExcAC5A_factory); } void ExcAC5A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.a"), &assign_ExcAC5A_a)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.efd1"), &assign_ExcAC5A_efd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.efd2"), &assign_ExcAC5A_efd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.ka"), &assign_ExcAC5A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.ke"), &assign_ExcAC5A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.kf"), &assign_ExcAC5A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.ks"), &assign_ExcAC5A_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.seefd1"), &assign_ExcAC5A_seefd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.seefd2"), &assign_ExcAC5A_seefd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.ta"), &assign_ExcAC5A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.tb"), &assign_ExcAC5A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.tc"), &assign_ExcAC5A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.te"), &assign_ExcAC5A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.tf1"), &assign_ExcAC5A_tf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.tf2"), &assign_ExcAC5A_tf2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.tf3"), &assign_ExcAC5A_tf3)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.vrmax"), &assign_ExcAC5A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.vrmin"), &assign_ExcAC5A_vrmin)); + assign_map.emplace("cim:ExcAC5A.a", &assign_ExcAC5A_a); + assign_map.emplace("cim:ExcAC5A.efd1", &assign_ExcAC5A_efd1); + assign_map.emplace("cim:ExcAC5A.efd2", &assign_ExcAC5A_efd2); + assign_map.emplace("cim:ExcAC5A.ka", &assign_ExcAC5A_ka); + assign_map.emplace("cim:ExcAC5A.ke", &assign_ExcAC5A_ke); + assign_map.emplace("cim:ExcAC5A.kf", &assign_ExcAC5A_kf); + assign_map.emplace("cim:ExcAC5A.ks", &assign_ExcAC5A_ks); + assign_map.emplace("cim:ExcAC5A.seefd1", &assign_ExcAC5A_seefd1); + assign_map.emplace("cim:ExcAC5A.seefd2", &assign_ExcAC5A_seefd2); + assign_map.emplace("cim:ExcAC5A.ta", &assign_ExcAC5A_ta); + assign_map.emplace("cim:ExcAC5A.tb", &assign_ExcAC5A_tb); + assign_map.emplace("cim:ExcAC5A.tc", &assign_ExcAC5A_tc); + assign_map.emplace("cim:ExcAC5A.te", &assign_ExcAC5A_te); + assign_map.emplace("cim:ExcAC5A.tf1", &assign_ExcAC5A_tf1); + assign_map.emplace("cim:ExcAC5A.tf2", &assign_ExcAC5A_tf2); + assign_map.emplace("cim:ExcAC5A.tf3", &assign_ExcAC5A_tf3); + assign_map.emplace("cim:ExcAC5A.vrmax", &assign_ExcAC5A_vrmax); + assign_map.emplace("cim:ExcAC5A.vrmin", &assign_ExcAC5A_vrmin); } void ExcAC5A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcAC5A.hpp b/CGMES_2.4.15_16FEB2016/ExcAC5A.hpp index ea67ffeed..17c61ea36 100644 --- a/CGMES_2.4.15_16FEB2016/ExcAC5A.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcAC5A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE AC5A alternator-supplied rectifier excitation system with different minimum controller output. - */ + /** \brief Modified IEEE AC5A alternator-supplied rectifier excitation system with different minimum controller output. */ class ExcAC5A : public ExcitationSystemDynamics { public: @@ -29,24 +27,59 @@ namespace CIMPP ExcAC5A(); ~ExcAC5A() override; - CIMPP::Simple_Float a; /* Coefficient to allow different usage of the model (a). Typical Value = 1. Default: nullptr */ - CIMPP::PU efd1; /* Exciter voltage at which exciter saturation is defined (Efd1). Typical Value = 5.6. Default: nullptr */ - CIMPP::PU efd2; /* Exciter voltage at which exciter saturation is defined (Efd2). Typical Value = 4.2. Default: nullptr */ - CIMPP::PU ka; /* Voltage regulator gain (Ka). Typical Value = 400. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (Kf). Typical Value = 0.03. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float seefd1; /* Exciter saturation function value at the corresponding exciter voltage, Efd1 (S[Efd1]). Typical Value = 0.86. Default: nullptr */ - CIMPP::Simple_Float seefd2; /* Exciter saturation function value at the corresponding exciter voltage, Efd2 (S[Efd2]). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (Ta). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (Tc). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 0.8. Default: nullptr */ - CIMPP::Seconds tf1; /* Excitation control system stabilizer time constant (Tf1). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tf2; /* Excitation control system stabilizer time constant (Tf2). Typical Value = 0.8. Default: nullptr */ - CIMPP::Seconds tf3; /* Excitation control system stabilizer time constant (Tf3). Typical Value = 0. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (Vrmax). Typical Value = 7.3. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (Vrmin). Typical Value =-7.3. Default: nullptr */ + /** \brief Coefficient to allow different usage of the model (a). Typical Value = 1. Default: nullptr */ + CIMPP::Simple_Float a; + + /** \brief Exciter voltage at which exciter saturation is defined (Efd1). Typical Value = 5.6. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Exciter voltage at which exciter saturation is defined (Efd2). Typical Value = 4.2. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief Voltage regulator gain (Ka). Typical Value = 400. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (Kf). Typical Value = 0.03. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Efd1 (S[Efd1]). Typical Value = 0.86. Default: nullptr */ + CIMPP::Simple_Float seefd1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Efd2 (S[Efd2]). Typical Value = 0.5. Default: nullptr */ + CIMPP::Simple_Float seefd2; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (Tc). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 0.8. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (Tf1). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf1; + + /** \brief Excitation control system stabilizer time constant (Tf2). Typical Value = 0.8. Default: nullptr */ + CIMPP::Seconds tf2; + + /** \brief Excitation control system stabilizer time constant (Tf3). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tf3; + + /** \brief Maximum voltage regulator output (Vrmax). Typical Value = 7.3. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (Vrmin). Typical Value =-7.3. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcAC6A.cpp b/CGMES_2.4.15_16FEB2016/ExcAC6A.cpp index b30aa83fe..bcdd5fdcd 100644 --- a/CGMES_2.4.15_16FEB2016/ExcAC6A.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcAC6A.cpp @@ -8,34 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAC6A::ExcAC6A() {}; -ExcAC6A::~ExcAC6A() {}; +ExcAC6A::ExcAC6A() {} +ExcAC6A::~ExcAC6A() {} static const std::list PossibleProfilesForClass = { @@ -84,311 +61,332 @@ ExcAC6A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAC6A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_kh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_th(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_th(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_tj(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_tj(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tj; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_tk(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_tk(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tk; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_vfelim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_vfelim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfelim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_vhmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_vhmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vhmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAC6A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -402,7 +400,8 @@ bool get_ExcAC6A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -416,7 +415,8 @@ bool get_ExcAC6A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -430,7 +430,8 @@ bool get_ExcAC6A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -444,7 +445,8 @@ bool get_ExcAC6A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh; if (!buffer.str().empty()) @@ -458,7 +460,8 @@ bool get_ExcAC6A_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -472,7 +475,8 @@ bool get_ExcAC6A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -486,7 +490,8 @@ bool get_ExcAC6A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC6A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -500,7 +505,8 @@ bool get_ExcAC6A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC6A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -514,7 +520,8 @@ bool get_ExcAC6A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -528,7 +535,8 @@ bool get_ExcAC6A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -542,7 +550,8 @@ bool get_ExcAC6A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -556,7 +565,8 @@ bool get_ExcAC6A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_th(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th; if (!buffer.str().empty()) @@ -570,7 +580,8 @@ bool get_ExcAC6A_th(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_tj(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tj; if (!buffer.str().empty()) @@ -584,7 +595,8 @@ bool get_ExcAC6A_tj(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_tk(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tk; if (!buffer.str().empty()) @@ -598,7 +610,8 @@ bool get_ExcAC6A_tk(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -612,7 +625,8 @@ bool get_ExcAC6A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC6A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -626,7 +640,8 @@ bool get_ExcAC6A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC6A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -640,7 +655,8 @@ bool get_ExcAC6A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -654,7 +670,8 @@ bool get_ExcAC6A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_vfelim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfelim; if (!buffer.str().empty()) @@ -668,7 +685,8 @@ bool get_ExcAC6A_vfelim(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcAC6A_vhmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vhmax; if (!buffer.str().empty()) @@ -682,7 +700,8 @@ bool get_ExcAC6A_vhmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC6A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -696,7 +715,8 @@ bool get_ExcAC6A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC6A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -708,8 +728,6 @@ bool get_ExcAC6A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcAC6A::debugName[] = "ExcAC6A"; const char* ExcAC6A::debugString() const { @@ -718,34 +736,34 @@ const char* ExcAC6A::debugString() const void ExcAC6A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAC6A"), &ExcAC6A_factory)); + factory_map.emplace("cim:ExcAC6A", &ExcAC6A_factory); } void ExcAC6A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.ka"), &assign_ExcAC6A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.kc"), &assign_ExcAC6A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.kd"), &assign_ExcAC6A_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.ke"), &assign_ExcAC6A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.kh"), &assign_ExcAC6A_kh)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.ks"), &assign_ExcAC6A_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.seve1"), &assign_ExcAC6A_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.seve2"), &assign_ExcAC6A_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.ta"), &assign_ExcAC6A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.tb"), &assign_ExcAC6A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.tc"), &assign_ExcAC6A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.te"), &assign_ExcAC6A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.th"), &assign_ExcAC6A_th)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.tj"), &assign_ExcAC6A_tj)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.tk"), &assign_ExcAC6A_tk)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.vamax"), &assign_ExcAC6A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.vamin"), &assign_ExcAC6A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.ve1"), &assign_ExcAC6A_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.ve2"), &assign_ExcAC6A_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.vfelim"), &assign_ExcAC6A_vfelim)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.vhmax"), &assign_ExcAC6A_vhmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.vrmax"), &assign_ExcAC6A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.vrmin"), &assign_ExcAC6A_vrmin)); + assign_map.emplace("cim:ExcAC6A.ka", &assign_ExcAC6A_ka); + assign_map.emplace("cim:ExcAC6A.kc", &assign_ExcAC6A_kc); + assign_map.emplace("cim:ExcAC6A.kd", &assign_ExcAC6A_kd); + assign_map.emplace("cim:ExcAC6A.ke", &assign_ExcAC6A_ke); + assign_map.emplace("cim:ExcAC6A.kh", &assign_ExcAC6A_kh); + assign_map.emplace("cim:ExcAC6A.ks", &assign_ExcAC6A_ks); + assign_map.emplace("cim:ExcAC6A.seve1", &assign_ExcAC6A_seve1); + assign_map.emplace("cim:ExcAC6A.seve2", &assign_ExcAC6A_seve2); + assign_map.emplace("cim:ExcAC6A.ta", &assign_ExcAC6A_ta); + assign_map.emplace("cim:ExcAC6A.tb", &assign_ExcAC6A_tb); + assign_map.emplace("cim:ExcAC6A.tc", &assign_ExcAC6A_tc); + assign_map.emplace("cim:ExcAC6A.te", &assign_ExcAC6A_te); + assign_map.emplace("cim:ExcAC6A.th", &assign_ExcAC6A_th); + assign_map.emplace("cim:ExcAC6A.tj", &assign_ExcAC6A_tj); + assign_map.emplace("cim:ExcAC6A.tk", &assign_ExcAC6A_tk); + assign_map.emplace("cim:ExcAC6A.vamax", &assign_ExcAC6A_vamax); + assign_map.emplace("cim:ExcAC6A.vamin", &assign_ExcAC6A_vamin); + assign_map.emplace("cim:ExcAC6A.ve1", &assign_ExcAC6A_ve1); + assign_map.emplace("cim:ExcAC6A.ve2", &assign_ExcAC6A_ve2); + assign_map.emplace("cim:ExcAC6A.vfelim", &assign_ExcAC6A_vfelim); + assign_map.emplace("cim:ExcAC6A.vhmax", &assign_ExcAC6A_vhmax); + assign_map.emplace("cim:ExcAC6A.vrmax", &assign_ExcAC6A_vrmax); + assign_map.emplace("cim:ExcAC6A.vrmin", &assign_ExcAC6A_vrmin); } void ExcAC6A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcAC6A.hpp b/CGMES_2.4.15_16FEB2016/ExcAC6A.hpp index 0550a756b..9bc679ac4 100644 --- a/CGMES_2.4.15_16FEB2016/ExcAC6A.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcAC6A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE AC6A alternator-supplied rectifier excitation system with speed input. - */ + /** \brief Modified IEEE AC6A alternator-supplied rectifier excitation system with speed input. */ class ExcAC6A : public ExcitationSystemDynamics { public: @@ -29,29 +27,74 @@ namespace CIMPP ExcAC6A(); ~ExcAC6A() override; - CIMPP::PU ka; /* Voltage regulator gain (Ka). Typical Value = 536. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.173. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (Kd). Typical Value = 1.91. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (Ke). Typical Value = 1.6. Default: nullptr */ - CIMPP::PU kh; /* Exciter field current limiter gain (Kh). Typical Value = 92. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, Ve1, back of commutating reactance (Se[Ve1]). Typical Value = 0.214. Default: nullptr */ - CIMPP::Simple_Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, Ve2, back of commutating reactance (Se[Ve2]). Typical Value = 0.044. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (Ta). Typical Value = 0.086. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (Tb). Typical Value = 9. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (Tc). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds th; /* Exciter field current limiter time constant (Th). Typical Value = 0.08. Default: nullptr */ - CIMPP::Seconds tj; /* Exciter field current limiter time constant (Tj). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds tk; /* Voltage regulator time constant (Tk). Typical Value = 0.18. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (Vamax). Typical Value = 75. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (Vamin). Typical Value = -75. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve). Typical Value = 7.4. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve2). Typical Value = 5.55. Default: nullptr */ - CIMPP::PU vfelim; /* Exciter field current limit reference (Vfelim). Typical Value = 19. Default: nullptr */ - CIMPP::PU vhmax; /* Maximum field current limiter signal reference (Vhmax). Typical Value = 75. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (Vrmax). Typical Value = 44. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (Vrmin). Typical Value = -36. Default: nullptr */ + /** \brief Voltage regulator gain (Ka). Typical Value = 536. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.173. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (Kd). Typical Value = 1.91. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter constant related to self-excited field (Ke). Typical Value = 1.6. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Exciter field current limiter gain (Kh). Typical Value = 92. Default: nullptr */ + CIMPP::PU kh; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Ve1, back of commutating reactance (Se[Ve1]). Typical Value = 0.214. Default: nullptr */ + CIMPP::Simple_Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Ve2, back of commutating reactance (Se[Ve2]). Typical Value = 0.044. Default: nullptr */ + CIMPP::Simple_Float seve2; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0.086. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (Tb). Typical Value = 9. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (Tc). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Exciter field current limiter time constant (Th). Typical Value = 0.08. Default: nullptr */ + CIMPP::Seconds th; + + /** \brief Exciter field current limiter time constant (Tj). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds tj; + + /** \brief Voltage regulator time constant (Tk). Typical Value = 0.18. Default: nullptr */ + CIMPP::Seconds tk; + + /** \brief Maximum voltage regulator output (Vamax). Typical Value = 75. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (Vamin). Typical Value = -75. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve). Typical Value = 7.4. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve2). Typical Value = 5.55. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Exciter field current limit reference (Vfelim). Typical Value = 19. Default: nullptr */ + CIMPP::PU vfelim; + + /** \brief Maximum field current limiter signal reference (Vhmax). Typical Value = 75. Default: nullptr */ + CIMPP::PU vhmax; + + /** \brief Maximum voltage regulator output (Vrmax). Typical Value = 44. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (Vrmin). Typical Value = -36. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcAC8B.cpp b/CGMES_2.4.15_16FEB2016/ExcAC8B.cpp index b296f6aca..d43497172 100644 --- a/CGMES_2.4.15_16FEB2016/ExcAC8B.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcAC8B.cpp @@ -8,38 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" using namespace CIMPP; -ExcAC8B::ExcAC8B() {}; -ExcAC8B::~ExcAC8B() {}; +ExcAC8B::ExcAC8B() {} +ExcAC8B::~ExcAC8B() {} static const std::list PossibleProfilesForClass = { @@ -92,363 +65,388 @@ ExcAC8B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAC8B_inlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_inlim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inlim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_kdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_kdr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kdr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_kir(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_kir(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kir; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_kpr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_kpr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_pidlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_pidlim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pidlim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_tdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_tdr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_telim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_telim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->telim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_vemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_vemin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vemin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_vfemax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfemax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_vimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_vpidmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_vpidmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vpidmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_vpidmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_vpidmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vpidmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_vtmult(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_vtmult(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vtmult; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAC8B_inlim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inlim; if (!buffer.str().empty()) @@ -462,7 +460,8 @@ bool get_ExcAC8B_inlim(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC8B_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -476,7 +475,8 @@ bool get_ExcAC8B_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -490,7 +490,8 @@ bool get_ExcAC8B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -504,7 +505,8 @@ bool get_ExcAC8B_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_kdr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdr; if (!buffer.str().empty()) @@ -518,7 +520,8 @@ bool get_ExcAC8B_kdr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -532,7 +535,8 @@ bool get_ExcAC8B_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kir; if (!buffer.str().empty()) @@ -546,7 +550,8 @@ bool get_ExcAC8B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpr; if (!buffer.str().empty()) @@ -560,7 +565,8 @@ bool get_ExcAC8B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -574,7 +580,8 @@ bool get_ExcAC8B_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_pidlim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pidlim; if (!buffer.str().empty()) @@ -588,7 +595,8 @@ bool get_ExcAC8B_pidlim(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcAC8B_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -602,7 +610,8 @@ bool get_ExcAC8B_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC8B_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -616,7 +625,8 @@ bool get_ExcAC8B_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC8B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -630,7 +640,8 @@ bool get_ExcAC8B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_tdr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdr; if (!buffer.str().empty()) @@ -644,7 +655,8 @@ bool get_ExcAC8B_tdr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -658,7 +670,8 @@ bool get_ExcAC8B_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_telim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->telim; if (!buffer.str().empty()) @@ -672,7 +685,8 @@ bool get_ExcAC8B_telim(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC8B_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -686,7 +700,8 @@ bool get_ExcAC8B_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -700,7 +715,8 @@ bool get_ExcAC8B_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vemin; if (!buffer.str().empty()) @@ -714,7 +730,8 @@ bool get_ExcAC8B_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC8B_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfemax; if (!buffer.str().empty()) @@ -728,7 +745,8 @@ bool get_ExcAC8B_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcAC8B_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -742,7 +760,8 @@ bool get_ExcAC8B_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC8B_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimin; if (!buffer.str().empty()) @@ -756,7 +775,8 @@ bool get_ExcAC8B_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC8B_vpidmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vpidmax; if (!buffer.str().empty()) @@ -770,7 +790,8 @@ bool get_ExcAC8B_vpidmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcAC8B_vpidmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vpidmin; if (!buffer.str().empty()) @@ -784,7 +805,8 @@ bool get_ExcAC8B_vpidmin(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcAC8B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -798,7 +820,8 @@ bool get_ExcAC8B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC8B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -812,7 +835,8 @@ bool get_ExcAC8B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC8B_vtmult(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vtmult; if (!buffer.str().empty()) @@ -824,8 +848,6 @@ bool get_ExcAC8B_vtmult(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char ExcAC8B::debugName[] = "ExcAC8B"; const char* ExcAC8B::debugString() const { @@ -834,38 +856,38 @@ const char* ExcAC8B::debugString() const void ExcAC8B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAC8B"), &ExcAC8B_factory)); + factory_map.emplace("cim:ExcAC8B", &ExcAC8B_factory); } void ExcAC8B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.inlim"), &assign_ExcAC8B_inlim)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.ka"), &assign_ExcAC8B_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.kc"), &assign_ExcAC8B_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.kd"), &assign_ExcAC8B_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.kdr"), &assign_ExcAC8B_kdr)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.ke"), &assign_ExcAC8B_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.kir"), &assign_ExcAC8B_kir)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.kpr"), &assign_ExcAC8B_kpr)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.ks"), &assign_ExcAC8B_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.pidlim"), &assign_ExcAC8B_pidlim)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.seve1"), &assign_ExcAC8B_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.seve2"), &assign_ExcAC8B_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.ta"), &assign_ExcAC8B_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.tdr"), &assign_ExcAC8B_tdr)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.te"), &assign_ExcAC8B_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.telim"), &assign_ExcAC8B_telim)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.ve1"), &assign_ExcAC8B_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.ve2"), &assign_ExcAC8B_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.vemin"), &assign_ExcAC8B_vemin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.vfemax"), &assign_ExcAC8B_vfemax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.vimax"), &assign_ExcAC8B_vimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.vimin"), &assign_ExcAC8B_vimin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.vpidmax"), &assign_ExcAC8B_vpidmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.vpidmin"), &assign_ExcAC8B_vpidmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.vrmax"), &assign_ExcAC8B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.vrmin"), &assign_ExcAC8B_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.vtmult"), &assign_ExcAC8B_vtmult)); + assign_map.emplace("cim:ExcAC8B.inlim", &assign_ExcAC8B_inlim); + assign_map.emplace("cim:ExcAC8B.ka", &assign_ExcAC8B_ka); + assign_map.emplace("cim:ExcAC8B.kc", &assign_ExcAC8B_kc); + assign_map.emplace("cim:ExcAC8B.kd", &assign_ExcAC8B_kd); + assign_map.emplace("cim:ExcAC8B.kdr", &assign_ExcAC8B_kdr); + assign_map.emplace("cim:ExcAC8B.ke", &assign_ExcAC8B_ke); + assign_map.emplace("cim:ExcAC8B.kir", &assign_ExcAC8B_kir); + assign_map.emplace("cim:ExcAC8B.kpr", &assign_ExcAC8B_kpr); + assign_map.emplace("cim:ExcAC8B.ks", &assign_ExcAC8B_ks); + assign_map.emplace("cim:ExcAC8B.pidlim", &assign_ExcAC8B_pidlim); + assign_map.emplace("cim:ExcAC8B.seve1", &assign_ExcAC8B_seve1); + assign_map.emplace("cim:ExcAC8B.seve2", &assign_ExcAC8B_seve2); + assign_map.emplace("cim:ExcAC8B.ta", &assign_ExcAC8B_ta); + assign_map.emplace("cim:ExcAC8B.tdr", &assign_ExcAC8B_tdr); + assign_map.emplace("cim:ExcAC8B.te", &assign_ExcAC8B_te); + assign_map.emplace("cim:ExcAC8B.telim", &assign_ExcAC8B_telim); + assign_map.emplace("cim:ExcAC8B.ve1", &assign_ExcAC8B_ve1); + assign_map.emplace("cim:ExcAC8B.ve2", &assign_ExcAC8B_ve2); + assign_map.emplace("cim:ExcAC8B.vemin", &assign_ExcAC8B_vemin); + assign_map.emplace("cim:ExcAC8B.vfemax", &assign_ExcAC8B_vfemax); + assign_map.emplace("cim:ExcAC8B.vimax", &assign_ExcAC8B_vimax); + assign_map.emplace("cim:ExcAC8B.vimin", &assign_ExcAC8B_vimin); + assign_map.emplace("cim:ExcAC8B.vpidmax", &assign_ExcAC8B_vpidmax); + assign_map.emplace("cim:ExcAC8B.vpidmin", &assign_ExcAC8B_vpidmin); + assign_map.emplace("cim:ExcAC8B.vrmax", &assign_ExcAC8B_vrmax); + assign_map.emplace("cim:ExcAC8B.vrmin", &assign_ExcAC8B_vrmin); + assign_map.emplace("cim:ExcAC8B.vtmult", &assign_ExcAC8B_vtmult); } void ExcAC8B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcAC8B.hpp b/CGMES_2.4.15_16FEB2016/ExcAC8B.hpp index 031fb5eca..578b1a281 100644 --- a/CGMES_2.4.15_16FEB2016/ExcAC8B.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcAC8B.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE AC8B alternator-supplied rectifier excitation system with speed input and input limiter. - */ + /** \brief Modified IEEE AC8B alternator-supplied rectifier excitation system with speed input and input limiter. */ class ExcAC8B : public ExcitationSystemDynamics { public: @@ -30,33 +28,86 @@ namespace CIMPP ExcAC8B(); ~ExcAC8B() override; - CIMPP::Boolean inlim; /* Input limiter indicator. true = input limiter Vimax and Vimin is considered false = input limiter Vimax and Vimin is not considered. Typical Value = true. Default: false */ - CIMPP::PU ka; /* Voltage regulator gain (Ka). Typical Value = 1. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.55. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (Kd). Typical Value = 1.1. Default: nullptr */ - CIMPP::PU kdr; /* Voltage regulator derivative gain (Kdr). Typical Value = 10. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ - CIMPP::PU kir; /* Voltage regulator integral gain (Kir). Typical Value = 5. Default: nullptr */ - CIMPP::PU kpr; /* Voltage regulator proportional gain (Kpr). Typical Value = 80. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ - CIMPP::Boolean pidlim; /* PID limiter indicator. true = input limiter Vpidmax and Vpidmin is considered false = input limiter Vpidmax and Vpidmin is not considered. Typical Value = true. Default: false */ - CIMPP::Simple_Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, Ve, back of commutating reactance (Se[Ve1]). Typical Value = 0.3. Default: nullptr */ - CIMPP::Simple_Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, Ve, back of commutating reactance (Se[Ve2]). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (Ta). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tdr; /* Lag time constant (Tdr). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 1.2. Default: nullptr */ - CIMPP::Boolean telim; /* Selector for the limiter on the block [1/sTe]. See diagram for meaning of true and false. Typical Value = false. Default: false */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve) equals V (Ve1). Typical Value = 6.5. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve). Typical Value = 9. Default: nullptr */ - CIMPP::PU vemin; /* Minimum exciter voltage output (Vemin). Typical Value = 0. Default: nullptr */ - CIMPP::PU vfemax; /* Exciter field current limit reference (Vfemax). Typical Value = 6. Default: nullptr */ - CIMPP::PU vimax; /* Input signal maximum (Vimax). Typical Value = 35. Default: nullptr */ - CIMPP::PU vimin; /* Input signal minimum (Vimin). Typical Value = -10. Default: nullptr */ - CIMPP::PU vpidmax; /* PID maximum controller output (Vpidmax). Typical Value = 35. Default: nullptr */ - CIMPP::PU vpidmin; /* PID minimum controller output (Vpidmin). Typical Value = -10. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (Vrmax). Typical Value = 35. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (Vrmin). Typical Value = 0. Default: nullptr */ - CIMPP::Boolean vtmult; /* Multiply by generator`s terminal voltage indicator. true =the limits Vrmax and Vrmin are multiplied by the generator`s terminal voltage to represent a thyristor power stage fed from the generator terminals false = limits are not multiplied by generator`s terminal voltage. Typical Value = false. Default: false */ + /** \brief Input limiter indicator. true = input limiter Vimax and Vimin is considered false = input limiter Vimax and Vimin is not considered. Typical Value = true. Default: false */ + CIMPP::Boolean inlim; + + /** \brief Voltage regulator gain (Ka). Typical Value = 1. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.55. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (Kd). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Voltage regulator derivative gain (Kdr). Typical Value = 10. Default: nullptr */ + CIMPP::PU kdr; + + /** \brief Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Voltage regulator integral gain (Kir). Typical Value = 5. Default: nullptr */ + CIMPP::PU kir; + + /** \brief Voltage regulator proportional gain (Kpr). Typical Value = 80. Default: nullptr */ + CIMPP::PU kpr; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief PID limiter indicator. true = input limiter Vpidmax and Vpidmin is considered false = input limiter Vpidmax and Vpidmin is not considered. Typical Value = true. Default: false */ + CIMPP::Boolean pidlim; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Ve, back of commutating reactance (Se[Ve1]). Typical Value = 0.3. Default: nullptr */ + CIMPP::Simple_Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Ve, back of commutating reactance (Se[Ve2]). Typical Value = 3. Default: nullptr */ + CIMPP::Simple_Float seve2; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Lag time constant (Tdr). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tdr; + + /** \brief Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 1.2. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Selector for the limiter on the block [1/sTe]. See diagram for meaning of true and false. Typical Value = false. Default: false */ + CIMPP::Boolean telim; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve) equals V (Ve1). Typical Value = 6.5. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve). Typical Value = 9. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Minimum exciter voltage output (Vemin). Typical Value = 0. Default: nullptr */ + CIMPP::PU vemin; + + /** \brief Exciter field current limit reference (Vfemax). Typical Value = 6. Default: nullptr */ + CIMPP::PU vfemax; + + /** \brief Input signal maximum (Vimax). Typical Value = 35. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Input signal minimum (Vimin). Typical Value = -10. Default: nullptr */ + CIMPP::PU vimin; + + /** \brief PID maximum controller output (Vpidmax). Typical Value = 35. Default: nullptr */ + CIMPP::PU vpidmax; + + /** \brief PID minimum controller output (Vpidmin). Typical Value = -10. Default: nullptr */ + CIMPP::PU vpidmin; + + /** \brief Maximum voltage regulator output (Vrmax). Typical Value = 35. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (Vrmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief Multiply by generator`s terminal voltage indicator. true =the limits Vrmax and Vrmin are multiplied by the generator`s terminal voltage to represent a thyristor power stage fed from the generator terminals false = limits are not multiplied by generator`s terminal voltage. Typical Value = false. Default: false */ + CIMPP::Boolean vtmult; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcANS.cpp b/CGMES_2.4.15_16FEB2016/ExcANS.cpp index 47d299ea9..afc2cb7d6 100644 --- a/CGMES_2.4.15_16FEB2016/ExcANS.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcANS.cpp @@ -8,25 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Integer.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Integer.hpp" -#include "Integer.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcANS::ExcANS() {}; -ExcANS::~ExcANS() {}; +ExcANS::ExcANS() {} +ExcANS::~ExcANS() {} static const std::list PossibleProfilesForClass = { @@ -66,194 +52,206 @@ ExcANS::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcANS_blint(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_blint(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->blint; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_ifmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_ifmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ifmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_ifmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_ifmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ifmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_kce(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_kce(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kce; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_krvecc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_krvecc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->krvecc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_kvfif(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_kvfif(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kvfif; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_vrmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_vrmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_vrmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_vrmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcANS_blint(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->blint; if (!buffer.str().empty()) @@ -267,7 +265,8 @@ bool get_ExcANS_blint(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcANS_ifmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ifmn; if (!buffer.str().empty()) @@ -281,7 +280,8 @@ bool get_ExcANS_ifmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_ifmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ifmx; if (!buffer.str().empty()) @@ -295,7 +295,8 @@ bool get_ExcANS_ifmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -309,7 +310,8 @@ bool get_ExcANS_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -323,7 +325,8 @@ bool get_ExcANS_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_kce(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kce; if (!buffer.str().empty()) @@ -337,7 +340,8 @@ bool get_ExcANS_kce(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_krvecc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->krvecc; if (!buffer.str().empty()) @@ -351,7 +355,8 @@ bool get_ExcANS_krvecc(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcANS_kvfif(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kvfif; if (!buffer.str().empty()) @@ -365,7 +370,8 @@ bool get_ExcANS_kvfif(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcANS_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -379,7 +385,8 @@ bool get_ExcANS_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -393,7 +400,8 @@ bool get_ExcANS_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -407,7 +415,8 @@ bool get_ExcANS_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -421,7 +430,8 @@ bool get_ExcANS_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmn; if (!buffer.str().empty()) @@ -435,7 +445,8 @@ bool get_ExcANS_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmx; if (!buffer.str().empty()) @@ -447,8 +458,6 @@ bool get_ExcANS_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcANS::debugName[] = "ExcANS"; const char* ExcANS::debugString() const { @@ -457,25 +466,25 @@ const char* ExcANS::debugString() const void ExcANS::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcANS"), &ExcANS_factory)); + factory_map.emplace("cim:ExcANS", &ExcANS_factory); } void ExcANS::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcANS.blint"), &assign_ExcANS_blint)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.ifmn"), &assign_ExcANS_ifmn)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.ifmx"), &assign_ExcANS_ifmx)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.k2"), &assign_ExcANS_k2)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.k3"), &assign_ExcANS_k3)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.kce"), &assign_ExcANS_kce)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.krvecc"), &assign_ExcANS_krvecc)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.kvfif"), &assign_ExcANS_kvfif)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.t1"), &assign_ExcANS_t1)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.t2"), &assign_ExcANS_t2)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.t3"), &assign_ExcANS_t3)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.tb"), &assign_ExcANS_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.vrmn"), &assign_ExcANS_vrmn)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.vrmx"), &assign_ExcANS_vrmx)); + assign_map.emplace("cim:ExcANS.blint", &assign_ExcANS_blint); + assign_map.emplace("cim:ExcANS.ifmn", &assign_ExcANS_ifmn); + assign_map.emplace("cim:ExcANS.ifmx", &assign_ExcANS_ifmx); + assign_map.emplace("cim:ExcANS.k2", &assign_ExcANS_k2); + assign_map.emplace("cim:ExcANS.k3", &assign_ExcANS_k3); + assign_map.emplace("cim:ExcANS.kce", &assign_ExcANS_kce); + assign_map.emplace("cim:ExcANS.krvecc", &assign_ExcANS_krvecc); + assign_map.emplace("cim:ExcANS.kvfif", &assign_ExcANS_kvfif); + assign_map.emplace("cim:ExcANS.t1", &assign_ExcANS_t1); + assign_map.emplace("cim:ExcANS.t2", &assign_ExcANS_t2); + assign_map.emplace("cim:ExcANS.t3", &assign_ExcANS_t3); + assign_map.emplace("cim:ExcANS.tb", &assign_ExcANS_tb); + assign_map.emplace("cim:ExcANS.vrmn", &assign_ExcANS_vrmn); + assign_map.emplace("cim:ExcANS.vrmx", &assign_ExcANS_vrmx); } void ExcANS::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcANS.hpp b/CGMES_2.4.15_16FEB2016/ExcANS.hpp index f7070ce55..b1ba9b1be 100644 --- a/CGMES_2.4.15_16FEB2016/ExcANS.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcANS.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Italian excitation system. It represents static field voltage or excitation current feedback excitation system. - */ + /** \brief Italian excitation system. It represents static field voltage or excitation current feedback excitation system. */ class ExcANS : public ExcitationSystemDynamics { public: @@ -30,20 +28,47 @@ namespace CIMPP ExcANS(); ~ExcANS() override; - CIMPP::Integer blint; /* Governor Control Flag (BLINT). 0 = lead-lag regulator 1 = proportional integral regulator. Typical Value = 0. Default: 0 */ - CIMPP::PU ifmn; /* Minimum exciter current (I). Typical Value = -5.2. Default: nullptr */ - CIMPP::PU ifmx; /* Maximum exciter current (I). Typical Value = 6.5. Default: nullptr */ - CIMPP::Simple_Float k2; /* Exciter gain (K). Typical Value = 20. Default: nullptr */ - CIMPP::Simple_Float k3; /* AVR gain (K). Typical Value = 1000. Default: nullptr */ - CIMPP::Simple_Float kce; /* Ceiling factor (K). Typical Value = 1. Default: nullptr */ - CIMPP::Integer krvecc; /* Feedback enabling (K). 0 = Open loop control 1 = Closed loop control. Typical Value = 1. Default: 0 */ - CIMPP::Integer kvfif; /* Rate feedback signal flag (K). 0 = output voltage of the exciter 1 = exciter field current. Typical Value = 0. Default: 0 */ - CIMPP::Seconds t1; /* Time constant (T). Typical Value = 20. Default: nullptr */ - CIMPP::Seconds t2; /* Time constant (T). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds t3; /* Time constant (T). Typical Value = 1.6. Default: nullptr */ - CIMPP::Seconds tb; /* Exciter time constant (T). Typical Value = 0.04. Default: nullptr */ - CIMPP::PU vrmn; /* Maximum AVR output (V). Typical Value = -5.2. Default: nullptr */ - CIMPP::PU vrmx; /* Minimum AVR output (V). Typical Value = 6.5. Default: nullptr */ + /** \brief Governor Control Flag (BLINT). 0 = lead-lag regulator 1 = proportional integral regulator. Typical Value = 0. Default: 0 */ + CIMPP::Integer blint; + + /** \brief Minimum exciter current (I). Typical Value = -5.2. Default: nullptr */ + CIMPP::PU ifmn; + + /** \brief Maximum exciter current (I). Typical Value = 6.5. Default: nullptr */ + CIMPP::PU ifmx; + + /** \brief Exciter gain (K). Typical Value = 20. Default: nullptr */ + CIMPP::Simple_Float k2; + + /** \brief AVR gain (K). Typical Value = 1000. Default: nullptr */ + CIMPP::Simple_Float k3; + + /** \brief Ceiling factor (K). Typical Value = 1. Default: nullptr */ + CIMPP::Simple_Float kce; + + /** \brief Feedback enabling (K). 0 = Open loop control 1 = Closed loop control. Typical Value = 1. Default: 0 */ + CIMPP::Integer krvecc; + + /** \brief Rate feedback signal flag (K). 0 = output voltage of the exciter 1 = exciter field current. Typical Value = 0. Default: 0 */ + CIMPP::Integer kvfif; + + /** \brief Time constant (T). Typical Value = 20. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Time constant (T). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Time constant (T). Typical Value = 1.6. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Exciter time constant (T). Typical Value = 0.04. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Maximum AVR output (V). Typical Value = -5.2. Default: nullptr */ + CIMPP::PU vrmn; + + /** \brief Minimum AVR output (V). Typical Value = 6.5. Default: nullptr */ + CIMPP::PU vrmx; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcAVR1.cpp b/CGMES_2.4.15_16FEB2016/ExcAVR1.cpp index ebacbeeaa..3daf41454 100644 --- a/CGMES_2.4.15_16FEB2016/ExcAVR1.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcAVR1.cpp @@ -8,23 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAVR1::ExcAVR1() {}; -ExcAVR1::~ExcAVR1() {}; +ExcAVR1::ExcAVR1() {} +ExcAVR1::~ExcAVR1() {} static const std::list PossibleProfilesForClass = { @@ -62,168 +50,178 @@ ExcAVR1::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAVR1_e1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_e1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_e2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_e2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_se1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_se1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_se2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_se2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_vrmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_vrmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_vrmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_vrmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAVR1_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e1; if (!buffer.str().empty()) @@ -237,7 +235,8 @@ bool get_ExcAVR1_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e2; if (!buffer.str().empty()) @@ -251,7 +250,8 @@ bool get_ExcAVR1_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -265,7 +265,8 @@ bool get_ExcAVR1_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -279,7 +280,8 @@ bool get_ExcAVR1_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se1; if (!buffer.str().empty()) @@ -293,7 +295,8 @@ bool get_ExcAVR1_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se2; if (!buffer.str().empty()) @@ -307,7 +310,8 @@ bool get_ExcAVR1_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -321,7 +325,8 @@ bool get_ExcAVR1_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -335,7 +340,8 @@ bool get_ExcAVR1_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -349,7 +355,8 @@ bool get_ExcAVR1_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -363,7 +370,8 @@ bool get_ExcAVR1_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmn; if (!buffer.str().empty()) @@ -377,7 +385,8 @@ bool get_ExcAVR1_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAVR1_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmx; if (!buffer.str().empty()) @@ -389,8 +398,6 @@ bool get_ExcAVR1_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char ExcAVR1::debugName[] = "ExcAVR1"; const char* ExcAVR1::debugString() const { @@ -399,23 +406,23 @@ const char* ExcAVR1::debugString() const void ExcAVR1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAVR1"), &ExcAVR1_factory)); + factory_map.emplace("cim:ExcAVR1", &ExcAVR1_factory); } void ExcAVR1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.e1"), &assign_ExcAVR1_e1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.e2"), &assign_ExcAVR1_e2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.ka"), &assign_ExcAVR1_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.kf"), &assign_ExcAVR1_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.se1"), &assign_ExcAVR1_se1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.se2"), &assign_ExcAVR1_se2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.ta"), &assign_ExcAVR1_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.tb"), &assign_ExcAVR1_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.te"), &assign_ExcAVR1_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.tf"), &assign_ExcAVR1_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.vrmn"), &assign_ExcAVR1_vrmn)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.vrmx"), &assign_ExcAVR1_vrmx)); + assign_map.emplace("cim:ExcAVR1.e1", &assign_ExcAVR1_e1); + assign_map.emplace("cim:ExcAVR1.e2", &assign_ExcAVR1_e2); + assign_map.emplace("cim:ExcAVR1.ka", &assign_ExcAVR1_ka); + assign_map.emplace("cim:ExcAVR1.kf", &assign_ExcAVR1_kf); + assign_map.emplace("cim:ExcAVR1.se1", &assign_ExcAVR1_se1); + assign_map.emplace("cim:ExcAVR1.se2", &assign_ExcAVR1_se2); + assign_map.emplace("cim:ExcAVR1.ta", &assign_ExcAVR1_ta); + assign_map.emplace("cim:ExcAVR1.tb", &assign_ExcAVR1_tb); + assign_map.emplace("cim:ExcAVR1.te", &assign_ExcAVR1_te); + assign_map.emplace("cim:ExcAVR1.tf", &assign_ExcAVR1_tf); + assign_map.emplace("cim:ExcAVR1.vrmn", &assign_ExcAVR1_vrmn); + assign_map.emplace("cim:ExcAVR1.vrmx", &assign_ExcAVR1_vrmx); } void ExcAVR1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcAVR1.hpp b/CGMES_2.4.15_16FEB2016/ExcAVR1.hpp index 7362bd560..867d7920d 100644 --- a/CGMES_2.4.15_16FEB2016/ExcAVR1.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcAVR1.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Italian excitation system corresponding to IEEE (1968) Type 1 Model. It represents exciter dynamo and electromechanical regulator. - */ + /** \brief Italian excitation system corresponding to IEEE (1968) Type 1 Model. It represents exciter dynamo and electromechanical regulator. */ class ExcAVR1 : public ExcitationSystemDynamics { public: @@ -29,18 +27,41 @@ namespace CIMPP ExcAVR1(); ~ExcAVR1() override; - CIMPP::PU e1; /* Field voltage value 1 (E1). Typical Value = 4.18. Default: nullptr */ - CIMPP::PU e2; /* Field voltage value 2 (E2). Typical Value = 3.14. Default: nullptr */ - CIMPP::Simple_Float ka; /* AVR gain (K). Typical Value = 500. Default: nullptr */ - CIMPP::Simple_Float kf; /* Rate feedback gain (K). Typical Value = 0.02. Default: nullptr */ - CIMPP::Simple_Float se1; /* Saturation factor at E1 (S(E1)). Typical Value = 0.1. Default: nullptr */ - CIMPP::Simple_Float se2; /* Saturation factor at E2 (S(E2)). Typical Value = 0.03. Default: nullptr */ - CIMPP::Seconds ta; /* AVR time constant (T). Typical Value = 0.2. Default: nullptr */ - CIMPP::Seconds tb; /* AVR time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tf; /* Rate feedback time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmn; /* Maximum AVR output (V). Typical Value = -6. Default: nullptr */ - CIMPP::PU vrmx; /* Minimum AVR output (V). Typical Value = 7. Default: nullptr */ + /** \brief Field voltage value 1 (E1). Typical Value = 4.18. Default: nullptr */ + CIMPP::PU e1; + + /** \brief Field voltage value 2 (E2). Typical Value = 3.14. Default: nullptr */ + CIMPP::PU e2; + + /** \brief AVR gain (K). Typical Value = 500. Default: nullptr */ + CIMPP::Simple_Float ka; + + /** \brief Rate feedback gain (K). Typical Value = 0.02. Default: nullptr */ + CIMPP::Simple_Float kf; + + /** \brief Saturation factor at E1 (S(E1)). Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float se1; + + /** \brief Saturation factor at E2 (S(E2)). Typical Value = 0.03. Default: nullptr */ + CIMPP::Simple_Float se2; + + /** \brief AVR time constant (T). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief AVR time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Exciter time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Rate feedback time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum AVR output (V). Typical Value = -6. Default: nullptr */ + CIMPP::PU vrmn; + + /** \brief Minimum AVR output (V). Typical Value = 7. Default: nullptr */ + CIMPP::PU vrmx; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcAVR2.cpp b/CGMES_2.4.15_16FEB2016/ExcAVR2.cpp index 8c06474e9..c9f8d13de 100644 --- a/CGMES_2.4.15_16FEB2016/ExcAVR2.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcAVR2.cpp @@ -8,24 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAVR2::ExcAVR2() {}; -ExcAVR2::~ExcAVR2() {}; +ExcAVR2::ExcAVR2() {} +ExcAVR2::~ExcAVR2() {} static const std::list PossibleProfilesForClass = { @@ -64,181 +51,192 @@ ExcAVR2::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAVR2_e1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_e1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_e2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_e2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_se1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_se1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_se2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_se2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_tf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_tf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_vrmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_vrmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_vrmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_vrmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAVR2_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e1; if (!buffer.str().empty()) @@ -252,7 +250,8 @@ bool get_ExcAVR2_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e2; if (!buffer.str().empty()) @@ -266,7 +265,8 @@ bool get_ExcAVR2_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -280,7 +280,8 @@ bool get_ExcAVR2_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -294,7 +295,8 @@ bool get_ExcAVR2_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se1; if (!buffer.str().empty()) @@ -308,7 +310,8 @@ bool get_ExcAVR2_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se2; if (!buffer.str().empty()) @@ -322,7 +325,8 @@ bool get_ExcAVR2_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -336,7 +340,8 @@ bool get_ExcAVR2_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -350,7 +355,8 @@ bool get_ExcAVR2_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -364,7 +370,8 @@ bool get_ExcAVR2_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf1; if (!buffer.str().empty()) @@ -378,7 +385,8 @@ bool get_ExcAVR2_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf2; if (!buffer.str().empty()) @@ -392,7 +400,8 @@ bool get_ExcAVR2_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmn; if (!buffer.str().empty()) @@ -406,7 +415,8 @@ bool get_ExcAVR2_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAVR2_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmx; if (!buffer.str().empty()) @@ -418,8 +428,6 @@ bool get_ExcAVR2_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char ExcAVR2::debugName[] = "ExcAVR2"; const char* ExcAVR2::debugString() const { @@ -428,24 +436,24 @@ const char* ExcAVR2::debugString() const void ExcAVR2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAVR2"), &ExcAVR2_factory)); + factory_map.emplace("cim:ExcAVR2", &ExcAVR2_factory); } void ExcAVR2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.e1"), &assign_ExcAVR2_e1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.e2"), &assign_ExcAVR2_e2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.ka"), &assign_ExcAVR2_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.kf"), &assign_ExcAVR2_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.se1"), &assign_ExcAVR2_se1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.se2"), &assign_ExcAVR2_se2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.ta"), &assign_ExcAVR2_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.tb"), &assign_ExcAVR2_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.te"), &assign_ExcAVR2_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.tf1"), &assign_ExcAVR2_tf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.tf2"), &assign_ExcAVR2_tf2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.vrmn"), &assign_ExcAVR2_vrmn)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.vrmx"), &assign_ExcAVR2_vrmx)); + assign_map.emplace("cim:ExcAVR2.e1", &assign_ExcAVR2_e1); + assign_map.emplace("cim:ExcAVR2.e2", &assign_ExcAVR2_e2); + assign_map.emplace("cim:ExcAVR2.ka", &assign_ExcAVR2_ka); + assign_map.emplace("cim:ExcAVR2.kf", &assign_ExcAVR2_kf); + assign_map.emplace("cim:ExcAVR2.se1", &assign_ExcAVR2_se1); + assign_map.emplace("cim:ExcAVR2.se2", &assign_ExcAVR2_se2); + assign_map.emplace("cim:ExcAVR2.ta", &assign_ExcAVR2_ta); + assign_map.emplace("cim:ExcAVR2.tb", &assign_ExcAVR2_tb); + assign_map.emplace("cim:ExcAVR2.te", &assign_ExcAVR2_te); + assign_map.emplace("cim:ExcAVR2.tf1", &assign_ExcAVR2_tf1); + assign_map.emplace("cim:ExcAVR2.tf2", &assign_ExcAVR2_tf2); + assign_map.emplace("cim:ExcAVR2.vrmn", &assign_ExcAVR2_vrmn); + assign_map.emplace("cim:ExcAVR2.vrmx", &assign_ExcAVR2_vrmx); } void ExcAVR2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcAVR2.hpp b/CGMES_2.4.15_16FEB2016/ExcAVR2.hpp index 7cbf8178f..4ef10bee6 100644 --- a/CGMES_2.4.15_16FEB2016/ExcAVR2.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcAVR2.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Italian excitation system corresponding to IEEE (1968) Type 2 Model. It represents alternator and rotating diodes and electromechanic voltage regulators. - */ + /** \brief Italian excitation system corresponding to IEEE (1968) Type 2 Model. It represents alternator and rotating diodes and electromechanic voltage regulators. */ class ExcAVR2 : public ExcitationSystemDynamics { public: @@ -29,19 +27,44 @@ namespace CIMPP ExcAVR2(); ~ExcAVR2() override; - CIMPP::PU e1; /* Field voltage value 1 (E1). Typical Value = 4.18. Default: nullptr */ - CIMPP::PU e2; /* Field voltage value 2 (E2). Typical Value = 3.14. Default: nullptr */ - CIMPP::Simple_Float ka; /* AVR gain (K). Typical Value = 500. Default: nullptr */ - CIMPP::Simple_Float kf; /* Rate feedback gain (K). Typical Value = 0.02. Default: nullptr */ - CIMPP::Simple_Float se1; /* Saturation factor at E1 (S(E1)). Typical Value = 0.1. Default: nullptr */ - CIMPP::Simple_Float se2; /* Saturation factor at E2 (S(E2)). Typical Value = 0.03. Default: nullptr */ - CIMPP::Seconds ta; /* AVR time constant (T). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds tb; /* AVR time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tf1; /* Rate feedback time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tf2; /* Rate feedback time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmn; /* Maximum AVR output (V). Typical Value = -6. Default: nullptr */ - CIMPP::PU vrmx; /* Minimum AVR output (V). Typical Value = 7. Default: nullptr */ + /** \brief Field voltage value 1 (E1). Typical Value = 4.18. Default: nullptr */ + CIMPP::PU e1; + + /** \brief Field voltage value 2 (E2). Typical Value = 3.14. Default: nullptr */ + CIMPP::PU e2; + + /** \brief AVR gain (K). Typical Value = 500. Default: nullptr */ + CIMPP::Simple_Float ka; + + /** \brief Rate feedback gain (K). Typical Value = 0.02. Default: nullptr */ + CIMPP::Simple_Float kf; + + /** \brief Saturation factor at E1 (S(E1)). Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float se1; + + /** \brief Saturation factor at E2 (S(E2)). Typical Value = 0.03. Default: nullptr */ + CIMPP::Simple_Float se2; + + /** \brief AVR time constant (T). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief AVR time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Exciter time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Rate feedback time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf1; + + /** \brief Rate feedback time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf2; + + /** \brief Maximum AVR output (V). Typical Value = -6. Default: nullptr */ + CIMPP::PU vrmn; + + /** \brief Minimum AVR output (V). Typical Value = 7. Default: nullptr */ + CIMPP::PU vrmx; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcAVR3.cpp b/CGMES_2.4.15_16FEB2016/ExcAVR3.cpp index 00da9f06e..a58bdda7d 100644 --- a/CGMES_2.4.15_16FEB2016/ExcAVR3.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcAVR3.cpp @@ -8,23 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAVR3::ExcAVR3() {}; -ExcAVR3::~ExcAVR3() {}; +ExcAVR3::ExcAVR3() {} +ExcAVR3::~ExcAVR3() {} static const std::list PossibleProfilesForClass = { @@ -62,168 +50,178 @@ ExcAVR3::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAVR3_e1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_e1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_e2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_e2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_se1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_se1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_se2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_se2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_vrmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_vrmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_vrmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_vrmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAVR3_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e1; if (!buffer.str().empty()) @@ -237,7 +235,8 @@ bool get_ExcAVR3_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e2; if (!buffer.str().empty()) @@ -251,7 +250,8 @@ bool get_ExcAVR3_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -265,7 +265,8 @@ bool get_ExcAVR3_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se1; if (!buffer.str().empty()) @@ -279,7 +280,8 @@ bool get_ExcAVR3_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se2; if (!buffer.str().empty()) @@ -293,7 +295,8 @@ bool get_ExcAVR3_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -307,7 +310,8 @@ bool get_ExcAVR3_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -321,7 +325,8 @@ bool get_ExcAVR3_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -335,7 +340,8 @@ bool get_ExcAVR3_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -349,7 +355,8 @@ bool get_ExcAVR3_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -363,7 +370,8 @@ bool get_ExcAVR3_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmn; if (!buffer.str().empty()) @@ -377,7 +385,8 @@ bool get_ExcAVR3_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAVR3_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmx; if (!buffer.str().empty()) @@ -389,8 +398,6 @@ bool get_ExcAVR3_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char ExcAVR3::debugName[] = "ExcAVR3"; const char* ExcAVR3::debugString() const { @@ -399,23 +406,23 @@ const char* ExcAVR3::debugString() const void ExcAVR3::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAVR3"), &ExcAVR3_factory)); + factory_map.emplace("cim:ExcAVR3", &ExcAVR3_factory); } void ExcAVR3::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.e1"), &assign_ExcAVR3_e1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.e2"), &assign_ExcAVR3_e2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.ka"), &assign_ExcAVR3_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.se1"), &assign_ExcAVR3_se1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.se2"), &assign_ExcAVR3_se2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.t1"), &assign_ExcAVR3_t1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.t2"), &assign_ExcAVR3_t2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.t3"), &assign_ExcAVR3_t3)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.t4"), &assign_ExcAVR3_t4)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.te"), &assign_ExcAVR3_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.vrmn"), &assign_ExcAVR3_vrmn)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.vrmx"), &assign_ExcAVR3_vrmx)); + assign_map.emplace("cim:ExcAVR3.e1", &assign_ExcAVR3_e1); + assign_map.emplace("cim:ExcAVR3.e2", &assign_ExcAVR3_e2); + assign_map.emplace("cim:ExcAVR3.ka", &assign_ExcAVR3_ka); + assign_map.emplace("cim:ExcAVR3.se1", &assign_ExcAVR3_se1); + assign_map.emplace("cim:ExcAVR3.se2", &assign_ExcAVR3_se2); + assign_map.emplace("cim:ExcAVR3.t1", &assign_ExcAVR3_t1); + assign_map.emplace("cim:ExcAVR3.t2", &assign_ExcAVR3_t2); + assign_map.emplace("cim:ExcAVR3.t3", &assign_ExcAVR3_t3); + assign_map.emplace("cim:ExcAVR3.t4", &assign_ExcAVR3_t4); + assign_map.emplace("cim:ExcAVR3.te", &assign_ExcAVR3_te); + assign_map.emplace("cim:ExcAVR3.vrmn", &assign_ExcAVR3_vrmn); + assign_map.emplace("cim:ExcAVR3.vrmx", &assign_ExcAVR3_vrmx); } void ExcAVR3::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcAVR3.hpp b/CGMES_2.4.15_16FEB2016/ExcAVR3.hpp index 6fe6dbd5a..9e24fc4b5 100644 --- a/CGMES_2.4.15_16FEB2016/ExcAVR3.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcAVR3.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Italian excitation system. It represents exciter dynamo and electric regulator. - */ + /** \brief Italian excitation system. It represents exciter dynamo and electric regulator. */ class ExcAVR3 : public ExcitationSystemDynamics { public: @@ -29,18 +27,41 @@ namespace CIMPP ExcAVR3(); ~ExcAVR3() override; - CIMPP::PU e1; /* Field voltage value 1 (E1). Typical Value = 4.18. Default: nullptr */ - CIMPP::PU e2; /* Field voltage value 2 (E2). Typical Value = 3.14. Default: nullptr */ - CIMPP::Simple_Float ka; /* AVR gain (K). Typical Value = 3000. Default: nullptr */ - CIMPP::Simple_Float se1; /* Saturation factor at E1 (S(E1)). Typical Value = 0.1. Default: nullptr */ - CIMPP::Simple_Float se2; /* Saturation factor at E2 (S(E2)). Typical Value = 0.03. Default: nullptr */ - CIMPP::Seconds t1; /* AVR time constant (T). Typical Value = 220. Default: nullptr */ - CIMPP::Seconds t2; /* AVR time constant (T). Typical Value = 1.6. Default: nullptr */ - CIMPP::Seconds t3; /* AVR time constant (T). Typical Value = 0.66. Default: nullptr */ - CIMPP::Seconds t4; /* AVR time constant (T). Typical Value = 0.07. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmn; /* Maximum AVR output (V). Typical Value = -7.5. Default: nullptr */ - CIMPP::PU vrmx; /* Minimum AVR output (V). Typical Value = 7.5. Default: nullptr */ + /** \brief Field voltage value 1 (E1). Typical Value = 4.18. Default: nullptr */ + CIMPP::PU e1; + + /** \brief Field voltage value 2 (E2). Typical Value = 3.14. Default: nullptr */ + CIMPP::PU e2; + + /** \brief AVR gain (K). Typical Value = 3000. Default: nullptr */ + CIMPP::Simple_Float ka; + + /** \brief Saturation factor at E1 (S(E1)). Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float se1; + + /** \brief Saturation factor at E2 (S(E2)). Typical Value = 0.03. Default: nullptr */ + CIMPP::Simple_Float se2; + + /** \brief AVR time constant (T). Typical Value = 220. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief AVR time constant (T). Typical Value = 1.6. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief AVR time constant (T). Typical Value = 0.66. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief AVR time constant (T). Typical Value = 0.07. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Exciter time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Maximum AVR output (V). Typical Value = -7.5. Default: nullptr */ + CIMPP::PU vrmn; + + /** \brief Minimum AVR output (V). Typical Value = 7.5. Default: nullptr */ + CIMPP::PU vrmx; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcAVR4.cpp b/CGMES_2.4.15_16FEB2016/ExcAVR4.cpp index a48063509..52fd9e5cd 100644 --- a/CGMES_2.4.15_16FEB2016/ExcAVR4.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcAVR4.cpp @@ -8,25 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAVR4::ExcAVR4() {}; -ExcAVR4::~ExcAVR4() {}; +ExcAVR4::ExcAVR4() {} +ExcAVR4::~ExcAVR4() {} static const std::list PossibleProfilesForClass = { @@ -66,194 +52,206 @@ ExcAVR4::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAVR4_imul(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_imul(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->imul; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_kif(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_kif(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kif; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_t1if(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_t1if(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1if; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_tif(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_tif(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tif; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_vfmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_vfmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_vfmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_vfmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_vrmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_vrmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_vrmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_vrmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAVR4_imul(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->imul; if (!buffer.str().empty()) @@ -267,7 +265,8 @@ bool get_ExcAVR4_imul(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAVR4_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -281,7 +280,8 @@ bool get_ExcAVR4_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR4_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -295,7 +295,8 @@ bool get_ExcAVR4_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR4_kif(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kif; if (!buffer.str().empty()) @@ -309,7 +310,8 @@ bool get_ExcAVR4_kif(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR4_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -323,7 +325,8 @@ bool get_ExcAVR4_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR4_t1if(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1if; if (!buffer.str().empty()) @@ -337,7 +340,8 @@ bool get_ExcAVR4_t1if(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAVR4_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -351,7 +355,8 @@ bool get_ExcAVR4_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR4_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -365,7 +370,8 @@ bool get_ExcAVR4_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR4_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -379,7 +385,8 @@ bool get_ExcAVR4_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR4_tif(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tif; if (!buffer.str().empty()) @@ -393,7 +400,8 @@ bool get_ExcAVR4_tif(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR4_vfmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfmn; if (!buffer.str().empty()) @@ -407,7 +415,8 @@ bool get_ExcAVR4_vfmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAVR4_vfmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfmx; if (!buffer.str().empty()) @@ -421,7 +430,8 @@ bool get_ExcAVR4_vfmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAVR4_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmn; if (!buffer.str().empty()) @@ -435,7 +445,8 @@ bool get_ExcAVR4_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAVR4_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmx; if (!buffer.str().empty()) @@ -447,8 +458,6 @@ bool get_ExcAVR4_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char ExcAVR4::debugName[] = "ExcAVR4"; const char* ExcAVR4::debugString() const { @@ -457,25 +466,25 @@ const char* ExcAVR4::debugString() const void ExcAVR4::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAVR4"), &ExcAVR4_factory)); + factory_map.emplace("cim:ExcAVR4", &ExcAVR4_factory); } void ExcAVR4::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.imul"), &assign_ExcAVR4_imul)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.ka"), &assign_ExcAVR4_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.ke"), &assign_ExcAVR4_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.kif"), &assign_ExcAVR4_kif)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.t1"), &assign_ExcAVR4_t1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.t1if"), &assign_ExcAVR4_t1if)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.t2"), &assign_ExcAVR4_t2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.t3"), &assign_ExcAVR4_t3)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.t4"), &assign_ExcAVR4_t4)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.tif"), &assign_ExcAVR4_tif)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.vfmn"), &assign_ExcAVR4_vfmn)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.vfmx"), &assign_ExcAVR4_vfmx)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.vrmn"), &assign_ExcAVR4_vrmn)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.vrmx"), &assign_ExcAVR4_vrmx)); + assign_map.emplace("cim:ExcAVR4.imul", &assign_ExcAVR4_imul); + assign_map.emplace("cim:ExcAVR4.ka", &assign_ExcAVR4_ka); + assign_map.emplace("cim:ExcAVR4.ke", &assign_ExcAVR4_ke); + assign_map.emplace("cim:ExcAVR4.kif", &assign_ExcAVR4_kif); + assign_map.emplace("cim:ExcAVR4.t1", &assign_ExcAVR4_t1); + assign_map.emplace("cim:ExcAVR4.t1if", &assign_ExcAVR4_t1if); + assign_map.emplace("cim:ExcAVR4.t2", &assign_ExcAVR4_t2); + assign_map.emplace("cim:ExcAVR4.t3", &assign_ExcAVR4_t3); + assign_map.emplace("cim:ExcAVR4.t4", &assign_ExcAVR4_t4); + assign_map.emplace("cim:ExcAVR4.tif", &assign_ExcAVR4_tif); + assign_map.emplace("cim:ExcAVR4.vfmn", &assign_ExcAVR4_vfmn); + assign_map.emplace("cim:ExcAVR4.vfmx", &assign_ExcAVR4_vfmx); + assign_map.emplace("cim:ExcAVR4.vrmn", &assign_ExcAVR4_vrmn); + assign_map.emplace("cim:ExcAVR4.vrmx", &assign_ExcAVR4_vrmx); } void ExcAVR4::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcAVR4.hpp b/CGMES_2.4.15_16FEB2016/ExcAVR4.hpp index c1d41dcdd..f77d11a15 100644 --- a/CGMES_2.4.15_16FEB2016/ExcAVR4.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcAVR4.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Italian excitation system. It represents static exciter and electric voltage regulator. - */ + /** \brief Italian excitation system. It represents static exciter and electric voltage regulator. */ class ExcAVR4 : public ExcitationSystemDynamics { public: @@ -30,20 +28,47 @@ namespace CIMPP ExcAVR4(); ~ExcAVR4() override; - CIMPP::Boolean imul; /* AVR output voltage dependency selector (Imul). true = selector is connected false = selector is not connected. Typical Value = true. Default: false */ - CIMPP::Simple_Float ka; /* AVR gain (K). Typical Value = 300. Default: nullptr */ - CIMPP::Simple_Float ke; /* Exciter gain (K). Typical Value = 1. Default: nullptr */ - CIMPP::Simple_Float kif; /* Exciter internal reactance (K). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t1; /* AVR time constant (T). Typical Value = 4.8. Default: nullptr */ - CIMPP::Seconds t1if; /* Exciter current feedback time constant (T). Typical Value = 60. Default: nullptr */ - CIMPP::Seconds t2; /* AVR time constant (T). Typical Value = 1.5. Default: nullptr */ - CIMPP::Seconds t3; /* AVR time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t4; /* AVR time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tif; /* Exciter current feedback time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::PU vfmn; /* Minimum exciter output (V). Typical Value = 0. Default: nullptr */ - CIMPP::PU vfmx; /* Maximum exciter output (V). Typical Value = 5. Default: nullptr */ - CIMPP::PU vrmn; /* Maximum AVR output (V). Typical Value = 0. Default: nullptr */ - CIMPP::PU vrmx; /* Minimum AVR output (V). Typical Value = 5. Default: nullptr */ + /** \brief AVR output voltage dependency selector (Imul). true = selector is connected false = selector is not connected. Typical Value = true. Default: false */ + CIMPP::Boolean imul; + + /** \brief AVR gain (K). Typical Value = 300. Default: nullptr */ + CIMPP::Simple_Float ka; + + /** \brief Exciter gain (K). Typical Value = 1. Default: nullptr */ + CIMPP::Simple_Float ke; + + /** \brief Exciter internal reactance (K). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float kif; + + /** \brief AVR time constant (T). Typical Value = 4.8. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Exciter current feedback time constant (T). Typical Value = 60. Default: nullptr */ + CIMPP::Seconds t1if; + + /** \brief AVR time constant (T). Typical Value = 1.5. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief AVR time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief AVR time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Exciter current feedback time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tif; + + /** \brief Minimum exciter output (V). Typical Value = 0. Default: nullptr */ + CIMPP::PU vfmn; + + /** \brief Maximum exciter output (V). Typical Value = 5. Default: nullptr */ + CIMPP::PU vfmx; + + /** \brief Maximum AVR output (V). Typical Value = 0. Default: nullptr */ + CIMPP::PU vrmn; + + /** \brief Minimum AVR output (V). Typical Value = 5. Default: nullptr */ + CIMPP::PU vrmx; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcAVR5.cpp b/CGMES_2.4.15_16FEB2016/ExcAVR5.cpp index 5cca6e163..3f6eb23fe 100644 --- a/CGMES_2.4.15_16FEB2016/ExcAVR5.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcAVR5.cpp @@ -8,14 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" using namespace CIMPP; -ExcAVR5::ExcAVR5() {}; -ExcAVR5::~ExcAVR5() {}; +ExcAVR5::ExcAVR5() {} +ExcAVR5::~ExcAVR5() {} static const std::list PossibleProfilesForClass = { @@ -44,51 +41,52 @@ ExcAVR5::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAVR5_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR5_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR5* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR5_rex(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR5_rex(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR5* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rex; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR5_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR5_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR5* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAVR5_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR5* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -102,7 +100,8 @@ bool get_ExcAVR5_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR5_rex(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR5* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rex; if (!buffer.str().empty()) @@ -116,7 +115,8 @@ bool get_ExcAVR5_rex(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR5_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR5* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -128,8 +128,6 @@ bool get_ExcAVR5_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcAVR5::debugName[] = "ExcAVR5"; const char* ExcAVR5::debugString() const { @@ -138,14 +136,14 @@ const char* ExcAVR5::debugString() const void ExcAVR5::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAVR5"), &ExcAVR5_factory)); + factory_map.emplace("cim:ExcAVR5", &ExcAVR5_factory); } void ExcAVR5::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAVR5.ka"), &assign_ExcAVR5_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR5.rex"), &assign_ExcAVR5_rex)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR5.ta"), &assign_ExcAVR5_ta)); + assign_map.emplace("cim:ExcAVR5.ka", &assign_ExcAVR5_ka); + assign_map.emplace("cim:ExcAVR5.rex", &assign_ExcAVR5_rex); + assign_map.emplace("cim:ExcAVR5.ta", &assign_ExcAVR5_ta); } void ExcAVR5::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcAVR5.hpp b/CGMES_2.4.15_16FEB2016/ExcAVR5.hpp index 82afdab11..ddd53d379 100644 --- a/CGMES_2.4.15_16FEB2016/ExcAVR5.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcAVR5.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Manual excitation control with field circuit resistance. This model can be used as a very simple representation of manual voltage control. - */ + /** \brief Manual excitation control with field circuit resistance. This model can be used as a very simple representation of manual voltage control. */ class ExcAVR5 : public ExcitationSystemDynamics { public: @@ -28,9 +26,14 @@ namespace CIMPP ExcAVR5(); ~ExcAVR5() override; - CIMPP::PU ka; /* Gain (Ka). Default: nullptr */ - CIMPP::PU rex; /* Effective Output Resistance (Rex). Rex represents the effective output resistance seen by the excitation system. Default: nullptr */ - CIMPP::Seconds ta; /* Time constant (Ta). Default: nullptr */ + /** \brief Gain (Ka). Default: nullptr */ + CIMPP::PU ka; + + /** \brief Effective Output Resistance (Rex). Rex represents the effective output resistance seen by the excitation system. Default: nullptr */ + CIMPP::PU rex; + + /** \brief Time constant (Ta). Default: nullptr */ + CIMPP::Seconds ta; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcAVR7.cpp b/CGMES_2.4.15_16FEB2016/ExcAVR7.cpp index 0ce874327..3568b24b1 100644 --- a/CGMES_2.4.15_16FEB2016/ExcAVR7.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcAVR7.cpp @@ -8,32 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAVR7::ExcAVR7() {}; -ExcAVR7::~ExcAVR7() {}; +ExcAVR7::ExcAVR7() {} +ExcAVR7::~ExcAVR7() {} static const std::list PossibleProfilesForClass = { @@ -80,285 +59,304 @@ ExcAVR7::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAVR7_a1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_a1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_a2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_a2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_a3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_a3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_a4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_a4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_a5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_a5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_a6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_a6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_k5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_k5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_vmax1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_vmax1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_vmax3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_vmax3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_vmax5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_vmax5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_vmin1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_vmin1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_vmin3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_vmin3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_vmin5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_vmin5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAVR7_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a1; if (!buffer.str().empty()) @@ -372,7 +370,8 @@ bool get_ExcAVR7_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a2; if (!buffer.str().empty()) @@ -386,7 +385,8 @@ bool get_ExcAVR7_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_a3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a3; if (!buffer.str().empty()) @@ -400,7 +400,8 @@ bool get_ExcAVR7_a3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_a4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a4; if (!buffer.str().empty()) @@ -414,7 +415,8 @@ bool get_ExcAVR7_a4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_a5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a5; if (!buffer.str().empty()) @@ -428,7 +430,8 @@ bool get_ExcAVR7_a5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_a6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a6; if (!buffer.str().empty()) @@ -442,7 +445,8 @@ bool get_ExcAVR7_a6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -456,7 +460,8 @@ bool get_ExcAVR7_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -470,7 +475,8 @@ bool get_ExcAVR7_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k5; if (!buffer.str().empty()) @@ -484,7 +490,8 @@ bool get_ExcAVR7_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -498,7 +505,8 @@ bool get_ExcAVR7_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -512,7 +520,8 @@ bool get_ExcAVR7_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -526,7 +535,8 @@ bool get_ExcAVR7_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -540,7 +550,8 @@ bool get_ExcAVR7_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -554,7 +565,8 @@ bool get_ExcAVR7_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -568,7 +580,8 @@ bool get_ExcAVR7_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_vmax1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmax1; if (!buffer.str().empty()) @@ -582,7 +595,8 @@ bool get_ExcAVR7_vmax1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAVR7_vmax3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmax3; if (!buffer.str().empty()) @@ -596,7 +610,8 @@ bool get_ExcAVR7_vmax3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAVR7_vmax5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmax5; if (!buffer.str().empty()) @@ -610,7 +625,8 @@ bool get_ExcAVR7_vmax5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAVR7_vmin1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmin1; if (!buffer.str().empty()) @@ -624,7 +640,8 @@ bool get_ExcAVR7_vmin1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAVR7_vmin3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmin3; if (!buffer.str().empty()) @@ -638,7 +655,8 @@ bool get_ExcAVR7_vmin3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAVR7_vmin5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmin5; if (!buffer.str().empty()) @@ -650,8 +668,6 @@ bool get_ExcAVR7_vmin5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcAVR7::debugName[] = "ExcAVR7"; const char* ExcAVR7::debugString() const { @@ -660,32 +676,32 @@ const char* ExcAVR7::debugString() const void ExcAVR7::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAVR7"), &ExcAVR7_factory)); + factory_map.emplace("cim:ExcAVR7", &ExcAVR7_factory); } void ExcAVR7::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.a1"), &assign_ExcAVR7_a1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.a2"), &assign_ExcAVR7_a2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.a3"), &assign_ExcAVR7_a3)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.a4"), &assign_ExcAVR7_a4)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.a5"), &assign_ExcAVR7_a5)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.a6"), &assign_ExcAVR7_a6)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.k1"), &assign_ExcAVR7_k1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.k3"), &assign_ExcAVR7_k3)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.k5"), &assign_ExcAVR7_k5)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.t1"), &assign_ExcAVR7_t1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.t2"), &assign_ExcAVR7_t2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.t3"), &assign_ExcAVR7_t3)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.t4"), &assign_ExcAVR7_t4)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.t5"), &assign_ExcAVR7_t5)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.t6"), &assign_ExcAVR7_t6)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.vmax1"), &assign_ExcAVR7_vmax1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.vmax3"), &assign_ExcAVR7_vmax3)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.vmax5"), &assign_ExcAVR7_vmax5)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.vmin1"), &assign_ExcAVR7_vmin1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.vmin3"), &assign_ExcAVR7_vmin3)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.vmin5"), &assign_ExcAVR7_vmin5)); + assign_map.emplace("cim:ExcAVR7.a1", &assign_ExcAVR7_a1); + assign_map.emplace("cim:ExcAVR7.a2", &assign_ExcAVR7_a2); + assign_map.emplace("cim:ExcAVR7.a3", &assign_ExcAVR7_a3); + assign_map.emplace("cim:ExcAVR7.a4", &assign_ExcAVR7_a4); + assign_map.emplace("cim:ExcAVR7.a5", &assign_ExcAVR7_a5); + assign_map.emplace("cim:ExcAVR7.a6", &assign_ExcAVR7_a6); + assign_map.emplace("cim:ExcAVR7.k1", &assign_ExcAVR7_k1); + assign_map.emplace("cim:ExcAVR7.k3", &assign_ExcAVR7_k3); + assign_map.emplace("cim:ExcAVR7.k5", &assign_ExcAVR7_k5); + assign_map.emplace("cim:ExcAVR7.t1", &assign_ExcAVR7_t1); + assign_map.emplace("cim:ExcAVR7.t2", &assign_ExcAVR7_t2); + assign_map.emplace("cim:ExcAVR7.t3", &assign_ExcAVR7_t3); + assign_map.emplace("cim:ExcAVR7.t4", &assign_ExcAVR7_t4); + assign_map.emplace("cim:ExcAVR7.t5", &assign_ExcAVR7_t5); + assign_map.emplace("cim:ExcAVR7.t6", &assign_ExcAVR7_t6); + assign_map.emplace("cim:ExcAVR7.vmax1", &assign_ExcAVR7_vmax1); + assign_map.emplace("cim:ExcAVR7.vmax3", &assign_ExcAVR7_vmax3); + assign_map.emplace("cim:ExcAVR7.vmax5", &assign_ExcAVR7_vmax5); + assign_map.emplace("cim:ExcAVR7.vmin1", &assign_ExcAVR7_vmin1); + assign_map.emplace("cim:ExcAVR7.vmin3", &assign_ExcAVR7_vmin3); + assign_map.emplace("cim:ExcAVR7.vmin5", &assign_ExcAVR7_vmin5); } void ExcAVR7::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcAVR7.hpp b/CGMES_2.4.15_16FEB2016/ExcAVR7.hpp index 20fdb3e54..5bd945535 100644 --- a/CGMES_2.4.15_16FEB2016/ExcAVR7.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcAVR7.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IVO excitation system. - */ + /** \brief IVO excitation system. */ class ExcAVR7 : public ExcitationSystemDynamics { public: @@ -28,27 +26,68 @@ namespace CIMPP ExcAVR7(); ~ExcAVR7() override; - CIMPP::PU a1; /* Lead coefficient (A1). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU a2; /* Lag coefficient (A2). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU a3; /* Lead coefficient (A3). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU a4; /* Lag coefficient (A4). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU a5; /* Lead coefficient (A5). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU a6; /* Lag coefficient (A6). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU k1; /* Gain (K1). Typical Value = 1. Default: nullptr */ - CIMPP::PU k3; /* Gain (K3). Typical Value = 3. Default: nullptr */ - CIMPP::PU k5; /* Gain (K5). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds t1; /* Lead time constant (T1). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds t2; /* Lag time constant (T2). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t3; /* Lead time constant (T3). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t4; /* Lag time constant (T4). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t5; /* Lead time constant (T5). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t6; /* Lag time constant (T6). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU vmax1; /* Lead-lag max. limit (Vmax1). Typical Value = 5. Default: nullptr */ - CIMPP::PU vmax3; /* Lead-lag max. limit (Vmax3). Typical Value = 5. Default: nullptr */ - CIMPP::PU vmax5; /* Lead-lag max. limit (Vmax5). Typical Value = 5. Default: nullptr */ - CIMPP::PU vmin1; /* Lead-lag min. limit (Vmin1). Typical Value = -5. Default: nullptr */ - CIMPP::PU vmin3; /* Lead-lag min. limit (Vmin3). Typical Value = -5. Default: nullptr */ - CIMPP::PU vmin5; /* Lead-lag min. limit (Vmin5). Typical Value = -2. Default: nullptr */ + /** \brief Lead coefficient (A1). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU a1; + + /** \brief Lag coefficient (A2). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU a2; + + /** \brief Lead coefficient (A3). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU a3; + + /** \brief Lag coefficient (A4). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU a4; + + /** \brief Lead coefficient (A5). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU a5; + + /** \brief Lag coefficient (A6). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU a6; + + /** \brief Gain (K1). Typical Value = 1. Default: nullptr */ + CIMPP::PU k1; + + /** \brief Gain (K3). Typical Value = 3. Default: nullptr */ + CIMPP::PU k3; + + /** \brief Gain (K5). Typical Value = 1. Default: nullptr */ + CIMPP::PU k5; + + /** \brief Lead time constant (T1). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Lag time constant (T2). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Lead time constant (T3). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Lag time constant (T4). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Lead time constant (T5). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Lag time constant (T6). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Lead-lag max. limit (Vmax1). Typical Value = 5. Default: nullptr */ + CIMPP::PU vmax1; + + /** \brief Lead-lag max. limit (Vmax3). Typical Value = 5. Default: nullptr */ + CIMPP::PU vmax3; + + /** \brief Lead-lag max. limit (Vmax5). Typical Value = 5. Default: nullptr */ + CIMPP::PU vmax5; + + /** \brief Lead-lag min. limit (Vmin1). Typical Value = -5. Default: nullptr */ + CIMPP::PU vmin1; + + /** \brief Lead-lag min. limit (Vmin3). Typical Value = -5. Default: nullptr */ + CIMPP::PU vmin3; + + /** \brief Lead-lag min. limit (Vmin5). Typical Value = -2. Default: nullptr */ + CIMPP::PU vmin5; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcBBC.cpp b/CGMES_2.4.15_16FEB2016/ExcBBC.cpp index fd155fba0..5ed4908bf 100644 --- a/CGMES_2.4.15_16FEB2016/ExcBBC.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcBBC.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcBBC::ExcBBC() {}; -ExcBBC::~ExcBBC() {}; +ExcBBC::ExcBBC() {} +ExcBBC::~ExcBBC() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ ExcBBC::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcBBC_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_efdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_efdmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_switch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_switch(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->_switch; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_xe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_xe(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xe; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcBBC_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmax; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_ExcBBC_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcBBC_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmin; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_ExcBBC_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcBBC_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_ExcBBC_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcBBC_switch(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->_switch; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_ExcBBC_switch(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcBBC_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_ExcBBC_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcBBC_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_ExcBBC_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcBBC_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_ExcBBC_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcBBC_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_ExcBBC_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcBBC_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_ExcBBC_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcBBC_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_ExcBBC_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcBBC_xe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xe; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_ExcBBC_xe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcBBC::debugName[] = "ExcBBC"; const char* ExcBBC::debugString() const { @@ -370,22 +376,22 @@ const char* ExcBBC::debugString() const void ExcBBC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcBBC"), &ExcBBC_factory)); + factory_map.emplace("cim:ExcBBC", &ExcBBC_factory); } void ExcBBC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.efdmax"), &assign_ExcBBC_efdmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.efdmin"), &assign_ExcBBC_efdmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.k"), &assign_ExcBBC_k)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.switch"), &assign_ExcBBC_switch)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.t1"), &assign_ExcBBC_t1)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.t2"), &assign_ExcBBC_t2)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.t3"), &assign_ExcBBC_t3)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.t4"), &assign_ExcBBC_t4)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.vrmax"), &assign_ExcBBC_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.vrmin"), &assign_ExcBBC_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.xe"), &assign_ExcBBC_xe)); + assign_map.emplace("cim:ExcBBC.efdmax", &assign_ExcBBC_efdmax); + assign_map.emplace("cim:ExcBBC.efdmin", &assign_ExcBBC_efdmin); + assign_map.emplace("cim:ExcBBC.k", &assign_ExcBBC_k); + assign_map.emplace("cim:ExcBBC.switch", &assign_ExcBBC_switch); + assign_map.emplace("cim:ExcBBC.t1", &assign_ExcBBC_t1); + assign_map.emplace("cim:ExcBBC.t2", &assign_ExcBBC_t2); + assign_map.emplace("cim:ExcBBC.t3", &assign_ExcBBC_t3); + assign_map.emplace("cim:ExcBBC.t4", &assign_ExcBBC_t4); + assign_map.emplace("cim:ExcBBC.vrmax", &assign_ExcBBC_vrmax); + assign_map.emplace("cim:ExcBBC.vrmin", &assign_ExcBBC_vrmin); + assign_map.emplace("cim:ExcBBC.xe", &assign_ExcBBC_xe); } void ExcBBC::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcBBC.hpp b/CGMES_2.4.15_16FEB2016/ExcBBC.hpp index a41a730ad..069831f27 100644 --- a/CGMES_2.4.15_16FEB2016/ExcBBC.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcBBC.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Transformer fed static excitation system (static with ABB regulator). This model represents a static excitation system in which a gated thyristor bridge fed by a transformer at the main generator terminals feeds the main generator directly. - */ + /** \brief Transformer fed static excitation system (static with ABB regulator). This model represents a static excitation system in which a gated thyristor bridge fed by a transformer at the main generator terminals feeds the main generator directly. */ class ExcBBC : public ExcitationSystemDynamics { public: @@ -29,17 +27,38 @@ namespace CIMPP ExcBBC(); ~ExcBBC() override; - CIMPP::PU efdmax; /* Maximum open circuit exciter voltage (Efdmax). Typical Value = 5. Default: nullptr */ - CIMPP::PU efdmin; /* Minimum open circuit exciter voltage (Efdmin). Typical Value = -5. Default: nullptr */ - CIMPP::PU k; /* Steady state gain (K). Typical Value = 300. Default: nullptr */ - CIMPP::Boolean _switch; /* Supplementary signal routing selector (switch). true = Vs connected to 3rd summing point false = Vs connected to 1st summing point (see diagram). Typical Value = true. Default: false */ - CIMPP::Seconds t1; /* Controller time constant (T1). Typical Value = 6. Default: nullptr */ - CIMPP::Seconds t2; /* Controller time constant (T2). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds t3; /* Lead/lag time constant (T3). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds t4; /* Lead/lag time constant (T4). Typical Value = 0.01. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum control element output (Vrmax). Typical Value = 5. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum control element output (Vrmin). Typical Value = -5. Default: nullptr */ - CIMPP::PU xe; /* Effective excitation transformer reactance (Xe). Typical Value = 0.05. Default: nullptr */ + /** \brief Maximum open circuit exciter voltage (Efdmax). Typical Value = 5. Default: nullptr */ + CIMPP::PU efdmax; + + /** \brief Minimum open circuit exciter voltage (Efdmin). Typical Value = -5. Default: nullptr */ + CIMPP::PU efdmin; + + /** \brief Steady state gain (K). Typical Value = 300. Default: nullptr */ + CIMPP::PU k; + + /** \brief Supplementary signal routing selector (switch). true = Vs connected to 3rd summing point false = Vs connected to 1st summing point (see diagram). Typical Value = true. Default: false */ + CIMPP::Boolean _switch; + + /** \brief Controller time constant (T1). Typical Value = 6. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Controller time constant (T2). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Lead/lag time constant (T3). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Lead/lag time constant (T4). Typical Value = 0.01. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Maximum control element output (Vrmax). Typical Value = 5. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum control element output (Vrmin). Typical Value = -5. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief Effective excitation transformer reactance (Xe). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU xe; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcCZ.cpp b/CGMES_2.4.15_16FEB2016/ExcCZ.cpp index 89b839416..836b963d1 100644 --- a/CGMES_2.4.15_16FEB2016/ExcCZ.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcCZ.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcCZ::ExcCZ() {}; -ExcCZ::~ExcCZ() {}; +ExcCZ::ExcCZ() {} +ExcCZ::~ExcCZ() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ ExcCZ::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcCZ_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_efdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcCZ_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_efdmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcCZ_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcCZ_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcCZ_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcCZ_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcCZ_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcCZ_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcCZ_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcCZ_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcCZ_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmax; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_ExcCZ_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcCZ_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmin; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_ExcCZ_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcCZ_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_ExcCZ_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcCZ_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_ExcCZ_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcCZ_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_ExcCZ_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcCZ_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_ExcCZ_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcCZ_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_ExcCZ_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcCZ_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_ExcCZ_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcCZ_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_ExcCZ_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcCZ_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_ExcCZ_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcCZ::debugName[] = "ExcCZ"; const char* ExcCZ::debugString() const { @@ -341,21 +346,21 @@ const char* ExcCZ::debugString() const void ExcCZ::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcCZ"), &ExcCZ_factory)); + factory_map.emplace("cim:ExcCZ", &ExcCZ_factory); } void ExcCZ::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.efdmax"), &assign_ExcCZ_efdmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.efdmin"), &assign_ExcCZ_efdmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.ka"), &assign_ExcCZ_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.ke"), &assign_ExcCZ_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.kp"), &assign_ExcCZ_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.ta"), &assign_ExcCZ_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.tc"), &assign_ExcCZ_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.te"), &assign_ExcCZ_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.vrmax"), &assign_ExcCZ_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.vrmin"), &assign_ExcCZ_vrmin)); + assign_map.emplace("cim:ExcCZ.efdmax", &assign_ExcCZ_efdmax); + assign_map.emplace("cim:ExcCZ.efdmin", &assign_ExcCZ_efdmin); + assign_map.emplace("cim:ExcCZ.ka", &assign_ExcCZ_ka); + assign_map.emplace("cim:ExcCZ.ke", &assign_ExcCZ_ke); + assign_map.emplace("cim:ExcCZ.kp", &assign_ExcCZ_kp); + assign_map.emplace("cim:ExcCZ.ta", &assign_ExcCZ_ta); + assign_map.emplace("cim:ExcCZ.tc", &assign_ExcCZ_tc); + assign_map.emplace("cim:ExcCZ.te", &assign_ExcCZ_te); + assign_map.emplace("cim:ExcCZ.vrmax", &assign_ExcCZ_vrmax); + assign_map.emplace("cim:ExcCZ.vrmin", &assign_ExcCZ_vrmin); } void ExcCZ::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcCZ.hpp b/CGMES_2.4.15_16FEB2016/ExcCZ.hpp index 1b99a72bd..535e79794 100644 --- a/CGMES_2.4.15_16FEB2016/ExcCZ.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcCZ.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Czech Proportion/Integral Exciter. - */ + /** \brief Czech Proportion/Integral Exciter. */ class ExcCZ : public ExcitationSystemDynamics { public: @@ -28,16 +26,35 @@ namespace CIMPP ExcCZ(); ~ExcCZ() override; - CIMPP::PU efdmax; /* Exciter output maximum limit (Efdmax). Default: nullptr */ - CIMPP::PU efdmin; /* Exciter output minimum limit (Efdmin). Default: nullptr */ - CIMPP::PU ka; /* Regulator gain (Ka). Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (Ke). Default: nullptr */ - CIMPP::PU kp; /* Regulator proportional gain (Kp). Default: nullptr */ - CIMPP::Seconds ta; /* Regulator time constant (Ta). Default: nullptr */ - CIMPP::Seconds tc; /* Regulator integral time constant (Tc). Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (Te). Default: nullptr */ - CIMPP::PU vrmax; /* Voltage regulator maximum limit (Vrmax). Default: nullptr */ - CIMPP::PU vrmin; /* Voltage regulator minimum limit (Vrmin). Default: nullptr */ + /** \brief Exciter output maximum limit (Efdmax). Default: nullptr */ + CIMPP::PU efdmax; + + /** \brief Exciter output minimum limit (Efdmin). Default: nullptr */ + CIMPP::PU efdmin; + + /** \brief Regulator gain (Ka). Default: nullptr */ + CIMPP::PU ka; + + /** \brief Exciter constant related to self-excited field (Ke). Default: nullptr */ + CIMPP::PU ke; + + /** \brief Regulator proportional gain (Kp). Default: nullptr */ + CIMPP::PU kp; + + /** \brief Regulator time constant (Ta). Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Regulator integral time constant (Tc). Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (Te). Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Voltage regulator maximum limit (Vrmax). Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Voltage regulator minimum limit (Vrmin). Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcDC1A.cpp b/CGMES_2.4.15_16FEB2016/ExcDC1A.cpp index 244755fe7..66f08bb53 100644 --- a/CGMES_2.4.15_16FEB2016/ExcDC1A.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcDC1A.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcDC1A::ExcDC1A() {}; -ExcDC1A::~ExcDC1A() {}; +ExcDC1A::ExcDC1A() {} +ExcDC1A::~ExcDC1A() {} static const std::list PossibleProfilesForClass = { @@ -74,246 +56,262 @@ ExcDC1A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcDC1A_edfmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_edfmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->edfmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_efdmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_exclim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exclim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_seefd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_seefd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcDC1A_edfmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->edfmax; if (!buffer.str().empty()) @@ -327,7 +325,8 @@ bool get_ExcDC1A_edfmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC1A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -341,7 +340,8 @@ bool get_ExcDC1A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcDC1A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -355,7 +355,8 @@ bool get_ExcDC1A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcDC1A_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmin; if (!buffer.str().empty()) @@ -369,7 +370,8 @@ bool get_ExcDC1A_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC1A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exclim; if (!buffer.str().empty()) @@ -383,7 +385,8 @@ bool get_ExcDC1A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -397,7 +400,8 @@ bool get_ExcDC1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC1A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -411,7 +415,8 @@ bool get_ExcDC1A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -425,7 +430,8 @@ bool get_ExcDC1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC1A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -439,7 +445,8 @@ bool get_ExcDC1A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC1A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd1; if (!buffer.str().empty()) @@ -453,7 +460,8 @@ bool get_ExcDC1A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC1A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd2; if (!buffer.str().empty()) @@ -467,7 +475,8 @@ bool get_ExcDC1A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -481,7 +490,8 @@ bool get_ExcDC1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -495,7 +505,8 @@ bool get_ExcDC1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -509,7 +520,8 @@ bool get_ExcDC1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC1A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -523,7 +535,8 @@ bool get_ExcDC1A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -537,7 +550,8 @@ bool get_ExcDC1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -551,7 +565,8 @@ bool get_ExcDC1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcDC1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -563,8 +578,6 @@ bool get_ExcDC1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcDC1A::debugName[] = "ExcDC1A"; const char* ExcDC1A::debugString() const { @@ -573,29 +586,29 @@ const char* ExcDC1A::debugString() const void ExcDC1A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcDC1A"), &ExcDC1A_factory)); + factory_map.emplace("cim:ExcDC1A", &ExcDC1A_factory); } void ExcDC1A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.edfmax"), &assign_ExcDC1A_edfmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.efd1"), &assign_ExcDC1A_efd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.efd2"), &assign_ExcDC1A_efd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.efdmin"), &assign_ExcDC1A_efdmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.exclim"), &assign_ExcDC1A_exclim)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.ka"), &assign_ExcDC1A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.ke"), &assign_ExcDC1A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.kf"), &assign_ExcDC1A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.ks"), &assign_ExcDC1A_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.seefd1"), &assign_ExcDC1A_seefd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.seefd2"), &assign_ExcDC1A_seefd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.ta"), &assign_ExcDC1A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.tb"), &assign_ExcDC1A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.tc"), &assign_ExcDC1A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.te"), &assign_ExcDC1A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.tf"), &assign_ExcDC1A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.vrmax"), &assign_ExcDC1A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.vrmin"), &assign_ExcDC1A_vrmin)); + assign_map.emplace("cim:ExcDC1A.edfmax", &assign_ExcDC1A_edfmax); + assign_map.emplace("cim:ExcDC1A.efd1", &assign_ExcDC1A_efd1); + assign_map.emplace("cim:ExcDC1A.efd2", &assign_ExcDC1A_efd2); + assign_map.emplace("cim:ExcDC1A.efdmin", &assign_ExcDC1A_efdmin); + assign_map.emplace("cim:ExcDC1A.exclim", &assign_ExcDC1A_exclim); + assign_map.emplace("cim:ExcDC1A.ka", &assign_ExcDC1A_ka); + assign_map.emplace("cim:ExcDC1A.ke", &assign_ExcDC1A_ke); + assign_map.emplace("cim:ExcDC1A.kf", &assign_ExcDC1A_kf); + assign_map.emplace("cim:ExcDC1A.ks", &assign_ExcDC1A_ks); + assign_map.emplace("cim:ExcDC1A.seefd1", &assign_ExcDC1A_seefd1); + assign_map.emplace("cim:ExcDC1A.seefd2", &assign_ExcDC1A_seefd2); + assign_map.emplace("cim:ExcDC1A.ta", &assign_ExcDC1A_ta); + assign_map.emplace("cim:ExcDC1A.tb", &assign_ExcDC1A_tb); + assign_map.emplace("cim:ExcDC1A.tc", &assign_ExcDC1A_tc); + assign_map.emplace("cim:ExcDC1A.te", &assign_ExcDC1A_te); + assign_map.emplace("cim:ExcDC1A.tf", &assign_ExcDC1A_tf); + assign_map.emplace("cim:ExcDC1A.vrmax", &assign_ExcDC1A_vrmax); + assign_map.emplace("cim:ExcDC1A.vrmin", &assign_ExcDC1A_vrmin); } void ExcDC1A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcDC1A.hpp b/CGMES_2.4.15_16FEB2016/ExcDC1A.hpp index 802c09866..5cff88d2f 100644 --- a/CGMES_2.4.15_16FEB2016/ExcDC1A.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcDC1A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE DC1A direct current commutator exciter with speed input and without underexcitation limiters (UEL) inputs. - */ + /** \brief Modified IEEE DC1A direct current commutator exciter with speed input and without underexcitation limiters (UEL) inputs. */ class ExcDC1A : public ExcitationSystemDynamics { public: @@ -30,24 +28,59 @@ namespace CIMPP ExcDC1A(); ~ExcDC1A() override; - CIMPP::PU edfmax; /* Maximum voltage exciter output limiter (Efdmax). Typical Value = 99. Default: nullptr */ - CIMPP::PU efd1; /* Exciter voltage at which exciter saturation is defined (Efd1). Typical Value = 3.1. Default: nullptr */ - CIMPP::PU efd2; /* Exciter voltage at which exciter saturation is defined (Efd2). Typical Value = 2.3. Default: nullptr */ - CIMPP::PU efdmin; /* Minimum voltage exciter output limiter (Efdmin). Typical Value = -99. Default: nullptr */ - CIMPP::Boolean exclim; /* (exclim). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero is not applied to integrator output. Typical Value = true. Default: false */ - CIMPP::PU ka; /* Voltage regulator gain (Ka). Typical Value = 46. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (Ke). Typical Value = 0. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gain (Kf). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float seefd1; /* Exciter saturation function value at the corresponding exciter voltage, Efd1 (Se[Eefd1]). Typical Value = 0.33. Default: nullptr */ - CIMPP::Simple_Float seefd2; /* Exciter saturation function value at the corresponding exciter voltage, Efd1 (Se[Eefd1]). Typical Value = 0.33. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (Ta). Typical Value = 0.06. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (Tc). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 0.46. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (Tf). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (Vrmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (Vrmin). Typical Value = -0.9. Default: nullptr */ + /** \brief Maximum voltage exciter output limiter (Efdmax). Typical Value = 99. Default: nullptr */ + CIMPP::PU edfmax; + + /** \brief Exciter voltage at which exciter saturation is defined (Efd1). Typical Value = 3.1. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Exciter voltage at which exciter saturation is defined (Efd2). Typical Value = 2.3. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief Minimum voltage exciter output limiter (Efdmin). Typical Value = -99. Default: nullptr */ + CIMPP::PU efdmin; + + /** \brief (exclim). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero is not applied to integrator output. Typical Value = true. Default: false */ + CIMPP::Boolean exclim; + + /** \brief Voltage regulator gain (Ka). Typical Value = 46. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Exciter constant related to self-excited field (Ke). Typical Value = 0. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gain (Kf). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Efd1 (Se[Eefd1]). Typical Value = 0.33. Default: nullptr */ + CIMPP::Simple_Float seefd1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Efd1 (Se[Eefd1]). Typical Value = 0.33. Default: nullptr */ + CIMPP::Simple_Float seefd2; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0.06. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (Tc). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 0.46. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (Tf). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage regulator output (Vrmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (Vrmin). Typical Value = -0.9. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcDC2A.cpp b/CGMES_2.4.15_16FEB2016/ExcDC2A.cpp index 912534708..79a98e618 100644 --- a/CGMES_2.4.15_16FEB2016/ExcDC2A.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcDC2A.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" using namespace CIMPP; -ExcDC2A::ExcDC2A() {}; -ExcDC2A::~ExcDC2A() {}; +ExcDC2A::ExcDC2A() {} +ExcDC2A::~ExcDC2A() {} static const std::list PossibleProfilesForClass = { @@ -74,246 +56,262 @@ ExcDC2A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcDC2A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_exclim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exclim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_seefd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_seefd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_tf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_vtlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_vtlim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vtlim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcDC2A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -327,7 +325,8 @@ bool get_ExcDC2A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcDC2A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -341,7 +340,8 @@ bool get_ExcDC2A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcDC2A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exclim; if (!buffer.str().empty()) @@ -355,7 +355,8 @@ bool get_ExcDC2A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -369,7 +370,8 @@ bool get_ExcDC2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -383,7 +385,8 @@ bool get_ExcDC2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -397,7 +400,8 @@ bool get_ExcDC2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -411,7 +415,8 @@ bool get_ExcDC2A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd1; if (!buffer.str().empty()) @@ -425,7 +430,8 @@ bool get_ExcDC2A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC2A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd2; if (!buffer.str().empty()) @@ -439,7 +445,8 @@ bool get_ExcDC2A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -453,7 +460,8 @@ bool get_ExcDC2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -467,7 +475,8 @@ bool get_ExcDC2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -481,7 +490,8 @@ bool get_ExcDC2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -495,7 +505,8 @@ bool get_ExcDC2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -509,7 +520,8 @@ bool get_ExcDC2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf1; if (!buffer.str().empty()) @@ -523,7 +535,8 @@ bool get_ExcDC2A_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -537,7 +550,8 @@ bool get_ExcDC2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcDC2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -551,7 +565,8 @@ bool get_ExcDC2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcDC2A_vtlim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vtlim; if (!buffer.str().empty()) @@ -563,8 +578,6 @@ bool get_ExcDC2A_vtlim(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcDC2A::debugName[] = "ExcDC2A"; const char* ExcDC2A::debugString() const { @@ -573,29 +586,29 @@ const char* ExcDC2A::debugString() const void ExcDC2A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcDC2A"), &ExcDC2A_factory)); + factory_map.emplace("cim:ExcDC2A", &ExcDC2A_factory); } void ExcDC2A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.efd1"), &assign_ExcDC2A_efd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.efd2"), &assign_ExcDC2A_efd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.exclim"), &assign_ExcDC2A_exclim)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.ka"), &assign_ExcDC2A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.ke"), &assign_ExcDC2A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.kf"), &assign_ExcDC2A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.ks"), &assign_ExcDC2A_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.seefd1"), &assign_ExcDC2A_seefd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.seefd2"), &assign_ExcDC2A_seefd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.ta"), &assign_ExcDC2A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.tb"), &assign_ExcDC2A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.tc"), &assign_ExcDC2A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.te"), &assign_ExcDC2A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.tf"), &assign_ExcDC2A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.tf1"), &assign_ExcDC2A_tf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.vrmax"), &assign_ExcDC2A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.vrmin"), &assign_ExcDC2A_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.vtlim"), &assign_ExcDC2A_vtlim)); + assign_map.emplace("cim:ExcDC2A.efd1", &assign_ExcDC2A_efd1); + assign_map.emplace("cim:ExcDC2A.efd2", &assign_ExcDC2A_efd2); + assign_map.emplace("cim:ExcDC2A.exclim", &assign_ExcDC2A_exclim); + assign_map.emplace("cim:ExcDC2A.ka", &assign_ExcDC2A_ka); + assign_map.emplace("cim:ExcDC2A.ke", &assign_ExcDC2A_ke); + assign_map.emplace("cim:ExcDC2A.kf", &assign_ExcDC2A_kf); + assign_map.emplace("cim:ExcDC2A.ks", &assign_ExcDC2A_ks); + assign_map.emplace("cim:ExcDC2A.seefd1", &assign_ExcDC2A_seefd1); + assign_map.emplace("cim:ExcDC2A.seefd2", &assign_ExcDC2A_seefd2); + assign_map.emplace("cim:ExcDC2A.ta", &assign_ExcDC2A_ta); + assign_map.emplace("cim:ExcDC2A.tb", &assign_ExcDC2A_tb); + assign_map.emplace("cim:ExcDC2A.tc", &assign_ExcDC2A_tc); + assign_map.emplace("cim:ExcDC2A.te", &assign_ExcDC2A_te); + assign_map.emplace("cim:ExcDC2A.tf", &assign_ExcDC2A_tf); + assign_map.emplace("cim:ExcDC2A.tf1", &assign_ExcDC2A_tf1); + assign_map.emplace("cim:ExcDC2A.vrmax", &assign_ExcDC2A_vrmax); + assign_map.emplace("cim:ExcDC2A.vrmin", &assign_ExcDC2A_vrmin); + assign_map.emplace("cim:ExcDC2A.vtlim", &assign_ExcDC2A_vtlim); } void ExcDC2A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcDC2A.hpp b/CGMES_2.4.15_16FEB2016/ExcDC2A.hpp index 2d76aa510..e317a7ea0 100644 --- a/CGMES_2.4.15_16FEB2016/ExcDC2A.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcDC2A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE DC2A direct current commutator exciters with speed input, one more leg block in feedback loop and without underexcitation limiters (UEL) inputs. DC type 2 excitation system model with added speed multiplier, added lead-lag, and voltage-dependent limits. - */ + /** \brief Modified IEEE DC2A direct current commutator exciters with speed input, one more leg block in feedback loop and without underexcitation limiters (UEL) inputs. DC type 2 excitation system model with added speed multiplier, added lead-lag, and voltage-dependent limits. */ class ExcDC2A : public ExcitationSystemDynamics { public: @@ -30,24 +28,59 @@ namespace CIMPP ExcDC2A(); ~ExcDC2A() override; - CIMPP::PU efd1; /* Exciter voltage at which exciter saturation is defined (Efd1). Typical Value = 3.05. Default: nullptr */ - CIMPP::PU efd2; /* Exciter voltage at which exciter saturation is defined (Efd2). Typical Value = 2.29. Default: nullptr */ - CIMPP::Boolean exclim; /* (exclim). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero is not applied to integrator output. Typical Value = true. Default: false */ - CIMPP::PU ka; /* Voltage regulator gain (Ka). Typical Value = 300. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (Ke). If Ke is entered as zero, the model calculates an effective value of Ke such that the initial condition value of Vr is zero. The zero value of Ke is not changed. If Ke is entered as non-zero, its value is used directly, without change. Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gain (Kf). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float seefd1; /* Exciter saturation function value at the corresponding exciter voltage, Efd1 (Se[Eefd1]). Typical Value = 0.279. Default: nullptr */ - CIMPP::Simple_Float seefd2; /* Exciter saturation function value at the corresponding exciter voltage, Efd2 (Se[Efd2]). Typical Value = 0.117. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (Ta). Typical Value = 0.01. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (Tc). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 1.33. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (Tf). Typical Value = 0.675. Default: nullptr */ - CIMPP::Seconds tf1; /* Excitation control system stabilizer time constant (Tf1). Typical Value = 0. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (Vrmax). Typical Value = 4.95. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (Vrmin). Typical Value = -4.9. Default: nullptr */ - CIMPP::Boolean vtlim; /* (Vtlim). true = limiter at the block [Ka/(1+sTa)] is dependent on Vt false = limiter at the block is not dependent on Vt. Typical Value = true. Default: false */ + /** \brief Exciter voltage at which exciter saturation is defined (Efd1). Typical Value = 3.05. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Exciter voltage at which exciter saturation is defined (Efd2). Typical Value = 2.29. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief (exclim). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero is not applied to integrator output. Typical Value = true. Default: false */ + CIMPP::Boolean exclim; + + /** \brief Voltage regulator gain (Ka). Typical Value = 300. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Exciter constant related to self-excited field (Ke). If Ke is entered as zero, the model calculates an effective value of Ke such that the initial condition value of Vr is zero. The zero value of Ke is not changed. If Ke is entered as non-zero, its value is used directly, without change. Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gain (Kf). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Efd1 (Se[Eefd1]). Typical Value = 0.279. Default: nullptr */ + CIMPP::Simple_Float seefd1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Efd2 (Se[Efd2]). Typical Value = 0.117. Default: nullptr */ + CIMPP::Simple_Float seefd2; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0.01. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (Tc). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 1.33. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (Tf). Typical Value = 0.675. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Excitation control system stabilizer time constant (Tf1). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tf1; + + /** \brief Maximum voltage regulator output (Vrmax). Typical Value = 4.95. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (Vrmin). Typical Value = -4.9. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief (Vtlim). true = limiter at the block [Ka/(1+sTa)] is dependent on Vt false = limiter at the block is not dependent on Vt. Typical Value = true. Default: false */ + CIMPP::Boolean vtlim; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcDC3A.cpp b/CGMES_2.4.15_16FEB2016/ExcDC3A.cpp index 1ad6521de..71b995f87 100644 --- a/CGMES_2.4.15_16FEB2016/ExcDC3A.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcDC3A.cpp @@ -8,27 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcDC3A::ExcDC3A() {}; -ExcDC3A::~ExcDC3A() {}; +ExcDC3A::ExcDC3A() {} +ExcDC3A::~ExcDC3A() {} static const std::list PossibleProfilesForClass = { @@ -70,220 +54,234 @@ ExcDC3A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcDC3A_edfmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_edfmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->edfmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_efdlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_efdlim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdlim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_efdmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_exclim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exclim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_kr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_kr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_kv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_kv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_seefd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_seefd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_trh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_trh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->trh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcDC3A_edfmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->edfmax; if (!buffer.str().empty()) @@ -297,7 +295,8 @@ bool get_ExcDC3A_edfmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC3A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -311,7 +310,8 @@ bool get_ExcDC3A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcDC3A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -325,7 +325,8 @@ bool get_ExcDC3A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcDC3A_efdlim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdlim; if (!buffer.str().empty()) @@ -339,7 +340,8 @@ bool get_ExcDC3A_efdlim(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC3A_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmin; if (!buffer.str().empty()) @@ -353,7 +355,8 @@ bool get_ExcDC3A_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC3A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exclim; if (!buffer.str().empty()) @@ -367,7 +370,8 @@ bool get_ExcDC3A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC3A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -381,7 +385,8 @@ bool get_ExcDC3A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A_kr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kr; if (!buffer.str().empty()) @@ -395,7 +400,8 @@ bool get_ExcDC3A_kr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -409,7 +415,8 @@ bool get_ExcDC3A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A_kv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kv; if (!buffer.str().empty()) @@ -423,7 +430,8 @@ bool get_ExcDC3A_kv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd1; if (!buffer.str().empty()) @@ -437,7 +445,8 @@ bool get_ExcDC3A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC3A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd2; if (!buffer.str().empty()) @@ -451,7 +460,8 @@ bool get_ExcDC3A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC3A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -465,7 +475,8 @@ bool get_ExcDC3A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A_trh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->trh; if (!buffer.str().empty()) @@ -479,7 +490,8 @@ bool get_ExcDC3A_trh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -493,7 +505,8 @@ bool get_ExcDC3A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcDC3A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -505,8 +518,6 @@ bool get_ExcDC3A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcDC3A::debugName[] = "ExcDC3A"; const char* ExcDC3A::debugString() const { @@ -515,27 +526,27 @@ const char* ExcDC3A::debugString() const void ExcDC3A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcDC3A"), &ExcDC3A_factory)); + factory_map.emplace("cim:ExcDC3A", &ExcDC3A_factory); } void ExcDC3A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.edfmax"), &assign_ExcDC3A_edfmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.efd1"), &assign_ExcDC3A_efd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.efd2"), &assign_ExcDC3A_efd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.efdlim"), &assign_ExcDC3A_efdlim)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.efdmin"), &assign_ExcDC3A_efdmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.exclim"), &assign_ExcDC3A_exclim)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.ke"), &assign_ExcDC3A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.kr"), &assign_ExcDC3A_kr)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.ks"), &assign_ExcDC3A_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.kv"), &assign_ExcDC3A_kv)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.seefd1"), &assign_ExcDC3A_seefd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.seefd2"), &assign_ExcDC3A_seefd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.te"), &assign_ExcDC3A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.trh"), &assign_ExcDC3A_trh)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.vrmax"), &assign_ExcDC3A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.vrmin"), &assign_ExcDC3A_vrmin)); + assign_map.emplace("cim:ExcDC3A.edfmax", &assign_ExcDC3A_edfmax); + assign_map.emplace("cim:ExcDC3A.efd1", &assign_ExcDC3A_efd1); + assign_map.emplace("cim:ExcDC3A.efd2", &assign_ExcDC3A_efd2); + assign_map.emplace("cim:ExcDC3A.efdlim", &assign_ExcDC3A_efdlim); + assign_map.emplace("cim:ExcDC3A.efdmin", &assign_ExcDC3A_efdmin); + assign_map.emplace("cim:ExcDC3A.exclim", &assign_ExcDC3A_exclim); + assign_map.emplace("cim:ExcDC3A.ke", &assign_ExcDC3A_ke); + assign_map.emplace("cim:ExcDC3A.kr", &assign_ExcDC3A_kr); + assign_map.emplace("cim:ExcDC3A.ks", &assign_ExcDC3A_ks); + assign_map.emplace("cim:ExcDC3A.kv", &assign_ExcDC3A_kv); + assign_map.emplace("cim:ExcDC3A.seefd1", &assign_ExcDC3A_seefd1); + assign_map.emplace("cim:ExcDC3A.seefd2", &assign_ExcDC3A_seefd2); + assign_map.emplace("cim:ExcDC3A.te", &assign_ExcDC3A_te); + assign_map.emplace("cim:ExcDC3A.trh", &assign_ExcDC3A_trh); + assign_map.emplace("cim:ExcDC3A.vrmax", &assign_ExcDC3A_vrmax); + assign_map.emplace("cim:ExcDC3A.vrmin", &assign_ExcDC3A_vrmin); } void ExcDC3A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcDC3A.hpp b/CGMES_2.4.15_16FEB2016/ExcDC3A.hpp index dde872208..53e5af5f0 100644 --- a/CGMES_2.4.15_16FEB2016/ExcDC3A.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcDC3A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - This is modified IEEE DC3A direct current commutator exciters with speed input, and death band. DC old type 4. - */ + /** \brief This is modified IEEE DC3A direct current commutator exciters with speed input, and death band. DC old type 4. */ class ExcDC3A : public ExcitationSystemDynamics { public: @@ -30,22 +28,53 @@ namespace CIMPP ExcDC3A(); ~ExcDC3A() override; - CIMPP::PU edfmax; /* Maximum voltage exciter output limiter (Efdmax). Typical Value = 99. Default: nullptr */ - CIMPP::PU efd1; /* Exciter voltage at which exciter saturation is defined (Efd1). Typical Value = 2.6. Default: nullptr */ - CIMPP::PU efd2; /* Exciter voltage at which exciter saturation is defined (Efd2). Typical Value = 3.45. Default: nullptr */ - CIMPP::Boolean efdlim; /* (Efdlim). true = exciter output limiter is active false = exciter output limiter not active. Typical Value = true. Default: false */ - CIMPP::PU efdmin; /* Minimum voltage exciter output limiter (Efdmin). Typical Value = -99. Default: nullptr */ - CIMPP::Boolean exclim; /* (exclim). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero not applied to integrator output. Typical Value = true. Default: false */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ - CIMPP::PU kr; /* Death band (Kr). If Kr is not zero, the voltage regulator input changes at a constant rate if Verr > Kr or Verr < -Kr as per the IEEE (1968) Type 4 model. If Kr is zero, the error signal drives the voltage regulator continuously as per the IEEE (1980) DC3 and IEEE (1992, 2005) DC3A models. Typical Value = 0. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ - CIMPP::PU kv; /* Fast raise/lower contact setting (Kv). Typical Value = 0.05. Default: nullptr */ - CIMPP::Simple_Float seefd1; /* Exciter saturation function value at the corresponding exciter voltage, Efd1 (Se[Eefd1]). Typical Value = 0.1. Default: nullptr */ - CIMPP::Simple_Float seefd2; /* Exciter saturation function value at the corresponding exciter voltage, Efd2 (Se[Efd2]). Typical Value = 0.35. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 1.83. Default: nullptr */ - CIMPP::Seconds trh; /* Rheostat travel time (Trh). Typical Value = 20. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (Vrmax). Typical Value = 5. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (Vrmin). Typical Value = 0. Default: nullptr */ + /** \brief Maximum voltage exciter output limiter (Efdmax). Typical Value = 99. Default: nullptr */ + CIMPP::PU edfmax; + + /** \brief Exciter voltage at which exciter saturation is defined (Efd1). Typical Value = 2.6. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Exciter voltage at which exciter saturation is defined (Efd2). Typical Value = 3.45. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief (Efdlim). true = exciter output limiter is active false = exciter output limiter not active. Typical Value = true. Default: false */ + CIMPP::Boolean efdlim; + + /** \brief Minimum voltage exciter output limiter (Efdmin). Typical Value = -99. Default: nullptr */ + CIMPP::PU efdmin; + + /** \brief (exclim). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero not applied to integrator output. Typical Value = true. Default: false */ + CIMPP::Boolean exclim; + + /** \brief Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Death band (Kr). If Kr is not zero, the voltage regulator input changes at a constant rate if Verr > Kr or Verr < -Kr as per the IEEE (1968) Type 4 model. If Kr is zero, the error signal drives the voltage regulator continuously as per the IEEE (1980) DC3 and IEEE (1992, 2005) DC3A models. Typical Value = 0. Default: nullptr */ + CIMPP::PU kr; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Fast raise/lower contact setting (Kv). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU kv; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Efd1 (Se[Eefd1]). Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float seefd1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Efd2 (Se[Efd2]). Typical Value = 0.35. Default: nullptr */ + CIMPP::Simple_Float seefd2; + + /** \brief Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 1.83. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Rheostat travel time (Trh). Typical Value = 20. Default: nullptr */ + CIMPP::Seconds trh; + + /** \brief Maximum voltage regulator output (Vrmax). Typical Value = 5. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (Vrmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcDC3A1.cpp b/CGMES_2.4.15_16FEB2016/ExcDC3A1.cpp index e8b7caeb6..4d46a92b7 100644 --- a/CGMES_2.4.15_16FEB2016/ExcDC3A1.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcDC3A1.cpp @@ -8,25 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcDC3A1::ExcDC3A1() {}; -ExcDC3A1::~ExcDC3A1() {}; +ExcDC3A1::ExcDC3A1() {} +ExcDC3A1::~ExcDC3A1() {} static const std::list PossibleProfilesForClass = { @@ -66,194 +52,206 @@ ExcDC3A1::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcDC3A1_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_exclim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exclim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_vb1max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_vb1max(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vb1max; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_vblim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_vblim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vblim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_vbmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_vbmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vbmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcDC3A1_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exclim; if (!buffer.str().empty()) @@ -267,7 +265,8 @@ bool get_ExcDC3A1_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcDC3A1_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -281,7 +280,8 @@ bool get_ExcDC3A1_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A1_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -295,7 +295,8 @@ bool get_ExcDC3A1_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A1_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -309,7 +310,8 @@ bool get_ExcDC3A1_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A1_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -323,7 +325,8 @@ bool get_ExcDC3A1_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A1_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -337,7 +340,8 @@ bool get_ExcDC3A1_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A1_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -351,7 +355,8 @@ bool get_ExcDC3A1_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A1_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -365,7 +370,8 @@ bool get_ExcDC3A1_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A1_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -379,7 +385,8 @@ bool get_ExcDC3A1_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A1_vb1max(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vb1max; if (!buffer.str().empty()) @@ -393,7 +400,8 @@ bool get_ExcDC3A1_vb1max(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcDC3A1_vblim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vblim; if (!buffer.str().empty()) @@ -407,7 +415,8 @@ bool get_ExcDC3A1_vblim(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC3A1_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vbmax; if (!buffer.str().empty()) @@ -421,7 +430,8 @@ bool get_ExcDC3A1_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC3A1_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -435,7 +445,8 @@ bool get_ExcDC3A1_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC3A1_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -447,8 +458,6 @@ bool get_ExcDC3A1_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char ExcDC3A1::debugName[] = "ExcDC3A1"; const char* ExcDC3A1::debugString() const { @@ -457,25 +466,25 @@ const char* ExcDC3A1::debugString() const void ExcDC3A1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcDC3A1"), &ExcDC3A1_factory)); + factory_map.emplace("cim:ExcDC3A1", &ExcDC3A1_factory); } void ExcDC3A1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.exclim"), &assign_ExcDC3A1_exclim)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.ka"), &assign_ExcDC3A1_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.ke"), &assign_ExcDC3A1_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.kf"), &assign_ExcDC3A1_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.ki"), &assign_ExcDC3A1_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.kp"), &assign_ExcDC3A1_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.ta"), &assign_ExcDC3A1_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.te"), &assign_ExcDC3A1_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.tf"), &assign_ExcDC3A1_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.vb1max"), &assign_ExcDC3A1_vb1max)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.vblim"), &assign_ExcDC3A1_vblim)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.vbmax"), &assign_ExcDC3A1_vbmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.vrmax"), &assign_ExcDC3A1_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.vrmin"), &assign_ExcDC3A1_vrmin)); + assign_map.emplace("cim:ExcDC3A1.exclim", &assign_ExcDC3A1_exclim); + assign_map.emplace("cim:ExcDC3A1.ka", &assign_ExcDC3A1_ka); + assign_map.emplace("cim:ExcDC3A1.ke", &assign_ExcDC3A1_ke); + assign_map.emplace("cim:ExcDC3A1.kf", &assign_ExcDC3A1_kf); + assign_map.emplace("cim:ExcDC3A1.ki", &assign_ExcDC3A1_ki); + assign_map.emplace("cim:ExcDC3A1.kp", &assign_ExcDC3A1_kp); + assign_map.emplace("cim:ExcDC3A1.ta", &assign_ExcDC3A1_ta); + assign_map.emplace("cim:ExcDC3A1.te", &assign_ExcDC3A1_te); + assign_map.emplace("cim:ExcDC3A1.tf", &assign_ExcDC3A1_tf); + assign_map.emplace("cim:ExcDC3A1.vb1max", &assign_ExcDC3A1_vb1max); + assign_map.emplace("cim:ExcDC3A1.vblim", &assign_ExcDC3A1_vblim); + assign_map.emplace("cim:ExcDC3A1.vbmax", &assign_ExcDC3A1_vbmax); + assign_map.emplace("cim:ExcDC3A1.vrmax", &assign_ExcDC3A1_vrmax); + assign_map.emplace("cim:ExcDC3A1.vrmin", &assign_ExcDC3A1_vrmin); } void ExcDC3A1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcDC3A1.hpp b/CGMES_2.4.15_16FEB2016/ExcDC3A1.hpp index e89d52595..e58f7643f 100644 --- a/CGMES_2.4.15_16FEB2016/ExcDC3A1.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcDC3A1.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - This is modified old IEEE type 3 excitation system. - */ + /** \brief This is modified old IEEE type 3 excitation system. */ class ExcDC3A1 : public ExcitationSystemDynamics { public: @@ -29,20 +27,47 @@ namespace CIMPP ExcDC3A1(); ~ExcDC3A1() override; - CIMPP::Boolean exclim; /* (exclim). true = lower limit of zero is applied to integrator output false = lower limit of zero not applied to integrator output. Typical Value = true. Default: false */ - CIMPP::PU ka; /* Voltage regulator gain (Ka). Typical Value = 300. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gain (Kf). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU ki; /* Potential circuit gain coefficient (Ki). Typical Value = 4.83. Default: nullptr */ - CIMPP::PU kp; /* Potential circuit gain coefficient (Kp). Typical Value = 4.37. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (Ta). Typical Value = 0.01. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 1.83. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (Tf). Typical Value = 0.675. Default: nullptr */ - CIMPP::PU vb1max; /* Available exciter voltage limiter (Vb1max). Typical Value = 11.63. Default: nullptr */ - CIMPP::Boolean vblim; /* Vb limiter indicator. true = exciter Vbmax limiter is active false = Vb1max is active. Typical Value = true. Default: false */ - CIMPP::PU vbmax; /* Available exciter voltage limiter (Vbmax). Typical Value = 11.63. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (Vrmax). Typical Value = 5. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (Vrmin). Typical Value = 0. Default: nullptr */ + /** \brief (exclim). true = lower limit of zero is applied to integrator output false = lower limit of zero not applied to integrator output. Typical Value = true. Default: false */ + CIMPP::Boolean exclim; + + /** \brief Voltage regulator gain (Ka). Typical Value = 300. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gain (Kf). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Potential circuit gain coefficient (Ki). Typical Value = 4.83. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Potential circuit gain coefficient (Kp). Typical Value = 4.37. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0.01. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 1.83. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (Tf). Typical Value = 0.675. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Available exciter voltage limiter (Vb1max). Typical Value = 11.63. Default: nullptr */ + CIMPP::PU vb1max; + + /** \brief Vb limiter indicator. true = exciter Vbmax limiter is active false = Vb1max is active. Typical Value = true. Default: false */ + CIMPP::Boolean vblim; + + /** \brief Available exciter voltage limiter (Vbmax). Typical Value = 11.63. Default: nullptr */ + CIMPP::PU vbmax; + + /** \brief Maximum voltage regulator output (Vrmax). Typical Value = 5. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (Vrmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcELIN1.cpp b/CGMES_2.4.15_16FEB2016/ExcELIN1.cpp index 38b5a12c4..449d03fd8 100644 --- a/CGMES_2.4.15_16FEB2016/ExcELIN1.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcELIN1.cpp @@ -8,26 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcELIN1::ExcELIN1() {}; -ExcELIN1::~ExcELIN1() {}; +ExcELIN1::ExcELIN1() {} +ExcELIN1::~ExcELIN1() {} static const std::list PossibleProfilesForClass = { @@ -68,207 +53,220 @@ ExcELIN1::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcELIN1_dpnf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_dpnf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dpnf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_efmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_efmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_efmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_efmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_ks1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_ks1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_ks2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_ks2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_smax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_smax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->smax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_tfi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_tfi(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tfi; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_tnu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_tnu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tnu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_ts1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_ts1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_ts2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_ts2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_tsw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_tsw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tsw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_vpi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_vpi(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vpi; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_vpnf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_vpnf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vpnf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_vpu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_vpu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vpu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_xe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_xe(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xe; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcELIN1_dpnf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dpnf; if (!buffer.str().empty()) @@ -282,7 +280,8 @@ bool get_ExcELIN1_dpnf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcELIN1_efmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efmax; if (!buffer.str().empty()) @@ -296,7 +295,8 @@ bool get_ExcELIN1_efmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcELIN1_efmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efmin; if (!buffer.str().empty()) @@ -310,7 +310,8 @@ bool get_ExcELIN1_efmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcELIN1_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks1; if (!buffer.str().empty()) @@ -324,7 +325,8 @@ bool get_ExcELIN1_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN1_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks2; if (!buffer.str().empty()) @@ -338,7 +340,8 @@ bool get_ExcELIN1_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN1_smax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->smax; if (!buffer.str().empty()) @@ -352,7 +355,8 @@ bool get_ExcELIN1_smax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcELIN1_tfi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tfi; if (!buffer.str().empty()) @@ -366,7 +370,8 @@ bool get_ExcELIN1_tfi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN1_tnu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tnu; if (!buffer.str().empty()) @@ -380,7 +385,8 @@ bool get_ExcELIN1_tnu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN1_ts1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts1; if (!buffer.str().empty()) @@ -394,7 +400,8 @@ bool get_ExcELIN1_ts1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN1_ts2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts2; if (!buffer.str().empty()) @@ -408,7 +415,8 @@ bool get_ExcELIN1_ts2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN1_tsw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tsw; if (!buffer.str().empty()) @@ -422,7 +430,8 @@ bool get_ExcELIN1_tsw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN1_vpi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vpi; if (!buffer.str().empty()) @@ -436,7 +445,8 @@ bool get_ExcELIN1_vpi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN1_vpnf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vpnf; if (!buffer.str().empty()) @@ -450,7 +460,8 @@ bool get_ExcELIN1_vpnf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcELIN1_vpu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vpu; if (!buffer.str().empty()) @@ -464,7 +475,8 @@ bool get_ExcELIN1_vpu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN1_xe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xe; if (!buffer.str().empty()) @@ -476,8 +488,6 @@ bool get_ExcELIN1_xe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcELIN1::debugName[] = "ExcELIN1"; const char* ExcELIN1::debugString() const { @@ -486,26 +496,26 @@ const char* ExcELIN1::debugString() const void ExcELIN1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcELIN1"), &ExcELIN1_factory)); + factory_map.emplace("cim:ExcELIN1", &ExcELIN1_factory); } void ExcELIN1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.dpnf"), &assign_ExcELIN1_dpnf)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.efmax"), &assign_ExcELIN1_efmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.efmin"), &assign_ExcELIN1_efmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.ks1"), &assign_ExcELIN1_ks1)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.ks2"), &assign_ExcELIN1_ks2)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.smax"), &assign_ExcELIN1_smax)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.tfi"), &assign_ExcELIN1_tfi)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.tnu"), &assign_ExcELIN1_tnu)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.ts1"), &assign_ExcELIN1_ts1)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.ts2"), &assign_ExcELIN1_ts2)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.tsw"), &assign_ExcELIN1_tsw)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.vpi"), &assign_ExcELIN1_vpi)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.vpnf"), &assign_ExcELIN1_vpnf)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.vpu"), &assign_ExcELIN1_vpu)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.xe"), &assign_ExcELIN1_xe)); + assign_map.emplace("cim:ExcELIN1.dpnf", &assign_ExcELIN1_dpnf); + assign_map.emplace("cim:ExcELIN1.efmax", &assign_ExcELIN1_efmax); + assign_map.emplace("cim:ExcELIN1.efmin", &assign_ExcELIN1_efmin); + assign_map.emplace("cim:ExcELIN1.ks1", &assign_ExcELIN1_ks1); + assign_map.emplace("cim:ExcELIN1.ks2", &assign_ExcELIN1_ks2); + assign_map.emplace("cim:ExcELIN1.smax", &assign_ExcELIN1_smax); + assign_map.emplace("cim:ExcELIN1.tfi", &assign_ExcELIN1_tfi); + assign_map.emplace("cim:ExcELIN1.tnu", &assign_ExcELIN1_tnu); + assign_map.emplace("cim:ExcELIN1.ts1", &assign_ExcELIN1_ts1); + assign_map.emplace("cim:ExcELIN1.ts2", &assign_ExcELIN1_ts2); + assign_map.emplace("cim:ExcELIN1.tsw", &assign_ExcELIN1_tsw); + assign_map.emplace("cim:ExcELIN1.vpi", &assign_ExcELIN1_vpi); + assign_map.emplace("cim:ExcELIN1.vpnf", &assign_ExcELIN1_vpnf); + assign_map.emplace("cim:ExcELIN1.vpu", &assign_ExcELIN1_vpu); + assign_map.emplace("cim:ExcELIN1.xe", &assign_ExcELIN1_xe); } void ExcELIN1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcELIN1.hpp b/CGMES_2.4.15_16FEB2016/ExcELIN1.hpp index 3260ddcae..91e784ce6 100644 --- a/CGMES_2.4.15_16FEB2016/ExcELIN1.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcELIN1.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Static PI transformer fed excitation system: ELIN (VATECH) - simplified model. This model represents an all-static excitation system. A PI voltage controller establishes a desired field current set point for a proportional current controller. The integrator of the PI controller has a follow-up input to match its signal to the present field current. A power system stabilizer with power input is included in the model. - */ + /** \brief Static PI transformer fed excitation system: ELIN (VATECH) - simplified model. This model represents an all-static excitation system. A PI voltage controller establishes a desired field current set point for a proportional current controller. The integrator of the PI controller has a follow-up input to match its signal to the present field current. A power system stabilizer with power input is included in the model. */ class ExcELIN1 : public ExcitationSystemDynamics { public: @@ -28,21 +26,50 @@ namespace CIMPP ExcELIN1(); ~ExcELIN1() override; - CIMPP::PU dpnf; /* Controller follow up dead band (Dpnf). Typical Value = 0. Default: nullptr */ - CIMPP::PU efmax; /* Maximum open circuit excitation voltage (Efmax). Typical Value = 5. Default: nullptr */ - CIMPP::PU efmin; /* Minimum open circuit excitation voltage (Efmin). Typical Value = -5. Default: nullptr */ - CIMPP::PU ks1; /* Stabilizer Gain 1 (Ks1). Typical Value = 0. Default: nullptr */ - CIMPP::PU ks2; /* Stabilizer Gain 2 (Ks2). Typical Value = 0. Default: nullptr */ - CIMPP::PU smax; /* Stabilizer Limit Output (smax). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tfi; /* Current transducer time constant (Tfi). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tnu; /* Controller reset time constant (Tnu). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds ts1; /* Stabilizer Phase Lag Time Constant (Ts1). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds ts2; /* Stabilizer Filter Time Constant (Ts2). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tsw; /* Stabilizer parameters (Tsw). Typical Value = 3. Default: nullptr */ - CIMPP::PU vpi; /* Current controller gain (Vpi). Typical Value = 12.45. Default: nullptr */ - CIMPP::PU vpnf; /* Controller follow up gain (Vpnf). Typical Value = 2. Default: nullptr */ - CIMPP::PU vpu; /* Voltage controller proportional gain (Vpu). Typical Value = 34.5. Default: nullptr */ - CIMPP::PU xe; /* Excitation transformer effective reactance (Xe) (>=0). Xe represents the regulation of the transformer/rectifier unit. Typical Value = 0.06. Default: nullptr */ + /** \brief Controller follow up dead band (Dpnf). Typical Value = 0. Default: nullptr */ + CIMPP::PU dpnf; + + /** \brief Maximum open circuit excitation voltage (Efmax). Typical Value = 5. Default: nullptr */ + CIMPP::PU efmax; + + /** \brief Minimum open circuit excitation voltage (Efmin). Typical Value = -5. Default: nullptr */ + CIMPP::PU efmin; + + /** \brief Stabilizer Gain 1 (Ks1). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks1; + + /** \brief Stabilizer Gain 2 (Ks2). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks2; + + /** \brief Stabilizer Limit Output (smax). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU smax; + + /** \brief Current transducer time constant (Tfi). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tfi; + + /** \brief Controller reset time constant (Tnu). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds tnu; + + /** \brief Stabilizer Phase Lag Time Constant (Ts1). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds ts1; + + /** \brief Stabilizer Filter Time Constant (Ts2). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds ts2; + + /** \brief Stabilizer parameters (Tsw). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds tsw; + + /** \brief Current controller gain (Vpi). Typical Value = 12.45. Default: nullptr */ + CIMPP::PU vpi; + + /** \brief Controller follow up gain (Vpnf). Typical Value = 2. Default: nullptr */ + CIMPP::PU vpnf; + + /** \brief Voltage controller proportional gain (Vpu). Typical Value = 34.5. Default: nullptr */ + CIMPP::PU vpu; + + /** \brief Excitation transformer effective reactance (Xe) (>=0). Xe represents the regulation of the transformer/rectifier unit. Typical Value = 0.06. Default: nullptr */ + CIMPP::PU xe; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcELIN2.cpp b/CGMES_2.4.15_16FEB2016/ExcELIN2.cpp index c61563e77..afd309820 100644 --- a/CGMES_2.4.15_16FEB2016/ExcELIN2.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcELIN2.cpp @@ -8,38 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcELIN2::ExcELIN2() {}; -ExcELIN2::~ExcELIN2() {}; +ExcELIN2::ExcELIN2() {} +ExcELIN2::~ExcELIN2() {} static const std::list PossibleProfilesForClass = { @@ -92,363 +65,388 @@ ExcELIN2::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcELIN2_efdbas(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_efdbas(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdbas; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_iefmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_iefmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->iefmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_iefmax2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_iefmax2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->iefmax2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_iefmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_iefmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->iefmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_k1ec(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_k1ec(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1ec; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_k4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_kd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_kd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_ke2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_ke2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_ketb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_ketb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ketb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_pid1max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_pid1max(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pid1max; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_tb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_tb1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_te2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_te2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_ti1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_ti1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_ti3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_ti3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_ti4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_ti4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_tr4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_tr4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_upmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_upmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->upmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_upmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_upmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->upmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_xp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_xp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcELIN2_efdbas(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdbas; if (!buffer.str().empty()) @@ -462,7 +460,8 @@ bool get_ExcELIN2_efdbas(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcELIN2_iefmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->iefmax; if (!buffer.str().empty()) @@ -476,7 +475,8 @@ bool get_ExcELIN2_iefmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcELIN2_iefmax2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->iefmax2; if (!buffer.str().empty()) @@ -490,7 +490,8 @@ bool get_ExcELIN2_iefmax2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcELIN2_iefmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->iefmin; if (!buffer.str().empty()) @@ -504,7 +505,8 @@ bool get_ExcELIN2_iefmin(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcELIN2_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -518,7 +520,8 @@ bool get_ExcELIN2_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcELIN2_k1ec(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1ec; if (!buffer.str().empty()) @@ -532,7 +535,8 @@ bool get_ExcELIN2_k1ec(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcELIN2_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -546,7 +550,8 @@ bool get_ExcELIN2_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcELIN2_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -560,7 +565,8 @@ bool get_ExcELIN2_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcELIN2_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k4; if (!buffer.str().empty()) @@ -574,7 +580,8 @@ bool get_ExcELIN2_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcELIN2_kd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd1; if (!buffer.str().empty()) @@ -588,7 +595,8 @@ bool get_ExcELIN2_kd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_ke2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke2; if (!buffer.str().empty()) @@ -602,7 +610,8 @@ bool get_ExcELIN2_ke2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_ketb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ketb; if (!buffer.str().empty()) @@ -616,7 +625,8 @@ bool get_ExcELIN2_ketb(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcELIN2_pid1max(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pid1max; if (!buffer.str().empty()) @@ -630,7 +640,8 @@ bool get_ExcELIN2_pid1max(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcELIN2_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -644,7 +655,8 @@ bool get_ExcELIN2_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcELIN2_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -658,7 +670,8 @@ bool get_ExcELIN2_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcELIN2_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb1; if (!buffer.str().empty()) @@ -672,7 +685,8 @@ bool get_ExcELIN2_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -686,7 +700,8 @@ bool get_ExcELIN2_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcELIN2_te2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te2; if (!buffer.str().empty()) @@ -700,7 +715,8 @@ bool get_ExcELIN2_te2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_ti1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti1; if (!buffer.str().empty()) @@ -714,7 +730,8 @@ bool get_ExcELIN2_ti1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_ti3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti3; if (!buffer.str().empty()) @@ -728,7 +745,8 @@ bool get_ExcELIN2_ti3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_ti4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti4; if (!buffer.str().empty()) @@ -742,7 +760,8 @@ bool get_ExcELIN2_ti4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_tr4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr4; if (!buffer.str().empty()) @@ -756,7 +775,8 @@ bool get_ExcELIN2_tr4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_upmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->upmax; if (!buffer.str().empty()) @@ -770,7 +790,8 @@ bool get_ExcELIN2_upmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcELIN2_upmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->upmin; if (!buffer.str().empty()) @@ -784,7 +805,8 @@ bool get_ExcELIN2_upmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcELIN2_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -798,7 +820,8 @@ bool get_ExcELIN2_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -812,7 +835,8 @@ bool get_ExcELIN2_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_xp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xp; if (!buffer.str().empty()) @@ -824,8 +848,6 @@ bool get_ExcELIN2_xp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcELIN2::debugName[] = "ExcELIN2"; const char* ExcELIN2::debugString() const { @@ -834,38 +856,38 @@ const char* ExcELIN2::debugString() const void ExcELIN2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcELIN2"), &ExcELIN2_factory)); + factory_map.emplace("cim:ExcELIN2", &ExcELIN2_factory); } void ExcELIN2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.efdbas"), &assign_ExcELIN2_efdbas)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.iefmax"), &assign_ExcELIN2_iefmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.iefmax2"), &assign_ExcELIN2_iefmax2)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.iefmin"), &assign_ExcELIN2_iefmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.k1"), &assign_ExcELIN2_k1)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.k1ec"), &assign_ExcELIN2_k1ec)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.k2"), &assign_ExcELIN2_k2)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.k3"), &assign_ExcELIN2_k3)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.k4"), &assign_ExcELIN2_k4)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.kd1"), &assign_ExcELIN2_kd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.ke2"), &assign_ExcELIN2_ke2)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.ketb"), &assign_ExcELIN2_ketb)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.pid1max"), &assign_ExcELIN2_pid1max)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.seve1"), &assign_ExcELIN2_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.seve2"), &assign_ExcELIN2_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.tb1"), &assign_ExcELIN2_tb1)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.te"), &assign_ExcELIN2_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.te2"), &assign_ExcELIN2_te2)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.ti1"), &assign_ExcELIN2_ti1)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.ti3"), &assign_ExcELIN2_ti3)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.ti4"), &assign_ExcELIN2_ti4)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.tr4"), &assign_ExcELIN2_tr4)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.upmax"), &assign_ExcELIN2_upmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.upmin"), &assign_ExcELIN2_upmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.ve1"), &assign_ExcELIN2_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.ve2"), &assign_ExcELIN2_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.xp"), &assign_ExcELIN2_xp)); + assign_map.emplace("cim:ExcELIN2.efdbas", &assign_ExcELIN2_efdbas); + assign_map.emplace("cim:ExcELIN2.iefmax", &assign_ExcELIN2_iefmax); + assign_map.emplace("cim:ExcELIN2.iefmax2", &assign_ExcELIN2_iefmax2); + assign_map.emplace("cim:ExcELIN2.iefmin", &assign_ExcELIN2_iefmin); + assign_map.emplace("cim:ExcELIN2.k1", &assign_ExcELIN2_k1); + assign_map.emplace("cim:ExcELIN2.k1ec", &assign_ExcELIN2_k1ec); + assign_map.emplace("cim:ExcELIN2.k2", &assign_ExcELIN2_k2); + assign_map.emplace("cim:ExcELIN2.k3", &assign_ExcELIN2_k3); + assign_map.emplace("cim:ExcELIN2.k4", &assign_ExcELIN2_k4); + assign_map.emplace("cim:ExcELIN2.kd1", &assign_ExcELIN2_kd1); + assign_map.emplace("cim:ExcELIN2.ke2", &assign_ExcELIN2_ke2); + assign_map.emplace("cim:ExcELIN2.ketb", &assign_ExcELIN2_ketb); + assign_map.emplace("cim:ExcELIN2.pid1max", &assign_ExcELIN2_pid1max); + assign_map.emplace("cim:ExcELIN2.seve1", &assign_ExcELIN2_seve1); + assign_map.emplace("cim:ExcELIN2.seve2", &assign_ExcELIN2_seve2); + assign_map.emplace("cim:ExcELIN2.tb1", &assign_ExcELIN2_tb1); + assign_map.emplace("cim:ExcELIN2.te", &assign_ExcELIN2_te); + assign_map.emplace("cim:ExcELIN2.te2", &assign_ExcELIN2_te2); + assign_map.emplace("cim:ExcELIN2.ti1", &assign_ExcELIN2_ti1); + assign_map.emplace("cim:ExcELIN2.ti3", &assign_ExcELIN2_ti3); + assign_map.emplace("cim:ExcELIN2.ti4", &assign_ExcELIN2_ti4); + assign_map.emplace("cim:ExcELIN2.tr4", &assign_ExcELIN2_tr4); + assign_map.emplace("cim:ExcELIN2.upmax", &assign_ExcELIN2_upmax); + assign_map.emplace("cim:ExcELIN2.upmin", &assign_ExcELIN2_upmin); + assign_map.emplace("cim:ExcELIN2.ve1", &assign_ExcELIN2_ve1); + assign_map.emplace("cim:ExcELIN2.ve2", &assign_ExcELIN2_ve2); + assign_map.emplace("cim:ExcELIN2.xp", &assign_ExcELIN2_xp); } void ExcELIN2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcELIN2.hpp b/CGMES_2.4.15_16FEB2016/ExcELIN2.hpp index e2588dab2..b68685963 100644 --- a/CGMES_2.4.15_16FEB2016/ExcELIN2.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcELIN2.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Detailed Excitation System Model - ELIN (VATECH). This model represents an all-static excitation system. A PI voltage controller establishes a desired field current set point for a proportional current controller. The integrator of the PI controller has a follow-up input to match its signal to the present field current. Power system stabilizer models used in conjunction with this excitation system model: PssELIN2, PssIEEE2B, Pss2B. - */ + /** \brief Detailed Excitation System Model - ELIN (VATECH). This model represents an all-static excitation system. A PI voltage controller establishes a desired field current set point for a proportional current controller. The integrator of the PI controller has a follow-up input to match its signal to the present field current. Power system stabilizer models used in conjunction with this excitation system model: PssELIN2, PssIEEE2B, Pss2B. */ class ExcELIN2 : public ExcitationSystemDynamics { public: @@ -28,33 +26,86 @@ namespace CIMPP ExcELIN2(); ~ExcELIN2() override; - CIMPP::PU efdbas; /* Gain (Efdbas). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU iefmax; /* Limiter (Iefmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU iefmax2; /* Minimum open circuit excitation voltage (Iefmax2). Typical Value = -5. Default: nullptr */ - CIMPP::PU iefmin; /* Limiter (Iefmin). Typical Value = 1. Default: nullptr */ - CIMPP::PU k1; /* Voltage regulator input gain (K1). Typical Value = 0. Default: nullptr */ - CIMPP::PU k1ec; /* Voltage regulator input limit (K1ec). Typical Value = 2. Default: nullptr */ - CIMPP::PU k2; /* Gain (K2). Typical Value = 5. Default: nullptr */ - CIMPP::PU k3; /* Gain (K3). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU k4; /* Gain (K4). Typical Value = 0. Default: nullptr */ - CIMPP::PU kd1; /* Voltage controller derivative gain (Kd1). Typical Value = 34.5. Default: nullptr */ - CIMPP::PU ke2; /* Gain (Ke2). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU ketb; /* Gain (Ketb). Typical Value = 0.06. Default: nullptr */ - CIMPP::PU pid1max; /* Controller follow up gain (PID1max). Typical Value = 2. Default: nullptr */ - CIMPP::PU seve1; /* Exciter saturation function value at the corresponding exciter voltage, Ve1, back of commutating reactance (Se[Ve1]). Typical Value = 0. Default: nullptr */ - CIMPP::PU seve2; /* Exciter saturation function value at the corresponding exciter voltage, Ve2, back of commutating reactance (Se[Ve2]). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tb1; /* Voltage controller derivative washout time constant (Tb1). Typical Value = 12.45. Default: nullptr */ - CIMPP::Seconds te; /* Time constant (Te). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te2; /* Time Constant (Te2). Typical Value = 1. Default: nullptr */ - CIMPP::PU ti1; /* Controller follow up dead band (Ti1). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ti3; /* Time constant (Ti3). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds ti4; /* Time constant (Ti4). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tr4; /* Time constant (Tr4). Typical Value = 1. Default: nullptr */ - CIMPP::PU upmax; /* Limiter (Upmax). Typical Value = 3. Default: nullptr */ - CIMPP::PU upmin; /* Limiter (Upmin). Typical Value = 0. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve1). Typical Value = 3. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve2). Typical Value = 0. Default: nullptr */ - CIMPP::PU xp; /* Excitation transformer effective reactance (Xp). Typical Value = 1. Default: nullptr */ + /** \brief Gain (Efdbas). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU efdbas; + + /** \brief Limiter (Iefmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU iefmax; + + /** \brief Minimum open circuit excitation voltage (Iefmax2). Typical Value = -5. Default: nullptr */ + CIMPP::PU iefmax2; + + /** \brief Limiter (Iefmin). Typical Value = 1. Default: nullptr */ + CIMPP::PU iefmin; + + /** \brief Voltage regulator input gain (K1). Typical Value = 0. Default: nullptr */ + CIMPP::PU k1; + + /** \brief Voltage regulator input limit (K1ec). Typical Value = 2. Default: nullptr */ + CIMPP::PU k1ec; + + /** \brief Gain (K2). Typical Value = 5. Default: nullptr */ + CIMPP::PU k2; + + /** \brief Gain (K3). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU k3; + + /** \brief Gain (K4). Typical Value = 0. Default: nullptr */ + CIMPP::PU k4; + + /** \brief Voltage controller derivative gain (Kd1). Typical Value = 34.5. Default: nullptr */ + CIMPP::PU kd1; + + /** \brief Gain (Ke2). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU ke2; + + /** \brief Gain (Ketb). Typical Value = 0.06. Default: nullptr */ + CIMPP::PU ketb; + + /** \brief Controller follow up gain (PID1max). Typical Value = 2. Default: nullptr */ + CIMPP::PU pid1max; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Ve1, back of commutating reactance (Se[Ve1]). Typical Value = 0. Default: nullptr */ + CIMPP::PU seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Ve2, back of commutating reactance (Se[Ve2]). Typical Value = 1. Default: nullptr */ + CIMPP::PU seve2; + + /** \brief Voltage controller derivative washout time constant (Tb1). Typical Value = 12.45. Default: nullptr */ + CIMPP::Seconds tb1; + + /** \brief Time constant (Te). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Time Constant (Te2). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds te2; + + /** \brief Controller follow up dead band (Ti1). Typical Value = 0. Default: nullptr */ + CIMPP::PU ti1; + + /** \brief Time constant (Ti3). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds ti3; + + /** \brief Time constant (Ti4). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ti4; + + /** \brief Time constant (Tr4). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tr4; + + /** \brief Limiter (Upmax). Typical Value = 3. Default: nullptr */ + CIMPP::PU upmax; + + /** \brief Limiter (Upmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU upmin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve1). Typical Value = 3. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve2). Typical Value = 0. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Excitation transformer effective reactance (Xp). Typical Value = 1. Default: nullptr */ + CIMPP::PU xp; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcHU.cpp b/CGMES_2.4.15_16FEB2016/ExcHU.cpp index d7531c435..d00bf89d8 100644 --- a/CGMES_2.4.15_16FEB2016/ExcHU.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcHU.cpp @@ -8,23 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -ExcHU::ExcHU() {}; -ExcHU::~ExcHU() {}; +ExcHU::ExcHU() {} +ExcHU::~ExcHU() {} static const std::list PossibleProfilesForClass = { @@ -62,168 +50,178 @@ ExcHU::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcHU_ae(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_ae(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ae; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_ai(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_ai(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ai; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_atr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_atr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->atr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_emax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_emax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->emax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_emin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_emin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->emin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_imax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_imax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->imax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_imin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_imin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->imin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_ti(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_ti(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcHU_ae(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ae; if (!buffer.str().empty()) @@ -237,7 +235,8 @@ bool get_ExcHU_ae(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_ai(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ai; if (!buffer.str().empty()) @@ -251,7 +250,8 @@ bool get_ExcHU_ai(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_atr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->atr; if (!buffer.str().empty()) @@ -265,7 +265,8 @@ bool get_ExcHU_atr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->emax; if (!buffer.str().empty()) @@ -279,7 +280,8 @@ bool get_ExcHU_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_emin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->emin; if (!buffer.str().empty()) @@ -293,7 +295,8 @@ bool get_ExcHU_emin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_imax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->imax; if (!buffer.str().empty()) @@ -307,7 +310,8 @@ bool get_ExcHU_imax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_imin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->imin; if (!buffer.str().empty()) @@ -321,7 +325,8 @@ bool get_ExcHU_imin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -335,7 +340,8 @@ bool get_ExcHU_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -349,7 +355,8 @@ bool get_ExcHU_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -363,7 +370,8 @@ bool get_ExcHU_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_ti(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti; if (!buffer.str().empty()) @@ -377,7 +385,8 @@ bool get_ExcHU_ti(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -389,8 +398,6 @@ bool get_ExcHU_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcHU::debugName[] = "ExcHU"; const char* ExcHU::debugString() const { @@ -399,23 +406,23 @@ const char* ExcHU::debugString() const void ExcHU::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcHU"), &ExcHU_factory)); + factory_map.emplace("cim:ExcHU", &ExcHU_factory); } void ExcHU::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcHU.ae"), &assign_ExcHU_ae)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.ai"), &assign_ExcHU_ai)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.atr"), &assign_ExcHU_atr)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.emax"), &assign_ExcHU_emax)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.emin"), &assign_ExcHU_emin)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.imax"), &assign_ExcHU_imax)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.imin"), &assign_ExcHU_imin)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.ke"), &assign_ExcHU_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.ki"), &assign_ExcHU_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.te"), &assign_ExcHU_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.ti"), &assign_ExcHU_ti)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.tr"), &assign_ExcHU_tr)); + assign_map.emplace("cim:ExcHU.ae", &assign_ExcHU_ae); + assign_map.emplace("cim:ExcHU.ai", &assign_ExcHU_ai); + assign_map.emplace("cim:ExcHU.atr", &assign_ExcHU_atr); + assign_map.emplace("cim:ExcHU.emax", &assign_ExcHU_emax); + assign_map.emplace("cim:ExcHU.emin", &assign_ExcHU_emin); + assign_map.emplace("cim:ExcHU.imax", &assign_ExcHU_imax); + assign_map.emplace("cim:ExcHU.imin", &assign_ExcHU_imin); + assign_map.emplace("cim:ExcHU.ke", &assign_ExcHU_ke); + assign_map.emplace("cim:ExcHU.ki", &assign_ExcHU_ki); + assign_map.emplace("cim:ExcHU.te", &assign_ExcHU_te); + assign_map.emplace("cim:ExcHU.ti", &assign_ExcHU_ti); + assign_map.emplace("cim:ExcHU.tr", &assign_ExcHU_tr); } void ExcHU::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcHU.hpp b/CGMES_2.4.15_16FEB2016/ExcHU.hpp index 2912bde7e..6e31eb84e 100644 --- a/CGMES_2.4.15_16FEB2016/ExcHU.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcHU.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Hungarian Excitation System Model, with built-in voltage transducer. - */ + /** \brief Hungarian Excitation System Model, with built-in voltage transducer. */ class ExcHU : public ExcitationSystemDynamics { public: @@ -29,18 +27,41 @@ namespace CIMPP ExcHU(); ~ExcHU() override; - CIMPP::PU ae; /* Major loop PI tag gain factor (Ae). Typical Value = 3. Default: nullptr */ - CIMPP::PU ai; /* Minor loop PI tag gain factor (Ai). Typical Value = 22. Default: nullptr */ - CIMPP::PU atr; /* AVR constant (Atr). Typical Value = 2.19. Default: nullptr */ - CIMPP::PU emax; /* Field voltage control signal upper limit on AVR base (Emax). Typical Value = 0.996. Default: nullptr */ - CIMPP::PU emin; /* Field voltage control signal lower limit on AVR base (Emin). Typical Value = -0.866. Default: nullptr */ - CIMPP::PU imax; /* Major loop PI tag output signal upper limit (Imax). Typical Value = 2.19. Default: nullptr */ - CIMPP::PU imin; /* Major loop PI tag output signal lower limit (Imin). Typical Value = 0.1. Default: nullptr */ - CIMPP::Simple_Float ke; /* Voltage base conversion constant (Ke). Typical Value = 4.666. Default: nullptr */ - CIMPP::Simple_Float ki; /* Current base conversion constant (Ki). Typical Value = 0.21428. Default: nullptr */ - CIMPP::Seconds te; /* Major loop PI tag integration time constant (Te). Typical Value = 0.154. Default: nullptr */ - CIMPP::Seconds ti; /* Minor loop PI control tag integration time constant (Ti). Typical Value = 0.01333. Default: nullptr */ - CIMPP::Seconds tr; /* Filter time constant (Tr). If a voltage compensator is used in conjunction with this excitation system model, Tr should be set to 0. Typical Value = 0.01. Default: nullptr */ + /** \brief Major loop PI tag gain factor (Ae). Typical Value = 3. Default: nullptr */ + CIMPP::PU ae; + + /** \brief Minor loop PI tag gain factor (Ai). Typical Value = 22. Default: nullptr */ + CIMPP::PU ai; + + /** \brief AVR constant (Atr). Typical Value = 2.19. Default: nullptr */ + CIMPP::PU atr; + + /** \brief Field voltage control signal upper limit on AVR base (Emax). Typical Value = 0.996. Default: nullptr */ + CIMPP::PU emax; + + /** \brief Field voltage control signal lower limit on AVR base (Emin). Typical Value = -0.866. Default: nullptr */ + CIMPP::PU emin; + + /** \brief Major loop PI tag output signal upper limit (Imax). Typical Value = 2.19. Default: nullptr */ + CIMPP::PU imax; + + /** \brief Major loop PI tag output signal lower limit (Imin). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU imin; + + /** \brief Voltage base conversion constant (Ke). Typical Value = 4.666. Default: nullptr */ + CIMPP::Simple_Float ke; + + /** \brief Current base conversion constant (Ki). Typical Value = 0.21428. Default: nullptr */ + CIMPP::Simple_Float ki; + + /** \brief Major loop PI tag integration time constant (Te). Typical Value = 0.154. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Minor loop PI control tag integration time constant (Ti). Typical Value = 0.01333. Default: nullptr */ + CIMPP::Seconds ti; + + /** \brief Filter time constant (Tr). If a voltage compensator is used in conjunction with this excitation system model, Tr should be set to 0. Typical Value = 0.01. Default: nullptr */ + CIMPP::Seconds tr; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEAC1A.cpp b/CGMES_2.4.15_16FEB2016/ExcIEEEAC1A.cpp index 20968d73e..9b4889e3d 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEAC1A.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEAC1A.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEAC1A::ExcIEEEAC1A() {}; -ExcIEEEAC1A::~ExcIEEEAC1A() {}; +ExcIEEEAC1A::ExcIEEEAC1A() {} +ExcIEEEAC1A::~ExcIEEEAC1A() {} static const std::list PossibleProfilesForClass = { @@ -74,246 +56,262 @@ ExcIEEEAC1A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEAC1A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEAC1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -327,7 +325,8 @@ bool get_ExcIEEEAC1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -341,7 +340,8 @@ bool get_ExcIEEEAC1A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -355,7 +355,8 @@ bool get_ExcIEEEAC1A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -369,7 +370,8 @@ bool get_ExcIEEEAC1A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -383,7 +385,8 @@ bool get_ExcIEEEAC1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -397,7 +400,8 @@ bool get_ExcIEEEAC1A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC1A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -411,7 +415,8 @@ bool get_ExcIEEEAC1A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -425,7 +430,8 @@ bool get_ExcIEEEAC1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -439,7 +445,8 @@ bool get_ExcIEEEAC1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -453,7 +460,8 @@ bool get_ExcIEEEAC1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -467,7 +475,8 @@ bool get_ExcIEEEAC1A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -481,7 +490,8 @@ bool get_ExcIEEEAC1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -495,7 +505,8 @@ bool get_ExcIEEEAC1A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC1A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -509,7 +520,8 @@ bool get_ExcIEEEAC1A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC1A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -523,7 +535,8 @@ bool get_ExcIEEEAC1A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC1A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -537,7 +550,8 @@ bool get_ExcIEEEAC1A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -551,7 +565,8 @@ bool get_ExcIEEEAC1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -563,8 +578,6 @@ bool get_ExcIEEEAC1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEAC1A::debugName[] = "ExcIEEEAC1A"; const char* ExcIEEEAC1A::debugString() const { @@ -573,29 +586,29 @@ const char* ExcIEEEAC1A::debugString() const void ExcIEEEAC1A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A"), &ExcIEEEAC1A_factory)); + factory_map.emplace("cim:ExcIEEEAC1A", &ExcIEEEAC1A_factory); } void ExcIEEEAC1A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.ka"), &assign_ExcIEEEAC1A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.kc"), &assign_ExcIEEEAC1A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.kd"), &assign_ExcIEEEAC1A_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.ke"), &assign_ExcIEEEAC1A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.kf"), &assign_ExcIEEEAC1A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.seve1"), &assign_ExcIEEEAC1A_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.seve2"), &assign_ExcIEEEAC1A_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.ta"), &assign_ExcIEEEAC1A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.tb"), &assign_ExcIEEEAC1A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.tc"), &assign_ExcIEEEAC1A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.te"), &assign_ExcIEEEAC1A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.tf"), &assign_ExcIEEEAC1A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.vamax"), &assign_ExcIEEEAC1A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.vamin"), &assign_ExcIEEEAC1A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.ve1"), &assign_ExcIEEEAC1A_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.ve2"), &assign_ExcIEEEAC1A_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.vrmax"), &assign_ExcIEEEAC1A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.vrmin"), &assign_ExcIEEEAC1A_vrmin)); + assign_map.emplace("cim:ExcIEEEAC1A.ka", &assign_ExcIEEEAC1A_ka); + assign_map.emplace("cim:ExcIEEEAC1A.kc", &assign_ExcIEEEAC1A_kc); + assign_map.emplace("cim:ExcIEEEAC1A.kd", &assign_ExcIEEEAC1A_kd); + assign_map.emplace("cim:ExcIEEEAC1A.ke", &assign_ExcIEEEAC1A_ke); + assign_map.emplace("cim:ExcIEEEAC1A.kf", &assign_ExcIEEEAC1A_kf); + assign_map.emplace("cim:ExcIEEEAC1A.seve1", &assign_ExcIEEEAC1A_seve1); + assign_map.emplace("cim:ExcIEEEAC1A.seve2", &assign_ExcIEEEAC1A_seve2); + assign_map.emplace("cim:ExcIEEEAC1A.ta", &assign_ExcIEEEAC1A_ta); + assign_map.emplace("cim:ExcIEEEAC1A.tb", &assign_ExcIEEEAC1A_tb); + assign_map.emplace("cim:ExcIEEEAC1A.tc", &assign_ExcIEEEAC1A_tc); + assign_map.emplace("cim:ExcIEEEAC1A.te", &assign_ExcIEEEAC1A_te); + assign_map.emplace("cim:ExcIEEEAC1A.tf", &assign_ExcIEEEAC1A_tf); + assign_map.emplace("cim:ExcIEEEAC1A.vamax", &assign_ExcIEEEAC1A_vamax); + assign_map.emplace("cim:ExcIEEEAC1A.vamin", &assign_ExcIEEEAC1A_vamin); + assign_map.emplace("cim:ExcIEEEAC1A.ve1", &assign_ExcIEEEAC1A_ve1); + assign_map.emplace("cim:ExcIEEEAC1A.ve2", &assign_ExcIEEEAC1A_ve2); + assign_map.emplace("cim:ExcIEEEAC1A.vrmax", &assign_ExcIEEEAC1A_vrmax); + assign_map.emplace("cim:ExcIEEEAC1A.vrmin", &assign_ExcIEEEAC1A_vrmin); } void ExcIEEEAC1A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEAC1A.hpp b/CGMES_2.4.15_16FEB2016/ExcIEEEAC1A.hpp index 1f0f92bab..a3d32c72f 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEAC1A.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEAC1A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type AC1A model. The model represents the field-controlled alternator-rectifier excitation systems designated Type AC1A. These excitation systems consist of an alternator main exciter with non-controlled rectifiers. Reference: IEEE Standard 421.5-2005 Section 6.1. - */ + /** \brief The class represents IEEE Std 421.5-2005 type AC1A model. The model represents the field-controlled alternator-rectifier excitation systems designated Type AC1A. These excitation systems consist of an alternator main exciter with non-controlled rectifiers. Reference: IEEE Standard 421.5-2005 Section 6.1. */ class ExcIEEEAC1A : public ExcitationSystemDynamics { public: @@ -29,24 +27,59 @@ namespace CIMPP ExcIEEEAC1A(); ~ExcIEEEAC1A() override; - CIMPP::PU ka; /* Voltage regulator gain (K). Typical Value = 400. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (K). Typical Value = 0.38. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (K). Typical Value = 0.03. Default: nullptr */ - CIMPP::Simple_Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.1. Default: nullptr */ - CIMPP::Simple_Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.03. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.8. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (V). Typical Value = 14.5. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (V). Typical Value = -14.5. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 4.18. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 3.14. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator outputs (V). Typical Value = 6.03. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator outputs (V). Typical Value = -5.43. Default: nullptr */ + /** \brief Voltage regulator gain (K). Typical Value = 400. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (K). Typical Value = 0.38. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (K). Typical Value = 0.03. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.03. Default: nullptr */ + CIMPP::Simple_Float seve2; + + /** \brief Voltage regulator time constant (T). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.8. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage regulator output (V). Typical Value = 14.5. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -14.5. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 4.18. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 3.14. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Maximum voltage regulator outputs (V). Typical Value = 6.03. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator outputs (V). Typical Value = -5.43. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEAC2A.cpp b/CGMES_2.4.15_16FEB2016/ExcIEEEAC2A.cpp index 527a60763..a6f4da576 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEAC2A.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEAC2A.cpp @@ -8,32 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEAC2A::ExcIEEEAC2A() {}; -ExcIEEEAC2A::~ExcIEEEAC2A() {}; +ExcIEEEAC2A::ExcIEEEAC2A() {} +ExcIEEEAC2A::~ExcIEEEAC2A() {} static const std::list PossibleProfilesForClass = { @@ -80,285 +59,304 @@ ExcIEEEAC2A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEAC2A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_kb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_kb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_kh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_vfemax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfemax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEAC2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -372,7 +370,8 @@ bool get_ExcIEEEAC2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_kb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kb; if (!buffer.str().empty()) @@ -386,7 +385,8 @@ bool get_ExcIEEEAC2A_kb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -400,7 +400,8 @@ bool get_ExcIEEEAC2A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -414,7 +415,8 @@ bool get_ExcIEEEAC2A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -428,7 +430,8 @@ bool get_ExcIEEEAC2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -442,7 +445,8 @@ bool get_ExcIEEEAC2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh; if (!buffer.str().empty()) @@ -456,7 +460,8 @@ bool get_ExcIEEEAC2A_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -470,7 +475,8 @@ bool get_ExcIEEEAC2A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC2A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -484,7 +490,8 @@ bool get_ExcIEEEAC2A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -498,7 +505,8 @@ bool get_ExcIEEEAC2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -512,7 +520,8 @@ bool get_ExcIEEEAC2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -526,7 +535,8 @@ bool get_ExcIEEEAC2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -540,7 +550,8 @@ bool get_ExcIEEEAC2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -554,7 +565,8 @@ bool get_ExcIEEEAC2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -568,7 +580,8 @@ bool get_ExcIEEEAC2A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC2A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -582,7 +595,8 @@ bool get_ExcIEEEAC2A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC2A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -596,7 +610,8 @@ bool get_ExcIEEEAC2A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC2A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -610,7 +625,8 @@ bool get_ExcIEEEAC2A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC2A_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfemax; if (!buffer.str().empty()) @@ -624,7 +640,8 @@ bool get_ExcIEEEAC2A_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEAC2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -638,7 +655,8 @@ bool get_ExcIEEEAC2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -650,8 +668,6 @@ bool get_ExcIEEEAC2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEAC2A::debugName[] = "ExcIEEEAC2A"; const char* ExcIEEEAC2A::debugString() const { @@ -660,32 +676,32 @@ const char* ExcIEEEAC2A::debugString() const void ExcIEEEAC2A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A"), &ExcIEEEAC2A_factory)); + factory_map.emplace("cim:ExcIEEEAC2A", &ExcIEEEAC2A_factory); } void ExcIEEEAC2A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.ka"), &assign_ExcIEEEAC2A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.kb"), &assign_ExcIEEEAC2A_kb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.kc"), &assign_ExcIEEEAC2A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.kd"), &assign_ExcIEEEAC2A_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.ke"), &assign_ExcIEEEAC2A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.kf"), &assign_ExcIEEEAC2A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.kh"), &assign_ExcIEEEAC2A_kh)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.seve1"), &assign_ExcIEEEAC2A_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.seve2"), &assign_ExcIEEEAC2A_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.ta"), &assign_ExcIEEEAC2A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.tb"), &assign_ExcIEEEAC2A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.tc"), &assign_ExcIEEEAC2A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.te"), &assign_ExcIEEEAC2A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.tf"), &assign_ExcIEEEAC2A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.vamax"), &assign_ExcIEEEAC2A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.vamin"), &assign_ExcIEEEAC2A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.ve1"), &assign_ExcIEEEAC2A_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.ve2"), &assign_ExcIEEEAC2A_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.vfemax"), &assign_ExcIEEEAC2A_vfemax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.vrmax"), &assign_ExcIEEEAC2A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.vrmin"), &assign_ExcIEEEAC2A_vrmin)); + assign_map.emplace("cim:ExcIEEEAC2A.ka", &assign_ExcIEEEAC2A_ka); + assign_map.emplace("cim:ExcIEEEAC2A.kb", &assign_ExcIEEEAC2A_kb); + assign_map.emplace("cim:ExcIEEEAC2A.kc", &assign_ExcIEEEAC2A_kc); + assign_map.emplace("cim:ExcIEEEAC2A.kd", &assign_ExcIEEEAC2A_kd); + assign_map.emplace("cim:ExcIEEEAC2A.ke", &assign_ExcIEEEAC2A_ke); + assign_map.emplace("cim:ExcIEEEAC2A.kf", &assign_ExcIEEEAC2A_kf); + assign_map.emplace("cim:ExcIEEEAC2A.kh", &assign_ExcIEEEAC2A_kh); + assign_map.emplace("cim:ExcIEEEAC2A.seve1", &assign_ExcIEEEAC2A_seve1); + assign_map.emplace("cim:ExcIEEEAC2A.seve2", &assign_ExcIEEEAC2A_seve2); + assign_map.emplace("cim:ExcIEEEAC2A.ta", &assign_ExcIEEEAC2A_ta); + assign_map.emplace("cim:ExcIEEEAC2A.tb", &assign_ExcIEEEAC2A_tb); + assign_map.emplace("cim:ExcIEEEAC2A.tc", &assign_ExcIEEEAC2A_tc); + assign_map.emplace("cim:ExcIEEEAC2A.te", &assign_ExcIEEEAC2A_te); + assign_map.emplace("cim:ExcIEEEAC2A.tf", &assign_ExcIEEEAC2A_tf); + assign_map.emplace("cim:ExcIEEEAC2A.vamax", &assign_ExcIEEEAC2A_vamax); + assign_map.emplace("cim:ExcIEEEAC2A.vamin", &assign_ExcIEEEAC2A_vamin); + assign_map.emplace("cim:ExcIEEEAC2A.ve1", &assign_ExcIEEEAC2A_ve1); + assign_map.emplace("cim:ExcIEEEAC2A.ve2", &assign_ExcIEEEAC2A_ve2); + assign_map.emplace("cim:ExcIEEEAC2A.vfemax", &assign_ExcIEEEAC2A_vfemax); + assign_map.emplace("cim:ExcIEEEAC2A.vrmax", &assign_ExcIEEEAC2A_vrmax); + assign_map.emplace("cim:ExcIEEEAC2A.vrmin", &assign_ExcIEEEAC2A_vrmin); } void ExcIEEEAC2A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEAC2A.hpp b/CGMES_2.4.15_16FEB2016/ExcIEEEAC2A.hpp index 6b56ae099..77dc89d3e 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEAC2A.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEAC2A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type AC2A model. The model represents a high initial response field-controlled alternator-rectifier excitation system. The alternator main exciter is used with non-controlled rectifiers. The Type AC2A model is similar to that of Type AC1A except for the inclusion of exciter time constant compensation and exciter field current limiting elements. Reference: IEEE Standard 421.5-2005 Section 6.2. - */ + /** \brief The class represents IEEE Std 421.5-2005 type AC2A model. The model represents a high initial response field-controlled alternator-rectifier excitation system. The alternator main exciter is used with non-controlled rectifiers. The Type AC2A model is similar to that of Type AC1A except for the inclusion of exciter time constant compensation and exciter field current limiting elements. Reference: IEEE Standard 421.5-2005 Section 6.2. */ class ExcIEEEAC2A : public ExcitationSystemDynamics { public: @@ -29,27 +27,68 @@ namespace CIMPP ExcIEEEAC2A(); ~ExcIEEEAC2A() override; - CIMPP::PU ka; /* Voltage regulator gain (K). Typical Value = 400. Default: nullptr */ - CIMPP::PU kb; /* Second stage regulator gain (K). Typical Value = 25. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.28. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (K). Typical Value = 0.35. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (K). Typical Value = 0.03. Default: nullptr */ - CIMPP::PU kh; /* Exciter field current feedback gain (K). Typical Value = 1. Default: nullptr */ - CIMPP::Simple_Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.037. Default: nullptr */ - CIMPP::Simple_Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.012. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.6. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (V). Typical Value = 8. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (V). Typical Value = -8. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 4.4. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 3.3. Default: nullptr */ - CIMPP::PU vfemax; /* Exciter field current limit reference (V). Typical Value = 4.4. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator outputs (V). Typical Value = 105. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator outputs (V). Typical Value = -95. Default: nullptr */ + /** \brief Voltage regulator gain (K). Typical Value = 400. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Second stage regulator gain (K). Typical Value = 25. Default: nullptr */ + CIMPP::PU kb; + + /** \brief Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.28. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (K). Typical Value = 0.35. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (K). Typical Value = 0.03. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Exciter field current feedback gain (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU kh; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.037. Default: nullptr */ + CIMPP::Simple_Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.012. Default: nullptr */ + CIMPP::Simple_Float seve2; + + /** \brief Voltage regulator time constant (T). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.6. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage regulator output (V). Typical Value = 8. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -8. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 4.4. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 3.3. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Exciter field current limit reference (V). Typical Value = 4.4. Default: nullptr */ + CIMPP::PU vfemax; + + /** \brief Maximum voltage regulator outputs (V). Typical Value = 105. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator outputs (V). Typical Value = -95. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEAC3A.cpp b/CGMES_2.4.15_16FEB2016/ExcIEEEAC3A.cpp index 6ad17cf01..a75fa053b 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEAC3A.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEAC3A.cpp @@ -8,32 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEAC3A::ExcIEEEAC3A() {}; -ExcIEEEAC3A::~ExcIEEEAC3A() {}; +ExcIEEEAC3A::ExcIEEEAC3A() {} +ExcIEEEAC3A::~ExcIEEEAC3A() {} static const std::list PossibleProfilesForClass = { @@ -80,285 +59,304 @@ ExcIEEEAC3A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEAC3A_efdn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_efdn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_kn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_kn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_kr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_kr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_vemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_vemin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vemin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_vfemax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfemax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEAC3A_efdn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdn; if (!buffer.str().empty()) @@ -372,7 +370,8 @@ bool get_ExcIEEEAC3A_efdn(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEAC3A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -386,7 +385,8 @@ bool get_ExcIEEEAC3A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -400,7 +400,8 @@ bool get_ExcIEEEAC3A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -414,7 +415,8 @@ bool get_ExcIEEEAC3A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -428,7 +430,8 @@ bool get_ExcIEEEAC3A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -442,7 +445,8 @@ bool get_ExcIEEEAC3A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_kn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kn; if (!buffer.str().empty()) @@ -456,7 +460,8 @@ bool get_ExcIEEEAC3A_kn(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_kr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kr; if (!buffer.str().empty()) @@ -470,7 +475,8 @@ bool get_ExcIEEEAC3A_kr(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -484,7 +490,8 @@ bool get_ExcIEEEAC3A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC3A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -498,7 +505,8 @@ bool get_ExcIEEEAC3A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC3A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -512,7 +520,8 @@ bool get_ExcIEEEAC3A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -526,7 +535,8 @@ bool get_ExcIEEEAC3A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -540,7 +550,8 @@ bool get_ExcIEEEAC3A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -554,7 +565,8 @@ bool get_ExcIEEEAC3A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -568,7 +580,8 @@ bool get_ExcIEEEAC3A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -582,7 +595,8 @@ bool get_ExcIEEEAC3A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC3A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -596,7 +610,8 @@ bool get_ExcIEEEAC3A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC3A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -610,7 +625,8 @@ bool get_ExcIEEEAC3A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC3A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -624,7 +640,8 @@ bool get_ExcIEEEAC3A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC3A_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vemin; if (!buffer.str().empty()) @@ -638,7 +655,8 @@ bool get_ExcIEEEAC3A_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC3A_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfemax; if (!buffer.str().empty()) @@ -650,8 +668,6 @@ bool get_ExcIEEEAC3A_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char ExcIEEEAC3A::debugName[] = "ExcIEEEAC3A"; const char* ExcIEEEAC3A::debugString() const { @@ -660,32 +676,32 @@ const char* ExcIEEEAC3A::debugString() const void ExcIEEEAC3A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A"), &ExcIEEEAC3A_factory)); + factory_map.emplace("cim:ExcIEEEAC3A", &ExcIEEEAC3A_factory); } void ExcIEEEAC3A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.efdn"), &assign_ExcIEEEAC3A_efdn)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.ka"), &assign_ExcIEEEAC3A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.kc"), &assign_ExcIEEEAC3A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.kd"), &assign_ExcIEEEAC3A_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.ke"), &assign_ExcIEEEAC3A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.kf"), &assign_ExcIEEEAC3A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.kn"), &assign_ExcIEEEAC3A_kn)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.kr"), &assign_ExcIEEEAC3A_kr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.seve1"), &assign_ExcIEEEAC3A_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.seve2"), &assign_ExcIEEEAC3A_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.ta"), &assign_ExcIEEEAC3A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.tb"), &assign_ExcIEEEAC3A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.tc"), &assign_ExcIEEEAC3A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.te"), &assign_ExcIEEEAC3A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.tf"), &assign_ExcIEEEAC3A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.vamax"), &assign_ExcIEEEAC3A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.vamin"), &assign_ExcIEEEAC3A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.ve1"), &assign_ExcIEEEAC3A_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.ve2"), &assign_ExcIEEEAC3A_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.vemin"), &assign_ExcIEEEAC3A_vemin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.vfemax"), &assign_ExcIEEEAC3A_vfemax)); + assign_map.emplace("cim:ExcIEEEAC3A.efdn", &assign_ExcIEEEAC3A_efdn); + assign_map.emplace("cim:ExcIEEEAC3A.ka", &assign_ExcIEEEAC3A_ka); + assign_map.emplace("cim:ExcIEEEAC3A.kc", &assign_ExcIEEEAC3A_kc); + assign_map.emplace("cim:ExcIEEEAC3A.kd", &assign_ExcIEEEAC3A_kd); + assign_map.emplace("cim:ExcIEEEAC3A.ke", &assign_ExcIEEEAC3A_ke); + assign_map.emplace("cim:ExcIEEEAC3A.kf", &assign_ExcIEEEAC3A_kf); + assign_map.emplace("cim:ExcIEEEAC3A.kn", &assign_ExcIEEEAC3A_kn); + assign_map.emplace("cim:ExcIEEEAC3A.kr", &assign_ExcIEEEAC3A_kr); + assign_map.emplace("cim:ExcIEEEAC3A.seve1", &assign_ExcIEEEAC3A_seve1); + assign_map.emplace("cim:ExcIEEEAC3A.seve2", &assign_ExcIEEEAC3A_seve2); + assign_map.emplace("cim:ExcIEEEAC3A.ta", &assign_ExcIEEEAC3A_ta); + assign_map.emplace("cim:ExcIEEEAC3A.tb", &assign_ExcIEEEAC3A_tb); + assign_map.emplace("cim:ExcIEEEAC3A.tc", &assign_ExcIEEEAC3A_tc); + assign_map.emplace("cim:ExcIEEEAC3A.te", &assign_ExcIEEEAC3A_te); + assign_map.emplace("cim:ExcIEEEAC3A.tf", &assign_ExcIEEEAC3A_tf); + assign_map.emplace("cim:ExcIEEEAC3A.vamax", &assign_ExcIEEEAC3A_vamax); + assign_map.emplace("cim:ExcIEEEAC3A.vamin", &assign_ExcIEEEAC3A_vamin); + assign_map.emplace("cim:ExcIEEEAC3A.ve1", &assign_ExcIEEEAC3A_ve1); + assign_map.emplace("cim:ExcIEEEAC3A.ve2", &assign_ExcIEEEAC3A_ve2); + assign_map.emplace("cim:ExcIEEEAC3A.vemin", &assign_ExcIEEEAC3A_vemin); + assign_map.emplace("cim:ExcIEEEAC3A.vfemax", &assign_ExcIEEEAC3A_vfemax); } void ExcIEEEAC3A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEAC3A.hpp b/CGMES_2.4.15_16FEB2016/ExcIEEEAC3A.hpp index 2394f05d0..569f22c12 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEAC3A.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEAC3A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type AC3A model. The model represents the field-controlled alternator-rectifier excitation systems designated Type AC3A. These excitation systems include an alternator main exciter with non-controlled rectifiers. The exciter employs self-excitation, and the voltage regulator power is derived from the exciter output voltage. Therefore, this system has an additional nonlinearity, simulated by the use of a multiplier whose inputs are the voltage regulator command signal, , and the exciter output voltage, , times . This model is applicable to excitation systems employing static voltage regulators. Reference: IEEE Standard 421.5-2005 Section 6.3. - */ + /** \brief The class represents IEEE Std 421.5-2005 type AC3A model. The model represents the field-controlled alternator-rectifier excitation systems designated Type AC3A. These excitation systems include an alternator main exciter with non-controlled rectifiers. The exciter employs self-excitation, and the voltage regulator power is derived from the exciter output voltage. Therefore, this system has an additional nonlinearity, simulated by the use of a multiplier whose inputs are the voltage regulator command signal, , and the exciter output voltage, , times . This model is applicable to excitation systems employing static voltage regulators. Reference: IEEE Standard 421.5-2005 Section 6.3. */ class ExcIEEEAC3A : public ExcitationSystemDynamics { public: @@ -29,27 +27,68 @@ namespace CIMPP ExcIEEEAC3A(); ~ExcIEEEAC3A() override; - CIMPP::PU efdn; /* Value of at which feedback gain changes (E). Typical Value = 2.36. Default: nullptr */ - CIMPP::PU ka; /* Voltage regulator gain (K). Typical Value = 45.62. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.104. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (K). Typical Value = 0.499. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (K). Typical Value = 0.143. Default: nullptr */ - CIMPP::PU kn; /* Excitation control system stabilizer gain (K). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU kr; /* Constant associated with regulator and alternator field power supply (K). Typical Value = 3.77. Default: nullptr */ - CIMPP::Simple_Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 1.143. Default: nullptr */ - CIMPP::Simple_Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0.013. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (T). Typical Value = 1.17. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (V). Typical Value = 1. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (V). Typical Value = -0.95. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (V) equals V(V). Typical Value = 6.24. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 4.68. Default: nullptr */ - CIMPP::PU vemin; /* Minimum exciter voltage output (V). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU vfemax; /* Exciter field current limit reference (V). Typical Value = 16. Default: nullptr */ + /** \brief Value of at which feedback gain changes (E). Typical Value = 2.36. Default: nullptr */ + CIMPP::PU efdn; + + /** \brief Voltage regulator gain (K). Typical Value = 45.62. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.104. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (K). Typical Value = 0.499. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (K). Typical Value = 0.143. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Excitation control system stabilizer gain (K). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU kn; + + /** \brief Constant associated with regulator and alternator field power supply (K). Typical Value = 3.77. Default: nullptr */ + CIMPP::PU kr; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 1.143. Default: nullptr */ + CIMPP::Simple_Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float seve2; + + /** \brief Voltage regulator time constant (T). Typical Value = 0.013. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (T). Typical Value = 1.17. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage regulator output (V). Typical Value = 1. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -0.95. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (V) equals V(V). Typical Value = 6.24. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 4.68. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Minimum exciter voltage output (V). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU vemin; + + /** \brief Exciter field current limit reference (V). Typical Value = 16. Default: nullptr */ + CIMPP::PU vfemax; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEAC4A.cpp b/CGMES_2.4.15_16FEB2016/ExcIEEEAC4A.cpp index 59eeb54d8..e1510a699 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEAC4A.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEAC4A.cpp @@ -8,20 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEAC4A::ExcIEEEAC4A() {}; -ExcIEEEAC4A::~ExcIEEEAC4A() {}; +ExcIEEEAC4A::ExcIEEEAC4A() {} +ExcIEEEAC4A::~ExcIEEEAC4A() {} static const std::list PossibleProfilesForClass = { @@ -56,129 +47,136 @@ ExcIEEEAC4A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEAC4A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC4A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC4A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC4A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC4A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC4A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC4A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC4A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC4A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC4A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC4A_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC4A_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC4A_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC4A_vimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC4A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC4A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC4A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC4A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEAC4A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -192,7 +190,8 @@ bool get_ExcIEEEAC4A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC4A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -206,7 +205,8 @@ bool get_ExcIEEEAC4A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC4A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -220,7 +220,8 @@ bool get_ExcIEEEAC4A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC4A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -234,7 +235,8 @@ bool get_ExcIEEEAC4A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC4A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -248,7 +250,8 @@ bool get_ExcIEEEAC4A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC4A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -262,7 +265,8 @@ bool get_ExcIEEEAC4A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC4A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimin; if (!buffer.str().empty()) @@ -276,7 +280,8 @@ bool get_ExcIEEEAC4A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC4A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -290,7 +295,8 @@ bool get_ExcIEEEAC4A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC4A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -302,8 +308,6 @@ bool get_ExcIEEEAC4A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEAC4A::debugName[] = "ExcIEEEAC4A"; const char* ExcIEEEAC4A::debugString() const { @@ -312,20 +316,20 @@ const char* ExcIEEEAC4A::debugString() const void ExcIEEEAC4A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A"), &ExcIEEEAC4A_factory)); + factory_map.emplace("cim:ExcIEEEAC4A", &ExcIEEEAC4A_factory); } void ExcIEEEAC4A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A.ka"), &assign_ExcIEEEAC4A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A.kc"), &assign_ExcIEEEAC4A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A.ta"), &assign_ExcIEEEAC4A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A.tb"), &assign_ExcIEEEAC4A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A.tc"), &assign_ExcIEEEAC4A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A.vimax"), &assign_ExcIEEEAC4A_vimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A.vimin"), &assign_ExcIEEEAC4A_vimin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A.vrmax"), &assign_ExcIEEEAC4A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A.vrmin"), &assign_ExcIEEEAC4A_vrmin)); + assign_map.emplace("cim:ExcIEEEAC4A.ka", &assign_ExcIEEEAC4A_ka); + assign_map.emplace("cim:ExcIEEEAC4A.kc", &assign_ExcIEEEAC4A_kc); + assign_map.emplace("cim:ExcIEEEAC4A.ta", &assign_ExcIEEEAC4A_ta); + assign_map.emplace("cim:ExcIEEEAC4A.tb", &assign_ExcIEEEAC4A_tb); + assign_map.emplace("cim:ExcIEEEAC4A.tc", &assign_ExcIEEEAC4A_tc); + assign_map.emplace("cim:ExcIEEEAC4A.vimax", &assign_ExcIEEEAC4A_vimax); + assign_map.emplace("cim:ExcIEEEAC4A.vimin", &assign_ExcIEEEAC4A_vimin); + assign_map.emplace("cim:ExcIEEEAC4A.vrmax", &assign_ExcIEEEAC4A_vrmax); + assign_map.emplace("cim:ExcIEEEAC4A.vrmin", &assign_ExcIEEEAC4A_vrmin); } void ExcIEEEAC4A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEAC4A.hpp b/CGMES_2.4.15_16FEB2016/ExcIEEEAC4A.hpp index b47be4345..afdfb2fe2 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEAC4A.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEAC4A.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type AC4A model. The model represents type AC4A alternator-supplied controlled-rectifier excitation system which is quite different from the other type ac systems. This high initial response excitation system utilizes a full thyristor bridge in the exciter output circuit. The voltage regulator controls the firing of the thyristor bridges. The exciter alternator uses an independent voltage regulator to control its output voltage to a constant value. These effects are not modeled; however, transient loading effects on the exciter alternator are included. Reference: IEEE Standard 421.5-2005 Section 6.4. - */ + /** \brief The class represents IEEE Std 421.5-2005 type AC4A model. The model represents type AC4A alternator-supplied controlled-rectifier excitation system which is quite different from the other type ac systems. This high initial response excitation system utilizes a full thyristor bridge in the exciter output circuit. The voltage regulator controls the firing of the thyristor bridges. The exciter alternator uses an independent voltage regulator to control its output voltage to a constant value. These effects are not modeled; however, transient loading effects on the exciter alternator are included. Reference: IEEE Standard 421.5-2005 Section 6.4. */ class ExcIEEEAC4A : public ExcitationSystemDynamics { public: @@ -28,15 +26,32 @@ namespace CIMPP ExcIEEEAC4A(); ~ExcIEEEAC4A() override; - CIMPP::PU ka; /* Voltage regulator gain (K). Typical Value = 200. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0.015. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (T). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::PU vimax; /* Maximum voltage regulator input limit (V). Typical Value = 10. Default: nullptr */ - CIMPP::PU vimin; /* Minimum voltage regulator input limit (V). Typical Value = -10. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 5.64. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = -4.53. Default: nullptr */ + /** \brief Voltage regulator gain (K). Typical Value = 200. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Voltage regulator time constant (T). Typical Value = 0.015. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (T). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Maximum voltage regulator input limit (V). Typical Value = 10. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Minimum voltage regulator input limit (V). Typical Value = -10. Default: nullptr */ + CIMPP::PU vimin; + + /** \brief Maximum voltage regulator output (V). Typical Value = 5.64. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -4.53. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEAC5A.cpp b/CGMES_2.4.15_16FEB2016/ExcIEEEAC5A.cpp index d036ba505..8187407bd 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEAC5A.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEAC5A.cpp @@ -8,25 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEAC5A::ExcIEEEAC5A() {}; -ExcIEEEAC5A::~ExcIEEEAC5A() {}; +ExcIEEEAC5A::ExcIEEEAC5A() {} +ExcIEEEAC5A::~ExcIEEEAC5A() {} static const std::list PossibleProfilesForClass = { @@ -66,194 +52,206 @@ ExcIEEEAC5A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEAC5A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_seefd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_seefd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_tf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_tf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_tf3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_tf3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEAC5A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -267,7 +265,8 @@ bool get_ExcIEEEAC5A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEAC5A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -281,7 +280,8 @@ bool get_ExcIEEEAC5A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEAC5A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -295,7 +295,8 @@ bool get_ExcIEEEAC5A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC5A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -309,7 +310,8 @@ bool get_ExcIEEEAC5A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC5A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -323,7 +325,8 @@ bool get_ExcIEEEAC5A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC5A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd1; if (!buffer.str().empty()) @@ -337,7 +340,8 @@ bool get_ExcIEEEAC5A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEAC5A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd2; if (!buffer.str().empty()) @@ -351,7 +355,8 @@ bool get_ExcIEEEAC5A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEAC5A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -365,7 +370,8 @@ bool get_ExcIEEEAC5A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC5A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -379,7 +385,8 @@ bool get_ExcIEEEAC5A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC5A_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf1; if (!buffer.str().empty()) @@ -393,7 +400,8 @@ bool get_ExcIEEEAC5A_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC5A_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf2; if (!buffer.str().empty()) @@ -407,7 +415,8 @@ bool get_ExcIEEEAC5A_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC5A_tf3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf3; if (!buffer.str().empty()) @@ -421,7 +430,8 @@ bool get_ExcIEEEAC5A_tf3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC5A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -435,7 +445,8 @@ bool get_ExcIEEEAC5A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC5A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -447,8 +458,6 @@ bool get_ExcIEEEAC5A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEAC5A::debugName[] = "ExcIEEEAC5A"; const char* ExcIEEEAC5A::debugString() const { @@ -457,25 +466,25 @@ const char* ExcIEEEAC5A::debugString() const void ExcIEEEAC5A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A"), &ExcIEEEAC5A_factory)); + factory_map.emplace("cim:ExcIEEEAC5A", &ExcIEEEAC5A_factory); } void ExcIEEEAC5A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.efd1"), &assign_ExcIEEEAC5A_efd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.efd2"), &assign_ExcIEEEAC5A_efd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.ka"), &assign_ExcIEEEAC5A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.ke"), &assign_ExcIEEEAC5A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.kf"), &assign_ExcIEEEAC5A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.seefd1"), &assign_ExcIEEEAC5A_seefd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.seefd2"), &assign_ExcIEEEAC5A_seefd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.ta"), &assign_ExcIEEEAC5A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.te"), &assign_ExcIEEEAC5A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.tf1"), &assign_ExcIEEEAC5A_tf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.tf2"), &assign_ExcIEEEAC5A_tf2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.tf3"), &assign_ExcIEEEAC5A_tf3)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.vrmax"), &assign_ExcIEEEAC5A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.vrmin"), &assign_ExcIEEEAC5A_vrmin)); + assign_map.emplace("cim:ExcIEEEAC5A.efd1", &assign_ExcIEEEAC5A_efd1); + assign_map.emplace("cim:ExcIEEEAC5A.efd2", &assign_ExcIEEEAC5A_efd2); + assign_map.emplace("cim:ExcIEEEAC5A.ka", &assign_ExcIEEEAC5A_ka); + assign_map.emplace("cim:ExcIEEEAC5A.ke", &assign_ExcIEEEAC5A_ke); + assign_map.emplace("cim:ExcIEEEAC5A.kf", &assign_ExcIEEEAC5A_kf); + assign_map.emplace("cim:ExcIEEEAC5A.seefd1", &assign_ExcIEEEAC5A_seefd1); + assign_map.emplace("cim:ExcIEEEAC5A.seefd2", &assign_ExcIEEEAC5A_seefd2); + assign_map.emplace("cim:ExcIEEEAC5A.ta", &assign_ExcIEEEAC5A_ta); + assign_map.emplace("cim:ExcIEEEAC5A.te", &assign_ExcIEEEAC5A_te); + assign_map.emplace("cim:ExcIEEEAC5A.tf1", &assign_ExcIEEEAC5A_tf1); + assign_map.emplace("cim:ExcIEEEAC5A.tf2", &assign_ExcIEEEAC5A_tf2); + assign_map.emplace("cim:ExcIEEEAC5A.tf3", &assign_ExcIEEEAC5A_tf3); + assign_map.emplace("cim:ExcIEEEAC5A.vrmax", &assign_ExcIEEEAC5A_vrmax); + assign_map.emplace("cim:ExcIEEEAC5A.vrmin", &assign_ExcIEEEAC5A_vrmin); } void ExcIEEEAC5A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEAC5A.hpp b/CGMES_2.4.15_16FEB2016/ExcIEEEAC5A.hpp index ea97a435f..53b26311c 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEAC5A.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEAC5A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type AC5A model. The model represents a simplified model for brushless excitation systems. The regulator is supplied from a source, such as a permanent magnet generator, which is not affected by system disturbances. Unlike other ac models, this model uses loaded rather than open circuit exciter saturation data in the same way as it is used for the dc models. Because the model has been widely implemented by the industry, it is sometimes used to represent other types of systems when either detailed data for them are not available or simplified models are required. Reference: IEEE Standard 421.5-2005 Section 6.5. - */ + /** \brief The class represents IEEE Std 421.5-2005 type AC5A model. The model represents a simplified model for brushless excitation systems. The regulator is supplied from a source, such as a permanent magnet generator, which is not affected by system disturbances. Unlike other ac models, this model uses loaded rather than open circuit exciter saturation data in the same way as it is used for the dc models. Because the model has been widely implemented by the industry, it is sometimes used to represent other types of systems when either detailed data for them are not available or simplified models are required. Reference: IEEE Standard 421.5-2005 Section 6.5. */ class ExcIEEEAC5A : public ExcitationSystemDynamics { public: @@ -29,20 +27,47 @@ namespace CIMPP ExcIEEEAC5A(); ~ExcIEEEAC5A() override; - CIMPP::PU efd1; /* Exciter voltage at which exciter saturation is defined (E). Typical Value = 5.6. Default: nullptr */ - CIMPP::PU efd2; /* Exciter voltage at which exciter saturation is defined (E). Typical Value = 4.2. Default: nullptr */ - CIMPP::PU ka; /* Voltage regulator gain (K). Typical Value = 400. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (K). Typical Value = 0.03. Default: nullptr */ - CIMPP::Simple_Float seefd1; /* Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.86. Default: nullptr */ - CIMPP::Simple_Float seefd2; /* Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.8. Default: nullptr */ - CIMPP::Seconds tf1; /* Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tf2; /* Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tf3; /* Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 7.3. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = -7.3. Default: nullptr */ + /** \brief Exciter voltage at which exciter saturation is defined (E). Typical Value = 5.6. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Exciter voltage at which exciter saturation is defined (E). Typical Value = 4.2. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief Voltage regulator gain (K). Typical Value = 400. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (K). Typical Value = 0.03. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.86. Default: nullptr */ + CIMPP::Simple_Float seefd1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.5. Default: nullptr */ + CIMPP::Simple_Float seefd2; + + /** \brief Voltage regulator time constant (T). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.8. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf1; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf2; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf3; + + /** \brief Maximum voltage regulator output (V). Typical Value = 7.3. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -7.3. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEAC6A.cpp b/CGMES_2.4.15_16FEB2016/ExcIEEEAC6A.cpp index fb81c2571..cf956daff 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEAC6A.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEAC6A.cpp @@ -8,33 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEAC6A::ExcIEEEAC6A() {}; -ExcIEEEAC6A::~ExcIEEEAC6A() {}; +ExcIEEEAC6A::ExcIEEEAC6A() {} +ExcIEEEAC6A::~ExcIEEEAC6A() {} static const std::list PossibleProfilesForClass = { @@ -82,298 +60,318 @@ ExcIEEEAC6A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEAC6A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_kh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_th(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_th(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_tj(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_tj(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tj; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_tk(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_tk(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tk; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_vfelim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_vfelim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfelim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_vhmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_vhmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vhmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEAC6A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -387,7 +385,8 @@ bool get_ExcIEEEAC6A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -401,7 +400,8 @@ bool get_ExcIEEEAC6A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -415,7 +415,8 @@ bool get_ExcIEEEAC6A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -429,7 +430,8 @@ bool get_ExcIEEEAC6A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh; if (!buffer.str().empty()) @@ -443,7 +445,8 @@ bool get_ExcIEEEAC6A_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -457,7 +460,8 @@ bool get_ExcIEEEAC6A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC6A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -471,7 +475,8 @@ bool get_ExcIEEEAC6A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC6A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -485,7 +490,8 @@ bool get_ExcIEEEAC6A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -499,7 +505,8 @@ bool get_ExcIEEEAC6A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -513,7 +520,8 @@ bool get_ExcIEEEAC6A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -527,7 +535,8 @@ bool get_ExcIEEEAC6A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_th(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th; if (!buffer.str().empty()) @@ -541,7 +550,8 @@ bool get_ExcIEEEAC6A_th(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_tj(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tj; if (!buffer.str().empty()) @@ -555,7 +565,8 @@ bool get_ExcIEEEAC6A_tj(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_tk(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tk; if (!buffer.str().empty()) @@ -569,7 +580,8 @@ bool get_ExcIEEEAC6A_tk(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -583,7 +595,8 @@ bool get_ExcIEEEAC6A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC6A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -597,7 +610,8 @@ bool get_ExcIEEEAC6A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC6A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -611,7 +625,8 @@ bool get_ExcIEEEAC6A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC6A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -625,7 +640,8 @@ bool get_ExcIEEEAC6A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC6A_vfelim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfelim; if (!buffer.str().empty()) @@ -639,7 +655,8 @@ bool get_ExcIEEEAC6A_vfelim(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEAC6A_vhmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vhmax; if (!buffer.str().empty()) @@ -653,7 +670,8 @@ bool get_ExcIEEEAC6A_vhmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC6A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -667,7 +685,8 @@ bool get_ExcIEEEAC6A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC6A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -679,8 +698,6 @@ bool get_ExcIEEEAC6A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEAC6A::debugName[] = "ExcIEEEAC6A"; const char* ExcIEEEAC6A::debugString() const { @@ -689,33 +706,33 @@ const char* ExcIEEEAC6A::debugString() const void ExcIEEEAC6A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A"), &ExcIEEEAC6A_factory)); + factory_map.emplace("cim:ExcIEEEAC6A", &ExcIEEEAC6A_factory); } void ExcIEEEAC6A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.ka"), &assign_ExcIEEEAC6A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.kc"), &assign_ExcIEEEAC6A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.kd"), &assign_ExcIEEEAC6A_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.ke"), &assign_ExcIEEEAC6A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.kh"), &assign_ExcIEEEAC6A_kh)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.seve1"), &assign_ExcIEEEAC6A_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.seve2"), &assign_ExcIEEEAC6A_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.ta"), &assign_ExcIEEEAC6A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.tb"), &assign_ExcIEEEAC6A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.tc"), &assign_ExcIEEEAC6A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.te"), &assign_ExcIEEEAC6A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.th"), &assign_ExcIEEEAC6A_th)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.tj"), &assign_ExcIEEEAC6A_tj)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.tk"), &assign_ExcIEEEAC6A_tk)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.vamax"), &assign_ExcIEEEAC6A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.vamin"), &assign_ExcIEEEAC6A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.ve1"), &assign_ExcIEEEAC6A_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.ve2"), &assign_ExcIEEEAC6A_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.vfelim"), &assign_ExcIEEEAC6A_vfelim)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.vhmax"), &assign_ExcIEEEAC6A_vhmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.vrmax"), &assign_ExcIEEEAC6A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.vrmin"), &assign_ExcIEEEAC6A_vrmin)); + assign_map.emplace("cim:ExcIEEEAC6A.ka", &assign_ExcIEEEAC6A_ka); + assign_map.emplace("cim:ExcIEEEAC6A.kc", &assign_ExcIEEEAC6A_kc); + assign_map.emplace("cim:ExcIEEEAC6A.kd", &assign_ExcIEEEAC6A_kd); + assign_map.emplace("cim:ExcIEEEAC6A.ke", &assign_ExcIEEEAC6A_ke); + assign_map.emplace("cim:ExcIEEEAC6A.kh", &assign_ExcIEEEAC6A_kh); + assign_map.emplace("cim:ExcIEEEAC6A.seve1", &assign_ExcIEEEAC6A_seve1); + assign_map.emplace("cim:ExcIEEEAC6A.seve2", &assign_ExcIEEEAC6A_seve2); + assign_map.emplace("cim:ExcIEEEAC6A.ta", &assign_ExcIEEEAC6A_ta); + assign_map.emplace("cim:ExcIEEEAC6A.tb", &assign_ExcIEEEAC6A_tb); + assign_map.emplace("cim:ExcIEEEAC6A.tc", &assign_ExcIEEEAC6A_tc); + assign_map.emplace("cim:ExcIEEEAC6A.te", &assign_ExcIEEEAC6A_te); + assign_map.emplace("cim:ExcIEEEAC6A.th", &assign_ExcIEEEAC6A_th); + assign_map.emplace("cim:ExcIEEEAC6A.tj", &assign_ExcIEEEAC6A_tj); + assign_map.emplace("cim:ExcIEEEAC6A.tk", &assign_ExcIEEEAC6A_tk); + assign_map.emplace("cim:ExcIEEEAC6A.vamax", &assign_ExcIEEEAC6A_vamax); + assign_map.emplace("cim:ExcIEEEAC6A.vamin", &assign_ExcIEEEAC6A_vamin); + assign_map.emplace("cim:ExcIEEEAC6A.ve1", &assign_ExcIEEEAC6A_ve1); + assign_map.emplace("cim:ExcIEEEAC6A.ve2", &assign_ExcIEEEAC6A_ve2); + assign_map.emplace("cim:ExcIEEEAC6A.vfelim", &assign_ExcIEEEAC6A_vfelim); + assign_map.emplace("cim:ExcIEEEAC6A.vhmax", &assign_ExcIEEEAC6A_vhmax); + assign_map.emplace("cim:ExcIEEEAC6A.vrmax", &assign_ExcIEEEAC6A_vrmax); + assign_map.emplace("cim:ExcIEEEAC6A.vrmin", &assign_ExcIEEEAC6A_vrmin); } void ExcIEEEAC6A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEAC6A.hpp b/CGMES_2.4.15_16FEB2016/ExcIEEEAC6A.hpp index 8401ea7df..b32c16c38 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEAC6A.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEAC6A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type AC6A model. The model represents field-controlled alternator-rectifier excitation systems with system-supplied electronic voltage regulators. The maximum output of the regulator, , is a function of terminal voltage, . The field current limiter included in the original model AC6A remains in the 2005 update. Reference: IEEE Standard 421.5-2005 Section 6.6. - */ + /** \brief The class represents IEEE Std 421.5-2005 type AC6A model. The model represents field-controlled alternator-rectifier excitation systems with system-supplied electronic voltage regulators. The maximum output of the regulator, , is a function of terminal voltage, . The field current limiter included in the original model AC6A remains in the 2005 update. Reference: IEEE Standard 421.5-2005 Section 6.6. */ class ExcIEEEAC6A : public ExcitationSystemDynamics { public: @@ -29,28 +27,71 @@ namespace CIMPP ExcIEEEAC6A(); ~ExcIEEEAC6A() override; - CIMPP::PU ka; /* Voltage regulator gain (K). Typical Value = 536. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.173. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (K). Typical Value = 1.91. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (K). Typical Value = 1.6. Default: nullptr */ - CIMPP::PU kh; /* Exciter field current limiter gain (K). Typical Value = 92. Default: nullptr */ - CIMPP::Simple_Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.214. Default: nullptr */ - CIMPP::Simple_Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.044. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0.086. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (T). Typical Value = 9. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (T). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (T). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds th; /* Exciter field current limiter time constant (T). Typical Value = 0.08. Default: nullptr */ - CIMPP::Seconds tj; /* Exciter field current limiter time constant (T). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds tk; /* Voltage regulator time constant (T). Typical Value = 0.18. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (V). Typical Value = 75. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (V). Typical Value = -75. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (V) equals V(V). Typical Value = 7.4. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 5.55. Default: nullptr */ - CIMPP::PU vfelim; /* Exciter field current limit reference (V). Typical Value = 19. Default: nullptr */ - CIMPP::PU vhmax; /* Maximum field current limiter signal reference (V). Typical Value = 75. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 44. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = -36. Default: nullptr */ + /** \brief Voltage regulator gain (K). Typical Value = 536. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.173. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (K). Typical Value = 1.91. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter constant related to self-excited field (K). Typical Value = 1.6. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Exciter field current limiter gain (K). Typical Value = 92. Default: nullptr */ + CIMPP::PU kh; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.214. Default: nullptr */ + CIMPP::Simple_Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.044. Default: nullptr */ + CIMPP::Simple_Float seve2; + + /** \brief Voltage regulator time constant (T). Typical Value = 0.086. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (T). Typical Value = 9. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (T). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Exciter field current limiter time constant (T). Typical Value = 0.08. Default: nullptr */ + CIMPP::Seconds th; + + /** \brief Exciter field current limiter time constant (T). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds tj; + + /** \brief Voltage regulator time constant (T). Typical Value = 0.18. Default: nullptr */ + CIMPP::Seconds tk; + + /** \brief Maximum voltage regulator output (V). Typical Value = 75. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -75. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (V) equals V(V). Typical Value = 7.4. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 5.55. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Exciter field current limit reference (V). Typical Value = 19. Default: nullptr */ + CIMPP::PU vfelim; + + /** \brief Maximum field current limiter signal reference (V). Typical Value = 75. Default: nullptr */ + CIMPP::PU vhmax; + + /** \brief Maximum voltage regulator output (V). Typical Value = 44. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -36. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEAC7B.cpp b/CGMES_2.4.15_16FEB2016/ExcIEEEAC7B.cpp index 8d00c90d5..92658ed8f 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEAC7B.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEAC7B.cpp @@ -8,37 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEAC7B::ExcIEEEAC7B() {}; -ExcIEEEAC7B::~ExcIEEEAC7B() {}; +ExcIEEEAC7B::ExcIEEEAC7B() {} +ExcIEEEAC7B::~ExcIEEEAC7B() {} static const std::list PossibleProfilesForClass = { @@ -90,350 +64,374 @@ ExcIEEEAC7B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEAC7B_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kdr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kdr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kf3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kf3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kia(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kia; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kir(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kir(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kir; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kpa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kpa(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpa; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kpr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kpr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_tdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_tdr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_vemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_vemin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vemin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_vfemax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfemax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEAC7B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -447,7 +445,8 @@ bool get_ExcIEEEAC7B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC7B_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -461,7 +460,8 @@ bool get_ExcIEEEAC7B_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC7B_kdr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdr; if (!buffer.str().empty()) @@ -475,7 +475,8 @@ bool get_ExcIEEEAC7B_kdr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -489,7 +490,8 @@ bool get_ExcIEEEAC7B_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC7B_kf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf1; if (!buffer.str().empty()) @@ -503,7 +505,8 @@ bool get_ExcIEEEAC7B_kf1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf2; if (!buffer.str().empty()) @@ -517,7 +520,8 @@ bool get_ExcIEEEAC7B_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_kf3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf3; if (!buffer.str().empty()) @@ -531,7 +535,8 @@ bool get_ExcIEEEAC7B_kf3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kia; if (!buffer.str().empty()) @@ -545,7 +550,8 @@ bool get_ExcIEEEAC7B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kir; if (!buffer.str().empty()) @@ -559,7 +565,8 @@ bool get_ExcIEEEAC7B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl; if (!buffer.str().empty()) @@ -573,7 +580,8 @@ bool get_ExcIEEEAC7B_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC7B_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -587,7 +595,8 @@ bool get_ExcIEEEAC7B_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC7B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpa; if (!buffer.str().empty()) @@ -601,7 +610,8 @@ bool get_ExcIEEEAC7B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpr; if (!buffer.str().empty()) @@ -615,7 +625,8 @@ bool get_ExcIEEEAC7B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -629,7 +640,8 @@ bool get_ExcIEEEAC7B_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC7B_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -643,7 +655,8 @@ bool get_ExcIEEEAC7B_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC7B_tdr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdr; if (!buffer.str().empty()) @@ -657,7 +670,8 @@ bool get_ExcIEEEAC7B_tdr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -671,7 +685,8 @@ bool get_ExcIEEEAC7B_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC7B_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -685,7 +700,8 @@ bool get_ExcIEEEAC7B_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC7B_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -699,7 +715,8 @@ bool get_ExcIEEEAC7B_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC7B_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -713,7 +730,8 @@ bool get_ExcIEEEAC7B_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC7B_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -727,7 +745,8 @@ bool get_ExcIEEEAC7B_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -741,7 +760,8 @@ bool get_ExcIEEEAC7B_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vemin; if (!buffer.str().empty()) @@ -755,7 +775,8 @@ bool get_ExcIEEEAC7B_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC7B_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfemax; if (!buffer.str().empty()) @@ -769,7 +790,8 @@ bool get_ExcIEEEAC7B_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEAC7B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -783,7 +805,8 @@ bool get_ExcIEEEAC7B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC7B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -795,8 +818,6 @@ bool get_ExcIEEEAC7B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEAC7B::debugName[] = "ExcIEEEAC7B"; const char* ExcIEEEAC7B::debugString() const { @@ -805,37 +826,37 @@ const char* ExcIEEEAC7B::debugString() const void ExcIEEEAC7B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B"), &ExcIEEEAC7B_factory)); + factory_map.emplace("cim:ExcIEEEAC7B", &ExcIEEEAC7B_factory); } void ExcIEEEAC7B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kc"), &assign_ExcIEEEAC7B_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kd"), &assign_ExcIEEEAC7B_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kdr"), &assign_ExcIEEEAC7B_kdr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.ke"), &assign_ExcIEEEAC7B_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kf1"), &assign_ExcIEEEAC7B_kf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kf2"), &assign_ExcIEEEAC7B_kf2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kf3"), &assign_ExcIEEEAC7B_kf3)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kia"), &assign_ExcIEEEAC7B_kia)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kir"), &assign_ExcIEEEAC7B_kir)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kl"), &assign_ExcIEEEAC7B_kl)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kp"), &assign_ExcIEEEAC7B_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kpa"), &assign_ExcIEEEAC7B_kpa)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kpr"), &assign_ExcIEEEAC7B_kpr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.seve1"), &assign_ExcIEEEAC7B_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.seve2"), &assign_ExcIEEEAC7B_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.tdr"), &assign_ExcIEEEAC7B_tdr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.te"), &assign_ExcIEEEAC7B_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.tf"), &assign_ExcIEEEAC7B_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.vamax"), &assign_ExcIEEEAC7B_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.vamin"), &assign_ExcIEEEAC7B_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.ve1"), &assign_ExcIEEEAC7B_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.ve2"), &assign_ExcIEEEAC7B_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.vemin"), &assign_ExcIEEEAC7B_vemin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.vfemax"), &assign_ExcIEEEAC7B_vfemax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.vrmax"), &assign_ExcIEEEAC7B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.vrmin"), &assign_ExcIEEEAC7B_vrmin)); + assign_map.emplace("cim:ExcIEEEAC7B.kc", &assign_ExcIEEEAC7B_kc); + assign_map.emplace("cim:ExcIEEEAC7B.kd", &assign_ExcIEEEAC7B_kd); + assign_map.emplace("cim:ExcIEEEAC7B.kdr", &assign_ExcIEEEAC7B_kdr); + assign_map.emplace("cim:ExcIEEEAC7B.ke", &assign_ExcIEEEAC7B_ke); + assign_map.emplace("cim:ExcIEEEAC7B.kf1", &assign_ExcIEEEAC7B_kf1); + assign_map.emplace("cim:ExcIEEEAC7B.kf2", &assign_ExcIEEEAC7B_kf2); + assign_map.emplace("cim:ExcIEEEAC7B.kf3", &assign_ExcIEEEAC7B_kf3); + assign_map.emplace("cim:ExcIEEEAC7B.kia", &assign_ExcIEEEAC7B_kia); + assign_map.emplace("cim:ExcIEEEAC7B.kir", &assign_ExcIEEEAC7B_kir); + assign_map.emplace("cim:ExcIEEEAC7B.kl", &assign_ExcIEEEAC7B_kl); + assign_map.emplace("cim:ExcIEEEAC7B.kp", &assign_ExcIEEEAC7B_kp); + assign_map.emplace("cim:ExcIEEEAC7B.kpa", &assign_ExcIEEEAC7B_kpa); + assign_map.emplace("cim:ExcIEEEAC7B.kpr", &assign_ExcIEEEAC7B_kpr); + assign_map.emplace("cim:ExcIEEEAC7B.seve1", &assign_ExcIEEEAC7B_seve1); + assign_map.emplace("cim:ExcIEEEAC7B.seve2", &assign_ExcIEEEAC7B_seve2); + assign_map.emplace("cim:ExcIEEEAC7B.tdr", &assign_ExcIEEEAC7B_tdr); + assign_map.emplace("cim:ExcIEEEAC7B.te", &assign_ExcIEEEAC7B_te); + assign_map.emplace("cim:ExcIEEEAC7B.tf", &assign_ExcIEEEAC7B_tf); + assign_map.emplace("cim:ExcIEEEAC7B.vamax", &assign_ExcIEEEAC7B_vamax); + assign_map.emplace("cim:ExcIEEEAC7B.vamin", &assign_ExcIEEEAC7B_vamin); + assign_map.emplace("cim:ExcIEEEAC7B.ve1", &assign_ExcIEEEAC7B_ve1); + assign_map.emplace("cim:ExcIEEEAC7B.ve2", &assign_ExcIEEEAC7B_ve2); + assign_map.emplace("cim:ExcIEEEAC7B.vemin", &assign_ExcIEEEAC7B_vemin); + assign_map.emplace("cim:ExcIEEEAC7B.vfemax", &assign_ExcIEEEAC7B_vfemax); + assign_map.emplace("cim:ExcIEEEAC7B.vrmax", &assign_ExcIEEEAC7B_vrmax); + assign_map.emplace("cim:ExcIEEEAC7B.vrmin", &assign_ExcIEEEAC7B_vrmin); } void ExcIEEEAC7B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEAC7B.hpp b/CGMES_2.4.15_16FEB2016/ExcIEEEAC7B.hpp index cc9972108..8e6afa3e6 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEAC7B.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEAC7B.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type AC7B model. The model represents excitation systems which consist of an ac alternator with either stationary or rotating rectifiers to produce the dc field requirements. It is an upgrade to earlier ac excitation systems, which replace only the controls but retain the ac alternator and diode rectifier bridge. Reference: IEEE Standard 421.5-2005 Section 6.7. In the IEEE Standard 421.5 - 2005, the [1 / sT] block is shown as [1 / (1 + sT)], which is incorrect. - */ + /** \brief The class represents IEEE Std 421.5-2005 type AC7B model. The model represents excitation systems which consist of an ac alternator with either stationary or rotating rectifiers to produce the dc field requirements. It is an upgrade to earlier ac excitation systems, which replace only the controls but retain the ac alternator and diode rectifier bridge. Reference: IEEE Standard 421.5-2005 Section 6.7. In the IEEE Standard 421.5 - 2005, the [1 / sT] block is shown as [1 / (1 + sT)], which is incorrect. */ class ExcIEEEAC7B : public ExcitationSystemDynamics { public: @@ -29,32 +27,83 @@ namespace CIMPP ExcIEEEAC7B(); ~ExcIEEEAC7B() override; - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.18. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (K). Typical Value = 0.02. Default: nullptr */ - CIMPP::PU kdr; /* Voltage regulator derivative gain (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf1; /* Excitation control system stabilizer gain (K). Typical Value = 0.212. Default: nullptr */ - CIMPP::PU kf2; /* Excitation control system stabilizer gain (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU kf3; /* Excitation control system stabilizer gain (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU kia; /* Voltage regulator integral gain (K). Typical Value = 59.69. Default: nullptr */ - CIMPP::PU kir; /* Voltage regulator integral gain (K). Typical Value = 4.24. Default: nullptr */ - CIMPP::PU kl; /* Exciter field voltage lower limit parameter (K). Typical Value = 10. Default: nullptr */ - CIMPP::PU kp; /* Potential circuit gain coefficient (K). Typical Value = 4.96. Default: nullptr */ - CIMPP::PU kpa; /* Voltage regulator proportional gain (K). Typical Value = 65.36. Default: nullptr */ - CIMPP::PU kpr; /* Voltage regulator proportional gain (K). Typical Value = 4.24. Default: nullptr */ - CIMPP::Simple_Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.44. Default: nullptr */ - CIMPP::Simple_Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.075. Default: nullptr */ - CIMPP::Seconds tdr; /* Lag time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (T). Typical Value = 1.1. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (V). Typical Value = 1. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (V). Typical Value = -0.95. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (V) equals V (V). Typical Value = 6.3. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 3.02. Default: nullptr */ - CIMPP::PU vemin; /* Minimum exciter voltage output (V). Typical Value = 0. Default: nullptr */ - CIMPP::PU vfemax; /* Exciter field current limit reference (V). Typical Value = 6.9. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 5.79. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = -5.79. Default: nullptr */ + /** \brief Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.18. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (K). Typical Value = 0.02. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Voltage regulator derivative gain (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU kdr; + + /** \brief Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gain (K). Typical Value = 0.212. Default: nullptr */ + CIMPP::PU kf1; + + /** \brief Excitation control system stabilizer gain (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU kf2; + + /** \brief Excitation control system stabilizer gain (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU kf3; + + /** \brief Voltage regulator integral gain (K). Typical Value = 59.69. Default: nullptr */ + CIMPP::PU kia; + + /** \brief Voltage regulator integral gain (K). Typical Value = 4.24. Default: nullptr */ + CIMPP::PU kir; + + /** \brief Exciter field voltage lower limit parameter (K). Typical Value = 10. Default: nullptr */ + CIMPP::PU kl; + + /** \brief Potential circuit gain coefficient (K). Typical Value = 4.96. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Voltage regulator proportional gain (K). Typical Value = 65.36. Default: nullptr */ + CIMPP::PU kpa; + + /** \brief Voltage regulator proportional gain (K). Typical Value = 4.24. Default: nullptr */ + CIMPP::PU kpr; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.44. Default: nullptr */ + CIMPP::Simple_Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.075. Default: nullptr */ + CIMPP::Simple_Float seve2; + + /** \brief Lag time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tdr; + + /** \brief Exciter time constant, integration rate associated with exciter control (T). Typical Value = 1.1. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage regulator output (V). Typical Value = 1. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -0.95. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (V) equals V (V). Typical Value = 6.3. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 3.02. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Minimum exciter voltage output (V). Typical Value = 0. Default: nullptr */ + CIMPP::PU vemin; + + /** \brief Exciter field current limit reference (V). Typical Value = 6.9. Default: nullptr */ + CIMPP::PU vfemax; + + /** \brief Maximum voltage regulator output (V). Typical Value = 5.79. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -5.79. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEAC8B.cpp b/CGMES_2.4.15_16FEB2016/ExcIEEEAC8B.cpp index 110fc2e48..ebf326092 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEAC8B.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEAC8B.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEAC8B::ExcIEEEAC8B() {}; -ExcIEEEAC8B::~ExcIEEEAC8B() {}; +ExcIEEEAC8B::ExcIEEEAC8B() {} +ExcIEEEAC8B::~ExcIEEEAC8B() {} static const std::list PossibleProfilesForClass = { @@ -74,246 +56,262 @@ ExcIEEEAC8B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEAC8B_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_kdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_kdr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kdr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_kir(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_kir(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kir; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_kpr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_kpr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_tdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_tdr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_vemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_vemin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vemin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_vfemax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfemax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEAC8B_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -327,7 +325,8 @@ bool get_ExcIEEEAC8B_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC8B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -341,7 +340,8 @@ bool get_ExcIEEEAC8B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC8B_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -355,7 +355,8 @@ bool get_ExcIEEEAC8B_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC8B_kdr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdr; if (!buffer.str().empty()) @@ -369,7 +370,8 @@ bool get_ExcIEEEAC8B_kdr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC8B_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -383,7 +385,8 @@ bool get_ExcIEEEAC8B_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC8B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kir; if (!buffer.str().empty()) @@ -397,7 +400,8 @@ bool get_ExcIEEEAC8B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC8B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpr; if (!buffer.str().empty()) @@ -411,7 +415,8 @@ bool get_ExcIEEEAC8B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC8B_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -425,7 +430,8 @@ bool get_ExcIEEEAC8B_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC8B_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -439,7 +445,8 @@ bool get_ExcIEEEAC8B_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC8B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -453,7 +460,8 @@ bool get_ExcIEEEAC8B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC8B_tdr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdr; if (!buffer.str().empty()) @@ -467,7 +475,8 @@ bool get_ExcIEEEAC8B_tdr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC8B_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -481,7 +490,8 @@ bool get_ExcIEEEAC8B_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC8B_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -495,7 +505,8 @@ bool get_ExcIEEEAC8B_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC8B_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -509,7 +520,8 @@ bool get_ExcIEEEAC8B_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC8B_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vemin; if (!buffer.str().empty()) @@ -523,7 +535,8 @@ bool get_ExcIEEEAC8B_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC8B_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfemax; if (!buffer.str().empty()) @@ -537,7 +550,8 @@ bool get_ExcIEEEAC8B_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEAC8B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -551,7 +565,8 @@ bool get_ExcIEEEAC8B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC8B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -563,8 +578,6 @@ bool get_ExcIEEEAC8B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEAC8B::debugName[] = "ExcIEEEAC8B"; const char* ExcIEEEAC8B::debugString() const { @@ -573,29 +586,29 @@ const char* ExcIEEEAC8B::debugString() const void ExcIEEEAC8B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B"), &ExcIEEEAC8B_factory)); + factory_map.emplace("cim:ExcIEEEAC8B", &ExcIEEEAC8B_factory); } void ExcIEEEAC8B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.ka"), &assign_ExcIEEEAC8B_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.kc"), &assign_ExcIEEEAC8B_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.kd"), &assign_ExcIEEEAC8B_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.kdr"), &assign_ExcIEEEAC8B_kdr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.ke"), &assign_ExcIEEEAC8B_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.kir"), &assign_ExcIEEEAC8B_kir)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.kpr"), &assign_ExcIEEEAC8B_kpr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.seve1"), &assign_ExcIEEEAC8B_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.seve2"), &assign_ExcIEEEAC8B_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.ta"), &assign_ExcIEEEAC8B_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.tdr"), &assign_ExcIEEEAC8B_tdr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.te"), &assign_ExcIEEEAC8B_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.ve1"), &assign_ExcIEEEAC8B_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.ve2"), &assign_ExcIEEEAC8B_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.vemin"), &assign_ExcIEEEAC8B_vemin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.vfemax"), &assign_ExcIEEEAC8B_vfemax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.vrmax"), &assign_ExcIEEEAC8B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.vrmin"), &assign_ExcIEEEAC8B_vrmin)); + assign_map.emplace("cim:ExcIEEEAC8B.ka", &assign_ExcIEEEAC8B_ka); + assign_map.emplace("cim:ExcIEEEAC8B.kc", &assign_ExcIEEEAC8B_kc); + assign_map.emplace("cim:ExcIEEEAC8B.kd", &assign_ExcIEEEAC8B_kd); + assign_map.emplace("cim:ExcIEEEAC8B.kdr", &assign_ExcIEEEAC8B_kdr); + assign_map.emplace("cim:ExcIEEEAC8B.ke", &assign_ExcIEEEAC8B_ke); + assign_map.emplace("cim:ExcIEEEAC8B.kir", &assign_ExcIEEEAC8B_kir); + assign_map.emplace("cim:ExcIEEEAC8B.kpr", &assign_ExcIEEEAC8B_kpr); + assign_map.emplace("cim:ExcIEEEAC8B.seve1", &assign_ExcIEEEAC8B_seve1); + assign_map.emplace("cim:ExcIEEEAC8B.seve2", &assign_ExcIEEEAC8B_seve2); + assign_map.emplace("cim:ExcIEEEAC8B.ta", &assign_ExcIEEEAC8B_ta); + assign_map.emplace("cim:ExcIEEEAC8B.tdr", &assign_ExcIEEEAC8B_tdr); + assign_map.emplace("cim:ExcIEEEAC8B.te", &assign_ExcIEEEAC8B_te); + assign_map.emplace("cim:ExcIEEEAC8B.ve1", &assign_ExcIEEEAC8B_ve1); + assign_map.emplace("cim:ExcIEEEAC8B.ve2", &assign_ExcIEEEAC8B_ve2); + assign_map.emplace("cim:ExcIEEEAC8B.vemin", &assign_ExcIEEEAC8B_vemin); + assign_map.emplace("cim:ExcIEEEAC8B.vfemax", &assign_ExcIEEEAC8B_vfemax); + assign_map.emplace("cim:ExcIEEEAC8B.vrmax", &assign_ExcIEEEAC8B_vrmax); + assign_map.emplace("cim:ExcIEEEAC8B.vrmin", &assign_ExcIEEEAC8B_vrmin); } void ExcIEEEAC8B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEAC8B.hpp b/CGMES_2.4.15_16FEB2016/ExcIEEEAC8B.hpp index a5bb045a6..c9ca37813 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEAC8B.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEAC8B.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type AC8B model. This model represents a PID voltage regulator with either a brushless exciter or dc exciter. The AVR in this model consists of PID control, with separate constants for the proportional (), integral (), and derivative () gains. The representation of the brushless exciter (, , , , ) is similar to the model Type AC2A. The Type AC8B model can be used to represent static voltage regulators applied to brushless excitation systems. Digitally based voltage regulators feeding dc rotating main exciters can be represented with the AC Type AC8B model with the parameters and set to 0. For thyristor power stages fed from the generator terminals, the limits and should be a function of terminal voltage: * and * . Reference: IEEE Standard 421.5-2005 Section 6.8. - */ + /** \brief The class represents IEEE Std 421.5-2005 type AC8B model. This model represents a PID voltage regulator with either a brushless exciter or dc exciter. The AVR in this model consists of PID control, with separate constants for the proportional (), integral (), and derivative () gains. The representation of the brushless exciter (, , , , ) is similar to the model Type AC2A. The Type AC8B model can be used to represent static voltage regulators applied to brushless excitation systems. Digitally based voltage regulators feeding dc rotating main exciters can be represented with the AC Type AC8B model with the parameters and set to 0. For thyristor power stages fed from the generator terminals, the limits and should be a function of terminal voltage: * and * . Reference: IEEE Standard 421.5-2005 Section 6.8. */ class ExcIEEEAC8B : public ExcitationSystemDynamics { public: @@ -29,24 +27,59 @@ namespace CIMPP ExcIEEEAC8B(); ~ExcIEEEAC8B() override; - CIMPP::PU ka; /* Voltage regulator gain (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.55. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (K). Typical Value = 1.1. Default: nullptr */ - CIMPP::PU kdr; /* Voltage regulator derivative gain (K). Typical Value = 10. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kir; /* Voltage regulator integral gain (K). Typical Value = 5. Default: nullptr */ - CIMPP::PU kpr; /* Voltage regulator proportional gain (K). Typical Value = 80. Default: nullptr */ - CIMPP::Simple_Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.3. Default: nullptr */ - CIMPP::Simple_Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tdr; /* Lag time constant (T). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (T). Typical Value = 1.2. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (V) equals V (V). Typical Value = 6.5. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 9. Default: nullptr */ - CIMPP::PU vemin; /* Minimum exciter voltage output (V). Typical Value = 0. Default: nullptr */ - CIMPP::PU vfemax; /* Exciter field current limit reference (V). Typical Value = 6. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 35. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = 0. Default: nullptr */ + /** \brief Voltage regulator gain (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.55. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (K). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Voltage regulator derivative gain (K). Typical Value = 10. Default: nullptr */ + CIMPP::PU kdr; + + /** \brief Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Voltage regulator integral gain (K). Typical Value = 5. Default: nullptr */ + CIMPP::PU kir; + + /** \brief Voltage regulator proportional gain (K). Typical Value = 80. Default: nullptr */ + CIMPP::PU kpr; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.3. Default: nullptr */ + CIMPP::Simple_Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 3. Default: nullptr */ + CIMPP::Simple_Float seve2; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Lag time constant (T). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tdr; + + /** \brief Exciter time constant, integration rate associated with exciter control (T). Typical Value = 1.2. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (V) equals V (V). Typical Value = 6.5. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 9. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Minimum exciter voltage output (V). Typical Value = 0. Default: nullptr */ + CIMPP::PU vemin; + + /** \brief Exciter field current limit reference (V). Typical Value = 6. Default: nullptr */ + CIMPP::PU vfemax; + + /** \brief Maximum voltage regulator output (V). Typical Value = 35. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = 0. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEDC1A.cpp b/CGMES_2.4.15_16FEB2016/ExcIEEEDC1A.cpp index 9f8458ed2..51102e7b5 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEDC1A.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEDC1A.cpp @@ -8,27 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEDC1A::ExcIEEEDC1A() {}; -ExcIEEEDC1A::~ExcIEEEDC1A() {}; +ExcIEEEDC1A::ExcIEEEDC1A() {} +ExcIEEEDC1A::~ExcIEEEDC1A() {} static const std::list PossibleProfilesForClass = { @@ -70,220 +54,234 @@ ExcIEEEDC1A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEDC1A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_exclim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exclim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_seefd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_seefd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_uelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEDC1A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -297,7 +295,8 @@ bool get_ExcIEEEDC1A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEDC1A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -311,7 +310,8 @@ bool get_ExcIEEEDC1A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEDC1A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exclim; if (!buffer.str().empty()) @@ -325,7 +325,8 @@ bool get_ExcIEEEDC1A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -339,7 +340,8 @@ bool get_ExcIEEEDC1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC1A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -353,7 +355,8 @@ bool get_ExcIEEEDC1A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -367,7 +370,8 @@ bool get_ExcIEEEDC1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC1A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd1; if (!buffer.str().empty()) @@ -381,7 +385,8 @@ bool get_ExcIEEEDC1A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC1A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd2; if (!buffer.str().empty()) @@ -395,7 +400,8 @@ bool get_ExcIEEEDC1A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -409,7 +415,8 @@ bool get_ExcIEEEDC1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -423,7 +430,8 @@ bool get_ExcIEEEDC1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -437,7 +445,8 @@ bool get_ExcIEEEDC1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC1A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -451,7 +460,8 @@ bool get_ExcIEEEDC1A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -465,7 +475,8 @@ bool get_ExcIEEEDC1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC1A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uelin; if (!buffer.str().empty()) @@ -479,7 +490,8 @@ bool get_ExcIEEEDC1A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEDC1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -493,7 +505,8 @@ bool get_ExcIEEEDC1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEDC1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -505,8 +518,6 @@ bool get_ExcIEEEDC1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEDC1A::debugName[] = "ExcIEEEDC1A"; const char* ExcIEEEDC1A::debugString() const { @@ -515,27 +526,27 @@ const char* ExcIEEEDC1A::debugString() const void ExcIEEEDC1A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A"), &ExcIEEEDC1A_factory)); + factory_map.emplace("cim:ExcIEEEDC1A", &ExcIEEEDC1A_factory); } void ExcIEEEDC1A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.efd1"), &assign_ExcIEEEDC1A_efd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.efd2"), &assign_ExcIEEEDC1A_efd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.exclim"), &assign_ExcIEEEDC1A_exclim)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.ka"), &assign_ExcIEEEDC1A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.ke"), &assign_ExcIEEEDC1A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.kf"), &assign_ExcIEEEDC1A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.seefd1"), &assign_ExcIEEEDC1A_seefd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.seefd2"), &assign_ExcIEEEDC1A_seefd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.ta"), &assign_ExcIEEEDC1A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.tb"), &assign_ExcIEEEDC1A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.tc"), &assign_ExcIEEEDC1A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.te"), &assign_ExcIEEEDC1A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.tf"), &assign_ExcIEEEDC1A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.uelin"), &assign_ExcIEEEDC1A_uelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.vrmax"), &assign_ExcIEEEDC1A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.vrmin"), &assign_ExcIEEEDC1A_vrmin)); + assign_map.emplace("cim:ExcIEEEDC1A.efd1", &assign_ExcIEEEDC1A_efd1); + assign_map.emplace("cim:ExcIEEEDC1A.efd2", &assign_ExcIEEEDC1A_efd2); + assign_map.emplace("cim:ExcIEEEDC1A.exclim", &assign_ExcIEEEDC1A_exclim); + assign_map.emplace("cim:ExcIEEEDC1A.ka", &assign_ExcIEEEDC1A_ka); + assign_map.emplace("cim:ExcIEEEDC1A.ke", &assign_ExcIEEEDC1A_ke); + assign_map.emplace("cim:ExcIEEEDC1A.kf", &assign_ExcIEEEDC1A_kf); + assign_map.emplace("cim:ExcIEEEDC1A.seefd1", &assign_ExcIEEEDC1A_seefd1); + assign_map.emplace("cim:ExcIEEEDC1A.seefd2", &assign_ExcIEEEDC1A_seefd2); + assign_map.emplace("cim:ExcIEEEDC1A.ta", &assign_ExcIEEEDC1A_ta); + assign_map.emplace("cim:ExcIEEEDC1A.tb", &assign_ExcIEEEDC1A_tb); + assign_map.emplace("cim:ExcIEEEDC1A.tc", &assign_ExcIEEEDC1A_tc); + assign_map.emplace("cim:ExcIEEEDC1A.te", &assign_ExcIEEEDC1A_te); + assign_map.emplace("cim:ExcIEEEDC1A.tf", &assign_ExcIEEEDC1A_tf); + assign_map.emplace("cim:ExcIEEEDC1A.uelin", &assign_ExcIEEEDC1A_uelin); + assign_map.emplace("cim:ExcIEEEDC1A.vrmax", &assign_ExcIEEEDC1A_vrmax); + assign_map.emplace("cim:ExcIEEEDC1A.vrmin", &assign_ExcIEEEDC1A_vrmin); } void ExcIEEEDC1A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEDC1A.hpp b/CGMES_2.4.15_16FEB2016/ExcIEEEDC1A.hpp index f0f9307c6..b3f403da2 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEDC1A.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEDC1A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type DC1A model. This model represents field-controlled dc commutator exciters with continuously acting voltage regulators (especially the direct-acting rheostatic, rotating amplifier, and magnetic amplifier types). Because this model has been widely implemented by the industry, it is sometimes used to represent other types of systems when detailed data for them are not available or when a simplified model is required. Reference: IEEE Standard 421.5-2005 Section 5.1. - */ + /** \brief The class represents IEEE Std 421.5-2005 type DC1A model. This model represents field-controlled dc commutator exciters with continuously acting voltage regulators (especially the direct-acting rheostatic, rotating amplifier, and magnetic amplifier types). Because this model has been widely implemented by the industry, it is sometimes used to represent other types of systems when detailed data for them are not available or when a simplified model is required. Reference: IEEE Standard 421.5-2005 Section 5.1. */ class ExcIEEEDC1A : public ExcitationSystemDynamics { public: @@ -30,22 +28,53 @@ namespace CIMPP ExcIEEEDC1A(); ~ExcIEEEDC1A() override; - CIMPP::PU efd1; /* Exciter voltage at which exciter saturation is defined (E). Typical Value = 3.1. Default: nullptr */ - CIMPP::PU efd2; /* Exciter voltage at which exciter saturation is defined (E). Typical Value = 2.3. Default: nullptr */ - CIMPP::Boolean exclim; /* (exclim). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero is not applied to integrator output. Typical Value = true. Default: false */ - CIMPP::PU ka; /* Voltage regulator gain (K). Typical Value = 46. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gain (K). Typical Value = 0.1. Default: nullptr */ - CIMPP::Simple_Float seefd1; /* Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.33. Default: nullptr */ - CIMPP::Simple_Float seefd2; /* Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0.06. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.46. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::Boolean uelin; /* UEL input (uelin). true = input is connected to the HV gate false = input connects to the error signal. Typical Value = true. Default: false */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = -0.9. Default: nullptr */ + /** \brief Exciter voltage at which exciter saturation is defined (E). Typical Value = 3.1. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Exciter voltage at which exciter saturation is defined (E). Typical Value = 2.3. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief (exclim). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero is not applied to integrator output. Typical Value = true. Default: false */ + CIMPP::Boolean exclim; + + /** \brief Voltage regulator gain (K). Typical Value = 46. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Exciter constant related to self-excited field (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gain (K). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.33. Default: nullptr */ + CIMPP::Simple_Float seefd1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float seefd2; + + /** \brief Voltage regulator time constant (T). Typical Value = 0.06. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.46. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief UEL input (uelin). true = input is connected to the HV gate false = input connects to the error signal. Typical Value = true. Default: false */ + CIMPP::Boolean uelin; + + /** \brief Maximum voltage regulator output (V). Typical Value = 1. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -0.9. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEDC2A.cpp b/CGMES_2.4.15_16FEB2016/ExcIEEEDC2A.cpp index b53eec164..da3ebc726 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEDC2A.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEDC2A.cpp @@ -8,27 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEDC2A::ExcIEEEDC2A() {}; -ExcIEEEDC2A::~ExcIEEEDC2A() {}; +ExcIEEEDC2A::ExcIEEEDC2A() {} +ExcIEEEDC2A::~ExcIEEEDC2A() {} static const std::list PossibleProfilesForClass = { @@ -70,220 +54,234 @@ ExcIEEEDC2A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEDC2A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_exclim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exclim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_seefd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_seefd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_uelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEDC2A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -297,7 +295,8 @@ bool get_ExcIEEEDC2A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEDC2A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -311,7 +310,8 @@ bool get_ExcIEEEDC2A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEDC2A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exclim; if (!buffer.str().empty()) @@ -325,7 +325,8 @@ bool get_ExcIEEEDC2A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -339,7 +340,8 @@ bool get_ExcIEEEDC2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -353,7 +355,8 @@ bool get_ExcIEEEDC2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -367,7 +370,8 @@ bool get_ExcIEEEDC2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC2A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd1; if (!buffer.str().empty()) @@ -381,7 +385,8 @@ bool get_ExcIEEEDC2A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC2A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd2; if (!buffer.str().empty()) @@ -395,7 +400,8 @@ bool get_ExcIEEEDC2A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -409,7 +415,8 @@ bool get_ExcIEEEDC2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -423,7 +430,8 @@ bool get_ExcIEEEDC2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -437,7 +445,8 @@ bool get_ExcIEEEDC2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -451,7 +460,8 @@ bool get_ExcIEEEDC2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -465,7 +475,8 @@ bool get_ExcIEEEDC2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC2A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uelin; if (!buffer.str().empty()) @@ -479,7 +490,8 @@ bool get_ExcIEEEDC2A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEDC2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -493,7 +505,8 @@ bool get_ExcIEEEDC2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEDC2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -505,8 +518,6 @@ bool get_ExcIEEEDC2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEDC2A::debugName[] = "ExcIEEEDC2A"; const char* ExcIEEEDC2A::debugString() const { @@ -515,27 +526,27 @@ const char* ExcIEEEDC2A::debugString() const void ExcIEEEDC2A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A"), &ExcIEEEDC2A_factory)); + factory_map.emplace("cim:ExcIEEEDC2A", &ExcIEEEDC2A_factory); } void ExcIEEEDC2A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.efd1"), &assign_ExcIEEEDC2A_efd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.efd2"), &assign_ExcIEEEDC2A_efd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.exclim"), &assign_ExcIEEEDC2A_exclim)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.ka"), &assign_ExcIEEEDC2A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.ke"), &assign_ExcIEEEDC2A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.kf"), &assign_ExcIEEEDC2A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.seefd1"), &assign_ExcIEEEDC2A_seefd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.seefd2"), &assign_ExcIEEEDC2A_seefd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.ta"), &assign_ExcIEEEDC2A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.tb"), &assign_ExcIEEEDC2A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.tc"), &assign_ExcIEEEDC2A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.te"), &assign_ExcIEEEDC2A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.tf"), &assign_ExcIEEEDC2A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.uelin"), &assign_ExcIEEEDC2A_uelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.vrmax"), &assign_ExcIEEEDC2A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.vrmin"), &assign_ExcIEEEDC2A_vrmin)); + assign_map.emplace("cim:ExcIEEEDC2A.efd1", &assign_ExcIEEEDC2A_efd1); + assign_map.emplace("cim:ExcIEEEDC2A.efd2", &assign_ExcIEEEDC2A_efd2); + assign_map.emplace("cim:ExcIEEEDC2A.exclim", &assign_ExcIEEEDC2A_exclim); + assign_map.emplace("cim:ExcIEEEDC2A.ka", &assign_ExcIEEEDC2A_ka); + assign_map.emplace("cim:ExcIEEEDC2A.ke", &assign_ExcIEEEDC2A_ke); + assign_map.emplace("cim:ExcIEEEDC2A.kf", &assign_ExcIEEEDC2A_kf); + assign_map.emplace("cim:ExcIEEEDC2A.seefd1", &assign_ExcIEEEDC2A_seefd1); + assign_map.emplace("cim:ExcIEEEDC2A.seefd2", &assign_ExcIEEEDC2A_seefd2); + assign_map.emplace("cim:ExcIEEEDC2A.ta", &assign_ExcIEEEDC2A_ta); + assign_map.emplace("cim:ExcIEEEDC2A.tb", &assign_ExcIEEEDC2A_tb); + assign_map.emplace("cim:ExcIEEEDC2A.tc", &assign_ExcIEEEDC2A_tc); + assign_map.emplace("cim:ExcIEEEDC2A.te", &assign_ExcIEEEDC2A_te); + assign_map.emplace("cim:ExcIEEEDC2A.tf", &assign_ExcIEEEDC2A_tf); + assign_map.emplace("cim:ExcIEEEDC2A.uelin", &assign_ExcIEEEDC2A_uelin); + assign_map.emplace("cim:ExcIEEEDC2A.vrmax", &assign_ExcIEEEDC2A_vrmax); + assign_map.emplace("cim:ExcIEEEDC2A.vrmin", &assign_ExcIEEEDC2A_vrmin); } void ExcIEEEDC2A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEDC2A.hpp b/CGMES_2.4.15_16FEB2016/ExcIEEEDC2A.hpp index aae7a5d90..522fb8410 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEDC2A.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEDC2A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type DC2A model. This model represents represent field-controlled dc commutator exciters with continuously acting voltage regulators having supplies obtained from the generator or auxiliary bus. It differs from the Type DC1A model only in the voltage regulator output limits, which are now proportional to terminal voltage . It is representative of solid-state replacements for various forms of older mechanical and rotating amplifier regulating equipment connected to dc commutator exciters. Reference: IEEE Standard 421.5-2005 Section 5.2. - */ + /** \brief The class represents IEEE Std 421.5-2005 type DC2A model. This model represents represent field-controlled dc commutator exciters with continuously acting voltage regulators having supplies obtained from the generator or auxiliary bus. It differs from the Type DC1A model only in the voltage regulator output limits, which are now proportional to terminal voltage . It is representative of solid-state replacements for various forms of older mechanical and rotating amplifier regulating equipment connected to dc commutator exciters. Reference: IEEE Standard 421.5-2005 Section 5.2. */ class ExcIEEEDC2A : public ExcitationSystemDynamics { public: @@ -30,22 +28,53 @@ namespace CIMPP ExcIEEEDC2A(); ~ExcIEEEDC2A() override; - CIMPP::PU efd1; /* Exciter voltage at which exciter saturation is defined (E). Typical Value = 3.05. Default: nullptr */ - CIMPP::PU efd2; /* Exciter voltage at which exciter saturation is defined (E). Typical Value = 2.29. Default: nullptr */ - CIMPP::PU exclim; /* (exclim). IEEE standard is ambiguous about lower limit on exciter output. Typical Value = - 999 which means that there is no limit applied. Default: nullptr */ - CIMPP::PU ka; /* Voltage regulator gain (K). Typical Value = 300. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gain (K). Typical Value = 0.1. Default: nullptr */ - CIMPP::Simple_Float seefd1; /* Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.279. Default: nullptr */ - CIMPP::Simple_Float seefd2; /* Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.117. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0.01. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (T). Typical Value = 1.33. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (T). Typical Value = 0.675. Default: nullptr */ - CIMPP::Boolean uelin; /* UEL input (uelin). true = input is connected to the HV gate false = input connects to the error signal. Typical Value = true. Default: false */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 4.95. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = -4.9. Default: nullptr */ + /** \brief Exciter voltage at which exciter saturation is defined (E). Typical Value = 3.05. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Exciter voltage at which exciter saturation is defined (E). Typical Value = 2.29. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief (exclim). IEEE standard is ambiguous about lower limit on exciter output. Typical Value = - 999 which means that there is no limit applied. Default: nullptr */ + CIMPP::PU exclim; + + /** \brief Voltage regulator gain (K). Typical Value = 300. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gain (K). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.279. Default: nullptr */ + CIMPP::Simple_Float seefd1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.117. Default: nullptr */ + CIMPP::Simple_Float seefd2; + + /** \brief Voltage regulator time constant (T). Typical Value = 0.01. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (T). Typical Value = 1.33. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value = 0.675. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief UEL input (uelin). true = input is connected to the HV gate false = input connects to the error signal. Typical Value = true. Default: false */ + CIMPP::Boolean uelin; + + /** \brief Maximum voltage regulator output (V). Typical Value = 4.95. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -4.9. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEDC3A.cpp b/CGMES_2.4.15_16FEB2016/ExcIEEEDC3A.cpp index a137da293..0a3177ee8 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEDC3A.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEDC3A.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEDC3A::ExcIEEEDC3A() {}; -ExcIEEEDC3A::~ExcIEEEDC3A() {}; +ExcIEEEDC3A::ExcIEEEDC3A() {} +ExcIEEEDC3A::~ExcIEEEDC3A() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ ExcIEEEDC3A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEDC3A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_exclim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exclim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_kv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_kv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_seefd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_seefd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_trh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_trh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->trh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEDC3A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_ExcIEEEDC3A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEDC3A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_ExcIEEEDC3A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEDC3A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exclim; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_ExcIEEEDC3A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC3A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_ExcIEEEDC3A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC3A_kv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kv; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_ExcIEEEDC3A_kv(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC3A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd1; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_ExcIEEEDC3A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC3A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd2; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_ExcIEEEDC3A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC3A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_ExcIEEEDC3A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC3A_trh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->trh; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_ExcIEEEDC3A_trh(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEDC3A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_ExcIEEEDC3A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEDC3A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_ExcIEEEDC3A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEDC3A::debugName[] = "ExcIEEEDC3A"; const char* ExcIEEEDC3A::debugString() const { @@ -370,22 +376,22 @@ const char* ExcIEEEDC3A::debugString() const void ExcIEEEDC3A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A"), &ExcIEEEDC3A_factory)); + factory_map.emplace("cim:ExcIEEEDC3A", &ExcIEEEDC3A_factory); } void ExcIEEEDC3A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.efd1"), &assign_ExcIEEEDC3A_efd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.efd2"), &assign_ExcIEEEDC3A_efd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.exclim"), &assign_ExcIEEEDC3A_exclim)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.ke"), &assign_ExcIEEEDC3A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.kv"), &assign_ExcIEEEDC3A_kv)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.seefd1"), &assign_ExcIEEEDC3A_seefd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.seefd2"), &assign_ExcIEEEDC3A_seefd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.te"), &assign_ExcIEEEDC3A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.trh"), &assign_ExcIEEEDC3A_trh)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.vrmax"), &assign_ExcIEEEDC3A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.vrmin"), &assign_ExcIEEEDC3A_vrmin)); + assign_map.emplace("cim:ExcIEEEDC3A.efd1", &assign_ExcIEEEDC3A_efd1); + assign_map.emplace("cim:ExcIEEEDC3A.efd2", &assign_ExcIEEEDC3A_efd2); + assign_map.emplace("cim:ExcIEEEDC3A.exclim", &assign_ExcIEEEDC3A_exclim); + assign_map.emplace("cim:ExcIEEEDC3A.ke", &assign_ExcIEEEDC3A_ke); + assign_map.emplace("cim:ExcIEEEDC3A.kv", &assign_ExcIEEEDC3A_kv); + assign_map.emplace("cim:ExcIEEEDC3A.seefd1", &assign_ExcIEEEDC3A_seefd1); + assign_map.emplace("cim:ExcIEEEDC3A.seefd2", &assign_ExcIEEEDC3A_seefd2); + assign_map.emplace("cim:ExcIEEEDC3A.te", &assign_ExcIEEEDC3A_te); + assign_map.emplace("cim:ExcIEEEDC3A.trh", &assign_ExcIEEEDC3A_trh); + assign_map.emplace("cim:ExcIEEEDC3A.vrmax", &assign_ExcIEEEDC3A_vrmax); + assign_map.emplace("cim:ExcIEEEDC3A.vrmin", &assign_ExcIEEEDC3A_vrmin); } void ExcIEEEDC3A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEDC3A.hpp b/CGMES_2.4.15_16FEB2016/ExcIEEEDC3A.hpp index 2fa4ead2c..7c97b2656 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEDC3A.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEDC3A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type DC3A model. This model represents represent older systems, in particular those dc commutator exciters with non-continuously acting regulators that were commonly used before the development of the continuously acting varieties. These systems respond at basically two different rates, depending upon the magnitude of voltage error. For small errors, adjustment is made periodically with a signal to a motor-operated rheostat. Larger errors cause resistors to be quickly shorted or inserted and a strong forcing signal applied to the exciter. Continuous motion of the motor-operated rheostat occurs for these larger error signals, even though it is bypassed by contactor action. Reference: IEEE Standard 421.5-2005 Section 5.3. - */ + /** \brief The class represents IEEE Std 421.5-2005 type DC3A model. This model represents represent older systems, in particular those dc commutator exciters with non-continuously acting regulators that were commonly used before the development of the continuously acting varieties. These systems respond at basically two different rates, depending upon the magnitude of voltage error. For small errors, adjustment is made periodically with a signal to a motor-operated rheostat. Larger errors cause resistors to be quickly shorted or inserted and a strong forcing signal applied to the exciter. Continuous motion of the motor-operated rheostat occurs for these larger error signals, even though it is bypassed by contactor action. Reference: IEEE Standard 421.5-2005 Section 5.3. */ class ExcIEEEDC3A : public ExcitationSystemDynamics { public: @@ -30,17 +28,38 @@ namespace CIMPP ExcIEEEDC3A(); ~ExcIEEEDC3A() override; - CIMPP::PU efd1; /* Exciter voltage at which exciter saturation is defined (E). Typical Value = 3.375. Default: nullptr */ - CIMPP::PU efd2; /* Exciter voltage at which exciter saturation is defined (E). Typical Value = 3.15. Default: nullptr */ - CIMPP::Boolean exclim; /* (exclim). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero is not applied to integrator output. Typical Value = true. Default: false */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (K). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU kv; /* Fast raise/lower contact setting (K). Typical Value = 0.05. Default: nullptr */ - CIMPP::Simple_Float seefd1; /* Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.267. Default: nullptr */ - CIMPP::Simple_Float seefd2; /* Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.068. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds trh; /* Rheostat travel time (T). Typical Value = 20. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = 0. Default: nullptr */ + /** \brief Exciter voltage at which exciter saturation is defined (E). Typical Value = 3.375. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Exciter voltage at which exciter saturation is defined (E). Typical Value = 3.15. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief (exclim). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero is not applied to integrator output. Typical Value = true. Default: false */ + CIMPP::Boolean exclim; + + /** \brief Exciter constant related to self-excited field (K). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Fast raise/lower contact setting (K). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU kv; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.267. Default: nullptr */ + CIMPP::Simple_Float seefd1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.068. Default: nullptr */ + CIMPP::Simple_Float seefd2; + + /** \brief Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Rheostat travel time (T). Typical Value = 20. Default: nullptr */ + CIMPP::Seconds trh; + + /** \brief Maximum voltage regulator output (V). Typical Value = 1. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = 0. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEDC4B.cpp b/CGMES_2.4.15_16FEB2016/ExcIEEEDC4B.cpp index 662bf0390..7f3838589 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEDC4B.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEDC4B.cpp @@ -8,30 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEDC4B::ExcIEEEDC4B() {}; -ExcIEEEDC4B::~ExcIEEEDC4B() {}; +ExcIEEEDC4B::ExcIEEEDC4B() {} +ExcIEEEDC4B::~ExcIEEEDC4B() {} static const std::list PossibleProfilesForClass = { @@ -76,259 +57,276 @@ ExcIEEEDC4B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEDC4B_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_oelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_oelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->oelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_seefd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_seefd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_uelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_vemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_vemin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vemin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEDC4B_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -342,7 +340,8 @@ bool get_ExcIEEEDC4B_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEDC4B_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -356,7 +355,8 @@ bool get_ExcIEEEDC4B_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEDC4B_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -370,7 +370,8 @@ bool get_ExcIEEEDC4B_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -384,7 +385,8 @@ bool get_ExcIEEEDC4B_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -398,7 +400,8 @@ bool get_ExcIEEEDC4B_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -412,7 +415,8 @@ bool get_ExcIEEEDC4B_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -426,7 +430,8 @@ bool get_ExcIEEEDC4B_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -440,7 +445,8 @@ bool get_ExcIEEEDC4B_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->oelin; if (!buffer.str().empty()) @@ -454,7 +460,8 @@ bool get_ExcIEEEDC4B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEDC4B_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd1; if (!buffer.str().empty()) @@ -468,7 +475,8 @@ bool get_ExcIEEEDC4B_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC4B_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd2; if (!buffer.str().empty()) @@ -482,7 +490,8 @@ bool get_ExcIEEEDC4B_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC4B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -496,7 +505,8 @@ bool get_ExcIEEEDC4B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -510,7 +520,8 @@ bool get_ExcIEEEDC4B_td(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -524,7 +535,8 @@ bool get_ExcIEEEDC4B_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -538,7 +550,8 @@ bool get_ExcIEEEDC4B_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uelin; if (!buffer.str().empty()) @@ -552,7 +565,8 @@ bool get_ExcIEEEDC4B_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEDC4B_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vemin; if (!buffer.str().empty()) @@ -566,7 +580,8 @@ bool get_ExcIEEEDC4B_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEDC4B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -580,7 +595,8 @@ bool get_ExcIEEEDC4B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEDC4B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -592,8 +608,6 @@ bool get_ExcIEEEDC4B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEDC4B::debugName[] = "ExcIEEEDC4B"; const char* ExcIEEEDC4B::debugString() const { @@ -602,30 +616,30 @@ const char* ExcIEEEDC4B::debugString() const void ExcIEEEDC4B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B"), &ExcIEEEDC4B_factory)); + factory_map.emplace("cim:ExcIEEEDC4B", &ExcIEEEDC4B_factory); } void ExcIEEEDC4B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.efd1"), &assign_ExcIEEEDC4B_efd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.efd2"), &assign_ExcIEEEDC4B_efd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.ka"), &assign_ExcIEEEDC4B_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.kd"), &assign_ExcIEEEDC4B_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.ke"), &assign_ExcIEEEDC4B_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.kf"), &assign_ExcIEEEDC4B_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.ki"), &assign_ExcIEEEDC4B_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.kp"), &assign_ExcIEEEDC4B_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.oelin"), &assign_ExcIEEEDC4B_oelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.seefd1"), &assign_ExcIEEEDC4B_seefd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.seefd2"), &assign_ExcIEEEDC4B_seefd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.ta"), &assign_ExcIEEEDC4B_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.td"), &assign_ExcIEEEDC4B_td)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.te"), &assign_ExcIEEEDC4B_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.tf"), &assign_ExcIEEEDC4B_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.uelin"), &assign_ExcIEEEDC4B_uelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.vemin"), &assign_ExcIEEEDC4B_vemin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.vrmax"), &assign_ExcIEEEDC4B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.vrmin"), &assign_ExcIEEEDC4B_vrmin)); + assign_map.emplace("cim:ExcIEEEDC4B.efd1", &assign_ExcIEEEDC4B_efd1); + assign_map.emplace("cim:ExcIEEEDC4B.efd2", &assign_ExcIEEEDC4B_efd2); + assign_map.emplace("cim:ExcIEEEDC4B.ka", &assign_ExcIEEEDC4B_ka); + assign_map.emplace("cim:ExcIEEEDC4B.kd", &assign_ExcIEEEDC4B_kd); + assign_map.emplace("cim:ExcIEEEDC4B.ke", &assign_ExcIEEEDC4B_ke); + assign_map.emplace("cim:ExcIEEEDC4B.kf", &assign_ExcIEEEDC4B_kf); + assign_map.emplace("cim:ExcIEEEDC4B.ki", &assign_ExcIEEEDC4B_ki); + assign_map.emplace("cim:ExcIEEEDC4B.kp", &assign_ExcIEEEDC4B_kp); + assign_map.emplace("cim:ExcIEEEDC4B.oelin", &assign_ExcIEEEDC4B_oelin); + assign_map.emplace("cim:ExcIEEEDC4B.seefd1", &assign_ExcIEEEDC4B_seefd1); + assign_map.emplace("cim:ExcIEEEDC4B.seefd2", &assign_ExcIEEEDC4B_seefd2); + assign_map.emplace("cim:ExcIEEEDC4B.ta", &assign_ExcIEEEDC4B_ta); + assign_map.emplace("cim:ExcIEEEDC4B.td", &assign_ExcIEEEDC4B_td); + assign_map.emplace("cim:ExcIEEEDC4B.te", &assign_ExcIEEEDC4B_te); + assign_map.emplace("cim:ExcIEEEDC4B.tf", &assign_ExcIEEEDC4B_tf); + assign_map.emplace("cim:ExcIEEEDC4B.uelin", &assign_ExcIEEEDC4B_uelin); + assign_map.emplace("cim:ExcIEEEDC4B.vemin", &assign_ExcIEEEDC4B_vemin); + assign_map.emplace("cim:ExcIEEEDC4B.vrmax", &assign_ExcIEEEDC4B_vrmax); + assign_map.emplace("cim:ExcIEEEDC4B.vrmin", &assign_ExcIEEEDC4B_vrmin); } void ExcIEEEDC4B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEDC4B.hpp b/CGMES_2.4.15_16FEB2016/ExcIEEEDC4B.hpp index 94ae70070..b26843190 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEDC4B.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEDC4B.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type DC4B model. These excitation systems utilize a field-controlled dc commutator exciter with a continuously acting voltage regulator having supplies obtained from the generator or auxiliary bus. Reference: IEEE Standard 421.5-2005 Section 5.4. - */ + /** \brief The class represents IEEE Std 421.5-2005 type DC4B model. These excitation systems utilize a field-controlled dc commutator exciter with a continuously acting voltage regulator having supplies obtained from the generator or auxiliary bus. Reference: IEEE Standard 421.5-2005 Section 5.4. */ class ExcIEEEDC4B : public ExcitationSystemDynamics { public: @@ -30,25 +28,62 @@ namespace CIMPP ExcIEEEDC4B(); ~ExcIEEEDC4B() override; - CIMPP::PU efd1; /* Exciter voltage at which exciter saturation is defined (E). Typical Value = 1.75. Default: nullptr */ - CIMPP::PU efd2; /* Exciter voltage at which exciter saturation is defined (E). Typical Value = 2.33. Default: nullptr */ - CIMPP::PU ka; /* Voltage regulator gain (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kd; /* Regulator derivative gain (K). Typical Value = 20. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gain (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU ki; /* Regulator integral gain (K). Typical Value = 20. Default: nullptr */ - CIMPP::PU kp; /* Regulator proportional gain (K). Typical Value = 20. Default: nullptr */ - CIMPP::Boolean oelin; /* OEL input (OELin). true = LV gate false = subtract from error signal. Typical Value = true. Default: false */ - CIMPP::Simple_Float seefd1; /* Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.08. Default: nullptr */ - CIMPP::Simple_Float seefd2; /* Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.27. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0.2. Default: nullptr */ - CIMPP::Seconds td; /* Regulator derivative filter time constant(T). Typical Value = 0.01. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.8. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::Boolean uelin; /* UEL input (UELin). true = HV gate false = add to error signal. Typical Value = true. Default: false */ - CIMPP::PU vemin; /* Minimum exciter voltage output(V). Typical Value = 0. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 2.7. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = -0.9. Default: nullptr */ + /** \brief Exciter voltage at which exciter saturation is defined (E). Typical Value = 1.75. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Exciter voltage at which exciter saturation is defined (E). Typical Value = 2.33. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief Voltage regulator gain (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Regulator derivative gain (K). Typical Value = 20. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gain (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Regulator integral gain (K). Typical Value = 20. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Regulator proportional gain (K). Typical Value = 20. Default: nullptr */ + CIMPP::PU kp; + + /** \brief OEL input (OELin). true = LV gate false = subtract from error signal. Typical Value = true. Default: false */ + CIMPP::Boolean oelin; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.08. Default: nullptr */ + CIMPP::Simple_Float seefd1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.27. Default: nullptr */ + CIMPP::Simple_Float seefd2; + + /** \brief Voltage regulator time constant (T). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Regulator derivative filter time constant(T). Typical Value = 0.01. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.8. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief UEL input (UELin). true = HV gate false = add to error signal. Typical Value = true. Default: false */ + CIMPP::Boolean uelin; + + /** \brief Minimum exciter voltage output(V). Typical Value = 0. Default: nullptr */ + CIMPP::PU vemin; + + /** \brief Maximum voltage regulator output (V). Typical Value = 2.7. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -0.9. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEST1A.cpp b/CGMES_2.4.15_16FEB2016/ExcIEEEST1A.cpp index 2b5f7af83..17ef6c50f 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEST1A.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEST1A.cpp @@ -8,30 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "ExcIEEEST1AUELselectorKind.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEST1A::ExcIEEEST1A() {}; -ExcIEEEST1A::~ExcIEEEST1A() {}; +ExcIEEEST1A::ExcIEEEST1A() {} +ExcIEEEST1A::~ExcIEEEST1A() {} static const std::list PossibleProfilesForClass = { @@ -76,259 +57,276 @@ ExcIEEEST1A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEST1A_ilr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_ilr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ilr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_klr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_klr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->klr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_pssin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_pssin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pssin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_tb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_tb1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_tc1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_tc1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_uelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_vimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEST1A_ilr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ilr; if (!buffer.str().empty()) @@ -342,7 +340,8 @@ bool get_ExcIEEEST1A_ilr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -356,7 +355,8 @@ bool get_ExcIEEEST1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST1A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -370,7 +370,8 @@ bool get_ExcIEEEST1A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -384,7 +385,8 @@ bool get_ExcIEEEST1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST1A_klr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->klr; if (!buffer.str().empty()) @@ -398,7 +400,8 @@ bool get_ExcIEEEST1A_klr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST1A_pssin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pssin; if (!buffer.str().empty()) @@ -412,7 +415,8 @@ bool get_ExcIEEEST1A_pssin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -426,7 +430,8 @@ bool get_ExcIEEEST1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -440,7 +445,8 @@ bool get_ExcIEEEST1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST1A_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb1; if (!buffer.str().empty()) @@ -454,7 +460,8 @@ bool get_ExcIEEEST1A_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -468,7 +475,8 @@ bool get_ExcIEEEST1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST1A_tc1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc1; if (!buffer.str().empty()) @@ -482,7 +490,8 @@ bool get_ExcIEEEST1A_tc1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -494,9 +503,25 @@ bool get_ExcIEEEST1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } +bool get_ExcIEEEST1A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->uelin; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_ExcIEEEST1A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -510,7 +535,8 @@ bool get_ExcIEEEST1A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST1A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -524,7 +550,8 @@ bool get_ExcIEEEST1A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST1A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -538,7 +565,8 @@ bool get_ExcIEEEST1A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST1A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimin; if (!buffer.str().empty()) @@ -552,7 +580,8 @@ bool get_ExcIEEEST1A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -566,7 +595,8 @@ bool get_ExcIEEEST1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -578,22 +608,6 @@ bool get_ExcIEEEST1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - -bool get_ExcIEEEST1A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->uelin; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char ExcIEEEST1A::debugName[] = "ExcIEEEST1A"; const char* ExcIEEEST1A::debugString() const { @@ -602,30 +616,30 @@ const char* ExcIEEEST1A::debugString() const void ExcIEEEST1A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A"), &ExcIEEEST1A_factory)); + factory_map.emplace("cim:ExcIEEEST1A", &ExcIEEEST1A_factory); } void ExcIEEEST1A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.ilr"), &assign_ExcIEEEST1A_ilr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.ka"), &assign_ExcIEEEST1A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.kc"), &assign_ExcIEEEST1A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.kf"), &assign_ExcIEEEST1A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.klr"), &assign_ExcIEEEST1A_klr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.pssin"), &assign_ExcIEEEST1A_pssin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.ta"), &assign_ExcIEEEST1A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.tb"), &assign_ExcIEEEST1A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.tb1"), &assign_ExcIEEEST1A_tb1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.tc"), &assign_ExcIEEEST1A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.tc1"), &assign_ExcIEEEST1A_tc1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.tf"), &assign_ExcIEEEST1A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.uelin"), &assign_ExcIEEEST1A_uelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.vamax"), &assign_ExcIEEEST1A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.vamin"), &assign_ExcIEEEST1A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.vimax"), &assign_ExcIEEEST1A_vimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.vimin"), &assign_ExcIEEEST1A_vimin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.vrmax"), &assign_ExcIEEEST1A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.vrmin"), &assign_ExcIEEEST1A_vrmin)); + assign_map.emplace("cim:ExcIEEEST1A.ilr", &assign_ExcIEEEST1A_ilr); + assign_map.emplace("cim:ExcIEEEST1A.ka", &assign_ExcIEEEST1A_ka); + assign_map.emplace("cim:ExcIEEEST1A.kc", &assign_ExcIEEEST1A_kc); + assign_map.emplace("cim:ExcIEEEST1A.kf", &assign_ExcIEEEST1A_kf); + assign_map.emplace("cim:ExcIEEEST1A.klr", &assign_ExcIEEEST1A_klr); + assign_map.emplace("cim:ExcIEEEST1A.pssin", &assign_ExcIEEEST1A_pssin); + assign_map.emplace("cim:ExcIEEEST1A.ta", &assign_ExcIEEEST1A_ta); + assign_map.emplace("cim:ExcIEEEST1A.tb", &assign_ExcIEEEST1A_tb); + assign_map.emplace("cim:ExcIEEEST1A.tb1", &assign_ExcIEEEST1A_tb1); + assign_map.emplace("cim:ExcIEEEST1A.tc", &assign_ExcIEEEST1A_tc); + assign_map.emplace("cim:ExcIEEEST1A.tc1", &assign_ExcIEEEST1A_tc1); + assign_map.emplace("cim:ExcIEEEST1A.tf", &assign_ExcIEEEST1A_tf); + assign_map.emplace("cim:ExcIEEEST1A.uelin", &assign_ExcIEEEST1A_uelin); + assign_map.emplace("cim:ExcIEEEST1A.vamax", &assign_ExcIEEEST1A_vamax); + assign_map.emplace("cim:ExcIEEEST1A.vamin", &assign_ExcIEEEST1A_vamin); + assign_map.emplace("cim:ExcIEEEST1A.vimax", &assign_ExcIEEEST1A_vimax); + assign_map.emplace("cim:ExcIEEEST1A.vimin", &assign_ExcIEEEST1A_vimin); + assign_map.emplace("cim:ExcIEEEST1A.vrmax", &assign_ExcIEEEST1A_vrmax); + assign_map.emplace("cim:ExcIEEEST1A.vrmin", &assign_ExcIEEEST1A_vrmin); } void ExcIEEEST1A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEST1A.hpp b/CGMES_2.4.15_16FEB2016/ExcIEEEST1A.hpp index 76c53769f..66d916386 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEST1A.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEST1A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type ST1A model. This model represents systems in which excitation power is supplied through a transformer from the generator terminals (or the unit's auxiliary bus) and is regulated by a controlled rectifier. The maximum exciter voltage available from such systems is directly related to the generator terminal voltage. Reference: IEEE Standard 421.5-2005 Section 7.1. - */ + /** \brief The class represents IEEE Std 421.5-2005 type ST1A model. This model represents systems in which excitation power is supplied through a transformer from the generator terminals (or the unit's auxiliary bus) and is regulated by a controlled rectifier. The maximum exciter voltage available from such systems is directly related to the generator terminal voltage. Reference: IEEE Standard 421.5-2005 Section 7.1. */ class ExcIEEEST1A : public ExcitationSystemDynamics { public: @@ -30,25 +28,62 @@ namespace CIMPP ExcIEEEST1A(); ~ExcIEEEST1A() override; - CIMPP::PU ilr; /* Exciter output current limit reference (I). Typical Value = 0. Default: nullptr */ - CIMPP::PU ka; /* Voltage regulator gain (K). Typical Value = 190. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.08. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU klr; /* Exciter output current limiter gain (K). Typical Value = 0. Default: nullptr */ - CIMPP::Boolean pssin; /* Selector of the Power System Stabilizer (PSS) input (PSSin). true = PSS input (Vs) added to error signal false = PSS input (Vs) added to voltage regulator output. Typical Value = true. Default: false */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (T). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds tb1; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tc1; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::ExcIEEEST1AUELselectorKind uelin; /* Selector of the connection of the UEL input (UELin). Typical Value = ignoreUELsignal. Default: 0 */ - CIMPP::PU vamax; /* Maximum voltage regulator output (V). Typical Value = 14.5. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (V). Typical Value = -14.5. Default: nullptr */ - CIMPP::PU vimax; /* Maximum voltage regulator input limit (V). Typical Value = 999. Default: nullptr */ - CIMPP::PU vimin; /* Minimum voltage regulator input limit (V). Typical Value = -999. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator outputs (V). Typical Value = 7.8. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator outputs (V). Typical Value = -6.7. Default: nullptr */ + /** \brief Exciter output current limit reference (I). Typical Value = 0. Default: nullptr */ + CIMPP::PU ilr; + + /** \brief Voltage regulator gain (K). Typical Value = 190. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.08. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Excitation control system stabilizer gains (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Exciter output current limiter gain (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU klr; + + /** \brief Selector of the Power System Stabilizer (PSS) input (PSSin). true = PSS input (Vs) added to error signal false = PSS input (Vs) added to voltage regulator output. Typical Value = true. Default: false */ + CIMPP::Boolean pssin; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (T). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb1; + + /** \brief Voltage regulator time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc1; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Selector of the connection of the UEL input (UELin). Typical Value = ignoreUELsignal. Default: 0 */ + CIMPP::ExcIEEEST1AUELselectorKind uelin; + + /** \brief Maximum voltage regulator output (V). Typical Value = 14.5. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -14.5. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Maximum voltage regulator input limit (V). Typical Value = 999. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Minimum voltage regulator input limit (V). Typical Value = -999. Default: nullptr */ + CIMPP::PU vimin; + + /** \brief Maximum voltage regulator outputs (V). Typical Value = 7.8. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator outputs (V). Typical Value = -6.7. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEST1AUELselectorKind.cpp b/CGMES_2.4.15_16FEB2016/ExcIEEEST1AUELselectorKind.cpp index cac712136..bdc148294 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEST1AUELselectorKind.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEST1AUELselectorKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "ExcIEEEST1AUELselectorKind") + if (EnumSymbol.substr(0, pos) != "ExcIEEEST1AUELselectorKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,22 +50,22 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "ignoreUELsignal") + if (EnumSymbol == "ignoreUELsignal") { rop = ExcIEEEST1AUELselectorKind::ignoreUELsignal; return lop; } - if(EnumSymbol == "inputHVgateVoltageOutput") + if (EnumSymbol == "inputHVgateVoltageOutput") { rop = ExcIEEEST1AUELselectorKind::inputHVgateVoltageOutput; return lop; } - if(EnumSymbol == "inputHVgateErrorSignal") + if (EnumSymbol == "inputHVgateErrorSignal") { rop = ExcIEEEST1AUELselectorKind::inputHVgateErrorSignal; return lop; } - if(EnumSymbol == "inputAddedToErrorSignal") + if (EnumSymbol == "inputAddedToErrorSignal") { rop = ExcIEEEST1AUELselectorKind::inputAddedToErrorSignal; return lop; diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEST1AUELselectorKind.hpp b/CGMES_2.4.15_16FEB2016/ExcIEEEST1AUELselectorKind.hpp index 62cd07318..395d11a91 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEST1AUELselectorKind.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEST1AUELselectorKind.hpp @@ -9,29 +9,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of connection for the UEL input used in ExcIEEEST1A. - */ + /** \brief Type of connection for the UEL input used in ExcIEEEST1A. */ class ExcIEEEST1AUELselectorKind { public: enum ExcIEEEST1AUELselectorKind_ENUM { - /** - * Ignore UEL signal. - */ + /** Ignore UEL signal. */ ignoreUELsignal, - /** - * UEL input HV gate with voltage regulator output. - */ + /** UEL input HV gate with voltage regulator output. */ inputHVgateVoltageOutput, - /** - * UEL input HV gate with error signal. - */ + /** UEL input HV gate with error signal. */ inputHVgateErrorSignal, - /** - * UEL input added to error signal. - */ + /** UEL input added to error signal. */ inputAddedToErrorSignal, }; diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEST2A.cpp b/CGMES_2.4.15_16FEB2016/ExcIEEEST2A.cpp index aed479c9d..0d80e5ac3 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEST2A.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEST2A.cpp @@ -8,24 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEST2A::ExcIEEEST2A() {}; -ExcIEEEST2A::~ExcIEEEST2A() {}; +ExcIEEEST2A::ExcIEEEST2A() {} +ExcIEEEST2A::~ExcIEEEST2A() {} static const std::list PossibleProfilesForClass = { @@ -64,181 +51,192 @@ ExcIEEEST2A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEST2A_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_efdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_uelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEST2A_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmax; if (!buffer.str().empty()) @@ -252,7 +250,8 @@ bool get_ExcIEEEST2A_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEST2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -266,7 +265,8 @@ bool get_ExcIEEEST2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST2A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -280,7 +280,8 @@ bool get_ExcIEEEST2A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -294,7 +295,8 @@ bool get_ExcIEEEST2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -308,7 +310,8 @@ bool get_ExcIEEEST2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST2A_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -322,7 +325,8 @@ bool get_ExcIEEEST2A_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST2A_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -336,7 +340,8 @@ bool get_ExcIEEEST2A_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -350,7 +355,8 @@ bool get_ExcIEEEST2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -364,7 +370,8 @@ bool get_ExcIEEEST2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -378,7 +385,8 @@ bool get_ExcIEEEST2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST2A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uelin; if (!buffer.str().empty()) @@ -392,7 +400,8 @@ bool get_ExcIEEEST2A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -406,7 +415,8 @@ bool get_ExcIEEEST2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -418,8 +428,6 @@ bool get_ExcIEEEST2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEST2A::debugName[] = "ExcIEEEST2A"; const char* ExcIEEEST2A::debugString() const { @@ -428,24 +436,24 @@ const char* ExcIEEEST2A::debugString() const void ExcIEEEST2A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A"), &ExcIEEEST2A_factory)); + factory_map.emplace("cim:ExcIEEEST2A", &ExcIEEEST2A_factory); } void ExcIEEEST2A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.efdmax"), &assign_ExcIEEEST2A_efdmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.ka"), &assign_ExcIEEEST2A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.kc"), &assign_ExcIEEEST2A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.ke"), &assign_ExcIEEEST2A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.kf"), &assign_ExcIEEEST2A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.ki"), &assign_ExcIEEEST2A_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.kp"), &assign_ExcIEEEST2A_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.ta"), &assign_ExcIEEEST2A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.te"), &assign_ExcIEEEST2A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.tf"), &assign_ExcIEEEST2A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.uelin"), &assign_ExcIEEEST2A_uelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.vrmax"), &assign_ExcIEEEST2A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.vrmin"), &assign_ExcIEEEST2A_vrmin)); + assign_map.emplace("cim:ExcIEEEST2A.efdmax", &assign_ExcIEEEST2A_efdmax); + assign_map.emplace("cim:ExcIEEEST2A.ka", &assign_ExcIEEEST2A_ka); + assign_map.emplace("cim:ExcIEEEST2A.kc", &assign_ExcIEEEST2A_kc); + assign_map.emplace("cim:ExcIEEEST2A.ke", &assign_ExcIEEEST2A_ke); + assign_map.emplace("cim:ExcIEEEST2A.kf", &assign_ExcIEEEST2A_kf); + assign_map.emplace("cim:ExcIEEEST2A.ki", &assign_ExcIEEEST2A_ki); + assign_map.emplace("cim:ExcIEEEST2A.kp", &assign_ExcIEEEST2A_kp); + assign_map.emplace("cim:ExcIEEEST2A.ta", &assign_ExcIEEEST2A_ta); + assign_map.emplace("cim:ExcIEEEST2A.te", &assign_ExcIEEEST2A_te); + assign_map.emplace("cim:ExcIEEEST2A.tf", &assign_ExcIEEEST2A_tf); + assign_map.emplace("cim:ExcIEEEST2A.uelin", &assign_ExcIEEEST2A_uelin); + assign_map.emplace("cim:ExcIEEEST2A.vrmax", &assign_ExcIEEEST2A_vrmax); + assign_map.emplace("cim:ExcIEEEST2A.vrmin", &assign_ExcIEEEST2A_vrmin); } void ExcIEEEST2A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEST2A.hpp b/CGMES_2.4.15_16FEB2016/ExcIEEEST2A.hpp index c6419e711..14b7fc4ac 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEST2A.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEST2A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type ST2A model. Some static systems utilize both current and voltage sources (generator terminal quantities) to comprise the power source. The regulator controls the exciter output through controlled saturation of the power transformer components. These compound-source rectifier excitation systems are designated Type ST2A and are represented by ExcIEEEST2A. Reference: IEEE Standard 421.5-2005 Section 7.2. - */ + /** \brief The class represents IEEE Std 421.5-2005 type ST2A model. Some static systems utilize both current and voltage sources (generator terminal quantities) to comprise the power source. The regulator controls the exciter output through controlled saturation of the power transformer components. These compound-source rectifier excitation systems are designated Type ST2A and are represented by ExcIEEEST2A. Reference: IEEE Standard 421.5-2005 Section 7.2. */ class ExcIEEEST2A : public ExcitationSystemDynamics { public: @@ -29,19 +27,44 @@ namespace CIMPP ExcIEEEST2A(); ~ExcIEEEST2A() override; - CIMPP::PU efdmax; /* Maximum field voltage (E). Typical Value = 99. Default: nullptr */ - CIMPP::PU ka; /* Voltage regulator gain (K). Typical Value = 120. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (K). Typical Value = 1.82. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (K). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU ki; /* Potential circuit gain coefficient (K). Typical Value = 8. Default: nullptr */ - CIMPP::PU kp; /* Potential circuit gain coefficient (K). Typical Value = 4.88. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0.15. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::Boolean uelin; /* UEL input (UELin). true = HV gate false = add to error signal. Typical Value = true. Default: false */ - CIMPP::PU vrmax; /* Maximum voltage regulator outputs (V). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator outputs (V). Typical Value = 0. Default: nullptr */ + /** \brief Maximum field voltage (E). Typical Value = 99. Default: nullptr */ + CIMPP::PU efdmax; + + /** \brief Voltage regulator gain (K). Typical Value = 120. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (K). Typical Value = 1.82. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (K). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Potential circuit gain coefficient (K). Typical Value = 8. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Potential circuit gain coefficient (K). Typical Value = 4.88. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Voltage regulator time constant (T). Typical Value = 0.15. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief UEL input (UELin). true = HV gate false = add to error signal. Typical Value = true. Default: false */ + CIMPP::Boolean uelin; + + /** \brief Maximum voltage regulator outputs (V). Typical Value = 1. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator outputs (V). Typical Value = 0. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEST3A.cpp b/CGMES_2.4.15_16FEB2016/ExcIEEEST3A.cpp index 46dcb0087..143a70444 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEST3A.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEST3A.cpp @@ -8,31 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "AngleDegrees.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEST3A::ExcIEEEST3A() {}; -ExcIEEEST3A::~ExcIEEEST3A() {}; +ExcIEEEST3A::ExcIEEEST3A() {} +ExcIEEEST3A::~ExcIEEEST3A() {} static const std::list PossibleProfilesForClass = { @@ -78,272 +58,290 @@ ExcIEEEST3A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEST3A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_km(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_km(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->km; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_thetap(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_thetap(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->thetap; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_tm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_tm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_vbmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_vbmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vbmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_vgmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_vgmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vgmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_vimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_vmmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_vmmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_vmmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_vmmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_xl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_xl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEST3A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -357,7 +355,8 @@ bool get_ExcIEEEST3A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -371,7 +370,8 @@ bool get_ExcIEEEST3A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -385,7 +385,8 @@ bool get_ExcIEEEST3A_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -399,7 +400,8 @@ bool get_ExcIEEEST3A_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_km(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->km; if (!buffer.str().empty()) @@ -413,7 +415,8 @@ bool get_ExcIEEEST3A_km(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -427,7 +430,8 @@ bool get_ExcIEEEST3A_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -441,7 +445,8 @@ bool get_ExcIEEEST3A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -455,7 +460,8 @@ bool get_ExcIEEEST3A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -469,7 +475,8 @@ bool get_ExcIEEEST3A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_thetap(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thetap; if (!buffer.str().empty()) @@ -483,7 +490,8 @@ bool get_ExcIEEEST3A_thetap(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEST3A_tm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tm; if (!buffer.str().empty()) @@ -497,7 +505,8 @@ bool get_ExcIEEEST3A_tm(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vbmax; if (!buffer.str().empty()) @@ -511,7 +520,8 @@ bool get_ExcIEEEST3A_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST3A_vgmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vgmax; if (!buffer.str().empty()) @@ -525,7 +535,8 @@ bool get_ExcIEEEST3A_vgmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST3A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -539,7 +550,8 @@ bool get_ExcIEEEST3A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST3A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimin; if (!buffer.str().empty()) @@ -553,7 +565,8 @@ bool get_ExcIEEEST3A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST3A_vmmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmmax; if (!buffer.str().empty()) @@ -567,7 +580,8 @@ bool get_ExcIEEEST3A_vmmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST3A_vmmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmmin; if (!buffer.str().empty()) @@ -581,7 +595,8 @@ bool get_ExcIEEEST3A_vmmin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST3A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -595,7 +610,8 @@ bool get_ExcIEEEST3A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST3A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -609,7 +625,8 @@ bool get_ExcIEEEST3A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST3A_xl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xl; if (!buffer.str().empty()) @@ -621,8 +638,6 @@ bool get_ExcIEEEST3A_xl(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char ExcIEEEST3A::debugName[] = "ExcIEEEST3A"; const char* ExcIEEEST3A::debugString() const { @@ -631,31 +646,31 @@ const char* ExcIEEEST3A::debugString() const void ExcIEEEST3A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A"), &ExcIEEEST3A_factory)); + factory_map.emplace("cim:ExcIEEEST3A", &ExcIEEEST3A_factory); } void ExcIEEEST3A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.ka"), &assign_ExcIEEEST3A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.kc"), &assign_ExcIEEEST3A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.kg"), &assign_ExcIEEEST3A_kg)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.ki"), &assign_ExcIEEEST3A_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.km"), &assign_ExcIEEEST3A_km)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.kp"), &assign_ExcIEEEST3A_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.ta"), &assign_ExcIEEEST3A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.tb"), &assign_ExcIEEEST3A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.tc"), &assign_ExcIEEEST3A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.thetap"), &assign_ExcIEEEST3A_thetap)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.tm"), &assign_ExcIEEEST3A_tm)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.vbmax"), &assign_ExcIEEEST3A_vbmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.vgmax"), &assign_ExcIEEEST3A_vgmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.vimax"), &assign_ExcIEEEST3A_vimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.vimin"), &assign_ExcIEEEST3A_vimin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.vmmax"), &assign_ExcIEEEST3A_vmmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.vmmin"), &assign_ExcIEEEST3A_vmmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.vrmax"), &assign_ExcIEEEST3A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.vrmin"), &assign_ExcIEEEST3A_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.xl"), &assign_ExcIEEEST3A_xl)); + assign_map.emplace("cim:ExcIEEEST3A.ka", &assign_ExcIEEEST3A_ka); + assign_map.emplace("cim:ExcIEEEST3A.kc", &assign_ExcIEEEST3A_kc); + assign_map.emplace("cim:ExcIEEEST3A.kg", &assign_ExcIEEEST3A_kg); + assign_map.emplace("cim:ExcIEEEST3A.ki", &assign_ExcIEEEST3A_ki); + assign_map.emplace("cim:ExcIEEEST3A.km", &assign_ExcIEEEST3A_km); + assign_map.emplace("cim:ExcIEEEST3A.kp", &assign_ExcIEEEST3A_kp); + assign_map.emplace("cim:ExcIEEEST3A.ta", &assign_ExcIEEEST3A_ta); + assign_map.emplace("cim:ExcIEEEST3A.tb", &assign_ExcIEEEST3A_tb); + assign_map.emplace("cim:ExcIEEEST3A.tc", &assign_ExcIEEEST3A_tc); + assign_map.emplace("cim:ExcIEEEST3A.thetap", &assign_ExcIEEEST3A_thetap); + assign_map.emplace("cim:ExcIEEEST3A.tm", &assign_ExcIEEEST3A_tm); + assign_map.emplace("cim:ExcIEEEST3A.vbmax", &assign_ExcIEEEST3A_vbmax); + assign_map.emplace("cim:ExcIEEEST3A.vgmax", &assign_ExcIEEEST3A_vgmax); + assign_map.emplace("cim:ExcIEEEST3A.vimax", &assign_ExcIEEEST3A_vimax); + assign_map.emplace("cim:ExcIEEEST3A.vimin", &assign_ExcIEEEST3A_vimin); + assign_map.emplace("cim:ExcIEEEST3A.vmmax", &assign_ExcIEEEST3A_vmmax); + assign_map.emplace("cim:ExcIEEEST3A.vmmin", &assign_ExcIEEEST3A_vmmin); + assign_map.emplace("cim:ExcIEEEST3A.vrmax", &assign_ExcIEEEST3A_vrmax); + assign_map.emplace("cim:ExcIEEEST3A.vrmin", &assign_ExcIEEEST3A_vrmin); + assign_map.emplace("cim:ExcIEEEST3A.xl", &assign_ExcIEEEST3A_xl); } void ExcIEEEST3A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEST3A.hpp b/CGMES_2.4.15_16FEB2016/ExcIEEEST3A.hpp index ead8111ca..e2f7c6f05 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEST3A.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEST3A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type ST3A model. Some static systems utilize a field voltage control loop to linearize the exciter control characteristic. This also makes the output independent of supply source variations until supply limitations are reached. These systems utilize a variety of controlled-rectifier designs: full thyristor complements or hybrid bridges in either series or shunt configurations. The power source may consist of only a potential source, either fed from the machine terminals or from internal windings. Some designs may have compound power sources utilizing both machine potential and current. These power sources are represented as phasor combinations of machine terminal current and voltage and are accommodated by suitable parameters in model Type ST3A which is represented by ExcIEEEST3A. Reference: IEEE Standard 421.5-2005 Section 7.3. - */ + /** \brief The class represents IEEE Std 421.5-2005 type ST3A model. Some static systems utilize a field voltage control loop to linearize the exciter control characteristic. This also makes the output independent of supply source variations until supply limitations are reached. These systems utilize a variety of controlled-rectifier designs: full thyristor complements or hybrid bridges in either series or shunt configurations. The power source may consist of only a potential source, either fed from the machine terminals or from internal windings. Some designs may have compound power sources utilizing both machine potential and current. These power sources are represented as phasor combinations of machine terminal current and voltage and are accommodated by suitable parameters in model Type ST3A which is represented by ExcIEEEST3A. Reference: IEEE Standard 421.5-2005 Section 7.3. */ class ExcIEEEST3A : public ExcitationSystemDynamics { public: @@ -29,26 +27,65 @@ namespace CIMPP ExcIEEEST3A(); ~ExcIEEEST3A() override; - CIMPP::PU ka; /* Voltage regulator gain (K). This is parameter K in the IEEE Std. Typical Value = 200. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU kg; /* Feedback gain constant of the inner loop field regulator (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU ki; /* Potential circuit gain coefficient (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU km; /* Forward gain constant of the inner loop field regulator (K). Typical Value = 7.93. Default: nullptr */ - CIMPP::PU kp; /* Potential circuit gain coefficient (K). Typical Value = 6.15. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (T). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::AngleDegrees thetap; /* Potential circuit phase angle (thetap). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tm; /* Forward time constant of inner loop field regulator (T). Typical Value = 0.4. Default: nullptr */ - CIMPP::PU vbmax; /* Maximum excitation voltage (V). Typical Value = 6.9. Default: nullptr */ - CIMPP::PU vgmax; /* Maximum inner loop feedback voltage (V). Typical Value = 5.8. Default: nullptr */ - CIMPP::PU vimax; /* Maximum voltage regulator input limit (V). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU vimin; /* Minimum voltage regulator input limit (V). Typical Value = -0.2. Default: nullptr */ - CIMPP::PU vmmax; /* Maximum inner loop output (V). Typical Value = 1. Default: nullptr */ - CIMPP::PU vmmin; /* Minimum inner loop output (V). Typical Value = 0. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 10. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = -10. Default: nullptr */ - CIMPP::PU xl; /* Reactance associated with potential source (X). Typical Value = 0.081. Default: nullptr */ + /** \brief Voltage regulator gain (K). This is parameter K in the IEEE Std. Typical Value = 200. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Feedback gain constant of the inner loop field regulator (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Potential circuit gain coefficient (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Forward gain constant of the inner loop field regulator (K). Typical Value = 7.93. Default: nullptr */ + CIMPP::PU km; + + /** \brief Potential circuit gain coefficient (K). Typical Value = 6.15. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (T). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Potential circuit phase angle (thetap). Typical Value = 0. Default: nullptr */ + CIMPP::AngleDegrees thetap; + + /** \brief Forward time constant of inner loop field regulator (T). Typical Value = 0.4. Default: nullptr */ + CIMPP::Seconds tm; + + /** \brief Maximum excitation voltage (V). Typical Value = 6.9. Default: nullptr */ + CIMPP::PU vbmax; + + /** \brief Maximum inner loop feedback voltage (V). Typical Value = 5.8. Default: nullptr */ + CIMPP::PU vgmax; + + /** \brief Maximum voltage regulator input limit (V). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Minimum voltage regulator input limit (V). Typical Value = -0.2. Default: nullptr */ + CIMPP::PU vimin; + + /** \brief Maximum inner loop output (V). Typical Value = 1. Default: nullptr */ + CIMPP::PU vmmax; + + /** \brief Minimum inner loop output (V). Typical Value = 0. Default: nullptr */ + CIMPP::PU vmmin; + + /** \brief Maximum voltage regulator output (V). Typical Value = 10. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -10. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief Reactance associated with potential source (X). Typical Value = 0.081. Default: nullptr */ + CIMPP::PU xl; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEST4B.cpp b/CGMES_2.4.15_16FEB2016/ExcIEEEST4B.cpp index 007525a0f..9912a54a6 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEST4B.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEST4B.cpp @@ -8,27 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "AngleDegrees.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEST4B::ExcIEEEST4B() {}; -ExcIEEEST4B::~ExcIEEEST4B() {}; +ExcIEEEST4B::ExcIEEEST4B() {} +ExcIEEEST4B::~ExcIEEEST4B() {} static const std::list PossibleProfilesForClass = { @@ -70,220 +54,234 @@ ExcIEEEST4B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEST4B_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_kim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_kim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_kir(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_kir(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kir; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_kpm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_kpm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_kpr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_kpr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_thetap(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_thetap(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->thetap; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_vbmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_vbmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vbmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_vmmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_vmmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_vmmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_vmmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_xl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_xl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEST4B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -297,7 +295,8 @@ bool get_ExcIEEEST4B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST4B_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -311,7 +310,8 @@ bool get_ExcIEEEST4B_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST4B_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -325,7 +325,8 @@ bool get_ExcIEEEST4B_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST4B_kim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kim; if (!buffer.str().empty()) @@ -339,7 +340,8 @@ bool get_ExcIEEEST4B_kim(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST4B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kir; if (!buffer.str().empty()) @@ -353,7 +355,8 @@ bool get_ExcIEEEST4B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST4B_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -367,7 +370,8 @@ bool get_ExcIEEEST4B_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST4B_kpm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpm; if (!buffer.str().empty()) @@ -381,7 +385,8 @@ bool get_ExcIEEEST4B_kpm(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST4B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpr; if (!buffer.str().empty()) @@ -395,7 +400,8 @@ bool get_ExcIEEEST4B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST4B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -409,7 +415,8 @@ bool get_ExcIEEEST4B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST4B_thetap(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thetap; if (!buffer.str().empty()) @@ -423,7 +430,8 @@ bool get_ExcIEEEST4B_thetap(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEST4B_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vbmax; if (!buffer.str().empty()) @@ -437,7 +445,8 @@ bool get_ExcIEEEST4B_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST4B_vmmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmmax; if (!buffer.str().empty()) @@ -451,7 +460,8 @@ bool get_ExcIEEEST4B_vmmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST4B_vmmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmmin; if (!buffer.str().empty()) @@ -465,7 +475,8 @@ bool get_ExcIEEEST4B_vmmin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST4B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -479,7 +490,8 @@ bool get_ExcIEEEST4B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST4B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -493,7 +505,8 @@ bool get_ExcIEEEST4B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST4B_xl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xl; if (!buffer.str().empty()) @@ -505,8 +518,6 @@ bool get_ExcIEEEST4B_xl(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char ExcIEEEST4B::debugName[] = "ExcIEEEST4B"; const char* ExcIEEEST4B::debugString() const { @@ -515,27 +526,27 @@ const char* ExcIEEEST4B::debugString() const void ExcIEEEST4B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B"), &ExcIEEEST4B_factory)); + factory_map.emplace("cim:ExcIEEEST4B", &ExcIEEEST4B_factory); } void ExcIEEEST4B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.kc"), &assign_ExcIEEEST4B_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.kg"), &assign_ExcIEEEST4B_kg)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.ki"), &assign_ExcIEEEST4B_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.kim"), &assign_ExcIEEEST4B_kim)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.kir"), &assign_ExcIEEEST4B_kir)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.kp"), &assign_ExcIEEEST4B_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.kpm"), &assign_ExcIEEEST4B_kpm)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.kpr"), &assign_ExcIEEEST4B_kpr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.ta"), &assign_ExcIEEEST4B_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.thetap"), &assign_ExcIEEEST4B_thetap)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.vbmax"), &assign_ExcIEEEST4B_vbmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.vmmax"), &assign_ExcIEEEST4B_vmmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.vmmin"), &assign_ExcIEEEST4B_vmmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.vrmax"), &assign_ExcIEEEST4B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.vrmin"), &assign_ExcIEEEST4B_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.xl"), &assign_ExcIEEEST4B_xl)); + assign_map.emplace("cim:ExcIEEEST4B.kc", &assign_ExcIEEEST4B_kc); + assign_map.emplace("cim:ExcIEEEST4B.kg", &assign_ExcIEEEST4B_kg); + assign_map.emplace("cim:ExcIEEEST4B.ki", &assign_ExcIEEEST4B_ki); + assign_map.emplace("cim:ExcIEEEST4B.kim", &assign_ExcIEEEST4B_kim); + assign_map.emplace("cim:ExcIEEEST4B.kir", &assign_ExcIEEEST4B_kir); + assign_map.emplace("cim:ExcIEEEST4B.kp", &assign_ExcIEEEST4B_kp); + assign_map.emplace("cim:ExcIEEEST4B.kpm", &assign_ExcIEEEST4B_kpm); + assign_map.emplace("cim:ExcIEEEST4B.kpr", &assign_ExcIEEEST4B_kpr); + assign_map.emplace("cim:ExcIEEEST4B.ta", &assign_ExcIEEEST4B_ta); + assign_map.emplace("cim:ExcIEEEST4B.thetap", &assign_ExcIEEEST4B_thetap); + assign_map.emplace("cim:ExcIEEEST4B.vbmax", &assign_ExcIEEEST4B_vbmax); + assign_map.emplace("cim:ExcIEEEST4B.vmmax", &assign_ExcIEEEST4B_vmmax); + assign_map.emplace("cim:ExcIEEEST4B.vmmin", &assign_ExcIEEEST4B_vmmin); + assign_map.emplace("cim:ExcIEEEST4B.vrmax", &assign_ExcIEEEST4B_vrmax); + assign_map.emplace("cim:ExcIEEEST4B.vrmin", &assign_ExcIEEEST4B_vrmin); + assign_map.emplace("cim:ExcIEEEST4B.xl", &assign_ExcIEEEST4B_xl); } void ExcIEEEST4B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEST4B.hpp b/CGMES_2.4.15_16FEB2016/ExcIEEEST4B.hpp index 87751775d..b3ac3afe3 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEST4B.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEST4B.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type ST4B model. This model is a variation of the Type ST3A model, with a proportional plus integral (PI) regulator block replacing the lag-lead regulator characteristic that is in the ST3A model. Both potential and compound source rectifier excitation systems are modeled. The PI regulator blocks have non-windup limits that are represented. The voltage regulator of this model is typically implemented digitally. Reference: IEEE Standard 421.5-2005 Section 7.4. - */ + /** \brief The class represents IEEE Std 421.5-2005 type ST4B model. This model is a variation of the Type ST3A model, with a proportional plus integral (PI) regulator block replacing the lag-lead regulator characteristic that is in the ST3A model. Both potential and compound source rectifier excitation systems are modeled. The PI regulator blocks have non-windup limits that are represented. The voltage regulator of this model is typically implemented digitally. Reference: IEEE Standard 421.5-2005 Section 7.4. */ class ExcIEEEST4B : public ExcitationSystemDynamics { public: @@ -29,22 +27,53 @@ namespace CIMPP ExcIEEEST4B(); ~ExcIEEEST4B() override; - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.113. Default: nullptr */ - CIMPP::PU kg; /* Feedback gain constant of the inner loop field regulator (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU ki; /* Potential circuit gain coefficient (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU kim; /* Voltage regulator integral gain output (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU kir; /* Voltage regulator integral gain (K). Typical Value = 10.75. Default: nullptr */ - CIMPP::PU kp; /* Potential circuit gain coefficient (K). Typical Value = 9.3. Default: nullptr */ - CIMPP::PU kpm; /* Voltage regulator proportional gain output (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kpr; /* Voltage regulator proportional gain (K). Typical Value = 10.75. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0.02. Default: nullptr */ - CIMPP::AngleDegrees thetap; /* Potential circuit phase angle (thetap). Typical Value = 0. Default: nullptr */ - CIMPP::PU vbmax; /* Maximum excitation voltage (V). Typical Value = 11.63. Default: nullptr */ - CIMPP::PU vmmax; /* Maximum inner loop output (V). Typical Value = 99. Default: nullptr */ - CIMPP::PU vmmin; /* Minimum inner loop output (V). Typical Value = -99. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = -0.87. Default: nullptr */ - CIMPP::PU xl; /* Reactance associated with potential source (X). Typical Value = 0.124. Default: nullptr */ + /** \brief Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.113. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Feedback gain constant of the inner loop field regulator (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Potential circuit gain coefficient (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Voltage regulator integral gain output (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU kim; + + /** \brief Voltage regulator integral gain (K). Typical Value = 10.75. Default: nullptr */ + CIMPP::PU kir; + + /** \brief Potential circuit gain coefficient (K). Typical Value = 9.3. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Voltage regulator proportional gain output (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU kpm; + + /** \brief Voltage regulator proportional gain (K). Typical Value = 10.75. Default: nullptr */ + CIMPP::PU kpr; + + /** \brief Voltage regulator time constant (T). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Potential circuit phase angle (thetap). Typical Value = 0. Default: nullptr */ + CIMPP::AngleDegrees thetap; + + /** \brief Maximum excitation voltage (V). Typical Value = 11.63. Default: nullptr */ + CIMPP::PU vbmax; + + /** \brief Maximum inner loop output (V). Typical Value = 99. Default: nullptr */ + CIMPP::PU vmmax; + + /** \brief Minimum inner loop output (V). Typical Value = -99. Default: nullptr */ + CIMPP::PU vmmin; + + /** \brief Maximum voltage regulator output (V). Typical Value = 1. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -0.87. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief Reactance associated with potential source (X). Typical Value = 0.124. Default: nullptr */ + CIMPP::PU xl; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEST5B.cpp b/CGMES_2.4.15_16FEB2016/ExcIEEEST5B.cpp index 4312484ee..49f99553d 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEST5B.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEST5B.cpp @@ -8,28 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEST5B::ExcIEEEST5B() {}; -ExcIEEEST5B::~ExcIEEEST5B() {}; +ExcIEEEST5B::ExcIEEEST5B() {} +ExcIEEEST5B::~ExcIEEEST5B() {} static const std::list PossibleProfilesForClass = { @@ -72,233 +55,248 @@ ExcIEEEST5B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEST5B_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_kr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_kr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tb1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tb2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tb2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tc1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tc1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tc2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tc2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tob1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tob1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tob1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tob2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tob2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tob2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_toc1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_toc1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->toc1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_toc2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_toc2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->toc2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tub1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tub1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tub1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tub2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tub2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tub2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tuc1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tuc1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tuc1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tuc2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tuc2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tuc2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEST5B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -312,7 +310,8 @@ bool get_ExcIEEEST5B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST5B_kr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kr; if (!buffer.str().empty()) @@ -326,7 +325,8 @@ bool get_ExcIEEEST5B_kr(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST5B_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -340,7 +340,8 @@ bool get_ExcIEEEST5B_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST5B_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb1; if (!buffer.str().empty()) @@ -354,7 +355,8 @@ bool get_ExcIEEEST5B_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST5B_tb2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb2; if (!buffer.str().empty()) @@ -368,7 +370,8 @@ bool get_ExcIEEEST5B_tb2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST5B_tc1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc1; if (!buffer.str().empty()) @@ -382,7 +385,8 @@ bool get_ExcIEEEST5B_tc1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST5B_tc2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc2; if (!buffer.str().empty()) @@ -396,7 +400,8 @@ bool get_ExcIEEEST5B_tc2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST5B_tob1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tob1; if (!buffer.str().empty()) @@ -410,7 +415,8 @@ bool get_ExcIEEEST5B_tob1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEST5B_tob2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tob2; if (!buffer.str().empty()) @@ -424,7 +430,8 @@ bool get_ExcIEEEST5B_tob2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEST5B_toc1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->toc1; if (!buffer.str().empty()) @@ -438,7 +445,8 @@ bool get_ExcIEEEST5B_toc1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEST5B_toc2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->toc2; if (!buffer.str().empty()) @@ -452,7 +460,8 @@ bool get_ExcIEEEST5B_toc2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEST5B_tub1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tub1; if (!buffer.str().empty()) @@ -466,7 +475,8 @@ bool get_ExcIEEEST5B_tub1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEST5B_tub2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tub2; if (!buffer.str().empty()) @@ -480,7 +490,8 @@ bool get_ExcIEEEST5B_tub2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEST5B_tuc1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tuc1; if (!buffer.str().empty()) @@ -494,7 +505,8 @@ bool get_ExcIEEEST5B_tuc1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEST5B_tuc2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tuc2; if (!buffer.str().empty()) @@ -508,7 +520,8 @@ bool get_ExcIEEEST5B_tuc2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEST5B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -522,7 +535,8 @@ bool get_ExcIEEEST5B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST5B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -534,8 +548,6 @@ bool get_ExcIEEEST5B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEST5B::debugName[] = "ExcIEEEST5B"; const char* ExcIEEEST5B::debugString() const { @@ -544,28 +556,28 @@ const char* ExcIEEEST5B::debugString() const void ExcIEEEST5B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B"), &ExcIEEEST5B_factory)); + factory_map.emplace("cim:ExcIEEEST5B", &ExcIEEEST5B_factory); } void ExcIEEEST5B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.kc"), &assign_ExcIEEEST5B_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.kr"), &assign_ExcIEEEST5B_kr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.t1"), &assign_ExcIEEEST5B_t1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tb1"), &assign_ExcIEEEST5B_tb1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tb2"), &assign_ExcIEEEST5B_tb2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tc1"), &assign_ExcIEEEST5B_tc1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tc2"), &assign_ExcIEEEST5B_tc2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tob1"), &assign_ExcIEEEST5B_tob1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tob2"), &assign_ExcIEEEST5B_tob2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.toc1"), &assign_ExcIEEEST5B_toc1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.toc2"), &assign_ExcIEEEST5B_toc2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tub1"), &assign_ExcIEEEST5B_tub1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tub2"), &assign_ExcIEEEST5B_tub2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tuc1"), &assign_ExcIEEEST5B_tuc1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tuc2"), &assign_ExcIEEEST5B_tuc2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.vrmax"), &assign_ExcIEEEST5B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.vrmin"), &assign_ExcIEEEST5B_vrmin)); + assign_map.emplace("cim:ExcIEEEST5B.kc", &assign_ExcIEEEST5B_kc); + assign_map.emplace("cim:ExcIEEEST5B.kr", &assign_ExcIEEEST5B_kr); + assign_map.emplace("cim:ExcIEEEST5B.t1", &assign_ExcIEEEST5B_t1); + assign_map.emplace("cim:ExcIEEEST5B.tb1", &assign_ExcIEEEST5B_tb1); + assign_map.emplace("cim:ExcIEEEST5B.tb2", &assign_ExcIEEEST5B_tb2); + assign_map.emplace("cim:ExcIEEEST5B.tc1", &assign_ExcIEEEST5B_tc1); + assign_map.emplace("cim:ExcIEEEST5B.tc2", &assign_ExcIEEEST5B_tc2); + assign_map.emplace("cim:ExcIEEEST5B.tob1", &assign_ExcIEEEST5B_tob1); + assign_map.emplace("cim:ExcIEEEST5B.tob2", &assign_ExcIEEEST5B_tob2); + assign_map.emplace("cim:ExcIEEEST5B.toc1", &assign_ExcIEEEST5B_toc1); + assign_map.emplace("cim:ExcIEEEST5B.toc2", &assign_ExcIEEEST5B_toc2); + assign_map.emplace("cim:ExcIEEEST5B.tub1", &assign_ExcIEEEST5B_tub1); + assign_map.emplace("cim:ExcIEEEST5B.tub2", &assign_ExcIEEEST5B_tub2); + assign_map.emplace("cim:ExcIEEEST5B.tuc1", &assign_ExcIEEEST5B_tuc1); + assign_map.emplace("cim:ExcIEEEST5B.tuc2", &assign_ExcIEEEST5B_tuc2); + assign_map.emplace("cim:ExcIEEEST5B.vrmax", &assign_ExcIEEEST5B_vrmax); + assign_map.emplace("cim:ExcIEEEST5B.vrmin", &assign_ExcIEEEST5B_vrmin); } void ExcIEEEST5B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEST5B.hpp b/CGMES_2.4.15_16FEB2016/ExcIEEEST5B.hpp index 4bf4388bc..c099e151a 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEST5B.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEST5B.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type ST5B model. The Type ST5B excitation system is a variation of the Type ST1A model, with alternative overexcitation and underexcitation inputs and additional limits. Reference: IEEE Standard 421.5-2005 Section 7.5. Note: the block diagram in the IEEE 421.5 standard has input signal Vc and does not indicate the summation point with Vref. The implementation of the ExcIEEEST5B shall consider summation point with Vref. - */ + /** \brief The class represents IEEE Std 421.5-2005 type ST5B model. The Type ST5B excitation system is a variation of the Type ST1A model, with alternative overexcitation and underexcitation inputs and additional limits. Reference: IEEE Standard 421.5-2005 Section 7.5. Note: the block diagram in the IEEE 421.5 standard has input signal Vc and does not indicate the summation point with Vref. The implementation of the ExcIEEEST5B shall consider summation point with Vref. */ class ExcIEEEST5B : public ExcitationSystemDynamics { public: @@ -28,23 +26,56 @@ namespace CIMPP ExcIEEEST5B(); ~ExcIEEEST5B() override; - CIMPP::PU kc; /* Rectifier regulation factor (K). Typical Value = 0.004. Default: nullptr */ - CIMPP::PU kr; /* Regulator gain (K). Typical Value = 200. Default: nullptr */ - CIMPP::Seconds t1; /* Firing circuit time constant (T1). Typical Value = 0.004. Default: nullptr */ - CIMPP::Seconds tb1; /* Regulator lag time constant (T). Typical Value = 6. Default: nullptr */ - CIMPP::Seconds tb2; /* Regulator lag time constant (T). Typical Value = 0.01. Default: nullptr */ - CIMPP::Seconds tc1; /* Regulator lead time constant (T). Typical Value = 0.8. Default: nullptr */ - CIMPP::Seconds tc2; /* Regulator lead time constant (T). Typical Value = 0.08. Default: nullptr */ - CIMPP::Seconds tob1; /* OEL lag time constant (T). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds tob2; /* OEL lag time constant (T). Typical Value = 0.08. Default: nullptr */ - CIMPP::Seconds toc1; /* OEL lead time constant (T). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds toc2; /* OEL lead time constant (T). Typical Value = 0.08. Default: nullptr */ - CIMPP::Seconds tub1; /* UEL lag time constant (T). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds tub2; /* UEL lag time constant (T). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds tuc1; /* UEL lead time constant (T). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds tuc2; /* UEL lead time constant (T). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 5. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = -4. Default: nullptr */ + /** \brief Rectifier regulation factor (K). Typical Value = 0.004. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Regulator gain (K). Typical Value = 200. Default: nullptr */ + CIMPP::PU kr; + + /** \brief Firing circuit time constant (T1). Typical Value = 0.004. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Regulator lag time constant (T). Typical Value = 6. Default: nullptr */ + CIMPP::Seconds tb1; + + /** \brief Regulator lag time constant (T). Typical Value = 0.01. Default: nullptr */ + CIMPP::Seconds tb2; + + /** \brief Regulator lead time constant (T). Typical Value = 0.8. Default: nullptr */ + CIMPP::Seconds tc1; + + /** \brief Regulator lead time constant (T). Typical Value = 0.08. Default: nullptr */ + CIMPP::Seconds tc2; + + /** \brief OEL lag time constant (T). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds tob1; + + /** \brief OEL lag time constant (T). Typical Value = 0.08. Default: nullptr */ + CIMPP::Seconds tob2; + + /** \brief OEL lead time constant (T). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds toc1; + + /** \brief OEL lead time constant (T). Typical Value = 0.08. Default: nullptr */ + CIMPP::Seconds toc2; + + /** \brief UEL lag time constant (T). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds tub1; + + /** \brief UEL lag time constant (T). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds tub2; + + /** \brief UEL lead time constant (T). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds tuc1; + + /** \brief UEL lead time constant (T). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tuc2; + + /** \brief Maximum voltage regulator output (V). Typical Value = 5. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -4. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEST6B.cpp b/CGMES_2.4.15_16FEB2016/ExcIEEEST6B.cpp index f14ebf34b..46aac194f 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEST6B.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEST6B.cpp @@ -8,25 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ExcST6BOELselectorKind.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEST6B::ExcIEEEST6B() {}; -ExcIEEEST6B::~ExcIEEEST6B() {}; +ExcIEEEST6B::ExcIEEEST6B() {} +ExcIEEEST6B::~ExcIEEEST6B() {} static const std::list PossibleProfilesForClass = { @@ -66,194 +52,206 @@ ExcIEEEST6B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEST6B_ilr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_ilr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ilr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_kci(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_kci(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kci; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_kff(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_kff(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kff; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_kia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_kia(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kia; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_klr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_klr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->klr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_km(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_km(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->km; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_kpa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_kpa(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpa; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_oelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_oelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->oelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEST6B_ilr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ilr; if (!buffer.str().empty()) @@ -267,7 +265,8 @@ bool get_ExcIEEEST6B_ilr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST6B_kci(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kci; if (!buffer.str().empty()) @@ -281,7 +280,8 @@ bool get_ExcIEEEST6B_kci(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST6B_kff(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kff; if (!buffer.str().empty()) @@ -295,7 +295,8 @@ bool get_ExcIEEEST6B_kff(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST6B_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -309,7 +310,8 @@ bool get_ExcIEEEST6B_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST6B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kia; if (!buffer.str().empty()) @@ -323,7 +325,8 @@ bool get_ExcIEEEST6B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST6B_klr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->klr; if (!buffer.str().empty()) @@ -337,7 +340,8 @@ bool get_ExcIEEEST6B_klr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST6B_km(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->km; if (!buffer.str().empty()) @@ -351,7 +355,8 @@ bool get_ExcIEEEST6B_km(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST6B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpa; if (!buffer.str().empty()) @@ -363,11 +368,12 @@ bool get_ExcIEEEST6B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } -bool get_ExcIEEEST6B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST6B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tg; + buffer << element->oelin; if (!buffer.str().empty()) { return true; @@ -377,11 +383,12 @@ bool get_ExcIEEEST6B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } -bool get_ExcIEEEST6B_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST6B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vamax; + buffer << element->tg; if (!buffer.str().empty()) { return true; @@ -391,11 +398,12 @@ bool get_ExcIEEEST6B_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } -bool get_ExcIEEEST6B_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST6B_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vamin; + buffer << element->vamax; if (!buffer.str().empty()) { return true; @@ -405,11 +413,12 @@ bool get_ExcIEEEST6B_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } -bool get_ExcIEEEST6B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST6B_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vrmax; + buffer << element->vamin; if (!buffer.str().empty()) { return true; @@ -419,11 +428,12 @@ bool get_ExcIEEEST6B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } -bool get_ExcIEEEST6B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST6B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vrmin; + buffer << element->vrmax; if (!buffer.str().empty()) { return true; @@ -433,13 +443,12 @@ bool get_ExcIEEEST6B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - -bool get_ExcIEEEST6B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST6B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->oelin; + buffer << element->vrmin; if (!buffer.str().empty()) { return true; @@ -457,25 +466,25 @@ const char* ExcIEEEST6B::debugString() const void ExcIEEEST6B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B"), &ExcIEEEST6B_factory)); + factory_map.emplace("cim:ExcIEEEST6B", &ExcIEEEST6B_factory); } void ExcIEEEST6B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.ilr"), &assign_ExcIEEEST6B_ilr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.kci"), &assign_ExcIEEEST6B_kci)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.kff"), &assign_ExcIEEEST6B_kff)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.kg"), &assign_ExcIEEEST6B_kg)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.kia"), &assign_ExcIEEEST6B_kia)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.klr"), &assign_ExcIEEEST6B_klr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.km"), &assign_ExcIEEEST6B_km)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.kpa"), &assign_ExcIEEEST6B_kpa)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.oelin"), &assign_ExcIEEEST6B_oelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.tg"), &assign_ExcIEEEST6B_tg)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.vamax"), &assign_ExcIEEEST6B_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.vamin"), &assign_ExcIEEEST6B_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.vrmax"), &assign_ExcIEEEST6B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.vrmin"), &assign_ExcIEEEST6B_vrmin)); + assign_map.emplace("cim:ExcIEEEST6B.ilr", &assign_ExcIEEEST6B_ilr); + assign_map.emplace("cim:ExcIEEEST6B.kci", &assign_ExcIEEEST6B_kci); + assign_map.emplace("cim:ExcIEEEST6B.kff", &assign_ExcIEEEST6B_kff); + assign_map.emplace("cim:ExcIEEEST6B.kg", &assign_ExcIEEEST6B_kg); + assign_map.emplace("cim:ExcIEEEST6B.kia", &assign_ExcIEEEST6B_kia); + assign_map.emplace("cim:ExcIEEEST6B.klr", &assign_ExcIEEEST6B_klr); + assign_map.emplace("cim:ExcIEEEST6B.km", &assign_ExcIEEEST6B_km); + assign_map.emplace("cim:ExcIEEEST6B.kpa", &assign_ExcIEEEST6B_kpa); + assign_map.emplace("cim:ExcIEEEST6B.oelin", &assign_ExcIEEEST6B_oelin); + assign_map.emplace("cim:ExcIEEEST6B.tg", &assign_ExcIEEEST6B_tg); + assign_map.emplace("cim:ExcIEEEST6B.vamax", &assign_ExcIEEEST6B_vamax); + assign_map.emplace("cim:ExcIEEEST6B.vamin", &assign_ExcIEEEST6B_vamin); + assign_map.emplace("cim:ExcIEEEST6B.vrmax", &assign_ExcIEEEST6B_vrmax); + assign_map.emplace("cim:ExcIEEEST6B.vrmin", &assign_ExcIEEEST6B_vrmin); } void ExcIEEEST6B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEST6B.hpp b/CGMES_2.4.15_16FEB2016/ExcIEEEST6B.hpp index a44a3f043..554b6609b 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEST6B.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEST6B.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type ST6B model. This model consists of a PI voltage regulator with an inner loop field voltage regulator and pre-control. The field voltage regulator implements a proportional control. The pre-control and the delay in the feedback circuit increase the dynamic response. Reference: IEEE Standard 421.5-2005 Section 7.6. - */ + /** \brief The class represents IEEE Std 421.5-2005 type ST6B model. This model consists of a PI voltage regulator with an inner loop field voltage regulator and pre-control. The field voltage regulator implements a proportional control. The pre-control and the delay in the feedback circuit increase the dynamic response. Reference: IEEE Standard 421.5-2005 Section 7.6. */ class ExcIEEEST6B : public ExcitationSystemDynamics { public: @@ -29,20 +27,47 @@ namespace CIMPP ExcIEEEST6B(); ~ExcIEEEST6B() override; - CIMPP::PU ilr; /* Exciter output current limit reference (I). Typical Value = 4.164. Default: nullptr */ - CIMPP::PU kci; /* Exciter output current limit adjustment (K). Typical Value = 1.0577. Default: nullptr */ - CIMPP::PU kff; /* Pre-control gain constant of the inner loop field regulator (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kg; /* Feedback gain constant of the inner loop field regulator (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kia; /* Voltage regulator integral gain (K). Typical Value = 45.094. Default: nullptr */ - CIMPP::PU klr; /* Exciter output current limiter gain (K). Typical Value = 17.33. Default: nullptr */ - CIMPP::PU km; /* Forward gain constant of the inner loop field regulator (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kpa; /* Voltage regulator proportional gain (K). Typical Value = 18.038. Default: nullptr */ - CIMPP::ExcST6BOELselectorKind oelin; /* OEL input selector (OELin). Typical Value = noOELinput. Default: 0 */ - CIMPP::Seconds tg; /* Feedback time constant of inner loop field voltage regulator (T). Typical Value = 0.02. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (V). Typical Value = 4.81. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (V). Typical Value = -3.85. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 4.81. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = -3.85. Default: nullptr */ + /** \brief Exciter output current limit reference (I). Typical Value = 4.164. Default: nullptr */ + CIMPP::PU ilr; + + /** \brief Exciter output current limit adjustment (K). Typical Value = 1.0577. Default: nullptr */ + CIMPP::PU kci; + + /** \brief Pre-control gain constant of the inner loop field regulator (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU kff; + + /** \brief Feedback gain constant of the inner loop field regulator (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Voltage regulator integral gain (K). Typical Value = 45.094. Default: nullptr */ + CIMPP::PU kia; + + /** \brief Exciter output current limiter gain (K). Typical Value = 17.33. Default: nullptr */ + CIMPP::PU klr; + + /** \brief Forward gain constant of the inner loop field regulator (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU km; + + /** \brief Voltage regulator proportional gain (K). Typical Value = 18.038. Default: nullptr */ + CIMPP::PU kpa; + + /** \brief OEL input selector (OELin). Typical Value = noOELinput. Default: 0 */ + CIMPP::ExcST6BOELselectorKind oelin; + + /** \brief Feedback time constant of inner loop field voltage regulator (T). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Maximum voltage regulator output (V). Typical Value = 4.81. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -3.85. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Maximum voltage regulator output (V). Typical Value = 4.81. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -3.85. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEST7B.cpp b/CGMES_2.4.15_16FEB2016/ExcIEEEST7B.cpp index aad96d91b..20513a7f9 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEST7B.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEST7B.cpp @@ -8,26 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ExcST7BOELselectorKind.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "ExcST7BUELselectorKind.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEST7B::ExcIEEEST7B() {}; -ExcIEEEST7B::~ExcIEEEST7B() {}; +ExcIEEEST7B::ExcIEEEST7B() {} +ExcIEEEST7B::~ExcIEEEST7B() {} static const std::list PossibleProfilesForClass = { @@ -68,207 +53,220 @@ ExcIEEEST7B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEST7B_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_kh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_kia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_kia(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kia; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_kl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_kl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_kpa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_kpa(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpa; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_oelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_oelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->oelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_tia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_tia(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tia; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_uelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_vmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_vmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEST7B_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh; if (!buffer.str().empty()) @@ -282,7 +280,8 @@ bool get_ExcIEEEST7B_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST7B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kia; if (!buffer.str().empty()) @@ -296,7 +295,8 @@ bool get_ExcIEEEST7B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST7B_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl; if (!buffer.str().empty()) @@ -310,7 +310,8 @@ bool get_ExcIEEEST7B_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST7B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpa; if (!buffer.str().empty()) @@ -322,11 +323,12 @@ bool get_ExcIEEEST7B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } -bool get_ExcIEEEST7B_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tb; + buffer << element->oelin; if (!buffer.str().empty()) { return true; @@ -336,11 +338,12 @@ bool get_ExcIEEEST7B_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } -bool get_ExcIEEEST7B_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tc; + buffer << element->tb; if (!buffer.str().empty()) { return true; @@ -350,11 +353,12 @@ bool get_ExcIEEEST7B_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } -bool get_ExcIEEEST7B_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tf; + buffer << element->tc; if (!buffer.str().empty()) { return true; @@ -364,11 +368,12 @@ bool get_ExcIEEEST7B_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } -bool get_ExcIEEEST7B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tg; + buffer << element->tf; if (!buffer.str().empty()) { return true; @@ -378,11 +383,12 @@ bool get_ExcIEEEST7B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } -bool get_ExcIEEEST7B_tia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tia; + buffer << element->tg; if (!buffer.str().empty()) { return true; @@ -392,11 +398,12 @@ bool get_ExcIEEEST7B_tia(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } -bool get_ExcIEEEST7B_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_tia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vmax; + buffer << element->tia; if (!buffer.str().empty()) { return true; @@ -406,11 +413,12 @@ bool get_ExcIEEEST7B_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } -bool get_ExcIEEEST7B_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vmin; + buffer << element->uelin; if (!buffer.str().empty()) { return true; @@ -420,11 +428,12 @@ bool get_ExcIEEEST7B_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } -bool get_ExcIEEEST7B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vrmax; + buffer << element->vmax; if (!buffer.str().empty()) { return true; @@ -434,11 +443,12 @@ bool get_ExcIEEEST7B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } -bool get_ExcIEEEST7B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vrmin; + buffer << element->vmin; if (!buffer.str().empty()) { return true; @@ -448,13 +458,12 @@ bool get_ExcIEEEST7B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - -bool get_ExcIEEEST7B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->oelin; + buffer << element->vrmax; if (!buffer.str().empty()) { return true; @@ -464,11 +473,12 @@ bool get_ExcIEEEST7B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } -bool get_ExcIEEEST7B_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->uelin; + buffer << element->vrmin; if (!buffer.str().empty()) { return true; @@ -486,26 +496,26 @@ const char* ExcIEEEST7B::debugString() const void ExcIEEEST7B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B"), &ExcIEEEST7B_factory)); + factory_map.emplace("cim:ExcIEEEST7B", &ExcIEEEST7B_factory); } void ExcIEEEST7B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.kh"), &assign_ExcIEEEST7B_kh)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.kia"), &assign_ExcIEEEST7B_kia)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.kl"), &assign_ExcIEEEST7B_kl)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.kpa"), &assign_ExcIEEEST7B_kpa)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.oelin"), &assign_ExcIEEEST7B_oelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.tb"), &assign_ExcIEEEST7B_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.tc"), &assign_ExcIEEEST7B_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.tf"), &assign_ExcIEEEST7B_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.tg"), &assign_ExcIEEEST7B_tg)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.tia"), &assign_ExcIEEEST7B_tia)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.uelin"), &assign_ExcIEEEST7B_uelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.vmax"), &assign_ExcIEEEST7B_vmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.vmin"), &assign_ExcIEEEST7B_vmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.vrmax"), &assign_ExcIEEEST7B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.vrmin"), &assign_ExcIEEEST7B_vrmin)); + assign_map.emplace("cim:ExcIEEEST7B.kh", &assign_ExcIEEEST7B_kh); + assign_map.emplace("cim:ExcIEEEST7B.kia", &assign_ExcIEEEST7B_kia); + assign_map.emplace("cim:ExcIEEEST7B.kl", &assign_ExcIEEEST7B_kl); + assign_map.emplace("cim:ExcIEEEST7B.kpa", &assign_ExcIEEEST7B_kpa); + assign_map.emplace("cim:ExcIEEEST7B.oelin", &assign_ExcIEEEST7B_oelin); + assign_map.emplace("cim:ExcIEEEST7B.tb", &assign_ExcIEEEST7B_tb); + assign_map.emplace("cim:ExcIEEEST7B.tc", &assign_ExcIEEEST7B_tc); + assign_map.emplace("cim:ExcIEEEST7B.tf", &assign_ExcIEEEST7B_tf); + assign_map.emplace("cim:ExcIEEEST7B.tg", &assign_ExcIEEEST7B_tg); + assign_map.emplace("cim:ExcIEEEST7B.tia", &assign_ExcIEEEST7B_tia); + assign_map.emplace("cim:ExcIEEEST7B.uelin", &assign_ExcIEEEST7B_uelin); + assign_map.emplace("cim:ExcIEEEST7B.vmax", &assign_ExcIEEEST7B_vmax); + assign_map.emplace("cim:ExcIEEEST7B.vmin", &assign_ExcIEEEST7B_vmin); + assign_map.emplace("cim:ExcIEEEST7B.vrmax", &assign_ExcIEEEST7B_vrmax); + assign_map.emplace("cim:ExcIEEEST7B.vrmin", &assign_ExcIEEEST7B_vrmin); } void ExcIEEEST7B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcIEEEST7B.hpp b/CGMES_2.4.15_16FEB2016/ExcIEEEST7B.hpp index f38aee3af..d1428a0fe 100644 --- a/CGMES_2.4.15_16FEB2016/ExcIEEEST7B.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcIEEEST7B.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type ST7B model. This model is representative of static potential-source excitation systems. In this system, the AVR consists of a PI voltage regulator. A phase lead-lag filter in series allows introduction of a derivative function, typically used with brushless excitation systems. In that case, the regulator is of the PID type. In addition, the terminal voltage channel includes a phase lead-lag filter. The AVR includes the appropriate inputs on its reference for overexcitation limiter (OEL1), underexcitation limiter (UEL), stator current limiter (SCL), and current compensator (DROOP). All these limitations, when they work at voltage reference level, keep the PSS (VS signal from Type PSS1A, PSS2A, or PSS2B) in operation. However, the UEL limitation can also be transferred to the high value (HV) gate acting on the output signal. In addition, the output signal passes through a low value (LV) gate for a ceiling overexcitation limiter (OEL2). Reference: IEEE Standard 421.5-2005 Section 7.7. - */ + /** \brief The class represents IEEE Std 421.5-2005 type ST7B model. This model is representative of static potential-source excitation systems. In this system, the AVR consists of a PI voltage regulator. A phase lead-lag filter in series allows introduction of a derivative function, typically used with brushless excitation systems. In that case, the regulator is of the PID type. In addition, the terminal voltage channel includes a phase lead-lag filter. The AVR includes the appropriate inputs on its reference for overexcitation limiter (OEL1), underexcitation limiter (UEL), stator current limiter (SCL), and current compensator (DROOP). All these limitations, when they work at voltage reference level, keep the PSS (VS signal from Type PSS1A, PSS2A, or PSS2B) in operation. However, the UEL limitation can also be transferred to the high value (HV) gate acting on the output signal. In addition, the output signal passes through a low value (LV) gate for a ceiling overexcitation limiter (OEL2). Reference: IEEE Standard 421.5-2005 Section 7.7. */ class ExcIEEEST7B : public ExcitationSystemDynamics { public: @@ -30,21 +28,50 @@ namespace CIMPP ExcIEEEST7B(); ~ExcIEEEST7B() override; - CIMPP::PU kh; /* High-value gate feedback gain (K). Typical Value 1. Default: nullptr */ - CIMPP::PU kia; /* Voltage regulator integral gain (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kl; /* Low-value gate feedback gain (K). Typical Value 1. Default: nullptr */ - CIMPP::PU kpa; /* Voltage regulator proportional gain (K). Typical Value = 40. Default: nullptr */ - CIMPP::ExcST7BOELselectorKind oelin; /* OEL input selector (OELin). Typical Value = noOELinput. Default: 0 */ - CIMPP::Seconds tb; /* Regulator lag time constant (T). Typical Value 1. Default: nullptr */ - CIMPP::Seconds tc; /* Regulator lead time constant (T). Typical Value 1. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (T). Typical Value 1. Default: nullptr */ - CIMPP::Seconds tg; /* Feedback time constant of inner loop field voltage regulator (T). Typical Value 1. Default: nullptr */ - CIMPP::Seconds tia; /* Feedback time constant (T). Typical Value = 3. Default: nullptr */ - CIMPP::ExcST7BUELselectorKind uelin; /* UEL input selector (UELin). Typical Value = noUELinput. Default: 0 */ - CIMPP::PU vmax; /* Maximum voltage reference signal (V). Typical Value = 1.1. Default: nullptr */ - CIMPP::PU vmin; /* Minimum voltage reference signal (V). Typical Value = 0.9. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 5. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = -4.5. Default: nullptr */ + /** \brief High-value gate feedback gain (K). Typical Value 1. Default: nullptr */ + CIMPP::PU kh; + + /** \brief Voltage regulator integral gain (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU kia; + + /** \brief Low-value gate feedback gain (K). Typical Value 1. Default: nullptr */ + CIMPP::PU kl; + + /** \brief Voltage regulator proportional gain (K). Typical Value = 40. Default: nullptr */ + CIMPP::PU kpa; + + /** \brief OEL input selector (OELin). Typical Value = noOELinput. Default: 0 */ + CIMPP::ExcST7BOELselectorKind oelin; + + /** \brief Regulator lag time constant (T). Typical Value 1. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Regulator lead time constant (T). Typical Value 1. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Feedback time constant of inner loop field voltage regulator (T). Typical Value 1. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Feedback time constant (T). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds tia; + + /** \brief UEL input selector (UELin). Typical Value = noUELinput. Default: 0 */ + CIMPP::ExcST7BUELselectorKind uelin; + + /** \brief Maximum voltage reference signal (V). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU vmax; + + /** \brief Minimum voltage reference signal (V). Typical Value = 0.9. Default: nullptr */ + CIMPP::PU vmin; + + /** \brief Maximum voltage regulator output (V). Typical Value = 5. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -4.5. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcOEX3T.cpp b/CGMES_2.4.15_16FEB2016/ExcOEX3T.cpp index a3bfdb7a7..3fc422d40 100644 --- a/CGMES_2.4.15_16FEB2016/ExcOEX3T.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcOEX3T.cpp @@ -8,30 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcOEX3T::ExcOEX3T() {}; -ExcOEX3T::~ExcOEX3T() {}; +ExcOEX3T::ExcOEX3T() {} +ExcOEX3T::~ExcOEX3T() {} static const std::list PossibleProfilesForClass = { @@ -76,259 +57,276 @@ ExcOEX3T::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcOEX3T_e1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_e1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_e2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_e2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_see1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_see1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->see1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_see2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_see2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->see2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcOEX3T_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e1; if (!buffer.str().empty()) @@ -342,7 +340,8 @@ bool get_ExcOEX3T_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e2; if (!buffer.str().empty()) @@ -356,7 +355,8 @@ bool get_ExcOEX3T_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -370,7 +370,8 @@ bool get_ExcOEX3T_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -384,7 +385,8 @@ bool get_ExcOEX3T_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -398,7 +400,8 @@ bool get_ExcOEX3T_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -412,7 +415,8 @@ bool get_ExcOEX3T_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -426,7 +430,8 @@ bool get_ExcOEX3T_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_see1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->see1; if (!buffer.str().empty()) @@ -440,7 +445,8 @@ bool get_ExcOEX3T_see1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcOEX3T_see2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->see2; if (!buffer.str().empty()) @@ -454,7 +460,8 @@ bool get_ExcOEX3T_see2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcOEX3T_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -468,7 +475,8 @@ bool get_ExcOEX3T_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -482,7 +490,8 @@ bool get_ExcOEX3T_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -496,7 +505,8 @@ bool get_ExcOEX3T_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -510,7 +520,8 @@ bool get_ExcOEX3T_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -524,7 +535,8 @@ bool get_ExcOEX3T_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -538,7 +550,8 @@ bool get_ExcOEX3T_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -552,7 +565,8 @@ bool get_ExcOEX3T_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -566,7 +580,8 @@ bool get_ExcOEX3T_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -580,7 +595,8 @@ bool get_ExcOEX3T_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcOEX3T_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -592,8 +608,6 @@ bool get_ExcOEX3T_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char ExcOEX3T::debugName[] = "ExcOEX3T"; const char* ExcOEX3T::debugString() const { @@ -602,30 +616,30 @@ const char* ExcOEX3T::debugString() const void ExcOEX3T::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcOEX3T"), &ExcOEX3T_factory)); + factory_map.emplace("cim:ExcOEX3T", &ExcOEX3T_factory); } void ExcOEX3T::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.e1"), &assign_ExcOEX3T_e1)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.e2"), &assign_ExcOEX3T_e2)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.ka"), &assign_ExcOEX3T_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.kc"), &assign_ExcOEX3T_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.kd"), &assign_ExcOEX3T_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.ke"), &assign_ExcOEX3T_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.kf"), &assign_ExcOEX3T_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.see1"), &assign_ExcOEX3T_see1)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.see2"), &assign_ExcOEX3T_see2)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.t1"), &assign_ExcOEX3T_t1)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.t2"), &assign_ExcOEX3T_t2)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.t3"), &assign_ExcOEX3T_t3)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.t4"), &assign_ExcOEX3T_t4)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.t5"), &assign_ExcOEX3T_t5)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.t6"), &assign_ExcOEX3T_t6)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.te"), &assign_ExcOEX3T_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.tf"), &assign_ExcOEX3T_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.vrmax"), &assign_ExcOEX3T_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.vrmin"), &assign_ExcOEX3T_vrmin)); + assign_map.emplace("cim:ExcOEX3T.e1", &assign_ExcOEX3T_e1); + assign_map.emplace("cim:ExcOEX3T.e2", &assign_ExcOEX3T_e2); + assign_map.emplace("cim:ExcOEX3T.ka", &assign_ExcOEX3T_ka); + assign_map.emplace("cim:ExcOEX3T.kc", &assign_ExcOEX3T_kc); + assign_map.emplace("cim:ExcOEX3T.kd", &assign_ExcOEX3T_kd); + assign_map.emplace("cim:ExcOEX3T.ke", &assign_ExcOEX3T_ke); + assign_map.emplace("cim:ExcOEX3T.kf", &assign_ExcOEX3T_kf); + assign_map.emplace("cim:ExcOEX3T.see1", &assign_ExcOEX3T_see1); + assign_map.emplace("cim:ExcOEX3T.see2", &assign_ExcOEX3T_see2); + assign_map.emplace("cim:ExcOEX3T.t1", &assign_ExcOEX3T_t1); + assign_map.emplace("cim:ExcOEX3T.t2", &assign_ExcOEX3T_t2); + assign_map.emplace("cim:ExcOEX3T.t3", &assign_ExcOEX3T_t3); + assign_map.emplace("cim:ExcOEX3T.t4", &assign_ExcOEX3T_t4); + assign_map.emplace("cim:ExcOEX3T.t5", &assign_ExcOEX3T_t5); + assign_map.emplace("cim:ExcOEX3T.t6", &assign_ExcOEX3T_t6); + assign_map.emplace("cim:ExcOEX3T.te", &assign_ExcOEX3T_te); + assign_map.emplace("cim:ExcOEX3T.tf", &assign_ExcOEX3T_tf); + assign_map.emplace("cim:ExcOEX3T.vrmax", &assign_ExcOEX3T_vrmax); + assign_map.emplace("cim:ExcOEX3T.vrmin", &assign_ExcOEX3T_vrmin); } void ExcOEX3T::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcOEX3T.hpp b/CGMES_2.4.15_16FEB2016/ExcOEX3T.hpp index 16ec9cd48..da7bc97eb 100644 --- a/CGMES_2.4.15_16FEB2016/ExcOEX3T.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcOEX3T.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE Type ST1 Excitation System with semi-continuous and acting terminal voltage limiter. - */ + /** \brief Modified IEEE Type ST1 Excitation System with semi-continuous and acting terminal voltage limiter. */ class ExcOEX3T : public ExcitationSystemDynamics { public: @@ -28,25 +26,62 @@ namespace CIMPP ExcOEX3T(); ~ExcOEX3T() override; - CIMPP::PU e1; /* Saturation parameter (E). Default: nullptr */ - CIMPP::PU e2; /* Saturation parameter (E). Default: nullptr */ - CIMPP::PU ka; /* Gain (K). Default: nullptr */ - CIMPP::PU kc; /* Gain (K). Default: nullptr */ - CIMPP::PU kd; /* Gain (K). Default: nullptr */ - CIMPP::PU ke; /* Gain (K). Default: nullptr */ - CIMPP::PU kf; /* Gain (K). Default: nullptr */ - CIMPP::PU see1; /* Saturation parameter (S(E)). Default: nullptr */ - CIMPP::PU see2; /* Saturation parameter (S(E)). Default: nullptr */ - CIMPP::Seconds t1; /* Time constant (T). Default: nullptr */ - CIMPP::Seconds t2; /* Time constant (T). Default: nullptr */ - CIMPP::Seconds t3; /* Time constant (T). Default: nullptr */ - CIMPP::Seconds t4; /* Time constant (T). Default: nullptr */ - CIMPP::Seconds t5; /* Time constant (T). Default: nullptr */ - CIMPP::Seconds t6; /* Time constant (T). Default: nullptr */ - CIMPP::Seconds te; /* Time constant (T). Default: nullptr */ - CIMPP::Seconds tf; /* Time constant (T). Default: nullptr */ - CIMPP::PU vrmax; /* Limiter (V). Default: nullptr */ - CIMPP::PU vrmin; /* Limiter (V). Default: nullptr */ + /** \brief Saturation parameter (E). Default: nullptr */ + CIMPP::PU e1; + + /** \brief Saturation parameter (E). Default: nullptr */ + CIMPP::PU e2; + + /** \brief Gain (K). Default: nullptr */ + CIMPP::PU ka; + + /** \brief Gain (K). Default: nullptr */ + CIMPP::PU kc; + + /** \brief Gain (K). Default: nullptr */ + CIMPP::PU kd; + + /** \brief Gain (K). Default: nullptr */ + CIMPP::PU ke; + + /** \brief Gain (K). Default: nullptr */ + CIMPP::PU kf; + + /** \brief Saturation parameter (S(E)). Default: nullptr */ + CIMPP::PU see1; + + /** \brief Saturation parameter (S(E)). Default: nullptr */ + CIMPP::PU see2; + + /** \brief Time constant (T). Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Time constant (T). Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Time constant (T). Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Time constant (T). Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant (T). Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Time constant (T). Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time constant (T). Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Time constant (T). Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Limiter (V). Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Limiter (V). Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcPIC.cpp b/CGMES_2.4.15_16FEB2016/ExcPIC.cpp index e4c81265d..dbace3479 100644 --- a/CGMES_2.4.15_16FEB2016/ExcPIC.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcPIC.cpp @@ -8,34 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcPIC::ExcPIC() {}; -ExcPIC::~ExcPIC() {}; +ExcPIC::ExcPIC() {} +ExcPIC::~ExcPIC() {} static const std::list PossibleProfilesForClass = { @@ -84,311 +61,332 @@ ExcPIC::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcPIC_e1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_e1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_e2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_e2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_efdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_efdmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_se1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_se1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_se2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_se2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_ta1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_ta1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_ta2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_ta2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_ta3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_ta3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_ta4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_ta4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_tf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_tf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_vr1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_vr1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vr1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_vr2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_vr2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vr2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcPIC_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e1; if (!buffer.str().empty()) @@ -402,7 +400,8 @@ bool get_ExcPIC_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e2; if (!buffer.str().empty()) @@ -416,7 +415,8 @@ bool get_ExcPIC_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmax; if (!buffer.str().empty()) @@ -430,7 +430,8 @@ bool get_ExcPIC_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcPIC_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmin; if (!buffer.str().empty()) @@ -444,7 +445,8 @@ bool get_ExcPIC_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcPIC_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -458,7 +460,8 @@ bool get_ExcPIC_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -472,7 +475,8 @@ bool get_ExcPIC_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -486,7 +490,8 @@ bool get_ExcPIC_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -500,7 +505,8 @@ bool get_ExcPIC_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -514,7 +520,8 @@ bool get_ExcPIC_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -528,7 +535,8 @@ bool get_ExcPIC_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se1; if (!buffer.str().empty()) @@ -542,7 +550,8 @@ bool get_ExcPIC_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se2; if (!buffer.str().empty()) @@ -556,7 +565,8 @@ bool get_ExcPIC_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_ta1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta1; if (!buffer.str().empty()) @@ -570,7 +580,8 @@ bool get_ExcPIC_ta1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_ta2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta2; if (!buffer.str().empty()) @@ -584,7 +595,8 @@ bool get_ExcPIC_ta2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_ta3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta3; if (!buffer.str().empty()) @@ -598,7 +610,8 @@ bool get_ExcPIC_ta3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_ta4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta4; if (!buffer.str().empty()) @@ -612,7 +625,8 @@ bool get_ExcPIC_ta4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -626,7 +640,8 @@ bool get_ExcPIC_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf1; if (!buffer.str().empty()) @@ -640,7 +655,8 @@ bool get_ExcPIC_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf2; if (!buffer.str().empty()) @@ -654,7 +670,8 @@ bool get_ExcPIC_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_vr1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vr1; if (!buffer.str().empty()) @@ -668,7 +685,8 @@ bool get_ExcPIC_vr1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_vr2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vr2; if (!buffer.str().empty()) @@ -682,7 +700,8 @@ bool get_ExcPIC_vr2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -696,7 +715,8 @@ bool get_ExcPIC_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcPIC_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -708,8 +728,6 @@ bool get_ExcPIC_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char ExcPIC::debugName[] = "ExcPIC"; const char* ExcPIC::debugString() const { @@ -718,34 +736,34 @@ const char* ExcPIC::debugString() const void ExcPIC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcPIC"), &ExcPIC_factory)); + factory_map.emplace("cim:ExcPIC", &ExcPIC_factory); } void ExcPIC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.e1"), &assign_ExcPIC_e1)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.e2"), &assign_ExcPIC_e2)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.efdmax"), &assign_ExcPIC_efdmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.efdmin"), &assign_ExcPIC_efdmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.ka"), &assign_ExcPIC_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.kc"), &assign_ExcPIC_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.ke"), &assign_ExcPIC_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.kf"), &assign_ExcPIC_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.ki"), &assign_ExcPIC_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.kp"), &assign_ExcPIC_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.se1"), &assign_ExcPIC_se1)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.se2"), &assign_ExcPIC_se2)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.ta1"), &assign_ExcPIC_ta1)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.ta2"), &assign_ExcPIC_ta2)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.ta3"), &assign_ExcPIC_ta3)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.ta4"), &assign_ExcPIC_ta4)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.te"), &assign_ExcPIC_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.tf1"), &assign_ExcPIC_tf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.tf2"), &assign_ExcPIC_tf2)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.vr1"), &assign_ExcPIC_vr1)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.vr2"), &assign_ExcPIC_vr2)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.vrmax"), &assign_ExcPIC_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.vrmin"), &assign_ExcPIC_vrmin)); + assign_map.emplace("cim:ExcPIC.e1", &assign_ExcPIC_e1); + assign_map.emplace("cim:ExcPIC.e2", &assign_ExcPIC_e2); + assign_map.emplace("cim:ExcPIC.efdmax", &assign_ExcPIC_efdmax); + assign_map.emplace("cim:ExcPIC.efdmin", &assign_ExcPIC_efdmin); + assign_map.emplace("cim:ExcPIC.ka", &assign_ExcPIC_ka); + assign_map.emplace("cim:ExcPIC.kc", &assign_ExcPIC_kc); + assign_map.emplace("cim:ExcPIC.ke", &assign_ExcPIC_ke); + assign_map.emplace("cim:ExcPIC.kf", &assign_ExcPIC_kf); + assign_map.emplace("cim:ExcPIC.ki", &assign_ExcPIC_ki); + assign_map.emplace("cim:ExcPIC.kp", &assign_ExcPIC_kp); + assign_map.emplace("cim:ExcPIC.se1", &assign_ExcPIC_se1); + assign_map.emplace("cim:ExcPIC.se2", &assign_ExcPIC_se2); + assign_map.emplace("cim:ExcPIC.ta1", &assign_ExcPIC_ta1); + assign_map.emplace("cim:ExcPIC.ta2", &assign_ExcPIC_ta2); + assign_map.emplace("cim:ExcPIC.ta3", &assign_ExcPIC_ta3); + assign_map.emplace("cim:ExcPIC.ta4", &assign_ExcPIC_ta4); + assign_map.emplace("cim:ExcPIC.te", &assign_ExcPIC_te); + assign_map.emplace("cim:ExcPIC.tf1", &assign_ExcPIC_tf1); + assign_map.emplace("cim:ExcPIC.tf2", &assign_ExcPIC_tf2); + assign_map.emplace("cim:ExcPIC.vr1", &assign_ExcPIC_vr1); + assign_map.emplace("cim:ExcPIC.vr2", &assign_ExcPIC_vr2); + assign_map.emplace("cim:ExcPIC.vrmax", &assign_ExcPIC_vrmax); + assign_map.emplace("cim:ExcPIC.vrmin", &assign_ExcPIC_vrmin); } void ExcPIC::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcPIC.hpp b/CGMES_2.4.15_16FEB2016/ExcPIC.hpp index f3937ed14..152d86aa7 100644 --- a/CGMES_2.4.15_16FEB2016/ExcPIC.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcPIC.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Proportional/Integral Regulator Excitation System Model. This model can be used to represent excitation systems with a proportional-integral (PI) voltage regulator controller. - */ + /** \brief Proportional/Integral Regulator Excitation System Model. This model can be used to represent excitation systems with a proportional-integral (PI) voltage regulator controller. */ class ExcPIC : public ExcitationSystemDynamics { public: @@ -28,29 +26,74 @@ namespace CIMPP ExcPIC(); ~ExcPIC() override; - CIMPP::PU e1; /* Field voltage value 1 (E1). Typical Value = 0. Default: nullptr */ - CIMPP::PU e2; /* Field voltage value 2 (E2). Typical Value = 0. Default: nullptr */ - CIMPP::PU efdmax; /* Exciter maximum limit (Efdmax). Typical Value = 8. Default: nullptr */ - CIMPP::PU efdmin; /* Exciter minimum limit (Efdmin). Typical Value = -0.87. Default: nullptr */ - CIMPP::PU ka; /* PI controller gain (Ka). Typical Value = 3.15. Default: nullptr */ - CIMPP::PU kc; /* Exciter regulation factor (Kc). Typical Value = 0.08. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant (Ke). Typical Value = 0. Default: nullptr */ - CIMPP::PU kf; /* Rate feedback gain (Kf). Typical Value = 0. Default: nullptr */ - CIMPP::PU ki; /* Current source gain (Ki). Typical Value = 0. Default: nullptr */ - CIMPP::PU kp; /* Potential source gain (Kp). Typical Value = 6.5. Default: nullptr */ - CIMPP::PU se1; /* Saturation factor at E1 (Se1). Typical Value = 0. Default: nullptr */ - CIMPP::PU se2; /* Saturation factor at E2 (Se2). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ta1; /* PI controller time constant (Ta1). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds ta2; /* Voltage regulator time constant (Ta2). Typical Value = 0.01. Default: nullptr */ - CIMPP::Seconds ta3; /* Lead time constant (Ta3). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ta4; /* Lag time constant (Ta4). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant (Te). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tf1; /* Rate feedback time constant (Tf1). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tf2; /* Rate feedback lag time constant (Tf2). Typical Value = 0. Default: nullptr */ - CIMPP::PU vr1; /* PI maximum limit (Vr1). Typical Value = 1. Default: nullptr */ - CIMPP::PU vr2; /* PI minimum limit (Vr2). Typical Value = -0.87. Default: nullptr */ - CIMPP::PU vrmax; /* Voltage regulator maximum limit (Vrmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmin; /* Voltage regulator minimum limit (Vrmin). Typical Value = -0.87. Default: nullptr */ + /** \brief Field voltage value 1 (E1). Typical Value = 0. Default: nullptr */ + CIMPP::PU e1; + + /** \brief Field voltage value 2 (E2). Typical Value = 0. Default: nullptr */ + CIMPP::PU e2; + + /** \brief Exciter maximum limit (Efdmax). Typical Value = 8. Default: nullptr */ + CIMPP::PU efdmax; + + /** \brief Exciter minimum limit (Efdmin). Typical Value = -0.87. Default: nullptr */ + CIMPP::PU efdmin; + + /** \brief PI controller gain (Ka). Typical Value = 3.15. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Exciter regulation factor (Kc). Typical Value = 0.08. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Exciter constant (Ke). Typical Value = 0. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Rate feedback gain (Kf). Typical Value = 0. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Current source gain (Ki). Typical Value = 0. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Potential source gain (Kp). Typical Value = 6.5. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Saturation factor at E1 (Se1). Typical Value = 0. Default: nullptr */ + CIMPP::PU se1; + + /** \brief Saturation factor at E2 (Se2). Typical Value = 0. Default: nullptr */ + CIMPP::PU se2; + + /** \brief PI controller time constant (Ta1). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds ta1; + + /** \brief Voltage regulator time constant (Ta2). Typical Value = 0.01. Default: nullptr */ + CIMPP::Seconds ta2; + + /** \brief Lead time constant (Ta3). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ta3; + + /** \brief Lag time constant (Ta4). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ta4; + + /** \brief Exciter time constant (Te). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Rate feedback time constant (Tf1). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tf1; + + /** \brief Rate feedback lag time constant (Tf2). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tf2; + + /** \brief PI maximum limit (Vr1). Typical Value = 1. Default: nullptr */ + CIMPP::PU vr1; + + /** \brief PI minimum limit (Vr2). Typical Value = -0.87. Default: nullptr */ + CIMPP::PU vr2; + + /** \brief Voltage regulator maximum limit (Vrmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Voltage regulator minimum limit (Vrmin). Typical Value = -0.87. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcREXS.cpp b/CGMES_2.4.15_16FEB2016/ExcREXS.cpp index 8e0575509..7c198209c 100644 --- a/CGMES_2.4.15_16FEB2016/ExcREXS.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcREXS.cpp @@ -8,47 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "ExcREXSFeedbackSignalKind.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcREXS::ExcREXS() {}; -ExcREXS::~ExcREXS() {}; +ExcREXS::ExcREXS() {} +ExcREXS::~ExcREXS() {} static const std::list PossibleProfilesForClass = { @@ -110,480 +74,514 @@ ExcREXS::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcREXS_e1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_e1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_e2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_e2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_fbf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_fbf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fbf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_flimf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_flimf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flimf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kefd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kefd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kefd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kii(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kii(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kii; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kip(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kip; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kvi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kvi(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kvi; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kvp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kvp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kvp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kvphz(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kvphz(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kvphz; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_nvphz(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_nvphz(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nvphz; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_se1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_se1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_se2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_se2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_tb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_tb1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_tb2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_tb2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_tc1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_tc1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_tc2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_tc2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_tf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_tf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_vcmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_vcmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vcmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_vfmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_vfmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_vfmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_vfmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_xc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_xc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcREXS_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e1; if (!buffer.str().empty()) @@ -597,7 +595,8 @@ bool get_ExcREXS_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e2; if (!buffer.str().empty()) @@ -609,9 +608,25 @@ bool get_ExcREXS_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } +bool get_ExcREXS_fbf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->fbf; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_ExcREXS_flimf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flimf; if (!buffer.str().empty()) @@ -625,7 +640,8 @@ bool get_ExcREXS_flimf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcREXS_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -639,7 +655,8 @@ bool get_ExcREXS_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -653,7 +670,8 @@ bool get_ExcREXS_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -667,7 +685,8 @@ bool get_ExcREXS_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_kefd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kefd; if (!buffer.str().empty()) @@ -681,7 +700,8 @@ bool get_ExcREXS_kefd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcREXS_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -695,7 +715,8 @@ bool get_ExcREXS_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh; if (!buffer.str().empty()) @@ -709,7 +730,8 @@ bool get_ExcREXS_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_kii(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kii; if (!buffer.str().empty()) @@ -723,7 +745,8 @@ bool get_ExcREXS_kii(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_kip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kip; if (!buffer.str().empty()) @@ -737,7 +760,8 @@ bool get_ExcREXS_kip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -751,7 +775,8 @@ bool get_ExcREXS_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_kvi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kvi; if (!buffer.str().empty()) @@ -765,7 +790,8 @@ bool get_ExcREXS_kvi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_kvp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kvp; if (!buffer.str().empty()) @@ -779,7 +805,8 @@ bool get_ExcREXS_kvp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_kvphz(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kvphz; if (!buffer.str().empty()) @@ -793,7 +820,8 @@ bool get_ExcREXS_kvphz(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcREXS_nvphz(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nvphz; if (!buffer.str().empty()) @@ -807,7 +835,8 @@ bool get_ExcREXS_nvphz(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcREXS_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se1; if (!buffer.str().empty()) @@ -821,7 +850,8 @@ bool get_ExcREXS_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se2; if (!buffer.str().empty()) @@ -835,7 +865,8 @@ bool get_ExcREXS_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -849,7 +880,8 @@ bool get_ExcREXS_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb1; if (!buffer.str().empty()) @@ -863,7 +895,8 @@ bool get_ExcREXS_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_tb2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb2; if (!buffer.str().empty()) @@ -877,7 +910,8 @@ bool get_ExcREXS_tb2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_tc1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc1; if (!buffer.str().empty()) @@ -891,7 +925,8 @@ bool get_ExcREXS_tc1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_tc2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc2; if (!buffer.str().empty()) @@ -905,7 +940,8 @@ bool get_ExcREXS_tc2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -919,7 +955,8 @@ bool get_ExcREXS_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -933,7 +970,8 @@ bool get_ExcREXS_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf1; if (!buffer.str().empty()) @@ -947,7 +985,8 @@ bool get_ExcREXS_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf2; if (!buffer.str().empty()) @@ -961,7 +1000,8 @@ bool get_ExcREXS_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -975,7 +1015,8 @@ bool get_ExcREXS_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_vcmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vcmax; if (!buffer.str().empty()) @@ -989,7 +1030,8 @@ bool get_ExcREXS_vcmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcREXS_vfmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfmax; if (!buffer.str().empty()) @@ -1003,7 +1045,8 @@ bool get_ExcREXS_vfmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcREXS_vfmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfmin; if (!buffer.str().empty()) @@ -1017,7 +1060,8 @@ bool get_ExcREXS_vfmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcREXS_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -1031,7 +1075,8 @@ bool get_ExcREXS_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcREXS_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -1045,7 +1090,8 @@ bool get_ExcREXS_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcREXS_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -1059,7 +1105,8 @@ bool get_ExcREXS_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcREXS_xc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xc; if (!buffer.str().empty()) @@ -1071,22 +1118,6 @@ bool get_ExcREXS_xc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - -bool get_ExcREXS_fbf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->fbf; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char ExcREXS::debugName[] = "ExcREXS"; const char* ExcREXS::debugString() const { @@ -1095,47 +1126,47 @@ const char* ExcREXS::debugString() const void ExcREXS::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcREXS"), &ExcREXS_factory)); + factory_map.emplace("cim:ExcREXS", &ExcREXS_factory); } void ExcREXS::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.e1"), &assign_ExcREXS_e1)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.e2"), &assign_ExcREXS_e2)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.fbf"), &assign_ExcREXS_fbf)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.flimf"), &assign_ExcREXS_flimf)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kc"), &assign_ExcREXS_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kd"), &assign_ExcREXS_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.ke"), &assign_ExcREXS_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kefd"), &assign_ExcREXS_kefd)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kf"), &assign_ExcREXS_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kh"), &assign_ExcREXS_kh)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kii"), &assign_ExcREXS_kii)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kip"), &assign_ExcREXS_kip)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.ks"), &assign_ExcREXS_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kvi"), &assign_ExcREXS_kvi)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kvp"), &assign_ExcREXS_kvp)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kvphz"), &assign_ExcREXS_kvphz)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.nvphz"), &assign_ExcREXS_nvphz)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.se1"), &assign_ExcREXS_se1)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.se2"), &assign_ExcREXS_se2)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.ta"), &assign_ExcREXS_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.tb1"), &assign_ExcREXS_tb1)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.tb2"), &assign_ExcREXS_tb2)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.tc1"), &assign_ExcREXS_tc1)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.tc2"), &assign_ExcREXS_tc2)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.te"), &assign_ExcREXS_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.tf"), &assign_ExcREXS_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.tf1"), &assign_ExcREXS_tf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.tf2"), &assign_ExcREXS_tf2)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.tp"), &assign_ExcREXS_tp)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.vcmax"), &assign_ExcREXS_vcmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.vfmax"), &assign_ExcREXS_vfmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.vfmin"), &assign_ExcREXS_vfmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.vimax"), &assign_ExcREXS_vimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.vrmax"), &assign_ExcREXS_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.vrmin"), &assign_ExcREXS_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.xc"), &assign_ExcREXS_xc)); + assign_map.emplace("cim:ExcREXS.e1", &assign_ExcREXS_e1); + assign_map.emplace("cim:ExcREXS.e2", &assign_ExcREXS_e2); + assign_map.emplace("cim:ExcREXS.fbf", &assign_ExcREXS_fbf); + assign_map.emplace("cim:ExcREXS.flimf", &assign_ExcREXS_flimf); + assign_map.emplace("cim:ExcREXS.kc", &assign_ExcREXS_kc); + assign_map.emplace("cim:ExcREXS.kd", &assign_ExcREXS_kd); + assign_map.emplace("cim:ExcREXS.ke", &assign_ExcREXS_ke); + assign_map.emplace("cim:ExcREXS.kefd", &assign_ExcREXS_kefd); + assign_map.emplace("cim:ExcREXS.kf", &assign_ExcREXS_kf); + assign_map.emplace("cim:ExcREXS.kh", &assign_ExcREXS_kh); + assign_map.emplace("cim:ExcREXS.kii", &assign_ExcREXS_kii); + assign_map.emplace("cim:ExcREXS.kip", &assign_ExcREXS_kip); + assign_map.emplace("cim:ExcREXS.ks", &assign_ExcREXS_ks); + assign_map.emplace("cim:ExcREXS.kvi", &assign_ExcREXS_kvi); + assign_map.emplace("cim:ExcREXS.kvp", &assign_ExcREXS_kvp); + assign_map.emplace("cim:ExcREXS.kvphz", &assign_ExcREXS_kvphz); + assign_map.emplace("cim:ExcREXS.nvphz", &assign_ExcREXS_nvphz); + assign_map.emplace("cim:ExcREXS.se1", &assign_ExcREXS_se1); + assign_map.emplace("cim:ExcREXS.se2", &assign_ExcREXS_se2); + assign_map.emplace("cim:ExcREXS.ta", &assign_ExcREXS_ta); + assign_map.emplace("cim:ExcREXS.tb1", &assign_ExcREXS_tb1); + assign_map.emplace("cim:ExcREXS.tb2", &assign_ExcREXS_tb2); + assign_map.emplace("cim:ExcREXS.tc1", &assign_ExcREXS_tc1); + assign_map.emplace("cim:ExcREXS.tc2", &assign_ExcREXS_tc2); + assign_map.emplace("cim:ExcREXS.te", &assign_ExcREXS_te); + assign_map.emplace("cim:ExcREXS.tf", &assign_ExcREXS_tf); + assign_map.emplace("cim:ExcREXS.tf1", &assign_ExcREXS_tf1); + assign_map.emplace("cim:ExcREXS.tf2", &assign_ExcREXS_tf2); + assign_map.emplace("cim:ExcREXS.tp", &assign_ExcREXS_tp); + assign_map.emplace("cim:ExcREXS.vcmax", &assign_ExcREXS_vcmax); + assign_map.emplace("cim:ExcREXS.vfmax", &assign_ExcREXS_vfmax); + assign_map.emplace("cim:ExcREXS.vfmin", &assign_ExcREXS_vfmin); + assign_map.emplace("cim:ExcREXS.vimax", &assign_ExcREXS_vimax); + assign_map.emplace("cim:ExcREXS.vrmax", &assign_ExcREXS_vrmax); + assign_map.emplace("cim:ExcREXS.vrmin", &assign_ExcREXS_vrmin); + assign_map.emplace("cim:ExcREXS.xc", &assign_ExcREXS_xc); } void ExcREXS::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcREXS.hpp b/CGMES_2.4.15_16FEB2016/ExcREXS.hpp index 4d9138e12..18cd27ace 100644 --- a/CGMES_2.4.15_16FEB2016/ExcREXS.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcREXS.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - General Purpose Rotating Excitation System Model. This model can be used to represent a wide range of excitation systems whose DC power source is an AC or DC generator. It encompasses IEEE type AC1, AC2, DC1, and DC2 excitation system models. - */ + /** \brief General Purpose Rotating Excitation System Model. This model can be used to represent a wide range of excitation systems whose DC power source is an AC or DC generator. It encompasses IEEE type AC1, AC2, DC1, and DC2 excitation system models. */ class ExcREXS : public ExcitationSystemDynamics { public: @@ -29,42 +27,113 @@ namespace CIMPP ExcREXS(); ~ExcREXS() override; - CIMPP::PU e1; /* Field voltage value 1 (E1). Typical Value = 3. Default: nullptr */ - CIMPP::PU e2; /* Field voltage value 2 (E2). Typical Value = 4. Default: nullptr */ - CIMPP::ExcREXSFeedbackSignalKind fbf; /* Rate feedback signal flag (Fbf). Typical Value = fieldCurrent. Default: 0 */ - CIMPP::PU flimf; /* Limit type flag (Flimf). Typical Value = 0. Default: nullptr */ - CIMPP::PU kc; /* Rectifier regulation factor (Kc). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU kd; /* Exciter regulation factor (Kd). Typical Value = 2. Default: nullptr */ - CIMPP::PU ke; /* Exciter field proportional constant (Ke). Typical Value = 1. Default: nullptr */ - CIMPP::PU kefd; /* Field voltage feedback gain (Kefd). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds kf; /* Rate feedback gain (Kf). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU kh; /* Field voltage controller feedback gain (Kh). Typical Value = 0. Default: nullptr */ - CIMPP::PU kii; /* Field Current Regulator Integral Gain (Kii). Typical Value = 0. Default: nullptr */ - CIMPP::PU kip; /* Field Current Regulator Proportional Gain (Kip). Typical Value = 1. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ - CIMPP::PU kvi; /* Voltage Regulator Integral Gain (Kvi). Typical Value = 0. Default: nullptr */ - CIMPP::PU kvp; /* Voltage Regulator Proportional Gain (Kvp). Typical Value = 2800. Default: nullptr */ - CIMPP::PU kvphz; /* V/Hz limiter gain (Kvphz). Typical Value = 0. Default: nullptr */ - CIMPP::PU nvphz; /* Pickup speed of V/Hz limiter (Nvphz). Typical Value = 0. Default: nullptr */ - CIMPP::PU se1; /* Saturation factor at E1 (Se1). Typical Value = 0.0001. Default: nullptr */ - CIMPP::PU se2; /* Saturation factor at E2 (Se2). Typical Value = 0.001. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage Regulator time constant (Ta). Typical Value = 0.01. Default: nullptr */ - CIMPP::Seconds tb1; /* Lag time constant (Tb1). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tb2; /* Lag time constant (Tb2). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc1; /* Lead time constant (Tc1). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc2; /* Lead time constant (Tc2). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter field time constant (Te). Typical Value = 1.2. Default: nullptr */ - CIMPP::Seconds tf; /* Rate feedback time constant (Tf). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tf1; /* Feedback lead time constant (Tf1). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tf2; /* Feedback lag time constant (Tf2). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tp; /* Field current Bridge time constant (Tp). Typical Value = 0. Default: nullptr */ - CIMPP::PU vcmax; /* Maximum compounding voltage (Vcmax). Typical Value = 0. Default: nullptr */ - CIMPP::PU vfmax; /* Maximum Exciter Field Current (Vfmax). Typical Value = 47. Default: nullptr */ - CIMPP::PU vfmin; /* Minimum Exciter Field Current (Vfmin). Typical Value = -20. Default: nullptr */ - CIMPP::PU vimax; /* Voltage Regulator Input Limit (Vimax). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum controller output (Vrmax). Typical Value = 47. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum controller output (Vrmin). Typical Value = -20. Default: nullptr */ - CIMPP::PU xc; /* Exciter compounding reactance (Xc). Typical Value = 0. Default: nullptr */ + /** \brief Field voltage value 1 (E1). Typical Value = 3. Default: nullptr */ + CIMPP::PU e1; + + /** \brief Field voltage value 2 (E2). Typical Value = 4. Default: nullptr */ + CIMPP::PU e2; + + /** \brief Rate feedback signal flag (Fbf). Typical Value = fieldCurrent. Default: 0 */ + CIMPP::ExcREXSFeedbackSignalKind fbf; + + /** \brief Limit type flag (Flimf). Typical Value = 0. Default: nullptr */ + CIMPP::PU flimf; + + /** \brief Rectifier regulation factor (Kc). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Exciter regulation factor (Kd). Typical Value = 2. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter field proportional constant (Ke). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Field voltage feedback gain (Kefd). Typical Value = 0. Default: nullptr */ + CIMPP::PU kefd; + + /** \brief Rate feedback gain (Kf). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds kf; + + /** \brief Field voltage controller feedback gain (Kh). Typical Value = 0. Default: nullptr */ + CIMPP::PU kh; + + /** \brief Field Current Regulator Integral Gain (Kii). Typical Value = 0. Default: nullptr */ + CIMPP::PU kii; + + /** \brief Field Current Regulator Proportional Gain (Kip). Typical Value = 1. Default: nullptr */ + CIMPP::PU kip; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Voltage Regulator Integral Gain (Kvi). Typical Value = 0. Default: nullptr */ + CIMPP::PU kvi; + + /** \brief Voltage Regulator Proportional Gain (Kvp). Typical Value = 2800. Default: nullptr */ + CIMPP::PU kvp; + + /** \brief V/Hz limiter gain (Kvphz). Typical Value = 0. Default: nullptr */ + CIMPP::PU kvphz; + + /** \brief Pickup speed of V/Hz limiter (Nvphz). Typical Value = 0. Default: nullptr */ + CIMPP::PU nvphz; + + /** \brief Saturation factor at E1 (Se1). Typical Value = 0.0001. Default: nullptr */ + CIMPP::PU se1; + + /** \brief Saturation factor at E2 (Se2). Typical Value = 0.001. Default: nullptr */ + CIMPP::PU se2; + + /** \brief Voltage Regulator time constant (Ta). Typical Value = 0.01. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Lag time constant (Tb1). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb1; + + /** \brief Lag time constant (Tb2). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb2; + + /** \brief Lead time constant (Tc1). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc1; + + /** \brief Lead time constant (Tc2). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc2; + + /** \brief Exciter field time constant (Te). Typical Value = 1.2. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Rate feedback time constant (Tf). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Feedback lead time constant (Tf1). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tf1; + + /** \brief Feedback lag time constant (Tf2). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tf2; + + /** \brief Field current Bridge time constant (Tp). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Maximum compounding voltage (Vcmax). Typical Value = 0. Default: nullptr */ + CIMPP::PU vcmax; + + /** \brief Maximum Exciter Field Current (Vfmax). Typical Value = 47. Default: nullptr */ + CIMPP::PU vfmax; + + /** \brief Minimum Exciter Field Current (Vfmin). Typical Value = -20. Default: nullptr */ + CIMPP::PU vfmin; + + /** \brief Voltage Regulator Input Limit (Vimax). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Maximum controller output (Vrmax). Typical Value = 47. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum controller output (Vrmin). Typical Value = -20. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief Exciter compounding reactance (Xc). Typical Value = 0. Default: nullptr */ + CIMPP::PU xc; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcREXSFeedbackSignalKind.cpp b/CGMES_2.4.15_16FEB2016/ExcREXSFeedbackSignalKind.cpp index de55c6691..e05a1487d 100644 --- a/CGMES_2.4.15_16FEB2016/ExcREXSFeedbackSignalKind.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcREXSFeedbackSignalKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "ExcREXSFeedbackSignalKind") + if (EnumSymbol.substr(0, pos) != "ExcREXSFeedbackSignalKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "fieldVoltage") + if (EnumSymbol == "fieldVoltage") { rop = ExcREXSFeedbackSignalKind::fieldVoltage; return lop; } - if(EnumSymbol == "fieldCurrent") + if (EnumSymbol == "fieldCurrent") { rop = ExcREXSFeedbackSignalKind::fieldCurrent; return lop; } - if(EnumSymbol == "outputVoltage") + if (EnumSymbol == "outputVoltage") { rop = ExcREXSFeedbackSignalKind::outputVoltage; return lop; diff --git a/CGMES_2.4.15_16FEB2016/ExcREXSFeedbackSignalKind.hpp b/CGMES_2.4.15_16FEB2016/ExcREXSFeedbackSignalKind.hpp index 2ca199680..37cf82ab7 100644 --- a/CGMES_2.4.15_16FEB2016/ExcREXSFeedbackSignalKind.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcREXSFeedbackSignalKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of rate feedback signals. - */ + /** \brief Type of rate feedback signals. */ class ExcREXSFeedbackSignalKind { public: enum ExcREXSFeedbackSignalKind_ENUM { - /** - * The voltage regulator output voltage is used. It is the same as exciter field voltage. - */ + /** The voltage regulator output voltage is used. It is the same as exciter field voltage. */ fieldVoltage, - /** - * The exciter field current is used. - */ + /** The exciter field current is used. */ fieldCurrent, - /** - * The output voltage of the exciter is used. - */ + /** The output voltage of the exciter is used. */ outputVoltage, }; diff --git a/CGMES_2.4.15_16FEB2016/ExcSCRX.cpp b/CGMES_2.4.15_16FEB2016/ExcSCRX.cpp index 309ab1b3d..be7b304c3 100644 --- a/CGMES_2.4.15_16FEB2016/ExcSCRX.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcSCRX.cpp @@ -8,19 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -ExcSCRX::ExcSCRX() {}; -ExcSCRX::~ExcSCRX() {}; +ExcSCRX::ExcSCRX() {} +ExcSCRX::~ExcSCRX() {} static const std::list PossibleProfilesForClass = { @@ -54,116 +46,122 @@ ExcSCRX::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcSCRX_cswitch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSCRX_cswitch(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->cswitch; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSCRX_emax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSCRX_emax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->emax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSCRX_emin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSCRX_emin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->emin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSCRX_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSCRX_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSCRX_rcrfd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSCRX_rcrfd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rcrfd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSCRX_tatb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSCRX_tatb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tatb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSCRX_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSCRX_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSCRX_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSCRX_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcSCRX_cswitch(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + const ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->cswitch; if (!buffer.str().empty()) @@ -177,7 +175,8 @@ bool get_ExcSCRX_cswitch(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcSCRX_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + const ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->emax; if (!buffer.str().empty()) @@ -191,7 +190,8 @@ bool get_ExcSCRX_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcSCRX_emin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + const ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->emin; if (!buffer.str().empty()) @@ -205,7 +205,8 @@ bool get_ExcSCRX_emin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcSCRX_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + const ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -219,7 +220,8 @@ bool get_ExcSCRX_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSCRX_rcrfd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + const ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rcrfd; if (!buffer.str().empty()) @@ -233,7 +235,8 @@ bool get_ExcSCRX_rcrfd(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcSCRX_tatb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + const ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tatb; if (!buffer.str().empty()) @@ -247,7 +250,8 @@ bool get_ExcSCRX_tatb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcSCRX_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + const ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -261,7 +265,8 @@ bool get_ExcSCRX_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSCRX_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + const ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -273,8 +278,6 @@ bool get_ExcSCRX_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcSCRX::debugName[] = "ExcSCRX"; const char* ExcSCRX::debugString() const { @@ -283,19 +286,19 @@ const char* ExcSCRX::debugString() const void ExcSCRX::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcSCRX"), &ExcSCRX_factory)); + factory_map.emplace("cim:ExcSCRX", &ExcSCRX_factory); } void ExcSCRX::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcSCRX.cswitch"), &assign_ExcSCRX_cswitch)); - assign_map.insert(std::make_pair(std::string("cim:ExcSCRX.emax"), &assign_ExcSCRX_emax)); - assign_map.insert(std::make_pair(std::string("cim:ExcSCRX.emin"), &assign_ExcSCRX_emin)); - assign_map.insert(std::make_pair(std::string("cim:ExcSCRX.k"), &assign_ExcSCRX_k)); - assign_map.insert(std::make_pair(std::string("cim:ExcSCRX.rcrfd"), &assign_ExcSCRX_rcrfd)); - assign_map.insert(std::make_pair(std::string("cim:ExcSCRX.tatb"), &assign_ExcSCRX_tatb)); - assign_map.insert(std::make_pair(std::string("cim:ExcSCRX.tb"), &assign_ExcSCRX_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcSCRX.te"), &assign_ExcSCRX_te)); + assign_map.emplace("cim:ExcSCRX.cswitch", &assign_ExcSCRX_cswitch); + assign_map.emplace("cim:ExcSCRX.emax", &assign_ExcSCRX_emax); + assign_map.emplace("cim:ExcSCRX.emin", &assign_ExcSCRX_emin); + assign_map.emplace("cim:ExcSCRX.k", &assign_ExcSCRX_k); + assign_map.emplace("cim:ExcSCRX.rcrfd", &assign_ExcSCRX_rcrfd); + assign_map.emplace("cim:ExcSCRX.tatb", &assign_ExcSCRX_tatb); + assign_map.emplace("cim:ExcSCRX.tb", &assign_ExcSCRX_tb); + assign_map.emplace("cim:ExcSCRX.te", &assign_ExcSCRX_te); } void ExcSCRX::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcSCRX.hpp b/CGMES_2.4.15_16FEB2016/ExcSCRX.hpp index b99bbc5b2..5bf3e69b6 100644 --- a/CGMES_2.4.15_16FEB2016/ExcSCRX.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcSCRX.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Simple excitation system model representing generic characteristics of many excitation systems; intended for use where negative field current may be a problem. - */ + /** \brief Simple excitation system model representing generic characteristics of many excitation systems; intended for use where negative field current may be a problem. */ class ExcSCRX : public ExcitationSystemDynamics { public: @@ -30,14 +28,29 @@ namespace CIMPP ExcSCRX(); ~ExcSCRX() override; - CIMPP::Boolean cswitch; /* Power source switch (Cswitch). true = fixed voltage of 1.0 PU false = generator terminal voltage. Default: false */ - CIMPP::PU emax; /* Maximum field voltage output (Emax). Typical Value = 5. Default: nullptr */ - CIMPP::PU emin; /* Minimum field voltage output (Emin). Typical Value = 0. Default: nullptr */ - CIMPP::PU k; /* Gain (K) (>0). Typical Value = 200. Default: nullptr */ - CIMPP::Simple_Float rcrfd; /* Rc/Rfd - ratio of field discharge resistance to field winding resistance (RcRfd). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float tatb; /* Ta/Tb - gain reduction ratio of lag-lead element (TaTb). The parameter Ta is not defined explicitly. Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tb; /* Denominator time constant of lag-lead block (Tb). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds te; /* Time constant of gain block (Te) (>0). Typical Value = 0.02. Default: nullptr */ + /** \brief Power source switch (Cswitch). true = fixed voltage of 1.0 PU false = generator terminal voltage. Default: false */ + CIMPP::Boolean cswitch; + + /** \brief Maximum field voltage output (Emax). Typical Value = 5. Default: nullptr */ + CIMPP::PU emax; + + /** \brief Minimum field voltage output (Emin). Typical Value = 0. Default: nullptr */ + CIMPP::PU emin; + + /** \brief Gain (K) (>0). Typical Value = 200. Default: nullptr */ + CIMPP::PU k; + + /** \brief Rc/Rfd - ratio of field discharge resistance to field winding resistance (RcRfd). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float rcrfd; + + /** \brief Ta/Tb - gain reduction ratio of lag-lead element (TaTb). The parameter Ta is not defined explicitly. Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float tatb; + + /** \brief Denominator time constant of lag-lead block (Tb). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Time constant of gain block (Te) (>0). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds te; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcSEXS.cpp b/CGMES_2.4.15_16FEB2016/ExcSEXS.cpp index 2f9d7141a..e78222ab6 100644 --- a/CGMES_2.4.15_16FEB2016/ExcSEXS.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcSEXS.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -ExcSEXS::ExcSEXS() {}; -ExcSEXS::~ExcSEXS() {}; +ExcSEXS::ExcSEXS() {} +ExcSEXS::~ExcSEXS() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ ExcSEXS::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcSEXS_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_efdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSEXS_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_efdmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSEXS_emax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_emax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->emax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSEXS_emin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_emin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->emin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSEXS_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSEXS_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSEXS_tatb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_tatb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tatb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSEXS_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSEXS_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSEXS_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcSEXS_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmax; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_ExcSEXS_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcSEXS_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmin; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_ExcSEXS_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcSEXS_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->emax; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_ExcSEXS_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcSEXS_emin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->emin; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_ExcSEXS_emin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcSEXS_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_ExcSEXS_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSEXS_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_ExcSEXS_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSEXS_tatb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tatb; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_ExcSEXS_tatb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcSEXS_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_ExcSEXS_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSEXS_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_ExcSEXS_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSEXS_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_ExcSEXS_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcSEXS::debugName[] = "ExcSEXS"; const char* ExcSEXS::debugString() const { @@ -341,21 +346,21 @@ const char* ExcSEXS::debugString() const void ExcSEXS::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcSEXS"), &ExcSEXS_factory)); + factory_map.emplace("cim:ExcSEXS", &ExcSEXS_factory); } void ExcSEXS::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.efdmax"), &assign_ExcSEXS_efdmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.efdmin"), &assign_ExcSEXS_efdmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.emax"), &assign_ExcSEXS_emax)); - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.emin"), &assign_ExcSEXS_emin)); - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.k"), &assign_ExcSEXS_k)); - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.kc"), &assign_ExcSEXS_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.tatb"), &assign_ExcSEXS_tatb)); - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.tb"), &assign_ExcSEXS_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.tc"), &assign_ExcSEXS_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.te"), &assign_ExcSEXS_te)); + assign_map.emplace("cim:ExcSEXS.efdmax", &assign_ExcSEXS_efdmax); + assign_map.emplace("cim:ExcSEXS.efdmin", &assign_ExcSEXS_efdmin); + assign_map.emplace("cim:ExcSEXS.emax", &assign_ExcSEXS_emax); + assign_map.emplace("cim:ExcSEXS.emin", &assign_ExcSEXS_emin); + assign_map.emplace("cim:ExcSEXS.k", &assign_ExcSEXS_k); + assign_map.emplace("cim:ExcSEXS.kc", &assign_ExcSEXS_kc); + assign_map.emplace("cim:ExcSEXS.tatb", &assign_ExcSEXS_tatb); + assign_map.emplace("cim:ExcSEXS.tb", &assign_ExcSEXS_tb); + assign_map.emplace("cim:ExcSEXS.tc", &assign_ExcSEXS_tc); + assign_map.emplace("cim:ExcSEXS.te", &assign_ExcSEXS_te); } void ExcSEXS::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcSEXS.hpp b/CGMES_2.4.15_16FEB2016/ExcSEXS.hpp index fa02fc7ce..2b957eb4e 100644 --- a/CGMES_2.4.15_16FEB2016/ExcSEXS.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcSEXS.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Simplified Excitation System Model. - */ + /** \brief Simplified Excitation System Model. */ class ExcSEXS : public ExcitationSystemDynamics { public: @@ -29,16 +27,35 @@ namespace CIMPP ExcSEXS(); ~ExcSEXS() override; - CIMPP::PU efdmax; /* Field voltage clipping maximum limit (Efdmax). Typical Value = 5. Default: nullptr */ - CIMPP::PU efdmin; /* Field voltage clipping minimum limit (Efdmin). Typical Value = -5. Default: nullptr */ - CIMPP::PU emax; /* Maximum field voltage output (Emax). Typical Value = 5. Default: nullptr */ - CIMPP::PU emin; /* Minimum field voltage output (Emin). Typical Value = -5. Default: nullptr */ - CIMPP::PU k; /* Gain (K) (>0). Typical Value = 100. Default: nullptr */ - CIMPP::PU kc; /* PI controller gain (Kc). Typical Value = 0.08. Default: nullptr */ - CIMPP::Simple_Float tatb; /* Ta/Tb - gain reduction ratio of lag-lead element (TaTb). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tb; /* Denominator time constant of lag-lead block (Tb). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds tc; /* PI controller phase lead time constant (Tc). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Time constant of gain block (Te). Typical Value = 0.05. Default: nullptr */ + /** \brief Field voltage clipping maximum limit (Efdmax). Typical Value = 5. Default: nullptr */ + CIMPP::PU efdmax; + + /** \brief Field voltage clipping minimum limit (Efdmin). Typical Value = -5. Default: nullptr */ + CIMPP::PU efdmin; + + /** \brief Maximum field voltage output (Emax). Typical Value = 5. Default: nullptr */ + CIMPP::PU emax; + + /** \brief Minimum field voltage output (Emin). Typical Value = -5. Default: nullptr */ + CIMPP::PU emin; + + /** \brief Gain (K) (>0). Typical Value = 100. Default: nullptr */ + CIMPP::PU k; + + /** \brief PI controller gain (Kc). Typical Value = 0.08. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Ta/Tb - gain reduction ratio of lag-lead element (TaTb). Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float tatb; + + /** \brief Denominator time constant of lag-lead block (Tb). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief PI controller phase lead time constant (Tc). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Time constant of gain block (Te). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds te; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcSK.cpp b/CGMES_2.4.15_16FEB2016/ExcSK.cpp index cb3427545..0c8d97812 100644 --- a/CGMES_2.4.15_16FEB2016/ExcSK.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcSK.cpp @@ -8,43 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "ApparentPower.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcSK::ExcSK() {}; -ExcSK::~ExcSK() {}; +ExcSK::ExcSK() {} +ExcSK::~ExcSK() {} static const std::list PossibleProfilesForClass = { @@ -102,428 +70,458 @@ ExcSK::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcSK_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_efdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_efdmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_emax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_emax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->emax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_emin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_emin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->emin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_kce(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_kce(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kce; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_kgob(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_kgob(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kgob; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_kqi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_kqi(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kqi; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_kqob(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_kqob(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kqob; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_kqp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_kqp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kqp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_nq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_nq(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nq; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_qconoff(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_qconoff(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qconoff; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_qz(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_qz(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qz; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_remote(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_remote(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->remote; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_sbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_sbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->sbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_ti(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_ti(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_uimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_uimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_uimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_uimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_urmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_urmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->urmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_urmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_urmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->urmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_vtmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_vtmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vtmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_vtmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_vtmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vtmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_yp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_yp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->yp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcSK_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmax; if (!buffer.str().empty()) @@ -537,7 +535,8 @@ bool get_ExcSK_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcSK_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmin; if (!buffer.str().empty()) @@ -551,7 +550,8 @@ bool get_ExcSK_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcSK_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->emax; if (!buffer.str().empty()) @@ -565,7 +565,8 @@ bool get_ExcSK_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_emin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->emin; if (!buffer.str().empty()) @@ -579,7 +580,8 @@ bool get_ExcSK_emin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -593,7 +595,8 @@ bool get_ExcSK_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -607,7 +610,8 @@ bool get_ExcSK_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -621,7 +625,8 @@ bool get_ExcSK_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -635,7 +640,8 @@ bool get_ExcSK_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_kce(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kce; if (!buffer.str().empty()) @@ -649,7 +655,8 @@ bool get_ExcSK_kce(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -663,7 +670,8 @@ bool get_ExcSK_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_kgob(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kgob; if (!buffer.str().empty()) @@ -677,7 +685,8 @@ bool get_ExcSK_kgob(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -691,7 +700,8 @@ bool get_ExcSK_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_kqi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kqi; if (!buffer.str().empty()) @@ -705,7 +715,8 @@ bool get_ExcSK_kqi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_kqob(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kqob; if (!buffer.str().empty()) @@ -719,7 +730,8 @@ bool get_ExcSK_kqob(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_kqp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kqp; if (!buffer.str().empty()) @@ -733,7 +745,8 @@ bool get_ExcSK_kqp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_nq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nq; if (!buffer.str().empty()) @@ -747,7 +760,8 @@ bool get_ExcSK_nq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_qconoff(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qconoff; if (!buffer.str().empty()) @@ -761,7 +775,8 @@ bool get_ExcSK_qconoff(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcSK_qz(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qz; if (!buffer.str().empty()) @@ -775,7 +790,8 @@ bool get_ExcSK_qz(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_remote(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->remote; if (!buffer.str().empty()) @@ -789,7 +805,8 @@ bool get_ExcSK_remote(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcSK_sbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->sbase; if (!buffer.str().empty()) @@ -803,7 +820,8 @@ bool get_ExcSK_sbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -817,7 +835,8 @@ bool get_ExcSK_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -831,7 +850,8 @@ bool get_ExcSK_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_ti(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti; if (!buffer.str().empty()) @@ -845,7 +865,8 @@ bool get_ExcSK_ti(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -859,7 +880,8 @@ bool get_ExcSK_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -873,7 +895,8 @@ bool get_ExcSK_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_uimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uimax; if (!buffer.str().empty()) @@ -887,7 +910,8 @@ bool get_ExcSK_uimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_uimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uimin; if (!buffer.str().empty()) @@ -901,7 +925,8 @@ bool get_ExcSK_uimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_urmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->urmax; if (!buffer.str().empty()) @@ -915,7 +940,8 @@ bool get_ExcSK_urmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_urmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->urmin; if (!buffer.str().empty()) @@ -929,7 +955,8 @@ bool get_ExcSK_urmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_vtmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vtmax; if (!buffer.str().empty()) @@ -943,7 +970,8 @@ bool get_ExcSK_vtmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_vtmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vtmin; if (!buffer.str().empty()) @@ -957,7 +985,8 @@ bool get_ExcSK_vtmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_yp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->yp; if (!buffer.str().empty()) @@ -969,8 +998,6 @@ bool get_ExcSK_yp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcSK::debugName[] = "ExcSK"; const char* ExcSK::debugString() const { @@ -979,43 +1006,43 @@ const char* ExcSK::debugString() const void ExcSK::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcSK"), &ExcSK_factory)); + factory_map.emplace("cim:ExcSK", &ExcSK_factory); } void ExcSK::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcSK.efdmax"), &assign_ExcSK_efdmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.efdmin"), &assign_ExcSK_efdmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.emax"), &assign_ExcSK_emax)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.emin"), &assign_ExcSK_emin)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.k"), &assign_ExcSK_k)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.k1"), &assign_ExcSK_k1)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.k2"), &assign_ExcSK_k2)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.kc"), &assign_ExcSK_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.kce"), &assign_ExcSK_kce)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.kd"), &assign_ExcSK_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.kgob"), &assign_ExcSK_kgob)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.kp"), &assign_ExcSK_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.kqi"), &assign_ExcSK_kqi)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.kqob"), &assign_ExcSK_kqob)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.kqp"), &assign_ExcSK_kqp)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.nq"), &assign_ExcSK_nq)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.qconoff"), &assign_ExcSK_qconoff)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.qz"), &assign_ExcSK_qz)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.remote"), &assign_ExcSK_remote)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.sbase"), &assign_ExcSK_sbase)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.tc"), &assign_ExcSK_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.te"), &assign_ExcSK_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.ti"), &assign_ExcSK_ti)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.tp"), &assign_ExcSK_tp)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.tr"), &assign_ExcSK_tr)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.uimax"), &assign_ExcSK_uimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.uimin"), &assign_ExcSK_uimin)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.urmax"), &assign_ExcSK_urmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.urmin"), &assign_ExcSK_urmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.vtmax"), &assign_ExcSK_vtmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.vtmin"), &assign_ExcSK_vtmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.yp"), &assign_ExcSK_yp)); + assign_map.emplace("cim:ExcSK.efdmax", &assign_ExcSK_efdmax); + assign_map.emplace("cim:ExcSK.efdmin", &assign_ExcSK_efdmin); + assign_map.emplace("cim:ExcSK.emax", &assign_ExcSK_emax); + assign_map.emplace("cim:ExcSK.emin", &assign_ExcSK_emin); + assign_map.emplace("cim:ExcSK.k", &assign_ExcSK_k); + assign_map.emplace("cim:ExcSK.k1", &assign_ExcSK_k1); + assign_map.emplace("cim:ExcSK.k2", &assign_ExcSK_k2); + assign_map.emplace("cim:ExcSK.kc", &assign_ExcSK_kc); + assign_map.emplace("cim:ExcSK.kce", &assign_ExcSK_kce); + assign_map.emplace("cim:ExcSK.kd", &assign_ExcSK_kd); + assign_map.emplace("cim:ExcSK.kgob", &assign_ExcSK_kgob); + assign_map.emplace("cim:ExcSK.kp", &assign_ExcSK_kp); + assign_map.emplace("cim:ExcSK.kqi", &assign_ExcSK_kqi); + assign_map.emplace("cim:ExcSK.kqob", &assign_ExcSK_kqob); + assign_map.emplace("cim:ExcSK.kqp", &assign_ExcSK_kqp); + assign_map.emplace("cim:ExcSK.nq", &assign_ExcSK_nq); + assign_map.emplace("cim:ExcSK.qconoff", &assign_ExcSK_qconoff); + assign_map.emplace("cim:ExcSK.qz", &assign_ExcSK_qz); + assign_map.emplace("cim:ExcSK.remote", &assign_ExcSK_remote); + assign_map.emplace("cim:ExcSK.sbase", &assign_ExcSK_sbase); + assign_map.emplace("cim:ExcSK.tc", &assign_ExcSK_tc); + assign_map.emplace("cim:ExcSK.te", &assign_ExcSK_te); + assign_map.emplace("cim:ExcSK.ti", &assign_ExcSK_ti); + assign_map.emplace("cim:ExcSK.tp", &assign_ExcSK_tp); + assign_map.emplace("cim:ExcSK.tr", &assign_ExcSK_tr); + assign_map.emplace("cim:ExcSK.uimax", &assign_ExcSK_uimax); + assign_map.emplace("cim:ExcSK.uimin", &assign_ExcSK_uimin); + assign_map.emplace("cim:ExcSK.urmax", &assign_ExcSK_urmax); + assign_map.emplace("cim:ExcSK.urmin", &assign_ExcSK_urmin); + assign_map.emplace("cim:ExcSK.vtmax", &assign_ExcSK_vtmax); + assign_map.emplace("cim:ExcSK.vtmin", &assign_ExcSK_vtmin); + assign_map.emplace("cim:ExcSK.yp", &assign_ExcSK_yp); } void ExcSK::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcSK.hpp b/CGMES_2.4.15_16FEB2016/ExcSK.hpp index c151b3973..3d724e1da 100644 --- a/CGMES_2.4.15_16FEB2016/ExcSK.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcSK.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Slovakian Excitation System Model. UEL and secondary voltage control are included in this model. When this model is used, there cannot be a separate underexcitation limiter or VAr controller model. - */ + /** \brief Slovakian Excitation System Model. UEL and secondary voltage control are included in this model. When this model is used, there cannot be a separate underexcitation limiter or VAr controller model. */ class ExcSK : public ExcitationSystemDynamics { public: @@ -30,38 +28,101 @@ namespace CIMPP ExcSK(); ~ExcSK() override; - CIMPP::PU efdmax; /* Field voltage clipping limit (Efdmax). Default: nullptr */ - CIMPP::PU efdmin; /* Field voltage clipping limit (Efdmin). Default: nullptr */ - CIMPP::PU emax; /* Maximum field voltage output (Emax). Typical Value = 20. Default: nullptr */ - CIMPP::PU emin; /* Minimum field voltage output (Emin). Typical Value = -20. Default: nullptr */ - CIMPP::PU k; /* Gain (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU k1; /* Parameter of underexcitation limit (K1). Typical Value = 0.1364. Default: nullptr */ - CIMPP::PU k2; /* Parameter of underexcitation limit (K2). Typical Value = -0.3861. Default: nullptr */ - CIMPP::PU kc; /* PI controller gain (Kc). Typical Value = 70. Default: nullptr */ - CIMPP::PU kce; /* Rectifier regulation factor (Kce). Typical Value = 0. Default: nullptr */ - CIMPP::PU kd; /* Exciter internal reactance (Kd). Typical Value = 0. Default: nullptr */ - CIMPP::PU kgob; /* P controller gain (Kgob). Typical Value = 10. Default: nullptr */ - CIMPP::PU kp; /* PI controller gain (Kp). Typical Value = 1. Default: nullptr */ - CIMPP::PU kqi; /* PI controller gain of integral component (Kqi). Typical Value = 0. Default: nullptr */ - CIMPP::PU kqob; /* Rate of rise of the reactive power (Kqob). Default: nullptr */ - CIMPP::PU kqp; /* PI controller gain (Kqp). Typical Value = 0. Default: nullptr */ - CIMPP::PU nq; /* Dead band of reactive power (nq). Determines the range of sensitivity. Typical Value = 0.001. Default: nullptr */ - CIMPP::Boolean qconoff; /* Secondary voltage control state (Qc_on_off). true = secondary voltage control is ON false = secondary voltage control is OFF. Typical Value = false. Default: false */ - CIMPP::PU qz; /* Desired value (setpoint) of reactive power, manual setting (Qz). Default: nullptr */ - CIMPP::Boolean remote; /* Selector to apply automatic calculation in secondary controller model. true = automatic calculation is activated false = manual set is active; the use of desired value of reactive power (Qz) is required. Typical Value = true. Default: false */ - CIMPP::ApparentPower sbase; /* Apparent power of the unit (Sbase). Unit = MVA. Typical Value = 259. Default: nullptr */ - CIMPP::Seconds tc; /* PI controller phase lead time constant (Tc). Typical Value = 8. Default: nullptr */ - CIMPP::Seconds te; /* Time constant of gain block (Te). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds ti; /* PI controller phase lead time constant (Ti). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds tp; /* Time constant (Tp). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tr; /* Voltage transducer time constant (Tr). Typical Value = 0.01. Default: nullptr */ - CIMPP::PU uimax; /* Maximum error (Uimax). Typical Value = 10. Default: nullptr */ - CIMPP::PU uimin; /* Minimum error (UImin). Typical Value = -10. Default: nullptr */ - CIMPP::PU urmax; /* Maximum controller output (URmax). Typical Value = 10. Default: nullptr */ - CIMPP::PU urmin; /* Minimum controller output (URmin). Typical Value = -10. Default: nullptr */ - CIMPP::PU vtmax; /* Maximum terminal voltage input (Vtmax). Determines the range of voltage dead band. Typical Value = 1.05. Default: nullptr */ - CIMPP::PU vtmin; /* Minimum terminal voltage input (Vtmin). Determines the range of voltage dead band. Typical Value = 0.95. Default: nullptr */ - CIMPP::PU yp; /* Maximum output (Yp). Minimum output = 0. Typical Value = 1. Default: nullptr */ + /** \brief Field voltage clipping limit (Efdmax). Default: nullptr */ + CIMPP::PU efdmax; + + /** \brief Field voltage clipping limit (Efdmin). Default: nullptr */ + CIMPP::PU efdmin; + + /** \brief Maximum field voltage output (Emax). Typical Value = 20. Default: nullptr */ + CIMPP::PU emax; + + /** \brief Minimum field voltage output (Emin). Typical Value = -20. Default: nullptr */ + CIMPP::PU emin; + + /** \brief Gain (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU k; + + /** \brief Parameter of underexcitation limit (K1). Typical Value = 0.1364. Default: nullptr */ + CIMPP::PU k1; + + /** \brief Parameter of underexcitation limit (K2). Typical Value = -0.3861. Default: nullptr */ + CIMPP::PU k2; + + /** \brief PI controller gain (Kc). Typical Value = 70. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Rectifier regulation factor (Kce). Typical Value = 0. Default: nullptr */ + CIMPP::PU kce; + + /** \brief Exciter internal reactance (Kd). Typical Value = 0. Default: nullptr */ + CIMPP::PU kd; + + /** \brief P controller gain (Kgob). Typical Value = 10. Default: nullptr */ + CIMPP::PU kgob; + + /** \brief PI controller gain (Kp). Typical Value = 1. Default: nullptr */ + CIMPP::PU kp; + + /** \brief PI controller gain of integral component (Kqi). Typical Value = 0. Default: nullptr */ + CIMPP::PU kqi; + + /** \brief Rate of rise of the reactive power (Kqob). Default: nullptr */ + CIMPP::PU kqob; + + /** \brief PI controller gain (Kqp). Typical Value = 0. Default: nullptr */ + CIMPP::PU kqp; + + /** \brief Dead band of reactive power (nq). Determines the range of sensitivity. Typical Value = 0.001. Default: nullptr */ + CIMPP::PU nq; + + /** \brief Secondary voltage control state (Qc_on_off). true = secondary voltage control is ON false = secondary voltage control is OFF. Typical Value = false. Default: false */ + CIMPP::Boolean qconoff; + + /** \brief Desired value (setpoint) of reactive power, manual setting (Qz). Default: nullptr */ + CIMPP::PU qz; + + /** \brief Selector to apply automatic calculation in secondary controller model. true = automatic calculation is activated false = manual set is active; the use of desired value of reactive power (Qz) is required. Typical Value = true. Default: false */ + CIMPP::Boolean remote; + + /** \brief Apparent power of the unit (Sbase). Unit = MVA. Typical Value = 259. Default: nullptr */ + CIMPP::ApparentPower sbase; + + /** \brief PI controller phase lead time constant (Tc). Typical Value = 8. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Time constant of gain block (Te). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief PI controller phase lead time constant (Ti). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds ti; + + /** \brief Time constant (Tp). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Voltage transducer time constant (Tr). Typical Value = 0.01. Default: nullptr */ + CIMPP::Seconds tr; + + /** \brief Maximum error (Uimax). Typical Value = 10. Default: nullptr */ + CIMPP::PU uimax; + + /** \brief Minimum error (UImin). Typical Value = -10. Default: nullptr */ + CIMPP::PU uimin; + + /** \brief Maximum controller output (URmax). Typical Value = 10. Default: nullptr */ + CIMPP::PU urmax; + + /** \brief Minimum controller output (URmin). Typical Value = -10. Default: nullptr */ + CIMPP::PU urmin; + + /** \brief Maximum terminal voltage input (Vtmax). Determines the range of voltage dead band. Typical Value = 1.05. Default: nullptr */ + CIMPP::PU vtmax; + + /** \brief Minimum terminal voltage input (Vtmin). Determines the range of voltage dead band. Typical Value = 0.95. Default: nullptr */ + CIMPP::PU vtmin; + + /** \brief Maximum output (Yp). Minimum output = 0. Typical Value = 1. Default: nullptr */ + CIMPP::PU yp; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcST1A.cpp b/CGMES_2.4.15_16FEB2016/ExcST1A.cpp index 882df3069..f96434060 100644 --- a/CGMES_2.4.15_16FEB2016/ExcST1A.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcST1A.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcST1A::ExcST1A() {}; -ExcST1A::~ExcST1A() {}; +ExcST1A::ExcST1A() {} +ExcST1A::~ExcST1A() {} static const std::list PossibleProfilesForClass = { @@ -74,246 +56,262 @@ ExcST1A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcST1A_ilr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_ilr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ilr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_klr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_klr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->klr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_tb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_tb1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_tc1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_tc1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_vimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_xe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_xe(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xe; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcST1A_ilr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ilr; if (!buffer.str().empty()) @@ -327,7 +325,8 @@ bool get_ExcST1A_ilr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -341,7 +340,8 @@ bool get_ExcST1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -355,7 +355,8 @@ bool get_ExcST1A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -369,7 +370,8 @@ bool get_ExcST1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_klr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->klr; if (!buffer.str().empty()) @@ -383,7 +385,8 @@ bool get_ExcST1A_klr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -397,7 +400,8 @@ bool get_ExcST1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -411,7 +415,8 @@ bool get_ExcST1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb1; if (!buffer.str().empty()) @@ -425,7 +430,8 @@ bool get_ExcST1A_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -439,7 +445,8 @@ bool get_ExcST1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_tc1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc1; if (!buffer.str().empty()) @@ -453,7 +460,8 @@ bool get_ExcST1A_tc1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -467,7 +475,8 @@ bool get_ExcST1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -481,7 +490,8 @@ bool get_ExcST1A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST1A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -495,7 +505,8 @@ bool get_ExcST1A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST1A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -509,7 +520,8 @@ bool get_ExcST1A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST1A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimin; if (!buffer.str().empty()) @@ -523,7 +535,8 @@ bool get_ExcST1A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -537,7 +550,8 @@ bool get_ExcST1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -551,7 +565,8 @@ bool get_ExcST1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST1A_xe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xe; if (!buffer.str().empty()) @@ -563,8 +578,6 @@ bool get_ExcST1A_xe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcST1A::debugName[] = "ExcST1A"; const char* ExcST1A::debugString() const { @@ -573,29 +586,29 @@ const char* ExcST1A::debugString() const void ExcST1A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcST1A"), &ExcST1A_factory)); + factory_map.emplace("cim:ExcST1A", &ExcST1A_factory); } void ExcST1A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.ilr"), &assign_ExcST1A_ilr)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.ka"), &assign_ExcST1A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.kc"), &assign_ExcST1A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.kf"), &assign_ExcST1A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.klr"), &assign_ExcST1A_klr)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.ta"), &assign_ExcST1A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.tb"), &assign_ExcST1A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.tb1"), &assign_ExcST1A_tb1)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.tc"), &assign_ExcST1A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.tc1"), &assign_ExcST1A_tc1)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.tf"), &assign_ExcST1A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.vamax"), &assign_ExcST1A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.vamin"), &assign_ExcST1A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.vimax"), &assign_ExcST1A_vimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.vimin"), &assign_ExcST1A_vimin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.vrmax"), &assign_ExcST1A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.vrmin"), &assign_ExcST1A_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.xe"), &assign_ExcST1A_xe)); + assign_map.emplace("cim:ExcST1A.ilr", &assign_ExcST1A_ilr); + assign_map.emplace("cim:ExcST1A.ka", &assign_ExcST1A_ka); + assign_map.emplace("cim:ExcST1A.kc", &assign_ExcST1A_kc); + assign_map.emplace("cim:ExcST1A.kf", &assign_ExcST1A_kf); + assign_map.emplace("cim:ExcST1A.klr", &assign_ExcST1A_klr); + assign_map.emplace("cim:ExcST1A.ta", &assign_ExcST1A_ta); + assign_map.emplace("cim:ExcST1A.tb", &assign_ExcST1A_tb); + assign_map.emplace("cim:ExcST1A.tb1", &assign_ExcST1A_tb1); + assign_map.emplace("cim:ExcST1A.tc", &assign_ExcST1A_tc); + assign_map.emplace("cim:ExcST1A.tc1", &assign_ExcST1A_tc1); + assign_map.emplace("cim:ExcST1A.tf", &assign_ExcST1A_tf); + assign_map.emplace("cim:ExcST1A.vamax", &assign_ExcST1A_vamax); + assign_map.emplace("cim:ExcST1A.vamin", &assign_ExcST1A_vamin); + assign_map.emplace("cim:ExcST1A.vimax", &assign_ExcST1A_vimax); + assign_map.emplace("cim:ExcST1A.vimin", &assign_ExcST1A_vimin); + assign_map.emplace("cim:ExcST1A.vrmax", &assign_ExcST1A_vrmax); + assign_map.emplace("cim:ExcST1A.vrmin", &assign_ExcST1A_vrmin); + assign_map.emplace("cim:ExcST1A.xe", &assign_ExcST1A_xe); } void ExcST1A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcST1A.hpp b/CGMES_2.4.15_16FEB2016/ExcST1A.hpp index 820aa0bea..2c1805a46 100644 --- a/CGMES_2.4.15_16FEB2016/ExcST1A.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcST1A.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modification of an old IEEE ST1A static excitation system without overexcitation limiter (OEL) and underexcitation limiter (UEL). - */ + /** \brief Modification of an old IEEE ST1A static excitation system without overexcitation limiter (OEL) and underexcitation limiter (UEL). */ class ExcST1A : public ExcitationSystemDynamics { public: @@ -28,24 +26,59 @@ namespace CIMPP ExcST1A(); ~ExcST1A() override; - CIMPP::PU ilr; /* Exciter output current limit reference (Ilr). Typical Value = 0. Default: nullptr */ - CIMPP::PU ka; /* Voltage regulator gain (Ka). Typical Value = 190. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (Kf). Typical Value = 0. Default: nullptr */ - CIMPP::PU klr; /* Exciter output current limiter gain (Klr). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (Ta). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (Tb). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds tb1; /* Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (Tc). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tc1; /* Voltage regulator time constant (Tc). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (Tf). Typical Value = 1. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (Vamax). Typical Value = 999. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (Vamin). Typical Value = -999. Default: nullptr */ - CIMPP::PU vimax; /* Maximum voltage regulator input limit (Vimax). Typical Value = 999. Default: nullptr */ - CIMPP::PU vimin; /* Minimum voltage regulator input limit (Vimin). Typical Value = -999. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator outputs (Vrmax). Typical Value = 7.8. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator outputs (Vrmin). Typical Value = -6.7. Default: nullptr */ - CIMPP::PU xe; /* Excitation xfmr effective reactance (Xe). Typical Value = 0.04. Default: nullptr */ + /** \brief Exciter output current limit reference (Ilr). Typical Value = 0. Default: nullptr */ + CIMPP::PU ilr; + + /** \brief Voltage regulator gain (Ka). Typical Value = 190. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Excitation control system stabilizer gains (Kf). Typical Value = 0. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Exciter output current limiter gain (Klr). Typical Value = 0. Default: nullptr */ + CIMPP::PU klr; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (Tb). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb1; + + /** \brief Voltage regulator time constant (Tc). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Voltage regulator time constant (Tc). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc1; + + /** \brief Excitation control system stabilizer time constant (Tf). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage regulator output (Vamax). Typical Value = 999. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (Vamin). Typical Value = -999. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Maximum voltage regulator input limit (Vimax). Typical Value = 999. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Minimum voltage regulator input limit (Vimin). Typical Value = -999. Default: nullptr */ + CIMPP::PU vimin; + + /** \brief Maximum voltage regulator outputs (Vrmax). Typical Value = 7.8. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator outputs (Vrmin). Typical Value = -6.7. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief Excitation xfmr effective reactance (Xe). Typical Value = 0.04. Default: nullptr */ + CIMPP::PU xe; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcST2A.cpp b/CGMES_2.4.15_16FEB2016/ExcST2A.cpp index c9808278a..afa9e20ff 100644 --- a/CGMES_2.4.15_16FEB2016/ExcST2A.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcST2A.cpp @@ -8,26 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcST2A::ExcST2A() {}; -ExcST2A::~ExcST2A() {}; +ExcST2A::ExcST2A() {} +ExcST2A::~ExcST2A() {} static const std::list PossibleProfilesForClass = { @@ -68,207 +53,220 @@ ExcST2A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcST2A_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_efdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_uelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcST2A_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmax; if (!buffer.str().empty()) @@ -282,7 +280,8 @@ bool get_ExcST2A_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcST2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -296,7 +295,8 @@ bool get_ExcST2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -310,7 +310,8 @@ bool get_ExcST2A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -324,7 +325,8 @@ bool get_ExcST2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -338,7 +340,8 @@ bool get_ExcST2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -352,7 +355,8 @@ bool get_ExcST2A_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -366,7 +370,8 @@ bool get_ExcST2A_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -380,7 +385,8 @@ bool get_ExcST2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -394,7 +400,8 @@ bool get_ExcST2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -408,7 +415,8 @@ bool get_ExcST2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -422,7 +430,8 @@ bool get_ExcST2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -436,7 +445,8 @@ bool get_ExcST2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uelin; if (!buffer.str().empty()) @@ -450,7 +460,8 @@ bool get_ExcST2A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -464,7 +475,8 @@ bool get_ExcST2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -476,8 +488,6 @@ bool get_ExcST2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcST2A::debugName[] = "ExcST2A"; const char* ExcST2A::debugString() const { @@ -486,26 +496,26 @@ const char* ExcST2A::debugString() const void ExcST2A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcST2A"), &ExcST2A_factory)); + factory_map.emplace("cim:ExcST2A", &ExcST2A_factory); } void ExcST2A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.efdmax"), &assign_ExcST2A_efdmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.ka"), &assign_ExcST2A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.kc"), &assign_ExcST2A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.ke"), &assign_ExcST2A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.kf"), &assign_ExcST2A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.ki"), &assign_ExcST2A_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.kp"), &assign_ExcST2A_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.ta"), &assign_ExcST2A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.tb"), &assign_ExcST2A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.tc"), &assign_ExcST2A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.te"), &assign_ExcST2A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.tf"), &assign_ExcST2A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.uelin"), &assign_ExcST2A_uelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.vrmax"), &assign_ExcST2A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.vrmin"), &assign_ExcST2A_vrmin)); + assign_map.emplace("cim:ExcST2A.efdmax", &assign_ExcST2A_efdmax); + assign_map.emplace("cim:ExcST2A.ka", &assign_ExcST2A_ka); + assign_map.emplace("cim:ExcST2A.kc", &assign_ExcST2A_kc); + assign_map.emplace("cim:ExcST2A.ke", &assign_ExcST2A_ke); + assign_map.emplace("cim:ExcST2A.kf", &assign_ExcST2A_kf); + assign_map.emplace("cim:ExcST2A.ki", &assign_ExcST2A_ki); + assign_map.emplace("cim:ExcST2A.kp", &assign_ExcST2A_kp); + assign_map.emplace("cim:ExcST2A.ta", &assign_ExcST2A_ta); + assign_map.emplace("cim:ExcST2A.tb", &assign_ExcST2A_tb); + assign_map.emplace("cim:ExcST2A.tc", &assign_ExcST2A_tc); + assign_map.emplace("cim:ExcST2A.te", &assign_ExcST2A_te); + assign_map.emplace("cim:ExcST2A.tf", &assign_ExcST2A_tf); + assign_map.emplace("cim:ExcST2A.uelin", &assign_ExcST2A_uelin); + assign_map.emplace("cim:ExcST2A.vrmax", &assign_ExcST2A_vrmax); + assign_map.emplace("cim:ExcST2A.vrmin", &assign_ExcST2A_vrmin); } void ExcST2A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcST2A.hpp b/CGMES_2.4.15_16FEB2016/ExcST2A.hpp index b809b1ce3..1da9826e1 100644 --- a/CGMES_2.4.15_16FEB2016/ExcST2A.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcST2A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE ST2A static excitation system - another lead-lag block added to match the model defined by WECC. - */ + /** \brief Modified IEEE ST2A static excitation system - another lead-lag block added to match the model defined by WECC. */ class ExcST2A : public ExcitationSystemDynamics { public: @@ -29,21 +27,50 @@ namespace CIMPP ExcST2A(); ~ExcST2A() override; - CIMPP::PU efdmax; /* Maximum field voltage (Efdmax). Typical Value = 99. Default: nullptr */ - CIMPP::PU ka; /* Voltage regulator gain (Ka). Typical Value = 120. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 1.82. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (Kf). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU ki; /* Potential circuit gain coefficient (Ki). Typical Value = 8. Default: nullptr */ - CIMPP::PU kp; /* Potential circuit gain coefficient (Kp). Typical Value = 4.88. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (Ta). Typical Value = 0.15. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (Tc). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (Tf). Typical Value = 0.7. Default: nullptr */ - CIMPP::Boolean uelin; /* UEL input (UELin). true = HV gate false = add to error signal. Typical Value = false. Default: false */ - CIMPP::PU vrmax; /* Maximum voltage regulator outputs (Vrmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator outputs (Vrmin). Typical Value = -1. Default: nullptr */ + /** \brief Maximum field voltage (Efdmax). Typical Value = 99. Default: nullptr */ + CIMPP::PU efdmax; + + /** \brief Voltage regulator gain (Ka). Typical Value = 120. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 1.82. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (Kf). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Potential circuit gain coefficient (Ki). Typical Value = 8. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Potential circuit gain coefficient (Kp). Typical Value = 4.88. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0.15. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (Tc). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (Tf). Typical Value = 0.7. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief UEL input (UELin). true = HV gate false = add to error signal. Typical Value = false. Default: false */ + CIMPP::Boolean uelin; + + /** \brief Maximum voltage regulator outputs (Vrmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator outputs (Vrmin). Typical Value = -1. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcST3A.cpp b/CGMES_2.4.15_16FEB2016/ExcST3A.cpp index 1ecf6df79..e31c2b37c 100644 --- a/CGMES_2.4.15_16FEB2016/ExcST3A.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcST3A.cpp @@ -8,31 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "AngleDegrees.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcST3A::ExcST3A() {}; -ExcST3A::~ExcST3A() {}; +ExcST3A::ExcST3A() {} +ExcST3A::~ExcST3A() {} static const std::list PossibleProfilesForClass = { @@ -78,272 +58,290 @@ ExcST3A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcST3A_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_efdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_kj(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_kj(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kj; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_km(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_km(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->km; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_ks1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_ks1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_thetap(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_thetap(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->thetap; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_tm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_tm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_vbmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_vbmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vbmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_vgmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_vgmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vgmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_vimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_xl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_xl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcST3A_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmax; if (!buffer.str().empty()) @@ -357,7 +355,8 @@ bool get_ExcST3A_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcST3A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -371,7 +370,8 @@ bool get_ExcST3A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -385,7 +385,8 @@ bool get_ExcST3A_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -399,7 +400,8 @@ bool get_ExcST3A_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_kj(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kj; if (!buffer.str().empty()) @@ -413,7 +415,8 @@ bool get_ExcST3A_kj(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_km(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->km; if (!buffer.str().empty()) @@ -427,7 +430,8 @@ bool get_ExcST3A_km(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -441,7 +445,8 @@ bool get_ExcST3A_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -455,7 +460,8 @@ bool get_ExcST3A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks1; if (!buffer.str().empty()) @@ -469,7 +475,8 @@ bool get_ExcST3A_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -483,7 +490,8 @@ bool get_ExcST3A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -497,7 +505,8 @@ bool get_ExcST3A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_thetap(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thetap; if (!buffer.str().empty()) @@ -511,7 +520,8 @@ bool get_ExcST3A_thetap(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcST3A_tm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tm; if (!buffer.str().empty()) @@ -525,7 +535,8 @@ bool get_ExcST3A_tm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vbmax; if (!buffer.str().empty()) @@ -539,7 +550,8 @@ bool get_ExcST3A_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST3A_vgmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vgmax; if (!buffer.str().empty()) @@ -553,7 +565,8 @@ bool get_ExcST3A_vgmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST3A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -567,7 +580,8 @@ bool get_ExcST3A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST3A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimin; if (!buffer.str().empty()) @@ -581,7 +595,8 @@ bool get_ExcST3A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST3A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -595,7 +610,8 @@ bool get_ExcST3A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST3A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -609,7 +625,8 @@ bool get_ExcST3A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST3A_xl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xl; if (!buffer.str().empty()) @@ -621,8 +638,6 @@ bool get_ExcST3A_xl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcST3A::debugName[] = "ExcST3A"; const char* ExcST3A::debugString() const { @@ -631,31 +646,31 @@ const char* ExcST3A::debugString() const void ExcST3A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcST3A"), &ExcST3A_factory)); + factory_map.emplace("cim:ExcST3A", &ExcST3A_factory); } void ExcST3A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.efdmax"), &assign_ExcST3A_efdmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.kc"), &assign_ExcST3A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.kg"), &assign_ExcST3A_kg)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.ki"), &assign_ExcST3A_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.kj"), &assign_ExcST3A_kj)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.km"), &assign_ExcST3A_km)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.kp"), &assign_ExcST3A_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.ks"), &assign_ExcST3A_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.ks1"), &assign_ExcST3A_ks1)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.tb"), &assign_ExcST3A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.tc"), &assign_ExcST3A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.thetap"), &assign_ExcST3A_thetap)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.tm"), &assign_ExcST3A_tm)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.vbmax"), &assign_ExcST3A_vbmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.vgmax"), &assign_ExcST3A_vgmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.vimax"), &assign_ExcST3A_vimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.vimin"), &assign_ExcST3A_vimin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.vrmax"), &assign_ExcST3A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.vrmin"), &assign_ExcST3A_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.xl"), &assign_ExcST3A_xl)); + assign_map.emplace("cim:ExcST3A.efdmax", &assign_ExcST3A_efdmax); + assign_map.emplace("cim:ExcST3A.kc", &assign_ExcST3A_kc); + assign_map.emplace("cim:ExcST3A.kg", &assign_ExcST3A_kg); + assign_map.emplace("cim:ExcST3A.ki", &assign_ExcST3A_ki); + assign_map.emplace("cim:ExcST3A.kj", &assign_ExcST3A_kj); + assign_map.emplace("cim:ExcST3A.km", &assign_ExcST3A_km); + assign_map.emplace("cim:ExcST3A.kp", &assign_ExcST3A_kp); + assign_map.emplace("cim:ExcST3A.ks", &assign_ExcST3A_ks); + assign_map.emplace("cim:ExcST3A.ks1", &assign_ExcST3A_ks1); + assign_map.emplace("cim:ExcST3A.tb", &assign_ExcST3A_tb); + assign_map.emplace("cim:ExcST3A.tc", &assign_ExcST3A_tc); + assign_map.emplace("cim:ExcST3A.thetap", &assign_ExcST3A_thetap); + assign_map.emplace("cim:ExcST3A.tm", &assign_ExcST3A_tm); + assign_map.emplace("cim:ExcST3A.vbmax", &assign_ExcST3A_vbmax); + assign_map.emplace("cim:ExcST3A.vgmax", &assign_ExcST3A_vgmax); + assign_map.emplace("cim:ExcST3A.vimax", &assign_ExcST3A_vimax); + assign_map.emplace("cim:ExcST3A.vimin", &assign_ExcST3A_vimin); + assign_map.emplace("cim:ExcST3A.vrmax", &assign_ExcST3A_vrmax); + assign_map.emplace("cim:ExcST3A.vrmin", &assign_ExcST3A_vrmin); + assign_map.emplace("cim:ExcST3A.xl", &assign_ExcST3A_xl); } void ExcST3A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcST3A.hpp b/CGMES_2.4.15_16FEB2016/ExcST3A.hpp index 938915f89..522bb2633 100644 --- a/CGMES_2.4.15_16FEB2016/ExcST3A.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcST3A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE ST3A static excitation system with added speed multiplier. - */ + /** \brief Modified IEEE ST3A static excitation system with added speed multiplier. */ class ExcST3A : public ExcitationSystemDynamics { public: @@ -29,26 +27,65 @@ namespace CIMPP ExcST3A(); ~ExcST3A() override; - CIMPP::PU efdmax; /* Maximum AVR output (Efdmax). Typical Value = 6.9. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 1.1. Default: nullptr */ - CIMPP::PU kg; /* Feedback gain constant of the inner loop field regulator (Kg). Typical Value = 1. Default: nullptr */ - CIMPP::PU ki; /* Potential circuit gain coefficient (Ki). Typical Value = 4.83. Default: nullptr */ - CIMPP::PU kj; /* AVR gain (Kj). Typical Value = 200. Default: nullptr */ - CIMPP::PU km; /* Forward gain constant of the inner loop field regulator (Km). Typical Value = 7.04. Default: nullptr */ - CIMPP::PU kp; /* Potential source gain (Kp) (>0). Typical Value = 4.37. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ - CIMPP::PU ks1; /* Coefficient to allow different usage of the model-speed coefficient (Ks1). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (Tb). Typical Value = 6.67. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (Tc). Typical Value = 1. Default: nullptr */ - CIMPP::AngleDegrees thetap; /* Potential circuit phase angle (thetap). Typical Value = 20. Default: nullptr */ - CIMPP::Seconds tm; /* Forward time constant of inner loop field regulator (Tm). Typical Value = 1. Default: nullptr */ - CIMPP::PU vbmax; /* Maximum excitation voltage (Vbmax). Typical Value = 8.63. Default: nullptr */ - CIMPP::PU vgmax; /* Maximum inner loop feedback voltage (Vgmax). Typical Value = 6.53. Default: nullptr */ - CIMPP::PU vimax; /* Maximum voltage regulator input limit (Vimax). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU vimin; /* Minimum voltage regulator input limit (Vimin). Typical Value = -0.2. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (Vrmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (Vrmin). Typical Value = 0. Default: nullptr */ - CIMPP::PU xl; /* Reactance associated with potential source (Xl). Typical Value = 0.09. Default: nullptr */ + /** \brief Maximum AVR output (Efdmax). Typical Value = 6.9. Default: nullptr */ + CIMPP::PU efdmax; + + /** \brief Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Feedback gain constant of the inner loop field regulator (Kg). Typical Value = 1. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Potential circuit gain coefficient (Ki). Typical Value = 4.83. Default: nullptr */ + CIMPP::PU ki; + + /** \brief AVR gain (Kj). Typical Value = 200. Default: nullptr */ + CIMPP::PU kj; + + /** \brief Forward gain constant of the inner loop field regulator (Km). Typical Value = 7.04. Default: nullptr */ + CIMPP::PU km; + + /** \brief Potential source gain (Kp) (>0). Typical Value = 4.37. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (Ks1). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks1; + + /** \brief Voltage regulator time constant (Tb). Typical Value = 6.67. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (Tc). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Potential circuit phase angle (thetap). Typical Value = 20. Default: nullptr */ + CIMPP::AngleDegrees thetap; + + /** \brief Forward time constant of inner loop field regulator (Tm). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tm; + + /** \brief Maximum excitation voltage (Vbmax). Typical Value = 8.63. Default: nullptr */ + CIMPP::PU vbmax; + + /** \brief Maximum inner loop feedback voltage (Vgmax). Typical Value = 6.53. Default: nullptr */ + CIMPP::PU vgmax; + + /** \brief Maximum voltage regulator input limit (Vimax). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Minimum voltage regulator input limit (Vimin). Typical Value = -0.2. Default: nullptr */ + CIMPP::PU vimin; + + /** \brief Maximum voltage regulator output (Vrmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (Vrmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief Reactance associated with potential source (Xl). Typical Value = 0.09. Default: nullptr */ + CIMPP::PU xl; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcST4B.cpp b/CGMES_2.4.15_16FEB2016/ExcST4B.cpp index ecb63b6d4..b09570552 100644 --- a/CGMES_2.4.15_16FEB2016/ExcST4B.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcST4B.cpp @@ -8,30 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "AngleDegrees.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcST4B::ExcST4B() {}; -ExcST4B::~ExcST4B() {}; +ExcST4B::ExcST4B() {} +ExcST4B::~ExcST4B() {} static const std::list PossibleProfilesForClass = { @@ -76,259 +57,276 @@ ExcST4B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcST4B_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_kim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_kim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_kir(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_kir(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kir; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_kpm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_kpm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_kpr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_kpr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_lvgate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_lvgate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lvgate; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_thetap(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_thetap(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->thetap; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_uel(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_uel(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uel; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_vbmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_vbmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vbmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_vgmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_vgmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vgmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_vmmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_vmmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_vmmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_vmmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_xl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_xl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcST4B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -342,7 +340,8 @@ bool get_ExcST4B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -356,7 +355,8 @@ bool get_ExcST4B_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -370,7 +370,8 @@ bool get_ExcST4B_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_kim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kim; if (!buffer.str().empty()) @@ -384,7 +385,8 @@ bool get_ExcST4B_kim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kir; if (!buffer.str().empty()) @@ -398,7 +400,8 @@ bool get_ExcST4B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -412,7 +415,8 @@ bool get_ExcST4B_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_kpm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpm; if (!buffer.str().empty()) @@ -426,7 +430,8 @@ bool get_ExcST4B_kpm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpr; if (!buffer.str().empty()) @@ -440,7 +445,8 @@ bool get_ExcST4B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_lvgate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lvgate; if (!buffer.str().empty()) @@ -454,7 +460,8 @@ bool get_ExcST4B_lvgate(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcST4B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -468,7 +475,8 @@ bool get_ExcST4B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_thetap(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thetap; if (!buffer.str().empty()) @@ -482,7 +490,8 @@ bool get_ExcST4B_thetap(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcST4B_uel(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uel; if (!buffer.str().empty()) @@ -496,7 +505,8 @@ bool get_ExcST4B_uel(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vbmax; if (!buffer.str().empty()) @@ -510,7 +520,8 @@ bool get_ExcST4B_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST4B_vgmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vgmax; if (!buffer.str().empty()) @@ -524,7 +535,8 @@ bool get_ExcST4B_vgmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST4B_vmmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmmax; if (!buffer.str().empty()) @@ -538,7 +550,8 @@ bool get_ExcST4B_vmmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST4B_vmmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmmin; if (!buffer.str().empty()) @@ -552,7 +565,8 @@ bool get_ExcST4B_vmmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST4B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -566,7 +580,8 @@ bool get_ExcST4B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST4B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -580,7 +595,8 @@ bool get_ExcST4B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST4B_xl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xl; if (!buffer.str().empty()) @@ -592,8 +608,6 @@ bool get_ExcST4B_xl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcST4B::debugName[] = "ExcST4B"; const char* ExcST4B::debugString() const { @@ -602,30 +616,30 @@ const char* ExcST4B::debugString() const void ExcST4B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcST4B"), &ExcST4B_factory)); + factory_map.emplace("cim:ExcST4B", &ExcST4B_factory); } void ExcST4B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.kc"), &assign_ExcST4B_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.kg"), &assign_ExcST4B_kg)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.ki"), &assign_ExcST4B_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.kim"), &assign_ExcST4B_kim)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.kir"), &assign_ExcST4B_kir)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.kp"), &assign_ExcST4B_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.kpm"), &assign_ExcST4B_kpm)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.kpr"), &assign_ExcST4B_kpr)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.lvgate"), &assign_ExcST4B_lvgate)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.ta"), &assign_ExcST4B_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.thetap"), &assign_ExcST4B_thetap)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.uel"), &assign_ExcST4B_uel)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.vbmax"), &assign_ExcST4B_vbmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.vgmax"), &assign_ExcST4B_vgmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.vmmax"), &assign_ExcST4B_vmmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.vmmin"), &assign_ExcST4B_vmmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.vrmax"), &assign_ExcST4B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.vrmin"), &assign_ExcST4B_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.xl"), &assign_ExcST4B_xl)); + assign_map.emplace("cim:ExcST4B.kc", &assign_ExcST4B_kc); + assign_map.emplace("cim:ExcST4B.kg", &assign_ExcST4B_kg); + assign_map.emplace("cim:ExcST4B.ki", &assign_ExcST4B_ki); + assign_map.emplace("cim:ExcST4B.kim", &assign_ExcST4B_kim); + assign_map.emplace("cim:ExcST4B.kir", &assign_ExcST4B_kir); + assign_map.emplace("cim:ExcST4B.kp", &assign_ExcST4B_kp); + assign_map.emplace("cim:ExcST4B.kpm", &assign_ExcST4B_kpm); + assign_map.emplace("cim:ExcST4B.kpr", &assign_ExcST4B_kpr); + assign_map.emplace("cim:ExcST4B.lvgate", &assign_ExcST4B_lvgate); + assign_map.emplace("cim:ExcST4B.ta", &assign_ExcST4B_ta); + assign_map.emplace("cim:ExcST4B.thetap", &assign_ExcST4B_thetap); + assign_map.emplace("cim:ExcST4B.uel", &assign_ExcST4B_uel); + assign_map.emplace("cim:ExcST4B.vbmax", &assign_ExcST4B_vbmax); + assign_map.emplace("cim:ExcST4B.vgmax", &assign_ExcST4B_vgmax); + assign_map.emplace("cim:ExcST4B.vmmax", &assign_ExcST4B_vmmax); + assign_map.emplace("cim:ExcST4B.vmmin", &assign_ExcST4B_vmmin); + assign_map.emplace("cim:ExcST4B.vrmax", &assign_ExcST4B_vrmax); + assign_map.emplace("cim:ExcST4B.vrmin", &assign_ExcST4B_vrmin); + assign_map.emplace("cim:ExcST4B.xl", &assign_ExcST4B_xl); } void ExcST4B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcST4B.hpp b/CGMES_2.4.15_16FEB2016/ExcST4B.hpp index 9195981a2..5aa265787 100644 --- a/CGMES_2.4.15_16FEB2016/ExcST4B.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcST4B.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE ST4B static excitation system with maximum inner loop feedback gain . - */ + /** \brief Modified IEEE ST4B static excitation system with maximum inner loop feedback gain . */ class ExcST4B : public ExcitationSystemDynamics { public: @@ -30,25 +28,62 @@ namespace CIMPP ExcST4B(); ~ExcST4B() override; - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.113. Default: nullptr */ - CIMPP::PU kg; /* Feedback gain constant of the inner loop field regulator (Kg). Typical Value = 0. Default: nullptr */ - CIMPP::PU ki; /* Potential circuit gain coefficient (Ki). Typical Value = 0. Default: nullptr */ - CIMPP::PU kim; /* Voltage regulator integral gain output (Kim). Typical Value = 0. Default: nullptr */ - CIMPP::PU kir; /* Voltage regulator integral gain (Kir). Typical Value = 10.75. Default: nullptr */ - CIMPP::PU kp; /* Potential circuit gain coefficient (Kp). Typical Value = 9.3. Default: nullptr */ - CIMPP::PU kpm; /* Voltage regulator proportional gain output (Kpm). Typical Value = 1. Default: nullptr */ - CIMPP::PU kpr; /* Voltage regulator proportional gain (Kpr). Typical Value = 10.75. Default: nullptr */ - CIMPP::Boolean lvgate; /* Selector (LVgate). true = LVgate is part of the block diagram false = LVgate is not part of the block diagram. Typical Value = false. Default: false */ - CIMPP::Seconds ta; /* Voltage regulator time constant (Ta). Typical Value = 0.02. Default: nullptr */ - CIMPP::AngleDegrees thetap; /* Potential circuit phase angle (thetap). Typical Value = 0. Default: nullptr */ - CIMPP::Boolean uel; /* Selector (Uel). true = UEL is part of block diagram false = UEL is not part of block diagram. Typical Value = false. Default: false */ - CIMPP::PU vbmax; /* Maximum excitation voltage (Vbmax). Typical Value = 11.63. Default: nullptr */ - CIMPP::PU vgmax; /* Maximum inner loop feedback voltage (Vgmax). Typical Value = 5.8. Default: nullptr */ - CIMPP::PU vmmax; /* Maximum inner loop output (Vmmax). Typical Value = 99. Default: nullptr */ - CIMPP::PU vmmin; /* Minimum inner loop output (Vmmin). Typical Value = -99. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (Vrmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (Vrmin). Typical Value = -0.87. Default: nullptr */ - CIMPP::PU xl; /* Reactance associated with potential source (Xl). Typical Value = 0.124. Default: nullptr */ + /** \brief Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.113. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Feedback gain constant of the inner loop field regulator (Kg). Typical Value = 0. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Potential circuit gain coefficient (Ki). Typical Value = 0. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Voltage regulator integral gain output (Kim). Typical Value = 0. Default: nullptr */ + CIMPP::PU kim; + + /** \brief Voltage regulator integral gain (Kir). Typical Value = 10.75. Default: nullptr */ + CIMPP::PU kir; + + /** \brief Potential circuit gain coefficient (Kp). Typical Value = 9.3. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Voltage regulator proportional gain output (Kpm). Typical Value = 1. Default: nullptr */ + CIMPP::PU kpm; + + /** \brief Voltage regulator proportional gain (Kpr). Typical Value = 10.75. Default: nullptr */ + CIMPP::PU kpr; + + /** \brief Selector (LVgate). true = LVgate is part of the block diagram false = LVgate is not part of the block diagram. Typical Value = false. Default: false */ + CIMPP::Boolean lvgate; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Potential circuit phase angle (thetap). Typical Value = 0. Default: nullptr */ + CIMPP::AngleDegrees thetap; + + /** \brief Selector (Uel). true = UEL is part of block diagram false = UEL is not part of block diagram. Typical Value = false. Default: false */ + CIMPP::Boolean uel; + + /** \brief Maximum excitation voltage (Vbmax). Typical Value = 11.63. Default: nullptr */ + CIMPP::PU vbmax; + + /** \brief Maximum inner loop feedback voltage (Vgmax). Typical Value = 5.8. Default: nullptr */ + CIMPP::PU vgmax; + + /** \brief Maximum inner loop output (Vmmax). Typical Value = 99. Default: nullptr */ + CIMPP::PU vmmax; + + /** \brief Minimum inner loop output (Vmmin). Typical Value = -99. Default: nullptr */ + CIMPP::PU vmmin; + + /** \brief Maximum voltage regulator output (Vrmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (Vrmin). Typical Value = -0.87. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief Reactance associated with potential source (Xl). Typical Value = 0.124. Default: nullptr */ + CIMPP::PU xl; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcST6B.cpp b/CGMES_2.4.15_16FEB2016/ExcST6B.cpp index afee55093..9942e0b7a 100644 --- a/CGMES_2.4.15_16FEB2016/ExcST6B.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcST6B.cpp @@ -8,34 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ExcST6BOELselectorKind.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcST6B::ExcST6B() {}; -ExcST6B::~ExcST6B() {}; +ExcST6B::ExcST6B() {} +ExcST6B::~ExcST6B() {} static const std::list PossibleProfilesForClass = { @@ -84,311 +61,332 @@ ExcST6B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcST6B_ilr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_ilr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ilr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_kcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_kcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kcl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_kff(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_kff(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kff; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_kia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_kia(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kia; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_klr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_klr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->klr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_km(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_km(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->km; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_kpa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_kpa(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpa; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_kvd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_kvd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kvd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_oelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_oelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->oelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_ts(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_ts(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_tvd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_tvd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tvd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_vilim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_vilim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vilim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_vimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_vmult(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_vmult(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmult; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_xc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_xc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcST6B_ilr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ilr; if (!buffer.str().empty()) @@ -402,7 +400,8 @@ bool get_ExcST6B_ilr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -416,7 +415,8 @@ bool get_ExcST6B_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_kcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kcl; if (!buffer.str().empty()) @@ -430,7 +430,8 @@ bool get_ExcST6B_kcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_kff(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kff; if (!buffer.str().empty()) @@ -444,7 +445,8 @@ bool get_ExcST6B_kff(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -458,7 +460,8 @@ bool get_ExcST6B_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kia; if (!buffer.str().empty()) @@ -472,7 +475,8 @@ bool get_ExcST6B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_klr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->klr; if (!buffer.str().empty()) @@ -486,7 +490,8 @@ bool get_ExcST6B_klr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_km(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->km; if (!buffer.str().empty()) @@ -500,7 +505,8 @@ bool get_ExcST6B_km(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpa; if (!buffer.str().empty()) @@ -514,7 +520,8 @@ bool get_ExcST6B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_kvd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kvd; if (!buffer.str().empty()) @@ -526,9 +533,25 @@ bool get_ExcST6B_kvd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } +bool get_ExcST6B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->oelin; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_ExcST6B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -542,7 +565,8 @@ bool get_ExcST6B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_ts(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts; if (!buffer.str().empty()) @@ -556,7 +580,8 @@ bool get_ExcST6B_ts(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_tvd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tvd; if (!buffer.str().empty()) @@ -570,7 +595,8 @@ bool get_ExcST6B_tvd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -584,7 +610,8 @@ bool get_ExcST6B_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST6B_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -598,7 +625,8 @@ bool get_ExcST6B_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST6B_vilim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vilim; if (!buffer.str().empty()) @@ -612,7 +640,8 @@ bool get_ExcST6B_vilim(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST6B_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -626,7 +655,8 @@ bool get_ExcST6B_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST6B_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimin; if (!buffer.str().empty()) @@ -640,7 +670,8 @@ bool get_ExcST6B_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST6B_vmult(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmult; if (!buffer.str().empty()) @@ -654,7 +685,8 @@ bool get_ExcST6B_vmult(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST6B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -668,7 +700,8 @@ bool get_ExcST6B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST6B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -682,7 +715,8 @@ bool get_ExcST6B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST6B_xc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xc; if (!buffer.str().empty()) @@ -694,22 +728,6 @@ bool get_ExcST6B_xc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - -bool get_ExcST6B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->oelin; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char ExcST6B::debugName[] = "ExcST6B"; const char* ExcST6B::debugString() const { @@ -718,34 +736,34 @@ const char* ExcST6B::debugString() const void ExcST6B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcST6B"), &ExcST6B_factory)); + factory_map.emplace("cim:ExcST6B", &ExcST6B_factory); } void ExcST6B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.ilr"), &assign_ExcST6B_ilr)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.k1"), &assign_ExcST6B_k1)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.kcl"), &assign_ExcST6B_kcl)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.kff"), &assign_ExcST6B_kff)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.kg"), &assign_ExcST6B_kg)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.kia"), &assign_ExcST6B_kia)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.klr"), &assign_ExcST6B_klr)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.km"), &assign_ExcST6B_km)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.kpa"), &assign_ExcST6B_kpa)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.kvd"), &assign_ExcST6B_kvd)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.oelin"), &assign_ExcST6B_oelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.tg"), &assign_ExcST6B_tg)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.ts"), &assign_ExcST6B_ts)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.tvd"), &assign_ExcST6B_tvd)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.vamax"), &assign_ExcST6B_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.vamin"), &assign_ExcST6B_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.vilim"), &assign_ExcST6B_vilim)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.vimax"), &assign_ExcST6B_vimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.vimin"), &assign_ExcST6B_vimin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.vmult"), &assign_ExcST6B_vmult)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.vrmax"), &assign_ExcST6B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.vrmin"), &assign_ExcST6B_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.xc"), &assign_ExcST6B_xc)); + assign_map.emplace("cim:ExcST6B.ilr", &assign_ExcST6B_ilr); + assign_map.emplace("cim:ExcST6B.k1", &assign_ExcST6B_k1); + assign_map.emplace("cim:ExcST6B.kcl", &assign_ExcST6B_kcl); + assign_map.emplace("cim:ExcST6B.kff", &assign_ExcST6B_kff); + assign_map.emplace("cim:ExcST6B.kg", &assign_ExcST6B_kg); + assign_map.emplace("cim:ExcST6B.kia", &assign_ExcST6B_kia); + assign_map.emplace("cim:ExcST6B.klr", &assign_ExcST6B_klr); + assign_map.emplace("cim:ExcST6B.km", &assign_ExcST6B_km); + assign_map.emplace("cim:ExcST6B.kpa", &assign_ExcST6B_kpa); + assign_map.emplace("cim:ExcST6B.kvd", &assign_ExcST6B_kvd); + assign_map.emplace("cim:ExcST6B.oelin", &assign_ExcST6B_oelin); + assign_map.emplace("cim:ExcST6B.tg", &assign_ExcST6B_tg); + assign_map.emplace("cim:ExcST6B.ts", &assign_ExcST6B_ts); + assign_map.emplace("cim:ExcST6B.tvd", &assign_ExcST6B_tvd); + assign_map.emplace("cim:ExcST6B.vamax", &assign_ExcST6B_vamax); + assign_map.emplace("cim:ExcST6B.vamin", &assign_ExcST6B_vamin); + assign_map.emplace("cim:ExcST6B.vilim", &assign_ExcST6B_vilim); + assign_map.emplace("cim:ExcST6B.vimax", &assign_ExcST6B_vimax); + assign_map.emplace("cim:ExcST6B.vimin", &assign_ExcST6B_vimin); + assign_map.emplace("cim:ExcST6B.vmult", &assign_ExcST6B_vmult); + assign_map.emplace("cim:ExcST6B.vrmax", &assign_ExcST6B_vrmax); + assign_map.emplace("cim:ExcST6B.vrmin", &assign_ExcST6B_vrmin); + assign_map.emplace("cim:ExcST6B.xc", &assign_ExcST6B_xc); } void ExcST6B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcST6B.hpp b/CGMES_2.4.15_16FEB2016/ExcST6B.hpp index 2f7fef5c8..5b79ac602 100644 --- a/CGMES_2.4.15_16FEB2016/ExcST6B.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcST6B.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE ST6B static excitation system with PID controller and optional inner feedbacks loop. - */ + /** \brief Modified IEEE ST6B static excitation system with PID controller and optional inner feedbacks loop. */ class ExcST6B : public ExcitationSystemDynamics { public: @@ -30,29 +28,74 @@ namespace CIMPP ExcST6B(); ~ExcST6B() override; - CIMPP::PU ilr; /* Exciter output current limit reference (Ilr). Typical Value = 4.164. Default: nullptr */ - CIMPP::Boolean k1; /* Selector (K1). true = feedback is from Ifd false = feedback is not from Ifd. Typical Value = true. Default: false */ - CIMPP::PU kcl; /* Exciter output current limit adjustment (Kcl). Typical Value = 1.0577. Default: nullptr */ - CIMPP::PU kff; /* Pre-control gain constant of the inner loop field regulator (Kff). Typical Value = 1. Default: nullptr */ - CIMPP::PU kg; /* Feedback gain constant of the inner loop field regulator (Kg). Typical Value = 1. Default: nullptr */ - CIMPP::PU kia; /* Voltage regulator integral gain (Kia). Typical Value = 45.094. Default: nullptr */ - CIMPP::PU klr; /* Exciter output current limit adjustment (Kcl). Typical Value = 17.33. Default: nullptr */ - CIMPP::PU km; /* Forward gain constant of the inner loop field regulator (Km). Typical Value = 1. Default: nullptr */ - CIMPP::PU kpa; /* Voltage regulator proportional gain (Kpa). Typical Value = 18.038. Default: nullptr */ - CIMPP::PU kvd; /* Voltage regulator derivative gain (Kvd). Typical Value = 0. Default: nullptr */ - CIMPP::ExcST6BOELselectorKind oelin; /* OEL input selector (OELin). Typical Value = noOELinput. Default: 0 */ - CIMPP::Seconds tg; /* Feedback time constant of inner loop field voltage regulator (Tg). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds ts; /* Rectifier firing time constant (Ts). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tvd; /* Voltage regulator derivative gain (Tvd). Typical Value = 0. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (Vamax). Typical Value = 4.81. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (Vamin). Typical Value = -3.85. Default: nullptr */ - CIMPP::Boolean vilim; /* Selector (Vilim). true = Vimin-Vimax limiter is active false = Vimin-Vimax limiter is not active. Typical Value = true. Default: false */ - CIMPP::PU vimax; /* Maximum voltage regulator input limit (Vimax). Typical Value = 10. Default: nullptr */ - CIMPP::PU vimin; /* Minimum voltage regulator input limit (Vimin). Typical Value = -10. Default: nullptr */ - CIMPP::Boolean vmult; /* Selector (Vmult). true = multiply regulator output by terminal voltage false = do not multiply regulator output by terminal voltage. Typical Value = true. Default: false */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (Vrmax). Typical Value = 4.81. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (Vrmin). Typical Value = -3.85. Default: nullptr */ - CIMPP::PU xc; /* Excitation source reactance (Xc). Typical Value = 0.05. Default: nullptr */ + /** \brief Exciter output current limit reference (Ilr). Typical Value = 4.164. Default: nullptr */ + CIMPP::PU ilr; + + /** \brief Selector (K1). true = feedback is from Ifd false = feedback is not from Ifd. Typical Value = true. Default: false */ + CIMPP::Boolean k1; + + /** \brief Exciter output current limit adjustment (Kcl). Typical Value = 1.0577. Default: nullptr */ + CIMPP::PU kcl; + + /** \brief Pre-control gain constant of the inner loop field regulator (Kff). Typical Value = 1. Default: nullptr */ + CIMPP::PU kff; + + /** \brief Feedback gain constant of the inner loop field regulator (Kg). Typical Value = 1. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Voltage regulator integral gain (Kia). Typical Value = 45.094. Default: nullptr */ + CIMPP::PU kia; + + /** \brief Exciter output current limit adjustment (Kcl). Typical Value = 17.33. Default: nullptr */ + CIMPP::PU klr; + + /** \brief Forward gain constant of the inner loop field regulator (Km). Typical Value = 1. Default: nullptr */ + CIMPP::PU km; + + /** \brief Voltage regulator proportional gain (Kpa). Typical Value = 18.038. Default: nullptr */ + CIMPP::PU kpa; + + /** \brief Voltage regulator derivative gain (Kvd). Typical Value = 0. Default: nullptr */ + CIMPP::PU kvd; + + /** \brief OEL input selector (OELin). Typical Value = noOELinput. Default: 0 */ + CIMPP::ExcST6BOELselectorKind oelin; + + /** \brief Feedback time constant of inner loop field voltage regulator (Tg). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Rectifier firing time constant (Ts). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ts; + + /** \brief Voltage regulator derivative gain (Tvd). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tvd; + + /** \brief Maximum voltage regulator output (Vamax). Typical Value = 4.81. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (Vamin). Typical Value = -3.85. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Selector (Vilim). true = Vimin-Vimax limiter is active false = Vimin-Vimax limiter is not active. Typical Value = true. Default: false */ + CIMPP::Boolean vilim; + + /** \brief Maximum voltage regulator input limit (Vimax). Typical Value = 10. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Minimum voltage regulator input limit (Vimin). Typical Value = -10. Default: nullptr */ + CIMPP::PU vimin; + + /** \brief Selector (Vmult). true = multiply regulator output by terminal voltage false = do not multiply regulator output by terminal voltage. Typical Value = true. Default: false */ + CIMPP::Boolean vmult; + + /** \brief Maximum voltage regulator output (Vrmax). Typical Value = 4.81. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (Vrmin). Typical Value = -3.85. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief Excitation source reactance (Xc). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU xc; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcST6BOELselectorKind.cpp b/CGMES_2.4.15_16FEB2016/ExcST6BOELselectorKind.cpp index 4a1e0d921..51950ed6b 100644 --- a/CGMES_2.4.15_16FEB2016/ExcST6BOELselectorKind.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcST6BOELselectorKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "ExcST6BOELselectorKind") + if (EnumSymbol.substr(0, pos) != "ExcST6BOELselectorKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "noOELinput") + if (EnumSymbol == "noOELinput") { rop = ExcST6BOELselectorKind::noOELinput; return lop; } - if(EnumSymbol == "beforeUEL") + if (EnumSymbol == "beforeUEL") { rop = ExcST6BOELselectorKind::beforeUEL; return lop; } - if(EnumSymbol == "afterUEL") + if (EnumSymbol == "afterUEL") { rop = ExcST6BOELselectorKind::afterUEL; return lop; diff --git a/CGMES_2.4.15_16FEB2016/ExcST6BOELselectorKind.hpp b/CGMES_2.4.15_16FEB2016/ExcST6BOELselectorKind.hpp index b30b3b8df..da01aa9f6 100644 --- a/CGMES_2.4.15_16FEB2016/ExcST6BOELselectorKind.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcST6BOELselectorKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of connection for the OEL input used for static excitation systems type 6B. - */ + /** \brief Type of connection for the OEL input used for static excitation systems type 6B. */ class ExcST6BOELselectorKind { public: enum ExcST6BOELselectorKind_ENUM { - /** - * No OEL input is used. - */ + /** No OEL input is used. */ noOELinput, - /** - * The connection is before UEL. - */ + /** The connection is before UEL. */ beforeUEL, - /** - * The connection is after UEL. - */ + /** The connection is after UEL. */ afterUEL, }; diff --git a/CGMES_2.4.15_16FEB2016/ExcST7B.cpp b/CGMES_2.4.15_16FEB2016/ExcST7B.cpp index 1107dc70a..b353d3afa 100644 --- a/CGMES_2.4.15_16FEB2016/ExcST7B.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcST7B.cpp @@ -8,27 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ExcST7BOELselectorKind.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "ExcST7BUELselectorKind.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcST7B::ExcST7B() {}; -ExcST7B::~ExcST7B() {}; +ExcST7B::ExcST7B() {} +ExcST7B::~ExcST7B() {} static const std::list PossibleProfilesForClass = { @@ -70,220 +54,234 @@ ExcST7B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcST7B_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_kh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_kia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_kia(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kia; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_kl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_kl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_kpa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_kpa(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpa; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_oelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_oelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->oelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_tia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_tia(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tia; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_ts(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_ts(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_uelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_vmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_vmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcST7B_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh; if (!buffer.str().empty()) @@ -297,7 +295,8 @@ bool get_ExcST7B_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST7B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kia; if (!buffer.str().empty()) @@ -311,7 +310,8 @@ bool get_ExcST7B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST7B_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl; if (!buffer.str().empty()) @@ -325,7 +325,8 @@ bool get_ExcST7B_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST7B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpa; if (!buffer.str().empty()) @@ -337,9 +338,25 @@ bool get_ExcST7B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } +bool get_ExcST7B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->oelin; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_ExcST7B_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -353,7 +370,8 @@ bool get_ExcST7B_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST7B_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -367,7 +385,8 @@ bool get_ExcST7B_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST7B_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -381,7 +400,8 @@ bool get_ExcST7B_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST7B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -395,7 +415,8 @@ bool get_ExcST7B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST7B_tia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tia; if (!buffer.str().empty()) @@ -409,7 +430,8 @@ bool get_ExcST7B_tia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST7B_ts(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts; if (!buffer.str().empty()) @@ -421,25 +443,12 @@ bool get_ExcST7B_ts(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } -bool get_ExcST7B_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->vmax; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - -bool get_ExcST7B_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcST7B_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vmin; + buffer << element->uelin; if (!buffer.str().empty()) { return true; @@ -449,11 +458,12 @@ bool get_ExcST7B_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } -bool get_ExcST7B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcST7B_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vrmax; + buffer << element->vmax; if (!buffer.str().empty()) { return true; @@ -463,11 +473,12 @@ bool get_ExcST7B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } -bool get_ExcST7B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcST7B_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vrmin; + buffer << element->vmin; if (!buffer.str().empty()) { return true; @@ -477,13 +488,12 @@ bool get_ExcST7B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - -bool get_ExcST7B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcST7B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->oelin; + buffer << element->vrmax; if (!buffer.str().empty()) { return true; @@ -493,11 +503,12 @@ bool get_ExcST7B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } -bool get_ExcST7B_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcST7B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->uelin; + buffer << element->vrmin; if (!buffer.str().empty()) { return true; @@ -515,27 +526,27 @@ const char* ExcST7B::debugString() const void ExcST7B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcST7B"), &ExcST7B_factory)); + factory_map.emplace("cim:ExcST7B", &ExcST7B_factory); } void ExcST7B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.kh"), &assign_ExcST7B_kh)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.kia"), &assign_ExcST7B_kia)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.kl"), &assign_ExcST7B_kl)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.kpa"), &assign_ExcST7B_kpa)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.oelin"), &assign_ExcST7B_oelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.tb"), &assign_ExcST7B_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.tc"), &assign_ExcST7B_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.tf"), &assign_ExcST7B_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.tg"), &assign_ExcST7B_tg)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.tia"), &assign_ExcST7B_tia)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.ts"), &assign_ExcST7B_ts)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.uelin"), &assign_ExcST7B_uelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.vmax"), &assign_ExcST7B_vmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.vmin"), &assign_ExcST7B_vmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.vrmax"), &assign_ExcST7B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.vrmin"), &assign_ExcST7B_vrmin)); + assign_map.emplace("cim:ExcST7B.kh", &assign_ExcST7B_kh); + assign_map.emplace("cim:ExcST7B.kia", &assign_ExcST7B_kia); + assign_map.emplace("cim:ExcST7B.kl", &assign_ExcST7B_kl); + assign_map.emplace("cim:ExcST7B.kpa", &assign_ExcST7B_kpa); + assign_map.emplace("cim:ExcST7B.oelin", &assign_ExcST7B_oelin); + assign_map.emplace("cim:ExcST7B.tb", &assign_ExcST7B_tb); + assign_map.emplace("cim:ExcST7B.tc", &assign_ExcST7B_tc); + assign_map.emplace("cim:ExcST7B.tf", &assign_ExcST7B_tf); + assign_map.emplace("cim:ExcST7B.tg", &assign_ExcST7B_tg); + assign_map.emplace("cim:ExcST7B.tia", &assign_ExcST7B_tia); + assign_map.emplace("cim:ExcST7B.ts", &assign_ExcST7B_ts); + assign_map.emplace("cim:ExcST7B.uelin", &assign_ExcST7B_uelin); + assign_map.emplace("cim:ExcST7B.vmax", &assign_ExcST7B_vmax); + assign_map.emplace("cim:ExcST7B.vmin", &assign_ExcST7B_vmin); + assign_map.emplace("cim:ExcST7B.vrmax", &assign_ExcST7B_vrmax); + assign_map.emplace("cim:ExcST7B.vrmin", &assign_ExcST7B_vrmin); } void ExcST7B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExcST7B.hpp b/CGMES_2.4.15_16FEB2016/ExcST7B.hpp index 20c23baab..3a015ea97 100644 --- a/CGMES_2.4.15_16FEB2016/ExcST7B.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcST7B.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE ST7B static excitation system without stator current limiter (SCL) and current compensator (DROOP) inputs. - */ + /** \brief Modified IEEE ST7B static excitation system without stator current limiter (SCL) and current compensator (DROOP) inputs. */ class ExcST7B : public ExcitationSystemDynamics { public: @@ -30,22 +28,53 @@ namespace CIMPP ExcST7B(); ~ExcST7B() override; - CIMPP::PU kh; /* High-value gate feedback gain (Kh). Typical Value = 1. Default: nullptr */ - CIMPP::PU kia; /* Voltage regulator integral gain (Kia). Typical Value = 1. Default: nullptr */ - CIMPP::PU kl; /* Low-value gate feedback gain (Kl). Typical Value = 1. Default: nullptr */ - CIMPP::PU kpa; /* Voltage regulator proportional gain (Kpa). Typical Value = 40. Default: nullptr */ - CIMPP::ExcST7BOELselectorKind oelin; /* OEL input selector (OELin). Typical Value = noOELinput. Default: 0 */ - CIMPP::Seconds tb; /* Regulator lag time constant (Tb). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tc; /* Regulator lead time constant (Tc). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (Tf). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tg; /* Feedback time constant of inner loop field voltage regulator (Tg). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tia; /* Feedback time constant (Tia). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds ts; /* Rectifier firing time constant (Ts). Typical Value = 0. Default: nullptr */ - CIMPP::ExcST7BUELselectorKind uelin; /* UEL input selector (UELin). Typical Value = noUELinput. Default: 0 */ - CIMPP::PU vmax; /* Maximum voltage reference signal (Vmax). Typical Value = 1.1. Default: nullptr */ - CIMPP::PU vmin; /* Minimum voltage reference signal (Vmin). Typical Value = 0.9. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (Vrmax). Typical Value = 5. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (Vrmin). Typical Value = -4.5. Default: nullptr */ + /** \brief High-value gate feedback gain (Kh). Typical Value = 1. Default: nullptr */ + CIMPP::PU kh; + + /** \brief Voltage regulator integral gain (Kia). Typical Value = 1. Default: nullptr */ + CIMPP::PU kia; + + /** \brief Low-value gate feedback gain (Kl). Typical Value = 1. Default: nullptr */ + CIMPP::PU kl; + + /** \brief Voltage regulator proportional gain (Kpa). Typical Value = 40. Default: nullptr */ + CIMPP::PU kpa; + + /** \brief OEL input selector (OELin). Typical Value = noOELinput. Default: 0 */ + CIMPP::ExcST7BOELselectorKind oelin; + + /** \brief Regulator lag time constant (Tb). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Regulator lead time constant (Tc). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Excitation control system stabilizer time constant (Tf). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Feedback time constant of inner loop field voltage regulator (Tg). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Feedback time constant (Tia). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds tia; + + /** \brief Rectifier firing time constant (Ts). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ts; + + /** \brief UEL input selector (UELin). Typical Value = noUELinput. Default: 0 */ + CIMPP::ExcST7BUELselectorKind uelin; + + /** \brief Maximum voltage reference signal (Vmax). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU vmax; + + /** \brief Minimum voltage reference signal (Vmin). Typical Value = 0.9. Default: nullptr */ + CIMPP::PU vmin; + + /** \brief Maximum voltage regulator output (Vrmax). Typical Value = 5. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (Vrmin). Typical Value = -4.5. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcST7BOELselectorKind.cpp b/CGMES_2.4.15_16FEB2016/ExcST7BOELselectorKind.cpp index d400a7859..dada552c0 100644 --- a/CGMES_2.4.15_16FEB2016/ExcST7BOELselectorKind.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcST7BOELselectorKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "ExcST7BOELselectorKind") + if (EnumSymbol.substr(0, pos) != "ExcST7BOELselectorKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,22 +50,22 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "noOELinput") + if (EnumSymbol == "noOELinput") { rop = ExcST7BOELselectorKind::noOELinput; return lop; } - if(EnumSymbol == "addVref") + if (EnumSymbol == "addVref") { rop = ExcST7BOELselectorKind::addVref; return lop; } - if(EnumSymbol == "inputLVgate") + if (EnumSymbol == "inputLVgate") { rop = ExcST7BOELselectorKind::inputLVgate; return lop; } - if(EnumSymbol == "outputLVgate") + if (EnumSymbol == "outputLVgate") { rop = ExcST7BOELselectorKind::outputLVgate; return lop; diff --git a/CGMES_2.4.15_16FEB2016/ExcST7BOELselectorKind.hpp b/CGMES_2.4.15_16FEB2016/ExcST7BOELselectorKind.hpp index 66d97cdae..12dda93d8 100644 --- a/CGMES_2.4.15_16FEB2016/ExcST7BOELselectorKind.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcST7BOELselectorKind.hpp @@ -9,29 +9,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of connection for the OEL input used for static excitation systems type 7B. - */ + /** \brief Type of connection for the OEL input used for static excitation systems type 7B. */ class ExcST7BOELselectorKind { public: enum ExcST7BOELselectorKind_ENUM { - /** - * No OEL input is used. - */ + /** No OEL input is used. */ noOELinput, - /** - * The signal is added to Vref. - */ + /** The signal is added to Vref. */ addVref, - /** - * The signal is connected in the input of the LV gate. - */ + /** The signal is connected in the input of the LV gate. */ inputLVgate, - /** - * The signal is connected in the output of the LV gate. - */ + /** The signal is connected in the output of the LV gate. */ outputLVgate, }; diff --git a/CGMES_2.4.15_16FEB2016/ExcST7BUELselectorKind.cpp b/CGMES_2.4.15_16FEB2016/ExcST7BUELselectorKind.cpp index 2260a4e4d..b1e5d769d 100644 --- a/CGMES_2.4.15_16FEB2016/ExcST7BUELselectorKind.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcST7BUELselectorKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "ExcST7BUELselectorKind") + if (EnumSymbol.substr(0, pos) != "ExcST7BUELselectorKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,22 +50,22 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "noUELinput") + if (EnumSymbol == "noUELinput") { rop = ExcST7BUELselectorKind::noUELinput; return lop; } - if(EnumSymbol == "addVref") + if (EnumSymbol == "addVref") { rop = ExcST7BUELselectorKind::addVref; return lop; } - if(EnumSymbol == "inputHVgate") + if (EnumSymbol == "inputHVgate") { rop = ExcST7BUELselectorKind::inputHVgate; return lop; } - if(EnumSymbol == "outputHVgate") + if (EnumSymbol == "outputHVgate") { rop = ExcST7BUELselectorKind::outputHVgate; return lop; diff --git a/CGMES_2.4.15_16FEB2016/ExcST7BUELselectorKind.hpp b/CGMES_2.4.15_16FEB2016/ExcST7BUELselectorKind.hpp index b509d7dad..59ed16d28 100644 --- a/CGMES_2.4.15_16FEB2016/ExcST7BUELselectorKind.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcST7BUELselectorKind.hpp @@ -9,29 +9,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of connection for the UEL input used for static excitation systems type 7B. - */ + /** \brief Type of connection for the UEL input used for static excitation systems type 7B. */ class ExcST7BUELselectorKind { public: enum ExcST7BUELselectorKind_ENUM { - /** - * No UEL input is used. - */ + /** No UEL input is used. */ noUELinput, - /** - * The signal is added to Vref. - */ + /** The signal is added to Vref. */ addVref, - /** - * The signal is connected in the input of the HV gate. - */ + /** The signal is connected in the input of the HV gate. */ inputHVgate, - /** - * The signal is connected in the output of the HV gate. - */ + /** The signal is connected in the output of the HV gate. */ outputHVgate, }; diff --git a/CGMES_2.4.15_16FEB2016/ExcitationSystemDynamics.cpp b/CGMES_2.4.15_16FEB2016/ExcitationSystemDynamics.cpp index dcd25126a..540af8c6a 100644 --- a/CGMES_2.4.15_16FEB2016/ExcitationSystemDynamics.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcitationSystemDynamics.cpp @@ -19,8 +19,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ExcitationSystemDynamics::ExcitationSystemDynamics() : DiscontinuousExcitationControlDynamics(nullptr), OverexcitationLimiterDynamics(nullptr), PFVArControllerType1Dynamics(nullptr), PFVArControllerType2Dynamics(nullptr), PowerSystemStabilizerDynamics(nullptr), SynchronousMachineDynamics(nullptr), UnderexcitationLimiterDynamics(nullptr), VoltageCompensatorDynamics(nullptr) {}; -ExcitationSystemDynamics::~ExcitationSystemDynamics() {}; +ExcitationSystemDynamics::ExcitationSystemDynamics() : DiscontinuousExcitationControlDynamics(nullptr), OverexcitationLimiterDynamics(nullptr), PFVArControllerType1Dynamics(nullptr), PFVArControllerType2Dynamics(nullptr), PowerSystemStabilizerDynamics(nullptr), SynchronousMachineDynamics(nullptr), UnderexcitationLimiterDynamics(nullptr), VoltageCompensatorDynamics(nullptr) {} +ExcitationSystemDynamics::~ExcitationSystemDynamics() {} static const std::list PossibleProfilesForClass = { @@ -54,8 +54,6 @@ ExcitationSystemDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_DiscontinuousExcitationControlDynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); bool assign_ExcitationSystemDynamics_DiscontinuousExcitationControlDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -72,6 +70,7 @@ bool assign_ExcitationSystemDynamics_DiscontinuousExcitationControlDynamics(Base } return false; } + bool assign_OverexcitationLimiterDynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); bool assign_ExcitationSystemDynamics_OverexcitationLimiterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -88,6 +87,7 @@ bool assign_ExcitationSystemDynamics_OverexcitationLimiterDynamics(BaseClass* Ba } return false; } + bool assign_PFVArControllerType1Dynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); bool assign_ExcitationSystemDynamics_PFVArControllerType1Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -104,6 +104,7 @@ bool assign_ExcitationSystemDynamics_PFVArControllerType1Dynamics(BaseClass* Bas } return false; } + bool assign_PFVArControllerType2Dynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); bool assign_ExcitationSystemDynamics_PFVArControllerType2Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -120,6 +121,7 @@ bool assign_ExcitationSystemDynamics_PFVArControllerType2Dynamics(BaseClass* Bas } return false; } + bool assign_PowerSystemStabilizerDynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); bool assign_ExcitationSystemDynamics_PowerSystemStabilizerDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -136,6 +138,7 @@ bool assign_ExcitationSystemDynamics_PowerSystemStabilizerDynamics(BaseClass* Ba } return false; } + bool assign_SynchronousMachineDynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); bool assign_ExcitationSystemDynamics_SynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -152,6 +155,7 @@ bool assign_ExcitationSystemDynamics_SynchronousMachineDynamics(BaseClass* BaseC } return false; } + bool assign_UnderexcitationLimiterDynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); bool assign_ExcitationSystemDynamics_UnderexcitationLimiterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -168,6 +172,7 @@ bool assign_ExcitationSystemDynamics_UnderexcitationLimiterDynamics(BaseClass* B } return false; } + bool assign_VoltageCompensatorDynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); bool assign_ExcitationSystemDynamics_VoltageCompensatorDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -186,9 +191,14 @@ bool assign_ExcitationSystemDynamics_VoltageCompensatorDynamics(BaseClass* BaseC } + + + + bool get_ExcitationSystemDynamics_SynchronousMachineDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ExcitationSystemDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ExcitationSystemDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->SynchronousMachineDynamics != 0) { @@ -200,6 +210,7 @@ bool get_ExcitationSystemDynamics_SynchronousMachineDynamics(const BaseClass* Ba } + const char ExcitationSystemDynamics::debugName[] = "ExcitationSystemDynamics"; const char* ExcitationSystemDynamics::debugString() const { @@ -208,7 +219,7 @@ const char* ExcitationSystemDynamics::debugString() const void ExcitationSystemDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics"), &ExcitationSystemDynamics_factory)); + factory_map.emplace("cim:ExcitationSystemDynamics", &ExcitationSystemDynamics_factory); } void ExcitationSystemDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -217,14 +228,14 @@ void ExcitationSystemDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics.DiscontinuousExcitationControlDynamics"), &assign_ExcitationSystemDynamics_DiscontinuousExcitationControlDynamics)); - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics.OverexcitationLimiterDynamics"), &assign_ExcitationSystemDynamics_OverexcitationLimiterDynamics)); - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics.PFVArControllerType1Dynamics"), &assign_ExcitationSystemDynamics_PFVArControllerType1Dynamics)); - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics.PFVArControllerType2Dynamics"), &assign_ExcitationSystemDynamics_PFVArControllerType2Dynamics)); - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics.PowerSystemStabilizerDynamics"), &assign_ExcitationSystemDynamics_PowerSystemStabilizerDynamics)); - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics.SynchronousMachineDynamics"), &assign_ExcitationSystemDynamics_SynchronousMachineDynamics)); - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics.UnderexcitationLimiterDynamics"), &assign_ExcitationSystemDynamics_UnderexcitationLimiterDynamics)); - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics.VoltageCompensatorDynamics"), &assign_ExcitationSystemDynamics_VoltageCompensatorDynamics)); + assign_map.emplace("cim:ExcitationSystemDynamics.DiscontinuousExcitationControlDynamics", &assign_ExcitationSystemDynamics_DiscontinuousExcitationControlDynamics); + assign_map.emplace("cim:ExcitationSystemDynamics.OverexcitationLimiterDynamics", &assign_ExcitationSystemDynamics_OverexcitationLimiterDynamics); + assign_map.emplace("cim:ExcitationSystemDynamics.PFVArControllerType1Dynamics", &assign_ExcitationSystemDynamics_PFVArControllerType1Dynamics); + assign_map.emplace("cim:ExcitationSystemDynamics.PFVArControllerType2Dynamics", &assign_ExcitationSystemDynamics_PFVArControllerType2Dynamics); + assign_map.emplace("cim:ExcitationSystemDynamics.PowerSystemStabilizerDynamics", &assign_ExcitationSystemDynamics_PowerSystemStabilizerDynamics); + assign_map.emplace("cim:ExcitationSystemDynamics.SynchronousMachineDynamics", &assign_ExcitationSystemDynamics_SynchronousMachineDynamics); + assign_map.emplace("cim:ExcitationSystemDynamics.UnderexcitationLimiterDynamics", &assign_ExcitationSystemDynamics_UnderexcitationLimiterDynamics); + assign_map.emplace("cim:ExcitationSystemDynamics.VoltageCompensatorDynamics", &assign_ExcitationSystemDynamics_VoltageCompensatorDynamics); } void ExcitationSystemDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/ExcitationSystemDynamics.hpp b/CGMES_2.4.15_16FEB2016/ExcitationSystemDynamics.hpp index eb633b2b1..eb20de209 100644 --- a/CGMES_2.4.15_16FEB2016/ExcitationSystemDynamics.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcitationSystemDynamics.hpp @@ -24,9 +24,7 @@ namespace CIMPP class UnderexcitationLimiterDynamics; class VoltageCompensatorDynamics; - /* - Excitation system function block whose behavior is described by reference to a standard model - */ + /** \brief Excitation system function block whose behavior is described by reference to a standard model */ class ExcitationSystemDynamics : public DynamicsFunctionBlock { public: @@ -34,14 +32,29 @@ namespace CIMPP ExcitationSystemDynamics(); ~ExcitationSystemDynamics() override; - CIMPP::DiscontinuousExcitationControlDynamics* DiscontinuousExcitationControlDynamics; /* Discontinuous excitation control model associated with this excitation system model. Default: 0 */ - CIMPP::OverexcitationLimiterDynamics* OverexcitationLimiterDynamics; /* Overexcitation limiter model associated with this excitation system model. Default: 0 */ - CIMPP::PFVArControllerType1Dynamics* PFVArControllerType1Dynamics; /* Power Factor or VAr controller Type I model associated with this excitation system model. Default: 0 */ - CIMPP::PFVArControllerType2Dynamics* PFVArControllerType2Dynamics; /* Power Factor or VAr controller Type II model associated with this excitation system model. Default: 0 */ - CIMPP::PowerSystemStabilizerDynamics* PowerSystemStabilizerDynamics; /* Power system stabilizer model associated with this excitation system model. Default: 0 */ - CIMPP::SynchronousMachineDynamics* SynchronousMachineDynamics; /* Synchronous machine model with which this excitation system model is associated. Default: 0 */ - CIMPP::UnderexcitationLimiterDynamics* UnderexcitationLimiterDynamics; /* Undrexcitation limiter model associated with this excitation system model. Default: 0 */ - CIMPP::VoltageCompensatorDynamics* VoltageCompensatorDynamics; /* Voltage compensator model associated with this excitation system model. Default: 0 */ + /** \brief Discontinuous excitation control model associated with this excitation system model. Default: 0 */ + CIMPP::DiscontinuousExcitationControlDynamics* DiscontinuousExcitationControlDynamics; + + /** \brief Overexcitation limiter model associated with this excitation system model. Default: 0 */ + CIMPP::OverexcitationLimiterDynamics* OverexcitationLimiterDynamics; + + /** \brief Power Factor or VAr controller Type I model associated with this excitation system model. Default: 0 */ + CIMPP::PFVArControllerType1Dynamics* PFVArControllerType1Dynamics; + + /** \brief Power Factor or VAr controller Type II model associated with this excitation system model. Default: 0 */ + CIMPP::PFVArControllerType2Dynamics* PFVArControllerType2Dynamics; + + /** \brief Power system stabilizer model associated with this excitation system model. Default: 0 */ + CIMPP::PowerSystemStabilizerDynamics* PowerSystemStabilizerDynamics; + + /** \brief Synchronous machine model with which this excitation system model is associated. Default: 0 */ + CIMPP::SynchronousMachineDynamics* SynchronousMachineDynamics; + + /** \brief Undrexcitation limiter model associated with this excitation system model. Default: 0 */ + CIMPP::UnderexcitationLimiterDynamics* UnderexcitationLimiterDynamics; + + /** \brief Voltage compensator model associated with this excitation system model. Default: 0 */ + CIMPP::VoltageCompensatorDynamics* VoltageCompensatorDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExcitationSystemUserDefined.cpp b/CGMES_2.4.15_16FEB2016/ExcitationSystemUserDefined.cpp index 15f84f6b0..362ef357e 100644 --- a/CGMES_2.4.15_16FEB2016/ExcitationSystemUserDefined.cpp +++ b/CGMES_2.4.15_16FEB2016/ExcitationSystemUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -ExcitationSystemUserDefined::ExcitationSystemUserDefined() {}; -ExcitationSystemUserDefined::~ExcitationSystemUserDefined() {}; +ExcitationSystemUserDefined::ExcitationSystemUserDefined() {} +ExcitationSystemUserDefined::~ExcitationSystemUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ ExcitationSystemUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcitationSystemUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ExcitationSystemUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_ExcitationSystemUserDefined(BaseClass*, BaseClass*); bool assign_ExcitationSystemUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_ExcitationSystemUserDefined_ProprietaryParameterDynamics(BaseClass* return false; } +bool assign_ExcitationSystemUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + ExcitationSystemUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_ExcitationSystemUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcitationSystemUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const ExcitationSystemUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_ExcitationSystemUserDefined_proprietary(const BaseClass* BaseClass_ptr1 return false; } - - const char ExcitationSystemUserDefined::debugName[] = "ExcitationSystemUserDefined"; const char* ExcitationSystemUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* ExcitationSystemUserDefined::debugString() const void ExcitationSystemUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcitationSystemUserDefined"), &ExcitationSystemUserDefined_factory)); + factory_map.emplace("cim:ExcitationSystemUserDefined", &ExcitationSystemUserDefined_factory); } void ExcitationSystemUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemUserDefined.proprietary"), &assign_ExcitationSystemUserDefined_proprietary)); + assign_map.emplace("cim:ExcitationSystemUserDefined.proprietary", &assign_ExcitationSystemUserDefined_proprietary); } void ExcitationSystemUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemUserDefined.ProprietaryParameterDynamics"), &assign_ExcitationSystemUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:ExcitationSystemUserDefined.ProprietaryParameterDynamics", &assign_ExcitationSystemUserDefined_ProprietaryParameterDynamics); } void ExcitationSystemUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/ExcitationSystemUserDefined.hpp b/CGMES_2.4.15_16FEB2016/ExcitationSystemUserDefined.hpp index f5d11a2fe..02b86bd95 100644 --- a/CGMES_2.4.15_16FEB2016/ExcitationSystemUserDefined.hpp +++ b/CGMES_2.4.15_16FEB2016/ExcitationSystemUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Excitation system function block whose dynamic behaviour is described by - */ + /** \brief Excitation system function block whose dynamic behaviour is described by */ class ExcitationSystemUserDefined : public ExcitationSystemDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP ExcitationSystemUserDefined(); ~ExcitationSystemUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ExternalNetworkInjection.cpp b/CGMES_2.4.15_16FEB2016/ExternalNetworkInjection.cpp index 39d931fff..134627b99 100644 --- a/CGMES_2.4.15_16FEB2016/ExternalNetworkInjection.cpp +++ b/CGMES_2.4.15_16FEB2016/ExternalNetworkInjection.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "ActivePowerPerFrequency.hpp" -#include "Boolean.hpp" -#include "CurrentFlow.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "CurrentFlow.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" -#include "Integer.hpp" -#include "PU.hpp" using namespace CIMPP; -ExternalNetworkInjection::ExternalNetworkInjection() {}; -ExternalNetworkInjection::~ExternalNetworkInjection() {}; +ExternalNetworkInjection::ExternalNetworkInjection() {} +ExternalNetworkInjection::~ExternalNetworkInjection() {} static const std::list PossibleProfilesForClass = { @@ -75,246 +57,262 @@ ExternalNetworkInjection::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExternalNetworkInjection_governorSCD(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_governorSCD(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->governorSCD; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_ikSecond(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_ikSecond(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ikSecond; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_maxInitialSymShCCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_maxInitialSymShCCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxInitialSymShCCurrent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_maxP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_maxP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_maxQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_maxQ(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxQ; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_maxR0ToX0Ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_maxR0ToX0Ratio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxR0ToX0Ratio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_maxR1ToX1Ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_maxR1ToX1Ratio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxR1ToX1Ratio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_maxZ0ToZ1Ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_maxZ0ToZ1Ratio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxZ0ToZ1Ratio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_minInitialSymShCCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_minInitialSymShCCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minInitialSymShCCurrent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_minP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_minP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_minQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_minQ(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minQ; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_minR0ToX0Ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_minR0ToX0Ratio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minR0ToX0Ratio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_minR1ToX1Ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_minR1ToX1Ratio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minR1ToX1Ratio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_minZ0ToZ1Ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_minZ0ToZ1Ratio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minZ0ToZ1Ratio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_p(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_referencePriority(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_referencePriority(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->referencePriority; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_voltageFactor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_voltageFactor(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->voltageFactor; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExternalNetworkInjection_governorSCD(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->governorSCD; if (!buffer.str().empty()) @@ -328,7 +326,8 @@ bool get_ExternalNetworkInjection_governorSCD(const BaseClass* BaseClass_ptr1, s bool get_ExternalNetworkInjection_ikSecond(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ikSecond; if (!buffer.str().empty()) @@ -342,7 +341,8 @@ bool get_ExternalNetworkInjection_ikSecond(const BaseClass* BaseClass_ptr1, std: bool get_ExternalNetworkInjection_maxInitialSymShCCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxInitialSymShCCurrent; if (!buffer.str().empty()) @@ -356,7 +356,8 @@ bool get_ExternalNetworkInjection_maxInitialSymShCCurrent(const BaseClass* BaseC bool get_ExternalNetworkInjection_maxP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxP; if (!buffer.str().empty()) @@ -370,7 +371,8 @@ bool get_ExternalNetworkInjection_maxP(const BaseClass* BaseClass_ptr1, std::str bool get_ExternalNetworkInjection_maxQ(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxQ; if (!buffer.str().empty()) @@ -384,7 +386,8 @@ bool get_ExternalNetworkInjection_maxQ(const BaseClass* BaseClass_ptr1, std::str bool get_ExternalNetworkInjection_maxR0ToX0Ratio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxR0ToX0Ratio; if (!buffer.str().empty()) @@ -398,7 +401,8 @@ bool get_ExternalNetworkInjection_maxR0ToX0Ratio(const BaseClass* BaseClass_ptr1 bool get_ExternalNetworkInjection_maxR1ToX1Ratio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxR1ToX1Ratio; if (!buffer.str().empty()) @@ -412,7 +416,8 @@ bool get_ExternalNetworkInjection_maxR1ToX1Ratio(const BaseClass* BaseClass_ptr1 bool get_ExternalNetworkInjection_maxZ0ToZ1Ratio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxZ0ToZ1Ratio; if (!buffer.str().empty()) @@ -426,7 +431,8 @@ bool get_ExternalNetworkInjection_maxZ0ToZ1Ratio(const BaseClass* BaseClass_ptr1 bool get_ExternalNetworkInjection_minInitialSymShCCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minInitialSymShCCurrent; if (!buffer.str().empty()) @@ -440,7 +446,8 @@ bool get_ExternalNetworkInjection_minInitialSymShCCurrent(const BaseClass* BaseC bool get_ExternalNetworkInjection_minP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minP; if (!buffer.str().empty()) @@ -454,7 +461,8 @@ bool get_ExternalNetworkInjection_minP(const BaseClass* BaseClass_ptr1, std::str bool get_ExternalNetworkInjection_minQ(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minQ; if (!buffer.str().empty()) @@ -468,7 +476,8 @@ bool get_ExternalNetworkInjection_minQ(const BaseClass* BaseClass_ptr1, std::str bool get_ExternalNetworkInjection_minR0ToX0Ratio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minR0ToX0Ratio; if (!buffer.str().empty()) @@ -482,7 +491,8 @@ bool get_ExternalNetworkInjection_minR0ToX0Ratio(const BaseClass* BaseClass_ptr1 bool get_ExternalNetworkInjection_minR1ToX1Ratio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minR1ToX1Ratio; if (!buffer.str().empty()) @@ -496,7 +506,8 @@ bool get_ExternalNetworkInjection_minR1ToX1Ratio(const BaseClass* BaseClass_ptr1 bool get_ExternalNetworkInjection_minZ0ToZ1Ratio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minZ0ToZ1Ratio; if (!buffer.str().empty()) @@ -510,7 +521,8 @@ bool get_ExternalNetworkInjection_minZ0ToZ1Ratio(const BaseClass* BaseClass_ptr1 bool get_ExternalNetworkInjection_p(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p; if (!buffer.str().empty()) @@ -524,7 +536,8 @@ bool get_ExternalNetworkInjection_p(const BaseClass* BaseClass_ptr1, std::string bool get_ExternalNetworkInjection_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q; if (!buffer.str().empty()) @@ -538,7 +551,8 @@ bool get_ExternalNetworkInjection_q(const BaseClass* BaseClass_ptr1, std::string bool get_ExternalNetworkInjection_referencePriority(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->referencePriority; if (!buffer.str().empty()) @@ -552,7 +566,8 @@ bool get_ExternalNetworkInjection_referencePriority(const BaseClass* BaseClass_p bool get_ExternalNetworkInjection_voltageFactor(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->voltageFactor; if (!buffer.str().empty()) @@ -564,8 +579,6 @@ bool get_ExternalNetworkInjection_voltageFactor(const BaseClass* BaseClass_ptr1, return false; } - - const char ExternalNetworkInjection::debugName[] = "ExternalNetworkInjection"; const char* ExternalNetworkInjection::debugString() const { @@ -574,29 +587,29 @@ const char* ExternalNetworkInjection::debugString() const void ExternalNetworkInjection::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection"), &ExternalNetworkInjection_factory)); + factory_map.emplace("cim:ExternalNetworkInjection", &ExternalNetworkInjection_factory); } void ExternalNetworkInjection::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.governorSCD"), &assign_ExternalNetworkInjection_governorSCD)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.ikSecond"), &assign_ExternalNetworkInjection_ikSecond)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.maxInitialSymShCCurrent"), &assign_ExternalNetworkInjection_maxInitialSymShCCurrent)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.maxP"), &assign_ExternalNetworkInjection_maxP)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.maxQ"), &assign_ExternalNetworkInjection_maxQ)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.maxR0ToX0Ratio"), &assign_ExternalNetworkInjection_maxR0ToX0Ratio)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.maxR1ToX1Ratio"), &assign_ExternalNetworkInjection_maxR1ToX1Ratio)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.maxZ0ToZ1Ratio"), &assign_ExternalNetworkInjection_maxZ0ToZ1Ratio)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.minInitialSymShCCurrent"), &assign_ExternalNetworkInjection_minInitialSymShCCurrent)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.minP"), &assign_ExternalNetworkInjection_minP)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.minQ"), &assign_ExternalNetworkInjection_minQ)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.minR0ToX0Ratio"), &assign_ExternalNetworkInjection_minR0ToX0Ratio)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.minR1ToX1Ratio"), &assign_ExternalNetworkInjection_minR1ToX1Ratio)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.minZ0ToZ1Ratio"), &assign_ExternalNetworkInjection_minZ0ToZ1Ratio)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.p"), &assign_ExternalNetworkInjection_p)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.q"), &assign_ExternalNetworkInjection_q)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.referencePriority"), &assign_ExternalNetworkInjection_referencePriority)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.voltageFactor"), &assign_ExternalNetworkInjection_voltageFactor)); + assign_map.emplace("cim:ExternalNetworkInjection.governorSCD", &assign_ExternalNetworkInjection_governorSCD); + assign_map.emplace("cim:ExternalNetworkInjection.ikSecond", &assign_ExternalNetworkInjection_ikSecond); + assign_map.emplace("cim:ExternalNetworkInjection.maxInitialSymShCCurrent", &assign_ExternalNetworkInjection_maxInitialSymShCCurrent); + assign_map.emplace("cim:ExternalNetworkInjection.maxP", &assign_ExternalNetworkInjection_maxP); + assign_map.emplace("cim:ExternalNetworkInjection.maxQ", &assign_ExternalNetworkInjection_maxQ); + assign_map.emplace("cim:ExternalNetworkInjection.maxR0ToX0Ratio", &assign_ExternalNetworkInjection_maxR0ToX0Ratio); + assign_map.emplace("cim:ExternalNetworkInjection.maxR1ToX1Ratio", &assign_ExternalNetworkInjection_maxR1ToX1Ratio); + assign_map.emplace("cim:ExternalNetworkInjection.maxZ0ToZ1Ratio", &assign_ExternalNetworkInjection_maxZ0ToZ1Ratio); + assign_map.emplace("cim:ExternalNetworkInjection.minInitialSymShCCurrent", &assign_ExternalNetworkInjection_minInitialSymShCCurrent); + assign_map.emplace("cim:ExternalNetworkInjection.minP", &assign_ExternalNetworkInjection_minP); + assign_map.emplace("cim:ExternalNetworkInjection.minQ", &assign_ExternalNetworkInjection_minQ); + assign_map.emplace("cim:ExternalNetworkInjection.minR0ToX0Ratio", &assign_ExternalNetworkInjection_minR0ToX0Ratio); + assign_map.emplace("cim:ExternalNetworkInjection.minR1ToX1Ratio", &assign_ExternalNetworkInjection_minR1ToX1Ratio); + assign_map.emplace("cim:ExternalNetworkInjection.minZ0ToZ1Ratio", &assign_ExternalNetworkInjection_minZ0ToZ1Ratio); + assign_map.emplace("cim:ExternalNetworkInjection.p", &assign_ExternalNetworkInjection_p); + assign_map.emplace("cim:ExternalNetworkInjection.q", &assign_ExternalNetworkInjection_q); + assign_map.emplace("cim:ExternalNetworkInjection.referencePriority", &assign_ExternalNetworkInjection_referencePriority); + assign_map.emplace("cim:ExternalNetworkInjection.voltageFactor", &assign_ExternalNetworkInjection_voltageFactor); } void ExternalNetworkInjection::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ExternalNetworkInjection.hpp b/CGMES_2.4.15_16FEB2016/ExternalNetworkInjection.hpp index b74ba9ef6..e4e61c828 100644 --- a/CGMES_2.4.15_16FEB2016/ExternalNetworkInjection.hpp +++ b/CGMES_2.4.15_16FEB2016/ExternalNetworkInjection.hpp @@ -24,9 +24,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - This class represents external network and it is used for IEC 60909 calculations. - */ + /** \brief This class represents external network and it is used for IEC 60909 calculations. */ class ExternalNetworkInjection : public RegulatingCondEq { public: @@ -34,24 +32,59 @@ namespace CIMPP ExternalNetworkInjection(); ~ExternalNetworkInjection() override; - CIMPP::ActivePowerPerFrequency governorSCD; /* Power Frequency Bias. This is the change in power injection divided by the change in frequency and negated. A positive value of the power frequency bias provides additional power injection upon a drop in frequency. Default: nullptr */ - CIMPP::Boolean ikSecond; /* Indicates whether initial symmetrical short-circuit current and power have been calculated according to IEC (Ik`). Default: false */ - CIMPP::CurrentFlow maxInitialSymShCCurrent; /* Maximum initial symmetrical short-circuit currents (Ik` max) in A (Ik` = Sk`/(SQRT(3) Un)). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::ActivePower maxP; /* Maximum active power of the injection. Default: nullptr */ - CIMPP::ReactivePower maxQ; /* Not for short circuit modelling; It is used for modelling of infeed for load flow exchange. If maxQ and minQ are not used ReactiveCapabilityCurve can be used Default: nullptr */ - CIMPP::Simple_Float maxR0ToX0Ratio; /* Maximum ratio of zero sequence resistance of Network Feeder to its zero sequence reactance (R(0)/X(0) max). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::Simple_Float maxR1ToX1Ratio; /* Maximum ratio of positive sequence resistance of Network Feeder to its positive sequence reactance (R(1)/X(1) max). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::Simple_Float maxZ0ToZ1Ratio; /* Maximum ratio of zero sequence impedance to its positive sequence impedance (Z(0)/Z(1) max). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::CurrentFlow minInitialSymShCCurrent; /* Minimum initial symmetrical short-circuit currents (Ik` min) in A (Ik` = Sk`/(SQRT(3) Un)). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::ActivePower minP; /* Minimum active power of the injection. Default: nullptr */ - CIMPP::ReactivePower minQ; /* Not for short circuit modelling; It is used for modelling of infeed for load flow exchange. If maxQ and minQ are not used ReactiveCapabilityCurve can be used Default: nullptr */ - CIMPP::Simple_Float minR0ToX0Ratio; /* Indicates whether initial symmetrical short-circuit current and power have been calculated according to IEC (Ik`). Used for short circuit data exchange according to IEC 6090 Default: nullptr */ - CIMPP::Simple_Float minR1ToX1Ratio; /* Minimum ratio of positive sequence resistance of Network Feeder to its positive sequence reactance (R(1)/X(1) min). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::Simple_Float minZ0ToZ1Ratio; /* Minimum ratio of zero sequence impedance to its positive sequence impedance (Z(0)/Z(1) min). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::ActivePower p; /* Active power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ - CIMPP::ReactivePower q; /* Reactive power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ - CIMPP::Integer referencePriority; /* Priority of unit for use as powerflow voltage phase angle reference bus selection. 0 = don t care (default) 1 = highest priority. 2 is less than 1 and so on. Default: 0 */ - CIMPP::PU voltageFactor; /* Voltage factor in pu, which was used to calculate short-circuit current Ik` and power Sk`. Default: nullptr */ + /** \brief Power Frequency Bias. This is the change in power injection divided by the change in frequency and negated. A positive value of the power frequency bias provides additional power injection upon a drop in frequency. Default: nullptr */ + CIMPP::ActivePowerPerFrequency governorSCD; + + /** \brief Indicates whether initial symmetrical short-circuit current and power have been calculated according to IEC (Ik`). Default: false */ + CIMPP::Boolean ikSecond; + + /** \brief Maximum initial symmetrical short-circuit currents (Ik` max) in A (Ik` = Sk`/(SQRT(3) Un)). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::CurrentFlow maxInitialSymShCCurrent; + + /** \brief Maximum active power of the injection. Default: nullptr */ + CIMPP::ActivePower maxP; + + /** \brief Not for short circuit modelling; It is used for modelling of infeed for load flow exchange. If maxQ and minQ are not used ReactiveCapabilityCurve can be used Default: nullptr */ + CIMPP::ReactivePower maxQ; + + /** \brief Maximum ratio of zero sequence resistance of Network Feeder to its zero sequence reactance (R(0)/X(0) max). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::Simple_Float maxR0ToX0Ratio; + + /** \brief Maximum ratio of positive sequence resistance of Network Feeder to its positive sequence reactance (R(1)/X(1) max). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::Simple_Float maxR1ToX1Ratio; + + /** \brief Maximum ratio of zero sequence impedance to its positive sequence impedance (Z(0)/Z(1) max). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::Simple_Float maxZ0ToZ1Ratio; + + /** \brief Minimum initial symmetrical short-circuit currents (Ik` min) in A (Ik` = Sk`/(SQRT(3) Un)). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::CurrentFlow minInitialSymShCCurrent; + + /** \brief Minimum active power of the injection. Default: nullptr */ + CIMPP::ActivePower minP; + + /** \brief Not for short circuit modelling; It is used for modelling of infeed for load flow exchange. If maxQ and minQ are not used ReactiveCapabilityCurve can be used Default: nullptr */ + CIMPP::ReactivePower minQ; + + /** \brief Indicates whether initial symmetrical short-circuit current and power have been calculated according to IEC (Ik`). Used for short circuit data exchange according to IEC 6090 Default: nullptr */ + CIMPP::Simple_Float minR0ToX0Ratio; + + /** \brief Minimum ratio of positive sequence resistance of Network Feeder to its positive sequence reactance (R(1)/X(1) min). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::Simple_Float minR1ToX1Ratio; + + /** \brief Minimum ratio of zero sequence impedance to its positive sequence impedance (Z(0)/Z(1) min). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::Simple_Float minZ0ToZ1Ratio; + + /** \brief Active power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ + CIMPP::ActivePower p; + + /** \brief Reactive power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ + CIMPP::ReactivePower q; + + /** \brief Priority of unit for use as powerflow voltage phase angle reference bus selection. 0 = don t care (default) 1 = highest priority. 2 is less than 1 and so on. Default: 0 */ + CIMPP::Integer referencePriority; + + /** \brief Voltage factor in pu, which was used to calculate short-circuit current Ik` and power Sk`. Default: nullptr */ + CIMPP::PU voltageFactor; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Float.hpp b/CGMES_2.4.15_16FEB2016/Float.hpp index ede68d395..71ceca0e4 100644 --- a/CGMES_2.4.15_16FEB2016/Float.hpp +++ b/CGMES_2.4.15_16FEB2016/Float.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A floating point number. The range is unspecified and not limited. - */ + /** \brief A floating point number. The range is unspecified and not limited. */ class Float { public: diff --git a/CGMES_2.4.15_16FEB2016/FossilFuel.cpp b/CGMES_2.4.15_16FEB2016/FossilFuel.cpp index ae681b131..d8564bf4d 100644 --- a/CGMES_2.4.15_16FEB2016/FossilFuel.cpp +++ b/CGMES_2.4.15_16FEB2016/FossilFuel.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ThermalGeneratingUnit.hpp" -#include "FuelType.hpp" using namespace CIMPP; -FossilFuel::FossilFuel() : ThermalGeneratingUnit(nullptr) {}; -FossilFuel::~FossilFuel() {}; +FossilFuel::FossilFuel() : ThermalGeneratingUnit(nullptr) {} +FossilFuel::~FossilFuel() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ FossilFuel::getPossibleProfilesForAttributes() const return map; } - -bool assign_FossilFuel_fossilFuelType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (FossilFuel* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->fossilFuelType; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ThermalGeneratingUnit_FossilFuels(BaseClass*, BaseClass*); bool assign_FossilFuel_ThermalGeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,10 +58,24 @@ bool assign_FossilFuel_ThermalGeneratingUnit(BaseClass* BaseClass_ptr1, BaseClas return false; } +bool assign_FossilFuel_fossilFuelType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + FossilFuel* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->fossilFuelType; + if (!buffer.fail()) + { + return true; + } + } + return false; +} bool get_FossilFuel_ThermalGeneratingUnit(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const FossilFuel* element = dynamic_cast(BaseClass_ptr1)) + const FossilFuel* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ThermalGeneratingUnit != 0) { @@ -88,10 +86,10 @@ bool get_FossilFuel_ThermalGeneratingUnit(const BaseClass* BaseClass_ptr1, std:: return false; } - bool get_FossilFuel_fossilFuelType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const FossilFuel* element = dynamic_cast(BaseClass_ptr1)) + const FossilFuel* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fossilFuelType; if (!buffer.str().empty()) @@ -111,17 +109,17 @@ const char* FossilFuel::debugString() const void FossilFuel::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:FossilFuel"), &FossilFuel_factory)); + factory_map.emplace("cim:FossilFuel", &FossilFuel_factory); } void FossilFuel::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:FossilFuel.fossilFuelType"), &assign_FossilFuel_fossilFuelType)); + assign_map.emplace("cim:FossilFuel.fossilFuelType", &assign_FossilFuel_fossilFuelType); } void FossilFuel::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:FossilFuel.ThermalGeneratingUnit"), &assign_FossilFuel_ThermalGeneratingUnit)); + assign_map.emplace("cim:FossilFuel.ThermalGeneratingUnit", &assign_FossilFuel_ThermalGeneratingUnit); } void FossilFuel::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/FossilFuel.hpp b/CGMES_2.4.15_16FEB2016/FossilFuel.hpp index 02981bec5..8b402a908 100644 --- a/CGMES_2.4.15_16FEB2016/FossilFuel.hpp +++ b/CGMES_2.4.15_16FEB2016/FossilFuel.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ThermalGeneratingUnit; - /* - The fossil fuel consumed by the non-nuclear thermal generating unit. For example, coal, oil, gas, etc. This a the specific fuels that the generating unit can consume. - */ + /** \brief The fossil fuel consumed by the non-nuclear thermal generating unit. For example, coal, oil, gas, etc. This a the specific fuels that the generating unit can consume. */ class FossilFuel : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP FossilFuel(); ~FossilFuel() override; - CIMPP::ThermalGeneratingUnit* ThermalGeneratingUnit; /* A thermal generating unit may have one or more fossil fuels. Default: 0 */ - CIMPP::FuelType fossilFuelType; /* The type of fossil fuel, such as coal, oil, or gas. Default: 0 */ + /** \brief A thermal generating unit may have one or more fossil fuels. Default: 0 */ + CIMPP::ThermalGeneratingUnit* ThermalGeneratingUnit; + + /** \brief The type of fossil fuel, such as coal, oil, or gas. Default: 0 */ + CIMPP::FuelType fossilFuelType; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/FrancisGovernorControlKind.cpp b/CGMES_2.4.15_16FEB2016/FrancisGovernorControlKind.cpp index dd419372c..45933271f 100644 --- a/CGMES_2.4.15_16FEB2016/FrancisGovernorControlKind.cpp +++ b/CGMES_2.4.15_16FEB2016/FrancisGovernorControlKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "FrancisGovernorControlKind") + if (EnumSymbol.substr(0, pos) != "FrancisGovernorControlKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "mechanicHydrolicTachoAccelerator") + if (EnumSymbol == "mechanicHydrolicTachoAccelerator") { rop = FrancisGovernorControlKind::mechanicHydrolicTachoAccelerator; return lop; } - if(EnumSymbol == "mechanicHydraulicTransientFeedback") + if (EnumSymbol == "mechanicHydraulicTransientFeedback") { rop = FrancisGovernorControlKind::mechanicHydraulicTransientFeedback; return lop; } - if(EnumSymbol == "electromechanicalElectrohydraulic") + if (EnumSymbol == "electromechanicalElectrohydraulic") { rop = FrancisGovernorControlKind::electromechanicalElectrohydraulic; return lop; diff --git a/CGMES_2.4.15_16FEB2016/FrancisGovernorControlKind.hpp b/CGMES_2.4.15_16FEB2016/FrancisGovernorControlKind.hpp index a694f5429..703dda54c 100644 --- a/CGMES_2.4.15_16FEB2016/FrancisGovernorControlKind.hpp +++ b/CGMES_2.4.15_16FEB2016/FrancisGovernorControlKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Governor control flag for Francis hydro model. - */ + /** \brief Governor control flag for Francis hydro model. */ class FrancisGovernorControlKind { public: enum FrancisGovernorControlKind_ENUM { - /** - * Mechanic-hydraulic regulator with tacho-accelerometer (Cflag = 1). - */ + /** Mechanic-hydraulic regulator with tacho-accelerometer (Cflag = 1). */ mechanicHydrolicTachoAccelerator, - /** - * Mechanic-hydraulic regulator with transient feedback (Cflag=2). - */ + /** Mechanic-hydraulic regulator with transient feedback (Cflag=2). */ mechanicHydraulicTransientFeedback, - /** - * Electromechanical and electrohydraulic regulator (Cflag=3). - */ + /** Electromechanical and electrohydraulic regulator (Cflag=3). */ electromechanicalElectrohydraulic, }; diff --git a/CGMES_2.4.15_16FEB2016/Frequency.hpp b/CGMES_2.4.15_16FEB2016/Frequency.hpp index 28f5a1022..cca9a1dc8 100644 --- a/CGMES_2.4.15_16FEB2016/Frequency.hpp +++ b/CGMES_2.4.15_16FEB2016/Frequency.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Cycles per second. - */ + /** \brief Cycles per second. */ class Frequency { public: diff --git a/CGMES_2.4.15_16FEB2016/FuelType.cpp b/CGMES_2.4.15_16FEB2016/FuelType.cpp index e59bf1fd4..9b97cf206 100644 --- a/CGMES_2.4.15_16FEB2016/FuelType.cpp +++ b/CGMES_2.4.15_16FEB2016/FuelType.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "FuelType") + if (EnumSymbol.substr(0, pos) != "FuelType") { lop.setstate(std::ios::failbit); return lop; @@ -50,32 +50,32 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "coal") + if (EnumSymbol == "coal") { rop = FuelType::coal; return lop; } - if(EnumSymbol == "oil") + if (EnumSymbol == "oil") { rop = FuelType::oil; return lop; } - if(EnumSymbol == "gas") + if (EnumSymbol == "gas") { rop = FuelType::gas; return lop; } - if(EnumSymbol == "lignite") + if (EnumSymbol == "lignite") { rop = FuelType::lignite; return lop; } - if(EnumSymbol == "hardCoal") + if (EnumSymbol == "hardCoal") { rop = FuelType::hardCoal; return lop; } - if(EnumSymbol == "oilShale") + if (EnumSymbol == "oilShale") { rop = FuelType::oilShale; return lop; diff --git a/CGMES_2.4.15_16FEB2016/FuelType.hpp b/CGMES_2.4.15_16FEB2016/FuelType.hpp index 452590f12..980625028 100644 --- a/CGMES_2.4.15_16FEB2016/FuelType.hpp +++ b/CGMES_2.4.15_16FEB2016/FuelType.hpp @@ -9,37 +9,23 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of fuel. - */ + /** \brief Type of fuel. */ class FuelType { public: enum FuelType_ENUM { - /** - * Generic coal, not including lignite type. - */ + /** Generic coal, not including lignite type. */ coal, - /** - * Oil. - */ + /** Oil. */ oil, - /** - * Natural gas. - */ + /** Natural gas. */ gas, - /** - * The fuel is lignite coal. Note that this is a special type of coal, so the other enum of coal is reserved for hard coal types or if the exact type of coal is not known. - */ + /** The fuel is lignite coal. Note that this is a special type of coal, so the other enum of coal is reserved for hard coal types or if the exact type of coal is not known. */ lignite, - /** - * Hard coal - */ + /** Hard coal */ hardCoal, - /** - * Oil Shale - */ + /** Oil Shale */ oilShale, }; diff --git a/CGMES_2.4.15_16FEB2016/GenICompensationForGenJ.cpp b/CGMES_2.4.15_16FEB2016/GenICompensationForGenJ.cpp index a378b1488..ade258b3c 100644 --- a/CGMES_2.4.15_16FEB2016/GenICompensationForGenJ.cpp +++ b/CGMES_2.4.15_16FEB2016/GenICompensationForGenJ.cpp @@ -10,13 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "SynchronousMachineDynamics.hpp" #include "VCompIEEEType2.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -GenICompensationForGenJ::GenICompensationForGenJ() : SynchronousMachineDynamics(nullptr), VcompIEEEType2(nullptr) {}; -GenICompensationForGenJ::~GenICompensationForGenJ() {}; +GenICompensationForGenJ::GenICompensationForGenJ() : SynchronousMachineDynamics(nullptr), VcompIEEEType2(nullptr) {} +GenICompensationForGenJ::~GenICompensationForGenJ() {} static const std::list PossibleProfilesForClass = { @@ -46,34 +44,6 @@ GenICompensationForGenJ::getPossibleProfilesForAttributes() const return map; } - -bool assign_GenICompensationForGenJ_rcij(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->rcij; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_GenICompensationForGenJ_xcij(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->xcij; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_SynchronousMachineDynamics_GenICompensationForGenJ(BaseClass*, BaseClass*); bool assign_GenICompensationForGenJ_SynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -90,6 +60,7 @@ bool assign_GenICompensationForGenJ_SynchronousMachineDynamics(BaseClass* BaseCl } return false; } + bool assign_VCompIEEEType2_GenICompensationForGenJ(BaseClass*, BaseClass*); bool assign_GenICompensationForGenJ_VcompIEEEType2(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -107,38 +78,38 @@ bool assign_GenICompensationForGenJ_VcompIEEEType2(BaseClass* BaseClass_ptr1, Ba return false; } -bool get_GenICompensationForGenJ_rcij(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_GenICompensationForGenJ_rcij(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1)) + GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->rcij; - if (!buffer.str().empty()) + buffer >> element->rcij; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_GenICompensationForGenJ_xcij(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_GenICompensationForGenJ_xcij(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1)) + GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xcij; - if (!buffer.str().empty()) + buffer >> element->xcij; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_GenICompensationForGenJ_SynchronousMachineDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1)) + const GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->SynchronousMachineDynamics != 0) { @@ -151,7 +122,8 @@ bool get_GenICompensationForGenJ_SynchronousMachineDynamics(const BaseClass* Bas bool get_GenICompensationForGenJ_VcompIEEEType2(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1)) + const GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->VcompIEEEType2 != 0) { @@ -162,6 +134,35 @@ bool get_GenICompensationForGenJ_VcompIEEEType2(const BaseClass* BaseClass_ptr1, return false; } +bool get_GenICompensationForGenJ_rcij(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->rcij; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_GenICompensationForGenJ_xcij(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->xcij; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char GenICompensationForGenJ::debugName[] = "GenICompensationForGenJ"; const char* GenICompensationForGenJ::debugString() const @@ -171,19 +172,19 @@ const char* GenICompensationForGenJ::debugString() const void GenICompensationForGenJ::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GenICompensationForGenJ"), &GenICompensationForGenJ_factory)); + factory_map.emplace("cim:GenICompensationForGenJ", &GenICompensationForGenJ_factory); } void GenICompensationForGenJ::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GenICompensationForGenJ.rcij"), &assign_GenICompensationForGenJ_rcij)); - assign_map.insert(std::make_pair(std::string("cim:GenICompensationForGenJ.xcij"), &assign_GenICompensationForGenJ_xcij)); + assign_map.emplace("cim:GenICompensationForGenJ.rcij", &assign_GenICompensationForGenJ_rcij); + assign_map.emplace("cim:GenICompensationForGenJ.xcij", &assign_GenICompensationForGenJ_xcij); } void GenICompensationForGenJ::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GenICompensationForGenJ.SynchronousMachineDynamics"), &assign_GenICompensationForGenJ_SynchronousMachineDynamics)); - assign_map.insert(std::make_pair(std::string("cim:GenICompensationForGenJ.VcompIEEEType2"), &assign_GenICompensationForGenJ_VcompIEEEType2)); + assign_map.emplace("cim:GenICompensationForGenJ.SynchronousMachineDynamics", &assign_GenICompensationForGenJ_SynchronousMachineDynamics); + assign_map.emplace("cim:GenICompensationForGenJ.VcompIEEEType2", &assign_GenICompensationForGenJ_VcompIEEEType2); } void GenICompensationForGenJ::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/GenICompensationForGenJ.hpp b/CGMES_2.4.15_16FEB2016/GenICompensationForGenJ.hpp index 69b479b55..01a042d67 100644 --- a/CGMES_2.4.15_16FEB2016/GenICompensationForGenJ.hpp +++ b/CGMES_2.4.15_16FEB2016/GenICompensationForGenJ.hpp @@ -19,9 +19,7 @@ namespace CIMPP class SynchronousMachineDynamics; class VCompIEEEType2; - /* - This class provides the resistive and reactive components of compensation for the generator associated with the IEEE Type 2 voltage compensator for current flow out of one of the other generators in the interconnection. - */ + /** \brief This class provides the resistive and reactive components of compensation for the generator associated with the IEEE Type 2 voltage compensator for current flow out of one of the other generators in the interconnection. */ class GenICompensationForGenJ : public IdentifiedObject { public: @@ -29,10 +27,17 @@ namespace CIMPP GenICompensationForGenJ(); ~GenICompensationForGenJ() override; - CIMPP::SynchronousMachineDynamics* SynchronousMachineDynamics; /* Standard synchronous machine out of which current flow is being compensated for. Default: 0 */ - CIMPP::VCompIEEEType2* VcompIEEEType2; /* The standard IEEE Type 2 voltage compensator of this compensation. Default: 0 */ - CIMPP::PU rcij; /* Default: nullptr */ - CIMPP::PU xcij; /* Default: nullptr */ + /** \brief Standard synchronous machine out of which current flow is being compensated for. Default: 0 */ + CIMPP::SynchronousMachineDynamics* SynchronousMachineDynamics; + + /** \brief The standard IEEE Type 2 voltage compensator of this compensation. Default: 0 */ + CIMPP::VCompIEEEType2* VcompIEEEType2; + + /** \brief Default: nullptr */ + CIMPP::PU rcij; + + /** \brief Default: nullptr */ + CIMPP::PU xcij; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GeneratingUnit.cpp b/CGMES_2.4.15_16FEB2016/GeneratingUnit.cpp index 44d6506b9..247f593eb 100644 --- a/CGMES_2.4.15_16FEB2016/GeneratingUnit.cpp +++ b/CGMES_2.4.15_16FEB2016/GeneratingUnit.cpp @@ -11,27 +11,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "ControlAreaGeneratingUnit.hpp" #include "GrossToNetActivePowerCurve.hpp" #include "RotatingMachine.hpp" -#include "GeneratorControlSource.hpp" -#include "PerCent.hpp" -#include "ActivePower.hpp" -#include "Simple_Float.hpp" -#include "ActivePower.hpp" -#include "ActivePower.hpp" -#include "ActivePower.hpp" -#include "ActivePower.hpp" -#include "Simple_Float.hpp" -#include "ActivePower.hpp" -#include "ActivePower.hpp" -#include "ActivePower.hpp" -#include "Simple_Float.hpp" -#include "Money.hpp" -#include "PerCent.hpp" -#include "Money.hpp" using namespace CIMPP; -GeneratingUnit::GeneratingUnit() {}; -GeneratingUnit::~GeneratingUnit() {}; +GeneratingUnit::GeneratingUnit() {} +GeneratingUnit::~GeneratingUnit() {} static const std::list PossibleProfilesForClass = { @@ -77,268 +61,303 @@ GeneratingUnit::getPossibleProfilesForAttributes() const return map; } +bool assign_ControlAreaGeneratingUnit_GeneratingUnit(BaseClass*, BaseClass*); +bool assign_GeneratingUnit_ControlAreaGeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + ControlAreaGeneratingUnit* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ControlAreaGeneratingUnit.begin(), element->ControlAreaGeneratingUnit.end(), element2) == element->ControlAreaGeneratingUnit.end()) + { + element->ControlAreaGeneratingUnit.push_back(element2); + return assign_ControlAreaGeneratingUnit_GeneratingUnit(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_GeneratingUnit_genControlSource(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GrossToNetActivePowerCurve_GeneratingUnit(BaseClass*, BaseClass*); +bool assign_GeneratingUnit_GrossToNetActivePowerCurves(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + GrossToNetActivePowerCurve* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->GrossToNetActivePowerCurves.begin(), element->GrossToNetActivePowerCurves.end(), element2) == element->GrossToNetActivePowerCurves.end()) + { + element->GrossToNetActivePowerCurves.push_back(element2); + return assign_GrossToNetActivePowerCurve_GeneratingUnit(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_RotatingMachine_GeneratingUnit(BaseClass*, BaseClass*); +bool assign_GeneratingUnit_RotatingMachine(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + RotatingMachine* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->RotatingMachine.begin(), element->RotatingMachine.end(), element2) == element->RotatingMachine.end()) + { + element->RotatingMachine.push_back(element2); + return assign_RotatingMachine_GeneratingUnit(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_GeneratingUnit_genControlSource(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->genControlSource; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_governorSCD(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_governorSCD(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->governorSCD; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_initialP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_initialP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->initialP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_longPF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_longPF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->longPF; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_maxOperatingP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_maxOperatingP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxOperatingP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_maximumAllowableSpinningReserve(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_maximumAllowableSpinningReserve(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maximumAllowableSpinningReserve; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_minOperatingP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_minOperatingP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minOperatingP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_nominalP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_nominalP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nominalP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_normalPF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_normalPF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->normalPF; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_ratedGrossMaxP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_ratedGrossMaxP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedGrossMaxP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_ratedGrossMinP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_ratedGrossMinP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedGrossMinP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_ratedNetMaxP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_ratedNetMaxP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedNetMaxP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_shortPF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_shortPF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->shortPF; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_startupCost(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_startupCost(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->startupCost; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_totalEfficiency(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_totalEfficiency(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->totalEfficiency; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_variableCost(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_variableCost(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->variableCost; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ControlAreaGeneratingUnit_GeneratingUnit(BaseClass*, BaseClass*); -bool assign_GeneratingUnit_ControlAreaGeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) -{ - GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); - ControlAreaGeneratingUnit* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) - { - if (std::find(element->ControlAreaGeneratingUnit.begin(), element->ControlAreaGeneratingUnit.end(), element2) == element->ControlAreaGeneratingUnit.end()) - { - element->ControlAreaGeneratingUnit.push_back(element2); - return assign_ControlAreaGeneratingUnit_GeneratingUnit(BaseClass_ptr2, BaseClass_ptr1); - } - return true; - } - return false; -} -bool assign_GrossToNetActivePowerCurve_GeneratingUnit(BaseClass*, BaseClass*); -bool assign_GeneratingUnit_GrossToNetActivePowerCurves(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) -{ - GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); - GrossToNetActivePowerCurve* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) - { - if (std::find(element->GrossToNetActivePowerCurves.begin(), element->GrossToNetActivePowerCurves.end(), element2) == element->GrossToNetActivePowerCurves.end()) - { - element->GrossToNetActivePowerCurves.push_back(element2); - return assign_GrossToNetActivePowerCurve_GeneratingUnit(BaseClass_ptr2, BaseClass_ptr1); - } - return true; - } - return false; -} -bool assign_RotatingMachine_GeneratingUnit(BaseClass*, BaseClass*); -bool assign_GeneratingUnit_RotatingMachine(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + + +bool get_GeneratingUnit_genControlSource(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); - RotatingMachine* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (std::find(element->RotatingMachine.begin(), element->RotatingMachine.end(), element2) == element->RotatingMachine.end()) + buffer << element->genControlSource; + if (!buffer.str().empty()) { - element->RotatingMachine.push_back(element2); - return assign_RotatingMachine_GeneratingUnit(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } + buffer.setstate(std::ios::failbit); return false; } bool get_GeneratingUnit_governorSCD(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->governorSCD; if (!buffer.str().empty()) @@ -352,7 +371,8 @@ bool get_GeneratingUnit_governorSCD(const BaseClass* BaseClass_ptr1, std::string bool get_GeneratingUnit_initialP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->initialP; if (!buffer.str().empty()) @@ -366,7 +386,8 @@ bool get_GeneratingUnit_initialP(const BaseClass* BaseClass_ptr1, std::stringstr bool get_GeneratingUnit_longPF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->longPF; if (!buffer.str().empty()) @@ -380,7 +401,8 @@ bool get_GeneratingUnit_longPF(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_GeneratingUnit_maxOperatingP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxOperatingP; if (!buffer.str().empty()) @@ -394,7 +416,8 @@ bool get_GeneratingUnit_maxOperatingP(const BaseClass* BaseClass_ptr1, std::stri bool get_GeneratingUnit_maximumAllowableSpinningReserve(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maximumAllowableSpinningReserve; if (!buffer.str().empty()) @@ -408,7 +431,8 @@ bool get_GeneratingUnit_maximumAllowableSpinningReserve(const BaseClass* BaseCla bool get_GeneratingUnit_minOperatingP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minOperatingP; if (!buffer.str().empty()) @@ -422,7 +446,8 @@ bool get_GeneratingUnit_minOperatingP(const BaseClass* BaseClass_ptr1, std::stri bool get_GeneratingUnit_nominalP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nominalP; if (!buffer.str().empty()) @@ -436,7 +461,8 @@ bool get_GeneratingUnit_nominalP(const BaseClass* BaseClass_ptr1, std::stringstr bool get_GeneratingUnit_normalPF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->normalPF; if (!buffer.str().empty()) @@ -450,7 +476,8 @@ bool get_GeneratingUnit_normalPF(const BaseClass* BaseClass_ptr1, std::stringstr bool get_GeneratingUnit_ratedGrossMaxP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedGrossMaxP; if (!buffer.str().empty()) @@ -464,7 +491,8 @@ bool get_GeneratingUnit_ratedGrossMaxP(const BaseClass* BaseClass_ptr1, std::str bool get_GeneratingUnit_ratedGrossMinP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedGrossMinP; if (!buffer.str().empty()) @@ -478,7 +506,8 @@ bool get_GeneratingUnit_ratedGrossMinP(const BaseClass* BaseClass_ptr1, std::str bool get_GeneratingUnit_ratedNetMaxP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedNetMaxP; if (!buffer.str().empty()) @@ -492,7 +521,8 @@ bool get_GeneratingUnit_ratedNetMaxP(const BaseClass* BaseClass_ptr1, std::strin bool get_GeneratingUnit_shortPF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortPF; if (!buffer.str().empty()) @@ -506,7 +536,8 @@ bool get_GeneratingUnit_shortPF(const BaseClass* BaseClass_ptr1, std::stringstre bool get_GeneratingUnit_startupCost(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->startupCost; if (!buffer.str().empty()) @@ -520,7 +551,8 @@ bool get_GeneratingUnit_startupCost(const BaseClass* BaseClass_ptr1, std::string bool get_GeneratingUnit_totalEfficiency(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->totalEfficiency; if (!buffer.str().empty()) @@ -534,7 +566,8 @@ bool get_GeneratingUnit_totalEfficiency(const BaseClass* BaseClass_ptr1, std::st bool get_GeneratingUnit_variableCost(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->variableCost; if (!buffer.str().empty()) @@ -546,22 +579,6 @@ bool get_GeneratingUnit_variableCost(const BaseClass* BaseClass_ptr1, std::strin return false; } - - -bool get_GeneratingUnit_genControlSource(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->genControlSource; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char GeneratingUnit::debugName[] = "GeneratingUnit"; const char* GeneratingUnit::debugString() const { @@ -570,34 +587,34 @@ const char* GeneratingUnit::debugString() const void GeneratingUnit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GeneratingUnit"), &GeneratingUnit_factory)); + factory_map.emplace("cim:GeneratingUnit", &GeneratingUnit_factory); } void GeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.genControlSource"), &assign_GeneratingUnit_genControlSource)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.governorSCD"), &assign_GeneratingUnit_governorSCD)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.initialP"), &assign_GeneratingUnit_initialP)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.longPF"), &assign_GeneratingUnit_longPF)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.maxOperatingP"), &assign_GeneratingUnit_maxOperatingP)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.maximumAllowableSpinningReserve"), &assign_GeneratingUnit_maximumAllowableSpinningReserve)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.minOperatingP"), &assign_GeneratingUnit_minOperatingP)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.nominalP"), &assign_GeneratingUnit_nominalP)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.normalPF"), &assign_GeneratingUnit_normalPF)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.ratedGrossMaxP"), &assign_GeneratingUnit_ratedGrossMaxP)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.ratedGrossMinP"), &assign_GeneratingUnit_ratedGrossMinP)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.ratedNetMaxP"), &assign_GeneratingUnit_ratedNetMaxP)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.shortPF"), &assign_GeneratingUnit_shortPF)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.startupCost"), &assign_GeneratingUnit_startupCost)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.totalEfficiency"), &assign_GeneratingUnit_totalEfficiency)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.variableCost"), &assign_GeneratingUnit_variableCost)); + assign_map.emplace("cim:GeneratingUnit.genControlSource", &assign_GeneratingUnit_genControlSource); + assign_map.emplace("cim:GeneratingUnit.governorSCD", &assign_GeneratingUnit_governorSCD); + assign_map.emplace("cim:GeneratingUnit.initialP", &assign_GeneratingUnit_initialP); + assign_map.emplace("cim:GeneratingUnit.longPF", &assign_GeneratingUnit_longPF); + assign_map.emplace("cim:GeneratingUnit.maxOperatingP", &assign_GeneratingUnit_maxOperatingP); + assign_map.emplace("cim:GeneratingUnit.maximumAllowableSpinningReserve", &assign_GeneratingUnit_maximumAllowableSpinningReserve); + assign_map.emplace("cim:GeneratingUnit.minOperatingP", &assign_GeneratingUnit_minOperatingP); + assign_map.emplace("cim:GeneratingUnit.nominalP", &assign_GeneratingUnit_nominalP); + assign_map.emplace("cim:GeneratingUnit.normalPF", &assign_GeneratingUnit_normalPF); + assign_map.emplace("cim:GeneratingUnit.ratedGrossMaxP", &assign_GeneratingUnit_ratedGrossMaxP); + assign_map.emplace("cim:GeneratingUnit.ratedGrossMinP", &assign_GeneratingUnit_ratedGrossMinP); + assign_map.emplace("cim:GeneratingUnit.ratedNetMaxP", &assign_GeneratingUnit_ratedNetMaxP); + assign_map.emplace("cim:GeneratingUnit.shortPF", &assign_GeneratingUnit_shortPF); + assign_map.emplace("cim:GeneratingUnit.startupCost", &assign_GeneratingUnit_startupCost); + assign_map.emplace("cim:GeneratingUnit.totalEfficiency", &assign_GeneratingUnit_totalEfficiency); + assign_map.emplace("cim:GeneratingUnit.variableCost", &assign_GeneratingUnit_variableCost); } void GeneratingUnit::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.ControlAreaGeneratingUnit"), &assign_GeneratingUnit_ControlAreaGeneratingUnit)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.GrossToNetActivePowerCurves"), &assign_GeneratingUnit_GrossToNetActivePowerCurves)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.RotatingMachine"), &assign_GeneratingUnit_RotatingMachine)); + assign_map.emplace("cim:GeneratingUnit.ControlAreaGeneratingUnit", &assign_GeneratingUnit_ControlAreaGeneratingUnit); + assign_map.emplace("cim:GeneratingUnit.GrossToNetActivePowerCurves", &assign_GeneratingUnit_GrossToNetActivePowerCurves); + assign_map.emplace("cim:GeneratingUnit.RotatingMachine", &assign_GeneratingUnit_RotatingMachine); } void GeneratingUnit::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/GeneratingUnit.hpp b/CGMES_2.4.15_16FEB2016/GeneratingUnit.hpp index 06ad23551..6261629bb 100644 --- a/CGMES_2.4.15_16FEB2016/GeneratingUnit.hpp +++ b/CGMES_2.4.15_16FEB2016/GeneratingUnit.hpp @@ -24,9 +24,7 @@ namespace CIMPP class GrossToNetActivePowerCurve; class RotatingMachine; - /* - A single or set of synchronous machines for converting mechanical power into alternating-current power. For example, individual machines within a set may be defined for scheduling purposes while a single control signal is derived for the set. In this case there would be a GeneratingUnit for each member of the set and an additional GeneratingUnit corresponding to the set. - */ + /** \brief A single or set of synchronous machines for converting mechanical power into alternating-current power. For example, individual machines within a set may be defined for scheduling purposes while a single control signal is derived for the set. In this case there would be a GeneratingUnit for each member of the set and an additional GeneratingUnit corresponding to the set. */ class GeneratingUnit : public Equipment { public: @@ -34,25 +32,62 @@ namespace CIMPP GeneratingUnit(); ~GeneratingUnit() override; - std::list ControlAreaGeneratingUnit; /* ControlArea specifications for this generating unit. Default: 0 */ - std::list GrossToNetActivePowerCurves; /* A generating unit may have a gross active power to net active power curve, describing the losses and auxiliary power requirements of the unit. Default: 0 */ - std::list RotatingMachine; /* A synchronous machine may operate as a generator and as such becomes a member of a generating unit. Default: 0 */ - CIMPP::GeneratorControlSource genControlSource; /* The source of controls for a generating unit. Default: 0 */ - CIMPP::PerCent governorSCD; /* Governor Speed Changer Droop. This is the change in generator power output divided by the change in frequency normalized by the nominal power of the generator and the nominal frequency and expressed in percent and negated. A positive value of speed change droop provides additional generator output upon a drop in frequency. Default: nullptr */ - CIMPP::ActivePower initialP; /* Default initial active power which is used to store a powerflow result for the initial active power for this unit in this network configuration. Default: nullptr */ - CIMPP::Simple_Float longPF; /* Generating unit long term economic participation factor. Default: nullptr */ - CIMPP::ActivePower maxOperatingP; /* This is the maximum operating active power limit the dispatcher can enter for this unit. Default: nullptr */ - CIMPP::ActivePower maximumAllowableSpinningReserve; /* Maximum allowable spinning reserve. Spinning reserve will never be considered greater than this value regardless of the current operating point. Default: nullptr */ - CIMPP::ActivePower minOperatingP; /* This is the minimum operating active power limit the dispatcher can enter for this unit. Default: nullptr */ - CIMPP::ActivePower nominalP; /* The nominal power of the generating unit. Used to give precise meaning to percentage based attributes such as the governor speed change droop (governorSCD attribute). The attribute shall be a positive value equal or less than RotatingMachine.ratedS. Default: nullptr */ - CIMPP::Simple_Float normalPF; /* Generating unit economic participation factor. Default: nullptr */ - CIMPP::ActivePower ratedGrossMaxP; /* The unit`s gross rated maximum capacity (book value). Default: nullptr */ - CIMPP::ActivePower ratedGrossMinP; /* The gross rated minimum generation level which the unit can safely operate at while delivering power to the transmission grid. Default: nullptr */ - CIMPP::ActivePower ratedNetMaxP; /* The net rated maximum capacity determined by subtracting the auxiliary power used to operate the internal plant machinery from the rated gross maximum capacity. Default: nullptr */ - CIMPP::Simple_Float shortPF; /* Generating unit short term economic participation factor. Default: nullptr */ - CIMPP::Money startupCost; /* The initial startup cost incurred for each start of the GeneratingUnit. Default: nullptr */ - CIMPP::PerCent totalEfficiency; /* The efficiency of the unit in converting the fuel into electrical energy. Default: nullptr */ - CIMPP::Money variableCost; /* The variable cost component of production per unit of ActivePower. Default: nullptr */ + /** \brief ControlArea specifications for this generating unit. Default: 0 */ + std::list ControlAreaGeneratingUnit; + + /** \brief A generating unit may have a gross active power to net active power curve, describing the losses and auxiliary power requirements of the unit. Default: 0 */ + std::list GrossToNetActivePowerCurves; + + /** \brief A synchronous machine may operate as a generator and as such becomes a member of a generating unit. Default: 0 */ + std::list RotatingMachine; + + /** \brief The source of controls for a generating unit. Default: 0 */ + CIMPP::GeneratorControlSource genControlSource; + + /** \brief Governor Speed Changer Droop. This is the change in generator power output divided by the change in frequency normalized by the nominal power of the generator and the nominal frequency and expressed in percent and negated. A positive value of speed change droop provides additional generator output upon a drop in frequency. Default: nullptr */ + CIMPP::PerCent governorSCD; + + /** \brief Default initial active power which is used to store a powerflow result for the initial active power for this unit in this network configuration. Default: nullptr */ + CIMPP::ActivePower initialP; + + /** \brief Generating unit long term economic participation factor. Default: nullptr */ + CIMPP::Simple_Float longPF; + + /** \brief This is the maximum operating active power limit the dispatcher can enter for this unit. Default: nullptr */ + CIMPP::ActivePower maxOperatingP; + + /** \brief Maximum allowable spinning reserve. Spinning reserve will never be considered greater than this value regardless of the current operating point. Default: nullptr */ + CIMPP::ActivePower maximumAllowableSpinningReserve; + + /** \brief This is the minimum operating active power limit the dispatcher can enter for this unit. Default: nullptr */ + CIMPP::ActivePower minOperatingP; + + /** \brief The nominal power of the generating unit. Used to give precise meaning to percentage based attributes such as the governor speed change droop (governorSCD attribute). The attribute shall be a positive value equal or less than RotatingMachine.ratedS. Default: nullptr */ + CIMPP::ActivePower nominalP; + + /** \brief Generating unit economic participation factor. Default: nullptr */ + CIMPP::Simple_Float normalPF; + + /** \brief The unit`s gross rated maximum capacity (book value). Default: nullptr */ + CIMPP::ActivePower ratedGrossMaxP; + + /** \brief The gross rated minimum generation level which the unit can safely operate at while delivering power to the transmission grid. Default: nullptr */ + CIMPP::ActivePower ratedGrossMinP; + + /** \brief The net rated maximum capacity determined by subtracting the auxiliary power used to operate the internal plant machinery from the rated gross maximum capacity. Default: nullptr */ + CIMPP::ActivePower ratedNetMaxP; + + /** \brief Generating unit short term economic participation factor. Default: nullptr */ + CIMPP::Simple_Float shortPF; + + /** \brief The initial startup cost incurred for each start of the GeneratingUnit. Default: nullptr */ + CIMPP::Money startupCost; + + /** \brief The efficiency of the unit in converting the fuel into electrical energy. Default: nullptr */ + CIMPP::PerCent totalEfficiency; + + /** \brief The variable cost component of production per unit of ActivePower. Default: nullptr */ + CIMPP::Money variableCost; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GeneratorControlSource.cpp b/CGMES_2.4.15_16FEB2016/GeneratorControlSource.cpp index 1850d2514..dade3b6eb 100644 --- a/CGMES_2.4.15_16FEB2016/GeneratorControlSource.cpp +++ b/CGMES_2.4.15_16FEB2016/GeneratorControlSource.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "GeneratorControlSource") + if (EnumSymbol.substr(0, pos) != "GeneratorControlSource") { lop.setstate(std::ios::failbit); return lop; @@ -50,22 +50,22 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "unavailable") + if (EnumSymbol == "unavailable") { rop = GeneratorControlSource::unavailable; return lop; } - if(EnumSymbol == "offAGC") + if (EnumSymbol == "offAGC") { rop = GeneratorControlSource::offAGC; return lop; } - if(EnumSymbol == "onAGC") + if (EnumSymbol == "onAGC") { rop = GeneratorControlSource::onAGC; return lop; } - if(EnumSymbol == "plantControl") + if (EnumSymbol == "plantControl") { rop = GeneratorControlSource::plantControl; return lop; diff --git a/CGMES_2.4.15_16FEB2016/GeneratorControlSource.hpp b/CGMES_2.4.15_16FEB2016/GeneratorControlSource.hpp index 463a53ab3..28b3b722f 100644 --- a/CGMES_2.4.15_16FEB2016/GeneratorControlSource.hpp +++ b/CGMES_2.4.15_16FEB2016/GeneratorControlSource.hpp @@ -9,29 +9,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The source of controls for a generating unit. - */ + /** \brief The source of controls for a generating unit. */ class GeneratorControlSource { public: enum GeneratorControlSource_ENUM { - /** - * Not available. - */ + /** Not available. */ unavailable, - /** - * Off of automatic generation control (AGC). - */ + /** Off of automatic generation control (AGC). */ offAGC, - /** - * On automatic generation control (AGC). - */ + /** On automatic generation control (AGC). */ onAGC, - /** - * Plant is controlling. - */ + /** Plant is controlling. */ plantControl, }; diff --git a/CGMES_2.4.15_16FEB2016/GenericNonLinearLoadModelKind.cpp b/CGMES_2.4.15_16FEB2016/GenericNonLinearLoadModelKind.cpp index 2d1052ed1..037223a57 100644 --- a/CGMES_2.4.15_16FEB2016/GenericNonLinearLoadModelKind.cpp +++ b/CGMES_2.4.15_16FEB2016/GenericNonLinearLoadModelKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "GenericNonLinearLoadModelKind") + if (EnumSymbol.substr(0, pos) != "GenericNonLinearLoadModelKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,12 +50,12 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "exponentialRecovery") + if (EnumSymbol == "exponentialRecovery") { rop = GenericNonLinearLoadModelKind::exponentialRecovery; return lop; } - if(EnumSymbol == "loadAdaptive") + if (EnumSymbol == "loadAdaptive") { rop = GenericNonLinearLoadModelKind::loadAdaptive; return lop; diff --git a/CGMES_2.4.15_16FEB2016/GenericNonLinearLoadModelKind.hpp b/CGMES_2.4.15_16FEB2016/GenericNonLinearLoadModelKind.hpp index 7b6aa0c38..48f94578a 100644 --- a/CGMES_2.4.15_16FEB2016/GenericNonLinearLoadModelKind.hpp +++ b/CGMES_2.4.15_16FEB2016/GenericNonLinearLoadModelKind.hpp @@ -9,21 +9,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of generic non-linear load model. - */ + /** \brief Type of generic non-linear load model. */ class GenericNonLinearLoadModelKind { public: enum GenericNonLinearLoadModelKind_ENUM { - /** - * Exponential recovery model. - */ + /** Exponential recovery model. */ exponentialRecovery, - /** - * Load adaptive model. - */ + /** Load adaptive model. */ loadAdaptive, }; diff --git a/CGMES_2.4.15_16FEB2016/GeographicalLocationVersion.cpp b/CGMES_2.4.15_16FEB2016/GeographicalLocationVersion.cpp index d48c4690d..f7622e2dc 100644 --- a/CGMES_2.4.15_16FEB2016/GeographicalLocationVersion.cpp +++ b/CGMES_2.4.15_16FEB2016/GeographicalLocationVersion.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "String.hpp" -#include "String.hpp" -#include "Date.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -GeographicalLocationVersion::GeographicalLocationVersion() {}; -GeographicalLocationVersion::~GeographicalLocationVersion() {}; +GeographicalLocationVersion::GeographicalLocationVersion() {} +GeographicalLocationVersion::~GeographicalLocationVersion() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ GeographicalLocationVersion::getPossibleProfilesForAttributes() const return map; } - -bool assign_GeographicalLocationVersion_baseUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeographicalLocationVersion_baseUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeographicalLocationVersion_baseURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeographicalLocationVersion_baseURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeographicalLocationVersion_date(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeographicalLocationVersion_date(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->date = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeographicalLocationVersion_differenceModelURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeographicalLocationVersion_differenceModelURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->differenceModelURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeographicalLocationVersion_entsoeUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeographicalLocationVersion_entsoeUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeographicalLocationVersion_entsoeURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeographicalLocationVersion_entsoeURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeographicalLocationVersion_modelDescriptionURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeographicalLocationVersion_modelDescriptionURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->modelDescriptionURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeographicalLocationVersion_namespaceRDF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeographicalLocationVersion_namespaceRDF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceRDF = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeographicalLocationVersion_namespaceUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeographicalLocationVersion_namespaceUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeographicalLocationVersion_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeographicalLocationVersion_shortName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->shortName = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GeographicalLocationVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseUML; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_GeographicalLocationVersion_baseUML(const BaseClass* BaseClass_ptr1, st bool get_GeographicalLocationVersion_baseURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseURI; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_GeographicalLocationVersion_baseURI(const BaseClass* BaseClass_ptr1, st bool get_GeographicalLocationVersion_date(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->date; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_GeographicalLocationVersion_date(const BaseClass* BaseClass_ptr1, std:: bool get_GeographicalLocationVersion_differenceModelURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->differenceModelURI; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_GeographicalLocationVersion_differenceModelURI(const BaseClass* BaseCla bool get_GeographicalLocationVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeUML; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_GeographicalLocationVersion_entsoeUML(const BaseClass* BaseClass_ptr1, bool get_GeographicalLocationVersion_entsoeURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeURI; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_GeographicalLocationVersion_entsoeURI(const BaseClass* BaseClass_ptr1, bool get_GeographicalLocationVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->modelDescriptionURI; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_GeographicalLocationVersion_modelDescriptionURI(const BaseClass* BaseCl bool get_GeographicalLocationVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceRDF; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_GeographicalLocationVersion_namespaceRDF(const BaseClass* BaseClass_ptr bool get_GeographicalLocationVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceUML; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_GeographicalLocationVersion_namespaceUML(const BaseClass* BaseClass_ptr bool get_GeographicalLocationVersion_shortName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortName; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_GeographicalLocationVersion_shortName(const BaseClass* BaseClass_ptr1, return false; } - - const char GeographicalLocationVersion::debugName[] = "GeographicalLocationVersion"; const char* GeographicalLocationVersion::debugString() const { @@ -341,21 +346,21 @@ const char* GeographicalLocationVersion::debugString() const void GeographicalLocationVersion::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GeographicalLocationVersion"), &GeographicalLocationVersion_factory)); + factory_map.emplace("cim:GeographicalLocationVersion", &GeographicalLocationVersion_factory); } void GeographicalLocationVersion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GeographicalLocationVersion.baseUML"), &assign_GeographicalLocationVersion_baseUML)); - assign_map.insert(std::make_pair(std::string("cim:GeographicalLocationVersion.baseURI"), &assign_GeographicalLocationVersion_baseURI)); - assign_map.insert(std::make_pair(std::string("cim:GeographicalLocationVersion.date"), &assign_GeographicalLocationVersion_date)); - assign_map.insert(std::make_pair(std::string("cim:GeographicalLocationVersion.differenceModelURI"), &assign_GeographicalLocationVersion_differenceModelURI)); - assign_map.insert(std::make_pair(std::string("cim:GeographicalLocationVersion.entsoeUML"), &assign_GeographicalLocationVersion_entsoeUML)); - assign_map.insert(std::make_pair(std::string("cim:GeographicalLocationVersion.entsoeURI"), &assign_GeographicalLocationVersion_entsoeURI)); - assign_map.insert(std::make_pair(std::string("cim:GeographicalLocationVersion.modelDescriptionURI"), &assign_GeographicalLocationVersion_modelDescriptionURI)); - assign_map.insert(std::make_pair(std::string("cim:GeographicalLocationVersion.namespaceRDF"), &assign_GeographicalLocationVersion_namespaceRDF)); - assign_map.insert(std::make_pair(std::string("cim:GeographicalLocationVersion.namespaceUML"), &assign_GeographicalLocationVersion_namespaceUML)); - assign_map.insert(std::make_pair(std::string("cim:GeographicalLocationVersion.shortName"), &assign_GeographicalLocationVersion_shortName)); + assign_map.emplace("cim:GeographicalLocationVersion.baseUML", &assign_GeographicalLocationVersion_baseUML); + assign_map.emplace("cim:GeographicalLocationVersion.baseURI", &assign_GeographicalLocationVersion_baseURI); + assign_map.emplace("cim:GeographicalLocationVersion.date", &assign_GeographicalLocationVersion_date); + assign_map.emplace("cim:GeographicalLocationVersion.differenceModelURI", &assign_GeographicalLocationVersion_differenceModelURI); + assign_map.emplace("cim:GeographicalLocationVersion.entsoeUML", &assign_GeographicalLocationVersion_entsoeUML); + assign_map.emplace("cim:GeographicalLocationVersion.entsoeURI", &assign_GeographicalLocationVersion_entsoeURI); + assign_map.emplace("cim:GeographicalLocationVersion.modelDescriptionURI", &assign_GeographicalLocationVersion_modelDescriptionURI); + assign_map.emplace("cim:GeographicalLocationVersion.namespaceRDF", &assign_GeographicalLocationVersion_namespaceRDF); + assign_map.emplace("cim:GeographicalLocationVersion.namespaceUML", &assign_GeographicalLocationVersion_namespaceUML); + assign_map.emplace("cim:GeographicalLocationVersion.shortName", &assign_GeographicalLocationVersion_shortName); } void GeographicalLocationVersion::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/GeographicalLocationVersion.hpp b/CGMES_2.4.15_16FEB2016/GeographicalLocationVersion.hpp index 94d99aabb..b8b3523b3 100644 --- a/CGMES_2.4.15_16FEB2016/GeographicalLocationVersion.hpp +++ b/CGMES_2.4.15_16FEB2016/GeographicalLocationVersion.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Version details. - */ + /** \brief Version details. */ class GeographicalLocationVersion : public BaseClass { public: @@ -28,16 +26,35 @@ namespace CIMPP GeographicalLocationVersion(); ~GeographicalLocationVersion() override; - CIMPP::String baseUML; /* Base UML provided by CIM model manager. Default: '' */ - CIMPP::String baseURI; /* Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ - CIMPP::Date date; /* Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ - CIMPP::String differenceModelURI; /* Difference model URI defined by IEC 61970-552. Default: '' */ - CIMPP::String entsoeUML; /* UML provided by ENTSO-E. Default: '' */ - CIMPP::String entsoeURI; /* Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/GeographicalLocation/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ - CIMPP::String modelDescriptionURI; /* Model Description URI defined by IEC 61970-552. Default: '' */ - CIMPP::String namespaceRDF; /* RDF namespace. Default: '' */ - CIMPP::String namespaceUML; /* CIM UML namespace. Default: '' */ - CIMPP::String shortName; /* The short name of the profile used in profile documentation. Default: '' */ + /** \brief Base UML provided by CIM model manager. Default: '' */ + CIMPP::String baseUML; + + /** \brief Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ + CIMPP::String baseURI; + + /** \brief Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ + CIMPP::Date date; + + /** \brief Difference model URI defined by IEC 61970-552. Default: '' */ + CIMPP::String differenceModelURI; + + /** \brief UML provided by ENTSO-E. Default: '' */ + CIMPP::String entsoeUML; + + /** \brief Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/GeographicalLocation/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ + CIMPP::String entsoeURI; + + /** \brief Model Description URI defined by IEC 61970-552. Default: '' */ + CIMPP::String modelDescriptionURI; + + /** \brief RDF namespace. Default: '' */ + CIMPP::String namespaceRDF; + + /** \brief CIM UML namespace. Default: '' */ + CIMPP::String namespaceUML; + + /** \brief The short name of the profile used in profile documentation. Default: '' */ + CIMPP::String shortName; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GeographicalRegion.cpp b/CGMES_2.4.15_16FEB2016/GeographicalRegion.cpp index 8648eae7d..229df2030 100644 --- a/CGMES_2.4.15_16FEB2016/GeographicalRegion.cpp +++ b/CGMES_2.4.15_16FEB2016/GeographicalRegion.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -GeographicalRegion::GeographicalRegion() {}; -GeographicalRegion::~GeographicalRegion() {}; +GeographicalRegion::GeographicalRegion() {} +GeographicalRegion::~GeographicalRegion() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ GeographicalRegion::getPossibleProfilesForAttributes() const return map; } - - bool assign_SubGeographicalRegion_Region(BaseClass*, BaseClass*); bool assign_GeographicalRegion_Regions(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,7 +59,6 @@ bool assign_GeographicalRegion_Regions(BaseClass* BaseClass_ptr1, BaseClass* Bas } - const char GeographicalRegion::debugName[] = "GeographicalRegion"; const char* GeographicalRegion::debugString() const { @@ -70,7 +67,7 @@ const char* GeographicalRegion::debugString() const void GeographicalRegion::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GeographicalRegion"), &GeographicalRegion_factory)); + factory_map.emplace("cim:GeographicalRegion", &GeographicalRegion_factory); } void GeographicalRegion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -79,7 +76,7 @@ void GeographicalRegion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GeographicalRegion.Regions"), &assign_GeographicalRegion_Regions)); + assign_map.emplace("cim:GeographicalRegion.Regions", &assign_GeographicalRegion_Regions); } void GeographicalRegion::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/GeographicalRegion.hpp b/CGMES_2.4.15_16FEB2016/GeographicalRegion.hpp index 1ab108682..8e23a3694 100644 --- a/CGMES_2.4.15_16FEB2016/GeographicalRegion.hpp +++ b/CGMES_2.4.15_16FEB2016/GeographicalRegion.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class SubGeographicalRegion; - /* - A geographical region of a power system network model. - */ + /** \brief A geographical region of a power system network model. */ class GeographicalRegion : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP GeographicalRegion(); ~GeographicalRegion() override; - std::list Regions; /* All sub-geograhpical regions within this geographical region. Default: 0 */ + /** \brief All sub-geograhpical regions within this geographical region. Default: 0 */ + std::list Regions; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GovCT1.cpp b/CGMES_2.4.15_16FEB2016/GovCT1.cpp index 6a6f13ccb..c8ede5eab 100644 --- a/CGMES_2.4.15_16FEB2016/GovCT1.cpp +++ b/CGMES_2.4.15_16FEB2016/GovCT1.cpp @@ -8,46 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "DroopSignalFeedbackKind.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" using namespace CIMPP; -GovCT1::GovCT1() {}; -GovCT1::~GovCT1() {}; +GovCT1::GovCT1() {} +GovCT1::~GovCT1() {} static const std::list PossibleProfilesForClass = { @@ -108,467 +73,500 @@ GovCT1::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovCT1_aset(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_aset(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->aset; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_db(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_db(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_dm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_dm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_kdgov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_kdgov(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kdgov; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_kigov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_kigov(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kigov; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_kiload(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_kiload(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kiload; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_kimw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_kimw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kimw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_kpgov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_kpgov(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpgov; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_kpload(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_kpload(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpload; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_kturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_kturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_ldref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_ldref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ldref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_maxerr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_maxerr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxerr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_minerr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_minerr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minerr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_rclose(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_rclose(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rclose; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_rdown(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_rdown(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rdown; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_ropen(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_ropen(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ropen; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_rselect(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_rselect(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rselect; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_rup(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_rup(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rup; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_tact(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_tact(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tact; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_tdgov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_tdgov(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdgov; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_teng(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_teng(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->teng; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_tfload(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_tfload(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tfload; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_tpelec(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_tpelec(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpelec; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_tsa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_tsa(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tsa; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_tsb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_tsb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tsb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_vmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_vmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_wfnl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_wfnl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wfnl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_wfspd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_wfspd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wfspd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovCT1_aset(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->aset; if (!buffer.str().empty()) @@ -582,7 +580,8 @@ bool get_GovCT1_aset(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_db(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db; if (!buffer.str().empty()) @@ -596,7 +595,8 @@ bool get_GovCT1_db(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_dm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dm; if (!buffer.str().empty()) @@ -610,7 +610,8 @@ bool get_GovCT1_dm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -624,7 +625,8 @@ bool get_GovCT1_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_kdgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdgov; if (!buffer.str().empty()) @@ -638,7 +640,8 @@ bool get_GovCT1_kdgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT1_kigov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kigov; if (!buffer.str().empty()) @@ -652,7 +655,8 @@ bool get_GovCT1_kigov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT1_kiload(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kiload; if (!buffer.str().empty()) @@ -666,7 +670,8 @@ bool get_GovCT1_kiload(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT1_kimw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kimw; if (!buffer.str().empty()) @@ -680,7 +685,8 @@ bool get_GovCT1_kimw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_kpgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpgov; if (!buffer.str().empty()) @@ -694,7 +700,8 @@ bool get_GovCT1_kpgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT1_kpload(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpload; if (!buffer.str().empty()) @@ -708,7 +715,8 @@ bool get_GovCT1_kpload(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT1_kturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kturb; if (!buffer.str().empty()) @@ -722,7 +730,8 @@ bool get_GovCT1_kturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT1_ldref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ldref; if (!buffer.str().empty()) @@ -736,7 +745,8 @@ bool get_GovCT1_ldref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT1_maxerr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxerr; if (!buffer.str().empty()) @@ -750,7 +760,8 @@ bool get_GovCT1_maxerr(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT1_minerr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minerr; if (!buffer.str().empty()) @@ -764,7 +775,8 @@ bool get_GovCT1_minerr(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -778,7 +790,8 @@ bool get_GovCT1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT1_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -792,7 +805,8 @@ bool get_GovCT1_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_rclose(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rclose; if (!buffer.str().empty()) @@ -806,7 +820,8 @@ bool get_GovCT1_rclose(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT1_rdown(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rdown; if (!buffer.str().empty()) @@ -820,7 +835,8 @@ bool get_GovCT1_rdown(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT1_ropen(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ropen; if (!buffer.str().empty()) @@ -832,9 +848,25 @@ bool get_GovCT1_ropen(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } +bool get_GovCT1_rselect(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->rselect; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_GovCT1_rup(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rup; if (!buffer.str().empty()) @@ -848,7 +880,8 @@ bool get_GovCT1_rup(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -862,7 +895,8 @@ bool get_GovCT1_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_tact(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tact; if (!buffer.str().empty()) @@ -876,7 +910,8 @@ bool get_GovCT1_tact(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -890,7 +925,8 @@ bool get_GovCT1_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -904,7 +940,8 @@ bool get_GovCT1_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_tdgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdgov; if (!buffer.str().empty()) @@ -918,7 +955,8 @@ bool get_GovCT1_tdgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT1_teng(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->teng; if (!buffer.str().empty()) @@ -932,7 +970,8 @@ bool get_GovCT1_teng(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_tfload(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tfload; if (!buffer.str().empty()) @@ -946,7 +985,8 @@ bool get_GovCT1_tfload(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT1_tpelec(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpelec; if (!buffer.str().empty()) @@ -960,7 +1000,8 @@ bool get_GovCT1_tpelec(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT1_tsa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tsa; if (!buffer.str().empty()) @@ -974,7 +1015,8 @@ bool get_GovCT1_tsa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_tsb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tsb; if (!buffer.str().empty()) @@ -988,7 +1030,8 @@ bool get_GovCT1_tsb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmax; if (!buffer.str().empty()) @@ -1002,7 +1045,8 @@ bool get_GovCT1_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmin; if (!buffer.str().empty()) @@ -1016,7 +1060,8 @@ bool get_GovCT1_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_wfnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wfnl; if (!buffer.str().empty()) @@ -1030,7 +1075,8 @@ bool get_GovCT1_wfnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_wfspd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wfspd; if (!buffer.str().empty()) @@ -1042,22 +1088,6 @@ bool get_GovCT1_wfspd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - -bool get_GovCT1_rselect(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->rselect; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char GovCT1::debugName[] = "GovCT1"; const char* GovCT1::debugString() const { @@ -1066,46 +1096,46 @@ const char* GovCT1::debugString() const void GovCT1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovCT1"), &GovCT1_factory)); + factory_map.emplace("cim:GovCT1", &GovCT1_factory); } void GovCT1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovCT1.aset"), &assign_GovCT1_aset)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.db"), &assign_GovCT1_db)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.dm"), &assign_GovCT1_dm)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.ka"), &assign_GovCT1_ka)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.kdgov"), &assign_GovCT1_kdgov)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.kigov"), &assign_GovCT1_kigov)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.kiload"), &assign_GovCT1_kiload)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.kimw"), &assign_GovCT1_kimw)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.kpgov"), &assign_GovCT1_kpgov)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.kpload"), &assign_GovCT1_kpload)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.kturb"), &assign_GovCT1_kturb)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.ldref"), &assign_GovCT1_ldref)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.maxerr"), &assign_GovCT1_maxerr)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.minerr"), &assign_GovCT1_minerr)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.mwbase"), &assign_GovCT1_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.r"), &assign_GovCT1_r)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.rclose"), &assign_GovCT1_rclose)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.rdown"), &assign_GovCT1_rdown)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.ropen"), &assign_GovCT1_ropen)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.rselect"), &assign_GovCT1_rselect)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.rup"), &assign_GovCT1_rup)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.ta"), &assign_GovCT1_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.tact"), &assign_GovCT1_tact)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.tb"), &assign_GovCT1_tb)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.tc"), &assign_GovCT1_tc)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.tdgov"), &assign_GovCT1_tdgov)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.teng"), &assign_GovCT1_teng)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.tfload"), &assign_GovCT1_tfload)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.tpelec"), &assign_GovCT1_tpelec)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.tsa"), &assign_GovCT1_tsa)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.tsb"), &assign_GovCT1_tsb)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.vmax"), &assign_GovCT1_vmax)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.vmin"), &assign_GovCT1_vmin)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.wfnl"), &assign_GovCT1_wfnl)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.wfspd"), &assign_GovCT1_wfspd)); + assign_map.emplace("cim:GovCT1.aset", &assign_GovCT1_aset); + assign_map.emplace("cim:GovCT1.db", &assign_GovCT1_db); + assign_map.emplace("cim:GovCT1.dm", &assign_GovCT1_dm); + assign_map.emplace("cim:GovCT1.ka", &assign_GovCT1_ka); + assign_map.emplace("cim:GovCT1.kdgov", &assign_GovCT1_kdgov); + assign_map.emplace("cim:GovCT1.kigov", &assign_GovCT1_kigov); + assign_map.emplace("cim:GovCT1.kiload", &assign_GovCT1_kiload); + assign_map.emplace("cim:GovCT1.kimw", &assign_GovCT1_kimw); + assign_map.emplace("cim:GovCT1.kpgov", &assign_GovCT1_kpgov); + assign_map.emplace("cim:GovCT1.kpload", &assign_GovCT1_kpload); + assign_map.emplace("cim:GovCT1.kturb", &assign_GovCT1_kturb); + assign_map.emplace("cim:GovCT1.ldref", &assign_GovCT1_ldref); + assign_map.emplace("cim:GovCT1.maxerr", &assign_GovCT1_maxerr); + assign_map.emplace("cim:GovCT1.minerr", &assign_GovCT1_minerr); + assign_map.emplace("cim:GovCT1.mwbase", &assign_GovCT1_mwbase); + assign_map.emplace("cim:GovCT1.r", &assign_GovCT1_r); + assign_map.emplace("cim:GovCT1.rclose", &assign_GovCT1_rclose); + assign_map.emplace("cim:GovCT1.rdown", &assign_GovCT1_rdown); + assign_map.emplace("cim:GovCT1.ropen", &assign_GovCT1_ropen); + assign_map.emplace("cim:GovCT1.rselect", &assign_GovCT1_rselect); + assign_map.emplace("cim:GovCT1.rup", &assign_GovCT1_rup); + assign_map.emplace("cim:GovCT1.ta", &assign_GovCT1_ta); + assign_map.emplace("cim:GovCT1.tact", &assign_GovCT1_tact); + assign_map.emplace("cim:GovCT1.tb", &assign_GovCT1_tb); + assign_map.emplace("cim:GovCT1.tc", &assign_GovCT1_tc); + assign_map.emplace("cim:GovCT1.tdgov", &assign_GovCT1_tdgov); + assign_map.emplace("cim:GovCT1.teng", &assign_GovCT1_teng); + assign_map.emplace("cim:GovCT1.tfload", &assign_GovCT1_tfload); + assign_map.emplace("cim:GovCT1.tpelec", &assign_GovCT1_tpelec); + assign_map.emplace("cim:GovCT1.tsa", &assign_GovCT1_tsa); + assign_map.emplace("cim:GovCT1.tsb", &assign_GovCT1_tsb); + assign_map.emplace("cim:GovCT1.vmax", &assign_GovCT1_vmax); + assign_map.emplace("cim:GovCT1.vmin", &assign_GovCT1_vmin); + assign_map.emplace("cim:GovCT1.wfnl", &assign_GovCT1_wfnl); + assign_map.emplace("cim:GovCT1.wfspd", &assign_GovCT1_wfspd); } void GovCT1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/GovCT1.hpp b/CGMES_2.4.15_16FEB2016/GovCT1.hpp index 40520dfe6..4bcbc8131 100644 --- a/CGMES_2.4.15_16FEB2016/GovCT1.hpp +++ b/CGMES_2.4.15_16FEB2016/GovCT1.hpp @@ -22,9 +22,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - General model for any prime mover with a PID governor, used primarily for combustion turbine and combined cycle units. This model can be used to represent a variety of prime movers controlled by PID governors. It is suitable, for example, for representation of Additional information on this model is available in the 2012 IEEE report, , section 3.1.2.3 page 3-4 (GGOV1). - */ + /** \brief General model for any prime mover with a PID governor, used primarily for combustion turbine and combined cycle units. This model can be used to represent a variety of prime movers controlled by PID governors. It is suitable, for example, for representation of Additional information on this model is available in the 2012 IEEE report, , section 3.1.2.3 page 3-4 (GGOV1). */ class GovCT1 : public TurbineGovernorDynamics { public: @@ -32,41 +30,110 @@ namespace CIMPP GovCT1(); ~GovCT1() override; - CIMPP::Simple_Float aset; /* Acceleration limiter setpoint (Aset). Unit = PU/sec. Typical Value = 0.01. Default: nullptr */ - CIMPP::PU db; /* Speed governor dead band in per unit speed (db). In the majority of applications, it is recommended that this value be set to zero. Typical Value = 0. Default: nullptr */ - CIMPP::PU dm; /* Speed sensitivity coefficient (Dm). Dm can represent either the variation of the engine power with the shaft speed or the variation of maximum power capability with shaft speed. If it is positive it describes the falling slope of the engine speed verses power characteristic as speed increases. A slightly falling characteristic is typical for reciprocating engines and some aero-derivative turbines. If it is negative the engine power is assumed to be unaffected by the shaft speed, but the maximum permissible fuel flow is taken to fall with falling shaft speed. This is characteristic of single-shaft industrial turbines due to exhaust temperature limits. Typical Value = 0. Default: nullptr */ - CIMPP::PU ka; /* Acceleration limiter gain (Ka). Typical Value = 10. Default: nullptr */ - CIMPP::PU kdgov; /* Governor derivative gain (Kdgov). Typical Value = 0. Default: nullptr */ - CIMPP::PU kigov; /* Governor integral gain (Kigov). Typical Value = 2. Default: nullptr */ - CIMPP::PU kiload; /* Load limiter integral gain for PI controller (Kiload). Typical Value = 0.67. Default: nullptr */ - CIMPP::PU kimw; /* Power controller (reset) gain (Kimw). The default value of 0.01 corresponds to a reset time of 100 seconds. A value of 0.001 corresponds to a relatively slow acting load controller. Typical Value = 0.01. Default: nullptr */ - CIMPP::PU kpgov; /* Governor proportional gain (Kpgov). Typical Value = 10. Default: nullptr */ - CIMPP::PU kpload; /* Load limiter proportional gain for PI controller (Kpload). Typical Value = 2. Default: nullptr */ - CIMPP::PU kturb; /* Turbine gain (Kturb) (>0). Typical Value = 1.5. Default: nullptr */ - CIMPP::PU ldref; /* Load limiter reference value (Ldref). Typical Value = 1. Default: nullptr */ - CIMPP::PU maxerr; /* Maximum value for speed error signal (maxerr). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU minerr; /* Minimum value for speed error signal (minerr). Typical Value = -0.05. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ - CIMPP::PU r; /* Permanent droop (R). Typical Value = 0.04. Default: nullptr */ - CIMPP::Simple_Float rclose; /* Minimum valve closing rate (Rclose). Unit = PU/sec. Typical Value = -0.1. Default: nullptr */ - CIMPP::PU rdown; /* Maximum rate of load limit decrease (Rdown). Typical Value = -99. Default: nullptr */ - CIMPP::Simple_Float ropen; /* Maximum valve opening rate (Ropen). Unit = PU/sec. Typical Value = 0.10. Default: nullptr */ - CIMPP::DroopSignalFeedbackKind rselect; /* Feedback signal for droop (Rselect). Typical Value = electricalPower. Default: 0 */ - CIMPP::PU rup; /* Maximum rate of load limit increase (Rup). Typical Value = 99. Default: nullptr */ - CIMPP::Seconds ta; /* Acceleration limiter time constant (Ta) (>0). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tact; /* Actuator time constant (Tact). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tb; /* Turbine lag time constant (Tb) (>0). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tc; /* Turbine lead time constant (Tc). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tdgov; /* Governor derivative controller time constant (Tdgov). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds teng; /* Transport time delay for diesel engine used in representing diesel engines where there is a small but measurable transport delay between a change in fuel flow setting and the development of torque (Teng). Teng should be zero in all but special cases where this transport delay is of particular concern. Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tfload; /* Load Limiter time constant (Tfload) (>0). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds tpelec; /* Electrical power transducer time constant (Tpelec) (>0). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tsa; /* Temperature detection lead time constant (Tsa). Typical Value = 4. Default: nullptr */ - CIMPP::Seconds tsb; /* Temperature detection lag time constant (Tsb). Typical Value = 5. Default: nullptr */ - CIMPP::PU vmax; /* Maximum valve position limit (Vmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU vmin; /* Minimum valve position limit (Vmin). Typical Value = 0.15. Default: nullptr */ - CIMPP::PU wfnl; /* No load fuel flow (Wfnl). Typical Value = 0.2. Default: nullptr */ - CIMPP::Boolean wfspd; /* Switch for fuel source characteristic to recognize that fuel flow, for a given fuel valve stroke, can be proportional to engine speed (Wfspd). true = fuel flow proportional to speed (for some gas turbines and diesel engines with positive displacement fuel injectors) false = fuel control system keeps fuel flow independent of engine speed. Typical Value = true. Default: false */ + /** \brief Acceleration limiter setpoint (Aset). Unit = PU/sec. Typical Value = 0.01. Default: nullptr */ + CIMPP::Simple_Float aset; + + /** \brief Speed governor dead band in per unit speed (db). In the majority of applications, it is recommended that this value be set to zero. Typical Value = 0. Default: nullptr */ + CIMPP::PU db; + + /** \brief Speed sensitivity coefficient (Dm). Dm can represent either the variation of the engine power with the shaft speed or the variation of maximum power capability with shaft speed. If it is positive it describes the falling slope of the engine speed verses power characteristic as speed increases. A slightly falling characteristic is typical for reciprocating engines and some aero-derivative turbines. If it is negative the engine power is assumed to be unaffected by the shaft speed, but the maximum permissible fuel flow is taken to fall with falling shaft speed. This is characteristic of single-shaft industrial turbines due to exhaust temperature limits. Typical Value = 0. Default: nullptr */ + CIMPP::PU dm; + + /** \brief Acceleration limiter gain (Ka). Typical Value = 10. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Governor derivative gain (Kdgov). Typical Value = 0. Default: nullptr */ + CIMPP::PU kdgov; + + /** \brief Governor integral gain (Kigov). Typical Value = 2. Default: nullptr */ + CIMPP::PU kigov; + + /** \brief Load limiter integral gain for PI controller (Kiload). Typical Value = 0.67. Default: nullptr */ + CIMPP::PU kiload; + + /** \brief Power controller (reset) gain (Kimw). The default value of 0.01 corresponds to a reset time of 100 seconds. A value of 0.001 corresponds to a relatively slow acting load controller. Typical Value = 0.01. Default: nullptr */ + CIMPP::PU kimw; + + /** \brief Governor proportional gain (Kpgov). Typical Value = 10. Default: nullptr */ + CIMPP::PU kpgov; + + /** \brief Load limiter proportional gain for PI controller (Kpload). Typical Value = 2. Default: nullptr */ + CIMPP::PU kpload; + + /** \brief Turbine gain (Kturb) (>0). Typical Value = 1.5. Default: nullptr */ + CIMPP::PU kturb; + + /** \brief Load limiter reference value (Ldref). Typical Value = 1. Default: nullptr */ + CIMPP::PU ldref; + + /** \brief Maximum value for speed error signal (maxerr). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU maxerr; + + /** \brief Minimum value for speed error signal (minerr). Typical Value = -0.05. Default: nullptr */ + CIMPP::PU minerr; + + /** \brief Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Permanent droop (R). Typical Value = 0.04. Default: nullptr */ + CIMPP::PU r; + + /** \brief Minimum valve closing rate (Rclose). Unit = PU/sec. Typical Value = -0.1. Default: nullptr */ + CIMPP::Simple_Float rclose; + + /** \brief Maximum rate of load limit decrease (Rdown). Typical Value = -99. Default: nullptr */ + CIMPP::PU rdown; + + /** \brief Maximum valve opening rate (Ropen). Unit = PU/sec. Typical Value = 0.10. Default: nullptr */ + CIMPP::Simple_Float ropen; + + /** \brief Feedback signal for droop (Rselect). Typical Value = electricalPower. Default: 0 */ + CIMPP::DroopSignalFeedbackKind rselect; + + /** \brief Maximum rate of load limit increase (Rup). Typical Value = 99. Default: nullptr */ + CIMPP::PU rup; + + /** \brief Acceleration limiter time constant (Ta) (>0). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Actuator time constant (Tact). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds tact; + + /** \brief Turbine lag time constant (Tb) (>0). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Turbine lead time constant (Tc). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Governor derivative controller time constant (Tdgov). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tdgov; + + /** \brief Transport time delay for diesel engine used in representing diesel engines where there is a small but measurable transport delay between a change in fuel flow setting and the development of torque (Teng). Teng should be zero in all but special cases where this transport delay is of particular concern. Typical Value = 0. Default: nullptr */ + CIMPP::Seconds teng; + + /** \brief Load Limiter time constant (Tfload) (>0). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds tfload; + + /** \brief Electrical power transducer time constant (Tpelec) (>0). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tpelec; + + /** \brief Temperature detection lead time constant (Tsa). Typical Value = 4. Default: nullptr */ + CIMPP::Seconds tsa; + + /** \brief Temperature detection lag time constant (Tsb). Typical Value = 5. Default: nullptr */ + CIMPP::Seconds tsb; + + /** \brief Maximum valve position limit (Vmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU vmax; + + /** \brief Minimum valve position limit (Vmin). Typical Value = 0.15. Default: nullptr */ + CIMPP::PU vmin; + + /** \brief No load fuel flow (Wfnl). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU wfnl; + + /** \brief Switch for fuel source characteristic to recognize that fuel flow, for a given fuel valve stroke, can be proportional to engine speed (Wfspd). true = fuel flow proportional to speed (for some gas turbines and diesel engines with positive displacement fuel injectors) false = fuel control system keeps fuel flow independent of engine speed. Typical Value = true. Default: false */ + CIMPP::Boolean wfspd; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GovCT2.cpp b/CGMES_2.4.15_16FEB2016/GovCT2.cpp index c0dc255dc..482a2691f 100644 --- a/CGMES_2.4.15_16FEB2016/GovCT2.cpp +++ b/CGMES_2.4.15_16FEB2016/GovCT2.cpp @@ -8,67 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "DroopSignalFeedbackKind.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" using namespace CIMPP; -GovCT2::GovCT2() {}; -GovCT2::~GovCT2() {}; +GovCT2::GovCT2() {} +GovCT2::~GovCT2() {} static const std::list PossibleProfilesForClass = { @@ -150,740 +94,794 @@ GovCT2::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovCT2_aset(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_aset(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->aset; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_db(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_db(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_dm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_dm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_kdgov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_kdgov(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kdgov; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_kigov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_kigov(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kigov; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_kiload(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_kiload(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kiload; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_kimw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_kimw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kimw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_kpgov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_kpgov(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpgov; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_kpload(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_kpload(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpload; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_kturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_kturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_ldref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_ldref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ldref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_maxerr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_maxerr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxerr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_minerr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_minerr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minerr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_prate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_prate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->prate; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_rclose(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_rclose(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rclose; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_rdown(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_rdown(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rdown; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_ropen(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_ropen(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ropen; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_rselect(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_rselect(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rselect; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_rup(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_rup(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rup; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_tact(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_tact(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tact; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_tdgov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_tdgov(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdgov; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_teng(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_teng(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->teng; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_tfload(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_tfload(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tfload; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_tpelec(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_tpelec(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpelec; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_tsa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_tsa(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tsa; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_tsb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_tsb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tsb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_vmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_vmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_wfnl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_wfnl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wfnl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_wfspd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_wfspd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wfspd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovCT2_aset(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->aset; if (!buffer.str().empty()) @@ -897,7 +895,8 @@ bool get_GovCT2_aset(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_db(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db; if (!buffer.str().empty()) @@ -911,7 +910,8 @@ bool get_GovCT2_db(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_dm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dm; if (!buffer.str().empty()) @@ -925,7 +925,8 @@ bool get_GovCT2_dm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_flim1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim1; if (!buffer.str().empty()) @@ -939,7 +940,8 @@ bool get_GovCT2_flim1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_flim10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim10; if (!buffer.str().empty()) @@ -953,7 +955,8 @@ bool get_GovCT2_flim10(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_flim2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim2; if (!buffer.str().empty()) @@ -967,7 +970,8 @@ bool get_GovCT2_flim2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_flim3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim3; if (!buffer.str().empty()) @@ -981,7 +985,8 @@ bool get_GovCT2_flim3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_flim4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim4; if (!buffer.str().empty()) @@ -995,7 +1000,8 @@ bool get_GovCT2_flim4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_flim5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim5; if (!buffer.str().empty()) @@ -1009,7 +1015,8 @@ bool get_GovCT2_flim5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_flim6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim6; if (!buffer.str().empty()) @@ -1023,7 +1030,8 @@ bool get_GovCT2_flim6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_flim7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim7; if (!buffer.str().empty()) @@ -1037,7 +1045,8 @@ bool get_GovCT2_flim7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_flim8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim8; if (!buffer.str().empty()) @@ -1051,7 +1060,8 @@ bool get_GovCT2_flim8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_flim9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim9; if (!buffer.str().empty()) @@ -1065,7 +1075,8 @@ bool get_GovCT2_flim9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -1079,7 +1090,8 @@ bool get_GovCT2_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_kdgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdgov; if (!buffer.str().empty()) @@ -1093,7 +1105,8 @@ bool get_GovCT2_kdgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_kigov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kigov; if (!buffer.str().empty()) @@ -1107,7 +1120,8 @@ bool get_GovCT2_kigov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_kiload(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kiload; if (!buffer.str().empty()) @@ -1121,7 +1135,8 @@ bool get_GovCT2_kiload(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_kimw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kimw; if (!buffer.str().empty()) @@ -1135,7 +1150,8 @@ bool get_GovCT2_kimw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_kpgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpgov; if (!buffer.str().empty()) @@ -1149,7 +1165,8 @@ bool get_GovCT2_kpgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_kpload(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpload; if (!buffer.str().empty()) @@ -1163,7 +1180,8 @@ bool get_GovCT2_kpload(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_kturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kturb; if (!buffer.str().empty()) @@ -1177,7 +1195,8 @@ bool get_GovCT2_kturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_ldref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ldref; if (!buffer.str().empty()) @@ -1191,7 +1210,8 @@ bool get_GovCT2_ldref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_maxerr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxerr; if (!buffer.str().empty()) @@ -1205,7 +1225,8 @@ bool get_GovCT2_maxerr(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_minerr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minerr; if (!buffer.str().empty()) @@ -1219,7 +1240,8 @@ bool get_GovCT2_minerr(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -1233,7 +1255,8 @@ bool get_GovCT2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_plim1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim1; if (!buffer.str().empty()) @@ -1247,7 +1270,8 @@ bool get_GovCT2_plim1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_plim10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim10; if (!buffer.str().empty()) @@ -1261,7 +1285,8 @@ bool get_GovCT2_plim10(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_plim2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim2; if (!buffer.str().empty()) @@ -1275,7 +1300,8 @@ bool get_GovCT2_plim2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_plim3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim3; if (!buffer.str().empty()) @@ -1289,7 +1315,8 @@ bool get_GovCT2_plim3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_plim4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim4; if (!buffer.str().empty()) @@ -1303,7 +1330,8 @@ bool get_GovCT2_plim4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_plim5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim5; if (!buffer.str().empty()) @@ -1317,7 +1345,8 @@ bool get_GovCT2_plim5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_plim6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim6; if (!buffer.str().empty()) @@ -1331,7 +1360,8 @@ bool get_GovCT2_plim6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_plim7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim7; if (!buffer.str().empty()) @@ -1345,7 +1375,8 @@ bool get_GovCT2_plim7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_plim8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim8; if (!buffer.str().empty()) @@ -1359,7 +1390,8 @@ bool get_GovCT2_plim8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_plim9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim9; if (!buffer.str().empty()) @@ -1373,7 +1405,8 @@ bool get_GovCT2_plim9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_prate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->prate; if (!buffer.str().empty()) @@ -1387,7 +1420,8 @@ bool get_GovCT2_prate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -1401,7 +1435,8 @@ bool get_GovCT2_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_rclose(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rclose; if (!buffer.str().empty()) @@ -1415,7 +1450,8 @@ bool get_GovCT2_rclose(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_rdown(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rdown; if (!buffer.str().empty()) @@ -1429,7 +1465,8 @@ bool get_GovCT2_rdown(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_ropen(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ropen; if (!buffer.str().empty()) @@ -1441,9 +1478,25 @@ bool get_GovCT2_ropen(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } +bool get_GovCT2_rselect(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->rselect; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_GovCT2_rup(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rup; if (!buffer.str().empty()) @@ -1457,7 +1510,8 @@ bool get_GovCT2_rup(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -1471,7 +1525,8 @@ bool get_GovCT2_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_tact(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tact; if (!buffer.str().empty()) @@ -1485,7 +1540,8 @@ bool get_GovCT2_tact(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -1499,7 +1555,8 @@ bool get_GovCT2_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -1513,7 +1570,8 @@ bool get_GovCT2_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_tdgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdgov; if (!buffer.str().empty()) @@ -1527,7 +1585,8 @@ bool get_GovCT2_tdgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_teng(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->teng; if (!buffer.str().empty()) @@ -1541,7 +1600,8 @@ bool get_GovCT2_teng(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_tfload(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tfload; if (!buffer.str().empty()) @@ -1555,7 +1615,8 @@ bool get_GovCT2_tfload(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_tpelec(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpelec; if (!buffer.str().empty()) @@ -1569,7 +1630,8 @@ bool get_GovCT2_tpelec(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_tsa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tsa; if (!buffer.str().empty()) @@ -1583,7 +1645,8 @@ bool get_GovCT2_tsa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_tsb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tsb; if (!buffer.str().empty()) @@ -1597,7 +1660,8 @@ bool get_GovCT2_tsb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmax; if (!buffer.str().empty()) @@ -1611,7 +1675,8 @@ bool get_GovCT2_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmin; if (!buffer.str().empty()) @@ -1625,7 +1690,8 @@ bool get_GovCT2_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_wfnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wfnl; if (!buffer.str().empty()) @@ -1639,7 +1705,8 @@ bool get_GovCT2_wfnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_wfspd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wfspd; if (!buffer.str().empty()) @@ -1651,22 +1718,6 @@ bool get_GovCT2_wfspd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - -bool get_GovCT2_rselect(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->rselect; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char GovCT2::debugName[] = "GovCT2"; const char* GovCT2::debugString() const { @@ -1675,67 +1726,67 @@ const char* GovCT2::debugString() const void GovCT2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovCT2"), &GovCT2_factory)); + factory_map.emplace("cim:GovCT2", &GovCT2_factory); } void GovCT2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovCT2.aset"), &assign_GovCT2_aset)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.db"), &assign_GovCT2_db)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.dm"), &assign_GovCT2_dm)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim1"), &assign_GovCT2_flim1)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim10"), &assign_GovCT2_flim10)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim2"), &assign_GovCT2_flim2)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim3"), &assign_GovCT2_flim3)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim4"), &assign_GovCT2_flim4)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim5"), &assign_GovCT2_flim5)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim6"), &assign_GovCT2_flim6)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim7"), &assign_GovCT2_flim7)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim8"), &assign_GovCT2_flim8)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim9"), &assign_GovCT2_flim9)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.ka"), &assign_GovCT2_ka)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.kdgov"), &assign_GovCT2_kdgov)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.kigov"), &assign_GovCT2_kigov)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.kiload"), &assign_GovCT2_kiload)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.kimw"), &assign_GovCT2_kimw)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.kpgov"), &assign_GovCT2_kpgov)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.kpload"), &assign_GovCT2_kpload)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.kturb"), &assign_GovCT2_kturb)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.ldref"), &assign_GovCT2_ldref)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.maxerr"), &assign_GovCT2_maxerr)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.minerr"), &assign_GovCT2_minerr)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.mwbase"), &assign_GovCT2_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim1"), &assign_GovCT2_plim1)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim10"), &assign_GovCT2_plim10)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim2"), &assign_GovCT2_plim2)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim3"), &assign_GovCT2_plim3)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim4"), &assign_GovCT2_plim4)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim5"), &assign_GovCT2_plim5)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim6"), &assign_GovCT2_plim6)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim7"), &assign_GovCT2_plim7)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim8"), &assign_GovCT2_plim8)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim9"), &assign_GovCT2_plim9)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.prate"), &assign_GovCT2_prate)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.r"), &assign_GovCT2_r)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.rclose"), &assign_GovCT2_rclose)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.rdown"), &assign_GovCT2_rdown)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.ropen"), &assign_GovCT2_ropen)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.rselect"), &assign_GovCT2_rselect)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.rup"), &assign_GovCT2_rup)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.ta"), &assign_GovCT2_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.tact"), &assign_GovCT2_tact)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.tb"), &assign_GovCT2_tb)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.tc"), &assign_GovCT2_tc)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.tdgov"), &assign_GovCT2_tdgov)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.teng"), &assign_GovCT2_teng)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.tfload"), &assign_GovCT2_tfload)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.tpelec"), &assign_GovCT2_tpelec)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.tsa"), &assign_GovCT2_tsa)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.tsb"), &assign_GovCT2_tsb)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.vmax"), &assign_GovCT2_vmax)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.vmin"), &assign_GovCT2_vmin)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.wfnl"), &assign_GovCT2_wfnl)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.wfspd"), &assign_GovCT2_wfspd)); + assign_map.emplace("cim:GovCT2.aset", &assign_GovCT2_aset); + assign_map.emplace("cim:GovCT2.db", &assign_GovCT2_db); + assign_map.emplace("cim:GovCT2.dm", &assign_GovCT2_dm); + assign_map.emplace("cim:GovCT2.flim1", &assign_GovCT2_flim1); + assign_map.emplace("cim:GovCT2.flim10", &assign_GovCT2_flim10); + assign_map.emplace("cim:GovCT2.flim2", &assign_GovCT2_flim2); + assign_map.emplace("cim:GovCT2.flim3", &assign_GovCT2_flim3); + assign_map.emplace("cim:GovCT2.flim4", &assign_GovCT2_flim4); + assign_map.emplace("cim:GovCT2.flim5", &assign_GovCT2_flim5); + assign_map.emplace("cim:GovCT2.flim6", &assign_GovCT2_flim6); + assign_map.emplace("cim:GovCT2.flim7", &assign_GovCT2_flim7); + assign_map.emplace("cim:GovCT2.flim8", &assign_GovCT2_flim8); + assign_map.emplace("cim:GovCT2.flim9", &assign_GovCT2_flim9); + assign_map.emplace("cim:GovCT2.ka", &assign_GovCT2_ka); + assign_map.emplace("cim:GovCT2.kdgov", &assign_GovCT2_kdgov); + assign_map.emplace("cim:GovCT2.kigov", &assign_GovCT2_kigov); + assign_map.emplace("cim:GovCT2.kiload", &assign_GovCT2_kiload); + assign_map.emplace("cim:GovCT2.kimw", &assign_GovCT2_kimw); + assign_map.emplace("cim:GovCT2.kpgov", &assign_GovCT2_kpgov); + assign_map.emplace("cim:GovCT2.kpload", &assign_GovCT2_kpload); + assign_map.emplace("cim:GovCT2.kturb", &assign_GovCT2_kturb); + assign_map.emplace("cim:GovCT2.ldref", &assign_GovCT2_ldref); + assign_map.emplace("cim:GovCT2.maxerr", &assign_GovCT2_maxerr); + assign_map.emplace("cim:GovCT2.minerr", &assign_GovCT2_minerr); + assign_map.emplace("cim:GovCT2.mwbase", &assign_GovCT2_mwbase); + assign_map.emplace("cim:GovCT2.plim1", &assign_GovCT2_plim1); + assign_map.emplace("cim:GovCT2.plim10", &assign_GovCT2_plim10); + assign_map.emplace("cim:GovCT2.plim2", &assign_GovCT2_plim2); + assign_map.emplace("cim:GovCT2.plim3", &assign_GovCT2_plim3); + assign_map.emplace("cim:GovCT2.plim4", &assign_GovCT2_plim4); + assign_map.emplace("cim:GovCT2.plim5", &assign_GovCT2_plim5); + assign_map.emplace("cim:GovCT2.plim6", &assign_GovCT2_plim6); + assign_map.emplace("cim:GovCT2.plim7", &assign_GovCT2_plim7); + assign_map.emplace("cim:GovCT2.plim8", &assign_GovCT2_plim8); + assign_map.emplace("cim:GovCT2.plim9", &assign_GovCT2_plim9); + assign_map.emplace("cim:GovCT2.prate", &assign_GovCT2_prate); + assign_map.emplace("cim:GovCT2.r", &assign_GovCT2_r); + assign_map.emplace("cim:GovCT2.rclose", &assign_GovCT2_rclose); + assign_map.emplace("cim:GovCT2.rdown", &assign_GovCT2_rdown); + assign_map.emplace("cim:GovCT2.ropen", &assign_GovCT2_ropen); + assign_map.emplace("cim:GovCT2.rselect", &assign_GovCT2_rselect); + assign_map.emplace("cim:GovCT2.rup", &assign_GovCT2_rup); + assign_map.emplace("cim:GovCT2.ta", &assign_GovCT2_ta); + assign_map.emplace("cim:GovCT2.tact", &assign_GovCT2_tact); + assign_map.emplace("cim:GovCT2.tb", &assign_GovCT2_tb); + assign_map.emplace("cim:GovCT2.tc", &assign_GovCT2_tc); + assign_map.emplace("cim:GovCT2.tdgov", &assign_GovCT2_tdgov); + assign_map.emplace("cim:GovCT2.teng", &assign_GovCT2_teng); + assign_map.emplace("cim:GovCT2.tfload", &assign_GovCT2_tfload); + assign_map.emplace("cim:GovCT2.tpelec", &assign_GovCT2_tpelec); + assign_map.emplace("cim:GovCT2.tsa", &assign_GovCT2_tsa); + assign_map.emplace("cim:GovCT2.tsb", &assign_GovCT2_tsb); + assign_map.emplace("cim:GovCT2.vmax", &assign_GovCT2_vmax); + assign_map.emplace("cim:GovCT2.vmin", &assign_GovCT2_vmin); + assign_map.emplace("cim:GovCT2.wfnl", &assign_GovCT2_wfnl); + assign_map.emplace("cim:GovCT2.wfspd", &assign_GovCT2_wfspd); } void GovCT2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/GovCT2.hpp b/CGMES_2.4.15_16FEB2016/GovCT2.hpp index cc7c53d56..bb33e770d 100644 --- a/CGMES_2.4.15_16FEB2016/GovCT2.hpp +++ b/CGMES_2.4.15_16FEB2016/GovCT2.hpp @@ -23,9 +23,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - General governor model with frequency-dependent fuel flow limit. This model is a modification of the GovCT1model in order to represent the frequency-dependent fuel flow limit of a specific gas turbine manufacturer. - */ + /** \brief General governor model with frequency-dependent fuel flow limit. This model is a modification of the GovCT1model in order to represent the frequency-dependent fuel flow limit of a specific gas turbine manufacturer. */ class GovCT2 : public TurbineGovernorDynamics { public: @@ -33,62 +31,173 @@ namespace CIMPP GovCT2(); ~GovCT2() override; - CIMPP::Simple_Float aset; /* Acceleration limiter setpoint (Aset). Unit = PU/sec. Typical Value = 10. Default: nullptr */ - CIMPP::PU db; /* Speed governor dead band in per unit speed (db). In the majority of applications, it is recommended that this value be set to zero. Typical Value = 0. Default: nullptr */ - CIMPP::PU dm; /* Speed sensitivity coefficient (Dm). Dm can represent either the variation of the engine power with the shaft speed or the variation of maximum power capability with shaft speed. If it is positive it describes the falling slope of the engine speed verses power characteristic as speed increases. A slightly falling characteristic is typical for reciprocating engines and some aero-derivative turbines. If it is negative the engine power is assumed to be unaffected by the shaft speed, but the maximum permissible fuel flow is taken to fall with falling shaft speed. This is characteristic of single-shaft industrial turbines due to exhaust temperature limits. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency flim1; /* Frequency threshold 1 (Flim1). Unit = Hz. Typical Value = 59. Default: nullptr */ - CIMPP::Frequency flim10; /* Frequency threshold 10 (Flim10). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency flim2; /* Frequency threshold 2 (Flim2). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency flim3; /* Frequency threshold 3 (Flim3). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency flim4; /* Frequency threshold 4 (Flim4). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency flim5; /* Frequency threshold 5 (Flim5). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency flim6; /* Frequency threshold 6 (Flim6). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency flim7; /* Frequency threshold 7 (Flim7). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency flim8; /* Frequency threshold 8 (Flim8). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency flim9; /* Frequency threshold 9 (Flim9). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::PU ka; /* Acceleration limiter Gain (Ka). Typical Value = 10. Default: nullptr */ - CIMPP::PU kdgov; /* Governor derivative gain (Kdgov). Typical Value = 0. Default: nullptr */ - CIMPP::PU kigov; /* Governor integral gain (Kigov). Typical Value = 0.45. Default: nullptr */ - CIMPP::PU kiload; /* Load limiter integral gain for PI controller (Kiload). Typical Value = 1. Default: nullptr */ - CIMPP::PU kimw; /* Power controller (reset) gain (Kimw). The default value of 0.01 corresponds to a reset time of 100 seconds. A value of 0.001 corresponds to a relatively slow acting load controller. Typical Value = 0. Default: nullptr */ - CIMPP::PU kpgov; /* Governor proportional gain (Kpgov). Typical Value = 4. Default: nullptr */ - CIMPP::PU kpload; /* Load limiter proportional gain for PI controller (Kpload). Typical Value = 1. Default: nullptr */ - CIMPP::PU kturb; /* Turbine gain (Kturb). Typical Value = 1.9168. Default: nullptr */ - CIMPP::PU ldref; /* Load limiter reference value (Ldref). Typical Value = 1. Default: nullptr */ - CIMPP::PU maxerr; /* Maximum value for speed error signal (Maxerr). Typical Value = 1. Default: nullptr */ - CIMPP::PU minerr; /* Minimum value for speed error signal (Minerr). Typical Value = -1. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ - CIMPP::PU plim1; /* Power limit 1 (Plim1). Typical Value = 0.8325. Default: nullptr */ - CIMPP::PU plim10; /* Power limit 10 (Plim10). Typical Value = 0. Default: nullptr */ - CIMPP::PU plim2; /* Power limit 2 (Plim2). Typical Value = 0. Default: nullptr */ - CIMPP::PU plim3; /* Power limit 3 (Plim3). Typical Value = 0. Default: nullptr */ - CIMPP::PU plim4; /* Power limit 4 (Plim4). Typical Value = 0. Default: nullptr */ - CIMPP::PU plim5; /* Power limit 5 (Plim5). Typical Value = 0. Default: nullptr */ - CIMPP::PU plim6; /* Power limit 6 (Plim6). Typical Value = 0. Default: nullptr */ - CIMPP::PU plim7; /* Power limit 7 (Plim7). Typical Value = 0. Default: nullptr */ - CIMPP::PU plim8; /* Power limit 8 (Plim8). Typical Value = 0. Default: nullptr */ - CIMPP::PU plim9; /* Power Limit 9 (Plim9). Typical Value = 0. Default: nullptr */ - CIMPP::PU prate; /* Ramp rate for frequency-dependent power limit (Prate). Typical Value = 0.017. Default: nullptr */ - CIMPP::PU r; /* Permanent droop (R). Typical Value = 0.05. Default: nullptr */ - CIMPP::Simple_Float rclose; /* Minimum valve closing rate (Rclose). Unit = PU/sec. Typical Value = -99. Default: nullptr */ - CIMPP::PU rdown; /* Maximum rate of load limit decrease (Rdown). Typical Value = -99. Default: nullptr */ - CIMPP::Simple_Float ropen; /* Maximum valve opening rate (Ropen). Unit = PU/sec. Typical Value = 99. Default: nullptr */ - CIMPP::DroopSignalFeedbackKind rselect; /* Feedback signal for droop (Rselect). Typical Value = electricalPower. Default: 0 */ - CIMPP::PU rup; /* Maximum rate of load limit increase (Rup). Typical Value = 99. Default: nullptr */ - CIMPP::Seconds ta; /* Acceleration limiter time constant (Ta). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tact; /* Actuator time constant (Tact). Typical Value = 0.4. Default: nullptr */ - CIMPP::Seconds tb; /* Turbine lag time constant (Tb). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tc; /* Turbine lead time constant (Tc). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tdgov; /* Governor derivative controller time constant (Tdgov). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds teng; /* Transport time delay for diesel engine used in representing diesel engines where there is a small but measurable transport delay between a change in fuel flow setting and the development of torque (Teng). Teng should be zero in all but special cases where this transport delay is of particular concern. Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tfload; /* Load Limiter time constant (Tfload). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds tpelec; /* Electrical power transducer time constant (Tpelec). Typical Value = 2.5. Default: nullptr */ - CIMPP::Seconds tsa; /* Temperature detection lead time constant (Tsa). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tsb; /* Temperature detection lag time constant (Tsb). Typical Value = 50. Default: nullptr */ - CIMPP::PU vmax; /* Maximum valve position limit (Vmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU vmin; /* Minimum valve position limit (Vmin). Typical Value = 0.175. Default: nullptr */ - CIMPP::PU wfnl; /* No load fuel flow (Wfnl). Typical Value = 0.187. Default: nullptr */ - CIMPP::Boolean wfspd; /* Switch for fuel source characteristic to recognize that fuel flow, for a given fuel valve stroke, can be proportional to engine speed (Wfspd). true = fuel flow proportional to speed (for some gas turbines and diesel engines with positive displacement fuel injectors) false = fuel control system keeps fuel flow independent of engine speed. Typical Value = false. Default: false */ + /** \brief Acceleration limiter setpoint (Aset). Unit = PU/sec. Typical Value = 10. Default: nullptr */ + CIMPP::Simple_Float aset; + + /** \brief Speed governor dead band in per unit speed (db). In the majority of applications, it is recommended that this value be set to zero. Typical Value = 0. Default: nullptr */ + CIMPP::PU db; + + /** \brief Speed sensitivity coefficient (Dm). Dm can represent either the variation of the engine power with the shaft speed or the variation of maximum power capability with shaft speed. If it is positive it describes the falling slope of the engine speed verses power characteristic as speed increases. A slightly falling characteristic is typical for reciprocating engines and some aero-derivative turbines. If it is negative the engine power is assumed to be unaffected by the shaft speed, but the maximum permissible fuel flow is taken to fall with falling shaft speed. This is characteristic of single-shaft industrial turbines due to exhaust temperature limits. Typical Value = 0. Default: nullptr */ + CIMPP::PU dm; + + /** \brief Frequency threshold 1 (Flim1). Unit = Hz. Typical Value = 59. Default: nullptr */ + CIMPP::Frequency flim1; + + /** \brief Frequency threshold 10 (Flim10). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency flim10; + + /** \brief Frequency threshold 2 (Flim2). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency flim2; + + /** \brief Frequency threshold 3 (Flim3). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency flim3; + + /** \brief Frequency threshold 4 (Flim4). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency flim4; + + /** \brief Frequency threshold 5 (Flim5). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency flim5; + + /** \brief Frequency threshold 6 (Flim6). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency flim6; + + /** \brief Frequency threshold 7 (Flim7). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency flim7; + + /** \brief Frequency threshold 8 (Flim8). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency flim8; + + /** \brief Frequency threshold 9 (Flim9). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency flim9; + + /** \brief Acceleration limiter Gain (Ka). Typical Value = 10. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Governor derivative gain (Kdgov). Typical Value = 0. Default: nullptr */ + CIMPP::PU kdgov; + + /** \brief Governor integral gain (Kigov). Typical Value = 0.45. Default: nullptr */ + CIMPP::PU kigov; + + /** \brief Load limiter integral gain for PI controller (Kiload). Typical Value = 1. Default: nullptr */ + CIMPP::PU kiload; + + /** \brief Power controller (reset) gain (Kimw). The default value of 0.01 corresponds to a reset time of 100 seconds. A value of 0.001 corresponds to a relatively slow acting load controller. Typical Value = 0. Default: nullptr */ + CIMPP::PU kimw; + + /** \brief Governor proportional gain (Kpgov). Typical Value = 4. Default: nullptr */ + CIMPP::PU kpgov; + + /** \brief Load limiter proportional gain for PI controller (Kpload). Typical Value = 1. Default: nullptr */ + CIMPP::PU kpload; + + /** \brief Turbine gain (Kturb). Typical Value = 1.9168. Default: nullptr */ + CIMPP::PU kturb; + + /** \brief Load limiter reference value (Ldref). Typical Value = 1. Default: nullptr */ + CIMPP::PU ldref; + + /** \brief Maximum value for speed error signal (Maxerr). Typical Value = 1. Default: nullptr */ + CIMPP::PU maxerr; + + /** \brief Minimum value for speed error signal (Minerr). Typical Value = -1. Default: nullptr */ + CIMPP::PU minerr; + + /** \brief Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Power limit 1 (Plim1). Typical Value = 0.8325. Default: nullptr */ + CIMPP::PU plim1; + + /** \brief Power limit 10 (Plim10). Typical Value = 0. Default: nullptr */ + CIMPP::PU plim10; + + /** \brief Power limit 2 (Plim2). Typical Value = 0. Default: nullptr */ + CIMPP::PU plim2; + + /** \brief Power limit 3 (Plim3). Typical Value = 0. Default: nullptr */ + CIMPP::PU plim3; + + /** \brief Power limit 4 (Plim4). Typical Value = 0. Default: nullptr */ + CIMPP::PU plim4; + + /** \brief Power limit 5 (Plim5). Typical Value = 0. Default: nullptr */ + CIMPP::PU plim5; + + /** \brief Power limit 6 (Plim6). Typical Value = 0. Default: nullptr */ + CIMPP::PU plim6; + + /** \brief Power limit 7 (Plim7). Typical Value = 0. Default: nullptr */ + CIMPP::PU plim7; + + /** \brief Power limit 8 (Plim8). Typical Value = 0. Default: nullptr */ + CIMPP::PU plim8; + + /** \brief Power Limit 9 (Plim9). Typical Value = 0. Default: nullptr */ + CIMPP::PU plim9; + + /** \brief Ramp rate for frequency-dependent power limit (Prate). Typical Value = 0.017. Default: nullptr */ + CIMPP::PU prate; + + /** \brief Permanent droop (R). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU r; + + /** \brief Minimum valve closing rate (Rclose). Unit = PU/sec. Typical Value = -99. Default: nullptr */ + CIMPP::Simple_Float rclose; + + /** \brief Maximum rate of load limit decrease (Rdown). Typical Value = -99. Default: nullptr */ + CIMPP::PU rdown; + + /** \brief Maximum valve opening rate (Ropen). Unit = PU/sec. Typical Value = 99. Default: nullptr */ + CIMPP::Simple_Float ropen; + + /** \brief Feedback signal for droop (Rselect). Typical Value = electricalPower. Default: 0 */ + CIMPP::DroopSignalFeedbackKind rselect; + + /** \brief Maximum rate of load limit increase (Rup). Typical Value = 99. Default: nullptr */ + CIMPP::PU rup; + + /** \brief Acceleration limiter time constant (Ta). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Actuator time constant (Tact). Typical Value = 0.4. Default: nullptr */ + CIMPP::Seconds tact; + + /** \brief Turbine lag time constant (Tb). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Turbine lead time constant (Tc). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Governor derivative controller time constant (Tdgov). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tdgov; + + /** \brief Transport time delay for diesel engine used in representing diesel engines where there is a small but measurable transport delay between a change in fuel flow setting and the development of torque (Teng). Teng should be zero in all but special cases where this transport delay is of particular concern. Typical Value = 0. Default: nullptr */ + CIMPP::Seconds teng; + + /** \brief Load Limiter time constant (Tfload). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds tfload; + + /** \brief Electrical power transducer time constant (Tpelec). Typical Value = 2.5. Default: nullptr */ + CIMPP::Seconds tpelec; + + /** \brief Temperature detection lead time constant (Tsa). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tsa; + + /** \brief Temperature detection lag time constant (Tsb). Typical Value = 50. Default: nullptr */ + CIMPP::Seconds tsb; + + /** \brief Maximum valve position limit (Vmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU vmax; + + /** \brief Minimum valve position limit (Vmin). Typical Value = 0.175. Default: nullptr */ + CIMPP::PU vmin; + + /** \brief No load fuel flow (Wfnl). Typical Value = 0.187. Default: nullptr */ + CIMPP::PU wfnl; + + /** \brief Switch for fuel source characteristic to recognize that fuel flow, for a given fuel valve stroke, can be proportional to engine speed (Wfspd). true = fuel flow proportional to speed (for some gas turbines and diesel engines with positive displacement fuel injectors) false = fuel control system keeps fuel flow independent of engine speed. Typical Value = false. Default: false */ + CIMPP::Boolean wfspd; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GovGAST.cpp b/CGMES_2.4.15_16FEB2016/GovGAST.cpp index d91027d02..cc94e78ad 100644 --- a/CGMES_2.4.15_16FEB2016/GovGAST.cpp +++ b/CGMES_2.4.15_16FEB2016/GovGAST.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -GovGAST::GovGAST() {}; -GovGAST::~GovGAST() {}; +GovGAST::GovGAST() {} +GovGAST::~GovGAST() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ GovGAST::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovGAST_at(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_at(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->at; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST_dturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_dturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST_kt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_kt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_vmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_vmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovGAST_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->at; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_GovGAST_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dturb; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_GovGAST_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST_kt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kt; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_GovGAST_kt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_GovGAST_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovGAST_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_GovGAST_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_GovGAST_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_GovGAST_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_GovGAST_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmax; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_GovGAST_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmin; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_GovGAST_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char GovGAST::debugName[] = "GovGAST"; const char* GovGAST::debugString() const { @@ -341,21 +346,21 @@ const char* GovGAST::debugString() const void GovGAST::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovGAST"), &GovGAST_factory)); + factory_map.emplace("cim:GovGAST", &GovGAST_factory); } void GovGAST::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovGAST.at"), &assign_GovGAST_at)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST.dturb"), &assign_GovGAST_dturb)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST.kt"), &assign_GovGAST_kt)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST.mwbase"), &assign_GovGAST_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST.r"), &assign_GovGAST_r)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST.t1"), &assign_GovGAST_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST.t2"), &assign_GovGAST_t2)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST.t3"), &assign_GovGAST_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST.vmax"), &assign_GovGAST_vmax)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST.vmin"), &assign_GovGAST_vmin)); + assign_map.emplace("cim:GovGAST.at", &assign_GovGAST_at); + assign_map.emplace("cim:GovGAST.dturb", &assign_GovGAST_dturb); + assign_map.emplace("cim:GovGAST.kt", &assign_GovGAST_kt); + assign_map.emplace("cim:GovGAST.mwbase", &assign_GovGAST_mwbase); + assign_map.emplace("cim:GovGAST.r", &assign_GovGAST_r); + assign_map.emplace("cim:GovGAST.t1", &assign_GovGAST_t1); + assign_map.emplace("cim:GovGAST.t2", &assign_GovGAST_t2); + assign_map.emplace("cim:GovGAST.t3", &assign_GovGAST_t3); + assign_map.emplace("cim:GovGAST.vmax", &assign_GovGAST_vmax); + assign_map.emplace("cim:GovGAST.vmin", &assign_GovGAST_vmin); } void GovGAST::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/GovGAST.hpp b/CGMES_2.4.15_16FEB2016/GovGAST.hpp index f29598550..497af8aa8 100644 --- a/CGMES_2.4.15_16FEB2016/GovGAST.hpp +++ b/CGMES_2.4.15_16FEB2016/GovGAST.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Single shaft gas turbine. - */ + /** \brief Single shaft gas turbine. */ class GovGAST : public TurbineGovernorDynamics { public: @@ -29,16 +27,35 @@ namespace CIMPP GovGAST(); ~GovGAST() override; - CIMPP::PU at; /* Ambient temperature load limit (Load Limit). Typical Value = 1. Default: nullptr */ - CIMPP::PU dturb; /* Turbine damping factor (Dturb). Typical Value = 0.18. Default: nullptr */ - CIMPP::PU kt; /* Temperature limiter gain (Kt). Typical Value = 3. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (> 0). Default: nullptr */ - CIMPP::PU r; /* Permanent droop (R). Typical Value = 0.04. Default: nullptr */ - CIMPP::Seconds t1; /* Governor mechanism time constant (T1). T1 represents the natural valve positioning time constant of the governor for small disturbances, as seen when rate limiting is not in effect. Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds t2; /* Turbine power time constant (T2). T2 represents delay due to internal energy storage of the gas turbine engine. T2 can be used to give a rough approximation to the delay associated with acceleration of the compressor spool of a multi-shaft engine, or with the compressibility of gas in the plenum of a the free power turbine of an aero-derivative unit, for example. Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds t3; /* Turbine exhaust temperature time constant (T3). Typical Value = 3. Default: nullptr */ - CIMPP::PU vmax; /* Maximum turbine power, PU of MWbase (Vmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU vmin; /* Minimum turbine power, PU of MWbase (Vmin). Typical Value = 0. Default: nullptr */ + /** \brief Ambient temperature load limit (Load Limit). Typical Value = 1. Default: nullptr */ + CIMPP::PU at; + + /** \brief Turbine damping factor (Dturb). Typical Value = 0.18. Default: nullptr */ + CIMPP::PU dturb; + + /** \brief Temperature limiter gain (Kt). Typical Value = 3. Default: nullptr */ + CIMPP::PU kt; + + /** \brief Base for power values (MWbase) (> 0). Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Permanent droop (R). Typical Value = 0.04. Default: nullptr */ + CIMPP::PU r; + + /** \brief Governor mechanism time constant (T1). T1 represents the natural valve positioning time constant of the governor for small disturbances, as seen when rate limiting is not in effect. Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Turbine power time constant (T2). T2 represents delay due to internal energy storage of the gas turbine engine. T2 can be used to give a rough approximation to the delay associated with acceleration of the compressor spool of a multi-shaft engine, or with the compressibility of gas in the plenum of a the free power turbine of an aero-derivative unit, for example. Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Turbine exhaust temperature time constant (T3). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Maximum turbine power, PU of MWbase (Vmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU vmax; + + /** \brief Minimum turbine power, PU of MWbase (Vmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU vmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GovGAST1.cpp b/CGMES_2.4.15_16FEB2016/GovGAST1.cpp index 10ed047f3..4acaed7db 100644 --- a/CGMES_2.4.15_16FEB2016/GovGAST1.cpp +++ b/CGMES_2.4.15_16FEB2016/GovGAST1.cpp @@ -8,45 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Frequency.hpp" -#include "ActivePower.hpp" -#include "Frequency.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -GovGAST1::GovGAST1() {}; -GovGAST1::~GovGAST1() {}; +GovGAST1::GovGAST1() {} +GovGAST1::~GovGAST1() {} static const std::list PossibleProfilesForClass = { @@ -106,454 +72,486 @@ GovGAST1::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovGAST1_a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_a(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_b(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_eps(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eps; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_fidle(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_fidle(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fidle; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_gv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_kt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_kt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_lmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_lmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_loadinc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_loadinc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->loadinc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_ltrate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_ltrate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ltrate; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_pgv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_rmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_rmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_tltr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_tltr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tltr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_vmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_vmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovGAST1_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a; if (!buffer.str().empty()) @@ -567,7 +565,8 @@ bool get_GovGAST1_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b; if (!buffer.str().empty()) @@ -581,7 +580,8 @@ bool get_GovGAST1_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -595,7 +595,8 @@ bool get_GovGAST1_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST1_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -609,7 +610,8 @@ bool get_GovGAST1_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST1_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eps; if (!buffer.str().empty()) @@ -623,7 +625,8 @@ bool get_GovGAST1_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST1_fidle(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fidle; if (!buffer.str().empty()) @@ -637,7 +640,8 @@ bool get_GovGAST1_fidle(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovGAST1_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -651,7 +655,8 @@ bool get_GovGAST1_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST1_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -665,7 +670,8 @@ bool get_GovGAST1_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST1_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -679,7 +685,8 @@ bool get_GovGAST1_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST1_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -693,7 +700,8 @@ bool get_GovGAST1_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST1_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -707,7 +715,8 @@ bool get_GovGAST1_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST1_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv6; if (!buffer.str().empty()) @@ -721,7 +730,8 @@ bool get_GovGAST1_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST1_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -735,7 +745,8 @@ bool get_GovGAST1_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_kt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kt; if (!buffer.str().empty()) @@ -749,7 +760,8 @@ bool get_GovGAST1_kt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_lmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lmax; if (!buffer.str().empty()) @@ -763,7 +775,8 @@ bool get_GovGAST1_lmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_loadinc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->loadinc; if (!buffer.str().empty()) @@ -777,7 +790,8 @@ bool get_GovGAST1_loadinc(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovGAST1_ltrate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ltrate; if (!buffer.str().empty()) @@ -791,7 +805,8 @@ bool get_GovGAST1_ltrate(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovGAST1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -805,7 +820,8 @@ bool get_GovGAST1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovGAST1_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -819,7 +835,8 @@ bool get_GovGAST1_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -833,7 +850,8 @@ bool get_GovGAST1_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -847,7 +865,8 @@ bool get_GovGAST1_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -861,7 +880,8 @@ bool get_GovGAST1_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -875,7 +895,8 @@ bool get_GovGAST1_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv6; if (!buffer.str().empty()) @@ -889,7 +910,8 @@ bool get_GovGAST1_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -903,7 +925,8 @@ bool get_GovGAST1_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_rmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rmax; if (!buffer.str().empty()) @@ -917,7 +940,8 @@ bool get_GovGAST1_rmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -931,7 +955,8 @@ bool get_GovGAST1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -945,7 +970,8 @@ bool get_GovGAST1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -959,7 +985,8 @@ bool get_GovGAST1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -973,7 +1000,8 @@ bool get_GovGAST1_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -987,7 +1015,8 @@ bool get_GovGAST1_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_tltr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tltr; if (!buffer.str().empty()) @@ -1001,7 +1030,8 @@ bool get_GovGAST1_tltr(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmax; if (!buffer.str().empty()) @@ -1015,7 +1045,8 @@ bool get_GovGAST1_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmin; if (!buffer.str().empty()) @@ -1027,8 +1058,6 @@ bool get_GovGAST1_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char GovGAST1::debugName[] = "GovGAST1"; const char* GovGAST1::debugString() const { @@ -1037,45 +1066,45 @@ const char* GovGAST1::debugString() const void GovGAST1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovGAST1"), &GovGAST1_factory)); + factory_map.emplace("cim:GovGAST1", &GovGAST1_factory); } void GovGAST1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.a"), &assign_GovGAST1_a)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.b"), &assign_GovGAST1_b)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.db1"), &assign_GovGAST1_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.db2"), &assign_GovGAST1_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.eps"), &assign_GovGAST1_eps)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.fidle"), &assign_GovGAST1_fidle)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.gv1"), &assign_GovGAST1_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.gv2"), &assign_GovGAST1_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.gv3"), &assign_GovGAST1_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.gv4"), &assign_GovGAST1_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.gv5"), &assign_GovGAST1_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.gv6"), &assign_GovGAST1_gv6)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.ka"), &assign_GovGAST1_ka)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.kt"), &assign_GovGAST1_kt)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.lmax"), &assign_GovGAST1_lmax)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.loadinc"), &assign_GovGAST1_loadinc)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.ltrate"), &assign_GovGAST1_ltrate)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.mwbase"), &assign_GovGAST1_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.pgv1"), &assign_GovGAST1_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.pgv2"), &assign_GovGAST1_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.pgv3"), &assign_GovGAST1_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.pgv4"), &assign_GovGAST1_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.pgv5"), &assign_GovGAST1_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.pgv6"), &assign_GovGAST1_pgv6)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.r"), &assign_GovGAST1_r)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.rmax"), &assign_GovGAST1_rmax)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.t1"), &assign_GovGAST1_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.t2"), &assign_GovGAST1_t2)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.t3"), &assign_GovGAST1_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.t4"), &assign_GovGAST1_t4)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.t5"), &assign_GovGAST1_t5)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.tltr"), &assign_GovGAST1_tltr)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.vmax"), &assign_GovGAST1_vmax)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.vmin"), &assign_GovGAST1_vmin)); + assign_map.emplace("cim:GovGAST1.a", &assign_GovGAST1_a); + assign_map.emplace("cim:GovGAST1.b", &assign_GovGAST1_b); + assign_map.emplace("cim:GovGAST1.db1", &assign_GovGAST1_db1); + assign_map.emplace("cim:GovGAST1.db2", &assign_GovGAST1_db2); + assign_map.emplace("cim:GovGAST1.eps", &assign_GovGAST1_eps); + assign_map.emplace("cim:GovGAST1.fidle", &assign_GovGAST1_fidle); + assign_map.emplace("cim:GovGAST1.gv1", &assign_GovGAST1_gv1); + assign_map.emplace("cim:GovGAST1.gv2", &assign_GovGAST1_gv2); + assign_map.emplace("cim:GovGAST1.gv3", &assign_GovGAST1_gv3); + assign_map.emplace("cim:GovGAST1.gv4", &assign_GovGAST1_gv4); + assign_map.emplace("cim:GovGAST1.gv5", &assign_GovGAST1_gv5); + assign_map.emplace("cim:GovGAST1.gv6", &assign_GovGAST1_gv6); + assign_map.emplace("cim:GovGAST1.ka", &assign_GovGAST1_ka); + assign_map.emplace("cim:GovGAST1.kt", &assign_GovGAST1_kt); + assign_map.emplace("cim:GovGAST1.lmax", &assign_GovGAST1_lmax); + assign_map.emplace("cim:GovGAST1.loadinc", &assign_GovGAST1_loadinc); + assign_map.emplace("cim:GovGAST1.ltrate", &assign_GovGAST1_ltrate); + assign_map.emplace("cim:GovGAST1.mwbase", &assign_GovGAST1_mwbase); + assign_map.emplace("cim:GovGAST1.pgv1", &assign_GovGAST1_pgv1); + assign_map.emplace("cim:GovGAST1.pgv2", &assign_GovGAST1_pgv2); + assign_map.emplace("cim:GovGAST1.pgv3", &assign_GovGAST1_pgv3); + assign_map.emplace("cim:GovGAST1.pgv4", &assign_GovGAST1_pgv4); + assign_map.emplace("cim:GovGAST1.pgv5", &assign_GovGAST1_pgv5); + assign_map.emplace("cim:GovGAST1.pgv6", &assign_GovGAST1_pgv6); + assign_map.emplace("cim:GovGAST1.r", &assign_GovGAST1_r); + assign_map.emplace("cim:GovGAST1.rmax", &assign_GovGAST1_rmax); + assign_map.emplace("cim:GovGAST1.t1", &assign_GovGAST1_t1); + assign_map.emplace("cim:GovGAST1.t2", &assign_GovGAST1_t2); + assign_map.emplace("cim:GovGAST1.t3", &assign_GovGAST1_t3); + assign_map.emplace("cim:GovGAST1.t4", &assign_GovGAST1_t4); + assign_map.emplace("cim:GovGAST1.t5", &assign_GovGAST1_t5); + assign_map.emplace("cim:GovGAST1.tltr", &assign_GovGAST1_tltr); + assign_map.emplace("cim:GovGAST1.vmax", &assign_GovGAST1_vmax); + assign_map.emplace("cim:GovGAST1.vmin", &assign_GovGAST1_vmin); } void GovGAST1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/GovGAST1.hpp b/CGMES_2.4.15_16FEB2016/GovGAST1.hpp index 6a950664b..2eaf845e2 100644 --- a/CGMES_2.4.15_16FEB2016/GovGAST1.hpp +++ b/CGMES_2.4.15_16FEB2016/GovGAST1.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified single shaft gas turbine. - */ + /** \brief Modified single shaft gas turbine. */ class GovGAST1 : public TurbineGovernorDynamics { public: @@ -31,40 +29,107 @@ namespace CIMPP GovGAST1(); ~GovGAST1() override; - CIMPP::Simple_Float a; /* Turbine power time constant numerator scale factor (a). Typical Value = 0.8. Default: nullptr */ - CIMPP::Simple_Float b; /* Turbine power time constant denominator scale factor (b). Typical Value = 1. Default: nullptr */ - CIMPP::Frequency db1; /* Intentional dead-band width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower db2; /* Unintentional dead-band (db2). Unit = MW. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency eps; /* Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::PU fidle; /* Fuel flow at zero power output (Fidle). Typical Value = 0.18. Default: nullptr */ - CIMPP::PU gv1; /* Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain point 2,PU gv (Gv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv6; /* Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU ka; /* Governor gain (Ka). Typical Value = 0. Default: nullptr */ - CIMPP::PU kt; /* Temperature limiter gain (Kt). Typical Value = 3. Default: nullptr */ - CIMPP::PU lmax; /* Ambient temperature load limit (Lmax). Lmax is the turbine power output corresponding to the limiting exhaust gas temperature. Typical Value = 1. Default: nullptr */ - CIMPP::PU loadinc; /* Valve position change allowed at fast rate (Loadinc). Typical Value = 0.05. Default: nullptr */ - CIMPP::Simple_Float ltrate; /* Maximum long term fuel valve opening rate (Ltrate). Typical Value = 0.02. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv6; /* Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU r; /* Permanent droop (R). Typical Value = 0.04. Default: nullptr */ - CIMPP::Simple_Float rmax; /* Maximum fuel valve opening rate (Rmax). Unit = PU/sec. Typical Value = 1. Default: nullptr */ - CIMPP::Seconds t1; /* Governor mechanism time constant (T1). T1 represents the natural valve positioning time constant of the governor for small disturbances, as seen when rate limiting is not in effect. Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds t2; /* Turbine power time constant (T2). T2 represents delay due to internal energy storage of the gas turbine engine. T2 can be used to give a rough approximation to the delay associated with acceleration of the compressor spool of a multi-shaft engine, or with the compressibility of gas in the plenum of the free power turbine of an aero-derivative unit, for example. Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds t3; /* Turbine exhaust temperature time constant (T3). T3 represents delay in the exhaust temperature and load limiting system. Typical Value = 3. Default: nullptr */ - CIMPP::Seconds t4; /* Governor lead time constant (T4). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t5; /* Governor lag time constant (T5). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tltr; /* Valve position averaging time constant (Tltr). Typical Value = 10. Default: nullptr */ - CIMPP::PU vmax; /* Maximum turbine power, PU of MWbase (Vmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU vmin; /* Minimum turbine power, PU of MWbase (Vmin). Typical Value = 0. Default: nullptr */ + /** \brief Turbine power time constant numerator scale factor (a). Typical Value = 0.8. Default: nullptr */ + CIMPP::Simple_Float a; + + /** \brief Turbine power time constant denominator scale factor (b). Typical Value = 1. Default: nullptr */ + CIMPP::Simple_Float b; + + /** \brief Intentional dead-band width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Unintentional dead-band (db2). Unit = MW. Typical Value = 0. Default: nullptr */ + CIMPP::ActivePower db2; + + /** \brief Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency eps; + + /** \brief Fuel flow at zero power output (Fidle). Typical Value = 0.18. Default: nullptr */ + CIMPP::PU fidle; + + /** \brief Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain point 2,PU gv (Gv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv6; + + /** \brief Governor gain (Ka). Typical Value = 0. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Temperature limiter gain (Kt). Typical Value = 3. Default: nullptr */ + CIMPP::PU kt; + + /** \brief Ambient temperature load limit (Lmax). Lmax is the turbine power output corresponding to the limiting exhaust gas temperature. Typical Value = 1. Default: nullptr */ + CIMPP::PU lmax; + + /** \brief Valve position change allowed at fast rate (Loadinc). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU loadinc; + + /** \brief Maximum long term fuel valve opening rate (Ltrate). Typical Value = 0.02. Default: nullptr */ + CIMPP::Simple_Float ltrate; + + /** \brief Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv6; + + /** \brief Permanent droop (R). Typical Value = 0.04. Default: nullptr */ + CIMPP::PU r; + + /** \brief Maximum fuel valve opening rate (Rmax). Unit = PU/sec. Typical Value = 1. Default: nullptr */ + CIMPP::Simple_Float rmax; + + /** \brief Governor mechanism time constant (T1). T1 represents the natural valve positioning time constant of the governor for small disturbances, as seen when rate limiting is not in effect. Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Turbine power time constant (T2). T2 represents delay due to internal energy storage of the gas turbine engine. T2 can be used to give a rough approximation to the delay associated with acceleration of the compressor spool of a multi-shaft engine, or with the compressibility of gas in the plenum of the free power turbine of an aero-derivative unit, for example. Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Turbine exhaust temperature time constant (T3). T3 represents delay in the exhaust temperature and load limiting system. Typical Value = 3. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Governor lead time constant (T4). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Governor lag time constant (T5). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Valve position averaging time constant (Tltr). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds tltr; + + /** \brief Maximum turbine power, PU of MWbase (Vmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU vmax; + + /** \brief Minimum turbine power, PU of MWbase (Vmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU vmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GovGAST2.cpp b/CGMES_2.4.15_16FEB2016/GovGAST2.cpp index fae415955..c78ffe45c 100644 --- a/CGMES_2.4.15_16FEB2016/GovGAST2.cpp +++ b/CGMES_2.4.15_16FEB2016/GovGAST2.cpp @@ -8,43 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Temperature.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Temperature.hpp" -#include "ActivePower.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" using namespace CIMPP; -GovGAST2::GovGAST2() {}; -GovGAST2::~GovGAST2() {}; +GovGAST2::GovGAST2() {} +GovGAST2::~GovGAST2() {} static const std::list PossibleProfilesForClass = { @@ -102,428 +70,458 @@ GovGAST2::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovGAST2_a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_a(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_af1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_af1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->af1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_af2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_af2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->af2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_b(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_bf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_bf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_bf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_bf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_c(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_c(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->c; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_cf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_cf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->cf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_ecr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_ecr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ecr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_etd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_etd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->etd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_k4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_k5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_k5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_k6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_k6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_t(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_t(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_tcd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_tcd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tcd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_tmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_tmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_tmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_tmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_trate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_trate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->trate; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_tt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_w(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_w(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->w; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_x(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_y(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_y(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->y; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_z(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_z(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->z; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovGAST2_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a; if (!buffer.str().empty()) @@ -537,7 +535,8 @@ bool get_GovGAST2_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_af1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->af1; if (!buffer.str().empty()) @@ -551,7 +550,8 @@ bool get_GovGAST2_af1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST2_af2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->af2; if (!buffer.str().empty()) @@ -565,7 +565,8 @@ bool get_GovGAST2_af2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST2_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b; if (!buffer.str().empty()) @@ -579,7 +580,8 @@ bool get_GovGAST2_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_bf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bf1; if (!buffer.str().empty()) @@ -593,7 +595,8 @@ bool get_GovGAST2_bf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST2_bf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bf2; if (!buffer.str().empty()) @@ -607,7 +610,8 @@ bool get_GovGAST2_bf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST2_c(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->c; if (!buffer.str().empty()) @@ -621,7 +625,8 @@ bool get_GovGAST2_c(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_cf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->cf2; if (!buffer.str().empty()) @@ -635,7 +640,8 @@ bool get_GovGAST2_cf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST2_ecr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ecr; if (!buffer.str().empty()) @@ -649,7 +655,8 @@ bool get_GovGAST2_ecr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST2_etd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->etd; if (!buffer.str().empty()) @@ -663,7 +670,8 @@ bool get_GovGAST2_etd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST2_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -677,7 +685,8 @@ bool get_GovGAST2_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k4; if (!buffer.str().empty()) @@ -691,7 +700,8 @@ bool get_GovGAST2_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k5; if (!buffer.str().empty()) @@ -705,7 +715,8 @@ bool get_GovGAST2_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_k6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k6; if (!buffer.str().empty()) @@ -719,7 +730,8 @@ bool get_GovGAST2_k6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -733,7 +745,8 @@ bool get_GovGAST2_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -747,7 +760,8 @@ bool get_GovGAST2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovGAST2_t(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t; if (!buffer.str().empty()) @@ -761,7 +775,8 @@ bool get_GovGAST2_t(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -775,7 +790,8 @@ bool get_GovGAST2_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -789,7 +805,8 @@ bool get_GovGAST2_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -803,7 +820,8 @@ bool get_GovGAST2_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -817,7 +835,8 @@ bool get_GovGAST2_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_tcd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tcd; if (!buffer.str().empty()) @@ -831,7 +850,8 @@ bool get_GovGAST2_tcd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST2_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -845,7 +865,8 @@ bool get_GovGAST2_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_tmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tmax; if (!buffer.str().empty()) @@ -859,7 +880,8 @@ bool get_GovGAST2_tmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST2_tmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tmin; if (!buffer.str().empty()) @@ -873,7 +895,8 @@ bool get_GovGAST2_tmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST2_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -887,7 +910,8 @@ bool get_GovGAST2_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_trate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->trate; if (!buffer.str().empty()) @@ -901,7 +925,8 @@ bool get_GovGAST2_trate(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovGAST2_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tt; if (!buffer.str().empty()) @@ -915,7 +940,8 @@ bool get_GovGAST2_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_w(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->w; if (!buffer.str().empty()) @@ -929,7 +955,8 @@ bool get_GovGAST2_w(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x; if (!buffer.str().empty()) @@ -943,7 +970,8 @@ bool get_GovGAST2_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_y(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->y; if (!buffer.str().empty()) @@ -957,7 +985,8 @@ bool get_GovGAST2_y(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_z(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->z; if (!buffer.str().empty()) @@ -969,8 +998,6 @@ bool get_GovGAST2_z(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char GovGAST2::debugName[] = "GovGAST2"; const char* GovGAST2::debugString() const { @@ -979,43 +1006,43 @@ const char* GovGAST2::debugString() const void GovGAST2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovGAST2"), &GovGAST2_factory)); + factory_map.emplace("cim:GovGAST2", &GovGAST2_factory); } void GovGAST2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.a"), &assign_GovGAST2_a)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.af1"), &assign_GovGAST2_af1)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.af2"), &assign_GovGAST2_af2)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.b"), &assign_GovGAST2_b)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.bf1"), &assign_GovGAST2_bf1)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.bf2"), &assign_GovGAST2_bf2)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.c"), &assign_GovGAST2_c)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.cf2"), &assign_GovGAST2_cf2)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.ecr"), &assign_GovGAST2_ecr)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.etd"), &assign_GovGAST2_etd)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.k3"), &assign_GovGAST2_k3)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.k4"), &assign_GovGAST2_k4)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.k5"), &assign_GovGAST2_k5)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.k6"), &assign_GovGAST2_k6)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.kf"), &assign_GovGAST2_kf)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.mwbase"), &assign_GovGAST2_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.t"), &assign_GovGAST2_t)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.t3"), &assign_GovGAST2_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.t4"), &assign_GovGAST2_t4)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.t5"), &assign_GovGAST2_t5)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.tc"), &assign_GovGAST2_tc)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.tcd"), &assign_GovGAST2_tcd)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.tf"), &assign_GovGAST2_tf)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.tmax"), &assign_GovGAST2_tmax)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.tmin"), &assign_GovGAST2_tmin)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.tr"), &assign_GovGAST2_tr)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.trate"), &assign_GovGAST2_trate)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.tt"), &assign_GovGAST2_tt)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.w"), &assign_GovGAST2_w)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.x"), &assign_GovGAST2_x)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.y"), &assign_GovGAST2_y)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.z"), &assign_GovGAST2_z)); + assign_map.emplace("cim:GovGAST2.a", &assign_GovGAST2_a); + assign_map.emplace("cim:GovGAST2.af1", &assign_GovGAST2_af1); + assign_map.emplace("cim:GovGAST2.af2", &assign_GovGAST2_af2); + assign_map.emplace("cim:GovGAST2.b", &assign_GovGAST2_b); + assign_map.emplace("cim:GovGAST2.bf1", &assign_GovGAST2_bf1); + assign_map.emplace("cim:GovGAST2.bf2", &assign_GovGAST2_bf2); + assign_map.emplace("cim:GovGAST2.c", &assign_GovGAST2_c); + assign_map.emplace("cim:GovGAST2.cf2", &assign_GovGAST2_cf2); + assign_map.emplace("cim:GovGAST2.ecr", &assign_GovGAST2_ecr); + assign_map.emplace("cim:GovGAST2.etd", &assign_GovGAST2_etd); + assign_map.emplace("cim:GovGAST2.k3", &assign_GovGAST2_k3); + assign_map.emplace("cim:GovGAST2.k4", &assign_GovGAST2_k4); + assign_map.emplace("cim:GovGAST2.k5", &assign_GovGAST2_k5); + assign_map.emplace("cim:GovGAST2.k6", &assign_GovGAST2_k6); + assign_map.emplace("cim:GovGAST2.kf", &assign_GovGAST2_kf); + assign_map.emplace("cim:GovGAST2.mwbase", &assign_GovGAST2_mwbase); + assign_map.emplace("cim:GovGAST2.t", &assign_GovGAST2_t); + assign_map.emplace("cim:GovGAST2.t3", &assign_GovGAST2_t3); + assign_map.emplace("cim:GovGAST2.t4", &assign_GovGAST2_t4); + assign_map.emplace("cim:GovGAST2.t5", &assign_GovGAST2_t5); + assign_map.emplace("cim:GovGAST2.tc", &assign_GovGAST2_tc); + assign_map.emplace("cim:GovGAST2.tcd", &assign_GovGAST2_tcd); + assign_map.emplace("cim:GovGAST2.tf", &assign_GovGAST2_tf); + assign_map.emplace("cim:GovGAST2.tmax", &assign_GovGAST2_tmax); + assign_map.emplace("cim:GovGAST2.tmin", &assign_GovGAST2_tmin); + assign_map.emplace("cim:GovGAST2.tr", &assign_GovGAST2_tr); + assign_map.emplace("cim:GovGAST2.trate", &assign_GovGAST2_trate); + assign_map.emplace("cim:GovGAST2.tt", &assign_GovGAST2_tt); + assign_map.emplace("cim:GovGAST2.w", &assign_GovGAST2_w); + assign_map.emplace("cim:GovGAST2.x", &assign_GovGAST2_x); + assign_map.emplace("cim:GovGAST2.y", &assign_GovGAST2_y); + assign_map.emplace("cim:GovGAST2.z", &assign_GovGAST2_z); } void GovGAST2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/GovGAST2.hpp b/CGMES_2.4.15_16FEB2016/GovGAST2.hpp index d761848e3..37de9cf50 100644 --- a/CGMES_2.4.15_16FEB2016/GovGAST2.hpp +++ b/CGMES_2.4.15_16FEB2016/GovGAST2.hpp @@ -22,9 +22,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Gas turbine model. - */ + /** \brief Gas turbine model. */ class GovGAST2 : public TurbineGovernorDynamics { public: @@ -32,38 +30,101 @@ namespace CIMPP GovGAST2(); ~GovGAST2() override; - CIMPP::Simple_Float a; /* Valve positioner (A). Default: nullptr */ - CIMPP::PU af1; /* Exhaust temperature Parameter (Af1). Unit = per unit temperature. Based on temperature in degrees C. Default: nullptr */ - CIMPP::PU af2; /* Coefficient equal to 0.5(1-speed) (Af2). Default: nullptr */ - CIMPP::Simple_Float b; /* Valve positioner (B). Default: nullptr */ - CIMPP::PU bf1; /* (Bf1). Bf1 = E(1-w) where E (speed sensitivity coefficient) is 0.55 to 0.65 x Tr. Unit = per unit temperature. Based on temperature in degrees C. Default: nullptr */ - CIMPP::PU bf2; /* Turbine Torque Coefficient K (depends on heating value of fuel stream in combustion chamber) (Bf2). Default: nullptr */ - CIMPP::Simple_Float c; /* Valve positioner (C). Default: nullptr */ - CIMPP::PU cf2; /* Coefficient defining fuel flow where power output is 0% (Cf2). Synchronous but no output. Typically 0.23 x K (23% fuel flow). Default: nullptr */ - CIMPP::Seconds ecr; /* Combustion reaction time delay (Ecr). Default: nullptr */ - CIMPP::Seconds etd; /* Turbine and exhaust delay (Etd). Default: nullptr */ - CIMPP::PU k3; /* Ratio of Fuel Adjustment (K3). Default: nullptr */ - CIMPP::PU k4; /* Gain of radiation shield (K4). Default: nullptr */ - CIMPP::PU k5; /* Gain of radiation shield (K5). Default: nullptr */ - CIMPP::PU k6; /* Minimum fuel flow (K6). Default: nullptr */ - CIMPP::PU kf; /* Fuel system feedback (Kf). Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ - CIMPP::Seconds t; /* Fuel Control Time Constant (T). Default: nullptr */ - CIMPP::Seconds t3; /* Radiation shield time constant (T3). Default: nullptr */ - CIMPP::Seconds t4; /* Thermocouple time constant (T4). Default: nullptr */ - CIMPP::Seconds t5; /* Temperature control time constant (T5). Default: nullptr */ - CIMPP::Temperature tc; /* Temperature control (Tc). Unit = [SYMBOL REMOVED]F or [SYMBOL REMOVED]C depending on constants Af1 and Bf1. Default: nullptr */ - CIMPP::Seconds tcd; /* Compressor discharge time constant (Tcd). Default: nullptr */ - CIMPP::Seconds tf; /* Fuel system time constant (Tf). Default: nullptr */ - CIMPP::PU tmax; /* Maximum Turbine limit (Tmax). Default: nullptr */ - CIMPP::PU tmin; /* Minimum Turbine limit (Tmin). Default: nullptr */ - CIMPP::Temperature tr; /* Rated temperature (Tr). Unit = [SYMBOL REMOVED]C depending on parameters Af1 and Bf1. Default: nullptr */ - CIMPP::ActivePower trate; /* Turbine rating (Trate). Unit = MW. Default: nullptr */ - CIMPP::Seconds tt; /* Temperature controller integration rate (Tt). Default: nullptr */ - CIMPP::PU w; /* Governor gain (1/droop) on turbine rating (W). Default: nullptr */ - CIMPP::Seconds x; /* Governor lead time constant (X). Default: nullptr */ - CIMPP::Seconds y; /* Governor lag time constant (Y) (>0). Default: nullptr */ - CIMPP::Boolean z; /* Governor mode (Z). true = Droop false = ISO. Default: false */ + /** \brief Valve positioner (A). Default: nullptr */ + CIMPP::Simple_Float a; + + /** \brief Exhaust temperature Parameter (Af1). Unit = per unit temperature. Based on temperature in degrees C. Default: nullptr */ + CIMPP::PU af1; + + /** \brief Coefficient equal to 0.5(1-speed) (Af2). Default: nullptr */ + CIMPP::PU af2; + + /** \brief Valve positioner (B). Default: nullptr */ + CIMPP::Simple_Float b; + + /** \brief (Bf1). Bf1 = E(1-w) where E (speed sensitivity coefficient) is 0.55 to 0.65 x Tr. Unit = per unit temperature. Based on temperature in degrees C. Default: nullptr */ + CIMPP::PU bf1; + + /** \brief Turbine Torque Coefficient K (depends on heating value of fuel stream in combustion chamber) (Bf2). Default: nullptr */ + CIMPP::PU bf2; + + /** \brief Valve positioner (C). Default: nullptr */ + CIMPP::Simple_Float c; + + /** \brief Coefficient defining fuel flow where power output is 0% (Cf2). Synchronous but no output. Typically 0.23 x K (23% fuel flow). Default: nullptr */ + CIMPP::PU cf2; + + /** \brief Combustion reaction time delay (Ecr). Default: nullptr */ + CIMPP::Seconds ecr; + + /** \brief Turbine and exhaust delay (Etd). Default: nullptr */ + CIMPP::Seconds etd; + + /** \brief Ratio of Fuel Adjustment (K3). Default: nullptr */ + CIMPP::PU k3; + + /** \brief Gain of radiation shield (K4). Default: nullptr */ + CIMPP::PU k4; + + /** \brief Gain of radiation shield (K5). Default: nullptr */ + CIMPP::PU k5; + + /** \brief Minimum fuel flow (K6). Default: nullptr */ + CIMPP::PU k6; + + /** \brief Fuel system feedback (Kf). Default: nullptr */ + CIMPP::PU kf; + + /** \brief Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Fuel Control Time Constant (T). Default: nullptr */ + CIMPP::Seconds t; + + /** \brief Radiation shield time constant (T3). Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Thermocouple time constant (T4). Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Temperature control time constant (T5). Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Temperature control (Tc). Unit = [SYMBOL REMOVED]F or [SYMBOL REMOVED]C depending on constants Af1 and Bf1. Default: nullptr */ + CIMPP::Temperature tc; + + /** \brief Compressor discharge time constant (Tcd). Default: nullptr */ + CIMPP::Seconds tcd; + + /** \brief Fuel system time constant (Tf). Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum Turbine limit (Tmax). Default: nullptr */ + CIMPP::PU tmax; + + /** \brief Minimum Turbine limit (Tmin). Default: nullptr */ + CIMPP::PU tmin; + + /** \brief Rated temperature (Tr). Unit = [SYMBOL REMOVED]C depending on parameters Af1 and Bf1. Default: nullptr */ + CIMPP::Temperature tr; + + /** \brief Turbine rating (Trate). Unit = MW. Default: nullptr */ + CIMPP::ActivePower trate; + + /** \brief Temperature controller integration rate (Tt). Default: nullptr */ + CIMPP::Seconds tt; + + /** \brief Governor gain (1/droop) on turbine rating (W). Default: nullptr */ + CIMPP::PU w; + + /** \brief Governor lead time constant (X). Default: nullptr */ + CIMPP::Seconds x; + + /** \brief Governor lag time constant (Y) (>0). Default: nullptr */ + CIMPP::Seconds y; + + /** \brief Governor mode (Z). true = Droop false = ISO. Default: false */ + CIMPP::Boolean z; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GovGAST3.cpp b/CGMES_2.4.15_16FEB2016/GovGAST3.cpp index 31493116e..d80998b75 100644 --- a/CGMES_2.4.15_16FEB2016/GovGAST3.cpp +++ b/CGMES_2.4.15_16FEB2016/GovGAST3.cpp @@ -8,32 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Temperature.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Temperature.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Temperature.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -GovGAST3::GovGAST3() {}; -GovGAST3::~GovGAST3() {}; +GovGAST3::GovGAST3() {} +GovGAST3::~GovGAST3() {} static const std::list PossibleProfilesForClass = { @@ -80,285 +59,304 @@ GovGAST3::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovGAST3_bca(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_bca(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bca; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_bp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_bp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_dtc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_dtc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dtc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_kac(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_kac(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kac; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_kca(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_kca(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kca; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_ksi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_ksi(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ksi; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_ky(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_ky(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ky; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_mnef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_mnef(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mnef; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_mxef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_mxef(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mxef; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_rcmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_rcmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rcmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_rcmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_rcmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rcmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_tac(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_tac(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tac; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_tfen(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_tfen(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tfen; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_tsi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_tsi(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tsi; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_tt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_ttc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_ttc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ttc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_ty(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_ty(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ty; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovGAST3_bca(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bca; if (!buffer.str().empty()) @@ -372,7 +370,8 @@ bool get_GovGAST3_bca(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST3_bp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bp; if (!buffer.str().empty()) @@ -386,7 +385,8 @@ bool get_GovGAST3_bp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST3_dtc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dtc; if (!buffer.str().empty()) @@ -400,7 +400,8 @@ bool get_GovGAST3_dtc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST3_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -414,7 +415,8 @@ bool get_GovGAST3_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST3_kac(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kac; if (!buffer.str().empty()) @@ -428,7 +430,8 @@ bool get_GovGAST3_kac(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST3_kca(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kca; if (!buffer.str().empty()) @@ -442,7 +445,8 @@ bool get_GovGAST3_kca(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST3_ksi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ksi; if (!buffer.str().empty()) @@ -456,7 +460,8 @@ bool get_GovGAST3_ksi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST3_ky(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ky; if (!buffer.str().empty()) @@ -470,7 +475,8 @@ bool get_GovGAST3_ky(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST3_mnef(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mnef; if (!buffer.str().empty()) @@ -484,7 +490,8 @@ bool get_GovGAST3_mnef(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST3_mxef(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mxef; if (!buffer.str().empty()) @@ -498,7 +505,8 @@ bool get_GovGAST3_mxef(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST3_rcmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rcmn; if (!buffer.str().empty()) @@ -512,7 +520,8 @@ bool get_GovGAST3_rcmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST3_rcmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rcmx; if (!buffer.str().empty()) @@ -526,7 +535,8 @@ bool get_GovGAST3_rcmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST3_tac(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tac; if (!buffer.str().empty()) @@ -540,7 +550,8 @@ bool get_GovGAST3_tac(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST3_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -554,7 +565,8 @@ bool get_GovGAST3_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST3_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -568,7 +580,8 @@ bool get_GovGAST3_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST3_tfen(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tfen; if (!buffer.str().empty()) @@ -582,7 +595,8 @@ bool get_GovGAST3_tfen(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST3_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -596,7 +610,8 @@ bool get_GovGAST3_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST3_tsi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tsi; if (!buffer.str().empty()) @@ -610,7 +625,8 @@ bool get_GovGAST3_tsi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST3_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tt; if (!buffer.str().empty()) @@ -624,7 +640,8 @@ bool get_GovGAST3_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST3_ttc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ttc; if (!buffer.str().empty()) @@ -638,7 +655,8 @@ bool get_GovGAST3_ttc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST3_ty(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ty; if (!buffer.str().empty()) @@ -650,8 +668,6 @@ bool get_GovGAST3_ty(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char GovGAST3::debugName[] = "GovGAST3"; const char* GovGAST3::debugString() const { @@ -660,32 +676,32 @@ const char* GovGAST3::debugString() const void GovGAST3::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovGAST3"), &GovGAST3_factory)); + factory_map.emplace("cim:GovGAST3", &GovGAST3_factory); } void GovGAST3::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.bca"), &assign_GovGAST3_bca)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.bp"), &assign_GovGAST3_bp)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.dtc"), &assign_GovGAST3_dtc)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.ka"), &assign_GovGAST3_ka)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.kac"), &assign_GovGAST3_kac)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.kca"), &assign_GovGAST3_kca)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.ksi"), &assign_GovGAST3_ksi)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.ky"), &assign_GovGAST3_ky)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.mnef"), &assign_GovGAST3_mnef)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.mxef"), &assign_GovGAST3_mxef)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.rcmn"), &assign_GovGAST3_rcmn)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.rcmx"), &assign_GovGAST3_rcmx)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.tac"), &assign_GovGAST3_tac)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.tc"), &assign_GovGAST3_tc)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.td"), &assign_GovGAST3_td)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.tfen"), &assign_GovGAST3_tfen)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.tg"), &assign_GovGAST3_tg)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.tsi"), &assign_GovGAST3_tsi)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.tt"), &assign_GovGAST3_tt)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.ttc"), &assign_GovGAST3_ttc)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.ty"), &assign_GovGAST3_ty)); + assign_map.emplace("cim:GovGAST3.bca", &assign_GovGAST3_bca); + assign_map.emplace("cim:GovGAST3.bp", &assign_GovGAST3_bp); + assign_map.emplace("cim:GovGAST3.dtc", &assign_GovGAST3_dtc); + assign_map.emplace("cim:GovGAST3.ka", &assign_GovGAST3_ka); + assign_map.emplace("cim:GovGAST3.kac", &assign_GovGAST3_kac); + assign_map.emplace("cim:GovGAST3.kca", &assign_GovGAST3_kca); + assign_map.emplace("cim:GovGAST3.ksi", &assign_GovGAST3_ksi); + assign_map.emplace("cim:GovGAST3.ky", &assign_GovGAST3_ky); + assign_map.emplace("cim:GovGAST3.mnef", &assign_GovGAST3_mnef); + assign_map.emplace("cim:GovGAST3.mxef", &assign_GovGAST3_mxef); + assign_map.emplace("cim:GovGAST3.rcmn", &assign_GovGAST3_rcmn); + assign_map.emplace("cim:GovGAST3.rcmx", &assign_GovGAST3_rcmx); + assign_map.emplace("cim:GovGAST3.tac", &assign_GovGAST3_tac); + assign_map.emplace("cim:GovGAST3.tc", &assign_GovGAST3_tc); + assign_map.emplace("cim:GovGAST3.td", &assign_GovGAST3_td); + assign_map.emplace("cim:GovGAST3.tfen", &assign_GovGAST3_tfen); + assign_map.emplace("cim:GovGAST3.tg", &assign_GovGAST3_tg); + assign_map.emplace("cim:GovGAST3.tsi", &assign_GovGAST3_tsi); + assign_map.emplace("cim:GovGAST3.tt", &assign_GovGAST3_tt); + assign_map.emplace("cim:GovGAST3.ttc", &assign_GovGAST3_ttc); + assign_map.emplace("cim:GovGAST3.ty", &assign_GovGAST3_ty); } void GovGAST3::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/GovGAST3.hpp b/CGMES_2.4.15_16FEB2016/GovGAST3.hpp index d943e9b85..8d460f127 100644 --- a/CGMES_2.4.15_16FEB2016/GovGAST3.hpp +++ b/CGMES_2.4.15_16FEB2016/GovGAST3.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Generic turbogas with acceleration and temperature controller. - */ + /** \brief Generic turbogas with acceleration and temperature controller. */ class GovGAST3 : public TurbineGovernorDynamics { public: @@ -30,27 +28,68 @@ namespace CIMPP GovGAST3(); ~GovGAST3() override; - CIMPP::Simple_Float bca; /* Acceleration limit set-point (Bca). Unit = 1/s. Typical Value = 0.01. Default: nullptr */ - CIMPP::PU bp; /* Droop (bp). Typical Value = 0.05. Default: nullptr */ - CIMPP::Temperature dtc; /* Exhaust temperature variation due to fuel flow increasing from 0 to 1 PU (deltaTc). Typical Value = 390. Default: nullptr */ - CIMPP::PU ka; /* Minimum fuel flow (Ka). Typical Value = 0.23. Default: nullptr */ - CIMPP::Simple_Float kac; /* Fuel system feedback (K). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float kca; /* Acceleration control integral gain (Kca). Unit = 1/s. Typical Value = 100. Default: nullptr */ - CIMPP::Simple_Float ksi; /* Gain of radiation shield (Ksi). Typical Value = 0.8. Default: nullptr */ - CIMPP::Simple_Float ky; /* Coefficient of transfer function of fuel valve positioner (Ky). Typical Value = 1. Default: nullptr */ - CIMPP::PU mnef; /* Fuel flow maximum negative error value (MN). Typical Value = -0.05. Default: nullptr */ - CIMPP::PU mxef; /* Fuel flow maximum positive error value (MX). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU rcmn; /* Minimum fuel flow (RCMN). Typical Value = -0.1. Default: nullptr */ - CIMPP::PU rcmx; /* Maximum fuel flow (RCMX). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tac; /* Fuel control time constant (Tac). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tc; /* Compressor discharge volume time constant (Tc). Typical Value = 0.2. Default: nullptr */ - CIMPP::Seconds td; /* Temperature controller derivative gain (Td). Typical Value = 3.3. Default: nullptr */ - CIMPP::Temperature tfen; /* Turbine rated exhaust temperature correspondent to Pm=1 PU (Tfen). Typical Value = 540. Default: nullptr */ - CIMPP::Seconds tg; /* Time constant of speed governor (Tg). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds tsi; /* Time constant of radiation shield (Tsi). Typical Value = 15. Default: nullptr */ - CIMPP::Temperature tt; /* Temperature controller integration rate (Tt). Typical Value = 250. Default: nullptr */ - CIMPP::Seconds ttc; /* Time constant of thermocouple (Ttc). Typical Value = 2.5. Default: nullptr */ - CIMPP::Seconds ty; /* Time constant of fuel valve positioner (Ty). Typical Value = 0.2. Default: nullptr */ + /** \brief Acceleration limit set-point (Bca). Unit = 1/s. Typical Value = 0.01. Default: nullptr */ + CIMPP::Simple_Float bca; + + /** \brief Droop (bp). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU bp; + + /** \brief Exhaust temperature variation due to fuel flow increasing from 0 to 1 PU (deltaTc). Typical Value = 390. Default: nullptr */ + CIMPP::Temperature dtc; + + /** \brief Minimum fuel flow (Ka). Typical Value = 0.23. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Fuel system feedback (K). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float kac; + + /** \brief Acceleration control integral gain (Kca). Unit = 1/s. Typical Value = 100. Default: nullptr */ + CIMPP::Simple_Float kca; + + /** \brief Gain of radiation shield (Ksi). Typical Value = 0.8. Default: nullptr */ + CIMPP::Simple_Float ksi; + + /** \brief Coefficient of transfer function of fuel valve positioner (Ky). Typical Value = 1. Default: nullptr */ + CIMPP::Simple_Float ky; + + /** \brief Fuel flow maximum negative error value (MN). Typical Value = -0.05. Default: nullptr */ + CIMPP::PU mnef; + + /** \brief Fuel flow maximum positive error value (MX). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU mxef; + + /** \brief Minimum fuel flow (RCMN). Typical Value = -0.1. Default: nullptr */ + CIMPP::PU rcmn; + + /** \brief Maximum fuel flow (RCMX). Typical Value = 1. Default: nullptr */ + CIMPP::PU rcmx; + + /** \brief Fuel control time constant (Tac). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tac; + + /** \brief Compressor discharge volume time constant (Tc). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Temperature controller derivative gain (Td). Typical Value = 3.3. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Turbine rated exhaust temperature correspondent to Pm=1 PU (Tfen). Typical Value = 540. Default: nullptr */ + CIMPP::Temperature tfen; + + /** \brief Time constant of speed governor (Tg). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Time constant of radiation shield (Tsi). Typical Value = 15. Default: nullptr */ + CIMPP::Seconds tsi; + + /** \brief Temperature controller integration rate (Tt). Typical Value = 250. Default: nullptr */ + CIMPP::Temperature tt; + + /** \brief Time constant of thermocouple (Ttc). Typical Value = 2.5. Default: nullptr */ + CIMPP::Seconds ttc; + + /** \brief Time constant of fuel valve positioner (Ty). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds ty; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GovGAST4.cpp b/CGMES_2.4.15_16FEB2016/GovGAST4.cpp index 5036fcf63..43052f31f 100644 --- a/CGMES_2.4.15_16FEB2016/GovGAST4.cpp +++ b/CGMES_2.4.15_16FEB2016/GovGAST4.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -GovGAST4::GovGAST4() {}; -GovGAST4::~GovGAST4() {}; +GovGAST4::GovGAST4() {} +GovGAST4::~GovGAST4() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ GovGAST4::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovGAST4_bp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_bp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_ktm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_ktm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ktm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_mnef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_mnef(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mnef; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_mxef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_mxef(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mxef; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_rymn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_rymn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rymn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_rymx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_rymx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rymx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_tcm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_tcm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tcm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_tm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_tm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_tv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_tv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovGAST4_bp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bp; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_GovGAST4_bp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST4_ktm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ktm; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_GovGAST4_ktm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST4_mnef(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mnef; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_GovGAST4_mnef(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST4_mxef(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mxef; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_GovGAST4_mxef(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST4_rymn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rymn; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_GovGAST4_rymn(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST4_rymx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rymx; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_GovGAST4_rymx(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST4_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_GovGAST4_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST4_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_GovGAST4_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST4_tcm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tcm; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_GovGAST4_tcm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST4_tm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tm; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_GovGAST4_tm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST4_tv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tv; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_GovGAST4_tv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char GovGAST4::debugName[] = "GovGAST4"; const char* GovGAST4::debugString() const { @@ -370,22 +376,22 @@ const char* GovGAST4::debugString() const void GovGAST4::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovGAST4"), &GovGAST4_factory)); + factory_map.emplace("cim:GovGAST4", &GovGAST4_factory); } void GovGAST4::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.bp"), &assign_GovGAST4_bp)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.ktm"), &assign_GovGAST4_ktm)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.mnef"), &assign_GovGAST4_mnef)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.mxef"), &assign_GovGAST4_mxef)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.rymn"), &assign_GovGAST4_rymn)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.rymx"), &assign_GovGAST4_rymx)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.ta"), &assign_GovGAST4_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.tc"), &assign_GovGAST4_tc)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.tcm"), &assign_GovGAST4_tcm)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.tm"), &assign_GovGAST4_tm)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.tv"), &assign_GovGAST4_tv)); + assign_map.emplace("cim:GovGAST4.bp", &assign_GovGAST4_bp); + assign_map.emplace("cim:GovGAST4.ktm", &assign_GovGAST4_ktm); + assign_map.emplace("cim:GovGAST4.mnef", &assign_GovGAST4_mnef); + assign_map.emplace("cim:GovGAST4.mxef", &assign_GovGAST4_mxef); + assign_map.emplace("cim:GovGAST4.rymn", &assign_GovGAST4_rymn); + assign_map.emplace("cim:GovGAST4.rymx", &assign_GovGAST4_rymx); + assign_map.emplace("cim:GovGAST4.ta", &assign_GovGAST4_ta); + assign_map.emplace("cim:GovGAST4.tc", &assign_GovGAST4_tc); + assign_map.emplace("cim:GovGAST4.tcm", &assign_GovGAST4_tcm); + assign_map.emplace("cim:GovGAST4.tm", &assign_GovGAST4_tm); + assign_map.emplace("cim:GovGAST4.tv", &assign_GovGAST4_tv); } void GovGAST4::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/GovGAST4.hpp b/CGMES_2.4.15_16FEB2016/GovGAST4.hpp index 901976bdd..aa017e229 100644 --- a/CGMES_2.4.15_16FEB2016/GovGAST4.hpp +++ b/CGMES_2.4.15_16FEB2016/GovGAST4.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Generic turbogas. - */ + /** \brief Generic turbogas. */ class GovGAST4 : public TurbineGovernorDynamics { public: @@ -28,17 +26,38 @@ namespace CIMPP GovGAST4(); ~GovGAST4() override; - CIMPP::PU bp; /* Droop (bp). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU ktm; /* Compressor gain (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU mnef; /* Fuel flow maximum negative error value (MN). Typical Value = -0.05. Default: nullptr */ - CIMPP::PU mxef; /* Fuel flow maximum positive error value (MX). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU rymn; /* Minimum valve opening (RYMN). Typical Value = 0. Default: nullptr */ - CIMPP::PU rymx; /* Maximum valve opening (RYMX). Typical Value = 1.1. Default: nullptr */ - CIMPP::Seconds ta; /* Maximum gate opening velocity (T). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds tc; /* Maximum gate closing velocity (T). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tcm; /* Fuel control time constant (T). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tm; /* Compressor discharge volume time constant (T). Typical Value = 0.2. Default: nullptr */ - CIMPP::Seconds tv; /* Time constant of fuel valve positioner (T). Typical Value = 0.1. Default: nullptr */ + /** \brief Droop (bp). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU bp; + + /** \brief Compressor gain (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU ktm; + + /** \brief Fuel flow maximum negative error value (MN). Typical Value = -0.05. Default: nullptr */ + CIMPP::PU mnef; + + /** \brief Fuel flow maximum positive error value (MX). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU mxef; + + /** \brief Minimum valve opening (RYMN). Typical Value = 0. Default: nullptr */ + CIMPP::PU rymn; + + /** \brief Maximum valve opening (RYMX). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU rymx; + + /** \brief Maximum gate opening velocity (T). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Maximum gate closing velocity (T). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Fuel control time constant (T). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tcm; + + /** \brief Compressor discharge volume time constant (T). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds tm; + + /** \brief Time constant of fuel valve positioner (T). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tv; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GovGASTWD.cpp b/CGMES_2.4.15_16FEB2016/GovGASTWD.cpp index 08890f106..06560d02d 100644 --- a/CGMES_2.4.15_16FEB2016/GovGASTWD.cpp +++ b/CGMES_2.4.15_16FEB2016/GovGASTWD.cpp @@ -8,44 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Temperature.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Temperature.hpp" -#include "ActivePower.hpp" -#include "Seconds.hpp" using namespace CIMPP; -GovGASTWD::GovGASTWD() {}; -GovGASTWD::~GovGASTWD() {}; +GovGASTWD::GovGASTWD() {} +GovGASTWD::~GovGASTWD() {} static const std::list PossibleProfilesForClass = { @@ -104,441 +71,472 @@ GovGASTWD::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovGASTWD_a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_a(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_af1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_af1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->af1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_af2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_af2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->af2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_b(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_bf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_bf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_bf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_bf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_c(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_c(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->c; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_cf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_cf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->cf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_ecr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_ecr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ecr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_etd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_etd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->etd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_k4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_k5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_k5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_k6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_k6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_kdroop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_kdroop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kdroop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_t(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_t(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_tcd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_tcd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tcd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_tmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_tmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_tmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_tmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_trate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_trate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->trate; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_tt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovGASTWD_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a; if (!buffer.str().empty()) @@ -552,7 +550,8 @@ bool get_GovGASTWD_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGASTWD_af1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->af1; if (!buffer.str().empty()) @@ -566,7 +565,8 @@ bool get_GovGASTWD_af1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGASTWD_af2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->af2; if (!buffer.str().empty()) @@ -580,7 +580,8 @@ bool get_GovGASTWD_af2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGASTWD_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b; if (!buffer.str().empty()) @@ -594,7 +595,8 @@ bool get_GovGASTWD_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGASTWD_bf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bf1; if (!buffer.str().empty()) @@ -608,7 +610,8 @@ bool get_GovGASTWD_bf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGASTWD_bf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bf2; if (!buffer.str().empty()) @@ -622,7 +625,8 @@ bool get_GovGASTWD_bf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGASTWD_c(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->c; if (!buffer.str().empty()) @@ -636,7 +640,8 @@ bool get_GovGASTWD_c(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGASTWD_cf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->cf2; if (!buffer.str().empty()) @@ -650,7 +655,8 @@ bool get_GovGASTWD_cf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGASTWD_ecr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ecr; if (!buffer.str().empty()) @@ -664,7 +670,8 @@ bool get_GovGASTWD_ecr(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGASTWD_etd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->etd; if (!buffer.str().empty()) @@ -678,7 +685,8 @@ bool get_GovGASTWD_etd(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGASTWD_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -692,7 +700,8 @@ bool get_GovGASTWD_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k4; if (!buffer.str().empty()) @@ -706,7 +715,8 @@ bool get_GovGASTWD_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k5; if (!buffer.str().empty()) @@ -720,7 +730,8 @@ bool get_GovGASTWD_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_k6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k6; if (!buffer.str().empty()) @@ -734,7 +745,8 @@ bool get_GovGASTWD_k6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -748,7 +760,8 @@ bool get_GovGASTWD_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_kdroop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdroop; if (!buffer.str().empty()) @@ -762,7 +775,8 @@ bool get_GovGASTWD_kdroop(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovGASTWD_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -776,7 +790,8 @@ bool get_GovGASTWD_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -790,7 +805,8 @@ bool get_GovGASTWD_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -804,7 +820,8 @@ bool get_GovGASTWD_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -818,7 +835,8 @@ bool get_GovGASTWD_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovGASTWD_t(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t; if (!buffer.str().empty()) @@ -832,7 +850,8 @@ bool get_GovGASTWD_t(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGASTWD_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -846,7 +865,8 @@ bool get_GovGASTWD_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -860,7 +880,8 @@ bool get_GovGASTWD_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -874,7 +895,8 @@ bool get_GovGASTWD_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -888,7 +910,8 @@ bool get_GovGASTWD_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_tcd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tcd; if (!buffer.str().empty()) @@ -902,7 +925,8 @@ bool get_GovGASTWD_tcd(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGASTWD_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -916,7 +940,8 @@ bool get_GovGASTWD_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -930,7 +955,8 @@ bool get_GovGASTWD_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_tmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tmax; if (!buffer.str().empty()) @@ -944,7 +970,8 @@ bool get_GovGASTWD_tmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovGASTWD_tmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tmin; if (!buffer.str().empty()) @@ -958,7 +985,8 @@ bool get_GovGASTWD_tmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovGASTWD_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -972,7 +1000,8 @@ bool get_GovGASTWD_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_trate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->trate; if (!buffer.str().empty()) @@ -986,7 +1015,8 @@ bool get_GovGASTWD_trate(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovGASTWD_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tt; if (!buffer.str().empty()) @@ -998,8 +1028,6 @@ bool get_GovGASTWD_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char GovGASTWD::debugName[] = "GovGASTWD"; const char* GovGASTWD::debugString() const { @@ -1008,44 +1036,44 @@ const char* GovGASTWD::debugString() const void GovGASTWD::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovGASTWD"), &GovGASTWD_factory)); + factory_map.emplace("cim:GovGASTWD", &GovGASTWD_factory); } void GovGASTWD::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.a"), &assign_GovGASTWD_a)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.af1"), &assign_GovGASTWD_af1)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.af2"), &assign_GovGASTWD_af2)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.b"), &assign_GovGASTWD_b)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.bf1"), &assign_GovGASTWD_bf1)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.bf2"), &assign_GovGASTWD_bf2)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.c"), &assign_GovGASTWD_c)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.cf2"), &assign_GovGASTWD_cf2)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.ecr"), &assign_GovGASTWD_ecr)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.etd"), &assign_GovGASTWD_etd)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.k3"), &assign_GovGASTWD_k3)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.k4"), &assign_GovGASTWD_k4)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.k5"), &assign_GovGASTWD_k5)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.k6"), &assign_GovGASTWD_k6)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.kd"), &assign_GovGASTWD_kd)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.kdroop"), &assign_GovGASTWD_kdroop)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.kf"), &assign_GovGASTWD_kf)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.ki"), &assign_GovGASTWD_ki)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.kp"), &assign_GovGASTWD_kp)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.mwbase"), &assign_GovGASTWD_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.t"), &assign_GovGASTWD_t)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.t3"), &assign_GovGASTWD_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.t4"), &assign_GovGASTWD_t4)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.t5"), &assign_GovGASTWD_t5)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.tc"), &assign_GovGASTWD_tc)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.tcd"), &assign_GovGASTWD_tcd)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.td"), &assign_GovGASTWD_td)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.tf"), &assign_GovGASTWD_tf)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.tmax"), &assign_GovGASTWD_tmax)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.tmin"), &assign_GovGASTWD_tmin)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.tr"), &assign_GovGASTWD_tr)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.trate"), &assign_GovGASTWD_trate)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.tt"), &assign_GovGASTWD_tt)); + assign_map.emplace("cim:GovGASTWD.a", &assign_GovGASTWD_a); + assign_map.emplace("cim:GovGASTWD.af1", &assign_GovGASTWD_af1); + assign_map.emplace("cim:GovGASTWD.af2", &assign_GovGASTWD_af2); + assign_map.emplace("cim:GovGASTWD.b", &assign_GovGASTWD_b); + assign_map.emplace("cim:GovGASTWD.bf1", &assign_GovGASTWD_bf1); + assign_map.emplace("cim:GovGASTWD.bf2", &assign_GovGASTWD_bf2); + assign_map.emplace("cim:GovGASTWD.c", &assign_GovGASTWD_c); + assign_map.emplace("cim:GovGASTWD.cf2", &assign_GovGASTWD_cf2); + assign_map.emplace("cim:GovGASTWD.ecr", &assign_GovGASTWD_ecr); + assign_map.emplace("cim:GovGASTWD.etd", &assign_GovGASTWD_etd); + assign_map.emplace("cim:GovGASTWD.k3", &assign_GovGASTWD_k3); + assign_map.emplace("cim:GovGASTWD.k4", &assign_GovGASTWD_k4); + assign_map.emplace("cim:GovGASTWD.k5", &assign_GovGASTWD_k5); + assign_map.emplace("cim:GovGASTWD.k6", &assign_GovGASTWD_k6); + assign_map.emplace("cim:GovGASTWD.kd", &assign_GovGASTWD_kd); + assign_map.emplace("cim:GovGASTWD.kdroop", &assign_GovGASTWD_kdroop); + assign_map.emplace("cim:GovGASTWD.kf", &assign_GovGASTWD_kf); + assign_map.emplace("cim:GovGASTWD.ki", &assign_GovGASTWD_ki); + assign_map.emplace("cim:GovGASTWD.kp", &assign_GovGASTWD_kp); + assign_map.emplace("cim:GovGASTWD.mwbase", &assign_GovGASTWD_mwbase); + assign_map.emplace("cim:GovGASTWD.t", &assign_GovGASTWD_t); + assign_map.emplace("cim:GovGASTWD.t3", &assign_GovGASTWD_t3); + assign_map.emplace("cim:GovGASTWD.t4", &assign_GovGASTWD_t4); + assign_map.emplace("cim:GovGASTWD.t5", &assign_GovGASTWD_t5); + assign_map.emplace("cim:GovGASTWD.tc", &assign_GovGASTWD_tc); + assign_map.emplace("cim:GovGASTWD.tcd", &assign_GovGASTWD_tcd); + assign_map.emplace("cim:GovGASTWD.td", &assign_GovGASTWD_td); + assign_map.emplace("cim:GovGASTWD.tf", &assign_GovGASTWD_tf); + assign_map.emplace("cim:GovGASTWD.tmax", &assign_GovGASTWD_tmax); + assign_map.emplace("cim:GovGASTWD.tmin", &assign_GovGASTWD_tmin); + assign_map.emplace("cim:GovGASTWD.tr", &assign_GovGASTWD_tr); + assign_map.emplace("cim:GovGASTWD.trate", &assign_GovGASTWD_trate); + assign_map.emplace("cim:GovGASTWD.tt", &assign_GovGASTWD_tt); } void GovGASTWD::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/GovGASTWD.hpp b/CGMES_2.4.15_16FEB2016/GovGASTWD.hpp index 5a33bd21d..8623cf082 100644 --- a/CGMES_2.4.15_16FEB2016/GovGASTWD.hpp +++ b/CGMES_2.4.15_16FEB2016/GovGASTWD.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Woodward Gas turbine governor model. - */ + /** \brief Woodward Gas turbine governor model. */ class GovGASTWD : public TurbineGovernorDynamics { public: @@ -31,39 +29,104 @@ namespace CIMPP GovGASTWD(); ~GovGASTWD() override; - CIMPP::Simple_Float a; /* Valve positioner (). Default: nullptr */ - CIMPP::PU af1; /* Exhaust temperature Parameter (Af1). Default: nullptr */ - CIMPP::PU af2; /* Coefficient equal to 0.5(1-speed) (Af2). Default: nullptr */ - CIMPP::Simple_Float b; /* Valve positioner (). Default: nullptr */ - CIMPP::PU bf1; /* (Bf1). Bf1 = E(1-w) where E (speed sensitivity coefficient) is 0.55 to 0.65 x Tr. Default: nullptr */ - CIMPP::PU bf2; /* Turbine Torque Coefficient K (depends on heating value of fuel stream in combustion chamber) (Bf2). Default: nullptr */ - CIMPP::Simple_Float c; /* Valve positioner (). Default: nullptr */ - CIMPP::PU cf2; /* Coefficient defining fuel flow where power output is 0% (Cf2). Synchronous but no output. Typically 0.23 x K(23% fuel flow). Default: nullptr */ - CIMPP::Seconds ecr; /* Combustion reaction time delay (Ecr). Default: nullptr */ - CIMPP::Seconds etd; /* Turbine and exhaust delay (Etd). Default: nullptr */ - CIMPP::PU k3; /* Ratio of Fuel Adjustment (K3). Default: nullptr */ - CIMPP::PU k4; /* Gain of radiation shield (K4). Default: nullptr */ - CIMPP::PU k5; /* Gain of radiation shield (K5). Default: nullptr */ - CIMPP::PU k6; /* Minimum fuel flow (K6). Default: nullptr */ - CIMPP::PU kd; /* Drop Governor Gain (Kd). Default: nullptr */ - CIMPP::PU kdroop; /* (Kdroop). Default: nullptr */ - CIMPP::PU kf; /* Fuel system feedback (Kf). Default: nullptr */ - CIMPP::PU ki; /* Isochronous Governor Gain (Ki). Default: nullptr */ - CIMPP::PU kp; /* PID Proportional gain (Kp). Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ - CIMPP::Seconds t; /* Fuel Control Time Constant (T). Default: nullptr */ - CIMPP::Seconds t3; /* Radiation shield time constant (T3). Default: nullptr */ - CIMPP::Seconds t4; /* Thermocouple time constant (T4). Default: nullptr */ - CIMPP::Seconds t5; /* Temperature control time constant (T5). Default: nullptr */ - CIMPP::Temperature tc; /* Temperature control (Tc). Default: nullptr */ - CIMPP::Seconds tcd; /* Compressor discharge time constant (Tcd). Default: nullptr */ - CIMPP::Seconds td; /* Power transducer time constant (Td). Default: nullptr */ - CIMPP::Seconds tf; /* Fuel system time constant (Tf). Default: nullptr */ - CIMPP::PU tmax; /* Maximum Turbine limit (Tmax). Default: nullptr */ - CIMPP::PU tmin; /* Minimum Turbine limit (Tmin). Default: nullptr */ - CIMPP::Temperature tr; /* Rated temperature (Tr). Default: nullptr */ - CIMPP::ActivePower trate; /* Turbine rating (Trate). Unit = MW. Default: nullptr */ - CIMPP::Seconds tt; /* Temperature controller integration rate (Tt). Default: nullptr */ + /** \brief Valve positioner (). Default: nullptr */ + CIMPP::Simple_Float a; + + /** \brief Exhaust temperature Parameter (Af1). Default: nullptr */ + CIMPP::PU af1; + + /** \brief Coefficient equal to 0.5(1-speed) (Af2). Default: nullptr */ + CIMPP::PU af2; + + /** \brief Valve positioner (). Default: nullptr */ + CIMPP::Simple_Float b; + + /** \brief (Bf1). Bf1 = E(1-w) where E (speed sensitivity coefficient) is 0.55 to 0.65 x Tr. Default: nullptr */ + CIMPP::PU bf1; + + /** \brief Turbine Torque Coefficient K (depends on heating value of fuel stream in combustion chamber) (Bf2). Default: nullptr */ + CIMPP::PU bf2; + + /** \brief Valve positioner (). Default: nullptr */ + CIMPP::Simple_Float c; + + /** \brief Coefficient defining fuel flow where power output is 0% (Cf2). Synchronous but no output. Typically 0.23 x K(23% fuel flow). Default: nullptr */ + CIMPP::PU cf2; + + /** \brief Combustion reaction time delay (Ecr). Default: nullptr */ + CIMPP::Seconds ecr; + + /** \brief Turbine and exhaust delay (Etd). Default: nullptr */ + CIMPP::Seconds etd; + + /** \brief Ratio of Fuel Adjustment (K3). Default: nullptr */ + CIMPP::PU k3; + + /** \brief Gain of radiation shield (K4). Default: nullptr */ + CIMPP::PU k4; + + /** \brief Gain of radiation shield (K5). Default: nullptr */ + CIMPP::PU k5; + + /** \brief Minimum fuel flow (K6). Default: nullptr */ + CIMPP::PU k6; + + /** \brief Drop Governor Gain (Kd). Default: nullptr */ + CIMPP::PU kd; + + /** \brief (Kdroop). Default: nullptr */ + CIMPP::PU kdroop; + + /** \brief Fuel system feedback (Kf). Default: nullptr */ + CIMPP::PU kf; + + /** \brief Isochronous Governor Gain (Ki). Default: nullptr */ + CIMPP::PU ki; + + /** \brief PID Proportional gain (Kp). Default: nullptr */ + CIMPP::PU kp; + + /** \brief Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Fuel Control Time Constant (T). Default: nullptr */ + CIMPP::Seconds t; + + /** \brief Radiation shield time constant (T3). Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Thermocouple time constant (T4). Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Temperature control time constant (T5). Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Temperature control (Tc). Default: nullptr */ + CIMPP::Temperature tc; + + /** \brief Compressor discharge time constant (Tcd). Default: nullptr */ + CIMPP::Seconds tcd; + + /** \brief Power transducer time constant (Td). Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Fuel system time constant (Tf). Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum Turbine limit (Tmax). Default: nullptr */ + CIMPP::PU tmax; + + /** \brief Minimum Turbine limit (Tmin). Default: nullptr */ + CIMPP::PU tmin; + + /** \brief Rated temperature (Tr). Default: nullptr */ + CIMPP::Temperature tr; + + /** \brief Turbine rating (Trate). Unit = MW. Default: nullptr */ + CIMPP::ActivePower trate; + + /** \brief Temperature controller integration rate (Tt). Default: nullptr */ + CIMPP::Seconds tt; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GovHydro1.cpp b/CGMES_2.4.15_16FEB2016/GovHydro1.cpp index d36e951b5..ba0d33f7d 100644 --- a/CGMES_2.4.15_16FEB2016/GovHydro1.cpp +++ b/CGMES_2.4.15_16FEB2016/GovHydro1.cpp @@ -8,25 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -GovHydro1::GovHydro1() {}; -GovHydro1::~GovHydro1() {}; +GovHydro1::GovHydro1() {} +GovHydro1::~GovHydro1() {} static const std::list PossibleProfilesForClass = { @@ -66,194 +52,206 @@ GovHydro1::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydro1_at(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_at(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->at; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_dturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_dturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_gmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_gmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_gmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_gmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_hdam(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_hdam(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->hdam; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_qnl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_qnl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qnl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_rperm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_rperm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rperm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_rtemp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_rtemp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rtemp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_velm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_velm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydro1_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->at; if (!buffer.str().empty()) @@ -267,7 +265,8 @@ bool get_GovHydro1_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro1_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dturb; if (!buffer.str().empty()) @@ -281,7 +280,8 @@ bool get_GovHydro1_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro1_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmax; if (!buffer.str().empty()) @@ -295,7 +295,8 @@ bool get_GovHydro1_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro1_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmin; if (!buffer.str().empty()) @@ -309,7 +310,8 @@ bool get_GovHydro1_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro1_hdam(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hdam; if (!buffer.str().empty()) @@ -323,7 +325,8 @@ bool get_GovHydro1_hdam(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -337,7 +340,8 @@ bool get_GovHydro1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydro1_qnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qnl; if (!buffer.str().empty()) @@ -351,7 +355,8 @@ bool get_GovHydro1_qnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro1_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rperm; if (!buffer.str().empty()) @@ -365,7 +370,8 @@ bool get_GovHydro1_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro1_rtemp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rtemp; if (!buffer.str().empty()) @@ -379,7 +385,8 @@ bool get_GovHydro1_rtemp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro1_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -393,7 +400,8 @@ bool get_GovHydro1_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro1_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -407,7 +415,8 @@ bool get_GovHydro1_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro1_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -421,7 +430,8 @@ bool get_GovHydro1_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro1_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -435,7 +445,8 @@ bool get_GovHydro1_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro1_velm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velm; if (!buffer.str().empty()) @@ -447,8 +458,6 @@ bool get_GovHydro1_velm(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char GovHydro1::debugName[] = "GovHydro1"; const char* GovHydro1::debugString() const { @@ -457,25 +466,25 @@ const char* GovHydro1::debugString() const void GovHydro1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydro1"), &GovHydro1_factory)); + factory_map.emplace("cim:GovHydro1", &GovHydro1_factory); } void GovHydro1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.at"), &assign_GovHydro1_at)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.dturb"), &assign_GovHydro1_dturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.gmax"), &assign_GovHydro1_gmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.gmin"), &assign_GovHydro1_gmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.hdam"), &assign_GovHydro1_hdam)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.mwbase"), &assign_GovHydro1_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.qnl"), &assign_GovHydro1_qnl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.rperm"), &assign_GovHydro1_rperm)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.rtemp"), &assign_GovHydro1_rtemp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.tf"), &assign_GovHydro1_tf)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.tg"), &assign_GovHydro1_tg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.tr"), &assign_GovHydro1_tr)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.tw"), &assign_GovHydro1_tw)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.velm"), &assign_GovHydro1_velm)); + assign_map.emplace("cim:GovHydro1.at", &assign_GovHydro1_at); + assign_map.emplace("cim:GovHydro1.dturb", &assign_GovHydro1_dturb); + assign_map.emplace("cim:GovHydro1.gmax", &assign_GovHydro1_gmax); + assign_map.emplace("cim:GovHydro1.gmin", &assign_GovHydro1_gmin); + assign_map.emplace("cim:GovHydro1.hdam", &assign_GovHydro1_hdam); + assign_map.emplace("cim:GovHydro1.mwbase", &assign_GovHydro1_mwbase); + assign_map.emplace("cim:GovHydro1.qnl", &assign_GovHydro1_qnl); + assign_map.emplace("cim:GovHydro1.rperm", &assign_GovHydro1_rperm); + assign_map.emplace("cim:GovHydro1.rtemp", &assign_GovHydro1_rtemp); + assign_map.emplace("cim:GovHydro1.tf", &assign_GovHydro1_tf); + assign_map.emplace("cim:GovHydro1.tg", &assign_GovHydro1_tg); + assign_map.emplace("cim:GovHydro1.tr", &assign_GovHydro1_tr); + assign_map.emplace("cim:GovHydro1.tw", &assign_GovHydro1_tw); + assign_map.emplace("cim:GovHydro1.velm", &assign_GovHydro1_velm); } void GovHydro1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/GovHydro1.hpp b/CGMES_2.4.15_16FEB2016/GovHydro1.hpp index 288576b07..f0f99628b 100644 --- a/CGMES_2.4.15_16FEB2016/GovHydro1.hpp +++ b/CGMES_2.4.15_16FEB2016/GovHydro1.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Basic Hydro turbine governor model. - */ + /** \brief Basic Hydro turbine governor model. */ class GovHydro1 : public TurbineGovernorDynamics { public: @@ -30,20 +28,47 @@ namespace CIMPP GovHydro1(); ~GovHydro1() override; - CIMPP::PU at; /* Turbine gain (At) (>0). Typical Value = 1.2. Default: nullptr */ - CIMPP::PU dturb; /* Turbine damping factor (Dturb) (>=0). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU gmax; /* Maximum gate opening (Gmax) (>0). Typical Value = 1. Default: nullptr */ - CIMPP::PU gmin; /* Minimum gate opening (Gmin) (>=0). Typical Value = 0. Default: nullptr */ - CIMPP::PU hdam; /* Turbine nominal head (hdam). Typical Value = 1. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ - CIMPP::PU qnl; /* No-load flow at nominal head (qnl) (>=0). Typical Value = 0.08. Default: nullptr */ - CIMPP::PU rperm; /* Permanent droop (R) (>0). Typical Value = 0.04. Default: nullptr */ - CIMPP::PU rtemp; /* Temporary droop (r) (>R). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds tf; /* Filter time constant () (>0). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds tg; /* Gate servo time constant (Tg) (>0). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tr; /* Washout time constant (Tr) (>0). Typical Value = 5. Default: nullptr */ - CIMPP::Seconds tw; /* Water inertia time constant (Tw) (>0). Typical Value = 1. Default: nullptr */ - CIMPP::Simple_Float velm; /* Maximum gate velocity (Vlem) (>0). Typical Value = 0.2. Default: nullptr */ + /** \brief Turbine gain (At) (>0). Typical Value = 1.2. Default: nullptr */ + CIMPP::PU at; + + /** \brief Turbine damping factor (Dturb) (>=0). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU dturb; + + /** \brief Maximum gate opening (Gmax) (>0). Typical Value = 1. Default: nullptr */ + CIMPP::PU gmax; + + /** \brief Minimum gate opening (Gmin) (>=0). Typical Value = 0. Default: nullptr */ + CIMPP::PU gmin; + + /** \brief Turbine nominal head (hdam). Typical Value = 1. Default: nullptr */ + CIMPP::PU hdam; + + /** \brief Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief No-load flow at nominal head (qnl) (>=0). Typical Value = 0.08. Default: nullptr */ + CIMPP::PU qnl; + + /** \brief Permanent droop (R) (>0). Typical Value = 0.04. Default: nullptr */ + CIMPP::PU rperm; + + /** \brief Temporary droop (r) (>R). Typical Value = 0.3. Default: nullptr */ + CIMPP::PU rtemp; + + /** \brief Filter time constant () (>0). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Gate servo time constant (Tg) (>0). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Washout time constant (Tr) (>0). Typical Value = 5. Default: nullptr */ + CIMPP::Seconds tr; + + /** \brief Water inertia time constant (Tw) (>0). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tw; + + /** \brief Maximum gate velocity (Vlem) (>0). Typical Value = 0.2. Default: nullptr */ + CIMPP::Simple_Float velm; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GovHydro2.cpp b/CGMES_2.4.15_16FEB2016/GovHydro2.cpp index a4fa05ccb..83cb2dbf7 100644 --- a/CGMES_2.4.15_16FEB2016/GovHydro2.cpp +++ b/CGMES_2.4.15_16FEB2016/GovHydro2.cpp @@ -8,40 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Frequency.hpp" -#include "ActivePower.hpp" -#include "Frequency.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -GovHydro2::GovHydro2() {}; -GovHydro2::~GovHydro2() {}; +GovHydro2::GovHydro2() {} +GovHydro2::~GovHydro2() {} static const std::list PossibleProfilesForClass = { @@ -96,389 +67,416 @@ GovHydro2::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydro2_aturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_aturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->aturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_bturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_bturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_eps(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eps; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_gv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_kturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_kturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_pgv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_rperm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_rperm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rperm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_rtemp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_rtemp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rtemp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_uc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_uo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_uo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydro2_aturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->aturb; if (!buffer.str().empty()) @@ -492,7 +490,8 @@ bool get_GovHydro2_aturb(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro2_bturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bturb; if (!buffer.str().empty()) @@ -506,7 +505,8 @@ bool get_GovHydro2_bturb(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro2_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -520,7 +520,8 @@ bool get_GovHydro2_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro2_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -534,7 +535,8 @@ bool get_GovHydro2_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro2_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eps; if (!buffer.str().empty()) @@ -548,7 +550,8 @@ bool get_GovHydro2_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro2_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -562,7 +565,8 @@ bool get_GovHydro2_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro2_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -576,7 +580,8 @@ bool get_GovHydro2_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro2_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -590,7 +595,8 @@ bool get_GovHydro2_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro2_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -604,7 +610,8 @@ bool get_GovHydro2_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro2_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -618,7 +625,8 @@ bool get_GovHydro2_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro2_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv6; if (!buffer.str().empty()) @@ -632,7 +640,8 @@ bool get_GovHydro2_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro2_kturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kturb; if (!buffer.str().empty()) @@ -646,7 +655,8 @@ bool get_GovHydro2_kturb(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -660,7 +670,8 @@ bool get_GovHydro2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydro2_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -674,7 +685,8 @@ bool get_GovHydro2_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro2_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -688,7 +700,8 @@ bool get_GovHydro2_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro2_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -702,7 +715,8 @@ bool get_GovHydro2_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro2_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -716,7 +730,8 @@ bool get_GovHydro2_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro2_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -730,7 +745,8 @@ bool get_GovHydro2_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro2_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv6; if (!buffer.str().empty()) @@ -744,7 +760,8 @@ bool get_GovHydro2_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro2_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -758,7 +775,8 @@ bool get_GovHydro2_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro2_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -772,7 +790,8 @@ bool get_GovHydro2_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro2_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rperm; if (!buffer.str().empty()) @@ -786,7 +805,8 @@ bool get_GovHydro2_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro2_rtemp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rtemp; if (!buffer.str().empty()) @@ -800,7 +820,8 @@ bool get_GovHydro2_rtemp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro2_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -814,7 +835,8 @@ bool get_GovHydro2_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro2_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -828,7 +850,8 @@ bool get_GovHydro2_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro2_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -842,7 +865,8 @@ bool get_GovHydro2_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro2_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -856,7 +880,8 @@ bool get_GovHydro2_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro2_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uc; if (!buffer.str().empty()) @@ -870,7 +895,8 @@ bool get_GovHydro2_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro2_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uo; if (!buffer.str().empty()) @@ -882,8 +908,6 @@ bool get_GovHydro2_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char GovHydro2::debugName[] = "GovHydro2"; const char* GovHydro2::debugString() const { @@ -892,40 +916,40 @@ const char* GovHydro2::debugString() const void GovHydro2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydro2"), &GovHydro2_factory)); + factory_map.emplace("cim:GovHydro2", &GovHydro2_factory); } void GovHydro2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.aturb"), &assign_GovHydro2_aturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.bturb"), &assign_GovHydro2_bturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.db1"), &assign_GovHydro2_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.db2"), &assign_GovHydro2_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.eps"), &assign_GovHydro2_eps)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.gv1"), &assign_GovHydro2_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.gv2"), &assign_GovHydro2_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.gv3"), &assign_GovHydro2_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.gv4"), &assign_GovHydro2_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.gv5"), &assign_GovHydro2_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.gv6"), &assign_GovHydro2_gv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.kturb"), &assign_GovHydro2_kturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.mwbase"), &assign_GovHydro2_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.pgv1"), &assign_GovHydro2_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.pgv2"), &assign_GovHydro2_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.pgv3"), &assign_GovHydro2_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.pgv4"), &assign_GovHydro2_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.pgv5"), &assign_GovHydro2_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.pgv6"), &assign_GovHydro2_pgv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.pmax"), &assign_GovHydro2_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.pmin"), &assign_GovHydro2_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.rperm"), &assign_GovHydro2_rperm)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.rtemp"), &assign_GovHydro2_rtemp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.tg"), &assign_GovHydro2_tg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.tp"), &assign_GovHydro2_tp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.tr"), &assign_GovHydro2_tr)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.tw"), &assign_GovHydro2_tw)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.uc"), &assign_GovHydro2_uc)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.uo"), &assign_GovHydro2_uo)); + assign_map.emplace("cim:GovHydro2.aturb", &assign_GovHydro2_aturb); + assign_map.emplace("cim:GovHydro2.bturb", &assign_GovHydro2_bturb); + assign_map.emplace("cim:GovHydro2.db1", &assign_GovHydro2_db1); + assign_map.emplace("cim:GovHydro2.db2", &assign_GovHydro2_db2); + assign_map.emplace("cim:GovHydro2.eps", &assign_GovHydro2_eps); + assign_map.emplace("cim:GovHydro2.gv1", &assign_GovHydro2_gv1); + assign_map.emplace("cim:GovHydro2.gv2", &assign_GovHydro2_gv2); + assign_map.emplace("cim:GovHydro2.gv3", &assign_GovHydro2_gv3); + assign_map.emplace("cim:GovHydro2.gv4", &assign_GovHydro2_gv4); + assign_map.emplace("cim:GovHydro2.gv5", &assign_GovHydro2_gv5); + assign_map.emplace("cim:GovHydro2.gv6", &assign_GovHydro2_gv6); + assign_map.emplace("cim:GovHydro2.kturb", &assign_GovHydro2_kturb); + assign_map.emplace("cim:GovHydro2.mwbase", &assign_GovHydro2_mwbase); + assign_map.emplace("cim:GovHydro2.pgv1", &assign_GovHydro2_pgv1); + assign_map.emplace("cim:GovHydro2.pgv2", &assign_GovHydro2_pgv2); + assign_map.emplace("cim:GovHydro2.pgv3", &assign_GovHydro2_pgv3); + assign_map.emplace("cim:GovHydro2.pgv4", &assign_GovHydro2_pgv4); + assign_map.emplace("cim:GovHydro2.pgv5", &assign_GovHydro2_pgv5); + assign_map.emplace("cim:GovHydro2.pgv6", &assign_GovHydro2_pgv6); + assign_map.emplace("cim:GovHydro2.pmax", &assign_GovHydro2_pmax); + assign_map.emplace("cim:GovHydro2.pmin", &assign_GovHydro2_pmin); + assign_map.emplace("cim:GovHydro2.rperm", &assign_GovHydro2_rperm); + assign_map.emplace("cim:GovHydro2.rtemp", &assign_GovHydro2_rtemp); + assign_map.emplace("cim:GovHydro2.tg", &assign_GovHydro2_tg); + assign_map.emplace("cim:GovHydro2.tp", &assign_GovHydro2_tp); + assign_map.emplace("cim:GovHydro2.tr", &assign_GovHydro2_tr); + assign_map.emplace("cim:GovHydro2.tw", &assign_GovHydro2_tw); + assign_map.emplace("cim:GovHydro2.uc", &assign_GovHydro2_uc); + assign_map.emplace("cim:GovHydro2.uo", &assign_GovHydro2_uo); } void GovHydro2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/GovHydro2.hpp b/CGMES_2.4.15_16FEB2016/GovHydro2.hpp index aaf315aa8..3919c3e7b 100644 --- a/CGMES_2.4.15_16FEB2016/GovHydro2.hpp +++ b/CGMES_2.4.15_16FEB2016/GovHydro2.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE hydro turbine governor model represents plants with straightforward penstock configurations and hydraulic-dashpot governors. - */ + /** \brief IEEE hydro turbine governor model represents plants with straightforward penstock configurations and hydraulic-dashpot governors. */ class GovHydro2 : public TurbineGovernorDynamics { public: @@ -31,35 +29,92 @@ namespace CIMPP GovHydro2(); ~GovHydro2() override; - CIMPP::PU aturb; /* Turbine numerator multiplier (Aturb). Typical Value = -1. Default: nullptr */ - CIMPP::PU bturb; /* Turbine denominator multiplier (Bturb). Typical Value = 0.5. Default: nullptr */ - CIMPP::Frequency db1; /* Intentional deadband width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower db2; /* Unintentional deadband (db2). Unit = MW. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency eps; /* Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::PU gv1; /* Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv6; /* Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU kturb; /* Turbine gain (Kturb). Typical Value = 1. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv6; /* Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU pmax; /* Maximum gate opening (Pmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum gate opening; (). Typical Value = 0. Default: nullptr */ - CIMPP::PU rperm; /* Permanent droop (Rperm). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU rtemp; /* Temporary droop (Rtemp). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tg; /* Gate servo time constant (Tg). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tp; /* Pilot servo valve time constant (Tp). Typical Value = 0.03. Default: nullptr */ - CIMPP::Seconds tr; /* Dashpot time constant (Tr). Typical Value = 12. Default: nullptr */ - CIMPP::Seconds tw; /* Water inertia time constant (Tw). Typical Value = 2. Default: nullptr */ - CIMPP::Simple_Float uc; /* Maximum gate closing velocity (Uc) (<0). Unit = PU/sec. Typical Value = -0.1. Default: nullptr */ - CIMPP::Simple_Float uo; /* Maximum gate opening velocity (Uo). Unit = PU/sec. Typical Value = 0.1. Default: nullptr */ + /** \brief Turbine numerator multiplier (Aturb). Typical Value = -1. Default: nullptr */ + CIMPP::PU aturb; + + /** \brief Turbine denominator multiplier (Bturb). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU bturb; + + /** \brief Intentional deadband width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Unintentional deadband (db2). Unit = MW. Typical Value = 0. Default: nullptr */ + CIMPP::ActivePower db2; + + /** \brief Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency eps; + + /** \brief Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv6; + + /** \brief Turbine gain (Kturb). Typical Value = 1. Default: nullptr */ + CIMPP::PU kturb; + + /** \brief Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv6; + + /** \brief Maximum gate opening (Pmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum gate opening; (). Typical Value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Permanent droop (Rperm). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU rperm; + + /** \brief Temporary droop (Rtemp). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU rtemp; + + /** \brief Gate servo time constant (Tg). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Pilot servo valve time constant (Tp). Typical Value = 0.03. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Dashpot time constant (Tr). Typical Value = 12. Default: nullptr */ + CIMPP::Seconds tr; + + /** \brief Water inertia time constant (Tw). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds tw; + + /** \brief Maximum gate closing velocity (Uc) (<0). Unit = PU/sec. Typical Value = -0.1. Default: nullptr */ + CIMPP::Simple_Float uc; + + /** \brief Maximum gate opening velocity (Uo). Unit = PU/sec. Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float uo; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GovHydro3.cpp b/CGMES_2.4.15_16FEB2016/GovHydro3.cpp index 4e6aeced8..e942b6ea1 100644 --- a/CGMES_2.4.15_16FEB2016/GovHydro3.cpp +++ b/CGMES_2.4.15_16FEB2016/GovHydro3.cpp @@ -8,47 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "Frequency.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "Frequency.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -GovHydro3::GovHydro3() {}; -GovHydro3::~GovHydro3() {}; +GovHydro3::GovHydro3() {} +GovHydro3::~GovHydro3() {} static const std::list PossibleProfilesForClass = { @@ -110,480 +74,514 @@ GovHydro3::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydro3_at(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_at(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->at; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_dturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_dturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_eps(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eps; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_governorControl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_governorControl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->governorControl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_gv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_h0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_h0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->h0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_pgv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_qnl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_qnl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qnl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_relec(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_relec(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->relec; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_rgate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_rgate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rgate; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_tt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_velcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_velcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velcl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_velop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_velop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydro3_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->at; if (!buffer.str().empty()) @@ -597,7 +595,8 @@ bool get_GovHydro3_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -611,7 +610,8 @@ bool get_GovHydro3_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -625,7 +625,8 @@ bool get_GovHydro3_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dturb; if (!buffer.str().empty()) @@ -639,7 +640,8 @@ bool get_GovHydro3_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro3_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eps; if (!buffer.str().empty()) @@ -653,7 +655,8 @@ bool get_GovHydro3_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_governorControl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->governorControl; if (!buffer.str().empty()) @@ -667,7 +670,8 @@ bool get_GovHydro3_governorControl(const BaseClass* BaseClass_ptr1, std::strings bool get_GovHydro3_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -681,7 +685,8 @@ bool get_GovHydro3_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -695,7 +700,8 @@ bool get_GovHydro3_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -709,7 +715,8 @@ bool get_GovHydro3_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -723,7 +730,8 @@ bool get_GovHydro3_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -737,7 +745,8 @@ bool get_GovHydro3_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv6; if (!buffer.str().empty()) @@ -751,7 +760,8 @@ bool get_GovHydro3_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_h0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->h0; if (!buffer.str().empty()) @@ -765,7 +775,8 @@ bool get_GovHydro3_h0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -779,7 +790,8 @@ bool get_GovHydro3_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -793,7 +805,8 @@ bool get_GovHydro3_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -807,7 +820,8 @@ bool get_GovHydro3_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -821,7 +835,8 @@ bool get_GovHydro3_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -835,7 +850,8 @@ bool get_GovHydro3_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydro3_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -849,7 +865,8 @@ bool get_GovHydro3_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro3_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -863,7 +880,8 @@ bool get_GovHydro3_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro3_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -877,7 +895,8 @@ bool get_GovHydro3_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro3_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -891,7 +910,8 @@ bool get_GovHydro3_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro3_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -905,7 +925,8 @@ bool get_GovHydro3_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro3_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv6; if (!buffer.str().empty()) @@ -919,7 +940,8 @@ bool get_GovHydro3_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro3_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -933,7 +955,8 @@ bool get_GovHydro3_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro3_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -947,7 +970,8 @@ bool get_GovHydro3_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro3_qnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qnl; if (!buffer.str().empty()) @@ -961,7 +985,8 @@ bool get_GovHydro3_qnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_relec(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->relec; if (!buffer.str().empty()) @@ -975,7 +1000,8 @@ bool get_GovHydro3_relec(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro3_rgate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rgate; if (!buffer.str().empty()) @@ -989,7 +1015,8 @@ bool get_GovHydro3_rgate(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro3_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -1003,7 +1030,8 @@ bool get_GovHydro3_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -1017,7 +1045,8 @@ bool get_GovHydro3_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -1031,7 +1060,8 @@ bool get_GovHydro3_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tt; if (!buffer.str().empty()) @@ -1045,7 +1075,8 @@ bool get_GovHydro3_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -1059,7 +1090,8 @@ bool get_GovHydro3_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_velcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velcl; if (!buffer.str().empty()) @@ -1073,7 +1105,8 @@ bool get_GovHydro3_velcl(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro3_velop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velop; if (!buffer.str().empty()) @@ -1085,8 +1118,6 @@ bool get_GovHydro3_velop(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } - - const char GovHydro3::debugName[] = "GovHydro3"; const char* GovHydro3::debugString() const { @@ -1095,47 +1126,47 @@ const char* GovHydro3::debugString() const void GovHydro3::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydro3"), &GovHydro3_factory)); + factory_map.emplace("cim:GovHydro3", &GovHydro3_factory); } void GovHydro3::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.at"), &assign_GovHydro3_at)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.db1"), &assign_GovHydro3_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.db2"), &assign_GovHydro3_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.dturb"), &assign_GovHydro3_dturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.eps"), &assign_GovHydro3_eps)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.governorControl"), &assign_GovHydro3_governorControl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.gv1"), &assign_GovHydro3_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.gv2"), &assign_GovHydro3_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.gv3"), &assign_GovHydro3_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.gv4"), &assign_GovHydro3_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.gv5"), &assign_GovHydro3_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.gv6"), &assign_GovHydro3_gv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.h0"), &assign_GovHydro3_h0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.k1"), &assign_GovHydro3_k1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.k2"), &assign_GovHydro3_k2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.kg"), &assign_GovHydro3_kg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.ki"), &assign_GovHydro3_ki)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.mwbase"), &assign_GovHydro3_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.pgv1"), &assign_GovHydro3_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.pgv2"), &assign_GovHydro3_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.pgv3"), &assign_GovHydro3_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.pgv4"), &assign_GovHydro3_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.pgv5"), &assign_GovHydro3_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.pgv6"), &assign_GovHydro3_pgv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.pmax"), &assign_GovHydro3_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.pmin"), &assign_GovHydro3_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.qnl"), &assign_GovHydro3_qnl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.relec"), &assign_GovHydro3_relec)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.rgate"), &assign_GovHydro3_rgate)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.td"), &assign_GovHydro3_td)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.tf"), &assign_GovHydro3_tf)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.tp"), &assign_GovHydro3_tp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.tt"), &assign_GovHydro3_tt)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.tw"), &assign_GovHydro3_tw)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.velcl"), &assign_GovHydro3_velcl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.velop"), &assign_GovHydro3_velop)); + assign_map.emplace("cim:GovHydro3.at", &assign_GovHydro3_at); + assign_map.emplace("cim:GovHydro3.db1", &assign_GovHydro3_db1); + assign_map.emplace("cim:GovHydro3.db2", &assign_GovHydro3_db2); + assign_map.emplace("cim:GovHydro3.dturb", &assign_GovHydro3_dturb); + assign_map.emplace("cim:GovHydro3.eps", &assign_GovHydro3_eps); + assign_map.emplace("cim:GovHydro3.governorControl", &assign_GovHydro3_governorControl); + assign_map.emplace("cim:GovHydro3.gv1", &assign_GovHydro3_gv1); + assign_map.emplace("cim:GovHydro3.gv2", &assign_GovHydro3_gv2); + assign_map.emplace("cim:GovHydro3.gv3", &assign_GovHydro3_gv3); + assign_map.emplace("cim:GovHydro3.gv4", &assign_GovHydro3_gv4); + assign_map.emplace("cim:GovHydro3.gv5", &assign_GovHydro3_gv5); + assign_map.emplace("cim:GovHydro3.gv6", &assign_GovHydro3_gv6); + assign_map.emplace("cim:GovHydro3.h0", &assign_GovHydro3_h0); + assign_map.emplace("cim:GovHydro3.k1", &assign_GovHydro3_k1); + assign_map.emplace("cim:GovHydro3.k2", &assign_GovHydro3_k2); + assign_map.emplace("cim:GovHydro3.kg", &assign_GovHydro3_kg); + assign_map.emplace("cim:GovHydro3.ki", &assign_GovHydro3_ki); + assign_map.emplace("cim:GovHydro3.mwbase", &assign_GovHydro3_mwbase); + assign_map.emplace("cim:GovHydro3.pgv1", &assign_GovHydro3_pgv1); + assign_map.emplace("cim:GovHydro3.pgv2", &assign_GovHydro3_pgv2); + assign_map.emplace("cim:GovHydro3.pgv3", &assign_GovHydro3_pgv3); + assign_map.emplace("cim:GovHydro3.pgv4", &assign_GovHydro3_pgv4); + assign_map.emplace("cim:GovHydro3.pgv5", &assign_GovHydro3_pgv5); + assign_map.emplace("cim:GovHydro3.pgv6", &assign_GovHydro3_pgv6); + assign_map.emplace("cim:GovHydro3.pmax", &assign_GovHydro3_pmax); + assign_map.emplace("cim:GovHydro3.pmin", &assign_GovHydro3_pmin); + assign_map.emplace("cim:GovHydro3.qnl", &assign_GovHydro3_qnl); + assign_map.emplace("cim:GovHydro3.relec", &assign_GovHydro3_relec); + assign_map.emplace("cim:GovHydro3.rgate", &assign_GovHydro3_rgate); + assign_map.emplace("cim:GovHydro3.td", &assign_GovHydro3_td); + assign_map.emplace("cim:GovHydro3.tf", &assign_GovHydro3_tf); + assign_map.emplace("cim:GovHydro3.tp", &assign_GovHydro3_tp); + assign_map.emplace("cim:GovHydro3.tt", &assign_GovHydro3_tt); + assign_map.emplace("cim:GovHydro3.tw", &assign_GovHydro3_tw); + assign_map.emplace("cim:GovHydro3.velcl", &assign_GovHydro3_velcl); + assign_map.emplace("cim:GovHydro3.velop", &assign_GovHydro3_velop); } void GovHydro3::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/GovHydro3.hpp b/CGMES_2.4.15_16FEB2016/GovHydro3.hpp index 8c61cac08..d3e458631 100644 --- a/CGMES_2.4.15_16FEB2016/GovHydro3.hpp +++ b/CGMES_2.4.15_16FEB2016/GovHydro3.hpp @@ -22,9 +22,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE Hydro Governor-Turbine Model. This model differs from that defined in the IEEE modeling guideline paper in that the limits on gate position and velocity do not permit "wind up" of the upstream signals. - */ + /** \brief Modified IEEE Hydro Governor-Turbine Model. This model differs from that defined in the IEEE modeling guideline paper in that the limits on gate position and velocity do not permit "wind up" of the upstream signals. */ class GovHydro3 : public TurbineGovernorDynamics { public: @@ -32,42 +30,113 @@ namespace CIMPP GovHydro3(); ~GovHydro3() override; - CIMPP::PU at; /* Turbine gain (At). Typical Value = 1.2. Default: nullptr */ - CIMPP::Frequency db1; /* Intentional dead-band width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower db2; /* Unintentional dead-band (db2). Unit = MW. Typical Value = 0. Default: nullptr */ - CIMPP::PU dturb; /* Turbine damping factor (Dturb). Typical Value = 0.2. Default: nullptr */ - CIMPP::Frequency eps; /* Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::Boolean governorControl; /* Governor control flag (Cflag). true = PID control is active false = double derivative control is active. Typical Value = true. Default: false */ - CIMPP::PU gv1; /* Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv6; /* Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU h0; /* Turbine nominal head (H0). Typical Value = 1. Default: nullptr */ - CIMPP::PU k1; /* Derivative gain (K1). Typical Value = 0.01. Default: nullptr */ - CIMPP::PU k2; /* Double derivative gain, if Cflag = -1 (K2). Typical Value = 2.5. Default: nullptr */ - CIMPP::PU kg; /* Gate servo gain (Kg). Typical Value = 2. Default: nullptr */ - CIMPP::PU ki; /* Integral gain (Ki). Typical Value = 0.5. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv6; /* Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU pmax; /* Maximum gate opening, PU of MWbase (Pmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum gate opening, PU of MWbase (Pmin). Typical Value = 0. Default: nullptr */ - CIMPP::PU qnl; /* No-load turbine flow at nominal head (Qnl). Typical Value = 0.08. Default: nullptr */ - CIMPP::PU relec; /* Steady-state droop, PU, for electrical power feedback (Relec). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU rgate; /* Steady-state droop, PU, for governor output feedback (Rgate). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds td; /* Input filter time constant (Td). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds tf; /* Washout time constant (Tf). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tp; /* Gate servo time constant (Tp). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds tt; /* Power feedback time constant (Tt). Typical Value = 0.2. Default: nullptr */ - CIMPP::Seconds tw; /* Water inertia time constant (Tw). Typical Value = 1. Default: nullptr */ - CIMPP::Simple_Float velcl; /* Maximum gate closing velocity (Velcl). Unit = PU/sec. Typical Value = -0.2. Default: nullptr */ - CIMPP::Simple_Float velop; /* Maximum gate opening velocity (Velop). Unit = PU/sec. Typical Value = 0.2. Default: nullptr */ + /** \brief Turbine gain (At). Typical Value = 1.2. Default: nullptr */ + CIMPP::PU at; + + /** \brief Intentional dead-band width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Unintentional dead-band (db2). Unit = MW. Typical Value = 0. Default: nullptr */ + CIMPP::ActivePower db2; + + /** \brief Turbine damping factor (Dturb). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU dturb; + + /** \brief Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency eps; + + /** \brief Governor control flag (Cflag). true = PID control is active false = double derivative control is active. Typical Value = true. Default: false */ + CIMPP::Boolean governorControl; + + /** \brief Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv6; + + /** \brief Turbine nominal head (H0). Typical Value = 1. Default: nullptr */ + CIMPP::PU h0; + + /** \brief Derivative gain (K1). Typical Value = 0.01. Default: nullptr */ + CIMPP::PU k1; + + /** \brief Double derivative gain, if Cflag = -1 (K2). Typical Value = 2.5. Default: nullptr */ + CIMPP::PU k2; + + /** \brief Gate servo gain (Kg). Typical Value = 2. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Integral gain (Ki). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv6; + + /** \brief Maximum gate opening, PU of MWbase (Pmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum gate opening, PU of MWbase (Pmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief No-load turbine flow at nominal head (Qnl). Typical Value = 0.08. Default: nullptr */ + CIMPP::PU qnl; + + /** \brief Steady-state droop, PU, for electrical power feedback (Relec). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU relec; + + /** \brief Steady-state droop, PU, for governor output feedback (Rgate). Typical Value = 0. Default: nullptr */ + CIMPP::PU rgate; + + /** \brief Input filter time constant (Td). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Washout time constant (Tf). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Gate servo time constant (Tp). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Power feedback time constant (Tt). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds tt; + + /** \brief Water inertia time constant (Tw). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tw; + + /** \brief Maximum gate closing velocity (Velcl). Unit = PU/sec. Typical Value = -0.2. Default: nullptr */ + CIMPP::Simple_Float velcl; + + /** \brief Maximum gate opening velocity (Velop). Unit = PU/sec. Typical Value = 0.2. Default: nullptr */ + CIMPP::Simple_Float velop; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GovHydro4.cpp b/CGMES_2.4.15_16FEB2016/GovHydro4.cpp index 0480e892e..4a841df9c 100644 --- a/CGMES_2.4.15_16FEB2016/GovHydro4.cpp +++ b/CGMES_2.4.15_16FEB2016/GovHydro4.cpp @@ -8,49 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Frequency.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "Frequency.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -GovHydro4::GovHydro4() {}; -GovHydro4::~GovHydro4() {}; +GovHydro4::GovHydro4() {} +GovHydro4::~GovHydro4() {} static const std::list PossibleProfilesForClass = { @@ -114,506 +76,542 @@ GovHydro4::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydro4_at(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_at(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->at; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_bgv0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_bgv0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bgv0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_bgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_bgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_bgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_bgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_bgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_bgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_bgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_bgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_bgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_bgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_bmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_bmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_dturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_dturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_eps(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eps; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_gmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_gmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_gmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_gmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_gv0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_gv0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_hdam(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_hdam(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->hdam; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_pgv0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_pgv0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_qn1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_qn1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qn1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_rperm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_rperm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rperm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_rtemp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_rtemp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rtemp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_tblade(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_tblade(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tblade; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_uc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_uo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_uo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydro4_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->at; if (!buffer.str().empty()) @@ -627,7 +625,8 @@ bool get_GovHydro4_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro4_bgv0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bgv0; if (!buffer.str().empty()) @@ -641,7 +640,8 @@ bool get_GovHydro4_bgv0(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_bgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bgv1; if (!buffer.str().empty()) @@ -655,7 +655,8 @@ bool get_GovHydro4_bgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_bgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bgv2; if (!buffer.str().empty()) @@ -669,7 +670,8 @@ bool get_GovHydro4_bgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_bgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bgv3; if (!buffer.str().empty()) @@ -683,7 +685,8 @@ bool get_GovHydro4_bgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_bgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bgv4; if (!buffer.str().empty()) @@ -697,7 +700,8 @@ bool get_GovHydro4_bgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_bgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bgv5; if (!buffer.str().empty()) @@ -711,7 +715,8 @@ bool get_GovHydro4_bgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_bmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bmax; if (!buffer.str().empty()) @@ -725,7 +730,8 @@ bool get_GovHydro4_bmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -739,7 +745,8 @@ bool get_GovHydro4_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -753,7 +760,8 @@ bool get_GovHydro4_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dturb; if (!buffer.str().empty()) @@ -767,7 +775,8 @@ bool get_GovHydro4_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro4_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eps; if (!buffer.str().empty()) @@ -781,7 +790,8 @@ bool get_GovHydro4_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmax; if (!buffer.str().empty()) @@ -795,7 +805,8 @@ bool get_GovHydro4_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmin; if (!buffer.str().empty()) @@ -809,7 +820,8 @@ bool get_GovHydro4_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_gv0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv0; if (!buffer.str().empty()) @@ -823,7 +835,8 @@ bool get_GovHydro4_gv0(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -837,7 +850,8 @@ bool get_GovHydro4_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -851,7 +865,8 @@ bool get_GovHydro4_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -865,7 +880,8 @@ bool get_GovHydro4_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -879,7 +895,8 @@ bool get_GovHydro4_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -893,7 +910,8 @@ bool get_GovHydro4_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_hdam(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hdam; if (!buffer.str().empty()) @@ -907,7 +925,8 @@ bool get_GovHydro4_hdam(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -921,7 +940,8 @@ bool get_GovHydro4_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydro4_pgv0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv0; if (!buffer.str().empty()) @@ -935,7 +955,8 @@ bool get_GovHydro4_pgv0(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -949,7 +970,8 @@ bool get_GovHydro4_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -963,7 +985,8 @@ bool get_GovHydro4_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -977,7 +1000,8 @@ bool get_GovHydro4_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -991,7 +1015,8 @@ bool get_GovHydro4_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -1005,7 +1030,8 @@ bool get_GovHydro4_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_qn1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qn1; if (!buffer.str().empty()) @@ -1019,7 +1045,8 @@ bool get_GovHydro4_qn1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rperm; if (!buffer.str().empty()) @@ -1033,7 +1060,8 @@ bool get_GovHydro4_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro4_rtemp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rtemp; if (!buffer.str().empty()) @@ -1047,7 +1075,8 @@ bool get_GovHydro4_rtemp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro4_tblade(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tblade; if (!buffer.str().empty()) @@ -1061,7 +1090,8 @@ bool get_GovHydro4_tblade(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydro4_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -1075,7 +1105,8 @@ bool get_GovHydro4_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro4_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -1089,7 +1120,8 @@ bool get_GovHydro4_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro4_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -1103,7 +1135,8 @@ bool get_GovHydro4_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro4_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -1117,7 +1150,8 @@ bool get_GovHydro4_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro4_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uc; if (!buffer.str().empty()) @@ -1131,7 +1165,8 @@ bool get_GovHydro4_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro4_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uo; if (!buffer.str().empty()) @@ -1143,8 +1178,6 @@ bool get_GovHydro4_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char GovHydro4::debugName[] = "GovHydro4"; const char* GovHydro4::debugString() const { @@ -1153,49 +1186,49 @@ const char* GovHydro4::debugString() const void GovHydro4::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydro4"), &GovHydro4_factory)); + factory_map.emplace("cim:GovHydro4", &GovHydro4_factory); } void GovHydro4::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.at"), &assign_GovHydro4_at)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.bgv0"), &assign_GovHydro4_bgv0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.bgv1"), &assign_GovHydro4_bgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.bgv2"), &assign_GovHydro4_bgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.bgv3"), &assign_GovHydro4_bgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.bgv4"), &assign_GovHydro4_bgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.bgv5"), &assign_GovHydro4_bgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.bmax"), &assign_GovHydro4_bmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.db1"), &assign_GovHydro4_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.db2"), &assign_GovHydro4_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.dturb"), &assign_GovHydro4_dturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.eps"), &assign_GovHydro4_eps)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.gmax"), &assign_GovHydro4_gmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.gmin"), &assign_GovHydro4_gmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.gv0"), &assign_GovHydro4_gv0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.gv1"), &assign_GovHydro4_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.gv2"), &assign_GovHydro4_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.gv3"), &assign_GovHydro4_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.gv4"), &assign_GovHydro4_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.gv5"), &assign_GovHydro4_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.hdam"), &assign_GovHydro4_hdam)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.mwbase"), &assign_GovHydro4_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.pgv0"), &assign_GovHydro4_pgv0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.pgv1"), &assign_GovHydro4_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.pgv2"), &assign_GovHydro4_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.pgv3"), &assign_GovHydro4_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.pgv4"), &assign_GovHydro4_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.pgv5"), &assign_GovHydro4_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.qn1"), &assign_GovHydro4_qn1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.rperm"), &assign_GovHydro4_rperm)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.rtemp"), &assign_GovHydro4_rtemp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.tblade"), &assign_GovHydro4_tblade)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.tg"), &assign_GovHydro4_tg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.tp"), &assign_GovHydro4_tp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.tr"), &assign_GovHydro4_tr)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.tw"), &assign_GovHydro4_tw)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.uc"), &assign_GovHydro4_uc)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.uo"), &assign_GovHydro4_uo)); + assign_map.emplace("cim:GovHydro4.at", &assign_GovHydro4_at); + assign_map.emplace("cim:GovHydro4.bgv0", &assign_GovHydro4_bgv0); + assign_map.emplace("cim:GovHydro4.bgv1", &assign_GovHydro4_bgv1); + assign_map.emplace("cim:GovHydro4.bgv2", &assign_GovHydro4_bgv2); + assign_map.emplace("cim:GovHydro4.bgv3", &assign_GovHydro4_bgv3); + assign_map.emplace("cim:GovHydro4.bgv4", &assign_GovHydro4_bgv4); + assign_map.emplace("cim:GovHydro4.bgv5", &assign_GovHydro4_bgv5); + assign_map.emplace("cim:GovHydro4.bmax", &assign_GovHydro4_bmax); + assign_map.emplace("cim:GovHydro4.db1", &assign_GovHydro4_db1); + assign_map.emplace("cim:GovHydro4.db2", &assign_GovHydro4_db2); + assign_map.emplace("cim:GovHydro4.dturb", &assign_GovHydro4_dturb); + assign_map.emplace("cim:GovHydro4.eps", &assign_GovHydro4_eps); + assign_map.emplace("cim:GovHydro4.gmax", &assign_GovHydro4_gmax); + assign_map.emplace("cim:GovHydro4.gmin", &assign_GovHydro4_gmin); + assign_map.emplace("cim:GovHydro4.gv0", &assign_GovHydro4_gv0); + assign_map.emplace("cim:GovHydro4.gv1", &assign_GovHydro4_gv1); + assign_map.emplace("cim:GovHydro4.gv2", &assign_GovHydro4_gv2); + assign_map.emplace("cim:GovHydro4.gv3", &assign_GovHydro4_gv3); + assign_map.emplace("cim:GovHydro4.gv4", &assign_GovHydro4_gv4); + assign_map.emplace("cim:GovHydro4.gv5", &assign_GovHydro4_gv5); + assign_map.emplace("cim:GovHydro4.hdam", &assign_GovHydro4_hdam); + assign_map.emplace("cim:GovHydro4.mwbase", &assign_GovHydro4_mwbase); + assign_map.emplace("cim:GovHydro4.pgv0", &assign_GovHydro4_pgv0); + assign_map.emplace("cim:GovHydro4.pgv1", &assign_GovHydro4_pgv1); + assign_map.emplace("cim:GovHydro4.pgv2", &assign_GovHydro4_pgv2); + assign_map.emplace("cim:GovHydro4.pgv3", &assign_GovHydro4_pgv3); + assign_map.emplace("cim:GovHydro4.pgv4", &assign_GovHydro4_pgv4); + assign_map.emplace("cim:GovHydro4.pgv5", &assign_GovHydro4_pgv5); + assign_map.emplace("cim:GovHydro4.qn1", &assign_GovHydro4_qn1); + assign_map.emplace("cim:GovHydro4.rperm", &assign_GovHydro4_rperm); + assign_map.emplace("cim:GovHydro4.rtemp", &assign_GovHydro4_rtemp); + assign_map.emplace("cim:GovHydro4.tblade", &assign_GovHydro4_tblade); + assign_map.emplace("cim:GovHydro4.tg", &assign_GovHydro4_tg); + assign_map.emplace("cim:GovHydro4.tp", &assign_GovHydro4_tp); + assign_map.emplace("cim:GovHydro4.tr", &assign_GovHydro4_tr); + assign_map.emplace("cim:GovHydro4.tw", &assign_GovHydro4_tw); + assign_map.emplace("cim:GovHydro4.uc", &assign_GovHydro4_uc); + assign_map.emplace("cim:GovHydro4.uo", &assign_GovHydro4_uo); } void GovHydro4::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/GovHydro4.hpp b/CGMES_2.4.15_16FEB2016/GovHydro4.hpp index cb020cb0a..f5165645e 100644 --- a/CGMES_2.4.15_16FEB2016/GovHydro4.hpp +++ b/CGMES_2.4.15_16FEB2016/GovHydro4.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Hydro turbine and governor. Represents plants with straight-forward penstock configurations and hydraulic governors of traditional 'dashpot' type. This model can be used to represent simple, Francis, Pelton or Kaplan turbines. - */ + /** \brief Hydro turbine and governor. Represents plants with straight-forward penstock configurations and hydraulic governors of traditional 'dashpot' type. This model can be used to represent simple, Francis, Pelton or Kaplan turbines. */ class GovHydro4 : public TurbineGovernorDynamics { public: @@ -31,44 +29,119 @@ namespace CIMPP GovHydro4(); ~GovHydro4() override; - CIMPP::PU at; /* Turbine gain (At). Typical Value = 1.2. Default: nullptr */ - CIMPP::PU bgv0; /* Kaplan blade servo point 0 (Bgv0). Typical Value = 0. Default: nullptr */ - CIMPP::PU bgv1; /* Kaplan blade servo point 1 (Bgv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU bgv2; /* Kaplan blade servo point 2 (Bgv2). Typical Value = 0. Typical Value Francis = 0, Kaplan = 0.1. Default: nullptr */ - CIMPP::PU bgv3; /* Kaplan blade servo point 3 (Bgv3). Typical Value = 0. Typical Value Francis = 0, Kaplan = 0.667. Default: nullptr */ - CIMPP::PU bgv4; /* Kaplan blade servo point 4 (Bgv4). Typical Value = 0. Typical Value Francis = 0, Kaplan = 0.9. Default: nullptr */ - CIMPP::PU bgv5; /* Kaplan blade servo point 5 (Bgv5). Typical Value = 0. Typical Value Francis = 0, Kaplan = 1. Default: nullptr */ - CIMPP::Simple_Float bmax; /* Maximum blade adjustment factor (Bmax). Typical Value = 0. Typical Value Francis = 0, Kaplan = 1.1276. Default: nullptr */ - CIMPP::Frequency db1; /* Intentional deadband width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower db2; /* Unintentional dead-band (db2). Unit = MW. Typical Value = 0. Default: nullptr */ - CIMPP::PU dturb; /* Turbine damping factor (Dturb). Unit = delta P (PU of MWbase) / delta speed (PU). Typical Value = 0.5. Typical Value Francis = 1.1, Kaplan = 1.1. Default: nullptr */ - CIMPP::Frequency eps; /* Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::PU gmax; /* Maximum gate opening, PU of MWbase (Gmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU gmin; /* Minimum gate opening, PU of MWbase (Gmin). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv0; /* Nonlinear gain point 0, PU gv (Gv0). Typical Value = 0. Typical Value Francis = 0.1, Kaplan = 0.1. Default: nullptr */ - CIMPP::PU gv1; /* Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Typical Value Francis = 0.4, Kaplan = 0.4. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Typical Value Francis = 0.5, Kaplan = 0.5. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Typical Value Francis = 0.7, Kaplan = 0.7. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Typical Value Francis = 0.8, Kaplan = 0.8. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Typical Value Francis = 0.9, Kaplan = 0.9. Default: nullptr */ - CIMPP::PU hdam; /* Head available at dam (hdam). Typical Value = 1. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv0; /* Nonlinear gain point 0, PU power (Pgv0). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Typical Value Francis = 0.42, Kaplan = 0.35. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Typical Value Francis = 0.56, Kaplan = 0.468. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Typical Value Francis = 0.8, Kaplan = 0.796. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Typical Value Francis = 0.9, Kaplan = 0.917. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Typical Value Francis = 0.97, Kaplan = 0.99. Default: nullptr */ - CIMPP::PU qn1; /* No-load flow at nominal head (Qnl). Typical Value = 0.08. Typical Value Francis = 0, Kaplan = 0. Default: nullptr */ - CIMPP::Seconds rperm; /* Permanent droop (Rperm). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds rtemp; /* Temporary droop (Rtemp). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds tblade; /* Blade servo time constant (Tblade). Typical Value = 100. Default: nullptr */ - CIMPP::Seconds tg; /* Gate servo time constant (Tg) (>0). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tp; /* Pilot servo time constant (Tp). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tr; /* Dashpot time constant (Tr) (>0). Typical Value = 5. Default: nullptr */ - CIMPP::Seconds tw; /* Water inertia time constant (Tw) (>0). Typical Value = 1. Default: nullptr */ - CIMPP::Simple_Float uc; /* Max gate closing velocity (Uc). Typical Value = 0.2. Default: nullptr */ - CIMPP::Simple_Float uo; /* Max gate opening velocity (Uo). Typical Vlaue = 0.2. Default: nullptr */ + /** \brief Turbine gain (At). Typical Value = 1.2. Default: nullptr */ + CIMPP::PU at; + + /** \brief Kaplan blade servo point 0 (Bgv0). Typical Value = 0. Default: nullptr */ + CIMPP::PU bgv0; + + /** \brief Kaplan blade servo point 1 (Bgv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU bgv1; + + /** \brief Kaplan blade servo point 2 (Bgv2). Typical Value = 0. Typical Value Francis = 0, Kaplan = 0.1. Default: nullptr */ + CIMPP::PU bgv2; + + /** \brief Kaplan blade servo point 3 (Bgv3). Typical Value = 0. Typical Value Francis = 0, Kaplan = 0.667. Default: nullptr */ + CIMPP::PU bgv3; + + /** \brief Kaplan blade servo point 4 (Bgv4). Typical Value = 0. Typical Value Francis = 0, Kaplan = 0.9. Default: nullptr */ + CIMPP::PU bgv4; + + /** \brief Kaplan blade servo point 5 (Bgv5). Typical Value = 0. Typical Value Francis = 0, Kaplan = 1. Default: nullptr */ + CIMPP::PU bgv5; + + /** \brief Maximum blade adjustment factor (Bmax). Typical Value = 0. Typical Value Francis = 0, Kaplan = 1.1276. Default: nullptr */ + CIMPP::Simple_Float bmax; + + /** \brief Intentional deadband width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Unintentional dead-band (db2). Unit = MW. Typical Value = 0. Default: nullptr */ + CIMPP::ActivePower db2; + + /** \brief Turbine damping factor (Dturb). Unit = delta P (PU of MWbase) / delta speed (PU). Typical Value = 0.5. Typical Value Francis = 1.1, Kaplan = 1.1. Default: nullptr */ + CIMPP::PU dturb; + + /** \brief Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency eps; + + /** \brief Maximum gate opening, PU of MWbase (Gmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU gmax; + + /** \brief Minimum gate opening, PU of MWbase (Gmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU gmin; + + /** \brief Nonlinear gain point 0, PU gv (Gv0). Typical Value = 0. Typical Value Francis = 0.1, Kaplan = 0.1. Default: nullptr */ + CIMPP::PU gv0; + + /** \brief Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Typical Value Francis = 0.4, Kaplan = 0.4. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Typical Value Francis = 0.5, Kaplan = 0.5. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Typical Value Francis = 0.7, Kaplan = 0.7. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Typical Value Francis = 0.8, Kaplan = 0.8. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Typical Value Francis = 0.9, Kaplan = 0.9. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Head available at dam (hdam). Typical Value = 1. Default: nullptr */ + CIMPP::PU hdam; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain point 0, PU power (Pgv0). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv0; + + /** \brief Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Typical Value Francis = 0.42, Kaplan = 0.35. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Typical Value Francis = 0.56, Kaplan = 0.468. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Typical Value Francis = 0.8, Kaplan = 0.796. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Typical Value Francis = 0.9, Kaplan = 0.917. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Typical Value Francis = 0.97, Kaplan = 0.99. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief No-load flow at nominal head (Qnl). Typical Value = 0.08. Typical Value Francis = 0, Kaplan = 0. Default: nullptr */ + CIMPP::PU qn1; + + /** \brief Permanent droop (Rperm). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds rperm; + + /** \brief Temporary droop (Rtemp). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds rtemp; + + /** \brief Blade servo time constant (Tblade). Typical Value = 100. Default: nullptr */ + CIMPP::Seconds tblade; + + /** \brief Gate servo time constant (Tg) (>0). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Pilot servo time constant (Tp). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Dashpot time constant (Tr) (>0). Typical Value = 5. Default: nullptr */ + CIMPP::Seconds tr; + + /** \brief Water inertia time constant (Tw) (>0). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tw; + + /** \brief Max gate closing velocity (Uc). Typical Value = 0.2. Default: nullptr */ + CIMPP::Simple_Float uc; + + /** \brief Max gate opening velocity (Uo). Typical Vlaue = 0.2. Default: nullptr */ + CIMPP::Simple_Float uo; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GovHydroDD.cpp b/CGMES_2.4.15_16FEB2016/GovHydroDD.cpp index f4baf7592..c7efe476c 100644 --- a/CGMES_2.4.15_16FEB2016/GovHydroDD.cpp +++ b/CGMES_2.4.15_16FEB2016/GovHydroDD.cpp @@ -8,46 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Frequency.hpp" -#include "ActivePower.hpp" -#include "Frequency.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -GovHydroDD::GovHydroDD() {}; -GovHydroDD::~GovHydroDD() {}; +GovHydroDD::GovHydroDD() {} +GovHydroDD::~GovHydroDD() {} static const std::list PossibleProfilesForClass = { @@ -108,467 +73,500 @@ GovHydroDD::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroDD_aturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_aturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->aturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_bturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_bturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_eps(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eps; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_gmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_gmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_gmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_gmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_gv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_inputSignal(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_inputSignal(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_pgv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_tt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_tturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_tturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_velcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_velcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velcl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_velop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_velop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroDD_aturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->aturb; if (!buffer.str().empty()) @@ -582,7 +580,8 @@ bool get_GovHydroDD_aturb(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroDD_bturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bturb; if (!buffer.str().empty()) @@ -596,7 +595,8 @@ bool get_GovHydroDD_bturb(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroDD_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -610,7 +610,8 @@ bool get_GovHydroDD_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroDD_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -624,7 +625,8 @@ bool get_GovHydroDD_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroDD_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eps; if (!buffer.str().empty()) @@ -638,7 +640,8 @@ bool get_GovHydroDD_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroDD_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmax; if (!buffer.str().empty()) @@ -652,7 +655,8 @@ bool get_GovHydroDD_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmin; if (!buffer.str().empty()) @@ -666,7 +670,8 @@ bool get_GovHydroDD_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -680,7 +685,8 @@ bool get_GovHydroDD_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroDD_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -694,7 +700,8 @@ bool get_GovHydroDD_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroDD_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -708,7 +715,8 @@ bool get_GovHydroDD_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroDD_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -722,7 +730,8 @@ bool get_GovHydroDD_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroDD_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -736,7 +745,8 @@ bool get_GovHydroDD_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroDD_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv6; if (!buffer.str().empty()) @@ -750,7 +760,8 @@ bool get_GovHydroDD_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroDD_inputSignal(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inputSignal; if (!buffer.str().empty()) @@ -764,7 +775,8 @@ bool get_GovHydroDD_inputSignal(const BaseClass* BaseClass_ptr1, std::stringstre bool get_GovHydroDD_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -778,7 +790,8 @@ bool get_GovHydroDD_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroDD_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -792,7 +805,8 @@ bool get_GovHydroDD_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroDD_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -806,7 +820,8 @@ bool get_GovHydroDD_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroDD_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -820,7 +835,8 @@ bool get_GovHydroDD_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroDD_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -834,7 +850,8 @@ bool get_GovHydroDD_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroDD_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -848,7 +865,8 @@ bool get_GovHydroDD_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -862,7 +880,8 @@ bool get_GovHydroDD_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -876,7 +895,8 @@ bool get_GovHydroDD_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -890,7 +910,8 @@ bool get_GovHydroDD_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -904,7 +925,8 @@ bool get_GovHydroDD_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv6; if (!buffer.str().empty()) @@ -918,7 +940,8 @@ bool get_GovHydroDD_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -932,7 +955,8 @@ bool get_GovHydroDD_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -946,7 +970,8 @@ bool get_GovHydroDD_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -960,7 +985,8 @@ bool get_GovHydroDD_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroDD_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -974,7 +1000,8 @@ bool get_GovHydroDD_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroDD_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -988,7 +1015,8 @@ bool get_GovHydroDD_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroDD_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -1002,7 +1030,8 @@ bool get_GovHydroDD_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroDD_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tt; if (!buffer.str().empty()) @@ -1016,7 +1045,8 @@ bool get_GovHydroDD_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroDD_tturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tturb; if (!buffer.str().empty()) @@ -1030,7 +1060,8 @@ bool get_GovHydroDD_tturb(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroDD_velcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velcl; if (!buffer.str().empty()) @@ -1044,7 +1075,8 @@ bool get_GovHydroDD_velcl(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroDD_velop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velop; if (!buffer.str().empty()) @@ -1056,8 +1088,6 @@ bool get_GovHydroDD_velop(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char GovHydroDD::debugName[] = "GovHydroDD"; const char* GovHydroDD::debugString() const { @@ -1066,46 +1096,46 @@ const char* GovHydroDD::debugString() const void GovHydroDD::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroDD"), &GovHydroDD_factory)); + factory_map.emplace("cim:GovHydroDD", &GovHydroDD_factory); } void GovHydroDD::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.aturb"), &assign_GovHydroDD_aturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.bturb"), &assign_GovHydroDD_bturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.db1"), &assign_GovHydroDD_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.db2"), &assign_GovHydroDD_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.eps"), &assign_GovHydroDD_eps)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.gmax"), &assign_GovHydroDD_gmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.gmin"), &assign_GovHydroDD_gmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.gv1"), &assign_GovHydroDD_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.gv2"), &assign_GovHydroDD_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.gv3"), &assign_GovHydroDD_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.gv4"), &assign_GovHydroDD_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.gv5"), &assign_GovHydroDD_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.gv6"), &assign_GovHydroDD_gv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.inputSignal"), &assign_GovHydroDD_inputSignal)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.k1"), &assign_GovHydroDD_k1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.k2"), &assign_GovHydroDD_k2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.kg"), &assign_GovHydroDD_kg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.ki"), &assign_GovHydroDD_ki)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.mwbase"), &assign_GovHydroDD_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.pgv1"), &assign_GovHydroDD_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.pgv2"), &assign_GovHydroDD_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.pgv3"), &assign_GovHydroDD_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.pgv4"), &assign_GovHydroDD_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.pgv5"), &assign_GovHydroDD_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.pgv6"), &assign_GovHydroDD_pgv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.pmax"), &assign_GovHydroDD_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.pmin"), &assign_GovHydroDD_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.r"), &assign_GovHydroDD_r)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.td"), &assign_GovHydroDD_td)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.tf"), &assign_GovHydroDD_tf)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.tp"), &assign_GovHydroDD_tp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.tt"), &assign_GovHydroDD_tt)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.tturb"), &assign_GovHydroDD_tturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.velcl"), &assign_GovHydroDD_velcl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.velop"), &assign_GovHydroDD_velop)); + assign_map.emplace("cim:GovHydroDD.aturb", &assign_GovHydroDD_aturb); + assign_map.emplace("cim:GovHydroDD.bturb", &assign_GovHydroDD_bturb); + assign_map.emplace("cim:GovHydroDD.db1", &assign_GovHydroDD_db1); + assign_map.emplace("cim:GovHydroDD.db2", &assign_GovHydroDD_db2); + assign_map.emplace("cim:GovHydroDD.eps", &assign_GovHydroDD_eps); + assign_map.emplace("cim:GovHydroDD.gmax", &assign_GovHydroDD_gmax); + assign_map.emplace("cim:GovHydroDD.gmin", &assign_GovHydroDD_gmin); + assign_map.emplace("cim:GovHydroDD.gv1", &assign_GovHydroDD_gv1); + assign_map.emplace("cim:GovHydroDD.gv2", &assign_GovHydroDD_gv2); + assign_map.emplace("cim:GovHydroDD.gv3", &assign_GovHydroDD_gv3); + assign_map.emplace("cim:GovHydroDD.gv4", &assign_GovHydroDD_gv4); + assign_map.emplace("cim:GovHydroDD.gv5", &assign_GovHydroDD_gv5); + assign_map.emplace("cim:GovHydroDD.gv6", &assign_GovHydroDD_gv6); + assign_map.emplace("cim:GovHydroDD.inputSignal", &assign_GovHydroDD_inputSignal); + assign_map.emplace("cim:GovHydroDD.k1", &assign_GovHydroDD_k1); + assign_map.emplace("cim:GovHydroDD.k2", &assign_GovHydroDD_k2); + assign_map.emplace("cim:GovHydroDD.kg", &assign_GovHydroDD_kg); + assign_map.emplace("cim:GovHydroDD.ki", &assign_GovHydroDD_ki); + assign_map.emplace("cim:GovHydroDD.mwbase", &assign_GovHydroDD_mwbase); + assign_map.emplace("cim:GovHydroDD.pgv1", &assign_GovHydroDD_pgv1); + assign_map.emplace("cim:GovHydroDD.pgv2", &assign_GovHydroDD_pgv2); + assign_map.emplace("cim:GovHydroDD.pgv3", &assign_GovHydroDD_pgv3); + assign_map.emplace("cim:GovHydroDD.pgv4", &assign_GovHydroDD_pgv4); + assign_map.emplace("cim:GovHydroDD.pgv5", &assign_GovHydroDD_pgv5); + assign_map.emplace("cim:GovHydroDD.pgv6", &assign_GovHydroDD_pgv6); + assign_map.emplace("cim:GovHydroDD.pmax", &assign_GovHydroDD_pmax); + assign_map.emplace("cim:GovHydroDD.pmin", &assign_GovHydroDD_pmin); + assign_map.emplace("cim:GovHydroDD.r", &assign_GovHydroDD_r); + assign_map.emplace("cim:GovHydroDD.td", &assign_GovHydroDD_td); + assign_map.emplace("cim:GovHydroDD.tf", &assign_GovHydroDD_tf); + assign_map.emplace("cim:GovHydroDD.tp", &assign_GovHydroDD_tp); + assign_map.emplace("cim:GovHydroDD.tt", &assign_GovHydroDD_tt); + assign_map.emplace("cim:GovHydroDD.tturb", &assign_GovHydroDD_tturb); + assign_map.emplace("cim:GovHydroDD.velcl", &assign_GovHydroDD_velcl); + assign_map.emplace("cim:GovHydroDD.velop", &assign_GovHydroDD_velop); } void GovHydroDD::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/GovHydroDD.hpp b/CGMES_2.4.15_16FEB2016/GovHydroDD.hpp index 67bc201c8..cca2ca2c0 100644 --- a/CGMES_2.4.15_16FEB2016/GovHydroDD.hpp +++ b/CGMES_2.4.15_16FEB2016/GovHydroDD.hpp @@ -22,9 +22,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Double derivative hydro governor and turbine. - */ + /** \brief Double derivative hydro governor and turbine. */ class GovHydroDD : public TurbineGovernorDynamics { public: @@ -32,41 +30,110 @@ namespace CIMPP GovHydroDD(); ~GovHydroDD() override; - CIMPP::PU aturb; /* Turbine numerator multiplier (Aturb) (note 3). Typical Value = -1. Default: nullptr */ - CIMPP::PU bturb; /* Turbine denominator multiplier (Bturb) (note 3). Typical Value = 0.5. Default: nullptr */ - CIMPP::Frequency db1; /* Intentional dead-band width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower db2; /* Unintentional dead-band (db2). Unit = MW. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency eps; /* Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::PU gmax; /* Maximum gate opening (Gmax). Typical Value = 0. Default: nullptr */ - CIMPP::PU gmin; /* Minimum gate opening (Gmin). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv1; /* Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv6; /* Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ - CIMPP::Boolean inputSignal; /* Input signal switch (Flag). true = Pe input is used false = feedback is received from CV. Flag is normally dependent on Tt. If Tf is zero, Flag is set to false. If Tf is not zero, Flag is set to true. Typical Value = true. Default: false */ - CIMPP::PU k1; /* Single derivative gain (K1). Typical Value = 3.6. Default: nullptr */ - CIMPP::PU k2; /* Double derivative gain (K2). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU kg; /* Gate servo gain (Kg). Typical Value = 3. Default: nullptr */ - CIMPP::PU ki; /* Integral gain (Ki). Typical Value = 1. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv6; /* Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU pmax; /* Maximum gate opening, PU of MWbase (Pmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum gate opening, PU of MWbase (Pmin). Typical Value = 0. Default: nullptr */ - CIMPP::PU r; /* Steady state droop (R). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds td; /* Input filter time constant (Td). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tf; /* Washout time constant (Tf). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tp; /* Gate servo time constant (Tp). Typical Value = 0.35. Default: nullptr */ - CIMPP::Seconds tt; /* Power feedback time constant (Tt). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds tturb; /* Turbine time constant (Tturb) (note 3). Typical Value = 0.8. Default: nullptr */ - CIMPP::Simple_Float velcl; /* Maximum gate closing velocity (Velcl). Unit = PU/sec. Typical Value = -0.14. Default: nullptr */ - CIMPP::Simple_Float velop; /* Maximum gate opening velocity (Velop). Unit = PU/sec. Typical Value = 0.09. Default: nullptr */ + /** \brief Turbine numerator multiplier (Aturb) (note 3). Typical Value = -1. Default: nullptr */ + CIMPP::PU aturb; + + /** \brief Turbine denominator multiplier (Bturb) (note 3). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU bturb; + + /** \brief Intentional dead-band width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Unintentional dead-band (db2). Unit = MW. Typical Value = 0. Default: nullptr */ + CIMPP::ActivePower db2; + + /** \brief Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency eps; + + /** \brief Maximum gate opening (Gmax). Typical Value = 0. Default: nullptr */ + CIMPP::PU gmax; + + /** \brief Minimum gate opening (Gmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU gmin; + + /** \brief Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv6; + + /** \brief Input signal switch (Flag). true = Pe input is used false = feedback is received from CV. Flag is normally dependent on Tt. If Tf is zero, Flag is set to false. If Tf is not zero, Flag is set to true. Typical Value = true. Default: false */ + CIMPP::Boolean inputSignal; + + /** \brief Single derivative gain (K1). Typical Value = 3.6. Default: nullptr */ + CIMPP::PU k1; + + /** \brief Double derivative gain (K2). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU k2; + + /** \brief Gate servo gain (Kg). Typical Value = 3. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Integral gain (Ki). Typical Value = 1. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv6; + + /** \brief Maximum gate opening, PU of MWbase (Pmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum gate opening, PU of MWbase (Pmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Steady state droop (R). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU r; + + /** \brief Input filter time constant (Td). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Washout time constant (Tf). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Gate servo time constant (Tp). Typical Value = 0.35. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Power feedback time constant (Tt). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds tt; + + /** \brief Turbine time constant (Tturb) (note 3). Typical Value = 0.8. Default: nullptr */ + CIMPP::Seconds tturb; + + /** \brief Maximum gate closing velocity (Velcl). Unit = PU/sec. Typical Value = -0.14. Default: nullptr */ + CIMPP::Simple_Float velcl; + + /** \brief Maximum gate opening velocity (Velop). Unit = PU/sec. Typical Value = 0.09. Default: nullptr */ + CIMPP::Simple_Float velop; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GovHydroFrancis.cpp b/CGMES_2.4.15_16FEB2016/GovHydroFrancis.cpp index ea80c6b88..92cca504b 100644 --- a/CGMES_2.4.15_16FEB2016/GovHydroFrancis.cpp +++ b/CGMES_2.4.15_16FEB2016/GovHydroFrancis.cpp @@ -8,38 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "Area.hpp" -#include "Area.hpp" -#include "PU.hpp" -#include "Frequency.hpp" -#include "PU.hpp" -#include "FrancisGovernorControlKind.hpp" -#include "Length.hpp" -#include "Length.hpp" -#include "Length.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "VolumeFlowRate.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Boolean.hpp" -#include "Length.hpp" using namespace CIMPP; -GovHydroFrancis::GovHydroFrancis() {}; -GovHydroFrancis::~GovHydroFrancis() {}; +GovHydroFrancis::GovHydroFrancis() {} +GovHydroFrancis::~GovHydroFrancis() {} static const std::list PossibleProfilesForClass = { @@ -92,363 +65,388 @@ GovHydroFrancis::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroFrancis_am(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_am(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->am; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_av0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_av0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->av0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_av1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_av1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->av1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_bp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_bp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_etamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_etamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->etamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_governorControl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_governorControl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->governorControl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_h1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_h1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->h1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_h2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_h2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->h2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_hn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_hn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->hn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_kt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_kt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_qc0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_qc0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qc0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_qn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_qn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_ts(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_ts(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_twnc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_twnc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->twnc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_twng(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_twng(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->twng; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_tx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_tx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_va(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_va(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->va; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_valvmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_valvmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->valvmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_valvmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_valvmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->valvmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_vc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_vc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_waterTunnelSurgeChamberSimulation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_waterTunnelSurgeChamberSimulation(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->waterTunnelSurgeChamberSimulation; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_zsfc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_zsfc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->zsfc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroFrancis_am(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->am; if (!buffer.str().empty()) @@ -462,7 +460,8 @@ bool get_GovHydroFrancis_am(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_av0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->av0; if (!buffer.str().empty()) @@ -476,7 +475,8 @@ bool get_GovHydroFrancis_av0(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_av1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->av1; if (!buffer.str().empty()) @@ -490,7 +490,8 @@ bool get_GovHydroFrancis_av1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_bp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bp; if (!buffer.str().empty()) @@ -504,7 +505,8 @@ bool get_GovHydroFrancis_bp(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -518,7 +520,8 @@ bool get_GovHydroFrancis_db1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_etamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->etamax; if (!buffer.str().empty()) @@ -530,9 +533,25 @@ bool get_GovHydroFrancis_etamax(const BaseClass* BaseClass_ptr1, std::stringstre return false; } +bool get_GovHydroFrancis_governorControl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->governorControl; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_GovHydroFrancis_h1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->h1; if (!buffer.str().empty()) @@ -546,7 +565,8 @@ bool get_GovHydroFrancis_h1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_h2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->h2; if (!buffer.str().empty()) @@ -560,7 +580,8 @@ bool get_GovHydroFrancis_h2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_hn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hn; if (!buffer.str().empty()) @@ -574,7 +595,8 @@ bool get_GovHydroFrancis_hn(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -588,7 +610,8 @@ bool get_GovHydroFrancis_kc(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -602,7 +625,8 @@ bool get_GovHydroFrancis_kg(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_kt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kt; if (!buffer.str().empty()) @@ -616,7 +640,8 @@ bool get_GovHydroFrancis_kt(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_qc0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qc0; if (!buffer.str().empty()) @@ -630,7 +655,8 @@ bool get_GovHydroFrancis_qc0(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_qn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qn; if (!buffer.str().empty()) @@ -644,7 +670,8 @@ bool get_GovHydroFrancis_qn(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -658,7 +685,8 @@ bool get_GovHydroFrancis_ta(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -672,7 +700,8 @@ bool get_GovHydroFrancis_td(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_ts(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts; if (!buffer.str().empty()) @@ -686,7 +715,8 @@ bool get_GovHydroFrancis_ts(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_twnc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twnc; if (!buffer.str().empty()) @@ -700,7 +730,8 @@ bool get_GovHydroFrancis_twnc(const BaseClass* BaseClass_ptr1, std::stringstream bool get_GovHydroFrancis_twng(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twng; if (!buffer.str().empty()) @@ -714,7 +745,8 @@ bool get_GovHydroFrancis_twng(const BaseClass* BaseClass_ptr1, std::stringstream bool get_GovHydroFrancis_tx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tx; if (!buffer.str().empty()) @@ -728,7 +760,8 @@ bool get_GovHydroFrancis_tx(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_va(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->va; if (!buffer.str().empty()) @@ -742,7 +775,8 @@ bool get_GovHydroFrancis_va(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_valvmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->valvmax; if (!buffer.str().empty()) @@ -756,7 +790,8 @@ bool get_GovHydroFrancis_valvmax(const BaseClass* BaseClass_ptr1, std::stringstr bool get_GovHydroFrancis_valvmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->valvmin; if (!buffer.str().empty()) @@ -770,7 +805,8 @@ bool get_GovHydroFrancis_valvmin(const BaseClass* BaseClass_ptr1, std::stringstr bool get_GovHydroFrancis_vc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vc; if (!buffer.str().empty()) @@ -784,7 +820,8 @@ bool get_GovHydroFrancis_vc(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_waterTunnelSurgeChamberSimulation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->waterTunnelSurgeChamberSimulation; if (!buffer.str().empty()) @@ -798,7 +835,8 @@ bool get_GovHydroFrancis_waterTunnelSurgeChamberSimulation(const BaseClass* Base bool get_GovHydroFrancis_zsfc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->zsfc; if (!buffer.str().empty()) @@ -810,22 +848,6 @@ bool get_GovHydroFrancis_zsfc(const BaseClass* BaseClass_ptr1, std::stringstream return false; } - - -bool get_GovHydroFrancis_governorControl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->governorControl; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char GovHydroFrancis::debugName[] = "GovHydroFrancis"; const char* GovHydroFrancis::debugString() const { @@ -834,38 +856,38 @@ const char* GovHydroFrancis::debugString() const void GovHydroFrancis::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroFrancis"), &GovHydroFrancis_factory)); + factory_map.emplace("cim:GovHydroFrancis", &GovHydroFrancis_factory); } void GovHydroFrancis::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.am"), &assign_GovHydroFrancis_am)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.av0"), &assign_GovHydroFrancis_av0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.av1"), &assign_GovHydroFrancis_av1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.bp"), &assign_GovHydroFrancis_bp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.db1"), &assign_GovHydroFrancis_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.etamax"), &assign_GovHydroFrancis_etamax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.governorControl"), &assign_GovHydroFrancis_governorControl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.h1"), &assign_GovHydroFrancis_h1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.h2"), &assign_GovHydroFrancis_h2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.hn"), &assign_GovHydroFrancis_hn)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.kc"), &assign_GovHydroFrancis_kc)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.kg"), &assign_GovHydroFrancis_kg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.kt"), &assign_GovHydroFrancis_kt)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.qc0"), &assign_GovHydroFrancis_qc0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.qn"), &assign_GovHydroFrancis_qn)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.ta"), &assign_GovHydroFrancis_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.td"), &assign_GovHydroFrancis_td)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.ts"), &assign_GovHydroFrancis_ts)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.twnc"), &assign_GovHydroFrancis_twnc)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.twng"), &assign_GovHydroFrancis_twng)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.tx"), &assign_GovHydroFrancis_tx)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.va"), &assign_GovHydroFrancis_va)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.valvmax"), &assign_GovHydroFrancis_valvmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.valvmin"), &assign_GovHydroFrancis_valvmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.vc"), &assign_GovHydroFrancis_vc)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.waterTunnelSurgeChamberSimulation"), &assign_GovHydroFrancis_waterTunnelSurgeChamberSimulation)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.zsfc"), &assign_GovHydroFrancis_zsfc)); + assign_map.emplace("cim:GovHydroFrancis.am", &assign_GovHydroFrancis_am); + assign_map.emplace("cim:GovHydroFrancis.av0", &assign_GovHydroFrancis_av0); + assign_map.emplace("cim:GovHydroFrancis.av1", &assign_GovHydroFrancis_av1); + assign_map.emplace("cim:GovHydroFrancis.bp", &assign_GovHydroFrancis_bp); + assign_map.emplace("cim:GovHydroFrancis.db1", &assign_GovHydroFrancis_db1); + assign_map.emplace("cim:GovHydroFrancis.etamax", &assign_GovHydroFrancis_etamax); + assign_map.emplace("cim:GovHydroFrancis.governorControl", &assign_GovHydroFrancis_governorControl); + assign_map.emplace("cim:GovHydroFrancis.h1", &assign_GovHydroFrancis_h1); + assign_map.emplace("cim:GovHydroFrancis.h2", &assign_GovHydroFrancis_h2); + assign_map.emplace("cim:GovHydroFrancis.hn", &assign_GovHydroFrancis_hn); + assign_map.emplace("cim:GovHydroFrancis.kc", &assign_GovHydroFrancis_kc); + assign_map.emplace("cim:GovHydroFrancis.kg", &assign_GovHydroFrancis_kg); + assign_map.emplace("cim:GovHydroFrancis.kt", &assign_GovHydroFrancis_kt); + assign_map.emplace("cim:GovHydroFrancis.qc0", &assign_GovHydroFrancis_qc0); + assign_map.emplace("cim:GovHydroFrancis.qn", &assign_GovHydroFrancis_qn); + assign_map.emplace("cim:GovHydroFrancis.ta", &assign_GovHydroFrancis_ta); + assign_map.emplace("cim:GovHydroFrancis.td", &assign_GovHydroFrancis_td); + assign_map.emplace("cim:GovHydroFrancis.ts", &assign_GovHydroFrancis_ts); + assign_map.emplace("cim:GovHydroFrancis.twnc", &assign_GovHydroFrancis_twnc); + assign_map.emplace("cim:GovHydroFrancis.twng", &assign_GovHydroFrancis_twng); + assign_map.emplace("cim:GovHydroFrancis.tx", &assign_GovHydroFrancis_tx); + assign_map.emplace("cim:GovHydroFrancis.va", &assign_GovHydroFrancis_va); + assign_map.emplace("cim:GovHydroFrancis.valvmax", &assign_GovHydroFrancis_valvmax); + assign_map.emplace("cim:GovHydroFrancis.valvmin", &assign_GovHydroFrancis_valvmin); + assign_map.emplace("cim:GovHydroFrancis.vc", &assign_GovHydroFrancis_vc); + assign_map.emplace("cim:GovHydroFrancis.waterTunnelSurgeChamberSimulation", &assign_GovHydroFrancis_waterTunnelSurgeChamberSimulation); + assign_map.emplace("cim:GovHydroFrancis.zsfc", &assign_GovHydroFrancis_zsfc); } void GovHydroFrancis::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/GovHydroFrancis.hpp b/CGMES_2.4.15_16FEB2016/GovHydroFrancis.hpp index 2a213b58f..a69654b37 100644 --- a/CGMES_2.4.15_16FEB2016/GovHydroFrancis.hpp +++ b/CGMES_2.4.15_16FEB2016/GovHydroFrancis.hpp @@ -25,9 +25,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Detailed hydro unit - Francis model. This model can be used to represent three types of governors. A schematic of the hydraulic system of detailed hydro unit models, like Francis and Pelton, is provided in the DetailedHydroModelHydraulicSystem diagram. - */ + /** \brief Detailed hydro unit - Francis model. This model can be used to represent three types of governors. A schematic of the hydraulic system of detailed hydro unit models, like Francis and Pelton, is provided in the DetailedHydroModelHydraulicSystem diagram. */ class GovHydroFrancis : public TurbineGovernorDynamics { public: @@ -35,33 +33,86 @@ namespace CIMPP GovHydroFrancis(); ~GovHydroFrancis() override; - CIMPP::PU am; /* Opening section S at the maximum efficiency (Am). Typical Value = 0.7. Default: nullptr */ - CIMPP::Area av0; /* Area of the surge tank (A). Unit = m. Typical Value = 30. Default: nullptr */ - CIMPP::Area av1; /* Area of the compensation tank (A). Unit = m. Typical Value = 700. Default: nullptr */ - CIMPP::PU bp; /* Droop (Bp). Typical Value = 0.05. Default: nullptr */ - CIMPP::Frequency db1; /* Intentional dead-band width (DB1). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::PU etamax; /* Maximum efficiency (EtaMax). Typical Value = 1.05. Default: nullptr */ - CIMPP::FrancisGovernorControlKind governorControl; /* Governor control flag (Cflag). Typical Value = mechanicHydrolicTachoAccelerator. Default: 0 */ - CIMPP::Length h1; /* Head of compensation chamber water level with respect to the level of penstock (H). Unit = m. Typical Value = 4. Default: nullptr */ - CIMPP::Length h2; /* Head of surge tank water level with respect to the level of penstock (H). Unit = m. Typical Value = 40. Default: nullptr */ - CIMPP::Length hn; /* Rated hydraulic head (H). Unit = m. Typical Value = 250. Default: nullptr */ - CIMPP::PU kc; /* Penstock loss coefficient (due to friction) (Kc). Typical Value = 0.025. Default: nullptr */ - CIMPP::PU kg; /* Water tunnel and surge chamber loss coefficient (due to friction) (Kg). Typical Value = 0.025. Default: nullptr */ - CIMPP::PU kt; /* Washout gain (Kt). Typical Value = 0.25. Default: nullptr */ - CIMPP::PU qc0; /* No-load turbine flow at nominal head (Qc0). Typical Value = 0.21. Default: nullptr */ - CIMPP::VolumeFlowRate qn; /* Rated flow (Q). Unit = m/s. Typical Value = 40. Default: nullptr */ - CIMPP::Seconds ta; /* Derivative gain (Ta). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds td; /* Washout time constant (Td). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds ts; /* Gate servo time constant (Ts). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds twnc; /* Water inertia time constant (Twnc). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds twng; /* Water tunnel and surge chamber inertia time constant (Twng). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds tx; /* Derivative feedback gain (Tx). Typical Value = 1. Default: nullptr */ - CIMPP::Simple_Float va; /* Maximum gate opening velocity (Va). Unit = PU/sec. Typical Value = 0.011. Default: nullptr */ - CIMPP::PU valvmax; /* Maximum gate opening (ValvMax). Typical Value = 1. Default: nullptr */ - CIMPP::PU valvmin; /* Minimum gate opening (ValvMin). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float vc; /* Maximum gate closing velocity (Vc). Unit = PU/sec. Typical Value = -0.011. Default: nullptr */ - CIMPP::Boolean waterTunnelSurgeChamberSimulation; /* Water tunnel and surge chamber simulation (Tflag). true = enable of water tunnel and surge chamber simulation false = inhibit of water tunnel and surge chamber simulation. Typical Value = false. Default: false */ - CIMPP::Length zsfc; /* Head of upper water level with respect to the level of penstock (Zsfc). Unit = m. Typical Value = 25. Default: nullptr */ + /** \brief Opening section S at the maximum efficiency (Am). Typical Value = 0.7. Default: nullptr */ + CIMPP::PU am; + + /** \brief Area of the surge tank (A). Unit = m. Typical Value = 30. Default: nullptr */ + CIMPP::Area av0; + + /** \brief Area of the compensation tank (A). Unit = m. Typical Value = 700. Default: nullptr */ + CIMPP::Area av1; + + /** \brief Droop (Bp). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU bp; + + /** \brief Intentional dead-band width (DB1). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Maximum efficiency (EtaMax). Typical Value = 1.05. Default: nullptr */ + CIMPP::PU etamax; + + /** \brief Governor control flag (Cflag). Typical Value = mechanicHydrolicTachoAccelerator. Default: 0 */ + CIMPP::FrancisGovernorControlKind governorControl; + + /** \brief Head of compensation chamber water level with respect to the level of penstock (H). Unit = m. Typical Value = 4. Default: nullptr */ + CIMPP::Length h1; + + /** \brief Head of surge tank water level with respect to the level of penstock (H). Unit = m. Typical Value = 40. Default: nullptr */ + CIMPP::Length h2; + + /** \brief Rated hydraulic head (H). Unit = m. Typical Value = 250. Default: nullptr */ + CIMPP::Length hn; + + /** \brief Penstock loss coefficient (due to friction) (Kc). Typical Value = 0.025. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Water tunnel and surge chamber loss coefficient (due to friction) (Kg). Typical Value = 0.025. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Washout gain (Kt). Typical Value = 0.25. Default: nullptr */ + CIMPP::PU kt; + + /** \brief No-load turbine flow at nominal head (Qc0). Typical Value = 0.21. Default: nullptr */ + CIMPP::PU qc0; + + /** \brief Rated flow (Q). Unit = m/s. Typical Value = 40. Default: nullptr */ + CIMPP::VolumeFlowRate qn; + + /** \brief Derivative gain (Ta). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Washout time constant (Td). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Gate servo time constant (Ts). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds ts; + + /** \brief Water inertia time constant (Twnc). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds twnc; + + /** \brief Water tunnel and surge chamber inertia time constant (Twng). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds twng; + + /** \brief Derivative feedback gain (Tx). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tx; + + /** \brief Maximum gate opening velocity (Va). Unit = PU/sec. Typical Value = 0.011. Default: nullptr */ + CIMPP::Simple_Float va; + + /** \brief Maximum gate opening (ValvMax). Typical Value = 1. Default: nullptr */ + CIMPP::PU valvmax; + + /** \brief Minimum gate opening (ValvMin). Typical Value = 0. Default: nullptr */ + CIMPP::PU valvmin; + + /** \brief Maximum gate closing velocity (Vc). Unit = PU/sec. Typical Value = -0.011. Default: nullptr */ + CIMPP::Simple_Float vc; + + /** \brief Water tunnel and surge chamber simulation (Tflag). true = enable of water tunnel and surge chamber simulation false = inhibit of water tunnel and surge chamber simulation. Typical Value = false. Default: false */ + CIMPP::Boolean waterTunnelSurgeChamberSimulation; + + /** \brief Head of upper water level with respect to the level of penstock (Zsfc). Unit = m. Typical Value = 25. Default: nullptr */ + CIMPP::Length zsfc; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GovHydroIEEE0.cpp b/CGMES_2.4.15_16FEB2016/GovHydroIEEE0.cpp index 1d00646d8..7038d0233 100644 --- a/CGMES_2.4.15_16FEB2016/GovHydroIEEE0.cpp +++ b/CGMES_2.4.15_16FEB2016/GovHydroIEEE0.cpp @@ -8,19 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -GovHydroIEEE0::GovHydroIEEE0() {}; -GovHydroIEEE0::~GovHydroIEEE0() {}; +GovHydroIEEE0::GovHydroIEEE0() {} +GovHydroIEEE0::~GovHydroIEEE0() {} static const std::list PossibleProfilesForClass = { @@ -54,116 +46,122 @@ GovHydroIEEE0::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroIEEE0_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE0_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE0_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE0_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE0_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE0_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE0_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE0_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE0_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE0_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE0_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE0_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE0_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE0_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE0_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE0_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroIEEE0_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -177,7 +175,8 @@ bool get_GovHydroIEEE0_k(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroIEEE0_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -191,7 +190,8 @@ bool get_GovHydroIEEE0_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream bool get_GovHydroIEEE0_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -205,7 +205,8 @@ bool get_GovHydroIEEE0_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE0_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -219,7 +220,8 @@ bool get_GovHydroIEEE0_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE0_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -233,7 +235,8 @@ bool get_GovHydroIEEE0_t1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroIEEE0_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -247,7 +250,8 @@ bool get_GovHydroIEEE0_t2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroIEEE0_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -261,7 +265,8 @@ bool get_GovHydroIEEE0_t3(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroIEEE0_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -273,8 +278,6 @@ bool get_GovHydroIEEE0_t4(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char GovHydroIEEE0::debugName[] = "GovHydroIEEE0"; const char* GovHydroIEEE0::debugString() const { @@ -283,19 +286,19 @@ const char* GovHydroIEEE0::debugString() const void GovHydroIEEE0::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroIEEE0"), &GovHydroIEEE0_factory)); + factory_map.emplace("cim:GovHydroIEEE0", &GovHydroIEEE0_factory); } void GovHydroIEEE0::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE0.k"), &assign_GovHydroIEEE0_k)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE0.mwbase"), &assign_GovHydroIEEE0_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE0.pmax"), &assign_GovHydroIEEE0_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE0.pmin"), &assign_GovHydroIEEE0_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE0.t1"), &assign_GovHydroIEEE0_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE0.t2"), &assign_GovHydroIEEE0_t2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE0.t3"), &assign_GovHydroIEEE0_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE0.t4"), &assign_GovHydroIEEE0_t4)); + assign_map.emplace("cim:GovHydroIEEE0.k", &assign_GovHydroIEEE0_k); + assign_map.emplace("cim:GovHydroIEEE0.mwbase", &assign_GovHydroIEEE0_mwbase); + assign_map.emplace("cim:GovHydroIEEE0.pmax", &assign_GovHydroIEEE0_pmax); + assign_map.emplace("cim:GovHydroIEEE0.pmin", &assign_GovHydroIEEE0_pmin); + assign_map.emplace("cim:GovHydroIEEE0.t1", &assign_GovHydroIEEE0_t1); + assign_map.emplace("cim:GovHydroIEEE0.t2", &assign_GovHydroIEEE0_t2); + assign_map.emplace("cim:GovHydroIEEE0.t3", &assign_GovHydroIEEE0_t3); + assign_map.emplace("cim:GovHydroIEEE0.t4", &assign_GovHydroIEEE0_t4); } void GovHydroIEEE0::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/GovHydroIEEE0.hpp b/CGMES_2.4.15_16FEB2016/GovHydroIEEE0.hpp index aafbd9a2a..715982cd2 100644 --- a/CGMES_2.4.15_16FEB2016/GovHydroIEEE0.hpp +++ b/CGMES_2.4.15_16FEB2016/GovHydroIEEE0.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE Simplified Hydro Governor-Turbine Model. Used for Mechanical-Hydraulic and Electro-Hydraulic turbine governors, with our without steam feedback. Typical values given are for Mechanical-Hydraulic. Ref - */ + /** \brief IEEE Simplified Hydro Governor-Turbine Model. Used for Mechanical-Hydraulic and Electro-Hydraulic turbine governors, with our without steam feedback. Typical values given are for Mechanical-Hydraulic. Ref */ class GovHydroIEEE0 : public TurbineGovernorDynamics { public: @@ -29,14 +27,29 @@ namespace CIMPP GovHydroIEEE0(); ~GovHydroIEEE0() override; - CIMPP::PU k; /* Governor gain (K. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ - CIMPP::PU pmax; /* Gate maximum (Pmax). Default: nullptr */ - CIMPP::PU pmin; /* Gate minimum (Pmin). Default: nullptr */ - CIMPP::Seconds t1; /* Governor lag time constant (T1). Typical Value = 0.25. Default: nullptr */ - CIMPP::Seconds t2; /* Governor lead time constant (T2. Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t3; /* Gate actuator time constant (T3). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t4; /* Water starting time (T4). Default: nullptr */ + /** \brief Governor gain (K. Default: nullptr */ + CIMPP::PU k; + + /** \brief Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Gate maximum (Pmax). Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Gate minimum (Pmin). Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Governor lag time constant (T1). Typical Value = 0.25. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Governor lead time constant (T2. Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Gate actuator time constant (T3). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Water starting time (T4). Default: nullptr */ + CIMPP::Seconds t4; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GovHydroIEEE2.cpp b/CGMES_2.4.15_16FEB2016/GovHydroIEEE2.cpp index 09445cf65..abbf5cf5e 100644 --- a/CGMES_2.4.15_16FEB2016/GovHydroIEEE2.cpp +++ b/CGMES_2.4.15_16FEB2016/GovHydroIEEE2.cpp @@ -8,37 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -GovHydroIEEE2::GovHydroIEEE2() {}; -GovHydroIEEE2::~GovHydroIEEE2() {}; +GovHydroIEEE2::GovHydroIEEE2() {} +GovHydroIEEE2::~GovHydroIEEE2() {} static const std::list PossibleProfilesForClass = { @@ -90,350 +64,374 @@ GovHydroIEEE2::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroIEEE2_aturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_aturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->aturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_bturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_bturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_gv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_kturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_kturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_pgv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_rperm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_rperm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rperm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_rtemp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_rtemp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rtemp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_uc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_uo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_uo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroIEEE2_aturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->aturb; if (!buffer.str().empty()) @@ -447,7 +445,8 @@ bool get_GovHydroIEEE2_aturb(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_bturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bturb; if (!buffer.str().empty()) @@ -461,7 +460,8 @@ bool get_GovHydroIEEE2_bturb(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -475,7 +475,8 @@ bool get_GovHydroIEEE2_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroIEEE2_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -489,7 +490,8 @@ bool get_GovHydroIEEE2_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroIEEE2_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -503,7 +505,8 @@ bool get_GovHydroIEEE2_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroIEEE2_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -517,7 +520,8 @@ bool get_GovHydroIEEE2_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroIEEE2_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -531,7 +535,8 @@ bool get_GovHydroIEEE2_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroIEEE2_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv6; if (!buffer.str().empty()) @@ -545,7 +550,8 @@ bool get_GovHydroIEEE2_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroIEEE2_kturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kturb; if (!buffer.str().empty()) @@ -559,7 +565,8 @@ bool get_GovHydroIEEE2_kturb(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -573,7 +580,8 @@ bool get_GovHydroIEEE2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream bool get_GovHydroIEEE2_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -587,7 +595,8 @@ bool get_GovHydroIEEE2_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -601,7 +610,8 @@ bool get_GovHydroIEEE2_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -615,7 +625,8 @@ bool get_GovHydroIEEE2_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -629,7 +640,8 @@ bool get_GovHydroIEEE2_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -643,7 +655,8 @@ bool get_GovHydroIEEE2_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv6; if (!buffer.str().empty()) @@ -657,7 +670,8 @@ bool get_GovHydroIEEE2_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -671,7 +685,8 @@ bool get_GovHydroIEEE2_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -685,7 +700,8 @@ bool get_GovHydroIEEE2_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rperm; if (!buffer.str().empty()) @@ -699,7 +715,8 @@ bool get_GovHydroIEEE2_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_rtemp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rtemp; if (!buffer.str().empty()) @@ -713,7 +730,8 @@ bool get_GovHydroIEEE2_rtemp(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -727,7 +745,8 @@ bool get_GovHydroIEEE2_tg(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroIEEE2_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -741,7 +760,8 @@ bool get_GovHydroIEEE2_tp(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroIEEE2_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -755,7 +775,8 @@ bool get_GovHydroIEEE2_tr(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroIEEE2_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -769,7 +790,8 @@ bool get_GovHydroIEEE2_tw(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroIEEE2_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uc; if (!buffer.str().empty()) @@ -783,7 +805,8 @@ bool get_GovHydroIEEE2_uc(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroIEEE2_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uo; if (!buffer.str().empty()) @@ -795,8 +818,6 @@ bool get_GovHydroIEEE2_uo(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char GovHydroIEEE2::debugName[] = "GovHydroIEEE2"; const char* GovHydroIEEE2::debugString() const { @@ -805,37 +826,37 @@ const char* GovHydroIEEE2::debugString() const void GovHydroIEEE2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2"), &GovHydroIEEE2_factory)); + factory_map.emplace("cim:GovHydroIEEE2", &GovHydroIEEE2_factory); } void GovHydroIEEE2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.aturb"), &assign_GovHydroIEEE2_aturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.bturb"), &assign_GovHydroIEEE2_bturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.gv1"), &assign_GovHydroIEEE2_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.gv2"), &assign_GovHydroIEEE2_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.gv3"), &assign_GovHydroIEEE2_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.gv4"), &assign_GovHydroIEEE2_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.gv5"), &assign_GovHydroIEEE2_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.gv6"), &assign_GovHydroIEEE2_gv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.kturb"), &assign_GovHydroIEEE2_kturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.mwbase"), &assign_GovHydroIEEE2_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.pgv1"), &assign_GovHydroIEEE2_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.pgv2"), &assign_GovHydroIEEE2_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.pgv3"), &assign_GovHydroIEEE2_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.pgv4"), &assign_GovHydroIEEE2_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.pgv5"), &assign_GovHydroIEEE2_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.pgv6"), &assign_GovHydroIEEE2_pgv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.pmax"), &assign_GovHydroIEEE2_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.pmin"), &assign_GovHydroIEEE2_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.rperm"), &assign_GovHydroIEEE2_rperm)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.rtemp"), &assign_GovHydroIEEE2_rtemp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.tg"), &assign_GovHydroIEEE2_tg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.tp"), &assign_GovHydroIEEE2_tp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.tr"), &assign_GovHydroIEEE2_tr)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.tw"), &assign_GovHydroIEEE2_tw)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.uc"), &assign_GovHydroIEEE2_uc)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.uo"), &assign_GovHydroIEEE2_uo)); + assign_map.emplace("cim:GovHydroIEEE2.aturb", &assign_GovHydroIEEE2_aturb); + assign_map.emplace("cim:GovHydroIEEE2.bturb", &assign_GovHydroIEEE2_bturb); + assign_map.emplace("cim:GovHydroIEEE2.gv1", &assign_GovHydroIEEE2_gv1); + assign_map.emplace("cim:GovHydroIEEE2.gv2", &assign_GovHydroIEEE2_gv2); + assign_map.emplace("cim:GovHydroIEEE2.gv3", &assign_GovHydroIEEE2_gv3); + assign_map.emplace("cim:GovHydroIEEE2.gv4", &assign_GovHydroIEEE2_gv4); + assign_map.emplace("cim:GovHydroIEEE2.gv5", &assign_GovHydroIEEE2_gv5); + assign_map.emplace("cim:GovHydroIEEE2.gv6", &assign_GovHydroIEEE2_gv6); + assign_map.emplace("cim:GovHydroIEEE2.kturb", &assign_GovHydroIEEE2_kturb); + assign_map.emplace("cim:GovHydroIEEE2.mwbase", &assign_GovHydroIEEE2_mwbase); + assign_map.emplace("cim:GovHydroIEEE2.pgv1", &assign_GovHydroIEEE2_pgv1); + assign_map.emplace("cim:GovHydroIEEE2.pgv2", &assign_GovHydroIEEE2_pgv2); + assign_map.emplace("cim:GovHydroIEEE2.pgv3", &assign_GovHydroIEEE2_pgv3); + assign_map.emplace("cim:GovHydroIEEE2.pgv4", &assign_GovHydroIEEE2_pgv4); + assign_map.emplace("cim:GovHydroIEEE2.pgv5", &assign_GovHydroIEEE2_pgv5); + assign_map.emplace("cim:GovHydroIEEE2.pgv6", &assign_GovHydroIEEE2_pgv6); + assign_map.emplace("cim:GovHydroIEEE2.pmax", &assign_GovHydroIEEE2_pmax); + assign_map.emplace("cim:GovHydroIEEE2.pmin", &assign_GovHydroIEEE2_pmin); + assign_map.emplace("cim:GovHydroIEEE2.rperm", &assign_GovHydroIEEE2_rperm); + assign_map.emplace("cim:GovHydroIEEE2.rtemp", &assign_GovHydroIEEE2_rtemp); + assign_map.emplace("cim:GovHydroIEEE2.tg", &assign_GovHydroIEEE2_tg); + assign_map.emplace("cim:GovHydroIEEE2.tp", &assign_GovHydroIEEE2_tp); + assign_map.emplace("cim:GovHydroIEEE2.tr", &assign_GovHydroIEEE2_tr); + assign_map.emplace("cim:GovHydroIEEE2.tw", &assign_GovHydroIEEE2_tw); + assign_map.emplace("cim:GovHydroIEEE2.uc", &assign_GovHydroIEEE2_uc); + assign_map.emplace("cim:GovHydroIEEE2.uo", &assign_GovHydroIEEE2_uo); } void GovHydroIEEE2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/GovHydroIEEE2.hpp b/CGMES_2.4.15_16FEB2016/GovHydroIEEE2.hpp index 579366ede..33d231831 100644 --- a/CGMES_2.4.15_16FEB2016/GovHydroIEEE2.hpp +++ b/CGMES_2.4.15_16FEB2016/GovHydroIEEE2.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE hydro turbine governor model represents plants with straightforward penstock configurations and hydraulic-dashpot governors. Ref - */ + /** \brief IEEE hydro turbine governor model represents plants with straightforward penstock configurations and hydraulic-dashpot governors. Ref */ class GovHydroIEEE2 : public TurbineGovernorDynamics { public: @@ -30,32 +28,83 @@ namespace CIMPP GovHydroIEEE2(); ~GovHydroIEEE2() override; - CIMPP::PU aturb; /* Turbine numerator multiplier (Aturb). Typical Value = -1. Default: nullptr */ - CIMPP::PU bturb; /* Turbine denominator multiplier (Bturb). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU gv1; /* Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv6; /* Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU kturb; /* Turbine gain (Kturb). Typical Value = 1. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv6; /* Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU pmax; /* Maximum gate opening (Pmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum gate opening (Pmin). Typical Value = 0. Default: nullptr */ - CIMPP::PU rperm; /* Permanent droop (Rperm). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU rtemp; /* Temporary droop (Rtemp). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tg; /* Gate servo time constant (Tg). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tp; /* Pilot servo valve time constant (Tp). Typical Value = 0.03. Default: nullptr */ - CIMPP::Seconds tr; /* Dashpot time constant (Tr). Typical Value = 12. Default: nullptr */ - CIMPP::Seconds tw; /* Water inertia time constant (Tw). Typical Value = 2. Default: nullptr */ - CIMPP::Simple_Float uc; /* Maximum gate closing velocity (Uc) (<0). Typical Value = -0.1. Default: nullptr */ - CIMPP::Simple_Float uo; /* Maximum gate opening velocity (Uo). Unit = PU/sec. Typical Value = 0.1. Default: nullptr */ + /** \brief Turbine numerator multiplier (Aturb). Typical Value = -1. Default: nullptr */ + CIMPP::PU aturb; + + /** \brief Turbine denominator multiplier (Bturb). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU bturb; + + /** \brief Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv6; + + /** \brief Turbine gain (Kturb). Typical Value = 1. Default: nullptr */ + CIMPP::PU kturb; + + /** \brief Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv6; + + /** \brief Maximum gate opening (Pmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum gate opening (Pmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Permanent droop (Rperm). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU rperm; + + /** \brief Temporary droop (Rtemp). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU rtemp; + + /** \brief Gate servo time constant (Tg). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Pilot servo valve time constant (Tp). Typical Value = 0.03. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Dashpot time constant (Tr). Typical Value = 12. Default: nullptr */ + CIMPP::Seconds tr; + + /** \brief Water inertia time constant (Tw). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds tw; + + /** \brief Maximum gate closing velocity (Uc) (<0). Typical Value = -0.1. Default: nullptr */ + CIMPP::Simple_Float uc; + + /** \brief Maximum gate opening velocity (Uo). Unit = PU/sec. Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float uo; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GovHydroPID.cpp b/CGMES_2.4.15_16FEB2016/GovHydroPID.cpp index 776008c7f..45136a44f 100644 --- a/CGMES_2.4.15_16FEB2016/GovHydroPID.cpp +++ b/CGMES_2.4.15_16FEB2016/GovHydroPID.cpp @@ -8,44 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Frequency.hpp" -#include "ActivePower.hpp" -#include "Frequency.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -GovHydroPID::GovHydroPID() {}; -GovHydroPID::~GovHydroPID() {}; +GovHydroPID::GovHydroPID() {} +GovHydroPID::~GovHydroPID() {} static const std::list PossibleProfilesForClass = { @@ -104,441 +71,472 @@ GovHydroPID::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroPID_aturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_aturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->aturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_bturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_bturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_eps(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eps; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_gv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_inputSignal(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_inputSignal(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_pgv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_tt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_tturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_tturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_velcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_velcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velcl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_velop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_velop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroPID_aturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->aturb; if (!buffer.str().empty()) @@ -552,7 +550,8 @@ bool get_GovHydroPID_aturb(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPID_bturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bturb; if (!buffer.str().empty()) @@ -566,7 +565,8 @@ bool get_GovHydroPID_bturb(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPID_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -580,7 +580,8 @@ bool get_GovHydroPID_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -594,7 +595,8 @@ bool get_GovHydroPID_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eps; if (!buffer.str().empty()) @@ -608,7 +610,8 @@ bool get_GovHydroPID_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -622,7 +625,8 @@ bool get_GovHydroPID_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -636,7 +640,8 @@ bool get_GovHydroPID_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -650,7 +655,8 @@ bool get_GovHydroPID_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -664,7 +670,8 @@ bool get_GovHydroPID_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -678,7 +685,8 @@ bool get_GovHydroPID_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv6; if (!buffer.str().empty()) @@ -692,7 +700,8 @@ bool get_GovHydroPID_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID_inputSignal(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inputSignal; if (!buffer.str().empty()) @@ -706,7 +715,8 @@ bool get_GovHydroPID_inputSignal(const BaseClass* BaseClass_ptr1, std::stringstr bool get_GovHydroPID_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -720,7 +730,8 @@ bool get_GovHydroPID_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroPID_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -734,7 +745,8 @@ bool get_GovHydroPID_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroPID_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -748,7 +760,8 @@ bool get_GovHydroPID_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroPID_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -762,7 +775,8 @@ bool get_GovHydroPID_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroPID_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -776,7 +790,8 @@ bool get_GovHydroPID_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPID_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -790,7 +805,8 @@ bool get_GovHydroPID_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroPID_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -804,7 +820,8 @@ bool get_GovHydroPID_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroPID_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -818,7 +835,8 @@ bool get_GovHydroPID_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroPID_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -832,7 +850,8 @@ bool get_GovHydroPID_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroPID_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -846,7 +865,8 @@ bool get_GovHydroPID_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroPID_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv6; if (!buffer.str().empty()) @@ -860,7 +880,8 @@ bool get_GovHydroPID_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroPID_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -874,7 +895,8 @@ bool get_GovHydroPID_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroPID_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -888,7 +910,8 @@ bool get_GovHydroPID_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroPID_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -902,7 +925,8 @@ bool get_GovHydroPID_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroPID_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -916,7 +940,8 @@ bool get_GovHydroPID_td(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroPID_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -930,7 +955,8 @@ bool get_GovHydroPID_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroPID_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -944,7 +970,8 @@ bool get_GovHydroPID_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroPID_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tt; if (!buffer.str().empty()) @@ -958,7 +985,8 @@ bool get_GovHydroPID_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroPID_tturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tturb; if (!buffer.str().empty()) @@ -972,7 +1000,8 @@ bool get_GovHydroPID_tturb(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPID_velcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velcl; if (!buffer.str().empty()) @@ -986,7 +1015,8 @@ bool get_GovHydroPID_velcl(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPID_velop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velop; if (!buffer.str().empty()) @@ -998,8 +1028,6 @@ bool get_GovHydroPID_velop(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char GovHydroPID::debugName[] = "GovHydroPID"; const char* GovHydroPID::debugString() const { @@ -1008,44 +1036,44 @@ const char* GovHydroPID::debugString() const void GovHydroPID::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroPID"), &GovHydroPID_factory)); + factory_map.emplace("cim:GovHydroPID", &GovHydroPID_factory); } void GovHydroPID::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.aturb"), &assign_GovHydroPID_aturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.bturb"), &assign_GovHydroPID_bturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.db1"), &assign_GovHydroPID_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.db2"), &assign_GovHydroPID_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.eps"), &assign_GovHydroPID_eps)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.gv1"), &assign_GovHydroPID_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.gv2"), &assign_GovHydroPID_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.gv3"), &assign_GovHydroPID_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.gv4"), &assign_GovHydroPID_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.gv5"), &assign_GovHydroPID_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.gv6"), &assign_GovHydroPID_gv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.inputSignal"), &assign_GovHydroPID_inputSignal)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.kd"), &assign_GovHydroPID_kd)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.kg"), &assign_GovHydroPID_kg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.ki"), &assign_GovHydroPID_ki)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.kp"), &assign_GovHydroPID_kp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.mwbase"), &assign_GovHydroPID_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.pgv1"), &assign_GovHydroPID_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.pgv2"), &assign_GovHydroPID_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.pgv3"), &assign_GovHydroPID_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.pgv4"), &assign_GovHydroPID_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.pgv5"), &assign_GovHydroPID_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.pgv6"), &assign_GovHydroPID_pgv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.pmax"), &assign_GovHydroPID_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.pmin"), &assign_GovHydroPID_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.r"), &assign_GovHydroPID_r)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.td"), &assign_GovHydroPID_td)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.tf"), &assign_GovHydroPID_tf)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.tp"), &assign_GovHydroPID_tp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.tt"), &assign_GovHydroPID_tt)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.tturb"), &assign_GovHydroPID_tturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.velcl"), &assign_GovHydroPID_velcl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.velop"), &assign_GovHydroPID_velop)); + assign_map.emplace("cim:GovHydroPID.aturb", &assign_GovHydroPID_aturb); + assign_map.emplace("cim:GovHydroPID.bturb", &assign_GovHydroPID_bturb); + assign_map.emplace("cim:GovHydroPID.db1", &assign_GovHydroPID_db1); + assign_map.emplace("cim:GovHydroPID.db2", &assign_GovHydroPID_db2); + assign_map.emplace("cim:GovHydroPID.eps", &assign_GovHydroPID_eps); + assign_map.emplace("cim:GovHydroPID.gv1", &assign_GovHydroPID_gv1); + assign_map.emplace("cim:GovHydroPID.gv2", &assign_GovHydroPID_gv2); + assign_map.emplace("cim:GovHydroPID.gv3", &assign_GovHydroPID_gv3); + assign_map.emplace("cim:GovHydroPID.gv4", &assign_GovHydroPID_gv4); + assign_map.emplace("cim:GovHydroPID.gv5", &assign_GovHydroPID_gv5); + assign_map.emplace("cim:GovHydroPID.gv6", &assign_GovHydroPID_gv6); + assign_map.emplace("cim:GovHydroPID.inputSignal", &assign_GovHydroPID_inputSignal); + assign_map.emplace("cim:GovHydroPID.kd", &assign_GovHydroPID_kd); + assign_map.emplace("cim:GovHydroPID.kg", &assign_GovHydroPID_kg); + assign_map.emplace("cim:GovHydroPID.ki", &assign_GovHydroPID_ki); + assign_map.emplace("cim:GovHydroPID.kp", &assign_GovHydroPID_kp); + assign_map.emplace("cim:GovHydroPID.mwbase", &assign_GovHydroPID_mwbase); + assign_map.emplace("cim:GovHydroPID.pgv1", &assign_GovHydroPID_pgv1); + assign_map.emplace("cim:GovHydroPID.pgv2", &assign_GovHydroPID_pgv2); + assign_map.emplace("cim:GovHydroPID.pgv3", &assign_GovHydroPID_pgv3); + assign_map.emplace("cim:GovHydroPID.pgv4", &assign_GovHydroPID_pgv4); + assign_map.emplace("cim:GovHydroPID.pgv5", &assign_GovHydroPID_pgv5); + assign_map.emplace("cim:GovHydroPID.pgv6", &assign_GovHydroPID_pgv6); + assign_map.emplace("cim:GovHydroPID.pmax", &assign_GovHydroPID_pmax); + assign_map.emplace("cim:GovHydroPID.pmin", &assign_GovHydroPID_pmin); + assign_map.emplace("cim:GovHydroPID.r", &assign_GovHydroPID_r); + assign_map.emplace("cim:GovHydroPID.td", &assign_GovHydroPID_td); + assign_map.emplace("cim:GovHydroPID.tf", &assign_GovHydroPID_tf); + assign_map.emplace("cim:GovHydroPID.tp", &assign_GovHydroPID_tp); + assign_map.emplace("cim:GovHydroPID.tt", &assign_GovHydroPID_tt); + assign_map.emplace("cim:GovHydroPID.tturb", &assign_GovHydroPID_tturb); + assign_map.emplace("cim:GovHydroPID.velcl", &assign_GovHydroPID_velcl); + assign_map.emplace("cim:GovHydroPID.velop", &assign_GovHydroPID_velop); } void GovHydroPID::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/GovHydroPID.hpp b/CGMES_2.4.15_16FEB2016/GovHydroPID.hpp index f39106205..2d69e696b 100644 --- a/CGMES_2.4.15_16FEB2016/GovHydroPID.hpp +++ b/CGMES_2.4.15_16FEB2016/GovHydroPID.hpp @@ -22,9 +22,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - PID governor and turbine. - */ + /** \brief PID governor and turbine. */ class GovHydroPID : public TurbineGovernorDynamics { public: @@ -32,39 +30,104 @@ namespace CIMPP GovHydroPID(); ~GovHydroPID() override; - CIMPP::PU aturb; /* Turbine numerator multiplier (Aturb) (note 3). Typical Value -1. Default: nullptr */ - CIMPP::PU bturb; /* Turbine denominator multiplier (Bturb) (note 3). Typical Value = 0.5. Default: nullptr */ - CIMPP::Frequency db1; /* Intentional dead-band width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower db2; /* Unintentional dead-band (db2). Unit = MW. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency eps; /* Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::PU gv1; /* Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv6; /* Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ - CIMPP::Boolean inputSignal; /* Input signal switch (Flag). true = Pe input is used false = feedback is received from CV. Flag is normally dependent on Tt. If Tf is zero, Flag is set to false. If Tf is not zero, Flag is set to true. Typical Value = true. Default: false */ - CIMPP::PU kd; /* Derivative gain (Kd). Typical Value = 1.11. Default: nullptr */ - CIMPP::PU kg; /* Gate servo gain (Kg). Typical Value = 2.5. Default: nullptr */ - CIMPP::PU ki; /* Integral gain (Ki). Typical Value = 0.36. Default: nullptr */ - CIMPP::PU kp; /* Proportional gain (Kp). Typical Value = 0.1. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv6; /* Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU pmax; /* Maximum gate opening, PU of MWbase (Pmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum gate opening, PU of MWbase (Pmin). Typical Value = 0. Default: nullptr */ - CIMPP::PU r; /* Steady state droop (R). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds td; /* Input filter time constant (Td). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tf; /* Washout time constant (Tf). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tp; /* Gate servo time constant (Tp). Typical Value = 0.35. Default: nullptr */ - CIMPP::Seconds tt; /* Power feedback time constant (Tt). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds tturb; /* Turbine time constant (Tturb) (note 3). Typical Value = 0.8. Default: nullptr */ - CIMPP::Simple_Float velcl; /* Maximum gate closing velocity (Velcl). Unit = PU/sec. Typical Value = -0.14. Default: nullptr */ - CIMPP::Simple_Float velop; /* Maximum gate opening velocity (Velop). Unit = PU/sec. Typical Value = 0.09. Default: nullptr */ + /** \brief Turbine numerator multiplier (Aturb) (note 3). Typical Value -1. Default: nullptr */ + CIMPP::PU aturb; + + /** \brief Turbine denominator multiplier (Bturb) (note 3). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU bturb; + + /** \brief Intentional dead-band width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Unintentional dead-band (db2). Unit = MW. Typical Value = 0. Default: nullptr */ + CIMPP::ActivePower db2; + + /** \brief Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency eps; + + /** \brief Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv6; + + /** \brief Input signal switch (Flag). true = Pe input is used false = feedback is received from CV. Flag is normally dependent on Tt. If Tf is zero, Flag is set to false. If Tf is not zero, Flag is set to true. Typical Value = true. Default: false */ + CIMPP::Boolean inputSignal; + + /** \brief Derivative gain (Kd). Typical Value = 1.11. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Gate servo gain (Kg). Typical Value = 2.5. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Integral gain (Ki). Typical Value = 0.36. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Proportional gain (Kp). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv6; + + /** \brief Maximum gate opening, PU of MWbase (Pmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum gate opening, PU of MWbase (Pmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Steady state droop (R). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU r; + + /** \brief Input filter time constant (Td). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Washout time constant (Tf). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Gate servo time constant (Tp). Typical Value = 0.35. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Power feedback time constant (Tt). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds tt; + + /** \brief Turbine time constant (Tturb) (note 3). Typical Value = 0.8. Default: nullptr */ + CIMPP::Seconds tturb; + + /** \brief Maximum gate closing velocity (Velcl). Unit = PU/sec. Typical Value = -0.14. Default: nullptr */ + CIMPP::Simple_Float velcl; + + /** \brief Maximum gate opening velocity (Velop). Unit = PU/sec. Typical Value = 0.09. Default: nullptr */ + CIMPP::Simple_Float velop; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GovHydroPID2.cpp b/CGMES_2.4.15_16FEB2016/GovHydroPID2.cpp index bbbbf968f..59654db7b 100644 --- a/CGMES_2.4.15_16FEB2016/GovHydroPID2.cpp +++ b/CGMES_2.4.15_16FEB2016/GovHydroPID2.cpp @@ -8,33 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -GovHydroPID2::GovHydroPID2() {}; -GovHydroPID2::~GovHydroPID2() {}; +GovHydroPID2::GovHydroPID2() {} +GovHydroPID2::~GovHydroPID2() {} static const std::list PossibleProfilesForClass = { @@ -82,298 +60,318 @@ GovHydroPID2::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroPID2_atw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_atw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->atw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_d(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->d; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_feedbackSignal(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_feedbackSignal(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->feedbackSignal; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_g0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_g0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_g1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_g1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_g2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_g2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_gmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_gmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_gmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_gmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_p1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_p1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_p2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_p2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_p3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_p3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_rperm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_rperm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rperm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_treg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_treg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->treg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_velmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_velmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_velmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_velmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroPID2_atw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->atw; if (!buffer.str().empty()) @@ -387,7 +385,8 @@ bool get_GovHydroPID2_atw(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroPID2_d(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->d; if (!buffer.str().empty()) @@ -401,7 +400,8 @@ bool get_GovHydroPID2_d(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroPID2_feedbackSignal(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->feedbackSignal; if (!buffer.str().empty()) @@ -415,7 +415,8 @@ bool get_GovHydroPID2_feedbackSignal(const BaseClass* BaseClass_ptr1, std::strin bool get_GovHydroPID2_g0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g0; if (!buffer.str().empty()) @@ -429,7 +430,8 @@ bool get_GovHydroPID2_g0(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_g1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g1; if (!buffer.str().empty()) @@ -443,7 +445,8 @@ bool get_GovHydroPID2_g1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_g2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g2; if (!buffer.str().empty()) @@ -457,7 +460,8 @@ bool get_GovHydroPID2_g2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmax; if (!buffer.str().empty()) @@ -471,7 +475,8 @@ bool get_GovHydroPID2_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPID2_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmin; if (!buffer.str().empty()) @@ -485,7 +490,8 @@ bool get_GovHydroPID2_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPID2_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -499,7 +505,8 @@ bool get_GovHydroPID2_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -513,7 +520,8 @@ bool get_GovHydroPID2_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -527,7 +535,8 @@ bool get_GovHydroPID2_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -541,7 +550,8 @@ bool get_GovHydroPID2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPID2_p1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p1; if (!buffer.str().empty()) @@ -555,7 +565,8 @@ bool get_GovHydroPID2_p1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_p2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p2; if (!buffer.str().empty()) @@ -569,7 +580,8 @@ bool get_GovHydroPID2_p2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_p3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p3; if (!buffer.str().empty()) @@ -583,7 +595,8 @@ bool get_GovHydroPID2_p3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rperm; if (!buffer.str().empty()) @@ -597,7 +610,8 @@ bool get_GovHydroPID2_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPID2_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -611,7 +625,8 @@ bool get_GovHydroPID2_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -625,7 +640,8 @@ bool get_GovHydroPID2_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_treg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->treg; if (!buffer.str().empty()) @@ -639,7 +655,8 @@ bool get_GovHydroPID2_treg(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPID2_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -653,7 +670,8 @@ bool get_GovHydroPID2_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_velmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velmax; if (!buffer.str().empty()) @@ -667,7 +685,8 @@ bool get_GovHydroPID2_velmax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPID2_velmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velmin; if (!buffer.str().empty()) @@ -679,8 +698,6 @@ bool get_GovHydroPID2_velmin(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char GovHydroPID2::debugName[] = "GovHydroPID2"; const char* GovHydroPID2::debugString() const { @@ -689,33 +706,33 @@ const char* GovHydroPID2::debugString() const void GovHydroPID2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroPID2"), &GovHydroPID2_factory)); + factory_map.emplace("cim:GovHydroPID2", &GovHydroPID2_factory); } void GovHydroPID2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.atw"), &assign_GovHydroPID2_atw)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.d"), &assign_GovHydroPID2_d)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.feedbackSignal"), &assign_GovHydroPID2_feedbackSignal)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.g0"), &assign_GovHydroPID2_g0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.g1"), &assign_GovHydroPID2_g1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.g2"), &assign_GovHydroPID2_g2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.gmax"), &assign_GovHydroPID2_gmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.gmin"), &assign_GovHydroPID2_gmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.kd"), &assign_GovHydroPID2_kd)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.ki"), &assign_GovHydroPID2_ki)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.kp"), &assign_GovHydroPID2_kp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.mwbase"), &assign_GovHydroPID2_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.p1"), &assign_GovHydroPID2_p1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.p2"), &assign_GovHydroPID2_p2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.p3"), &assign_GovHydroPID2_p3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.rperm"), &assign_GovHydroPID2_rperm)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.ta"), &assign_GovHydroPID2_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.tb"), &assign_GovHydroPID2_tb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.treg"), &assign_GovHydroPID2_treg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.tw"), &assign_GovHydroPID2_tw)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.velmax"), &assign_GovHydroPID2_velmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.velmin"), &assign_GovHydroPID2_velmin)); + assign_map.emplace("cim:GovHydroPID2.atw", &assign_GovHydroPID2_atw); + assign_map.emplace("cim:GovHydroPID2.d", &assign_GovHydroPID2_d); + assign_map.emplace("cim:GovHydroPID2.feedbackSignal", &assign_GovHydroPID2_feedbackSignal); + assign_map.emplace("cim:GovHydroPID2.g0", &assign_GovHydroPID2_g0); + assign_map.emplace("cim:GovHydroPID2.g1", &assign_GovHydroPID2_g1); + assign_map.emplace("cim:GovHydroPID2.g2", &assign_GovHydroPID2_g2); + assign_map.emplace("cim:GovHydroPID2.gmax", &assign_GovHydroPID2_gmax); + assign_map.emplace("cim:GovHydroPID2.gmin", &assign_GovHydroPID2_gmin); + assign_map.emplace("cim:GovHydroPID2.kd", &assign_GovHydroPID2_kd); + assign_map.emplace("cim:GovHydroPID2.ki", &assign_GovHydroPID2_ki); + assign_map.emplace("cim:GovHydroPID2.kp", &assign_GovHydroPID2_kp); + assign_map.emplace("cim:GovHydroPID2.mwbase", &assign_GovHydroPID2_mwbase); + assign_map.emplace("cim:GovHydroPID2.p1", &assign_GovHydroPID2_p1); + assign_map.emplace("cim:GovHydroPID2.p2", &assign_GovHydroPID2_p2); + assign_map.emplace("cim:GovHydroPID2.p3", &assign_GovHydroPID2_p3); + assign_map.emplace("cim:GovHydroPID2.rperm", &assign_GovHydroPID2_rperm); + assign_map.emplace("cim:GovHydroPID2.ta", &assign_GovHydroPID2_ta); + assign_map.emplace("cim:GovHydroPID2.tb", &assign_GovHydroPID2_tb); + assign_map.emplace("cim:GovHydroPID2.treg", &assign_GovHydroPID2_treg); + assign_map.emplace("cim:GovHydroPID2.tw", &assign_GovHydroPID2_tw); + assign_map.emplace("cim:GovHydroPID2.velmax", &assign_GovHydroPID2_velmax); + assign_map.emplace("cim:GovHydroPID2.velmin", &assign_GovHydroPID2_velmin); } void GovHydroPID2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/GovHydroPID2.hpp b/CGMES_2.4.15_16FEB2016/GovHydroPID2.hpp index 5f5d7c1fb..3bbeb694e 100644 --- a/CGMES_2.4.15_16FEB2016/GovHydroPID2.hpp +++ b/CGMES_2.4.15_16FEB2016/GovHydroPID2.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Hydro turbine and governor. Represents plants with straight forward penstock configurations and "three term" electro-hydraulic governors (i.e. Woodard electronic). - */ + /** \brief Hydro turbine and governor. Represents plants with straight forward penstock configurations and "three term" electro-hydraulic governors (i.e. Woodard electronic). */ class GovHydroPID2 : public TurbineGovernorDynamics { public: @@ -31,28 +29,71 @@ namespace CIMPP GovHydroPID2(); ~GovHydroPID2() override; - CIMPP::PU atw; /* Factor multiplying Tw (Atw). Typical Value = 0. Default: nullptr */ - CIMPP::PU d; /* Turbine damping factor (D). Unit = delta P / delta speed. Typical Value = 0. Default: nullptr */ - CIMPP::Boolean feedbackSignal; /* Feedback signal type flag (Flag). true = use gate position feedback signal false = use Pe. Default: false */ - CIMPP::PU g0; /* Gate opening at speed no load (G0). Typical Value = 0. Default: nullptr */ - CIMPP::PU g1; /* Intermediate gate opening (G1). Typical Value = 0. Default: nullptr */ - CIMPP::PU g2; /* Intermediate gate opening (G2). Typical Value = 0. Default: nullptr */ - CIMPP::PU gmax; /* Maximum gate opening (Gmax). Typical Value = 0. Default: nullptr */ - CIMPP::PU gmin; /* Minimum gate opening (Gmin). Typical Value = 0. Default: nullptr */ - CIMPP::PU kd; /* Derivative gain (Kd). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float ki; /* Reset gain (Ki). Unit = PU/ sec. Typical Value = 0. Default: nullptr */ - CIMPP::PU kp; /* Proportional gain (Kp). Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU p1; /* Power at gate opening G1 (P1). Typical Value = 0. Default: nullptr */ - CIMPP::PU p2; /* Power at gate opening G2 (P2). Typical Value = 0. Default: nullptr */ - CIMPP::PU p3; /* Power at full opened gate (P3). Typical Value = 0. Default: nullptr */ - CIMPP::PU rperm; /* Permanent drop (Rperm). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ta; /* Controller time constant (Ta) (>0). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tb; /* Gate servo time constant (Tb) (>0). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds treg; /* Speed detector time constant (Treg). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tw; /* Water inertia time constant (Tw) (>0). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float velmax; /* Maximum gate opening velocity (Velmax). Unit = PU/sec. Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float velmin; /* Maximum gate closing velocity (Velmin). Unit = PU/sec. Typical Value = 0. Default: nullptr */ + /** \brief Factor multiplying Tw (Atw). Typical Value = 0. Default: nullptr */ + CIMPP::PU atw; + + /** \brief Turbine damping factor (D). Unit = delta P / delta speed. Typical Value = 0. Default: nullptr */ + CIMPP::PU d; + + /** \brief Feedback signal type flag (Flag). true = use gate position feedback signal false = use Pe. Default: false */ + CIMPP::Boolean feedbackSignal; + + /** \brief Gate opening at speed no load (G0). Typical Value = 0. Default: nullptr */ + CIMPP::PU g0; + + /** \brief Intermediate gate opening (G1). Typical Value = 0. Default: nullptr */ + CIMPP::PU g1; + + /** \brief Intermediate gate opening (G2). Typical Value = 0. Default: nullptr */ + CIMPP::PU g2; + + /** \brief Maximum gate opening (Gmax). Typical Value = 0. Default: nullptr */ + CIMPP::PU gmax; + + /** \brief Minimum gate opening (Gmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU gmin; + + /** \brief Derivative gain (Kd). Typical Value = 0. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Reset gain (Ki). Unit = PU/ sec. Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float ki; + + /** \brief Proportional gain (Kp). Typical Value = 0. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Power at gate opening G1 (P1). Typical Value = 0. Default: nullptr */ + CIMPP::PU p1; + + /** \brief Power at gate opening G2 (P2). Typical Value = 0. Default: nullptr */ + CIMPP::PU p2; + + /** \brief Power at full opened gate (P3). Typical Value = 0. Default: nullptr */ + CIMPP::PU p3; + + /** \brief Permanent drop (Rperm). Typical Value = 0. Default: nullptr */ + CIMPP::PU rperm; + + /** \brief Controller time constant (Ta) (>0). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Gate servo time constant (Tb) (>0). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Speed detector time constant (Treg). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds treg; + + /** \brief Water inertia time constant (Tw) (>0). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tw; + + /** \brief Maximum gate opening velocity (Velmax). Unit = PU/sec. Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float velmax; + + /** \brief Maximum gate closing velocity (Velmin). Unit = PU/sec. Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float velmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GovHydroPelton.cpp b/CGMES_2.4.15_16FEB2016/GovHydroPelton.cpp index a2ef71006..1f8f2bbfe 100644 --- a/CGMES_2.4.15_16FEB2016/GovHydroPelton.cpp +++ b/CGMES_2.4.15_16FEB2016/GovHydroPelton.cpp @@ -8,39 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Area.hpp" -#include "Area.hpp" -#include "PU.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "Length.hpp" -#include "Length.hpp" -#include "Length.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "VolumeFlowRate.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Length.hpp" using namespace CIMPP; -GovHydroPelton::GovHydroPelton() {}; -GovHydroPelton::~GovHydroPelton() {}; +GovHydroPelton::GovHydroPelton() {} +GovHydroPelton::~GovHydroPelton() {} static const std::list PossibleProfilesForClass = { @@ -94,376 +66,402 @@ GovHydroPelton::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroPelton_av0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_av0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->av0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_av1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_av1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->av1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_bp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_bp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_h1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_h1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->h1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_h2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_h2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->h2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_hn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_hn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->hn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_qc0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_qc0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qc0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_qn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_qn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_simplifiedPelton(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_simplifiedPelton(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->simplifiedPelton; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_staticCompensating(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_staticCompensating(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->staticCompensating; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_ts(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_ts(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_tv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_tv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_twnc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_twnc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->twnc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_twng(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_twng(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->twng; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_tx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_tx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_va(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_va(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->va; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_valvmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_valvmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->valvmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_valvmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_valvmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->valvmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_vav(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_vav(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vav; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_vc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_vc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_vcv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_vcv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vcv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_waterTunnelSurgeChamberSimulation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_waterTunnelSurgeChamberSimulation(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->waterTunnelSurgeChamberSimulation; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_zsfc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_zsfc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->zsfc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroPelton_av0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->av0; if (!buffer.str().empty()) @@ -477,7 +475,8 @@ bool get_GovHydroPelton_av0(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPelton_av1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->av1; if (!buffer.str().empty()) @@ -491,7 +490,8 @@ bool get_GovHydroPelton_av1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPelton_bp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bp; if (!buffer.str().empty()) @@ -505,7 +505,8 @@ bool get_GovHydroPelton_bp(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -519,7 +520,8 @@ bool get_GovHydroPelton_db1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPelton_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -533,7 +535,8 @@ bool get_GovHydroPelton_db2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPelton_h1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->h1; if (!buffer.str().empty()) @@ -547,7 +550,8 @@ bool get_GovHydroPelton_h1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_h2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->h2; if (!buffer.str().empty()) @@ -561,7 +565,8 @@ bool get_GovHydroPelton_h2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_hn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hn; if (!buffer.str().empty()) @@ -575,7 +580,8 @@ bool get_GovHydroPelton_hn(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -589,7 +595,8 @@ bool get_GovHydroPelton_kc(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -603,7 +610,8 @@ bool get_GovHydroPelton_kg(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_qc0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qc0; if (!buffer.str().empty()) @@ -617,7 +625,8 @@ bool get_GovHydroPelton_qc0(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPelton_qn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qn; if (!buffer.str().empty()) @@ -631,7 +640,8 @@ bool get_GovHydroPelton_qn(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_simplifiedPelton(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->simplifiedPelton; if (!buffer.str().empty()) @@ -645,7 +655,8 @@ bool get_GovHydroPelton_simplifiedPelton(const BaseClass* BaseClass_ptr1, std::s bool get_GovHydroPelton_staticCompensating(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->staticCompensating; if (!buffer.str().empty()) @@ -659,7 +670,8 @@ bool get_GovHydroPelton_staticCompensating(const BaseClass* BaseClass_ptr1, std: bool get_GovHydroPelton_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -673,7 +685,8 @@ bool get_GovHydroPelton_ta(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_ts(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts; if (!buffer.str().empty()) @@ -687,7 +700,8 @@ bool get_GovHydroPelton_ts(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_tv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tv; if (!buffer.str().empty()) @@ -701,7 +715,8 @@ bool get_GovHydroPelton_tv(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_twnc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twnc; if (!buffer.str().empty()) @@ -715,7 +730,8 @@ bool get_GovHydroPelton_twnc(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPelton_twng(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twng; if (!buffer.str().empty()) @@ -729,7 +745,8 @@ bool get_GovHydroPelton_twng(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPelton_tx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tx; if (!buffer.str().empty()) @@ -743,7 +760,8 @@ bool get_GovHydroPelton_tx(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_va(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->va; if (!buffer.str().empty()) @@ -757,7 +775,8 @@ bool get_GovHydroPelton_va(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_valvmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->valvmax; if (!buffer.str().empty()) @@ -771,7 +790,8 @@ bool get_GovHydroPelton_valvmax(const BaseClass* BaseClass_ptr1, std::stringstre bool get_GovHydroPelton_valvmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->valvmin; if (!buffer.str().empty()) @@ -785,7 +805,8 @@ bool get_GovHydroPelton_valvmin(const BaseClass* BaseClass_ptr1, std::stringstre bool get_GovHydroPelton_vav(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vav; if (!buffer.str().empty()) @@ -799,7 +820,8 @@ bool get_GovHydroPelton_vav(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPelton_vc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vc; if (!buffer.str().empty()) @@ -813,7 +835,8 @@ bool get_GovHydroPelton_vc(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_vcv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vcv; if (!buffer.str().empty()) @@ -827,7 +850,8 @@ bool get_GovHydroPelton_vcv(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPelton_waterTunnelSurgeChamberSimulation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->waterTunnelSurgeChamberSimulation; if (!buffer.str().empty()) @@ -841,7 +865,8 @@ bool get_GovHydroPelton_waterTunnelSurgeChamberSimulation(const BaseClass* BaseC bool get_GovHydroPelton_zsfc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->zsfc; if (!buffer.str().empty()) @@ -853,8 +878,6 @@ bool get_GovHydroPelton_zsfc(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char GovHydroPelton::debugName[] = "GovHydroPelton"; const char* GovHydroPelton::debugString() const { @@ -863,39 +886,39 @@ const char* GovHydroPelton::debugString() const void GovHydroPelton::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroPelton"), &GovHydroPelton_factory)); + factory_map.emplace("cim:GovHydroPelton", &GovHydroPelton_factory); } void GovHydroPelton::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.av0"), &assign_GovHydroPelton_av0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.av1"), &assign_GovHydroPelton_av1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.bp"), &assign_GovHydroPelton_bp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.db1"), &assign_GovHydroPelton_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.db2"), &assign_GovHydroPelton_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.h1"), &assign_GovHydroPelton_h1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.h2"), &assign_GovHydroPelton_h2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.hn"), &assign_GovHydroPelton_hn)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.kc"), &assign_GovHydroPelton_kc)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.kg"), &assign_GovHydroPelton_kg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.qc0"), &assign_GovHydroPelton_qc0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.qn"), &assign_GovHydroPelton_qn)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.simplifiedPelton"), &assign_GovHydroPelton_simplifiedPelton)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.staticCompensating"), &assign_GovHydroPelton_staticCompensating)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.ta"), &assign_GovHydroPelton_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.ts"), &assign_GovHydroPelton_ts)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.tv"), &assign_GovHydroPelton_tv)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.twnc"), &assign_GovHydroPelton_twnc)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.twng"), &assign_GovHydroPelton_twng)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.tx"), &assign_GovHydroPelton_tx)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.va"), &assign_GovHydroPelton_va)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.valvmax"), &assign_GovHydroPelton_valvmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.valvmin"), &assign_GovHydroPelton_valvmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.vav"), &assign_GovHydroPelton_vav)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.vc"), &assign_GovHydroPelton_vc)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.vcv"), &assign_GovHydroPelton_vcv)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.waterTunnelSurgeChamberSimulation"), &assign_GovHydroPelton_waterTunnelSurgeChamberSimulation)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.zsfc"), &assign_GovHydroPelton_zsfc)); + assign_map.emplace("cim:GovHydroPelton.av0", &assign_GovHydroPelton_av0); + assign_map.emplace("cim:GovHydroPelton.av1", &assign_GovHydroPelton_av1); + assign_map.emplace("cim:GovHydroPelton.bp", &assign_GovHydroPelton_bp); + assign_map.emplace("cim:GovHydroPelton.db1", &assign_GovHydroPelton_db1); + assign_map.emplace("cim:GovHydroPelton.db2", &assign_GovHydroPelton_db2); + assign_map.emplace("cim:GovHydroPelton.h1", &assign_GovHydroPelton_h1); + assign_map.emplace("cim:GovHydroPelton.h2", &assign_GovHydroPelton_h2); + assign_map.emplace("cim:GovHydroPelton.hn", &assign_GovHydroPelton_hn); + assign_map.emplace("cim:GovHydroPelton.kc", &assign_GovHydroPelton_kc); + assign_map.emplace("cim:GovHydroPelton.kg", &assign_GovHydroPelton_kg); + assign_map.emplace("cim:GovHydroPelton.qc0", &assign_GovHydroPelton_qc0); + assign_map.emplace("cim:GovHydroPelton.qn", &assign_GovHydroPelton_qn); + assign_map.emplace("cim:GovHydroPelton.simplifiedPelton", &assign_GovHydroPelton_simplifiedPelton); + assign_map.emplace("cim:GovHydroPelton.staticCompensating", &assign_GovHydroPelton_staticCompensating); + assign_map.emplace("cim:GovHydroPelton.ta", &assign_GovHydroPelton_ta); + assign_map.emplace("cim:GovHydroPelton.ts", &assign_GovHydroPelton_ts); + assign_map.emplace("cim:GovHydroPelton.tv", &assign_GovHydroPelton_tv); + assign_map.emplace("cim:GovHydroPelton.twnc", &assign_GovHydroPelton_twnc); + assign_map.emplace("cim:GovHydroPelton.twng", &assign_GovHydroPelton_twng); + assign_map.emplace("cim:GovHydroPelton.tx", &assign_GovHydroPelton_tx); + assign_map.emplace("cim:GovHydroPelton.va", &assign_GovHydroPelton_va); + assign_map.emplace("cim:GovHydroPelton.valvmax", &assign_GovHydroPelton_valvmax); + assign_map.emplace("cim:GovHydroPelton.valvmin", &assign_GovHydroPelton_valvmin); + assign_map.emplace("cim:GovHydroPelton.vav", &assign_GovHydroPelton_vav); + assign_map.emplace("cim:GovHydroPelton.vc", &assign_GovHydroPelton_vc); + assign_map.emplace("cim:GovHydroPelton.vcv", &assign_GovHydroPelton_vcv); + assign_map.emplace("cim:GovHydroPelton.waterTunnelSurgeChamberSimulation", &assign_GovHydroPelton_waterTunnelSurgeChamberSimulation); + assign_map.emplace("cim:GovHydroPelton.zsfc", &assign_GovHydroPelton_zsfc); } void GovHydroPelton::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/GovHydroPelton.hpp b/CGMES_2.4.15_16FEB2016/GovHydroPelton.hpp index 53b3c0d70..8536bb331 100644 --- a/CGMES_2.4.15_16FEB2016/GovHydroPelton.hpp +++ b/CGMES_2.4.15_16FEB2016/GovHydroPelton.hpp @@ -24,9 +24,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Detailed hydro unit - Pelton model. This model can be used to represent the dynamic related to water tunnel and surge chamber. A schematic of the hydraulic system of detailed hydro unit models, like Francis and Pelton, is located under the GovHydroFrancis class. - */ + /** \brief Detailed hydro unit - Pelton model. This model can be used to represent the dynamic related to water tunnel and surge chamber. A schematic of the hydraulic system of detailed hydro unit models, like Francis and Pelton, is located under the GovHydroFrancis class. */ class GovHydroPelton : public TurbineGovernorDynamics { public: @@ -34,34 +32,89 @@ namespace CIMPP GovHydroPelton(); ~GovHydroPelton() override; - CIMPP::Area av0; /* Area of the surge tank (A). Unit = m. Typical Value = 30. Default: nullptr */ - CIMPP::Area av1; /* Area of the compensation tank (A). Unit = m. Typical Value = 700. Default: nullptr */ - CIMPP::PU bp; /* Droop (bp). Typical Value = 0.05. Default: nullptr */ - CIMPP::Frequency db1; /* Intentional dead-band width (DB1). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency db2; /* Intentional dead-band width of valve opening error (DB2). Unit = Hz. Typical Value = 0.01. Default: nullptr */ - CIMPP::Length h1; /* Head of compensation chamber water level with respect to the level of penstock (H). Unit = m. Typical Value = 4. Default: nullptr */ - CIMPP::Length h2; /* Head of surge tank water level with respect to the level of penstock (H). Unit = m. Typical Value = 40. Default: nullptr */ - CIMPP::Length hn; /* Rated hydraulic head (H). Unit = m. Typical Value = 250. Default: nullptr */ - CIMPP::PU kc; /* Penstock loss coefficient (due to friction) (Kc). Typical Value = 0.025. Default: nullptr */ - CIMPP::PU kg; /* Water tunnel and surge chamber loss coefficient (due to friction) (Kg). Typical Value = -0.025. Default: nullptr */ - CIMPP::PU qc0; /* No-load turbine flow at nominal head (Qc0). Typical Value = 0.05. Default: nullptr */ - CIMPP::VolumeFlowRate qn; /* Rated flow (Q). Unit = m/s. Typical Value = 40. Default: nullptr */ - CIMPP::Boolean simplifiedPelton; /* Simplified Pelton model simulation (Sflag). true = enable of simplified Pelton model simulation false = enable of complete Pelton model simulation (non linear gain). Typical Value = false. Default: false */ - CIMPP::Boolean staticCompensating; /* Static compensating characteristic (Cflag). true = enable of static compensating characteristic false = inhibit of static compensating characteristic. Typical Value = false. Default: false */ - CIMPP::Seconds ta; /* Derivative gain (accelerometer time constant) (Ta). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds ts; /* Gate servo time constant (Ts). Typical Value = 0.15. Default: nullptr */ - CIMPP::Seconds tv; /* Servomotor integrator time constant (TV). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds twnc; /* Water inertia time constant (Twnc). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds twng; /* Water tunnel and surge chamber inertia time constant (Twng). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds tx; /* Electronic integrator time constant (Tx). Typical Value = 0.5. Default: nullptr */ - CIMPP::Simple_Float va; /* Maximum gate opening velocity (Va). Unit = PU/sec. Typical Value = 0.016. Default: nullptr */ - CIMPP::PU valvmax; /* Maximum gate opening (ValvMax). Typical Value = 1. Default: nullptr */ - CIMPP::PU valvmin; /* Minimum gate opening (ValvMin). Typical Value = 0. Default: nullptr */ - CIMPP::PU vav; /* Maximum servomotor valve opening velocity (Vav). Typical Value = 0.017. Default: nullptr */ - CIMPP::Simple_Float vc; /* Maximum gate closing velocity (Vc). Unit = PU/sec. Typical Value = -0.016. Default: nullptr */ - CIMPP::PU vcv; /* Maximum servomotor valve closing velocity (Vcv). Typical Value = -0.017. Default: nullptr */ - CIMPP::Boolean waterTunnelSurgeChamberSimulation; /* Water tunnel and surge chamber simulation (Tflag). true = enable of water tunnel and surge chamber simulation false = inhibit of water tunnel and surge chamber simulation. Typical Value = false. Default: false */ - CIMPP::Length zsfc; /* Head of upper water level with respect to the level of penstock (Zsfc). Unit = m. Typical Value = 25. Default: nullptr */ + /** \brief Area of the surge tank (A). Unit = m. Typical Value = 30. Default: nullptr */ + CIMPP::Area av0; + + /** \brief Area of the compensation tank (A). Unit = m. Typical Value = 700. Default: nullptr */ + CIMPP::Area av1; + + /** \brief Droop (bp). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU bp; + + /** \brief Intentional dead-band width (DB1). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Intentional dead-band width of valve opening error (DB2). Unit = Hz. Typical Value = 0.01. Default: nullptr */ + CIMPP::Frequency db2; + + /** \brief Head of compensation chamber water level with respect to the level of penstock (H). Unit = m. Typical Value = 4. Default: nullptr */ + CIMPP::Length h1; + + /** \brief Head of surge tank water level with respect to the level of penstock (H). Unit = m. Typical Value = 40. Default: nullptr */ + CIMPP::Length h2; + + /** \brief Rated hydraulic head (H). Unit = m. Typical Value = 250. Default: nullptr */ + CIMPP::Length hn; + + /** \brief Penstock loss coefficient (due to friction) (Kc). Typical Value = 0.025. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Water tunnel and surge chamber loss coefficient (due to friction) (Kg). Typical Value = -0.025. Default: nullptr */ + CIMPP::PU kg; + + /** \brief No-load turbine flow at nominal head (Qc0). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU qc0; + + /** \brief Rated flow (Q). Unit = m/s. Typical Value = 40. Default: nullptr */ + CIMPP::VolumeFlowRate qn; + + /** \brief Simplified Pelton model simulation (Sflag). true = enable of simplified Pelton model simulation false = enable of complete Pelton model simulation (non linear gain). Typical Value = false. Default: false */ + CIMPP::Boolean simplifiedPelton; + + /** \brief Static compensating characteristic (Cflag). true = enable of static compensating characteristic false = inhibit of static compensating characteristic. Typical Value = false. Default: false */ + CIMPP::Boolean staticCompensating; + + /** \brief Derivative gain (accelerometer time constant) (Ta). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Gate servo time constant (Ts). Typical Value = 0.15. Default: nullptr */ + CIMPP::Seconds ts; + + /** \brief Servomotor integrator time constant (TV). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds tv; + + /** \brief Water inertia time constant (Twnc). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds twnc; + + /** \brief Water tunnel and surge chamber inertia time constant (Twng). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds twng; + + /** \brief Electronic integrator time constant (Tx). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds tx; + + /** \brief Maximum gate opening velocity (Va). Unit = PU/sec. Typical Value = 0.016. Default: nullptr */ + CIMPP::Simple_Float va; + + /** \brief Maximum gate opening (ValvMax). Typical Value = 1. Default: nullptr */ + CIMPP::PU valvmax; + + /** \brief Minimum gate opening (ValvMin). Typical Value = 0. Default: nullptr */ + CIMPP::PU valvmin; + + /** \brief Maximum servomotor valve opening velocity (Vav). Typical Value = 0.017. Default: nullptr */ + CIMPP::PU vav; + + /** \brief Maximum gate closing velocity (Vc). Unit = PU/sec. Typical Value = -0.016. Default: nullptr */ + CIMPP::Simple_Float vc; + + /** \brief Maximum servomotor valve closing velocity (Vcv). Typical Value = -0.017. Default: nullptr */ + CIMPP::PU vcv; + + /** \brief Water tunnel and surge chamber simulation (Tflag). true = enable of water tunnel and surge chamber simulation false = inhibit of water tunnel and surge chamber simulation. Typical Value = false. Default: false */ + CIMPP::Boolean waterTunnelSurgeChamberSimulation; + + /** \brief Head of upper water level with respect to the level of penstock (Zsfc). Unit = m. Typical Value = 25. Default: nullptr */ + CIMPP::Length zsfc; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GovHydroR.cpp b/CGMES_2.4.15_16FEB2016/GovHydroR.cpp index 37199eb2c..b98e8cfc6 100644 --- a/CGMES_2.4.15_16FEB2016/GovHydroR.cpp +++ b/CGMES_2.4.15_16FEB2016/GovHydroR.cpp @@ -8,53 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "Frequency.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "Frequency.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -GovHydroR::GovHydroR() {}; -GovHydroR::~GovHydroR() {}; +GovHydroR::GovHydroR() {} +GovHydroR::~GovHydroR() {} static const std::list PossibleProfilesForClass = { @@ -122,558 +80,598 @@ GovHydroR::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroR_at(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_at(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->at; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_dturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_dturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_eps(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eps; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_gmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_gmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_gmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_gmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_gv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_h0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_h0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->h0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_inputSignal(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_inputSignal(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_pgv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_qnl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_qnl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qnl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_t7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_t8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_t8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_tt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_velcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_velcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velcl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_velop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_velop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroR_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->at; if (!buffer.str().empty()) @@ -687,7 +685,8 @@ bool get_GovHydroR_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -701,7 +700,8 @@ bool get_GovHydroR_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -715,7 +715,8 @@ bool get_GovHydroR_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dturb; if (!buffer.str().empty()) @@ -729,7 +730,8 @@ bool get_GovHydroR_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroR_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eps; if (!buffer.str().empty()) @@ -743,7 +745,8 @@ bool get_GovHydroR_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmax; if (!buffer.str().empty()) @@ -757,7 +760,8 @@ bool get_GovHydroR_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmin; if (!buffer.str().empty()) @@ -771,7 +775,8 @@ bool get_GovHydroR_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -785,7 +790,8 @@ bool get_GovHydroR_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -799,7 +805,8 @@ bool get_GovHydroR_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -813,7 +820,8 @@ bool get_GovHydroR_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -827,7 +835,8 @@ bool get_GovHydroR_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -841,7 +850,8 @@ bool get_GovHydroR_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv6; if (!buffer.str().empty()) @@ -855,7 +865,8 @@ bool get_GovHydroR_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_h0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->h0; if (!buffer.str().empty()) @@ -869,7 +880,8 @@ bool get_GovHydroR_h0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_inputSignal(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inputSignal; if (!buffer.str().empty()) @@ -883,7 +895,8 @@ bool get_GovHydroR_inputSignal(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_GovHydroR_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -897,7 +910,8 @@ bool get_GovHydroR_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -911,7 +925,8 @@ bool get_GovHydroR_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -925,7 +940,8 @@ bool get_GovHydroR_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroR_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -939,7 +955,8 @@ bool get_GovHydroR_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -953,7 +970,8 @@ bool get_GovHydroR_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -967,7 +985,8 @@ bool get_GovHydroR_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -981,7 +1000,8 @@ bool get_GovHydroR_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -995,7 +1015,8 @@ bool get_GovHydroR_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv6; if (!buffer.str().empty()) @@ -1009,7 +1030,8 @@ bool get_GovHydroR_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -1023,7 +1045,8 @@ bool get_GovHydroR_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -1037,7 +1060,8 @@ bool get_GovHydroR_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_qnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qnl; if (!buffer.str().empty()) @@ -1051,7 +1075,8 @@ bool get_GovHydroR_qnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -1065,7 +1090,8 @@ bool get_GovHydroR_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovHydroR_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -1079,7 +1105,8 @@ bool get_GovHydroR_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -1093,7 +1120,8 @@ bool get_GovHydroR_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -1107,7 +1135,8 @@ bool get_GovHydroR_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -1121,7 +1150,8 @@ bool get_GovHydroR_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -1135,7 +1165,8 @@ bool get_GovHydroR_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -1149,7 +1180,8 @@ bool get_GovHydroR_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t7; if (!buffer.str().empty()) @@ -1163,7 +1195,8 @@ bool get_GovHydroR_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t8; if (!buffer.str().empty()) @@ -1177,7 +1210,8 @@ bool get_GovHydroR_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -1191,7 +1225,8 @@ bool get_GovHydroR_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -1205,7 +1240,8 @@ bool get_GovHydroR_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tt; if (!buffer.str().empty()) @@ -1219,7 +1255,8 @@ bool get_GovHydroR_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -1233,7 +1270,8 @@ bool get_GovHydroR_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_velcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velcl; if (!buffer.str().empty()) @@ -1247,7 +1285,8 @@ bool get_GovHydroR_velcl(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroR_velop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velop; if (!buffer.str().empty()) @@ -1259,8 +1298,6 @@ bool get_GovHydroR_velop(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } - - const char GovHydroR::debugName[] = "GovHydroR"; const char* GovHydroR::debugString() const { @@ -1269,53 +1306,53 @@ const char* GovHydroR::debugString() const void GovHydroR::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroR"), &GovHydroR_factory)); + factory_map.emplace("cim:GovHydroR", &GovHydroR_factory); } void GovHydroR::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.at"), &assign_GovHydroR_at)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.db1"), &assign_GovHydroR_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.db2"), &assign_GovHydroR_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.dturb"), &assign_GovHydroR_dturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.eps"), &assign_GovHydroR_eps)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.gmax"), &assign_GovHydroR_gmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.gmin"), &assign_GovHydroR_gmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.gv1"), &assign_GovHydroR_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.gv2"), &assign_GovHydroR_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.gv3"), &assign_GovHydroR_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.gv4"), &assign_GovHydroR_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.gv5"), &assign_GovHydroR_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.gv6"), &assign_GovHydroR_gv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.h0"), &assign_GovHydroR_h0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.inputSignal"), &assign_GovHydroR_inputSignal)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.kg"), &assign_GovHydroR_kg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.ki"), &assign_GovHydroR_ki)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.mwbase"), &assign_GovHydroR_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.pgv1"), &assign_GovHydroR_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.pgv2"), &assign_GovHydroR_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.pgv3"), &assign_GovHydroR_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.pgv4"), &assign_GovHydroR_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.pgv5"), &assign_GovHydroR_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.pgv6"), &assign_GovHydroR_pgv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.pmax"), &assign_GovHydroR_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.pmin"), &assign_GovHydroR_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.qnl"), &assign_GovHydroR_qnl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.r"), &assign_GovHydroR_r)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.t1"), &assign_GovHydroR_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.t2"), &assign_GovHydroR_t2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.t3"), &assign_GovHydroR_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.t4"), &assign_GovHydroR_t4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.t5"), &assign_GovHydroR_t5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.t6"), &assign_GovHydroR_t6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.t7"), &assign_GovHydroR_t7)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.t8"), &assign_GovHydroR_t8)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.td"), &assign_GovHydroR_td)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.tp"), &assign_GovHydroR_tp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.tt"), &assign_GovHydroR_tt)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.tw"), &assign_GovHydroR_tw)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.velcl"), &assign_GovHydroR_velcl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.velop"), &assign_GovHydroR_velop)); + assign_map.emplace("cim:GovHydroR.at", &assign_GovHydroR_at); + assign_map.emplace("cim:GovHydroR.db1", &assign_GovHydroR_db1); + assign_map.emplace("cim:GovHydroR.db2", &assign_GovHydroR_db2); + assign_map.emplace("cim:GovHydroR.dturb", &assign_GovHydroR_dturb); + assign_map.emplace("cim:GovHydroR.eps", &assign_GovHydroR_eps); + assign_map.emplace("cim:GovHydroR.gmax", &assign_GovHydroR_gmax); + assign_map.emplace("cim:GovHydroR.gmin", &assign_GovHydroR_gmin); + assign_map.emplace("cim:GovHydroR.gv1", &assign_GovHydroR_gv1); + assign_map.emplace("cim:GovHydroR.gv2", &assign_GovHydroR_gv2); + assign_map.emplace("cim:GovHydroR.gv3", &assign_GovHydroR_gv3); + assign_map.emplace("cim:GovHydroR.gv4", &assign_GovHydroR_gv4); + assign_map.emplace("cim:GovHydroR.gv5", &assign_GovHydroR_gv5); + assign_map.emplace("cim:GovHydroR.gv6", &assign_GovHydroR_gv6); + assign_map.emplace("cim:GovHydroR.h0", &assign_GovHydroR_h0); + assign_map.emplace("cim:GovHydroR.inputSignal", &assign_GovHydroR_inputSignal); + assign_map.emplace("cim:GovHydroR.kg", &assign_GovHydroR_kg); + assign_map.emplace("cim:GovHydroR.ki", &assign_GovHydroR_ki); + assign_map.emplace("cim:GovHydroR.mwbase", &assign_GovHydroR_mwbase); + assign_map.emplace("cim:GovHydroR.pgv1", &assign_GovHydroR_pgv1); + assign_map.emplace("cim:GovHydroR.pgv2", &assign_GovHydroR_pgv2); + assign_map.emplace("cim:GovHydroR.pgv3", &assign_GovHydroR_pgv3); + assign_map.emplace("cim:GovHydroR.pgv4", &assign_GovHydroR_pgv4); + assign_map.emplace("cim:GovHydroR.pgv5", &assign_GovHydroR_pgv5); + assign_map.emplace("cim:GovHydroR.pgv6", &assign_GovHydroR_pgv6); + assign_map.emplace("cim:GovHydroR.pmax", &assign_GovHydroR_pmax); + assign_map.emplace("cim:GovHydroR.pmin", &assign_GovHydroR_pmin); + assign_map.emplace("cim:GovHydroR.qnl", &assign_GovHydroR_qnl); + assign_map.emplace("cim:GovHydroR.r", &assign_GovHydroR_r); + assign_map.emplace("cim:GovHydroR.t1", &assign_GovHydroR_t1); + assign_map.emplace("cim:GovHydroR.t2", &assign_GovHydroR_t2); + assign_map.emplace("cim:GovHydroR.t3", &assign_GovHydroR_t3); + assign_map.emplace("cim:GovHydroR.t4", &assign_GovHydroR_t4); + assign_map.emplace("cim:GovHydroR.t5", &assign_GovHydroR_t5); + assign_map.emplace("cim:GovHydroR.t6", &assign_GovHydroR_t6); + assign_map.emplace("cim:GovHydroR.t7", &assign_GovHydroR_t7); + assign_map.emplace("cim:GovHydroR.t8", &assign_GovHydroR_t8); + assign_map.emplace("cim:GovHydroR.td", &assign_GovHydroR_td); + assign_map.emplace("cim:GovHydroR.tp", &assign_GovHydroR_tp); + assign_map.emplace("cim:GovHydroR.tt", &assign_GovHydroR_tt); + assign_map.emplace("cim:GovHydroR.tw", &assign_GovHydroR_tw); + assign_map.emplace("cim:GovHydroR.velcl", &assign_GovHydroR_velcl); + assign_map.emplace("cim:GovHydroR.velop", &assign_GovHydroR_velop); } void GovHydroR::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/GovHydroR.hpp b/CGMES_2.4.15_16FEB2016/GovHydroR.hpp index 77138dc46..a14a39e56 100644 --- a/CGMES_2.4.15_16FEB2016/GovHydroR.hpp +++ b/CGMES_2.4.15_16FEB2016/GovHydroR.hpp @@ -22,9 +22,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Fourth order lead-lag governor and hydro turbine. - */ + /** \brief Fourth order lead-lag governor and hydro turbine. */ class GovHydroR : public TurbineGovernorDynamics { public: @@ -32,48 +30,131 @@ namespace CIMPP GovHydroR(); ~GovHydroR() override; - CIMPP::PU at; /* Turbine gain (At). Typical Value = 1.2. Default: nullptr */ - CIMPP::Frequency db1; /* Intentional dead-band width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower db2; /* Unintentional dead-band (db2). Unit = MW. Typical Value = 0. Default: nullptr */ - CIMPP::PU dturb; /* Turbine damping factor (Dturb). Typical Value = 0.2. Default: nullptr */ - CIMPP::Frequency eps; /* Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::PU gmax; /* Maximum governor output (Gmax). Typical Value = 1.05. Default: nullptr */ - CIMPP::PU gmin; /* Minimum governor output (Gmin). Typical Value = -0.05. Default: nullptr */ - CIMPP::PU gv1; /* Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv6; /* Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU h0; /* Turbine nominal head (H0). Typical Value = 1. Default: nullptr */ - CIMPP::Boolean inputSignal; /* Input signal switch (Flag). true = Pe input is used false = feedback is received from CV. Flag is normally dependent on Tt. If Tf is zero, Flag is set to false. If Tf is not zero, Flag is set to true. Typical Value = true. Default: false */ - CIMPP::PU kg; /* Gate servo gain (Kg). Typical Value = 2. Default: nullptr */ - CIMPP::PU ki; /* Integral gain (Ki). Typical Value = 0.5. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv6; /* Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU pmax; /* Maximum gate opening, PU of MWbase (Pmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum gate opening, PU of MWbase (Pmin). Typical Value = 0. Default: nullptr */ - CIMPP::PU qnl; /* No-load turbine flow at nominal head (Qnl). Typical Value = 0.08. Default: nullptr */ - CIMPP::PU r; /* Steady-state droop (R). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds t1; /* Lead time constant 1 (T1). Typical Value = 1.5. Default: nullptr */ - CIMPP::Seconds t2; /* Lag time constant 1 (T2). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t3; /* Lead time constant 2 (T3). Typical Value = 1.5. Default: nullptr */ - CIMPP::Seconds t4; /* Lag time constant 2 (T4). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t5; /* Lead time constant 3 (T5). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t6; /* Lag time constant 3 (T6). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds t7; /* Lead time constant 4 (T7). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t8; /* Lag time constant 4 (T8). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds td; /* Input filter time constant (Td). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds tp; /* Gate servo time constant (Tp). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds tt; /* Power feedback time constant (Tt). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tw; /* Water inertia time constant (Tw). Typical Value = 1. Default: nullptr */ - CIMPP::Simple_Float velcl; /* Maximum gate closing velocity (Velcl). Unit = PU/sec. Typical Value = -0.2. Default: nullptr */ - CIMPP::Simple_Float velop; /* Maximum gate opening velocity (Velop). Unit = PU/sec. Typical Value = 0.2. Default: nullptr */ + /** \brief Turbine gain (At). Typical Value = 1.2. Default: nullptr */ + CIMPP::PU at; + + /** \brief Intentional dead-band width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Unintentional dead-band (db2). Unit = MW. Typical Value = 0. Default: nullptr */ + CIMPP::ActivePower db2; + + /** \brief Turbine damping factor (Dturb). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU dturb; + + /** \brief Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency eps; + + /** \brief Maximum governor output (Gmax). Typical Value = 1.05. Default: nullptr */ + CIMPP::PU gmax; + + /** \brief Minimum governor output (Gmin). Typical Value = -0.05. Default: nullptr */ + CIMPP::PU gmin; + + /** \brief Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv6; + + /** \brief Turbine nominal head (H0). Typical Value = 1. Default: nullptr */ + CIMPP::PU h0; + + /** \brief Input signal switch (Flag). true = Pe input is used false = feedback is received from CV. Flag is normally dependent on Tt. If Tf is zero, Flag is set to false. If Tf is not zero, Flag is set to true. Typical Value = true. Default: false */ + CIMPP::Boolean inputSignal; + + /** \brief Gate servo gain (Kg). Typical Value = 2. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Integral gain (Ki). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv6; + + /** \brief Maximum gate opening, PU of MWbase (Pmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum gate opening, PU of MWbase (Pmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief No-load turbine flow at nominal head (Qnl). Typical Value = 0.08. Default: nullptr */ + CIMPP::PU qnl; + + /** \brief Steady-state droop (R). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU r; + + /** \brief Lead time constant 1 (T1). Typical Value = 1.5. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Lag time constant 1 (T2). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Lead time constant 2 (T3). Typical Value = 1.5. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Lag time constant 2 (T4). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Lead time constant 3 (T5). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Lag time constant 3 (T6). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Lead time constant 4 (T7). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t7; + + /** \brief Lag time constant 4 (T8). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds t8; + + /** \brief Input filter time constant (Td). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Gate servo time constant (Tp). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Power feedback time constant (Tt). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tt; + + /** \brief Water inertia time constant (Tw). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tw; + + /** \brief Maximum gate closing velocity (Velcl). Unit = PU/sec. Typical Value = -0.2. Default: nullptr */ + CIMPP::Simple_Float velcl; + + /** \brief Maximum gate opening velocity (Velop). Unit = PU/sec. Typical Value = 0.2. Default: nullptr */ + CIMPP::Simple_Float velop; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GovHydroWEH.cpp b/CGMES_2.4.15_16FEB2016/GovHydroWEH.cpp index 7a8ac432b..a59096688 100644 --- a/CGMES_2.4.15_16FEB2016/GovHydroWEH.cpp +++ b/CGMES_2.4.15_16FEB2016/GovHydroWEH.cpp @@ -8,62 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -GovHydroWEH::GovHydroWEH() {}; -GovHydroWEH::~GovHydroWEH() {}; +GovHydroWEH::GovHydroWEH() {} +GovHydroWEH::~GovHydroWEH() {} static const std::list PossibleProfilesForClass = { @@ -140,675 +89,724 @@ GovHydroWEH::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroWEH_db(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_db(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_dicn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_dicn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dicn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_dpv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_dpv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dpv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_dturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_dturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_feedbackSignal(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_feedbackSignal(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->feedbackSignal; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fl1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fl1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fl2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fl2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fl3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fl3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fl3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fl4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fl4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fl4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fl5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fl5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fl5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_gmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_gmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_gmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_gmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_gtmxcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_gtmxcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gtmxcl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_gtmxop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_gtmxop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gtmxop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_rpg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_rpg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rpg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_rpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_rpp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rpp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_tdv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_tdv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_tpe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_tpe(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpe; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroWEH_db(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db; if (!buffer.str().empty()) @@ -822,7 +820,8 @@ bool get_GovHydroWEH_db(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroWEH_dicn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dicn; if (!buffer.str().empty()) @@ -836,7 +835,8 @@ bool get_GovHydroWEH_dicn(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroWEH_dpv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dpv; if (!buffer.str().empty()) @@ -850,7 +850,8 @@ bool get_GovHydroWEH_dpv(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dturb; if (!buffer.str().empty()) @@ -864,7 +865,8 @@ bool get_GovHydroWEH_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_feedbackSignal(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->feedbackSignal; if (!buffer.str().empty()) @@ -878,7 +880,8 @@ bool get_GovHydroWEH_feedbackSignal(const BaseClass* BaseClass_ptr1, std::string bool get_GovHydroWEH_fl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fl1; if (!buffer.str().empty()) @@ -892,7 +895,8 @@ bool get_GovHydroWEH_fl1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fl2; if (!buffer.str().empty()) @@ -906,7 +910,8 @@ bool get_GovHydroWEH_fl2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fl3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fl3; if (!buffer.str().empty()) @@ -920,7 +925,8 @@ bool get_GovHydroWEH_fl3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fl4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fl4; if (!buffer.str().empty()) @@ -934,7 +940,8 @@ bool get_GovHydroWEH_fl4(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fl5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fl5; if (!buffer.str().empty()) @@ -948,7 +955,8 @@ bool get_GovHydroWEH_fl5(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fp1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp1; if (!buffer.str().empty()) @@ -962,7 +970,8 @@ bool get_GovHydroWEH_fp1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fp10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp10; if (!buffer.str().empty()) @@ -976,7 +985,8 @@ bool get_GovHydroWEH_fp10(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroWEH_fp2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp2; if (!buffer.str().empty()) @@ -990,7 +1000,8 @@ bool get_GovHydroWEH_fp2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fp3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp3; if (!buffer.str().empty()) @@ -1004,7 +1015,8 @@ bool get_GovHydroWEH_fp3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fp4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp4; if (!buffer.str().empty()) @@ -1018,7 +1030,8 @@ bool get_GovHydroWEH_fp4(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fp5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp5; if (!buffer.str().empty()) @@ -1032,7 +1045,8 @@ bool get_GovHydroWEH_fp5(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fp6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp6; if (!buffer.str().empty()) @@ -1046,7 +1060,8 @@ bool get_GovHydroWEH_fp6(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fp7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp7; if (!buffer.str().empty()) @@ -1060,7 +1075,8 @@ bool get_GovHydroWEH_fp7(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fp8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp8; if (!buffer.str().empty()) @@ -1074,7 +1090,8 @@ bool get_GovHydroWEH_fp8(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fp9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp9; if (!buffer.str().empty()) @@ -1088,7 +1105,8 @@ bool get_GovHydroWEH_fp9(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmax; if (!buffer.str().empty()) @@ -1102,7 +1120,8 @@ bool get_GovHydroWEH_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroWEH_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmin; if (!buffer.str().empty()) @@ -1116,7 +1135,8 @@ bool get_GovHydroWEH_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroWEH_gtmxcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gtmxcl; if (!buffer.str().empty()) @@ -1130,7 +1150,8 @@ bool get_GovHydroWEH_gtmxcl(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroWEH_gtmxop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gtmxop; if (!buffer.str().empty()) @@ -1144,7 +1165,8 @@ bool get_GovHydroWEH_gtmxop(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroWEH_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -1158,7 +1180,8 @@ bool get_GovHydroWEH_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -1172,7 +1195,8 @@ bool get_GovHydroWEH_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -1186,7 +1210,8 @@ bool get_GovHydroWEH_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -1200,7 +1225,8 @@ bool get_GovHydroWEH_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -1214,7 +1240,8 @@ bool get_GovHydroWEH_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -1228,7 +1255,8 @@ bool get_GovHydroWEH_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroWEH_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -1242,7 +1270,8 @@ bool get_GovHydroWEH_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroWEH_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -1256,7 +1285,8 @@ bool get_GovHydroWEH_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroWEH_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -1270,7 +1300,8 @@ bool get_GovHydroWEH_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroWEH_pmss1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss1; if (!buffer.str().empty()) @@ -1284,7 +1315,8 @@ bool get_GovHydroWEH_pmss1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_pmss10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss10; if (!buffer.str().empty()) @@ -1298,7 +1330,8 @@ bool get_GovHydroWEH_pmss10(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroWEH_pmss2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss2; if (!buffer.str().empty()) @@ -1312,7 +1345,8 @@ bool get_GovHydroWEH_pmss2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_pmss3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss3; if (!buffer.str().empty()) @@ -1326,7 +1360,8 @@ bool get_GovHydroWEH_pmss3(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_pmss4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss4; if (!buffer.str().empty()) @@ -1340,7 +1375,8 @@ bool get_GovHydroWEH_pmss4(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_pmss5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss5; if (!buffer.str().empty()) @@ -1354,7 +1390,8 @@ bool get_GovHydroWEH_pmss5(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_pmss6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss6; if (!buffer.str().empty()) @@ -1368,7 +1405,8 @@ bool get_GovHydroWEH_pmss6(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_pmss7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss7; if (!buffer.str().empty()) @@ -1382,7 +1420,8 @@ bool get_GovHydroWEH_pmss7(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_pmss8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss8; if (!buffer.str().empty()) @@ -1396,7 +1435,8 @@ bool get_GovHydroWEH_pmss8(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_pmss9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss9; if (!buffer.str().empty()) @@ -1410,7 +1450,8 @@ bool get_GovHydroWEH_pmss9(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_rpg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rpg; if (!buffer.str().empty()) @@ -1424,7 +1465,8 @@ bool get_GovHydroWEH_rpg(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_rpp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rpp; if (!buffer.str().empty()) @@ -1438,7 +1480,8 @@ bool get_GovHydroWEH_rpp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -1452,7 +1495,8 @@ bool get_GovHydroWEH_td(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroWEH_tdv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdv; if (!buffer.str().empty()) @@ -1466,7 +1510,8 @@ bool get_GovHydroWEH_tdv(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -1480,7 +1525,8 @@ bool get_GovHydroWEH_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroWEH_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -1494,7 +1540,8 @@ bool get_GovHydroWEH_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroWEH_tpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpe; if (!buffer.str().empty()) @@ -1508,7 +1555,8 @@ bool get_GovHydroWEH_tpe(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -1520,8 +1568,6 @@ bool get_GovHydroWEH_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char GovHydroWEH::debugName[] = "GovHydroWEH"; const char* GovHydroWEH::debugString() const { @@ -1530,62 +1576,62 @@ const char* GovHydroWEH::debugString() const void GovHydroWEH::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroWEH"), &GovHydroWEH_factory)); + factory_map.emplace("cim:GovHydroWEH", &GovHydroWEH_factory); } void GovHydroWEH::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.db"), &assign_GovHydroWEH_db)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.dicn"), &assign_GovHydroWEH_dicn)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.dpv"), &assign_GovHydroWEH_dpv)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.dturb"), &assign_GovHydroWEH_dturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.feedbackSignal"), &assign_GovHydroWEH_feedbackSignal)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fl1"), &assign_GovHydroWEH_fl1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fl2"), &assign_GovHydroWEH_fl2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fl3"), &assign_GovHydroWEH_fl3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fl4"), &assign_GovHydroWEH_fl4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fl5"), &assign_GovHydroWEH_fl5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp1"), &assign_GovHydroWEH_fp1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp10"), &assign_GovHydroWEH_fp10)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp2"), &assign_GovHydroWEH_fp2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp3"), &assign_GovHydroWEH_fp3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp4"), &assign_GovHydroWEH_fp4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp5"), &assign_GovHydroWEH_fp5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp6"), &assign_GovHydroWEH_fp6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp7"), &assign_GovHydroWEH_fp7)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp8"), &assign_GovHydroWEH_fp8)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp9"), &assign_GovHydroWEH_fp9)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.gmax"), &assign_GovHydroWEH_gmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.gmin"), &assign_GovHydroWEH_gmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.gtmxcl"), &assign_GovHydroWEH_gtmxcl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.gtmxop"), &assign_GovHydroWEH_gtmxop)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.gv1"), &assign_GovHydroWEH_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.gv2"), &assign_GovHydroWEH_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.gv3"), &assign_GovHydroWEH_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.gv4"), &assign_GovHydroWEH_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.gv5"), &assign_GovHydroWEH_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.kd"), &assign_GovHydroWEH_kd)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.ki"), &assign_GovHydroWEH_ki)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.kp"), &assign_GovHydroWEH_kp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.mwbase"), &assign_GovHydroWEH_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss1"), &assign_GovHydroWEH_pmss1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss10"), &assign_GovHydroWEH_pmss10)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss2"), &assign_GovHydroWEH_pmss2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss3"), &assign_GovHydroWEH_pmss3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss4"), &assign_GovHydroWEH_pmss4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss5"), &assign_GovHydroWEH_pmss5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss6"), &assign_GovHydroWEH_pmss6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss7"), &assign_GovHydroWEH_pmss7)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss8"), &assign_GovHydroWEH_pmss8)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss9"), &assign_GovHydroWEH_pmss9)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.rpg"), &assign_GovHydroWEH_rpg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.rpp"), &assign_GovHydroWEH_rpp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.td"), &assign_GovHydroWEH_td)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.tdv"), &assign_GovHydroWEH_tdv)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.tg"), &assign_GovHydroWEH_tg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.tp"), &assign_GovHydroWEH_tp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.tpe"), &assign_GovHydroWEH_tpe)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.tw"), &assign_GovHydroWEH_tw)); + assign_map.emplace("cim:GovHydroWEH.db", &assign_GovHydroWEH_db); + assign_map.emplace("cim:GovHydroWEH.dicn", &assign_GovHydroWEH_dicn); + assign_map.emplace("cim:GovHydroWEH.dpv", &assign_GovHydroWEH_dpv); + assign_map.emplace("cim:GovHydroWEH.dturb", &assign_GovHydroWEH_dturb); + assign_map.emplace("cim:GovHydroWEH.feedbackSignal", &assign_GovHydroWEH_feedbackSignal); + assign_map.emplace("cim:GovHydroWEH.fl1", &assign_GovHydroWEH_fl1); + assign_map.emplace("cim:GovHydroWEH.fl2", &assign_GovHydroWEH_fl2); + assign_map.emplace("cim:GovHydroWEH.fl3", &assign_GovHydroWEH_fl3); + assign_map.emplace("cim:GovHydroWEH.fl4", &assign_GovHydroWEH_fl4); + assign_map.emplace("cim:GovHydroWEH.fl5", &assign_GovHydroWEH_fl5); + assign_map.emplace("cim:GovHydroWEH.fp1", &assign_GovHydroWEH_fp1); + assign_map.emplace("cim:GovHydroWEH.fp10", &assign_GovHydroWEH_fp10); + assign_map.emplace("cim:GovHydroWEH.fp2", &assign_GovHydroWEH_fp2); + assign_map.emplace("cim:GovHydroWEH.fp3", &assign_GovHydroWEH_fp3); + assign_map.emplace("cim:GovHydroWEH.fp4", &assign_GovHydroWEH_fp4); + assign_map.emplace("cim:GovHydroWEH.fp5", &assign_GovHydroWEH_fp5); + assign_map.emplace("cim:GovHydroWEH.fp6", &assign_GovHydroWEH_fp6); + assign_map.emplace("cim:GovHydroWEH.fp7", &assign_GovHydroWEH_fp7); + assign_map.emplace("cim:GovHydroWEH.fp8", &assign_GovHydroWEH_fp8); + assign_map.emplace("cim:GovHydroWEH.fp9", &assign_GovHydroWEH_fp9); + assign_map.emplace("cim:GovHydroWEH.gmax", &assign_GovHydroWEH_gmax); + assign_map.emplace("cim:GovHydroWEH.gmin", &assign_GovHydroWEH_gmin); + assign_map.emplace("cim:GovHydroWEH.gtmxcl", &assign_GovHydroWEH_gtmxcl); + assign_map.emplace("cim:GovHydroWEH.gtmxop", &assign_GovHydroWEH_gtmxop); + assign_map.emplace("cim:GovHydroWEH.gv1", &assign_GovHydroWEH_gv1); + assign_map.emplace("cim:GovHydroWEH.gv2", &assign_GovHydroWEH_gv2); + assign_map.emplace("cim:GovHydroWEH.gv3", &assign_GovHydroWEH_gv3); + assign_map.emplace("cim:GovHydroWEH.gv4", &assign_GovHydroWEH_gv4); + assign_map.emplace("cim:GovHydroWEH.gv5", &assign_GovHydroWEH_gv5); + assign_map.emplace("cim:GovHydroWEH.kd", &assign_GovHydroWEH_kd); + assign_map.emplace("cim:GovHydroWEH.ki", &assign_GovHydroWEH_ki); + assign_map.emplace("cim:GovHydroWEH.kp", &assign_GovHydroWEH_kp); + assign_map.emplace("cim:GovHydroWEH.mwbase", &assign_GovHydroWEH_mwbase); + assign_map.emplace("cim:GovHydroWEH.pmss1", &assign_GovHydroWEH_pmss1); + assign_map.emplace("cim:GovHydroWEH.pmss10", &assign_GovHydroWEH_pmss10); + assign_map.emplace("cim:GovHydroWEH.pmss2", &assign_GovHydroWEH_pmss2); + assign_map.emplace("cim:GovHydroWEH.pmss3", &assign_GovHydroWEH_pmss3); + assign_map.emplace("cim:GovHydroWEH.pmss4", &assign_GovHydroWEH_pmss4); + assign_map.emplace("cim:GovHydroWEH.pmss5", &assign_GovHydroWEH_pmss5); + assign_map.emplace("cim:GovHydroWEH.pmss6", &assign_GovHydroWEH_pmss6); + assign_map.emplace("cim:GovHydroWEH.pmss7", &assign_GovHydroWEH_pmss7); + assign_map.emplace("cim:GovHydroWEH.pmss8", &assign_GovHydroWEH_pmss8); + assign_map.emplace("cim:GovHydroWEH.pmss9", &assign_GovHydroWEH_pmss9); + assign_map.emplace("cim:GovHydroWEH.rpg", &assign_GovHydroWEH_rpg); + assign_map.emplace("cim:GovHydroWEH.rpp", &assign_GovHydroWEH_rpp); + assign_map.emplace("cim:GovHydroWEH.td", &assign_GovHydroWEH_td); + assign_map.emplace("cim:GovHydroWEH.tdv", &assign_GovHydroWEH_tdv); + assign_map.emplace("cim:GovHydroWEH.tg", &assign_GovHydroWEH_tg); + assign_map.emplace("cim:GovHydroWEH.tp", &assign_GovHydroWEH_tp); + assign_map.emplace("cim:GovHydroWEH.tpe", &assign_GovHydroWEH_tpe); + assign_map.emplace("cim:GovHydroWEH.tw", &assign_GovHydroWEH_tw); } void GovHydroWEH::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/GovHydroWEH.hpp b/CGMES_2.4.15_16FEB2016/GovHydroWEH.hpp index 687f3bd88..8417378d5 100644 --- a/CGMES_2.4.15_16FEB2016/GovHydroWEH.hpp +++ b/CGMES_2.4.15_16FEB2016/GovHydroWEH.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Woodward Electric Hydro Governor Model. - */ + /** \brief Woodward Electric Hydro Governor Model. */ class GovHydroWEH : public TurbineGovernorDynamics { public: @@ -31,57 +29,158 @@ namespace CIMPP GovHydroWEH(); ~GovHydroWEH() override; - CIMPP::PU db; /* Speed Dead Band (db). Default: nullptr */ - CIMPP::PU dicn; /* Value to allow the integral controller to advance beyond the gate limits (Dicn). Default: nullptr */ - CIMPP::PU dpv; /* Value to allow the Pilot valve controller to advance beyond the gate limits (Dpv). Default: nullptr */ - CIMPP::PU dturb; /* Turbine damping factor (Dturb). Unit = delta P (PU of MWbase) / delta speed (PU). Default: nullptr */ - CIMPP::Boolean feedbackSignal; /* Feedback signal selection (Sw). true = PID Output (if R-Perm-Gate=droop and R-Perm-Pe=0) false = Electrical Power (if R-Perm-Gate=0 and R-Perm-Pe=droop) or false = Gate Position (if R-Perm-Gate=droop and R-Perm-Pe=0). Default: false */ - CIMPP::PU fl1; /* Flow Gate 1 (Fl1). Flow value for gate position point 1 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU fl2; /* Flow Gate 2 (Fl2). Flow value for gate position point 2 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU fl3; /* Flow Gate 3 (Fl3). Flow value for gate position point 3 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU fl4; /* Flow Gate 4 (Fl4). Flow value for gate position point 4 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU fl5; /* Flow Gate 5 (Fl5). Flow value for gate position point 5 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU fp1; /* Flow P1 (Fp1). Turbine Flow value for point 1 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU fp10; /* Flow P10 (Fp10). Turbine Flow value for point 10 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU fp2; /* Flow P2 (Fp2). Turbine Flow value for point 2 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU fp3; /* Flow P3 (Fp3). Turbine Flow value for point 3 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU fp4; /* Flow P4 (Fp4). Turbine Flow value for point 4 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU fp5; /* Flow P5 (Fp5). Turbine Flow value for point 5 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU fp6; /* Flow P6 (Fp6). Turbine Flow value for point 6 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU fp7; /* Flow P7 (Fp7). Turbine Flow value for point 7 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU fp8; /* Flow P8 (Fp8). Turbine Flow value for point 8 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU fp9; /* Flow P9 (Fp9). Turbine Flow value for point 9 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU gmax; /* Maximum Gate Position (Gmax). Default: nullptr */ - CIMPP::PU gmin; /* Minimum Gate Position (Gmin). Default: nullptr */ - CIMPP::PU gtmxcl; /* Maximum gate closing rate (Gtmxcl). Default: nullptr */ - CIMPP::PU gtmxop; /* Maximum gate opening rate (Gtmxop). Default: nullptr */ - CIMPP::PU gv1; /* Gate 1 (Gv1). Gate Position value for point 1 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU gv2; /* Gate 2 (Gv2). Gate Position value for point 2 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU gv3; /* Gate 3 (Gv3). Gate Position value for point 3 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU gv4; /* Gate 4 (Gv4). Gate Position value for point 4 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU gv5; /* Gate 5 (Gv5). Gate Position value for point 5 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU kd; /* Derivative controller derivative gain (Kd). Default: nullptr */ - CIMPP::PU ki; /* Derivative controller Integral gain (Ki). Default: nullptr */ - CIMPP::PU kp; /* Derivative control gain (Kp). Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU pmss1; /* Pmss Flow P1 (Pmss1). Mechanical Power output Pmss for Turbine Flow point 1 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU pmss10; /* Pmss Flow P10 (Pmss10). Mechanical Power output Pmss for Turbine Flow point 10 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU pmss2; /* Pmss Flow P2 (Pmss2). Mechanical Power output Pmss for Turbine Flow point 2 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU pmss3; /* Pmss Flow P3 (Pmss3). Mechanical Power output Pmss for Turbine Flow point 3 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU pmss4; /* Pmss Flow P4 (Pmss4). Mechanical Power output Pmss for Turbine Flow point 4 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU pmss5; /* Pmss Flow P5 (Pmss5). Mechanical Power output Pmss for Turbine Flow point 5 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU pmss6; /* Pmss Flow P6 (Pmss6). Mechanical Power output Pmss for Turbine Flow point 6 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU pmss7; /* Pmss Flow P7 (Pmss7). Mechanical Power output Pmss for Turbine Flow point 7 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU pmss8; /* Pmss Flow P8 (Pmss8). Mechanical Power output Pmss for Turbine Flow point 8 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU pmss9; /* Pmss Flow P9 (Pmss9). Mechanical Power output Pmss for Turbine Flow point 9 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::Simple_Float rpg; /* Permanent droop for governor output feedback (R-Perm-Gate). Default: nullptr */ - CIMPP::Simple_Float rpp; /* Permanent droop for electrical power feedback (R-Perm-Pe). Default: nullptr */ - CIMPP::Seconds td; /* Derivative controller time constant to limit the derivative characteristic beyond a breakdown frequency to avoid amplification of high-frequency noise (Td). Default: nullptr */ - CIMPP::Seconds tdv; /* Distributive Valve time lag time constant (Tdv). Default: nullptr */ - CIMPP::Seconds tg; /* Value to allow the Distribution valve controller to advance beyond the gate movement rate limit (Tg). Default: nullptr */ - CIMPP::Seconds tp; /* Pilot Valve time lag time constant (Tp). Default: nullptr */ - CIMPP::Seconds tpe; /* Electrical power droop time constant (Tpe). Default: nullptr */ - CIMPP::Seconds tw; /* Water inertia time constant (Tw) (>0). Default: nullptr */ + /** \brief Speed Dead Band (db). Default: nullptr */ + CIMPP::PU db; + + /** \brief Value to allow the integral controller to advance beyond the gate limits (Dicn). Default: nullptr */ + CIMPP::PU dicn; + + /** \brief Value to allow the Pilot valve controller to advance beyond the gate limits (Dpv). Default: nullptr */ + CIMPP::PU dpv; + + /** \brief Turbine damping factor (Dturb). Unit = delta P (PU of MWbase) / delta speed (PU). Default: nullptr */ + CIMPP::PU dturb; + + /** \brief Feedback signal selection (Sw). true = PID Output (if R-Perm-Gate=droop and R-Perm-Pe=0) false = Electrical Power (if R-Perm-Gate=0 and R-Perm-Pe=droop) or false = Gate Position (if R-Perm-Gate=droop and R-Perm-Pe=0). Default: false */ + CIMPP::Boolean feedbackSignal; + + /** \brief Flow Gate 1 (Fl1). Flow value for gate position point 1 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU fl1; + + /** \brief Flow Gate 2 (Fl2). Flow value for gate position point 2 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU fl2; + + /** \brief Flow Gate 3 (Fl3). Flow value for gate position point 3 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU fl3; + + /** \brief Flow Gate 4 (Fl4). Flow value for gate position point 4 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU fl4; + + /** \brief Flow Gate 5 (Fl5). Flow value for gate position point 5 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU fl5; + + /** \brief Flow P1 (Fp1). Turbine Flow value for point 1 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp1; + + /** \brief Flow P10 (Fp10). Turbine Flow value for point 10 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp10; + + /** \brief Flow P2 (Fp2). Turbine Flow value for point 2 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp2; + + /** \brief Flow P3 (Fp3). Turbine Flow value for point 3 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp3; + + /** \brief Flow P4 (Fp4). Turbine Flow value for point 4 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp4; + + /** \brief Flow P5 (Fp5). Turbine Flow value for point 5 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp5; + + /** \brief Flow P6 (Fp6). Turbine Flow value for point 6 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp6; + + /** \brief Flow P7 (Fp7). Turbine Flow value for point 7 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp7; + + /** \brief Flow P8 (Fp8). Turbine Flow value for point 8 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp8; + + /** \brief Flow P9 (Fp9). Turbine Flow value for point 9 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp9; + + /** \brief Maximum Gate Position (Gmax). Default: nullptr */ + CIMPP::PU gmax; + + /** \brief Minimum Gate Position (Gmin). Default: nullptr */ + CIMPP::PU gmin; + + /** \brief Maximum gate closing rate (Gtmxcl). Default: nullptr */ + CIMPP::PU gtmxcl; + + /** \brief Maximum gate opening rate (Gtmxop). Default: nullptr */ + CIMPP::PU gtmxop; + + /** \brief Gate 1 (Gv1). Gate Position value for point 1 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Gate 2 (Gv2). Gate Position value for point 2 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Gate 3 (Gv3). Gate Position value for point 3 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Gate 4 (Gv4). Gate Position value for point 4 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Gate 5 (Gv5). Gate Position value for point 5 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Derivative controller derivative gain (Kd). Default: nullptr */ + CIMPP::PU kd; + + /** \brief Derivative controller Integral gain (Ki). Default: nullptr */ + CIMPP::PU ki; + + /** \brief Derivative control gain (Kp). Default: nullptr */ + CIMPP::PU kp; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Pmss Flow P1 (Pmss1). Mechanical Power output Pmss for Turbine Flow point 1 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss1; + + /** \brief Pmss Flow P10 (Pmss10). Mechanical Power output Pmss for Turbine Flow point 10 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss10; + + /** \brief Pmss Flow P2 (Pmss2). Mechanical Power output Pmss for Turbine Flow point 2 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss2; + + /** \brief Pmss Flow P3 (Pmss3). Mechanical Power output Pmss for Turbine Flow point 3 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss3; + + /** \brief Pmss Flow P4 (Pmss4). Mechanical Power output Pmss for Turbine Flow point 4 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss4; + + /** \brief Pmss Flow P5 (Pmss5). Mechanical Power output Pmss for Turbine Flow point 5 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss5; + + /** \brief Pmss Flow P6 (Pmss6). Mechanical Power output Pmss for Turbine Flow point 6 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss6; + + /** \brief Pmss Flow P7 (Pmss7). Mechanical Power output Pmss for Turbine Flow point 7 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss7; + + /** \brief Pmss Flow P8 (Pmss8). Mechanical Power output Pmss for Turbine Flow point 8 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss8; + + /** \brief Pmss Flow P9 (Pmss9). Mechanical Power output Pmss for Turbine Flow point 9 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss9; + + /** \brief Permanent droop for governor output feedback (R-Perm-Gate). Default: nullptr */ + CIMPP::Simple_Float rpg; + + /** \brief Permanent droop for electrical power feedback (R-Perm-Pe). Default: nullptr */ + CIMPP::Simple_Float rpp; + + /** \brief Derivative controller time constant to limit the derivative characteristic beyond a breakdown frequency to avoid amplification of high-frequency noise (Td). Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Distributive Valve time lag time constant (Tdv). Default: nullptr */ + CIMPP::Seconds tdv; + + /** \brief Value to allow the Distribution valve controller to advance beyond the gate movement rate limit (Tg). Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Pilot Valve time lag time constant (Tp). Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Electrical power droop time constant (Tpe). Default: nullptr */ + CIMPP::Seconds tpe; + + /** \brief Water inertia time constant (Tw) (>0). Default: nullptr */ + CIMPP::Seconds tw; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GovHydroWPID.cpp b/CGMES_2.4.15_16FEB2016/GovHydroWPID.cpp index 4a392e676..52c605514 100644 --- a/CGMES_2.4.15_16FEB2016/GovHydroWPID.cpp +++ b/CGMES_2.4.15_16FEB2016/GovHydroWPID.cpp @@ -8,33 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -GovHydroWPID::GovHydroWPID() {}; -GovHydroWPID::~GovHydroWPID() {}; +GovHydroWPID::GovHydroWPID() {} +GovHydroWPID::~GovHydroWPID() {} static const std::list PossibleProfilesForClass = { @@ -82,298 +60,318 @@ GovHydroWPID::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroWPID_d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_d(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->d; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_gatmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_gatmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gatmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_gatmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_gatmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gatmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_reg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_reg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->reg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_treg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_treg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->treg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_velmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_velmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_velmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_velmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroWPID_d(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->d; if (!buffer.str().empty()) @@ -387,7 +385,8 @@ bool get_GovHydroWPID_d(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroWPID_gatmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gatmax; if (!buffer.str().empty()) @@ -401,7 +400,8 @@ bool get_GovHydroWPID_gatmax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroWPID_gatmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gatmin; if (!buffer.str().empty()) @@ -415,7 +415,8 @@ bool get_GovHydroWPID_gatmin(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroWPID_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -429,7 +430,8 @@ bool get_GovHydroWPID_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroWPID_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -443,7 +445,8 @@ bool get_GovHydroWPID_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroWPID_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -457,7 +460,8 @@ bool get_GovHydroWPID_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroWPID_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -471,7 +475,8 @@ bool get_GovHydroWPID_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWPID_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -485,7 +490,8 @@ bool get_GovHydroWPID_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWPID_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -499,7 +505,8 @@ bool get_GovHydroWPID_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWPID_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -513,7 +520,8 @@ bool get_GovHydroWPID_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroWPID_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -527,7 +535,8 @@ bool get_GovHydroWPID_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWPID_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -541,7 +550,8 @@ bool get_GovHydroWPID_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWPID_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -555,7 +565,8 @@ bool get_GovHydroWPID_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWPID_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -569,7 +580,8 @@ bool get_GovHydroWPID_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWPID_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -583,7 +595,8 @@ bool get_GovHydroWPID_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWPID_reg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->reg; if (!buffer.str().empty()) @@ -597,7 +610,8 @@ bool get_GovHydroWPID_reg(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroWPID_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -611,7 +625,8 @@ bool get_GovHydroWPID_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWPID_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -625,7 +640,8 @@ bool get_GovHydroWPID_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWPID_treg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->treg; if (!buffer.str().empty()) @@ -639,7 +655,8 @@ bool get_GovHydroWPID_treg(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWPID_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -653,7 +670,8 @@ bool get_GovHydroWPID_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWPID_velmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velmax; if (!buffer.str().empty()) @@ -667,7 +685,8 @@ bool get_GovHydroWPID_velmax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroWPID_velmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velmin; if (!buffer.str().empty()) @@ -679,8 +698,6 @@ bool get_GovHydroWPID_velmin(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char GovHydroWPID::debugName[] = "GovHydroWPID"; const char* GovHydroWPID::debugString() const { @@ -689,33 +706,33 @@ const char* GovHydroWPID::debugString() const void GovHydroWPID::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroWPID"), &GovHydroWPID_factory)); + factory_map.emplace("cim:GovHydroWPID", &GovHydroWPID_factory); } void GovHydroWPID::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.d"), &assign_GovHydroWPID_d)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.gatmax"), &assign_GovHydroWPID_gatmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.gatmin"), &assign_GovHydroWPID_gatmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.gv1"), &assign_GovHydroWPID_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.gv2"), &assign_GovHydroWPID_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.gv3"), &assign_GovHydroWPID_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.kd"), &assign_GovHydroWPID_kd)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.ki"), &assign_GovHydroWPID_ki)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.kp"), &assign_GovHydroWPID_kp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.mwbase"), &assign_GovHydroWPID_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.pgv1"), &assign_GovHydroWPID_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.pgv2"), &assign_GovHydroWPID_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.pgv3"), &assign_GovHydroWPID_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.pmax"), &assign_GovHydroWPID_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.pmin"), &assign_GovHydroWPID_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.reg"), &assign_GovHydroWPID_reg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.ta"), &assign_GovHydroWPID_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.tb"), &assign_GovHydroWPID_tb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.treg"), &assign_GovHydroWPID_treg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.tw"), &assign_GovHydroWPID_tw)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.velmax"), &assign_GovHydroWPID_velmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.velmin"), &assign_GovHydroWPID_velmin)); + assign_map.emplace("cim:GovHydroWPID.d", &assign_GovHydroWPID_d); + assign_map.emplace("cim:GovHydroWPID.gatmax", &assign_GovHydroWPID_gatmax); + assign_map.emplace("cim:GovHydroWPID.gatmin", &assign_GovHydroWPID_gatmin); + assign_map.emplace("cim:GovHydroWPID.gv1", &assign_GovHydroWPID_gv1); + assign_map.emplace("cim:GovHydroWPID.gv2", &assign_GovHydroWPID_gv2); + assign_map.emplace("cim:GovHydroWPID.gv3", &assign_GovHydroWPID_gv3); + assign_map.emplace("cim:GovHydroWPID.kd", &assign_GovHydroWPID_kd); + assign_map.emplace("cim:GovHydroWPID.ki", &assign_GovHydroWPID_ki); + assign_map.emplace("cim:GovHydroWPID.kp", &assign_GovHydroWPID_kp); + assign_map.emplace("cim:GovHydroWPID.mwbase", &assign_GovHydroWPID_mwbase); + assign_map.emplace("cim:GovHydroWPID.pgv1", &assign_GovHydroWPID_pgv1); + assign_map.emplace("cim:GovHydroWPID.pgv2", &assign_GovHydroWPID_pgv2); + assign_map.emplace("cim:GovHydroWPID.pgv3", &assign_GovHydroWPID_pgv3); + assign_map.emplace("cim:GovHydroWPID.pmax", &assign_GovHydroWPID_pmax); + assign_map.emplace("cim:GovHydroWPID.pmin", &assign_GovHydroWPID_pmin); + assign_map.emplace("cim:GovHydroWPID.reg", &assign_GovHydroWPID_reg); + assign_map.emplace("cim:GovHydroWPID.ta", &assign_GovHydroWPID_ta); + assign_map.emplace("cim:GovHydroWPID.tb", &assign_GovHydroWPID_tb); + assign_map.emplace("cim:GovHydroWPID.treg", &assign_GovHydroWPID_treg); + assign_map.emplace("cim:GovHydroWPID.tw", &assign_GovHydroWPID_tw); + assign_map.emplace("cim:GovHydroWPID.velmax", &assign_GovHydroWPID_velmax); + assign_map.emplace("cim:GovHydroWPID.velmin", &assign_GovHydroWPID_velmin); } void GovHydroWPID::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/GovHydroWPID.hpp b/CGMES_2.4.15_16FEB2016/GovHydroWPID.hpp index de5f8f0c6..7c5d870fa 100644 --- a/CGMES_2.4.15_16FEB2016/GovHydroWPID.hpp +++ b/CGMES_2.4.15_16FEB2016/GovHydroWPID.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Woodward PID Hydro Governor. - */ + /** \brief Woodward PID Hydro Governor. */ class GovHydroWPID : public TurbineGovernorDynamics { public: @@ -29,28 +27,71 @@ namespace CIMPP GovHydroWPID(); ~GovHydroWPID() override; - CIMPP::PU d; /* Turbine damping factor (D). Unit = delta P / delta speed. Default: nullptr */ - CIMPP::PU gatmax; /* Gate opening Limit Maximum (Gatmax). Default: nullptr */ - CIMPP::PU gatmin; /* Gate opening Limit Minimum (Gatmin). Default: nullptr */ - CIMPP::PU gv1; /* Gate position 1 (Gv1). Default: nullptr */ - CIMPP::PU gv2; /* Gate position 2 (Gv2). Default: nullptr */ - CIMPP::PU gv3; /* Gate position 3 (Gv3). Default: nullptr */ - CIMPP::PU kd; /* Derivative gain (Kd). Typical Value = 1.11. Default: nullptr */ - CIMPP::PU ki; /* Reset gain (Ki). Typical Value = 0.36. Default: nullptr */ - CIMPP::PU kp; /* Proportional gain (Kp). Typical Value = 0.1. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Output at Gv1 PU of MWbase (Pgv1). Default: nullptr */ - CIMPP::PU pgv2; /* Output at Gv2 PU of MWbase (Pgv2). Default: nullptr */ - CIMPP::PU pgv3; /* Output at Gv3 PU of MWbase (Pgv3). Default: nullptr */ - CIMPP::PU pmax; /* Maximum Power Output (Pmax). Default: nullptr */ - CIMPP::PU pmin; /* Minimum Power Output (Pmin). Default: nullptr */ - CIMPP::PU reg; /* Permanent drop (Reg). Default: nullptr */ - CIMPP::Seconds ta; /* Controller time constant (Ta) (>0). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tb; /* Gate servo time constant (Tb) (>0). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds treg; /* Speed detector time constant (Treg). Default: nullptr */ - CIMPP::Seconds tw; /* Water inertia time constant (Tw) (>0). Typical Value = 0. Default: nullptr */ - CIMPP::PU velmax; /* Maximum gate opening velocity (Velmax). Unit = PU/sec. Typical Value = 0. Default: nullptr */ - CIMPP::PU velmin; /* Maximum gate closing velocity (Velmin). Unit = PU/sec. Typical Value = 0. Default: nullptr */ + /** \brief Turbine damping factor (D). Unit = delta P / delta speed. Default: nullptr */ + CIMPP::PU d; + + /** \brief Gate opening Limit Maximum (Gatmax). Default: nullptr */ + CIMPP::PU gatmax; + + /** \brief Gate opening Limit Minimum (Gatmin). Default: nullptr */ + CIMPP::PU gatmin; + + /** \brief Gate position 1 (Gv1). Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Gate position 2 (Gv2). Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Gate position 3 (Gv3). Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Derivative gain (Kd). Typical Value = 1.11. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Reset gain (Ki). Typical Value = 0.36. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Proportional gain (Kp). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Output at Gv1 PU of MWbase (Pgv1). Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Output at Gv2 PU of MWbase (Pgv2). Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Output at Gv3 PU of MWbase (Pgv3). Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Maximum Power Output (Pmax). Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum Power Output (Pmin). Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Permanent drop (Reg). Default: nullptr */ + CIMPP::PU reg; + + /** \brief Controller time constant (Ta) (>0). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Gate servo time constant (Tb) (>0). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Speed detector time constant (Treg). Default: nullptr */ + CIMPP::Seconds treg; + + /** \brief Water inertia time constant (Tw) (>0). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tw; + + /** \brief Maximum gate opening velocity (Velmax). Unit = PU/sec. Typical Value = 0. Default: nullptr */ + CIMPP::PU velmax; + + /** \brief Maximum gate closing velocity (Velmin). Unit = PU/sec. Typical Value = 0. Default: nullptr */ + CIMPP::PU velmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GovSteam0.cpp b/CGMES_2.4.15_16FEB2016/GovSteam0.cpp index 936ef9f65..cc1c74f62 100644 --- a/CGMES_2.4.15_16FEB2016/GovSteam0.cpp +++ b/CGMES_2.4.15_16FEB2016/GovSteam0.cpp @@ -8,19 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -GovSteam0::GovSteam0() {}; -GovSteam0::~GovSteam0() {}; +GovSteam0::GovSteam0() {} +GovSteam0::~GovSteam0() {} static const std::list PossibleProfilesForClass = { @@ -54,116 +46,122 @@ GovSteam0::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteam0_dt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam0_dt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam0_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam0_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam0_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam0_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam0_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam0_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam0_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam0_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam0_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam0_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam0_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam0_vmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam0_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam0_vmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteam0_dt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dt; if (!buffer.str().empty()) @@ -177,7 +175,8 @@ bool get_GovSteam0_dt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam0_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -191,7 +190,8 @@ bool get_GovSteam0_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteam0_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -205,7 +205,8 @@ bool get_GovSteam0_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovSteam0_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -219,7 +220,8 @@ bool get_GovSteam0_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam0_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -233,7 +235,8 @@ bool get_GovSteam0_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam0_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -247,7 +250,8 @@ bool get_GovSteam0_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam0_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmax; if (!buffer.str().empty()) @@ -261,7 +265,8 @@ bool get_GovSteam0_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam0_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmin; if (!buffer.str().empty()) @@ -273,8 +278,6 @@ bool get_GovSteam0_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char GovSteam0::debugName[] = "GovSteam0"; const char* GovSteam0::debugString() const { @@ -283,19 +286,19 @@ const char* GovSteam0::debugString() const void GovSteam0::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteam0"), &GovSteam0_factory)); + factory_map.emplace("cim:GovSteam0", &GovSteam0_factory); } void GovSteam0::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteam0.dt"), &assign_GovSteam0_dt)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam0.mwbase"), &assign_GovSteam0_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam0.r"), &assign_GovSteam0_r)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam0.t1"), &assign_GovSteam0_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam0.t2"), &assign_GovSteam0_t2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam0.t3"), &assign_GovSteam0_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam0.vmax"), &assign_GovSteam0_vmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam0.vmin"), &assign_GovSteam0_vmin)); + assign_map.emplace("cim:GovSteam0.dt", &assign_GovSteam0_dt); + assign_map.emplace("cim:GovSteam0.mwbase", &assign_GovSteam0_mwbase); + assign_map.emplace("cim:GovSteam0.r", &assign_GovSteam0_r); + assign_map.emplace("cim:GovSteam0.t1", &assign_GovSteam0_t1); + assign_map.emplace("cim:GovSteam0.t2", &assign_GovSteam0_t2); + assign_map.emplace("cim:GovSteam0.t3", &assign_GovSteam0_t3); + assign_map.emplace("cim:GovSteam0.vmax", &assign_GovSteam0_vmax); + assign_map.emplace("cim:GovSteam0.vmin", &assign_GovSteam0_vmin); } void GovSteam0::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/GovSteam0.hpp b/CGMES_2.4.15_16FEB2016/GovSteam0.hpp index 1a700ab1d..9929fe7ad 100644 --- a/CGMES_2.4.15_16FEB2016/GovSteam0.hpp +++ b/CGMES_2.4.15_16FEB2016/GovSteam0.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A simplified steam turbine governor model. - */ + /** \brief A simplified steam turbine governor model. */ class GovSteam0 : public TurbineGovernorDynamics { public: @@ -29,14 +27,29 @@ namespace CIMPP GovSteam0(); ~GovSteam0() override; - CIMPP::PU dt; /* Turbine damping coefficient (Dt). Unit = delta P / delta speed. Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU r; /* Permanent droop (R). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds t1; /* Steam bowl time constant (T1). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds t2; /* Numerator time constant of T2/T3 block (T2). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds t3; /* Reheater time constant (T3). Typical Value = 10. Default: nullptr */ - CIMPP::PU vmax; /* Maximum valve position, PU of mwcap (Vmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU vmin; /* Minimum valve position, PU of mwcap (Vmin). Typical Value = 0. Default: nullptr */ + /** \brief Turbine damping coefficient (Dt). Unit = delta P / delta speed. Typical Value = 0. Default: nullptr */ + CIMPP::PU dt; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Permanent droop (R). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU r; + + /** \brief Steam bowl time constant (T1). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Numerator time constant of T2/T3 block (T2). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Reheater time constant (T3). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Maximum valve position, PU of mwcap (Vmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU vmax; + + /** \brief Minimum valve position, PU of mwcap (Vmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU vmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GovSteam1.cpp b/CGMES_2.4.15_16FEB2016/GovSteam1.cpp index 0eb4ba0ba..9f3c107a5 100644 --- a/CGMES_2.4.15_16FEB2016/GovSteam1.cpp +++ b/CGMES_2.4.15_16FEB2016/GovSteam1.cpp @@ -8,50 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Frequency.hpp" -#include "ActivePower.hpp" -#include "Frequency.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Boolean.hpp" using namespace CIMPP; -GovSteam1::GovSteam1() {}; -GovSteam1::~GovSteam1() {}; +GovSteam1::GovSteam1() {} +GovSteam1::~GovSteam1() {} static const std::list PossibleProfilesForClass = { @@ -116,519 +77,556 @@ GovSteam1::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteam1_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_eps(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eps; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_gv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_k4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_k5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_k5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_k6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_k6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_k7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_k7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_k8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_k8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_pgv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_sdb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_sdb1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->sdb1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_sdb2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_sdb2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->sdb2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_t7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_uc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_uo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_uo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_valve(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_valve(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->valve; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteam1_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -642,7 +640,8 @@ bool get_GovSteam1_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam1_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -656,7 +655,8 @@ bool get_GovSteam1_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam1_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eps; if (!buffer.str().empty()) @@ -670,7 +670,8 @@ bool get_GovSteam1_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam1_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -684,7 +685,8 @@ bool get_GovSteam1_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam1_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -698,7 +700,8 @@ bool get_GovSteam1_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam1_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -712,7 +715,8 @@ bool get_GovSteam1_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam1_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -726,7 +730,8 @@ bool get_GovSteam1_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam1_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -740,7 +745,8 @@ bool get_GovSteam1_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam1_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv6; if (!buffer.str().empty()) @@ -754,7 +760,8 @@ bool get_GovSteam1_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam1_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -768,7 +775,8 @@ bool get_GovSteam1_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovSteam1_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -782,7 +790,8 @@ bool get_GovSteam1_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -796,7 +805,8 @@ bool get_GovSteam1_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -810,7 +820,8 @@ bool get_GovSteam1_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k4; if (!buffer.str().empty()) @@ -824,7 +835,8 @@ bool get_GovSteam1_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k5; if (!buffer.str().empty()) @@ -838,7 +850,8 @@ bool get_GovSteam1_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_k6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k6; if (!buffer.str().empty()) @@ -852,7 +865,8 @@ bool get_GovSteam1_k6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_k7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k7; if (!buffer.str().empty()) @@ -866,7 +880,8 @@ bool get_GovSteam1_k7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_k8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k8; if (!buffer.str().empty()) @@ -880,7 +895,8 @@ bool get_GovSteam1_k8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -894,7 +910,8 @@ bool get_GovSteam1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteam1_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -908,7 +925,8 @@ bool get_GovSteam1_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -922,7 +940,8 @@ bool get_GovSteam1_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -936,7 +955,8 @@ bool get_GovSteam1_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -950,7 +970,8 @@ bool get_GovSteam1_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -964,7 +985,8 @@ bool get_GovSteam1_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv6; if (!buffer.str().empty()) @@ -978,7 +1000,8 @@ bool get_GovSteam1_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -992,7 +1015,8 @@ bool get_GovSteam1_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -1006,7 +1030,8 @@ bool get_GovSteam1_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_sdb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->sdb1; if (!buffer.str().empty()) @@ -1020,7 +1045,8 @@ bool get_GovSteam1_sdb1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_sdb2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->sdb2; if (!buffer.str().empty()) @@ -1034,7 +1060,8 @@ bool get_GovSteam1_sdb2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -1048,7 +1075,8 @@ bool get_GovSteam1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -1062,7 +1090,8 @@ bool get_GovSteam1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -1076,7 +1105,8 @@ bool get_GovSteam1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -1090,7 +1120,8 @@ bool get_GovSteam1_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -1104,7 +1135,8 @@ bool get_GovSteam1_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -1118,7 +1150,8 @@ bool get_GovSteam1_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t7; if (!buffer.str().empty()) @@ -1132,7 +1165,8 @@ bool get_GovSteam1_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uc; if (!buffer.str().empty()) @@ -1146,7 +1180,8 @@ bool get_GovSteam1_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uo; if (!buffer.str().empty()) @@ -1160,7 +1195,8 @@ bool get_GovSteam1_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_valve(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->valve; if (!buffer.str().empty()) @@ -1172,8 +1208,6 @@ bool get_GovSteam1_valve(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } - - const char GovSteam1::debugName[] = "GovSteam1"; const char* GovSteam1::debugString() const { @@ -1182,50 +1216,50 @@ const char* GovSteam1::debugString() const void GovSteam1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteam1"), &GovSteam1_factory)); + factory_map.emplace("cim:GovSteam1", &GovSteam1_factory); } void GovSteam1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.db1"), &assign_GovSteam1_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.db2"), &assign_GovSteam1_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.eps"), &assign_GovSteam1_eps)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.gv1"), &assign_GovSteam1_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.gv2"), &assign_GovSteam1_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.gv3"), &assign_GovSteam1_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.gv4"), &assign_GovSteam1_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.gv5"), &assign_GovSteam1_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.gv6"), &assign_GovSteam1_gv6)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.k"), &assign_GovSteam1_k)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.k1"), &assign_GovSteam1_k1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.k2"), &assign_GovSteam1_k2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.k3"), &assign_GovSteam1_k3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.k4"), &assign_GovSteam1_k4)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.k5"), &assign_GovSteam1_k5)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.k6"), &assign_GovSteam1_k6)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.k7"), &assign_GovSteam1_k7)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.k8"), &assign_GovSteam1_k8)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.mwbase"), &assign_GovSteam1_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.pgv1"), &assign_GovSteam1_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.pgv2"), &assign_GovSteam1_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.pgv3"), &assign_GovSteam1_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.pgv4"), &assign_GovSteam1_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.pgv5"), &assign_GovSteam1_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.pgv6"), &assign_GovSteam1_pgv6)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.pmax"), &assign_GovSteam1_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.pmin"), &assign_GovSteam1_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.sdb1"), &assign_GovSteam1_sdb1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.sdb2"), &assign_GovSteam1_sdb2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.t1"), &assign_GovSteam1_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.t2"), &assign_GovSteam1_t2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.t3"), &assign_GovSteam1_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.t4"), &assign_GovSteam1_t4)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.t5"), &assign_GovSteam1_t5)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.t6"), &assign_GovSteam1_t6)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.t7"), &assign_GovSteam1_t7)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.uc"), &assign_GovSteam1_uc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.uo"), &assign_GovSteam1_uo)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.valve"), &assign_GovSteam1_valve)); + assign_map.emplace("cim:GovSteam1.db1", &assign_GovSteam1_db1); + assign_map.emplace("cim:GovSteam1.db2", &assign_GovSteam1_db2); + assign_map.emplace("cim:GovSteam1.eps", &assign_GovSteam1_eps); + assign_map.emplace("cim:GovSteam1.gv1", &assign_GovSteam1_gv1); + assign_map.emplace("cim:GovSteam1.gv2", &assign_GovSteam1_gv2); + assign_map.emplace("cim:GovSteam1.gv3", &assign_GovSteam1_gv3); + assign_map.emplace("cim:GovSteam1.gv4", &assign_GovSteam1_gv4); + assign_map.emplace("cim:GovSteam1.gv5", &assign_GovSteam1_gv5); + assign_map.emplace("cim:GovSteam1.gv6", &assign_GovSteam1_gv6); + assign_map.emplace("cim:GovSteam1.k", &assign_GovSteam1_k); + assign_map.emplace("cim:GovSteam1.k1", &assign_GovSteam1_k1); + assign_map.emplace("cim:GovSteam1.k2", &assign_GovSteam1_k2); + assign_map.emplace("cim:GovSteam1.k3", &assign_GovSteam1_k3); + assign_map.emplace("cim:GovSteam1.k4", &assign_GovSteam1_k4); + assign_map.emplace("cim:GovSteam1.k5", &assign_GovSteam1_k5); + assign_map.emplace("cim:GovSteam1.k6", &assign_GovSteam1_k6); + assign_map.emplace("cim:GovSteam1.k7", &assign_GovSteam1_k7); + assign_map.emplace("cim:GovSteam1.k8", &assign_GovSteam1_k8); + assign_map.emplace("cim:GovSteam1.mwbase", &assign_GovSteam1_mwbase); + assign_map.emplace("cim:GovSteam1.pgv1", &assign_GovSteam1_pgv1); + assign_map.emplace("cim:GovSteam1.pgv2", &assign_GovSteam1_pgv2); + assign_map.emplace("cim:GovSteam1.pgv3", &assign_GovSteam1_pgv3); + assign_map.emplace("cim:GovSteam1.pgv4", &assign_GovSteam1_pgv4); + assign_map.emplace("cim:GovSteam1.pgv5", &assign_GovSteam1_pgv5); + assign_map.emplace("cim:GovSteam1.pgv6", &assign_GovSteam1_pgv6); + assign_map.emplace("cim:GovSteam1.pmax", &assign_GovSteam1_pmax); + assign_map.emplace("cim:GovSteam1.pmin", &assign_GovSteam1_pmin); + assign_map.emplace("cim:GovSteam1.sdb1", &assign_GovSteam1_sdb1); + assign_map.emplace("cim:GovSteam1.sdb2", &assign_GovSteam1_sdb2); + assign_map.emplace("cim:GovSteam1.t1", &assign_GovSteam1_t1); + assign_map.emplace("cim:GovSteam1.t2", &assign_GovSteam1_t2); + assign_map.emplace("cim:GovSteam1.t3", &assign_GovSteam1_t3); + assign_map.emplace("cim:GovSteam1.t4", &assign_GovSteam1_t4); + assign_map.emplace("cim:GovSteam1.t5", &assign_GovSteam1_t5); + assign_map.emplace("cim:GovSteam1.t6", &assign_GovSteam1_t6); + assign_map.emplace("cim:GovSteam1.t7", &assign_GovSteam1_t7); + assign_map.emplace("cim:GovSteam1.uc", &assign_GovSteam1_uc); + assign_map.emplace("cim:GovSteam1.uo", &assign_GovSteam1_uo); + assign_map.emplace("cim:GovSteam1.valve", &assign_GovSteam1_valve); } void GovSteam1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/GovSteam1.hpp b/CGMES_2.4.15_16FEB2016/GovSteam1.hpp index 6600a3c67..da362ba99 100644 --- a/CGMES_2.4.15_16FEB2016/GovSteam1.hpp +++ b/CGMES_2.4.15_16FEB2016/GovSteam1.hpp @@ -22,9 +22,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Steam turbine governor model, based on the GovSteamIEEE1 model (with optional deadband and nonlinear valve gain added). - */ + /** \brief Steam turbine governor model, based on the GovSteamIEEE1 model (with optional deadband and nonlinear valve gain added). */ class GovSteam1 : public TurbineGovernorDynamics { public: @@ -32,45 +30,122 @@ namespace CIMPP GovSteam1(); ~GovSteam1() override; - CIMPP::Frequency db1; /* Intentional deadband width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower db2; /* Unintentional deadband (db2). Unit = MW. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency eps; /* Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::PU gv1; /* Nonlinear gain valve position point 1 (GV1). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain valve position point 2 (GV2). Typical Value = 0.4. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain valve position point 3 (GV3). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain valve position point 4 (GV4). Typical Value = 0.6. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain valve position point 5 (GV5). Typical Value = 1. Default: nullptr */ - CIMPP::PU gv6; /* Nonlinear gain valve position point 6 (GV6). Typical Value = 0. Default: nullptr */ - CIMPP::PU k; /* Governor gain (reciprocal of droop) (K) (>0). Typical Value = 25. Default: nullptr */ - CIMPP::Simple_Float k1; /* Fraction of HP shaft power after first boiler pass (K1). Typical Value = 0.2. Default: nullptr */ - CIMPP::Simple_Float k2; /* Fraction of LP shaft power after first boiler pass (K2). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float k3; /* Fraction of HP shaft power after second boiler pass (K3). Typical Value = 0.3. Default: nullptr */ - CIMPP::Simple_Float k4; /* Fraction of LP shaft power after second boiler pass (K4). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float k5; /* Fraction of HP shaft power after third boiler pass (K5). Typical Value = 0.5. Default: nullptr */ - CIMPP::Simple_Float k6; /* Fraction of LP shaft power after third boiler pass (K6). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float k7; /* Fraction of HP shaft power after fourth boiler pass (K7). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float k8; /* Fraction of LP shaft power after fourth boiler pass (K8). Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain power value point 1 (Pgv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain power value point 2 (Pgv2). Typical Value = 0.75. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain power value point 3 (Pgv3). Typical Value = 0.91. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain power value point 4 (Pgv4). Typical Value = 0.98. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain power value point 5 (Pgv5). Typical Value = 1. Default: nullptr */ - CIMPP::PU pgv6; /* Nonlinear gain power value point 6 (Pgv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU pmax; /* Maximum valve opening (Pmax) (> Pmin). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum valve opening (Pmin) (>=0). Typical Value = 0. Default: nullptr */ - CIMPP::Boolean sdb1; /* Intentional deadband indicator. true = intentional deadband is applied false = intentional deadband is not applied. Typical Value = true. Default: false */ - CIMPP::Boolean sdb2; /* Unintentional deadband location. true = intentional deadband is applied before point `A` false = intentional deadband is applied after point `A`. Typical Value = true. Default: false */ - CIMPP::Seconds t1; /* Governor lag time constant (T1). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t2; /* Governor lead time constant (T2). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t3; /* Valve positioner time constant (T3(>0). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t4; /* Inlet piping/steam bowl time constant (T4). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds t5; /* Time constant of second boiler pass (T5). Typical Value = 5. Default: nullptr */ - CIMPP::Seconds t6; /* Time constant of third boiler pass (T6). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds t7; /* Time constant of fourth boiler pass (T7). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float uc; /* Maximum valve closing velocity (Uc) (<0). Unit = PU/sec. Typical Value = -10. Default: nullptr */ - CIMPP::Simple_Float uo; /* Maximum valve opening velocity (Uo) (>0). Unit = PU/sec. Typical Value = 1. Default: nullptr */ - CIMPP::Boolean valve; /* Nonlinear valve characteristic. true = nonlinear valve characteristic is used false = nonlinear valve characteristic is not used. Typical Value = true. Default: false */ + /** \brief Intentional deadband width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Unintentional deadband (db2). Unit = MW. Typical Value = 0. Default: nullptr */ + CIMPP::ActivePower db2; + + /** \brief Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency eps; + + /** \brief Nonlinear gain valve position point 1 (GV1). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain valve position point 2 (GV2). Typical Value = 0.4. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain valve position point 3 (GV3). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain valve position point 4 (GV4). Typical Value = 0.6. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain valve position point 5 (GV5). Typical Value = 1. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Nonlinear gain valve position point 6 (GV6). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv6; + + /** \brief Governor gain (reciprocal of droop) (K) (>0). Typical Value = 25. Default: nullptr */ + CIMPP::PU k; + + /** \brief Fraction of HP shaft power after first boiler pass (K1). Typical Value = 0.2. Default: nullptr */ + CIMPP::Simple_Float k1; + + /** \brief Fraction of LP shaft power after first boiler pass (K2). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float k2; + + /** \brief Fraction of HP shaft power after second boiler pass (K3). Typical Value = 0.3. Default: nullptr */ + CIMPP::Simple_Float k3; + + /** \brief Fraction of LP shaft power after second boiler pass (K4). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float k4; + + /** \brief Fraction of HP shaft power after third boiler pass (K5). Typical Value = 0.5. Default: nullptr */ + CIMPP::Simple_Float k5; + + /** \brief Fraction of LP shaft power after third boiler pass (K6). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float k6; + + /** \brief Fraction of HP shaft power after fourth boiler pass (K7). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float k7; + + /** \brief Fraction of LP shaft power after fourth boiler pass (K8). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float k8; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain power value point 1 (Pgv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain power value point 2 (Pgv2). Typical Value = 0.75. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain power value point 3 (Pgv3). Typical Value = 0.91. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain power value point 4 (Pgv4). Typical Value = 0.98. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain power value point 5 (Pgv5). Typical Value = 1. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief Nonlinear gain power value point 6 (Pgv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv6; + + /** \brief Maximum valve opening (Pmax) (> Pmin). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum valve opening (Pmin) (>=0). Typical Value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Intentional deadband indicator. true = intentional deadband is applied false = intentional deadband is not applied. Typical Value = true. Default: false */ + CIMPP::Boolean sdb1; + + /** \brief Unintentional deadband location. true = intentional deadband is applied before point `A` false = intentional deadband is applied after point `A`. Typical Value = true. Default: false */ + CIMPP::Boolean sdb2; + + /** \brief Governor lag time constant (T1). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Governor lead time constant (T2). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Valve positioner time constant (T3(>0). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Inlet piping/steam bowl time constant (T4). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant of second boiler pass (T5). Typical Value = 5. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Time constant of third boiler pass (T6). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time constant of fourth boiler pass (T7). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t7; + + /** \brief Maximum valve closing velocity (Uc) (<0). Unit = PU/sec. Typical Value = -10. Default: nullptr */ + CIMPP::Simple_Float uc; + + /** \brief Maximum valve opening velocity (Uo) (>0). Unit = PU/sec. Typical Value = 1. Default: nullptr */ + CIMPP::Simple_Float uo; + + /** \brief Nonlinear valve characteristic. true = nonlinear valve characteristic is used false = nonlinear valve characteristic is not used. Typical Value = true. Default: false */ + CIMPP::Boolean valve; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GovSteam2.cpp b/CGMES_2.4.15_16FEB2016/GovSteam2.cpp index c67011777..8696d39ab 100644 --- a/CGMES_2.4.15_16FEB2016/GovSteam2.cpp +++ b/CGMES_2.4.15_16FEB2016/GovSteam2.cpp @@ -8,19 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -GovSteam2::GovSteam2() {}; -GovSteam2::~GovSteam2() {}; +GovSteam2::GovSteam2() {} +GovSteam2::~GovSteam2() {} static const std::list PossibleProfilesForClass = { @@ -54,116 +46,122 @@ GovSteam2::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteam2_dbf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam2_dbf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dbf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam2_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam2_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam2_mnef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam2_mnef(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mnef; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam2_mxef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam2_mxef(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mxef; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam2_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam2_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam2_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam2_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam2_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam2_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam2_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam2_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteam2_dbf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dbf; if (!buffer.str().empty()) @@ -177,7 +175,8 @@ bool get_GovSteam2_dbf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam2_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -191,7 +190,8 @@ bool get_GovSteam2_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovSteam2_mnef(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mnef; if (!buffer.str().empty()) @@ -205,7 +205,8 @@ bool get_GovSteam2_mnef(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam2_mxef(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mxef; if (!buffer.str().empty()) @@ -219,7 +220,8 @@ bool get_GovSteam2_mxef(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam2_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -233,7 +235,8 @@ bool get_GovSteam2_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam2_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -247,7 +250,8 @@ bool get_GovSteam2_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam2_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -261,7 +265,8 @@ bool get_GovSteam2_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam2_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -273,8 +278,6 @@ bool get_GovSteam2_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char GovSteam2::debugName[] = "GovSteam2"; const char* GovSteam2::debugString() const { @@ -283,19 +286,19 @@ const char* GovSteam2::debugString() const void GovSteam2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteam2"), &GovSteam2_factory)); + factory_map.emplace("cim:GovSteam2", &GovSteam2_factory); } void GovSteam2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteam2.dbf"), &assign_GovSteam2_dbf)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam2.k"), &assign_GovSteam2_k)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam2.mnef"), &assign_GovSteam2_mnef)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam2.mxef"), &assign_GovSteam2_mxef)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam2.pmax"), &assign_GovSteam2_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam2.pmin"), &assign_GovSteam2_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam2.t1"), &assign_GovSteam2_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam2.t2"), &assign_GovSteam2_t2)); + assign_map.emplace("cim:GovSteam2.dbf", &assign_GovSteam2_dbf); + assign_map.emplace("cim:GovSteam2.k", &assign_GovSteam2_k); + assign_map.emplace("cim:GovSteam2.mnef", &assign_GovSteam2_mnef); + assign_map.emplace("cim:GovSteam2.mxef", &assign_GovSteam2_mxef); + assign_map.emplace("cim:GovSteam2.pmax", &assign_GovSteam2_pmax); + assign_map.emplace("cim:GovSteam2.pmin", &assign_GovSteam2_pmin); + assign_map.emplace("cim:GovSteam2.t1", &assign_GovSteam2_t1); + assign_map.emplace("cim:GovSteam2.t2", &assign_GovSteam2_t2); } void GovSteam2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/GovSteam2.hpp b/CGMES_2.4.15_16FEB2016/GovSteam2.hpp index d3571354f..1968c0eb3 100644 --- a/CGMES_2.4.15_16FEB2016/GovSteam2.hpp +++ b/CGMES_2.4.15_16FEB2016/GovSteam2.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Simplified governor model. - */ + /** \brief Simplified governor model. */ class GovSteam2 : public TurbineGovernorDynamics { public: @@ -29,14 +27,29 @@ namespace CIMPP GovSteam2(); ~GovSteam2() override; - CIMPP::PU dbf; /* Frequency dead band (DBF). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float k; /* Governor gain (reciprocal of droop) (K). Typical Value = 20. Default: nullptr */ - CIMPP::PU mnef; /* Fuel flow maximum negative error value (MN). Typical Value = -1. Default: nullptr */ - CIMPP::PU mxef; /* Fuel flow maximum positive error value (MX). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmax; /* Maximum fuel flow (P). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum fuel flow (P). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t1; /* Governor lag time constant (T) (>0). Typical Value = 0.45. Default: nullptr */ - CIMPP::Seconds t2; /* Governor lead time constant (T) (may be 0). Typical Value = 0. Default: nullptr */ + /** \brief Frequency dead band (DBF). Typical Value = 0. Default: nullptr */ + CIMPP::PU dbf; + + /** \brief Governor gain (reciprocal of droop) (K). Typical Value = 20. Default: nullptr */ + CIMPP::Simple_Float k; + + /** \brief Fuel flow maximum negative error value (MN). Typical Value = -1. Default: nullptr */ + CIMPP::PU mnef; + + /** \brief Fuel flow maximum positive error value (MX). Typical Value = 1. Default: nullptr */ + CIMPP::PU mxef; + + /** \brief Maximum fuel flow (P). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum fuel flow (P). Typical Value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Governor lag time constant (T) (>0). Typical Value = 0.45. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Governor lead time constant (T) (may be 0). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t2; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GovSteamCC.cpp b/CGMES_2.4.15_16FEB2016/GovSteamCC.cpp index ba02e8c7f..9d214c83b 100644 --- a/CGMES_2.4.15_16FEB2016/GovSteamCC.cpp +++ b/CGMES_2.4.15_16FEB2016/GovSteamCC.cpp @@ -8,28 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -GovSteamCC::GovSteamCC() {}; -GovSteamCC::~GovSteamCC() {}; +GovSteamCC::GovSteamCC() {} +GovSteamCC::~GovSteamCC() {} static const std::list PossibleProfilesForClass = { @@ -72,233 +55,248 @@ GovSteamCC::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteamCC_dhp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_dhp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dhp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_dlp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_dlp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dlp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_fhp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_fhp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fhp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_flp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_flp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_pmaxhp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_pmaxhp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmaxhp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_pmaxlp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_pmaxlp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmaxlp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_rhp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_rhp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rhp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_rlp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_rlp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rlp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_t1hp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_t1hp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1hp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_t1lp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_t1lp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1lp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_t3hp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_t3hp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3hp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_t3lp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_t3lp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3lp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_t4hp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_t4hp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4hp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_t4lp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_t4lp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4lp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_t5hp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_t5hp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5hp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_t5lp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_t5lp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5lp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteamCC_dhp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dhp; if (!buffer.str().empty()) @@ -312,7 +310,8 @@ bool get_GovSteamCC_dhp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamCC_dlp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dlp; if (!buffer.str().empty()) @@ -326,7 +325,8 @@ bool get_GovSteamCC_dlp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamCC_fhp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fhp; if (!buffer.str().empty()) @@ -340,7 +340,8 @@ bool get_GovSteamCC_fhp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamCC_flp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flp; if (!buffer.str().empty()) @@ -354,7 +355,8 @@ bool get_GovSteamCC_flp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamCC_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -368,7 +370,8 @@ bool get_GovSteamCC_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamCC_pmaxhp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmaxhp; if (!buffer.str().empty()) @@ -382,7 +385,8 @@ bool get_GovSteamCC_pmaxhp(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamCC_pmaxlp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmaxlp; if (!buffer.str().empty()) @@ -396,7 +400,8 @@ bool get_GovSteamCC_pmaxlp(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamCC_rhp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rhp; if (!buffer.str().empty()) @@ -410,7 +415,8 @@ bool get_GovSteamCC_rhp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamCC_rlp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rlp; if (!buffer.str().empty()) @@ -424,7 +430,8 @@ bool get_GovSteamCC_rlp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamCC_t1hp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1hp; if (!buffer.str().empty()) @@ -438,7 +445,8 @@ bool get_GovSteamCC_t1hp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamCC_t1lp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1lp; if (!buffer.str().empty()) @@ -452,7 +460,8 @@ bool get_GovSteamCC_t1lp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamCC_t3hp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3hp; if (!buffer.str().empty()) @@ -466,7 +475,8 @@ bool get_GovSteamCC_t3hp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamCC_t3lp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3lp; if (!buffer.str().empty()) @@ -480,7 +490,8 @@ bool get_GovSteamCC_t3lp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamCC_t4hp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4hp; if (!buffer.str().empty()) @@ -494,7 +505,8 @@ bool get_GovSteamCC_t4hp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamCC_t4lp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4lp; if (!buffer.str().empty()) @@ -508,7 +520,8 @@ bool get_GovSteamCC_t4lp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamCC_t5hp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5hp; if (!buffer.str().empty()) @@ -522,7 +535,8 @@ bool get_GovSteamCC_t5hp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamCC_t5lp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5lp; if (!buffer.str().empty()) @@ -534,8 +548,6 @@ bool get_GovSteamCC_t5lp(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } - - const char GovSteamCC::debugName[] = "GovSteamCC"; const char* GovSteamCC::debugString() const { @@ -544,28 +556,28 @@ const char* GovSteamCC::debugString() const void GovSteamCC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteamCC"), &GovSteamCC_factory)); + factory_map.emplace("cim:GovSteamCC", &GovSteamCC_factory); } void GovSteamCC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.dhp"), &assign_GovSteamCC_dhp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.dlp"), &assign_GovSteamCC_dlp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.fhp"), &assign_GovSteamCC_fhp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.flp"), &assign_GovSteamCC_flp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.mwbase"), &assign_GovSteamCC_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.pmaxhp"), &assign_GovSteamCC_pmaxhp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.pmaxlp"), &assign_GovSteamCC_pmaxlp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.rhp"), &assign_GovSteamCC_rhp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.rlp"), &assign_GovSteamCC_rlp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.t1hp"), &assign_GovSteamCC_t1hp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.t1lp"), &assign_GovSteamCC_t1lp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.t3hp"), &assign_GovSteamCC_t3hp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.t3lp"), &assign_GovSteamCC_t3lp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.t4hp"), &assign_GovSteamCC_t4hp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.t4lp"), &assign_GovSteamCC_t4lp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.t5hp"), &assign_GovSteamCC_t5hp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.t5lp"), &assign_GovSteamCC_t5lp)); + assign_map.emplace("cim:GovSteamCC.dhp", &assign_GovSteamCC_dhp); + assign_map.emplace("cim:GovSteamCC.dlp", &assign_GovSteamCC_dlp); + assign_map.emplace("cim:GovSteamCC.fhp", &assign_GovSteamCC_fhp); + assign_map.emplace("cim:GovSteamCC.flp", &assign_GovSteamCC_flp); + assign_map.emplace("cim:GovSteamCC.mwbase", &assign_GovSteamCC_mwbase); + assign_map.emplace("cim:GovSteamCC.pmaxhp", &assign_GovSteamCC_pmaxhp); + assign_map.emplace("cim:GovSteamCC.pmaxlp", &assign_GovSteamCC_pmaxlp); + assign_map.emplace("cim:GovSteamCC.rhp", &assign_GovSteamCC_rhp); + assign_map.emplace("cim:GovSteamCC.rlp", &assign_GovSteamCC_rlp); + assign_map.emplace("cim:GovSteamCC.t1hp", &assign_GovSteamCC_t1hp); + assign_map.emplace("cim:GovSteamCC.t1lp", &assign_GovSteamCC_t1lp); + assign_map.emplace("cim:GovSteamCC.t3hp", &assign_GovSteamCC_t3hp); + assign_map.emplace("cim:GovSteamCC.t3lp", &assign_GovSteamCC_t3lp); + assign_map.emplace("cim:GovSteamCC.t4hp", &assign_GovSteamCC_t4hp); + assign_map.emplace("cim:GovSteamCC.t4lp", &assign_GovSteamCC_t4lp); + assign_map.emplace("cim:GovSteamCC.t5hp", &assign_GovSteamCC_t5hp); + assign_map.emplace("cim:GovSteamCC.t5lp", &assign_GovSteamCC_t5lp); } void GovSteamCC::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/GovSteamCC.hpp b/CGMES_2.4.15_16FEB2016/GovSteamCC.hpp index f29c2642d..1e7c7a97d 100644 --- a/CGMES_2.4.15_16FEB2016/GovSteamCC.hpp +++ b/CGMES_2.4.15_16FEB2016/GovSteamCC.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Cross compound turbine governor model. - */ + /** \brief Cross compound turbine governor model. */ class GovSteamCC : public TurbineGovernorDynamics { public: @@ -29,23 +27,56 @@ namespace CIMPP GovSteamCC(); ~GovSteamCC() override; - CIMPP::PU dhp; /* HP damping factor (Dhp). Typical Value = 0. Default: nullptr */ - CIMPP::PU dlp; /* LP damping factor (Dlp). Typical Value = 0. Default: nullptr */ - CIMPP::PU fhp; /* Fraction of HP power ahead of reheater (Fhp). Typical Value = 0.3. Default: nullptr */ - CIMPP::PU flp; /* Fraction of LP power ahead of reheater (Flp). Typical Value = 0.7. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU pmaxhp; /* Maximum HP value position (Pmaxhp). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmaxlp; /* Maximum LP value position (Pmaxlp). Typical Value = 1. Default: nullptr */ - CIMPP::PU rhp; /* HP governor droop (Rhp). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU rlp; /* LP governor droop (Rlp). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds t1hp; /* HP governor time constant (T1hp). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t1lp; /* LP governor time constant (T1lp). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t3hp; /* HP turbine time constant (T3hp). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t3lp; /* LP turbine time constant (T3lp). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t4hp; /* HP turbine time constant (T4hp). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t4lp; /* LP turbine time constant (T4lp). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t5hp; /* HP reheater time constant (T5hp). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds t5lp; /* LP reheater time constant (T5lp). Typical Value = 10. Default: nullptr */ + /** \brief HP damping factor (Dhp). Typical Value = 0. Default: nullptr */ + CIMPP::PU dhp; + + /** \brief LP damping factor (Dlp). Typical Value = 0. Default: nullptr */ + CIMPP::PU dlp; + + /** \brief Fraction of HP power ahead of reheater (Fhp). Typical Value = 0.3. Default: nullptr */ + CIMPP::PU fhp; + + /** \brief Fraction of LP power ahead of reheater (Flp). Typical Value = 0.7. Default: nullptr */ + CIMPP::PU flp; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Maximum HP value position (Pmaxhp). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmaxhp; + + /** \brief Maximum LP value position (Pmaxlp). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmaxlp; + + /** \brief HP governor droop (Rhp). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU rhp; + + /** \brief LP governor droop (Rlp). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU rlp; + + /** \brief HP governor time constant (T1hp). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t1hp; + + /** \brief LP governor time constant (T1lp). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t1lp; + + /** \brief HP turbine time constant (T3hp). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t3hp; + + /** \brief LP turbine time constant (T3lp). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t3lp; + + /** \brief HP turbine time constant (T4hp). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t4hp; + + /** \brief LP turbine time constant (T4lp). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t4lp; + + /** \brief HP reheater time constant (T5hp). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds t5hp; + + /** \brief LP reheater time constant (T5lp). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds t5lp; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GovSteamEU.cpp b/CGMES_2.4.15_16FEB2016/GovSteamEU.cpp index 892a23aad..79c47df8b 100644 --- a/CGMES_2.4.15_16FEB2016/GovSteamEU.cpp +++ b/CGMES_2.4.15_16FEB2016/GovSteamEU.cpp @@ -8,46 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -GovSteamEU::GovSteamEU() {}; -GovSteamEU::~GovSteamEU() {}; +GovSteamEU::GovSteamEU() {} +GovSteamEU::~GovSteamEU() {} static const std::list PossibleProfilesForClass = { @@ -108,467 +73,500 @@ GovSteamEU::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteamEU_chc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_chc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->chc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_cho(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_cho(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->cho; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_cic(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_cic(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->cic; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_cio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_cio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->cio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_hhpmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_hhpmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->hhpmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_kfcor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_kfcor(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kfcor; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_khp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_khp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->khp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_klp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_klp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->klp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_kwcor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_kwcor(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kwcor; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_prhmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_prhmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->prhmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_simx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_simx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->simx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tdp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tdp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_ten(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_ten(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ten; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tfp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tfp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tfp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_thp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_thp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->thp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tip(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tip; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tlp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tlp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tlp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_trh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_trh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->trh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tvhp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tvhp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tvhp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tvip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tvip(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tvip; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_wfmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_wfmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wfmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_wfmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_wfmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wfmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_wmax1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_wmax1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wmax1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_wmax2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_wmax2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wmax2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_wwmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_wwmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wwmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_wwmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_wwmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wwmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteamEU_chc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->chc; if (!buffer.str().empty()) @@ -582,7 +580,8 @@ bool get_GovSteamEU_chc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_cho(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->cho; if (!buffer.str().empty()) @@ -596,7 +595,8 @@ bool get_GovSteamEU_cho(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_cic(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->cic; if (!buffer.str().empty()) @@ -610,7 +610,8 @@ bool get_GovSteamEU_cic(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_cio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->cio; if (!buffer.str().empty()) @@ -624,7 +625,8 @@ bool get_GovSteamEU_cio(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -638,7 +640,8 @@ bool get_GovSteamEU_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -652,7 +655,8 @@ bool get_GovSteamEU_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_hhpmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hhpmax; if (!buffer.str().empty()) @@ -666,7 +670,8 @@ bool get_GovSteamEU_hhpmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamEU_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -680,7 +685,8 @@ bool get_GovSteamEU_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamEU_kfcor(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kfcor; if (!buffer.str().empty()) @@ -694,7 +700,8 @@ bool get_GovSteamEU_kfcor(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamEU_khp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->khp; if (!buffer.str().empty()) @@ -708,7 +715,8 @@ bool get_GovSteamEU_khp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_klp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->klp; if (!buffer.str().empty()) @@ -722,7 +730,8 @@ bool get_GovSteamEU_klp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_kwcor(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kwcor; if (!buffer.str().empty()) @@ -736,7 +745,8 @@ bool get_GovSteamEU_kwcor(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamEU_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -750,7 +760,8 @@ bool get_GovSteamEU_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamEU_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -764,7 +775,8 @@ bool get_GovSteamEU_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamEU_prhmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->prhmax; if (!buffer.str().empty()) @@ -778,7 +790,8 @@ bool get_GovSteamEU_prhmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamEU_simx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->simx; if (!buffer.str().empty()) @@ -792,7 +805,8 @@ bool get_GovSteamEU_simx(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamEU_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -806,7 +820,8 @@ bool get_GovSteamEU_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamEU_tdp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdp; if (!buffer.str().empty()) @@ -820,7 +835,8 @@ bool get_GovSteamEU_tdp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_ten(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ten; if (!buffer.str().empty()) @@ -834,7 +850,8 @@ bool get_GovSteamEU_ten(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -848,7 +865,8 @@ bool get_GovSteamEU_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamEU_tfp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tfp; if (!buffer.str().empty()) @@ -862,7 +880,8 @@ bool get_GovSteamEU_tfp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_thp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thp; if (!buffer.str().empty()) @@ -876,7 +895,8 @@ bool get_GovSteamEU_thp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_tip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tip; if (!buffer.str().empty()) @@ -890,7 +910,8 @@ bool get_GovSteamEU_tip(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_tlp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tlp; if (!buffer.str().empty()) @@ -904,7 +925,8 @@ bool get_GovSteamEU_tlp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -918,7 +940,8 @@ bool get_GovSteamEU_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamEU_trh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->trh; if (!buffer.str().empty()) @@ -932,7 +955,8 @@ bool get_GovSteamEU_trh(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_tvhp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tvhp; if (!buffer.str().empty()) @@ -946,7 +970,8 @@ bool get_GovSteamEU_tvhp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamEU_tvip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tvip; if (!buffer.str().empty()) @@ -960,7 +985,8 @@ bool get_GovSteamEU_tvip(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamEU_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -974,7 +1000,8 @@ bool get_GovSteamEU_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamEU_wfmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wfmax; if (!buffer.str().empty()) @@ -988,7 +1015,8 @@ bool get_GovSteamEU_wfmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamEU_wfmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wfmin; if (!buffer.str().empty()) @@ -1002,7 +1030,8 @@ bool get_GovSteamEU_wfmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamEU_wmax1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wmax1; if (!buffer.str().empty()) @@ -1016,7 +1045,8 @@ bool get_GovSteamEU_wmax1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamEU_wmax2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wmax2; if (!buffer.str().empty()) @@ -1030,7 +1060,8 @@ bool get_GovSteamEU_wmax2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamEU_wwmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wwmax; if (!buffer.str().empty()) @@ -1044,7 +1075,8 @@ bool get_GovSteamEU_wwmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamEU_wwmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wwmin; if (!buffer.str().empty()) @@ -1056,8 +1088,6 @@ bool get_GovSteamEU_wwmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char GovSteamEU::debugName[] = "GovSteamEU"; const char* GovSteamEU::debugString() const { @@ -1066,46 +1096,46 @@ const char* GovSteamEU::debugString() const void GovSteamEU::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteamEU"), &GovSteamEU_factory)); + factory_map.emplace("cim:GovSteamEU", &GovSteamEU_factory); } void GovSteamEU::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.chc"), &assign_GovSteamEU_chc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.cho"), &assign_GovSteamEU_cho)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.cic"), &assign_GovSteamEU_cic)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.cio"), &assign_GovSteamEU_cio)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.db1"), &assign_GovSteamEU_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.db2"), &assign_GovSteamEU_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.hhpmax"), &assign_GovSteamEU_hhpmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.ke"), &assign_GovSteamEU_ke)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.kfcor"), &assign_GovSteamEU_kfcor)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.khp"), &assign_GovSteamEU_khp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.klp"), &assign_GovSteamEU_klp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.kwcor"), &assign_GovSteamEU_kwcor)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.mwbase"), &assign_GovSteamEU_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.pmax"), &assign_GovSteamEU_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.prhmax"), &assign_GovSteamEU_prhmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.simx"), &assign_GovSteamEU_simx)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tb"), &assign_GovSteamEU_tb)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tdp"), &assign_GovSteamEU_tdp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.ten"), &assign_GovSteamEU_ten)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tf"), &assign_GovSteamEU_tf)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tfp"), &assign_GovSteamEU_tfp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.thp"), &assign_GovSteamEU_thp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tip"), &assign_GovSteamEU_tip)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tlp"), &assign_GovSteamEU_tlp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tp"), &assign_GovSteamEU_tp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.trh"), &assign_GovSteamEU_trh)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tvhp"), &assign_GovSteamEU_tvhp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tvip"), &assign_GovSteamEU_tvip)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tw"), &assign_GovSteamEU_tw)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.wfmax"), &assign_GovSteamEU_wfmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.wfmin"), &assign_GovSteamEU_wfmin)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.wmax1"), &assign_GovSteamEU_wmax1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.wmax2"), &assign_GovSteamEU_wmax2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.wwmax"), &assign_GovSteamEU_wwmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.wwmin"), &assign_GovSteamEU_wwmin)); + assign_map.emplace("cim:GovSteamEU.chc", &assign_GovSteamEU_chc); + assign_map.emplace("cim:GovSteamEU.cho", &assign_GovSteamEU_cho); + assign_map.emplace("cim:GovSteamEU.cic", &assign_GovSteamEU_cic); + assign_map.emplace("cim:GovSteamEU.cio", &assign_GovSteamEU_cio); + assign_map.emplace("cim:GovSteamEU.db1", &assign_GovSteamEU_db1); + assign_map.emplace("cim:GovSteamEU.db2", &assign_GovSteamEU_db2); + assign_map.emplace("cim:GovSteamEU.hhpmax", &assign_GovSteamEU_hhpmax); + assign_map.emplace("cim:GovSteamEU.ke", &assign_GovSteamEU_ke); + assign_map.emplace("cim:GovSteamEU.kfcor", &assign_GovSteamEU_kfcor); + assign_map.emplace("cim:GovSteamEU.khp", &assign_GovSteamEU_khp); + assign_map.emplace("cim:GovSteamEU.klp", &assign_GovSteamEU_klp); + assign_map.emplace("cim:GovSteamEU.kwcor", &assign_GovSteamEU_kwcor); + assign_map.emplace("cim:GovSteamEU.mwbase", &assign_GovSteamEU_mwbase); + assign_map.emplace("cim:GovSteamEU.pmax", &assign_GovSteamEU_pmax); + assign_map.emplace("cim:GovSteamEU.prhmax", &assign_GovSteamEU_prhmax); + assign_map.emplace("cim:GovSteamEU.simx", &assign_GovSteamEU_simx); + assign_map.emplace("cim:GovSteamEU.tb", &assign_GovSteamEU_tb); + assign_map.emplace("cim:GovSteamEU.tdp", &assign_GovSteamEU_tdp); + assign_map.emplace("cim:GovSteamEU.ten", &assign_GovSteamEU_ten); + assign_map.emplace("cim:GovSteamEU.tf", &assign_GovSteamEU_tf); + assign_map.emplace("cim:GovSteamEU.tfp", &assign_GovSteamEU_tfp); + assign_map.emplace("cim:GovSteamEU.thp", &assign_GovSteamEU_thp); + assign_map.emplace("cim:GovSteamEU.tip", &assign_GovSteamEU_tip); + assign_map.emplace("cim:GovSteamEU.tlp", &assign_GovSteamEU_tlp); + assign_map.emplace("cim:GovSteamEU.tp", &assign_GovSteamEU_tp); + assign_map.emplace("cim:GovSteamEU.trh", &assign_GovSteamEU_trh); + assign_map.emplace("cim:GovSteamEU.tvhp", &assign_GovSteamEU_tvhp); + assign_map.emplace("cim:GovSteamEU.tvip", &assign_GovSteamEU_tvip); + assign_map.emplace("cim:GovSteamEU.tw", &assign_GovSteamEU_tw); + assign_map.emplace("cim:GovSteamEU.wfmax", &assign_GovSteamEU_wfmax); + assign_map.emplace("cim:GovSteamEU.wfmin", &assign_GovSteamEU_wfmin); + assign_map.emplace("cim:GovSteamEU.wmax1", &assign_GovSteamEU_wmax1); + assign_map.emplace("cim:GovSteamEU.wmax2", &assign_GovSteamEU_wmax2); + assign_map.emplace("cim:GovSteamEU.wwmax", &assign_GovSteamEU_wwmax); + assign_map.emplace("cim:GovSteamEU.wwmin", &assign_GovSteamEU_wwmin); } void GovSteamEU::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/GovSteamEU.hpp b/CGMES_2.4.15_16FEB2016/GovSteamEU.hpp index 2203532f0..8a76be166 100644 --- a/CGMES_2.4.15_16FEB2016/GovSteamEU.hpp +++ b/CGMES_2.4.15_16FEB2016/GovSteamEU.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Simplified model of boiler and steam turbine with PID governor. - */ + /** \brief Simplified model of boiler and steam turbine with PID governor. */ class GovSteamEU : public TurbineGovernorDynamics { public: @@ -30,41 +28,110 @@ namespace CIMPP GovSteamEU(); ~GovSteamEU() override; - CIMPP::Simple_Float chc; /* Control valves rate closing limit (Chc). Unit = PU/sec. Typical Value = -3.3. Default: nullptr */ - CIMPP::Simple_Float cho; /* Control valves rate opening limit (Cho). Unit = PU/sec. Typical Value = 0.17. Default: nullptr */ - CIMPP::PU cic; /* Intercept valves rate closing limit (Cic). Typical Value = -2.2. Default: nullptr */ - CIMPP::PU cio; /* Intercept valves rate opening limit (Cio). Typical Value = 0.123. Default: nullptr */ - CIMPP::PU db1; /* Dead band of the frequency corrector (db1). Typical Value = 0. Default: nullptr */ - CIMPP::PU db2; /* Dead band of the speed governor (db2). Typical Value = 0.0004. Default: nullptr */ - CIMPP::PU hhpmax; /* Maximum control valve position (Hhpmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU ke; /* Gain of the power controller (Ke). Typical Value = 0.65. Default: nullptr */ - CIMPP::PU kfcor; /* Gain of the frequency corrector (Kfcor). Typical Value = 20. Default: nullptr */ - CIMPP::PU khp; /* Fraction of total turbine output generated by HP part (Khp). Typical Value = 0.277. Default: nullptr */ - CIMPP::PU klp; /* Fraction of total turbine output generated by HP part (Klp). Typical Value = 0.723. Default: nullptr */ - CIMPP::PU kwcor; /* Gain of the speed governor (Kwcor). Typical Value = 20. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU pmax; /* Maximal active power of the turbine (Pmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU prhmax; /* Maximum low pressure limit (Prhmax). Typical Value = 1.4. Default: nullptr */ - CIMPP::PU simx; /* Intercept valves transfer limit (Simx). Typical Value = 0.425. Default: nullptr */ - CIMPP::Seconds tb; /* Boiler time constant (Tb). Typical Value = 100. Default: nullptr */ - CIMPP::Seconds tdp; /* Derivative time constant of the power controller (Tdp). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ten; /* Electro hydraulic transducer (Ten). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tf; /* Frequency transducer time constant (Tf). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tfp; /* Time constant of the power controller (Tfp). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds thp; /* High pressure (HP) time constant of the turbine (Thp). Typical Value = 0.31. Default: nullptr */ - CIMPP::Seconds tip; /* Integral time constant of the power controller (Tip). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds tlp; /* Low pressure(LP) time constant of the turbine (Tlp). Typical Value = 0.45. Default: nullptr */ - CIMPP::Seconds tp; /* Power transducer time constant (Tp). Typical Value = 0.07. Default: nullptr */ - CIMPP::Seconds trh; /* Reheater time constant of the turbine (Trh). Typical Value = 8. Default: nullptr */ - CIMPP::Seconds tvhp; /* Control valves servo time constant (Tvhp). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tvip; /* Intercept valves servo time constant (Tvip). Typical Value = 0.15. Default: nullptr */ - CIMPP::Seconds tw; /* Speed transducer time constant (Tw). Typical Value = 0.02. Default: nullptr */ - CIMPP::PU wfmax; /* Upper limit for frequency correction (Wfmax). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU wfmin; /* Lower limit for frequency correction (Wfmin). Typical Value = -0.05. Default: nullptr */ - CIMPP::PU wmax1; /* Emergency speed control lower limit (wmax1). Typical Value = 1.025. Default: nullptr */ - CIMPP::PU wmax2; /* Emergency speed control upper limit (wmax2). Typical Value = 1.05. Default: nullptr */ - CIMPP::PU wwmax; /* Upper limit for the speed governor (Wwmax). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU wwmin; /* Lower limit for the speed governor frequency correction (Wwmin). Typical Value = -1. Default: nullptr */ + /** \brief Control valves rate closing limit (Chc). Unit = PU/sec. Typical Value = -3.3. Default: nullptr */ + CIMPP::Simple_Float chc; + + /** \brief Control valves rate opening limit (Cho). Unit = PU/sec. Typical Value = 0.17. Default: nullptr */ + CIMPP::Simple_Float cho; + + /** \brief Intercept valves rate closing limit (Cic). Typical Value = -2.2. Default: nullptr */ + CIMPP::PU cic; + + /** \brief Intercept valves rate opening limit (Cio). Typical Value = 0.123. Default: nullptr */ + CIMPP::PU cio; + + /** \brief Dead band of the frequency corrector (db1). Typical Value = 0. Default: nullptr */ + CIMPP::PU db1; + + /** \brief Dead band of the speed governor (db2). Typical Value = 0.0004. Default: nullptr */ + CIMPP::PU db2; + + /** \brief Maximum control valve position (Hhpmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU hhpmax; + + /** \brief Gain of the power controller (Ke). Typical Value = 0.65. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Gain of the frequency corrector (Kfcor). Typical Value = 20. Default: nullptr */ + CIMPP::PU kfcor; + + /** \brief Fraction of total turbine output generated by HP part (Khp). Typical Value = 0.277. Default: nullptr */ + CIMPP::PU khp; + + /** \brief Fraction of total turbine output generated by HP part (Klp). Typical Value = 0.723. Default: nullptr */ + CIMPP::PU klp; + + /** \brief Gain of the speed governor (Kwcor). Typical Value = 20. Default: nullptr */ + CIMPP::PU kwcor; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Maximal active power of the turbine (Pmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Maximum low pressure limit (Prhmax). Typical Value = 1.4. Default: nullptr */ + CIMPP::PU prhmax; + + /** \brief Intercept valves transfer limit (Simx). Typical Value = 0.425. Default: nullptr */ + CIMPP::PU simx; + + /** \brief Boiler time constant (Tb). Typical Value = 100. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Derivative time constant of the power controller (Tdp). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tdp; + + /** \brief Electro hydraulic transducer (Ten). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds ten; + + /** \brief Frequency transducer time constant (Tf). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Time constant of the power controller (Tfp). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tfp; + + /** \brief High pressure (HP) time constant of the turbine (Thp). Typical Value = 0.31. Default: nullptr */ + CIMPP::Seconds thp; + + /** \brief Integral time constant of the power controller (Tip). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds tip; + + /** \brief Low pressure(LP) time constant of the turbine (Tlp). Typical Value = 0.45. Default: nullptr */ + CIMPP::Seconds tlp; + + /** \brief Power transducer time constant (Tp). Typical Value = 0.07. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Reheater time constant of the turbine (Trh). Typical Value = 8. Default: nullptr */ + CIMPP::Seconds trh; + + /** \brief Control valves servo time constant (Tvhp). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tvhp; + + /** \brief Intercept valves servo time constant (Tvip). Typical Value = 0.15. Default: nullptr */ + CIMPP::Seconds tvip; + + /** \brief Speed transducer time constant (Tw). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds tw; + + /** \brief Upper limit for frequency correction (Wfmax). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU wfmax; + + /** \brief Lower limit for frequency correction (Wfmin). Typical Value = -0.05. Default: nullptr */ + CIMPP::PU wfmin; + + /** \brief Emergency speed control lower limit (wmax1). Typical Value = 1.025. Default: nullptr */ + CIMPP::PU wmax1; + + /** \brief Emergency speed control upper limit (wmax2). Typical Value = 1.05. Default: nullptr */ + CIMPP::PU wmax2; + + /** \brief Upper limit for the speed governor (Wwmax). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU wwmax; + + /** \brief Lower limit for the speed governor frequency correction (Wwmin). Typical Value = -1. Default: nullptr */ + CIMPP::PU wwmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GovSteamFV2.cpp b/CGMES_2.4.15_16FEB2016/GovSteamFV2.cpp index 39cd34463..2859415ca 100644 --- a/CGMES_2.4.15_16FEB2016/GovSteamFV2.cpp +++ b/CGMES_2.4.15_16FEB2016/GovSteamFV2.cpp @@ -8,24 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -GovSteamFV2::GovSteamFV2() {}; -GovSteamFV2::~GovSteamFV2() {}; +GovSteamFV2::GovSteamFV2() {} +GovSteamFV2::~GovSteamFV2() {} static const std::list PossibleProfilesForClass = { @@ -64,181 +51,192 @@ GovSteamFV2::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteamFV2_dt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_dt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_ti(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_ti(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_tt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_vmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_vmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteamFV2_dt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dt; if (!buffer.str().empty()) @@ -252,7 +250,8 @@ bool get_GovSteamFV2_dt(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV2_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -266,7 +265,8 @@ bool get_GovSteamFV2_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamFV2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -280,7 +280,8 @@ bool get_GovSteamFV2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovSteamFV2_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -294,7 +295,8 @@ bool get_GovSteamFV2_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamFV2_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -308,7 +310,8 @@ bool get_GovSteamFV2_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV2_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -322,7 +325,8 @@ bool get_GovSteamFV2_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV2_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -336,7 +340,8 @@ bool get_GovSteamFV2_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV2_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -350,7 +355,8 @@ bool get_GovSteamFV2_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV2_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -364,7 +370,8 @@ bool get_GovSteamFV2_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV2_ti(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti; if (!buffer.str().empty()) @@ -378,7 +385,8 @@ bool get_GovSteamFV2_ti(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV2_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tt; if (!buffer.str().empty()) @@ -392,7 +400,8 @@ bool get_GovSteamFV2_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV2_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmax; if (!buffer.str().empty()) @@ -406,7 +415,8 @@ bool get_GovSteamFV2_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV2_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmin; if (!buffer.str().empty()) @@ -418,8 +428,6 @@ bool get_GovSteamFV2_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char GovSteamFV2::debugName[] = "GovSteamFV2"; const char* GovSteamFV2::debugString() const { @@ -428,24 +436,24 @@ const char* GovSteamFV2::debugString() const void GovSteamFV2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteamFV2"), &GovSteamFV2_factory)); + factory_map.emplace("cim:GovSteamFV2", &GovSteamFV2_factory); } void GovSteamFV2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.dt"), &assign_GovSteamFV2_dt)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.k"), &assign_GovSteamFV2_k)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.mwbase"), &assign_GovSteamFV2_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.r"), &assign_GovSteamFV2_r)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.t1"), &assign_GovSteamFV2_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.t3"), &assign_GovSteamFV2_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.ta"), &assign_GovSteamFV2_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.tb"), &assign_GovSteamFV2_tb)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.tc"), &assign_GovSteamFV2_tc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.ti"), &assign_GovSteamFV2_ti)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.tt"), &assign_GovSteamFV2_tt)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.vmax"), &assign_GovSteamFV2_vmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.vmin"), &assign_GovSteamFV2_vmin)); + assign_map.emplace("cim:GovSteamFV2.dt", &assign_GovSteamFV2_dt); + assign_map.emplace("cim:GovSteamFV2.k", &assign_GovSteamFV2_k); + assign_map.emplace("cim:GovSteamFV2.mwbase", &assign_GovSteamFV2_mwbase); + assign_map.emplace("cim:GovSteamFV2.r", &assign_GovSteamFV2_r); + assign_map.emplace("cim:GovSteamFV2.t1", &assign_GovSteamFV2_t1); + assign_map.emplace("cim:GovSteamFV2.t3", &assign_GovSteamFV2_t3); + assign_map.emplace("cim:GovSteamFV2.ta", &assign_GovSteamFV2_ta); + assign_map.emplace("cim:GovSteamFV2.tb", &assign_GovSteamFV2_tb); + assign_map.emplace("cim:GovSteamFV2.tc", &assign_GovSteamFV2_tc); + assign_map.emplace("cim:GovSteamFV2.ti", &assign_GovSteamFV2_ti); + assign_map.emplace("cim:GovSteamFV2.tt", &assign_GovSteamFV2_tt); + assign_map.emplace("cim:GovSteamFV2.vmax", &assign_GovSteamFV2_vmax); + assign_map.emplace("cim:GovSteamFV2.vmin", &assign_GovSteamFV2_vmin); } void GovSteamFV2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/GovSteamFV2.hpp b/CGMES_2.4.15_16FEB2016/GovSteamFV2.hpp index b255ec8cc..7df266adb 100644 --- a/CGMES_2.4.15_16FEB2016/GovSteamFV2.hpp +++ b/CGMES_2.4.15_16FEB2016/GovSteamFV2.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Steam turbine governor with reheat time constants and modeling of the effects of fast valve closing to reduce mechanical power. - */ + /** \brief Steam turbine governor with reheat time constants and modeling of the effects of fast valve closing to reduce mechanical power. */ class GovSteamFV2 : public TurbineGovernorDynamics { public: @@ -29,19 +27,44 @@ namespace CIMPP GovSteamFV2(); ~GovSteamFV2() override; - CIMPP::PU dt; /* (Dt). Default: nullptr */ - CIMPP::PU k; /* Fraction of the turbine power developed by turbine sections not involved in fast valving (K). Default: nullptr */ - CIMPP::ActivePower mwbase; /* Alternate Base used instead of Machine base in equipment model if necessary (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU r; /* (R). Default: nullptr */ - CIMPP::Seconds t1; /* Governor time constant (T1). Default: nullptr */ - CIMPP::Seconds t3; /* Reheater time constant (T3). Default: nullptr */ - CIMPP::Seconds ta; /* Time after initial time for valve to close (Ta). Default: nullptr */ - CIMPP::Seconds tb; /* Time after initial time for valve to begin opening (Tb). Default: nullptr */ - CIMPP::Seconds tc; /* Time after initial time for valve to become fully open (Tc). Default: nullptr */ - CIMPP::Seconds ti; /* Initial time to begin fast valving (Ti). Default: nullptr */ - CIMPP::Seconds tt; /* Time constant with which power falls off after intercept valve closure (Tt). Default: nullptr */ - CIMPP::PU vmax; /* (Vmax). Default: nullptr */ - CIMPP::PU vmin; /* (Vmin). Default: nullptr */ + /** \brief (Dt). Default: nullptr */ + CIMPP::PU dt; + + /** \brief Fraction of the turbine power developed by turbine sections not involved in fast valving (K). Default: nullptr */ + CIMPP::PU k; + + /** \brief Alternate Base used instead of Machine base in equipment model if necessary (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief (R). Default: nullptr */ + CIMPP::PU r; + + /** \brief Governor time constant (T1). Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Reheater time constant (T3). Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Time after initial time for valve to close (Ta). Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Time after initial time for valve to begin opening (Tb). Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Time after initial time for valve to become fully open (Tc). Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Initial time to begin fast valving (Ti). Default: nullptr */ + CIMPP::Seconds ti; + + /** \brief Time constant with which power falls off after intercept valve closure (Tt). Default: nullptr */ + CIMPP::Seconds tt; + + /** \brief (Vmax). Default: nullptr */ + CIMPP::PU vmax; + + /** \brief (Vmin). Default: nullptr */ + CIMPP::PU vmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GovSteamFV3.cpp b/CGMES_2.4.15_16FEB2016/GovSteamFV3.cpp index c9f2c8a79..871238fb7 100644 --- a/CGMES_2.4.15_16FEB2016/GovSteamFV3.cpp +++ b/CGMES_2.4.15_16FEB2016/GovSteamFV3.cpp @@ -8,30 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -GovSteamFV3::GovSteamFV3() {}; -GovSteamFV3::~GovSteamFV3() {}; +GovSteamFV3::GovSteamFV3() {} +GovSteamFV3::~GovSteamFV3() {} static const std::list PossibleProfilesForClass = { @@ -76,259 +57,276 @@ GovSteamFV3::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteamFV3_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_prmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_prmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->prmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_uc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_uo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_uo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteamFV3_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -342,7 +340,8 @@ bool get_GovSteamFV3_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamFV3_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -356,7 +355,8 @@ bool get_GovSteamFV3_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -370,7 +370,8 @@ bool get_GovSteamFV3_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -384,7 +385,8 @@ bool get_GovSteamFV3_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -398,7 +400,8 @@ bool get_GovSteamFV3_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovSteamFV3_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -412,7 +415,8 @@ bool get_GovSteamFV3_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV3_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -426,7 +430,8 @@ bool get_GovSteamFV3_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV3_prmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->prmax; if (!buffer.str().empty()) @@ -440,7 +445,8 @@ bool get_GovSteamFV3_prmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamFV3_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -454,7 +460,8 @@ bool get_GovSteamFV3_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -468,7 +475,8 @@ bool get_GovSteamFV3_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -482,7 +490,8 @@ bool get_GovSteamFV3_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -496,7 +505,8 @@ bool get_GovSteamFV3_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -510,7 +520,8 @@ bool get_GovSteamFV3_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -524,7 +535,8 @@ bool get_GovSteamFV3_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -538,7 +550,8 @@ bool get_GovSteamFV3_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -552,7 +565,8 @@ bool get_GovSteamFV3_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -566,7 +580,8 @@ bool get_GovSteamFV3_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uc; if (!buffer.str().empty()) @@ -580,7 +595,8 @@ bool get_GovSteamFV3_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uo; if (!buffer.str().empty()) @@ -592,8 +608,6 @@ bool get_GovSteamFV3_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char GovSteamFV3::debugName[] = "GovSteamFV3"; const char* GovSteamFV3::debugString() const { @@ -602,30 +616,30 @@ const char* GovSteamFV3::debugString() const void GovSteamFV3::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteamFV3"), &GovSteamFV3_factory)); + factory_map.emplace("cim:GovSteamFV3", &GovSteamFV3_factory); } void GovSteamFV3::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.k"), &assign_GovSteamFV3_k)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.k1"), &assign_GovSteamFV3_k1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.k2"), &assign_GovSteamFV3_k2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.k3"), &assign_GovSteamFV3_k3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.mwbase"), &assign_GovSteamFV3_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.pmax"), &assign_GovSteamFV3_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.pmin"), &assign_GovSteamFV3_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.prmax"), &assign_GovSteamFV3_prmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.t1"), &assign_GovSteamFV3_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.t2"), &assign_GovSteamFV3_t2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.t3"), &assign_GovSteamFV3_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.t4"), &assign_GovSteamFV3_t4)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.t5"), &assign_GovSteamFV3_t5)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.t6"), &assign_GovSteamFV3_t6)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.ta"), &assign_GovSteamFV3_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.tb"), &assign_GovSteamFV3_tb)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.tc"), &assign_GovSteamFV3_tc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.uc"), &assign_GovSteamFV3_uc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.uo"), &assign_GovSteamFV3_uo)); + assign_map.emplace("cim:GovSteamFV3.k", &assign_GovSteamFV3_k); + assign_map.emplace("cim:GovSteamFV3.k1", &assign_GovSteamFV3_k1); + assign_map.emplace("cim:GovSteamFV3.k2", &assign_GovSteamFV3_k2); + assign_map.emplace("cim:GovSteamFV3.k3", &assign_GovSteamFV3_k3); + assign_map.emplace("cim:GovSteamFV3.mwbase", &assign_GovSteamFV3_mwbase); + assign_map.emplace("cim:GovSteamFV3.pmax", &assign_GovSteamFV3_pmax); + assign_map.emplace("cim:GovSteamFV3.pmin", &assign_GovSteamFV3_pmin); + assign_map.emplace("cim:GovSteamFV3.prmax", &assign_GovSteamFV3_prmax); + assign_map.emplace("cim:GovSteamFV3.t1", &assign_GovSteamFV3_t1); + assign_map.emplace("cim:GovSteamFV3.t2", &assign_GovSteamFV3_t2); + assign_map.emplace("cim:GovSteamFV3.t3", &assign_GovSteamFV3_t3); + assign_map.emplace("cim:GovSteamFV3.t4", &assign_GovSteamFV3_t4); + assign_map.emplace("cim:GovSteamFV3.t5", &assign_GovSteamFV3_t5); + assign_map.emplace("cim:GovSteamFV3.t6", &assign_GovSteamFV3_t6); + assign_map.emplace("cim:GovSteamFV3.ta", &assign_GovSteamFV3_ta); + assign_map.emplace("cim:GovSteamFV3.tb", &assign_GovSteamFV3_tb); + assign_map.emplace("cim:GovSteamFV3.tc", &assign_GovSteamFV3_tc); + assign_map.emplace("cim:GovSteamFV3.uc", &assign_GovSteamFV3_uc); + assign_map.emplace("cim:GovSteamFV3.uo", &assign_GovSteamFV3_uo); } void GovSteamFV3::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/GovSteamFV3.hpp b/CGMES_2.4.15_16FEB2016/GovSteamFV3.hpp index ac88cc953..d69d84dd6 100644 --- a/CGMES_2.4.15_16FEB2016/GovSteamFV3.hpp +++ b/CGMES_2.4.15_16FEB2016/GovSteamFV3.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Simplified GovSteamIEEE1 Steam turbine governor model with Prmax limit and fast valving. - */ + /** \brief Simplified GovSteamIEEE1 Steam turbine governor model with Prmax limit and fast valving. */ class GovSteamFV3 : public TurbineGovernorDynamics { public: @@ -30,25 +28,62 @@ namespace CIMPP GovSteamFV3(); ~GovSteamFV3() override; - CIMPP::PU k; /* Governor gain, (reciprocal of droop) (K). Typical Value = 20. Default: nullptr */ - CIMPP::PU k1; /* Fraction of turbine power developed after first boiler pass (K1). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU k2; /* Fraction of turbine power developed after second boiler pass (K2). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU k3; /* Fraction of hp turbine power developed after crossover or third boiler pass (K3). Typical Value = 0.6. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU pmax; /* Maximum valve opening, PU of MWbase (Pmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum valve opening, PU of MWbase (Pmin). Typical Value = 0. Default: nullptr */ - CIMPP::PU prmax; /* Max. pressure in reheater (Prmax). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds t1; /* Governor lead time constant (T1). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t2; /* Governor lag time constant (T2). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t3; /* Valve positioner time constant (T3). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t4; /* Inlet piping/steam bowl time constant (T4). Typical Value = 0.2. Default: nullptr */ - CIMPP::Seconds t5; /* Time constant of second boiler pass (i.e. reheater) (T5). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds t6; /* Time constant of crossover or third boiler pass (T6). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds ta; /* Time to close intercept valve (IV) (Ta). Typical Value = 0.97. Default: nullptr */ - CIMPP::Seconds tb; /* Time until IV starts to reopen (Tb). Typical Value = 0.98. Default: nullptr */ - CIMPP::Seconds tc; /* Time until IV is fully open (Tc). Typical Value = 0.99. Default: nullptr */ - CIMPP::Simple_Float uc; /* Maximum valve closing velocity (Uc). Unit = PU/sec. Typical Value = -1. Default: nullptr */ - CIMPP::Simple_Float uo; /* Maximum valve opening velocity (Uo). Unit = PU/sec. Typical Value = 0.1. Default: nullptr */ + /** \brief Governor gain, (reciprocal of droop) (K). Typical Value = 20. Default: nullptr */ + CIMPP::PU k; + + /** \brief Fraction of turbine power developed after first boiler pass (K1). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU k1; + + /** \brief Fraction of turbine power developed after second boiler pass (K2). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU k2; + + /** \brief Fraction of hp turbine power developed after crossover or third boiler pass (K3). Typical Value = 0.6. Default: nullptr */ + CIMPP::PU k3; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Maximum valve opening, PU of MWbase (Pmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum valve opening, PU of MWbase (Pmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Max. pressure in reheater (Prmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU prmax; + + /** \brief Governor lead time constant (T1). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Governor lag time constant (T2). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Valve positioner time constant (T3). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Inlet piping/steam bowl time constant (T4). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant of second boiler pass (i.e. reheater) (T5). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Time constant of crossover or third boiler pass (T6). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time to close intercept valve (IV) (Ta). Typical Value = 0.97. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Time until IV starts to reopen (Tb). Typical Value = 0.98. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Time until IV is fully open (Tc). Typical Value = 0.99. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Maximum valve closing velocity (Uc). Unit = PU/sec. Typical Value = -1. Default: nullptr */ + CIMPP::Simple_Float uc; + + /** \brief Maximum valve opening velocity (Uo). Unit = PU/sec. Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float uo; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GovSteamFV4.cpp b/CGMES_2.4.15_16FEB2016/GovSteamFV4.cpp index 3e0591698..18cb0f39c 100644 --- a/CGMES_2.4.15_16FEB2016/GovSteamFV4.cpp +++ b/CGMES_2.4.15_16FEB2016/GovSteamFV4.cpp @@ -8,62 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -GovSteamFV4::GovSteamFV4() {}; -GovSteamFV4::~GovSteamFV4() {}; +GovSteamFV4::GovSteamFV4() {} +GovSteamFV4::~GovSteamFV4() {} static const std::list PossibleProfilesForClass = { @@ -140,675 +89,724 @@ GovSteamFV4::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteamFV4_cpsmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_cpsmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->cpsmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_cpsmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_cpsmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->cpsmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_crmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_crmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->crmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_crmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_crmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->crmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kf3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kf3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_khp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_khp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->khp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kic(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kic(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kic; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kip(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kip; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kit; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kmp1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kmp1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kmp1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kmp2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kmp2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kmp2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kpc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kpc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kpp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kpt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kpt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_krc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_krc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->krc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_ksh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_ksh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ksh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_lpi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_lpi(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lpi; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_lps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_lps(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lps; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_mnef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_mnef(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mnef; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_mxef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_mxef(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mxef; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_pr1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_pr1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pr1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_pr2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_pr2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pr2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_psmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_psmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->psmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_rsmimn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_rsmimn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rsmimn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_rsmimx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_rsmimx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rsmimx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_rvgmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_rvgmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rvgmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_rvgmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_rvgmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rvgmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_srmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_srmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->srmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_srmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_srmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->srmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_srsmp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_srsmp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->srsmp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_svmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_svmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->svmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_svmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_svmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->svmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_tam(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_tam(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tam; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_tcm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_tcm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tcm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_tdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_tdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_tf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_tf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_thp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_thp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->thp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_tmp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_tmp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tmp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_trh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_trh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->trh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_tv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_tv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_ty(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_ty(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ty; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_y(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_y(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->y; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_yhpmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_yhpmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->yhpmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_yhpmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_yhpmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->yhpmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_ympmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_ympmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ympmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_ympmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_ympmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ympmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteamFV4_cpsmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->cpsmn; if (!buffer.str().empty()) @@ -822,7 +820,8 @@ bool get_GovSteamFV4_cpsmn(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamFV4_cpsmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->cpsmx; if (!buffer.str().empty()) @@ -836,7 +835,8 @@ bool get_GovSteamFV4_cpsmx(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamFV4_crmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->crmn; if (!buffer.str().empty()) @@ -850,7 +850,8 @@ bool get_GovSteamFV4_crmn(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_crmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->crmx; if (!buffer.str().empty()) @@ -864,7 +865,8 @@ bool get_GovSteamFV4_crmx(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_kdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdc; if (!buffer.str().empty()) @@ -878,7 +880,8 @@ bool get_GovSteamFV4_kdc(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_kf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf1; if (!buffer.str().empty()) @@ -892,7 +895,8 @@ bool get_GovSteamFV4_kf1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_kf3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf3; if (!buffer.str().empty()) @@ -906,7 +910,8 @@ bool get_GovSteamFV4_kf3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_khp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->khp; if (!buffer.str().empty()) @@ -920,7 +925,8 @@ bool get_GovSteamFV4_khp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_kic(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kic; if (!buffer.str().empty()) @@ -934,7 +940,8 @@ bool get_GovSteamFV4_kic(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_kip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kip; if (!buffer.str().empty()) @@ -948,7 +955,8 @@ bool get_GovSteamFV4_kip(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_kit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kit; if (!buffer.str().empty()) @@ -962,7 +970,8 @@ bool get_GovSteamFV4_kit(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_kmp1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kmp1; if (!buffer.str().empty()) @@ -976,7 +985,8 @@ bool get_GovSteamFV4_kmp1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_kmp2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kmp2; if (!buffer.str().empty()) @@ -990,7 +1000,8 @@ bool get_GovSteamFV4_kmp2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_kpc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpc; if (!buffer.str().empty()) @@ -1004,7 +1015,8 @@ bool get_GovSteamFV4_kpc(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_kpp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpp; if (!buffer.str().empty()) @@ -1018,7 +1030,8 @@ bool get_GovSteamFV4_kpp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_kpt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpt; if (!buffer.str().empty()) @@ -1032,7 +1045,8 @@ bool get_GovSteamFV4_kpt(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_krc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->krc; if (!buffer.str().empty()) @@ -1046,7 +1060,8 @@ bool get_GovSteamFV4_krc(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_ksh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ksh; if (!buffer.str().empty()) @@ -1060,7 +1075,8 @@ bool get_GovSteamFV4_ksh(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_lpi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lpi; if (!buffer.str().empty()) @@ -1074,7 +1090,8 @@ bool get_GovSteamFV4_lpi(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_lps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lps; if (!buffer.str().empty()) @@ -1088,7 +1105,8 @@ bool get_GovSteamFV4_lps(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_mnef(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mnef; if (!buffer.str().empty()) @@ -1102,7 +1120,8 @@ bool get_GovSteamFV4_mnef(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_mxef(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mxef; if (!buffer.str().empty()) @@ -1116,7 +1135,8 @@ bool get_GovSteamFV4_mxef(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_pr1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pr1; if (!buffer.str().empty()) @@ -1130,7 +1150,8 @@ bool get_GovSteamFV4_pr1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_pr2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pr2; if (!buffer.str().empty()) @@ -1144,7 +1165,8 @@ bool get_GovSteamFV4_pr2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_psmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->psmn; if (!buffer.str().empty()) @@ -1158,7 +1180,8 @@ bool get_GovSteamFV4_psmn(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_rsmimn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rsmimn; if (!buffer.str().empty()) @@ -1172,7 +1195,8 @@ bool get_GovSteamFV4_rsmimn(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovSteamFV4_rsmimx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rsmimx; if (!buffer.str().empty()) @@ -1186,7 +1210,8 @@ bool get_GovSteamFV4_rsmimx(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovSteamFV4_rvgmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rvgmn; if (!buffer.str().empty()) @@ -1200,7 +1225,8 @@ bool get_GovSteamFV4_rvgmn(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamFV4_rvgmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rvgmx; if (!buffer.str().empty()) @@ -1214,7 +1240,8 @@ bool get_GovSteamFV4_rvgmx(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamFV4_srmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->srmn; if (!buffer.str().empty()) @@ -1228,7 +1255,8 @@ bool get_GovSteamFV4_srmn(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_srmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->srmx; if (!buffer.str().empty()) @@ -1242,7 +1270,8 @@ bool get_GovSteamFV4_srmx(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_srsmp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->srsmp; if (!buffer.str().empty()) @@ -1256,7 +1285,8 @@ bool get_GovSteamFV4_srsmp(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamFV4_svmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->svmn; if (!buffer.str().empty()) @@ -1270,7 +1300,8 @@ bool get_GovSteamFV4_svmn(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_svmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->svmx; if (!buffer.str().empty()) @@ -1284,7 +1315,8 @@ bool get_GovSteamFV4_svmx(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -1298,7 +1330,8 @@ bool get_GovSteamFV4_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV4_tam(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tam; if (!buffer.str().empty()) @@ -1312,7 +1345,8 @@ bool get_GovSteamFV4_tam(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -1326,7 +1360,8 @@ bool get_GovSteamFV4_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV4_tcm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tcm; if (!buffer.str().empty()) @@ -1340,7 +1375,8 @@ bool get_GovSteamFV4_tcm(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_tdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdc; if (!buffer.str().empty()) @@ -1354,7 +1390,8 @@ bool get_GovSteamFV4_tdc(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf1; if (!buffer.str().empty()) @@ -1368,7 +1405,8 @@ bool get_GovSteamFV4_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf2; if (!buffer.str().empty()) @@ -1382,7 +1420,8 @@ bool get_GovSteamFV4_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_thp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thp; if (!buffer.str().empty()) @@ -1396,7 +1435,8 @@ bool get_GovSteamFV4_thp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_tmp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tmp; if (!buffer.str().empty()) @@ -1410,7 +1450,8 @@ bool get_GovSteamFV4_tmp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_trh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->trh; if (!buffer.str().empty()) @@ -1424,7 +1465,8 @@ bool get_GovSteamFV4_trh(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_tv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tv; if (!buffer.str().empty()) @@ -1438,7 +1480,8 @@ bool get_GovSteamFV4_tv(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV4_ty(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ty; if (!buffer.str().empty()) @@ -1452,7 +1495,8 @@ bool get_GovSteamFV4_ty(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV4_y(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->y; if (!buffer.str().empty()) @@ -1466,7 +1510,8 @@ bool get_GovSteamFV4_y(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamFV4_yhpmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->yhpmn; if (!buffer.str().empty()) @@ -1480,7 +1525,8 @@ bool get_GovSteamFV4_yhpmn(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamFV4_yhpmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->yhpmx; if (!buffer.str().empty()) @@ -1494,7 +1540,8 @@ bool get_GovSteamFV4_yhpmx(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamFV4_ympmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ympmn; if (!buffer.str().empty()) @@ -1508,7 +1555,8 @@ bool get_GovSteamFV4_ympmn(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamFV4_ympmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ympmx; if (!buffer.str().empty()) @@ -1520,8 +1568,6 @@ bool get_GovSteamFV4_ympmx(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char GovSteamFV4::debugName[] = "GovSteamFV4"; const char* GovSteamFV4::debugString() const { @@ -1530,62 +1576,62 @@ const char* GovSteamFV4::debugString() const void GovSteamFV4::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteamFV4"), &GovSteamFV4_factory)); + factory_map.emplace("cim:GovSteamFV4", &GovSteamFV4_factory); } void GovSteamFV4::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.cpsmn"), &assign_GovSteamFV4_cpsmn)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.cpsmx"), &assign_GovSteamFV4_cpsmx)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.crmn"), &assign_GovSteamFV4_crmn)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.crmx"), &assign_GovSteamFV4_crmx)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kdc"), &assign_GovSteamFV4_kdc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kf1"), &assign_GovSteamFV4_kf1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kf3"), &assign_GovSteamFV4_kf3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.khp"), &assign_GovSteamFV4_khp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kic"), &assign_GovSteamFV4_kic)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kip"), &assign_GovSteamFV4_kip)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kit"), &assign_GovSteamFV4_kit)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kmp1"), &assign_GovSteamFV4_kmp1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kmp2"), &assign_GovSteamFV4_kmp2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kpc"), &assign_GovSteamFV4_kpc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kpp"), &assign_GovSteamFV4_kpp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kpt"), &assign_GovSteamFV4_kpt)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.krc"), &assign_GovSteamFV4_krc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.ksh"), &assign_GovSteamFV4_ksh)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.lpi"), &assign_GovSteamFV4_lpi)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.lps"), &assign_GovSteamFV4_lps)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.mnef"), &assign_GovSteamFV4_mnef)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.mxef"), &assign_GovSteamFV4_mxef)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.pr1"), &assign_GovSteamFV4_pr1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.pr2"), &assign_GovSteamFV4_pr2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.psmn"), &assign_GovSteamFV4_psmn)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.rsmimn"), &assign_GovSteamFV4_rsmimn)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.rsmimx"), &assign_GovSteamFV4_rsmimx)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.rvgmn"), &assign_GovSteamFV4_rvgmn)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.rvgmx"), &assign_GovSteamFV4_rvgmx)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.srmn"), &assign_GovSteamFV4_srmn)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.srmx"), &assign_GovSteamFV4_srmx)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.srsmp"), &assign_GovSteamFV4_srsmp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.svmn"), &assign_GovSteamFV4_svmn)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.svmx"), &assign_GovSteamFV4_svmx)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.ta"), &assign_GovSteamFV4_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.tam"), &assign_GovSteamFV4_tam)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.tc"), &assign_GovSteamFV4_tc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.tcm"), &assign_GovSteamFV4_tcm)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.tdc"), &assign_GovSteamFV4_tdc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.tf1"), &assign_GovSteamFV4_tf1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.tf2"), &assign_GovSteamFV4_tf2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.thp"), &assign_GovSteamFV4_thp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.tmp"), &assign_GovSteamFV4_tmp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.trh"), &assign_GovSteamFV4_trh)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.tv"), &assign_GovSteamFV4_tv)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.ty"), &assign_GovSteamFV4_ty)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.y"), &assign_GovSteamFV4_y)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.yhpmn"), &assign_GovSteamFV4_yhpmn)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.yhpmx"), &assign_GovSteamFV4_yhpmx)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.ympmn"), &assign_GovSteamFV4_ympmn)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.ympmx"), &assign_GovSteamFV4_ympmx)); + assign_map.emplace("cim:GovSteamFV4.cpsmn", &assign_GovSteamFV4_cpsmn); + assign_map.emplace("cim:GovSteamFV4.cpsmx", &assign_GovSteamFV4_cpsmx); + assign_map.emplace("cim:GovSteamFV4.crmn", &assign_GovSteamFV4_crmn); + assign_map.emplace("cim:GovSteamFV4.crmx", &assign_GovSteamFV4_crmx); + assign_map.emplace("cim:GovSteamFV4.kdc", &assign_GovSteamFV4_kdc); + assign_map.emplace("cim:GovSteamFV4.kf1", &assign_GovSteamFV4_kf1); + assign_map.emplace("cim:GovSteamFV4.kf3", &assign_GovSteamFV4_kf3); + assign_map.emplace("cim:GovSteamFV4.khp", &assign_GovSteamFV4_khp); + assign_map.emplace("cim:GovSteamFV4.kic", &assign_GovSteamFV4_kic); + assign_map.emplace("cim:GovSteamFV4.kip", &assign_GovSteamFV4_kip); + assign_map.emplace("cim:GovSteamFV4.kit", &assign_GovSteamFV4_kit); + assign_map.emplace("cim:GovSteamFV4.kmp1", &assign_GovSteamFV4_kmp1); + assign_map.emplace("cim:GovSteamFV4.kmp2", &assign_GovSteamFV4_kmp2); + assign_map.emplace("cim:GovSteamFV4.kpc", &assign_GovSteamFV4_kpc); + assign_map.emplace("cim:GovSteamFV4.kpp", &assign_GovSteamFV4_kpp); + assign_map.emplace("cim:GovSteamFV4.kpt", &assign_GovSteamFV4_kpt); + assign_map.emplace("cim:GovSteamFV4.krc", &assign_GovSteamFV4_krc); + assign_map.emplace("cim:GovSteamFV4.ksh", &assign_GovSteamFV4_ksh); + assign_map.emplace("cim:GovSteamFV4.lpi", &assign_GovSteamFV4_lpi); + assign_map.emplace("cim:GovSteamFV4.lps", &assign_GovSteamFV4_lps); + assign_map.emplace("cim:GovSteamFV4.mnef", &assign_GovSteamFV4_mnef); + assign_map.emplace("cim:GovSteamFV4.mxef", &assign_GovSteamFV4_mxef); + assign_map.emplace("cim:GovSteamFV4.pr1", &assign_GovSteamFV4_pr1); + assign_map.emplace("cim:GovSteamFV4.pr2", &assign_GovSteamFV4_pr2); + assign_map.emplace("cim:GovSteamFV4.psmn", &assign_GovSteamFV4_psmn); + assign_map.emplace("cim:GovSteamFV4.rsmimn", &assign_GovSteamFV4_rsmimn); + assign_map.emplace("cim:GovSteamFV4.rsmimx", &assign_GovSteamFV4_rsmimx); + assign_map.emplace("cim:GovSteamFV4.rvgmn", &assign_GovSteamFV4_rvgmn); + assign_map.emplace("cim:GovSteamFV4.rvgmx", &assign_GovSteamFV4_rvgmx); + assign_map.emplace("cim:GovSteamFV4.srmn", &assign_GovSteamFV4_srmn); + assign_map.emplace("cim:GovSteamFV4.srmx", &assign_GovSteamFV4_srmx); + assign_map.emplace("cim:GovSteamFV4.srsmp", &assign_GovSteamFV4_srsmp); + assign_map.emplace("cim:GovSteamFV4.svmn", &assign_GovSteamFV4_svmn); + assign_map.emplace("cim:GovSteamFV4.svmx", &assign_GovSteamFV4_svmx); + assign_map.emplace("cim:GovSteamFV4.ta", &assign_GovSteamFV4_ta); + assign_map.emplace("cim:GovSteamFV4.tam", &assign_GovSteamFV4_tam); + assign_map.emplace("cim:GovSteamFV4.tc", &assign_GovSteamFV4_tc); + assign_map.emplace("cim:GovSteamFV4.tcm", &assign_GovSteamFV4_tcm); + assign_map.emplace("cim:GovSteamFV4.tdc", &assign_GovSteamFV4_tdc); + assign_map.emplace("cim:GovSteamFV4.tf1", &assign_GovSteamFV4_tf1); + assign_map.emplace("cim:GovSteamFV4.tf2", &assign_GovSteamFV4_tf2); + assign_map.emplace("cim:GovSteamFV4.thp", &assign_GovSteamFV4_thp); + assign_map.emplace("cim:GovSteamFV4.tmp", &assign_GovSteamFV4_tmp); + assign_map.emplace("cim:GovSteamFV4.trh", &assign_GovSteamFV4_trh); + assign_map.emplace("cim:GovSteamFV4.tv", &assign_GovSteamFV4_tv); + assign_map.emplace("cim:GovSteamFV4.ty", &assign_GovSteamFV4_ty); + assign_map.emplace("cim:GovSteamFV4.y", &assign_GovSteamFV4_y); + assign_map.emplace("cim:GovSteamFV4.yhpmn", &assign_GovSteamFV4_yhpmn); + assign_map.emplace("cim:GovSteamFV4.yhpmx", &assign_GovSteamFV4_yhpmx); + assign_map.emplace("cim:GovSteamFV4.ympmn", &assign_GovSteamFV4_ympmn); + assign_map.emplace("cim:GovSteamFV4.ympmx", &assign_GovSteamFV4_ympmx); } void GovSteamFV4::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/GovSteamFV4.hpp b/CGMES_2.4.15_16FEB2016/GovSteamFV4.hpp index 1797a634c..1a9e91160 100644 --- a/CGMES_2.4.15_16FEB2016/GovSteamFV4.hpp +++ b/CGMES_2.4.15_16FEB2016/GovSteamFV4.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Detailed electro-hydraulic governor for steam unit. - */ + /** \brief Detailed electro-hydraulic governor for steam unit. */ class GovSteamFV4 : public TurbineGovernorDynamics { public: @@ -29,57 +27,158 @@ namespace CIMPP GovSteamFV4(); ~GovSteamFV4() override; - CIMPP::PU cpsmn; /* Minimum value of pressure regulator output (Cpsmn). Typical Value = -1. Default: nullptr */ - CIMPP::PU cpsmx; /* Maximum value of pressure regulator output (Cpsmx). Typical Value = 1. Default: nullptr */ - CIMPP::PU crmn; /* Minimum value of regulator set-point (Crmn). Typical Value = 0. Default: nullptr */ - CIMPP::PU crmx; /* Maximum value of regulator set-point (Crmx). Typical Value = 1.2. Default: nullptr */ - CIMPP::PU kdc; /* Derivative gain of pressure regulator (Kdc). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf1; /* Frequency bias (reciprocal of droop) (Kf1). Typical Value = 20. Default: nullptr */ - CIMPP::PU kf3; /* Frequency control (reciprocal of droop) (Kf3). Typical Value = 20. Default: nullptr */ - CIMPP::PU khp; /* Fraction of total turbine output generated by HP part (Khp). Typical Value = 0.35. Default: nullptr */ - CIMPP::PU kic; /* Integral gain of pressure regulator (Kic). Typical Value = 0.0033. Default: nullptr */ - CIMPP::PU kip; /* Integral gain of pressure feedback regulator (Kip). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU kit; /* Integral gain of electro-hydraulic regulator (Kit). Typical Value = 0.04. Default: nullptr */ - CIMPP::PU kmp1; /* First gain coefficient of intercept valves characteristic (Kmp1). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU kmp2; /* Second gain coefficient of intercept valves characteristic (Kmp2). Typical Value = 3.5. Default: nullptr */ - CIMPP::PU kpc; /* Proportional gain of pressure regulator (Kpc). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU kpp; /* Proportional gain of pressure feedback regulator (Kpp). Typical Value = 1. Default: nullptr */ - CIMPP::PU kpt; /* Proportional gain of electro-hydraulic regulator (Kpt). Typical Value = 0.3. Default: nullptr */ - CIMPP::PU krc; /* Maximum variation of fuel flow (Krc). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU ksh; /* Pressure loss due to flow friction in the boiler tubes (Ksh). Typical Value = 0.08. Default: nullptr */ - CIMPP::PU lpi; /* Maximum negative power error (Lpi). Typical Value = -0.15. Default: nullptr */ - CIMPP::PU lps; /* Maximum positive power error (Lps). Typical Value = 0.03. Default: nullptr */ - CIMPP::PU mnef; /* Lower limit for frequency correction (MN). Typical Value = -0.05. Default: nullptr */ - CIMPP::PU mxef; /* Upper limit for frequency correction (MX). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU pr1; /* First value of pressure set point static characteristic (Pr1). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU pr2; /* Second value of pressure set point static characteristic, corresponding to Ps0 = 1.0 PU (Pr2). Typical Value = 0.75. Default: nullptr */ - CIMPP::PU psmn; /* Minimum value of pressure set point static characteristic (Psmn). Typical Value = 1. Default: nullptr */ - CIMPP::PU rsmimn; /* Minimum value of integral regulator (Rsmimn). Typical Value = 0. Default: nullptr */ - CIMPP::PU rsmimx; /* Maximum value of integral regulator (Rsmimx). Typical Value = 1.1. Default: nullptr */ - CIMPP::PU rvgmn; /* Minimum value of integral regulator (Rvgmn). Typical Value = 0. Default: nullptr */ - CIMPP::PU rvgmx; /* Maximum value of integral regulator (Rvgmx). Typical Value = 1.2. Default: nullptr */ - CIMPP::PU srmn; /* Minimum valve opening (Srmn). Typical Value = 0. Default: nullptr */ - CIMPP::PU srmx; /* Maximum valve opening (Srmx). Typical Value = 1.1. Default: nullptr */ - CIMPP::PU srsmp; /* Intercept valves characteristic discontinuity point (Srsmp). Typical Value = 0.43. Default: nullptr */ - CIMPP::Simple_Float svmn; /* Maximum regulator gate closing velocity (Svmn). Typical Value = -0.0333. Default: nullptr */ - CIMPP::Simple_Float svmx; /* Maximum regulator gate opening velocity (Svmx). Typical Value = 0.0333. Default: nullptr */ - CIMPP::Seconds ta; /* Control valves rate opening time (Ta). Typical Value = 0.8. Default: nullptr */ - CIMPP::Seconds tam; /* Intercept valves rate opening time (Tam). Typical Value = 0.8. Default: nullptr */ - CIMPP::Seconds tc; /* Control valves rate closing time (Tc). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tcm; /* Intercept valves rate closing time (Tcm). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tdc; /* Derivative time constant of pressure regulator (Tdc). Typical Value = 90. Default: nullptr */ - CIMPP::Seconds tf1; /* Time constant of fuel regulation (Tf1). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds tf2; /* Time constant of steam chest (Tf2). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds thp; /* High pressure (HP) time constant of the turbine (Thp). Typical Value = 0.15. Default: nullptr */ - CIMPP::Seconds tmp; /* Low pressure (LP) time constant of the turbine (Tmp). Typical Value = 0.4. Default: nullptr */ - CIMPP::Seconds trh; /* Reheater time constant of the turbine (Trh). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds tv; /* Boiler time constant (Tv). Typical Value = 60. Default: nullptr */ - CIMPP::Seconds ty; /* Control valves servo time constant (Ty). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU y; /* Coefficient of linearized equations of turbine (Stodola formulation) (Y). Typical Value = 0.13. Default: nullptr */ - CIMPP::PU yhpmn; /* Minimum control valve position (Yhpmn). Typical Value = 0. Default: nullptr */ - CIMPP::PU yhpmx; /* Maximum control valve position (Yhpmx). Typical Value = 1.1. Default: nullptr */ - CIMPP::PU ympmn; /* Minimum intercept valve position (Ympmn). Typical Value = 0. Default: nullptr */ - CIMPP::PU ympmx; /* Maximum intercept valve position (Ympmx). Typical Value = 1.1. Default: nullptr */ + /** \brief Minimum value of pressure regulator output (Cpsmn). Typical Value = -1. Default: nullptr */ + CIMPP::PU cpsmn; + + /** \brief Maximum value of pressure regulator output (Cpsmx). Typical Value = 1. Default: nullptr */ + CIMPP::PU cpsmx; + + /** \brief Minimum value of regulator set-point (Crmn). Typical Value = 0. Default: nullptr */ + CIMPP::PU crmn; + + /** \brief Maximum value of regulator set-point (Crmx). Typical Value = 1.2. Default: nullptr */ + CIMPP::PU crmx; + + /** \brief Derivative gain of pressure regulator (Kdc). Typical Value = 1. Default: nullptr */ + CIMPP::PU kdc; + + /** \brief Frequency bias (reciprocal of droop) (Kf1). Typical Value = 20. Default: nullptr */ + CIMPP::PU kf1; + + /** \brief Frequency control (reciprocal of droop) (Kf3). Typical Value = 20. Default: nullptr */ + CIMPP::PU kf3; + + /** \brief Fraction of total turbine output generated by HP part (Khp). Typical Value = 0.35. Default: nullptr */ + CIMPP::PU khp; + + /** \brief Integral gain of pressure regulator (Kic). Typical Value = 0.0033. Default: nullptr */ + CIMPP::PU kic; + + /** \brief Integral gain of pressure feedback regulator (Kip). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU kip; + + /** \brief Integral gain of electro-hydraulic regulator (Kit). Typical Value = 0.04. Default: nullptr */ + CIMPP::PU kit; + + /** \brief First gain coefficient of intercept valves characteristic (Kmp1). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU kmp1; + + /** \brief Second gain coefficient of intercept valves characteristic (Kmp2). Typical Value = 3.5. Default: nullptr */ + CIMPP::PU kmp2; + + /** \brief Proportional gain of pressure regulator (Kpc). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU kpc; + + /** \brief Proportional gain of pressure feedback regulator (Kpp). Typical Value = 1. Default: nullptr */ + CIMPP::PU kpp; + + /** \brief Proportional gain of electro-hydraulic regulator (Kpt). Typical Value = 0.3. Default: nullptr */ + CIMPP::PU kpt; + + /** \brief Maximum variation of fuel flow (Krc). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU krc; + + /** \brief Pressure loss due to flow friction in the boiler tubes (Ksh). Typical Value = 0.08. Default: nullptr */ + CIMPP::PU ksh; + + /** \brief Maximum negative power error (Lpi). Typical Value = -0.15. Default: nullptr */ + CIMPP::PU lpi; + + /** \brief Maximum positive power error (Lps). Typical Value = 0.03. Default: nullptr */ + CIMPP::PU lps; + + /** \brief Lower limit for frequency correction (MN). Typical Value = -0.05. Default: nullptr */ + CIMPP::PU mnef; + + /** \brief Upper limit for frequency correction (MX). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU mxef; + + /** \brief First value of pressure set point static characteristic (Pr1). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU pr1; + + /** \brief Second value of pressure set point static characteristic, corresponding to Ps0 = 1.0 PU (Pr2). Typical Value = 0.75. Default: nullptr */ + CIMPP::PU pr2; + + /** \brief Minimum value of pressure set point static characteristic (Psmn). Typical Value = 1. Default: nullptr */ + CIMPP::PU psmn; + + /** \brief Minimum value of integral regulator (Rsmimn). Typical Value = 0. Default: nullptr */ + CIMPP::PU rsmimn; + + /** \brief Maximum value of integral regulator (Rsmimx). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU rsmimx; + + /** \brief Minimum value of integral regulator (Rvgmn). Typical Value = 0. Default: nullptr */ + CIMPP::PU rvgmn; + + /** \brief Maximum value of integral regulator (Rvgmx). Typical Value = 1.2. Default: nullptr */ + CIMPP::PU rvgmx; + + /** \brief Minimum valve opening (Srmn). Typical Value = 0. Default: nullptr */ + CIMPP::PU srmn; + + /** \brief Maximum valve opening (Srmx). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU srmx; + + /** \brief Intercept valves characteristic discontinuity point (Srsmp). Typical Value = 0.43. Default: nullptr */ + CIMPP::PU srsmp; + + /** \brief Maximum regulator gate closing velocity (Svmn). Typical Value = -0.0333. Default: nullptr */ + CIMPP::Simple_Float svmn; + + /** \brief Maximum regulator gate opening velocity (Svmx). Typical Value = 0.0333. Default: nullptr */ + CIMPP::Simple_Float svmx; + + /** \brief Control valves rate opening time (Ta). Typical Value = 0.8. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Intercept valves rate opening time (Tam). Typical Value = 0.8. Default: nullptr */ + CIMPP::Seconds tam; + + /** \brief Control valves rate closing time (Tc). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Intercept valves rate closing time (Tcm). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds tcm; + + /** \brief Derivative time constant of pressure regulator (Tdc). Typical Value = 90. Default: nullptr */ + CIMPP::Seconds tdc; + + /** \brief Time constant of fuel regulation (Tf1). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds tf1; + + /** \brief Time constant of steam chest (Tf2). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds tf2; + + /** \brief High pressure (HP) time constant of the turbine (Thp). Typical Value = 0.15. Default: nullptr */ + CIMPP::Seconds thp; + + /** \brief Low pressure (LP) time constant of the turbine (Tmp). Typical Value = 0.4. Default: nullptr */ + CIMPP::Seconds tmp; + + /** \brief Reheater time constant of the turbine (Trh). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds trh; + + /** \brief Boiler time constant (Tv). Typical Value = 60. Default: nullptr */ + CIMPP::Seconds tv; + + /** \brief Control valves servo time constant (Ty). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds ty; + + /** \brief Coefficient of linearized equations of turbine (Stodola formulation) (Y). Typical Value = 0.13. Default: nullptr */ + CIMPP::PU y; + + /** \brief Minimum control valve position (Yhpmn). Typical Value = 0. Default: nullptr */ + CIMPP::PU yhpmn; + + /** \brief Maximum control valve position (Yhpmx). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU yhpmx; + + /** \brief Minimum intercept valve position (Ympmn). Typical Value = 0. Default: nullptr */ + CIMPP::PU ympmn; + + /** \brief Maximum intercept valve position (Ympmx). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU ympmx; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GovSteamIEEE1.cpp b/CGMES_2.4.15_16FEB2016/GovSteamIEEE1.cpp index c6207bca9..8dafb5bc6 100644 --- a/CGMES_2.4.15_16FEB2016/GovSteamIEEE1.cpp +++ b/CGMES_2.4.15_16FEB2016/GovSteamIEEE1.cpp @@ -8,32 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -GovSteamIEEE1::GovSteamIEEE1() {}; -GovSteamIEEE1::~GovSteamIEEE1() {}; +GovSteamIEEE1::GovSteamIEEE1() {} +GovSteamIEEE1::~GovSteamIEEE1() {} static const std::list PossibleProfilesForClass = { @@ -80,285 +59,304 @@ GovSteamIEEE1::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteamIEEE1_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_k4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_k5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_k5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_k6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_k6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_k7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_k7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_k8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_k8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_t7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_uc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_uo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_uo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteamIEEE1_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -372,7 +370,8 @@ bool get_GovSteamIEEE1_k(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamIEEE1_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -386,7 +385,8 @@ bool get_GovSteamIEEE1_k1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -400,7 +400,8 @@ bool get_GovSteamIEEE1_k2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -414,7 +415,8 @@ bool get_GovSteamIEEE1_k3(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k4; if (!buffer.str().empty()) @@ -428,7 +430,8 @@ bool get_GovSteamIEEE1_k4(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k5; if (!buffer.str().empty()) @@ -442,7 +445,8 @@ bool get_GovSteamIEEE1_k5(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_k6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k6; if (!buffer.str().empty()) @@ -456,7 +460,8 @@ bool get_GovSteamIEEE1_k6(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_k7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k7; if (!buffer.str().empty()) @@ -470,7 +475,8 @@ bool get_GovSteamIEEE1_k7(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_k8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k8; if (!buffer.str().empty()) @@ -484,7 +490,8 @@ bool get_GovSteamIEEE1_k8(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -498,7 +505,8 @@ bool get_GovSteamIEEE1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream bool get_GovSteamIEEE1_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -512,7 +520,8 @@ bool get_GovSteamIEEE1_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovSteamIEEE1_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -526,7 +535,8 @@ bool get_GovSteamIEEE1_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovSteamIEEE1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -540,7 +550,8 @@ bool get_GovSteamIEEE1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -554,7 +565,8 @@ bool get_GovSteamIEEE1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -568,7 +580,8 @@ bool get_GovSteamIEEE1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -582,7 +595,8 @@ bool get_GovSteamIEEE1_t4(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -596,7 +610,8 @@ bool get_GovSteamIEEE1_t5(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -610,7 +625,8 @@ bool get_GovSteamIEEE1_t6(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t7; if (!buffer.str().empty()) @@ -624,7 +640,8 @@ bool get_GovSteamIEEE1_t7(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uc; if (!buffer.str().empty()) @@ -638,7 +655,8 @@ bool get_GovSteamIEEE1_uc(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uo; if (!buffer.str().empty()) @@ -650,8 +668,6 @@ bool get_GovSteamIEEE1_uo(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char GovSteamIEEE1::debugName[] = "GovSteamIEEE1"; const char* GovSteamIEEE1::debugString() const { @@ -660,32 +676,32 @@ const char* GovSteamIEEE1::debugString() const void GovSteamIEEE1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1"), &GovSteamIEEE1_factory)); + factory_map.emplace("cim:GovSteamIEEE1", &GovSteamIEEE1_factory); } void GovSteamIEEE1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.k"), &assign_GovSteamIEEE1_k)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.k1"), &assign_GovSteamIEEE1_k1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.k2"), &assign_GovSteamIEEE1_k2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.k3"), &assign_GovSteamIEEE1_k3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.k4"), &assign_GovSteamIEEE1_k4)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.k5"), &assign_GovSteamIEEE1_k5)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.k6"), &assign_GovSteamIEEE1_k6)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.k7"), &assign_GovSteamIEEE1_k7)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.k8"), &assign_GovSteamIEEE1_k8)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.mwbase"), &assign_GovSteamIEEE1_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.pmax"), &assign_GovSteamIEEE1_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.pmin"), &assign_GovSteamIEEE1_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.t1"), &assign_GovSteamIEEE1_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.t2"), &assign_GovSteamIEEE1_t2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.t3"), &assign_GovSteamIEEE1_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.t4"), &assign_GovSteamIEEE1_t4)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.t5"), &assign_GovSteamIEEE1_t5)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.t6"), &assign_GovSteamIEEE1_t6)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.t7"), &assign_GovSteamIEEE1_t7)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.uc"), &assign_GovSteamIEEE1_uc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.uo"), &assign_GovSteamIEEE1_uo)); + assign_map.emplace("cim:GovSteamIEEE1.k", &assign_GovSteamIEEE1_k); + assign_map.emplace("cim:GovSteamIEEE1.k1", &assign_GovSteamIEEE1_k1); + assign_map.emplace("cim:GovSteamIEEE1.k2", &assign_GovSteamIEEE1_k2); + assign_map.emplace("cim:GovSteamIEEE1.k3", &assign_GovSteamIEEE1_k3); + assign_map.emplace("cim:GovSteamIEEE1.k4", &assign_GovSteamIEEE1_k4); + assign_map.emplace("cim:GovSteamIEEE1.k5", &assign_GovSteamIEEE1_k5); + assign_map.emplace("cim:GovSteamIEEE1.k6", &assign_GovSteamIEEE1_k6); + assign_map.emplace("cim:GovSteamIEEE1.k7", &assign_GovSteamIEEE1_k7); + assign_map.emplace("cim:GovSteamIEEE1.k8", &assign_GovSteamIEEE1_k8); + assign_map.emplace("cim:GovSteamIEEE1.mwbase", &assign_GovSteamIEEE1_mwbase); + assign_map.emplace("cim:GovSteamIEEE1.pmax", &assign_GovSteamIEEE1_pmax); + assign_map.emplace("cim:GovSteamIEEE1.pmin", &assign_GovSteamIEEE1_pmin); + assign_map.emplace("cim:GovSteamIEEE1.t1", &assign_GovSteamIEEE1_t1); + assign_map.emplace("cim:GovSteamIEEE1.t2", &assign_GovSteamIEEE1_t2); + assign_map.emplace("cim:GovSteamIEEE1.t3", &assign_GovSteamIEEE1_t3); + assign_map.emplace("cim:GovSteamIEEE1.t4", &assign_GovSteamIEEE1_t4); + assign_map.emplace("cim:GovSteamIEEE1.t5", &assign_GovSteamIEEE1_t5); + assign_map.emplace("cim:GovSteamIEEE1.t6", &assign_GovSteamIEEE1_t6); + assign_map.emplace("cim:GovSteamIEEE1.t7", &assign_GovSteamIEEE1_t7); + assign_map.emplace("cim:GovSteamIEEE1.uc", &assign_GovSteamIEEE1_uc); + assign_map.emplace("cim:GovSteamIEEE1.uo", &assign_GovSteamIEEE1_uo); } void GovSteamIEEE1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/GovSteamIEEE1.hpp b/CGMES_2.4.15_16FEB2016/GovSteamIEEE1.hpp index 83051bda8..23784774a 100644 --- a/CGMES_2.4.15_16FEB2016/GovSteamIEEE1.hpp +++ b/CGMES_2.4.15_16FEB2016/GovSteamIEEE1.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE steam turbine governor model. Ref - */ + /** \brief IEEE steam turbine governor model. Ref */ class GovSteamIEEE1 : public TurbineGovernorDynamics { public: @@ -30,27 +28,68 @@ namespace CIMPP GovSteamIEEE1(); ~GovSteamIEEE1() override; - CIMPP::PU k; /* Governor gain (reciprocal of droop) (K) (> 0). Typical Value = 25. Default: nullptr */ - CIMPP::Simple_Float k1; /* Fraction of HP shaft power after first boiler pass (K1). Typical Value = 0.2. Default: nullptr */ - CIMPP::Simple_Float k2; /* Fraction of LP shaft power after first boiler pass (K2). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float k3; /* Fraction of HP shaft power after second boiler pass (K3). Typical Value = 0.3. Default: nullptr */ - CIMPP::Simple_Float k4; /* Fraction of LP shaft power after second boiler pass (K4). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float k5; /* Fraction of HP shaft power after third boiler pass (K5). Typical Value = 0.5. Default: nullptr */ - CIMPP::Simple_Float k6; /* Fraction of LP shaft power after third boiler pass (K6). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float k7; /* Fraction of HP shaft power after fourth boiler pass (K7). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float k8; /* Fraction of LP shaft power after fourth boiler pass (K8). Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (> 0) Default: nullptr */ - CIMPP::PU pmax; /* Maximum valve opening (Pmax) (> Pmin). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum valve opening (Pmin) (>= 0). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t1; /* Governor lag time constant (T1). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t2; /* Governor lead time constant (T2). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t3; /* Valve positioner time constant (T3) (> 0). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t4; /* Inlet piping/steam bowl time constant (T4). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds t5; /* Time constant of second boiler pass (T5). Typical Value = 5. Default: nullptr */ - CIMPP::Seconds t6; /* Time constant of third boiler pass (T6). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds t7; /* Time constant of fourth boiler pass (T7). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float uc; /* Maximum valve closing velocity (Uc) (< 0). Unit = PU/sec. Typical Value = -10. Default: nullptr */ - CIMPP::Simple_Float uo; /* Maximum valve opening velocity (Uo) (> 0). Unit = PU/sec. Typical Value = 1. Default: nullptr */ + /** \brief Governor gain (reciprocal of droop) (K) (> 0). Typical Value = 25. Default: nullptr */ + CIMPP::PU k; + + /** \brief Fraction of HP shaft power after first boiler pass (K1). Typical Value = 0.2. Default: nullptr */ + CIMPP::Simple_Float k1; + + /** \brief Fraction of LP shaft power after first boiler pass (K2). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float k2; + + /** \brief Fraction of HP shaft power after second boiler pass (K3). Typical Value = 0.3. Default: nullptr */ + CIMPP::Simple_Float k3; + + /** \brief Fraction of LP shaft power after second boiler pass (K4). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float k4; + + /** \brief Fraction of HP shaft power after third boiler pass (K5). Typical Value = 0.5. Default: nullptr */ + CIMPP::Simple_Float k5; + + /** \brief Fraction of LP shaft power after third boiler pass (K6). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float k6; + + /** \brief Fraction of HP shaft power after fourth boiler pass (K7). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float k7; + + /** \brief Fraction of LP shaft power after fourth boiler pass (K8). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float k8; + + /** \brief Base for power values (MWbase) (> 0) Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Maximum valve opening (Pmax) (> Pmin). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum valve opening (Pmin) (>= 0). Typical Value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Governor lag time constant (T1). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Governor lead time constant (T2). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Valve positioner time constant (T3) (> 0). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Inlet piping/steam bowl time constant (T4). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant of second boiler pass (T5). Typical Value = 5. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Time constant of third boiler pass (T6). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time constant of fourth boiler pass (T7). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t7; + + /** \brief Maximum valve closing velocity (Uc) (< 0). Unit = PU/sec. Typical Value = -10. Default: nullptr */ + CIMPP::Simple_Float uc; + + /** \brief Maximum valve opening velocity (Uo) (> 0). Unit = PU/sec. Typical Value = 1. Default: nullptr */ + CIMPP::Simple_Float uo; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GovSteamSGO.cpp b/CGMES_2.4.15_16FEB2016/GovSteamSGO.cpp index dbe420a31..8b1ecdec7 100644 --- a/CGMES_2.4.15_16FEB2016/GovSteamSGO.cpp +++ b/CGMES_2.4.15_16FEB2016/GovSteamSGO.cpp @@ -8,23 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -GovSteamSGO::GovSteamSGO() {}; -GovSteamSGO::~GovSteamSGO() {}; +GovSteamSGO::GovSteamSGO() {} +GovSteamSGO::~GovSteamSGO() {} static const std::list PossibleProfilesForClass = { @@ -62,168 +50,178 @@ GovSteamSGO::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteamSGO_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteamSGO_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -237,7 +235,8 @@ bool get_GovSteamSGO_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamSGO_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -251,7 +250,8 @@ bool get_GovSteamSGO_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamSGO_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -265,7 +265,8 @@ bool get_GovSteamSGO_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamSGO_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -279,7 +280,8 @@ bool get_GovSteamSGO_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovSteamSGO_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -293,7 +295,8 @@ bool get_GovSteamSGO_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamSGO_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -307,7 +310,8 @@ bool get_GovSteamSGO_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamSGO_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -321,7 +325,8 @@ bool get_GovSteamSGO_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamSGO_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -335,7 +340,8 @@ bool get_GovSteamSGO_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamSGO_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -349,7 +355,8 @@ bool get_GovSteamSGO_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamSGO_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -363,7 +370,8 @@ bool get_GovSteamSGO_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamSGO_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -377,7 +385,8 @@ bool get_GovSteamSGO_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamSGO_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -389,8 +398,6 @@ bool get_GovSteamSGO_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char GovSteamSGO::debugName[] = "GovSteamSGO"; const char* GovSteamSGO::debugString() const { @@ -399,23 +406,23 @@ const char* GovSteamSGO::debugString() const void GovSteamSGO::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteamSGO"), &GovSteamSGO_factory)); + factory_map.emplace("cim:GovSteamSGO", &GovSteamSGO_factory); } void GovSteamSGO::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.k1"), &assign_GovSteamSGO_k1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.k2"), &assign_GovSteamSGO_k2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.k3"), &assign_GovSteamSGO_k3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.mwbase"), &assign_GovSteamSGO_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.pmax"), &assign_GovSteamSGO_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.pmin"), &assign_GovSteamSGO_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.t1"), &assign_GovSteamSGO_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.t2"), &assign_GovSteamSGO_t2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.t3"), &assign_GovSteamSGO_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.t4"), &assign_GovSteamSGO_t4)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.t5"), &assign_GovSteamSGO_t5)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.t6"), &assign_GovSteamSGO_t6)); + assign_map.emplace("cim:GovSteamSGO.k1", &assign_GovSteamSGO_k1); + assign_map.emplace("cim:GovSteamSGO.k2", &assign_GovSteamSGO_k2); + assign_map.emplace("cim:GovSteamSGO.k3", &assign_GovSteamSGO_k3); + assign_map.emplace("cim:GovSteamSGO.mwbase", &assign_GovSteamSGO_mwbase); + assign_map.emplace("cim:GovSteamSGO.pmax", &assign_GovSteamSGO_pmax); + assign_map.emplace("cim:GovSteamSGO.pmin", &assign_GovSteamSGO_pmin); + assign_map.emplace("cim:GovSteamSGO.t1", &assign_GovSteamSGO_t1); + assign_map.emplace("cim:GovSteamSGO.t2", &assign_GovSteamSGO_t2); + assign_map.emplace("cim:GovSteamSGO.t3", &assign_GovSteamSGO_t3); + assign_map.emplace("cim:GovSteamSGO.t4", &assign_GovSteamSGO_t4); + assign_map.emplace("cim:GovSteamSGO.t5", &assign_GovSteamSGO_t5); + assign_map.emplace("cim:GovSteamSGO.t6", &assign_GovSteamSGO_t6); } void GovSteamSGO::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/GovSteamSGO.hpp b/CGMES_2.4.15_16FEB2016/GovSteamSGO.hpp index 1f9d6d587..337ba6a63 100644 --- a/CGMES_2.4.15_16FEB2016/GovSteamSGO.hpp +++ b/CGMES_2.4.15_16FEB2016/GovSteamSGO.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Simplified Steam turbine governor model. - */ + /** \brief Simplified Steam turbine governor model. */ class GovSteamSGO : public TurbineGovernorDynamics { public: @@ -29,18 +27,41 @@ namespace CIMPP GovSteamSGO(); ~GovSteamSGO() override; - CIMPP::PU k1; /* One/per unit regulation (K1). Default: nullptr */ - CIMPP::PU k2; /* Fraction (K2). Default: nullptr */ - CIMPP::PU k3; /* Fraction (K3). Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU pmax; /* Upper power limit (Pmax). Default: nullptr */ - CIMPP::Seconds pmin; /* Lower power limit (Pmin). Default: nullptr */ - CIMPP::Seconds t1; /* Controller lag (T1). Default: nullptr */ - CIMPP::Seconds t2; /* Controller lead compensation (T2). Default: nullptr */ - CIMPP::Seconds t3; /* Governor lag (T3) (>0). Default: nullptr */ - CIMPP::Seconds t4; /* Delay due to steam inlet volumes associated with steam chest and inlet piping (T4). Default: nullptr */ - CIMPP::Seconds t5; /* Reheater delay including hot and cold leads (T5). Default: nullptr */ - CIMPP::Seconds t6; /* Delay due to IP-LP turbine, crossover pipes and LP end hoods (T6). Default: nullptr */ + /** \brief One/per unit regulation (K1). Default: nullptr */ + CIMPP::PU k1; + + /** \brief Fraction (K2). Default: nullptr */ + CIMPP::PU k2; + + /** \brief Fraction (K3). Default: nullptr */ + CIMPP::PU k3; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Upper power limit (Pmax). Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Lower power limit (Pmin). Default: nullptr */ + CIMPP::Seconds pmin; + + /** \brief Controller lag (T1). Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Controller lead compensation (T2). Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Governor lag (T3) (>0). Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Delay due to steam inlet volumes associated with steam chest and inlet piping (T4). Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Reheater delay including hot and cold leads (T5). Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Delay due to IP-LP turbine, crossover pipes and LP end hoods (T6). Default: nullptr */ + CIMPP::Seconds t6; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GrossToNetActivePowerCurve.cpp b/CGMES_2.4.15_16FEB2016/GrossToNetActivePowerCurve.cpp index 2e70aaac8..8e293b959 100644 --- a/CGMES_2.4.15_16FEB2016/GrossToNetActivePowerCurve.cpp +++ b/CGMES_2.4.15_16FEB2016/GrossToNetActivePowerCurve.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -GrossToNetActivePowerCurve::GrossToNetActivePowerCurve() : GeneratingUnit(nullptr) {}; -GrossToNetActivePowerCurve::~GrossToNetActivePowerCurve() {}; +GrossToNetActivePowerCurve::GrossToNetActivePowerCurve() : GeneratingUnit(nullptr) {} +GrossToNetActivePowerCurve::~GrossToNetActivePowerCurve() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ GrossToNetActivePowerCurve::getPossibleProfilesForAttributes() const return map; } - - bool assign_GeneratingUnit_GrossToNetActivePowerCurves(BaseClass*, BaseClass*); bool assign_GrossToNetActivePowerCurve_GeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_GrossToNetActivePowerCurve_GeneratingUnit(BaseClass* BaseClass_ptr1, return false; } - bool get_GrossToNetActivePowerCurve_GeneratingUnit(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const GrossToNetActivePowerCurve* element = dynamic_cast(BaseClass_ptr1)) + const GrossToNetActivePowerCurve* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->GeneratingUnit != 0) { @@ -73,7 +71,6 @@ bool get_GrossToNetActivePowerCurve_GeneratingUnit(const BaseClass* BaseClass_pt return false; } - const char GrossToNetActivePowerCurve::debugName[] = "GrossToNetActivePowerCurve"; const char* GrossToNetActivePowerCurve::debugString() const { @@ -82,7 +79,7 @@ const char* GrossToNetActivePowerCurve::debugString() const void GrossToNetActivePowerCurve::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GrossToNetActivePowerCurve"), &GrossToNetActivePowerCurve_factory)); + factory_map.emplace("cim:GrossToNetActivePowerCurve", &GrossToNetActivePowerCurve_factory); } void GrossToNetActivePowerCurve::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void GrossToNetActivePowerCurve::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GrossToNetActivePowerCurve.GeneratingUnit"), &assign_GrossToNetActivePowerCurve_GeneratingUnit)); + assign_map.emplace("cim:GrossToNetActivePowerCurve.GeneratingUnit", &assign_GrossToNetActivePowerCurve_GeneratingUnit); } void GrossToNetActivePowerCurve::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/GrossToNetActivePowerCurve.hpp b/CGMES_2.4.15_16FEB2016/GrossToNetActivePowerCurve.hpp index d3a65bedc..eb1b8ea60 100644 --- a/CGMES_2.4.15_16FEB2016/GrossToNetActivePowerCurve.hpp +++ b/CGMES_2.4.15_16FEB2016/GrossToNetActivePowerCurve.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class GeneratingUnit; - /* - Relationship between the generating unit's gross active power output on the X-axis (measured at the terminals of the machine(s)) and the generating unit's net active power output on the Y-axis (based on utility-defined measurements at the power station). Station service loads, when modeled, should be treated as non-conforming bus loads. There may be more than one curve, depending on the auxiliary equipment that is in service. - */ + /** \brief Relationship between the generating unit's gross active power output on the X-axis (measured at the terminals of the machine(s)) and the generating unit's net active power output on the Y-axis (based on utility-defined measurements at the power station). Station service loads, when modeled, should be treated as non-conforming bus loads. There may be more than one curve, depending on the auxiliary equipment that is in service. */ class GrossToNetActivePowerCurve : public Curve { public: @@ -27,7 +25,8 @@ namespace CIMPP GrossToNetActivePowerCurve(); ~GrossToNetActivePowerCurve() override; - CIMPP::GeneratingUnit* GeneratingUnit; /* A generating unit may have a gross active power to net active power curve, describing the losses and auxiliary power requirements of the unit. Default: 0 */ + /** \brief A generating unit may have a gross active power to net active power curve, describing the losses and auxiliary power requirements of the unit. Default: 0 */ + CIMPP::GeneratingUnit* GeneratingUnit; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Ground.cpp b/CGMES_2.4.15_16FEB2016/Ground.cpp index fa0b071bc..e2e2a0868 100644 --- a/CGMES_2.4.15_16FEB2016/Ground.cpp +++ b/CGMES_2.4.15_16FEB2016/Ground.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Ground::Ground() {}; -Ground::~Ground() {}; +Ground::Ground() {} +Ground::~Ground() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ Ground::getPossibleProfilesForAttributes() const return map; } - - - - - const char Ground::debugName[] = "Ground"; const char* Ground::debugString() const { @@ -51,7 +46,7 @@ const char* Ground::debugString() const void Ground::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Ground"), &Ground_factory)); + factory_map.emplace("cim:Ground", &Ground_factory); } void Ground::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/Ground.hpp b/CGMES_2.4.15_16FEB2016/Ground.hpp index 8ff5cf74f..56bd33323 100644 --- a/CGMES_2.4.15_16FEB2016/Ground.hpp +++ b/CGMES_2.4.15_16FEB2016/Ground.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A point where the system is grounded used for connecting conducting equipment to ground. The power system model can have any number of grounds. - */ + /** \brief A point where the system is grounded used for connecting conducting equipment to ground. The power system model can have any number of grounds. */ class Ground : public ConductingEquipment { public: @@ -26,7 +24,6 @@ namespace CIMPP Ground(); ~Ground() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GroundDisconnector.cpp b/CGMES_2.4.15_16FEB2016/GroundDisconnector.cpp index ebe1006e0..1926b56f9 100644 --- a/CGMES_2.4.15_16FEB2016/GroundDisconnector.cpp +++ b/CGMES_2.4.15_16FEB2016/GroundDisconnector.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -GroundDisconnector::GroundDisconnector() {}; -GroundDisconnector::~GroundDisconnector() {}; +GroundDisconnector::GroundDisconnector() {} +GroundDisconnector::~GroundDisconnector() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ GroundDisconnector::getPossibleProfilesForAttributes() const return map; } - - - - - const char GroundDisconnector::debugName[] = "GroundDisconnector"; const char* GroundDisconnector::debugString() const { @@ -52,7 +47,7 @@ const char* GroundDisconnector::debugString() const void GroundDisconnector::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GroundDisconnector"), &GroundDisconnector_factory)); + factory_map.emplace("cim:GroundDisconnector", &GroundDisconnector_factory); } void GroundDisconnector::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/GroundDisconnector.hpp b/CGMES_2.4.15_16FEB2016/GroundDisconnector.hpp index 0e06b381a..ccf2b2c27 100644 --- a/CGMES_2.4.15_16FEB2016/GroundDisconnector.hpp +++ b/CGMES_2.4.15_16FEB2016/GroundDisconnector.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A manually operated or motor operated mechanical switching device used for isolating a circuit or equipment from ground. - */ + /** \brief A manually operated or motor operated mechanical switching device used for isolating a circuit or equipment from ground. */ class GroundDisconnector : public Switch { public: @@ -26,7 +24,6 @@ namespace CIMPP GroundDisconnector(); ~GroundDisconnector() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/GroundingImpedance.cpp b/CGMES_2.4.15_16FEB2016/GroundingImpedance.cpp index 346a40027..db7a16992 100644 --- a/CGMES_2.4.15_16FEB2016/GroundingImpedance.cpp +++ b/CGMES_2.4.15_16FEB2016/GroundingImpedance.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Reactance.hpp" using namespace CIMPP; -GroundingImpedance::GroundingImpedance() {}; -GroundingImpedance::~GroundingImpedance() {}; +GroundingImpedance::GroundingImpedance() {} +GroundingImpedance::~GroundingImpedance() {} static const std::list PossibleProfilesForClass = { @@ -40,25 +39,24 @@ GroundingImpedance::getPossibleProfilesForAttributes() const return map; } - -bool assign_GroundingImpedance_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GroundingImpedance_x(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GroundingImpedance* element = dynamic_cast(BaseClass_ptr1)) + GroundingImpedance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GroundingImpedance_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GroundingImpedance* element = dynamic_cast(BaseClass_ptr1)) + const GroundingImpedance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x; if (!buffer.str().empty()) @@ -70,8 +68,6 @@ bool get_GroundingImpedance_x(const BaseClass* BaseClass_ptr1, std::stringstream return false; } - - const char GroundingImpedance::debugName[] = "GroundingImpedance"; const char* GroundingImpedance::debugString() const { @@ -80,12 +76,12 @@ const char* GroundingImpedance::debugString() const void GroundingImpedance::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GroundingImpedance"), &GroundingImpedance_factory)); + factory_map.emplace("cim:GroundingImpedance", &GroundingImpedance_factory); } void GroundingImpedance::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GroundingImpedance.x"), &assign_GroundingImpedance_x)); + assign_map.emplace("cim:GroundingImpedance.x", &assign_GroundingImpedance_x); } void GroundingImpedance::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/GroundingImpedance.hpp b/CGMES_2.4.15_16FEB2016/GroundingImpedance.hpp index f821443f8..ad05b5aaa 100644 --- a/CGMES_2.4.15_16FEB2016/GroundingImpedance.hpp +++ b/CGMES_2.4.15_16FEB2016/GroundingImpedance.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A fixed impedance device used for grounding. - */ + /** \brief A fixed impedance device used for grounding. */ class GroundingImpedance : public EarthFaultCompensator { public: @@ -27,7 +25,8 @@ namespace CIMPP GroundingImpedance(); ~GroundingImpedance() override; - CIMPP::Reactance x; /* Reactance of device. Default: nullptr */ + /** \brief Reactance of device. Default: nullptr */ + CIMPP::Reactance x; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/HydroEnergyConversionKind.cpp b/CGMES_2.4.15_16FEB2016/HydroEnergyConversionKind.cpp index 1bc81701f..aeddc62cb 100644 --- a/CGMES_2.4.15_16FEB2016/HydroEnergyConversionKind.cpp +++ b/CGMES_2.4.15_16FEB2016/HydroEnergyConversionKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "HydroEnergyConversionKind") + if (EnumSymbol.substr(0, pos) != "HydroEnergyConversionKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,12 +50,12 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "generator") + if (EnumSymbol == "generator") { rop = HydroEnergyConversionKind::generator; return lop; } - if(EnumSymbol == "pumpAndGenerator") + if (EnumSymbol == "pumpAndGenerator") { rop = HydroEnergyConversionKind::pumpAndGenerator; return lop; diff --git a/CGMES_2.4.15_16FEB2016/HydroEnergyConversionKind.hpp b/CGMES_2.4.15_16FEB2016/HydroEnergyConversionKind.hpp index fb666b097..968163466 100644 --- a/CGMES_2.4.15_16FEB2016/HydroEnergyConversionKind.hpp +++ b/CGMES_2.4.15_16FEB2016/HydroEnergyConversionKind.hpp @@ -9,21 +9,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Specifies the capability of the hydro generating unit to convert energy as a generator or pump. - */ + /** \brief Specifies the capability of the hydro generating unit to convert energy as a generator or pump. */ class HydroEnergyConversionKind { public: enum HydroEnergyConversionKind_ENUM { - /** - * Able to generate power, but not able to pump water for energy storage. - */ + /** Able to generate power, but not able to pump water for energy storage. */ generator, - /** - * Able to both generate power and pump water for energy storage. - */ + /** Able to both generate power and pump water for energy storage. */ pumpAndGenerator, }; diff --git a/CGMES_2.4.15_16FEB2016/HydroGeneratingUnit.cpp b/CGMES_2.4.15_16FEB2016/HydroGeneratingUnit.cpp index 5a146ad59..13c3f4210 100644 --- a/CGMES_2.4.15_16FEB2016/HydroGeneratingUnit.cpp +++ b/CGMES_2.4.15_16FEB2016/HydroGeneratingUnit.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "HydroPowerPlant.hpp" -#include "HydroEnergyConversionKind.hpp" using namespace CIMPP; -HydroGeneratingUnit::HydroGeneratingUnit() : HydroPowerPlant(nullptr) {}; -HydroGeneratingUnit::~HydroGeneratingUnit() {}; +HydroGeneratingUnit::HydroGeneratingUnit() : HydroPowerPlant(nullptr) {} +HydroGeneratingUnit::~HydroGeneratingUnit() {} static const std::list PossibleProfilesForClass = { @@ -43,21 +42,6 @@ HydroGeneratingUnit::getPossibleProfilesForAttributes() const return map; } - -bool assign_HydroGeneratingUnit_energyConversionCapability(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->energyConversionCapability; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_HydroPowerPlant_HydroGeneratingUnits(BaseClass*, BaseClass*); bool assign_HydroGeneratingUnit_HydroPowerPlant(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -75,10 +59,24 @@ bool assign_HydroGeneratingUnit_HydroPowerPlant(BaseClass* BaseClass_ptr1, BaseC return false; } +bool assign_HydroGeneratingUnit_energyConversionCapability(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->energyConversionCapability; + if (!buffer.fail()) + { + return true; + } + } + return false; +} bool get_HydroGeneratingUnit_HydroPowerPlant(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->HydroPowerPlant != 0) { @@ -89,10 +87,10 @@ bool get_HydroGeneratingUnit_HydroPowerPlant(const BaseClass* BaseClass_ptr1, st return false; } - bool get_HydroGeneratingUnit_energyConversionCapability(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->energyConversionCapability; if (!buffer.str().empty()) @@ -112,17 +110,17 @@ const char* HydroGeneratingUnit::debugString() const void HydroGeneratingUnit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:HydroGeneratingUnit"), &HydroGeneratingUnit_factory)); + factory_map.emplace("cim:HydroGeneratingUnit", &HydroGeneratingUnit_factory); } void HydroGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:HydroGeneratingUnit.energyConversionCapability"), &assign_HydroGeneratingUnit_energyConversionCapability)); + assign_map.emplace("cim:HydroGeneratingUnit.energyConversionCapability", &assign_HydroGeneratingUnit_energyConversionCapability); } void HydroGeneratingUnit::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:HydroGeneratingUnit.HydroPowerPlant"), &assign_HydroGeneratingUnit_HydroPowerPlant)); + assign_map.emplace("cim:HydroGeneratingUnit.HydroPowerPlant", &assign_HydroGeneratingUnit_HydroPowerPlant); } void HydroGeneratingUnit::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/HydroGeneratingUnit.hpp b/CGMES_2.4.15_16FEB2016/HydroGeneratingUnit.hpp index 39eda04a4..74455c5e9 100644 --- a/CGMES_2.4.15_16FEB2016/HydroGeneratingUnit.hpp +++ b/CGMES_2.4.15_16FEB2016/HydroGeneratingUnit.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class HydroPowerPlant; - /* - A generating unit whose prime mover is a hydraulic turbine (e.g., Francis, Pelton, Kaplan). - */ + /** \brief A generating unit whose prime mover is a hydraulic turbine (e.g., Francis, Pelton, Kaplan). */ class HydroGeneratingUnit : public GeneratingUnit { public: @@ -28,8 +26,11 @@ namespace CIMPP HydroGeneratingUnit(); ~HydroGeneratingUnit() override; - CIMPP::HydroPowerPlant* HydroPowerPlant; /* The hydro generating unit belongs to a hydro power plant. Default: 0 */ - CIMPP::HydroEnergyConversionKind energyConversionCapability; /* Energy conversion capability for generating. Default: 0 */ + /** \brief The hydro generating unit belongs to a hydro power plant. Default: 0 */ + CIMPP::HydroPowerPlant* HydroPowerPlant; + + /** \brief Energy conversion capability for generating. Default: 0 */ + CIMPP::HydroEnergyConversionKind energyConversionCapability; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/HydroPlantStorageKind.cpp b/CGMES_2.4.15_16FEB2016/HydroPlantStorageKind.cpp index 4930efb66..61d7d942b 100644 --- a/CGMES_2.4.15_16FEB2016/HydroPlantStorageKind.cpp +++ b/CGMES_2.4.15_16FEB2016/HydroPlantStorageKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "HydroPlantStorageKind") + if (EnumSymbol.substr(0, pos) != "HydroPlantStorageKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "runOfRiver") + if (EnumSymbol == "runOfRiver") { rop = HydroPlantStorageKind::runOfRiver; return lop; } - if(EnumSymbol == "pumpedStorage") + if (EnumSymbol == "pumpedStorage") { rop = HydroPlantStorageKind::pumpedStorage; return lop; } - if(EnumSymbol == "storage") + if (EnumSymbol == "storage") { rop = HydroPlantStorageKind::storage; return lop; diff --git a/CGMES_2.4.15_16FEB2016/HydroPlantStorageKind.hpp b/CGMES_2.4.15_16FEB2016/HydroPlantStorageKind.hpp index ddd375110..c5894a490 100644 --- a/CGMES_2.4.15_16FEB2016/HydroPlantStorageKind.hpp +++ b/CGMES_2.4.15_16FEB2016/HydroPlantStorageKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The type of hydro power plant. - */ + /** \brief The type of hydro power plant. */ class HydroPlantStorageKind { public: enum HydroPlantStorageKind_ENUM { - /** - * Run of river. - */ + /** Run of river. */ runOfRiver, - /** - * Pumped storage. - */ + /** Pumped storage. */ pumpedStorage, - /** - * Storage. - */ + /** Storage. */ storage, }; diff --git a/CGMES_2.4.15_16FEB2016/HydroPowerPlant.cpp b/CGMES_2.4.15_16FEB2016/HydroPowerPlant.cpp index 9d0c8c562..ad177ac88 100644 --- a/CGMES_2.4.15_16FEB2016/HydroPowerPlant.cpp +++ b/CGMES_2.4.15_16FEB2016/HydroPowerPlant.cpp @@ -10,12 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "HydroGeneratingUnit.hpp" #include "HydroPump.hpp" -#include "HydroPlantStorageKind.hpp" using namespace CIMPP; -HydroPowerPlant::HydroPowerPlant() {}; -HydroPowerPlant::~HydroPowerPlant() {}; +HydroPowerPlant::HydroPowerPlant() {} +HydroPowerPlant::~HydroPowerPlant() {} static const std::list PossibleProfilesForClass = { @@ -44,21 +43,6 @@ HydroPowerPlant::getPossibleProfilesForAttributes() const return map; } - -bool assign_HydroPowerPlant_hydroPlantStorageType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (HydroPowerPlant* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->hydroPlantStorageType; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_HydroGeneratingUnit_HydroPowerPlant(BaseClass*, BaseClass*); bool assign_HydroPowerPlant_HydroGeneratingUnits(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -75,6 +59,7 @@ bool assign_HydroPowerPlant_HydroGeneratingUnits(BaseClass* BaseClass_ptr1, Base } return false; } + bool assign_HydroPump_HydroPowerPlant(BaseClass*, BaseClass*); bool assign_HydroPowerPlant_HydroPumps(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -92,11 +77,26 @@ bool assign_HydroPowerPlant_HydroPumps(BaseClass* BaseClass_ptr1, BaseClass* Bas return false; } +bool assign_HydroPowerPlant_hydroPlantStorageType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + HydroPowerPlant* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->hydroPlantStorageType; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + bool get_HydroPowerPlant_hydroPlantStorageType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const HydroPowerPlant* element = dynamic_cast(BaseClass_ptr1)) + const HydroPowerPlant* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hydroPlantStorageType; if (!buffer.str().empty()) @@ -116,18 +116,18 @@ const char* HydroPowerPlant::debugString() const void HydroPowerPlant::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:HydroPowerPlant"), &HydroPowerPlant_factory)); + factory_map.emplace("cim:HydroPowerPlant", &HydroPowerPlant_factory); } void HydroPowerPlant::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:HydroPowerPlant.hydroPlantStorageType"), &assign_HydroPowerPlant_hydroPlantStorageType)); + assign_map.emplace("cim:HydroPowerPlant.hydroPlantStorageType", &assign_HydroPowerPlant_hydroPlantStorageType); } void HydroPowerPlant::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:HydroPowerPlant.HydroGeneratingUnits"), &assign_HydroPowerPlant_HydroGeneratingUnits)); - assign_map.insert(std::make_pair(std::string("cim:HydroPowerPlant.HydroPumps"), &assign_HydroPowerPlant_HydroPumps)); + assign_map.emplace("cim:HydroPowerPlant.HydroGeneratingUnits", &assign_HydroPowerPlant_HydroGeneratingUnits); + assign_map.emplace("cim:HydroPowerPlant.HydroPumps", &assign_HydroPowerPlant_HydroPumps); } void HydroPowerPlant::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/HydroPowerPlant.hpp b/CGMES_2.4.15_16FEB2016/HydroPowerPlant.hpp index 71bb379b4..ab7712608 100644 --- a/CGMES_2.4.15_16FEB2016/HydroPowerPlant.hpp +++ b/CGMES_2.4.15_16FEB2016/HydroPowerPlant.hpp @@ -19,9 +19,7 @@ namespace CIMPP class HydroGeneratingUnit; class HydroPump; - /* - A hydro power station which can generate or pump. When generating, the generator turbines receive water from an upper reservoir. When pumping, the pumps receive their water from a lower reservoir. - */ + /** \brief A hydro power station which can generate or pump. When generating, the generator turbines receive water from an upper reservoir. When pumping, the pumps receive their water from a lower reservoir. */ class HydroPowerPlant : public PowerSystemResource { public: @@ -29,9 +27,14 @@ namespace CIMPP HydroPowerPlant(); ~HydroPowerPlant() override; - std::list HydroGeneratingUnits; /* The hydro generating unit belongs to a hydro power plant. Default: 0 */ - std::list HydroPumps; /* The hydro pump may be a member of a pumped storage plant or a pump for distributing water. Default: 0 */ - CIMPP::HydroPlantStorageKind hydroPlantStorageType; /* The type of hydro power plant water storage. Default: 0 */ + /** \brief The hydro generating unit belongs to a hydro power plant. Default: 0 */ + std::list HydroGeneratingUnits; + + /** \brief The hydro pump may be a member of a pumped storage plant or a pump for distributing water. Default: 0 */ + std::list HydroPumps; + + /** \brief The type of hydro power plant water storage. Default: 0 */ + CIMPP::HydroPlantStorageKind hydroPlantStorageType; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/HydroPump.cpp b/CGMES_2.4.15_16FEB2016/HydroPump.cpp index 698253b53..8d0613e79 100644 --- a/CGMES_2.4.15_16FEB2016/HydroPump.cpp +++ b/CGMES_2.4.15_16FEB2016/HydroPump.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -HydroPump::HydroPump() : HydroPowerPlant(nullptr), RotatingMachine(nullptr) {}; -HydroPump::~HydroPump() {}; +HydroPump::HydroPump() : HydroPowerPlant(nullptr), RotatingMachine(nullptr) {} +HydroPump::~HydroPump() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ HydroPump::getPossibleProfilesForAttributes() const return map; } - - bool assign_HydroPowerPlant_HydroPumps(BaseClass*, BaseClass*); bool assign_HydroPump_HydroPowerPlant(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_HydroPump_HydroPowerPlant(BaseClass* BaseClass_ptr1, BaseClass* Base } return false; } + bool assign_RotatingMachine_HydroPump(BaseClass*, BaseClass*); bool assign_HydroPump_RotatingMachine(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_HydroPump_RotatingMachine(BaseClass* BaseClass_ptr1, BaseClass* Base return false; } - bool get_HydroPump_HydroPowerPlant(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const HydroPump* element = dynamic_cast(BaseClass_ptr1)) + const HydroPump* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->HydroPowerPlant != 0) { @@ -93,7 +92,8 @@ bool get_HydroPump_HydroPowerPlant(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const HydroPump* element = dynamic_cast(BaseClass_ptr1)) + const HydroPump* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->RotatingMachine != 0) { @@ -104,7 +104,6 @@ bool get_HydroPump_RotatingMachine(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:HydroPump"), &HydroPump_factory)); + factory_map.emplace("cim:HydroPump", &HydroPump_factory); } void HydroPump::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void HydroPump::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:HydroPump.HydroPowerPlant"), &assign_HydroPump_HydroPowerPlant)); - assign_map.insert(std::make_pair(std::string("cim:HydroPump.RotatingMachine"), &assign_HydroPump_RotatingMachine)); + assign_map.emplace("cim:HydroPump.HydroPowerPlant", &assign_HydroPump_HydroPowerPlant); + assign_map.emplace("cim:HydroPump.RotatingMachine", &assign_HydroPump_RotatingMachine); } void HydroPump::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/HydroPump.hpp b/CGMES_2.4.15_16FEB2016/HydroPump.hpp index d744a3728..9830eee7a 100644 --- a/CGMES_2.4.15_16FEB2016/HydroPump.hpp +++ b/CGMES_2.4.15_16FEB2016/HydroPump.hpp @@ -18,9 +18,7 @@ namespace CIMPP class HydroPowerPlant; class RotatingMachine; - /* - A synchronous motor-driven pump, typically associated with a pumped storage plant. - */ + /** \brief A synchronous motor-driven pump, typically associated with a pumped storage plant. */ class HydroPump : public Equipment { public: @@ -28,8 +26,11 @@ namespace CIMPP HydroPump(); ~HydroPump() override; - CIMPP::HydroPowerPlant* HydroPowerPlant; /* The hydro pump may be a member of a pumped storage plant or a pump for distributing water. Default: 0 */ - CIMPP::RotatingMachine* RotatingMachine; /* The synchronous machine drives the turbine which moves the water from a low elevation to a higher elevation. The direction of machine rotation for pumping may or may not be the same as for generating. Default: 0 */ + /** \brief The hydro pump may be a member of a pumped storage plant or a pump for distributing water. Default: 0 */ + CIMPP::HydroPowerPlant* HydroPowerPlant; + + /** \brief The synchronous machine drives the turbine which moves the water from a low elevation to a higher elevation. The direction of machine rotation for pumping may or may not be the same as for generating. Default: 0 */ + CIMPP::RotatingMachine* RotatingMachine; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/IEC61970.hpp b/CGMES_2.4.15_16FEB2016/IEC61970.hpp index 32e9abca4..b7bd2b2c1 100644 --- a/CGMES_2.4.15_16FEB2016/IEC61970.hpp +++ b/CGMES_2.4.15_16FEB2016/IEC61970.hpp @@ -401,4 +401,5 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindType1or2UserDefined.hpp" #include "WindType3or4UserDefined.hpp" #include "UnknownType.hpp" -#endif \ No newline at end of file + +#endif diff --git a/CGMES_2.4.15_16FEB2016/IdentifiedObject.cpp b/CGMES_2.4.15_16FEB2016/IdentifiedObject.cpp index f9ebb00b4..b32ec2f29 100644 --- a/CGMES_2.4.15_16FEB2016/IdentifiedObject.cpp +++ b/CGMES_2.4.15_16FEB2016/IdentifiedObject.cpp @@ -9,16 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "DiagramObject.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -IdentifiedObject::IdentifiedObject() {}; -IdentifiedObject::~IdentifiedObject() {}; +IdentifiedObject::IdentifiedObject() {} +IdentifiedObject::~IdentifiedObject() {} static const std::list PossibleProfilesForClass = { @@ -58,93 +53,98 @@ IdentifiedObject::getPossibleProfilesForAttributes() const return map; } - -bool assign_IdentifiedObject_description(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramObject_IdentifiedObject(BaseClass*, BaseClass*); +bool assign_IdentifiedObject_DiagramObjects(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + DiagramObject* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - element->description = buffer.str(); - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->DiagramObjects.begin(), element->DiagramObjects.end(), element2) == element->DiagramObjects.end()) + { + element->DiagramObjects.push_back(element2); + return assign_DiagramObject_IdentifiedObject(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_IdentifiedObject_energyIdentCodeEic(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_IdentifiedObject_description(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - element->energyIdentCodeEic = buffer.str(); - if (buffer.fail()) - return false; - else + element->description = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_IdentifiedObject_mRID(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_IdentifiedObject_energyIdentCodeEic(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - element->mRID = buffer.str(); - if (buffer.fail()) - return false; - else + element->energyIdentCodeEic = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_IdentifiedObject_name(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_IdentifiedObject_mRID(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - element->name = buffer.str(); - if (buffer.fail()) - return false; - else + element->mRID = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_IdentifiedObject_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_IdentifiedObject_name(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - element->shortName = buffer.str(); - if (buffer.fail()) - return false; - else + element->name = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_DiagramObject_IdentifiedObject(BaseClass*, BaseClass*); -bool assign_IdentifiedObject_DiagramObjects(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_IdentifiedObject_shortName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); - DiagramObject* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->DiagramObjects.begin(), element->DiagramObjects.end(), element2) == element->DiagramObjects.end()) + element->shortName = buffer.str(); + if (!buffer.fail()) { - element->DiagramObjects.push_back(element2); - return assign_DiagramObject_IdentifiedObject(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_IdentifiedObject_description(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->description; if (!buffer.str().empty()) @@ -158,7 +158,8 @@ bool get_IdentifiedObject_description(const BaseClass* BaseClass_ptr1, std::stri bool get_IdentifiedObject_energyIdentCodeEic(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->energyIdentCodeEic; if (!buffer.str().empty()) @@ -172,7 +173,8 @@ bool get_IdentifiedObject_energyIdentCodeEic(const BaseClass* BaseClass_ptr1, st bool get_IdentifiedObject_mRID(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mRID; if (!buffer.str().empty()) @@ -186,7 +188,8 @@ bool get_IdentifiedObject_mRID(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_IdentifiedObject_name(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->name; if (!buffer.str().empty()) @@ -200,7 +203,8 @@ bool get_IdentifiedObject_name(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_IdentifiedObject_shortName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortName; if (!buffer.str().empty()) @@ -212,8 +216,6 @@ bool get_IdentifiedObject_shortName(const BaseClass* BaseClass_ptr1, std::string return false; } - - const char IdentifiedObject::debugName[] = "IdentifiedObject"; const char* IdentifiedObject::debugString() const { @@ -222,21 +224,21 @@ const char* IdentifiedObject::debugString() const void IdentifiedObject::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:IdentifiedObject"), &IdentifiedObject_factory)); + factory_map.emplace("cim:IdentifiedObject", &IdentifiedObject_factory); } void IdentifiedObject::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:IdentifiedObject.description"), &assign_IdentifiedObject_description)); - assign_map.insert(std::make_pair(std::string("cim:IdentifiedObject.energyIdentCodeEic"), &assign_IdentifiedObject_energyIdentCodeEic)); - assign_map.insert(std::make_pair(std::string("cim:IdentifiedObject.mRID"), &assign_IdentifiedObject_mRID)); - assign_map.insert(std::make_pair(std::string("cim:IdentifiedObject.name"), &assign_IdentifiedObject_name)); - assign_map.insert(std::make_pair(std::string("cim:IdentifiedObject.shortName"), &assign_IdentifiedObject_shortName)); + assign_map.emplace("cim:IdentifiedObject.description", &assign_IdentifiedObject_description); + assign_map.emplace("cim:IdentifiedObject.energyIdentCodeEic", &assign_IdentifiedObject_energyIdentCodeEic); + assign_map.emplace("cim:IdentifiedObject.mRID", &assign_IdentifiedObject_mRID); + assign_map.emplace("cim:IdentifiedObject.name", &assign_IdentifiedObject_name); + assign_map.emplace("cim:IdentifiedObject.shortName", &assign_IdentifiedObject_shortName); } void IdentifiedObject::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:IdentifiedObject.DiagramObjects"), &assign_IdentifiedObject_DiagramObjects)); + assign_map.emplace("cim:IdentifiedObject.DiagramObjects", &assign_IdentifiedObject_DiagramObjects); } void IdentifiedObject::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/IdentifiedObject.hpp b/CGMES_2.4.15_16FEB2016/IdentifiedObject.hpp index 0de7c9fa5..43941ab22 100644 --- a/CGMES_2.4.15_16FEB2016/IdentifiedObject.hpp +++ b/CGMES_2.4.15_16FEB2016/IdentifiedObject.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class DiagramObject; - /* - This is a root class to provide common identification for all classes needing identification and naming attributes. - */ + /** \brief This is a root class to provide common identification for all classes needing identification and naming attributes. */ class IdentifiedObject : public BaseClass { public: @@ -28,12 +26,23 @@ namespace CIMPP IdentifiedObject(); ~IdentifiedObject() override; - std::list DiagramObjects; /* The domain object to which this diagram object is associated. Default: 0 */ - CIMPP::String description; /* The description is a free human readable text describing or naming the object. It may be non unique and may not correlate to a naming hierarchy. Default: '' */ - CIMPP::String energyIdentCodeEic; /* The attribute is used for an exchange of the EIC code (Energy identification Code). The length of the string is 16 characters as defined by the EIC code. References: Default: '' */ - CIMPP::String mRID; /* Master resource identifier issued by a model authority. The mRID is globally unique within an exchange context. Global uniqueness is easily achieved by using a UUID, as specified in RFC 4122, for the mRID. The use of UUID is strongly recommended. For CIMXML data files in RDF syntax conforming to IEC 61970-552 Edition 1, the mRID is mapped to rdf:ID or rdf:about attributes that identify CIM object elements. Default: '' */ - CIMPP::String name; /* The name is any free human readable and possibly non unique text naming the object. Default: '' */ - CIMPP::String shortName; /* The attribute is used for an exchange of a human readable short name with length of the string 12 characters maximum. Default: '' */ + /** \brief The domain object to which this diagram object is associated. Default: 0 */ + std::list DiagramObjects; + + /** \brief The description is a free human readable text describing or naming the object. It may be non unique and may not correlate to a naming hierarchy. Default: '' */ + CIMPP::String description; + + /** \brief The attribute is used for an exchange of the EIC code (Energy identification Code). The length of the string is 16 characters as defined by the EIC code. References: Default: '' */ + CIMPP::String energyIdentCodeEic; + + /** \brief Master resource identifier issued by a model authority. The mRID is globally unique within an exchange context. Global uniqueness is easily achieved by using a UUID, as specified in RFC 4122, for the mRID. The use of UUID is strongly recommended. For CIMXML data files in RDF syntax conforming to IEC 61970-552 Edition 1, the mRID is mapped to rdf:ID or rdf:about attributes that identify CIM object elements. Default: '' */ + CIMPP::String mRID; + + /** \brief The name is any free human readable and possibly non unique text naming the object. Default: '' */ + CIMPP::String name; + + /** \brief The attribute is used for an exchange of a human readable short name with length of the string 12 characters maximum. Default: '' */ + CIMPP::String shortName; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/IfdBaseKind.cpp b/CGMES_2.4.15_16FEB2016/IfdBaseKind.cpp index 06c6513c2..d0777efc8 100644 --- a/CGMES_2.4.15_16FEB2016/IfdBaseKind.cpp +++ b/CGMES_2.4.15_16FEB2016/IfdBaseKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "IfdBaseKind") + if (EnumSymbol.substr(0, pos) != "IfdBaseKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,22 +50,22 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "ifag") + if (EnumSymbol == "ifag") { rop = IfdBaseKind::ifag; return lop; } - if(EnumSymbol == "ifnl") + if (EnumSymbol == "ifnl") { rop = IfdBaseKind::ifnl; return lop; } - if(EnumSymbol == "iffl") + if (EnumSymbol == "iffl") { rop = IfdBaseKind::iffl; return lop; } - if(EnumSymbol == "other") + if (EnumSymbol == "other") { rop = IfdBaseKind::other; return lop; diff --git a/CGMES_2.4.15_16FEB2016/IfdBaseKind.hpp b/CGMES_2.4.15_16FEB2016/IfdBaseKind.hpp index 6938195f3..29c9e79cb 100644 --- a/CGMES_2.4.15_16FEB2016/IfdBaseKind.hpp +++ b/CGMES_2.4.15_16FEB2016/IfdBaseKind.hpp @@ -9,29 +9,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Excitation base system mode. - */ + /** \brief Excitation base system mode. */ class IfdBaseKind { public: enum IfdBaseKind_ENUM { - /** - * Air gap line mode. ifdBaseValue is computed, not defined by the user, in this mode. - */ + /** Air gap line mode. ifdBaseValue is computed, not defined by the user, in this mode. */ ifag, - /** - * No load system with saturation mode. ifdBaseValue is computed, not defined by the user, in this mode. - */ + /** No load system with saturation mode. ifdBaseValue is computed, not defined by the user, in this mode. */ ifnl, - /** - * Full load system mode. ifdBaseValue is computed, not defined by the user, in this mode. - */ + /** Full load system mode. ifdBaseValue is computed, not defined by the user, in this mode. */ iffl, - /** - * Free mode. ifdBaseValue is defined by the user in this mode. - */ + /** Free mode. ifdBaseValue is defined by the user in this mode. */ other, }; diff --git a/CGMES_2.4.15_16FEB2016/Inductance.hpp b/CGMES_2.4.15_16FEB2016/Inductance.hpp index 9d5005915..f9b404e47 100644 --- a/CGMES_2.4.15_16FEB2016/Inductance.hpp +++ b/CGMES_2.4.15_16FEB2016/Inductance.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Inductive part of reactance (imaginary part of impedance), at rated frequency. - */ + /** \brief Inductive part of reactance (imaginary part of impedance), at rated frequency. */ class Inductance { public: diff --git a/CGMES_2.4.15_16FEB2016/InductancePerLength.hpp b/CGMES_2.4.15_16FEB2016/InductancePerLength.hpp index 8ede31f20..49ea2eb9c 100644 --- a/CGMES_2.4.15_16FEB2016/InductancePerLength.hpp +++ b/CGMES_2.4.15_16FEB2016/InductancePerLength.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Inductance per unit of length. - */ + /** \brief Inductance per unit of length. */ class InductancePerLength { public: diff --git a/CGMES_2.4.15_16FEB2016/InputSignalKind.cpp b/CGMES_2.4.15_16FEB2016/InputSignalKind.cpp index fc207f2f1..454514c57 100644 --- a/CGMES_2.4.15_16FEB2016/InputSignalKind.cpp +++ b/CGMES_2.4.15_16FEB2016/InputSignalKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "InputSignalKind") + if (EnumSymbol.substr(0, pos) != "InputSignalKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,52 +50,52 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "rotorSpeed") + if (EnumSymbol == "rotorSpeed") { rop = InputSignalKind::rotorSpeed; return lop; } - if(EnumSymbol == "rotorAngularFrequencyDeviation") + if (EnumSymbol == "rotorAngularFrequencyDeviation") { rop = InputSignalKind::rotorAngularFrequencyDeviation; return lop; } - if(EnumSymbol == "busFrequency") + if (EnumSymbol == "busFrequency") { rop = InputSignalKind::busFrequency; return lop; } - if(EnumSymbol == "busFrequencyDeviation") + if (EnumSymbol == "busFrequencyDeviation") { rop = InputSignalKind::busFrequencyDeviation; return lop; } - if(EnumSymbol == "generatorElectricalPower") + if (EnumSymbol == "generatorElectricalPower") { rop = InputSignalKind::generatorElectricalPower; return lop; } - if(EnumSymbol == "generatorAcceleratingPower") + if (EnumSymbol == "generatorAcceleratingPower") { rop = InputSignalKind::generatorAcceleratingPower; return lop; } - if(EnumSymbol == "busVoltage") + if (EnumSymbol == "busVoltage") { rop = InputSignalKind::busVoltage; return lop; } - if(EnumSymbol == "busVoltageDerivative") + if (EnumSymbol == "busVoltageDerivative") { rop = InputSignalKind::busVoltageDerivative; return lop; } - if(EnumSymbol == "branchCurrent") + if (EnumSymbol == "branchCurrent") { rop = InputSignalKind::branchCurrent; return lop; } - if(EnumSymbol == "fieldCurrent") + if (EnumSymbol == "fieldCurrent") { rop = InputSignalKind::fieldCurrent; return lop; diff --git a/CGMES_2.4.15_16FEB2016/InputSignalKind.hpp b/CGMES_2.4.15_16FEB2016/InputSignalKind.hpp index 98b85d1f8..bad391db9 100644 --- a/CGMES_2.4.15_16FEB2016/InputSignalKind.hpp +++ b/CGMES_2.4.15_16FEB2016/InputSignalKind.hpp @@ -9,53 +9,31 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Input signal type. In Dynamics modelling, commonly represented by j parameter. - */ + /** \brief Input signal type. In Dynamics modelling, commonly represented by j parameter. */ class InputSignalKind { public: enum InputSignalKind_ENUM { - /** - * Input signal is rotor or shaft speed (angular frequency). - */ + /** Input signal is rotor or shaft speed (angular frequency). */ rotorSpeed, - /** - * Input signal is rotor or shaft angular frequency deviation. - */ + /** Input signal is rotor or shaft angular frequency deviation. */ rotorAngularFrequencyDeviation, - /** - * Input signal is bus voltage fr - */ + /** Input signal is bus voltage fr */ busFrequency, - /** - * Input signal is deviation of bus voltage frequ - */ + /** Input signal is deviation of bus voltage frequ */ busFrequencyDeviation, - /** - * Input signal is generator electrical power on rated S. - */ + /** Input signal is generator electrical power on rated S. */ generatorElectricalPower, - /** - * Input signal is generating accelerating power. - */ + /** Input signal is generating accelerating power. */ generatorAcceleratingPower, - /** - * Input signal - */ + /** Input signal */ busVoltage, - /** - * Input signal is derivative of bus voltag - */ + /** Input signal is derivative of bus voltag */ busVoltageDerivative, - /** - * Input signal is amplitude of remote branch current. - */ + /** Input signal is amplitude of remote branch current. */ branchCurrent, - /** - * Input signal is generator field current. - */ + /** Input signal is generator field current. */ fieldCurrent, }; diff --git a/CGMES_2.4.15_16FEB2016/Junction.cpp b/CGMES_2.4.15_16FEB2016/Junction.cpp index 765819a3f..cd2b7c69d 100644 --- a/CGMES_2.4.15_16FEB2016/Junction.cpp +++ b/CGMES_2.4.15_16FEB2016/Junction.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Junction::Junction() {}; -Junction::~Junction() {}; +Junction::Junction() {} +Junction::~Junction() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ Junction::getPossibleProfilesForAttributes() const return map; } - - - - - const char Junction::debugName[] = "Junction"; const char* Junction::debugString() const { @@ -52,7 +47,7 @@ const char* Junction::debugString() const void Junction::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Junction"), &Junction_factory)); + factory_map.emplace("cim:Junction", &Junction_factory); } void Junction::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/Junction.hpp b/CGMES_2.4.15_16FEB2016/Junction.hpp index 656b24ae0..4f48dfc33 100644 --- a/CGMES_2.4.15_16FEB2016/Junction.hpp +++ b/CGMES_2.4.15_16FEB2016/Junction.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A point where one or more conducting equipments are connected with zero resistance. - */ + /** \brief A point where one or more conducting equipments are connected with zero resistance. */ class Junction : public Connector { public: @@ -26,7 +24,6 @@ namespace CIMPP Junction(); ~Junction() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Length.hpp b/CGMES_2.4.15_16FEB2016/Length.hpp index f3f5c9403..fe5c38711 100644 --- a/CGMES_2.4.15_16FEB2016/Length.hpp +++ b/CGMES_2.4.15_16FEB2016/Length.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Unit of length. Never negative. - */ + /** \brief Unit of length. Never negative. */ class Length { public: diff --git a/CGMES_2.4.15_16FEB2016/Limit.cpp b/CGMES_2.4.15_16FEB2016/Limit.cpp index 66f178e53..a83eaee0d 100644 --- a/CGMES_2.4.15_16FEB2016/Limit.cpp +++ b/CGMES_2.4.15_16FEB2016/Limit.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Limit::Limit() {}; -Limit::~Limit() {}; +Limit::Limit() {} +Limit::~Limit() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ Limit::getPossibleProfilesForAttributes() const return map; } - - - - - const char Limit::debugName[] = "Limit"; const char* Limit::debugString() const { @@ -51,7 +46,7 @@ const char* Limit::debugString() const void Limit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Limit"), &Limit_factory)); + factory_map.emplace("cim:Limit", &Limit_factory); } void Limit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/Limit.hpp b/CGMES_2.4.15_16FEB2016/Limit.hpp index 1ea9636e1..76b2b4799 100644 --- a/CGMES_2.4.15_16FEB2016/Limit.hpp +++ b/CGMES_2.4.15_16FEB2016/Limit.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Specifies one limit value for a Measurement. A Measurement typically has several limits that are kept together by the LimitSet class. The actual meaning and use of a Limit instance (i.e., if it is an alarm or warning limit or if it is a high or low limit) is not captured in the Limit class. However the name of a Limit instance may indicate both meaning and use. - */ + /** \brief Specifies one limit value for a Measurement. A Measurement typically has several limits that are kept together by the LimitSet class. The actual meaning and use of a Limit instance (i.e., if it is an alarm or warning limit or if it is a high or low limit) is not captured in the Limit class. However the name of a Limit instance may indicate both meaning and use. */ class Limit : public IdentifiedObject { public: @@ -26,7 +24,6 @@ namespace CIMPP Limit(); ~Limit() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/LimitSet.cpp b/CGMES_2.4.15_16FEB2016/LimitSet.cpp index 748127585..77176570f 100644 --- a/CGMES_2.4.15_16FEB2016/LimitSet.cpp +++ b/CGMES_2.4.15_16FEB2016/LimitSet.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" using namespace CIMPP; -LimitSet::LimitSet() {}; -LimitSet::~LimitSet() {}; +LimitSet::LimitSet() {} +LimitSet::~LimitSet() {} static const std::list PossibleProfilesForClass = { @@ -40,25 +39,24 @@ LimitSet::getPossibleProfilesForAttributes() const return map; } - -bool assign_LimitSet_isPercentageLimits(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LimitSet_isPercentageLimits(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LimitSet* element = dynamic_cast(BaseClass_ptr1)) + LimitSet* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->isPercentageLimits; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_LimitSet_isPercentageLimits(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LimitSet* element = dynamic_cast(BaseClass_ptr1)) + const LimitSet* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->isPercentageLimits; if (!buffer.str().empty()) @@ -70,8 +68,6 @@ bool get_LimitSet_isPercentageLimits(const BaseClass* BaseClass_ptr1, std::strin return false; } - - const char LimitSet::debugName[] = "LimitSet"; const char* LimitSet::debugString() const { @@ -80,12 +76,12 @@ const char* LimitSet::debugString() const void LimitSet::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LimitSet"), &LimitSet_factory)); + factory_map.emplace("cim:LimitSet", &LimitSet_factory); } void LimitSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LimitSet.isPercentageLimits"), &assign_LimitSet_isPercentageLimits)); + assign_map.emplace("cim:LimitSet.isPercentageLimits", &assign_LimitSet_isPercentageLimits); } void LimitSet::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/LimitSet.hpp b/CGMES_2.4.15_16FEB2016/LimitSet.hpp index b2363aef2..ee31c5731 100644 --- a/CGMES_2.4.15_16FEB2016/LimitSet.hpp +++ b/CGMES_2.4.15_16FEB2016/LimitSet.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Specifies a set of Limits that are associated with a Measurement. A Measurement may have several LimitSets corresponding to seasonal or other changing conditions. The condition is captured in the name and description attributes. The same LimitSet may be used for several Measurements. In particular percentage limits are used this way. - */ + /** \brief Specifies a set of Limits that are associated with a Measurement. A Measurement may have several LimitSets corresponding to seasonal or other changing conditions. The condition is captured in the name and description attributes. The same LimitSet may be used for several Measurements. In particular percentage limits are used this way. */ class LimitSet : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP LimitSet(); ~LimitSet() override; - CIMPP::Boolean isPercentageLimits; /* Tells if the limit values are in percentage of normalValue or the specified Unit for Measurements and Controls. Default: false */ + /** \brief Tells if the limit values are in percentage of normalValue or the specified Unit for Measurements and Controls. Default: false */ + CIMPP::Boolean isPercentageLimits; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/LimitTypeKind.cpp b/CGMES_2.4.15_16FEB2016/LimitTypeKind.cpp index d6bf93a42..52e511c3f 100644 --- a/CGMES_2.4.15_16FEB2016/LimitTypeKind.cpp +++ b/CGMES_2.4.15_16FEB2016/LimitTypeKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "LimitTypeKind") + if (EnumSymbol.substr(0, pos) != "LimitTypeKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,37 +50,37 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "patl") + if (EnumSymbol == "patl") { rop = LimitTypeKind::patl; return lop; } - if(EnumSymbol == "patlt") + if (EnumSymbol == "patlt") { rop = LimitTypeKind::patlt; return lop; } - if(EnumSymbol == "tatl") + if (EnumSymbol == "tatl") { rop = LimitTypeKind::tatl; return lop; } - if(EnumSymbol == "tc") + if (EnumSymbol == "tc") { rop = LimitTypeKind::tc; return lop; } - if(EnumSymbol == "tct") + if (EnumSymbol == "tct") { rop = LimitTypeKind::tct; return lop; } - if(EnumSymbol == "highVoltage") + if (EnumSymbol == "highVoltage") { rop = LimitTypeKind::highVoltage; return lop; } - if(EnumSymbol == "lowVoltage") + if (EnumSymbol == "lowVoltage") { rop = LimitTypeKind::lowVoltage; return lop; diff --git a/CGMES_2.4.15_16FEB2016/LimitTypeKind.hpp b/CGMES_2.4.15_16FEB2016/LimitTypeKind.hpp index 3d95bd4ec..e6ad6e727 100644 --- a/CGMES_2.4.15_16FEB2016/LimitTypeKind.hpp +++ b/CGMES_2.4.15_16FEB2016/LimitTypeKind.hpp @@ -9,41 +9,25 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The enumeration defines the kinds of the limit types. - */ + /** \brief The enumeration defines the kinds of the limit types. */ class LimitTypeKind { public: enum LimitTypeKind_ENUM { - /** - * The Permanent Admissible Transmission Loading (PATL) is the loading in Amps, MVA or MW that can be accepted by a network branch for an unlimited duration without any risk for the material. The duration attribute is not used and shall be excluded for the PATL limit type. Hence only one limit value exists for the PATL type. - */ + /** The Permanent Admissible Transmission Loading (PATL) is the loading in Amps, MVA or MW that can be accepted by a network branch for an unlimited duration without any risk for the material. The duration attribute is not used and shall be excluded for the PATL limit type. Hence only one limit value exists for the PATL type. */ patl, - /** - * Permanent Admissible Transmission Loading Threshold (PATLT) is a value in engineering units defined for PATL and calculated using percentage less than 100 of the PATL type intended to alert operators of an arising condition. The percentage should be given in the name of the OperationalLimitSet. The aceptableDuration is another way to express the severity of the limit. - */ + /** Permanent Admissible Transmission Loading Threshold (PATLT) is a value in engineering units defined for PATL and calculated using percentage less than 100 of the PATL type intended to alert operators of an arising condition. The percentage should be given in the name of the OperationalLimitSet. The aceptableDuration is another way to express the severity of the limit. */ patlt, - /** - * Temporarily Admissible Transmission Loading (TATL) which is the loading in Amps, MVA or MW that can be accepted by a branch for a certain limited duration. The TATL can be defined in different ways: Such a definition of TATL can depend on the initial operating conditions of the network element (sag situation of a line). The duration attribute can be used define several TATL limit types. Hence multiple TATL limit values may exist having different durations. - */ + /** Temporarily Admissible Transmission Loading (TATL) which is the loading in Amps, MVA or MW that can be accepted by a branch for a certain limited duration. The TATL can be defined in different ways: Such a definition of TATL can depend on the initial operating conditions of the network element (sag situation of a line). The duration attribute can be used define several TATL limit types. Hence multiple TATL limit values may exist having different durations. */ tatl, - /** - * Tripping Current (TC) is the ultimate intensity without any delay. It is defined as the threshold the line will trip without any possible remedial actions. The tripping of the network element is ordered by protections against short circuits or by overload protections, but in any case, the activation delay of these protections is not compatible with the reaction delay of an operator (less than one minute). The duration is always zero and the duration attribute may be left out. Hence only one limit value exists for the TC type. - */ + /** Tripping Current (TC) is the ultimate intensity without any delay. It is defined as the threshold the line will trip without any possible remedial actions. The tripping of the network element is ordered by protections against short circuits or by overload protections, but in any case, the activation delay of these protections is not compatible with the reaction delay of an operator (less than one minute). The duration is always zero and the duration attribute may be left out. Hence only one limit value exists for the TC type. */ tc, - /** - * Tripping Current Threshold (TCT) is a value in engineering units defined for TC and calculated using percentage less than 100 of the TC type intended to alert operators of an arising condition. The percentage should be given in the name of the OperationalLimitSet. The aceptableDuration is another way to express the severity of the limit. - */ + /** Tripping Current Threshold (TCT) is a value in engineering units defined for TC and calculated using percentage less than 100 of the TC type intended to alert operators of an arising condition. The percentage should be given in the name of the OperationalLimitSet. The aceptableDuration is another way to express the severity of the limit. */ tct, - /** - * Referring to the rating of the equipments, a voltage too high can lead to accelerated ageing or the destruction of the equipment. This limit type may or may not have duration. - */ + /** Referring to the rating of the equipments, a voltage too high can lead to accelerated ageing or the destruction of the equipment. This limit type may or may not have duration. */ highVoltage, - /** - * A too low voltage can disturb the normal operation of some protections and transformer equipped with on-load tap changers, electronic power devices or can affect the behaviour of the auxiliaries of generation units. This limit type may or may not have duration. - */ + /** A too low voltage can disturb the normal operation of some protections and transformer equipped with on-load tap changers, electronic power devices or can affect the behaviour of the auxiliaries of generation units. This limit type may or may not have duration. */ lowVoltage, }; diff --git a/CGMES_2.4.15_16FEB2016/Line.cpp b/CGMES_2.4.15_16FEB2016/Line.cpp index 7586ae9a9..098452102 100644 --- a/CGMES_2.4.15_16FEB2016/Line.cpp +++ b/CGMES_2.4.15_16FEB2016/Line.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Line::Line() : Region(nullptr) {}; -Line::~Line() {}; +Line::Line() : Region(nullptr) {} +Line::~Line() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ Line::getPossibleProfilesForAttributes() const return map; } - - bool assign_SubGeographicalRegion_Lines(BaseClass*, BaseClass*); bool assign_Line_Region(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,10 +58,10 @@ bool assign_Line_Region(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) return false; } - bool get_Line_Region(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Line* element = dynamic_cast(BaseClass_ptr1)) + const Line* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Region != 0) { @@ -74,7 +72,6 @@ bool get_Line_Region(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Line"), &Line_factory)); + factory_map.emplace("cim:Line", &Line_factory); } void Line::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -92,7 +89,7 @@ void Line::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Line.Region"), &assign_Line_Region)); + assign_map.emplace("cim:Line.Region", &assign_Line_Region); } void Line::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/Line.hpp b/CGMES_2.4.15_16FEB2016/Line.hpp index 54de53581..5a544c8ac 100644 --- a/CGMES_2.4.15_16FEB2016/Line.hpp +++ b/CGMES_2.4.15_16FEB2016/Line.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class SubGeographicalRegion; - /* - Contains equipment beyond a substation belonging to a power transmission line. - */ + /** \brief Contains equipment beyond a substation belonging to a power transmission line. */ class Line : public EquipmentContainer { public: @@ -27,7 +25,8 @@ namespace CIMPP Line(); ~Line() override; - CIMPP::SubGeographicalRegion* Region; /* The lines within the sub-geographical region. Default: 0 */ + /** \brief The lines within the sub-geographical region. Default: 0 */ + CIMPP::SubGeographicalRegion* Region; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/LinearShuntCompensator.cpp b/CGMES_2.4.15_16FEB2016/LinearShuntCompensator.cpp index ff44c5b0e..e8914787f 100644 --- a/CGMES_2.4.15_16FEB2016/LinearShuntCompensator.cpp +++ b/CGMES_2.4.15_16FEB2016/LinearShuntCompensator.cpp @@ -8,15 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Susceptance.hpp" -#include "Susceptance.hpp" -#include "Conductance.hpp" -#include "Conductance.hpp" using namespace CIMPP; -LinearShuntCompensator::LinearShuntCompensator() {}; -LinearShuntCompensator::~LinearShuntCompensator() {}; +LinearShuntCompensator::LinearShuntCompensator() {} +LinearShuntCompensator::~LinearShuntCompensator() {} static const std::list PossibleProfilesForClass = { @@ -47,64 +43,66 @@ LinearShuntCompensator::getPossibleProfilesForAttributes() const return map; } - -bool assign_LinearShuntCompensator_b0PerSection(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LinearShuntCompensator_b0PerSection(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b0PerSection; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LinearShuntCompensator_bPerSection(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LinearShuntCompensator_bPerSection(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bPerSection; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LinearShuntCompensator_g0PerSection(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LinearShuntCompensator_g0PerSection(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g0PerSection; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LinearShuntCompensator_gPerSection(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LinearShuntCompensator_gPerSection(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gPerSection; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_LinearShuntCompensator_b0PerSection(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b0PerSection; if (!buffer.str().empty()) @@ -118,7 +116,8 @@ bool get_LinearShuntCompensator_b0PerSection(const BaseClass* BaseClass_ptr1, st bool get_LinearShuntCompensator_bPerSection(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bPerSection; if (!buffer.str().empty()) @@ -132,7 +131,8 @@ bool get_LinearShuntCompensator_bPerSection(const BaseClass* BaseClass_ptr1, std bool get_LinearShuntCompensator_g0PerSection(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g0PerSection; if (!buffer.str().empty()) @@ -146,7 +146,8 @@ bool get_LinearShuntCompensator_g0PerSection(const BaseClass* BaseClass_ptr1, st bool get_LinearShuntCompensator_gPerSection(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gPerSection; if (!buffer.str().empty()) @@ -158,8 +159,6 @@ bool get_LinearShuntCompensator_gPerSection(const BaseClass* BaseClass_ptr1, std return false; } - - const char LinearShuntCompensator::debugName[] = "LinearShuntCompensator"; const char* LinearShuntCompensator::debugString() const { @@ -168,15 +167,15 @@ const char* LinearShuntCompensator::debugString() const void LinearShuntCompensator::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LinearShuntCompensator"), &LinearShuntCompensator_factory)); + factory_map.emplace("cim:LinearShuntCompensator", &LinearShuntCompensator_factory); } void LinearShuntCompensator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LinearShuntCompensator.b0PerSection"), &assign_LinearShuntCompensator_b0PerSection)); - assign_map.insert(std::make_pair(std::string("cim:LinearShuntCompensator.bPerSection"), &assign_LinearShuntCompensator_bPerSection)); - assign_map.insert(std::make_pair(std::string("cim:LinearShuntCompensator.g0PerSection"), &assign_LinearShuntCompensator_g0PerSection)); - assign_map.insert(std::make_pair(std::string("cim:LinearShuntCompensator.gPerSection"), &assign_LinearShuntCompensator_gPerSection)); + assign_map.emplace("cim:LinearShuntCompensator.b0PerSection", &assign_LinearShuntCompensator_b0PerSection); + assign_map.emplace("cim:LinearShuntCompensator.bPerSection", &assign_LinearShuntCompensator_bPerSection); + assign_map.emplace("cim:LinearShuntCompensator.g0PerSection", &assign_LinearShuntCompensator_g0PerSection); + assign_map.emplace("cim:LinearShuntCompensator.gPerSection", &assign_LinearShuntCompensator_gPerSection); } void LinearShuntCompensator::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/LinearShuntCompensator.hpp b/CGMES_2.4.15_16FEB2016/LinearShuntCompensator.hpp index 0ad76bec1..135910c4f 100644 --- a/CGMES_2.4.15_16FEB2016/LinearShuntCompensator.hpp +++ b/CGMES_2.4.15_16FEB2016/LinearShuntCompensator.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A linear shunt compensator has banks or sections with equal admittance values. - */ + /** \brief A linear shunt compensator has banks or sections with equal admittance values. */ class LinearShuntCompensator : public ShuntCompensator { public: @@ -28,10 +26,17 @@ namespace CIMPP LinearShuntCompensator(); ~LinearShuntCompensator() override; - CIMPP::Susceptance b0PerSection; /* Zero sequence shunt (charging) susceptance per section Default: nullptr */ - CIMPP::Susceptance bPerSection; /* Positive sequence shunt (charging) susceptance per section Default: nullptr */ - CIMPP::Conductance g0PerSection; /* Zero sequence shunt (charging) conductance per section Default: nullptr */ - CIMPP::Conductance gPerSection; /* Positive sequence shunt (charging) conductance per section Default: nullptr */ + /** \brief Zero sequence shunt (charging) susceptance per section Default: nullptr */ + CIMPP::Susceptance b0PerSection; + + /** \brief Positive sequence shunt (charging) susceptance per section Default: nullptr */ + CIMPP::Susceptance bPerSection; + + /** \brief Zero sequence shunt (charging) conductance per section Default: nullptr */ + CIMPP::Conductance g0PerSection; + + /** \brief Positive sequence shunt (charging) conductance per section Default: nullptr */ + CIMPP::Conductance gPerSection; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/LoadAggregate.cpp b/CGMES_2.4.15_16FEB2016/LoadAggregate.cpp index 1af1aac26..56bc69716 100644 --- a/CGMES_2.4.15_16FEB2016/LoadAggregate.cpp +++ b/CGMES_2.4.15_16FEB2016/LoadAggregate.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -LoadAggregate::LoadAggregate() : LoadMotor(nullptr), LoadStatic(nullptr) {}; -LoadAggregate::~LoadAggregate() {}; +LoadAggregate::LoadAggregate() : LoadMotor(nullptr), LoadStatic(nullptr) {} +LoadAggregate::~LoadAggregate() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ LoadAggregate::getPossibleProfilesForAttributes() const return map; } - - bool assign_LoadMotor_LoadAggregate(BaseClass*, BaseClass*); bool assign_LoadAggregate_LoadMotor(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_LoadAggregate_LoadMotor(BaseClass* BaseClass_ptr1, BaseClass* BaseCl } return false; } + bool assign_LoadStatic_LoadAggregate(BaseClass*, BaseClass*); bool assign_LoadAggregate_LoadStatic(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -87,7 +86,7 @@ const char* LoadAggregate::debugString() const void LoadAggregate::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadAggregate"), &LoadAggregate_factory)); + factory_map.emplace("cim:LoadAggregate", &LoadAggregate_factory); } void LoadAggregate::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -96,8 +95,8 @@ void LoadAggregate::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadAggregate.LoadMotor"), &assign_LoadAggregate_LoadMotor)); - assign_map.insert(std::make_pair(std::string("cim:LoadAggregate.LoadStatic"), &assign_LoadAggregate_LoadStatic)); + assign_map.emplace("cim:LoadAggregate.LoadMotor", &assign_LoadAggregate_LoadMotor); + assign_map.emplace("cim:LoadAggregate.LoadStatic", &assign_LoadAggregate_LoadStatic); } void LoadAggregate::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/LoadAggregate.hpp b/CGMES_2.4.15_16FEB2016/LoadAggregate.hpp index 510b51ab5..4fb10931d 100644 --- a/CGMES_2.4.15_16FEB2016/LoadAggregate.hpp +++ b/CGMES_2.4.15_16FEB2016/LoadAggregate.hpp @@ -18,9 +18,7 @@ namespace CIMPP class LoadMotor; class LoadStatic; - /* - Standard aggregate load model comprised of static and/or dynamic components. A static load model represents the sensitivity of the real and reactive power consumed by the load to the amplitude and frequency of the bus voltage. A dynamic load model can used to represent the aggregate response of the motor components of the load. - */ + /** \brief Standard aggregate load model comprised of static and/or dynamic components. A static load model represents the sensitivity of the real and reactive power consumed by the load to the amplitude and frequency of the bus voltage. A dynamic load model can used to represent the aggregate response of the motor components of the load. */ class LoadAggregate : public LoadDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP LoadAggregate(); ~LoadAggregate() override; - CIMPP::LoadMotor* LoadMotor; /* Aggregate motor (dynamic) load associated with this aggregate load. Default: 0 */ - CIMPP::LoadStatic* LoadStatic; /* Aggregate static load associated with this aggregate load. Default: 0 */ + /** \brief Aggregate motor (dynamic) load associated with this aggregate load. Default: 0 */ + CIMPP::LoadMotor* LoadMotor; + + /** \brief Aggregate static load associated with this aggregate load. Default: 0 */ + CIMPP::LoadStatic* LoadStatic; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/LoadArea.cpp b/CGMES_2.4.15_16FEB2016/LoadArea.cpp index 1e019fe74..8154b9035 100644 --- a/CGMES_2.4.15_16FEB2016/LoadArea.cpp +++ b/CGMES_2.4.15_16FEB2016/LoadArea.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -LoadArea::LoadArea() {}; -LoadArea::~LoadArea() {}; +LoadArea::LoadArea() {} +LoadArea::~LoadArea() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ LoadArea::getPossibleProfilesForAttributes() const return map; } - - bool assign_SubLoadArea_LoadArea(BaseClass*, BaseClass*); bool assign_LoadArea_SubLoadAreas(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_LoadArea_SubLoadAreas(BaseClass* BaseClass_ptr1, BaseClass* BaseClas } - const char LoadArea::debugName[] = "LoadArea"; const char* LoadArea::debugString() const { @@ -69,7 +66,7 @@ const char* LoadArea::debugString() const void LoadArea::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadArea"), &LoadArea_factory)); + factory_map.emplace("cim:LoadArea", &LoadArea_factory); } void LoadArea::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void LoadArea::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadArea.SubLoadAreas"), &assign_LoadArea_SubLoadAreas)); + assign_map.emplace("cim:LoadArea.SubLoadAreas", &assign_LoadArea_SubLoadAreas); } void LoadArea::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/LoadArea.hpp b/CGMES_2.4.15_16FEB2016/LoadArea.hpp index 90ea4d907..9142620cd 100644 --- a/CGMES_2.4.15_16FEB2016/LoadArea.hpp +++ b/CGMES_2.4.15_16FEB2016/LoadArea.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class SubLoadArea; - /* - The class is the root or first level in a hierarchical structure for grouping of loads for the purpose of load flow load scaling. - */ + /** \brief The class is the root or first level in a hierarchical structure for grouping of loads for the purpose of load flow load scaling. */ class LoadArea : public EnergyArea { public: @@ -27,7 +25,8 @@ namespace CIMPP LoadArea(); ~LoadArea() override; - std::list SubLoadAreas; /* The SubLoadAreas in the LoadArea. Default: 0 */ + /** \brief The SubLoadAreas in the LoadArea. Default: 0 */ + std::list SubLoadAreas; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/LoadBreakSwitch.cpp b/CGMES_2.4.15_16FEB2016/LoadBreakSwitch.cpp index 2562f5898..881f3cd8a 100644 --- a/CGMES_2.4.15_16FEB2016/LoadBreakSwitch.cpp +++ b/CGMES_2.4.15_16FEB2016/LoadBreakSwitch.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -LoadBreakSwitch::LoadBreakSwitch() {}; -LoadBreakSwitch::~LoadBreakSwitch() {}; +LoadBreakSwitch::LoadBreakSwitch() {} +LoadBreakSwitch::~LoadBreakSwitch() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ LoadBreakSwitch::getPossibleProfilesForAttributes() const return map; } - - - - - const char LoadBreakSwitch::debugName[] = "LoadBreakSwitch"; const char* LoadBreakSwitch::debugString() const { @@ -52,7 +47,7 @@ const char* LoadBreakSwitch::debugString() const void LoadBreakSwitch::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadBreakSwitch"), &LoadBreakSwitch_factory)); + factory_map.emplace("cim:LoadBreakSwitch", &LoadBreakSwitch_factory); } void LoadBreakSwitch::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/LoadBreakSwitch.hpp b/CGMES_2.4.15_16FEB2016/LoadBreakSwitch.hpp index 4af01750e..e6c20cc50 100644 --- a/CGMES_2.4.15_16FEB2016/LoadBreakSwitch.hpp +++ b/CGMES_2.4.15_16FEB2016/LoadBreakSwitch.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A mechanical switching device capable of making, carrying, and breaking currents under normal operating conditions. - */ + /** \brief A mechanical switching device capable of making, carrying, and breaking currents under normal operating conditions. */ class LoadBreakSwitch : public ProtectedSwitch { public: @@ -26,7 +24,6 @@ namespace CIMPP LoadBreakSwitch(); ~LoadBreakSwitch() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/LoadComposite.cpp b/CGMES_2.4.15_16FEB2016/LoadComposite.cpp index bf3d70d0c..3502dc5ba 100644 --- a/CGMES_2.4.15_16FEB2016/LoadComposite.cpp +++ b/CGMES_2.4.15_16FEB2016/LoadComposite.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -LoadComposite::LoadComposite() {}; -LoadComposite::~LoadComposite() {}; +LoadComposite::LoadComposite() {} +LoadComposite::~LoadComposite() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ LoadComposite::getPossibleProfilesForAttributes() const return map; } - -bool assign_LoadComposite_epfd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_epfd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->epfd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_epfs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_epfs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->epfs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_epvd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_epvd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->epvd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_epvs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_epvs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->epvs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_eqfd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_eqfd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eqfd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_eqfs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_eqfs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eqfs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_eqvd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_eqvd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eqvd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_eqvs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_eqvs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eqvs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_h(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_h(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->h; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_lfrac(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_lfrac(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lfrac; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_pfrac(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_pfrac(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pfrac; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_LoadComposite_epfd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->epfd; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_LoadComposite_epfd(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_LoadComposite_epfs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->epfs; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_LoadComposite_epfs(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_LoadComposite_epvd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->epvd; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_LoadComposite_epvd(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_LoadComposite_epvs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->epvs; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_LoadComposite_epvs(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_LoadComposite_eqfd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eqfd; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_LoadComposite_eqfd(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_LoadComposite_eqfs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eqfs; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_LoadComposite_eqfs(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_LoadComposite_eqvd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eqvd; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_LoadComposite_eqvd(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_LoadComposite_eqvs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eqvs; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_LoadComposite_eqvs(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_LoadComposite_h(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->h; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_LoadComposite_h(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_LoadComposite_lfrac(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lfrac; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_LoadComposite_lfrac(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_LoadComposite_pfrac(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pfrac; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_LoadComposite_pfrac(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char LoadComposite::debugName[] = "LoadComposite"; const char* LoadComposite::debugString() const { @@ -370,22 +376,22 @@ const char* LoadComposite::debugString() const void LoadComposite::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadComposite"), &LoadComposite_factory)); + factory_map.emplace("cim:LoadComposite", &LoadComposite_factory); } void LoadComposite::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.epfd"), &assign_LoadComposite_epfd)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.epfs"), &assign_LoadComposite_epfs)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.epvd"), &assign_LoadComposite_epvd)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.epvs"), &assign_LoadComposite_epvs)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.eqfd"), &assign_LoadComposite_eqfd)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.eqfs"), &assign_LoadComposite_eqfs)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.eqvd"), &assign_LoadComposite_eqvd)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.eqvs"), &assign_LoadComposite_eqvs)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.h"), &assign_LoadComposite_h)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.lfrac"), &assign_LoadComposite_lfrac)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.pfrac"), &assign_LoadComposite_pfrac)); + assign_map.emplace("cim:LoadComposite.epfd", &assign_LoadComposite_epfd); + assign_map.emplace("cim:LoadComposite.epfs", &assign_LoadComposite_epfs); + assign_map.emplace("cim:LoadComposite.epvd", &assign_LoadComposite_epvd); + assign_map.emplace("cim:LoadComposite.epvs", &assign_LoadComposite_epvs); + assign_map.emplace("cim:LoadComposite.eqfd", &assign_LoadComposite_eqfd); + assign_map.emplace("cim:LoadComposite.eqfs", &assign_LoadComposite_eqfs); + assign_map.emplace("cim:LoadComposite.eqvd", &assign_LoadComposite_eqvd); + assign_map.emplace("cim:LoadComposite.eqvs", &assign_LoadComposite_eqvs); + assign_map.emplace("cim:LoadComposite.h", &assign_LoadComposite_h); + assign_map.emplace("cim:LoadComposite.lfrac", &assign_LoadComposite_lfrac); + assign_map.emplace("cim:LoadComposite.pfrac", &assign_LoadComposite_pfrac); } void LoadComposite::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/LoadComposite.hpp b/CGMES_2.4.15_16FEB2016/LoadComposite.hpp index 9ed68bc0c..37bbc8ac6 100644 --- a/CGMES_2.4.15_16FEB2016/LoadComposite.hpp +++ b/CGMES_2.4.15_16FEB2016/LoadComposite.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - This models combines static load and induction motor load effects. The dynamics of the motor are simplified by linearizing the induction machine equations. - */ + /** \brief This models combines static load and induction motor load effects. The dynamics of the motor are simplified by linearizing the induction machine equations. */ class LoadComposite : public LoadDynamics { public: @@ -28,17 +26,38 @@ namespace CIMPP LoadComposite(); ~LoadComposite() override; - CIMPP::Simple_Float epfd; /* Active load-frequency dependence index (dynamic) (Epfd). Typical Value = 1.5. Default: nullptr */ - CIMPP::Simple_Float epfs; /* Active load-frequency dependence index (static) (Epfs). Typical Value = 1.5. Default: nullptr */ - CIMPP::Simple_Float epvd; /* Active load-voltage dependence index (dynamic) (Epvd). Typical Value = 0.7. Default: nullptr */ - CIMPP::Simple_Float epvs; /* Active load-voltage dependence index (static) (Epvs). Typical Value = 0.7. Default: nullptr */ - CIMPP::Simple_Float eqfd; /* Reactive load-frequency dependence index (dynamic) (Eqfd). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float eqfs; /* Reactive load-frequency dependence index (static) (Eqfs). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float eqvd; /* Reactive load-voltage dependence index (dynamic) (Eqvd). Typical Value = 2. Default: nullptr */ - CIMPP::Simple_Float eqvs; /* Reactive load-voltage dependence index (static) (Eqvs). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds h; /* Inertia constant (H). Typical Value = 2.5. Default: nullptr */ - CIMPP::Simple_Float lfrac; /* Loading factor - ratio of initial P to motor MVA base (Lfrac). Typical Value = 0.8. Default: nullptr */ - CIMPP::Simple_Float pfrac; /* Fraction of constant-power load to be represented by this motor model (Pfrac) (>=0.0 and <=1.0). Typical Value = 0.5. Default: nullptr */ + /** \brief Active load-frequency dependence index (dynamic) (Epfd). Typical Value = 1.5. Default: nullptr */ + CIMPP::Simple_Float epfd; + + /** \brief Active load-frequency dependence index (static) (Epfs). Typical Value = 1.5. Default: nullptr */ + CIMPP::Simple_Float epfs; + + /** \brief Active load-voltage dependence index (dynamic) (Epvd). Typical Value = 0.7. Default: nullptr */ + CIMPP::Simple_Float epvd; + + /** \brief Active load-voltage dependence index (static) (Epvs). Typical Value = 0.7. Default: nullptr */ + CIMPP::Simple_Float epvs; + + /** \brief Reactive load-frequency dependence index (dynamic) (Eqfd). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float eqfd; + + /** \brief Reactive load-frequency dependence index (static) (Eqfs). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float eqfs; + + /** \brief Reactive load-voltage dependence index (dynamic) (Eqvd). Typical Value = 2. Default: nullptr */ + CIMPP::Simple_Float eqvd; + + /** \brief Reactive load-voltage dependence index (static) (Eqvs). Typical Value = 2. Default: nullptr */ + CIMPP::Simple_Float eqvs; + + /** \brief Inertia constant (H). Typical Value = 2.5. Default: nullptr */ + CIMPP::Seconds h; + + /** \brief Loading factor - ratio of initial P to motor MVA base (Lfrac). Typical Value = 0.8. Default: nullptr */ + CIMPP::Simple_Float lfrac; + + /** \brief Fraction of constant-power load to be represented by this motor model (Pfrac) (>=0.0 and <=1.0). Typical Value = 0.5. Default: nullptr */ + CIMPP::Simple_Float pfrac; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/LoadDynamics.cpp b/CGMES_2.4.15_16FEB2016/LoadDynamics.cpp index 0907fb345..35cf6f647 100644 --- a/CGMES_2.4.15_16FEB2016/LoadDynamics.cpp +++ b/CGMES_2.4.15_16FEB2016/LoadDynamics.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -LoadDynamics::LoadDynamics() {}; -LoadDynamics::~LoadDynamics() {}; +LoadDynamics::LoadDynamics() {} +LoadDynamics::~LoadDynamics() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ LoadDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_EnergyConsumer_LoadDynamics(BaseClass*, BaseClass*); bool assign_LoadDynamics_EnergyConsumer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_LoadDynamics_EnergyConsumer(BaseClass* BaseClass_ptr1, BaseClass* Ba } - const char LoadDynamics::debugName[] = "LoadDynamics"; const char* LoadDynamics::debugString() const { @@ -69,7 +66,7 @@ const char* LoadDynamics::debugString() const void LoadDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadDynamics"), &LoadDynamics_factory)); + factory_map.emplace("cim:LoadDynamics", &LoadDynamics_factory); } void LoadDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void LoadDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadDynamics.EnergyConsumer"), &assign_LoadDynamics_EnergyConsumer)); + assign_map.emplace("cim:LoadDynamics.EnergyConsumer", &assign_LoadDynamics_EnergyConsumer); } void LoadDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/LoadDynamics.hpp b/CGMES_2.4.15_16FEB2016/LoadDynamics.hpp index 35a9d29f8..ffaa8be53 100644 --- a/CGMES_2.4.15_16FEB2016/LoadDynamics.hpp +++ b/CGMES_2.4.15_16FEB2016/LoadDynamics.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class EnergyConsumer; - /* - Load whose behaviour is described by reference to a standard model A standard feature of dynamic load behaviour modelling is the ability to associate the same behaviour to multiple energy consumers by means of a single aggregate load definition. Aggregate loads are used to represent all or part of the real and reactive load from one or more loads in the static (power flow) data. This load is usually the aggregation of many individual load devices and the load model is approximate representation of the aggregate response of the load devices to system disturbances. The load model is always applied to individual bus loads (energy consumers) but a single set of load model parameters can used for all loads in the grouping. - */ + /** \brief Load whose behaviour is described by reference to a standard model A standard feature of dynamic load behaviour modelling is the ability to associate the same behaviour to multiple energy consumers by means of a single aggregate load definition. Aggregate loads are used to represent all or part of the real and reactive load from one or more loads in the static (power flow) data. This load is usually the aggregation of many individual load devices and the load model is approximate representation of the aggregate response of the load devices to system disturbances. The load model is always applied to individual bus loads (energy consumers) but a single set of load model parameters can used for all loads in the grouping. */ class LoadDynamics : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP LoadDynamics(); ~LoadDynamics() override; - std::list EnergyConsumer; /* Energy consumer to which this dynamics load model applies. Default: 0 */ + /** \brief Energy consumer to which this dynamics load model applies. Default: 0 */ + std::list EnergyConsumer; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/LoadGenericNonLinear.cpp b/CGMES_2.4.15_16FEB2016/LoadGenericNonLinear.cpp index e0e5491ff..9bae002fa 100644 --- a/CGMES_2.4.15_16FEB2016/LoadGenericNonLinear.cpp +++ b/CGMES_2.4.15_16FEB2016/LoadGenericNonLinear.cpp @@ -8,20 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "GenericNonLinearLoadModelKind.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -LoadGenericNonLinear::LoadGenericNonLinear() {}; -LoadGenericNonLinear::~LoadGenericNonLinear() {}; +LoadGenericNonLinear::LoadGenericNonLinear() {} +LoadGenericNonLinear::~LoadGenericNonLinear() {} static const std::list PossibleProfilesForClass = { @@ -56,129 +47,136 @@ LoadGenericNonLinear::getPossibleProfilesForAttributes() const return map; } - -bool assign_LoadGenericNonLinear_bs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadGenericNonLinear_bs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadGenericNonLinear_bt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadGenericNonLinear_bt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadGenericNonLinear_genericNonLinearLoadModelType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadGenericNonLinear_genericNonLinearLoadModelType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->genericNonLinearLoadModelType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadGenericNonLinear_ls(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadGenericNonLinear_ls(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ls; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadGenericNonLinear_lt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadGenericNonLinear_lt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadGenericNonLinear_pt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadGenericNonLinear_pt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadGenericNonLinear_qt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadGenericNonLinear_qt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadGenericNonLinear_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadGenericNonLinear_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadGenericNonLinear_tq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadGenericNonLinear_tq(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tq; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_LoadGenericNonLinear_bs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bs; if (!buffer.str().empty()) @@ -192,7 +190,8 @@ bool get_LoadGenericNonLinear_bs(const BaseClass* BaseClass_ptr1, std::stringstr bool get_LoadGenericNonLinear_bt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bt; if (!buffer.str().empty()) @@ -204,9 +203,25 @@ bool get_LoadGenericNonLinear_bt(const BaseClass* BaseClass_ptr1, std::stringstr return false; } +bool get_LoadGenericNonLinear_genericNonLinearLoadModelType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->genericNonLinearLoadModelType; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_LoadGenericNonLinear_ls(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ls; if (!buffer.str().empty()) @@ -220,7 +235,8 @@ bool get_LoadGenericNonLinear_ls(const BaseClass* BaseClass_ptr1, std::stringstr bool get_LoadGenericNonLinear_lt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lt; if (!buffer.str().empty()) @@ -234,7 +250,8 @@ bool get_LoadGenericNonLinear_lt(const BaseClass* BaseClass_ptr1, std::stringstr bool get_LoadGenericNonLinear_pt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pt; if (!buffer.str().empty()) @@ -248,7 +265,8 @@ bool get_LoadGenericNonLinear_pt(const BaseClass* BaseClass_ptr1, std::stringstr bool get_LoadGenericNonLinear_qt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qt; if (!buffer.str().empty()) @@ -262,7 +280,8 @@ bool get_LoadGenericNonLinear_qt(const BaseClass* BaseClass_ptr1, std::stringstr bool get_LoadGenericNonLinear_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -276,7 +295,8 @@ bool get_LoadGenericNonLinear_tp(const BaseClass* BaseClass_ptr1, std::stringstr bool get_LoadGenericNonLinear_tq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tq; if (!buffer.str().empty()) @@ -288,22 +308,6 @@ bool get_LoadGenericNonLinear_tq(const BaseClass* BaseClass_ptr1, std::stringstr return false; } - - -bool get_LoadGenericNonLinear_genericNonLinearLoadModelType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->genericNonLinearLoadModelType; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char LoadGenericNonLinear::debugName[] = "LoadGenericNonLinear"; const char* LoadGenericNonLinear::debugString() const { @@ -312,20 +316,20 @@ const char* LoadGenericNonLinear::debugString() const void LoadGenericNonLinear::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear"), &LoadGenericNonLinear_factory)); + factory_map.emplace("cim:LoadGenericNonLinear", &LoadGenericNonLinear_factory); } void LoadGenericNonLinear::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear.bs"), &assign_LoadGenericNonLinear_bs)); - assign_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear.bt"), &assign_LoadGenericNonLinear_bt)); - assign_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear.genericNonLinearLoadModelType"), &assign_LoadGenericNonLinear_genericNonLinearLoadModelType)); - assign_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear.ls"), &assign_LoadGenericNonLinear_ls)); - assign_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear.lt"), &assign_LoadGenericNonLinear_lt)); - assign_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear.pt"), &assign_LoadGenericNonLinear_pt)); - assign_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear.qt"), &assign_LoadGenericNonLinear_qt)); - assign_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear.tp"), &assign_LoadGenericNonLinear_tp)); - assign_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear.tq"), &assign_LoadGenericNonLinear_tq)); + assign_map.emplace("cim:LoadGenericNonLinear.bs", &assign_LoadGenericNonLinear_bs); + assign_map.emplace("cim:LoadGenericNonLinear.bt", &assign_LoadGenericNonLinear_bt); + assign_map.emplace("cim:LoadGenericNonLinear.genericNonLinearLoadModelType", &assign_LoadGenericNonLinear_genericNonLinearLoadModelType); + assign_map.emplace("cim:LoadGenericNonLinear.ls", &assign_LoadGenericNonLinear_ls); + assign_map.emplace("cim:LoadGenericNonLinear.lt", &assign_LoadGenericNonLinear_lt); + assign_map.emplace("cim:LoadGenericNonLinear.pt", &assign_LoadGenericNonLinear_pt); + assign_map.emplace("cim:LoadGenericNonLinear.qt", &assign_LoadGenericNonLinear_qt); + assign_map.emplace("cim:LoadGenericNonLinear.tp", &assign_LoadGenericNonLinear_tp); + assign_map.emplace("cim:LoadGenericNonLinear.tq", &assign_LoadGenericNonLinear_tq); } void LoadGenericNonLinear::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/LoadGenericNonLinear.hpp b/CGMES_2.4.15_16FEB2016/LoadGenericNonLinear.hpp index 4a840e93b..c291b52e3 100644 --- a/CGMES_2.4.15_16FEB2016/LoadGenericNonLinear.hpp +++ b/CGMES_2.4.15_16FEB2016/LoadGenericNonLinear.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - These load models (known also as generic non-linear dynamic (GNLD) load models) can be used in mid-term and long-term voltage stability simulations (i.e., to study voltage collapse), as they can replace a more detailed representation of aggregate load, including induction motors, thermostatically controlled and static loads. - */ + /** \brief These load models (known also as generic non-linear dynamic (GNLD) load models) can be used in mid-term and long-term voltage stability simulations (i.e., to study voltage collapse), as they can replace a more detailed representation of aggregate load, including induction motors, thermostatically controlled and static loads. */ class LoadGenericNonLinear : public LoadDynamics { public: @@ -29,15 +27,32 @@ namespace CIMPP LoadGenericNonLinear(); ~LoadGenericNonLinear() override; - CIMPP::Simple_Float bs; /* Steady state voltage index for reactive power (BS). Default: nullptr */ - CIMPP::Simple_Float bt; /* Transient voltage index for reactive power (BT). Default: nullptr */ - CIMPP::GenericNonLinearLoadModelKind genericNonLinearLoadModelType; /* Type of generic non-linear load model. Default: 0 */ - CIMPP::Simple_Float ls; /* Steady state voltage index for active power (LS). Default: nullptr */ - CIMPP::Simple_Float lt; /* Transient voltage index for active power (LT). Default: nullptr */ - CIMPP::Simple_Float pt; /* Dynamic portion of active load (P). Default: nullptr */ - CIMPP::Simple_Float qt; /* Dynamic portion of reactive load (Q). Default: nullptr */ - CIMPP::Seconds tp; /* Time constant of lag function of active power (T). Default: nullptr */ - CIMPP::Seconds tq; /* Time constant of lag function of reactive power (T). Default: nullptr */ + /** \brief Steady state voltage index for reactive power (BS). Default: nullptr */ + CIMPP::Simple_Float bs; + + /** \brief Transient voltage index for reactive power (BT). Default: nullptr */ + CIMPP::Simple_Float bt; + + /** \brief Type of generic non-linear load model. Default: 0 */ + CIMPP::GenericNonLinearLoadModelKind genericNonLinearLoadModelType; + + /** \brief Steady state voltage index for active power (LS). Default: nullptr */ + CIMPP::Simple_Float ls; + + /** \brief Transient voltage index for active power (LT). Default: nullptr */ + CIMPP::Simple_Float lt; + + /** \brief Dynamic portion of active load (P). Default: nullptr */ + CIMPP::Simple_Float pt; + + /** \brief Dynamic portion of reactive load (Q). Default: nullptr */ + CIMPP::Simple_Float qt; + + /** \brief Time constant of lag function of active power (T). Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Time constant of lag function of reactive power (T). Default: nullptr */ + CIMPP::Seconds tq; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/LoadGroup.cpp b/CGMES_2.4.15_16FEB2016/LoadGroup.cpp index 7580cae1b..142619bf7 100644 --- a/CGMES_2.4.15_16FEB2016/LoadGroup.cpp +++ b/CGMES_2.4.15_16FEB2016/LoadGroup.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -LoadGroup::LoadGroup() : SubLoadArea(nullptr) {}; -LoadGroup::~LoadGroup() {}; +LoadGroup::LoadGroup() : SubLoadArea(nullptr) {} +LoadGroup::~LoadGroup() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ LoadGroup::getPossibleProfilesForAttributes() const return map; } - - bool assign_SubLoadArea_LoadGroups(BaseClass*, BaseClass*); bool assign_LoadGroup_SubLoadArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_LoadGroup_SubLoadArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClas return false; } - bool get_LoadGroup_SubLoadArea(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const LoadGroup* element = dynamic_cast(BaseClass_ptr1)) + const LoadGroup* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->SubLoadArea != 0) { @@ -73,7 +71,6 @@ bool get_LoadGroup_SubLoadArea(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadGroup"), &LoadGroup_factory)); + factory_map.emplace("cim:LoadGroup", &LoadGroup_factory); } void LoadGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void LoadGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadGroup.SubLoadArea"), &assign_LoadGroup_SubLoadArea)); + assign_map.emplace("cim:LoadGroup.SubLoadArea", &assign_LoadGroup_SubLoadArea); } void LoadGroup::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/LoadGroup.hpp b/CGMES_2.4.15_16FEB2016/LoadGroup.hpp index 2e6a4a9b8..d0fa3dd27 100644 --- a/CGMES_2.4.15_16FEB2016/LoadGroup.hpp +++ b/CGMES_2.4.15_16FEB2016/LoadGroup.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class SubLoadArea; - /* - The class is the third level in a hierarchical structure for grouping of loads for the purpose of load flow load scaling. - */ + /** \brief The class is the third level in a hierarchical structure for grouping of loads for the purpose of load flow load scaling. */ class LoadGroup : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP LoadGroup(); ~LoadGroup() override; - CIMPP::SubLoadArea* SubLoadArea; /* The SubLoadArea where the Loadgroup belongs. Default: 0 */ + /** \brief The SubLoadArea where the Loadgroup belongs. Default: 0 */ + CIMPP::SubLoadArea* SubLoadArea; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/LoadMotor.cpp b/CGMES_2.4.15_16FEB2016/LoadMotor.cpp index 34d7be7a5..b1eddcd2a 100644 --- a/CGMES_2.4.15_16FEB2016/LoadMotor.cpp +++ b/CGMES_2.4.15_16FEB2016/LoadMotor.cpp @@ -9,24 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "LoadAggregate.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" using namespace CIMPP; -LoadMotor::LoadMotor() : LoadAggregate(nullptr) {}; -LoadMotor::~LoadMotor() {}; +LoadMotor::LoadMotor() : LoadAggregate(nullptr) {} +LoadMotor::~LoadMotor() {} static const std::list PossibleProfilesForClass = { @@ -66,197 +53,223 @@ LoadMotor::getPossibleProfilesForAttributes() const return map; } +bool assign_LoadAggregate_LoadMotor(BaseClass*, BaseClass*); +bool assign_LoadMotor_LoadAggregate(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + LoadAggregate* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->LoadAggregate != element2) + { + element->LoadAggregate = element2; + return assign_LoadAggregate_LoadMotor(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_LoadMotor_d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_d(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->d; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_h(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_h(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->h; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_lfac(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_lfac(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lfac; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_lp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_lp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_lpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_lpp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lpp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_ls(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_ls(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ls; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_pfrac(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_pfrac(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pfrac; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_ra(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_ra(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ra; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_tbkr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_tbkr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tbkr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_tpo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_tpo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_tppo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_tppo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tppo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_tv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_tv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_vt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_vt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_LoadAggregate_LoadMotor(BaseClass*, BaseClass*); -bool assign_LoadMotor_LoadAggregate(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_LoadMotor_LoadAggregate(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - LoadMotor* element = dynamic_cast(BaseClass_ptr1); - LoadAggregate* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->LoadAggregate != element2) + if (element->LoadAggregate != 0) { - element->LoadAggregate = element2; - return assign_LoadAggregate_LoadMotor(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->LoadAggregate); + return true; } - return true; } return false; } bool get_LoadMotor_d(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->d; if (!buffer.str().empty()) @@ -270,7 +283,8 @@ bool get_LoadMotor_d(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_LoadMotor_h(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->h; if (!buffer.str().empty()) @@ -284,7 +298,8 @@ bool get_LoadMotor_h(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_LoadMotor_lfac(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lfac; if (!buffer.str().empty()) @@ -298,7 +313,8 @@ bool get_LoadMotor_lfac(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadMotor_lp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lp; if (!buffer.str().empty()) @@ -312,7 +328,8 @@ bool get_LoadMotor_lp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_LoadMotor_lpp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lpp; if (!buffer.str().empty()) @@ -326,7 +343,8 @@ bool get_LoadMotor_lpp(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_LoadMotor_ls(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ls; if (!buffer.str().empty()) @@ -340,7 +358,8 @@ bool get_LoadMotor_ls(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_LoadMotor_pfrac(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pfrac; if (!buffer.str().empty()) @@ -354,7 +373,8 @@ bool get_LoadMotor_pfrac(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_LoadMotor_ra(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ra; if (!buffer.str().empty()) @@ -368,7 +388,8 @@ bool get_LoadMotor_ra(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_LoadMotor_tbkr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tbkr; if (!buffer.str().empty()) @@ -382,7 +403,8 @@ bool get_LoadMotor_tbkr(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadMotor_tpo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpo; if (!buffer.str().empty()) @@ -396,7 +418,8 @@ bool get_LoadMotor_tpo(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_LoadMotor_tppo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tppo; if (!buffer.str().empty()) @@ -410,7 +433,8 @@ bool get_LoadMotor_tppo(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadMotor_tv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tv; if (!buffer.str().empty()) @@ -424,7 +448,8 @@ bool get_LoadMotor_tv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_LoadMotor_vt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vt; if (!buffer.str().empty()) @@ -436,21 +461,6 @@ bool get_LoadMotor_vt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - -bool get_LoadMotor_LoadAggregate(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->LoadAggregate != 0) - { - BaseClass_list.push_back(element->LoadAggregate); - return true; - } - } - return false; -} - - const char LoadMotor::debugName[] = "LoadMotor"; const char* LoadMotor::debugString() const { @@ -459,29 +469,29 @@ const char* LoadMotor::debugString() const void LoadMotor::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadMotor"), &LoadMotor_factory)); + factory_map.emplace("cim:LoadMotor", &LoadMotor_factory); } void LoadMotor::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.d"), &assign_LoadMotor_d)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.h"), &assign_LoadMotor_h)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.lfac"), &assign_LoadMotor_lfac)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.lp"), &assign_LoadMotor_lp)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.lpp"), &assign_LoadMotor_lpp)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.ls"), &assign_LoadMotor_ls)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.pfrac"), &assign_LoadMotor_pfrac)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.ra"), &assign_LoadMotor_ra)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.tbkr"), &assign_LoadMotor_tbkr)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.tpo"), &assign_LoadMotor_tpo)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.tppo"), &assign_LoadMotor_tppo)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.tv"), &assign_LoadMotor_tv)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.vt"), &assign_LoadMotor_vt)); + assign_map.emplace("cim:LoadMotor.d", &assign_LoadMotor_d); + assign_map.emplace("cim:LoadMotor.h", &assign_LoadMotor_h); + assign_map.emplace("cim:LoadMotor.lfac", &assign_LoadMotor_lfac); + assign_map.emplace("cim:LoadMotor.lp", &assign_LoadMotor_lp); + assign_map.emplace("cim:LoadMotor.lpp", &assign_LoadMotor_lpp); + assign_map.emplace("cim:LoadMotor.ls", &assign_LoadMotor_ls); + assign_map.emplace("cim:LoadMotor.pfrac", &assign_LoadMotor_pfrac); + assign_map.emplace("cim:LoadMotor.ra", &assign_LoadMotor_ra); + assign_map.emplace("cim:LoadMotor.tbkr", &assign_LoadMotor_tbkr); + assign_map.emplace("cim:LoadMotor.tpo", &assign_LoadMotor_tpo); + assign_map.emplace("cim:LoadMotor.tppo", &assign_LoadMotor_tppo); + assign_map.emplace("cim:LoadMotor.tv", &assign_LoadMotor_tv); + assign_map.emplace("cim:LoadMotor.vt", &assign_LoadMotor_vt); } void LoadMotor::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.LoadAggregate"), &assign_LoadMotor_LoadAggregate)); + assign_map.emplace("cim:LoadMotor.LoadAggregate", &assign_LoadMotor_LoadAggregate); } void LoadMotor::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/LoadMotor.hpp b/CGMES_2.4.15_16FEB2016/LoadMotor.hpp index 5501f3611..66ad36cff 100644 --- a/CGMES_2.4.15_16FEB2016/LoadMotor.hpp +++ b/CGMES_2.4.15_16FEB2016/LoadMotor.hpp @@ -20,9 +20,7 @@ namespace CIMPP { class LoadAggregate; - /* - Aggregate induction motor load. This model is used to represent a fraction of an ordinary load as "induction motor load". It allows load that is treated as ordinary constant power in power flow analysis to be represented by an induction motor in dynamic simulation. If = 0. or = , or = 0., only one cage is represented. Magnetic saturation is not modelled. Either a "one-cage" or "two-cage" model of the induction machine can be modelled. Magnetic saturation is not modelled. This model is intended for representation of aggregations of many motors dispersed through a load represented at a high voltage bus but where there is no information on the characteristics of individual motors. This model treats a fraction of the constant power part of a load as a motor. During initialisation, the initial power drawn by the motor is set equal to times the constant part of the static load. The remainder of the load is left as static load. The reactive power demand of the motor is calculated during initialisation as a function of voltage at the load bus. This reactive power demand may be less than or greater than the constant component of the load. If the motor's reactive demand is greater than the constant component of the load, the model inserts a shunt capacitor at the terminal of the motor to bring its reactive demand down to equal the constant reactive load. If a motor model and a static load model are both present for a load, the motor is assumed to be subtracted from the power flow constant load before the static load model is applied. The remainder of the load, if any, is then represented by the static load model. - */ + /** \brief Aggregate induction motor load. This model is used to represent a fraction of an ordinary load as "induction motor load". It allows load that is treated as ordinary constant power in power flow analysis to be represented by an induction motor in dynamic simulation. If = 0. or = , or = 0., only one cage is represented. Magnetic saturation is not modelled. Either a "one-cage" or "two-cage" model of the induction machine can be modelled. Magnetic saturation is not modelled. This model is intended for representation of aggregations of many motors dispersed through a load represented at a high voltage bus but where there is no information on the characteristics of individual motors. This model treats a fraction of the constant power part of a load as a motor. During initialisation, the initial power drawn by the motor is set equal to times the constant part of the static load. The remainder of the load is left as static load. The reactive power demand of the motor is calculated during initialisation as a function of voltage at the load bus. This reactive power demand may be less than or greater than the constant component of the load. If the motor's reactive demand is greater than the constant component of the load, the model inserts a shunt capacitor at the terminal of the motor to bring its reactive demand down to equal the constant reactive load. If a motor model and a static load model are both present for a load, the motor is assumed to be subtracted from the power flow constant load before the static load model is applied. The remainder of the load, if any, is then represented by the static load model. */ class LoadMotor : public IdentifiedObject { public: @@ -30,20 +28,47 @@ namespace CIMPP LoadMotor(); ~LoadMotor() override; - CIMPP::LoadAggregate* LoadAggregate; /* Aggregate load to which this aggregate motor (dynamic) load belongs. Default: 0 */ - CIMPP::Simple_Float d; /* Damping factor (D). Unit = delta P/delta speed. Typical Value = 2. Default: nullptr */ - CIMPP::Seconds h; /* Inertia constant (H) (not=0). Typical Value = 0.4. Default: nullptr */ - CIMPP::Simple_Float lfac; /* Loading factor - ratio of initial P to motor MVA base (Lfac). Typical Value = 0.8. Default: nullptr */ - CIMPP::PU lp; /* Transient reactance (Lp). Typical Value = 0.15. Default: nullptr */ - CIMPP::PU lpp; /* Subtransient reactance (Lpp). Typical Value = 0.15. Default: nullptr */ - CIMPP::PU ls; /* Synchronous reactance (Ls). Typical Value = 3.2. Default: nullptr */ - CIMPP::Simple_Float pfrac; /* Fraction of constant-power load to be represented by this motor model (Pfrac) (>=0.0 and <=1.0). Typical Value = 0.3. Default: nullptr */ - CIMPP::PU ra; /* Stator resistance (Ra). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tbkr; /* Circuit breaker operating time (Tbkr). Typical Value = 0.08. Default: nullptr */ - CIMPP::Seconds tpo; /* Transient rotor time constant (Tpo) (not=0). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tppo; /* Subtransient rotor time constant (Tppo). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds tv; /* Voltage trip pickup time (Tv). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU vt; /* Voltage threshold for tripping (Vt). Typical Value = 0.7. Default: nullptr */ + /** \brief Aggregate load to which this aggregate motor (dynamic) load belongs. Default: 0 */ + CIMPP::LoadAggregate* LoadAggregate; + + /** \brief Damping factor (D). Unit = delta P/delta speed. Typical Value = 2. Default: nullptr */ + CIMPP::Simple_Float d; + + /** \brief Inertia constant (H) (not=0). Typical Value = 0.4. Default: nullptr */ + CIMPP::Seconds h; + + /** \brief Loading factor - ratio of initial P to motor MVA base (Lfac). Typical Value = 0.8. Default: nullptr */ + CIMPP::Simple_Float lfac; + + /** \brief Transient reactance (Lp). Typical Value = 0.15. Default: nullptr */ + CIMPP::PU lp; + + /** \brief Subtransient reactance (Lpp). Typical Value = 0.15. Default: nullptr */ + CIMPP::PU lpp; + + /** \brief Synchronous reactance (Ls). Typical Value = 3.2. Default: nullptr */ + CIMPP::PU ls; + + /** \brief Fraction of constant-power load to be represented by this motor model (Pfrac) (>=0.0 and <=1.0). Typical Value = 0.3. Default: nullptr */ + CIMPP::Simple_Float pfrac; + + /** \brief Stator resistance (Ra). Typical Value = 0. Default: nullptr */ + CIMPP::PU ra; + + /** \brief Circuit breaker operating time (Tbkr). Typical Value = 0.08. Default: nullptr */ + CIMPP::Seconds tbkr; + + /** \brief Transient rotor time constant (Tpo) (not=0). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tpo; + + /** \brief Subtransient rotor time constant (Tppo). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds tppo; + + /** \brief Voltage trip pickup time (Tv). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tv; + + /** \brief Voltage threshold for tripping (Vt). Typical Value = 0.7. Default: nullptr */ + CIMPP::PU vt; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/LoadResponseCharacteristic.cpp b/CGMES_2.4.15_16FEB2016/LoadResponseCharacteristic.cpp index 8bacbbe22..f4c2368ce 100644 --- a/CGMES_2.4.15_16FEB2016/LoadResponseCharacteristic.cpp +++ b/CGMES_2.4.15_16FEB2016/LoadResponseCharacteristic.cpp @@ -9,22 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "EnergyConsumer.hpp" -#include "Boolean.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -LoadResponseCharacteristic::LoadResponseCharacteristic() {}; -LoadResponseCharacteristic::~LoadResponseCharacteristic() {}; +LoadResponseCharacteristic::LoadResponseCharacteristic() {} +LoadResponseCharacteristic::~LoadResponseCharacteristic() {} static const std::list PossibleProfilesForClass = { @@ -62,171 +51,182 @@ LoadResponseCharacteristic::getPossibleProfilesForAttributes() const return map; } +bool assign_EnergyConsumer_LoadResponse(BaseClass*, BaseClass*); +bool assign_LoadResponseCharacteristic_EnergyConsumer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + EnergyConsumer* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->EnergyConsumer.begin(), element->EnergyConsumer.end(), element2) == element->EnergyConsumer.end()) + { + element->EnergyConsumer.push_back(element2); + return assign_EnergyConsumer_LoadResponse(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_LoadResponseCharacteristic_exponentModel(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_exponentModel(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exponentModel; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadResponseCharacteristic_pConstantCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_pConstantCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pConstantCurrent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadResponseCharacteristic_pConstantImpedance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_pConstantImpedance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pConstantImpedance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadResponseCharacteristic_pConstantPower(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_pConstantPower(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pConstantPower; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadResponseCharacteristic_pFrequencyExponent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_pFrequencyExponent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pFrequencyExponent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadResponseCharacteristic_pVoltageExponent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_pVoltageExponent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pVoltageExponent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadResponseCharacteristic_qConstantCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_qConstantCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qConstantCurrent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadResponseCharacteristic_qConstantImpedance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_qConstantImpedance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qConstantImpedance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadResponseCharacteristic_qConstantPower(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_qConstantPower(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qConstantPower; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadResponseCharacteristic_qFrequencyExponent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_qFrequencyExponent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qFrequencyExponent; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_LoadResponseCharacteristic_qVoltageExponent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->qVoltageExponent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_EnergyConsumer_LoadResponse(BaseClass*, BaseClass*); -bool assign_LoadResponseCharacteristic_EnergyConsumer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_LoadResponseCharacteristic_qVoltageExponent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); - EnergyConsumer* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->EnergyConsumer.begin(), element->EnergyConsumer.end(), element2) == element->EnergyConsumer.end()) + buffer >> element->qVoltageExponent; + if (!buffer.fail()) { - element->EnergyConsumer.push_back(element2); - return assign_EnergyConsumer_LoadResponse(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_LoadResponseCharacteristic_exponentModel(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exponentModel; if (!buffer.str().empty()) @@ -240,7 +240,8 @@ bool get_LoadResponseCharacteristic_exponentModel(const BaseClass* BaseClass_ptr bool get_LoadResponseCharacteristic_pConstantCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pConstantCurrent; if (!buffer.str().empty()) @@ -254,7 +255,8 @@ bool get_LoadResponseCharacteristic_pConstantCurrent(const BaseClass* BaseClass_ bool get_LoadResponseCharacteristic_pConstantImpedance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pConstantImpedance; if (!buffer.str().empty()) @@ -268,7 +270,8 @@ bool get_LoadResponseCharacteristic_pConstantImpedance(const BaseClass* BaseClas bool get_LoadResponseCharacteristic_pConstantPower(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pConstantPower; if (!buffer.str().empty()) @@ -282,7 +285,8 @@ bool get_LoadResponseCharacteristic_pConstantPower(const BaseClass* BaseClass_pt bool get_LoadResponseCharacteristic_pFrequencyExponent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pFrequencyExponent; if (!buffer.str().empty()) @@ -296,7 +300,8 @@ bool get_LoadResponseCharacteristic_pFrequencyExponent(const BaseClass* BaseClas bool get_LoadResponseCharacteristic_pVoltageExponent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pVoltageExponent; if (!buffer.str().empty()) @@ -310,7 +315,8 @@ bool get_LoadResponseCharacteristic_pVoltageExponent(const BaseClass* BaseClass_ bool get_LoadResponseCharacteristic_qConstantCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qConstantCurrent; if (!buffer.str().empty()) @@ -324,7 +330,8 @@ bool get_LoadResponseCharacteristic_qConstantCurrent(const BaseClass* BaseClass_ bool get_LoadResponseCharacteristic_qConstantImpedance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qConstantImpedance; if (!buffer.str().empty()) @@ -338,7 +345,8 @@ bool get_LoadResponseCharacteristic_qConstantImpedance(const BaseClass* BaseClas bool get_LoadResponseCharacteristic_qConstantPower(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qConstantPower; if (!buffer.str().empty()) @@ -352,7 +360,8 @@ bool get_LoadResponseCharacteristic_qConstantPower(const BaseClass* BaseClass_pt bool get_LoadResponseCharacteristic_qFrequencyExponent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qFrequencyExponent; if (!buffer.str().empty()) @@ -366,7 +375,8 @@ bool get_LoadResponseCharacteristic_qFrequencyExponent(const BaseClass* BaseClas bool get_LoadResponseCharacteristic_qVoltageExponent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qVoltageExponent; if (!buffer.str().empty()) @@ -378,8 +388,6 @@ bool get_LoadResponseCharacteristic_qVoltageExponent(const BaseClass* BaseClass_ return false; } - - const char LoadResponseCharacteristic::debugName[] = "LoadResponseCharacteristic"; const char* LoadResponseCharacteristic::debugString() const { @@ -388,27 +396,27 @@ const char* LoadResponseCharacteristic::debugString() const void LoadResponseCharacteristic::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic"), &LoadResponseCharacteristic_factory)); + factory_map.emplace("cim:LoadResponseCharacteristic", &LoadResponseCharacteristic_factory); } void LoadResponseCharacteristic::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.exponentModel"), &assign_LoadResponseCharacteristic_exponentModel)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.pConstantCurrent"), &assign_LoadResponseCharacteristic_pConstantCurrent)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.pConstantImpedance"), &assign_LoadResponseCharacteristic_pConstantImpedance)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.pConstantPower"), &assign_LoadResponseCharacteristic_pConstantPower)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.pFrequencyExponent"), &assign_LoadResponseCharacteristic_pFrequencyExponent)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.pVoltageExponent"), &assign_LoadResponseCharacteristic_pVoltageExponent)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.qConstantCurrent"), &assign_LoadResponseCharacteristic_qConstantCurrent)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.qConstantImpedance"), &assign_LoadResponseCharacteristic_qConstantImpedance)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.qConstantPower"), &assign_LoadResponseCharacteristic_qConstantPower)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.qFrequencyExponent"), &assign_LoadResponseCharacteristic_qFrequencyExponent)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.qVoltageExponent"), &assign_LoadResponseCharacteristic_qVoltageExponent)); + assign_map.emplace("cim:LoadResponseCharacteristic.exponentModel", &assign_LoadResponseCharacteristic_exponentModel); + assign_map.emplace("cim:LoadResponseCharacteristic.pConstantCurrent", &assign_LoadResponseCharacteristic_pConstantCurrent); + assign_map.emplace("cim:LoadResponseCharacteristic.pConstantImpedance", &assign_LoadResponseCharacteristic_pConstantImpedance); + assign_map.emplace("cim:LoadResponseCharacteristic.pConstantPower", &assign_LoadResponseCharacteristic_pConstantPower); + assign_map.emplace("cim:LoadResponseCharacteristic.pFrequencyExponent", &assign_LoadResponseCharacteristic_pFrequencyExponent); + assign_map.emplace("cim:LoadResponseCharacteristic.pVoltageExponent", &assign_LoadResponseCharacteristic_pVoltageExponent); + assign_map.emplace("cim:LoadResponseCharacteristic.qConstantCurrent", &assign_LoadResponseCharacteristic_qConstantCurrent); + assign_map.emplace("cim:LoadResponseCharacteristic.qConstantImpedance", &assign_LoadResponseCharacteristic_qConstantImpedance); + assign_map.emplace("cim:LoadResponseCharacteristic.qConstantPower", &assign_LoadResponseCharacteristic_qConstantPower); + assign_map.emplace("cim:LoadResponseCharacteristic.qFrequencyExponent", &assign_LoadResponseCharacteristic_qFrequencyExponent); + assign_map.emplace("cim:LoadResponseCharacteristic.qVoltageExponent", &assign_LoadResponseCharacteristic_qVoltageExponent); } void LoadResponseCharacteristic::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.EnergyConsumer"), &assign_LoadResponseCharacteristic_EnergyConsumer)); + assign_map.emplace("cim:LoadResponseCharacteristic.EnergyConsumer", &assign_LoadResponseCharacteristic_EnergyConsumer); } void LoadResponseCharacteristic::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/LoadResponseCharacteristic.hpp b/CGMES_2.4.15_16FEB2016/LoadResponseCharacteristic.hpp index f97b8dac4..48e1ab3ae 100644 --- a/CGMES_2.4.15_16FEB2016/LoadResponseCharacteristic.hpp +++ b/CGMES_2.4.15_16FEB2016/LoadResponseCharacteristic.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class EnergyConsumer; - /* - Models the characteristic response of the load demand due to changes in system conditions such as voltage and frequency. This is not related to demand response. If LoadResponseCharacteristic.exponentModel is True, the voltage exponents are specified and used as to calculate: Active power component = Pnominal * (Voltage/cim:BaseVoltage.nominalVoltage) ** cim:LoadResponseCharacteristic.pVoltageExponent Reactive power component = Qnominal * (Voltage/cim:BaseVoltage.nominalVoltage)** cim:LoadResponseCharacteristic.qVoltageExponent Where * means "multiply" and ** is "raised to power of". - */ + /** \brief Models the characteristic response of the load demand due to changes in system conditions such as voltage and frequency. This is not related to demand response. If LoadResponseCharacteristic.exponentModel is True, the voltage exponents are specified and used as to calculate: Active power component = Pnominal * (Voltage/cim:BaseVoltage.nominalVoltage) ** cim:LoadResponseCharacteristic.pVoltageExponent Reactive power component = Qnominal * (Voltage/cim:BaseVoltage.nominalVoltage)** cim:LoadResponseCharacteristic.qVoltageExponent Where * means "multiply" and ** is "raised to power of". */ class LoadResponseCharacteristic : public IdentifiedObject { public: @@ -29,18 +27,41 @@ namespace CIMPP LoadResponseCharacteristic(); ~LoadResponseCharacteristic() override; - std::list EnergyConsumer; /* The set of loads that have the response characteristics. Default: 0 */ - CIMPP::Boolean exponentModel; /* Indicates the exponential voltage dependency model is to be used. If false, the coefficient model is to be used. The exponential voltage dependency model consist of the attributes - pVoltageExponent - qVoltageExponent. The coefficient model consist of the attributes - pConstantImpedance - pConstantCurrent - pConstantPower - qConstantImpedance - qConstantCurrent - qConstantPower. The sum of pConstantImpedance, pConstantCurrent and pConstantPower shall equal 1. The sum of qConstantImpedance, qConstantCurrent and qConstantPower shall equal 1. Default: false */ - CIMPP::Simple_Float pConstantCurrent; /* Portion of active power load modeled as constant current. Default: nullptr */ - CIMPP::Simple_Float pConstantImpedance; /* Portion of active power load modeled as constant impedance. Default: nullptr */ - CIMPP::Simple_Float pConstantPower; /* Portion of active power load modeled as constant power. Default: nullptr */ - CIMPP::Simple_Float pFrequencyExponent; /* Exponent of per unit frequency effecting active power. Default: nullptr */ - CIMPP::Simple_Float pVoltageExponent; /* Exponent of per unit voltage effecting real power. Default: nullptr */ - CIMPP::Simple_Float qConstantCurrent; /* Portion of reactive power load modeled as constant current. Default: nullptr */ - CIMPP::Simple_Float qConstantImpedance; /* Portion of reactive power load modeled as constant impedance. Default: nullptr */ - CIMPP::Simple_Float qConstantPower; /* Portion of reactive power load modeled as constant power. Default: nullptr */ - CIMPP::Simple_Float qFrequencyExponent; /* Exponent of per unit frequency effecting reactive power. Default: nullptr */ - CIMPP::Simple_Float qVoltageExponent; /* Exponent of per unit voltage effecting reactive power. Default: nullptr */ + /** \brief The set of loads that have the response characteristics. Default: 0 */ + std::list EnergyConsumer; + + /** \brief Indicates the exponential voltage dependency model is to be used. If false, the coefficient model is to be used. The exponential voltage dependency model consist of the attributes - pVoltageExponent - qVoltageExponent. The coefficient model consist of the attributes - pConstantImpedance - pConstantCurrent - pConstantPower - qConstantImpedance - qConstantCurrent - qConstantPower. The sum of pConstantImpedance, pConstantCurrent and pConstantPower shall equal 1. The sum of qConstantImpedance, qConstantCurrent and qConstantPower shall equal 1. Default: false */ + CIMPP::Boolean exponentModel; + + /** \brief Portion of active power load modeled as constant current. Default: nullptr */ + CIMPP::Simple_Float pConstantCurrent; + + /** \brief Portion of active power load modeled as constant impedance. Default: nullptr */ + CIMPP::Simple_Float pConstantImpedance; + + /** \brief Portion of active power load modeled as constant power. Default: nullptr */ + CIMPP::Simple_Float pConstantPower; + + /** \brief Exponent of per unit frequency effecting active power. Default: nullptr */ + CIMPP::Simple_Float pFrequencyExponent; + + /** \brief Exponent of per unit voltage effecting real power. Default: nullptr */ + CIMPP::Simple_Float pVoltageExponent; + + /** \brief Portion of reactive power load modeled as constant current. Default: nullptr */ + CIMPP::Simple_Float qConstantCurrent; + + /** \brief Portion of reactive power load modeled as constant impedance. Default: nullptr */ + CIMPP::Simple_Float qConstantImpedance; + + /** \brief Portion of reactive power load modeled as constant power. Default: nullptr */ + CIMPP::Simple_Float qConstantPower; + + /** \brief Exponent of per unit frequency effecting reactive power. Default: nullptr */ + CIMPP::Simple_Float qFrequencyExponent; + + /** \brief Exponent of per unit voltage effecting reactive power. Default: nullptr */ + CIMPP::Simple_Float qVoltageExponent; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/LoadStatic.cpp b/CGMES_2.4.15_16FEB2016/LoadStatic.cpp index 929cd897f..1ae8c3ffb 100644 --- a/CGMES_2.4.15_16FEB2016/LoadStatic.cpp +++ b/CGMES_2.4.15_16FEB2016/LoadStatic.cpp @@ -9,28 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "LoadAggregate.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "StaticLoadModelKind.hpp" using namespace CIMPP; -LoadStatic::LoadStatic() : LoadAggregate(nullptr) {}; -LoadStatic::~LoadStatic() {}; +LoadStatic::LoadStatic() : LoadAggregate(nullptr) {} +LoadStatic::~LoadStatic() {} static const std::list PossibleProfilesForClass = { @@ -74,249 +57,279 @@ LoadStatic::getPossibleProfilesForAttributes() const return map; } +bool assign_LoadAggregate_LoadStatic(BaseClass*, BaseClass*); +bool assign_LoadStatic_LoadAggregate(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + LoadAggregate* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->LoadAggregate != element2) + { + element->LoadAggregate = element2; + return assign_LoadAggregate_LoadStatic(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_LoadStatic_ep1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_ep1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ep1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_ep2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_ep2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ep2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_ep3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_ep3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ep3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_eq1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_eq1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eq1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_eq2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_eq2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eq2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_eq3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_eq3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eq3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kp1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kp1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kp2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kp2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kp3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kp3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kp4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kp4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kpf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kpf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kq1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kq1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kq1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kq2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kq2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kq2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kq3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kq3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kq3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kq4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kq4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kq4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kqf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kqf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kqf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_staticLoadModelType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_staticLoadModelType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->staticLoadModelType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_LoadAggregate_LoadStatic(BaseClass*, BaseClass*); -bool assign_LoadStatic_LoadAggregate(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_LoadStatic_LoadAggregate(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - LoadStatic* element = dynamic_cast(BaseClass_ptr1); - LoadAggregate* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->LoadAggregate != element2) + if (element->LoadAggregate != 0) { - element->LoadAggregate = element2; - return assign_LoadAggregate_LoadStatic(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->LoadAggregate); + return true; } - return true; } return false; } bool get_LoadStatic_ep1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ep1; if (!buffer.str().empty()) @@ -330,7 +343,8 @@ bool get_LoadStatic_ep1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_ep2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ep2; if (!buffer.str().empty()) @@ -344,7 +358,8 @@ bool get_LoadStatic_ep2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_ep3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ep3; if (!buffer.str().empty()) @@ -358,7 +373,8 @@ bool get_LoadStatic_ep3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_eq1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eq1; if (!buffer.str().empty()) @@ -372,7 +388,8 @@ bool get_LoadStatic_eq1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_eq2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eq2; if (!buffer.str().empty()) @@ -386,7 +403,8 @@ bool get_LoadStatic_eq2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_eq3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eq3; if (!buffer.str().empty()) @@ -400,7 +418,8 @@ bool get_LoadStatic_eq3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kp1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp1; if (!buffer.str().empty()) @@ -414,7 +433,8 @@ bool get_LoadStatic_kp1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kp2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp2; if (!buffer.str().empty()) @@ -428,7 +448,8 @@ bool get_LoadStatic_kp2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kp3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp3; if (!buffer.str().empty()) @@ -442,7 +463,8 @@ bool get_LoadStatic_kp3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kp4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp4; if (!buffer.str().empty()) @@ -456,7 +478,8 @@ bool get_LoadStatic_kp4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kpf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpf; if (!buffer.str().empty()) @@ -470,7 +493,8 @@ bool get_LoadStatic_kpf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kq1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kq1; if (!buffer.str().empty()) @@ -484,7 +508,8 @@ bool get_LoadStatic_kq1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kq2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kq2; if (!buffer.str().empty()) @@ -498,7 +523,8 @@ bool get_LoadStatic_kq2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kq3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kq3; if (!buffer.str().empty()) @@ -512,7 +538,8 @@ bool get_LoadStatic_kq3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kq4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kq4; if (!buffer.str().empty()) @@ -526,7 +553,8 @@ bool get_LoadStatic_kq4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kqf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kqf; if (!buffer.str().empty()) @@ -538,24 +566,10 @@ bool get_LoadStatic_kqf(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - -bool get_LoadStatic_LoadAggregate(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->LoadAggregate != 0) - { - BaseClass_list.push_back(element->LoadAggregate); - return true; - } - } - return false; -} - - bool get_LoadStatic_staticLoadModelType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->staticLoadModelType; if (!buffer.str().empty()) @@ -575,33 +589,33 @@ const char* LoadStatic::debugString() const void LoadStatic::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadStatic"), &LoadStatic_factory)); + factory_map.emplace("cim:LoadStatic", &LoadStatic_factory); } void LoadStatic::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.ep1"), &assign_LoadStatic_ep1)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.ep2"), &assign_LoadStatic_ep2)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.ep3"), &assign_LoadStatic_ep3)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.eq1"), &assign_LoadStatic_eq1)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.eq2"), &assign_LoadStatic_eq2)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.eq3"), &assign_LoadStatic_eq3)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kp1"), &assign_LoadStatic_kp1)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kp2"), &assign_LoadStatic_kp2)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kp3"), &assign_LoadStatic_kp3)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kp4"), &assign_LoadStatic_kp4)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kpf"), &assign_LoadStatic_kpf)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kq1"), &assign_LoadStatic_kq1)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kq2"), &assign_LoadStatic_kq2)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kq3"), &assign_LoadStatic_kq3)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kq4"), &assign_LoadStatic_kq4)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kqf"), &assign_LoadStatic_kqf)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.staticLoadModelType"), &assign_LoadStatic_staticLoadModelType)); + assign_map.emplace("cim:LoadStatic.ep1", &assign_LoadStatic_ep1); + assign_map.emplace("cim:LoadStatic.ep2", &assign_LoadStatic_ep2); + assign_map.emplace("cim:LoadStatic.ep3", &assign_LoadStatic_ep3); + assign_map.emplace("cim:LoadStatic.eq1", &assign_LoadStatic_eq1); + assign_map.emplace("cim:LoadStatic.eq2", &assign_LoadStatic_eq2); + assign_map.emplace("cim:LoadStatic.eq3", &assign_LoadStatic_eq3); + assign_map.emplace("cim:LoadStatic.kp1", &assign_LoadStatic_kp1); + assign_map.emplace("cim:LoadStatic.kp2", &assign_LoadStatic_kp2); + assign_map.emplace("cim:LoadStatic.kp3", &assign_LoadStatic_kp3); + assign_map.emplace("cim:LoadStatic.kp4", &assign_LoadStatic_kp4); + assign_map.emplace("cim:LoadStatic.kpf", &assign_LoadStatic_kpf); + assign_map.emplace("cim:LoadStatic.kq1", &assign_LoadStatic_kq1); + assign_map.emplace("cim:LoadStatic.kq2", &assign_LoadStatic_kq2); + assign_map.emplace("cim:LoadStatic.kq3", &assign_LoadStatic_kq3); + assign_map.emplace("cim:LoadStatic.kq4", &assign_LoadStatic_kq4); + assign_map.emplace("cim:LoadStatic.kqf", &assign_LoadStatic_kqf); + assign_map.emplace("cim:LoadStatic.staticLoadModelType", &assign_LoadStatic_staticLoadModelType); } void LoadStatic::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.LoadAggregate"), &assign_LoadStatic_LoadAggregate)); + assign_map.emplace("cim:LoadStatic.LoadAggregate", &assign_LoadStatic_LoadAggregate); } void LoadStatic::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/LoadStatic.hpp b/CGMES_2.4.15_16FEB2016/LoadStatic.hpp index 58a50621a..7cea8b85f 100644 --- a/CGMES_2.4.15_16FEB2016/LoadStatic.hpp +++ b/CGMES_2.4.15_16FEB2016/LoadStatic.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class LoadAggregate; - /* - General static load model representing the sensitivity of the real and reactive power consumed by the load to the amplitude and frequency of the bus voltage. - */ + /** \brief General static load model representing the sensitivity of the real and reactive power consumed by the load to the amplitude and frequency of the bus voltage. */ class LoadStatic : public IdentifiedObject { public: @@ -29,24 +27,59 @@ namespace CIMPP LoadStatic(); ~LoadStatic() override; - CIMPP::LoadAggregate* LoadAggregate; /* Aggregate load to which this aggregate static load belongs. Default: 0 */ - CIMPP::Simple_Float ep1; /* First term voltage exponent for active power (Ep1). Used only when .staticLoadModelType = exponential. Default: nullptr */ - CIMPP::Simple_Float ep2; /* Second term voltage exponent for active power (Ep2). Used only when .staticLoadModelType = exponential. Default: nullptr */ - CIMPP::Simple_Float ep3; /* Third term voltage exponent for active power (Ep3). Used only when .staticLoadModelType = exponential. Default: nullptr */ - CIMPP::Simple_Float eq1; /* First term voltage exponent for reactive power (Eq1). Used only when .staticLoadModelType = exponential. Default: nullptr */ - CIMPP::Simple_Float eq2; /* Second term voltage exponent for reactive power (Eq2). Used only when .staticLoadModelType = exponential. Default: nullptr */ - CIMPP::Simple_Float eq3; /* Third term voltage exponent for reactive power (Eq3). Used only when .staticLoadModelType = exponential. Default: nullptr */ - CIMPP::Simple_Float kp1; /* First term voltage coefficient for active power (Kp1). Not used when .staticLoadModelType = constantZ. Default: nullptr */ - CIMPP::Simple_Float kp2; /* Second term voltage coefficient for active power (Kp2). Not used when .staticLoadModelType = constantZ. Default: nullptr */ - CIMPP::Simple_Float kp3; /* Third term voltage coefficient for active power (Kp3). Not used when .staticLoadModelType = constantZ. Default: nullptr */ - CIMPP::Simple_Float kp4; /* Frequency coefficient for active power (Kp4). Must be non-zero when .staticLoadModelType = ZIP2. Not used for all other values of .staticLoadModelType. Default: nullptr */ - CIMPP::Simple_Float kpf; /* Frequency deviation coefficient for active power (Kpf). Not used when .staticLoadModelType = constantZ. Default: nullptr */ - CIMPP::Simple_Float kq1; /* First term voltage coefficient for reactive power (Kq1). Not used when .staticLoadModelType = constantZ. Default: nullptr */ - CIMPP::Simple_Float kq2; /* Second term voltage coefficient for reactive power (Kq2). Not used when .staticLoadModelType = constantZ. Default: nullptr */ - CIMPP::Simple_Float kq3; /* Third term voltage coefficient for reactive power (Kq3). Not used when .staticLoadModelType = constantZ. Default: nullptr */ - CIMPP::Simple_Float kq4; /* Frequency coefficient for reactive power (Kq4). Must be non-zero when .staticLoadModelType = ZIP2. Not used for all other values of .staticLoadModelType. Default: nullptr */ - CIMPP::Simple_Float kqf; /* Frequency deviation coefficient for reactive power (Kqf). Not used when .staticLoadModelType = constantZ. Default: nullptr */ - CIMPP::StaticLoadModelKind staticLoadModelType; /* Type of static load model. Typical Value = constantZ. Default: 0 */ + /** \brief Aggregate load to which this aggregate static load belongs. Default: 0 */ + CIMPP::LoadAggregate* LoadAggregate; + + /** \brief First term voltage exponent for active power (Ep1). Used only when .staticLoadModelType = exponential. Default: nullptr */ + CIMPP::Simple_Float ep1; + + /** \brief Second term voltage exponent for active power (Ep2). Used only when .staticLoadModelType = exponential. Default: nullptr */ + CIMPP::Simple_Float ep2; + + /** \brief Third term voltage exponent for active power (Ep3). Used only when .staticLoadModelType = exponential. Default: nullptr */ + CIMPP::Simple_Float ep3; + + /** \brief First term voltage exponent for reactive power (Eq1). Used only when .staticLoadModelType = exponential. Default: nullptr */ + CIMPP::Simple_Float eq1; + + /** \brief Second term voltage exponent for reactive power (Eq2). Used only when .staticLoadModelType = exponential. Default: nullptr */ + CIMPP::Simple_Float eq2; + + /** \brief Third term voltage exponent for reactive power (Eq3). Used only when .staticLoadModelType = exponential. Default: nullptr */ + CIMPP::Simple_Float eq3; + + /** \brief First term voltage coefficient for active power (Kp1). Not used when .staticLoadModelType = constantZ. Default: nullptr */ + CIMPP::Simple_Float kp1; + + /** \brief Second term voltage coefficient for active power (Kp2). Not used when .staticLoadModelType = constantZ. Default: nullptr */ + CIMPP::Simple_Float kp2; + + /** \brief Third term voltage coefficient for active power (Kp3). Not used when .staticLoadModelType = constantZ. Default: nullptr */ + CIMPP::Simple_Float kp3; + + /** \brief Frequency coefficient for active power (Kp4). Must be non-zero when .staticLoadModelType = ZIP2. Not used for all other values of .staticLoadModelType. Default: nullptr */ + CIMPP::Simple_Float kp4; + + /** \brief Frequency deviation coefficient for active power (Kpf). Not used when .staticLoadModelType = constantZ. Default: nullptr */ + CIMPP::Simple_Float kpf; + + /** \brief First term voltage coefficient for reactive power (Kq1). Not used when .staticLoadModelType = constantZ. Default: nullptr */ + CIMPP::Simple_Float kq1; + + /** \brief Second term voltage coefficient for reactive power (Kq2). Not used when .staticLoadModelType = constantZ. Default: nullptr */ + CIMPP::Simple_Float kq2; + + /** \brief Third term voltage coefficient for reactive power (Kq3). Not used when .staticLoadModelType = constantZ. Default: nullptr */ + CIMPP::Simple_Float kq3; + + /** \brief Frequency coefficient for reactive power (Kq4). Must be non-zero when .staticLoadModelType = ZIP2. Not used for all other values of .staticLoadModelType. Default: nullptr */ + CIMPP::Simple_Float kq4; + + /** \brief Frequency deviation coefficient for reactive power (Kqf). Not used when .staticLoadModelType = constantZ. Default: nullptr */ + CIMPP::Simple_Float kqf; + + /** \brief Type of static load model. Typical Value = constantZ. Default: 0 */ + CIMPP::StaticLoadModelKind staticLoadModelType; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/LoadUserDefined.cpp b/CGMES_2.4.15_16FEB2016/LoadUserDefined.cpp index 976f5f8a4..ad0a491aa 100644 --- a/CGMES_2.4.15_16FEB2016/LoadUserDefined.cpp +++ b/CGMES_2.4.15_16FEB2016/LoadUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -LoadUserDefined::LoadUserDefined() {}; -LoadUserDefined::~LoadUserDefined() {}; +LoadUserDefined::LoadUserDefined() {} +LoadUserDefined::~LoadUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ LoadUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_LoadUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (LoadUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_LoadUserDefined(BaseClass*, BaseClass*); bool assign_LoadUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_LoadUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_pt return false; } +bool assign_LoadUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + LoadUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_LoadUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const LoadUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_LoadUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::strin return false; } - - const char LoadUserDefined::debugName[] = "LoadUserDefined"; const char* LoadUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* LoadUserDefined::debugString() const void LoadUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadUserDefined"), &LoadUserDefined_factory)); + factory_map.emplace("cim:LoadUserDefined", &LoadUserDefined_factory); } void LoadUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadUserDefined.proprietary"), &assign_LoadUserDefined_proprietary)); + assign_map.emplace("cim:LoadUserDefined.proprietary", &assign_LoadUserDefined_proprietary); } void LoadUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadUserDefined.ProprietaryParameterDynamics"), &assign_LoadUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:LoadUserDefined.ProprietaryParameterDynamics", &assign_LoadUserDefined_ProprietaryParameterDynamics); } void LoadUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/LoadUserDefined.hpp b/CGMES_2.4.15_16FEB2016/LoadUserDefined.hpp index 0c0faaf50..d9bea6707 100644 --- a/CGMES_2.4.15_16FEB2016/LoadUserDefined.hpp +++ b/CGMES_2.4.15_16FEB2016/LoadUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Load whose dynamic behaviour is described by a user-defined model. - */ + /** \brief Load whose dynamic behaviour is described by a user-defined model. */ class LoadUserDefined : public LoadDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP LoadUserDefined(); ~LoadUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Location.cpp b/CGMES_2.4.15_16FEB2016/Location.cpp index 7728072c8..d57fd2700 100644 --- a/CGMES_2.4.15_16FEB2016/Location.cpp +++ b/CGMES_2.4.15_16FEB2016/Location.cpp @@ -14,8 +14,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Location::Location() : CoordinateSystem(nullptr), PowerSystemResources(nullptr) {}; -Location::~Location() {}; +Location::Location() : CoordinateSystem(nullptr), PowerSystemResources(nullptr) {} +Location::~Location() {} static const std::list PossibleProfilesForClass = { @@ -44,8 +44,6 @@ Location::getPossibleProfilesForAttributes() const return map; } - - bool assign_CoordinateSystem_Location(BaseClass*, BaseClass*); bool assign_Location_CoordinateSystem(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -62,6 +60,7 @@ bool assign_Location_CoordinateSystem(BaseClass* BaseClass_ptr1, BaseClass* Base } return false; } + bool assign_PositionPoint_Location(BaseClass*, BaseClass*); bool assign_Location_PositionPoints(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -78,6 +77,7 @@ bool assign_Location_PositionPoints(BaseClass* BaseClass_ptr1, BaseClass* BaseCl } return false; } + bool assign_PowerSystemResource_Location(BaseClass*, BaseClass*); bool assign_Location_PowerSystemResources(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -95,10 +95,10 @@ bool assign_Location_PowerSystemResources(BaseClass* BaseClass_ptr1, BaseClass* return false; } - bool get_Location_CoordinateSystem(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Location* element = dynamic_cast(BaseClass_ptr1)) + const Location* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->CoordinateSystem != 0) { @@ -109,9 +109,11 @@ bool get_Location_CoordinateSystem(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Location* element = dynamic_cast(BaseClass_ptr1)) + const Location* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PowerSystemResources != 0) { @@ -122,7 +124,6 @@ bool get_Location_PowerSystemResources(const BaseClass* BaseClass_ptr1, std::lis return false; } - const char Location::debugName[] = "Location"; const char* Location::debugString() const { @@ -131,7 +132,7 @@ const char* Location::debugString() const void Location::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Location"), &Location_factory)); + factory_map.emplace("cim:Location", &Location_factory); } void Location::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -140,9 +141,9 @@ void Location::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Location.CoordinateSystem"), &assign_Location_CoordinateSystem)); - assign_map.insert(std::make_pair(std::string("cim:Location.PositionPoints"), &assign_Location_PositionPoints)); - assign_map.insert(std::make_pair(std::string("cim:Location.PowerSystemResources"), &assign_Location_PowerSystemResources)); + assign_map.emplace("cim:Location.CoordinateSystem", &assign_Location_CoordinateSystem); + assign_map.emplace("cim:Location.PositionPoints", &assign_Location_PositionPoints); + assign_map.emplace("cim:Location.PowerSystemResources", &assign_Location_PowerSystemResources); } void Location::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/Location.hpp b/CGMES_2.4.15_16FEB2016/Location.hpp index 9dbc8dcfb..4d10bdb15 100644 --- a/CGMES_2.4.15_16FEB2016/Location.hpp +++ b/CGMES_2.4.15_16FEB2016/Location.hpp @@ -19,9 +19,7 @@ namespace CIMPP class PositionPoint; class PowerSystemResource; - /* - The place, scene, or point of something where someone or something has been, is, and/or will be at a given moment in time. It can be defined with one or more postition points (coordinates) in a given coordinate system. - */ + /** \brief The place, scene, or point of something where someone or something has been, is, and/or will be at a given moment in time. It can be defined with one or more postition points (coordinates) in a given coordinate system. */ class Location : public IdentifiedObject { public: @@ -29,9 +27,14 @@ namespace CIMPP Location(); ~Location() override; - CIMPP::CoordinateSystem* CoordinateSystem; /* Coordinate system used to describe position points of this location. Default: 0 */ - std::list PositionPoints; /* Sequence of position points describing this location, expressed in coordinate system `Location.CoordinateSystem`. Default: 0 */ - CIMPP::PowerSystemResource* PowerSystemResources; /* All power system resources at this location. Default: 0 */ + /** \brief Coordinate system used to describe position points of this location. Default: 0 */ + CIMPP::CoordinateSystem* CoordinateSystem; + + /** \brief Sequence of position points describing this location, expressed in coordinate system `Location.CoordinateSystem`. Default: 0 */ + std::list PositionPoints; + + /** \brief All power system resources at this location. Default: 0 */ + CIMPP::PowerSystemResource* PowerSystemResources; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Measurement.cpp b/CGMES_2.4.15_16FEB2016/Measurement.cpp index 4d46ccab4..87a4ea88d 100644 --- a/CGMES_2.4.15_16FEB2016/Measurement.cpp +++ b/CGMES_2.4.15_16FEB2016/Measurement.cpp @@ -8,17 +8,13 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PowerSystemResource.hpp" #include "ACDCTerminal.hpp" -#include "String.hpp" -#include "PhaseCode.hpp" -#include "UnitMultiplier.hpp" -#include "UnitSymbol.hpp" +#include "PowerSystemResource.hpp" using namespace CIMPP; -Measurement::Measurement() : PowerSystemResource(nullptr), Terminal(nullptr) {}; -Measurement::~Measurement() {}; +Measurement::Measurement() : PowerSystemResource(nullptr), Terminal(nullptr) {} +Measurement::~Measurement() {} static const std::list PossibleProfilesForClass = { @@ -50,111 +46,100 @@ Measurement::getPossibleProfilesForAttributes() const return map; } - -bool assign_Measurement_measurementType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerSystemResource_Measurements(BaseClass*, BaseClass*); +bool assign_Measurement_PowerSystemResource(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (Measurement* element = dynamic_cast(BaseClass_ptr1)) + Measurement* element = dynamic_cast(BaseClass_ptr1); + PowerSystemResource* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - element->measurementType = buffer.str(); - if (buffer.fail()) - return false; - else - return true; + if (element->PowerSystemResource != element2) + { + element->PowerSystemResource = element2; + return assign_PowerSystemResource_Measurements(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_Measurement_phases(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCTerminal_Measurements(BaseClass*, BaseClass*); +bool assign_Measurement_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (Measurement* element = dynamic_cast(BaseClass_ptr1)) + Measurement* element = dynamic_cast(BaseClass_ptr1); + ACDCTerminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->phases; - if (buffer.fail()) - return false; - else - return true; + if (element->Terminal != element2) + { + element->Terminal = element2; + return assign_ACDCTerminal_Measurements(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_Measurement_unitMultiplier(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Measurement_measurementType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Measurement* element = dynamic_cast(BaseClass_ptr1)) + Measurement* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->unitMultiplier; - if (buffer.fail()) - return false; - else + element->measurementType = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Measurement_unitSymbol(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (Measurement* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->unitSymbol; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - -bool assign_PowerSystemResource_Measurements(BaseClass*, BaseClass*); -bool assign_Measurement_PowerSystemResource(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_Measurement_phases(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { Measurement* element = dynamic_cast(BaseClass_ptr1); - PowerSystemResource* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->PowerSystemResource != element2) + buffer >> element->phases; + if (!buffer.fail()) { - element->PowerSystemResource = element2; - return assign_PowerSystemResource_Measurements(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_ACDCTerminal_Measurements(BaseClass*, BaseClass*); -bool assign_Measurement_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_Measurement_unitMultiplier(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { Measurement* element = dynamic_cast(BaseClass_ptr1); - ACDCTerminal* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->Terminal != element2) + buffer >> element->unitMultiplier; + if (!buffer.fail()) { - element->Terminal = element2; - return assign_ACDCTerminal_Measurements(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool get_Measurement_measurementType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_Measurement_unitSymbol(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const Measurement* element = dynamic_cast(BaseClass_ptr1)) + Measurement* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->measurementType; - if (!buffer.str().empty()) + buffer >> element->unitSymbol; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_Measurement_PowerSystemResource(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Measurement* element = dynamic_cast(BaseClass_ptr1)) + const Measurement* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PowerSystemResource != 0) { @@ -167,7 +152,8 @@ bool get_Measurement_PowerSystemResource(const BaseClass* BaseClass_ptr1, std::l bool get_Measurement_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Measurement* element = dynamic_cast(BaseClass_ptr1)) + const Measurement* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Terminal != 0) { @@ -178,10 +164,25 @@ bool get_Measurement_Terminal(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->measurementType; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} bool get_Measurement_phases(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Measurement* element = dynamic_cast(BaseClass_ptr1)) + const Measurement* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->phases; if (!buffer.str().empty()) @@ -195,7 +196,8 @@ bool get_Measurement_phases(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_Measurement_unitMultiplier(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Measurement* element = dynamic_cast(BaseClass_ptr1)) + const Measurement* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->unitMultiplier; if (!buffer.str().empty()) @@ -209,7 +211,8 @@ bool get_Measurement_unitMultiplier(const BaseClass* BaseClass_ptr1, std::string bool get_Measurement_unitSymbol(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Measurement* element = dynamic_cast(BaseClass_ptr1)) + const Measurement* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->unitSymbol; if (!buffer.str().empty()) @@ -229,21 +232,21 @@ const char* Measurement::debugString() const void Measurement::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Measurement"), &Measurement_factory)); + factory_map.emplace("cim:Measurement", &Measurement_factory); } void Measurement::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Measurement.measurementType"), &assign_Measurement_measurementType)); - assign_map.insert(std::make_pair(std::string("cim:Measurement.phases"), &assign_Measurement_phases)); - assign_map.insert(std::make_pair(std::string("cim:Measurement.unitMultiplier"), &assign_Measurement_unitMultiplier)); - assign_map.insert(std::make_pair(std::string("cim:Measurement.unitSymbol"), &assign_Measurement_unitSymbol)); + assign_map.emplace("cim:Measurement.measurementType", &assign_Measurement_measurementType); + assign_map.emplace("cim:Measurement.phases", &assign_Measurement_phases); + assign_map.emplace("cim:Measurement.unitMultiplier", &assign_Measurement_unitMultiplier); + assign_map.emplace("cim:Measurement.unitSymbol", &assign_Measurement_unitSymbol); } void Measurement::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Measurement.PowerSystemResource"), &assign_Measurement_PowerSystemResource)); - assign_map.insert(std::make_pair(std::string("cim:Measurement.Terminal"), &assign_Measurement_Terminal)); + assign_map.emplace("cim:Measurement.PowerSystemResource", &assign_Measurement_PowerSystemResource); + assign_map.emplace("cim:Measurement.Terminal", &assign_Measurement_Terminal); } void Measurement::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/Measurement.hpp b/CGMES_2.4.15_16FEB2016/Measurement.hpp index 2d19ee4f7..60b15fbaf 100644 --- a/CGMES_2.4.15_16FEB2016/Measurement.hpp +++ b/CGMES_2.4.15_16FEB2016/Measurement.hpp @@ -22,9 +22,7 @@ namespace CIMPP class ACDCTerminal; class PowerSystemResource; - /* - A Measurement represents any measured, calculated or non-measured non-calculated quantity. Any piece of equipment may contain Measurements, e.g. a substation may have temperature measurements and door open indications, a transformer may have oil temperature and tank pressure measurements, a bay may contain a number of power flow measurements and a Breaker may contain a switch status measurement. The PSR - Measurement association is intended to capture this use of Measurement and is included in the naming hierarchy based on EquipmentContainer. The naming hierarchy typically has Measurements as leafs, e.g. Substation-VoltageLevel-Bay-Switch-Measurement. Some Measurements represent quantities related to a particular sensor location in the network, e.g. a voltage transformer (PT) at a busbar or a current transformer (CT) at the bar between a breaker and an isolator. The sensing position is not captured in the PSR - Measurement association. Instead it is captured by the Measurement - Terminal association that is used to define the sensing location in the network topology. The location is defined by the connection of the Terminal to ConductingEquipment. If both a Terminal and PSR are associated, and the PSR is of type ConductingEquipment, the associated Terminal should belong to that ConductingEquipment instance. When the sensor location is needed both Measurement-PSR and Measurement-Terminal are used. The Measurement-Terminal association is never used alone. - */ + /** \brief A Measurement represents any measured, calculated or non-measured non-calculated quantity. Any piece of equipment may contain Measurements, e.g. a substation may have temperature measurements and door open indications, a transformer may have oil temperature and tank pressure measurements, a bay may contain a number of power flow measurements and a Breaker may contain a switch status measurement. The PSR - Measurement association is intended to capture this use of Measurement and is included in the naming hierarchy based on EquipmentContainer. The naming hierarchy typically has Measurements as leafs, e.g. Substation-VoltageLevel-Bay-Switch-Measurement. Some Measurements represent quantities related to a particular sensor location in the network, e.g. a voltage transformer (PT) at a busbar or a current transformer (CT) at the bar between a breaker and an isolator. The sensing position is not captured in the PSR - Measurement association. Instead it is captured by the Measurement - Terminal association that is used to define the sensing location in the network topology. The location is defined by the connection of the Terminal to ConductingEquipment. If both a Terminal and PSR are associated, and the PSR is of type ConductingEquipment, the associated Terminal should belong to that ConductingEquipment instance. When the sensor location is needed both Measurement-PSR and Measurement-Terminal are used. The Measurement-Terminal association is never used alone. */ class Measurement : public IdentifiedObject { public: @@ -32,12 +30,23 @@ namespace CIMPP Measurement(); ~Measurement() override; - CIMPP::PowerSystemResource* PowerSystemResource; /* The measurements associated with this power system resource. Default: 0 */ - CIMPP::ACDCTerminal* Terminal; /* One or more measurements may be associated with a terminal in the network. Default: 0 */ - CIMPP::String measurementType; /* Specifies the type of measurement. For example, this specifies if the measurement represents an indoor temperature, outdoor temperature, bus voltage, line flow, etc. Default: '' */ - CIMPP::PhaseCode phases; /* Indicates to which phases the measurement applies and avoids the need to use `measurementType` to also encode phase information (which would explode the types). The phase information in Measurement, along with `measurementType` and `phases` uniquely defines a Measurement for a device, based on normal network phase. Their meaning will not change when the computed energizing phasing is changed due to jumpers or other reasons. If the attribute is missing three phases (ABC) shall be assumed. Default: 0 */ - CIMPP::UnitMultiplier unitMultiplier; /* The unit multiplier of the measured quantity. Default: 0 */ - CIMPP::UnitSymbol unitSymbol; /* The unit of measure of the measured quantity. Default: 0 */ + /** \brief The measurements associated with this power system resource. Default: 0 */ + CIMPP::PowerSystemResource* PowerSystemResource; + + /** \brief One or more measurements may be associated with a terminal in the network. Default: 0 */ + CIMPP::ACDCTerminal* Terminal; + + /** \brief Specifies the type of measurement. For example, this specifies if the measurement represents an indoor temperature, outdoor temperature, bus voltage, line flow, etc. Default: '' */ + CIMPP::String measurementType; + + /** \brief Indicates to which phases the measurement applies and avoids the need to use `measurementType` to also encode phase information (which would explode the types). The phase information in Measurement, along with `measurementType` and `phases` uniquely defines a Measurement for a device, based on normal network phase. Their meaning will not change when the computed energizing phasing is changed due to jumpers or other reasons. If the attribute is missing three phases (ABC) shall be assumed. Default: 0 */ + CIMPP::PhaseCode phases; + + /** \brief The unit multiplier of the measured quantity. Default: 0 */ + CIMPP::UnitMultiplier unitMultiplier; + + /** \brief The unit of measure of the measured quantity. Default: 0 */ + CIMPP::UnitSymbol unitSymbol; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/MeasurementValue.cpp b/CGMES_2.4.15_16FEB2016/MeasurementValue.cpp index e8f72157a..ed6bb5624 100644 --- a/CGMES_2.4.15_16FEB2016/MeasurementValue.cpp +++ b/CGMES_2.4.15_16FEB2016/MeasurementValue.cpp @@ -10,13 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "MeasurementValueQuality.hpp" #include "MeasurementValueSource.hpp" -#include "PerCent.hpp" -#include "DateTime.hpp" using namespace CIMPP; -MeasurementValue::MeasurementValue() : MeasurementValueQuality(nullptr), MeasurementValueSource(nullptr) {}; -MeasurementValue::~MeasurementValue() {}; +MeasurementValue::MeasurementValue() : MeasurementValueQuality(nullptr), MeasurementValueSource(nullptr) {} +MeasurementValue::~MeasurementValue() {} static const std::list PossibleProfilesForClass = { @@ -46,34 +44,6 @@ MeasurementValue::getPossibleProfilesForAttributes() const return map; } - -bool assign_MeasurementValue_sensorAccuracy(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (MeasurementValue* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->sensorAccuracy; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_MeasurementValue_timeStamp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (MeasurementValue* element = dynamic_cast(BaseClass_ptr1)) - { - element->timeStamp = buffer.str(); - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_MeasurementValueQuality_MeasurementValue(BaseClass*, BaseClass*); bool assign_MeasurementValue_MeasurementValueQuality(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -90,6 +60,7 @@ bool assign_MeasurementValue_MeasurementValueQuality(BaseClass* BaseClass_ptr1, } return false; } + bool assign_MeasurementValueSource_MeasurementValues(BaseClass*, BaseClass*); bool assign_MeasurementValue_MeasurementValueSource(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -107,38 +78,39 @@ bool assign_MeasurementValue_MeasurementValueSource(BaseClass* BaseClass_ptr1, B return false; } -bool get_MeasurementValue_sensorAccuracy(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_MeasurementValue_sensorAccuracy(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const MeasurementValue* element = dynamic_cast(BaseClass_ptr1)) + MeasurementValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->sensorAccuracy; - if (!buffer.str().empty()) + buffer >> element->sensorAccuracy; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_MeasurementValue_timeStamp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_MeasurementValue_timeStamp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const MeasurementValue* element = dynamic_cast(BaseClass_ptr1)) + MeasurementValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->timeStamp; - if (!buffer.str().empty()) + element->timeStamp = buffer.str(); + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } bool get_MeasurementValue_MeasurementValueSource(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const MeasurementValue* element = dynamic_cast(BaseClass_ptr1)) + const MeasurementValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->MeasurementValueSource != 0) { @@ -149,6 +121,35 @@ bool get_MeasurementValue_MeasurementValueSource(const BaseClass* BaseClass_ptr1 return false; } +bool get_MeasurementValue_sensorAccuracy(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const MeasurementValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->sensorAccuracy; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_MeasurementValue_timeStamp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const MeasurementValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->timeStamp; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char MeasurementValue::debugName[] = "MeasurementValue"; const char* MeasurementValue::debugString() const @@ -158,19 +159,19 @@ const char* MeasurementValue::debugString() const void MeasurementValue::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:MeasurementValue"), &MeasurementValue_factory)); + factory_map.emplace("cim:MeasurementValue", &MeasurementValue_factory); } void MeasurementValue::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MeasurementValue.sensorAccuracy"), &assign_MeasurementValue_sensorAccuracy)); - assign_map.insert(std::make_pair(std::string("cim:MeasurementValue.timeStamp"), &assign_MeasurementValue_timeStamp)); + assign_map.emplace("cim:MeasurementValue.sensorAccuracy", &assign_MeasurementValue_sensorAccuracy); + assign_map.emplace("cim:MeasurementValue.timeStamp", &assign_MeasurementValue_timeStamp); } void MeasurementValue::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MeasurementValue.MeasurementValueQuality"), &assign_MeasurementValue_MeasurementValueQuality)); - assign_map.insert(std::make_pair(std::string("cim:MeasurementValue.MeasurementValueSource"), &assign_MeasurementValue_MeasurementValueSource)); + assign_map.emplace("cim:MeasurementValue.MeasurementValueQuality", &assign_MeasurementValue_MeasurementValueQuality); + assign_map.emplace("cim:MeasurementValue.MeasurementValueSource", &assign_MeasurementValue_MeasurementValueSource); } void MeasurementValue::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/MeasurementValue.hpp b/CGMES_2.4.15_16FEB2016/MeasurementValue.hpp index 820a01378..5e4745ae7 100644 --- a/CGMES_2.4.15_16FEB2016/MeasurementValue.hpp +++ b/CGMES_2.4.15_16FEB2016/MeasurementValue.hpp @@ -20,9 +20,7 @@ namespace CIMPP class MeasurementValueQuality; class MeasurementValueSource; - /* - The current state for a measurement. A state value is an instance of a measurement from a specific source. Measurements can be associated with many state values, each representing a different source for the measurement. - */ + /** \brief The current state for a measurement. A state value is an instance of a measurement from a specific source. Measurements can be associated with many state values, each representing a different source for the measurement. */ class MeasurementValue : public IdentifiedObject { public: @@ -30,10 +28,17 @@ namespace CIMPP MeasurementValue(); ~MeasurementValue() override; - CIMPP::MeasurementValueQuality* MeasurementValueQuality; /* A MeasurementValue has a MeasurementValueQuality associated with it. Default: 0 */ - CIMPP::MeasurementValueSource* MeasurementValueSource; /* The MeasurementValues updated by the source. Default: 0 */ - CIMPP::PerCent sensorAccuracy; /* The limit, expressed as a percentage of the sensor maximum, that errors will not exceed when the sensor is used under reference conditions. Default: nullptr */ - CIMPP::DateTime timeStamp; /* The time when the value was last updated Default: '' */ + /** \brief A MeasurementValue has a MeasurementValueQuality associated with it. Default: 0 */ + CIMPP::MeasurementValueQuality* MeasurementValueQuality; + + /** \brief The MeasurementValues updated by the source. Default: 0 */ + CIMPP::MeasurementValueSource* MeasurementValueSource; + + /** \brief The limit, expressed as a percentage of the sensor maximum, that errors will not exceed when the sensor is used under reference conditions. Default: nullptr */ + CIMPP::PerCent sensorAccuracy; + + /** \brief The time when the value was last updated Default: '' */ + CIMPP::DateTime timeStamp; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/MeasurementValueQuality.cpp b/CGMES_2.4.15_16FEB2016/MeasurementValueQuality.cpp index 5bebd6fd7..2137766e7 100644 --- a/CGMES_2.4.15_16FEB2016/MeasurementValueQuality.cpp +++ b/CGMES_2.4.15_16FEB2016/MeasurementValueQuality.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -MeasurementValueQuality::MeasurementValueQuality() : MeasurementValue(nullptr) {}; -MeasurementValueQuality::~MeasurementValueQuality() {}; +MeasurementValueQuality::MeasurementValueQuality() : MeasurementValue(nullptr) {} +MeasurementValueQuality::~MeasurementValueQuality() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ MeasurementValueQuality::getPossibleProfilesForAttributes() const return map; } - - bool assign_MeasurementValue_MeasurementValueQuality(BaseClass*, BaseClass*); bool assign_MeasurementValueQuality_MeasurementValue(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_MeasurementValueQuality_MeasurementValue(BaseClass* BaseClass_ptr1, return false; } - bool get_MeasurementValueQuality_MeasurementValue(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const MeasurementValueQuality* element = dynamic_cast(BaseClass_ptr1)) + const MeasurementValueQuality* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->MeasurementValue != 0) { @@ -73,7 +71,6 @@ bool get_MeasurementValueQuality_MeasurementValue(const BaseClass* BaseClass_ptr return false; } - const char MeasurementValueQuality::debugName[] = "MeasurementValueQuality"; const char* MeasurementValueQuality::debugString() const { @@ -82,7 +79,7 @@ const char* MeasurementValueQuality::debugString() const void MeasurementValueQuality::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:MeasurementValueQuality"), &MeasurementValueQuality_factory)); + factory_map.emplace("cim:MeasurementValueQuality", &MeasurementValueQuality_factory); } void MeasurementValueQuality::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void MeasurementValueQuality::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MeasurementValueQuality.MeasurementValue"), &assign_MeasurementValueQuality_MeasurementValue)); + assign_map.emplace("cim:MeasurementValueQuality.MeasurementValue", &assign_MeasurementValueQuality_MeasurementValue); } void MeasurementValueQuality::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/MeasurementValueQuality.hpp b/CGMES_2.4.15_16FEB2016/MeasurementValueQuality.hpp index e4ee4d3db..bc0991186 100644 --- a/CGMES_2.4.15_16FEB2016/MeasurementValueQuality.hpp +++ b/CGMES_2.4.15_16FEB2016/MeasurementValueQuality.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class MeasurementValue; - /* - Measurement quality flags. Bits 0-10 are defined for substation automation in draft IEC 61850 part 7-3. Bits 11-15 are reserved for future expansion by that document. Bits 16-31 are reserved for EMS applications. - */ + /** \brief Measurement quality flags. Bits 0-10 are defined for substation automation in draft IEC 61850 part 7-3. Bits 11-15 are reserved for future expansion by that document. Bits 16-31 are reserved for EMS applications. */ class MeasurementValueQuality : public Quality61850 { public: @@ -27,7 +25,8 @@ namespace CIMPP MeasurementValueQuality(); ~MeasurementValueQuality() override; - CIMPP::MeasurementValue* MeasurementValue; /* A MeasurementValue has a MeasurementValueQuality associated with it. Default: 0 */ + /** \brief A MeasurementValue has a MeasurementValueQuality associated with it. Default: 0 */ + CIMPP::MeasurementValue* MeasurementValue; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/MeasurementValueSource.cpp b/CGMES_2.4.15_16FEB2016/MeasurementValueSource.cpp index ffb5a1545..b276344bf 100644 --- a/CGMES_2.4.15_16FEB2016/MeasurementValueSource.cpp +++ b/CGMES_2.4.15_16FEB2016/MeasurementValueSource.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -MeasurementValueSource::MeasurementValueSource() {}; -MeasurementValueSource::~MeasurementValueSource() {}; +MeasurementValueSource::MeasurementValueSource() {} +MeasurementValueSource::~MeasurementValueSource() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ MeasurementValueSource::getPossibleProfilesForAttributes() const return map; } - - bool assign_MeasurementValue_MeasurementValueSource(BaseClass*, BaseClass*); bool assign_MeasurementValueSource_MeasurementValues(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_MeasurementValueSource_MeasurementValues(BaseClass* BaseClass_ptr1, } - const char MeasurementValueSource::debugName[] = "MeasurementValueSource"; const char* MeasurementValueSource::debugString() const { @@ -69,7 +66,7 @@ const char* MeasurementValueSource::debugString() const void MeasurementValueSource::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:MeasurementValueSource"), &MeasurementValueSource_factory)); + factory_map.emplace("cim:MeasurementValueSource", &MeasurementValueSource_factory); } void MeasurementValueSource::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void MeasurementValueSource::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MeasurementValueSource.MeasurementValues"), &assign_MeasurementValueSource_MeasurementValues)); + assign_map.emplace("cim:MeasurementValueSource.MeasurementValues", &assign_MeasurementValueSource_MeasurementValues); } void MeasurementValueSource::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/MeasurementValueSource.hpp b/CGMES_2.4.15_16FEB2016/MeasurementValueSource.hpp index cbb8e256c..3411d326b 100644 --- a/CGMES_2.4.15_16FEB2016/MeasurementValueSource.hpp +++ b/CGMES_2.4.15_16FEB2016/MeasurementValueSource.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class MeasurementValue; - /* - MeasurementValueSource describes the alternative sources updating a MeasurementValue. User conventions for how to use the MeasurementValueSource attributes are described in the introduction to IEC 61970-301. - */ + /** \brief MeasurementValueSource describes the alternative sources updating a MeasurementValue. User conventions for how to use the MeasurementValueSource attributes are described in the introduction to IEC 61970-301. */ class MeasurementValueSource : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP MeasurementValueSource(); ~MeasurementValueSource() override; - std::list MeasurementValues; /* A reference to the type of source that updates the MeasurementValue, e.g. SCADA, CCLink, manual, etc. User conventions for the names of sources are contained in the introduction to IEC 61970-301. Default: 0 */ + /** \brief A reference to the type of source that updates the MeasurementValue, e.g. SCADA, CCLink, manual, etc. User conventions for the names of sources are contained in the introduction to IEC 61970-301. Default: 0 */ + std::list MeasurementValues; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/MechLoad1.cpp b/CGMES_2.4.15_16FEB2016/MechLoad1.cpp index 5aceb8f4b..7016b3c19 100644 --- a/CGMES_2.4.15_16FEB2016/MechLoad1.cpp +++ b/CGMES_2.4.15_16FEB2016/MechLoad1.cpp @@ -8,15 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -MechLoad1::MechLoad1() {}; -MechLoad1::~MechLoad1() {}; +MechLoad1::MechLoad1() {} +MechLoad1::~MechLoad1() {} static const std::list PossibleProfilesForClass = { @@ -46,64 +42,66 @@ MechLoad1::getPossibleProfilesForAttributes() const return map; } - -bool assign_MechLoad1_a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MechLoad1_a(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + MechLoad1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MechLoad1_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MechLoad1_b(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + MechLoad1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MechLoad1_d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MechLoad1_d(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + MechLoad1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->d; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MechLoad1_e(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MechLoad1_e(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + MechLoad1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_MechLoad1_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + const MechLoad1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a; if (!buffer.str().empty()) @@ -117,7 +115,8 @@ bool get_MechLoad1_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_MechLoad1_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + const MechLoad1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b; if (!buffer.str().empty()) @@ -131,7 +130,8 @@ bool get_MechLoad1_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_MechLoad1_d(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + const MechLoad1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->d; if (!buffer.str().empty()) @@ -145,7 +145,8 @@ bool get_MechLoad1_d(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_MechLoad1_e(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + const MechLoad1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e; if (!buffer.str().empty()) @@ -157,8 +158,6 @@ bool get_MechLoad1_e(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char MechLoad1::debugName[] = "MechLoad1"; const char* MechLoad1::debugString() const { @@ -167,15 +166,15 @@ const char* MechLoad1::debugString() const void MechLoad1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:MechLoad1"), &MechLoad1_factory)); + factory_map.emplace("cim:MechLoad1", &MechLoad1_factory); } void MechLoad1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MechLoad1.a"), &assign_MechLoad1_a)); - assign_map.insert(std::make_pair(std::string("cim:MechLoad1.b"), &assign_MechLoad1_b)); - assign_map.insert(std::make_pair(std::string("cim:MechLoad1.d"), &assign_MechLoad1_d)); - assign_map.insert(std::make_pair(std::string("cim:MechLoad1.e"), &assign_MechLoad1_e)); + assign_map.emplace("cim:MechLoad1.a", &assign_MechLoad1_a); + assign_map.emplace("cim:MechLoad1.b", &assign_MechLoad1_b); + assign_map.emplace("cim:MechLoad1.d", &assign_MechLoad1_d); + assign_map.emplace("cim:MechLoad1.e", &assign_MechLoad1_e); } void MechLoad1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/MechLoad1.hpp b/CGMES_2.4.15_16FEB2016/MechLoad1.hpp index 5fb5620bd..9b16f17c2 100644 --- a/CGMES_2.4.15_16FEB2016/MechLoad1.hpp +++ b/CGMES_2.4.15_16FEB2016/MechLoad1.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Mechanical load model type 1. - */ + /** \brief Mechanical load model type 1. */ class MechLoad1 : public MechanicalLoadDynamics { public: @@ -27,10 +25,17 @@ namespace CIMPP MechLoad1(); ~MechLoad1() override; - CIMPP::Simple_Float a; /* Speed squared coefficient (a). Default: nullptr */ - CIMPP::Simple_Float b; /* Speed coefficient (b). Default: nullptr */ - CIMPP::Simple_Float d; /* Speed to the exponent coefficient (d). Default: nullptr */ - CIMPP::Simple_Float e; /* Exponent (e). Default: nullptr */ + /** \brief Speed squared coefficient (a). Default: nullptr */ + CIMPP::Simple_Float a; + + /** \brief Speed coefficient (b). Default: nullptr */ + CIMPP::Simple_Float b; + + /** \brief Speed to the exponent coefficient (d). Default: nullptr */ + CIMPP::Simple_Float d; + + /** \brief Exponent (e). Default: nullptr */ + CIMPP::Simple_Float e; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/MechanicalLoadDynamics.cpp b/CGMES_2.4.15_16FEB2016/MechanicalLoadDynamics.cpp index 2235d8b48..dc44cac2d 100644 --- a/CGMES_2.4.15_16FEB2016/MechanicalLoadDynamics.cpp +++ b/CGMES_2.4.15_16FEB2016/MechanicalLoadDynamics.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -MechanicalLoadDynamics::MechanicalLoadDynamics() : AsynchronousMachineDynamics(nullptr), SynchronousMachineDynamics(nullptr) {}; -MechanicalLoadDynamics::~MechanicalLoadDynamics() {}; +MechanicalLoadDynamics::MechanicalLoadDynamics() : AsynchronousMachineDynamics(nullptr), SynchronousMachineDynamics(nullptr) {} +MechanicalLoadDynamics::~MechanicalLoadDynamics() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ MechanicalLoadDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_AsynchronousMachineDynamics_MechanicalLoadDynamics(BaseClass*, BaseClass*); bool assign_MechanicalLoadDynamics_AsynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_MechanicalLoadDynamics_AsynchronousMachineDynamics(BaseClass* BaseCl } return false; } + bool assign_SynchronousMachineDynamics_MechanicalLoadDynamics(BaseClass*, BaseClass*); bool assign_MechanicalLoadDynamics_SynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_MechanicalLoadDynamics_SynchronousMachineDynamics(BaseClass* BaseCla return false; } - bool get_MechanicalLoadDynamics_AsynchronousMachineDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const MechanicalLoadDynamics* element = dynamic_cast(BaseClass_ptr1)) + const MechanicalLoadDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->AsynchronousMachineDynamics != 0) { @@ -93,7 +92,8 @@ bool get_MechanicalLoadDynamics_AsynchronousMachineDynamics(const BaseClass* Bas bool get_MechanicalLoadDynamics_SynchronousMachineDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const MechanicalLoadDynamics* element = dynamic_cast(BaseClass_ptr1)) + const MechanicalLoadDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->SynchronousMachineDynamics != 0) { @@ -104,7 +104,6 @@ bool get_MechanicalLoadDynamics_SynchronousMachineDynamics(const BaseClass* Base return false; } - const char MechanicalLoadDynamics::debugName[] = "MechanicalLoadDynamics"; const char* MechanicalLoadDynamics::debugString() const { @@ -113,7 +112,7 @@ const char* MechanicalLoadDynamics::debugString() const void MechanicalLoadDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:MechanicalLoadDynamics"), &MechanicalLoadDynamics_factory)); + factory_map.emplace("cim:MechanicalLoadDynamics", &MechanicalLoadDynamics_factory); } void MechanicalLoadDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void MechanicalLoadDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MechanicalLoadDynamics.AsynchronousMachineDynamics"), &assign_MechanicalLoadDynamics_AsynchronousMachineDynamics)); - assign_map.insert(std::make_pair(std::string("cim:MechanicalLoadDynamics.SynchronousMachineDynamics"), &assign_MechanicalLoadDynamics_SynchronousMachineDynamics)); + assign_map.emplace("cim:MechanicalLoadDynamics.AsynchronousMachineDynamics", &assign_MechanicalLoadDynamics_AsynchronousMachineDynamics); + assign_map.emplace("cim:MechanicalLoadDynamics.SynchronousMachineDynamics", &assign_MechanicalLoadDynamics_SynchronousMachineDynamics); } void MechanicalLoadDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/MechanicalLoadDynamics.hpp b/CGMES_2.4.15_16FEB2016/MechanicalLoadDynamics.hpp index 58676855b..57b474f87 100644 --- a/CGMES_2.4.15_16FEB2016/MechanicalLoadDynamics.hpp +++ b/CGMES_2.4.15_16FEB2016/MechanicalLoadDynamics.hpp @@ -18,9 +18,7 @@ namespace CIMPP class AsynchronousMachineDynamics; class SynchronousMachineDynamics; - /* - Mechanical load function block whose behavior is described by reference to a standard model - */ + /** \brief Mechanical load function block whose behavior is described by reference to a standard model */ class MechanicalLoadDynamics : public DynamicsFunctionBlock { public: @@ -28,8 +26,11 @@ namespace CIMPP MechanicalLoadDynamics(); ~MechanicalLoadDynamics() override; - CIMPP::AsynchronousMachineDynamics* AsynchronousMachineDynamics; /* Asynchronous machine model with which this mechanical load model is associated. Default: 0 */ - CIMPP::SynchronousMachineDynamics* SynchronousMachineDynamics; /* Synchronous machine model with which this mechanical load model is associated. Default: 0 */ + /** \brief Asynchronous machine model with which this mechanical load model is associated. Default: 0 */ + CIMPP::AsynchronousMachineDynamics* AsynchronousMachineDynamics; + + /** \brief Synchronous machine model with which this mechanical load model is associated. Default: 0 */ + CIMPP::SynchronousMachineDynamics* SynchronousMachineDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/MechanicalLoadUserDefined.cpp b/CGMES_2.4.15_16FEB2016/MechanicalLoadUserDefined.cpp index e750697ad..0fcdb6dee 100644 --- a/CGMES_2.4.15_16FEB2016/MechanicalLoadUserDefined.cpp +++ b/CGMES_2.4.15_16FEB2016/MechanicalLoadUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -MechanicalLoadUserDefined::MechanicalLoadUserDefined() {}; -MechanicalLoadUserDefined::~MechanicalLoadUserDefined() {}; +MechanicalLoadUserDefined::MechanicalLoadUserDefined() {} +MechanicalLoadUserDefined::~MechanicalLoadUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ MechanicalLoadUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_MechanicalLoadUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (MechanicalLoadUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_MechanicalLoadUserDefined(BaseClass*, BaseClass*); bool assign_MechanicalLoadUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_MechanicalLoadUserDefined_ProprietaryParameterDynamics(BaseClass* Ba return false; } +bool assign_MechanicalLoadUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + MechanicalLoadUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_MechanicalLoadUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MechanicalLoadUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const MechanicalLoadUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_MechanicalLoadUserDefined_proprietary(const BaseClass* BaseClass_ptr1, return false; } - - const char MechanicalLoadUserDefined::debugName[] = "MechanicalLoadUserDefined"; const char* MechanicalLoadUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* MechanicalLoadUserDefined::debugString() const void MechanicalLoadUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:MechanicalLoadUserDefined"), &MechanicalLoadUserDefined_factory)); + factory_map.emplace("cim:MechanicalLoadUserDefined", &MechanicalLoadUserDefined_factory); } void MechanicalLoadUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MechanicalLoadUserDefined.proprietary"), &assign_MechanicalLoadUserDefined_proprietary)); + assign_map.emplace("cim:MechanicalLoadUserDefined.proprietary", &assign_MechanicalLoadUserDefined_proprietary); } void MechanicalLoadUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MechanicalLoadUserDefined.ProprietaryParameterDynamics"), &assign_MechanicalLoadUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:MechanicalLoadUserDefined.ProprietaryParameterDynamics", &assign_MechanicalLoadUserDefined_ProprietaryParameterDynamics); } void MechanicalLoadUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/MechanicalLoadUserDefined.hpp b/CGMES_2.4.15_16FEB2016/MechanicalLoadUserDefined.hpp index d48634cbc..474c01c3d 100644 --- a/CGMES_2.4.15_16FEB2016/MechanicalLoadUserDefined.hpp +++ b/CGMES_2.4.15_16FEB2016/MechanicalLoadUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Mechanical load function block whose dynamic behaviour is described by - */ + /** \brief Mechanical load function block whose dynamic behaviour is described by */ class MechanicalLoadUserDefined : public MechanicalLoadDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP MechanicalLoadUserDefined(); ~MechanicalLoadUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Money.hpp b/CGMES_2.4.15_16FEB2016/Money.hpp index b6c47f743..5a75488fd 100644 --- a/CGMES_2.4.15_16FEB2016/Money.hpp +++ b/CGMES_2.4.15_16FEB2016/Money.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Amount of money. - */ + /** \brief Amount of money. */ class Money { public: diff --git a/CGMES_2.4.15_16FEB2016/MonthDay.hpp b/CGMES_2.4.15_16FEB2016/MonthDay.hpp index 1669168fe..ae83a209f 100644 --- a/CGMES_2.4.15_16FEB2016/MonthDay.hpp +++ b/CGMES_2.4.15_16FEB2016/MonthDay.hpp @@ -4,22 +4,20 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen */ -#include #include #include +#include namespace CIMPP { - /* - MonthDay format as "--mm-dd", which conforms with XSD data type gMonthDay. - */ + /** \brief MonthDay format as "--mm-dd", which conforms with XSD data type gMonthDay. */ class MonthDay { public: MonthDay() : initialized(false) {} MonthDay(const std::string& value) : value(value), initialized(true) {} - MonthDay& operator=(const std::string &rop); + MonthDay& operator=(const std::string& rop); operator std::string() const; std::string value; diff --git a/CGMES_2.4.15_16FEB2016/MutualCoupling.cpp b/CGMES_2.4.15_16FEB2016/MutualCoupling.cpp index bbd4b5962..0b97f5f70 100644 --- a/CGMES_2.4.15_16FEB2016/MutualCoupling.cpp +++ b/CGMES_2.4.15_16FEB2016/MutualCoupling.cpp @@ -9,20 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "Terminal.hpp" -#include "Terminal.hpp" -#include "Susceptance.hpp" -#include "Length.hpp" -#include "Length.hpp" -#include "Length.hpp" -#include "Length.hpp" -#include "Conductance.hpp" -#include "Resistance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -MutualCoupling::MutualCoupling() : First_Terminal(nullptr), Second_Terminal(nullptr) {}; -MutualCoupling::~MutualCoupling() {}; +MutualCoupling::MutualCoupling() : First_Terminal(nullptr), Second_Terminal(nullptr) {} +MutualCoupling::~MutualCoupling() {} static const std::list PossibleProfilesForClass = { @@ -58,148 +49,184 @@ MutualCoupling::getPossibleProfilesForAttributes() const return map; } +bool assign_Terminal_HasFirstMutualCoupling(BaseClass*, BaseClass*); +bool assign_MutualCoupling_First_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->First_Terminal != element2) + { + element->First_Terminal = element2; + return assign_Terminal_HasFirstMutualCoupling(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Terminal_HasSecondMutualCoupling(BaseClass*, BaseClass*); +bool assign_MutualCoupling_Second_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Second_Terminal != element2) + { + element->Second_Terminal = element2; + return assign_Terminal_HasSecondMutualCoupling(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_MutualCoupling_b0ch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MutualCoupling_b0ch(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b0ch; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MutualCoupling_distance11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MutualCoupling_distance11(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->distance11; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MutualCoupling_distance12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MutualCoupling_distance12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->distance12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MutualCoupling_distance21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MutualCoupling_distance21(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->distance21; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MutualCoupling_distance22(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MutualCoupling_distance22(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->distance22; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MutualCoupling_g0ch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MutualCoupling_g0ch(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g0ch; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MutualCoupling_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MutualCoupling_r0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MutualCoupling_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MutualCoupling_x0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_Terminal_HasFirstMutualCoupling(BaseClass*, BaseClass*); -bool assign_MutualCoupling_First_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_MutualCoupling_First_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - MutualCoupling* element = dynamic_cast(BaseClass_ptr1); - Terminal* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->First_Terminal != element2) + if (element->First_Terminal != 0) { - element->First_Terminal = element2; - return assign_Terminal_HasFirstMutualCoupling(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->First_Terminal); + return true; } - return true; } return false; } -bool assign_Terminal_HasSecondMutualCoupling(BaseClass*, BaseClass*); -bool assign_MutualCoupling_Second_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool get_MutualCoupling_Second_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - MutualCoupling* element = dynamic_cast(BaseClass_ptr1); - Terminal* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->Second_Terminal != element2) + if (element->Second_Terminal != 0) { - element->Second_Terminal = element2; - return assign_Terminal_HasSecondMutualCoupling(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->Second_Terminal); + return true; } - return true; } return false; } bool get_MutualCoupling_b0ch(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b0ch; if (!buffer.str().empty()) @@ -213,7 +240,8 @@ bool get_MutualCoupling_b0ch(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_MutualCoupling_distance11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->distance11; if (!buffer.str().empty()) @@ -227,7 +255,8 @@ bool get_MutualCoupling_distance11(const BaseClass* BaseClass_ptr1, std::strings bool get_MutualCoupling_distance12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->distance12; if (!buffer.str().empty()) @@ -241,7 +270,8 @@ bool get_MutualCoupling_distance12(const BaseClass* BaseClass_ptr1, std::strings bool get_MutualCoupling_distance21(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->distance21; if (!buffer.str().empty()) @@ -255,7 +285,8 @@ bool get_MutualCoupling_distance21(const BaseClass* BaseClass_ptr1, std::strings bool get_MutualCoupling_distance22(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->distance22; if (!buffer.str().empty()) @@ -269,7 +300,8 @@ bool get_MutualCoupling_distance22(const BaseClass* BaseClass_ptr1, std::strings bool get_MutualCoupling_g0ch(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g0ch; if (!buffer.str().empty()) @@ -283,7 +315,8 @@ bool get_MutualCoupling_g0ch(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_MutualCoupling_r0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r0; if (!buffer.str().empty()) @@ -297,7 +330,8 @@ bool get_MutualCoupling_r0(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_MutualCoupling_x0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x0; if (!buffer.str().empty()) @@ -309,34 +343,6 @@ bool get_MutualCoupling_x0(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - -bool get_MutualCoupling_First_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->First_Terminal != 0) - { - BaseClass_list.push_back(element->First_Terminal); - return true; - } - } - return false; -} - -bool get_MutualCoupling_Second_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->Second_Terminal != 0) - { - BaseClass_list.push_back(element->Second_Terminal); - return true; - } - } - return false; -} - - const char MutualCoupling::debugName[] = "MutualCoupling"; const char* MutualCoupling::debugString() const { @@ -345,25 +351,25 @@ const char* MutualCoupling::debugString() const void MutualCoupling::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:MutualCoupling"), &MutualCoupling_factory)); + factory_map.emplace("cim:MutualCoupling", &MutualCoupling_factory); } void MutualCoupling::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.b0ch"), &assign_MutualCoupling_b0ch)); - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.distance11"), &assign_MutualCoupling_distance11)); - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.distance12"), &assign_MutualCoupling_distance12)); - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.distance21"), &assign_MutualCoupling_distance21)); - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.distance22"), &assign_MutualCoupling_distance22)); - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.g0ch"), &assign_MutualCoupling_g0ch)); - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.r0"), &assign_MutualCoupling_r0)); - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.x0"), &assign_MutualCoupling_x0)); + assign_map.emplace("cim:MutualCoupling.b0ch", &assign_MutualCoupling_b0ch); + assign_map.emplace("cim:MutualCoupling.distance11", &assign_MutualCoupling_distance11); + assign_map.emplace("cim:MutualCoupling.distance12", &assign_MutualCoupling_distance12); + assign_map.emplace("cim:MutualCoupling.distance21", &assign_MutualCoupling_distance21); + assign_map.emplace("cim:MutualCoupling.distance22", &assign_MutualCoupling_distance22); + assign_map.emplace("cim:MutualCoupling.g0ch", &assign_MutualCoupling_g0ch); + assign_map.emplace("cim:MutualCoupling.r0", &assign_MutualCoupling_r0); + assign_map.emplace("cim:MutualCoupling.x0", &assign_MutualCoupling_x0); } void MutualCoupling::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.First_Terminal"), &assign_MutualCoupling_First_Terminal)); - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.Second_Terminal"), &assign_MutualCoupling_Second_Terminal)); + assign_map.emplace("cim:MutualCoupling.First_Terminal", &assign_MutualCoupling_First_Terminal); + assign_map.emplace("cim:MutualCoupling.Second_Terminal", &assign_MutualCoupling_Second_Terminal); } void MutualCoupling::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/MutualCoupling.hpp b/CGMES_2.4.15_16FEB2016/MutualCoupling.hpp index a218d4c4a..00b130bed 100644 --- a/CGMES_2.4.15_16FEB2016/MutualCoupling.hpp +++ b/CGMES_2.4.15_16FEB2016/MutualCoupling.hpp @@ -22,9 +22,7 @@ namespace CIMPP { class Terminal; - /* - This class represents the zero sequence line mutual coupling. - */ + /** \brief This class represents the zero sequence line mutual coupling. */ class MutualCoupling : public IdentifiedObject { public: @@ -32,16 +30,35 @@ namespace CIMPP MutualCoupling(); ~MutualCoupling() override; - CIMPP::Terminal* First_Terminal; /* The starting terminal for the calculation of distances along the first branch of the mutual coupling. Normally MutualCoupling would only be used for terminals of AC line segments. The first and second terminals of a mutual coupling should point to different AC line segments. Default: 0 */ - CIMPP::Terminal* Second_Terminal; /* The starting terminal for the calculation of distances along the second branch of the mutual coupling. Default: 0 */ - CIMPP::Susceptance b0ch; /* Zero sequence mutual coupling shunt (charging) susceptance, uniformly distributed, of the entire line section. Default: nullptr */ - CIMPP::Length distance11; /* Distance to the start of the coupled region from the first line`s terminal having sequence number equal to 1. Default: nullptr */ - CIMPP::Length distance12; /* Distance to the end of the coupled region from the first line`s terminal with sequence number equal to 1. Default: nullptr */ - CIMPP::Length distance21; /* Distance to the start of coupled region from the second line`s terminal with sequence number equal to 1. Default: nullptr */ - CIMPP::Length distance22; /* Distance to the end of coupled region from the second line`s terminal with sequence number equal to 1. Default: nullptr */ - CIMPP::Conductance g0ch; /* Zero sequence mutual coupling shunt (charging) conductance, uniformly distributed, of the entire line section. Default: nullptr */ - CIMPP::Resistance r0; /* Zero sequence branch-to-branch mutual impedance coupling, resistance. Default: nullptr */ - CIMPP::Reactance x0; /* Zero sequence branch-to-branch mutual impedance coupling, reactance. Default: nullptr */ + /** \brief The starting terminal for the calculation of distances along the first branch of the mutual coupling. Normally MutualCoupling would only be used for terminals of AC line segments. The first and second terminals of a mutual coupling should point to different AC line segments. Default: 0 */ + CIMPP::Terminal* First_Terminal; + + /** \brief The starting terminal for the calculation of distances along the second branch of the mutual coupling. Default: 0 */ + CIMPP::Terminal* Second_Terminal; + + /** \brief Zero sequence mutual coupling shunt (charging) susceptance, uniformly distributed, of the entire line section. Default: nullptr */ + CIMPP::Susceptance b0ch; + + /** \brief Distance to the start of the coupled region from the first line`s terminal having sequence number equal to 1. Default: nullptr */ + CIMPP::Length distance11; + + /** \brief Distance to the end of the coupled region from the first line`s terminal with sequence number equal to 1. Default: nullptr */ + CIMPP::Length distance12; + + /** \brief Distance to the start of coupled region from the second line`s terminal with sequence number equal to 1. Default: nullptr */ + CIMPP::Length distance21; + + /** \brief Distance to the end of coupled region from the second line`s terminal with sequence number equal to 1. Default: nullptr */ + CIMPP::Length distance22; + + /** \brief Zero sequence mutual coupling shunt (charging) conductance, uniformly distributed, of the entire line section. Default: nullptr */ + CIMPP::Conductance g0ch; + + /** \brief Zero sequence branch-to-branch mutual impedance coupling, resistance. Default: nullptr */ + CIMPP::Resistance r0; + + /** \brief Zero sequence branch-to-branch mutual impedance coupling, reactance. Default: nullptr */ + CIMPP::Reactance x0; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/NonConformLoad.cpp b/CGMES_2.4.15_16FEB2016/NonConformLoad.cpp index 23e687bdb..00d77b1ae 100644 --- a/CGMES_2.4.15_16FEB2016/NonConformLoad.cpp +++ b/CGMES_2.4.15_16FEB2016/NonConformLoad.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -NonConformLoad::NonConformLoad() : LoadGroup(nullptr) {}; -NonConformLoad::~NonConformLoad() {}; +NonConformLoad::NonConformLoad() : LoadGroup(nullptr) {} +NonConformLoad::~NonConformLoad() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ NonConformLoad::getPossibleProfilesForAttributes() const return map; } - - bool assign_NonConformLoadGroup_EnergyConsumers(BaseClass*, BaseClass*); bool assign_NonConformLoad_LoadGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,10 +58,10 @@ bool assign_NonConformLoad_LoadGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseC return false; } - bool get_NonConformLoad_LoadGroup(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const NonConformLoad* element = dynamic_cast(BaseClass_ptr1)) + const NonConformLoad* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->LoadGroup != 0) { @@ -74,7 +72,6 @@ bool get_NonConformLoad_LoadGroup(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:NonConformLoad"), &NonConformLoad_factory)); + factory_map.emplace("cim:NonConformLoad", &NonConformLoad_factory); } void NonConformLoad::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -92,7 +89,7 @@ void NonConformLoad::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:NonConformLoad.LoadGroup"), &assign_NonConformLoad_LoadGroup)); + assign_map.emplace("cim:NonConformLoad.LoadGroup", &assign_NonConformLoad_LoadGroup); } void NonConformLoad::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/NonConformLoad.hpp b/CGMES_2.4.15_16FEB2016/NonConformLoad.hpp index 2e336a8b1..d30929052 100644 --- a/CGMES_2.4.15_16FEB2016/NonConformLoad.hpp +++ b/CGMES_2.4.15_16FEB2016/NonConformLoad.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class NonConformLoadGroup; - /* - NonConformLoad represent loads that do not follow a daily load change pattern and changes are not correlated with the daily load change pattern. - */ + /** \brief NonConformLoad represent loads that do not follow a daily load change pattern and changes are not correlated with the daily load change pattern. */ class NonConformLoad : public EnergyConsumer { public: @@ -27,7 +25,8 @@ namespace CIMPP NonConformLoad(); ~NonConformLoad() override; - CIMPP::NonConformLoadGroup* LoadGroup; /* Conform loads assigned to this ConformLoadGroup. Default: 0 */ + /** \brief Conform loads assigned to this ConformLoadGroup. Default: 0 */ + CIMPP::NonConformLoadGroup* LoadGroup; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/NonConformLoadGroup.cpp b/CGMES_2.4.15_16FEB2016/NonConformLoadGroup.cpp index 23646be3e..0ffa2111f 100644 --- a/CGMES_2.4.15_16FEB2016/NonConformLoadGroup.cpp +++ b/CGMES_2.4.15_16FEB2016/NonConformLoadGroup.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -NonConformLoadGroup::NonConformLoadGroup() {}; -NonConformLoadGroup::~NonConformLoadGroup() {}; +NonConformLoadGroup::NonConformLoadGroup() {} +NonConformLoadGroup::~NonConformLoadGroup() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ NonConformLoadGroup::getPossibleProfilesForAttributes() const return map; } - - bool assign_NonConformLoad_LoadGroup(BaseClass*, BaseClass*); bool assign_NonConformLoadGroup_EnergyConsumers(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_NonConformLoadGroup_EnergyConsumers(BaseClass* BaseClass_ptr1, BaseC } return false; } + bool assign_NonConformLoadSchedule_NonConformLoadGroup(BaseClass*, BaseClass*); bool assign_NonConformLoadGroup_NonConformLoadSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -87,7 +86,7 @@ const char* NonConformLoadGroup::debugString() const void NonConformLoadGroup::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:NonConformLoadGroup"), &NonConformLoadGroup_factory)); + factory_map.emplace("cim:NonConformLoadGroup", &NonConformLoadGroup_factory); } void NonConformLoadGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -96,8 +95,8 @@ void NonConformLoadGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:NonConformLoadGroup.EnergyConsumers"), &assign_NonConformLoadGroup_EnergyConsumers)); - assign_map.insert(std::make_pair(std::string("cim:NonConformLoadGroup.NonConformLoadSchedules"), &assign_NonConformLoadGroup_NonConformLoadSchedules)); + assign_map.emplace("cim:NonConformLoadGroup.EnergyConsumers", &assign_NonConformLoadGroup_EnergyConsumers); + assign_map.emplace("cim:NonConformLoadGroup.NonConformLoadSchedules", &assign_NonConformLoadGroup_NonConformLoadSchedules); } void NonConformLoadGroup::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/NonConformLoadGroup.hpp b/CGMES_2.4.15_16FEB2016/NonConformLoadGroup.hpp index db8e81eaa..928188af7 100644 --- a/CGMES_2.4.15_16FEB2016/NonConformLoadGroup.hpp +++ b/CGMES_2.4.15_16FEB2016/NonConformLoadGroup.hpp @@ -18,9 +18,7 @@ namespace CIMPP class NonConformLoad; class NonConformLoadSchedule; - /* - Loads that do not follow a daily and seasonal load variation pattern. - */ + /** \brief Loads that do not follow a daily and seasonal load variation pattern. */ class NonConformLoadGroup : public LoadGroup { public: @@ -28,8 +26,11 @@ namespace CIMPP NonConformLoadGroup(); ~NonConformLoadGroup() override; - std::list EnergyConsumers; /* Group of this ConformLoad. Default: 0 */ - std::list NonConformLoadSchedules; /* The NonConformLoadSchedules in the NonConformLoadGroup. Default: 0 */ + /** \brief Group of this ConformLoad. Default: 0 */ + std::list EnergyConsumers; + + /** \brief The NonConformLoadSchedules in the NonConformLoadGroup. Default: 0 */ + std::list NonConformLoadSchedules; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/NonConformLoadSchedule.cpp b/CGMES_2.4.15_16FEB2016/NonConformLoadSchedule.cpp index c7ee3837c..f4a6a8203 100644 --- a/CGMES_2.4.15_16FEB2016/NonConformLoadSchedule.cpp +++ b/CGMES_2.4.15_16FEB2016/NonConformLoadSchedule.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -NonConformLoadSchedule::NonConformLoadSchedule() : NonConformLoadGroup(nullptr) {}; -NonConformLoadSchedule::~NonConformLoadSchedule() {}; +NonConformLoadSchedule::NonConformLoadSchedule() : NonConformLoadGroup(nullptr) {} +NonConformLoadSchedule::~NonConformLoadSchedule() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ NonConformLoadSchedule::getPossibleProfilesForAttributes() const return map; } - - bool assign_NonConformLoadGroup_NonConformLoadSchedules(BaseClass*, BaseClass*); bool assign_NonConformLoadSchedule_NonConformLoadGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_NonConformLoadSchedule_NonConformLoadGroup(BaseClass* BaseClass_ptr1 return false; } - bool get_NonConformLoadSchedule_NonConformLoadGroup(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const NonConformLoadSchedule* element = dynamic_cast(BaseClass_ptr1)) + const NonConformLoadSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->NonConformLoadGroup != 0) { @@ -73,7 +71,6 @@ bool get_NonConformLoadSchedule_NonConformLoadGroup(const BaseClass* BaseClass_p return false; } - const char NonConformLoadSchedule::debugName[] = "NonConformLoadSchedule"; const char* NonConformLoadSchedule::debugString() const { @@ -82,7 +79,7 @@ const char* NonConformLoadSchedule::debugString() const void NonConformLoadSchedule::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:NonConformLoadSchedule"), &NonConformLoadSchedule_factory)); + factory_map.emplace("cim:NonConformLoadSchedule", &NonConformLoadSchedule_factory); } void NonConformLoadSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void NonConformLoadSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:NonConformLoadSchedule.NonConformLoadGroup"), &assign_NonConformLoadSchedule_NonConformLoadGroup)); + assign_map.emplace("cim:NonConformLoadSchedule.NonConformLoadGroup", &assign_NonConformLoadSchedule_NonConformLoadGroup); } void NonConformLoadSchedule::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/NonConformLoadSchedule.hpp b/CGMES_2.4.15_16FEB2016/NonConformLoadSchedule.hpp index be2f843db..c0ae51ebb 100644 --- a/CGMES_2.4.15_16FEB2016/NonConformLoadSchedule.hpp +++ b/CGMES_2.4.15_16FEB2016/NonConformLoadSchedule.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class NonConformLoadGroup; - /* - An active power (Y1-axis) and reactive power (Y2-axis) schedule (curves) versus time (X-axis) for non-conforming loads, e.g., large industrial load or power station service (where modeled). - */ + /** \brief An active power (Y1-axis) and reactive power (Y2-axis) schedule (curves) versus time (X-axis) for non-conforming loads, e.g., large industrial load or power station service (where modeled). */ class NonConformLoadSchedule : public SeasonDayTypeSchedule { public: @@ -27,7 +25,8 @@ namespace CIMPP NonConformLoadSchedule(); ~NonConformLoadSchedule() override; - CIMPP::NonConformLoadGroup* NonConformLoadGroup; /* The NonConformLoadGroup where the NonConformLoadSchedule belongs. Default: 0 */ + /** \brief The NonConformLoadGroup where the NonConformLoadSchedule belongs. Default: 0 */ + CIMPP::NonConformLoadGroup* NonConformLoadGroup; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/NonlinearShuntCompensator.cpp b/CGMES_2.4.15_16FEB2016/NonlinearShuntCompensator.cpp index 13f02ad2f..5fd272895 100644 --- a/CGMES_2.4.15_16FEB2016/NonlinearShuntCompensator.cpp +++ b/CGMES_2.4.15_16FEB2016/NonlinearShuntCompensator.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -NonlinearShuntCompensator::NonlinearShuntCompensator() {}; -NonlinearShuntCompensator::~NonlinearShuntCompensator() {}; +NonlinearShuntCompensator::NonlinearShuntCompensator() {} +NonlinearShuntCompensator::~NonlinearShuntCompensator() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ NonlinearShuntCompensator::getPossibleProfilesForAttributes() const return map; } - - bool assign_NonlinearShuntCompensatorPoint_NonlinearShuntCompensator(BaseClass*, BaseClass*); bool assign_NonlinearShuntCompensator_NonlinearShuntCompensatorPoints(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,7 +59,6 @@ bool assign_NonlinearShuntCompensator_NonlinearShuntCompensatorPoints(BaseClass* } - const char NonlinearShuntCompensator::debugName[] = "NonlinearShuntCompensator"; const char* NonlinearShuntCompensator::debugString() const { @@ -70,7 +67,7 @@ const char* NonlinearShuntCompensator::debugString() const void NonlinearShuntCompensator::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensator"), &NonlinearShuntCompensator_factory)); + factory_map.emplace("cim:NonlinearShuntCompensator", &NonlinearShuntCompensator_factory); } void NonlinearShuntCompensator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -79,7 +76,7 @@ void NonlinearShuntCompensator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensator.NonlinearShuntCompensatorPoints"), &assign_NonlinearShuntCompensator_NonlinearShuntCompensatorPoints)); + assign_map.emplace("cim:NonlinearShuntCompensator.NonlinearShuntCompensatorPoints", &assign_NonlinearShuntCompensator_NonlinearShuntCompensatorPoints); } void NonlinearShuntCompensator::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/NonlinearShuntCompensator.hpp b/CGMES_2.4.15_16FEB2016/NonlinearShuntCompensator.hpp index c67ea0fa6..c39f1cb1f 100644 --- a/CGMES_2.4.15_16FEB2016/NonlinearShuntCompensator.hpp +++ b/CGMES_2.4.15_16FEB2016/NonlinearShuntCompensator.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class NonlinearShuntCompensatorPoint; - /* - A non linear shunt compensator has bank or section admittance values that differs. - */ + /** \brief A non linear shunt compensator has bank or section admittance values that differs. */ class NonlinearShuntCompensator : public ShuntCompensator { public: @@ -27,7 +25,8 @@ namespace CIMPP NonlinearShuntCompensator(); ~NonlinearShuntCompensator() override; - std::list NonlinearShuntCompensatorPoints; /* All points of the non-linear shunt compensator. Default: 0 */ + /** \brief All points of the non-linear shunt compensator. Default: 0 */ + std::list NonlinearShuntCompensatorPoints; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/NonlinearShuntCompensatorPoint.cpp b/CGMES_2.4.15_16FEB2016/NonlinearShuntCompensatorPoint.cpp index 527cb2218..39f049438 100644 --- a/CGMES_2.4.15_16FEB2016/NonlinearShuntCompensatorPoint.cpp +++ b/CGMES_2.4.15_16FEB2016/NonlinearShuntCompensatorPoint.cpp @@ -9,16 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "NonlinearShuntCompensator.hpp" -#include "Susceptance.hpp" -#include "Susceptance.hpp" -#include "Conductance.hpp" -#include "Conductance.hpp" -#include "Integer.hpp" using namespace CIMPP; -NonlinearShuntCompensatorPoint::NonlinearShuntCompensatorPoint() : NonlinearShuntCompensator(nullptr) {}; -NonlinearShuntCompensatorPoint::~NonlinearShuntCompensatorPoint() {}; +NonlinearShuntCompensatorPoint::NonlinearShuntCompensatorPoint() : NonlinearShuntCompensator(nullptr) {} +NonlinearShuntCompensatorPoint::~NonlinearShuntCompensatorPoint() {} static const std::list PossibleProfilesForClass = { @@ -50,93 +45,111 @@ NonlinearShuntCompensatorPoint::getPossibleProfilesForAttributes() const return map; } +bool assign_NonlinearShuntCompensator_NonlinearShuntCompensatorPoints(BaseClass*, BaseClass*); +bool assign_NonlinearShuntCompensatorPoint_NonlinearShuntCompensator(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + NonlinearShuntCompensator* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->NonlinearShuntCompensator != element2) + { + element->NonlinearShuntCompensator = element2; + return assign_NonlinearShuntCompensator_NonlinearShuntCompensatorPoints(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_NonlinearShuntCompensatorPoint_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_NonlinearShuntCompensatorPoint_b(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_NonlinearShuntCompensatorPoint_b0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_NonlinearShuntCompensatorPoint_b0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_NonlinearShuntCompensatorPoint_g(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_NonlinearShuntCompensatorPoint_g(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_NonlinearShuntCompensatorPoint_g0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_NonlinearShuntCompensatorPoint_g0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_NonlinearShuntCompensatorPoint_sectionNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_NonlinearShuntCompensatorPoint_sectionNumber(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->sectionNumber; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_NonlinearShuntCompensator_NonlinearShuntCompensatorPoints(BaseClass*, BaseClass*); -bool assign_NonlinearShuntCompensatorPoint_NonlinearShuntCompensator(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_NonlinearShuntCompensatorPoint_NonlinearShuntCompensator(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); - NonlinearShuntCompensator* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->NonlinearShuntCompensator != element2) + if (element->NonlinearShuntCompensator != 0) { - element->NonlinearShuntCompensator = element2; - return assign_NonlinearShuntCompensator_NonlinearShuntCompensatorPoints(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->NonlinearShuntCompensator); + return true; } - return true; } return false; } bool get_NonlinearShuntCompensatorPoint_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b; if (!buffer.str().empty()) @@ -150,7 +163,8 @@ bool get_NonlinearShuntCompensatorPoint_b(const BaseClass* BaseClass_ptr1, std:: bool get_NonlinearShuntCompensatorPoint_b0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b0; if (!buffer.str().empty()) @@ -164,7 +178,8 @@ bool get_NonlinearShuntCompensatorPoint_b0(const BaseClass* BaseClass_ptr1, std: bool get_NonlinearShuntCompensatorPoint_g(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g; if (!buffer.str().empty()) @@ -178,7 +193,8 @@ bool get_NonlinearShuntCompensatorPoint_g(const BaseClass* BaseClass_ptr1, std:: bool get_NonlinearShuntCompensatorPoint_g0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g0; if (!buffer.str().empty()) @@ -192,7 +208,8 @@ bool get_NonlinearShuntCompensatorPoint_g0(const BaseClass* BaseClass_ptr1, std: bool get_NonlinearShuntCompensatorPoint_sectionNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->sectionNumber; if (!buffer.str().empty()) @@ -204,21 +221,6 @@ bool get_NonlinearShuntCompensatorPoint_sectionNumber(const BaseClass* BaseClass return false; } - -bool get_NonlinearShuntCompensatorPoint_NonlinearShuntCompensator(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->NonlinearShuntCompensator != 0) - { - BaseClass_list.push_back(element->NonlinearShuntCompensator); - return true; - } - } - return false; -} - - const char NonlinearShuntCompensatorPoint::debugName[] = "NonlinearShuntCompensatorPoint"; const char* NonlinearShuntCompensatorPoint::debugString() const { @@ -227,21 +229,21 @@ const char* NonlinearShuntCompensatorPoint::debugString() const void NonlinearShuntCompensatorPoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensatorPoint"), &NonlinearShuntCompensatorPoint_factory)); + factory_map.emplace("cim:NonlinearShuntCompensatorPoint", &NonlinearShuntCompensatorPoint_factory); } void NonlinearShuntCompensatorPoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensatorPoint.b"), &assign_NonlinearShuntCompensatorPoint_b)); - assign_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensatorPoint.b0"), &assign_NonlinearShuntCompensatorPoint_b0)); - assign_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensatorPoint.g"), &assign_NonlinearShuntCompensatorPoint_g)); - assign_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensatorPoint.g0"), &assign_NonlinearShuntCompensatorPoint_g0)); - assign_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensatorPoint.sectionNumber"), &assign_NonlinearShuntCompensatorPoint_sectionNumber)); + assign_map.emplace("cim:NonlinearShuntCompensatorPoint.b", &assign_NonlinearShuntCompensatorPoint_b); + assign_map.emplace("cim:NonlinearShuntCompensatorPoint.b0", &assign_NonlinearShuntCompensatorPoint_b0); + assign_map.emplace("cim:NonlinearShuntCompensatorPoint.g", &assign_NonlinearShuntCompensatorPoint_g); + assign_map.emplace("cim:NonlinearShuntCompensatorPoint.g0", &assign_NonlinearShuntCompensatorPoint_g0); + assign_map.emplace("cim:NonlinearShuntCompensatorPoint.sectionNumber", &assign_NonlinearShuntCompensatorPoint_sectionNumber); } void NonlinearShuntCompensatorPoint::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensatorPoint.NonlinearShuntCompensator"), &assign_NonlinearShuntCompensatorPoint_NonlinearShuntCompensator)); + assign_map.emplace("cim:NonlinearShuntCompensatorPoint.NonlinearShuntCompensator", &assign_NonlinearShuntCompensatorPoint_NonlinearShuntCompensator); } void NonlinearShuntCompensatorPoint::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/NonlinearShuntCompensatorPoint.hpp b/CGMES_2.4.15_16FEB2016/NonlinearShuntCompensatorPoint.hpp index 7eaca08db..eaf108691 100644 --- a/CGMES_2.4.15_16FEB2016/NonlinearShuntCompensatorPoint.hpp +++ b/CGMES_2.4.15_16FEB2016/NonlinearShuntCompensatorPoint.hpp @@ -20,9 +20,7 @@ namespace CIMPP { class NonlinearShuntCompensator; - /* - A non linear shunt compensator bank or section admittance value. - */ + /** \brief A non linear shunt compensator bank or section admittance value. */ class NonlinearShuntCompensatorPoint : public BaseClass { public: @@ -30,12 +28,23 @@ namespace CIMPP NonlinearShuntCompensatorPoint(); ~NonlinearShuntCompensatorPoint() override; - CIMPP::NonlinearShuntCompensator* NonlinearShuntCompensator; /* Non-linear shunt compensator owning this point. Default: 0 */ - CIMPP::Susceptance b; /* Positive sequence shunt (charging) susceptance per section Default: nullptr */ - CIMPP::Susceptance b0; /* Zero sequence shunt (charging) susceptance per section Default: nullptr */ - CIMPP::Conductance g; /* Positive sequence shunt (charging) conductance per section Default: nullptr */ - CIMPP::Conductance g0; /* Zero sequence shunt (charging) conductance per section Default: nullptr */ - CIMPP::Integer sectionNumber; /* The number of the section. Default: 0 */ + /** \brief Non-linear shunt compensator owning this point. Default: 0 */ + CIMPP::NonlinearShuntCompensator* NonlinearShuntCompensator; + + /** \brief Positive sequence shunt (charging) susceptance per section Default: nullptr */ + CIMPP::Susceptance b; + + /** \brief Zero sequence shunt (charging) susceptance per section Default: nullptr */ + CIMPP::Susceptance b0; + + /** \brief Positive sequence shunt (charging) conductance per section Default: nullptr */ + CIMPP::Conductance g; + + /** \brief Zero sequence shunt (charging) conductance per section Default: nullptr */ + CIMPP::Conductance g0; + + /** \brief The number of the section. Default: 0 */ + CIMPP::Integer sectionNumber; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/NuclearGeneratingUnit.cpp b/CGMES_2.4.15_16FEB2016/NuclearGeneratingUnit.cpp index 9e3fcec38..3ce0ed75a 100644 --- a/CGMES_2.4.15_16FEB2016/NuclearGeneratingUnit.cpp +++ b/CGMES_2.4.15_16FEB2016/NuclearGeneratingUnit.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -NuclearGeneratingUnit::NuclearGeneratingUnit() {}; -NuclearGeneratingUnit::~NuclearGeneratingUnit() {}; +NuclearGeneratingUnit::NuclearGeneratingUnit() {} +NuclearGeneratingUnit::~NuclearGeneratingUnit() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ NuclearGeneratingUnit::getPossibleProfilesForAttributes() const return map; } - - - - - const char NuclearGeneratingUnit::debugName[] = "NuclearGeneratingUnit"; const char* NuclearGeneratingUnit::debugString() const { @@ -52,7 +47,7 @@ const char* NuclearGeneratingUnit::debugString() const void NuclearGeneratingUnit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:NuclearGeneratingUnit"), &NuclearGeneratingUnit_factory)); + factory_map.emplace("cim:NuclearGeneratingUnit", &NuclearGeneratingUnit_factory); } void NuclearGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/NuclearGeneratingUnit.hpp b/CGMES_2.4.15_16FEB2016/NuclearGeneratingUnit.hpp index 4ee5186cd..81ab7cd3d 100644 --- a/CGMES_2.4.15_16FEB2016/NuclearGeneratingUnit.hpp +++ b/CGMES_2.4.15_16FEB2016/NuclearGeneratingUnit.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A nuclear generating unit. - */ + /** \brief A nuclear generating unit. */ class NuclearGeneratingUnit : public GeneratingUnit { public: @@ -26,7 +24,6 @@ namespace CIMPP NuclearGeneratingUnit(); ~NuclearGeneratingUnit() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/OperationalLimit.cpp b/CGMES_2.4.15_16FEB2016/OperationalLimit.cpp index c32b84037..2f6e5f3f8 100644 --- a/CGMES_2.4.15_16FEB2016/OperationalLimit.cpp +++ b/CGMES_2.4.15_16FEB2016/OperationalLimit.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -OperationalLimit::OperationalLimit() : OperationalLimitSet(nullptr), OperationalLimitType(nullptr) {}; -OperationalLimit::~OperationalLimit() {}; +OperationalLimit::OperationalLimit() : OperationalLimitSet(nullptr), OperationalLimitType(nullptr) {} +OperationalLimit::~OperationalLimit() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ OperationalLimit::getPossibleProfilesForAttributes() const return map; } - - bool assign_OperationalLimitSet_OperationalLimitValue(BaseClass*, BaseClass*); bool assign_OperationalLimit_OperationalLimitSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_OperationalLimit_OperationalLimitSet(BaseClass* BaseClass_ptr1, Base } return false; } + bool assign_OperationalLimitType_OperationalLimit(BaseClass*, BaseClass*); bool assign_OperationalLimit_OperationalLimitType(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_OperationalLimit_OperationalLimitType(BaseClass* BaseClass_ptr1, Bas return false; } - bool get_OperationalLimit_OperationalLimitSet(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const OperationalLimit* element = dynamic_cast(BaseClass_ptr1)) + const OperationalLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->OperationalLimitSet != 0) { @@ -93,7 +92,8 @@ bool get_OperationalLimit_OperationalLimitSet(const BaseClass* BaseClass_ptr1, s bool get_OperationalLimit_OperationalLimitType(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const OperationalLimit* element = dynamic_cast(BaseClass_ptr1)) + const OperationalLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->OperationalLimitType != 0) { @@ -104,7 +104,6 @@ bool get_OperationalLimit_OperationalLimitType(const BaseClass* BaseClass_ptr1, return false; } - const char OperationalLimit::debugName[] = "OperationalLimit"; const char* OperationalLimit::debugString() const { @@ -113,7 +112,7 @@ const char* OperationalLimit::debugString() const void OperationalLimit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:OperationalLimit"), &OperationalLimit_factory)); + factory_map.emplace("cim:OperationalLimit", &OperationalLimit_factory); } void OperationalLimit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void OperationalLimit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OperationalLimit.OperationalLimitSet"), &assign_OperationalLimit_OperationalLimitSet)); - assign_map.insert(std::make_pair(std::string("cim:OperationalLimit.OperationalLimitType"), &assign_OperationalLimit_OperationalLimitType)); + assign_map.emplace("cim:OperationalLimit.OperationalLimitSet", &assign_OperationalLimit_OperationalLimitSet); + assign_map.emplace("cim:OperationalLimit.OperationalLimitType", &assign_OperationalLimit_OperationalLimitType); } void OperationalLimit::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/OperationalLimit.hpp b/CGMES_2.4.15_16FEB2016/OperationalLimit.hpp index 2d67bbf7a..1e167b812 100644 --- a/CGMES_2.4.15_16FEB2016/OperationalLimit.hpp +++ b/CGMES_2.4.15_16FEB2016/OperationalLimit.hpp @@ -18,9 +18,7 @@ namespace CIMPP class OperationalLimitSet; class OperationalLimitType; - /* - A value associated with a specific kind of limit. The sub class value attribute shall be positive. The sub class value attribute is inversely proportional to OperationalLimitType.acceptableDuration (acceptableDuration for short). A pair of value_x and acceptableDuration_x are related to each other as follows: if value_1 > value_2 > value_3 >... then acceptableDuration_1 < acceptableDuration_2 < acceptableDuration_3 < ... A value_x with direction="high" shall be greater than a value_y with direction="low". - */ + /** \brief A value associated with a specific kind of limit. The sub class value attribute shall be positive. The sub class value attribute is inversely proportional to OperationalLimitType.acceptableDuration (acceptableDuration for short). A pair of value_x and acceptableDuration_x are related to each other as follows: if value_1 > value_2 > value_3 >... then acceptableDuration_1 < acceptableDuration_2 < acceptableDuration_3 < ... A value_x with direction="high" shall be greater than a value_y with direction="low". */ class OperationalLimit : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP OperationalLimit(); ~OperationalLimit() override; - CIMPP::OperationalLimitSet* OperationalLimitSet; /* Values of equipment limits. Default: 0 */ - CIMPP::OperationalLimitType* OperationalLimitType; /* The limit type associated with this limit. Default: 0 */ + /** \brief Values of equipment limits. Default: 0 */ + CIMPP::OperationalLimitSet* OperationalLimitSet; + + /** \brief The limit type associated with this limit. Default: 0 */ + CIMPP::OperationalLimitType* OperationalLimitType; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/OperationalLimitDirectionKind.cpp b/CGMES_2.4.15_16FEB2016/OperationalLimitDirectionKind.cpp index 4aeb56e6d..77fce153e 100644 --- a/CGMES_2.4.15_16FEB2016/OperationalLimitDirectionKind.cpp +++ b/CGMES_2.4.15_16FEB2016/OperationalLimitDirectionKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "OperationalLimitDirectionKind") + if (EnumSymbol.substr(0, pos) != "OperationalLimitDirectionKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "high") + if (EnumSymbol == "high") { rop = OperationalLimitDirectionKind::high; return lop; } - if(EnumSymbol == "low") + if (EnumSymbol == "low") { rop = OperationalLimitDirectionKind::low; return lop; } - if(EnumSymbol == "absoluteValue") + if (EnumSymbol == "absoluteValue") { rop = OperationalLimitDirectionKind::absoluteValue; return lop; diff --git a/CGMES_2.4.15_16FEB2016/OperationalLimitDirectionKind.hpp b/CGMES_2.4.15_16FEB2016/OperationalLimitDirectionKind.hpp index 33d23f39a..295417e17 100644 --- a/CGMES_2.4.15_16FEB2016/OperationalLimitDirectionKind.hpp +++ b/CGMES_2.4.15_16FEB2016/OperationalLimitDirectionKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The direction attribute describes the side of a limit that is a violation. - */ + /** \brief The direction attribute describes the side of a limit that is a violation. */ class OperationalLimitDirectionKind { public: enum OperationalLimitDirectionKind_ENUM { - /** - * High means that a monitored value above the limit value is a violation. If applied to a terminal flow, the positive direction is into the terminal. - */ + /** High means that a monitored value above the limit value is a violation. If applied to a terminal flow, the positive direction is into the terminal. */ high, - /** - * Low means a monitored value below the limit is a violation. If applied to a terminal flow, the positive direction is into the terminal. - */ + /** Low means a monitored value below the limit is a violation. If applied to a terminal flow, the positive direction is into the terminal. */ low, - /** - * An absoluteValue limit means that a monitored absolute value above the limit value is a violation. - */ + /** An absoluteValue limit means that a monitored absolute value above the limit value is a violation. */ absoluteValue, }; diff --git a/CGMES_2.4.15_16FEB2016/OperationalLimitSet.cpp b/CGMES_2.4.15_16FEB2016/OperationalLimitSet.cpp index 615a0edcd..b2d24e3d4 100644 --- a/CGMES_2.4.15_16FEB2016/OperationalLimitSet.cpp +++ b/CGMES_2.4.15_16FEB2016/OperationalLimitSet.cpp @@ -8,14 +8,14 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include +#include "ACDCTerminal.hpp" #include "Equipment.hpp" #include "OperationalLimit.hpp" -#include "ACDCTerminal.hpp" using namespace CIMPP; -OperationalLimitSet::OperationalLimitSet() : Equipment(nullptr), Terminal(nullptr) {}; -OperationalLimitSet::~OperationalLimitSet() {}; +OperationalLimitSet::OperationalLimitSet() : Equipment(nullptr), Terminal(nullptr) {} +OperationalLimitSet::~OperationalLimitSet() {} static const std::list PossibleProfilesForClass = { @@ -44,8 +44,6 @@ OperationalLimitSet::getPossibleProfilesForAttributes() const return map; } - - bool assign_Equipment_OperationalLimitSet(BaseClass*, BaseClass*); bool assign_OperationalLimitSet_Equipment(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -62,6 +60,7 @@ bool assign_OperationalLimitSet_Equipment(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_OperationalLimit_OperationalLimitSet(BaseClass*, BaseClass*); bool assign_OperationalLimitSet_OperationalLimitValue(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -78,6 +77,7 @@ bool assign_OperationalLimitSet_OperationalLimitValue(BaseClass* BaseClass_ptr1, } return false; } + bool assign_ACDCTerminal_OperationalLimitSet(BaseClass*, BaseClass*); bool assign_OperationalLimitSet_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -95,10 +95,10 @@ bool assign_OperationalLimitSet_Terminal(BaseClass* BaseClass_ptr1, BaseClass* B return false; } - bool get_OperationalLimitSet_Equipment(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const OperationalLimitSet* element = dynamic_cast(BaseClass_ptr1)) + const OperationalLimitSet* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Equipment != 0) { @@ -109,9 +109,11 @@ bool get_OperationalLimitSet_Equipment(const BaseClass* BaseClass_ptr1, std::lis return false; } + bool get_OperationalLimitSet_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const OperationalLimitSet* element = dynamic_cast(BaseClass_ptr1)) + const OperationalLimitSet* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Terminal != 0) { @@ -122,7 +124,6 @@ bool get_OperationalLimitSet_Terminal(const BaseClass* BaseClass_ptr1, std::list return false; } - const char OperationalLimitSet::debugName[] = "OperationalLimitSet"; const char* OperationalLimitSet::debugString() const { @@ -131,7 +132,7 @@ const char* OperationalLimitSet::debugString() const void OperationalLimitSet::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:OperationalLimitSet"), &OperationalLimitSet_factory)); + factory_map.emplace("cim:OperationalLimitSet", &OperationalLimitSet_factory); } void OperationalLimitSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -140,9 +141,9 @@ void OperationalLimitSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OperationalLimitSet.Equipment"), &assign_OperationalLimitSet_Equipment)); - assign_map.insert(std::make_pair(std::string("cim:OperationalLimitSet.OperationalLimitValue"), &assign_OperationalLimitSet_OperationalLimitValue)); - assign_map.insert(std::make_pair(std::string("cim:OperationalLimitSet.Terminal"), &assign_OperationalLimitSet_Terminal)); + assign_map.emplace("cim:OperationalLimitSet.Equipment", &assign_OperationalLimitSet_Equipment); + assign_map.emplace("cim:OperationalLimitSet.OperationalLimitValue", &assign_OperationalLimitSet_OperationalLimitValue); + assign_map.emplace("cim:OperationalLimitSet.Terminal", &assign_OperationalLimitSet_Terminal); } void OperationalLimitSet::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/OperationalLimitSet.hpp b/CGMES_2.4.15_16FEB2016/OperationalLimitSet.hpp index 4c968db6d..97bb28d50 100644 --- a/CGMES_2.4.15_16FEB2016/OperationalLimitSet.hpp +++ b/CGMES_2.4.15_16FEB2016/OperationalLimitSet.hpp @@ -19,9 +19,7 @@ namespace CIMPP class Equipment; class OperationalLimit; - /* - A set of limits associated with equipment. Sets of limits might apply to a specific temperature, or season for example. A set of limits may contain different severities of limit levels that would apply to the same equipment. The set may contain limits of different types such as apparent power and current limits or high and low voltage limits that are logically applied together as a set. - */ + /** \brief A set of limits associated with equipment. Sets of limits might apply to a specific temperature, or season for example. A set of limits may contain different severities of limit levels that would apply to the same equipment. The set may contain limits of different types such as apparent power and current limits or high and low voltage limits that are logically applied together as a set. */ class OperationalLimitSet : public IdentifiedObject { public: @@ -29,9 +27,14 @@ namespace CIMPP OperationalLimitSet(); ~OperationalLimitSet() override; - CIMPP::Equipment* Equipment; /* The equipment to which the limit set applies. Default: 0 */ - std::list OperationalLimitValue; /* The limit set to which the limit values belong. Default: 0 */ - CIMPP::ACDCTerminal* Terminal; /* Default: 0 */ + /** \brief The equipment to which the limit set applies. Default: 0 */ + CIMPP::Equipment* Equipment; + + /** \brief The limit set to which the limit values belong. Default: 0 */ + std::list OperationalLimitValue; + + /** \brief Default: 0 */ + CIMPP::ACDCTerminal* Terminal; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/OperationalLimitType.cpp b/CGMES_2.4.15_16FEB2016/OperationalLimitType.cpp index 5f9534fef..d487e6145 100644 --- a/CGMES_2.4.15_16FEB2016/OperationalLimitType.cpp +++ b/CGMES_2.4.15_16FEB2016/OperationalLimitType.cpp @@ -9,14 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "OperationalLimit.hpp" -#include "Seconds.hpp" -#include "OperationalLimitDirectionKind.hpp" -#include "LimitTypeKind.hpp" using namespace CIMPP; -OperationalLimitType::OperationalLimitType() {}; -OperationalLimitType::~OperationalLimitType() {}; +OperationalLimitType::OperationalLimitType() {} +OperationalLimitType::~OperationalLimitType() {} static const std::list PossibleProfilesForClass = { @@ -46,67 +43,70 @@ OperationalLimitType::getPossibleProfilesForAttributes() const return map; } - -bool assign_OperationalLimitType_acceptableDuration(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OperationalLimit_OperationalLimitType(BaseClass*, BaseClass*); +bool assign_OperationalLimitType_OperationalLimit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (OperationalLimitType* element = dynamic_cast(BaseClass_ptr1)) + OperationalLimitType* element = dynamic_cast(BaseClass_ptr1); + OperationalLimit* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->acceptableDuration; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->OperationalLimit.begin(), element->OperationalLimit.end(), element2) == element->OperationalLimit.end()) + { + element->OperationalLimit.push_back(element2); + return assign_OperationalLimit_OperationalLimitType(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_OperationalLimitType_direction(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OperationalLimitType_acceptableDuration(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OperationalLimitType* element = dynamic_cast(BaseClass_ptr1)) + OperationalLimitType* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->direction; - if (buffer.fail()) - return false; - else + buffer >> element->acceptableDuration; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OperationalLimitType_limitType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OperationalLimitType_direction(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OperationalLimitType* element = dynamic_cast(BaseClass_ptr1)) + OperationalLimitType* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->limitType; - if (buffer.fail()) - return false; - else + buffer >> element->direction; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_OperationalLimit_OperationalLimitType(BaseClass*, BaseClass*); -bool assign_OperationalLimitType_OperationalLimit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_OperationalLimitType_limitType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { OperationalLimitType* element = dynamic_cast(BaseClass_ptr1); - OperationalLimit* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->OperationalLimit.begin(), element->OperationalLimit.end(), element2) == element->OperationalLimit.end()) + buffer >> element->limitType; + if (!buffer.fail()) { - element->OperationalLimit.push_back(element2); - return assign_OperationalLimit_OperationalLimitType(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_OperationalLimitType_acceptableDuration(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OperationalLimitType* element = dynamic_cast(BaseClass_ptr1)) + const OperationalLimitType* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->acceptableDuration; if (!buffer.str().empty()) @@ -118,11 +118,10 @@ bool get_OperationalLimitType_acceptableDuration(const BaseClass* BaseClass_ptr1 return false; } - - bool get_OperationalLimitType_direction(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OperationalLimitType* element = dynamic_cast(BaseClass_ptr1)) + const OperationalLimitType* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->direction; if (!buffer.str().empty()) @@ -136,7 +135,8 @@ bool get_OperationalLimitType_direction(const BaseClass* BaseClass_ptr1, std::st bool get_OperationalLimitType_limitType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OperationalLimitType* element = dynamic_cast(BaseClass_ptr1)) + const OperationalLimitType* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->limitType; if (!buffer.str().empty()) @@ -156,19 +156,19 @@ const char* OperationalLimitType::debugString() const void OperationalLimitType::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:OperationalLimitType"), &OperationalLimitType_factory)); + factory_map.emplace("cim:OperationalLimitType", &OperationalLimitType_factory); } void OperationalLimitType::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OperationalLimitType.acceptableDuration"), &assign_OperationalLimitType_acceptableDuration)); - assign_map.insert(std::make_pair(std::string("cim:OperationalLimitType.direction"), &assign_OperationalLimitType_direction)); - assign_map.insert(std::make_pair(std::string("cim:OperationalLimitType.limitType"), &assign_OperationalLimitType_limitType)); + assign_map.emplace("cim:OperationalLimitType.acceptableDuration", &assign_OperationalLimitType_acceptableDuration); + assign_map.emplace("cim:OperationalLimitType.direction", &assign_OperationalLimitType_direction); + assign_map.emplace("cim:OperationalLimitType.limitType", &assign_OperationalLimitType_limitType); } void OperationalLimitType::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OperationalLimitType.OperationalLimit"), &assign_OperationalLimitType_OperationalLimit)); + assign_map.emplace("cim:OperationalLimitType.OperationalLimit", &assign_OperationalLimitType_OperationalLimit); } void OperationalLimitType::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/OperationalLimitType.hpp b/CGMES_2.4.15_16FEB2016/OperationalLimitType.hpp index 5ff8db6ab..3b07eb447 100644 --- a/CGMES_2.4.15_16FEB2016/OperationalLimitType.hpp +++ b/CGMES_2.4.15_16FEB2016/OperationalLimitType.hpp @@ -20,9 +20,7 @@ namespace CIMPP { class OperationalLimit; - /* - The operational meaning of a category of limits. - */ + /** \brief The operational meaning of a category of limits. */ class OperationalLimitType : public IdentifiedObject { public: @@ -30,10 +28,17 @@ namespace CIMPP OperationalLimitType(); ~OperationalLimitType() override; - std::list OperationalLimit; /* The operational limits associated with this type of limit. Default: 0 */ - CIMPP::Seconds acceptableDuration; /* The nominal acceptable duration of the limit. Limits are commonly expressed in terms of the a time limit for which the limit is normally acceptable. The actual acceptable duration of a specific limit may depend on other local factors such as temperature or wind speed. Default: nullptr */ - CIMPP::OperationalLimitDirectionKind direction; /* The direction of the limit. Default: 0 */ - CIMPP::LimitTypeKind limitType; /* Types of limits defined in the ENTSO-E Operational Handbook Policy 3. Default: 0 */ + /** \brief The operational limits associated with this type of limit. Default: 0 */ + std::list OperationalLimit; + + /** \brief The nominal acceptable duration of the limit. Limits are commonly expressed in terms of the a time limit for which the limit is normally acceptable. The actual acceptable duration of a specific limit may depend on other local factors such as temperature or wind speed. Default: nullptr */ + CIMPP::Seconds acceptableDuration; + + /** \brief The direction of the limit. Default: 0 */ + CIMPP::OperationalLimitDirectionKind direction; + + /** \brief Types of limits defined in the ENTSO-E Operational Handbook Policy 3. Default: 0 */ + CIMPP::LimitTypeKind limitType; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/OrientationKind.cpp b/CGMES_2.4.15_16FEB2016/OrientationKind.cpp index e02a50057..ea4f69b21 100644 --- a/CGMES_2.4.15_16FEB2016/OrientationKind.cpp +++ b/CGMES_2.4.15_16FEB2016/OrientationKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "OrientationKind") + if (EnumSymbol.substr(0, pos) != "OrientationKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,7 +50,7 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "negative") + if (EnumSymbol == "negative") { rop = OrientationKind::negative; return lop; diff --git a/CGMES_2.4.15_16FEB2016/OrientationKind.hpp b/CGMES_2.4.15_16FEB2016/OrientationKind.hpp index 0ab661444..4666948b8 100644 --- a/CGMES_2.4.15_16FEB2016/OrientationKind.hpp +++ b/CGMES_2.4.15_16FEB2016/OrientationKind.hpp @@ -9,17 +9,13 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The orientation of the coordinate system with respect to top, left, and the coordinate number system. - */ + /** \brief The orientation of the coordinate system with respect to top, left, and the coordinate number system. */ class OrientationKind { public: enum OrientationKind_ENUM { - /** - * For 2D diagrams, a negative orientation gives the left-hand orientation (favoured by computer graphics displays) with X values increasing from left to right and Y values increasing from top to bottom. This is also known as a left hand orientation. - */ + /** For 2D diagrams, a negative orientation gives the left-hand orientation (favoured by computer graphics displays) with X values increasing from left to right and Y values increasing from top to bottom. This is also known as a left hand orientation. */ negative, }; diff --git a/CGMES_2.4.15_16FEB2016/OverexcLim2.cpp b/CGMES_2.4.15_16FEB2016/OverexcLim2.cpp index 72fdf8856..2e9009b9b 100644 --- a/CGMES_2.4.15_16FEB2016/OverexcLim2.cpp +++ b/CGMES_2.4.15_16FEB2016/OverexcLim2.cpp @@ -8,15 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -OverexcLim2::OverexcLim2() {}; -OverexcLim2::~OverexcLim2() {}; +OverexcLim2::OverexcLim2() {} +OverexcLim2::~OverexcLim2() {} static const std::list PossibleProfilesForClass = { @@ -46,64 +42,66 @@ OverexcLim2::getPossibleProfilesForAttributes() const return map; } - -bool assign_OverexcLim2_ifdlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLim2_ifdlim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLim2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ifdlim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLim2_koi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLim2_koi(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLim2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->koi; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLim2_voimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLim2_voimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLim2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->voimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLim2_voimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLim2_voimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLim2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->voimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_OverexcLim2_ifdlim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLim2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ifdlim; if (!buffer.str().empty()) @@ -117,7 +115,8 @@ bool get_OverexcLim2_ifdlim(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_OverexcLim2_koi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLim2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->koi; if (!buffer.str().empty()) @@ -131,7 +130,8 @@ bool get_OverexcLim2_koi(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_OverexcLim2_voimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLim2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->voimax; if (!buffer.str().empty()) @@ -145,7 +145,8 @@ bool get_OverexcLim2_voimax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_OverexcLim2_voimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLim2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->voimin; if (!buffer.str().empty()) @@ -157,8 +158,6 @@ bool get_OverexcLim2_voimin(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char OverexcLim2::debugName[] = "OverexcLim2"; const char* OverexcLim2::debugString() const { @@ -167,15 +166,15 @@ const char* OverexcLim2::debugString() const void OverexcLim2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:OverexcLim2"), &OverexcLim2_factory)); + factory_map.emplace("cim:OverexcLim2", &OverexcLim2_factory); } void OverexcLim2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OverexcLim2.ifdlim"), &assign_OverexcLim2_ifdlim)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLim2.koi"), &assign_OverexcLim2_koi)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLim2.voimax"), &assign_OverexcLim2_voimax)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLim2.voimin"), &assign_OverexcLim2_voimin)); + assign_map.emplace("cim:OverexcLim2.ifdlim", &assign_OverexcLim2_ifdlim); + assign_map.emplace("cim:OverexcLim2.koi", &assign_OverexcLim2_koi); + assign_map.emplace("cim:OverexcLim2.voimax", &assign_OverexcLim2_voimax); + assign_map.emplace("cim:OverexcLim2.voimin", &assign_OverexcLim2_voimin); } void OverexcLim2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/OverexcLim2.hpp b/CGMES_2.4.15_16FEB2016/OverexcLim2.hpp index 1160df132..0278bfc7e 100644 --- a/CGMES_2.4.15_16FEB2016/OverexcLim2.hpp +++ b/CGMES_2.4.15_16FEB2016/OverexcLim2.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Different from LimIEEEOEL, LimOEL2 has a fixed pickup threshold and reduces the excitation set-point by mean of non-windup integral regulator. Irated is the rated machine excitation current (calculated from nameplate conditions: V, P, CosPhi). - */ + /** \brief Different from LimIEEEOEL, LimOEL2 has a fixed pickup threshold and reduces the excitation set-point by mean of non-windup integral regulator. Irated is the rated machine excitation current (calculated from nameplate conditions: V, P, CosPhi). */ class OverexcLim2 : public OverexcitationLimiterDynamics { public: @@ -27,10 +25,17 @@ namespace CIMPP OverexcLim2(); ~OverexcLim2() override; - CIMPP::PU ifdlim; /* Limit value of rated field current (I). Typical Value = 1.05. Default: nullptr */ - CIMPP::PU koi; /* Gain Over excitation limiter (K). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU voimax; /* Maximum error signal (V). Typical Value = 0. Default: nullptr */ - CIMPP::PU voimin; /* Minimum error signal (V). Typical Value = -9999. Default: nullptr */ + /** \brief Limit value of rated field current (I). Typical Value = 1.05. Default: nullptr */ + CIMPP::PU ifdlim; + + /** \brief Gain Over excitation limiter (K). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU koi; + + /** \brief Maximum error signal (V). Typical Value = 0. Default: nullptr */ + CIMPP::PU voimax; + + /** \brief Minimum error signal (V). Typical Value = -9999. Default: nullptr */ + CIMPP::PU voimin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/OverexcLimIEEE.cpp b/CGMES_2.4.15_16FEB2016/OverexcLimIEEE.cpp index 5c44ec73e..0fb3e9857 100644 --- a/CGMES_2.4.15_16FEB2016/OverexcLimIEEE.cpp +++ b/CGMES_2.4.15_16FEB2016/OverexcLimIEEE.cpp @@ -8,17 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -OverexcLimIEEE::OverexcLimIEEE() {}; -OverexcLimIEEE::~OverexcLimIEEE() {}; +OverexcLimIEEE::OverexcLimIEEE() {} +OverexcLimIEEE::~OverexcLimIEEE() {} static const std::list PossibleProfilesForClass = { @@ -50,90 +44,94 @@ OverexcLimIEEE::getPossibleProfilesForAttributes() const return map; } - -bool assign_OverexcLimIEEE_hyst(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimIEEE_hyst(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->hyst; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimIEEE_ifdlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimIEEE_ifdlim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ifdlim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimIEEE_ifdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimIEEE_ifdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ifdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimIEEE_itfpu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimIEEE_itfpu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->itfpu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimIEEE_kcd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimIEEE_kcd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kcd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimIEEE_kramp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimIEEE_kramp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kramp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_OverexcLimIEEE_hyst(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hyst; if (!buffer.str().empty()) @@ -147,7 +145,8 @@ bool get_OverexcLimIEEE_hyst(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_OverexcLimIEEE_ifdlim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ifdlim; if (!buffer.str().empty()) @@ -161,7 +160,8 @@ bool get_OverexcLimIEEE_ifdlim(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_OverexcLimIEEE_ifdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ifdmax; if (!buffer.str().empty()) @@ -175,7 +175,8 @@ bool get_OverexcLimIEEE_ifdmax(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_OverexcLimIEEE_itfpu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->itfpu; if (!buffer.str().empty()) @@ -189,7 +190,8 @@ bool get_OverexcLimIEEE_itfpu(const BaseClass* BaseClass_ptr1, std::stringstream bool get_OverexcLimIEEE_kcd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kcd; if (!buffer.str().empty()) @@ -203,7 +205,8 @@ bool get_OverexcLimIEEE_kcd(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_OverexcLimIEEE_kramp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kramp; if (!buffer.str().empty()) @@ -215,8 +218,6 @@ bool get_OverexcLimIEEE_kramp(const BaseClass* BaseClass_ptr1, std::stringstream return false; } - - const char OverexcLimIEEE::debugName[] = "OverexcLimIEEE"; const char* OverexcLimIEEE::debugString() const { @@ -225,17 +226,17 @@ const char* OverexcLimIEEE::debugString() const void OverexcLimIEEE::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:OverexcLimIEEE"), &OverexcLimIEEE_factory)); + factory_map.emplace("cim:OverexcLimIEEE", &OverexcLimIEEE_factory); } void OverexcLimIEEE::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OverexcLimIEEE.hyst"), &assign_OverexcLimIEEE_hyst)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimIEEE.ifdlim"), &assign_OverexcLimIEEE_ifdlim)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimIEEE.ifdmax"), &assign_OverexcLimIEEE_ifdmax)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimIEEE.itfpu"), &assign_OverexcLimIEEE_itfpu)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimIEEE.kcd"), &assign_OverexcLimIEEE_kcd)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimIEEE.kramp"), &assign_OverexcLimIEEE_kramp)); + assign_map.emplace("cim:OverexcLimIEEE.hyst", &assign_OverexcLimIEEE_hyst); + assign_map.emplace("cim:OverexcLimIEEE.ifdlim", &assign_OverexcLimIEEE_ifdlim); + assign_map.emplace("cim:OverexcLimIEEE.ifdmax", &assign_OverexcLimIEEE_ifdmax); + assign_map.emplace("cim:OverexcLimIEEE.itfpu", &assign_OverexcLimIEEE_itfpu); + assign_map.emplace("cim:OverexcLimIEEE.kcd", &assign_OverexcLimIEEE_kcd); + assign_map.emplace("cim:OverexcLimIEEE.kramp", &assign_OverexcLimIEEE_kramp); } void OverexcLimIEEE::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/OverexcLimIEEE.hpp b/CGMES_2.4.15_16FEB2016/OverexcLimIEEE.hpp index 6159231e3..de8e58374 100644 --- a/CGMES_2.4.15_16FEB2016/OverexcLimIEEE.hpp +++ b/CGMES_2.4.15_16FEB2016/OverexcLimIEEE.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The over excitation limiter model is intended to represent the significant features of OELs necessary for some large-scale system studies. It is the result of a pragmatic approach to obtain a model that can be widely applied with attainable data from generator owners. An attempt to include all variations in the functionality of OELs and duplicate how they interact with the rest of the excitation systems would likely result in a level of application insufficient for the studies for which they are intended. Reference: IEEE OEL 421.5-2005 Section 9. - */ + /** \brief The over excitation limiter model is intended to represent the significant features of OELs necessary for some large-scale system studies. It is the result of a pragmatic approach to obtain a model that can be widely applied with attainable data from generator owners. An attempt to include all variations in the functionality of OELs and duplicate how they interact with the rest of the excitation systems would likely result in a level of application insufficient for the studies for which they are intended. Reference: IEEE OEL 421.5-2005 Section 9. */ class OverexcLimIEEE : public OverexcitationLimiterDynamics { public: @@ -28,12 +26,23 @@ namespace CIMPP OverexcLimIEEE(); ~OverexcLimIEEE() override; - CIMPP::PU hyst; /* OEL pickup/drop-out hysteresis (HYST). Typical Value = 0.03. Default: nullptr */ - CIMPP::PU ifdlim; /* OEL timed field current limit (I). Typical Value = 1.05. Default: nullptr */ - CIMPP::PU ifdmax; /* OEL instantaneous field current limit (I). Typical Value = 1.5. Default: nullptr */ - CIMPP::PU itfpu; /* OEL timed field current limiter pickup level (I). Typical Value = 1.05. Default: nullptr */ - CIMPP::PU kcd; /* OEL cooldown gain (K). Typical Value = 1. Default: nullptr */ - CIMPP::Simple_Float kramp; /* OEL ramped limit rate (K). Unit = PU/sec. Typical Value = 10. Default: nullptr */ + /** \brief OEL pickup/drop-out hysteresis (HYST). Typical Value = 0.03. Default: nullptr */ + CIMPP::PU hyst; + + /** \brief OEL timed field current limit (I). Typical Value = 1.05. Default: nullptr */ + CIMPP::PU ifdlim; + + /** \brief OEL instantaneous field current limit (I). Typical Value = 1.5. Default: nullptr */ + CIMPP::PU ifdmax; + + /** \brief OEL timed field current limiter pickup level (I). Typical Value = 1.05. Default: nullptr */ + CIMPP::PU itfpu; + + /** \brief OEL cooldown gain (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU kcd; + + /** \brief OEL ramped limit rate (K). Unit = PU/sec. Typical Value = 10. Default: nullptr */ + CIMPP::Simple_Float kramp; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/OverexcLimX1.cpp b/CGMES_2.4.15_16FEB2016/OverexcLimX1.cpp index 626fe56e4..c299b0d73 100644 --- a/CGMES_2.4.15_16FEB2016/OverexcLimX1.cpp +++ b/CGMES_2.4.15_16FEB2016/OverexcLimX1.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" using namespace CIMPP; -OverexcLimX1::OverexcLimX1() {}; -OverexcLimX1::~OverexcLimX1() {}; +OverexcLimX1::OverexcLimX1() {} +OverexcLimX1::~OverexcLimX1() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ OverexcLimX1::getPossibleProfilesForAttributes() const return map; } - -bool assign_OverexcLimX1_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX1_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX1_efd3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_efd3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX1_efddes(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_efddes(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efddes; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX1_efdrated(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_efdrated(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdrated; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX1_kmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_kmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX1_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX1_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX1_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX1_vlow(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_vlow(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vlow; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_OverexcLimX1_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_OverexcLimX1_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_OverexcLimX1_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_OverexcLimX1_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_OverexcLimX1_efd3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd3; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_OverexcLimX1_efd3(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_OverexcLimX1_efddes(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efddes; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_OverexcLimX1_efddes(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_OverexcLimX1_efdrated(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdrated; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_OverexcLimX1_efdrated(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_OverexcLimX1_kmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kmx; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_OverexcLimX1_kmx(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_OverexcLimX1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_OverexcLimX1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_OverexcLimX1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_OverexcLimX1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_OverexcLimX1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_OverexcLimX1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_OverexcLimX1_vlow(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vlow; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_OverexcLimX1_vlow(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char OverexcLimX1::debugName[] = "OverexcLimX1"; const char* OverexcLimX1::debugString() const { @@ -341,21 +346,21 @@ const char* OverexcLimX1::debugString() const void OverexcLimX1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:OverexcLimX1"), &OverexcLimX1_factory)); + factory_map.emplace("cim:OverexcLimX1", &OverexcLimX1_factory); } void OverexcLimX1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.efd1"), &assign_OverexcLimX1_efd1)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.efd2"), &assign_OverexcLimX1_efd2)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.efd3"), &assign_OverexcLimX1_efd3)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.efddes"), &assign_OverexcLimX1_efddes)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.efdrated"), &assign_OverexcLimX1_efdrated)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.kmx"), &assign_OverexcLimX1_kmx)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.t1"), &assign_OverexcLimX1_t1)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.t2"), &assign_OverexcLimX1_t2)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.t3"), &assign_OverexcLimX1_t3)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.vlow"), &assign_OverexcLimX1_vlow)); + assign_map.emplace("cim:OverexcLimX1.efd1", &assign_OverexcLimX1_efd1); + assign_map.emplace("cim:OverexcLimX1.efd2", &assign_OverexcLimX1_efd2); + assign_map.emplace("cim:OverexcLimX1.efd3", &assign_OverexcLimX1_efd3); + assign_map.emplace("cim:OverexcLimX1.efddes", &assign_OverexcLimX1_efddes); + assign_map.emplace("cim:OverexcLimX1.efdrated", &assign_OverexcLimX1_efdrated); + assign_map.emplace("cim:OverexcLimX1.kmx", &assign_OverexcLimX1_kmx); + assign_map.emplace("cim:OverexcLimX1.t1", &assign_OverexcLimX1_t1); + assign_map.emplace("cim:OverexcLimX1.t2", &assign_OverexcLimX1_t2); + assign_map.emplace("cim:OverexcLimX1.t3", &assign_OverexcLimX1_t3); + assign_map.emplace("cim:OverexcLimX1.vlow", &assign_OverexcLimX1_vlow); } void OverexcLimX1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/OverexcLimX1.hpp b/CGMES_2.4.15_16FEB2016/OverexcLimX1.hpp index f49d083aa..b0ac52a6c 100644 --- a/CGMES_2.4.15_16FEB2016/OverexcLimX1.hpp +++ b/CGMES_2.4.15_16FEB2016/OverexcLimX1.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Field voltage over excitation limiter. - */ + /** \brief Field voltage over excitation limiter. */ class OverexcLimX1 : public OverexcitationLimiterDynamics { public: @@ -28,16 +26,35 @@ namespace CIMPP OverexcLimX1(); ~OverexcLimX1() override; - CIMPP::PU efd1; /* Low voltage point on the inverse time characteristic (EFD). Typical Value = 1.1. Default: nullptr */ - CIMPP::PU efd2; /* Mid voltage point on the inverse time characteristic (EFD). Typical Value = 1.2. Default: nullptr */ - CIMPP::PU efd3; /* High voltage point on the inverse time characteristic (EFD). Typical Value = 1.5. Default: nullptr */ - CIMPP::PU efddes; /* Desired field voltage (EFD). Typical Value = 0.9. Default: nullptr */ - CIMPP::PU efdrated; /* Rated field voltage (EFD). Typical Value = 1.05. Default: nullptr */ - CIMPP::PU kmx; /* Gain (K). Typical Value = 0.01. Default: nullptr */ - CIMPP::Seconds t1; /* Time to trip the exciter at the low voltage point on the inverse time characteristic (TIME). Typical Value = 120. Default: nullptr */ - CIMPP::Seconds t2; /* Time to trip the exciter at the mid voltage point on the inverse time characteristic (TIME). Typical Value = 40. Default: nullptr */ - CIMPP::Seconds t3; /* Time to trip the exciter at the high voltage point on the inverse time characteristic (TIME). Typical Value = 15. Default: nullptr */ - CIMPP::PU vlow; /* Low voltage limit (V) (>0). Default: nullptr */ + /** \brief Low voltage point on the inverse time characteristic (EFD). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Mid voltage point on the inverse time characteristic (EFD). Typical Value = 1.2. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief High voltage point on the inverse time characteristic (EFD). Typical Value = 1.5. Default: nullptr */ + CIMPP::PU efd3; + + /** \brief Desired field voltage (EFD). Typical Value = 0.9. Default: nullptr */ + CIMPP::PU efddes; + + /** \brief Rated field voltage (EFD). Typical Value = 1.05. Default: nullptr */ + CIMPP::PU efdrated; + + /** \brief Gain (K). Typical Value = 0.01. Default: nullptr */ + CIMPP::PU kmx; + + /** \brief Time to trip the exciter at the low voltage point on the inverse time characteristic (TIME). Typical Value = 120. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Time to trip the exciter at the mid voltage point on the inverse time characteristic (TIME). Typical Value = 40. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Time to trip the exciter at the high voltage point on the inverse time characteristic (TIME). Typical Value = 15. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Low voltage limit (V) (>0). Default: nullptr */ + CIMPP::PU vlow; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/OverexcLimX2.cpp b/CGMES_2.4.15_16FEB2016/OverexcLimX2.cpp index 687643215..0a0443e80 100644 --- a/CGMES_2.4.15_16FEB2016/OverexcLimX2.cpp +++ b/CGMES_2.4.15_16FEB2016/OverexcLimX2.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" using namespace CIMPP; -OverexcLimX2::OverexcLimX2() {}; -OverexcLimX2::~OverexcLimX2() {}; +OverexcLimX2::OverexcLimX2() {} +OverexcLimX2::~OverexcLimX2() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ OverexcLimX2::getPossibleProfilesForAttributes() const return map; } - -bool assign_OverexcLimX2_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_efd3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_efd3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_efddes(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_efddes(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efddes; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_efdrated(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_efdrated(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdrated; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_kmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_kmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_m(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_m(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->m; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_vlow(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_vlow(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vlow; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_OverexcLimX2_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_OverexcLimX2_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_OverexcLimX2_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_OverexcLimX2_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_OverexcLimX2_efd3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd3; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_OverexcLimX2_efd3(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_OverexcLimX2_efddes(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efddes; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_OverexcLimX2_efddes(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_OverexcLimX2_efdrated(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdrated; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_OverexcLimX2_efdrated(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_OverexcLimX2_kmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kmx; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_OverexcLimX2_kmx(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_OverexcLimX2_m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->m; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_OverexcLimX2_m(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_OverexcLimX2_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_OverexcLimX2_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_OverexcLimX2_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_OverexcLimX2_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_OverexcLimX2_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_OverexcLimX2_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_OverexcLimX2_vlow(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vlow; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_OverexcLimX2_vlow(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char OverexcLimX2::debugName[] = "OverexcLimX2"; const char* OverexcLimX2::debugString() const { @@ -370,22 +376,22 @@ const char* OverexcLimX2::debugString() const void OverexcLimX2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:OverexcLimX2"), &OverexcLimX2_factory)); + factory_map.emplace("cim:OverexcLimX2", &OverexcLimX2_factory); } void OverexcLimX2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.efd1"), &assign_OverexcLimX2_efd1)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.efd2"), &assign_OverexcLimX2_efd2)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.efd3"), &assign_OverexcLimX2_efd3)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.efddes"), &assign_OverexcLimX2_efddes)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.efdrated"), &assign_OverexcLimX2_efdrated)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.kmx"), &assign_OverexcLimX2_kmx)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.m"), &assign_OverexcLimX2_m)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.t1"), &assign_OverexcLimX2_t1)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.t2"), &assign_OverexcLimX2_t2)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.t3"), &assign_OverexcLimX2_t3)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.vlow"), &assign_OverexcLimX2_vlow)); + assign_map.emplace("cim:OverexcLimX2.efd1", &assign_OverexcLimX2_efd1); + assign_map.emplace("cim:OverexcLimX2.efd2", &assign_OverexcLimX2_efd2); + assign_map.emplace("cim:OverexcLimX2.efd3", &assign_OverexcLimX2_efd3); + assign_map.emplace("cim:OverexcLimX2.efddes", &assign_OverexcLimX2_efddes); + assign_map.emplace("cim:OverexcLimX2.efdrated", &assign_OverexcLimX2_efdrated); + assign_map.emplace("cim:OverexcLimX2.kmx", &assign_OverexcLimX2_kmx); + assign_map.emplace("cim:OverexcLimX2.m", &assign_OverexcLimX2_m); + assign_map.emplace("cim:OverexcLimX2.t1", &assign_OverexcLimX2_t1); + assign_map.emplace("cim:OverexcLimX2.t2", &assign_OverexcLimX2_t2); + assign_map.emplace("cim:OverexcLimX2.t3", &assign_OverexcLimX2_t3); + assign_map.emplace("cim:OverexcLimX2.vlow", &assign_OverexcLimX2_vlow); } void OverexcLimX2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/OverexcLimX2.hpp b/CGMES_2.4.15_16FEB2016/OverexcLimX2.hpp index dc1b719b4..c361d076c 100644 --- a/CGMES_2.4.15_16FEB2016/OverexcLimX2.hpp +++ b/CGMES_2.4.15_16FEB2016/OverexcLimX2.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Field Voltage or Current overexcitation limiter designed to protect the generator field of an AC machine with automatic excitation control from overheating due to prolonged overexcitation. - */ + /** \brief Field Voltage or Current overexcitation limiter designed to protect the generator field of an AC machine with automatic excitation control from overheating due to prolonged overexcitation. */ class OverexcLimX2 : public OverexcitationLimiterDynamics { public: @@ -29,17 +27,38 @@ namespace CIMPP OverexcLimX2(); ~OverexcLimX2() override; - CIMPP::PU efd1; /* Low voltage or current point on the inverse time characteristic (EFD). Typical Value = 1.1. Default: nullptr */ - CIMPP::PU efd2; /* Mid voltage or current point on the inverse time characteristic (EFD). Typical Value = 1.2. Default: nullptr */ - CIMPP::PU efd3; /* High voltage or current point on the inverse time characteristic (EFD). Typical Value = 1.5. Default: nullptr */ - CIMPP::PU efddes; /* Desired field voltage if m=F or field current if m=T (EFD). Typical Value = 1. Default: nullptr */ - CIMPP::PU efdrated; /* Rated field voltage if m=F or field current if m=T (EFD). Typical Value = 1.05. Default: nullptr */ - CIMPP::PU kmx; /* Gain (K). Typical Value = 0.002. Default: nullptr */ - CIMPP::Boolean m; /* (m). true = IFD limiting false = EFD limiting. Default: false */ - CIMPP::Seconds t1; /* Time to trip the exciter at the low voltage or current point on the inverse time characteristic (TIME). Typical Value = 120. Default: nullptr */ - CIMPP::Seconds t2; /* Time to trip the exciter at the mid voltage or current point on the inverse time characteristic (TIME). Typical Value = 40. Default: nullptr */ - CIMPP::Seconds t3; /* Time to trip the exciter at the high voltage or current point on the inverse time characteristic (TIME). Typical Value = 15. Default: nullptr */ - CIMPP::PU vlow; /* Low voltage limit (V) (>0). Default: nullptr */ + /** \brief Low voltage or current point on the inverse time characteristic (EFD). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Mid voltage or current point on the inverse time characteristic (EFD). Typical Value = 1.2. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief High voltage or current point on the inverse time characteristic (EFD). Typical Value = 1.5. Default: nullptr */ + CIMPP::PU efd3; + + /** \brief Desired field voltage if m=F or field current if m=T (EFD). Typical Value = 1. Default: nullptr */ + CIMPP::PU efddes; + + /** \brief Rated field voltage if m=F or field current if m=T (EFD). Typical Value = 1.05. Default: nullptr */ + CIMPP::PU efdrated; + + /** \brief Gain (K). Typical Value = 0.002. Default: nullptr */ + CIMPP::PU kmx; + + /** \brief (m). true = IFD limiting false = EFD limiting. Default: false */ + CIMPP::Boolean m; + + /** \brief Time to trip the exciter at the low voltage or current point on the inverse time characteristic (TIME). Typical Value = 120. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Time to trip the exciter at the mid voltage or current point on the inverse time characteristic (TIME). Typical Value = 40. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Time to trip the exciter at the high voltage or current point on the inverse time characteristic (TIME). Typical Value = 15. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Low voltage limit (V) (>0). Default: nullptr */ + CIMPP::PU vlow; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/OverexcitationLimiterDynamics.cpp b/CGMES_2.4.15_16FEB2016/OverexcitationLimiterDynamics.cpp index d21fcf0aa..bab89ee82 100644 --- a/CGMES_2.4.15_16FEB2016/OverexcitationLimiterDynamics.cpp +++ b/CGMES_2.4.15_16FEB2016/OverexcitationLimiterDynamics.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -OverexcitationLimiterDynamics::OverexcitationLimiterDynamics() : ExcitationSystemDynamics(nullptr) {}; -OverexcitationLimiterDynamics::~OverexcitationLimiterDynamics() {}; +OverexcitationLimiterDynamics::OverexcitationLimiterDynamics() : ExcitationSystemDynamics(nullptr) {} +OverexcitationLimiterDynamics::~OverexcitationLimiterDynamics() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ OverexcitationLimiterDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_ExcitationSystemDynamics_OverexcitationLimiterDynamics(BaseClass*, BaseClass*); bool assign_OverexcitationLimiterDynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_OverexcitationLimiterDynamics_ExcitationSystemDynamics(BaseClass* Ba return false; } - bool get_OverexcitationLimiterDynamics_ExcitationSystemDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const OverexcitationLimiterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const OverexcitationLimiterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ExcitationSystemDynamics != 0) { @@ -73,7 +71,6 @@ bool get_OverexcitationLimiterDynamics_ExcitationSystemDynamics(const BaseClass* return false; } - const char OverexcitationLimiterDynamics::debugName[] = "OverexcitationLimiterDynamics"; const char* OverexcitationLimiterDynamics::debugString() const { @@ -82,7 +79,7 @@ const char* OverexcitationLimiterDynamics::debugString() const void OverexcitationLimiterDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:OverexcitationLimiterDynamics"), &OverexcitationLimiterDynamics_factory)); + factory_map.emplace("cim:OverexcitationLimiterDynamics", &OverexcitationLimiterDynamics_factory); } void OverexcitationLimiterDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void OverexcitationLimiterDynamics::addPrimitiveAssignFnsToMap(std::unordered_ma void OverexcitationLimiterDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OverexcitationLimiterDynamics.ExcitationSystemDynamics"), &assign_OverexcitationLimiterDynamics_ExcitationSystemDynamics)); + assign_map.emplace("cim:OverexcitationLimiterDynamics.ExcitationSystemDynamics", &assign_OverexcitationLimiterDynamics_ExcitationSystemDynamics); } void OverexcitationLimiterDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/OverexcitationLimiterDynamics.hpp b/CGMES_2.4.15_16FEB2016/OverexcitationLimiterDynamics.hpp index eb6bbd80b..ec4713524 100644 --- a/CGMES_2.4.15_16FEB2016/OverexcitationLimiterDynamics.hpp +++ b/CGMES_2.4.15_16FEB2016/OverexcitationLimiterDynamics.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class ExcitationSystemDynamics; - /* - Overexcitation limiter function block whose behaviour is described by reference to a standard model - */ + /** \brief Overexcitation limiter function block whose behaviour is described by reference to a standard model */ class OverexcitationLimiterDynamics : public DynamicsFunctionBlock { public: @@ -27,7 +25,8 @@ namespace CIMPP OverexcitationLimiterDynamics(); ~OverexcitationLimiterDynamics() override; - CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; /* Excitation system model with which this overexcitation limiter model is associated. Default: 0 */ + /** \brief Excitation system model with which this overexcitation limiter model is associated. Default: 0 */ + CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/OverexcitationLimiterUserDefined.cpp b/CGMES_2.4.15_16FEB2016/OverexcitationLimiterUserDefined.cpp index d5969a0f7..18a97fc36 100644 --- a/CGMES_2.4.15_16FEB2016/OverexcitationLimiterUserDefined.cpp +++ b/CGMES_2.4.15_16FEB2016/OverexcitationLimiterUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -OverexcitationLimiterUserDefined::OverexcitationLimiterUserDefined() {}; -OverexcitationLimiterUserDefined::~OverexcitationLimiterUserDefined() {}; +OverexcitationLimiterUserDefined::OverexcitationLimiterUserDefined() {} +OverexcitationLimiterUserDefined::~OverexcitationLimiterUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ OverexcitationLimiterUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_OverexcitationLimiterUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (OverexcitationLimiterUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_OverexcitationLimiterUserDefined(BaseClass*, BaseClass*); bool assign_OverexcitationLimiterUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_OverexcitationLimiterUserDefined_ProprietaryParameterDynamics(BaseCl return false; } +bool assign_OverexcitationLimiterUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + OverexcitationLimiterUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_OverexcitationLimiterUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcitationLimiterUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const OverexcitationLimiterUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_OverexcitationLimiterUserDefined_proprietary(const BaseClass* BaseClass return false; } - - const char OverexcitationLimiterUserDefined::debugName[] = "OverexcitationLimiterUserDefined"; const char* OverexcitationLimiterUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* OverexcitationLimiterUserDefined::debugString() const void OverexcitationLimiterUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:OverexcitationLimiterUserDefined"), &OverexcitationLimiterUserDefined_factory)); + factory_map.emplace("cim:OverexcitationLimiterUserDefined", &OverexcitationLimiterUserDefined_factory); } void OverexcitationLimiterUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OverexcitationLimiterUserDefined.proprietary"), &assign_OverexcitationLimiterUserDefined_proprietary)); + assign_map.emplace("cim:OverexcitationLimiterUserDefined.proprietary", &assign_OverexcitationLimiterUserDefined_proprietary); } void OverexcitationLimiterUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OverexcitationLimiterUserDefined.ProprietaryParameterDynamics"), &assign_OverexcitationLimiterUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:OverexcitationLimiterUserDefined.ProprietaryParameterDynamics", &assign_OverexcitationLimiterUserDefined_ProprietaryParameterDynamics); } void OverexcitationLimiterUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/OverexcitationLimiterUserDefined.hpp b/CGMES_2.4.15_16FEB2016/OverexcitationLimiterUserDefined.hpp index 66680b8f8..385c02fb4 100644 --- a/CGMES_2.4.15_16FEB2016/OverexcitationLimiterUserDefined.hpp +++ b/CGMES_2.4.15_16FEB2016/OverexcitationLimiterUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Overexcitation limiter system function block whose dynamic behaviour is described by - */ + /** \brief Overexcitation limiter system function block whose dynamic behaviour is described by */ class OverexcitationLimiterUserDefined : public OverexcitationLimiterDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP OverexcitationLimiterUserDefined(); ~OverexcitationLimiterUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/PFVArControllerType1Dynamics.cpp b/CGMES_2.4.15_16FEB2016/PFVArControllerType1Dynamics.cpp index 544174545..a9e1de1b5 100644 --- a/CGMES_2.4.15_16FEB2016/PFVArControllerType1Dynamics.cpp +++ b/CGMES_2.4.15_16FEB2016/PFVArControllerType1Dynamics.cpp @@ -14,8 +14,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -PFVArControllerType1Dynamics::PFVArControllerType1Dynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr), VoltageAdjusterDynamics(nullptr) {}; -PFVArControllerType1Dynamics::~PFVArControllerType1Dynamics() {}; +PFVArControllerType1Dynamics::PFVArControllerType1Dynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr), VoltageAdjusterDynamics(nullptr) {} +PFVArControllerType1Dynamics::~PFVArControllerType1Dynamics() {} static const std::list PossibleProfilesForClass = { @@ -44,8 +44,6 @@ PFVArControllerType1Dynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_ExcitationSystemDynamics_PFVArControllerType1Dynamics(BaseClass*, BaseClass*); bool assign_PFVArControllerType1Dynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -62,6 +60,7 @@ bool assign_PFVArControllerType1Dynamics_ExcitationSystemDynamics(BaseClass* Bas } return false; } + bool assign_RemoteInputSignal_PFVArControllerType1Dynamics(BaseClass*, BaseClass*); bool assign_PFVArControllerType1Dynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -78,6 +77,7 @@ bool assign_PFVArControllerType1Dynamics_RemoteInputSignal(BaseClass* BaseClass_ } return false; } + bool assign_VoltageAdjusterDynamics_PFVArControllerType1Dynamics(BaseClass*, BaseClass*); bool assign_PFVArControllerType1Dynamics_VoltageAdjusterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -95,10 +95,10 @@ bool assign_PFVArControllerType1Dynamics_VoltageAdjusterDynamics(BaseClass* Base return false; } - bool get_PFVArControllerType1Dynamics_ExcitationSystemDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const PFVArControllerType1Dynamics* element = dynamic_cast(BaseClass_ptr1)) + const PFVArControllerType1Dynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ExcitationSystemDynamics != 0) { @@ -110,6 +110,7 @@ bool get_PFVArControllerType1Dynamics_ExcitationSystemDynamics(const BaseClass* } + const char PFVArControllerType1Dynamics::debugName[] = "PFVArControllerType1Dynamics"; const char* PFVArControllerType1Dynamics::debugString() const { @@ -118,7 +119,7 @@ const char* PFVArControllerType1Dynamics::debugString() const void PFVArControllerType1Dynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PFVArControllerType1Dynamics"), &PFVArControllerType1Dynamics_factory)); + factory_map.emplace("cim:PFVArControllerType1Dynamics", &PFVArControllerType1Dynamics_factory); } void PFVArControllerType1Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -127,9 +128,9 @@ void PFVArControllerType1Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map void PFVArControllerType1Dynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType1Dynamics.ExcitationSystemDynamics"), &assign_PFVArControllerType1Dynamics_ExcitationSystemDynamics)); - assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType1Dynamics.RemoteInputSignal"), &assign_PFVArControllerType1Dynamics_RemoteInputSignal)); - assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType1Dynamics.VoltageAdjusterDynamics"), &assign_PFVArControllerType1Dynamics_VoltageAdjusterDynamics)); + assign_map.emplace("cim:PFVArControllerType1Dynamics.ExcitationSystemDynamics", &assign_PFVArControllerType1Dynamics_ExcitationSystemDynamics); + assign_map.emplace("cim:PFVArControllerType1Dynamics.RemoteInputSignal", &assign_PFVArControllerType1Dynamics_RemoteInputSignal); + assign_map.emplace("cim:PFVArControllerType1Dynamics.VoltageAdjusterDynamics", &assign_PFVArControllerType1Dynamics_VoltageAdjusterDynamics); } void PFVArControllerType1Dynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/PFVArControllerType1Dynamics.hpp b/CGMES_2.4.15_16FEB2016/PFVArControllerType1Dynamics.hpp index e9005ed20..722dc238b 100644 --- a/CGMES_2.4.15_16FEB2016/PFVArControllerType1Dynamics.hpp +++ b/CGMES_2.4.15_16FEB2016/PFVArControllerType1Dynamics.hpp @@ -19,9 +19,7 @@ namespace CIMPP class RemoteInputSignal; class VoltageAdjusterDynamics; - /* - Power Factor or VAr controller Type I function block whose behaviour is described by reference to a standard model - */ + /** \brief Power Factor or VAr controller Type I function block whose behaviour is described by reference to a standard model */ class PFVArControllerType1Dynamics : public DynamicsFunctionBlock { public: @@ -29,9 +27,14 @@ namespace CIMPP PFVArControllerType1Dynamics(); ~PFVArControllerType1Dynamics() override; - CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; /* Excitation system model with which this Power Factor or VAr controller Type I model is associated. Default: 0 */ - CIMPP::RemoteInputSignal* RemoteInputSignal; /* Remote input signal used by this Power Factor or VAr controller Type I model. Default: 0 */ - CIMPP::VoltageAdjusterDynamics* VoltageAdjusterDynamics; /* Voltage adjuster model associated with this Power Factor or VA controller Type I model. Default: 0 */ + /** \brief Excitation system model with which this Power Factor or VAr controller Type I model is associated. Default: 0 */ + CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; + + /** \brief Remote input signal used by this Power Factor or VAr controller Type I model. Default: 0 */ + CIMPP::RemoteInputSignal* RemoteInputSignal; + + /** \brief Voltage adjuster model associated with this Power Factor or VA controller Type I model. Default: 0 */ + CIMPP::VoltageAdjusterDynamics* VoltageAdjusterDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/PFVArControllerType1UserDefined.cpp b/CGMES_2.4.15_16FEB2016/PFVArControllerType1UserDefined.cpp index e539e26f4..10b773647 100644 --- a/CGMES_2.4.15_16FEB2016/PFVArControllerType1UserDefined.cpp +++ b/CGMES_2.4.15_16FEB2016/PFVArControllerType1UserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -PFVArControllerType1UserDefined::PFVArControllerType1UserDefined() {}; -PFVArControllerType1UserDefined::~PFVArControllerType1UserDefined() {}; +PFVArControllerType1UserDefined::PFVArControllerType1UserDefined() {} +PFVArControllerType1UserDefined::~PFVArControllerType1UserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ PFVArControllerType1UserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_PFVArControllerType1UserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (PFVArControllerType1UserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_PFVArControllerType1UserDefined(BaseClass*, BaseClass*); bool assign_PFVArControllerType1UserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_PFVArControllerType1UserDefined_ProprietaryParameterDynamics(BaseCla return false; } +bool assign_PFVArControllerType1UserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + PFVArControllerType1UserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_PFVArControllerType1UserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArControllerType1UserDefined* element = dynamic_cast(BaseClass_ptr1)) + const PFVArControllerType1UserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_PFVArControllerType1UserDefined_proprietary(const BaseClass* BaseClass_ return false; } - - const char PFVArControllerType1UserDefined::debugName[] = "PFVArControllerType1UserDefined"; const char* PFVArControllerType1UserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* PFVArControllerType1UserDefined::debugString() const void PFVArControllerType1UserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PFVArControllerType1UserDefined"), &PFVArControllerType1UserDefined_factory)); + factory_map.emplace("cim:PFVArControllerType1UserDefined", &PFVArControllerType1UserDefined_factory); } void PFVArControllerType1UserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType1UserDefined.proprietary"), &assign_PFVArControllerType1UserDefined_proprietary)); + assign_map.emplace("cim:PFVArControllerType1UserDefined.proprietary", &assign_PFVArControllerType1UserDefined_proprietary); } void PFVArControllerType1UserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType1UserDefined.ProprietaryParameterDynamics"), &assign_PFVArControllerType1UserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:PFVArControllerType1UserDefined.ProprietaryParameterDynamics", &assign_PFVArControllerType1UserDefined_ProprietaryParameterDynamics); } void PFVArControllerType1UserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/PFVArControllerType1UserDefined.hpp b/CGMES_2.4.15_16FEB2016/PFVArControllerType1UserDefined.hpp index 8fe7e1e23..c324b0c9f 100644 --- a/CGMES_2.4.15_16FEB2016/PFVArControllerType1UserDefined.hpp +++ b/CGMES_2.4.15_16FEB2016/PFVArControllerType1UserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Power Factor or VAr controller Type I function block whose dynamic behaviour is described by - */ + /** \brief Power Factor or VAr controller Type I function block whose dynamic behaviour is described by */ class PFVArControllerType1UserDefined : public PFVArControllerType1Dynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP PFVArControllerType1UserDefined(); ~PFVArControllerType1UserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/PFVArControllerType2Dynamics.cpp b/CGMES_2.4.15_16FEB2016/PFVArControllerType2Dynamics.cpp index c595f575a..e6c875b3a 100644 --- a/CGMES_2.4.15_16FEB2016/PFVArControllerType2Dynamics.cpp +++ b/CGMES_2.4.15_16FEB2016/PFVArControllerType2Dynamics.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -PFVArControllerType2Dynamics::PFVArControllerType2Dynamics() : ExcitationSystemDynamics(nullptr) {}; -PFVArControllerType2Dynamics::~PFVArControllerType2Dynamics() {}; +PFVArControllerType2Dynamics::PFVArControllerType2Dynamics() : ExcitationSystemDynamics(nullptr) {} +PFVArControllerType2Dynamics::~PFVArControllerType2Dynamics() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ PFVArControllerType2Dynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_ExcitationSystemDynamics_PFVArControllerType2Dynamics(BaseClass*, BaseClass*); bool assign_PFVArControllerType2Dynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_PFVArControllerType2Dynamics_ExcitationSystemDynamics(BaseClass* Bas return false; } - bool get_PFVArControllerType2Dynamics_ExcitationSystemDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const PFVArControllerType2Dynamics* element = dynamic_cast(BaseClass_ptr1)) + const PFVArControllerType2Dynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ExcitationSystemDynamics != 0) { @@ -73,7 +71,6 @@ bool get_PFVArControllerType2Dynamics_ExcitationSystemDynamics(const BaseClass* return false; } - const char PFVArControllerType2Dynamics::debugName[] = "PFVArControllerType2Dynamics"; const char* PFVArControllerType2Dynamics::debugString() const { @@ -82,7 +79,7 @@ const char* PFVArControllerType2Dynamics::debugString() const void PFVArControllerType2Dynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PFVArControllerType2Dynamics"), &PFVArControllerType2Dynamics_factory)); + factory_map.emplace("cim:PFVArControllerType2Dynamics", &PFVArControllerType2Dynamics_factory); } void PFVArControllerType2Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void PFVArControllerType2Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map void PFVArControllerType2Dynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType2Dynamics.ExcitationSystemDynamics"), &assign_PFVArControllerType2Dynamics_ExcitationSystemDynamics)); + assign_map.emplace("cim:PFVArControllerType2Dynamics.ExcitationSystemDynamics", &assign_PFVArControllerType2Dynamics_ExcitationSystemDynamics); } void PFVArControllerType2Dynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/PFVArControllerType2Dynamics.hpp b/CGMES_2.4.15_16FEB2016/PFVArControllerType2Dynamics.hpp index 4c3b5e3eb..28e466647 100644 --- a/CGMES_2.4.15_16FEB2016/PFVArControllerType2Dynamics.hpp +++ b/CGMES_2.4.15_16FEB2016/PFVArControllerType2Dynamics.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class ExcitationSystemDynamics; - /* - Power Factor or VAr controller Type II function block whose behaviour is described by reference to a standard model - */ + /** \brief Power Factor or VAr controller Type II function block whose behaviour is described by reference to a standard model */ class PFVArControllerType2Dynamics : public DynamicsFunctionBlock { public: @@ -27,7 +25,8 @@ namespace CIMPP PFVArControllerType2Dynamics(); ~PFVArControllerType2Dynamics() override; - CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; /* Excitation system model with which this Power Factor or VAr controller Type II is associated. Default: 0 */ + /** \brief Excitation system model with which this Power Factor or VAr controller Type II is associated. Default: 0 */ + CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/PFVArControllerType2UserDefined.cpp b/CGMES_2.4.15_16FEB2016/PFVArControllerType2UserDefined.cpp index 4862d275e..166ceecea 100644 --- a/CGMES_2.4.15_16FEB2016/PFVArControllerType2UserDefined.cpp +++ b/CGMES_2.4.15_16FEB2016/PFVArControllerType2UserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -PFVArControllerType2UserDefined::PFVArControllerType2UserDefined() {}; -PFVArControllerType2UserDefined::~PFVArControllerType2UserDefined() {}; +PFVArControllerType2UserDefined::PFVArControllerType2UserDefined() {} +PFVArControllerType2UserDefined::~PFVArControllerType2UserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ PFVArControllerType2UserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_PFVArControllerType2UserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (PFVArControllerType2UserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_PFVArControllerType2UserDefined(BaseClass*, BaseClass*); bool assign_PFVArControllerType2UserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_PFVArControllerType2UserDefined_ProprietaryParameterDynamics(BaseCla return false; } +bool assign_PFVArControllerType2UserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + PFVArControllerType2UserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_PFVArControllerType2UserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArControllerType2UserDefined* element = dynamic_cast(BaseClass_ptr1)) + const PFVArControllerType2UserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_PFVArControllerType2UserDefined_proprietary(const BaseClass* BaseClass_ return false; } - - const char PFVArControllerType2UserDefined::debugName[] = "PFVArControllerType2UserDefined"; const char* PFVArControllerType2UserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* PFVArControllerType2UserDefined::debugString() const void PFVArControllerType2UserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PFVArControllerType2UserDefined"), &PFVArControllerType2UserDefined_factory)); + factory_map.emplace("cim:PFVArControllerType2UserDefined", &PFVArControllerType2UserDefined_factory); } void PFVArControllerType2UserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType2UserDefined.proprietary"), &assign_PFVArControllerType2UserDefined_proprietary)); + assign_map.emplace("cim:PFVArControllerType2UserDefined.proprietary", &assign_PFVArControllerType2UserDefined_proprietary); } void PFVArControllerType2UserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType2UserDefined.ProprietaryParameterDynamics"), &assign_PFVArControllerType2UserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:PFVArControllerType2UserDefined.ProprietaryParameterDynamics", &assign_PFVArControllerType2UserDefined_ProprietaryParameterDynamics); } void PFVArControllerType2UserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/PFVArControllerType2UserDefined.hpp b/CGMES_2.4.15_16FEB2016/PFVArControllerType2UserDefined.hpp index c549ea396..7a58fa35b 100644 --- a/CGMES_2.4.15_16FEB2016/PFVArControllerType2UserDefined.hpp +++ b/CGMES_2.4.15_16FEB2016/PFVArControllerType2UserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Power Factor or VAr controller Type II function block whose dynamic behaviour is described by - */ + /** \brief Power Factor or VAr controller Type II function block whose dynamic behaviour is described by */ class PFVArControllerType2UserDefined : public PFVArControllerType2Dynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP PFVArControllerType2UserDefined(); ~PFVArControllerType2UserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/PFVArType1IEEEPFController.cpp b/CGMES_2.4.15_16FEB2016/PFVArType1IEEEPFController.cpp index a805b5c82..0bce66721 100644 --- a/CGMES_2.4.15_16FEB2016/PFVArType1IEEEPFController.cpp +++ b/CGMES_2.4.15_16FEB2016/PFVArType1IEEEPFController.cpp @@ -8,19 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PFVArType1IEEEPFController::PFVArType1IEEEPFController() {}; -PFVArType1IEEEPFController::~PFVArType1IEEEPFController() {}; +PFVArType1IEEEPFController::PFVArType1IEEEPFController() {} +PFVArType1IEEEPFController::~PFVArType1IEEEPFController() {} static const std::list PossibleProfilesForClass = { @@ -54,116 +46,122 @@ PFVArType1IEEEPFController::getPossibleProfilesForAttributes() const return map; } - -bool assign_PFVArType1IEEEPFController_ovex(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEPFController_ovex(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ovex; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEPFController_tpfc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEPFController_tpfc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpfc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEPFController_vitmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEPFController_vitmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vitmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEPFController_vpf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEPFController_vpf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vpf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEPFController_vpfcbw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEPFController_vpfcbw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vpfcbw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEPFController_vpfref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEPFController_vpfref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vpfref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEPFController_vvtmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEPFController_vvtmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vvtmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEPFController_vvtmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEPFController_vvtmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vvtmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PFVArType1IEEEPFController_ovex(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ovex; if (!buffer.str().empty()) @@ -177,7 +175,8 @@ bool get_PFVArType1IEEEPFController_ovex(const BaseClass* BaseClass_ptr1, std::s bool get_PFVArType1IEEEPFController_tpfc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpfc; if (!buffer.str().empty()) @@ -191,7 +190,8 @@ bool get_PFVArType1IEEEPFController_tpfc(const BaseClass* BaseClass_ptr1, std::s bool get_PFVArType1IEEEPFController_vitmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vitmin; if (!buffer.str().empty()) @@ -205,7 +205,8 @@ bool get_PFVArType1IEEEPFController_vitmin(const BaseClass* BaseClass_ptr1, std: bool get_PFVArType1IEEEPFController_vpf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vpf; if (!buffer.str().empty()) @@ -219,7 +220,8 @@ bool get_PFVArType1IEEEPFController_vpf(const BaseClass* BaseClass_ptr1, std::st bool get_PFVArType1IEEEPFController_vpfcbw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vpfcbw; if (!buffer.str().empty()) @@ -233,7 +235,8 @@ bool get_PFVArType1IEEEPFController_vpfcbw(const BaseClass* BaseClass_ptr1, std: bool get_PFVArType1IEEEPFController_vpfref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vpfref; if (!buffer.str().empty()) @@ -247,7 +250,8 @@ bool get_PFVArType1IEEEPFController_vpfref(const BaseClass* BaseClass_ptr1, std: bool get_PFVArType1IEEEPFController_vvtmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vvtmax; if (!buffer.str().empty()) @@ -261,7 +265,8 @@ bool get_PFVArType1IEEEPFController_vvtmax(const BaseClass* BaseClass_ptr1, std: bool get_PFVArType1IEEEPFController_vvtmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vvtmin; if (!buffer.str().empty()) @@ -273,8 +278,6 @@ bool get_PFVArType1IEEEPFController_vvtmin(const BaseClass* BaseClass_ptr1, std: return false; } - - const char PFVArType1IEEEPFController::debugName[] = "PFVArType1IEEEPFController"; const char* PFVArType1IEEEPFController::debugString() const { @@ -283,19 +286,19 @@ const char* PFVArType1IEEEPFController::debugString() const void PFVArType1IEEEPFController::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEPFController"), &PFVArType1IEEEPFController_factory)); + factory_map.emplace("cim:PFVArType1IEEEPFController", &PFVArType1IEEEPFController_factory); } void PFVArType1IEEEPFController::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEPFController.ovex"), &assign_PFVArType1IEEEPFController_ovex)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEPFController.tpfc"), &assign_PFVArType1IEEEPFController_tpfc)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEPFController.vitmin"), &assign_PFVArType1IEEEPFController_vitmin)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEPFController.vpf"), &assign_PFVArType1IEEEPFController_vpf)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEPFController.vpfcbw"), &assign_PFVArType1IEEEPFController_vpfcbw)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEPFController.vpfref"), &assign_PFVArType1IEEEPFController_vpfref)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEPFController.vvtmax"), &assign_PFVArType1IEEEPFController_vvtmax)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEPFController.vvtmin"), &assign_PFVArType1IEEEPFController_vvtmin)); + assign_map.emplace("cim:PFVArType1IEEEPFController.ovex", &assign_PFVArType1IEEEPFController_ovex); + assign_map.emplace("cim:PFVArType1IEEEPFController.tpfc", &assign_PFVArType1IEEEPFController_tpfc); + assign_map.emplace("cim:PFVArType1IEEEPFController.vitmin", &assign_PFVArType1IEEEPFController_vitmin); + assign_map.emplace("cim:PFVArType1IEEEPFController.vpf", &assign_PFVArType1IEEEPFController_vpf); + assign_map.emplace("cim:PFVArType1IEEEPFController.vpfcbw", &assign_PFVArType1IEEEPFController_vpfcbw); + assign_map.emplace("cim:PFVArType1IEEEPFController.vpfref", &assign_PFVArType1IEEEPFController_vpfref); + assign_map.emplace("cim:PFVArType1IEEEPFController.vvtmax", &assign_PFVArType1IEEEPFController_vvtmax); + assign_map.emplace("cim:PFVArType1IEEEPFController.vvtmin", &assign_PFVArType1IEEEPFController_vvtmin); } void PFVArType1IEEEPFController::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/PFVArType1IEEEPFController.hpp b/CGMES_2.4.15_16FEB2016/PFVArType1IEEEPFController.hpp index 106df1541..752d31f36 100644 --- a/CGMES_2.4.15_16FEB2016/PFVArType1IEEEPFController.hpp +++ b/CGMES_2.4.15_16FEB2016/PFVArType1IEEEPFController.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE PF Controller Type 1 which operates by moving the voltage reference directly. Reference: IEEE Standard 421.5-2005 Section 11.2. - */ + /** \brief The class represents IEEE PF Controller Type 1 which operates by moving the voltage reference directly. Reference: IEEE Standard 421.5-2005 Section 11.2. */ class PFVArType1IEEEPFController : public PFVArControllerType1Dynamics { public: @@ -30,14 +28,29 @@ namespace CIMPP PFVArType1IEEEPFController(); ~PFVArType1IEEEPFController() override; - CIMPP::Boolean ovex; /* Overexcitation Flag () true = overexcited false = underexcited. Default: false */ - CIMPP::Seconds tpfc; /* PF controller time delay (). Typical Value = 5. Default: nullptr */ - CIMPP::PU vitmin; /* Minimum machine terminal current needed to enable pf/var controller (). Default: nullptr */ - CIMPP::PU vpf; /* Synchronous machine power factor (). Default: nullptr */ - CIMPP::Simple_Float vpfcbw; /* PF controller dead band (). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU vpfref; /* PF controller reference (). Default: nullptr */ - CIMPP::PU vvtmax; /* Maximum machine terminal voltage needed for pf/var controller to be enabled (). Default: nullptr */ - CIMPP::PU vvtmin; /* Minimum machine terminal voltage needed to enable pf/var controller (). Default: nullptr */ + /** \brief Overexcitation Flag () true = overexcited false = underexcited. Default: false */ + CIMPP::Boolean ovex; + + /** \brief PF controller time delay (). Typical Value = 5. Default: nullptr */ + CIMPP::Seconds tpfc; + + /** \brief Minimum machine terminal current needed to enable pf/var controller (). Default: nullptr */ + CIMPP::PU vitmin; + + /** \brief Synchronous machine power factor (). Default: nullptr */ + CIMPP::PU vpf; + + /** \brief PF controller dead band (). Typical Value = 0.05. Default: nullptr */ + CIMPP::Simple_Float vpfcbw; + + /** \brief PF controller reference (). Default: nullptr */ + CIMPP::PU vpfref; + + /** \brief Maximum machine terminal voltage needed for pf/var controller to be enabled (). Default: nullptr */ + CIMPP::PU vvtmax; + + /** \brief Minimum machine terminal voltage needed to enable pf/var controller (). Default: nullptr */ + CIMPP::PU vvtmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/PFVArType1IEEEVArController.cpp b/CGMES_2.4.15_16FEB2016/PFVArType1IEEEVArController.cpp index cab3906b3..589dd60a6 100644 --- a/CGMES_2.4.15_16FEB2016/PFVArType1IEEEVArController.cpp +++ b/CGMES_2.4.15_16FEB2016/PFVArType1IEEEVArController.cpp @@ -8,17 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Seconds.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PFVArType1IEEEVArController::PFVArType1IEEEVArController() {}; -PFVArType1IEEEVArController::~PFVArType1IEEEVArController() {}; +PFVArType1IEEEVArController::PFVArType1IEEEVArController() {} +PFVArType1IEEEVArController::~PFVArType1IEEEVArController() {} static const std::list PossibleProfilesForClass = { @@ -50,90 +44,94 @@ PFVArType1IEEEVArController::getPossibleProfilesForAttributes() const return map; } - -bool assign_PFVArType1IEEEVArController_tvarc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEVArController_tvarc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tvarc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEVArController_vvar(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEVArController_vvar(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vvar; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEVArController_vvarcbw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEVArController_vvarcbw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vvarcbw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEVArController_vvarref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEVArController_vvarref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vvarref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEVArController_vvtmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEVArController_vvtmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vvtmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEVArController_vvtmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEVArController_vvtmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vvtmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PFVArType1IEEEVArController_tvarc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tvarc; if (!buffer.str().empty()) @@ -147,7 +145,8 @@ bool get_PFVArType1IEEEVArController_tvarc(const BaseClass* BaseClass_ptr1, std: bool get_PFVArType1IEEEVArController_vvar(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vvar; if (!buffer.str().empty()) @@ -161,7 +160,8 @@ bool get_PFVArType1IEEEVArController_vvar(const BaseClass* BaseClass_ptr1, std:: bool get_PFVArType1IEEEVArController_vvarcbw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vvarcbw; if (!buffer.str().empty()) @@ -175,7 +175,8 @@ bool get_PFVArType1IEEEVArController_vvarcbw(const BaseClass* BaseClass_ptr1, st bool get_PFVArType1IEEEVArController_vvarref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vvarref; if (!buffer.str().empty()) @@ -189,7 +190,8 @@ bool get_PFVArType1IEEEVArController_vvarref(const BaseClass* BaseClass_ptr1, st bool get_PFVArType1IEEEVArController_vvtmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vvtmax; if (!buffer.str().empty()) @@ -203,7 +205,8 @@ bool get_PFVArType1IEEEVArController_vvtmax(const BaseClass* BaseClass_ptr1, std bool get_PFVArType1IEEEVArController_vvtmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vvtmin; if (!buffer.str().empty()) @@ -215,8 +218,6 @@ bool get_PFVArType1IEEEVArController_vvtmin(const BaseClass* BaseClass_ptr1, std return false; } - - const char PFVArType1IEEEVArController::debugName[] = "PFVArType1IEEEVArController"; const char* PFVArType1IEEEVArController::debugString() const { @@ -225,17 +226,17 @@ const char* PFVArType1IEEEVArController::debugString() const void PFVArType1IEEEVArController::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEVArController"), &PFVArType1IEEEVArController_factory)); + factory_map.emplace("cim:PFVArType1IEEEVArController", &PFVArType1IEEEVArController_factory); } void PFVArType1IEEEVArController::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEVArController.tvarc"), &assign_PFVArType1IEEEVArController_tvarc)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEVArController.vvar"), &assign_PFVArType1IEEEVArController_vvar)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEVArController.vvarcbw"), &assign_PFVArType1IEEEVArController_vvarcbw)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEVArController.vvarref"), &assign_PFVArType1IEEEVArController_vvarref)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEVArController.vvtmax"), &assign_PFVArType1IEEEVArController_vvtmax)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEVArController.vvtmin"), &assign_PFVArType1IEEEVArController_vvtmin)); + assign_map.emplace("cim:PFVArType1IEEEVArController.tvarc", &assign_PFVArType1IEEEVArController_tvarc); + assign_map.emplace("cim:PFVArType1IEEEVArController.vvar", &assign_PFVArType1IEEEVArController_vvar); + assign_map.emplace("cim:PFVArType1IEEEVArController.vvarcbw", &assign_PFVArType1IEEEVArController_vvarcbw); + assign_map.emplace("cim:PFVArType1IEEEVArController.vvarref", &assign_PFVArType1IEEEVArController_vvarref); + assign_map.emplace("cim:PFVArType1IEEEVArController.vvtmax", &assign_PFVArType1IEEEVArController_vvtmax); + assign_map.emplace("cim:PFVArType1IEEEVArController.vvtmin", &assign_PFVArType1IEEEVArController_vvtmin); } void PFVArType1IEEEVArController::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/PFVArType1IEEEVArController.hpp b/CGMES_2.4.15_16FEB2016/PFVArType1IEEEVArController.hpp index 0927c56e5..ccc74b4a4 100644 --- a/CGMES_2.4.15_16FEB2016/PFVArType1IEEEVArController.hpp +++ b/CGMES_2.4.15_16FEB2016/PFVArType1IEEEVArController.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE VAR Controller Type 1 which operates by moving the voltage reference directly. Reference: IEEE Standard 421.5-2005 Section 11.3. - */ + /** \brief The class represents IEEE VAR Controller Type 1 which operates by moving the voltage reference directly. Reference: IEEE Standard 421.5-2005 Section 11.3. */ class PFVArType1IEEEVArController : public PFVArControllerType1Dynamics { public: @@ -29,12 +27,23 @@ namespace CIMPP PFVArType1IEEEVArController(); ~PFVArType1IEEEVArController() override; - CIMPP::Seconds tvarc; /* Var controller time delay (). Typical Value = 5. Default: nullptr */ - CIMPP::PU vvar; /* Synchronous machine power factor (). Default: nullptr */ - CIMPP::Simple_Float vvarcbw; /* Var controller dead band (). Typical Value = 0.02. Default: nullptr */ - CIMPP::PU vvarref; /* Var controller reference (). Default: nullptr */ - CIMPP::PU vvtmax; /* Maximum machine terminal voltage needed for pf/var controller to be enabled (). Default: nullptr */ - CIMPP::PU vvtmin; /* Minimum machine terminal voltage needed to enable pf/var controller (). Default: nullptr */ + /** \brief Var controller time delay (). Typical Value = 5. Default: nullptr */ + CIMPP::Seconds tvarc; + + /** \brief Synchronous machine power factor (). Default: nullptr */ + CIMPP::PU vvar; + + /** \brief Var controller dead band (). Typical Value = 0.02. Default: nullptr */ + CIMPP::Simple_Float vvarcbw; + + /** \brief Var controller reference (). Default: nullptr */ + CIMPP::PU vvarref; + + /** \brief Maximum machine terminal voltage needed for pf/var controller to be enabled (). Default: nullptr */ + CIMPP::PU vvtmax; + + /** \brief Minimum machine terminal voltage needed to enable pf/var controller (). Default: nullptr */ + CIMPP::PU vvtmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/PFVArType2Common1.cpp b/CGMES_2.4.15_16FEB2016/PFVArType2Common1.cpp index 90a818731..8bd6aecd5 100644 --- a/CGMES_2.4.15_16FEB2016/PFVArType2Common1.cpp +++ b/CGMES_2.4.15_16FEB2016/PFVArType2Common1.cpp @@ -8,16 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PFVArType2Common1::PFVArType2Common1() {}; -PFVArType2Common1::~PFVArType2Common1() {}; +PFVArType2Common1::PFVArType2Common1() {} +PFVArType2Common1::~PFVArType2Common1() {} static const std::list PossibleProfilesForClass = { @@ -48,77 +43,80 @@ PFVArType2Common1::getPossibleProfilesForAttributes() const return map; } - -bool assign_PFVArType2Common1_j(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2Common1_j(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->j; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2Common1_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2Common1_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2Common1_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2Common1_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2Common1_max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2Common1_max(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->max; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2Common1_ref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2Common1_ref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PFVArType2Common1_j(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->j; if (!buffer.str().empty()) @@ -132,7 +130,8 @@ bool get_PFVArType2Common1_j(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_PFVArType2Common1_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -146,7 +145,8 @@ bool get_PFVArType2Common1_ki(const BaseClass* BaseClass_ptr1, std::stringstream bool get_PFVArType2Common1_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -160,7 +160,8 @@ bool get_PFVArType2Common1_kp(const BaseClass* BaseClass_ptr1, std::stringstream bool get_PFVArType2Common1_max(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->max; if (!buffer.str().empty()) @@ -174,7 +175,8 @@ bool get_PFVArType2Common1_max(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_PFVArType2Common1_ref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ref; if (!buffer.str().empty()) @@ -186,8 +188,6 @@ bool get_PFVArType2Common1_ref(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } - - const char PFVArType2Common1::debugName[] = "PFVArType2Common1"; const char* PFVArType2Common1::debugString() const { @@ -196,16 +196,16 @@ const char* PFVArType2Common1::debugString() const void PFVArType2Common1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PFVArType2Common1"), &PFVArType2Common1_factory)); + factory_map.emplace("cim:PFVArType2Common1", &PFVArType2Common1_factory); } void PFVArType2Common1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArType2Common1.j"), &assign_PFVArType2Common1_j)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2Common1.ki"), &assign_PFVArType2Common1_ki)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2Common1.kp"), &assign_PFVArType2Common1_kp)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2Common1.max"), &assign_PFVArType2Common1_max)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2Common1.ref"), &assign_PFVArType2Common1_ref)); + assign_map.emplace("cim:PFVArType2Common1.j", &assign_PFVArType2Common1_j); + assign_map.emplace("cim:PFVArType2Common1.ki", &assign_PFVArType2Common1_ki); + assign_map.emplace("cim:PFVArType2Common1.kp", &assign_PFVArType2Common1_kp); + assign_map.emplace("cim:PFVArType2Common1.max", &assign_PFVArType2Common1_max); + assign_map.emplace("cim:PFVArType2Common1.ref", &assign_PFVArType2Common1_ref); } void PFVArType2Common1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/PFVArType2Common1.hpp b/CGMES_2.4.15_16FEB2016/PFVArType2Common1.hpp index 9ea37bc5b..e6ccc4d7a 100644 --- a/CGMES_2.4.15_16FEB2016/PFVArType2Common1.hpp +++ b/CGMES_2.4.15_16FEB2016/PFVArType2Common1.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Power factor / Reactive power regulator. This model represents the power factor or reactive power controller such as the Basler SCP-250. The controller measures power factor or reactive power (PU on generator rated power) and compares it with the operator's set point. - */ + /** \brief Power factor / Reactive power regulator. This model represents the power factor or reactive power controller such as the Basler SCP-250. The controller measures power factor or reactive power (PU on generator rated power) and compares it with the operator's set point. */ class PFVArType2Common1 : public PFVArControllerType2Dynamics { public: @@ -28,11 +26,20 @@ namespace CIMPP PFVArType2Common1(); ~PFVArType2Common1() override; - CIMPP::Boolean j; /* Selector (J). true = control mode for reactive power false = control mode for power factor. Default: false */ - CIMPP::PU ki; /* Reset gain (Ki). Default: nullptr */ - CIMPP::PU kp; /* Proportional gain (Kp). Default: nullptr */ - CIMPP::PU max; /* Output limit (max). Default: nullptr */ - CIMPP::PU ref; /* Reference value of reactive power or power factor (Ref). The reference value is initialised by this model. This initialisation may override the value exchanged by this attribute to represent a plant operator`s change of the reference setting. Default: nullptr */ + /** \brief Selector (J). true = control mode for reactive power false = control mode for power factor. Default: false */ + CIMPP::Boolean j; + + /** \brief Reset gain (Ki). Default: nullptr */ + CIMPP::PU ki; + + /** \brief Proportional gain (Kp). Default: nullptr */ + CIMPP::PU kp; + + /** \brief Output limit (max). Default: nullptr */ + CIMPP::PU max; + + /** \brief Reference value of reactive power or power factor (Ref). The reference value is initialised by this model. This initialisation may override the value exchanged by this attribute to represent a plant operator`s change of the reference setting. Default: nullptr */ + CIMPP::PU ref; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/PFVArType2IEEEPFController.cpp b/CGMES_2.4.15_16FEB2016/PFVArType2IEEEPFController.cpp index bca2a4b63..bdf95df85 100644 --- a/CGMES_2.4.15_16FEB2016/PFVArType2IEEEPFController.cpp +++ b/CGMES_2.4.15_16FEB2016/PFVArType2IEEEPFController.cpp @@ -8,18 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -PFVArType2IEEEPFController::PFVArType2IEEEPFController() {}; -PFVArType2IEEEPFController::~PFVArType2IEEEPFController() {}; +PFVArType2IEEEPFController::PFVArType2IEEEPFController() {} +PFVArType2IEEEPFController::~PFVArType2IEEEPFController() {} static const std::list PossibleProfilesForClass = { @@ -52,103 +45,108 @@ PFVArType2IEEEPFController::getPossibleProfilesForAttributes() const return map; } - -bool assign_PFVArType2IEEEPFController_exlon(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEPFController_exlon(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exlon; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEPFController_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEPFController_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEPFController_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEPFController_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEPFController_pfref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEPFController_pfref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pfref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEPFController_vclmt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEPFController_vclmt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vclmt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEPFController_vref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEPFController_vref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEPFController_vs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEPFController_vs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PFVArType2IEEEPFController_exlon(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exlon; if (!buffer.str().empty()) @@ -162,7 +160,8 @@ bool get_PFVArType2IEEEPFController_exlon(const BaseClass* BaseClass_ptr1, std:: bool get_PFVArType2IEEEPFController_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -176,7 +175,8 @@ bool get_PFVArType2IEEEPFController_ki(const BaseClass* BaseClass_ptr1, std::str bool get_PFVArType2IEEEPFController_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -190,7 +190,8 @@ bool get_PFVArType2IEEEPFController_kp(const BaseClass* BaseClass_ptr1, std::str bool get_PFVArType2IEEEPFController_pfref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pfref; if (!buffer.str().empty()) @@ -204,7 +205,8 @@ bool get_PFVArType2IEEEPFController_pfref(const BaseClass* BaseClass_ptr1, std:: bool get_PFVArType2IEEEPFController_vclmt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vclmt; if (!buffer.str().empty()) @@ -218,7 +220,8 @@ bool get_PFVArType2IEEEPFController_vclmt(const BaseClass* BaseClass_ptr1, std:: bool get_PFVArType2IEEEPFController_vref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vref; if (!buffer.str().empty()) @@ -232,7 +235,8 @@ bool get_PFVArType2IEEEPFController_vref(const BaseClass* BaseClass_ptr1, std::s bool get_PFVArType2IEEEPFController_vs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vs; if (!buffer.str().empty()) @@ -244,8 +248,6 @@ bool get_PFVArType2IEEEPFController_vs(const BaseClass* BaseClass_ptr1, std::str return false; } - - const char PFVArType2IEEEPFController::debugName[] = "PFVArType2IEEEPFController"; const char* PFVArType2IEEEPFController::debugString() const { @@ -254,18 +256,18 @@ const char* PFVArType2IEEEPFController::debugString() const void PFVArType2IEEEPFController::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEPFController"), &PFVArType2IEEEPFController_factory)); + factory_map.emplace("cim:PFVArType2IEEEPFController", &PFVArType2IEEEPFController_factory); } void PFVArType2IEEEPFController::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEPFController.exlon"), &assign_PFVArType2IEEEPFController_exlon)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEPFController.ki"), &assign_PFVArType2IEEEPFController_ki)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEPFController.kp"), &assign_PFVArType2IEEEPFController_kp)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEPFController.pfref"), &assign_PFVArType2IEEEPFController_pfref)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEPFController.vclmt"), &assign_PFVArType2IEEEPFController_vclmt)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEPFController.vref"), &assign_PFVArType2IEEEPFController_vref)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEPFController.vs"), &assign_PFVArType2IEEEPFController_vs)); + assign_map.emplace("cim:PFVArType2IEEEPFController.exlon", &assign_PFVArType2IEEEPFController_exlon); + assign_map.emplace("cim:PFVArType2IEEEPFController.ki", &assign_PFVArType2IEEEPFController_ki); + assign_map.emplace("cim:PFVArType2IEEEPFController.kp", &assign_PFVArType2IEEEPFController_kp); + assign_map.emplace("cim:PFVArType2IEEEPFController.pfref", &assign_PFVArType2IEEEPFController_pfref); + assign_map.emplace("cim:PFVArType2IEEEPFController.vclmt", &assign_PFVArType2IEEEPFController_vclmt); + assign_map.emplace("cim:PFVArType2IEEEPFController.vref", &assign_PFVArType2IEEEPFController_vref); + assign_map.emplace("cim:PFVArType2IEEEPFController.vs", &assign_PFVArType2IEEEPFController_vs); } void PFVArType2IEEEPFController::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/PFVArType2IEEEPFController.hpp b/CGMES_2.4.15_16FEB2016/PFVArType2IEEEPFController.hpp index 19aebd703..b75160448 100644 --- a/CGMES_2.4.15_16FEB2016/PFVArType2IEEEPFController.hpp +++ b/CGMES_2.4.15_16FEB2016/PFVArType2IEEEPFController.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE PF Controller Type 2 which is a summing point type controller and makes up the outside loop of a two-loop system. This controller is implemented as a slow PI type controller. The voltage regulator forms the inner loop and is implemented as a fast controller. Reference: IEEE Standard 421.5-2005 Section 11.4. - */ + /** \brief The class represents IEEE PF Controller Type 2 which is a summing point type controller and makes up the outside loop of a two-loop system. This controller is implemented as a slow PI type controller. The voltage regulator forms the inner loop and is implemented as a fast controller. Reference: IEEE Standard 421.5-2005 Section 11.4. */ class PFVArType2IEEEPFController : public PFVArControllerType2Dynamics { public: @@ -29,13 +27,26 @@ namespace CIMPP PFVArType2IEEEPFController(); ~PFVArType2IEEEPFController() override; - CIMPP::Boolean exlon; /* Overexcitation or under excitation flag () true = 1 (not in the overexcitation or underexcitation state, integral action is active) false = 0 (in the overexcitation or underexcitation state, so integral action is disabled to allow the limiter to play its role). Default: false */ - CIMPP::PU ki; /* Integral gain of the pf controller (). Typical Value = 1. Default: nullptr */ - CIMPP::PU kp; /* Proportional gain of the pf controller (). Typical Value = 1. Default: nullptr */ - CIMPP::PU pfref; /* Power factor reference (). Default: nullptr */ - CIMPP::PU vclmt; /* Maximum output of the pf controller (). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU vref; /* Voltage regulator reference (). Default: nullptr */ - CIMPP::Simple_Float vs; /* Generator sensing voltage (). Default: nullptr */ + /** \brief Overexcitation or under excitation flag () true = 1 (not in the overexcitation or underexcitation state, integral action is active) false = 0 (in the overexcitation or underexcitation state, so integral action is disabled to allow the limiter to play its role). Default: false */ + CIMPP::Boolean exlon; + + /** \brief Integral gain of the pf controller (). Typical Value = 1. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Proportional gain of the pf controller (). Typical Value = 1. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Power factor reference (). Default: nullptr */ + CIMPP::PU pfref; + + /** \brief Maximum output of the pf controller (). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU vclmt; + + /** \brief Voltage regulator reference (). Default: nullptr */ + CIMPP::PU vref; + + /** \brief Generator sensing voltage (). Default: nullptr */ + CIMPP::Simple_Float vs; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/PFVArType2IEEEVArController.cpp b/CGMES_2.4.15_16FEB2016/PFVArType2IEEEVArController.cpp index ac0459fe6..56e3c29b0 100644 --- a/CGMES_2.4.15_16FEB2016/PFVArType2IEEEVArController.cpp +++ b/CGMES_2.4.15_16FEB2016/PFVArType2IEEEVArController.cpp @@ -8,18 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -PFVArType2IEEEVArController::PFVArType2IEEEVArController() {}; -PFVArType2IEEEVArController::~PFVArType2IEEEVArController() {}; +PFVArType2IEEEVArController::PFVArType2IEEEVArController() {} +PFVArType2IEEEVArController::~PFVArType2IEEEVArController() {} static const std::list PossibleProfilesForClass = { @@ -52,103 +45,108 @@ PFVArType2IEEEVArController::getPossibleProfilesForAttributes() const return map; } - -bool assign_PFVArType2IEEEVArController_exlon(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEVArController_exlon(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exlon; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEVArController_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEVArController_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEVArController_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEVArController_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEVArController_qref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEVArController_qref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEVArController_vclmt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEVArController_vclmt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vclmt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEVArController_vref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEVArController_vref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEVArController_vs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEVArController_vs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PFVArType2IEEEVArController_exlon(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exlon; if (!buffer.str().empty()) @@ -162,7 +160,8 @@ bool get_PFVArType2IEEEVArController_exlon(const BaseClass* BaseClass_ptr1, std: bool get_PFVArType2IEEEVArController_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -176,7 +175,8 @@ bool get_PFVArType2IEEEVArController_ki(const BaseClass* BaseClass_ptr1, std::st bool get_PFVArType2IEEEVArController_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -190,7 +190,8 @@ bool get_PFVArType2IEEEVArController_kp(const BaseClass* BaseClass_ptr1, std::st bool get_PFVArType2IEEEVArController_qref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qref; if (!buffer.str().empty()) @@ -204,7 +205,8 @@ bool get_PFVArType2IEEEVArController_qref(const BaseClass* BaseClass_ptr1, std:: bool get_PFVArType2IEEEVArController_vclmt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vclmt; if (!buffer.str().empty()) @@ -218,7 +220,8 @@ bool get_PFVArType2IEEEVArController_vclmt(const BaseClass* BaseClass_ptr1, std: bool get_PFVArType2IEEEVArController_vref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vref; if (!buffer.str().empty()) @@ -232,7 +235,8 @@ bool get_PFVArType2IEEEVArController_vref(const BaseClass* BaseClass_ptr1, std:: bool get_PFVArType2IEEEVArController_vs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vs; if (!buffer.str().empty()) @@ -244,8 +248,6 @@ bool get_PFVArType2IEEEVArController_vs(const BaseClass* BaseClass_ptr1, std::st return false; } - - const char PFVArType2IEEEVArController::debugName[] = "PFVArType2IEEEVArController"; const char* PFVArType2IEEEVArController::debugString() const { @@ -254,18 +256,18 @@ const char* PFVArType2IEEEVArController::debugString() const void PFVArType2IEEEVArController::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEVArController"), &PFVArType2IEEEVArController_factory)); + factory_map.emplace("cim:PFVArType2IEEEVArController", &PFVArType2IEEEVArController_factory); } void PFVArType2IEEEVArController::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEVArController.exlon"), &assign_PFVArType2IEEEVArController_exlon)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEVArController.ki"), &assign_PFVArType2IEEEVArController_ki)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEVArController.kp"), &assign_PFVArType2IEEEVArController_kp)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEVArController.qref"), &assign_PFVArType2IEEEVArController_qref)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEVArController.vclmt"), &assign_PFVArType2IEEEVArController_vclmt)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEVArController.vref"), &assign_PFVArType2IEEEVArController_vref)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEVArController.vs"), &assign_PFVArType2IEEEVArController_vs)); + assign_map.emplace("cim:PFVArType2IEEEVArController.exlon", &assign_PFVArType2IEEEVArController_exlon); + assign_map.emplace("cim:PFVArType2IEEEVArController.ki", &assign_PFVArType2IEEEVArController_ki); + assign_map.emplace("cim:PFVArType2IEEEVArController.kp", &assign_PFVArType2IEEEVArController_kp); + assign_map.emplace("cim:PFVArType2IEEEVArController.qref", &assign_PFVArType2IEEEVArController_qref); + assign_map.emplace("cim:PFVArType2IEEEVArController.vclmt", &assign_PFVArType2IEEEVArController_vclmt); + assign_map.emplace("cim:PFVArType2IEEEVArController.vref", &assign_PFVArType2IEEEVArController_vref); + assign_map.emplace("cim:PFVArType2IEEEVArController.vs", &assign_PFVArType2IEEEVArController_vs); } void PFVArType2IEEEVArController::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/PFVArType2IEEEVArController.hpp b/CGMES_2.4.15_16FEB2016/PFVArType2IEEEVArController.hpp index 746687398..e5a578551 100644 --- a/CGMES_2.4.15_16FEB2016/PFVArType2IEEEVArController.hpp +++ b/CGMES_2.4.15_16FEB2016/PFVArType2IEEEVArController.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE VAR Controller Type 2 which is a summing point type controller. It makes up the outside loop of a two-loop system. This controller is implemented as a slow PI type controller, and the voltage regulator forms the inner loop and is implemented as a fast controller. Reference: IEEE Standard 421.5-2005 Section 11.5. - */ + /** \brief The class represents IEEE VAR Controller Type 2 which is a summing point type controller. It makes up the outside loop of a two-loop system. This controller is implemented as a slow PI type controller, and the voltage regulator forms the inner loop and is implemented as a fast controller. Reference: IEEE Standard 421.5-2005 Section 11.5. */ class PFVArType2IEEEVArController : public PFVArControllerType2Dynamics { public: @@ -29,13 +27,26 @@ namespace CIMPP PFVArType2IEEEVArController(); ~PFVArType2IEEEVArController() override; - CIMPP::Boolean exlon; /* Overexcitation or under excitation flag () true = 1 (not in the overexcitation or underexcitation state, integral action is active) false = 0 (in the overexcitation or underexcitation state, so integral action is disabled to allow the limiter to play its role). Default: false */ - CIMPP::PU ki; /* Integral gain of the pf controller (). Default: nullptr */ - CIMPP::PU kp; /* Proportional gain of the pf controller (). Default: nullptr */ - CIMPP::PU qref; /* Reactive power reference (). Default: nullptr */ - CIMPP::PU vclmt; /* Maximum output of the pf controller (). Default: nullptr */ - CIMPP::PU vref; /* Voltage regulator reference (). Default: nullptr */ - CIMPP::Simple_Float vs; /* Generator sensing voltage (). Default: nullptr */ + /** \brief Overexcitation or under excitation flag () true = 1 (not in the overexcitation or underexcitation state, integral action is active) false = 0 (in the overexcitation or underexcitation state, so integral action is disabled to allow the limiter to play its role). Default: false */ + CIMPP::Boolean exlon; + + /** \brief Integral gain of the pf controller (). Default: nullptr */ + CIMPP::PU ki; + + /** \brief Proportional gain of the pf controller (). Default: nullptr */ + CIMPP::PU kp; + + /** \brief Reactive power reference (). Default: nullptr */ + CIMPP::PU qref; + + /** \brief Maximum output of the pf controller (). Default: nullptr */ + CIMPP::PU vclmt; + + /** \brief Voltage regulator reference (). Default: nullptr */ + CIMPP::PU vref; + + /** \brief Generator sensing voltage (). Default: nullptr */ + CIMPP::Simple_Float vs; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/PU.hpp b/CGMES_2.4.15_16FEB2016/PU.hpp index 51a1d1117..623ad9e3b 100644 --- a/CGMES_2.4.15_16FEB2016/PU.hpp +++ b/CGMES_2.4.15_16FEB2016/PU.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Per Unit - a positive or negative value referred to a defined base. Values typically range from -10 to +10. - */ + /** \brief Per Unit - a positive or negative value referred to a defined base. Values typically range from -10 to +10. */ class PU { public: diff --git a/CGMES_2.4.15_16FEB2016/PerCent.hpp b/CGMES_2.4.15_16FEB2016/PerCent.hpp index 67bb36e78..d395c6119 100644 --- a/CGMES_2.4.15_16FEB2016/PerCent.hpp +++ b/CGMES_2.4.15_16FEB2016/PerCent.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Percentage on a defined base. For example, specify as 100 to indicate at the defined base. - */ + /** \brief Percentage on a defined base. For example, specify as 100 to indicate at the defined base. */ class PerCent { public: diff --git a/CGMES_2.4.15_16FEB2016/PerLengthDCLineParameter.cpp b/CGMES_2.4.15_16FEB2016/PerLengthDCLineParameter.cpp index b0b2d3ade..f92329e76 100644 --- a/CGMES_2.4.15_16FEB2016/PerLengthDCLineParameter.cpp +++ b/CGMES_2.4.15_16FEB2016/PerLengthDCLineParameter.cpp @@ -9,14 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "DCLineSegment.hpp" -#include "CapacitancePerLength.hpp" -#include "InductancePerLength.hpp" -#include "ResistancePerLength.hpp" using namespace CIMPP; -PerLengthDCLineParameter::PerLengthDCLineParameter() {}; -PerLengthDCLineParameter::~PerLengthDCLineParameter() {}; +PerLengthDCLineParameter::PerLengthDCLineParameter() {} +PerLengthDCLineParameter::~PerLengthDCLineParameter() {} static const std::list PossibleProfilesForClass = { @@ -46,67 +43,70 @@ PerLengthDCLineParameter::getPossibleProfilesForAttributes() const return map; } - -bool assign_PerLengthDCLineParameter_capacitance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCLineSegment_PerLengthParameter(BaseClass*, BaseClass*); +bool assign_PerLengthDCLineParameter_DCLineSegments(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1)) + PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1); + DCLineSegment* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->capacitance; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->DCLineSegments.begin(), element->DCLineSegments.end(), element2) == element->DCLineSegments.end()) + { + element->DCLineSegments.push_back(element2); + return assign_DCLineSegment_PerLengthParameter(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_PerLengthDCLineParameter_inductance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PerLengthDCLineParameter_capacitance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1)) + PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->inductance; - if (buffer.fail()) - return false; - else + buffer >> element->capacitance; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PerLengthDCLineParameter_resistance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PerLengthDCLineParameter_inductance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1)) + PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->resistance; - if (buffer.fail()) - return false; - else + buffer >> element->inductance; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_DCLineSegment_PerLengthParameter(BaseClass*, BaseClass*); -bool assign_PerLengthDCLineParameter_DCLineSegments(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_PerLengthDCLineParameter_resistance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1); - DCLineSegment* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->DCLineSegments.begin(), element->DCLineSegments.end(), element2) == element->DCLineSegments.end()) + buffer >> element->resistance; + if (!buffer.fail()) { - element->DCLineSegments.push_back(element2); - return assign_DCLineSegment_PerLengthParameter(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_PerLengthDCLineParameter_capacitance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1)) + const PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->capacitance; if (!buffer.str().empty()) @@ -120,7 +120,8 @@ bool get_PerLengthDCLineParameter_capacitance(const BaseClass* BaseClass_ptr1, s bool get_PerLengthDCLineParameter_inductance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1)) + const PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inductance; if (!buffer.str().empty()) @@ -134,7 +135,8 @@ bool get_PerLengthDCLineParameter_inductance(const BaseClass* BaseClass_ptr1, st bool get_PerLengthDCLineParameter_resistance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1)) + const PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->resistance; if (!buffer.str().empty()) @@ -146,8 +148,6 @@ bool get_PerLengthDCLineParameter_resistance(const BaseClass* BaseClass_ptr1, st return false; } - - const char PerLengthDCLineParameter::debugName[] = "PerLengthDCLineParameter"; const char* PerLengthDCLineParameter::debugString() const { @@ -156,19 +156,19 @@ const char* PerLengthDCLineParameter::debugString() const void PerLengthDCLineParameter::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PerLengthDCLineParameter"), &PerLengthDCLineParameter_factory)); + factory_map.emplace("cim:PerLengthDCLineParameter", &PerLengthDCLineParameter_factory); } void PerLengthDCLineParameter::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PerLengthDCLineParameter.capacitance"), &assign_PerLengthDCLineParameter_capacitance)); - assign_map.insert(std::make_pair(std::string("cim:PerLengthDCLineParameter.inductance"), &assign_PerLengthDCLineParameter_inductance)); - assign_map.insert(std::make_pair(std::string("cim:PerLengthDCLineParameter.resistance"), &assign_PerLengthDCLineParameter_resistance)); + assign_map.emplace("cim:PerLengthDCLineParameter.capacitance", &assign_PerLengthDCLineParameter_capacitance); + assign_map.emplace("cim:PerLengthDCLineParameter.inductance", &assign_PerLengthDCLineParameter_inductance); + assign_map.emplace("cim:PerLengthDCLineParameter.resistance", &assign_PerLengthDCLineParameter_resistance); } void PerLengthDCLineParameter::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PerLengthDCLineParameter.DCLineSegments"), &assign_PerLengthDCLineParameter_DCLineSegments)); + assign_map.emplace("cim:PerLengthDCLineParameter.DCLineSegments", &assign_PerLengthDCLineParameter_DCLineSegments); } void PerLengthDCLineParameter::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/PerLengthDCLineParameter.hpp b/CGMES_2.4.15_16FEB2016/PerLengthDCLineParameter.hpp index 9fc92a350..5f5cadcde 100644 --- a/CGMES_2.4.15_16FEB2016/PerLengthDCLineParameter.hpp +++ b/CGMES_2.4.15_16FEB2016/PerLengthDCLineParameter.hpp @@ -27,10 +27,17 @@ namespace CIMPP PerLengthDCLineParameter(); ~PerLengthDCLineParameter() override; - std::list DCLineSegments; /* All line segments described by this set of per-length parameters. Default: 0 */ - CIMPP::CapacitancePerLength capacitance; /* Capacitance per unit of length of the DC line segment; significant for cables only. Default: nullptr */ - CIMPP::InductancePerLength inductance; /* Inductance per unit of length of the DC line segment. Default: nullptr */ - CIMPP::ResistancePerLength resistance; /* Resistance per length of the DC line segment. Default: nullptr */ + /** \brief All line segments described by this set of per-length parameters. Default: 0 */ + std::list DCLineSegments; + + /** \brief Capacitance per unit of length of the DC line segment; significant for cables only. Default: nullptr */ + CIMPP::CapacitancePerLength capacitance; + + /** \brief Inductance per unit of length of the DC line segment. Default: nullptr */ + CIMPP::InductancePerLength inductance; + + /** \brief Resistance per length of the DC line segment. Default: nullptr */ + CIMPP::ResistancePerLength resistance; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/PetersenCoil.cpp b/CGMES_2.4.15_16FEB2016/PetersenCoil.cpp index 61cbe6c5a..d19f1fbad 100644 --- a/CGMES_2.4.15_16FEB2016/PetersenCoil.cpp +++ b/CGMES_2.4.15_16FEB2016/PetersenCoil.cpp @@ -8,18 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PetersenCoilModeKind.hpp" -#include "Voltage.hpp" -#include "CurrentFlow.hpp" -#include "CurrentFlow.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -PetersenCoil::PetersenCoil() {}; -PetersenCoil::~PetersenCoil() {}; +PetersenCoil::PetersenCoil() {} +PetersenCoil::~PetersenCoil() {} static const std::list PossibleProfilesForClass = { @@ -52,103 +45,123 @@ PetersenCoil::getPossibleProfilesForAttributes() const return map; } - -bool assign_PetersenCoil_mode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PetersenCoil_mode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mode; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PetersenCoil_nominalU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PetersenCoil_nominalU(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nominalU; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PetersenCoil_offsetCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PetersenCoil_offsetCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->offsetCurrent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PetersenCoil_positionCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PetersenCoil_positionCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->positionCurrent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PetersenCoil_xGroundMax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PetersenCoil_xGroundMax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xGroundMax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PetersenCoil_xGroundMin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PetersenCoil_xGroundMin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xGroundMin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PetersenCoil_xGroundNominal(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PetersenCoil_xGroundNominal(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xGroundNominal; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - +bool get_PetersenCoil_mode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->mode; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} bool get_PetersenCoil_nominalU(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + const PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nominalU; if (!buffer.str().empty()) @@ -162,7 +175,8 @@ bool get_PetersenCoil_nominalU(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_PetersenCoil_offsetCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + const PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->offsetCurrent; if (!buffer.str().empty()) @@ -176,7 +190,8 @@ bool get_PetersenCoil_offsetCurrent(const BaseClass* BaseClass_ptr1, std::string bool get_PetersenCoil_positionCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + const PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->positionCurrent; if (!buffer.str().empty()) @@ -190,7 +205,8 @@ bool get_PetersenCoil_positionCurrent(const BaseClass* BaseClass_ptr1, std::stri bool get_PetersenCoil_xGroundMax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + const PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xGroundMax; if (!buffer.str().empty()) @@ -204,7 +220,8 @@ bool get_PetersenCoil_xGroundMax(const BaseClass* BaseClass_ptr1, std::stringstr bool get_PetersenCoil_xGroundMin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + const PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xGroundMin; if (!buffer.str().empty()) @@ -218,7 +235,8 @@ bool get_PetersenCoil_xGroundMin(const BaseClass* BaseClass_ptr1, std::stringstr bool get_PetersenCoil_xGroundNominal(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + const PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xGroundNominal; if (!buffer.str().empty()) @@ -230,22 +248,6 @@ bool get_PetersenCoil_xGroundNominal(const BaseClass* BaseClass_ptr1, std::strin return false; } - - -bool get_PetersenCoil_mode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->mode; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char PetersenCoil::debugName[] = "PetersenCoil"; const char* PetersenCoil::debugString() const { @@ -254,18 +256,18 @@ const char* PetersenCoil::debugString() const void PetersenCoil::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PetersenCoil"), &PetersenCoil_factory)); + factory_map.emplace("cim:PetersenCoil", &PetersenCoil_factory); } void PetersenCoil::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PetersenCoil.mode"), &assign_PetersenCoil_mode)); - assign_map.insert(std::make_pair(std::string("cim:PetersenCoil.nominalU"), &assign_PetersenCoil_nominalU)); - assign_map.insert(std::make_pair(std::string("cim:PetersenCoil.offsetCurrent"), &assign_PetersenCoil_offsetCurrent)); - assign_map.insert(std::make_pair(std::string("cim:PetersenCoil.positionCurrent"), &assign_PetersenCoil_positionCurrent)); - assign_map.insert(std::make_pair(std::string("cim:PetersenCoil.xGroundMax"), &assign_PetersenCoil_xGroundMax)); - assign_map.insert(std::make_pair(std::string("cim:PetersenCoil.xGroundMin"), &assign_PetersenCoil_xGroundMin)); - assign_map.insert(std::make_pair(std::string("cim:PetersenCoil.xGroundNominal"), &assign_PetersenCoil_xGroundNominal)); + assign_map.emplace("cim:PetersenCoil.mode", &assign_PetersenCoil_mode); + assign_map.emplace("cim:PetersenCoil.nominalU", &assign_PetersenCoil_nominalU); + assign_map.emplace("cim:PetersenCoil.offsetCurrent", &assign_PetersenCoil_offsetCurrent); + assign_map.emplace("cim:PetersenCoil.positionCurrent", &assign_PetersenCoil_positionCurrent); + assign_map.emplace("cim:PetersenCoil.xGroundMax", &assign_PetersenCoil_xGroundMax); + assign_map.emplace("cim:PetersenCoil.xGroundMin", &assign_PetersenCoil_xGroundMin); + assign_map.emplace("cim:PetersenCoil.xGroundNominal", &assign_PetersenCoil_xGroundNominal); } void PetersenCoil::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/PetersenCoil.hpp b/CGMES_2.4.15_16FEB2016/PetersenCoil.hpp index 3aa9c3444..3fcf3a91b 100644 --- a/CGMES_2.4.15_16FEB2016/PetersenCoil.hpp +++ b/CGMES_2.4.15_16FEB2016/PetersenCoil.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A tunable impedance device normally used to offset line charging during single line faults in an ungrounded section of network. - */ + /** \brief A tunable impedance device normally used to offset line charging during single line faults in an ungrounded section of network. */ class PetersenCoil : public EarthFaultCompensator { public: @@ -30,13 +28,26 @@ namespace CIMPP PetersenCoil(); ~PetersenCoil() override; - CIMPP::PetersenCoilModeKind mode; /* The mode of operation of the Petersen coil. Default: 0 */ - CIMPP::Voltage nominalU; /* The nominal voltage for which the coil is designed. Default: nullptr */ - CIMPP::CurrentFlow offsetCurrent; /* The offset current that the Petersen coil controller is operating from the resonant point. This is normally a fixed amount for which the controller is configured and could be positive or negative. Typically 0 to 60 Amperes depending on voltage and resonance conditions. Default: nullptr */ - CIMPP::CurrentFlow positionCurrent; /* The control current used to control the Petersen coil also known as the position current. Typically in the range of 20-200mA. Default: nullptr */ - CIMPP::Reactance xGroundMax; /* The maximum reactance. Default: nullptr */ - CIMPP::Reactance xGroundMin; /* The minimum reactance. Default: nullptr */ - CIMPP::Reactance xGroundNominal; /* The nominal reactance. This is the operating point (normally over compensation) that is defined based on the resonance point in the healthy network condition. The impedance is calculated based on nominal voltage divided by position current. Default: nullptr */ + /** \brief The mode of operation of the Petersen coil. Default: 0 */ + CIMPP::PetersenCoilModeKind mode; + + /** \brief The nominal voltage for which the coil is designed. Default: nullptr */ + CIMPP::Voltage nominalU; + + /** \brief The offset current that the Petersen coil controller is operating from the resonant point. This is normally a fixed amount for which the controller is configured and could be positive or negative. Typically 0 to 60 Amperes depending on voltage and resonance conditions. Default: nullptr */ + CIMPP::CurrentFlow offsetCurrent; + + /** \brief The control current used to control the Petersen coil also known as the position current. Typically in the range of 20-200mA. Default: nullptr */ + CIMPP::CurrentFlow positionCurrent; + + /** \brief The maximum reactance. Default: nullptr */ + CIMPP::Reactance xGroundMax; + + /** \brief The minimum reactance. Default: nullptr */ + CIMPP::Reactance xGroundMin; + + /** \brief The nominal reactance. This is the operating point (normally over compensation) that is defined based on the resonance point in the healthy network condition. The impedance is calculated based on nominal voltage divided by position current. Default: nullptr */ + CIMPP::Reactance xGroundNominal; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/PetersenCoilModeKind.cpp b/CGMES_2.4.15_16FEB2016/PetersenCoilModeKind.cpp index a2e6dcbf7..441a95595 100644 --- a/CGMES_2.4.15_16FEB2016/PetersenCoilModeKind.cpp +++ b/CGMES_2.4.15_16FEB2016/PetersenCoilModeKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "PetersenCoilModeKind") + if (EnumSymbol.substr(0, pos) != "PetersenCoilModeKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "fixed") + if (EnumSymbol == "fixed") { rop = PetersenCoilModeKind::fixed; return lop; } - if(EnumSymbol == "manual") + if (EnumSymbol == "manual") { rop = PetersenCoilModeKind::manual; return lop; } - if(EnumSymbol == "automaticPositioning") + if (EnumSymbol == "automaticPositioning") { rop = PetersenCoilModeKind::automaticPositioning; return lop; diff --git a/CGMES_2.4.15_16FEB2016/PetersenCoilModeKind.hpp b/CGMES_2.4.15_16FEB2016/PetersenCoilModeKind.hpp index 6bfff0ea0..07e6e819e 100644 --- a/CGMES_2.4.15_16FEB2016/PetersenCoilModeKind.hpp +++ b/CGMES_2.4.15_16FEB2016/PetersenCoilModeKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The mode of operation for a Petersen coil. - */ + /** \brief The mode of operation for a Petersen coil. */ class PetersenCoilModeKind { public: enum PetersenCoilModeKind_ENUM { - /** - * Fixed position. - */ + /** Fixed position. */ fixed, - /** - * Manual positioning. - */ + /** Manual positioning. */ manual, - /** - * Automatic positioning. - */ + /** Automatic positioning. */ automaticPositioning, }; diff --git a/CGMES_2.4.15_16FEB2016/PhaseCode.cpp b/CGMES_2.4.15_16FEB2016/PhaseCode.cpp index 49aa040c7..d8fe957a4 100644 --- a/CGMES_2.4.15_16FEB2016/PhaseCode.cpp +++ b/CGMES_2.4.15_16FEB2016/PhaseCode.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "PhaseCode") + if (EnumSymbol.substr(0, pos) != "PhaseCode") { lop.setstate(std::ios::failbit); return lop; @@ -50,107 +50,107 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "ABCN") + if (EnumSymbol == "ABCN") { rop = PhaseCode::ABCN; return lop; } - if(EnumSymbol == "ABC") + if (EnumSymbol == "ABC") { rop = PhaseCode::ABC; return lop; } - if(EnumSymbol == "ABN") + if (EnumSymbol == "ABN") { rop = PhaseCode::ABN; return lop; } - if(EnumSymbol == "ACN") + if (EnumSymbol == "ACN") { rop = PhaseCode::ACN; return lop; } - if(EnumSymbol == "BCN") + if (EnumSymbol == "BCN") { rop = PhaseCode::BCN; return lop; } - if(EnumSymbol == "AB") + if (EnumSymbol == "AB") { rop = PhaseCode::AB; return lop; } - if(EnumSymbol == "AC") + if (EnumSymbol == "AC") { rop = PhaseCode::AC; return lop; } - if(EnumSymbol == "BC") + if (EnumSymbol == "BC") { rop = PhaseCode::BC; return lop; } - if(EnumSymbol == "AN") + if (EnumSymbol == "AN") { rop = PhaseCode::AN; return lop; } - if(EnumSymbol == "BN") + if (EnumSymbol == "BN") { rop = PhaseCode::BN; return lop; } - if(EnumSymbol == "CN") + if (EnumSymbol == "CN") { rop = PhaseCode::CN; return lop; } - if(EnumSymbol == "A") + if (EnumSymbol == "A") { rop = PhaseCode::A; return lop; } - if(EnumSymbol == "B") + if (EnumSymbol == "B") { rop = PhaseCode::B; return lop; } - if(EnumSymbol == "C") + if (EnumSymbol == "C") { rop = PhaseCode::C; return lop; } - if(EnumSymbol == "N") + if (EnumSymbol == "N") { rop = PhaseCode::N; return lop; } - if(EnumSymbol == "s1N") + if (EnumSymbol == "s1N") { rop = PhaseCode::s1N; return lop; } - if(EnumSymbol == "s2N") + if (EnumSymbol == "s2N") { rop = PhaseCode::s2N; return lop; } - if(EnumSymbol == "s12N") + if (EnumSymbol == "s12N") { rop = PhaseCode::s12N; return lop; } - if(EnumSymbol == "s1") + if (EnumSymbol == "s1") { rop = PhaseCode::s1; return lop; } - if(EnumSymbol == "s2") + if (EnumSymbol == "s2") { rop = PhaseCode::s2; return lop; } - if(EnumSymbol == "s12") + if (EnumSymbol == "s12") { rop = PhaseCode::s12; return lop; diff --git a/CGMES_2.4.15_16FEB2016/PhaseCode.hpp b/CGMES_2.4.15_16FEB2016/PhaseCode.hpp index 37a523ed2..bca621aca 100644 --- a/CGMES_2.4.15_16FEB2016/PhaseCode.hpp +++ b/CGMES_2.4.15_16FEB2016/PhaseCode.hpp @@ -9,97 +9,53 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Enumeration of phase identifiers. Allows designation of phases for both transmission and distribution equipment, circuits and loads. Residential and small commercial loads are often served from single-phase, or split-phase, secondary circuits. For example of s12N, phases 1 and 2 refer to hot wires that are 180 degrees out of phase, while N refers to the neutral wire. Through single-phase transformer connections, these secondary circuits may be served from one or two of the primary phases A, B, and C. For three-phase loads, use the A, B, C phase codes instead of s12N. - */ + /** \brief Enumeration of phase identifiers. Allows designation of phases for both transmission and distribution equipment, circuits and loads. Residential and small commercial loads are often served from single-phase, or split-phase, secondary circuits. For example of s12N, phases 1 and 2 refer to hot wires that are 180 degrees out of phase, while N refers to the neutral wire. Through single-phase transformer connections, these secondary circuits may be served from one or two of the primary phases A, B, and C. For three-phase loads, use the A, B, C phase codes instead of s12N. */ class PhaseCode { public: enum PhaseCode_ENUM { - /** - * Phases A, B, C, and N. - */ + /** Phases A, B, C, and N. */ ABCN, - /** - * Phases A, B, and C. - */ + /** Phases A, B, and C. */ ABC, - /** - * Phases A, B, and neutral. - */ + /** Phases A, B, and neutral. */ ABN, - /** - * Phases A, C and neutral. - */ + /** Phases A, C and neutral. */ ACN, - /** - * Phases B, C, and neutral. - */ + /** Phases B, C, and neutral. */ BCN, - /** - * Phases A and B. - */ + /** Phases A and B. */ AB, - /** - * Phases A and C. - */ + /** Phases A and C. */ AC, - /** - * Phases B and C. - */ + /** Phases B and C. */ BC, - /** - * Phases A and neutral. - */ + /** Phases A and neutral. */ AN, - /** - * Phases B and neutral. - */ + /** Phases B and neutral. */ BN, - /** - * Phases C and neutral. - */ + /** Phases C and neutral. */ CN, - /** - * Phase A. - */ + /** Phase A. */ A, - /** - * Phase B. - */ + /** Phase B. */ B, - /** - * Phase C. - */ + /** Phase C. */ C, - /** - * Neutral phase. - */ + /** Neutral phase. */ N, - /** - * Secondary phase 1 and neutral. - */ + /** Secondary phase 1 and neutral. */ s1N, - /** - * Secondary phase 2 and neutral. - */ + /** Secondary phase 2 and neutral. */ s2N, - /** - * Secondary phases 1, 2, and neutral. - */ + /** Secondary phases 1, 2, and neutral. */ s12N, - /** - * Secondary phase 1. - */ + /** Secondary phase 1. */ s1, - /** - * Secondary phase 2. - */ + /** Secondary phase 2. */ s2, - /** - * Secondary phase 1 and 2. - */ + /** Secondary phase 1 and 2. */ s12, }; diff --git a/CGMES_2.4.15_16FEB2016/PhaseTapChanger.cpp b/CGMES_2.4.15_16FEB2016/PhaseTapChanger.cpp index 0454241af..7e542043f 100644 --- a/CGMES_2.4.15_16FEB2016/PhaseTapChanger.cpp +++ b/CGMES_2.4.15_16FEB2016/PhaseTapChanger.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -PhaseTapChanger::PhaseTapChanger() : TransformerEnd(nullptr) {}; -PhaseTapChanger::~PhaseTapChanger() {}; +PhaseTapChanger::PhaseTapChanger() : TransformerEnd(nullptr) {} +PhaseTapChanger::~PhaseTapChanger() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ PhaseTapChanger::getPossibleProfilesForAttributes() const return map; } - - bool assign_TransformerEnd_PhaseTapChanger(BaseClass*, BaseClass*); bool assign_PhaseTapChanger_TransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,10 +58,10 @@ bool assign_PhaseTapChanger_TransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* return false; } - bool get_PhaseTapChanger_TransformerEnd(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const PhaseTapChanger* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->TransformerEnd != 0) { @@ -74,7 +72,6 @@ bool get_PhaseTapChanger_TransformerEnd(const BaseClass* BaseClass_ptr1, std::li return false; } - const char PhaseTapChanger::debugName[] = "PhaseTapChanger"; const char* PhaseTapChanger::debugString() const { @@ -83,7 +80,7 @@ const char* PhaseTapChanger::debugString() const void PhaseTapChanger::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PhaseTapChanger"), &PhaseTapChanger_factory)); + factory_map.emplace("cim:PhaseTapChanger", &PhaseTapChanger_factory); } void PhaseTapChanger::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -92,7 +89,7 @@ void PhaseTapChanger::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChanger.TransformerEnd"), &assign_PhaseTapChanger_TransformerEnd)); + assign_map.emplace("cim:PhaseTapChanger.TransformerEnd", &assign_PhaseTapChanger_TransformerEnd); } void PhaseTapChanger::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/PhaseTapChanger.hpp b/CGMES_2.4.15_16FEB2016/PhaseTapChanger.hpp index 37489a23b..9fdaa4aa7 100644 --- a/CGMES_2.4.15_16FEB2016/PhaseTapChanger.hpp +++ b/CGMES_2.4.15_16FEB2016/PhaseTapChanger.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class TransformerEnd; - /* - A transformer phase shifting tap model that controls the phase angle difference across the power transformer and potentially the active power flow through the power transformer. This phase tap model may also impact the voltage magnitude. - */ + /** \brief A transformer phase shifting tap model that controls the phase angle difference across the power transformer and potentially the active power flow through the power transformer. This phase tap model may also impact the voltage magnitude. */ class PhaseTapChanger : public TapChanger { public: @@ -27,7 +25,8 @@ namespace CIMPP PhaseTapChanger(); ~PhaseTapChanger() override; - CIMPP::TransformerEnd* TransformerEnd; /* Phase tap changer associated with this transformer end. Default: 0 */ + /** \brief Phase tap changer associated with this transformer end. Default: 0 */ + CIMPP::TransformerEnd* TransformerEnd; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/PhaseTapChangerAsymmetrical.cpp b/CGMES_2.4.15_16FEB2016/PhaseTapChangerAsymmetrical.cpp index d7575eea8..c8b178100 100644 --- a/CGMES_2.4.15_16FEB2016/PhaseTapChangerAsymmetrical.cpp +++ b/CGMES_2.4.15_16FEB2016/PhaseTapChangerAsymmetrical.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "AngleDegrees.hpp" using namespace CIMPP; -PhaseTapChangerAsymmetrical::PhaseTapChangerAsymmetrical() {}; -PhaseTapChangerAsymmetrical::~PhaseTapChangerAsymmetrical() {}; +PhaseTapChangerAsymmetrical::PhaseTapChangerAsymmetrical() {} +PhaseTapChangerAsymmetrical::~PhaseTapChangerAsymmetrical() {} static const std::list PossibleProfilesForClass = { @@ -41,25 +40,24 @@ PhaseTapChangerAsymmetrical::getPossibleProfilesForAttributes() const return map; } - -bool assign_PhaseTapChangerAsymmetrical_windingConnectionAngle(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PhaseTapChangerAsymmetrical_windingConnectionAngle(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PhaseTapChangerAsymmetrical* element = dynamic_cast(BaseClass_ptr1)) + PhaseTapChangerAsymmetrical* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->windingConnectionAngle; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PhaseTapChangerAsymmetrical_windingConnectionAngle(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PhaseTapChangerAsymmetrical* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChangerAsymmetrical* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->windingConnectionAngle; if (!buffer.str().empty()) @@ -71,8 +69,6 @@ bool get_PhaseTapChangerAsymmetrical_windingConnectionAngle(const BaseClass* Bas return false; } - - const char PhaseTapChangerAsymmetrical::debugName[] = "PhaseTapChangerAsymmetrical"; const char* PhaseTapChangerAsymmetrical::debugString() const { @@ -81,12 +77,12 @@ const char* PhaseTapChangerAsymmetrical::debugString() const void PhaseTapChangerAsymmetrical::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PhaseTapChangerAsymmetrical"), &PhaseTapChangerAsymmetrical_factory)); + factory_map.emplace("cim:PhaseTapChangerAsymmetrical", &PhaseTapChangerAsymmetrical_factory); } void PhaseTapChangerAsymmetrical::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerAsymmetrical.windingConnectionAngle"), &assign_PhaseTapChangerAsymmetrical_windingConnectionAngle)); + assign_map.emplace("cim:PhaseTapChangerAsymmetrical.windingConnectionAngle", &assign_PhaseTapChangerAsymmetrical_windingConnectionAngle); } void PhaseTapChangerAsymmetrical::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/PhaseTapChangerAsymmetrical.hpp b/CGMES_2.4.15_16FEB2016/PhaseTapChangerAsymmetrical.hpp index 6f6bbc14c..580e7ca49 100644 --- a/CGMES_2.4.15_16FEB2016/PhaseTapChangerAsymmetrical.hpp +++ b/CGMES_2.4.15_16FEB2016/PhaseTapChangerAsymmetrical.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Describes the tap model for an asymmetrical phase shifting transformer in which the difference voltage vector adds to the primary side voltage. The angle between the primary side voltage and the difference voltage is named the winding connection angle. The phase shift depends on both the difference voltage magnitude and the winding connection angle. - */ + /** \brief Describes the tap model for an asymmetrical phase shifting transformer in which the difference voltage vector adds to the primary side voltage. The angle between the primary side voltage and the difference voltage is named the winding connection angle. The phase shift depends on both the difference voltage magnitude and the winding connection angle. */ class PhaseTapChangerAsymmetrical : public PhaseTapChangerNonLinear { public: @@ -27,7 +25,8 @@ namespace CIMPP PhaseTapChangerAsymmetrical(); ~PhaseTapChangerAsymmetrical() override; - CIMPP::AngleDegrees windingConnectionAngle; /* The phase angle between the in-phase winding and the out-of -phase winding used for creating phase shift. The out-of-phase winding produces what is known as the difference voltage. Setting this angle to 90 degrees is not the same as a symmemtrical transformer. Default: nullptr */ + /** \brief The phase angle between the in-phase winding and the out-of -phase winding used for creating phase shift. The out-of-phase winding produces what is known as the difference voltage. Setting this angle to 90 degrees is not the same as a symmemtrical transformer. Default: nullptr */ + CIMPP::AngleDegrees windingConnectionAngle; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/PhaseTapChangerLinear.cpp b/CGMES_2.4.15_16FEB2016/PhaseTapChangerLinear.cpp index 3adf2a61c..a54861567 100644 --- a/CGMES_2.4.15_16FEB2016/PhaseTapChangerLinear.cpp +++ b/CGMES_2.4.15_16FEB2016/PhaseTapChangerLinear.cpp @@ -8,14 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "AngleDegrees.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -PhaseTapChangerLinear::PhaseTapChangerLinear() {}; -PhaseTapChangerLinear::~PhaseTapChangerLinear() {}; +PhaseTapChangerLinear::PhaseTapChangerLinear() {} +PhaseTapChangerLinear::~PhaseTapChangerLinear() {} static const std::list PossibleProfilesForClass = { @@ -45,51 +42,52 @@ PhaseTapChangerLinear::getPossibleProfilesForAttributes() const return map; } - -bool assign_PhaseTapChangerLinear_stepPhaseShiftIncrement(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PhaseTapChangerLinear_stepPhaseShiftIncrement(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1)) + PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->stepPhaseShiftIncrement; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PhaseTapChangerLinear_xMax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PhaseTapChangerLinear_xMax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1)) + PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xMax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PhaseTapChangerLinear_xMin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PhaseTapChangerLinear_xMin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1)) + PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xMin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PhaseTapChangerLinear_stepPhaseShiftIncrement(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->stepPhaseShiftIncrement; if (!buffer.str().empty()) @@ -103,7 +101,8 @@ bool get_PhaseTapChangerLinear_stepPhaseShiftIncrement(const BaseClass* BaseClas bool get_PhaseTapChangerLinear_xMax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xMax; if (!buffer.str().empty()) @@ -117,7 +116,8 @@ bool get_PhaseTapChangerLinear_xMax(const BaseClass* BaseClass_ptr1, std::string bool get_PhaseTapChangerLinear_xMin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xMin; if (!buffer.str().empty()) @@ -129,8 +129,6 @@ bool get_PhaseTapChangerLinear_xMin(const BaseClass* BaseClass_ptr1, std::string return false; } - - const char PhaseTapChangerLinear::debugName[] = "PhaseTapChangerLinear"; const char* PhaseTapChangerLinear::debugString() const { @@ -139,14 +137,14 @@ const char* PhaseTapChangerLinear::debugString() const void PhaseTapChangerLinear::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PhaseTapChangerLinear"), &PhaseTapChangerLinear_factory)); + factory_map.emplace("cim:PhaseTapChangerLinear", &PhaseTapChangerLinear_factory); } void PhaseTapChangerLinear::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerLinear.stepPhaseShiftIncrement"), &assign_PhaseTapChangerLinear_stepPhaseShiftIncrement)); - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerLinear.xMax"), &assign_PhaseTapChangerLinear_xMax)); - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerLinear.xMin"), &assign_PhaseTapChangerLinear_xMin)); + assign_map.emplace("cim:PhaseTapChangerLinear.stepPhaseShiftIncrement", &assign_PhaseTapChangerLinear_stepPhaseShiftIncrement); + assign_map.emplace("cim:PhaseTapChangerLinear.xMax", &assign_PhaseTapChangerLinear_xMax); + assign_map.emplace("cim:PhaseTapChangerLinear.xMin", &assign_PhaseTapChangerLinear_xMin); } void PhaseTapChangerLinear::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/PhaseTapChangerLinear.hpp b/CGMES_2.4.15_16FEB2016/PhaseTapChangerLinear.hpp index 81c711cca..fb4655393 100644 --- a/CGMES_2.4.15_16FEB2016/PhaseTapChangerLinear.hpp +++ b/CGMES_2.4.15_16FEB2016/PhaseTapChangerLinear.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Describes a tap changer with a linear relation between the tap step and the phase angle difference across the transformer. This is a mathematical model that is an approximation of a real phase tap changer. The phase angle is computed as stepPhaseShitfIncrement times the tap position. The secondary side voltage magnitude is the same as at the primary side. - */ + /** \brief Describes a tap changer with a linear relation between the tap step and the phase angle difference across the transformer. This is a mathematical model that is an approximation of a real phase tap changer. The phase angle is computed as stepPhaseShitfIncrement times the tap position. The secondary side voltage magnitude is the same as at the primary side. */ class PhaseTapChangerLinear : public PhaseTapChanger { public: @@ -28,9 +26,14 @@ namespace CIMPP PhaseTapChangerLinear(); ~PhaseTapChangerLinear() override; - CIMPP::AngleDegrees stepPhaseShiftIncrement; /* Phase shift per step position. A positive value indicates a positive phase shift from the winding where the tap is located to the other winding (for a two-winding transformer). The actual phase shift increment might be more accurately computed from the symmetrical or asymmetrical models or a tap step table lookup if those are available. Default: nullptr */ - CIMPP::Reactance xMax; /* The reactance depend on the tap position according to a `u` shaped curve. The maximum reactance (xMax) appear at the low and high tap positions. Default: nullptr */ - CIMPP::Reactance xMin; /* The reactance depend on the tap position according to a `u` shaped curve. The minimum reactance (xMin) appear at the mid tap position. Default: nullptr */ + /** \brief Phase shift per step position. A positive value indicates a positive phase shift from the winding where the tap is located to the other winding (for a two-winding transformer). The actual phase shift increment might be more accurately computed from the symmetrical or asymmetrical models or a tap step table lookup if those are available. Default: nullptr */ + CIMPP::AngleDegrees stepPhaseShiftIncrement; + + /** \brief The reactance depend on the tap position according to a `u` shaped curve. The maximum reactance (xMax) appear at the low and high tap positions. Default: nullptr */ + CIMPP::Reactance xMax; + + /** \brief The reactance depend on the tap position according to a `u` shaped curve. The minimum reactance (xMin) appear at the mid tap position. Default: nullptr */ + CIMPP::Reactance xMin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/PhaseTapChangerNonLinear.cpp b/CGMES_2.4.15_16FEB2016/PhaseTapChangerNonLinear.cpp index 3dc961ecb..349dad6b6 100644 --- a/CGMES_2.4.15_16FEB2016/PhaseTapChangerNonLinear.cpp +++ b/CGMES_2.4.15_16FEB2016/PhaseTapChangerNonLinear.cpp @@ -8,14 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PerCent.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -PhaseTapChangerNonLinear::PhaseTapChangerNonLinear() {}; -PhaseTapChangerNonLinear::~PhaseTapChangerNonLinear() {}; +PhaseTapChangerNonLinear::PhaseTapChangerNonLinear() {} +PhaseTapChangerNonLinear::~PhaseTapChangerNonLinear() {} static const std::list PossibleProfilesForClass = { @@ -45,51 +42,52 @@ PhaseTapChangerNonLinear::getPossibleProfilesForAttributes() const return map; } - -bool assign_PhaseTapChangerNonLinear_voltageStepIncrement(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PhaseTapChangerNonLinear_voltageStepIncrement(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1)) + PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->voltageStepIncrement; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PhaseTapChangerNonLinear_xMax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PhaseTapChangerNonLinear_xMax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1)) + PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xMax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PhaseTapChangerNonLinear_xMin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PhaseTapChangerNonLinear_xMin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1)) + PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xMin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PhaseTapChangerNonLinear_voltageStepIncrement(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->voltageStepIncrement; if (!buffer.str().empty()) @@ -103,7 +101,8 @@ bool get_PhaseTapChangerNonLinear_voltageStepIncrement(const BaseClass* BaseClas bool get_PhaseTapChangerNonLinear_xMax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xMax; if (!buffer.str().empty()) @@ -117,7 +116,8 @@ bool get_PhaseTapChangerNonLinear_xMax(const BaseClass* BaseClass_ptr1, std::str bool get_PhaseTapChangerNonLinear_xMin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xMin; if (!buffer.str().empty()) @@ -129,8 +129,6 @@ bool get_PhaseTapChangerNonLinear_xMin(const BaseClass* BaseClass_ptr1, std::str return false; } - - const char PhaseTapChangerNonLinear::debugName[] = "PhaseTapChangerNonLinear"; const char* PhaseTapChangerNonLinear::debugString() const { @@ -139,14 +137,14 @@ const char* PhaseTapChangerNonLinear::debugString() const void PhaseTapChangerNonLinear::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PhaseTapChangerNonLinear"), &PhaseTapChangerNonLinear_factory)); + factory_map.emplace("cim:PhaseTapChangerNonLinear", &PhaseTapChangerNonLinear_factory); } void PhaseTapChangerNonLinear::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerNonLinear.voltageStepIncrement"), &assign_PhaseTapChangerNonLinear_voltageStepIncrement)); - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerNonLinear.xMax"), &assign_PhaseTapChangerNonLinear_xMax)); - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerNonLinear.xMin"), &assign_PhaseTapChangerNonLinear_xMin)); + assign_map.emplace("cim:PhaseTapChangerNonLinear.voltageStepIncrement", &assign_PhaseTapChangerNonLinear_voltageStepIncrement); + assign_map.emplace("cim:PhaseTapChangerNonLinear.xMax", &assign_PhaseTapChangerNonLinear_xMax); + assign_map.emplace("cim:PhaseTapChangerNonLinear.xMin", &assign_PhaseTapChangerNonLinear_xMin); } void PhaseTapChangerNonLinear::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/PhaseTapChangerNonLinear.hpp b/CGMES_2.4.15_16FEB2016/PhaseTapChangerNonLinear.hpp index a35713ecc..f45bdb493 100644 --- a/CGMES_2.4.15_16FEB2016/PhaseTapChangerNonLinear.hpp +++ b/CGMES_2.4.15_16FEB2016/PhaseTapChangerNonLinear.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The non-linear phase tap changer describes the non-linear behavior of a phase tap changer. This is a base class for the symmetrical and asymmetrical phase tap changer models. The details of these models can be found in the IEC 61970-301 document. - */ + /** \brief The non-linear phase tap changer describes the non-linear behavior of a phase tap changer. This is a base class for the symmetrical and asymmetrical phase tap changer models. The details of these models can be found in the IEC 61970-301 document. */ class PhaseTapChangerNonLinear : public PhaseTapChanger { public: @@ -28,9 +26,14 @@ namespace CIMPP PhaseTapChangerNonLinear(); ~PhaseTapChangerNonLinear() override; - CIMPP::PerCent voltageStepIncrement; /* The voltage step increment on the out of phase winding specified in percent of nominal voltage of the transformer end. Default: nullptr */ - CIMPP::Reactance xMax; /* The reactance depend on the tap position according to a `u` shaped curve. The maximum reactance (xMax) appear at the low and high tap positions. Default: nullptr */ - CIMPP::Reactance xMin; /* The reactance depend on the tap position according to a `u` shaped curve. The minimum reactance (xMin) appear at the mid tap position. Default: nullptr */ + /** \brief The voltage step increment on the out of phase winding specified in percent of nominal voltage of the transformer end. Default: nullptr */ + CIMPP::PerCent voltageStepIncrement; + + /** \brief The reactance depend on the tap position according to a `u` shaped curve. The maximum reactance (xMax) appear at the low and high tap positions. Default: nullptr */ + CIMPP::Reactance xMax; + + /** \brief The reactance depend on the tap position according to a `u` shaped curve. The minimum reactance (xMin) appear at the mid tap position. Default: nullptr */ + CIMPP::Reactance xMin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/PhaseTapChangerSymmetrical.cpp b/CGMES_2.4.15_16FEB2016/PhaseTapChangerSymmetrical.cpp index 5abde9dad..11987b7ee 100644 --- a/CGMES_2.4.15_16FEB2016/PhaseTapChangerSymmetrical.cpp +++ b/CGMES_2.4.15_16FEB2016/PhaseTapChangerSymmetrical.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -PhaseTapChangerSymmetrical::PhaseTapChangerSymmetrical() {}; -PhaseTapChangerSymmetrical::~PhaseTapChangerSymmetrical() {}; +PhaseTapChangerSymmetrical::PhaseTapChangerSymmetrical() {} +PhaseTapChangerSymmetrical::~PhaseTapChangerSymmetrical() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ PhaseTapChangerSymmetrical::getPossibleProfilesForAttributes() const return map; } - - - - - const char PhaseTapChangerSymmetrical::debugName[] = "PhaseTapChangerSymmetrical"; const char* PhaseTapChangerSymmetrical::debugString() const { @@ -52,7 +47,7 @@ const char* PhaseTapChangerSymmetrical::debugString() const void PhaseTapChangerSymmetrical::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PhaseTapChangerSymmetrical"), &PhaseTapChangerSymmetrical_factory)); + factory_map.emplace("cim:PhaseTapChangerSymmetrical", &PhaseTapChangerSymmetrical_factory); } void PhaseTapChangerSymmetrical::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/PhaseTapChangerSymmetrical.hpp b/CGMES_2.4.15_16FEB2016/PhaseTapChangerSymmetrical.hpp index 736a21f3c..ee1910790 100644 --- a/CGMES_2.4.15_16FEB2016/PhaseTapChangerSymmetrical.hpp +++ b/CGMES_2.4.15_16FEB2016/PhaseTapChangerSymmetrical.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Describes a symmetrical phase shifting transformer tap model in which the secondary side voltage magnitude is the same as at the primary side. The difference voltage magnitude is the base in an equal-sided triangle where the sides corresponds to the primary and secondary voltages. The phase angle difference corresponds to the top angle and can be expressed as twice the arctangent of half the total difference voltage. - */ + /** \brief Describes a symmetrical phase shifting transformer tap model in which the secondary side voltage magnitude is the same as at the primary side. The difference voltage magnitude is the base in an equal-sided triangle where the sides corresponds to the primary and secondary voltages. The phase angle difference corresponds to the top angle and can be expressed as twice the arctangent of half the total difference voltage. */ class PhaseTapChangerSymmetrical : public PhaseTapChangerNonLinear { public: @@ -26,7 +24,6 @@ namespace CIMPP PhaseTapChangerSymmetrical(); ~PhaseTapChangerSymmetrical() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/PhaseTapChangerTable.cpp b/CGMES_2.4.15_16FEB2016/PhaseTapChangerTable.cpp index b9d353812..81e747699 100644 --- a/CGMES_2.4.15_16FEB2016/PhaseTapChangerTable.cpp +++ b/CGMES_2.4.15_16FEB2016/PhaseTapChangerTable.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -PhaseTapChangerTable::PhaseTapChangerTable() {}; -PhaseTapChangerTable::~PhaseTapChangerTable() {}; +PhaseTapChangerTable::PhaseTapChangerTable() {} +PhaseTapChangerTable::~PhaseTapChangerTable() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ PhaseTapChangerTable::getPossibleProfilesForAttributes() const return map; } - - bool assign_PhaseTapChangerTablePoint_PhaseTapChangerTable(BaseClass*, BaseClass*); bool assign_PhaseTapChangerTable_PhaseTapChangerTablePoint(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_PhaseTapChangerTable_PhaseTapChangerTablePoint(BaseClass* BaseClass_ } return false; } + bool assign_PhaseTapChangerTabular_PhaseTapChangerTable(BaseClass*, BaseClass*); bool assign_PhaseTapChangerTable_PhaseTapChangerTabular(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -87,7 +86,7 @@ const char* PhaseTapChangerTable::debugString() const void PhaseTapChangerTable::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTable"), &PhaseTapChangerTable_factory)); + factory_map.emplace("cim:PhaseTapChangerTable", &PhaseTapChangerTable_factory); } void PhaseTapChangerTable::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -96,8 +95,8 @@ void PhaseTapChangerTable::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTable.PhaseTapChangerTablePoint"), &assign_PhaseTapChangerTable_PhaseTapChangerTablePoint)); - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTable.PhaseTapChangerTabular"), &assign_PhaseTapChangerTable_PhaseTapChangerTabular)); + assign_map.emplace("cim:PhaseTapChangerTable.PhaseTapChangerTablePoint", &assign_PhaseTapChangerTable_PhaseTapChangerTablePoint); + assign_map.emplace("cim:PhaseTapChangerTable.PhaseTapChangerTabular", &assign_PhaseTapChangerTable_PhaseTapChangerTabular); } void PhaseTapChangerTable::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/PhaseTapChangerTable.hpp b/CGMES_2.4.15_16FEB2016/PhaseTapChangerTable.hpp index 6291c316c..9b76ee650 100644 --- a/CGMES_2.4.15_16FEB2016/PhaseTapChangerTable.hpp +++ b/CGMES_2.4.15_16FEB2016/PhaseTapChangerTable.hpp @@ -18,9 +18,7 @@ namespace CIMPP class PhaseTapChangerTablePoint; class PhaseTapChangerTabular; - /* - Describes a tabular curve for how the phase angle difference and impedance varies with the tap step. - */ + /** \brief Describes a tabular curve for how the phase angle difference and impedance varies with the tap step. */ class PhaseTapChangerTable : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP PhaseTapChangerTable(); ~PhaseTapChangerTable() override; - std::list PhaseTapChangerTablePoint; /* The points of this table. Default: 0 */ - std::list PhaseTapChangerTabular; /* The phase tap changers to which this phase tap table applies. Default: 0 */ + /** \brief The points of this table. Default: 0 */ + std::list PhaseTapChangerTablePoint; + + /** \brief The phase tap changers to which this phase tap table applies. Default: 0 */ + std::list PhaseTapChangerTabular; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/PhaseTapChangerTablePoint.cpp b/CGMES_2.4.15_16FEB2016/PhaseTapChangerTablePoint.cpp index 156dcecab..e4c877019 100644 --- a/CGMES_2.4.15_16FEB2016/PhaseTapChangerTablePoint.cpp +++ b/CGMES_2.4.15_16FEB2016/PhaseTapChangerTablePoint.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "PhaseTapChangerTable.hpp" -#include "AngleDegrees.hpp" using namespace CIMPP; -PhaseTapChangerTablePoint::PhaseTapChangerTablePoint() : PhaseTapChangerTable(nullptr) {}; -PhaseTapChangerTablePoint::~PhaseTapChangerTablePoint() {}; +PhaseTapChangerTablePoint::PhaseTapChangerTablePoint() : PhaseTapChangerTable(nullptr) {} +PhaseTapChangerTablePoint::~PhaseTapChangerTablePoint() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ PhaseTapChangerTablePoint::getPossibleProfilesForAttributes() const return map; } - -bool assign_PhaseTapChangerTablePoint_angle(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (PhaseTapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->angle; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_PhaseTapChangerTable_PhaseTapChangerTablePoint(BaseClass*, BaseClass*); bool assign_PhaseTapChangerTablePoint_PhaseTapChangerTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_PhaseTapChangerTablePoint_PhaseTapChangerTable(BaseClass* BaseClass_ return false; } -bool get_PhaseTapChangerTablePoint_angle(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_PhaseTapChangerTablePoint_angle(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const PhaseTapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + PhaseTapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->angle; - if (!buffer.str().empty()) + buffer >> element->angle; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_PhaseTapChangerTablePoint_PhaseTapChangerTable(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const PhaseTapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PhaseTapChangerTable != 0) { @@ -102,6 +86,20 @@ bool get_PhaseTapChangerTablePoint_PhaseTapChangerTable(const BaseClass* BaseCla return false; } +bool get_PhaseTapChangerTablePoint_angle(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const PhaseTapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->angle; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char PhaseTapChangerTablePoint::debugName[] = "PhaseTapChangerTablePoint"; const char* PhaseTapChangerTablePoint::debugString() const @@ -111,17 +109,17 @@ const char* PhaseTapChangerTablePoint::debugString() const void PhaseTapChangerTablePoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTablePoint"), &PhaseTapChangerTablePoint_factory)); + factory_map.emplace("cim:PhaseTapChangerTablePoint", &PhaseTapChangerTablePoint_factory); } void PhaseTapChangerTablePoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTablePoint.angle"), &assign_PhaseTapChangerTablePoint_angle)); + assign_map.emplace("cim:PhaseTapChangerTablePoint.angle", &assign_PhaseTapChangerTablePoint_angle); } void PhaseTapChangerTablePoint::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTablePoint.PhaseTapChangerTable"), &assign_PhaseTapChangerTablePoint_PhaseTapChangerTable)); + assign_map.emplace("cim:PhaseTapChangerTablePoint.PhaseTapChangerTable", &assign_PhaseTapChangerTablePoint_PhaseTapChangerTable); } void PhaseTapChangerTablePoint::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/PhaseTapChangerTablePoint.hpp b/CGMES_2.4.15_16FEB2016/PhaseTapChangerTablePoint.hpp index 333ffbc2e..451bb17ad 100644 --- a/CGMES_2.4.15_16FEB2016/PhaseTapChangerTablePoint.hpp +++ b/CGMES_2.4.15_16FEB2016/PhaseTapChangerTablePoint.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class PhaseTapChangerTable; - /* - Describes each tap step in the phase tap changer tabular curve. - */ + /** \brief Describes each tap step in the phase tap changer tabular curve. */ class PhaseTapChangerTablePoint : public TapChangerTablePoint { public: @@ -28,8 +26,11 @@ namespace CIMPP PhaseTapChangerTablePoint(); ~PhaseTapChangerTablePoint() override; - CIMPP::PhaseTapChangerTable* PhaseTapChangerTable; /* The table of this point. Default: 0 */ - CIMPP::AngleDegrees angle; /* The angle difference in degrees. Default: nullptr */ + /** \brief The table of this point. Default: 0 */ + CIMPP::PhaseTapChangerTable* PhaseTapChangerTable; + + /** \brief The angle difference in degrees. Default: nullptr */ + CIMPP::AngleDegrees angle; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/PhaseTapChangerTabular.cpp b/CGMES_2.4.15_16FEB2016/PhaseTapChangerTabular.cpp index b5cec68a7..34a8103ba 100644 --- a/CGMES_2.4.15_16FEB2016/PhaseTapChangerTabular.cpp +++ b/CGMES_2.4.15_16FEB2016/PhaseTapChangerTabular.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -PhaseTapChangerTabular::PhaseTapChangerTabular() : PhaseTapChangerTable(nullptr) {}; -PhaseTapChangerTabular::~PhaseTapChangerTabular() {}; +PhaseTapChangerTabular::PhaseTapChangerTabular() : PhaseTapChangerTable(nullptr) {} +PhaseTapChangerTabular::~PhaseTapChangerTabular() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ PhaseTapChangerTabular::getPossibleProfilesForAttributes() const return map; } - - bool assign_PhaseTapChangerTable_PhaseTapChangerTabular(BaseClass*, BaseClass*); bool assign_PhaseTapChangerTabular_PhaseTapChangerTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,10 +58,10 @@ bool assign_PhaseTapChangerTabular_PhaseTapChangerTable(BaseClass* BaseClass_ptr return false; } - bool get_PhaseTapChangerTabular_PhaseTapChangerTable(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const PhaseTapChangerTabular* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChangerTabular* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PhaseTapChangerTable != 0) { @@ -74,7 +72,6 @@ bool get_PhaseTapChangerTabular_PhaseTapChangerTable(const BaseClass* BaseClass_ return false; } - const char PhaseTapChangerTabular::debugName[] = "PhaseTapChangerTabular"; const char* PhaseTapChangerTabular::debugString() const { @@ -83,7 +80,7 @@ const char* PhaseTapChangerTabular::debugString() const void PhaseTapChangerTabular::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTabular"), &PhaseTapChangerTabular_factory)); + factory_map.emplace("cim:PhaseTapChangerTabular", &PhaseTapChangerTabular_factory); } void PhaseTapChangerTabular::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -92,7 +89,7 @@ void PhaseTapChangerTabular::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTabular.PhaseTapChangerTable"), &assign_PhaseTapChangerTabular_PhaseTapChangerTable)); + assign_map.emplace("cim:PhaseTapChangerTabular.PhaseTapChangerTable", &assign_PhaseTapChangerTabular_PhaseTapChangerTable); } void PhaseTapChangerTabular::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/PhaseTapChangerTabular.hpp b/CGMES_2.4.15_16FEB2016/PhaseTapChangerTabular.hpp index 9d5d9053e..85b69cbec 100644 --- a/CGMES_2.4.15_16FEB2016/PhaseTapChangerTabular.hpp +++ b/CGMES_2.4.15_16FEB2016/PhaseTapChangerTabular.hpp @@ -24,7 +24,8 @@ namespace CIMPP PhaseTapChangerTabular(); ~PhaseTapChangerTabular() override; - CIMPP::PhaseTapChangerTable* PhaseTapChangerTable; /* The phase tap changer table for this phase tap changer. Default: 0 */ + /** \brief The phase tap changer table for this phase tap changer. Default: 0 */ + CIMPP::PhaseTapChangerTable* PhaseTapChangerTable; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/PositionPoint.cpp b/CGMES_2.4.15_16FEB2016/PositionPoint.cpp index 2944edacc..9fbc902cc 100644 --- a/CGMES_2.4.15_16FEB2016/PositionPoint.cpp +++ b/CGMES_2.4.15_16FEB2016/PositionPoint.cpp @@ -9,15 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "Location.hpp" -#include "Integer.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -PositionPoint::PositionPoint() : Location(nullptr) {}; -PositionPoint::~PositionPoint() {}; +PositionPoint::PositionPoint() : Location(nullptr) {} +PositionPoint::~PositionPoint() {} static const std::list PossibleProfilesForClass = { @@ -48,80 +44,97 @@ PositionPoint::getPossibleProfilesForAttributes() const return map; } +bool assign_Location_PositionPoints(BaseClass*, BaseClass*); +bool assign_PositionPoint_Location(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PositionPoint* element = dynamic_cast(BaseClass_ptr1); + Location* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Location != element2) + { + element->Location = element2; + return assign_Location_PositionPoints(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_PositionPoint_sequenceNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PositionPoint_sequenceNumber(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + PositionPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->sequenceNumber; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PositionPoint_xPosition(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PositionPoint_xPosition(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + PositionPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->xPosition = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PositionPoint_yPosition(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PositionPoint_yPosition(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + PositionPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->yPosition = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PositionPoint_zPosition(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PositionPoint_zPosition(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + PositionPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->zPosition = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_Location_PositionPoints(BaseClass*, BaseClass*); -bool assign_PositionPoint_Location(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_PositionPoint_Location(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - PositionPoint* element = dynamic_cast(BaseClass_ptr1); - Location* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const PositionPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->Location != element2) + if (element->Location != 0) { - element->Location = element2; - return assign_Location_PositionPoints(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->Location); + return true; } - return true; } return false; } bool get_PositionPoint_sequenceNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + const PositionPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->sequenceNumber; if (!buffer.str().empty()) @@ -135,7 +148,8 @@ bool get_PositionPoint_sequenceNumber(const BaseClass* BaseClass_ptr1, std::stri bool get_PositionPoint_xPosition(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + const PositionPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xPosition; if (!buffer.str().empty()) @@ -149,7 +163,8 @@ bool get_PositionPoint_xPosition(const BaseClass* BaseClass_ptr1, std::stringstr bool get_PositionPoint_yPosition(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + const PositionPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->yPosition; if (!buffer.str().empty()) @@ -163,7 +178,8 @@ bool get_PositionPoint_yPosition(const BaseClass* BaseClass_ptr1, std::stringstr bool get_PositionPoint_zPosition(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + const PositionPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->zPosition; if (!buffer.str().empty()) @@ -175,21 +191,6 @@ bool get_PositionPoint_zPosition(const BaseClass* BaseClass_ptr1, std::stringstr return false; } - -bool get_PositionPoint_Location(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const PositionPoint* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->Location != 0) - { - BaseClass_list.push_back(element->Location); - return true; - } - } - return false; -} - - const char PositionPoint::debugName[] = "PositionPoint"; const char* PositionPoint::debugString() const { @@ -198,20 +199,20 @@ const char* PositionPoint::debugString() const void PositionPoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PositionPoint"), &PositionPoint_factory)); + factory_map.emplace("cim:PositionPoint", &PositionPoint_factory); } void PositionPoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PositionPoint.sequenceNumber"), &assign_PositionPoint_sequenceNumber)); - assign_map.insert(std::make_pair(std::string("cim:PositionPoint.xPosition"), &assign_PositionPoint_xPosition)); - assign_map.insert(std::make_pair(std::string("cim:PositionPoint.yPosition"), &assign_PositionPoint_yPosition)); - assign_map.insert(std::make_pair(std::string("cim:PositionPoint.zPosition"), &assign_PositionPoint_zPosition)); + assign_map.emplace("cim:PositionPoint.sequenceNumber", &assign_PositionPoint_sequenceNumber); + assign_map.emplace("cim:PositionPoint.xPosition", &assign_PositionPoint_xPosition); + assign_map.emplace("cim:PositionPoint.yPosition", &assign_PositionPoint_yPosition); + assign_map.emplace("cim:PositionPoint.zPosition", &assign_PositionPoint_zPosition); } void PositionPoint::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PositionPoint.Location"), &assign_PositionPoint_Location)); + assign_map.emplace("cim:PositionPoint.Location", &assign_PositionPoint_Location); } void PositionPoint::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/PositionPoint.hpp b/CGMES_2.4.15_16FEB2016/PositionPoint.hpp index b3b6be209..b7eead20b 100644 --- a/CGMES_2.4.15_16FEB2016/PositionPoint.hpp +++ b/CGMES_2.4.15_16FEB2016/PositionPoint.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class Location; - /* - Set of spatial coordinates that determine a point, defined in the coordinate system specified in 'Location.CoordinateSystem'. Use a single position point instance to desribe a point-oriented location. Use a sequence of position points to describe a line-oriented object (physical location of non-point oriented objects like cables or lines), or area of an object (like a substation or a geographical zone - in this case, have first and last position point with the same values). - */ + /** \brief Set of spatial coordinates that determine a point, defined in the coordinate system specified in 'Location.CoordinateSystem'. Use a single position point instance to desribe a point-oriented location. Use a sequence of position points to describe a line-oriented object (physical location of non-point oriented objects like cables or lines), or area of an object (like a substation or a geographical zone - in this case, have first and last position point with the same values). */ class PositionPoint : public BaseClass { public: @@ -29,11 +27,20 @@ namespace CIMPP PositionPoint(); ~PositionPoint() override; - CIMPP::Location* Location; /* Location described by this position point. Default: 0 */ - CIMPP::Integer sequenceNumber; /* Zero-relative sequence number of this point within a series of points. Default: 0 */ - CIMPP::String xPosition; /* X axis position. Default: '' */ - CIMPP::String yPosition; /* Y axis position. Default: '' */ - CIMPP::String zPosition; /* (if applicable) Z axis position. Default: '' */ + /** \brief Location described by this position point. Default: 0 */ + CIMPP::Location* Location; + + /** \brief Zero-relative sequence number of this point within a series of points. Default: 0 */ + CIMPP::Integer sequenceNumber; + + /** \brief X axis position. Default: '' */ + CIMPP::String xPosition; + + /** \brief Y axis position. Default: '' */ + CIMPP::String yPosition; + + /** \brief (if applicable) Z axis position. Default: '' */ + CIMPP::String zPosition; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/PowerSystemResource.cpp b/CGMES_2.4.15_16FEB2016/PowerSystemResource.cpp index 073756be0..dd4878f2c 100644 --- a/CGMES_2.4.15_16FEB2016/PowerSystemResource.cpp +++ b/CGMES_2.4.15_16FEB2016/PowerSystemResource.cpp @@ -14,8 +14,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -PowerSystemResource::PowerSystemResource() : Location(nullptr) {}; -PowerSystemResource::~PowerSystemResource() {}; +PowerSystemResource::PowerSystemResource() : Location(nullptr) {} +PowerSystemResource::~PowerSystemResource() {} static const std::list PossibleProfilesForClass = { @@ -48,8 +48,6 @@ PowerSystemResource::getPossibleProfilesForAttributes() const return map; } - - bool assign_Control_PowerSystemResource(BaseClass*, BaseClass*); bool assign_PowerSystemResource_Controls(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -66,6 +64,7 @@ bool assign_PowerSystemResource_Controls(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_Location_PowerSystemResources(BaseClass*, BaseClass*); bool assign_PowerSystemResource_Location(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -82,6 +81,7 @@ bool assign_PowerSystemResource_Location(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_Measurement_PowerSystemResource(BaseClass*, BaseClass*); bool assign_PowerSystemResource_Measurements(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -101,6 +101,7 @@ bool assign_PowerSystemResource_Measurements(BaseClass* BaseClass_ptr1, BaseClas + const char PowerSystemResource::debugName[] = "PowerSystemResource"; const char* PowerSystemResource::debugString() const { @@ -109,7 +110,7 @@ const char* PowerSystemResource::debugString() const void PowerSystemResource::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PowerSystemResource"), &PowerSystemResource_factory)); + factory_map.emplace("cim:PowerSystemResource", &PowerSystemResource_factory); } void PowerSystemResource::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -118,9 +119,9 @@ void PowerSystemResource::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PowerSystemResource.Controls"), &assign_PowerSystemResource_Controls)); - assign_map.insert(std::make_pair(std::string("cim:PowerSystemResource.Location"), &assign_PowerSystemResource_Location)); - assign_map.insert(std::make_pair(std::string("cim:PowerSystemResource.Measurements"), &assign_PowerSystemResource_Measurements)); + assign_map.emplace("cim:PowerSystemResource.Controls", &assign_PowerSystemResource_Controls); + assign_map.emplace("cim:PowerSystemResource.Location", &assign_PowerSystemResource_Location); + assign_map.emplace("cim:PowerSystemResource.Measurements", &assign_PowerSystemResource_Measurements); } void PowerSystemResource::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/PowerSystemResource.hpp b/CGMES_2.4.15_16FEB2016/PowerSystemResource.hpp index be028a916..ddf8d2070 100644 --- a/CGMES_2.4.15_16FEB2016/PowerSystemResource.hpp +++ b/CGMES_2.4.15_16FEB2016/PowerSystemResource.hpp @@ -19,9 +19,7 @@ namespace CIMPP class Location; class Measurement; - /* - A power system resource can be an item of equipment such as a switch, an equipment container containing many individual items of equipment such as a substation, or an organisational entity such as sub-control area. Power system resources can have measurements associated. - */ + /** \brief A power system resource can be an item of equipment such as a switch, an equipment container containing many individual items of equipment such as a substation, or an organisational entity such as sub-control area. Power system resources can have measurements associated. */ class PowerSystemResource : public IdentifiedObject { public: @@ -29,9 +27,14 @@ namespace CIMPP PowerSystemResource(); ~PowerSystemResource() override; - std::list Controls; /* Regulating device governed by this control output. Default: 0 */ - CIMPP::Location* Location; /* Location of this power system resource. Default: 0 */ - std::list Measurements; /* The power system resource that contains the measurement. Default: 0 */ + /** \brief Regulating device governed by this control output. Default: 0 */ + std::list Controls; + + /** \brief Location of this power system resource. Default: 0 */ + CIMPP::Location* Location; + + /** \brief The power system resource that contains the measurement. Default: 0 */ + std::list Measurements; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/PowerSystemStabilizerDynamics.cpp b/CGMES_2.4.15_16FEB2016/PowerSystemStabilizerDynamics.cpp index a961e08aa..fb50d8a2e 100644 --- a/CGMES_2.4.15_16FEB2016/PowerSystemStabilizerDynamics.cpp +++ b/CGMES_2.4.15_16FEB2016/PowerSystemStabilizerDynamics.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -PowerSystemStabilizerDynamics::PowerSystemStabilizerDynamics() : ExcitationSystemDynamics(nullptr) {}; -PowerSystemStabilizerDynamics::~PowerSystemStabilizerDynamics() {}; +PowerSystemStabilizerDynamics::PowerSystemStabilizerDynamics() : ExcitationSystemDynamics(nullptr) {} +PowerSystemStabilizerDynamics::~PowerSystemStabilizerDynamics() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ PowerSystemStabilizerDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_ExcitationSystemDynamics_PowerSystemStabilizerDynamics(BaseClass*, BaseClass*); bool assign_PowerSystemStabilizerDynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_PowerSystemStabilizerDynamics_ExcitationSystemDynamics(BaseClass* Ba } return false; } + bool assign_RemoteInputSignal_PowerSystemStabilizerDynamics(BaseClass*, BaseClass*); bool assign_PowerSystemStabilizerDynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_PowerSystemStabilizerDynamics_RemoteInputSignal(BaseClass* BaseClass return false; } - bool get_PowerSystemStabilizerDynamics_ExcitationSystemDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const PowerSystemStabilizerDynamics* element = dynamic_cast(BaseClass_ptr1)) + const PowerSystemStabilizerDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ExcitationSystemDynamics != 0) { @@ -100,7 +99,7 @@ const char* PowerSystemStabilizerDynamics::debugString() const void PowerSystemStabilizerDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PowerSystemStabilizerDynamics"), &PowerSystemStabilizerDynamics_factory)); + factory_map.emplace("cim:PowerSystemStabilizerDynamics", &PowerSystemStabilizerDynamics_factory); } void PowerSystemStabilizerDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -109,8 +108,8 @@ void PowerSystemStabilizerDynamics::addPrimitiveAssignFnsToMap(std::unordered_ma void PowerSystemStabilizerDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PowerSystemStabilizerDynamics.ExcitationSystemDynamics"), &assign_PowerSystemStabilizerDynamics_ExcitationSystemDynamics)); - assign_map.insert(std::make_pair(std::string("cim:PowerSystemStabilizerDynamics.RemoteInputSignal"), &assign_PowerSystemStabilizerDynamics_RemoteInputSignal)); + assign_map.emplace("cim:PowerSystemStabilizerDynamics.ExcitationSystemDynamics", &assign_PowerSystemStabilizerDynamics_ExcitationSystemDynamics); + assign_map.emplace("cim:PowerSystemStabilizerDynamics.RemoteInputSignal", &assign_PowerSystemStabilizerDynamics_RemoteInputSignal); } void PowerSystemStabilizerDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/PowerSystemStabilizerDynamics.hpp b/CGMES_2.4.15_16FEB2016/PowerSystemStabilizerDynamics.hpp index 6dec17c33..949c55171 100644 --- a/CGMES_2.4.15_16FEB2016/PowerSystemStabilizerDynamics.hpp +++ b/CGMES_2.4.15_16FEB2016/PowerSystemStabilizerDynamics.hpp @@ -18,9 +18,7 @@ namespace CIMPP class ExcitationSystemDynamics; class RemoteInputSignal; - /* - Power system stabilizer function block whose behaviour is described by reference to a standard model - */ + /** \brief Power system stabilizer function block whose behaviour is described by reference to a standard model */ class PowerSystemStabilizerDynamics : public DynamicsFunctionBlock { public: @@ -28,8 +26,11 @@ namespace CIMPP PowerSystemStabilizerDynamics(); ~PowerSystemStabilizerDynamics() override; - CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; /* Excitation system model with which this power system stabilizer model is associated. Default: 0 */ - std::list RemoteInputSignal; /* Remote input signal used by this power system stabilizer model. Default: 0 */ + /** \brief Excitation system model with which this power system stabilizer model is associated. Default: 0 */ + CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; + + /** \brief Remote input signal used by this power system stabilizer model. Default: 0 */ + std::list RemoteInputSignal; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/PowerSystemStabilizerUserDefined.cpp b/CGMES_2.4.15_16FEB2016/PowerSystemStabilizerUserDefined.cpp index 03243c2a0..a444c0d8b 100644 --- a/CGMES_2.4.15_16FEB2016/PowerSystemStabilizerUserDefined.cpp +++ b/CGMES_2.4.15_16FEB2016/PowerSystemStabilizerUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -PowerSystemStabilizerUserDefined::PowerSystemStabilizerUserDefined() {}; -PowerSystemStabilizerUserDefined::~PowerSystemStabilizerUserDefined() {}; +PowerSystemStabilizerUserDefined::PowerSystemStabilizerUserDefined() {} +PowerSystemStabilizerUserDefined::~PowerSystemStabilizerUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ PowerSystemStabilizerUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_PowerSystemStabilizerUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (PowerSystemStabilizerUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_PowerSystemStabilizerUserDefined(BaseClass*, BaseClass*); bool assign_PowerSystemStabilizerUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_PowerSystemStabilizerUserDefined_ProprietaryParameterDynamics(BaseCl return false; } +bool assign_PowerSystemStabilizerUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + PowerSystemStabilizerUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_PowerSystemStabilizerUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerSystemStabilizerUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const PowerSystemStabilizerUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_PowerSystemStabilizerUserDefined_proprietary(const BaseClass* BaseClass return false; } - - const char PowerSystemStabilizerUserDefined::debugName[] = "PowerSystemStabilizerUserDefined"; const char* PowerSystemStabilizerUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* PowerSystemStabilizerUserDefined::debugString() const void PowerSystemStabilizerUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PowerSystemStabilizerUserDefined"), &PowerSystemStabilizerUserDefined_factory)); + factory_map.emplace("cim:PowerSystemStabilizerUserDefined", &PowerSystemStabilizerUserDefined_factory); } void PowerSystemStabilizerUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PowerSystemStabilizerUserDefined.proprietary"), &assign_PowerSystemStabilizerUserDefined_proprietary)); + assign_map.emplace("cim:PowerSystemStabilizerUserDefined.proprietary", &assign_PowerSystemStabilizerUserDefined_proprietary); } void PowerSystemStabilizerUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PowerSystemStabilizerUserDefined.ProprietaryParameterDynamics"), &assign_PowerSystemStabilizerUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:PowerSystemStabilizerUserDefined.ProprietaryParameterDynamics", &assign_PowerSystemStabilizerUserDefined_ProprietaryParameterDynamics); } void PowerSystemStabilizerUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/PowerSystemStabilizerUserDefined.hpp b/CGMES_2.4.15_16FEB2016/PowerSystemStabilizerUserDefined.hpp index 3622772dc..db8af6276 100644 --- a/CGMES_2.4.15_16FEB2016/PowerSystemStabilizerUserDefined.hpp +++ b/CGMES_2.4.15_16FEB2016/PowerSystemStabilizerUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - function block whose dynamic behaviour is described by - */ + /** \brief function block whose dynamic behaviour is described by */ class PowerSystemStabilizerUserDefined : public PowerSystemStabilizerDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP PowerSystemStabilizerUserDefined(); ~PowerSystemStabilizerUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/PowerTransformer.cpp b/CGMES_2.4.15_16FEB2016/PowerTransformer.cpp index 43ba53d05..80ac17033 100644 --- a/CGMES_2.4.15_16FEB2016/PowerTransformer.cpp +++ b/CGMES_2.4.15_16FEB2016/PowerTransformer.cpp @@ -9,17 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "PowerTransformerEnd.hpp" -#include "CurrentFlow.hpp" -#include "Voltage.hpp" -#include "AngleDegrees.hpp" -#include "Voltage.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" using namespace CIMPP; -PowerTransformer::PowerTransformer() {}; -PowerTransformer::~PowerTransformer() {}; +PowerTransformer::PowerTransformer() {} +PowerTransformer::~PowerTransformer() {} static const std::list PossibleProfilesForClass = { @@ -52,106 +46,112 @@ PowerTransformer::getPossibleProfilesForAttributes() const return map; } - -bool assign_PowerTransformer_beforeShCircuitHighestOperatingCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_PowerTransformer(BaseClass*, BaseClass*); +bool assign_PowerTransformer_PowerTransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + PowerTransformerEnd* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->beforeShCircuitHighestOperatingCurrent; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->PowerTransformerEnd.begin(), element->PowerTransformerEnd.end(), element2) == element->PowerTransformerEnd.end()) + { + element->PowerTransformerEnd.push_back(element2); + return assign_PowerTransformerEnd_PowerTransformer(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_PowerTransformer_beforeShCircuitHighestOperatingVoltage(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformer_beforeShCircuitHighestOperatingCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->beforeShCircuitHighestOperatingVoltage; - if (buffer.fail()) - return false; - else + buffer >> element->beforeShCircuitHighestOperatingCurrent; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformer_beforeShortCircuitAnglePf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformer_beforeShCircuitHighestOperatingVoltage(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->beforeShortCircuitAnglePf; - if (buffer.fail()) - return false; - else + buffer >> element->beforeShCircuitHighestOperatingVoltage; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformer_highSideMinOperatingU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformer_beforeShortCircuitAnglePf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->highSideMinOperatingU; - if (buffer.fail()) - return false; - else + buffer >> element->beforeShortCircuitAnglePf; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformer_isPartOfGeneratorUnit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformer_highSideMinOperatingU(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->isPartOfGeneratorUnit; - if (buffer.fail()) - return false; - else + buffer >> element->highSideMinOperatingU; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformer_operationalValuesConsidered(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformer_isPartOfGeneratorUnit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->operationalValuesConsidered; - if (buffer.fail()) - return false; - else + buffer >> element->isPartOfGeneratorUnit; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_PowerTransformerEnd_PowerTransformer(BaseClass*, BaseClass*); -bool assign_PowerTransformer_PowerTransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_PowerTransformer_operationalValuesConsidered(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { PowerTransformer* element = dynamic_cast(BaseClass_ptr1); - PowerTransformerEnd* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->PowerTransformerEnd.begin(), element->PowerTransformerEnd.end(), element2) == element->PowerTransformerEnd.end()) + buffer >> element->operationalValuesConsidered; + if (!buffer.fail()) { - element->PowerTransformerEnd.push_back(element2); - return assign_PowerTransformerEnd_PowerTransformer(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_PowerTransformer_beforeShCircuitHighestOperatingCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->beforeShCircuitHighestOperatingCurrent; if (!buffer.str().empty()) @@ -165,7 +165,8 @@ bool get_PowerTransformer_beforeShCircuitHighestOperatingCurrent(const BaseClass bool get_PowerTransformer_beforeShCircuitHighestOperatingVoltage(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->beforeShCircuitHighestOperatingVoltage; if (!buffer.str().empty()) @@ -179,7 +180,8 @@ bool get_PowerTransformer_beforeShCircuitHighestOperatingVoltage(const BaseClass bool get_PowerTransformer_beforeShortCircuitAnglePf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->beforeShortCircuitAnglePf; if (!buffer.str().empty()) @@ -193,7 +195,8 @@ bool get_PowerTransformer_beforeShortCircuitAnglePf(const BaseClass* BaseClass_p bool get_PowerTransformer_highSideMinOperatingU(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->highSideMinOperatingU; if (!buffer.str().empty()) @@ -207,7 +210,8 @@ bool get_PowerTransformer_highSideMinOperatingU(const BaseClass* BaseClass_ptr1, bool get_PowerTransformer_isPartOfGeneratorUnit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->isPartOfGeneratorUnit; if (!buffer.str().empty()) @@ -221,7 +225,8 @@ bool get_PowerTransformer_isPartOfGeneratorUnit(const BaseClass* BaseClass_ptr1, bool get_PowerTransformer_operationalValuesConsidered(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->operationalValuesConsidered; if (!buffer.str().empty()) @@ -233,8 +238,6 @@ bool get_PowerTransformer_operationalValuesConsidered(const BaseClass* BaseClass return false; } - - const char PowerTransformer::debugName[] = "PowerTransformer"; const char* PowerTransformer::debugString() const { @@ -243,22 +246,22 @@ const char* PowerTransformer::debugString() const void PowerTransformer::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PowerTransformer"), &PowerTransformer_factory)); + factory_map.emplace("cim:PowerTransformer", &PowerTransformer_factory); } void PowerTransformer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PowerTransformer.beforeShCircuitHighestOperatingCurrent"), &assign_PowerTransformer_beforeShCircuitHighestOperatingCurrent)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformer.beforeShCircuitHighestOperatingVoltage"), &assign_PowerTransformer_beforeShCircuitHighestOperatingVoltage)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformer.beforeShortCircuitAnglePf"), &assign_PowerTransformer_beforeShortCircuitAnglePf)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformer.highSideMinOperatingU"), &assign_PowerTransformer_highSideMinOperatingU)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformer.isPartOfGeneratorUnit"), &assign_PowerTransformer_isPartOfGeneratorUnit)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformer.operationalValuesConsidered"), &assign_PowerTransformer_operationalValuesConsidered)); + assign_map.emplace("cim:PowerTransformer.beforeShCircuitHighestOperatingCurrent", &assign_PowerTransformer_beforeShCircuitHighestOperatingCurrent); + assign_map.emplace("cim:PowerTransformer.beforeShCircuitHighestOperatingVoltage", &assign_PowerTransformer_beforeShCircuitHighestOperatingVoltage); + assign_map.emplace("cim:PowerTransformer.beforeShortCircuitAnglePf", &assign_PowerTransformer_beforeShortCircuitAnglePf); + assign_map.emplace("cim:PowerTransformer.highSideMinOperatingU", &assign_PowerTransformer_highSideMinOperatingU); + assign_map.emplace("cim:PowerTransformer.isPartOfGeneratorUnit", &assign_PowerTransformer_isPartOfGeneratorUnit); + assign_map.emplace("cim:PowerTransformer.operationalValuesConsidered", &assign_PowerTransformer_operationalValuesConsidered); } void PowerTransformer::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PowerTransformer.PowerTransformerEnd"), &assign_PowerTransformer_PowerTransformerEnd)); + assign_map.emplace("cim:PowerTransformer.PowerTransformerEnd", &assign_PowerTransformer_PowerTransformerEnd); } void PowerTransformer::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/PowerTransformer.hpp b/CGMES_2.4.15_16FEB2016/PowerTransformer.hpp index 277963531..0970df0d5 100644 --- a/CGMES_2.4.15_16FEB2016/PowerTransformer.hpp +++ b/CGMES_2.4.15_16FEB2016/PowerTransformer.hpp @@ -21,9 +21,7 @@ namespace CIMPP { class PowerTransformerEnd; - /* - An electrical device consisting of two or more coupled windings, with or without a magnetic core, for introducing mutual coupling between electric circuits. Transformers can be used to control voltage and phase shift (active power flow). A power transformer may be composed of separate transformer tanks that need not be identical. A power transformer can be modeled with or without tanks and is intended for use in both balanced and unbalanced representations. A power transformer typically has two terminals, but may have one (grounding), three or more terminals. The inherited association ConductingEquipment.BaseVoltage should not be used. The association from TransformerEnd to BaseVoltage should be used instead. - */ + /** \brief An electrical device consisting of two or more coupled windings, with or without a magnetic core, for introducing mutual coupling between electric circuits. Transformers can be used to control voltage and phase shift (active power flow). A power transformer may be composed of separate transformer tanks that need not be identical. A power transformer can be modeled with or without tanks and is intended for use in both balanced and unbalanced representations. A power transformer typically has two terminals, but may have one (grounding), three or more terminals. The inherited association ConductingEquipment.BaseVoltage should not be used. The association from TransformerEnd to BaseVoltage should be used instead. */ class PowerTransformer : public ConductingEquipment { public: @@ -31,13 +29,26 @@ namespace CIMPP PowerTransformer(); ~PowerTransformer() override; - std::list PowerTransformerEnd; /* The power transformer of this power transformer end. Default: 0 */ - CIMPP::CurrentFlow beforeShCircuitHighestOperatingCurrent; /* The highest operating current (Ib in the IEC 60909-0) before short circuit (depends on network configuration and relevant reliability philosophy). It is used for calculation of the impedance correction factor KT defined in IEC 60909-0. Default: nullptr */ - CIMPP::Voltage beforeShCircuitHighestOperatingVoltage; /* The highest operating voltage (Ub in the IEC 60909-0) before short circuit. It is used for calculation of the impedance correction factor KT defined in IEC 60909-0. This is worst case voltage on the low side winding (Section 3.7.1 in the standard). Used to define operating conditions. Default: nullptr */ - CIMPP::AngleDegrees beforeShortCircuitAnglePf; /* The angle of power factor before short circuit (phib in the IEC 60909-0). It is used for calculation of the impedance correction factor KT defined in IEC 60909-0. This is the worst case power factor. Used to define operating conditions. Default: nullptr */ - CIMPP::Voltage highSideMinOperatingU; /* The minimum operating voltage (uQmin in the IEC 60909-0) at the high voltage side (Q side) of the unit transformer of the power station unit. A value well established from long-term operating experience of the system. It is used for calculation of the impedance correction factor KG defined in IEC 60909-0 Default: nullptr */ - CIMPP::Boolean isPartOfGeneratorUnit; /* Indicates whether the machine is part of a power station unit. Used for short circuit data exchange according to IEC 60909 Default: false */ - CIMPP::Boolean operationalValuesConsidered; /* It is used to define if the data (other attributes related to short circuit data exchange) defines long term operational conditions or not. Used for short circuit data exchange according to IEC 60909. Default: false */ + /** \brief The power transformer of this power transformer end. Default: 0 */ + std::list PowerTransformerEnd; + + /** \brief The highest operating current (Ib in the IEC 60909-0) before short circuit (depends on network configuration and relevant reliability philosophy). It is used for calculation of the impedance correction factor KT defined in IEC 60909-0. Default: nullptr */ + CIMPP::CurrentFlow beforeShCircuitHighestOperatingCurrent; + + /** \brief The highest operating voltage (Ub in the IEC 60909-0) before short circuit. It is used for calculation of the impedance correction factor KT defined in IEC 60909-0. This is worst case voltage on the low side winding (Section 3.7.1 in the standard). Used to define operating conditions. Default: nullptr */ + CIMPP::Voltage beforeShCircuitHighestOperatingVoltage; + + /** \brief The angle of power factor before short circuit (phib in the IEC 60909-0). It is used for calculation of the impedance correction factor KT defined in IEC 60909-0. This is the worst case power factor. Used to define operating conditions. Default: nullptr */ + CIMPP::AngleDegrees beforeShortCircuitAnglePf; + + /** \brief The minimum operating voltage (uQmin in the IEC 60909-0) at the high voltage side (Q side) of the unit transformer of the power station unit. A value well established from long-term operating experience of the system. It is used for calculation of the impedance correction factor KG defined in IEC 60909-0 Default: nullptr */ + CIMPP::Voltage highSideMinOperatingU; + + /** \brief Indicates whether the machine is part of a power station unit. Used for short circuit data exchange according to IEC 60909 Default: false */ + CIMPP::Boolean isPartOfGeneratorUnit; + + /** \brief It is used to define if the data (other attributes related to short circuit data exchange) defines long term operational conditions or not. Used for short circuit data exchange according to IEC 60909. Default: false */ + CIMPP::Boolean operationalValuesConsidered; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/PowerTransformerEnd.cpp b/CGMES_2.4.15_16FEB2016/PowerTransformerEnd.cpp index beb25fa82..cb0bb8628 100644 --- a/CGMES_2.4.15_16FEB2016/PowerTransformerEnd.cpp +++ b/CGMES_2.4.15_16FEB2016/PowerTransformerEnd.cpp @@ -9,23 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "PowerTransformer.hpp" -#include "Susceptance.hpp" -#include "Susceptance.hpp" -#include "WindingConnection.hpp" -#include "Conductance.hpp" -#include "Conductance.hpp" -#include "Integer.hpp" -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "ApparentPower.hpp" -#include "Voltage.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -PowerTransformerEnd::PowerTransformerEnd() : PowerTransformer(nullptr) {}; -PowerTransformerEnd::~PowerTransformerEnd() {}; +PowerTransformerEnd::PowerTransformerEnd() : PowerTransformer(nullptr) {} +PowerTransformerEnd::~PowerTransformerEnd() {} static const std::list PossibleProfilesForClass = { @@ -64,184 +52,209 @@ PowerTransformerEnd::getPossibleProfilesForAttributes() const return map; } +bool assign_PowerTransformer_PowerTransformerEnd(BaseClass*, BaseClass*); +bool assign_PowerTransformerEnd_PowerTransformer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + PowerTransformer* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PowerTransformer != element2) + { + element->PowerTransformer = element2; + return assign_PowerTransformer_PowerTransformerEnd(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_PowerTransformerEnd_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_b(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_b0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_b0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_connectionKind(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_connectionKind(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->connectionKind; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_g(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_g(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_g0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_g0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_phaseAngleClock(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_phaseAngleClock(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->phaseAngleClock; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_r0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_ratedS(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_ratedS(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedS; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_ratedU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_ratedU(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedU; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_x(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_x0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_PowerTransformer_PowerTransformerEnd(BaseClass*, BaseClass*); -bool assign_PowerTransformerEnd_PowerTransformer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_PowerTransformerEnd_PowerTransformer(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); - PowerTransformer* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->PowerTransformer != element2) + if (element->PowerTransformer != 0) { - element->PowerTransformer = element2; - return assign_PowerTransformer_PowerTransformerEnd(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->PowerTransformer); + return true; } - return true; } return false; } bool get_PowerTransformerEnd_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b; if (!buffer.str().empty()) @@ -255,7 +268,8 @@ bool get_PowerTransformerEnd_b(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_PowerTransformerEnd_b0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b0; if (!buffer.str().empty()) @@ -267,9 +281,25 @@ bool get_PowerTransformerEnd_b0(const BaseClass* BaseClass_ptr1, std::stringstre return false; } +bool get_PowerTransformerEnd_connectionKind(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->connectionKind; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_PowerTransformerEnd_g(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g; if (!buffer.str().empty()) @@ -283,7 +313,8 @@ bool get_PowerTransformerEnd_g(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_PowerTransformerEnd_g0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g0; if (!buffer.str().empty()) @@ -297,7 +328,8 @@ bool get_PowerTransformerEnd_g0(const BaseClass* BaseClass_ptr1, std::stringstre bool get_PowerTransformerEnd_phaseAngleClock(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->phaseAngleClock; if (!buffer.str().empty()) @@ -311,7 +343,8 @@ bool get_PowerTransformerEnd_phaseAngleClock(const BaseClass* BaseClass_ptr1, st bool get_PowerTransformerEnd_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -325,7 +358,8 @@ bool get_PowerTransformerEnd_r(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_PowerTransformerEnd_r0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r0; if (!buffer.str().empty()) @@ -339,7 +373,8 @@ bool get_PowerTransformerEnd_r0(const BaseClass* BaseClass_ptr1, std::stringstre bool get_PowerTransformerEnd_ratedS(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedS; if (!buffer.str().empty()) @@ -353,7 +388,8 @@ bool get_PowerTransformerEnd_ratedS(const BaseClass* BaseClass_ptr1, std::string bool get_PowerTransformerEnd_ratedU(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedU; if (!buffer.str().empty()) @@ -367,7 +403,8 @@ bool get_PowerTransformerEnd_ratedU(const BaseClass* BaseClass_ptr1, std::string bool get_PowerTransformerEnd_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x; if (!buffer.str().empty()) @@ -381,7 +418,8 @@ bool get_PowerTransformerEnd_x(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_PowerTransformerEnd_x0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x0; if (!buffer.str().empty()) @@ -393,35 +431,6 @@ bool get_PowerTransformerEnd_x0(const BaseClass* BaseClass_ptr1, std::stringstre return false; } - -bool get_PowerTransformerEnd_PowerTransformer(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->PowerTransformer != 0) - { - BaseClass_list.push_back(element->PowerTransformer); - return true; - } - } - return false; -} - - -bool get_PowerTransformerEnd_connectionKind(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->connectionKind; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char PowerTransformerEnd::debugName[] = "PowerTransformerEnd"; const char* PowerTransformerEnd::debugString() const { @@ -430,28 +439,28 @@ const char* PowerTransformerEnd::debugString() const void PowerTransformerEnd::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd"), &PowerTransformerEnd_factory)); + factory_map.emplace("cim:PowerTransformerEnd", &PowerTransformerEnd_factory); } void PowerTransformerEnd::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.b"), &assign_PowerTransformerEnd_b)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.b0"), &assign_PowerTransformerEnd_b0)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.connectionKind"), &assign_PowerTransformerEnd_connectionKind)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.g"), &assign_PowerTransformerEnd_g)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.g0"), &assign_PowerTransformerEnd_g0)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.phaseAngleClock"), &assign_PowerTransformerEnd_phaseAngleClock)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.r"), &assign_PowerTransformerEnd_r)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.r0"), &assign_PowerTransformerEnd_r0)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.ratedS"), &assign_PowerTransformerEnd_ratedS)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.ratedU"), &assign_PowerTransformerEnd_ratedU)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.x"), &assign_PowerTransformerEnd_x)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.x0"), &assign_PowerTransformerEnd_x0)); + assign_map.emplace("cim:PowerTransformerEnd.b", &assign_PowerTransformerEnd_b); + assign_map.emplace("cim:PowerTransformerEnd.b0", &assign_PowerTransformerEnd_b0); + assign_map.emplace("cim:PowerTransformerEnd.connectionKind", &assign_PowerTransformerEnd_connectionKind); + assign_map.emplace("cim:PowerTransformerEnd.g", &assign_PowerTransformerEnd_g); + assign_map.emplace("cim:PowerTransformerEnd.g0", &assign_PowerTransformerEnd_g0); + assign_map.emplace("cim:PowerTransformerEnd.phaseAngleClock", &assign_PowerTransformerEnd_phaseAngleClock); + assign_map.emplace("cim:PowerTransformerEnd.r", &assign_PowerTransformerEnd_r); + assign_map.emplace("cim:PowerTransformerEnd.r0", &assign_PowerTransformerEnd_r0); + assign_map.emplace("cim:PowerTransformerEnd.ratedS", &assign_PowerTransformerEnd_ratedS); + assign_map.emplace("cim:PowerTransformerEnd.ratedU", &assign_PowerTransformerEnd_ratedU); + assign_map.emplace("cim:PowerTransformerEnd.x", &assign_PowerTransformerEnd_x); + assign_map.emplace("cim:PowerTransformerEnd.x0", &assign_PowerTransformerEnd_x0); } void PowerTransformerEnd::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.PowerTransformer"), &assign_PowerTransformerEnd_PowerTransformer)); + assign_map.emplace("cim:PowerTransformerEnd.PowerTransformer", &assign_PowerTransformerEnd_PowerTransformer); } void PowerTransformerEnd::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/PowerTransformerEnd.hpp b/CGMES_2.4.15_16FEB2016/PowerTransformerEnd.hpp index bb20e0c1f..b4f4de48e 100644 --- a/CGMES_2.4.15_16FEB2016/PowerTransformerEnd.hpp +++ b/CGMES_2.4.15_16FEB2016/PowerTransformerEnd.hpp @@ -25,9 +25,7 @@ namespace CIMPP { class PowerTransformer; - /* - A PowerTransformerEnd is associated with each Terminal of a PowerTransformer. The impedance values r, r0, x, and x0 of a PowerTransformerEnd represents a star equivalent as follows 1) for a two Terminal PowerTransformer the high voltage PowerTransformerEnd has non zero values on r, r0, x, and x0 while the low voltage PowerTransformerEnd has zero values for r, r0, x, and x0. 2) for a three Terminal PowerTransformer the three PowerTransformerEnds represents a star equivalent with each leg in the star represented by r, r0, x, and x0 values. 3) for a PowerTransformer with more than three Terminals the PowerTransformerEnd impedance values cannot be used. Instead use the TransformerMeshImpedance or split the transformer into multiple PowerTransformers. - */ + /** \brief A PowerTransformerEnd is associated with each Terminal of a PowerTransformer. The impedance values r, r0, x, and x0 of a PowerTransformerEnd represents a star equivalent as follows 1) for a two Terminal PowerTransformer the high voltage PowerTransformerEnd has non zero values on r, r0, x, and x0 while the low voltage PowerTransformerEnd has zero values for r, r0, x, and x0. 2) for a three Terminal PowerTransformer the three PowerTransformerEnds represents a star equivalent with each leg in the star represented by r, r0, x, and x0 values. 3) for a PowerTransformer with more than three Terminals the PowerTransformerEnd impedance values cannot be used. Instead use the TransformerMeshImpedance or split the transformer into multiple PowerTransformers. */ class PowerTransformerEnd : public TransformerEnd { public: @@ -35,19 +33,44 @@ namespace CIMPP PowerTransformerEnd(); ~PowerTransformerEnd() override; - CIMPP::PowerTransformer* PowerTransformer; /* The ends of this power transformer. Default: 0 */ - CIMPP::Susceptance b; /* Magnetizing branch susceptance (B mag). The value can be positive or negative. Default: nullptr */ - CIMPP::Susceptance b0; /* Zero sequence magnetizing branch susceptance. Default: nullptr */ - CIMPP::WindingConnection connectionKind; /* Kind of connection. Default: 0 */ - CIMPP::Conductance g; /* Magnetizing branch conductance. Default: nullptr */ - CIMPP::Conductance g0; /* Zero sequence magnetizing branch conductance (star-model). Default: nullptr */ - CIMPP::Integer phaseAngleClock; /* Terminal voltage phase angle displacement where 360 degrees are represented with clock hours. The valid values are 0 to 11. For example, for the secondary side end of a transformer with vector group code of `Dyn11`, specify the connection kind as wye with neutral and specify the phase angle of the clock as 11. The clock value of the transformer end number specified as 1, is assumed to be zero. Note the transformer end number is not assumed to be the same as the terminal sequence number. Default: 0 */ - CIMPP::Resistance r; /* Resistance (star-model) of the transformer end. The attribute shall be equal or greater than zero for non-equivalent transformers. Default: nullptr */ - CIMPP::Resistance r0; /* Zero sequence series resistance (star-model) of the transformer end. Default: nullptr */ - CIMPP::ApparentPower ratedS; /* Normal apparent power rating. The attribute shall be a positive value. For a two-winding transformer the values for the high and low voltage sides shall be identical. Default: nullptr */ - CIMPP::Voltage ratedU; /* Rated voltage: phase-phase for three-phase windings, and either phase-phase or phase-neutral for single-phase windings. A high voltage side, as given by TransformerEnd.endNumber, shall have a ratedU that is greater or equal than ratedU for the lower voltage sides. Default: nullptr */ - CIMPP::Reactance x; /* Positive sequence series reactance (star-model) of the transformer end. Default: nullptr */ - CIMPP::Reactance x0; /* Zero sequence series reactance of the transformer end. Default: nullptr */ + /** \brief The ends of this power transformer. Default: 0 */ + CIMPP::PowerTransformer* PowerTransformer; + + /** \brief Magnetizing branch susceptance (B mag). The value can be positive or negative. Default: nullptr */ + CIMPP::Susceptance b; + + /** \brief Zero sequence magnetizing branch susceptance. Default: nullptr */ + CIMPP::Susceptance b0; + + /** \brief Kind of connection. Default: 0 */ + CIMPP::WindingConnection connectionKind; + + /** \brief Magnetizing branch conductance. Default: nullptr */ + CIMPP::Conductance g; + + /** \brief Zero sequence magnetizing branch conductance (star-model). Default: nullptr */ + CIMPP::Conductance g0; + + /** \brief Terminal voltage phase angle displacement where 360 degrees are represented with clock hours. The valid values are 0 to 11. For example, for the secondary side end of a transformer with vector group code of `Dyn11`, specify the connection kind as wye with neutral and specify the phase angle of the clock as 11. The clock value of the transformer end number specified as 1, is assumed to be zero. Note the transformer end number is not assumed to be the same as the terminal sequence number. Default: 0 */ + CIMPP::Integer phaseAngleClock; + + /** \brief Resistance (star-model) of the transformer end. The attribute shall be equal or greater than zero for non-equivalent transformers. Default: nullptr */ + CIMPP::Resistance r; + + /** \brief Zero sequence series resistance (star-model) of the transformer end. Default: nullptr */ + CIMPP::Resistance r0; + + /** \brief Normal apparent power rating. The attribute shall be a positive value. For a two-winding transformer the values for the high and low voltage sides shall be identical. Default: nullptr */ + CIMPP::ApparentPower ratedS; + + /** \brief Rated voltage: phase-phase for three-phase windings, and either phase-phase or phase-neutral for single-phase windings. A high voltage side, as given by TransformerEnd.endNumber, shall have a ratedU that is greater or equal than ratedU for the lower voltage sides. Default: nullptr */ + CIMPP::Voltage ratedU; + + /** \brief Positive sequence series reactance (star-model) of the transformer end. Default: nullptr */ + CIMPP::Reactance x; + + /** \brief Zero sequence series reactance of the transformer end. Default: nullptr */ + CIMPP::Reactance x0; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ProprietaryParameterDynamics.cpp b/CGMES_2.4.15_16FEB2016/ProprietaryParameterDynamics.cpp index eeaf20aaf..cc1ac6f02 100644 --- a/CGMES_2.4.15_16FEB2016/ProprietaryParameterDynamics.cpp +++ b/CGMES_2.4.15_16FEB2016/ProprietaryParameterDynamics.cpp @@ -26,15 +26,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindPlantUserDefined.hpp" #include "WindType1or2UserDefined.hpp" #include "WindType3or4UserDefined.hpp" -#include "Boolean.hpp" -#include "Simple_Float.hpp" -#include "Integer.hpp" -#include "Integer.hpp" using namespace CIMPP; -ProprietaryParameterDynamics::ProprietaryParameterDynamics() : AsynchronousMachineUserDefined(nullptr), DiscontinuousExcitationControlUserDefined(nullptr), ExcitationSystemUserDefined(nullptr), LoadUserDefined(nullptr), MechanicalLoadUserDefined(nullptr), OverexcitationLimiterUserDefined(nullptr), PFVArControllerType1UserDefined(nullptr), PFVArControllerType2UserDefined(nullptr), PowerSystemStabilizerUserDefined(nullptr), SynchronousMachineUserDefined(nullptr), TurbineGovernorUserDefined(nullptr), TurbineLoadControllerUserDefined(nullptr), UnderexcitationLimiterUserDefined(nullptr), VoltageAdjusterUserDefined(nullptr), VoltageCompensatorUserDefined(nullptr), WindPlantUserDefined(nullptr), WindType1or2UserDefined(nullptr), WindType3or4UserDefined(nullptr) {}; -ProprietaryParameterDynamics::~ProprietaryParameterDynamics() {}; +ProprietaryParameterDynamics::ProprietaryParameterDynamics() : AsynchronousMachineUserDefined(nullptr), DiscontinuousExcitationControlUserDefined(nullptr), ExcitationSystemUserDefined(nullptr), LoadUserDefined(nullptr), MechanicalLoadUserDefined(nullptr), OverexcitationLimiterUserDefined(nullptr), PFVArControllerType1UserDefined(nullptr), PFVArControllerType2UserDefined(nullptr), PowerSystemStabilizerUserDefined(nullptr), SynchronousMachineUserDefined(nullptr), TurbineGovernorUserDefined(nullptr), TurbineLoadControllerUserDefined(nullptr), UnderexcitationLimiterUserDefined(nullptr), VoltageAdjusterUserDefined(nullptr), VoltageCompensatorUserDefined(nullptr), WindPlantUserDefined(nullptr), WindType1or2UserDefined(nullptr), WindType3or4UserDefined(nullptr) {} +ProprietaryParameterDynamics::~ProprietaryParameterDynamics() {} static const std::list PossibleProfilesForClass = { @@ -82,60 +78,6 @@ ProprietaryParameterDynamics::getPossibleProfilesForAttributes() const return map; } - -bool assign_ProprietaryParameterDynamics_booleanParameterValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->booleanParameterValue; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_ProprietaryParameterDynamics_floatParameterValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->floatParameterValue; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_ProprietaryParameterDynamics_integerParameterValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->integerParameterValue; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_ProprietaryParameterDynamics_parameterNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->parameterNumber; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_AsynchronousMachineUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_AsynchronousMachineUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -152,6 +94,7 @@ bool assign_ProprietaryParameterDynamics_AsynchronousMachineUserDefined(BaseClas } return false; } + bool assign_DiscontinuousExcitationControlUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_DiscontinuousExcitationControlUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -168,6 +111,7 @@ bool assign_ProprietaryParameterDynamics_DiscontinuousExcitationControlUserDefin } return false; } + bool assign_ExcitationSystemUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_ExcitationSystemUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -184,6 +128,7 @@ bool assign_ProprietaryParameterDynamics_ExcitationSystemUserDefined(BaseClass* } return false; } + bool assign_LoadUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_LoadUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -200,6 +145,7 @@ bool assign_ProprietaryParameterDynamics_LoadUserDefined(BaseClass* BaseClass_pt } return false; } + bool assign_MechanicalLoadUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_MechanicalLoadUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -216,6 +162,7 @@ bool assign_ProprietaryParameterDynamics_MechanicalLoadUserDefined(BaseClass* Ba } return false; } + bool assign_OverexcitationLimiterUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_OverexcitationLimiterUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -232,6 +179,7 @@ bool assign_ProprietaryParameterDynamics_OverexcitationLimiterUserDefined(BaseCl } return false; } + bool assign_PFVArControllerType1UserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_PFVArControllerType1UserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -248,6 +196,7 @@ bool assign_ProprietaryParameterDynamics_PFVArControllerType1UserDefined(BaseCla } return false; } + bool assign_PFVArControllerType2UserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_PFVArControllerType2UserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -264,6 +213,7 @@ bool assign_ProprietaryParameterDynamics_PFVArControllerType2UserDefined(BaseCla } return false; } + bool assign_PowerSystemStabilizerUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_PowerSystemStabilizerUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -280,6 +230,7 @@ bool assign_ProprietaryParameterDynamics_PowerSystemStabilizerUserDefined(BaseCl } return false; } + bool assign_SynchronousMachineUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_SynchronousMachineUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -296,6 +247,7 @@ bool assign_ProprietaryParameterDynamics_SynchronousMachineUserDefined(BaseClass } return false; } + bool assign_TurbineGovernorUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_TurbineGovernorUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -312,6 +264,7 @@ bool assign_ProprietaryParameterDynamics_TurbineGovernorUserDefined(BaseClass* B } return false; } + bool assign_TurbineLoadControllerUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_TurbineLoadControllerUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -328,6 +281,7 @@ bool assign_ProprietaryParameterDynamics_TurbineLoadControllerUserDefined(BaseCl } return false; } + bool assign_UnderexcitationLimiterUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_UnderexcitationLimiterUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -344,6 +298,7 @@ bool assign_ProprietaryParameterDynamics_UnderexcitationLimiterUserDefined(BaseC } return false; } + bool assign_VoltageAdjusterUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_VoltageAdjusterUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -360,6 +315,7 @@ bool assign_ProprietaryParameterDynamics_VoltageAdjusterUserDefined(BaseClass* B } return false; } + bool assign_VoltageCompensatorUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_VoltageCompensatorUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -376,6 +332,7 @@ bool assign_ProprietaryParameterDynamics_VoltageCompensatorUserDefined(BaseClass } return false; } + bool assign_WindPlantUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_WindPlantUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -392,6 +349,7 @@ bool assign_ProprietaryParameterDynamics_WindPlantUserDefined(BaseClass* BaseCla } return false; } + bool assign_WindType1or2UserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_WindType1or2UserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -408,6 +366,7 @@ bool assign_ProprietaryParameterDynamics_WindType1or2UserDefined(BaseClass* Base } return false; } + bool assign_WindType3or4UserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_WindType3or4UserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -425,66 +384,66 @@ bool assign_ProprietaryParameterDynamics_WindType3or4UserDefined(BaseClass* Base return false; } -bool get_ProprietaryParameterDynamics_booleanParameterValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_ProprietaryParameterDynamics_booleanParameterValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->booleanParameterValue; - if (!buffer.str().empty()) + buffer >> element->booleanParameterValue; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_ProprietaryParameterDynamics_floatParameterValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_ProprietaryParameterDynamics_floatParameterValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->floatParameterValue; - if (!buffer.str().empty()) + buffer >> element->floatParameterValue; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_ProprietaryParameterDynamics_integerParameterValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_ProprietaryParameterDynamics_integerParameterValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->integerParameterValue; - if (!buffer.str().empty()) + buffer >> element->integerParameterValue; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_ProprietaryParameterDynamics_parameterNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_ProprietaryParameterDynamics_parameterNumber(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->parameterNumber; - if (!buffer.str().empty()) + buffer >> element->parameterNumber; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_ProprietaryParameterDynamics_AsynchronousMachineUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->AsynchronousMachineUserDefined != 0) { @@ -497,7 +456,8 @@ bool get_ProprietaryParameterDynamics_AsynchronousMachineUserDefined(const BaseC bool get_ProprietaryParameterDynamics_DiscontinuousExcitationControlUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DiscontinuousExcitationControlUserDefined != 0) { @@ -510,7 +470,8 @@ bool get_ProprietaryParameterDynamics_DiscontinuousExcitationControlUserDefined( bool get_ProprietaryParameterDynamics_ExcitationSystemUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ExcitationSystemUserDefined != 0) { @@ -523,7 +484,8 @@ bool get_ProprietaryParameterDynamics_ExcitationSystemUserDefined(const BaseClas bool get_ProprietaryParameterDynamics_LoadUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->LoadUserDefined != 0) { @@ -536,7 +498,8 @@ bool get_ProprietaryParameterDynamics_LoadUserDefined(const BaseClass* BaseClass bool get_ProprietaryParameterDynamics_MechanicalLoadUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->MechanicalLoadUserDefined != 0) { @@ -549,7 +512,8 @@ bool get_ProprietaryParameterDynamics_MechanicalLoadUserDefined(const BaseClass* bool get_ProprietaryParameterDynamics_OverexcitationLimiterUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->OverexcitationLimiterUserDefined != 0) { @@ -562,7 +526,8 @@ bool get_ProprietaryParameterDynamics_OverexcitationLimiterUserDefined(const Bas bool get_ProprietaryParameterDynamics_PFVArControllerType1UserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PFVArControllerType1UserDefined != 0) { @@ -575,7 +540,8 @@ bool get_ProprietaryParameterDynamics_PFVArControllerType1UserDefined(const Base bool get_ProprietaryParameterDynamics_PFVArControllerType2UserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PFVArControllerType2UserDefined != 0) { @@ -588,7 +554,8 @@ bool get_ProprietaryParameterDynamics_PFVArControllerType2UserDefined(const Base bool get_ProprietaryParameterDynamics_PowerSystemStabilizerUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PowerSystemStabilizerUserDefined != 0) { @@ -601,7 +568,8 @@ bool get_ProprietaryParameterDynamics_PowerSystemStabilizerUserDefined(const Bas bool get_ProprietaryParameterDynamics_SynchronousMachineUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->SynchronousMachineUserDefined != 0) { @@ -614,7 +582,8 @@ bool get_ProprietaryParameterDynamics_SynchronousMachineUserDefined(const BaseCl bool get_ProprietaryParameterDynamics_TurbineGovernorUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->TurbineGovernorUserDefined != 0) { @@ -627,7 +596,8 @@ bool get_ProprietaryParameterDynamics_TurbineGovernorUserDefined(const BaseClass bool get_ProprietaryParameterDynamics_TurbineLoadControllerUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->TurbineLoadControllerUserDefined != 0) { @@ -640,7 +610,8 @@ bool get_ProprietaryParameterDynamics_TurbineLoadControllerUserDefined(const Bas bool get_ProprietaryParameterDynamics_UnderexcitationLimiterUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->UnderexcitationLimiterUserDefined != 0) { @@ -653,7 +624,8 @@ bool get_ProprietaryParameterDynamics_UnderexcitationLimiterUserDefined(const Ba bool get_ProprietaryParameterDynamics_VoltageAdjusterUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->VoltageAdjusterUserDefined != 0) { @@ -666,7 +638,8 @@ bool get_ProprietaryParameterDynamics_VoltageAdjusterUserDefined(const BaseClass bool get_ProprietaryParameterDynamics_VoltageCompensatorUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->VoltageCompensatorUserDefined != 0) { @@ -679,7 +652,8 @@ bool get_ProprietaryParameterDynamics_VoltageCompensatorUserDefined(const BaseCl bool get_ProprietaryParameterDynamics_WindPlantUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindPlantUserDefined != 0) { @@ -692,7 +666,8 @@ bool get_ProprietaryParameterDynamics_WindPlantUserDefined(const BaseClass* Base bool get_ProprietaryParameterDynamics_WindType1or2UserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindType1or2UserDefined != 0) { @@ -705,7 +680,8 @@ bool get_ProprietaryParameterDynamics_WindType1or2UserDefined(const BaseClass* B bool get_ProprietaryParameterDynamics_WindType3or4UserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindType3or4UserDefined != 0) { @@ -716,6 +692,65 @@ bool get_ProprietaryParameterDynamics_WindType3or4UserDefined(const BaseClass* B return false; } +bool get_ProprietaryParameterDynamics_booleanParameterValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->booleanParameterValue; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_ProprietaryParameterDynamics_floatParameterValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->floatParameterValue; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_ProprietaryParameterDynamics_integerParameterValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->integerParameterValue; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_ProprietaryParameterDynamics_parameterNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->parameterNumber; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char ProprietaryParameterDynamics::debugName[] = "ProprietaryParameterDynamics"; const char* ProprietaryParameterDynamics::debugString() const @@ -725,37 +760,37 @@ const char* ProprietaryParameterDynamics::debugString() const void ProprietaryParameterDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics"), &ProprietaryParameterDynamics_factory)); + factory_map.emplace("cim:ProprietaryParameterDynamics", &ProprietaryParameterDynamics_factory); } void ProprietaryParameterDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.booleanParameterValue"), &assign_ProprietaryParameterDynamics_booleanParameterValue)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.floatParameterValue"), &assign_ProprietaryParameterDynamics_floatParameterValue)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.integerParameterValue"), &assign_ProprietaryParameterDynamics_integerParameterValue)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.parameterNumber"), &assign_ProprietaryParameterDynamics_parameterNumber)); + assign_map.emplace("cim:ProprietaryParameterDynamics.booleanParameterValue", &assign_ProprietaryParameterDynamics_booleanParameterValue); + assign_map.emplace("cim:ProprietaryParameterDynamics.floatParameterValue", &assign_ProprietaryParameterDynamics_floatParameterValue); + assign_map.emplace("cim:ProprietaryParameterDynamics.integerParameterValue", &assign_ProprietaryParameterDynamics_integerParameterValue); + assign_map.emplace("cim:ProprietaryParameterDynamics.parameterNumber", &assign_ProprietaryParameterDynamics_parameterNumber); } void ProprietaryParameterDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.AsynchronousMachineUserDefined"), &assign_ProprietaryParameterDynamics_AsynchronousMachineUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.DiscontinuousExcitationControlUserDefined"), &assign_ProprietaryParameterDynamics_DiscontinuousExcitationControlUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.ExcitationSystemUserDefined"), &assign_ProprietaryParameterDynamics_ExcitationSystemUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.LoadUserDefined"), &assign_ProprietaryParameterDynamics_LoadUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.MechanicalLoadUserDefined"), &assign_ProprietaryParameterDynamics_MechanicalLoadUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.OverexcitationLimiterUserDefined"), &assign_ProprietaryParameterDynamics_OverexcitationLimiterUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.PFVArControllerType1UserDefined"), &assign_ProprietaryParameterDynamics_PFVArControllerType1UserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.PFVArControllerType2UserDefined"), &assign_ProprietaryParameterDynamics_PFVArControllerType2UserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.PowerSystemStabilizerUserDefined"), &assign_ProprietaryParameterDynamics_PowerSystemStabilizerUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.SynchronousMachineUserDefined"), &assign_ProprietaryParameterDynamics_SynchronousMachineUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.TurbineGovernorUserDefined"), &assign_ProprietaryParameterDynamics_TurbineGovernorUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.TurbineLoadControllerUserDefined"), &assign_ProprietaryParameterDynamics_TurbineLoadControllerUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.UnderexcitationLimiterUserDefined"), &assign_ProprietaryParameterDynamics_UnderexcitationLimiterUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.VoltageAdjusterUserDefined"), &assign_ProprietaryParameterDynamics_VoltageAdjusterUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.VoltageCompensatorUserDefined"), &assign_ProprietaryParameterDynamics_VoltageCompensatorUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.WindPlantUserDefined"), &assign_ProprietaryParameterDynamics_WindPlantUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.WindType1or2UserDefined"), &assign_ProprietaryParameterDynamics_WindType1or2UserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.WindType3or4UserDefined"), &assign_ProprietaryParameterDynamics_WindType3or4UserDefined)); + assign_map.emplace("cim:ProprietaryParameterDynamics.AsynchronousMachineUserDefined", &assign_ProprietaryParameterDynamics_AsynchronousMachineUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.DiscontinuousExcitationControlUserDefined", &assign_ProprietaryParameterDynamics_DiscontinuousExcitationControlUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.ExcitationSystemUserDefined", &assign_ProprietaryParameterDynamics_ExcitationSystemUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.LoadUserDefined", &assign_ProprietaryParameterDynamics_LoadUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.MechanicalLoadUserDefined", &assign_ProprietaryParameterDynamics_MechanicalLoadUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.OverexcitationLimiterUserDefined", &assign_ProprietaryParameterDynamics_OverexcitationLimiterUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.PFVArControllerType1UserDefined", &assign_ProprietaryParameterDynamics_PFVArControllerType1UserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.PFVArControllerType2UserDefined", &assign_ProprietaryParameterDynamics_PFVArControllerType2UserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.PowerSystemStabilizerUserDefined", &assign_ProprietaryParameterDynamics_PowerSystemStabilizerUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.SynchronousMachineUserDefined", &assign_ProprietaryParameterDynamics_SynchronousMachineUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.TurbineGovernorUserDefined", &assign_ProprietaryParameterDynamics_TurbineGovernorUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.TurbineLoadControllerUserDefined", &assign_ProprietaryParameterDynamics_TurbineLoadControllerUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.UnderexcitationLimiterUserDefined", &assign_ProprietaryParameterDynamics_UnderexcitationLimiterUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.VoltageAdjusterUserDefined", &assign_ProprietaryParameterDynamics_VoltageAdjusterUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.VoltageCompensatorUserDefined", &assign_ProprietaryParameterDynamics_VoltageCompensatorUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.WindPlantUserDefined", &assign_ProprietaryParameterDynamics_WindPlantUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.WindType1or2UserDefined", &assign_ProprietaryParameterDynamics_WindType1or2UserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.WindType3or4UserDefined", &assign_ProprietaryParameterDynamics_WindType3or4UserDefined); } void ProprietaryParameterDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/ProprietaryParameterDynamics.hpp b/CGMES_2.4.15_16FEB2016/ProprietaryParameterDynamics.hpp index a8d49dc07..3aa47cdc9 100644 --- a/CGMES_2.4.15_16FEB2016/ProprietaryParameterDynamics.hpp +++ b/CGMES_2.4.15_16FEB2016/ProprietaryParameterDynamics.hpp @@ -37,9 +37,7 @@ namespace CIMPP class WindType1or2UserDefined; class WindType3or4UserDefined; - /* - Supports definition of one or more parameters of several different datatypes for use by proprietary user-defined models. NOTE: This class does not inherit from IdentifiedObject since it is not intended that a single instance of it be referenced by more than one proprietary user-defined model instance. - */ + /** \brief Supports definition of one or more parameters of several different datatypes for use by proprietary user-defined models. NOTE: This class does not inherit from IdentifiedObject since it is not intended that a single instance of it be referenced by more than one proprietary user-defined model instance. */ class ProprietaryParameterDynamics : public BaseClass { public: @@ -47,28 +45,71 @@ namespace CIMPP ProprietaryParameterDynamics(); ~ProprietaryParameterDynamics() override; - CIMPP::AsynchronousMachineUserDefined* AsynchronousMachineUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::DiscontinuousExcitationControlUserDefined* DiscontinuousExcitationControlUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::ExcitationSystemUserDefined* ExcitationSystemUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::LoadUserDefined* LoadUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::MechanicalLoadUserDefined* MechanicalLoadUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::OverexcitationLimiterUserDefined* OverexcitationLimiterUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::PFVArControllerType1UserDefined* PFVArControllerType1UserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::PFVArControllerType2UserDefined* PFVArControllerType2UserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::PowerSystemStabilizerUserDefined* PowerSystemStabilizerUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::SynchronousMachineUserDefined* SynchronousMachineUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::TurbineGovernorUserDefined* TurbineGovernorUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::TurbineLoadControllerUserDefined* TurbineLoadControllerUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::UnderexcitationLimiterUserDefined* UnderexcitationLimiterUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::VoltageAdjusterUserDefined* VoltageAdjusterUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::VoltageCompensatorUserDefined* VoltageCompensatorUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::WindPlantUserDefined* WindPlantUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::WindType1or2UserDefined* WindType1or2UserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::WindType3or4UserDefined* WindType3or4UserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::Boolean booleanParameterValue; /* Used for boolean parameter value. If this attribute is populated, integerParameterValue and floatParameterValue will not be. Default: false */ - CIMPP::Simple_Float floatParameterValue; /* Used for floating point parameter value. If this attribute is populated, booleanParameterValue and integerParameterValue will not be. Default: nullptr */ - CIMPP::Integer integerParameterValue; /* Used for integer parameter value. If this attribute is populated, booleanParameterValue and floatParameterValue will not be. Default: 0 */ - CIMPP::Integer parameterNumber; /* Sequence number of the parameter among the set of parameters associated with the related proprietary user-defined model. Default: 0 */ + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::AsynchronousMachineUserDefined* AsynchronousMachineUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::DiscontinuousExcitationControlUserDefined* DiscontinuousExcitationControlUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::ExcitationSystemUserDefined* ExcitationSystemUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::LoadUserDefined* LoadUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::MechanicalLoadUserDefined* MechanicalLoadUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::OverexcitationLimiterUserDefined* OverexcitationLimiterUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::PFVArControllerType1UserDefined* PFVArControllerType1UserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::PFVArControllerType2UserDefined* PFVArControllerType2UserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::PowerSystemStabilizerUserDefined* PowerSystemStabilizerUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::SynchronousMachineUserDefined* SynchronousMachineUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::TurbineGovernorUserDefined* TurbineGovernorUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::TurbineLoadControllerUserDefined* TurbineLoadControllerUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::UnderexcitationLimiterUserDefined* UnderexcitationLimiterUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::VoltageAdjusterUserDefined* VoltageAdjusterUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::VoltageCompensatorUserDefined* VoltageCompensatorUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::WindPlantUserDefined* WindPlantUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::WindType1or2UserDefined* WindType1or2UserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::WindType3or4UserDefined* WindType3or4UserDefined; + + /** \brief Used for boolean parameter value. If this attribute is populated, integerParameterValue and floatParameterValue will not be. Default: false */ + CIMPP::Boolean booleanParameterValue; + + /** \brief Used for floating point parameter value. If this attribute is populated, booleanParameterValue and integerParameterValue will not be. Default: nullptr */ + CIMPP::Simple_Float floatParameterValue; + + /** \brief Used for integer parameter value. If this attribute is populated, booleanParameterValue and floatParameterValue will not be. Default: 0 */ + CIMPP::Integer integerParameterValue; + + /** \brief Sequence number of the parameter among the set of parameters associated with the related proprietary user-defined model. Default: 0 */ + CIMPP::Integer parameterNumber; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ProtectedSwitch.cpp b/CGMES_2.4.15_16FEB2016/ProtectedSwitch.cpp index f80191fcf..2b6f24097 100644 --- a/CGMES_2.4.15_16FEB2016/ProtectedSwitch.cpp +++ b/CGMES_2.4.15_16FEB2016/ProtectedSwitch.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ProtectedSwitch::ProtectedSwitch() {}; -ProtectedSwitch::~ProtectedSwitch() {}; +ProtectedSwitch::ProtectedSwitch() {} +ProtectedSwitch::~ProtectedSwitch() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ ProtectedSwitch::getPossibleProfilesForAttributes() const return map; } - - - - - const char ProtectedSwitch::debugName[] = "ProtectedSwitch"; const char* ProtectedSwitch::debugString() const { @@ -52,7 +47,7 @@ const char* ProtectedSwitch::debugString() const void ProtectedSwitch::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ProtectedSwitch"), &ProtectedSwitch_factory)); + factory_map.emplace("cim:ProtectedSwitch", &ProtectedSwitch_factory); } void ProtectedSwitch::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/ProtectedSwitch.hpp b/CGMES_2.4.15_16FEB2016/ProtectedSwitch.hpp index 188feccca..e7161aa71 100644 --- a/CGMES_2.4.15_16FEB2016/ProtectedSwitch.hpp +++ b/CGMES_2.4.15_16FEB2016/ProtectedSwitch.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A ProtectedSwitch is a switching device that can be operated by ProtectionEquipment. - */ + /** \brief A ProtectedSwitch is a switching device that can be operated by ProtectionEquipment. */ class ProtectedSwitch : public Switch { public: @@ -26,7 +24,6 @@ namespace CIMPP ProtectedSwitch(); ~ProtectedSwitch() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Pss1.cpp b/CGMES_2.4.15_16FEB2016/Pss1.cpp index 1dd19fafc..a1bc68391 100644 --- a/CGMES_2.4.15_16FEB2016/Pss1.cpp +++ b/CGMES_2.4.15_16FEB2016/Pss1.cpp @@ -8,26 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -Pss1::Pss1() {}; -Pss1::~Pss1() {}; +Pss1::Pss1() {} +Pss1::~Pss1() {} static const std::list PossibleProfilesForClass = { @@ -68,207 +53,220 @@ Pss1::getPossibleProfilesForAttributes() const return map; } - -bool assign_Pss1_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_kpe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_kpe(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpe; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_kw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_kw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_t10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_t10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_t7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_t8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_t8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_t9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_t9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_tpe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_tpe(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpe; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_vadat(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_vadat(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vadat; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_vsmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_vsmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_vsmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_vsmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_Pss1_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -282,7 +280,8 @@ bool get_Pss1_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_kpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpe; if (!buffer.str().empty()) @@ -296,7 +295,8 @@ bool get_Pss1_kpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -310,7 +310,8 @@ bool get_Pss1_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_kw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kw; if (!buffer.str().empty()) @@ -324,7 +325,8 @@ bool get_Pss1_kw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -338,7 +340,8 @@ bool get_Pss1_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t10; if (!buffer.str().empty()) @@ -352,7 +355,8 @@ bool get_Pss1_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -366,7 +370,8 @@ bool get_Pss1_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -380,7 +385,8 @@ bool get_Pss1_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t7; if (!buffer.str().empty()) @@ -394,7 +400,8 @@ bool get_Pss1_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t8; if (!buffer.str().empty()) @@ -408,7 +415,8 @@ bool get_Pss1_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t9; if (!buffer.str().empty()) @@ -422,7 +430,8 @@ bool get_Pss1_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_tpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpe; if (!buffer.str().empty()) @@ -436,7 +445,8 @@ bool get_Pss1_tpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_vadat(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vadat; if (!buffer.str().empty()) @@ -450,7 +460,8 @@ bool get_Pss1_vadat(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_vsmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmn; if (!buffer.str().empty()) @@ -464,7 +475,8 @@ bool get_Pss1_vsmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_vsmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmx; if (!buffer.str().empty()) @@ -476,8 +488,6 @@ bool get_Pss1_vsmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char Pss1::debugName[] = "Pss1"; const char* Pss1::debugString() const { @@ -486,26 +496,26 @@ const char* Pss1::debugString() const void Pss1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Pss1"), &Pss1_factory)); + factory_map.emplace("cim:Pss1", &Pss1_factory); } void Pss1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Pss1.kf"), &assign_Pss1_kf)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.kpe"), &assign_Pss1_kpe)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.ks"), &assign_Pss1_ks)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.kw"), &assign_Pss1_kw)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.pmin"), &assign_Pss1_pmin)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.t10"), &assign_Pss1_t10)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.t5"), &assign_Pss1_t5)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.t6"), &assign_Pss1_t6)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.t7"), &assign_Pss1_t7)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.t8"), &assign_Pss1_t8)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.t9"), &assign_Pss1_t9)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.tpe"), &assign_Pss1_tpe)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.vadat"), &assign_Pss1_vadat)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.vsmn"), &assign_Pss1_vsmn)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.vsmx"), &assign_Pss1_vsmx)); + assign_map.emplace("cim:Pss1.kf", &assign_Pss1_kf); + assign_map.emplace("cim:Pss1.kpe", &assign_Pss1_kpe); + assign_map.emplace("cim:Pss1.ks", &assign_Pss1_ks); + assign_map.emplace("cim:Pss1.kw", &assign_Pss1_kw); + assign_map.emplace("cim:Pss1.pmin", &assign_Pss1_pmin); + assign_map.emplace("cim:Pss1.t10", &assign_Pss1_t10); + assign_map.emplace("cim:Pss1.t5", &assign_Pss1_t5); + assign_map.emplace("cim:Pss1.t6", &assign_Pss1_t6); + assign_map.emplace("cim:Pss1.t7", &assign_Pss1_t7); + assign_map.emplace("cim:Pss1.t8", &assign_Pss1_t8); + assign_map.emplace("cim:Pss1.t9", &assign_Pss1_t9); + assign_map.emplace("cim:Pss1.tpe", &assign_Pss1_tpe); + assign_map.emplace("cim:Pss1.vadat", &assign_Pss1_vadat); + assign_map.emplace("cim:Pss1.vsmn", &assign_Pss1_vsmn); + assign_map.emplace("cim:Pss1.vsmx", &assign_Pss1_vsmx); } void Pss1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/Pss1.hpp b/CGMES_2.4.15_16FEB2016/Pss1.hpp index 1a0e315e9..d0b00aadb 100644 --- a/CGMES_2.4.15_16FEB2016/Pss1.hpp +++ b/CGMES_2.4.15_16FEB2016/Pss1.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Italian PSS - three input PSS (speed, frequency, power). - */ + /** \brief Italian PSS - three input PSS (speed, frequency, power). */ class Pss1 : public PowerSystemStabilizerDynamics { public: @@ -30,21 +28,50 @@ namespace CIMPP Pss1(); ~Pss1() override; - CIMPP::Simple_Float kf; /* Frequency power input gain (K). Typical Value = 5. Default: nullptr */ - CIMPP::Simple_Float kpe; /* Electric power input gain (K). Typical Value = 0.3. Default: nullptr */ - CIMPP::Simple_Float ks; /* PSS gain (K). Typical Value = 1. Default: nullptr */ - CIMPP::Simple_Float kw; /* Shaft speed power input gain (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU pmin; /* Minimum power PSS enabling (P). Typical Value = 0.25. Default: nullptr */ - CIMPP::Seconds t10; /* Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t5; /* Washout (T). Typical Value = 3.5. Default: nullptr */ - CIMPP::Seconds t6; /* Filter time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t7; /* Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t8; /* Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t9; /* Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tpe; /* Electric power filter time constant (T). Typical Value = 0.05. Default: nullptr */ - CIMPP::Boolean vadat; /* Default: false */ - CIMPP::PU vsmn; /* Stabilizer output max limit (V). Typical Value = -0.06. Default: nullptr */ - CIMPP::PU vsmx; /* Stabilizer output min limit (V). Typical Value = 0.06. Default: nullptr */ + /** \brief Frequency power input gain (K). Typical Value = 5. Default: nullptr */ + CIMPP::Simple_Float kf; + + /** \brief Electric power input gain (K). Typical Value = 0.3. Default: nullptr */ + CIMPP::Simple_Float kpe; + + /** \brief PSS gain (K). Typical Value = 1. Default: nullptr */ + CIMPP::Simple_Float ks; + + /** \brief Shaft speed power input gain (K). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float kw; + + /** \brief Minimum power PSS enabling (P). Typical Value = 0.25. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t10; + + /** \brief Washout (T). Typical Value = 3.5. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Filter time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t7; + + /** \brief Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t8; + + /** \brief Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t9; + + /** \brief Electric power filter time constant (T). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds tpe; + + /** \brief Default: false */ + CIMPP::Boolean vadat; + + /** \brief Stabilizer output max limit (V). Typical Value = -0.06. Default: nullptr */ + CIMPP::PU vsmn; + + /** \brief Stabilizer output min limit (V). Typical Value = 0.06. Default: nullptr */ + CIMPP::PU vsmx; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Pss1A.cpp b/CGMES_2.4.15_16FEB2016/Pss1A.cpp index 9f69780d8..219c3f935 100644 --- a/CGMES_2.4.15_16FEB2016/Pss1A.cpp +++ b/CGMES_2.4.15_16FEB2016/Pss1A.cpp @@ -8,33 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "InputSignalKind.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -Pss1A::Pss1A() {}; -Pss1A::~Pss1A() {}; +Pss1A::Pss1A() {} +Pss1A::~Pss1A() {} static const std::list PossibleProfilesForClass = { @@ -82,298 +60,318 @@ Pss1A::getPossibleProfilesForAttributes() const return map; } - -bool assign_Pss1A_a1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_a1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_a2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_a2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_a3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_a3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_a4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_a4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_a5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_a5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_a6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_a6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_a7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_a7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_a8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_a8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_inputSignalType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_inputSignalType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignalType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_tdelay(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_tdelay(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdelay; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_vcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_vcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vcl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_vcu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_vcu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vcu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_Pss1A_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a1; if (!buffer.str().empty()) @@ -387,7 +385,8 @@ bool get_Pss1A_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a2; if (!buffer.str().empty()) @@ -401,7 +400,8 @@ bool get_Pss1A_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_a3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a3; if (!buffer.str().empty()) @@ -415,7 +415,8 @@ bool get_Pss1A_a3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_a4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a4; if (!buffer.str().empty()) @@ -429,7 +430,8 @@ bool get_Pss1A_a4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_a5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a5; if (!buffer.str().empty()) @@ -443,7 +445,8 @@ bool get_Pss1A_a5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_a6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a6; if (!buffer.str().empty()) @@ -457,7 +460,8 @@ bool get_Pss1A_a6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_a7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a7; if (!buffer.str().empty()) @@ -471,7 +475,8 @@ bool get_Pss1A_a7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_a8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a8; if (!buffer.str().empty()) @@ -483,9 +488,25 @@ bool get_Pss1A_a8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } +bool get_Pss1A_inputSignalType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignalType; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_Pss1A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -499,7 +520,8 @@ bool get_Pss1A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -513,7 +535,8 @@ bool get_Pss1A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -527,7 +550,8 @@ bool get_Pss1A_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -541,7 +565,8 @@ bool get_Pss1A_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -555,7 +580,8 @@ bool get_Pss1A_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -569,7 +595,8 @@ bool get_Pss1A_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -583,7 +610,8 @@ bool get_Pss1A_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -597,7 +625,8 @@ bool get_Pss1A_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_tdelay(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdelay; if (!buffer.str().empty()) @@ -611,7 +640,8 @@ bool get_Pss1A_tdelay(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_Pss1A_vcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vcl; if (!buffer.str().empty()) @@ -625,7 +655,8 @@ bool get_Pss1A_vcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_vcu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vcu; if (!buffer.str().empty()) @@ -639,7 +670,8 @@ bool get_Pss1A_vcu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -653,7 +685,8 @@ bool get_Pss1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -665,22 +698,6 @@ bool get_Pss1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - -bool get_Pss1A_inputSignalType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignalType; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char Pss1A::debugName[] = "Pss1A"; const char* Pss1A::debugString() const { @@ -689,33 +706,33 @@ const char* Pss1A::debugString() const void Pss1A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Pss1A"), &Pss1A_factory)); + factory_map.emplace("cim:Pss1A", &Pss1A_factory); } void Pss1A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Pss1A.a1"), &assign_Pss1A_a1)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.a2"), &assign_Pss1A_a2)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.a3"), &assign_Pss1A_a3)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.a4"), &assign_Pss1A_a4)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.a5"), &assign_Pss1A_a5)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.a6"), &assign_Pss1A_a6)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.a7"), &assign_Pss1A_a7)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.a8"), &assign_Pss1A_a8)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.inputSignalType"), &assign_Pss1A_inputSignalType)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.kd"), &assign_Pss1A_kd)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.ks"), &assign_Pss1A_ks)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.t1"), &assign_Pss1A_t1)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.t2"), &assign_Pss1A_t2)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.t3"), &assign_Pss1A_t3)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.t4"), &assign_Pss1A_t4)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.t5"), &assign_Pss1A_t5)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.t6"), &assign_Pss1A_t6)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.tdelay"), &assign_Pss1A_tdelay)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.vcl"), &assign_Pss1A_vcl)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.vcu"), &assign_Pss1A_vcu)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.vrmax"), &assign_Pss1A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.vrmin"), &assign_Pss1A_vrmin)); + assign_map.emplace("cim:Pss1A.a1", &assign_Pss1A_a1); + assign_map.emplace("cim:Pss1A.a2", &assign_Pss1A_a2); + assign_map.emplace("cim:Pss1A.a3", &assign_Pss1A_a3); + assign_map.emplace("cim:Pss1A.a4", &assign_Pss1A_a4); + assign_map.emplace("cim:Pss1A.a5", &assign_Pss1A_a5); + assign_map.emplace("cim:Pss1A.a6", &assign_Pss1A_a6); + assign_map.emplace("cim:Pss1A.a7", &assign_Pss1A_a7); + assign_map.emplace("cim:Pss1A.a8", &assign_Pss1A_a8); + assign_map.emplace("cim:Pss1A.inputSignalType", &assign_Pss1A_inputSignalType); + assign_map.emplace("cim:Pss1A.kd", &assign_Pss1A_kd); + assign_map.emplace("cim:Pss1A.ks", &assign_Pss1A_ks); + assign_map.emplace("cim:Pss1A.t1", &assign_Pss1A_t1); + assign_map.emplace("cim:Pss1A.t2", &assign_Pss1A_t2); + assign_map.emplace("cim:Pss1A.t3", &assign_Pss1A_t3); + assign_map.emplace("cim:Pss1A.t4", &assign_Pss1A_t4); + assign_map.emplace("cim:Pss1A.t5", &assign_Pss1A_t5); + assign_map.emplace("cim:Pss1A.t6", &assign_Pss1A_t6); + assign_map.emplace("cim:Pss1A.tdelay", &assign_Pss1A_tdelay); + assign_map.emplace("cim:Pss1A.vcl", &assign_Pss1A_vcl); + assign_map.emplace("cim:Pss1A.vcu", &assign_Pss1A_vcu); + assign_map.emplace("cim:Pss1A.vrmax", &assign_Pss1A_vrmax); + assign_map.emplace("cim:Pss1A.vrmin", &assign_Pss1A_vrmin); } void Pss1A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/Pss1A.hpp b/CGMES_2.4.15_16FEB2016/Pss1A.hpp index 17cb944a4..e1b282d6d 100644 --- a/CGMES_2.4.15_16FEB2016/Pss1A.hpp +++ b/CGMES_2.4.15_16FEB2016/Pss1A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Single input power system stabilizer. It is a modified version in order to allow representation of various vendors' implementations on PSS type 1A. - */ + /** \brief Single input power system stabilizer. It is a modified version in order to allow representation of various vendors' implementations on PSS type 1A. */ class Pss1A : public PowerSystemStabilizerDynamics { public: @@ -30,28 +28,71 @@ namespace CIMPP Pss1A(); ~Pss1A() override; - CIMPP::PU a1; /* Notch filter parameter (A1). Default: nullptr */ - CIMPP::PU a2; /* Notch filter parameter (A2). Default: nullptr */ - CIMPP::PU a3; /* Notch filter parameter (A3). Default: nullptr */ - CIMPP::PU a4; /* Notch filter parameter (A4). Default: nullptr */ - CIMPP::PU a5; /* Notch filter parameter (A5). Default: nullptr */ - CIMPP::PU a6; /* Notch filter parameter (A6). Default: nullptr */ - CIMPP::PU a7; /* Notch filter parameter (A7). Default: nullptr */ - CIMPP::PU a8; /* Notch filter parameter (A8). Default: nullptr */ - CIMPP::InputSignalKind inputSignalType; /* Type of input signal. Default: 0 */ - CIMPP::Boolean kd; /* Selector (Kd). true = e used false = e not used. Default: false */ - CIMPP::PU ks; /* Stabilizer gain (Ks). Default: nullptr */ - CIMPP::Seconds t1; /* Lead/lag time constant (T1). Default: nullptr */ - CIMPP::Seconds t2; /* Lead/lag time constant (T2). Default: nullptr */ - CIMPP::Seconds t3; /* Lead/lag time constant (T3). Default: nullptr */ - CIMPP::Seconds t4; /* Lead/lag time constant (T4). Default: nullptr */ - CIMPP::Seconds t5; /* Washout time constant (T5). Default: nullptr */ - CIMPP::Seconds t6; /* Transducer time constant (T6). Default: nullptr */ - CIMPP::Seconds tdelay; /* Time constant (Tdelay). Default: nullptr */ - CIMPP::PU vcl; /* Stabilizer input cutoff threshold (Vcl). Default: nullptr */ - CIMPP::PU vcu; /* Stabilizer input cutoff threshold (Vcu). Default: nullptr */ - CIMPP::PU vrmax; /* Maximum stabilizer output (Vrmax). Default: nullptr */ - CIMPP::PU vrmin; /* Minimum stabilizer output (Vrmin). Default: nullptr */ + /** \brief Notch filter parameter (A1). Default: nullptr */ + CIMPP::PU a1; + + /** \brief Notch filter parameter (A2). Default: nullptr */ + CIMPP::PU a2; + + /** \brief Notch filter parameter (A3). Default: nullptr */ + CIMPP::PU a3; + + /** \brief Notch filter parameter (A4). Default: nullptr */ + CIMPP::PU a4; + + /** \brief Notch filter parameter (A5). Default: nullptr */ + CIMPP::PU a5; + + /** \brief Notch filter parameter (A6). Default: nullptr */ + CIMPP::PU a6; + + /** \brief Notch filter parameter (A7). Default: nullptr */ + CIMPP::PU a7; + + /** \brief Notch filter parameter (A8). Default: nullptr */ + CIMPP::PU a8; + + /** \brief Type of input signal. Default: 0 */ + CIMPP::InputSignalKind inputSignalType; + + /** \brief Selector (Kd). true = e used false = e not used. Default: false */ + CIMPP::Boolean kd; + + /** \brief Stabilizer gain (Ks). Default: nullptr */ + CIMPP::PU ks; + + /** \brief Lead/lag time constant (T1). Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Lead/lag time constant (T2). Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Lead/lag time constant (T3). Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Lead/lag time constant (T4). Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Washout time constant (T5). Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Transducer time constant (T6). Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time constant (Tdelay). Default: nullptr */ + CIMPP::Seconds tdelay; + + /** \brief Stabilizer input cutoff threshold (Vcl). Default: nullptr */ + CIMPP::PU vcl; + + /** \brief Stabilizer input cutoff threshold (Vcu). Default: nullptr */ + CIMPP::PU vcu; + + /** \brief Maximum stabilizer output (Vrmax). Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum stabilizer output (Vrmin). Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Pss2B.cpp b/CGMES_2.4.15_16FEB2016/Pss2B.cpp index c5cde1d14..71b0429d6 100644 --- a/CGMES_2.4.15_16FEB2016/Pss2B.cpp +++ b/CGMES_2.4.15_16FEB2016/Pss2B.cpp @@ -8,42 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "InputSignalKind.hpp" -#include "InputSignalKind.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Integer.hpp" -#include "Integer.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -Pss2B::Pss2B() {}; -Pss2B::~Pss2B() {}; +Pss2B::Pss2B() {} +Pss2B::~Pss2B() {} static const std::list PossibleProfilesForClass = { @@ -100,415 +69,444 @@ Pss2B::getPossibleProfilesForAttributes() const return map; } - -bool assign_Pss2B_a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_a(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_inputSignal1Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_inputSignal1Type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal1Type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_inputSignal2Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_inputSignal2Type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal2Type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_ks1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_ks1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_ks2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_ks2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_ks3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_ks3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_ks4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_ks4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_m(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_m(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->m; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_n(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_n(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->n; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t11(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t11; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_tw1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_tw1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_tw2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_tw2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_tw3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_tw3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_tw4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_tw4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_vsi1max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_vsi1max(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsi1max; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_vsi1min(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_vsi1min(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsi1min; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_vsi2max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_vsi2max(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsi2max; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_vsi2min(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_vsi2min(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsi2min; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_vstmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_vstmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vstmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_vstmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_vstmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vstmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_Pss2B_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a; if (!buffer.str().empty()) @@ -520,9 +518,40 @@ bool get_Pss2B_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } +bool get_Pss2B_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignal1Type; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_Pss2B_inputSignal2Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignal2Type; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_Pss2B_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks1; if (!buffer.str().empty()) @@ -536,7 +565,8 @@ bool get_Pss2B_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks2; if (!buffer.str().empty()) @@ -550,7 +580,8 @@ bool get_Pss2B_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_ks3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks3; if (!buffer.str().empty()) @@ -564,7 +595,8 @@ bool get_Pss2B_ks3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_ks4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks4; if (!buffer.str().empty()) @@ -578,7 +610,8 @@ bool get_Pss2B_ks4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->m; if (!buffer.str().empty()) @@ -592,7 +625,8 @@ bool get_Pss2B_m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_n(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->n; if (!buffer.str().empty()) @@ -606,7 +640,8 @@ bool get_Pss2B_n(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -620,7 +655,8 @@ bool get_Pss2B_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t10; if (!buffer.str().empty()) @@ -634,7 +670,8 @@ bool get_Pss2B_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t11; if (!buffer.str().empty()) @@ -648,7 +685,8 @@ bool get_Pss2B_t11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -662,7 +700,8 @@ bool get_Pss2B_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -676,7 +715,8 @@ bool get_Pss2B_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -690,7 +730,8 @@ bool get_Pss2B_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -704,7 +745,8 @@ bool get_Pss2B_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t7; if (!buffer.str().empty()) @@ -718,7 +760,8 @@ bool get_Pss2B_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t8; if (!buffer.str().empty()) @@ -732,7 +775,8 @@ bool get_Pss2B_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t9; if (!buffer.str().empty()) @@ -746,7 +790,8 @@ bool get_Pss2B_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -760,7 +805,8 @@ bool get_Pss2B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -774,7 +820,8 @@ bool get_Pss2B_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_tw1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw1; if (!buffer.str().empty()) @@ -788,7 +835,8 @@ bool get_Pss2B_tw1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_tw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw2; if (!buffer.str().empty()) @@ -802,7 +850,8 @@ bool get_Pss2B_tw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_tw3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw3; if (!buffer.str().empty()) @@ -816,7 +865,8 @@ bool get_Pss2B_tw3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_tw4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw4; if (!buffer.str().empty()) @@ -830,7 +880,8 @@ bool get_Pss2B_tw4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_vsi1max(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsi1max; if (!buffer.str().empty()) @@ -844,7 +895,8 @@ bool get_Pss2B_vsi1max(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_Pss2B_vsi1min(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsi1min; if (!buffer.str().empty()) @@ -858,7 +910,8 @@ bool get_Pss2B_vsi1min(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_Pss2B_vsi2max(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsi2max; if (!buffer.str().empty()) @@ -872,7 +925,8 @@ bool get_Pss2B_vsi2max(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_Pss2B_vsi2min(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsi2min; if (!buffer.str().empty()) @@ -886,7 +940,8 @@ bool get_Pss2B_vsi2min(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_Pss2B_vstmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vstmax; if (!buffer.str().empty()) @@ -900,7 +955,8 @@ bool get_Pss2B_vstmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_Pss2B_vstmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vstmin; if (!buffer.str().empty()) @@ -912,36 +968,6 @@ bool get_Pss2B_vstmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - -bool get_Pss2B_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignal1Type; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - -bool get_Pss2B_inputSignal2Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignal2Type; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char Pss2B::debugName[] = "Pss2B"; const char* Pss2B::debugString() const { @@ -950,42 +976,42 @@ const char* Pss2B::debugString() const void Pss2B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Pss2B"), &Pss2B_factory)); + factory_map.emplace("cim:Pss2B", &Pss2B_factory); } void Pss2B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Pss2B.a"), &assign_Pss2B_a)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.inputSignal1Type"), &assign_Pss2B_inputSignal1Type)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.inputSignal2Type"), &assign_Pss2B_inputSignal2Type)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.ks1"), &assign_Pss2B_ks1)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.ks2"), &assign_Pss2B_ks2)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.ks3"), &assign_Pss2B_ks3)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.ks4"), &assign_Pss2B_ks4)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.m"), &assign_Pss2B_m)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.n"), &assign_Pss2B_n)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t1"), &assign_Pss2B_t1)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t10"), &assign_Pss2B_t10)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t11"), &assign_Pss2B_t11)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t2"), &assign_Pss2B_t2)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t3"), &assign_Pss2B_t3)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t4"), &assign_Pss2B_t4)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t6"), &assign_Pss2B_t6)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t7"), &assign_Pss2B_t7)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t8"), &assign_Pss2B_t8)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t9"), &assign_Pss2B_t9)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.ta"), &assign_Pss2B_ta)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.tb"), &assign_Pss2B_tb)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.tw1"), &assign_Pss2B_tw1)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.tw2"), &assign_Pss2B_tw2)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.tw3"), &assign_Pss2B_tw3)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.tw4"), &assign_Pss2B_tw4)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.vsi1max"), &assign_Pss2B_vsi1max)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.vsi1min"), &assign_Pss2B_vsi1min)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.vsi2max"), &assign_Pss2B_vsi2max)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.vsi2min"), &assign_Pss2B_vsi2min)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.vstmax"), &assign_Pss2B_vstmax)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.vstmin"), &assign_Pss2B_vstmin)); + assign_map.emplace("cim:Pss2B.a", &assign_Pss2B_a); + assign_map.emplace("cim:Pss2B.inputSignal1Type", &assign_Pss2B_inputSignal1Type); + assign_map.emplace("cim:Pss2B.inputSignal2Type", &assign_Pss2B_inputSignal2Type); + assign_map.emplace("cim:Pss2B.ks1", &assign_Pss2B_ks1); + assign_map.emplace("cim:Pss2B.ks2", &assign_Pss2B_ks2); + assign_map.emplace("cim:Pss2B.ks3", &assign_Pss2B_ks3); + assign_map.emplace("cim:Pss2B.ks4", &assign_Pss2B_ks4); + assign_map.emplace("cim:Pss2B.m", &assign_Pss2B_m); + assign_map.emplace("cim:Pss2B.n", &assign_Pss2B_n); + assign_map.emplace("cim:Pss2B.t1", &assign_Pss2B_t1); + assign_map.emplace("cim:Pss2B.t10", &assign_Pss2B_t10); + assign_map.emplace("cim:Pss2B.t11", &assign_Pss2B_t11); + assign_map.emplace("cim:Pss2B.t2", &assign_Pss2B_t2); + assign_map.emplace("cim:Pss2B.t3", &assign_Pss2B_t3); + assign_map.emplace("cim:Pss2B.t4", &assign_Pss2B_t4); + assign_map.emplace("cim:Pss2B.t6", &assign_Pss2B_t6); + assign_map.emplace("cim:Pss2B.t7", &assign_Pss2B_t7); + assign_map.emplace("cim:Pss2B.t8", &assign_Pss2B_t8); + assign_map.emplace("cim:Pss2B.t9", &assign_Pss2B_t9); + assign_map.emplace("cim:Pss2B.ta", &assign_Pss2B_ta); + assign_map.emplace("cim:Pss2B.tb", &assign_Pss2B_tb); + assign_map.emplace("cim:Pss2B.tw1", &assign_Pss2B_tw1); + assign_map.emplace("cim:Pss2B.tw2", &assign_Pss2B_tw2); + assign_map.emplace("cim:Pss2B.tw3", &assign_Pss2B_tw3); + assign_map.emplace("cim:Pss2B.tw4", &assign_Pss2B_tw4); + assign_map.emplace("cim:Pss2B.vsi1max", &assign_Pss2B_vsi1max); + assign_map.emplace("cim:Pss2B.vsi1min", &assign_Pss2B_vsi1min); + assign_map.emplace("cim:Pss2B.vsi2max", &assign_Pss2B_vsi2max); + assign_map.emplace("cim:Pss2B.vsi2min", &assign_Pss2B_vsi2min); + assign_map.emplace("cim:Pss2B.vstmax", &assign_Pss2B_vstmax); + assign_map.emplace("cim:Pss2B.vstmin", &assign_Pss2B_vstmin); } void Pss2B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/Pss2B.hpp b/CGMES_2.4.15_16FEB2016/Pss2B.hpp index 55c64c3fc..90e74ab8e 100644 --- a/CGMES_2.4.15_16FEB2016/Pss2B.hpp +++ b/CGMES_2.4.15_16FEB2016/Pss2B.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE PSS2B Model. Extra lead/lag (or rate) block added at end (up to 4 lead/lags total). - */ + /** \brief Modified IEEE PSS2B Model. Extra lead/lag (or rate) block added at end (up to 4 lead/lags total). */ class Pss2B : public PowerSystemStabilizerDynamics { public: @@ -31,37 +29,98 @@ namespace CIMPP Pss2B(); ~Pss2B() override; - CIMPP::Simple_Float a; /* Numerator constant (a). Typical Value = 1. Default: nullptr */ - CIMPP::InputSignalKind inputSignal1Type; /* Type of input signal #1. Typical Value = rotorSpeed. Default: 0 */ - CIMPP::InputSignalKind inputSignal2Type; /* Type of input signal #2. Typical Value = generatorElectricalPower. Default: 0 */ - CIMPP::PU ks1; /* Stabilizer gain (Ks1). Typical Value = 12. Default: nullptr */ - CIMPP::PU ks2; /* Gain on signal #2 (Ks2). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU ks3; /* Gain on signal #2 input before ramp-tracking filter (Ks3). Typical Value = 1. Default: nullptr */ - CIMPP::PU ks4; /* Gain on signal #2 input after ramp-tracking filter (Ks4). Typical Value = 1. Default: nullptr */ - CIMPP::Integer m; /* Denominator order of ramp tracking filter (M). Typical Value = 5. Default: 0 */ - CIMPP::Integer n; /* Order of ramp tracking filter (N). Typical Value = 1. Default: 0 */ - CIMPP::Seconds t1; /* Lead/lag time constant (T1). Typical Value = 0.12. Default: nullptr */ - CIMPP::Seconds t10; /* Lead/lag time constant (T10). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t11; /* Lead/lag time constant (T11). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t2; /* Lead/lag time constant (T2). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds t3; /* Lead/lag time constant (T3). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds t4; /* Lead/lag time constant (T4). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds t6; /* Time constant on signal #1 (T6). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t7; /* Time constant on signal #2 (T7). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds t8; /* Lead of ramp tracking filter (T8). Typical Value = 0.2. Default: nullptr */ - CIMPP::Seconds t9; /* Lag of ramp tracking filter (T9). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds ta; /* Lead constant (Ta). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tb; /* Lag time constant (Tb). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tw1; /* First washout on signal #1 (Tw1). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds tw2; /* Second washout on signal #1 (Tw2). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds tw3; /* First washout on signal #2 (Tw3). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds tw4; /* Second washout on signal #2 (Tw4). Typical Value = 0. Default: nullptr */ - CIMPP::PU vsi1max; /* Input signal #1 max limit (Vsi1max). Typical Value = 2. Default: nullptr */ - CIMPP::PU vsi1min; /* Input signal #1 min limit (Vsi1min). Typical Value = -2. Default: nullptr */ - CIMPP::PU vsi2max; /* Input signal #2 max limit (Vsi2max). Typical Value = 2. Default: nullptr */ - CIMPP::PU vsi2min; /* Input signal #2 min limit (Vsi2min). Typical Value = -2. Default: nullptr */ - CIMPP::PU vstmax; /* Stabilizer output max limit (Vstmax). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU vstmin; /* Stabilizer output min limit (Vstmin). Typical Value = -0.1. Default: nullptr */ + /** \brief Numerator constant (a). Typical Value = 1. Default: nullptr */ + CIMPP::Simple_Float a; + + /** \brief Type of input signal #1. Typical Value = rotorSpeed. Default: 0 */ + CIMPP::InputSignalKind inputSignal1Type; + + /** \brief Type of input signal #2. Typical Value = generatorElectricalPower. Default: 0 */ + CIMPP::InputSignalKind inputSignal2Type; + + /** \brief Stabilizer gain (Ks1). Typical Value = 12. Default: nullptr */ + CIMPP::PU ks1; + + /** \brief Gain on signal #2 (Ks2). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU ks2; + + /** \brief Gain on signal #2 input before ramp-tracking filter (Ks3). Typical Value = 1. Default: nullptr */ + CIMPP::PU ks3; + + /** \brief Gain on signal #2 input after ramp-tracking filter (Ks4). Typical Value = 1. Default: nullptr */ + CIMPP::PU ks4; + + /** \brief Denominator order of ramp tracking filter (M). Typical Value = 5. Default: 0 */ + CIMPP::Integer m; + + /** \brief Order of ramp tracking filter (N). Typical Value = 1. Default: 0 */ + CIMPP::Integer n; + + /** \brief Lead/lag time constant (T1). Typical Value = 0.12. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Lead/lag time constant (T10). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t10; + + /** \brief Lead/lag time constant (T11). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t11; + + /** \brief Lead/lag time constant (T2). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Lead/lag time constant (T3). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Lead/lag time constant (T4). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant on signal #1 (T6). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time constant on signal #2 (T7). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds t7; + + /** \brief Lead of ramp tracking filter (T8). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds t8; + + /** \brief Lag of ramp tracking filter (T9). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t9; + + /** \brief Lead constant (Ta). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Lag time constant (Tb). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief First washout on signal #1 (Tw1). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds tw1; + + /** \brief Second washout on signal #1 (Tw2). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds tw2; + + /** \brief First washout on signal #2 (Tw3). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds tw3; + + /** \brief Second washout on signal #2 (Tw4). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tw4; + + /** \brief Input signal #1 max limit (Vsi1max). Typical Value = 2. Default: nullptr */ + CIMPP::PU vsi1max; + + /** \brief Input signal #1 min limit (Vsi1min). Typical Value = -2. Default: nullptr */ + CIMPP::PU vsi1min; + + /** \brief Input signal #2 max limit (Vsi2max). Typical Value = 2. Default: nullptr */ + CIMPP::PU vsi2max; + + /** \brief Input signal #2 min limit (Vsi2min). Typical Value = -2. Default: nullptr */ + CIMPP::PU vsi2min; + + /** \brief Stabilizer output max limit (Vstmax). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU vstmax; + + /** \brief Stabilizer output min limit (Vstmin). Typical Value = -0.1. Default: nullptr */ + CIMPP::PU vstmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Pss2ST.cpp b/CGMES_2.4.15_16FEB2016/Pss2ST.cpp index d66a34602..9a42e067c 100644 --- a/CGMES_2.4.15_16FEB2016/Pss2ST.cpp +++ b/CGMES_2.4.15_16FEB2016/Pss2ST.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "InputSignalKind.hpp" -#include "InputSignalKind.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -Pss2ST::Pss2ST() {}; -Pss2ST::~Pss2ST() {}; +Pss2ST::Pss2ST() {} +Pss2ST::~Pss2ST() {} static const std::list PossibleProfilesForClass = { @@ -74,246 +56,292 @@ Pss2ST::getPossibleProfilesForAttributes() const return map; } - -bool assign_Pss2ST_inputSignal1Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_inputSignal1Type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal1Type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_inputSignal2Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_inputSignal2Type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal2Type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_lsmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_lsmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lsmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_lsmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_lsmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lsmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_vcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_vcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vcl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_vcu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_vcu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vcu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } +bool get_Pss2ST_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignal1Type; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} +bool get_Pss2ST_inputSignal2Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignal2Type; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} bool get_Pss2ST_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -327,7 +355,8 @@ bool get_Pss2ST_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -341,7 +370,8 @@ bool get_Pss2ST_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_lsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lsmax; if (!buffer.str().empty()) @@ -355,7 +385,8 @@ bool get_Pss2ST_lsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_Pss2ST_lsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lsmin; if (!buffer.str().empty()) @@ -369,7 +400,8 @@ bool get_Pss2ST_lsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_Pss2ST_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -383,7 +415,8 @@ bool get_Pss2ST_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t10; if (!buffer.str().empty()) @@ -397,7 +430,8 @@ bool get_Pss2ST_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -411,7 +445,8 @@ bool get_Pss2ST_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -425,7 +460,8 @@ bool get_Pss2ST_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -439,7 +475,8 @@ bool get_Pss2ST_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -453,7 +490,8 @@ bool get_Pss2ST_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -467,7 +505,8 @@ bool get_Pss2ST_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t7; if (!buffer.str().empty()) @@ -481,7 +520,8 @@ bool get_Pss2ST_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t8; if (!buffer.str().empty()) @@ -495,7 +535,8 @@ bool get_Pss2ST_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t9; if (!buffer.str().empty()) @@ -509,7 +550,8 @@ bool get_Pss2ST_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_vcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vcl; if (!buffer.str().empty()) @@ -523,7 +565,8 @@ bool get_Pss2ST_vcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_vcu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vcu; if (!buffer.str().empty()) @@ -535,36 +578,6 @@ bool get_Pss2ST_vcu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - -bool get_Pss2ST_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignal1Type; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - -bool get_Pss2ST_inputSignal2Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignal2Type; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char Pss2ST::debugName[] = "Pss2ST"; const char* Pss2ST::debugString() const { @@ -573,29 +586,29 @@ const char* Pss2ST::debugString() const void Pss2ST::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Pss2ST"), &Pss2ST_factory)); + factory_map.emplace("cim:Pss2ST", &Pss2ST_factory); } void Pss2ST::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.inputSignal1Type"), &assign_Pss2ST_inputSignal1Type)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.inputSignal2Type"), &assign_Pss2ST_inputSignal2Type)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.k1"), &assign_Pss2ST_k1)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.k2"), &assign_Pss2ST_k2)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.lsmax"), &assign_Pss2ST_lsmax)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.lsmin"), &assign_Pss2ST_lsmin)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t1"), &assign_Pss2ST_t1)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t10"), &assign_Pss2ST_t10)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t2"), &assign_Pss2ST_t2)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t3"), &assign_Pss2ST_t3)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t4"), &assign_Pss2ST_t4)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t5"), &assign_Pss2ST_t5)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t6"), &assign_Pss2ST_t6)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t7"), &assign_Pss2ST_t7)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t8"), &assign_Pss2ST_t8)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t9"), &assign_Pss2ST_t9)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.vcl"), &assign_Pss2ST_vcl)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.vcu"), &assign_Pss2ST_vcu)); + assign_map.emplace("cim:Pss2ST.inputSignal1Type", &assign_Pss2ST_inputSignal1Type); + assign_map.emplace("cim:Pss2ST.inputSignal2Type", &assign_Pss2ST_inputSignal2Type); + assign_map.emplace("cim:Pss2ST.k1", &assign_Pss2ST_k1); + assign_map.emplace("cim:Pss2ST.k2", &assign_Pss2ST_k2); + assign_map.emplace("cim:Pss2ST.lsmax", &assign_Pss2ST_lsmax); + assign_map.emplace("cim:Pss2ST.lsmin", &assign_Pss2ST_lsmin); + assign_map.emplace("cim:Pss2ST.t1", &assign_Pss2ST_t1); + assign_map.emplace("cim:Pss2ST.t10", &assign_Pss2ST_t10); + assign_map.emplace("cim:Pss2ST.t2", &assign_Pss2ST_t2); + assign_map.emplace("cim:Pss2ST.t3", &assign_Pss2ST_t3); + assign_map.emplace("cim:Pss2ST.t4", &assign_Pss2ST_t4); + assign_map.emplace("cim:Pss2ST.t5", &assign_Pss2ST_t5); + assign_map.emplace("cim:Pss2ST.t6", &assign_Pss2ST_t6); + assign_map.emplace("cim:Pss2ST.t7", &assign_Pss2ST_t7); + assign_map.emplace("cim:Pss2ST.t8", &assign_Pss2ST_t8); + assign_map.emplace("cim:Pss2ST.t9", &assign_Pss2ST_t9); + assign_map.emplace("cim:Pss2ST.vcl", &assign_Pss2ST_vcl); + assign_map.emplace("cim:Pss2ST.vcu", &assign_Pss2ST_vcu); } void Pss2ST::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/Pss2ST.hpp b/CGMES_2.4.15_16FEB2016/Pss2ST.hpp index c37d7fa68..abd31dcb0 100644 --- a/CGMES_2.4.15_16FEB2016/Pss2ST.hpp +++ b/CGMES_2.4.15_16FEB2016/Pss2ST.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - PTI Microprocessor-Based Stabilizer type 1. - */ + /** \brief PTI Microprocessor-Based Stabilizer type 1. */ class Pss2ST : public PowerSystemStabilizerDynamics { public: @@ -29,24 +27,59 @@ namespace CIMPP Pss2ST(); ~Pss2ST() override; - CIMPP::InputSignalKind inputSignal1Type; /* Type of input signal #1. Typical Value = rotorAngularFrequencyDeviation. Default: 0 */ - CIMPP::InputSignalKind inputSignal2Type; /* Type of input signal #2. Typical Value = generatorElectricalPower. Default: 0 */ - CIMPP::PU k1; /* Gain (K1). Default: nullptr */ - CIMPP::PU k2; /* Gain (K2). Default: nullptr */ - CIMPP::PU lsmax; /* Limiter (Lsmax). Default: nullptr */ - CIMPP::PU lsmin; /* Limiter (Lsmin). Default: nullptr */ - CIMPP::Seconds t1; /* Time constant (T1). Default: nullptr */ - CIMPP::Seconds t10; /* Time constant (T10). Default: nullptr */ - CIMPP::Seconds t2; /* Time constant (T2). Default: nullptr */ - CIMPP::Seconds t3; /* Time constant (T3). Default: nullptr */ - CIMPP::Seconds t4; /* Time constant (T4). Default: nullptr */ - CIMPP::Seconds t5; /* Time constant (T5). Default: nullptr */ - CIMPP::Seconds t6; /* Time constant (T6). Default: nullptr */ - CIMPP::Seconds t7; /* Time constant (T7). Default: nullptr */ - CIMPP::Seconds t8; /* Time constant (T8). Default: nullptr */ - CIMPP::Seconds t9; /* Time constant (T9). Default: nullptr */ - CIMPP::PU vcl; /* Cutoff limiter (Vcl). Default: nullptr */ - CIMPP::PU vcu; /* Cutoff limiter (Vcu). Default: nullptr */ + /** \brief Type of input signal #1. Typical Value = rotorAngularFrequencyDeviation. Default: 0 */ + CIMPP::InputSignalKind inputSignal1Type; + + /** \brief Type of input signal #2. Typical Value = generatorElectricalPower. Default: 0 */ + CIMPP::InputSignalKind inputSignal2Type; + + /** \brief Gain (K1). Default: nullptr */ + CIMPP::PU k1; + + /** \brief Gain (K2). Default: nullptr */ + CIMPP::PU k2; + + /** \brief Limiter (Lsmax). Default: nullptr */ + CIMPP::PU lsmax; + + /** \brief Limiter (Lsmin). Default: nullptr */ + CIMPP::PU lsmin; + + /** \brief Time constant (T1). Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Time constant (T10). Default: nullptr */ + CIMPP::Seconds t10; + + /** \brief Time constant (T2). Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Time constant (T3). Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Time constant (T4). Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant (T5). Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Time constant (T6). Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time constant (T7). Default: nullptr */ + CIMPP::Seconds t7; + + /** \brief Time constant (T8). Default: nullptr */ + CIMPP::Seconds t8; + + /** \brief Time constant (T9). Default: nullptr */ + CIMPP::Seconds t9; + + /** \brief Cutoff limiter (Vcl). Default: nullptr */ + CIMPP::PU vcl; + + /** \brief Cutoff limiter (Vcu). Default: nullptr */ + CIMPP::PU vcu; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Pss5.cpp b/CGMES_2.4.15_16FEB2016/Pss5.cpp index 3c55da9e1..41a4f0631 100644 --- a/CGMES_2.4.15_16FEB2016/Pss5.cpp +++ b/CGMES_2.4.15_16FEB2016/Pss5.cpp @@ -8,28 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -Pss5::Pss5() {}; -Pss5::~Pss5() {}; +Pss5::Pss5() {} +Pss5::~Pss5() {} static const std::list PossibleProfilesForClass = { @@ -72,233 +55,248 @@ Pss5::getPossibleProfilesForAttributes() const return map; } - -bool assign_Pss5_ctw2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_ctw2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ctw2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_deadband(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_deadband(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->deadband; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_isfreq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_isfreq(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->isfreq; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_kpe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_kpe(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpe; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_kpss(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_kpss(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpss; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_pmm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_pmm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_tl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_tl1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_tl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_tl2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_tl3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_tl3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_tl4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_tl4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_tpe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_tpe(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpe; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_tw1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_tw1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_tw2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_tw2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_vadat(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_vadat(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vadat; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_vsmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_vsmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_vsmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_vsmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_Pss5_ctw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ctw2; if (!buffer.str().empty()) @@ -312,7 +310,8 @@ bool get_Pss5_ctw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_deadband(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->deadband; if (!buffer.str().empty()) @@ -326,7 +325,8 @@ bool get_Pss5_deadband(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_Pss5_isfreq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->isfreq; if (!buffer.str().empty()) @@ -340,7 +340,8 @@ bool get_Pss5_isfreq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -354,7 +355,8 @@ bool get_Pss5_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_kpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpe; if (!buffer.str().empty()) @@ -368,7 +370,8 @@ bool get_Pss5_kpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_kpss(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpss; if (!buffer.str().empty()) @@ -382,7 +385,8 @@ bool get_Pss5_kpss(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_pmm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmm; if (!buffer.str().empty()) @@ -396,7 +400,8 @@ bool get_Pss5_pmm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_tl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl1; if (!buffer.str().empty()) @@ -410,7 +415,8 @@ bool get_Pss5_tl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_tl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl2; if (!buffer.str().empty()) @@ -424,7 +430,8 @@ bool get_Pss5_tl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_tl3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl3; if (!buffer.str().empty()) @@ -438,7 +445,8 @@ bool get_Pss5_tl3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_tl4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl4; if (!buffer.str().empty()) @@ -452,7 +460,8 @@ bool get_Pss5_tl4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_tpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpe; if (!buffer.str().empty()) @@ -466,7 +475,8 @@ bool get_Pss5_tpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_tw1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw1; if (!buffer.str().empty()) @@ -480,7 +490,8 @@ bool get_Pss5_tw1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_tw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw2; if (!buffer.str().empty()) @@ -494,7 +505,8 @@ bool get_Pss5_tw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_vadat(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vadat; if (!buffer.str().empty()) @@ -508,7 +520,8 @@ bool get_Pss5_vadat(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_vsmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmn; if (!buffer.str().empty()) @@ -522,7 +535,8 @@ bool get_Pss5_vsmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_vsmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmx; if (!buffer.str().empty()) @@ -534,8 +548,6 @@ bool get_Pss5_vsmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char Pss5::debugName[] = "Pss5"; const char* Pss5::debugString() const { @@ -544,28 +556,28 @@ const char* Pss5::debugString() const void Pss5::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Pss5"), &Pss5_factory)); + factory_map.emplace("cim:Pss5", &Pss5_factory); } void Pss5::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Pss5.ctw2"), &assign_Pss5_ctw2)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.deadband"), &assign_Pss5_deadband)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.isfreq"), &assign_Pss5_isfreq)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.kf"), &assign_Pss5_kf)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.kpe"), &assign_Pss5_kpe)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.kpss"), &assign_Pss5_kpss)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.pmm"), &assign_Pss5_pmm)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.tl1"), &assign_Pss5_tl1)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.tl2"), &assign_Pss5_tl2)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.tl3"), &assign_Pss5_tl3)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.tl4"), &assign_Pss5_tl4)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.tpe"), &assign_Pss5_tpe)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.tw1"), &assign_Pss5_tw1)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.tw2"), &assign_Pss5_tw2)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.vadat"), &assign_Pss5_vadat)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.vsmn"), &assign_Pss5_vsmn)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.vsmx"), &assign_Pss5_vsmx)); + assign_map.emplace("cim:Pss5.ctw2", &assign_Pss5_ctw2); + assign_map.emplace("cim:Pss5.deadband", &assign_Pss5_deadband); + assign_map.emplace("cim:Pss5.isfreq", &assign_Pss5_isfreq); + assign_map.emplace("cim:Pss5.kf", &assign_Pss5_kf); + assign_map.emplace("cim:Pss5.kpe", &assign_Pss5_kpe); + assign_map.emplace("cim:Pss5.kpss", &assign_Pss5_kpss); + assign_map.emplace("cim:Pss5.pmm", &assign_Pss5_pmm); + assign_map.emplace("cim:Pss5.tl1", &assign_Pss5_tl1); + assign_map.emplace("cim:Pss5.tl2", &assign_Pss5_tl2); + assign_map.emplace("cim:Pss5.tl3", &assign_Pss5_tl3); + assign_map.emplace("cim:Pss5.tl4", &assign_Pss5_tl4); + assign_map.emplace("cim:Pss5.tpe", &assign_Pss5_tpe); + assign_map.emplace("cim:Pss5.tw1", &assign_Pss5_tw1); + assign_map.emplace("cim:Pss5.tw2", &assign_Pss5_tw2); + assign_map.emplace("cim:Pss5.vadat", &assign_Pss5_vadat); + assign_map.emplace("cim:Pss5.vsmn", &assign_Pss5_vsmn); + assign_map.emplace("cim:Pss5.vsmx", &assign_Pss5_vsmx); } void Pss5::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/Pss5.hpp b/CGMES_2.4.15_16FEB2016/Pss5.hpp index 2f2c5a10c..9855524fa 100644 --- a/CGMES_2.4.15_16FEB2016/Pss5.hpp +++ b/CGMES_2.4.15_16FEB2016/Pss5.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Italian PSS - Detailed PSS. - */ + /** \brief Italian PSS - Detailed PSS. */ class Pss5 : public PowerSystemStabilizerDynamics { public: @@ -30,23 +28,56 @@ namespace CIMPP Pss5(); ~Pss5() override; - CIMPP::Boolean ctw2; /* Selector for Second washout enabling (C). true = second washout filter is bypassed false = second washout filter in use. Typical Value = true. Default: false */ - CIMPP::PU deadband; /* Stabilizer output dead band (DeadBand). Typical Value = 0. Default: nullptr */ - CIMPP::Boolean isfreq; /* Selector for Frequency/shaft speed input (IsFreq). true = speed false = frequency. Typical Value = true. Default: false */ - CIMPP::Simple_Float kf; /* Frequency/shaft speed input gain (K). Typical Value = 5. Default: nullptr */ - CIMPP::Simple_Float kpe; /* Electric power input gain (K). Typical Value = 0.3. Default: nullptr */ - CIMPP::Simple_Float kpss; /* PSS gain (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmm; /* Minimum power PSS enabling (P). Typical Value = 0.25. Default: nullptr */ - CIMPP::Seconds tl1; /* Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tl2; /* Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tl3; /* Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tl4; /* Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tpe; /* Electric power filter time constant (T). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds tw1; /* First WashOut (T). Typical Value = 3.5. Default: nullptr */ - CIMPP::Seconds tw2; /* Second WashOut (T). Typical Value = 0. Default: nullptr */ - CIMPP::Boolean vadat; /* Default: false */ - CIMPP::PU vsmn; /* Stabilizer output max limit (V). Typical Value = -0.1. Default: nullptr */ - CIMPP::PU vsmx; /* Stabilizer output min limit (V). Typical Value = 0.1. Default: nullptr */ + /** \brief Selector for Second washout enabling (C). true = second washout filter is bypassed false = second washout filter in use. Typical Value = true. Default: false */ + CIMPP::Boolean ctw2; + + /** \brief Stabilizer output dead band (DeadBand). Typical Value = 0. Default: nullptr */ + CIMPP::PU deadband; + + /** \brief Selector for Frequency/shaft speed input (IsFreq). true = speed false = frequency. Typical Value = true. Default: false */ + CIMPP::Boolean isfreq; + + /** \brief Frequency/shaft speed input gain (K). Typical Value = 5. Default: nullptr */ + CIMPP::Simple_Float kf; + + /** \brief Electric power input gain (K). Typical Value = 0.3. Default: nullptr */ + CIMPP::Simple_Float kpe; + + /** \brief PSS gain (K). Typical Value = 1. Default: nullptr */ + CIMPP::Simple_Float kpss; + + /** \brief Minimum power PSS enabling (P). Typical Value = 0.25. Default: nullptr */ + CIMPP::PU pmm; + + /** \brief Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tl1; + + /** \brief Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tl2; + + /** \brief Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tl3; + + /** \brief Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tl4; + + /** \brief Electric power filter time constant (T). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds tpe; + + /** \brief First WashOut (T). Typical Value = 3.5. Default: nullptr */ + CIMPP::Seconds tw1; + + /** \brief Second WashOut (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tw2; + + /** \brief Default: false */ + CIMPP::Boolean vadat; + + /** \brief Stabilizer output max limit (V). Typical Value = -0.1. Default: nullptr */ + CIMPP::PU vsmn; + + /** \brief Stabilizer output min limit (V). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU vsmx; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/PssELIN2.cpp b/CGMES_2.4.15_16FEB2016/PssELIN2.cpp index d7e853587..394cf185f 100644 --- a/CGMES_2.4.15_16FEB2016/PssELIN2.cpp +++ b/CGMES_2.4.15_16FEB2016/PssELIN2.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -PssELIN2::PssELIN2() {}; -PssELIN2::~PssELIN2() {}; +PssELIN2::PssELIN2() {} +PssELIN2::~PssELIN2() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ PssELIN2::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssELIN2_apss(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_apss(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->apss; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_ks1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_ks1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_ks2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_ks2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_ppss(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_ppss(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ppss; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_psslim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_psslim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->psslim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_ts1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_ts1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_ts2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_ts2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_ts3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_ts3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_ts4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_ts4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_ts5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_ts5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_ts6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_ts6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssELIN2_apss(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->apss; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_PssELIN2_apss(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssELIN2_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks1; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_PssELIN2_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssELIN2_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks2; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_PssELIN2_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssELIN2_ppss(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ppss; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_PssELIN2_ppss(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssELIN2_psslim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->psslim; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_PssELIN2_psslim(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_PssELIN2_ts1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts1; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_PssELIN2_ts1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssELIN2_ts2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts2; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_PssELIN2_ts2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssELIN2_ts3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts3; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_PssELIN2_ts3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssELIN2_ts4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts4; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_PssELIN2_ts4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssELIN2_ts5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts5; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_PssELIN2_ts5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssELIN2_ts6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts6; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_PssELIN2_ts6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char PssELIN2::debugName[] = "PssELIN2"; const char* PssELIN2::debugString() const { @@ -370,22 +376,22 @@ const char* PssELIN2::debugString() const void PssELIN2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssELIN2"), &PssELIN2_factory)); + factory_map.emplace("cim:PssELIN2", &PssELIN2_factory); } void PssELIN2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.apss"), &assign_PssELIN2_apss)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.ks1"), &assign_PssELIN2_ks1)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.ks2"), &assign_PssELIN2_ks2)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.ppss"), &assign_PssELIN2_ppss)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.psslim"), &assign_PssELIN2_psslim)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.ts1"), &assign_PssELIN2_ts1)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.ts2"), &assign_PssELIN2_ts2)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.ts3"), &assign_PssELIN2_ts3)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.ts4"), &assign_PssELIN2_ts4)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.ts5"), &assign_PssELIN2_ts5)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.ts6"), &assign_PssELIN2_ts6)); + assign_map.emplace("cim:PssELIN2.apss", &assign_PssELIN2_apss); + assign_map.emplace("cim:PssELIN2.ks1", &assign_PssELIN2_ks1); + assign_map.emplace("cim:PssELIN2.ks2", &assign_PssELIN2_ks2); + assign_map.emplace("cim:PssELIN2.ppss", &assign_PssELIN2_ppss); + assign_map.emplace("cim:PssELIN2.psslim", &assign_PssELIN2_psslim); + assign_map.emplace("cim:PssELIN2.ts1", &assign_PssELIN2_ts1); + assign_map.emplace("cim:PssELIN2.ts2", &assign_PssELIN2_ts2); + assign_map.emplace("cim:PssELIN2.ts3", &assign_PssELIN2_ts3); + assign_map.emplace("cim:PssELIN2.ts4", &assign_PssELIN2_ts4); + assign_map.emplace("cim:PssELIN2.ts5", &assign_PssELIN2_ts5); + assign_map.emplace("cim:PssELIN2.ts6", &assign_PssELIN2_ts6); } void PssELIN2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/PssELIN2.hpp b/CGMES_2.4.15_16FEB2016/PssELIN2.hpp index 082facadc..d5ebed820 100644 --- a/CGMES_2.4.15_16FEB2016/PssELIN2.hpp +++ b/CGMES_2.4.15_16FEB2016/PssELIN2.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Power system stabilizer typically associated with ExcELIN2 (though PssIEEE2B or Pss2B can also be used). - */ + /** \brief Power system stabilizer typically associated with ExcELIN2 (though PssIEEE2B or Pss2B can also be used). */ class PssELIN2 : public PowerSystemStabilizerDynamics { public: @@ -28,17 +26,38 @@ namespace CIMPP PssELIN2(); ~PssELIN2() override; - CIMPP::PU apss; /* Coefficient (a_PSS). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU ks1; /* Gain (Ks1). Typical Value = 1. Default: nullptr */ - CIMPP::PU ks2; /* Gain (Ks2). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU ppss; /* Coefficient (p_PSS) (>=0 and <=4). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU psslim; /* PSS limiter (psslim). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds ts1; /* Time constant (Ts1). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ts2; /* Time constant (Ts2). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds ts3; /* Time constant (Ts3). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds ts4; /* Time constant (Ts4). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds ts5; /* Time constant (Ts5). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ts6; /* Time constant (Ts6). Typical Value = 1. Default: nullptr */ + /** \brief Coefficient (a_PSS). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU apss; + + /** \brief Gain (Ks1). Typical Value = 1. Default: nullptr */ + CIMPP::PU ks1; + + /** \brief Gain (Ks2). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU ks2; + + /** \brief Coefficient (p_PSS) (>=0 and <=4). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU ppss; + + /** \brief PSS limiter (psslim). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU psslim; + + /** \brief Time constant (Ts1). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ts1; + + /** \brief Time constant (Ts2). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds ts2; + + /** \brief Time constant (Ts3). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds ts3; + + /** \brief Time constant (Ts4). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds ts4; + + /** \brief Time constant (Ts5). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ts5; + + /** \brief Time constant (Ts6). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds ts6; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/PssIEEE1A.cpp b/CGMES_2.4.15_16FEB2016/PssIEEE1A.cpp index c6de783ee..7387ba08e 100644 --- a/CGMES_2.4.15_16FEB2016/PssIEEE1A.cpp +++ b/CGMES_2.4.15_16FEB2016/PssIEEE1A.cpp @@ -8,23 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "InputSignalKind.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PssIEEE1A::PssIEEE1A() {}; -PssIEEE1A::~PssIEEE1A() {}; +PssIEEE1A::PssIEEE1A() {} +PssIEEE1A::~PssIEEE1A() {} static const std::list PossibleProfilesForClass = { @@ -62,168 +50,178 @@ PssIEEE1A::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssIEEE1A_a1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_a1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_a2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_a2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_inputSignalType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_inputSignalType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignalType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssIEEE1A_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a1; if (!buffer.str().empty()) @@ -237,7 +235,8 @@ bool get_PssIEEE1A_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE1A_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a2; if (!buffer.str().empty()) @@ -249,9 +248,25 @@ bool get_PssIEEE1A_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } +bool get_PssIEEE1A_inputSignalType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignalType; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_PssIEEE1A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -265,7 +280,8 @@ bool get_PssIEEE1A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE1A_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -279,7 +295,8 @@ bool get_PssIEEE1A_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE1A_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -293,7 +310,8 @@ bool get_PssIEEE1A_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE1A_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -307,7 +325,8 @@ bool get_PssIEEE1A_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE1A_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -321,7 +340,8 @@ bool get_PssIEEE1A_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE1A_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -335,7 +355,8 @@ bool get_PssIEEE1A_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE1A_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -349,7 +370,8 @@ bool get_PssIEEE1A_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -363,7 +385,8 @@ bool get_PssIEEE1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_PssIEEE1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -375,22 +398,6 @@ bool get_PssIEEE1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } - - -bool get_PssIEEE1A_inputSignalType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignalType; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char PssIEEE1A::debugName[] = "PssIEEE1A"; const char* PssIEEE1A::debugString() const { @@ -399,23 +406,23 @@ const char* PssIEEE1A::debugString() const void PssIEEE1A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssIEEE1A"), &PssIEEE1A_factory)); + factory_map.emplace("cim:PssIEEE1A", &PssIEEE1A_factory); } void PssIEEE1A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.a1"), &assign_PssIEEE1A_a1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.a2"), &assign_PssIEEE1A_a2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.inputSignalType"), &assign_PssIEEE1A_inputSignalType)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.ks"), &assign_PssIEEE1A_ks)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.t1"), &assign_PssIEEE1A_t1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.t2"), &assign_PssIEEE1A_t2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.t3"), &assign_PssIEEE1A_t3)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.t4"), &assign_PssIEEE1A_t4)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.t5"), &assign_PssIEEE1A_t5)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.t6"), &assign_PssIEEE1A_t6)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.vrmax"), &assign_PssIEEE1A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.vrmin"), &assign_PssIEEE1A_vrmin)); + assign_map.emplace("cim:PssIEEE1A.a1", &assign_PssIEEE1A_a1); + assign_map.emplace("cim:PssIEEE1A.a2", &assign_PssIEEE1A_a2); + assign_map.emplace("cim:PssIEEE1A.inputSignalType", &assign_PssIEEE1A_inputSignalType); + assign_map.emplace("cim:PssIEEE1A.ks", &assign_PssIEEE1A_ks); + assign_map.emplace("cim:PssIEEE1A.t1", &assign_PssIEEE1A_t1); + assign_map.emplace("cim:PssIEEE1A.t2", &assign_PssIEEE1A_t2); + assign_map.emplace("cim:PssIEEE1A.t3", &assign_PssIEEE1A_t3); + assign_map.emplace("cim:PssIEEE1A.t4", &assign_PssIEEE1A_t4); + assign_map.emplace("cim:PssIEEE1A.t5", &assign_PssIEEE1A_t5); + assign_map.emplace("cim:PssIEEE1A.t6", &assign_PssIEEE1A_t6); + assign_map.emplace("cim:PssIEEE1A.vrmax", &assign_PssIEEE1A_vrmax); + assign_map.emplace("cim:PssIEEE1A.vrmin", &assign_PssIEEE1A_vrmin); } void PssIEEE1A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/PssIEEE1A.hpp b/CGMES_2.4.15_16FEB2016/PssIEEE1A.hpp index cec8ba246..783b9d15e 100644 --- a/CGMES_2.4.15_16FEB2016/PssIEEE1A.hpp +++ b/CGMES_2.4.15_16FEB2016/PssIEEE1A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type PSS1A power system stabilizer model. PSS1A is the generalized form of a PSS with a single input. Some common stabilizer input signals are speed, frequency, and power. Reference: IEEE 1A 421.5-2005 Section 8.1. - */ + /** \brief The class represents IEEE Std 421.5-2005 type PSS1A power system stabilizer model. PSS1A is the generalized form of a PSS with a single input. Some common stabilizer input signals are speed, frequency, and power. Reference: IEEE 1A 421.5-2005 Section 8.1. */ class PssIEEE1A : public PowerSystemStabilizerDynamics { public: @@ -29,18 +27,41 @@ namespace CIMPP PssIEEE1A(); ~PssIEEE1A() override; - CIMPP::PU a1; /* PSS signal conditioning frequency filter constant (A1). Typical Value = 0.061. Default: nullptr */ - CIMPP::PU a2; /* PSS signal conditioning frequency filter constant (A2). Typical Value = 0.0017. Default: nullptr */ - CIMPP::InputSignalKind inputSignalType; /* Type of input signal. Typical Value = rotorAngularFrequencyDeviation. Default: 0 */ - CIMPP::PU ks; /* Stabilizer gain (Ks). Typical Value = 5. Default: nullptr */ - CIMPP::Seconds t1; /* Lead/lag time constant (T1). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds t2; /* Lead/lag time constant (T2). Typical Value = 0.03. Default: nullptr */ - CIMPP::Seconds t3; /* Lead/lag time constant (T3). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds t4; /* Lead/lag time constant (T4). Typical Value = 0.03. Default: nullptr */ - CIMPP::Seconds t5; /* Washout time constant (T5). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds t6; /* Transducer time constant (T6). Typical Value = 0.01. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum stabilizer output (Vrmax). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum stabilizer output (Vrmin). Typical Value = -0.05. Default: nullptr */ + /** \brief PSS signal conditioning frequency filter constant (A1). Typical Value = 0.061. Default: nullptr */ + CIMPP::PU a1; + + /** \brief PSS signal conditioning frequency filter constant (A2). Typical Value = 0.0017. Default: nullptr */ + CIMPP::PU a2; + + /** \brief Type of input signal. Typical Value = rotorAngularFrequencyDeviation. Default: 0 */ + CIMPP::InputSignalKind inputSignalType; + + /** \brief Stabilizer gain (Ks). Typical Value = 5. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Lead/lag time constant (T1). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Lead/lag time constant (T2). Typical Value = 0.03. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Lead/lag time constant (T3). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Lead/lag time constant (T4). Typical Value = 0.03. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Washout time constant (T5). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Transducer time constant (T6). Typical Value = 0.01. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Maximum stabilizer output (Vrmax). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum stabilizer output (Vrmin). Typical Value = -0.05. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/PssIEEE2B.cpp b/CGMES_2.4.15_16FEB2016/PssIEEE2B.cpp index 39ac7e801..7b46362be 100644 --- a/CGMES_2.4.15_16FEB2016/PssIEEE2B.cpp +++ b/CGMES_2.4.15_16FEB2016/PssIEEE2B.cpp @@ -8,38 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "InputSignalKind.hpp" -#include "InputSignalKind.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Integer.hpp" -#include "Integer.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PssIEEE2B::PssIEEE2B() {}; -PssIEEE2B::~PssIEEE2B() {}; +PssIEEE2B::PssIEEE2B() {} +PssIEEE2B::~PssIEEE2B() {} static const std::list PossibleProfilesForClass = { @@ -92,363 +65,418 @@ PssIEEE2B::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssIEEE2B_inputSignal1Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_inputSignal1Type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal1Type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_inputSignal2Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_inputSignal2Type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal2Type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_ks1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_ks1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_ks2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_ks2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_ks3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_ks3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_m(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_m(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->m; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_n(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_n(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->n; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t11(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t11; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_tw1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_tw1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_tw2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_tw2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_tw3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_tw3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_tw4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_tw4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_vsi1max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_vsi1max(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsi1max; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_vsi1min(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_vsi1min(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsi1min; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_vsi2max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_vsi2max(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsi2max; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_vsi2min(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_vsi2min(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsi2min; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_vstmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_vstmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vstmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_vstmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_vstmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vstmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } +bool get_PssIEEE2B_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignal1Type; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} +bool get_PssIEEE2B_inputSignal2Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignal2Type; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} bool get_PssIEEE2B_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks1; if (!buffer.str().empty()) @@ -462,7 +490,8 @@ bool get_PssIEEE2B_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE2B_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks2; if (!buffer.str().empty()) @@ -476,7 +505,8 @@ bool get_PssIEEE2B_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE2B_ks3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks3; if (!buffer.str().empty()) @@ -490,7 +520,8 @@ bool get_PssIEEE2B_ks3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE2B_m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->m; if (!buffer.str().empty()) @@ -504,7 +535,8 @@ bool get_PssIEEE2B_m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssIEEE2B_n(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->n; if (!buffer.str().empty()) @@ -518,7 +550,8 @@ bool get_PssIEEE2B_n(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssIEEE2B_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -532,7 +565,8 @@ bool get_PssIEEE2B_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE2B_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t10; if (!buffer.str().empty()) @@ -546,7 +580,8 @@ bool get_PssIEEE2B_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE2B_t11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t11; if (!buffer.str().empty()) @@ -560,7 +595,8 @@ bool get_PssIEEE2B_t11(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE2B_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -574,7 +610,8 @@ bool get_PssIEEE2B_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE2B_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -588,7 +625,8 @@ bool get_PssIEEE2B_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE2B_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -602,7 +640,8 @@ bool get_PssIEEE2B_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE2B_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -616,7 +655,8 @@ bool get_PssIEEE2B_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE2B_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t7; if (!buffer.str().empty()) @@ -630,7 +670,8 @@ bool get_PssIEEE2B_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE2B_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t8; if (!buffer.str().empty()) @@ -644,7 +685,8 @@ bool get_PssIEEE2B_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE2B_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t9; if (!buffer.str().empty()) @@ -658,7 +700,8 @@ bool get_PssIEEE2B_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE2B_tw1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw1; if (!buffer.str().empty()) @@ -672,7 +715,8 @@ bool get_PssIEEE2B_tw1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE2B_tw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw2; if (!buffer.str().empty()) @@ -686,7 +730,8 @@ bool get_PssIEEE2B_tw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE2B_tw3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw3; if (!buffer.str().empty()) @@ -700,7 +745,8 @@ bool get_PssIEEE2B_tw3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE2B_tw4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw4; if (!buffer.str().empty()) @@ -714,7 +760,8 @@ bool get_PssIEEE2B_tw4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE2B_vsi1max(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsi1max; if (!buffer.str().empty()) @@ -728,7 +775,8 @@ bool get_PssIEEE2B_vsi1max(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_PssIEEE2B_vsi1min(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsi1min; if (!buffer.str().empty()) @@ -742,7 +790,8 @@ bool get_PssIEEE2B_vsi1min(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_PssIEEE2B_vsi2max(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsi2max; if (!buffer.str().empty()) @@ -756,7 +805,8 @@ bool get_PssIEEE2B_vsi2max(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_PssIEEE2B_vsi2min(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsi2min; if (!buffer.str().empty()) @@ -770,7 +820,8 @@ bool get_PssIEEE2B_vsi2min(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_PssIEEE2B_vstmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vstmax; if (!buffer.str().empty()) @@ -784,7 +835,8 @@ bool get_PssIEEE2B_vstmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_PssIEEE2B_vstmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vstmin; if (!buffer.str().empty()) @@ -796,36 +848,6 @@ bool get_PssIEEE2B_vstmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - -bool get_PssIEEE2B_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignal1Type; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - -bool get_PssIEEE2B_inputSignal2Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignal2Type; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char PssIEEE2B::debugName[] = "PssIEEE2B"; const char* PssIEEE2B::debugString() const { @@ -834,38 +856,38 @@ const char* PssIEEE2B::debugString() const void PssIEEE2B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssIEEE2B"), &PssIEEE2B_factory)); + factory_map.emplace("cim:PssIEEE2B", &PssIEEE2B_factory); } void PssIEEE2B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.inputSignal1Type"), &assign_PssIEEE2B_inputSignal1Type)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.inputSignal2Type"), &assign_PssIEEE2B_inputSignal2Type)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.ks1"), &assign_PssIEEE2B_ks1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.ks2"), &assign_PssIEEE2B_ks2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.ks3"), &assign_PssIEEE2B_ks3)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.m"), &assign_PssIEEE2B_m)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.n"), &assign_PssIEEE2B_n)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t1"), &assign_PssIEEE2B_t1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t10"), &assign_PssIEEE2B_t10)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t11"), &assign_PssIEEE2B_t11)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t2"), &assign_PssIEEE2B_t2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t3"), &assign_PssIEEE2B_t3)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t4"), &assign_PssIEEE2B_t4)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t6"), &assign_PssIEEE2B_t6)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t7"), &assign_PssIEEE2B_t7)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t8"), &assign_PssIEEE2B_t8)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t9"), &assign_PssIEEE2B_t9)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.tw1"), &assign_PssIEEE2B_tw1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.tw2"), &assign_PssIEEE2B_tw2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.tw3"), &assign_PssIEEE2B_tw3)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.tw4"), &assign_PssIEEE2B_tw4)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.vsi1max"), &assign_PssIEEE2B_vsi1max)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.vsi1min"), &assign_PssIEEE2B_vsi1min)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.vsi2max"), &assign_PssIEEE2B_vsi2max)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.vsi2min"), &assign_PssIEEE2B_vsi2min)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.vstmax"), &assign_PssIEEE2B_vstmax)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.vstmin"), &assign_PssIEEE2B_vstmin)); + assign_map.emplace("cim:PssIEEE2B.inputSignal1Type", &assign_PssIEEE2B_inputSignal1Type); + assign_map.emplace("cim:PssIEEE2B.inputSignal2Type", &assign_PssIEEE2B_inputSignal2Type); + assign_map.emplace("cim:PssIEEE2B.ks1", &assign_PssIEEE2B_ks1); + assign_map.emplace("cim:PssIEEE2B.ks2", &assign_PssIEEE2B_ks2); + assign_map.emplace("cim:PssIEEE2B.ks3", &assign_PssIEEE2B_ks3); + assign_map.emplace("cim:PssIEEE2B.m", &assign_PssIEEE2B_m); + assign_map.emplace("cim:PssIEEE2B.n", &assign_PssIEEE2B_n); + assign_map.emplace("cim:PssIEEE2B.t1", &assign_PssIEEE2B_t1); + assign_map.emplace("cim:PssIEEE2B.t10", &assign_PssIEEE2B_t10); + assign_map.emplace("cim:PssIEEE2B.t11", &assign_PssIEEE2B_t11); + assign_map.emplace("cim:PssIEEE2B.t2", &assign_PssIEEE2B_t2); + assign_map.emplace("cim:PssIEEE2B.t3", &assign_PssIEEE2B_t3); + assign_map.emplace("cim:PssIEEE2B.t4", &assign_PssIEEE2B_t4); + assign_map.emplace("cim:PssIEEE2B.t6", &assign_PssIEEE2B_t6); + assign_map.emplace("cim:PssIEEE2B.t7", &assign_PssIEEE2B_t7); + assign_map.emplace("cim:PssIEEE2B.t8", &assign_PssIEEE2B_t8); + assign_map.emplace("cim:PssIEEE2B.t9", &assign_PssIEEE2B_t9); + assign_map.emplace("cim:PssIEEE2B.tw1", &assign_PssIEEE2B_tw1); + assign_map.emplace("cim:PssIEEE2B.tw2", &assign_PssIEEE2B_tw2); + assign_map.emplace("cim:PssIEEE2B.tw3", &assign_PssIEEE2B_tw3); + assign_map.emplace("cim:PssIEEE2B.tw4", &assign_PssIEEE2B_tw4); + assign_map.emplace("cim:PssIEEE2B.vsi1max", &assign_PssIEEE2B_vsi1max); + assign_map.emplace("cim:PssIEEE2B.vsi1min", &assign_PssIEEE2B_vsi1min); + assign_map.emplace("cim:PssIEEE2B.vsi2max", &assign_PssIEEE2B_vsi2max); + assign_map.emplace("cim:PssIEEE2B.vsi2min", &assign_PssIEEE2B_vsi2min); + assign_map.emplace("cim:PssIEEE2B.vstmax", &assign_PssIEEE2B_vstmax); + assign_map.emplace("cim:PssIEEE2B.vstmin", &assign_PssIEEE2B_vstmin); } void PssIEEE2B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/PssIEEE2B.hpp b/CGMES_2.4.15_16FEB2016/PssIEEE2B.hpp index b38886649..0a629b803 100644 --- a/CGMES_2.4.15_16FEB2016/PssIEEE2B.hpp +++ b/CGMES_2.4.15_16FEB2016/PssIEEE2B.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type PSS2B power system stabilizer model. This stabilizer model is designed to represent a variety of dual-input stabilizers, which normally use combinations of power and speed or frequency to derive the stabilizing signal. Reference: IEEE 2B 421.5-2005 Section 8.2. - */ + /** \brief The class represents IEEE Std 421.5-2005 type PSS2B power system stabilizer model. This stabilizer model is designed to represent a variety of dual-input stabilizers, which normally use combinations of power and speed or frequency to derive the stabilizing signal. Reference: IEEE 2B 421.5-2005 Section 8.2. */ class PssIEEE2B : public PowerSystemStabilizerDynamics { public: @@ -30,33 +28,86 @@ namespace CIMPP PssIEEE2B(); ~PssIEEE2B() override; - CIMPP::InputSignalKind inputSignal1Type; /* Type of input signal #1. Typical Value = rotorSpeed. Default: 0 */ - CIMPP::InputSignalKind inputSignal2Type; /* Type of input signal #2. Typical Value = generatorElectricalPower. Default: 0 */ - CIMPP::PU ks1; /* Stabilizer gain (Ks1). Typical Value = 12. Default: nullptr */ - CIMPP::PU ks2; /* Gain on signal #2 (Ks2). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU ks3; /* Gain on signal #2 input before ramp-tracking filter (Ks3). Typical Value = 1. Default: nullptr */ - CIMPP::Integer m; /* Denominator order of ramp tracking filter (M). Typical Value = 5. Default: 0 */ - CIMPP::Integer n; /* Order of ramp tracking filter (N). Typical Value = 1. Default: 0 */ - CIMPP::Seconds t1; /* Lead/lag time constant (T1). Typical Value = 0.12. Default: nullptr */ - CIMPP::Seconds t10; /* Lead/lag time constant (T10). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t11; /* Lead/lag time constant (T11). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t2; /* Lead/lag time constant (T2). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds t3; /* Lead/lag time constant (T3). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds t4; /* Lead/lag time constant (T4). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds t6; /* Time constant on signal #1 (T6). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t7; /* Time constant on signal #2 (T7). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds t8; /* Lead of ramp tracking filter (T8). Typical Value = 0.2. Default: nullptr */ - CIMPP::Seconds t9; /* Lag of ramp tracking filter (T9). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tw1; /* First washout on signal #1 (Tw1). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds tw2; /* Second washout on signal #1 (Tw2). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds tw3; /* First washout on signal #2 (Tw3). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds tw4; /* Second washout on signal #2 (Tw4). Typical Value = 0. Default: nullptr */ - CIMPP::PU vsi1max; /* Input signal #1 max limit (Vsi1max). Typical Value = 2. Default: nullptr */ - CIMPP::PU vsi1min; /* Input signal #1 min limit (Vsi1min). Typical Value = -2. Default: nullptr */ - CIMPP::PU vsi2max; /* Input signal #2 max limit (Vsi2max). Typical Value = 2. Default: nullptr */ - CIMPP::PU vsi2min; /* Input signal #2 min limit (Vsi2min). Typical Value = -2. Default: nullptr */ - CIMPP::PU vstmax; /* Stabilizer output max limit (Vstmax). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU vstmin; /* Stabilizer output min limit (Vstmin). Typical Value = -0.1. Default: nullptr */ + /** \brief Type of input signal #1. Typical Value = rotorSpeed. Default: 0 */ + CIMPP::InputSignalKind inputSignal1Type; + + /** \brief Type of input signal #2. Typical Value = generatorElectricalPower. Default: 0 */ + CIMPP::InputSignalKind inputSignal2Type; + + /** \brief Stabilizer gain (Ks1). Typical Value = 12. Default: nullptr */ + CIMPP::PU ks1; + + /** \brief Gain on signal #2 (Ks2). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU ks2; + + /** \brief Gain on signal #2 input before ramp-tracking filter (Ks3). Typical Value = 1. Default: nullptr */ + CIMPP::PU ks3; + + /** \brief Denominator order of ramp tracking filter (M). Typical Value = 5. Default: 0 */ + CIMPP::Integer m; + + /** \brief Order of ramp tracking filter (N). Typical Value = 1. Default: 0 */ + CIMPP::Integer n; + + /** \brief Lead/lag time constant (T1). Typical Value = 0.12. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Lead/lag time constant (T10). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t10; + + /** \brief Lead/lag time constant (T11). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t11; + + /** \brief Lead/lag time constant (T2). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Lead/lag time constant (T3). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Lead/lag time constant (T4). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant on signal #1 (T6). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time constant on signal #2 (T7). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds t7; + + /** \brief Lead of ramp tracking filter (T8). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds t8; + + /** \brief Lag of ramp tracking filter (T9). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t9; + + /** \brief First washout on signal #1 (Tw1). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds tw1; + + /** \brief Second washout on signal #1 (Tw2). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds tw2; + + /** \brief First washout on signal #2 (Tw3). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds tw3; + + /** \brief Second washout on signal #2 (Tw4). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tw4; + + /** \brief Input signal #1 max limit (Vsi1max). Typical Value = 2. Default: nullptr */ + CIMPP::PU vsi1max; + + /** \brief Input signal #1 min limit (Vsi1min). Typical Value = -2. Default: nullptr */ + CIMPP::PU vsi1min; + + /** \brief Input signal #2 max limit (Vsi2max). Typical Value = 2. Default: nullptr */ + CIMPP::PU vsi2max; + + /** \brief Input signal #2 min limit (Vsi2min). Typical Value = -2. Default: nullptr */ + CIMPP::PU vsi2min; + + /** \brief Stabilizer output max limit (Vstmax). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU vstmax; + + /** \brief Stabilizer output min limit (Vstmin). Typical Value = -0.1. Default: nullptr */ + CIMPP::PU vstmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/PssIEEE3B.cpp b/CGMES_2.4.15_16FEB2016/PssIEEE3B.cpp index 8fc5552af..f4cf47980 100644 --- a/CGMES_2.4.15_16FEB2016/PssIEEE3B.cpp +++ b/CGMES_2.4.15_16FEB2016/PssIEEE3B.cpp @@ -8,30 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "InputSignalKind.hpp" -#include "InputSignalKind.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PssIEEE3B::PssIEEE3B() {}; -PssIEEE3B::~PssIEEE3B() {}; +PssIEEE3B::PssIEEE3B() {} +PssIEEE3B::~PssIEEE3B() {} static const std::list PossibleProfilesForClass = { @@ -76,259 +57,276 @@ PssIEEE3B::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssIEEE3B_a1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_a1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_a2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_a2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_a3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_a3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_a4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_a4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_a5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_a5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_a6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_a6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_a7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_a7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_a8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_a8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_inputSignal1Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_inputSignal1Type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal1Type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_inputSignal2Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_inputSignal2Type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal2Type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_ks1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_ks1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_ks2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_ks2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_tw1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_tw1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_tw2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_tw2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_tw3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_tw3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_vstmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_vstmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vstmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_vstmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_vstmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vstmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssIEEE3B_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a1; if (!buffer.str().empty()) @@ -342,7 +340,8 @@ bool get_PssIEEE3B_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE3B_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a2; if (!buffer.str().empty()) @@ -356,7 +355,8 @@ bool get_PssIEEE3B_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE3B_a3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a3; if (!buffer.str().empty()) @@ -370,7 +370,8 @@ bool get_PssIEEE3B_a3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE3B_a4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a4; if (!buffer.str().empty()) @@ -384,7 +385,8 @@ bool get_PssIEEE3B_a4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE3B_a5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a5; if (!buffer.str().empty()) @@ -398,7 +400,8 @@ bool get_PssIEEE3B_a5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE3B_a6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a6; if (!buffer.str().empty()) @@ -412,7 +415,8 @@ bool get_PssIEEE3B_a6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE3B_a7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a7; if (!buffer.str().empty()) @@ -426,7 +430,8 @@ bool get_PssIEEE3B_a7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE3B_a8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a8; if (!buffer.str().empty()) @@ -438,11 +443,12 @@ bool get_PssIEEE3B_a8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } -bool get_PssIEEE3B_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_PssIEEE3B_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->ks1; + buffer << element->inputSignal1Type; if (!buffer.str().empty()) { return true; @@ -452,11 +458,12 @@ bool get_PssIEEE3B_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } -bool get_PssIEEE3B_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_PssIEEE3B_inputSignal2Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->ks2; + buffer << element->inputSignal2Type; if (!buffer.str().empty()) { return true; @@ -466,11 +473,12 @@ bool get_PssIEEE3B_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } -bool get_PssIEEE3B_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_PssIEEE3B_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->t1; + buffer << element->ks1; if (!buffer.str().empty()) { return true; @@ -480,11 +488,12 @@ bool get_PssIEEE3B_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } -bool get_PssIEEE3B_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_PssIEEE3B_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->t2; + buffer << element->ks2; if (!buffer.str().empty()) { return true; @@ -494,11 +503,12 @@ bool get_PssIEEE3B_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } -bool get_PssIEEE3B_tw1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_PssIEEE3B_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tw1; + buffer << element->t1; if (!buffer.str().empty()) { return true; @@ -508,11 +518,12 @@ bool get_PssIEEE3B_tw1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } -bool get_PssIEEE3B_tw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_PssIEEE3B_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tw2; + buffer << element->t2; if (!buffer.str().empty()) { return true; @@ -522,11 +533,12 @@ bool get_PssIEEE3B_tw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } -bool get_PssIEEE3B_tw3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_PssIEEE3B_tw1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tw3; + buffer << element->tw1; if (!buffer.str().empty()) { return true; @@ -536,11 +548,12 @@ bool get_PssIEEE3B_tw3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } -bool get_PssIEEE3B_vstmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_PssIEEE3B_tw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vstmax; + buffer << element->tw2; if (!buffer.str().empty()) { return true; @@ -550,11 +563,12 @@ bool get_PssIEEE3B_vstmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } -bool get_PssIEEE3B_vstmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_PssIEEE3B_tw3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vstmin; + buffer << element->tw3; if (!buffer.str().empty()) { return true; @@ -564,13 +578,12 @@ bool get_PssIEEE3B_vstmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - -bool get_PssIEEE3B_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_PssIEEE3B_vstmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->inputSignal1Type; + buffer << element->vstmax; if (!buffer.str().empty()) { return true; @@ -580,11 +593,12 @@ bool get_PssIEEE3B_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::string return false; } -bool get_PssIEEE3B_inputSignal2Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_PssIEEE3B_vstmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->inputSignal2Type; + buffer << element->vstmin; if (!buffer.str().empty()) { return true; @@ -602,30 +616,30 @@ const char* PssIEEE3B::debugString() const void PssIEEE3B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssIEEE3B"), &PssIEEE3B_factory)); + factory_map.emplace("cim:PssIEEE3B", &PssIEEE3B_factory); } void PssIEEE3B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.a1"), &assign_PssIEEE3B_a1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.a2"), &assign_PssIEEE3B_a2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.a3"), &assign_PssIEEE3B_a3)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.a4"), &assign_PssIEEE3B_a4)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.a5"), &assign_PssIEEE3B_a5)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.a6"), &assign_PssIEEE3B_a6)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.a7"), &assign_PssIEEE3B_a7)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.a8"), &assign_PssIEEE3B_a8)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.inputSignal1Type"), &assign_PssIEEE3B_inputSignal1Type)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.inputSignal2Type"), &assign_PssIEEE3B_inputSignal2Type)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.ks1"), &assign_PssIEEE3B_ks1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.ks2"), &assign_PssIEEE3B_ks2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.t1"), &assign_PssIEEE3B_t1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.t2"), &assign_PssIEEE3B_t2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.tw1"), &assign_PssIEEE3B_tw1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.tw2"), &assign_PssIEEE3B_tw2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.tw3"), &assign_PssIEEE3B_tw3)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.vstmax"), &assign_PssIEEE3B_vstmax)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.vstmin"), &assign_PssIEEE3B_vstmin)); + assign_map.emplace("cim:PssIEEE3B.a1", &assign_PssIEEE3B_a1); + assign_map.emplace("cim:PssIEEE3B.a2", &assign_PssIEEE3B_a2); + assign_map.emplace("cim:PssIEEE3B.a3", &assign_PssIEEE3B_a3); + assign_map.emplace("cim:PssIEEE3B.a4", &assign_PssIEEE3B_a4); + assign_map.emplace("cim:PssIEEE3B.a5", &assign_PssIEEE3B_a5); + assign_map.emplace("cim:PssIEEE3B.a6", &assign_PssIEEE3B_a6); + assign_map.emplace("cim:PssIEEE3B.a7", &assign_PssIEEE3B_a7); + assign_map.emplace("cim:PssIEEE3B.a8", &assign_PssIEEE3B_a8); + assign_map.emplace("cim:PssIEEE3B.inputSignal1Type", &assign_PssIEEE3B_inputSignal1Type); + assign_map.emplace("cim:PssIEEE3B.inputSignal2Type", &assign_PssIEEE3B_inputSignal2Type); + assign_map.emplace("cim:PssIEEE3B.ks1", &assign_PssIEEE3B_ks1); + assign_map.emplace("cim:PssIEEE3B.ks2", &assign_PssIEEE3B_ks2); + assign_map.emplace("cim:PssIEEE3B.t1", &assign_PssIEEE3B_t1); + assign_map.emplace("cim:PssIEEE3B.t2", &assign_PssIEEE3B_t2); + assign_map.emplace("cim:PssIEEE3B.tw1", &assign_PssIEEE3B_tw1); + assign_map.emplace("cim:PssIEEE3B.tw2", &assign_PssIEEE3B_tw2); + assign_map.emplace("cim:PssIEEE3B.tw3", &assign_PssIEEE3B_tw3); + assign_map.emplace("cim:PssIEEE3B.vstmax", &assign_PssIEEE3B_vstmax); + assign_map.emplace("cim:PssIEEE3B.vstmin", &assign_PssIEEE3B_vstmin); } void PssIEEE3B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/PssIEEE3B.hpp b/CGMES_2.4.15_16FEB2016/PssIEEE3B.hpp index 98e5144a8..8f5a867f9 100644 --- a/CGMES_2.4.15_16FEB2016/PssIEEE3B.hpp +++ b/CGMES_2.4.15_16FEB2016/PssIEEE3B.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type PSS3B power system stabilizer model. The PSS model PSS3B has dual inputs of electrical power and rotor angular frequency deviation. The signals are used to derive an equivalent mechanical power signal. Reference: IEEE 3B 421.5-2005 Section 8.3. - */ + /** \brief The class represents IEEE Std 421.5-2005 type PSS3B power system stabilizer model. The PSS model PSS3B has dual inputs of electrical power and rotor angular frequency deviation. The signals are used to derive an equivalent mechanical power signal. Reference: IEEE 3B 421.5-2005 Section 8.3. */ class PssIEEE3B : public PowerSystemStabilizerDynamics { public: @@ -29,25 +27,62 @@ namespace CIMPP PssIEEE3B(); ~PssIEEE3B() override; - CIMPP::PU a1; /* Notch filter parameter (A1). Typical Value = 0.359. Default: nullptr */ - CIMPP::PU a2; /* Notch filter parameter (A2). Typical Value = 0.586. Default: nullptr */ - CIMPP::PU a3; /* Notch filter parameter (A3). Typical Value = 0.429. Default: nullptr */ - CIMPP::PU a4; /* Notch filter parameter (A4). Typical Value = 0.564. Default: nullptr */ - CIMPP::PU a5; /* Notch filter parameter (A5). Typical Value = 0.001. Default: nullptr */ - CIMPP::PU a6; /* Notch filter parameter (A6). Typical Value = 0. Default: nullptr */ - CIMPP::PU a7; /* Notch filter parameter (A7). Typical Value = 0.031. Default: nullptr */ - CIMPP::PU a8; /* Notch filter parameter (A8). Typical Value = 0. Default: nullptr */ - CIMPP::InputSignalKind inputSignal1Type; /* Type of input signal #1. Typical Value = generatorElectricalPower. Default: 0 */ - CIMPP::InputSignalKind inputSignal2Type; /* Type of input signal #2. Typical Value = rotorSpeed. Default: 0 */ - CIMPP::PU ks1; /* Gain on signal # 1 (Ks1). Typical Value = -0.602. Default: nullptr */ - CIMPP::PU ks2; /* Gain on signal # 2 (Ks2). Typical Value = 30.12. Default: nullptr */ - CIMPP::Seconds t1; /* Transducer time constant (T1). Typical Value = 0.012. Default: nullptr */ - CIMPP::Seconds t2; /* Transducer time constant (T2). Typical Value = 0.012. Default: nullptr */ - CIMPP::Seconds tw1; /* Washout time constant (Tw1). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds tw2; /* Washout time constant (Tw2). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds tw3; /* Washout time constant (Tw3). Typical Value = 0.6. Default: nullptr */ - CIMPP::PU vstmax; /* Stabilizer output max limit (Vstmax). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU vstmin; /* Stabilizer output min limit (Vstmin). Typical Value = -0.1. Default: nullptr */ + /** \brief Notch filter parameter (A1). Typical Value = 0.359. Default: nullptr */ + CIMPP::PU a1; + + /** \brief Notch filter parameter (A2). Typical Value = 0.586. Default: nullptr */ + CIMPP::PU a2; + + /** \brief Notch filter parameter (A3). Typical Value = 0.429. Default: nullptr */ + CIMPP::PU a3; + + /** \brief Notch filter parameter (A4). Typical Value = 0.564. Default: nullptr */ + CIMPP::PU a4; + + /** \brief Notch filter parameter (A5). Typical Value = 0.001. Default: nullptr */ + CIMPP::PU a5; + + /** \brief Notch filter parameter (A6). Typical Value = 0. Default: nullptr */ + CIMPP::PU a6; + + /** \brief Notch filter parameter (A7). Typical Value = 0.031. Default: nullptr */ + CIMPP::PU a7; + + /** \brief Notch filter parameter (A8). Typical Value = 0. Default: nullptr */ + CIMPP::PU a8; + + /** \brief Type of input signal #1. Typical Value = generatorElectricalPower. Default: 0 */ + CIMPP::InputSignalKind inputSignal1Type; + + /** \brief Type of input signal #2. Typical Value = rotorSpeed. Default: 0 */ + CIMPP::InputSignalKind inputSignal2Type; + + /** \brief Gain on signal # 1 (Ks1). Typical Value = -0.602. Default: nullptr */ + CIMPP::PU ks1; + + /** \brief Gain on signal # 2 (Ks2). Typical Value = 30.12. Default: nullptr */ + CIMPP::PU ks2; + + /** \brief Transducer time constant (T1). Typical Value = 0.012. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Transducer time constant (T2). Typical Value = 0.012. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Washout time constant (Tw1). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds tw1; + + /** \brief Washout time constant (Tw2). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds tw2; + + /** \brief Washout time constant (Tw3). Typical Value = 0.6. Default: nullptr */ + CIMPP::Seconds tw3; + + /** \brief Stabilizer output max limit (Vstmax). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU vstmax; + + /** \brief Stabilizer output min limit (Vstmin). Typical Value = -0.1. Default: nullptr */ + CIMPP::PU vstmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/PssIEEE4B.cpp b/CGMES_2.4.15_16FEB2016/PssIEEE4B.cpp index d3b867c21..6eb537c95 100644 --- a/CGMES_2.4.15_16FEB2016/PssIEEE4B.cpp +++ b/CGMES_2.4.15_16FEB2016/PssIEEE4B.cpp @@ -8,78 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PssIEEE4B::PssIEEE4B() {}; -PssIEEE4B::~PssIEEE4B() {}; +PssIEEE4B::PssIEEE4B() {} +PssIEEE4B::~PssIEEE4B() {} static const std::list PossibleProfilesForClass = { @@ -172,883 +105,948 @@ PssIEEE4B::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssIEEE4B_bwh1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_bwh1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bwh1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_bwh2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_bwh2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bwh2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_bwl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_bwl1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bwl1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_bwl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_bwl2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bwl2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kh1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kh1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kh11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kh11(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh11; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kh17(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kh17(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh17; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kh2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kh2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ki1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ki1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ki11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ki11(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki11; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ki17(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ki17(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki17; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ki2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ki2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kl1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kl11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kl11(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl11; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kl17(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kl17(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl17; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kl2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_omeganh1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_omeganh1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->omeganh1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_omeganh2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_omeganh2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->omeganh2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_omeganl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_omeganl1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->omeganl1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_omeganl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_omeganl2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->omeganl2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th11(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th11; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti11(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti11; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl11(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl11; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_vhmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_vhmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vhmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_vhmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_vhmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vhmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_vimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_vlmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_vlmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vlmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_vlmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_vlmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vlmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_vstmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_vstmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vstmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_vstmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_vstmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vstmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssIEEE4B_bwh1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bwh1; if (!buffer.str().empty()) @@ -1062,7 +1060,8 @@ bool get_PssIEEE4B_bwh1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_bwh2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bwh2; if (!buffer.str().empty()) @@ -1076,7 +1075,8 @@ bool get_PssIEEE4B_bwh2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_bwl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bwl1; if (!buffer.str().empty()) @@ -1090,7 +1090,8 @@ bool get_PssIEEE4B_bwl1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_bwl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bwl2; if (!buffer.str().empty()) @@ -1104,7 +1105,8 @@ bool get_PssIEEE4B_bwl2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh; if (!buffer.str().empty()) @@ -1118,7 +1120,8 @@ bool get_PssIEEE4B_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE4B_kh1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh1; if (!buffer.str().empty()) @@ -1132,7 +1135,8 @@ bool get_PssIEEE4B_kh1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_kh11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh11; if (!buffer.str().empty()) @@ -1146,7 +1150,8 @@ bool get_PssIEEE4B_kh11(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_kh17(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh17; if (!buffer.str().empty()) @@ -1160,7 +1165,8 @@ bool get_PssIEEE4B_kh17(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_kh2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh2; if (!buffer.str().empty()) @@ -1174,7 +1180,8 @@ bool get_PssIEEE4B_kh2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -1188,7 +1195,8 @@ bool get_PssIEEE4B_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE4B_ki1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki1; if (!buffer.str().empty()) @@ -1202,7 +1210,8 @@ bool get_PssIEEE4B_ki1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ki11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki11; if (!buffer.str().empty()) @@ -1216,7 +1225,8 @@ bool get_PssIEEE4B_ki11(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_ki17(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki17; if (!buffer.str().empty()) @@ -1230,7 +1240,8 @@ bool get_PssIEEE4B_ki17(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_ki2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki2; if (!buffer.str().empty()) @@ -1244,7 +1255,8 @@ bool get_PssIEEE4B_ki2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl; if (!buffer.str().empty()) @@ -1258,7 +1270,8 @@ bool get_PssIEEE4B_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE4B_kl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl1; if (!buffer.str().empty()) @@ -1272,7 +1285,8 @@ bool get_PssIEEE4B_kl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_kl11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl11; if (!buffer.str().empty()) @@ -1286,7 +1300,8 @@ bool get_PssIEEE4B_kl11(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_kl17(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl17; if (!buffer.str().empty()) @@ -1300,7 +1315,8 @@ bool get_PssIEEE4B_kl17(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_kl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl2; if (!buffer.str().empty()) @@ -1314,7 +1330,8 @@ bool get_PssIEEE4B_kl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_omeganh1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->omeganh1; if (!buffer.str().empty()) @@ -1328,7 +1345,8 @@ bool get_PssIEEE4B_omeganh1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_PssIEEE4B_omeganh2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->omeganh2; if (!buffer.str().empty()) @@ -1342,7 +1360,8 @@ bool get_PssIEEE4B_omeganh2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_PssIEEE4B_omeganl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->omeganl1; if (!buffer.str().empty()) @@ -1356,7 +1375,8 @@ bool get_PssIEEE4B_omeganl1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_PssIEEE4B_omeganl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->omeganl2; if (!buffer.str().empty()) @@ -1370,7 +1390,8 @@ bool get_PssIEEE4B_omeganl2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_PssIEEE4B_th1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th1; if (!buffer.str().empty()) @@ -1384,7 +1405,8 @@ bool get_PssIEEE4B_th1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_th10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th10; if (!buffer.str().empty()) @@ -1398,7 +1420,8 @@ bool get_PssIEEE4B_th10(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_th11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th11; if (!buffer.str().empty()) @@ -1412,7 +1435,8 @@ bool get_PssIEEE4B_th11(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_th12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th12; if (!buffer.str().empty()) @@ -1426,7 +1450,8 @@ bool get_PssIEEE4B_th12(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_th2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th2; if (!buffer.str().empty()) @@ -1440,7 +1465,8 @@ bool get_PssIEEE4B_th2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_th3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th3; if (!buffer.str().empty()) @@ -1454,7 +1480,8 @@ bool get_PssIEEE4B_th3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_th4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th4; if (!buffer.str().empty()) @@ -1468,7 +1495,8 @@ bool get_PssIEEE4B_th4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_th5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th5; if (!buffer.str().empty()) @@ -1482,7 +1510,8 @@ bool get_PssIEEE4B_th5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_th6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th6; if (!buffer.str().empty()) @@ -1496,7 +1525,8 @@ bool get_PssIEEE4B_th6(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_th7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th7; if (!buffer.str().empty()) @@ -1510,7 +1540,8 @@ bool get_PssIEEE4B_th7(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_th8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th8; if (!buffer.str().empty()) @@ -1524,7 +1555,8 @@ bool get_PssIEEE4B_th8(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_th9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th9; if (!buffer.str().empty()) @@ -1538,7 +1570,8 @@ bool get_PssIEEE4B_th9(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ti1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti1; if (!buffer.str().empty()) @@ -1552,7 +1585,8 @@ bool get_PssIEEE4B_ti1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ti10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti10; if (!buffer.str().empty()) @@ -1566,7 +1600,8 @@ bool get_PssIEEE4B_ti10(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_ti11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti11; if (!buffer.str().empty()) @@ -1580,7 +1615,8 @@ bool get_PssIEEE4B_ti11(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_ti12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti12; if (!buffer.str().empty()) @@ -1594,7 +1630,8 @@ bool get_PssIEEE4B_ti12(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_ti2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti2; if (!buffer.str().empty()) @@ -1608,7 +1645,8 @@ bool get_PssIEEE4B_ti2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ti3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti3; if (!buffer.str().empty()) @@ -1622,7 +1660,8 @@ bool get_PssIEEE4B_ti3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ti4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti4; if (!buffer.str().empty()) @@ -1636,7 +1675,8 @@ bool get_PssIEEE4B_ti4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ti5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti5; if (!buffer.str().empty()) @@ -1650,7 +1690,8 @@ bool get_PssIEEE4B_ti5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ti6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti6; if (!buffer.str().empty()) @@ -1664,7 +1705,8 @@ bool get_PssIEEE4B_ti6(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ti7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti7; if (!buffer.str().empty()) @@ -1678,7 +1720,8 @@ bool get_PssIEEE4B_ti7(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ti8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti8; if (!buffer.str().empty()) @@ -1692,7 +1735,8 @@ bool get_PssIEEE4B_ti8(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ti9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti9; if (!buffer.str().empty()) @@ -1706,7 +1750,8 @@ bool get_PssIEEE4B_ti9(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_tl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl1; if (!buffer.str().empty()) @@ -1720,7 +1765,8 @@ bool get_PssIEEE4B_tl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_tl10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl10; if (!buffer.str().empty()) @@ -1734,7 +1780,8 @@ bool get_PssIEEE4B_tl10(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_tl11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl11; if (!buffer.str().empty()) @@ -1748,7 +1795,8 @@ bool get_PssIEEE4B_tl11(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_tl12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl12; if (!buffer.str().empty()) @@ -1762,7 +1810,8 @@ bool get_PssIEEE4B_tl12(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_tl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl2; if (!buffer.str().empty()) @@ -1776,7 +1825,8 @@ bool get_PssIEEE4B_tl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_tl3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl3; if (!buffer.str().empty()) @@ -1790,7 +1840,8 @@ bool get_PssIEEE4B_tl3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_tl4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl4; if (!buffer.str().empty()) @@ -1804,7 +1855,8 @@ bool get_PssIEEE4B_tl4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_tl5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl5; if (!buffer.str().empty()) @@ -1818,7 +1870,8 @@ bool get_PssIEEE4B_tl5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_tl6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl6; if (!buffer.str().empty()) @@ -1832,7 +1885,8 @@ bool get_PssIEEE4B_tl6(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_tl7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl7; if (!buffer.str().empty()) @@ -1846,7 +1900,8 @@ bool get_PssIEEE4B_tl7(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_tl8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl8; if (!buffer.str().empty()) @@ -1860,7 +1915,8 @@ bool get_PssIEEE4B_tl8(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_tl9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl9; if (!buffer.str().empty()) @@ -1874,7 +1930,8 @@ bool get_PssIEEE4B_tl9(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_vhmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vhmax; if (!buffer.str().empty()) @@ -1888,7 +1945,8 @@ bool get_PssIEEE4B_vhmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_PssIEEE4B_vhmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vhmin; if (!buffer.str().empty()) @@ -1902,7 +1960,8 @@ bool get_PssIEEE4B_vhmin(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_PssIEEE4B_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -1916,7 +1975,8 @@ bool get_PssIEEE4B_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_PssIEEE4B_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimin; if (!buffer.str().empty()) @@ -1930,7 +1990,8 @@ bool get_PssIEEE4B_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_PssIEEE4B_vlmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vlmax; if (!buffer.str().empty()) @@ -1944,7 +2005,8 @@ bool get_PssIEEE4B_vlmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_PssIEEE4B_vlmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vlmin; if (!buffer.str().empty()) @@ -1958,7 +2020,8 @@ bool get_PssIEEE4B_vlmin(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_PssIEEE4B_vstmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vstmax; if (!buffer.str().empty()) @@ -1972,7 +2035,8 @@ bool get_PssIEEE4B_vstmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_PssIEEE4B_vstmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vstmin; if (!buffer.str().empty()) @@ -1984,8 +2048,6 @@ bool get_PssIEEE4B_vstmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char PssIEEE4B::debugName[] = "PssIEEE4B"; const char* PssIEEE4B::debugString() const { @@ -1994,78 +2056,78 @@ const char* PssIEEE4B::debugString() const void PssIEEE4B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssIEEE4B"), &PssIEEE4B_factory)); + factory_map.emplace("cim:PssIEEE4B", &PssIEEE4B_factory); } void PssIEEE4B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.bwh1"), &assign_PssIEEE4B_bwh1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.bwh2"), &assign_PssIEEE4B_bwh2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.bwl1"), &assign_PssIEEE4B_bwl1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.bwl2"), &assign_PssIEEE4B_bwl2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kh"), &assign_PssIEEE4B_kh)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kh1"), &assign_PssIEEE4B_kh1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kh11"), &assign_PssIEEE4B_kh11)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kh17"), &assign_PssIEEE4B_kh17)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kh2"), &assign_PssIEEE4B_kh2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ki"), &assign_PssIEEE4B_ki)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ki1"), &assign_PssIEEE4B_ki1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ki11"), &assign_PssIEEE4B_ki11)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ki17"), &assign_PssIEEE4B_ki17)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ki2"), &assign_PssIEEE4B_ki2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kl"), &assign_PssIEEE4B_kl)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kl1"), &assign_PssIEEE4B_kl1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kl11"), &assign_PssIEEE4B_kl11)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kl17"), &assign_PssIEEE4B_kl17)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kl2"), &assign_PssIEEE4B_kl2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.omeganh1"), &assign_PssIEEE4B_omeganh1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.omeganh2"), &assign_PssIEEE4B_omeganh2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.omeganl1"), &assign_PssIEEE4B_omeganl1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.omeganl2"), &assign_PssIEEE4B_omeganl2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th1"), &assign_PssIEEE4B_th1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th10"), &assign_PssIEEE4B_th10)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th11"), &assign_PssIEEE4B_th11)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th12"), &assign_PssIEEE4B_th12)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th2"), &assign_PssIEEE4B_th2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th3"), &assign_PssIEEE4B_th3)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th4"), &assign_PssIEEE4B_th4)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th5"), &assign_PssIEEE4B_th5)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th6"), &assign_PssIEEE4B_th6)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th7"), &assign_PssIEEE4B_th7)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th8"), &assign_PssIEEE4B_th8)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th9"), &assign_PssIEEE4B_th9)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti1"), &assign_PssIEEE4B_ti1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti10"), &assign_PssIEEE4B_ti10)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti11"), &assign_PssIEEE4B_ti11)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti12"), &assign_PssIEEE4B_ti12)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti2"), &assign_PssIEEE4B_ti2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti3"), &assign_PssIEEE4B_ti3)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti4"), &assign_PssIEEE4B_ti4)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti5"), &assign_PssIEEE4B_ti5)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti6"), &assign_PssIEEE4B_ti6)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti7"), &assign_PssIEEE4B_ti7)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti8"), &assign_PssIEEE4B_ti8)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti9"), &assign_PssIEEE4B_ti9)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl1"), &assign_PssIEEE4B_tl1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl10"), &assign_PssIEEE4B_tl10)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl11"), &assign_PssIEEE4B_tl11)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl12"), &assign_PssIEEE4B_tl12)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl2"), &assign_PssIEEE4B_tl2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl3"), &assign_PssIEEE4B_tl3)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl4"), &assign_PssIEEE4B_tl4)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl5"), &assign_PssIEEE4B_tl5)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl6"), &assign_PssIEEE4B_tl6)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl7"), &assign_PssIEEE4B_tl7)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl8"), &assign_PssIEEE4B_tl8)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl9"), &assign_PssIEEE4B_tl9)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.vhmax"), &assign_PssIEEE4B_vhmax)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.vhmin"), &assign_PssIEEE4B_vhmin)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.vimax"), &assign_PssIEEE4B_vimax)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.vimin"), &assign_PssIEEE4B_vimin)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.vlmax"), &assign_PssIEEE4B_vlmax)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.vlmin"), &assign_PssIEEE4B_vlmin)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.vstmax"), &assign_PssIEEE4B_vstmax)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.vstmin"), &assign_PssIEEE4B_vstmin)); + assign_map.emplace("cim:PssIEEE4B.bwh1", &assign_PssIEEE4B_bwh1); + assign_map.emplace("cim:PssIEEE4B.bwh2", &assign_PssIEEE4B_bwh2); + assign_map.emplace("cim:PssIEEE4B.bwl1", &assign_PssIEEE4B_bwl1); + assign_map.emplace("cim:PssIEEE4B.bwl2", &assign_PssIEEE4B_bwl2); + assign_map.emplace("cim:PssIEEE4B.kh", &assign_PssIEEE4B_kh); + assign_map.emplace("cim:PssIEEE4B.kh1", &assign_PssIEEE4B_kh1); + assign_map.emplace("cim:PssIEEE4B.kh11", &assign_PssIEEE4B_kh11); + assign_map.emplace("cim:PssIEEE4B.kh17", &assign_PssIEEE4B_kh17); + assign_map.emplace("cim:PssIEEE4B.kh2", &assign_PssIEEE4B_kh2); + assign_map.emplace("cim:PssIEEE4B.ki", &assign_PssIEEE4B_ki); + assign_map.emplace("cim:PssIEEE4B.ki1", &assign_PssIEEE4B_ki1); + assign_map.emplace("cim:PssIEEE4B.ki11", &assign_PssIEEE4B_ki11); + assign_map.emplace("cim:PssIEEE4B.ki17", &assign_PssIEEE4B_ki17); + assign_map.emplace("cim:PssIEEE4B.ki2", &assign_PssIEEE4B_ki2); + assign_map.emplace("cim:PssIEEE4B.kl", &assign_PssIEEE4B_kl); + assign_map.emplace("cim:PssIEEE4B.kl1", &assign_PssIEEE4B_kl1); + assign_map.emplace("cim:PssIEEE4B.kl11", &assign_PssIEEE4B_kl11); + assign_map.emplace("cim:PssIEEE4B.kl17", &assign_PssIEEE4B_kl17); + assign_map.emplace("cim:PssIEEE4B.kl2", &assign_PssIEEE4B_kl2); + assign_map.emplace("cim:PssIEEE4B.omeganh1", &assign_PssIEEE4B_omeganh1); + assign_map.emplace("cim:PssIEEE4B.omeganh2", &assign_PssIEEE4B_omeganh2); + assign_map.emplace("cim:PssIEEE4B.omeganl1", &assign_PssIEEE4B_omeganl1); + assign_map.emplace("cim:PssIEEE4B.omeganl2", &assign_PssIEEE4B_omeganl2); + assign_map.emplace("cim:PssIEEE4B.th1", &assign_PssIEEE4B_th1); + assign_map.emplace("cim:PssIEEE4B.th10", &assign_PssIEEE4B_th10); + assign_map.emplace("cim:PssIEEE4B.th11", &assign_PssIEEE4B_th11); + assign_map.emplace("cim:PssIEEE4B.th12", &assign_PssIEEE4B_th12); + assign_map.emplace("cim:PssIEEE4B.th2", &assign_PssIEEE4B_th2); + assign_map.emplace("cim:PssIEEE4B.th3", &assign_PssIEEE4B_th3); + assign_map.emplace("cim:PssIEEE4B.th4", &assign_PssIEEE4B_th4); + assign_map.emplace("cim:PssIEEE4B.th5", &assign_PssIEEE4B_th5); + assign_map.emplace("cim:PssIEEE4B.th6", &assign_PssIEEE4B_th6); + assign_map.emplace("cim:PssIEEE4B.th7", &assign_PssIEEE4B_th7); + assign_map.emplace("cim:PssIEEE4B.th8", &assign_PssIEEE4B_th8); + assign_map.emplace("cim:PssIEEE4B.th9", &assign_PssIEEE4B_th9); + assign_map.emplace("cim:PssIEEE4B.ti1", &assign_PssIEEE4B_ti1); + assign_map.emplace("cim:PssIEEE4B.ti10", &assign_PssIEEE4B_ti10); + assign_map.emplace("cim:PssIEEE4B.ti11", &assign_PssIEEE4B_ti11); + assign_map.emplace("cim:PssIEEE4B.ti12", &assign_PssIEEE4B_ti12); + assign_map.emplace("cim:PssIEEE4B.ti2", &assign_PssIEEE4B_ti2); + assign_map.emplace("cim:PssIEEE4B.ti3", &assign_PssIEEE4B_ti3); + assign_map.emplace("cim:PssIEEE4B.ti4", &assign_PssIEEE4B_ti4); + assign_map.emplace("cim:PssIEEE4B.ti5", &assign_PssIEEE4B_ti5); + assign_map.emplace("cim:PssIEEE4B.ti6", &assign_PssIEEE4B_ti6); + assign_map.emplace("cim:PssIEEE4B.ti7", &assign_PssIEEE4B_ti7); + assign_map.emplace("cim:PssIEEE4B.ti8", &assign_PssIEEE4B_ti8); + assign_map.emplace("cim:PssIEEE4B.ti9", &assign_PssIEEE4B_ti9); + assign_map.emplace("cim:PssIEEE4B.tl1", &assign_PssIEEE4B_tl1); + assign_map.emplace("cim:PssIEEE4B.tl10", &assign_PssIEEE4B_tl10); + assign_map.emplace("cim:PssIEEE4B.tl11", &assign_PssIEEE4B_tl11); + assign_map.emplace("cim:PssIEEE4B.tl12", &assign_PssIEEE4B_tl12); + assign_map.emplace("cim:PssIEEE4B.tl2", &assign_PssIEEE4B_tl2); + assign_map.emplace("cim:PssIEEE4B.tl3", &assign_PssIEEE4B_tl3); + assign_map.emplace("cim:PssIEEE4B.tl4", &assign_PssIEEE4B_tl4); + assign_map.emplace("cim:PssIEEE4B.tl5", &assign_PssIEEE4B_tl5); + assign_map.emplace("cim:PssIEEE4B.tl6", &assign_PssIEEE4B_tl6); + assign_map.emplace("cim:PssIEEE4B.tl7", &assign_PssIEEE4B_tl7); + assign_map.emplace("cim:PssIEEE4B.tl8", &assign_PssIEEE4B_tl8); + assign_map.emplace("cim:PssIEEE4B.tl9", &assign_PssIEEE4B_tl9); + assign_map.emplace("cim:PssIEEE4B.vhmax", &assign_PssIEEE4B_vhmax); + assign_map.emplace("cim:PssIEEE4B.vhmin", &assign_PssIEEE4B_vhmin); + assign_map.emplace("cim:PssIEEE4B.vimax", &assign_PssIEEE4B_vimax); + assign_map.emplace("cim:PssIEEE4B.vimin", &assign_PssIEEE4B_vimin); + assign_map.emplace("cim:PssIEEE4B.vlmax", &assign_PssIEEE4B_vlmax); + assign_map.emplace("cim:PssIEEE4B.vlmin", &assign_PssIEEE4B_vlmin); + assign_map.emplace("cim:PssIEEE4B.vstmax", &assign_PssIEEE4B_vstmax); + assign_map.emplace("cim:PssIEEE4B.vstmin", &assign_PssIEEE4B_vstmin); } void PssIEEE4B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/PssIEEE4B.hpp b/CGMES_2.4.15_16FEB2016/PssIEEE4B.hpp index aa08efe3b..f984ccfa7 100644 --- a/CGMES_2.4.15_16FEB2016/PssIEEE4B.hpp +++ b/CGMES_2.4.15_16FEB2016/PssIEEE4B.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type PSS2B power system stabilizer model. The PSS4B model represents a structure based on multiple working frequency bands. Three separate bands, respectively dedicated to the low-, intermediate- and high-frequency modes of oscillations, are used in this delta-omega (speed input) PSS. Reference: IEEE 4B 421.5-2005 Section 8.4. - */ + /** \brief The class represents IEEE Std 421.5-2005 type PSS2B power system stabilizer model. The PSS4B model represents a structure based on multiple working frequency bands. Three separate bands, respectively dedicated to the low-, intermediate- and high-frequency modes of oscillations, are used in this delta-omega (speed input) PSS. Reference: IEEE 4B 421.5-2005 Section 8.4. */ class PssIEEE4B : public PowerSystemStabilizerDynamics { public: @@ -29,73 +27,206 @@ namespace CIMPP PssIEEE4B(); ~PssIEEE4B() override; - CIMPP::Simple_Float bwh1; /* Notch filter 1 (high-frequency band): Three dB bandwidth (B). Default: nullptr */ - CIMPP::Simple_Float bwh2; /* Notch filter 2 (high-frequency band): Three dB bandwidth (B). Default: nullptr */ - CIMPP::Simple_Float bwl1; /* Notch filter 1 (low-frequency band): Three dB bandwidth (B). Default: nullptr */ - CIMPP::Simple_Float bwl2; /* Notch filter 2 (low-frequency band): Three dB bandwidth (B). Default: nullptr */ - CIMPP::PU kh; /* High band gain (K). Typical Value = 120. Default: nullptr */ - CIMPP::PU kh1; /* High band differential filter gain (K). Typical Value = 66. Default: nullptr */ - CIMPP::PU kh11; /* High band first lead-lag blocks coefficient (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kh17; /* High band first lead-lag blocks coefficient (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kh2; /* High band differential filter gain (K). Typical Value = 66. Default: nullptr */ - CIMPP::PU ki; /* Intermediate band gain (K). Typical Value = 30. Default: nullptr */ - CIMPP::PU ki1; /* Intermediate band differential filter gain (K). Typical Value = 66. Default: nullptr */ - CIMPP::PU ki11; /* Intermediate band first lead-lag blocks coefficient (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU ki17; /* Intermediate band first lead-lag blocks coefficient (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU ki2; /* Intermediate band differential filter gain (K). Typical Value = 66. Default: nullptr */ - CIMPP::PU kl; /* Low band gain (K). Typical Value = 7.5. Default: nullptr */ - CIMPP::PU kl1; /* Low band differential filter gain (K). Typical Value = 66. Default: nullptr */ - CIMPP::PU kl11; /* Low band first lead-lag blocks coefficient (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kl17; /* Low band first lead-lag blocks coefficient (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kl2; /* Low band differential filter gain (K). Typical Value = 66. Default: nullptr */ - CIMPP::Simple_Float omeganh1; /* Notch filter 1 (high-frequency band): filter frequency (omega). Default: nullptr */ - CIMPP::Simple_Float omeganh2; /* Notch filter 2 (high-frequency band): filter frequency (omega). Default: nullptr */ - CIMPP::Simple_Float omeganl1; /* Notch filter 1 (low-frequency band): filter frequency (omega). Default: nullptr */ - CIMPP::Simple_Float omeganl2; /* Notch filter 2 (low-frequency band): filter frequency (omega). Default: nullptr */ - CIMPP::Seconds th1; /* High band time constant (T). Typical Value = 0.01513. Default: nullptr */ - CIMPP::Seconds th10; /* High band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds th11; /* High band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds th12; /* High band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds th2; /* High band time constant (T). Typical Value = 0.01816. Default: nullptr */ - CIMPP::Seconds th3; /* High band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds th4; /* High band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds th5; /* High band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds th6; /* High band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds th7; /* High band time constant (T). Typical Value = 0.01816. Default: nullptr */ - CIMPP::Seconds th8; /* High band time constant (T). Typical Value = 0.02179. Default: nullptr */ - CIMPP::Seconds th9; /* High band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ti1; /* Intermediate band time constant (T). Typical Value = 0.173. Default: nullptr */ - CIMPP::Seconds ti10; /* Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ti11; /* Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ti12; /* Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ti2; /* Intermediate band time constant (T). Typical Value = 0.2075. Default: nullptr */ - CIMPP::Seconds ti3; /* Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ti4; /* Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ti5; /* Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ti6; /* Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ti7; /* Intermediate band time constant (T). Typical Value = 0.2075. Default: nullptr */ - CIMPP::Seconds ti8; /* Intermediate band time constant (T). Typical Value = 0.2491. Default: nullptr */ - CIMPP::Seconds ti9; /* Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tl1; /* Low band time constant (T). Typical Value = 1.73. Default: nullptr */ - CIMPP::Seconds tl10; /* Low band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tl11; /* Low band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tl12; /* Low band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tl2; /* Low band time constant (T). Typical Value = 2.075. Default: nullptr */ - CIMPP::Seconds tl3; /* Low band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tl4; /* Low band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tl5; /* Low band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tl6; /* Low band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tl7; /* Low band time constant (T). Typical Value = 2.075. Default: nullptr */ - CIMPP::Seconds tl8; /* Low band time constant (T). Typical Value = 2.491. Default: nullptr */ - CIMPP::Seconds tl9; /* Low band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::PU vhmax; /* High band output maximum limit (V). Typical Value = 0.6. Default: nullptr */ - CIMPP::PU vhmin; /* High band output minimum limit (V). Typical Value = -0.6. Default: nullptr */ - CIMPP::PU vimax; /* Intermediate band output maximum limit (V). Typical Value = 0.6. Default: nullptr */ - CIMPP::PU vimin; /* Intermediate band output minimum limit (V). Typical Value = -0.6. Default: nullptr */ - CIMPP::PU vlmax; /* Low band output maximum limit (V). Typical Value = 0.075. Default: nullptr */ - CIMPP::PU vlmin; /* Low band output minimum limit (V). Typical Value = -0.075. Default: nullptr */ - CIMPP::PU vstmax; /* PSS output maximum limit (V). Typical Value = 0.15. Default: nullptr */ - CIMPP::PU vstmin; /* PSS output minimum limit (V). Typical Value = -0.15. Default: nullptr */ + /** \brief Notch filter 1 (high-frequency band): Three dB bandwidth (B). Default: nullptr */ + CIMPP::Simple_Float bwh1; + + /** \brief Notch filter 2 (high-frequency band): Three dB bandwidth (B). Default: nullptr */ + CIMPP::Simple_Float bwh2; + + /** \brief Notch filter 1 (low-frequency band): Three dB bandwidth (B). Default: nullptr */ + CIMPP::Simple_Float bwl1; + + /** \brief Notch filter 2 (low-frequency band): Three dB bandwidth (B). Default: nullptr */ + CIMPP::Simple_Float bwl2; + + /** \brief High band gain (K). Typical Value = 120. Default: nullptr */ + CIMPP::PU kh; + + /** \brief High band differential filter gain (K). Typical Value = 66. Default: nullptr */ + CIMPP::PU kh1; + + /** \brief High band first lead-lag blocks coefficient (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU kh11; + + /** \brief High band first lead-lag blocks coefficient (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU kh17; + + /** \brief High band differential filter gain (K). Typical Value = 66. Default: nullptr */ + CIMPP::PU kh2; + + /** \brief Intermediate band gain (K). Typical Value = 30. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Intermediate band differential filter gain (K). Typical Value = 66. Default: nullptr */ + CIMPP::PU ki1; + + /** \brief Intermediate band first lead-lag blocks coefficient (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ki11; + + /** \brief Intermediate band first lead-lag blocks coefficient (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ki17; + + /** \brief Intermediate band differential filter gain (K). Typical Value = 66. Default: nullptr */ + CIMPP::PU ki2; + + /** \brief Low band gain (K). Typical Value = 7.5. Default: nullptr */ + CIMPP::PU kl; + + /** \brief Low band differential filter gain (K). Typical Value = 66. Default: nullptr */ + CIMPP::PU kl1; + + /** \brief Low band first lead-lag blocks coefficient (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU kl11; + + /** \brief Low band first lead-lag blocks coefficient (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU kl17; + + /** \brief Low band differential filter gain (K). Typical Value = 66. Default: nullptr */ + CIMPP::PU kl2; + + /** \brief Notch filter 1 (high-frequency band): filter frequency (omega). Default: nullptr */ + CIMPP::Simple_Float omeganh1; + + /** \brief Notch filter 2 (high-frequency band): filter frequency (omega). Default: nullptr */ + CIMPP::Simple_Float omeganh2; + + /** \brief Notch filter 1 (low-frequency band): filter frequency (omega). Default: nullptr */ + CIMPP::Simple_Float omeganl1; + + /** \brief Notch filter 2 (low-frequency band): filter frequency (omega). Default: nullptr */ + CIMPP::Simple_Float omeganl2; + + /** \brief High band time constant (T). Typical Value = 0.01513. Default: nullptr */ + CIMPP::Seconds th1; + + /** \brief High band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds th10; + + /** \brief High band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds th11; + + /** \brief High band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds th12; + + /** \brief High band time constant (T). Typical Value = 0.01816. Default: nullptr */ + CIMPP::Seconds th2; + + /** \brief High band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds th3; + + /** \brief High band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds th4; + + /** \brief High band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds th5; + + /** \brief High band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds th6; + + /** \brief High band time constant (T). Typical Value = 0.01816. Default: nullptr */ + CIMPP::Seconds th7; + + /** \brief High band time constant (T). Typical Value = 0.02179. Default: nullptr */ + CIMPP::Seconds th8; + + /** \brief High band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds th9; + + /** \brief Intermediate band time constant (T). Typical Value = 0.173. Default: nullptr */ + CIMPP::Seconds ti1; + + /** \brief Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ti10; + + /** \brief Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ti11; + + /** \brief Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ti12; + + /** \brief Intermediate band time constant (T). Typical Value = 0.2075. Default: nullptr */ + CIMPP::Seconds ti2; + + /** \brief Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ti3; + + /** \brief Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ti4; + + /** \brief Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ti5; + + /** \brief Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ti6; + + /** \brief Intermediate band time constant (T). Typical Value = 0.2075. Default: nullptr */ + CIMPP::Seconds ti7; + + /** \brief Intermediate band time constant (T). Typical Value = 0.2491. Default: nullptr */ + CIMPP::Seconds ti8; + + /** \brief Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ti9; + + /** \brief Low band time constant (T). Typical Value = 1.73. Default: nullptr */ + CIMPP::Seconds tl1; + + /** \brief Low band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tl10; + + /** \brief Low band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tl11; + + /** \brief Low band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tl12; + + /** \brief Low band time constant (T). Typical Value = 2.075. Default: nullptr */ + CIMPP::Seconds tl2; + + /** \brief Low band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tl3; + + /** \brief Low band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tl4; + + /** \brief Low band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tl5; + + /** \brief Low band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tl6; + + /** \brief Low band time constant (T). Typical Value = 2.075. Default: nullptr */ + CIMPP::Seconds tl7; + + /** \brief Low band time constant (T). Typical Value = 2.491. Default: nullptr */ + CIMPP::Seconds tl8; + + /** \brief Low band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tl9; + + /** \brief High band output maximum limit (V). Typical Value = 0.6. Default: nullptr */ + CIMPP::PU vhmax; + + /** \brief High band output minimum limit (V). Typical Value = -0.6. Default: nullptr */ + CIMPP::PU vhmin; + + /** \brief Intermediate band output maximum limit (V). Typical Value = 0.6. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Intermediate band output minimum limit (V). Typical Value = -0.6. Default: nullptr */ + CIMPP::PU vimin; + + /** \brief Low band output maximum limit (V). Typical Value = 0.075. Default: nullptr */ + CIMPP::PU vlmax; + + /** \brief Low band output minimum limit (V). Typical Value = -0.075. Default: nullptr */ + CIMPP::PU vlmin; + + /** \brief PSS output maximum limit (V). Typical Value = 0.15. Default: nullptr */ + CIMPP::PU vstmax; + + /** \brief PSS output minimum limit (V). Typical Value = -0.15. Default: nullptr */ + CIMPP::PU vstmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/PssPTIST1.cpp b/CGMES_2.4.15_16FEB2016/PssPTIST1.cpp index c3f386e9f..beea82b09 100644 --- a/CGMES_2.4.15_16FEB2016/PssPTIST1.cpp +++ b/CGMES_2.4.15_16FEB2016/PssPTIST1.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -PssPTIST1::PssPTIST1() {}; -PssPTIST1::~PssPTIST1() {}; +PssPTIST1::PssPTIST1() {} +PssPTIST1::~PssPTIST1() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ PssPTIST1::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssPTIST1_dtc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_dtc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dtc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_dtf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_dtf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dtf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_dtp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_dtp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dtp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_m(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_m(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->m; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssPTIST1_dtc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dtc; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_PssPTIST1_dtc(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST1_dtf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dtf; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_PssPTIST1_dtf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST1_dtp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dtp; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_PssPTIST1_dtp(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST1_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_PssPTIST1_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssPTIST1_m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->m; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_PssPTIST1_m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssPTIST1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_PssPTIST1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_PssPTIST1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_PssPTIST1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST1_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_PssPTIST1_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST1_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_PssPTIST1_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST1_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_PssPTIST1_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char PssPTIST1::debugName[] = "PssPTIST1"; const char* PssPTIST1::debugString() const { @@ -370,22 +376,22 @@ const char* PssPTIST1::debugString() const void PssPTIST1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssPTIST1"), &PssPTIST1_factory)); + factory_map.emplace("cim:PssPTIST1", &PssPTIST1_factory); } void PssPTIST1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.dtc"), &assign_PssPTIST1_dtc)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.dtf"), &assign_PssPTIST1_dtf)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.dtp"), &assign_PssPTIST1_dtp)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.k"), &assign_PssPTIST1_k)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.m"), &assign_PssPTIST1_m)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.t1"), &assign_PssPTIST1_t1)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.t2"), &assign_PssPTIST1_t2)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.t3"), &assign_PssPTIST1_t3)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.t4"), &assign_PssPTIST1_t4)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.tf"), &assign_PssPTIST1_tf)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.tp"), &assign_PssPTIST1_tp)); + assign_map.emplace("cim:PssPTIST1.dtc", &assign_PssPTIST1_dtc); + assign_map.emplace("cim:PssPTIST1.dtf", &assign_PssPTIST1_dtf); + assign_map.emplace("cim:PssPTIST1.dtp", &assign_PssPTIST1_dtp); + assign_map.emplace("cim:PssPTIST1.k", &assign_PssPTIST1_k); + assign_map.emplace("cim:PssPTIST1.m", &assign_PssPTIST1_m); + assign_map.emplace("cim:PssPTIST1.t1", &assign_PssPTIST1_t1); + assign_map.emplace("cim:PssPTIST1.t2", &assign_PssPTIST1_t2); + assign_map.emplace("cim:PssPTIST1.t3", &assign_PssPTIST1_t3); + assign_map.emplace("cim:PssPTIST1.t4", &assign_PssPTIST1_t4); + assign_map.emplace("cim:PssPTIST1.tf", &assign_PssPTIST1_tf); + assign_map.emplace("cim:PssPTIST1.tp", &assign_PssPTIST1_tp); } void PssPTIST1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/PssPTIST1.hpp b/CGMES_2.4.15_16FEB2016/PssPTIST1.hpp index 9dd1c12e6..b48716169 100644 --- a/CGMES_2.4.15_16FEB2016/PssPTIST1.hpp +++ b/CGMES_2.4.15_16FEB2016/PssPTIST1.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - PTI Microprocessor-Based Stabilizer type 1. - */ + /** \brief PTI Microprocessor-Based Stabilizer type 1. */ class PssPTIST1 : public PowerSystemStabilizerDynamics { public: @@ -28,17 +26,38 @@ namespace CIMPP PssPTIST1(); ~PssPTIST1() override; - CIMPP::Seconds dtc; /* Time step related to activation of controls (Dtc). Typical Value = 0.025. Default: nullptr */ - CIMPP::Seconds dtf; /* Time step frequency calculation (Dtf). Typical Value = 0.025. Default: nullptr */ - CIMPP::Seconds dtp; /* Time step active power calculation (Dtp). Typical Value = 0.0125. Default: nullptr */ - CIMPP::PU k; /* Gain (K). Typical Value = 9. Default: nullptr */ - CIMPP::PU m; /* (M). M=2*H. Typical Value = 5. Default: nullptr */ - CIMPP::Seconds t1; /* Time constant (T1). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds t2; /* Time constant (T2). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds t3; /* Time constant (T3). Typical Value = 0.2. Default: nullptr */ - CIMPP::Seconds t4; /* Time constant (T4). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds tf; /* Time constant (Tf). Typical Value = 0.2. Default: nullptr */ - CIMPP::Seconds tp; /* Time constant (Tp). Typical Value = 0.2. Default: nullptr */ + /** \brief Time step related to activation of controls (Dtc). Typical Value = 0.025. Default: nullptr */ + CIMPP::Seconds dtc; + + /** \brief Time step frequency calculation (Dtf). Typical Value = 0.025. Default: nullptr */ + CIMPP::Seconds dtf; + + /** \brief Time step active power calculation (Dtp). Typical Value = 0.0125. Default: nullptr */ + CIMPP::Seconds dtp; + + /** \brief Gain (K). Typical Value = 9. Default: nullptr */ + CIMPP::PU k; + + /** \brief (M). M=2*H. Typical Value = 5. Default: nullptr */ + CIMPP::PU m; + + /** \brief Time constant (T1). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Time constant (T2). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Time constant (T3). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Time constant (T4). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant (Tf). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Time constant (Tp). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds tp; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/PssPTIST3.cpp b/CGMES_2.4.15_16FEB2016/PssPTIST3.cpp index d563abbea..42a3072e3 100644 --- a/CGMES_2.4.15_16FEB2016/PssPTIST3.cpp +++ b/CGMES_2.4.15_16FEB2016/PssPTIST3.cpp @@ -8,45 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -PssPTIST3::PssPTIST3() {}; -PssPTIST3::~PssPTIST3() {}; +PssPTIST3::PssPTIST3() {} +PssPTIST3::~PssPTIST3() {} static const std::list PossibleProfilesForClass = { @@ -106,454 +72,486 @@ PssPTIST3::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssPTIST3_a0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_a0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_a1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_a1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_a2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_a2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_a3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_a3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_a4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_a4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_a5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_a5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_al(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_al(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->al; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_athres(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_athres(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->athres; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_b0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_b0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_b1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_b1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_b2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_b2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_b3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_b3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_b4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_b4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_b5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_b5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_dl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_dl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_dtc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_dtc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dtc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_dtf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_dtf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dtf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_dtp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_dtp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dtp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_isw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_isw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->isw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_lthres(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_lthres(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lthres; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_m(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_m(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->m; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_nav(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_nav(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nav; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_ncl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_ncl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ncl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_ncr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_ncr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ncr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssPTIST3_a0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a0; if (!buffer.str().empty()) @@ -567,7 +565,8 @@ bool get_PssPTIST3_a0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a1; if (!buffer.str().empty()) @@ -581,7 +580,8 @@ bool get_PssPTIST3_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a2; if (!buffer.str().empty()) @@ -595,7 +595,8 @@ bool get_PssPTIST3_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_a3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a3; if (!buffer.str().empty()) @@ -609,7 +610,8 @@ bool get_PssPTIST3_a3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_a4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a4; if (!buffer.str().empty()) @@ -623,7 +625,8 @@ bool get_PssPTIST3_a4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_a5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a5; if (!buffer.str().empty()) @@ -637,7 +640,8 @@ bool get_PssPTIST3_a5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_al(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->al; if (!buffer.str().empty()) @@ -651,7 +655,8 @@ bool get_PssPTIST3_al(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_athres(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->athres; if (!buffer.str().empty()) @@ -665,7 +670,8 @@ bool get_PssPTIST3_athres(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_PssPTIST3_b0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b0; if (!buffer.str().empty()) @@ -679,7 +685,8 @@ bool get_PssPTIST3_b0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_b1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b1; if (!buffer.str().empty()) @@ -693,7 +700,8 @@ bool get_PssPTIST3_b1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_b2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b2; if (!buffer.str().empty()) @@ -707,7 +715,8 @@ bool get_PssPTIST3_b2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_b3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b3; if (!buffer.str().empty()) @@ -721,7 +730,8 @@ bool get_PssPTIST3_b3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_b4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b4; if (!buffer.str().empty()) @@ -735,7 +745,8 @@ bool get_PssPTIST3_b4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_b5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b5; if (!buffer.str().empty()) @@ -749,7 +760,8 @@ bool get_PssPTIST3_b5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_dl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dl; if (!buffer.str().empty()) @@ -763,7 +775,8 @@ bool get_PssPTIST3_dl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_dtc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dtc; if (!buffer.str().empty()) @@ -777,7 +790,8 @@ bool get_PssPTIST3_dtc(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST3_dtf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dtf; if (!buffer.str().empty()) @@ -791,7 +805,8 @@ bool get_PssPTIST3_dtf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST3_dtp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dtp; if (!buffer.str().empty()) @@ -805,7 +820,8 @@ bool get_PssPTIST3_dtp(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST3_isw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->isw; if (!buffer.str().empty()) @@ -819,7 +835,8 @@ bool get_PssPTIST3_isw(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST3_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -833,7 +850,8 @@ bool get_PssPTIST3_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssPTIST3_lthres(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lthres; if (!buffer.str().empty()) @@ -847,7 +865,8 @@ bool get_PssPTIST3_lthres(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_PssPTIST3_m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->m; if (!buffer.str().empty()) @@ -861,7 +880,8 @@ bool get_PssPTIST3_m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssPTIST3_nav(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nav; if (!buffer.str().empty()) @@ -875,7 +895,8 @@ bool get_PssPTIST3_nav(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST3_ncl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ncl; if (!buffer.str().empty()) @@ -889,7 +910,8 @@ bool get_PssPTIST3_ncl(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST3_ncr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ncr; if (!buffer.str().empty()) @@ -903,7 +925,8 @@ bool get_PssPTIST3_ncr(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST3_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -917,7 +940,8 @@ bool get_PssPTIST3_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssPTIST3_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -931,7 +955,8 @@ bool get_PssPTIST3_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -945,7 +970,8 @@ bool get_PssPTIST3_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -959,7 +985,8 @@ bool get_PssPTIST3_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -973,7 +1000,8 @@ bool get_PssPTIST3_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -987,7 +1015,8 @@ bool get_PssPTIST3_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -1001,7 +1030,8 @@ bool get_PssPTIST3_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -1015,7 +1045,8 @@ bool get_PssPTIST3_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -1027,8 +1058,6 @@ bool get_PssPTIST3_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char PssPTIST3::debugName[] = "PssPTIST3"; const char* PssPTIST3::debugString() const { @@ -1037,45 +1066,45 @@ const char* PssPTIST3::debugString() const void PssPTIST3::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssPTIST3"), &PssPTIST3_factory)); + factory_map.emplace("cim:PssPTIST3", &PssPTIST3_factory); } void PssPTIST3::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.a0"), &assign_PssPTIST3_a0)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.a1"), &assign_PssPTIST3_a1)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.a2"), &assign_PssPTIST3_a2)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.a3"), &assign_PssPTIST3_a3)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.a4"), &assign_PssPTIST3_a4)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.a5"), &assign_PssPTIST3_a5)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.al"), &assign_PssPTIST3_al)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.athres"), &assign_PssPTIST3_athres)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.b0"), &assign_PssPTIST3_b0)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.b1"), &assign_PssPTIST3_b1)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.b2"), &assign_PssPTIST3_b2)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.b3"), &assign_PssPTIST3_b3)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.b4"), &assign_PssPTIST3_b4)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.b5"), &assign_PssPTIST3_b5)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.dl"), &assign_PssPTIST3_dl)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.dtc"), &assign_PssPTIST3_dtc)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.dtf"), &assign_PssPTIST3_dtf)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.dtp"), &assign_PssPTIST3_dtp)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.isw"), &assign_PssPTIST3_isw)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.k"), &assign_PssPTIST3_k)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.lthres"), &assign_PssPTIST3_lthres)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.m"), &assign_PssPTIST3_m)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.nav"), &assign_PssPTIST3_nav)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.ncl"), &assign_PssPTIST3_ncl)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.ncr"), &assign_PssPTIST3_ncr)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.pmin"), &assign_PssPTIST3_pmin)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.t1"), &assign_PssPTIST3_t1)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.t2"), &assign_PssPTIST3_t2)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.t3"), &assign_PssPTIST3_t3)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.t4"), &assign_PssPTIST3_t4)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.t5"), &assign_PssPTIST3_t5)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.t6"), &assign_PssPTIST3_t6)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.tf"), &assign_PssPTIST3_tf)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.tp"), &assign_PssPTIST3_tp)); + assign_map.emplace("cim:PssPTIST3.a0", &assign_PssPTIST3_a0); + assign_map.emplace("cim:PssPTIST3.a1", &assign_PssPTIST3_a1); + assign_map.emplace("cim:PssPTIST3.a2", &assign_PssPTIST3_a2); + assign_map.emplace("cim:PssPTIST3.a3", &assign_PssPTIST3_a3); + assign_map.emplace("cim:PssPTIST3.a4", &assign_PssPTIST3_a4); + assign_map.emplace("cim:PssPTIST3.a5", &assign_PssPTIST3_a5); + assign_map.emplace("cim:PssPTIST3.al", &assign_PssPTIST3_al); + assign_map.emplace("cim:PssPTIST3.athres", &assign_PssPTIST3_athres); + assign_map.emplace("cim:PssPTIST3.b0", &assign_PssPTIST3_b0); + assign_map.emplace("cim:PssPTIST3.b1", &assign_PssPTIST3_b1); + assign_map.emplace("cim:PssPTIST3.b2", &assign_PssPTIST3_b2); + assign_map.emplace("cim:PssPTIST3.b3", &assign_PssPTIST3_b3); + assign_map.emplace("cim:PssPTIST3.b4", &assign_PssPTIST3_b4); + assign_map.emplace("cim:PssPTIST3.b5", &assign_PssPTIST3_b5); + assign_map.emplace("cim:PssPTIST3.dl", &assign_PssPTIST3_dl); + assign_map.emplace("cim:PssPTIST3.dtc", &assign_PssPTIST3_dtc); + assign_map.emplace("cim:PssPTIST3.dtf", &assign_PssPTIST3_dtf); + assign_map.emplace("cim:PssPTIST3.dtp", &assign_PssPTIST3_dtp); + assign_map.emplace("cim:PssPTIST3.isw", &assign_PssPTIST3_isw); + assign_map.emplace("cim:PssPTIST3.k", &assign_PssPTIST3_k); + assign_map.emplace("cim:PssPTIST3.lthres", &assign_PssPTIST3_lthres); + assign_map.emplace("cim:PssPTIST3.m", &assign_PssPTIST3_m); + assign_map.emplace("cim:PssPTIST3.nav", &assign_PssPTIST3_nav); + assign_map.emplace("cim:PssPTIST3.ncl", &assign_PssPTIST3_ncl); + assign_map.emplace("cim:PssPTIST3.ncr", &assign_PssPTIST3_ncr); + assign_map.emplace("cim:PssPTIST3.pmin", &assign_PssPTIST3_pmin); + assign_map.emplace("cim:PssPTIST3.t1", &assign_PssPTIST3_t1); + assign_map.emplace("cim:PssPTIST3.t2", &assign_PssPTIST3_t2); + assign_map.emplace("cim:PssPTIST3.t3", &assign_PssPTIST3_t3); + assign_map.emplace("cim:PssPTIST3.t4", &assign_PssPTIST3_t4); + assign_map.emplace("cim:PssPTIST3.t5", &assign_PssPTIST3_t5); + assign_map.emplace("cim:PssPTIST3.t6", &assign_PssPTIST3_t6); + assign_map.emplace("cim:PssPTIST3.tf", &assign_PssPTIST3_tf); + assign_map.emplace("cim:PssPTIST3.tp", &assign_PssPTIST3_tp); } void PssPTIST3::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/PssPTIST3.hpp b/CGMES_2.4.15_16FEB2016/PssPTIST3.hpp index 1faa7df62..84ac9463b 100644 --- a/CGMES_2.4.15_16FEB2016/PssPTIST3.hpp +++ b/CGMES_2.4.15_16FEB2016/PssPTIST3.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - PTI Microprocessor-Based Stabilizer type 3. - */ + /** \brief PTI Microprocessor-Based Stabilizer type 3. */ class PssPTIST3 : public PowerSystemStabilizerDynamics { public: @@ -30,40 +28,107 @@ namespace CIMPP PssPTIST3(); ~PssPTIST3() override; - CIMPP::PU a0; /* Filter coefficient (A0). Default: nullptr */ - CIMPP::PU a1; /* Limiter (Al). Default: nullptr */ - CIMPP::PU a2; /* Filter coefficient (A2). Default: nullptr */ - CIMPP::PU a3; /* Filter coefficient (A3). Default: nullptr */ - CIMPP::PU a4; /* Filter coefficient (A4). Default: nullptr */ - CIMPP::PU a5; /* Filter coefficient (A5). Default: nullptr */ - CIMPP::PU al; /* Limiter (Al). Default: nullptr */ - CIMPP::PU athres; /* Threshold value above which output averaging will be bypassed (Athres). Typical Value = 0.005. Default: nullptr */ - CIMPP::PU b0; /* Filter coefficient (B0). Default: nullptr */ - CIMPP::PU b1; /* Filter coefficient (B1). Default: nullptr */ - CIMPP::PU b2; /* Filter coefficient (B2). Default: nullptr */ - CIMPP::PU b3; /* Filter coefficient (B3). Default: nullptr */ - CIMPP::PU b4; /* Filter coefficient (B4). Default: nullptr */ - CIMPP::PU b5; /* Filter coefficient (B5). Default: nullptr */ - CIMPP::PU dl; /* Limiter (Dl). Default: nullptr */ - CIMPP::Seconds dtc; /* Time step related to activation of controls (0.03 for 50 Hz) (Dtc). Typical Value = 0.025. Default: nullptr */ - CIMPP::Seconds dtf; /* Time step frequency calculation (0.03 for 50 Hz) (Dtf). Typical Value = 0.025. Default: nullptr */ - CIMPP::Seconds dtp; /* Time step active power calculation (0.015 for 50 Hz) (Dtp). Typical Value = 0.0125. Default: nullptr */ - CIMPP::Boolean isw; /* Digital/analog output switch (Isw). true = produce analog output false = convert to digital output, using tap selection table. Default: false */ - CIMPP::PU k; /* Gain (K). Typical Value = 9. Default: nullptr */ - CIMPP::PU lthres; /* Threshold value (Lthres). Default: nullptr */ - CIMPP::PU m; /* (M). M=2*H. Typical Value = 5. Default: nullptr */ - CIMPP::Simple_Float nav; /* Number of control outputs to average (Nav) (1 <= Nav <= 16). Typical Value = 4. Default: nullptr */ - CIMPP::Simple_Float ncl; /* Number of counts at limit to active limit function (Ncl) (>0). Default: nullptr */ - CIMPP::Simple_Float ncr; /* Number of counts until reset after limit function is triggered (Ncr). Default: nullptr */ - CIMPP::PU pmin; /* (Pmin). Default: nullptr */ - CIMPP::Seconds t1; /* Time constant (T1). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds t2; /* Time constant (T2). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds t3; /* Time constant (T3). Typical Value = 0.2. Default: nullptr */ - CIMPP::Seconds t4; /* Time constant (T4). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds t5; /* Time constant (T5). Default: nullptr */ - CIMPP::Seconds t6; /* Time constant (T6). Default: nullptr */ - CIMPP::Seconds tf; /* Time constant (Tf). Typical Value = 0.2. Default: nullptr */ - CIMPP::Seconds tp; /* Time constant (Tp). Typical Value = 0.2. Default: nullptr */ + /** \brief Filter coefficient (A0). Default: nullptr */ + CIMPP::PU a0; + + /** \brief Limiter (Al). Default: nullptr */ + CIMPP::PU a1; + + /** \brief Filter coefficient (A2). Default: nullptr */ + CIMPP::PU a2; + + /** \brief Filter coefficient (A3). Default: nullptr */ + CIMPP::PU a3; + + /** \brief Filter coefficient (A4). Default: nullptr */ + CIMPP::PU a4; + + /** \brief Filter coefficient (A5). Default: nullptr */ + CIMPP::PU a5; + + /** \brief Limiter (Al). Default: nullptr */ + CIMPP::PU al; + + /** \brief Threshold value above which output averaging will be bypassed (Athres). Typical Value = 0.005. Default: nullptr */ + CIMPP::PU athres; + + /** \brief Filter coefficient (B0). Default: nullptr */ + CIMPP::PU b0; + + /** \brief Filter coefficient (B1). Default: nullptr */ + CIMPP::PU b1; + + /** \brief Filter coefficient (B2). Default: nullptr */ + CIMPP::PU b2; + + /** \brief Filter coefficient (B3). Default: nullptr */ + CIMPP::PU b3; + + /** \brief Filter coefficient (B4). Default: nullptr */ + CIMPP::PU b4; + + /** \brief Filter coefficient (B5). Default: nullptr */ + CIMPP::PU b5; + + /** \brief Limiter (Dl). Default: nullptr */ + CIMPP::PU dl; + + /** \brief Time step related to activation of controls (0.03 for 50 Hz) (Dtc). Typical Value = 0.025. Default: nullptr */ + CIMPP::Seconds dtc; + + /** \brief Time step frequency calculation (0.03 for 50 Hz) (Dtf). Typical Value = 0.025. Default: nullptr */ + CIMPP::Seconds dtf; + + /** \brief Time step active power calculation (0.015 for 50 Hz) (Dtp). Typical Value = 0.0125. Default: nullptr */ + CIMPP::Seconds dtp; + + /** \brief Digital/analog output switch (Isw). true = produce analog output false = convert to digital output, using tap selection table. Default: false */ + CIMPP::Boolean isw; + + /** \brief Gain (K). Typical Value = 9. Default: nullptr */ + CIMPP::PU k; + + /** \brief Threshold value (Lthres). Default: nullptr */ + CIMPP::PU lthres; + + /** \brief (M). M=2*H. Typical Value = 5. Default: nullptr */ + CIMPP::PU m; + + /** \brief Number of control outputs to average (Nav) (1 <= Nav <= 16). Typical Value = 4. Default: nullptr */ + CIMPP::Simple_Float nav; + + /** \brief Number of counts at limit to active limit function (Ncl) (>0). Default: nullptr */ + CIMPP::Simple_Float ncl; + + /** \brief Number of counts until reset after limit function is triggered (Ncr). Default: nullptr */ + CIMPP::Simple_Float ncr; + + /** \brief (Pmin). Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Time constant (T1). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Time constant (T2). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Time constant (T3). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Time constant (T4). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant (T5). Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Time constant (T6). Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time constant (Tf). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Time constant (Tp). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds tp; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/PssSB4.cpp b/CGMES_2.4.15_16FEB2016/PssSB4.cpp index 886022e1c..ff54c429f 100644 --- a/CGMES_2.4.15_16FEB2016/PssSB4.cpp +++ b/CGMES_2.4.15_16FEB2016/PssSB4.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PssSB4::PssSB4() {}; -PssSB4::~PssSB4() {}; +PssSB4::PssSB4() {} +PssSB4::~PssSB4() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ PssSB4::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssSB4_kx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_kx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_tt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_tx1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_tx1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tx1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_tx2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_tx2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tx2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_vsmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_vsmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_vsmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_vsmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssSB4_kx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kx; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_PssSB4_kx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSB4_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_PssSB4_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSB4_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_PssSB4_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSB4_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_PssSB4_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSB4_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_PssSB4_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSB4_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_PssSB4_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSB4_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tt; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_PssSB4_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSB4_tx1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tx1; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_PssSB4_tx1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSB4_tx2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tx2; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_PssSB4_tx2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSB4_vsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmax; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_PssSB4_vsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssSB4_vsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmin; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_PssSB4_vsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char PssSB4::debugName[] = "PssSB4"; const char* PssSB4::debugString() const { @@ -370,22 +376,22 @@ const char* PssSB4::debugString() const void PssSB4::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssSB4"), &PssSB4_factory)); + factory_map.emplace("cim:PssSB4", &PssSB4_factory); } void PssSB4::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssSB4.kx"), &assign_PssSB4_kx)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.ta"), &assign_PssSB4_ta)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.tb"), &assign_PssSB4_tb)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.tc"), &assign_PssSB4_tc)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.td"), &assign_PssSB4_td)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.te"), &assign_PssSB4_te)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.tt"), &assign_PssSB4_tt)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.tx1"), &assign_PssSB4_tx1)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.tx2"), &assign_PssSB4_tx2)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.vsmax"), &assign_PssSB4_vsmax)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.vsmin"), &assign_PssSB4_vsmin)); + assign_map.emplace("cim:PssSB4.kx", &assign_PssSB4_kx); + assign_map.emplace("cim:PssSB4.ta", &assign_PssSB4_ta); + assign_map.emplace("cim:PssSB4.tb", &assign_PssSB4_tb); + assign_map.emplace("cim:PssSB4.tc", &assign_PssSB4_tc); + assign_map.emplace("cim:PssSB4.td", &assign_PssSB4_td); + assign_map.emplace("cim:PssSB4.te", &assign_PssSB4_te); + assign_map.emplace("cim:PssSB4.tt", &assign_PssSB4_tt); + assign_map.emplace("cim:PssSB4.tx1", &assign_PssSB4_tx1); + assign_map.emplace("cim:PssSB4.tx2", &assign_PssSB4_tx2); + assign_map.emplace("cim:PssSB4.vsmax", &assign_PssSB4_vsmax); + assign_map.emplace("cim:PssSB4.vsmin", &assign_PssSB4_vsmin); } void PssSB4::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/PssSB4.hpp b/CGMES_2.4.15_16FEB2016/PssSB4.hpp index e54b13b13..4fb9cc24a 100644 --- a/CGMES_2.4.15_16FEB2016/PssSB4.hpp +++ b/CGMES_2.4.15_16FEB2016/PssSB4.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Power sensitive stabilizer model. - */ + /** \brief Power sensitive stabilizer model. */ class PssSB4 : public PowerSystemStabilizerDynamics { public: @@ -28,17 +26,38 @@ namespace CIMPP PssSB4(); ~PssSB4() override; - CIMPP::PU kx; /* Gain (Kx). Default: nullptr */ - CIMPP::Seconds ta; /* Time constant (Ta). Default: nullptr */ - CIMPP::Seconds tb; /* Time constant (Tb). Default: nullptr */ - CIMPP::Seconds tc; /* Time constant (Tc). Default: nullptr */ - CIMPP::Seconds td; /* Time constant (Td). Default: nullptr */ - CIMPP::Seconds te; /* Time constant (Te). Default: nullptr */ - CIMPP::Seconds tt; /* Time constant (Tt). Default: nullptr */ - CIMPP::Seconds tx1; /* Reset time constant (Tx1). Default: nullptr */ - CIMPP::Seconds tx2; /* Time constant (Tx2). Default: nullptr */ - CIMPP::PU vsmax; /* Limiter (Vsmax). Default: nullptr */ - CIMPP::PU vsmin; /* Limiter (Vsmin). Default: nullptr */ + /** \brief Gain (Kx). Default: nullptr */ + CIMPP::PU kx; + + /** \brief Time constant (Ta). Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Time constant (Tb). Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Time constant (Tc). Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Time constant (Td). Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Time constant (Te). Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Time constant (Tt). Default: nullptr */ + CIMPP::Seconds tt; + + /** \brief Reset time constant (Tx1). Default: nullptr */ + CIMPP::Seconds tx1; + + /** \brief Time constant (Tx2). Default: nullptr */ + CIMPP::Seconds tx2; + + /** \brief Limiter (Vsmax). Default: nullptr */ + CIMPP::PU vsmax; + + /** \brief Limiter (Vsmin). Default: nullptr */ + CIMPP::PU vsmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/PssSH.cpp b/CGMES_2.4.15_16FEB2016/PssSH.cpp index eb34d8442..5e06369a1 100644 --- a/CGMES_2.4.15_16FEB2016/PssSH.cpp +++ b/CGMES_2.4.15_16FEB2016/PssSH.cpp @@ -8,24 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PssSH::PssSH() {}; -PssSH::~PssSH() {}; +PssSH::PssSH() {} +PssSH::~PssSH() {} static const std::list PossibleProfilesForClass = { @@ -64,181 +51,192 @@ PssSH::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssSH_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_k0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_k0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_k4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_vsmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_vsmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_vsmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_vsmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssSH_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -252,7 +250,8 @@ bool get_PssSH_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_k0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k0; if (!buffer.str().empty()) @@ -266,7 +265,8 @@ bool get_PssSH_k0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -280,7 +280,8 @@ bool get_PssSH_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -294,7 +295,8 @@ bool get_PssSH_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -308,7 +310,8 @@ bool get_PssSH_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k4; if (!buffer.str().empty()) @@ -322,7 +325,8 @@ bool get_PssSH_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -336,7 +340,8 @@ bool get_PssSH_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -350,7 +355,8 @@ bool get_PssSH_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -364,7 +370,8 @@ bool get_PssSH_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -378,7 +385,8 @@ bool get_PssSH_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -392,7 +400,8 @@ bool get_PssSH_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_vsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmax; if (!buffer.str().empty()) @@ -406,7 +415,8 @@ bool get_PssSH_vsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_vsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmin; if (!buffer.str().empty()) @@ -418,8 +428,6 @@ bool get_PssSH_vsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char PssSH::debugName[] = "PssSH"; const char* PssSH::debugString() const { @@ -428,24 +436,24 @@ const char* PssSH::debugString() const void PssSH::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssSH"), &PssSH_factory)); + factory_map.emplace("cim:PssSH", &PssSH_factory); } void PssSH::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssSH.k"), &assign_PssSH_k)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.k0"), &assign_PssSH_k0)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.k1"), &assign_PssSH_k1)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.k2"), &assign_PssSH_k2)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.k3"), &assign_PssSH_k3)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.k4"), &assign_PssSH_k4)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.t1"), &assign_PssSH_t1)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.t2"), &assign_PssSH_t2)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.t3"), &assign_PssSH_t3)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.t4"), &assign_PssSH_t4)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.td"), &assign_PssSH_td)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.vsmax"), &assign_PssSH_vsmax)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.vsmin"), &assign_PssSH_vsmin)); + assign_map.emplace("cim:PssSH.k", &assign_PssSH_k); + assign_map.emplace("cim:PssSH.k0", &assign_PssSH_k0); + assign_map.emplace("cim:PssSH.k1", &assign_PssSH_k1); + assign_map.emplace("cim:PssSH.k2", &assign_PssSH_k2); + assign_map.emplace("cim:PssSH.k3", &assign_PssSH_k3); + assign_map.emplace("cim:PssSH.k4", &assign_PssSH_k4); + assign_map.emplace("cim:PssSH.t1", &assign_PssSH_t1); + assign_map.emplace("cim:PssSH.t2", &assign_PssSH_t2); + assign_map.emplace("cim:PssSH.t3", &assign_PssSH_t3); + assign_map.emplace("cim:PssSH.t4", &assign_PssSH_t4); + assign_map.emplace("cim:PssSH.td", &assign_PssSH_td); + assign_map.emplace("cim:PssSH.vsmax", &assign_PssSH_vsmax); + assign_map.emplace("cim:PssSH.vsmin", &assign_PssSH_vsmin); } void PssSH::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/PssSH.hpp b/CGMES_2.4.15_16FEB2016/PssSH.hpp index e08fdce49..f93e0ee7b 100644 --- a/CGMES_2.4.15_16FEB2016/PssSH.hpp +++ b/CGMES_2.4.15_16FEB2016/PssSH.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Model for Siemens "H infinity" power system stabilizer with generator electrical power input. - */ + /** \brief Model for Siemens "H infinity" power system stabilizer with generator electrical power input. */ class PssSH : public PowerSystemStabilizerDynamics { public: @@ -28,19 +26,44 @@ namespace CIMPP PssSH(); ~PssSH() override; - CIMPP::PU k; /* Main gain (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU k0; /* Gain 0 (K0). Typical Value = 0.012. Default: nullptr */ - CIMPP::PU k1; /* Gain 1 (K1). Typical Value = 0.488. Default: nullptr */ - CIMPP::PU k2; /* Gain 2 (K2). Typical Value = 0.064. Default: nullptr */ - CIMPP::PU k3; /* Gain 3 (K3). Typical Value = 0.224. Default: nullptr */ - CIMPP::PU k4; /* Gain 4 (K4). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t1; /* Time constant 1 (T1). Typical Value = 0.076. Default: nullptr */ - CIMPP::Seconds t2; /* Time constant 2 (T2). Typical Value = 0.086. Default: nullptr */ - CIMPP::Seconds t3; /* Time constant 3 (T3). Typical Value = 1.068. Default: nullptr */ - CIMPP::Seconds t4; /* Time constant 4 (T4). Typical Value = 1.913. Default: nullptr */ - CIMPP::Seconds td; /* Input time constant (Td). Typical Value = 10. Default: nullptr */ - CIMPP::PU vsmax; /* Output maximum limit (Vsmax). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU vsmin; /* Output minimum limit (Vsmin). Typical Value = -0.1. Default: nullptr */ + /** \brief Main gain (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU k; + + /** \brief Gain 0 (K0). Typical Value = 0.012. Default: nullptr */ + CIMPP::PU k0; + + /** \brief Gain 1 (K1). Typical Value = 0.488. Default: nullptr */ + CIMPP::PU k1; + + /** \brief Gain 2 (K2). Typical Value = 0.064. Default: nullptr */ + CIMPP::PU k2; + + /** \brief Gain 3 (K3). Typical Value = 0.224. Default: nullptr */ + CIMPP::PU k3; + + /** \brief Gain 4 (K4). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU k4; + + /** \brief Time constant 1 (T1). Typical Value = 0.076. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Time constant 2 (T2). Typical Value = 0.086. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Time constant 3 (T3). Typical Value = 1.068. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Time constant 4 (T4). Typical Value = 1.913. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Input time constant (Td). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Output maximum limit (Vsmax). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU vsmax; + + /** \brief Output minimum limit (Vsmin). Typical Value = -0.1. Default: nullptr */ + CIMPP::PU vsmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/PssSK.cpp b/CGMES_2.4.15_16FEB2016/PssSK.cpp index 21e59004b..1c23f5dbd 100644 --- a/CGMES_2.4.15_16FEB2016/PssSK.cpp +++ b/CGMES_2.4.15_16FEB2016/PssSK.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PssSK::PssSK() {}; -PssSK::~PssSK() {}; +PssSK::PssSK() {} +PssSK::~PssSK() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ PssSK::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssSK_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_vsmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_vsmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_vsmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_vsmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssSK_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_PssSK_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_PssSK_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_PssSK_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_PssSK_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_PssSK_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_PssSK_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_PssSK_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_PssSK_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_PssSK_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_vsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmax; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_PssSK_vsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_vsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmin; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_PssSK_vsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char PssSK::debugName[] = "PssSK"; const char* PssSK::debugString() const { @@ -370,22 +376,22 @@ const char* PssSK::debugString() const void PssSK::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssSK"), &PssSK_factory)); + factory_map.emplace("cim:PssSK", &PssSK_factory); } void PssSK::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssSK.k1"), &assign_PssSK_k1)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.k2"), &assign_PssSK_k2)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.k3"), &assign_PssSK_k3)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.t1"), &assign_PssSK_t1)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.t2"), &assign_PssSK_t2)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.t3"), &assign_PssSK_t3)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.t4"), &assign_PssSK_t4)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.t5"), &assign_PssSK_t5)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.t6"), &assign_PssSK_t6)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.vsmax"), &assign_PssSK_vsmax)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.vsmin"), &assign_PssSK_vsmin)); + assign_map.emplace("cim:PssSK.k1", &assign_PssSK_k1); + assign_map.emplace("cim:PssSK.k2", &assign_PssSK_k2); + assign_map.emplace("cim:PssSK.k3", &assign_PssSK_k3); + assign_map.emplace("cim:PssSK.t1", &assign_PssSK_t1); + assign_map.emplace("cim:PssSK.t2", &assign_PssSK_t2); + assign_map.emplace("cim:PssSK.t3", &assign_PssSK_t3); + assign_map.emplace("cim:PssSK.t4", &assign_PssSK_t4); + assign_map.emplace("cim:PssSK.t5", &assign_PssSK_t5); + assign_map.emplace("cim:PssSK.t6", &assign_PssSK_t6); + assign_map.emplace("cim:PssSK.vsmax", &assign_PssSK_vsmax); + assign_map.emplace("cim:PssSK.vsmin", &assign_PssSK_vsmin); } void PssSK::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/PssSK.hpp b/CGMES_2.4.15_16FEB2016/PssSK.hpp index 285b28244..1af0641d1 100644 --- a/CGMES_2.4.15_16FEB2016/PssSK.hpp +++ b/CGMES_2.4.15_16FEB2016/PssSK.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - PSS Slovakian type - three inputs. - */ + /** \brief PSS Slovakian type - three inputs. */ class PssSK : public PowerSystemStabilizerDynamics { public: @@ -28,17 +26,38 @@ namespace CIMPP PssSK(); ~PssSK() override; - CIMPP::PU k1; /* Gain P (K1). Typical Value = -0.3. Default: nullptr */ - CIMPP::PU k2; /* Gain fe (K2). Typical Value = -0.15. Default: nullptr */ - CIMPP::PU k3; /* Gain If (K3). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds t1; /* Denominator time constant (T1). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds t2; /* Filter time constant (T2). Typical Value = 0.35. Default: nullptr */ - CIMPP::Seconds t3; /* Denominator time constant (T3). Typical Value = 0.22. Default: nullptr */ - CIMPP::Seconds t4; /* Filter time constant (T4). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds t5; /* Denominator time constant (T5). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds t6; /* Filter time constant (T6). Typical Value = 0.02. Default: nullptr */ - CIMPP::PU vsmax; /* Stabilizer output max limit (Vsmax). Typical Value = 0.4. Default: nullptr */ - CIMPP::PU vsmin; /* Stabilizer output min limit (Vsmin). Typical Value = -0.4. Default: nullptr */ + /** \brief Gain P (K1). Typical Value = -0.3. Default: nullptr */ + CIMPP::PU k1; + + /** \brief Gain fe (K2). Typical Value = -0.15. Default: nullptr */ + CIMPP::PU k2; + + /** \brief Gain If (K3). Typical Value = 10. Default: nullptr */ + CIMPP::PU k3; + + /** \brief Denominator time constant (T1). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Filter time constant (T2). Typical Value = 0.35. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Denominator time constant (T3). Typical Value = 0.22. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Filter time constant (T4). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Denominator time constant (T5). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Filter time constant (T6). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Stabilizer output max limit (Vsmax). Typical Value = 0.4. Default: nullptr */ + CIMPP::PU vsmax; + + /** \brief Stabilizer output min limit (Vsmin). Typical Value = -0.4. Default: nullptr */ + CIMPP::PU vsmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/PssWECC.cpp b/CGMES_2.4.15_16FEB2016/PssWECC.cpp index 40f8e2a16..e3044b133 100644 --- a/CGMES_2.4.15_16FEB2016/PssWECC.cpp +++ b/CGMES_2.4.15_16FEB2016/PssWECC.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "InputSignalKind.hpp" -#include "InputSignalKind.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PssWECC::PssWECC() {}; -PssWECC::~PssWECC() {}; +PssWECC::PssWECC() {} +PssWECC::~PssWECC() {} static const std::list PossibleProfilesForClass = { @@ -74,246 +56,292 @@ PssWECC::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssWECC_inputSignal1Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_inputSignal1Type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal1Type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_inputSignal2Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_inputSignal2Type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal2Type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_vcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_vcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vcl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_vcu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_vcu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vcu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_vsmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_vsmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_vsmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_vsmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } +bool get_PssWECC_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignal1Type; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} +bool get_PssWECC_inputSignal2Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignal2Type; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} bool get_PssWECC_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -327,7 +355,8 @@ bool get_PssWECC_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -341,7 +370,8 @@ bool get_PssWECC_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -355,7 +385,8 @@ bool get_PssWECC_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t10; if (!buffer.str().empty()) @@ -369,7 +400,8 @@ bool get_PssWECC_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -383,7 +415,8 @@ bool get_PssWECC_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -397,7 +430,8 @@ bool get_PssWECC_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -411,7 +445,8 @@ bool get_PssWECC_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -425,7 +460,8 @@ bool get_PssWECC_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -439,7 +475,8 @@ bool get_PssWECC_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t7; if (!buffer.str().empty()) @@ -453,7 +490,8 @@ bool get_PssWECC_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t8; if (!buffer.str().empty()) @@ -467,7 +505,8 @@ bool get_PssWECC_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t9; if (!buffer.str().empty()) @@ -481,7 +520,8 @@ bool get_PssWECC_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_vcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vcl; if (!buffer.str().empty()) @@ -495,7 +535,8 @@ bool get_PssWECC_vcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_vcu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vcu; if (!buffer.str().empty()) @@ -509,7 +550,8 @@ bool get_PssWECC_vcu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_vsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmax; if (!buffer.str().empty()) @@ -523,7 +565,8 @@ bool get_PssWECC_vsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssWECC_vsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmin; if (!buffer.str().empty()) @@ -535,36 +578,6 @@ bool get_PssWECC_vsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - -bool get_PssWECC_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignal1Type; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - -bool get_PssWECC_inputSignal2Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignal2Type; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char PssWECC::debugName[] = "PssWECC"; const char* PssWECC::debugString() const { @@ -573,29 +586,29 @@ const char* PssWECC::debugString() const void PssWECC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssWECC"), &PssWECC_factory)); + factory_map.emplace("cim:PssWECC", &PssWECC_factory); } void PssWECC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssWECC.inputSignal1Type"), &assign_PssWECC_inputSignal1Type)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.inputSignal2Type"), &assign_PssWECC_inputSignal2Type)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.k1"), &assign_PssWECC_k1)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.k2"), &assign_PssWECC_k2)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t1"), &assign_PssWECC_t1)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t10"), &assign_PssWECC_t10)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t2"), &assign_PssWECC_t2)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t3"), &assign_PssWECC_t3)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t4"), &assign_PssWECC_t4)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t5"), &assign_PssWECC_t5)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t6"), &assign_PssWECC_t6)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t7"), &assign_PssWECC_t7)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t8"), &assign_PssWECC_t8)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t9"), &assign_PssWECC_t9)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.vcl"), &assign_PssWECC_vcl)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.vcu"), &assign_PssWECC_vcu)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.vsmax"), &assign_PssWECC_vsmax)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.vsmin"), &assign_PssWECC_vsmin)); + assign_map.emplace("cim:PssWECC.inputSignal1Type", &assign_PssWECC_inputSignal1Type); + assign_map.emplace("cim:PssWECC.inputSignal2Type", &assign_PssWECC_inputSignal2Type); + assign_map.emplace("cim:PssWECC.k1", &assign_PssWECC_k1); + assign_map.emplace("cim:PssWECC.k2", &assign_PssWECC_k2); + assign_map.emplace("cim:PssWECC.t1", &assign_PssWECC_t1); + assign_map.emplace("cim:PssWECC.t10", &assign_PssWECC_t10); + assign_map.emplace("cim:PssWECC.t2", &assign_PssWECC_t2); + assign_map.emplace("cim:PssWECC.t3", &assign_PssWECC_t3); + assign_map.emplace("cim:PssWECC.t4", &assign_PssWECC_t4); + assign_map.emplace("cim:PssWECC.t5", &assign_PssWECC_t5); + assign_map.emplace("cim:PssWECC.t6", &assign_PssWECC_t6); + assign_map.emplace("cim:PssWECC.t7", &assign_PssWECC_t7); + assign_map.emplace("cim:PssWECC.t8", &assign_PssWECC_t8); + assign_map.emplace("cim:PssWECC.t9", &assign_PssWECC_t9); + assign_map.emplace("cim:PssWECC.vcl", &assign_PssWECC_vcl); + assign_map.emplace("cim:PssWECC.vcu", &assign_PssWECC_vcu); + assign_map.emplace("cim:PssWECC.vsmax", &assign_PssWECC_vsmax); + assign_map.emplace("cim:PssWECC.vsmin", &assign_PssWECC_vsmin); } void PssWECC::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/PssWECC.hpp b/CGMES_2.4.15_16FEB2016/PssWECC.hpp index 4edb4f4af..a5bb2c5de 100644 --- a/CGMES_2.4.15_16FEB2016/PssWECC.hpp +++ b/CGMES_2.4.15_16FEB2016/PssWECC.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Dual input Power System Stabilizer, based on IEEE type 2, with modified output limiter defined by WECC (Western Electricity Coordinating Council, USA). - */ + /** \brief Dual input Power System Stabilizer, based on IEEE type 2, with modified output limiter defined by WECC (Western Electricity Coordinating Council, USA). */ class PssWECC : public PowerSystemStabilizerDynamics { public: @@ -29,24 +27,59 @@ namespace CIMPP PssWECC(); ~PssWECC() override; - CIMPP::InputSignalKind inputSignal1Type; /* Type of input signal #1. Default: 0 */ - CIMPP::InputSignalKind inputSignal2Type; /* Type of input signal #2. Default: 0 */ - CIMPP::PU k1; /* Input signal 1 gain (K). Default: nullptr */ - CIMPP::PU k2; /* Input signal 2 gain (K). Default: nullptr */ - CIMPP::Seconds t1; /* Input signal 1 transducer time constant (T). Default: nullptr */ - CIMPP::Seconds t10; /* Lag time constant (T). Default: nullptr */ - CIMPP::Seconds t2; /* Input signal 2 transducer time constant (T). Default: nullptr */ - CIMPP::Seconds t3; /* Stabilizer washout time constant (T). Default: nullptr */ - CIMPP::Seconds t4; /* Stabilizer washout time lag constant (T) (>0). Default: nullptr */ - CIMPP::Seconds t5; /* Lead time constant (T). Default: nullptr */ - CIMPP::Seconds t6; /* Lag time constant (T). Default: nullptr */ - CIMPP::Seconds t7; /* Lead time constant (T). Default: nullptr */ - CIMPP::Seconds t8; /* Lag time constant (T). Default: nullptr */ - CIMPP::Seconds t9; /* Lead time constant (T). Default: nullptr */ - CIMPP::PU vcl; /* Minimum value for voltage compensator output (V). Default: nullptr */ - CIMPP::PU vcu; /* Maximum value for voltage compensator output (V). Default: nullptr */ - CIMPP::PU vsmax; /* Maximum output signal (Vsmax). Default: nullptr */ - CIMPP::PU vsmin; /* Minimum output signal (Vsmin). Default: nullptr */ + /** \brief Type of input signal #1. Default: 0 */ + CIMPP::InputSignalKind inputSignal1Type; + + /** \brief Type of input signal #2. Default: 0 */ + CIMPP::InputSignalKind inputSignal2Type; + + /** \brief Input signal 1 gain (K). Default: nullptr */ + CIMPP::PU k1; + + /** \brief Input signal 2 gain (K). Default: nullptr */ + CIMPP::PU k2; + + /** \brief Input signal 1 transducer time constant (T). Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Lag time constant (T). Default: nullptr */ + CIMPP::Seconds t10; + + /** \brief Input signal 2 transducer time constant (T). Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Stabilizer washout time constant (T). Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Stabilizer washout time lag constant (T) (>0). Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Lead time constant (T). Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Lag time constant (T). Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Lead time constant (T). Default: nullptr */ + CIMPP::Seconds t7; + + /** \brief Lag time constant (T). Default: nullptr */ + CIMPP::Seconds t8; + + /** \brief Lead time constant (T). Default: nullptr */ + CIMPP::Seconds t9; + + /** \brief Minimum value for voltage compensator output (V). Default: nullptr */ + CIMPP::PU vcl; + + /** \brief Maximum value for voltage compensator output (V). Default: nullptr */ + CIMPP::PU vcu; + + /** \brief Maximum output signal (Vsmax). Default: nullptr */ + CIMPP::PU vsmax; + + /** \brief Minimum output signal (Vsmin). Default: nullptr */ + CIMPP::PU vsmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Quality61850.cpp b/CGMES_2.4.15_16FEB2016/Quality61850.cpp index 9771f8dda..99169f619 100644 --- a/CGMES_2.4.15_16FEB2016/Quality61850.cpp +++ b/CGMES_2.4.15_16FEB2016/Quality61850.cpp @@ -8,23 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Source.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Validity.hpp" using namespace CIMPP; -Quality61850::Quality61850() {}; -Quality61850::~Quality61850() {}; +Quality61850::Quality61850() {} +Quality61850::~Quality61850() {} static const std::list PossibleProfilesForClass = { @@ -62,168 +50,178 @@ Quality61850::getPossibleProfilesForAttributes() const return map; } - -bool assign_Quality61850_badReference(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_badReference(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->badReference; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_estimatorReplaced(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_estimatorReplaced(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->estimatorReplaced; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_failure(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_failure(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->failure; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_oldData(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_oldData(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->oldData; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_operatorBlocked(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_operatorBlocked(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->operatorBlocked; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_oscillatory(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_oscillatory(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->oscillatory; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_outOfRange(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_outOfRange(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->outOfRange; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_overFlow(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_overFlow(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->overFlow; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_source(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_source(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->source; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_suspect(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_suspect(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->suspect; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_test(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_test(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->test; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_validity(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_validity(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->validity; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_Quality61850_badReference(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->badReference; if (!buffer.str().empty()) @@ -237,7 +235,8 @@ bool get_Quality61850_badReference(const BaseClass* BaseClass_ptr1, std::strings bool get_Quality61850_estimatorReplaced(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->estimatorReplaced; if (!buffer.str().empty()) @@ -251,7 +250,8 @@ bool get_Quality61850_estimatorReplaced(const BaseClass* BaseClass_ptr1, std::st bool get_Quality61850_failure(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->failure; if (!buffer.str().empty()) @@ -265,7 +265,8 @@ bool get_Quality61850_failure(const BaseClass* BaseClass_ptr1, std::stringstream bool get_Quality61850_oldData(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->oldData; if (!buffer.str().empty()) @@ -279,7 +280,8 @@ bool get_Quality61850_oldData(const BaseClass* BaseClass_ptr1, std::stringstream bool get_Quality61850_operatorBlocked(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->operatorBlocked; if (!buffer.str().empty()) @@ -293,7 +295,8 @@ bool get_Quality61850_operatorBlocked(const BaseClass* BaseClass_ptr1, std::stri bool get_Quality61850_oscillatory(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->oscillatory; if (!buffer.str().empty()) @@ -307,7 +310,8 @@ bool get_Quality61850_oscillatory(const BaseClass* BaseClass_ptr1, std::stringst bool get_Quality61850_outOfRange(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->outOfRange; if (!buffer.str().empty()) @@ -321,7 +325,8 @@ bool get_Quality61850_outOfRange(const BaseClass* BaseClass_ptr1, std::stringstr bool get_Quality61850_overFlow(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->overFlow; if (!buffer.str().empty()) @@ -333,11 +338,12 @@ bool get_Quality61850_overFlow(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } -bool get_Quality61850_suspect(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_Quality61850_source(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->suspect; + buffer << element->source; if (!buffer.str().empty()) { return true; @@ -347,11 +353,12 @@ bool get_Quality61850_suspect(const BaseClass* BaseClass_ptr1, std::stringstream return false; } -bool get_Quality61850_test(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_Quality61850_suspect(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->test; + buffer << element->suspect; if (!buffer.str().empty()) { return true; @@ -361,13 +368,12 @@ bool get_Quality61850_test(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - -bool get_Quality61850_source(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_Quality61850_test(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->source; + buffer << element->test; if (!buffer.str().empty()) { return true; @@ -379,7 +385,8 @@ bool get_Quality61850_source(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_Quality61850_validity(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->validity; if (!buffer.str().empty()) @@ -399,23 +406,23 @@ const char* Quality61850::debugString() const void Quality61850::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Quality61850"), &Quality61850_factory)); + factory_map.emplace("cim:Quality61850", &Quality61850_factory); } void Quality61850::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Quality61850.badReference"), &assign_Quality61850_badReference)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.estimatorReplaced"), &assign_Quality61850_estimatorReplaced)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.failure"), &assign_Quality61850_failure)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.oldData"), &assign_Quality61850_oldData)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.operatorBlocked"), &assign_Quality61850_operatorBlocked)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.oscillatory"), &assign_Quality61850_oscillatory)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.outOfRange"), &assign_Quality61850_outOfRange)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.overFlow"), &assign_Quality61850_overFlow)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.source"), &assign_Quality61850_source)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.suspect"), &assign_Quality61850_suspect)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.test"), &assign_Quality61850_test)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.validity"), &assign_Quality61850_validity)); + assign_map.emplace("cim:Quality61850.badReference", &assign_Quality61850_badReference); + assign_map.emplace("cim:Quality61850.estimatorReplaced", &assign_Quality61850_estimatorReplaced); + assign_map.emplace("cim:Quality61850.failure", &assign_Quality61850_failure); + assign_map.emplace("cim:Quality61850.oldData", &assign_Quality61850_oldData); + assign_map.emplace("cim:Quality61850.operatorBlocked", &assign_Quality61850_operatorBlocked); + assign_map.emplace("cim:Quality61850.oscillatory", &assign_Quality61850_oscillatory); + assign_map.emplace("cim:Quality61850.outOfRange", &assign_Quality61850_outOfRange); + assign_map.emplace("cim:Quality61850.overFlow", &assign_Quality61850_overFlow); + assign_map.emplace("cim:Quality61850.source", &assign_Quality61850_source); + assign_map.emplace("cim:Quality61850.suspect", &assign_Quality61850_suspect); + assign_map.emplace("cim:Quality61850.test", &assign_Quality61850_test); + assign_map.emplace("cim:Quality61850.validity", &assign_Quality61850_validity); } void Quality61850::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/Quality61850.hpp b/CGMES_2.4.15_16FEB2016/Quality61850.hpp index 84109cd81..455802f53 100644 --- a/CGMES_2.4.15_16FEB2016/Quality61850.hpp +++ b/CGMES_2.4.15_16FEB2016/Quality61850.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Quality flags in this class are as defined in IEC 61850, except for estimatorReplaced, which has been included in this class for convenience. - */ + /** \brief Quality flags in this class are as defined in IEC 61850, except for estimatorReplaced, which has been included in this class for convenience. */ class Quality61850 : public BaseClass { public: @@ -29,18 +27,41 @@ namespace CIMPP Quality61850(); ~Quality61850() override; - CIMPP::Boolean badReference; /* Measurement value may be incorrect due to a reference being out of calibration. Default: false */ - CIMPP::Boolean estimatorReplaced; /* Value has been replaced by State Estimator. estimatorReplaced is not an IEC61850 quality bit but has been put in this class for convenience. Default: false */ - CIMPP::Boolean failure; /* This identifier indicates that a supervision function has detected an internal or external failure, e.g. communication failure. Default: false */ - CIMPP::Boolean oldData; /* Measurement value is old and possibly invalid, as it has not been successfully updated during a specified time interval. Default: false */ - CIMPP::Boolean operatorBlocked; /* Measurement value is blocked and hence unavailable for transmission. Default: false */ - CIMPP::Boolean oscillatory; /* To prevent some overload of the communication it is sensible to detect and suppress oscillating (fast changing) binary inputs. If a signal changes in a defined time (tosc) twice in the same direction (from 0 to 1 or from 1 to 0) then oscillation is detected and the detail quality identifier `oscillatory` is set. If it is detected a configured numbers of transient changes could be passed by. In this time the validity status `questionable` is set. If after this defined numbers of changes the signal is still in the oscillating state the value shall be set either to the opposite state of the previous stable value or to a defined default value. In this case the validity status `questionable` is reset and `invalid` is set as long as the signal is oscillating. If it is configured such that no transient changes should be passed by then the validity status `invalid` is set immediately in addition to the detail quality identifier `oscillatory` (used for status information only). Default: false */ - CIMPP::Boolean outOfRange; /* Measurement value is beyond a predefined range of value. Default: false */ - CIMPP::Boolean overFlow; /* Measurement value is beyond the capability of being represented properly. For example, a counter value overflows from maximum count back to a value of zero. Default: false */ - CIMPP::Source source; /* Source gives information related to the origin of a value. The value may be acquired from the process, defaulted or substituted. Default: 0 */ - CIMPP::Boolean suspect; /* A correlation function has detected that the value is not consitent with other values. Typically set by a network State Estimator. Default: false */ - CIMPP::Boolean test; /* Measurement value is transmitted for test purposes. Default: false */ - CIMPP::Validity validity; /* Validity of the measurement value. Default: 0 */ + /** \brief Measurement value may be incorrect due to a reference being out of calibration. Default: false */ + CIMPP::Boolean badReference; + + /** \brief Value has been replaced by State Estimator. estimatorReplaced is not an IEC61850 quality bit but has been put in this class for convenience. Default: false */ + CIMPP::Boolean estimatorReplaced; + + /** \brief This identifier indicates that a supervision function has detected an internal or external failure, e.g. communication failure. Default: false */ + CIMPP::Boolean failure; + + /** \brief Measurement value is old and possibly invalid, as it has not been successfully updated during a specified time interval. Default: false */ + CIMPP::Boolean oldData; + + /** \brief Measurement value is blocked and hence unavailable for transmission. Default: false */ + CIMPP::Boolean operatorBlocked; + + /** \brief To prevent some overload of the communication it is sensible to detect and suppress oscillating (fast changing) binary inputs. If a signal changes in a defined time (tosc) twice in the same direction (from 0 to 1 or from 1 to 0) then oscillation is detected and the detail quality identifier `oscillatory` is set. If it is detected a configured numbers of transient changes could be passed by. In this time the validity status `questionable` is set. If after this defined numbers of changes the signal is still in the oscillating state the value shall be set either to the opposite state of the previous stable value or to a defined default value. In this case the validity status `questionable` is reset and `invalid` is set as long as the signal is oscillating. If it is configured such that no transient changes should be passed by then the validity status `invalid` is set immediately in addition to the detail quality identifier `oscillatory` (used for status information only). Default: false */ + CIMPP::Boolean oscillatory; + + /** \brief Measurement value is beyond a predefined range of value. Default: false */ + CIMPP::Boolean outOfRange; + + /** \brief Measurement value is beyond the capability of being represented properly. For example, a counter value overflows from maximum count back to a value of zero. Default: false */ + CIMPP::Boolean overFlow; + + /** \brief Source gives information related to the origin of a value. The value may be acquired from the process, defaulted or substituted. Default: 0 */ + CIMPP::Source source; + + /** \brief A correlation function has detected that the value is not consitent with other values. Typically set by a network State Estimator. Default: false */ + CIMPP::Boolean suspect; + + /** \brief Measurement value is transmitted for test purposes. Default: false */ + CIMPP::Boolean test; + + /** \brief Validity of the measurement value. Default: 0 */ + CIMPP::Validity validity; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/RaiseLowerCommand.cpp b/CGMES_2.4.15_16FEB2016/RaiseLowerCommand.cpp index ba30e7516..59622eff6 100644 --- a/CGMES_2.4.15_16FEB2016/RaiseLowerCommand.cpp +++ b/CGMES_2.4.15_16FEB2016/RaiseLowerCommand.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -RaiseLowerCommand::RaiseLowerCommand() : ValueAliasSet(nullptr) {}; -RaiseLowerCommand::~RaiseLowerCommand() {}; +RaiseLowerCommand::RaiseLowerCommand() : ValueAliasSet(nullptr) {} +RaiseLowerCommand::~RaiseLowerCommand() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ RaiseLowerCommand::getPossibleProfilesForAttributes() const return map; } - - bool assign_ValueAliasSet_RaiseLowerCommands(BaseClass*, BaseClass*); bool assign_RaiseLowerCommand_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_RaiseLowerCommand_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass return false; } - bool get_RaiseLowerCommand_ValueAliasSet(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RaiseLowerCommand* element = dynamic_cast(BaseClass_ptr1)) + const RaiseLowerCommand* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ValueAliasSet != 0) { @@ -73,7 +71,6 @@ bool get_RaiseLowerCommand_ValueAliasSet(const BaseClass* BaseClass_ptr1, std::l return false; } - const char RaiseLowerCommand::debugName[] = "RaiseLowerCommand"; const char* RaiseLowerCommand::debugString() const { @@ -82,7 +79,7 @@ const char* RaiseLowerCommand::debugString() const void RaiseLowerCommand::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RaiseLowerCommand"), &RaiseLowerCommand_factory)); + factory_map.emplace("cim:RaiseLowerCommand", &RaiseLowerCommand_factory); } void RaiseLowerCommand::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void RaiseLowerCommand::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RaiseLowerCommand.ValueAliasSet"), &assign_RaiseLowerCommand_ValueAliasSet)); + assign_map.emplace("cim:RaiseLowerCommand.ValueAliasSet", &assign_RaiseLowerCommand_ValueAliasSet); } void RaiseLowerCommand::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/RaiseLowerCommand.hpp b/CGMES_2.4.15_16FEB2016/RaiseLowerCommand.hpp index a6b9dba1e..97530d3cb 100644 --- a/CGMES_2.4.15_16FEB2016/RaiseLowerCommand.hpp +++ b/CGMES_2.4.15_16FEB2016/RaiseLowerCommand.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class ValueAliasSet; - /* - An analog control that increase or decrease a set point value with pulses. - */ + /** \brief An analog control that increase or decrease a set point value with pulses. */ class RaiseLowerCommand : public AnalogControl { public: @@ -27,7 +25,8 @@ namespace CIMPP RaiseLowerCommand(); ~RaiseLowerCommand() override; - CIMPP::ValueAliasSet* ValueAliasSet; /* The ValueAliasSet used for translation of a Control value to a name. Default: 0 */ + /** \brief The ValueAliasSet used for translation of a Control value to a name. Default: 0 */ + CIMPP::ValueAliasSet* ValueAliasSet; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/RatioTapChanger.cpp b/CGMES_2.4.15_16FEB2016/RatioTapChanger.cpp index 5c424bc14..f67722c8a 100644 --- a/CGMES_2.4.15_16FEB2016/RatioTapChanger.cpp +++ b/CGMES_2.4.15_16FEB2016/RatioTapChanger.cpp @@ -10,13 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "RatioTapChangerTable.hpp" #include "TransformerEnd.hpp" -#include "PerCent.hpp" -#include "TransformerControlMode.hpp" using namespace CIMPP; -RatioTapChanger::RatioTapChanger() : RatioTapChangerTable(nullptr), TransformerEnd(nullptr) {}; -RatioTapChanger::~RatioTapChanger() {}; +RatioTapChanger::RatioTapChanger() : RatioTapChangerTable(nullptr), TransformerEnd(nullptr) {} +RatioTapChanger::~RatioTapChanger() {} static const std::list PossibleProfilesForClass = { @@ -47,34 +45,6 @@ RatioTapChanger::getPossibleProfilesForAttributes() const return map; } - -bool assign_RatioTapChanger_stepVoltageIncrement(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (RatioTapChanger* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->stepVoltageIncrement; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_RatioTapChanger_tculControlMode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (RatioTapChanger* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->tculControlMode; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_RatioTapChangerTable_RatioTapChanger(BaseClass*, BaseClass*); bool assign_RatioTapChanger_RatioTapChangerTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -91,6 +61,7 @@ bool assign_RatioTapChanger_RatioTapChangerTable(BaseClass* BaseClass_ptr1, Base } return false; } + bool assign_TransformerEnd_RatioTapChanger(BaseClass*, BaseClass*); bool assign_RatioTapChanger_TransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -108,24 +79,38 @@ bool assign_RatioTapChanger_TransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* return false; } -bool get_RatioTapChanger_stepVoltageIncrement(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_RatioTapChanger_stepVoltageIncrement(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const RatioTapChanger* element = dynamic_cast(BaseClass_ptr1)) + RatioTapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->stepVoltageIncrement; - if (!buffer.str().empty()) + buffer >> element->stepVoltageIncrement; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } +bool assign_RatioTapChanger_tculControlMode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + RatioTapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->tculControlMode; + if (!buffer.fail()) + { + return true; + } + } + return false; +} bool get_RatioTapChanger_RatioTapChangerTable(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RatioTapChanger* element = dynamic_cast(BaseClass_ptr1)) + const RatioTapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->RatioTapChangerTable != 0) { @@ -138,7 +123,8 @@ bool get_RatioTapChanger_RatioTapChangerTable(const BaseClass* BaseClass_ptr1, s bool get_RatioTapChanger_TransformerEnd(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RatioTapChanger* element = dynamic_cast(BaseClass_ptr1)) + const RatioTapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->TransformerEnd != 0) { @@ -149,10 +135,25 @@ bool get_RatioTapChanger_TransformerEnd(const BaseClass* BaseClass_ptr1, std::li return false; } +bool get_RatioTapChanger_stepVoltageIncrement(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const RatioTapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->stepVoltageIncrement; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} bool get_RatioTapChanger_tculControlMode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RatioTapChanger* element = dynamic_cast(BaseClass_ptr1)) + const RatioTapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tculControlMode; if (!buffer.str().empty()) @@ -172,19 +173,19 @@ const char* RatioTapChanger::debugString() const void RatioTapChanger::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RatioTapChanger"), &RatioTapChanger_factory)); + factory_map.emplace("cim:RatioTapChanger", &RatioTapChanger_factory); } void RatioTapChanger::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RatioTapChanger.stepVoltageIncrement"), &assign_RatioTapChanger_stepVoltageIncrement)); - assign_map.insert(std::make_pair(std::string("cim:RatioTapChanger.tculControlMode"), &assign_RatioTapChanger_tculControlMode)); + assign_map.emplace("cim:RatioTapChanger.stepVoltageIncrement", &assign_RatioTapChanger_stepVoltageIncrement); + assign_map.emplace("cim:RatioTapChanger.tculControlMode", &assign_RatioTapChanger_tculControlMode); } void RatioTapChanger::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RatioTapChanger.RatioTapChangerTable"), &assign_RatioTapChanger_RatioTapChangerTable)); - assign_map.insert(std::make_pair(std::string("cim:RatioTapChanger.TransformerEnd"), &assign_RatioTapChanger_TransformerEnd)); + assign_map.emplace("cim:RatioTapChanger.RatioTapChangerTable", &assign_RatioTapChanger_RatioTapChangerTable); + assign_map.emplace("cim:RatioTapChanger.TransformerEnd", &assign_RatioTapChanger_TransformerEnd); } void RatioTapChanger::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/RatioTapChanger.hpp b/CGMES_2.4.15_16FEB2016/RatioTapChanger.hpp index 9e01cd807..fafbcad25 100644 --- a/CGMES_2.4.15_16FEB2016/RatioTapChanger.hpp +++ b/CGMES_2.4.15_16FEB2016/RatioTapChanger.hpp @@ -20,9 +20,7 @@ namespace CIMPP class RatioTapChangerTable; class TransformerEnd; - /* - A tap changer that changes the voltage ratio impacting the voltage magnitude but not the phase angle across the transformer. - */ + /** \brief A tap changer that changes the voltage ratio impacting the voltage magnitude but not the phase angle across the transformer. */ class RatioTapChanger : public TapChanger { public: @@ -30,10 +28,17 @@ namespace CIMPP RatioTapChanger(); ~RatioTapChanger() override; - CIMPP::RatioTapChangerTable* RatioTapChangerTable; /* The ratio tap changer of this tap ratio table. Default: 0 */ - CIMPP::TransformerEnd* TransformerEnd; /* Ratio tap changer associated with this transformer end. Default: 0 */ - CIMPP::PerCent stepVoltageIncrement; /* Tap step increment, in per cent of nominal voltage, per step position. Default: nullptr */ - CIMPP::TransformerControlMode tculControlMode; /* Specifies the regulation control mode (voltage or reactive) of the RatioTapChanger. Default: 0 */ + /** \brief The ratio tap changer of this tap ratio table. Default: 0 */ + CIMPP::RatioTapChangerTable* RatioTapChangerTable; + + /** \brief Ratio tap changer associated with this transformer end. Default: 0 */ + CIMPP::TransformerEnd* TransformerEnd; + + /** \brief Tap step increment, in per cent of nominal voltage, per step position. Default: nullptr */ + CIMPP::PerCent stepVoltageIncrement; + + /** \brief Specifies the regulation control mode (voltage or reactive) of the RatioTapChanger. Default: 0 */ + CIMPP::TransformerControlMode tculControlMode; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/RatioTapChangerTable.cpp b/CGMES_2.4.15_16FEB2016/RatioTapChangerTable.cpp index 3088057a7..1c743986f 100644 --- a/CGMES_2.4.15_16FEB2016/RatioTapChangerTable.cpp +++ b/CGMES_2.4.15_16FEB2016/RatioTapChangerTable.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -RatioTapChangerTable::RatioTapChangerTable() {}; -RatioTapChangerTable::~RatioTapChangerTable() {}; +RatioTapChangerTable::RatioTapChangerTable() {} +RatioTapChangerTable::~RatioTapChangerTable() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ RatioTapChangerTable::getPossibleProfilesForAttributes() const return map; } - - bool assign_RatioTapChanger_RatioTapChangerTable(BaseClass*, BaseClass*); bool assign_RatioTapChangerTable_RatioTapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_RatioTapChangerTable_RatioTapChanger(BaseClass* BaseClass_ptr1, Base } return false; } + bool assign_RatioTapChangerTablePoint_RatioTapChangerTable(BaseClass*, BaseClass*); bool assign_RatioTapChangerTable_RatioTapChangerTablePoint(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -87,7 +86,7 @@ const char* RatioTapChangerTable::debugString() const void RatioTapChangerTable::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RatioTapChangerTable"), &RatioTapChangerTable_factory)); + factory_map.emplace("cim:RatioTapChangerTable", &RatioTapChangerTable_factory); } void RatioTapChangerTable::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -96,8 +95,8 @@ void RatioTapChangerTable::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RatioTapChangerTable.RatioTapChanger"), &assign_RatioTapChangerTable_RatioTapChanger)); - assign_map.insert(std::make_pair(std::string("cim:RatioTapChangerTable.RatioTapChangerTablePoint"), &assign_RatioTapChangerTable_RatioTapChangerTablePoint)); + assign_map.emplace("cim:RatioTapChangerTable.RatioTapChanger", &assign_RatioTapChangerTable_RatioTapChanger); + assign_map.emplace("cim:RatioTapChangerTable.RatioTapChangerTablePoint", &assign_RatioTapChangerTable_RatioTapChangerTablePoint); } void RatioTapChangerTable::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/RatioTapChangerTable.hpp b/CGMES_2.4.15_16FEB2016/RatioTapChangerTable.hpp index 932fd0e42..fdb0e4be4 100644 --- a/CGMES_2.4.15_16FEB2016/RatioTapChangerTable.hpp +++ b/CGMES_2.4.15_16FEB2016/RatioTapChangerTable.hpp @@ -18,9 +18,7 @@ namespace CIMPP class RatioTapChanger; class RatioTapChangerTablePoint; - /* - Describes a curve for how the voltage magnitude and impedance varies with the tap step. - */ + /** \brief Describes a curve for how the voltage magnitude and impedance varies with the tap step. */ class RatioTapChangerTable : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP RatioTapChangerTable(); ~RatioTapChangerTable() override; - std::list RatioTapChanger; /* The tap ratio table for this ratio tap changer. Default: 0 */ - std::list RatioTapChangerTablePoint; /* Table of this point. Default: 0 */ + /** \brief The tap ratio table for this ratio tap changer. Default: 0 */ + std::list RatioTapChanger; + + /** \brief Table of this point. Default: 0 */ + std::list RatioTapChangerTablePoint; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/RatioTapChangerTablePoint.cpp b/CGMES_2.4.15_16FEB2016/RatioTapChangerTablePoint.cpp index 358496d9f..fb837e687 100644 --- a/CGMES_2.4.15_16FEB2016/RatioTapChangerTablePoint.cpp +++ b/CGMES_2.4.15_16FEB2016/RatioTapChangerTablePoint.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -RatioTapChangerTablePoint::RatioTapChangerTablePoint() : RatioTapChangerTable(nullptr) {}; -RatioTapChangerTablePoint::~RatioTapChangerTablePoint() {}; +RatioTapChangerTablePoint::RatioTapChangerTablePoint() : RatioTapChangerTable(nullptr) {} +RatioTapChangerTablePoint::~RatioTapChangerTablePoint() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ RatioTapChangerTablePoint::getPossibleProfilesForAttributes() const return map; } - - bool assign_RatioTapChangerTable_RatioTapChangerTablePoint(BaseClass*, BaseClass*); bool assign_RatioTapChangerTablePoint_RatioTapChangerTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_RatioTapChangerTablePoint_RatioTapChangerTable(BaseClass* BaseClass_ return false; } - bool get_RatioTapChangerTablePoint_RatioTapChangerTable(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RatioTapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + const RatioTapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->RatioTapChangerTable != 0) { @@ -73,7 +71,6 @@ bool get_RatioTapChangerTablePoint_RatioTapChangerTable(const BaseClass* BaseCla return false; } - const char RatioTapChangerTablePoint::debugName[] = "RatioTapChangerTablePoint"; const char* RatioTapChangerTablePoint::debugString() const { @@ -82,7 +79,7 @@ const char* RatioTapChangerTablePoint::debugString() const void RatioTapChangerTablePoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RatioTapChangerTablePoint"), &RatioTapChangerTablePoint_factory)); + factory_map.emplace("cim:RatioTapChangerTablePoint", &RatioTapChangerTablePoint_factory); } void RatioTapChangerTablePoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void RatioTapChangerTablePoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RatioTapChangerTablePoint.RatioTapChangerTable"), &assign_RatioTapChangerTablePoint_RatioTapChangerTable)); + assign_map.emplace("cim:RatioTapChangerTablePoint.RatioTapChangerTable", &assign_RatioTapChangerTablePoint_RatioTapChangerTable); } void RatioTapChangerTablePoint::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/RatioTapChangerTablePoint.hpp b/CGMES_2.4.15_16FEB2016/RatioTapChangerTablePoint.hpp index fb2c87124..a2a695328 100644 --- a/CGMES_2.4.15_16FEB2016/RatioTapChangerTablePoint.hpp +++ b/CGMES_2.4.15_16FEB2016/RatioTapChangerTablePoint.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class RatioTapChangerTable; - /* - Describes each tap step in the ratio tap changer tabular curve. - */ + /** \brief Describes each tap step in the ratio tap changer tabular curve. */ class RatioTapChangerTablePoint : public TapChangerTablePoint { public: @@ -27,7 +25,8 @@ namespace CIMPP RatioTapChangerTablePoint(); ~RatioTapChangerTablePoint() override; - CIMPP::RatioTapChangerTable* RatioTapChangerTable; /* Points of this table. Default: 0 */ + /** \brief Points of this table. Default: 0 */ + CIMPP::RatioTapChangerTable* RatioTapChangerTable; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Reactance.hpp b/CGMES_2.4.15_16FEB2016/Reactance.hpp index a811d499a..e49646947 100644 --- a/CGMES_2.4.15_16FEB2016/Reactance.hpp +++ b/CGMES_2.4.15_16FEB2016/Reactance.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Reactance (imaginary part of impedance), at rated frequency. - */ + /** \brief Reactance (imaginary part of impedance), at rated frequency. */ class Reactance { public: diff --git a/CGMES_2.4.15_16FEB2016/ReactiveCapabilityCurve.cpp b/CGMES_2.4.15_16FEB2016/ReactiveCapabilityCurve.cpp index e82001919..5d3fe1f54 100644 --- a/CGMES_2.4.15_16FEB2016/ReactiveCapabilityCurve.cpp +++ b/CGMES_2.4.15_16FEB2016/ReactiveCapabilityCurve.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ReactiveCapabilityCurve::ReactiveCapabilityCurve() {}; -ReactiveCapabilityCurve::~ReactiveCapabilityCurve() {}; +ReactiveCapabilityCurve::ReactiveCapabilityCurve() {} +ReactiveCapabilityCurve::~ReactiveCapabilityCurve() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ ReactiveCapabilityCurve::getPossibleProfilesForAttributes() const return map; } - - bool assign_EquivalentInjection_ReactiveCapabilityCurve(BaseClass*, BaseClass*); bool assign_ReactiveCapabilityCurve_EquivalentInjection(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_ReactiveCapabilityCurve_EquivalentInjection(BaseClass* BaseClass_ptr } return false; } + bool assign_SynchronousMachine_InitialReactiveCapabilityCurve(BaseClass*, BaseClass*); bool assign_ReactiveCapabilityCurve_InitiallyUsedBySynchronousMachines(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -87,7 +86,7 @@ const char* ReactiveCapabilityCurve::debugString() const void ReactiveCapabilityCurve::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ReactiveCapabilityCurve"), &ReactiveCapabilityCurve_factory)); + factory_map.emplace("cim:ReactiveCapabilityCurve", &ReactiveCapabilityCurve_factory); } void ReactiveCapabilityCurve::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -96,8 +95,8 @@ void ReactiveCapabilityCurve::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ReactiveCapabilityCurve.EquivalentInjection"), &assign_ReactiveCapabilityCurve_EquivalentInjection)); - assign_map.insert(std::make_pair(std::string("cim:ReactiveCapabilityCurve.InitiallyUsedBySynchronousMachines"), &assign_ReactiveCapabilityCurve_InitiallyUsedBySynchronousMachines)); + assign_map.emplace("cim:ReactiveCapabilityCurve.EquivalentInjection", &assign_ReactiveCapabilityCurve_EquivalentInjection); + assign_map.emplace("cim:ReactiveCapabilityCurve.InitiallyUsedBySynchronousMachines", &assign_ReactiveCapabilityCurve_InitiallyUsedBySynchronousMachines); } void ReactiveCapabilityCurve::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/ReactiveCapabilityCurve.hpp b/CGMES_2.4.15_16FEB2016/ReactiveCapabilityCurve.hpp index 26c52f7e3..e843629e2 100644 --- a/CGMES_2.4.15_16FEB2016/ReactiveCapabilityCurve.hpp +++ b/CGMES_2.4.15_16FEB2016/ReactiveCapabilityCurve.hpp @@ -18,9 +18,7 @@ namespace CIMPP class EquivalentInjection; class SynchronousMachine; - /* - Reactive power rating envelope versus the synchronous machine's active power, in both the generating and motoring modes. For each active power value there is a corresponding high and low reactive power limit value. Typically there will be a separate curve for each coolant condition, such as hydrogen pressure. The Y1 axis values represent reactive minimum and the Y2 axis values represent reactive maximum. - */ + /** \brief Reactive power rating envelope versus the synchronous machine's active power, in both the generating and motoring modes. For each active power value there is a corresponding high and low reactive power limit value. Typically there will be a separate curve for each coolant condition, such as hydrogen pressure. The Y1 axis values represent reactive minimum and the Y2 axis values represent reactive maximum. */ class ReactiveCapabilityCurve : public Curve { public: @@ -28,8 +26,11 @@ namespace CIMPP ReactiveCapabilityCurve(); ~ReactiveCapabilityCurve() override; - std::list EquivalentInjection; /* The reactive capability curve used by this equivalent injection. Default: 0 */ - std::list InitiallyUsedBySynchronousMachines; /* The default reactive capability curve for use by a synchronous machine. Default: 0 */ + /** \brief The reactive capability curve used by this equivalent injection. Default: 0 */ + std::list EquivalentInjection; + + /** \brief The default reactive capability curve for use by a synchronous machine. Default: 0 */ + std::list InitiallyUsedBySynchronousMachines; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ReactivePower.hpp b/CGMES_2.4.15_16FEB2016/ReactivePower.hpp index e80659b92..28e434b24 100644 --- a/CGMES_2.4.15_16FEB2016/ReactivePower.hpp +++ b/CGMES_2.4.15_16FEB2016/ReactivePower.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Product of RMS value of the voltage and the RMS value of the quadrature component of the current. - */ + /** \brief Product of RMS value of the voltage and the RMS value of the quadrature component of the current. */ class ReactivePower { public: diff --git a/CGMES_2.4.15_16FEB2016/RegularIntervalSchedule.cpp b/CGMES_2.4.15_16FEB2016/RegularIntervalSchedule.cpp index 28f390358..604197cd4 100644 --- a/CGMES_2.4.15_16FEB2016/RegularIntervalSchedule.cpp +++ b/CGMES_2.4.15_16FEB2016/RegularIntervalSchedule.cpp @@ -9,13 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "RegularTimePoint.hpp" -#include "DateTime.hpp" -#include "Seconds.hpp" using namespace CIMPP; -RegularIntervalSchedule::RegularIntervalSchedule() {}; -RegularIntervalSchedule::~RegularIntervalSchedule() {}; +RegularIntervalSchedule::RegularIntervalSchedule() {} +RegularIntervalSchedule::~RegularIntervalSchedule() {} static const std::list PossibleProfilesForClass = { @@ -44,54 +42,56 @@ RegularIntervalSchedule::getPossibleProfilesForAttributes() const return map; } - -bool assign_RegularIntervalSchedule_endTime(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegularTimePoint_IntervalSchedule(BaseClass*, BaseClass*); +bool assign_RegularIntervalSchedule_TimePoints(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + RegularTimePoint* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - element->endTime = buffer.str(); - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->TimePoints.begin(), element->TimePoints.end(), element2) == element->TimePoints.end()) + { + element->TimePoints.push_back(element2); + return assign_RegularTimePoint_IntervalSchedule(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_RegularIntervalSchedule_timeStep(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegularIntervalSchedule_endTime(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->timeStep; - if (buffer.fail()) - return false; - else + element->endTime = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_RegularTimePoint_IntervalSchedule(BaseClass*, BaseClass*); -bool assign_RegularIntervalSchedule_TimePoints(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_RegularIntervalSchedule_timeStep(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); - RegularTimePoint* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->TimePoints.begin(), element->TimePoints.end(), element2) == element->TimePoints.end()) + buffer >> element->timeStep; + if (!buffer.fail()) { - element->TimePoints.push_back(element2); - return assign_RegularTimePoint_IntervalSchedule(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_RegularIntervalSchedule_endTime(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + const RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->endTime; if (!buffer.str().empty()) @@ -105,7 +105,8 @@ bool get_RegularIntervalSchedule_endTime(const BaseClass* BaseClass_ptr1, std::s bool get_RegularIntervalSchedule_timeStep(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + const RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->timeStep; if (!buffer.str().empty()) @@ -117,8 +118,6 @@ bool get_RegularIntervalSchedule_timeStep(const BaseClass* BaseClass_ptr1, std:: return false; } - - const char RegularIntervalSchedule::debugName[] = "RegularIntervalSchedule"; const char* RegularIntervalSchedule::debugString() const { @@ -127,18 +126,18 @@ const char* RegularIntervalSchedule::debugString() const void RegularIntervalSchedule::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RegularIntervalSchedule"), &RegularIntervalSchedule_factory)); + factory_map.emplace("cim:RegularIntervalSchedule", &RegularIntervalSchedule_factory); } void RegularIntervalSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RegularIntervalSchedule.endTime"), &assign_RegularIntervalSchedule_endTime)); - assign_map.insert(std::make_pair(std::string("cim:RegularIntervalSchedule.timeStep"), &assign_RegularIntervalSchedule_timeStep)); + assign_map.emplace("cim:RegularIntervalSchedule.endTime", &assign_RegularIntervalSchedule_endTime); + assign_map.emplace("cim:RegularIntervalSchedule.timeStep", &assign_RegularIntervalSchedule_timeStep); } void RegularIntervalSchedule::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RegularIntervalSchedule.TimePoints"), &assign_RegularIntervalSchedule_TimePoints)); + assign_map.emplace("cim:RegularIntervalSchedule.TimePoints", &assign_RegularIntervalSchedule_TimePoints); } void RegularIntervalSchedule::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/RegularIntervalSchedule.hpp b/CGMES_2.4.15_16FEB2016/RegularIntervalSchedule.hpp index 95a998d55..d34235f88 100644 --- a/CGMES_2.4.15_16FEB2016/RegularIntervalSchedule.hpp +++ b/CGMES_2.4.15_16FEB2016/RegularIntervalSchedule.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class RegularTimePoint; - /* - The schedule has time points where the time between them is constant. - */ + /** \brief The schedule has time points where the time between them is constant. */ class RegularIntervalSchedule : public BasicIntervalSchedule { public: @@ -29,9 +27,14 @@ namespace CIMPP RegularIntervalSchedule(); ~RegularIntervalSchedule() override; - std::list TimePoints; /* The regular interval time point data values that define this schedule. Default: 0 */ - CIMPP::DateTime endTime; /* The time for the last time point. Default: '' */ - CIMPP::Seconds timeStep; /* The time between each pair of subsequent regular time points in sequence order. Default: nullptr */ + /** \brief The regular interval time point data values that define this schedule. Default: 0 */ + std::list TimePoints; + + /** \brief The time for the last time point. Default: '' */ + CIMPP::DateTime endTime; + + /** \brief The time between each pair of subsequent regular time points in sequence order. Default: nullptr */ + CIMPP::Seconds timeStep; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/RegularTimePoint.cpp b/CGMES_2.4.15_16FEB2016/RegularTimePoint.cpp index 500197fc4..5903ad467 100644 --- a/CGMES_2.4.15_16FEB2016/RegularTimePoint.cpp +++ b/CGMES_2.4.15_16FEB2016/RegularTimePoint.cpp @@ -9,14 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "RegularIntervalSchedule.hpp" -#include "Integer.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -RegularTimePoint::RegularTimePoint() : IntervalSchedule(nullptr) {}; -RegularTimePoint::~RegularTimePoint() {}; +RegularTimePoint::RegularTimePoint() : IntervalSchedule(nullptr) {} +RegularTimePoint::~RegularTimePoint() {} static const std::list PossibleProfilesForClass = { @@ -46,67 +43,83 @@ RegularTimePoint::getPossibleProfilesForAttributes() const return map; } +bool assign_RegularIntervalSchedule_TimePoints(BaseClass*, BaseClass*); +bool assign_RegularTimePoint_IntervalSchedule(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RegularTimePoint* element = dynamic_cast(BaseClass_ptr1); + RegularIntervalSchedule* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->IntervalSchedule != element2) + { + element->IntervalSchedule = element2; + return assign_RegularIntervalSchedule_TimePoints(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_RegularTimePoint_sequenceNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegularTimePoint_sequenceNumber(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RegularTimePoint* element = dynamic_cast(BaseClass_ptr1)) + RegularTimePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->sequenceNumber; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RegularTimePoint_value1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegularTimePoint_value1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RegularTimePoint* element = dynamic_cast(BaseClass_ptr1)) + RegularTimePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->value1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RegularTimePoint_value2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegularTimePoint_value2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RegularTimePoint* element = dynamic_cast(BaseClass_ptr1)) + RegularTimePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->value2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_RegularIntervalSchedule_TimePoints(BaseClass*, BaseClass*); -bool assign_RegularTimePoint_IntervalSchedule(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_RegularTimePoint_IntervalSchedule(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - RegularTimePoint* element = dynamic_cast(BaseClass_ptr1); - RegularIntervalSchedule* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const RegularTimePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->IntervalSchedule != element2) + if (element->IntervalSchedule != 0) { - element->IntervalSchedule = element2; - return assign_RegularIntervalSchedule_TimePoints(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->IntervalSchedule); + return true; } - return true; } return false; } bool get_RegularTimePoint_sequenceNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegularTimePoint* element = dynamic_cast(BaseClass_ptr1)) + const RegularTimePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->sequenceNumber; if (!buffer.str().empty()) @@ -120,7 +133,8 @@ bool get_RegularTimePoint_sequenceNumber(const BaseClass* BaseClass_ptr1, std::s bool get_RegularTimePoint_value1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegularTimePoint* element = dynamic_cast(BaseClass_ptr1)) + const RegularTimePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value1; if (!buffer.str().empty()) @@ -134,7 +148,8 @@ bool get_RegularTimePoint_value1(const BaseClass* BaseClass_ptr1, std::stringstr bool get_RegularTimePoint_value2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegularTimePoint* element = dynamic_cast(BaseClass_ptr1)) + const RegularTimePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value2; if (!buffer.str().empty()) @@ -146,21 +161,6 @@ bool get_RegularTimePoint_value2(const BaseClass* BaseClass_ptr1, std::stringstr return false; } - -bool get_RegularTimePoint_IntervalSchedule(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const RegularTimePoint* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->IntervalSchedule != 0) - { - BaseClass_list.push_back(element->IntervalSchedule); - return true; - } - } - return false; -} - - const char RegularTimePoint::debugName[] = "RegularTimePoint"; const char* RegularTimePoint::debugString() const { @@ -169,19 +169,19 @@ const char* RegularTimePoint::debugString() const void RegularTimePoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RegularTimePoint"), &RegularTimePoint_factory)); + factory_map.emplace("cim:RegularTimePoint", &RegularTimePoint_factory); } void RegularTimePoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RegularTimePoint.sequenceNumber"), &assign_RegularTimePoint_sequenceNumber)); - assign_map.insert(std::make_pair(std::string("cim:RegularTimePoint.value1"), &assign_RegularTimePoint_value1)); - assign_map.insert(std::make_pair(std::string("cim:RegularTimePoint.value2"), &assign_RegularTimePoint_value2)); + assign_map.emplace("cim:RegularTimePoint.sequenceNumber", &assign_RegularTimePoint_sequenceNumber); + assign_map.emplace("cim:RegularTimePoint.value1", &assign_RegularTimePoint_value1); + assign_map.emplace("cim:RegularTimePoint.value2", &assign_RegularTimePoint_value2); } void RegularTimePoint::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RegularTimePoint.IntervalSchedule"), &assign_RegularTimePoint_IntervalSchedule)); + assign_map.emplace("cim:RegularTimePoint.IntervalSchedule", &assign_RegularTimePoint_IntervalSchedule); } void RegularTimePoint::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/RegularTimePoint.hpp b/CGMES_2.4.15_16FEB2016/RegularTimePoint.hpp index 160814cc9..1d84dddda 100644 --- a/CGMES_2.4.15_16FEB2016/RegularTimePoint.hpp +++ b/CGMES_2.4.15_16FEB2016/RegularTimePoint.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class RegularIntervalSchedule; - /* - Time point for a schedule where the time between the consecutive points is constant. - */ + /** \brief Time point for a schedule where the time between the consecutive points is constant. */ class RegularTimePoint : public BaseClass { public: @@ -29,10 +27,17 @@ namespace CIMPP RegularTimePoint(); ~RegularTimePoint() override; - CIMPP::RegularIntervalSchedule* IntervalSchedule; /* Regular interval schedule containing this time point. Default: 0 */ - CIMPP::Integer sequenceNumber; /* The position of the regular time point in the sequence. Note that time points don`t have to be sequential, i.e. time points may be omitted. The actual time for a RegularTimePoint is computed by multiplying the associated regular interval schedule`s time step with the regular time point sequence number and adding the associated schedules start time. Default: 0 */ - CIMPP::Simple_Float value1; /* The first value at the time. The meaning of the value is defined by the derived type of the associated schedule. Default: nullptr */ - CIMPP::Simple_Float value2; /* The second value at the time. The meaning of the value is defined by the derived type of the associated schedule. Default: nullptr */ + /** \brief Regular interval schedule containing this time point. Default: 0 */ + CIMPP::RegularIntervalSchedule* IntervalSchedule; + + /** \brief The position of the regular time point in the sequence. Note that time points don`t have to be sequential, i.e. time points may be omitted. The actual time for a RegularTimePoint is computed by multiplying the associated regular interval schedule`s time step with the regular time point sequence number and adding the associated schedules start time. Default: 0 */ + CIMPP::Integer sequenceNumber; + + /** \brief The first value at the time. The meaning of the value is defined by the derived type of the associated schedule. Default: nullptr */ + CIMPP::Simple_Float value1; + + /** \brief The second value at the time. The meaning of the value is defined by the derived type of the associated schedule. Default: nullptr */ + CIMPP::Simple_Float value2; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/RegulatingCondEq.cpp b/CGMES_2.4.15_16FEB2016/RegulatingCondEq.cpp index 57a92235e..19a2d09e9 100644 --- a/CGMES_2.4.15_16FEB2016/RegulatingCondEq.cpp +++ b/CGMES_2.4.15_16FEB2016/RegulatingCondEq.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "RegulatingControl.hpp" -#include "Boolean.hpp" using namespace CIMPP; -RegulatingCondEq::RegulatingCondEq() : RegulatingControl(nullptr) {}; -RegulatingCondEq::~RegulatingCondEq() {}; +RegulatingCondEq::RegulatingCondEq() : RegulatingControl(nullptr) {} +RegulatingCondEq::~RegulatingCondEq() {} static const std::list PossibleProfilesForClass = { @@ -44,21 +43,6 @@ RegulatingCondEq::getPossibleProfilesForAttributes() const return map; } - -bool assign_RegulatingCondEq_controlEnabled(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (RegulatingCondEq* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->controlEnabled; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_RegulatingControl_RegulatingCondEq(BaseClass*, BaseClass*); bool assign_RegulatingCondEq_RegulatingControl(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -76,24 +60,24 @@ bool assign_RegulatingCondEq_RegulatingControl(BaseClass* BaseClass_ptr1, BaseCl return false; } -bool get_RegulatingCondEq_controlEnabled(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_RegulatingCondEq_controlEnabled(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const RegulatingCondEq* element = dynamic_cast(BaseClass_ptr1)) + RegulatingCondEq* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->controlEnabled; - if (!buffer.str().empty()) + buffer >> element->controlEnabled; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_RegulatingCondEq_RegulatingControl(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RegulatingCondEq* element = dynamic_cast(BaseClass_ptr1)) + const RegulatingCondEq* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->RegulatingControl != 0) { @@ -104,6 +88,20 @@ bool get_RegulatingCondEq_RegulatingControl(const BaseClass* BaseClass_ptr1, std return false; } +bool get_RegulatingCondEq_controlEnabled(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const RegulatingCondEq* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->controlEnabled; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char RegulatingCondEq::debugName[] = "RegulatingCondEq"; const char* RegulatingCondEq::debugString() const @@ -113,17 +111,17 @@ const char* RegulatingCondEq::debugString() const void RegulatingCondEq::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RegulatingCondEq"), &RegulatingCondEq_factory)); + factory_map.emplace("cim:RegulatingCondEq", &RegulatingCondEq_factory); } void RegulatingCondEq::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RegulatingCondEq.controlEnabled"), &assign_RegulatingCondEq_controlEnabled)); + assign_map.emplace("cim:RegulatingCondEq.controlEnabled", &assign_RegulatingCondEq_controlEnabled); } void RegulatingCondEq::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RegulatingCondEq.RegulatingControl"), &assign_RegulatingCondEq_RegulatingControl)); + assign_map.emplace("cim:RegulatingCondEq.RegulatingControl", &assign_RegulatingCondEq_RegulatingControl); } void RegulatingCondEq::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/RegulatingCondEq.hpp b/CGMES_2.4.15_16FEB2016/RegulatingCondEq.hpp index a18f5b481..9df3386a1 100644 --- a/CGMES_2.4.15_16FEB2016/RegulatingCondEq.hpp +++ b/CGMES_2.4.15_16FEB2016/RegulatingCondEq.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class RegulatingControl; - /* - A type of conducting equipment that can regulate a quantity (i.e. voltage or flow) at a specific point in the network. - */ + /** \brief A type of conducting equipment that can regulate a quantity (i.e. voltage or flow) at a specific point in the network. */ class RegulatingCondEq : public ConductingEquipment { public: @@ -28,8 +26,11 @@ namespace CIMPP RegulatingCondEq(); ~RegulatingCondEq() override; - CIMPP::RegulatingControl* RegulatingControl; /* The regulating control scheme in which this equipment participates. Default: 0 */ - CIMPP::Boolean controlEnabled; /* Specifies the regulation status of the equipment. True is regulating, false is not regulating. Default: false */ + /** \brief The regulating control scheme in which this equipment participates. Default: 0 */ + CIMPP::RegulatingControl* RegulatingControl; + + /** \brief Specifies the regulation status of the equipment. True is regulating, false is not regulating. Default: false */ + CIMPP::Boolean controlEnabled; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/RegulatingControl.cpp b/CGMES_2.4.15_16FEB2016/RegulatingControl.cpp index d892aad6c..7f14bad90 100644 --- a/CGMES_2.4.15_16FEB2016/RegulatingControl.cpp +++ b/CGMES_2.4.15_16FEB2016/RegulatingControl.cpp @@ -11,17 +11,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "RegulatingCondEq.hpp" #include "RegulationSchedule.hpp" #include "Terminal.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "RegulatingControlModeKind.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "UnitMultiplier.hpp" using namespace CIMPP; -RegulatingControl::RegulatingControl() : Terminal(nullptr) {}; -RegulatingControl::~RegulatingControl() {}; +RegulatingControl::RegulatingControl() : Terminal(nullptr) {} +RegulatingControl::~RegulatingControl() {} static const std::list PossibleProfilesForClass = { @@ -57,154 +51,163 @@ RegulatingControl::getPossibleProfilesForAttributes() const return map; } - -bool assign_RegulatingControl_discrete(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegulatingCondEq_RegulatingControl(BaseClass*, BaseClass*); +bool assign_RegulatingControl_RegulatingCondEq(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + RegulatingCondEq* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->discrete; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->RegulatingCondEq.begin(), element->RegulatingCondEq.end(), element2) == element->RegulatingCondEq.end()) + { + element->RegulatingCondEq.push_back(element2); + return assign_RegulatingCondEq_RegulatingControl(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_RegulatingControl_enabled(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegulationSchedule_RegulatingControl(BaseClass*, BaseClass*); +bool assign_RegulatingControl_RegulationSchedule(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + RegulationSchedule* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->enabled; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->RegulationSchedule.begin(), element->RegulationSchedule.end(), element2) == element->RegulationSchedule.end()) + { + element->RegulationSchedule.push_back(element2); + return assign_RegulationSchedule_RegulatingControl(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_RegulatingControl_mode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Terminal_RegulatingControl(BaseClass*, BaseClass*); +bool assign_RegulatingControl_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->mode; - if (buffer.fail()) - return false; - else - return true; + if (element->Terminal != element2) + { + element->Terminal = element2; + return assign_Terminal_RegulatingControl(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_RegulatingControl_targetDeadband(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegulatingControl_discrete(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->targetDeadband; - if (buffer.fail()) - return false; - else + buffer >> element->discrete; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RegulatingControl_targetValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegulatingControl_enabled(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->targetValue; - if (buffer.fail()) - return false; - else + buffer >> element->enabled; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RegulatingControl_targetValueUnitMultiplier(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegulatingControl_mode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->targetValueUnitMultiplier; - if (buffer.fail()) - return false; - else + buffer >> element->mode; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_RegulatingCondEq_RegulatingControl(BaseClass*, BaseClass*); -bool assign_RegulatingControl_RegulatingCondEq(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_RegulatingControl_targetDeadband(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { RegulatingControl* element = dynamic_cast(BaseClass_ptr1); - RegulatingCondEq* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->RegulatingCondEq.begin(), element->RegulatingCondEq.end(), element2) == element->RegulatingCondEq.end()) + buffer >> element->targetDeadband; + if (!buffer.fail()) { - element->RegulatingCondEq.push_back(element2); - return assign_RegulatingCondEq_RegulatingControl(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_RegulationSchedule_RegulatingControl(BaseClass*, BaseClass*); -bool assign_RegulatingControl_RegulationSchedule(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_RegulatingControl_targetValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { RegulatingControl* element = dynamic_cast(BaseClass_ptr1); - RegulationSchedule* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->RegulationSchedule.begin(), element->RegulationSchedule.end(), element2) == element->RegulationSchedule.end()) + buffer >> element->targetValue; + if (!buffer.fail()) { - element->RegulationSchedule.push_back(element2); - return assign_RegulationSchedule_RegulatingControl(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_Terminal_RegulatingControl(BaseClass*, BaseClass*); -bool assign_RegulatingControl_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_RegulatingControl_targetValueUnitMultiplier(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { RegulatingControl* element = dynamic_cast(BaseClass_ptr1); - Terminal* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->Terminal != element2) + buffer >> element->targetValueUnitMultiplier; + if (!buffer.fail()) { - element->Terminal = element2; - return assign_Terminal_RegulatingControl(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool get_RegulatingControl_discrete(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) + + +bool get_RegulatingControl_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + const RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->discrete; - if (!buffer.str().empty()) + if (element->Terminal != 0) { + BaseClass_list.push_back(element->Terminal); return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_RegulatingControl_enabled(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_RegulatingControl_discrete(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + const RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->enabled; + buffer << element->discrete; if (!buffer.str().empty()) { return true; @@ -214,11 +217,12 @@ bool get_RegulatingControl_enabled(const BaseClass* BaseClass_ptr1, std::strings return false; } -bool get_RegulatingControl_targetDeadband(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_RegulatingControl_enabled(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + const RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->targetDeadband; + buffer << element->enabled; if (!buffer.str().empty()) { return true; @@ -228,11 +232,12 @@ bool get_RegulatingControl_targetDeadband(const BaseClass* BaseClass_ptr1, std:: return false; } -bool get_RegulatingControl_targetValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_RegulatingControl_mode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + const RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->targetValue; + buffer << element->mode; if (!buffer.str().empty()) { return true; @@ -242,26 +247,27 @@ bool get_RegulatingControl_targetValue(const BaseClass* BaseClass_ptr1, std::str return false; } - -bool get_RegulatingControl_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) +bool get_RegulatingControl_targetDeadband(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + const RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->Terminal != 0) + buffer << element->targetDeadband; + if (!buffer.str().empty()) { - BaseClass_list.push_back(element->Terminal); return true; } } + buffer.setstate(std::ios::failbit); return false; } - -bool get_RegulatingControl_mode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_RegulatingControl_targetValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + const RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->mode; + buffer << element->targetValue; if (!buffer.str().empty()) { return true; @@ -273,7 +279,8 @@ bool get_RegulatingControl_mode(const BaseClass* BaseClass_ptr1, std::stringstre bool get_RegulatingControl_targetValueUnitMultiplier(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + const RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->targetValueUnitMultiplier; if (!buffer.str().empty()) @@ -293,24 +300,24 @@ const char* RegulatingControl::debugString() const void RegulatingControl::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RegulatingControl"), &RegulatingControl_factory)); + factory_map.emplace("cim:RegulatingControl", &RegulatingControl_factory); } void RegulatingControl::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.discrete"), &assign_RegulatingControl_discrete)); - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.enabled"), &assign_RegulatingControl_enabled)); - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.mode"), &assign_RegulatingControl_mode)); - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.targetDeadband"), &assign_RegulatingControl_targetDeadband)); - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.targetValue"), &assign_RegulatingControl_targetValue)); - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.targetValueUnitMultiplier"), &assign_RegulatingControl_targetValueUnitMultiplier)); + assign_map.emplace("cim:RegulatingControl.discrete", &assign_RegulatingControl_discrete); + assign_map.emplace("cim:RegulatingControl.enabled", &assign_RegulatingControl_enabled); + assign_map.emplace("cim:RegulatingControl.mode", &assign_RegulatingControl_mode); + assign_map.emplace("cim:RegulatingControl.targetDeadband", &assign_RegulatingControl_targetDeadband); + assign_map.emplace("cim:RegulatingControl.targetValue", &assign_RegulatingControl_targetValue); + assign_map.emplace("cim:RegulatingControl.targetValueUnitMultiplier", &assign_RegulatingControl_targetValueUnitMultiplier); } void RegulatingControl::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.RegulatingCondEq"), &assign_RegulatingControl_RegulatingCondEq)); - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.RegulationSchedule"), &assign_RegulatingControl_RegulationSchedule)); - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.Terminal"), &assign_RegulatingControl_Terminal)); + assign_map.emplace("cim:RegulatingControl.RegulatingCondEq", &assign_RegulatingControl_RegulatingCondEq); + assign_map.emplace("cim:RegulatingControl.RegulationSchedule", &assign_RegulatingControl_RegulationSchedule); + assign_map.emplace("cim:RegulatingControl.Terminal", &assign_RegulatingControl_Terminal); } void RegulatingControl::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/RegulatingControl.hpp b/CGMES_2.4.15_16FEB2016/RegulatingControl.hpp index 6b2c95eae..f6be989fc 100644 --- a/CGMES_2.4.15_16FEB2016/RegulatingControl.hpp +++ b/CGMES_2.4.15_16FEB2016/RegulatingControl.hpp @@ -23,9 +23,7 @@ namespace CIMPP class RegulationSchedule; class Terminal; - /* - Specifies a set of equipment that works together to control a power system quantity such as voltage or flow. Remote bus voltage control is possible by specifying the controlled terminal located at some place remote from the controlling equipment. In case multiple equipment, possibly of different types, control same terminal there must be only one RegulatingControl at that terminal. The most specific subtype of RegulatingControl shall be used in case such equipment participate in the control, e.g. TapChangerControl for tap changers. For flow control load sign convention is used, i.e. positive sign means flow out from a TopologicalNode (bus) into the conducting equipment. - */ + /** \brief Specifies a set of equipment that works together to control a power system quantity such as voltage or flow. Remote bus voltage control is possible by specifying the controlled terminal located at some place remote from the controlling equipment. In case multiple equipment, possibly of different types, control same terminal there must be only one RegulatingControl at that terminal. The most specific subtype of RegulatingControl shall be used in case such equipment participate in the control, e.g. TapChangerControl for tap changers. For flow control load sign convention is used, i.e. positive sign means flow out from a TopologicalNode (bus) into the conducting equipment. */ class RegulatingControl : public PowerSystemResource { public: @@ -33,15 +31,32 @@ namespace CIMPP RegulatingControl(); ~RegulatingControl() override; - std::list RegulatingCondEq; /* The equipment that participates in this regulating control scheme. Default: 0 */ - std::list RegulationSchedule; /* Schedule for this Regulating regulating control. Default: 0 */ - CIMPP::Terminal* Terminal; /* The controls regulating this terminal. Default: 0 */ - CIMPP::Boolean discrete; /* The regulation is performed in a discrete mode. This applies to equipment with discrete controls, e.g. tap changers and shunt compensators. Default: false */ - CIMPP::Boolean enabled; /* The flag tells if regulation is enabled. Default: false */ - CIMPP::RegulatingControlModeKind mode; /* The regulating control mode presently available. This specification allows for determining the kind of regulation without need for obtaining the units from a schedule. Default: 0 */ - CIMPP::Simple_Float targetDeadband; /* This is a deadband used with discrete control to avoid excessive update of controls like tap changers and shunt compensator banks while regulating. The units of those appropriate for the mode. Default: nullptr */ - CIMPP::Simple_Float targetValue; /* The target value specified for case input. This value can be used for the target value without the use of schedules. The value has the units appropriate to the mode attribute. Default: nullptr */ - CIMPP::UnitMultiplier targetValueUnitMultiplier; /* Specify the multiplier for used for the targetValue. Default: 0 */ + /** \brief The equipment that participates in this regulating control scheme. Default: 0 */ + std::list RegulatingCondEq; + + /** \brief Schedule for this Regulating regulating control. Default: 0 */ + std::list RegulationSchedule; + + /** \brief The controls regulating this terminal. Default: 0 */ + CIMPP::Terminal* Terminal; + + /** \brief The regulation is performed in a discrete mode. This applies to equipment with discrete controls, e.g. tap changers and shunt compensators. Default: false */ + CIMPP::Boolean discrete; + + /** \brief The flag tells if regulation is enabled. Default: false */ + CIMPP::Boolean enabled; + + /** \brief The regulating control mode presently available. This specification allows for determining the kind of regulation without need for obtaining the units from a schedule. Default: 0 */ + CIMPP::RegulatingControlModeKind mode; + + /** \brief This is a deadband used with discrete control to avoid excessive update of controls like tap changers and shunt compensator banks while regulating. The units of those appropriate for the mode. Default: nullptr */ + CIMPP::Simple_Float targetDeadband; + + /** \brief The target value specified for case input. This value can be used for the target value without the use of schedules. The value has the units appropriate to the mode attribute. Default: nullptr */ + CIMPP::Simple_Float targetValue; + + /** \brief Specify the multiplier for used for the targetValue. Default: 0 */ + CIMPP::UnitMultiplier targetValueUnitMultiplier; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/RegulatingControlModeKind.cpp b/CGMES_2.4.15_16FEB2016/RegulatingControlModeKind.cpp index 7ac923d24..e30b5adcc 100644 --- a/CGMES_2.4.15_16FEB2016/RegulatingControlModeKind.cpp +++ b/CGMES_2.4.15_16FEB2016/RegulatingControlModeKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "RegulatingControlModeKind") + if (EnumSymbol.substr(0, pos) != "RegulatingControlModeKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,42 +50,42 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "voltage") + if (EnumSymbol == "voltage") { rop = RegulatingControlModeKind::voltage; return lop; } - if(EnumSymbol == "activePower") + if (EnumSymbol == "activePower") { rop = RegulatingControlModeKind::activePower; return lop; } - if(EnumSymbol == "reactivePower") + if (EnumSymbol == "reactivePower") { rop = RegulatingControlModeKind::reactivePower; return lop; } - if(EnumSymbol == "currentFlow") + if (EnumSymbol == "currentFlow") { rop = RegulatingControlModeKind::currentFlow; return lop; } - if(EnumSymbol == "admittance") + if (EnumSymbol == "admittance") { rop = RegulatingControlModeKind::admittance; return lop; } - if(EnumSymbol == "timeScheduled") + if (EnumSymbol == "timeScheduled") { rop = RegulatingControlModeKind::timeScheduled; return lop; } - if(EnumSymbol == "temperature") + if (EnumSymbol == "temperature") { rop = RegulatingControlModeKind::temperature; return lop; } - if(EnumSymbol == "powerFactor") + if (EnumSymbol == "powerFactor") { rop = RegulatingControlModeKind::powerFactor; return lop; diff --git a/CGMES_2.4.15_16FEB2016/RegulatingControlModeKind.hpp b/CGMES_2.4.15_16FEB2016/RegulatingControlModeKind.hpp index ed5351e3e..d47d046cd 100644 --- a/CGMES_2.4.15_16FEB2016/RegulatingControlModeKind.hpp +++ b/CGMES_2.4.15_16FEB2016/RegulatingControlModeKind.hpp @@ -9,45 +9,27 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The kind of regulation model. For example regulating voltage, reactive power, active power, etc. - */ + /** \brief The kind of regulation model. For example regulating voltage, reactive power, active power, etc. */ class RegulatingControlModeKind { public: enum RegulatingControlModeKind_ENUM { - /** - * Voltage is specified. - */ + /** Voltage is specified. */ voltage, - /** - * Active power is specified. - */ + /** Active power is specified. */ activePower, - /** - * Reactive power is specified. - */ + /** Reactive power is specified. */ reactivePower, - /** - * Current flow is specified. - */ + /** Current flow is specified. */ currentFlow, - /** - * Admittance is specified. - */ + /** Admittance is specified. */ admittance, - /** - * Control switches on/off by time of day. The times may change on the weekend, or in different seasons. - */ + /** Control switches on/off by time of day. The times may change on the weekend, or in different seasons. */ timeScheduled, - /** - * Control switches on/off based on the local temperature (i.e., a thermostat). - */ + /** Control switches on/off based on the local temperature (i.e., a thermostat). */ temperature, - /** - * Power factor is specified. - */ + /** Power factor is specified. */ powerFactor, }; diff --git a/CGMES_2.4.15_16FEB2016/RegulationSchedule.cpp b/CGMES_2.4.15_16FEB2016/RegulationSchedule.cpp index 521188f5f..8750abb1a 100644 --- a/CGMES_2.4.15_16FEB2016/RegulationSchedule.cpp +++ b/CGMES_2.4.15_16FEB2016/RegulationSchedule.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -RegulationSchedule::RegulationSchedule() : RegulatingControl(nullptr) {}; -RegulationSchedule::~RegulationSchedule() {}; +RegulationSchedule::RegulationSchedule() : RegulatingControl(nullptr) {} +RegulationSchedule::~RegulationSchedule() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ RegulationSchedule::getPossibleProfilesForAttributes() const return map; } - - bool assign_RegulatingControl_RegulationSchedule(BaseClass*, BaseClass*); bool assign_RegulationSchedule_RegulatingControl(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_RegulationSchedule_RegulatingControl(BaseClass* BaseClass_ptr1, Base return false; } - bool get_RegulationSchedule_RegulatingControl(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RegulationSchedule* element = dynamic_cast(BaseClass_ptr1)) + const RegulationSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->RegulatingControl != 0) { @@ -73,7 +71,6 @@ bool get_RegulationSchedule_RegulatingControl(const BaseClass* BaseClass_ptr1, s return false; } - const char RegulationSchedule::debugName[] = "RegulationSchedule"; const char* RegulationSchedule::debugString() const { @@ -82,7 +79,7 @@ const char* RegulationSchedule::debugString() const void RegulationSchedule::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RegulationSchedule"), &RegulationSchedule_factory)); + factory_map.emplace("cim:RegulationSchedule", &RegulationSchedule_factory); } void RegulationSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void RegulationSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RegulationSchedule.RegulatingControl"), &assign_RegulationSchedule_RegulatingControl)); + assign_map.emplace("cim:RegulationSchedule.RegulatingControl", &assign_RegulationSchedule_RegulatingControl); } void RegulationSchedule::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/RegulationSchedule.hpp b/CGMES_2.4.15_16FEB2016/RegulationSchedule.hpp index 14d6d58f9..4b0f45cec 100644 --- a/CGMES_2.4.15_16FEB2016/RegulationSchedule.hpp +++ b/CGMES_2.4.15_16FEB2016/RegulationSchedule.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class RegulatingControl; - /* - A pre-established pattern over time for a controlled variable, e.g., busbar voltage. - */ + /** \brief A pre-established pattern over time for a controlled variable, e.g., busbar voltage. */ class RegulationSchedule : public SeasonDayTypeSchedule { public: @@ -27,7 +25,8 @@ namespace CIMPP RegulationSchedule(); ~RegulationSchedule() override; - CIMPP::RegulatingControl* RegulatingControl; /* Regulating controls that have this Schedule. Default: 0 */ + /** \brief Regulating controls that have this Schedule. Default: 0 */ + CIMPP::RegulatingControl* RegulatingControl; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/RemoteInputSignal.cpp b/CGMES_2.4.15_16FEB2016/RemoteInputSignal.cpp index f5926461c..f187b941e 100644 --- a/CGMES_2.4.15_16FEB2016/RemoteInputSignal.cpp +++ b/CGMES_2.4.15_16FEB2016/RemoteInputSignal.cpp @@ -17,12 +17,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindPlantDynamics.hpp" #include "WindTurbineType1or2Dynamics.hpp" #include "WindTurbineType3or4Dynamics.hpp" -#include "RemoteSignalKind.hpp" using namespace CIMPP; -RemoteInputSignal::RemoteInputSignal() : DiscontinuousExcitationControlDynamics(nullptr), PFVArControllerType1Dynamics(nullptr), PowerSystemStabilizerDynamics(nullptr), Terminal(nullptr), UnderexcitationLimiterDynamics(nullptr), VoltageCompensatorDynamics(nullptr), WindPlantDynamics(nullptr), WindTurbineType1or2Dynamics(nullptr), WindTurbineType3or4Dynamics(nullptr) {}; -RemoteInputSignal::~RemoteInputSignal() {}; +RemoteInputSignal::RemoteInputSignal() : DiscontinuousExcitationControlDynamics(nullptr), PFVArControllerType1Dynamics(nullptr), PowerSystemStabilizerDynamics(nullptr), Terminal(nullptr), UnderexcitationLimiterDynamics(nullptr), VoltageCompensatorDynamics(nullptr), WindPlantDynamics(nullptr), WindTurbineType1or2Dynamics(nullptr), WindTurbineType3or4Dynamics(nullptr) {} +RemoteInputSignal::~RemoteInputSignal() {} static const std::list PossibleProfilesForClass = { @@ -58,21 +57,6 @@ RemoteInputSignal::getPossibleProfilesForAttributes() const return map; } - -bool assign_RemoteInputSignal_remoteSignalType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->remoteSignalType; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_DiscontinuousExcitationControlDynamics_RemoteInputSignal(BaseClass*, BaseClass*); bool assign_RemoteInputSignal_DiscontinuousExcitationControlDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -89,6 +73,7 @@ bool assign_RemoteInputSignal_DiscontinuousExcitationControlDynamics(BaseClass* } return false; } + bool assign_PFVArControllerType1Dynamics_RemoteInputSignal(BaseClass*, BaseClass*); bool assign_RemoteInputSignal_PFVArControllerType1Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -105,6 +90,7 @@ bool assign_RemoteInputSignal_PFVArControllerType1Dynamics(BaseClass* BaseClass_ } return false; } + bool assign_PowerSystemStabilizerDynamics_RemoteInputSignal(BaseClass*, BaseClass*); bool assign_RemoteInputSignal_PowerSystemStabilizerDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -121,6 +107,7 @@ bool assign_RemoteInputSignal_PowerSystemStabilizerDynamics(BaseClass* BaseClass } return false; } + bool assign_Terminal_RemoteInputSignal(BaseClass*, BaseClass*); bool assign_RemoteInputSignal_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -137,6 +124,7 @@ bool assign_RemoteInputSignal_Terminal(BaseClass* BaseClass_ptr1, BaseClass* Bas } return false; } + bool assign_UnderexcitationLimiterDynamics_RemoteInputSignal(BaseClass*, BaseClass*); bool assign_RemoteInputSignal_UnderexcitationLimiterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -153,6 +141,7 @@ bool assign_RemoteInputSignal_UnderexcitationLimiterDynamics(BaseClass* BaseClas } return false; } + bool assign_VoltageCompensatorDynamics_RemoteInputSignal(BaseClass*, BaseClass*); bool assign_RemoteInputSignal_VoltageCompensatorDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -169,6 +158,7 @@ bool assign_RemoteInputSignal_VoltageCompensatorDynamics(BaseClass* BaseClass_pt } return false; } + bool assign_WindPlantDynamics_RemoteInputSignal(BaseClass*, BaseClass*); bool assign_RemoteInputSignal_WindPlantDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -185,6 +175,7 @@ bool assign_RemoteInputSignal_WindPlantDynamics(BaseClass* BaseClass_ptr1, BaseC } return false; } + bool assign_WindTurbineType1or2Dynamics_RemoteInputSignal(BaseClass*, BaseClass*); bool assign_RemoteInputSignal_WindTurbineType1or2Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -201,6 +192,7 @@ bool assign_RemoteInputSignal_WindTurbineType1or2Dynamics(BaseClass* BaseClass_p } return false; } + bool assign_WindTurbineType3or4Dynamics_RemoteInputSignal(BaseClass*, BaseClass*); bool assign_RemoteInputSignal_WindTurbineType3or4Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -218,10 +210,24 @@ bool assign_RemoteInputSignal_WindTurbineType3or4Dynamics(BaseClass* BaseClass_p return false; } +bool assign_RemoteInputSignal_remoteSignalType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->remoteSignalType; + if (!buffer.fail()) + { + return true; + } + } + return false; +} bool get_RemoteInputSignal_DiscontinuousExcitationControlDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1)) + const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DiscontinuousExcitationControlDynamics != 0) { @@ -234,7 +240,8 @@ bool get_RemoteInputSignal_DiscontinuousExcitationControlDynamics(const BaseClas bool get_RemoteInputSignal_PFVArControllerType1Dynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1)) + const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PFVArControllerType1Dynamics != 0) { @@ -247,7 +254,8 @@ bool get_RemoteInputSignal_PFVArControllerType1Dynamics(const BaseClass* BaseCla bool get_RemoteInputSignal_PowerSystemStabilizerDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1)) + const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PowerSystemStabilizerDynamics != 0) { @@ -260,7 +268,8 @@ bool get_RemoteInputSignal_PowerSystemStabilizerDynamics(const BaseClass* BaseCl bool get_RemoteInputSignal_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1)) + const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Terminal != 0) { @@ -273,7 +282,8 @@ bool get_RemoteInputSignal_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1)) + const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->UnderexcitationLimiterDynamics != 0) { @@ -286,7 +296,8 @@ bool get_RemoteInputSignal_UnderexcitationLimiterDynamics(const BaseClass* BaseC bool get_RemoteInputSignal_VoltageCompensatorDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1)) + const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->VoltageCompensatorDynamics != 0) { @@ -298,9 +309,12 @@ bool get_RemoteInputSignal_VoltageCompensatorDynamics(const BaseClass* BaseClass } + + bool get_RemoteInputSignal_remoteSignalType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1)) + const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->remoteSignalType; if (!buffer.str().empty()) @@ -320,25 +334,25 @@ const char* RemoteInputSignal::debugString() const void RemoteInputSignal::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RemoteInputSignal"), &RemoteInputSignal_factory)); + factory_map.emplace("cim:RemoteInputSignal", &RemoteInputSignal_factory); } void RemoteInputSignal::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.remoteSignalType"), &assign_RemoteInputSignal_remoteSignalType)); + assign_map.emplace("cim:RemoteInputSignal.remoteSignalType", &assign_RemoteInputSignal_remoteSignalType); } void RemoteInputSignal::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.DiscontinuousExcitationControlDynamics"), &assign_RemoteInputSignal_DiscontinuousExcitationControlDynamics)); - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.PFVArControllerType1Dynamics"), &assign_RemoteInputSignal_PFVArControllerType1Dynamics)); - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.PowerSystemStabilizerDynamics"), &assign_RemoteInputSignal_PowerSystemStabilizerDynamics)); - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.Terminal"), &assign_RemoteInputSignal_Terminal)); - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.UnderexcitationLimiterDynamics"), &assign_RemoteInputSignal_UnderexcitationLimiterDynamics)); - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.VoltageCompensatorDynamics"), &assign_RemoteInputSignal_VoltageCompensatorDynamics)); - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.WindPlantDynamics"), &assign_RemoteInputSignal_WindPlantDynamics)); - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.WindTurbineType1or2Dynamics"), &assign_RemoteInputSignal_WindTurbineType1or2Dynamics)); - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.WindTurbineType3or4Dynamics"), &assign_RemoteInputSignal_WindTurbineType3or4Dynamics)); + assign_map.emplace("cim:RemoteInputSignal.DiscontinuousExcitationControlDynamics", &assign_RemoteInputSignal_DiscontinuousExcitationControlDynamics); + assign_map.emplace("cim:RemoteInputSignal.PFVArControllerType1Dynamics", &assign_RemoteInputSignal_PFVArControllerType1Dynamics); + assign_map.emplace("cim:RemoteInputSignal.PowerSystemStabilizerDynamics", &assign_RemoteInputSignal_PowerSystemStabilizerDynamics); + assign_map.emplace("cim:RemoteInputSignal.Terminal", &assign_RemoteInputSignal_Terminal); + assign_map.emplace("cim:RemoteInputSignal.UnderexcitationLimiterDynamics", &assign_RemoteInputSignal_UnderexcitationLimiterDynamics); + assign_map.emplace("cim:RemoteInputSignal.VoltageCompensatorDynamics", &assign_RemoteInputSignal_VoltageCompensatorDynamics); + assign_map.emplace("cim:RemoteInputSignal.WindPlantDynamics", &assign_RemoteInputSignal_WindPlantDynamics); + assign_map.emplace("cim:RemoteInputSignal.WindTurbineType1or2Dynamics", &assign_RemoteInputSignal_WindTurbineType1or2Dynamics); + assign_map.emplace("cim:RemoteInputSignal.WindTurbineType3or4Dynamics", &assign_RemoteInputSignal_WindTurbineType3or4Dynamics); } void RemoteInputSignal::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/RemoteInputSignal.hpp b/CGMES_2.4.15_16FEB2016/RemoteInputSignal.hpp index 30da288a7..f33baab80 100644 --- a/CGMES_2.4.15_16FEB2016/RemoteInputSignal.hpp +++ b/CGMES_2.4.15_16FEB2016/RemoteInputSignal.hpp @@ -26,9 +26,7 @@ namespace CIMPP class WindTurbineType1or2Dynamics; class WindTurbineType3or4Dynamics; - /* - Supports connection to a terminal associated with a remote bus from which an input signal of a specific type is coming. - */ + /** \brief Supports connection to a terminal associated with a remote bus from which an input signal of a specific type is coming. */ class RemoteInputSignal : public IdentifiedObject { public: @@ -36,16 +34,35 @@ namespace CIMPP RemoteInputSignal(); ~RemoteInputSignal() override; - CIMPP::DiscontinuousExcitationControlDynamics* DiscontinuousExcitationControlDynamics; /* Discontinuous excitation control model using this remote input signal. Default: 0 */ - CIMPP::PFVArControllerType1Dynamics* PFVArControllerType1Dynamics; /* Power Factor or VAr controller Type I model using this remote input signal. Default: 0 */ - CIMPP::PowerSystemStabilizerDynamics* PowerSystemStabilizerDynamics; /* Power system stabilizer model using this remote input signal. Default: 0 */ - CIMPP::Terminal* Terminal; /* Remote terminal with which this input signal is associated. Default: 0 */ - CIMPP::UnderexcitationLimiterDynamics* UnderexcitationLimiterDynamics; /* Underexcitation limiter model using this remote input signal. Default: 0 */ - CIMPP::VoltageCompensatorDynamics* VoltageCompensatorDynamics; /* Voltage compensator model using this remote input signal. Default: 0 */ - CIMPP::WindPlantDynamics* WindPlantDynamics; /* The remote signal with which this power plant is associated. Default: 0 */ - CIMPP::WindTurbineType1or2Dynamics* WindTurbineType1or2Dynamics; /* Wind generator Type 1 or Type 2 model using this remote input signal. Default: 0 */ - CIMPP::WindTurbineType3or4Dynamics* WindTurbineType3or4Dynamics; /* Remote input signal used by these wind turbine Type 3 or 4 models. Default: 0 */ - CIMPP::RemoteSignalKind remoteSignalType; /* Type of input signal. Default: 0 */ + /** \brief Discontinuous excitation control model using this remote input signal. Default: 0 */ + CIMPP::DiscontinuousExcitationControlDynamics* DiscontinuousExcitationControlDynamics; + + /** \brief Power Factor or VAr controller Type I model using this remote input signal. Default: 0 */ + CIMPP::PFVArControllerType1Dynamics* PFVArControllerType1Dynamics; + + /** \brief Power system stabilizer model using this remote input signal. Default: 0 */ + CIMPP::PowerSystemStabilizerDynamics* PowerSystemStabilizerDynamics; + + /** \brief Remote terminal with which this input signal is associated. Default: 0 */ + CIMPP::Terminal* Terminal; + + /** \brief Underexcitation limiter model using this remote input signal. Default: 0 */ + CIMPP::UnderexcitationLimiterDynamics* UnderexcitationLimiterDynamics; + + /** \brief Voltage compensator model using this remote input signal. Default: 0 */ + CIMPP::VoltageCompensatorDynamics* VoltageCompensatorDynamics; + + /** \brief The remote signal with which this power plant is associated. Default: 0 */ + CIMPP::WindPlantDynamics* WindPlantDynamics; + + /** \brief Wind generator Type 1 or Type 2 model using this remote input signal. Default: 0 */ + CIMPP::WindTurbineType1or2Dynamics* WindTurbineType1or2Dynamics; + + /** \brief Remote input signal used by these wind turbine Type 3 or 4 models. Default: 0 */ + CIMPP::WindTurbineType3or4Dynamics* WindTurbineType3or4Dynamics; + + /** \brief Type of input signal. Default: 0 */ + CIMPP::RemoteSignalKind remoteSignalType; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/RemoteSignalKind.cpp b/CGMES_2.4.15_16FEB2016/RemoteSignalKind.cpp index e1cd4d2e7..a5b95bd01 100644 --- a/CGMES_2.4.15_16FEB2016/RemoteSignalKind.cpp +++ b/CGMES_2.4.15_16FEB2016/RemoteSignalKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "RemoteSignalKind") + if (EnumSymbol.substr(0, pos) != "RemoteSignalKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,47 +50,47 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "remoteBusVoltageFrequency") + if (EnumSymbol == "remoteBusVoltageFrequency") { rop = RemoteSignalKind::remoteBusVoltageFrequency; return lop; } - if(EnumSymbol == "remoteBusVoltageFrequencyDeviation") + if (EnumSymbol == "remoteBusVoltageFrequencyDeviation") { rop = RemoteSignalKind::remoteBusVoltageFrequencyDeviation; return lop; } - if(EnumSymbol == "remoteBusFrequency") + if (EnumSymbol == "remoteBusFrequency") { rop = RemoteSignalKind::remoteBusFrequency; return lop; } - if(EnumSymbol == "remoteBusFrequencyDeviation") + if (EnumSymbol == "remoteBusFrequencyDeviation") { rop = RemoteSignalKind::remoteBusFrequencyDeviation; return lop; } - if(EnumSymbol == "remoteBusVoltageAmplitude") + if (EnumSymbol == "remoteBusVoltageAmplitude") { rop = RemoteSignalKind::remoteBusVoltageAmplitude; return lop; } - if(EnumSymbol == "remoteBusVoltage") + if (EnumSymbol == "remoteBusVoltage") { rop = RemoteSignalKind::remoteBusVoltage; return lop; } - if(EnumSymbol == "remoteBranchCurrentAmplitude") + if (EnumSymbol == "remoteBranchCurrentAmplitude") { rop = RemoteSignalKind::remoteBranchCurrentAmplitude; return lop; } - if(EnumSymbol == "remoteBusVoltageAmplitudeDerivative") + if (EnumSymbol == "remoteBusVoltageAmplitudeDerivative") { rop = RemoteSignalKind::remoteBusVoltageAmplitudeDerivative; return lop; } - if(EnumSymbol == "remotePuBusVoltageDerivative") + if (EnumSymbol == "remotePuBusVoltageDerivative") { rop = RemoteSignalKind::remotePuBusVoltageDerivative; return lop; diff --git a/CGMES_2.4.15_16FEB2016/RemoteSignalKind.hpp b/CGMES_2.4.15_16FEB2016/RemoteSignalKind.hpp index 17a1358d3..ebdf3d268 100644 --- a/CGMES_2.4.15_16FEB2016/RemoteSignalKind.hpp +++ b/CGMES_2.4.15_16FEB2016/RemoteSignalKind.hpp @@ -9,49 +9,29 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of input signal coming from remote bus. - */ + /** \brief Type of input signal coming from remote bus. */ class RemoteSignalKind { public: enum RemoteSignalKind_ENUM { - /** - * Input is voltage frequency from remote terminal bus. - */ + /** Input is voltage frequency from remote terminal bus. */ remoteBusVoltageFrequency, - /** - * Input is voltage frequency deviation from remote terminal bus. - */ + /** Input is voltage frequency deviation from remote terminal bus. */ remoteBusVoltageFrequencyDeviation, - /** - * Input is frequency from remote terminal bus. - */ + /** Input is frequency from remote terminal bus. */ remoteBusFrequency, - /** - * Input is frequency deviation from remote terminal bus. - */ + /** Input is frequency deviation from remote terminal bus. */ remoteBusFrequencyDeviation, - /** - * Input is voltage amplitude from remote terminal bus. - */ + /** Input is voltage amplitude from remote terminal bus. */ remoteBusVoltageAmplitude, - /** - * Input is voltage from remote terminal bus. - */ + /** Input is voltage from remote terminal bus. */ remoteBusVoltage, - /** - * Input is branch current amplitude from remote terminal bus. - */ + /** Input is branch current amplitude from remote terminal bus. */ remoteBranchCurrentAmplitude, - /** - * Input is branch current amplitude derivative from remote terminal bus. - */ + /** Input is branch current amplitude derivative from remote terminal bus. */ remoteBusVoltageAmplitudeDerivative, - /** - * Input is PU voltage derivative from remote terminal bus. - */ + /** Input is PU voltage derivative from remote terminal bus. */ remotePuBusVoltageDerivative, }; diff --git a/CGMES_2.4.15_16FEB2016/ReportingGroup.cpp b/CGMES_2.4.15_16FEB2016/ReportingGroup.cpp index bb65d3090..5a8463cce 100644 --- a/CGMES_2.4.15_16FEB2016/ReportingGroup.cpp +++ b/CGMES_2.4.15_16FEB2016/ReportingGroup.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ReportingGroup::ReportingGroup() {}; -ReportingGroup::~ReportingGroup() {}; +ReportingGroup::ReportingGroup() {} +ReportingGroup::~ReportingGroup() {} static const std::list PossibleProfilesForClass = { @@ -43,8 +43,6 @@ ReportingGroup::getPossibleProfilesForAttributes() const return map; } - - bool assign_BusNameMarker_ReportingGroup(BaseClass*, BaseClass*); bool assign_ReportingGroup_BusNameMarker(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,6 +59,7 @@ bool assign_ReportingGroup_BusNameMarker(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_TopologicalNode_ReportingGroup(BaseClass*, BaseClass*); bool assign_ReportingGroup_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -88,7 +87,7 @@ const char* ReportingGroup::debugString() const void ReportingGroup::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ReportingGroup"), &ReportingGroup_factory)); + factory_map.emplace("cim:ReportingGroup", &ReportingGroup_factory); } void ReportingGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -97,8 +96,8 @@ void ReportingGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ReportingGroup.BusNameMarker"), &assign_ReportingGroup_BusNameMarker)); - assign_map.insert(std::make_pair(std::string("cim:ReportingGroup.TopologicalNode"), &assign_ReportingGroup_TopologicalNode)); + assign_map.emplace("cim:ReportingGroup.BusNameMarker", &assign_ReportingGroup_BusNameMarker); + assign_map.emplace("cim:ReportingGroup.TopologicalNode", &assign_ReportingGroup_TopologicalNode); } void ReportingGroup::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/ReportingGroup.hpp b/CGMES_2.4.15_16FEB2016/ReportingGroup.hpp index ddefec6f2..bed31d9d8 100644 --- a/CGMES_2.4.15_16FEB2016/ReportingGroup.hpp +++ b/CGMES_2.4.15_16FEB2016/ReportingGroup.hpp @@ -18,9 +18,7 @@ namespace CIMPP class BusNameMarker; class TopologicalNode; - /* - A reporting group is used for various ad-hoc groupings used for reporting. - */ + /** \brief A reporting group is used for various ad-hoc groupings used for reporting. */ class ReportingGroup : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP ReportingGroup(); ~ReportingGroup() override; - std::list BusNameMarker; /* The reporting group to which this bus name marker belongs. Default: 0 */ - std::list TopologicalNode; /* The reporting group to which the topological node belongs. Default: 0 */ + /** \brief The reporting group to which this bus name marker belongs. Default: 0 */ + std::list BusNameMarker; + + /** \brief The reporting group to which the topological node belongs. Default: 0 */ + std::list TopologicalNode; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Resistance.hpp b/CGMES_2.4.15_16FEB2016/Resistance.hpp index cd68a214f..ebb467d82 100644 --- a/CGMES_2.4.15_16FEB2016/Resistance.hpp +++ b/CGMES_2.4.15_16FEB2016/Resistance.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Resistance (real part of impedance). - */ + /** \brief Resistance (real part of impedance). */ class Resistance { public: diff --git a/CGMES_2.4.15_16FEB2016/ResistancePerLength.hpp b/CGMES_2.4.15_16FEB2016/ResistancePerLength.hpp index dc8f5da8d..e87d6316a 100644 --- a/CGMES_2.4.15_16FEB2016/ResistancePerLength.hpp +++ b/CGMES_2.4.15_16FEB2016/ResistancePerLength.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Resistance (real part of impedance) per unit of length. - */ + /** \brief Resistance (real part of impedance) per unit of length. */ class ResistancePerLength { public: diff --git a/CGMES_2.4.15_16FEB2016/RotatingMachine.cpp b/CGMES_2.4.15_16FEB2016/RotatingMachine.cpp index c36cd704f..167772853 100644 --- a/CGMES_2.4.15_16FEB2016/RotatingMachine.cpp +++ b/CGMES_2.4.15_16FEB2016/RotatingMachine.cpp @@ -10,16 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "GeneratingUnit.hpp" #include "HydroPump.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" -#include "Simple_Float.hpp" -#include "ApparentPower.hpp" -#include "Voltage.hpp" using namespace CIMPP; -RotatingMachine::RotatingMachine() : GeneratingUnit(nullptr), HydroPump(nullptr) {}; -RotatingMachine::~RotatingMachine() {}; +RotatingMachine::RotatingMachine() : GeneratingUnit(nullptr), HydroPump(nullptr) {} +RotatingMachine::~RotatingMachine() {} static const std::list PossibleProfilesForClass = { @@ -54,109 +49,129 @@ RotatingMachine::getPossibleProfilesForAttributes() const return map; } +bool assign_GeneratingUnit_RotatingMachine(BaseClass*, BaseClass*); +bool assign_RotatingMachine_GeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + GeneratingUnit* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->GeneratingUnit != element2) + { + element->GeneratingUnit = element2; + return assign_GeneratingUnit_RotatingMachine(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_RotatingMachine_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_HydroPump_RotatingMachine(BaseClass*, BaseClass*); +bool assign_RotatingMachine_HydroPump(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + HydroPump* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->p; - if (buffer.fail()) - return false; - else - return true; + if (element->HydroPump != element2) + { + element->HydroPump = element2; + return assign_HydroPump_RotatingMachine(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_RotatingMachine_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachine_p(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->q; - if (buffer.fail()) - return false; - else + buffer >> element->p; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RotatingMachine_ratedPowerFactor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachine_q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->ratedPowerFactor; - if (buffer.fail()) - return false; - else + buffer >> element->q; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RotatingMachine_ratedS(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachine_ratedPowerFactor(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->ratedS; - if (buffer.fail()) - return false; - else + buffer >> element->ratedPowerFactor; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RotatingMachine_ratedU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachine_ratedS(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->ratedU; - if (buffer.fail()) - return false; - else + buffer >> element->ratedS; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_GeneratingUnit_RotatingMachine(BaseClass*, BaseClass*); -bool assign_RotatingMachine_GeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_RotatingMachine_ratedU(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { RotatingMachine* element = dynamic_cast(BaseClass_ptr1); - GeneratingUnit* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->GeneratingUnit != element2) + buffer >> element->ratedU; + if (!buffer.fail()) { - element->GeneratingUnit = element2; - return assign_GeneratingUnit_RotatingMachine(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_HydroPump_RotatingMachine(BaseClass*, BaseClass*); -bool assign_RotatingMachine_HydroPump(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool get_RotatingMachine_GeneratingUnit(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - RotatingMachine* element = dynamic_cast(BaseClass_ptr1); - HydroPump* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->HydroPump != element2) + if (element->GeneratingUnit != 0) { - element->HydroPump = element2; - return assign_HydroPump_RotatingMachine(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->GeneratingUnit); + return true; } - return true; } return false; } + bool get_RotatingMachine_p(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p; if (!buffer.str().empty()) @@ -170,7 +185,8 @@ bool get_RotatingMachine_p(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_RotatingMachine_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q; if (!buffer.str().empty()) @@ -184,7 +200,8 @@ bool get_RotatingMachine_q(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_RotatingMachine_ratedPowerFactor(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedPowerFactor; if (!buffer.str().empty()) @@ -198,7 +215,8 @@ bool get_RotatingMachine_ratedPowerFactor(const BaseClass* BaseClass_ptr1, std:: bool get_RotatingMachine_ratedS(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedS; if (!buffer.str().empty()) @@ -212,7 +230,8 @@ bool get_RotatingMachine_ratedS(const BaseClass* BaseClass_ptr1, std::stringstre bool get_RotatingMachine_ratedU(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedU; if (!buffer.str().empty()) @@ -224,21 +243,6 @@ bool get_RotatingMachine_ratedU(const BaseClass* BaseClass_ptr1, std::stringstre return false; } - -bool get_RotatingMachine_GeneratingUnit(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->GeneratingUnit != 0) - { - BaseClass_list.push_back(element->GeneratingUnit); - return true; - } - } - return false; -} - - const char RotatingMachine::debugName[] = "RotatingMachine"; const char* RotatingMachine::debugString() const { @@ -247,22 +251,22 @@ const char* RotatingMachine::debugString() const void RotatingMachine::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RotatingMachine"), &RotatingMachine_factory)); + factory_map.emplace("cim:RotatingMachine", &RotatingMachine_factory); } void RotatingMachine::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RotatingMachine.p"), &assign_RotatingMachine_p)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachine.q"), &assign_RotatingMachine_q)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachine.ratedPowerFactor"), &assign_RotatingMachine_ratedPowerFactor)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachine.ratedS"), &assign_RotatingMachine_ratedS)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachine.ratedU"), &assign_RotatingMachine_ratedU)); + assign_map.emplace("cim:RotatingMachine.p", &assign_RotatingMachine_p); + assign_map.emplace("cim:RotatingMachine.q", &assign_RotatingMachine_q); + assign_map.emplace("cim:RotatingMachine.ratedPowerFactor", &assign_RotatingMachine_ratedPowerFactor); + assign_map.emplace("cim:RotatingMachine.ratedS", &assign_RotatingMachine_ratedS); + assign_map.emplace("cim:RotatingMachine.ratedU", &assign_RotatingMachine_ratedU); } void RotatingMachine::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RotatingMachine.GeneratingUnit"), &assign_RotatingMachine_GeneratingUnit)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachine.HydroPump"), &assign_RotatingMachine_HydroPump)); + assign_map.emplace("cim:RotatingMachine.GeneratingUnit", &assign_RotatingMachine_GeneratingUnit); + assign_map.emplace("cim:RotatingMachine.HydroPump", &assign_RotatingMachine_HydroPump); } void RotatingMachine::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/RotatingMachine.hpp b/CGMES_2.4.15_16FEB2016/RotatingMachine.hpp index 14a963aad..94e3078ed 100644 --- a/CGMES_2.4.15_16FEB2016/RotatingMachine.hpp +++ b/CGMES_2.4.15_16FEB2016/RotatingMachine.hpp @@ -23,9 +23,7 @@ namespace CIMPP class GeneratingUnit; class HydroPump; - /* - A rotating machine which may be used as a generator or motor. - */ + /** \brief A rotating machine which may be used as a generator or motor. */ class RotatingMachine : public RegulatingCondEq { public: @@ -33,13 +31,26 @@ namespace CIMPP RotatingMachine(); ~RotatingMachine() override; - CIMPP::GeneratingUnit* GeneratingUnit; /* A synchronous machine may operate as a generator and as such becomes a member of a generating unit. Default: 0 */ - CIMPP::HydroPump* HydroPump; /* The synchronous machine drives the turbine which moves the water from a low elevation to a higher elevation. The direction of machine rotation for pumping may or may not be the same as for generating. Default: 0 */ - CIMPP::ActivePower p; /* Active power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution. Default: nullptr */ - CIMPP::ReactivePower q; /* Reactive power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution. Default: nullptr */ - CIMPP::Simple_Float ratedPowerFactor; /* Power factor (nameplate data). It is primarily used for short circuit data exchange according to IEC 60909. Default: nullptr */ - CIMPP::ApparentPower ratedS; /* Nameplate apparent power rating for the unit. The attribute shall have a positive value. Default: nullptr */ - CIMPP::Voltage ratedU; /* Rated voltage (nameplate data, Ur in IEC 60909-0). It is primarily used for short circuit data exchange according to IEC 60909. Default: nullptr */ + /** \brief A synchronous machine may operate as a generator and as such becomes a member of a generating unit. Default: 0 */ + CIMPP::GeneratingUnit* GeneratingUnit; + + /** \brief The synchronous machine drives the turbine which moves the water from a low elevation to a higher elevation. The direction of machine rotation for pumping may or may not be the same as for generating. Default: 0 */ + CIMPP::HydroPump* HydroPump; + + /** \brief Active power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution. Default: nullptr */ + CIMPP::ActivePower p; + + /** \brief Reactive power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution. Default: nullptr */ + CIMPP::ReactivePower q; + + /** \brief Power factor (nameplate data). It is primarily used for short circuit data exchange according to IEC 60909. Default: nullptr */ + CIMPP::Simple_Float ratedPowerFactor; + + /** \brief Nameplate apparent power rating for the unit. The attribute shall have a positive value. Default: nullptr */ + CIMPP::ApparentPower ratedS; + + /** \brief Rated voltage (nameplate data, Ur in IEC 60909-0). It is primarily used for short circuit data exchange according to IEC 60909. Default: nullptr */ + CIMPP::Voltage ratedU; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/RotatingMachineDynamics.cpp b/CGMES_2.4.15_16FEB2016/RotatingMachineDynamics.cpp index 81cc6d9d1..57dd9d608 100644 --- a/CGMES_2.4.15_16FEB2016/RotatingMachineDynamics.cpp +++ b/CGMES_2.4.15_16FEB2016/RotatingMachineDynamics.cpp @@ -8,17 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -RotatingMachineDynamics::RotatingMachineDynamics() {}; -RotatingMachineDynamics::~RotatingMachineDynamics() {}; +RotatingMachineDynamics::RotatingMachineDynamics() {} +RotatingMachineDynamics::~RotatingMachineDynamics() {} static const std::list PossibleProfilesForClass = { @@ -50,90 +44,94 @@ RotatingMachineDynamics::getPossibleProfilesForAttributes() const return map; } - -bool assign_RotatingMachineDynamics_damping(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachineDynamics_damping(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->damping; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RotatingMachineDynamics_inertia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachineDynamics_inertia(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inertia; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RotatingMachineDynamics_saturationFactor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachineDynamics_saturationFactor(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->saturationFactor; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RotatingMachineDynamics_saturationFactor120(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachineDynamics_saturationFactor120(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->saturationFactor120; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RotatingMachineDynamics_statorLeakageReactance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachineDynamics_statorLeakageReactance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->statorLeakageReactance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RotatingMachineDynamics_statorResistance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachineDynamics_statorResistance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->statorResistance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_RotatingMachineDynamics_damping(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->damping; if (!buffer.str().empty()) @@ -147,7 +145,8 @@ bool get_RotatingMachineDynamics_damping(const BaseClass* BaseClass_ptr1, std::s bool get_RotatingMachineDynamics_inertia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inertia; if (!buffer.str().empty()) @@ -161,7 +160,8 @@ bool get_RotatingMachineDynamics_inertia(const BaseClass* BaseClass_ptr1, std::s bool get_RotatingMachineDynamics_saturationFactor(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->saturationFactor; if (!buffer.str().empty()) @@ -175,7 +175,8 @@ bool get_RotatingMachineDynamics_saturationFactor(const BaseClass* BaseClass_ptr bool get_RotatingMachineDynamics_saturationFactor120(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->saturationFactor120; if (!buffer.str().empty()) @@ -189,7 +190,8 @@ bool get_RotatingMachineDynamics_saturationFactor120(const BaseClass* BaseClass_ bool get_RotatingMachineDynamics_statorLeakageReactance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->statorLeakageReactance; if (!buffer.str().empty()) @@ -203,7 +205,8 @@ bool get_RotatingMachineDynamics_statorLeakageReactance(const BaseClass* BaseCla bool get_RotatingMachineDynamics_statorResistance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->statorResistance; if (!buffer.str().empty()) @@ -215,8 +218,6 @@ bool get_RotatingMachineDynamics_statorResistance(const BaseClass* BaseClass_ptr return false; } - - const char RotatingMachineDynamics::debugName[] = "RotatingMachineDynamics"; const char* RotatingMachineDynamics::debugString() const { @@ -225,17 +226,17 @@ const char* RotatingMachineDynamics::debugString() const void RotatingMachineDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RotatingMachineDynamics"), &RotatingMachineDynamics_factory)); + factory_map.emplace("cim:RotatingMachineDynamics", &RotatingMachineDynamics_factory); } void RotatingMachineDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RotatingMachineDynamics.damping"), &assign_RotatingMachineDynamics_damping)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachineDynamics.inertia"), &assign_RotatingMachineDynamics_inertia)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachineDynamics.saturationFactor"), &assign_RotatingMachineDynamics_saturationFactor)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachineDynamics.saturationFactor120"), &assign_RotatingMachineDynamics_saturationFactor120)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachineDynamics.statorLeakageReactance"), &assign_RotatingMachineDynamics_statorLeakageReactance)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachineDynamics.statorResistance"), &assign_RotatingMachineDynamics_statorResistance)); + assign_map.emplace("cim:RotatingMachineDynamics.damping", &assign_RotatingMachineDynamics_damping); + assign_map.emplace("cim:RotatingMachineDynamics.inertia", &assign_RotatingMachineDynamics_inertia); + assign_map.emplace("cim:RotatingMachineDynamics.saturationFactor", &assign_RotatingMachineDynamics_saturationFactor); + assign_map.emplace("cim:RotatingMachineDynamics.saturationFactor120", &assign_RotatingMachineDynamics_saturationFactor120); + assign_map.emplace("cim:RotatingMachineDynamics.statorLeakageReactance", &assign_RotatingMachineDynamics_statorLeakageReactance); + assign_map.emplace("cim:RotatingMachineDynamics.statorResistance", &assign_RotatingMachineDynamics_statorResistance); } void RotatingMachineDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/RotatingMachineDynamics.hpp b/CGMES_2.4.15_16FEB2016/RotatingMachineDynamics.hpp index b6a308942..97a2d57c7 100644 --- a/CGMES_2.4.15_16FEB2016/RotatingMachineDynamics.hpp +++ b/CGMES_2.4.15_16FEB2016/RotatingMachineDynamics.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Abstract parent class for all synchronous and asynchronous machine standard models. - */ + /** \brief Abstract parent class for all synchronous and asynchronous machine standard models. */ class RotatingMachineDynamics : public DynamicsFunctionBlock { public: @@ -29,12 +27,23 @@ namespace CIMPP RotatingMachineDynamics(); ~RotatingMachineDynamics() override; - CIMPP::Simple_Float damping; /* Damping torque coefficient (D). A proportionality constant that, when multiplied by the angular velocity of the rotor poles with respect to the magnetic field (frequency), results in the damping torque. This value is often zero when the sources of damping torques (generator damper windings, load damping effects, etc.) are modelled in detail. Typical Value = 0. Default: nullptr */ - CIMPP::Seconds inertia; /* Inertia constant of generator or motor and mechanical load (H) (>0). This is the specification for the stored energy in the rotating mass when operating at rated speed. For a generator, this includes the generator plus all other elements (turbine, exciter) on the same shaft and has units of MW*sec. For a motor, it includes the motor plus its mechanical load. Conventional units are per unit on the generator MVA base, usually expressed as MW*second/MVA or just second. This value is used in the accelerating power reference frame for operator training simulator solutions. Typical Value = 3. Default: nullptr */ - CIMPP::Simple_Float saturationFactor; /* Saturation factor at rated terminal voltage (S1) (> or =0). Not used by simplified model. Defined by defined by S(E1) in the SynchronousMachineSaturationParameters diagram. Typical Value = 0.02. Default: nullptr */ - CIMPP::Simple_Float saturationFactor120; /* Saturation factor at 120% of rated terminal voltage (S12) (> or =S1). Not used by the simplified model, defined by S(E2) in the SynchronousMachineSaturationParameters diagram. Typical Value = 0.12. Default: nullptr */ - CIMPP::PU statorLeakageReactance; /* Stator leakage reactance (Xl) (> or =0). Typical Value = 0.15. Default: nullptr */ - CIMPP::PU statorResistance; /* Stator (armature) resistance (Rs) (> or =0). Typical Value = 0.005. Default: nullptr */ + /** \brief Damping torque coefficient (D). A proportionality constant that, when multiplied by the angular velocity of the rotor poles with respect to the magnetic field (frequency), results in the damping torque. This value is often zero when the sources of damping torques (generator damper windings, load damping effects, etc.) are modelled in detail. Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float damping; + + /** \brief Inertia constant of generator or motor and mechanical load (H) (>0). This is the specification for the stored energy in the rotating mass when operating at rated speed. For a generator, this includes the generator plus all other elements (turbine, exciter) on the same shaft and has units of MW*sec. For a motor, it includes the motor plus its mechanical load. Conventional units are per unit on the generator MVA base, usually expressed as MW*second/MVA or just second. This value is used in the accelerating power reference frame for operator training simulator solutions. Typical Value = 3. Default: nullptr */ + CIMPP::Seconds inertia; + + /** \brief Saturation factor at rated terminal voltage (S1) (> or =0). Not used by simplified model. Defined by defined by S(E1) in the SynchronousMachineSaturationParameters diagram. Typical Value = 0.02. Default: nullptr */ + CIMPP::Simple_Float saturationFactor; + + /** \brief Saturation factor at 120% of rated terminal voltage (S12) (> or =S1). Not used by the simplified model, defined by S(E2) in the SynchronousMachineSaturationParameters diagram. Typical Value = 0.12. Default: nullptr */ + CIMPP::Simple_Float saturationFactor120; + + /** \brief Stator leakage reactance (Xl) (> or =0). Typical Value = 0.15. Default: nullptr */ + CIMPP::PU statorLeakageReactance; + + /** \brief Stator (armature) resistance (Rs) (> or =0). Typical Value = 0.005. Default: nullptr */ + CIMPP::PU statorResistance; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/RotationSpeed.hpp b/CGMES_2.4.15_16FEB2016/RotationSpeed.hpp index 20dae4027..3ffdcb396 100644 --- a/CGMES_2.4.15_16FEB2016/RotationSpeed.hpp +++ b/CGMES_2.4.15_16FEB2016/RotationSpeed.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Number of revolutions per second. - */ + /** \brief Number of revolutions per second. */ class RotationSpeed { public: diff --git a/CGMES_2.4.15_16FEB2016/RotorKind.cpp b/CGMES_2.4.15_16FEB2016/RotorKind.cpp index 155faceec..5474d65a5 100644 --- a/CGMES_2.4.15_16FEB2016/RotorKind.cpp +++ b/CGMES_2.4.15_16FEB2016/RotorKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "RotorKind") + if (EnumSymbol.substr(0, pos) != "RotorKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,12 +50,12 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "roundRotor") + if (EnumSymbol == "roundRotor") { rop = RotorKind::roundRotor; return lop; } - if(EnumSymbol == "salientPole") + if (EnumSymbol == "salientPole") { rop = RotorKind::salientPole; return lop; diff --git a/CGMES_2.4.15_16FEB2016/RotorKind.hpp b/CGMES_2.4.15_16FEB2016/RotorKind.hpp index d86eccaa1..1208e8979 100644 --- a/CGMES_2.4.15_16FEB2016/RotorKind.hpp +++ b/CGMES_2.4.15_16FEB2016/RotorKind.hpp @@ -9,21 +9,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of rotor on physical machine. - */ + /** \brief Type of rotor on physical machine. */ class RotorKind { public: enum RotorKind_ENUM { - /** - * Round rotor type of synchronous machine. - */ + /** Round rotor type of synchronous machine. */ roundRotor, - /** - * Salient pole type of synchronous machine. - */ + /** Salient pole type of synchronous machine. */ salientPole, }; diff --git a/CGMES_2.4.15_16FEB2016/SVCControlMode.cpp b/CGMES_2.4.15_16FEB2016/SVCControlMode.cpp index 4ccad37d6..d065e0216 100644 --- a/CGMES_2.4.15_16FEB2016/SVCControlMode.cpp +++ b/CGMES_2.4.15_16FEB2016/SVCControlMode.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "SVCControlMode") + if (EnumSymbol.substr(0, pos) != "SVCControlMode") { lop.setstate(std::ios::failbit); return lop; @@ -50,12 +50,12 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "reactivePower") + if (EnumSymbol == "reactivePower") { rop = SVCControlMode::reactivePower; return lop; } - if(EnumSymbol == "voltage") + if (EnumSymbol == "voltage") { rop = SVCControlMode::voltage; return lop; diff --git a/CGMES_2.4.15_16FEB2016/SVCControlMode.hpp b/CGMES_2.4.15_16FEB2016/SVCControlMode.hpp index 52da28bad..43127f392 100644 --- a/CGMES_2.4.15_16FEB2016/SVCControlMode.hpp +++ b/CGMES_2.4.15_16FEB2016/SVCControlMode.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Static VAr Compensator control mode. - */ + /** \brief Static VAr Compensator control mode. */ class SVCControlMode { public: diff --git a/CGMES_2.4.15_16FEB2016/Season.cpp b/CGMES_2.4.15_16FEB2016/Season.cpp index 02f2e0db6..bd79ad860 100644 --- a/CGMES_2.4.15_16FEB2016/Season.cpp +++ b/CGMES_2.4.15_16FEB2016/Season.cpp @@ -9,13 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "SeasonDayTypeSchedule.hpp" -#include "MonthDay.hpp" -#include "MonthDay.hpp" using namespace CIMPP; -Season::Season() {}; -Season::~Season() {}; +Season::Season() {} +Season::~Season() {} static const std::list PossibleProfilesForClass = { @@ -44,54 +42,56 @@ Season::getPossibleProfilesForAttributes() const return map; } - -bool assign_Season_endDate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SeasonDayTypeSchedule_Season(BaseClass*, BaseClass*); +bool assign_Season_SeasonDayTypeSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (Season* element = dynamic_cast(BaseClass_ptr1)) + Season* element = dynamic_cast(BaseClass_ptr1); + SeasonDayTypeSchedule* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - element->endDate = buffer.str(); - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->SeasonDayTypeSchedules.begin(), element->SeasonDayTypeSchedules.end(), element2) == element->SeasonDayTypeSchedules.end()) + { + element->SeasonDayTypeSchedules.push_back(element2); + return assign_SeasonDayTypeSchedule_Season(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_Season_startDate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Season_endDate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Season* element = dynamic_cast(BaseClass_ptr1)) + Season* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - element->startDate = buffer.str(); - if (buffer.fail()) - return false; - else + element->endDate = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_SeasonDayTypeSchedule_Season(BaseClass*, BaseClass*); -bool assign_Season_SeasonDayTypeSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_Season_startDate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { Season* element = dynamic_cast(BaseClass_ptr1); - SeasonDayTypeSchedule* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->SeasonDayTypeSchedules.begin(), element->SeasonDayTypeSchedules.end(), element2) == element->SeasonDayTypeSchedules.end()) + element->startDate = buffer.str(); + if (!buffer.fail()) { - element->SeasonDayTypeSchedules.push_back(element2); - return assign_SeasonDayTypeSchedule_Season(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_Season_endDate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Season* element = dynamic_cast(BaseClass_ptr1)) + const Season* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->endDate; if (!buffer.str().empty()) @@ -105,7 +105,8 @@ bool get_Season_endDate(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_Season_startDate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Season* element = dynamic_cast(BaseClass_ptr1)) + const Season* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->startDate; if (!buffer.str().empty()) @@ -117,8 +118,6 @@ bool get_Season_startDate(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char Season::debugName[] = "Season"; const char* Season::debugString() const { @@ -127,18 +126,18 @@ const char* Season::debugString() const void Season::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Season"), &Season_factory)); + factory_map.emplace("cim:Season", &Season_factory); } void Season::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Season.endDate"), &assign_Season_endDate)); - assign_map.insert(std::make_pair(std::string("cim:Season.startDate"), &assign_Season_startDate)); + assign_map.emplace("cim:Season.endDate", &assign_Season_endDate); + assign_map.emplace("cim:Season.startDate", &assign_Season_startDate); } void Season::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Season.SeasonDayTypeSchedules"), &assign_Season_SeasonDayTypeSchedules)); + assign_map.emplace("cim:Season.SeasonDayTypeSchedules", &assign_Season_SeasonDayTypeSchedules); } void Season::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/Season.hpp b/CGMES_2.4.15_16FEB2016/Season.hpp index f56c355a0..884a07e64 100644 --- a/CGMES_2.4.15_16FEB2016/Season.hpp +++ b/CGMES_2.4.15_16FEB2016/Season.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class SeasonDayTypeSchedule; - /* - A specified time period of the year. - */ + /** \brief A specified time period of the year. */ class Season : public IdentifiedObject { public: @@ -28,9 +26,14 @@ namespace CIMPP Season(); ~Season() override; - std::list SeasonDayTypeSchedules; /* Season for the Schedule. Default: 0 */ - CIMPP::MonthDay endDate; /* Date season ends. Default: nullptr */ - CIMPP::MonthDay startDate; /* Date season starts. Default: nullptr */ + /** \brief Season for the Schedule. Default: 0 */ + std::list SeasonDayTypeSchedules; + + /** \brief Date season ends. Default: nullptr */ + CIMPP::MonthDay endDate; + + /** \brief Date season starts. Default: nullptr */ + CIMPP::MonthDay startDate; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/SeasonDayTypeSchedule.cpp b/CGMES_2.4.15_16FEB2016/SeasonDayTypeSchedule.cpp index 284c63264..dcc36cca0 100644 --- a/CGMES_2.4.15_16FEB2016/SeasonDayTypeSchedule.cpp +++ b/CGMES_2.4.15_16FEB2016/SeasonDayTypeSchedule.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -SeasonDayTypeSchedule::SeasonDayTypeSchedule() : DayType(nullptr), Season(nullptr) {}; -SeasonDayTypeSchedule::~SeasonDayTypeSchedule() {}; +SeasonDayTypeSchedule::SeasonDayTypeSchedule() : DayType(nullptr), Season(nullptr) {} +SeasonDayTypeSchedule::~SeasonDayTypeSchedule() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ SeasonDayTypeSchedule::getPossibleProfilesForAttributes() const return map; } - - bool assign_DayType_SeasonDayTypeSchedules(BaseClass*, BaseClass*); bool assign_SeasonDayTypeSchedule_DayType(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_SeasonDayTypeSchedule_DayType(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_Season_SeasonDayTypeSchedules(BaseClass*, BaseClass*); bool assign_SeasonDayTypeSchedule_Season(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_SeasonDayTypeSchedule_Season(BaseClass* BaseClass_ptr1, BaseClass* B return false; } - bool get_SeasonDayTypeSchedule_DayType(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SeasonDayTypeSchedule* element = dynamic_cast(BaseClass_ptr1)) + const SeasonDayTypeSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DayType != 0) { @@ -93,7 +92,8 @@ bool get_SeasonDayTypeSchedule_DayType(const BaseClass* BaseClass_ptr1, std::lis bool get_SeasonDayTypeSchedule_Season(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SeasonDayTypeSchedule* element = dynamic_cast(BaseClass_ptr1)) + const SeasonDayTypeSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Season != 0) { @@ -104,7 +104,6 @@ bool get_SeasonDayTypeSchedule_Season(const BaseClass* BaseClass_ptr1, std::list return false; } - const char SeasonDayTypeSchedule::debugName[] = "SeasonDayTypeSchedule"; const char* SeasonDayTypeSchedule::debugString() const { @@ -113,7 +112,7 @@ const char* SeasonDayTypeSchedule::debugString() const void SeasonDayTypeSchedule::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SeasonDayTypeSchedule"), &SeasonDayTypeSchedule_factory)); + factory_map.emplace("cim:SeasonDayTypeSchedule", &SeasonDayTypeSchedule_factory); } void SeasonDayTypeSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void SeasonDayTypeSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SeasonDayTypeSchedule.DayType"), &assign_SeasonDayTypeSchedule_DayType)); - assign_map.insert(std::make_pair(std::string("cim:SeasonDayTypeSchedule.Season"), &assign_SeasonDayTypeSchedule_Season)); + assign_map.emplace("cim:SeasonDayTypeSchedule.DayType", &assign_SeasonDayTypeSchedule_DayType); + assign_map.emplace("cim:SeasonDayTypeSchedule.Season", &assign_SeasonDayTypeSchedule_Season); } void SeasonDayTypeSchedule::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/SeasonDayTypeSchedule.hpp b/CGMES_2.4.15_16FEB2016/SeasonDayTypeSchedule.hpp index 8658cffe8..bb3b41a35 100644 --- a/CGMES_2.4.15_16FEB2016/SeasonDayTypeSchedule.hpp +++ b/CGMES_2.4.15_16FEB2016/SeasonDayTypeSchedule.hpp @@ -18,9 +18,7 @@ namespace CIMPP class DayType; class Season; - /* - A time schedule covering a 24 hour period, with curve data for a specific type of season and day. - */ + /** \brief A time schedule covering a 24 hour period, with curve data for a specific type of season and day. */ class SeasonDayTypeSchedule : public RegularIntervalSchedule { public: @@ -28,8 +26,11 @@ namespace CIMPP SeasonDayTypeSchedule(); ~SeasonDayTypeSchedule() override; - CIMPP::DayType* DayType; /* Schedules that use this DayType. Default: 0 */ - CIMPP::Season* Season; /* Schedules that use this Season. Default: 0 */ + /** \brief Schedules that use this DayType. Default: 0 */ + CIMPP::DayType* DayType; + + /** \brief Schedules that use this Season. Default: 0 */ + CIMPP::Season* Season; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Seconds.hpp b/CGMES_2.4.15_16FEB2016/Seconds.hpp index 60e9a668b..9284aa059 100644 --- a/CGMES_2.4.15_16FEB2016/Seconds.hpp +++ b/CGMES_2.4.15_16FEB2016/Seconds.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Time, in seconds. - */ + /** \brief Time, in seconds. */ class Seconds { public: diff --git a/CGMES_2.4.15_16FEB2016/SeriesCompensator.cpp b/CGMES_2.4.15_16FEB2016/SeriesCompensator.cpp index bf05698f2..291e18404 100644 --- a/CGMES_2.4.15_16FEB2016/SeriesCompensator.cpp +++ b/CGMES_2.4.15_16FEB2016/SeriesCompensator.cpp @@ -8,18 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "Boolean.hpp" -#include "CurrentFlow.hpp" -#include "Voltage.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -SeriesCompensator::SeriesCompensator() {}; -SeriesCompensator::~SeriesCompensator() {}; +SeriesCompensator::SeriesCompensator() {} +SeriesCompensator::~SeriesCompensator() {} static const std::list PossibleProfilesForClass = { @@ -52,103 +45,108 @@ SeriesCompensator::getPossibleProfilesForAttributes() const return map; } - -bool assign_SeriesCompensator_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SeriesCompensator_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SeriesCompensator_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SeriesCompensator_r0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SeriesCompensator_varistorPresent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SeriesCompensator_varistorPresent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->varistorPresent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SeriesCompensator_varistorRatedCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SeriesCompensator_varistorRatedCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->varistorRatedCurrent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SeriesCompensator_varistorVoltageThreshold(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SeriesCompensator_varistorVoltageThreshold(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->varistorVoltageThreshold; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SeriesCompensator_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SeriesCompensator_x(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SeriesCompensator_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SeriesCompensator_x0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_SeriesCompensator_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -162,7 +160,8 @@ bool get_SeriesCompensator_r(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_SeriesCompensator_r0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r0; if (!buffer.str().empty()) @@ -176,7 +175,8 @@ bool get_SeriesCompensator_r0(const BaseClass* BaseClass_ptr1, std::stringstream bool get_SeriesCompensator_varistorPresent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->varistorPresent; if (!buffer.str().empty()) @@ -190,7 +190,8 @@ bool get_SeriesCompensator_varistorPresent(const BaseClass* BaseClass_ptr1, std: bool get_SeriesCompensator_varistorRatedCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->varistorRatedCurrent; if (!buffer.str().empty()) @@ -204,7 +205,8 @@ bool get_SeriesCompensator_varistorRatedCurrent(const BaseClass* BaseClass_ptr1, bool get_SeriesCompensator_varistorVoltageThreshold(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->varistorVoltageThreshold; if (!buffer.str().empty()) @@ -218,7 +220,8 @@ bool get_SeriesCompensator_varistorVoltageThreshold(const BaseClass* BaseClass_p bool get_SeriesCompensator_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x; if (!buffer.str().empty()) @@ -232,7 +235,8 @@ bool get_SeriesCompensator_x(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_SeriesCompensator_x0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x0; if (!buffer.str().empty()) @@ -244,8 +248,6 @@ bool get_SeriesCompensator_x0(const BaseClass* BaseClass_ptr1, std::stringstream return false; } - - const char SeriesCompensator::debugName[] = "SeriesCompensator"; const char* SeriesCompensator::debugString() const { @@ -254,18 +256,18 @@ const char* SeriesCompensator::debugString() const void SeriesCompensator::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SeriesCompensator"), &SeriesCompensator_factory)); + factory_map.emplace("cim:SeriesCompensator", &SeriesCompensator_factory); } void SeriesCompensator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SeriesCompensator.r"), &assign_SeriesCompensator_r)); - assign_map.insert(std::make_pair(std::string("cim:SeriesCompensator.r0"), &assign_SeriesCompensator_r0)); - assign_map.insert(std::make_pair(std::string("cim:SeriesCompensator.varistorPresent"), &assign_SeriesCompensator_varistorPresent)); - assign_map.insert(std::make_pair(std::string("cim:SeriesCompensator.varistorRatedCurrent"), &assign_SeriesCompensator_varistorRatedCurrent)); - assign_map.insert(std::make_pair(std::string("cim:SeriesCompensator.varistorVoltageThreshold"), &assign_SeriesCompensator_varistorVoltageThreshold)); - assign_map.insert(std::make_pair(std::string("cim:SeriesCompensator.x"), &assign_SeriesCompensator_x)); - assign_map.insert(std::make_pair(std::string("cim:SeriesCompensator.x0"), &assign_SeriesCompensator_x0)); + assign_map.emplace("cim:SeriesCompensator.r", &assign_SeriesCompensator_r); + assign_map.emplace("cim:SeriesCompensator.r0", &assign_SeriesCompensator_r0); + assign_map.emplace("cim:SeriesCompensator.varistorPresent", &assign_SeriesCompensator_varistorPresent); + assign_map.emplace("cim:SeriesCompensator.varistorRatedCurrent", &assign_SeriesCompensator_varistorRatedCurrent); + assign_map.emplace("cim:SeriesCompensator.varistorVoltageThreshold", &assign_SeriesCompensator_varistorVoltageThreshold); + assign_map.emplace("cim:SeriesCompensator.x", &assign_SeriesCompensator_x); + assign_map.emplace("cim:SeriesCompensator.x0", &assign_SeriesCompensator_x0); } void SeriesCompensator::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/SeriesCompensator.hpp b/CGMES_2.4.15_16FEB2016/SeriesCompensator.hpp index 858b49588..8d77b514a 100644 --- a/CGMES_2.4.15_16FEB2016/SeriesCompensator.hpp +++ b/CGMES_2.4.15_16FEB2016/SeriesCompensator.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A Series Compensator is a series capacitor or reactor or an AC transmission line without charging susceptance. It is a two terminal device. - */ + /** \brief A Series Compensator is a series capacitor or reactor or an AC transmission line without charging susceptance. It is a two terminal device. */ class SeriesCompensator : public ConductingEquipment { public: @@ -31,13 +29,26 @@ namespace CIMPP SeriesCompensator(); ~SeriesCompensator() override; - CIMPP::Resistance r; /* Positive sequence resistance. Default: nullptr */ - CIMPP::Resistance r0; /* Zero sequence resistance. Default: nullptr */ - CIMPP::Boolean varistorPresent; /* Describe if a metal oxide varistor (mov) for over voltage protection is configured at the series compensator. Default: false */ - CIMPP::CurrentFlow varistorRatedCurrent; /* The maximum current the varistor is designed to handle at specified duration. Default: nullptr */ - CIMPP::Voltage varistorVoltageThreshold; /* The dc voltage at which the varistor start conducting. Default: nullptr */ - CIMPP::Reactance x; /* Positive sequence reactance. Default: nullptr */ - CIMPP::Reactance x0; /* Zero sequence reactance. Default: nullptr */ + /** \brief Positive sequence resistance. Default: nullptr */ + CIMPP::Resistance r; + + /** \brief Zero sequence resistance. Default: nullptr */ + CIMPP::Resistance r0; + + /** \brief Describe if a metal oxide varistor (mov) for over voltage protection is configured at the series compensator. Default: false */ + CIMPP::Boolean varistorPresent; + + /** \brief The maximum current the varistor is designed to handle at specified duration. Default: nullptr */ + CIMPP::CurrentFlow varistorRatedCurrent; + + /** \brief The dc voltage at which the varistor start conducting. Default: nullptr */ + CIMPP::Voltage varistorVoltageThreshold; + + /** \brief Positive sequence reactance. Default: nullptr */ + CIMPP::Reactance x; + + /** \brief Zero sequence reactance. Default: nullptr */ + CIMPP::Reactance x0; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/SetPoint.cpp b/CGMES_2.4.15_16FEB2016/SetPoint.cpp index efd3b8575..5282827e5 100644 --- a/CGMES_2.4.15_16FEB2016/SetPoint.cpp +++ b/CGMES_2.4.15_16FEB2016/SetPoint.cpp @@ -8,13 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -SetPoint::SetPoint() {}; -SetPoint::~SetPoint() {}; +SetPoint::SetPoint() {} +SetPoint::~SetPoint() {} static const std::list PossibleProfilesForClass = { @@ -42,38 +40,38 @@ SetPoint::getPossibleProfilesForAttributes() const return map; } - -bool assign_SetPoint_normalValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SetPoint_normalValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SetPoint* element = dynamic_cast(BaseClass_ptr1)) + SetPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->normalValue; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SetPoint_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SetPoint_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SetPoint* element = dynamic_cast(BaseClass_ptr1)) + SetPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->value; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_SetPoint_normalValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SetPoint* element = dynamic_cast(BaseClass_ptr1)) + const SetPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->normalValue; if (!buffer.str().empty()) @@ -87,7 +85,8 @@ bool get_SetPoint_normalValue(const BaseClass* BaseClass_ptr1, std::stringstream bool get_SetPoint_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SetPoint* element = dynamic_cast(BaseClass_ptr1)) + const SetPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value; if (!buffer.str().empty()) @@ -99,8 +98,6 @@ bool get_SetPoint_value(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char SetPoint::debugName[] = "SetPoint"; const char* SetPoint::debugString() const { @@ -109,13 +106,13 @@ const char* SetPoint::debugString() const void SetPoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SetPoint"), &SetPoint_factory)); + factory_map.emplace("cim:SetPoint", &SetPoint_factory); } void SetPoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SetPoint.normalValue"), &assign_SetPoint_normalValue)); - assign_map.insert(std::make_pair(std::string("cim:SetPoint.value"), &assign_SetPoint_value)); + assign_map.emplace("cim:SetPoint.normalValue", &assign_SetPoint_normalValue); + assign_map.emplace("cim:SetPoint.value", &assign_SetPoint_value); } void SetPoint::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/SetPoint.hpp b/CGMES_2.4.15_16FEB2016/SetPoint.hpp index b88b8246b..373731845 100644 --- a/CGMES_2.4.15_16FEB2016/SetPoint.hpp +++ b/CGMES_2.4.15_16FEB2016/SetPoint.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - An analog control that issue a set point value. - */ + /** \brief An analog control that issue a set point value. */ class SetPoint : public AnalogControl { public: @@ -27,8 +25,11 @@ namespace CIMPP SetPoint(); ~SetPoint() override; - CIMPP::Simple_Float normalValue; /* Normal value for Control.value e.g. used for percentage scaling. Default: nullptr */ - CIMPP::Simple_Float value; /* The value representing the actuator output. Default: nullptr */ + /** \brief Normal value for Control.value e.g. used for percentage scaling. Default: nullptr */ + CIMPP::Simple_Float normalValue; + + /** \brief The value representing the actuator output. Default: nullptr */ + CIMPP::Simple_Float value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ShortCircuitRotorKind.cpp b/CGMES_2.4.15_16FEB2016/ShortCircuitRotorKind.cpp index 9e7ea1852..8c6e07eb8 100644 --- a/CGMES_2.4.15_16FEB2016/ShortCircuitRotorKind.cpp +++ b/CGMES_2.4.15_16FEB2016/ShortCircuitRotorKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "ShortCircuitRotorKind") + if (EnumSymbol.substr(0, pos) != "ShortCircuitRotorKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,22 +50,22 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "salientPole1") + if (EnumSymbol == "salientPole1") { rop = ShortCircuitRotorKind::salientPole1; return lop; } - if(EnumSymbol == "salientPole2") + if (EnumSymbol == "salientPole2") { rop = ShortCircuitRotorKind::salientPole2; return lop; } - if(EnumSymbol == "turboSeries1") + if (EnumSymbol == "turboSeries1") { rop = ShortCircuitRotorKind::turboSeries1; return lop; } - if(EnumSymbol == "turboSeries2") + if (EnumSymbol == "turboSeries2") { rop = ShortCircuitRotorKind::turboSeries2; return lop; diff --git a/CGMES_2.4.15_16FEB2016/ShortCircuitRotorKind.hpp b/CGMES_2.4.15_16FEB2016/ShortCircuitRotorKind.hpp index 76f473214..71b3acfc3 100644 --- a/CGMES_2.4.15_16FEB2016/ShortCircuitRotorKind.hpp +++ b/CGMES_2.4.15_16FEB2016/ShortCircuitRotorKind.hpp @@ -9,29 +9,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of rotor, used by short circuit applications. - */ + /** \brief Type of rotor, used by short circuit applications. */ class ShortCircuitRotorKind { public: enum ShortCircuitRotorKind_ENUM { - /** - * Salient pole 1 in the IEC 60909 - */ + /** Salient pole 1 in the IEC 60909 */ salientPole1, - /** - * Salient pole 2 in IEC 60909 - */ + /** Salient pole 2 in IEC 60909 */ salientPole2, - /** - * Turbo Series 1 in the IEC 60909 - */ + /** Turbo Series 1 in the IEC 60909 */ turboSeries1, - /** - * Turbo series 2 in IEC 60909 - */ + /** Turbo series 2 in IEC 60909 */ turboSeries2, }; diff --git a/CGMES_2.4.15_16FEB2016/ShuntCompensator.cpp b/CGMES_2.4.15_16FEB2016/ShuntCompensator.cpp index c6ffcbea0..53878ebfa 100644 --- a/CGMES_2.4.15_16FEB2016/ShuntCompensator.cpp +++ b/CGMES_2.4.15_16FEB2016/ShuntCompensator.cpp @@ -9,20 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "SvShuntCompensatorSections.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "Integer.hpp" -#include "Voltage.hpp" -#include "Integer.hpp" -#include "Simple_Float.hpp" -#include "Integer.hpp" -#include "DateTime.hpp" -#include "VoltagePerReactivePower.hpp" using namespace CIMPP; -ShuntCompensator::ShuntCompensator() : SvShuntCompensatorSections(nullptr) {}; -ShuntCompensator::~ShuntCompensator() {}; +ShuntCompensator::ShuntCompensator() : SvShuntCompensatorSections(nullptr) {} +ShuntCompensator::~ShuntCompensator() {} static const std::list PossibleProfilesForClass = { @@ -60,145 +51,154 @@ ShuntCompensator::getPossibleProfilesForAttributes() const return map; } +bool assign_SvShuntCompensatorSections_ShuntCompensator(BaseClass*, BaseClass*); +bool assign_ShuntCompensator_SvShuntCompensatorSections(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + SvShuntCompensatorSections* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->SvShuntCompensatorSections != element2) + { + element->SvShuntCompensatorSections = element2; + return assign_SvShuntCompensatorSections_ShuntCompensator(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_ShuntCompensator_aVRDelay(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ShuntCompensator_aVRDelay(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->aVRDelay; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ShuntCompensator_grounded(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ShuntCompensator_grounded(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->grounded; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ShuntCompensator_maximumSections(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ShuntCompensator_maximumSections(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maximumSections; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ShuntCompensator_nomU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ShuntCompensator_nomU(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nomU; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ShuntCompensator_normalSections(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ShuntCompensator_normalSections(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->normalSections; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ShuntCompensator_sections(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ShuntCompensator_sections(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->sections; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ShuntCompensator_switchOnCount(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ShuntCompensator_switchOnCount(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->switchOnCount; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ShuntCompensator_switchOnDate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ShuntCompensator_switchOnDate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->switchOnDate = buffer.str(); - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_ShuntCompensator_voltageSensitivity(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->voltageSensitivity; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_SvShuntCompensatorSections_ShuntCompensator(BaseClass*, BaseClass*); -bool assign_ShuntCompensator_SvShuntCompensatorSections(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_ShuntCompensator_voltageSensitivity(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); - SvShuntCompensatorSections* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->SvShuntCompensatorSections != element2) + buffer >> element->voltageSensitivity; + if (!buffer.fail()) { - element->SvShuntCompensatorSections = element2; - return assign_SvShuntCompensatorSections_ShuntCompensator(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_ShuntCompensator_aVRDelay(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->aVRDelay; if (!buffer.str().empty()) @@ -212,7 +212,8 @@ bool get_ShuntCompensator_aVRDelay(const BaseClass* BaseClass_ptr1, std::strings bool get_ShuntCompensator_grounded(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->grounded; if (!buffer.str().empty()) @@ -226,7 +227,8 @@ bool get_ShuntCompensator_grounded(const BaseClass* BaseClass_ptr1, std::strings bool get_ShuntCompensator_maximumSections(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maximumSections; if (!buffer.str().empty()) @@ -240,7 +242,8 @@ bool get_ShuntCompensator_maximumSections(const BaseClass* BaseClass_ptr1, std:: bool get_ShuntCompensator_nomU(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nomU; if (!buffer.str().empty()) @@ -254,7 +257,8 @@ bool get_ShuntCompensator_nomU(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_ShuntCompensator_normalSections(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->normalSections; if (!buffer.str().empty()) @@ -268,7 +272,8 @@ bool get_ShuntCompensator_normalSections(const BaseClass* BaseClass_ptr1, std::s bool get_ShuntCompensator_sections(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->sections; if (!buffer.str().empty()) @@ -282,7 +287,8 @@ bool get_ShuntCompensator_sections(const BaseClass* BaseClass_ptr1, std::strings bool get_ShuntCompensator_switchOnCount(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->switchOnCount; if (!buffer.str().empty()) @@ -296,7 +302,8 @@ bool get_ShuntCompensator_switchOnCount(const BaseClass* BaseClass_ptr1, std::st bool get_ShuntCompensator_switchOnDate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->switchOnDate; if (!buffer.str().empty()) @@ -310,7 +317,8 @@ bool get_ShuntCompensator_switchOnDate(const BaseClass* BaseClass_ptr1, std::str bool get_ShuntCompensator_voltageSensitivity(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->voltageSensitivity; if (!buffer.str().empty()) @@ -322,8 +330,6 @@ bool get_ShuntCompensator_voltageSensitivity(const BaseClass* BaseClass_ptr1, st return false; } - - const char ShuntCompensator::debugName[] = "ShuntCompensator"; const char* ShuntCompensator::debugString() const { @@ -332,25 +338,25 @@ const char* ShuntCompensator::debugString() const void ShuntCompensator::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ShuntCompensator"), &ShuntCompensator_factory)); + factory_map.emplace("cim:ShuntCompensator", &ShuntCompensator_factory); } void ShuntCompensator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.aVRDelay"), &assign_ShuntCompensator_aVRDelay)); - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.grounded"), &assign_ShuntCompensator_grounded)); - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.maximumSections"), &assign_ShuntCompensator_maximumSections)); - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.nomU"), &assign_ShuntCompensator_nomU)); - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.normalSections"), &assign_ShuntCompensator_normalSections)); - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.sections"), &assign_ShuntCompensator_sections)); - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.switchOnCount"), &assign_ShuntCompensator_switchOnCount)); - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.switchOnDate"), &assign_ShuntCompensator_switchOnDate)); - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.voltageSensitivity"), &assign_ShuntCompensator_voltageSensitivity)); + assign_map.emplace("cim:ShuntCompensator.aVRDelay", &assign_ShuntCompensator_aVRDelay); + assign_map.emplace("cim:ShuntCompensator.grounded", &assign_ShuntCompensator_grounded); + assign_map.emplace("cim:ShuntCompensator.maximumSections", &assign_ShuntCompensator_maximumSections); + assign_map.emplace("cim:ShuntCompensator.nomU", &assign_ShuntCompensator_nomU); + assign_map.emplace("cim:ShuntCompensator.normalSections", &assign_ShuntCompensator_normalSections); + assign_map.emplace("cim:ShuntCompensator.sections", &assign_ShuntCompensator_sections); + assign_map.emplace("cim:ShuntCompensator.switchOnCount", &assign_ShuntCompensator_switchOnCount); + assign_map.emplace("cim:ShuntCompensator.switchOnDate", &assign_ShuntCompensator_switchOnDate); + assign_map.emplace("cim:ShuntCompensator.voltageSensitivity", &assign_ShuntCompensator_voltageSensitivity); } void ShuntCompensator::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.SvShuntCompensatorSections"), &assign_ShuntCompensator_SvShuntCompensatorSections)); + assign_map.emplace("cim:ShuntCompensator.SvShuntCompensatorSections", &assign_ShuntCompensator_SvShuntCompensatorSections); } void ShuntCompensator::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/ShuntCompensator.hpp b/CGMES_2.4.15_16FEB2016/ShuntCompensator.hpp index f49148733..96927b2f6 100644 --- a/CGMES_2.4.15_16FEB2016/ShuntCompensator.hpp +++ b/CGMES_2.4.15_16FEB2016/ShuntCompensator.hpp @@ -24,9 +24,7 @@ namespace CIMPP { class SvShuntCompensatorSections; - /* - A shunt capacitor or reactor or switchable bank of shunt capacitors or reactors. A section of a shunt compensator is an individual capacitor or reactor. A negative value for reactivePerSection indicates that the compensator is a reactor. ShuntCompensator is a single terminal device. Ground is implied. - */ + /** \brief A shunt capacitor or reactor or switchable bank of shunt capacitors or reactors. A section of a shunt compensator is an individual capacitor or reactor. A negative value for reactivePerSection indicates that the compensator is a reactor. ShuntCompensator is a single terminal device. Ground is implied. */ class ShuntCompensator : public RegulatingCondEq { public: @@ -34,16 +32,35 @@ namespace CIMPP ShuntCompensator(); ~ShuntCompensator() override; - CIMPP::SvShuntCompensatorSections* SvShuntCompensatorSections; /* The state for the number of shunt compensator sections in service. Default: 0 */ - CIMPP::Seconds aVRDelay; /* Time delay required for the device to be connected or disconnected by automatic voltage regulation (AVR). Default: nullptr */ - CIMPP::Boolean grounded; /* Used for Yn and Zn connections. True if the neutral is solidly grounded. Default: false */ - CIMPP::Integer maximumSections; /* The maximum number of sections that may be switched in. Default: 0 */ - CIMPP::Voltage nomU; /* The voltage at which the nominal reactive power may be calculated. This should normally be within 10% of the voltage at which the capacitor is connected to the network. Default: nullptr */ - CIMPP::Integer normalSections; /* The normal number of sections switched in. Default: 0 */ - CIMPP::Simple_Float sections; /* Shunt compensator sections in use. Starting value for steady state solution. Non integer values are allowed to support continuous variables. The reasons for continuous value are to support study cases where no discrete shunt compensators has yet been designed, a solutions where a narrow voltage band force the sections to oscillate or accommodate for a continuous solution as input. Default: nullptr */ - CIMPP::Integer switchOnCount; /* The switch on count since the capacitor count was last reset or initialized. Default: 0 */ - CIMPP::DateTime switchOnDate; /* The date and time when the capacitor bank was last switched on. Default: '' */ - CIMPP::VoltagePerReactivePower voltageSensitivity; /* Voltage sensitivity required for the device to regulate the bus voltage, in voltage/reactive power. Default: nullptr */ + /** \brief The state for the number of shunt compensator sections in service. Default: 0 */ + CIMPP::SvShuntCompensatorSections* SvShuntCompensatorSections; + + /** \brief Time delay required for the device to be connected or disconnected by automatic voltage regulation (AVR). Default: nullptr */ + CIMPP::Seconds aVRDelay; + + /** \brief Used for Yn and Zn connections. True if the neutral is solidly grounded. Default: false */ + CIMPP::Boolean grounded; + + /** \brief The maximum number of sections that may be switched in. Default: 0 */ + CIMPP::Integer maximumSections; + + /** \brief The voltage at which the nominal reactive power may be calculated. This should normally be within 10% of the voltage at which the capacitor is connected to the network. Default: nullptr */ + CIMPP::Voltage nomU; + + /** \brief The normal number of sections switched in. Default: 0 */ + CIMPP::Integer normalSections; + + /** \brief Shunt compensator sections in use. Starting value for steady state solution. Non integer values are allowed to support continuous variables. The reasons for continuous value are to support study cases where no discrete shunt compensators has yet been designed, a solutions where a narrow voltage band force the sections to oscillate or accommodate for a continuous solution as input. Default: nullptr */ + CIMPP::Simple_Float sections; + + /** \brief The switch on count since the capacitor count was last reset or initialized. Default: 0 */ + CIMPP::Integer switchOnCount; + + /** \brief The date and time when the capacitor bank was last switched on. Default: '' */ + CIMPP::DateTime switchOnDate; + + /** \brief Voltage sensitivity required for the device to regulate the bus voltage, in voltage/reactive power. Default: nullptr */ + CIMPP::VoltagePerReactivePower voltageSensitivity; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Simple_Float.hpp b/CGMES_2.4.15_16FEB2016/Simple_Float.hpp index 58d48ce8f..c8918cd32 100644 --- a/CGMES_2.4.15_16FEB2016/Simple_Float.hpp +++ b/CGMES_2.4.15_16FEB2016/Simple_Float.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A floating point number. The range is unspecified and not limited. - */ + /** \brief A floating point number. The range is unspecified and not limited. */ class Simple_Float { public: diff --git a/CGMES_2.4.15_16FEB2016/SolarGeneratingUnit.cpp b/CGMES_2.4.15_16FEB2016/SolarGeneratingUnit.cpp index 065a49e1f..0887d1cbb 100644 --- a/CGMES_2.4.15_16FEB2016/SolarGeneratingUnit.cpp +++ b/CGMES_2.4.15_16FEB2016/SolarGeneratingUnit.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -SolarGeneratingUnit::SolarGeneratingUnit() {}; -SolarGeneratingUnit::~SolarGeneratingUnit() {}; +SolarGeneratingUnit::SolarGeneratingUnit() {} +SolarGeneratingUnit::~SolarGeneratingUnit() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ SolarGeneratingUnit::getPossibleProfilesForAttributes() const return map; } - - - - - const char SolarGeneratingUnit::debugName[] = "SolarGeneratingUnit"; const char* SolarGeneratingUnit::debugString() const { @@ -52,7 +47,7 @@ const char* SolarGeneratingUnit::debugString() const void SolarGeneratingUnit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SolarGeneratingUnit"), &SolarGeneratingUnit_factory)); + factory_map.emplace("cim:SolarGeneratingUnit", &SolarGeneratingUnit_factory); } void SolarGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/SolarGeneratingUnit.hpp b/CGMES_2.4.15_16FEB2016/SolarGeneratingUnit.hpp index 7292ac264..30f338f85 100644 --- a/CGMES_2.4.15_16FEB2016/SolarGeneratingUnit.hpp +++ b/CGMES_2.4.15_16FEB2016/SolarGeneratingUnit.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A solar thermal generating unit. - */ + /** \brief A solar thermal generating unit. */ class SolarGeneratingUnit : public GeneratingUnit { public: @@ -26,7 +24,6 @@ namespace CIMPP SolarGeneratingUnit(); ~SolarGeneratingUnit() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Source.cpp b/CGMES_2.4.15_16FEB2016/Source.cpp index 54f9266b5..c3fcca81b 100644 --- a/CGMES_2.4.15_16FEB2016/Source.cpp +++ b/CGMES_2.4.15_16FEB2016/Source.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "Source") + if (EnumSymbol.substr(0, pos) != "Source") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "PROCESS") + if (EnumSymbol == "PROCESS") { rop = Source::PROCESS; return lop; } - if(EnumSymbol == "DEFAULTED") + if (EnumSymbol == "DEFAULTED") { rop = Source::DEFAULTED; return lop; } - if(EnumSymbol == "SUBSTITUTED") + if (EnumSymbol == "SUBSTITUTED") { rop = Source::SUBSTITUTED; return lop; diff --git a/CGMES_2.4.15_16FEB2016/Source.hpp b/CGMES_2.4.15_16FEB2016/Source.hpp index 0cbf17fb0..a4c8dd465 100644 --- a/CGMES_2.4.15_16FEB2016/Source.hpp +++ b/CGMES_2.4.15_16FEB2016/Source.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Source gives information related to the origin of a value. - */ + /** \brief Source gives information related to the origin of a value. */ class Source { public: enum Source_ENUM { - /** - * The value is provided by input from the process I/O or being calculated from some function. - */ + /** The value is provided by input from the process I/O or being calculated from some function. */ PROCESS, - /** - * The value contains a default value. - */ + /** The value contains a default value. */ DEFAULTED, - /** - * The value is provided by input of an operator or by an automatic source. - */ + /** The value is provided by input of an operator or by an automatic source. */ SUBSTITUTED, }; diff --git a/CGMES_2.4.15_16FEB2016/StateVariablesVersion.cpp b/CGMES_2.4.15_16FEB2016/StateVariablesVersion.cpp index 6cb121be2..f123f86d6 100644 --- a/CGMES_2.4.15_16FEB2016/StateVariablesVersion.cpp +++ b/CGMES_2.4.15_16FEB2016/StateVariablesVersion.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "String.hpp" -#include "String.hpp" -#include "Date.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -StateVariablesVersion::StateVariablesVersion() {}; -StateVariablesVersion::~StateVariablesVersion() {}; +StateVariablesVersion::StateVariablesVersion() {} +StateVariablesVersion::~StateVariablesVersion() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ StateVariablesVersion::getPossibleProfilesForAttributes() const return map; } - -bool assign_StateVariablesVersion_baseUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StateVariablesVersion_baseUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StateVariablesVersion_baseURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StateVariablesVersion_baseURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StateVariablesVersion_date(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StateVariablesVersion_date(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->date = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StateVariablesVersion_differenceModelURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StateVariablesVersion_differenceModelURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->differenceModelURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StateVariablesVersion_entsoeUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StateVariablesVersion_entsoeUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StateVariablesVersion_entsoeURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StateVariablesVersion_entsoeURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StateVariablesVersion_modelDescriptionURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StateVariablesVersion_modelDescriptionURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->modelDescriptionURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StateVariablesVersion_namespaceRDF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StateVariablesVersion_namespaceRDF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceRDF = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StateVariablesVersion_namespaceUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StateVariablesVersion_namespaceUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StateVariablesVersion_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StateVariablesVersion_shortName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->shortName = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_StateVariablesVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseUML; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_StateVariablesVersion_baseUML(const BaseClass* BaseClass_ptr1, std::str bool get_StateVariablesVersion_baseURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseURI; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_StateVariablesVersion_baseURI(const BaseClass* BaseClass_ptr1, std::str bool get_StateVariablesVersion_date(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->date; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_StateVariablesVersion_date(const BaseClass* BaseClass_ptr1, std::string bool get_StateVariablesVersion_differenceModelURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->differenceModelURI; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_StateVariablesVersion_differenceModelURI(const BaseClass* BaseClass_ptr bool get_StateVariablesVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeUML; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_StateVariablesVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::s bool get_StateVariablesVersion_entsoeURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeURI; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_StateVariablesVersion_entsoeURI(const BaseClass* BaseClass_ptr1, std::s bool get_StateVariablesVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->modelDescriptionURI; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_StateVariablesVersion_modelDescriptionURI(const BaseClass* BaseClass_pt bool get_StateVariablesVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceRDF; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_StateVariablesVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std bool get_StateVariablesVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceUML; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_StateVariablesVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std bool get_StateVariablesVersion_shortName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortName; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_StateVariablesVersion_shortName(const BaseClass* BaseClass_ptr1, std::s return false; } - - const char StateVariablesVersion::debugName[] = "StateVariablesVersion"; const char* StateVariablesVersion::debugString() const { @@ -341,21 +346,21 @@ const char* StateVariablesVersion::debugString() const void StateVariablesVersion::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:StateVariablesVersion"), &StateVariablesVersion_factory)); + factory_map.emplace("cim:StateVariablesVersion", &StateVariablesVersion_factory); } void StateVariablesVersion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:StateVariablesVersion.baseUML"), &assign_StateVariablesVersion_baseUML)); - assign_map.insert(std::make_pair(std::string("cim:StateVariablesVersion.baseURI"), &assign_StateVariablesVersion_baseURI)); - assign_map.insert(std::make_pair(std::string("cim:StateVariablesVersion.date"), &assign_StateVariablesVersion_date)); - assign_map.insert(std::make_pair(std::string("cim:StateVariablesVersion.differenceModelURI"), &assign_StateVariablesVersion_differenceModelURI)); - assign_map.insert(std::make_pair(std::string("cim:StateVariablesVersion.entsoeUML"), &assign_StateVariablesVersion_entsoeUML)); - assign_map.insert(std::make_pair(std::string("cim:StateVariablesVersion.entsoeURI"), &assign_StateVariablesVersion_entsoeURI)); - assign_map.insert(std::make_pair(std::string("cim:StateVariablesVersion.modelDescriptionURI"), &assign_StateVariablesVersion_modelDescriptionURI)); - assign_map.insert(std::make_pair(std::string("cim:StateVariablesVersion.namespaceRDF"), &assign_StateVariablesVersion_namespaceRDF)); - assign_map.insert(std::make_pair(std::string("cim:StateVariablesVersion.namespaceUML"), &assign_StateVariablesVersion_namespaceUML)); - assign_map.insert(std::make_pair(std::string("cim:StateVariablesVersion.shortName"), &assign_StateVariablesVersion_shortName)); + assign_map.emplace("cim:StateVariablesVersion.baseUML", &assign_StateVariablesVersion_baseUML); + assign_map.emplace("cim:StateVariablesVersion.baseURI", &assign_StateVariablesVersion_baseURI); + assign_map.emplace("cim:StateVariablesVersion.date", &assign_StateVariablesVersion_date); + assign_map.emplace("cim:StateVariablesVersion.differenceModelURI", &assign_StateVariablesVersion_differenceModelURI); + assign_map.emplace("cim:StateVariablesVersion.entsoeUML", &assign_StateVariablesVersion_entsoeUML); + assign_map.emplace("cim:StateVariablesVersion.entsoeURI", &assign_StateVariablesVersion_entsoeURI); + assign_map.emplace("cim:StateVariablesVersion.modelDescriptionURI", &assign_StateVariablesVersion_modelDescriptionURI); + assign_map.emplace("cim:StateVariablesVersion.namespaceRDF", &assign_StateVariablesVersion_namespaceRDF); + assign_map.emplace("cim:StateVariablesVersion.namespaceUML", &assign_StateVariablesVersion_namespaceUML); + assign_map.emplace("cim:StateVariablesVersion.shortName", &assign_StateVariablesVersion_shortName); } void StateVariablesVersion::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/StateVariablesVersion.hpp b/CGMES_2.4.15_16FEB2016/StateVariablesVersion.hpp index f9f24fef7..d6263d5d7 100644 --- a/CGMES_2.4.15_16FEB2016/StateVariablesVersion.hpp +++ b/CGMES_2.4.15_16FEB2016/StateVariablesVersion.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Version details. - */ + /** \brief Version details. */ class StateVariablesVersion : public BaseClass { public: @@ -28,16 +26,35 @@ namespace CIMPP StateVariablesVersion(); ~StateVariablesVersion() override; - CIMPP::String baseUML; /* Base UML provided by CIM model manager. Default: '' */ - CIMPP::String baseURI; /* Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ - CIMPP::Date date; /* Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ - CIMPP::String differenceModelURI; /* Difference model URI defined by IEC 61970-552. Default: '' */ - CIMPP::String entsoeUML; /* UML provided by ENTSO-E. Default: '' */ - CIMPP::String entsoeURI; /* Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/StateVariables/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ - CIMPP::String modelDescriptionURI; /* Model Description URI defined by IEC 61970-552. Default: '' */ - CIMPP::String namespaceRDF; /* RDF namespace. Default: '' */ - CIMPP::String namespaceUML; /* CIM UML namespace. Default: '' */ - CIMPP::String shortName; /* The short name of the profile used in profile documentation. Default: '' */ + /** \brief Base UML provided by CIM model manager. Default: '' */ + CIMPP::String baseUML; + + /** \brief Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ + CIMPP::String baseURI; + + /** \brief Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ + CIMPP::Date date; + + /** \brief Difference model URI defined by IEC 61970-552. Default: '' */ + CIMPP::String differenceModelURI; + + /** \brief UML provided by ENTSO-E. Default: '' */ + CIMPP::String entsoeUML; + + /** \brief Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/StateVariables/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ + CIMPP::String entsoeURI; + + /** \brief Model Description URI defined by IEC 61970-552. Default: '' */ + CIMPP::String modelDescriptionURI; + + /** \brief RDF namespace. Default: '' */ + CIMPP::String namespaceRDF; + + /** \brief CIM UML namespace. Default: '' */ + CIMPP::String namespaceUML; + + /** \brief The short name of the profile used in profile documentation. Default: '' */ + CIMPP::String shortName; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/StaticLoadModelKind.cpp b/CGMES_2.4.15_16FEB2016/StaticLoadModelKind.cpp index e3d149299..20695a176 100644 --- a/CGMES_2.4.15_16FEB2016/StaticLoadModelKind.cpp +++ b/CGMES_2.4.15_16FEB2016/StaticLoadModelKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "StaticLoadModelKind") + if (EnumSymbol.substr(0, pos) != "StaticLoadModelKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,22 +50,22 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "exponential") + if (EnumSymbol == "exponential") { rop = StaticLoadModelKind::exponential; return lop; } - if(EnumSymbol == "zIP1") + if (EnumSymbol == "zIP1") { rop = StaticLoadModelKind::zIP1; return lop; } - if(EnumSymbol == "zIP2") + if (EnumSymbol == "zIP2") { rop = StaticLoadModelKind::zIP2; return lop; } - if(EnumSymbol == "constantZ") + if (EnumSymbol == "constantZ") { rop = StaticLoadModelKind::constantZ; return lop; diff --git a/CGMES_2.4.15_16FEB2016/StaticLoadModelKind.hpp b/CGMES_2.4.15_16FEB2016/StaticLoadModelKind.hpp index 362cca7ea..2cd61a19c 100644 --- a/CGMES_2.4.15_16FEB2016/StaticLoadModelKind.hpp +++ b/CGMES_2.4.15_16FEB2016/StaticLoadModelKind.hpp @@ -9,29 +9,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of static load model. - */ + /** \brief Type of static load model. */ class StaticLoadModelKind { public: enum StaticLoadModelKind_ENUM { - /** - * Exponential P and Q equations are used and the following attributes are required: kp1, kp2, kp3, kpf, ep1, ep2, ep3 kq1, kq2, kq3, kqf, eq1, eq2, eq3. - */ + /** Exponential P and Q equations are used and the following attributes are required: kp1, kp2, kp3, kpf, ep1, ep2, ep3 kq1, kq2, kq3, kqf, eq1, eq2, eq3. */ exponential, - /** - * ZIP1 P and Q equations are used and the following attributes are required: kp1, kp2, kp3, kpf kq1, kq2, kq3, kqf. - */ + /** ZIP1 P and Q equations are used and the following attributes are required: kp1, kp2, kp3, kpf kq1, kq2, kq3, kqf. */ zIP1, - /** - * This model separates the frequency-dependent load (primarily motors) from other load. ZIP2 P and Q equations are used and the following attributes are required: kp1, kp2, kp3, kq4, kpf kq1, kq2, kq3, kq4, kqf. - */ + /** This model separates the frequency-dependent load (primarily motors) from other load. ZIP2 P and Q equations are used and the following attributes are required: kp1, kp2, kp3, kq4, kpf kq1, kq2, kq3, kq4, kqf. */ zIP2, - /** - * The load is represented as a constant impedance. ConstantZ P and Q equations are used and no attributes are required. - */ + /** The load is represented as a constant impedance. ConstantZ P and Q equations are used and no attributes are required. */ constantZ, }; diff --git a/CGMES_2.4.15_16FEB2016/StaticVarCompensator.cpp b/CGMES_2.4.15_16FEB2016/StaticVarCompensator.cpp index 2bff984da..ae413174a 100644 --- a/CGMES_2.4.15_16FEB2016/StaticVarCompensator.cpp +++ b/CGMES_2.4.15_16FEB2016/StaticVarCompensator.cpp @@ -8,17 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Reactance.hpp" -#include "Reactance.hpp" -#include "ReactivePower.hpp" -#include "SVCControlMode.hpp" -#include "VoltagePerReactivePower.hpp" -#include "Voltage.hpp" using namespace CIMPP; -StaticVarCompensator::StaticVarCompensator() {}; -StaticVarCompensator::~StaticVarCompensator() {}; +StaticVarCompensator::StaticVarCompensator() {} +StaticVarCompensator::~StaticVarCompensator() {} static const std::list PossibleProfilesForClass = { @@ -51,90 +45,94 @@ StaticVarCompensator::getPossibleProfilesForAttributes() const return map; } - -bool assign_StaticVarCompensator_capacitiveRating(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StaticVarCompensator_capacitiveRating(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->capacitiveRating; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StaticVarCompensator_inductiveRating(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StaticVarCompensator_inductiveRating(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inductiveRating; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StaticVarCompensator_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StaticVarCompensator_q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StaticVarCompensator_sVCControlMode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StaticVarCompensator_sVCControlMode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->sVCControlMode; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StaticVarCompensator_slope(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StaticVarCompensator_slope(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->slope; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StaticVarCompensator_voltageSetPoint(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StaticVarCompensator_voltageSetPoint(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->voltageSetPoint; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_StaticVarCompensator_capacitiveRating(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->capacitiveRating; if (!buffer.str().empty()) @@ -148,7 +146,8 @@ bool get_StaticVarCompensator_capacitiveRating(const BaseClass* BaseClass_ptr1, bool get_StaticVarCompensator_inductiveRating(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inductiveRating; if (!buffer.str().empty()) @@ -162,7 +161,8 @@ bool get_StaticVarCompensator_inductiveRating(const BaseClass* BaseClass_ptr1, s bool get_StaticVarCompensator_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q; if (!buffer.str().empty()) @@ -174,11 +174,12 @@ bool get_StaticVarCompensator_q(const BaseClass* BaseClass_ptr1, std::stringstre return false; } -bool get_StaticVarCompensator_slope(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_StaticVarCompensator_sVCControlMode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->slope; + buffer << element->sVCControlMode; if (!buffer.str().empty()) { return true; @@ -188,11 +189,12 @@ bool get_StaticVarCompensator_slope(const BaseClass* BaseClass_ptr1, std::string return false; } -bool get_StaticVarCompensator_voltageSetPoint(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_StaticVarCompensator_slope(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->voltageSetPoint; + buffer << element->slope; if (!buffer.str().empty()) { return true; @@ -202,13 +204,12 @@ bool get_StaticVarCompensator_voltageSetPoint(const BaseClass* BaseClass_ptr1, s return false; } - - -bool get_StaticVarCompensator_sVCControlMode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_StaticVarCompensator_voltageSetPoint(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->sVCControlMode; + buffer << element->voltageSetPoint; if (!buffer.str().empty()) { return true; @@ -226,17 +227,17 @@ const char* StaticVarCompensator::debugString() const void StaticVarCompensator::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:StaticVarCompensator"), &StaticVarCompensator_factory)); + factory_map.emplace("cim:StaticVarCompensator", &StaticVarCompensator_factory); } void StaticVarCompensator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:StaticVarCompensator.capacitiveRating"), &assign_StaticVarCompensator_capacitiveRating)); - assign_map.insert(std::make_pair(std::string("cim:StaticVarCompensator.inductiveRating"), &assign_StaticVarCompensator_inductiveRating)); - assign_map.insert(std::make_pair(std::string("cim:StaticVarCompensator.q"), &assign_StaticVarCompensator_q)); - assign_map.insert(std::make_pair(std::string("cim:StaticVarCompensator.sVCControlMode"), &assign_StaticVarCompensator_sVCControlMode)); - assign_map.insert(std::make_pair(std::string("cim:StaticVarCompensator.slope"), &assign_StaticVarCompensator_slope)); - assign_map.insert(std::make_pair(std::string("cim:StaticVarCompensator.voltageSetPoint"), &assign_StaticVarCompensator_voltageSetPoint)); + assign_map.emplace("cim:StaticVarCompensator.capacitiveRating", &assign_StaticVarCompensator_capacitiveRating); + assign_map.emplace("cim:StaticVarCompensator.inductiveRating", &assign_StaticVarCompensator_inductiveRating); + assign_map.emplace("cim:StaticVarCompensator.q", &assign_StaticVarCompensator_q); + assign_map.emplace("cim:StaticVarCompensator.sVCControlMode", &assign_StaticVarCompensator_sVCControlMode); + assign_map.emplace("cim:StaticVarCompensator.slope", &assign_StaticVarCompensator_slope); + assign_map.emplace("cim:StaticVarCompensator.voltageSetPoint", &assign_StaticVarCompensator_voltageSetPoint); } void StaticVarCompensator::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/StaticVarCompensator.hpp b/CGMES_2.4.15_16FEB2016/StaticVarCompensator.hpp index 02e2be550..b6770d818 100644 --- a/CGMES_2.4.15_16FEB2016/StaticVarCompensator.hpp +++ b/CGMES_2.4.15_16FEB2016/StaticVarCompensator.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A facility for providing variable and controllable shunt reactive power. The SVC typically consists of a stepdown transformer, filter, thyristor-controlled reactor, and thyristor-switched capacitor arms. The SVC may operate in fixed MVar output mode or in voltage control mode. When in voltage control mode, the output of the SVC will be proportional to the deviation of voltage at the controlled bus from the voltage setpoint. The SVC characteristic slope defines the proportion. If the voltage at the controlled bus is equal to the voltage setpoint, the SVC MVar output is zero. - */ + /** \brief A facility for providing variable and controllable shunt reactive power. The SVC typically consists of a stepdown transformer, filter, thyristor-controlled reactor, and thyristor-switched capacitor arms. The SVC may operate in fixed MVar output mode or in voltage control mode. When in voltage control mode, the output of the SVC will be proportional to the deviation of voltage at the controlled bus from the voltage setpoint. The SVC characteristic slope defines the proportion. If the voltage at the controlled bus is equal to the voltage setpoint, the SVC MVar output is zero. */ class StaticVarCompensator : public RegulatingCondEq { public: @@ -31,12 +29,23 @@ namespace CIMPP StaticVarCompensator(); ~StaticVarCompensator() override; - CIMPP::Reactance capacitiveRating; /* Maximum available capacitive reactance. Default: nullptr */ - CIMPP::Reactance inductiveRating; /* Maximum available inductive reactance. Default: nullptr */ - CIMPP::ReactivePower q; /* Reactive power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution. Default: nullptr */ - CIMPP::SVCControlMode sVCControlMode; /* SVC control mode. Default: 0 */ - CIMPP::VoltagePerReactivePower slope; /* The characteristics slope of an SVC defines how the reactive power output changes in proportion to the difference between the regulated bus voltage and the voltage setpoint. Default: nullptr */ - CIMPP::Voltage voltageSetPoint; /* The reactive power output of the SVC is proportional to the difference between the voltage at the regulated bus and the voltage setpoint. When the regulated bus voltage is equal to the voltage setpoint, the reactive power output is zero. Default: nullptr */ + /** \brief Maximum available capacitive reactance. Default: nullptr */ + CIMPP::Reactance capacitiveRating; + + /** \brief Maximum available inductive reactance. Default: nullptr */ + CIMPP::Reactance inductiveRating; + + /** \brief Reactive power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution. Default: nullptr */ + CIMPP::ReactivePower q; + + /** \brief SVC control mode. Default: 0 */ + CIMPP::SVCControlMode sVCControlMode; + + /** \brief The characteristics slope of an SVC defines how the reactive power output changes in proportion to the difference between the regulated bus voltage and the voltage setpoint. Default: nullptr */ + CIMPP::VoltagePerReactivePower slope; + + /** \brief The reactive power output of the SVC is proportional to the difference between the voltage at the regulated bus and the voltage setpoint. When the regulated bus voltage is equal to the voltage setpoint, the reactive power output is zero. Default: nullptr */ + CIMPP::Voltage voltageSetPoint; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/StationSupply.cpp b/CGMES_2.4.15_16FEB2016/StationSupply.cpp index 86990151b..71ca77084 100644 --- a/CGMES_2.4.15_16FEB2016/StationSupply.cpp +++ b/CGMES_2.4.15_16FEB2016/StationSupply.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -StationSupply::StationSupply() {}; -StationSupply::~StationSupply() {}; +StationSupply::StationSupply() {} +StationSupply::~StationSupply() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ StationSupply::getPossibleProfilesForAttributes() const return map; } - - - - - const char StationSupply::debugName[] = "StationSupply"; const char* StationSupply::debugString() const { @@ -52,7 +47,7 @@ const char* StationSupply::debugString() const void StationSupply::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:StationSupply"), &StationSupply_factory)); + factory_map.emplace("cim:StationSupply", &StationSupply_factory); } void StationSupply::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/StationSupply.hpp b/CGMES_2.4.15_16FEB2016/StationSupply.hpp index 728fd30bb..f95e7ce94 100644 --- a/CGMES_2.4.15_16FEB2016/StationSupply.hpp +++ b/CGMES_2.4.15_16FEB2016/StationSupply.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Station supply with load derived from the station output. - */ + /** \brief Station supply with load derived from the station output. */ class StationSupply : public EnergyConsumer { public: @@ -26,7 +24,6 @@ namespace CIMPP StationSupply(); ~StationSupply() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/SteadyStateHypothesisVersion.cpp b/CGMES_2.4.15_16FEB2016/SteadyStateHypothesisVersion.cpp index 802514ff4..3a521cfe8 100644 --- a/CGMES_2.4.15_16FEB2016/SteadyStateHypothesisVersion.cpp +++ b/CGMES_2.4.15_16FEB2016/SteadyStateHypothesisVersion.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "String.hpp" -#include "String.hpp" -#include "Date.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -SteadyStateHypothesisVersion::SteadyStateHypothesisVersion() {}; -SteadyStateHypothesisVersion::~SteadyStateHypothesisVersion() {}; +SteadyStateHypothesisVersion::SteadyStateHypothesisVersion() {} +SteadyStateHypothesisVersion::~SteadyStateHypothesisVersion() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ SteadyStateHypothesisVersion::getPossibleProfilesForAttributes() const return map; } - -bool assign_SteadyStateHypothesisVersion_baseUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SteadyStateHypothesisVersion_baseUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SteadyStateHypothesisVersion_baseURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SteadyStateHypothesisVersion_baseURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SteadyStateHypothesisVersion_date(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SteadyStateHypothesisVersion_date(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->date = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SteadyStateHypothesisVersion_differenceModelURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SteadyStateHypothesisVersion_differenceModelURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->differenceModelURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SteadyStateHypothesisVersion_entsoeUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SteadyStateHypothesisVersion_entsoeUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SteadyStateHypothesisVersion_entsoeURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SteadyStateHypothesisVersion_entsoeURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SteadyStateHypothesisVersion_modelDescriptionURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SteadyStateHypothesisVersion_modelDescriptionURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->modelDescriptionURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SteadyStateHypothesisVersion_namespaceRDF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SteadyStateHypothesisVersion_namespaceRDF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceRDF = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SteadyStateHypothesisVersion_namespaceUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SteadyStateHypothesisVersion_namespaceUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SteadyStateHypothesisVersion_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SteadyStateHypothesisVersion_shortName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->shortName = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_SteadyStateHypothesisVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseUML; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_SteadyStateHypothesisVersion_baseUML(const BaseClass* BaseClass_ptr1, s bool get_SteadyStateHypothesisVersion_baseURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseURI; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_SteadyStateHypothesisVersion_baseURI(const BaseClass* BaseClass_ptr1, s bool get_SteadyStateHypothesisVersion_date(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->date; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_SteadyStateHypothesisVersion_date(const BaseClass* BaseClass_ptr1, std: bool get_SteadyStateHypothesisVersion_differenceModelURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->differenceModelURI; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_SteadyStateHypothesisVersion_differenceModelURI(const BaseClass* BaseCl bool get_SteadyStateHypothesisVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeUML; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_SteadyStateHypothesisVersion_entsoeUML(const BaseClass* BaseClass_ptr1, bool get_SteadyStateHypothesisVersion_entsoeURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeURI; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_SteadyStateHypothesisVersion_entsoeURI(const BaseClass* BaseClass_ptr1, bool get_SteadyStateHypothesisVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->modelDescriptionURI; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_SteadyStateHypothesisVersion_modelDescriptionURI(const BaseClass* BaseC bool get_SteadyStateHypothesisVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceRDF; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_SteadyStateHypothesisVersion_namespaceRDF(const BaseClass* BaseClass_pt bool get_SteadyStateHypothesisVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceUML; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_SteadyStateHypothesisVersion_namespaceUML(const BaseClass* BaseClass_pt bool get_SteadyStateHypothesisVersion_shortName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortName; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_SteadyStateHypothesisVersion_shortName(const BaseClass* BaseClass_ptr1, return false; } - - const char SteadyStateHypothesisVersion::debugName[] = "SteadyStateHypothesisVersion"; const char* SteadyStateHypothesisVersion::debugString() const { @@ -341,21 +346,21 @@ const char* SteadyStateHypothesisVersion::debugString() const void SteadyStateHypothesisVersion::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SteadyStateHypothesisVersion"), &SteadyStateHypothesisVersion_factory)); + factory_map.emplace("cim:SteadyStateHypothesisVersion", &SteadyStateHypothesisVersion_factory); } void SteadyStateHypothesisVersion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SteadyStateHypothesisVersion.baseUML"), &assign_SteadyStateHypothesisVersion_baseUML)); - assign_map.insert(std::make_pair(std::string("cim:SteadyStateHypothesisVersion.baseURI"), &assign_SteadyStateHypothesisVersion_baseURI)); - assign_map.insert(std::make_pair(std::string("cim:SteadyStateHypothesisVersion.date"), &assign_SteadyStateHypothesisVersion_date)); - assign_map.insert(std::make_pair(std::string("cim:SteadyStateHypothesisVersion.differenceModelURI"), &assign_SteadyStateHypothesisVersion_differenceModelURI)); - assign_map.insert(std::make_pair(std::string("cim:SteadyStateHypothesisVersion.entsoeUML"), &assign_SteadyStateHypothesisVersion_entsoeUML)); - assign_map.insert(std::make_pair(std::string("cim:SteadyStateHypothesisVersion.entsoeURI"), &assign_SteadyStateHypothesisVersion_entsoeURI)); - assign_map.insert(std::make_pair(std::string("cim:SteadyStateHypothesisVersion.modelDescriptionURI"), &assign_SteadyStateHypothesisVersion_modelDescriptionURI)); - assign_map.insert(std::make_pair(std::string("cim:SteadyStateHypothesisVersion.namespaceRDF"), &assign_SteadyStateHypothesisVersion_namespaceRDF)); - assign_map.insert(std::make_pair(std::string("cim:SteadyStateHypothesisVersion.namespaceUML"), &assign_SteadyStateHypothesisVersion_namespaceUML)); - assign_map.insert(std::make_pair(std::string("cim:SteadyStateHypothesisVersion.shortName"), &assign_SteadyStateHypothesisVersion_shortName)); + assign_map.emplace("cim:SteadyStateHypothesisVersion.baseUML", &assign_SteadyStateHypothesisVersion_baseUML); + assign_map.emplace("cim:SteadyStateHypothesisVersion.baseURI", &assign_SteadyStateHypothesisVersion_baseURI); + assign_map.emplace("cim:SteadyStateHypothesisVersion.date", &assign_SteadyStateHypothesisVersion_date); + assign_map.emplace("cim:SteadyStateHypothesisVersion.differenceModelURI", &assign_SteadyStateHypothesisVersion_differenceModelURI); + assign_map.emplace("cim:SteadyStateHypothesisVersion.entsoeUML", &assign_SteadyStateHypothesisVersion_entsoeUML); + assign_map.emplace("cim:SteadyStateHypothesisVersion.entsoeURI", &assign_SteadyStateHypothesisVersion_entsoeURI); + assign_map.emplace("cim:SteadyStateHypothesisVersion.modelDescriptionURI", &assign_SteadyStateHypothesisVersion_modelDescriptionURI); + assign_map.emplace("cim:SteadyStateHypothesisVersion.namespaceRDF", &assign_SteadyStateHypothesisVersion_namespaceRDF); + assign_map.emplace("cim:SteadyStateHypothesisVersion.namespaceUML", &assign_SteadyStateHypothesisVersion_namespaceUML); + assign_map.emplace("cim:SteadyStateHypothesisVersion.shortName", &assign_SteadyStateHypothesisVersion_shortName); } void SteadyStateHypothesisVersion::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/SteadyStateHypothesisVersion.hpp b/CGMES_2.4.15_16FEB2016/SteadyStateHypothesisVersion.hpp index 007f35230..a856a19e7 100644 --- a/CGMES_2.4.15_16FEB2016/SteadyStateHypothesisVersion.hpp +++ b/CGMES_2.4.15_16FEB2016/SteadyStateHypothesisVersion.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Version details. - */ + /** \brief Version details. */ class SteadyStateHypothesisVersion : public BaseClass { public: @@ -28,16 +26,35 @@ namespace CIMPP SteadyStateHypothesisVersion(); ~SteadyStateHypothesisVersion() override; - CIMPP::String baseUML; /* Base UML provided by CIM model manager. Default: '' */ - CIMPP::String baseURI; /* Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ - CIMPP::Date date; /* Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ - CIMPP::String differenceModelURI; /* Difference model URI defined by IEC 61970-552. Default: '' */ - CIMPP::String entsoeUML; /* UML provided by ENTSO-E. Default: '' */ - CIMPP::String entsoeURI; /* Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/SteadyStateHypothesis/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ - CIMPP::String modelDescriptionURI; /* Model Description URI defined by IEC 61970-552. Default: '' */ - CIMPP::String namespaceRDF; /* RDF namespace. Default: '' */ - CIMPP::String namespaceUML; /* CIM UML namespace. Default: '' */ - CIMPP::String shortName; /* The short name of the profile used in profile documentation. Default: '' */ + /** \brief Base UML provided by CIM model manager. Default: '' */ + CIMPP::String baseUML; + + /** \brief Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ + CIMPP::String baseURI; + + /** \brief Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ + CIMPP::Date date; + + /** \brief Difference model URI defined by IEC 61970-552. Default: '' */ + CIMPP::String differenceModelURI; + + /** \brief UML provided by ENTSO-E. Default: '' */ + CIMPP::String entsoeUML; + + /** \brief Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/SteadyStateHypothesis/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ + CIMPP::String entsoeURI; + + /** \brief Model Description URI defined by IEC 61970-552. Default: '' */ + CIMPP::String modelDescriptionURI; + + /** \brief RDF namespace. Default: '' */ + CIMPP::String namespaceRDF; + + /** \brief CIM UML namespace. Default: '' */ + CIMPP::String namespaceUML; + + /** \brief The short name of the profile used in profile documentation. Default: '' */ + CIMPP::String shortName; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/String.hpp b/CGMES_2.4.15_16FEB2016/String.hpp index 60fcbbbc0..8c3dbedcf 100644 --- a/CGMES_2.4.15_16FEB2016/String.hpp +++ b/CGMES_2.4.15_16FEB2016/String.hpp @@ -4,22 +4,20 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen */ -#include #include #include +#include namespace CIMPP { - /* - A string consisting of a sequence of characters. The character encoding is UTF-8. The string length is unspecified and unlimited. - */ + /** \brief A string consisting of a sequence of characters. The character encoding is UTF-8. The string length is unspecified and unlimited. */ class String { public: String() : initialized(false) {} String(const std::string& value) : value(value), initialized(true) {} - String& operator=(const std::string &rop); + String& operator=(const std::string& rop); operator std::string() const; std::string value; diff --git a/CGMES_2.4.15_16FEB2016/StringMeasurement.cpp b/CGMES_2.4.15_16FEB2016/StringMeasurement.cpp index 6b03b449d..ca7025e57 100644 --- a/CGMES_2.4.15_16FEB2016/StringMeasurement.cpp +++ b/CGMES_2.4.15_16FEB2016/StringMeasurement.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -StringMeasurement::StringMeasurement() {}; -StringMeasurement::~StringMeasurement() {}; +StringMeasurement::StringMeasurement() {} +StringMeasurement::~StringMeasurement() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ StringMeasurement::getPossibleProfilesForAttributes() const return map; } - - bool assign_StringMeasurementValue_StringMeasurement(BaseClass*, BaseClass*); bool assign_StringMeasurement_StringMeasurementValues(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_StringMeasurement_StringMeasurementValues(BaseClass* BaseClass_ptr1, } - const char StringMeasurement::debugName[] = "StringMeasurement"; const char* StringMeasurement::debugString() const { @@ -69,7 +66,7 @@ const char* StringMeasurement::debugString() const void StringMeasurement::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:StringMeasurement"), &StringMeasurement_factory)); + factory_map.emplace("cim:StringMeasurement", &StringMeasurement_factory); } void StringMeasurement::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void StringMeasurement::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:StringMeasurement.StringMeasurementValues"), &assign_StringMeasurement_StringMeasurementValues)); + assign_map.emplace("cim:StringMeasurement.StringMeasurementValues", &assign_StringMeasurement_StringMeasurementValues); } void StringMeasurement::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/StringMeasurement.hpp b/CGMES_2.4.15_16FEB2016/StringMeasurement.hpp index a4e95edb8..21841ff08 100644 --- a/CGMES_2.4.15_16FEB2016/StringMeasurement.hpp +++ b/CGMES_2.4.15_16FEB2016/StringMeasurement.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class StringMeasurementValue; - /* - StringMeasurement represents a measurement with values of type string. - */ + /** \brief StringMeasurement represents a measurement with values of type string. */ class StringMeasurement : public Measurement { public: @@ -27,7 +25,8 @@ namespace CIMPP StringMeasurement(); ~StringMeasurement() override; - std::list StringMeasurementValues; /* The values connected to this measurement. Default: 0 */ + /** \brief The values connected to this measurement. Default: 0 */ + std::list StringMeasurementValues; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/StringMeasurementValue.cpp b/CGMES_2.4.15_16FEB2016/StringMeasurementValue.cpp index 57ab9da48..217c82c6c 100644 --- a/CGMES_2.4.15_16FEB2016/StringMeasurementValue.cpp +++ b/CGMES_2.4.15_16FEB2016/StringMeasurementValue.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "StringMeasurement.hpp" -#include "String.hpp" using namespace CIMPP; -StringMeasurementValue::StringMeasurementValue() : StringMeasurement(nullptr) {}; -StringMeasurementValue::~StringMeasurementValue() {}; +StringMeasurementValue::StringMeasurementValue() : StringMeasurement(nullptr) {} +StringMeasurementValue::~StringMeasurementValue() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ StringMeasurementValue::getPossibleProfilesForAttributes() const return map; } - -bool assign_StringMeasurementValue_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (StringMeasurementValue* element = dynamic_cast(BaseClass_ptr1)) - { - element->value = buffer.str(); - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_StringMeasurement_StringMeasurementValues(BaseClass*, BaseClass*); bool assign_StringMeasurementValue_StringMeasurement(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_StringMeasurementValue_StringMeasurement(BaseClass* BaseClass_ptr1, return false; } -bool get_StringMeasurementValue_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_StringMeasurementValue_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const StringMeasurementValue* element = dynamic_cast(BaseClass_ptr1)) + StringMeasurementValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->value; - if (!buffer.str().empty()) + element->value = buffer.str(); + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_StringMeasurementValue_StringMeasurement(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const StringMeasurementValue* element = dynamic_cast(BaseClass_ptr1)) + const StringMeasurementValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->StringMeasurement != 0) { @@ -102,6 +86,20 @@ bool get_StringMeasurementValue_StringMeasurement(const BaseClass* BaseClass_ptr return false; } +bool get_StringMeasurementValue_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const StringMeasurementValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->value; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char StringMeasurementValue::debugName[] = "StringMeasurementValue"; const char* StringMeasurementValue::debugString() const @@ -111,17 +109,17 @@ const char* StringMeasurementValue::debugString() const void StringMeasurementValue::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:StringMeasurementValue"), &StringMeasurementValue_factory)); + factory_map.emplace("cim:StringMeasurementValue", &StringMeasurementValue_factory); } void StringMeasurementValue::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:StringMeasurementValue.value"), &assign_StringMeasurementValue_value)); + assign_map.emplace("cim:StringMeasurementValue.value", &assign_StringMeasurementValue_value); } void StringMeasurementValue::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:StringMeasurementValue.StringMeasurement"), &assign_StringMeasurementValue_StringMeasurement)); + assign_map.emplace("cim:StringMeasurementValue.StringMeasurement", &assign_StringMeasurementValue_StringMeasurement); } void StringMeasurementValue::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/StringMeasurementValue.hpp b/CGMES_2.4.15_16FEB2016/StringMeasurementValue.hpp index 2c22c626b..1207671b5 100644 --- a/CGMES_2.4.15_16FEB2016/StringMeasurementValue.hpp +++ b/CGMES_2.4.15_16FEB2016/StringMeasurementValue.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class StringMeasurement; - /* - StringMeasurementValue represents a measurement value of type string. - */ + /** \brief StringMeasurementValue represents a measurement value of type string. */ class StringMeasurementValue : public MeasurementValue { public: @@ -28,8 +26,11 @@ namespace CIMPP StringMeasurementValue(); ~StringMeasurementValue() override; - CIMPP::StringMeasurement* StringMeasurement; /* Measurement to which this value is connected. Default: 0 */ - CIMPP::String value; /* The value to supervise. Default: '' */ + /** \brief Measurement to which this value is connected. Default: 0 */ + CIMPP::StringMeasurement* StringMeasurement; + + /** \brief The value to supervise. Default: '' */ + CIMPP::String value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/SubGeographicalRegion.cpp b/CGMES_2.4.15_16FEB2016/SubGeographicalRegion.cpp index ed9222e4d..2bc1a8c1b 100644 --- a/CGMES_2.4.15_16FEB2016/SubGeographicalRegion.cpp +++ b/CGMES_2.4.15_16FEB2016/SubGeographicalRegion.cpp @@ -9,14 +9,14 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "DCLine.hpp" -#include "Line.hpp" #include "GeographicalRegion.hpp" +#include "Line.hpp" #include "Substation.hpp" using namespace CIMPP; -SubGeographicalRegion::SubGeographicalRegion() : Region(nullptr) {}; -SubGeographicalRegion::~SubGeographicalRegion() {}; +SubGeographicalRegion::SubGeographicalRegion() : Region(nullptr) {} +SubGeographicalRegion::~SubGeographicalRegion() {} static const std::list PossibleProfilesForClass = { @@ -47,8 +47,6 @@ SubGeographicalRegion::getPossibleProfilesForAttributes() const return map; } - - bool assign_DCLine_Region(BaseClass*, BaseClass*); bool assign_SubGeographicalRegion_DCLines(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -65,6 +63,7 @@ bool assign_SubGeographicalRegion_DCLines(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_Line_Region(BaseClass*, BaseClass*); bool assign_SubGeographicalRegion_Lines(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -81,6 +80,7 @@ bool assign_SubGeographicalRegion_Lines(BaseClass* BaseClass_ptr1, BaseClass* Ba } return false; } + bool assign_GeographicalRegion_Regions(BaseClass*, BaseClass*); bool assign_SubGeographicalRegion_Region(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -97,6 +97,7 @@ bool assign_SubGeographicalRegion_Region(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_Substation_Region(BaseClass*, BaseClass*); bool assign_SubGeographicalRegion_Substations(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -115,9 +116,11 @@ bool assign_SubGeographicalRegion_Substations(BaseClass* BaseClass_ptr1, BaseCla } + bool get_SubGeographicalRegion_Region(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SubGeographicalRegion* element = dynamic_cast(BaseClass_ptr1)) + const SubGeographicalRegion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Region != 0) { @@ -137,7 +140,7 @@ const char* SubGeographicalRegion::debugString() const void SubGeographicalRegion::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SubGeographicalRegion"), &SubGeographicalRegion_factory)); + factory_map.emplace("cim:SubGeographicalRegion", &SubGeographicalRegion_factory); } void SubGeographicalRegion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -146,10 +149,10 @@ void SubGeographicalRegion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SubGeographicalRegion.DCLines"), &assign_SubGeographicalRegion_DCLines)); - assign_map.insert(std::make_pair(std::string("cim:SubGeographicalRegion.Lines"), &assign_SubGeographicalRegion_Lines)); - assign_map.insert(std::make_pair(std::string("cim:SubGeographicalRegion.Region"), &assign_SubGeographicalRegion_Region)); - assign_map.insert(std::make_pair(std::string("cim:SubGeographicalRegion.Substations"), &assign_SubGeographicalRegion_Substations)); + assign_map.emplace("cim:SubGeographicalRegion.DCLines", &assign_SubGeographicalRegion_DCLines); + assign_map.emplace("cim:SubGeographicalRegion.Lines", &assign_SubGeographicalRegion_Lines); + assign_map.emplace("cim:SubGeographicalRegion.Region", &assign_SubGeographicalRegion_Region); + assign_map.emplace("cim:SubGeographicalRegion.Substations", &assign_SubGeographicalRegion_Substations); } void SubGeographicalRegion::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/SubGeographicalRegion.hpp b/CGMES_2.4.15_16FEB2016/SubGeographicalRegion.hpp index 72c6f96f9..27232b895 100644 --- a/CGMES_2.4.15_16FEB2016/SubGeographicalRegion.hpp +++ b/CGMES_2.4.15_16FEB2016/SubGeographicalRegion.hpp @@ -20,9 +20,7 @@ namespace CIMPP class Line; class Substation; - /* - A subset of a geographical region of a power system network model. - */ + /** \brief A subset of a geographical region of a power system network model. */ class SubGeographicalRegion : public IdentifiedObject { public: @@ -30,10 +28,17 @@ namespace CIMPP SubGeographicalRegion(); ~SubGeographicalRegion() override; - std::list DCLines; /* Default: 0 */ - std::list Lines; /* The sub-geographical region of the line. Default: 0 */ - CIMPP::GeographicalRegion* Region; /* The geographical region to which this sub-geographical region is within. Default: 0 */ - std::list Substations; /* The substations in this sub-geographical region. Default: 0 */ + /** \brief Default: 0 */ + std::list DCLines; + + /** \brief The sub-geographical region of the line. Default: 0 */ + std::list Lines; + + /** \brief The geographical region to which this sub-geographical region is within. Default: 0 */ + CIMPP::GeographicalRegion* Region; + + /** \brief The substations in this sub-geographical region. Default: 0 */ + std::list Substations; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/SubLoadArea.cpp b/CGMES_2.4.15_16FEB2016/SubLoadArea.cpp index 6cf7e03f8..b14f7db79 100644 --- a/CGMES_2.4.15_16FEB2016/SubLoadArea.cpp +++ b/CGMES_2.4.15_16FEB2016/SubLoadArea.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -SubLoadArea::SubLoadArea() : LoadArea(nullptr) {}; -SubLoadArea::~SubLoadArea() {}; +SubLoadArea::SubLoadArea() : LoadArea(nullptr) {} +SubLoadArea::~SubLoadArea() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ SubLoadArea::getPossibleProfilesForAttributes() const return map; } - - bool assign_LoadArea_SubLoadAreas(BaseClass*, BaseClass*); bool assign_SubLoadArea_LoadArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_SubLoadArea_LoadArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass } return false; } + bool assign_LoadGroup_SubLoadArea(BaseClass*, BaseClass*); bool assign_SubLoadArea_LoadGroups(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_SubLoadArea_LoadGroups(BaseClass* BaseClass_ptr1, BaseClass* BaseCla return false; } - bool get_SubLoadArea_LoadArea(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SubLoadArea* element = dynamic_cast(BaseClass_ptr1)) + const SubLoadArea* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->LoadArea != 0) { @@ -100,7 +99,7 @@ const char* SubLoadArea::debugString() const void SubLoadArea::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SubLoadArea"), &SubLoadArea_factory)); + factory_map.emplace("cim:SubLoadArea", &SubLoadArea_factory); } void SubLoadArea::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -109,8 +108,8 @@ void SubLoadArea::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SubLoadArea.LoadArea"), &assign_SubLoadArea_LoadArea)); - assign_map.insert(std::make_pair(std::string("cim:SubLoadArea.LoadGroups"), &assign_SubLoadArea_LoadGroups)); + assign_map.emplace("cim:SubLoadArea.LoadArea", &assign_SubLoadArea_LoadArea); + assign_map.emplace("cim:SubLoadArea.LoadGroups", &assign_SubLoadArea_LoadGroups); } void SubLoadArea::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/SubLoadArea.hpp b/CGMES_2.4.15_16FEB2016/SubLoadArea.hpp index 6d39dc9ee..eb2947510 100644 --- a/CGMES_2.4.15_16FEB2016/SubLoadArea.hpp +++ b/CGMES_2.4.15_16FEB2016/SubLoadArea.hpp @@ -18,9 +18,7 @@ namespace CIMPP class LoadArea; class LoadGroup; - /* - The class is the second level in a hierarchical structure for grouping of loads for the purpose of load flow load scaling. - */ + /** \brief The class is the second level in a hierarchical structure for grouping of loads for the purpose of load flow load scaling. */ class SubLoadArea : public EnergyArea { public: @@ -28,8 +26,11 @@ namespace CIMPP SubLoadArea(); ~SubLoadArea() override; - CIMPP::LoadArea* LoadArea; /* The LoadArea where the SubLoadArea belongs. Default: 0 */ - std::list LoadGroups; /* The Loadgroups in the SubLoadArea. Default: 0 */ + /** \brief The LoadArea where the SubLoadArea belongs. Default: 0 */ + CIMPP::LoadArea* LoadArea; + + /** \brief The Loadgroups in the SubLoadArea. Default: 0 */ + std::list LoadGroups; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Substation.cpp b/CGMES_2.4.15_16FEB2016/Substation.cpp index 8a8f525bf..d0d5471ff 100644 --- a/CGMES_2.4.15_16FEB2016/Substation.cpp +++ b/CGMES_2.4.15_16FEB2016/Substation.cpp @@ -14,8 +14,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Substation::Substation() : Region(nullptr) {}; -Substation::~Substation() {}; +Substation::Substation() : Region(nullptr) {} +Substation::~Substation() {} static const std::list PossibleProfilesForClass = { @@ -44,8 +44,6 @@ Substation::getPossibleProfilesForAttributes() const return map; } - - bool assign_DCConverterUnit_Substation(BaseClass*, BaseClass*); bool assign_Substation_DCConverterUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -62,6 +60,7 @@ bool assign_Substation_DCConverterUnit(BaseClass* BaseClass_ptr1, BaseClass* Bas } return false; } + bool assign_SubGeographicalRegion_Substations(BaseClass*, BaseClass*); bool assign_Substation_Region(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -78,6 +77,7 @@ bool assign_Substation_Region(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_pt } return false; } + bool assign_VoltageLevel_Substation(BaseClass*, BaseClass*); bool assign_Substation_VoltageLevels(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -98,7 +98,8 @@ bool assign_Substation_VoltageLevels(BaseClass* BaseClass_ptr1, BaseClass* BaseC bool get_Substation_Region(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Substation* element = dynamic_cast(BaseClass_ptr1)) + const Substation* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Region != 0) { @@ -118,7 +119,7 @@ const char* Substation::debugString() const void Substation::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Substation"), &Substation_factory)); + factory_map.emplace("cim:Substation", &Substation_factory); } void Substation::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -127,9 +128,9 @@ void Substation::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Substation.DCConverterUnit"), &assign_Substation_DCConverterUnit)); - assign_map.insert(std::make_pair(std::string("cim:Substation.Region"), &assign_Substation_Region)); - assign_map.insert(std::make_pair(std::string("cim:Substation.VoltageLevels"), &assign_Substation_VoltageLevels)); + assign_map.emplace("cim:Substation.DCConverterUnit", &assign_Substation_DCConverterUnit); + assign_map.emplace("cim:Substation.Region", &assign_Substation_Region); + assign_map.emplace("cim:Substation.VoltageLevels", &assign_Substation_VoltageLevels); } void Substation::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/Substation.hpp b/CGMES_2.4.15_16FEB2016/Substation.hpp index ddeb6c98f..57ef9396c 100644 --- a/CGMES_2.4.15_16FEB2016/Substation.hpp +++ b/CGMES_2.4.15_16FEB2016/Substation.hpp @@ -19,9 +19,7 @@ namespace CIMPP class SubGeographicalRegion; class VoltageLevel; - /* - A collection of equipment for purposes other than generation or utilization, through which electric energy in bulk is passed for the purposes of switching or modifying its characteristics. - */ + /** \brief A collection of equipment for purposes other than generation or utilization, through which electric energy in bulk is passed for the purposes of switching or modifying its characteristics. */ class Substation : public EquipmentContainer { public: @@ -29,9 +27,14 @@ namespace CIMPP Substation(); ~Substation() override; - std::list DCConverterUnit; /* Default: 0 */ - CIMPP::SubGeographicalRegion* Region; /* The SubGeographicalRegion containing the substation. Default: 0 */ - std::list VoltageLevels; /* The voltage levels within this substation. Default: 0 */ + /** \brief Default: 0 */ + std::list DCConverterUnit; + + /** \brief The SubGeographicalRegion containing the substation. Default: 0 */ + CIMPP::SubGeographicalRegion* Region; + + /** \brief The voltage levels within this substation. Default: 0 */ + std::list VoltageLevels; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Susceptance.hpp b/CGMES_2.4.15_16FEB2016/Susceptance.hpp index c213337b1..f98655834 100644 --- a/CGMES_2.4.15_16FEB2016/Susceptance.hpp +++ b/CGMES_2.4.15_16FEB2016/Susceptance.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Imaginary part of admittance. - */ + /** \brief Imaginary part of admittance. */ class Susceptance { public: diff --git a/CGMES_2.4.15_16FEB2016/SvInjection.cpp b/CGMES_2.4.15_16FEB2016/SvInjection.cpp index 568fdb45e..4b2198756 100644 --- a/CGMES_2.4.15_16FEB2016/SvInjection.cpp +++ b/CGMES_2.4.15_16FEB2016/SvInjection.cpp @@ -9,13 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "TopologicalNode.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" using namespace CIMPP; -SvInjection::SvInjection() : TopologicalNode(nullptr) {}; -SvInjection::~SvInjection() {}; +SvInjection::SvInjection() : TopologicalNode(nullptr) {} +SvInjection::~SvInjection() {} static const std::list PossibleProfilesForClass = { @@ -44,70 +42,71 @@ SvInjection::getPossibleProfilesForAttributes() const return map; } - -bool assign_SvInjection_pInjection(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologicalNode_SvInjection(BaseClass*, BaseClass*); +bool assign_SvInjection_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (SvInjection* element = dynamic_cast(BaseClass_ptr1)) + SvInjection* element = dynamic_cast(BaseClass_ptr1); + TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->pInjection; - if (buffer.fail()) - return false; - else - return true; + if (element->TopologicalNode != element2) + { + element->TopologicalNode = element2; + return assign_TopologicalNode_SvInjection(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_SvInjection_qInjection(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SvInjection_pInjection(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SvInjection* element = dynamic_cast(BaseClass_ptr1)) + SvInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->qInjection; - if (buffer.fail()) - return false; - else + buffer >> element->pInjection; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_TopologicalNode_SvInjection(BaseClass*, BaseClass*); -bool assign_SvInjection_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_SvInjection_qInjection(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { SvInjection* element = dynamic_cast(BaseClass_ptr1); - TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->TopologicalNode != element2) + buffer >> element->qInjection; + if (!buffer.fail()) { - element->TopologicalNode = element2; - return assign_TopologicalNode_SvInjection(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool get_SvInjection_pInjection(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SvInjection_TopologicalNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SvInjection* element = dynamic_cast(BaseClass_ptr1)) + const SvInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->pInjection; - if (!buffer.str().empty()) + if (element->TopologicalNode != 0) { + BaseClass_list.push_back(element->TopologicalNode); return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_SvInjection_qInjection(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SvInjection_pInjection(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SvInjection* element = dynamic_cast(BaseClass_ptr1)) + const SvInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->qInjection; + buffer << element->pInjection; if (!buffer.str().empty()) { return true; @@ -117,21 +116,21 @@ bool get_SvInjection_qInjection(const BaseClass* BaseClass_ptr1, std::stringstre return false; } - -bool get_SvInjection_TopologicalNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) +bool get_SvInjection_qInjection(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SvInjection* element = dynamic_cast(BaseClass_ptr1)) + const SvInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->TopologicalNode != 0) + buffer << element->qInjection; + if (!buffer.str().empty()) { - BaseClass_list.push_back(element->TopologicalNode); return true; } } + buffer.setstate(std::ios::failbit); return false; } - const char SvInjection::debugName[] = "SvInjection"; const char* SvInjection::debugString() const { @@ -140,18 +139,18 @@ const char* SvInjection::debugString() const void SvInjection::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SvInjection"), &SvInjection_factory)); + factory_map.emplace("cim:SvInjection", &SvInjection_factory); } void SvInjection::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvInjection.pInjection"), &assign_SvInjection_pInjection)); - assign_map.insert(std::make_pair(std::string("cim:SvInjection.qInjection"), &assign_SvInjection_qInjection)); + assign_map.emplace("cim:SvInjection.pInjection", &assign_SvInjection_pInjection); + assign_map.emplace("cim:SvInjection.qInjection", &assign_SvInjection_qInjection); } void SvInjection::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvInjection.TopologicalNode"), &assign_SvInjection_TopologicalNode)); + assign_map.emplace("cim:SvInjection.TopologicalNode", &assign_SvInjection_TopologicalNode); } void SvInjection::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/SvInjection.hpp b/CGMES_2.4.15_16FEB2016/SvInjection.hpp index 88e58a1b2..73b97137a 100644 --- a/CGMES_2.4.15_16FEB2016/SvInjection.hpp +++ b/CGMES_2.4.15_16FEB2016/SvInjection.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class TopologicalNode; - /* - The SvInjection is reporting the calculated bus injection minus the sum of the terminal flows. The terminal flow is positive out from the bus (load sign convention) and bus injection has positive flow into the bus. SvInjection may have the remainder after state estimation or slack after power flow calculation. - */ + /** \brief The SvInjection is reporting the calculated bus injection minus the sum of the terminal flows. The terminal flow is positive out from the bus (load sign convention) and bus injection has positive flow into the bus. SvInjection may have the remainder after state estimation or slack after power flow calculation. */ class SvInjection : public BaseClass { public: @@ -29,9 +27,14 @@ namespace CIMPP SvInjection(); ~SvInjection() override; - CIMPP::TopologicalNode* TopologicalNode; /* The injection flows state variables associated with the topological node. Default: 0 */ - CIMPP::ActivePower pInjection; /* The active power injected into the bus in addition to injections from equipment terminals. Positive sign means injection into the TopologicalNode (bus). Default: nullptr */ - CIMPP::ReactivePower qInjection; /* The reactive power injected into the bus in addition to injections from equipment terminals. Positive sign means injection into the TopologicalNode (bus). Default: nullptr */ + /** \brief The injection flows state variables associated with the topological node. Default: 0 */ + CIMPP::TopologicalNode* TopologicalNode; + + /** \brief The active power injected into the bus in addition to injections from equipment terminals. Positive sign means injection into the TopologicalNode (bus). Default: nullptr */ + CIMPP::ActivePower pInjection; + + /** \brief The reactive power injected into the bus in addition to injections from equipment terminals. Positive sign means injection into the TopologicalNode (bus). Default: nullptr */ + CIMPP::ReactivePower qInjection; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/SvPowerFlow.cpp b/CGMES_2.4.15_16FEB2016/SvPowerFlow.cpp index c2d0e86a0..dfc4eab2e 100644 --- a/CGMES_2.4.15_16FEB2016/SvPowerFlow.cpp +++ b/CGMES_2.4.15_16FEB2016/SvPowerFlow.cpp @@ -9,13 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "Terminal.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" using namespace CIMPP; -SvPowerFlow::SvPowerFlow() : Terminal(nullptr) {}; -SvPowerFlow::~SvPowerFlow() {}; +SvPowerFlow::SvPowerFlow() : Terminal(nullptr) {} +SvPowerFlow::~SvPowerFlow() {} static const std::list PossibleProfilesForClass = { @@ -44,70 +42,71 @@ SvPowerFlow::getPossibleProfilesForAttributes() const return map; } - -bool assign_SvPowerFlow_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Terminal_SvPowerFlow(BaseClass*, BaseClass*); +bool assign_SvPowerFlow_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (SvPowerFlow* element = dynamic_cast(BaseClass_ptr1)) + SvPowerFlow* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->p; - if (buffer.fail()) - return false; - else - return true; + if (element->Terminal != element2) + { + element->Terminal = element2; + return assign_Terminal_SvPowerFlow(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_SvPowerFlow_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SvPowerFlow_p(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SvPowerFlow* element = dynamic_cast(BaseClass_ptr1)) + SvPowerFlow* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->q; - if (buffer.fail()) - return false; - else + buffer >> element->p; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_Terminal_SvPowerFlow(BaseClass*, BaseClass*); -bool assign_SvPowerFlow_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_SvPowerFlow_q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { SvPowerFlow* element = dynamic_cast(BaseClass_ptr1); - Terminal* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->Terminal != element2) + buffer >> element->q; + if (!buffer.fail()) { - element->Terminal = element2; - return assign_Terminal_SvPowerFlow(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool get_SvPowerFlow_p(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SvPowerFlow_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SvPowerFlow* element = dynamic_cast(BaseClass_ptr1)) + const SvPowerFlow* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->p; - if (!buffer.str().empty()) + if (element->Terminal != 0) { + BaseClass_list.push_back(element->Terminal); return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_SvPowerFlow_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SvPowerFlow_p(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SvPowerFlow* element = dynamic_cast(BaseClass_ptr1)) + const SvPowerFlow* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->q; + buffer << element->p; if (!buffer.str().empty()) { return true; @@ -117,21 +116,21 @@ bool get_SvPowerFlow_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - -bool get_SvPowerFlow_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) +bool get_SvPowerFlow_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SvPowerFlow* element = dynamic_cast(BaseClass_ptr1)) + const SvPowerFlow* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->Terminal != 0) + buffer << element->q; + if (!buffer.str().empty()) { - BaseClass_list.push_back(element->Terminal); return true; } } + buffer.setstate(std::ios::failbit); return false; } - const char SvPowerFlow::debugName[] = "SvPowerFlow"; const char* SvPowerFlow::debugString() const { @@ -140,18 +139,18 @@ const char* SvPowerFlow::debugString() const void SvPowerFlow::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SvPowerFlow"), &SvPowerFlow_factory)); + factory_map.emplace("cim:SvPowerFlow", &SvPowerFlow_factory); } void SvPowerFlow::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvPowerFlow.p"), &assign_SvPowerFlow_p)); - assign_map.insert(std::make_pair(std::string("cim:SvPowerFlow.q"), &assign_SvPowerFlow_q)); + assign_map.emplace("cim:SvPowerFlow.p", &assign_SvPowerFlow_p); + assign_map.emplace("cim:SvPowerFlow.q", &assign_SvPowerFlow_q); } void SvPowerFlow::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvPowerFlow.Terminal"), &assign_SvPowerFlow_Terminal)); + assign_map.emplace("cim:SvPowerFlow.Terminal", &assign_SvPowerFlow_Terminal); } void SvPowerFlow::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/SvPowerFlow.hpp b/CGMES_2.4.15_16FEB2016/SvPowerFlow.hpp index b42f057c1..a27cce2a2 100644 --- a/CGMES_2.4.15_16FEB2016/SvPowerFlow.hpp +++ b/CGMES_2.4.15_16FEB2016/SvPowerFlow.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class Terminal; - /* - State variable for power flow. Load convention is used for flow direction. This means flow out from the TopologicalNode into the equipment is positive. - */ + /** \brief State variable for power flow. Load convention is used for flow direction. This means flow out from the TopologicalNode into the equipment is positive. */ class SvPowerFlow : public BaseClass { public: @@ -29,9 +27,14 @@ namespace CIMPP SvPowerFlow(); ~SvPowerFlow() override; - CIMPP::Terminal* Terminal; /* The terminal associated with the power flow state variable. Default: 0 */ - CIMPP::ActivePower p; /* The active power flow. Load sign convention is used, i.e. positive sign means flow out from a TopologicalNode (bus) into the conducting equipment. Default: nullptr */ - CIMPP::ReactivePower q; /* The reactive power flow. Load sign convention is used, i.e. positive sign means flow out from a TopologicalNode (bus) into the conducting equipment. Default: nullptr */ + /** \brief The terminal associated with the power flow state variable. Default: 0 */ + CIMPP::Terminal* Terminal; + + /** \brief The active power flow. Load sign convention is used, i.e. positive sign means flow out from a TopologicalNode (bus) into the conducting equipment. Default: nullptr */ + CIMPP::ActivePower p; + + /** \brief The reactive power flow. Load sign convention is used, i.e. positive sign means flow out from a TopologicalNode (bus) into the conducting equipment. Default: nullptr */ + CIMPP::ReactivePower q; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/SvShuntCompensatorSections.cpp b/CGMES_2.4.15_16FEB2016/SvShuntCompensatorSections.cpp index ea26dfa08..a14be0d1b 100644 --- a/CGMES_2.4.15_16FEB2016/SvShuntCompensatorSections.cpp +++ b/CGMES_2.4.15_16FEB2016/SvShuntCompensatorSections.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ShuntCompensator.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -SvShuntCompensatorSections::SvShuntCompensatorSections() : ShuntCompensator(nullptr) {}; -SvShuntCompensatorSections::~SvShuntCompensatorSections() {}; +SvShuntCompensatorSections::SvShuntCompensatorSections() : ShuntCompensator(nullptr) {} +SvShuntCompensatorSections::~SvShuntCompensatorSections() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ SvShuntCompensatorSections::getPossibleProfilesForAttributes() const return map; } - -bool assign_SvShuntCompensatorSections_sections(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (SvShuntCompensatorSections* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->sections; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ShuntCompensator_SvShuntCompensatorSections(BaseClass*, BaseClass*); bool assign_SvShuntCompensatorSections_ShuntCompensator(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_SvShuntCompensatorSections_ShuntCompensator(BaseClass* BaseClass_ptr return false; } -bool get_SvShuntCompensatorSections_sections(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_SvShuntCompensatorSections_sections(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const SvShuntCompensatorSections* element = dynamic_cast(BaseClass_ptr1)) + SvShuntCompensatorSections* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->sections; - if (!buffer.str().empty()) + buffer >> element->sections; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_SvShuntCompensatorSections_ShuntCompensator(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SvShuntCompensatorSections* element = dynamic_cast(BaseClass_ptr1)) + const SvShuntCompensatorSections* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ShuntCompensator != 0) { @@ -102,6 +86,20 @@ bool get_SvShuntCompensatorSections_ShuntCompensator(const BaseClass* BaseClass_ return false; } +bool get_SvShuntCompensatorSections_sections(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const SvShuntCompensatorSections* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->sections; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char SvShuntCompensatorSections::debugName[] = "SvShuntCompensatorSections"; const char* SvShuntCompensatorSections::debugString() const @@ -111,17 +109,17 @@ const char* SvShuntCompensatorSections::debugString() const void SvShuntCompensatorSections::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SvShuntCompensatorSections"), &SvShuntCompensatorSections_factory)); + factory_map.emplace("cim:SvShuntCompensatorSections", &SvShuntCompensatorSections_factory); } void SvShuntCompensatorSections::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvShuntCompensatorSections.sections"), &assign_SvShuntCompensatorSections_sections)); + assign_map.emplace("cim:SvShuntCompensatorSections.sections", &assign_SvShuntCompensatorSections_sections); } void SvShuntCompensatorSections::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvShuntCompensatorSections.ShuntCompensator"), &assign_SvShuntCompensatorSections_ShuntCompensator)); + assign_map.emplace("cim:SvShuntCompensatorSections.ShuntCompensator", &assign_SvShuntCompensatorSections_ShuntCompensator); } void SvShuntCompensatorSections::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/SvShuntCompensatorSections.hpp b/CGMES_2.4.15_16FEB2016/SvShuntCompensatorSections.hpp index 5fbb8611d..357a98c95 100644 --- a/CGMES_2.4.15_16FEB2016/SvShuntCompensatorSections.hpp +++ b/CGMES_2.4.15_16FEB2016/SvShuntCompensatorSections.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ShuntCompensator; - /* - State variable for the number of sections in service for a shunt compensator. - */ + /** \brief State variable for the number of sections in service for a shunt compensator. */ class SvShuntCompensatorSections : public BaseClass { public: @@ -28,8 +26,11 @@ namespace CIMPP SvShuntCompensatorSections(); ~SvShuntCompensatorSections() override; - CIMPP::ShuntCompensator* ShuntCompensator; /* The shunt compensator for which the state applies. Default: 0 */ - CIMPP::Simple_Float sections; /* The number of sections in service as a continous variable. To get integer value scale with ShuntCompensator.bPerSection. Default: nullptr */ + /** \brief The shunt compensator for which the state applies. Default: 0 */ + CIMPP::ShuntCompensator* ShuntCompensator; + + /** \brief The number of sections in service as a continous variable. To get integer value scale with ShuntCompensator.bPerSection. Default: nullptr */ + CIMPP::Simple_Float sections; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/SvStatus.cpp b/CGMES_2.4.15_16FEB2016/SvStatus.cpp index 3ab5f6a66..17aca7359 100644 --- a/CGMES_2.4.15_16FEB2016/SvStatus.cpp +++ b/CGMES_2.4.15_16FEB2016/SvStatus.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ConductingEquipment.hpp" -#include "Boolean.hpp" using namespace CIMPP; -SvStatus::SvStatus() : ConductingEquipment(nullptr) {}; -SvStatus::~SvStatus() {}; +SvStatus::SvStatus() : ConductingEquipment(nullptr) {} +SvStatus::~SvStatus() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ SvStatus::getPossibleProfilesForAttributes() const return map; } - -bool assign_SvStatus_inService(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (SvStatus* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->inService; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ConductingEquipment_SvStatus(BaseClass*, BaseClass*); bool assign_SvStatus_ConductingEquipment(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_SvStatus_ConductingEquipment(BaseClass* BaseClass_ptr1, BaseClass* B return false; } -bool get_SvStatus_inService(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_SvStatus_inService(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const SvStatus* element = dynamic_cast(BaseClass_ptr1)) + SvStatus* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->inService; - if (!buffer.str().empty()) + buffer >> element->inService; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_SvStatus_ConductingEquipment(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SvStatus* element = dynamic_cast(BaseClass_ptr1)) + const SvStatus* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ConductingEquipment != 0) { @@ -102,6 +86,20 @@ bool get_SvStatus_ConductingEquipment(const BaseClass* BaseClass_ptr1, std::list return false; } +bool get_SvStatus_inService(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const SvStatus* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inService; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char SvStatus::debugName[] = "SvStatus"; const char* SvStatus::debugString() const @@ -111,17 +109,17 @@ const char* SvStatus::debugString() const void SvStatus::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SvStatus"), &SvStatus_factory)); + factory_map.emplace("cim:SvStatus", &SvStatus_factory); } void SvStatus::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvStatus.inService"), &assign_SvStatus_inService)); + assign_map.emplace("cim:SvStatus.inService", &assign_SvStatus_inService); } void SvStatus::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvStatus.ConductingEquipment"), &assign_SvStatus_ConductingEquipment)); + assign_map.emplace("cim:SvStatus.ConductingEquipment", &assign_SvStatus_ConductingEquipment); } void SvStatus::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/SvStatus.hpp b/CGMES_2.4.15_16FEB2016/SvStatus.hpp index e93a0b476..e1b7266b5 100644 --- a/CGMES_2.4.15_16FEB2016/SvStatus.hpp +++ b/CGMES_2.4.15_16FEB2016/SvStatus.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ConductingEquipment; - /* - State variable for status. - */ + /** \brief State variable for status. */ class SvStatus : public BaseClass { public: @@ -28,8 +26,11 @@ namespace CIMPP SvStatus(); ~SvStatus() override; - CIMPP::ConductingEquipment* ConductingEquipment; /* The conducting equipment associated with the status state variable. Default: 0 */ - CIMPP::Boolean inService; /* The in service status as a result of topology processing. Default: false */ + /** \brief The conducting equipment associated with the status state variable. Default: 0 */ + CIMPP::ConductingEquipment* ConductingEquipment; + + /** \brief The in service status as a result of topology processing. Default: false */ + CIMPP::Boolean inService; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/SvTapStep.cpp b/CGMES_2.4.15_16FEB2016/SvTapStep.cpp index 63dafc3ea..717c92b1a 100644 --- a/CGMES_2.4.15_16FEB2016/SvTapStep.cpp +++ b/CGMES_2.4.15_16FEB2016/SvTapStep.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "TapChanger.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -SvTapStep::SvTapStep() : TapChanger(nullptr) {}; -SvTapStep::~SvTapStep() {}; +SvTapStep::SvTapStep() : TapChanger(nullptr) {} +SvTapStep::~SvTapStep() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ SvTapStep::getPossibleProfilesForAttributes() const return map; } - -bool assign_SvTapStep_position(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (SvTapStep* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->position; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_TapChanger_SvTapStep(BaseClass*, BaseClass*); bool assign_SvTapStep_TapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_SvTapStep_TapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass return false; } -bool get_SvTapStep_position(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_SvTapStep_position(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const SvTapStep* element = dynamic_cast(BaseClass_ptr1)) + SvTapStep* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->position; - if (!buffer.str().empty()) + buffer >> element->position; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_SvTapStep_TapChanger(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SvTapStep* element = dynamic_cast(BaseClass_ptr1)) + const SvTapStep* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->TapChanger != 0) { @@ -102,6 +86,20 @@ bool get_SvTapStep_TapChanger(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->position; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char SvTapStep::debugName[] = "SvTapStep"; const char* SvTapStep::debugString() const @@ -111,17 +109,17 @@ const char* SvTapStep::debugString() const void SvTapStep::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SvTapStep"), &SvTapStep_factory)); + factory_map.emplace("cim:SvTapStep", &SvTapStep_factory); } void SvTapStep::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvTapStep.position"), &assign_SvTapStep_position)); + assign_map.emplace("cim:SvTapStep.position", &assign_SvTapStep_position); } void SvTapStep::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvTapStep.TapChanger"), &assign_SvTapStep_TapChanger)); + assign_map.emplace("cim:SvTapStep.TapChanger", &assign_SvTapStep_TapChanger); } void SvTapStep::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/SvTapStep.hpp b/CGMES_2.4.15_16FEB2016/SvTapStep.hpp index 7a0d6e63e..57f08cda1 100644 --- a/CGMES_2.4.15_16FEB2016/SvTapStep.hpp +++ b/CGMES_2.4.15_16FEB2016/SvTapStep.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class TapChanger; - /* - State variable for transformer tap step. This class is to be used for taps of LTC (load tap changing) transformers, not fixed tap transformers. - */ + /** \brief State variable for transformer tap step. This class is to be used for taps of LTC (load tap changing) transformers, not fixed tap transformers. */ class SvTapStep : public BaseClass { public: @@ -28,8 +26,11 @@ namespace CIMPP SvTapStep(); ~SvTapStep() override; - CIMPP::TapChanger* TapChanger; /* The tap changer associated with the tap step state. Default: 0 */ - CIMPP::Simple_Float position; /* The floating point tap position. This is not the tap ratio, but rather the tap step position as defined by the related tap changer model and normally is constrained to be within the range of minimum and maximum tap positions. Default: nullptr */ + /** \brief The tap changer associated with the tap step state. Default: 0 */ + CIMPP::TapChanger* TapChanger; + + /** \brief The floating point tap position. This is not the tap ratio, but rather the tap step position as defined by the related tap changer model and normally is constrained to be within the range of minimum and maximum tap positions. Default: nullptr */ + CIMPP::Simple_Float position; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/SvVoltage.cpp b/CGMES_2.4.15_16FEB2016/SvVoltage.cpp index 9d4c2a6dd..697cd57c5 100644 --- a/CGMES_2.4.15_16FEB2016/SvVoltage.cpp +++ b/CGMES_2.4.15_16FEB2016/SvVoltage.cpp @@ -9,13 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "TopologicalNode.hpp" -#include "AngleDegrees.hpp" -#include "Voltage.hpp" using namespace CIMPP; -SvVoltage::SvVoltage() : TopologicalNode(nullptr) {}; -SvVoltage::~SvVoltage() {}; +SvVoltage::SvVoltage() : TopologicalNode(nullptr) {} +SvVoltage::~SvVoltage() {} static const std::list PossibleProfilesForClass = { @@ -44,70 +42,71 @@ SvVoltage::getPossibleProfilesForAttributes() const return map; } - -bool assign_SvVoltage_angle(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologicalNode_SvVoltage(BaseClass*, BaseClass*); +bool assign_SvVoltage_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (SvVoltage* element = dynamic_cast(BaseClass_ptr1)) + SvVoltage* element = dynamic_cast(BaseClass_ptr1); + TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->angle; - if (buffer.fail()) - return false; - else - return true; + if (element->TopologicalNode != element2) + { + element->TopologicalNode = element2; + return assign_TopologicalNode_SvVoltage(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_SvVoltage_v(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SvVoltage_angle(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SvVoltage* element = dynamic_cast(BaseClass_ptr1)) + SvVoltage* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->v; - if (buffer.fail()) - return false; - else + buffer >> element->angle; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_TopologicalNode_SvVoltage(BaseClass*, BaseClass*); -bool assign_SvVoltage_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_SvVoltage_v(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { SvVoltage* element = dynamic_cast(BaseClass_ptr1); - TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->TopologicalNode != element2) + buffer >> element->v; + if (!buffer.fail()) { - element->TopologicalNode = element2; - return assign_TopologicalNode_SvVoltage(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool get_SvVoltage_angle(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SvVoltage_TopologicalNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SvVoltage* element = dynamic_cast(BaseClass_ptr1)) + const SvVoltage* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->angle; - if (!buffer.str().empty()) + if (element->TopologicalNode != 0) { + BaseClass_list.push_back(element->TopologicalNode); return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_SvVoltage_v(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SvVoltage_angle(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SvVoltage* element = dynamic_cast(BaseClass_ptr1)) + const SvVoltage* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->v; + buffer << element->angle; if (!buffer.str().empty()) { return true; @@ -117,21 +116,21 @@ bool get_SvVoltage_v(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - -bool get_SvVoltage_TopologicalNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) +bool get_SvVoltage_v(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SvVoltage* element = dynamic_cast(BaseClass_ptr1)) + const SvVoltage* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->TopologicalNode != 0) + buffer << element->v; + if (!buffer.str().empty()) { - BaseClass_list.push_back(element->TopologicalNode); return true; } } + buffer.setstate(std::ios::failbit); return false; } - const char SvVoltage::debugName[] = "SvVoltage"; const char* SvVoltage::debugString() const { @@ -140,18 +139,18 @@ const char* SvVoltage::debugString() const void SvVoltage::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SvVoltage"), &SvVoltage_factory)); + factory_map.emplace("cim:SvVoltage", &SvVoltage_factory); } void SvVoltage::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvVoltage.angle"), &assign_SvVoltage_angle)); - assign_map.insert(std::make_pair(std::string("cim:SvVoltage.v"), &assign_SvVoltage_v)); + assign_map.emplace("cim:SvVoltage.angle", &assign_SvVoltage_angle); + assign_map.emplace("cim:SvVoltage.v", &assign_SvVoltage_v); } void SvVoltage::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvVoltage.TopologicalNode"), &assign_SvVoltage_TopologicalNode)); + assign_map.emplace("cim:SvVoltage.TopologicalNode", &assign_SvVoltage_TopologicalNode); } void SvVoltage::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/SvVoltage.hpp b/CGMES_2.4.15_16FEB2016/SvVoltage.hpp index 629e92f49..04595982a 100644 --- a/CGMES_2.4.15_16FEB2016/SvVoltage.hpp +++ b/CGMES_2.4.15_16FEB2016/SvVoltage.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class TopologicalNode; - /* - State variable for voltage. - */ + /** \brief State variable for voltage. */ class SvVoltage : public BaseClass { public: @@ -29,9 +27,14 @@ namespace CIMPP SvVoltage(); ~SvVoltage() override; - CIMPP::TopologicalNode* TopologicalNode; /* The state voltage associated with the topological node. Default: 0 */ - CIMPP::AngleDegrees angle; /* The voltage angle of the topological node complex voltage with respect to system reference. Default: nullptr */ - CIMPP::Voltage v; /* The voltage magnitude of the topological node. Default: nullptr */ + /** \brief The state voltage associated with the topological node. Default: 0 */ + CIMPP::TopologicalNode* TopologicalNode; + + /** \brief The voltage angle of the topological node complex voltage with respect to system reference. Default: nullptr */ + CIMPP::AngleDegrees angle; + + /** \brief The voltage magnitude of the topological node. Default: nullptr */ + CIMPP::Voltage v; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Switch.cpp b/CGMES_2.4.15_16FEB2016/Switch.cpp index bcd8d6aca..5f84a2d7a 100644 --- a/CGMES_2.4.15_16FEB2016/Switch.cpp +++ b/CGMES_2.4.15_16FEB2016/Switch.cpp @@ -9,15 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "SwitchSchedule.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "CurrentFlow.hpp" -#include "Boolean.hpp" using namespace CIMPP; -Switch::Switch() {}; -Switch::~Switch() {}; +Switch::Switch() {} +Switch::~Switch() {} static const std::list PossibleProfilesForClass = { @@ -49,80 +45,84 @@ Switch::getPossibleProfilesForAttributes() const return map; } - -bool assign_Switch_normalOpen(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SwitchSchedule_Switch(BaseClass*, BaseClass*); +bool assign_Switch_SwitchSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (Switch* element = dynamic_cast(BaseClass_ptr1)) + Switch* element = dynamic_cast(BaseClass_ptr1); + SwitchSchedule* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->normalOpen; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->SwitchSchedules.begin(), element->SwitchSchedules.end(), element2) == element->SwitchSchedules.end()) + { + element->SwitchSchedules.push_back(element2); + return assign_SwitchSchedule_Switch(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_Switch_open(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Switch_normalOpen(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Switch* element = dynamic_cast(BaseClass_ptr1)) + Switch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->open; - if (buffer.fail()) - return false; - else + buffer >> element->normalOpen; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Switch_ratedCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Switch_open(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Switch* element = dynamic_cast(BaseClass_ptr1)) + Switch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->ratedCurrent; - if (buffer.fail()) - return false; - else + buffer >> element->open; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Switch_retained(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Switch_ratedCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Switch* element = dynamic_cast(BaseClass_ptr1)) + Switch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->retained; - if (buffer.fail()) - return false; - else + buffer >> element->ratedCurrent; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_SwitchSchedule_Switch(BaseClass*, BaseClass*); -bool assign_Switch_SwitchSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_Switch_retained(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { Switch* element = dynamic_cast(BaseClass_ptr1); - SwitchSchedule* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->SwitchSchedules.begin(), element->SwitchSchedules.end(), element2) == element->SwitchSchedules.end()) + buffer >> element->retained; + if (!buffer.fail()) { - element->SwitchSchedules.push_back(element2); - return assign_SwitchSchedule_Switch(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_Switch_normalOpen(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Switch* element = dynamic_cast(BaseClass_ptr1)) + const Switch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->normalOpen; if (!buffer.str().empty()) @@ -136,7 +136,8 @@ bool get_Switch_normalOpen(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_Switch_open(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Switch* element = dynamic_cast(BaseClass_ptr1)) + const Switch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->open; if (!buffer.str().empty()) @@ -150,7 +151,8 @@ bool get_Switch_open(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Switch_ratedCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Switch* element = dynamic_cast(BaseClass_ptr1)) + const Switch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedCurrent; if (!buffer.str().empty()) @@ -164,7 +166,8 @@ bool get_Switch_ratedCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_Switch_retained(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Switch* element = dynamic_cast(BaseClass_ptr1)) + const Switch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->retained; if (!buffer.str().empty()) @@ -176,8 +179,6 @@ bool get_Switch_retained(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } - - const char Switch::debugName[] = "Switch"; const char* Switch::debugString() const { @@ -186,20 +187,20 @@ const char* Switch::debugString() const void Switch::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Switch"), &Switch_factory)); + factory_map.emplace("cim:Switch", &Switch_factory); } void Switch::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Switch.normalOpen"), &assign_Switch_normalOpen)); - assign_map.insert(std::make_pair(std::string("cim:Switch.open"), &assign_Switch_open)); - assign_map.insert(std::make_pair(std::string("cim:Switch.ratedCurrent"), &assign_Switch_ratedCurrent)); - assign_map.insert(std::make_pair(std::string("cim:Switch.retained"), &assign_Switch_retained)); + assign_map.emplace("cim:Switch.normalOpen", &assign_Switch_normalOpen); + assign_map.emplace("cim:Switch.open", &assign_Switch_open); + assign_map.emplace("cim:Switch.ratedCurrent", &assign_Switch_ratedCurrent); + assign_map.emplace("cim:Switch.retained", &assign_Switch_retained); } void Switch::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Switch.SwitchSchedules"), &assign_Switch_SwitchSchedules)); + assign_map.emplace("cim:Switch.SwitchSchedules", &assign_Switch_SwitchSchedules); } void Switch::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/Switch.hpp b/CGMES_2.4.15_16FEB2016/Switch.hpp index 4139a8582..1b8c13160 100644 --- a/CGMES_2.4.15_16FEB2016/Switch.hpp +++ b/CGMES_2.4.15_16FEB2016/Switch.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class SwitchSchedule; - /* - A generic device designed to close, or open, or both, one or more electric circuits. All switches are two terminal devices including grounding switches. - */ + /** \brief A generic device designed to close, or open, or both, one or more electric circuits. All switches are two terminal devices including grounding switches. */ class Switch : public ConductingEquipment { public: @@ -29,11 +27,20 @@ namespace CIMPP Switch(); ~Switch() override; - std::list SwitchSchedules; /* A SwitchSchedule is associated with a Switch. Default: 0 */ - CIMPP::Boolean normalOpen; /* The attribute is used in cases when no Measurement for the status value is present. If the Switch has a status measurement the Discrete.normalValue is expected to match with the Switch.normalOpen. Default: false */ - CIMPP::Boolean open; /* The attribute tells if the switch is considered open when used as input to topology processing. Default: false */ - CIMPP::CurrentFlow ratedCurrent; /* The maximum continuous current carrying capacity in amps governed by the device material and construction. Default: nullptr */ - CIMPP::Boolean retained; /* Branch is retained in a bus branch model. The flow through retained switches will normally be calculated in power flow. Default: false */ + /** \brief A SwitchSchedule is associated with a Switch. Default: 0 */ + std::list SwitchSchedules; + + /** \brief The attribute is used in cases when no Measurement for the status value is present. If the Switch has a status measurement the Discrete.normalValue is expected to match with the Switch.normalOpen. Default: false */ + CIMPP::Boolean normalOpen; + + /** \brief The attribute tells if the switch is considered open when used as input to topology processing. Default: false */ + CIMPP::Boolean open; + + /** \brief The maximum continuous current carrying capacity in amps governed by the device material and construction. Default: nullptr */ + CIMPP::CurrentFlow ratedCurrent; + + /** \brief Branch is retained in a bus branch model. The flow through retained switches will normally be calculated in power flow. Default: false */ + CIMPP::Boolean retained; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/SwitchSchedule.cpp b/CGMES_2.4.15_16FEB2016/SwitchSchedule.cpp index 01f9175cf..17357887b 100644 --- a/CGMES_2.4.15_16FEB2016/SwitchSchedule.cpp +++ b/CGMES_2.4.15_16FEB2016/SwitchSchedule.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -SwitchSchedule::SwitchSchedule() : Switch(nullptr) {}; -SwitchSchedule::~SwitchSchedule() {}; +SwitchSchedule::SwitchSchedule() : Switch(nullptr) {} +SwitchSchedule::~SwitchSchedule() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ SwitchSchedule::getPossibleProfilesForAttributes() const return map; } - - bool assign_Switch_SwitchSchedules(BaseClass*, BaseClass*); bool assign_SwitchSchedule_Switch(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_SwitchSchedule_Switch(BaseClass* BaseClass_ptr1, BaseClass* BaseClas return false; } - bool get_SwitchSchedule_Switch(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SwitchSchedule* element = dynamic_cast(BaseClass_ptr1)) + const SwitchSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Switch != 0) { @@ -73,7 +71,6 @@ bool get_SwitchSchedule_Switch(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SwitchSchedule"), &SwitchSchedule_factory)); + factory_map.emplace("cim:SwitchSchedule", &SwitchSchedule_factory); } void SwitchSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void SwitchSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SwitchSchedule.Switch"), &assign_SwitchSchedule_Switch)); + assign_map.emplace("cim:SwitchSchedule.Switch", &assign_SwitchSchedule_Switch); } void SwitchSchedule::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/SwitchSchedule.hpp b/CGMES_2.4.15_16FEB2016/SwitchSchedule.hpp index 7304bc07e..929ce0e77 100644 --- a/CGMES_2.4.15_16FEB2016/SwitchSchedule.hpp +++ b/CGMES_2.4.15_16FEB2016/SwitchSchedule.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class Switch; - /* - A schedule of switch positions. If RegularTimePoint.value1 is 0, the switch is open. If 1, the switch is closed. - */ + /** \brief A schedule of switch positions. If RegularTimePoint.value1 is 0, the switch is open. If 1, the switch is closed. */ class SwitchSchedule : public SeasonDayTypeSchedule { public: @@ -27,7 +25,8 @@ namespace CIMPP SwitchSchedule(); ~SwitchSchedule() override; - CIMPP::Switch* Switch; /* A Switch can be associated with SwitchSchedules. Default: 0 */ + /** \brief A Switch can be associated with SwitchSchedules. Default: 0 */ + CIMPP::Switch* Switch; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/SynchronousMachine.cpp b/CGMES_2.4.15_16FEB2016/SynchronousMachine.cpp index a5ac49a77..deb1e1cca 100644 --- a/CGMES_2.4.15_16FEB2016/SynchronousMachine.cpp +++ b/CGMES_2.4.15_16FEB2016/SynchronousMachine.cpp @@ -10,32 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "ReactiveCapabilityCurve.hpp" #include "SynchronousMachineDynamics.hpp" -#include "Boolean.hpp" -#include "Resistance.hpp" -#include "Reactance.hpp" -#include "CurrentFlow.hpp" -#include "ReactivePower.hpp" -#include "ReactivePower.hpp" -#include "Simple_Float.hpp" -#include "SynchronousMachineOperatingMode.hpp" -#include "PerCent.hpp" -#include "Resistance.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Integer.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ShortCircuitRotorKind.hpp" -#include "SynchronousMachineKind.hpp" -#include "PerCent.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -SynchronousMachine::SynchronousMachine() : InitialReactiveCapabilityCurve(nullptr), SynchronousMachineDynamics(nullptr) {}; -SynchronousMachine::~SynchronousMachine() {}; +SynchronousMachine::SynchronousMachine() : InitialReactiveCapabilityCurve(nullptr), SynchronousMachineDynamics(nullptr) {} +SynchronousMachine::~SynchronousMachine() {} static const std::list PossibleProfilesForClass = { @@ -86,317 +65,353 @@ SynchronousMachine::getPossibleProfilesForAttributes() const return map; } +bool assign_ReactiveCapabilityCurve_InitiallyUsedBySynchronousMachines(BaseClass*, BaseClass*); +bool assign_SynchronousMachine_InitialReactiveCapabilityCurve(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + ReactiveCapabilityCurve* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->InitialReactiveCapabilityCurve != element2) + { + element->InitialReactiveCapabilityCurve = element2; + return assign_ReactiveCapabilityCurve_InitiallyUsedBySynchronousMachines(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_SynchronousMachine_earthing(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineDynamics_SynchronousMachine(BaseClass*, BaseClass*); +bool assign_SynchronousMachine_SynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + SynchronousMachineDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->SynchronousMachineDynamics != element2) + { + element->SynchronousMachineDynamics = element2; + return assign_SynchronousMachineDynamics_SynchronousMachine(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_SynchronousMachine_earthing(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->earthing; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_earthingStarPointR(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_earthingStarPointR(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->earthingStarPointR; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_earthingStarPointX(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_earthingStarPointX(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->earthingStarPointX; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_ikk(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_ikk(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ikk; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_maxQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_maxQ(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxQ; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_minQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_minQ(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minQ; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_mu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_mu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_operatingMode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_operatingMode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->operatingMode; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_qPercent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_qPercent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qPercent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_r0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_r2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_r2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_referencePriority(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_referencePriority(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->referencePriority; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_satDirectSubtransX(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_satDirectSubtransX(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->satDirectSubtransX; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_satDirectSyncX(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_satDirectSyncX(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->satDirectSyncX; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_satDirectTransX(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_satDirectTransX(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->satDirectTransX; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_shortCircuitRotorType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_shortCircuitRotorType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->shortCircuitRotorType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_voltageRegulationRange(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_voltageRegulationRange(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->voltageRegulationRange; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_x0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x0; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_SynchronousMachine_x2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->x2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_ReactiveCapabilityCurve_InitiallyUsedBySynchronousMachines(BaseClass*, BaseClass*); -bool assign_SynchronousMachine_InitialReactiveCapabilityCurve(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_SynchronousMachine_x2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); - ReactiveCapabilityCurve* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->InitialReactiveCapabilityCurve != element2) + buffer >> element->x2; + if (!buffer.fail()) { - element->InitialReactiveCapabilityCurve = element2; - return assign_ReactiveCapabilityCurve_InitiallyUsedBySynchronousMachines(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_SynchronousMachineDynamics_SynchronousMachine(BaseClass*, BaseClass*); -bool assign_SynchronousMachine_SynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool get_SynchronousMachine_InitialReactiveCapabilityCurve(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); - SynchronousMachineDynamics* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->SynchronousMachineDynamics != element2) + if (element->InitialReactiveCapabilityCurve != 0) { - element->SynchronousMachineDynamics = element2; - return assign_SynchronousMachineDynamics_SynchronousMachine(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->InitialReactiveCapabilityCurve); + return true; } - return true; } return false; } + bool get_SynchronousMachine_earthing(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->earthing; if (!buffer.str().empty()) @@ -410,7 +425,8 @@ bool get_SynchronousMachine_earthing(const BaseClass* BaseClass_ptr1, std::strin bool get_SynchronousMachine_earthingStarPointR(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->earthingStarPointR; if (!buffer.str().empty()) @@ -424,7 +440,8 @@ bool get_SynchronousMachine_earthingStarPointR(const BaseClass* BaseClass_ptr1, bool get_SynchronousMachine_earthingStarPointX(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->earthingStarPointX; if (!buffer.str().empty()) @@ -438,7 +455,8 @@ bool get_SynchronousMachine_earthingStarPointX(const BaseClass* BaseClass_ptr1, bool get_SynchronousMachine_ikk(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ikk; if (!buffer.str().empty()) @@ -452,7 +470,8 @@ bool get_SynchronousMachine_ikk(const BaseClass* BaseClass_ptr1, std::stringstre bool get_SynchronousMachine_maxQ(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxQ; if (!buffer.str().empty()) @@ -466,7 +485,8 @@ bool get_SynchronousMachine_maxQ(const BaseClass* BaseClass_ptr1, std::stringstr bool get_SynchronousMachine_minQ(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minQ; if (!buffer.str().empty()) @@ -480,7 +500,8 @@ bool get_SynchronousMachine_minQ(const BaseClass* BaseClass_ptr1, std::stringstr bool get_SynchronousMachine_mu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mu; if (!buffer.str().empty()) @@ -492,9 +513,25 @@ bool get_SynchronousMachine_mu(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } +bool get_SynchronousMachine_operatingMode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->operatingMode; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_SynchronousMachine_qPercent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qPercent; if (!buffer.str().empty()) @@ -508,7 +545,8 @@ bool get_SynchronousMachine_qPercent(const BaseClass* BaseClass_ptr1, std::strin bool get_SynchronousMachine_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -522,7 +560,8 @@ bool get_SynchronousMachine_r(const BaseClass* BaseClass_ptr1, std::stringstream bool get_SynchronousMachine_r0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r0; if (!buffer.str().empty()) @@ -536,7 +575,8 @@ bool get_SynchronousMachine_r0(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_SynchronousMachine_r2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r2; if (!buffer.str().empty()) @@ -550,7 +590,8 @@ bool get_SynchronousMachine_r2(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_SynchronousMachine_referencePriority(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->referencePriority; if (!buffer.str().empty()) @@ -564,7 +605,8 @@ bool get_SynchronousMachine_referencePriority(const BaseClass* BaseClass_ptr1, s bool get_SynchronousMachine_satDirectSubtransX(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->satDirectSubtransX; if (!buffer.str().empty()) @@ -578,7 +620,8 @@ bool get_SynchronousMachine_satDirectSubtransX(const BaseClass* BaseClass_ptr1, bool get_SynchronousMachine_satDirectSyncX(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->satDirectSyncX; if (!buffer.str().empty()) @@ -592,7 +635,8 @@ bool get_SynchronousMachine_satDirectSyncX(const BaseClass* BaseClass_ptr1, std: bool get_SynchronousMachine_satDirectTransX(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->satDirectTransX; if (!buffer.str().empty()) @@ -604,25 +648,12 @@ bool get_SynchronousMachine_satDirectTransX(const BaseClass* BaseClass_ptr1, std return false; } -bool get_SynchronousMachine_voltageRegulationRange(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->voltageRegulationRange; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - -bool get_SynchronousMachine_x0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachine_shortCircuitRotorType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->x0; + buffer << element->shortCircuitRotorType; if (!buffer.str().empty()) { return true; @@ -632,11 +663,12 @@ bool get_SynchronousMachine_x0(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } -bool get_SynchronousMachine_x2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachine_type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->x2; + buffer << element->type; if (!buffer.str().empty()) { return true; @@ -646,26 +678,12 @@ bool get_SynchronousMachine_x2(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } - -bool get_SynchronousMachine_InitialReactiveCapabilityCurve(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->InitialReactiveCapabilityCurve != 0) - { - BaseClass_list.push_back(element->InitialReactiveCapabilityCurve); - return true; - } - } - return false; -} - - -bool get_SynchronousMachine_operatingMode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachine_voltageRegulationRange(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->operatingMode; + buffer << element->voltageRegulationRange; if (!buffer.str().empty()) { return true; @@ -675,11 +693,12 @@ bool get_SynchronousMachine_operatingMode(const BaseClass* BaseClass_ptr1, std:: return false; } -bool get_SynchronousMachine_shortCircuitRotorType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachine_x0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->shortCircuitRotorType; + buffer << element->x0; if (!buffer.str().empty()) { return true; @@ -689,11 +708,12 @@ bool get_SynchronousMachine_shortCircuitRotorType(const BaseClass* BaseClass_ptr return false; } -bool get_SynchronousMachine_type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachine_x2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->type; + buffer << element->x2; if (!buffer.str().empty()) { return true; @@ -711,38 +731,38 @@ const char* SynchronousMachine::debugString() const void SynchronousMachine::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SynchronousMachine"), &SynchronousMachine_factory)); + factory_map.emplace("cim:SynchronousMachine", &SynchronousMachine_factory); } void SynchronousMachine::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.earthing"), &assign_SynchronousMachine_earthing)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.earthingStarPointR"), &assign_SynchronousMachine_earthingStarPointR)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.earthingStarPointX"), &assign_SynchronousMachine_earthingStarPointX)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.ikk"), &assign_SynchronousMachine_ikk)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.maxQ"), &assign_SynchronousMachine_maxQ)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.minQ"), &assign_SynchronousMachine_minQ)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.mu"), &assign_SynchronousMachine_mu)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.operatingMode"), &assign_SynchronousMachine_operatingMode)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.qPercent"), &assign_SynchronousMachine_qPercent)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.r"), &assign_SynchronousMachine_r)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.r0"), &assign_SynchronousMachine_r0)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.r2"), &assign_SynchronousMachine_r2)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.referencePriority"), &assign_SynchronousMachine_referencePriority)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.satDirectSubtransX"), &assign_SynchronousMachine_satDirectSubtransX)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.satDirectSyncX"), &assign_SynchronousMachine_satDirectSyncX)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.satDirectTransX"), &assign_SynchronousMachine_satDirectTransX)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.shortCircuitRotorType"), &assign_SynchronousMachine_shortCircuitRotorType)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.type"), &assign_SynchronousMachine_type)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.voltageRegulationRange"), &assign_SynchronousMachine_voltageRegulationRange)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.x0"), &assign_SynchronousMachine_x0)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.x2"), &assign_SynchronousMachine_x2)); + assign_map.emplace("cim:SynchronousMachine.earthing", &assign_SynchronousMachine_earthing); + assign_map.emplace("cim:SynchronousMachine.earthingStarPointR", &assign_SynchronousMachine_earthingStarPointR); + assign_map.emplace("cim:SynchronousMachine.earthingStarPointX", &assign_SynchronousMachine_earthingStarPointX); + assign_map.emplace("cim:SynchronousMachine.ikk", &assign_SynchronousMachine_ikk); + assign_map.emplace("cim:SynchronousMachine.maxQ", &assign_SynchronousMachine_maxQ); + assign_map.emplace("cim:SynchronousMachine.minQ", &assign_SynchronousMachine_minQ); + assign_map.emplace("cim:SynchronousMachine.mu", &assign_SynchronousMachine_mu); + assign_map.emplace("cim:SynchronousMachine.operatingMode", &assign_SynchronousMachine_operatingMode); + assign_map.emplace("cim:SynchronousMachine.qPercent", &assign_SynchronousMachine_qPercent); + assign_map.emplace("cim:SynchronousMachine.r", &assign_SynchronousMachine_r); + assign_map.emplace("cim:SynchronousMachine.r0", &assign_SynchronousMachine_r0); + assign_map.emplace("cim:SynchronousMachine.r2", &assign_SynchronousMachine_r2); + assign_map.emplace("cim:SynchronousMachine.referencePriority", &assign_SynchronousMachine_referencePriority); + assign_map.emplace("cim:SynchronousMachine.satDirectSubtransX", &assign_SynchronousMachine_satDirectSubtransX); + assign_map.emplace("cim:SynchronousMachine.satDirectSyncX", &assign_SynchronousMachine_satDirectSyncX); + assign_map.emplace("cim:SynchronousMachine.satDirectTransX", &assign_SynchronousMachine_satDirectTransX); + assign_map.emplace("cim:SynchronousMachine.shortCircuitRotorType", &assign_SynchronousMachine_shortCircuitRotorType); + assign_map.emplace("cim:SynchronousMachine.type", &assign_SynchronousMachine_type); + assign_map.emplace("cim:SynchronousMachine.voltageRegulationRange", &assign_SynchronousMachine_voltageRegulationRange); + assign_map.emplace("cim:SynchronousMachine.x0", &assign_SynchronousMachine_x0); + assign_map.emplace("cim:SynchronousMachine.x2", &assign_SynchronousMachine_x2); } void SynchronousMachine::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.InitialReactiveCapabilityCurve"), &assign_SynchronousMachine_InitialReactiveCapabilityCurve)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.SynchronousMachineDynamics"), &assign_SynchronousMachine_SynchronousMachineDynamics)); + assign_map.emplace("cim:SynchronousMachine.InitialReactiveCapabilityCurve", &assign_SynchronousMachine_InitialReactiveCapabilityCurve); + assign_map.emplace("cim:SynchronousMachine.SynchronousMachineDynamics", &assign_SynchronousMachine_SynchronousMachineDynamics); } void SynchronousMachine::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/SynchronousMachine.hpp b/CGMES_2.4.15_16FEB2016/SynchronousMachine.hpp index 6af1d5ade..91fe2995e 100644 --- a/CGMES_2.4.15_16FEB2016/SynchronousMachine.hpp +++ b/CGMES_2.4.15_16FEB2016/SynchronousMachine.hpp @@ -30,9 +30,7 @@ namespace CIMPP class ReactiveCapabilityCurve; class SynchronousMachineDynamics; - /* - An electromechanical device that operates with shaft rotating synchronously with the network. It is a single machine operating either as a generator or synchronous condenser or pump. - */ + /** \brief An electromechanical device that operates with shaft rotating synchronously with the network. It is a single machine operating either as a generator or synchronous condenser or pump. */ class SynchronousMachine : public RotatingMachine { public: @@ -40,29 +38,74 @@ namespace CIMPP SynchronousMachine(); ~SynchronousMachine() override; - CIMPP::ReactiveCapabilityCurve* InitialReactiveCapabilityCurve; /* Synchronous machines using this curve as default. Default: 0 */ - CIMPP::SynchronousMachineDynamics* SynchronousMachineDynamics; /* Synchronous machine dynamics model used to describe dynamic behavior of this synchronous machine. Default: 0 */ - CIMPP::Boolean earthing; /* Indicates whether or not the generator is earthed. Used for short circuit data exchange according to IEC 60909 Default: false */ - CIMPP::Resistance earthingStarPointR; /* Generator star point earthing resistance (Re). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::Reactance earthingStarPointX; /* Generator star point earthing reactance (Xe). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::CurrentFlow ikk; /* Steady-state short-circuit current (in A for the profile) of generator with compound excitation during 3-phase short circuit. - Ikk=0: Generator with no compound excitation. - Ikk?0: Generator with compound excitation. Ikk is used to calculate the minimum steady-state short-circuit current for generators with compound excitation (Section 4.6.1.2 in the IEC 60909-0) Used only for single fed short circuit on a generator. (Section 4.3.4.2. in the IEC 60909-0) Default: nullptr */ - CIMPP::ReactivePower maxQ; /* Maximum reactive power limit. This is the maximum (nameplate) limit for the unit. Default: nullptr */ - CIMPP::ReactivePower minQ; /* Minimum reactive power limit for the unit. Default: nullptr */ - CIMPP::Simple_Float mu; /* Factor to calculate the breaking current (Section 4.5.2.1 in the IEC 60909-0). Used only for single fed short circuit on a generator (Section 4.3.4.2. in the IEC 60909-0). Default: nullptr */ - CIMPP::SynchronousMachineOperatingMode operatingMode; /* Current mode of operation. Default: 0 */ - CIMPP::PerCent qPercent; /* Percent of the coordinated reactive control that comes from this machine. Default: nullptr */ - CIMPP::Resistance r; /* Equivalent resistance (RG) of generator. RG is considered for the calculation of all currents, except for the calculation of the peak current ip. Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::PU r0; /* Zero sequence resistance of the synchronous machine. Default: nullptr */ - CIMPP::PU r2; /* Negative sequence resistance. Default: nullptr */ - CIMPP::Integer referencePriority; /* Priority of unit for use as powerflow voltage phase angle reference bus selection. 0 = don t care (default) 1 = highest priority. 2 is less than 1 and so on. Default: 0 */ - CIMPP::PU satDirectSubtransX; /* Direct-axis subtransient reactance saturated, also known as Xd`sat. Default: nullptr */ - CIMPP::PU satDirectSyncX; /* Direct-axes saturated synchronous reactance (xdsat); reciprocal of short-circuit ration. Used for short circuit data exchange, only for single fed short circuit on a generator. (Section 4.3.4.2. in the IEC 60909-0). Default: nullptr */ - CIMPP::PU satDirectTransX; /* Saturated Direct-axis transient reactance. The attribute is primarily used for short circuit calculations according to ANSI. Default: nullptr */ - CIMPP::ShortCircuitRotorKind shortCircuitRotorType; /* Type of rotor, used by short circuit applications, only for single fed short circuit according to IEC 60909. Default: 0 */ - CIMPP::SynchronousMachineKind type; /* Modes that this synchronous machine can operate in. Default: 0 */ - CIMPP::PerCent voltageRegulationRange; /* Range of generator voltage regulation (PG in the IEC 60909-0) used for calculation of the impedance correction factor KG defined in IEC 60909-0 This attribute is used to describe the operating voltage of the generating unit. Default: nullptr */ - CIMPP::PU x0; /* Zero sequence reactance of the synchronous machine. Default: nullptr */ - CIMPP::PU x2; /* Negative sequence reactance. Default: nullptr */ + /** \brief Synchronous machines using this curve as default. Default: 0 */ + CIMPP::ReactiveCapabilityCurve* InitialReactiveCapabilityCurve; + + /** \brief Synchronous machine dynamics model used to describe dynamic behavior of this synchronous machine. Default: 0 */ + CIMPP::SynchronousMachineDynamics* SynchronousMachineDynamics; + + /** \brief Indicates whether or not the generator is earthed. Used for short circuit data exchange according to IEC 60909 Default: false */ + CIMPP::Boolean earthing; + + /** \brief Generator star point earthing resistance (Re). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::Resistance earthingStarPointR; + + /** \brief Generator star point earthing reactance (Xe). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::Reactance earthingStarPointX; + + /** \brief Steady-state short-circuit current (in A for the profile) of generator with compound excitation during 3-phase short circuit. - Ikk=0: Generator with no compound excitation. - Ikk?0: Generator with compound excitation. Ikk is used to calculate the minimum steady-state short-circuit current for generators with compound excitation (Section 4.6.1.2 in the IEC 60909-0) Used only for single fed short circuit on a generator. (Section 4.3.4.2. in the IEC 60909-0) Default: nullptr */ + CIMPP::CurrentFlow ikk; + + /** \brief Maximum reactive power limit. This is the maximum (nameplate) limit for the unit. Default: nullptr */ + CIMPP::ReactivePower maxQ; + + /** \brief Minimum reactive power limit for the unit. Default: nullptr */ + CIMPP::ReactivePower minQ; + + /** \brief Factor to calculate the breaking current (Section 4.5.2.1 in the IEC 60909-0). Used only for single fed short circuit on a generator (Section 4.3.4.2. in the IEC 60909-0). Default: nullptr */ + CIMPP::Simple_Float mu; + + /** \brief Current mode of operation. Default: 0 */ + CIMPP::SynchronousMachineOperatingMode operatingMode; + + /** \brief Percent of the coordinated reactive control that comes from this machine. Default: nullptr */ + CIMPP::PerCent qPercent; + + /** \brief Equivalent resistance (RG) of generator. RG is considered for the calculation of all currents, except for the calculation of the peak current ip. Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::Resistance r; + + /** \brief Zero sequence resistance of the synchronous machine. Default: nullptr */ + CIMPP::PU r0; + + /** \brief Negative sequence resistance. Default: nullptr */ + CIMPP::PU r2; + + /** \brief Priority of unit for use as powerflow voltage phase angle reference bus selection. 0 = don t care (default) 1 = highest priority. 2 is less than 1 and so on. Default: 0 */ + CIMPP::Integer referencePriority; + + /** \brief Direct-axis subtransient reactance saturated, also known as Xd`sat. Default: nullptr */ + CIMPP::PU satDirectSubtransX; + + /** \brief Direct-axes saturated synchronous reactance (xdsat); reciprocal of short-circuit ration. Used for short circuit data exchange, only for single fed short circuit on a generator. (Section 4.3.4.2. in the IEC 60909-0). Default: nullptr */ + CIMPP::PU satDirectSyncX; + + /** \brief Saturated Direct-axis transient reactance. The attribute is primarily used for short circuit calculations according to ANSI. Default: nullptr */ + CIMPP::PU satDirectTransX; + + /** \brief Type of rotor, used by short circuit applications, only for single fed short circuit according to IEC 60909. Default: 0 */ + CIMPP::ShortCircuitRotorKind shortCircuitRotorType; + + /** \brief Modes that this synchronous machine can operate in. Default: 0 */ + CIMPP::SynchronousMachineKind type; + + /** \brief Range of generator voltage regulation (PG in the IEC 60909-0) used for calculation of the impedance correction factor KG defined in IEC 60909-0 This attribute is used to describe the operating voltage of the generating unit. Default: nullptr */ + CIMPP::PerCent voltageRegulationRange; + + /** \brief Zero sequence reactance of the synchronous machine. Default: nullptr */ + CIMPP::PU x0; + + /** \brief Negative sequence reactance. Default: nullptr */ + CIMPP::PU x2; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/SynchronousMachineDetailed.cpp b/CGMES_2.4.15_16FEB2016/SynchronousMachineDetailed.cpp index 97a329b93..b24f3e4d9 100644 --- a/CGMES_2.4.15_16FEB2016/SynchronousMachineDetailed.cpp +++ b/CGMES_2.4.15_16FEB2016/SynchronousMachineDetailed.cpp @@ -8,16 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "IfdBaseKind.hpp" -#include "CurrentFlow.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -SynchronousMachineDetailed::SynchronousMachineDetailed() {}; -SynchronousMachineDetailed::~SynchronousMachineDetailed() {}; +SynchronousMachineDetailed::SynchronousMachineDetailed() {} +SynchronousMachineDetailed::~SynchronousMachineDetailed() {} static const std::list PossibleProfilesForClass = { @@ -48,77 +43,80 @@ SynchronousMachineDetailed::getPossibleProfilesForAttributes() const return map; } - -bool assign_SynchronousMachineDetailed_efdBaseRatio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineDetailed_efdBaseRatio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdBaseRatio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineDetailed_ifdBaseType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineDetailed_ifdBaseType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ifdBaseType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineDetailed_ifdBaseValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineDetailed_ifdBaseValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ifdBaseValue; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineDetailed_saturationFactor120QAxis(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineDetailed_saturationFactor120QAxis(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->saturationFactor120QAxis; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineDetailed_saturationFactorQAxis(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineDetailed_saturationFactorQAxis(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->saturationFactorQAxis; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_SynchronousMachineDetailed_efdBaseRatio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdBaseRatio; if (!buffer.str().empty()) @@ -130,11 +128,12 @@ bool get_SynchronousMachineDetailed_efdBaseRatio(const BaseClass* BaseClass_ptr1 return false; } -bool get_SynchronousMachineDetailed_ifdBaseValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineDetailed_ifdBaseType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->ifdBaseValue; + buffer << element->ifdBaseType; if (!buffer.str().empty()) { return true; @@ -144,11 +143,12 @@ bool get_SynchronousMachineDetailed_ifdBaseValue(const BaseClass* BaseClass_ptr1 return false; } -bool get_SynchronousMachineDetailed_saturationFactor120QAxis(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineDetailed_ifdBaseValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->saturationFactor120QAxis; + buffer << element->ifdBaseValue; if (!buffer.str().empty()) { return true; @@ -158,11 +158,12 @@ bool get_SynchronousMachineDetailed_saturationFactor120QAxis(const BaseClass* Ba return false; } -bool get_SynchronousMachineDetailed_saturationFactorQAxis(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineDetailed_saturationFactor120QAxis(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->saturationFactorQAxis; + buffer << element->saturationFactor120QAxis; if (!buffer.str().empty()) { return true; @@ -172,13 +173,12 @@ bool get_SynchronousMachineDetailed_saturationFactorQAxis(const BaseClass* BaseC return false; } - - -bool get_SynchronousMachineDetailed_ifdBaseType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineDetailed_saturationFactorQAxis(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->ifdBaseType; + buffer << element->saturationFactorQAxis; if (!buffer.str().empty()) { return true; @@ -196,16 +196,16 @@ const char* SynchronousMachineDetailed::debugString() const void SynchronousMachineDetailed::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SynchronousMachineDetailed"), &SynchronousMachineDetailed_factory)); + factory_map.emplace("cim:SynchronousMachineDetailed", &SynchronousMachineDetailed_factory); } void SynchronousMachineDetailed::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDetailed.efdBaseRatio"), &assign_SynchronousMachineDetailed_efdBaseRatio)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDetailed.ifdBaseType"), &assign_SynchronousMachineDetailed_ifdBaseType)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDetailed.ifdBaseValue"), &assign_SynchronousMachineDetailed_ifdBaseValue)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDetailed.saturationFactor120QAxis"), &assign_SynchronousMachineDetailed_saturationFactor120QAxis)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDetailed.saturationFactorQAxis"), &assign_SynchronousMachineDetailed_saturationFactorQAxis)); + assign_map.emplace("cim:SynchronousMachineDetailed.efdBaseRatio", &assign_SynchronousMachineDetailed_efdBaseRatio); + assign_map.emplace("cim:SynchronousMachineDetailed.ifdBaseType", &assign_SynchronousMachineDetailed_ifdBaseType); + assign_map.emplace("cim:SynchronousMachineDetailed.ifdBaseValue", &assign_SynchronousMachineDetailed_ifdBaseValue); + assign_map.emplace("cim:SynchronousMachineDetailed.saturationFactor120QAxis", &assign_SynchronousMachineDetailed_saturationFactor120QAxis); + assign_map.emplace("cim:SynchronousMachineDetailed.saturationFactorQAxis", &assign_SynchronousMachineDetailed_saturationFactorQAxis); } void SynchronousMachineDetailed::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/SynchronousMachineDetailed.hpp b/CGMES_2.4.15_16FEB2016/SynchronousMachineDetailed.hpp index c50628bb3..877ee12bc 100644 --- a/CGMES_2.4.15_16FEB2016/SynchronousMachineDetailed.hpp +++ b/CGMES_2.4.15_16FEB2016/SynchronousMachineDetailed.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - All synchronous machine detailed types use a subset of the same data parameters and input/output variables. The several variations differ in the following ways: It is not necessary for each simulation tool to have separate models for each of the model types. The same model can often be used for several types by alternative logic within the model. Also, differences in saturation representation may not result in significant model performance differences so model substitutions are often acceptable. - */ + /** \brief All synchronous machine detailed types use a subset of the same data parameters and input/output variables. The several variations differ in the following ways: It is not necessary for each simulation tool to have separate models for each of the model types. The same model can often be used for several types by alternative logic within the model. Also, differences in saturation representation may not result in significant model performance differences so model substitutions are often acceptable. */ class SynchronousMachineDetailed : public SynchronousMachineDynamics { public: @@ -29,11 +27,20 @@ namespace CIMPP SynchronousMachineDetailed(); ~SynchronousMachineDetailed() override; - CIMPP::Simple_Float efdBaseRatio; /* Ratio of Efd bases of exciter and generator models. Typical Value = 1. Default: nullptr */ - CIMPP::IfdBaseKind ifdBaseType; /* Excitation base system mode. Typical Value = ifag. Default: 0 */ - CIMPP::CurrentFlow ifdBaseValue; /* Ifd base current if .ifdBaseType = other. Not needed if .ifdBaseType not = other. Unit = A. Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float saturationFactor120QAxis; /* Q-axis saturation factor at 120% of rated terminal voltage (S12q) (>=S1q). Typical Value = 0.12. Default: nullptr */ - CIMPP::Simple_Float saturationFactorQAxis; /* Q-axis saturation factor at rated terminal voltage (S1q) (>= 0). Typical Value = 0.02. Default: nullptr */ + /** \brief Ratio of Efd bases of exciter and generator models. Typical Value = 1. Default: nullptr */ + CIMPP::Simple_Float efdBaseRatio; + + /** \brief Excitation base system mode. Typical Value = ifag. Default: 0 */ + CIMPP::IfdBaseKind ifdBaseType; + + /** \brief Ifd base current if .ifdBaseType = other. Not needed if .ifdBaseType not = other. Unit = A. Typical Value = 0. Default: nullptr */ + CIMPP::CurrentFlow ifdBaseValue; + + /** \brief Q-axis saturation factor at 120% of rated terminal voltage (S12q) (>=S1q). Typical Value = 0.12. Default: nullptr */ + CIMPP::Simple_Float saturationFactor120QAxis; + + /** \brief Q-axis saturation factor at rated terminal voltage (S1q) (>= 0). Typical Value = 0.02. Default: nullptr */ + CIMPP::Simple_Float saturationFactorQAxis; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/SynchronousMachineDynamics.cpp b/CGMES_2.4.15_16FEB2016/SynchronousMachineDynamics.cpp index bb961da54..c26909c88 100644 --- a/CGMES_2.4.15_16FEB2016/SynchronousMachineDynamics.cpp +++ b/CGMES_2.4.15_16FEB2016/SynchronousMachineDynamics.cpp @@ -16,8 +16,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -SynchronousMachineDynamics::SynchronousMachineDynamics() : ExcitationSystemDynamics(nullptr), MechanicalLoadDynamics(nullptr), SynchronousMachine(nullptr) {}; -SynchronousMachineDynamics::~SynchronousMachineDynamics() {}; +SynchronousMachineDynamics::SynchronousMachineDynamics() : ExcitationSystemDynamics(nullptr), MechanicalLoadDynamics(nullptr), SynchronousMachine(nullptr) {} +SynchronousMachineDynamics::~SynchronousMachineDynamics() {} static const std::list PossibleProfilesForClass = { @@ -48,8 +48,6 @@ SynchronousMachineDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_ExcitationSystemDynamics_SynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_SynchronousMachineDynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -66,6 +64,7 @@ bool assign_SynchronousMachineDynamics_ExcitationSystemDynamics(BaseClass* BaseC } return false; } + bool assign_GenICompensationForGenJ_SynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_SynchronousMachineDynamics_GenICompensationForGenJ(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -82,6 +81,7 @@ bool assign_SynchronousMachineDynamics_GenICompensationForGenJ(BaseClass* BaseCl } return false; } + bool assign_MechanicalLoadDynamics_SynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_SynchronousMachineDynamics_MechanicalLoadDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -98,6 +98,7 @@ bool assign_SynchronousMachineDynamics_MechanicalLoadDynamics(BaseClass* BaseCla } return false; } + bool assign_SynchronousMachine_SynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_SynchronousMachineDynamics_SynchronousMachine(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -114,6 +115,7 @@ bool assign_SynchronousMachineDynamics_SynchronousMachine(BaseClass* BaseClass_p } return false; } + bool assign_TurbineGovernorDynamics_SynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_SynchronousMachineDynamics_TurbineGovernorDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -132,9 +134,12 @@ bool assign_SynchronousMachineDynamics_TurbineGovernorDynamics(BaseClass* BaseCl } + + bool get_SynchronousMachineDynamics_SynchronousMachine(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SynchronousMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->SynchronousMachine != 0) { @@ -154,7 +159,7 @@ const char* SynchronousMachineDynamics::debugString() const void SynchronousMachineDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SynchronousMachineDynamics"), &SynchronousMachineDynamics_factory)); + factory_map.emplace("cim:SynchronousMachineDynamics", &SynchronousMachineDynamics_factory); } void SynchronousMachineDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -163,11 +168,11 @@ void SynchronousMachineDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDynamics.ExcitationSystemDynamics"), &assign_SynchronousMachineDynamics_ExcitationSystemDynamics)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDynamics.GenICompensationForGenJ"), &assign_SynchronousMachineDynamics_GenICompensationForGenJ)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDynamics.MechanicalLoadDynamics"), &assign_SynchronousMachineDynamics_MechanicalLoadDynamics)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDynamics.SynchronousMachine"), &assign_SynchronousMachineDynamics_SynchronousMachine)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDynamics.TurbineGovernorDynamics"), &assign_SynchronousMachineDynamics_TurbineGovernorDynamics)); + assign_map.emplace("cim:SynchronousMachineDynamics.ExcitationSystemDynamics", &assign_SynchronousMachineDynamics_ExcitationSystemDynamics); + assign_map.emplace("cim:SynchronousMachineDynamics.GenICompensationForGenJ", &assign_SynchronousMachineDynamics_GenICompensationForGenJ); + assign_map.emplace("cim:SynchronousMachineDynamics.MechanicalLoadDynamics", &assign_SynchronousMachineDynamics_MechanicalLoadDynamics); + assign_map.emplace("cim:SynchronousMachineDynamics.SynchronousMachine", &assign_SynchronousMachineDynamics_SynchronousMachine); + assign_map.emplace("cim:SynchronousMachineDynamics.TurbineGovernorDynamics", &assign_SynchronousMachineDynamics_TurbineGovernorDynamics); } void SynchronousMachineDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/SynchronousMachineDynamics.hpp b/CGMES_2.4.15_16FEB2016/SynchronousMachineDynamics.hpp index b3b34f00b..77e6df94e 100644 --- a/CGMES_2.4.15_16FEB2016/SynchronousMachineDynamics.hpp +++ b/CGMES_2.4.15_16FEB2016/SynchronousMachineDynamics.hpp @@ -21,9 +21,7 @@ namespace CIMPP class SynchronousMachine; class TurbineGovernorDynamics; - /* - Synchronous machine whose behaviour is described by reference to a standard model expressed in one of the following forms: - */ + /** \brief Synchronous machine whose behaviour is described by reference to a standard model expressed in one of the following forms: */ class SynchronousMachineDynamics : public RotatingMachineDynamics { public: @@ -31,11 +29,20 @@ namespace CIMPP SynchronousMachineDynamics(); ~SynchronousMachineDynamics() override; - CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; /* Excitation system model associated with this synchronous machine model. Default: 0 */ - std::list GenICompensationForGenJ; /* Compensation of voltage compensator`s generator for current flow out of this generator. Default: 0 */ - CIMPP::MechanicalLoadDynamics* MechanicalLoadDynamics; /* Mechanical load model associated with this synchronous machine model. Default: 0 */ - CIMPP::SynchronousMachine* SynchronousMachine; /* Synchronous machine to which synchronous machine dynamics model applies. Default: 0 */ - std::list TurbineGovernorDynamics; /* Synchronous machine model with which this turbine-governor model is associated. Default: 0 */ + /** \brief Excitation system model associated with this synchronous machine model. Default: 0 */ + CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; + + /** \brief Compensation of voltage compensator`s generator for current flow out of this generator. Default: 0 */ + std::list GenICompensationForGenJ; + + /** \brief Mechanical load model associated with this synchronous machine model. Default: 0 */ + CIMPP::MechanicalLoadDynamics* MechanicalLoadDynamics; + + /** \brief Synchronous machine to which synchronous machine dynamics model applies. Default: 0 */ + CIMPP::SynchronousMachine* SynchronousMachine; + + /** \brief Synchronous machine model with which this turbine-governor model is associated. Default: 0 */ + std::list TurbineGovernorDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/SynchronousMachineEquivalentCircuit.cpp b/CGMES_2.4.15_16FEB2016/SynchronousMachineEquivalentCircuit.cpp index b64fe290e..7ef58f9f7 100644 --- a/CGMES_2.4.15_16FEB2016/SynchronousMachineEquivalentCircuit.cpp +++ b/CGMES_2.4.15_16FEB2016/SynchronousMachineEquivalentCircuit.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -SynchronousMachineEquivalentCircuit::SynchronousMachineEquivalentCircuit() {}; -SynchronousMachineEquivalentCircuit::~SynchronousMachineEquivalentCircuit() {}; +SynchronousMachineEquivalentCircuit::SynchronousMachineEquivalentCircuit() {} +SynchronousMachineEquivalentCircuit::~SynchronousMachineEquivalentCircuit() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ SynchronousMachineEquivalentCircuit::getPossibleProfilesForAttributes() const return map; } - -bool assign_SynchronousMachineEquivalentCircuit_r1d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_r1d(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r1d; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_r1q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_r1q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r1q; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_r2q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_r2q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r2q; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_rfd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_rfd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rfd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_x1d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_x1d(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x1d; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_x1q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_x1q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x1q; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_x2q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_x2q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x2q; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_xad(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_xad(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xad; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_xaq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_xaq(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xaq; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_xf1d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_xf1d(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xf1d; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_xfd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_xfd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xfd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_SynchronousMachineEquivalentCircuit_r1d(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r1d; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_SynchronousMachineEquivalentCircuit_r1d(const BaseClass* BaseClass_ptr1 bool get_SynchronousMachineEquivalentCircuit_r1q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r1q; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_SynchronousMachineEquivalentCircuit_r1q(const BaseClass* BaseClass_ptr1 bool get_SynchronousMachineEquivalentCircuit_r2q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r2q; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_SynchronousMachineEquivalentCircuit_r2q(const BaseClass* BaseClass_ptr1 bool get_SynchronousMachineEquivalentCircuit_rfd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rfd; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_SynchronousMachineEquivalentCircuit_rfd(const BaseClass* BaseClass_ptr1 bool get_SynchronousMachineEquivalentCircuit_x1d(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x1d; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_SynchronousMachineEquivalentCircuit_x1d(const BaseClass* BaseClass_ptr1 bool get_SynchronousMachineEquivalentCircuit_x1q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x1q; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_SynchronousMachineEquivalentCircuit_x1q(const BaseClass* BaseClass_ptr1 bool get_SynchronousMachineEquivalentCircuit_x2q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x2q; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_SynchronousMachineEquivalentCircuit_x2q(const BaseClass* BaseClass_ptr1 bool get_SynchronousMachineEquivalentCircuit_xad(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xad; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_SynchronousMachineEquivalentCircuit_xad(const BaseClass* BaseClass_ptr1 bool get_SynchronousMachineEquivalentCircuit_xaq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xaq; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_SynchronousMachineEquivalentCircuit_xaq(const BaseClass* BaseClass_ptr1 bool get_SynchronousMachineEquivalentCircuit_xf1d(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xf1d; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_SynchronousMachineEquivalentCircuit_xf1d(const BaseClass* BaseClass_ptr bool get_SynchronousMachineEquivalentCircuit_xfd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xfd; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_SynchronousMachineEquivalentCircuit_xfd(const BaseClass* BaseClass_ptr1 return false; } - - const char SynchronousMachineEquivalentCircuit::debugName[] = "SynchronousMachineEquivalentCircuit"; const char* SynchronousMachineEquivalentCircuit::debugString() const { @@ -370,22 +376,22 @@ const char* SynchronousMachineEquivalentCircuit::debugString() const void SynchronousMachineEquivalentCircuit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit"), &SynchronousMachineEquivalentCircuit_factory)); + factory_map.emplace("cim:SynchronousMachineEquivalentCircuit", &SynchronousMachineEquivalentCircuit_factory); } void SynchronousMachineEquivalentCircuit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.r1d"), &assign_SynchronousMachineEquivalentCircuit_r1d)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.r1q"), &assign_SynchronousMachineEquivalentCircuit_r1q)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.r2q"), &assign_SynchronousMachineEquivalentCircuit_r2q)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.rfd"), &assign_SynchronousMachineEquivalentCircuit_rfd)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.x1d"), &assign_SynchronousMachineEquivalentCircuit_x1d)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.x1q"), &assign_SynchronousMachineEquivalentCircuit_x1q)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.x2q"), &assign_SynchronousMachineEquivalentCircuit_x2q)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.xad"), &assign_SynchronousMachineEquivalentCircuit_xad)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.xaq"), &assign_SynchronousMachineEquivalentCircuit_xaq)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.xf1d"), &assign_SynchronousMachineEquivalentCircuit_xf1d)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.xfd"), &assign_SynchronousMachineEquivalentCircuit_xfd)); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.r1d", &assign_SynchronousMachineEquivalentCircuit_r1d); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.r1q", &assign_SynchronousMachineEquivalentCircuit_r1q); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.r2q", &assign_SynchronousMachineEquivalentCircuit_r2q); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.rfd", &assign_SynchronousMachineEquivalentCircuit_rfd); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.x1d", &assign_SynchronousMachineEquivalentCircuit_x1d); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.x1q", &assign_SynchronousMachineEquivalentCircuit_x1q); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.x2q", &assign_SynchronousMachineEquivalentCircuit_x2q); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.xad", &assign_SynchronousMachineEquivalentCircuit_xad); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.xaq", &assign_SynchronousMachineEquivalentCircuit_xaq); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.xf1d", &assign_SynchronousMachineEquivalentCircuit_xf1d); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.xfd", &assign_SynchronousMachineEquivalentCircuit_xfd); } void SynchronousMachineEquivalentCircuit::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/SynchronousMachineEquivalentCircuit.hpp b/CGMES_2.4.15_16FEB2016/SynchronousMachineEquivalentCircuit.hpp index 7df6c9f41..bc55bc9cd 100644 --- a/CGMES_2.4.15_16FEB2016/SynchronousMachineEquivalentCircuit.hpp +++ b/CGMES_2.4.15_16FEB2016/SynchronousMachineEquivalentCircuit.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The electrical equations for all variations of the synchronous models are based on the SynchronousEquivalentCircuit diagram for the direct and quadrature axes. = + = + * / ( + ) = + * * / ( * + * + * ) = + = + * / (+ ) = + ** / ( * + * + * ) = ( + ) / ( * ) = ( * + * + * ) / ( * * ( + ) = ( + ) / ( * ) = ( * + * + * )/ ( * * ( + ) Same equations using CIM attributes from SynchronousMachineTimeConstantReactance class on left of = sign and SynchronousMachineEquivalentCircuit class on right (except as noted): xDirectSync = xad + RotatingMachineDynamics.statorLeakageReactance xDirectTrans = RotatingMachineDynamics.statorLeakageReactance + xad * xfd / (xad + xfd) xDirectSubtrans = RotatingMachineDynamics.statorLeakageReactance + xad * xfd * x1d / (xad * xfd + xad * x1d + xfd * x1d) xQuadSync = xaq + RotatingMachineDynamics.statorLeakageReactance xQuadTrans = RotatingMachineDynamics.statorLeakageReactance + xaq * x1q / (xaq+ x1q) xQuadSubtrans = RotatingMachineDynamics.statorLeakageReactance + xaq * x1q* x2q / (xaq * x1q + xaq * x2q + x1q * x2q) tpdo = (xad + xfd) / (2*pi*nominal frequency * rfd) tppdo = (xad * xfd + xad * x1d + xfd * x1d) / (2*pi*nominal frequency * r1d * (xad + xfd) tpqo = (xaq + x1q) / (2*pi*nominal frequency * r1q) tppqo = (xaq * x1q + xaq * x2q + x1q * x2q)/ (2*pi*nominal frequency * r2q * (xaq + x1q). Are only valid for a simplified model where "Canay" reactance is zero. - */ + /** \brief The electrical equations for all variations of the synchronous models are based on the SynchronousEquivalentCircuit diagram for the direct and quadrature axes. = + = + * / ( + ) = + * * / ( * + * + * ) = + = + * / (+ ) = + ** / ( * + * + * ) = ( + ) / ( * ) = ( * + * + * ) / ( * * ( + ) = ( + ) / ( * ) = ( * + * + * )/ ( * * ( + ) Same equations using CIM attributes from SynchronousMachineTimeConstantReactance class on left of = sign and SynchronousMachineEquivalentCircuit class on right (except as noted): xDirectSync = xad + RotatingMachineDynamics.statorLeakageReactance xDirectTrans = RotatingMachineDynamics.statorLeakageReactance + xad * xfd / (xad + xfd) xDirectSubtrans = RotatingMachineDynamics.statorLeakageReactance + xad * xfd * x1d / (xad * xfd + xad * x1d + xfd * x1d) xQuadSync = xaq + RotatingMachineDynamics.statorLeakageReactance xQuadTrans = RotatingMachineDynamics.statorLeakageReactance + xaq * x1q / (xaq+ x1q) xQuadSubtrans = RotatingMachineDynamics.statorLeakageReactance + xaq * x1q* x2q / (xaq * x1q + xaq * x2q + x1q * x2q) tpdo = (xad + xfd) / (2*pi*nominal frequency * rfd) tppdo = (xad * xfd + xad * x1d + xfd * x1d) / (2*pi*nominal frequency * r1d * (xad + xfd) tpqo = (xaq + x1q) / (2*pi*nominal frequency * r1q) tppqo = (xaq * x1q + xaq * x2q + x1q * x2q)/ (2*pi*nominal frequency * r2q * (xaq + x1q). Are only valid for a simplified model where "Canay" reactance is zero. */ class SynchronousMachineEquivalentCircuit : public SynchronousMachineDetailed { public: @@ -27,17 +25,38 @@ namespace CIMPP SynchronousMachineEquivalentCircuit(); ~SynchronousMachineEquivalentCircuit() override; - CIMPP::PU r1d; /* D-axis damper 1 winding resistance. Default: nullptr */ - CIMPP::PU r1q; /* Q-axis damper 1 winding resistance. Default: nullptr */ - CIMPP::PU r2q; /* Q-axis damper 2 winding resistance. Default: nullptr */ - CIMPP::PU rfd; /* Field winding resistance. Default: nullptr */ - CIMPP::PU x1d; /* D-axis damper 1 winding leakage reactance. Default: nullptr */ - CIMPP::PU x1q; /* Q-axis damper 1 winding leakage reactance. Default: nullptr */ - CIMPP::PU x2q; /* Q-axis damper 2 winding leakage reactance. Default: nullptr */ - CIMPP::PU xad; /* D-axis mutual reactance. Default: nullptr */ - CIMPP::PU xaq; /* Q-axis mutual reactance. Default: nullptr */ - CIMPP::PU xf1d; /* Differential mutual (`Canay`) reactance. Default: nullptr */ - CIMPP::PU xfd; /* Field winding leakage reactance. Default: nullptr */ + /** \brief D-axis damper 1 winding resistance. Default: nullptr */ + CIMPP::PU r1d; + + /** \brief Q-axis damper 1 winding resistance. Default: nullptr */ + CIMPP::PU r1q; + + /** \brief Q-axis damper 2 winding resistance. Default: nullptr */ + CIMPP::PU r2q; + + /** \brief Field winding resistance. Default: nullptr */ + CIMPP::PU rfd; + + /** \brief D-axis damper 1 winding leakage reactance. Default: nullptr */ + CIMPP::PU x1d; + + /** \brief Q-axis damper 1 winding leakage reactance. Default: nullptr */ + CIMPP::PU x1q; + + /** \brief Q-axis damper 2 winding leakage reactance. Default: nullptr */ + CIMPP::PU x2q; + + /** \brief D-axis mutual reactance. Default: nullptr */ + CIMPP::PU xad; + + /** \brief Q-axis mutual reactance. Default: nullptr */ + CIMPP::PU xaq; + + /** \brief Differential mutual (`Canay`) reactance. Default: nullptr */ + CIMPP::PU xf1d; + + /** \brief Field winding leakage reactance. Default: nullptr */ + CIMPP::PU xfd; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/SynchronousMachineKind.cpp b/CGMES_2.4.15_16FEB2016/SynchronousMachineKind.cpp index 55bd958b0..26781d9bd 100644 --- a/CGMES_2.4.15_16FEB2016/SynchronousMachineKind.cpp +++ b/CGMES_2.4.15_16FEB2016/SynchronousMachineKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "SynchronousMachineKind") + if (EnumSymbol.substr(0, pos) != "SynchronousMachineKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,37 +50,37 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "generator") + if (EnumSymbol == "generator") { rop = SynchronousMachineKind::generator; return lop; } - if(EnumSymbol == "condenser") + if (EnumSymbol == "condenser") { rop = SynchronousMachineKind::condenser; return lop; } - if(EnumSymbol == "generatorOrCondenser") + if (EnumSymbol == "generatorOrCondenser") { rop = SynchronousMachineKind::generatorOrCondenser; return lop; } - if(EnumSymbol == "motor") + if (EnumSymbol == "motor") { rop = SynchronousMachineKind::motor; return lop; } - if(EnumSymbol == "generatorOrMotor") + if (EnumSymbol == "generatorOrMotor") { rop = SynchronousMachineKind::generatorOrMotor; return lop; } - if(EnumSymbol == "motorOrCondenser") + if (EnumSymbol == "motorOrCondenser") { rop = SynchronousMachineKind::motorOrCondenser; return lop; } - if(EnumSymbol == "generatorOrCondenserOrMotor") + if (EnumSymbol == "generatorOrCondenserOrMotor") { rop = SynchronousMachineKind::generatorOrCondenserOrMotor; return lop; diff --git a/CGMES_2.4.15_16FEB2016/SynchronousMachineKind.hpp b/CGMES_2.4.15_16FEB2016/SynchronousMachineKind.hpp index 9b3eaf71b..fa2868489 100644 --- a/CGMES_2.4.15_16FEB2016/SynchronousMachineKind.hpp +++ b/CGMES_2.4.15_16FEB2016/SynchronousMachineKind.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Synchronous machine type. - */ + /** \brief Synchronous machine type. */ class SynchronousMachineKind { public: diff --git a/CGMES_2.4.15_16FEB2016/SynchronousMachineModelKind.cpp b/CGMES_2.4.15_16FEB2016/SynchronousMachineModelKind.cpp index 10460ede1..761cee9cb 100644 --- a/CGMES_2.4.15_16FEB2016/SynchronousMachineModelKind.cpp +++ b/CGMES_2.4.15_16FEB2016/SynchronousMachineModelKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "SynchronousMachineModelKind") + if (EnumSymbol.substr(0, pos) != "SynchronousMachineModelKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,27 +50,27 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "subtransient") + if (EnumSymbol == "subtransient") { rop = SynchronousMachineModelKind::subtransient; return lop; } - if(EnumSymbol == "subtransientTypeF") + if (EnumSymbol == "subtransientTypeF") { rop = SynchronousMachineModelKind::subtransientTypeF; return lop; } - if(EnumSymbol == "subtransientTypeJ") + if (EnumSymbol == "subtransientTypeJ") { rop = SynchronousMachineModelKind::subtransientTypeJ; return lop; } - if(EnumSymbol == "subtransientSimplified") + if (EnumSymbol == "subtransientSimplified") { rop = SynchronousMachineModelKind::subtransientSimplified; return lop; } - if(EnumSymbol == "subtransientSimplifiedDirectAxis") + if (EnumSymbol == "subtransientSimplifiedDirectAxis") { rop = SynchronousMachineModelKind::subtransientSimplifiedDirectAxis; return lop; diff --git a/CGMES_2.4.15_16FEB2016/SynchronousMachineModelKind.hpp b/CGMES_2.4.15_16FEB2016/SynchronousMachineModelKind.hpp index 06da8b2b5..fadb85ac5 100644 --- a/CGMES_2.4.15_16FEB2016/SynchronousMachineModelKind.hpp +++ b/CGMES_2.4.15_16FEB2016/SynchronousMachineModelKind.hpp @@ -9,33 +9,21 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of synchronous machine model used in Dynamic simulation applications. - */ + /** \brief Type of synchronous machine model used in Dynamic simulation applications. */ class SynchronousMachineModelKind { public: enum SynchronousMachineModelKind_ENUM { - /** - * Subtransient synchronous machine model. - */ + /** Subtransient synchronous machine model. */ subtransient, - /** - * WECC Type F variant of subtransient synchronous machine model. - */ + /** WECC Type F variant of subtransient synchronous machine model. */ subtransientTypeF, - /** - * WECC Type J variant of subtransient synchronous machine model. - */ + /** WECC Type J variant of subtransient synchronous machine model. */ subtransientTypeJ, - /** - * Simplified version of subtransient synchronous machine model where magnetic coupling between the direct and quadrature axes is ignored. - */ + /** Simplified version of subtransient synchronous machine model where magnetic coupling between the direct and quadrature axes is ignored. */ subtransientSimplified, - /** - * Simplified version of a subtransient synchronous machine model with no damper circuit on d-axis. - */ + /** Simplified version of a subtransient synchronous machine model with no damper circuit on d-axis. */ subtransientSimplifiedDirectAxis, }; diff --git a/CGMES_2.4.15_16FEB2016/SynchronousMachineOperatingMode.cpp b/CGMES_2.4.15_16FEB2016/SynchronousMachineOperatingMode.cpp index 92b1e2cc3..bca6dbe66 100644 --- a/CGMES_2.4.15_16FEB2016/SynchronousMachineOperatingMode.cpp +++ b/CGMES_2.4.15_16FEB2016/SynchronousMachineOperatingMode.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "SynchronousMachineOperatingMode") + if (EnumSymbol.substr(0, pos) != "SynchronousMachineOperatingMode") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "generator") + if (EnumSymbol == "generator") { rop = SynchronousMachineOperatingMode::generator; return lop; } - if(EnumSymbol == "condenser") + if (EnumSymbol == "condenser") { rop = SynchronousMachineOperatingMode::condenser; return lop; } - if(EnumSymbol == "motor") + if (EnumSymbol == "motor") { rop = SynchronousMachineOperatingMode::motor; return lop; diff --git a/CGMES_2.4.15_16FEB2016/SynchronousMachineOperatingMode.hpp b/CGMES_2.4.15_16FEB2016/SynchronousMachineOperatingMode.hpp index 464590a5b..1272878d5 100644 --- a/CGMES_2.4.15_16FEB2016/SynchronousMachineOperatingMode.hpp +++ b/CGMES_2.4.15_16FEB2016/SynchronousMachineOperatingMode.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Synchronous machine operating mode. - */ + /** \brief Synchronous machine operating mode. */ class SynchronousMachineOperatingMode { public: diff --git a/CGMES_2.4.15_16FEB2016/SynchronousMachineSimplified.cpp b/CGMES_2.4.15_16FEB2016/SynchronousMachineSimplified.cpp index 78f5ae00d..565a93b19 100644 --- a/CGMES_2.4.15_16FEB2016/SynchronousMachineSimplified.cpp +++ b/CGMES_2.4.15_16FEB2016/SynchronousMachineSimplified.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -SynchronousMachineSimplified::SynchronousMachineSimplified() {}; -SynchronousMachineSimplified::~SynchronousMachineSimplified() {}; +SynchronousMachineSimplified::SynchronousMachineSimplified() {} +SynchronousMachineSimplified::~SynchronousMachineSimplified() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ SynchronousMachineSimplified::getPossibleProfilesForAttributes() const return map; } - - - - - const char SynchronousMachineSimplified::debugName[] = "SynchronousMachineSimplified"; const char* SynchronousMachineSimplified::debugString() const { @@ -51,7 +46,7 @@ const char* SynchronousMachineSimplified::debugString() const void SynchronousMachineSimplified::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SynchronousMachineSimplified"), &SynchronousMachineSimplified_factory)); + factory_map.emplace("cim:SynchronousMachineSimplified", &SynchronousMachineSimplified_factory); } void SynchronousMachineSimplified::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/SynchronousMachineSimplified.hpp b/CGMES_2.4.15_16FEB2016/SynchronousMachineSimplified.hpp index 4523e6baf..0de0ea229 100644 --- a/CGMES_2.4.15_16FEB2016/SynchronousMachineSimplified.hpp +++ b/CGMES_2.4.15_16FEB2016/SynchronousMachineSimplified.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The simplified model represents a synchronous generator as a constant internal voltage behind an impedance ( + ) as shown in the Simplified diagram. Since internal voltage is held constant, there is no input and any excitation system model will be ignored. There is also no output. This model should not be used for representing a real generator except, perhaps, small generators whose response is insignificant. The parameters used for the Simplified model include: - */ + /** \brief The simplified model represents a synchronous generator as a constant internal voltage behind an impedance ( + ) as shown in the Simplified diagram. Since internal voltage is held constant, there is no input and any excitation system model will be ignored. There is also no output. This model should not be used for representing a real generator except, perhaps, small generators whose response is insignificant. The parameters used for the Simplified model include: */ class SynchronousMachineSimplified : public SynchronousMachineDynamics { public: @@ -26,7 +24,6 @@ namespace CIMPP SynchronousMachineSimplified(); ~SynchronousMachineSimplified() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/SynchronousMachineTimeConstantReactance.cpp b/CGMES_2.4.15_16FEB2016/SynchronousMachineTimeConstantReactance.cpp index 39c775b65..0abb79508 100644 --- a/CGMES_2.4.15_16FEB2016/SynchronousMachineTimeConstantReactance.cpp +++ b/CGMES_2.4.15_16FEB2016/SynchronousMachineTimeConstantReactance.cpp @@ -8,25 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "SynchronousMachineModelKind.hpp" -#include "RotorKind.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -SynchronousMachineTimeConstantReactance::SynchronousMachineTimeConstantReactance() {}; -SynchronousMachineTimeConstantReactance::~SynchronousMachineTimeConstantReactance() {}; +SynchronousMachineTimeConstantReactance::SynchronousMachineTimeConstantReactance() {} +SynchronousMachineTimeConstantReactance::~SynchronousMachineTimeConstantReactance() {} static const std::list PossibleProfilesForClass = { @@ -66,194 +52,206 @@ SynchronousMachineTimeConstantReactance::getPossibleProfilesForAttributes() cons return map; } - -bool assign_SynchronousMachineTimeConstantReactance_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_modelType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_modelType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->modelType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_rotorType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_rotorType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rotorType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_tpdo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_tpdo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpdo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_tppdo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_tppdo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tppdo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_tppqo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_tppqo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tppqo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_tpqo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_tpqo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpqo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_xDirectSubtrans(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_xDirectSubtrans(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xDirectSubtrans; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_xDirectSync(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_xDirectSync(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xDirectSync; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_xDirectTrans(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_xDirectTrans(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xDirectTrans; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_xQuadSubtrans(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_xQuadSubtrans(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xQuadSubtrans; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_xQuadSync(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_xQuadSync(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xQuadSync; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_xQuadTrans(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_xQuadTrans(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xQuadTrans; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_SynchronousMachineTimeConstantReactance_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -265,11 +263,12 @@ bool get_SynchronousMachineTimeConstantReactance_ks(const BaseClass* BaseClass_p return false; } -bool get_SynchronousMachineTimeConstantReactance_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_modelType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tc; + buffer << element->modelType; if (!buffer.str().empty()) { return true; @@ -279,11 +278,12 @@ bool get_SynchronousMachineTimeConstantReactance_tc(const BaseClass* BaseClass_p return false; } -bool get_SynchronousMachineTimeConstantReactance_tpdo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_rotorType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tpdo; + buffer << element->rotorType; if (!buffer.str().empty()) { return true; @@ -293,11 +293,12 @@ bool get_SynchronousMachineTimeConstantReactance_tpdo(const BaseClass* BaseClass return false; } -bool get_SynchronousMachineTimeConstantReactance_tppdo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tppdo; + buffer << element->tc; if (!buffer.str().empty()) { return true; @@ -307,11 +308,12 @@ bool get_SynchronousMachineTimeConstantReactance_tppdo(const BaseClass* BaseClas return false; } -bool get_SynchronousMachineTimeConstantReactance_tppqo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_tpdo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tppqo; + buffer << element->tpdo; if (!buffer.str().empty()) { return true; @@ -321,11 +323,12 @@ bool get_SynchronousMachineTimeConstantReactance_tppqo(const BaseClass* BaseClas return false; } -bool get_SynchronousMachineTimeConstantReactance_tpqo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_tppdo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tpqo; + buffer << element->tppdo; if (!buffer.str().empty()) { return true; @@ -335,11 +338,12 @@ bool get_SynchronousMachineTimeConstantReactance_tpqo(const BaseClass* BaseClass return false; } -bool get_SynchronousMachineTimeConstantReactance_xDirectSubtrans(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_tppqo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xDirectSubtrans; + buffer << element->tppqo; if (!buffer.str().empty()) { return true; @@ -349,11 +353,12 @@ bool get_SynchronousMachineTimeConstantReactance_xDirectSubtrans(const BaseClass return false; } -bool get_SynchronousMachineTimeConstantReactance_xDirectSync(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_tpqo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xDirectSync; + buffer << element->tpqo; if (!buffer.str().empty()) { return true; @@ -363,11 +368,12 @@ bool get_SynchronousMachineTimeConstantReactance_xDirectSync(const BaseClass* Ba return false; } -bool get_SynchronousMachineTimeConstantReactance_xDirectTrans(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_xDirectSubtrans(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xDirectTrans; + buffer << element->xDirectSubtrans; if (!buffer.str().empty()) { return true; @@ -377,11 +383,12 @@ bool get_SynchronousMachineTimeConstantReactance_xDirectTrans(const BaseClass* B return false; } -bool get_SynchronousMachineTimeConstantReactance_xQuadSubtrans(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_xDirectSync(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xQuadSubtrans; + buffer << element->xDirectSync; if (!buffer.str().empty()) { return true; @@ -391,11 +398,12 @@ bool get_SynchronousMachineTimeConstantReactance_xQuadSubtrans(const BaseClass* return false; } -bool get_SynchronousMachineTimeConstantReactance_xQuadSync(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_xDirectTrans(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xQuadSync; + buffer << element->xDirectTrans; if (!buffer.str().empty()) { return true; @@ -405,11 +413,12 @@ bool get_SynchronousMachineTimeConstantReactance_xQuadSync(const BaseClass* Base return false; } -bool get_SynchronousMachineTimeConstantReactance_xQuadTrans(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_xQuadSubtrans(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xQuadTrans; + buffer << element->xQuadSubtrans; if (!buffer.str().empty()) { return true; @@ -419,13 +428,12 @@ bool get_SynchronousMachineTimeConstantReactance_xQuadTrans(const BaseClass* Bas return false; } - - -bool get_SynchronousMachineTimeConstantReactance_modelType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_xQuadSync(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->modelType; + buffer << element->xQuadSync; if (!buffer.str().empty()) { return true; @@ -435,11 +443,12 @@ bool get_SynchronousMachineTimeConstantReactance_modelType(const BaseClass* Base return false; } -bool get_SynchronousMachineTimeConstantReactance_rotorType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_xQuadTrans(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->rotorType; + buffer << element->xQuadTrans; if (!buffer.str().empty()) { return true; @@ -457,25 +466,25 @@ const char* SynchronousMachineTimeConstantReactance::debugString() const void SynchronousMachineTimeConstantReactance::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance"), &SynchronousMachineTimeConstantReactance_factory)); + factory_map.emplace("cim:SynchronousMachineTimeConstantReactance", &SynchronousMachineTimeConstantReactance_factory); } void SynchronousMachineTimeConstantReactance::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.ks"), &assign_SynchronousMachineTimeConstantReactance_ks)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.modelType"), &assign_SynchronousMachineTimeConstantReactance_modelType)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.rotorType"), &assign_SynchronousMachineTimeConstantReactance_rotorType)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.tc"), &assign_SynchronousMachineTimeConstantReactance_tc)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.tpdo"), &assign_SynchronousMachineTimeConstantReactance_tpdo)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.tppdo"), &assign_SynchronousMachineTimeConstantReactance_tppdo)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.tppqo"), &assign_SynchronousMachineTimeConstantReactance_tppqo)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.tpqo"), &assign_SynchronousMachineTimeConstantReactance_tpqo)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.xDirectSubtrans"), &assign_SynchronousMachineTimeConstantReactance_xDirectSubtrans)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.xDirectSync"), &assign_SynchronousMachineTimeConstantReactance_xDirectSync)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.xDirectTrans"), &assign_SynchronousMachineTimeConstantReactance_xDirectTrans)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.xQuadSubtrans"), &assign_SynchronousMachineTimeConstantReactance_xQuadSubtrans)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.xQuadSync"), &assign_SynchronousMachineTimeConstantReactance_xQuadSync)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.xQuadTrans"), &assign_SynchronousMachineTimeConstantReactance_xQuadTrans)); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.ks", &assign_SynchronousMachineTimeConstantReactance_ks); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.modelType", &assign_SynchronousMachineTimeConstantReactance_modelType); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.rotorType", &assign_SynchronousMachineTimeConstantReactance_rotorType); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.tc", &assign_SynchronousMachineTimeConstantReactance_tc); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.tpdo", &assign_SynchronousMachineTimeConstantReactance_tpdo); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.tppdo", &assign_SynchronousMachineTimeConstantReactance_tppdo); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.tppqo", &assign_SynchronousMachineTimeConstantReactance_tppqo); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.tpqo", &assign_SynchronousMachineTimeConstantReactance_tpqo); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.xDirectSubtrans", &assign_SynchronousMachineTimeConstantReactance_xDirectSubtrans); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.xDirectSync", &assign_SynchronousMachineTimeConstantReactance_xDirectSync); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.xDirectTrans", &assign_SynchronousMachineTimeConstantReactance_xDirectTrans); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.xQuadSubtrans", &assign_SynchronousMachineTimeConstantReactance_xQuadSubtrans); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.xQuadSync", &assign_SynchronousMachineTimeConstantReactance_xQuadSync); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.xQuadTrans", &assign_SynchronousMachineTimeConstantReactance_xQuadTrans); } void SynchronousMachineTimeConstantReactance::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/SynchronousMachineTimeConstantReactance.hpp b/CGMES_2.4.15_16FEB2016/SynchronousMachineTimeConstantReactance.hpp index 8d9ac309a..51a881b24 100644 --- a/CGMES_2.4.15_16FEB2016/SynchronousMachineTimeConstantReactance.hpp +++ b/CGMES_2.4.15_16FEB2016/SynchronousMachineTimeConstantReactance.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Synchronous machine detailed modelling types are defined by the combination of the attributes SynchronousMachineTimeConstantReactance.modelType and SynchronousMachineTimeConstantReactance.rotorType. The parameters used for models expressed in time constant reactance form include: - */ + /** \brief Synchronous machine detailed modelling types are defined by the combination of the attributes SynchronousMachineTimeConstantReactance.modelType and SynchronousMachineTimeConstantReactance.rotorType. The parameters used for models expressed in time constant reactance form include: */ class SynchronousMachineTimeConstantReactance : public SynchronousMachineDetailed { public: @@ -31,20 +29,47 @@ namespace CIMPP SynchronousMachineTimeConstantReactance(); ~SynchronousMachineTimeConstantReactance() override; - CIMPP::Simple_Float ks; /* Saturation loading correction factor (Ks) (>= 0). Used only by Type J model. Typical Value = 0. Default: nullptr */ - CIMPP::SynchronousMachineModelKind modelType; /* Type of synchronous machine model used in Dynamic simulation applications. Default: 0 */ - CIMPP::RotorKind rotorType; /* Type of rotor on physical machine. Default: 0 */ - CIMPP::Seconds tc; /* Damping time constant for `Canay` reactance. Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tpdo; /* Direct-axis transient rotor time constant (T`do) (> T``do). Typical Value = 5. Default: nullptr */ - CIMPP::Seconds tppdo; /* Direct-axis subtransient rotor time constant (T``do) (> 0). Typical Value = 0.03. Default: nullptr */ - CIMPP::Seconds tppqo; /* Quadrature-axis subtransient rotor time constant (T``qo) (> 0). Typical Value = 0.03. Default: nullptr */ - CIMPP::Seconds tpqo; /* Quadrature-axis transient rotor time constant (T`qo) (> T``qo). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU xDirectSubtrans; /* Direct-axis subtransient reactance (unsaturated) (X``d) (> Xl). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU xDirectSync; /* Direct-axis synchronous reactance (Xd) (>= X`d). The quotient of a sustained value of that AC component of armature voltage that is produced by the total direct-axis flux due to direct-axis armature current and the value of the AC component of this current, the machine running at rated speed. Typical Value = 1.8. Default: nullptr */ - CIMPP::PU xDirectTrans; /* Direct-axis transient reactance (unsaturated) (X`d) (> =X``d). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU xQuadSubtrans; /* Quadrature-axis subtransient reactance (X``q) (> Xl). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU xQuadSync; /* Quadrature-axis synchronous reactance (Xq) (> =X`q). The ratio of the component of reactive armature voltage, due to the quadrature-axis component of armature current, to this component of current, under steady state conditions and at rated frequency. Typical Value = 1.6. Default: nullptr */ - CIMPP::PU xQuadTrans; /* Quadrature-axis transient reactance (X`q) (> =X``q). Typical Value = 0.3. Default: nullptr */ + /** \brief Saturation loading correction factor (Ks) (>= 0). Used only by Type J model. Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float ks; + + /** \brief Type of synchronous machine model used in Dynamic simulation applications. Default: 0 */ + CIMPP::SynchronousMachineModelKind modelType; + + /** \brief Type of rotor on physical machine. Default: 0 */ + CIMPP::RotorKind rotorType; + + /** \brief Damping time constant for `Canay` reactance. Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Direct-axis transient rotor time constant (T`do) (> T``do). Typical Value = 5. Default: nullptr */ + CIMPP::Seconds tpdo; + + /** \brief Direct-axis subtransient rotor time constant (T``do) (> 0). Typical Value = 0.03. Default: nullptr */ + CIMPP::Seconds tppdo; + + /** \brief Quadrature-axis subtransient rotor time constant (T``qo) (> 0). Typical Value = 0.03. Default: nullptr */ + CIMPP::Seconds tppqo; + + /** \brief Quadrature-axis transient rotor time constant (T`qo) (> T``qo). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds tpqo; + + /** \brief Direct-axis subtransient reactance (unsaturated) (X``d) (> Xl). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU xDirectSubtrans; + + /** \brief Direct-axis synchronous reactance (Xd) (>= X`d). The quotient of a sustained value of that AC component of armature voltage that is produced by the total direct-axis flux due to direct-axis armature current and the value of the AC component of this current, the machine running at rated speed. Typical Value = 1.8. Default: nullptr */ + CIMPP::PU xDirectSync; + + /** \brief Direct-axis transient reactance (unsaturated) (X`d) (> =X``d). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU xDirectTrans; + + /** \brief Quadrature-axis subtransient reactance (X``q) (> Xl). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU xQuadSubtrans; + + /** \brief Quadrature-axis synchronous reactance (Xq) (> =X`q). The ratio of the component of reactive armature voltage, due to the quadrature-axis component of armature current, to this component of current, under steady state conditions and at rated frequency. Typical Value = 1.6. Default: nullptr */ + CIMPP::PU xQuadSync; + + /** \brief Quadrature-axis transient reactance (X`q) (> =X``q). Typical Value = 0.3. Default: nullptr */ + CIMPP::PU xQuadTrans; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/SynchronousMachineUserDefined.cpp b/CGMES_2.4.15_16FEB2016/SynchronousMachineUserDefined.cpp index 80f8bfed6..9bdfab19d 100644 --- a/CGMES_2.4.15_16FEB2016/SynchronousMachineUserDefined.cpp +++ b/CGMES_2.4.15_16FEB2016/SynchronousMachineUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -SynchronousMachineUserDefined::SynchronousMachineUserDefined() {}; -SynchronousMachineUserDefined::~SynchronousMachineUserDefined() {}; +SynchronousMachineUserDefined::SynchronousMachineUserDefined() {} +SynchronousMachineUserDefined::~SynchronousMachineUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ SynchronousMachineUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_SynchronousMachineUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (SynchronousMachineUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_SynchronousMachineUserDefined(BaseClass*, BaseClass*); bool assign_SynchronousMachineUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_SynchronousMachineUserDefined_ProprietaryParameterDynamics(BaseClass return false; } +bool assign_SynchronousMachineUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + SynchronousMachineUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_SynchronousMachineUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_SynchronousMachineUserDefined_proprietary(const BaseClass* BaseClass_pt return false; } - - const char SynchronousMachineUserDefined::debugName[] = "SynchronousMachineUserDefined"; const char* SynchronousMachineUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* SynchronousMachineUserDefined::debugString() const void SynchronousMachineUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SynchronousMachineUserDefined"), &SynchronousMachineUserDefined_factory)); + factory_map.emplace("cim:SynchronousMachineUserDefined", &SynchronousMachineUserDefined_factory); } void SynchronousMachineUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineUserDefined.proprietary"), &assign_SynchronousMachineUserDefined_proprietary)); + assign_map.emplace("cim:SynchronousMachineUserDefined.proprietary", &assign_SynchronousMachineUserDefined_proprietary); } void SynchronousMachineUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineUserDefined.ProprietaryParameterDynamics"), &assign_SynchronousMachineUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:SynchronousMachineUserDefined.ProprietaryParameterDynamics", &assign_SynchronousMachineUserDefined_ProprietaryParameterDynamics); } void SynchronousMachineUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/SynchronousMachineUserDefined.hpp b/CGMES_2.4.15_16FEB2016/SynchronousMachineUserDefined.hpp index e575390b2..6a9b6c7f7 100644 --- a/CGMES_2.4.15_16FEB2016/SynchronousMachineUserDefined.hpp +++ b/CGMES_2.4.15_16FEB2016/SynchronousMachineUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Synchronous machine whose dynamic behaviour is described by a user-defined model. - */ + /** \brief Synchronous machine whose dynamic behaviour is described by a user-defined model. */ class SynchronousMachineUserDefined : public SynchronousMachineDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP SynchronousMachineUserDefined(); ~SynchronousMachineUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/TapChanger.cpp b/CGMES_2.4.15_16FEB2016/TapChanger.cpp index 9d1a3cdd3..eeecf62b0 100644 --- a/CGMES_2.4.15_16FEB2016/TapChanger.cpp +++ b/CGMES_2.4.15_16FEB2016/TapChanger.cpp @@ -11,19 +11,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "SvTapStep.hpp" #include "TapChangerControl.hpp" #include "TapSchedule.hpp" -#include "Boolean.hpp" -#include "Integer.hpp" -#include "Integer.hpp" -#include "Boolean.hpp" -#include "Integer.hpp" -#include "Voltage.hpp" -#include "Integer.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -TapChanger::TapChanger() : SvTapStep(nullptr), TapChangerControl(nullptr) {}; -TapChanger::~TapChanger() {}; +TapChanger::TapChanger() : SvTapStep(nullptr), TapChangerControl(nullptr) {} +TapChanger::~TapChanger() {} static const std::list PossibleProfilesForClass = { @@ -62,164 +54,189 @@ TapChanger::getPossibleProfilesForAttributes() const return map; } +bool assign_SvTapStep_TapChanger(BaseClass*, BaseClass*); +bool assign_TapChanger_SvTapStep(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TapChanger* element = dynamic_cast(BaseClass_ptr1); + SvTapStep* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->SvTapStep != element2) + { + element->SvTapStep = element2; + return assign_SvTapStep_TapChanger(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_TapChanger_controlEnabled(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChangerControl_TapChanger(BaseClass*, BaseClass*); +bool assign_TapChanger_TapChangerControl(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + TapChanger* element = dynamic_cast(BaseClass_ptr1); + TapChangerControl* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->controlEnabled; - if (buffer.fail()) - return false; - else - return true; + if (element->TapChangerControl != element2) + { + element->TapChangerControl = element2; + return assign_TapChangerControl_TapChanger(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_TapChanger_highStep(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapSchedule_TapChanger(BaseClass*, BaseClass*); +bool assign_TapChanger_TapSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + TapChanger* element = dynamic_cast(BaseClass_ptr1); + TapSchedule* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->highStep; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->TapSchedules.begin(), element->TapSchedules.end(), element2) == element->TapSchedules.end()) + { + element->TapSchedules.push_back(element2); + return assign_TapSchedule_TapChanger(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_TapChanger_lowStep(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChanger_controlEnabled(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->lowStep; - if (buffer.fail()) - return false; - else + buffer >> element->controlEnabled; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChanger_ltcFlag(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChanger_highStep(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->ltcFlag; - if (buffer.fail()) - return false; - else + buffer >> element->highStep; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChanger_neutralStep(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChanger_lowStep(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->neutralStep; - if (buffer.fail()) - return false; - else + buffer >> element->lowStep; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChanger_neutralU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChanger_ltcFlag(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->neutralU; - if (buffer.fail()) - return false; - else + buffer >> element->ltcFlag; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChanger_normalStep(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChanger_neutralStep(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->normalStep; - if (buffer.fail()) - return false; - else + buffer >> element->neutralStep; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChanger_step(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChanger_neutralU(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->step; - if (buffer.fail()) - return false; - else + buffer >> element->neutralU; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_SvTapStep_TapChanger(BaseClass*, BaseClass*); -bool assign_TapChanger_SvTapStep(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_TapChanger_normalStep(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { TapChanger* element = dynamic_cast(BaseClass_ptr1); - SvTapStep* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->SvTapStep != element2) + buffer >> element->normalStep; + if (!buffer.fail()) { - element->SvTapStep = element2; - return assign_SvTapStep_TapChanger(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_TapChangerControl_TapChanger(BaseClass*, BaseClass*); -bool assign_TapChanger_TapChangerControl(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_TapChanger_step(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { TapChanger* element = dynamic_cast(BaseClass_ptr1); - TapChangerControl* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->TapChangerControl != element2) + buffer >> element->step; + if (!buffer.fail()) { - element->TapChangerControl = element2; - return assign_TapChangerControl_TapChanger(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_TapSchedule_TapChanger(BaseClass*, BaseClass*); -bool assign_TapChanger_TapSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + + +bool get_TapChanger_TapChangerControl(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - TapChanger* element = dynamic_cast(BaseClass_ptr1); - TapSchedule* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (std::find(element->TapSchedules.begin(), element->TapSchedules.end(), element2) == element->TapSchedules.end()) + if (element->TapChangerControl != 0) { - element->TapSchedules.push_back(element2); - return assign_TapSchedule_TapChanger(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->TapChangerControl); + return true; } - return true; } return false; } + bool get_TapChanger_controlEnabled(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChanger* element = dynamic_cast(BaseClass_ptr1)) + const TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->controlEnabled; if (!buffer.str().empty()) @@ -233,7 +250,8 @@ bool get_TapChanger_controlEnabled(const BaseClass* BaseClass_ptr1, std::strings bool get_TapChanger_highStep(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChanger* element = dynamic_cast(BaseClass_ptr1)) + const TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->highStep; if (!buffer.str().empty()) @@ -247,7 +265,8 @@ bool get_TapChanger_highStep(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_TapChanger_lowStep(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChanger* element = dynamic_cast(BaseClass_ptr1)) + const TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lowStep; if (!buffer.str().empty()) @@ -261,7 +280,8 @@ bool get_TapChanger_lowStep(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_TapChanger_ltcFlag(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChanger* element = dynamic_cast(BaseClass_ptr1)) + const TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ltcFlag; if (!buffer.str().empty()) @@ -275,7 +295,8 @@ bool get_TapChanger_ltcFlag(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_TapChanger_neutralStep(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChanger* element = dynamic_cast(BaseClass_ptr1)) + const TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->neutralStep; if (!buffer.str().empty()) @@ -289,7 +310,8 @@ bool get_TapChanger_neutralStep(const BaseClass* BaseClass_ptr1, std::stringstre bool get_TapChanger_neutralU(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChanger* element = dynamic_cast(BaseClass_ptr1)) + const TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->neutralU; if (!buffer.str().empty()) @@ -303,7 +325,8 @@ bool get_TapChanger_neutralU(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_TapChanger_normalStep(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChanger* element = dynamic_cast(BaseClass_ptr1)) + const TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->normalStep; if (!buffer.str().empty()) @@ -317,7 +340,8 @@ bool get_TapChanger_normalStep(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_TapChanger_step(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChanger* element = dynamic_cast(BaseClass_ptr1)) + const TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->step; if (!buffer.str().empty()) @@ -329,21 +353,6 @@ bool get_TapChanger_step(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } - -bool get_TapChanger_TapChangerControl(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const TapChanger* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->TapChangerControl != 0) - { - BaseClass_list.push_back(element->TapChangerControl); - return true; - } - } - return false; -} - - const char TapChanger::debugName[] = "TapChanger"; const char* TapChanger::debugString() const { @@ -352,26 +361,26 @@ const char* TapChanger::debugString() const void TapChanger::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TapChanger"), &TapChanger_factory)); + factory_map.emplace("cim:TapChanger", &TapChanger_factory); } void TapChanger::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TapChanger.controlEnabled"), &assign_TapChanger_controlEnabled)); - assign_map.insert(std::make_pair(std::string("cim:TapChanger.highStep"), &assign_TapChanger_highStep)); - assign_map.insert(std::make_pair(std::string("cim:TapChanger.lowStep"), &assign_TapChanger_lowStep)); - assign_map.insert(std::make_pair(std::string("cim:TapChanger.ltcFlag"), &assign_TapChanger_ltcFlag)); - assign_map.insert(std::make_pair(std::string("cim:TapChanger.neutralStep"), &assign_TapChanger_neutralStep)); - assign_map.insert(std::make_pair(std::string("cim:TapChanger.neutralU"), &assign_TapChanger_neutralU)); - assign_map.insert(std::make_pair(std::string("cim:TapChanger.normalStep"), &assign_TapChanger_normalStep)); - assign_map.insert(std::make_pair(std::string("cim:TapChanger.step"), &assign_TapChanger_step)); + assign_map.emplace("cim:TapChanger.controlEnabled", &assign_TapChanger_controlEnabled); + assign_map.emplace("cim:TapChanger.highStep", &assign_TapChanger_highStep); + assign_map.emplace("cim:TapChanger.lowStep", &assign_TapChanger_lowStep); + assign_map.emplace("cim:TapChanger.ltcFlag", &assign_TapChanger_ltcFlag); + assign_map.emplace("cim:TapChanger.neutralStep", &assign_TapChanger_neutralStep); + assign_map.emplace("cim:TapChanger.neutralU", &assign_TapChanger_neutralU); + assign_map.emplace("cim:TapChanger.normalStep", &assign_TapChanger_normalStep); + assign_map.emplace("cim:TapChanger.step", &assign_TapChanger_step); } void TapChanger::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TapChanger.SvTapStep"), &assign_TapChanger_SvTapStep)); - assign_map.insert(std::make_pair(std::string("cim:TapChanger.TapChangerControl"), &assign_TapChanger_TapChangerControl)); - assign_map.insert(std::make_pair(std::string("cim:TapChanger.TapSchedules"), &assign_TapChanger_TapSchedules)); + assign_map.emplace("cim:TapChanger.SvTapStep", &assign_TapChanger_SvTapStep); + assign_map.emplace("cim:TapChanger.TapChangerControl", &assign_TapChanger_TapChangerControl); + assign_map.emplace("cim:TapChanger.TapSchedules", &assign_TapChanger_TapSchedules); } void TapChanger::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/TapChanger.hpp b/CGMES_2.4.15_16FEB2016/TapChanger.hpp index bf60d5805..f76517308 100644 --- a/CGMES_2.4.15_16FEB2016/TapChanger.hpp +++ b/CGMES_2.4.15_16FEB2016/TapChanger.hpp @@ -23,9 +23,7 @@ namespace CIMPP class TapChangerControl; class TapSchedule; - /* - Mechanism for changing transformer winding tap positions. - */ + /** \brief Mechanism for changing transformer winding tap positions. */ class TapChanger : public PowerSystemResource { public: @@ -33,17 +31,38 @@ namespace CIMPP TapChanger(); ~TapChanger() override; - CIMPP::SvTapStep* SvTapStep; /* The tap step state associated with the tap changer. Default: 0 */ - CIMPP::TapChangerControl* TapChangerControl; /* The tap changers that participates in this regulating tap control scheme. Default: 0 */ - std::list TapSchedules; /* A TapSchedule is associated with a TapChanger. Default: 0 */ - CIMPP::Boolean controlEnabled; /* Specifies the regulation status of the equipment. True is regulating, false is not regulating. Default: false */ - CIMPP::Integer highStep; /* Highest possible tap step position, advance from neutral. The attribute shall be greater than lowStep. Default: 0 */ - CIMPP::Integer lowStep; /* Lowest possible tap step position, retard from neutral Default: 0 */ - CIMPP::Boolean ltcFlag; /* Specifies whether or not a TapChanger has load tap changing capabilities. Default: false */ - CIMPP::Integer neutralStep; /* The neutral tap step position for this winding. The attribute shall be equal or greater than lowStep and equal or less than highStep. Default: 0 */ - CIMPP::Voltage neutralU; /* Voltage at which the winding operates at the neutral tap setting. Default: nullptr */ - CIMPP::Integer normalStep; /* The tap step position used in `normal` network operation for this winding. For a `Fixed` tap changer indicates the current physical tap setting. The attribute shall be equal or greater than lowStep and equal or less than highStep. Default: 0 */ - CIMPP::Simple_Float step; /* Tap changer position. Starting step for a steady state solution. Non integer values are allowed to support continuous tap variables. The reasons for continuous value are to support study cases where no discrete tap changers has yet been designed, a solutions where a narrow voltage band force the tap step to oscillate or accommodate for a continuous solution as input. The attribute shall be equal or greater than lowStep and equal or less than highStep. Default: nullptr */ + /** \brief The tap step state associated with the tap changer. Default: 0 */ + CIMPP::SvTapStep* SvTapStep; + + /** \brief The tap changers that participates in this regulating tap control scheme. Default: 0 */ + CIMPP::TapChangerControl* TapChangerControl; + + /** \brief A TapSchedule is associated with a TapChanger. Default: 0 */ + std::list TapSchedules; + + /** \brief Specifies the regulation status of the equipment. True is regulating, false is not regulating. Default: false */ + CIMPP::Boolean controlEnabled; + + /** \brief Highest possible tap step position, advance from neutral. The attribute shall be greater than lowStep. Default: 0 */ + CIMPP::Integer highStep; + + /** \brief Lowest possible tap step position, retard from neutral Default: 0 */ + CIMPP::Integer lowStep; + + /** \brief Specifies whether or not a TapChanger has load tap changing capabilities. Default: false */ + CIMPP::Boolean ltcFlag; + + /** \brief The neutral tap step position for this winding. The attribute shall be equal or greater than lowStep and equal or less than highStep. Default: 0 */ + CIMPP::Integer neutralStep; + + /** \brief Voltage at which the winding operates at the neutral tap setting. Default: nullptr */ + CIMPP::Voltage neutralU; + + /** \brief The tap step position used in `normal` network operation for this winding. For a `Fixed` tap changer indicates the current physical tap setting. The attribute shall be equal or greater than lowStep and equal or less than highStep. Default: 0 */ + CIMPP::Integer normalStep; + + /** \brief Tap changer position. Starting step for a steady state solution. Non integer values are allowed to support continuous tap variables. The reasons for continuous value are to support study cases where no discrete tap changers has yet been designed, a solutions where a narrow voltage band force the tap step to oscillate or accommodate for a continuous solution as input. The attribute shall be equal or greater than lowStep and equal or less than highStep. Default: nullptr */ + CIMPP::Simple_Float step; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/TapChangerControl.cpp b/CGMES_2.4.15_16FEB2016/TapChangerControl.cpp index 4b1f495eb..167b0d3a7 100644 --- a/CGMES_2.4.15_16FEB2016/TapChangerControl.cpp +++ b/CGMES_2.4.15_16FEB2016/TapChangerControl.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -TapChangerControl::TapChangerControl() {}; -TapChangerControl::~TapChangerControl() {}; +TapChangerControl::TapChangerControl() {} +TapChangerControl::~TapChangerControl() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ TapChangerControl::getPossibleProfilesForAttributes() const return map; } - - bool assign_TapChanger_TapChangerControl(BaseClass*, BaseClass*); bool assign_TapChangerControl_TapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,7 +59,6 @@ bool assign_TapChangerControl_TapChanger(BaseClass* BaseClass_ptr1, BaseClass* B } - const char TapChangerControl::debugName[] = "TapChangerControl"; const char* TapChangerControl::debugString() const { @@ -70,7 +67,7 @@ const char* TapChangerControl::debugString() const void TapChangerControl::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TapChangerControl"), &TapChangerControl_factory)); + factory_map.emplace("cim:TapChangerControl", &TapChangerControl_factory); } void TapChangerControl::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -79,7 +76,7 @@ void TapChangerControl::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TapChangerControl.TapChanger"), &assign_TapChangerControl_TapChanger)); + assign_map.emplace("cim:TapChangerControl.TapChanger", &assign_TapChangerControl_TapChanger); } void TapChangerControl::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/TapChangerControl.hpp b/CGMES_2.4.15_16FEB2016/TapChangerControl.hpp index c42973e2f..ee70475dc 100644 --- a/CGMES_2.4.15_16FEB2016/TapChangerControl.hpp +++ b/CGMES_2.4.15_16FEB2016/TapChangerControl.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class TapChanger; - /* - Describes behavior specific to tap changers, e.g. how the voltage at the end of a line varies with the load level and compensation of the voltage drop by tap adjustment. - */ + /** \brief Describes behavior specific to tap changers, e.g. how the voltage at the end of a line varies with the load level and compensation of the voltage drop by tap adjustment. */ class TapChangerControl : public RegulatingControl { public: @@ -27,7 +25,8 @@ namespace CIMPP TapChangerControl(); ~TapChangerControl() override; - std::list TapChanger; /* The regulating control scheme in which this tap changer participates. Default: 0 */ + /** \brief The regulating control scheme in which this tap changer participates. Default: 0 */ + std::list TapChanger; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/TapChangerTablePoint.cpp b/CGMES_2.4.15_16FEB2016/TapChangerTablePoint.cpp index 3f0e77404..2044a9212 100644 --- a/CGMES_2.4.15_16FEB2016/TapChangerTablePoint.cpp +++ b/CGMES_2.4.15_16FEB2016/TapChangerTablePoint.cpp @@ -8,17 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PerCent.hpp" -#include "PerCent.hpp" -#include "PerCent.hpp" -#include "Simple_Float.hpp" -#include "Integer.hpp" -#include "PerCent.hpp" using namespace CIMPP; -TapChangerTablePoint::TapChangerTablePoint() {}; -TapChangerTablePoint::~TapChangerTablePoint() {}; +TapChangerTablePoint::TapChangerTablePoint() {} +TapChangerTablePoint::~TapChangerTablePoint() {} static const std::list PossibleProfilesForClass = { @@ -50,90 +44,94 @@ TapChangerTablePoint::getPossibleProfilesForAttributes() const return map; } - -bool assign_TapChangerTablePoint_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChangerTablePoint_b(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChangerTablePoint_g(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChangerTablePoint_g(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChangerTablePoint_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChangerTablePoint_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChangerTablePoint_ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChangerTablePoint_ratio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChangerTablePoint_step(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChangerTablePoint_step(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->step; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChangerTablePoint_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChangerTablePoint_x(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_TapChangerTablePoint_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b; if (!buffer.str().empty()) @@ -147,7 +145,8 @@ bool get_TapChangerTablePoint_b(const BaseClass* BaseClass_ptr1, std::stringstre bool get_TapChangerTablePoint_g(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g; if (!buffer.str().empty()) @@ -161,7 +160,8 @@ bool get_TapChangerTablePoint_g(const BaseClass* BaseClass_ptr1, std::stringstre bool get_TapChangerTablePoint_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -175,7 +175,8 @@ bool get_TapChangerTablePoint_r(const BaseClass* BaseClass_ptr1, std::stringstre bool get_TapChangerTablePoint_ratio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratio; if (!buffer.str().empty()) @@ -189,7 +190,8 @@ bool get_TapChangerTablePoint_ratio(const BaseClass* BaseClass_ptr1, std::string bool get_TapChangerTablePoint_step(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->step; if (!buffer.str().empty()) @@ -203,7 +205,8 @@ bool get_TapChangerTablePoint_step(const BaseClass* BaseClass_ptr1, std::strings bool get_TapChangerTablePoint_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x; if (!buffer.str().empty()) @@ -215,8 +218,6 @@ bool get_TapChangerTablePoint_x(const BaseClass* BaseClass_ptr1, std::stringstre return false; } - - const char TapChangerTablePoint::debugName[] = "TapChangerTablePoint"; const char* TapChangerTablePoint::debugString() const { @@ -225,17 +226,17 @@ const char* TapChangerTablePoint::debugString() const void TapChangerTablePoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TapChangerTablePoint"), &TapChangerTablePoint_factory)); + factory_map.emplace("cim:TapChangerTablePoint", &TapChangerTablePoint_factory); } void TapChangerTablePoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TapChangerTablePoint.b"), &assign_TapChangerTablePoint_b)); - assign_map.insert(std::make_pair(std::string("cim:TapChangerTablePoint.g"), &assign_TapChangerTablePoint_g)); - assign_map.insert(std::make_pair(std::string("cim:TapChangerTablePoint.r"), &assign_TapChangerTablePoint_r)); - assign_map.insert(std::make_pair(std::string("cim:TapChangerTablePoint.ratio"), &assign_TapChangerTablePoint_ratio)); - assign_map.insert(std::make_pair(std::string("cim:TapChangerTablePoint.step"), &assign_TapChangerTablePoint_step)); - assign_map.insert(std::make_pair(std::string("cim:TapChangerTablePoint.x"), &assign_TapChangerTablePoint_x)); + assign_map.emplace("cim:TapChangerTablePoint.b", &assign_TapChangerTablePoint_b); + assign_map.emplace("cim:TapChangerTablePoint.g", &assign_TapChangerTablePoint_g); + assign_map.emplace("cim:TapChangerTablePoint.r", &assign_TapChangerTablePoint_r); + assign_map.emplace("cim:TapChangerTablePoint.ratio", &assign_TapChangerTablePoint_ratio); + assign_map.emplace("cim:TapChangerTablePoint.step", &assign_TapChangerTablePoint_step); + assign_map.emplace("cim:TapChangerTablePoint.x", &assign_TapChangerTablePoint_x); } void TapChangerTablePoint::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/TapChangerTablePoint.hpp b/CGMES_2.4.15_16FEB2016/TapChangerTablePoint.hpp index 58c557043..aa6327644 100644 --- a/CGMES_2.4.15_16FEB2016/TapChangerTablePoint.hpp +++ b/CGMES_2.4.15_16FEB2016/TapChangerTablePoint.hpp @@ -26,12 +26,23 @@ namespace CIMPP TapChangerTablePoint(); ~TapChangerTablePoint() override; - CIMPP::PerCent b; /* The magnetizing branch susceptance deviation in percent of nominal value. The actual susceptance is calculated as follows: calculated magnetizing susceptance = b(nominal) * (1 + b(from this class)/100). The b(nominal) is defined as the static magnetizing susceptance on the associated power transformer end or ends. This model assumes the star impedance (pi model) form. Default: nullptr */ - CIMPP::PerCent g; /* The magnetizing branch conductance deviation in percent of nominal value. The actual conductance is calculated as follows: calculated magnetizing conductance = g(nominal) * (1 + g(from this class)/100). The g(nominal) is defined as the static magnetizing conductance on the associated power transformer end or ends. This model assumes the star impedance (pi model) form. Default: nullptr */ - CIMPP::PerCent r; /* The resistance deviation in percent of nominal value. The actual reactance is calculated as follows: calculated resistance = r(nominal) * (1 + r(from this class)/100). The r(nominal) is defined as the static resistance on the associated power transformer end or ends. This model assumes the star impedance (pi model) form. Default: nullptr */ - CIMPP::Simple_Float ratio; /* The voltage ratio in per unit. Hence this is a value close to one. Default: nullptr */ - CIMPP::Integer step; /* The tap step. Default: 0 */ - CIMPP::PerCent x; /* The series reactance deviation in percent of nominal value. The actual reactance is calculated as follows: calculated reactance = x(nominal) * (1 + x(from this class)/100). The x(nominal) is defined as the static series reactance on the associated power transformer end or ends. This model assumes the star impedance (pi model) form. Default: nullptr */ + /** \brief The magnetizing branch susceptance deviation in percent of nominal value. The actual susceptance is calculated as follows: calculated magnetizing susceptance = b(nominal) * (1 + b(from this class)/100). The b(nominal) is defined as the static magnetizing susceptance on the associated power transformer end or ends. This model assumes the star impedance (pi model) form. Default: nullptr */ + CIMPP::PerCent b; + + /** \brief The magnetizing branch conductance deviation in percent of nominal value. The actual conductance is calculated as follows: calculated magnetizing conductance = g(nominal) * (1 + g(from this class)/100). The g(nominal) is defined as the static magnetizing conductance on the associated power transformer end or ends. This model assumes the star impedance (pi model) form. Default: nullptr */ + CIMPP::PerCent g; + + /** \brief The resistance deviation in percent of nominal value. The actual reactance is calculated as follows: calculated resistance = r(nominal) * (1 + r(from this class)/100). The r(nominal) is defined as the static resistance on the associated power transformer end or ends. This model assumes the star impedance (pi model) form. Default: nullptr */ + CIMPP::PerCent r; + + /** \brief The voltage ratio in per unit. Hence this is a value close to one. Default: nullptr */ + CIMPP::Simple_Float ratio; + + /** \brief The tap step. Default: 0 */ + CIMPP::Integer step; + + /** \brief The series reactance deviation in percent of nominal value. The actual reactance is calculated as follows: calculated reactance = x(nominal) * (1 + x(from this class)/100). The x(nominal) is defined as the static series reactance on the associated power transformer end or ends. This model assumes the star impedance (pi model) form. Default: nullptr */ + CIMPP::PerCent x; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/TapSchedule.cpp b/CGMES_2.4.15_16FEB2016/TapSchedule.cpp index d294bd984..039a79967 100644 --- a/CGMES_2.4.15_16FEB2016/TapSchedule.cpp +++ b/CGMES_2.4.15_16FEB2016/TapSchedule.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -TapSchedule::TapSchedule() : TapChanger(nullptr) {}; -TapSchedule::~TapSchedule() {}; +TapSchedule::TapSchedule() : TapChanger(nullptr) {} +TapSchedule::~TapSchedule() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ TapSchedule::getPossibleProfilesForAttributes() const return map; } - - bool assign_TapChanger_TapSchedules(BaseClass*, BaseClass*); bool assign_TapSchedule_TapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_TapSchedule_TapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseCla return false; } - bool get_TapSchedule_TapChanger(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TapSchedule* element = dynamic_cast(BaseClass_ptr1)) + const TapSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->TapChanger != 0) { @@ -73,7 +71,6 @@ bool get_TapSchedule_TapChanger(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TapSchedule"), &TapSchedule_factory)); + factory_map.emplace("cim:TapSchedule", &TapSchedule_factory); } void TapSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void TapSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TapSchedule.TapChanger"), &assign_TapSchedule_TapChanger)); + assign_map.emplace("cim:TapSchedule.TapChanger", &assign_TapSchedule_TapChanger); } void TapSchedule::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/TapSchedule.hpp b/CGMES_2.4.15_16FEB2016/TapSchedule.hpp index 3f391e682..70565884c 100644 --- a/CGMES_2.4.15_16FEB2016/TapSchedule.hpp +++ b/CGMES_2.4.15_16FEB2016/TapSchedule.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class TapChanger; - /* - A pre-established pattern over time for a tap step. - */ + /** \brief A pre-established pattern over time for a tap step. */ class TapSchedule : public SeasonDayTypeSchedule { public: @@ -27,7 +25,8 @@ namespace CIMPP TapSchedule(); ~TapSchedule() override; - CIMPP::TapChanger* TapChanger; /* A TapChanger can have TapSchedules. Default: 0 */ + /** \brief A TapChanger can have TapSchedules. Default: 0 */ + CIMPP::TapChanger* TapChanger; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Temperature.hpp b/CGMES_2.4.15_16FEB2016/Temperature.hpp index 33ba8ea2b..b7dfa3115 100644 --- a/CGMES_2.4.15_16FEB2016/Temperature.hpp +++ b/CGMES_2.4.15_16FEB2016/Temperature.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Value of temperature in degrees Celsius. - */ + /** \brief Value of temperature in degrees Celsius. */ class Temperature { public: diff --git a/CGMES_2.4.15_16FEB2016/Terminal.cpp b/CGMES_2.4.15_16FEB2016/Terminal.cpp index b3b9ab2ef..25d0c3a25 100644 --- a/CGMES_2.4.15_16FEB2016/Terminal.cpp +++ b/CGMES_2.4.15_16FEB2016/Terminal.cpp @@ -8,10 +8,9 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include +#include "ACDCConverter.hpp" #include "ConductingEquipment.hpp" #include "ConnectivityNode.hpp" -#include "ACDCConverter.hpp" -#include "MutualCoupling.hpp" #include "MutualCoupling.hpp" #include "RegulatingControl.hpp" #include "RemoteInputSignal.hpp" @@ -19,12 +18,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "TieFlow.hpp" #include "TopologicalNode.hpp" #include "TransformerEnd.hpp" -#include "PhaseCode.hpp" using namespace CIMPP; -Terminal::Terminal() : ConductingEquipment(nullptr), ConnectivityNode(nullptr), RegulatingControl(nullptr), SvPowerFlow(nullptr), TopologicalNode(nullptr) {}; -Terminal::~Terminal() {}; +Terminal::Terminal() : ConductingEquipment(nullptr), ConnectivityNode(nullptr), RegulatingControl(nullptr), SvPowerFlow(nullptr), TopologicalNode(nullptr) {} +Terminal::~Terminal() {} static const std::list PossibleProfilesForClass = { @@ -67,21 +65,6 @@ Terminal::getPossibleProfilesForAttributes() const return map; } - -bool assign_Terminal_phases(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (Terminal* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->phases; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ConductingEquipment_Terminals(BaseClass*, BaseClass*); bool assign_Terminal_ConductingEquipment(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -98,6 +81,7 @@ bool assign_Terminal_ConductingEquipment(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_ConnectivityNode_Terminals(BaseClass*, BaseClass*); bool assign_Terminal_ConnectivityNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -114,6 +98,7 @@ bool assign_Terminal_ConnectivityNode(BaseClass* BaseClass_ptr1, BaseClass* Base } return false; } + bool assign_ACDCConverter_PccTerminal(BaseClass*, BaseClass*); bool assign_Terminal_ConverterDCSides(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -130,6 +115,7 @@ bool assign_Terminal_ConverterDCSides(BaseClass* BaseClass_ptr1, BaseClass* Base } return false; } + bool assign_MutualCoupling_First_Terminal(BaseClass*, BaseClass*); bool assign_Terminal_HasFirstMutualCoupling(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -146,6 +132,7 @@ bool assign_Terminal_HasFirstMutualCoupling(BaseClass* BaseClass_ptr1, BaseClass } return false; } + bool assign_MutualCoupling_Second_Terminal(BaseClass*, BaseClass*); bool assign_Terminal_HasSecondMutualCoupling(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -162,6 +149,7 @@ bool assign_Terminal_HasSecondMutualCoupling(BaseClass* BaseClass_ptr1, BaseClas } return false; } + bool assign_RegulatingControl_Terminal(BaseClass*, BaseClass*); bool assign_Terminal_RegulatingControl(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -178,6 +166,7 @@ bool assign_Terminal_RegulatingControl(BaseClass* BaseClass_ptr1, BaseClass* Bas } return false; } + bool assign_RemoteInputSignal_Terminal(BaseClass*, BaseClass*); bool assign_Terminal_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -194,6 +183,7 @@ bool assign_Terminal_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* Bas } return false; } + bool assign_SvPowerFlow_Terminal(BaseClass*, BaseClass*); bool assign_Terminal_SvPowerFlow(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -210,6 +200,7 @@ bool assign_Terminal_SvPowerFlow(BaseClass* BaseClass_ptr1, BaseClass* BaseClass } return false; } + bool assign_TieFlow_Terminal(BaseClass*, BaseClass*); bool assign_Terminal_TieFlow(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -226,6 +217,7 @@ bool assign_Terminal_TieFlow(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr } return false; } + bool assign_TopologicalNode_Terminal(BaseClass*, BaseClass*); bool assign_Terminal_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -242,6 +234,7 @@ bool assign_Terminal_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseC } return false; } + bool assign_TransformerEnd_Terminal(BaseClass*, BaseClass*); bool assign_Terminal_TransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -259,10 +252,24 @@ bool assign_Terminal_TransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* BaseCl return false; } +bool assign_Terminal_phases(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + Terminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->phases; + if (!buffer.fail()) + { + return true; + } + } + return false; +} bool get_Terminal_ConductingEquipment(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Terminal* element = dynamic_cast(BaseClass_ptr1)) + const Terminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ConductingEquipment != 0) { @@ -275,7 +282,8 @@ bool get_Terminal_ConductingEquipment(const BaseClass* BaseClass_ptr1, std::list bool get_Terminal_ConnectivityNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Terminal* element = dynamic_cast(BaseClass_ptr1)) + const Terminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ConnectivityNode != 0) { @@ -286,9 +294,17 @@ bool get_Terminal_ConnectivityNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Terminal* element = dynamic_cast(BaseClass_ptr1)) + const Terminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->TopologicalNode != 0) { @@ -302,7 +318,8 @@ bool get_Terminal_TopologicalNode(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1)) + const Terminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->phases; if (!buffer.str().empty()) @@ -322,27 +339,27 @@ const char* Terminal::debugString() const void Terminal::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Terminal"), &Terminal_factory)); + factory_map.emplace("cim:Terminal", &Terminal_factory); } void Terminal::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Terminal.phases"), &assign_Terminal_phases)); + assign_map.emplace("cim:Terminal.phases", &assign_Terminal_phases); } void Terminal::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Terminal.ConductingEquipment"), &assign_Terminal_ConductingEquipment)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.ConnectivityNode"), &assign_Terminal_ConnectivityNode)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.ConverterDCSides"), &assign_Terminal_ConverterDCSides)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.HasFirstMutualCoupling"), &assign_Terminal_HasFirstMutualCoupling)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.HasSecondMutualCoupling"), &assign_Terminal_HasSecondMutualCoupling)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.RegulatingControl"), &assign_Terminal_RegulatingControl)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.RemoteInputSignal"), &assign_Terminal_RemoteInputSignal)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.SvPowerFlow"), &assign_Terminal_SvPowerFlow)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.TieFlow"), &assign_Terminal_TieFlow)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.TopologicalNode"), &assign_Terminal_TopologicalNode)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.TransformerEnd"), &assign_Terminal_TransformerEnd)); + assign_map.emplace("cim:Terminal.ConductingEquipment", &assign_Terminal_ConductingEquipment); + assign_map.emplace("cim:Terminal.ConnectivityNode", &assign_Terminal_ConnectivityNode); + assign_map.emplace("cim:Terminal.ConverterDCSides", &assign_Terminal_ConverterDCSides); + assign_map.emplace("cim:Terminal.HasFirstMutualCoupling", &assign_Terminal_HasFirstMutualCoupling); + assign_map.emplace("cim:Terminal.HasSecondMutualCoupling", &assign_Terminal_HasSecondMutualCoupling); + assign_map.emplace("cim:Terminal.RegulatingControl", &assign_Terminal_RegulatingControl); + assign_map.emplace("cim:Terminal.RemoteInputSignal", &assign_Terminal_RemoteInputSignal); + assign_map.emplace("cim:Terminal.SvPowerFlow", &assign_Terminal_SvPowerFlow); + assign_map.emplace("cim:Terminal.TieFlow", &assign_Terminal_TieFlow); + assign_map.emplace("cim:Terminal.TopologicalNode", &assign_Terminal_TopologicalNode); + assign_map.emplace("cim:Terminal.TransformerEnd", &assign_Terminal_TransformerEnd); } void Terminal::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/Terminal.hpp b/CGMES_2.4.15_16FEB2016/Terminal.hpp index 9551684a2..58895e261 100644 --- a/CGMES_2.4.15_16FEB2016/Terminal.hpp +++ b/CGMES_2.4.15_16FEB2016/Terminal.hpp @@ -27,9 +27,7 @@ namespace CIMPP class TopologicalNode; class TransformerEnd; - /* - An AC electrical connection point to a piece of conducting equipment. Terminals are connected at physical connection points called connectivity nodes. - */ + /** \brief An AC electrical connection point to a piece of conducting equipment. Terminals are connected at physical connection points called connectivity nodes. */ class Terminal : public ACDCTerminal { public: @@ -37,18 +35,41 @@ namespace CIMPP Terminal(); ~Terminal() override; - CIMPP::ConductingEquipment* ConductingEquipment; /* The conducting equipment of the terminal. Conducting equipment have terminals that may be connected to other conducting equipment terminals via connectivity nodes or topological nodes. Default: 0 */ - CIMPP::ConnectivityNode* ConnectivityNode; /* Terminals interconnected with zero impedance at a this connectivity node. Default: 0 */ - std::list ConverterDCSides; /* Point of common coupling terminal for this converter DC side. It is typically the terminal on the power transformer (or switch) closest to the AC network. The power flow measurement must be the sum of all flows into the transformer. Default: 0 */ - std::list HasFirstMutualCoupling; /* Mutual couplings associated with the branch as the first branch. Default: 0 */ - std::list HasSecondMutualCoupling; /* Mutual couplings with the branch associated as the first branch. Default: 0 */ - CIMPP::RegulatingControl* RegulatingControl; /* The terminal associated with this regulating control. The terminal is associated instead of a node, since the terminal could connect into either a topological node (bus in bus-branch model) or a connectivity node (detailed switch model). Sometimes it is useful to model regulation at a terminal of a bus bar object since the bus bar can be present in both a bus-branch model or a model with switch detail. Default: 0 */ - std::list RemoteInputSignal; /* Input signal coming from this terminal. Default: 0 */ - CIMPP::SvPowerFlow* SvPowerFlow; /* The power flow state variable associated with the terminal. Default: 0 */ - std::list TieFlow; /* The control area tie flows to which this terminal associates. Default: 0 */ - CIMPP::TopologicalNode* TopologicalNode; /* The terminals associated with the topological node. This can be used as an alternative to the connectivity node path to terminal, thus making it unneccesary to model connectivity nodes in some cases. Note that if connectivity nodes are in the model, this association would probably not be used as an input specification. Default: 0 */ - std::list TransformerEnd; /* All transformer ends connected at this terminal. Default: 0 */ - CIMPP::PhaseCode phases; /* Represents the normal network phasing condition. If the attribute is missing three phases (ABC or ABCN) shall be assumed. Default: 0 */ + /** \brief The conducting equipment of the terminal. Conducting equipment have terminals that may be connected to other conducting equipment terminals via connectivity nodes or topological nodes. Default: 0 */ + CIMPP::ConductingEquipment* ConductingEquipment; + + /** \brief Terminals interconnected with zero impedance at a this connectivity node. Default: 0 */ + CIMPP::ConnectivityNode* ConnectivityNode; + + /** \brief Point of common coupling terminal for this converter DC side. It is typically the terminal on the power transformer (or switch) closest to the AC network. The power flow measurement must be the sum of all flows into the transformer. Default: 0 */ + std::list ConverterDCSides; + + /** \brief Mutual couplings associated with the branch as the first branch. Default: 0 */ + std::list HasFirstMutualCoupling; + + /** \brief Mutual couplings with the branch associated as the first branch. Default: 0 */ + std::list HasSecondMutualCoupling; + + /** \brief The terminal associated with this regulating control. The terminal is associated instead of a node, since the terminal could connect into either a topological node (bus in bus-branch model) or a connectivity node (detailed switch model). Sometimes it is useful to model regulation at a terminal of a bus bar object since the bus bar can be present in both a bus-branch model or a model with switch detail. Default: 0 */ + CIMPP::RegulatingControl* RegulatingControl; + + /** \brief Input signal coming from this terminal. Default: 0 */ + std::list RemoteInputSignal; + + /** \brief The power flow state variable associated with the terminal. Default: 0 */ + CIMPP::SvPowerFlow* SvPowerFlow; + + /** \brief The control area tie flows to which this terminal associates. Default: 0 */ + std::list TieFlow; + + /** \brief The terminals associated with the topological node. This can be used as an alternative to the connectivity node path to terminal, thus making it unneccesary to model connectivity nodes in some cases. Note that if connectivity nodes are in the model, this association would probably not be used as an input specification. Default: 0 */ + CIMPP::TopologicalNode* TopologicalNode; + + /** \brief All transformer ends connected at this terminal. Default: 0 */ + std::list TransformerEnd; + + /** \brief Represents the normal network phasing condition. If the attribute is missing three phases (ABC or ABCN) shall be assumed. Default: 0 */ + CIMPP::PhaseCode phases; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/TextDiagramObject.cpp b/CGMES_2.4.15_16FEB2016/TextDiagramObject.cpp index d9738a22b..684542b39 100644 --- a/CGMES_2.4.15_16FEB2016/TextDiagramObject.cpp +++ b/CGMES_2.4.15_16FEB2016/TextDiagramObject.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "String.hpp" using namespace CIMPP; -TextDiagramObject::TextDiagramObject() {}; -TextDiagramObject::~TextDiagramObject() {}; +TextDiagramObject::TextDiagramObject() {} +TextDiagramObject::~TextDiagramObject() {} static const std::list PossibleProfilesForClass = { @@ -40,25 +39,24 @@ TextDiagramObject::getPossibleProfilesForAttributes() const return map; } - -bool assign_TextDiagramObject_text(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TextDiagramObject_text(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TextDiagramObject* element = dynamic_cast(BaseClass_ptr1)) + TextDiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->text = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_TextDiagramObject_text(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TextDiagramObject* element = dynamic_cast(BaseClass_ptr1)) + const TextDiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->text; if (!buffer.str().empty()) @@ -70,8 +68,6 @@ bool get_TextDiagramObject_text(const BaseClass* BaseClass_ptr1, std::stringstre return false; } - - const char TextDiagramObject::debugName[] = "TextDiagramObject"; const char* TextDiagramObject::debugString() const { @@ -80,12 +76,12 @@ const char* TextDiagramObject::debugString() const void TextDiagramObject::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TextDiagramObject"), &TextDiagramObject_factory)); + factory_map.emplace("cim:TextDiagramObject", &TextDiagramObject_factory); } void TextDiagramObject::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TextDiagramObject.text"), &assign_TextDiagramObject_text)); + assign_map.emplace("cim:TextDiagramObject.text", &assign_TextDiagramObject_text); } void TextDiagramObject::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/TextDiagramObject.hpp b/CGMES_2.4.15_16FEB2016/TextDiagramObject.hpp index 3328c0922..188381ff3 100644 --- a/CGMES_2.4.15_16FEB2016/TextDiagramObject.hpp +++ b/CGMES_2.4.15_16FEB2016/TextDiagramObject.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A diagram object for placing free-text or text derived from an associated domain object. - */ + /** \brief A diagram object for placing free-text or text derived from an associated domain object. */ class TextDiagramObject : public DiagramObject { public: @@ -27,7 +25,8 @@ namespace CIMPP TextDiagramObject(); ~TextDiagramObject() override; - CIMPP::String text; /* The text that is displayed by this text diagram object. Default: '' */ + /** \brief The text that is displayed by this text diagram object. Default: '' */ + CIMPP::String text; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ThermalGeneratingUnit.cpp b/CGMES_2.4.15_16FEB2016/ThermalGeneratingUnit.cpp index c789d053f..ee36322aa 100644 --- a/CGMES_2.4.15_16FEB2016/ThermalGeneratingUnit.cpp +++ b/CGMES_2.4.15_16FEB2016/ThermalGeneratingUnit.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ThermalGeneratingUnit::ThermalGeneratingUnit() {}; -ThermalGeneratingUnit::~ThermalGeneratingUnit() {}; +ThermalGeneratingUnit::ThermalGeneratingUnit() {} +ThermalGeneratingUnit::~ThermalGeneratingUnit() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ ThermalGeneratingUnit::getPossibleProfilesForAttributes() const return map; } - - bool assign_FossilFuel_ThermalGeneratingUnit(BaseClass*, BaseClass*); bool assign_ThermalGeneratingUnit_FossilFuels(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,7 +59,6 @@ bool assign_ThermalGeneratingUnit_FossilFuels(BaseClass* BaseClass_ptr1, BaseCla } - const char ThermalGeneratingUnit::debugName[] = "ThermalGeneratingUnit"; const char* ThermalGeneratingUnit::debugString() const { @@ -70,7 +67,7 @@ const char* ThermalGeneratingUnit::debugString() const void ThermalGeneratingUnit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ThermalGeneratingUnit"), &ThermalGeneratingUnit_factory)); + factory_map.emplace("cim:ThermalGeneratingUnit", &ThermalGeneratingUnit_factory); } void ThermalGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -79,7 +76,7 @@ void ThermalGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ThermalGeneratingUnit.FossilFuels"), &assign_ThermalGeneratingUnit_FossilFuels)); + assign_map.emplace("cim:ThermalGeneratingUnit.FossilFuels", &assign_ThermalGeneratingUnit_FossilFuels); } void ThermalGeneratingUnit::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/ThermalGeneratingUnit.hpp b/CGMES_2.4.15_16FEB2016/ThermalGeneratingUnit.hpp index 68b3885e4..2bbb34a5f 100644 --- a/CGMES_2.4.15_16FEB2016/ThermalGeneratingUnit.hpp +++ b/CGMES_2.4.15_16FEB2016/ThermalGeneratingUnit.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class FossilFuel; - /* - A generating unit whose prime mover could be a steam turbine, combustion turbine, or diesel engine. - */ + /** \brief A generating unit whose prime mover could be a steam turbine, combustion turbine, or diesel engine. */ class ThermalGeneratingUnit : public GeneratingUnit { public: @@ -27,7 +25,8 @@ namespace CIMPP ThermalGeneratingUnit(); ~ThermalGeneratingUnit() override; - std::list FossilFuels; /* A thermal generating unit may have one or more fossil fuels. Default: 0 */ + /** \brief A thermal generating unit may have one or more fossil fuels. Default: 0 */ + std::list FossilFuels; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/TieFlow.cpp b/CGMES_2.4.15_16FEB2016/TieFlow.cpp index 1c2a320b7..324dce327 100644 --- a/CGMES_2.4.15_16FEB2016/TieFlow.cpp +++ b/CGMES_2.4.15_16FEB2016/TieFlow.cpp @@ -10,12 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "ControlArea.hpp" #include "Terminal.hpp" -#include "Boolean.hpp" using namespace CIMPP; -TieFlow::TieFlow() : ControlArea(nullptr), Terminal(nullptr) {}; -TieFlow::~TieFlow() {}; +TieFlow::TieFlow() : ControlArea(nullptr), Terminal(nullptr) {} +TieFlow::~TieFlow() {} static const std::list PossibleProfilesForClass = { @@ -44,21 +43,6 @@ TieFlow::getPossibleProfilesForAttributes() const return map; } - -bool assign_TieFlow_positiveFlowIn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TieFlow* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->positiveFlowIn; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ControlArea_TieFlow(BaseClass*, BaseClass*); bool assign_TieFlow_ControlArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -75,6 +59,7 @@ bool assign_TieFlow_ControlArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ } return false; } + bool assign_Terminal_TieFlow(BaseClass*, BaseClass*); bool assign_TieFlow_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -92,24 +77,24 @@ bool assign_TieFlow_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr return false; } -bool get_TieFlow_positiveFlowIn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TieFlow_positiveFlowIn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TieFlow* element = dynamic_cast(BaseClass_ptr1)) + TieFlow* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->positiveFlowIn; - if (!buffer.str().empty()) + buffer >> element->positiveFlowIn; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_TieFlow_ControlArea(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TieFlow* element = dynamic_cast(BaseClass_ptr1)) + const TieFlow* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ControlArea != 0) { @@ -122,7 +107,8 @@ bool get_TieFlow_ControlArea(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TieFlow* element = dynamic_cast(BaseClass_ptr1)) + const TieFlow* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Terminal != 0) { @@ -133,6 +119,20 @@ bool get_TieFlow_Terminal(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->positiveFlowIn; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char TieFlow::debugName[] = "TieFlow"; const char* TieFlow::debugString() const @@ -142,18 +142,18 @@ const char* TieFlow::debugString() const void TieFlow::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TieFlow"), &TieFlow_factory)); + factory_map.emplace("cim:TieFlow", &TieFlow_factory); } void TieFlow::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TieFlow.positiveFlowIn"), &assign_TieFlow_positiveFlowIn)); + assign_map.emplace("cim:TieFlow.positiveFlowIn", &assign_TieFlow_positiveFlowIn); } void TieFlow::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TieFlow.ControlArea"), &assign_TieFlow_ControlArea)); - assign_map.insert(std::make_pair(std::string("cim:TieFlow.Terminal"), &assign_TieFlow_Terminal)); + assign_map.emplace("cim:TieFlow.ControlArea", &assign_TieFlow_ControlArea); + assign_map.emplace("cim:TieFlow.Terminal", &assign_TieFlow_Terminal); } void TieFlow::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/TieFlow.hpp b/CGMES_2.4.15_16FEB2016/TieFlow.hpp index 5b7a975f9..b25ac939b 100644 --- a/CGMES_2.4.15_16FEB2016/TieFlow.hpp +++ b/CGMES_2.4.15_16FEB2016/TieFlow.hpp @@ -19,9 +19,7 @@ namespace CIMPP class ControlArea; class Terminal; - /* - A flow specification in terms of location and direction for a control area. - */ + /** \brief A flow specification in terms of location and direction for a control area. */ class TieFlow : public BaseClass { public: @@ -29,9 +27,14 @@ namespace CIMPP TieFlow(); ~TieFlow() override; - CIMPP::ControlArea* ControlArea; /* The control area of the tie flows. Default: 0 */ - CIMPP::Terminal* Terminal; /* The terminal to which this tie flow belongs. Default: 0 */ - CIMPP::Boolean positiveFlowIn; /* True if the flow into the terminal (load convention) is also flow into the control area. For example, this attribute should be true if using the tie line terminal further away from the control area. For example to represent a tie to a shunt component (like a load or generator) in another area, this is the near end of a branch and this attribute would be specified as false. Default: false */ + /** \brief The control area of the tie flows. Default: 0 */ + CIMPP::ControlArea* ControlArea; + + /** \brief The terminal to which this tie flow belongs. Default: 0 */ + CIMPP::Terminal* Terminal; + + /** \brief True if the flow into the terminal (load convention) is also flow into the control area. For example, this attribute should be true if using the tie line terminal further away from the control area. For example to represent a tie to a shunt component (like a load or generator) in another area, this is the near end of a branch and this attribute would be specified as false. Default: false */ + CIMPP::Boolean positiveFlowIn; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/TopologicalIsland.cpp b/CGMES_2.4.15_16FEB2016/TopologicalIsland.cpp index 03db597fa..46b353666 100644 --- a/CGMES_2.4.15_16FEB2016/TopologicalIsland.cpp +++ b/CGMES_2.4.15_16FEB2016/TopologicalIsland.cpp @@ -8,13 +8,12 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "TopologicalNode.hpp" #include "TopologicalNode.hpp" using namespace CIMPP; -TopologicalIsland::TopologicalIsland() : AngleRefTopologicalNode(nullptr) {}; -TopologicalIsland::~TopologicalIsland() {}; +TopologicalIsland::TopologicalIsland() : AngleRefTopologicalNode(nullptr) {} +TopologicalIsland::~TopologicalIsland() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +41,6 @@ TopologicalIsland::getPossibleProfilesForAttributes() const return map; } - - bool assign_TopologicalNode_AngleRefTopologicalIsland(BaseClass*, BaseClass*); bool assign_TopologicalIsland_AngleRefTopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +57,7 @@ bool assign_TopologicalIsland_AngleRefTopologicalNode(BaseClass* BaseClass_ptr1, } return false; } + bool assign_TopologicalNode_TopologicalIsland(BaseClass*, BaseClass*); bool assign_TopologicalIsland_TopologicalNodes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +75,10 @@ bool assign_TopologicalIsland_TopologicalNodes(BaseClass* BaseClass_ptr1, BaseCl return false; } - bool get_TopologicalIsland_AngleRefTopologicalNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TopologicalIsland* element = dynamic_cast(BaseClass_ptr1)) + const TopologicalIsland* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->AngleRefTopologicalNode != 0) { @@ -93,7 +91,8 @@ bool get_TopologicalIsland_AngleRefTopologicalNode(const BaseClass* BaseClass_pt bool get_TopologicalIsland_TopologicalNodes(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TopologicalIsland* element = dynamic_cast(BaseClass_ptr1)) + const TopologicalIsland* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { std::copy(element->TopologicalNodes.begin(), element->TopologicalNodes.end(), std::back_inserter(BaseClass_list)); return !BaseClass_list.empty(); @@ -101,7 +100,6 @@ bool get_TopologicalIsland_TopologicalNodes(const BaseClass* BaseClass_ptr1, std return false; } - const char TopologicalIsland::debugName[] = "TopologicalIsland"; const char* TopologicalIsland::debugString() const { @@ -110,7 +108,7 @@ const char* TopologicalIsland::debugString() const void TopologicalIsland::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TopologicalIsland"), &TopologicalIsland_factory)); + factory_map.emplace("cim:TopologicalIsland", &TopologicalIsland_factory); } void TopologicalIsland::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -119,8 +117,8 @@ void TopologicalIsland::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TopologicalIsland.AngleRefTopologicalNode"), &assign_TopologicalIsland_AngleRefTopologicalNode)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalIsland.TopologicalNodes"), &assign_TopologicalIsland_TopologicalNodes)); + assign_map.emplace("cim:TopologicalIsland.AngleRefTopologicalNode", &assign_TopologicalIsland_AngleRefTopologicalNode); + assign_map.emplace("cim:TopologicalIsland.TopologicalNodes", &assign_TopologicalIsland_TopologicalNodes); } void TopologicalIsland::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/TopologicalIsland.hpp b/CGMES_2.4.15_16FEB2016/TopologicalIsland.hpp index 26dc94200..a6c5a898c 100644 --- a/CGMES_2.4.15_16FEB2016/TopologicalIsland.hpp +++ b/CGMES_2.4.15_16FEB2016/TopologicalIsland.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class TopologicalNode; - /* - An electrically connected subset of the network. Topological islands can change as the current network state changes: e.g. due to - disconnect switches or breakers change state in a SCADA/EMS - manual creation, change or deletion of topological nodes in a planning tool. - */ + /** \brief An electrically connected subset of the network. Topological islands can change as the current network state changes: e.g. due to - disconnect switches or breakers change state in a SCADA/EMS - manual creation, change or deletion of topological nodes in a planning tool. */ class TopologicalIsland : public IdentifiedObject { public: @@ -27,8 +25,11 @@ namespace CIMPP TopologicalIsland(); ~TopologicalIsland() override; - CIMPP::TopologicalNode* AngleRefTopologicalNode; /* The angle reference for the island. Normally there is one TopologicalNode that is selected as the angle reference for each island. Other reference schemes exist, so the association is typically optional. Default: 0 */ - std::list TopologicalNodes; /* A topological node belongs to a topological island. Default: 0 */ + /** \brief The angle reference for the island. Normally there is one TopologicalNode that is selected as the angle reference for each island. Other reference schemes exist, so the association is typically optional. Default: 0 */ + CIMPP::TopologicalNode* AngleRefTopologicalNode; + + /** \brief A topological node belongs to a topological island. Default: 0 */ + std::list TopologicalNodes; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/TopologicalNode.cpp b/CGMES_2.4.15_16FEB2016/TopologicalNode.cpp index 07fba3691..962a0d94b 100644 --- a/CGMES_2.4.15_16FEB2016/TopologicalNode.cpp +++ b/CGMES_2.4.15_16FEB2016/TopologicalNode.cpp @@ -8,27 +8,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "TopologicalIsland.hpp" #include "BaseVoltage.hpp" -#include "ConnectivityNodeContainer.hpp" #include "ConnectivityNode.hpp" +#include "ConnectivityNodeContainer.hpp" #include "ReportingGroup.hpp" #include "SvInjection.hpp" #include "SvVoltage.hpp" #include "Terminal.hpp" #include "TopologicalIsland.hpp" -#include "Boolean.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -TopologicalNode::TopologicalNode() : AngleRefTopologicalIsland(nullptr), BaseVoltage(nullptr), ConnectivityNodeContainer(nullptr), ReportingGroup(nullptr), SvInjection(nullptr), SvVoltage(nullptr), TopologicalIsland(nullptr) {}; -TopologicalNode::~TopologicalNode() {}; +TopologicalNode::TopologicalNode() : AngleRefTopologicalIsland(nullptr), BaseVoltage(nullptr), ConnectivityNodeContainer(nullptr), ReportingGroup(nullptr), SvInjection(nullptr), SvVoltage(nullptr), TopologicalIsland(nullptr) {} +TopologicalNode::~TopologicalNode() {} static const std::list PossibleProfilesForClass = { @@ -72,99 +64,6 @@ TopologicalNode::getPossibleProfilesForAttributes() const return map; } - -bool assign_TopologicalNode_boundaryPoint(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->boundaryPoint; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_TopologicalNode_fromEndIsoCode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) - { - element->fromEndIsoCode = buffer.str(); - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_TopologicalNode_fromEndName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) - { - element->fromEndName = buffer.str(); - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_TopologicalNode_fromEndNameTso(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) - { - element->fromEndNameTso = buffer.str(); - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_TopologicalNode_toEndIsoCode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) - { - element->toEndIsoCode = buffer.str(); - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_TopologicalNode_toEndName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) - { - element->toEndName = buffer.str(); - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_TopologicalNode_toEndNameTso(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) - { - element->toEndNameTso = buffer.str(); - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_TopologicalIsland_AngleRefTopologicalNode(BaseClass*, BaseClass*); bool assign_TopologicalNode_AngleRefTopologicalIsland(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -181,6 +80,7 @@ bool assign_TopologicalNode_AngleRefTopologicalIsland(BaseClass* BaseClass_ptr1, } return false; } + bool assign_BaseVoltage_TopologicalNode(BaseClass*, BaseClass*); bool assign_TopologicalNode_BaseVoltage(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -197,6 +97,7 @@ bool assign_TopologicalNode_BaseVoltage(BaseClass* BaseClass_ptr1, BaseClass* Ba } return false; } + bool assign_ConnectivityNodeContainer_TopologicalNode(BaseClass*, BaseClass*); bool assign_TopologicalNode_ConnectivityNodeContainer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -213,6 +114,7 @@ bool assign_TopologicalNode_ConnectivityNodeContainer(BaseClass* BaseClass_ptr1, } return false; } + bool assign_ConnectivityNode_TopologicalNode(BaseClass*, BaseClass*); bool assign_TopologicalNode_ConnectivityNodes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -229,6 +131,7 @@ bool assign_TopologicalNode_ConnectivityNodes(BaseClass* BaseClass_ptr1, BaseCla } return false; } + bool assign_ReportingGroup_TopologicalNode(BaseClass*, BaseClass*); bool assign_TopologicalNode_ReportingGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -245,6 +148,7 @@ bool assign_TopologicalNode_ReportingGroup(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_SvInjection_TopologicalNode(BaseClass*, BaseClass*); bool assign_TopologicalNode_SvInjection(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -261,6 +165,7 @@ bool assign_TopologicalNode_SvInjection(BaseClass* BaseClass_ptr1, BaseClass* Ba } return false; } + bool assign_SvVoltage_TopologicalNode(BaseClass*, BaseClass*); bool assign_TopologicalNode_SvVoltage(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -277,6 +182,7 @@ bool assign_TopologicalNode_SvVoltage(BaseClass* BaseClass_ptr1, BaseClass* Base } return false; } + bool assign_Terminal_TopologicalNode(BaseClass*, BaseClass*); bool assign_TopologicalNode_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -293,6 +199,7 @@ bool assign_TopologicalNode_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseC } return false; } + bool assign_TopologicalIsland_TopologicalNodes(BaseClass*, BaseClass*); bool assign_TopologicalNode_TopologicalIsland(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -310,108 +217,109 @@ bool assign_TopologicalNode_TopologicalIsland(BaseClass* BaseClass_ptr1, BaseCla return false; } -bool get_TopologicalNode_boundaryPoint(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TopologicalNode_boundaryPoint(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->boundaryPoint; - if (!buffer.str().empty()) + buffer >> element->boundaryPoint; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_TopologicalNode_fromEndIsoCode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TopologicalNode_fromEndIsoCode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->fromEndIsoCode; - if (!buffer.str().empty()) + element->fromEndIsoCode = buffer.str(); + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_TopologicalNode_fromEndName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TopologicalNode_fromEndName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->fromEndName; - if (!buffer.str().empty()) + element->fromEndName = buffer.str(); + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_TopologicalNode_fromEndNameTso(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TopologicalNode_fromEndNameTso(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->fromEndNameTso; - if (!buffer.str().empty()) + element->fromEndNameTso = buffer.str(); + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_TopologicalNode_toEndIsoCode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TopologicalNode_toEndIsoCode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->toEndIsoCode; - if (!buffer.str().empty()) + element->toEndIsoCode = buffer.str(); + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_TopologicalNode_toEndName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TopologicalNode_toEndName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->toEndName; - if (!buffer.str().empty()) + element->toEndName = buffer.str(); + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_TopologicalNode_toEndNameTso(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TopologicalNode_toEndNameTso(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->toEndNameTso; - if (!buffer.str().empty()) + element->toEndNameTso = buffer.str(); + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } bool get_TopologicalNode_BaseVoltage(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + const TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->BaseVoltage != 0) { @@ -424,7 +332,8 @@ bool get_TopologicalNode_BaseVoltage(const BaseClass* BaseClass_ptr1, std::list< bool get_TopologicalNode_ConnectivityNodeContainer(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + const TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ConnectivityNodeContainer != 0) { @@ -435,9 +344,11 @@ bool get_TopologicalNode_ConnectivityNodeContainer(const BaseClass* BaseClass_pt return false; } + bool get_TopologicalNode_ReportingGroup(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + const TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ReportingGroup != 0) { @@ -449,6 +360,114 @@ bool get_TopologicalNode_ReportingGroup(const BaseClass* BaseClass_ptr1, std::li } + + + +bool get_TopologicalNode_boundaryPoint(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->boundaryPoint; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_TopologicalNode_fromEndIsoCode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->fromEndIsoCode; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_TopologicalNode_fromEndName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->fromEndName; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_TopologicalNode_fromEndNameTso(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->fromEndNameTso; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_TopologicalNode_toEndIsoCode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->toEndIsoCode; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_TopologicalNode_toEndName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->toEndName; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_TopologicalNode_toEndNameTso(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->toEndNameTso; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + const char TopologicalNode::debugName[] = "TopologicalNode"; const char* TopologicalNode::debugString() const { @@ -457,31 +476,31 @@ const char* TopologicalNode::debugString() const void TopologicalNode::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TopologicalNode"), &TopologicalNode_factory)); + factory_map.emplace("cim:TopologicalNode", &TopologicalNode_factory); } void TopologicalNode::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.boundaryPoint"), &assign_TopologicalNode_boundaryPoint)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.fromEndIsoCode"), &assign_TopologicalNode_fromEndIsoCode)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.fromEndName"), &assign_TopologicalNode_fromEndName)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.fromEndNameTso"), &assign_TopologicalNode_fromEndNameTso)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.toEndIsoCode"), &assign_TopologicalNode_toEndIsoCode)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.toEndName"), &assign_TopologicalNode_toEndName)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.toEndNameTso"), &assign_TopologicalNode_toEndNameTso)); + assign_map.emplace("cim:TopologicalNode.boundaryPoint", &assign_TopologicalNode_boundaryPoint); + assign_map.emplace("cim:TopologicalNode.fromEndIsoCode", &assign_TopologicalNode_fromEndIsoCode); + assign_map.emplace("cim:TopologicalNode.fromEndName", &assign_TopologicalNode_fromEndName); + assign_map.emplace("cim:TopologicalNode.fromEndNameTso", &assign_TopologicalNode_fromEndNameTso); + assign_map.emplace("cim:TopologicalNode.toEndIsoCode", &assign_TopologicalNode_toEndIsoCode); + assign_map.emplace("cim:TopologicalNode.toEndName", &assign_TopologicalNode_toEndName); + assign_map.emplace("cim:TopologicalNode.toEndNameTso", &assign_TopologicalNode_toEndNameTso); } void TopologicalNode::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.AngleRefTopologicalIsland"), &assign_TopologicalNode_AngleRefTopologicalIsland)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.BaseVoltage"), &assign_TopologicalNode_BaseVoltage)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.ConnectivityNodeContainer"), &assign_TopologicalNode_ConnectivityNodeContainer)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.ConnectivityNodes"), &assign_TopologicalNode_ConnectivityNodes)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.ReportingGroup"), &assign_TopologicalNode_ReportingGroup)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.SvInjection"), &assign_TopologicalNode_SvInjection)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.SvVoltage"), &assign_TopologicalNode_SvVoltage)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.Terminal"), &assign_TopologicalNode_Terminal)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.TopologicalIsland"), &assign_TopologicalNode_TopologicalIsland)); + assign_map.emplace("cim:TopologicalNode.AngleRefTopologicalIsland", &assign_TopologicalNode_AngleRefTopologicalIsland); + assign_map.emplace("cim:TopologicalNode.BaseVoltage", &assign_TopologicalNode_BaseVoltage); + assign_map.emplace("cim:TopologicalNode.ConnectivityNodeContainer", &assign_TopologicalNode_ConnectivityNodeContainer); + assign_map.emplace("cim:TopologicalNode.ConnectivityNodes", &assign_TopologicalNode_ConnectivityNodes); + assign_map.emplace("cim:TopologicalNode.ReportingGroup", &assign_TopologicalNode_ReportingGroup); + assign_map.emplace("cim:TopologicalNode.SvInjection", &assign_TopologicalNode_SvInjection); + assign_map.emplace("cim:TopologicalNode.SvVoltage", &assign_TopologicalNode_SvVoltage); + assign_map.emplace("cim:TopologicalNode.Terminal", &assign_TopologicalNode_Terminal); + assign_map.emplace("cim:TopologicalNode.TopologicalIsland", &assign_TopologicalNode_TopologicalIsland); } void TopologicalNode::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/TopologicalNode.hpp b/CGMES_2.4.15_16FEB2016/TopologicalNode.hpp index 0dfb99b0c..b9eecea3e 100644 --- a/CGMES_2.4.15_16FEB2016/TopologicalNode.hpp +++ b/CGMES_2.4.15_16FEB2016/TopologicalNode.hpp @@ -26,9 +26,7 @@ namespace CIMPP class Terminal; class TopologicalIsland; - /* - For a detailed substation model a topological node is a set of connectivity nodes that, in the current network state, are connected together through any type of closed switches, including jumpers. Topological nodes change as the current network state changes (i.e., switches, breakers, etc. change state). For a planning model, switch statuses are not used to form topological nodes. Instead they are manually created or deleted in a model builder tool. Topological nodes maintained this way are also called "busses". - */ + /** \brief For a detailed substation model a topological node is a set of connectivity nodes that, in the current network state, are connected together through any type of closed switches, including jumpers. Topological nodes change as the current network state changes (i.e., switches, breakers, etc. change state). For a planning model, switch statuses are not used to form topological nodes. Instead they are manually created or deleted in a model builder tool. Topological nodes maintained this way are also called "busses". */ class TopologicalNode : public IdentifiedObject { public: @@ -36,22 +34,53 @@ namespace CIMPP TopologicalNode(); ~TopologicalNode() override; - CIMPP::TopologicalIsland* AngleRefTopologicalIsland; /* The island for which the node is an angle reference. Normally there is one angle reference node for each island. Default: 0 */ - CIMPP::BaseVoltage* BaseVoltage; /* The base voltage of the topologocial node. Default: 0 */ - CIMPP::ConnectivityNodeContainer* ConnectivityNodeContainer; /* The connectivity node container to which the toplogical node belongs. Default: 0 */ - std::list ConnectivityNodes; /* The connectivity nodes combine together to form this topological node. May depend on the current state of switches in the network. Default: 0 */ - CIMPP::ReportingGroup* ReportingGroup; /* The topological nodes that belong to the reporting group. Default: 0 */ - CIMPP::SvInjection* SvInjection; /* The topological node associated with the flow injection state variable. Default: 0 */ - CIMPP::SvVoltage* SvVoltage; /* The topological node associated with the voltage state. Default: 0 */ - std::list Terminal; /* The topological node associated with the terminal. This can be used as an alternative to the connectivity node path to topological node, thus making it unneccesary to model connectivity nodes in some cases. Note that the if connectivity nodes are in the model, this association would probably not be used as an input specification. Default: 0 */ - CIMPP::TopologicalIsland* TopologicalIsland; /* A topological node belongs to a topological island. Default: 0 */ - CIMPP::Boolean boundaryPoint; /* Identifies if a node is a BoundaryPoint. If boundaryPoint=true the ConnectivityNode or the TopologicalNode represents a BoundaryPoint. Default: false */ - CIMPP::String fromEndIsoCode; /* The attribute is used for an exchange of the ISO code of the region to which the `From` side of the Boundary point belongs to or it is connected to. The ISO code is two characters country code as defined by ISO 3166 (). The length of the string is 2 characters maximum. The attribute is a required for the Boundary Model Authority Set where this attribute is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ - CIMPP::String fromEndName; /* The attribute is used for an exchange of a human readable name with length of the string 32 characters maximum. The attribute covers two cases: The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ - CIMPP::String fromEndNameTso; /* The attribute is used for an exchange of the name of the TSO to which the `From` side of the Boundary point belongs to or it is connected to. The length of the string is 32 characters maximum. The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ - CIMPP::String toEndIsoCode; /* The attribute is used for an exchange of the ISO code of the region to which the `To` side of the Boundary point belongs to or it is connected to. The ISO code is two characters country code as defined by ISO 3166 (). The length of the string is 2 characters maximum. The attribute is a required for the Boundary Model Authority Set where this attribute is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ - CIMPP::String toEndName; /* The attribute is used for an exchange of a human readable name with length of the string 32 characters maximum. The attribute covers two cases: The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ - CIMPP::String toEndNameTso; /* The attribute is used for an exchange of the name of the TSO to which the `To` side of the Boundary point belongs to or it is connected to. The length of the string is 32 characters maximum. The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + /** \brief The island for which the node is an angle reference. Normally there is one angle reference node for each island. Default: 0 */ + CIMPP::TopologicalIsland* AngleRefTopologicalIsland; + + /** \brief The base voltage of the topologocial node. Default: 0 */ + CIMPP::BaseVoltage* BaseVoltage; + + /** \brief The connectivity node container to which the toplogical node belongs. Default: 0 */ + CIMPP::ConnectivityNodeContainer* ConnectivityNodeContainer; + + /** \brief The connectivity nodes combine together to form this topological node. May depend on the current state of switches in the network. Default: 0 */ + std::list ConnectivityNodes; + + /** \brief The topological nodes that belong to the reporting group. Default: 0 */ + CIMPP::ReportingGroup* ReportingGroup; + + /** \brief The topological node associated with the flow injection state variable. Default: 0 */ + CIMPP::SvInjection* SvInjection; + + /** \brief The topological node associated with the voltage state. Default: 0 */ + CIMPP::SvVoltage* SvVoltage; + + /** \brief The topological node associated with the terminal. This can be used as an alternative to the connectivity node path to topological node, thus making it unneccesary to model connectivity nodes in some cases. Note that the if connectivity nodes are in the model, this association would probably not be used as an input specification. Default: 0 */ + std::list Terminal; + + /** \brief A topological node belongs to a topological island. Default: 0 */ + CIMPP::TopologicalIsland* TopologicalIsland; + + /** \brief Identifies if a node is a BoundaryPoint. If boundaryPoint=true the ConnectivityNode or the TopologicalNode represents a BoundaryPoint. Default: false */ + CIMPP::Boolean boundaryPoint; + + /** \brief The attribute is used for an exchange of the ISO code of the region to which the `From` side of the Boundary point belongs to or it is connected to. The ISO code is two characters country code as defined by ISO 3166 (). The length of the string is 2 characters maximum. The attribute is a required for the Boundary Model Authority Set where this attribute is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + CIMPP::String fromEndIsoCode; + + /** \brief The attribute is used for an exchange of a human readable name with length of the string 32 characters maximum. The attribute covers two cases: The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + CIMPP::String fromEndName; + + /** \brief The attribute is used for an exchange of the name of the TSO to which the `From` side of the Boundary point belongs to or it is connected to. The length of the string is 32 characters maximum. The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + CIMPP::String fromEndNameTso; + + /** \brief The attribute is used for an exchange of the ISO code of the region to which the `To` side of the Boundary point belongs to or it is connected to. The ISO code is two characters country code as defined by ISO 3166 (). The length of the string is 2 characters maximum. The attribute is a required for the Boundary Model Authority Set where this attribute is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + CIMPP::String toEndIsoCode; + + /** \brief The attribute is used for an exchange of a human readable name with length of the string 32 characters maximum. The attribute covers two cases: The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + CIMPP::String toEndName; + + /** \brief The attribute is used for an exchange of the name of the TSO to which the `To` side of the Boundary point belongs to or it is connected to. The length of the string is 32 characters maximum. The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + CIMPP::String toEndNameTso; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/TopologyBoundaryVersion.cpp b/CGMES_2.4.15_16FEB2016/TopologyBoundaryVersion.cpp index 5fd7f7165..ca78ca44d 100644 --- a/CGMES_2.4.15_16FEB2016/TopologyBoundaryVersion.cpp +++ b/CGMES_2.4.15_16FEB2016/TopologyBoundaryVersion.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "String.hpp" -#include "String.hpp" -#include "Date.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -TopologyBoundaryVersion::TopologyBoundaryVersion() {}; -TopologyBoundaryVersion::~TopologyBoundaryVersion() {}; +TopologyBoundaryVersion::TopologyBoundaryVersion() {} +TopologyBoundaryVersion::~TopologyBoundaryVersion() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ TopologyBoundaryVersion::getPossibleProfilesForAttributes() const return map; } - -bool assign_TopologyBoundaryVersion_baseUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyBoundaryVersion_baseUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyBoundaryVersion_baseURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyBoundaryVersion_baseURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyBoundaryVersion_date(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyBoundaryVersion_date(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->date = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyBoundaryVersion_differenceModelURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyBoundaryVersion_differenceModelURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->differenceModelURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyBoundaryVersion_entsoeUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyBoundaryVersion_entsoeUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyBoundaryVersion_entsoeURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyBoundaryVersion_entsoeURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyBoundaryVersion_modelDescriptionURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyBoundaryVersion_modelDescriptionURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->modelDescriptionURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyBoundaryVersion_namespaceRDF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyBoundaryVersion_namespaceRDF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceRDF = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyBoundaryVersion_namespaceUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyBoundaryVersion_namespaceUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyBoundaryVersion_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyBoundaryVersion_shortName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->shortName = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_TopologyBoundaryVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseUML; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_TopologyBoundaryVersion_baseUML(const BaseClass* BaseClass_ptr1, std::s bool get_TopologyBoundaryVersion_baseURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseURI; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_TopologyBoundaryVersion_baseURI(const BaseClass* BaseClass_ptr1, std::s bool get_TopologyBoundaryVersion_date(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->date; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_TopologyBoundaryVersion_date(const BaseClass* BaseClass_ptr1, std::stri bool get_TopologyBoundaryVersion_differenceModelURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->differenceModelURI; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_TopologyBoundaryVersion_differenceModelURI(const BaseClass* BaseClass_p bool get_TopologyBoundaryVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeUML; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_TopologyBoundaryVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std: bool get_TopologyBoundaryVersion_entsoeURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeURI; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_TopologyBoundaryVersion_entsoeURI(const BaseClass* BaseClass_ptr1, std: bool get_TopologyBoundaryVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->modelDescriptionURI; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_TopologyBoundaryVersion_modelDescriptionURI(const BaseClass* BaseClass_ bool get_TopologyBoundaryVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceRDF; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_TopologyBoundaryVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, s bool get_TopologyBoundaryVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceUML; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_TopologyBoundaryVersion_namespaceUML(const BaseClass* BaseClass_ptr1, s bool get_TopologyBoundaryVersion_shortName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortName; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_TopologyBoundaryVersion_shortName(const BaseClass* BaseClass_ptr1, std: return false; } - - const char TopologyBoundaryVersion::debugName[] = "TopologyBoundaryVersion"; const char* TopologyBoundaryVersion::debugString() const { @@ -341,21 +346,21 @@ const char* TopologyBoundaryVersion::debugString() const void TopologyBoundaryVersion::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TopologyBoundaryVersion"), &TopologyBoundaryVersion_factory)); + factory_map.emplace("cim:TopologyBoundaryVersion", &TopologyBoundaryVersion_factory); } void TopologyBoundaryVersion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TopologyBoundaryVersion.baseUML"), &assign_TopologyBoundaryVersion_baseUML)); - assign_map.insert(std::make_pair(std::string("cim:TopologyBoundaryVersion.baseURI"), &assign_TopologyBoundaryVersion_baseURI)); - assign_map.insert(std::make_pair(std::string("cim:TopologyBoundaryVersion.date"), &assign_TopologyBoundaryVersion_date)); - assign_map.insert(std::make_pair(std::string("cim:TopologyBoundaryVersion.differenceModelURI"), &assign_TopologyBoundaryVersion_differenceModelURI)); - assign_map.insert(std::make_pair(std::string("cim:TopologyBoundaryVersion.entsoeUML"), &assign_TopologyBoundaryVersion_entsoeUML)); - assign_map.insert(std::make_pair(std::string("cim:TopologyBoundaryVersion.entsoeURI"), &assign_TopologyBoundaryVersion_entsoeURI)); - assign_map.insert(std::make_pair(std::string("cim:TopologyBoundaryVersion.modelDescriptionURI"), &assign_TopologyBoundaryVersion_modelDescriptionURI)); - assign_map.insert(std::make_pair(std::string("cim:TopologyBoundaryVersion.namespaceRDF"), &assign_TopologyBoundaryVersion_namespaceRDF)); - assign_map.insert(std::make_pair(std::string("cim:TopologyBoundaryVersion.namespaceUML"), &assign_TopologyBoundaryVersion_namespaceUML)); - assign_map.insert(std::make_pair(std::string("cim:TopologyBoundaryVersion.shortName"), &assign_TopologyBoundaryVersion_shortName)); + assign_map.emplace("cim:TopologyBoundaryVersion.baseUML", &assign_TopologyBoundaryVersion_baseUML); + assign_map.emplace("cim:TopologyBoundaryVersion.baseURI", &assign_TopologyBoundaryVersion_baseURI); + assign_map.emplace("cim:TopologyBoundaryVersion.date", &assign_TopologyBoundaryVersion_date); + assign_map.emplace("cim:TopologyBoundaryVersion.differenceModelURI", &assign_TopologyBoundaryVersion_differenceModelURI); + assign_map.emplace("cim:TopologyBoundaryVersion.entsoeUML", &assign_TopologyBoundaryVersion_entsoeUML); + assign_map.emplace("cim:TopologyBoundaryVersion.entsoeURI", &assign_TopologyBoundaryVersion_entsoeURI); + assign_map.emplace("cim:TopologyBoundaryVersion.modelDescriptionURI", &assign_TopologyBoundaryVersion_modelDescriptionURI); + assign_map.emplace("cim:TopologyBoundaryVersion.namespaceRDF", &assign_TopologyBoundaryVersion_namespaceRDF); + assign_map.emplace("cim:TopologyBoundaryVersion.namespaceUML", &assign_TopologyBoundaryVersion_namespaceUML); + assign_map.emplace("cim:TopologyBoundaryVersion.shortName", &assign_TopologyBoundaryVersion_shortName); } void TopologyBoundaryVersion::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/TopologyBoundaryVersion.hpp b/CGMES_2.4.15_16FEB2016/TopologyBoundaryVersion.hpp index 4a7c617ba..54e049f56 100644 --- a/CGMES_2.4.15_16FEB2016/TopologyBoundaryVersion.hpp +++ b/CGMES_2.4.15_16FEB2016/TopologyBoundaryVersion.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Version details. - */ + /** \brief Version details. */ class TopologyBoundaryVersion : public BaseClass { public: @@ -28,16 +26,35 @@ namespace CIMPP TopologyBoundaryVersion(); ~TopologyBoundaryVersion() override; - CIMPP::String baseUML; /* Base UML provided by CIM model manager. Default: '' */ - CIMPP::String baseURI; /* Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ - CIMPP::Date date; /* Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ - CIMPP::String differenceModelURI; /* Difference model URI defined by IEC 61970-552. Default: '' */ - CIMPP::String entsoeUML; /* UML provided by ENTSO-E. Default: '' */ - CIMPP::String entsoeURI; /* Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/TopologyBoundary/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ - CIMPP::String modelDescriptionURI; /* Model Description URI defined by IEC 61970-552. Default: '' */ - CIMPP::String namespaceRDF; /* RDF namespace. Default: '' */ - CIMPP::String namespaceUML; /* CIM UML namespace. Default: '' */ - CIMPP::String shortName; /* The short name of the profile used in profile documentation. Default: '' */ + /** \brief Base UML provided by CIM model manager. Default: '' */ + CIMPP::String baseUML; + + /** \brief Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ + CIMPP::String baseURI; + + /** \brief Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ + CIMPP::Date date; + + /** \brief Difference model URI defined by IEC 61970-552. Default: '' */ + CIMPP::String differenceModelURI; + + /** \brief UML provided by ENTSO-E. Default: '' */ + CIMPP::String entsoeUML; + + /** \brief Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/TopologyBoundary/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ + CIMPP::String entsoeURI; + + /** \brief Model Description URI defined by IEC 61970-552. Default: '' */ + CIMPP::String modelDescriptionURI; + + /** \brief RDF namespace. Default: '' */ + CIMPP::String namespaceRDF; + + /** \brief CIM UML namespace. Default: '' */ + CIMPP::String namespaceUML; + + /** \brief The short name of the profile used in profile documentation. Default: '' */ + CIMPP::String shortName; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/TopologyVersion.cpp b/CGMES_2.4.15_16FEB2016/TopologyVersion.cpp index c8bfafdca..e54da7674 100644 --- a/CGMES_2.4.15_16FEB2016/TopologyVersion.cpp +++ b/CGMES_2.4.15_16FEB2016/TopologyVersion.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "String.hpp" -#include "String.hpp" -#include "Date.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -TopologyVersion::TopologyVersion() {}; -TopologyVersion::~TopologyVersion() {}; +TopologyVersion::TopologyVersion() {} +TopologyVersion::~TopologyVersion() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ TopologyVersion::getPossibleProfilesForAttributes() const return map; } - -bool assign_TopologyVersion_baseUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyVersion_baseUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyVersion_baseURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyVersion_baseURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyVersion_date(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyVersion_date(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->date = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyVersion_differenceModelURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyVersion_differenceModelURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->differenceModelURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyVersion_entsoeUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyVersion_entsoeUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyVersion_entsoeURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyVersion_entsoeURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyVersion_modelDescriptionURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyVersion_modelDescriptionURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->modelDescriptionURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyVersion_namespaceRDF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyVersion_namespaceRDF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceRDF = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyVersion_namespaceUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyVersion_namespaceUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyVersion_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyVersion_shortName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->shortName = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_TopologyVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseUML; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_TopologyVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stringstr bool get_TopologyVersion_baseURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseURI; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_TopologyVersion_baseURI(const BaseClass* BaseClass_ptr1, std::stringstr bool get_TopologyVersion_date(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->date; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_TopologyVersion_date(const BaseClass* BaseClass_ptr1, std::stringstream bool get_TopologyVersion_differenceModelURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->differenceModelURI; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_TopologyVersion_differenceModelURI(const BaseClass* BaseClass_ptr1, std bool get_TopologyVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeUML; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_TopologyVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::strings bool get_TopologyVersion_entsoeURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeURI; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_TopologyVersion_entsoeURI(const BaseClass* BaseClass_ptr1, std::strings bool get_TopologyVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->modelDescriptionURI; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_TopologyVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr1, st bool get_TopologyVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceRDF; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_TopologyVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std::stri bool get_TopologyVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceUML; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_TopologyVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std::stri bool get_TopologyVersion_shortName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortName; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_TopologyVersion_shortName(const BaseClass* BaseClass_ptr1, std::strings return false; } - - const char TopologyVersion::debugName[] = "TopologyVersion"; const char* TopologyVersion::debugString() const { @@ -341,21 +346,21 @@ const char* TopologyVersion::debugString() const void TopologyVersion::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TopologyVersion"), &TopologyVersion_factory)); + factory_map.emplace("cim:TopologyVersion", &TopologyVersion_factory); } void TopologyVersion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TopologyVersion.baseUML"), &assign_TopologyVersion_baseUML)); - assign_map.insert(std::make_pair(std::string("cim:TopologyVersion.baseURI"), &assign_TopologyVersion_baseURI)); - assign_map.insert(std::make_pair(std::string("cim:TopologyVersion.date"), &assign_TopologyVersion_date)); - assign_map.insert(std::make_pair(std::string("cim:TopologyVersion.differenceModelURI"), &assign_TopologyVersion_differenceModelURI)); - assign_map.insert(std::make_pair(std::string("cim:TopologyVersion.entsoeUML"), &assign_TopologyVersion_entsoeUML)); - assign_map.insert(std::make_pair(std::string("cim:TopologyVersion.entsoeURI"), &assign_TopologyVersion_entsoeURI)); - assign_map.insert(std::make_pair(std::string("cim:TopologyVersion.modelDescriptionURI"), &assign_TopologyVersion_modelDescriptionURI)); - assign_map.insert(std::make_pair(std::string("cim:TopologyVersion.namespaceRDF"), &assign_TopologyVersion_namespaceRDF)); - assign_map.insert(std::make_pair(std::string("cim:TopologyVersion.namespaceUML"), &assign_TopologyVersion_namespaceUML)); - assign_map.insert(std::make_pair(std::string("cim:TopologyVersion.shortName"), &assign_TopologyVersion_shortName)); + assign_map.emplace("cim:TopologyVersion.baseUML", &assign_TopologyVersion_baseUML); + assign_map.emplace("cim:TopologyVersion.baseURI", &assign_TopologyVersion_baseURI); + assign_map.emplace("cim:TopologyVersion.date", &assign_TopologyVersion_date); + assign_map.emplace("cim:TopologyVersion.differenceModelURI", &assign_TopologyVersion_differenceModelURI); + assign_map.emplace("cim:TopologyVersion.entsoeUML", &assign_TopologyVersion_entsoeUML); + assign_map.emplace("cim:TopologyVersion.entsoeURI", &assign_TopologyVersion_entsoeURI); + assign_map.emplace("cim:TopologyVersion.modelDescriptionURI", &assign_TopologyVersion_modelDescriptionURI); + assign_map.emplace("cim:TopologyVersion.namespaceRDF", &assign_TopologyVersion_namespaceRDF); + assign_map.emplace("cim:TopologyVersion.namespaceUML", &assign_TopologyVersion_namespaceUML); + assign_map.emplace("cim:TopologyVersion.shortName", &assign_TopologyVersion_shortName); } void TopologyVersion::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/TopologyVersion.hpp b/CGMES_2.4.15_16FEB2016/TopologyVersion.hpp index 7e0f6da91..5c9119a35 100644 --- a/CGMES_2.4.15_16FEB2016/TopologyVersion.hpp +++ b/CGMES_2.4.15_16FEB2016/TopologyVersion.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Version details. - */ + /** \brief Version details. */ class TopologyVersion : public BaseClass { public: @@ -28,16 +26,35 @@ namespace CIMPP TopologyVersion(); ~TopologyVersion() override; - CIMPP::String baseUML; /* Base UML provided by CIM model manager. Default: '' */ - CIMPP::String baseURI; /* Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ - CIMPP::Date date; /* Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ - CIMPP::String differenceModelURI; /* Difference model URI defined by IEC 61970-552. Default: '' */ - CIMPP::String entsoeUML; /* UML provided by ENTSO-E. Default: '' */ - CIMPP::String entsoeURI; /* Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/Topology/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ - CIMPP::String modelDescriptionURI; /* Model Description URI defined by IEC 61970-552. Default: '' */ - CIMPP::String namespaceRDF; /* RDF namespace. Default: '' */ - CIMPP::String namespaceUML; /* CIM UML namespace. Default: '' */ - CIMPP::String shortName; /* The short name of the profile used in profile documentation. Default: '' */ + /** \brief Base UML provided by CIM model manager. Default: '' */ + CIMPP::String baseUML; + + /** \brief Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ + CIMPP::String baseURI; + + /** \brief Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ + CIMPP::Date date; + + /** \brief Difference model URI defined by IEC 61970-552. Default: '' */ + CIMPP::String differenceModelURI; + + /** \brief UML provided by ENTSO-E. Default: '' */ + CIMPP::String entsoeUML; + + /** \brief Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/Topology/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ + CIMPP::String entsoeURI; + + /** \brief Model Description URI defined by IEC 61970-552. Default: '' */ + CIMPP::String modelDescriptionURI; + + /** \brief RDF namespace. Default: '' */ + CIMPP::String namespaceRDF; + + /** \brief CIM UML namespace. Default: '' */ + CIMPP::String namespaceUML; + + /** \brief The short name of the profile used in profile documentation. Default: '' */ + CIMPP::String shortName; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/TransformerControlMode.cpp b/CGMES_2.4.15_16FEB2016/TransformerControlMode.cpp index 3f49e0952..520a5e156 100644 --- a/CGMES_2.4.15_16FEB2016/TransformerControlMode.cpp +++ b/CGMES_2.4.15_16FEB2016/TransformerControlMode.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "TransformerControlMode") + if (EnumSymbol.substr(0, pos) != "TransformerControlMode") { lop.setstate(std::ios::failbit); return lop; @@ -50,12 +50,12 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "volt") + if (EnumSymbol == "volt") { rop = TransformerControlMode::volt; return lop; } - if(EnumSymbol == "reactive") + if (EnumSymbol == "reactive") { rop = TransformerControlMode::reactive; return lop; diff --git a/CGMES_2.4.15_16FEB2016/TransformerControlMode.hpp b/CGMES_2.4.15_16FEB2016/TransformerControlMode.hpp index 563b222e5..4007f385c 100644 --- a/CGMES_2.4.15_16FEB2016/TransformerControlMode.hpp +++ b/CGMES_2.4.15_16FEB2016/TransformerControlMode.hpp @@ -9,21 +9,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Control modes for a transformer. - */ + /** \brief Control modes for a transformer. */ class TransformerControlMode { public: enum TransformerControlMode_ENUM { - /** - * Voltage control - */ + /** Voltage control */ volt, - /** - * Reactive power flow control - */ + /** Reactive power flow control */ reactive, }; diff --git a/CGMES_2.4.15_16FEB2016/TransformerEnd.cpp b/CGMES_2.4.15_16FEB2016/TransformerEnd.cpp index dd8bb4fa1..86e31752c 100644 --- a/CGMES_2.4.15_16FEB2016/TransformerEnd.cpp +++ b/CGMES_2.4.15_16FEB2016/TransformerEnd.cpp @@ -12,15 +12,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "PhaseTapChanger.hpp" #include "RatioTapChanger.hpp" #include "Terminal.hpp" -#include "Integer.hpp" -#include "Boolean.hpp" -#include "Resistance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -TransformerEnd::TransformerEnd() : BaseVoltage(nullptr), PhaseTapChanger(nullptr), RatioTapChanger(nullptr), Terminal(nullptr) {}; -TransformerEnd::~TransformerEnd() {}; +TransformerEnd::TransformerEnd() : BaseVoltage(nullptr), PhaseTapChanger(nullptr), RatioTapChanger(nullptr), Terminal(nullptr) {} +TransformerEnd::~TransformerEnd() {} static const std::list PossibleProfilesForClass = { @@ -54,60 +50,6 @@ TransformerEnd::getPossibleProfilesForAttributes() const return map; } - -bool assign_TransformerEnd_endNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->endNumber; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_TransformerEnd_grounded(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->grounded; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_TransformerEnd_rground(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->rground; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_TransformerEnd_xground(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->xground; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_BaseVoltage_TransformerEnds(BaseClass*, BaseClass*); bool assign_TransformerEnd_BaseVoltage(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -124,6 +66,7 @@ bool assign_TransformerEnd_BaseVoltage(BaseClass* BaseClass_ptr1, BaseClass* Bas } return false; } + bool assign_PhaseTapChanger_TransformerEnd(BaseClass*, BaseClass*); bool assign_TransformerEnd_PhaseTapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -140,6 +83,7 @@ bool assign_TransformerEnd_PhaseTapChanger(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_RatioTapChanger_TransformerEnd(BaseClass*, BaseClass*); bool assign_TransformerEnd_RatioTapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -156,6 +100,7 @@ bool assign_TransformerEnd_RatioTapChanger(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_Terminal_TransformerEnd(BaseClass*, BaseClass*); bool assign_TransformerEnd_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -173,66 +118,66 @@ bool assign_TransformerEnd_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseCl return false; } -bool get_TransformerEnd_endNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TransformerEnd_endNumber(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->endNumber; - if (!buffer.str().empty()) + buffer >> element->endNumber; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_TransformerEnd_grounded(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TransformerEnd_grounded(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->grounded; - if (!buffer.str().empty()) + buffer >> element->grounded; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_TransformerEnd_rground(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TransformerEnd_rground(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->rground; - if (!buffer.str().empty()) + buffer >> element->rground; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_TransformerEnd_xground(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TransformerEnd_xground(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xground; - if (!buffer.str().empty()) + buffer >> element->xground; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_TransformerEnd_BaseVoltage(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->BaseVoltage != 0) { @@ -243,9 +188,12 @@ bool get_TransformerEnd_BaseVoltage(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Terminal != 0) { @@ -256,6 +204,65 @@ bool get_TransformerEnd_Terminal(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->endNumber; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_TransformerEnd_grounded(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->grounded; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_TransformerEnd_rground(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->rground; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_TransformerEnd_xground(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->xground; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char TransformerEnd::debugName[] = "TransformerEnd"; const char* TransformerEnd::debugString() const @@ -265,23 +272,23 @@ const char* TransformerEnd::debugString() const void TransformerEnd::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TransformerEnd"), &TransformerEnd_factory)); + factory_map.emplace("cim:TransformerEnd", &TransformerEnd_factory); } void TransformerEnd::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TransformerEnd.endNumber"), &assign_TransformerEnd_endNumber)); - assign_map.insert(std::make_pair(std::string("cim:TransformerEnd.grounded"), &assign_TransformerEnd_grounded)); - assign_map.insert(std::make_pair(std::string("cim:TransformerEnd.rground"), &assign_TransformerEnd_rground)); - assign_map.insert(std::make_pair(std::string("cim:TransformerEnd.xground"), &assign_TransformerEnd_xground)); + assign_map.emplace("cim:TransformerEnd.endNumber", &assign_TransformerEnd_endNumber); + assign_map.emplace("cim:TransformerEnd.grounded", &assign_TransformerEnd_grounded); + assign_map.emplace("cim:TransformerEnd.rground", &assign_TransformerEnd_rground); + assign_map.emplace("cim:TransformerEnd.xground", &assign_TransformerEnd_xground); } void TransformerEnd::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TransformerEnd.BaseVoltage"), &assign_TransformerEnd_BaseVoltage)); - assign_map.insert(std::make_pair(std::string("cim:TransformerEnd.PhaseTapChanger"), &assign_TransformerEnd_PhaseTapChanger)); - assign_map.insert(std::make_pair(std::string("cim:TransformerEnd.RatioTapChanger"), &assign_TransformerEnd_RatioTapChanger)); - assign_map.insert(std::make_pair(std::string("cim:TransformerEnd.Terminal"), &assign_TransformerEnd_Terminal)); + assign_map.emplace("cim:TransformerEnd.BaseVoltage", &assign_TransformerEnd_BaseVoltage); + assign_map.emplace("cim:TransformerEnd.PhaseTapChanger", &assign_TransformerEnd_PhaseTapChanger); + assign_map.emplace("cim:TransformerEnd.RatioTapChanger", &assign_TransformerEnd_RatioTapChanger); + assign_map.emplace("cim:TransformerEnd.Terminal", &assign_TransformerEnd_Terminal); } void TransformerEnd::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/TransformerEnd.hpp b/CGMES_2.4.15_16FEB2016/TransformerEnd.hpp index 557e221a1..163603fd7 100644 --- a/CGMES_2.4.15_16FEB2016/TransformerEnd.hpp +++ b/CGMES_2.4.15_16FEB2016/TransformerEnd.hpp @@ -24,9 +24,7 @@ namespace CIMPP class RatioTapChanger; class Terminal; - /* - A conducting connection point of a power transformer. It corresponds to a physical transformer winding terminal. In earlier CIM versions, the TransformerWinding class served a similar purpose, but this class is more flexible because it associates to terminal but is not a specialization of ConductingEquipment. - */ + /** \brief A conducting connection point of a power transformer. It corresponds to a physical transformer winding terminal. In earlier CIM versions, the TransformerWinding class served a similar purpose, but this class is more flexible because it associates to terminal but is not a specialization of ConductingEquipment. */ class TransformerEnd : public IdentifiedObject { public: @@ -34,14 +32,29 @@ namespace CIMPP TransformerEnd(); ~TransformerEnd() override; - CIMPP::BaseVoltage* BaseVoltage; /* Base voltage of the transformer end. This is essential for PU calculation. Default: 0 */ - CIMPP::PhaseTapChanger* PhaseTapChanger; /* Transformer end to which this phase tap changer belongs. Default: 0 */ - CIMPP::RatioTapChanger* RatioTapChanger; /* Transformer end to which this ratio tap changer belongs. Default: 0 */ - CIMPP::Terminal* Terminal; /* Terminal of the power transformer to which this transformer end belongs. Default: 0 */ - CIMPP::Integer endNumber; /* Number for this transformer end, corresponding to the end`s order in the power transformer vector group or phase angle clock number. Highest voltage winding should be 1. Each end within a power transformer should have a unique subsequent end number. Note the transformer end number need not match the terminal sequence number. Default: 0 */ - CIMPP::Boolean grounded; /* (for Yn and Zn connections) True if the neutral is solidly grounded. Default: false */ - CIMPP::Resistance rground; /* (for Yn and Zn connections) Resistance part of neutral impedance where `grounded` is true. Default: nullptr */ - CIMPP::Reactance xground; /* (for Yn and Zn connections) Reactive part of neutral impedance where `grounded` is true. Default: nullptr */ + /** \brief Base voltage of the transformer end. This is essential for PU calculation. Default: 0 */ + CIMPP::BaseVoltage* BaseVoltage; + + /** \brief Transformer end to which this phase tap changer belongs. Default: 0 */ + CIMPP::PhaseTapChanger* PhaseTapChanger; + + /** \brief Transformer end to which this ratio tap changer belongs. Default: 0 */ + CIMPP::RatioTapChanger* RatioTapChanger; + + /** \brief Terminal of the power transformer to which this transformer end belongs. Default: 0 */ + CIMPP::Terminal* Terminal; + + /** \brief Number for this transformer end, corresponding to the end`s order in the power transformer vector group or phase angle clock number. Highest voltage winding should be 1. Each end within a power transformer should have a unique subsequent end number. Note the transformer end number need not match the terminal sequence number. Default: 0 */ + CIMPP::Integer endNumber; + + /** \brief (for Yn and Zn connections) True if the neutral is solidly grounded. Default: false */ + CIMPP::Boolean grounded; + + /** \brief (for Yn and Zn connections) Resistance part of neutral impedance where `grounded` is true. Default: nullptr */ + CIMPP::Resistance rground; + + /** \brief (for Yn and Zn connections) Reactive part of neutral impedance where `grounded` is true. Default: nullptr */ + CIMPP::Reactance xground; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/TurbLCFB1.cpp b/CGMES_2.4.15_16FEB2016/TurbLCFB1.cpp index a193582c6..338c975ef 100644 --- a/CGMES_2.4.15_16FEB2016/TurbLCFB1.cpp +++ b/CGMES_2.4.15_16FEB2016/TurbLCFB1.cpp @@ -8,23 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "Boolean.hpp" -#include "ActivePower.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" using namespace CIMPP; -TurbLCFB1::TurbLCFB1() {}; -TurbLCFB1::~TurbLCFB1() {}; +TurbLCFB1::TurbLCFB1() {} +TurbLCFB1::~TurbLCFB1() {} static const std::list PossibleProfilesForClass = { @@ -62,168 +50,178 @@ TurbLCFB1::getPossibleProfilesForAttributes() const return map; } - -bool assign_TurbLCFB1_db(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_db(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_emax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_emax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->emax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_fb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_fb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_fbf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_fbf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fbf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_irmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_irmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->irmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_pbf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_pbf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pbf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_pmwset(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_pmwset(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmwset; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_speedReferenceGovernor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_speedReferenceGovernor(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->speedReferenceGovernor; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_tpelec(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_tpelec(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpelec; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_TurbLCFB1_db(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db; if (!buffer.str().empty()) @@ -237,7 +235,8 @@ bool get_TurbLCFB1_db(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_TurbLCFB1_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->emax; if (!buffer.str().empty()) @@ -251,7 +250,8 @@ bool get_TurbLCFB1_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_TurbLCFB1_fb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fb; if (!buffer.str().empty()) @@ -265,7 +265,8 @@ bool get_TurbLCFB1_fb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_TurbLCFB1_fbf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fbf; if (!buffer.str().empty()) @@ -279,7 +280,8 @@ bool get_TurbLCFB1_fbf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_TurbLCFB1_irmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->irmax; if (!buffer.str().empty()) @@ -293,7 +295,8 @@ bool get_TurbLCFB1_irmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_TurbLCFB1_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -307,7 +310,8 @@ bool get_TurbLCFB1_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_TurbLCFB1_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -321,7 +325,8 @@ bool get_TurbLCFB1_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_TurbLCFB1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -335,7 +340,8 @@ bool get_TurbLCFB1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_TurbLCFB1_pbf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pbf; if (!buffer.str().empty()) @@ -349,7 +355,8 @@ bool get_TurbLCFB1_pbf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_TurbLCFB1_pmwset(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmwset; if (!buffer.str().empty()) @@ -363,7 +370,8 @@ bool get_TurbLCFB1_pmwset(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_TurbLCFB1_speedReferenceGovernor(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->speedReferenceGovernor; if (!buffer.str().empty()) @@ -377,7 +385,8 @@ bool get_TurbLCFB1_speedReferenceGovernor(const BaseClass* BaseClass_ptr1, std:: bool get_TurbLCFB1_tpelec(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpelec; if (!buffer.str().empty()) @@ -389,8 +398,6 @@ bool get_TurbLCFB1_tpelec(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char TurbLCFB1::debugName[] = "TurbLCFB1"; const char* TurbLCFB1::debugString() const { @@ -399,23 +406,23 @@ const char* TurbLCFB1::debugString() const void TurbLCFB1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TurbLCFB1"), &TurbLCFB1_factory)); + factory_map.emplace("cim:TurbLCFB1", &TurbLCFB1_factory); } void TurbLCFB1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.db"), &assign_TurbLCFB1_db)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.emax"), &assign_TurbLCFB1_emax)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.fb"), &assign_TurbLCFB1_fb)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.fbf"), &assign_TurbLCFB1_fbf)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.irmax"), &assign_TurbLCFB1_irmax)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.ki"), &assign_TurbLCFB1_ki)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.kp"), &assign_TurbLCFB1_kp)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.mwbase"), &assign_TurbLCFB1_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.pbf"), &assign_TurbLCFB1_pbf)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.pmwset"), &assign_TurbLCFB1_pmwset)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.speedReferenceGovernor"), &assign_TurbLCFB1_speedReferenceGovernor)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.tpelec"), &assign_TurbLCFB1_tpelec)); + assign_map.emplace("cim:TurbLCFB1.db", &assign_TurbLCFB1_db); + assign_map.emplace("cim:TurbLCFB1.emax", &assign_TurbLCFB1_emax); + assign_map.emplace("cim:TurbLCFB1.fb", &assign_TurbLCFB1_fb); + assign_map.emplace("cim:TurbLCFB1.fbf", &assign_TurbLCFB1_fbf); + assign_map.emplace("cim:TurbLCFB1.irmax", &assign_TurbLCFB1_irmax); + assign_map.emplace("cim:TurbLCFB1.ki", &assign_TurbLCFB1_ki); + assign_map.emplace("cim:TurbLCFB1.kp", &assign_TurbLCFB1_kp); + assign_map.emplace("cim:TurbLCFB1.mwbase", &assign_TurbLCFB1_mwbase); + assign_map.emplace("cim:TurbLCFB1.pbf", &assign_TurbLCFB1_pbf); + assign_map.emplace("cim:TurbLCFB1.pmwset", &assign_TurbLCFB1_pmwset); + assign_map.emplace("cim:TurbLCFB1.speedReferenceGovernor", &assign_TurbLCFB1_speedReferenceGovernor); + assign_map.emplace("cim:TurbLCFB1.tpelec", &assign_TurbLCFB1_tpelec); } void TurbLCFB1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/TurbLCFB1.hpp b/CGMES_2.4.15_16FEB2016/TurbLCFB1.hpp index 9a057c88b..f45fd978f 100644 --- a/CGMES_2.4.15_16FEB2016/TurbLCFB1.hpp +++ b/CGMES_2.4.15_16FEB2016/TurbLCFB1.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Turbine Load Controller model developed in the WECC. This model represents a supervisory turbine load controller that acts to maintain turbine power at a set value by continuous adjustment of the turbine governor speed-load reference. This model is intended to represent slow reset 'outer loop' controllers managing the action of the turbine governor. - */ + /** \brief Turbine Load Controller model developed in the WECC. This model represents a supervisory turbine load controller that acts to maintain turbine power at a set value by continuous adjustment of the turbine governor speed-load reference. This model is intended to represent slow reset 'outer loop' controllers managing the action of the turbine governor. */ class TurbLCFB1 : public TurbineLoadControllerDynamics { public: @@ -30,18 +28,41 @@ namespace CIMPP TurbLCFB1(); ~TurbLCFB1() override; - CIMPP::PU db; /* Controller dead band (db). Typical Value = 0. Default: nullptr */ - CIMPP::PU emax; /* Maximum control error (Emax) (note 4). Typical Value = 0.02. Default: nullptr */ - CIMPP::PU fb; /* Frequency bias gain (Fb). Typical Value = 0. Default: nullptr */ - CIMPP::Boolean fbf; /* Frequency bias flag (Fbf). true = enable frequency bias false = disable frequency bias. Typical Value = false. Default: false */ - CIMPP::PU irmax; /* Maximum turbine speed/load reference bias (Irmax) (note 3). Typical Value = 0. Default: nullptr */ - CIMPP::PU ki; /* Integral gain (Ki). Typical Value = 0. Default: nullptr */ - CIMPP::PU kp; /* Proportional gain (Kp). Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::Boolean pbf; /* Power controller flag (Pbf). true = enable load controller false = disable load controller. Typical Value = false. Default: false */ - CIMPP::ActivePower pmwset; /* Power controller setpoint (Pmwset) (note 1). Unit = MW. Typical Value = 0. Default: nullptr */ - CIMPP::Boolean speedReferenceGovernor; /* Type of turbine governor reference (Type). true = speed reference governor false = load reference governor. Typical Value = true. Default: false */ - CIMPP::Seconds tpelec; /* Power transducer time constant (Tpelec). Typical Value = 0. Default: nullptr */ + /** \brief Controller dead band (db). Typical Value = 0. Default: nullptr */ + CIMPP::PU db; + + /** \brief Maximum control error (Emax) (note 4). Typical Value = 0.02. Default: nullptr */ + CIMPP::PU emax; + + /** \brief Frequency bias gain (Fb). Typical Value = 0. Default: nullptr */ + CIMPP::PU fb; + + /** \brief Frequency bias flag (Fbf). true = enable frequency bias false = disable frequency bias. Typical Value = false. Default: false */ + CIMPP::Boolean fbf; + + /** \brief Maximum turbine speed/load reference bias (Irmax) (note 3). Typical Value = 0. Default: nullptr */ + CIMPP::PU irmax; + + /** \brief Integral gain (Ki). Typical Value = 0. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Proportional gain (Kp). Typical Value = 0. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Power controller flag (Pbf). true = enable load controller false = disable load controller. Typical Value = false. Default: false */ + CIMPP::Boolean pbf; + + /** \brief Power controller setpoint (Pmwset) (note 1). Unit = MW. Typical Value = 0. Default: nullptr */ + CIMPP::ActivePower pmwset; + + /** \brief Type of turbine governor reference (Type). true = speed reference governor false = load reference governor. Typical Value = true. Default: false */ + CIMPP::Boolean speedReferenceGovernor; + + /** \brief Power transducer time constant (Tpelec). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tpelec; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/TurbineGovernorDynamics.cpp b/CGMES_2.4.15_16FEB2016/TurbineGovernorDynamics.cpp index 8c08348f9..cebece4b4 100644 --- a/CGMES_2.4.15_16FEB2016/TurbineGovernorDynamics.cpp +++ b/CGMES_2.4.15_16FEB2016/TurbineGovernorDynamics.cpp @@ -14,8 +14,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -TurbineGovernorDynamics::TurbineGovernorDynamics() : AsynchronousMachineDynamics(nullptr), TurbineLoadControllerDynamics(nullptr) {}; -TurbineGovernorDynamics::~TurbineGovernorDynamics() {}; +TurbineGovernorDynamics::TurbineGovernorDynamics() : AsynchronousMachineDynamics(nullptr), TurbineLoadControllerDynamics(nullptr) {} +TurbineGovernorDynamics::~TurbineGovernorDynamics() {} static const std::list PossibleProfilesForClass = { @@ -44,8 +44,6 @@ TurbineGovernorDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_AsynchronousMachineDynamics_TurbineGovernorDynamics(BaseClass*, BaseClass*); bool assign_TurbineGovernorDynamics_AsynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -62,6 +60,7 @@ bool assign_TurbineGovernorDynamics_AsynchronousMachineDynamics(BaseClass* BaseC } return false; } + bool assign_SynchronousMachineDynamics_TurbineGovernorDynamics(BaseClass*, BaseClass*); bool assign_TurbineGovernorDynamics_SynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -78,6 +77,7 @@ bool assign_TurbineGovernorDynamics_SynchronousMachineDynamics(BaseClass* BaseCl } return false; } + bool assign_TurbineLoadControllerDynamics_TurbineGovernorDynamics(BaseClass*, BaseClass*); bool assign_TurbineGovernorDynamics_TurbineLoadControllerDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -95,10 +95,10 @@ bool assign_TurbineGovernorDynamics_TurbineLoadControllerDynamics(BaseClass* Bas return false; } - bool get_TurbineGovernorDynamics_AsynchronousMachineDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TurbineGovernorDynamics* element = dynamic_cast(BaseClass_ptr1)) + const TurbineGovernorDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->AsynchronousMachineDynamics != 0) { @@ -111,7 +111,8 @@ bool get_TurbineGovernorDynamics_AsynchronousMachineDynamics(const BaseClass* Ba bool get_TurbineGovernorDynamics_SynchronousMachineDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TurbineGovernorDynamics* element = dynamic_cast(BaseClass_ptr1)) + const TurbineGovernorDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { std::copy(element->SynchronousMachineDynamics.begin(), element->SynchronousMachineDynamics.end(), std::back_inserter(BaseClass_list)); return !BaseClass_list.empty(); @@ -128,7 +129,7 @@ const char* TurbineGovernorDynamics::debugString() const void TurbineGovernorDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TurbineGovernorDynamics"), &TurbineGovernorDynamics_factory)); + factory_map.emplace("cim:TurbineGovernorDynamics", &TurbineGovernorDynamics_factory); } void TurbineGovernorDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -137,9 +138,9 @@ void TurbineGovernorDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TurbineGovernorDynamics.AsynchronousMachineDynamics"), &assign_TurbineGovernorDynamics_AsynchronousMachineDynamics)); - assign_map.insert(std::make_pair(std::string("cim:TurbineGovernorDynamics.SynchronousMachineDynamics"), &assign_TurbineGovernorDynamics_SynchronousMachineDynamics)); - assign_map.insert(std::make_pair(std::string("cim:TurbineGovernorDynamics.TurbineLoadControllerDynamics"), &assign_TurbineGovernorDynamics_TurbineLoadControllerDynamics)); + assign_map.emplace("cim:TurbineGovernorDynamics.AsynchronousMachineDynamics", &assign_TurbineGovernorDynamics_AsynchronousMachineDynamics); + assign_map.emplace("cim:TurbineGovernorDynamics.SynchronousMachineDynamics", &assign_TurbineGovernorDynamics_SynchronousMachineDynamics); + assign_map.emplace("cim:TurbineGovernorDynamics.TurbineLoadControllerDynamics", &assign_TurbineGovernorDynamics_TurbineLoadControllerDynamics); } void TurbineGovernorDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/TurbineGovernorDynamics.hpp b/CGMES_2.4.15_16FEB2016/TurbineGovernorDynamics.hpp index 1e521e825..dda79cfd7 100644 --- a/CGMES_2.4.15_16FEB2016/TurbineGovernorDynamics.hpp +++ b/CGMES_2.4.15_16FEB2016/TurbineGovernorDynamics.hpp @@ -19,9 +19,7 @@ namespace CIMPP class SynchronousMachineDynamics; class TurbineLoadControllerDynamics; - /* - Turbine-governor function block whose behavior is described by reference to a standard model - */ + /** \brief Turbine-governor function block whose behavior is described by reference to a standard model */ class TurbineGovernorDynamics : public DynamicsFunctionBlock { public: @@ -29,9 +27,14 @@ namespace CIMPP TurbineGovernorDynamics(); ~TurbineGovernorDynamics() override; - CIMPP::AsynchronousMachineDynamics* AsynchronousMachineDynamics; /* Asynchronous machine model with which this turbine-governor model is associated. Default: 0 */ - std::list SynchronousMachineDynamics; /* Turbine-governor model associated with this synchronous machine model. Default: 0 */ - CIMPP::TurbineLoadControllerDynamics* TurbineLoadControllerDynamics; /* Turbine load controller providing input to this turbine-governor. Default: 0 */ + /** \brief Asynchronous machine model with which this turbine-governor model is associated. Default: 0 */ + CIMPP::AsynchronousMachineDynamics* AsynchronousMachineDynamics; + + /** \brief Turbine-governor model associated with this synchronous machine model. Default: 0 */ + std::list SynchronousMachineDynamics; + + /** \brief Turbine load controller providing input to this turbine-governor. Default: 0 */ + CIMPP::TurbineLoadControllerDynamics* TurbineLoadControllerDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/TurbineGovernorUserDefined.cpp b/CGMES_2.4.15_16FEB2016/TurbineGovernorUserDefined.cpp index cbaea87d3..ad7d7ef5f 100644 --- a/CGMES_2.4.15_16FEB2016/TurbineGovernorUserDefined.cpp +++ b/CGMES_2.4.15_16FEB2016/TurbineGovernorUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -TurbineGovernorUserDefined::TurbineGovernorUserDefined() {}; -TurbineGovernorUserDefined::~TurbineGovernorUserDefined() {}; +TurbineGovernorUserDefined::TurbineGovernorUserDefined() {} +TurbineGovernorUserDefined::~TurbineGovernorUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ TurbineGovernorUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_TurbineGovernorUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TurbineGovernorUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_TurbineGovernorUserDefined(BaseClass*, BaseClass*); bool assign_TurbineGovernorUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_TurbineGovernorUserDefined_ProprietaryParameterDynamics(BaseClass* B return false; } +bool assign_TurbineGovernorUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + TurbineGovernorUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_TurbineGovernorUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbineGovernorUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const TurbineGovernorUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_TurbineGovernorUserDefined_proprietary(const BaseClass* BaseClass_ptr1, return false; } - - const char TurbineGovernorUserDefined::debugName[] = "TurbineGovernorUserDefined"; const char* TurbineGovernorUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* TurbineGovernorUserDefined::debugString() const void TurbineGovernorUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TurbineGovernorUserDefined"), &TurbineGovernorUserDefined_factory)); + factory_map.emplace("cim:TurbineGovernorUserDefined", &TurbineGovernorUserDefined_factory); } void TurbineGovernorUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TurbineGovernorUserDefined.proprietary"), &assign_TurbineGovernorUserDefined_proprietary)); + assign_map.emplace("cim:TurbineGovernorUserDefined.proprietary", &assign_TurbineGovernorUserDefined_proprietary); } void TurbineGovernorUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TurbineGovernorUserDefined.ProprietaryParameterDynamics"), &assign_TurbineGovernorUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:TurbineGovernorUserDefined.ProprietaryParameterDynamics", &assign_TurbineGovernorUserDefined_ProprietaryParameterDynamics); } void TurbineGovernorUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/TurbineGovernorUserDefined.hpp b/CGMES_2.4.15_16FEB2016/TurbineGovernorUserDefined.hpp index 515cd55e9..47aa48210 100644 --- a/CGMES_2.4.15_16FEB2016/TurbineGovernorUserDefined.hpp +++ b/CGMES_2.4.15_16FEB2016/TurbineGovernorUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Turbine-governor function block whose dynamic behaviour is described by - */ + /** \brief Turbine-governor function block whose dynamic behaviour is described by */ class TurbineGovernorUserDefined : public TurbineGovernorDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP TurbineGovernorUserDefined(); ~TurbineGovernorUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/TurbineLoadControllerDynamics.cpp b/CGMES_2.4.15_16FEB2016/TurbineLoadControllerDynamics.cpp index fe5f1ad16..d9ae03d4f 100644 --- a/CGMES_2.4.15_16FEB2016/TurbineLoadControllerDynamics.cpp +++ b/CGMES_2.4.15_16FEB2016/TurbineLoadControllerDynamics.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -TurbineLoadControllerDynamics::TurbineLoadControllerDynamics() : TurbineGovernorDynamics(nullptr) {}; -TurbineLoadControllerDynamics::~TurbineLoadControllerDynamics() {}; +TurbineLoadControllerDynamics::TurbineLoadControllerDynamics() : TurbineGovernorDynamics(nullptr) {} +TurbineLoadControllerDynamics::~TurbineLoadControllerDynamics() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ TurbineLoadControllerDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_TurbineGovernorDynamics_TurbineLoadControllerDynamics(BaseClass*, BaseClass*); bool assign_TurbineLoadControllerDynamics_TurbineGovernorDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_TurbineLoadControllerDynamics_TurbineGovernorDynamics(BaseClass* Bas return false; } - bool get_TurbineLoadControllerDynamics_TurbineGovernorDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TurbineLoadControllerDynamics* element = dynamic_cast(BaseClass_ptr1)) + const TurbineLoadControllerDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->TurbineGovernorDynamics != 0) { @@ -73,7 +71,6 @@ bool get_TurbineLoadControllerDynamics_TurbineGovernorDynamics(const BaseClass* return false; } - const char TurbineLoadControllerDynamics::debugName[] = "TurbineLoadControllerDynamics"; const char* TurbineLoadControllerDynamics::debugString() const { @@ -82,7 +79,7 @@ const char* TurbineLoadControllerDynamics::debugString() const void TurbineLoadControllerDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TurbineLoadControllerDynamics"), &TurbineLoadControllerDynamics_factory)); + factory_map.emplace("cim:TurbineLoadControllerDynamics", &TurbineLoadControllerDynamics_factory); } void TurbineLoadControllerDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void TurbineLoadControllerDynamics::addPrimitiveAssignFnsToMap(std::unordered_ma void TurbineLoadControllerDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TurbineLoadControllerDynamics.TurbineGovernorDynamics"), &assign_TurbineLoadControllerDynamics_TurbineGovernorDynamics)); + assign_map.emplace("cim:TurbineLoadControllerDynamics.TurbineGovernorDynamics", &assign_TurbineLoadControllerDynamics_TurbineGovernorDynamics); } void TurbineLoadControllerDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/TurbineLoadControllerDynamics.hpp b/CGMES_2.4.15_16FEB2016/TurbineLoadControllerDynamics.hpp index eb7210c2d..12ec05aec 100644 --- a/CGMES_2.4.15_16FEB2016/TurbineLoadControllerDynamics.hpp +++ b/CGMES_2.4.15_16FEB2016/TurbineLoadControllerDynamics.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class TurbineGovernorDynamics; - /* - Turbine load controller function block whose behavior is described by reference to a standard model - */ + /** \brief Turbine load controller function block whose behavior is described by reference to a standard model */ class TurbineLoadControllerDynamics : public DynamicsFunctionBlock { public: @@ -27,7 +25,8 @@ namespace CIMPP TurbineLoadControllerDynamics(); ~TurbineLoadControllerDynamics() override; - CIMPP::TurbineGovernorDynamics* TurbineGovernorDynamics; /* Turbine-governor controlled by this turbine load controller. Default: 0 */ + /** \brief Turbine-governor controlled by this turbine load controller. Default: 0 */ + CIMPP::TurbineGovernorDynamics* TurbineGovernorDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/TurbineLoadControllerUserDefined.cpp b/CGMES_2.4.15_16FEB2016/TurbineLoadControllerUserDefined.cpp index a46c191e9..842adf4c4 100644 --- a/CGMES_2.4.15_16FEB2016/TurbineLoadControllerUserDefined.cpp +++ b/CGMES_2.4.15_16FEB2016/TurbineLoadControllerUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -TurbineLoadControllerUserDefined::TurbineLoadControllerUserDefined() {}; -TurbineLoadControllerUserDefined::~TurbineLoadControllerUserDefined() {}; +TurbineLoadControllerUserDefined::TurbineLoadControllerUserDefined() {} +TurbineLoadControllerUserDefined::~TurbineLoadControllerUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ TurbineLoadControllerUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_TurbineLoadControllerUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TurbineLoadControllerUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_TurbineLoadControllerUserDefined(BaseClass*, BaseClass*); bool assign_TurbineLoadControllerUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_TurbineLoadControllerUserDefined_ProprietaryParameterDynamics(BaseCl return false; } +bool assign_TurbineLoadControllerUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + TurbineLoadControllerUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_TurbineLoadControllerUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbineLoadControllerUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const TurbineLoadControllerUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_TurbineLoadControllerUserDefined_proprietary(const BaseClass* BaseClass return false; } - - const char TurbineLoadControllerUserDefined::debugName[] = "TurbineLoadControllerUserDefined"; const char* TurbineLoadControllerUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* TurbineLoadControllerUserDefined::debugString() const void TurbineLoadControllerUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TurbineLoadControllerUserDefined"), &TurbineLoadControllerUserDefined_factory)); + factory_map.emplace("cim:TurbineLoadControllerUserDefined", &TurbineLoadControllerUserDefined_factory); } void TurbineLoadControllerUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TurbineLoadControllerUserDefined.proprietary"), &assign_TurbineLoadControllerUserDefined_proprietary)); + assign_map.emplace("cim:TurbineLoadControllerUserDefined.proprietary", &assign_TurbineLoadControllerUserDefined_proprietary); } void TurbineLoadControllerUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TurbineLoadControllerUserDefined.ProprietaryParameterDynamics"), &assign_TurbineLoadControllerUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:TurbineLoadControllerUserDefined.ProprietaryParameterDynamics", &assign_TurbineLoadControllerUserDefined_ProprietaryParameterDynamics); } void TurbineLoadControllerUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/TurbineLoadControllerUserDefined.hpp b/CGMES_2.4.15_16FEB2016/TurbineLoadControllerUserDefined.hpp index 20fe71ab6..ce15803d0 100644 --- a/CGMES_2.4.15_16FEB2016/TurbineLoadControllerUserDefined.hpp +++ b/CGMES_2.4.15_16FEB2016/TurbineLoadControllerUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Turbine load controller function block whose dynamic behaviour is described by - */ + /** \brief Turbine load controller function block whose dynamic behaviour is described by */ class TurbineLoadControllerUserDefined : public TurbineLoadControllerDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP TurbineLoadControllerUserDefined(); ~TurbineLoadControllerUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/UnderexcLim2Simplified.cpp b/CGMES_2.4.15_16FEB2016/UnderexcLim2Simplified.cpp index f26bd20ff..d3524b97d 100644 --- a/CGMES_2.4.15_16FEB2016/UnderexcLim2Simplified.cpp +++ b/CGMES_2.4.15_16FEB2016/UnderexcLim2Simplified.cpp @@ -8,18 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -UnderexcLim2Simplified::UnderexcLim2Simplified() {}; -UnderexcLim2Simplified::~UnderexcLim2Simplified() {}; +UnderexcLim2Simplified::UnderexcLim2Simplified() {} +UnderexcLim2Simplified::~UnderexcLim2Simplified() {} static const std::list PossibleProfilesForClass = { @@ -52,103 +45,108 @@ UnderexcLim2Simplified::getPossibleProfilesForAttributes() const return map; } - -bool assign_UnderexcLim2Simplified_kui(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLim2Simplified_kui(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kui; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLim2Simplified_p0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLim2Simplified_p0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLim2Simplified_p1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLim2Simplified_p1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLim2Simplified_q0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLim2Simplified_q0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLim2Simplified_q1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLim2Simplified_q1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLim2Simplified_vuimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLim2Simplified_vuimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vuimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLim2Simplified_vuimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLim2Simplified_vuimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vuimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_UnderexcLim2Simplified_kui(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kui; if (!buffer.str().empty()) @@ -162,7 +160,8 @@ bool get_UnderexcLim2Simplified_kui(const BaseClass* BaseClass_ptr1, std::string bool get_UnderexcLim2Simplified_p0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p0; if (!buffer.str().empty()) @@ -176,7 +175,8 @@ bool get_UnderexcLim2Simplified_p0(const BaseClass* BaseClass_ptr1, std::strings bool get_UnderexcLim2Simplified_p1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p1; if (!buffer.str().empty()) @@ -190,7 +190,8 @@ bool get_UnderexcLim2Simplified_p1(const BaseClass* BaseClass_ptr1, std::strings bool get_UnderexcLim2Simplified_q0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q0; if (!buffer.str().empty()) @@ -204,7 +205,8 @@ bool get_UnderexcLim2Simplified_q0(const BaseClass* BaseClass_ptr1, std::strings bool get_UnderexcLim2Simplified_q1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q1; if (!buffer.str().empty()) @@ -218,7 +220,8 @@ bool get_UnderexcLim2Simplified_q1(const BaseClass* BaseClass_ptr1, std::strings bool get_UnderexcLim2Simplified_vuimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vuimax; if (!buffer.str().empty()) @@ -232,7 +235,8 @@ bool get_UnderexcLim2Simplified_vuimax(const BaseClass* BaseClass_ptr1, std::str bool get_UnderexcLim2Simplified_vuimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vuimin; if (!buffer.str().empty()) @@ -244,8 +248,6 @@ bool get_UnderexcLim2Simplified_vuimin(const BaseClass* BaseClass_ptr1, std::str return false; } - - const char UnderexcLim2Simplified::debugName[] = "UnderexcLim2Simplified"; const char* UnderexcLim2Simplified::debugString() const { @@ -254,18 +256,18 @@ const char* UnderexcLim2Simplified::debugString() const void UnderexcLim2Simplified::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:UnderexcLim2Simplified"), &UnderexcLim2Simplified_factory)); + factory_map.emplace("cim:UnderexcLim2Simplified", &UnderexcLim2Simplified_factory); } void UnderexcLim2Simplified::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:UnderexcLim2Simplified.kui"), &assign_UnderexcLim2Simplified_kui)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLim2Simplified.p0"), &assign_UnderexcLim2Simplified_p0)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLim2Simplified.p1"), &assign_UnderexcLim2Simplified_p1)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLim2Simplified.q0"), &assign_UnderexcLim2Simplified_q0)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLim2Simplified.q1"), &assign_UnderexcLim2Simplified_q1)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLim2Simplified.vuimax"), &assign_UnderexcLim2Simplified_vuimax)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLim2Simplified.vuimin"), &assign_UnderexcLim2Simplified_vuimin)); + assign_map.emplace("cim:UnderexcLim2Simplified.kui", &assign_UnderexcLim2Simplified_kui); + assign_map.emplace("cim:UnderexcLim2Simplified.p0", &assign_UnderexcLim2Simplified_p0); + assign_map.emplace("cim:UnderexcLim2Simplified.p1", &assign_UnderexcLim2Simplified_p1); + assign_map.emplace("cim:UnderexcLim2Simplified.q0", &assign_UnderexcLim2Simplified_q0); + assign_map.emplace("cim:UnderexcLim2Simplified.q1", &assign_UnderexcLim2Simplified_q1); + assign_map.emplace("cim:UnderexcLim2Simplified.vuimax", &assign_UnderexcLim2Simplified_vuimax); + assign_map.emplace("cim:UnderexcLim2Simplified.vuimin", &assign_UnderexcLim2Simplified_vuimin); } void UnderexcLim2Simplified::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/UnderexcLim2Simplified.hpp b/CGMES_2.4.15_16FEB2016/UnderexcLim2Simplified.hpp index b6f8d0494..5c1e361db 100644 --- a/CGMES_2.4.15_16FEB2016/UnderexcLim2Simplified.hpp +++ b/CGMES_2.4.15_16FEB2016/UnderexcLim2Simplified.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - This model can be derived from UnderexcLimIEEE2. The limit characteristic (look -up table) is a single straight-line, the same as UnderexcLimIEEE2 (see Figure 10.4 (p 32), IEEE 421.5-2005 Section 10.2). - */ + /** \brief This model can be derived from UnderexcLimIEEE2. The limit characteristic (look -up table) is a single straight-line, the same as UnderexcLimIEEE2 (see Figure 10.4 (p 32), IEEE 421.5-2005 Section 10.2). */ class UnderexcLim2Simplified : public UnderexcitationLimiterDynamics { public: @@ -27,13 +25,26 @@ namespace CIMPP UnderexcLim2Simplified(); ~UnderexcLim2Simplified() override; - CIMPP::PU kui; /* Gain Under excitation limiter (Kui). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU p0; /* Segment P initial point (P0). Typical Value = 0. Default: nullptr */ - CIMPP::PU p1; /* Segment P end point (P1). Typical Value = 1. Default: nullptr */ - CIMPP::PU q0; /* Segment Q initial point (Q0). Typical Value = -0.31. Default: nullptr */ - CIMPP::PU q1; /* Segment Q end point (Q1). Typical Value = -0.1. Default: nullptr */ - CIMPP::PU vuimax; /* Maximum error signal (V). Typical Value = 1. Default: nullptr */ - CIMPP::PU vuimin; /* Minimum error signal (V). Typical Value = 0. Default: nullptr */ + /** \brief Gain Under excitation limiter (Kui). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU kui; + + /** \brief Segment P initial point (P0). Typical Value = 0. Default: nullptr */ + CIMPP::PU p0; + + /** \brief Segment P end point (P1). Typical Value = 1. Default: nullptr */ + CIMPP::PU p1; + + /** \brief Segment Q initial point (Q0). Typical Value = -0.31. Default: nullptr */ + CIMPP::PU q0; + + /** \brief Segment Q end point (Q1). Typical Value = -0.1. Default: nullptr */ + CIMPP::PU q1; + + /** \brief Maximum error signal (V). Typical Value = 1. Default: nullptr */ + CIMPP::PU vuimax; + + /** \brief Minimum error signal (V). Typical Value = 0. Default: nullptr */ + CIMPP::PU vuimin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/UnderexcLimIEEE1.cpp b/CGMES_2.4.15_16FEB2016/UnderexcLimIEEE1.cpp index 56b0a574b..ed960945f 100644 --- a/CGMES_2.4.15_16FEB2016/UnderexcLimIEEE1.cpp +++ b/CGMES_2.4.15_16FEB2016/UnderexcLimIEEE1.cpp @@ -8,26 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -UnderexcLimIEEE1::UnderexcLimIEEE1() {}; -UnderexcLimIEEE1::~UnderexcLimIEEE1() {}; +UnderexcLimIEEE1::UnderexcLimIEEE1() {} +UnderexcLimIEEE1::~UnderexcLimIEEE1() {} static const std::list PossibleProfilesForClass = { @@ -68,207 +53,220 @@ UnderexcLimIEEE1::getPossibleProfilesForAttributes() const return map; } - -bool assign_UnderexcLimIEEE1_kuc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_kuc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kuc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_kuf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_kuf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kuf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_kui(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_kui(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kui; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_kul(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_kul(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kul; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_kur(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_kur(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kur; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_tu1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_tu1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tu1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_tu2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_tu2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tu2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_tu3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_tu3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tu3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_tu4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_tu4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tu4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_vucmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_vucmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vucmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_vuimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_vuimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vuimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_vuimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_vuimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vuimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_vulmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_vulmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vulmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_vulmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_vulmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vulmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_vurmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_vurmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vurmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_UnderexcLimIEEE1_kuc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kuc; if (!buffer.str().empty()) @@ -282,7 +280,8 @@ bool get_UnderexcLimIEEE1_kuc(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE1_kuf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kuf; if (!buffer.str().empty()) @@ -296,7 +295,8 @@ bool get_UnderexcLimIEEE1_kuf(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE1_kui(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kui; if (!buffer.str().empty()) @@ -310,7 +310,8 @@ bool get_UnderexcLimIEEE1_kui(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE1_kul(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kul; if (!buffer.str().empty()) @@ -324,7 +325,8 @@ bool get_UnderexcLimIEEE1_kul(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE1_kur(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kur; if (!buffer.str().empty()) @@ -338,7 +340,8 @@ bool get_UnderexcLimIEEE1_kur(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE1_tu1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tu1; if (!buffer.str().empty()) @@ -352,7 +355,8 @@ bool get_UnderexcLimIEEE1_tu1(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE1_tu2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tu2; if (!buffer.str().empty()) @@ -366,7 +370,8 @@ bool get_UnderexcLimIEEE1_tu2(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE1_tu3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tu3; if (!buffer.str().empty()) @@ -380,7 +385,8 @@ bool get_UnderexcLimIEEE1_tu3(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE1_tu4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tu4; if (!buffer.str().empty()) @@ -394,7 +400,8 @@ bool get_UnderexcLimIEEE1_tu4(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE1_vucmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vucmax; if (!buffer.str().empty()) @@ -408,7 +415,8 @@ bool get_UnderexcLimIEEE1_vucmax(const BaseClass* BaseClass_ptr1, std::stringstr bool get_UnderexcLimIEEE1_vuimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vuimax; if (!buffer.str().empty()) @@ -422,7 +430,8 @@ bool get_UnderexcLimIEEE1_vuimax(const BaseClass* BaseClass_ptr1, std::stringstr bool get_UnderexcLimIEEE1_vuimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vuimin; if (!buffer.str().empty()) @@ -436,7 +445,8 @@ bool get_UnderexcLimIEEE1_vuimin(const BaseClass* BaseClass_ptr1, std::stringstr bool get_UnderexcLimIEEE1_vulmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vulmax; if (!buffer.str().empty()) @@ -450,7 +460,8 @@ bool get_UnderexcLimIEEE1_vulmax(const BaseClass* BaseClass_ptr1, std::stringstr bool get_UnderexcLimIEEE1_vulmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vulmin; if (!buffer.str().empty()) @@ -464,7 +475,8 @@ bool get_UnderexcLimIEEE1_vulmin(const BaseClass* BaseClass_ptr1, std::stringstr bool get_UnderexcLimIEEE1_vurmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vurmax; if (!buffer.str().empty()) @@ -476,8 +488,6 @@ bool get_UnderexcLimIEEE1_vurmax(const BaseClass* BaseClass_ptr1, std::stringstr return false; } - - const char UnderexcLimIEEE1::debugName[] = "UnderexcLimIEEE1"; const char* UnderexcLimIEEE1::debugString() const { @@ -486,26 +496,26 @@ const char* UnderexcLimIEEE1::debugString() const void UnderexcLimIEEE1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1"), &UnderexcLimIEEE1_factory)); + factory_map.emplace("cim:UnderexcLimIEEE1", &UnderexcLimIEEE1_factory); } void UnderexcLimIEEE1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.kuc"), &assign_UnderexcLimIEEE1_kuc)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.kuf"), &assign_UnderexcLimIEEE1_kuf)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.kui"), &assign_UnderexcLimIEEE1_kui)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.kul"), &assign_UnderexcLimIEEE1_kul)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.kur"), &assign_UnderexcLimIEEE1_kur)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.tu1"), &assign_UnderexcLimIEEE1_tu1)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.tu2"), &assign_UnderexcLimIEEE1_tu2)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.tu3"), &assign_UnderexcLimIEEE1_tu3)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.tu4"), &assign_UnderexcLimIEEE1_tu4)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.vucmax"), &assign_UnderexcLimIEEE1_vucmax)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.vuimax"), &assign_UnderexcLimIEEE1_vuimax)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.vuimin"), &assign_UnderexcLimIEEE1_vuimin)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.vulmax"), &assign_UnderexcLimIEEE1_vulmax)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.vulmin"), &assign_UnderexcLimIEEE1_vulmin)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.vurmax"), &assign_UnderexcLimIEEE1_vurmax)); + assign_map.emplace("cim:UnderexcLimIEEE1.kuc", &assign_UnderexcLimIEEE1_kuc); + assign_map.emplace("cim:UnderexcLimIEEE1.kuf", &assign_UnderexcLimIEEE1_kuf); + assign_map.emplace("cim:UnderexcLimIEEE1.kui", &assign_UnderexcLimIEEE1_kui); + assign_map.emplace("cim:UnderexcLimIEEE1.kul", &assign_UnderexcLimIEEE1_kul); + assign_map.emplace("cim:UnderexcLimIEEE1.kur", &assign_UnderexcLimIEEE1_kur); + assign_map.emplace("cim:UnderexcLimIEEE1.tu1", &assign_UnderexcLimIEEE1_tu1); + assign_map.emplace("cim:UnderexcLimIEEE1.tu2", &assign_UnderexcLimIEEE1_tu2); + assign_map.emplace("cim:UnderexcLimIEEE1.tu3", &assign_UnderexcLimIEEE1_tu3); + assign_map.emplace("cim:UnderexcLimIEEE1.tu4", &assign_UnderexcLimIEEE1_tu4); + assign_map.emplace("cim:UnderexcLimIEEE1.vucmax", &assign_UnderexcLimIEEE1_vucmax); + assign_map.emplace("cim:UnderexcLimIEEE1.vuimax", &assign_UnderexcLimIEEE1_vuimax); + assign_map.emplace("cim:UnderexcLimIEEE1.vuimin", &assign_UnderexcLimIEEE1_vuimin); + assign_map.emplace("cim:UnderexcLimIEEE1.vulmax", &assign_UnderexcLimIEEE1_vulmax); + assign_map.emplace("cim:UnderexcLimIEEE1.vulmin", &assign_UnderexcLimIEEE1_vulmin); + assign_map.emplace("cim:UnderexcLimIEEE1.vurmax", &assign_UnderexcLimIEEE1_vurmax); } void UnderexcLimIEEE1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/UnderexcLimIEEE1.hpp b/CGMES_2.4.15_16FEB2016/UnderexcLimIEEE1.hpp index 153211aa7..7e60e75df 100644 --- a/CGMES_2.4.15_16FEB2016/UnderexcLimIEEE1.hpp +++ b/CGMES_2.4.15_16FEB2016/UnderexcLimIEEE1.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents the Type UEL1 model which has a circular limit boundary when plotted in terms of machine reactive power vs. real power output. Reference: IEEE UEL1 421.5-2005 Section 10.1. - */ + /** \brief The class represents the Type UEL1 model which has a circular limit boundary when plotted in terms of machine reactive power vs. real power output. Reference: IEEE UEL1 421.5-2005 Section 10.1. */ class UnderexcLimIEEE1 : public UnderexcitationLimiterDynamics { public: @@ -28,21 +26,50 @@ namespace CIMPP UnderexcLimIEEE1(); ~UnderexcLimIEEE1() override; - CIMPP::PU kuc; /* UEL center setting (K). Typical Value = 1.38. Default: nullptr */ - CIMPP::PU kuf; /* UEL excitation system stabilizer gain (K). Typical Value = 3.3. Default: nullptr */ - CIMPP::PU kui; /* UEL integral gain (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU kul; /* UEL proportional gain (K). Typical Value = 100. Default: nullptr */ - CIMPP::PU kur; /* UEL radius setting (K). Typical Value = 1.95. Default: nullptr */ - CIMPP::Seconds tu1; /* UEL lead time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tu2; /* UEL lag time constant (T). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds tu3; /* UEL lead time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tu4; /* UEL lag time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::PU vucmax; /* UEL maximum limit for operating point phasor magnitude (V). Typical Value = 5.8. Default: nullptr */ - CIMPP::PU vuimax; /* UEL integrator output maximum limit (V). Default: nullptr */ - CIMPP::PU vuimin; /* UEL integrator output minimum limit (V). Default: nullptr */ - CIMPP::PU vulmax; /* UEL output maximum limit (V). Typical Value = 18. Default: nullptr */ - CIMPP::PU vulmin; /* UEL output minimum limit (V). Typical Value = -18. Default: nullptr */ - CIMPP::PU vurmax; /* UEL maximum limit for radius phasor magnitude (V). Typical Value = 5.8. Default: nullptr */ + /** \brief UEL center setting (K). Typical Value = 1.38. Default: nullptr */ + CIMPP::PU kuc; + + /** \brief UEL excitation system stabilizer gain (K). Typical Value = 3.3. Default: nullptr */ + CIMPP::PU kuf; + + /** \brief UEL integral gain (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU kui; + + /** \brief UEL proportional gain (K). Typical Value = 100. Default: nullptr */ + CIMPP::PU kul; + + /** \brief UEL radius setting (K). Typical Value = 1.95. Default: nullptr */ + CIMPP::PU kur; + + /** \brief UEL lead time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tu1; + + /** \brief UEL lag time constant (T). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds tu2; + + /** \brief UEL lead time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tu3; + + /** \brief UEL lag time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tu4; + + /** \brief UEL maximum limit for operating point phasor magnitude (V). Typical Value = 5.8. Default: nullptr */ + CIMPP::PU vucmax; + + /** \brief UEL integrator output maximum limit (V). Default: nullptr */ + CIMPP::PU vuimax; + + /** \brief UEL integrator output minimum limit (V). Default: nullptr */ + CIMPP::PU vuimin; + + /** \brief UEL output maximum limit (V). Typical Value = 18. Default: nullptr */ + CIMPP::PU vulmax; + + /** \brief UEL output minimum limit (V). Typical Value = -18. Default: nullptr */ + CIMPP::PU vulmin; + + /** \brief UEL maximum limit for radius phasor magnitude (V). Typical Value = 5.8. Default: nullptr */ + CIMPP::PU vurmax; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/UnderexcLimIEEE2.cpp b/CGMES_2.4.15_16FEB2016/UnderexcLimIEEE2.cpp index 8a0cd3c3a..da9274105 100644 --- a/CGMES_2.4.15_16FEB2016/UnderexcLimIEEE2.cpp +++ b/CGMES_2.4.15_16FEB2016/UnderexcLimIEEE2.cpp @@ -8,51 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -UnderexcLimIEEE2::UnderexcLimIEEE2() {}; -UnderexcLimIEEE2::~UnderexcLimIEEE2() {}; +UnderexcLimIEEE2::UnderexcLimIEEE2() {} +UnderexcLimIEEE2::~UnderexcLimIEEE2() {} static const std::list PossibleProfilesForClass = { @@ -118,532 +78,570 @@ UnderexcLimIEEE2::getPossibleProfilesForAttributes() const return map; } - -bool assign_UnderexcLimIEEE2_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_kfb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_kfb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kfb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_kuf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_kuf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kuf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_kui(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_kui(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kui; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_kul(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_kul(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kul; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_tu1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_tu1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tu1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_tu2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_tu2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tu2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_tu3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_tu3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tu3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_tu4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_tu4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tu4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_tul(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_tul(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tul; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_tup(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_tup(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tup; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_tuq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_tuq(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tuq; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_tuv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_tuv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tuv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_vuimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_vuimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vuimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_vuimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_vuimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vuimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_vulmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_vulmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vulmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_vulmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_vulmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vulmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_UnderexcLimIEEE2_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -657,7 +655,8 @@ bool get_UnderexcLimIEEE2_k1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -671,7 +670,8 @@ bool get_UnderexcLimIEEE2_k2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_kfb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kfb; if (!buffer.str().empty()) @@ -685,7 +685,8 @@ bool get_UnderexcLimIEEE2_kfb(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_kuf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kuf; if (!buffer.str().empty()) @@ -699,7 +700,8 @@ bool get_UnderexcLimIEEE2_kuf(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_kui(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kui; if (!buffer.str().empty()) @@ -713,7 +715,8 @@ bool get_UnderexcLimIEEE2_kui(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_kul(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kul; if (!buffer.str().empty()) @@ -727,7 +730,8 @@ bool get_UnderexcLimIEEE2_kul(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_p0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p0; if (!buffer.str().empty()) @@ -741,7 +745,8 @@ bool get_UnderexcLimIEEE2_p0(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_p1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p1; if (!buffer.str().empty()) @@ -755,7 +760,8 @@ bool get_UnderexcLimIEEE2_p1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_p10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p10; if (!buffer.str().empty()) @@ -769,7 +775,8 @@ bool get_UnderexcLimIEEE2_p10(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_p2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p2; if (!buffer.str().empty()) @@ -783,7 +790,8 @@ bool get_UnderexcLimIEEE2_p2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_p3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p3; if (!buffer.str().empty()) @@ -797,7 +805,8 @@ bool get_UnderexcLimIEEE2_p3(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_p4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p4; if (!buffer.str().empty()) @@ -811,7 +820,8 @@ bool get_UnderexcLimIEEE2_p4(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_p5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p5; if (!buffer.str().empty()) @@ -825,7 +835,8 @@ bool get_UnderexcLimIEEE2_p5(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_p6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p6; if (!buffer.str().empty()) @@ -839,7 +850,8 @@ bool get_UnderexcLimIEEE2_p6(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_p7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p7; if (!buffer.str().empty()) @@ -853,7 +865,8 @@ bool get_UnderexcLimIEEE2_p7(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_p8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p8; if (!buffer.str().empty()) @@ -867,7 +880,8 @@ bool get_UnderexcLimIEEE2_p8(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_p9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p9; if (!buffer.str().empty()) @@ -881,7 +895,8 @@ bool get_UnderexcLimIEEE2_p9(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q0; if (!buffer.str().empty()) @@ -895,7 +910,8 @@ bool get_UnderexcLimIEEE2_q0(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q1; if (!buffer.str().empty()) @@ -909,7 +925,8 @@ bool get_UnderexcLimIEEE2_q1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q10; if (!buffer.str().empty()) @@ -923,7 +940,8 @@ bool get_UnderexcLimIEEE2_q10(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_q2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q2; if (!buffer.str().empty()) @@ -937,7 +955,8 @@ bool get_UnderexcLimIEEE2_q2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q3; if (!buffer.str().empty()) @@ -951,7 +970,8 @@ bool get_UnderexcLimIEEE2_q3(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q4; if (!buffer.str().empty()) @@ -965,7 +985,8 @@ bool get_UnderexcLimIEEE2_q4(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q5; if (!buffer.str().empty()) @@ -979,7 +1000,8 @@ bool get_UnderexcLimIEEE2_q5(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q6; if (!buffer.str().empty()) @@ -993,7 +1015,8 @@ bool get_UnderexcLimIEEE2_q6(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q7; if (!buffer.str().empty()) @@ -1007,7 +1030,8 @@ bool get_UnderexcLimIEEE2_q7(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q8; if (!buffer.str().empty()) @@ -1021,7 +1045,8 @@ bool get_UnderexcLimIEEE2_q8(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q9; if (!buffer.str().empty()) @@ -1035,7 +1060,8 @@ bool get_UnderexcLimIEEE2_q9(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_tu1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tu1; if (!buffer.str().empty()) @@ -1049,7 +1075,8 @@ bool get_UnderexcLimIEEE2_tu1(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_tu2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tu2; if (!buffer.str().empty()) @@ -1063,7 +1090,8 @@ bool get_UnderexcLimIEEE2_tu2(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_tu3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tu3; if (!buffer.str().empty()) @@ -1077,7 +1105,8 @@ bool get_UnderexcLimIEEE2_tu3(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_tu4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tu4; if (!buffer.str().empty()) @@ -1091,7 +1120,8 @@ bool get_UnderexcLimIEEE2_tu4(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_tul(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tul; if (!buffer.str().empty()) @@ -1105,7 +1135,8 @@ bool get_UnderexcLimIEEE2_tul(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_tup(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tup; if (!buffer.str().empty()) @@ -1119,7 +1150,8 @@ bool get_UnderexcLimIEEE2_tup(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_tuq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tuq; if (!buffer.str().empty()) @@ -1133,7 +1165,8 @@ bool get_UnderexcLimIEEE2_tuq(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_tuv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tuv; if (!buffer.str().empty()) @@ -1147,7 +1180,8 @@ bool get_UnderexcLimIEEE2_tuv(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_vuimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vuimax; if (!buffer.str().empty()) @@ -1161,7 +1195,8 @@ bool get_UnderexcLimIEEE2_vuimax(const BaseClass* BaseClass_ptr1, std::stringstr bool get_UnderexcLimIEEE2_vuimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vuimin; if (!buffer.str().empty()) @@ -1175,7 +1210,8 @@ bool get_UnderexcLimIEEE2_vuimin(const BaseClass* BaseClass_ptr1, std::stringstr bool get_UnderexcLimIEEE2_vulmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vulmax; if (!buffer.str().empty()) @@ -1189,7 +1225,8 @@ bool get_UnderexcLimIEEE2_vulmax(const BaseClass* BaseClass_ptr1, std::stringstr bool get_UnderexcLimIEEE2_vulmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vulmin; if (!buffer.str().empty()) @@ -1201,8 +1238,6 @@ bool get_UnderexcLimIEEE2_vulmin(const BaseClass* BaseClass_ptr1, std::stringstr return false; } - - const char UnderexcLimIEEE2::debugName[] = "UnderexcLimIEEE2"; const char* UnderexcLimIEEE2::debugString() const { @@ -1211,51 +1246,51 @@ const char* UnderexcLimIEEE2::debugString() const void UnderexcLimIEEE2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2"), &UnderexcLimIEEE2_factory)); + factory_map.emplace("cim:UnderexcLimIEEE2", &UnderexcLimIEEE2_factory); } void UnderexcLimIEEE2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.k1"), &assign_UnderexcLimIEEE2_k1)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.k2"), &assign_UnderexcLimIEEE2_k2)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.kfb"), &assign_UnderexcLimIEEE2_kfb)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.kuf"), &assign_UnderexcLimIEEE2_kuf)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.kui"), &assign_UnderexcLimIEEE2_kui)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.kul"), &assign_UnderexcLimIEEE2_kul)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p0"), &assign_UnderexcLimIEEE2_p0)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p1"), &assign_UnderexcLimIEEE2_p1)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p10"), &assign_UnderexcLimIEEE2_p10)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p2"), &assign_UnderexcLimIEEE2_p2)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p3"), &assign_UnderexcLimIEEE2_p3)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p4"), &assign_UnderexcLimIEEE2_p4)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p5"), &assign_UnderexcLimIEEE2_p5)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p6"), &assign_UnderexcLimIEEE2_p6)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p7"), &assign_UnderexcLimIEEE2_p7)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p8"), &assign_UnderexcLimIEEE2_p8)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p9"), &assign_UnderexcLimIEEE2_p9)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q0"), &assign_UnderexcLimIEEE2_q0)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q1"), &assign_UnderexcLimIEEE2_q1)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q10"), &assign_UnderexcLimIEEE2_q10)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q2"), &assign_UnderexcLimIEEE2_q2)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q3"), &assign_UnderexcLimIEEE2_q3)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q4"), &assign_UnderexcLimIEEE2_q4)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q5"), &assign_UnderexcLimIEEE2_q5)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q6"), &assign_UnderexcLimIEEE2_q6)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q7"), &assign_UnderexcLimIEEE2_q7)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q8"), &assign_UnderexcLimIEEE2_q8)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q9"), &assign_UnderexcLimIEEE2_q9)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.tu1"), &assign_UnderexcLimIEEE2_tu1)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.tu2"), &assign_UnderexcLimIEEE2_tu2)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.tu3"), &assign_UnderexcLimIEEE2_tu3)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.tu4"), &assign_UnderexcLimIEEE2_tu4)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.tul"), &assign_UnderexcLimIEEE2_tul)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.tup"), &assign_UnderexcLimIEEE2_tup)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.tuq"), &assign_UnderexcLimIEEE2_tuq)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.tuv"), &assign_UnderexcLimIEEE2_tuv)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.vuimax"), &assign_UnderexcLimIEEE2_vuimax)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.vuimin"), &assign_UnderexcLimIEEE2_vuimin)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.vulmax"), &assign_UnderexcLimIEEE2_vulmax)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.vulmin"), &assign_UnderexcLimIEEE2_vulmin)); + assign_map.emplace("cim:UnderexcLimIEEE2.k1", &assign_UnderexcLimIEEE2_k1); + assign_map.emplace("cim:UnderexcLimIEEE2.k2", &assign_UnderexcLimIEEE2_k2); + assign_map.emplace("cim:UnderexcLimIEEE2.kfb", &assign_UnderexcLimIEEE2_kfb); + assign_map.emplace("cim:UnderexcLimIEEE2.kuf", &assign_UnderexcLimIEEE2_kuf); + assign_map.emplace("cim:UnderexcLimIEEE2.kui", &assign_UnderexcLimIEEE2_kui); + assign_map.emplace("cim:UnderexcLimIEEE2.kul", &assign_UnderexcLimIEEE2_kul); + assign_map.emplace("cim:UnderexcLimIEEE2.p0", &assign_UnderexcLimIEEE2_p0); + assign_map.emplace("cim:UnderexcLimIEEE2.p1", &assign_UnderexcLimIEEE2_p1); + assign_map.emplace("cim:UnderexcLimIEEE2.p10", &assign_UnderexcLimIEEE2_p10); + assign_map.emplace("cim:UnderexcLimIEEE2.p2", &assign_UnderexcLimIEEE2_p2); + assign_map.emplace("cim:UnderexcLimIEEE2.p3", &assign_UnderexcLimIEEE2_p3); + assign_map.emplace("cim:UnderexcLimIEEE2.p4", &assign_UnderexcLimIEEE2_p4); + assign_map.emplace("cim:UnderexcLimIEEE2.p5", &assign_UnderexcLimIEEE2_p5); + assign_map.emplace("cim:UnderexcLimIEEE2.p6", &assign_UnderexcLimIEEE2_p6); + assign_map.emplace("cim:UnderexcLimIEEE2.p7", &assign_UnderexcLimIEEE2_p7); + assign_map.emplace("cim:UnderexcLimIEEE2.p8", &assign_UnderexcLimIEEE2_p8); + assign_map.emplace("cim:UnderexcLimIEEE2.p9", &assign_UnderexcLimIEEE2_p9); + assign_map.emplace("cim:UnderexcLimIEEE2.q0", &assign_UnderexcLimIEEE2_q0); + assign_map.emplace("cim:UnderexcLimIEEE2.q1", &assign_UnderexcLimIEEE2_q1); + assign_map.emplace("cim:UnderexcLimIEEE2.q10", &assign_UnderexcLimIEEE2_q10); + assign_map.emplace("cim:UnderexcLimIEEE2.q2", &assign_UnderexcLimIEEE2_q2); + assign_map.emplace("cim:UnderexcLimIEEE2.q3", &assign_UnderexcLimIEEE2_q3); + assign_map.emplace("cim:UnderexcLimIEEE2.q4", &assign_UnderexcLimIEEE2_q4); + assign_map.emplace("cim:UnderexcLimIEEE2.q5", &assign_UnderexcLimIEEE2_q5); + assign_map.emplace("cim:UnderexcLimIEEE2.q6", &assign_UnderexcLimIEEE2_q6); + assign_map.emplace("cim:UnderexcLimIEEE2.q7", &assign_UnderexcLimIEEE2_q7); + assign_map.emplace("cim:UnderexcLimIEEE2.q8", &assign_UnderexcLimIEEE2_q8); + assign_map.emplace("cim:UnderexcLimIEEE2.q9", &assign_UnderexcLimIEEE2_q9); + assign_map.emplace("cim:UnderexcLimIEEE2.tu1", &assign_UnderexcLimIEEE2_tu1); + assign_map.emplace("cim:UnderexcLimIEEE2.tu2", &assign_UnderexcLimIEEE2_tu2); + assign_map.emplace("cim:UnderexcLimIEEE2.tu3", &assign_UnderexcLimIEEE2_tu3); + assign_map.emplace("cim:UnderexcLimIEEE2.tu4", &assign_UnderexcLimIEEE2_tu4); + assign_map.emplace("cim:UnderexcLimIEEE2.tul", &assign_UnderexcLimIEEE2_tul); + assign_map.emplace("cim:UnderexcLimIEEE2.tup", &assign_UnderexcLimIEEE2_tup); + assign_map.emplace("cim:UnderexcLimIEEE2.tuq", &assign_UnderexcLimIEEE2_tuq); + assign_map.emplace("cim:UnderexcLimIEEE2.tuv", &assign_UnderexcLimIEEE2_tuv); + assign_map.emplace("cim:UnderexcLimIEEE2.vuimax", &assign_UnderexcLimIEEE2_vuimax); + assign_map.emplace("cim:UnderexcLimIEEE2.vuimin", &assign_UnderexcLimIEEE2_vuimin); + assign_map.emplace("cim:UnderexcLimIEEE2.vulmax", &assign_UnderexcLimIEEE2_vulmax); + assign_map.emplace("cim:UnderexcLimIEEE2.vulmin", &assign_UnderexcLimIEEE2_vulmin); } void UnderexcLimIEEE2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/UnderexcLimIEEE2.hpp b/CGMES_2.4.15_16FEB2016/UnderexcLimIEEE2.hpp index db393d18a..1a95ced19 100644 --- a/CGMES_2.4.15_16FEB2016/UnderexcLimIEEE2.hpp +++ b/CGMES_2.4.15_16FEB2016/UnderexcLimIEEE2.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents the Type UEL2 which has either a straight-line or multi-segment characteristic when plotted in terms of machine reactive power output vs. real power output. Reference: IEEE UEL2 421.5-2005 Section 10.2. (Limit characteristic lookup table shown in Figure 10.4 (p 32) of the standard). - */ + /** \brief The class represents the Type UEL2 which has either a straight-line or multi-segment characteristic when plotted in terms of machine reactive power output vs. real power output. Reference: IEEE UEL2 421.5-2005 Section 10.2. (Limit characteristic lookup table shown in Figure 10.4 (p 32) of the standard). */ class UnderexcLimIEEE2 : public UnderexcitationLimiterDynamics { public: @@ -29,46 +27,125 @@ namespace CIMPP UnderexcLimIEEE2(); ~UnderexcLimIEEE2() override; - CIMPP::Simple_Float k1; /* UEL terminal voltage exponent applied to real power input to UEL limit look-up table (k1). Typical Value = 2. Default: nullptr */ - CIMPP::Simple_Float k2; /* UEL terminal voltage exponent applied to reactive power output from UEL limit look-up table (k2). Typical Value = 2. Default: nullptr */ - CIMPP::PU kfb; /* Gain associated with optional integrator feedback input signal to UEL (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU kuf; /* UEL excitation system stabilizer gain (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU kui; /* UEL integral gain (K). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU kul; /* UEL proportional gain (K). Typical Value = 0.8. Default: nullptr */ - CIMPP::PU p0; /* Real power values for endpoints (P). Typical Value = 0. Default: nullptr */ - CIMPP::PU p1; /* Real power values for endpoints (P). Typical Value = 0.3. Default: nullptr */ - CIMPP::PU p10; /* Real power values for endpoints (P). Default: nullptr */ - CIMPP::PU p2; /* Real power values for endpoints (P). Typical Value = 0.6. Default: nullptr */ - CIMPP::PU p3; /* Real power values for endpoints (P). Typical Value = 0.9. Default: nullptr */ - CIMPP::PU p4; /* Real power values for endpoints (P). Typical Value = 1.02. Default: nullptr */ - CIMPP::PU p5; /* Real power values for endpoints (P). Default: nullptr */ - CIMPP::PU p6; /* Real power values for endpoints (P). Default: nullptr */ - CIMPP::PU p7; /* Real power values for endpoints (P). Default: nullptr */ - CIMPP::PU p8; /* Real power values for endpoints (P). Default: nullptr */ - CIMPP::PU p9; /* Real power values for endpoints (P). Default: nullptr */ - CIMPP::PU q0; /* Reactive power values for endpoints (Q). Typical Value = -0.31. Default: nullptr */ - CIMPP::PU q1; /* Reactive power values for endpoints (Q). Typical Value = -0.31. Default: nullptr */ - CIMPP::PU q10; /* Reactive power values for endpoints (Q). Default: nullptr */ - CIMPP::PU q2; /* Reactive power values for endpoints (Q). Typical Value = -0.28. Default: nullptr */ - CIMPP::PU q3; /* Reactive power values for endpoints (Q). Typical Value = -0.21. Default: nullptr */ - CIMPP::PU q4; /* Reactive power values for endpoints (Q). Typical Value = 0. Default: nullptr */ - CIMPP::PU q5; /* Reactive power values for endpoints (Q). Default: nullptr */ - CIMPP::PU q6; /* Reactive power values for endpoints (Q). Default: nullptr */ - CIMPP::PU q7; /* Reactive power values for endpoints (Q). Default: nullptr */ - CIMPP::PU q8; /* Reactive power values for endpoints (Q). Default: nullptr */ - CIMPP::PU q9; /* Reactive power values for endpoints (Q). Default: nullptr */ - CIMPP::Seconds tu1; /* UEL lead time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tu2; /* UEL lag time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tu3; /* UEL lead time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tu4; /* UEL lag time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tul; /* Time constant associated with optional integrator feedback input signal to UEL (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tup; /* Real power filter time constant (T). Typical Value = 5. Default: nullptr */ - CIMPP::Seconds tuq; /* Reactive power filter time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tuv; /* Voltage filter time constant (T). Typical Value = 5. Default: nullptr */ - CIMPP::PU vuimax; /* UEL integrator output maximum limit (V). Typical Value = 0.25. Default: nullptr */ - CIMPP::PU vuimin; /* UEL integrator output minimum limit (V). Typical Value = 0. Default: nullptr */ - CIMPP::PU vulmax; /* UEL output maximum limit (V). Typical Value = 0.25. Default: nullptr */ - CIMPP::PU vulmin; /* UEL output minimum limit (V). Typical Value = 0. Default: nullptr */ + /** \brief UEL terminal voltage exponent applied to real power input to UEL limit look-up table (k1). Typical Value = 2. Default: nullptr */ + CIMPP::Simple_Float k1; + + /** \brief UEL terminal voltage exponent applied to reactive power output from UEL limit look-up table (k2). Typical Value = 2. Default: nullptr */ + CIMPP::Simple_Float k2; + + /** \brief Gain associated with optional integrator feedback input signal to UEL (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU kfb; + + /** \brief UEL excitation system stabilizer gain (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU kuf; + + /** \brief UEL integral gain (K). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU kui; + + /** \brief UEL proportional gain (K). Typical Value = 0.8. Default: nullptr */ + CIMPP::PU kul; + + /** \brief Real power values for endpoints (P). Typical Value = 0. Default: nullptr */ + CIMPP::PU p0; + + /** \brief Real power values for endpoints (P). Typical Value = 0.3. Default: nullptr */ + CIMPP::PU p1; + + /** \brief Real power values for endpoints (P). Default: nullptr */ + CIMPP::PU p10; + + /** \brief Real power values for endpoints (P). Typical Value = 0.6. Default: nullptr */ + CIMPP::PU p2; + + /** \brief Real power values for endpoints (P). Typical Value = 0.9. Default: nullptr */ + CIMPP::PU p3; + + /** \brief Real power values for endpoints (P). Typical Value = 1.02. Default: nullptr */ + CIMPP::PU p4; + + /** \brief Real power values for endpoints (P). Default: nullptr */ + CIMPP::PU p5; + + /** \brief Real power values for endpoints (P). Default: nullptr */ + CIMPP::PU p6; + + /** \brief Real power values for endpoints (P). Default: nullptr */ + CIMPP::PU p7; + + /** \brief Real power values for endpoints (P). Default: nullptr */ + CIMPP::PU p8; + + /** \brief Real power values for endpoints (P). Default: nullptr */ + CIMPP::PU p9; + + /** \brief Reactive power values for endpoints (Q). Typical Value = -0.31. Default: nullptr */ + CIMPP::PU q0; + + /** \brief Reactive power values for endpoints (Q). Typical Value = -0.31. Default: nullptr */ + CIMPP::PU q1; + + /** \brief Reactive power values for endpoints (Q). Default: nullptr */ + CIMPP::PU q10; + + /** \brief Reactive power values for endpoints (Q). Typical Value = -0.28. Default: nullptr */ + CIMPP::PU q2; + + /** \brief Reactive power values for endpoints (Q). Typical Value = -0.21. Default: nullptr */ + CIMPP::PU q3; + + /** \brief Reactive power values for endpoints (Q). Typical Value = 0. Default: nullptr */ + CIMPP::PU q4; + + /** \brief Reactive power values for endpoints (Q). Default: nullptr */ + CIMPP::PU q5; + + /** \brief Reactive power values for endpoints (Q). Default: nullptr */ + CIMPP::PU q6; + + /** \brief Reactive power values for endpoints (Q). Default: nullptr */ + CIMPP::PU q7; + + /** \brief Reactive power values for endpoints (Q). Default: nullptr */ + CIMPP::PU q8; + + /** \brief Reactive power values for endpoints (Q). Default: nullptr */ + CIMPP::PU q9; + + /** \brief UEL lead time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tu1; + + /** \brief UEL lag time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tu2; + + /** \brief UEL lead time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tu3; + + /** \brief UEL lag time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tu4; + + /** \brief Time constant associated with optional integrator feedback input signal to UEL (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tul; + + /** \brief Real power filter time constant (T). Typical Value = 5. Default: nullptr */ + CIMPP::Seconds tup; + + /** \brief Reactive power filter time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tuq; + + /** \brief Voltage filter time constant (T). Typical Value = 5. Default: nullptr */ + CIMPP::Seconds tuv; + + /** \brief UEL integrator output maximum limit (V). Typical Value = 0.25. Default: nullptr */ + CIMPP::PU vuimax; + + /** \brief UEL integrator output minimum limit (V). Typical Value = 0. Default: nullptr */ + CIMPP::PU vuimin; + + /** \brief UEL output maximum limit (V). Typical Value = 0.25. Default: nullptr */ + CIMPP::PU vulmax; + + /** \brief UEL output minimum limit (V). Typical Value = 0. Default: nullptr */ + CIMPP::PU vulmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/UnderexcLimX1.cpp b/CGMES_2.4.15_16FEB2016/UnderexcLimX1.cpp index cba09ede6..a14d1ce69 100644 --- a/CGMES_2.4.15_16FEB2016/UnderexcLimX1.cpp +++ b/CGMES_2.4.15_16FEB2016/UnderexcLimX1.cpp @@ -8,17 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -UnderexcLimX1::UnderexcLimX1() {}; -UnderexcLimX1::~UnderexcLimX1() {}; +UnderexcLimX1::UnderexcLimX1() {} +UnderexcLimX1::~UnderexcLimX1() {} static const std::list PossibleProfilesForClass = { @@ -50,90 +44,94 @@ UnderexcLimX1::getPossibleProfilesForAttributes() const return map; } - -bool assign_UnderexcLimX1_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX1_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX1_kf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX1_kf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX1_km(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX1_km(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->km; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX1_melmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX1_melmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->melmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX1_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX1_tf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX1_tm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX1_tm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_UnderexcLimX1_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -147,7 +145,8 @@ bool get_UnderexcLimX1_k(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_UnderexcLimX1_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf2; if (!buffer.str().empty()) @@ -161,7 +160,8 @@ bool get_UnderexcLimX1_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_UnderexcLimX1_km(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->km; if (!buffer.str().empty()) @@ -175,7 +175,8 @@ bool get_UnderexcLimX1_km(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_UnderexcLimX1_melmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->melmax; if (!buffer.str().empty()) @@ -189,7 +190,8 @@ bool get_UnderexcLimX1_melmax(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimX1_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf2; if (!buffer.str().empty()) @@ -203,7 +205,8 @@ bool get_UnderexcLimX1_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_UnderexcLimX1_tm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tm; if (!buffer.str().empty()) @@ -215,8 +218,6 @@ bool get_UnderexcLimX1_tm(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char UnderexcLimX1::debugName[] = "UnderexcLimX1"; const char* UnderexcLimX1::debugString() const { @@ -225,17 +226,17 @@ const char* UnderexcLimX1::debugString() const void UnderexcLimX1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:UnderexcLimX1"), &UnderexcLimX1_factory)); + factory_map.emplace("cim:UnderexcLimX1", &UnderexcLimX1_factory); } void UnderexcLimX1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX1.k"), &assign_UnderexcLimX1_k)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX1.kf2"), &assign_UnderexcLimX1_kf2)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX1.km"), &assign_UnderexcLimX1_km)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX1.melmax"), &assign_UnderexcLimX1_melmax)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX1.tf2"), &assign_UnderexcLimX1_tf2)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX1.tm"), &assign_UnderexcLimX1_tm)); + assign_map.emplace("cim:UnderexcLimX1.k", &assign_UnderexcLimX1_k); + assign_map.emplace("cim:UnderexcLimX1.kf2", &assign_UnderexcLimX1_kf2); + assign_map.emplace("cim:UnderexcLimX1.km", &assign_UnderexcLimX1_km); + assign_map.emplace("cim:UnderexcLimX1.melmax", &assign_UnderexcLimX1_melmax); + assign_map.emplace("cim:UnderexcLimX1.tf2", &assign_UnderexcLimX1_tf2); + assign_map.emplace("cim:UnderexcLimX1.tm", &assign_UnderexcLimX1_tm); } void UnderexcLimX1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/UnderexcLimX1.hpp b/CGMES_2.4.15_16FEB2016/UnderexcLimX1.hpp index 44648be8c..cd15dda37 100644 --- a/CGMES_2.4.15_16FEB2016/UnderexcLimX1.hpp +++ b/CGMES_2.4.15_16FEB2016/UnderexcLimX1.hpp @@ -25,12 +25,23 @@ namespace CIMPP UnderexcLimX1(); ~UnderexcLimX1() override; - CIMPP::PU k; /* Minimum excitation limit slope (K) (>0). Default: nullptr */ - CIMPP::PU kf2; /* Differential gain (Kf2). Default: nullptr */ - CIMPP::PU km; /* Minimum excitation limit gain (Km). Default: nullptr */ - CIMPP::PU melmax; /* Minimum excitation limit value (MELMAX). Default: nullptr */ - CIMPP::Seconds tf2; /* Differential time constant (Tf2) (>0). Default: nullptr */ - CIMPP::Seconds tm; /* Minimum excitation limit time constant (Tm). Default: nullptr */ + /** \brief Minimum excitation limit slope (K) (>0). Default: nullptr */ + CIMPP::PU k; + + /** \brief Differential gain (Kf2). Default: nullptr */ + CIMPP::PU kf2; + + /** \brief Minimum excitation limit gain (Km). Default: nullptr */ + CIMPP::PU km; + + /** \brief Minimum excitation limit value (MELMAX). Default: nullptr */ + CIMPP::PU melmax; + + /** \brief Differential time constant (Tf2) (>0). Default: nullptr */ + CIMPP::Seconds tf2; + + /** \brief Minimum excitation limit time constant (Tm). Default: nullptr */ + CIMPP::Seconds tm; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/UnderexcLimX2.cpp b/CGMES_2.4.15_16FEB2016/UnderexcLimX2.cpp index 31ded8424..64bf7f3c5 100644 --- a/CGMES_2.4.15_16FEB2016/UnderexcLimX2.cpp +++ b/CGMES_2.4.15_16FEB2016/UnderexcLimX2.cpp @@ -8,18 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -UnderexcLimX2::UnderexcLimX2() {}; -UnderexcLimX2::~UnderexcLimX2() {}; +UnderexcLimX2::UnderexcLimX2() {} +UnderexcLimX2::~UnderexcLimX2() {} static const std::list PossibleProfilesForClass = { @@ -52,103 +45,108 @@ UnderexcLimX2::getPossibleProfilesForAttributes() const return map; } - -bool assign_UnderexcLimX2_kf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX2_kf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX2_km(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX2_km(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->km; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX2_melmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX2_melmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->melmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX2_qo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX2_qo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX2_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX2_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX2_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX2_tf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX2_tm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX2_tm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_UnderexcLimX2_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf2; if (!buffer.str().empty()) @@ -162,7 +160,8 @@ bool get_UnderexcLimX2_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_UnderexcLimX2_km(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->km; if (!buffer.str().empty()) @@ -176,7 +175,8 @@ bool get_UnderexcLimX2_km(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_UnderexcLimX2_melmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->melmax; if (!buffer.str().empty()) @@ -190,7 +190,8 @@ bool get_UnderexcLimX2_melmax(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimX2_qo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qo; if (!buffer.str().empty()) @@ -204,7 +205,8 @@ bool get_UnderexcLimX2_qo(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_UnderexcLimX2_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -218,7 +220,8 @@ bool get_UnderexcLimX2_r(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_UnderexcLimX2_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf2; if (!buffer.str().empty()) @@ -232,7 +235,8 @@ bool get_UnderexcLimX2_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_UnderexcLimX2_tm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tm; if (!buffer.str().empty()) @@ -244,8 +248,6 @@ bool get_UnderexcLimX2_tm(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char UnderexcLimX2::debugName[] = "UnderexcLimX2"; const char* UnderexcLimX2::debugString() const { @@ -254,18 +256,18 @@ const char* UnderexcLimX2::debugString() const void UnderexcLimX2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:UnderexcLimX2"), &UnderexcLimX2_factory)); + factory_map.emplace("cim:UnderexcLimX2", &UnderexcLimX2_factory); } void UnderexcLimX2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX2.kf2"), &assign_UnderexcLimX2_kf2)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX2.km"), &assign_UnderexcLimX2_km)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX2.melmax"), &assign_UnderexcLimX2_melmax)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX2.qo"), &assign_UnderexcLimX2_qo)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX2.r"), &assign_UnderexcLimX2_r)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX2.tf2"), &assign_UnderexcLimX2_tf2)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX2.tm"), &assign_UnderexcLimX2_tm)); + assign_map.emplace("cim:UnderexcLimX2.kf2", &assign_UnderexcLimX2_kf2); + assign_map.emplace("cim:UnderexcLimX2.km", &assign_UnderexcLimX2_km); + assign_map.emplace("cim:UnderexcLimX2.melmax", &assign_UnderexcLimX2_melmax); + assign_map.emplace("cim:UnderexcLimX2.qo", &assign_UnderexcLimX2_qo); + assign_map.emplace("cim:UnderexcLimX2.r", &assign_UnderexcLimX2_r); + assign_map.emplace("cim:UnderexcLimX2.tf2", &assign_UnderexcLimX2_tf2); + assign_map.emplace("cim:UnderexcLimX2.tm", &assign_UnderexcLimX2_tm); } void UnderexcLimX2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/UnderexcLimX2.hpp b/CGMES_2.4.15_16FEB2016/UnderexcLimX2.hpp index f1f3ce17b..43f2bfa49 100644 --- a/CGMES_2.4.15_16FEB2016/UnderexcLimX2.hpp +++ b/CGMES_2.4.15_16FEB2016/UnderexcLimX2.hpp @@ -25,13 +25,26 @@ namespace CIMPP UnderexcLimX2(); ~UnderexcLimX2() override; - CIMPP::PU kf2; /* Differential gain (Kf2). Default: nullptr */ - CIMPP::PU km; /* Minimum excitation limit gain (Km). Default: nullptr */ - CIMPP::PU melmax; /* Minimum excitation limit value (MELMAX). Default: nullptr */ - CIMPP::PU qo; /* Excitation center setting (Qo). Default: nullptr */ - CIMPP::PU r; /* Excitation radius (R). Default: nullptr */ - CIMPP::Seconds tf2; /* Differential time constant (Tf2) (>0). Default: nullptr */ - CIMPP::Seconds tm; /* Minimum excitation limit time constant (Tm). Default: nullptr */ + /** \brief Differential gain (Kf2). Default: nullptr */ + CIMPP::PU kf2; + + /** \brief Minimum excitation limit gain (Km). Default: nullptr */ + CIMPP::PU km; + + /** \brief Minimum excitation limit value (MELMAX). Default: nullptr */ + CIMPP::PU melmax; + + /** \brief Excitation center setting (Qo). Default: nullptr */ + CIMPP::PU qo; + + /** \brief Excitation radius (R). Default: nullptr */ + CIMPP::PU r; + + /** \brief Differential time constant (Tf2) (>0). Default: nullptr */ + CIMPP::Seconds tf2; + + /** \brief Minimum excitation limit time constant (Tm). Default: nullptr */ + CIMPP::Seconds tm; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/UnderexcitationLimiterDynamics.cpp b/CGMES_2.4.15_16FEB2016/UnderexcitationLimiterDynamics.cpp index 9d024e743..18ef7b3ec 100644 --- a/CGMES_2.4.15_16FEB2016/UnderexcitationLimiterDynamics.cpp +++ b/CGMES_2.4.15_16FEB2016/UnderexcitationLimiterDynamics.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -UnderexcitationLimiterDynamics::UnderexcitationLimiterDynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr) {}; -UnderexcitationLimiterDynamics::~UnderexcitationLimiterDynamics() {}; +UnderexcitationLimiterDynamics::UnderexcitationLimiterDynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr) {} +UnderexcitationLimiterDynamics::~UnderexcitationLimiterDynamics() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ UnderexcitationLimiterDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_ExcitationSystemDynamics_UnderexcitationLimiterDynamics(BaseClass*, BaseClass*); bool assign_UnderexcitationLimiterDynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_UnderexcitationLimiterDynamics_ExcitationSystemDynamics(BaseClass* B } return false; } + bool assign_RemoteInputSignal_UnderexcitationLimiterDynamics(BaseClass*, BaseClass*); bool assign_UnderexcitationLimiterDynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_UnderexcitationLimiterDynamics_RemoteInputSignal(BaseClass* BaseClas return false; } - bool get_UnderexcitationLimiterDynamics_ExcitationSystemDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const UnderexcitationLimiterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcitationLimiterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ExcitationSystemDynamics != 0) { @@ -100,7 +99,7 @@ const char* UnderexcitationLimiterDynamics::debugString() const void UnderexcitationLimiterDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:UnderexcitationLimiterDynamics"), &UnderexcitationLimiterDynamics_factory)); + factory_map.emplace("cim:UnderexcitationLimiterDynamics", &UnderexcitationLimiterDynamics_factory); } void UnderexcitationLimiterDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -109,8 +108,8 @@ void UnderexcitationLimiterDynamics::addPrimitiveAssignFnsToMap(std::unordered_m void UnderexcitationLimiterDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:UnderexcitationLimiterDynamics.ExcitationSystemDynamics"), &assign_UnderexcitationLimiterDynamics_ExcitationSystemDynamics)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcitationLimiterDynamics.RemoteInputSignal"), &assign_UnderexcitationLimiterDynamics_RemoteInputSignal)); + assign_map.emplace("cim:UnderexcitationLimiterDynamics.ExcitationSystemDynamics", &assign_UnderexcitationLimiterDynamics_ExcitationSystemDynamics); + assign_map.emplace("cim:UnderexcitationLimiterDynamics.RemoteInputSignal", &assign_UnderexcitationLimiterDynamics_RemoteInputSignal); } void UnderexcitationLimiterDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/UnderexcitationLimiterDynamics.hpp b/CGMES_2.4.15_16FEB2016/UnderexcitationLimiterDynamics.hpp index cbb670151..3836bf4cc 100644 --- a/CGMES_2.4.15_16FEB2016/UnderexcitationLimiterDynamics.hpp +++ b/CGMES_2.4.15_16FEB2016/UnderexcitationLimiterDynamics.hpp @@ -18,9 +18,7 @@ namespace CIMPP class ExcitationSystemDynamics; class RemoteInputSignal; - /* - Underexcitation limiter function block whose behaviour is described by reference to a standard model - */ + /** \brief Underexcitation limiter function block whose behaviour is described by reference to a standard model */ class UnderexcitationLimiterDynamics : public DynamicsFunctionBlock { public: @@ -28,8 +26,11 @@ namespace CIMPP UnderexcitationLimiterDynamics(); ~UnderexcitationLimiterDynamics() override; - CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; /* Excitation system model with which this underexcitation limiter model is associated. Default: 0 */ - CIMPP::RemoteInputSignal* RemoteInputSignal; /* Remote input signal used by this underexcitation limiter model. Default: 0 */ + /** \brief Excitation system model with which this underexcitation limiter model is associated. Default: 0 */ + CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; + + /** \brief Remote input signal used by this underexcitation limiter model. Default: 0 */ + CIMPP::RemoteInputSignal* RemoteInputSignal; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/UnderexcitationLimiterUserDefined.cpp b/CGMES_2.4.15_16FEB2016/UnderexcitationLimiterUserDefined.cpp index 87727bcc9..fb5ad61c2 100644 --- a/CGMES_2.4.15_16FEB2016/UnderexcitationLimiterUserDefined.cpp +++ b/CGMES_2.4.15_16FEB2016/UnderexcitationLimiterUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -UnderexcitationLimiterUserDefined::UnderexcitationLimiterUserDefined() {}; -UnderexcitationLimiterUserDefined::~UnderexcitationLimiterUserDefined() {}; +UnderexcitationLimiterUserDefined::UnderexcitationLimiterUserDefined() {} +UnderexcitationLimiterUserDefined::~UnderexcitationLimiterUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ UnderexcitationLimiterUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_UnderexcitationLimiterUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (UnderexcitationLimiterUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_UnderexcitationLimiterUserDefined(BaseClass*, BaseClass*); bool assign_UnderexcitationLimiterUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_UnderexcitationLimiterUserDefined_ProprietaryParameterDynamics(BaseC return false; } +bool assign_UnderexcitationLimiterUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + UnderexcitationLimiterUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_UnderexcitationLimiterUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcitationLimiterUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcitationLimiterUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_UnderexcitationLimiterUserDefined_proprietary(const BaseClass* BaseClas return false; } - - const char UnderexcitationLimiterUserDefined::debugName[] = "UnderexcitationLimiterUserDefined"; const char* UnderexcitationLimiterUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* UnderexcitationLimiterUserDefined::debugString() const void UnderexcitationLimiterUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:UnderexcitationLimiterUserDefined"), &UnderexcitationLimiterUserDefined_factory)); + factory_map.emplace("cim:UnderexcitationLimiterUserDefined", &UnderexcitationLimiterUserDefined_factory); } void UnderexcitationLimiterUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:UnderexcitationLimiterUserDefined.proprietary"), &assign_UnderexcitationLimiterUserDefined_proprietary)); + assign_map.emplace("cim:UnderexcitationLimiterUserDefined.proprietary", &assign_UnderexcitationLimiterUserDefined_proprietary); } void UnderexcitationLimiterUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:UnderexcitationLimiterUserDefined.ProprietaryParameterDynamics"), &assign_UnderexcitationLimiterUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:UnderexcitationLimiterUserDefined.ProprietaryParameterDynamics", &assign_UnderexcitationLimiterUserDefined_ProprietaryParameterDynamics); } void UnderexcitationLimiterUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/UnderexcitationLimiterUserDefined.hpp b/CGMES_2.4.15_16FEB2016/UnderexcitationLimiterUserDefined.hpp index 4e7c237b2..5971269bc 100644 --- a/CGMES_2.4.15_16FEB2016/UnderexcitationLimiterUserDefined.hpp +++ b/CGMES_2.4.15_16FEB2016/UnderexcitationLimiterUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Underexcitation limiter function block whose dynamic behaviour is described by - */ + /** \brief Underexcitation limiter function block whose dynamic behaviour is described by */ class UnderexcitationLimiterUserDefined : public UnderexcitationLimiterDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP UnderexcitationLimiterUserDefined(); ~UnderexcitationLimiterUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/UnitMultiplier.cpp b/CGMES_2.4.15_16FEB2016/UnitMultiplier.cpp index 51e68a621..8bfba0220 100644 --- a/CGMES_2.4.15_16FEB2016/UnitMultiplier.cpp +++ b/CGMES_2.4.15_16FEB2016/UnitMultiplier.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "UnitMultiplier") + if (EnumSymbol.substr(0, pos) != "UnitMultiplier") { lop.setstate(std::ios::failbit); return lop; @@ -50,57 +50,57 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "p") + if (EnumSymbol == "p") { rop = UnitMultiplier::p; return lop; } - if(EnumSymbol == "n") + if (EnumSymbol == "n") { rop = UnitMultiplier::n; return lop; } - if(EnumSymbol == "micro") + if (EnumSymbol == "micro") { rop = UnitMultiplier::micro; return lop; } - if(EnumSymbol == "m") + if (EnumSymbol == "m") { rop = UnitMultiplier::m; return lop; } - if(EnumSymbol == "c") + if (EnumSymbol == "c") { rop = UnitMultiplier::c; return lop; } - if(EnumSymbol == "d") + if (EnumSymbol == "d") { rop = UnitMultiplier::d; return lop; } - if(EnumSymbol == "k") + if (EnumSymbol == "k") { rop = UnitMultiplier::k; return lop; } - if(EnumSymbol == "M") + if (EnumSymbol == "M") { rop = UnitMultiplier::M; return lop; } - if(EnumSymbol == "G") + if (EnumSymbol == "G") { rop = UnitMultiplier::G; return lop; } - if(EnumSymbol == "T") + if (EnumSymbol == "T") { rop = UnitMultiplier::T; return lop; } - if(EnumSymbol == "none") + if (EnumSymbol == "none") { rop = UnitMultiplier::none; return lop; diff --git a/CGMES_2.4.15_16FEB2016/UnitMultiplier.hpp b/CGMES_2.4.15_16FEB2016/UnitMultiplier.hpp index 710c6f153..622b2d589 100644 --- a/CGMES_2.4.15_16FEB2016/UnitMultiplier.hpp +++ b/CGMES_2.4.15_16FEB2016/UnitMultiplier.hpp @@ -9,57 +9,33 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The unit multipliers defined for the CIM. - */ + /** \brief The unit multipliers defined for the CIM. */ class UnitMultiplier { public: enum UnitMultiplier_ENUM { - /** - * Pico 10**-12. - */ + /** Pico 10**-12. */ p, - /** - * Nano 10**-9. - */ + /** Nano 10**-9. */ n, - /** - * Micro 10**-6. - */ + /** Micro 10**-6. */ micro, - /** - * Milli 10**-3. - */ + /** Milli 10**-3. */ m, - /** - * Centi 10**-2. - */ + /** Centi 10**-2. */ c, - /** - * Deci 10**-1. - */ + /** Deci 10**-1. */ d, - /** - * Kilo 10**3. - */ + /** Kilo 10**3. */ k, - /** - * Mega 10**6. - */ + /** Mega 10**6. */ M, - /** - * Giga 10**9. - */ + /** Giga 10**9. */ G, - /** - * Tera 10**12. - */ + /** Tera 10**12. */ T, - /** - * No multiplier or equivalently multiply by 1. - */ + /** No multiplier or equivalently multiply by 1. */ none, }; diff --git a/CGMES_2.4.15_16FEB2016/UnitSymbol.cpp b/CGMES_2.4.15_16FEB2016/UnitSymbol.cpp index 8812cdffb..92f259356 100644 --- a/CGMES_2.4.15_16FEB2016/UnitSymbol.cpp +++ b/CGMES_2.4.15_16FEB2016/UnitSymbol.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "UnitSymbol") + if (EnumSymbol.substr(0, pos) != "UnitSymbol") { lop.setstate(std::ios::failbit); return lop; @@ -50,137 +50,137 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "VA") + if (EnumSymbol == "VA") { rop = UnitSymbol::VA; return lop; } - if(EnumSymbol == "W") + if (EnumSymbol == "W") { rop = UnitSymbol::W; return lop; } - if(EnumSymbol == "VAr") + if (EnumSymbol == "VAr") { rop = UnitSymbol::VAr; return lop; } - if(EnumSymbol == "VAh") + if (EnumSymbol == "VAh") { rop = UnitSymbol::VAh; return lop; } - if(EnumSymbol == "Wh") + if (EnumSymbol == "Wh") { rop = UnitSymbol::Wh; return lop; } - if(EnumSymbol == "VArh") + if (EnumSymbol == "VArh") { rop = UnitSymbol::VArh; return lop; } - if(EnumSymbol == "V") + if (EnumSymbol == "V") { rop = UnitSymbol::V; return lop; } - if(EnumSymbol == "ohm") + if (EnumSymbol == "ohm") { rop = UnitSymbol::ohm; return lop; } - if(EnumSymbol == "A") + if (EnumSymbol == "A") { rop = UnitSymbol::A; return lop; } - if(EnumSymbol == "F") + if (EnumSymbol == "F") { rop = UnitSymbol::F; return lop; } - if(EnumSymbol == "H") + if (EnumSymbol == "H") { rop = UnitSymbol::H; return lop; } - if(EnumSymbol == "degC") + if (EnumSymbol == "degC") { rop = UnitSymbol::degC; return lop; } - if(EnumSymbol == "s") + if (EnumSymbol == "s") { rop = UnitSymbol::s; return lop; } - if(EnumSymbol == "min") + if (EnumSymbol == "min") { rop = UnitSymbol::min; return lop; } - if(EnumSymbol == "h") + if (EnumSymbol == "h") { rop = UnitSymbol::h; return lop; } - if(EnumSymbol == "deg") + if (EnumSymbol == "deg") { rop = UnitSymbol::deg; return lop; } - if(EnumSymbol == "rad") + if (EnumSymbol == "rad") { rop = UnitSymbol::rad; return lop; } - if(EnumSymbol == "J") + if (EnumSymbol == "J") { rop = UnitSymbol::J; return lop; } - if(EnumSymbol == "N") + if (EnumSymbol == "N") { rop = UnitSymbol::N; return lop; } - if(EnumSymbol == "S") + if (EnumSymbol == "S") { rop = UnitSymbol::S; return lop; } - if(EnumSymbol == "none") + if (EnumSymbol == "none") { rop = UnitSymbol::none; return lop; } - if(EnumSymbol == "Hz") + if (EnumSymbol == "Hz") { rop = UnitSymbol::Hz; return lop; } - if(EnumSymbol == "g") + if (EnumSymbol == "g") { rop = UnitSymbol::g; return lop; } - if(EnumSymbol == "Pa") + if (EnumSymbol == "Pa") { rop = UnitSymbol::Pa; return lop; } - if(EnumSymbol == "m") + if (EnumSymbol == "m") { rop = UnitSymbol::m; return lop; } - if(EnumSymbol == "m2") + if (EnumSymbol == "m2") { rop = UnitSymbol::m2; return lop; } - if(EnumSymbol == "m3") + if (EnumSymbol == "m3") { rop = UnitSymbol::m3; return lop; diff --git a/CGMES_2.4.15_16FEB2016/UnitSymbol.hpp b/CGMES_2.4.15_16FEB2016/UnitSymbol.hpp index b63a20465..6cf87bb05 100644 --- a/CGMES_2.4.15_16FEB2016/UnitSymbol.hpp +++ b/CGMES_2.4.15_16FEB2016/UnitSymbol.hpp @@ -9,121 +9,65 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The units defined for usage in the CIM. - */ + /** \brief The units defined for usage in the CIM. */ class UnitSymbol { public: enum UnitSymbol_ENUM { - /** - * Apparent power in volt ampere. - */ + /** Apparent power in volt ampere. */ VA, - /** - * Active power in watt. - */ + /** Active power in watt. */ W, - /** - * Reactive power in volt ampere reactive. - */ + /** Reactive power in volt ampere reactive. */ VAr, - /** - * Apparent energy in volt ampere hours. - */ + /** Apparent energy in volt ampere hours. */ VAh, - /** - * Real energy in what hours. - */ + /** Real energy in what hours. */ Wh, - /** - * Reactive energy in volt ampere reactive hours. - */ + /** Reactive energy in volt ampere reactive hours. */ VArh, - /** - * Voltage in volt. - */ + /** Voltage in volt. */ V, - /** - * Resistance in ohm. - */ + /** Resistance in ohm. */ ohm, - /** - * Current in ampere. - */ + /** Current in ampere. */ A, - /** - * Capacitance in farad. - */ + /** Capacitance in farad. */ F, - /** - * Inductance in henry. - */ + /** Inductance in henry. */ H, - /** - * Relative temperature in degrees Celsius. In the SI unit system the symbol is [SYMBOL REMOVED]C. Electric charge is measured in coulomb that has the unit symbol C. To distinguish degree Celsius form coulomb the symbol used in the UML is degC. Reason for not using [SYMBOL REMOVED]C is the special character [SYMBOL REMOVED] is difficult to manage in software. - */ + /** Relative temperature in degrees Celsius. In the SI unit system the symbol is [SYMBOL REMOVED]C. Electric charge is measured in coulomb that has the unit symbol C. To distinguish degree Celsius form coulomb the symbol used in the UML is degC. Reason for not using [SYMBOL REMOVED]C is the special character [SYMBOL REMOVED] is difficult to manage in software. */ degC, - /** - * Time in seconds. - */ + /** Time in seconds. */ s, - /** - * Time in minutes. - */ + /** Time in minutes. */ min, - /** - * Time in hours. - */ + /** Time in hours. */ h, - /** - * Plane angle in degrees. - */ + /** Plane angle in degrees. */ deg, - /** - * Plane angle in radians. - */ + /** Plane angle in radians. */ rad, - /** - * Energy in joule. - */ + /** Energy in joule. */ J, - /** - * Force in newton. - */ + /** Force in newton. */ N, - /** - * Conductance in siemens. - */ + /** Conductance in siemens. */ S, - /** - * Dimension less quantity, e.g. count, per unit, etc. - */ + /** Dimension less quantity, e.g. count, per unit, etc. */ none, - /** - * Frequency in hertz. - */ + /** Frequency in hertz. */ Hz, - /** - * Mass in gram. - */ + /** Mass in gram. */ g, - /** - * Pressure in pascal (n/m2). - */ + /** Pressure in pascal (n/m2). */ Pa, - /** - * Length in meter. - */ + /** Length in meter. */ m, - /** - * Area in square meters. - */ + /** Area in square meters. */ m2, - /** - * Volume in cubic meters. - */ + /** Volume in cubic meters. */ m3, }; diff --git a/CGMES_2.4.15_16FEB2016/VAdjIEEE.cpp b/CGMES_2.4.15_16FEB2016/VAdjIEEE.cpp index b5043b34b..f62f88f4f 100644 --- a/CGMES_2.4.15_16FEB2016/VAdjIEEE.cpp +++ b/CGMES_2.4.15_16FEB2016/VAdjIEEE.cpp @@ -8,17 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -VAdjIEEE::VAdjIEEE() {}; -VAdjIEEE::~VAdjIEEE() {}; +VAdjIEEE::VAdjIEEE() {} +VAdjIEEE::~VAdjIEEE() {} static const std::list PossibleProfilesForClass = { @@ -50,90 +44,94 @@ VAdjIEEE::getPossibleProfilesForAttributes() const return map; } - -bool assign_VAdjIEEE_adjslew(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VAdjIEEE_adjslew(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->adjslew; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VAdjIEEE_taoff(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VAdjIEEE_taoff(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->taoff; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VAdjIEEE_taon(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VAdjIEEE_taon(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->taon; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VAdjIEEE_vadjf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VAdjIEEE_vadjf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vadjf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VAdjIEEE_vadjmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VAdjIEEE_vadjmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vadjmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VAdjIEEE_vadjmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VAdjIEEE_vadjmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vadjmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_VAdjIEEE_adjslew(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->adjslew; if (!buffer.str().empty()) @@ -147,7 +145,8 @@ bool get_VAdjIEEE_adjslew(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_VAdjIEEE_taoff(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->taoff; if (!buffer.str().empty()) @@ -161,7 +160,8 @@ bool get_VAdjIEEE_taoff(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_VAdjIEEE_taon(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->taon; if (!buffer.str().empty()) @@ -175,7 +175,8 @@ bool get_VAdjIEEE_taon(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_VAdjIEEE_vadjf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vadjf; if (!buffer.str().empty()) @@ -189,7 +190,8 @@ bool get_VAdjIEEE_vadjf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_VAdjIEEE_vadjmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vadjmax; if (!buffer.str().empty()) @@ -203,7 +205,8 @@ bool get_VAdjIEEE_vadjmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_VAdjIEEE_vadjmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vadjmin; if (!buffer.str().empty()) @@ -215,8 +218,6 @@ bool get_VAdjIEEE_vadjmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char VAdjIEEE::debugName[] = "VAdjIEEE"; const char* VAdjIEEE::debugString() const { @@ -225,17 +226,17 @@ const char* VAdjIEEE::debugString() const void VAdjIEEE::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VAdjIEEE"), &VAdjIEEE_factory)); + factory_map.emplace("cim:VAdjIEEE", &VAdjIEEE_factory); } void VAdjIEEE::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VAdjIEEE.adjslew"), &assign_VAdjIEEE_adjslew)); - assign_map.insert(std::make_pair(std::string("cim:VAdjIEEE.taoff"), &assign_VAdjIEEE_taoff)); - assign_map.insert(std::make_pair(std::string("cim:VAdjIEEE.taon"), &assign_VAdjIEEE_taon)); - assign_map.insert(std::make_pair(std::string("cim:VAdjIEEE.vadjf"), &assign_VAdjIEEE_vadjf)); - assign_map.insert(std::make_pair(std::string("cim:VAdjIEEE.vadjmax"), &assign_VAdjIEEE_vadjmax)); - assign_map.insert(std::make_pair(std::string("cim:VAdjIEEE.vadjmin"), &assign_VAdjIEEE_vadjmin)); + assign_map.emplace("cim:VAdjIEEE.adjslew", &assign_VAdjIEEE_adjslew); + assign_map.emplace("cim:VAdjIEEE.taoff", &assign_VAdjIEEE_taoff); + assign_map.emplace("cim:VAdjIEEE.taon", &assign_VAdjIEEE_taon); + assign_map.emplace("cim:VAdjIEEE.vadjf", &assign_VAdjIEEE_vadjf); + assign_map.emplace("cim:VAdjIEEE.vadjmax", &assign_VAdjIEEE_vadjmax); + assign_map.emplace("cim:VAdjIEEE.vadjmin", &assign_VAdjIEEE_vadjmin); } void VAdjIEEE::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/VAdjIEEE.hpp b/CGMES_2.4.15_16FEB2016/VAdjIEEE.hpp index 747098fe2..8ada8dfb7 100644 --- a/CGMES_2.4.15_16FEB2016/VAdjIEEE.hpp +++ b/CGMES_2.4.15_16FEB2016/VAdjIEEE.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Voltage Adjuster which is used to represent the voltage adjuster in either a power factor or var control system. Reference: IEEE Standard 421.5-2005 Section 11.1. - */ + /** \brief The class represents IEEE Voltage Adjuster which is used to represent the voltage adjuster in either a power factor or var control system. Reference: IEEE Standard 421.5-2005 Section 11.1. */ class VAdjIEEE : public VoltageAdjusterDynamics { public: @@ -29,12 +27,23 @@ namespace CIMPP VAdjIEEE(); ~VAdjIEEE() override; - CIMPP::Simple_Float adjslew; /* Rate at which output of adjuster changes (). Unit = sec./PU. Typical Value = 300. Default: nullptr */ - CIMPP::Seconds taoff; /* Time that adjuster pulses are off (). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds taon; /* Time that adjuster pulses are on (). Typical Value = 0.1. Default: nullptr */ - CIMPP::Simple_Float vadjf; /* Set high to provide a continuous raise or lower (). Default: nullptr */ - CIMPP::PU vadjmax; /* Maximum output of the adjuster (). Typical Value = 1.1. Default: nullptr */ - CIMPP::PU vadjmin; /* Minimum output of the adjuster (). Typical Value = 0.9. Default: nullptr */ + /** \brief Rate at which output of adjuster changes (). Unit = sec./PU. Typical Value = 300. Default: nullptr */ + CIMPP::Simple_Float adjslew; + + /** \brief Time that adjuster pulses are off (). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds taoff; + + /** \brief Time that adjuster pulses are on (). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds taon; + + /** \brief Set high to provide a continuous raise or lower (). Default: nullptr */ + CIMPP::Simple_Float vadjf; + + /** \brief Maximum output of the adjuster (). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU vadjmax; + + /** \brief Minimum output of the adjuster (). Typical Value = 0.9. Default: nullptr */ + CIMPP::PU vadjmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/VCompIEEEType1.cpp b/CGMES_2.4.15_16FEB2016/VCompIEEEType1.cpp index c229ab6cb..92cbabebb 100644 --- a/CGMES_2.4.15_16FEB2016/VCompIEEEType1.cpp +++ b/CGMES_2.4.15_16FEB2016/VCompIEEEType1.cpp @@ -8,14 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "Seconds.hpp" -#include "PU.hpp" using namespace CIMPP; -VCompIEEEType1::VCompIEEEType1() {}; -VCompIEEEType1::~VCompIEEEType1() {}; +VCompIEEEType1::VCompIEEEType1() {} +VCompIEEEType1::~VCompIEEEType1() {} static const std::list PossibleProfilesForClass = { @@ -44,51 +41,52 @@ VCompIEEEType1::getPossibleProfilesForAttributes() const return map; } - -bool assign_VCompIEEEType1_rc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VCompIEEEType1_rc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1)) + VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VCompIEEEType1_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VCompIEEEType1_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1)) + VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VCompIEEEType1_xc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VCompIEEEType1_xc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1)) + VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_VCompIEEEType1_rc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1)) + const VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rc; if (!buffer.str().empty()) @@ -102,7 +100,8 @@ bool get_VCompIEEEType1_rc(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_VCompIEEEType1_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1)) + const VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -116,7 +115,8 @@ bool get_VCompIEEEType1_tr(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_VCompIEEEType1_xc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1)) + const VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xc; if (!buffer.str().empty()) @@ -128,8 +128,6 @@ bool get_VCompIEEEType1_xc(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char VCompIEEEType1::debugName[] = "VCompIEEEType1"; const char* VCompIEEEType1::debugString() const { @@ -138,14 +136,14 @@ const char* VCompIEEEType1::debugString() const void VCompIEEEType1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VCompIEEEType1"), &VCompIEEEType1_factory)); + factory_map.emplace("cim:VCompIEEEType1", &VCompIEEEType1_factory); } void VCompIEEEType1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VCompIEEEType1.rc"), &assign_VCompIEEEType1_rc)); - assign_map.insert(std::make_pair(std::string("cim:VCompIEEEType1.tr"), &assign_VCompIEEEType1_tr)); - assign_map.insert(std::make_pair(std::string("cim:VCompIEEEType1.xc"), &assign_VCompIEEEType1_xc)); + assign_map.emplace("cim:VCompIEEEType1.rc", &assign_VCompIEEEType1_rc); + assign_map.emplace("cim:VCompIEEEType1.tr", &assign_VCompIEEEType1_tr); + assign_map.emplace("cim:VCompIEEEType1.xc", &assign_VCompIEEEType1_xc); } void VCompIEEEType1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/VCompIEEEType1.hpp b/CGMES_2.4.15_16FEB2016/VCompIEEEType1.hpp index 520521f70..d5232a748 100644 --- a/CGMES_2.4.15_16FEB2016/VCompIEEEType1.hpp +++ b/CGMES_2.4.15_16FEB2016/VCompIEEEType1.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Reference: IEEE Standard 421.5-2005 Section 4. - */ + /** \brief Reference: IEEE Standard 421.5-2005 Section 4. */ class VCompIEEEType1 : public VoltageCompensatorDynamics { public: @@ -28,9 +26,14 @@ namespace CIMPP VCompIEEEType1(); ~VCompIEEEType1() override; - CIMPP::PU rc; /* Default: nullptr */ - CIMPP::Seconds tr; /* Default: nullptr */ - CIMPP::PU xc; /* Default: nullptr */ + /** \brief Default: nullptr */ + CIMPP::PU rc; + + /** \brief Default: nullptr */ + CIMPP::Seconds tr; + + /** \brief Default: nullptr */ + CIMPP::PU xc; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/VCompIEEEType2.cpp b/CGMES_2.4.15_16FEB2016/VCompIEEEType2.cpp index 9317fd9a8..1377d7b30 100644 --- a/CGMES_2.4.15_16FEB2016/VCompIEEEType2.cpp +++ b/CGMES_2.4.15_16FEB2016/VCompIEEEType2.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "GenICompensationForGenJ.hpp" -#include "Seconds.hpp" using namespace CIMPP; -VCompIEEEType2::VCompIEEEType2() {}; -VCompIEEEType2::~VCompIEEEType2() {}; +VCompIEEEType2::VCompIEEEType2() {} +VCompIEEEType2::~VCompIEEEType2() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ VCompIEEEType2::getPossibleProfilesForAttributes() const return map; } - -bool assign_VCompIEEEType2_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (VCompIEEEType2* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->tr; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_GenICompensationForGenJ_VcompIEEEType2(BaseClass*, BaseClass*); bool assign_VCompIEEEType2_GenICompensationForGenJ(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_VCompIEEEType2_GenICompensationForGenJ(BaseClass* BaseClass_ptr1, Ba return false; } +bool assign_VCompIEEEType2_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + VCompIEEEType2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->tr; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_VCompIEEEType2_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VCompIEEEType2* element = dynamic_cast(BaseClass_ptr1)) + const VCompIEEEType2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_VCompIEEEType2_tr(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char VCompIEEEType2::debugName[] = "VCompIEEEType2"; const char* VCompIEEEType2::debugString() const { @@ -98,17 +96,17 @@ const char* VCompIEEEType2::debugString() const void VCompIEEEType2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VCompIEEEType2"), &VCompIEEEType2_factory)); + factory_map.emplace("cim:VCompIEEEType2", &VCompIEEEType2_factory); } void VCompIEEEType2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VCompIEEEType2.tr"), &assign_VCompIEEEType2_tr)); + assign_map.emplace("cim:VCompIEEEType2.tr", &assign_VCompIEEEType2_tr); } void VCompIEEEType2::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VCompIEEEType2.GenICompensationForGenJ"), &assign_VCompIEEEType2_GenICompensationForGenJ)); + assign_map.emplace("cim:VCompIEEEType2.GenICompensationForGenJ", &assign_VCompIEEEType2_GenICompensationForGenJ); } void VCompIEEEType2::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/VCompIEEEType2.hpp b/CGMES_2.4.15_16FEB2016/VCompIEEEType2.hpp index 939a3436f..67fe38c34 100644 --- a/CGMES_2.4.15_16FEB2016/VCompIEEEType2.hpp +++ b/CGMES_2.4.15_16FEB2016/VCompIEEEType2.hpp @@ -25,8 +25,11 @@ namespace CIMPP VCompIEEEType2(); ~VCompIEEEType2() override; - std::list GenICompensationForGenJ; /* Compensation of this voltage compensator`s generator for current flow out of another generator. Default: 0 */ - CIMPP::Seconds tr; /* Default: nullptr */ + /** \brief Compensation of this voltage compensator`s generator for current flow out of another generator. Default: 0 */ + std::list GenICompensationForGenJ; + + /** \brief Default: nullptr */ + CIMPP::Seconds tr; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Validity.cpp b/CGMES_2.4.15_16FEB2016/Validity.cpp index 9796a2efa..02845a923 100644 --- a/CGMES_2.4.15_16FEB2016/Validity.cpp +++ b/CGMES_2.4.15_16FEB2016/Validity.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "Validity") + if (EnumSymbol.substr(0, pos) != "Validity") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "GOOD") + if (EnumSymbol == "GOOD") { rop = Validity::GOOD; return lop; } - if(EnumSymbol == "QUESTIONABLE") + if (EnumSymbol == "QUESTIONABLE") { rop = Validity::QUESTIONABLE; return lop; } - if(EnumSymbol == "INVALID") + if (EnumSymbol == "INVALID") { rop = Validity::INVALID; return lop; diff --git a/CGMES_2.4.15_16FEB2016/Validity.hpp b/CGMES_2.4.15_16FEB2016/Validity.hpp index fb4d8ce56..73e0f28c5 100644 --- a/CGMES_2.4.15_16FEB2016/Validity.hpp +++ b/CGMES_2.4.15_16FEB2016/Validity.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Validity for MeasurementValue. - */ + /** \brief Validity for MeasurementValue. */ class Validity { public: enum Validity_ENUM { - /** - * The value is marked good if no abnormal condition of the acquisition function or the information source is detected. - */ + /** The value is marked good if no abnormal condition of the acquisition function or the information source is detected. */ GOOD, - /** - * The value is marked questionable if a supervision function detects an abnormal behaviour, however the value could still be valid. The client is responsible for determining whether or not values marked "questionable" should be used. - */ + /** The value is marked questionable if a supervision function detects an abnormal behaviour, however the value could still be valid. The client is responsible for determining whether or not values marked "questionable" should be used. */ QUESTIONABLE, - /** - * The value is marked invalid when a supervision function recognises abnormal conditions of the acquisition function or the information source (missing or non-operating updating devices). The value is not defined under this condition. The mark invalid is used to indicate to the client that the value may be incorrect and shall not be used. - */ + /** The value is marked invalid when a supervision function recognises abnormal conditions of the acquisition function or the information source (missing or non-operating updating devices). The value is not defined under this condition. The mark invalid is used to indicate to the client that the value may be incorrect and shall not be used. */ INVALID, }; diff --git a/CGMES_2.4.15_16FEB2016/ValueAliasSet.cpp b/CGMES_2.4.15_16FEB2016/ValueAliasSet.cpp index b6a111e61..1ba46808c 100644 --- a/CGMES_2.4.15_16FEB2016/ValueAliasSet.cpp +++ b/CGMES_2.4.15_16FEB2016/ValueAliasSet.cpp @@ -15,8 +15,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ValueAliasSet::ValueAliasSet() {}; -ValueAliasSet::~ValueAliasSet() {}; +ValueAliasSet::ValueAliasSet() {} +ValueAliasSet::~ValueAliasSet() {} static const std::list PossibleProfilesForClass = { @@ -46,8 +46,6 @@ ValueAliasSet::getPossibleProfilesForAttributes() const return map; } - - bool assign_Command_ValueAliasSet(BaseClass*, BaseClass*); bool assign_ValueAliasSet_Commands(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -64,6 +62,7 @@ bool assign_ValueAliasSet_Commands(BaseClass* BaseClass_ptr1, BaseClass* BaseCla } return false; } + bool assign_Discrete_ValueAliasSet(BaseClass*, BaseClass*); bool assign_ValueAliasSet_Discretes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -80,6 +79,7 @@ bool assign_ValueAliasSet_Discretes(BaseClass* BaseClass_ptr1, BaseClass* BaseCl } return false; } + bool assign_RaiseLowerCommand_ValueAliasSet(BaseClass*, BaseClass*); bool assign_ValueAliasSet_RaiseLowerCommands(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -96,6 +96,7 @@ bool assign_ValueAliasSet_RaiseLowerCommands(BaseClass* BaseClass_ptr1, BaseClas } return false; } + bool assign_ValueToAlias_ValueAliasSet(BaseClass*, BaseClass*); bool assign_ValueAliasSet_Values(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -115,6 +116,8 @@ bool assign_ValueAliasSet_Values(BaseClass* BaseClass_ptr1, BaseClass* BaseClass + + const char ValueAliasSet::debugName[] = "ValueAliasSet"; const char* ValueAliasSet::debugString() const { @@ -123,7 +126,7 @@ const char* ValueAliasSet::debugString() const void ValueAliasSet::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ValueAliasSet"), &ValueAliasSet_factory)); + factory_map.emplace("cim:ValueAliasSet", &ValueAliasSet_factory); } void ValueAliasSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -132,10 +135,10 @@ void ValueAliasSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ValueAliasSet.Commands"), &assign_ValueAliasSet_Commands)); - assign_map.insert(std::make_pair(std::string("cim:ValueAliasSet.Discretes"), &assign_ValueAliasSet_Discretes)); - assign_map.insert(std::make_pair(std::string("cim:ValueAliasSet.RaiseLowerCommands"), &assign_ValueAliasSet_RaiseLowerCommands)); - assign_map.insert(std::make_pair(std::string("cim:ValueAliasSet.Values"), &assign_ValueAliasSet_Values)); + assign_map.emplace("cim:ValueAliasSet.Commands", &assign_ValueAliasSet_Commands); + assign_map.emplace("cim:ValueAliasSet.Discretes", &assign_ValueAliasSet_Discretes); + assign_map.emplace("cim:ValueAliasSet.RaiseLowerCommands", &assign_ValueAliasSet_RaiseLowerCommands); + assign_map.emplace("cim:ValueAliasSet.Values", &assign_ValueAliasSet_Values); } void ValueAliasSet::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/ValueAliasSet.hpp b/CGMES_2.4.15_16FEB2016/ValueAliasSet.hpp index 66dcbd455..80a9bad49 100644 --- a/CGMES_2.4.15_16FEB2016/ValueAliasSet.hpp +++ b/CGMES_2.4.15_16FEB2016/ValueAliasSet.hpp @@ -20,9 +20,7 @@ namespace CIMPP class RaiseLowerCommand; class ValueToAlias; - /* - Describes the translation of a set of values into a name and is intendend to facilitate cusom translations. Each ValueAliasSet has a name, description etc. A specific Measurement may represent a discrete state like Open, Closed, Intermediate etc. This requires a translation from the MeasurementValue.value number to a string, e.g. 0->"Invalid", 1->"Open", 2->"Closed", 3->"Intermediate". Each ValueToAlias member in ValueAliasSet.Value describe a mapping for one particular value to a name. - */ + /** \brief Describes the translation of a set of values into a name and is intendend to facilitate cusom translations. Each ValueAliasSet has a name, description etc. A specific Measurement may represent a discrete state like Open, Closed, Intermediate etc. This requires a translation from the MeasurementValue.value number to a string, e.g. 0->"Invalid", 1->"Open", 2->"Closed", 3->"Intermediate". Each ValueToAlias member in ValueAliasSet.Value describe a mapping for one particular value to a name. */ class ValueAliasSet : public IdentifiedObject { public: @@ -30,10 +28,17 @@ namespace CIMPP ValueAliasSet(); ~ValueAliasSet() override; - std::list Commands; /* The Commands using the set for translation. Default: 0 */ - std::list Discretes; /* The Measurements using the set for translation. Default: 0 */ - std::list RaiseLowerCommands; /* The Commands using the set for translation. Default: 0 */ - std::list Values; /* The ValueAliasSet having the ValueToAlias mappings. Default: 0 */ + /** \brief The Commands using the set for translation. Default: 0 */ + std::list Commands; + + /** \brief The Measurements using the set for translation. Default: 0 */ + std::list Discretes; + + /** \brief The Commands using the set for translation. Default: 0 */ + std::list RaiseLowerCommands; + + /** \brief The ValueAliasSet having the ValueToAlias mappings. Default: 0 */ + std::list Values; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/ValueToAlias.cpp b/CGMES_2.4.15_16FEB2016/ValueToAlias.cpp index dc6fbcec4..e0b3ae3d9 100644 --- a/CGMES_2.4.15_16FEB2016/ValueToAlias.cpp +++ b/CGMES_2.4.15_16FEB2016/ValueToAlias.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ValueAliasSet.hpp" -#include "Integer.hpp" using namespace CIMPP; -ValueToAlias::ValueToAlias() : ValueAliasSet(nullptr) {}; -ValueToAlias::~ValueToAlias() {}; +ValueToAlias::ValueToAlias() : ValueAliasSet(nullptr) {} +ValueToAlias::~ValueToAlias() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ ValueToAlias::getPossibleProfilesForAttributes() const return map; } - -bool assign_ValueToAlias_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ValueToAlias* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->value; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ValueAliasSet_Values(BaseClass*, BaseClass*); bool assign_ValueToAlias_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_ValueToAlias_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass* Bas return false; } -bool get_ValueToAlias_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_ValueToAlias_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const ValueToAlias* element = dynamic_cast(BaseClass_ptr1)) + ValueToAlias* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->value; - if (!buffer.str().empty()) + buffer >> element->value; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_ValueToAlias_ValueAliasSet(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ValueToAlias* element = dynamic_cast(BaseClass_ptr1)) + const ValueToAlias* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ValueAliasSet != 0) { @@ -102,6 +86,20 @@ bool get_ValueToAlias_ValueAliasSet(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->value; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char ValueToAlias::debugName[] = "ValueToAlias"; const char* ValueToAlias::debugString() const @@ -111,17 +109,17 @@ const char* ValueToAlias::debugString() const void ValueToAlias::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ValueToAlias"), &ValueToAlias_factory)); + factory_map.emplace("cim:ValueToAlias", &ValueToAlias_factory); } void ValueToAlias::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ValueToAlias.value"), &assign_ValueToAlias_value)); + assign_map.emplace("cim:ValueToAlias.value", &assign_ValueToAlias_value); } void ValueToAlias::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ValueToAlias.ValueAliasSet"), &assign_ValueToAlias_ValueAliasSet)); + assign_map.emplace("cim:ValueToAlias.ValueAliasSet", &assign_ValueToAlias_ValueAliasSet); } void ValueToAlias::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/ValueToAlias.hpp b/CGMES_2.4.15_16FEB2016/ValueToAlias.hpp index 7df4daa8e..f2faa5f11 100644 --- a/CGMES_2.4.15_16FEB2016/ValueToAlias.hpp +++ b/CGMES_2.4.15_16FEB2016/ValueToAlias.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ValueAliasSet; - /* - Describes the translation of one particular value into a name, e.g. 1 as "Open". - */ + /** \brief Describes the translation of one particular value into a name, e.g. 1 as "Open". */ class ValueToAlias : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP ValueToAlias(); ~ValueToAlias() override; - CIMPP::ValueAliasSet* ValueAliasSet; /* The ValueToAlias mappings included in the set. Default: 0 */ - CIMPP::Integer value; /* The value that is mapped. Default: 0 */ + /** \brief The ValueToAlias mappings included in the set. Default: 0 */ + CIMPP::ValueAliasSet* ValueAliasSet; + + /** \brief The value that is mapped. Default: 0 */ + CIMPP::Integer value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/VisibilityLayer.cpp b/CGMES_2.4.15_16FEB2016/VisibilityLayer.cpp index 763004423..342592e16 100644 --- a/CGMES_2.4.15_16FEB2016/VisibilityLayer.cpp +++ b/CGMES_2.4.15_16FEB2016/VisibilityLayer.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "DiagramObject.hpp" -#include "Integer.hpp" using namespace CIMPP; -VisibilityLayer::VisibilityLayer() {}; -VisibilityLayer::~VisibilityLayer() {}; +VisibilityLayer::VisibilityLayer() {} +VisibilityLayer::~VisibilityLayer() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ VisibilityLayer::getPossibleProfilesForAttributes() const return map; } - -bool assign_VisibilityLayer_drawingOrder(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (VisibilityLayer* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->drawingOrder; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_DiagramObject_VisibilityLayers(BaseClass*, BaseClass*); bool assign_VisibilityLayer_VisibleObjects(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_VisibilityLayer_VisibleObjects(BaseClass* BaseClass_ptr1, BaseClass* return false; } -bool get_VisibilityLayer_drawingOrder(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_VisibilityLayer_drawingOrder(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const VisibilityLayer* element = dynamic_cast(BaseClass_ptr1)) + VisibilityLayer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->drawingOrder; - if (!buffer.str().empty()) + buffer >> element->drawingOrder; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_VisibilityLayer_VisibleObjects(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const VisibilityLayer* element = dynamic_cast(BaseClass_ptr1)) + const VisibilityLayer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { std::copy(element->VisibleObjects.begin(), element->VisibleObjects.end(), std::back_inserter(BaseClass_list)); return !BaseClass_list.empty(); @@ -99,6 +83,20 @@ bool get_VisibilityLayer_VisibleObjects(const BaseClass* BaseClass_ptr1, std::li return false; } +bool get_VisibilityLayer_drawingOrder(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const VisibilityLayer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->drawingOrder; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char VisibilityLayer::debugName[] = "VisibilityLayer"; const char* VisibilityLayer::debugString() const @@ -108,17 +106,17 @@ const char* VisibilityLayer::debugString() const void VisibilityLayer::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VisibilityLayer"), &VisibilityLayer_factory)); + factory_map.emplace("cim:VisibilityLayer", &VisibilityLayer_factory); } void VisibilityLayer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VisibilityLayer.drawingOrder"), &assign_VisibilityLayer_drawingOrder)); + assign_map.emplace("cim:VisibilityLayer.drawingOrder", &assign_VisibilityLayer_drawingOrder); } void VisibilityLayer::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VisibilityLayer.VisibleObjects"), &assign_VisibilityLayer_VisibleObjects)); + assign_map.emplace("cim:VisibilityLayer.VisibleObjects", &assign_VisibilityLayer_VisibleObjects); } void VisibilityLayer::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/VisibilityLayer.hpp b/CGMES_2.4.15_16FEB2016/VisibilityLayer.hpp index 0eb4565e2..20a6810e6 100644 --- a/CGMES_2.4.15_16FEB2016/VisibilityLayer.hpp +++ b/CGMES_2.4.15_16FEB2016/VisibilityLayer.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class DiagramObject; - /* - Layers are typically used for grouping diagram objects according to themes and scales. Themes are used to display or hide certain information (e.g., lakes, borders), while scales are used for hiding or displaying information depending on the current zoom level (hide text when it is too small to be read, or when it exceeds the screen size). This is also called de-cluttering. CIM based graphics exchange will support an m:n relationship between diagram objects and layers. It will be the task of the importing system to convert an m:n case into an appropriate 1:n representation if the importing system does not support m:n. - */ + /** \brief Layers are typically used for grouping diagram objects according to themes and scales. Themes are used to display or hide certain information (e.g., lakes, borders), while scales are used for hiding or displaying information depending on the current zoom level (hide text when it is too small to be read, or when it exceeds the screen size). This is also called de-cluttering. CIM based graphics exchange will support an m:n relationship between diagram objects and layers. It will be the task of the importing system to convert an m:n case into an appropriate 1:n representation if the importing system does not support m:n. */ class VisibilityLayer : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP VisibilityLayer(); ~VisibilityLayer() override; - std::list VisibleObjects; /* A visibility layer can contain one or more diagram objects. Default: 0 */ - CIMPP::Integer drawingOrder; /* The drawing order for this layer. The higher the number, the later the layer and the objects within it are rendered. Default: 0 */ + /** \brief A visibility layer can contain one or more diagram objects. Default: 0 */ + std::list VisibleObjects; + + /** \brief The drawing order for this layer. The higher the number, the later the layer and the objects within it are rendered. Default: 0 */ + CIMPP::Integer drawingOrder; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/Voltage.hpp b/CGMES_2.4.15_16FEB2016/Voltage.hpp index 12eb87179..a0682e3d6 100644 --- a/CGMES_2.4.15_16FEB2016/Voltage.hpp +++ b/CGMES_2.4.15_16FEB2016/Voltage.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Electrical voltage, can be both AC and DC. - */ + /** \brief Electrical voltage, can be both AC and DC. */ class Voltage { public: diff --git a/CGMES_2.4.15_16FEB2016/VoltageAdjusterDynamics.cpp b/CGMES_2.4.15_16FEB2016/VoltageAdjusterDynamics.cpp index a3ef9d037..5ab8b68ac 100644 --- a/CGMES_2.4.15_16FEB2016/VoltageAdjusterDynamics.cpp +++ b/CGMES_2.4.15_16FEB2016/VoltageAdjusterDynamics.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -VoltageAdjusterDynamics::VoltageAdjusterDynamics() : PFVArControllerType1Dynamics(nullptr) {}; -VoltageAdjusterDynamics::~VoltageAdjusterDynamics() {}; +VoltageAdjusterDynamics::VoltageAdjusterDynamics() : PFVArControllerType1Dynamics(nullptr) {} +VoltageAdjusterDynamics::~VoltageAdjusterDynamics() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ VoltageAdjusterDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_PFVArControllerType1Dynamics_VoltageAdjusterDynamics(BaseClass*, BaseClass*); bool assign_VoltageAdjusterDynamics_PFVArControllerType1Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_VoltageAdjusterDynamics_PFVArControllerType1Dynamics(BaseClass* Base return false; } - bool get_VoltageAdjusterDynamics_PFVArControllerType1Dynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const VoltageAdjusterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const VoltageAdjusterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PFVArControllerType1Dynamics != 0) { @@ -73,7 +71,6 @@ bool get_VoltageAdjusterDynamics_PFVArControllerType1Dynamics(const BaseClass* B return false; } - const char VoltageAdjusterDynamics::debugName[] = "VoltageAdjusterDynamics"; const char* VoltageAdjusterDynamics::debugString() const { @@ -82,7 +79,7 @@ const char* VoltageAdjusterDynamics::debugString() const void VoltageAdjusterDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VoltageAdjusterDynamics"), &VoltageAdjusterDynamics_factory)); + factory_map.emplace("cim:VoltageAdjusterDynamics", &VoltageAdjusterDynamics_factory); } void VoltageAdjusterDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void VoltageAdjusterDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VoltageAdjusterDynamics.PFVArControllerType1Dynamics"), &assign_VoltageAdjusterDynamics_PFVArControllerType1Dynamics)); + assign_map.emplace("cim:VoltageAdjusterDynamics.PFVArControllerType1Dynamics", &assign_VoltageAdjusterDynamics_PFVArControllerType1Dynamics); } void VoltageAdjusterDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/VoltageAdjusterDynamics.hpp b/CGMES_2.4.15_16FEB2016/VoltageAdjusterDynamics.hpp index 16d132c96..38c64482e 100644 --- a/CGMES_2.4.15_16FEB2016/VoltageAdjusterDynamics.hpp +++ b/CGMES_2.4.15_16FEB2016/VoltageAdjusterDynamics.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class PFVArControllerType1Dynamics; - /* - Voltage adjuster function block whose behaviour is described by reference to a standard model - */ + /** \brief Voltage adjuster function block whose behaviour is described by reference to a standard model */ class VoltageAdjusterDynamics : public DynamicsFunctionBlock { public: @@ -27,7 +25,8 @@ namespace CIMPP VoltageAdjusterDynamics(); ~VoltageAdjusterDynamics() override; - CIMPP::PFVArControllerType1Dynamics* PFVArControllerType1Dynamics; /* Power Factor or VAr controller Type I model with which this voltage adjuster is associated. Default: 0 */ + /** \brief Power Factor or VAr controller Type I model with which this voltage adjuster is associated. Default: 0 */ + CIMPP::PFVArControllerType1Dynamics* PFVArControllerType1Dynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/VoltageAdjusterUserDefined.cpp b/CGMES_2.4.15_16FEB2016/VoltageAdjusterUserDefined.cpp index 4a51799ed..c89e76a0e 100644 --- a/CGMES_2.4.15_16FEB2016/VoltageAdjusterUserDefined.cpp +++ b/CGMES_2.4.15_16FEB2016/VoltageAdjusterUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -VoltageAdjusterUserDefined::VoltageAdjusterUserDefined() {}; -VoltageAdjusterUserDefined::~VoltageAdjusterUserDefined() {}; +VoltageAdjusterUserDefined::VoltageAdjusterUserDefined() {} +VoltageAdjusterUserDefined::~VoltageAdjusterUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ VoltageAdjusterUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_VoltageAdjusterUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (VoltageAdjusterUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_VoltageAdjusterUserDefined(BaseClass*, BaseClass*); bool assign_VoltageAdjusterUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_VoltageAdjusterUserDefined_ProprietaryParameterDynamics(BaseClass* B return false; } +bool assign_VoltageAdjusterUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + VoltageAdjusterUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_VoltageAdjusterUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VoltageAdjusterUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const VoltageAdjusterUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_VoltageAdjusterUserDefined_proprietary(const BaseClass* BaseClass_ptr1, return false; } - - const char VoltageAdjusterUserDefined::debugName[] = "VoltageAdjusterUserDefined"; const char* VoltageAdjusterUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* VoltageAdjusterUserDefined::debugString() const void VoltageAdjusterUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VoltageAdjusterUserDefined"), &VoltageAdjusterUserDefined_factory)); + factory_map.emplace("cim:VoltageAdjusterUserDefined", &VoltageAdjusterUserDefined_factory); } void VoltageAdjusterUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VoltageAdjusterUserDefined.proprietary"), &assign_VoltageAdjusterUserDefined_proprietary)); + assign_map.emplace("cim:VoltageAdjusterUserDefined.proprietary", &assign_VoltageAdjusterUserDefined_proprietary); } void VoltageAdjusterUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VoltageAdjusterUserDefined.ProprietaryParameterDynamics"), &assign_VoltageAdjusterUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:VoltageAdjusterUserDefined.ProprietaryParameterDynamics", &assign_VoltageAdjusterUserDefined_ProprietaryParameterDynamics); } void VoltageAdjusterUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/VoltageAdjusterUserDefined.hpp b/CGMES_2.4.15_16FEB2016/VoltageAdjusterUserDefined.hpp index 9f9c707a9..b1e9da031 100644 --- a/CGMES_2.4.15_16FEB2016/VoltageAdjusterUserDefined.hpp +++ b/CGMES_2.4.15_16FEB2016/VoltageAdjusterUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - function block whose dynamic behaviour is described by - */ + /** \brief function block whose dynamic behaviour is described by */ class VoltageAdjusterUserDefined : public VoltageAdjusterDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP VoltageAdjusterUserDefined(); ~VoltageAdjusterUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/VoltageCompensatorDynamics.cpp b/CGMES_2.4.15_16FEB2016/VoltageCompensatorDynamics.cpp index d255c5a7b..b1b3c20fd 100644 --- a/CGMES_2.4.15_16FEB2016/VoltageCompensatorDynamics.cpp +++ b/CGMES_2.4.15_16FEB2016/VoltageCompensatorDynamics.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -VoltageCompensatorDynamics::VoltageCompensatorDynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr) {}; -VoltageCompensatorDynamics::~VoltageCompensatorDynamics() {}; +VoltageCompensatorDynamics::VoltageCompensatorDynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr) {} +VoltageCompensatorDynamics::~VoltageCompensatorDynamics() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ VoltageCompensatorDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_ExcitationSystemDynamics_VoltageCompensatorDynamics(BaseClass*, BaseClass*); bool assign_VoltageCompensatorDynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_VoltageCompensatorDynamics_ExcitationSystemDynamics(BaseClass* BaseC } return false; } + bool assign_RemoteInputSignal_VoltageCompensatorDynamics(BaseClass*, BaseClass*); bool assign_VoltageCompensatorDynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_VoltageCompensatorDynamics_RemoteInputSignal(BaseClass* BaseClass_pt return false; } - bool get_VoltageCompensatorDynamics_ExcitationSystemDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const VoltageCompensatorDynamics* element = dynamic_cast(BaseClass_ptr1)) + const VoltageCompensatorDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ExcitationSystemDynamics != 0) { @@ -100,7 +99,7 @@ const char* VoltageCompensatorDynamics::debugString() const void VoltageCompensatorDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VoltageCompensatorDynamics"), &VoltageCompensatorDynamics_factory)); + factory_map.emplace("cim:VoltageCompensatorDynamics", &VoltageCompensatorDynamics_factory); } void VoltageCompensatorDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -109,8 +108,8 @@ void VoltageCompensatorDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VoltageCompensatorDynamics.ExcitationSystemDynamics"), &assign_VoltageCompensatorDynamics_ExcitationSystemDynamics)); - assign_map.insert(std::make_pair(std::string("cim:VoltageCompensatorDynamics.RemoteInputSignal"), &assign_VoltageCompensatorDynamics_RemoteInputSignal)); + assign_map.emplace("cim:VoltageCompensatorDynamics.ExcitationSystemDynamics", &assign_VoltageCompensatorDynamics_ExcitationSystemDynamics); + assign_map.emplace("cim:VoltageCompensatorDynamics.RemoteInputSignal", &assign_VoltageCompensatorDynamics_RemoteInputSignal); } void VoltageCompensatorDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/VoltageCompensatorDynamics.hpp b/CGMES_2.4.15_16FEB2016/VoltageCompensatorDynamics.hpp index 9f1b0d557..858af27b2 100644 --- a/CGMES_2.4.15_16FEB2016/VoltageCompensatorDynamics.hpp +++ b/CGMES_2.4.15_16FEB2016/VoltageCompensatorDynamics.hpp @@ -18,9 +18,7 @@ namespace CIMPP class ExcitationSystemDynamics; class RemoteInputSignal; - /* - Voltage compensator function block whose behaviour is described by reference to a standard model - */ + /** \brief Voltage compensator function block whose behaviour is described by reference to a standard model */ class VoltageCompensatorDynamics : public DynamicsFunctionBlock { public: @@ -28,8 +26,11 @@ namespace CIMPP VoltageCompensatorDynamics(); ~VoltageCompensatorDynamics() override; - CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; /* Excitation system model with which this voltage compensator is associated. Default: 0 */ - CIMPP::RemoteInputSignal* RemoteInputSignal; /* Remote input signal used by this voltage compensator model. Default: 0 */ + /** \brief Excitation system model with which this voltage compensator is associated. Default: 0 */ + CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; + + /** \brief Remote input signal used by this voltage compensator model. Default: 0 */ + CIMPP::RemoteInputSignal* RemoteInputSignal; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/VoltageCompensatorUserDefined.cpp b/CGMES_2.4.15_16FEB2016/VoltageCompensatorUserDefined.cpp index 54c2e492b..dc3b5ff50 100644 --- a/CGMES_2.4.15_16FEB2016/VoltageCompensatorUserDefined.cpp +++ b/CGMES_2.4.15_16FEB2016/VoltageCompensatorUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -VoltageCompensatorUserDefined::VoltageCompensatorUserDefined() {}; -VoltageCompensatorUserDefined::~VoltageCompensatorUserDefined() {}; +VoltageCompensatorUserDefined::VoltageCompensatorUserDefined() {} +VoltageCompensatorUserDefined::~VoltageCompensatorUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ VoltageCompensatorUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_VoltageCompensatorUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (VoltageCompensatorUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_VoltageCompensatorUserDefined(BaseClass*, BaseClass*); bool assign_VoltageCompensatorUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_VoltageCompensatorUserDefined_ProprietaryParameterDynamics(BaseClass return false; } +bool assign_VoltageCompensatorUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + VoltageCompensatorUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_VoltageCompensatorUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VoltageCompensatorUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const VoltageCompensatorUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_VoltageCompensatorUserDefined_proprietary(const BaseClass* BaseClass_pt return false; } - - const char VoltageCompensatorUserDefined::debugName[] = "VoltageCompensatorUserDefined"; const char* VoltageCompensatorUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* VoltageCompensatorUserDefined::debugString() const void VoltageCompensatorUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VoltageCompensatorUserDefined"), &VoltageCompensatorUserDefined_factory)); + factory_map.emplace("cim:VoltageCompensatorUserDefined", &VoltageCompensatorUserDefined_factory); } void VoltageCompensatorUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VoltageCompensatorUserDefined.proprietary"), &assign_VoltageCompensatorUserDefined_proprietary)); + assign_map.emplace("cim:VoltageCompensatorUserDefined.proprietary", &assign_VoltageCompensatorUserDefined_proprietary); } void VoltageCompensatorUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VoltageCompensatorUserDefined.ProprietaryParameterDynamics"), &assign_VoltageCompensatorUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:VoltageCompensatorUserDefined.ProprietaryParameterDynamics", &assign_VoltageCompensatorUserDefined_ProprietaryParameterDynamics); } void VoltageCompensatorUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/VoltageCompensatorUserDefined.hpp b/CGMES_2.4.15_16FEB2016/VoltageCompensatorUserDefined.hpp index 924914260..7f6055be5 100644 --- a/CGMES_2.4.15_16FEB2016/VoltageCompensatorUserDefined.hpp +++ b/CGMES_2.4.15_16FEB2016/VoltageCompensatorUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Voltage compensator function block whose dynamic behaviour is described by - */ + /** \brief Voltage compensator function block whose dynamic behaviour is described by */ class VoltageCompensatorUserDefined : public VoltageCompensatorDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP VoltageCompensatorUserDefined(); ~VoltageCompensatorUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/VoltageLevel.cpp b/CGMES_2.4.15_16FEB2016/VoltageLevel.cpp index 4f42553d2..31ba7dc6a 100644 --- a/CGMES_2.4.15_16FEB2016/VoltageLevel.cpp +++ b/CGMES_2.4.15_16FEB2016/VoltageLevel.cpp @@ -11,13 +11,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "BaseVoltage.hpp" #include "Bay.hpp" #include "Substation.hpp" -#include "Voltage.hpp" -#include "Voltage.hpp" using namespace CIMPP; -VoltageLevel::VoltageLevel() : BaseVoltage(nullptr), Substation(nullptr) {}; -VoltageLevel::~VoltageLevel() {}; +VoltageLevel::VoltageLevel() : BaseVoltage(nullptr), Substation(nullptr) {} +VoltageLevel::~VoltageLevel() {} static const std::list PossibleProfilesForClass = { @@ -48,34 +46,6 @@ VoltageLevel::getPossibleProfilesForAttributes() const return map; } - -bool assign_VoltageLevel_highVoltageLimit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (VoltageLevel* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->highVoltageLimit; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_VoltageLevel_lowVoltageLimit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (VoltageLevel* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->lowVoltageLimit; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_BaseVoltage_VoltageLevel(BaseClass*, BaseClass*); bool assign_VoltageLevel_BaseVoltage(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -92,6 +62,7 @@ bool assign_VoltageLevel_BaseVoltage(BaseClass* BaseClass_ptr1, BaseClass* BaseC } return false; } + bool assign_Bay_VoltageLevel(BaseClass*, BaseClass*); bool assign_VoltageLevel_Bays(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -108,6 +79,7 @@ bool assign_VoltageLevel_Bays(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_pt } return false; } + bool assign_Substation_VoltageLevels(BaseClass*, BaseClass*); bool assign_VoltageLevel_Substation(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -125,38 +97,38 @@ bool assign_VoltageLevel_Substation(BaseClass* BaseClass_ptr1, BaseClass* BaseCl return false; } -bool get_VoltageLevel_highVoltageLimit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_VoltageLevel_highVoltageLimit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const VoltageLevel* element = dynamic_cast(BaseClass_ptr1)) + VoltageLevel* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->highVoltageLimit; - if (!buffer.str().empty()) + buffer >> element->highVoltageLimit; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_VoltageLevel_lowVoltageLimit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_VoltageLevel_lowVoltageLimit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const VoltageLevel* element = dynamic_cast(BaseClass_ptr1)) + VoltageLevel* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->lowVoltageLimit; - if (!buffer.str().empty()) + buffer >> element->lowVoltageLimit; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_VoltageLevel_BaseVoltage(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const VoltageLevel* element = dynamic_cast(BaseClass_ptr1)) + const VoltageLevel* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->BaseVoltage != 0) { @@ -167,9 +139,11 @@ bool get_VoltageLevel_BaseVoltage(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const VoltageLevel* element = dynamic_cast(BaseClass_ptr1)) + const VoltageLevel* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Substation != 0) { @@ -180,6 +154,35 @@ bool get_VoltageLevel_Substation(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->highVoltageLimit; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_VoltageLevel_lowVoltageLimit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const VoltageLevel* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->lowVoltageLimit; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char VoltageLevel::debugName[] = "VoltageLevel"; const char* VoltageLevel::debugString() const @@ -189,20 +192,20 @@ const char* VoltageLevel::debugString() const void VoltageLevel::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VoltageLevel"), &VoltageLevel_factory)); + factory_map.emplace("cim:VoltageLevel", &VoltageLevel_factory); } void VoltageLevel::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VoltageLevel.highVoltageLimit"), &assign_VoltageLevel_highVoltageLimit)); - assign_map.insert(std::make_pair(std::string("cim:VoltageLevel.lowVoltageLimit"), &assign_VoltageLevel_lowVoltageLimit)); + assign_map.emplace("cim:VoltageLevel.highVoltageLimit", &assign_VoltageLevel_highVoltageLimit); + assign_map.emplace("cim:VoltageLevel.lowVoltageLimit", &assign_VoltageLevel_lowVoltageLimit); } void VoltageLevel::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VoltageLevel.BaseVoltage"), &assign_VoltageLevel_BaseVoltage)); - assign_map.insert(std::make_pair(std::string("cim:VoltageLevel.Bays"), &assign_VoltageLevel_Bays)); - assign_map.insert(std::make_pair(std::string("cim:VoltageLevel.Substation"), &assign_VoltageLevel_Substation)); + assign_map.emplace("cim:VoltageLevel.BaseVoltage", &assign_VoltageLevel_BaseVoltage); + assign_map.emplace("cim:VoltageLevel.Bays", &assign_VoltageLevel_Bays); + assign_map.emplace("cim:VoltageLevel.Substation", &assign_VoltageLevel_Substation); } void VoltageLevel::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/VoltageLevel.hpp b/CGMES_2.4.15_16FEB2016/VoltageLevel.hpp index fe71f62cc..5b32798e6 100644 --- a/CGMES_2.4.15_16FEB2016/VoltageLevel.hpp +++ b/CGMES_2.4.15_16FEB2016/VoltageLevel.hpp @@ -20,9 +20,7 @@ namespace CIMPP class Bay; class Substation; - /* - A collection of equipment at one common system voltage forming a switchgear. The equipment typically consist of breakers, busbars, instrumentation, control, regulation and protection devices as well as assemblies of all these. - */ + /** \brief A collection of equipment at one common system voltage forming a switchgear. The equipment typically consist of breakers, busbars, instrumentation, control, regulation and protection devices as well as assemblies of all these. */ class VoltageLevel : public EquipmentContainer { public: @@ -30,11 +28,20 @@ namespace CIMPP VoltageLevel(); ~VoltageLevel() override; - CIMPP::BaseVoltage* BaseVoltage; /* The base voltage used for all equipment within the voltage level. Default: 0 */ - std::list Bays; /* The bays within this voltage level. Default: 0 */ - CIMPP::Substation* Substation; /* The substation of the voltage level. Default: 0 */ - CIMPP::Voltage highVoltageLimit; /* The bus bar`s high voltage limit Default: nullptr */ - CIMPP::Voltage lowVoltageLimit; /* The bus bar`s low voltage limit Default: nullptr */ + /** \brief The base voltage used for all equipment within the voltage level. Default: 0 */ + CIMPP::BaseVoltage* BaseVoltage; + + /** \brief The bays within this voltage level. Default: 0 */ + std::list Bays; + + /** \brief The substation of the voltage level. Default: 0 */ + CIMPP::Substation* Substation; + + /** \brief The bus bar`s high voltage limit Default: nullptr */ + CIMPP::Voltage highVoltageLimit; + + /** \brief The bus bar`s low voltage limit Default: nullptr */ + CIMPP::Voltage lowVoltageLimit; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/VoltageLimit.cpp b/CGMES_2.4.15_16FEB2016/VoltageLimit.cpp index 5eec5d9ff..b8a2d59db 100644 --- a/CGMES_2.4.15_16FEB2016/VoltageLimit.cpp +++ b/CGMES_2.4.15_16FEB2016/VoltageLimit.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Voltage.hpp" using namespace CIMPP; -VoltageLimit::VoltageLimit() {}; -VoltageLimit::~VoltageLimit() {}; +VoltageLimit::VoltageLimit() {} +VoltageLimit::~VoltageLimit() {} static const std::list PossibleProfilesForClass = { @@ -40,25 +39,24 @@ VoltageLimit::getPossibleProfilesForAttributes() const return map; } - -bool assign_VoltageLimit_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VoltageLimit_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VoltageLimit* element = dynamic_cast(BaseClass_ptr1)) + VoltageLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->value; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_VoltageLimit_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VoltageLimit* element = dynamic_cast(BaseClass_ptr1)) + const VoltageLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value; if (!buffer.str().empty()) @@ -70,8 +68,6 @@ bool get_VoltageLimit_value(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char VoltageLimit::debugName[] = "VoltageLimit"; const char* VoltageLimit::debugString() const { @@ -80,12 +76,12 @@ const char* VoltageLimit::debugString() const void VoltageLimit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VoltageLimit"), &VoltageLimit_factory)); + factory_map.emplace("cim:VoltageLimit", &VoltageLimit_factory); } void VoltageLimit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VoltageLimit.value"), &assign_VoltageLimit_value)); + assign_map.emplace("cim:VoltageLimit.value", &assign_VoltageLimit_value); } void VoltageLimit::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/VoltageLimit.hpp b/CGMES_2.4.15_16FEB2016/VoltageLimit.hpp index 8673e3ee2..7f2ddc83a 100644 --- a/CGMES_2.4.15_16FEB2016/VoltageLimit.hpp +++ b/CGMES_2.4.15_16FEB2016/VoltageLimit.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Operational limit applied to voltage. - */ + /** \brief Operational limit applied to voltage. */ class VoltageLimit : public OperationalLimit { public: @@ -27,7 +25,8 @@ namespace CIMPP VoltageLimit(); ~VoltageLimit() override; - CIMPP::Voltage value; /* Limit on voltage. High or low limit nature of the limit depends upon the properties of the operational limit type. Default: nullptr */ + /** \brief Limit on voltage. High or low limit nature of the limit depends upon the properties of the operational limit type. Default: nullptr */ + CIMPP::Voltage value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/VoltagePerReactivePower.hpp b/CGMES_2.4.15_16FEB2016/VoltagePerReactivePower.hpp index 51ef9b955..521c38a90 100644 --- a/CGMES_2.4.15_16FEB2016/VoltagePerReactivePower.hpp +++ b/CGMES_2.4.15_16FEB2016/VoltagePerReactivePower.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Voltage variation with reactive power. - */ + /** \brief Voltage variation with reactive power. */ class VoltagePerReactivePower { public: diff --git a/CGMES_2.4.15_16FEB2016/VolumeFlowRate.hpp b/CGMES_2.4.15_16FEB2016/VolumeFlowRate.hpp index 256cf7e18..4c78de832 100644 --- a/CGMES_2.4.15_16FEB2016/VolumeFlowRate.hpp +++ b/CGMES_2.4.15_16FEB2016/VolumeFlowRate.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Volume per time. - */ + /** \brief Volume per time. */ class VolumeFlowRate { public: diff --git a/CGMES_2.4.15_16FEB2016/VsCapabilityCurve.cpp b/CGMES_2.4.15_16FEB2016/VsCapabilityCurve.cpp index b1e03e9fd..5a75f1880 100644 --- a/CGMES_2.4.15_16FEB2016/VsCapabilityCurve.cpp +++ b/CGMES_2.4.15_16FEB2016/VsCapabilityCurve.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -VsCapabilityCurve::VsCapabilityCurve() {}; -VsCapabilityCurve::~VsCapabilityCurve() {}; +VsCapabilityCurve::VsCapabilityCurve() {} +VsCapabilityCurve::~VsCapabilityCurve() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ VsCapabilityCurve::getPossibleProfilesForAttributes() const return map; } - - bool assign_VsConverter_CapabilityCurve(BaseClass*, BaseClass*); bool assign_VsCapabilityCurve_VsConverterDCSides(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_VsCapabilityCurve_VsConverterDCSides(BaseClass* BaseClass_ptr1, Base } - const char VsCapabilityCurve::debugName[] = "VsCapabilityCurve"; const char* VsCapabilityCurve::debugString() const { @@ -69,7 +66,7 @@ const char* VsCapabilityCurve::debugString() const void VsCapabilityCurve::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VsCapabilityCurve"), &VsCapabilityCurve_factory)); + factory_map.emplace("cim:VsCapabilityCurve", &VsCapabilityCurve_factory); } void VsCapabilityCurve::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void VsCapabilityCurve::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VsCapabilityCurve.VsConverterDCSides"), &assign_VsCapabilityCurve_VsConverterDCSides)); + assign_map.emplace("cim:VsCapabilityCurve.VsConverterDCSides", &assign_VsCapabilityCurve_VsConverterDCSides); } void VsCapabilityCurve::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/VsCapabilityCurve.hpp b/CGMES_2.4.15_16FEB2016/VsCapabilityCurve.hpp index 7794e4b4f..9eaa77b41 100644 --- a/CGMES_2.4.15_16FEB2016/VsCapabilityCurve.hpp +++ b/CGMES_2.4.15_16FEB2016/VsCapabilityCurve.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class VsConverter; - /* - The P-Q capability curve for a voltage source converter, with P on x-axis and Qmin and Qmax on y1-axis and y2-axis. - */ + /** \brief The P-Q capability curve for a voltage source converter, with P on x-axis and Qmin and Qmax on y1-axis and y2-axis. */ class VsCapabilityCurve : public Curve { public: @@ -27,7 +25,8 @@ namespace CIMPP VsCapabilityCurve(); ~VsCapabilityCurve() override; - std::list VsConverterDCSides; /* Capability curve of this converter. Default: 0 */ + /** \brief Capability curve of this converter. Default: 0 */ + std::list VsConverterDCSides; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/VsConverter.cpp b/CGMES_2.4.15_16FEB2016/VsConverter.cpp index 18df31fb9..3cc9a7c0c 100644 --- a/CGMES_2.4.15_16FEB2016/VsConverter.cpp +++ b/CGMES_2.4.15_16FEB2016/VsConverter.cpp @@ -9,22 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "VsCapabilityCurve.hpp" -#include "AngleDegrees.hpp" -#include "PU.hpp" -#include "Resistance.hpp" -#include "Simple_Float.hpp" -#include "CurrentFlow.hpp" -#include "VsPpccControlKind.hpp" -#include "VsQpccControlKind.hpp" -#include "PerCent.hpp" -#include "ReactivePower.hpp" -#include "Voltage.hpp" -#include "Voltage.hpp" using namespace CIMPP; -VsConverter::VsConverter() : CapabilityCurve(nullptr) {}; -VsConverter::~VsConverter() {}; +VsConverter::VsConverter() : CapabilityCurve(nullptr) {} +VsConverter::~VsConverter() {} static const std::list PossibleProfilesForClass = { @@ -64,171 +53,195 @@ VsConverter::getPossibleProfilesForAttributes() const return map; } +bool assign_VsCapabilityCurve_VsConverterDCSides(BaseClass*, BaseClass*); +bool assign_VsConverter_CapabilityCurve(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + VsConverter* element = dynamic_cast(BaseClass_ptr1); + VsCapabilityCurve* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->CapabilityCurve != element2) + { + element->CapabilityCurve = element2; + return assign_VsCapabilityCurve_VsConverterDCSides(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_VsConverter_delta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_delta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->delta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_droop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_droop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->droop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_droopCompensation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_droopCompensation(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->droopCompensation; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_maxModulationIndex(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_maxModulationIndex(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxModulationIndex; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_maxValveCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_maxValveCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxValveCurrent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_pPccControl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_pPccControl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pPccControl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_qPccControl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_qPccControl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qPccControl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_qShare(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_qShare(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qShare; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_targetQpcc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_targetQpcc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->targetQpcc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_targetUpcc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_targetUpcc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->targetUpcc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_uf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_uf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_VsCapabilityCurve_VsConverterDCSides(BaseClass*, BaseClass*); -bool assign_VsConverter_CapabilityCurve(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_VsConverter_CapabilityCurve(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - VsConverter* element = dynamic_cast(BaseClass_ptr1); - VsCapabilityCurve* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->CapabilityCurve != element2) + if (element->CapabilityCurve != 0) { - element->CapabilityCurve = element2; - return assign_VsCapabilityCurve_VsConverterDCSides(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->CapabilityCurve); + return true; } - return true; } return false; } bool get_VsConverter_delta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->delta; if (!buffer.str().empty()) @@ -242,7 +255,8 @@ bool get_VsConverter_delta(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_VsConverter_droop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->droop; if (!buffer.str().empty()) @@ -256,7 +270,8 @@ bool get_VsConverter_droop(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_VsConverter_droopCompensation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->droopCompensation; if (!buffer.str().empty()) @@ -270,7 +285,8 @@ bool get_VsConverter_droopCompensation(const BaseClass* BaseClass_ptr1, std::str bool get_VsConverter_maxModulationIndex(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxModulationIndex; if (!buffer.str().empty()) @@ -284,7 +300,8 @@ bool get_VsConverter_maxModulationIndex(const BaseClass* BaseClass_ptr1, std::st bool get_VsConverter_maxValveCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxValveCurrent; if (!buffer.str().empty()) @@ -296,11 +313,12 @@ bool get_VsConverter_maxValveCurrent(const BaseClass* BaseClass_ptr1, std::strin return false; } -bool get_VsConverter_qShare(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_VsConverter_pPccControl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->qShare; + buffer << element->pPccControl; if (!buffer.str().empty()) { return true; @@ -310,11 +328,12 @@ bool get_VsConverter_qShare(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } -bool get_VsConverter_targetQpcc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_VsConverter_qPccControl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->targetQpcc; + buffer << element->qPccControl; if (!buffer.str().empty()) { return true; @@ -324,11 +343,12 @@ bool get_VsConverter_targetQpcc(const BaseClass* BaseClass_ptr1, std::stringstre return false; } -bool get_VsConverter_targetUpcc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_VsConverter_qShare(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->targetUpcc; + buffer << element->qShare; if (!buffer.str().empty()) { return true; @@ -338,11 +358,12 @@ bool get_VsConverter_targetUpcc(const BaseClass* BaseClass_ptr1, std::stringstre return false; } -bool get_VsConverter_uf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_VsConverter_targetQpcc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->uf; + buffer << element->targetQpcc; if (!buffer.str().empty()) { return true; @@ -352,26 +373,12 @@ bool get_VsConverter_uf(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - -bool get_VsConverter_CapabilityCurve(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->CapabilityCurve != 0) - { - BaseClass_list.push_back(element->CapabilityCurve); - return true; - } - } - return false; -} - - -bool get_VsConverter_pPccControl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_VsConverter_targetUpcc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->pPccControl; + buffer << element->targetUpcc; if (!buffer.str().empty()) { return true; @@ -381,11 +388,12 @@ bool get_VsConverter_pPccControl(const BaseClass* BaseClass_ptr1, std::stringstr return false; } -bool get_VsConverter_qPccControl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_VsConverter_uf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->qPccControl; + buffer << element->uf; if (!buffer.str().empty()) { return true; @@ -403,27 +411,27 @@ const char* VsConverter::debugString() const void VsConverter::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VsConverter"), &VsConverter_factory)); + factory_map.emplace("cim:VsConverter", &VsConverter_factory); } void VsConverter::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VsConverter.delta"), &assign_VsConverter_delta)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.droop"), &assign_VsConverter_droop)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.droopCompensation"), &assign_VsConverter_droopCompensation)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.maxModulationIndex"), &assign_VsConverter_maxModulationIndex)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.maxValveCurrent"), &assign_VsConverter_maxValveCurrent)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.pPccControl"), &assign_VsConverter_pPccControl)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.qPccControl"), &assign_VsConverter_qPccControl)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.qShare"), &assign_VsConverter_qShare)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.targetQpcc"), &assign_VsConverter_targetQpcc)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.targetUpcc"), &assign_VsConverter_targetUpcc)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.uf"), &assign_VsConverter_uf)); + assign_map.emplace("cim:VsConverter.delta", &assign_VsConverter_delta); + assign_map.emplace("cim:VsConverter.droop", &assign_VsConverter_droop); + assign_map.emplace("cim:VsConverter.droopCompensation", &assign_VsConverter_droopCompensation); + assign_map.emplace("cim:VsConverter.maxModulationIndex", &assign_VsConverter_maxModulationIndex); + assign_map.emplace("cim:VsConverter.maxValveCurrent", &assign_VsConverter_maxValveCurrent); + assign_map.emplace("cim:VsConverter.pPccControl", &assign_VsConverter_pPccControl); + assign_map.emplace("cim:VsConverter.qPccControl", &assign_VsConverter_qPccControl); + assign_map.emplace("cim:VsConverter.qShare", &assign_VsConverter_qShare); + assign_map.emplace("cim:VsConverter.targetQpcc", &assign_VsConverter_targetQpcc); + assign_map.emplace("cim:VsConverter.targetUpcc", &assign_VsConverter_targetUpcc); + assign_map.emplace("cim:VsConverter.uf", &assign_VsConverter_uf); } void VsConverter::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VsConverter.CapabilityCurve"), &assign_VsConverter_CapabilityCurve)); + assign_map.emplace("cim:VsConverter.CapabilityCurve", &assign_VsConverter_CapabilityCurve); } void VsConverter::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/VsConverter.hpp b/CGMES_2.4.15_16FEB2016/VsConverter.hpp index 37bf00c28..046abdfd8 100644 --- a/CGMES_2.4.15_16FEB2016/VsConverter.hpp +++ b/CGMES_2.4.15_16FEB2016/VsConverter.hpp @@ -27,9 +27,7 @@ namespace CIMPP { class VsCapabilityCurve; - /* - DC side of the voltage source converter (VSC). - */ + /** \brief DC side of the voltage source converter (VSC). */ class VsConverter : public ACDCConverter { public: @@ -37,18 +35,41 @@ namespace CIMPP VsConverter(); ~VsConverter() override; - CIMPP::VsCapabilityCurve* CapabilityCurve; /* All converters with this capability curve. Default: 0 */ - CIMPP::AngleDegrees delta; /* Angle between uf and uc. Converter state variable used in power flow. Default: nullptr */ - CIMPP::PU droop; /* Droop constant; pu value is obtained as D [kV^2 / MW] x Sb / Ubdc^2. Default: nullptr */ - CIMPP::Resistance droopCompensation; /* Compensation (resistance) constant. Used to compensate for voltage drop when controlling voltage at a distant bus. Default: nullptr */ - CIMPP::Simple_Float maxModulationIndex; /* The max quotient between the AC converter voltage (Uc) and DC voltage (Ud). A factor typically less than 1. VSC configuration data used in power flow. Default: nullptr */ - CIMPP::CurrentFlow maxValveCurrent; /* The maximum current through a valve. This current limit is the basis for calculating the capability diagram. VSC configuration data. Default: nullptr */ - CIMPP::VsPpccControlKind pPccControl; /* Kind of control of real power and/or DC voltage. Default: 0 */ - CIMPP::VsQpccControlKind qPccControl; /* Default: 0 */ - CIMPP::PerCent qShare; /* Reactive power sharing factor among parallel converters on Uac control. Default: nullptr */ - CIMPP::ReactivePower targetQpcc; /* Reactive power injection target in AC grid, at point of common coupling. Default: nullptr */ - CIMPP::Voltage targetUpcc; /* Voltage target in AC grid, at point of common coupling. Default: nullptr */ - CIMPP::Voltage uf; /* Filter bus voltage. Converter state variable, result from power flow. Default: nullptr */ + /** \brief All converters with this capability curve. Default: 0 */ + CIMPP::VsCapabilityCurve* CapabilityCurve; + + /** \brief Angle between uf and uc. Converter state variable used in power flow. Default: nullptr */ + CIMPP::AngleDegrees delta; + + /** \brief Droop constant; pu value is obtained as D [kV^2 / MW] x Sb / Ubdc^2. Default: nullptr */ + CIMPP::PU droop; + + /** \brief Compensation (resistance) constant. Used to compensate for voltage drop when controlling voltage at a distant bus. Default: nullptr */ + CIMPP::Resistance droopCompensation; + + /** \brief The max quotient between the AC converter voltage (Uc) and DC voltage (Ud). A factor typically less than 1. VSC configuration data used in power flow. Default: nullptr */ + CIMPP::Simple_Float maxModulationIndex; + + /** \brief The maximum current through a valve. This current limit is the basis for calculating the capability diagram. VSC configuration data. Default: nullptr */ + CIMPP::CurrentFlow maxValveCurrent; + + /** \brief Kind of control of real power and/or DC voltage. Default: 0 */ + CIMPP::VsPpccControlKind pPccControl; + + /** \brief Default: 0 */ + CIMPP::VsQpccControlKind qPccControl; + + /** \brief Reactive power sharing factor among parallel converters on Uac control. Default: nullptr */ + CIMPP::PerCent qShare; + + /** \brief Reactive power injection target in AC grid, at point of common coupling. Default: nullptr */ + CIMPP::ReactivePower targetQpcc; + + /** \brief Voltage target in AC grid, at point of common coupling. Default: nullptr */ + CIMPP::Voltage targetUpcc; + + /** \brief Filter bus voltage. Converter state variable, result from power flow. Default: nullptr */ + CIMPP::Voltage uf; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/VsPpccControlKind.cpp b/CGMES_2.4.15_16FEB2016/VsPpccControlKind.cpp index bc8b2d84a..9fc07a8bc 100644 --- a/CGMES_2.4.15_16FEB2016/VsPpccControlKind.cpp +++ b/CGMES_2.4.15_16FEB2016/VsPpccControlKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "VsPpccControlKind") + if (EnumSymbol.substr(0, pos) != "VsPpccControlKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,27 +50,27 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "pPcc") + if (EnumSymbol == "pPcc") { rop = VsPpccControlKind::pPcc; return lop; } - if(EnumSymbol == "udc") + if (EnumSymbol == "udc") { rop = VsPpccControlKind::udc; return lop; } - if(EnumSymbol == "pPccAndUdcDroop") + if (EnumSymbol == "pPccAndUdcDroop") { rop = VsPpccControlKind::pPccAndUdcDroop; return lop; } - if(EnumSymbol == "pPccAndUdcDroopWithCompensation") + if (EnumSymbol == "pPccAndUdcDroopWithCompensation") { rop = VsPpccControlKind::pPccAndUdcDroopWithCompensation; return lop; } - if(EnumSymbol == "pPccAndUdcDroopPilot") + if (EnumSymbol == "pPccAndUdcDroopPilot") { rop = VsPpccControlKind::pPccAndUdcDroopPilot; return lop; diff --git a/CGMES_2.4.15_16FEB2016/VsPpccControlKind.hpp b/CGMES_2.4.15_16FEB2016/VsPpccControlKind.hpp index 3aec56bb0..b7f76babe 100644 --- a/CGMES_2.4.15_16FEB2016/VsPpccControlKind.hpp +++ b/CGMES_2.4.15_16FEB2016/VsPpccControlKind.hpp @@ -9,33 +9,21 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Types applicable to the control of real power and/or DC voltage by voltage source converter. - */ + /** \brief Types applicable to the control of real power and/or DC voltage by voltage source converter. */ class VsPpccControlKind { public: enum VsPpccControlKind_ENUM { - /** - * Control variable (target) is real power at PCC bus. - */ + /** Control variable (target) is real power at PCC bus. */ pPcc, - /** - * Control variable (target) is DC voltage and real power at PCC bus is derived. - */ + /** Control variable (target) is DC voltage and real power at PCC bus is derived. */ udc, - /** - * Control variables (targets) are both active power at point of common coupling and local DC voltage, with the droop. - */ + /** Control variables (targets) are both active power at point of common coupling and local DC voltage, with the droop. */ pPccAndUdcDroop, - /** - * Control variables (targets) are both active power at point of common coupling and compensated DC voltage, with the droop; compensation factor is the resistance, as an approximation of the DC voltage of a common (real or virtual) node in the DC network. - */ + /** Control variables (targets) are both active power at point of common coupling and compensated DC voltage, with the droop; compensation factor is the resistance, as an approximation of the DC voltage of a common (real or virtual) node in the DC network. */ pPccAndUdcDroopWithCompensation, - /** - * Control variables (targets) are both active power at point of common coupling and the pilot DC voltage, with the droop. - */ + /** Control variables (targets) are both active power at point of common coupling and the pilot DC voltage, with the droop. */ pPccAndUdcDroopPilot, }; diff --git a/CGMES_2.4.15_16FEB2016/VsQpccControlKind.cpp b/CGMES_2.4.15_16FEB2016/VsQpccControlKind.cpp index 7f438e41c..34cd1e0de 100644 --- a/CGMES_2.4.15_16FEB2016/VsQpccControlKind.cpp +++ b/CGMES_2.4.15_16FEB2016/VsQpccControlKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "VsQpccControlKind") + if (EnumSymbol.substr(0, pos) != "VsQpccControlKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "reactivePcc") + if (EnumSymbol == "reactivePcc") { rop = VsQpccControlKind::reactivePcc; return lop; } - if(EnumSymbol == "voltagePcc") + if (EnumSymbol == "voltagePcc") { rop = VsQpccControlKind::voltagePcc; return lop; } - if(EnumSymbol == "powerFactorPcc") + if (EnumSymbol == "powerFactorPcc") { rop = VsQpccControlKind::powerFactorPcc; return lop; diff --git a/CGMES_2.4.15_16FEB2016/WindAeroConstIEC.cpp b/CGMES_2.4.15_16FEB2016/WindAeroConstIEC.cpp index 0b2323f45..62ae00aaa 100644 --- a/CGMES_2.4.15_16FEB2016/WindAeroConstIEC.cpp +++ b/CGMES_2.4.15_16FEB2016/WindAeroConstIEC.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindAeroConstIEC::WindAeroConstIEC() : WindGenTurbineType1IEC(nullptr) {}; -WindAeroConstIEC::~WindAeroConstIEC() {}; +WindAeroConstIEC::WindAeroConstIEC() : WindGenTurbineType1IEC(nullptr) {} +WindAeroConstIEC::~WindAeroConstIEC() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ WindAeroConstIEC::getPossibleProfilesForAttributes() const return map; } - - bool assign_WindGenTurbineType1IEC_WindAeroConstIEC(BaseClass*, BaseClass*); bool assign_WindAeroConstIEC_WindGenTurbineType1IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_WindAeroConstIEC_WindGenTurbineType1IEC(BaseClass* BaseClass_ptr1, B } - const char WindAeroConstIEC::debugName[] = "WindAeroConstIEC"; const char* WindAeroConstIEC::debugString() const { @@ -69,7 +66,7 @@ const char* WindAeroConstIEC::debugString() const void WindAeroConstIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindAeroConstIEC"), &WindAeroConstIEC_factory)); + factory_map.emplace("cim:WindAeroConstIEC", &WindAeroConstIEC_factory); } void WindAeroConstIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void WindAeroConstIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindAeroConstIEC.WindGenTurbineType1IEC"), &assign_WindAeroConstIEC_WindGenTurbineType1IEC)); + assign_map.emplace("cim:WindAeroConstIEC.WindGenTurbineType1IEC", &assign_WindAeroConstIEC_WindGenTurbineType1IEC); } void WindAeroConstIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/WindAeroConstIEC.hpp b/CGMES_2.4.15_16FEB2016/WindAeroConstIEC.hpp index a36d11654..f6ed16d26 100644 --- a/CGMES_2.4.15_16FEB2016/WindAeroConstIEC.hpp +++ b/CGMES_2.4.15_16FEB2016/WindAeroConstIEC.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class WindGenTurbineType1IEC; - /* - The constant aerodynamic torque model assumes that the aerodynamic torque is constant. Reference: IEC Standard 61400-27-1 Section 6.6.1.1. - */ + /** \brief The constant aerodynamic torque model assumes that the aerodynamic torque is constant. Reference: IEC Standard 61400-27-1 Section 6.6.1.1. */ class WindAeroConstIEC : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP WindAeroConstIEC(); ~WindAeroConstIEC() override; - CIMPP::WindGenTurbineType1IEC* WindGenTurbineType1IEC; /* Wind turbine type 1 model with which this wind aerodynamic model is associated. Default: 0 */ + /** \brief Wind turbine type 1 model with which this wind aerodynamic model is associated. Default: 0 */ + CIMPP::WindGenTurbineType1IEC* WindGenTurbineType1IEC; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/WindAeroLinearIEC.cpp b/CGMES_2.4.15_16FEB2016/WindAeroLinearIEC.cpp index bc59b364a..9301ffa49 100644 --- a/CGMES_2.4.15_16FEB2016/WindAeroLinearIEC.cpp +++ b/CGMES_2.4.15_16FEB2016/WindAeroLinearIEC.cpp @@ -9,16 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "WindGenTurbineType3IEC.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "AngleDegrees.hpp" using namespace CIMPP; -WindAeroLinearIEC::WindAeroLinearIEC() : WindGenTurbineType3IEC(nullptr) {}; -WindAeroLinearIEC::~WindAeroLinearIEC() {}; +WindAeroLinearIEC::WindAeroLinearIEC() : WindGenTurbineType3IEC(nullptr) {} +WindAeroLinearIEC::~WindAeroLinearIEC() {} static const std::list PossibleProfilesForClass = { @@ -50,93 +45,98 @@ WindAeroLinearIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindAeroLinearIEC_dpomega(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType3IEC_WindAeroLinearIEC(BaseClass*, BaseClass*); +bool assign_WindAeroLinearIEC_WindGenTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1)) + WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1); + WindGenTurbineType3IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->dpomega; - if (buffer.fail()) - return false; - else - return true; + if (element->WindGenTurbineType3IEC != element2) + { + element->WindGenTurbineType3IEC = element2; + return assign_WindGenTurbineType3IEC_WindAeroLinearIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindAeroLinearIEC_dptheta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindAeroLinearIEC_dpomega(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1)) + WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->dptheta; - if (buffer.fail()) - return false; - else + buffer >> element->dpomega; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindAeroLinearIEC_omegazero(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindAeroLinearIEC_dptheta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1)) + WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->omegazero; - if (buffer.fail()) - return false; - else + buffer >> element->dptheta; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindAeroLinearIEC_pavail(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindAeroLinearIEC_omegazero(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1)) + WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->pavail; - if (buffer.fail()) - return false; - else + buffer >> element->omegazero; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindAeroLinearIEC_thetazero(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindAeroLinearIEC_pavail(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1)) + WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->thetazero; - if (buffer.fail()) - return false; - else + buffer >> element->pavail; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindGenTurbineType3IEC_WindAeroLinearIEC(BaseClass*, BaseClass*); -bool assign_WindAeroLinearIEC_WindGenTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindAeroLinearIEC_thetazero(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1); - WindGenTurbineType3IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindGenTurbineType3IEC != element2) + buffer >> element->thetazero; + if (!buffer.fail()) { - element->WindGenTurbineType3IEC = element2; - return assign_WindGenTurbineType3IEC_WindAeroLinearIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_WindAeroLinearIEC_dpomega(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dpomega; if (!buffer.str().empty()) @@ -150,7 +150,8 @@ bool get_WindAeroLinearIEC_dpomega(const BaseClass* BaseClass_ptr1, std::strings bool get_WindAeroLinearIEC_dptheta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dptheta; if (!buffer.str().empty()) @@ -164,7 +165,8 @@ bool get_WindAeroLinearIEC_dptheta(const BaseClass* BaseClass_ptr1, std::strings bool get_WindAeroLinearIEC_omegazero(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->omegazero; if (!buffer.str().empty()) @@ -178,7 +180,8 @@ bool get_WindAeroLinearIEC_omegazero(const BaseClass* BaseClass_ptr1, std::strin bool get_WindAeroLinearIEC_pavail(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pavail; if (!buffer.str().empty()) @@ -192,7 +195,8 @@ bool get_WindAeroLinearIEC_pavail(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindAeroLinearIEC_thetazero(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thetazero; if (!buffer.str().empty()) @@ -204,8 +208,6 @@ bool get_WindAeroLinearIEC_thetazero(const BaseClass* BaseClass_ptr1, std::strin return false; } - - const char WindAeroLinearIEC::debugName[] = "WindAeroLinearIEC"; const char* WindAeroLinearIEC::debugString() const { @@ -214,21 +216,21 @@ const char* WindAeroLinearIEC::debugString() const void WindAeroLinearIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindAeroLinearIEC"), &WindAeroLinearIEC_factory)); + factory_map.emplace("cim:WindAeroLinearIEC", &WindAeroLinearIEC_factory); } void WindAeroLinearIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindAeroLinearIEC.dpomega"), &assign_WindAeroLinearIEC_dpomega)); - assign_map.insert(std::make_pair(std::string("cim:WindAeroLinearIEC.dptheta"), &assign_WindAeroLinearIEC_dptheta)); - assign_map.insert(std::make_pair(std::string("cim:WindAeroLinearIEC.omegazero"), &assign_WindAeroLinearIEC_omegazero)); - assign_map.insert(std::make_pair(std::string("cim:WindAeroLinearIEC.pavail"), &assign_WindAeroLinearIEC_pavail)); - assign_map.insert(std::make_pair(std::string("cim:WindAeroLinearIEC.thetazero"), &assign_WindAeroLinearIEC_thetazero)); + assign_map.emplace("cim:WindAeroLinearIEC.dpomega", &assign_WindAeroLinearIEC_dpomega); + assign_map.emplace("cim:WindAeroLinearIEC.dptheta", &assign_WindAeroLinearIEC_dptheta); + assign_map.emplace("cim:WindAeroLinearIEC.omegazero", &assign_WindAeroLinearIEC_omegazero); + assign_map.emplace("cim:WindAeroLinearIEC.pavail", &assign_WindAeroLinearIEC_pavail); + assign_map.emplace("cim:WindAeroLinearIEC.thetazero", &assign_WindAeroLinearIEC_thetazero); } void WindAeroLinearIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindAeroLinearIEC.WindGenTurbineType3IEC"), &assign_WindAeroLinearIEC_WindGenTurbineType3IEC)); + assign_map.emplace("cim:WindAeroLinearIEC.WindGenTurbineType3IEC", &assign_WindAeroLinearIEC_WindGenTurbineType3IEC); } void WindAeroLinearIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/WindAeroLinearIEC.hpp b/CGMES_2.4.15_16FEB2016/WindAeroLinearIEC.hpp index d7d0521b1..0e71d0eb4 100644 --- a/CGMES_2.4.15_16FEB2016/WindAeroLinearIEC.hpp +++ b/CGMES_2.4.15_16FEB2016/WindAeroLinearIEC.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class WindGenTurbineType3IEC; - /* - The linearised aerodynamic model. Reference: IEC Standard 614000-27-1 Section 6.6.1.2. - */ + /** \brief The linearised aerodynamic model. Reference: IEC Standard 614000-27-1 Section 6.6.1.2. */ class WindAeroLinearIEC : public IdentifiedObject { public: @@ -29,12 +27,23 @@ namespace CIMPP WindAeroLinearIEC(); ~WindAeroLinearIEC() override; - CIMPP::WindGenTurbineType3IEC* WindGenTurbineType3IEC; /* Wind generator type 3 model with which this wind aerodynamic model is associated. Default: 0 */ - CIMPP::PU dpomega; /* Partial derivative of aerodynamic power with respect to changes in WTR speed (). It is case dependent parameter. Default: nullptr */ - CIMPP::PU dptheta; /* Partial derivative of aerodynamic power with respect to changes in pitch angle (). It is case dependent parameter. Default: nullptr */ - CIMPP::PU omegazero; /* Rotor speed if the wind turbine is not derated (). It is case dependent parameter. Default: nullptr */ - CIMPP::PU pavail; /* Available aerodynamic power (). It is case dependent parameter. Default: nullptr */ - CIMPP::AngleDegrees thetazero; /* Pitch angle if the wind turbine is not derated (). It is case dependent parameter. Default: nullptr */ + /** \brief Wind generator type 3 model with which this wind aerodynamic model is associated. Default: 0 */ + CIMPP::WindGenTurbineType3IEC* WindGenTurbineType3IEC; + + /** \brief Partial derivative of aerodynamic power with respect to changes in WTR speed (). It is case dependent parameter. Default: nullptr */ + CIMPP::PU dpomega; + + /** \brief Partial derivative of aerodynamic power with respect to changes in pitch angle (). It is case dependent parameter. Default: nullptr */ + CIMPP::PU dptheta; + + /** \brief Rotor speed if the wind turbine is not derated (). It is case dependent parameter. Default: nullptr */ + CIMPP::PU omegazero; + + /** \brief Available aerodynamic power (). It is case dependent parameter. Default: nullptr */ + CIMPP::PU pavail; + + /** \brief Pitch angle if the wind turbine is not derated (). It is case dependent parameter. Default: nullptr */ + CIMPP::AngleDegrees thetazero; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/WindContCurrLimIEC.cpp b/CGMES_2.4.15_16FEB2016/WindContCurrLimIEC.cpp index 917cb4c05..68e2ece08 100644 --- a/CGMES_2.4.15_16FEB2016/WindContCurrLimIEC.cpp +++ b/CGMES_2.4.15_16FEB2016/WindContCurrLimIEC.cpp @@ -10,16 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindDynamicsLookupTable.hpp" #include "WindTurbineType3or4IEC.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" using namespace CIMPP; -WindContCurrLimIEC::WindContCurrLimIEC() : WindTurbineType3or4IEC(nullptr) {}; -WindContCurrLimIEC::~WindContCurrLimIEC() {}; +WindContCurrLimIEC::WindContCurrLimIEC() : WindTurbineType3or4IEC(nullptr) {} +WindContCurrLimIEC::~WindContCurrLimIEC() {} static const std::list PossibleProfilesForClass = { @@ -52,109 +47,116 @@ WindContCurrLimIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindContCurrLimIEC_imax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindDynamicsLookupTable_WindContCurrLimIEC(BaseClass*, BaseClass*); +bool assign_WindContCurrLimIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->imax; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) + { + element->WindDynamicsLookupTable.push_back(element2); + return assign_WindDynamicsLookupTable_WindContCurrLimIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindContCurrLimIEC_imaxdip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType3or4IEC_WindContCurrLimIEC(BaseClass*, BaseClass*); +bool assign_WindContCurrLimIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType3or4IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->imaxdip; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType3or4IEC != element2) + { + element->WindTurbineType3or4IEC = element2; + return assign_WindTurbineType3or4IEC_WindContCurrLimIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindContCurrLimIEC_mdfslim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContCurrLimIEC_imax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->mdfslim; - if (buffer.fail()) - return false; - else + buffer >> element->imax; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContCurrLimIEC_mqpri(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContCurrLimIEC_imaxdip(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->mqpri; - if (buffer.fail()) - return false; - else + buffer >> element->imaxdip; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContCurrLimIEC_tufilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContCurrLimIEC_mdfslim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tufilt; - if (buffer.fail()) - return false; - else + buffer >> element->mdfslim; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindDynamicsLookupTable_WindContCurrLimIEC(BaseClass*, BaseClass*); -bool assign_WindContCurrLimIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindContCurrLimIEC_mqpri(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); - WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) + buffer >> element->mqpri; + if (!buffer.fail()) { - element->WindDynamicsLookupTable.push_back(element2); - return assign_WindDynamicsLookupTable_WindContCurrLimIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_WindTurbineType3or4IEC_WindContCurrLimIEC(BaseClass*, BaseClass*); -bool assign_WindContCurrLimIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_WindContCurrLimIEC_tufilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType3or4IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType3or4IEC != element2) + buffer >> element->tufilt; + if (!buffer.fail()) { - element->WindTurbineType3or4IEC = element2; - return assign_WindTurbineType3or4IEC_WindContCurrLimIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + + bool get_WindContCurrLimIEC_imax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->imax; if (!buffer.str().empty()) @@ -168,7 +170,8 @@ bool get_WindContCurrLimIEC_imax(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindContCurrLimIEC_imaxdip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->imaxdip; if (!buffer.str().empty()) @@ -182,7 +185,8 @@ bool get_WindContCurrLimIEC_imaxdip(const BaseClass* BaseClass_ptr1, std::string bool get_WindContCurrLimIEC_mdfslim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mdfslim; if (!buffer.str().empty()) @@ -196,7 +200,8 @@ bool get_WindContCurrLimIEC_mdfslim(const BaseClass* BaseClass_ptr1, std::string bool get_WindContCurrLimIEC_mqpri(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mqpri; if (!buffer.str().empty()) @@ -210,7 +215,8 @@ bool get_WindContCurrLimIEC_mqpri(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindContCurrLimIEC_tufilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tufilt; if (!buffer.str().empty()) @@ -222,8 +228,6 @@ bool get_WindContCurrLimIEC_tufilt(const BaseClass* BaseClass_ptr1, std::strings return false; } - - const char WindContCurrLimIEC::debugName[] = "WindContCurrLimIEC"; const char* WindContCurrLimIEC::debugString() const { @@ -232,22 +236,22 @@ const char* WindContCurrLimIEC::debugString() const void WindContCurrLimIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindContCurrLimIEC"), &WindContCurrLimIEC_factory)); + factory_map.emplace("cim:WindContCurrLimIEC", &WindContCurrLimIEC_factory); } void WindContCurrLimIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContCurrLimIEC.imax"), &assign_WindContCurrLimIEC_imax)); - assign_map.insert(std::make_pair(std::string("cim:WindContCurrLimIEC.imaxdip"), &assign_WindContCurrLimIEC_imaxdip)); - assign_map.insert(std::make_pair(std::string("cim:WindContCurrLimIEC.mdfslim"), &assign_WindContCurrLimIEC_mdfslim)); - assign_map.insert(std::make_pair(std::string("cim:WindContCurrLimIEC.mqpri"), &assign_WindContCurrLimIEC_mqpri)); - assign_map.insert(std::make_pair(std::string("cim:WindContCurrLimIEC.tufilt"), &assign_WindContCurrLimIEC_tufilt)); + assign_map.emplace("cim:WindContCurrLimIEC.imax", &assign_WindContCurrLimIEC_imax); + assign_map.emplace("cim:WindContCurrLimIEC.imaxdip", &assign_WindContCurrLimIEC_imaxdip); + assign_map.emplace("cim:WindContCurrLimIEC.mdfslim", &assign_WindContCurrLimIEC_mdfslim); + assign_map.emplace("cim:WindContCurrLimIEC.mqpri", &assign_WindContCurrLimIEC_mqpri); + assign_map.emplace("cim:WindContCurrLimIEC.tufilt", &assign_WindContCurrLimIEC_tufilt); } void WindContCurrLimIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContCurrLimIEC.WindDynamicsLookupTable"), &assign_WindContCurrLimIEC_WindDynamicsLookupTable)); - assign_map.insert(std::make_pair(std::string("cim:WindContCurrLimIEC.WindTurbineType3or4IEC"), &assign_WindContCurrLimIEC_WindTurbineType3or4IEC)); + assign_map.emplace("cim:WindContCurrLimIEC.WindDynamicsLookupTable", &assign_WindContCurrLimIEC_WindDynamicsLookupTable); + assign_map.emplace("cim:WindContCurrLimIEC.WindTurbineType3or4IEC", &assign_WindContCurrLimIEC_WindTurbineType3or4IEC); } void WindContCurrLimIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/WindContCurrLimIEC.hpp b/CGMES_2.4.15_16FEB2016/WindContCurrLimIEC.hpp index 96153b35a..eee20358c 100644 --- a/CGMES_2.4.15_16FEB2016/WindContCurrLimIEC.hpp +++ b/CGMES_2.4.15_16FEB2016/WindContCurrLimIEC.hpp @@ -21,9 +21,7 @@ namespace CIMPP class WindDynamicsLookupTable; class WindTurbineType3or4IEC; - /* - Current limitation model. The current limitation model combines the physical limits. Reference: IEC Standard 61400-27-1 Section 6.6.5.7. - */ + /** \brief Current limitation model. The current limitation model combines the physical limits. Reference: IEC Standard 61400-27-1 Section 6.6.5.7. */ class WindContCurrLimIEC : public IdentifiedObject { public: @@ -31,13 +29,26 @@ namespace CIMPP WindContCurrLimIEC(); ~WindContCurrLimIEC() override; - std::list WindDynamicsLookupTable; /* The current control limitation model with which this wind dynamics lookup table is associated. Default: 0 */ - CIMPP::WindTurbineType3or4IEC* WindTurbineType3or4IEC; /* Wind turbine type 3 or 4 model with which this wind control current limitation model is associated. Default: 0 */ - CIMPP::PU imax; /* Maximum continuous current at the wind turbine terminals (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU imaxdip; /* Maximum current during voltage dip at the wind turbine terminals (). It is project dependent parameter. Default: nullptr */ - CIMPP::Boolean mdfslim; /* Limitation of type 3 stator current (): - false=0: total current limitation, - true=1: stator current limitation). It is type dependent parameter. Default: false */ - CIMPP::Boolean mqpri; /* Prioritisation of q control during LVRT (): - true = 1: reactive power priority, - false = 0: active power priority. It is project dependent parameter. Default: false */ - CIMPP::Seconds tufilt; /* Voltage measurement filter time constant (). It is type dependent parameter. Default: nullptr */ + /** \brief The current control limitation model with which this wind dynamics lookup table is associated. Default: 0 */ + std::list WindDynamicsLookupTable; + + /** \brief Wind turbine type 3 or 4 model with which this wind control current limitation model is associated. Default: 0 */ + CIMPP::WindTurbineType3or4IEC* WindTurbineType3or4IEC; + + /** \brief Maximum continuous current at the wind turbine terminals (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU imax; + + /** \brief Maximum current during voltage dip at the wind turbine terminals (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU imaxdip; + + /** \brief Limitation of type 3 stator current (): - false=0: total current limitation, - true=1: stator current limitation). It is type dependent parameter. Default: false */ + CIMPP::Boolean mdfslim; + + /** \brief Prioritisation of q control during LVRT (): - true = 1: reactive power priority, - false = 0: active power priority. It is project dependent parameter. Default: false */ + CIMPP::Boolean mqpri; + + /** \brief Voltage measurement filter time constant (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tufilt; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/WindContPType3IEC.cpp b/CGMES_2.4.15_16FEB2016/WindContPType3IEC.cpp index c34b16422..441be1a61 100644 --- a/CGMES_2.4.15_16FEB2016/WindContPType3IEC.cpp +++ b/CGMES_2.4.15_16FEB2016/WindContPType3IEC.cpp @@ -10,32 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindDynamicsLookupTable.hpp" #include "WindGenTurbineType3IEC.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -WindContPType3IEC::WindContPType3IEC() : WindGenTurbineType3IEC(nullptr) {}; -WindContPType3IEC::~WindContPType3IEC() {}; +WindContPType3IEC::WindContPType3IEC() : WindGenTurbineType3IEC(nullptr) {} +WindContPType3IEC::~WindContPType3IEC() {} static const std::list PossibleProfilesForClass = { @@ -84,317 +63,340 @@ WindContPType3IEC::getPossibleProfilesForAttributes() const return map; } +bool assign_WindDynamicsLookupTable_WindContPType3IEC(BaseClass*, BaseClass*); +bool assign_WindContPType3IEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) + { + element->WindDynamicsLookupTable.push_back(element2); + return assign_WindDynamicsLookupTable_WindContPType3IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_WindContPType3IEC_dpmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType3IEC_WindContPType3IEC(BaseClass*, BaseClass*); +bool assign_WindContPType3IEC_WindGenTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + WindGenTurbineType3IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindGenTurbineType3IEC != element2) + { + element->WindGenTurbineType3IEC = element2; + return assign_WindGenTurbineType3IEC_WindContPType3IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindContPType3IEC_dpmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dpmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_dtrisemaxlvrt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_dtrisemaxlvrt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dtrisemaxlvrt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_kdtd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_kdtd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kdtd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_kip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_kip(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kip; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_kpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_kpp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_mplvrt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_mplvrt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mplvrt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_omegaoffset(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_omegaoffset(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->omegaoffset; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_pdtdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_pdtdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pdtdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_rramp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_rramp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rramp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_tdvs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_tdvs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdvs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_temin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_temin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->temin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_tomegafilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_tomegafilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tomegafilt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_tpfilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_tpfilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpfilt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_tpord(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_tpord(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpord; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_tufilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_tufilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tufilt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_tuscale(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_tuscale(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tuscale; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_twref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_twref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->twref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_udvs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_udvs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->udvs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_updip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_updip(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->updip; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_wdtd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_wdtd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wdtd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_zeta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_zeta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->zeta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindDynamicsLookupTable_WindContPType3IEC(BaseClass*, BaseClass*); -bool assign_WindContPType3IEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) -{ - WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); - WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) - { - if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) - { - element->WindDynamicsLookupTable.push_back(element2); - return assign_WindDynamicsLookupTable_WindContPType3IEC(BaseClass_ptr2, BaseClass_ptr1); - } - return true; - } - return false; -} -bool assign_WindGenTurbineType3IEC_WindContPType3IEC(BaseClass*, BaseClass*); -bool assign_WindContPType3IEC_WindGenTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) -{ - WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); - WindGenTurbineType3IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) - { - if (element->WindGenTurbineType3IEC != element2) - { - element->WindGenTurbineType3IEC = element2; - return assign_WindGenTurbineType3IEC_WindContPType3IEC(BaseClass_ptr2, BaseClass_ptr1); - } - return true; - } - return false; -} bool get_WindContPType3IEC_dpmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dpmax; if (!buffer.str().empty()) @@ -408,7 +410,8 @@ bool get_WindContPType3IEC_dpmax(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindContPType3IEC_dtrisemaxlvrt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dtrisemaxlvrt; if (!buffer.str().empty()) @@ -422,7 +425,8 @@ bool get_WindContPType3IEC_dtrisemaxlvrt(const BaseClass* BaseClass_ptr1, std::s bool get_WindContPType3IEC_kdtd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdtd; if (!buffer.str().empty()) @@ -436,7 +440,8 @@ bool get_WindContPType3IEC_kdtd(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindContPType3IEC_kip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kip; if (!buffer.str().empty()) @@ -450,7 +455,8 @@ bool get_WindContPType3IEC_kip(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_WindContPType3IEC_kpp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpp; if (!buffer.str().empty()) @@ -464,7 +470,8 @@ bool get_WindContPType3IEC_kpp(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_WindContPType3IEC_mplvrt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mplvrt; if (!buffer.str().empty()) @@ -478,7 +485,8 @@ bool get_WindContPType3IEC_mplvrt(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindContPType3IEC_omegaoffset(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->omegaoffset; if (!buffer.str().empty()) @@ -492,7 +500,8 @@ bool get_WindContPType3IEC_omegaoffset(const BaseClass* BaseClass_ptr1, std::str bool get_WindContPType3IEC_pdtdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pdtdmax; if (!buffer.str().empty()) @@ -506,7 +515,8 @@ bool get_WindContPType3IEC_pdtdmax(const BaseClass* BaseClass_ptr1, std::strings bool get_WindContPType3IEC_rramp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rramp; if (!buffer.str().empty()) @@ -520,7 +530,8 @@ bool get_WindContPType3IEC_rramp(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindContPType3IEC_tdvs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdvs; if (!buffer.str().empty()) @@ -534,7 +545,8 @@ bool get_WindContPType3IEC_tdvs(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindContPType3IEC_temin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->temin; if (!buffer.str().empty()) @@ -548,7 +560,8 @@ bool get_WindContPType3IEC_temin(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindContPType3IEC_tomegafilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tomegafilt; if (!buffer.str().empty()) @@ -562,7 +575,8 @@ bool get_WindContPType3IEC_tomegafilt(const BaseClass* BaseClass_ptr1, std::stri bool get_WindContPType3IEC_tpfilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpfilt; if (!buffer.str().empty()) @@ -576,7 +590,8 @@ bool get_WindContPType3IEC_tpfilt(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindContPType3IEC_tpord(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpord; if (!buffer.str().empty()) @@ -590,7 +605,8 @@ bool get_WindContPType3IEC_tpord(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindContPType3IEC_tufilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tufilt; if (!buffer.str().empty()) @@ -604,7 +620,8 @@ bool get_WindContPType3IEC_tufilt(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindContPType3IEC_tuscale(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tuscale; if (!buffer.str().empty()) @@ -618,7 +635,8 @@ bool get_WindContPType3IEC_tuscale(const BaseClass* BaseClass_ptr1, std::strings bool get_WindContPType3IEC_twref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twref; if (!buffer.str().empty()) @@ -632,7 +650,8 @@ bool get_WindContPType3IEC_twref(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindContPType3IEC_udvs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->udvs; if (!buffer.str().empty()) @@ -646,7 +665,8 @@ bool get_WindContPType3IEC_udvs(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindContPType3IEC_updip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->updip; if (!buffer.str().empty()) @@ -660,7 +680,8 @@ bool get_WindContPType3IEC_updip(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindContPType3IEC_wdtd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wdtd; if (!buffer.str().empty()) @@ -674,7 +695,8 @@ bool get_WindContPType3IEC_wdtd(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindContPType3IEC_zeta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->zeta; if (!buffer.str().empty()) @@ -686,8 +708,6 @@ bool get_WindContPType3IEC_zeta(const BaseClass* BaseClass_ptr1, std::stringstre return false; } - - const char WindContPType3IEC::debugName[] = "WindContPType3IEC"; const char* WindContPType3IEC::debugString() const { @@ -696,38 +716,38 @@ const char* WindContPType3IEC::debugString() const void WindContPType3IEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindContPType3IEC"), &WindContPType3IEC_factory)); + factory_map.emplace("cim:WindContPType3IEC", &WindContPType3IEC_factory); } void WindContPType3IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.dpmax"), &assign_WindContPType3IEC_dpmax)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.dtrisemaxlvrt"), &assign_WindContPType3IEC_dtrisemaxlvrt)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.kdtd"), &assign_WindContPType3IEC_kdtd)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.kip"), &assign_WindContPType3IEC_kip)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.kpp"), &assign_WindContPType3IEC_kpp)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.mplvrt"), &assign_WindContPType3IEC_mplvrt)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.omegaoffset"), &assign_WindContPType3IEC_omegaoffset)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.pdtdmax"), &assign_WindContPType3IEC_pdtdmax)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.rramp"), &assign_WindContPType3IEC_rramp)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.tdvs"), &assign_WindContPType3IEC_tdvs)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.temin"), &assign_WindContPType3IEC_temin)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.tomegafilt"), &assign_WindContPType3IEC_tomegafilt)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.tpfilt"), &assign_WindContPType3IEC_tpfilt)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.tpord"), &assign_WindContPType3IEC_tpord)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.tufilt"), &assign_WindContPType3IEC_tufilt)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.tuscale"), &assign_WindContPType3IEC_tuscale)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.twref"), &assign_WindContPType3IEC_twref)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.udvs"), &assign_WindContPType3IEC_udvs)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.updip"), &assign_WindContPType3IEC_updip)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.wdtd"), &assign_WindContPType3IEC_wdtd)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.zeta"), &assign_WindContPType3IEC_zeta)); + assign_map.emplace("cim:WindContPType3IEC.dpmax", &assign_WindContPType3IEC_dpmax); + assign_map.emplace("cim:WindContPType3IEC.dtrisemaxlvrt", &assign_WindContPType3IEC_dtrisemaxlvrt); + assign_map.emplace("cim:WindContPType3IEC.kdtd", &assign_WindContPType3IEC_kdtd); + assign_map.emplace("cim:WindContPType3IEC.kip", &assign_WindContPType3IEC_kip); + assign_map.emplace("cim:WindContPType3IEC.kpp", &assign_WindContPType3IEC_kpp); + assign_map.emplace("cim:WindContPType3IEC.mplvrt", &assign_WindContPType3IEC_mplvrt); + assign_map.emplace("cim:WindContPType3IEC.omegaoffset", &assign_WindContPType3IEC_omegaoffset); + assign_map.emplace("cim:WindContPType3IEC.pdtdmax", &assign_WindContPType3IEC_pdtdmax); + assign_map.emplace("cim:WindContPType3IEC.rramp", &assign_WindContPType3IEC_rramp); + assign_map.emplace("cim:WindContPType3IEC.tdvs", &assign_WindContPType3IEC_tdvs); + assign_map.emplace("cim:WindContPType3IEC.temin", &assign_WindContPType3IEC_temin); + assign_map.emplace("cim:WindContPType3IEC.tomegafilt", &assign_WindContPType3IEC_tomegafilt); + assign_map.emplace("cim:WindContPType3IEC.tpfilt", &assign_WindContPType3IEC_tpfilt); + assign_map.emplace("cim:WindContPType3IEC.tpord", &assign_WindContPType3IEC_tpord); + assign_map.emplace("cim:WindContPType3IEC.tufilt", &assign_WindContPType3IEC_tufilt); + assign_map.emplace("cim:WindContPType3IEC.tuscale", &assign_WindContPType3IEC_tuscale); + assign_map.emplace("cim:WindContPType3IEC.twref", &assign_WindContPType3IEC_twref); + assign_map.emplace("cim:WindContPType3IEC.udvs", &assign_WindContPType3IEC_udvs); + assign_map.emplace("cim:WindContPType3IEC.updip", &assign_WindContPType3IEC_updip); + assign_map.emplace("cim:WindContPType3IEC.wdtd", &assign_WindContPType3IEC_wdtd); + assign_map.emplace("cim:WindContPType3IEC.zeta", &assign_WindContPType3IEC_zeta); } void WindContPType3IEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.WindDynamicsLookupTable"), &assign_WindContPType3IEC_WindDynamicsLookupTable)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.WindGenTurbineType3IEC"), &assign_WindContPType3IEC_WindGenTurbineType3IEC)); + assign_map.emplace("cim:WindContPType3IEC.WindDynamicsLookupTable", &assign_WindContPType3IEC_WindDynamicsLookupTable); + assign_map.emplace("cim:WindContPType3IEC.WindGenTurbineType3IEC", &assign_WindContPType3IEC_WindGenTurbineType3IEC); } void WindContPType3IEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/WindContPType3IEC.hpp b/CGMES_2.4.15_16FEB2016/WindContPType3IEC.hpp index 4731d4ce7..f73e04869 100644 --- a/CGMES_2.4.15_16FEB2016/WindContPType3IEC.hpp +++ b/CGMES_2.4.15_16FEB2016/WindContPType3IEC.hpp @@ -22,9 +22,7 @@ namespace CIMPP class WindDynamicsLookupTable; class WindGenTurbineType3IEC; - /* - P control model Type 3. Reference: IEC Standard 61400-27-1 Section 6.6.5.3. - */ + /** \brief P control model Type 3. Reference: IEC Standard 61400-27-1 Section 6.6.5.3. */ class WindContPType3IEC : public IdentifiedObject { public: @@ -32,29 +30,74 @@ namespace CIMPP WindContPType3IEC(); ~WindContPType3IEC() override; - std::list WindDynamicsLookupTable; /* The P control type 3 model with which this wind dynamics lookup table is associated. Default: 0 */ - CIMPP::WindGenTurbineType3IEC* WindGenTurbineType3IEC; /* Wind turbine type 3 model with which this Wind control P type 3 model is associated. Default: 0 */ - CIMPP::PU dpmax; /* Maximum wind turbine power ramp rate (). It is project dependent parameter. Default: nullptr */ - CIMPP::PU dtrisemaxlvrt; /* Limitation of torque rise rate during LVRT for S (d). It is project dependent parameter. Default: nullptr */ - CIMPP::PU kdtd; /* Gain for active drive train damping (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kip; /* PI controller integration parameter (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kpp; /* PI controller proportional gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::Boolean mplvrt; /* Enable LVRT power control mode (M true = 1: voltage control false = 0: reactive power control. It is project dependent parameter. Default: false */ - CIMPP::PU omegaoffset; /* Offset to reference value that limits controller action during rotor speed changes (omega). It is case dependent parameter. Default: nullptr */ - CIMPP::PU pdtdmax; /* Maximum active drive train damping power (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU rramp; /* Ramp limitation of torque, required in some grid codes (). It is project dependent parameter. Default: nullptr */ - CIMPP::Seconds tdvs; /* Timedelay after deep voltage sags (T). It is project dependent parameter. Default: nullptr */ - CIMPP::PU temin; /* Minimum electrical generator torque (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tomegafilt; /* Filter time constant for generator speed measurement (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tpfilt; /* Filter time constant for power measurement (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU tpord; /* Time constant in power order lag (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tufilt; /* Filter time constant for voltage measurement (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU tuscale; /* Voltage scaling factor of reset-torque (T). It is project dependent parameter. Default: nullptr */ - CIMPP::Seconds twref; /* Time constant in speed reference filter (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU udvs; /* Voltage limit for hold LVRT status after deep voltage sags (). It is project dependent parameter. Default: nullptr */ - CIMPP::PU updip; /* Voltage dip threshold for P-control (). Part of turbine control, often different (e.g 0.8) from converter thresholds. It is project dependent parameter. Default: nullptr */ - CIMPP::PU wdtd; /* Active drive train damping frequency (omega). It can be calculated from two mass model parameters. It is type dependent parameter. Default: nullptr */ - CIMPP::Simple_Float zeta; /* Coefficient for active drive train damping (zeta). It is type dependent parameter. Default: nullptr */ + /** \brief The P control type 3 model with which this wind dynamics lookup table is associated. Default: 0 */ + std::list WindDynamicsLookupTable; + + /** \brief Wind turbine type 3 model with which this Wind control P type 3 model is associated. Default: 0 */ + CIMPP::WindGenTurbineType3IEC* WindGenTurbineType3IEC; + + /** \brief Maximum wind turbine power ramp rate (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU dpmax; + + /** \brief Limitation of torque rise rate during LVRT for S (d). It is project dependent parameter. Default: nullptr */ + CIMPP::PU dtrisemaxlvrt; + + /** \brief Gain for active drive train damping (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kdtd; + + /** \brief PI controller integration parameter (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kip; + + /** \brief PI controller proportional gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kpp; + + /** \brief Enable LVRT power control mode (M true = 1: voltage control false = 0: reactive power control. It is project dependent parameter. Default: false */ + CIMPP::Boolean mplvrt; + + /** \brief Offset to reference value that limits controller action during rotor speed changes (omega). It is case dependent parameter. Default: nullptr */ + CIMPP::PU omegaoffset; + + /** \brief Maximum active drive train damping power (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU pdtdmax; + + /** \brief Ramp limitation of torque, required in some grid codes (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU rramp; + + /** \brief Timedelay after deep voltage sags (T). It is project dependent parameter. Default: nullptr */ + CIMPP::Seconds tdvs; + + /** \brief Minimum electrical generator torque (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU temin; + + /** \brief Filter time constant for generator speed measurement (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tomegafilt; + + /** \brief Filter time constant for power measurement (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tpfilt; + + /** \brief Time constant in power order lag (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU tpord; + + /** \brief Filter time constant for voltage measurement (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tufilt; + + /** \brief Voltage scaling factor of reset-torque (T). It is project dependent parameter. Default: nullptr */ + CIMPP::PU tuscale; + + /** \brief Time constant in speed reference filter (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds twref; + + /** \brief Voltage limit for hold LVRT status after deep voltage sags (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU udvs; + + /** \brief Voltage dip threshold for P-control (). Part of turbine control, often different (e.g 0.8) from converter thresholds. It is project dependent parameter. Default: nullptr */ + CIMPP::PU updip; + + /** \brief Active drive train damping frequency (omega). It can be calculated from two mass model parameters. It is type dependent parameter. Default: nullptr */ + CIMPP::PU wdtd; + + /** \brief Coefficient for active drive train damping (zeta). It is type dependent parameter. Default: nullptr */ + CIMPP::Simple_Float zeta; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/WindContPType4aIEC.cpp b/CGMES_2.4.15_16FEB2016/WindContPType4aIEC.cpp index ef175b49d..1c26a76c5 100644 --- a/CGMES_2.4.15_16FEB2016/WindContPType4aIEC.cpp +++ b/CGMES_2.4.15_16FEB2016/WindContPType4aIEC.cpp @@ -9,14 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "WindTurbineType4aIEC.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -WindContPType4aIEC::WindContPType4aIEC() : WindTurbineType4aIEC(nullptr) {}; -WindContPType4aIEC::~WindContPType4aIEC() {}; +WindContPType4aIEC::WindContPType4aIEC() : WindTurbineType4aIEC(nullptr) {} +WindContPType4aIEC::~WindContPType4aIEC() {} static const std::list PossibleProfilesForClass = { @@ -46,67 +43,70 @@ WindContPType4aIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindContPType4aIEC_dpmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType4aIEC_WindContPType4aIEC(BaseClass*, BaseClass*); +bool assign_WindContPType4aIEC_WindTurbineType4aIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType4aIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->dpmax; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType4aIEC != element2) + { + element->WindTurbineType4aIEC = element2; + return assign_WindTurbineType4aIEC_WindContPType4aIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindContPType4aIEC_tpord(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType4aIEC_dpmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tpord; - if (buffer.fail()) - return false; - else + buffer >> element->dpmax; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType4aIEC_tufilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType4aIEC_tpord(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tufilt; - if (buffer.fail()) - return false; - else + buffer >> element->tpord; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindTurbineType4aIEC_WindContPType4aIEC(BaseClass*, BaseClass*); -bool assign_WindContPType4aIEC_WindTurbineType4aIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindContPType4aIEC_tufilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType4aIEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType4aIEC != element2) + buffer >> element->tufilt; + if (!buffer.fail()) { - element->WindTurbineType4aIEC = element2; - return assign_WindTurbineType4aIEC_WindContPType4aIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_WindContPType4aIEC_dpmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dpmax; if (!buffer.str().empty()) @@ -120,7 +120,8 @@ bool get_WindContPType4aIEC_dpmax(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindContPType4aIEC_tpord(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpord; if (!buffer.str().empty()) @@ -134,7 +135,8 @@ bool get_WindContPType4aIEC_tpord(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindContPType4aIEC_tufilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tufilt; if (!buffer.str().empty()) @@ -146,8 +148,6 @@ bool get_WindContPType4aIEC_tufilt(const BaseClass* BaseClass_ptr1, std::strings return false; } - - const char WindContPType4aIEC::debugName[] = "WindContPType4aIEC"; const char* WindContPType4aIEC::debugString() const { @@ -156,19 +156,19 @@ const char* WindContPType4aIEC::debugString() const void WindContPType4aIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindContPType4aIEC"), &WindContPType4aIEC_factory)); + factory_map.emplace("cim:WindContPType4aIEC", &WindContPType4aIEC_factory); } void WindContPType4aIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContPType4aIEC.dpmax"), &assign_WindContPType4aIEC_dpmax)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType4aIEC.tpord"), &assign_WindContPType4aIEC_tpord)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType4aIEC.tufilt"), &assign_WindContPType4aIEC_tufilt)); + assign_map.emplace("cim:WindContPType4aIEC.dpmax", &assign_WindContPType4aIEC_dpmax); + assign_map.emplace("cim:WindContPType4aIEC.tpord", &assign_WindContPType4aIEC_tpord); + assign_map.emplace("cim:WindContPType4aIEC.tufilt", &assign_WindContPType4aIEC_tufilt); } void WindContPType4aIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContPType4aIEC.WindTurbineType4aIEC"), &assign_WindContPType4aIEC_WindTurbineType4aIEC)); + assign_map.emplace("cim:WindContPType4aIEC.WindTurbineType4aIEC", &assign_WindContPType4aIEC_WindTurbineType4aIEC); } void WindContPType4aIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/WindContPType4aIEC.hpp b/CGMES_2.4.15_16FEB2016/WindContPType4aIEC.hpp index 43e01221f..da1dc150e 100644 --- a/CGMES_2.4.15_16FEB2016/WindContPType4aIEC.hpp +++ b/CGMES_2.4.15_16FEB2016/WindContPType4aIEC.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class WindTurbineType4aIEC; - /* - P control model Type 4A. Reference: IEC Standard 61400-27-1 Section 6.6.5.4. - */ + /** \brief P control model Type 4A. Reference: IEC Standard 61400-27-1 Section 6.6.5.4. */ class WindContPType4aIEC : public IdentifiedObject { public: @@ -29,10 +27,17 @@ namespace CIMPP WindContPType4aIEC(); ~WindContPType4aIEC() override; - CIMPP::WindTurbineType4aIEC* WindTurbineType4aIEC; /* Wind turbine type 4A model with which this wind control P type 4A model is associated. Default: 0 */ - CIMPP::PU dpmax; /* Maximum wind turbine power ramp rate (). It is project dependent parameter. Default: nullptr */ - CIMPP::Seconds tpord; /* Time constant in power order lag (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tufilt; /* Voltage measurement filter time constant (). It is type dependent parameter. Default: nullptr */ + /** \brief Wind turbine type 4A model with which this wind control P type 4A model is associated. Default: 0 */ + CIMPP::WindTurbineType4aIEC* WindTurbineType4aIEC; + + /** \brief Maximum wind turbine power ramp rate (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU dpmax; + + /** \brief Time constant in power order lag (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tpord; + + /** \brief Voltage measurement filter time constant (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tufilt; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/WindContPType4bIEC.cpp b/CGMES_2.4.15_16FEB2016/WindContPType4bIEC.cpp index 85291e38c..63bf79cac 100644 --- a/CGMES_2.4.15_16FEB2016/WindContPType4bIEC.cpp +++ b/CGMES_2.4.15_16FEB2016/WindContPType4bIEC.cpp @@ -9,15 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "WindTurbineType4bIEC.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -WindContPType4bIEC::WindContPType4bIEC() : WindTurbineType4bIEC(nullptr) {}; -WindContPType4bIEC::~WindContPType4bIEC() {}; +WindContPType4bIEC::WindContPType4bIEC() : WindTurbineType4bIEC(nullptr) {} +WindContPType4bIEC::~WindContPType4bIEC() {} static const std::list PossibleProfilesForClass = { @@ -48,80 +44,84 @@ WindContPType4bIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindContPType4bIEC_dpmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType4bIEC_WindContPType4bIEC(BaseClass*, BaseClass*); +bool assign_WindContPType4bIEC_WindTurbineType4bIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType4bIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->dpmax; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType4bIEC != element2) + { + element->WindTurbineType4bIEC = element2; + return assign_WindTurbineType4bIEC_WindContPType4bIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindContPType4bIEC_tpaero(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType4bIEC_dpmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tpaero; - if (buffer.fail()) - return false; - else + buffer >> element->dpmax; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType4bIEC_tpord(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType4bIEC_tpaero(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tpord; - if (buffer.fail()) - return false; - else + buffer >> element->tpaero; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType4bIEC_tufilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType4bIEC_tpord(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tufilt; - if (buffer.fail()) - return false; - else + buffer >> element->tpord; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindTurbineType4bIEC_WindContPType4bIEC(BaseClass*, BaseClass*); -bool assign_WindContPType4bIEC_WindTurbineType4bIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindContPType4bIEC_tufilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType4bIEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType4bIEC != element2) + buffer >> element->tufilt; + if (!buffer.fail()) { - element->WindTurbineType4bIEC = element2; - return assign_WindTurbineType4bIEC_WindContPType4bIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_WindContPType4bIEC_dpmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dpmax; if (!buffer.str().empty()) @@ -135,7 +135,8 @@ bool get_WindContPType4bIEC_dpmax(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindContPType4bIEC_tpaero(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpaero; if (!buffer.str().empty()) @@ -149,7 +150,8 @@ bool get_WindContPType4bIEC_tpaero(const BaseClass* BaseClass_ptr1, std::strings bool get_WindContPType4bIEC_tpord(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpord; if (!buffer.str().empty()) @@ -163,7 +165,8 @@ bool get_WindContPType4bIEC_tpord(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindContPType4bIEC_tufilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tufilt; if (!buffer.str().empty()) @@ -175,8 +178,6 @@ bool get_WindContPType4bIEC_tufilt(const BaseClass* BaseClass_ptr1, std::strings return false; } - - const char WindContPType4bIEC::debugName[] = "WindContPType4bIEC"; const char* WindContPType4bIEC::debugString() const { @@ -185,20 +186,20 @@ const char* WindContPType4bIEC::debugString() const void WindContPType4bIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindContPType4bIEC"), &WindContPType4bIEC_factory)); + factory_map.emplace("cim:WindContPType4bIEC", &WindContPType4bIEC_factory); } void WindContPType4bIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContPType4bIEC.dpmax"), &assign_WindContPType4bIEC_dpmax)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType4bIEC.tpaero"), &assign_WindContPType4bIEC_tpaero)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType4bIEC.tpord"), &assign_WindContPType4bIEC_tpord)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType4bIEC.tufilt"), &assign_WindContPType4bIEC_tufilt)); + assign_map.emplace("cim:WindContPType4bIEC.dpmax", &assign_WindContPType4bIEC_dpmax); + assign_map.emplace("cim:WindContPType4bIEC.tpaero", &assign_WindContPType4bIEC_tpaero); + assign_map.emplace("cim:WindContPType4bIEC.tpord", &assign_WindContPType4bIEC_tpord); + assign_map.emplace("cim:WindContPType4bIEC.tufilt", &assign_WindContPType4bIEC_tufilt); } void WindContPType4bIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContPType4bIEC.WindTurbineType4bIEC"), &assign_WindContPType4bIEC_WindTurbineType4bIEC)); + assign_map.emplace("cim:WindContPType4bIEC.WindTurbineType4bIEC", &assign_WindContPType4bIEC_WindTurbineType4bIEC); } void WindContPType4bIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/WindContPType4bIEC.hpp b/CGMES_2.4.15_16FEB2016/WindContPType4bIEC.hpp index 3b49ddcb4..945825f0c 100644 --- a/CGMES_2.4.15_16FEB2016/WindContPType4bIEC.hpp +++ b/CGMES_2.4.15_16FEB2016/WindContPType4bIEC.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class WindTurbineType4bIEC; - /* - P control model Type 4B. Reference: IEC Standard 61400-27-1 Section 6.6.5.5. - */ + /** \brief P control model Type 4B. Reference: IEC Standard 61400-27-1 Section 6.6.5.5. */ class WindContPType4bIEC : public IdentifiedObject { public: @@ -29,11 +27,20 @@ namespace CIMPP WindContPType4bIEC(); ~WindContPType4bIEC() override; - CIMPP::WindTurbineType4bIEC* WindTurbineType4bIEC; /* Wind turbine type 4B model with which this wind control P type 4B model is associated. Default: 0 */ - CIMPP::PU dpmax; /* Maximum wind turbine power ramp rate (). It is project dependent parameter. Default: nullptr */ - CIMPP::Seconds tpaero; /* Time constant in aerodynamic power response (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tpord; /* Time constant in power order lag (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tufilt; /* Voltage measurement filter time constant (). It is type dependent parameter. Default: nullptr */ + /** \brief Wind turbine type 4B model with which this wind control P type 4B model is associated. Default: 0 */ + CIMPP::WindTurbineType4bIEC* WindTurbineType4bIEC; + + /** \brief Maximum wind turbine power ramp rate (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU dpmax; + + /** \brief Time constant in aerodynamic power response (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tpaero; + + /** \brief Time constant in power order lag (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tpord; + + /** \brief Voltage measurement filter time constant (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tufilt; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/WindContPitchAngleIEC.cpp b/CGMES_2.4.15_16FEB2016/WindContPitchAngleIEC.cpp index c7658e6fb..055ba9674 100644 --- a/CGMES_2.4.15_16FEB2016/WindContPitchAngleIEC.cpp +++ b/CGMES_2.4.15_16FEB2016/WindContPitchAngleIEC.cpp @@ -9,21 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "WindGenTurbineType3IEC.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "AngleDegrees.hpp" -#include "AngleDegrees.hpp" -#include "Seconds.hpp" using namespace CIMPP; -WindContPitchAngleIEC::WindContPitchAngleIEC() : WindGenTurbineType3IEC(nullptr) {}; -WindContPitchAngleIEC::~WindContPitchAngleIEC() {}; +WindContPitchAngleIEC::WindContPitchAngleIEC() : WindGenTurbineType3IEC(nullptr) {} +WindContPitchAngleIEC::~WindContPitchAngleIEC() {} static const std::list PossibleProfilesForClass = { @@ -60,158 +50,168 @@ WindContPitchAngleIEC::getPossibleProfilesForAttributes() const return map; } +bool assign_WindGenTurbineType3IEC_WindContPitchAngleIEC(BaseClass*, BaseClass*); +bool assign_WindContPitchAngleIEC_WindGenTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + WindGenTurbineType3IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindGenTurbineType3IEC != element2) + { + element->WindGenTurbineType3IEC = element2; + return assign_WindGenTurbineType3IEC_WindContPitchAngleIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_WindContPitchAngleIEC_dthetamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPitchAngleIEC_dthetamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dthetamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPitchAngleIEC_dthetamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPitchAngleIEC_dthetamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dthetamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPitchAngleIEC_kic(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPitchAngleIEC_kic(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kic; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPitchAngleIEC_kiomega(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPitchAngleIEC_kiomega(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kiomega; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPitchAngleIEC_kpc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPitchAngleIEC_kpc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPitchAngleIEC_kpomega(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPitchAngleIEC_kpomega(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpomega; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPitchAngleIEC_kpx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPitchAngleIEC_kpx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPitchAngleIEC_thetamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPitchAngleIEC_thetamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->thetamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPitchAngleIEC_thetamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPitchAngleIEC_thetamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->thetamin; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_WindContPitchAngleIEC_ttheta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->ttheta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindGenTurbineType3IEC_WindContPitchAngleIEC(BaseClass*, BaseClass*); -bool assign_WindContPitchAngleIEC_WindGenTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindContPitchAngleIEC_ttheta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); - WindGenTurbineType3IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindGenTurbineType3IEC != element2) + buffer >> element->ttheta; + if (!buffer.fail()) { - element->WindGenTurbineType3IEC = element2; - return assign_WindGenTurbineType3IEC_WindContPitchAngleIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_WindContPitchAngleIEC_dthetamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dthetamax; if (!buffer.str().empty()) @@ -225,7 +225,8 @@ bool get_WindContPitchAngleIEC_dthetamax(const BaseClass* BaseClass_ptr1, std::s bool get_WindContPitchAngleIEC_dthetamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dthetamin; if (!buffer.str().empty()) @@ -239,7 +240,8 @@ bool get_WindContPitchAngleIEC_dthetamin(const BaseClass* BaseClass_ptr1, std::s bool get_WindContPitchAngleIEC_kic(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kic; if (!buffer.str().empty()) @@ -253,7 +255,8 @@ bool get_WindContPitchAngleIEC_kic(const BaseClass* BaseClass_ptr1, std::strings bool get_WindContPitchAngleIEC_kiomega(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kiomega; if (!buffer.str().empty()) @@ -267,7 +270,8 @@ bool get_WindContPitchAngleIEC_kiomega(const BaseClass* BaseClass_ptr1, std::str bool get_WindContPitchAngleIEC_kpc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpc; if (!buffer.str().empty()) @@ -281,7 +285,8 @@ bool get_WindContPitchAngleIEC_kpc(const BaseClass* BaseClass_ptr1, std::strings bool get_WindContPitchAngleIEC_kpomega(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpomega; if (!buffer.str().empty()) @@ -295,7 +300,8 @@ bool get_WindContPitchAngleIEC_kpomega(const BaseClass* BaseClass_ptr1, std::str bool get_WindContPitchAngleIEC_kpx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpx; if (!buffer.str().empty()) @@ -309,7 +315,8 @@ bool get_WindContPitchAngleIEC_kpx(const BaseClass* BaseClass_ptr1, std::strings bool get_WindContPitchAngleIEC_thetamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thetamax; if (!buffer.str().empty()) @@ -323,7 +330,8 @@ bool get_WindContPitchAngleIEC_thetamax(const BaseClass* BaseClass_ptr1, std::st bool get_WindContPitchAngleIEC_thetamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thetamin; if (!buffer.str().empty()) @@ -337,7 +345,8 @@ bool get_WindContPitchAngleIEC_thetamin(const BaseClass* BaseClass_ptr1, std::st bool get_WindContPitchAngleIEC_ttheta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ttheta; if (!buffer.str().empty()) @@ -349,8 +358,6 @@ bool get_WindContPitchAngleIEC_ttheta(const BaseClass* BaseClass_ptr1, std::stri return false; } - - const char WindContPitchAngleIEC::debugName[] = "WindContPitchAngleIEC"; const char* WindContPitchAngleIEC::debugString() const { @@ -359,26 +366,26 @@ const char* WindContPitchAngleIEC::debugString() const void WindContPitchAngleIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC"), &WindContPitchAngleIEC_factory)); + factory_map.emplace("cim:WindContPitchAngleIEC", &WindContPitchAngleIEC_factory); } void WindContPitchAngleIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.dthetamax"), &assign_WindContPitchAngleIEC_dthetamax)); - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.dthetamin"), &assign_WindContPitchAngleIEC_dthetamin)); - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.kic"), &assign_WindContPitchAngleIEC_kic)); - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.kiomega"), &assign_WindContPitchAngleIEC_kiomega)); - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.kpc"), &assign_WindContPitchAngleIEC_kpc)); - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.kpomega"), &assign_WindContPitchAngleIEC_kpomega)); - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.kpx"), &assign_WindContPitchAngleIEC_kpx)); - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.thetamax"), &assign_WindContPitchAngleIEC_thetamax)); - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.thetamin"), &assign_WindContPitchAngleIEC_thetamin)); - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.ttheta"), &assign_WindContPitchAngleIEC_ttheta)); + assign_map.emplace("cim:WindContPitchAngleIEC.dthetamax", &assign_WindContPitchAngleIEC_dthetamax); + assign_map.emplace("cim:WindContPitchAngleIEC.dthetamin", &assign_WindContPitchAngleIEC_dthetamin); + assign_map.emplace("cim:WindContPitchAngleIEC.kic", &assign_WindContPitchAngleIEC_kic); + assign_map.emplace("cim:WindContPitchAngleIEC.kiomega", &assign_WindContPitchAngleIEC_kiomega); + assign_map.emplace("cim:WindContPitchAngleIEC.kpc", &assign_WindContPitchAngleIEC_kpc); + assign_map.emplace("cim:WindContPitchAngleIEC.kpomega", &assign_WindContPitchAngleIEC_kpomega); + assign_map.emplace("cim:WindContPitchAngleIEC.kpx", &assign_WindContPitchAngleIEC_kpx); + assign_map.emplace("cim:WindContPitchAngleIEC.thetamax", &assign_WindContPitchAngleIEC_thetamax); + assign_map.emplace("cim:WindContPitchAngleIEC.thetamin", &assign_WindContPitchAngleIEC_thetamin); + assign_map.emplace("cim:WindContPitchAngleIEC.ttheta", &assign_WindContPitchAngleIEC_ttheta); } void WindContPitchAngleIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.WindGenTurbineType3IEC"), &assign_WindContPitchAngleIEC_WindGenTurbineType3IEC)); + assign_map.emplace("cim:WindContPitchAngleIEC.WindGenTurbineType3IEC", &assign_WindContPitchAngleIEC_WindGenTurbineType3IEC); } void WindContPitchAngleIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/WindContPitchAngleIEC.hpp b/CGMES_2.4.15_16FEB2016/WindContPitchAngleIEC.hpp index 58a74453d..57dd765dc 100644 --- a/CGMES_2.4.15_16FEB2016/WindContPitchAngleIEC.hpp +++ b/CGMES_2.4.15_16FEB2016/WindContPitchAngleIEC.hpp @@ -21,9 +21,7 @@ namespace CIMPP { class WindGenTurbineType3IEC; - /* - Pitch angle control model. Reference: IEC Standard 61400-27-1 Section 6.6.5.8. - */ + /** \brief Pitch angle control model. Reference: IEC Standard 61400-27-1 Section 6.6.5.8. */ class WindContPitchAngleIEC : public IdentifiedObject { public: @@ -31,17 +29,38 @@ namespace CIMPP WindContPitchAngleIEC(); ~WindContPitchAngleIEC() override; - CIMPP::WindGenTurbineType3IEC* WindGenTurbineType3IEC; /* Wind turbine type 3 model with which this pitch control model is associated. Default: 0 */ - CIMPP::Simple_Float dthetamax; /* Maximum pitch positive ramp rate (d). It is type dependent parameter. Unit = degrees/sec. Default: nullptr */ - CIMPP::Simple_Float dthetamin; /* Maximum pitch negative ramp rate (d). It is type dependent parameter. Unit = degrees/sec. Default: nullptr */ - CIMPP::PU kic; /* Power PI controller integration gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kiomega; /* Speed PI controller integration gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kpc; /* Power PI controller proportional gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kpomega; /* Speed PI controller proportional gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kpx; /* Pitch cross coupling gain (K). It is type dependent parameter. Default: nullptr */ - CIMPP::AngleDegrees thetamax; /* Maximum pitch angle (). It is type dependent parameter. Default: nullptr */ - CIMPP::AngleDegrees thetamin; /* Minimum pitch angle (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds ttheta; /* Pitch time constant (t). It is type dependent parameter. Default: nullptr */ + /** \brief Wind turbine type 3 model with which this pitch control model is associated. Default: 0 */ + CIMPP::WindGenTurbineType3IEC* WindGenTurbineType3IEC; + + /** \brief Maximum pitch positive ramp rate (d). It is type dependent parameter. Unit = degrees/sec. Default: nullptr */ + CIMPP::Simple_Float dthetamax; + + /** \brief Maximum pitch negative ramp rate (d). It is type dependent parameter. Unit = degrees/sec. Default: nullptr */ + CIMPP::Simple_Float dthetamin; + + /** \brief Power PI controller integration gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kic; + + /** \brief Speed PI controller integration gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kiomega; + + /** \brief Power PI controller proportional gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kpc; + + /** \brief Speed PI controller proportional gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kpomega; + + /** \brief Pitch cross coupling gain (K). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kpx; + + /** \brief Maximum pitch angle (). It is type dependent parameter. Default: nullptr */ + CIMPP::AngleDegrees thetamax; + + /** \brief Minimum pitch angle (). It is type dependent parameter. Default: nullptr */ + CIMPP::AngleDegrees thetamin; + + /** \brief Pitch time constant (t). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds ttheta; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/WindContQIEC.cpp b/CGMES_2.4.15_16FEB2016/WindContQIEC.cpp index 12fe80123..2b20f6ee7 100644 --- a/CGMES_2.4.15_16FEB2016/WindContQIEC.cpp +++ b/CGMES_2.4.15_16FEB2016/WindContQIEC.cpp @@ -9,37 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "WindTurbineType3or4IEC.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "WindLVRTQcontrolModesKind.hpp" -#include "WindQcontrolModesKind.hpp" -#include "PU.hpp" using namespace CIMPP; -WindContQIEC::WindContQIEC() : WindTurbineType3or4IEC(nullptr) {}; -WindContQIEC::~WindContQIEC() {}; +WindContQIEC::WindContQIEC() : WindTurbineType3or4IEC(nullptr) {} +WindContQIEC::~WindContQIEC() {} static const std::list PossibleProfilesForClass = { @@ -92,366 +66,392 @@ WindContQIEC::getPossibleProfilesForAttributes() const return map; } +bool assign_WindTurbineType3or4IEC_WIndContQIEC(BaseClass*, BaseClass*); +bool assign_WindContQIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType3or4IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindTurbineType3or4IEC != element2) + { + element->WindTurbineType3or4IEC = element2; + return assign_WindTurbineType3or4IEC_WIndContQIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_WindContQIEC_iqh1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_iqh1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->iqh1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_iqmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_iqmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->iqmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_iqmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_iqmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->iqmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_iqpost(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_iqpost(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->iqpost; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_kiq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_kiq(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kiq; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_kiu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_kiu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kiu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_kpq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_kpq(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpq; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_kpu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_kpu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_kqv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_kqv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kqv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_qmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_qmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_qmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_qmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_rdroop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_rdroop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rdroop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_tiq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_tiq(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tiq; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_tpfilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_tpfilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpfilt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_tpost(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_tpost(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpost; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_tqord(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_tqord(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tqord; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_tufilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_tufilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tufilt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_udb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_udb1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->udb1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_udb2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_udb2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->udb2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_umax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_umax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->umax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_umin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_umin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->umin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_uqdip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_uqdip(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uqdip; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_uref0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_uref0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uref0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_windLVRTQcontrolModesType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_windLVRTQcontrolModesType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->windLVRTQcontrolModesType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_windQcontrolModesType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_windQcontrolModesType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->windQcontrolModesType; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_WindContQIEC_xdroop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->xdroop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindTurbineType3or4IEC_WIndContQIEC(BaseClass*, BaseClass*); -bool assign_WindContQIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindContQIEC_xdroop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindContQIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType3or4IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType3or4IEC != element2) + buffer >> element->xdroop; + if (!buffer.fail()) { - element->WindTurbineType3or4IEC = element2; - return assign_WindTurbineType3or4IEC_WIndContQIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_WindContQIEC_iqh1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->iqh1; if (!buffer.str().empty()) @@ -465,7 +465,8 @@ bool get_WindContQIEC_iqh1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_WindContQIEC_iqmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->iqmax; if (!buffer.str().empty()) @@ -479,7 +480,8 @@ bool get_WindContQIEC_iqmax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_WindContQIEC_iqmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->iqmin; if (!buffer.str().empty()) @@ -493,7 +495,8 @@ bool get_WindContQIEC_iqmin(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_WindContQIEC_iqpost(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->iqpost; if (!buffer.str().empty()) @@ -507,7 +510,8 @@ bool get_WindContQIEC_iqpost(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_WindContQIEC_kiq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kiq; if (!buffer.str().empty()) @@ -521,7 +525,8 @@ bool get_WindContQIEC_kiq(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_WindContQIEC_kiu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kiu; if (!buffer.str().empty()) @@ -535,7 +540,8 @@ bool get_WindContQIEC_kiu(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_WindContQIEC_kpq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpq; if (!buffer.str().empty()) @@ -549,7 +555,8 @@ bool get_WindContQIEC_kpq(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_WindContQIEC_kpu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpu; if (!buffer.str().empty()) @@ -563,7 +570,8 @@ bool get_WindContQIEC_kpu(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_WindContQIEC_kqv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kqv; if (!buffer.str().empty()) @@ -577,7 +585,8 @@ bool get_WindContQIEC_kqv(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_WindContQIEC_qmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qmax; if (!buffer.str().empty()) @@ -591,7 +600,8 @@ bool get_WindContQIEC_qmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_WindContQIEC_qmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qmin; if (!buffer.str().empty()) @@ -605,7 +615,8 @@ bool get_WindContQIEC_qmin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_WindContQIEC_rdroop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rdroop; if (!buffer.str().empty()) @@ -619,7 +630,8 @@ bool get_WindContQIEC_rdroop(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_WindContQIEC_tiq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tiq; if (!buffer.str().empty()) @@ -633,7 +645,8 @@ bool get_WindContQIEC_tiq(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_WindContQIEC_tpfilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpfilt; if (!buffer.str().empty()) @@ -647,7 +660,8 @@ bool get_WindContQIEC_tpfilt(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_WindContQIEC_tpost(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpost; if (!buffer.str().empty()) @@ -661,7 +675,8 @@ bool get_WindContQIEC_tpost(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_WindContQIEC_tqord(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tqord; if (!buffer.str().empty()) @@ -675,7 +690,8 @@ bool get_WindContQIEC_tqord(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_WindContQIEC_tufilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tufilt; if (!buffer.str().empty()) @@ -689,7 +705,8 @@ bool get_WindContQIEC_tufilt(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_WindContQIEC_udb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->udb1; if (!buffer.str().empty()) @@ -703,7 +720,8 @@ bool get_WindContQIEC_udb1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_WindContQIEC_udb2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->udb2; if (!buffer.str().empty()) @@ -717,7 +735,8 @@ bool get_WindContQIEC_udb2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_WindContQIEC_umax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->umax; if (!buffer.str().empty()) @@ -731,7 +750,8 @@ bool get_WindContQIEC_umax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_WindContQIEC_umin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->umin; if (!buffer.str().empty()) @@ -745,7 +765,8 @@ bool get_WindContQIEC_umin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_WindContQIEC_uqdip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uqdip; if (!buffer.str().empty()) @@ -759,7 +780,8 @@ bool get_WindContQIEC_uqdip(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_WindContQIEC_uref0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uref0; if (!buffer.str().empty()) @@ -771,11 +793,12 @@ bool get_WindContQIEC_uref0(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } -bool get_WindContQIEC_xdroop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_WindContQIEC_windLVRTQcontrolModesType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xdroop; + buffer << element->windLVRTQcontrolModesType; if (!buffer.str().empty()) { return true; @@ -785,13 +808,12 @@ bool get_WindContQIEC_xdroop(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - -bool get_WindContQIEC_windLVRTQcontrolModesType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_WindContQIEC_windQcontrolModesType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->windLVRTQcontrolModesType; + buffer << element->windQcontrolModesType; if (!buffer.str().empty()) { return true; @@ -801,11 +823,12 @@ bool get_WindContQIEC_windLVRTQcontrolModesType(const BaseClass* BaseClass_ptr1, return false; } -bool get_WindContQIEC_windQcontrolModesType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_WindContQIEC_xdroop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->windQcontrolModesType; + buffer << element->xdroop; if (!buffer.str().empty()) { return true; @@ -823,42 +846,42 @@ const char* WindContQIEC::debugString() const void WindContQIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindContQIEC"), &WindContQIEC_factory)); + factory_map.emplace("cim:WindContQIEC", &WindContQIEC_factory); } void WindContQIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.iqh1"), &assign_WindContQIEC_iqh1)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.iqmax"), &assign_WindContQIEC_iqmax)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.iqmin"), &assign_WindContQIEC_iqmin)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.iqpost"), &assign_WindContQIEC_iqpost)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.kiq"), &assign_WindContQIEC_kiq)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.kiu"), &assign_WindContQIEC_kiu)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.kpq"), &assign_WindContQIEC_kpq)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.kpu"), &assign_WindContQIEC_kpu)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.kqv"), &assign_WindContQIEC_kqv)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.qmax"), &assign_WindContQIEC_qmax)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.qmin"), &assign_WindContQIEC_qmin)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.rdroop"), &assign_WindContQIEC_rdroop)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.tiq"), &assign_WindContQIEC_tiq)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.tpfilt"), &assign_WindContQIEC_tpfilt)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.tpost"), &assign_WindContQIEC_tpost)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.tqord"), &assign_WindContQIEC_tqord)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.tufilt"), &assign_WindContQIEC_tufilt)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.udb1"), &assign_WindContQIEC_udb1)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.udb2"), &assign_WindContQIEC_udb2)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.umax"), &assign_WindContQIEC_umax)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.umin"), &assign_WindContQIEC_umin)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.uqdip"), &assign_WindContQIEC_uqdip)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.uref0"), &assign_WindContQIEC_uref0)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.windLVRTQcontrolModesType"), &assign_WindContQIEC_windLVRTQcontrolModesType)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.windQcontrolModesType"), &assign_WindContQIEC_windQcontrolModesType)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.xdroop"), &assign_WindContQIEC_xdroop)); + assign_map.emplace("cim:WindContQIEC.iqh1", &assign_WindContQIEC_iqh1); + assign_map.emplace("cim:WindContQIEC.iqmax", &assign_WindContQIEC_iqmax); + assign_map.emplace("cim:WindContQIEC.iqmin", &assign_WindContQIEC_iqmin); + assign_map.emplace("cim:WindContQIEC.iqpost", &assign_WindContQIEC_iqpost); + assign_map.emplace("cim:WindContQIEC.kiq", &assign_WindContQIEC_kiq); + assign_map.emplace("cim:WindContQIEC.kiu", &assign_WindContQIEC_kiu); + assign_map.emplace("cim:WindContQIEC.kpq", &assign_WindContQIEC_kpq); + assign_map.emplace("cim:WindContQIEC.kpu", &assign_WindContQIEC_kpu); + assign_map.emplace("cim:WindContQIEC.kqv", &assign_WindContQIEC_kqv); + assign_map.emplace("cim:WindContQIEC.qmax", &assign_WindContQIEC_qmax); + assign_map.emplace("cim:WindContQIEC.qmin", &assign_WindContQIEC_qmin); + assign_map.emplace("cim:WindContQIEC.rdroop", &assign_WindContQIEC_rdroop); + assign_map.emplace("cim:WindContQIEC.tiq", &assign_WindContQIEC_tiq); + assign_map.emplace("cim:WindContQIEC.tpfilt", &assign_WindContQIEC_tpfilt); + assign_map.emplace("cim:WindContQIEC.tpost", &assign_WindContQIEC_tpost); + assign_map.emplace("cim:WindContQIEC.tqord", &assign_WindContQIEC_tqord); + assign_map.emplace("cim:WindContQIEC.tufilt", &assign_WindContQIEC_tufilt); + assign_map.emplace("cim:WindContQIEC.udb1", &assign_WindContQIEC_udb1); + assign_map.emplace("cim:WindContQIEC.udb2", &assign_WindContQIEC_udb2); + assign_map.emplace("cim:WindContQIEC.umax", &assign_WindContQIEC_umax); + assign_map.emplace("cim:WindContQIEC.umin", &assign_WindContQIEC_umin); + assign_map.emplace("cim:WindContQIEC.uqdip", &assign_WindContQIEC_uqdip); + assign_map.emplace("cim:WindContQIEC.uref0", &assign_WindContQIEC_uref0); + assign_map.emplace("cim:WindContQIEC.windLVRTQcontrolModesType", &assign_WindContQIEC_windLVRTQcontrolModesType); + assign_map.emplace("cim:WindContQIEC.windQcontrolModesType", &assign_WindContQIEC_windQcontrolModesType); + assign_map.emplace("cim:WindContQIEC.xdroop", &assign_WindContQIEC_xdroop); } void WindContQIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.WindTurbineType3or4IEC"), &assign_WindContQIEC_WindTurbineType3or4IEC)); + assign_map.emplace("cim:WindContQIEC.WindTurbineType3or4IEC", &assign_WindContQIEC_WindTurbineType3or4IEC); } void WindContQIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/WindContQIEC.hpp b/CGMES_2.4.15_16FEB2016/WindContQIEC.hpp index 461131d55..024e73ccd 100644 --- a/CGMES_2.4.15_16FEB2016/WindContQIEC.hpp +++ b/CGMES_2.4.15_16FEB2016/WindContQIEC.hpp @@ -21,9 +21,7 @@ namespace CIMPP { class WindTurbineType3or4IEC; - /* - Q control model. Reference: IEC Standard 61400-27-1 Section 6.6.5.6. - */ + /** \brief Q control model. Reference: IEC Standard 61400-27-1 Section 6.6.5.6. */ class WindContQIEC : public IdentifiedObject { public: @@ -31,33 +29,86 @@ namespace CIMPP WindContQIEC(); ~WindContQIEC() override; - CIMPP::WindTurbineType3or4IEC* WindTurbineType3or4IEC; /* Wind turbine type 3 or 4 model with which this reactive control mode is associated. Default: 0 */ - CIMPP::PU iqh1; /* Maximum reactive current injection during dip (i). It is type dependent parameter. Default: nullptr */ - CIMPP::PU iqmax; /* Maximum reactive current injection (i). It is type dependent parameter. Default: nullptr */ - CIMPP::PU iqmin; /* Minimum reactive current injection (i). It is type dependent parameter. Default: nullptr */ - CIMPP::PU iqpost; /* Post fault reactive current injection (). It is project dependent parameter. Default: nullptr */ - CIMPP::PU kiq; /* Reactive power PI controller integration gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kiu; /* Voltage PI controller integration gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kpq; /* Reactive power PI controller proportional gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kpu; /* Voltage PI controller proportional gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kqv; /* Voltage scaling factor for LVRT current (). It is project dependent parameter. Default: nullptr */ - CIMPP::PU qmax; /* Maximum reactive power (q). It is type dependent parameter. Default: nullptr */ - CIMPP::PU qmin; /* Minimum reactive power (q). It is type dependent parameter. Default: nullptr */ - CIMPP::PU rdroop; /* Resistive component of voltage drop impedance (). It is project dependent parameter. Default: nullptr */ - CIMPP::Seconds tiq; /* Time constant in reactive current lag (T). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tpfilt; /* Power measurement filter time constant (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tpost; /* Length of time period where post fault reactive power is injected (). It is project dependent parameter. Default: nullptr */ - CIMPP::Seconds tqord; /* Time constant in reactive power order lag (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tufilt; /* Voltage measurement filter time constant (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU udb1; /* Voltage dead band lower limit (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU udb2; /* Voltage dead band upper limit (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU umax; /* Maximum voltage in voltage PI controller integral term (u). It is type dependent parameter. Default: nullptr */ - CIMPP::PU umin; /* Minimum voltage in voltage PI controller integral term (u). It is type dependent parameter. Default: nullptr */ - CIMPP::PU uqdip; /* Voltage threshold for LVRT detection in q control (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU uref0; /* User defined bias in voltage reference (), used when =. It is case dependent parameter. Default: nullptr */ - CIMPP::WindLVRTQcontrolModesKind windLVRTQcontrolModesType; /* Types of LVRT Q control modes (). It is project dependent parameter. Default: 0 */ - CIMPP::WindQcontrolModesKind windQcontrolModesType; /* Types of general wind turbine Q control modes (). It is project dependent parameter. Default: 0 */ - CIMPP::PU xdroop; /* Inductive component of voltage drop impedance (). It is project dependent parameter. Default: nullptr */ + /** \brief Wind turbine type 3 or 4 model with which this reactive control mode is associated. Default: 0 */ + CIMPP::WindTurbineType3or4IEC* WindTurbineType3or4IEC; + + /** \brief Maximum reactive current injection during dip (i). It is type dependent parameter. Default: nullptr */ + CIMPP::PU iqh1; + + /** \brief Maximum reactive current injection (i). It is type dependent parameter. Default: nullptr */ + CIMPP::PU iqmax; + + /** \brief Minimum reactive current injection (i). It is type dependent parameter. Default: nullptr */ + CIMPP::PU iqmin; + + /** \brief Post fault reactive current injection (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU iqpost; + + /** \brief Reactive power PI controller integration gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kiq; + + /** \brief Voltage PI controller integration gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kiu; + + /** \brief Reactive power PI controller proportional gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kpq; + + /** \brief Voltage PI controller proportional gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kpu; + + /** \brief Voltage scaling factor for LVRT current (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU kqv; + + /** \brief Maximum reactive power (q). It is type dependent parameter. Default: nullptr */ + CIMPP::PU qmax; + + /** \brief Minimum reactive power (q). It is type dependent parameter. Default: nullptr */ + CIMPP::PU qmin; + + /** \brief Resistive component of voltage drop impedance (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU rdroop; + + /** \brief Time constant in reactive current lag (T). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tiq; + + /** \brief Power measurement filter time constant (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tpfilt; + + /** \brief Length of time period where post fault reactive power is injected (). It is project dependent parameter. Default: nullptr */ + CIMPP::Seconds tpost; + + /** \brief Time constant in reactive power order lag (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tqord; + + /** \brief Voltage measurement filter time constant (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tufilt; + + /** \brief Voltage dead band lower limit (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU udb1; + + /** \brief Voltage dead band upper limit (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU udb2; + + /** \brief Maximum voltage in voltage PI controller integral term (u). It is type dependent parameter. Default: nullptr */ + CIMPP::PU umax; + + /** \brief Minimum voltage in voltage PI controller integral term (u). It is type dependent parameter. Default: nullptr */ + CIMPP::PU umin; + + /** \brief Voltage threshold for LVRT detection in q control (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU uqdip; + + /** \brief User defined bias in voltage reference (), used when =. It is case dependent parameter. Default: nullptr */ + CIMPP::PU uref0; + + /** \brief Types of LVRT Q control modes (). It is project dependent parameter. Default: 0 */ + CIMPP::WindLVRTQcontrolModesKind windLVRTQcontrolModesType; + + /** \brief Types of general wind turbine Q control modes (). It is project dependent parameter. Default: 0 */ + CIMPP::WindQcontrolModesKind windQcontrolModesType; + + /** \brief Inductive component of voltage drop impedance (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU xdroop; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/WindContRotorRIEC.cpp b/CGMES_2.4.15_16FEB2016/WindContRotorRIEC.cpp index 2f2775fa0..67c95d633 100644 --- a/CGMES_2.4.15_16FEB2016/WindContRotorRIEC.cpp +++ b/CGMES_2.4.15_16FEB2016/WindContRotorRIEC.cpp @@ -10,19 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindDynamicsLookupTable.hpp" #include "WindGenTurbineType2IEC.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -WindContRotorRIEC::WindContRotorRIEC() : WindGenTurbineType2IEC(nullptr) {}; -WindContRotorRIEC::~WindContRotorRIEC() {}; +WindContRotorRIEC::WindContRotorRIEC() : WindGenTurbineType2IEC(nullptr) {} +WindContRotorRIEC::~WindContRotorRIEC() {} static const std::list PossibleProfilesForClass = { @@ -58,148 +50,158 @@ WindContRotorRIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindContRotorRIEC_kirr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindDynamicsLookupTable_WindContRotorRIEC(BaseClass*, BaseClass*); +bool assign_WindContRotorRIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->kirr; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) + { + element->WindDynamicsLookupTable.push_back(element2); + return assign_WindDynamicsLookupTable_WindContRotorRIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindContRotorRIEC_komegafilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType2IEC_WindContRotorRIEC(BaseClass*, BaseClass*); +bool assign_WindContRotorRIEC_WindGenTurbineType2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + WindGenTurbineType2IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->komegafilt; - if (buffer.fail()) - return false; - else - return true; + if (element->WindGenTurbineType2IEC != element2) + { + element->WindGenTurbineType2IEC = element2; + return assign_WindGenTurbineType2IEC_WindContRotorRIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindContRotorRIEC_kpfilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContRotorRIEC_kirr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->kpfilt; - if (buffer.fail()) - return false; - else + buffer >> element->kirr; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContRotorRIEC_kprr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContRotorRIEC_komegafilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->kprr; - if (buffer.fail()) - return false; - else + buffer >> element->komegafilt; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContRotorRIEC_rmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContRotorRIEC_kpfilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->rmax; - if (buffer.fail()) - return false; - else + buffer >> element->kpfilt; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContRotorRIEC_rmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContRotorRIEC_kprr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->rmin; - if (buffer.fail()) - return false; - else + buffer >> element->kprr; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContRotorRIEC_tomegafilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContRotorRIEC_rmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tomegafilt; - if (buffer.fail()) - return false; - else + buffer >> element->rmax; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContRotorRIEC_tpfilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContRotorRIEC_rmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tpfilt; - if (buffer.fail()) - return false; - else + buffer >> element->rmin; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindDynamicsLookupTable_WindContRotorRIEC(BaseClass*, BaseClass*); -bool assign_WindContRotorRIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindContRotorRIEC_tomegafilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); - WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) + buffer >> element->tomegafilt; + if (!buffer.fail()) { - element->WindDynamicsLookupTable.push_back(element2); - return assign_WindDynamicsLookupTable_WindContRotorRIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_WindGenTurbineType2IEC_WindContRotorRIEC(BaseClass*, BaseClass*); -bool assign_WindContRotorRIEC_WindGenTurbineType2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_WindContRotorRIEC_tpfilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); - WindGenTurbineType2IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindGenTurbineType2IEC != element2) + buffer >> element->tpfilt; + if (!buffer.fail()) { - element->WindGenTurbineType2IEC = element2; - return assign_WindGenTurbineType2IEC_WindContRotorRIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + + bool get_WindContRotorRIEC_kirr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kirr; if (!buffer.str().empty()) @@ -213,7 +215,8 @@ bool get_WindContRotorRIEC_kirr(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindContRotorRIEC_komegafilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->komegafilt; if (!buffer.str().empty()) @@ -227,7 +230,8 @@ bool get_WindContRotorRIEC_komegafilt(const BaseClass* BaseClass_ptr1, std::stri bool get_WindContRotorRIEC_kpfilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpfilt; if (!buffer.str().empty()) @@ -241,7 +245,8 @@ bool get_WindContRotorRIEC_kpfilt(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindContRotorRIEC_kprr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kprr; if (!buffer.str().empty()) @@ -255,7 +260,8 @@ bool get_WindContRotorRIEC_kprr(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindContRotorRIEC_rmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rmax; if (!buffer.str().empty()) @@ -269,7 +275,8 @@ bool get_WindContRotorRIEC_rmax(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindContRotorRIEC_rmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rmin; if (!buffer.str().empty()) @@ -283,7 +290,8 @@ bool get_WindContRotorRIEC_rmin(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindContRotorRIEC_tomegafilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tomegafilt; if (!buffer.str().empty()) @@ -297,7 +305,8 @@ bool get_WindContRotorRIEC_tomegafilt(const BaseClass* BaseClass_ptr1, std::stri bool get_WindContRotorRIEC_tpfilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpfilt; if (!buffer.str().empty()) @@ -309,8 +318,6 @@ bool get_WindContRotorRIEC_tpfilt(const BaseClass* BaseClass_ptr1, std::stringst return false; } - - const char WindContRotorRIEC::debugName[] = "WindContRotorRIEC"; const char* WindContRotorRIEC::debugString() const { @@ -319,25 +326,25 @@ const char* WindContRotorRIEC::debugString() const void WindContRotorRIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC"), &WindContRotorRIEC_factory)); + factory_map.emplace("cim:WindContRotorRIEC", &WindContRotorRIEC_factory); } void WindContRotorRIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.kirr"), &assign_WindContRotorRIEC_kirr)); - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.komegafilt"), &assign_WindContRotorRIEC_komegafilt)); - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.kpfilt"), &assign_WindContRotorRIEC_kpfilt)); - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.kprr"), &assign_WindContRotorRIEC_kprr)); - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.rmax"), &assign_WindContRotorRIEC_rmax)); - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.rmin"), &assign_WindContRotorRIEC_rmin)); - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.tomegafilt"), &assign_WindContRotorRIEC_tomegafilt)); - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.tpfilt"), &assign_WindContRotorRIEC_tpfilt)); + assign_map.emplace("cim:WindContRotorRIEC.kirr", &assign_WindContRotorRIEC_kirr); + assign_map.emplace("cim:WindContRotorRIEC.komegafilt", &assign_WindContRotorRIEC_komegafilt); + assign_map.emplace("cim:WindContRotorRIEC.kpfilt", &assign_WindContRotorRIEC_kpfilt); + assign_map.emplace("cim:WindContRotorRIEC.kprr", &assign_WindContRotorRIEC_kprr); + assign_map.emplace("cim:WindContRotorRIEC.rmax", &assign_WindContRotorRIEC_rmax); + assign_map.emplace("cim:WindContRotorRIEC.rmin", &assign_WindContRotorRIEC_rmin); + assign_map.emplace("cim:WindContRotorRIEC.tomegafilt", &assign_WindContRotorRIEC_tomegafilt); + assign_map.emplace("cim:WindContRotorRIEC.tpfilt", &assign_WindContRotorRIEC_tpfilt); } void WindContRotorRIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.WindDynamicsLookupTable"), &assign_WindContRotorRIEC_WindDynamicsLookupTable)); - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.WindGenTurbineType2IEC"), &assign_WindContRotorRIEC_WindGenTurbineType2IEC)); + assign_map.emplace("cim:WindContRotorRIEC.WindDynamicsLookupTable", &assign_WindContRotorRIEC_WindDynamicsLookupTable); + assign_map.emplace("cim:WindContRotorRIEC.WindGenTurbineType2IEC", &assign_WindContRotorRIEC_WindGenTurbineType2IEC); } void WindContRotorRIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/WindContRotorRIEC.hpp b/CGMES_2.4.15_16FEB2016/WindContRotorRIEC.hpp index 52b6df6d7..50c215acb 100644 --- a/CGMES_2.4.15_16FEB2016/WindContRotorRIEC.hpp +++ b/CGMES_2.4.15_16FEB2016/WindContRotorRIEC.hpp @@ -21,9 +21,7 @@ namespace CIMPP class WindDynamicsLookupTable; class WindGenTurbineType2IEC; - /* - Rotor resistance control model. Reference: IEC Standard 61400-27-1 Section 6.6.5.2. - */ + /** \brief Rotor resistance control model. Reference: IEC Standard 61400-27-1 Section 6.6.5.2. */ class WindContRotorRIEC : public IdentifiedObject { public: @@ -31,16 +29,35 @@ namespace CIMPP WindContRotorRIEC(); ~WindContRotorRIEC() override; - std::list WindDynamicsLookupTable; /* The wind dynamics lookup table associated with this rotor resistance control model. Default: 0 */ - CIMPP::WindGenTurbineType2IEC* WindGenTurbineType2IEC; /* Wind turbine type 2 model with whitch this wind control rotor resistance model is associated. Default: 0 */ - CIMPP::PU kirr; /* Integral gain in rotor resistance PI controller (). It is type dependent parameter. Default: nullptr */ - CIMPP::Simple_Float komegafilt; /* Filter gain for generator speed measurement (K). It is type dependent parameter. Default: nullptr */ - CIMPP::Simple_Float kpfilt; /* Filter gain for power measurement (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kprr; /* Proportional gain in rotor resistance PI controller (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU rmax; /* Maximum rotor resistance (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU rmin; /* Minimum rotor resistance (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tomegafilt; /* Filter time constant for generator speed measurement (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tpfilt; /* Filter time constant for power measurement (). It is type dependent parameter. Default: nullptr */ + /** \brief The wind dynamics lookup table associated with this rotor resistance control model. Default: 0 */ + std::list WindDynamicsLookupTable; + + /** \brief Wind turbine type 2 model with whitch this wind control rotor resistance model is associated. Default: 0 */ + CIMPP::WindGenTurbineType2IEC* WindGenTurbineType2IEC; + + /** \brief Integral gain in rotor resistance PI controller (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kirr; + + /** \brief Filter gain for generator speed measurement (K). It is type dependent parameter. Default: nullptr */ + CIMPP::Simple_Float komegafilt; + + /** \brief Filter gain for power measurement (). It is type dependent parameter. Default: nullptr */ + CIMPP::Simple_Float kpfilt; + + /** \brief Proportional gain in rotor resistance PI controller (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kprr; + + /** \brief Maximum rotor resistance (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU rmax; + + /** \brief Minimum rotor resistance (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU rmin; + + /** \brief Filter time constant for generator speed measurement (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tomegafilt; + + /** \brief Filter time constant for power measurement (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tpfilt; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/WindDynamicsLookupTable.cpp b/CGMES_2.4.15_16FEB2016/WindDynamicsLookupTable.cpp index a688de86e..e88345af5 100644 --- a/CGMES_2.4.15_16FEB2016/WindDynamicsLookupTable.cpp +++ b/CGMES_2.4.15_16FEB2016/WindDynamicsLookupTable.cpp @@ -12,15 +12,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindContPType3IEC.hpp" #include "WindContRotorRIEC.hpp" #include "WindPlantFreqPcontrolIEC.hpp" -#include "Simple_Float.hpp" -#include "WindLookupTableFunctionKind.hpp" -#include "Simple_Float.hpp" -#include "Integer.hpp" using namespace CIMPP; -WindDynamicsLookupTable::WindDynamicsLookupTable() : WindContCurrLimIEC(nullptr), WindContPType3IEC(nullptr), WindContRotorRIEC(nullptr), WindPlantFreqPcontrolIEC(nullptr) {}; -WindDynamicsLookupTable::~WindDynamicsLookupTable() {}; +WindDynamicsLookupTable::WindDynamicsLookupTable() : WindContCurrLimIEC(nullptr), WindContPType3IEC(nullptr), WindContRotorRIEC(nullptr), WindPlantFreqPcontrolIEC(nullptr) {} +WindDynamicsLookupTable::~WindDynamicsLookupTable() {} static const std::list PossibleProfilesForClass = { @@ -54,60 +50,6 @@ WindDynamicsLookupTable::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindDynamicsLookupTable_input(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->input; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_WindDynamicsLookupTable_lookupTableFunctionType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->lookupTableFunctionType; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_WindDynamicsLookupTable_output(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->output; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_WindDynamicsLookupTable_sequence(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->sequence; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_WindContCurrLimIEC_WindDynamicsLookupTable(BaseClass*, BaseClass*); bool assign_WindDynamicsLookupTable_WindContCurrLimIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -124,6 +66,7 @@ bool assign_WindDynamicsLookupTable_WindContCurrLimIEC(BaseClass* BaseClass_ptr1 } return false; } + bool assign_WindContPType3IEC_WindDynamicsLookupTable(BaseClass*, BaseClass*); bool assign_WindDynamicsLookupTable_WindContPType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -140,6 +83,7 @@ bool assign_WindDynamicsLookupTable_WindContPType3IEC(BaseClass* BaseClass_ptr1, } return false; } + bool assign_WindContRotorRIEC_WindDynamicsLookupTable(BaseClass*, BaseClass*); bool assign_WindDynamicsLookupTable_WindContRotorRIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -156,6 +100,7 @@ bool assign_WindDynamicsLookupTable_WindContRotorRIEC(BaseClass* BaseClass_ptr1, } return false; } + bool assign_WindPlantFreqPcontrolIEC_WindDynamicsLookupTable(BaseClass*, BaseClass*); bool assign_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -173,52 +118,66 @@ bool assign_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC(BaseClass* BaseClas return false; } -bool get_WindDynamicsLookupTable_input(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_WindDynamicsLookupTable_input(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->input; - if (!buffer.str().empty()) + buffer >> element->input; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_WindDynamicsLookupTable_output(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_WindDynamicsLookupTable_lookupTableFunctionType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->output; - if (!buffer.str().empty()) + buffer >> element->lookupTableFunctionType; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_WindDynamicsLookupTable_sequence(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_WindDynamicsLookupTable_output(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->sequence; - if (!buffer.str().empty()) + buffer >> element->output; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } +bool assign_WindDynamicsLookupTable_sequence(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->sequence; + if (!buffer.fail()) + { + return true; + } + } + return false; +} bool get_WindDynamicsLookupTable_WindContCurrLimIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContCurrLimIEC != 0) { @@ -231,7 +190,8 @@ bool get_WindDynamicsLookupTable_WindContCurrLimIEC(const BaseClass* BaseClass_p bool get_WindDynamicsLookupTable_WindContPType3IEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContPType3IEC != 0) { @@ -244,7 +204,8 @@ bool get_WindDynamicsLookupTable_WindContPType3IEC(const BaseClass* BaseClass_pt bool get_WindDynamicsLookupTable_WindContRotorRIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContRotorRIEC != 0) { @@ -257,7 +218,8 @@ bool get_WindDynamicsLookupTable_WindContRotorRIEC(const BaseClass* BaseClass_pt bool get_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindPlantFreqPcontrolIEC != 0) { @@ -268,10 +230,25 @@ bool get_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC(const BaseClass* BaseC return false; } +bool get_WindDynamicsLookupTable_input(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->input; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} bool get_WindDynamicsLookupTable_lookupTableFunctionType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lookupTableFunctionType; if (!buffer.str().empty()) @@ -283,6 +260,36 @@ bool get_WindDynamicsLookupTable_lookupTableFunctionType(const BaseClass* BaseCl return false; } +bool get_WindDynamicsLookupTable_output(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->output; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_WindDynamicsLookupTable_sequence(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->sequence; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + const char WindDynamicsLookupTable::debugName[] = "WindDynamicsLookupTable"; const char* WindDynamicsLookupTable::debugString() const { @@ -291,23 +298,23 @@ const char* WindDynamicsLookupTable::debugString() const void WindDynamicsLookupTable::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable"), &WindDynamicsLookupTable_factory)); + factory_map.emplace("cim:WindDynamicsLookupTable", &WindDynamicsLookupTable_factory); } void WindDynamicsLookupTable::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.input"), &assign_WindDynamicsLookupTable_input)); - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.lookupTableFunctionType"), &assign_WindDynamicsLookupTable_lookupTableFunctionType)); - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.output"), &assign_WindDynamicsLookupTable_output)); - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.sequence"), &assign_WindDynamicsLookupTable_sequence)); + assign_map.emplace("cim:WindDynamicsLookupTable.input", &assign_WindDynamicsLookupTable_input); + assign_map.emplace("cim:WindDynamicsLookupTable.lookupTableFunctionType", &assign_WindDynamicsLookupTable_lookupTableFunctionType); + assign_map.emplace("cim:WindDynamicsLookupTable.output", &assign_WindDynamicsLookupTable_output); + assign_map.emplace("cim:WindDynamicsLookupTable.sequence", &assign_WindDynamicsLookupTable_sequence); } void WindDynamicsLookupTable::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.WindContCurrLimIEC"), &assign_WindDynamicsLookupTable_WindContCurrLimIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.WindContPType3IEC"), &assign_WindDynamicsLookupTable_WindContPType3IEC)); - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.WindContRotorRIEC"), &assign_WindDynamicsLookupTable_WindContRotorRIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.WindPlantFreqPcontrolIEC"), &assign_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC)); + assign_map.emplace("cim:WindDynamicsLookupTable.WindContCurrLimIEC", &assign_WindDynamicsLookupTable_WindContCurrLimIEC); + assign_map.emplace("cim:WindDynamicsLookupTable.WindContPType3IEC", &assign_WindDynamicsLookupTable_WindContPType3IEC); + assign_map.emplace("cim:WindDynamicsLookupTable.WindContRotorRIEC", &assign_WindDynamicsLookupTable_WindContRotorRIEC); + assign_map.emplace("cim:WindDynamicsLookupTable.WindPlantFreqPcontrolIEC", &assign_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC); } void WindDynamicsLookupTable::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/WindDynamicsLookupTable.hpp b/CGMES_2.4.15_16FEB2016/WindDynamicsLookupTable.hpp index 8c0e3c1cb..06d99ff11 100644 --- a/CGMES_2.4.15_16FEB2016/WindDynamicsLookupTable.hpp +++ b/CGMES_2.4.15_16FEB2016/WindDynamicsLookupTable.hpp @@ -23,9 +23,7 @@ namespace CIMPP class WindContRotorRIEC; class WindPlantFreqPcontrolIEC; - /* - The class models a look up table for the purpose of wind standard models. - */ + /** \brief The class models a look up table for the purpose of wind standard models. */ class WindDynamicsLookupTable : public IdentifiedObject { public: @@ -33,14 +31,29 @@ namespace CIMPP WindDynamicsLookupTable(); ~WindDynamicsLookupTable() override; - CIMPP::WindContCurrLimIEC* WindContCurrLimIEC; /* The wind dynamics lookup table associated with this current control limitation model. Default: 0 */ - CIMPP::WindContPType3IEC* WindContPType3IEC; /* The wind dynamics lookup table associated with this P control type 3 model. Default: 0 */ - CIMPP::WindContRotorRIEC* WindContRotorRIEC; /* The rotor resistance control model with which this wind dynamics lookup table is associated. Default: 0 */ - CIMPP::WindPlantFreqPcontrolIEC* WindPlantFreqPcontrolIEC; /* The wind dynamics lookup table associated with this frequency and active power wind plant model. Default: 0 */ - CIMPP::Simple_Float input; /* Input value (x) for the lookup table function. Default: nullptr */ - CIMPP::WindLookupTableFunctionKind lookupTableFunctionType; /* Type of the lookup table function. Default: 0 */ - CIMPP::Simple_Float output; /* Output value (y) for the lookup table function. Default: nullptr */ - CIMPP::Integer sequence; /* Sequence numbers of the pairs of the input (x) and the output (y) of the lookup table function. Default: 0 */ + /** \brief The wind dynamics lookup table associated with this current control limitation model. Default: 0 */ + CIMPP::WindContCurrLimIEC* WindContCurrLimIEC; + + /** \brief The wind dynamics lookup table associated with this P control type 3 model. Default: 0 */ + CIMPP::WindContPType3IEC* WindContPType3IEC; + + /** \brief The rotor resistance control model with which this wind dynamics lookup table is associated. Default: 0 */ + CIMPP::WindContRotorRIEC* WindContRotorRIEC; + + /** \brief The wind dynamics lookup table associated with this frequency and active power wind plant model. Default: 0 */ + CIMPP::WindPlantFreqPcontrolIEC* WindPlantFreqPcontrolIEC; + + /** \brief Input value (x) for the lookup table function. Default: nullptr */ + CIMPP::Simple_Float input; + + /** \brief Type of the lookup table function. Default: 0 */ + CIMPP::WindLookupTableFunctionKind lookupTableFunctionType; + + /** \brief Output value (y) for the lookup table function. Default: nullptr */ + CIMPP::Simple_Float output; + + /** \brief Sequence numbers of the pairs of the input (x) and the output (y) of the lookup table function. Default: 0 */ + CIMPP::Integer sequence; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/WindGenTurbineType1IEC.cpp b/CGMES_2.4.15_16FEB2016/WindGenTurbineType1IEC.cpp index 0233c9ed6..3b78fca73 100644 --- a/CGMES_2.4.15_16FEB2016/WindGenTurbineType1IEC.cpp +++ b/CGMES_2.4.15_16FEB2016/WindGenTurbineType1IEC.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindGenTurbineType1IEC::WindGenTurbineType1IEC() : WindAeroConstIEC(nullptr) {}; -WindGenTurbineType1IEC::~WindGenTurbineType1IEC() {}; +WindGenTurbineType1IEC::WindGenTurbineType1IEC() : WindAeroConstIEC(nullptr) {} +WindGenTurbineType1IEC::~WindGenTurbineType1IEC() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ WindGenTurbineType1IEC::getPossibleProfilesForAttributes() const return map; } - - bool assign_WindAeroConstIEC_WindGenTurbineType1IEC(BaseClass*, BaseClass*); bool assign_WindGenTurbineType1IEC_WindAeroConstIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_WindGenTurbineType1IEC_WindAeroConstIEC(BaseClass* BaseClass_ptr1, B return false; } - bool get_WindGenTurbineType1IEC_WindAeroConstIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindGenTurbineType1IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType1IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindAeroConstIEC != 0) { @@ -73,7 +71,6 @@ bool get_WindGenTurbineType1IEC_WindAeroConstIEC(const BaseClass* BaseClass_ptr1 return false; } - const char WindGenTurbineType1IEC::debugName[] = "WindGenTurbineType1IEC"; const char* WindGenTurbineType1IEC::debugString() const { @@ -82,7 +79,7 @@ const char* WindGenTurbineType1IEC::debugString() const void WindGenTurbineType1IEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindGenTurbineType1IEC"), &WindGenTurbineType1IEC_factory)); + factory_map.emplace("cim:WindGenTurbineType1IEC", &WindGenTurbineType1IEC_factory); } void WindGenTurbineType1IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void WindGenTurbineType1IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType1IEC.WindAeroConstIEC"), &assign_WindGenTurbineType1IEC_WindAeroConstIEC)); + assign_map.emplace("cim:WindGenTurbineType1IEC.WindAeroConstIEC", &assign_WindGenTurbineType1IEC_WindAeroConstIEC); } void WindGenTurbineType1IEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/WindGenTurbineType1IEC.hpp b/CGMES_2.4.15_16FEB2016/WindGenTurbineType1IEC.hpp index aafdadbcf..d4e30e4cc 100644 --- a/CGMES_2.4.15_16FEB2016/WindGenTurbineType1IEC.hpp +++ b/CGMES_2.4.15_16FEB2016/WindGenTurbineType1IEC.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class WindAeroConstIEC; - /* - Wind turbine IEC Type 1. Reference: IEC Standard 61400-27-1, section 6.5.2. - */ + /** \brief Wind turbine IEC Type 1. Reference: IEC Standard 61400-27-1, section 6.5.2. */ class WindGenTurbineType1IEC : public WindTurbineType1or2IEC { public: @@ -27,7 +25,8 @@ namespace CIMPP WindGenTurbineType1IEC(); ~WindGenTurbineType1IEC() override; - CIMPP::WindAeroConstIEC* WindAeroConstIEC; /* Wind aerodynamic model associated with this wind turbine type 1 model. Default: 0 */ + /** \brief Wind aerodynamic model associated with this wind turbine type 1 model. Default: 0 */ + CIMPP::WindAeroConstIEC* WindAeroConstIEC; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/WindGenTurbineType2IEC.cpp b/CGMES_2.4.15_16FEB2016/WindGenTurbineType2IEC.cpp index a637739a7..145486473 100644 --- a/CGMES_2.4.15_16FEB2016/WindGenTurbineType2IEC.cpp +++ b/CGMES_2.4.15_16FEB2016/WindGenTurbineType2IEC.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindGenTurbineType2IEC::WindGenTurbineType2IEC() : WindContRotorRIEC(nullptr), WindPitchContEmulIEC(nullptr) {}; -WindGenTurbineType2IEC::~WindGenTurbineType2IEC() {}; +WindGenTurbineType2IEC::WindGenTurbineType2IEC() : WindContRotorRIEC(nullptr), WindPitchContEmulIEC(nullptr) {} +WindGenTurbineType2IEC::~WindGenTurbineType2IEC() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ WindGenTurbineType2IEC::getPossibleProfilesForAttributes() const return map; } - - bool assign_WindContRotorRIEC_WindGenTurbineType2IEC(BaseClass*, BaseClass*); bool assign_WindGenTurbineType2IEC_WindContRotorRIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_WindGenTurbineType2IEC_WindContRotorRIEC(BaseClass* BaseClass_ptr1, } return false; } + bool assign_WindPitchContEmulIEC_WindGenTurbineType2IEC(BaseClass*, BaseClass*); bool assign_WindGenTurbineType2IEC_WindPitchContEmulIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_WindGenTurbineType2IEC_WindPitchContEmulIEC(BaseClass* BaseClass_ptr return false; } - bool get_WindGenTurbineType2IEC_WindContRotorRIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindGenTurbineType2IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType2IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContRotorRIEC != 0) { @@ -93,7 +92,8 @@ bool get_WindGenTurbineType2IEC_WindContRotorRIEC(const BaseClass* BaseClass_ptr bool get_WindGenTurbineType2IEC_WindPitchContEmulIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindGenTurbineType2IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType2IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindPitchContEmulIEC != 0) { @@ -104,7 +104,6 @@ bool get_WindGenTurbineType2IEC_WindPitchContEmulIEC(const BaseClass* BaseClass_ return false; } - const char WindGenTurbineType2IEC::debugName[] = "WindGenTurbineType2IEC"; const char* WindGenTurbineType2IEC::debugString() const { @@ -113,7 +112,7 @@ const char* WindGenTurbineType2IEC::debugString() const void WindGenTurbineType2IEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindGenTurbineType2IEC"), &WindGenTurbineType2IEC_factory)); + factory_map.emplace("cim:WindGenTurbineType2IEC", &WindGenTurbineType2IEC_factory); } void WindGenTurbineType2IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void WindGenTurbineType2IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType2IEC.WindContRotorRIEC"), &assign_WindGenTurbineType2IEC_WindContRotorRIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType2IEC.WindPitchContEmulIEC"), &assign_WindGenTurbineType2IEC_WindPitchContEmulIEC)); + assign_map.emplace("cim:WindGenTurbineType2IEC.WindContRotorRIEC", &assign_WindGenTurbineType2IEC_WindContRotorRIEC); + assign_map.emplace("cim:WindGenTurbineType2IEC.WindPitchContEmulIEC", &assign_WindGenTurbineType2IEC_WindPitchContEmulIEC); } void WindGenTurbineType2IEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/WindGenTurbineType2IEC.hpp b/CGMES_2.4.15_16FEB2016/WindGenTurbineType2IEC.hpp index f323b7d53..435504800 100644 --- a/CGMES_2.4.15_16FEB2016/WindGenTurbineType2IEC.hpp +++ b/CGMES_2.4.15_16FEB2016/WindGenTurbineType2IEC.hpp @@ -18,9 +18,7 @@ namespace CIMPP class WindContRotorRIEC; class WindPitchContEmulIEC; - /* - Wind turbine IEC Type 2. Reference: IEC Standard 61400-27-1, section 6.5.3. - */ + /** \brief Wind turbine IEC Type 2. Reference: IEC Standard 61400-27-1, section 6.5.3. */ class WindGenTurbineType2IEC : public WindTurbineType1or2IEC { public: @@ -28,8 +26,11 @@ namespace CIMPP WindGenTurbineType2IEC(); ~WindGenTurbineType2IEC() override; - CIMPP::WindContRotorRIEC* WindContRotorRIEC; /* Wind control rotor resistance model associated with wind turbine type 2 model. Default: 0 */ - CIMPP::WindPitchContEmulIEC* WindPitchContEmulIEC; /* Pitch control emulator model associated with this wind turbine type 2 model. Default: 0 */ + /** \brief Wind control rotor resistance model associated with wind turbine type 2 model. Default: 0 */ + CIMPP::WindContRotorRIEC* WindContRotorRIEC; + + /** \brief Pitch control emulator model associated with this wind turbine type 2 model. Default: 0 */ + CIMPP::WindPitchContEmulIEC* WindPitchContEmulIEC; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/WindGenTurbineType3IEC.cpp b/CGMES_2.4.15_16FEB2016/WindGenTurbineType3IEC.cpp index a3dc45672..06d7e4bf4 100644 --- a/CGMES_2.4.15_16FEB2016/WindGenTurbineType3IEC.cpp +++ b/CGMES_2.4.15_16FEB2016/WindGenTurbineType3IEC.cpp @@ -12,13 +12,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindContPType3IEC.hpp" #include "WindContPitchAngleIEC.hpp" #include "WindMechIEC.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -WindGenTurbineType3IEC::WindGenTurbineType3IEC() : WindAeroLinearIEC(nullptr), WindContPType3IEC(nullptr), WindContPitchAngleIEC(nullptr), WindMechIEC(nullptr) {}; -WindGenTurbineType3IEC::~WindGenTurbineType3IEC() {}; +WindGenTurbineType3IEC::WindGenTurbineType3IEC() : WindAeroLinearIEC(nullptr), WindContPType3IEC(nullptr), WindContPitchAngleIEC(nullptr), WindMechIEC(nullptr) {} +WindGenTurbineType3IEC::~WindGenTurbineType3IEC() {} static const std::list PossibleProfilesForClass = { @@ -50,34 +48,6 @@ WindGenTurbineType3IEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindGenTurbineType3IEC_dipmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->dipmax; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_WindGenTurbineType3IEC_diqmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->diqmax; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_WindAeroLinearIEC_WindGenTurbineType3IEC(BaseClass*, BaseClass*); bool assign_WindGenTurbineType3IEC_WindAeroLinearIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -94,6 +64,7 @@ bool assign_WindGenTurbineType3IEC_WindAeroLinearIEC(BaseClass* BaseClass_ptr1, } return false; } + bool assign_WindContPType3IEC_WindGenTurbineType3IEC(BaseClass*, BaseClass*); bool assign_WindGenTurbineType3IEC_WindContPType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -110,6 +81,7 @@ bool assign_WindGenTurbineType3IEC_WindContPType3IEC(BaseClass* BaseClass_ptr1, } return false; } + bool assign_WindContPitchAngleIEC_WindGenTurbineType3IEC(BaseClass*, BaseClass*); bool assign_WindGenTurbineType3IEC_WindContPitchAngleIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -126,6 +98,7 @@ bool assign_WindGenTurbineType3IEC_WindContPitchAngleIEC(BaseClass* BaseClass_pt } return false; } + bool assign_WindMechIEC_WindGenTurbineType3IEC(BaseClass*, BaseClass*); bool assign_WindGenTurbineType3IEC_WindMechIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -143,38 +116,38 @@ bool assign_WindGenTurbineType3IEC_WindMechIEC(BaseClass* BaseClass_ptr1, BaseCl return false; } -bool get_WindGenTurbineType3IEC_dipmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_WindGenTurbineType3IEC_dipmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->dipmax; - if (!buffer.str().empty()) + buffer >> element->dipmax; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_WindGenTurbineType3IEC_diqmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_WindGenTurbineType3IEC_diqmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->diqmax; - if (!buffer.str().empty()) + buffer >> element->diqmax; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_WindGenTurbineType3IEC_WindAeroLinearIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindAeroLinearIEC != 0) { @@ -187,7 +160,8 @@ bool get_WindGenTurbineType3IEC_WindAeroLinearIEC(const BaseClass* BaseClass_ptr bool get_WindGenTurbineType3IEC_WindContPType3IEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContPType3IEC != 0) { @@ -200,7 +174,8 @@ bool get_WindGenTurbineType3IEC_WindContPType3IEC(const BaseClass* BaseClass_ptr bool get_WindGenTurbineType3IEC_WindContPitchAngleIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContPitchAngleIEC != 0) { @@ -213,7 +188,8 @@ bool get_WindGenTurbineType3IEC_WindContPitchAngleIEC(const BaseClass* BaseClass bool get_WindGenTurbineType3IEC_WindMechIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindMechIEC != 0) { @@ -224,6 +200,35 @@ bool get_WindGenTurbineType3IEC_WindMechIEC(const BaseClass* BaseClass_ptr1, std return false; } +bool get_WindGenTurbineType3IEC_dipmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->dipmax; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_WindGenTurbineType3IEC_diqmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->diqmax; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char WindGenTurbineType3IEC::debugName[] = "WindGenTurbineType3IEC"; const char* WindGenTurbineType3IEC::debugString() const @@ -233,21 +238,21 @@ const char* WindGenTurbineType3IEC::debugString() const void WindGenTurbineType3IEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3IEC"), &WindGenTurbineType3IEC_factory)); + factory_map.emplace("cim:WindGenTurbineType3IEC", &WindGenTurbineType3IEC_factory); } void WindGenTurbineType3IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3IEC.dipmax"), &assign_WindGenTurbineType3IEC_dipmax)); - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3IEC.diqmax"), &assign_WindGenTurbineType3IEC_diqmax)); + assign_map.emplace("cim:WindGenTurbineType3IEC.dipmax", &assign_WindGenTurbineType3IEC_dipmax); + assign_map.emplace("cim:WindGenTurbineType3IEC.diqmax", &assign_WindGenTurbineType3IEC_diqmax); } void WindGenTurbineType3IEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3IEC.WindAeroLinearIEC"), &assign_WindGenTurbineType3IEC_WindAeroLinearIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3IEC.WindContPType3IEC"), &assign_WindGenTurbineType3IEC_WindContPType3IEC)); - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3IEC.WindContPitchAngleIEC"), &assign_WindGenTurbineType3IEC_WindContPitchAngleIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3IEC.WindMechIEC"), &assign_WindGenTurbineType3IEC_WindMechIEC)); + assign_map.emplace("cim:WindGenTurbineType3IEC.WindAeroLinearIEC", &assign_WindGenTurbineType3IEC_WindAeroLinearIEC); + assign_map.emplace("cim:WindGenTurbineType3IEC.WindContPType3IEC", &assign_WindGenTurbineType3IEC_WindContPType3IEC); + assign_map.emplace("cim:WindGenTurbineType3IEC.WindContPitchAngleIEC", &assign_WindGenTurbineType3IEC_WindContPitchAngleIEC); + assign_map.emplace("cim:WindGenTurbineType3IEC.WindMechIEC", &assign_WindGenTurbineType3IEC_WindMechIEC); } void WindGenTurbineType3IEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/WindGenTurbineType3IEC.hpp b/CGMES_2.4.15_16FEB2016/WindGenTurbineType3IEC.hpp index b968e187a..f51005682 100644 --- a/CGMES_2.4.15_16FEB2016/WindGenTurbineType3IEC.hpp +++ b/CGMES_2.4.15_16FEB2016/WindGenTurbineType3IEC.hpp @@ -21,9 +21,7 @@ namespace CIMPP class WindContPitchAngleIEC; class WindMechIEC; - /* - Generator model for wind turbines of IEC type 3A and 3B. - */ + /** \brief Generator model for wind turbines of IEC type 3A and 3B. */ class WindGenTurbineType3IEC : public WindTurbineType3or4IEC { public: @@ -31,12 +29,23 @@ namespace CIMPP WindGenTurbineType3IEC(); ~WindGenTurbineType3IEC() override; - CIMPP::WindAeroLinearIEC* WindAeroLinearIEC; /* Wind aerodynamic model associated with this wind generator type 3 model. Default: 0 */ - CIMPP::WindContPType3IEC* WindContPType3IEC; /* Wind control P type 3 model associated with this wind turbine type 3 model. Default: 0 */ - CIMPP::WindContPitchAngleIEC* WindContPitchAngleIEC; /* Wind control pitch angle model associated with this wind turbine type 3. Default: 0 */ - CIMPP::WindMechIEC* WindMechIEC; /* Wind mechanical model associated with this wind turbine Type 3 model. Default: 0 */ - CIMPP::PU dipmax; /* Maximum active current ramp rate (di). It is project dependent parameter. Default: nullptr */ - CIMPP::PU diqmax; /* Maximum reactive current ramp rate (di). It is project dependent parameter. Default: nullptr */ + /** \brief Wind aerodynamic model associated with this wind generator type 3 model. Default: 0 */ + CIMPP::WindAeroLinearIEC* WindAeroLinearIEC; + + /** \brief Wind control P type 3 model associated with this wind turbine type 3 model. Default: 0 */ + CIMPP::WindContPType3IEC* WindContPType3IEC; + + /** \brief Wind control pitch angle model associated with this wind turbine type 3. Default: 0 */ + CIMPP::WindContPitchAngleIEC* WindContPitchAngleIEC; + + /** \brief Wind mechanical model associated with this wind turbine Type 3 model. Default: 0 */ + CIMPP::WindMechIEC* WindMechIEC; + + /** \brief Maximum active current ramp rate (di). It is project dependent parameter. Default: nullptr */ + CIMPP::PU dipmax; + + /** \brief Maximum reactive current ramp rate (di). It is project dependent parameter. Default: nullptr */ + CIMPP::PU diqmax; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/WindGenTurbineType3aIEC.cpp b/CGMES_2.4.15_16FEB2016/WindGenTurbineType3aIEC.cpp index 4488af1f2..e72c76ed4 100644 --- a/CGMES_2.4.15_16FEB2016/WindGenTurbineType3aIEC.cpp +++ b/CGMES_2.4.15_16FEB2016/WindGenTurbineType3aIEC.cpp @@ -8,14 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "PU.hpp" using namespace CIMPP; -WindGenTurbineType3aIEC::WindGenTurbineType3aIEC() {}; -WindGenTurbineType3aIEC::~WindGenTurbineType3aIEC() {}; +WindGenTurbineType3aIEC::WindGenTurbineType3aIEC() {} +WindGenTurbineType3aIEC::~WindGenTurbineType3aIEC() {} static const std::list PossibleProfilesForClass = { @@ -44,51 +41,52 @@ WindGenTurbineType3aIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindGenTurbineType3aIEC_kpc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType3aIEC_kpc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindGenTurbineType3aIEC_tic(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType3aIEC_tic(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tic; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindGenTurbineType3aIEC_xs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType3aIEC_xs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_WindGenTurbineType3aIEC_kpc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpc; if (!buffer.str().empty()) @@ -102,7 +100,8 @@ bool get_WindGenTurbineType3aIEC_kpc(const BaseClass* BaseClass_ptr1, std::strin bool get_WindGenTurbineType3aIEC_tic(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tic; if (!buffer.str().empty()) @@ -116,7 +115,8 @@ bool get_WindGenTurbineType3aIEC_tic(const BaseClass* BaseClass_ptr1, std::strin bool get_WindGenTurbineType3aIEC_xs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xs; if (!buffer.str().empty()) @@ -128,8 +128,6 @@ bool get_WindGenTurbineType3aIEC_xs(const BaseClass* BaseClass_ptr1, std::string return false; } - - const char WindGenTurbineType3aIEC::debugName[] = "WindGenTurbineType3aIEC"; const char* WindGenTurbineType3aIEC::debugString() const { @@ -138,14 +136,14 @@ const char* WindGenTurbineType3aIEC::debugString() const void WindGenTurbineType3aIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3aIEC"), &WindGenTurbineType3aIEC_factory)); + factory_map.emplace("cim:WindGenTurbineType3aIEC", &WindGenTurbineType3aIEC_factory); } void WindGenTurbineType3aIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3aIEC.kpc"), &assign_WindGenTurbineType3aIEC_kpc)); - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3aIEC.tic"), &assign_WindGenTurbineType3aIEC_tic)); - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3aIEC.xs"), &assign_WindGenTurbineType3aIEC_xs)); + assign_map.emplace("cim:WindGenTurbineType3aIEC.kpc", &assign_WindGenTurbineType3aIEC_kpc); + assign_map.emplace("cim:WindGenTurbineType3aIEC.tic", &assign_WindGenTurbineType3aIEC_tic); + assign_map.emplace("cim:WindGenTurbineType3aIEC.xs", &assign_WindGenTurbineType3aIEC_xs); } void WindGenTurbineType3aIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/WindGenTurbineType3aIEC.hpp b/CGMES_2.4.15_16FEB2016/WindGenTurbineType3aIEC.hpp index 09582f1b1..027ac9e1b 100644 --- a/CGMES_2.4.15_16FEB2016/WindGenTurbineType3aIEC.hpp +++ b/CGMES_2.4.15_16FEB2016/WindGenTurbineType3aIEC.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEC Type 3A generator set model. Reference: IEC Standard 61400-27-1 Section 6.6.3.2. - */ + /** \brief IEC Type 3A generator set model. Reference: IEC Standard 61400-27-1 Section 6.6.3.2. */ class WindGenTurbineType3aIEC : public WindGenTurbineType3IEC { public: @@ -29,9 +27,14 @@ namespace CIMPP WindGenTurbineType3aIEC(); ~WindGenTurbineType3aIEC() override; - CIMPP::Simple_Float kpc; /* Current PI controller proportional gain (K). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tic; /* Current PI controller integration time constant (T). It is type dependent parameter. Default: nullptr */ - CIMPP::PU xs; /* Electromagnetic transient reactance (x). It is type dependent parameter. Default: nullptr */ + /** \brief Current PI controller proportional gain (K). It is type dependent parameter. Default: nullptr */ + CIMPP::Simple_Float kpc; + + /** \brief Current PI controller integration time constant (T). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tic; + + /** \brief Electromagnetic transient reactance (x). It is type dependent parameter. Default: nullptr */ + CIMPP::PU xs; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/WindGenTurbineType3bIEC.cpp b/CGMES_2.4.15_16FEB2016/WindGenTurbineType3bIEC.cpp index 01d8c1ec4..bd7b7fba3 100644 --- a/CGMES_2.4.15_16FEB2016/WindGenTurbineType3bIEC.cpp +++ b/CGMES_2.4.15_16FEB2016/WindGenTurbineType3bIEC.cpp @@ -8,16 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" using namespace CIMPP; -WindGenTurbineType3bIEC::WindGenTurbineType3bIEC() {}; -WindGenTurbineType3bIEC::~WindGenTurbineType3bIEC() {}; +WindGenTurbineType3bIEC::WindGenTurbineType3bIEC() {} +WindGenTurbineType3bIEC::~WindGenTurbineType3bIEC() {} static const std::list PossibleProfilesForClass = { @@ -48,77 +43,80 @@ WindGenTurbineType3bIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindGenTurbineType3bIEC_fducw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType3bIEC_fducw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fducw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindGenTurbineType3bIEC_mwtcwp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType3bIEC_mwtcwp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwtcwp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindGenTurbineType3bIEC_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType3bIEC_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindGenTurbineType3bIEC_two(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType3bIEC_two(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->two; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindGenTurbineType3bIEC_xs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType3bIEC_xs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_WindGenTurbineType3bIEC_fducw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fducw; if (!buffer.str().empty()) @@ -132,7 +130,8 @@ bool get_WindGenTurbineType3bIEC_fducw(const BaseClass* BaseClass_ptr1, std::str bool get_WindGenTurbineType3bIEC_mwtcwp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwtcwp; if (!buffer.str().empty()) @@ -146,7 +145,8 @@ bool get_WindGenTurbineType3bIEC_mwtcwp(const BaseClass* BaseClass_ptr1, std::st bool get_WindGenTurbineType3bIEC_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -160,7 +160,8 @@ bool get_WindGenTurbineType3bIEC_tg(const BaseClass* BaseClass_ptr1, std::string bool get_WindGenTurbineType3bIEC_two(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->two; if (!buffer.str().empty()) @@ -174,7 +175,8 @@ bool get_WindGenTurbineType3bIEC_two(const BaseClass* BaseClass_ptr1, std::strin bool get_WindGenTurbineType3bIEC_xs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xs; if (!buffer.str().empty()) @@ -186,8 +188,6 @@ bool get_WindGenTurbineType3bIEC_xs(const BaseClass* BaseClass_ptr1, std::string return false; } - - const char WindGenTurbineType3bIEC::debugName[] = "WindGenTurbineType3bIEC"; const char* WindGenTurbineType3bIEC::debugString() const { @@ -196,16 +196,16 @@ const char* WindGenTurbineType3bIEC::debugString() const void WindGenTurbineType3bIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3bIEC"), &WindGenTurbineType3bIEC_factory)); + factory_map.emplace("cim:WindGenTurbineType3bIEC", &WindGenTurbineType3bIEC_factory); } void WindGenTurbineType3bIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3bIEC.fducw"), &assign_WindGenTurbineType3bIEC_fducw)); - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3bIEC.mwtcwp"), &assign_WindGenTurbineType3bIEC_mwtcwp)); - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3bIEC.tg"), &assign_WindGenTurbineType3bIEC_tg)); - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3bIEC.two"), &assign_WindGenTurbineType3bIEC_two)); - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3bIEC.xs"), &assign_WindGenTurbineType3bIEC_xs)); + assign_map.emplace("cim:WindGenTurbineType3bIEC.fducw", &assign_WindGenTurbineType3bIEC_fducw); + assign_map.emplace("cim:WindGenTurbineType3bIEC.mwtcwp", &assign_WindGenTurbineType3bIEC_mwtcwp); + assign_map.emplace("cim:WindGenTurbineType3bIEC.tg", &assign_WindGenTurbineType3bIEC_tg); + assign_map.emplace("cim:WindGenTurbineType3bIEC.two", &assign_WindGenTurbineType3bIEC_two); + assign_map.emplace("cim:WindGenTurbineType3bIEC.xs", &assign_WindGenTurbineType3bIEC_xs); } void WindGenTurbineType3bIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/WindGenTurbineType3bIEC.hpp b/CGMES_2.4.15_16FEB2016/WindGenTurbineType3bIEC.hpp index d97a6b792..37a684772 100644 --- a/CGMES_2.4.15_16FEB2016/WindGenTurbineType3bIEC.hpp +++ b/CGMES_2.4.15_16FEB2016/WindGenTurbineType3bIEC.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEC Type 3B generator set model. Reference: IEC Standard 61400-27-1 Section 6.6.3.3. - */ + /** \brief IEC Type 3B generator set model. Reference: IEC Standard 61400-27-1 Section 6.6.3.3. */ class WindGenTurbineType3bIEC : public WindGenTurbineType3IEC { public: @@ -30,11 +28,20 @@ namespace CIMPP WindGenTurbineType3bIEC(); ~WindGenTurbineType3bIEC() override; - CIMPP::Simple_Float fducw; /* Crowbar duration versus voltage variation look-up table (f()). It is case dependent parameter. Default: nullptr */ - CIMPP::Boolean mwtcwp; /* Crowbar control mode (). The parameter is case dependent parameter. Default: false */ - CIMPP::Seconds tg; /* Current generation Time constant (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds two; /* Time constant for crowbar washout filter (). It is case dependent parameter. Default: nullptr */ - CIMPP::PU xs; /* Electromagnetic transient reactance (x). It is type dependent parameter. Default: nullptr */ + /** \brief Crowbar duration versus voltage variation look-up table (f()). It is case dependent parameter. Default: nullptr */ + CIMPP::Simple_Float fducw; + + /** \brief Crowbar control mode (). The parameter is case dependent parameter. Default: false */ + CIMPP::Boolean mwtcwp; + + /** \brief Current generation Time constant (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Time constant for crowbar washout filter (). It is case dependent parameter. Default: nullptr */ + CIMPP::Seconds two; + + /** \brief Electromagnetic transient reactance (x). It is type dependent parameter. Default: nullptr */ + CIMPP::PU xs; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/WindGenType4IEC.cpp b/CGMES_2.4.15_16FEB2016/WindGenType4IEC.cpp index 0161a30cf..103b066bf 100644 --- a/CGMES_2.4.15_16FEB2016/WindGenType4IEC.cpp +++ b/CGMES_2.4.15_16FEB2016/WindGenType4IEC.cpp @@ -8,15 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" using namespace CIMPP; -WindGenType4IEC::WindGenType4IEC() {}; -WindGenType4IEC::~WindGenType4IEC() {}; +WindGenType4IEC::WindGenType4IEC() {} +WindGenType4IEC::~WindGenType4IEC() {} static const std::list PossibleProfilesForClass = { @@ -46,64 +42,66 @@ WindGenType4IEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindGenType4IEC_dipmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenType4IEC_dipmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dipmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindGenType4IEC_diqmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenType4IEC_diqmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->diqmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindGenType4IEC_diqmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenType4IEC_diqmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->diqmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindGenType4IEC_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenType4IEC_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_WindGenType4IEC_dipmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dipmax; if (!buffer.str().empty()) @@ -117,7 +115,8 @@ bool get_WindGenType4IEC_dipmax(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindGenType4IEC_diqmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->diqmax; if (!buffer.str().empty()) @@ -131,7 +130,8 @@ bool get_WindGenType4IEC_diqmax(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindGenType4IEC_diqmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->diqmin; if (!buffer.str().empty()) @@ -145,7 +145,8 @@ bool get_WindGenType4IEC_diqmin(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindGenType4IEC_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -157,8 +158,6 @@ bool get_WindGenType4IEC_tg(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char WindGenType4IEC::debugName[] = "WindGenType4IEC"; const char* WindGenType4IEC::debugString() const { @@ -167,15 +166,15 @@ const char* WindGenType4IEC::debugString() const void WindGenType4IEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindGenType4IEC"), &WindGenType4IEC_factory)); + factory_map.emplace("cim:WindGenType4IEC", &WindGenType4IEC_factory); } void WindGenType4IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGenType4IEC.dipmax"), &assign_WindGenType4IEC_dipmax)); - assign_map.insert(std::make_pair(std::string("cim:WindGenType4IEC.diqmax"), &assign_WindGenType4IEC_diqmax)); - assign_map.insert(std::make_pair(std::string("cim:WindGenType4IEC.diqmin"), &assign_WindGenType4IEC_diqmin)); - assign_map.insert(std::make_pair(std::string("cim:WindGenType4IEC.tg"), &assign_WindGenType4IEC_tg)); + assign_map.emplace("cim:WindGenType4IEC.dipmax", &assign_WindGenType4IEC_dipmax); + assign_map.emplace("cim:WindGenType4IEC.diqmax", &assign_WindGenType4IEC_diqmax); + assign_map.emplace("cim:WindGenType4IEC.diqmin", &assign_WindGenType4IEC_diqmin); + assign_map.emplace("cim:WindGenType4IEC.tg", &assign_WindGenType4IEC_tg); } void WindGenType4IEC::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/WindGenType4IEC.hpp b/CGMES_2.4.15_16FEB2016/WindGenType4IEC.hpp index ce8bb4469..f76748389 100644 --- a/CGMES_2.4.15_16FEB2016/WindGenType4IEC.hpp +++ b/CGMES_2.4.15_16FEB2016/WindGenType4IEC.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEC Type 4 generator set model. Reference: IEC Standard 61400-27-1 Section 6.6.3.4. - */ + /** \brief IEC Type 4 generator set model. Reference: IEC Standard 61400-27-1 Section 6.6.3.4. */ class WindGenType4IEC : public WindTurbineType3or4IEC { public: @@ -28,10 +26,17 @@ namespace CIMPP WindGenType4IEC(); ~WindGenType4IEC() override; - CIMPP::PU dipmax; /* Maximum active current ramp rate (di). It is project dependent parameter. Default: nullptr */ - CIMPP::PU diqmax; /* Maximum reactive current ramp rate (di). It is project dependent parameter. Default: nullptr */ - CIMPP::PU diqmin; /* Minimum reactive current ramp rate (d). It is case dependent parameter. Default: nullptr */ - CIMPP::Seconds tg; /* Time constant (T). It is type dependent parameter. Default: nullptr */ + /** \brief Maximum active current ramp rate (di). It is project dependent parameter. Default: nullptr */ + CIMPP::PU dipmax; + + /** \brief Maximum reactive current ramp rate (di). It is project dependent parameter. Default: nullptr */ + CIMPP::PU diqmax; + + /** \brief Minimum reactive current ramp rate (d). It is case dependent parameter. Default: nullptr */ + CIMPP::PU diqmin; + + /** \brief Time constant (T). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tg; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/WindGenUnitKind.cpp b/CGMES_2.4.15_16FEB2016/WindGenUnitKind.cpp index f92814598..c2290d973 100644 --- a/CGMES_2.4.15_16FEB2016/WindGenUnitKind.cpp +++ b/CGMES_2.4.15_16FEB2016/WindGenUnitKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "WindGenUnitKind") + if (EnumSymbol.substr(0, pos) != "WindGenUnitKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,12 +50,12 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "offshore") + if (EnumSymbol == "offshore") { rop = WindGenUnitKind::offshore; return lop; } - if(EnumSymbol == "onshore") + if (EnumSymbol == "onshore") { rop = WindGenUnitKind::onshore; return lop; diff --git a/CGMES_2.4.15_16FEB2016/WindGenUnitKind.hpp b/CGMES_2.4.15_16FEB2016/WindGenUnitKind.hpp index 4aa57c46c..52d17765c 100644 --- a/CGMES_2.4.15_16FEB2016/WindGenUnitKind.hpp +++ b/CGMES_2.4.15_16FEB2016/WindGenUnitKind.hpp @@ -9,21 +9,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Kind of wind generating unit. - */ + /** \brief Kind of wind generating unit. */ class WindGenUnitKind { public: enum WindGenUnitKind_ENUM { - /** - * The wind generating unit is located offshore. - */ + /** The wind generating unit is located offshore. */ offshore, - /** - * The wind generating unit is located onshore. - */ + /** The wind generating unit is located onshore. */ onshore, }; diff --git a/CGMES_2.4.15_16FEB2016/WindGeneratingUnit.cpp b/CGMES_2.4.15_16FEB2016/WindGeneratingUnit.cpp index c3eb51f99..d2764afc7 100644 --- a/CGMES_2.4.15_16FEB2016/WindGeneratingUnit.cpp +++ b/CGMES_2.4.15_16FEB2016/WindGeneratingUnit.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "WindGenUnitKind.hpp" using namespace CIMPP; -WindGeneratingUnit::WindGeneratingUnit() {}; -WindGeneratingUnit::~WindGeneratingUnit() {}; +WindGeneratingUnit::WindGeneratingUnit() {} +WindGeneratingUnit::~WindGeneratingUnit() {} static const std::list PossibleProfilesForClass = { @@ -41,27 +40,24 @@ WindGeneratingUnit::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindGeneratingUnit_windGenUnitType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGeneratingUnit_windGenUnitType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + WindGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->windGenUnitType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - - - bool get_WindGeneratingUnit_windGenUnitType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const WindGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->windGenUnitType; if (!buffer.str().empty()) @@ -81,12 +77,12 @@ const char* WindGeneratingUnit::debugString() const void WindGeneratingUnit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindGeneratingUnit"), &WindGeneratingUnit_factory)); + factory_map.emplace("cim:WindGeneratingUnit", &WindGeneratingUnit_factory); } void WindGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGeneratingUnit.windGenUnitType"), &assign_WindGeneratingUnit_windGenUnitType)); + assign_map.emplace("cim:WindGeneratingUnit.windGenUnitType", &assign_WindGeneratingUnit_windGenUnitType); } void WindGeneratingUnit::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_16FEB2016/WindGeneratingUnit.hpp b/CGMES_2.4.15_16FEB2016/WindGeneratingUnit.hpp index 9289c1160..d6f2ffd7f 100644 --- a/CGMES_2.4.15_16FEB2016/WindGeneratingUnit.hpp +++ b/CGMES_2.4.15_16FEB2016/WindGeneratingUnit.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A wind driven generating unit. May be used to represent a single turbine or an aggregation. - */ + /** \brief A wind driven generating unit. May be used to represent a single turbine or an aggregation. */ class WindGeneratingUnit : public GeneratingUnit { public: @@ -27,7 +25,8 @@ namespace CIMPP WindGeneratingUnit(); ~WindGeneratingUnit() override; - CIMPP::WindGenUnitKind windGenUnitType; /* The kind of wind generating unit Default: 0 */ + /** \brief The kind of wind generating unit Default: 0 */ + CIMPP::WindGenUnitKind windGenUnitType; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/WindLVRTQcontrolModesKind.cpp b/CGMES_2.4.15_16FEB2016/WindLVRTQcontrolModesKind.cpp index 1cd506474..32c42c5fd 100644 --- a/CGMES_2.4.15_16FEB2016/WindLVRTQcontrolModesKind.cpp +++ b/CGMES_2.4.15_16FEB2016/WindLVRTQcontrolModesKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "WindLVRTQcontrolModesKind") + if (EnumSymbol.substr(0, pos) != "WindLVRTQcontrolModesKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "mode1") + if (EnumSymbol == "mode1") { rop = WindLVRTQcontrolModesKind::mode1; return lop; } - if(EnumSymbol == "mode2") + if (EnumSymbol == "mode2") { rop = WindLVRTQcontrolModesKind::mode2; return lop; } - if(EnumSymbol == "mode3") + if (EnumSymbol == "mode3") { rop = WindLVRTQcontrolModesKind::mode3; return lop; diff --git a/CGMES_2.4.15_16FEB2016/WindLVRTQcontrolModesKind.hpp b/CGMES_2.4.15_16FEB2016/WindLVRTQcontrolModesKind.hpp index 7b731082a..3f5f0d084 100644 --- a/CGMES_2.4.15_16FEB2016/WindLVRTQcontrolModesKind.hpp +++ b/CGMES_2.4.15_16FEB2016/WindLVRTQcontrolModesKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - LVRT Q control modes . - */ + /** \brief LVRT Q control modes . */ class WindLVRTQcontrolModesKind { public: enum WindLVRTQcontrolModesKind_ENUM { - /** - * Voltage dependent reactive current injection (). - */ + /** Voltage dependent reactive current injection (). */ mode1, - /** - * Reactive current injection controlled as the pre-fault value plus an additional voltage dependent reactive current injection (). - */ + /** Reactive current injection controlled as the pre-fault value plus an additional voltage dependent reactive current injection (). */ mode2, - /** - * Reactive current injection controlled as the pre-fault value plus an additional voltage dependent reactive current injection during fault, and as the pre-fault value plus an additional constant reactive current injection post fault (). - */ + /** Reactive current injection controlled as the pre-fault value plus an additional voltage dependent reactive current injection during fault, and as the pre-fault value plus an additional constant reactive current injection post fault (). */ mode3, }; diff --git a/CGMES_2.4.15_16FEB2016/WindLookupTableFunctionKind.cpp b/CGMES_2.4.15_16FEB2016/WindLookupTableFunctionKind.cpp index e6d94391f..ff9a280cc 100644 --- a/CGMES_2.4.15_16FEB2016/WindLookupTableFunctionKind.cpp +++ b/CGMES_2.4.15_16FEB2016/WindLookupTableFunctionKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "WindLookupTableFunctionKind") + if (EnumSymbol.substr(0, pos) != "WindLookupTableFunctionKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,27 +50,27 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "fpslip") + if (EnumSymbol == "fpslip") { rop = WindLookupTableFunctionKind::fpslip; return lop; } - if(EnumSymbol == "fpomega") + if (EnumSymbol == "fpomega") { rop = WindLookupTableFunctionKind::fpomega; return lop; } - if(EnumSymbol == "ipvdl") + if (EnumSymbol == "ipvdl") { rop = WindLookupTableFunctionKind::ipvdl; return lop; } - if(EnumSymbol == "iqvdl") + if (EnumSymbol == "iqvdl") { rop = WindLookupTableFunctionKind::iqvdl; return lop; } - if(EnumSymbol == "fdpf") + if (EnumSymbol == "fdpf") { rop = WindLookupTableFunctionKind::fdpf; return lop; diff --git a/CGMES_2.4.15_16FEB2016/WindLookupTableFunctionKind.hpp b/CGMES_2.4.15_16FEB2016/WindLookupTableFunctionKind.hpp index 98f42e4fa..e055847de 100644 --- a/CGMES_2.4.15_16FEB2016/WindLookupTableFunctionKind.hpp +++ b/CGMES_2.4.15_16FEB2016/WindLookupTableFunctionKind.hpp @@ -9,33 +9,21 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Function of the lookup table. - */ + /** \brief Function of the lookup table. */ class WindLookupTableFunctionKind { public: enum WindLookupTableFunctionKind_ENUM { - /** - * Power versus slip lookup table (f()). It is used for rotor resistance control model, IEC 61400-27-1, section 6.6.5.2. - */ + /** Power versus slip lookup table (f()). It is used for rotor resistance control model, IEC 61400-27-1, section 6.6.5.2. */ fpslip, - /** - * Power vs. speed lookup table (f()). It is used for P control model type 3, IEC 61400-27-1, section 6.6.5.3. - */ + /** Power vs. speed lookup table (f()). It is used for P control model type 3, IEC 61400-27-1, section 6.6.5.3. */ fpomega, - /** - * Lookup table for voltage dependency of active current limits (i()). It is used for current limitation model, IEC 61400-27-1, section 6.6.5.7. - */ + /** Lookup table for voltage dependency of active current limits (i()). It is used for current limitation model, IEC 61400-27-1, section 6.6.5.7. */ ipvdl, - /** - * Lookup table for voltage dependency of reactive current limits (i()). It is used for current limitation model, IEC 61400-27-1, section 6.6.5.7. - */ + /** Lookup table for voltage dependency of reactive current limits (i()). It is used for current limitation model, IEC 61400-27-1, section 6.6.5.7. */ iqvdl, - /** - * Power vs. frequency lookup table (()). It is used for wind power plant frequency and active power control model, IEC 61400-27-1, Annex E. - */ + /** Power vs. frequency lookup table (()). It is used for wind power plant frequency and active power control model, IEC 61400-27-1, Annex E. */ fdpf, }; diff --git a/CGMES_2.4.15_16FEB2016/WindMechIEC.cpp b/CGMES_2.4.15_16FEB2016/WindMechIEC.cpp index b52b48f35..358889264 100644 --- a/CGMES_2.4.15_16FEB2016/WindMechIEC.cpp +++ b/CGMES_2.4.15_16FEB2016/WindMechIEC.cpp @@ -11,15 +11,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindGenTurbineType3IEC.hpp" #include "WindTurbineType1or2IEC.hpp" #include "WindTurbineType4bIEC.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" using namespace CIMPP; -WindMechIEC::WindMechIEC() : WindGenTurbineType3IEC(nullptr), WindTurbineType1or2IEC(nullptr), WindTurbineType4bIEC(nullptr) {}; -WindMechIEC::~WindMechIEC() {}; +WindMechIEC::WindMechIEC() : WindGenTurbineType3IEC(nullptr), WindTurbineType1or2IEC(nullptr), WindTurbineType4bIEC(nullptr) {} +WindMechIEC::~WindMechIEC() {} static const std::list PossibleProfilesForClass = { @@ -52,112 +48,120 @@ WindMechIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindMechIEC_cdrt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType3IEC_WindMechIEC(BaseClass*, BaseClass*); +bool assign_WindMechIEC_WindGenTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + WindMechIEC* element = dynamic_cast(BaseClass_ptr1); + WindGenTurbineType3IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->cdrt; - if (buffer.fail()) - return false; - else - return true; + if (element->WindGenTurbineType3IEC != element2) + { + element->WindGenTurbineType3IEC = element2; + return assign_WindGenTurbineType3IEC_WindMechIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindMechIEC_hgen(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType1or2IEC_WindMechIEC(BaseClass*, BaseClass*); +bool assign_WindMechIEC_WindTurbineType1or2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + WindMechIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType1or2IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->hgen; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType1or2IEC != element2) + { + element->WindTurbineType1or2IEC = element2; + return assign_WindTurbineType1or2IEC_WindMechIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindMechIEC_hwtr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType4bIEC_WindMechIEC(BaseClass*, BaseClass*); +bool assign_WindMechIEC_WindTurbineType4bIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + WindMechIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType4bIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->hwtr; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType4bIEC != element2) + { + element->WindTurbineType4bIEC = element2; + return assign_WindTurbineType4bIEC_WindMechIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindMechIEC_kdrt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindMechIEC_cdrt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + WindMechIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->kdrt; - if (buffer.fail()) - return false; - else + buffer >> element->cdrt; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindGenTurbineType3IEC_WindMechIEC(BaseClass*, BaseClass*); -bool assign_WindMechIEC_WindGenTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindMechIEC_hgen(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindMechIEC* element = dynamic_cast(BaseClass_ptr1); - WindGenTurbineType3IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindGenTurbineType3IEC != element2) + buffer >> element->hgen; + if (!buffer.fail()) { - element->WindGenTurbineType3IEC = element2; - return assign_WindGenTurbineType3IEC_WindMechIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_WindTurbineType1or2IEC_WindMechIEC(BaseClass*, BaseClass*); -bool assign_WindMechIEC_WindTurbineType1or2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_WindMechIEC_hwtr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindMechIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType1or2IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType1or2IEC != element2) + buffer >> element->hwtr; + if (!buffer.fail()) { - element->WindTurbineType1or2IEC = element2; - return assign_WindTurbineType1or2IEC_WindMechIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_WindTurbineType4bIEC_WindMechIEC(BaseClass*, BaseClass*); -bool assign_WindMechIEC_WindTurbineType4bIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_WindMechIEC_kdrt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindMechIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType4bIEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType4bIEC != element2) + buffer >> element->kdrt; + if (!buffer.fail()) { - element->WindTurbineType4bIEC = element2; - return assign_WindTurbineType4bIEC_WindMechIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + + + bool get_WindMechIEC_cdrt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindMechIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->cdrt; if (!buffer.str().empty()) @@ -171,7 +175,8 @@ bool get_WindMechIEC_cdrt(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_WindMechIEC_hgen(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindMechIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hgen; if (!buffer.str().empty()) @@ -185,7 +190,8 @@ bool get_WindMechIEC_hgen(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_WindMechIEC_hwtr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindMechIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hwtr; if (!buffer.str().empty()) @@ -199,7 +205,8 @@ bool get_WindMechIEC_hwtr(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_WindMechIEC_kdrt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindMechIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdrt; if (!buffer.str().empty()) @@ -211,8 +218,6 @@ bool get_WindMechIEC_kdrt(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char WindMechIEC::debugName[] = "WindMechIEC"; const char* WindMechIEC::debugString() const { @@ -221,22 +226,22 @@ const char* WindMechIEC::debugString() const void WindMechIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindMechIEC"), &WindMechIEC_factory)); + factory_map.emplace("cim:WindMechIEC", &WindMechIEC_factory); } void WindMechIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindMechIEC.cdrt"), &assign_WindMechIEC_cdrt)); - assign_map.insert(std::make_pair(std::string("cim:WindMechIEC.hgen"), &assign_WindMechIEC_hgen)); - assign_map.insert(std::make_pair(std::string("cim:WindMechIEC.hwtr"), &assign_WindMechIEC_hwtr)); - assign_map.insert(std::make_pair(std::string("cim:WindMechIEC.kdrt"), &assign_WindMechIEC_kdrt)); + assign_map.emplace("cim:WindMechIEC.cdrt", &assign_WindMechIEC_cdrt); + assign_map.emplace("cim:WindMechIEC.hgen", &assign_WindMechIEC_hgen); + assign_map.emplace("cim:WindMechIEC.hwtr", &assign_WindMechIEC_hwtr); + assign_map.emplace("cim:WindMechIEC.kdrt", &assign_WindMechIEC_kdrt); } void WindMechIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindMechIEC.WindGenTurbineType3IEC"), &assign_WindMechIEC_WindGenTurbineType3IEC)); - assign_map.insert(std::make_pair(std::string("cim:WindMechIEC.WindTurbineType1or2IEC"), &assign_WindMechIEC_WindTurbineType1or2IEC)); - assign_map.insert(std::make_pair(std::string("cim:WindMechIEC.WindTurbineType4bIEC"), &assign_WindMechIEC_WindTurbineType4bIEC)); + assign_map.emplace("cim:WindMechIEC.WindGenTurbineType3IEC", &assign_WindMechIEC_WindGenTurbineType3IEC); + assign_map.emplace("cim:WindMechIEC.WindTurbineType1or2IEC", &assign_WindMechIEC_WindTurbineType1or2IEC); + assign_map.emplace("cim:WindMechIEC.WindTurbineType4bIEC", &assign_WindMechIEC_WindTurbineType4bIEC); } void WindMechIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/WindMechIEC.hpp b/CGMES_2.4.15_16FEB2016/WindMechIEC.hpp index 650d95c77..59019c1ae 100644 --- a/CGMES_2.4.15_16FEB2016/WindMechIEC.hpp +++ b/CGMES_2.4.15_16FEB2016/WindMechIEC.hpp @@ -21,9 +21,7 @@ namespace CIMPP class WindTurbineType1or2IEC; class WindTurbineType4bIEC; - /* - Two mass model. Reference: IEC Standard 61400-27-1 Section 6.6.2.1. - */ + /** \brief Two mass model. Reference: IEC Standard 61400-27-1 Section 6.6.2.1. */ class WindMechIEC : public IdentifiedObject { public: @@ -31,13 +29,26 @@ namespace CIMPP WindMechIEC(); ~WindMechIEC() override; - CIMPP::WindGenTurbineType3IEC* WindGenTurbineType3IEC; /* Wind turbine Type 3 model with which this wind mechanical model is associated. Default: 0 */ - CIMPP::WindTurbineType1or2IEC* WindTurbineType1or2IEC; /* Wind generator type 1 or 2 model with which this wind mechanical model is associated. Default: 0 */ - CIMPP::WindTurbineType4bIEC* WindTurbineType4bIEC; /* Wind turbine type 4B model with which this wind mechanical model is associated. Default: 0 */ - CIMPP::PU cdrt; /* Drive train damping (. It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds hgen; /* Inertia constant of generator (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds hwtr; /* Inertia constant of wind turbine rotor (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kdrt; /* Drive train stiffness (). It is type dependent parameter. Default: nullptr */ + /** \brief Wind turbine Type 3 model with which this wind mechanical model is associated. Default: 0 */ + CIMPP::WindGenTurbineType3IEC* WindGenTurbineType3IEC; + + /** \brief Wind generator type 1 or 2 model with which this wind mechanical model is associated. Default: 0 */ + CIMPP::WindTurbineType1or2IEC* WindTurbineType1or2IEC; + + /** \brief Wind turbine type 4B model with which this wind mechanical model is associated. Default: 0 */ + CIMPP::WindTurbineType4bIEC* WindTurbineType4bIEC; + + /** \brief Drive train damping (. It is type dependent parameter. Default: nullptr */ + CIMPP::PU cdrt; + + /** \brief Inertia constant of generator (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds hgen; + + /** \brief Inertia constant of wind turbine rotor (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds hwtr; + + /** \brief Drive train stiffness (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kdrt; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/WindPitchContEmulIEC.cpp b/CGMES_2.4.15_16FEB2016/WindPitchContEmulIEC.cpp index 19756384e..c78632e74 100644 --- a/CGMES_2.4.15_16FEB2016/WindPitchContEmulIEC.cpp +++ b/CGMES_2.4.15_16FEB2016/WindPitchContEmulIEC.cpp @@ -9,21 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "WindGenTurbineType2IEC.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -WindPitchContEmulIEC::WindPitchContEmulIEC() : WindGenTurbineType2IEC(nullptr) {}; -WindPitchContEmulIEC::~WindPitchContEmulIEC() {}; +WindPitchContEmulIEC::WindPitchContEmulIEC() : WindGenTurbineType2IEC(nullptr) {} +WindPitchContEmulIEC::~WindPitchContEmulIEC() {} static const std::list PossibleProfilesForClass = { @@ -60,158 +50,168 @@ WindPitchContEmulIEC::getPossibleProfilesForAttributes() const return map; } +bool assign_WindGenTurbineType2IEC_WindPitchContEmulIEC(BaseClass*, BaseClass*); +bool assign_WindPitchContEmulIEC_WindGenTurbineType2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + WindGenTurbineType2IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindGenTurbineType2IEC != element2) + { + element->WindGenTurbineType2IEC = element2; + return assign_WindGenTurbineType2IEC_WindPitchContEmulIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_WindPitchContEmulIEC_kdroop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPitchContEmulIEC_kdroop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kdroop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPitchContEmulIEC_kipce(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPitchContEmulIEC_kipce(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kipce; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPitchContEmulIEC_komegaaero(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPitchContEmulIEC_komegaaero(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->komegaaero; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPitchContEmulIEC_kppce(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPitchContEmulIEC_kppce(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kppce; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPitchContEmulIEC_omegaref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPitchContEmulIEC_omegaref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->omegaref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPitchContEmulIEC_pimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPitchContEmulIEC_pimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPitchContEmulIEC_pimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPitchContEmulIEC_pimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPitchContEmulIEC_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPitchContEmulIEC_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPitchContEmulIEC_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPitchContEmulIEC_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_WindPitchContEmulIEC_tpe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->tpe; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindGenTurbineType2IEC_WindPitchContEmulIEC(BaseClass*, BaseClass*); -bool assign_WindPitchContEmulIEC_WindGenTurbineType2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindPitchContEmulIEC_tpe(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); - WindGenTurbineType2IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindGenTurbineType2IEC != element2) + buffer >> element->tpe; + if (!buffer.fail()) { - element->WindGenTurbineType2IEC = element2; - return assign_WindGenTurbineType2IEC_WindPitchContEmulIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_WindPitchContEmulIEC_kdroop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdroop; if (!buffer.str().empty()) @@ -225,7 +225,8 @@ bool get_WindPitchContEmulIEC_kdroop(const BaseClass* BaseClass_ptr1, std::strin bool get_WindPitchContEmulIEC_kipce(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kipce; if (!buffer.str().empty()) @@ -239,7 +240,8 @@ bool get_WindPitchContEmulIEC_kipce(const BaseClass* BaseClass_ptr1, std::string bool get_WindPitchContEmulIEC_komegaaero(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->komegaaero; if (!buffer.str().empty()) @@ -253,7 +255,8 @@ bool get_WindPitchContEmulIEC_komegaaero(const BaseClass* BaseClass_ptr1, std::s bool get_WindPitchContEmulIEC_kppce(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kppce; if (!buffer.str().empty()) @@ -267,7 +270,8 @@ bool get_WindPitchContEmulIEC_kppce(const BaseClass* BaseClass_ptr1, std::string bool get_WindPitchContEmulIEC_omegaref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->omegaref; if (!buffer.str().empty()) @@ -281,7 +285,8 @@ bool get_WindPitchContEmulIEC_omegaref(const BaseClass* BaseClass_ptr1, std::str bool get_WindPitchContEmulIEC_pimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pimax; if (!buffer.str().empty()) @@ -295,7 +300,8 @@ bool get_WindPitchContEmulIEC_pimax(const BaseClass* BaseClass_ptr1, std::string bool get_WindPitchContEmulIEC_pimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pimin; if (!buffer.str().empty()) @@ -309,7 +315,8 @@ bool get_WindPitchContEmulIEC_pimin(const BaseClass* BaseClass_ptr1, std::string bool get_WindPitchContEmulIEC_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -323,7 +330,8 @@ bool get_WindPitchContEmulIEC_t1(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindPitchContEmulIEC_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -337,7 +345,8 @@ bool get_WindPitchContEmulIEC_t2(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindPitchContEmulIEC_tpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpe; if (!buffer.str().empty()) @@ -349,8 +358,6 @@ bool get_WindPitchContEmulIEC_tpe(const BaseClass* BaseClass_ptr1, std::stringst return false; } - - const char WindPitchContEmulIEC::debugName[] = "WindPitchContEmulIEC"; const char* WindPitchContEmulIEC::debugString() const { @@ -359,26 +366,26 @@ const char* WindPitchContEmulIEC::debugString() const void WindPitchContEmulIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC"), &WindPitchContEmulIEC_factory)); + factory_map.emplace("cim:WindPitchContEmulIEC", &WindPitchContEmulIEC_factory); } void WindPitchContEmulIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC.kdroop"), &assign_WindPitchContEmulIEC_kdroop)); - assign_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC.kipce"), &assign_WindPitchContEmulIEC_kipce)); - assign_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC.komegaaero"), &assign_WindPitchContEmulIEC_komegaaero)); - assign_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC.kppce"), &assign_WindPitchContEmulIEC_kppce)); - assign_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC.omegaref"), &assign_WindPitchContEmulIEC_omegaref)); - assign_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC.pimax"), &assign_WindPitchContEmulIEC_pimax)); - assign_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC.pimin"), &assign_WindPitchContEmulIEC_pimin)); - assign_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC.t1"), &assign_WindPitchContEmulIEC_t1)); - assign_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC.t2"), &assign_WindPitchContEmulIEC_t2)); - assign_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC.tpe"), &assign_WindPitchContEmulIEC_tpe)); + assign_map.emplace("cim:WindPitchContEmulIEC.kdroop", &assign_WindPitchContEmulIEC_kdroop); + assign_map.emplace("cim:WindPitchContEmulIEC.kipce", &assign_WindPitchContEmulIEC_kipce); + assign_map.emplace("cim:WindPitchContEmulIEC.komegaaero", &assign_WindPitchContEmulIEC_komegaaero); + assign_map.emplace("cim:WindPitchContEmulIEC.kppce", &assign_WindPitchContEmulIEC_kppce); + assign_map.emplace("cim:WindPitchContEmulIEC.omegaref", &assign_WindPitchContEmulIEC_omegaref); + assign_map.emplace("cim:WindPitchContEmulIEC.pimax", &assign_WindPitchContEmulIEC_pimax); + assign_map.emplace("cim:WindPitchContEmulIEC.pimin", &assign_WindPitchContEmulIEC_pimin); + assign_map.emplace("cim:WindPitchContEmulIEC.t1", &assign_WindPitchContEmulIEC_t1); + assign_map.emplace("cim:WindPitchContEmulIEC.t2", &assign_WindPitchContEmulIEC_t2); + assign_map.emplace("cim:WindPitchContEmulIEC.tpe", &assign_WindPitchContEmulIEC_tpe); } void WindPitchContEmulIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC.WindGenTurbineType2IEC"), &assign_WindPitchContEmulIEC_WindGenTurbineType2IEC)); + assign_map.emplace("cim:WindPitchContEmulIEC.WindGenTurbineType2IEC", &assign_WindPitchContEmulIEC_WindGenTurbineType2IEC); } void WindPitchContEmulIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/WindPitchContEmulIEC.hpp b/CGMES_2.4.15_16FEB2016/WindPitchContEmulIEC.hpp index ba0894a15..dcdefc9bb 100644 --- a/CGMES_2.4.15_16FEB2016/WindPitchContEmulIEC.hpp +++ b/CGMES_2.4.15_16FEB2016/WindPitchContEmulIEC.hpp @@ -20,9 +20,7 @@ namespace CIMPP { class WindGenTurbineType2IEC; - /* - Pitch control emulator model. Reference: IEC Standard 61400-27-1 Section 6.6.5.1. - */ + /** \brief Pitch control emulator model. Reference: IEC Standard 61400-27-1 Section 6.6.5.1. */ class WindPitchContEmulIEC : public IdentifiedObject { public: @@ -30,17 +28,38 @@ namespace CIMPP WindPitchContEmulIEC(); ~WindPitchContEmulIEC() override; - CIMPP::WindGenTurbineType2IEC* WindGenTurbineType2IEC; /* Wind turbine type 2 model with which this Pitch control emulator model is associated. Default: 0 */ - CIMPP::Simple_Float kdroop; /* Power error gain (). It is case dependent parameter. Default: nullptr */ - CIMPP::Simple_Float kipce; /* Pitch control emulator integral constant (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU komegaaero; /* Aerodynamic power change vs. omegachange (). It is case dependent parameter. Default: nullptr */ - CIMPP::Simple_Float kppce; /* Pitch control emulator proportional constant (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU omegaref; /* Rotor speed in initial steady state (omega). It is case dependent parameter. Default: nullptr */ - CIMPP::PU pimax; /* Maximum steady state power (). It is case dependent parameter. Default: nullptr */ - CIMPP::PU pimin; /* Minimum steady state power (). It is case dependent parameter. Default: nullptr */ - CIMPP::Seconds t1; /* First time constant in pitch control lag (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds t2; /* Second time constant in pitch control lag (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tpe; /* Time constant in generator air gap power lag (). It is type dependent parameter. Default: nullptr */ + /** \brief Wind turbine type 2 model with which this Pitch control emulator model is associated. Default: 0 */ + CIMPP::WindGenTurbineType2IEC* WindGenTurbineType2IEC; + + /** \brief Power error gain (). It is case dependent parameter. Default: nullptr */ + CIMPP::Simple_Float kdroop; + + /** \brief Pitch control emulator integral constant (). It is type dependent parameter. Default: nullptr */ + CIMPP::Simple_Float kipce; + + /** \brief Aerodynamic power change vs. omegachange (). It is case dependent parameter. Default: nullptr */ + CIMPP::PU komegaaero; + + /** \brief Pitch control emulator proportional constant (). It is type dependent parameter. Default: nullptr */ + CIMPP::Simple_Float kppce; + + /** \brief Rotor speed in initial steady state (omega). It is case dependent parameter. Default: nullptr */ + CIMPP::PU omegaref; + + /** \brief Maximum steady state power (). It is case dependent parameter. Default: nullptr */ + CIMPP::PU pimax; + + /** \brief Minimum steady state power (). It is case dependent parameter. Default: nullptr */ + CIMPP::PU pimin; + + /** \brief First time constant in pitch control lag (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Second time constant in pitch control lag (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Time constant in generator air gap power lag (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tpe; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/WindPlantDynamics.cpp b/CGMES_2.4.15_16FEB2016/WindPlantDynamics.cpp index 07c27bcf5..c89fc1bb8 100644 --- a/CGMES_2.4.15_16FEB2016/WindPlantDynamics.cpp +++ b/CGMES_2.4.15_16FEB2016/WindPlantDynamics.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindPlantDynamics::WindPlantDynamics() : RemoteInputSignal(nullptr) {}; -WindPlantDynamics::~WindPlantDynamics() {}; +WindPlantDynamics::WindPlantDynamics() : RemoteInputSignal(nullptr) {} +WindPlantDynamics::~WindPlantDynamics() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ WindPlantDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_RemoteInputSignal_WindPlantDynamics(BaseClass*, BaseClass*); bool assign_WindPlantDynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_WindPlantDynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseC } return false; } + bool assign_WindTurbineType3or4Dynamics_WindPlantDynamics(BaseClass*, BaseClass*); bool assign_WindPlantDynamics_WindTurbineType3or4Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_WindPlantDynamics_WindTurbineType3or4Dynamics(BaseClass* BaseClass_p return false; } - bool get_WindPlantDynamics_RemoteInputSignal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindPlantDynamics* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->RemoteInputSignal != 0) { @@ -100,7 +99,7 @@ const char* WindPlantDynamics::debugString() const void WindPlantDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindPlantDynamics"), &WindPlantDynamics_factory)); + factory_map.emplace("cim:WindPlantDynamics", &WindPlantDynamics_factory); } void WindPlantDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -109,8 +108,8 @@ void WindPlantDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPlantDynamics.RemoteInputSignal"), &assign_WindPlantDynamics_RemoteInputSignal)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantDynamics.WindTurbineType3or4Dynamics"), &assign_WindPlantDynamics_WindTurbineType3or4Dynamics)); + assign_map.emplace("cim:WindPlantDynamics.RemoteInputSignal", &assign_WindPlantDynamics_RemoteInputSignal); + assign_map.emplace("cim:WindPlantDynamics.WindTurbineType3or4Dynamics", &assign_WindPlantDynamics_WindTurbineType3or4Dynamics); } void WindPlantDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/WindPlantDynamics.hpp b/CGMES_2.4.15_16FEB2016/WindPlantDynamics.hpp index 2ac516cd6..0b8314fc3 100644 --- a/CGMES_2.4.15_16FEB2016/WindPlantDynamics.hpp +++ b/CGMES_2.4.15_16FEB2016/WindPlantDynamics.hpp @@ -18,9 +18,7 @@ namespace CIMPP class RemoteInputSignal; class WindTurbineType3or4Dynamics; - /* - Parent class supporting relationships to wind turbines Type 3 and 4 and wind plant IEC and user defined wind plants including their control models. - */ + /** \brief Parent class supporting relationships to wind turbines Type 3 and 4 and wind plant IEC and user defined wind plants including their control models. */ class WindPlantDynamics : public DynamicsFunctionBlock { public: @@ -28,8 +26,11 @@ namespace CIMPP WindPlantDynamics(); ~WindPlantDynamics() override; - CIMPP::RemoteInputSignal* RemoteInputSignal; /* The wind plant using the remote signal. Default: 0 */ - std::list WindTurbineType3or4Dynamics; /* The wind turbine type 3 or 4 associated with this wind plant. Default: 0 */ + /** \brief The wind plant using the remote signal. Default: 0 */ + CIMPP::RemoteInputSignal* RemoteInputSignal; + + /** \brief The wind turbine type 3 or 4 associated with this wind plant. Default: 0 */ + std::list WindTurbineType3or4Dynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/WindPlantFreqPcontrolIEC.cpp b/CGMES_2.4.15_16FEB2016/WindPlantFreqPcontrolIEC.cpp index e7c7ac1c6..f21322dd3 100644 --- a/CGMES_2.4.15_16FEB2016/WindPlantFreqPcontrolIEC.cpp +++ b/CGMES_2.4.15_16FEB2016/WindPlantFreqPcontrolIEC.cpp @@ -10,21 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindDynamicsLookupTable.hpp" #include "WindPlantIEC.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -WindPlantFreqPcontrolIEC::WindPlantFreqPcontrolIEC() : WindPlantIEC(nullptr) {}; -WindPlantFreqPcontrolIEC::~WindPlantFreqPcontrolIEC() {}; +WindPlantFreqPcontrolIEC::WindPlantFreqPcontrolIEC() : WindPlantIEC(nullptr) {} +WindPlantFreqPcontrolIEC::~WindPlantFreqPcontrolIEC() {} static const std::list PossibleProfilesForClass = { @@ -62,174 +52,186 @@ WindPlantFreqPcontrolIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindPlantFreqPcontrolIEC_dprefmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC(BaseClass*, BaseClass*); +bool assign_WindPlantFreqPcontrolIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->dprefmax; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) + { + element->WindDynamicsLookupTable.push_back(element2); + return assign_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindPlantFreqPcontrolIEC_dprefmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantIEC_WindPlantFreqPcontrolIEC(BaseClass*, BaseClass*); +bool assign_WindPlantFreqPcontrolIEC_WindPlantIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + WindPlantIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->dprefmin; - if (buffer.fail()) - return false; - else - return true; + if (element->WindPlantIEC != element2) + { + element->WindPlantIEC = element2; + return assign_WindPlantIEC_WindPlantFreqPcontrolIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindPlantFreqPcontrolIEC_kiwpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_dprefmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->kiwpp; - if (buffer.fail()) - return false; - else + buffer >> element->dprefmax; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantFreqPcontrolIEC_kpwpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_dprefmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->kpwpp; - if (buffer.fail()) - return false; - else + buffer >> element->dprefmin; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantFreqPcontrolIEC_prefmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_kiwpp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->prefmax; - if (buffer.fail()) - return false; - else + buffer >> element->kiwpp; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantFreqPcontrolIEC_prefmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_kpwpp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->prefmin; - if (buffer.fail()) - return false; - else + buffer >> element->kpwpp; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantFreqPcontrolIEC_tpft(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_prefmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tpft; - if (buffer.fail()) - return false; - else + buffer >> element->prefmax; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantFreqPcontrolIEC_tpfv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_prefmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tpfv; - if (buffer.fail()) - return false; - else + buffer >> element->prefmin; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantFreqPcontrolIEC_twpffilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_tpft(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->twpffilt; - if (buffer.fail()) - return false; - else + buffer >> element->tpft; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantFreqPcontrolIEC_twppfilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_tpfv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->twppfilt; - if (buffer.fail()) - return false; - else + buffer >> element->tpfv; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC(BaseClass*, BaseClass*); -bool assign_WindPlantFreqPcontrolIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindPlantFreqPcontrolIEC_twpffilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); - WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) + buffer >> element->twpffilt; + if (!buffer.fail()) { - element->WindDynamicsLookupTable.push_back(element2); - return assign_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_WindPlantIEC_WindPlantFreqPcontrolIEC(BaseClass*, BaseClass*); -bool assign_WindPlantFreqPcontrolIEC_WindPlantIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_WindPlantFreqPcontrolIEC_twppfilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); - WindPlantIEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindPlantIEC != element2) + buffer >> element->twppfilt; + if (!buffer.fail()) { - element->WindPlantIEC = element2; - return assign_WindPlantIEC_WindPlantFreqPcontrolIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + + bool get_WindPlantFreqPcontrolIEC_dprefmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dprefmax; if (!buffer.str().empty()) @@ -243,7 +245,8 @@ bool get_WindPlantFreqPcontrolIEC_dprefmax(const BaseClass* BaseClass_ptr1, std: bool get_WindPlantFreqPcontrolIEC_dprefmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dprefmin; if (!buffer.str().empty()) @@ -257,7 +260,8 @@ bool get_WindPlantFreqPcontrolIEC_dprefmin(const BaseClass* BaseClass_ptr1, std: bool get_WindPlantFreqPcontrolIEC_kiwpp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kiwpp; if (!buffer.str().empty()) @@ -271,7 +275,8 @@ bool get_WindPlantFreqPcontrolIEC_kiwpp(const BaseClass* BaseClass_ptr1, std::st bool get_WindPlantFreqPcontrolIEC_kpwpp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpwpp; if (!buffer.str().empty()) @@ -285,7 +290,8 @@ bool get_WindPlantFreqPcontrolIEC_kpwpp(const BaseClass* BaseClass_ptr1, std::st bool get_WindPlantFreqPcontrolIEC_prefmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->prefmax; if (!buffer.str().empty()) @@ -299,7 +305,8 @@ bool get_WindPlantFreqPcontrolIEC_prefmax(const BaseClass* BaseClass_ptr1, std:: bool get_WindPlantFreqPcontrolIEC_prefmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->prefmin; if (!buffer.str().empty()) @@ -313,7 +320,8 @@ bool get_WindPlantFreqPcontrolIEC_prefmin(const BaseClass* BaseClass_ptr1, std:: bool get_WindPlantFreqPcontrolIEC_tpft(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpft; if (!buffer.str().empty()) @@ -327,7 +335,8 @@ bool get_WindPlantFreqPcontrolIEC_tpft(const BaseClass* BaseClass_ptr1, std::str bool get_WindPlantFreqPcontrolIEC_tpfv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpfv; if (!buffer.str().empty()) @@ -341,7 +350,8 @@ bool get_WindPlantFreqPcontrolIEC_tpfv(const BaseClass* BaseClass_ptr1, std::str bool get_WindPlantFreqPcontrolIEC_twpffilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twpffilt; if (!buffer.str().empty()) @@ -355,7 +365,8 @@ bool get_WindPlantFreqPcontrolIEC_twpffilt(const BaseClass* BaseClass_ptr1, std: bool get_WindPlantFreqPcontrolIEC_twppfilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twppfilt; if (!buffer.str().empty()) @@ -367,8 +378,6 @@ bool get_WindPlantFreqPcontrolIEC_twppfilt(const BaseClass* BaseClass_ptr1, std: return false; } - - const char WindPlantFreqPcontrolIEC::debugName[] = "WindPlantFreqPcontrolIEC"; const char* WindPlantFreqPcontrolIEC::debugString() const { @@ -377,27 +386,27 @@ const char* WindPlantFreqPcontrolIEC::debugString() const void WindPlantFreqPcontrolIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC"), &WindPlantFreqPcontrolIEC_factory)); + factory_map.emplace("cim:WindPlantFreqPcontrolIEC", &WindPlantFreqPcontrolIEC_factory); } void WindPlantFreqPcontrolIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.dprefmax"), &assign_WindPlantFreqPcontrolIEC_dprefmax)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.dprefmin"), &assign_WindPlantFreqPcontrolIEC_dprefmin)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.kiwpp"), &assign_WindPlantFreqPcontrolIEC_kiwpp)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.kpwpp"), &assign_WindPlantFreqPcontrolIEC_kpwpp)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.prefmax"), &assign_WindPlantFreqPcontrolIEC_prefmax)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.prefmin"), &assign_WindPlantFreqPcontrolIEC_prefmin)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.tpft"), &assign_WindPlantFreqPcontrolIEC_tpft)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.tpfv"), &assign_WindPlantFreqPcontrolIEC_tpfv)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.twpffilt"), &assign_WindPlantFreqPcontrolIEC_twpffilt)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.twppfilt"), &assign_WindPlantFreqPcontrolIEC_twppfilt)); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.dprefmax", &assign_WindPlantFreqPcontrolIEC_dprefmax); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.dprefmin", &assign_WindPlantFreqPcontrolIEC_dprefmin); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.kiwpp", &assign_WindPlantFreqPcontrolIEC_kiwpp); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.kpwpp", &assign_WindPlantFreqPcontrolIEC_kpwpp); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.prefmax", &assign_WindPlantFreqPcontrolIEC_prefmax); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.prefmin", &assign_WindPlantFreqPcontrolIEC_prefmin); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.tpft", &assign_WindPlantFreqPcontrolIEC_tpft); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.tpfv", &assign_WindPlantFreqPcontrolIEC_tpfv); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.twpffilt", &assign_WindPlantFreqPcontrolIEC_twpffilt); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.twppfilt", &assign_WindPlantFreqPcontrolIEC_twppfilt); } void WindPlantFreqPcontrolIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.WindDynamicsLookupTable"), &assign_WindPlantFreqPcontrolIEC_WindDynamicsLookupTable)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.WindPlantIEC"), &assign_WindPlantFreqPcontrolIEC_WindPlantIEC)); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.WindDynamicsLookupTable", &assign_WindPlantFreqPcontrolIEC_WindDynamicsLookupTable); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.WindPlantIEC", &assign_WindPlantFreqPcontrolIEC_WindPlantIEC); } void WindPlantFreqPcontrolIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/WindPlantFreqPcontrolIEC.hpp b/CGMES_2.4.15_16FEB2016/WindPlantFreqPcontrolIEC.hpp index 4ce4f541a..069d958c9 100644 --- a/CGMES_2.4.15_16FEB2016/WindPlantFreqPcontrolIEC.hpp +++ b/CGMES_2.4.15_16FEB2016/WindPlantFreqPcontrolIEC.hpp @@ -21,9 +21,7 @@ namespace CIMPP class WindDynamicsLookupTable; class WindPlantIEC; - /* - Frequency and active power controller model. Reference: IEC Standard 61400-27-1 Annex E. - */ + /** \brief Frequency and active power controller model. Reference: IEC Standard 61400-27-1 Annex E. */ class WindPlantFreqPcontrolIEC : public IdentifiedObject { public: @@ -31,18 +29,41 @@ namespace CIMPP WindPlantFreqPcontrolIEC(); ~WindPlantFreqPcontrolIEC() override; - std::list WindDynamicsLookupTable; /* The frequency and active power wind plant control model with which this wind dynamics lookup table is associated. Default: 0 */ - CIMPP::WindPlantIEC* WindPlantIEC; /* Wind plant model with which this wind plant frequency and active power control is associated. Default: 0 */ - CIMPP::PU dprefmax; /* Maximum ramp rate of request from the plant controller to the wind turbines (). It is project dependent parameter. Default: nullptr */ - CIMPP::PU dprefmin; /* Minimum (negative) ramp rate of request from the plant controller to the wind turbines (). It is project dependent parameter. Default: nullptr */ - CIMPP::Simple_Float kiwpp; /* Plant P controller integral gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::Simple_Float kpwpp; /* Plant P controller proportional gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU prefmax; /* Maximum request from the plant controller to the wind turbines (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU prefmin; /* Minimum request from the plant controller to the wind turbines (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tpft; /* Lead time constant in reference value transfer function (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tpfv; /* Lag time constant in reference value transfer function (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds twpffilt; /* Filter time constant for frequency measurement (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds twppfilt; /* Filter time constant for active power measurement (). It is type dependent parameter. Default: nullptr */ + /** \brief The frequency and active power wind plant control model with which this wind dynamics lookup table is associated. Default: 0 */ + std::list WindDynamicsLookupTable; + + /** \brief Wind plant model with which this wind plant frequency and active power control is associated. Default: 0 */ + CIMPP::WindPlantIEC* WindPlantIEC; + + /** \brief Maximum ramp rate of request from the plant controller to the wind turbines (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU dprefmax; + + /** \brief Minimum (negative) ramp rate of request from the plant controller to the wind turbines (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU dprefmin; + + /** \brief Plant P controller integral gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::Simple_Float kiwpp; + + /** \brief Plant P controller proportional gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::Simple_Float kpwpp; + + /** \brief Maximum request from the plant controller to the wind turbines (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU prefmax; + + /** \brief Minimum request from the plant controller to the wind turbines (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU prefmin; + + /** \brief Lead time constant in reference value transfer function (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tpft; + + /** \brief Lag time constant in reference value transfer function (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tpfv; + + /** \brief Filter time constant for frequency measurement (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds twpffilt; + + /** \brief Filter time constant for active power measurement (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds twppfilt; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/WindPlantIEC.cpp b/CGMES_2.4.15_16FEB2016/WindPlantIEC.cpp index 5e9a20c83..b455a5284 100644 --- a/CGMES_2.4.15_16FEB2016/WindPlantIEC.cpp +++ b/CGMES_2.4.15_16FEB2016/WindPlantIEC.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindPlantIEC::WindPlantIEC() : WindPlantFreqPcontrolIEC(nullptr), WindPlantReactiveControlIEC(nullptr) {}; -WindPlantIEC::~WindPlantIEC() {}; +WindPlantIEC::WindPlantIEC() : WindPlantFreqPcontrolIEC(nullptr), WindPlantReactiveControlIEC(nullptr) {} +WindPlantIEC::~WindPlantIEC() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ WindPlantIEC::getPossibleProfilesForAttributes() const return map; } - - bool assign_WindPlantFreqPcontrolIEC_WindPlantIEC(BaseClass*, BaseClass*); bool assign_WindPlantIEC_WindPlantFreqPcontrolIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_WindPlantIEC_WindPlantFreqPcontrolIEC(BaseClass* BaseClass_ptr1, Bas } return false; } + bool assign_WindPlantReactiveControlIEC_WindPlantIEC(BaseClass*, BaseClass*); bool assign_WindPlantIEC_WindPlantReactiveControlIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_WindPlantIEC_WindPlantReactiveControlIEC(BaseClass* BaseClass_ptr1, return false; } - bool get_WindPlantIEC_WindPlantFreqPcontrolIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindPlantIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindPlantFreqPcontrolIEC != 0) { @@ -93,7 +92,8 @@ bool get_WindPlantIEC_WindPlantFreqPcontrolIEC(const BaseClass* BaseClass_ptr1, bool get_WindPlantIEC_WindPlantReactiveControlIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindPlantIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindPlantReactiveControlIEC != 0) { @@ -104,7 +104,6 @@ bool get_WindPlantIEC_WindPlantReactiveControlIEC(const BaseClass* BaseClass_ptr return false; } - const char WindPlantIEC::debugName[] = "WindPlantIEC"; const char* WindPlantIEC::debugString() const { @@ -113,7 +112,7 @@ const char* WindPlantIEC::debugString() const void WindPlantIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindPlantIEC"), &WindPlantIEC_factory)); + factory_map.emplace("cim:WindPlantIEC", &WindPlantIEC_factory); } void WindPlantIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void WindPlantIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPlantIEC.WindPlantFreqPcontrolIEC"), &assign_WindPlantIEC_WindPlantFreqPcontrolIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantIEC.WindPlantReactiveControlIEC"), &assign_WindPlantIEC_WindPlantReactiveControlIEC)); + assign_map.emplace("cim:WindPlantIEC.WindPlantFreqPcontrolIEC", &assign_WindPlantIEC_WindPlantFreqPcontrolIEC); + assign_map.emplace("cim:WindPlantIEC.WindPlantReactiveControlIEC", &assign_WindPlantIEC_WindPlantReactiveControlIEC); } void WindPlantIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/WindPlantIEC.hpp b/CGMES_2.4.15_16FEB2016/WindPlantIEC.hpp index 4b2d8e239..8f277cafa 100644 --- a/CGMES_2.4.15_16FEB2016/WindPlantIEC.hpp +++ b/CGMES_2.4.15_16FEB2016/WindPlantIEC.hpp @@ -18,9 +18,7 @@ namespace CIMPP class WindPlantFreqPcontrolIEC; class WindPlantReactiveControlIEC; - /* - Simplified IEC type plant level model. Reference: IEC 61400-27-1, AnnexE. - */ + /** \brief Simplified IEC type plant level model. Reference: IEC 61400-27-1, AnnexE. */ class WindPlantIEC : public WindPlantDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP WindPlantIEC(); ~WindPlantIEC() override; - CIMPP::WindPlantFreqPcontrolIEC* WindPlantFreqPcontrolIEC; /* Wind plant frequency and active power control model associated with this wind plant. Default: 0 */ - CIMPP::WindPlantReactiveControlIEC* WindPlantReactiveControlIEC; /* Wind plant reactive control model associated with this wind plant. Default: 0 */ + /** \brief Wind plant frequency and active power control model associated with this wind plant. Default: 0 */ + CIMPP::WindPlantFreqPcontrolIEC* WindPlantFreqPcontrolIEC; + + /** \brief Wind plant reactive control model associated with this wind plant. Default: 0 */ + CIMPP::WindPlantReactiveControlIEC* WindPlantReactiveControlIEC; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/WindPlantReactiveControlIEC.cpp b/CGMES_2.4.15_16FEB2016/WindPlantReactiveControlIEC.cpp index b37d33409..8135d692c 100644 --- a/CGMES_2.4.15_16FEB2016/WindPlantReactiveControlIEC.cpp +++ b/CGMES_2.4.15_16FEB2016/WindPlantReactiveControlIEC.cpp @@ -9,24 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "WindPlantIEC.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -WindPlantReactiveControlIEC::WindPlantReactiveControlIEC() : WindPlantIEC(nullptr) {}; -WindPlantReactiveControlIEC::~WindPlantReactiveControlIEC() {}; +WindPlantReactiveControlIEC::WindPlantReactiveControlIEC() : WindPlantIEC(nullptr) {} +WindPlantReactiveControlIEC::~WindPlantReactiveControlIEC() {} static const std::list PossibleProfilesForClass = { @@ -66,197 +53,210 @@ WindPlantReactiveControlIEC::getPossibleProfilesForAttributes() const return map; } +bool assign_WindPlantIEC_WindPlantReactiveControlIEC(BaseClass*, BaseClass*); +bool assign_WindPlantReactiveControlIEC_WindPlantIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + WindPlantIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindPlantIEC != element2) + { + element->WindPlantIEC = element2; + return assign_WindPlantIEC_WindPlantReactiveControlIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_WindPlantReactiveControlIEC_kiwpx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_kiwpx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kiwpx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_kpwpx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_kpwpx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpwpx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_kwpqu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_kwpqu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kwpqu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_mwppf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_mwppf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwppf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_mwpu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_mwpu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwpu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_twppfilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_twppfilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->twppfilt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_twpqfilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_twpqfilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->twpqfilt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_twpufilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_twpufilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->twpufilt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_txft(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_txft(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->txft; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_txfv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_txfv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->txfv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_uwpqdip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_uwpqdip(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uwpqdip; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_xrefmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_xrefmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xrefmax; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_WindPlantReactiveControlIEC_xrefmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->xrefmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindPlantIEC_WindPlantReactiveControlIEC(BaseClass*, BaseClass*); -bool assign_WindPlantReactiveControlIEC_WindPlantIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindPlantReactiveControlIEC_xrefmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); - WindPlantIEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindPlantIEC != element2) + buffer >> element->xrefmin; + if (!buffer.fail()) { - element->WindPlantIEC = element2; - return assign_WindPlantIEC_WindPlantReactiveControlIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_WindPlantReactiveControlIEC_kiwpx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kiwpx; if (!buffer.str().empty()) @@ -270,7 +270,8 @@ bool get_WindPlantReactiveControlIEC_kiwpx(const BaseClass* BaseClass_ptr1, std: bool get_WindPlantReactiveControlIEC_kpwpx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpwpx; if (!buffer.str().empty()) @@ -284,7 +285,8 @@ bool get_WindPlantReactiveControlIEC_kpwpx(const BaseClass* BaseClass_ptr1, std: bool get_WindPlantReactiveControlIEC_kwpqu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kwpqu; if (!buffer.str().empty()) @@ -298,7 +300,8 @@ bool get_WindPlantReactiveControlIEC_kwpqu(const BaseClass* BaseClass_ptr1, std: bool get_WindPlantReactiveControlIEC_mwppf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwppf; if (!buffer.str().empty()) @@ -312,7 +315,8 @@ bool get_WindPlantReactiveControlIEC_mwppf(const BaseClass* BaseClass_ptr1, std: bool get_WindPlantReactiveControlIEC_mwpu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwpu; if (!buffer.str().empty()) @@ -326,7 +330,8 @@ bool get_WindPlantReactiveControlIEC_mwpu(const BaseClass* BaseClass_ptr1, std:: bool get_WindPlantReactiveControlIEC_twppfilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twppfilt; if (!buffer.str().empty()) @@ -340,7 +345,8 @@ bool get_WindPlantReactiveControlIEC_twppfilt(const BaseClass* BaseClass_ptr1, s bool get_WindPlantReactiveControlIEC_twpqfilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twpqfilt; if (!buffer.str().empty()) @@ -354,7 +360,8 @@ bool get_WindPlantReactiveControlIEC_twpqfilt(const BaseClass* BaseClass_ptr1, s bool get_WindPlantReactiveControlIEC_twpufilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twpufilt; if (!buffer.str().empty()) @@ -368,7 +375,8 @@ bool get_WindPlantReactiveControlIEC_twpufilt(const BaseClass* BaseClass_ptr1, s bool get_WindPlantReactiveControlIEC_txft(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->txft; if (!buffer.str().empty()) @@ -382,7 +390,8 @@ bool get_WindPlantReactiveControlIEC_txft(const BaseClass* BaseClass_ptr1, std:: bool get_WindPlantReactiveControlIEC_txfv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->txfv; if (!buffer.str().empty()) @@ -396,7 +405,8 @@ bool get_WindPlantReactiveControlIEC_txfv(const BaseClass* BaseClass_ptr1, std:: bool get_WindPlantReactiveControlIEC_uwpqdip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uwpqdip; if (!buffer.str().empty()) @@ -410,7 +420,8 @@ bool get_WindPlantReactiveControlIEC_uwpqdip(const BaseClass* BaseClass_ptr1, st bool get_WindPlantReactiveControlIEC_xrefmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xrefmax; if (!buffer.str().empty()) @@ -424,7 +435,8 @@ bool get_WindPlantReactiveControlIEC_xrefmax(const BaseClass* BaseClass_ptr1, st bool get_WindPlantReactiveControlIEC_xrefmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xrefmin; if (!buffer.str().empty()) @@ -436,8 +448,6 @@ bool get_WindPlantReactiveControlIEC_xrefmin(const BaseClass* BaseClass_ptr1, st return false; } - - const char WindPlantReactiveControlIEC::debugName[] = "WindPlantReactiveControlIEC"; const char* WindPlantReactiveControlIEC::debugString() const { @@ -446,29 +456,29 @@ const char* WindPlantReactiveControlIEC::debugString() const void WindPlantReactiveControlIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC"), &WindPlantReactiveControlIEC_factory)); + factory_map.emplace("cim:WindPlantReactiveControlIEC", &WindPlantReactiveControlIEC_factory); } void WindPlantReactiveControlIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.kiwpx"), &assign_WindPlantReactiveControlIEC_kiwpx)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.kpwpx"), &assign_WindPlantReactiveControlIEC_kpwpx)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.kwpqu"), &assign_WindPlantReactiveControlIEC_kwpqu)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.mwppf"), &assign_WindPlantReactiveControlIEC_mwppf)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.mwpu"), &assign_WindPlantReactiveControlIEC_mwpu)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.twppfilt"), &assign_WindPlantReactiveControlIEC_twppfilt)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.twpqfilt"), &assign_WindPlantReactiveControlIEC_twpqfilt)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.twpufilt"), &assign_WindPlantReactiveControlIEC_twpufilt)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.txft"), &assign_WindPlantReactiveControlIEC_txft)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.txfv"), &assign_WindPlantReactiveControlIEC_txfv)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.uwpqdip"), &assign_WindPlantReactiveControlIEC_uwpqdip)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.xrefmax"), &assign_WindPlantReactiveControlIEC_xrefmax)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.xrefmin"), &assign_WindPlantReactiveControlIEC_xrefmin)); + assign_map.emplace("cim:WindPlantReactiveControlIEC.kiwpx", &assign_WindPlantReactiveControlIEC_kiwpx); + assign_map.emplace("cim:WindPlantReactiveControlIEC.kpwpx", &assign_WindPlantReactiveControlIEC_kpwpx); + assign_map.emplace("cim:WindPlantReactiveControlIEC.kwpqu", &assign_WindPlantReactiveControlIEC_kwpqu); + assign_map.emplace("cim:WindPlantReactiveControlIEC.mwppf", &assign_WindPlantReactiveControlIEC_mwppf); + assign_map.emplace("cim:WindPlantReactiveControlIEC.mwpu", &assign_WindPlantReactiveControlIEC_mwpu); + assign_map.emplace("cim:WindPlantReactiveControlIEC.twppfilt", &assign_WindPlantReactiveControlIEC_twppfilt); + assign_map.emplace("cim:WindPlantReactiveControlIEC.twpqfilt", &assign_WindPlantReactiveControlIEC_twpqfilt); + assign_map.emplace("cim:WindPlantReactiveControlIEC.twpufilt", &assign_WindPlantReactiveControlIEC_twpufilt); + assign_map.emplace("cim:WindPlantReactiveControlIEC.txft", &assign_WindPlantReactiveControlIEC_txft); + assign_map.emplace("cim:WindPlantReactiveControlIEC.txfv", &assign_WindPlantReactiveControlIEC_txfv); + assign_map.emplace("cim:WindPlantReactiveControlIEC.uwpqdip", &assign_WindPlantReactiveControlIEC_uwpqdip); + assign_map.emplace("cim:WindPlantReactiveControlIEC.xrefmax", &assign_WindPlantReactiveControlIEC_xrefmax); + assign_map.emplace("cim:WindPlantReactiveControlIEC.xrefmin", &assign_WindPlantReactiveControlIEC_xrefmin); } void WindPlantReactiveControlIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.WindPlantIEC"), &assign_WindPlantReactiveControlIEC_WindPlantIEC)); + assign_map.emplace("cim:WindPlantReactiveControlIEC.WindPlantIEC", &assign_WindPlantReactiveControlIEC_WindPlantIEC); } void WindPlantReactiveControlIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/WindPlantReactiveControlIEC.hpp b/CGMES_2.4.15_16FEB2016/WindPlantReactiveControlIEC.hpp index 963b7f804..fdcfe8416 100644 --- a/CGMES_2.4.15_16FEB2016/WindPlantReactiveControlIEC.hpp +++ b/CGMES_2.4.15_16FEB2016/WindPlantReactiveControlIEC.hpp @@ -21,9 +21,7 @@ namespace CIMPP { class WindPlantIEC; - /* - Simplified plant voltage and reactive power control model for use with type 3 and type 4 wind turbine models. Reference: IEC Standard 61400-27-1 Annex E. - */ + /** \brief Simplified plant voltage and reactive power control model for use with type 3 and type 4 wind turbine models. Reference: IEC Standard 61400-27-1 Annex E. */ class WindPlantReactiveControlIEC : public IdentifiedObject { public: @@ -31,20 +29,47 @@ namespace CIMPP WindPlantReactiveControlIEC(); ~WindPlantReactiveControlIEC() override; - CIMPP::WindPlantIEC* WindPlantIEC; /* Wind plant model with which this wind reactive control is associated. Default: 0 */ - CIMPP::Simple_Float kiwpx; /* Plant Q controller integral gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::Simple_Float kpwpx; /* Plant Q controller proportional gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kwpqu; /* Plant voltage control droop (). It is project dependent parameter. Default: nullptr */ - CIMPP::Boolean mwppf; /* Power factor control modes selector (). Used only if mwpu is set to false. true = 1: power factor control false = 0: reactive power control. It is project dependent parameter. Default: false */ - CIMPP::Boolean mwpu; /* Reactive power control modes selector (). true = 1: voltage control false = 0: reactive power control. It is project dependent parameter. Default: false */ - CIMPP::Seconds twppfilt; /* Filter time constant for active power measurement (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds twpqfilt; /* Filter time constant for reactive power measurement (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds twpufilt; /* Filter time constant for voltage measurement (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds txft; /* Lead time constant in reference value transfer function (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds txfv; /* Lag time constant in reference value transfer function (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU uwpqdip; /* Voltage threshold for LVRT detection in q control (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU xrefmax; /* Maximum ( or delta ) request from the plant controller (). It is project dependent parameter. Default: nullptr */ - CIMPP::PU xrefmin; /* Minimum ( or delta) request from the plant controller (). It is project dependent parameter. Default: nullptr */ + /** \brief Wind plant model with which this wind reactive control is associated. Default: 0 */ + CIMPP::WindPlantIEC* WindPlantIEC; + + /** \brief Plant Q controller integral gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::Simple_Float kiwpx; + + /** \brief Plant Q controller proportional gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::Simple_Float kpwpx; + + /** \brief Plant voltage control droop (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU kwpqu; + + /** \brief Power factor control modes selector (). Used only if mwpu is set to false. true = 1: power factor control false = 0: reactive power control. It is project dependent parameter. Default: false */ + CIMPP::Boolean mwppf; + + /** \brief Reactive power control modes selector (). true = 1: voltage control false = 0: reactive power control. It is project dependent parameter. Default: false */ + CIMPP::Boolean mwpu; + + /** \brief Filter time constant for active power measurement (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds twppfilt; + + /** \brief Filter time constant for reactive power measurement (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds twpqfilt; + + /** \brief Filter time constant for voltage measurement (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds twpufilt; + + /** \brief Lead time constant in reference value transfer function (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds txft; + + /** \brief Lag time constant in reference value transfer function (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds txfv; + + /** \brief Voltage threshold for LVRT detection in q control (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU uwpqdip; + + /** \brief Maximum ( or delta ) request from the plant controller (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU xrefmax; + + /** \brief Minimum ( or delta) request from the plant controller (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU xrefmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/WindPlantUserDefined.cpp b/CGMES_2.4.15_16FEB2016/WindPlantUserDefined.cpp index 8c93c7a24..549a06449 100644 --- a/CGMES_2.4.15_16FEB2016/WindPlantUserDefined.cpp +++ b/CGMES_2.4.15_16FEB2016/WindPlantUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -WindPlantUserDefined::WindPlantUserDefined() {}; -WindPlantUserDefined::~WindPlantUserDefined() {}; +WindPlantUserDefined::WindPlantUserDefined() {} +WindPlantUserDefined::~WindPlantUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ WindPlantUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindPlantUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindPlantUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_WindPlantUserDefined(BaseClass*, BaseClass*); bool assign_WindPlantUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_WindPlantUserDefined_ProprietaryParameterDynamics(BaseClass* BaseCla return false; } +bool assign_WindPlantUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + WindPlantUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_WindPlantUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_WindPlantUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std:: return false; } - - const char WindPlantUserDefined::debugName[] = "WindPlantUserDefined"; const char* WindPlantUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* WindPlantUserDefined::debugString() const void WindPlantUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindPlantUserDefined"), &WindPlantUserDefined_factory)); + factory_map.emplace("cim:WindPlantUserDefined", &WindPlantUserDefined_factory); } void WindPlantUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPlantUserDefined.proprietary"), &assign_WindPlantUserDefined_proprietary)); + assign_map.emplace("cim:WindPlantUserDefined.proprietary", &assign_WindPlantUserDefined_proprietary); } void WindPlantUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPlantUserDefined.ProprietaryParameterDynamics"), &assign_WindPlantUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:WindPlantUserDefined.ProprietaryParameterDynamics", &assign_WindPlantUserDefined_ProprietaryParameterDynamics); } void WindPlantUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/WindPlantUserDefined.hpp b/CGMES_2.4.15_16FEB2016/WindPlantUserDefined.hpp index 127fde57f..d64898dfb 100644 --- a/CGMES_2.4.15_16FEB2016/WindPlantUserDefined.hpp +++ b/CGMES_2.4.15_16FEB2016/WindPlantUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Wind plant function block whose dynamic behaviour is described by - */ + /** \brief Wind plant function block whose dynamic behaviour is described by */ class WindPlantUserDefined : public WindPlantDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP WindPlantUserDefined(); ~WindPlantUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/WindProtectionIEC.cpp b/CGMES_2.4.15_16FEB2016/WindProtectionIEC.cpp index 5f0532fb0..b9bcdc44e 100644 --- a/CGMES_2.4.15_16FEB2016/WindProtectionIEC.cpp +++ b/CGMES_2.4.15_16FEB2016/WindProtectionIEC.cpp @@ -10,19 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindTurbineType1or2IEC.hpp" #include "WindTurbineType3or4IEC.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -WindProtectionIEC::WindProtectionIEC() : WindTurbineType1or2IEC(nullptr), WindTurbineType3or4IEC(nullptr) {}; -WindProtectionIEC::~WindProtectionIEC() {}; +WindProtectionIEC::WindProtectionIEC() : WindTurbineType1or2IEC(nullptr), WindTurbineType3or4IEC(nullptr) {} +WindProtectionIEC::~WindProtectionIEC() {} static const std::list PossibleProfilesForClass = { @@ -58,148 +50,158 @@ WindProtectionIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindProtectionIEC_fover(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType1or2IEC_WindProtectionIEC(BaseClass*, BaseClass*); +bool assign_WindProtectionIEC_WindTurbineType1or2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType1or2IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->fover; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType1or2IEC != element2) + { + element->WindTurbineType1or2IEC = element2; + return assign_WindTurbineType1or2IEC_WindProtectionIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindProtectionIEC_funder(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType3or4IEC_WindProtectionIEC(BaseClass*, BaseClass*); +bool assign_WindProtectionIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType3or4IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->funder; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType3or4IEC != element2) + { + element->WindTurbineType3or4IEC = element2; + return assign_WindTurbineType3or4IEC_WindProtectionIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindProtectionIEC_tfover(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindProtectionIEC_fover(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tfover; - if (buffer.fail()) - return false; - else + buffer >> element->fover; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindProtectionIEC_tfunder(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindProtectionIEC_funder(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tfunder; - if (buffer.fail()) - return false; - else + buffer >> element->funder; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindProtectionIEC_tuover(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindProtectionIEC_tfover(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tuover; - if (buffer.fail()) - return false; - else + buffer >> element->tfover; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindProtectionIEC_tuunder(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindProtectionIEC_tfunder(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tuunder; - if (buffer.fail()) - return false; - else + buffer >> element->tfunder; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindProtectionIEC_uover(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindProtectionIEC_tuover(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->uover; - if (buffer.fail()) - return false; - else + buffer >> element->tuover; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindProtectionIEC_uunder(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindProtectionIEC_tuunder(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->uunder; - if (buffer.fail()) - return false; - else + buffer >> element->tuunder; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindTurbineType1or2IEC_WindProtectionIEC(BaseClass*, BaseClass*); -bool assign_WindProtectionIEC_WindTurbineType1or2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindProtectionIEC_uover(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType1or2IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType1or2IEC != element2) + buffer >> element->uover; + if (!buffer.fail()) { - element->WindTurbineType1or2IEC = element2; - return assign_WindTurbineType1or2IEC_WindProtectionIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_WindTurbineType3or4IEC_WindProtectionIEC(BaseClass*, BaseClass*); -bool assign_WindProtectionIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_WindProtectionIEC_uunder(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType3or4IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType3or4IEC != element2) + buffer >> element->uunder; + if (!buffer.fail()) { - element->WindTurbineType3or4IEC = element2; - return assign_WindTurbineType3or4IEC_WindProtectionIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + + bool get_WindProtectionIEC_fover(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fover; if (!buffer.str().empty()) @@ -213,7 +215,8 @@ bool get_WindProtectionIEC_fover(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindProtectionIEC_funder(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->funder; if (!buffer.str().empty()) @@ -227,7 +230,8 @@ bool get_WindProtectionIEC_funder(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindProtectionIEC_tfover(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tfover; if (!buffer.str().empty()) @@ -241,7 +245,8 @@ bool get_WindProtectionIEC_tfover(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindProtectionIEC_tfunder(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tfunder; if (!buffer.str().empty()) @@ -255,7 +260,8 @@ bool get_WindProtectionIEC_tfunder(const BaseClass* BaseClass_ptr1, std::strings bool get_WindProtectionIEC_tuover(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tuover; if (!buffer.str().empty()) @@ -269,7 +275,8 @@ bool get_WindProtectionIEC_tuover(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindProtectionIEC_tuunder(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tuunder; if (!buffer.str().empty()) @@ -283,7 +290,8 @@ bool get_WindProtectionIEC_tuunder(const BaseClass* BaseClass_ptr1, std::strings bool get_WindProtectionIEC_uover(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uover; if (!buffer.str().empty()) @@ -297,7 +305,8 @@ bool get_WindProtectionIEC_uover(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindProtectionIEC_uunder(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uunder; if (!buffer.str().empty()) @@ -309,8 +318,6 @@ bool get_WindProtectionIEC_uunder(const BaseClass* BaseClass_ptr1, std::stringst return false; } - - const char WindProtectionIEC::debugName[] = "WindProtectionIEC"; const char* WindProtectionIEC::debugString() const { @@ -319,25 +326,25 @@ const char* WindProtectionIEC::debugString() const void WindProtectionIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindProtectionIEC"), &WindProtectionIEC_factory)); + factory_map.emplace("cim:WindProtectionIEC", &WindProtectionIEC_factory); } void WindProtectionIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.fover"), &assign_WindProtectionIEC_fover)); - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.funder"), &assign_WindProtectionIEC_funder)); - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.tfover"), &assign_WindProtectionIEC_tfover)); - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.tfunder"), &assign_WindProtectionIEC_tfunder)); - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.tuover"), &assign_WindProtectionIEC_tuover)); - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.tuunder"), &assign_WindProtectionIEC_tuunder)); - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.uover"), &assign_WindProtectionIEC_uover)); - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.uunder"), &assign_WindProtectionIEC_uunder)); + assign_map.emplace("cim:WindProtectionIEC.fover", &assign_WindProtectionIEC_fover); + assign_map.emplace("cim:WindProtectionIEC.funder", &assign_WindProtectionIEC_funder); + assign_map.emplace("cim:WindProtectionIEC.tfover", &assign_WindProtectionIEC_tfover); + assign_map.emplace("cim:WindProtectionIEC.tfunder", &assign_WindProtectionIEC_tfunder); + assign_map.emplace("cim:WindProtectionIEC.tuover", &assign_WindProtectionIEC_tuover); + assign_map.emplace("cim:WindProtectionIEC.tuunder", &assign_WindProtectionIEC_tuunder); + assign_map.emplace("cim:WindProtectionIEC.uover", &assign_WindProtectionIEC_uover); + assign_map.emplace("cim:WindProtectionIEC.uunder", &assign_WindProtectionIEC_uunder); } void WindProtectionIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.WindTurbineType1or2IEC"), &assign_WindProtectionIEC_WindTurbineType1or2IEC)); - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.WindTurbineType3or4IEC"), &assign_WindProtectionIEC_WindTurbineType3or4IEC)); + assign_map.emplace("cim:WindProtectionIEC.WindTurbineType1or2IEC", &assign_WindProtectionIEC_WindTurbineType1or2IEC); + assign_map.emplace("cim:WindProtectionIEC.WindTurbineType3or4IEC", &assign_WindProtectionIEC_WindTurbineType3or4IEC); } void WindProtectionIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/WindProtectionIEC.hpp b/CGMES_2.4.15_16FEB2016/WindProtectionIEC.hpp index bcc203c4d..38c2e8b1a 100644 --- a/CGMES_2.4.15_16FEB2016/WindProtectionIEC.hpp +++ b/CGMES_2.4.15_16FEB2016/WindProtectionIEC.hpp @@ -20,9 +20,7 @@ namespace CIMPP class WindTurbineType1or2IEC; class WindTurbineType3or4IEC; - /* - The grid protection model includes protection against over and under voltage, and against over and under frequency. Reference: IEC Standard 614000-27-1 Section 6.6.6. - */ + /** \brief The grid protection model includes protection against over and under voltage, and against over and under frequency. Reference: IEC Standard 614000-27-1 Section 6.6.6. */ class WindProtectionIEC : public IdentifiedObject { public: @@ -30,16 +28,35 @@ namespace CIMPP WindProtectionIEC(); ~WindProtectionIEC() override; - CIMPP::WindTurbineType1or2IEC* WindTurbineType1or2IEC; /* Wind generator type 1 or 2 model with which this wind turbine protection model is associated. Default: 0 */ - CIMPP::WindTurbineType3or4IEC* WindTurbineType3or4IEC; /* Wind generator type 3 or 4 model with which this wind turbine protection model is associated. Default: 0 */ - CIMPP::PU fover; /* Set of wind turbine over frequency protection levels (). It is project dependent parameter. Default: nullptr */ - CIMPP::PU funder; /* Set of wind turbine under frequency protection levels (). It is project dependent parameter. Default: nullptr */ - CIMPP::Seconds tfover; /* Set of corresponding wind turbine over frequency protection disconnection times (). It is project dependent parameter. Default: nullptr */ - CIMPP::Seconds tfunder; /* Set of corresponding wind turbine under frequency protection disconnection times (). It is project dependent parameter. Default: nullptr */ - CIMPP::Seconds tuover; /* Set of corresponding wind turbine over voltage protection disconnection times (). It is project dependent parameter. Default: nullptr */ - CIMPP::Seconds tuunder; /* Set of corresponding wind turbine under voltage protection disconnection times (). It is project dependent parameter. Default: nullptr */ - CIMPP::PU uover; /* Set of wind turbine over voltage protection levels (). It is project dependent parameter. Default: nullptr */ - CIMPP::PU uunder; /* Set of wind turbine under voltage protection levels (). It is project dependent parameter. Default: nullptr */ + /** \brief Wind generator type 1 or 2 model with which this wind turbine protection model is associated. Default: 0 */ + CIMPP::WindTurbineType1or2IEC* WindTurbineType1or2IEC; + + /** \brief Wind generator type 3 or 4 model with which this wind turbine protection model is associated. Default: 0 */ + CIMPP::WindTurbineType3or4IEC* WindTurbineType3or4IEC; + + /** \brief Set of wind turbine over frequency protection levels (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU fover; + + /** \brief Set of wind turbine under frequency protection levels (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU funder; + + /** \brief Set of corresponding wind turbine over frequency protection disconnection times (). It is project dependent parameter. Default: nullptr */ + CIMPP::Seconds tfover; + + /** \brief Set of corresponding wind turbine under frequency protection disconnection times (). It is project dependent parameter. Default: nullptr */ + CIMPP::Seconds tfunder; + + /** \brief Set of corresponding wind turbine over voltage protection disconnection times (). It is project dependent parameter. Default: nullptr */ + CIMPP::Seconds tuover; + + /** \brief Set of corresponding wind turbine under voltage protection disconnection times (). It is project dependent parameter. Default: nullptr */ + CIMPP::Seconds tuunder; + + /** \brief Set of wind turbine over voltage protection levels (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU uover; + + /** \brief Set of wind turbine under voltage protection levels (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU uunder; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/WindQcontrolModesKind.cpp b/CGMES_2.4.15_16FEB2016/WindQcontrolModesKind.cpp index b5c887e96..3e9f617b5 100644 --- a/CGMES_2.4.15_16FEB2016/WindQcontrolModesKind.cpp +++ b/CGMES_2.4.15_16FEB2016/WindQcontrolModesKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "WindQcontrolModesKind") + if (EnumSymbol.substr(0, pos) != "WindQcontrolModesKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,22 +50,22 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "voltage") + if (EnumSymbol == "voltage") { rop = WindQcontrolModesKind::voltage; return lop; } - if(EnumSymbol == "reactivePower") + if (EnumSymbol == "reactivePower") { rop = WindQcontrolModesKind::reactivePower; return lop; } - if(EnumSymbol == "openLoopReactivePower") + if (EnumSymbol == "openLoopReactivePower") { rop = WindQcontrolModesKind::openLoopReactivePower; return lop; } - if(EnumSymbol == "powerFactor") + if (EnumSymbol == "powerFactor") { rop = WindQcontrolModesKind::powerFactor; return lop; diff --git a/CGMES_2.4.15_16FEB2016/WindQcontrolModesKind.hpp b/CGMES_2.4.15_16FEB2016/WindQcontrolModesKind.hpp index 770a20720..de75bba95 100644 --- a/CGMES_2.4.15_16FEB2016/WindQcontrolModesKind.hpp +++ b/CGMES_2.4.15_16FEB2016/WindQcontrolModesKind.hpp @@ -9,29 +9,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - General wind turbine Q control modes . - */ + /** \brief General wind turbine Q control modes . */ class WindQcontrolModesKind { public: enum WindQcontrolModesKind_ENUM { - /** - * Voltage control (). - */ + /** Voltage control (). */ voltage, - /** - * Reactive power control (). - */ + /** Reactive power control (). */ reactivePower, - /** - * Open loop reactive power control (only used with closed loop at plant level) (). - */ + /** Open loop reactive power control (only used with closed loop at plant level) (). */ openLoopReactivePower, - /** - * Power factor control (). - */ + /** Power factor control (). */ powerFactor, }; diff --git a/CGMES_2.4.15_16FEB2016/WindTurbineType1or2Dynamics.cpp b/CGMES_2.4.15_16FEB2016/WindTurbineType1or2Dynamics.cpp index 0b1deb098..2d438018b 100644 --- a/CGMES_2.4.15_16FEB2016/WindTurbineType1or2Dynamics.cpp +++ b/CGMES_2.4.15_16FEB2016/WindTurbineType1or2Dynamics.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindTurbineType1or2Dynamics::WindTurbineType1or2Dynamics() : AsynchronousMachineDynamics(nullptr), RemoteInputSignal(nullptr) {}; -WindTurbineType1or2Dynamics::~WindTurbineType1or2Dynamics() {}; +WindTurbineType1or2Dynamics::WindTurbineType1or2Dynamics() : AsynchronousMachineDynamics(nullptr), RemoteInputSignal(nullptr) {} +WindTurbineType1or2Dynamics::~WindTurbineType1or2Dynamics() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ WindTurbineType1or2Dynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_AsynchronousMachineDynamics_WindTurbineType1or2Dynamics(BaseClass*, BaseClass*); bool assign_WindTurbineType1or2Dynamics_AsynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_WindTurbineType1or2Dynamics_AsynchronousMachineDynamics(BaseClass* B } return false; } + bool assign_RemoteInputSignal_WindTurbineType1or2Dynamics(BaseClass*, BaseClass*); bool assign_WindTurbineType1or2Dynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_WindTurbineType1or2Dynamics_RemoteInputSignal(BaseClass* BaseClass_p return false; } - bool get_WindTurbineType1or2Dynamics_AsynchronousMachineDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType1or2Dynamics* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType1or2Dynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->AsynchronousMachineDynamics != 0) { @@ -93,7 +92,8 @@ bool get_WindTurbineType1or2Dynamics_AsynchronousMachineDynamics(const BaseClass bool get_WindTurbineType1or2Dynamics_RemoteInputSignal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType1or2Dynamics* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType1or2Dynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->RemoteInputSignal != 0) { @@ -104,7 +104,6 @@ bool get_WindTurbineType1or2Dynamics_RemoteInputSignal(const BaseClass* BaseClas return false; } - const char WindTurbineType1or2Dynamics::debugName[] = "WindTurbineType1or2Dynamics"; const char* WindTurbineType1or2Dynamics::debugString() const { @@ -113,7 +112,7 @@ const char* WindTurbineType1or2Dynamics::debugString() const void WindTurbineType1or2Dynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindTurbineType1or2Dynamics"), &WindTurbineType1or2Dynamics_factory)); + factory_map.emplace("cim:WindTurbineType1or2Dynamics", &WindTurbineType1or2Dynamics_factory); } void WindTurbineType1or2Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void WindTurbineType1or2Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map< void WindTurbineType1or2Dynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType1or2Dynamics.AsynchronousMachineDynamics"), &assign_WindTurbineType1or2Dynamics_AsynchronousMachineDynamics)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType1or2Dynamics.RemoteInputSignal"), &assign_WindTurbineType1or2Dynamics_RemoteInputSignal)); + assign_map.emplace("cim:WindTurbineType1or2Dynamics.AsynchronousMachineDynamics", &assign_WindTurbineType1or2Dynamics_AsynchronousMachineDynamics); + assign_map.emplace("cim:WindTurbineType1or2Dynamics.RemoteInputSignal", &assign_WindTurbineType1or2Dynamics_RemoteInputSignal); } void WindTurbineType1or2Dynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/WindTurbineType1or2Dynamics.hpp b/CGMES_2.4.15_16FEB2016/WindTurbineType1or2Dynamics.hpp index 00bfc307a..9cd8ce493 100644 --- a/CGMES_2.4.15_16FEB2016/WindTurbineType1or2Dynamics.hpp +++ b/CGMES_2.4.15_16FEB2016/WindTurbineType1or2Dynamics.hpp @@ -18,9 +18,7 @@ namespace CIMPP class AsynchronousMachineDynamics; class RemoteInputSignal; - /* - Parent class supporting relationships to wind turbines Type 1 and 2 and their control models. - */ + /** \brief Parent class supporting relationships to wind turbines Type 1 and 2 and their control models. */ class WindTurbineType1or2Dynamics : public DynamicsFunctionBlock { public: @@ -28,8 +26,11 @@ namespace CIMPP WindTurbineType1or2Dynamics(); ~WindTurbineType1or2Dynamics() override; - CIMPP::AsynchronousMachineDynamics* AsynchronousMachineDynamics; /* Asynchronous machine model with which this wind generator type 1 or 2 model is associated. Default: 0 */ - CIMPP::RemoteInputSignal* RemoteInputSignal; /* Remote input signal used by this wind generator Type 1 or Type 2 model. Default: 0 */ + /** \brief Asynchronous machine model with which this wind generator type 1 or 2 model is associated. Default: 0 */ + CIMPP::AsynchronousMachineDynamics* AsynchronousMachineDynamics; + + /** \brief Remote input signal used by this wind generator Type 1 or Type 2 model. Default: 0 */ + CIMPP::RemoteInputSignal* RemoteInputSignal; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/WindTurbineType1or2IEC.cpp b/CGMES_2.4.15_16FEB2016/WindTurbineType1or2IEC.cpp index f27dc7912..251c07766 100644 --- a/CGMES_2.4.15_16FEB2016/WindTurbineType1or2IEC.cpp +++ b/CGMES_2.4.15_16FEB2016/WindTurbineType1or2IEC.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindTurbineType1or2IEC::WindTurbineType1or2IEC() : WindMechIEC(nullptr), WindProtectionIEC(nullptr) {}; -WindTurbineType1or2IEC::~WindTurbineType1or2IEC() {}; +WindTurbineType1or2IEC::WindTurbineType1or2IEC() : WindMechIEC(nullptr), WindProtectionIEC(nullptr) {} +WindTurbineType1or2IEC::~WindTurbineType1or2IEC() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ WindTurbineType1or2IEC::getPossibleProfilesForAttributes() const return map; } - - bool assign_WindMechIEC_WindTurbineType1or2IEC(BaseClass*, BaseClass*); bool assign_WindTurbineType1or2IEC_WindMechIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_WindTurbineType1or2IEC_WindMechIEC(BaseClass* BaseClass_ptr1, BaseCl } return false; } + bool assign_WindProtectionIEC_WindTurbineType1or2IEC(BaseClass*, BaseClass*); bool assign_WindTurbineType1or2IEC_WindProtectionIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_WindTurbineType1or2IEC_WindProtectionIEC(BaseClass* BaseClass_ptr1, return false; } - bool get_WindTurbineType1or2IEC_WindMechIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType1or2IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType1or2IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindMechIEC != 0) { @@ -93,7 +92,8 @@ bool get_WindTurbineType1or2IEC_WindMechIEC(const BaseClass* BaseClass_ptr1, std bool get_WindTurbineType1or2IEC_WindProtectionIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType1or2IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType1or2IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindProtectionIEC != 0) { @@ -104,7 +104,6 @@ bool get_WindTurbineType1or2IEC_WindProtectionIEC(const BaseClass* BaseClass_ptr return false; } - const char WindTurbineType1or2IEC::debugName[] = "WindTurbineType1or2IEC"; const char* WindTurbineType1or2IEC::debugString() const { @@ -113,7 +112,7 @@ const char* WindTurbineType1or2IEC::debugString() const void WindTurbineType1or2IEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindTurbineType1or2IEC"), &WindTurbineType1or2IEC_factory)); + factory_map.emplace("cim:WindTurbineType1or2IEC", &WindTurbineType1or2IEC_factory); } void WindTurbineType1or2IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void WindTurbineType1or2IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType1or2IEC.WindMechIEC"), &assign_WindTurbineType1or2IEC_WindMechIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType1or2IEC.WindProtectionIEC"), &assign_WindTurbineType1or2IEC_WindProtectionIEC)); + assign_map.emplace("cim:WindTurbineType1or2IEC.WindMechIEC", &assign_WindTurbineType1or2IEC_WindMechIEC); + assign_map.emplace("cim:WindTurbineType1or2IEC.WindProtectionIEC", &assign_WindTurbineType1or2IEC_WindProtectionIEC); } void WindTurbineType1or2IEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/WindTurbineType1or2IEC.hpp b/CGMES_2.4.15_16FEB2016/WindTurbineType1or2IEC.hpp index e120fa228..909b188a3 100644 --- a/CGMES_2.4.15_16FEB2016/WindTurbineType1or2IEC.hpp +++ b/CGMES_2.4.15_16FEB2016/WindTurbineType1or2IEC.hpp @@ -18,9 +18,7 @@ namespace CIMPP class WindMechIEC; class WindProtectionIEC; - /* - Generator model for wind turbine of IEC Type 1 or Type 2 is a standard asynchronous generator model. Reference: IEC Standard 614000-27-1 Section 6.6.3.1. - */ + /** \brief Generator model for wind turbine of IEC Type 1 or Type 2 is a standard asynchronous generator model. Reference: IEC Standard 614000-27-1 Section 6.6.3.1. */ class WindTurbineType1or2IEC : public WindTurbineType1or2Dynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP WindTurbineType1or2IEC(); ~WindTurbineType1or2IEC() override; - CIMPP::WindMechIEC* WindMechIEC; /* Wind mechanical model associated with this wind generator type 1 or 2 model. Default: 0 */ - CIMPP::WindProtectionIEC* WindProtectionIEC; /* Wind turbune protection model associated with this wind generator type 1 or 2 model. Default: 0 */ + /** \brief Wind mechanical model associated with this wind generator type 1 or 2 model. Default: 0 */ + CIMPP::WindMechIEC* WindMechIEC; + + /** \brief Wind turbune protection model associated with this wind generator type 1 or 2 model. Default: 0 */ + CIMPP::WindProtectionIEC* WindProtectionIEC; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/WindTurbineType3or4Dynamics.cpp b/CGMES_2.4.15_16FEB2016/WindTurbineType3or4Dynamics.cpp index a33613f66..921087b71 100644 --- a/CGMES_2.4.15_16FEB2016/WindTurbineType3or4Dynamics.cpp +++ b/CGMES_2.4.15_16FEB2016/WindTurbineType3or4Dynamics.cpp @@ -14,8 +14,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindTurbineType3or4Dynamics::WindTurbineType3or4Dynamics() : EnergySource(nullptr), RemoteInputSignal(nullptr), WindPlantDynamics(nullptr) {}; -WindTurbineType3or4Dynamics::~WindTurbineType3or4Dynamics() {}; +WindTurbineType3or4Dynamics::WindTurbineType3or4Dynamics() : EnergySource(nullptr), RemoteInputSignal(nullptr), WindPlantDynamics(nullptr) {} +WindTurbineType3or4Dynamics::~WindTurbineType3or4Dynamics() {} static const std::list PossibleProfilesForClass = { @@ -44,8 +44,6 @@ WindTurbineType3or4Dynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_EnergySource_WindTurbineType3or4Dynamics(BaseClass*, BaseClass*); bool assign_WindTurbineType3or4Dynamics_EnergySource(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -62,6 +60,7 @@ bool assign_WindTurbineType3or4Dynamics_EnergySource(BaseClass* BaseClass_ptr1, } return false; } + bool assign_RemoteInputSignal_WindTurbineType3or4Dynamics(BaseClass*, BaseClass*); bool assign_WindTurbineType3or4Dynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -78,6 +77,7 @@ bool assign_WindTurbineType3or4Dynamics_RemoteInputSignal(BaseClass* BaseClass_p } return false; } + bool assign_WindPlantDynamics_WindTurbineType3or4Dynamics(BaseClass*, BaseClass*); bool assign_WindTurbineType3or4Dynamics_WindPlantDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -95,10 +95,10 @@ bool assign_WindTurbineType3or4Dynamics_WindPlantDynamics(BaseClass* BaseClass_p return false; } - bool get_WindTurbineType3or4Dynamics_EnergySource(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType3or4Dynamics* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType3or4Dynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->EnergySource != 0) { @@ -111,7 +111,8 @@ bool get_WindTurbineType3or4Dynamics_EnergySource(const BaseClass* BaseClass_ptr bool get_WindTurbineType3or4Dynamics_RemoteInputSignal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType3or4Dynamics* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType3or4Dynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->RemoteInputSignal != 0) { @@ -124,7 +125,8 @@ bool get_WindTurbineType3or4Dynamics_RemoteInputSignal(const BaseClass* BaseClas bool get_WindTurbineType3or4Dynamics_WindPlantDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType3or4Dynamics* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType3or4Dynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindPlantDynamics != 0) { @@ -135,7 +137,6 @@ bool get_WindTurbineType3or4Dynamics_WindPlantDynamics(const BaseClass* BaseClas return false; } - const char WindTurbineType3or4Dynamics::debugName[] = "WindTurbineType3or4Dynamics"; const char* WindTurbineType3or4Dynamics::debugString() const { @@ -144,7 +145,7 @@ const char* WindTurbineType3or4Dynamics::debugString() const void WindTurbineType3or4Dynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4Dynamics"), &WindTurbineType3or4Dynamics_factory)); + factory_map.emplace("cim:WindTurbineType3or4Dynamics", &WindTurbineType3or4Dynamics_factory); } void WindTurbineType3or4Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -153,9 +154,9 @@ void WindTurbineType3or4Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map< void WindTurbineType3or4Dynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4Dynamics.EnergySource"), &assign_WindTurbineType3or4Dynamics_EnergySource)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4Dynamics.RemoteInputSignal"), &assign_WindTurbineType3or4Dynamics_RemoteInputSignal)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4Dynamics.WindPlantDynamics"), &assign_WindTurbineType3or4Dynamics_WindPlantDynamics)); + assign_map.emplace("cim:WindTurbineType3or4Dynamics.EnergySource", &assign_WindTurbineType3or4Dynamics_EnergySource); + assign_map.emplace("cim:WindTurbineType3or4Dynamics.RemoteInputSignal", &assign_WindTurbineType3or4Dynamics_RemoteInputSignal); + assign_map.emplace("cim:WindTurbineType3or4Dynamics.WindPlantDynamics", &assign_WindTurbineType3or4Dynamics_WindPlantDynamics); } void WindTurbineType3or4Dynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/WindTurbineType3or4Dynamics.hpp b/CGMES_2.4.15_16FEB2016/WindTurbineType3or4Dynamics.hpp index 581bfb43b..9c123fe1d 100644 --- a/CGMES_2.4.15_16FEB2016/WindTurbineType3or4Dynamics.hpp +++ b/CGMES_2.4.15_16FEB2016/WindTurbineType3or4Dynamics.hpp @@ -19,9 +19,7 @@ namespace CIMPP class RemoteInputSignal; class WindPlantDynamics; - /* - Parent class supporting relationships to wind turbines Type 3 and 4 and wind plant including their control models. - */ + /** \brief Parent class supporting relationships to wind turbines Type 3 and 4 and wind plant including their control models. */ class WindTurbineType3or4Dynamics : public DynamicsFunctionBlock { public: @@ -29,9 +27,14 @@ namespace CIMPP WindTurbineType3or4Dynamics(); ~WindTurbineType3or4Dynamics() override; - CIMPP::EnergySource* EnergySource; /* Energy Source (current source) with which this wind Type 3 or 4 dynamics model is asoociated. Default: 0 */ - CIMPP::RemoteInputSignal* RemoteInputSignal; /* Wind turbine Type 3 or 4 models using this remote input signal. Default: 0 */ - CIMPP::WindPlantDynamics* WindPlantDynamics; /* The wind plant with which the wind turbines type 3 or 4 are associated. Default: 0 */ + /** \brief Energy Source (current source) with which this wind Type 3 or 4 dynamics model is asoociated. Default: 0 */ + CIMPP::EnergySource* EnergySource; + + /** \brief Wind turbine Type 3 or 4 models using this remote input signal. Default: 0 */ + CIMPP::RemoteInputSignal* RemoteInputSignal; + + /** \brief The wind plant with which the wind turbines type 3 or 4 are associated. Default: 0 */ + CIMPP::WindPlantDynamics* WindPlantDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/WindTurbineType3or4IEC.cpp b/CGMES_2.4.15_16FEB2016/WindTurbineType3or4IEC.cpp index 2d1dd0fc6..7dd415768 100644 --- a/CGMES_2.4.15_16FEB2016/WindTurbineType3or4IEC.cpp +++ b/CGMES_2.4.15_16FEB2016/WindTurbineType3or4IEC.cpp @@ -8,14 +8,14 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "WindContQIEC.hpp" #include "WindContCurrLimIEC.hpp" +#include "WindContQIEC.hpp" #include "WindProtectionIEC.hpp" using namespace CIMPP; -WindTurbineType3or4IEC::WindTurbineType3or4IEC() : WIndContQIEC(nullptr), WindContCurrLimIEC(nullptr), WindProtectionIEC(nullptr) {}; -WindTurbineType3or4IEC::~WindTurbineType3or4IEC() {}; +WindTurbineType3or4IEC::WindTurbineType3or4IEC() : WIndContQIEC(nullptr), WindContCurrLimIEC(nullptr), WindProtectionIEC(nullptr) {} +WindTurbineType3or4IEC::~WindTurbineType3or4IEC() {} static const std::list PossibleProfilesForClass = { @@ -44,8 +44,6 @@ WindTurbineType3or4IEC::getPossibleProfilesForAttributes() const return map; } - - bool assign_WindContQIEC_WindTurbineType3or4IEC(BaseClass*, BaseClass*); bool assign_WindTurbineType3or4IEC_WIndContQIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -62,6 +60,7 @@ bool assign_WindTurbineType3or4IEC_WIndContQIEC(BaseClass* BaseClass_ptr1, BaseC } return false; } + bool assign_WindContCurrLimIEC_WindTurbineType3or4IEC(BaseClass*, BaseClass*); bool assign_WindTurbineType3or4IEC_WindContCurrLimIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -78,6 +77,7 @@ bool assign_WindTurbineType3or4IEC_WindContCurrLimIEC(BaseClass* BaseClass_ptr1, } return false; } + bool assign_WindProtectionIEC_WindTurbineType3or4IEC(BaseClass*, BaseClass*); bool assign_WindTurbineType3or4IEC_WindProtectionIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -95,10 +95,10 @@ bool assign_WindTurbineType3or4IEC_WindProtectionIEC(BaseClass* BaseClass_ptr1, return false; } - bool get_WindTurbineType3or4IEC_WIndContQIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WIndContQIEC != 0) { @@ -111,7 +111,8 @@ bool get_WindTurbineType3or4IEC_WIndContQIEC(const BaseClass* BaseClass_ptr1, st bool get_WindTurbineType3or4IEC_WindContCurrLimIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContCurrLimIEC != 0) { @@ -124,7 +125,8 @@ bool get_WindTurbineType3or4IEC_WindContCurrLimIEC(const BaseClass* BaseClass_pt bool get_WindTurbineType3or4IEC_WindProtectionIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindProtectionIEC != 0) { @@ -135,7 +137,6 @@ bool get_WindTurbineType3or4IEC_WindProtectionIEC(const BaseClass* BaseClass_ptr return false; } - const char WindTurbineType3or4IEC::debugName[] = "WindTurbineType3or4IEC"; const char* WindTurbineType3or4IEC::debugString() const { @@ -144,7 +145,7 @@ const char* WindTurbineType3or4IEC::debugString() const void WindTurbineType3or4IEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4IEC"), &WindTurbineType3or4IEC_factory)); + factory_map.emplace("cim:WindTurbineType3or4IEC", &WindTurbineType3or4IEC_factory); } void WindTurbineType3or4IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -153,9 +154,9 @@ void WindTurbineType3or4IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4IEC.WIndContQIEC"), &assign_WindTurbineType3or4IEC_WIndContQIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4IEC.WindContCurrLimIEC"), &assign_WindTurbineType3or4IEC_WindContCurrLimIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4IEC.WindProtectionIEC"), &assign_WindTurbineType3or4IEC_WindProtectionIEC)); + assign_map.emplace("cim:WindTurbineType3or4IEC.WIndContQIEC", &assign_WindTurbineType3or4IEC_WIndContQIEC); + assign_map.emplace("cim:WindTurbineType3or4IEC.WindContCurrLimIEC", &assign_WindTurbineType3or4IEC_WindContCurrLimIEC); + assign_map.emplace("cim:WindTurbineType3or4IEC.WindProtectionIEC", &assign_WindTurbineType3or4IEC_WindProtectionIEC); } void WindTurbineType3or4IEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/WindTurbineType3or4IEC.hpp b/CGMES_2.4.15_16FEB2016/WindTurbineType3or4IEC.hpp index 3808a1eae..8246ead01 100644 --- a/CGMES_2.4.15_16FEB2016/WindTurbineType3or4IEC.hpp +++ b/CGMES_2.4.15_16FEB2016/WindTurbineType3or4IEC.hpp @@ -19,9 +19,7 @@ namespace CIMPP class WindContQIEC; class WindProtectionIEC; - /* - Parent class supporting relationships to IEC wind turbines Type 3 and 4 and wind plant including their control models. - */ + /** \brief Parent class supporting relationships to IEC wind turbines Type 3 and 4 and wind plant including their control models. */ class WindTurbineType3or4IEC : public WindTurbineType3or4Dynamics { public: @@ -29,9 +27,14 @@ namespace CIMPP WindTurbineType3or4IEC(); ~WindTurbineType3or4IEC() override; - CIMPP::WindContQIEC* WIndContQIEC; /* Wind control Q model associated with this wind turbine type 3 or 4 model. Default: 0 */ - CIMPP::WindContCurrLimIEC* WindContCurrLimIEC; /* Wind control current limitation model associated with this wind turbine type 3 or 4 model. Default: 0 */ - CIMPP::WindProtectionIEC* WindProtectionIEC; /* Wind turbune protection model associated with this wind generator type 3 or 4 model. Default: 0 */ + /** \brief Wind control Q model associated with this wind turbine type 3 or 4 model. Default: 0 */ + CIMPP::WindContQIEC* WIndContQIEC; + + /** \brief Wind control current limitation model associated with this wind turbine type 3 or 4 model. Default: 0 */ + CIMPP::WindContCurrLimIEC* WindContCurrLimIEC; + + /** \brief Wind turbune protection model associated with this wind generator type 3 or 4 model. Default: 0 */ + CIMPP::WindProtectionIEC* WindProtectionIEC; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/WindTurbineType4aIEC.cpp b/CGMES_2.4.15_16FEB2016/WindTurbineType4aIEC.cpp index f1170dc4c..19a53dd03 100644 --- a/CGMES_2.4.15_16FEB2016/WindTurbineType4aIEC.cpp +++ b/CGMES_2.4.15_16FEB2016/WindTurbineType4aIEC.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindTurbineType4aIEC::WindTurbineType4aIEC() : WindContPType4aIEC(nullptr) {}; -WindTurbineType4aIEC::~WindTurbineType4aIEC() {}; +WindTurbineType4aIEC::WindTurbineType4aIEC() : WindContPType4aIEC(nullptr) {} +WindTurbineType4aIEC::~WindTurbineType4aIEC() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ WindTurbineType4aIEC::getPossibleProfilesForAttributes() const return map; } - - bool assign_WindContPType4aIEC_WindTurbineType4aIEC(BaseClass*, BaseClass*); bool assign_WindTurbineType4aIEC_WindContPType4aIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_WindTurbineType4aIEC_WindContPType4aIEC(BaseClass* BaseClass_ptr1, B return false; } - bool get_WindTurbineType4aIEC_WindContPType4aIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType4aIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType4aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContPType4aIEC != 0) { @@ -73,7 +71,6 @@ bool get_WindTurbineType4aIEC_WindContPType4aIEC(const BaseClass* BaseClass_ptr1 return false; } - const char WindTurbineType4aIEC::debugName[] = "WindTurbineType4aIEC"; const char* WindTurbineType4aIEC::debugString() const { @@ -82,7 +79,7 @@ const char* WindTurbineType4aIEC::debugString() const void WindTurbineType4aIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindTurbineType4aIEC"), &WindTurbineType4aIEC_factory)); + factory_map.emplace("cim:WindTurbineType4aIEC", &WindTurbineType4aIEC_factory); } void WindTurbineType4aIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void WindTurbineType4aIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType4aIEC.WindContPType4aIEC"), &assign_WindTurbineType4aIEC_WindContPType4aIEC)); + assign_map.emplace("cim:WindTurbineType4aIEC.WindContPType4aIEC", &assign_WindTurbineType4aIEC_WindContPType4aIEC); } void WindTurbineType4aIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/WindTurbineType4aIEC.hpp b/CGMES_2.4.15_16FEB2016/WindTurbineType4aIEC.hpp index 980d5388d..67bcd203b 100644 --- a/CGMES_2.4.15_16FEB2016/WindTurbineType4aIEC.hpp +++ b/CGMES_2.4.15_16FEB2016/WindTurbineType4aIEC.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class WindContPType4aIEC; - /* - Wind turbine IEC Type 4A. Reference: IEC Standard 61400-27-1, section 6.5.5.2. - */ + /** \brief Wind turbine IEC Type 4A. Reference: IEC Standard 61400-27-1, section 6.5.5.2. */ class WindTurbineType4aIEC : public WindGenType4IEC { public: @@ -27,7 +25,8 @@ namespace CIMPP WindTurbineType4aIEC(); ~WindTurbineType4aIEC() override; - CIMPP::WindContPType4aIEC* WindContPType4aIEC; /* Wind control P type 4A model associated with this wind turbine type 4A model. Default: 0 */ + /** \brief Wind control P type 4A model associated with this wind turbine type 4A model. Default: 0 */ + CIMPP::WindContPType4aIEC* WindContPType4aIEC; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/WindTurbineType4bIEC.cpp b/CGMES_2.4.15_16FEB2016/WindTurbineType4bIEC.cpp index 1dd86053d..ad7a668db 100644 --- a/CGMES_2.4.15_16FEB2016/WindTurbineType4bIEC.cpp +++ b/CGMES_2.4.15_16FEB2016/WindTurbineType4bIEC.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindTurbineType4bIEC::WindTurbineType4bIEC() : WindContPType4bIEC(nullptr), WindMechIEC(nullptr) {}; -WindTurbineType4bIEC::~WindTurbineType4bIEC() {}; +WindTurbineType4bIEC::WindTurbineType4bIEC() : WindContPType4bIEC(nullptr), WindMechIEC(nullptr) {} +WindTurbineType4bIEC::~WindTurbineType4bIEC() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ WindTurbineType4bIEC::getPossibleProfilesForAttributes() const return map; } - - bool assign_WindContPType4bIEC_WindTurbineType4bIEC(BaseClass*, BaseClass*); bool assign_WindTurbineType4bIEC_WindContPType4bIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_WindTurbineType4bIEC_WindContPType4bIEC(BaseClass* BaseClass_ptr1, B } return false; } + bool assign_WindMechIEC_WindTurbineType4bIEC(BaseClass*, BaseClass*); bool assign_WindTurbineType4bIEC_WindMechIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_WindTurbineType4bIEC_WindMechIEC(BaseClass* BaseClass_ptr1, BaseClas return false; } - bool get_WindTurbineType4bIEC_WindContPType4bIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContPType4bIEC != 0) { @@ -93,7 +92,8 @@ bool get_WindTurbineType4bIEC_WindContPType4bIEC(const BaseClass* BaseClass_ptr1 bool get_WindTurbineType4bIEC_WindMechIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindMechIEC != 0) { @@ -104,7 +104,6 @@ bool get_WindTurbineType4bIEC_WindMechIEC(const BaseClass* BaseClass_ptr1, std:: return false; } - const char WindTurbineType4bIEC::debugName[] = "WindTurbineType4bIEC"; const char* WindTurbineType4bIEC::debugString() const { @@ -113,7 +112,7 @@ const char* WindTurbineType4bIEC::debugString() const void WindTurbineType4bIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindTurbineType4bIEC"), &WindTurbineType4bIEC_factory)); + factory_map.emplace("cim:WindTurbineType4bIEC", &WindTurbineType4bIEC_factory); } void WindTurbineType4bIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void WindTurbineType4bIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType4bIEC.WindContPType4bIEC"), &assign_WindTurbineType4bIEC_WindContPType4bIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType4bIEC.WindMechIEC"), &assign_WindTurbineType4bIEC_WindMechIEC)); + assign_map.emplace("cim:WindTurbineType4bIEC.WindContPType4bIEC", &assign_WindTurbineType4bIEC_WindContPType4bIEC); + assign_map.emplace("cim:WindTurbineType4bIEC.WindMechIEC", &assign_WindTurbineType4bIEC_WindMechIEC); } void WindTurbineType4bIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/WindTurbineType4bIEC.hpp b/CGMES_2.4.15_16FEB2016/WindTurbineType4bIEC.hpp index ad1094a43..26da27746 100644 --- a/CGMES_2.4.15_16FEB2016/WindTurbineType4bIEC.hpp +++ b/CGMES_2.4.15_16FEB2016/WindTurbineType4bIEC.hpp @@ -18,9 +18,7 @@ namespace CIMPP class WindContPType4bIEC; class WindMechIEC; - /* - Wind turbine IEC Type 4A. Reference: IEC Standard 61400-27-1, section 6.5.5.3. - */ + /** \brief Wind turbine IEC Type 4A. Reference: IEC Standard 61400-27-1, section 6.5.5.3. */ class WindTurbineType4bIEC : public WindGenType4IEC { public: @@ -28,8 +26,11 @@ namespace CIMPP WindTurbineType4bIEC(); ~WindTurbineType4bIEC() override; - CIMPP::WindContPType4bIEC* WindContPType4bIEC; /* Wind control P type 4B model associated with this wind turbine type 4B model. Default: 0 */ - CIMPP::WindMechIEC* WindMechIEC; /* Wind mechanical model associated with this wind turbine Type 4B model. Default: 0 */ + /** \brief Wind control P type 4B model associated with this wind turbine type 4B model. Default: 0 */ + CIMPP::WindContPType4bIEC* WindContPType4bIEC; + + /** \brief Wind mechanical model associated with this wind turbine Type 4B model. Default: 0 */ + CIMPP::WindMechIEC* WindMechIEC; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/WindType1or2UserDefined.cpp b/CGMES_2.4.15_16FEB2016/WindType1or2UserDefined.cpp index 9a6a86bd9..be1daa797 100644 --- a/CGMES_2.4.15_16FEB2016/WindType1or2UserDefined.cpp +++ b/CGMES_2.4.15_16FEB2016/WindType1or2UserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -WindType1or2UserDefined::WindType1or2UserDefined() {}; -WindType1or2UserDefined::~WindType1or2UserDefined() {}; +WindType1or2UserDefined::WindType1or2UserDefined() {} +WindType1or2UserDefined::~WindType1or2UserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ WindType1or2UserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindType1or2UserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindType1or2UserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_WindType1or2UserDefined(BaseClass*, BaseClass*); bool assign_WindType1or2UserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_WindType1or2UserDefined_ProprietaryParameterDynamics(BaseClass* Base return false; } +bool assign_WindType1or2UserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + WindType1or2UserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_WindType1or2UserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindType1or2UserDefined* element = dynamic_cast(BaseClass_ptr1)) + const WindType1or2UserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_WindType1or2UserDefined_proprietary(const BaseClass* BaseClass_ptr1, st return false; } - - const char WindType1or2UserDefined::debugName[] = "WindType1or2UserDefined"; const char* WindType1or2UserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* WindType1or2UserDefined::debugString() const void WindType1or2UserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindType1or2UserDefined"), &WindType1or2UserDefined_factory)); + factory_map.emplace("cim:WindType1or2UserDefined", &WindType1or2UserDefined_factory); } void WindType1or2UserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindType1or2UserDefined.proprietary"), &assign_WindType1or2UserDefined_proprietary)); + assign_map.emplace("cim:WindType1or2UserDefined.proprietary", &assign_WindType1or2UserDefined_proprietary); } void WindType1or2UserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindType1or2UserDefined.ProprietaryParameterDynamics"), &assign_WindType1or2UserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:WindType1or2UserDefined.ProprietaryParameterDynamics", &assign_WindType1or2UserDefined_ProprietaryParameterDynamics); } void WindType1or2UserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/WindType1or2UserDefined.hpp b/CGMES_2.4.15_16FEB2016/WindType1or2UserDefined.hpp index 9d7145ff4..dc0abcc62 100644 --- a/CGMES_2.4.15_16FEB2016/WindType1or2UserDefined.hpp +++ b/CGMES_2.4.15_16FEB2016/WindType1or2UserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Wind Type 1 or Type 2 function block whose dynamic behaviour is described by - */ + /** \brief Wind Type 1 or Type 2 function block whose dynamic behaviour is described by */ class WindType1or2UserDefined : public WindTurbineType1or2Dynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP WindType1or2UserDefined(); ~WindType1or2UserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/WindType3or4UserDefined.cpp b/CGMES_2.4.15_16FEB2016/WindType3or4UserDefined.cpp index d749efa43..300908ba4 100644 --- a/CGMES_2.4.15_16FEB2016/WindType3or4UserDefined.cpp +++ b/CGMES_2.4.15_16FEB2016/WindType3or4UserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -WindType3or4UserDefined::WindType3or4UserDefined() {}; -WindType3or4UserDefined::~WindType3or4UserDefined() {}; +WindType3or4UserDefined::WindType3or4UserDefined() {} +WindType3or4UserDefined::~WindType3or4UserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ WindType3or4UserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindType3or4UserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindType3or4UserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_WindType3or4UserDefined(BaseClass*, BaseClass*); bool assign_WindType3or4UserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_WindType3or4UserDefined_ProprietaryParameterDynamics(BaseClass* Base return false; } +bool assign_WindType3or4UserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + WindType3or4UserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_WindType3or4UserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindType3or4UserDefined* element = dynamic_cast(BaseClass_ptr1)) + const WindType3or4UserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_WindType3or4UserDefined_proprietary(const BaseClass* BaseClass_ptr1, st return false; } - - const char WindType3or4UserDefined::debugName[] = "WindType3or4UserDefined"; const char* WindType3or4UserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* WindType3or4UserDefined::debugString() const void WindType3or4UserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindType3or4UserDefined"), &WindType3or4UserDefined_factory)); + factory_map.emplace("cim:WindType3or4UserDefined", &WindType3or4UserDefined_factory); } void WindType3or4UserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindType3or4UserDefined.proprietary"), &assign_WindType3or4UserDefined_proprietary)); + assign_map.emplace("cim:WindType3or4UserDefined.proprietary", &assign_WindType3or4UserDefined_proprietary); } void WindType3or4UserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindType3or4UserDefined.ProprietaryParameterDynamics"), &assign_WindType3or4UserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:WindType3or4UserDefined.ProprietaryParameterDynamics", &assign_WindType3or4UserDefined_ProprietaryParameterDynamics); } void WindType3or4UserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_16FEB2016/WindType3or4UserDefined.hpp b/CGMES_2.4.15_16FEB2016/WindType3or4UserDefined.hpp index 2e8317b5f..5259b5916 100644 --- a/CGMES_2.4.15_16FEB2016/WindType3or4UserDefined.hpp +++ b/CGMES_2.4.15_16FEB2016/WindType3or4UserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Wind Type 3 or Type 4 function block whose dynamic behaviour is described by - */ + /** \brief Wind Type 3 or Type 4 function block whose dynamic behaviour is described by */ class WindType3or4UserDefined : public WindTurbineType3or4Dynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP WindType3or4UserDefined(); ~WindType3or4UserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_16FEB2016/WindingConnection.cpp b/CGMES_2.4.15_16FEB2016/WindingConnection.cpp index 498dcbe94..90e8fc5af 100644 --- a/CGMES_2.4.15_16FEB2016/WindingConnection.cpp +++ b/CGMES_2.4.15_16FEB2016/WindingConnection.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "WindingConnection") + if (EnumSymbol.substr(0, pos) != "WindingConnection") { lop.setstate(std::ios::failbit); return lop; @@ -50,37 +50,37 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "D") + if (EnumSymbol == "D") { rop = WindingConnection::D; return lop; } - if(EnumSymbol == "Y") + if (EnumSymbol == "Y") { rop = WindingConnection::Y; return lop; } - if(EnumSymbol == "Z") + if (EnumSymbol == "Z") { rop = WindingConnection::Z; return lop; } - if(EnumSymbol == "Yn") + if (EnumSymbol == "Yn") { rop = WindingConnection::Yn; return lop; } - if(EnumSymbol == "Zn") + if (EnumSymbol == "Zn") { rop = WindingConnection::Zn; return lop; } - if(EnumSymbol == "A") + if (EnumSymbol == "A") { rop = WindingConnection::A; return lop; } - if(EnumSymbol == "I") + if (EnumSymbol == "I") { rop = WindingConnection::I; return lop; diff --git a/CGMES_2.4.15_16FEB2016/WindingConnection.hpp b/CGMES_2.4.15_16FEB2016/WindingConnection.hpp index 398f89ecf..897bb3e00 100644 --- a/CGMES_2.4.15_16FEB2016/WindingConnection.hpp +++ b/CGMES_2.4.15_16FEB2016/WindingConnection.hpp @@ -9,41 +9,25 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Winding connection type. - */ + /** \brief Winding connection type. */ class WindingConnection { public: enum WindingConnection_ENUM { - /** - * Delta - */ + /** Delta */ D, - /** - * Wye - */ + /** Wye */ Y, - /** - * ZigZag - */ + /** ZigZag */ Z, - /** - * Wye, with neutral brought out for grounding. - */ + /** Wye, with neutral brought out for grounding. */ Yn, - /** - * ZigZag, with neutral brought out for grounding. - */ + /** ZigZag, with neutral brought out for grounding. */ Zn, - /** - * Autotransformer common winding - */ + /** Autotransformer common winding */ A, - /** - * Independent winding, for single-phase connections - */ + /** Independent winding, for single-phase connections */ I, }; diff --git a/CGMES_2.4.15_27JAN2020/ACDCConverter.cpp b/CGMES_2.4.15_27JAN2020/ACDCConverter.cpp index 2e6e2ffc3..77117a179 100644 --- a/CGMES_2.4.15_27JAN2020/ACDCConverter.cpp +++ b/CGMES_2.4.15_27JAN2020/ACDCConverter.cpp @@ -10,28 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "ACDCConverterDCTerminal.hpp" #include "Terminal.hpp" -#include "ApparentPower.hpp" -#include "CurrentFlow.hpp" -#include "ActivePower.hpp" -#include "Voltage.hpp" -#include "Voltage.hpp" -#include "Integer.hpp" -#include "ActivePower.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" -#include "Voltage.hpp" -#include "Resistance.hpp" -#include "ActivePowerPerCurrentFlow.hpp" -#include "ActivePower.hpp" -#include "Voltage.hpp" -#include "Voltage.hpp" -#include "Voltage.hpp" -#include "Voltage.hpp" using namespace CIMPP; -ACDCConverter::ACDCConverter() : PccTerminal(nullptr) {}; -ACDCConverter::~ACDCConverter() {}; +ACDCConverter::ACDCConverter() : PccTerminal(nullptr) {} +ACDCConverter::~ACDCConverter() {} static const std::list PossibleProfilesForClass = { @@ -78,265 +61,297 @@ ACDCConverter::getPossibleProfilesForAttributes() const return map; } +bool assign_ACDCConverterDCTerminal_DCConductingEquipment(BaseClass*, BaseClass*); +bool assign_ACDCConverter_DCTerminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + ACDCConverterDCTerminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->DCTerminals.begin(), element->DCTerminals.end(), element2) == element->DCTerminals.end()) + { + element->DCTerminals.push_back(element2); + return assign_ACDCConverterDCTerminal_DCConductingEquipment(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Terminal_ConverterDCSides(BaseClass*, BaseClass*); +bool assign_ACDCConverter_PccTerminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PccTerminal != element2) + { + element->PccTerminal = element2; + return assign_Terminal_ConverterDCSides(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_ACDCConverter_baseS(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_baseS(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->baseS; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_idc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_idc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->idc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_idleLoss(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_idleLoss(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->idleLoss; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_maxUdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_maxUdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxUdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_minUdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_minUdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minUdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_numberOfValves(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_numberOfValves(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->numberOfValves; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_p(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_poleLossP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_poleLossP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->poleLossP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_ratedUdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_ratedUdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedUdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_resistiveLoss(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_resistiveLoss(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->resistiveLoss; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_switchingLoss(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_switchingLoss(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->switchingLoss; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_targetPpcc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_targetPpcc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->targetPpcc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_targetUdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_targetUdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->targetUdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_uc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_udc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_udc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->udc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_valveU0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_valveU0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->valveU0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverterDCTerminal_DCConductingEquipment(BaseClass*, BaseClass*); -bool assign_ACDCConverter_DCTerminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) -{ - ACDCConverter* element = dynamic_cast(BaseClass_ptr1); - ACDCConverterDCTerminal* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) - { - if (std::find(element->DCTerminals.begin(), element->DCTerminals.end(), element2) == element->DCTerminals.end()) - { - element->DCTerminals.push_back(element2); - return assign_ACDCConverterDCTerminal_DCConductingEquipment(BaseClass_ptr2, BaseClass_ptr1); - } - return true; - } - return false; -} -bool assign_Terminal_ConverterDCSides(BaseClass*, BaseClass*); -bool assign_ACDCConverter_PccTerminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_ACDCConverter_PccTerminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - ACDCConverter* element = dynamic_cast(BaseClass_ptr1); - Terminal* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->PccTerminal != element2) + if (element->PccTerminal != 0) { - element->PccTerminal = element2; - return assign_Terminal_ConverterDCSides(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->PccTerminal); + return true; } - return true; } return false; } bool get_ACDCConverter_baseS(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseS; if (!buffer.str().empty()) @@ -350,7 +365,8 @@ bool get_ACDCConverter_baseS(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ACDCConverter_idc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->idc; if (!buffer.str().empty()) @@ -364,7 +380,8 @@ bool get_ACDCConverter_idc(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ACDCConverter_idleLoss(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->idleLoss; if (!buffer.str().empty()) @@ -378,7 +395,8 @@ bool get_ACDCConverter_idleLoss(const BaseClass* BaseClass_ptr1, std::stringstre bool get_ACDCConverter_maxUdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxUdc; if (!buffer.str().empty()) @@ -392,7 +410,8 @@ bool get_ACDCConverter_maxUdc(const BaseClass* BaseClass_ptr1, std::stringstream bool get_ACDCConverter_minUdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minUdc; if (!buffer.str().empty()) @@ -406,7 +425,8 @@ bool get_ACDCConverter_minUdc(const BaseClass* BaseClass_ptr1, std::stringstream bool get_ACDCConverter_numberOfValves(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->numberOfValves; if (!buffer.str().empty()) @@ -420,7 +440,8 @@ bool get_ACDCConverter_numberOfValves(const BaseClass* BaseClass_ptr1, std::stri bool get_ACDCConverter_p(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p; if (!buffer.str().empty()) @@ -434,7 +455,8 @@ bool get_ACDCConverter_p(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ACDCConverter_poleLossP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->poleLossP; if (!buffer.str().empty()) @@ -448,7 +470,8 @@ bool get_ACDCConverter_poleLossP(const BaseClass* BaseClass_ptr1, std::stringstr bool get_ACDCConverter_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q; if (!buffer.str().empty()) @@ -462,7 +485,8 @@ bool get_ACDCConverter_q(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ACDCConverter_ratedUdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedUdc; if (!buffer.str().empty()) @@ -476,7 +500,8 @@ bool get_ACDCConverter_ratedUdc(const BaseClass* BaseClass_ptr1, std::stringstre bool get_ACDCConverter_resistiveLoss(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->resistiveLoss; if (!buffer.str().empty()) @@ -490,7 +515,8 @@ bool get_ACDCConverter_resistiveLoss(const BaseClass* BaseClass_ptr1, std::strin bool get_ACDCConverter_switchingLoss(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->switchingLoss; if (!buffer.str().empty()) @@ -504,7 +530,8 @@ bool get_ACDCConverter_switchingLoss(const BaseClass* BaseClass_ptr1, std::strin bool get_ACDCConverter_targetPpcc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->targetPpcc; if (!buffer.str().empty()) @@ -518,7 +545,8 @@ bool get_ACDCConverter_targetPpcc(const BaseClass* BaseClass_ptr1, std::stringst bool get_ACDCConverter_targetUdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->targetUdc; if (!buffer.str().empty()) @@ -532,7 +560,8 @@ bool get_ACDCConverter_targetUdc(const BaseClass* BaseClass_ptr1, std::stringstr bool get_ACDCConverter_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uc; if (!buffer.str().empty()) @@ -546,7 +575,8 @@ bool get_ACDCConverter_uc(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ACDCConverter_udc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->udc; if (!buffer.str().empty()) @@ -560,7 +590,8 @@ bool get_ACDCConverter_udc(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ACDCConverter_valveU0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->valveU0; if (!buffer.str().empty()) @@ -572,21 +603,6 @@ bool get_ACDCConverter_valveU0(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } - -bool get_ACDCConverter_PccTerminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->PccTerminal != 0) - { - BaseClass_list.push_back(element->PccTerminal); - return true; - } - } - return false; -} - - const char ACDCConverter::debugName[] = "ACDCConverter"; const char* ACDCConverter::debugString() const { @@ -595,34 +611,34 @@ const char* ACDCConverter::debugString() const void ACDCConverter::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ACDCConverter"), &ACDCConverter_factory)); + factory_map.emplace("cim:ACDCConverter", &ACDCConverter_factory); } void ACDCConverter::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.baseS"), &assign_ACDCConverter_baseS)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.idc"), &assign_ACDCConverter_idc)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.idleLoss"), &assign_ACDCConverter_idleLoss)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.maxUdc"), &assign_ACDCConverter_maxUdc)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.minUdc"), &assign_ACDCConverter_minUdc)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.numberOfValves"), &assign_ACDCConverter_numberOfValves)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.p"), &assign_ACDCConverter_p)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.poleLossP"), &assign_ACDCConverter_poleLossP)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.q"), &assign_ACDCConverter_q)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.ratedUdc"), &assign_ACDCConverter_ratedUdc)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.resistiveLoss"), &assign_ACDCConverter_resistiveLoss)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.switchingLoss"), &assign_ACDCConverter_switchingLoss)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.targetPpcc"), &assign_ACDCConverter_targetPpcc)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.targetUdc"), &assign_ACDCConverter_targetUdc)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.uc"), &assign_ACDCConverter_uc)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.udc"), &assign_ACDCConverter_udc)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.valveU0"), &assign_ACDCConverter_valveU0)); + assign_map.emplace("cim:ACDCConverter.baseS", &assign_ACDCConverter_baseS); + assign_map.emplace("cim:ACDCConverter.idc", &assign_ACDCConverter_idc); + assign_map.emplace("cim:ACDCConverter.idleLoss", &assign_ACDCConverter_idleLoss); + assign_map.emplace("cim:ACDCConverter.maxUdc", &assign_ACDCConverter_maxUdc); + assign_map.emplace("cim:ACDCConverter.minUdc", &assign_ACDCConverter_minUdc); + assign_map.emplace("cim:ACDCConverter.numberOfValves", &assign_ACDCConverter_numberOfValves); + assign_map.emplace("cim:ACDCConverter.p", &assign_ACDCConverter_p); + assign_map.emplace("cim:ACDCConverter.poleLossP", &assign_ACDCConverter_poleLossP); + assign_map.emplace("cim:ACDCConverter.q", &assign_ACDCConverter_q); + assign_map.emplace("cim:ACDCConverter.ratedUdc", &assign_ACDCConverter_ratedUdc); + assign_map.emplace("cim:ACDCConverter.resistiveLoss", &assign_ACDCConverter_resistiveLoss); + assign_map.emplace("cim:ACDCConverter.switchingLoss", &assign_ACDCConverter_switchingLoss); + assign_map.emplace("cim:ACDCConverter.targetPpcc", &assign_ACDCConverter_targetPpcc); + assign_map.emplace("cim:ACDCConverter.targetUdc", &assign_ACDCConverter_targetUdc); + assign_map.emplace("cim:ACDCConverter.uc", &assign_ACDCConverter_uc); + assign_map.emplace("cim:ACDCConverter.udc", &assign_ACDCConverter_udc); + assign_map.emplace("cim:ACDCConverter.valveU0", &assign_ACDCConverter_valveU0); } void ACDCConverter::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.DCTerminals"), &assign_ACDCConverter_DCTerminals)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.PccTerminal"), &assign_ACDCConverter_PccTerminal)); + assign_map.emplace("cim:ACDCConverter.DCTerminals", &assign_ACDCConverter_DCTerminals); + assign_map.emplace("cim:ACDCConverter.PccTerminal", &assign_ACDCConverter_PccTerminal); } void ACDCConverter::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/ACDCConverter.hpp b/CGMES_2.4.15_27JAN2020/ACDCConverter.hpp index cbef1099e..1621353d5 100644 --- a/CGMES_2.4.15_27JAN2020/ACDCConverter.hpp +++ b/CGMES_2.4.15_27JAN2020/ACDCConverter.hpp @@ -26,9 +26,7 @@ namespace CIMPP class ACDCConverterDCTerminal; class Terminal; - /* - A unit with valves for three phases, together with unit control equipment, essential protective and switching devices, DC storage capacitors, phase reactors and auxiliaries, if any, used for conversion. - */ + /** \brief A unit with valves for three phases, together with unit control equipment, essential protective and switching devices, DC storage capacitors, phase reactors and auxiliaries, if any, used for conversion. */ class ACDCConverter : public ConductingEquipment { public: @@ -36,25 +34,62 @@ namespace CIMPP ACDCConverter(); ~ACDCConverter() override; - std::list DCTerminals; /* Default: 0 */ - CIMPP::Terminal* PccTerminal; /* All converters` DC sides linked to this point of common coupling terminal. Default: 0 */ - CIMPP::ApparentPower baseS; /* Base apparent power of the converter pole. Default: nullptr */ - CIMPP::CurrentFlow idc; /* Converter DC current, also called Id. Converter state variable, result from power flow. Default: nullptr */ - CIMPP::ActivePower idleLoss; /* Active power loss in pole at no power transfer. Converter configuration data used in power flow. Default: nullptr */ - CIMPP::Voltage maxUdc; /* The maximum voltage on the DC side at which the converter should operate. Converter configuration data used in power flow. Default: nullptr */ - CIMPP::Voltage minUdc; /* Min allowed converter DC voltage. Converter configuration data used in power flow. Default: nullptr */ - CIMPP::Integer numberOfValves; /* Number of valves in the converter. Used in loss calculations. Default: 0 */ - CIMPP::ActivePower p; /* Active power at the point of common coupling. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution in the case a simplified power flow model is used. Default: nullptr */ - CIMPP::ActivePower poleLossP; /* The active power loss at a DC Pole = idleLoss + switchingLoss*|Idc| + resitiveLoss*Idc^2 For lossless operation Pdc=Pac For rectifier operation with losses Pdc=Pac-lossP For inverter operation with losses Pdc=Pac+lossP Converter state variable used in power flow. Default: nullptr */ - CIMPP::ReactivePower q; /* Reactive power at the point of common coupling. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution in the case a simplified power flow model is used. Default: nullptr */ - CIMPP::Voltage ratedUdc; /* Rated converter DC voltage, also called UdN. Converter configuration data used in power flow. Default: nullptr */ - CIMPP::Resistance resistiveLoss; /* Converter configuration data used in power flow. Refer to poleLossP. Default: nullptr */ - CIMPP::ActivePowerPerCurrentFlow switchingLoss; /* Switching losses, relative to the base apparent power `baseS`. Refer to poleLossP. Default: nullptr */ - CIMPP::ActivePower targetPpcc; /* Real power injection target in AC grid, at point of common coupling. Default: nullptr */ - CIMPP::Voltage targetUdc; /* Target value for DC voltage magnitude. Default: nullptr */ - CIMPP::Voltage uc; /* Converter voltage, the voltage at the AC side of the bridge. Converter state variable, result from power flow. Default: nullptr */ - CIMPP::Voltage udc; /* Converter voltage at the DC side, also called Ud. Converter state variable, result from power flow. Default: nullptr */ - CIMPP::Voltage valveU0; /* Valve threshold voltage. Forward voltage drop when the valve is conducting. Used in loss calculations, i.e. the switchLoss depend on numberOfValves * valveU0. Default: nullptr */ + /** \brief Default: 0 */ + std::list DCTerminals; + + /** \brief All converters` DC sides linked to this point of common coupling terminal. Default: 0 */ + CIMPP::Terminal* PccTerminal; + + /** \brief Base apparent power of the converter pole. Default: nullptr */ + CIMPP::ApparentPower baseS; + + /** \brief Converter DC current, also called Id. Converter state variable, result from power flow. Default: nullptr */ + CIMPP::CurrentFlow idc; + + /** \brief Active power loss in pole at no power transfer. Converter configuration data used in power flow. Default: nullptr */ + CIMPP::ActivePower idleLoss; + + /** \brief The maximum voltage on the DC side at which the converter should operate. Converter configuration data used in power flow. Default: nullptr */ + CIMPP::Voltage maxUdc; + + /** \brief Min allowed converter DC voltage. Converter configuration data used in power flow. Default: nullptr */ + CIMPP::Voltage minUdc; + + /** \brief Number of valves in the converter. Used in loss calculations. Default: 0 */ + CIMPP::Integer numberOfValves; + + /** \brief Active power at the point of common coupling. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution in the case a simplified power flow model is used. Default: nullptr */ + CIMPP::ActivePower p; + + /** \brief The active power loss at a DC Pole = idleLoss + switchingLoss*|Idc| + resitiveLoss*Idc^2 For lossless operation Pdc=Pac For rectifier operation with losses Pdc=Pac-lossP For inverter operation with losses Pdc=Pac+lossP Converter state variable used in power flow. Default: nullptr */ + CIMPP::ActivePower poleLossP; + + /** \brief Reactive power at the point of common coupling. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution in the case a simplified power flow model is used. Default: nullptr */ + CIMPP::ReactivePower q; + + /** \brief Rated converter DC voltage, also called UdN. Converter configuration data used in power flow. Default: nullptr */ + CIMPP::Voltage ratedUdc; + + /** \brief Converter configuration data used in power flow. Refer to poleLossP. Default: nullptr */ + CIMPP::Resistance resistiveLoss; + + /** \brief Switching losses, relative to the base apparent power `baseS`. Refer to poleLossP. Default: nullptr */ + CIMPP::ActivePowerPerCurrentFlow switchingLoss; + + /** \brief Real power injection target in AC grid, at point of common coupling. Default: nullptr */ + CIMPP::ActivePower targetPpcc; + + /** \brief Target value for DC voltage magnitude. Default: nullptr */ + CIMPP::Voltage targetUdc; + + /** \brief Converter voltage, the voltage at the AC side of the bridge. Converter state variable, result from power flow. Default: nullptr */ + CIMPP::Voltage uc; + + /** \brief Converter voltage at the DC side, also called Ud. Converter state variable, result from power flow. Default: nullptr */ + CIMPP::Voltage udc; + + /** \brief Valve threshold voltage. Forward voltage drop when the valve is conducting. Used in loss calculations, i.e. the switchLoss depend on numberOfValves * valveU0. Default: nullptr */ + CIMPP::Voltage valveU0; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ACDCConverterDCTerminal.cpp b/CGMES_2.4.15_27JAN2020/ACDCConverterDCTerminal.cpp index c524cfbe9..1f445f5c1 100644 --- a/CGMES_2.4.15_27JAN2020/ACDCConverterDCTerminal.cpp +++ b/CGMES_2.4.15_27JAN2020/ACDCConverterDCTerminal.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ACDCConverter.hpp" -#include "DCPolarityKind.hpp" using namespace CIMPP; -ACDCConverterDCTerminal::ACDCConverterDCTerminal() : DCConductingEquipment(nullptr) {}; -ACDCConverterDCTerminal::~ACDCConverterDCTerminal() {}; +ACDCConverterDCTerminal::ACDCConverterDCTerminal() : DCConductingEquipment(nullptr) {} +ACDCConverterDCTerminal::~ACDCConverterDCTerminal() {} static const std::list PossibleProfilesForClass = { @@ -44,21 +43,6 @@ ACDCConverterDCTerminal::getPossibleProfilesForAttributes() const return map; } - -bool assign_ACDCConverterDCTerminal_polarity(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ACDCConverterDCTerminal* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->polarity; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ACDCConverter_DCTerminals(BaseClass*, BaseClass*); bool assign_ACDCConverterDCTerminal_DCConductingEquipment(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -76,10 +60,24 @@ bool assign_ACDCConverterDCTerminal_DCConductingEquipment(BaseClass* BaseClass_p return false; } +bool assign_ACDCConverterDCTerminal_polarity(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + ACDCConverterDCTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->polarity; + if (!buffer.fail()) + { + return true; + } + } + return false; +} bool get_ACDCConverterDCTerminal_DCConductingEquipment(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ACDCConverterDCTerminal* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverterDCTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DCConductingEquipment != 0) { @@ -90,10 +88,10 @@ bool get_ACDCConverterDCTerminal_DCConductingEquipment(const BaseClass* BaseClas return false; } - bool get_ACDCConverterDCTerminal_polarity(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverterDCTerminal* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverterDCTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->polarity; if (!buffer.str().empty()) @@ -113,17 +111,17 @@ const char* ACDCConverterDCTerminal::debugString() const void ACDCConverterDCTerminal::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ACDCConverterDCTerminal"), &ACDCConverterDCTerminal_factory)); + factory_map.emplace("cim:ACDCConverterDCTerminal", &ACDCConverterDCTerminal_factory); } void ACDCConverterDCTerminal::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ACDCConverterDCTerminal.polarity"), &assign_ACDCConverterDCTerminal_polarity)); + assign_map.emplace("cim:ACDCConverterDCTerminal.polarity", &assign_ACDCConverterDCTerminal_polarity); } void ACDCConverterDCTerminal::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ACDCConverterDCTerminal.DCConductingEquipment"), &assign_ACDCConverterDCTerminal_DCConductingEquipment)); + assign_map.emplace("cim:ACDCConverterDCTerminal.DCConductingEquipment", &assign_ACDCConverterDCTerminal_DCConductingEquipment); } void ACDCConverterDCTerminal::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/ACDCConverterDCTerminal.hpp b/CGMES_2.4.15_27JAN2020/ACDCConverterDCTerminal.hpp index 432be1cfd..f8cebc33a 100644 --- a/CGMES_2.4.15_27JAN2020/ACDCConverterDCTerminal.hpp +++ b/CGMES_2.4.15_27JAN2020/ACDCConverterDCTerminal.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ACDCConverter; - /* - A DC electrical connection point at the AC/DC converter. The AC/DC converter is electrically connected also to the AC side. The AC connection is inherited from the AC conducting equipment in the same way as any other AC equipment. The AC/DC converter DC terminal is separate from generic DC terminal to restrict the connection with the AC side to AC/DC converter and so that no other DC conducting equipment can be connected to the AC side. - */ + /** \brief A DC electrical connection point at the AC/DC converter. The AC/DC converter is electrically connected also to the AC side. The AC connection is inherited from the AC conducting equipment in the same way as any other AC equipment. The AC/DC converter DC terminal is separate from generic DC terminal to restrict the connection with the AC side to AC/DC converter and so that no other DC conducting equipment can be connected to the AC side. */ class ACDCConverterDCTerminal : public DCBaseTerminal { public: @@ -28,8 +26,11 @@ namespace CIMPP ACDCConverterDCTerminal(); ~ACDCConverterDCTerminal() override; - CIMPP::ACDCConverter* DCConductingEquipment; /* Default: 0 */ - CIMPP::DCPolarityKind polarity; /* Represents the normal network polarity condition. Default: 0 */ + /** \brief Default: 0 */ + CIMPP::ACDCConverter* DCConductingEquipment; + + /** \brief Represents the normal network polarity condition. Default: 0 */ + CIMPP::DCPolarityKind polarity; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ACDCTerminal.cpp b/CGMES_2.4.15_27JAN2020/ACDCTerminal.cpp index 8220bb67b..d4cc5c048 100644 --- a/CGMES_2.4.15_27JAN2020/ACDCTerminal.cpp +++ b/CGMES_2.4.15_27JAN2020/ACDCTerminal.cpp @@ -11,13 +11,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "BusNameMarker.hpp" #include "Measurement.hpp" #include "OperationalLimitSet.hpp" -#include "Boolean.hpp" -#include "Integer.hpp" using namespace CIMPP; -ACDCTerminal::ACDCTerminal() : BusNameMarker(nullptr) {}; -ACDCTerminal::~ACDCTerminal() {}; +ACDCTerminal::ACDCTerminal() : BusNameMarker(nullptr) {} +ACDCTerminal::~ACDCTerminal() {} static const std::list PossibleProfilesForClass = { @@ -52,34 +50,6 @@ ACDCTerminal::getPossibleProfilesForAttributes() const return map; } - -bool assign_ACDCTerminal_connected(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ACDCTerminal* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->connected; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_ACDCTerminal_sequenceNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ACDCTerminal* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->sequenceNumber; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_BusNameMarker_Terminal(BaseClass*, BaseClass*); bool assign_ACDCTerminal_BusNameMarker(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -96,6 +66,7 @@ bool assign_ACDCTerminal_BusNameMarker(BaseClass* BaseClass_ptr1, BaseClass* Bas } return false; } + bool assign_Measurement_Terminal(BaseClass*, BaseClass*); bool assign_ACDCTerminal_Measurements(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -112,6 +83,7 @@ bool assign_ACDCTerminal_Measurements(BaseClass* BaseClass_ptr1, BaseClass* Base } return false; } + bool assign_OperationalLimitSet_Terminal(BaseClass*, BaseClass*); bool assign_ACDCTerminal_OperationalLimitSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -129,38 +101,38 @@ bool assign_ACDCTerminal_OperationalLimitSet(BaseClass* BaseClass_ptr1, BaseClas return false; } -bool get_ACDCTerminal_connected(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_ACDCTerminal_connected(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const ACDCTerminal* element = dynamic_cast(BaseClass_ptr1)) + ACDCTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->connected; - if (!buffer.str().empty()) + buffer >> element->connected; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_ACDCTerminal_sequenceNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_ACDCTerminal_sequenceNumber(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const ACDCTerminal* element = dynamic_cast(BaseClass_ptr1)) + ACDCTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->sequenceNumber; - if (!buffer.str().empty()) + buffer >> element->sequenceNumber; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_ACDCTerminal_BusNameMarker(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ACDCTerminal* element = dynamic_cast(BaseClass_ptr1)) + const ACDCTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->BusNameMarker != 0) { @@ -172,6 +144,37 @@ bool get_ACDCTerminal_BusNameMarker(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->connected; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_ACDCTerminal_sequenceNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ACDCTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->sequenceNumber; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + const char ACDCTerminal::debugName[] = "ACDCTerminal"; const char* ACDCTerminal::debugString() const { @@ -180,20 +183,20 @@ const char* ACDCTerminal::debugString() const void ACDCTerminal::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ACDCTerminal"), &ACDCTerminal_factory)); + factory_map.emplace("cim:ACDCTerminal", &ACDCTerminal_factory); } void ACDCTerminal::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ACDCTerminal.connected"), &assign_ACDCTerminal_connected)); - assign_map.insert(std::make_pair(std::string("cim:ACDCTerminal.sequenceNumber"), &assign_ACDCTerminal_sequenceNumber)); + assign_map.emplace("cim:ACDCTerminal.connected", &assign_ACDCTerminal_connected); + assign_map.emplace("cim:ACDCTerminal.sequenceNumber", &assign_ACDCTerminal_sequenceNumber); } void ACDCTerminal::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ACDCTerminal.BusNameMarker"), &assign_ACDCTerminal_BusNameMarker)); - assign_map.insert(std::make_pair(std::string("cim:ACDCTerminal.Measurements"), &assign_ACDCTerminal_Measurements)); - assign_map.insert(std::make_pair(std::string("cim:ACDCTerminal.OperationalLimitSet"), &assign_ACDCTerminal_OperationalLimitSet)); + assign_map.emplace("cim:ACDCTerminal.BusNameMarker", &assign_ACDCTerminal_BusNameMarker); + assign_map.emplace("cim:ACDCTerminal.Measurements", &assign_ACDCTerminal_Measurements); + assign_map.emplace("cim:ACDCTerminal.OperationalLimitSet", &assign_ACDCTerminal_OperationalLimitSet); } void ACDCTerminal::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/ACDCTerminal.hpp b/CGMES_2.4.15_27JAN2020/ACDCTerminal.hpp index 6dcc095d5..ed29f46b5 100644 --- a/CGMES_2.4.15_27JAN2020/ACDCTerminal.hpp +++ b/CGMES_2.4.15_27JAN2020/ACDCTerminal.hpp @@ -21,9 +21,7 @@ namespace CIMPP class Measurement; class OperationalLimitSet; - /* - An electrical connection point (AC or DC) to a piece of conducting equipment. Terminals are connected at physical connection points called connectivity nodes. - */ + /** \brief An electrical connection point (AC or DC) to a piece of conducting equipment. Terminals are connected at physical connection points called connectivity nodes. */ class ACDCTerminal : public IdentifiedObject { public: @@ -31,11 +29,20 @@ namespace CIMPP ACDCTerminal(); ~ACDCTerminal() override; - CIMPP::BusNameMarker* BusNameMarker; /* The bus name marker used to name the bus (topological node). Default: 0 */ - std::list Measurements; /* Measurements associated with this terminal defining where the measurement is placed in the network topology. It may be used, for instance, to capture the sensor position, such as a voltage transformer (PT) at a busbar or a current transformer (CT) at the bar between a breaker and an isolator. Default: 0 */ - std::list OperationalLimitSet; /* Default: 0 */ - CIMPP::Boolean connected; /* The connected status is related to a bus-branch model and the topological node to terminal relation. True implies the terminal is connected to the related topological node and false implies it is not. In a bus-branch model, the connected status is used to tell if equipment is disconnected without having to change the connectivity described by the topological node to terminal relation. A valid case is that conducting equipment can be connected in one end and open in the other. In particular for an AC line segment, where the reactive line charging can be significant, this is a relevant case. Default: false */ - CIMPP::Integer sequenceNumber; /* The orientation of the terminal connections for a multiple terminal conducting equipment. The sequence numbering starts with 1 and additional terminals should follow in increasing order. The first terminal is the `starting point` for a two terminal branch. Default: 0 */ + /** \brief The bus name marker used to name the bus (topological node). Default: 0 */ + CIMPP::BusNameMarker* BusNameMarker; + + /** \brief Measurements associated with this terminal defining where the measurement is placed in the network topology. It may be used, for instance, to capture the sensor position, such as a voltage transformer (PT) at a busbar or a current transformer (CT) at the bar between a breaker and an isolator. Default: 0 */ + std::list Measurements; + + /** \brief Default: 0 */ + std::list OperationalLimitSet; + + /** \brief The connected status is related to a bus-branch model and the topological node to terminal relation. True implies the terminal is connected to the related topological node and false implies it is not. In a bus-branch model, the connected status is used to tell if equipment is disconnected without having to change the connectivity described by the topological node to terminal relation. A valid case is that conducting equipment can be connected in one end and open in the other. In particular for an AC line segment, where the reactive line charging can be significant, this is a relevant case. Default: false */ + CIMPP::Boolean connected; + + /** \brief The orientation of the terminal connections for a multiple terminal conducting equipment. The sequence numbering starts with 1 and additional terminals should follow in increasing order. The first terminal is the `starting point` for a two terminal branch. Default: 0 */ + CIMPP::Integer sequenceNumber; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ACLineSegment.cpp b/CGMES_2.4.15_27JAN2020/ACLineSegment.cpp index fb7cbca77..baecc7103 100644 --- a/CGMES_2.4.15_27JAN2020/ACLineSegment.cpp +++ b/CGMES_2.4.15_27JAN2020/ACLineSegment.cpp @@ -8,20 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Susceptance.hpp" -#include "Susceptance.hpp" -#include "Conductance.hpp" -#include "Conductance.hpp" -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "Temperature.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -ACLineSegment::ACLineSegment() {}; -ACLineSegment::~ACLineSegment() {}; +ACLineSegment::ACLineSegment() {} +ACLineSegment::~ACLineSegment() {} static const std::list PossibleProfilesForClass = { @@ -56,129 +47,136 @@ ACLineSegment::getPossibleProfilesForAttributes() const return map; } - -bool assign_ACLineSegment_b0ch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACLineSegment_b0ch(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b0ch; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACLineSegment_bch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACLineSegment_bch(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bch; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACLineSegment_g0ch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACLineSegment_g0ch(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g0ch; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACLineSegment_gch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACLineSegment_gch(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gch; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACLineSegment_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACLineSegment_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACLineSegment_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACLineSegment_r0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACLineSegment_shortCircuitEndTemperature(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACLineSegment_shortCircuitEndTemperature(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->shortCircuitEndTemperature; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACLineSegment_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACLineSegment_x(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACLineSegment_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACLineSegment_x0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ACLineSegment_b0ch(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b0ch; if (!buffer.str().empty()) @@ -192,7 +190,8 @@ bool get_ACLineSegment_b0ch(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ACLineSegment_bch(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bch; if (!buffer.str().empty()) @@ -206,7 +205,8 @@ bool get_ACLineSegment_bch(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ACLineSegment_g0ch(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g0ch; if (!buffer.str().empty()) @@ -220,7 +220,8 @@ bool get_ACLineSegment_g0ch(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ACLineSegment_gch(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gch; if (!buffer.str().empty()) @@ -234,7 +235,8 @@ bool get_ACLineSegment_gch(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ACLineSegment_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -248,7 +250,8 @@ bool get_ACLineSegment_r(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ACLineSegment_r0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r0; if (!buffer.str().empty()) @@ -262,7 +265,8 @@ bool get_ACLineSegment_r0(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ACLineSegment_shortCircuitEndTemperature(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortCircuitEndTemperature; if (!buffer.str().empty()) @@ -276,7 +280,8 @@ bool get_ACLineSegment_shortCircuitEndTemperature(const BaseClass* BaseClass_ptr bool get_ACLineSegment_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x; if (!buffer.str().empty()) @@ -290,7 +295,8 @@ bool get_ACLineSegment_x(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ACLineSegment_x0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x0; if (!buffer.str().empty()) @@ -302,8 +308,6 @@ bool get_ACLineSegment_x0(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char ACLineSegment::debugName[] = "ACLineSegment"; const char* ACLineSegment::debugString() const { @@ -312,20 +316,20 @@ const char* ACLineSegment::debugString() const void ACLineSegment::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ACLineSegment"), &ACLineSegment_factory)); + factory_map.emplace("cim:ACLineSegment", &ACLineSegment_factory); } void ACLineSegment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.b0ch"), &assign_ACLineSegment_b0ch)); - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.bch"), &assign_ACLineSegment_bch)); - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.g0ch"), &assign_ACLineSegment_g0ch)); - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.gch"), &assign_ACLineSegment_gch)); - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.r"), &assign_ACLineSegment_r)); - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.r0"), &assign_ACLineSegment_r0)); - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.shortCircuitEndTemperature"), &assign_ACLineSegment_shortCircuitEndTemperature)); - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.x"), &assign_ACLineSegment_x)); - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.x0"), &assign_ACLineSegment_x0)); + assign_map.emplace("cim:ACLineSegment.b0ch", &assign_ACLineSegment_b0ch); + assign_map.emplace("cim:ACLineSegment.bch", &assign_ACLineSegment_bch); + assign_map.emplace("cim:ACLineSegment.g0ch", &assign_ACLineSegment_g0ch); + assign_map.emplace("cim:ACLineSegment.gch", &assign_ACLineSegment_gch); + assign_map.emplace("cim:ACLineSegment.r", &assign_ACLineSegment_r); + assign_map.emplace("cim:ACLineSegment.r0", &assign_ACLineSegment_r0); + assign_map.emplace("cim:ACLineSegment.shortCircuitEndTemperature", &assign_ACLineSegment_shortCircuitEndTemperature); + assign_map.emplace("cim:ACLineSegment.x", &assign_ACLineSegment_x); + assign_map.emplace("cim:ACLineSegment.x0", &assign_ACLineSegment_x0); } void ACLineSegment::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ACLineSegment.hpp b/CGMES_2.4.15_27JAN2020/ACLineSegment.hpp index f03651a21..21be2e6c6 100644 --- a/CGMES_2.4.15_27JAN2020/ACLineSegment.hpp +++ b/CGMES_2.4.15_27JAN2020/ACLineSegment.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A wire or combination of wires, with consistent electrical characteristics, building a single electrical system, used to carry alternating current between points in the power system. For symmetrical, transposed 3ph lines, it is sufficient to use attributes of the line segment, which describe impedances and admittances for the entire length of the segment. Additionally impedances can be computed by using length and associated per length impedances. The BaseVoltage at the two ends of ACLineSegments in a Line shall have the same BaseVoltage.nominalVoltage. However, boundary lines may have slightly different BaseVoltage.nominalVoltages and variation is allowed. Larger voltage difference in general requires use of an equivalent branch. - */ + /** \brief A wire or combination of wires, with consistent electrical characteristics, building a single electrical system, used to carry alternating current between points in the power system. For symmetrical, transposed 3ph lines, it is sufficient to use attributes of the line segment, which describe impedances and admittances for the entire length of the segment. Additionally impedances can be computed by using length and associated per length impedances. The BaseVoltage at the two ends of ACLineSegments in a Line shall have the same BaseVoltage.nominalVoltage. However, boundary lines may have slightly different BaseVoltage.nominalVoltages and variation is allowed. Larger voltage difference in general requires use of an equivalent branch. */ class ACLineSegment : public Conductor { public: @@ -31,15 +29,32 @@ namespace CIMPP ACLineSegment(); ~ACLineSegment() override; - CIMPP::Susceptance b0ch; /* Zero sequence shunt (charging) susceptance, uniformly distributed, of the entire line section. Default: nullptr */ - CIMPP::Susceptance bch; /* Positive sequence shunt (charging) susceptance, uniformly distributed, of the entire line section. This value represents the full charging over the full length of the line. Default: nullptr */ - CIMPP::Conductance g0ch; /* Zero sequence shunt (charging) conductance, uniformly distributed, of the entire line section. Default: nullptr */ - CIMPP::Conductance gch; /* Positive sequence shunt (charging) conductance, uniformly distributed, of the entire line section. Default: nullptr */ - CIMPP::Resistance r; /* Positive sequence series resistance of the entire line section. Default: nullptr */ - CIMPP::Resistance r0; /* Zero sequence series resistance of the entire line section. Default: nullptr */ - CIMPP::Temperature shortCircuitEndTemperature; /* Maximum permitted temperature at the end of SC for the calculation of minimum short-circuit currents. Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::Reactance x; /* Positive sequence series reactance of the entire line section. Default: nullptr */ - CIMPP::Reactance x0; /* Zero sequence series reactance of the entire line section. Default: nullptr */ + /** \brief Zero sequence shunt (charging) susceptance, uniformly distributed, of the entire line section. Default: nullptr */ + CIMPP::Susceptance b0ch; + + /** \brief Positive sequence shunt (charging) susceptance, uniformly distributed, of the entire line section. This value represents the full charging over the full length of the line. Default: nullptr */ + CIMPP::Susceptance bch; + + /** \brief Zero sequence shunt (charging) conductance, uniformly distributed, of the entire line section. Default: nullptr */ + CIMPP::Conductance g0ch; + + /** \brief Positive sequence shunt (charging) conductance, uniformly distributed, of the entire line section. Default: nullptr */ + CIMPP::Conductance gch; + + /** \brief Positive sequence series resistance of the entire line section. Default: nullptr */ + CIMPP::Resistance r; + + /** \brief Zero sequence series resistance of the entire line section. Default: nullptr */ + CIMPP::Resistance r0; + + /** \brief Maximum permitted temperature at the end of SC for the calculation of minimum short-circuit currents. Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::Temperature shortCircuitEndTemperature; + + /** \brief Positive sequence series reactance of the entire line section. Default: nullptr */ + CIMPP::Reactance x; + + /** \brief Zero sequence series reactance of the entire line section. Default: nullptr */ + CIMPP::Reactance x0; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Accumulator.cpp b/CGMES_2.4.15_27JAN2020/Accumulator.cpp index accb2f53f..0f56cb3a0 100644 --- a/CGMES_2.4.15_27JAN2020/Accumulator.cpp +++ b/CGMES_2.4.15_27JAN2020/Accumulator.cpp @@ -8,13 +8,13 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "AccumulatorValue.hpp" #include "AccumulatorLimitSet.hpp" +#include "AccumulatorValue.hpp" using namespace CIMPP; -Accumulator::Accumulator() {}; -Accumulator::~Accumulator() {}; +Accumulator::Accumulator() {} +Accumulator::~Accumulator() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ Accumulator::getPossibleProfilesForAttributes() const return map; } - - bool assign_AccumulatorValue_Accumulator(BaseClass*, BaseClass*); bool assign_Accumulator_AccumulatorValues(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_Accumulator_AccumulatorValues(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_AccumulatorLimitSet_Measurements(BaseClass*, BaseClass*); bool assign_Accumulator_LimitSets(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -87,7 +86,7 @@ const char* Accumulator::debugString() const void Accumulator::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Accumulator"), &Accumulator_factory)); + factory_map.emplace("cim:Accumulator", &Accumulator_factory); } void Accumulator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -96,8 +95,8 @@ void Accumulator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Accumulator.AccumulatorValues"), &assign_Accumulator_AccumulatorValues)); - assign_map.insert(std::make_pair(std::string("cim:Accumulator.LimitSets"), &assign_Accumulator_LimitSets)); + assign_map.emplace("cim:Accumulator.AccumulatorValues", &assign_Accumulator_AccumulatorValues); + assign_map.emplace("cim:Accumulator.LimitSets", &assign_Accumulator_LimitSets); } void Accumulator::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/Accumulator.hpp b/CGMES_2.4.15_27JAN2020/Accumulator.hpp index 4d851c20d..0ea3177cb 100644 --- a/CGMES_2.4.15_27JAN2020/Accumulator.hpp +++ b/CGMES_2.4.15_27JAN2020/Accumulator.hpp @@ -18,9 +18,7 @@ namespace CIMPP class AccumulatorLimitSet; class AccumulatorValue; - /* - Accumulator represents an accumulated (counted) Measurement, e.g. an energy value. - */ + /** \brief Accumulator represents an accumulated (counted) Measurement, e.g. an energy value. */ class Accumulator : public Measurement { public: @@ -28,8 +26,11 @@ namespace CIMPP Accumulator(); ~Accumulator() override; - std::list AccumulatorValues; /* Measurement to which this value is connected. Default: 0 */ - std::list LimitSets; /* The Measurements using the LimitSet. Default: 0 */ + /** \brief Measurement to which this value is connected. Default: 0 */ + std::list AccumulatorValues; + + /** \brief The Measurements using the LimitSet. Default: 0 */ + std::list LimitSets; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/AccumulatorLimit.cpp b/CGMES_2.4.15_27JAN2020/AccumulatorLimit.cpp index f876fc8c7..f04f7dc98 100644 --- a/CGMES_2.4.15_27JAN2020/AccumulatorLimit.cpp +++ b/CGMES_2.4.15_27JAN2020/AccumulatorLimit.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "AccumulatorLimitSet.hpp" -#include "Integer.hpp" using namespace CIMPP; -AccumulatorLimit::AccumulatorLimit() : LimitSet(nullptr) {}; -AccumulatorLimit::~AccumulatorLimit() {}; +AccumulatorLimit::AccumulatorLimit() : LimitSet(nullptr) {} +AccumulatorLimit::~AccumulatorLimit() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ AccumulatorLimit::getPossibleProfilesForAttributes() const return map; } - -bool assign_AccumulatorLimit_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (AccumulatorLimit* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->value; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_AccumulatorLimitSet_Limits(BaseClass*, BaseClass*); bool assign_AccumulatorLimit_LimitSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_AccumulatorLimit_LimitSet(BaseClass* BaseClass_ptr1, BaseClass* Base return false; } -bool get_AccumulatorLimit_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_AccumulatorLimit_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const AccumulatorLimit* element = dynamic_cast(BaseClass_ptr1)) + AccumulatorLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->value; - if (!buffer.str().empty()) + buffer >> element->value; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_AccumulatorLimit_LimitSet(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AccumulatorLimit* element = dynamic_cast(BaseClass_ptr1)) + const AccumulatorLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->LimitSet != 0) { @@ -102,6 +86,20 @@ bool get_AccumulatorLimit_LimitSet(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->value; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char AccumulatorLimit::debugName[] = "AccumulatorLimit"; const char* AccumulatorLimit::debugString() const @@ -111,17 +109,17 @@ const char* AccumulatorLimit::debugString() const void AccumulatorLimit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AccumulatorLimit"), &AccumulatorLimit_factory)); + factory_map.emplace("cim:AccumulatorLimit", &AccumulatorLimit_factory); } void AccumulatorLimit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AccumulatorLimit.value"), &assign_AccumulatorLimit_value)); + assign_map.emplace("cim:AccumulatorLimit.value", &assign_AccumulatorLimit_value); } void AccumulatorLimit::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AccumulatorLimit.LimitSet"), &assign_AccumulatorLimit_LimitSet)); + assign_map.emplace("cim:AccumulatorLimit.LimitSet", &assign_AccumulatorLimit_LimitSet); } void AccumulatorLimit::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/AccumulatorLimit.hpp b/CGMES_2.4.15_27JAN2020/AccumulatorLimit.hpp index d64fc8fab..e49dffefb 100644 --- a/CGMES_2.4.15_27JAN2020/AccumulatorLimit.hpp +++ b/CGMES_2.4.15_27JAN2020/AccumulatorLimit.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class AccumulatorLimitSet; - /* - Limit values for Accumulator measurements. - */ + /** \brief Limit values for Accumulator measurements. */ class AccumulatorLimit : public Limit { public: @@ -28,8 +26,11 @@ namespace CIMPP AccumulatorLimit(); ~AccumulatorLimit() override; - CIMPP::AccumulatorLimitSet* LimitSet; /* The limit values used for supervision of Measurements. Default: 0 */ - CIMPP::Integer value; /* The value to supervise against. The value is positive. Default: 0 */ + /** \brief The limit values used for supervision of Measurements. Default: 0 */ + CIMPP::AccumulatorLimitSet* LimitSet; + + /** \brief The value to supervise against. The value is positive. Default: 0 */ + CIMPP::Integer value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/AccumulatorLimitSet.cpp b/CGMES_2.4.15_27JAN2020/AccumulatorLimitSet.cpp index 2d49d0a1f..d67146814 100644 --- a/CGMES_2.4.15_27JAN2020/AccumulatorLimitSet.cpp +++ b/CGMES_2.4.15_27JAN2020/AccumulatorLimitSet.cpp @@ -8,13 +8,13 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "AccumulatorLimit.hpp" #include "Accumulator.hpp" +#include "AccumulatorLimit.hpp" using namespace CIMPP; -AccumulatorLimitSet::AccumulatorLimitSet() {}; -AccumulatorLimitSet::~AccumulatorLimitSet() {}; +AccumulatorLimitSet::AccumulatorLimitSet() {} +AccumulatorLimitSet::~AccumulatorLimitSet() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ AccumulatorLimitSet::getPossibleProfilesForAttributes() const return map; } - - bool assign_AccumulatorLimit_LimitSet(BaseClass*, BaseClass*); bool assign_AccumulatorLimitSet_Limits(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_AccumulatorLimitSet_Limits(BaseClass* BaseClass_ptr1, BaseClass* Bas } return false; } + bool assign_Accumulator_LimitSets(BaseClass*, BaseClass*); bool assign_AccumulatorLimitSet_Measurements(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -80,7 +79,8 @@ bool assign_AccumulatorLimitSet_Measurements(BaseClass* BaseClass_ptr1, BaseClas bool get_AccumulatorLimitSet_Measurements(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AccumulatorLimitSet* element = dynamic_cast(BaseClass_ptr1)) + const AccumulatorLimitSet* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { std::copy(element->Measurements.begin(), element->Measurements.end(), std::back_inserter(BaseClass_list)); return !BaseClass_list.empty(); @@ -88,7 +88,6 @@ bool get_AccumulatorLimitSet_Measurements(const BaseClass* BaseClass_ptr1, std:: return false; } - const char AccumulatorLimitSet::debugName[] = "AccumulatorLimitSet"; const char* AccumulatorLimitSet::debugString() const { @@ -97,7 +96,7 @@ const char* AccumulatorLimitSet::debugString() const void AccumulatorLimitSet::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AccumulatorLimitSet"), &AccumulatorLimitSet_factory)); + factory_map.emplace("cim:AccumulatorLimitSet", &AccumulatorLimitSet_factory); } void AccumulatorLimitSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -106,8 +105,8 @@ void AccumulatorLimitSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AccumulatorLimitSet.Limits"), &assign_AccumulatorLimitSet_Limits)); - assign_map.insert(std::make_pair(std::string("cim:AccumulatorLimitSet.Measurements"), &assign_AccumulatorLimitSet_Measurements)); + assign_map.emplace("cim:AccumulatorLimitSet.Limits", &assign_AccumulatorLimitSet_Limits); + assign_map.emplace("cim:AccumulatorLimitSet.Measurements", &assign_AccumulatorLimitSet_Measurements); } void AccumulatorLimitSet::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/AccumulatorLimitSet.hpp b/CGMES_2.4.15_27JAN2020/AccumulatorLimitSet.hpp index a914ab48a..3da387ef1 100644 --- a/CGMES_2.4.15_27JAN2020/AccumulatorLimitSet.hpp +++ b/CGMES_2.4.15_27JAN2020/AccumulatorLimitSet.hpp @@ -18,9 +18,7 @@ namespace CIMPP class Accumulator; class AccumulatorLimit; - /* - An AccumulatorLimitSet specifies a set of Limits that are associated with an Accumulator measurement. - */ + /** \brief An AccumulatorLimitSet specifies a set of Limits that are associated with an Accumulator measurement. */ class AccumulatorLimitSet : public LimitSet { public: @@ -28,8 +26,11 @@ namespace CIMPP AccumulatorLimitSet(); ~AccumulatorLimitSet() override; - std::list Limits; /* The set of limits. Default: 0 */ - std::list Measurements; /* A measurement may have zero or more limit ranges defined for it. Default: 0 */ + /** \brief The set of limits. Default: 0 */ + std::list Limits; + + /** \brief A measurement may have zero or more limit ranges defined for it. Default: 0 */ + std::list Measurements; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/AccumulatorReset.cpp b/CGMES_2.4.15_27JAN2020/AccumulatorReset.cpp index 4fcaaba29..ae3e698db 100644 --- a/CGMES_2.4.15_27JAN2020/AccumulatorReset.cpp +++ b/CGMES_2.4.15_27JAN2020/AccumulatorReset.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -AccumulatorReset::AccumulatorReset() : AccumulatorValue(nullptr) {}; -AccumulatorReset::~AccumulatorReset() {}; +AccumulatorReset::AccumulatorReset() : AccumulatorValue(nullptr) {} +AccumulatorReset::~AccumulatorReset() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ AccumulatorReset::getPossibleProfilesForAttributes() const return map; } - - bool assign_AccumulatorValue_AccumulatorReset(BaseClass*, BaseClass*); bool assign_AccumulatorReset_AccumulatorValue(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_AccumulatorReset_AccumulatorValue(BaseClass* BaseClass_ptr1, BaseCla return false; } - bool get_AccumulatorReset_AccumulatorValue(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AccumulatorReset* element = dynamic_cast(BaseClass_ptr1)) + const AccumulatorReset* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->AccumulatorValue != 0) { @@ -73,7 +71,6 @@ bool get_AccumulatorReset_AccumulatorValue(const BaseClass* BaseClass_ptr1, std: return false; } - const char AccumulatorReset::debugName[] = "AccumulatorReset"; const char* AccumulatorReset::debugString() const { @@ -82,7 +79,7 @@ const char* AccumulatorReset::debugString() const void AccumulatorReset::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AccumulatorReset"), &AccumulatorReset_factory)); + factory_map.emplace("cim:AccumulatorReset", &AccumulatorReset_factory); } void AccumulatorReset::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void AccumulatorReset::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AccumulatorReset.AccumulatorValue"), &assign_AccumulatorReset_AccumulatorValue)); + assign_map.emplace("cim:AccumulatorReset.AccumulatorValue", &assign_AccumulatorReset_AccumulatorValue); } void AccumulatorReset::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/AccumulatorReset.hpp b/CGMES_2.4.15_27JAN2020/AccumulatorReset.hpp index d474cb11c..8c35f6e44 100644 --- a/CGMES_2.4.15_27JAN2020/AccumulatorReset.hpp +++ b/CGMES_2.4.15_27JAN2020/AccumulatorReset.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class AccumulatorValue; - /* - This command reset the counter value to zero. - */ + /** \brief This command reset the counter value to zero. */ class AccumulatorReset : public Control { public: @@ -27,7 +25,8 @@ namespace CIMPP AccumulatorReset(); ~AccumulatorReset() override; - CIMPP::AccumulatorValue* AccumulatorValue; /* The accumulator value that is reset by the command. Default: 0 */ + /** \brief The accumulator value that is reset by the command. Default: 0 */ + CIMPP::AccumulatorValue* AccumulatorValue; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/AccumulatorValue.cpp b/CGMES_2.4.15_27JAN2020/AccumulatorValue.cpp index b26655b9b..7311c3091 100644 --- a/CGMES_2.4.15_27JAN2020/AccumulatorValue.cpp +++ b/CGMES_2.4.15_27JAN2020/AccumulatorValue.cpp @@ -10,12 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "Accumulator.hpp" #include "AccumulatorReset.hpp" -#include "Integer.hpp" using namespace CIMPP; -AccumulatorValue::AccumulatorValue() : Accumulator(nullptr), AccumulatorReset(nullptr) {}; -AccumulatorValue::~AccumulatorValue() {}; +AccumulatorValue::AccumulatorValue() : Accumulator(nullptr), AccumulatorReset(nullptr) {} +AccumulatorValue::~AccumulatorValue() {} static const std::list PossibleProfilesForClass = { @@ -44,21 +43,6 @@ AccumulatorValue::getPossibleProfilesForAttributes() const return map; } - -bool assign_AccumulatorValue_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (AccumulatorValue* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->value; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_Accumulator_AccumulatorValues(BaseClass*, BaseClass*); bool assign_AccumulatorValue_Accumulator(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -75,6 +59,7 @@ bool assign_AccumulatorValue_Accumulator(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_AccumulatorReset_AccumulatorValue(BaseClass*, BaseClass*); bool assign_AccumulatorValue_AccumulatorReset(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -92,24 +77,24 @@ bool assign_AccumulatorValue_AccumulatorReset(BaseClass* BaseClass_ptr1, BaseCla return false; } -bool get_AccumulatorValue_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_AccumulatorValue_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const AccumulatorValue* element = dynamic_cast(BaseClass_ptr1)) + AccumulatorValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->value; - if (!buffer.str().empty()) + buffer >> element->value; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_AccumulatorValue_Accumulator(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AccumulatorValue* element = dynamic_cast(BaseClass_ptr1)) + const AccumulatorValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Accumulator != 0) { @@ -121,6 +106,21 @@ bool get_AccumulatorValue_Accumulator(const BaseClass* BaseClass_ptr1, std::list } +bool get_AccumulatorValue_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const AccumulatorValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->value; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + const char AccumulatorValue::debugName[] = "AccumulatorValue"; const char* AccumulatorValue::debugString() const { @@ -129,18 +129,18 @@ const char* AccumulatorValue::debugString() const void AccumulatorValue::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AccumulatorValue"), &AccumulatorValue_factory)); + factory_map.emplace("cim:AccumulatorValue", &AccumulatorValue_factory); } void AccumulatorValue::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AccumulatorValue.value"), &assign_AccumulatorValue_value)); + assign_map.emplace("cim:AccumulatorValue.value", &assign_AccumulatorValue_value); } void AccumulatorValue::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AccumulatorValue.Accumulator"), &assign_AccumulatorValue_Accumulator)); - assign_map.insert(std::make_pair(std::string("cim:AccumulatorValue.AccumulatorReset"), &assign_AccumulatorValue_AccumulatorReset)); + assign_map.emplace("cim:AccumulatorValue.Accumulator", &assign_AccumulatorValue_Accumulator); + assign_map.emplace("cim:AccumulatorValue.AccumulatorReset", &assign_AccumulatorValue_AccumulatorReset); } void AccumulatorValue::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/AccumulatorValue.hpp b/CGMES_2.4.15_27JAN2020/AccumulatorValue.hpp index 715cf4a55..3a573eb45 100644 --- a/CGMES_2.4.15_27JAN2020/AccumulatorValue.hpp +++ b/CGMES_2.4.15_27JAN2020/AccumulatorValue.hpp @@ -19,9 +19,7 @@ namespace CIMPP class Accumulator; class AccumulatorReset; - /* - AccumulatorValue represents an accumulated (counted) MeasurementValue. - */ + /** \brief AccumulatorValue represents an accumulated (counted) MeasurementValue. */ class AccumulatorValue : public MeasurementValue { public: @@ -29,9 +27,14 @@ namespace CIMPP AccumulatorValue(); ~AccumulatorValue() override; - CIMPP::Accumulator* Accumulator; /* The values connected to this measurement. Default: 0 */ - CIMPP::AccumulatorReset* AccumulatorReset; /* The command that reset the accumulator value. Default: 0 */ - CIMPP::Integer value; /* The value to supervise. The value is positive. Default: 0 */ + /** \brief The values connected to this measurement. Default: 0 */ + CIMPP::Accumulator* Accumulator; + + /** \brief The command that reset the accumulator value. Default: 0 */ + CIMPP::AccumulatorReset* AccumulatorReset; + + /** \brief The value to supervise. The value is positive. Default: 0 */ + CIMPP::Integer value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ActivePower.hpp b/CGMES_2.4.15_27JAN2020/ActivePower.hpp index d1a142af8..37f33d93d 100644 --- a/CGMES_2.4.15_27JAN2020/ActivePower.hpp +++ b/CGMES_2.4.15_27JAN2020/ActivePower.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Product of RMS value of the voltage and the RMS value of the in-phase component of the current. - */ + /** \brief Product of RMS value of the voltage and the RMS value of the in-phase component of the current. */ class ActivePower { public: diff --git a/CGMES_2.4.15_27JAN2020/ActivePowerLimit.cpp b/CGMES_2.4.15_27JAN2020/ActivePowerLimit.cpp index 587b83aff..d05a279c9 100644 --- a/CGMES_2.4.15_27JAN2020/ActivePowerLimit.cpp +++ b/CGMES_2.4.15_27JAN2020/ActivePowerLimit.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "ActivePower.hpp" using namespace CIMPP; -ActivePowerLimit::ActivePowerLimit() {}; -ActivePowerLimit::~ActivePowerLimit() {}; +ActivePowerLimit::ActivePowerLimit() {} +ActivePowerLimit::~ActivePowerLimit() {} static const std::list PossibleProfilesForClass = { @@ -40,25 +39,24 @@ ActivePowerLimit::getPossibleProfilesForAttributes() const return map; } - -bool assign_ActivePowerLimit_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ActivePowerLimit_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ActivePowerLimit* element = dynamic_cast(BaseClass_ptr1)) + ActivePowerLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->value; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ActivePowerLimit_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ActivePowerLimit* element = dynamic_cast(BaseClass_ptr1)) + const ActivePowerLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value; if (!buffer.str().empty()) @@ -70,8 +68,6 @@ bool get_ActivePowerLimit_value(const BaseClass* BaseClass_ptr1, std::stringstre return false; } - - const char ActivePowerLimit::debugName[] = "ActivePowerLimit"; const char* ActivePowerLimit::debugString() const { @@ -80,12 +76,12 @@ const char* ActivePowerLimit::debugString() const void ActivePowerLimit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ActivePowerLimit"), &ActivePowerLimit_factory)); + factory_map.emplace("cim:ActivePowerLimit", &ActivePowerLimit_factory); } void ActivePowerLimit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ActivePowerLimit.value"), &assign_ActivePowerLimit_value)); + assign_map.emplace("cim:ActivePowerLimit.value", &assign_ActivePowerLimit_value); } void ActivePowerLimit::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ActivePowerLimit.hpp b/CGMES_2.4.15_27JAN2020/ActivePowerLimit.hpp index b13c05c4a..cdf99235b 100644 --- a/CGMES_2.4.15_27JAN2020/ActivePowerLimit.hpp +++ b/CGMES_2.4.15_27JAN2020/ActivePowerLimit.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Limit on active power flow. - */ + /** \brief Limit on active power flow. */ class ActivePowerLimit : public OperationalLimit { public: @@ -27,7 +25,8 @@ namespace CIMPP ActivePowerLimit(); ~ActivePowerLimit() override; - CIMPP::ActivePower value; /* Value of active power limit. Default: nullptr */ + /** \brief Value of active power limit. Default: nullptr */ + CIMPP::ActivePower value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ActivePowerPerFrequency.hpp b/CGMES_2.4.15_27JAN2020/ActivePowerPerFrequency.hpp index f8b5bd3ab..dbbdb347e 100644 --- a/CGMES_2.4.15_27JAN2020/ActivePowerPerFrequency.hpp +++ b/CGMES_2.4.15_27JAN2020/ActivePowerPerFrequency.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Active power variation with frequency. - */ + /** \brief Active power variation with frequency. */ class ActivePowerPerFrequency { public: diff --git a/CGMES_2.4.15_27JAN2020/Analog.cpp b/CGMES_2.4.15_27JAN2020/Analog.cpp index 2721f0af2..d11d78a05 100644 --- a/CGMES_2.4.15_27JAN2020/Analog.cpp +++ b/CGMES_2.4.15_27JAN2020/Analog.cpp @@ -8,14 +8,13 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "AnalogValue.hpp" #include "AnalogLimitSet.hpp" -#include "Boolean.hpp" +#include "AnalogValue.hpp" using namespace CIMPP; -Analog::Analog() {}; -Analog::~Analog() {}; +Analog::Analog() {} +Analog::~Analog() {} static const std::list PossibleProfilesForClass = { @@ -44,21 +43,6 @@ Analog::getPossibleProfilesForAttributes() const return map; } - -bool assign_Analog_positiveFlowIn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (Analog* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->positiveFlowIn; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_AnalogValue_Analog(BaseClass*, BaseClass*); bool assign_Analog_AnalogValues(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -75,6 +59,7 @@ bool assign_Analog_AnalogValues(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ } return false; } + bool assign_AnalogLimitSet_Measurements(BaseClass*, BaseClass*); bool assign_Analog_LimitSets(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -92,9 +77,26 @@ bool assign_Analog_LimitSets(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr return false; } +bool assign_Analog_positiveFlowIn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + Analog* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->positiveFlowIn; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + + bool get_Analog_positiveFlowIn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Analog* element = dynamic_cast(BaseClass_ptr1)) + const Analog* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->positiveFlowIn; if (!buffer.str().empty()) @@ -106,8 +108,6 @@ bool get_Analog_positiveFlowIn(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } - - const char Analog::debugName[] = "Analog"; const char* Analog::debugString() const { @@ -116,18 +116,18 @@ const char* Analog::debugString() const void Analog::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Analog"), &Analog_factory)); + factory_map.emplace("cim:Analog", &Analog_factory); } void Analog::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Analog.positiveFlowIn"), &assign_Analog_positiveFlowIn)); + assign_map.emplace("cim:Analog.positiveFlowIn", &assign_Analog_positiveFlowIn); } void Analog::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Analog.AnalogValues"), &assign_Analog_AnalogValues)); - assign_map.insert(std::make_pair(std::string("cim:Analog.LimitSets"), &assign_Analog_LimitSets)); + assign_map.emplace("cim:Analog.AnalogValues", &assign_Analog_AnalogValues); + assign_map.emplace("cim:Analog.LimitSets", &assign_Analog_LimitSets); } void Analog::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/Analog.hpp b/CGMES_2.4.15_27JAN2020/Analog.hpp index 667a90c4f..38ba38c37 100644 --- a/CGMES_2.4.15_27JAN2020/Analog.hpp +++ b/CGMES_2.4.15_27JAN2020/Analog.hpp @@ -19,9 +19,7 @@ namespace CIMPP class AnalogLimitSet; class AnalogValue; - /* - Analog represents an analog Measurement. - */ + /** \brief Analog represents an analog Measurement. */ class Analog : public Measurement { public: @@ -29,9 +27,14 @@ namespace CIMPP Analog(); ~Analog() override; - std::list AnalogValues; /* Measurement to which this value is connected. Default: 0 */ - std::list LimitSets; /* The Measurements using the LimitSet. Default: 0 */ - CIMPP::Boolean positiveFlowIn; /* If true then this measurement is an active power, reactive power or current with the convention that a positive value measured at the Terminal means power is flowing into the related PowerSystemResource. Default: false */ + /** \brief Measurement to which this value is connected. Default: 0 */ + std::list AnalogValues; + + /** \brief The Measurements using the LimitSet. Default: 0 */ + std::list LimitSets; + + /** \brief If true then this measurement is an active power, reactive power or current with the convention that a positive value measured at the Terminal means power is flowing into the related PowerSystemResource. Default: false */ + CIMPP::Boolean positiveFlowIn; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/AnalogControl.cpp b/CGMES_2.4.15_27JAN2020/AnalogControl.cpp index 1e6f809f9..aba858065 100644 --- a/CGMES_2.4.15_27JAN2020/AnalogControl.cpp +++ b/CGMES_2.4.15_27JAN2020/AnalogControl.cpp @@ -9,13 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "AnalogValue.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -AnalogControl::AnalogControl() : AnalogValue(nullptr) {}; -AnalogControl::~AnalogControl() {}; +AnalogControl::AnalogControl() : AnalogValue(nullptr) {} +AnalogControl::~AnalogControl() {} static const std::list PossibleProfilesForClass = { @@ -44,70 +42,71 @@ AnalogControl::getPossibleProfilesForAttributes() const return map; } - -bool assign_AnalogControl_maxValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AnalogValue_AnalogControl(BaseClass*, BaseClass*); +bool assign_AnalogControl_AnalogValue(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (AnalogControl* element = dynamic_cast(BaseClass_ptr1)) + AnalogControl* element = dynamic_cast(BaseClass_ptr1); + AnalogValue* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->maxValue; - if (buffer.fail()) - return false; - else - return true; + if (element->AnalogValue != element2) + { + element->AnalogValue = element2; + return assign_AnalogValue_AnalogControl(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_AnalogControl_minValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AnalogControl_maxValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AnalogControl* element = dynamic_cast(BaseClass_ptr1)) + AnalogControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->minValue; - if (buffer.fail()) - return false; - else + buffer >> element->maxValue; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_AnalogValue_AnalogControl(BaseClass*, BaseClass*); -bool assign_AnalogControl_AnalogValue(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_AnalogControl_minValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { AnalogControl* element = dynamic_cast(BaseClass_ptr1); - AnalogValue* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->AnalogValue != element2) + buffer >> element->minValue; + if (!buffer.fail()) { - element->AnalogValue = element2; - return assign_AnalogValue_AnalogControl(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool get_AnalogControl_maxValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_AnalogControl_AnalogValue(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AnalogControl* element = dynamic_cast(BaseClass_ptr1)) + const AnalogControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->maxValue; - if (!buffer.str().empty()) + if (element->AnalogValue != 0) { + BaseClass_list.push_back(element->AnalogValue); return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_AnalogControl_minValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_AnalogControl_maxValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AnalogControl* element = dynamic_cast(BaseClass_ptr1)) + const AnalogControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->minValue; + buffer << element->maxValue; if (!buffer.str().empty()) { return true; @@ -117,21 +116,21 @@ bool get_AnalogControl_minValue(const BaseClass* BaseClass_ptr1, std::stringstre return false; } - -bool get_AnalogControl_AnalogValue(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) +bool get_AnalogControl_minValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AnalogControl* element = dynamic_cast(BaseClass_ptr1)) + const AnalogControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->AnalogValue != 0) + buffer << element->minValue; + if (!buffer.str().empty()) { - BaseClass_list.push_back(element->AnalogValue); return true; } } + buffer.setstate(std::ios::failbit); return false; } - const char AnalogControl::debugName[] = "AnalogControl"; const char* AnalogControl::debugString() const { @@ -140,18 +139,18 @@ const char* AnalogControl::debugString() const void AnalogControl::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AnalogControl"), &AnalogControl_factory)); + factory_map.emplace("cim:AnalogControl", &AnalogControl_factory); } void AnalogControl::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AnalogControl.maxValue"), &assign_AnalogControl_maxValue)); - assign_map.insert(std::make_pair(std::string("cim:AnalogControl.minValue"), &assign_AnalogControl_minValue)); + assign_map.emplace("cim:AnalogControl.maxValue", &assign_AnalogControl_maxValue); + assign_map.emplace("cim:AnalogControl.minValue", &assign_AnalogControl_minValue); } void AnalogControl::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AnalogControl.AnalogValue"), &assign_AnalogControl_AnalogValue)); + assign_map.emplace("cim:AnalogControl.AnalogValue", &assign_AnalogControl_AnalogValue); } void AnalogControl::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/AnalogControl.hpp b/CGMES_2.4.15_27JAN2020/AnalogControl.hpp index 546706c40..8185c302e 100644 --- a/CGMES_2.4.15_27JAN2020/AnalogControl.hpp +++ b/CGMES_2.4.15_27JAN2020/AnalogControl.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class AnalogValue; - /* - An analog control used for supervisory control. - */ + /** \brief An analog control used for supervisory control. */ class AnalogControl : public Control { public: @@ -28,9 +26,14 @@ namespace CIMPP AnalogControl(); ~AnalogControl() override; - CIMPP::AnalogValue* AnalogValue; /* The Control variable associated with the MeasurementValue. Default: 0 */ - CIMPP::Simple_Float maxValue; /* Normal value range maximum for any of the Control.value. Used for scaling, e.g. in bar graphs. Default: nullptr */ - CIMPP::Simple_Float minValue; /* Normal value range minimum for any of the Control.value. Used for scaling, e.g. in bar graphs. Default: nullptr */ + /** \brief The Control variable associated with the MeasurementValue. Default: 0 */ + CIMPP::AnalogValue* AnalogValue; + + /** \brief Normal value range maximum for any of the Control.value. Used for scaling, e.g. in bar graphs. Default: nullptr */ + CIMPP::Simple_Float maxValue; + + /** \brief Normal value range minimum for any of the Control.value. Used for scaling, e.g. in bar graphs. Default: nullptr */ + CIMPP::Simple_Float minValue; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/AnalogLimit.cpp b/CGMES_2.4.15_27JAN2020/AnalogLimit.cpp index 0408b5298..007d1c5d0 100644 --- a/CGMES_2.4.15_27JAN2020/AnalogLimit.cpp +++ b/CGMES_2.4.15_27JAN2020/AnalogLimit.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "AnalogLimitSet.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -AnalogLimit::AnalogLimit() : LimitSet(nullptr) {}; -AnalogLimit::~AnalogLimit() {}; +AnalogLimit::AnalogLimit() : LimitSet(nullptr) {} +AnalogLimit::~AnalogLimit() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ AnalogLimit::getPossibleProfilesForAttributes() const return map; } - -bool assign_AnalogLimit_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (AnalogLimit* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->value; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_AnalogLimitSet_Limits(BaseClass*, BaseClass*); bool assign_AnalogLimit_LimitSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_AnalogLimit_LimitSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass return false; } -bool get_AnalogLimit_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_AnalogLimit_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const AnalogLimit* element = dynamic_cast(BaseClass_ptr1)) + AnalogLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->value; - if (!buffer.str().empty()) + buffer >> element->value; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_AnalogLimit_LimitSet(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AnalogLimit* element = dynamic_cast(BaseClass_ptr1)) + const AnalogLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->LimitSet != 0) { @@ -102,6 +86,20 @@ bool get_AnalogLimit_LimitSet(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->value; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char AnalogLimit::debugName[] = "AnalogLimit"; const char* AnalogLimit::debugString() const @@ -111,17 +109,17 @@ const char* AnalogLimit::debugString() const void AnalogLimit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AnalogLimit"), &AnalogLimit_factory)); + factory_map.emplace("cim:AnalogLimit", &AnalogLimit_factory); } void AnalogLimit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AnalogLimit.value"), &assign_AnalogLimit_value)); + assign_map.emplace("cim:AnalogLimit.value", &assign_AnalogLimit_value); } void AnalogLimit::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AnalogLimit.LimitSet"), &assign_AnalogLimit_LimitSet)); + assign_map.emplace("cim:AnalogLimit.LimitSet", &assign_AnalogLimit_LimitSet); } void AnalogLimit::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/AnalogLimit.hpp b/CGMES_2.4.15_27JAN2020/AnalogLimit.hpp index 1d0aefb00..58ddbd984 100644 --- a/CGMES_2.4.15_27JAN2020/AnalogLimit.hpp +++ b/CGMES_2.4.15_27JAN2020/AnalogLimit.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class AnalogLimitSet; - /* - Limit values for Analog measurements. - */ + /** \brief Limit values for Analog measurements. */ class AnalogLimit : public Limit { public: @@ -28,8 +26,11 @@ namespace CIMPP AnalogLimit(); ~AnalogLimit() override; - CIMPP::AnalogLimitSet* LimitSet; /* The limit values used for supervision of Measurements. Default: 0 */ - CIMPP::Simple_Float value; /* The value to supervise against. Default: nullptr */ + /** \brief The limit values used for supervision of Measurements. Default: 0 */ + CIMPP::AnalogLimitSet* LimitSet; + + /** \brief The value to supervise against. Default: nullptr */ + CIMPP::Simple_Float value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/AnalogLimitSet.cpp b/CGMES_2.4.15_27JAN2020/AnalogLimitSet.cpp index 2fd97f4a4..ecf5a0e67 100644 --- a/CGMES_2.4.15_27JAN2020/AnalogLimitSet.cpp +++ b/CGMES_2.4.15_27JAN2020/AnalogLimitSet.cpp @@ -8,13 +8,13 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "AnalogLimit.hpp" #include "Analog.hpp" +#include "AnalogLimit.hpp" using namespace CIMPP; -AnalogLimitSet::AnalogLimitSet() {}; -AnalogLimitSet::~AnalogLimitSet() {}; +AnalogLimitSet::AnalogLimitSet() {} +AnalogLimitSet::~AnalogLimitSet() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ AnalogLimitSet::getPossibleProfilesForAttributes() const return map; } - - bool assign_AnalogLimit_LimitSet(BaseClass*, BaseClass*); bool assign_AnalogLimitSet_Limits(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_AnalogLimitSet_Limits(BaseClass* BaseClass_ptr1, BaseClass* BaseClas } return false; } + bool assign_Analog_LimitSets(BaseClass*, BaseClass*); bool assign_AnalogLimitSet_Measurements(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -80,7 +79,8 @@ bool assign_AnalogLimitSet_Measurements(BaseClass* BaseClass_ptr1, BaseClass* Ba bool get_AnalogLimitSet_Measurements(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AnalogLimitSet* element = dynamic_cast(BaseClass_ptr1)) + const AnalogLimitSet* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { std::copy(element->Measurements.begin(), element->Measurements.end(), std::back_inserter(BaseClass_list)); return !BaseClass_list.empty(); @@ -88,7 +88,6 @@ bool get_AnalogLimitSet_Measurements(const BaseClass* BaseClass_ptr1, std::list< return false; } - const char AnalogLimitSet::debugName[] = "AnalogLimitSet"; const char* AnalogLimitSet::debugString() const { @@ -97,7 +96,7 @@ const char* AnalogLimitSet::debugString() const void AnalogLimitSet::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AnalogLimitSet"), &AnalogLimitSet_factory)); + factory_map.emplace("cim:AnalogLimitSet", &AnalogLimitSet_factory); } void AnalogLimitSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -106,8 +105,8 @@ void AnalogLimitSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AnalogLimitSet.Limits"), &assign_AnalogLimitSet_Limits)); - assign_map.insert(std::make_pair(std::string("cim:AnalogLimitSet.Measurements"), &assign_AnalogLimitSet_Measurements)); + assign_map.emplace("cim:AnalogLimitSet.Limits", &assign_AnalogLimitSet_Limits); + assign_map.emplace("cim:AnalogLimitSet.Measurements", &assign_AnalogLimitSet_Measurements); } void AnalogLimitSet::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/AnalogLimitSet.hpp b/CGMES_2.4.15_27JAN2020/AnalogLimitSet.hpp index f7dbba7be..e5ecf9619 100644 --- a/CGMES_2.4.15_27JAN2020/AnalogLimitSet.hpp +++ b/CGMES_2.4.15_27JAN2020/AnalogLimitSet.hpp @@ -18,9 +18,7 @@ namespace CIMPP class Analog; class AnalogLimit; - /* - An AnalogLimitSet specifies a set of Limits that are associated with an Analog measurement. - */ + /** \brief An AnalogLimitSet specifies a set of Limits that are associated with an Analog measurement. */ class AnalogLimitSet : public LimitSet { public: @@ -28,8 +26,11 @@ namespace CIMPP AnalogLimitSet(); ~AnalogLimitSet() override; - std::list Limits; /* The set of limits. Default: 0 */ - std::list Measurements; /* A measurement may have zero or more limit ranges defined for it. Default: 0 */ + /** \brief The set of limits. Default: 0 */ + std::list Limits; + + /** \brief A measurement may have zero or more limit ranges defined for it. Default: 0 */ + std::list Measurements; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/AnalogValue.cpp b/CGMES_2.4.15_27JAN2020/AnalogValue.cpp index eac1a231b..2c9ec60f2 100644 --- a/CGMES_2.4.15_27JAN2020/AnalogValue.cpp +++ b/CGMES_2.4.15_27JAN2020/AnalogValue.cpp @@ -10,12 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "Analog.hpp" #include "AnalogControl.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -AnalogValue::AnalogValue() : Analog(nullptr), AnalogControl(nullptr) {}; -AnalogValue::~AnalogValue() {}; +AnalogValue::AnalogValue() : Analog(nullptr), AnalogControl(nullptr) {} +AnalogValue::~AnalogValue() {} static const std::list PossibleProfilesForClass = { @@ -44,21 +43,6 @@ AnalogValue::getPossibleProfilesForAttributes() const return map; } - -bool assign_AnalogValue_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (AnalogValue* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->value; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_Analog_AnalogValues(BaseClass*, BaseClass*); bool assign_AnalogValue_Analog(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -75,6 +59,7 @@ bool assign_AnalogValue_Analog(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_p } return false; } + bool assign_AnalogControl_AnalogValue(BaseClass*, BaseClass*); bool assign_AnalogValue_AnalogControl(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -92,24 +77,24 @@ bool assign_AnalogValue_AnalogControl(BaseClass* BaseClass_ptr1, BaseClass* Base return false; } -bool get_AnalogValue_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_AnalogValue_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const AnalogValue* element = dynamic_cast(BaseClass_ptr1)) + AnalogValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->value; - if (!buffer.str().empty()) + buffer >> element->value; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_AnalogValue_Analog(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AnalogValue* element = dynamic_cast(BaseClass_ptr1)) + const AnalogValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Analog != 0) { @@ -121,6 +106,21 @@ bool get_AnalogValue_Analog(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->value; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + const char AnalogValue::debugName[] = "AnalogValue"; const char* AnalogValue::debugString() const { @@ -129,18 +129,18 @@ const char* AnalogValue::debugString() const void AnalogValue::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AnalogValue"), &AnalogValue_factory)); + factory_map.emplace("cim:AnalogValue", &AnalogValue_factory); } void AnalogValue::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AnalogValue.value"), &assign_AnalogValue_value)); + assign_map.emplace("cim:AnalogValue.value", &assign_AnalogValue_value); } void AnalogValue::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AnalogValue.Analog"), &assign_AnalogValue_Analog)); - assign_map.insert(std::make_pair(std::string("cim:AnalogValue.AnalogControl"), &assign_AnalogValue_AnalogControl)); + assign_map.emplace("cim:AnalogValue.Analog", &assign_AnalogValue_Analog); + assign_map.emplace("cim:AnalogValue.AnalogControl", &assign_AnalogValue_AnalogControl); } void AnalogValue::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/AnalogValue.hpp b/CGMES_2.4.15_27JAN2020/AnalogValue.hpp index e8bc8c0fc..6a1f17faf 100644 --- a/CGMES_2.4.15_27JAN2020/AnalogValue.hpp +++ b/CGMES_2.4.15_27JAN2020/AnalogValue.hpp @@ -19,9 +19,7 @@ namespace CIMPP class Analog; class AnalogControl; - /* - AnalogValue represents an analog MeasurementValue. - */ + /** \brief AnalogValue represents an analog MeasurementValue. */ class AnalogValue : public MeasurementValue { public: @@ -29,9 +27,14 @@ namespace CIMPP AnalogValue(); ~AnalogValue() override; - CIMPP::Analog* Analog; /* The values connected to this measurement. Default: 0 */ - CIMPP::AnalogControl* AnalogControl; /* The MeasurementValue that is controlled. Default: 0 */ - CIMPP::Simple_Float value; /* The value to supervise. Default: nullptr */ + /** \brief The values connected to this measurement. Default: 0 */ + CIMPP::Analog* Analog; + + /** \brief The MeasurementValue that is controlled. Default: 0 */ + CIMPP::AnalogControl* AnalogControl; + + /** \brief The value to supervise. Default: nullptr */ + CIMPP::Simple_Float value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/AngleDegrees.hpp b/CGMES_2.4.15_27JAN2020/AngleDegrees.hpp index 39204363b..99fe46c0d 100644 --- a/CGMES_2.4.15_27JAN2020/AngleDegrees.hpp +++ b/CGMES_2.4.15_27JAN2020/AngleDegrees.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Measurement of angle in degrees. - */ + /** \brief Measurement of angle in degrees. */ class AngleDegrees { public: diff --git a/CGMES_2.4.15_27JAN2020/AngleRadians.hpp b/CGMES_2.4.15_27JAN2020/AngleRadians.hpp index 2ac29ff28..8f1659629 100644 --- a/CGMES_2.4.15_27JAN2020/AngleRadians.hpp +++ b/CGMES_2.4.15_27JAN2020/AngleRadians.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Phase angle in radians. - */ + /** \brief Phase angle in radians. */ class AngleRadians { public: diff --git a/CGMES_2.4.15_27JAN2020/ApparentPower.hpp b/CGMES_2.4.15_27JAN2020/ApparentPower.hpp index bcb8201e6..0142a98c0 100644 --- a/CGMES_2.4.15_27JAN2020/ApparentPower.hpp +++ b/CGMES_2.4.15_27JAN2020/ApparentPower.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Product of the RMS value of the voltage and the RMS value of the current. - */ + /** \brief Product of the RMS value of the voltage and the RMS value of the current. */ class ApparentPower { public: diff --git a/CGMES_2.4.15_27JAN2020/ApparentPowerLimit.cpp b/CGMES_2.4.15_27JAN2020/ApparentPowerLimit.cpp index ae3fa464c..adbb44d3c 100644 --- a/CGMES_2.4.15_27JAN2020/ApparentPowerLimit.cpp +++ b/CGMES_2.4.15_27JAN2020/ApparentPowerLimit.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "ApparentPower.hpp" using namespace CIMPP; -ApparentPowerLimit::ApparentPowerLimit() {}; -ApparentPowerLimit::~ApparentPowerLimit() {}; +ApparentPowerLimit::ApparentPowerLimit() {} +ApparentPowerLimit::~ApparentPowerLimit() {} static const std::list PossibleProfilesForClass = { @@ -40,25 +39,24 @@ ApparentPowerLimit::getPossibleProfilesForAttributes() const return map; } - -bool assign_ApparentPowerLimit_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ApparentPowerLimit_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ApparentPowerLimit* element = dynamic_cast(BaseClass_ptr1)) + ApparentPowerLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->value; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ApparentPowerLimit_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ApparentPowerLimit* element = dynamic_cast(BaseClass_ptr1)) + const ApparentPowerLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value; if (!buffer.str().empty()) @@ -70,8 +68,6 @@ bool get_ApparentPowerLimit_value(const BaseClass* BaseClass_ptr1, std::stringst return false; } - - const char ApparentPowerLimit::debugName[] = "ApparentPowerLimit"; const char* ApparentPowerLimit::debugString() const { @@ -80,12 +76,12 @@ const char* ApparentPowerLimit::debugString() const void ApparentPowerLimit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ApparentPowerLimit"), &ApparentPowerLimit_factory)); + factory_map.emplace("cim:ApparentPowerLimit", &ApparentPowerLimit_factory); } void ApparentPowerLimit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ApparentPowerLimit.value"), &assign_ApparentPowerLimit_value)); + assign_map.emplace("cim:ApparentPowerLimit.value", &assign_ApparentPowerLimit_value); } void ApparentPowerLimit::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ApparentPowerLimit.hpp b/CGMES_2.4.15_27JAN2020/ApparentPowerLimit.hpp index 77b406d8a..c9bf47334 100644 --- a/CGMES_2.4.15_27JAN2020/ApparentPowerLimit.hpp +++ b/CGMES_2.4.15_27JAN2020/ApparentPowerLimit.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Apparent power limit. - */ + /** \brief Apparent power limit. */ class ApparentPowerLimit : public OperationalLimit { public: @@ -27,7 +25,8 @@ namespace CIMPP ApparentPowerLimit(); ~ApparentPowerLimit() override; - CIMPP::ApparentPower value; /* The apparent power limit. Default: nullptr */ + /** \brief The apparent power limit. Default: nullptr */ + CIMPP::ApparentPower value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Area.hpp b/CGMES_2.4.15_27JAN2020/Area.hpp index 681c909b6..847a38b94 100644 --- a/CGMES_2.4.15_27JAN2020/Area.hpp +++ b/CGMES_2.4.15_27JAN2020/Area.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Area. - */ + /** \brief Area. */ class Area { public: diff --git a/CGMES_2.4.15_27JAN2020/AsynchronousMachine.cpp b/CGMES_2.4.15_27JAN2020/AsynchronousMachine.cpp index bad87183c..934692393 100644 --- a/CGMES_2.4.15_27JAN2020/AsynchronousMachine.cpp +++ b/CGMES_2.4.15_27JAN2020/AsynchronousMachine.cpp @@ -9,21 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "AsynchronousMachineDynamics.hpp" -#include "AsynchronousMachineKind.hpp" -#include "Boolean.hpp" -#include "PerCent.hpp" -#include "Simple_Float.hpp" -#include "Frequency.hpp" -#include "RotationSpeed.hpp" -#include "Integer.hpp" -#include "ActivePower.hpp" -#include "Boolean.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -AsynchronousMachine::AsynchronousMachine() : AsynchronousMachineDynamics(nullptr) {}; -AsynchronousMachine::~AsynchronousMachine() {}; +AsynchronousMachine::AsynchronousMachine() : AsynchronousMachineDynamics(nullptr) {} +AsynchronousMachine::~AsynchronousMachine() {} static const std::list PossibleProfilesForClass = { @@ -62,158 +52,183 @@ AsynchronousMachine::getPossibleProfilesForAttributes() const return map; } +bool assign_AsynchronousMachineDynamics_AsynchronousMachine(BaseClass*, BaseClass*); +bool assign_AsynchronousMachine_AsynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + AsynchronousMachineDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->AsynchronousMachineDynamics != element2) + { + element->AsynchronousMachineDynamics = element2; + return assign_AsynchronousMachineDynamics_AsynchronousMachine(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_AsynchronousMachine_asynchronousMachineType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_asynchronousMachineType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->asynchronousMachineType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachine_converterFedDrive(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_converterFedDrive(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->converterFedDrive; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachine_efficiency(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_efficiency(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efficiency; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachine_iaIrRatio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_iaIrRatio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->iaIrRatio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachine_nominalFrequency(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_nominalFrequency(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nominalFrequency; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachine_nominalSpeed(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_nominalSpeed(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nominalSpeed; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachine_polePairNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_polePairNumber(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->polePairNumber; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachine_ratedMechanicalPower(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_ratedMechanicalPower(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedMechanicalPower; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachine_reversible(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_reversible(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->reversible; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachine_rxLockedRotorRatio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_rxLockedRotorRatio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rxLockedRotorRatio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachineDynamics_AsynchronousMachine(BaseClass*, BaseClass*); -bool assign_AsynchronousMachine_AsynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_AsynchronousMachine_asynchronousMachineType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); - AsynchronousMachineDynamics* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->AsynchronousMachineDynamics != element2) + buffer << element->asynchronousMachineType; + if (!buffer.str().empty()) { - element->AsynchronousMachineDynamics = element2; - return assign_AsynchronousMachineDynamics_AsynchronousMachine(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } + buffer.setstate(std::ios::failbit); return false; } bool get_AsynchronousMachine_converterFedDrive(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->converterFedDrive; if (!buffer.str().empty()) @@ -227,7 +242,8 @@ bool get_AsynchronousMachine_converterFedDrive(const BaseClass* BaseClass_ptr1, bool get_AsynchronousMachine_efficiency(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efficiency; if (!buffer.str().empty()) @@ -241,7 +257,8 @@ bool get_AsynchronousMachine_efficiency(const BaseClass* BaseClass_ptr1, std::st bool get_AsynchronousMachine_iaIrRatio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->iaIrRatio; if (!buffer.str().empty()) @@ -255,7 +272,8 @@ bool get_AsynchronousMachine_iaIrRatio(const BaseClass* BaseClass_ptr1, std::str bool get_AsynchronousMachine_nominalFrequency(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nominalFrequency; if (!buffer.str().empty()) @@ -269,7 +287,8 @@ bool get_AsynchronousMachine_nominalFrequency(const BaseClass* BaseClass_ptr1, s bool get_AsynchronousMachine_nominalSpeed(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nominalSpeed; if (!buffer.str().empty()) @@ -283,7 +302,8 @@ bool get_AsynchronousMachine_nominalSpeed(const BaseClass* BaseClass_ptr1, std:: bool get_AsynchronousMachine_polePairNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->polePairNumber; if (!buffer.str().empty()) @@ -297,7 +317,8 @@ bool get_AsynchronousMachine_polePairNumber(const BaseClass* BaseClass_ptr1, std bool get_AsynchronousMachine_ratedMechanicalPower(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedMechanicalPower; if (!buffer.str().empty()) @@ -311,7 +332,8 @@ bool get_AsynchronousMachine_ratedMechanicalPower(const BaseClass* BaseClass_ptr bool get_AsynchronousMachine_reversible(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->reversible; if (!buffer.str().empty()) @@ -325,7 +347,8 @@ bool get_AsynchronousMachine_reversible(const BaseClass* BaseClass_ptr1, std::st bool get_AsynchronousMachine_rxLockedRotorRatio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rxLockedRotorRatio; if (!buffer.str().empty()) @@ -337,22 +360,6 @@ bool get_AsynchronousMachine_rxLockedRotorRatio(const BaseClass* BaseClass_ptr1, return false; } - - -bool get_AsynchronousMachine_asynchronousMachineType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->asynchronousMachineType; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char AsynchronousMachine::debugName[] = "AsynchronousMachine"; const char* AsynchronousMachine::debugString() const { @@ -361,26 +368,26 @@ const char* AsynchronousMachine::debugString() const void AsynchronousMachine::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AsynchronousMachine"), &AsynchronousMachine_factory)); + factory_map.emplace("cim:AsynchronousMachine", &AsynchronousMachine_factory); } void AsynchronousMachine::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.asynchronousMachineType"), &assign_AsynchronousMachine_asynchronousMachineType)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.converterFedDrive"), &assign_AsynchronousMachine_converterFedDrive)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.efficiency"), &assign_AsynchronousMachine_efficiency)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.iaIrRatio"), &assign_AsynchronousMachine_iaIrRatio)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.nominalFrequency"), &assign_AsynchronousMachine_nominalFrequency)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.nominalSpeed"), &assign_AsynchronousMachine_nominalSpeed)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.polePairNumber"), &assign_AsynchronousMachine_polePairNumber)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.ratedMechanicalPower"), &assign_AsynchronousMachine_ratedMechanicalPower)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.reversible"), &assign_AsynchronousMachine_reversible)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.rxLockedRotorRatio"), &assign_AsynchronousMachine_rxLockedRotorRatio)); + assign_map.emplace("cim:AsynchronousMachine.asynchronousMachineType", &assign_AsynchronousMachine_asynchronousMachineType); + assign_map.emplace("cim:AsynchronousMachine.converterFedDrive", &assign_AsynchronousMachine_converterFedDrive); + assign_map.emplace("cim:AsynchronousMachine.efficiency", &assign_AsynchronousMachine_efficiency); + assign_map.emplace("cim:AsynchronousMachine.iaIrRatio", &assign_AsynchronousMachine_iaIrRatio); + assign_map.emplace("cim:AsynchronousMachine.nominalFrequency", &assign_AsynchronousMachine_nominalFrequency); + assign_map.emplace("cim:AsynchronousMachine.nominalSpeed", &assign_AsynchronousMachine_nominalSpeed); + assign_map.emplace("cim:AsynchronousMachine.polePairNumber", &assign_AsynchronousMachine_polePairNumber); + assign_map.emplace("cim:AsynchronousMachine.ratedMechanicalPower", &assign_AsynchronousMachine_ratedMechanicalPower); + assign_map.emplace("cim:AsynchronousMachine.reversible", &assign_AsynchronousMachine_reversible); + assign_map.emplace("cim:AsynchronousMachine.rxLockedRotorRatio", &assign_AsynchronousMachine_rxLockedRotorRatio); } void AsynchronousMachine::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.AsynchronousMachineDynamics"), &assign_AsynchronousMachine_AsynchronousMachineDynamics)); + assign_map.emplace("cim:AsynchronousMachine.AsynchronousMachineDynamics", &assign_AsynchronousMachine_AsynchronousMachineDynamics); } void AsynchronousMachine::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/AsynchronousMachine.hpp b/CGMES_2.4.15_27JAN2020/AsynchronousMachine.hpp index 099479f8b..9808c783d 100644 --- a/CGMES_2.4.15_27JAN2020/AsynchronousMachine.hpp +++ b/CGMES_2.4.15_27JAN2020/AsynchronousMachine.hpp @@ -25,9 +25,7 @@ namespace CIMPP { class AsynchronousMachineDynamics; - /* - A rotating machine whose shaft rotates asynchronously with the electrical field. Also known as an induction machine with no external connection to the rotor windings, e.g squirrel-cage induction machine. - */ + /** \brief A rotating machine whose shaft rotates asynchronously with the electrical field. Also known as an induction machine with no external connection to the rotor windings, e.g squirrel-cage induction machine. */ class AsynchronousMachine : public RotatingMachine { public: @@ -35,17 +33,38 @@ namespace CIMPP AsynchronousMachine(); ~AsynchronousMachine() override; - CIMPP::AsynchronousMachineDynamics* AsynchronousMachineDynamics; /* Asynchronous machine dynamics model used to describe dynamic behavior of this asynchronous machine. Default: 0 */ - CIMPP::AsynchronousMachineKind asynchronousMachineType; /* Indicates the type of Asynchronous Machine (motor or generator). Default: 0 */ - CIMPP::Boolean converterFedDrive; /* Indicates whether the machine is a converter fed drive. Used for short circuit data exchange according to IEC 60909 Default: false */ - CIMPP::PerCent efficiency; /* Efficiency of the asynchronous machine at nominal operation in percent. Indicator for converter drive motors. Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::Simple_Float iaIrRatio; /* Ratio of locked-rotor current to the rated current of the motor (Ia/Ir). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::Frequency nominalFrequency; /* Nameplate data indicates if the machine is 50 or 60 Hz. Default: nullptr */ - CIMPP::RotationSpeed nominalSpeed; /* Nameplate data. Depends on the slip and number of pole pairs. Default: nullptr */ - CIMPP::Integer polePairNumber; /* Number of pole pairs of stator. Used for short circuit data exchange according to IEC 60909 Default: 0 */ - CIMPP::ActivePower ratedMechanicalPower; /* Rated mechanical power (Pr in the IEC 60909-0). Used for short circuit data exchange according to IEC 60909. Default: nullptr */ - CIMPP::Boolean reversible; /* Indicates for converter drive motors if the power can be reversible. Used for short circuit data exchange according to IEC 60909 Default: false */ - CIMPP::Simple_Float rxLockedRotorRatio; /* Locked rotor ratio (R/X). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + /** \brief Asynchronous machine dynamics model used to describe dynamic behavior of this asynchronous machine. Default: 0 */ + CIMPP::AsynchronousMachineDynamics* AsynchronousMachineDynamics; + + /** \brief Indicates the type of Asynchronous Machine (motor or generator). Default: 0 */ + CIMPP::AsynchronousMachineKind asynchronousMachineType; + + /** \brief Indicates whether the machine is a converter fed drive. Used for short circuit data exchange according to IEC 60909 Default: false */ + CIMPP::Boolean converterFedDrive; + + /** \brief Efficiency of the asynchronous machine at nominal operation in percent. Indicator for converter drive motors. Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::PerCent efficiency; + + /** \brief Ratio of locked-rotor current to the rated current of the motor (Ia/Ir). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::Simple_Float iaIrRatio; + + /** \brief Nameplate data indicates if the machine is 50 or 60 Hz. Default: nullptr */ + CIMPP::Frequency nominalFrequency; + + /** \brief Nameplate data. Depends on the slip and number of pole pairs. Default: nullptr */ + CIMPP::RotationSpeed nominalSpeed; + + /** \brief Number of pole pairs of stator. Used for short circuit data exchange according to IEC 60909 Default: 0 */ + CIMPP::Integer polePairNumber; + + /** \brief Rated mechanical power (Pr in the IEC 60909-0). Used for short circuit data exchange according to IEC 60909. Default: nullptr */ + CIMPP::ActivePower ratedMechanicalPower; + + /** \brief Indicates for converter drive motors if the power can be reversible. Used for short circuit data exchange according to IEC 60909 Default: false */ + CIMPP::Boolean reversible; + + /** \brief Locked rotor ratio (R/X). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::Simple_Float rxLockedRotorRatio; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/AsynchronousMachineDynamics.cpp b/CGMES_2.4.15_27JAN2020/AsynchronousMachineDynamics.cpp index bfe9a4fb3..a7e89471f 100644 --- a/CGMES_2.4.15_27JAN2020/AsynchronousMachineDynamics.cpp +++ b/CGMES_2.4.15_27JAN2020/AsynchronousMachineDynamics.cpp @@ -15,8 +15,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -AsynchronousMachineDynamics::AsynchronousMachineDynamics() : AsynchronousMachine(nullptr), MechanicalLoadDynamics(nullptr), TurbineGovernorDynamics(nullptr), WindTurbineType1or2Dynamics(nullptr) {}; -AsynchronousMachineDynamics::~AsynchronousMachineDynamics() {}; +AsynchronousMachineDynamics::AsynchronousMachineDynamics() : AsynchronousMachine(nullptr), MechanicalLoadDynamics(nullptr), TurbineGovernorDynamics(nullptr), WindTurbineType1or2Dynamics(nullptr) {} +AsynchronousMachineDynamics::~AsynchronousMachineDynamics() {} static const std::list PossibleProfilesForClass = { @@ -46,8 +46,6 @@ AsynchronousMachineDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_AsynchronousMachine_AsynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_AsynchronousMachineDynamics_AsynchronousMachine(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -64,6 +62,7 @@ bool assign_AsynchronousMachineDynamics_AsynchronousMachine(BaseClass* BaseClass } return false; } + bool assign_MechanicalLoadDynamics_AsynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_AsynchronousMachineDynamics_MechanicalLoadDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -80,6 +79,7 @@ bool assign_AsynchronousMachineDynamics_MechanicalLoadDynamics(BaseClass* BaseCl } return false; } + bool assign_TurbineGovernorDynamics_AsynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_AsynchronousMachineDynamics_TurbineGovernorDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -96,6 +96,7 @@ bool assign_AsynchronousMachineDynamics_TurbineGovernorDynamics(BaseClass* BaseC } return false; } + bool assign_WindTurbineType1or2Dynamics_AsynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_AsynchronousMachineDynamics_WindTurbineType1or2Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -113,10 +114,10 @@ bool assign_AsynchronousMachineDynamics_WindTurbineType1or2Dynamics(BaseClass* B return false; } - bool get_AsynchronousMachineDynamics_AsynchronousMachine(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AsynchronousMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->AsynchronousMachine != 0) { @@ -128,6 +129,8 @@ bool get_AsynchronousMachineDynamics_AsynchronousMachine(const BaseClass* BaseCl } + + const char AsynchronousMachineDynamics::debugName[] = "AsynchronousMachineDynamics"; const char* AsynchronousMachineDynamics::debugString() const { @@ -136,7 +139,7 @@ const char* AsynchronousMachineDynamics::debugString() const void AsynchronousMachineDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AsynchronousMachineDynamics"), &AsynchronousMachineDynamics_factory)); + factory_map.emplace("cim:AsynchronousMachineDynamics", &AsynchronousMachineDynamics_factory); } void AsynchronousMachineDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -145,10 +148,10 @@ void AsynchronousMachineDynamics::addPrimitiveAssignFnsToMap(std::unordered_map< void AsynchronousMachineDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineDynamics.AsynchronousMachine"), &assign_AsynchronousMachineDynamics_AsynchronousMachine)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineDynamics.MechanicalLoadDynamics"), &assign_AsynchronousMachineDynamics_MechanicalLoadDynamics)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineDynamics.TurbineGovernorDynamics"), &assign_AsynchronousMachineDynamics_TurbineGovernorDynamics)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineDynamics.WindTurbineType1or2Dynamics"), &assign_AsynchronousMachineDynamics_WindTurbineType1or2Dynamics)); + assign_map.emplace("cim:AsynchronousMachineDynamics.AsynchronousMachine", &assign_AsynchronousMachineDynamics_AsynchronousMachine); + assign_map.emplace("cim:AsynchronousMachineDynamics.MechanicalLoadDynamics", &assign_AsynchronousMachineDynamics_MechanicalLoadDynamics); + assign_map.emplace("cim:AsynchronousMachineDynamics.TurbineGovernorDynamics", &assign_AsynchronousMachineDynamics_TurbineGovernorDynamics); + assign_map.emplace("cim:AsynchronousMachineDynamics.WindTurbineType1or2Dynamics", &assign_AsynchronousMachineDynamics_WindTurbineType1or2Dynamics); } void AsynchronousMachineDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/AsynchronousMachineDynamics.hpp b/CGMES_2.4.15_27JAN2020/AsynchronousMachineDynamics.hpp index c800b8543..bc0e2a13d 100644 --- a/CGMES_2.4.15_27JAN2020/AsynchronousMachineDynamics.hpp +++ b/CGMES_2.4.15_27JAN2020/AsynchronousMachineDynamics.hpp @@ -20,9 +20,7 @@ namespace CIMPP class TurbineGovernorDynamics; class WindTurbineType1or2Dynamics; - /* - Asynchronous machine whose behaviour is described by reference to a standard model expressed in either time constant reactance form or equivalent circuit form - */ + /** \brief Asynchronous machine whose behaviour is described by reference to a standard model expressed in either time constant reactance form or equivalent circuit form */ class AsynchronousMachineDynamics : public RotatingMachineDynamics { public: @@ -30,10 +28,17 @@ namespace CIMPP AsynchronousMachineDynamics(); ~AsynchronousMachineDynamics() override; - CIMPP::AsynchronousMachine* AsynchronousMachine; /* Asynchronous machine to which this asynchronous machine dynamics model applies. Default: 0 */ - CIMPP::MechanicalLoadDynamics* MechanicalLoadDynamics; /* Mechanical load model associated with this asynchronous machine model. Default: 0 */ - CIMPP::TurbineGovernorDynamics* TurbineGovernorDynamics; /* Turbine-governor model associated with this asynchronous machine model. Default: 0 */ - CIMPP::WindTurbineType1or2Dynamics* WindTurbineType1or2Dynamics; /* Wind generator type 1 or 2 model associated with this asynchronous machine model. Default: 0 */ + /** \brief Asynchronous machine to which this asynchronous machine dynamics model applies. Default: 0 */ + CIMPP::AsynchronousMachine* AsynchronousMachine; + + /** \brief Mechanical load model associated with this asynchronous machine model. Default: 0 */ + CIMPP::MechanicalLoadDynamics* MechanicalLoadDynamics; + + /** \brief Turbine-governor model associated with this asynchronous machine model. Default: 0 */ + CIMPP::TurbineGovernorDynamics* TurbineGovernorDynamics; + + /** \brief Wind generator type 1 or 2 model associated with this asynchronous machine model. Default: 0 */ + CIMPP::WindTurbineType1or2Dynamics* WindTurbineType1or2Dynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/AsynchronousMachineEquivalentCircuit.cpp b/CGMES_2.4.15_27JAN2020/AsynchronousMachineEquivalentCircuit.cpp index 8aed225a4..5ed52c82d 100644 --- a/CGMES_2.4.15_27JAN2020/AsynchronousMachineEquivalentCircuit.cpp +++ b/CGMES_2.4.15_27JAN2020/AsynchronousMachineEquivalentCircuit.cpp @@ -8,16 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -AsynchronousMachineEquivalentCircuit::AsynchronousMachineEquivalentCircuit() {}; -AsynchronousMachineEquivalentCircuit::~AsynchronousMachineEquivalentCircuit() {}; +AsynchronousMachineEquivalentCircuit::AsynchronousMachineEquivalentCircuit() {} +AsynchronousMachineEquivalentCircuit::~AsynchronousMachineEquivalentCircuit() {} static const std::list PossibleProfilesForClass = { @@ -48,77 +43,80 @@ AsynchronousMachineEquivalentCircuit::getPossibleProfilesForAttributes() const return map; } - -bool assign_AsynchronousMachineEquivalentCircuit_rr1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineEquivalentCircuit_rr1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rr1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachineEquivalentCircuit_rr2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineEquivalentCircuit_rr2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rr2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachineEquivalentCircuit_xlr1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineEquivalentCircuit_xlr1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xlr1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachineEquivalentCircuit_xlr2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineEquivalentCircuit_xlr2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xlr2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachineEquivalentCircuit_xm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineEquivalentCircuit_xm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_AsynchronousMachineEquivalentCircuit_rr1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rr1; if (!buffer.str().empty()) @@ -132,7 +130,8 @@ bool get_AsynchronousMachineEquivalentCircuit_rr1(const BaseClass* BaseClass_ptr bool get_AsynchronousMachineEquivalentCircuit_rr2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rr2; if (!buffer.str().empty()) @@ -146,7 +145,8 @@ bool get_AsynchronousMachineEquivalentCircuit_rr2(const BaseClass* BaseClass_ptr bool get_AsynchronousMachineEquivalentCircuit_xlr1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xlr1; if (!buffer.str().empty()) @@ -160,7 +160,8 @@ bool get_AsynchronousMachineEquivalentCircuit_xlr1(const BaseClass* BaseClass_pt bool get_AsynchronousMachineEquivalentCircuit_xlr2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xlr2; if (!buffer.str().empty()) @@ -174,7 +175,8 @@ bool get_AsynchronousMachineEquivalentCircuit_xlr2(const BaseClass* BaseClass_pt bool get_AsynchronousMachineEquivalentCircuit_xm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xm; if (!buffer.str().empty()) @@ -186,8 +188,6 @@ bool get_AsynchronousMachineEquivalentCircuit_xm(const BaseClass* BaseClass_ptr1 return false; } - - const char AsynchronousMachineEquivalentCircuit::debugName[] = "AsynchronousMachineEquivalentCircuit"; const char* AsynchronousMachineEquivalentCircuit::debugString() const { @@ -196,16 +196,16 @@ const char* AsynchronousMachineEquivalentCircuit::debugString() const void AsynchronousMachineEquivalentCircuit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AsynchronousMachineEquivalentCircuit"), &AsynchronousMachineEquivalentCircuit_factory)); + factory_map.emplace("cim:AsynchronousMachineEquivalentCircuit", &AsynchronousMachineEquivalentCircuit_factory); } void AsynchronousMachineEquivalentCircuit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineEquivalentCircuit.rr1"), &assign_AsynchronousMachineEquivalentCircuit_rr1)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineEquivalentCircuit.rr2"), &assign_AsynchronousMachineEquivalentCircuit_rr2)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineEquivalentCircuit.xlr1"), &assign_AsynchronousMachineEquivalentCircuit_xlr1)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineEquivalentCircuit.xlr2"), &assign_AsynchronousMachineEquivalentCircuit_xlr2)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineEquivalentCircuit.xm"), &assign_AsynchronousMachineEquivalentCircuit_xm)); + assign_map.emplace("cim:AsynchronousMachineEquivalentCircuit.rr1", &assign_AsynchronousMachineEquivalentCircuit_rr1); + assign_map.emplace("cim:AsynchronousMachineEquivalentCircuit.rr2", &assign_AsynchronousMachineEquivalentCircuit_rr2); + assign_map.emplace("cim:AsynchronousMachineEquivalentCircuit.xlr1", &assign_AsynchronousMachineEquivalentCircuit_xlr1); + assign_map.emplace("cim:AsynchronousMachineEquivalentCircuit.xlr2", &assign_AsynchronousMachineEquivalentCircuit_xlr2); + assign_map.emplace("cim:AsynchronousMachineEquivalentCircuit.xm", &assign_AsynchronousMachineEquivalentCircuit_xm); } void AsynchronousMachineEquivalentCircuit::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/AsynchronousMachineEquivalentCircuit.hpp b/CGMES_2.4.15_27JAN2020/AsynchronousMachineEquivalentCircuit.hpp index 9e711c649..0280d8e3e 100644 --- a/CGMES_2.4.15_27JAN2020/AsynchronousMachineEquivalentCircuit.hpp +++ b/CGMES_2.4.15_27JAN2020/AsynchronousMachineEquivalentCircuit.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The electrical equations of all variations of the asynchronous model are based on the AsynchronousEquivalentCircuit diagram for the direct and quadrature axes, with two equivalent rotor windings in each axis. = + = + * / ( + ) = + * * / ( * + * + * ) = ( + ) / ( * ) = ( * + * + * ) / ( * * (+ ) Same equations using CIM attributes from AsynchronousMachineTimeConstantReactance class on left of = sign and AsynchronousMachineEquivalentCircuit class on right (except as noted): xs = xm + RotatingMachineDynamics.statorLeakageReactance xp = RotatingMachineDynamics.statorLeakageReactance + xm * xlr1 / (xm + xlr1) xpp = RotatingMachineDynamics.statorLeakageReactance + xm * xlr1* xlr2 / (xm * xlr1 + xm * xlr2 + xlr1 * xlr2) tpo = (xm + xlr1) / (2*pi*nominal frequency * rr1) tppo = (xm * xlr1 + xm * xlr2 + xlr1 * xlr2) / (2*pi*nominal frequency * rr2 * (xm + xlr1). - */ + /** \brief The electrical equations of all variations of the asynchronous model are based on the AsynchronousEquivalentCircuit diagram for the direct and quadrature axes, with two equivalent rotor windings in each axis. = + = + * / ( + ) = + * * / ( * + * + * ) = ( + ) / ( * ) = ( * + * + * ) / ( * * (+ ) Same equations using CIM attributes from AsynchronousMachineTimeConstantReactance class on left of = sign and AsynchronousMachineEquivalentCircuit class on right (except as noted): xs = xm + RotatingMachineDynamics.statorLeakageReactance xp = RotatingMachineDynamics.statorLeakageReactance + xm * xlr1 / (xm + xlr1) xpp = RotatingMachineDynamics.statorLeakageReactance + xm * xlr1* xlr2 / (xm * xlr1 + xm * xlr2 + xlr1 * xlr2) tpo = (xm + xlr1) / (2*pi*nominal frequency * rr1) tppo = (xm * xlr1 + xm * xlr2 + xlr1 * xlr2) / (2*pi*nominal frequency * rr2 * (xm + xlr1). */ class AsynchronousMachineEquivalentCircuit : public AsynchronousMachineDynamics { public: @@ -27,11 +25,20 @@ namespace CIMPP AsynchronousMachineEquivalentCircuit(); ~AsynchronousMachineEquivalentCircuit() override; - CIMPP::PU rr1; /* Damper 1 winding resistance. Default: nullptr */ - CIMPP::PU rr2; /* Damper 2 winding resistance. Default: nullptr */ - CIMPP::PU xlr1; /* Damper 1 winding leakage reactance. Default: nullptr */ - CIMPP::PU xlr2; /* Damper 2 winding leakage reactance. Default: nullptr */ - CIMPP::PU xm; /* Magnetizing reactance. Default: nullptr */ + /** \brief Damper 1 winding resistance. Default: nullptr */ + CIMPP::PU rr1; + + /** \brief Damper 2 winding resistance. Default: nullptr */ + CIMPP::PU rr2; + + /** \brief Damper 1 winding leakage reactance. Default: nullptr */ + CIMPP::PU xlr1; + + /** \brief Damper 2 winding leakage reactance. Default: nullptr */ + CIMPP::PU xlr2; + + /** \brief Magnetizing reactance. Default: nullptr */ + CIMPP::PU xm; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/AsynchronousMachineKind.cpp b/CGMES_2.4.15_27JAN2020/AsynchronousMachineKind.cpp index d9b39ecb0..795ae96ee 100644 --- a/CGMES_2.4.15_27JAN2020/AsynchronousMachineKind.cpp +++ b/CGMES_2.4.15_27JAN2020/AsynchronousMachineKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "AsynchronousMachineKind") + if (EnumSymbol.substr(0, pos) != "AsynchronousMachineKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,12 +50,12 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "generator") + if (EnumSymbol == "generator") { rop = AsynchronousMachineKind::generator; return lop; } - if(EnumSymbol == "motor") + if (EnumSymbol == "motor") { rop = AsynchronousMachineKind::motor; return lop; diff --git a/CGMES_2.4.15_27JAN2020/AsynchronousMachineKind.hpp b/CGMES_2.4.15_27JAN2020/AsynchronousMachineKind.hpp index 8b8e54e57..f82a69df1 100644 --- a/CGMES_2.4.15_27JAN2020/AsynchronousMachineKind.hpp +++ b/CGMES_2.4.15_27JAN2020/AsynchronousMachineKind.hpp @@ -9,21 +9,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Kind of Asynchronous Machine. - */ + /** \brief Kind of Asynchronous Machine. */ class AsynchronousMachineKind { public: enum AsynchronousMachineKind_ENUM { - /** - * The Asynchronous Machine is a generator. - */ + /** The Asynchronous Machine is a generator. */ generator, - /** - * The Asynchronous Machine is a motor. - */ + /** The Asynchronous Machine is a motor. */ motor, }; diff --git a/CGMES_2.4.15_27JAN2020/AsynchronousMachineTimeConstantReactance.cpp b/CGMES_2.4.15_27JAN2020/AsynchronousMachineTimeConstantReactance.cpp index dd33a441b..4f8d1492d 100644 --- a/CGMES_2.4.15_27JAN2020/AsynchronousMachineTimeConstantReactance.cpp +++ b/CGMES_2.4.15_27JAN2020/AsynchronousMachineTimeConstantReactance.cpp @@ -8,16 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -AsynchronousMachineTimeConstantReactance::AsynchronousMachineTimeConstantReactance() {}; -AsynchronousMachineTimeConstantReactance::~AsynchronousMachineTimeConstantReactance() {}; +AsynchronousMachineTimeConstantReactance::AsynchronousMachineTimeConstantReactance() {} +AsynchronousMachineTimeConstantReactance::~AsynchronousMachineTimeConstantReactance() {} static const std::list PossibleProfilesForClass = { @@ -48,77 +43,80 @@ AsynchronousMachineTimeConstantReactance::getPossibleProfilesForAttributes() con return map; } - -bool assign_AsynchronousMachineTimeConstantReactance_tpo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineTimeConstantReactance_tpo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachineTimeConstantReactance_tppo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineTimeConstantReactance_tppo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tppo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachineTimeConstantReactance_xp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineTimeConstantReactance_xp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachineTimeConstantReactance_xpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineTimeConstantReactance_xpp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xpp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachineTimeConstantReactance_xs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineTimeConstantReactance_xs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_AsynchronousMachineTimeConstantReactance_tpo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpo; if (!buffer.str().empty()) @@ -132,7 +130,8 @@ bool get_AsynchronousMachineTimeConstantReactance_tpo(const BaseClass* BaseClass bool get_AsynchronousMachineTimeConstantReactance_tppo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tppo; if (!buffer.str().empty()) @@ -146,7 +145,8 @@ bool get_AsynchronousMachineTimeConstantReactance_tppo(const BaseClass* BaseClas bool get_AsynchronousMachineTimeConstantReactance_xp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xp; if (!buffer.str().empty()) @@ -160,7 +160,8 @@ bool get_AsynchronousMachineTimeConstantReactance_xp(const BaseClass* BaseClass_ bool get_AsynchronousMachineTimeConstantReactance_xpp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xpp; if (!buffer.str().empty()) @@ -174,7 +175,8 @@ bool get_AsynchronousMachineTimeConstantReactance_xpp(const BaseClass* BaseClass bool get_AsynchronousMachineTimeConstantReactance_xs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xs; if (!buffer.str().empty()) @@ -186,8 +188,6 @@ bool get_AsynchronousMachineTimeConstantReactance_xs(const BaseClass* BaseClass_ return false; } - - const char AsynchronousMachineTimeConstantReactance::debugName[] = "AsynchronousMachineTimeConstantReactance"; const char* AsynchronousMachineTimeConstantReactance::debugString() const { @@ -196,16 +196,16 @@ const char* AsynchronousMachineTimeConstantReactance::debugString() const void AsynchronousMachineTimeConstantReactance::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AsynchronousMachineTimeConstantReactance"), &AsynchronousMachineTimeConstantReactance_factory)); + factory_map.emplace("cim:AsynchronousMachineTimeConstantReactance", &AsynchronousMachineTimeConstantReactance_factory); } void AsynchronousMachineTimeConstantReactance::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineTimeConstantReactance.tpo"), &assign_AsynchronousMachineTimeConstantReactance_tpo)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineTimeConstantReactance.tppo"), &assign_AsynchronousMachineTimeConstantReactance_tppo)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineTimeConstantReactance.xp"), &assign_AsynchronousMachineTimeConstantReactance_xp)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineTimeConstantReactance.xpp"), &assign_AsynchronousMachineTimeConstantReactance_xpp)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineTimeConstantReactance.xs"), &assign_AsynchronousMachineTimeConstantReactance_xs)); + assign_map.emplace("cim:AsynchronousMachineTimeConstantReactance.tpo", &assign_AsynchronousMachineTimeConstantReactance_tpo); + assign_map.emplace("cim:AsynchronousMachineTimeConstantReactance.tppo", &assign_AsynchronousMachineTimeConstantReactance_tppo); + assign_map.emplace("cim:AsynchronousMachineTimeConstantReactance.xp", &assign_AsynchronousMachineTimeConstantReactance_xp); + assign_map.emplace("cim:AsynchronousMachineTimeConstantReactance.xpp", &assign_AsynchronousMachineTimeConstantReactance_xpp); + assign_map.emplace("cim:AsynchronousMachineTimeConstantReactance.xs", &assign_AsynchronousMachineTimeConstantReactance_xs); } void AsynchronousMachineTimeConstantReactance::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/AsynchronousMachineTimeConstantReactance.hpp b/CGMES_2.4.15_27JAN2020/AsynchronousMachineTimeConstantReactance.hpp index bdce8fd68..8c5a0b3f6 100644 --- a/CGMES_2.4.15_27JAN2020/AsynchronousMachineTimeConstantReactance.hpp +++ b/CGMES_2.4.15_27JAN2020/AsynchronousMachineTimeConstantReactance.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The parameters used for models expressed in time constant reactance form include: - */ + /** \brief The parameters used for models expressed in time constant reactance form include: */ class AsynchronousMachineTimeConstantReactance : public AsynchronousMachineDynamics { public: @@ -28,11 +26,20 @@ namespace CIMPP AsynchronousMachineTimeConstantReactance(); ~AsynchronousMachineTimeConstantReactance() override; - CIMPP::Seconds tpo; /* Transient rotor time constant (T`o) (> T``o). Typical Value = 5. Default: nullptr */ - CIMPP::Seconds tppo; /* Subtransient rotor time constant (T``o) (> 0). Typical Value = 0.03. Default: nullptr */ - CIMPP::PU xp; /* Transient reactance (unsaturated) (X`) (>=X``). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU xpp; /* Subtransient reactance (unsaturated) (X``) (> Xl). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU xs; /* Synchronous reactance (Xs) (>= X`). Typical Value = 1.8. Default: nullptr */ + /** \brief Transient rotor time constant (T`o) (> T``o). Typical Value = 5. Default: nullptr */ + CIMPP::Seconds tpo; + + /** \brief Subtransient rotor time constant (T``o) (> 0). Typical Value = 0.03. Default: nullptr */ + CIMPP::Seconds tppo; + + /** \brief Transient reactance (unsaturated) (X`) (>=X``). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU xp; + + /** \brief Subtransient reactance (unsaturated) (X``) (> Xl). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU xpp; + + /** \brief Synchronous reactance (Xs) (>= X`). Typical Value = 1.8. Default: nullptr */ + CIMPP::PU xs; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/AsynchronousMachineUserDefined.cpp b/CGMES_2.4.15_27JAN2020/AsynchronousMachineUserDefined.cpp index dd1fad853..df2454abf 100644 --- a/CGMES_2.4.15_27JAN2020/AsynchronousMachineUserDefined.cpp +++ b/CGMES_2.4.15_27JAN2020/AsynchronousMachineUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -AsynchronousMachineUserDefined::AsynchronousMachineUserDefined() {}; -AsynchronousMachineUserDefined::~AsynchronousMachineUserDefined() {}; +AsynchronousMachineUserDefined::AsynchronousMachineUserDefined() {} +AsynchronousMachineUserDefined::~AsynchronousMachineUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ AsynchronousMachineUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_AsynchronousMachineUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (AsynchronousMachineUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_AsynchronousMachineUserDefined(BaseClass*, BaseClass*); bool assign_AsynchronousMachineUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_AsynchronousMachineUserDefined_ProprietaryParameterDynamics(BaseClas return false; } +bool assign_AsynchronousMachineUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + AsynchronousMachineUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_AsynchronousMachineUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_AsynchronousMachineUserDefined_proprietary(const BaseClass* BaseClass_p return false; } - - const char AsynchronousMachineUserDefined::debugName[] = "AsynchronousMachineUserDefined"; const char* AsynchronousMachineUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* AsynchronousMachineUserDefined::debugString() const void AsynchronousMachineUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AsynchronousMachineUserDefined"), &AsynchronousMachineUserDefined_factory)); + factory_map.emplace("cim:AsynchronousMachineUserDefined", &AsynchronousMachineUserDefined_factory); } void AsynchronousMachineUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineUserDefined.proprietary"), &assign_AsynchronousMachineUserDefined_proprietary)); + assign_map.emplace("cim:AsynchronousMachineUserDefined.proprietary", &assign_AsynchronousMachineUserDefined_proprietary); } void AsynchronousMachineUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineUserDefined.ProprietaryParameterDynamics"), &assign_AsynchronousMachineUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:AsynchronousMachineUserDefined.ProprietaryParameterDynamics", &assign_AsynchronousMachineUserDefined_ProprietaryParameterDynamics); } void AsynchronousMachineUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/AsynchronousMachineUserDefined.hpp b/CGMES_2.4.15_27JAN2020/AsynchronousMachineUserDefined.hpp index 5aa08aed8..76f2416f2 100644 --- a/CGMES_2.4.15_27JAN2020/AsynchronousMachineUserDefined.hpp +++ b/CGMES_2.4.15_27JAN2020/AsynchronousMachineUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Asynchronous machine whose dynamic behaviour is described by a user-defined model. - */ + /** \brief Asynchronous machine whose dynamic behaviour is described by a user-defined model. */ class AsynchronousMachineUserDefined : public AsynchronousMachineDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP AsynchronousMachineUserDefined(); ~AsynchronousMachineUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/BaseVoltage.cpp b/CGMES_2.4.15_27JAN2020/BaseVoltage.cpp index 23fb97916..b4ba1e5da 100644 --- a/CGMES_2.4.15_27JAN2020/BaseVoltage.cpp +++ b/CGMES_2.4.15_27JAN2020/BaseVoltage.cpp @@ -12,12 +12,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "TopologicalNode.hpp" #include "TransformerEnd.hpp" #include "VoltageLevel.hpp" -#include "Voltage.hpp" using namespace CIMPP; -BaseVoltage::BaseVoltage() {}; -BaseVoltage::~BaseVoltage() {}; +BaseVoltage::BaseVoltage() {} +BaseVoltage::~BaseVoltage() {} static const std::list PossibleProfilesForClass = { @@ -51,21 +50,6 @@ BaseVoltage::getPossibleProfilesForAttributes() const return map; } - -bool assign_BaseVoltage_nominalVoltage(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (BaseVoltage* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->nominalVoltage; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ConductingEquipment_BaseVoltage(BaseClass*, BaseClass*); bool assign_BaseVoltage_ConductingEquipment(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -82,6 +66,7 @@ bool assign_BaseVoltage_ConductingEquipment(BaseClass* BaseClass_ptr1, BaseClass } return false; } + bool assign_TopologicalNode_BaseVoltage(BaseClass*, BaseClass*); bool assign_BaseVoltage_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -98,6 +83,7 @@ bool assign_BaseVoltage_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* Ba } return false; } + bool assign_TransformerEnd_BaseVoltage(BaseClass*, BaseClass*); bool assign_BaseVoltage_TransformerEnds(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -114,6 +100,7 @@ bool assign_BaseVoltage_TransformerEnds(BaseClass* BaseClass_ptr1, BaseClass* Ba } return false; } + bool assign_VoltageLevel_BaseVoltage(BaseClass*, BaseClass*); bool assign_BaseVoltage_VoltageLevel(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -131,9 +118,28 @@ bool assign_BaseVoltage_VoltageLevel(BaseClass* BaseClass_ptr1, BaseClass* BaseC return false; } +bool assign_BaseVoltage_nominalVoltage(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + BaseVoltage* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->nominalVoltage; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + + + + bool get_BaseVoltage_nominalVoltage(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const BaseVoltage* element = dynamic_cast(BaseClass_ptr1)) + const BaseVoltage* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nominalVoltage; if (!buffer.str().empty()) @@ -145,8 +151,6 @@ bool get_BaseVoltage_nominalVoltage(const BaseClass* BaseClass_ptr1, std::string return false; } - - const char BaseVoltage::debugName[] = "BaseVoltage"; const char* BaseVoltage::debugString() const { @@ -155,20 +159,20 @@ const char* BaseVoltage::debugString() const void BaseVoltage::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:BaseVoltage"), &BaseVoltage_factory)); + factory_map.emplace("cim:BaseVoltage", &BaseVoltage_factory); } void BaseVoltage::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:BaseVoltage.nominalVoltage"), &assign_BaseVoltage_nominalVoltage)); + assign_map.emplace("cim:BaseVoltage.nominalVoltage", &assign_BaseVoltage_nominalVoltage); } void BaseVoltage::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:BaseVoltage.ConductingEquipment"), &assign_BaseVoltage_ConductingEquipment)); - assign_map.insert(std::make_pair(std::string("cim:BaseVoltage.TopologicalNode"), &assign_BaseVoltage_TopologicalNode)); - assign_map.insert(std::make_pair(std::string("cim:BaseVoltage.TransformerEnds"), &assign_BaseVoltage_TransformerEnds)); - assign_map.insert(std::make_pair(std::string("cim:BaseVoltage.VoltageLevel"), &assign_BaseVoltage_VoltageLevel)); + assign_map.emplace("cim:BaseVoltage.ConductingEquipment", &assign_BaseVoltage_ConductingEquipment); + assign_map.emplace("cim:BaseVoltage.TopologicalNode", &assign_BaseVoltage_TopologicalNode); + assign_map.emplace("cim:BaseVoltage.TransformerEnds", &assign_BaseVoltage_TransformerEnds); + assign_map.emplace("cim:BaseVoltage.VoltageLevel", &assign_BaseVoltage_VoltageLevel); } void BaseVoltage::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/BaseVoltage.hpp b/CGMES_2.4.15_27JAN2020/BaseVoltage.hpp index 1faae4d7a..5e04e5f8a 100644 --- a/CGMES_2.4.15_27JAN2020/BaseVoltage.hpp +++ b/CGMES_2.4.15_27JAN2020/BaseVoltage.hpp @@ -21,9 +21,7 @@ namespace CIMPP class TransformerEnd; class VoltageLevel; - /* - Defines a system base voltage which is referenced. - */ + /** \brief Defines a system base voltage which is referenced. */ class BaseVoltage : public IdentifiedObject { public: @@ -31,11 +29,20 @@ namespace CIMPP BaseVoltage(); ~BaseVoltage() override; - std::list ConductingEquipment; /* Base voltage of this conducting equipment. Use only when there is no voltage level container used and only one base voltage applies. For example, not used for transformers. Default: 0 */ - std::list TopologicalNode; /* The topological nodes at the base voltage. Default: 0 */ - std::list TransformerEnds; /* Transformer ends at the base voltage. This is essential for PU calculation. Default: 0 */ - std::list VoltageLevel; /* The voltage levels having this base voltage. Default: 0 */ - CIMPP::Voltage nominalVoltage; /* The power system resource`s base voltage. Default: nullptr */ + /** \brief Base voltage of this conducting equipment. Use only when there is no voltage level container used and only one base voltage applies. For example, not used for transformers. Default: 0 */ + std::list ConductingEquipment; + + /** \brief The topological nodes at the base voltage. Default: 0 */ + std::list TopologicalNode; + + /** \brief Transformer ends at the base voltage. This is essential for PU calculation. Default: 0 */ + std::list TransformerEnds; + + /** \brief The voltage levels having this base voltage. Default: 0 */ + std::list VoltageLevel; + + /** \brief The power system resource`s base voltage. Default: nullptr */ + CIMPP::Voltage nominalVoltage; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/BasicIntervalSchedule.cpp b/CGMES_2.4.15_27JAN2020/BasicIntervalSchedule.cpp index 876fcee65..2daa4c674 100644 --- a/CGMES_2.4.15_27JAN2020/BasicIntervalSchedule.cpp +++ b/CGMES_2.4.15_27JAN2020/BasicIntervalSchedule.cpp @@ -8,14 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "DateTime.hpp" -#include "UnitSymbol.hpp" -#include "UnitSymbol.hpp" using namespace CIMPP; -BasicIntervalSchedule::BasicIntervalSchedule() {}; -BasicIntervalSchedule::~BasicIntervalSchedule() {}; +BasicIntervalSchedule::BasicIntervalSchedule() {} +BasicIntervalSchedule::~BasicIntervalSchedule() {} static const std::list PossibleProfilesForClass = { @@ -44,51 +41,52 @@ BasicIntervalSchedule::getPossibleProfilesForAttributes() const return map; } - -bool assign_BasicIntervalSchedule_startTime(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_BasicIntervalSchedule_startTime(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->startTime = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_BasicIntervalSchedule_value1Unit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_BasicIntervalSchedule_value1Unit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->value1Unit; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_BasicIntervalSchedule_value2Unit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_BasicIntervalSchedule_value2Unit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->value2Unit; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_BasicIntervalSchedule_startTime(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + const BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->startTime; if (!buffer.str().empty()) @@ -100,11 +98,10 @@ bool get_BasicIntervalSchedule_startTime(const BaseClass* BaseClass_ptr1, std::s return false; } - - bool get_BasicIntervalSchedule_value1Unit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + const BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value1Unit; if (!buffer.str().empty()) @@ -118,7 +115,8 @@ bool get_BasicIntervalSchedule_value1Unit(const BaseClass* BaseClass_ptr1, std:: bool get_BasicIntervalSchedule_value2Unit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + const BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value2Unit; if (!buffer.str().empty()) @@ -138,14 +136,14 @@ const char* BasicIntervalSchedule::debugString() const void BasicIntervalSchedule::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:BasicIntervalSchedule"), &BasicIntervalSchedule_factory)); + factory_map.emplace("cim:BasicIntervalSchedule", &BasicIntervalSchedule_factory); } void BasicIntervalSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:BasicIntervalSchedule.startTime"), &assign_BasicIntervalSchedule_startTime)); - assign_map.insert(std::make_pair(std::string("cim:BasicIntervalSchedule.value1Unit"), &assign_BasicIntervalSchedule_value1Unit)); - assign_map.insert(std::make_pair(std::string("cim:BasicIntervalSchedule.value2Unit"), &assign_BasicIntervalSchedule_value2Unit)); + assign_map.emplace("cim:BasicIntervalSchedule.startTime", &assign_BasicIntervalSchedule_startTime); + assign_map.emplace("cim:BasicIntervalSchedule.value1Unit", &assign_BasicIntervalSchedule_value1Unit); + assign_map.emplace("cim:BasicIntervalSchedule.value2Unit", &assign_BasicIntervalSchedule_value2Unit); } void BasicIntervalSchedule::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/BasicIntervalSchedule.hpp b/CGMES_2.4.15_27JAN2020/BasicIntervalSchedule.hpp index b629ba700..610f2e7d6 100644 --- a/CGMES_2.4.15_27JAN2020/BasicIntervalSchedule.hpp +++ b/CGMES_2.4.15_27JAN2020/BasicIntervalSchedule.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Schedule of values at points in time. - */ + /** \brief Schedule of values at points in time. */ class BasicIntervalSchedule : public IdentifiedObject { public: @@ -28,9 +26,14 @@ namespace CIMPP BasicIntervalSchedule(); ~BasicIntervalSchedule() override; - CIMPP::DateTime startTime; /* The time for the first time point. Default: '' */ - CIMPP::UnitSymbol value1Unit; /* Value1 units of measure. Default: 0 */ - CIMPP::UnitSymbol value2Unit; /* Value2 units of measure. Default: 0 */ + /** \brief The time for the first time point. Default: '' */ + CIMPP::DateTime startTime; + + /** \brief Value1 units of measure. Default: 0 */ + CIMPP::UnitSymbol value1Unit; + + /** \brief Value2 units of measure. Default: 0 */ + CIMPP::UnitSymbol value2Unit; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Bay.cpp b/CGMES_2.4.15_27JAN2020/Bay.cpp index c951dd9ec..bf629aae8 100644 --- a/CGMES_2.4.15_27JAN2020/Bay.cpp +++ b/CGMES_2.4.15_27JAN2020/Bay.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Bay::Bay() : VoltageLevel(nullptr) {}; -Bay::~Bay() {}; +Bay::Bay() : VoltageLevel(nullptr) {} +Bay::~Bay() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ Bay::getPossibleProfilesForAttributes() const return map; } - - bool assign_VoltageLevel_Bays(BaseClass*, BaseClass*); bool assign_Bay_VoltageLevel(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_Bay_VoltageLevel(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr return false; } - bool get_Bay_VoltageLevel(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Bay* element = dynamic_cast(BaseClass_ptr1)) + const Bay* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->VoltageLevel != 0) { @@ -73,7 +71,6 @@ bool get_Bay_VoltageLevel(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Bay"), &Bay_factory)); + factory_map.emplace("cim:Bay", &Bay_factory); } void Bay::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void Bay::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Bay.VoltageLevel"), &assign_Bay_VoltageLevel)); + assign_map.emplace("cim:Bay.VoltageLevel", &assign_Bay_VoltageLevel); } void Bay::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/Bay.hpp b/CGMES_2.4.15_27JAN2020/Bay.hpp index b9ff9679a..7d30425e4 100644 --- a/CGMES_2.4.15_27JAN2020/Bay.hpp +++ b/CGMES_2.4.15_27JAN2020/Bay.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class VoltageLevel; - /* - A collection of power system resources (within a given substation) including conducting equipment, protection relays, measurements, and telemetry. A bay typically represents a physical grouping related to modularization of equipment. - */ + /** \brief A collection of power system resources (within a given substation) including conducting equipment, protection relays, measurements, and telemetry. A bay typically represents a physical grouping related to modularization of equipment. */ class Bay : public EquipmentContainer { public: @@ -27,7 +25,8 @@ namespace CIMPP Bay(); ~Bay() override; - CIMPP::VoltageLevel* VoltageLevel; /* The voltage level containing this bay. Default: 0 */ + /** \brief The voltage level containing this bay. Default: 0 */ + CIMPP::VoltageLevel* VoltageLevel; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Breaker.cpp b/CGMES_2.4.15_27JAN2020/Breaker.cpp index 88a01ff00..034b1ee93 100644 --- a/CGMES_2.4.15_27JAN2020/Breaker.cpp +++ b/CGMES_2.4.15_27JAN2020/Breaker.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Breaker::Breaker() {}; -Breaker::~Breaker() {}; +Breaker::Breaker() {} +Breaker::~Breaker() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ Breaker::getPossibleProfilesForAttributes() const return map; } - - - - - const char Breaker::debugName[] = "Breaker"; const char* Breaker::debugString() const { @@ -52,7 +47,7 @@ const char* Breaker::debugString() const void Breaker::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Breaker"), &Breaker_factory)); + factory_map.emplace("cim:Breaker", &Breaker_factory); } void Breaker::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/Breaker.hpp b/CGMES_2.4.15_27JAN2020/Breaker.hpp index d760e2518..812da0f56 100644 --- a/CGMES_2.4.15_27JAN2020/Breaker.hpp +++ b/CGMES_2.4.15_27JAN2020/Breaker.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A mechanical switching device capable of making, carrying, and breaking currents under normal circuit conditions and also making, carrying for a specified time, and breaking currents under specified abnormal circuit conditions e.g. those of short circuit. - */ + /** \brief A mechanical switching device capable of making, carrying, and breaking currents under normal circuit conditions and also making, carrying for a specified time, and breaking currents under specified abnormal circuit conditions e.g. those of short circuit. */ class Breaker : public ProtectedSwitch { public: @@ -26,7 +24,6 @@ namespace CIMPP Breaker(); ~Breaker() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/BusNameMarker.cpp b/CGMES_2.4.15_27JAN2020/BusNameMarker.cpp index ed137f2f8..24a10645f 100644 --- a/CGMES_2.4.15_27JAN2020/BusNameMarker.cpp +++ b/CGMES_2.4.15_27JAN2020/BusNameMarker.cpp @@ -8,14 +8,13 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "ReportingGroup.hpp" #include "ACDCTerminal.hpp" -#include "Integer.hpp" +#include "ReportingGroup.hpp" using namespace CIMPP; -BusNameMarker::BusNameMarker() : ReportingGroup(nullptr) {}; -BusNameMarker::~BusNameMarker() {}; +BusNameMarker::BusNameMarker() : ReportingGroup(nullptr) {} +BusNameMarker::~BusNameMarker() {} static const std::list PossibleProfilesForClass = { @@ -44,21 +43,6 @@ BusNameMarker::getPossibleProfilesForAttributes() const return map; } - -bool assign_BusNameMarker_priority(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (BusNameMarker* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->priority; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ReportingGroup_BusNameMarker(BaseClass*, BaseClass*); bool assign_BusNameMarker_ReportingGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -75,6 +59,7 @@ bool assign_BusNameMarker_ReportingGroup(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_ACDCTerminal_BusNameMarker(BaseClass*, BaseClass*); bool assign_BusNameMarker_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -92,24 +77,24 @@ bool assign_BusNameMarker_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseCla return false; } -bool get_BusNameMarker_priority(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_BusNameMarker_priority(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const BusNameMarker* element = dynamic_cast(BaseClass_ptr1)) + BusNameMarker* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->priority; - if (!buffer.str().empty()) + buffer >> element->priority; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_BusNameMarker_ReportingGroup(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const BusNameMarker* element = dynamic_cast(BaseClass_ptr1)) + const BusNameMarker* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ReportingGroup != 0) { @@ -121,6 +106,21 @@ bool get_BusNameMarker_ReportingGroup(const BaseClass* BaseClass_ptr1, std::list } +bool get_BusNameMarker_priority(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const BusNameMarker* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->priority; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + const char BusNameMarker::debugName[] = "BusNameMarker"; const char* BusNameMarker::debugString() const { @@ -129,18 +129,18 @@ const char* BusNameMarker::debugString() const void BusNameMarker::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:BusNameMarker"), &BusNameMarker_factory)); + factory_map.emplace("cim:BusNameMarker", &BusNameMarker_factory); } void BusNameMarker::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:BusNameMarker.priority"), &assign_BusNameMarker_priority)); + assign_map.emplace("cim:BusNameMarker.priority", &assign_BusNameMarker_priority); } void BusNameMarker::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:BusNameMarker.ReportingGroup"), &assign_BusNameMarker_ReportingGroup)); - assign_map.insert(std::make_pair(std::string("cim:BusNameMarker.Terminal"), &assign_BusNameMarker_Terminal)); + assign_map.emplace("cim:BusNameMarker.ReportingGroup", &assign_BusNameMarker_ReportingGroup); + assign_map.emplace("cim:BusNameMarker.Terminal", &assign_BusNameMarker_Terminal); } void BusNameMarker::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/BusNameMarker.hpp b/CGMES_2.4.15_27JAN2020/BusNameMarker.hpp index b3b3ec87f..7aa5a6d42 100644 --- a/CGMES_2.4.15_27JAN2020/BusNameMarker.hpp +++ b/CGMES_2.4.15_27JAN2020/BusNameMarker.hpp @@ -19,9 +19,7 @@ namespace CIMPP class ACDCTerminal; class ReportingGroup; - /* - Used to apply user standard names to topology buses. Typically used for "bus/branch" case generation. Associated with one or more terminals that are normally connected with the bus name. The associated terminals are normally connected by non-retained switches. For a ring bus station configuration, all busbar terminals in the ring are typically associated. For a breaker and a half scheme, both busbars would normally be associated. For a ring bus, all busbars would normally be associated. For a "straight" busbar configuration, normally only the main terminal at the busbar would be associated. - */ + /** \brief Used to apply user standard names to topology buses. Typically used for "bus/branch" case generation. Associated with one or more terminals that are normally connected with the bus name. The associated terminals are normally connected by non-retained switches. For a ring bus station configuration, all busbar terminals in the ring are typically associated. For a breaker and a half scheme, both busbars would normally be associated. For a ring bus, all busbars would normally be associated. For a "straight" busbar configuration, normally only the main terminal at the busbar would be associated. */ class BusNameMarker : public IdentifiedObject { public: @@ -29,9 +27,14 @@ namespace CIMPP BusNameMarker(); ~BusNameMarker() override; - CIMPP::ReportingGroup* ReportingGroup; /* The bus name markers that belong to this reporting group. Default: 0 */ - std::list Terminal; /* The terminals associated with this bus name marker. Default: 0 */ - CIMPP::Integer priority; /* Priority of bus name marker for use as topology bus name. Use 0 for don t care. Use 1 for highest priority. Use 2 as priority is less than 1 and so on. Default: 0 */ + /** \brief The bus name markers that belong to this reporting group. Default: 0 */ + CIMPP::ReportingGroup* ReportingGroup; + + /** \brief The terminals associated with this bus name marker. Default: 0 */ + std::list Terminal; + + /** \brief Priority of bus name marker for use as topology bus name. Use 0 for don t care. Use 1 for highest priority. Use 2 as priority is less than 1 and so on. Default: 0 */ + CIMPP::Integer priority; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/BusbarSection.cpp b/CGMES_2.4.15_27JAN2020/BusbarSection.cpp index f655a5c56..2b6048953 100644 --- a/CGMES_2.4.15_27JAN2020/BusbarSection.cpp +++ b/CGMES_2.4.15_27JAN2020/BusbarSection.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "CurrentFlow.hpp" using namespace CIMPP; -BusbarSection::BusbarSection() {}; -BusbarSection::~BusbarSection() {}; +BusbarSection::BusbarSection() {} +BusbarSection::~BusbarSection() {} static const std::list PossibleProfilesForClass = { @@ -40,25 +39,24 @@ BusbarSection::getPossibleProfilesForAttributes() const return map; } - -bool assign_BusbarSection_ipMax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_BusbarSection_ipMax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (BusbarSection* element = dynamic_cast(BaseClass_ptr1)) + BusbarSection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ipMax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_BusbarSection_ipMax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const BusbarSection* element = dynamic_cast(BaseClass_ptr1)) + const BusbarSection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ipMax; if (!buffer.str().empty()) @@ -70,8 +68,6 @@ bool get_BusbarSection_ipMax(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char BusbarSection::debugName[] = "BusbarSection"; const char* BusbarSection::debugString() const { @@ -80,12 +76,12 @@ const char* BusbarSection::debugString() const void BusbarSection::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:BusbarSection"), &BusbarSection_factory)); + factory_map.emplace("cim:BusbarSection", &BusbarSection_factory); } void BusbarSection::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:BusbarSection.ipMax"), &assign_BusbarSection_ipMax)); + assign_map.emplace("cim:BusbarSection.ipMax", &assign_BusbarSection_ipMax); } void BusbarSection::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/BusbarSection.hpp b/CGMES_2.4.15_27JAN2020/BusbarSection.hpp index f51b76da1..1fa53d221 100644 --- a/CGMES_2.4.15_27JAN2020/BusbarSection.hpp +++ b/CGMES_2.4.15_27JAN2020/BusbarSection.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A conductor, or group of conductors, with negligible impedance, that serve to connect other conducting equipment within a single substation. Voltage measurements are typically obtained from VoltageTransformers that are connected to busbar sections. A bus bar section may have many physical terminals but for analysis is modelled with exactly one logical terminal. - */ + /** \brief A conductor, or group of conductors, with negligible impedance, that serve to connect other conducting equipment within a single substation. Voltage measurements are typically obtained from VoltageTransformers that are connected to busbar sections. A bus bar section may have many physical terminals but for analysis is modelled with exactly one logical terminal. */ class BusbarSection : public Connector { public: @@ -27,7 +25,8 @@ namespace CIMPP BusbarSection(); ~BusbarSection() override; - CIMPP::CurrentFlow ipMax; /* Maximum allowable peak short-circuit current of busbar (Ipmax in the IEC 60909-0). Mechanical limit of the busbar in the substation itself. Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + /** \brief Maximum allowable peak short-circuit current of busbar (Ipmax in the IEC 60909-0). Mechanical limit of the busbar in the substation itself. Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::CurrentFlow ipMax; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/CGMESProfile.cpp b/CGMES_2.4.15_27JAN2020/CGMESProfile.cpp index ebabd3380..8f6a230cc 100644 --- a/CGMES_2.4.15_27JAN2020/CGMESProfile.cpp +++ b/CGMES_2.4.15_27JAN2020/CGMESProfile.cpp @@ -59,8 +59,6 @@ static const std::map> ProfileURIs = { CGMESProfile::TP_BD, { "http://entsoe.eu/CIM/TopologyBoundary/3/1", } }, }; -static const std::string CimNamespace = "http://iec.ch/TC57/2013/CIM-schema-cim16#"; - const std::list& getProfileList() { @@ -126,9 +124,3 @@ getProfileFromLongName(const std::string& name) } return UnknownProfile; } - -std::string -getCimNamespace() -{ - return CimNamespace; -} diff --git a/CGMES_2.4.15_27JAN2020/CGMESProfile.hpp b/CGMES_2.4.15_27JAN2020/CGMESProfile.hpp index 727c67459..f05e22e4b 100644 --- a/CGMES_2.4.15_27JAN2020/CGMESProfile.hpp +++ b/CGMES_2.4.15_27JAN2020/CGMESProfile.hpp @@ -31,6 +31,4 @@ const std::list& getProfileURIs(CGMESProfile profile); CGMESProfile getProfileFromShortName(const std::string& name); CGMESProfile getProfileFromLongName(const std::string& name); -std::string getCimNamespace(); - -#endif // CGMESPROFILE_HPP +#endif diff --git a/CGMES_2.4.15_27JAN2020/CIMClassList.hpp b/CGMES_2.4.15_27JAN2020/CIMClassList.hpp index 8a65daee6..09bc2fc2d 100644 --- a/CGMES_2.4.15_27JAN2020/CIMClassList.hpp +++ b/CGMES_2.4.15_27JAN2020/CIMClassList.hpp @@ -3,9 +3,14 @@ /* Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen */ + #include + +#include "BaseClassDefiner.hpp" #include "IEC61970.hpp" + using namespace CIMPP; + static std::list CIMClassList = { ACDCConverter::declare(), @@ -406,4 +411,4 @@ static std::list CIMClassList = WindType3or4UserDefined::declare(), UnknownType::declare(), }; -#endif // CIMCLASSLIST_H +#endif diff --git a/CGMES_2.4.15_27JAN2020/Capacitance.hpp b/CGMES_2.4.15_27JAN2020/Capacitance.hpp index 0f2f8bad2..f08217712 100644 --- a/CGMES_2.4.15_27JAN2020/Capacitance.hpp +++ b/CGMES_2.4.15_27JAN2020/Capacitance.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Capacitive part of reactance (imaginary part of impedance), at rated frequency. - */ + /** \brief Capacitive part of reactance (imaginary part of impedance), at rated frequency. */ class Capacitance { public: diff --git a/CGMES_2.4.15_27JAN2020/CapacitancePerLength.hpp b/CGMES_2.4.15_27JAN2020/CapacitancePerLength.hpp index b38d961b2..78266a09e 100644 --- a/CGMES_2.4.15_27JAN2020/CapacitancePerLength.hpp +++ b/CGMES_2.4.15_27JAN2020/CapacitancePerLength.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Capacitance per unit of length. - */ + /** \brief Capacitance per unit of length. */ class CapacitancePerLength { public: diff --git a/CGMES_2.4.15_27JAN2020/CimConstants.cpp b/CGMES_2.4.15_27JAN2020/CimConstants.cpp new file mode 100644 index 000000000..3aa765859 --- /dev/null +++ b/CGMES_2.4.15_27JAN2020/CimConstants.cpp @@ -0,0 +1,14 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "CimConstants.hpp" + +const std::string CimVersion = "cgmes_v2_4_15"; + +const std::map NamespaceMap = +{ + { "cim", "http://iec.ch/TC57/2013/CIM-schema-cim16#" }, + { "entsoe", "http://entsoe.eu/CIM/SchemaExtension/3/1#" }, + { "md", "http://iec.ch/TC57/61970-552/ModelDescription/1#" }, + { "rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#" }, +}; diff --git a/CGMES_2.4.15_27JAN2020/CimConstants.hpp b/CGMES_2.4.15_27JAN2020/CimConstants.hpp new file mode 100644 index 000000000..124197842 --- /dev/null +++ b/CGMES_2.4.15_27JAN2020/CimConstants.hpp @@ -0,0 +1,16 @@ +#ifndef CIM_CONSTANTS_HPP +#define CIM_CONSTANTS_HPP +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +/** \brief CIM version string. */ +extern const std::string CimVersion; + +/** \brief Default namespaces used by CGMES. Map of namespace key to URL. */ +extern const std::map NamespaceMap; + +#endif diff --git a/CGMES_2.4.15_27JAN2020/Command.cpp b/CGMES_2.4.15_27JAN2020/Command.cpp index f12035edf..7a02eb36a 100644 --- a/CGMES_2.4.15_27JAN2020/Command.cpp +++ b/CGMES_2.4.15_27JAN2020/Command.cpp @@ -10,13 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "DiscreteValue.hpp" #include "ValueAliasSet.hpp" -#include "Integer.hpp" -#include "Integer.hpp" using namespace CIMPP; -Command::Command() : DiscreteValue(nullptr), ValueAliasSet(nullptr) {}; -Command::~Command() {}; +Command::Command() : DiscreteValue(nullptr), ValueAliasSet(nullptr) {} +Command::~Command() {} static const std::list PossibleProfilesForClass = { @@ -46,34 +44,6 @@ Command::getPossibleProfilesForAttributes() const return map; } - -bool assign_Command_normalValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (Command* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->normalValue; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_Command_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (Command* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->value; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_DiscreteValue_Command(BaseClass*, BaseClass*); bool assign_Command_DiscreteValue(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -90,6 +60,7 @@ bool assign_Command_DiscreteValue(BaseClass* BaseClass_ptr1, BaseClass* BaseClas } return false; } + bool assign_ValueAliasSet_Commands(BaseClass*, BaseClass*); bool assign_Command_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -107,38 +78,38 @@ bool assign_Command_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClas return false; } -bool get_Command_normalValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_Command_normalValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const Command* element = dynamic_cast(BaseClass_ptr1)) + Command* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->normalValue; - if (!buffer.str().empty()) + buffer >> element->normalValue; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_Command_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_Command_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const Command* element = dynamic_cast(BaseClass_ptr1)) + Command* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->value; - if (!buffer.str().empty()) + buffer >> element->value; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_Command_DiscreteValue(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Command* element = dynamic_cast(BaseClass_ptr1)) + const Command* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DiscreteValue != 0) { @@ -151,7 +122,8 @@ bool get_Command_DiscreteValue(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Command* element = dynamic_cast(BaseClass_ptr1)) + const Command* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ValueAliasSet != 0) { @@ -162,6 +134,35 @@ bool get_Command_ValueAliasSet(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->normalValue; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_Command_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const Command* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->value; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char Command::debugName[] = "Command"; const char* Command::debugString() const @@ -171,19 +172,19 @@ const char* Command::debugString() const void Command::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Command"), &Command_factory)); + factory_map.emplace("cim:Command", &Command_factory); } void Command::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Command.normalValue"), &assign_Command_normalValue)); - assign_map.insert(std::make_pair(std::string("cim:Command.value"), &assign_Command_value)); + assign_map.emplace("cim:Command.normalValue", &assign_Command_normalValue); + assign_map.emplace("cim:Command.value", &assign_Command_value); } void Command::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Command.DiscreteValue"), &assign_Command_DiscreteValue)); - assign_map.insert(std::make_pair(std::string("cim:Command.ValueAliasSet"), &assign_Command_ValueAliasSet)); + assign_map.emplace("cim:Command.DiscreteValue", &assign_Command_DiscreteValue); + assign_map.emplace("cim:Command.ValueAliasSet", &assign_Command_ValueAliasSet); } void Command::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/Command.hpp b/CGMES_2.4.15_27JAN2020/Command.hpp index 0c3e01e02..e91f39202 100644 --- a/CGMES_2.4.15_27JAN2020/Command.hpp +++ b/CGMES_2.4.15_27JAN2020/Command.hpp @@ -19,9 +19,7 @@ namespace CIMPP class DiscreteValue; class ValueAliasSet; - /* - A Command is a discrete control used for supervisory control. - */ + /** \brief A Command is a discrete control used for supervisory control. */ class Command : public Control { public: @@ -29,10 +27,17 @@ namespace CIMPP Command(); ~Command() override; - CIMPP::DiscreteValue* DiscreteValue; /* The Control variable associated with the MeasurementValue. Default: 0 */ - CIMPP::ValueAliasSet* ValueAliasSet; /* The ValueAliasSet used for translation of a Control value to a name. Default: 0 */ - CIMPP::Integer normalValue; /* Normal value for Control.value e.g. used for percentage scaling. Default: 0 */ - CIMPP::Integer value; /* The value representing the actuator output. Default: 0 */ + /** \brief The Control variable associated with the MeasurementValue. Default: 0 */ + CIMPP::DiscreteValue* DiscreteValue; + + /** \brief The ValueAliasSet used for translation of a Control value to a name. Default: 0 */ + CIMPP::ValueAliasSet* ValueAliasSet; + + /** \brief Normal value for Control.value e.g. used for percentage scaling. Default: 0 */ + CIMPP::Integer normalValue; + + /** \brief The value representing the actuator output. Default: 0 */ + CIMPP::Integer value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Conductance.hpp b/CGMES_2.4.15_27JAN2020/Conductance.hpp index 6a99df04e..08f09a881 100644 --- a/CGMES_2.4.15_27JAN2020/Conductance.hpp +++ b/CGMES_2.4.15_27JAN2020/Conductance.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Factor by which voltage must be multiplied to give corresponding power lost from a circuit. Real part of admittance. - */ + /** \brief Factor by which voltage must be multiplied to give corresponding power lost from a circuit. Real part of admittance. */ class Conductance { public: diff --git a/CGMES_2.4.15_27JAN2020/ConductingEquipment.cpp b/CGMES_2.4.15_27JAN2020/ConductingEquipment.cpp index 90458111d..77cbe0b92 100644 --- a/CGMES_2.4.15_27JAN2020/ConductingEquipment.cpp +++ b/CGMES_2.4.15_27JAN2020/ConductingEquipment.cpp @@ -14,8 +14,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ConductingEquipment::ConductingEquipment() : BaseVoltage(nullptr), SvStatus(nullptr) {}; -ConductingEquipment::~ConductingEquipment() {}; +ConductingEquipment::ConductingEquipment() : BaseVoltage(nullptr), SvStatus(nullptr) {} +ConductingEquipment::~ConductingEquipment() {} static const std::list PossibleProfilesForClass = { @@ -48,8 +48,6 @@ ConductingEquipment::getPossibleProfilesForAttributes() const return map; } - - bool assign_BaseVoltage_ConductingEquipment(BaseClass*, BaseClass*); bool assign_ConductingEquipment_BaseVoltage(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -66,6 +64,7 @@ bool assign_ConductingEquipment_BaseVoltage(BaseClass* BaseClass_ptr1, BaseClass } return false; } + bool assign_SvStatus_ConductingEquipment(BaseClass*, BaseClass*); bool assign_ConductingEquipment_SvStatus(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -82,6 +81,7 @@ bool assign_ConductingEquipment_SvStatus(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_Terminal_ConductingEquipment(BaseClass*, BaseClass*); bool assign_ConductingEquipment_Terminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -99,10 +99,10 @@ bool assign_ConductingEquipment_Terminals(BaseClass* BaseClass_ptr1, BaseClass* return false; } - bool get_ConductingEquipment_BaseVoltage(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ConductingEquipment* element = dynamic_cast(BaseClass_ptr1)) + const ConductingEquipment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->BaseVoltage != 0) { @@ -114,6 +114,7 @@ bool get_ConductingEquipment_BaseVoltage(const BaseClass* BaseClass_ptr1, std::l } + const char ConductingEquipment::debugName[] = "ConductingEquipment"; const char* ConductingEquipment::debugString() const { @@ -122,7 +123,7 @@ const char* ConductingEquipment::debugString() const void ConductingEquipment::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ConductingEquipment"), &ConductingEquipment_factory)); + factory_map.emplace("cim:ConductingEquipment", &ConductingEquipment_factory); } void ConductingEquipment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -131,9 +132,9 @@ void ConductingEquipment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ConductingEquipment.BaseVoltage"), &assign_ConductingEquipment_BaseVoltage)); - assign_map.insert(std::make_pair(std::string("cim:ConductingEquipment.SvStatus"), &assign_ConductingEquipment_SvStatus)); - assign_map.insert(std::make_pair(std::string("cim:ConductingEquipment.Terminals"), &assign_ConductingEquipment_Terminals)); + assign_map.emplace("cim:ConductingEquipment.BaseVoltage", &assign_ConductingEquipment_BaseVoltage); + assign_map.emplace("cim:ConductingEquipment.SvStatus", &assign_ConductingEquipment_SvStatus); + assign_map.emplace("cim:ConductingEquipment.Terminals", &assign_ConductingEquipment_Terminals); } void ConductingEquipment::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/ConductingEquipment.hpp b/CGMES_2.4.15_27JAN2020/ConductingEquipment.hpp index 43ce2c7e5..633a41871 100644 --- a/CGMES_2.4.15_27JAN2020/ConductingEquipment.hpp +++ b/CGMES_2.4.15_27JAN2020/ConductingEquipment.hpp @@ -19,9 +19,7 @@ namespace CIMPP class SvStatus; class Terminal; - /* - The parts of the AC power system that are designed to carry current or that are conductively connected through terminals. - */ + /** \brief The parts of the AC power system that are designed to carry current or that are conductively connected through terminals. */ class ConductingEquipment : public Equipment { public: @@ -29,9 +27,14 @@ namespace CIMPP ConductingEquipment(); ~ConductingEquipment() override; - CIMPP::BaseVoltage* BaseVoltage; /* All conducting equipment with this base voltage. Use only when there is no voltage level container used and only one base voltage applies. For example, not used for transformers. Default: 0 */ - CIMPP::SvStatus* SvStatus; /* The status state variable associated with this conducting equipment. Default: 0 */ - std::list Terminals; /* Conducting equipment have terminals that may be connected to other conducting equipment terminals via connectivity nodes or topological nodes. Default: 0 */ + /** \brief All conducting equipment with this base voltage. Use only when there is no voltage level container used and only one base voltage applies. For example, not used for transformers. Default: 0 */ + CIMPP::BaseVoltage* BaseVoltage; + + /** \brief The status state variable associated with this conducting equipment. Default: 0 */ + CIMPP::SvStatus* SvStatus; + + /** \brief Conducting equipment have terminals that may be connected to other conducting equipment terminals via connectivity nodes or topological nodes. Default: 0 */ + std::list Terminals; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Conductor.cpp b/CGMES_2.4.15_27JAN2020/Conductor.cpp index d0f5a4be4..c3579e253 100644 --- a/CGMES_2.4.15_27JAN2020/Conductor.cpp +++ b/CGMES_2.4.15_27JAN2020/Conductor.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Length.hpp" using namespace CIMPP; -Conductor::Conductor() {}; -Conductor::~Conductor() {}; +Conductor::Conductor() {} +Conductor::~Conductor() {} static const std::list PossibleProfilesForClass = { @@ -40,25 +39,24 @@ Conductor::getPossibleProfilesForAttributes() const return map; } - -bool assign_Conductor_length(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Conductor_length(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Conductor* element = dynamic_cast(BaseClass_ptr1)) + Conductor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->length; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_Conductor_length(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Conductor* element = dynamic_cast(BaseClass_ptr1)) + const Conductor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->length; if (!buffer.str().empty()) @@ -70,8 +68,6 @@ bool get_Conductor_length(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char Conductor::debugName[] = "Conductor"; const char* Conductor::debugString() const { @@ -80,12 +76,12 @@ const char* Conductor::debugString() const void Conductor::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Conductor"), &Conductor_factory)); + factory_map.emplace("cim:Conductor", &Conductor_factory); } void Conductor::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Conductor.length"), &assign_Conductor_length)); + assign_map.emplace("cim:Conductor.length", &assign_Conductor_length); } void Conductor::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/Conductor.hpp b/CGMES_2.4.15_27JAN2020/Conductor.hpp index f37df48b9..cb84bd42d 100644 --- a/CGMES_2.4.15_27JAN2020/Conductor.hpp +++ b/CGMES_2.4.15_27JAN2020/Conductor.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Combination of conducting material with consistent electrical characteristics, building a single electrical system, used to carry current between points in the power system. - */ + /** \brief Combination of conducting material with consistent electrical characteristics, building a single electrical system, used to carry current between points in the power system. */ class Conductor : public ConductingEquipment { public: @@ -27,7 +25,8 @@ namespace CIMPP Conductor(); ~Conductor() override; - CIMPP::Length length; /* Segment length for calculating line section capabilities Default: nullptr */ + /** \brief Segment length for calculating line section capabilities Default: nullptr */ + CIMPP::Length length; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ConformLoad.cpp b/CGMES_2.4.15_27JAN2020/ConformLoad.cpp index a71db54b1..ab5e59f20 100644 --- a/CGMES_2.4.15_27JAN2020/ConformLoad.cpp +++ b/CGMES_2.4.15_27JAN2020/ConformLoad.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ConformLoad::ConformLoad() : LoadGroup(nullptr) {}; -ConformLoad::~ConformLoad() {}; +ConformLoad::ConformLoad() : LoadGroup(nullptr) {} +ConformLoad::~ConformLoad() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ ConformLoad::getPossibleProfilesForAttributes() const return map; } - - bool assign_ConformLoadGroup_EnergyConsumers(BaseClass*, BaseClass*); bool assign_ConformLoad_LoadGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,10 +58,10 @@ bool assign_ConformLoad_LoadGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClas return false; } - bool get_ConformLoad_LoadGroup(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ConformLoad* element = dynamic_cast(BaseClass_ptr1)) + const ConformLoad* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->LoadGroup != 0) { @@ -74,7 +72,6 @@ bool get_ConformLoad_LoadGroup(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ConformLoad"), &ConformLoad_factory)); + factory_map.emplace("cim:ConformLoad", &ConformLoad_factory); } void ConformLoad::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -92,7 +89,7 @@ void ConformLoad::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ConformLoad.LoadGroup"), &assign_ConformLoad_LoadGroup)); + assign_map.emplace("cim:ConformLoad.LoadGroup", &assign_ConformLoad_LoadGroup); } void ConformLoad::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/ConformLoad.hpp b/CGMES_2.4.15_27JAN2020/ConformLoad.hpp index 31946d05a..0448c6f96 100644 --- a/CGMES_2.4.15_27JAN2020/ConformLoad.hpp +++ b/CGMES_2.4.15_27JAN2020/ConformLoad.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class ConformLoadGroup; - /* - ConformLoad represent loads that follow a daily load change pattern where the pattern can be used to scale the load with a system load. - */ + /** \brief ConformLoad represent loads that follow a daily load change pattern where the pattern can be used to scale the load with a system load. */ class ConformLoad : public EnergyConsumer { public: @@ -27,7 +25,8 @@ namespace CIMPP ConformLoad(); ~ConformLoad() override; - CIMPP::ConformLoadGroup* LoadGroup; /* Group of this ConformLoad. Default: 0 */ + /** \brief Group of this ConformLoad. Default: 0 */ + CIMPP::ConformLoadGroup* LoadGroup; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ConformLoadGroup.cpp b/CGMES_2.4.15_27JAN2020/ConformLoadGroup.cpp index cccde6cb4..c8d5c15fa 100644 --- a/CGMES_2.4.15_27JAN2020/ConformLoadGroup.cpp +++ b/CGMES_2.4.15_27JAN2020/ConformLoadGroup.cpp @@ -8,13 +8,13 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "ConformLoadSchedule.hpp" #include "ConformLoad.hpp" +#include "ConformLoadSchedule.hpp" using namespace CIMPP; -ConformLoadGroup::ConformLoadGroup() {}; -ConformLoadGroup::~ConformLoadGroup() {}; +ConformLoadGroup::ConformLoadGroup() {} +ConformLoadGroup::~ConformLoadGroup() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ ConformLoadGroup::getPossibleProfilesForAttributes() const return map; } - - bool assign_ConformLoadSchedule_ConformLoadGroup(BaseClass*, BaseClass*); bool assign_ConformLoadGroup_ConformLoadSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_ConformLoadGroup_ConformLoadSchedules(BaseClass* BaseClass_ptr1, Bas } return false; } + bool assign_ConformLoad_LoadGroup(BaseClass*, BaseClass*); bool assign_ConformLoadGroup_EnergyConsumers(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -87,7 +86,7 @@ const char* ConformLoadGroup::debugString() const void ConformLoadGroup::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ConformLoadGroup"), &ConformLoadGroup_factory)); + factory_map.emplace("cim:ConformLoadGroup", &ConformLoadGroup_factory); } void ConformLoadGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -96,8 +95,8 @@ void ConformLoadGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ConformLoadGroup.ConformLoadSchedules"), &assign_ConformLoadGroup_ConformLoadSchedules)); - assign_map.insert(std::make_pair(std::string("cim:ConformLoadGroup.EnergyConsumers"), &assign_ConformLoadGroup_EnergyConsumers)); + assign_map.emplace("cim:ConformLoadGroup.ConformLoadSchedules", &assign_ConformLoadGroup_ConformLoadSchedules); + assign_map.emplace("cim:ConformLoadGroup.EnergyConsumers", &assign_ConformLoadGroup_EnergyConsumers); } void ConformLoadGroup::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/ConformLoadGroup.hpp b/CGMES_2.4.15_27JAN2020/ConformLoadGroup.hpp index 9c9ab4de7..5e59426da 100644 --- a/CGMES_2.4.15_27JAN2020/ConformLoadGroup.hpp +++ b/CGMES_2.4.15_27JAN2020/ConformLoadGroup.hpp @@ -18,9 +18,7 @@ namespace CIMPP class ConformLoad; class ConformLoadSchedule; - /* - A group of loads conforming to an allocation pattern. - */ + /** \brief A group of loads conforming to an allocation pattern. */ class ConformLoadGroup : public LoadGroup { public: @@ -28,8 +26,11 @@ namespace CIMPP ConformLoadGroup(); ~ConformLoadGroup() override; - std::list ConformLoadSchedules; /* The ConformLoadSchedules in the ConformLoadGroup. Default: 0 */ - std::list EnergyConsumers; /* Conform loads assigned to this ConformLoadGroup. Default: 0 */ + /** \brief The ConformLoadSchedules in the ConformLoadGroup. Default: 0 */ + std::list ConformLoadSchedules; + + /** \brief Conform loads assigned to this ConformLoadGroup. Default: 0 */ + std::list EnergyConsumers; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ConformLoadSchedule.cpp b/CGMES_2.4.15_27JAN2020/ConformLoadSchedule.cpp index 5f93ccf7f..51bb1e07b 100644 --- a/CGMES_2.4.15_27JAN2020/ConformLoadSchedule.cpp +++ b/CGMES_2.4.15_27JAN2020/ConformLoadSchedule.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ConformLoadSchedule::ConformLoadSchedule() : ConformLoadGroup(nullptr) {}; -ConformLoadSchedule::~ConformLoadSchedule() {}; +ConformLoadSchedule::ConformLoadSchedule() : ConformLoadGroup(nullptr) {} +ConformLoadSchedule::~ConformLoadSchedule() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ ConformLoadSchedule::getPossibleProfilesForAttributes() const return map; } - - bool assign_ConformLoadGroup_ConformLoadSchedules(BaseClass*, BaseClass*); bool assign_ConformLoadSchedule_ConformLoadGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_ConformLoadSchedule_ConformLoadGroup(BaseClass* BaseClass_ptr1, Base return false; } - bool get_ConformLoadSchedule_ConformLoadGroup(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ConformLoadSchedule* element = dynamic_cast(BaseClass_ptr1)) + const ConformLoadSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ConformLoadGroup != 0) { @@ -73,7 +71,6 @@ bool get_ConformLoadSchedule_ConformLoadGroup(const BaseClass* BaseClass_ptr1, s return false; } - const char ConformLoadSchedule::debugName[] = "ConformLoadSchedule"; const char* ConformLoadSchedule::debugString() const { @@ -82,7 +79,7 @@ const char* ConformLoadSchedule::debugString() const void ConformLoadSchedule::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ConformLoadSchedule"), &ConformLoadSchedule_factory)); + factory_map.emplace("cim:ConformLoadSchedule", &ConformLoadSchedule_factory); } void ConformLoadSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void ConformLoadSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ConformLoadSchedule.ConformLoadGroup"), &assign_ConformLoadSchedule_ConformLoadGroup)); + assign_map.emplace("cim:ConformLoadSchedule.ConformLoadGroup", &assign_ConformLoadSchedule_ConformLoadGroup); } void ConformLoadSchedule::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/ConformLoadSchedule.hpp b/CGMES_2.4.15_27JAN2020/ConformLoadSchedule.hpp index 9712fa6c4..72fd6f6af 100644 --- a/CGMES_2.4.15_27JAN2020/ConformLoadSchedule.hpp +++ b/CGMES_2.4.15_27JAN2020/ConformLoadSchedule.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class ConformLoadGroup; - /* - A curve of load versus time (X-axis) showing the active power values (Y1-axis) and reactive power (Y2-axis) for each unit of the period covered. This curve represents a typical pattern of load over the time period for a given day type and season. - */ + /** \brief A curve of load versus time (X-axis) showing the active power values (Y1-axis) and reactive power (Y2-axis) for each unit of the period covered. This curve represents a typical pattern of load over the time period for a given day type and season. */ class ConformLoadSchedule : public SeasonDayTypeSchedule { public: @@ -27,7 +25,8 @@ namespace CIMPP ConformLoadSchedule(); ~ConformLoadSchedule() override; - CIMPP::ConformLoadGroup* ConformLoadGroup; /* The ConformLoadGroup where the ConformLoadSchedule belongs. Default: 0 */ + /** \brief The ConformLoadGroup where the ConformLoadSchedule belongs. Default: 0 */ + CIMPP::ConformLoadGroup* ConformLoadGroup; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ConnectivityNode.cpp b/CGMES_2.4.15_27JAN2020/ConnectivityNode.cpp index 556c354ae..a387855d6 100644 --- a/CGMES_2.4.15_27JAN2020/ConnectivityNode.cpp +++ b/CGMES_2.4.15_27JAN2020/ConnectivityNode.cpp @@ -11,18 +11,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "ConnectivityNodeContainer.hpp" #include "Terminal.hpp" #include "TopologicalNode.hpp" -#include "Boolean.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -ConnectivityNode::ConnectivityNode() : ConnectivityNodeContainer(nullptr), TopologicalNode(nullptr) {}; -ConnectivityNode::~ConnectivityNode() {}; +ConnectivityNode::ConnectivityNode() : ConnectivityNodeContainer(nullptr), TopologicalNode(nullptr) {} +ConnectivityNode::~ConnectivityNode() {} static const std::list PossibleProfilesForClass = { @@ -61,151 +54,188 @@ ConnectivityNode::getPossibleProfilesForAttributes() const return map; } +bool assign_ConnectivityNodeContainer_ConnectivityNodes(BaseClass*, BaseClass*); +bool assign_ConnectivityNode_ConnectivityNodeContainer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + ConnectivityNodeContainer* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ConnectivityNodeContainer != element2) + { + element->ConnectivityNodeContainer = element2; + return assign_ConnectivityNodeContainer_ConnectivityNodes(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_ConnectivityNode_boundaryPoint(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Terminal_ConnectivityNode(BaseClass*, BaseClass*); +bool assign_ConnectivityNode_Terminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->boundaryPoint; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->Terminals.begin(), element->Terminals.end(), element2) == element->Terminals.end()) + { + element->Terminals.push_back(element2); + return assign_Terminal_ConnectivityNode(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_ConnectivityNode_fromEndIsoCode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologicalNode_ConnectivityNodes(BaseClass*, BaseClass*); +bool assign_ConnectivityNode_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - element->fromEndIsoCode = buffer.str(); - if (buffer.fail()) - return false; - else - return true; + if (element->TopologicalNode != element2) + { + element->TopologicalNode = element2; + return assign_TopologicalNode_ConnectivityNodes(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_ConnectivityNode_fromEndName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ConnectivityNode_boundaryPoint(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - element->fromEndName = buffer.str(); - if (buffer.fail()) - return false; - else + buffer >> element->boundaryPoint; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ConnectivityNode_fromEndNameTso(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ConnectivityNode_fromEndIsoCode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - element->fromEndNameTso = buffer.str(); - if (buffer.fail()) - return false; - else + element->fromEndIsoCode = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ConnectivityNode_toEndIsoCode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ConnectivityNode_fromEndName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - element->toEndIsoCode = buffer.str(); - if (buffer.fail()) - return false; - else + element->fromEndName = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ConnectivityNode_toEndName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ConnectivityNode_fromEndNameTso(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - element->toEndName = buffer.str(); - if (buffer.fail()) - return false; - else + element->fromEndNameTso = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ConnectivityNode_toEndNameTso(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ConnectivityNode_toEndIsoCode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - element->toEndNameTso = buffer.str(); - if (buffer.fail()) - return false; - else + element->toEndIsoCode = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_ConnectivityNodeContainer_ConnectivityNodes(BaseClass*, BaseClass*); -bool assign_ConnectivityNode_ConnectivityNodeContainer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_ConnectivityNode_toEndName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); - ConnectivityNodeContainer* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->ConnectivityNodeContainer != element2) + element->toEndName = buffer.str(); + if (!buffer.fail()) { - element->ConnectivityNodeContainer = element2; - return assign_ConnectivityNodeContainer_ConnectivityNodes(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_Terminal_ConnectivityNode(BaseClass*, BaseClass*); -bool assign_ConnectivityNode_Terminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_ConnectivityNode_toEndNameTso(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); - Terminal* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->Terminals.begin(), element->Terminals.end(), element2) == element->Terminals.end()) + element->toEndNameTso = buffer.str(); + if (!buffer.fail()) { - element->Terminals.push_back(element2); - return assign_Terminal_ConnectivityNode(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_TopologicalNode_ConnectivityNodes(BaseClass*, BaseClass*); -bool assign_ConnectivityNode_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool get_ConnectivityNode_ConnectivityNodeContainer(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); - TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->TopologicalNode != element2) + if (element->ConnectivityNodeContainer != 0) { - element->TopologicalNode = element2; - return assign_TopologicalNode_ConnectivityNodes(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->ConnectivityNodeContainer); + return true; + } + } + return false; +} + + +bool get_ConnectivityNode_TopologicalNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) +{ + const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + if (element->TopologicalNode != 0) + { + BaseClass_list.push_back(element->TopologicalNode); + return true; } - return true; } return false; } bool get_ConnectivityNode_boundaryPoint(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->boundaryPoint; if (!buffer.str().empty()) @@ -219,7 +249,8 @@ bool get_ConnectivityNode_boundaryPoint(const BaseClass* BaseClass_ptr1, std::st bool get_ConnectivityNode_fromEndIsoCode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fromEndIsoCode; if (!buffer.str().empty()) @@ -233,7 +264,8 @@ bool get_ConnectivityNode_fromEndIsoCode(const BaseClass* BaseClass_ptr1, std::s bool get_ConnectivityNode_fromEndName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fromEndName; if (!buffer.str().empty()) @@ -247,7 +279,8 @@ bool get_ConnectivityNode_fromEndName(const BaseClass* BaseClass_ptr1, std::stri bool get_ConnectivityNode_fromEndNameTso(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fromEndNameTso; if (!buffer.str().empty()) @@ -261,7 +294,8 @@ bool get_ConnectivityNode_fromEndNameTso(const BaseClass* BaseClass_ptr1, std::s bool get_ConnectivityNode_toEndIsoCode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->toEndIsoCode; if (!buffer.str().empty()) @@ -275,7 +309,8 @@ bool get_ConnectivityNode_toEndIsoCode(const BaseClass* BaseClass_ptr1, std::str bool get_ConnectivityNode_toEndName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->toEndName; if (!buffer.str().empty()) @@ -289,7 +324,8 @@ bool get_ConnectivityNode_toEndName(const BaseClass* BaseClass_ptr1, std::string bool get_ConnectivityNode_toEndNameTso(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->toEndNameTso; if (!buffer.str().empty()) @@ -301,34 +337,6 @@ bool get_ConnectivityNode_toEndNameTso(const BaseClass* BaseClass_ptr1, std::str return false; } - -bool get_ConnectivityNode_ConnectivityNodeContainer(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->ConnectivityNodeContainer != 0) - { - BaseClass_list.push_back(element->ConnectivityNodeContainer); - return true; - } - } - return false; -} - -bool get_ConnectivityNode_TopologicalNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->TopologicalNode != 0) - { - BaseClass_list.push_back(element->TopologicalNode); - return true; - } - } - return false; -} - - const char ConnectivityNode::debugName[] = "ConnectivityNode"; const char* ConnectivityNode::debugString() const { @@ -337,25 +345,25 @@ const char* ConnectivityNode::debugString() const void ConnectivityNode::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ConnectivityNode"), &ConnectivityNode_factory)); + factory_map.emplace("cim:ConnectivityNode", &ConnectivityNode_factory); } void ConnectivityNode::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNode.boundaryPoint"), &assign_ConnectivityNode_boundaryPoint)); - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNode.fromEndIsoCode"), &assign_ConnectivityNode_fromEndIsoCode)); - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNode.fromEndName"), &assign_ConnectivityNode_fromEndName)); - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNode.fromEndNameTso"), &assign_ConnectivityNode_fromEndNameTso)); - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNode.toEndIsoCode"), &assign_ConnectivityNode_toEndIsoCode)); - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNode.toEndName"), &assign_ConnectivityNode_toEndName)); - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNode.toEndNameTso"), &assign_ConnectivityNode_toEndNameTso)); + assign_map.emplace("cim:ConnectivityNode.boundaryPoint", &assign_ConnectivityNode_boundaryPoint); + assign_map.emplace("cim:ConnectivityNode.fromEndIsoCode", &assign_ConnectivityNode_fromEndIsoCode); + assign_map.emplace("cim:ConnectivityNode.fromEndName", &assign_ConnectivityNode_fromEndName); + assign_map.emplace("cim:ConnectivityNode.fromEndNameTso", &assign_ConnectivityNode_fromEndNameTso); + assign_map.emplace("cim:ConnectivityNode.toEndIsoCode", &assign_ConnectivityNode_toEndIsoCode); + assign_map.emplace("cim:ConnectivityNode.toEndName", &assign_ConnectivityNode_toEndName); + assign_map.emplace("cim:ConnectivityNode.toEndNameTso", &assign_ConnectivityNode_toEndNameTso); } void ConnectivityNode::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNode.ConnectivityNodeContainer"), &assign_ConnectivityNode_ConnectivityNodeContainer)); - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNode.Terminals"), &assign_ConnectivityNode_Terminals)); - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNode.TopologicalNode"), &assign_ConnectivityNode_TopologicalNode)); + assign_map.emplace("cim:ConnectivityNode.ConnectivityNodeContainer", &assign_ConnectivityNode_ConnectivityNodeContainer); + assign_map.emplace("cim:ConnectivityNode.Terminals", &assign_ConnectivityNode_Terminals); + assign_map.emplace("cim:ConnectivityNode.TopologicalNode", &assign_ConnectivityNode_TopologicalNode); } void ConnectivityNode::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/ConnectivityNode.hpp b/CGMES_2.4.15_27JAN2020/ConnectivityNode.hpp index a9390568d..d6b9bed98 100644 --- a/CGMES_2.4.15_27JAN2020/ConnectivityNode.hpp +++ b/CGMES_2.4.15_27JAN2020/ConnectivityNode.hpp @@ -21,9 +21,7 @@ namespace CIMPP class Terminal; class TopologicalNode; - /* - Connectivity nodes are points where terminals of AC conducting equipment are connected together with zero impedance. - */ + /** \brief Connectivity nodes are points where terminals of AC conducting equipment are connected together with zero impedance. */ class ConnectivityNode : public IdentifiedObject { public: @@ -31,16 +29,35 @@ namespace CIMPP ConnectivityNode(); ~ConnectivityNode() override; - CIMPP::ConnectivityNodeContainer* ConnectivityNodeContainer; /* Container of this connectivity node. Default: 0 */ - std::list Terminals; /* The connectivity node to which this terminal connects with zero impedance. Default: 0 */ - CIMPP::TopologicalNode* TopologicalNode; /* The topological node to which this connectivity node is assigned. May depend on the current state of switches in the network. Default: 0 */ - CIMPP::Boolean boundaryPoint; /* Identifies if a node is a BoundaryPoint. If boundaryPoint=true the ConnectivityNode or the TopologicalNode represents a BoundaryPoint. Default: false */ - CIMPP::String fromEndIsoCode; /* The attribute is used for an exchange of the ISO code of the region to which the `From` side of the Boundary point belongs to or it is connected to. The ISO code is two characters country code as defined by ISO 3166 (). The length of the string is 2 characters maximum. The attribute is a required for the Boundary Model Authority Set where this attribute is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ - CIMPP::String fromEndName; /* The attribute is used for an exchange of a human readable name with length of the string 32 characters maximum. The attribute covers two cases: The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ - CIMPP::String fromEndNameTso; /* The attribute is used for an exchange of the name of the TSO to which the `From` side of the Boundary point belongs to or it is connected to. The length of the string is 32 characters maximum. The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ - CIMPP::String toEndIsoCode; /* The attribute is used for an exchange of the ISO code of the region to which the `To` side of the Boundary point belongs to or it is connected to. The ISO code is two characters country code as defined by ISO 3166 (). The length of the string is 2 characters maximum. The attribute is a required for the Boundary Model Authority Set where this attribute is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ - CIMPP::String toEndName; /* The attribute is used for an exchange of a human readable name with length of the string 32 characters maximum. The attribute covers two cases: The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ - CIMPP::String toEndNameTso; /* The attribute is used for an exchange of the name of the TSO to which the `To` side of the Boundary point belongs to or it is connected to. The length of the string is 32 characters maximum. The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + /** \brief Container of this connectivity node. Default: 0 */ + CIMPP::ConnectivityNodeContainer* ConnectivityNodeContainer; + + /** \brief The connectivity node to which this terminal connects with zero impedance. Default: 0 */ + std::list Terminals; + + /** \brief The topological node to which this connectivity node is assigned. May depend on the current state of switches in the network. Default: 0 */ + CIMPP::TopologicalNode* TopologicalNode; + + /** \brief Identifies if a node is a BoundaryPoint. If boundaryPoint=true the ConnectivityNode or the TopologicalNode represents a BoundaryPoint. Default: false */ + CIMPP::Boolean boundaryPoint; + + /** \brief The attribute is used for an exchange of the ISO code of the region to which the `From` side of the Boundary point belongs to or it is connected to. The ISO code is two characters country code as defined by ISO 3166 (). The length of the string is 2 characters maximum. The attribute is a required for the Boundary Model Authority Set where this attribute is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + CIMPP::String fromEndIsoCode; + + /** \brief The attribute is used for an exchange of a human readable name with length of the string 32 characters maximum. The attribute covers two cases: The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + CIMPP::String fromEndName; + + /** \brief The attribute is used for an exchange of the name of the TSO to which the `From` side of the Boundary point belongs to or it is connected to. The length of the string is 32 characters maximum. The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + CIMPP::String fromEndNameTso; + + /** \brief The attribute is used for an exchange of the ISO code of the region to which the `To` side of the Boundary point belongs to or it is connected to. The ISO code is two characters country code as defined by ISO 3166 (). The length of the string is 2 characters maximum. The attribute is a required for the Boundary Model Authority Set where this attribute is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + CIMPP::String toEndIsoCode; + + /** \brief The attribute is used for an exchange of a human readable name with length of the string 32 characters maximum. The attribute covers two cases: The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + CIMPP::String toEndName; + + /** \brief The attribute is used for an exchange of the name of the TSO to which the `To` side of the Boundary point belongs to or it is connected to. The length of the string is 32 characters maximum. The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + CIMPP::String toEndNameTso; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ConnectivityNodeContainer.cpp b/CGMES_2.4.15_27JAN2020/ConnectivityNodeContainer.cpp index 72607921a..6e3459df3 100644 --- a/CGMES_2.4.15_27JAN2020/ConnectivityNodeContainer.cpp +++ b/CGMES_2.4.15_27JAN2020/ConnectivityNodeContainer.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ConnectivityNodeContainer::ConnectivityNodeContainer() {}; -ConnectivityNodeContainer::~ConnectivityNodeContainer() {}; +ConnectivityNodeContainer::ConnectivityNodeContainer() {} +ConnectivityNodeContainer::~ConnectivityNodeContainer() {} static const std::list PossibleProfilesForClass = { @@ -45,8 +45,6 @@ ConnectivityNodeContainer::getPossibleProfilesForAttributes() const return map; } - - bool assign_ConnectivityNode_ConnectivityNodeContainer(BaseClass*, BaseClass*); bool assign_ConnectivityNodeContainer_ConnectivityNodes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -63,6 +61,7 @@ bool assign_ConnectivityNodeContainer_ConnectivityNodes(BaseClass* BaseClass_ptr } return false; } + bool assign_TopologicalNode_ConnectivityNodeContainer(BaseClass*, BaseClass*); bool assign_ConnectivityNodeContainer_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -90,7 +89,7 @@ const char* ConnectivityNodeContainer::debugString() const void ConnectivityNodeContainer::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ConnectivityNodeContainer"), &ConnectivityNodeContainer_factory)); + factory_map.emplace("cim:ConnectivityNodeContainer", &ConnectivityNodeContainer_factory); } void ConnectivityNodeContainer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -99,8 +98,8 @@ void ConnectivityNodeContainer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNodeContainer.ConnectivityNodes"), &assign_ConnectivityNodeContainer_ConnectivityNodes)); - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNodeContainer.TopologicalNode"), &assign_ConnectivityNodeContainer_TopologicalNode)); + assign_map.emplace("cim:ConnectivityNodeContainer.ConnectivityNodes", &assign_ConnectivityNodeContainer_ConnectivityNodes); + assign_map.emplace("cim:ConnectivityNodeContainer.TopologicalNode", &assign_ConnectivityNodeContainer_TopologicalNode); } void ConnectivityNodeContainer::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/ConnectivityNodeContainer.hpp b/CGMES_2.4.15_27JAN2020/ConnectivityNodeContainer.hpp index 5ceabeeb0..4ab1c963f 100644 --- a/CGMES_2.4.15_27JAN2020/ConnectivityNodeContainer.hpp +++ b/CGMES_2.4.15_27JAN2020/ConnectivityNodeContainer.hpp @@ -18,9 +18,7 @@ namespace CIMPP class ConnectivityNode; class TopologicalNode; - /* - A base class for all objects that may contain connectivity nodes or topological nodes. - */ + /** \brief A base class for all objects that may contain connectivity nodes or topological nodes. */ class ConnectivityNodeContainer : public PowerSystemResource { public: @@ -28,8 +26,11 @@ namespace CIMPP ConnectivityNodeContainer(); ~ConnectivityNodeContainer() override; - std::list ConnectivityNodes; /* Connectivity nodes which belong to this connectivity node container. Default: 0 */ - std::list TopologicalNode; /* The topological nodes which belong to this connectivity node container. Default: 0 */ + /** \brief Connectivity nodes which belong to this connectivity node container. Default: 0 */ + std::list ConnectivityNodes; + + /** \brief The topological nodes which belong to this connectivity node container. Default: 0 */ + std::list TopologicalNode; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Connector.cpp b/CGMES_2.4.15_27JAN2020/Connector.cpp index ffe426068..207f85553 100644 --- a/CGMES_2.4.15_27JAN2020/Connector.cpp +++ b/CGMES_2.4.15_27JAN2020/Connector.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Connector::Connector() {}; -Connector::~Connector() {}; +Connector::Connector() {} +Connector::~Connector() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ Connector::getPossibleProfilesForAttributes() const return map; } - - - - - const char Connector::debugName[] = "Connector"; const char* Connector::debugString() const { @@ -52,7 +47,7 @@ const char* Connector::debugString() const void Connector::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Connector"), &Connector_factory)); + factory_map.emplace("cim:Connector", &Connector_factory); } void Connector::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/Connector.hpp b/CGMES_2.4.15_27JAN2020/Connector.hpp index c1a8e2267..0c319c834 100644 --- a/CGMES_2.4.15_27JAN2020/Connector.hpp +++ b/CGMES_2.4.15_27JAN2020/Connector.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A conductor, or group of conductors, with negligible impedance, that serve to connect other conducting equipment within a single substation and are modelled with a single logical terminal. - */ + /** \brief A conductor, or group of conductors, with negligible impedance, that serve to connect other conducting equipment within a single substation and are modelled with a single logical terminal. */ class Connector : public ConductingEquipment { public: @@ -26,7 +24,6 @@ namespace CIMPP Connector(); ~Connector() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Control.cpp b/CGMES_2.4.15_27JAN2020/Control.cpp index 7cd6c9fd1..9e90ef372 100644 --- a/CGMES_2.4.15_27JAN2020/Control.cpp +++ b/CGMES_2.4.15_27JAN2020/Control.cpp @@ -9,16 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "PowerSystemResource.hpp" -#include "String.hpp" -#include "Boolean.hpp" -#include "DateTime.hpp" -#include "UnitMultiplier.hpp" -#include "UnitSymbol.hpp" using namespace CIMPP; -Control::Control() : PowerSystemResource(nullptr) {}; -Control::~Control() {}; +Control::Control() : PowerSystemResource(nullptr) {} +Control::~Control() {} static const std::list PossibleProfilesForClass = { @@ -50,93 +45,111 @@ Control::getPossibleProfilesForAttributes() const return map; } +bool assign_PowerSystemResource_Controls(BaseClass*, BaseClass*); +bool assign_Control_PowerSystemResource(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Control* element = dynamic_cast(BaseClass_ptr1); + PowerSystemResource* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PowerSystemResource != element2) + { + element->PowerSystemResource = element2; + return assign_PowerSystemResource_Controls(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_Control_controlType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Control_controlType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Control* element = dynamic_cast(BaseClass_ptr1)) + Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->controlType = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Control_operationInProgress(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Control_operationInProgress(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Control* element = dynamic_cast(BaseClass_ptr1)) + Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->operationInProgress; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Control_timeStamp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Control_timeStamp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Control* element = dynamic_cast(BaseClass_ptr1)) + Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->timeStamp = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Control_unitMultiplier(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Control_unitMultiplier(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Control* element = dynamic_cast(BaseClass_ptr1)) + Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->unitMultiplier; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Control_unitSymbol(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Control_unitSymbol(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Control* element = dynamic_cast(BaseClass_ptr1)) + Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->unitSymbol; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_PowerSystemResource_Controls(BaseClass*, BaseClass*); -bool assign_Control_PowerSystemResource(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_Control_PowerSystemResource(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - Control* element = dynamic_cast(BaseClass_ptr1); - PowerSystemResource* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->PowerSystemResource != element2) + if (element->PowerSystemResource != 0) { - element->PowerSystemResource = element2; - return assign_PowerSystemResource_Controls(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->PowerSystemResource); + return true; } - return true; } return false; } bool get_Control_controlType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Control* element = dynamic_cast(BaseClass_ptr1)) + const Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->controlType; if (!buffer.str().empty()) @@ -150,7 +163,8 @@ bool get_Control_controlType(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_Control_operationInProgress(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Control* element = dynamic_cast(BaseClass_ptr1)) + const Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->operationInProgress; if (!buffer.str().empty()) @@ -164,7 +178,8 @@ bool get_Control_operationInProgress(const BaseClass* BaseClass_ptr1, std::strin bool get_Control_timeStamp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Control* element = dynamic_cast(BaseClass_ptr1)) + const Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->timeStamp; if (!buffer.str().empty()) @@ -176,24 +191,10 @@ bool get_Control_timeStamp(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - -bool get_Control_PowerSystemResource(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const Control* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->PowerSystemResource != 0) - { - BaseClass_list.push_back(element->PowerSystemResource); - return true; - } - } - return false; -} - - bool get_Control_unitMultiplier(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Control* element = dynamic_cast(BaseClass_ptr1)) + const Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->unitMultiplier; if (!buffer.str().empty()) @@ -207,7 +208,8 @@ bool get_Control_unitMultiplier(const BaseClass* BaseClass_ptr1, std::stringstre bool get_Control_unitSymbol(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Control* element = dynamic_cast(BaseClass_ptr1)) + const Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->unitSymbol; if (!buffer.str().empty()) @@ -227,21 +229,21 @@ const char* Control::debugString() const void Control::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Control"), &Control_factory)); + factory_map.emplace("cim:Control", &Control_factory); } void Control::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Control.controlType"), &assign_Control_controlType)); - assign_map.insert(std::make_pair(std::string("cim:Control.operationInProgress"), &assign_Control_operationInProgress)); - assign_map.insert(std::make_pair(std::string("cim:Control.timeStamp"), &assign_Control_timeStamp)); - assign_map.insert(std::make_pair(std::string("cim:Control.unitMultiplier"), &assign_Control_unitMultiplier)); - assign_map.insert(std::make_pair(std::string("cim:Control.unitSymbol"), &assign_Control_unitSymbol)); + assign_map.emplace("cim:Control.controlType", &assign_Control_controlType); + assign_map.emplace("cim:Control.operationInProgress", &assign_Control_operationInProgress); + assign_map.emplace("cim:Control.timeStamp", &assign_Control_timeStamp); + assign_map.emplace("cim:Control.unitMultiplier", &assign_Control_unitMultiplier); + assign_map.emplace("cim:Control.unitSymbol", &assign_Control_unitSymbol); } void Control::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Control.PowerSystemResource"), &assign_Control_PowerSystemResource)); + assign_map.emplace("cim:Control.PowerSystemResource", &assign_Control_PowerSystemResource); } void Control::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/Control.hpp b/CGMES_2.4.15_27JAN2020/Control.hpp index 80884239b..f0072bfae 100644 --- a/CGMES_2.4.15_27JAN2020/Control.hpp +++ b/CGMES_2.4.15_27JAN2020/Control.hpp @@ -22,9 +22,7 @@ namespace CIMPP { class PowerSystemResource; - /* - Control is used for supervisory/device control. It represents control outputs that are used to change the state in a process, e.g. close or open breaker, a set point value or a raise lower command. - */ + /** \brief Control is used for supervisory/device control. It represents control outputs that are used to change the state in a process, e.g. close or open breaker, a set point value or a raise lower command. */ class Control : public IdentifiedObject { public: @@ -32,12 +30,23 @@ namespace CIMPP Control(); ~Control() override; - CIMPP::PowerSystemResource* PowerSystemResource; /* The controller outputs used to actually govern a regulating device, e.g. the magnetization of a synchronous machine or capacitor bank breaker actuator. Default: 0 */ - CIMPP::String controlType; /* Specifies the type of Control, e.g. BreakerOn/Off, GeneratorVoltageSetPoint, TieLineFlow etc. The ControlType.name shall be unique among all specified types and describe the type. Default: '' */ - CIMPP::Boolean operationInProgress; /* Indicates that a client is currently sending control commands that has not completed. Default: false */ - CIMPP::DateTime timeStamp; /* The last time a control output was sent. Default: '' */ - CIMPP::UnitMultiplier unitMultiplier; /* The unit multiplier of the controlled quantity. Default: 0 */ - CIMPP::UnitSymbol unitSymbol; /* The unit of measure of the controlled quantity. Default: 0 */ + /** \brief The controller outputs used to actually govern a regulating device, e.g. the magnetization of a synchronous machine or capacitor bank breaker actuator. Default: 0 */ + CIMPP::PowerSystemResource* PowerSystemResource; + + /** \brief Specifies the type of Control, e.g. BreakerOn/Off, GeneratorVoltageSetPoint, TieLineFlow etc. The ControlType.name shall be unique among all specified types and describe the type. Default: '' */ + CIMPP::String controlType; + + /** \brief Indicates that a client is currently sending control commands that has not completed. Default: false */ + CIMPP::Boolean operationInProgress; + + /** \brief The last time a control output was sent. Default: '' */ + CIMPP::DateTime timeStamp; + + /** \brief The unit multiplier of the controlled quantity. Default: 0 */ + CIMPP::UnitMultiplier unitMultiplier; + + /** \brief The unit of measure of the controlled quantity. Default: 0 */ + CIMPP::UnitSymbol unitSymbol; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ControlArea.cpp b/CGMES_2.4.15_27JAN2020/ControlArea.cpp index 28cf13ad4..21c90385d 100644 --- a/CGMES_2.4.15_27JAN2020/ControlArea.cpp +++ b/CGMES_2.4.15_27JAN2020/ControlArea.cpp @@ -11,14 +11,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "ControlAreaGeneratingUnit.hpp" #include "EnergyArea.hpp" #include "TieFlow.hpp" -#include "ActivePower.hpp" -#include "ActivePower.hpp" -#include "ControlAreaTypeKind.hpp" using namespace CIMPP; -ControlArea::ControlArea() : EnergyArea(nullptr) {}; -ControlArea::~ControlArea() {}; +ControlArea::ControlArea() : EnergyArea(nullptr) {} +ControlArea::~ControlArea() {} static const std::list PossibleProfilesForClass = { @@ -51,47 +48,6 @@ ControlArea::getPossibleProfilesForAttributes() const return map; } - -bool assign_ControlArea_netInterchange(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ControlArea* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->netInterchange; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_ControlArea_pTolerance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ControlArea* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->pTolerance; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_ControlArea_type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ControlArea* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->type; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ControlAreaGeneratingUnit_ControlArea(BaseClass*, BaseClass*); bool assign_ControlArea_ControlAreaGeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -108,6 +64,7 @@ bool assign_ControlArea_ControlAreaGeneratingUnit(BaseClass* BaseClass_ptr1, Bas } return false; } + bool assign_EnergyArea_ControlArea(BaseClass*, BaseClass*); bool assign_ControlArea_EnergyArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -124,6 +81,7 @@ bool assign_ControlArea_EnergyArea(BaseClass* BaseClass_ptr1, BaseClass* BaseCla } return false; } + bool assign_TieFlow_ControlArea(BaseClass*, BaseClass*); bool assign_ControlArea_TieFlow(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -141,38 +99,53 @@ bool assign_ControlArea_TieFlow(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ return false; } -bool get_ControlArea_netInterchange(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_ControlArea_netInterchange(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const ControlArea* element = dynamic_cast(BaseClass_ptr1)) + ControlArea* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->netInterchange; - if (!buffer.str().empty()) + buffer >> element->netInterchange; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_ControlArea_pTolerance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_ControlArea_pTolerance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const ControlArea* element = dynamic_cast(BaseClass_ptr1)) + ControlArea* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->pTolerance; - if (!buffer.str().empty()) + buffer >> element->pTolerance; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + +bool assign_ControlArea_type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + ControlArea* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->type; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } bool get_ControlArea_EnergyArea(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ControlArea* element = dynamic_cast(BaseClass_ptr1)) + const ControlArea* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->EnergyArea != 0) { @@ -184,9 +157,40 @@ bool get_ControlArea_EnergyArea(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->netInterchange; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_ControlArea_pTolerance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ControlArea* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->pTolerance; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_ControlArea_type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ControlArea* element = dynamic_cast(BaseClass_ptr1)) + const ControlArea* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->type; if (!buffer.str().empty()) @@ -206,21 +210,21 @@ const char* ControlArea::debugString() const void ControlArea::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ControlArea"), &ControlArea_factory)); + factory_map.emplace("cim:ControlArea", &ControlArea_factory); } void ControlArea::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ControlArea.netInterchange"), &assign_ControlArea_netInterchange)); - assign_map.insert(std::make_pair(std::string("cim:ControlArea.pTolerance"), &assign_ControlArea_pTolerance)); - assign_map.insert(std::make_pair(std::string("cim:ControlArea.type"), &assign_ControlArea_type)); + assign_map.emplace("cim:ControlArea.netInterchange", &assign_ControlArea_netInterchange); + assign_map.emplace("cim:ControlArea.pTolerance", &assign_ControlArea_pTolerance); + assign_map.emplace("cim:ControlArea.type", &assign_ControlArea_type); } void ControlArea::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ControlArea.ControlAreaGeneratingUnit"), &assign_ControlArea_ControlAreaGeneratingUnit)); - assign_map.insert(std::make_pair(std::string("cim:ControlArea.EnergyArea"), &assign_ControlArea_EnergyArea)); - assign_map.insert(std::make_pair(std::string("cim:ControlArea.TieFlow"), &assign_ControlArea_TieFlow)); + assign_map.emplace("cim:ControlArea.ControlAreaGeneratingUnit", &assign_ControlArea_ControlAreaGeneratingUnit); + assign_map.emplace("cim:ControlArea.EnergyArea", &assign_ControlArea_EnergyArea); + assign_map.emplace("cim:ControlArea.TieFlow", &assign_ControlArea_TieFlow); } void ControlArea::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/ControlArea.hpp b/CGMES_2.4.15_27JAN2020/ControlArea.hpp index 7bc7fa50a..cb9d727e4 100644 --- a/CGMES_2.4.15_27JAN2020/ControlArea.hpp +++ b/CGMES_2.4.15_27JAN2020/ControlArea.hpp @@ -21,9 +21,7 @@ namespace CIMPP class EnergyArea; class TieFlow; - /* - A control areais a grouping of generating units and/or loads and a cutset of tie lines (as terminals) which may be used for a variety of purposes including automatic generation control, powerflow solution area interchange control specification, and input to load forecasting. Note that any number of overlapping control area specifications can be superimposed on the physical model. - */ + /** \brief A control areais a grouping of generating units and/or loads and a cutset of tie lines (as terminals) which may be used for a variety of purposes including automatic generation control, powerflow solution area interchange control specification, and input to load forecasting. Note that any number of overlapping control area specifications can be superimposed on the physical model. */ class ControlArea : public PowerSystemResource { public: @@ -31,12 +29,23 @@ namespace CIMPP ControlArea(); ~ControlArea() override; - std::list ControlAreaGeneratingUnit; /* The generating unit specificaitons for the control area. Default: 0 */ - CIMPP::EnergyArea* EnergyArea; /* The energy area that is forecast from this control area specification. Default: 0 */ - std::list TieFlow; /* The tie flows associated with the control area. Default: 0 */ - CIMPP::ActivePower netInterchange; /* The specified positive net interchange into the control area, i.e. positive sign means flow in to the area. Default: nullptr */ - CIMPP::ActivePower pTolerance; /* Active power net interchange tolerance Default: nullptr */ - CIMPP::ControlAreaTypeKind type; /* The primary type of control area definition used to determine if this is used for automatic generation control, for planning interchange control, or other purposes. A control area specified with primary type of automatic generation control could still be forecast and used as an interchange area in power flow analysis. Default: 0 */ + /** \brief The generating unit specificaitons for the control area. Default: 0 */ + std::list ControlAreaGeneratingUnit; + + /** \brief The energy area that is forecast from this control area specification. Default: 0 */ + CIMPP::EnergyArea* EnergyArea; + + /** \brief The tie flows associated with the control area. Default: 0 */ + std::list TieFlow; + + /** \brief The specified positive net interchange into the control area, i.e. positive sign means flow in to the area. Default: nullptr */ + CIMPP::ActivePower netInterchange; + + /** \brief Active power net interchange tolerance Default: nullptr */ + CIMPP::ActivePower pTolerance; + + /** \brief The primary type of control area definition used to determine if this is used for automatic generation control, for planning interchange control, or other purposes. A control area specified with primary type of automatic generation control could still be forecast and used as an interchange area in power flow analysis. Default: 0 */ + CIMPP::ControlAreaTypeKind type; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ControlAreaGeneratingUnit.cpp b/CGMES_2.4.15_27JAN2020/ControlAreaGeneratingUnit.cpp index 8512e2641..907553a54 100644 --- a/CGMES_2.4.15_27JAN2020/ControlAreaGeneratingUnit.cpp +++ b/CGMES_2.4.15_27JAN2020/ControlAreaGeneratingUnit.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ControlAreaGeneratingUnit::ControlAreaGeneratingUnit() : ControlArea(nullptr), GeneratingUnit(nullptr) {}; -ControlAreaGeneratingUnit::~ControlAreaGeneratingUnit() {}; +ControlAreaGeneratingUnit::ControlAreaGeneratingUnit() : ControlArea(nullptr), GeneratingUnit(nullptr) {} +ControlAreaGeneratingUnit::~ControlAreaGeneratingUnit() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ ControlAreaGeneratingUnit::getPossibleProfilesForAttributes() const return map; } - - bool assign_ControlArea_ControlAreaGeneratingUnit(BaseClass*, BaseClass*); bool assign_ControlAreaGeneratingUnit_ControlArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_ControlAreaGeneratingUnit_ControlArea(BaseClass* BaseClass_ptr1, Bas } return false; } + bool assign_GeneratingUnit_ControlAreaGeneratingUnit(BaseClass*, BaseClass*); bool assign_ControlAreaGeneratingUnit_GeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_ControlAreaGeneratingUnit_GeneratingUnit(BaseClass* BaseClass_ptr1, return false; } - bool get_ControlAreaGeneratingUnit_ControlArea(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ControlAreaGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const ControlAreaGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ControlArea != 0) { @@ -93,7 +92,8 @@ bool get_ControlAreaGeneratingUnit_ControlArea(const BaseClass* BaseClass_ptr1, bool get_ControlAreaGeneratingUnit_GeneratingUnit(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ControlAreaGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const ControlAreaGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->GeneratingUnit != 0) { @@ -104,7 +104,6 @@ bool get_ControlAreaGeneratingUnit_GeneratingUnit(const BaseClass* BaseClass_ptr return false; } - const char ControlAreaGeneratingUnit::debugName[] = "ControlAreaGeneratingUnit"; const char* ControlAreaGeneratingUnit::debugString() const { @@ -113,7 +112,7 @@ const char* ControlAreaGeneratingUnit::debugString() const void ControlAreaGeneratingUnit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ControlAreaGeneratingUnit"), &ControlAreaGeneratingUnit_factory)); + factory_map.emplace("cim:ControlAreaGeneratingUnit", &ControlAreaGeneratingUnit_factory); } void ControlAreaGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void ControlAreaGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ControlAreaGeneratingUnit.ControlArea"), &assign_ControlAreaGeneratingUnit_ControlArea)); - assign_map.insert(std::make_pair(std::string("cim:ControlAreaGeneratingUnit.GeneratingUnit"), &assign_ControlAreaGeneratingUnit_GeneratingUnit)); + assign_map.emplace("cim:ControlAreaGeneratingUnit.ControlArea", &assign_ControlAreaGeneratingUnit_ControlArea); + assign_map.emplace("cim:ControlAreaGeneratingUnit.GeneratingUnit", &assign_ControlAreaGeneratingUnit_GeneratingUnit); } void ControlAreaGeneratingUnit::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/ControlAreaGeneratingUnit.hpp b/CGMES_2.4.15_27JAN2020/ControlAreaGeneratingUnit.hpp index 6f41452fa..5dea42c34 100644 --- a/CGMES_2.4.15_27JAN2020/ControlAreaGeneratingUnit.hpp +++ b/CGMES_2.4.15_27JAN2020/ControlAreaGeneratingUnit.hpp @@ -18,9 +18,7 @@ namespace CIMPP class ControlArea; class GeneratingUnit; - /* - A control area generating unit. This class is needed so that alternate control area definitions may include the same generating unit. Note only one instance within a control area should reference a specific generating unit. - */ + /** \brief A control area generating unit. This class is needed so that alternate control area definitions may include the same generating unit. Note only one instance within a control area should reference a specific generating unit. */ class ControlAreaGeneratingUnit : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP ControlAreaGeneratingUnit(); ~ControlAreaGeneratingUnit() override; - CIMPP::ControlArea* ControlArea; /* The parent control area for the generating unit specifications. Default: 0 */ - CIMPP::GeneratingUnit* GeneratingUnit; /* The generating unit specified for this control area. Note that a control area should include a GeneratingUnit only once. Default: 0 */ + /** \brief The parent control area for the generating unit specifications. Default: 0 */ + CIMPP::ControlArea* ControlArea; + + /** \brief The generating unit specified for this control area. Note that a control area should include a GeneratingUnit only once. Default: 0 */ + CIMPP::GeneratingUnit* GeneratingUnit; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ControlAreaTypeKind.cpp b/CGMES_2.4.15_27JAN2020/ControlAreaTypeKind.cpp index 48f6c0cb5..21a7b1dec 100644 --- a/CGMES_2.4.15_27JAN2020/ControlAreaTypeKind.cpp +++ b/CGMES_2.4.15_27JAN2020/ControlAreaTypeKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "ControlAreaTypeKind") + if (EnumSymbol.substr(0, pos) != "ControlAreaTypeKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "AGC") + if (EnumSymbol == "AGC") { rop = ControlAreaTypeKind::AGC; return lop; } - if(EnumSymbol == "Forecast") + if (EnumSymbol == "Forecast") { rop = ControlAreaTypeKind::Forecast; return lop; } - if(EnumSymbol == "Interchange") + if (EnumSymbol == "Interchange") { rop = ControlAreaTypeKind::Interchange; return lop; diff --git a/CGMES_2.4.15_27JAN2020/ControlAreaTypeKind.hpp b/CGMES_2.4.15_27JAN2020/ControlAreaTypeKind.hpp index 025df1d5c..4597eedd8 100644 --- a/CGMES_2.4.15_27JAN2020/ControlAreaTypeKind.hpp +++ b/CGMES_2.4.15_27JAN2020/ControlAreaTypeKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The type of control area. - */ + /** \brief The type of control area. */ class ControlAreaTypeKind { public: enum ControlAreaTypeKind_ENUM { - /** - * Used for automatic generation control. - */ + /** Used for automatic generation control. */ AGC, - /** - * Used for load forecast. - */ + /** Used for load forecast. */ Forecast, - /** - * Used for interchange specification or control. - */ + /** Used for interchange specification or control. */ Interchange, }; diff --git a/CGMES_2.4.15_27JAN2020/CoordinateSystem.cpp b/CGMES_2.4.15_27JAN2020/CoordinateSystem.cpp index 223b2b2c1..56ef9a8b4 100644 --- a/CGMES_2.4.15_27JAN2020/CoordinateSystem.cpp +++ b/CGMES_2.4.15_27JAN2020/CoordinateSystem.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "Location.hpp" -#include "String.hpp" using namespace CIMPP; -CoordinateSystem::CoordinateSystem() {}; -CoordinateSystem::~CoordinateSystem() {}; +CoordinateSystem::CoordinateSystem() {} +CoordinateSystem::~CoordinateSystem() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ CoordinateSystem::getPossibleProfilesForAttributes() const return map; } - -bool assign_CoordinateSystem_crsUrn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (CoordinateSystem* element = dynamic_cast(BaseClass_ptr1)) - { - element->crsUrn = buffer.str(); - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_Location_CoordinateSystem(BaseClass*, BaseClass*); bool assign_CoordinateSystem_Location(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_CoordinateSystem_Location(BaseClass* BaseClass_ptr1, BaseClass* Base return false; } +bool assign_CoordinateSystem_crsUrn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + CoordinateSystem* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + element->crsUrn = buffer.str(); + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_CoordinateSystem_crsUrn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CoordinateSystem* element = dynamic_cast(BaseClass_ptr1)) + const CoordinateSystem* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->crsUrn; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_CoordinateSystem_crsUrn(const BaseClass* BaseClass_ptr1, std::stringstr return false; } - - const char CoordinateSystem::debugName[] = "CoordinateSystem"; const char* CoordinateSystem::debugString() const { @@ -98,17 +96,17 @@ const char* CoordinateSystem::debugString() const void CoordinateSystem::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:CoordinateSystem"), &CoordinateSystem_factory)); + factory_map.emplace("cim:CoordinateSystem", &CoordinateSystem_factory); } void CoordinateSystem::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:CoordinateSystem.crsUrn"), &assign_CoordinateSystem_crsUrn)); + assign_map.emplace("cim:CoordinateSystem.crsUrn", &assign_CoordinateSystem_crsUrn); } void CoordinateSystem::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:CoordinateSystem.Location"), &assign_CoordinateSystem_Location)); + assign_map.emplace("cim:CoordinateSystem.Location", &assign_CoordinateSystem_Location); } void CoordinateSystem::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/CoordinateSystem.hpp b/CGMES_2.4.15_27JAN2020/CoordinateSystem.hpp index 012c88433..46172486a 100644 --- a/CGMES_2.4.15_27JAN2020/CoordinateSystem.hpp +++ b/CGMES_2.4.15_27JAN2020/CoordinateSystem.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class Location; - /* - Coordinate reference system. - */ + /** \brief Coordinate reference system. */ class CoordinateSystem : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP CoordinateSystem(); ~CoordinateSystem() override; - std::list Location; /* All locations described with position points in this coordinate system. Default: 0 */ - CIMPP::String crsUrn; /* A Uniform Resource Name (URN) for the coordinate reference system (crs) used to define `Location.PositionPoints`. An example would be the European Petroleum Survey Group (EPSG) code for a coordinate reference system, defined in URN under the Open Geospatial Consortium (OGC) namespace as: urn:ogc:def:uom:EPSG::XXXX, where XXXX is an EPSG code (a full list of codes can be found at the EPSG Registry web site http://www.epsg-registry.org/). To define the coordinate system as being WGS84 (latitude, longitude) using an EPSG OGC, this attribute would be urn:ogc:def:uom:EPSG::4236. A profile should limit this code to a set of allowed URNs agreed to by all sending and receiving parties. Default: '' */ + /** \brief All locations described with position points in this coordinate system. Default: 0 */ + std::list Location; + + /** \brief A Uniform Resource Name (URN) for the coordinate reference system (crs) used to define `Location.PositionPoints`. An example would be the European Petroleum Survey Group (EPSG) code for a coordinate reference system, defined in URN under the Open Geospatial Consortium (OGC) namespace as: urn:ogc:def:uom:EPSG::XXXX, where XXXX is an EPSG code (a full list of codes can be found at the EPSG Registry web site http://www.epsg-registry.org/). To define the coordinate system as being WGS84 (latitude, longitude) using an EPSG OGC, this attribute would be urn:ogc:def:uom:EPSG::4236. A profile should limit this code to a set of allowed URNs agreed to by all sending and receiving parties. Default: '' */ + CIMPP::String crsUrn; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/CsConverter.cpp b/CGMES_2.4.15_27JAN2020/CsConverter.cpp index 6a9835a20..32000a24e 100644 --- a/CGMES_2.4.15_27JAN2020/CsConverter.cpp +++ b/CGMES_2.4.15_27JAN2020/CsConverter.cpp @@ -8,25 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "AngleDegrees.hpp" -#include "AngleDegrees.hpp" -#include "AngleDegrees.hpp" -#include "AngleDegrees.hpp" -#include "CurrentFlow.hpp" -#include "AngleDegrees.hpp" -#include "AngleDegrees.hpp" -#include "CurrentFlow.hpp" -#include "CsOperatingModeKind.hpp" -#include "CsPpccControlKind.hpp" -#include "CurrentFlow.hpp" -#include "AngleDegrees.hpp" -#include "AngleDegrees.hpp" -#include "CurrentFlow.hpp" using namespace CIMPP; -CsConverter::CsConverter() {}; -CsConverter::~CsConverter() {}; +CsConverter::CsConverter() {} +CsConverter::~CsConverter() {} static const std::list PossibleProfilesForClass = { @@ -68,194 +54,206 @@ CsConverter::getPossibleProfilesForAttributes() const return map; } - -bool assign_CsConverter_alpha(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_alpha(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->alpha; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_gamma(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_gamma(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gamma; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_maxAlpha(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_maxAlpha(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxAlpha; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_maxGamma(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_maxGamma(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxGamma; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_maxIdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_maxIdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxIdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_minAlpha(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_minAlpha(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minAlpha; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_minGamma(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_minGamma(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minGamma; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_minIdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_minIdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minIdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_operatingMode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_operatingMode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->operatingMode; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_pPccControl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_pPccControl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pPccControl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_ratedIdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_ratedIdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedIdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_targetAlpha(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_targetAlpha(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->targetAlpha; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_targetGamma(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_targetGamma(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->targetGamma; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_targetIdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_targetIdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->targetIdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_CsConverter_alpha(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->alpha; if (!buffer.str().empty()) @@ -269,7 +267,8 @@ bool get_CsConverter_alpha(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_CsConverter_gamma(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gamma; if (!buffer.str().empty()) @@ -283,7 +282,8 @@ bool get_CsConverter_gamma(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_CsConverter_maxAlpha(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxAlpha; if (!buffer.str().empty()) @@ -297,7 +297,8 @@ bool get_CsConverter_maxAlpha(const BaseClass* BaseClass_ptr1, std::stringstream bool get_CsConverter_maxGamma(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxGamma; if (!buffer.str().empty()) @@ -311,7 +312,8 @@ bool get_CsConverter_maxGamma(const BaseClass* BaseClass_ptr1, std::stringstream bool get_CsConverter_maxIdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxIdc; if (!buffer.str().empty()) @@ -325,7 +327,8 @@ bool get_CsConverter_maxIdc(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_CsConverter_minAlpha(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minAlpha; if (!buffer.str().empty()) @@ -339,7 +342,8 @@ bool get_CsConverter_minAlpha(const BaseClass* BaseClass_ptr1, std::stringstream bool get_CsConverter_minGamma(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minGamma; if (!buffer.str().empty()) @@ -353,7 +357,8 @@ bool get_CsConverter_minGamma(const BaseClass* BaseClass_ptr1, std::stringstream bool get_CsConverter_minIdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minIdc; if (!buffer.str().empty()) @@ -365,11 +370,12 @@ bool get_CsConverter_minIdc(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } -bool get_CsConverter_ratedIdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_CsConverter_operatingMode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->ratedIdc; + buffer << element->operatingMode; if (!buffer.str().empty()) { return true; @@ -379,11 +385,12 @@ bool get_CsConverter_ratedIdc(const BaseClass* BaseClass_ptr1, std::stringstream return false; } -bool get_CsConverter_targetAlpha(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_CsConverter_pPccControl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->targetAlpha; + buffer << element->pPccControl; if (!buffer.str().empty()) { return true; @@ -393,11 +400,12 @@ bool get_CsConverter_targetAlpha(const BaseClass* BaseClass_ptr1, std::stringstr return false; } -bool get_CsConverter_targetGamma(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_CsConverter_ratedIdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->targetGamma; + buffer << element->ratedIdc; if (!buffer.str().empty()) { return true; @@ -407,11 +415,12 @@ bool get_CsConverter_targetGamma(const BaseClass* BaseClass_ptr1, std::stringstr return false; } -bool get_CsConverter_targetIdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_CsConverter_targetAlpha(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->targetIdc; + buffer << element->targetAlpha; if (!buffer.str().empty()) { return true; @@ -421,13 +430,12 @@ bool get_CsConverter_targetIdc(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } - - -bool get_CsConverter_operatingMode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_CsConverter_targetGamma(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->operatingMode; + buffer << element->targetGamma; if (!buffer.str().empty()) { return true; @@ -437,11 +445,12 @@ bool get_CsConverter_operatingMode(const BaseClass* BaseClass_ptr1, std::strings return false; } -bool get_CsConverter_pPccControl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_CsConverter_targetIdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->pPccControl; + buffer << element->targetIdc; if (!buffer.str().empty()) { return true; @@ -459,25 +468,25 @@ const char* CsConverter::debugString() const void CsConverter::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:CsConverter"), &CsConverter_factory)); + factory_map.emplace("cim:CsConverter", &CsConverter_factory); } void CsConverter::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:CsConverter.alpha"), &assign_CsConverter_alpha)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.gamma"), &assign_CsConverter_gamma)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.maxAlpha"), &assign_CsConverter_maxAlpha)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.maxGamma"), &assign_CsConverter_maxGamma)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.maxIdc"), &assign_CsConverter_maxIdc)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.minAlpha"), &assign_CsConverter_minAlpha)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.minGamma"), &assign_CsConverter_minGamma)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.minIdc"), &assign_CsConverter_minIdc)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.operatingMode"), &assign_CsConverter_operatingMode)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.pPccControl"), &assign_CsConverter_pPccControl)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.ratedIdc"), &assign_CsConverter_ratedIdc)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.targetAlpha"), &assign_CsConverter_targetAlpha)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.targetGamma"), &assign_CsConverter_targetGamma)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.targetIdc"), &assign_CsConverter_targetIdc)); + assign_map.emplace("cim:CsConverter.alpha", &assign_CsConverter_alpha); + assign_map.emplace("cim:CsConverter.gamma", &assign_CsConverter_gamma); + assign_map.emplace("cim:CsConverter.maxAlpha", &assign_CsConverter_maxAlpha); + assign_map.emplace("cim:CsConverter.maxGamma", &assign_CsConverter_maxGamma); + assign_map.emplace("cim:CsConverter.maxIdc", &assign_CsConverter_maxIdc); + assign_map.emplace("cim:CsConverter.minAlpha", &assign_CsConverter_minAlpha); + assign_map.emplace("cim:CsConverter.minGamma", &assign_CsConverter_minGamma); + assign_map.emplace("cim:CsConverter.minIdc", &assign_CsConverter_minIdc); + assign_map.emplace("cim:CsConverter.operatingMode", &assign_CsConverter_operatingMode); + assign_map.emplace("cim:CsConverter.pPccControl", &assign_CsConverter_pPccControl); + assign_map.emplace("cim:CsConverter.ratedIdc", &assign_CsConverter_ratedIdc); + assign_map.emplace("cim:CsConverter.targetAlpha", &assign_CsConverter_targetAlpha); + assign_map.emplace("cim:CsConverter.targetGamma", &assign_CsConverter_targetGamma); + assign_map.emplace("cim:CsConverter.targetIdc", &assign_CsConverter_targetIdc); } void CsConverter::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/CsConverter.hpp b/CGMES_2.4.15_27JAN2020/CsConverter.hpp index 0ab9dd817..4d14a5460 100644 --- a/CGMES_2.4.15_27JAN2020/CsConverter.hpp +++ b/CGMES_2.4.15_27JAN2020/CsConverter.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - DC side of the current source converter (CSC). - */ + /** \brief DC side of the current source converter (CSC). */ class CsConverter : public ACDCConverter { public: @@ -30,20 +28,47 @@ namespace CIMPP CsConverter(); ~CsConverter() override; - CIMPP::AngleDegrees alpha; /* Firing angle, typical value between 10 and 18 degrees for a rectifier. CSC state variable, result from power flow. Default: nullptr */ - CIMPP::AngleDegrees gamma; /* Extinction angle. CSC state variable, result from power flow. Default: nullptr */ - CIMPP::AngleDegrees maxAlpha; /* Maximum firing angle. CSC configuration data used in power flow. Default: nullptr */ - CIMPP::AngleDegrees maxGamma; /* Maximum extinction angle. CSC configuration data used in power flow. Default: nullptr */ - CIMPP::CurrentFlow maxIdc; /* The maximum direct current (Id) on the DC side at which the converter should operate. Converter configuration data use in power flow. Default: nullptr */ - CIMPP::AngleDegrees minAlpha; /* Minimum firing angle. CSC configuration data used in power flow. Default: nullptr */ - CIMPP::AngleDegrees minGamma; /* Minimum extinction angle. CSC configuration data used in power flow. Default: nullptr */ - CIMPP::CurrentFlow minIdc; /* The minimum direct current (Id) on the DC side at which the converter should operate. CSC configuration data used in power flow. Default: nullptr */ - CIMPP::CsOperatingModeKind operatingMode; /* Indicates whether the DC pole is operating as an inverter or as a rectifier. CSC control variable used in power flow. Default: 0 */ - CIMPP::CsPpccControlKind pPccControl; /* Default: 0 */ - CIMPP::CurrentFlow ratedIdc; /* Rated converter DC current, also called IdN. Converter configuration data used in power flow. Default: nullptr */ - CIMPP::AngleDegrees targetAlpha; /* Target firing angle. CSC control variable used in power flow. Default: nullptr */ - CIMPP::AngleDegrees targetGamma; /* Target extinction angle. CSC control variable used in power flow. Default: nullptr */ - CIMPP::CurrentFlow targetIdc; /* DC current target value. CSC control variable used in power flow. Default: nullptr */ + /** \brief Firing angle, typical value between 10 and 18 degrees for a rectifier. CSC state variable, result from power flow. Default: nullptr */ + CIMPP::AngleDegrees alpha; + + /** \brief Extinction angle. CSC state variable, result from power flow. Default: nullptr */ + CIMPP::AngleDegrees gamma; + + /** \brief Maximum firing angle. CSC configuration data used in power flow. Default: nullptr */ + CIMPP::AngleDegrees maxAlpha; + + /** \brief Maximum extinction angle. CSC configuration data used in power flow. Default: nullptr */ + CIMPP::AngleDegrees maxGamma; + + /** \brief The maximum direct current (Id) on the DC side at which the converter should operate. Converter configuration data use in power flow. Default: nullptr */ + CIMPP::CurrentFlow maxIdc; + + /** \brief Minimum firing angle. CSC configuration data used in power flow. Default: nullptr */ + CIMPP::AngleDegrees minAlpha; + + /** \brief Minimum extinction angle. CSC configuration data used in power flow. Default: nullptr */ + CIMPP::AngleDegrees minGamma; + + /** \brief The minimum direct current (Id) on the DC side at which the converter should operate. CSC configuration data used in power flow. Default: nullptr */ + CIMPP::CurrentFlow minIdc; + + /** \brief Indicates whether the DC pole is operating as an inverter or as a rectifier. CSC control variable used in power flow. Default: 0 */ + CIMPP::CsOperatingModeKind operatingMode; + + /** \brief Default: 0 */ + CIMPP::CsPpccControlKind pPccControl; + + /** \brief Rated converter DC current, also called IdN. Converter configuration data used in power flow. Default: nullptr */ + CIMPP::CurrentFlow ratedIdc; + + /** \brief Target firing angle. CSC control variable used in power flow. Default: nullptr */ + CIMPP::AngleDegrees targetAlpha; + + /** \brief Target extinction angle. CSC control variable used in power flow. Default: nullptr */ + CIMPP::AngleDegrees targetGamma; + + /** \brief DC current target value. CSC control variable used in power flow. Default: nullptr */ + CIMPP::CurrentFlow targetIdc; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/CsOperatingModeKind.cpp b/CGMES_2.4.15_27JAN2020/CsOperatingModeKind.cpp index 61074c399..3f119efe8 100644 --- a/CGMES_2.4.15_27JAN2020/CsOperatingModeKind.cpp +++ b/CGMES_2.4.15_27JAN2020/CsOperatingModeKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "CsOperatingModeKind") + if (EnumSymbol.substr(0, pos) != "CsOperatingModeKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,12 +50,12 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "inverter") + if (EnumSymbol == "inverter") { rop = CsOperatingModeKind::inverter; return lop; } - if(EnumSymbol == "rectifier") + if (EnumSymbol == "rectifier") { rop = CsOperatingModeKind::rectifier; return lop; diff --git a/CGMES_2.4.15_27JAN2020/CsOperatingModeKind.hpp b/CGMES_2.4.15_27JAN2020/CsOperatingModeKind.hpp index eb2af30bf..dead78850 100644 --- a/CGMES_2.4.15_27JAN2020/CsOperatingModeKind.hpp +++ b/CGMES_2.4.15_27JAN2020/CsOperatingModeKind.hpp @@ -9,21 +9,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Operating mode for HVDC line operating as Current Source Converter. - */ + /** \brief Operating mode for HVDC line operating as Current Source Converter. */ class CsOperatingModeKind { public: enum CsOperatingModeKind_ENUM { - /** - * Operating as inverter - */ + /** Operating as inverter */ inverter, - /** - * Operating as rectifier. - */ + /** Operating as rectifier. */ rectifier, }; diff --git a/CGMES_2.4.15_27JAN2020/CsPpccControlKind.cpp b/CGMES_2.4.15_27JAN2020/CsPpccControlKind.cpp index e4e9aa9b2..ff79e272f 100644 --- a/CGMES_2.4.15_27JAN2020/CsPpccControlKind.cpp +++ b/CGMES_2.4.15_27JAN2020/CsPpccControlKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "CsPpccControlKind") + if (EnumSymbol.substr(0, pos) != "CsPpccControlKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "activePower") + if (EnumSymbol == "activePower") { rop = CsPpccControlKind::activePower; return lop; } - if(EnumSymbol == "dcVoltage") + if (EnumSymbol == "dcVoltage") { rop = CsPpccControlKind::dcVoltage; return lop; } - if(EnumSymbol == "dcCurrent") + if (EnumSymbol == "dcCurrent") { rop = CsPpccControlKind::dcCurrent; return lop; diff --git a/CGMES_2.4.15_27JAN2020/CsPpccControlKind.hpp b/CGMES_2.4.15_27JAN2020/CsPpccControlKind.hpp index 3c17709fb..1c5fdfdbf 100644 --- a/CGMES_2.4.15_27JAN2020/CsPpccControlKind.hpp +++ b/CGMES_2.4.15_27JAN2020/CsPpccControlKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Active power control modes for HVDC line operating as Current Source Converter. - */ + /** \brief Active power control modes for HVDC line operating as Current Source Converter. */ class CsPpccControlKind { public: enum CsPpccControlKind_ENUM { - /** - * Active power control at AC side. - */ + /** Active power control at AC side. */ activePower, - /** - * DC voltage control. - */ + /** DC voltage control. */ dcVoltage, - /** - * DC current control - */ + /** DC current control */ dcCurrent, }; diff --git a/CGMES_2.4.15_27JAN2020/Currency.cpp b/CGMES_2.4.15_27JAN2020/Currency.cpp index 0a4518071..4c73e10ce 100644 --- a/CGMES_2.4.15_27JAN2020/Currency.cpp +++ b/CGMES_2.4.15_27JAN2020/Currency.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "Currency") + if (EnumSymbol.substr(0, pos) != "Currency") { lop.setstate(std::ios::failbit); return lop; @@ -50,72 +50,72 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "USD") + if (EnumSymbol == "USD") { rop = Currency::USD; return lop; } - if(EnumSymbol == "EUR") + if (EnumSymbol == "EUR") { rop = Currency::EUR; return lop; } - if(EnumSymbol == "AUD") + if (EnumSymbol == "AUD") { rop = Currency::AUD; return lop; } - if(EnumSymbol == "CAD") + if (EnumSymbol == "CAD") { rop = Currency::CAD; return lop; } - if(EnumSymbol == "CHF") + if (EnumSymbol == "CHF") { rop = Currency::CHF; return lop; } - if(EnumSymbol == "CNY") + if (EnumSymbol == "CNY") { rop = Currency::CNY; return lop; } - if(EnumSymbol == "DKK") + if (EnumSymbol == "DKK") { rop = Currency::DKK; return lop; } - if(EnumSymbol == "GBP") + if (EnumSymbol == "GBP") { rop = Currency::GBP; return lop; } - if(EnumSymbol == "JPY") + if (EnumSymbol == "JPY") { rop = Currency::JPY; return lop; } - if(EnumSymbol == "NOK") + if (EnumSymbol == "NOK") { rop = Currency::NOK; return lop; } - if(EnumSymbol == "RUR") + if (EnumSymbol == "RUR") { rop = Currency::RUR; return lop; } - if(EnumSymbol == "SEK") + if (EnumSymbol == "SEK") { rop = Currency::SEK; return lop; } - if(EnumSymbol == "INR") + if (EnumSymbol == "INR") { rop = Currency::INR; return lop; } - if(EnumSymbol == "other") + if (EnumSymbol == "other") { rop = Currency::other; return lop; diff --git a/CGMES_2.4.15_27JAN2020/Currency.hpp b/CGMES_2.4.15_27JAN2020/Currency.hpp index f4de85751..d84836b48 100644 --- a/CGMES_2.4.15_27JAN2020/Currency.hpp +++ b/CGMES_2.4.15_27JAN2020/Currency.hpp @@ -9,69 +9,39 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Monetary currencies. Apologies for this list not being exhaustive. - */ + /** \brief Monetary currencies. Apologies for this list not being exhaustive. */ class Currency { public: enum Currency_ENUM { - /** - * US dollar - */ + /** US dollar */ USD, - /** - * European euro - */ + /** European euro */ EUR, - /** - * Australian dollar - */ + /** Australian dollar */ AUD, - /** - * Canadian dollar - */ + /** Canadian dollar */ CAD, - /** - * Swiss francs - */ + /** Swiss francs */ CHF, - /** - * Chinese yuan renminbi - */ + /** Chinese yuan renminbi */ CNY, - /** - * Danish crown - */ + /** Danish crown */ DKK, - /** - * British pound - */ + /** British pound */ GBP, - /** - * Japanese yen - */ + /** Japanese yen */ JPY, - /** - * Norwegian crown - */ + /** Norwegian crown */ NOK, - /** - * Russian ruble - */ + /** Russian ruble */ RUR, - /** - * Swedish crown - */ + /** Swedish crown */ SEK, - /** - * India rupees - */ + /** India rupees */ INR, - /** - * Another type of currency. - */ + /** Another type of currency. */ other, }; diff --git a/CGMES_2.4.15_27JAN2020/CurrentFlow.hpp b/CGMES_2.4.15_27JAN2020/CurrentFlow.hpp index 0f38f0f07..a606a845c 100644 --- a/CGMES_2.4.15_27JAN2020/CurrentFlow.hpp +++ b/CGMES_2.4.15_27JAN2020/CurrentFlow.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Electrical current with sign convention: positive flow is out of the conducting equipment into the connectivity node. Can be both AC and DC. - */ + /** \brief Electrical current with sign convention: positive flow is out of the conducting equipment into the connectivity node. Can be both AC and DC. */ class CurrentFlow { public: diff --git a/CGMES_2.4.15_27JAN2020/CurrentLimit.cpp b/CGMES_2.4.15_27JAN2020/CurrentLimit.cpp index b7fb76fd4..6b79e39d4 100644 --- a/CGMES_2.4.15_27JAN2020/CurrentLimit.cpp +++ b/CGMES_2.4.15_27JAN2020/CurrentLimit.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "CurrentFlow.hpp" using namespace CIMPP; -CurrentLimit::CurrentLimit() {}; -CurrentLimit::~CurrentLimit() {}; +CurrentLimit::CurrentLimit() {} +CurrentLimit::~CurrentLimit() {} static const std::list PossibleProfilesForClass = { @@ -40,25 +39,24 @@ CurrentLimit::getPossibleProfilesForAttributes() const return map; } - -bool assign_CurrentLimit_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CurrentLimit_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CurrentLimit* element = dynamic_cast(BaseClass_ptr1)) + CurrentLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->value; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_CurrentLimit_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CurrentLimit* element = dynamic_cast(BaseClass_ptr1)) + const CurrentLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value; if (!buffer.str().empty()) @@ -70,8 +68,6 @@ bool get_CurrentLimit_value(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char CurrentLimit::debugName[] = "CurrentLimit"; const char* CurrentLimit::debugString() const { @@ -80,12 +76,12 @@ const char* CurrentLimit::debugString() const void CurrentLimit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:CurrentLimit"), &CurrentLimit_factory)); + factory_map.emplace("cim:CurrentLimit", &CurrentLimit_factory); } void CurrentLimit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:CurrentLimit.value"), &assign_CurrentLimit_value)); + assign_map.emplace("cim:CurrentLimit.value", &assign_CurrentLimit_value); } void CurrentLimit::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/CurrentLimit.hpp b/CGMES_2.4.15_27JAN2020/CurrentLimit.hpp index dee18c3ef..b670b6c54 100644 --- a/CGMES_2.4.15_27JAN2020/CurrentLimit.hpp +++ b/CGMES_2.4.15_27JAN2020/CurrentLimit.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Operational limit on current. - */ + /** \brief Operational limit on current. */ class CurrentLimit : public OperationalLimit { public: @@ -27,7 +25,8 @@ namespace CIMPP CurrentLimit(); ~CurrentLimit() override; - CIMPP::CurrentFlow value; /* Limit on current flow. Default: nullptr */ + /** \brief Limit on current flow. Default: nullptr */ + CIMPP::CurrentFlow value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Curve.cpp b/CGMES_2.4.15_27JAN2020/Curve.cpp index 61495d0fa..776e5c46d 100644 --- a/CGMES_2.4.15_27JAN2020/Curve.cpp +++ b/CGMES_2.4.15_27JAN2020/Curve.cpp @@ -9,15 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "CurveData.hpp" -#include "CurveStyle.hpp" -#include "UnitSymbol.hpp" -#include "UnitSymbol.hpp" -#include "UnitSymbol.hpp" using namespace CIMPP; -Curve::Curve() {}; -Curve::~Curve() {}; +Curve::Curve() {} +Curve::~Curve() {} static const std::list PossibleProfilesForClass = { @@ -48,82 +44,84 @@ Curve::getPossibleProfilesForAttributes() const return map; } - -bool assign_Curve_curveStyle(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CurveData_Curve(BaseClass*, BaseClass*); +bool assign_Curve_CurveDatas(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (Curve* element = dynamic_cast(BaseClass_ptr1)) + Curve* element = dynamic_cast(BaseClass_ptr1); + CurveData* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->curveStyle; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->CurveDatas.begin(), element->CurveDatas.end(), element2) == element->CurveDatas.end()) + { + element->CurveDatas.push_back(element2); + return assign_CurveData_Curve(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_Curve_xUnit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Curve_curveStyle(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Curve* element = dynamic_cast(BaseClass_ptr1)) + Curve* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->xUnit; - if (buffer.fail()) - return false; - else + buffer >> element->curveStyle; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Curve_y1Unit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Curve_xUnit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Curve* element = dynamic_cast(BaseClass_ptr1)) + Curve* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->y1Unit; - if (buffer.fail()) - return false; - else + buffer >> element->xUnit; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Curve_y2Unit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Curve_y1Unit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Curve* element = dynamic_cast(BaseClass_ptr1)) + Curve* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->y2Unit; - if (buffer.fail()) - return false; - else + buffer >> element->y1Unit; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_CurveData_Curve(BaseClass*, BaseClass*); -bool assign_Curve_CurveDatas(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_Curve_y2Unit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { Curve* element = dynamic_cast(BaseClass_ptr1); - CurveData* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->CurveDatas.begin(), element->CurveDatas.end(), element2) == element->CurveDatas.end()) + buffer >> element->y2Unit; + if (!buffer.fail()) { - element->CurveDatas.push_back(element2); - return assign_CurveData_Curve(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } - bool get_Curve_curveStyle(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Curve* element = dynamic_cast(BaseClass_ptr1)) + const Curve* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->curveStyle; if (!buffer.str().empty()) @@ -137,7 +135,8 @@ bool get_Curve_curveStyle(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_Curve_xUnit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Curve* element = dynamic_cast(BaseClass_ptr1)) + const Curve* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xUnit; if (!buffer.str().empty()) @@ -151,7 +150,8 @@ bool get_Curve_xUnit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Curve_y1Unit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Curve* element = dynamic_cast(BaseClass_ptr1)) + const Curve* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->y1Unit; if (!buffer.str().empty()) @@ -165,7 +165,8 @@ bool get_Curve_y1Unit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_Curve_y2Unit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Curve* element = dynamic_cast(BaseClass_ptr1)) + const Curve* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->y2Unit; if (!buffer.str().empty()) @@ -185,20 +186,20 @@ const char* Curve::debugString() const void Curve::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Curve"), &Curve_factory)); + factory_map.emplace("cim:Curve", &Curve_factory); } void Curve::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Curve.curveStyle"), &assign_Curve_curveStyle)); - assign_map.insert(std::make_pair(std::string("cim:Curve.xUnit"), &assign_Curve_xUnit)); - assign_map.insert(std::make_pair(std::string("cim:Curve.y1Unit"), &assign_Curve_y1Unit)); - assign_map.insert(std::make_pair(std::string("cim:Curve.y2Unit"), &assign_Curve_y2Unit)); + assign_map.emplace("cim:Curve.curveStyle", &assign_Curve_curveStyle); + assign_map.emplace("cim:Curve.xUnit", &assign_Curve_xUnit); + assign_map.emplace("cim:Curve.y1Unit", &assign_Curve_y1Unit); + assign_map.emplace("cim:Curve.y2Unit", &assign_Curve_y2Unit); } void Curve::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Curve.CurveDatas"), &assign_Curve_CurveDatas)); + assign_map.emplace("cim:Curve.CurveDatas", &assign_Curve_CurveDatas); } void Curve::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/Curve.hpp b/CGMES_2.4.15_27JAN2020/Curve.hpp index bba8938f8..bb10f8a2b 100644 --- a/CGMES_2.4.15_27JAN2020/Curve.hpp +++ b/CGMES_2.4.15_27JAN2020/Curve.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class CurveData; - /* - A multi-purpose curve or functional relationship between an independent variable (X-axis) and dependent (Y-axis) variables. - */ + /** \brief A multi-purpose curve or functional relationship between an independent variable (X-axis) and dependent (Y-axis) variables. */ class Curve : public IdentifiedObject { public: @@ -29,11 +27,20 @@ namespace CIMPP Curve(); ~Curve() override; - std::list CurveDatas; /* The curve of this curve data point. Default: 0 */ - CIMPP::CurveStyle curveStyle; /* The style or shape of the curve. Default: 0 */ - CIMPP::UnitSymbol xUnit; /* The X-axis units of measure. Default: 0 */ - CIMPP::UnitSymbol y1Unit; /* The Y1-axis units of measure. Default: 0 */ - CIMPP::UnitSymbol y2Unit; /* The Y2-axis units of measure. Default: 0 */ + /** \brief The curve of this curve data point. Default: 0 */ + std::list CurveDatas; + + /** \brief The style or shape of the curve. Default: 0 */ + CIMPP::CurveStyle curveStyle; + + /** \brief The X-axis units of measure. Default: 0 */ + CIMPP::UnitSymbol xUnit; + + /** \brief The Y1-axis units of measure. Default: 0 */ + CIMPP::UnitSymbol y1Unit; + + /** \brief The Y2-axis units of measure. Default: 0 */ + CIMPP::UnitSymbol y2Unit; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/CurveData.cpp b/CGMES_2.4.15_27JAN2020/CurveData.cpp index eef59d94a..f2d46bf44 100644 --- a/CGMES_2.4.15_27JAN2020/CurveData.cpp +++ b/CGMES_2.4.15_27JAN2020/CurveData.cpp @@ -9,14 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "Curve.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -CurveData::CurveData() : Curve(nullptr) {}; -CurveData::~CurveData() {}; +CurveData::CurveData() : Curve(nullptr) {} +CurveData::~CurveData() {} static const std::list PossibleProfilesForClass = { @@ -46,67 +43,83 @@ CurveData::getPossibleProfilesForAttributes() const return map; } +bool assign_Curve_CurveDatas(BaseClass*, BaseClass*); +bool assign_CurveData_Curve(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + CurveData* element = dynamic_cast(BaseClass_ptr1); + Curve* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Curve != element2) + { + element->Curve = element2; + return assign_Curve_CurveDatas(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_CurveData_xvalue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CurveData_xvalue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CurveData* element = dynamic_cast(BaseClass_ptr1)) + CurveData* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xvalue; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CurveData_y1value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CurveData_y1value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CurveData* element = dynamic_cast(BaseClass_ptr1)) + CurveData* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->y1value; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CurveData_y2value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CurveData_y2value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CurveData* element = dynamic_cast(BaseClass_ptr1)) + CurveData* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->y2value; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_Curve_CurveDatas(BaseClass*, BaseClass*); -bool assign_CurveData_Curve(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_CurveData_Curve(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - CurveData* element = dynamic_cast(BaseClass_ptr1); - Curve* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const CurveData* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->Curve != element2) + if (element->Curve != 0) { - element->Curve = element2; - return assign_Curve_CurveDatas(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->Curve); + return true; } - return true; } return false; } bool get_CurveData_xvalue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CurveData* element = dynamic_cast(BaseClass_ptr1)) + const CurveData* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xvalue; if (!buffer.str().empty()) @@ -120,7 +133,8 @@ bool get_CurveData_xvalue(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_CurveData_y1value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CurveData* element = dynamic_cast(BaseClass_ptr1)) + const CurveData* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->y1value; if (!buffer.str().empty()) @@ -134,7 +148,8 @@ bool get_CurveData_y1value(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_CurveData_y2value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CurveData* element = dynamic_cast(BaseClass_ptr1)) + const CurveData* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->y2value; if (!buffer.str().empty()) @@ -146,21 +161,6 @@ bool get_CurveData_y2value(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - -bool get_CurveData_Curve(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const CurveData* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->Curve != 0) - { - BaseClass_list.push_back(element->Curve); - return true; - } - } - return false; -} - - const char CurveData::debugName[] = "CurveData"; const char* CurveData::debugString() const { @@ -169,19 +169,19 @@ const char* CurveData::debugString() const void CurveData::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:CurveData"), &CurveData_factory)); + factory_map.emplace("cim:CurveData", &CurveData_factory); } void CurveData::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:CurveData.xvalue"), &assign_CurveData_xvalue)); - assign_map.insert(std::make_pair(std::string("cim:CurveData.y1value"), &assign_CurveData_y1value)); - assign_map.insert(std::make_pair(std::string("cim:CurveData.y2value"), &assign_CurveData_y2value)); + assign_map.emplace("cim:CurveData.xvalue", &assign_CurveData_xvalue); + assign_map.emplace("cim:CurveData.y1value", &assign_CurveData_y1value); + assign_map.emplace("cim:CurveData.y2value", &assign_CurveData_y2value); } void CurveData::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:CurveData.Curve"), &assign_CurveData_Curve)); + assign_map.emplace("cim:CurveData.Curve", &assign_CurveData_Curve); } void CurveData::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/CurveData.hpp b/CGMES_2.4.15_27JAN2020/CurveData.hpp index 436ade08a..3bbd6ba03 100644 --- a/CGMES_2.4.15_27JAN2020/CurveData.hpp +++ b/CGMES_2.4.15_27JAN2020/CurveData.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class Curve; - /* - Multi-purpose data points for defining a curve. The use of this generic class is discouraged if a more specific class can be used to specify the x and y axis values along with their specific data types. - */ + /** \brief Multi-purpose data points for defining a curve. The use of this generic class is discouraged if a more specific class can be used to specify the x and y axis values along with their specific data types. */ class CurveData : public BaseClass { public: @@ -28,10 +26,17 @@ namespace CIMPP CurveData(); ~CurveData() override; - CIMPP::Curve* Curve; /* The point data values that define this curve. Default: 0 */ - CIMPP::Simple_Float xvalue; /* The data value of the X-axis variable, depending on the X-axis units. Default: nullptr */ - CIMPP::Simple_Float y1value; /* The data value of the first Y-axis variable, depending on the Y-axis units. Default: nullptr */ - CIMPP::Simple_Float y2value; /* The data value of the second Y-axis variable (if present), depending on the Y-axis units. Default: nullptr */ + /** \brief The point data values that define this curve. Default: 0 */ + CIMPP::Curve* Curve; + + /** \brief The data value of the X-axis variable, depending on the X-axis units. Default: nullptr */ + CIMPP::Simple_Float xvalue; + + /** \brief The data value of the first Y-axis variable, depending on the Y-axis units. Default: nullptr */ + CIMPP::Simple_Float y1value; + + /** \brief The data value of the second Y-axis variable (if present), depending on the Y-axis units. Default: nullptr */ + CIMPP::Simple_Float y2value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/CurveStyle.cpp b/CGMES_2.4.15_27JAN2020/CurveStyle.cpp index d28696151..bf78aeb7f 100644 --- a/CGMES_2.4.15_27JAN2020/CurveStyle.cpp +++ b/CGMES_2.4.15_27JAN2020/CurveStyle.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "CurveStyle") + if (EnumSymbol.substr(0, pos) != "CurveStyle") { lop.setstate(std::ios::failbit); return lop; @@ -50,12 +50,12 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "constantYValue") + if (EnumSymbol == "constantYValue") { rop = CurveStyle::constantYValue; return lop; } - if(EnumSymbol == "straightLineYValues") + if (EnumSymbol == "straightLineYValues") { rop = CurveStyle::straightLineYValues; return lop; diff --git a/CGMES_2.4.15_27JAN2020/CurveStyle.hpp b/CGMES_2.4.15_27JAN2020/CurveStyle.hpp index 72f95568c..0f72591f4 100644 --- a/CGMES_2.4.15_27JAN2020/CurveStyle.hpp +++ b/CGMES_2.4.15_27JAN2020/CurveStyle.hpp @@ -9,21 +9,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Style or shape of curve. - */ + /** \brief Style or shape of curve. */ class CurveStyle { public: enum CurveStyle_ENUM { - /** - * The Y-axis values are assumed constant until the next curve point and prior to the first curve point. - */ + /** The Y-axis values are assumed constant until the next curve point and prior to the first curve point. */ constantYValue, - /** - * The Y-axis values are assumed to be a straight line between values. Also known as linear interpolation. - */ + /** The Y-axis values are assumed to be a straight line between values. Also known as linear interpolation. */ straightLineYValues, }; diff --git a/CGMES_2.4.15_27JAN2020/DCBaseTerminal.cpp b/CGMES_2.4.15_27JAN2020/DCBaseTerminal.cpp index e423a7004..e7814b878 100644 --- a/CGMES_2.4.15_27JAN2020/DCBaseTerminal.cpp +++ b/CGMES_2.4.15_27JAN2020/DCBaseTerminal.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCBaseTerminal::DCBaseTerminal() : DCNode(nullptr), DCTopologicalNode(nullptr) {}; -DCBaseTerminal::~DCBaseTerminal() {}; +DCBaseTerminal::DCBaseTerminal() : DCNode(nullptr), DCTopologicalNode(nullptr) {} +DCBaseTerminal::~DCBaseTerminal() {} static const std::list PossibleProfilesForClass = { @@ -44,8 +44,6 @@ DCBaseTerminal::getPossibleProfilesForAttributes() const return map; } - - bool assign_DCNode_DCTerminals(BaseClass*, BaseClass*); bool assign_DCBaseTerminal_DCNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -62,6 +60,7 @@ bool assign_DCBaseTerminal_DCNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClas } return false; } + bool assign_DCTopologicalNode_DCTerminals(BaseClass*, BaseClass*); bool assign_DCBaseTerminal_DCTopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -79,10 +78,10 @@ bool assign_DCBaseTerminal_DCTopologicalNode(BaseClass* BaseClass_ptr1, BaseClas return false; } - bool get_DCBaseTerminal_DCNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DCBaseTerminal* element = dynamic_cast(BaseClass_ptr1)) + const DCBaseTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DCNode != 0) { @@ -95,7 +94,8 @@ bool get_DCBaseTerminal_DCNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DCBaseTerminal* element = dynamic_cast(BaseClass_ptr1)) + const DCBaseTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DCTopologicalNode != 0) { @@ -106,7 +106,6 @@ bool get_DCBaseTerminal_DCTopologicalNode(const BaseClass* BaseClass_ptr1, std:: return false; } - const char DCBaseTerminal::debugName[] = "DCBaseTerminal"; const char* DCBaseTerminal::debugString() const { @@ -115,7 +114,7 @@ const char* DCBaseTerminal::debugString() const void DCBaseTerminal::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCBaseTerminal"), &DCBaseTerminal_factory)); + factory_map.emplace("cim:DCBaseTerminal", &DCBaseTerminal_factory); } void DCBaseTerminal::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -124,8 +123,8 @@ void DCBaseTerminal::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCBaseTerminal.DCNode"), &assign_DCBaseTerminal_DCNode)); - assign_map.insert(std::make_pair(std::string("cim:DCBaseTerminal.DCTopologicalNode"), &assign_DCBaseTerminal_DCTopologicalNode)); + assign_map.emplace("cim:DCBaseTerminal.DCNode", &assign_DCBaseTerminal_DCNode); + assign_map.emplace("cim:DCBaseTerminal.DCTopologicalNode", &assign_DCBaseTerminal_DCTopologicalNode); } void DCBaseTerminal::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/DCBaseTerminal.hpp b/CGMES_2.4.15_27JAN2020/DCBaseTerminal.hpp index 6aa4878cb..8c0b90332 100644 --- a/CGMES_2.4.15_27JAN2020/DCBaseTerminal.hpp +++ b/CGMES_2.4.15_27JAN2020/DCBaseTerminal.hpp @@ -18,9 +18,7 @@ namespace CIMPP class DCNode; class DCTopologicalNode; - /* - An electrical connection point at a piece of DC conducting equipment. DC terminals are connected at one physical DC node that may have multiple DC terminals connected. A DC node is similar to an AC connectivity node. The model enforces that DC connections are distinct from AC connections. - */ + /** \brief An electrical connection point at a piece of DC conducting equipment. DC terminals are connected at one physical DC node that may have multiple DC terminals connected. A DC node is similar to an AC connectivity node. The model enforces that DC connections are distinct from AC connections. */ class DCBaseTerminal : public ACDCTerminal { public: @@ -28,8 +26,11 @@ namespace CIMPP DCBaseTerminal(); ~DCBaseTerminal() override; - CIMPP::DCNode* DCNode; /* Default: 0 */ - CIMPP::DCTopologicalNode* DCTopologicalNode; /* See association end TopologicalNode.Terminal. Default: 0 */ + /** \brief Default: 0 */ + CIMPP::DCNode* DCNode; + + /** \brief See association end TopologicalNode.Terminal. Default: 0 */ + CIMPP::DCTopologicalNode* DCTopologicalNode; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/DCBreaker.cpp b/CGMES_2.4.15_27JAN2020/DCBreaker.cpp index b00cbaa77..721524d6e 100644 --- a/CGMES_2.4.15_27JAN2020/DCBreaker.cpp +++ b/CGMES_2.4.15_27JAN2020/DCBreaker.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCBreaker::DCBreaker() {}; -DCBreaker::~DCBreaker() {}; +DCBreaker::DCBreaker() {} +DCBreaker::~DCBreaker() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ DCBreaker::getPossibleProfilesForAttributes() const return map; } - - - - - const char DCBreaker::debugName[] = "DCBreaker"; const char* DCBreaker::debugString() const { @@ -51,7 +46,7 @@ const char* DCBreaker::debugString() const void DCBreaker::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCBreaker"), &DCBreaker_factory)); + factory_map.emplace("cim:DCBreaker", &DCBreaker_factory); } void DCBreaker::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/DCBreaker.hpp b/CGMES_2.4.15_27JAN2020/DCBreaker.hpp index cfecf1c9c..51ebd5f70 100644 --- a/CGMES_2.4.15_27JAN2020/DCBreaker.hpp +++ b/CGMES_2.4.15_27JAN2020/DCBreaker.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A breaker within a DC system. - */ + /** \brief A breaker within a DC system. */ class DCBreaker : public DCSwitch { public: @@ -26,7 +24,6 @@ namespace CIMPP DCBreaker(); ~DCBreaker() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/DCBusbar.cpp b/CGMES_2.4.15_27JAN2020/DCBusbar.cpp index 99e4dbdbd..1ecf0f6fa 100644 --- a/CGMES_2.4.15_27JAN2020/DCBusbar.cpp +++ b/CGMES_2.4.15_27JAN2020/DCBusbar.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCBusbar::DCBusbar() {}; -DCBusbar::~DCBusbar() {}; +DCBusbar::DCBusbar() {} +DCBusbar::~DCBusbar() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ DCBusbar::getPossibleProfilesForAttributes() const return map; } - - - - - const char DCBusbar::debugName[] = "DCBusbar"; const char* DCBusbar::debugString() const { @@ -51,7 +46,7 @@ const char* DCBusbar::debugString() const void DCBusbar::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCBusbar"), &DCBusbar_factory)); + factory_map.emplace("cim:DCBusbar", &DCBusbar_factory); } void DCBusbar::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/DCBusbar.hpp b/CGMES_2.4.15_27JAN2020/DCBusbar.hpp index ac483b4bb..443ea1142 100644 --- a/CGMES_2.4.15_27JAN2020/DCBusbar.hpp +++ b/CGMES_2.4.15_27JAN2020/DCBusbar.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A busbar within a DC system. - */ + /** \brief A busbar within a DC system. */ class DCBusbar : public DCConductingEquipment { public: @@ -26,7 +24,6 @@ namespace CIMPP DCBusbar(); ~DCBusbar() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/DCChopper.cpp b/CGMES_2.4.15_27JAN2020/DCChopper.cpp index d0ae9bb6f..74dd30f11 100644 --- a/CGMES_2.4.15_27JAN2020/DCChopper.cpp +++ b/CGMES_2.4.15_27JAN2020/DCChopper.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCChopper::DCChopper() {}; -DCChopper::~DCChopper() {}; +DCChopper::DCChopper() {} +DCChopper::~DCChopper() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ DCChopper::getPossibleProfilesForAttributes() const return map; } - - - - - const char DCChopper::debugName[] = "DCChopper"; const char* DCChopper::debugString() const { @@ -51,7 +46,7 @@ const char* DCChopper::debugString() const void DCChopper::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCChopper"), &DCChopper_factory)); + factory_map.emplace("cim:DCChopper", &DCChopper_factory); } void DCChopper::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/DCChopper.hpp b/CGMES_2.4.15_27JAN2020/DCChopper.hpp index 2c1ae6e0b..69669fe03 100644 --- a/CGMES_2.4.15_27JAN2020/DCChopper.hpp +++ b/CGMES_2.4.15_27JAN2020/DCChopper.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Low resistance equipment used in the internal DC circuit to balance voltages. It has typically positive and negative pole terminals and a ground. - */ + /** \brief Low resistance equipment used in the internal DC circuit to balance voltages. It has typically positive and negative pole terminals and a ground. */ class DCChopper : public DCConductingEquipment { public: @@ -26,7 +24,6 @@ namespace CIMPP DCChopper(); ~DCChopper() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/DCConductingEquipment.cpp b/CGMES_2.4.15_27JAN2020/DCConductingEquipment.cpp index 1442df0aa..dbf6d1e77 100644 --- a/CGMES_2.4.15_27JAN2020/DCConductingEquipment.cpp +++ b/CGMES_2.4.15_27JAN2020/DCConductingEquipment.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCConductingEquipment::DCConductingEquipment() {}; -DCConductingEquipment::~DCConductingEquipment() {}; +DCConductingEquipment::DCConductingEquipment() {} +DCConductingEquipment::~DCConductingEquipment() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ DCConductingEquipment::getPossibleProfilesForAttributes() const return map; } - - bool assign_DCTerminal_DCConductingEquipment(BaseClass*, BaseClass*); bool assign_DCConductingEquipment_DCTerminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_DCConductingEquipment_DCTerminals(BaseClass* BaseClass_ptr1, BaseCla } - const char DCConductingEquipment::debugName[] = "DCConductingEquipment"; const char* DCConductingEquipment::debugString() const { @@ -69,7 +66,7 @@ const char* DCConductingEquipment::debugString() const void DCConductingEquipment::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCConductingEquipment"), &DCConductingEquipment_factory)); + factory_map.emplace("cim:DCConductingEquipment", &DCConductingEquipment_factory); } void DCConductingEquipment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void DCConductingEquipment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCConductingEquipment.DCTerminals"), &assign_DCConductingEquipment_DCTerminals)); + assign_map.emplace("cim:DCConductingEquipment.DCTerminals", &assign_DCConductingEquipment_DCTerminals); } void DCConductingEquipment::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/DCConductingEquipment.hpp b/CGMES_2.4.15_27JAN2020/DCConductingEquipment.hpp index 1867a95eb..7ef261fec 100644 --- a/CGMES_2.4.15_27JAN2020/DCConductingEquipment.hpp +++ b/CGMES_2.4.15_27JAN2020/DCConductingEquipment.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class DCTerminal; - /* - The parts of the DC power system that are designed to carry current or that are conductively connected through DC terminals. - */ + /** \brief The parts of the DC power system that are designed to carry current or that are conductively connected through DC terminals. */ class DCConductingEquipment : public Equipment { public: @@ -27,7 +25,8 @@ namespace CIMPP DCConductingEquipment(); ~DCConductingEquipment() override; - std::list DCTerminals; /* Default: 0 */ + /** \brief Default: 0 */ + std::list DCTerminals; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/DCConverterOperatingModeKind.cpp b/CGMES_2.4.15_27JAN2020/DCConverterOperatingModeKind.cpp index 723e4594e..5119f9ba2 100644 --- a/CGMES_2.4.15_27JAN2020/DCConverterOperatingModeKind.cpp +++ b/CGMES_2.4.15_27JAN2020/DCConverterOperatingModeKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "DCConverterOperatingModeKind") + if (EnumSymbol.substr(0, pos) != "DCConverterOperatingModeKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "bipolar") + if (EnumSymbol == "bipolar") { rop = DCConverterOperatingModeKind::bipolar; return lop; } - if(EnumSymbol == "monopolarMetallicReturn") + if (EnumSymbol == "monopolarMetallicReturn") { rop = DCConverterOperatingModeKind::monopolarMetallicReturn; return lop; } - if(EnumSymbol == "monopolarGroundReturn") + if (EnumSymbol == "monopolarGroundReturn") { rop = DCConverterOperatingModeKind::monopolarGroundReturn; return lop; diff --git a/CGMES_2.4.15_27JAN2020/DCConverterOperatingModeKind.hpp b/CGMES_2.4.15_27JAN2020/DCConverterOperatingModeKind.hpp index eb7c9c456..6ed6a79c3 100644 --- a/CGMES_2.4.15_27JAN2020/DCConverterOperatingModeKind.hpp +++ b/CGMES_2.4.15_27JAN2020/DCConverterOperatingModeKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The operating mode of an HVDC bipole. - */ + /** \brief The operating mode of an HVDC bipole. */ class DCConverterOperatingModeKind { public: enum DCConverterOperatingModeKind_ENUM { - /** - * Bipolar operation. - */ + /** Bipolar operation. */ bipolar, - /** - * Monopolar operation with metallic return - */ + /** Monopolar operation with metallic return */ monopolarMetallicReturn, - /** - * Monopolar operation with ground return - */ + /** Monopolar operation with ground return */ monopolarGroundReturn, }; diff --git a/CGMES_2.4.15_27JAN2020/DCConverterUnit.cpp b/CGMES_2.4.15_27JAN2020/DCConverterUnit.cpp index f66280df5..2d1090ab2 100644 --- a/CGMES_2.4.15_27JAN2020/DCConverterUnit.cpp +++ b/CGMES_2.4.15_27JAN2020/DCConverterUnit.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "Substation.hpp" -#include "DCConverterOperatingModeKind.hpp" using namespace CIMPP; -DCConverterUnit::DCConverterUnit() : Substation(nullptr) {}; -DCConverterUnit::~DCConverterUnit() {}; +DCConverterUnit::DCConverterUnit() : Substation(nullptr) {} +DCConverterUnit::~DCConverterUnit() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ DCConverterUnit::getPossibleProfilesForAttributes() const return map; } - -bool assign_DCConverterUnit_operationMode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (DCConverterUnit* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->operationMode; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_Substation_DCConverterUnit(BaseClass*, BaseClass*); bool assign_DCConverterUnit_Substation(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,10 +58,24 @@ bool assign_DCConverterUnit_Substation(BaseClass* BaseClass_ptr1, BaseClass* Bas return false; } +bool assign_DCConverterUnit_operationMode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + DCConverterUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->operationMode; + if (!buffer.fail()) + { + return true; + } + } + return false; +} bool get_DCConverterUnit_Substation(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DCConverterUnit* element = dynamic_cast(BaseClass_ptr1)) + const DCConverterUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Substation != 0) { @@ -88,10 +86,10 @@ bool get_DCConverterUnit_Substation(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1)) + const DCConverterUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->operationMode; if (!buffer.str().empty()) @@ -111,17 +109,17 @@ const char* DCConverterUnit::debugString() const void DCConverterUnit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCConverterUnit"), &DCConverterUnit_factory)); + factory_map.emplace("cim:DCConverterUnit", &DCConverterUnit_factory); } void DCConverterUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCConverterUnit.operationMode"), &assign_DCConverterUnit_operationMode)); + assign_map.emplace("cim:DCConverterUnit.operationMode", &assign_DCConverterUnit_operationMode); } void DCConverterUnit::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCConverterUnit.Substation"), &assign_DCConverterUnit_Substation)); + assign_map.emplace("cim:DCConverterUnit.Substation", &assign_DCConverterUnit_Substation); } void DCConverterUnit::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/DCConverterUnit.hpp b/CGMES_2.4.15_27JAN2020/DCConverterUnit.hpp index 914e8ea3e..0ceada939 100644 --- a/CGMES_2.4.15_27JAN2020/DCConverterUnit.hpp +++ b/CGMES_2.4.15_27JAN2020/DCConverterUnit.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class Substation; - /* - Indivisible operative unit comprising all equipment between the point of common coupling on the AC side and the point of common coupling - DC side, essentially one or more converters, together with one or more converter transformers, converter control equipment, essential protective and switching devices and auxiliaries, if any, used for conversion. - */ + /** \brief Indivisible operative unit comprising all equipment between the point of common coupling on the AC side and the point of common coupling - DC side, essentially one or more converters, together with one or more converter transformers, converter control equipment, essential protective and switching devices and auxiliaries, if any, used for conversion. */ class DCConverterUnit : public DCEquipmentContainer { public: @@ -28,8 +26,11 @@ namespace CIMPP DCConverterUnit(); ~DCConverterUnit() override; - CIMPP::Substation* Substation; /* Default: 0 */ - CIMPP::DCConverterOperatingModeKind operationMode; /* Default: 0 */ + /** \brief Default: 0 */ + CIMPP::Substation* Substation; + + /** \brief Default: 0 */ + CIMPP::DCConverterOperatingModeKind operationMode; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/DCDisconnector.cpp b/CGMES_2.4.15_27JAN2020/DCDisconnector.cpp index 861bbeb7c..fe93c5903 100644 --- a/CGMES_2.4.15_27JAN2020/DCDisconnector.cpp +++ b/CGMES_2.4.15_27JAN2020/DCDisconnector.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCDisconnector::DCDisconnector() {}; -DCDisconnector::~DCDisconnector() {}; +DCDisconnector::DCDisconnector() {} +DCDisconnector::~DCDisconnector() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ DCDisconnector::getPossibleProfilesForAttributes() const return map; } - - - - - const char DCDisconnector::debugName[] = "DCDisconnector"; const char* DCDisconnector::debugString() const { @@ -51,7 +46,7 @@ const char* DCDisconnector::debugString() const void DCDisconnector::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCDisconnector"), &DCDisconnector_factory)); + factory_map.emplace("cim:DCDisconnector", &DCDisconnector_factory); } void DCDisconnector::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/DCDisconnector.hpp b/CGMES_2.4.15_27JAN2020/DCDisconnector.hpp index 3cc09932a..9000b268e 100644 --- a/CGMES_2.4.15_27JAN2020/DCDisconnector.hpp +++ b/CGMES_2.4.15_27JAN2020/DCDisconnector.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A disconnector within a DC system. - */ + /** \brief A disconnector within a DC system. */ class DCDisconnector : public DCSwitch { public: @@ -26,7 +24,6 @@ namespace CIMPP DCDisconnector(); ~DCDisconnector() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/DCEquipmentContainer.cpp b/CGMES_2.4.15_27JAN2020/DCEquipmentContainer.cpp index 46467353c..63f808f42 100644 --- a/CGMES_2.4.15_27JAN2020/DCEquipmentContainer.cpp +++ b/CGMES_2.4.15_27JAN2020/DCEquipmentContainer.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCEquipmentContainer::DCEquipmentContainer() {}; -DCEquipmentContainer::~DCEquipmentContainer() {}; +DCEquipmentContainer::DCEquipmentContainer() {} +DCEquipmentContainer::~DCEquipmentContainer() {} static const std::list PossibleProfilesForClass = { @@ -43,8 +43,6 @@ DCEquipmentContainer::getPossibleProfilesForAttributes() const return map; } - - bool assign_DCNode_DCEquipmentContainer(BaseClass*, BaseClass*); bool assign_DCEquipmentContainer_DCNodes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,6 +59,7 @@ bool assign_DCEquipmentContainer_DCNodes(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_DCTopologicalNode_DCEquipmentContainer(BaseClass*, BaseClass*); bool assign_DCEquipmentContainer_DCTopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -88,7 +87,7 @@ const char* DCEquipmentContainer::debugString() const void DCEquipmentContainer::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCEquipmentContainer"), &DCEquipmentContainer_factory)); + factory_map.emplace("cim:DCEquipmentContainer", &DCEquipmentContainer_factory); } void DCEquipmentContainer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -97,8 +96,8 @@ void DCEquipmentContainer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCEquipmentContainer.DCNodes"), &assign_DCEquipmentContainer_DCNodes)); - assign_map.insert(std::make_pair(std::string("cim:DCEquipmentContainer.DCTopologicalNode"), &assign_DCEquipmentContainer_DCTopologicalNode)); + assign_map.emplace("cim:DCEquipmentContainer.DCNodes", &assign_DCEquipmentContainer_DCNodes); + assign_map.emplace("cim:DCEquipmentContainer.DCTopologicalNode", &assign_DCEquipmentContainer_DCTopologicalNode); } void DCEquipmentContainer::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/DCEquipmentContainer.hpp b/CGMES_2.4.15_27JAN2020/DCEquipmentContainer.hpp index a38f051bf..6defc5761 100644 --- a/CGMES_2.4.15_27JAN2020/DCEquipmentContainer.hpp +++ b/CGMES_2.4.15_27JAN2020/DCEquipmentContainer.hpp @@ -18,9 +18,7 @@ namespace CIMPP class DCNode; class DCTopologicalNode; - /* - A modeling construct to provide a root class for containment of DC as well as AC equipment. The class differ from the EquipmentContaner for AC in that it may also contain DCNodes. Hence it can contain both AC and DC equipment. - */ + /** \brief A modeling construct to provide a root class for containment of DC as well as AC equipment. The class differ from the EquipmentContaner for AC in that it may also contain DCNodes. Hence it can contain both AC and DC equipment. */ class DCEquipmentContainer : public EquipmentContainer { public: @@ -28,8 +26,11 @@ namespace CIMPP DCEquipmentContainer(); ~DCEquipmentContainer() override; - std::list DCNodes; /* Default: 0 */ - std::list DCTopologicalNode; /* Default: 0 */ + /** \brief Default: 0 */ + std::list DCNodes; + + /** \brief Default: 0 */ + std::list DCTopologicalNode; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/DCGround.cpp b/CGMES_2.4.15_27JAN2020/DCGround.cpp index 22f7382fa..07d7f35f7 100644 --- a/CGMES_2.4.15_27JAN2020/DCGround.cpp +++ b/CGMES_2.4.15_27JAN2020/DCGround.cpp @@ -8,13 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Inductance.hpp" -#include "Resistance.hpp" using namespace CIMPP; -DCGround::DCGround() {}; -DCGround::~DCGround() {}; +DCGround::DCGround() {} +DCGround::~DCGround() {} static const std::list PossibleProfilesForClass = { @@ -42,38 +40,38 @@ DCGround::getPossibleProfilesForAttributes() const return map; } - -bool assign_DCGround_inductance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCGround_inductance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCGround* element = dynamic_cast(BaseClass_ptr1)) + DCGround* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inductance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DCGround_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCGround_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCGround* element = dynamic_cast(BaseClass_ptr1)) + DCGround* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_DCGround_inductance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCGround* element = dynamic_cast(BaseClass_ptr1)) + const DCGround* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inductance; if (!buffer.str().empty()) @@ -87,7 +85,8 @@ bool get_DCGround_inductance(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_DCGround_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCGround* element = dynamic_cast(BaseClass_ptr1)) + const DCGround* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -99,8 +98,6 @@ bool get_DCGround_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char DCGround::debugName[] = "DCGround"; const char* DCGround::debugString() const { @@ -109,13 +106,13 @@ const char* DCGround::debugString() const void DCGround::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCGround"), &DCGround_factory)); + factory_map.emplace("cim:DCGround", &DCGround_factory); } void DCGround::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCGround.inductance"), &assign_DCGround_inductance)); - assign_map.insert(std::make_pair(std::string("cim:DCGround.r"), &assign_DCGround_r)); + assign_map.emplace("cim:DCGround.inductance", &assign_DCGround_inductance); + assign_map.emplace("cim:DCGround.r", &assign_DCGround_r); } void DCGround::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/DCGround.hpp b/CGMES_2.4.15_27JAN2020/DCGround.hpp index 182760c0b..5321d8f49 100644 --- a/CGMES_2.4.15_27JAN2020/DCGround.hpp +++ b/CGMES_2.4.15_27JAN2020/DCGround.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A ground within a DC system. - */ + /** \brief A ground within a DC system. */ class DCGround : public DCConductingEquipment { public: @@ -28,8 +26,11 @@ namespace CIMPP DCGround(); ~DCGround() override; - CIMPP::Inductance inductance; /* Inductance to ground. Default: nullptr */ - CIMPP::Resistance r; /* Resistance to ground. Default: nullptr */ + /** \brief Inductance to ground. Default: nullptr */ + CIMPP::Inductance inductance; + + /** \brief Resistance to ground. Default: nullptr */ + CIMPP::Resistance r; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/DCLine.cpp b/CGMES_2.4.15_27JAN2020/DCLine.cpp index cb4fb87ef..15f9c9331 100644 --- a/CGMES_2.4.15_27JAN2020/DCLine.cpp +++ b/CGMES_2.4.15_27JAN2020/DCLine.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCLine::DCLine() : Region(nullptr) {}; -DCLine::~DCLine() {}; +DCLine::DCLine() : Region(nullptr) {} +DCLine::~DCLine() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ DCLine::getPossibleProfilesForAttributes() const return map; } - - bool assign_SubGeographicalRegion_DCLines(BaseClass*, BaseClass*); bool assign_DCLine_Region(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_DCLine_Region(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) return false; } - bool get_DCLine_Region(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DCLine* element = dynamic_cast(BaseClass_ptr1)) + const DCLine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Region != 0) { @@ -73,7 +71,6 @@ bool get_DCLine_Region(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCLine"), &DCLine_factory)); + factory_map.emplace("cim:DCLine", &DCLine_factory); } void DCLine::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void DCLine::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCLine.Region"), &assign_DCLine_Region)); + assign_map.emplace("cim:DCLine.Region", &assign_DCLine_Region); } void DCLine::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/DCLine.hpp b/CGMES_2.4.15_27JAN2020/DCLine.hpp index f6b31465b..91657a003 100644 --- a/CGMES_2.4.15_27JAN2020/DCLine.hpp +++ b/CGMES_2.4.15_27JAN2020/DCLine.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class SubGeographicalRegion; - /* - Overhead lines and/or cables connecting two or more HVDC substations. - */ + /** \brief Overhead lines and/or cables connecting two or more HVDC substations. */ class DCLine : public DCEquipmentContainer { public: @@ -27,7 +25,8 @@ namespace CIMPP DCLine(); ~DCLine() override; - CIMPP::SubGeographicalRegion* Region; /* Default: 0 */ + /** \brief Default: 0 */ + CIMPP::SubGeographicalRegion* Region; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/DCLineSegment.cpp b/CGMES_2.4.15_27JAN2020/DCLineSegment.cpp index ec65717a6..3b5b3a411 100644 --- a/CGMES_2.4.15_27JAN2020/DCLineSegment.cpp +++ b/CGMES_2.4.15_27JAN2020/DCLineSegment.cpp @@ -9,15 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "PerLengthDCLineParameter.hpp" -#include "Capacitance.hpp" -#include "Inductance.hpp" -#include "Length.hpp" -#include "Resistance.hpp" using namespace CIMPP; -DCLineSegment::DCLineSegment() : PerLengthParameter(nullptr) {}; -DCLineSegment::~DCLineSegment() {}; +DCLineSegment::DCLineSegment() : PerLengthParameter(nullptr) {} +DCLineSegment::~DCLineSegment() {} static const std::list PossibleProfilesForClass = { @@ -48,80 +44,97 @@ DCLineSegment::getPossibleProfilesForAttributes() const return map; } +bool assign_PerLengthDCLineParameter_DCLineSegments(BaseClass*, BaseClass*); +bool assign_DCLineSegment_PerLengthParameter(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + PerLengthDCLineParameter* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PerLengthParameter != element2) + { + element->PerLengthParameter = element2; + return assign_PerLengthDCLineParameter_DCLineSegments(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_DCLineSegment_capacitance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCLineSegment_capacitance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->capacitance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DCLineSegment_inductance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCLineSegment_inductance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inductance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DCLineSegment_length(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCLineSegment_length(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->length; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DCLineSegment_resistance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCLineSegment_resistance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->resistance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_PerLengthDCLineParameter_DCLineSegments(BaseClass*, BaseClass*); -bool assign_DCLineSegment_PerLengthParameter(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_DCLineSegment_PerLengthParameter(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - DCLineSegment* element = dynamic_cast(BaseClass_ptr1); - PerLengthDCLineParameter* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->PerLengthParameter != element2) + if (element->PerLengthParameter != 0) { - element->PerLengthParameter = element2; - return assign_PerLengthDCLineParameter_DCLineSegments(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->PerLengthParameter); + return true; } - return true; } return false; } bool get_DCLineSegment_capacitance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->capacitance; if (!buffer.str().empty()) @@ -135,7 +148,8 @@ bool get_DCLineSegment_capacitance(const BaseClass* BaseClass_ptr1, std::strings bool get_DCLineSegment_inductance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inductance; if (!buffer.str().empty()) @@ -149,7 +163,8 @@ bool get_DCLineSegment_inductance(const BaseClass* BaseClass_ptr1, std::stringst bool get_DCLineSegment_length(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->length; if (!buffer.str().empty()) @@ -163,7 +178,8 @@ bool get_DCLineSegment_length(const BaseClass* BaseClass_ptr1, std::stringstream bool get_DCLineSegment_resistance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->resistance; if (!buffer.str().empty()) @@ -175,21 +191,6 @@ bool get_DCLineSegment_resistance(const BaseClass* BaseClass_ptr1, std::stringst return false; } - -bool get_DCLineSegment_PerLengthParameter(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->PerLengthParameter != 0) - { - BaseClass_list.push_back(element->PerLengthParameter); - return true; - } - } - return false; -} - - const char DCLineSegment::debugName[] = "DCLineSegment"; const char* DCLineSegment::debugString() const { @@ -198,20 +199,20 @@ const char* DCLineSegment::debugString() const void DCLineSegment::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCLineSegment"), &DCLineSegment_factory)); + factory_map.emplace("cim:DCLineSegment", &DCLineSegment_factory); } void DCLineSegment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCLineSegment.capacitance"), &assign_DCLineSegment_capacitance)); - assign_map.insert(std::make_pair(std::string("cim:DCLineSegment.inductance"), &assign_DCLineSegment_inductance)); - assign_map.insert(std::make_pair(std::string("cim:DCLineSegment.length"), &assign_DCLineSegment_length)); - assign_map.insert(std::make_pair(std::string("cim:DCLineSegment.resistance"), &assign_DCLineSegment_resistance)); + assign_map.emplace("cim:DCLineSegment.capacitance", &assign_DCLineSegment_capacitance); + assign_map.emplace("cim:DCLineSegment.inductance", &assign_DCLineSegment_inductance); + assign_map.emplace("cim:DCLineSegment.length", &assign_DCLineSegment_length); + assign_map.emplace("cim:DCLineSegment.resistance", &assign_DCLineSegment_resistance); } void DCLineSegment::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCLineSegment.PerLengthParameter"), &assign_DCLineSegment_PerLengthParameter)); + assign_map.emplace("cim:DCLineSegment.PerLengthParameter", &assign_DCLineSegment_PerLengthParameter); } void DCLineSegment::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/DCLineSegment.hpp b/CGMES_2.4.15_27JAN2020/DCLineSegment.hpp index 44cf90e5a..58c280fe1 100644 --- a/CGMES_2.4.15_27JAN2020/DCLineSegment.hpp +++ b/CGMES_2.4.15_27JAN2020/DCLineSegment.hpp @@ -21,9 +21,7 @@ namespace CIMPP { class PerLengthDCLineParameter; - /* - A wire or combination of wires not insulated from one another, with consistent electrical characteristics, used to carry direct current between points in the DC region of the power system. - */ + /** \brief A wire or combination of wires not insulated from one another, with consistent electrical characteristics, used to carry direct current between points in the DC region of the power system. */ class DCLineSegment : public DCConductingEquipment { public: @@ -31,11 +29,20 @@ namespace CIMPP DCLineSegment(); ~DCLineSegment() override; - CIMPP::PerLengthDCLineParameter* PerLengthParameter; /* Set of per-length parameters for this line segment. Default: 0 */ - CIMPP::Capacitance capacitance; /* Capacitance of the DC line segment. Significant for cables only. Default: nullptr */ - CIMPP::Inductance inductance; /* Inductance of the DC line segment. Neglectable compared with DCSeriesDevice used for smoothing. Default: nullptr */ - CIMPP::Length length; /* Segment length for calculating line section capabilities. Default: nullptr */ - CIMPP::Resistance resistance; /* Resistance of the DC line segment. Default: nullptr */ + /** \brief Set of per-length parameters for this line segment. Default: 0 */ + CIMPP::PerLengthDCLineParameter* PerLengthParameter; + + /** \brief Capacitance of the DC line segment. Significant for cables only. Default: nullptr */ + CIMPP::Capacitance capacitance; + + /** \brief Inductance of the DC line segment. Neglectable compared with DCSeriesDevice used for smoothing. Default: nullptr */ + CIMPP::Inductance inductance; + + /** \brief Segment length for calculating line section capabilities. Default: nullptr */ + CIMPP::Length length; + + /** \brief Resistance of the DC line segment. Default: nullptr */ + CIMPP::Resistance resistance; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/DCNode.cpp b/CGMES_2.4.15_27JAN2020/DCNode.cpp index 38bacaf43..8fd69d983 100644 --- a/CGMES_2.4.15_27JAN2020/DCNode.cpp +++ b/CGMES_2.4.15_27JAN2020/DCNode.cpp @@ -8,14 +8,14 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "DCEquipmentContainer.hpp" #include "DCBaseTerminal.hpp" +#include "DCEquipmentContainer.hpp" #include "DCTopologicalNode.hpp" using namespace CIMPP; -DCNode::DCNode() : DCEquipmentContainer(nullptr), DCTopologicalNode(nullptr) {}; -DCNode::~DCNode() {}; +DCNode::DCNode() : DCEquipmentContainer(nullptr), DCTopologicalNode(nullptr) {} +DCNode::~DCNode() {} static const std::list PossibleProfilesForClass = { @@ -45,8 +45,6 @@ DCNode::getPossibleProfilesForAttributes() const return map; } - - bool assign_DCEquipmentContainer_DCNodes(BaseClass*, BaseClass*); bool assign_DCNode_DCEquipmentContainer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -63,6 +61,7 @@ bool assign_DCNode_DCEquipmentContainer(BaseClass* BaseClass_ptr1, BaseClass* Ba } return false; } + bool assign_DCBaseTerminal_DCNode(BaseClass*, BaseClass*); bool assign_DCNode_DCTerminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -79,6 +78,7 @@ bool assign_DCNode_DCTerminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_p } return false; } + bool assign_DCTopologicalNode_DCNodes(BaseClass*, BaseClass*); bool assign_DCNode_DCTopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -96,10 +96,10 @@ bool assign_DCNode_DCTopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseC return false; } - bool get_DCNode_DCEquipmentContainer(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DCNode* element = dynamic_cast(BaseClass_ptr1)) + const DCNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DCEquipmentContainer != 0) { @@ -110,9 +110,11 @@ bool get_DCNode_DCEquipmentContainer(const BaseClass* BaseClass_ptr1, std::list< return false; } + bool get_DCNode_DCTopologicalNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DCNode* element = dynamic_cast(BaseClass_ptr1)) + const DCNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DCTopologicalNode != 0) { @@ -123,7 +125,6 @@ bool get_DCNode_DCTopologicalNode(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCNode"), &DCNode_factory)); + factory_map.emplace("cim:DCNode", &DCNode_factory); } void DCNode::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -141,9 +142,9 @@ void DCNode::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCNode.DCEquipmentContainer"), &assign_DCNode_DCEquipmentContainer)); - assign_map.insert(std::make_pair(std::string("cim:DCNode.DCTerminals"), &assign_DCNode_DCTerminals)); - assign_map.insert(std::make_pair(std::string("cim:DCNode.DCTopologicalNode"), &assign_DCNode_DCTopologicalNode)); + assign_map.emplace("cim:DCNode.DCEquipmentContainer", &assign_DCNode_DCEquipmentContainer); + assign_map.emplace("cim:DCNode.DCTerminals", &assign_DCNode_DCTerminals); + assign_map.emplace("cim:DCNode.DCTopologicalNode", &assign_DCNode_DCTopologicalNode); } void DCNode::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/DCNode.hpp b/CGMES_2.4.15_27JAN2020/DCNode.hpp index 85161f647..9fdbe0a20 100644 --- a/CGMES_2.4.15_27JAN2020/DCNode.hpp +++ b/CGMES_2.4.15_27JAN2020/DCNode.hpp @@ -19,9 +19,7 @@ namespace CIMPP class DCEquipmentContainer; class DCTopologicalNode; - /* - DC nodes are points where terminals of DC conducting equipment are connected together with zero impedance. - */ + /** \brief DC nodes are points where terminals of DC conducting equipment are connected together with zero impedance. */ class DCNode : public IdentifiedObject { public: @@ -29,9 +27,14 @@ namespace CIMPP DCNode(); ~DCNode() override; - CIMPP::DCEquipmentContainer* DCEquipmentContainer; /* Default: 0 */ - std::list DCTerminals; /* Default: 0 */ - CIMPP::DCTopologicalNode* DCTopologicalNode; /* See association end TopologicalNode.ConnectivityNodes. Default: 0 */ + /** \brief Default: 0 */ + CIMPP::DCEquipmentContainer* DCEquipmentContainer; + + /** \brief Default: 0 */ + std::list DCTerminals; + + /** \brief See association end TopologicalNode.ConnectivityNodes. Default: 0 */ + CIMPP::DCTopologicalNode* DCTopologicalNode; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/DCPolarityKind.cpp b/CGMES_2.4.15_27JAN2020/DCPolarityKind.cpp index a1a646248..5c159224e 100644 --- a/CGMES_2.4.15_27JAN2020/DCPolarityKind.cpp +++ b/CGMES_2.4.15_27JAN2020/DCPolarityKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "DCPolarityKind") + if (EnumSymbol.substr(0, pos) != "DCPolarityKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "positive") + if (EnumSymbol == "positive") { rop = DCPolarityKind::positive; return lop; } - if(EnumSymbol == "middle") + if (EnumSymbol == "middle") { rop = DCPolarityKind::middle; return lop; } - if(EnumSymbol == "negative") + if (EnumSymbol == "negative") { rop = DCPolarityKind::negative; return lop; diff --git a/CGMES_2.4.15_27JAN2020/DCPolarityKind.hpp b/CGMES_2.4.15_27JAN2020/DCPolarityKind.hpp index 8b3bd24e9..266ac5884 100644 --- a/CGMES_2.4.15_27JAN2020/DCPolarityKind.hpp +++ b/CGMES_2.4.15_27JAN2020/DCPolarityKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Polarity for DC circuits. - */ + /** \brief Polarity for DC circuits. */ class DCPolarityKind { public: enum DCPolarityKind_ENUM { - /** - * Positive pole. - */ + /** Positive pole. */ positive, - /** - * Middle pole, potentially grounded. - */ + /** Middle pole, potentially grounded. */ middle, - /** - * Negative pole. - */ + /** Negative pole. */ negative, }; diff --git a/CGMES_2.4.15_27JAN2020/DCSeriesDevice.cpp b/CGMES_2.4.15_27JAN2020/DCSeriesDevice.cpp index 043263bbf..4f042583c 100644 --- a/CGMES_2.4.15_27JAN2020/DCSeriesDevice.cpp +++ b/CGMES_2.4.15_27JAN2020/DCSeriesDevice.cpp @@ -8,14 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Inductance.hpp" -#include "Voltage.hpp" -#include "Resistance.hpp" using namespace CIMPP; -DCSeriesDevice::DCSeriesDevice() {}; -DCSeriesDevice::~DCSeriesDevice() {}; +DCSeriesDevice::DCSeriesDevice() {} +DCSeriesDevice::~DCSeriesDevice() {} static const std::list PossibleProfilesForClass = { @@ -44,51 +41,52 @@ DCSeriesDevice::getPossibleProfilesForAttributes() const return map; } - -bool assign_DCSeriesDevice_inductance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCSeriesDevice_inductance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1)) + DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inductance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DCSeriesDevice_ratedUdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCSeriesDevice_ratedUdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1)) + DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedUdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DCSeriesDevice_resistance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCSeriesDevice_resistance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1)) + DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->resistance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_DCSeriesDevice_inductance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1)) + const DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inductance; if (!buffer.str().empty()) @@ -102,7 +100,8 @@ bool get_DCSeriesDevice_inductance(const BaseClass* BaseClass_ptr1, std::strings bool get_DCSeriesDevice_ratedUdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1)) + const DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedUdc; if (!buffer.str().empty()) @@ -116,7 +115,8 @@ bool get_DCSeriesDevice_ratedUdc(const BaseClass* BaseClass_ptr1, std::stringstr bool get_DCSeriesDevice_resistance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1)) + const DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->resistance; if (!buffer.str().empty()) @@ -128,8 +128,6 @@ bool get_DCSeriesDevice_resistance(const BaseClass* BaseClass_ptr1, std::strings return false; } - - const char DCSeriesDevice::debugName[] = "DCSeriesDevice"; const char* DCSeriesDevice::debugString() const { @@ -138,14 +136,14 @@ const char* DCSeriesDevice::debugString() const void DCSeriesDevice::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCSeriesDevice"), &DCSeriesDevice_factory)); + factory_map.emplace("cim:DCSeriesDevice", &DCSeriesDevice_factory); } void DCSeriesDevice::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCSeriesDevice.inductance"), &assign_DCSeriesDevice_inductance)); - assign_map.insert(std::make_pair(std::string("cim:DCSeriesDevice.ratedUdc"), &assign_DCSeriesDevice_ratedUdc)); - assign_map.insert(std::make_pair(std::string("cim:DCSeriesDevice.resistance"), &assign_DCSeriesDevice_resistance)); + assign_map.emplace("cim:DCSeriesDevice.inductance", &assign_DCSeriesDevice_inductance); + assign_map.emplace("cim:DCSeriesDevice.ratedUdc", &assign_DCSeriesDevice_ratedUdc); + assign_map.emplace("cim:DCSeriesDevice.resistance", &assign_DCSeriesDevice_resistance); } void DCSeriesDevice::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/DCSeriesDevice.hpp b/CGMES_2.4.15_27JAN2020/DCSeriesDevice.hpp index 501b3201b..73436d451 100644 --- a/CGMES_2.4.15_27JAN2020/DCSeriesDevice.hpp +++ b/CGMES_2.4.15_27JAN2020/DCSeriesDevice.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A series device within the DC system, typically a reactor used for filtering or smoothing. Needed for transient and short circuit studies. - */ + /** \brief A series device within the DC system, typically a reactor used for filtering or smoothing. Needed for transient and short circuit studies. */ class DCSeriesDevice : public DCConductingEquipment { public: @@ -29,9 +27,14 @@ namespace CIMPP DCSeriesDevice(); ~DCSeriesDevice() override; - CIMPP::Inductance inductance; /* Inductance of the device. Default: nullptr */ - CIMPP::Voltage ratedUdc; /* Rated DC device voltage. Converter configuration data used in power flow. Default: nullptr */ - CIMPP::Resistance resistance; /* Resistance of the DC device. Default: nullptr */ + /** \brief Inductance of the device. Default: nullptr */ + CIMPP::Inductance inductance; + + /** \brief Rated DC device voltage. Converter configuration data used in power flow. Default: nullptr */ + CIMPP::Voltage ratedUdc; + + /** \brief Resistance of the DC device. Default: nullptr */ + CIMPP::Resistance resistance; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/DCShunt.cpp b/CGMES_2.4.15_27JAN2020/DCShunt.cpp index a28b3b57f..35992c09b 100644 --- a/CGMES_2.4.15_27JAN2020/DCShunt.cpp +++ b/CGMES_2.4.15_27JAN2020/DCShunt.cpp @@ -8,14 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Capacitance.hpp" -#include "Voltage.hpp" -#include "Resistance.hpp" using namespace CIMPP; -DCShunt::DCShunt() {}; -DCShunt::~DCShunt() {}; +DCShunt::DCShunt() {} +DCShunt::~DCShunt() {} static const std::list PossibleProfilesForClass = { @@ -44,51 +41,52 @@ DCShunt::getPossibleProfilesForAttributes() const return map; } - -bool assign_DCShunt_capacitance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCShunt_capacitance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCShunt* element = dynamic_cast(BaseClass_ptr1)) + DCShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->capacitance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DCShunt_ratedUdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCShunt_ratedUdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCShunt* element = dynamic_cast(BaseClass_ptr1)) + DCShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedUdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DCShunt_resistance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCShunt_resistance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCShunt* element = dynamic_cast(BaseClass_ptr1)) + DCShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->resistance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_DCShunt_capacitance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCShunt* element = dynamic_cast(BaseClass_ptr1)) + const DCShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->capacitance; if (!buffer.str().empty()) @@ -102,7 +100,8 @@ bool get_DCShunt_capacitance(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_DCShunt_ratedUdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCShunt* element = dynamic_cast(BaseClass_ptr1)) + const DCShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedUdc; if (!buffer.str().empty()) @@ -116,7 +115,8 @@ bool get_DCShunt_ratedUdc(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_DCShunt_resistance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCShunt* element = dynamic_cast(BaseClass_ptr1)) + const DCShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->resistance; if (!buffer.str().empty()) @@ -128,8 +128,6 @@ bool get_DCShunt_resistance(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char DCShunt::debugName[] = "DCShunt"; const char* DCShunt::debugString() const { @@ -138,14 +136,14 @@ const char* DCShunt::debugString() const void DCShunt::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCShunt"), &DCShunt_factory)); + factory_map.emplace("cim:DCShunt", &DCShunt_factory); } void DCShunt::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCShunt.capacitance"), &assign_DCShunt_capacitance)); - assign_map.insert(std::make_pair(std::string("cim:DCShunt.ratedUdc"), &assign_DCShunt_ratedUdc)); - assign_map.insert(std::make_pair(std::string("cim:DCShunt.resistance"), &assign_DCShunt_resistance)); + assign_map.emplace("cim:DCShunt.capacitance", &assign_DCShunt_capacitance); + assign_map.emplace("cim:DCShunt.ratedUdc", &assign_DCShunt_ratedUdc); + assign_map.emplace("cim:DCShunt.resistance", &assign_DCShunt_resistance); } void DCShunt::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/DCShunt.hpp b/CGMES_2.4.15_27JAN2020/DCShunt.hpp index 96b4dc373..401c9d74e 100644 --- a/CGMES_2.4.15_27JAN2020/DCShunt.hpp +++ b/CGMES_2.4.15_27JAN2020/DCShunt.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A shunt device within the DC system, typically used for filtering. Needed for transient and short circuit studies. - */ + /** \brief A shunt device within the DC system, typically used for filtering. Needed for transient and short circuit studies. */ class DCShunt : public DCConductingEquipment { public: @@ -29,9 +27,14 @@ namespace CIMPP DCShunt(); ~DCShunt() override; - CIMPP::Capacitance capacitance; /* Capacitance of the DC shunt. Default: nullptr */ - CIMPP::Voltage ratedUdc; /* Rated DC device voltage. Converter configuration data used in power flow. Default: nullptr */ - CIMPP::Resistance resistance; /* Resistance of the DC device. Default: nullptr */ + /** \brief Capacitance of the DC shunt. Default: nullptr */ + CIMPP::Capacitance capacitance; + + /** \brief Rated DC device voltage. Converter configuration data used in power flow. Default: nullptr */ + CIMPP::Voltage ratedUdc; + + /** \brief Resistance of the DC device. Default: nullptr */ + CIMPP::Resistance resistance; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/DCSwitch.cpp b/CGMES_2.4.15_27JAN2020/DCSwitch.cpp index b5fbfc7a0..2183c59a5 100644 --- a/CGMES_2.4.15_27JAN2020/DCSwitch.cpp +++ b/CGMES_2.4.15_27JAN2020/DCSwitch.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCSwitch::DCSwitch() {}; -DCSwitch::~DCSwitch() {}; +DCSwitch::DCSwitch() {} +DCSwitch::~DCSwitch() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ DCSwitch::getPossibleProfilesForAttributes() const return map; } - - - - - const char DCSwitch::debugName[] = "DCSwitch"; const char* DCSwitch::debugString() const { @@ -51,7 +46,7 @@ const char* DCSwitch::debugString() const void DCSwitch::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCSwitch"), &DCSwitch_factory)); + factory_map.emplace("cim:DCSwitch", &DCSwitch_factory); } void DCSwitch::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/DCSwitch.hpp b/CGMES_2.4.15_27JAN2020/DCSwitch.hpp index c24dfb18c..2512b3a78 100644 --- a/CGMES_2.4.15_27JAN2020/DCSwitch.hpp +++ b/CGMES_2.4.15_27JAN2020/DCSwitch.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A switch within the DC system. - */ + /** \brief A switch within the DC system. */ class DCSwitch : public DCConductingEquipment { public: @@ -26,7 +24,6 @@ namespace CIMPP DCSwitch(); ~DCSwitch() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/DCTerminal.cpp b/CGMES_2.4.15_27JAN2020/DCTerminal.cpp index f71b265b9..b33606f5f 100644 --- a/CGMES_2.4.15_27JAN2020/DCTerminal.cpp +++ b/CGMES_2.4.15_27JAN2020/DCTerminal.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCTerminal::DCTerminal() : DCConductingEquipment(nullptr) {}; -DCTerminal::~DCTerminal() {}; +DCTerminal::DCTerminal() : DCConductingEquipment(nullptr) {} +DCTerminal::~DCTerminal() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ DCTerminal::getPossibleProfilesForAttributes() const return map; } - - bool assign_DCConductingEquipment_DCTerminals(BaseClass*, BaseClass*); bool assign_DCTerminal_DCConductingEquipment(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,10 +59,10 @@ bool assign_DCTerminal_DCConductingEquipment(BaseClass* BaseClass_ptr1, BaseClas return false; } - bool get_DCTerminal_DCConductingEquipment(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DCTerminal* element = dynamic_cast(BaseClass_ptr1)) + const DCTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DCConductingEquipment != 0) { @@ -75,7 +73,6 @@ bool get_DCTerminal_DCConductingEquipment(const BaseClass* BaseClass_ptr1, std:: return false; } - const char DCTerminal::debugName[] = "DCTerminal"; const char* DCTerminal::debugString() const { @@ -84,7 +81,7 @@ const char* DCTerminal::debugString() const void DCTerminal::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCTerminal"), &DCTerminal_factory)); + factory_map.emplace("cim:DCTerminal", &DCTerminal_factory); } void DCTerminal::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -93,7 +90,7 @@ void DCTerminal::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCTerminal.DCConductingEquipment"), &assign_DCTerminal_DCConductingEquipment)); + assign_map.emplace("cim:DCTerminal.DCConductingEquipment", &assign_DCTerminal_DCConductingEquipment); } void DCTerminal::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/DCTerminal.hpp b/CGMES_2.4.15_27JAN2020/DCTerminal.hpp index 64cd3ac9e..46a315342 100644 --- a/CGMES_2.4.15_27JAN2020/DCTerminal.hpp +++ b/CGMES_2.4.15_27JAN2020/DCTerminal.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class DCConductingEquipment; - /* - An electrical connection point to generic DC conducting equipment. - */ + /** \brief An electrical connection point to generic DC conducting equipment. */ class DCTerminal : public DCBaseTerminal { public: @@ -27,7 +25,8 @@ namespace CIMPP DCTerminal(); ~DCTerminal() override; - CIMPP::DCConductingEquipment* DCConductingEquipment; /* Default: 0 */ + /** \brief Default: 0 */ + CIMPP::DCConductingEquipment* DCConductingEquipment; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/DCTopologicalIsland.cpp b/CGMES_2.4.15_27JAN2020/DCTopologicalIsland.cpp index c75bdc26e..1e7a83ea2 100644 --- a/CGMES_2.4.15_27JAN2020/DCTopologicalIsland.cpp +++ b/CGMES_2.4.15_27JAN2020/DCTopologicalIsland.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCTopologicalIsland::DCTopologicalIsland() {}; -DCTopologicalIsland::~DCTopologicalIsland() {}; +DCTopologicalIsland::DCTopologicalIsland() {} +DCTopologicalIsland::~DCTopologicalIsland() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ DCTopologicalIsland::getPossibleProfilesForAttributes() const return map; } - - bool assign_DCTopologicalNode_DCTopologicalIsland(BaseClass*, BaseClass*); bool assign_DCTopologicalIsland_DCTopologicalNodes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_DCTopologicalIsland_DCTopologicalNodes(BaseClass* BaseClass_ptr1, Ba return false; } - bool get_DCTopologicalIsland_DCTopologicalNodes(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DCTopologicalIsland* element = dynamic_cast(BaseClass_ptr1)) + const DCTopologicalIsland* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { std::copy(element->DCTopologicalNodes.begin(), element->DCTopologicalNodes.end(), std::back_inserter(BaseClass_list)); return !BaseClass_list.empty(); @@ -70,7 +68,6 @@ bool get_DCTopologicalIsland_DCTopologicalNodes(const BaseClass* BaseClass_ptr1, return false; } - const char DCTopologicalIsland::debugName[] = "DCTopologicalIsland"; const char* DCTopologicalIsland::debugString() const { @@ -79,7 +76,7 @@ const char* DCTopologicalIsland::debugString() const void DCTopologicalIsland::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCTopologicalIsland"), &DCTopologicalIsland_factory)); + factory_map.emplace("cim:DCTopologicalIsland", &DCTopologicalIsland_factory); } void DCTopologicalIsland::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -88,7 +85,7 @@ void DCTopologicalIsland::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCTopologicalIsland.DCTopologicalNodes"), &assign_DCTopologicalIsland_DCTopologicalNodes)); + assign_map.emplace("cim:DCTopologicalIsland.DCTopologicalNodes", &assign_DCTopologicalIsland_DCTopologicalNodes); } void DCTopologicalIsland::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/DCTopologicalIsland.hpp b/CGMES_2.4.15_27JAN2020/DCTopologicalIsland.hpp index 2989980c0..35384ea69 100644 --- a/CGMES_2.4.15_27JAN2020/DCTopologicalIsland.hpp +++ b/CGMES_2.4.15_27JAN2020/DCTopologicalIsland.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class DCTopologicalNode; - /* - An electrically connected subset of the network. DC topological islands can change as the current network state changes: e.g. due to - disconnect switches or breakers change state in a SCADA/EMS - manual creation, change or deletion of topological nodes in a planning tool. - */ + /** \brief An electrically connected subset of the network. DC topological islands can change as the current network state changes: e.g. due to - disconnect switches or breakers change state in a SCADA/EMS - manual creation, change or deletion of topological nodes in a planning tool. */ class DCTopologicalIsland : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP DCTopologicalIsland(); ~DCTopologicalIsland() override; - std::list DCTopologicalNodes; /* Default: 0 */ + /** \brief Default: 0 */ + std::list DCTopologicalNodes; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/DCTopologicalNode.cpp b/CGMES_2.4.15_27JAN2020/DCTopologicalNode.cpp index 72a2e0655..86481b2ec 100644 --- a/CGMES_2.4.15_27JAN2020/DCTopologicalNode.cpp +++ b/CGMES_2.4.15_27JAN2020/DCTopologicalNode.cpp @@ -8,15 +8,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include +#include "DCBaseTerminal.hpp" #include "DCEquipmentContainer.hpp" #include "DCNode.hpp" -#include "DCBaseTerminal.hpp" #include "DCTopologicalIsland.hpp" using namespace CIMPP; -DCTopologicalNode::DCTopologicalNode() : DCEquipmentContainer(nullptr), DCTopologicalIsland(nullptr) {}; -DCTopologicalNode::~DCTopologicalNode() {}; +DCTopologicalNode::DCTopologicalNode() : DCEquipmentContainer(nullptr), DCTopologicalIsland(nullptr) {} +DCTopologicalNode::~DCTopologicalNode() {} static const std::list PossibleProfilesForClass = { @@ -47,8 +47,6 @@ DCTopologicalNode::getPossibleProfilesForAttributes() const return map; } - - bool assign_DCEquipmentContainer_DCTopologicalNode(BaseClass*, BaseClass*); bool assign_DCTopologicalNode_DCEquipmentContainer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -65,6 +63,7 @@ bool assign_DCTopologicalNode_DCEquipmentContainer(BaseClass* BaseClass_ptr1, Ba } return false; } + bool assign_DCNode_DCTopologicalNode(BaseClass*, BaseClass*); bool assign_DCTopologicalNode_DCNodes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -81,6 +80,7 @@ bool assign_DCTopologicalNode_DCNodes(BaseClass* BaseClass_ptr1, BaseClass* Base } return false; } + bool assign_DCBaseTerminal_DCTopologicalNode(BaseClass*, BaseClass*); bool assign_DCTopologicalNode_DCTerminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -97,6 +97,7 @@ bool assign_DCTopologicalNode_DCTerminals(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_DCTopologicalIsland_DCTopologicalNodes(BaseClass*, BaseClass*); bool assign_DCTopologicalNode_DCTopologicalIsland(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -114,10 +115,10 @@ bool assign_DCTopologicalNode_DCTopologicalIsland(BaseClass* BaseClass_ptr1, Bas return false; } - bool get_DCTopologicalNode_DCEquipmentContainer(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DCTopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + const DCTopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DCEquipmentContainer != 0) { @@ -129,6 +130,8 @@ bool get_DCTopologicalNode_DCEquipmentContainer(const BaseClass* BaseClass_ptr1, } + + const char DCTopologicalNode::debugName[] = "DCTopologicalNode"; const char* DCTopologicalNode::debugString() const { @@ -137,7 +140,7 @@ const char* DCTopologicalNode::debugString() const void DCTopologicalNode::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCTopologicalNode"), &DCTopologicalNode_factory)); + factory_map.emplace("cim:DCTopologicalNode", &DCTopologicalNode_factory); } void DCTopologicalNode::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -146,10 +149,10 @@ void DCTopologicalNode::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCTopologicalNode.DCEquipmentContainer"), &assign_DCTopologicalNode_DCEquipmentContainer)); - assign_map.insert(std::make_pair(std::string("cim:DCTopologicalNode.DCNodes"), &assign_DCTopologicalNode_DCNodes)); - assign_map.insert(std::make_pair(std::string("cim:DCTopologicalNode.DCTerminals"), &assign_DCTopologicalNode_DCTerminals)); - assign_map.insert(std::make_pair(std::string("cim:DCTopologicalNode.DCTopologicalIsland"), &assign_DCTopologicalNode_DCTopologicalIsland)); + assign_map.emplace("cim:DCTopologicalNode.DCEquipmentContainer", &assign_DCTopologicalNode_DCEquipmentContainer); + assign_map.emplace("cim:DCTopologicalNode.DCNodes", &assign_DCTopologicalNode_DCNodes); + assign_map.emplace("cim:DCTopologicalNode.DCTerminals", &assign_DCTopologicalNode_DCTerminals); + assign_map.emplace("cim:DCTopologicalNode.DCTopologicalIsland", &assign_DCTopologicalNode_DCTopologicalIsland); } void DCTopologicalNode::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/DCTopologicalNode.hpp b/CGMES_2.4.15_27JAN2020/DCTopologicalNode.hpp index 9a417fc78..893680baa 100644 --- a/CGMES_2.4.15_27JAN2020/DCTopologicalNode.hpp +++ b/CGMES_2.4.15_27JAN2020/DCTopologicalNode.hpp @@ -20,9 +20,7 @@ namespace CIMPP class DCNode; class DCTopologicalIsland; - /* - DC bus. - */ + /** \brief DC bus. */ class DCTopologicalNode : public IdentifiedObject { public: @@ -30,10 +28,17 @@ namespace CIMPP DCTopologicalNode(); ~DCTopologicalNode() override; - CIMPP::DCEquipmentContainer* DCEquipmentContainer; /* Default: 0 */ - std::list DCNodes; /* See association end ConnectivityNode.TopologicalNode. Default: 0 */ - std::list DCTerminals; /* See association end Terminal.TopologicalNode. Default: 0 */ - CIMPP::DCTopologicalIsland* DCTopologicalIsland; /* Default: 0 */ + /** \brief Default: 0 */ + CIMPP::DCEquipmentContainer* DCEquipmentContainer; + + /** \brief See association end ConnectivityNode.TopologicalNode. Default: 0 */ + std::list DCNodes; + + /** \brief See association end Terminal.TopologicalNode. Default: 0 */ + std::list DCTerminals; + + /** \brief Default: 0 */ + CIMPP::DCTopologicalIsland* DCTopologicalIsland; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Date.hpp b/CGMES_2.4.15_27JAN2020/Date.hpp index e2063f08d..2b1ac1788 100644 --- a/CGMES_2.4.15_27JAN2020/Date.hpp +++ b/CGMES_2.4.15_27JAN2020/Date.hpp @@ -4,22 +4,20 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen */ -#include #include #include +#include namespace CIMPP { - /* - Date as "yyyy-mm-dd", which conforms with ISO 8601. UTC time zone is specified as "yyyy-mm-ddZ". A local timezone relative UTC is specified as "yyyy-mm-dd(+/-)hh:mm". - */ + /** \brief Date as "yyyy-mm-dd", which conforms with ISO 8601. UTC time zone is specified as "yyyy-mm-ddZ". A local timezone relative UTC is specified as "yyyy-mm-dd(+/-)hh:mm". */ class Date { public: Date() : initialized(false) {} Date(const std::string& value) : value(value), initialized(true) {} - Date& operator=(const std::string &rop); + Date& operator=(const std::string& rop); operator std::string() const; std::string value; diff --git a/CGMES_2.4.15_27JAN2020/DateTime.hpp b/CGMES_2.4.15_27JAN2020/DateTime.hpp index 745e7583b..1e503d539 100644 --- a/CGMES_2.4.15_27JAN2020/DateTime.hpp +++ b/CGMES_2.4.15_27JAN2020/DateTime.hpp @@ -4,22 +4,20 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen */ -#include #include #include +#include namespace CIMPP { - /* - Date and time as "yyyy-mm-ddThh:mm:ss.sss", which conforms with ISO 8601. UTC time zone is specified as "yyyy-mm-ddThh:mm:ss.sssZ". A local timezone relative UTC is specified as "yyyy-mm-ddThh:mm:ss.sss-hh:mm". The second component (shown here as "ss.sss") could have any number of digits in its fractional part to allow any kind of precision beyond seconds. - */ + /** \brief Date and time as "yyyy-mm-ddThh:mm:ss.sss", which conforms with ISO 8601. UTC time zone is specified as "yyyy-mm-ddThh:mm:ss.sssZ". A local timezone relative UTC is specified as "yyyy-mm-ddThh:mm:ss.sss-hh:mm". The second component (shown here as "ss.sss") could have any number of digits in its fractional part to allow any kind of precision beyond seconds. */ class DateTime { public: DateTime() : initialized(false) {} DateTime(const std::string& value) : value(value), initialized(true) {} - DateTime& operator=(const std::string &rop); + DateTime& operator=(const std::string& rop); operator std::string() const; std::string value; diff --git a/CGMES_2.4.15_27JAN2020/DayType.cpp b/CGMES_2.4.15_27JAN2020/DayType.cpp index f97e62d1d..3783d542a 100644 --- a/CGMES_2.4.15_27JAN2020/DayType.cpp +++ b/CGMES_2.4.15_27JAN2020/DayType.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DayType::DayType() {}; -DayType::~DayType() {}; +DayType::DayType() {} +DayType::~DayType() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ DayType::getPossibleProfilesForAttributes() const return map; } - - bool assign_SeasonDayTypeSchedule_DayType(BaseClass*, BaseClass*); bool assign_DayType_SeasonDayTypeSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_DayType_SeasonDayTypeSchedules(BaseClass* BaseClass_ptr1, BaseClass* } - const char DayType::debugName[] = "DayType"; const char* DayType::debugString() const { @@ -69,7 +66,7 @@ const char* DayType::debugString() const void DayType::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DayType"), &DayType_factory)); + factory_map.emplace("cim:DayType", &DayType_factory); } void DayType::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void DayType::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DayType.SeasonDayTypeSchedules"), &assign_DayType_SeasonDayTypeSchedules)); + assign_map.emplace("cim:DayType.SeasonDayTypeSchedules", &assign_DayType_SeasonDayTypeSchedules); } void DayType::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/DayType.hpp b/CGMES_2.4.15_27JAN2020/DayType.hpp index a45e7e1f4..71436c000 100644 --- a/CGMES_2.4.15_27JAN2020/DayType.hpp +++ b/CGMES_2.4.15_27JAN2020/DayType.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class SeasonDayTypeSchedule; - /* - Group of similar days. For example it could be used to represent weekdays, weekend, or holidays. - */ + /** \brief Group of similar days. For example it could be used to represent weekdays, weekend, or holidays. */ class DayType : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP DayType(); ~DayType() override; - std::list SeasonDayTypeSchedules; /* DayType for the Schedule. Default: 0 */ + /** \brief DayType for the Schedule. Default: 0 */ + std::list SeasonDayTypeSchedules; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Decimal.hpp b/CGMES_2.4.15_27JAN2020/Decimal.hpp index fa74e37f8..0c8633d79 100644 --- a/CGMES_2.4.15_27JAN2020/Decimal.hpp +++ b/CGMES_2.4.15_27JAN2020/Decimal.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Decimal is the base-10 notational system for representing real numbers. - */ + /** \brief Decimal is the base-10 notational system for representing real numbers. */ class Decimal { public: diff --git a/CGMES_2.4.15_27JAN2020/Diagram.cpp b/CGMES_2.4.15_27JAN2020/Diagram.cpp index a3d865170..20da79106 100644 --- a/CGMES_2.4.15_27JAN2020/Diagram.cpp +++ b/CGMES_2.4.15_27JAN2020/Diagram.cpp @@ -10,16 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "DiagramObject.hpp" #include "DiagramStyle.hpp" -#include "OrientationKind.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -Diagram::Diagram() : DiagramStyle(nullptr) {}; -Diagram::~Diagram() {}; +Diagram::Diagram() : DiagramStyle(nullptr) {} +Diagram::~Diagram() {} static const std::list PossibleProfilesForClass = { @@ -52,125 +47,131 @@ Diagram::getPossibleProfilesForAttributes() const return map; } - -bool assign_Diagram_orientation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramObject_Diagram(BaseClass*, BaseClass*); +bool assign_Diagram_DiagramElements(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (Diagram* element = dynamic_cast(BaseClass_ptr1)) + Diagram* element = dynamic_cast(BaseClass_ptr1); + DiagramObject* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->orientation; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->DiagramElements.begin(), element->DiagramElements.end(), element2) == element->DiagramElements.end()) + { + element->DiagramElements.push_back(element2); + return assign_DiagramObject_Diagram(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_Diagram_x1InitialView(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramStyle_Diagram(BaseClass*, BaseClass*); +bool assign_Diagram_DiagramStyle(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (Diagram* element = dynamic_cast(BaseClass_ptr1)) + Diagram* element = dynamic_cast(BaseClass_ptr1); + DiagramStyle* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->x1InitialView; - if (buffer.fail()) - return false; - else - return true; + if (element->DiagramStyle != element2) + { + element->DiagramStyle = element2; + return assign_DiagramStyle_Diagram(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_Diagram_x2InitialView(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Diagram_orientation(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Diagram* element = dynamic_cast(BaseClass_ptr1)) + Diagram* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->x2InitialView; - if (buffer.fail()) - return false; - else + buffer >> element->orientation; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Diagram_y1InitialView(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Diagram_x1InitialView(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Diagram* element = dynamic_cast(BaseClass_ptr1)) + Diagram* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->y1InitialView; - if (buffer.fail()) - return false; - else + buffer >> element->x1InitialView; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Diagram_y2InitialView(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Diagram_x2InitialView(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Diagram* element = dynamic_cast(BaseClass_ptr1)) + Diagram* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->y2InitialView; - if (buffer.fail()) - return false; - else + buffer >> element->x2InitialView; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_DiagramObject_Diagram(BaseClass*, BaseClass*); -bool assign_Diagram_DiagramElements(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_Diagram_y1InitialView(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { Diagram* element = dynamic_cast(BaseClass_ptr1); - DiagramObject* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->DiagramElements.begin(), element->DiagramElements.end(), element2) == element->DiagramElements.end()) + buffer >> element->y1InitialView; + if (!buffer.fail()) { - element->DiagramElements.push_back(element2); - return assign_DiagramObject_Diagram(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_DiagramStyle_Diagram(BaseClass*, BaseClass*); -bool assign_Diagram_DiagramStyle(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_Diagram_y2InitialView(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { Diagram* element = dynamic_cast(BaseClass_ptr1); - DiagramStyle* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->DiagramStyle != element2) + buffer >> element->y2InitialView; + if (!buffer.fail()) { - element->DiagramStyle = element2; - return assign_DiagramStyle_Diagram(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool get_Diagram_x1InitialView(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) + +bool get_Diagram_DiagramStyle(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Diagram* element = dynamic_cast(BaseClass_ptr1)) + const Diagram* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->x1InitialView; - if (!buffer.str().empty()) + if (element->DiagramStyle != 0) { + BaseClass_list.push_back(element->DiagramStyle); return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_Diagram_x2InitialView(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_Diagram_orientation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Diagram* element = dynamic_cast(BaseClass_ptr1)) + const Diagram* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->x2InitialView; + buffer << element->orientation; if (!buffer.str().empty()) { return true; @@ -180,11 +181,12 @@ bool get_Diagram_x2InitialView(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } -bool get_Diagram_y1InitialView(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_Diagram_x1InitialView(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Diagram* element = dynamic_cast(BaseClass_ptr1)) + const Diagram* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->y1InitialView; + buffer << element->x1InitialView; if (!buffer.str().empty()) { return true; @@ -194,11 +196,12 @@ bool get_Diagram_y1InitialView(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } -bool get_Diagram_y2InitialView(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_Diagram_x2InitialView(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Diagram* element = dynamic_cast(BaseClass_ptr1)) + const Diagram* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->y2InitialView; + buffer << element->x2InitialView; if (!buffer.str().empty()) { return true; @@ -208,26 +211,27 @@ bool get_Diagram_y2InitialView(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } - -bool get_Diagram_DiagramStyle(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) +bool get_Diagram_y1InitialView(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Diagram* element = dynamic_cast(BaseClass_ptr1)) + const Diagram* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->DiagramStyle != 0) + buffer << element->y1InitialView; + if (!buffer.str().empty()) { - BaseClass_list.push_back(element->DiagramStyle); return true; } } + buffer.setstate(std::ios::failbit); return false; } - -bool get_Diagram_orientation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_Diagram_y2InitialView(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Diagram* element = dynamic_cast(BaseClass_ptr1)) + const Diagram* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->orientation; + buffer << element->y2InitialView; if (!buffer.str().empty()) { return true; @@ -245,22 +249,22 @@ const char* Diagram::debugString() const void Diagram::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Diagram"), &Diagram_factory)); + factory_map.emplace("cim:Diagram", &Diagram_factory); } void Diagram::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Diagram.orientation"), &assign_Diagram_orientation)); - assign_map.insert(std::make_pair(std::string("cim:Diagram.x1InitialView"), &assign_Diagram_x1InitialView)); - assign_map.insert(std::make_pair(std::string("cim:Diagram.x2InitialView"), &assign_Diagram_x2InitialView)); - assign_map.insert(std::make_pair(std::string("cim:Diagram.y1InitialView"), &assign_Diagram_y1InitialView)); - assign_map.insert(std::make_pair(std::string("cim:Diagram.y2InitialView"), &assign_Diagram_y2InitialView)); + assign_map.emplace("cim:Diagram.orientation", &assign_Diagram_orientation); + assign_map.emplace("cim:Diagram.x1InitialView", &assign_Diagram_x1InitialView); + assign_map.emplace("cim:Diagram.x2InitialView", &assign_Diagram_x2InitialView); + assign_map.emplace("cim:Diagram.y1InitialView", &assign_Diagram_y1InitialView); + assign_map.emplace("cim:Diagram.y2InitialView", &assign_Diagram_y2InitialView); } void Diagram::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Diagram.DiagramElements"), &assign_Diagram_DiagramElements)); - assign_map.insert(std::make_pair(std::string("cim:Diagram.DiagramStyle"), &assign_Diagram_DiagramStyle)); + assign_map.emplace("cim:Diagram.DiagramElements", &assign_Diagram_DiagramElements); + assign_map.emplace("cim:Diagram.DiagramStyle", &assign_Diagram_DiagramStyle); } void Diagram::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/Diagram.hpp b/CGMES_2.4.15_27JAN2020/Diagram.hpp index 4cad5f424..f8820ae2f 100644 --- a/CGMES_2.4.15_27JAN2020/Diagram.hpp +++ b/CGMES_2.4.15_27JAN2020/Diagram.hpp @@ -20,9 +20,7 @@ namespace CIMPP class DiagramObject; class DiagramStyle; - /* - The diagram being exchanged. The coordinate system is a standard Cartesian coordinate system and the orientation attribute defines the orientation. - */ + /** \brief The diagram being exchanged. The coordinate system is a standard Cartesian coordinate system and the orientation attribute defines the orientation. */ class Diagram : public IdentifiedObject { public: @@ -30,13 +28,26 @@ namespace CIMPP Diagram(); ~Diagram() override; - std::list DiagramElements; /* A diagram is made up of multiple diagram objects. Default: 0 */ - CIMPP::DiagramStyle* DiagramStyle; /* A Diagram may have a DiagramStyle. Default: 0 */ - CIMPP::OrientationKind orientation; /* Coordinate system orientation of the diagram. Default: 0 */ - CIMPP::Simple_Float x1InitialView; /* X coordinate of the first corner of the initial view. Default: nullptr */ - CIMPP::Simple_Float x2InitialView; /* X coordinate of the second corner of the initial view. Default: nullptr */ - CIMPP::Simple_Float y1InitialView; /* Y coordinate of the first corner of the initial view. Default: nullptr */ - CIMPP::Simple_Float y2InitialView; /* Y coordinate of the second corner of the initial view. Default: nullptr */ + /** \brief A diagram is made up of multiple diagram objects. Default: 0 */ + std::list DiagramElements; + + /** \brief A Diagram may have a DiagramStyle. Default: 0 */ + CIMPP::DiagramStyle* DiagramStyle; + + /** \brief Coordinate system orientation of the diagram. Default: 0 */ + CIMPP::OrientationKind orientation; + + /** \brief X coordinate of the first corner of the initial view. Default: nullptr */ + CIMPP::Simple_Float x1InitialView; + + /** \brief X coordinate of the second corner of the initial view. Default: nullptr */ + CIMPP::Simple_Float x2InitialView; + + /** \brief Y coordinate of the first corner of the initial view. Default: nullptr */ + CIMPP::Simple_Float y1InitialView; + + /** \brief Y coordinate of the second corner of the initial view. Default: nullptr */ + CIMPP::Simple_Float y2InitialView; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/DiagramLayoutVersion.cpp b/CGMES_2.4.15_27JAN2020/DiagramLayoutVersion.cpp index facaf59c2..55ea4f1cf 100644 --- a/CGMES_2.4.15_27JAN2020/DiagramLayoutVersion.cpp +++ b/CGMES_2.4.15_27JAN2020/DiagramLayoutVersion.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "String.hpp" -#include "String.hpp" -#include "Date.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -DiagramLayoutVersion::DiagramLayoutVersion() {}; -DiagramLayoutVersion::~DiagramLayoutVersion() {}; +DiagramLayoutVersion::DiagramLayoutVersion() {} +DiagramLayoutVersion::~DiagramLayoutVersion() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ DiagramLayoutVersion::getPossibleProfilesForAttributes() const return map; } - -bool assign_DiagramLayoutVersion_baseUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramLayoutVersion_baseUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiagramLayoutVersion_baseURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramLayoutVersion_baseURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiagramLayoutVersion_date(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramLayoutVersion_date(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->date = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiagramLayoutVersion_differenceModelURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramLayoutVersion_differenceModelURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->differenceModelURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiagramLayoutVersion_entsoeUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramLayoutVersion_entsoeUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiagramLayoutVersion_entsoeURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramLayoutVersion_entsoeURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiagramLayoutVersion_modelDescriptionURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramLayoutVersion_modelDescriptionURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->modelDescriptionURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiagramLayoutVersion_namespaceRDF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramLayoutVersion_namespaceRDF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceRDF = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiagramLayoutVersion_namespaceUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramLayoutVersion_namespaceUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiagramLayoutVersion_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramLayoutVersion_shortName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->shortName = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_DiagramLayoutVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseUML; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_DiagramLayoutVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stri bool get_DiagramLayoutVersion_baseURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseURI; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_DiagramLayoutVersion_baseURI(const BaseClass* BaseClass_ptr1, std::stri bool get_DiagramLayoutVersion_date(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->date; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_DiagramLayoutVersion_date(const BaseClass* BaseClass_ptr1, std::strings bool get_DiagramLayoutVersion_differenceModelURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->differenceModelURI; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_DiagramLayoutVersion_differenceModelURI(const BaseClass* BaseClass_ptr1 bool get_DiagramLayoutVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeUML; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_DiagramLayoutVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::st bool get_DiagramLayoutVersion_entsoeURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeURI; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_DiagramLayoutVersion_entsoeURI(const BaseClass* BaseClass_ptr1, std::st bool get_DiagramLayoutVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->modelDescriptionURI; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_DiagramLayoutVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr bool get_DiagramLayoutVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceRDF; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_DiagramLayoutVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std: bool get_DiagramLayoutVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceUML; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_DiagramLayoutVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std: bool get_DiagramLayoutVersion_shortName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1)) + const DiagramLayoutVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortName; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_DiagramLayoutVersion_shortName(const BaseClass* BaseClass_ptr1, std::st return false; } - - const char DiagramLayoutVersion::debugName[] = "DiagramLayoutVersion"; const char* DiagramLayoutVersion::debugString() const { @@ -341,21 +346,21 @@ const char* DiagramLayoutVersion::debugString() const void DiagramLayoutVersion::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiagramLayoutVersion"), &DiagramLayoutVersion_factory)); + factory_map.emplace("cim:DiagramLayoutVersion", &DiagramLayoutVersion_factory); } void DiagramLayoutVersion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiagramLayoutVersion.baseUML"), &assign_DiagramLayoutVersion_baseUML)); - assign_map.insert(std::make_pair(std::string("cim:DiagramLayoutVersion.baseURI"), &assign_DiagramLayoutVersion_baseURI)); - assign_map.insert(std::make_pair(std::string("cim:DiagramLayoutVersion.date"), &assign_DiagramLayoutVersion_date)); - assign_map.insert(std::make_pair(std::string("cim:DiagramLayoutVersion.differenceModelURI"), &assign_DiagramLayoutVersion_differenceModelURI)); - assign_map.insert(std::make_pair(std::string("cim:DiagramLayoutVersion.entsoeUML"), &assign_DiagramLayoutVersion_entsoeUML)); - assign_map.insert(std::make_pair(std::string("cim:DiagramLayoutVersion.entsoeURI"), &assign_DiagramLayoutVersion_entsoeURI)); - assign_map.insert(std::make_pair(std::string("cim:DiagramLayoutVersion.modelDescriptionURI"), &assign_DiagramLayoutVersion_modelDescriptionURI)); - assign_map.insert(std::make_pair(std::string("cim:DiagramLayoutVersion.namespaceRDF"), &assign_DiagramLayoutVersion_namespaceRDF)); - assign_map.insert(std::make_pair(std::string("cim:DiagramLayoutVersion.namespaceUML"), &assign_DiagramLayoutVersion_namespaceUML)); - assign_map.insert(std::make_pair(std::string("cim:DiagramLayoutVersion.shortName"), &assign_DiagramLayoutVersion_shortName)); + assign_map.emplace("cim:DiagramLayoutVersion.baseUML", &assign_DiagramLayoutVersion_baseUML); + assign_map.emplace("cim:DiagramLayoutVersion.baseURI", &assign_DiagramLayoutVersion_baseURI); + assign_map.emplace("cim:DiagramLayoutVersion.date", &assign_DiagramLayoutVersion_date); + assign_map.emplace("cim:DiagramLayoutVersion.differenceModelURI", &assign_DiagramLayoutVersion_differenceModelURI); + assign_map.emplace("cim:DiagramLayoutVersion.entsoeUML", &assign_DiagramLayoutVersion_entsoeUML); + assign_map.emplace("cim:DiagramLayoutVersion.entsoeURI", &assign_DiagramLayoutVersion_entsoeURI); + assign_map.emplace("cim:DiagramLayoutVersion.modelDescriptionURI", &assign_DiagramLayoutVersion_modelDescriptionURI); + assign_map.emplace("cim:DiagramLayoutVersion.namespaceRDF", &assign_DiagramLayoutVersion_namespaceRDF); + assign_map.emplace("cim:DiagramLayoutVersion.namespaceUML", &assign_DiagramLayoutVersion_namespaceUML); + assign_map.emplace("cim:DiagramLayoutVersion.shortName", &assign_DiagramLayoutVersion_shortName); } void DiagramLayoutVersion::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/DiagramLayoutVersion.hpp b/CGMES_2.4.15_27JAN2020/DiagramLayoutVersion.hpp index e2ad534f1..e260f2faf 100644 --- a/CGMES_2.4.15_27JAN2020/DiagramLayoutVersion.hpp +++ b/CGMES_2.4.15_27JAN2020/DiagramLayoutVersion.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Version details. - */ + /** \brief Version details. */ class DiagramLayoutVersion : public BaseClass { public: @@ -28,16 +26,35 @@ namespace CIMPP DiagramLayoutVersion(); ~DiagramLayoutVersion() override; - CIMPP::String baseUML; /* Base UML provided by CIM model manager. Default: '' */ - CIMPP::String baseURI; /* Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ - CIMPP::Date date; /* Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ - CIMPP::String differenceModelURI; /* Difference model URI defined by IEC 61970-552. Default: '' */ - CIMPP::String entsoeUML; /* UML provided by ENTSO-E. Default: '' */ - CIMPP::String entsoeURI; /* Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/DiagramLayout/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ - CIMPP::String modelDescriptionURI; /* Model Description URI defined by IEC 61970-552. Default: '' */ - CIMPP::String namespaceRDF; /* RDF namespace. Default: '' */ - CIMPP::String namespaceUML; /* CIM UML namespace. Default: '' */ - CIMPP::String shortName; /* The short name of the profile used in profile documentation. Default: '' */ + /** \brief Base UML provided by CIM model manager. Default: '' */ + CIMPP::String baseUML; + + /** \brief Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ + CIMPP::String baseURI; + + /** \brief Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ + CIMPP::Date date; + + /** \brief Difference model URI defined by IEC 61970-552. Default: '' */ + CIMPP::String differenceModelURI; + + /** \brief UML provided by ENTSO-E. Default: '' */ + CIMPP::String entsoeUML; + + /** \brief Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/DiagramLayout/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ + CIMPP::String entsoeURI; + + /** \brief Model Description URI defined by IEC 61970-552. Default: '' */ + CIMPP::String modelDescriptionURI; + + /** \brief RDF namespace. Default: '' */ + CIMPP::String namespaceRDF; + + /** \brief CIM UML namespace. Default: '' */ + CIMPP::String namespaceUML; + + /** \brief The short name of the profile used in profile documentation. Default: '' */ + CIMPP::String shortName; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/DiagramObject.cpp b/CGMES_2.4.15_27JAN2020/DiagramObject.cpp index b873b7bb3..b85c6e596 100644 --- a/CGMES_2.4.15_27JAN2020/DiagramObject.cpp +++ b/CGMES_2.4.15_27JAN2020/DiagramObject.cpp @@ -13,16 +13,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "DiagramObjectStyle.hpp" #include "IdentifiedObject.hpp" #include "VisibilityLayer.hpp" -#include "Integer.hpp" -#include "Boolean.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "AngleDegrees.hpp" using namespace CIMPP; -DiagramObject::DiagramObject() : Diagram(nullptr), DiagramObjectStyle(nullptr), IdentifiedObject(nullptr) {}; -DiagramObject::~DiagramObject() {}; +DiagramObject::DiagramObject() : Diagram(nullptr), DiagramObjectStyle(nullptr), IdentifiedObject(nullptr) {} +DiagramObject::~DiagramObject() {} static const std::list PossibleProfilesForClass = { @@ -58,73 +53,6 @@ DiagramObject::getPossibleProfilesForAttributes() const return map; } - -bool assign_DiagramObject_drawingOrder(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (DiagramObject* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->drawingOrder; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_DiagramObject_isPolygon(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (DiagramObject* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->isPolygon; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_DiagramObject_offsetX(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (DiagramObject* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->offsetX; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_DiagramObject_offsetY(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (DiagramObject* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->offsetY; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_DiagramObject_rotation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (DiagramObject* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->rotation; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_Diagram_DiagramElements(BaseClass*, BaseClass*); bool assign_DiagramObject_Diagram(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -141,6 +69,7 @@ bool assign_DiagramObject_Diagram(BaseClass* BaseClass_ptr1, BaseClass* BaseClas } return false; } + bool assign_DiagramObjectPoint_DiagramObject(BaseClass*, BaseClass*); bool assign_DiagramObject_DiagramObjectPoints(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -157,6 +86,7 @@ bool assign_DiagramObject_DiagramObjectPoints(BaseClass* BaseClass_ptr1, BaseCla } return false; } + bool assign_DiagramObjectStyle_StyledObjects(BaseClass*, BaseClass*); bool assign_DiagramObject_DiagramObjectStyle(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -173,6 +103,7 @@ bool assign_DiagramObject_DiagramObjectStyle(BaseClass* BaseClass_ptr1, BaseClas } return false; } + bool assign_IdentifiedObject_DiagramObjects(BaseClass*, BaseClass*); bool assign_DiagramObject_IdentifiedObject(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -189,6 +120,7 @@ bool assign_DiagramObject_IdentifiedObject(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_VisibilityLayer_VisibleObjects(BaseClass*, BaseClass*); bool assign_DiagramObject_VisibilityLayers(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -206,80 +138,80 @@ bool assign_DiagramObject_VisibilityLayers(BaseClass* BaseClass_ptr1, BaseClass* return false; } -bool get_DiagramObject_drawingOrder(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_DiagramObject_drawingOrder(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const DiagramObject* element = dynamic_cast(BaseClass_ptr1)) + DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->drawingOrder; - if (!buffer.str().empty()) + buffer >> element->drawingOrder; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_DiagramObject_isPolygon(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_DiagramObject_isPolygon(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const DiagramObject* element = dynamic_cast(BaseClass_ptr1)) + DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->isPolygon; - if (!buffer.str().empty()) + buffer >> element->isPolygon; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_DiagramObject_offsetX(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_DiagramObject_offsetX(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const DiagramObject* element = dynamic_cast(BaseClass_ptr1)) + DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->offsetX; - if (!buffer.str().empty()) + buffer >> element->offsetX; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_DiagramObject_offsetY(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_DiagramObject_offsetY(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const DiagramObject* element = dynamic_cast(BaseClass_ptr1)) + DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->offsetY; - if (!buffer.str().empty()) + buffer >> element->offsetY; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_DiagramObject_rotation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_DiagramObject_rotation(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const DiagramObject* element = dynamic_cast(BaseClass_ptr1)) + DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->rotation; - if (!buffer.str().empty()) + buffer >> element->rotation; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_DiagramObject_Diagram(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DiagramObject* element = dynamic_cast(BaseClass_ptr1)) + const DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Diagram != 0) { @@ -290,9 +222,11 @@ bool get_DiagramObject_Diagram(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DiagramObject* element = dynamic_cast(BaseClass_ptr1)) + const DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DiagramObjectStyle != 0) { @@ -305,7 +239,8 @@ bool get_DiagramObject_DiagramObjectStyle(const BaseClass* BaseClass_ptr1, std:: bool get_DiagramObject_IdentifiedObject(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DiagramObject* element = dynamic_cast(BaseClass_ptr1)) + const DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->IdentifiedObject != 0) { @@ -317,6 +252,81 @@ bool get_DiagramObject_IdentifiedObject(const BaseClass* BaseClass_ptr1, std::li } +bool get_DiagramObject_drawingOrder(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->drawingOrder; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_DiagramObject_isPolygon(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->isPolygon; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_DiagramObject_offsetX(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->offsetX; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_DiagramObject_offsetY(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->offsetY; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_DiagramObject_rotation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->rotation; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + const char DiagramObject::debugName[] = "DiagramObject"; const char* DiagramObject::debugString() const { @@ -325,25 +335,25 @@ const char* DiagramObject::debugString() const void DiagramObject::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiagramObject"), &DiagramObject_factory)); + factory_map.emplace("cim:DiagramObject", &DiagramObject_factory); } void DiagramObject::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.drawingOrder"), &assign_DiagramObject_drawingOrder)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.isPolygon"), &assign_DiagramObject_isPolygon)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.offsetX"), &assign_DiagramObject_offsetX)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.offsetY"), &assign_DiagramObject_offsetY)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.rotation"), &assign_DiagramObject_rotation)); + assign_map.emplace("cim:DiagramObject.drawingOrder", &assign_DiagramObject_drawingOrder); + assign_map.emplace("cim:DiagramObject.isPolygon", &assign_DiagramObject_isPolygon); + assign_map.emplace("cim:DiagramObject.offsetX", &assign_DiagramObject_offsetX); + assign_map.emplace("cim:DiagramObject.offsetY", &assign_DiagramObject_offsetY); + assign_map.emplace("cim:DiagramObject.rotation", &assign_DiagramObject_rotation); } void DiagramObject::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.Diagram"), &assign_DiagramObject_Diagram)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.DiagramObjectPoints"), &assign_DiagramObject_DiagramObjectPoints)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.DiagramObjectStyle"), &assign_DiagramObject_DiagramObjectStyle)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.IdentifiedObject"), &assign_DiagramObject_IdentifiedObject)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.VisibilityLayers"), &assign_DiagramObject_VisibilityLayers)); + assign_map.emplace("cim:DiagramObject.Diagram", &assign_DiagramObject_Diagram); + assign_map.emplace("cim:DiagramObject.DiagramObjectPoints", &assign_DiagramObject_DiagramObjectPoints); + assign_map.emplace("cim:DiagramObject.DiagramObjectStyle", &assign_DiagramObject_DiagramObjectStyle); + assign_map.emplace("cim:DiagramObject.IdentifiedObject", &assign_DiagramObject_IdentifiedObject); + assign_map.emplace("cim:DiagramObject.VisibilityLayers", &assign_DiagramObject_VisibilityLayers); } void DiagramObject::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/DiagramObject.hpp b/CGMES_2.4.15_27JAN2020/DiagramObject.hpp index dc75789fb..0c1745a1f 100644 --- a/CGMES_2.4.15_27JAN2020/DiagramObject.hpp +++ b/CGMES_2.4.15_27JAN2020/DiagramObject.hpp @@ -25,9 +25,7 @@ namespace CIMPP class IdentifiedObject; class VisibilityLayer; - /* - An object that defines one or more points in a given space. This object can be associated with anything that specializes IdentifiedObject. For single line diagrams such objects typically include such items as analog values, breakers, disconnectors, power transformers, and transmission lines. - */ + /** \brief An object that defines one or more points in a given space. This object can be associated with anything that specializes IdentifiedObject. For single line diagrams such objects typically include such items as analog values, breakers, disconnectors, power transformers, and transmission lines. */ class DiagramObject : public IdentifiedObject { public: @@ -35,16 +33,35 @@ namespace CIMPP DiagramObject(); ~DiagramObject() override; - CIMPP::Diagram* Diagram; /* A diagram object is part of a diagram. Default: 0 */ - std::list DiagramObjectPoints; /* A diagram object can have 0 or more points to reflect its layout position, routing (for polylines) or boundary (for polygons). Default: 0 */ - CIMPP::DiagramObjectStyle* DiagramObjectStyle; /* A diagram object has a style associated that provides a reference for the style used in the originating system. Default: 0 */ - CIMPP::IdentifiedObject* IdentifiedObject; /* The diagram objects that are associated with the domain object. Default: 0 */ - std::list VisibilityLayers; /* A diagram object can be part of multiple visibility layers. Default: 0 */ - CIMPP::Integer drawingOrder; /* The drawing order of this element. The higher the number, the later the element is drawn in sequence. This is used to ensure that elements that overlap are rendered in the correct order. Default: 0 */ - CIMPP::Boolean isPolygon; /* Defines whether or not the diagram objects points define the boundaries of a polygon or the routing of a polyline. If this value is true then a receiving application should consider the first and last points to be connected. Default: false */ - CIMPP::Simple_Float offsetX; /* The offset in the X direction. This is used for defining the offset from centre for rendering an icon (the default is that a single point specifies the centre of the icon). The offset is in per-unit with 0 indicating there is no offset from the horizontal centre of the icon. -0.5 indicates it is offset by 50% to the left and 0.5 indicates an offset of 50% to the right. Default: nullptr */ - CIMPP::Simple_Float offsetY; /* The offset in the Y direction. This is used for defining the offset from centre for rendering an icon (the default is that a single point specifies the centre of the icon). The offset is in per-unit with 0 indicating there is no offset from the vertical centre of the icon. The offset direction is dependent on the orientation of the diagram, with -0.5 and 0.5 indicating an offset of +/- 50% on the vertical axis. Default: nullptr */ - CIMPP::AngleDegrees rotation; /* Sets the angle of rotation of the diagram object. Zero degrees is pointing to the top of the diagram. Rotation is clockwise. Default: nullptr */ + /** \brief A diagram object is part of a diagram. Default: 0 */ + CIMPP::Diagram* Diagram; + + /** \brief A diagram object can have 0 or more points to reflect its layout position, routing (for polylines) or boundary (for polygons). Default: 0 */ + std::list DiagramObjectPoints; + + /** \brief A diagram object has a style associated that provides a reference for the style used in the originating system. Default: 0 */ + CIMPP::DiagramObjectStyle* DiagramObjectStyle; + + /** \brief The diagram objects that are associated with the domain object. Default: 0 */ + CIMPP::IdentifiedObject* IdentifiedObject; + + /** \brief A diagram object can be part of multiple visibility layers. Default: 0 */ + std::list VisibilityLayers; + + /** \brief The drawing order of this element. The higher the number, the later the element is drawn in sequence. This is used to ensure that elements that overlap are rendered in the correct order. Default: 0 */ + CIMPP::Integer drawingOrder; + + /** \brief Defines whether or not the diagram objects points define the boundaries of a polygon or the routing of a polyline. If this value is true then a receiving application should consider the first and last points to be connected. Default: false */ + CIMPP::Boolean isPolygon; + + /** \brief The offset in the X direction. This is used for defining the offset from centre for rendering an icon (the default is that a single point specifies the centre of the icon). The offset is in per-unit with 0 indicating there is no offset from the horizontal centre of the icon. -0.5 indicates it is offset by 50% to the left and 0.5 indicates an offset of 50% to the right. Default: nullptr */ + CIMPP::Simple_Float offsetX; + + /** \brief The offset in the Y direction. This is used for defining the offset from centre for rendering an icon (the default is that a single point specifies the centre of the icon). The offset is in per-unit with 0 indicating there is no offset from the vertical centre of the icon. The offset direction is dependent on the orientation of the diagram, with -0.5 and 0.5 indicating an offset of +/- 50% on the vertical axis. Default: nullptr */ + CIMPP::Simple_Float offsetY; + + /** \brief Sets the angle of rotation of the diagram object. Zero degrees is pointing to the top of the diagram. Rotation is clockwise. Default: nullptr */ + CIMPP::AngleDegrees rotation; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/DiagramObjectGluePoint.cpp b/CGMES_2.4.15_27JAN2020/DiagramObjectGluePoint.cpp index 256d139b9..eea8918f9 100644 --- a/CGMES_2.4.15_27JAN2020/DiagramObjectGluePoint.cpp +++ b/CGMES_2.4.15_27JAN2020/DiagramObjectGluePoint.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DiagramObjectGluePoint::DiagramObjectGluePoint() {}; -DiagramObjectGluePoint::~DiagramObjectGluePoint() {}; +DiagramObjectGluePoint::DiagramObjectGluePoint() {} +DiagramObjectGluePoint::~DiagramObjectGluePoint() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ DiagramObjectGluePoint::getPossibleProfilesForAttributes() const return map; } - - bool assign_DiagramObjectPoint_DiagramObjectGluePoint(BaseClass*, BaseClass*); bool assign_DiagramObjectGluePoint_DiagramObjectPoints(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_DiagramObjectGluePoint_DiagramObjectPoints(BaseClass* BaseClass_ptr1 } - const char DiagramObjectGluePoint::debugName[] = "DiagramObjectGluePoint"; const char* DiagramObjectGluePoint::debugString() const { @@ -69,7 +66,7 @@ const char* DiagramObjectGluePoint::debugString() const void DiagramObjectGluePoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiagramObjectGluePoint"), &DiagramObjectGluePoint_factory)); + factory_map.emplace("cim:DiagramObjectGluePoint", &DiagramObjectGluePoint_factory); } void DiagramObjectGluePoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void DiagramObjectGluePoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiagramObjectGluePoint.DiagramObjectPoints"), &assign_DiagramObjectGluePoint_DiagramObjectPoints)); + assign_map.emplace("cim:DiagramObjectGluePoint.DiagramObjectPoints", &assign_DiagramObjectGluePoint_DiagramObjectPoints); } void DiagramObjectGluePoint::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/DiagramObjectGluePoint.hpp b/CGMES_2.4.15_27JAN2020/DiagramObjectGluePoint.hpp index 4733c7d00..fec9f8e23 100644 --- a/CGMES_2.4.15_27JAN2020/DiagramObjectGluePoint.hpp +++ b/CGMES_2.4.15_27JAN2020/DiagramObjectGluePoint.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class DiagramObjectPoint; - /* - This is used for grouping diagram object points from different diagram objects that are considered to be glued together in a diagram even if they are not at the exact same coordinates. - */ + /** \brief This is used for grouping diagram object points from different diagram objects that are considered to be glued together in a diagram even if they are not at the exact same coordinates. */ class DiagramObjectGluePoint : public BaseClass { public: @@ -27,7 +25,8 @@ namespace CIMPP DiagramObjectGluePoint(); ~DiagramObjectGluePoint() override; - std::list DiagramObjectPoints; /* The `glue` point to which this point is associated. Default: 0 */ + /** \brief The `glue` point to which this point is associated. Default: 0 */ + std::list DiagramObjectPoints; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/DiagramObjectPoint.cpp b/CGMES_2.4.15_27JAN2020/DiagramObjectPoint.cpp index 96760a8d2..4afd45f45 100644 --- a/CGMES_2.4.15_27JAN2020/DiagramObjectPoint.cpp +++ b/CGMES_2.4.15_27JAN2020/DiagramObjectPoint.cpp @@ -10,15 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "DiagramObject.hpp" #include "DiagramObjectGluePoint.hpp" -#include "Integer.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -DiagramObjectPoint::DiagramObjectPoint() : DiagramObject(nullptr), DiagramObjectGluePoint(nullptr) {}; -DiagramObjectPoint::~DiagramObjectPoint() {}; +DiagramObjectPoint::DiagramObjectPoint() : DiagramObject(nullptr), DiagramObjectGluePoint(nullptr) {} +DiagramObjectPoint::~DiagramObjectPoint() {} static const std::list PossibleProfilesForClass = { @@ -50,126 +46,130 @@ DiagramObjectPoint::getPossibleProfilesForAttributes() const return map; } - -bool assign_DiagramObjectPoint_sequenceNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramObject_DiagramObjectPoints(BaseClass*, BaseClass*); +bool assign_DiagramObjectPoint_DiagramObject(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + DiagramObject* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->sequenceNumber; - if (buffer.fail()) - return false; - else - return true; + if (element->DiagramObject != element2) + { + element->DiagramObject = element2; + return assign_DiagramObject_DiagramObjectPoints(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_DiagramObjectPoint_xPosition(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramObjectGluePoint_DiagramObjectPoints(BaseClass*, BaseClass*); +bool assign_DiagramObjectPoint_DiagramObjectGluePoint(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + DiagramObjectGluePoint* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->xPosition; - if (buffer.fail()) - return false; - else - return true; + if (element->DiagramObjectGluePoint != element2) + { + element->DiagramObjectGluePoint = element2; + return assign_DiagramObjectGluePoint_DiagramObjectPoints(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_DiagramObjectPoint_yPosition(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramObjectPoint_sequenceNumber(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->yPosition; - if (buffer.fail()) - return false; - else + buffer >> element->sequenceNumber; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiagramObjectPoint_zPosition(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramObjectPoint_xPosition(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->zPosition; - if (buffer.fail()) - return false; - else + buffer >> element->xPosition; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_DiagramObject_DiagramObjectPoints(BaseClass*, BaseClass*); -bool assign_DiagramObjectPoint_DiagramObject(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_DiagramObjectPoint_yPosition(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); - DiagramObject* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->DiagramObject != element2) + buffer >> element->yPosition; + if (!buffer.fail()) { - element->DiagramObject = element2; - return assign_DiagramObject_DiagramObjectPoints(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_DiagramObjectGluePoint_DiagramObjectPoints(BaseClass*, BaseClass*); -bool assign_DiagramObjectPoint_DiagramObjectGluePoint(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_DiagramObjectPoint_zPosition(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); - DiagramObjectGluePoint* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->DiagramObjectGluePoint != element2) + buffer >> element->zPosition; + if (!buffer.fail()) { - element->DiagramObjectGluePoint = element2; - return assign_DiagramObjectGluePoint_DiagramObjectPoints(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool get_DiagramObjectPoint_sequenceNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_DiagramObjectPoint_DiagramObject(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->sequenceNumber; - if (!buffer.str().empty()) + if (element->DiagramObject != 0) { + BaseClass_list.push_back(element->DiagramObject); return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_DiagramObjectPoint_xPosition(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_DiagramObjectPoint_DiagramObjectGluePoint(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xPosition; - if (!buffer.str().empty()) + if (element->DiagramObjectGluePoint != 0) { + BaseClass_list.push_back(element->DiagramObjectGluePoint); return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_DiagramObjectPoint_yPosition(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_DiagramObjectPoint_sequenceNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->yPosition; + buffer << element->sequenceNumber; if (!buffer.str().empty()) { return true; @@ -179,11 +179,12 @@ bool get_DiagramObjectPoint_yPosition(const BaseClass* BaseClass_ptr1, std::stri return false; } -bool get_DiagramObjectPoint_zPosition(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_DiagramObjectPoint_xPosition(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->zPosition; + buffer << element->xPosition; if (!buffer.str().empty()) { return true; @@ -193,34 +194,36 @@ bool get_DiagramObjectPoint_zPosition(const BaseClass* BaseClass_ptr1, std::stri return false; } - -bool get_DiagramObjectPoint_DiagramObject(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) +bool get_DiagramObjectPoint_yPosition(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->DiagramObject != 0) + buffer << element->yPosition; + if (!buffer.str().empty()) { - BaseClass_list.push_back(element->DiagramObject); return true; } } + buffer.setstate(std::ios::failbit); return false; } -bool get_DiagramObjectPoint_DiagramObjectGluePoint(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) +bool get_DiagramObjectPoint_zPosition(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->DiagramObjectGluePoint != 0) + buffer << element->zPosition; + if (!buffer.str().empty()) { - BaseClass_list.push_back(element->DiagramObjectGluePoint); return true; } } + buffer.setstate(std::ios::failbit); return false; } - const char DiagramObjectPoint::debugName[] = "DiagramObjectPoint"; const char* DiagramObjectPoint::debugString() const { @@ -229,21 +232,21 @@ const char* DiagramObjectPoint::debugString() const void DiagramObjectPoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiagramObjectPoint"), &DiagramObjectPoint_factory)); + factory_map.emplace("cim:DiagramObjectPoint", &DiagramObjectPoint_factory); } void DiagramObjectPoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiagramObjectPoint.sequenceNumber"), &assign_DiagramObjectPoint_sequenceNumber)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObjectPoint.xPosition"), &assign_DiagramObjectPoint_xPosition)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObjectPoint.yPosition"), &assign_DiagramObjectPoint_yPosition)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObjectPoint.zPosition"), &assign_DiagramObjectPoint_zPosition)); + assign_map.emplace("cim:DiagramObjectPoint.sequenceNumber", &assign_DiagramObjectPoint_sequenceNumber); + assign_map.emplace("cim:DiagramObjectPoint.xPosition", &assign_DiagramObjectPoint_xPosition); + assign_map.emplace("cim:DiagramObjectPoint.yPosition", &assign_DiagramObjectPoint_yPosition); + assign_map.emplace("cim:DiagramObjectPoint.zPosition", &assign_DiagramObjectPoint_zPosition); } void DiagramObjectPoint::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiagramObjectPoint.DiagramObject"), &assign_DiagramObjectPoint_DiagramObject)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObjectPoint.DiagramObjectGluePoint"), &assign_DiagramObjectPoint_DiagramObjectGluePoint)); + assign_map.emplace("cim:DiagramObjectPoint.DiagramObject", &assign_DiagramObjectPoint_DiagramObject); + assign_map.emplace("cim:DiagramObjectPoint.DiagramObjectGluePoint", &assign_DiagramObjectPoint_DiagramObjectGluePoint); } void DiagramObjectPoint::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/DiagramObjectPoint.hpp b/CGMES_2.4.15_27JAN2020/DiagramObjectPoint.hpp index b58dd1b77..ed1f2dcc5 100644 --- a/CGMES_2.4.15_27JAN2020/DiagramObjectPoint.hpp +++ b/CGMES_2.4.15_27JAN2020/DiagramObjectPoint.hpp @@ -20,9 +20,7 @@ namespace CIMPP class DiagramObject; class DiagramObjectGluePoint; - /* - A point in a given space defined by 3 coordinates and associated to a diagram object. The coordinates may be positive or negative as the origin does not have to be in the corner of a diagram. - */ + /** \brief A point in a given space defined by 3 coordinates and associated to a diagram object. The coordinates may be positive or negative as the origin does not have to be in the corner of a diagram. */ class DiagramObjectPoint : public BaseClass { public: @@ -30,12 +28,23 @@ namespace CIMPP DiagramObjectPoint(); ~DiagramObjectPoint() override; - CIMPP::DiagramObject* DiagramObject; /* The diagram object with which the points are associated. Default: 0 */ - CIMPP::DiagramObjectGluePoint* DiagramObjectGluePoint; /* A diagram object glue point is associated with 2 or more object points that are considered to be `glued` together. Default: 0 */ - CIMPP::Integer sequenceNumber; /* The sequence position of the point, used for defining the order of points for diagram objects acting as a polyline or polygon with more than one point. Default: 0 */ - CIMPP::Simple_Float xPosition; /* The X coordinate of this point. Default: nullptr */ - CIMPP::Simple_Float yPosition; /* The Y coordinate of this point. Default: nullptr */ - CIMPP::Simple_Float zPosition; /* The Z coordinate of this point. Default: nullptr */ + /** \brief The diagram object with which the points are associated. Default: 0 */ + CIMPP::DiagramObject* DiagramObject; + + /** \brief A diagram object glue point is associated with 2 or more object points that are considered to be `glued` together. Default: 0 */ + CIMPP::DiagramObjectGluePoint* DiagramObjectGluePoint; + + /** \brief The sequence position of the point, used for defining the order of points for diagram objects acting as a polyline or polygon with more than one point. Default: 0 */ + CIMPP::Integer sequenceNumber; + + /** \brief The X coordinate of this point. Default: nullptr */ + CIMPP::Simple_Float xPosition; + + /** \brief The Y coordinate of this point. Default: nullptr */ + CIMPP::Simple_Float yPosition; + + /** \brief The Z coordinate of this point. Default: nullptr */ + CIMPP::Simple_Float zPosition; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/DiagramObjectStyle.cpp b/CGMES_2.4.15_27JAN2020/DiagramObjectStyle.cpp index 938c67bf3..db870f870 100644 --- a/CGMES_2.4.15_27JAN2020/DiagramObjectStyle.cpp +++ b/CGMES_2.4.15_27JAN2020/DiagramObjectStyle.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DiagramObjectStyle::DiagramObjectStyle() {}; -DiagramObjectStyle::~DiagramObjectStyle() {}; +DiagramObjectStyle::DiagramObjectStyle() {} +DiagramObjectStyle::~DiagramObjectStyle() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ DiagramObjectStyle::getPossibleProfilesForAttributes() const return map; } - - bool assign_DiagramObject_DiagramObjectStyle(BaseClass*, BaseClass*); bool assign_DiagramObjectStyle_StyledObjects(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_DiagramObjectStyle_StyledObjects(BaseClass* BaseClass_ptr1, BaseClas } - const char DiagramObjectStyle::debugName[] = "DiagramObjectStyle"; const char* DiagramObjectStyle::debugString() const { @@ -69,7 +66,7 @@ const char* DiagramObjectStyle::debugString() const void DiagramObjectStyle::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiagramObjectStyle"), &DiagramObjectStyle_factory)); + factory_map.emplace("cim:DiagramObjectStyle", &DiagramObjectStyle_factory); } void DiagramObjectStyle::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void DiagramObjectStyle::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiagramObjectStyle.StyledObjects"), &assign_DiagramObjectStyle_StyledObjects)); + assign_map.emplace("cim:DiagramObjectStyle.StyledObjects", &assign_DiagramObjectStyle_StyledObjects); } void DiagramObjectStyle::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/DiagramObjectStyle.hpp b/CGMES_2.4.15_27JAN2020/DiagramObjectStyle.hpp index 45b0add44..a2dc55692 100644 --- a/CGMES_2.4.15_27JAN2020/DiagramObjectStyle.hpp +++ b/CGMES_2.4.15_27JAN2020/DiagramObjectStyle.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class DiagramObject; - /* - A reference to a style used by the originating system for a diagram object. A diagram object style describes information such as line thickness, shape such as circle or rectangle etc, and color. - */ + /** \brief A reference to a style used by the originating system for a diagram object. A diagram object style describes information such as line thickness, shape such as circle or rectangle etc, and color. */ class DiagramObjectStyle : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP DiagramObjectStyle(); ~DiagramObjectStyle() override; - std::list StyledObjects; /* A style can be assigned to multiple diagram objects. Default: 0 */ + /** \brief A style can be assigned to multiple diagram objects. Default: 0 */ + std::list StyledObjects; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/DiagramStyle.cpp b/CGMES_2.4.15_27JAN2020/DiagramStyle.cpp index 3e3994231..dd98ebef0 100644 --- a/CGMES_2.4.15_27JAN2020/DiagramStyle.cpp +++ b/CGMES_2.4.15_27JAN2020/DiagramStyle.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DiagramStyle::DiagramStyle() {}; -DiagramStyle::~DiagramStyle() {}; +DiagramStyle::DiagramStyle() {} +DiagramStyle::~DiagramStyle() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ DiagramStyle::getPossibleProfilesForAttributes() const return map; } - - bool assign_Diagram_DiagramStyle(BaseClass*, BaseClass*); bool assign_DiagramStyle_Diagram(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_DiagramStyle_Diagram(BaseClass* BaseClass_ptr1, BaseClass* BaseClass } - const char DiagramStyle::debugName[] = "DiagramStyle"; const char* DiagramStyle::debugString() const { @@ -69,7 +66,7 @@ const char* DiagramStyle::debugString() const void DiagramStyle::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiagramStyle"), &DiagramStyle_factory)); + factory_map.emplace("cim:DiagramStyle", &DiagramStyle_factory); } void DiagramStyle::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void DiagramStyle::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiagramStyle.Diagram"), &assign_DiagramStyle_Diagram)); + assign_map.emplace("cim:DiagramStyle.Diagram", &assign_DiagramStyle_Diagram); } void DiagramStyle::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/DiagramStyle.hpp b/CGMES_2.4.15_27JAN2020/DiagramStyle.hpp index 6cc1fd5b0..76311dfe7 100644 --- a/CGMES_2.4.15_27JAN2020/DiagramStyle.hpp +++ b/CGMES_2.4.15_27JAN2020/DiagramStyle.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class Diagram; - /* - The diagram style refer to a style used by the originating system for a diagram. A diagram style describes information such as schematic, geographic, bus-branch etc. - */ + /** \brief The diagram style refer to a style used by the originating system for a diagram. A diagram style describes information such as schematic, geographic, bus-branch etc. */ class DiagramStyle : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP DiagramStyle(); ~DiagramStyle() override; - std::list Diagram; /* A DiagramStyle can be used by many Diagrams. Default: 0 */ + /** \brief A DiagramStyle can be used by many Diagrams. Default: 0 */ + std::list Diagram; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/DiscExcContIEEEDEC1A.cpp b/CGMES_2.4.15_27JAN2020/DiscExcContIEEEDEC1A.cpp index e139fd0d6..590aabc67 100644 --- a/CGMES_2.4.15_27JAN2020/DiscExcContIEEEDEC1A.cpp +++ b/CGMES_2.4.15_27JAN2020/DiscExcContIEEEDEC1A.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -DiscExcContIEEEDEC1A::DiscExcContIEEEDEC1A() {}; -DiscExcContIEEEDEC1A::~DiscExcContIEEEDEC1A() {}; +DiscExcContIEEEDEC1A::DiscExcContIEEEDEC1A() {} +DiscExcContIEEEDEC1A::~DiscExcContIEEEDEC1A() {} static const std::list PossibleProfilesForClass = { @@ -74,246 +56,262 @@ DiscExcContIEEEDEC1A::getPossibleProfilesForAttributes() const return map; } - -bool assign_DiscExcContIEEEDEC1A_esc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_esc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->esc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_kan(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_kan(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kan; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_ketl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_ketl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ketl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_tan(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_tan(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tan; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_tl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_tl1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_tl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_tl2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_tw5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_tw5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_val(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_val(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->val; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_vanmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_vanmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vanmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_vomax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_vomax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vomax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_vomin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_vomin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vomin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_vsmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_vsmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_vsmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_vsmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_vtc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_vtc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vtc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_vtlmt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_vtlmt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vtlmt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_vtm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_vtm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vtm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_vtn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_vtn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vtn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_DiscExcContIEEEDEC1A_esc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->esc; if (!buffer.str().empty()) @@ -327,7 +325,8 @@ bool get_DiscExcContIEEEDEC1A_esc(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC1A_kan(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kan; if (!buffer.str().empty()) @@ -341,7 +340,8 @@ bool get_DiscExcContIEEEDEC1A_kan(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC1A_ketl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ketl; if (!buffer.str().empty()) @@ -355,7 +355,8 @@ bool get_DiscExcContIEEEDEC1A_ketl(const BaseClass* BaseClass_ptr1, std::strings bool get_DiscExcContIEEEDEC1A_tan(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tan; if (!buffer.str().empty()) @@ -369,7 +370,8 @@ bool get_DiscExcContIEEEDEC1A_tan(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC1A_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -383,7 +385,8 @@ bool get_DiscExcContIEEEDEC1A_td(const BaseClass* BaseClass_ptr1, std::stringstr bool get_DiscExcContIEEEDEC1A_tl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl1; if (!buffer.str().empty()) @@ -397,7 +400,8 @@ bool get_DiscExcContIEEEDEC1A_tl1(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC1A_tl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl2; if (!buffer.str().empty()) @@ -411,7 +415,8 @@ bool get_DiscExcContIEEEDEC1A_tl2(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC1A_tw5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw5; if (!buffer.str().empty()) @@ -425,7 +430,8 @@ bool get_DiscExcContIEEEDEC1A_tw5(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC1A_val(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->val; if (!buffer.str().empty()) @@ -439,7 +445,8 @@ bool get_DiscExcContIEEEDEC1A_val(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC1A_vanmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vanmax; if (!buffer.str().empty()) @@ -453,7 +460,8 @@ bool get_DiscExcContIEEEDEC1A_vanmax(const BaseClass* BaseClass_ptr1, std::strin bool get_DiscExcContIEEEDEC1A_vomax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vomax; if (!buffer.str().empty()) @@ -467,7 +475,8 @@ bool get_DiscExcContIEEEDEC1A_vomax(const BaseClass* BaseClass_ptr1, std::string bool get_DiscExcContIEEEDEC1A_vomin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vomin; if (!buffer.str().empty()) @@ -481,7 +490,8 @@ bool get_DiscExcContIEEEDEC1A_vomin(const BaseClass* BaseClass_ptr1, std::string bool get_DiscExcContIEEEDEC1A_vsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmax; if (!buffer.str().empty()) @@ -495,7 +505,8 @@ bool get_DiscExcContIEEEDEC1A_vsmax(const BaseClass* BaseClass_ptr1, std::string bool get_DiscExcContIEEEDEC1A_vsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmin; if (!buffer.str().empty()) @@ -509,7 +520,8 @@ bool get_DiscExcContIEEEDEC1A_vsmin(const BaseClass* BaseClass_ptr1, std::string bool get_DiscExcContIEEEDEC1A_vtc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vtc; if (!buffer.str().empty()) @@ -523,7 +535,8 @@ bool get_DiscExcContIEEEDEC1A_vtc(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC1A_vtlmt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vtlmt; if (!buffer.str().empty()) @@ -537,7 +550,8 @@ bool get_DiscExcContIEEEDEC1A_vtlmt(const BaseClass* BaseClass_ptr1, std::string bool get_DiscExcContIEEEDEC1A_vtm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vtm; if (!buffer.str().empty()) @@ -551,7 +565,8 @@ bool get_DiscExcContIEEEDEC1A_vtm(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC1A_vtn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vtn; if (!buffer.str().empty()) @@ -563,8 +578,6 @@ bool get_DiscExcContIEEEDEC1A_vtn(const BaseClass* BaseClass_ptr1, std::stringst return false; } - - const char DiscExcContIEEEDEC1A::debugName[] = "DiscExcContIEEEDEC1A"; const char* DiscExcContIEEEDEC1A::debugString() const { @@ -573,29 +586,29 @@ const char* DiscExcContIEEEDEC1A::debugString() const void DiscExcContIEEEDEC1A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A"), &DiscExcContIEEEDEC1A_factory)); + factory_map.emplace("cim:DiscExcContIEEEDEC1A", &DiscExcContIEEEDEC1A_factory); } void DiscExcContIEEEDEC1A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.esc"), &assign_DiscExcContIEEEDEC1A_esc)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.kan"), &assign_DiscExcContIEEEDEC1A_kan)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.ketl"), &assign_DiscExcContIEEEDEC1A_ketl)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.tan"), &assign_DiscExcContIEEEDEC1A_tan)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.td"), &assign_DiscExcContIEEEDEC1A_td)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.tl1"), &assign_DiscExcContIEEEDEC1A_tl1)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.tl2"), &assign_DiscExcContIEEEDEC1A_tl2)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.tw5"), &assign_DiscExcContIEEEDEC1A_tw5)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.val"), &assign_DiscExcContIEEEDEC1A_val)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.vanmax"), &assign_DiscExcContIEEEDEC1A_vanmax)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.vomax"), &assign_DiscExcContIEEEDEC1A_vomax)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.vomin"), &assign_DiscExcContIEEEDEC1A_vomin)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.vsmax"), &assign_DiscExcContIEEEDEC1A_vsmax)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.vsmin"), &assign_DiscExcContIEEEDEC1A_vsmin)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.vtc"), &assign_DiscExcContIEEEDEC1A_vtc)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.vtlmt"), &assign_DiscExcContIEEEDEC1A_vtlmt)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.vtm"), &assign_DiscExcContIEEEDEC1A_vtm)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.vtn"), &assign_DiscExcContIEEEDEC1A_vtn)); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.esc", &assign_DiscExcContIEEEDEC1A_esc); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.kan", &assign_DiscExcContIEEEDEC1A_kan); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.ketl", &assign_DiscExcContIEEEDEC1A_ketl); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.tan", &assign_DiscExcContIEEEDEC1A_tan); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.td", &assign_DiscExcContIEEEDEC1A_td); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.tl1", &assign_DiscExcContIEEEDEC1A_tl1); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.tl2", &assign_DiscExcContIEEEDEC1A_tl2); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.tw5", &assign_DiscExcContIEEEDEC1A_tw5); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.val", &assign_DiscExcContIEEEDEC1A_val); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.vanmax", &assign_DiscExcContIEEEDEC1A_vanmax); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.vomax", &assign_DiscExcContIEEEDEC1A_vomax); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.vomin", &assign_DiscExcContIEEEDEC1A_vomin); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.vsmax", &assign_DiscExcContIEEEDEC1A_vsmax); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.vsmin", &assign_DiscExcContIEEEDEC1A_vsmin); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.vtc", &assign_DiscExcContIEEEDEC1A_vtc); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.vtlmt", &assign_DiscExcContIEEEDEC1A_vtlmt); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.vtm", &assign_DiscExcContIEEEDEC1A_vtm); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.vtn", &assign_DiscExcContIEEEDEC1A_vtn); } void DiscExcContIEEEDEC1A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/DiscExcContIEEEDEC1A.hpp b/CGMES_2.4.15_27JAN2020/DiscExcContIEEEDEC1A.hpp index 1c19ec3a7..d401f3ce2 100644 --- a/CGMES_2.4.15_27JAN2020/DiscExcContIEEEDEC1A.hpp +++ b/CGMES_2.4.15_27JAN2020/DiscExcContIEEEDEC1A.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Type DEC1A discontinuous excitation control model that boosts generator excitation to a level higher than that demanded by the voltage regulator and stabilizer immediately following a system fault. Reference: IEEE Standard 421.5-2005 Section 12.2. - */ + /** \brief The class represents IEEE Type DEC1A discontinuous excitation control model that boosts generator excitation to a level higher than that demanded by the voltage regulator and stabilizer immediately following a system fault. Reference: IEEE Standard 421.5-2005 Section 12.2. */ class DiscExcContIEEEDEC1A : public DiscontinuousExcitationControlDynamics { public: @@ -28,24 +26,59 @@ namespace CIMPP DiscExcContIEEEDEC1A(); ~DiscExcContIEEEDEC1A() override; - CIMPP::PU esc; /* Speed change reference (). Typical Value = 0.0015. Default: nullptr */ - CIMPP::PU kan; /* Discontinuous controller gain (). Typical Value = 400. Default: nullptr */ - CIMPP::PU ketl; /* Terminal voltage limiter gain (). Typical Value = 47. Default: nullptr */ - CIMPP::Seconds tan; /* Discontinuous controller time constant (). Typical Value = 0.08. Default: nullptr */ - CIMPP::Seconds td; /* Time constant (). Typical Value = 0.03. Default: nullptr */ - CIMPP::Seconds tl1; /* Time constant (). Typical Value = 0.025. Default: nullptr */ - CIMPP::Seconds tl2; /* Time constant (). Typical Value = 1.25. Default: nullptr */ - CIMPP::Seconds tw5; /* DEC washout time constant (). Typical Value = 5. Default: nullptr */ - CIMPP::PU val; /* Regulator voltage reference (). Typical Value = 5.5. Default: nullptr */ - CIMPP::PU vanmax; /* Limiter for Van (). Default: nullptr */ - CIMPP::PU vomax; /* Limiter (). Typical Value = 0.3. Default: nullptr */ - CIMPP::PU vomin; /* Limiter (). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU vsmax; /* Limiter (). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU vsmin; /* Limiter (). Typical Value = -0.066. Default: nullptr */ - CIMPP::PU vtc; /* Terminal voltage level reference (). Typical Value = 0.95. Default: nullptr */ - CIMPP::PU vtlmt; /* Voltage reference (). Typical Value = 1.1. Default: nullptr */ - CIMPP::PU vtm; /* Voltage limits (). Typical Value = 1.13. Default: nullptr */ - CIMPP::PU vtn; /* Voltage limits (). Typical Value = 1.12. Default: nullptr */ + /** \brief Speed change reference (). Typical Value = 0.0015. Default: nullptr */ + CIMPP::PU esc; + + /** \brief Discontinuous controller gain (). Typical Value = 400. Default: nullptr */ + CIMPP::PU kan; + + /** \brief Terminal voltage limiter gain (). Typical Value = 47. Default: nullptr */ + CIMPP::PU ketl; + + /** \brief Discontinuous controller time constant (). Typical Value = 0.08. Default: nullptr */ + CIMPP::Seconds tan; + + /** \brief Time constant (). Typical Value = 0.03. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Time constant (). Typical Value = 0.025. Default: nullptr */ + CIMPP::Seconds tl1; + + /** \brief Time constant (). Typical Value = 1.25. Default: nullptr */ + CIMPP::Seconds tl2; + + /** \brief DEC washout time constant (). Typical Value = 5. Default: nullptr */ + CIMPP::Seconds tw5; + + /** \brief Regulator voltage reference (). Typical Value = 5.5. Default: nullptr */ + CIMPP::PU val; + + /** \brief Limiter for Van (). Default: nullptr */ + CIMPP::PU vanmax; + + /** \brief Limiter (). Typical Value = 0.3. Default: nullptr */ + CIMPP::PU vomax; + + /** \brief Limiter (). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU vomin; + + /** \brief Limiter (). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU vsmax; + + /** \brief Limiter (). Typical Value = -0.066. Default: nullptr */ + CIMPP::PU vsmin; + + /** \brief Terminal voltage level reference (). Typical Value = 0.95. Default: nullptr */ + CIMPP::PU vtc; + + /** \brief Voltage reference (). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU vtlmt; + + /** \brief Voltage limits (). Typical Value = 1.13. Default: nullptr */ + CIMPP::PU vtm; + + /** \brief Voltage limits (). Typical Value = 1.12. Default: nullptr */ + CIMPP::PU vtn; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/DiscExcContIEEEDEC2A.cpp b/CGMES_2.4.15_27JAN2020/DiscExcContIEEEDEC2A.cpp index 55b638498..dc94e52c0 100644 --- a/CGMES_2.4.15_27JAN2020/DiscExcContIEEEDEC2A.cpp +++ b/CGMES_2.4.15_27JAN2020/DiscExcContIEEEDEC2A.cpp @@ -8,16 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -DiscExcContIEEEDEC2A::DiscExcContIEEEDEC2A() {}; -DiscExcContIEEEDEC2A::~DiscExcContIEEEDEC2A() {}; +DiscExcContIEEEDEC2A::DiscExcContIEEEDEC2A() {} +DiscExcContIEEEDEC2A::~DiscExcContIEEEDEC2A() {} static const std::list PossibleProfilesForClass = { @@ -48,77 +43,80 @@ DiscExcContIEEEDEC2A::getPossibleProfilesForAttributes() const return map; } - -bool assign_DiscExcContIEEEDEC2A_td1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC2A_td1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC2A_td2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC2A_td2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC2A_vdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC2A_vdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC2A_vdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC2A_vdmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vdmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC2A_vk(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC2A_vk(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vk; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_DiscExcContIEEEDEC2A_td1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td1; if (!buffer.str().empty()) @@ -132,7 +130,8 @@ bool get_DiscExcContIEEEDEC2A_td1(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC2A_td2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td2; if (!buffer.str().empty()) @@ -146,7 +145,8 @@ bool get_DiscExcContIEEEDEC2A_td2(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC2A_vdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vdmax; if (!buffer.str().empty()) @@ -160,7 +160,8 @@ bool get_DiscExcContIEEEDEC2A_vdmax(const BaseClass* BaseClass_ptr1, std::string bool get_DiscExcContIEEEDEC2A_vdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vdmin; if (!buffer.str().empty()) @@ -174,7 +175,8 @@ bool get_DiscExcContIEEEDEC2A_vdmin(const BaseClass* BaseClass_ptr1, std::string bool get_DiscExcContIEEEDEC2A_vk(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vk; if (!buffer.str().empty()) @@ -186,8 +188,6 @@ bool get_DiscExcContIEEEDEC2A_vk(const BaseClass* BaseClass_ptr1, std::stringstr return false; } - - const char DiscExcContIEEEDEC2A::debugName[] = "DiscExcContIEEEDEC2A"; const char* DiscExcContIEEEDEC2A::debugString() const { @@ -196,16 +196,16 @@ const char* DiscExcContIEEEDEC2A::debugString() const void DiscExcContIEEEDEC2A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC2A"), &DiscExcContIEEEDEC2A_factory)); + factory_map.emplace("cim:DiscExcContIEEEDEC2A", &DiscExcContIEEEDEC2A_factory); } void DiscExcContIEEEDEC2A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC2A.td1"), &assign_DiscExcContIEEEDEC2A_td1)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC2A.td2"), &assign_DiscExcContIEEEDEC2A_td2)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC2A.vdmax"), &assign_DiscExcContIEEEDEC2A_vdmax)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC2A.vdmin"), &assign_DiscExcContIEEEDEC2A_vdmin)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC2A.vk"), &assign_DiscExcContIEEEDEC2A_vk)); + assign_map.emplace("cim:DiscExcContIEEEDEC2A.td1", &assign_DiscExcContIEEEDEC2A_td1); + assign_map.emplace("cim:DiscExcContIEEEDEC2A.td2", &assign_DiscExcContIEEEDEC2A_td2); + assign_map.emplace("cim:DiscExcContIEEEDEC2A.vdmax", &assign_DiscExcContIEEEDEC2A_vdmax); + assign_map.emplace("cim:DiscExcContIEEEDEC2A.vdmin", &assign_DiscExcContIEEEDEC2A_vdmin); + assign_map.emplace("cim:DiscExcContIEEEDEC2A.vk", &assign_DiscExcContIEEEDEC2A_vk); } void DiscExcContIEEEDEC2A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/DiscExcContIEEEDEC2A.hpp b/CGMES_2.4.15_27JAN2020/DiscExcContIEEEDEC2A.hpp index 5b84b484a..0e8a5a1bd 100644 --- a/CGMES_2.4.15_27JAN2020/DiscExcContIEEEDEC2A.hpp +++ b/CGMES_2.4.15_27JAN2020/DiscExcContIEEEDEC2A.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Type DEC2A model for the discontinuous excitation control. This system provides transient excitation boosting via an open-loop control as initiated by a trigger signal generated remotely. Reference: IEEE Standard 421.5-2005 Section 12.3. - */ + /** \brief The class represents IEEE Type DEC2A model for the discontinuous excitation control. This system provides transient excitation boosting via an open-loop control as initiated by a trigger signal generated remotely. Reference: IEEE Standard 421.5-2005 Section 12.3. */ class DiscExcContIEEEDEC2A : public DiscontinuousExcitationControlDynamics { public: @@ -28,11 +26,20 @@ namespace CIMPP DiscExcContIEEEDEC2A(); ~DiscExcContIEEEDEC2A() override; - CIMPP::Seconds td1; /* Discontinuous controller time constant (). Default: nullptr */ - CIMPP::Seconds td2; /* Discontinuous controller washout time constant (). Default: nullptr */ - CIMPP::PU vdmax; /* Limiter (). Default: nullptr */ - CIMPP::PU vdmin; /* Limiter (). Default: nullptr */ - CIMPP::PU vk; /* Discontinuous controller input reference (). Default: nullptr */ + /** \brief Discontinuous controller time constant (). Default: nullptr */ + CIMPP::Seconds td1; + + /** \brief Discontinuous controller washout time constant (). Default: nullptr */ + CIMPP::Seconds td2; + + /** \brief Limiter (). Default: nullptr */ + CIMPP::PU vdmax; + + /** \brief Limiter (). Default: nullptr */ + CIMPP::PU vdmin; + + /** \brief Discontinuous controller input reference (). Default: nullptr */ + CIMPP::PU vk; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/DiscExcContIEEEDEC3A.cpp b/CGMES_2.4.15_27JAN2020/DiscExcContIEEEDEC3A.cpp index 194881795..67dd91242 100644 --- a/CGMES_2.4.15_27JAN2020/DiscExcContIEEEDEC3A.cpp +++ b/CGMES_2.4.15_27JAN2020/DiscExcContIEEEDEC3A.cpp @@ -8,13 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Seconds.hpp" -#include "PU.hpp" using namespace CIMPP; -DiscExcContIEEEDEC3A::DiscExcContIEEEDEC3A() {}; -DiscExcContIEEEDEC3A::~DiscExcContIEEEDEC3A() {}; +DiscExcContIEEEDEC3A::DiscExcContIEEEDEC3A() {} +DiscExcContIEEEDEC3A::~DiscExcContIEEEDEC3A() {} static const std::list PossibleProfilesForClass = { @@ -42,38 +40,38 @@ DiscExcContIEEEDEC3A::getPossibleProfilesForAttributes() const return map; } - -bool assign_DiscExcContIEEEDEC3A_tdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC3A_tdr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC3A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC3A_vtmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC3A_vtmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC3A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vtmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_DiscExcContIEEEDEC3A_tdr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC3A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdr; if (!buffer.str().empty()) @@ -87,7 +85,8 @@ bool get_DiscExcContIEEEDEC3A_tdr(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC3A_vtmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC3A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vtmin; if (!buffer.str().empty()) @@ -99,8 +98,6 @@ bool get_DiscExcContIEEEDEC3A_vtmin(const BaseClass* BaseClass_ptr1, std::string return false; } - - const char DiscExcContIEEEDEC3A::debugName[] = "DiscExcContIEEEDEC3A"; const char* DiscExcContIEEEDEC3A::debugString() const { @@ -109,13 +106,13 @@ const char* DiscExcContIEEEDEC3A::debugString() const void DiscExcContIEEEDEC3A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC3A"), &DiscExcContIEEEDEC3A_factory)); + factory_map.emplace("cim:DiscExcContIEEEDEC3A", &DiscExcContIEEEDEC3A_factory); } void DiscExcContIEEEDEC3A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC3A.tdr"), &assign_DiscExcContIEEEDEC3A_tdr)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC3A.vtmin"), &assign_DiscExcContIEEEDEC3A_vtmin)); + assign_map.emplace("cim:DiscExcContIEEEDEC3A.tdr", &assign_DiscExcContIEEEDEC3A_tdr); + assign_map.emplace("cim:DiscExcContIEEEDEC3A.vtmin", &assign_DiscExcContIEEEDEC3A_vtmin); } void DiscExcContIEEEDEC3A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/DiscExcContIEEEDEC3A.hpp b/CGMES_2.4.15_27JAN2020/DiscExcContIEEEDEC3A.hpp index 7cefe27db..24ceb2f88 100644 --- a/CGMES_2.4.15_27JAN2020/DiscExcContIEEEDEC3A.hpp +++ b/CGMES_2.4.15_27JAN2020/DiscExcContIEEEDEC3A.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Type DEC3A model. In some systems, the stabilizer output is disconnected from the regulator immediately following a severe fault to prevent the stabilizer from competing with action of voltage regulator during the first swing. Reference: IEEE Standard 421.5-2005 Section 12.4. - */ + /** \brief The class represents IEEE Type DEC3A model. In some systems, the stabilizer output is disconnected from the regulator immediately following a severe fault to prevent the stabilizer from competing with action of voltage regulator during the first swing. Reference: IEEE Standard 421.5-2005 Section 12.4. */ class DiscExcContIEEEDEC3A : public DiscontinuousExcitationControlDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP DiscExcContIEEEDEC3A(); ~DiscExcContIEEEDEC3A() override; - CIMPP::Seconds tdr; /* Reset time delay (). Default: nullptr */ - CIMPP::PU vtmin; /* Terminal undervoltage comparison level (). Default: nullptr */ + /** \brief Reset time delay (). Default: nullptr */ + CIMPP::Seconds tdr; + + /** \brief Terminal undervoltage comparison level (). Default: nullptr */ + CIMPP::PU vtmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Disconnector.cpp b/CGMES_2.4.15_27JAN2020/Disconnector.cpp index c8dfe906e..e64c24d80 100644 --- a/CGMES_2.4.15_27JAN2020/Disconnector.cpp +++ b/CGMES_2.4.15_27JAN2020/Disconnector.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Disconnector::Disconnector() {}; -Disconnector::~Disconnector() {}; +Disconnector::Disconnector() {} +Disconnector::~Disconnector() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ Disconnector::getPossibleProfilesForAttributes() const return map; } - - - - - const char Disconnector::debugName[] = "Disconnector"; const char* Disconnector::debugString() const { @@ -52,7 +47,7 @@ const char* Disconnector::debugString() const void Disconnector::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Disconnector"), &Disconnector_factory)); + factory_map.emplace("cim:Disconnector", &Disconnector_factory); } void Disconnector::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/Disconnector.hpp b/CGMES_2.4.15_27JAN2020/Disconnector.hpp index ba606c776..844173634 100644 --- a/CGMES_2.4.15_27JAN2020/Disconnector.hpp +++ b/CGMES_2.4.15_27JAN2020/Disconnector.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A manually operated or motor operated mechanical switching device used for changing the connections in a circuit, or for isolating a circuit or equipment from a source of power. It is required to open or close circuits when negligible current is broken or made. - */ + /** \brief A manually operated or motor operated mechanical switching device used for changing the connections in a circuit, or for isolating a circuit or equipment from a source of power. It is required to open or close circuits when negligible current is broken or made. */ class Disconnector : public Switch { public: @@ -26,7 +24,6 @@ namespace CIMPP Disconnector(); ~Disconnector() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/DiscontinuousExcitationControlDynamics.cpp b/CGMES_2.4.15_27JAN2020/DiscontinuousExcitationControlDynamics.cpp index 351408515..1e6569ea1 100644 --- a/CGMES_2.4.15_27JAN2020/DiscontinuousExcitationControlDynamics.cpp +++ b/CGMES_2.4.15_27JAN2020/DiscontinuousExcitationControlDynamics.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DiscontinuousExcitationControlDynamics::DiscontinuousExcitationControlDynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr) {}; -DiscontinuousExcitationControlDynamics::~DiscontinuousExcitationControlDynamics() {}; +DiscontinuousExcitationControlDynamics::DiscontinuousExcitationControlDynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr) {} +DiscontinuousExcitationControlDynamics::~DiscontinuousExcitationControlDynamics() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ DiscontinuousExcitationControlDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_ExcitationSystemDynamics_DiscontinuousExcitationControlDynamics(BaseClass*, BaseClass*); bool assign_DiscontinuousExcitationControlDynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_DiscontinuousExcitationControlDynamics_ExcitationSystemDynamics(Base } return false; } + bool assign_RemoteInputSignal_DiscontinuousExcitationControlDynamics(BaseClass*, BaseClass*); bool assign_DiscontinuousExcitationControlDynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_DiscontinuousExcitationControlDynamics_RemoteInputSignal(BaseClass* return false; } - bool get_DiscontinuousExcitationControlDynamics_ExcitationSystemDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DiscontinuousExcitationControlDynamics* element = dynamic_cast(BaseClass_ptr1)) + const DiscontinuousExcitationControlDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ExcitationSystemDynamics != 0) { @@ -100,7 +99,7 @@ const char* DiscontinuousExcitationControlDynamics::debugString() const void DiscontinuousExcitationControlDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiscontinuousExcitationControlDynamics"), &DiscontinuousExcitationControlDynamics_factory)); + factory_map.emplace("cim:DiscontinuousExcitationControlDynamics", &DiscontinuousExcitationControlDynamics_factory); } void DiscontinuousExcitationControlDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -109,8 +108,8 @@ void DiscontinuousExcitationControlDynamics::addPrimitiveAssignFnsToMap(std::uno void DiscontinuousExcitationControlDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiscontinuousExcitationControlDynamics.ExcitationSystemDynamics"), &assign_DiscontinuousExcitationControlDynamics_ExcitationSystemDynamics)); - assign_map.insert(std::make_pair(std::string("cim:DiscontinuousExcitationControlDynamics.RemoteInputSignal"), &assign_DiscontinuousExcitationControlDynamics_RemoteInputSignal)); + assign_map.emplace("cim:DiscontinuousExcitationControlDynamics.ExcitationSystemDynamics", &assign_DiscontinuousExcitationControlDynamics_ExcitationSystemDynamics); + assign_map.emplace("cim:DiscontinuousExcitationControlDynamics.RemoteInputSignal", &assign_DiscontinuousExcitationControlDynamics_RemoteInputSignal); } void DiscontinuousExcitationControlDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/DiscontinuousExcitationControlDynamics.hpp b/CGMES_2.4.15_27JAN2020/DiscontinuousExcitationControlDynamics.hpp index f525539e5..e0a40c245 100644 --- a/CGMES_2.4.15_27JAN2020/DiscontinuousExcitationControlDynamics.hpp +++ b/CGMES_2.4.15_27JAN2020/DiscontinuousExcitationControlDynamics.hpp @@ -18,9 +18,7 @@ namespace CIMPP class ExcitationSystemDynamics; class RemoteInputSignal; - /* - Discontinuous excitation control function block whose behaviour is described by reference to a standard model . - */ + /** \brief Discontinuous excitation control function block whose behaviour is described by reference to a standard model . */ class DiscontinuousExcitationControlDynamics : public DynamicsFunctionBlock { public: @@ -28,8 +26,11 @@ namespace CIMPP DiscontinuousExcitationControlDynamics(); ~DiscontinuousExcitationControlDynamics() override; - CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; /* Excitation system model with which this discontinuous excitation control model is associated. Default: 0 */ - CIMPP::RemoteInputSignal* RemoteInputSignal; /* Remote input signal used by this discontinuous excitation control system model. Default: 0 */ + /** \brief Excitation system model with which this discontinuous excitation control model is associated. Default: 0 */ + CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; + + /** \brief Remote input signal used by this discontinuous excitation control system model. Default: 0 */ + CIMPP::RemoteInputSignal* RemoteInputSignal; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/DiscontinuousExcitationControlUserDefined.cpp b/CGMES_2.4.15_27JAN2020/DiscontinuousExcitationControlUserDefined.cpp index 9ff03969b..f2154bd03 100644 --- a/CGMES_2.4.15_27JAN2020/DiscontinuousExcitationControlUserDefined.cpp +++ b/CGMES_2.4.15_27JAN2020/DiscontinuousExcitationControlUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -DiscontinuousExcitationControlUserDefined::DiscontinuousExcitationControlUserDefined() {}; -DiscontinuousExcitationControlUserDefined::~DiscontinuousExcitationControlUserDefined() {}; +DiscontinuousExcitationControlUserDefined::DiscontinuousExcitationControlUserDefined() {} +DiscontinuousExcitationControlUserDefined::~DiscontinuousExcitationControlUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ DiscontinuousExcitationControlUserDefined::getPossibleProfilesForAttributes() co return map; } - -bool assign_DiscontinuousExcitationControlUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (DiscontinuousExcitationControlUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_DiscontinuousExcitationControlUserDefined(BaseClass*, BaseClass*); bool assign_DiscontinuousExcitationControlUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_DiscontinuousExcitationControlUserDefined_ProprietaryParameterDynami return false; } +bool assign_DiscontinuousExcitationControlUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + DiscontinuousExcitationControlUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_DiscontinuousExcitationControlUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscontinuousExcitationControlUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const DiscontinuousExcitationControlUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_DiscontinuousExcitationControlUserDefined_proprietary(const BaseClass* return false; } - - const char DiscontinuousExcitationControlUserDefined::debugName[] = "DiscontinuousExcitationControlUserDefined"; const char* DiscontinuousExcitationControlUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* DiscontinuousExcitationControlUserDefined::debugString() const void DiscontinuousExcitationControlUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiscontinuousExcitationControlUserDefined"), &DiscontinuousExcitationControlUserDefined_factory)); + factory_map.emplace("cim:DiscontinuousExcitationControlUserDefined", &DiscontinuousExcitationControlUserDefined_factory); } void DiscontinuousExcitationControlUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiscontinuousExcitationControlUserDefined.proprietary"), &assign_DiscontinuousExcitationControlUserDefined_proprietary)); + assign_map.emplace("cim:DiscontinuousExcitationControlUserDefined.proprietary", &assign_DiscontinuousExcitationControlUserDefined_proprietary); } void DiscontinuousExcitationControlUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiscontinuousExcitationControlUserDefined.ProprietaryParameterDynamics"), &assign_DiscontinuousExcitationControlUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:DiscontinuousExcitationControlUserDefined.ProprietaryParameterDynamics", &assign_DiscontinuousExcitationControlUserDefined_ProprietaryParameterDynamics); } void DiscontinuousExcitationControlUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/DiscontinuousExcitationControlUserDefined.hpp b/CGMES_2.4.15_27JAN2020/DiscontinuousExcitationControlUserDefined.hpp index 498b2150a..051d1a48d 100644 --- a/CGMES_2.4.15_27JAN2020/DiscontinuousExcitationControlUserDefined.hpp +++ b/CGMES_2.4.15_27JAN2020/DiscontinuousExcitationControlUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Discontinuous excitation control function block whose dynamic behaviour is described by - */ + /** \brief Discontinuous excitation control function block whose dynamic behaviour is described by */ class DiscontinuousExcitationControlUserDefined : public DiscontinuousExcitationControlDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP DiscontinuousExcitationControlUserDefined(); ~DiscontinuousExcitationControlUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Discrete.cpp b/CGMES_2.4.15_27JAN2020/Discrete.cpp index 6ad239122..bed7e18ab 100644 --- a/CGMES_2.4.15_27JAN2020/Discrete.cpp +++ b/CGMES_2.4.15_27JAN2020/Discrete.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Discrete::Discrete() : ValueAliasSet(nullptr) {}; -Discrete::~Discrete() {}; +Discrete::Discrete() : ValueAliasSet(nullptr) {} +Discrete::~Discrete() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ Discrete::getPossibleProfilesForAttributes() const return map; } - - bool assign_DiscreteValue_Discrete(BaseClass*, BaseClass*); bool assign_Discrete_DiscreteValues(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_Discrete_DiscreteValues(BaseClass* BaseClass_ptr1, BaseClass* BaseCl } return false; } + bool assign_ValueAliasSet_Discretes(BaseClass*, BaseClass*); bool assign_Discrete_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -80,7 +79,8 @@ bool assign_Discrete_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass* BaseCla bool get_Discrete_ValueAliasSet(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Discrete* element = dynamic_cast(BaseClass_ptr1)) + const Discrete* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ValueAliasSet != 0) { @@ -91,7 +91,6 @@ bool get_Discrete_ValueAliasSet(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Discrete"), &Discrete_factory)); + factory_map.emplace("cim:Discrete", &Discrete_factory); } void Discrete::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -109,8 +108,8 @@ void Discrete::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Discrete.DiscreteValues"), &assign_Discrete_DiscreteValues)); - assign_map.insert(std::make_pair(std::string("cim:Discrete.ValueAliasSet"), &assign_Discrete_ValueAliasSet)); + assign_map.emplace("cim:Discrete.DiscreteValues", &assign_Discrete_DiscreteValues); + assign_map.emplace("cim:Discrete.ValueAliasSet", &assign_Discrete_ValueAliasSet); } void Discrete::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/Discrete.hpp b/CGMES_2.4.15_27JAN2020/Discrete.hpp index 741c6ee67..2672d040b 100644 --- a/CGMES_2.4.15_27JAN2020/Discrete.hpp +++ b/CGMES_2.4.15_27JAN2020/Discrete.hpp @@ -18,9 +18,7 @@ namespace CIMPP class DiscreteValue; class ValueAliasSet; - /* - Discrete represents a discrete Measurement, i.e. a Measurement representing discrete values, e.g. a Breaker position. - */ + /** \brief Discrete represents a discrete Measurement, i.e. a Measurement representing discrete values, e.g. a Breaker position. */ class Discrete : public Measurement { public: @@ -28,8 +26,11 @@ namespace CIMPP Discrete(); ~Discrete() override; - std::list DiscreteValues; /* Measurement to which this value is connected. Default: 0 */ - CIMPP::ValueAliasSet* ValueAliasSet; /* The ValueAliasSet used for translation of a MeasurementValue.value to a name. Default: 0 */ + /** \brief Measurement to which this value is connected. Default: 0 */ + std::list DiscreteValues; + + /** \brief The ValueAliasSet used for translation of a MeasurementValue.value to a name. Default: 0 */ + CIMPP::ValueAliasSet* ValueAliasSet; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/DiscreteValue.cpp b/CGMES_2.4.15_27JAN2020/DiscreteValue.cpp index 2ea98ed31..a990c7895 100644 --- a/CGMES_2.4.15_27JAN2020/DiscreteValue.cpp +++ b/CGMES_2.4.15_27JAN2020/DiscreteValue.cpp @@ -10,12 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "Command.hpp" #include "Discrete.hpp" -#include "Integer.hpp" using namespace CIMPP; -DiscreteValue::DiscreteValue() : Command(nullptr), Discrete(nullptr) {}; -DiscreteValue::~DiscreteValue() {}; +DiscreteValue::DiscreteValue() : Command(nullptr), Discrete(nullptr) {} +DiscreteValue::~DiscreteValue() {} static const std::list PossibleProfilesForClass = { @@ -44,21 +43,6 @@ DiscreteValue::getPossibleProfilesForAttributes() const return map; } - -bool assign_DiscreteValue_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (DiscreteValue* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->value; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_Command_DiscreteValue(BaseClass*, BaseClass*); bool assign_DiscreteValue_Command(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -75,6 +59,7 @@ bool assign_DiscreteValue_Command(BaseClass* BaseClass_ptr1, BaseClass* BaseClas } return false; } + bool assign_Discrete_DiscreteValues(BaseClass*, BaseClass*); bool assign_DiscreteValue_Discrete(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -92,24 +77,25 @@ bool assign_DiscreteValue_Discrete(BaseClass* BaseClass_ptr1, BaseClass* BaseCla return false; } -bool get_DiscreteValue_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_DiscreteValue_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const DiscreteValue* element = dynamic_cast(BaseClass_ptr1)) + DiscreteValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->value; - if (!buffer.str().empty()) + buffer >> element->value; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } bool get_DiscreteValue_Discrete(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DiscreteValue* element = dynamic_cast(BaseClass_ptr1)) + const DiscreteValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Discrete != 0) { @@ -120,6 +106,20 @@ bool get_DiscreteValue_Discrete(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->value; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char DiscreteValue::debugName[] = "DiscreteValue"; const char* DiscreteValue::debugString() const @@ -129,18 +129,18 @@ const char* DiscreteValue::debugString() const void DiscreteValue::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiscreteValue"), &DiscreteValue_factory)); + factory_map.emplace("cim:DiscreteValue", &DiscreteValue_factory); } void DiscreteValue::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiscreteValue.value"), &assign_DiscreteValue_value)); + assign_map.emplace("cim:DiscreteValue.value", &assign_DiscreteValue_value); } void DiscreteValue::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiscreteValue.Command"), &assign_DiscreteValue_Command)); - assign_map.insert(std::make_pair(std::string("cim:DiscreteValue.Discrete"), &assign_DiscreteValue_Discrete)); + assign_map.emplace("cim:DiscreteValue.Command", &assign_DiscreteValue_Command); + assign_map.emplace("cim:DiscreteValue.Discrete", &assign_DiscreteValue_Discrete); } void DiscreteValue::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/DiscreteValue.hpp b/CGMES_2.4.15_27JAN2020/DiscreteValue.hpp index e2943d3ba..1fbc352c7 100644 --- a/CGMES_2.4.15_27JAN2020/DiscreteValue.hpp +++ b/CGMES_2.4.15_27JAN2020/DiscreteValue.hpp @@ -19,9 +19,7 @@ namespace CIMPP class Command; class Discrete; - /* - DiscreteValue represents a discrete MeasurementValue. - */ + /** \brief DiscreteValue represents a discrete MeasurementValue. */ class DiscreteValue : public MeasurementValue { public: @@ -29,9 +27,14 @@ namespace CIMPP DiscreteValue(); ~DiscreteValue() override; - CIMPP::Command* Command; /* The MeasurementValue that is controlled. Default: 0 */ - CIMPP::Discrete* Discrete; /* The values connected to this measurement. Default: 0 */ - CIMPP::Integer value; /* The value to supervise. Default: 0 */ + /** \brief The MeasurementValue that is controlled. Default: 0 */ + CIMPP::Command* Command; + + /** \brief The values connected to this measurement. Default: 0 */ + CIMPP::Discrete* Discrete; + + /** \brief The value to supervise. Default: 0 */ + CIMPP::Integer value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/DroopSignalFeedbackKind.cpp b/CGMES_2.4.15_27JAN2020/DroopSignalFeedbackKind.cpp index ca339f115..0f68d1992 100644 --- a/CGMES_2.4.15_27JAN2020/DroopSignalFeedbackKind.cpp +++ b/CGMES_2.4.15_27JAN2020/DroopSignalFeedbackKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "DroopSignalFeedbackKind") + if (EnumSymbol.substr(0, pos) != "DroopSignalFeedbackKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,22 +50,22 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "electricalPower") + if (EnumSymbol == "electricalPower") { rop = DroopSignalFeedbackKind::electricalPower; return lop; } - if(EnumSymbol == "none") + if (EnumSymbol == "none") { rop = DroopSignalFeedbackKind::none; return lop; } - if(EnumSymbol == "fuelValveStroke") + if (EnumSymbol == "fuelValveStroke") { rop = DroopSignalFeedbackKind::fuelValveStroke; return lop; } - if(EnumSymbol == "governorOutput") + if (EnumSymbol == "governorOutput") { rop = DroopSignalFeedbackKind::governorOutput; return lop; diff --git a/CGMES_2.4.15_27JAN2020/DroopSignalFeedbackKind.hpp b/CGMES_2.4.15_27JAN2020/DroopSignalFeedbackKind.hpp index de948a1bc..d68428bda 100644 --- a/CGMES_2.4.15_27JAN2020/DroopSignalFeedbackKind.hpp +++ b/CGMES_2.4.15_27JAN2020/DroopSignalFeedbackKind.hpp @@ -9,29 +9,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Governor droop signal feedback source. - */ + /** \brief Governor droop signal feedback source. */ class DroopSignalFeedbackKind { public: enum DroopSignalFeedbackKind_ENUM { - /** - * Electrical power feedback (connection indicated as 1 in the block diagrams of models, e.g. GovCT1, GovCT2). - */ + /** Electrical power feedback (connection indicated as 1 in the block diagrams of models, e.g. GovCT1, GovCT2). */ electricalPower, - /** - * No droop signal feedback, is isochronous governor. - */ + /** No droop signal feedback, is isochronous governor. */ none, - /** - * Fuel valve stroke feedback (true stroke) (connection indicated as 2 in the block diagrams of model, e.g. GovCT1, GovCT2). - */ + /** Fuel valve stroke feedback (true stroke) (connection indicated as 2 in the block diagrams of model, e.g. GovCT1, GovCT2). */ fuelValveStroke, - /** - * Governor output feedback (requested stroke) (connection indicated as 3 in the block diagrams of models, e.g. GovCT1, GovCT2). - */ + /** Governor output feedback (requested stroke) (connection indicated as 3 in the block diagrams of models, e.g. GovCT1, GovCT2). */ governorOutput, }; diff --git a/CGMES_2.4.15_27JAN2020/DynamicsFunctionBlock.cpp b/CGMES_2.4.15_27JAN2020/DynamicsFunctionBlock.cpp index 63b269772..3ed474991 100644 --- a/CGMES_2.4.15_27JAN2020/DynamicsFunctionBlock.cpp +++ b/CGMES_2.4.15_27JAN2020/DynamicsFunctionBlock.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" using namespace CIMPP; -DynamicsFunctionBlock::DynamicsFunctionBlock() {}; -DynamicsFunctionBlock::~DynamicsFunctionBlock() {}; +DynamicsFunctionBlock::DynamicsFunctionBlock() {} +DynamicsFunctionBlock::~DynamicsFunctionBlock() {} static const std::list PossibleProfilesForClass = { @@ -40,25 +39,24 @@ DynamicsFunctionBlock::getPossibleProfilesForAttributes() const return map; } - -bool assign_DynamicsFunctionBlock_enabled(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DynamicsFunctionBlock_enabled(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DynamicsFunctionBlock* element = dynamic_cast(BaseClass_ptr1)) + DynamicsFunctionBlock* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->enabled; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_DynamicsFunctionBlock_enabled(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DynamicsFunctionBlock* element = dynamic_cast(BaseClass_ptr1)) + const DynamicsFunctionBlock* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->enabled; if (!buffer.str().empty()) @@ -70,8 +68,6 @@ bool get_DynamicsFunctionBlock_enabled(const BaseClass* BaseClass_ptr1, std::str return false; } - - const char DynamicsFunctionBlock::debugName[] = "DynamicsFunctionBlock"; const char* DynamicsFunctionBlock::debugString() const { @@ -80,12 +76,12 @@ const char* DynamicsFunctionBlock::debugString() const void DynamicsFunctionBlock::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DynamicsFunctionBlock"), &DynamicsFunctionBlock_factory)); + factory_map.emplace("cim:DynamicsFunctionBlock", &DynamicsFunctionBlock_factory); } void DynamicsFunctionBlock::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DynamicsFunctionBlock.enabled"), &assign_DynamicsFunctionBlock_enabled)); + assign_map.emplace("cim:DynamicsFunctionBlock.enabled", &assign_DynamicsFunctionBlock_enabled); } void DynamicsFunctionBlock::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/DynamicsFunctionBlock.hpp b/CGMES_2.4.15_27JAN2020/DynamicsFunctionBlock.hpp index 4e9d7b9c9..cfce2f68e 100644 --- a/CGMES_2.4.15_27JAN2020/DynamicsFunctionBlock.hpp +++ b/CGMES_2.4.15_27JAN2020/DynamicsFunctionBlock.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Abstract parent class for all Dynamics function blocks. - */ + /** \brief Abstract parent class for all Dynamics function blocks. */ class DynamicsFunctionBlock : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP DynamicsFunctionBlock(); ~DynamicsFunctionBlock() override; - CIMPP::Boolean enabled; /* Function block used indicator. true = use of function block is enabled false = use of function block is disabled. Default: false */ + /** \brief Function block used indicator. true = use of function block is enabled false = use of function block is disabled. Default: false */ + CIMPP::Boolean enabled; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/DynamicsVersion.cpp b/CGMES_2.4.15_27JAN2020/DynamicsVersion.cpp index 439db56d8..4a2ca6829 100644 --- a/CGMES_2.4.15_27JAN2020/DynamicsVersion.cpp +++ b/CGMES_2.4.15_27JAN2020/DynamicsVersion.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "String.hpp" -#include "String.hpp" -#include "Date.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -DynamicsVersion::DynamicsVersion() {}; -DynamicsVersion::~DynamicsVersion() {}; +DynamicsVersion::DynamicsVersion() {} +DynamicsVersion::~DynamicsVersion() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ DynamicsVersion::getPossibleProfilesForAttributes() const return map; } - -bool assign_DynamicsVersion_baseUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DynamicsVersion_baseUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DynamicsVersion_baseURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DynamicsVersion_baseURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DynamicsVersion_date(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DynamicsVersion_date(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->date = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DynamicsVersion_differenceModelURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DynamicsVersion_differenceModelURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->differenceModelURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DynamicsVersion_entsoeUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DynamicsVersion_entsoeUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DynamicsVersion_entsoeURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DynamicsVersion_entsoeURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DynamicsVersion_modelDescriptionURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DynamicsVersion_modelDescriptionURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->modelDescriptionURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DynamicsVersion_namespaceRDF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DynamicsVersion_namespaceRDF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceRDF = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DynamicsVersion_namespaceUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DynamicsVersion_namespaceUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DynamicsVersion_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DynamicsVersion_shortName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->shortName = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_DynamicsVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseUML; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_DynamicsVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stringstr bool get_DynamicsVersion_baseURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseURI; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_DynamicsVersion_baseURI(const BaseClass* BaseClass_ptr1, std::stringstr bool get_DynamicsVersion_date(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->date; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_DynamicsVersion_date(const BaseClass* BaseClass_ptr1, std::stringstream bool get_DynamicsVersion_differenceModelURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->differenceModelURI; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_DynamicsVersion_differenceModelURI(const BaseClass* BaseClass_ptr1, std bool get_DynamicsVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeUML; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_DynamicsVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::strings bool get_DynamicsVersion_entsoeURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeURI; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_DynamicsVersion_entsoeURI(const BaseClass* BaseClass_ptr1, std::strings bool get_DynamicsVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->modelDescriptionURI; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_DynamicsVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr1, st bool get_DynamicsVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceRDF; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_DynamicsVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std::stri bool get_DynamicsVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceUML; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_DynamicsVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std::stri bool get_DynamicsVersion_shortName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1)) + const DynamicsVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortName; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_DynamicsVersion_shortName(const BaseClass* BaseClass_ptr1, std::strings return false; } - - const char DynamicsVersion::debugName[] = "DynamicsVersion"; const char* DynamicsVersion::debugString() const { @@ -341,21 +346,21 @@ const char* DynamicsVersion::debugString() const void DynamicsVersion::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DynamicsVersion"), &DynamicsVersion_factory)); + factory_map.emplace("cim:DynamicsVersion", &DynamicsVersion_factory); } void DynamicsVersion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DynamicsVersion.baseUML"), &assign_DynamicsVersion_baseUML)); - assign_map.insert(std::make_pair(std::string("cim:DynamicsVersion.baseURI"), &assign_DynamicsVersion_baseURI)); - assign_map.insert(std::make_pair(std::string("cim:DynamicsVersion.date"), &assign_DynamicsVersion_date)); - assign_map.insert(std::make_pair(std::string("cim:DynamicsVersion.differenceModelURI"), &assign_DynamicsVersion_differenceModelURI)); - assign_map.insert(std::make_pair(std::string("cim:DynamicsVersion.entsoeUML"), &assign_DynamicsVersion_entsoeUML)); - assign_map.insert(std::make_pair(std::string("cim:DynamicsVersion.entsoeURI"), &assign_DynamicsVersion_entsoeURI)); - assign_map.insert(std::make_pair(std::string("cim:DynamicsVersion.modelDescriptionURI"), &assign_DynamicsVersion_modelDescriptionURI)); - assign_map.insert(std::make_pair(std::string("cim:DynamicsVersion.namespaceRDF"), &assign_DynamicsVersion_namespaceRDF)); - assign_map.insert(std::make_pair(std::string("cim:DynamicsVersion.namespaceUML"), &assign_DynamicsVersion_namespaceUML)); - assign_map.insert(std::make_pair(std::string("cim:DynamicsVersion.shortName"), &assign_DynamicsVersion_shortName)); + assign_map.emplace("cim:DynamicsVersion.baseUML", &assign_DynamicsVersion_baseUML); + assign_map.emplace("cim:DynamicsVersion.baseURI", &assign_DynamicsVersion_baseURI); + assign_map.emplace("cim:DynamicsVersion.date", &assign_DynamicsVersion_date); + assign_map.emplace("cim:DynamicsVersion.differenceModelURI", &assign_DynamicsVersion_differenceModelURI); + assign_map.emplace("cim:DynamicsVersion.entsoeUML", &assign_DynamicsVersion_entsoeUML); + assign_map.emplace("cim:DynamicsVersion.entsoeURI", &assign_DynamicsVersion_entsoeURI); + assign_map.emplace("cim:DynamicsVersion.modelDescriptionURI", &assign_DynamicsVersion_modelDescriptionURI); + assign_map.emplace("cim:DynamicsVersion.namespaceRDF", &assign_DynamicsVersion_namespaceRDF); + assign_map.emplace("cim:DynamicsVersion.namespaceUML", &assign_DynamicsVersion_namespaceUML); + assign_map.emplace("cim:DynamicsVersion.shortName", &assign_DynamicsVersion_shortName); } void DynamicsVersion::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/DynamicsVersion.hpp b/CGMES_2.4.15_27JAN2020/DynamicsVersion.hpp index c21621cfb..67ae2df75 100644 --- a/CGMES_2.4.15_27JAN2020/DynamicsVersion.hpp +++ b/CGMES_2.4.15_27JAN2020/DynamicsVersion.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Version details. - */ + /** \brief Version details. */ class DynamicsVersion : public BaseClass { public: @@ -28,16 +26,35 @@ namespace CIMPP DynamicsVersion(); ~DynamicsVersion() override; - CIMPP::String baseUML; /* Base UML provided by CIM model manager. Default: '' */ - CIMPP::String baseURI; /* Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ - CIMPP::Date date; /* Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ - CIMPP::String differenceModelURI; /* Difference model URI defined by IEC 61970-552. Default: '' */ - CIMPP::String entsoeUML; /* UML provided by ENTSO-E. Default: '' */ - CIMPP::String entsoeURI; /* Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/Dynamics/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ - CIMPP::String modelDescriptionURI; /* Model Description URI defined by IEC 61970-552. Default: '' */ - CIMPP::String namespaceRDF; /* RDF namespace. Default: '' */ - CIMPP::String namespaceUML; /* CIM UML namespace. Default: '' */ - CIMPP::String shortName; /* The short name of the profile used in profile documentation. Default: '' */ + /** \brief Base UML provided by CIM model manager. Default: '' */ + CIMPP::String baseUML; + + /** \brief Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ + CIMPP::String baseURI; + + /** \brief Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ + CIMPP::Date date; + + /** \brief Difference model URI defined by IEC 61970-552. Default: '' */ + CIMPP::String differenceModelURI; + + /** \brief UML provided by ENTSO-E. Default: '' */ + CIMPP::String entsoeUML; + + /** \brief Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/Dynamics/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ + CIMPP::String entsoeURI; + + /** \brief Model Description URI defined by IEC 61970-552. Default: '' */ + CIMPP::String modelDescriptionURI; + + /** \brief RDF namespace. Default: '' */ + CIMPP::String namespaceRDF; + + /** \brief CIM UML namespace. Default: '' */ + CIMPP::String namespaceUML; + + /** \brief The short name of the profile used in profile documentation. Default: '' */ + CIMPP::String shortName; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/EarthFaultCompensator.cpp b/CGMES_2.4.15_27JAN2020/EarthFaultCompensator.cpp index 704e5d53f..f5411585b 100644 --- a/CGMES_2.4.15_27JAN2020/EarthFaultCompensator.cpp +++ b/CGMES_2.4.15_27JAN2020/EarthFaultCompensator.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Resistance.hpp" using namespace CIMPP; -EarthFaultCompensator::EarthFaultCompensator() {}; -EarthFaultCompensator::~EarthFaultCompensator() {}; +EarthFaultCompensator::EarthFaultCompensator() {} +EarthFaultCompensator::~EarthFaultCompensator() {} static const std::list PossibleProfilesForClass = { @@ -40,25 +39,24 @@ EarthFaultCompensator::getPossibleProfilesForAttributes() const return map; } - -bool assign_EarthFaultCompensator_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EarthFaultCompensator_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EarthFaultCompensator* element = dynamic_cast(BaseClass_ptr1)) + EarthFaultCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_EarthFaultCompensator_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EarthFaultCompensator* element = dynamic_cast(BaseClass_ptr1)) + const EarthFaultCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -70,8 +68,6 @@ bool get_EarthFaultCompensator_r(const BaseClass* BaseClass_ptr1, std::stringstr return false; } - - const char EarthFaultCompensator::debugName[] = "EarthFaultCompensator"; const char* EarthFaultCompensator::debugString() const { @@ -80,12 +76,12 @@ const char* EarthFaultCompensator::debugString() const void EarthFaultCompensator::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EarthFaultCompensator"), &EarthFaultCompensator_factory)); + factory_map.emplace("cim:EarthFaultCompensator", &EarthFaultCompensator_factory); } void EarthFaultCompensator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EarthFaultCompensator.r"), &assign_EarthFaultCompensator_r)); + assign_map.emplace("cim:EarthFaultCompensator.r", &assign_EarthFaultCompensator_r); } void EarthFaultCompensator::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/EarthFaultCompensator.hpp b/CGMES_2.4.15_27JAN2020/EarthFaultCompensator.hpp index 42b6561d1..5f16c7ac2 100644 --- a/CGMES_2.4.15_27JAN2020/EarthFaultCompensator.hpp +++ b/CGMES_2.4.15_27JAN2020/EarthFaultCompensator.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A conducting equipment used to represent a connection to ground which is typically used to compensate earth faults.. An earth fault compensator device modeled with a single terminal implies a second terminal solidly connected to ground. If two terminals are modeled, the ground is not assumed and normal connection rules apply. - */ + /** \brief A conducting equipment used to represent a connection to ground which is typically used to compensate earth faults.. An earth fault compensator device modeled with a single terminal implies a second terminal solidly connected to ground. If two terminals are modeled, the ground is not assumed and normal connection rules apply. */ class EarthFaultCompensator : public ConductingEquipment { public: @@ -27,7 +25,8 @@ namespace CIMPP EarthFaultCompensator(); ~EarthFaultCompensator() override; - CIMPP::Resistance r; /* Nominal resistance of device. Default: nullptr */ + /** \brief Nominal resistance of device. Default: nullptr */ + CIMPP::Resistance r; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/EnergyArea.cpp b/CGMES_2.4.15_27JAN2020/EnergyArea.cpp index 74d42606b..0df0b19c1 100644 --- a/CGMES_2.4.15_27JAN2020/EnergyArea.cpp +++ b/CGMES_2.4.15_27JAN2020/EnergyArea.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -EnergyArea::EnergyArea() : ControlArea(nullptr) {}; -EnergyArea::~EnergyArea() {}; +EnergyArea::EnergyArea() : ControlArea(nullptr) {} +EnergyArea::~EnergyArea() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ EnergyArea::getPossibleProfilesForAttributes() const return map; } - - bool assign_ControlArea_EnergyArea(BaseClass*, BaseClass*); bool assign_EnergyArea_ControlArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_EnergyArea_ControlArea(BaseClass* BaseClass_ptr1, BaseClass* BaseCla } - const char EnergyArea::debugName[] = "EnergyArea"; const char* EnergyArea::debugString() const { @@ -69,7 +66,7 @@ const char* EnergyArea::debugString() const void EnergyArea::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EnergyArea"), &EnergyArea_factory)); + factory_map.emplace("cim:EnergyArea", &EnergyArea_factory); } void EnergyArea::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void EnergyArea::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EnergyArea.ControlArea"), &assign_EnergyArea_ControlArea)); + assign_map.emplace("cim:EnergyArea.ControlArea", &assign_EnergyArea_ControlArea); } void EnergyArea::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/EnergyArea.hpp b/CGMES_2.4.15_27JAN2020/EnergyArea.hpp index 2958fc787..7d58dfca7 100644 --- a/CGMES_2.4.15_27JAN2020/EnergyArea.hpp +++ b/CGMES_2.4.15_27JAN2020/EnergyArea.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class ControlArea; - /* - Describes an area having energy production or consumption. Specializations are intended to support the load allocation function as typically required in energy management systems or planning studies to allocate hypothesized load levels to individual load points for power flow analysis. Often the energy area can be linked to both measured and forecast load levels. - */ + /** \brief Describes an area having energy production or consumption. Specializations are intended to support the load allocation function as typically required in energy management systems or planning studies to allocate hypothesized load levels to individual load points for power flow analysis. Often the energy area can be linked to both measured and forecast load levels. */ class EnergyArea : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP EnergyArea(); ~EnergyArea() override; - CIMPP::ControlArea* ControlArea; /* The control area specification that is used for the load forecast. Default: 0 */ + /** \brief The control area specification that is used for the load forecast. Default: 0 */ + CIMPP::ControlArea* ControlArea; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/EnergyConsumer.cpp b/CGMES_2.4.15_27JAN2020/EnergyConsumer.cpp index cc1802647..b95cded7e 100644 --- a/CGMES_2.4.15_27JAN2020/EnergyConsumer.cpp +++ b/CGMES_2.4.15_27JAN2020/EnergyConsumer.cpp @@ -10,17 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "LoadDynamics.hpp" #include "LoadResponseCharacteristic.hpp" -#include "ActivePower.hpp" -#include "ActivePower.hpp" -#include "PerCent.hpp" -#include "ReactivePower.hpp" -#include "ReactivePower.hpp" -#include "PerCent.hpp" using namespace CIMPP; -EnergyConsumer::EnergyConsumer() : LoadDynamics(nullptr), LoadResponse(nullptr) {}; -EnergyConsumer::~EnergyConsumer() {}; +EnergyConsumer::EnergyConsumer() : LoadDynamics(nullptr), LoadResponse(nullptr) {} +EnergyConsumer::~EnergyConsumer() {} static const std::list PossibleProfilesForClass = { @@ -56,122 +50,156 @@ EnergyConsumer::getPossibleProfilesForAttributes() const return map; } +bool assign_LoadDynamics_EnergyConsumer(BaseClass*, BaseClass*); +bool assign_EnergyConsumer_LoadDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + LoadDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->LoadDynamics != element2) + { + element->LoadDynamics = element2; + return assign_LoadDynamics_EnergyConsumer(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_EnergyConsumer_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_EnergyConsumer(BaseClass*, BaseClass*); +bool assign_EnergyConsumer_LoadResponse(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + LoadResponseCharacteristic* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->LoadResponse != element2) + { + element->LoadResponse = element2; + return assign_LoadResponseCharacteristic_EnergyConsumer(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_EnergyConsumer_p(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergyConsumer_pfixed(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergyConsumer_pfixed(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pfixed; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergyConsumer_pfixedPct(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergyConsumer_pfixedPct(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pfixedPct; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergyConsumer_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergyConsumer_q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergyConsumer_qfixed(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergyConsumer_qfixed(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qfixed; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergyConsumer_qfixedPct(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergyConsumer_qfixedPct(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qfixedPct; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_LoadDynamics_EnergyConsumer(BaseClass*, BaseClass*); -bool assign_EnergyConsumer_LoadDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_EnergyConsumer_LoadDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); - LoadDynamics* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->LoadDynamics != element2) + if (element->LoadDynamics != 0) { - element->LoadDynamics = element2; - return assign_LoadDynamics_EnergyConsumer(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->LoadDynamics); + return true; } - return true; } return false; } -bool assign_LoadResponseCharacteristic_EnergyConsumer(BaseClass*, BaseClass*); -bool assign_EnergyConsumer_LoadResponse(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool get_EnergyConsumer_LoadResponse(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); - LoadResponseCharacteristic* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->LoadResponse != element2) + if (element->LoadResponse != 0) { - element->LoadResponse = element2; - return assign_LoadResponseCharacteristic_EnergyConsumer(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->LoadResponse); + return true; } - return true; } return false; } bool get_EnergyConsumer_p(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p; if (!buffer.str().empty()) @@ -185,7 +213,8 @@ bool get_EnergyConsumer_p(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_EnergyConsumer_pfixed(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pfixed; if (!buffer.str().empty()) @@ -199,7 +228,8 @@ bool get_EnergyConsumer_pfixed(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_EnergyConsumer_pfixedPct(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pfixedPct; if (!buffer.str().empty()) @@ -213,7 +243,8 @@ bool get_EnergyConsumer_pfixedPct(const BaseClass* BaseClass_ptr1, std::stringst bool get_EnergyConsumer_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q; if (!buffer.str().empty()) @@ -227,7 +258,8 @@ bool get_EnergyConsumer_q(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_EnergyConsumer_qfixed(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qfixed; if (!buffer.str().empty()) @@ -241,7 +273,8 @@ bool get_EnergyConsumer_qfixed(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_EnergyConsumer_qfixedPct(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qfixedPct; if (!buffer.str().empty()) @@ -253,34 +286,6 @@ bool get_EnergyConsumer_qfixedPct(const BaseClass* BaseClass_ptr1, std::stringst return false; } - -bool get_EnergyConsumer_LoadDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->LoadDynamics != 0) - { - BaseClass_list.push_back(element->LoadDynamics); - return true; - } - } - return false; -} - -bool get_EnergyConsumer_LoadResponse(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->LoadResponse != 0) - { - BaseClass_list.push_back(element->LoadResponse); - return true; - } - } - return false; -} - - const char EnergyConsumer::debugName[] = "EnergyConsumer"; const char* EnergyConsumer::debugString() const { @@ -289,23 +294,23 @@ const char* EnergyConsumer::debugString() const void EnergyConsumer::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EnergyConsumer"), &EnergyConsumer_factory)); + factory_map.emplace("cim:EnergyConsumer", &EnergyConsumer_factory); } void EnergyConsumer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EnergyConsumer.p"), &assign_EnergyConsumer_p)); - assign_map.insert(std::make_pair(std::string("cim:EnergyConsumer.pfixed"), &assign_EnergyConsumer_pfixed)); - assign_map.insert(std::make_pair(std::string("cim:EnergyConsumer.pfixedPct"), &assign_EnergyConsumer_pfixedPct)); - assign_map.insert(std::make_pair(std::string("cim:EnergyConsumer.q"), &assign_EnergyConsumer_q)); - assign_map.insert(std::make_pair(std::string("cim:EnergyConsumer.qfixed"), &assign_EnergyConsumer_qfixed)); - assign_map.insert(std::make_pair(std::string("cim:EnergyConsumer.qfixedPct"), &assign_EnergyConsumer_qfixedPct)); + assign_map.emplace("cim:EnergyConsumer.p", &assign_EnergyConsumer_p); + assign_map.emplace("cim:EnergyConsumer.pfixed", &assign_EnergyConsumer_pfixed); + assign_map.emplace("cim:EnergyConsumer.pfixedPct", &assign_EnergyConsumer_pfixedPct); + assign_map.emplace("cim:EnergyConsumer.q", &assign_EnergyConsumer_q); + assign_map.emplace("cim:EnergyConsumer.qfixed", &assign_EnergyConsumer_qfixed); + assign_map.emplace("cim:EnergyConsumer.qfixedPct", &assign_EnergyConsumer_qfixedPct); } void EnergyConsumer::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EnergyConsumer.LoadDynamics"), &assign_EnergyConsumer_LoadDynamics)); - assign_map.insert(std::make_pair(std::string("cim:EnergyConsumer.LoadResponse"), &assign_EnergyConsumer_LoadResponse)); + assign_map.emplace("cim:EnergyConsumer.LoadDynamics", &assign_EnergyConsumer_LoadDynamics); + assign_map.emplace("cim:EnergyConsumer.LoadResponse", &assign_EnergyConsumer_LoadResponse); } void EnergyConsumer::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/EnergyConsumer.hpp b/CGMES_2.4.15_27JAN2020/EnergyConsumer.hpp index ad20849d2..54d03c283 100644 --- a/CGMES_2.4.15_27JAN2020/EnergyConsumer.hpp +++ b/CGMES_2.4.15_27JAN2020/EnergyConsumer.hpp @@ -21,9 +21,7 @@ namespace CIMPP class LoadDynamics; class LoadResponseCharacteristic; - /* - Generic user of energy - a point of consumption on the power system model. - */ + /** \brief Generic user of energy - a point of consumption on the power system model. */ class EnergyConsumer : public ConductingEquipment { public: @@ -31,14 +29,29 @@ namespace CIMPP EnergyConsumer(); ~EnergyConsumer() override; - CIMPP::LoadDynamics* LoadDynamics; /* Load dynamics model used to describe dynamic behavior of this energy consumer. Default: 0 */ - CIMPP::LoadResponseCharacteristic* LoadResponse; /* The load response characteristic of this load. If missing, this load is assumed to be constant power. Default: 0 */ - CIMPP::ActivePower p; /* Active power of the load. Load sign convention is used, i.e. positive sign means flow out from a node. For voltage dependent loads the value is at rated voltage. Starting value for a steady state solution. Default: nullptr */ - CIMPP::ActivePower pfixed; /* Active power of the load that is a fixed quantity. Load sign convention is used, i.e. positive sign means flow out from a node. Default: nullptr */ - CIMPP::PerCent pfixedPct; /* Fixed active power as per cent of load group fixed active power. Load sign convention is used, i.e. positive sign means flow out from a node. Default: nullptr */ - CIMPP::ReactivePower q; /* Reactive power of the load. Load sign convention is used, i.e. positive sign means flow out from a node. For voltage dependent loads the value is at rated voltage. Starting value for a steady state solution. Default: nullptr */ - CIMPP::ReactivePower qfixed; /* Reactive power of the load that is a fixed quantity. Load sign convention is used, i.e. positive sign means flow out from a node. Default: nullptr */ - CIMPP::PerCent qfixedPct; /* Fixed reactive power as per cent of load group fixed reactive power. Load sign convention is used, i.e. positive sign means flow out from a node. Default: nullptr */ + /** \brief Load dynamics model used to describe dynamic behavior of this energy consumer. Default: 0 */ + CIMPP::LoadDynamics* LoadDynamics; + + /** \brief The load response characteristic of this load. If missing, this load is assumed to be constant power. Default: 0 */ + CIMPP::LoadResponseCharacteristic* LoadResponse; + + /** \brief Active power of the load. Load sign convention is used, i.e. positive sign means flow out from a node. For voltage dependent loads the value is at rated voltage. Starting value for a steady state solution. Default: nullptr */ + CIMPP::ActivePower p; + + /** \brief Active power of the load that is a fixed quantity. Load sign convention is used, i.e. positive sign means flow out from a node. Default: nullptr */ + CIMPP::ActivePower pfixed; + + /** \brief Fixed active power as per cent of load group fixed active power. Load sign convention is used, i.e. positive sign means flow out from a node. Default: nullptr */ + CIMPP::PerCent pfixedPct; + + /** \brief Reactive power of the load. Load sign convention is used, i.e. positive sign means flow out from a node. For voltage dependent loads the value is at rated voltage. Starting value for a steady state solution. Default: nullptr */ + CIMPP::ReactivePower q; + + /** \brief Reactive power of the load that is a fixed quantity. Load sign convention is used, i.e. positive sign means flow out from a node. Default: nullptr */ + CIMPP::ReactivePower qfixed; + + /** \brief Fixed reactive power as per cent of load group fixed reactive power. Load sign convention is used, i.e. positive sign means flow out from a node. Default: nullptr */ + CIMPP::PerCent qfixedPct; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/EnergySchedulingType.cpp b/CGMES_2.4.15_27JAN2020/EnergySchedulingType.cpp index 5cd380bcf..a0f451af9 100644 --- a/CGMES_2.4.15_27JAN2020/EnergySchedulingType.cpp +++ b/CGMES_2.4.15_27JAN2020/EnergySchedulingType.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -EnergySchedulingType::EnergySchedulingType() {}; -EnergySchedulingType::~EnergySchedulingType() {}; +EnergySchedulingType::EnergySchedulingType() {} +EnergySchedulingType::~EnergySchedulingType() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ EnergySchedulingType::getPossibleProfilesForAttributes() const return map; } - - bool assign_EnergySource_EnergySchedulingType(BaseClass*, BaseClass*); bool assign_EnergySchedulingType_EnergySource(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,7 +59,6 @@ bool assign_EnergySchedulingType_EnergySource(BaseClass* BaseClass_ptr1, BaseCla } - const char EnergySchedulingType::debugName[] = "EnergySchedulingType"; const char* EnergySchedulingType::debugString() const { @@ -70,7 +67,7 @@ const char* EnergySchedulingType::debugString() const void EnergySchedulingType::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EnergySchedulingType"), &EnergySchedulingType_factory)); + factory_map.emplace("cim:EnergySchedulingType", &EnergySchedulingType_factory); } void EnergySchedulingType::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -79,7 +76,7 @@ void EnergySchedulingType::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EnergySchedulingType.EnergySource"), &assign_EnergySchedulingType_EnergySource)); + assign_map.emplace("cim:EnergySchedulingType.EnergySource", &assign_EnergySchedulingType_EnergySource); } void EnergySchedulingType::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/EnergySchedulingType.hpp b/CGMES_2.4.15_27JAN2020/EnergySchedulingType.hpp index e324c3ead..eac7cbf2c 100644 --- a/CGMES_2.4.15_27JAN2020/EnergySchedulingType.hpp +++ b/CGMES_2.4.15_27JAN2020/EnergySchedulingType.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class EnergySource; - /* - Used to define the type of generation for scheduling purposes. - */ + /** \brief Used to define the type of generation for scheduling purposes. */ class EnergySchedulingType : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP EnergySchedulingType(); ~EnergySchedulingType() override; - std::list EnergySource; /* Energy Source of a particular Energy Scheduling Type Default: 0 */ + /** \brief Energy Source of a particular Energy Scheduling Type Default: 0 */ + std::list EnergySource; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/EnergySource.cpp b/CGMES_2.4.15_27JAN2020/EnergySource.cpp index 64d73c4ee..e4cedfe4b 100644 --- a/CGMES_2.4.15_27JAN2020/EnergySource.cpp +++ b/CGMES_2.4.15_27JAN2020/EnergySource.cpp @@ -10,22 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "EnergySchedulingType.hpp" #include "WindTurbineType3or4Dynamics.hpp" -#include "ActivePower.hpp" -#include "Voltage.hpp" -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "ReactivePower.hpp" -#include "Resistance.hpp" -#include "AngleRadians.hpp" -#include "Voltage.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -EnergySource::EnergySource() : EnergySchedulingType(nullptr), WindTurbineType3or4Dynamics(nullptr) {}; -EnergySource::~EnergySource() {}; +EnergySource::EnergySource() : EnergySchedulingType(nullptr), WindTurbineType3or4Dynamics(nullptr) {} +EnergySource::~EnergySource() {} static const std::list PossibleProfilesForClass = { @@ -67,187 +56,213 @@ EnergySource::getPossibleProfilesForAttributes() const return map; } +bool assign_EnergySchedulingType_EnergySource(BaseClass*, BaseClass*); +bool assign_EnergySource_EnergySchedulingType(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + EnergySource* element = dynamic_cast(BaseClass_ptr1); + EnergySchedulingType* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->EnergySchedulingType != element2) + { + element->EnergySchedulingType = element2; + return assign_EnergySchedulingType_EnergySource(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindTurbineType3or4Dynamics_EnergySource(BaseClass*, BaseClass*); +bool assign_EnergySource_WindTurbineType3or4Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + EnergySource* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType3or4Dynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindTurbineType3or4Dynamics != element2) + { + element->WindTurbineType3or4Dynamics = element2; + return assign_WindTurbineType3or4Dynamics_EnergySource(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_EnergySource_activePower(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_activePower(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->activePower; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_nominalVoltage(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_nominalVoltage(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nominalVoltage; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_r0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_reactivePower(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_reactivePower(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->reactivePower; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_rn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_rn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_voltageAngle(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_voltageAngle(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->voltageAngle; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_voltageMagnitude(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_voltageMagnitude(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->voltageMagnitude; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_x(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_x0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x0; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_EnergySource_xn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->xn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_EnergySchedulingType_EnergySource(BaseClass*, BaseClass*); -bool assign_EnergySource_EnergySchedulingType(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_EnergySource_xn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { EnergySource* element = dynamic_cast(BaseClass_ptr1); - EnergySchedulingType* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->EnergySchedulingType != element2) + buffer >> element->xn; + if (!buffer.fail()) { - element->EnergySchedulingType = element2; - return assign_EnergySchedulingType_EnergySource(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_WindTurbineType3or4Dynamics_EnergySource(BaseClass*, BaseClass*); -bool assign_EnergySource_WindTurbineType3or4Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool get_EnergySource_EnergySchedulingType(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - EnergySource* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType3or4Dynamics* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->WindTurbineType3or4Dynamics != element2) + if (element->EnergySchedulingType != 0) { - element->WindTurbineType3or4Dynamics = element2; - return assign_WindTurbineType3or4Dynamics_EnergySource(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->EnergySchedulingType); + return true; } - return true; } return false; } + bool get_EnergySource_activePower(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->activePower; if (!buffer.str().empty()) @@ -261,7 +276,8 @@ bool get_EnergySource_activePower(const BaseClass* BaseClass_ptr1, std::stringst bool get_EnergySource_nominalVoltage(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nominalVoltage; if (!buffer.str().empty()) @@ -275,7 +291,8 @@ bool get_EnergySource_nominalVoltage(const BaseClass* BaseClass_ptr1, std::strin bool get_EnergySource_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -289,7 +306,8 @@ bool get_EnergySource_r(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_EnergySource_r0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r0; if (!buffer.str().empty()) @@ -303,7 +321,8 @@ bool get_EnergySource_r0(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_EnergySource_reactivePower(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->reactivePower; if (!buffer.str().empty()) @@ -317,7 +336,8 @@ bool get_EnergySource_reactivePower(const BaseClass* BaseClass_ptr1, std::string bool get_EnergySource_rn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rn; if (!buffer.str().empty()) @@ -331,7 +351,8 @@ bool get_EnergySource_rn(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_EnergySource_voltageAngle(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->voltageAngle; if (!buffer.str().empty()) @@ -345,7 +366,8 @@ bool get_EnergySource_voltageAngle(const BaseClass* BaseClass_ptr1, std::strings bool get_EnergySource_voltageMagnitude(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->voltageMagnitude; if (!buffer.str().empty()) @@ -359,7 +381,8 @@ bool get_EnergySource_voltageMagnitude(const BaseClass* BaseClass_ptr1, std::str bool get_EnergySource_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x; if (!buffer.str().empty()) @@ -373,7 +396,8 @@ bool get_EnergySource_x(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_EnergySource_x0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x0; if (!buffer.str().empty()) @@ -387,7 +411,8 @@ bool get_EnergySource_x0(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_EnergySource_xn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xn; if (!buffer.str().empty()) @@ -399,21 +424,6 @@ bool get_EnergySource_xn(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } - -bool get_EnergySource_EnergySchedulingType(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->EnergySchedulingType != 0) - { - BaseClass_list.push_back(element->EnergySchedulingType); - return true; - } - } - return false; -} - - const char EnergySource::debugName[] = "EnergySource"; const char* EnergySource::debugString() const { @@ -422,28 +432,28 @@ const char* EnergySource::debugString() const void EnergySource::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EnergySource"), &EnergySource_factory)); + factory_map.emplace("cim:EnergySource", &EnergySource_factory); } void EnergySource::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EnergySource.activePower"), &assign_EnergySource_activePower)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.nominalVoltage"), &assign_EnergySource_nominalVoltage)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.r"), &assign_EnergySource_r)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.r0"), &assign_EnergySource_r0)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.reactivePower"), &assign_EnergySource_reactivePower)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.rn"), &assign_EnergySource_rn)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.voltageAngle"), &assign_EnergySource_voltageAngle)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.voltageMagnitude"), &assign_EnergySource_voltageMagnitude)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.x"), &assign_EnergySource_x)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.x0"), &assign_EnergySource_x0)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.xn"), &assign_EnergySource_xn)); + assign_map.emplace("cim:EnergySource.activePower", &assign_EnergySource_activePower); + assign_map.emplace("cim:EnergySource.nominalVoltage", &assign_EnergySource_nominalVoltage); + assign_map.emplace("cim:EnergySource.r", &assign_EnergySource_r); + assign_map.emplace("cim:EnergySource.r0", &assign_EnergySource_r0); + assign_map.emplace("cim:EnergySource.reactivePower", &assign_EnergySource_reactivePower); + assign_map.emplace("cim:EnergySource.rn", &assign_EnergySource_rn); + assign_map.emplace("cim:EnergySource.voltageAngle", &assign_EnergySource_voltageAngle); + assign_map.emplace("cim:EnergySource.voltageMagnitude", &assign_EnergySource_voltageMagnitude); + assign_map.emplace("cim:EnergySource.x", &assign_EnergySource_x); + assign_map.emplace("cim:EnergySource.x0", &assign_EnergySource_x0); + assign_map.emplace("cim:EnergySource.xn", &assign_EnergySource_xn); } void EnergySource::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EnergySource.EnergySchedulingType"), &assign_EnergySource_EnergySchedulingType)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.WindTurbineType3or4Dynamics"), &assign_EnergySource_WindTurbineType3or4Dynamics)); + assign_map.emplace("cim:EnergySource.EnergySchedulingType", &assign_EnergySource_EnergySchedulingType); + assign_map.emplace("cim:EnergySource.WindTurbineType3or4Dynamics", &assign_EnergySource_WindTurbineType3or4Dynamics); } void EnergySource::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/EnergySource.hpp b/CGMES_2.4.15_27JAN2020/EnergySource.hpp index cdcaefece..44dc8214a 100644 --- a/CGMES_2.4.15_27JAN2020/EnergySource.hpp +++ b/CGMES_2.4.15_27JAN2020/EnergySource.hpp @@ -24,9 +24,7 @@ namespace CIMPP class EnergySchedulingType; class WindTurbineType3or4Dynamics; - /* - A generic equivalent for an energy supplier on a transmission or distribution voltage level. - */ + /** \brief A generic equivalent for an energy supplier on a transmission or distribution voltage level. */ class EnergySource : public ConductingEquipment { public: @@ -34,19 +32,44 @@ namespace CIMPP EnergySource(); ~EnergySource() override; - CIMPP::EnergySchedulingType* EnergySchedulingType; /* Energy Scheduling Type of an Energy Source Default: 0 */ - CIMPP::WindTurbineType3or4Dynamics* WindTurbineType3or4Dynamics; /* Wind generator Type 3 or 4 dynamics model associated with this energy source. Default: 0 */ - CIMPP::ActivePower activePower; /* High voltage source active injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ - CIMPP::Voltage nominalVoltage; /* Phase-to-phase nominal voltage. Default: nullptr */ - CIMPP::Resistance r; /* Positive sequence Thevenin resistance. Default: nullptr */ - CIMPP::Resistance r0; /* Zero sequence Thevenin resistance. Default: nullptr */ - CIMPP::ReactivePower reactivePower; /* High voltage source reactive injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ - CIMPP::Resistance rn; /* Negative sequence Thevenin resistance. Default: nullptr */ - CIMPP::AngleRadians voltageAngle; /* Phase angle of a-phase open circuit. Default: nullptr */ - CIMPP::Voltage voltageMagnitude; /* Phase-to-phase open circuit voltage magnitude. Default: nullptr */ - CIMPP::Reactance x; /* Positive sequence Thevenin reactance. Default: nullptr */ - CIMPP::Reactance x0; /* Zero sequence Thevenin reactance. Default: nullptr */ - CIMPP::Reactance xn; /* Negative sequence Thevenin reactance. Default: nullptr */ + /** \brief Energy Scheduling Type of an Energy Source Default: 0 */ + CIMPP::EnergySchedulingType* EnergySchedulingType; + + /** \brief Wind generator Type 3 or 4 dynamics model associated with this energy source. Default: 0 */ + CIMPP::WindTurbineType3or4Dynamics* WindTurbineType3or4Dynamics; + + /** \brief High voltage source active injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ + CIMPP::ActivePower activePower; + + /** \brief Phase-to-phase nominal voltage. Default: nullptr */ + CIMPP::Voltage nominalVoltage; + + /** \brief Positive sequence Thevenin resistance. Default: nullptr */ + CIMPP::Resistance r; + + /** \brief Zero sequence Thevenin resistance. Default: nullptr */ + CIMPP::Resistance r0; + + /** \brief High voltage source reactive injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ + CIMPP::ReactivePower reactivePower; + + /** \brief Negative sequence Thevenin resistance. Default: nullptr */ + CIMPP::Resistance rn; + + /** \brief Phase angle of a-phase open circuit. Default: nullptr */ + CIMPP::AngleRadians voltageAngle; + + /** \brief Phase-to-phase open circuit voltage magnitude. Default: nullptr */ + CIMPP::Voltage voltageMagnitude; + + /** \brief Positive sequence Thevenin reactance. Default: nullptr */ + CIMPP::Reactance x; + + /** \brief Zero sequence Thevenin reactance. Default: nullptr */ + CIMPP::Reactance x0; + + /** \brief Negative sequence Thevenin reactance. Default: nullptr */ + CIMPP::Reactance xn; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Equipment.cpp b/CGMES_2.4.15_27JAN2020/Equipment.cpp index 71c4ba73e..eb6382a63 100644 --- a/CGMES_2.4.15_27JAN2020/Equipment.cpp +++ b/CGMES_2.4.15_27JAN2020/Equipment.cpp @@ -10,12 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "EquipmentContainer.hpp" #include "OperationalLimitSet.hpp" -#include "Boolean.hpp" using namespace CIMPP; -Equipment::Equipment() : EquipmentContainer(nullptr) {}; -Equipment::~Equipment() {}; +Equipment::Equipment() : EquipmentContainer(nullptr) {} +Equipment::~Equipment() {} static const std::list PossibleProfilesForClass = { @@ -47,21 +46,6 @@ Equipment::getPossibleProfilesForAttributes() const return map; } - -bool assign_Equipment_aggregate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (Equipment* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->aggregate; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_EquipmentContainer_Equipments(BaseClass*, BaseClass*); bool assign_Equipment_EquipmentContainer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -78,6 +62,7 @@ bool assign_Equipment_EquipmentContainer(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_OperationalLimitSet_Equipment(BaseClass*, BaseClass*); bool assign_Equipment_OperationalLimitSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -95,24 +80,24 @@ bool assign_Equipment_OperationalLimitSet(BaseClass* BaseClass_ptr1, BaseClass* return false; } -bool get_Equipment_aggregate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_Equipment_aggregate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const Equipment* element = dynamic_cast(BaseClass_ptr1)) + Equipment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->aggregate; - if (!buffer.str().empty()) + buffer >> element->aggregate; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_Equipment_EquipmentContainer(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Equipment* element = dynamic_cast(BaseClass_ptr1)) + const Equipment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->EquipmentContainer != 0) { @@ -124,6 +109,21 @@ bool get_Equipment_EquipmentContainer(const BaseClass* BaseClass_ptr1, std::list } +bool get_Equipment_aggregate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const Equipment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->aggregate; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + const char Equipment::debugName[] = "Equipment"; const char* Equipment::debugString() const { @@ -132,18 +132,18 @@ const char* Equipment::debugString() const void Equipment::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Equipment"), &Equipment_factory)); + factory_map.emplace("cim:Equipment", &Equipment_factory); } void Equipment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Equipment.aggregate"), &assign_Equipment_aggregate)); + assign_map.emplace("cim:Equipment.aggregate", &assign_Equipment_aggregate); } void Equipment::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Equipment.EquipmentContainer"), &assign_Equipment_EquipmentContainer)); - assign_map.insert(std::make_pair(std::string("cim:Equipment.OperationalLimitSet"), &assign_Equipment_OperationalLimitSet)); + assign_map.emplace("cim:Equipment.EquipmentContainer", &assign_Equipment_EquipmentContainer); + assign_map.emplace("cim:Equipment.OperationalLimitSet", &assign_Equipment_OperationalLimitSet); } void Equipment::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/Equipment.hpp b/CGMES_2.4.15_27JAN2020/Equipment.hpp index 9570e3b18..7a818843f 100644 --- a/CGMES_2.4.15_27JAN2020/Equipment.hpp +++ b/CGMES_2.4.15_27JAN2020/Equipment.hpp @@ -19,9 +19,7 @@ namespace CIMPP class EquipmentContainer; class OperationalLimitSet; - /* - The parts of a power system that are physical devices, electronic or mechanical. - */ + /** \brief The parts of a power system that are physical devices, electronic or mechanical. */ class Equipment : public PowerSystemResource { public: @@ -29,9 +27,14 @@ namespace CIMPP Equipment(); ~Equipment() override; - CIMPP::EquipmentContainer* EquipmentContainer; /* Container of this equipment. Default: 0 */ - std::list OperationalLimitSet; /* The operational limit sets associated with this equipment. Default: 0 */ - CIMPP::Boolean aggregate; /* The single instance of equipment represents multiple pieces of equipment that have been modeled together as an aggregate. Examples would be power transformers or synchronous machines operating in parallel modeled as a single aggregate power transformer or aggregate synchronous machine. This is not to be used to indicate equipment that is part of a group of interdependent equipment produced by a network production program. Default: false */ + /** \brief Container of this equipment. Default: 0 */ + CIMPP::EquipmentContainer* EquipmentContainer; + + /** \brief The operational limit sets associated with this equipment. Default: 0 */ + std::list OperationalLimitSet; + + /** \brief The single instance of equipment represents multiple pieces of equipment that have been modeled together as an aggregate. Examples would be power transformers or synchronous machines operating in parallel modeled as a single aggregate power transformer or aggregate synchronous machine. This is not to be used to indicate equipment that is part of a group of interdependent equipment produced by a network production program. Default: false */ + CIMPP::Boolean aggregate; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/EquipmentBoundaryVersion.cpp b/CGMES_2.4.15_27JAN2020/EquipmentBoundaryVersion.cpp index 50f212fdc..93b5017ab 100644 --- a/CGMES_2.4.15_27JAN2020/EquipmentBoundaryVersion.cpp +++ b/CGMES_2.4.15_27JAN2020/EquipmentBoundaryVersion.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "String.hpp" -#include "String.hpp" -#include "Date.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -EquipmentBoundaryVersion::EquipmentBoundaryVersion() {}; -EquipmentBoundaryVersion::~EquipmentBoundaryVersion() {}; +EquipmentBoundaryVersion::EquipmentBoundaryVersion() {} +EquipmentBoundaryVersion::~EquipmentBoundaryVersion() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ EquipmentBoundaryVersion::getPossibleProfilesForAttributes() const return map; } - -bool assign_EquipmentBoundaryVersion_baseUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentBoundaryVersion_baseUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentBoundaryVersion_baseURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentBoundaryVersion_baseURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentBoundaryVersion_date(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentBoundaryVersion_date(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->date = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentBoundaryVersion_differenceModelURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentBoundaryVersion_differenceModelURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->differenceModelURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentBoundaryVersion_entsoeUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentBoundaryVersion_entsoeUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentBoundaryVersion_entsoeURIcore(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentBoundaryVersion_entsoeURIcore(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeURIcore = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentBoundaryVersion_entsoeURIoperation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentBoundaryVersion_entsoeURIoperation(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeURIoperation = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentBoundaryVersion_modelDescriptionURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentBoundaryVersion_modelDescriptionURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->modelDescriptionURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentBoundaryVersion_namespaceRDF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentBoundaryVersion_namespaceRDF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceRDF = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentBoundaryVersion_namespaceUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentBoundaryVersion_namespaceUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentBoundaryVersion_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentBoundaryVersion_shortName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->shortName = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_EquipmentBoundaryVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseUML; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_EquipmentBoundaryVersion_baseUML(const BaseClass* BaseClass_ptr1, std:: bool get_EquipmentBoundaryVersion_baseURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseURI; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_EquipmentBoundaryVersion_baseURI(const BaseClass* BaseClass_ptr1, std:: bool get_EquipmentBoundaryVersion_date(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->date; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_EquipmentBoundaryVersion_date(const BaseClass* BaseClass_ptr1, std::str bool get_EquipmentBoundaryVersion_differenceModelURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->differenceModelURI; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_EquipmentBoundaryVersion_differenceModelURI(const BaseClass* BaseClass_ bool get_EquipmentBoundaryVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeUML; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_EquipmentBoundaryVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std bool get_EquipmentBoundaryVersion_entsoeURIcore(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeURIcore; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_EquipmentBoundaryVersion_entsoeURIcore(const BaseClass* BaseClass_ptr1, bool get_EquipmentBoundaryVersion_entsoeURIoperation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeURIoperation; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_EquipmentBoundaryVersion_entsoeURIoperation(const BaseClass* BaseClass_ bool get_EquipmentBoundaryVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->modelDescriptionURI; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_EquipmentBoundaryVersion_modelDescriptionURI(const BaseClass* BaseClass bool get_EquipmentBoundaryVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceRDF; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_EquipmentBoundaryVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, bool get_EquipmentBoundaryVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceUML; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_EquipmentBoundaryVersion_namespaceUML(const BaseClass* BaseClass_ptr1, bool get_EquipmentBoundaryVersion_shortName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortName; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_EquipmentBoundaryVersion_shortName(const BaseClass* BaseClass_ptr1, std return false; } - - const char EquipmentBoundaryVersion::debugName[] = "EquipmentBoundaryVersion"; const char* EquipmentBoundaryVersion::debugString() const { @@ -370,22 +376,22 @@ const char* EquipmentBoundaryVersion::debugString() const void EquipmentBoundaryVersion::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EquipmentBoundaryVersion"), &EquipmentBoundaryVersion_factory)); + factory_map.emplace("cim:EquipmentBoundaryVersion", &EquipmentBoundaryVersion_factory); } void EquipmentBoundaryVersion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EquipmentBoundaryVersion.baseUML"), &assign_EquipmentBoundaryVersion_baseUML)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentBoundaryVersion.baseURI"), &assign_EquipmentBoundaryVersion_baseURI)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentBoundaryVersion.date"), &assign_EquipmentBoundaryVersion_date)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentBoundaryVersion.differenceModelURI"), &assign_EquipmentBoundaryVersion_differenceModelURI)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentBoundaryVersion.entsoeUML"), &assign_EquipmentBoundaryVersion_entsoeUML)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentBoundaryVersion.entsoeURIcore"), &assign_EquipmentBoundaryVersion_entsoeURIcore)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentBoundaryVersion.entsoeURIoperation"), &assign_EquipmentBoundaryVersion_entsoeURIoperation)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentBoundaryVersion.modelDescriptionURI"), &assign_EquipmentBoundaryVersion_modelDescriptionURI)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentBoundaryVersion.namespaceRDF"), &assign_EquipmentBoundaryVersion_namespaceRDF)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentBoundaryVersion.namespaceUML"), &assign_EquipmentBoundaryVersion_namespaceUML)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentBoundaryVersion.shortName"), &assign_EquipmentBoundaryVersion_shortName)); + assign_map.emplace("cim:EquipmentBoundaryVersion.baseUML", &assign_EquipmentBoundaryVersion_baseUML); + assign_map.emplace("cim:EquipmentBoundaryVersion.baseURI", &assign_EquipmentBoundaryVersion_baseURI); + assign_map.emplace("cim:EquipmentBoundaryVersion.date", &assign_EquipmentBoundaryVersion_date); + assign_map.emplace("cim:EquipmentBoundaryVersion.differenceModelURI", &assign_EquipmentBoundaryVersion_differenceModelURI); + assign_map.emplace("cim:EquipmentBoundaryVersion.entsoeUML", &assign_EquipmentBoundaryVersion_entsoeUML); + assign_map.emplace("cim:EquipmentBoundaryVersion.entsoeURIcore", &assign_EquipmentBoundaryVersion_entsoeURIcore); + assign_map.emplace("cim:EquipmentBoundaryVersion.entsoeURIoperation", &assign_EquipmentBoundaryVersion_entsoeURIoperation); + assign_map.emplace("cim:EquipmentBoundaryVersion.modelDescriptionURI", &assign_EquipmentBoundaryVersion_modelDescriptionURI); + assign_map.emplace("cim:EquipmentBoundaryVersion.namespaceRDF", &assign_EquipmentBoundaryVersion_namespaceRDF); + assign_map.emplace("cim:EquipmentBoundaryVersion.namespaceUML", &assign_EquipmentBoundaryVersion_namespaceUML); + assign_map.emplace("cim:EquipmentBoundaryVersion.shortName", &assign_EquipmentBoundaryVersion_shortName); } void EquipmentBoundaryVersion::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/EquipmentBoundaryVersion.hpp b/CGMES_2.4.15_27JAN2020/EquipmentBoundaryVersion.hpp index b7339e8e3..7dce745e6 100644 --- a/CGMES_2.4.15_27JAN2020/EquipmentBoundaryVersion.hpp +++ b/CGMES_2.4.15_27JAN2020/EquipmentBoundaryVersion.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Profile version details. - */ + /** \brief Profile version details. */ class EquipmentBoundaryVersion : public BaseClass { public: @@ -28,17 +26,38 @@ namespace CIMPP EquipmentBoundaryVersion(); ~EquipmentBoundaryVersion() override; - CIMPP::String baseUML; /* Base UML provided by CIM model manager. Default: '' */ - CIMPP::String baseURI; /* Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ - CIMPP::Date date; /* Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ - CIMPP::String differenceModelURI; /* Difference model URI defined by IEC 61970-552. Default: '' */ - CIMPP::String entsoeUML; /* UML provided by ENTSO-E. Default: '' */ - CIMPP::String entsoeURIcore; /* Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/EquipmentBoundary/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ - CIMPP::String entsoeURIoperation; /* Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/EquipmentBoundaryOperation/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ - CIMPP::String modelDescriptionURI; /* Model Description URI defined by IEC 61970-552. Default: '' */ - CIMPP::String namespaceRDF; /* RDF namespace. Default: '' */ - CIMPP::String namespaceUML; /* CIM UML namespace. Default: '' */ - CIMPP::String shortName; /* The short name of the profile used in profile documentation. Default: '' */ + /** \brief Base UML provided by CIM model manager. Default: '' */ + CIMPP::String baseUML; + + /** \brief Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ + CIMPP::String baseURI; + + /** \brief Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ + CIMPP::Date date; + + /** \brief Difference model URI defined by IEC 61970-552. Default: '' */ + CIMPP::String differenceModelURI; + + /** \brief UML provided by ENTSO-E. Default: '' */ + CIMPP::String entsoeUML; + + /** \brief Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/EquipmentBoundary/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ + CIMPP::String entsoeURIcore; + + /** \brief Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/EquipmentBoundaryOperation/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ + CIMPP::String entsoeURIoperation; + + /** \brief Model Description URI defined by IEC 61970-552. Default: '' */ + CIMPP::String modelDescriptionURI; + + /** \brief RDF namespace. Default: '' */ + CIMPP::String namespaceRDF; + + /** \brief CIM UML namespace. Default: '' */ + CIMPP::String namespaceUML; + + /** \brief The short name of the profile used in profile documentation. Default: '' */ + CIMPP::String shortName; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/EquipmentContainer.cpp b/CGMES_2.4.15_27JAN2020/EquipmentContainer.cpp index fc74206b6..d7b51080d 100644 --- a/CGMES_2.4.15_27JAN2020/EquipmentContainer.cpp +++ b/CGMES_2.4.15_27JAN2020/EquipmentContainer.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -EquipmentContainer::EquipmentContainer() {}; -EquipmentContainer::~EquipmentContainer() {}; +EquipmentContainer::EquipmentContainer() {} +EquipmentContainer::~EquipmentContainer() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ EquipmentContainer::getPossibleProfilesForAttributes() const return map; } - - bool assign_Equipment_EquipmentContainer(BaseClass*, BaseClass*); bool assign_EquipmentContainer_Equipments(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,7 +59,6 @@ bool assign_EquipmentContainer_Equipments(BaseClass* BaseClass_ptr1, BaseClass* } - const char EquipmentContainer::debugName[] = "EquipmentContainer"; const char* EquipmentContainer::debugString() const { @@ -70,7 +67,7 @@ const char* EquipmentContainer::debugString() const void EquipmentContainer::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EquipmentContainer"), &EquipmentContainer_factory)); + factory_map.emplace("cim:EquipmentContainer", &EquipmentContainer_factory); } void EquipmentContainer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -79,7 +76,7 @@ void EquipmentContainer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EquipmentContainer.Equipments"), &assign_EquipmentContainer_Equipments)); + assign_map.emplace("cim:EquipmentContainer.Equipments", &assign_EquipmentContainer_Equipments); } void EquipmentContainer::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/EquipmentContainer.hpp b/CGMES_2.4.15_27JAN2020/EquipmentContainer.hpp index ff3a58ec1..5a76e1707 100644 --- a/CGMES_2.4.15_27JAN2020/EquipmentContainer.hpp +++ b/CGMES_2.4.15_27JAN2020/EquipmentContainer.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class Equipment; - /* - A modeling construct to provide a root class for containing equipment. - */ + /** \brief A modeling construct to provide a root class for containing equipment. */ class EquipmentContainer : public ConnectivityNodeContainer { public: @@ -27,7 +25,8 @@ namespace CIMPP EquipmentContainer(); ~EquipmentContainer() override; - std::list Equipments; /* Contained equipment. Default: 0 */ + /** \brief Contained equipment. Default: 0 */ + std::list Equipments; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/EquipmentVersion.cpp b/CGMES_2.4.15_27JAN2020/EquipmentVersion.cpp index 0544887c3..e02b7f229 100644 --- a/CGMES_2.4.15_27JAN2020/EquipmentVersion.cpp +++ b/CGMES_2.4.15_27JAN2020/EquipmentVersion.cpp @@ -8,25 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "Date.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -EquipmentVersion::EquipmentVersion() {}; -EquipmentVersion::~EquipmentVersion() {}; +EquipmentVersion::EquipmentVersion() {} +EquipmentVersion::~EquipmentVersion() {} static const std::list PossibleProfilesForClass = { @@ -66,194 +52,206 @@ EquipmentVersion::getPossibleProfilesForAttributes() const return map; } - -bool assign_EquipmentVersion_baseUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_baseUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_baseURIcore(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_baseURIcore(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseURIcore = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_baseURIoperation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_baseURIoperation(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseURIoperation = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_baseURIshortCircuit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_baseURIshortCircuit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseURIshortCircuit = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_date(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_date(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->date = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_differenceModelURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_differenceModelURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->differenceModelURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_entsoeUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_entsoeUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_entsoeURIcore(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_entsoeURIcore(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeURIcore = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_entsoeURIoperation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_entsoeURIoperation(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeURIoperation = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_entsoeURIshortCircuit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_entsoeURIshortCircuit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeURIshortCircuit = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_modelDescriptionURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_modelDescriptionURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->modelDescriptionURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_namespaceRDF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_namespaceRDF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceRDF = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_namespaceUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_namespaceUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquipmentVersion_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentVersion_shortName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->shortName = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_EquipmentVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseUML; if (!buffer.str().empty()) @@ -267,7 +265,8 @@ bool get_EquipmentVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stringst bool get_EquipmentVersion_baseURIcore(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseURIcore; if (!buffer.str().empty()) @@ -281,7 +280,8 @@ bool get_EquipmentVersion_baseURIcore(const BaseClass* BaseClass_ptr1, std::stri bool get_EquipmentVersion_baseURIoperation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseURIoperation; if (!buffer.str().empty()) @@ -295,7 +295,8 @@ bool get_EquipmentVersion_baseURIoperation(const BaseClass* BaseClass_ptr1, std: bool get_EquipmentVersion_baseURIshortCircuit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseURIshortCircuit; if (!buffer.str().empty()) @@ -309,7 +310,8 @@ bool get_EquipmentVersion_baseURIshortCircuit(const BaseClass* BaseClass_ptr1, s bool get_EquipmentVersion_date(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->date; if (!buffer.str().empty()) @@ -323,7 +325,8 @@ bool get_EquipmentVersion_date(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_EquipmentVersion_differenceModelURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->differenceModelURI; if (!buffer.str().empty()) @@ -337,7 +340,8 @@ bool get_EquipmentVersion_differenceModelURI(const BaseClass* BaseClass_ptr1, st bool get_EquipmentVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeUML; if (!buffer.str().empty()) @@ -351,7 +355,8 @@ bool get_EquipmentVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::string bool get_EquipmentVersion_entsoeURIcore(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeURIcore; if (!buffer.str().empty()) @@ -365,7 +370,8 @@ bool get_EquipmentVersion_entsoeURIcore(const BaseClass* BaseClass_ptr1, std::st bool get_EquipmentVersion_entsoeURIoperation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeURIoperation; if (!buffer.str().empty()) @@ -379,7 +385,8 @@ bool get_EquipmentVersion_entsoeURIoperation(const BaseClass* BaseClass_ptr1, st bool get_EquipmentVersion_entsoeURIshortCircuit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeURIshortCircuit; if (!buffer.str().empty()) @@ -393,7 +400,8 @@ bool get_EquipmentVersion_entsoeURIshortCircuit(const BaseClass* BaseClass_ptr1, bool get_EquipmentVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->modelDescriptionURI; if (!buffer.str().empty()) @@ -407,7 +415,8 @@ bool get_EquipmentVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr1, s bool get_EquipmentVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceRDF; if (!buffer.str().empty()) @@ -421,7 +430,8 @@ bool get_EquipmentVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std::str bool get_EquipmentVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceUML; if (!buffer.str().empty()) @@ -435,7 +445,8 @@ bool get_EquipmentVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std::str bool get_EquipmentVersion_shortName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1)) + const EquipmentVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortName; if (!buffer.str().empty()) @@ -447,8 +458,6 @@ bool get_EquipmentVersion_shortName(const BaseClass* BaseClass_ptr1, std::string return false; } - - const char EquipmentVersion::debugName[] = "EquipmentVersion"; const char* EquipmentVersion::debugString() const { @@ -457,25 +466,25 @@ const char* EquipmentVersion::debugString() const void EquipmentVersion::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EquipmentVersion"), &EquipmentVersion_factory)); + factory_map.emplace("cim:EquipmentVersion", &EquipmentVersion_factory); } void EquipmentVersion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.baseUML"), &assign_EquipmentVersion_baseUML)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.baseURIcore"), &assign_EquipmentVersion_baseURIcore)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.baseURIoperation"), &assign_EquipmentVersion_baseURIoperation)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.baseURIshortCircuit"), &assign_EquipmentVersion_baseURIshortCircuit)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.date"), &assign_EquipmentVersion_date)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.differenceModelURI"), &assign_EquipmentVersion_differenceModelURI)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.entsoeUML"), &assign_EquipmentVersion_entsoeUML)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.entsoeURIcore"), &assign_EquipmentVersion_entsoeURIcore)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.entsoeURIoperation"), &assign_EquipmentVersion_entsoeURIoperation)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.entsoeURIshortCircuit"), &assign_EquipmentVersion_entsoeURIshortCircuit)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.modelDescriptionURI"), &assign_EquipmentVersion_modelDescriptionURI)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.namespaceRDF"), &assign_EquipmentVersion_namespaceRDF)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.namespaceUML"), &assign_EquipmentVersion_namespaceUML)); - assign_map.insert(std::make_pair(std::string("cim:EquipmentVersion.shortName"), &assign_EquipmentVersion_shortName)); + assign_map.emplace("cim:EquipmentVersion.baseUML", &assign_EquipmentVersion_baseUML); + assign_map.emplace("cim:EquipmentVersion.baseURIcore", &assign_EquipmentVersion_baseURIcore); + assign_map.emplace("cim:EquipmentVersion.baseURIoperation", &assign_EquipmentVersion_baseURIoperation); + assign_map.emplace("cim:EquipmentVersion.baseURIshortCircuit", &assign_EquipmentVersion_baseURIshortCircuit); + assign_map.emplace("cim:EquipmentVersion.date", &assign_EquipmentVersion_date); + assign_map.emplace("cim:EquipmentVersion.differenceModelURI", &assign_EquipmentVersion_differenceModelURI); + assign_map.emplace("cim:EquipmentVersion.entsoeUML", &assign_EquipmentVersion_entsoeUML); + assign_map.emplace("cim:EquipmentVersion.entsoeURIcore", &assign_EquipmentVersion_entsoeURIcore); + assign_map.emplace("cim:EquipmentVersion.entsoeURIoperation", &assign_EquipmentVersion_entsoeURIoperation); + assign_map.emplace("cim:EquipmentVersion.entsoeURIshortCircuit", &assign_EquipmentVersion_entsoeURIshortCircuit); + assign_map.emplace("cim:EquipmentVersion.modelDescriptionURI", &assign_EquipmentVersion_modelDescriptionURI); + assign_map.emplace("cim:EquipmentVersion.namespaceRDF", &assign_EquipmentVersion_namespaceRDF); + assign_map.emplace("cim:EquipmentVersion.namespaceUML", &assign_EquipmentVersion_namespaceUML); + assign_map.emplace("cim:EquipmentVersion.shortName", &assign_EquipmentVersion_shortName); } void EquipmentVersion::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/EquipmentVersion.hpp b/CGMES_2.4.15_27JAN2020/EquipmentVersion.hpp index 10e333e51..3de80068d 100644 --- a/CGMES_2.4.15_27JAN2020/EquipmentVersion.hpp +++ b/CGMES_2.4.15_27JAN2020/EquipmentVersion.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Version details. - */ + /** \brief Version details. */ class EquipmentVersion : public BaseClass { public: @@ -28,20 +26,47 @@ namespace CIMPP EquipmentVersion(); ~EquipmentVersion() override; - CIMPP::String baseUML; /* Base UML provided by CIM model manager. Default: '' */ - CIMPP::String baseURIcore; /* Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ - CIMPP::String baseURIoperation; /* Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ - CIMPP::String baseURIshortCircuit; /* Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ - CIMPP::Date date; /* Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ - CIMPP::String differenceModelURI; /* Difference model URI defined by IEC 61970-552. Default: '' */ - CIMPP::String entsoeUML; /* UML provided by ENTSO-E. Default: '' */ - CIMPP::String entsoeURIcore; /* Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/EquipmentCore/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ - CIMPP::String entsoeURIoperation; /* Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/EquipmentOperation/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ - CIMPP::String entsoeURIshortCircuit; /* Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/EquipmentShortCircuit/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ - CIMPP::String modelDescriptionURI; /* Model Description URI defined by IEC 61970-552. Default: '' */ - CIMPP::String namespaceRDF; /* RDF namespace. Default: '' */ - CIMPP::String namespaceUML; /* CIM UML namespace. Default: '' */ - CIMPP::String shortName; /* The short name of the profile used in profile documentation. Default: '' */ + /** \brief Base UML provided by CIM model manager. Default: '' */ + CIMPP::String baseUML; + + /** \brief Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ + CIMPP::String baseURIcore; + + /** \brief Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ + CIMPP::String baseURIoperation; + + /** \brief Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ + CIMPP::String baseURIshortCircuit; + + /** \brief Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ + CIMPP::Date date; + + /** \brief Difference model URI defined by IEC 61970-552. Default: '' */ + CIMPP::String differenceModelURI; + + /** \brief UML provided by ENTSO-E. Default: '' */ + CIMPP::String entsoeUML; + + /** \brief Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/EquipmentCore/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ + CIMPP::String entsoeURIcore; + + /** \brief Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/EquipmentOperation/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ + CIMPP::String entsoeURIoperation; + + /** \brief Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/EquipmentShortCircuit/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ + CIMPP::String entsoeURIshortCircuit; + + /** \brief Model Description URI defined by IEC 61970-552. Default: '' */ + CIMPP::String modelDescriptionURI; + + /** \brief RDF namespace. Default: '' */ + CIMPP::String namespaceRDF; + + /** \brief CIM UML namespace. Default: '' */ + CIMPP::String namespaceUML; + + /** \brief The short name of the profile used in profile documentation. Default: '' */ + CIMPP::String shortName; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/EquivalentBranch.cpp b/CGMES_2.4.15_27JAN2020/EquivalentBranch.cpp index d45842e8d..466b35022 100644 --- a/CGMES_2.4.15_27JAN2020/EquivalentBranch.cpp +++ b/CGMES_2.4.15_27JAN2020/EquivalentBranch.cpp @@ -8,27 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -EquivalentBranch::EquivalentBranch() {}; -EquivalentBranch::~EquivalentBranch() {}; +EquivalentBranch::EquivalentBranch() {} +EquivalentBranch::~EquivalentBranch() {} static const std::list PossibleProfilesForClass = { @@ -70,220 +54,234 @@ EquivalentBranch::getPossibleProfilesForAttributes() const return map; } - -bool assign_EquivalentBranch_negativeR12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_negativeR12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->negativeR12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_negativeR21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_negativeR21(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->negativeR21; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_negativeX12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_negativeX12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->negativeX12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_negativeX21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_negativeX21(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->negativeX21; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_positiveR12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_positiveR12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->positiveR12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_positiveR21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_positiveR21(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->positiveR21; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_positiveX12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_positiveX12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->positiveX12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_positiveX21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_positiveX21(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->positiveX21; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_r21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_r21(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r21; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_x(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_x21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_x21(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x21; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_zeroR12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_zeroR12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->zeroR12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_zeroR21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_zeroR21(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->zeroR21; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_zeroX12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_zeroX12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->zeroX12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_zeroX21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_zeroX21(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->zeroX21; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_EquivalentBranch_negativeR12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->negativeR12; if (!buffer.str().empty()) @@ -297,7 +295,8 @@ bool get_EquivalentBranch_negativeR12(const BaseClass* BaseClass_ptr1, std::stri bool get_EquivalentBranch_negativeR21(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->negativeR21; if (!buffer.str().empty()) @@ -311,7 +310,8 @@ bool get_EquivalentBranch_negativeR21(const BaseClass* BaseClass_ptr1, std::stri bool get_EquivalentBranch_negativeX12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->negativeX12; if (!buffer.str().empty()) @@ -325,7 +325,8 @@ bool get_EquivalentBranch_negativeX12(const BaseClass* BaseClass_ptr1, std::stri bool get_EquivalentBranch_negativeX21(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->negativeX21; if (!buffer.str().empty()) @@ -339,7 +340,8 @@ bool get_EquivalentBranch_negativeX21(const BaseClass* BaseClass_ptr1, std::stri bool get_EquivalentBranch_positiveR12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->positiveR12; if (!buffer.str().empty()) @@ -353,7 +355,8 @@ bool get_EquivalentBranch_positiveR12(const BaseClass* BaseClass_ptr1, std::stri bool get_EquivalentBranch_positiveR21(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->positiveR21; if (!buffer.str().empty()) @@ -367,7 +370,8 @@ bool get_EquivalentBranch_positiveR21(const BaseClass* BaseClass_ptr1, std::stri bool get_EquivalentBranch_positiveX12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->positiveX12; if (!buffer.str().empty()) @@ -381,7 +385,8 @@ bool get_EquivalentBranch_positiveX12(const BaseClass* BaseClass_ptr1, std::stri bool get_EquivalentBranch_positiveX21(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->positiveX21; if (!buffer.str().empty()) @@ -395,7 +400,8 @@ bool get_EquivalentBranch_positiveX21(const BaseClass* BaseClass_ptr1, std::stri bool get_EquivalentBranch_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -409,7 +415,8 @@ bool get_EquivalentBranch_r(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_EquivalentBranch_r21(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r21; if (!buffer.str().empty()) @@ -423,7 +430,8 @@ bool get_EquivalentBranch_r21(const BaseClass* BaseClass_ptr1, std::stringstream bool get_EquivalentBranch_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x; if (!buffer.str().empty()) @@ -437,7 +445,8 @@ bool get_EquivalentBranch_x(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_EquivalentBranch_x21(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x21; if (!buffer.str().empty()) @@ -451,7 +460,8 @@ bool get_EquivalentBranch_x21(const BaseClass* BaseClass_ptr1, std::stringstream bool get_EquivalentBranch_zeroR12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->zeroR12; if (!buffer.str().empty()) @@ -465,7 +475,8 @@ bool get_EquivalentBranch_zeroR12(const BaseClass* BaseClass_ptr1, std::stringst bool get_EquivalentBranch_zeroR21(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->zeroR21; if (!buffer.str().empty()) @@ -479,7 +490,8 @@ bool get_EquivalentBranch_zeroR21(const BaseClass* BaseClass_ptr1, std::stringst bool get_EquivalentBranch_zeroX12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->zeroX12; if (!buffer.str().empty()) @@ -493,7 +505,8 @@ bool get_EquivalentBranch_zeroX12(const BaseClass* BaseClass_ptr1, std::stringst bool get_EquivalentBranch_zeroX21(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->zeroX21; if (!buffer.str().empty()) @@ -505,8 +518,6 @@ bool get_EquivalentBranch_zeroX21(const BaseClass* BaseClass_ptr1, std::stringst return false; } - - const char EquivalentBranch::debugName[] = "EquivalentBranch"; const char* EquivalentBranch::debugString() const { @@ -515,27 +526,27 @@ const char* EquivalentBranch::debugString() const void EquivalentBranch::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EquivalentBranch"), &EquivalentBranch_factory)); + factory_map.emplace("cim:EquivalentBranch", &EquivalentBranch_factory); } void EquivalentBranch::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.negativeR12"), &assign_EquivalentBranch_negativeR12)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.negativeR21"), &assign_EquivalentBranch_negativeR21)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.negativeX12"), &assign_EquivalentBranch_negativeX12)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.negativeX21"), &assign_EquivalentBranch_negativeX21)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.positiveR12"), &assign_EquivalentBranch_positiveR12)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.positiveR21"), &assign_EquivalentBranch_positiveR21)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.positiveX12"), &assign_EquivalentBranch_positiveX12)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.positiveX21"), &assign_EquivalentBranch_positiveX21)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.r"), &assign_EquivalentBranch_r)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.r21"), &assign_EquivalentBranch_r21)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.x"), &assign_EquivalentBranch_x)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.x21"), &assign_EquivalentBranch_x21)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.zeroR12"), &assign_EquivalentBranch_zeroR12)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.zeroR21"), &assign_EquivalentBranch_zeroR21)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.zeroX12"), &assign_EquivalentBranch_zeroX12)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.zeroX21"), &assign_EquivalentBranch_zeroX21)); + assign_map.emplace("cim:EquivalentBranch.negativeR12", &assign_EquivalentBranch_negativeR12); + assign_map.emplace("cim:EquivalentBranch.negativeR21", &assign_EquivalentBranch_negativeR21); + assign_map.emplace("cim:EquivalentBranch.negativeX12", &assign_EquivalentBranch_negativeX12); + assign_map.emplace("cim:EquivalentBranch.negativeX21", &assign_EquivalentBranch_negativeX21); + assign_map.emplace("cim:EquivalentBranch.positiveR12", &assign_EquivalentBranch_positiveR12); + assign_map.emplace("cim:EquivalentBranch.positiveR21", &assign_EquivalentBranch_positiveR21); + assign_map.emplace("cim:EquivalentBranch.positiveX12", &assign_EquivalentBranch_positiveX12); + assign_map.emplace("cim:EquivalentBranch.positiveX21", &assign_EquivalentBranch_positiveX21); + assign_map.emplace("cim:EquivalentBranch.r", &assign_EquivalentBranch_r); + assign_map.emplace("cim:EquivalentBranch.r21", &assign_EquivalentBranch_r21); + assign_map.emplace("cim:EquivalentBranch.x", &assign_EquivalentBranch_x); + assign_map.emplace("cim:EquivalentBranch.x21", &assign_EquivalentBranch_x21); + assign_map.emplace("cim:EquivalentBranch.zeroR12", &assign_EquivalentBranch_zeroR12); + assign_map.emplace("cim:EquivalentBranch.zeroR21", &assign_EquivalentBranch_zeroR21); + assign_map.emplace("cim:EquivalentBranch.zeroX12", &assign_EquivalentBranch_zeroX12); + assign_map.emplace("cim:EquivalentBranch.zeroX21", &assign_EquivalentBranch_zeroX21); } void EquivalentBranch::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/EquivalentBranch.hpp b/CGMES_2.4.15_27JAN2020/EquivalentBranch.hpp index d9be97c39..5147c3fd5 100644 --- a/CGMES_2.4.15_27JAN2020/EquivalentBranch.hpp +++ b/CGMES_2.4.15_27JAN2020/EquivalentBranch.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents equivalent branches. - */ + /** \brief The class represents equivalent branches. */ class EquivalentBranch : public EquivalentEquipment { public: @@ -28,22 +26,53 @@ namespace CIMPP EquivalentBranch(); ~EquivalentBranch() override; - CIMPP::Resistance negativeR12; /* Negative sequence series resistance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909 EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ - CIMPP::Resistance negativeR21; /* Negative sequence series resistance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909 EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ - CIMPP::Reactance negativeX12; /* Negative sequence series reactance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ - CIMPP::Reactance negativeX21; /* Negative sequence series reactance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909. Usage: EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ - CIMPP::Resistance positiveR12; /* Positive sequence series resistance from terminal sequence 1 to terminal sequence 2 . Used for short circuit data exchange according to IEC 60909. EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Resistance positiveR21; /* Positive sequence series resistance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909 EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ - CIMPP::Reactance positiveX12; /* Positive sequence series reactance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ - CIMPP::Reactance positiveX21; /* Positive sequence series reactance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ - CIMPP::Resistance r; /* Positive sequence series resistance of the reduced branch. Default: nullptr */ - CIMPP::Resistance r21; /* Resistance from terminal sequence 2 to terminal sequence 1 .Used for steady state power flow. This attribute is optional and represent unbalanced network such as off-nominal phase shifter. If only EquivalentBranch.r is given, then EquivalentBranch.r21 is assumed equal to EquivalentBranch.r. Usage rule : EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Reactance x; /* Positive sequence series reactance of the reduced branch. Default: nullptr */ - CIMPP::Reactance x21; /* Reactance from terminal sequence 2 to terminal sequence 1 .Used for steady state power flow. This attribute is optional and represent unbalanced network such as off-nominal phase shifter. If only EquivalentBranch.x is given, then EquivalentBranch.x21 is assumed equal to EquivalentBranch.x. Usage rule : EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Resistance zeroR12; /* Zero sequence series resistance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909 EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ - CIMPP::Resistance zeroR21; /* Zero sequence series resistance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ - CIMPP::Reactance zeroX12; /* Zero sequence series reactance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ - CIMPP::Reactance zeroX21; /* Zero sequence series reactance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ + /** \brief Negative sequence series resistance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909 EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ + CIMPP::Resistance negativeR12; + + /** \brief Negative sequence series resistance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909 EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ + CIMPP::Resistance negativeR21; + + /** \brief Negative sequence series reactance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ + CIMPP::Reactance negativeX12; + + /** \brief Negative sequence series reactance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909. Usage: EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ + CIMPP::Reactance negativeX21; + + /** \brief Positive sequence series resistance from terminal sequence 1 to terminal sequence 2 . Used for short circuit data exchange according to IEC 60909. EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Resistance positiveR12; + + /** \brief Positive sequence series resistance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909 EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ + CIMPP::Resistance positiveR21; + + /** \brief Positive sequence series reactance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ + CIMPP::Reactance positiveX12; + + /** \brief Positive sequence series reactance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ + CIMPP::Reactance positiveX21; + + /** \brief Positive sequence series resistance of the reduced branch. Default: nullptr */ + CIMPP::Resistance r; + + /** \brief Resistance from terminal sequence 2 to terminal sequence 1 .Used for steady state power flow. This attribute is optional and represent unbalanced network such as off-nominal phase shifter. If only EquivalentBranch.r is given, then EquivalentBranch.r21 is assumed equal to EquivalentBranch.r. Usage rule : EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Resistance r21; + + /** \brief Positive sequence series reactance of the reduced branch. Default: nullptr */ + CIMPP::Reactance x; + + /** \brief Reactance from terminal sequence 2 to terminal sequence 1 .Used for steady state power flow. This attribute is optional and represent unbalanced network such as off-nominal phase shifter. If only EquivalentBranch.x is given, then EquivalentBranch.x21 is assumed equal to EquivalentBranch.x. Usage rule : EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Reactance x21; + + /** \brief Zero sequence series resistance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909 EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ + CIMPP::Resistance zeroR12; + + /** \brief Zero sequence series resistance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ + CIMPP::Resistance zeroR21; + + /** \brief Zero sequence series reactance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ + CIMPP::Reactance zeroX12; + + /** \brief Zero sequence series reactance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */ + CIMPP::Reactance zeroX21; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/EquivalentEquipment.cpp b/CGMES_2.4.15_27JAN2020/EquivalentEquipment.cpp index 9d6f69531..a0b317564 100644 --- a/CGMES_2.4.15_27JAN2020/EquivalentEquipment.cpp +++ b/CGMES_2.4.15_27JAN2020/EquivalentEquipment.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -EquivalentEquipment::EquivalentEquipment() : EquivalentNetwork(nullptr) {}; -EquivalentEquipment::~EquivalentEquipment() {}; +EquivalentEquipment::EquivalentEquipment() : EquivalentNetwork(nullptr) {} +EquivalentEquipment::~EquivalentEquipment() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ EquivalentEquipment::getPossibleProfilesForAttributes() const return map; } - - bool assign_EquivalentNetwork_EquivalentEquipments(BaseClass*, BaseClass*); bool assign_EquivalentEquipment_EquivalentNetwork(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,10 +58,10 @@ bool assign_EquivalentEquipment_EquivalentNetwork(BaseClass* BaseClass_ptr1, Bas return false; } - bool get_EquivalentEquipment_EquivalentNetwork(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const EquivalentEquipment* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentEquipment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->EquivalentNetwork != 0) { @@ -74,7 +72,6 @@ bool get_EquivalentEquipment_EquivalentNetwork(const BaseClass* BaseClass_ptr1, return false; } - const char EquivalentEquipment::debugName[] = "EquivalentEquipment"; const char* EquivalentEquipment::debugString() const { @@ -83,7 +80,7 @@ const char* EquivalentEquipment::debugString() const void EquivalentEquipment::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EquivalentEquipment"), &EquivalentEquipment_factory)); + factory_map.emplace("cim:EquivalentEquipment", &EquivalentEquipment_factory); } void EquivalentEquipment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -92,7 +89,7 @@ void EquivalentEquipment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EquivalentEquipment.EquivalentNetwork"), &assign_EquivalentEquipment_EquivalentNetwork)); + assign_map.emplace("cim:EquivalentEquipment.EquivalentNetwork", &assign_EquivalentEquipment_EquivalentNetwork); } void EquivalentEquipment::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/EquivalentEquipment.hpp b/CGMES_2.4.15_27JAN2020/EquivalentEquipment.hpp index 7d0b8a0f3..3e375293f 100644 --- a/CGMES_2.4.15_27JAN2020/EquivalentEquipment.hpp +++ b/CGMES_2.4.15_27JAN2020/EquivalentEquipment.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class EquivalentNetwork; - /* - The class represents equivalent objects that are the result of a network reduction. The class is the base for equivalent objects of different types. - */ + /** \brief The class represents equivalent objects that are the result of a network reduction. The class is the base for equivalent objects of different types. */ class EquivalentEquipment : public ConductingEquipment { public: @@ -27,7 +25,8 @@ namespace CIMPP EquivalentEquipment(); ~EquivalentEquipment() override; - CIMPP::EquivalentNetwork* EquivalentNetwork; /* The associated reduced equivalents. Default: 0 */ + /** \brief The associated reduced equivalents. Default: 0 */ + CIMPP::EquivalentNetwork* EquivalentNetwork; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/EquivalentInjection.cpp b/CGMES_2.4.15_27JAN2020/EquivalentInjection.cpp index 3cd0ceefc..5b0b543b1 100644 --- a/CGMES_2.4.15_27JAN2020/EquivalentInjection.cpp +++ b/CGMES_2.4.15_27JAN2020/EquivalentInjection.cpp @@ -9,26 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ReactiveCapabilityCurve.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Voltage.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -EquivalentInjection::EquivalentInjection() : ReactiveCapabilityCurve(nullptr) {}; -EquivalentInjection::~EquivalentInjection() {}; +EquivalentInjection::EquivalentInjection() : ReactiveCapabilityCurve(nullptr) {} +EquivalentInjection::~EquivalentInjection() {} static const std::list PossibleProfilesForClass = { @@ -71,223 +56,251 @@ EquivalentInjection::getPossibleProfilesForAttributes() const return map; } +bool assign_ReactiveCapabilityCurve_EquivalentInjection(BaseClass*, BaseClass*); +bool assign_EquivalentInjection_ReactiveCapabilityCurve(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + ReactiveCapabilityCurve* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ReactiveCapabilityCurve != element2) + { + element->ReactiveCapabilityCurve = element2; + return assign_ReactiveCapabilityCurve_EquivalentInjection(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_EquivalentInjection_maxP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_maxP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_maxQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_maxQ(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxQ; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_minP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_minP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_minQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_minQ(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minQ; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_p(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_r0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_r2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_r2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_regulationCapability(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_regulationCapability(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->regulationCapability; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_regulationStatus(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_regulationStatus(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->regulationStatus; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_regulationTarget(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_regulationTarget(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->regulationTarget; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_x(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_x0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_x2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_x2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_ReactiveCapabilityCurve_EquivalentInjection(BaseClass*, BaseClass*); -bool assign_EquivalentInjection_ReactiveCapabilityCurve(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_EquivalentInjection_ReactiveCapabilityCurve(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); - ReactiveCapabilityCurve* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->ReactiveCapabilityCurve != element2) + if (element->ReactiveCapabilityCurve != 0) { - element->ReactiveCapabilityCurve = element2; - return assign_ReactiveCapabilityCurve_EquivalentInjection(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->ReactiveCapabilityCurve); + return true; } - return true; } return false; } bool get_EquivalentInjection_maxP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxP; if (!buffer.str().empty()) @@ -301,7 +314,8 @@ bool get_EquivalentInjection_maxP(const BaseClass* BaseClass_ptr1, std::stringst bool get_EquivalentInjection_maxQ(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxQ; if (!buffer.str().empty()) @@ -315,7 +329,8 @@ bool get_EquivalentInjection_maxQ(const BaseClass* BaseClass_ptr1, std::stringst bool get_EquivalentInjection_minP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minP; if (!buffer.str().empty()) @@ -329,7 +344,8 @@ bool get_EquivalentInjection_minP(const BaseClass* BaseClass_ptr1, std::stringst bool get_EquivalentInjection_minQ(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minQ; if (!buffer.str().empty()) @@ -343,7 +359,8 @@ bool get_EquivalentInjection_minQ(const BaseClass* BaseClass_ptr1, std::stringst bool get_EquivalentInjection_p(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p; if (!buffer.str().empty()) @@ -357,7 +374,8 @@ bool get_EquivalentInjection_p(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_EquivalentInjection_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q; if (!buffer.str().empty()) @@ -371,7 +389,8 @@ bool get_EquivalentInjection_q(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_EquivalentInjection_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -385,7 +404,8 @@ bool get_EquivalentInjection_r(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_EquivalentInjection_r0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r0; if (!buffer.str().empty()) @@ -399,7 +419,8 @@ bool get_EquivalentInjection_r0(const BaseClass* BaseClass_ptr1, std::stringstre bool get_EquivalentInjection_r2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r2; if (!buffer.str().empty()) @@ -413,7 +434,8 @@ bool get_EquivalentInjection_r2(const BaseClass* BaseClass_ptr1, std::stringstre bool get_EquivalentInjection_regulationCapability(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->regulationCapability; if (!buffer.str().empty()) @@ -427,7 +449,8 @@ bool get_EquivalentInjection_regulationCapability(const BaseClass* BaseClass_ptr bool get_EquivalentInjection_regulationStatus(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->regulationStatus; if (!buffer.str().empty()) @@ -441,7 +464,8 @@ bool get_EquivalentInjection_regulationStatus(const BaseClass* BaseClass_ptr1, s bool get_EquivalentInjection_regulationTarget(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->regulationTarget; if (!buffer.str().empty()) @@ -455,7 +479,8 @@ bool get_EquivalentInjection_regulationTarget(const BaseClass* BaseClass_ptr1, s bool get_EquivalentInjection_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x; if (!buffer.str().empty()) @@ -469,7 +494,8 @@ bool get_EquivalentInjection_x(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_EquivalentInjection_x0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x0; if (!buffer.str().empty()) @@ -483,7 +509,8 @@ bool get_EquivalentInjection_x0(const BaseClass* BaseClass_ptr1, std::stringstre bool get_EquivalentInjection_x2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x2; if (!buffer.str().empty()) @@ -495,21 +522,6 @@ bool get_EquivalentInjection_x2(const BaseClass* BaseClass_ptr1, std::stringstre return false; } - -bool get_EquivalentInjection_ReactiveCapabilityCurve(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->ReactiveCapabilityCurve != 0) - { - BaseClass_list.push_back(element->ReactiveCapabilityCurve); - return true; - } - } - return false; -} - - const char EquivalentInjection::debugName[] = "EquivalentInjection"; const char* EquivalentInjection::debugString() const { @@ -518,31 +530,31 @@ const char* EquivalentInjection::debugString() const void EquivalentInjection::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EquivalentInjection"), &EquivalentInjection_factory)); + factory_map.emplace("cim:EquivalentInjection", &EquivalentInjection_factory); } void EquivalentInjection::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.maxP"), &assign_EquivalentInjection_maxP)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.maxQ"), &assign_EquivalentInjection_maxQ)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.minP"), &assign_EquivalentInjection_minP)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.minQ"), &assign_EquivalentInjection_minQ)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.p"), &assign_EquivalentInjection_p)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.q"), &assign_EquivalentInjection_q)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.r"), &assign_EquivalentInjection_r)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.r0"), &assign_EquivalentInjection_r0)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.r2"), &assign_EquivalentInjection_r2)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.regulationCapability"), &assign_EquivalentInjection_regulationCapability)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.regulationStatus"), &assign_EquivalentInjection_regulationStatus)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.regulationTarget"), &assign_EquivalentInjection_regulationTarget)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.x"), &assign_EquivalentInjection_x)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.x0"), &assign_EquivalentInjection_x0)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.x2"), &assign_EquivalentInjection_x2)); + assign_map.emplace("cim:EquivalentInjection.maxP", &assign_EquivalentInjection_maxP); + assign_map.emplace("cim:EquivalentInjection.maxQ", &assign_EquivalentInjection_maxQ); + assign_map.emplace("cim:EquivalentInjection.minP", &assign_EquivalentInjection_minP); + assign_map.emplace("cim:EquivalentInjection.minQ", &assign_EquivalentInjection_minQ); + assign_map.emplace("cim:EquivalentInjection.p", &assign_EquivalentInjection_p); + assign_map.emplace("cim:EquivalentInjection.q", &assign_EquivalentInjection_q); + assign_map.emplace("cim:EquivalentInjection.r", &assign_EquivalentInjection_r); + assign_map.emplace("cim:EquivalentInjection.r0", &assign_EquivalentInjection_r0); + assign_map.emplace("cim:EquivalentInjection.r2", &assign_EquivalentInjection_r2); + assign_map.emplace("cim:EquivalentInjection.regulationCapability", &assign_EquivalentInjection_regulationCapability); + assign_map.emplace("cim:EquivalentInjection.regulationStatus", &assign_EquivalentInjection_regulationStatus); + assign_map.emplace("cim:EquivalentInjection.regulationTarget", &assign_EquivalentInjection_regulationTarget); + assign_map.emplace("cim:EquivalentInjection.x", &assign_EquivalentInjection_x); + assign_map.emplace("cim:EquivalentInjection.x0", &assign_EquivalentInjection_x0); + assign_map.emplace("cim:EquivalentInjection.x2", &assign_EquivalentInjection_x2); } void EquivalentInjection::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.ReactiveCapabilityCurve"), &assign_EquivalentInjection_ReactiveCapabilityCurve)); + assign_map.emplace("cim:EquivalentInjection.ReactiveCapabilityCurve", &assign_EquivalentInjection_ReactiveCapabilityCurve); } void EquivalentInjection::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/EquivalentInjection.hpp b/CGMES_2.4.15_27JAN2020/EquivalentInjection.hpp index 3b073046f..52d59c58c 100644 --- a/CGMES_2.4.15_27JAN2020/EquivalentInjection.hpp +++ b/CGMES_2.4.15_27JAN2020/EquivalentInjection.hpp @@ -23,9 +23,7 @@ namespace CIMPP { class ReactiveCapabilityCurve; - /* - This class represents equivalent injections (generation or load). Voltage regulation is allowed only at the point of connection. - */ + /** \brief This class represents equivalent injections (generation or load). Voltage regulation is allowed only at the point of connection. */ class EquivalentInjection : public EquivalentEquipment { public: @@ -33,22 +31,53 @@ namespace CIMPP EquivalentInjection(); ~EquivalentInjection() override; - CIMPP::ReactiveCapabilityCurve* ReactiveCapabilityCurve; /* The equivalent injection using this reactive capability curve. Default: 0 */ - CIMPP::ActivePower maxP; /* Maximum active power of the injection. Default: nullptr */ - CIMPP::ReactivePower maxQ; /* Used for modeling of infeed for load flow exchange. Not used for short circuit modeling. If maxQ and minQ are not used ReactiveCapabilityCurve can be used. Default: nullptr */ - CIMPP::ActivePower minP; /* Minimum active power of the injection. Default: nullptr */ - CIMPP::ReactivePower minQ; /* Used for modeling of infeed for load flow exchange. Not used for short circuit modeling. If maxQ and minQ are not used ReactiveCapabilityCurve can be used. Default: nullptr */ - CIMPP::ActivePower p; /* Equivalent active power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ - CIMPP::ReactivePower q; /* Equivalent reactive power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ - CIMPP::Resistance r; /* Positive sequence resistance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Resistance r0; /* Zero sequence resistance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Resistance r2; /* Negative sequence resistance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Boolean regulationCapability; /* Specifies whether or not the EquivalentInjection has the capability to regulate the local voltage. Default: false */ - CIMPP::Boolean regulationStatus; /* Specifies the default regulation status of the EquivalentInjection. True is regulating. False is not regulating. Default: false */ - CIMPP::Voltage regulationTarget; /* The target voltage for voltage regulation. Default: nullptr */ - CIMPP::Reactance x; /* Positive sequence reactance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Reactance x0; /* Zero sequence reactance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Reactance x2; /* Negative sequence reactance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ + /** \brief The equivalent injection using this reactive capability curve. Default: 0 */ + CIMPP::ReactiveCapabilityCurve* ReactiveCapabilityCurve; + + /** \brief Maximum active power of the injection. Default: nullptr */ + CIMPP::ActivePower maxP; + + /** \brief Used for modeling of infeed for load flow exchange. Not used for short circuit modeling. If maxQ and minQ are not used ReactiveCapabilityCurve can be used. Default: nullptr */ + CIMPP::ReactivePower maxQ; + + /** \brief Minimum active power of the injection. Default: nullptr */ + CIMPP::ActivePower minP; + + /** \brief Used for modeling of infeed for load flow exchange. Not used for short circuit modeling. If maxQ and minQ are not used ReactiveCapabilityCurve can be used. Default: nullptr */ + CIMPP::ReactivePower minQ; + + /** \brief Equivalent active power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ + CIMPP::ActivePower p; + + /** \brief Equivalent reactive power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ + CIMPP::ReactivePower q; + + /** \brief Positive sequence resistance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Resistance r; + + /** \brief Zero sequence resistance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Resistance r0; + + /** \brief Negative sequence resistance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Resistance r2; + + /** \brief Specifies whether or not the EquivalentInjection has the capability to regulate the local voltage. Default: false */ + CIMPP::Boolean regulationCapability; + + /** \brief Specifies the default regulation status of the EquivalentInjection. True is regulating. False is not regulating. Default: false */ + CIMPP::Boolean regulationStatus; + + /** \brief The target voltage for voltage regulation. Default: nullptr */ + CIMPP::Voltage regulationTarget; + + /** \brief Positive sequence reactance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Reactance x; + + /** \brief Zero sequence reactance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Reactance x0; + + /** \brief Negative sequence reactance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Reactance x2; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/EquivalentNetwork.cpp b/CGMES_2.4.15_27JAN2020/EquivalentNetwork.cpp index f08fd6d02..81b5286cd 100644 --- a/CGMES_2.4.15_27JAN2020/EquivalentNetwork.cpp +++ b/CGMES_2.4.15_27JAN2020/EquivalentNetwork.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -EquivalentNetwork::EquivalentNetwork() {}; -EquivalentNetwork::~EquivalentNetwork() {}; +EquivalentNetwork::EquivalentNetwork() {} +EquivalentNetwork::~EquivalentNetwork() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ EquivalentNetwork::getPossibleProfilesForAttributes() const return map; } - - bool assign_EquivalentEquipment_EquivalentNetwork(BaseClass*, BaseClass*); bool assign_EquivalentNetwork_EquivalentEquipments(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_EquivalentNetwork_EquivalentEquipments(BaseClass* BaseClass_ptr1, Ba } - const char EquivalentNetwork::debugName[] = "EquivalentNetwork"; const char* EquivalentNetwork::debugString() const { @@ -69,7 +66,7 @@ const char* EquivalentNetwork::debugString() const void EquivalentNetwork::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EquivalentNetwork"), &EquivalentNetwork_factory)); + factory_map.emplace("cim:EquivalentNetwork", &EquivalentNetwork_factory); } void EquivalentNetwork::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void EquivalentNetwork::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EquivalentNetwork.EquivalentEquipments"), &assign_EquivalentNetwork_EquivalentEquipments)); + assign_map.emplace("cim:EquivalentNetwork.EquivalentEquipments", &assign_EquivalentNetwork_EquivalentEquipments); } void EquivalentNetwork::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/EquivalentNetwork.hpp b/CGMES_2.4.15_27JAN2020/EquivalentNetwork.hpp index 369a69cd0..280054dc0 100644 --- a/CGMES_2.4.15_27JAN2020/EquivalentNetwork.hpp +++ b/CGMES_2.4.15_27JAN2020/EquivalentNetwork.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class EquivalentEquipment; - /* - A class that represents an external meshed network that has been reduced to an electrically equivalent model. The ConnectivityNodes contained in the equivalent are intended to reflect internal nodes of the equivalent. The boundary Connectivity nodes where the equivalent connects outside itself are NOT contained by the equivalent. - */ + /** \brief A class that represents an external meshed network that has been reduced to an electrically equivalent model. The ConnectivityNodes contained in the equivalent are intended to reflect internal nodes of the equivalent. The boundary Connectivity nodes where the equivalent connects outside itself are NOT contained by the equivalent. */ class EquivalentNetwork : public ConnectivityNodeContainer { public: @@ -27,7 +25,8 @@ namespace CIMPP EquivalentNetwork(); ~EquivalentNetwork() override; - std::list EquivalentEquipments; /* The equivalent where the reduced model belongs. Default: 0 */ + /** \brief The equivalent where the reduced model belongs. Default: 0 */ + std::list EquivalentEquipments; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/EquivalentShunt.cpp b/CGMES_2.4.15_27JAN2020/EquivalentShunt.cpp index 62dafdf33..3bee41ffb 100644 --- a/CGMES_2.4.15_27JAN2020/EquivalentShunt.cpp +++ b/CGMES_2.4.15_27JAN2020/EquivalentShunt.cpp @@ -8,13 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Susceptance.hpp" -#include "Conductance.hpp" using namespace CIMPP; -EquivalentShunt::EquivalentShunt() {}; -EquivalentShunt::~EquivalentShunt() {}; +EquivalentShunt::EquivalentShunt() {} +EquivalentShunt::~EquivalentShunt() {} static const std::list PossibleProfilesForClass = { @@ -42,38 +40,38 @@ EquivalentShunt::getPossibleProfilesForAttributes() const return map; } - -bool assign_EquivalentShunt_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentShunt_b(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentShunt* element = dynamic_cast(BaseClass_ptr1)) + EquivalentShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentShunt_g(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentShunt_g(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentShunt* element = dynamic_cast(BaseClass_ptr1)) + EquivalentShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_EquivalentShunt_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentShunt* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b; if (!buffer.str().empty()) @@ -87,7 +85,8 @@ bool get_EquivalentShunt_b(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_EquivalentShunt_g(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentShunt* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g; if (!buffer.str().empty()) @@ -99,8 +98,6 @@ bool get_EquivalentShunt_g(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char EquivalentShunt::debugName[] = "EquivalentShunt"; const char* EquivalentShunt::debugString() const { @@ -109,13 +106,13 @@ const char* EquivalentShunt::debugString() const void EquivalentShunt::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EquivalentShunt"), &EquivalentShunt_factory)); + factory_map.emplace("cim:EquivalentShunt", &EquivalentShunt_factory); } void EquivalentShunt::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EquivalentShunt.b"), &assign_EquivalentShunt_b)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentShunt.g"), &assign_EquivalentShunt_g)); + assign_map.emplace("cim:EquivalentShunt.b", &assign_EquivalentShunt_b); + assign_map.emplace("cim:EquivalentShunt.g", &assign_EquivalentShunt_g); } void EquivalentShunt::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/EquivalentShunt.hpp b/CGMES_2.4.15_27JAN2020/EquivalentShunt.hpp index 4a5204e86..4cd995dcf 100644 --- a/CGMES_2.4.15_27JAN2020/EquivalentShunt.hpp +++ b/CGMES_2.4.15_27JAN2020/EquivalentShunt.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents equivalent shunts. - */ + /** \brief The class represents equivalent shunts. */ class EquivalentShunt : public EquivalentEquipment { public: @@ -28,8 +26,11 @@ namespace CIMPP EquivalentShunt(); ~EquivalentShunt() override; - CIMPP::Susceptance b; /* Positive sequence shunt susceptance. Default: nullptr */ - CIMPP::Conductance g; /* Positive sequence shunt conductance. Default: nullptr */ + /** \brief Positive sequence shunt susceptance. Default: nullptr */ + CIMPP::Susceptance b; + + /** \brief Positive sequence shunt conductance. Default: nullptr */ + CIMPP::Conductance g; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcAC1A.cpp b/CGMES_2.4.15_27JAN2020/ExcAC1A.cpp index 60fb20902..d5bbdc7a5 100644 --- a/CGMES_2.4.15_27JAN2020/ExcAC1A.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcAC1A.cpp @@ -8,33 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAC1A::ExcAC1A() {}; -ExcAC1A::~ExcAC1A() {}; +ExcAC1A::ExcAC1A() {} +ExcAC1A::~ExcAC1A() {} static const std::list PossibleProfilesForClass = { @@ -82,298 +60,318 @@ ExcAC1A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAC1A_hvlvgates(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_hvlvgates(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->hvlvgates; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_kf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_kf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_kf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_kf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAC1A_hvlvgates(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hvlvgates; if (!buffer.str().empty()) @@ -387,7 +385,8 @@ bool get_ExcAC1A_hvlvgates(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcAC1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -401,7 +400,8 @@ bool get_ExcAC1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -415,7 +415,8 @@ bool get_ExcAC1A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -429,7 +430,8 @@ bool get_ExcAC1A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -443,7 +445,8 @@ bool get_ExcAC1A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -457,7 +460,8 @@ bool get_ExcAC1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_kf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf1; if (!buffer.str().empty()) @@ -471,7 +475,8 @@ bool get_ExcAC1A_kf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf2; if (!buffer.str().empty()) @@ -485,7 +490,8 @@ bool get_ExcAC1A_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -499,7 +505,8 @@ bool get_ExcAC1A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -513,7 +520,8 @@ bool get_ExcAC1A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC1A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -527,7 +535,8 @@ bool get_ExcAC1A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -541,7 +550,8 @@ bool get_ExcAC1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -555,7 +565,8 @@ bool get_ExcAC1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -569,7 +580,8 @@ bool get_ExcAC1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -583,7 +595,8 @@ bool get_ExcAC1A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -597,7 +610,8 @@ bool get_ExcAC1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -611,7 +625,8 @@ bool get_ExcAC1A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC1A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -625,7 +640,8 @@ bool get_ExcAC1A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC1A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -639,7 +655,8 @@ bool get_ExcAC1A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -653,7 +670,8 @@ bool get_ExcAC1A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -667,7 +685,8 @@ bool get_ExcAC1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -679,8 +698,6 @@ bool get_ExcAC1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcAC1A::debugName[] = "ExcAC1A"; const char* ExcAC1A::debugString() const { @@ -689,33 +706,33 @@ const char* ExcAC1A::debugString() const void ExcAC1A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAC1A"), &ExcAC1A_factory)); + factory_map.emplace("cim:ExcAC1A", &ExcAC1A_factory); } void ExcAC1A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.hvlvgates"), &assign_ExcAC1A_hvlvgates)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.ka"), &assign_ExcAC1A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.kc"), &assign_ExcAC1A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.kd"), &assign_ExcAC1A_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.ke"), &assign_ExcAC1A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.kf"), &assign_ExcAC1A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.kf1"), &assign_ExcAC1A_kf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.kf2"), &assign_ExcAC1A_kf2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.ks"), &assign_ExcAC1A_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.seve1"), &assign_ExcAC1A_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.seve2"), &assign_ExcAC1A_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.ta"), &assign_ExcAC1A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.tb"), &assign_ExcAC1A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.tc"), &assign_ExcAC1A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.te"), &assign_ExcAC1A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.tf"), &assign_ExcAC1A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.vamax"), &assign_ExcAC1A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.vamin"), &assign_ExcAC1A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.ve1"), &assign_ExcAC1A_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.ve2"), &assign_ExcAC1A_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.vrmax"), &assign_ExcAC1A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.vrmin"), &assign_ExcAC1A_vrmin)); + assign_map.emplace("cim:ExcAC1A.hvlvgates", &assign_ExcAC1A_hvlvgates); + assign_map.emplace("cim:ExcAC1A.ka", &assign_ExcAC1A_ka); + assign_map.emplace("cim:ExcAC1A.kc", &assign_ExcAC1A_kc); + assign_map.emplace("cim:ExcAC1A.kd", &assign_ExcAC1A_kd); + assign_map.emplace("cim:ExcAC1A.ke", &assign_ExcAC1A_ke); + assign_map.emplace("cim:ExcAC1A.kf", &assign_ExcAC1A_kf); + assign_map.emplace("cim:ExcAC1A.kf1", &assign_ExcAC1A_kf1); + assign_map.emplace("cim:ExcAC1A.kf2", &assign_ExcAC1A_kf2); + assign_map.emplace("cim:ExcAC1A.ks", &assign_ExcAC1A_ks); + assign_map.emplace("cim:ExcAC1A.seve1", &assign_ExcAC1A_seve1); + assign_map.emplace("cim:ExcAC1A.seve2", &assign_ExcAC1A_seve2); + assign_map.emplace("cim:ExcAC1A.ta", &assign_ExcAC1A_ta); + assign_map.emplace("cim:ExcAC1A.tb", &assign_ExcAC1A_tb); + assign_map.emplace("cim:ExcAC1A.tc", &assign_ExcAC1A_tc); + assign_map.emplace("cim:ExcAC1A.te", &assign_ExcAC1A_te); + assign_map.emplace("cim:ExcAC1A.tf", &assign_ExcAC1A_tf); + assign_map.emplace("cim:ExcAC1A.vamax", &assign_ExcAC1A_vamax); + assign_map.emplace("cim:ExcAC1A.vamin", &assign_ExcAC1A_vamin); + assign_map.emplace("cim:ExcAC1A.ve1", &assign_ExcAC1A_ve1); + assign_map.emplace("cim:ExcAC1A.ve2", &assign_ExcAC1A_ve2); + assign_map.emplace("cim:ExcAC1A.vrmax", &assign_ExcAC1A_vrmax); + assign_map.emplace("cim:ExcAC1A.vrmin", &assign_ExcAC1A_vrmin); } void ExcAC1A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcAC1A.hpp b/CGMES_2.4.15_27JAN2020/ExcAC1A.hpp index bdaece7c8..3a0fca2c2 100644 --- a/CGMES_2.4.15_27JAN2020/ExcAC1A.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcAC1A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE AC1A alternator-supplied rectifier excitation system with different rate feedback source. - */ + /** \brief Modified IEEE AC1A alternator-supplied rectifier excitation system with different rate feedback source. */ class ExcAC1A : public ExcitationSystemDynamics { public: @@ -30,28 +28,71 @@ namespace CIMPP ExcAC1A(); ~ExcAC1A() override; - CIMPP::Boolean hvlvgates; /* Indicates if both HV gate and LV gate are active (HVLVgates). true = gates are used false = gates are not used. Typical Value = true. Default: false */ - CIMPP::PU ka; /* Voltage regulator gain (Ka). Typical Value = 400. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (Kd). Typical Value = 0.38. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (Kf). Typical Value = 0.03. Default: nullptr */ - CIMPP::PU kf1; /* Coefficient to allow different usage of the model (Kf1). Typical Value = 0. Default: nullptr */ - CIMPP::PU kf2; /* Coefficient to allow different usage of the model (Kf2). Typical Value = 1. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, Ve1, back of commutating reactance (Se[Ve1]). Typical Value = 0.1. Default: nullptr */ - CIMPP::Simple_Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, Ve2, back of commutating reactance (Se[Ve2]). Typical Value = 0.03. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (Ta). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 0.8. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (Tf). Typical Value = 1. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (V). Typical Value = 14.5. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (V). Typical Value = -14.5. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve1). Typical Value = 4.18. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve2). Typical Value = 3.14. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator outputs (Vrmax). Typical Value = 6.03. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator outputs (Rrmin). Typical Value = -5.43. Default: nullptr */ + /** \brief Indicates if both HV gate and LV gate are active (HVLVgates). true = gates are used false = gates are not used. Typical Value = true. Default: false */ + CIMPP::Boolean hvlvgates; + + /** \brief Voltage regulator gain (Ka). Typical Value = 400. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (Kd). Typical Value = 0.38. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (Kf). Typical Value = 0.03. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Coefficient to allow different usage of the model (Kf1). Typical Value = 0. Default: nullptr */ + CIMPP::PU kf1; + + /** \brief Coefficient to allow different usage of the model (Kf2). Typical Value = 1. Default: nullptr */ + CIMPP::PU kf2; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Ve1, back of commutating reactance (Se[Ve1]). Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Ve2, back of commutating reactance (Se[Ve2]). Typical Value = 0.03. Default: nullptr */ + CIMPP::Simple_Float seve2; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 0.8. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (Tf). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage regulator output (V). Typical Value = 14.5. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -14.5. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve1). Typical Value = 4.18. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve2). Typical Value = 3.14. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Maximum voltage regulator outputs (Vrmax). Typical Value = 6.03. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator outputs (Rrmin). Typical Value = -5.43. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcAC2A.cpp b/CGMES_2.4.15_27JAN2020/ExcAC2A.cpp index 6b654a284..733be71b2 100644 --- a/CGMES_2.4.15_27JAN2020/ExcAC2A.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcAC2A.cpp @@ -8,39 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAC2A::ExcAC2A() {}; -ExcAC2A::~ExcAC2A() {}; +ExcAC2A::ExcAC2A() {} +ExcAC2A::~ExcAC2A() {} static const std::list PossibleProfilesForClass = { @@ -94,376 +66,402 @@ ExcAC2A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAC2A_hvgate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_hvgate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->hvgate; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_kb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_kb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_kb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_kb1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kb1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_kh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_kl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_kl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_kl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_kl1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_lvgate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_lvgate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lvgate; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_vfemax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfemax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_vlr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_vlr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vlr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAC2A_hvgate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hvgate; if (!buffer.str().empty()) @@ -477,7 +475,8 @@ bool get_ExcAC2A_hvgate(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcAC2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -491,7 +490,8 @@ bool get_ExcAC2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_kb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kb; if (!buffer.str().empty()) @@ -505,7 +505,8 @@ bool get_ExcAC2A_kb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_kb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kb1; if (!buffer.str().empty()) @@ -519,7 +520,8 @@ bool get_ExcAC2A_kb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -533,7 +535,8 @@ bool get_ExcAC2A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -547,7 +550,8 @@ bool get_ExcAC2A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -561,7 +565,8 @@ bool get_ExcAC2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -575,7 +580,8 @@ bool get_ExcAC2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh; if (!buffer.str().empty()) @@ -589,7 +595,8 @@ bool get_ExcAC2A_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl; if (!buffer.str().empty()) @@ -603,7 +610,8 @@ bool get_ExcAC2A_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_kl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl1; if (!buffer.str().empty()) @@ -617,7 +625,8 @@ bool get_ExcAC2A_kl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -631,7 +640,8 @@ bool get_ExcAC2A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_lvgate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lvgate; if (!buffer.str().empty()) @@ -645,7 +655,8 @@ bool get_ExcAC2A_lvgate(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcAC2A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -659,7 +670,8 @@ bool get_ExcAC2A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC2A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -673,7 +685,8 @@ bool get_ExcAC2A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -687,7 +700,8 @@ bool get_ExcAC2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -701,7 +715,8 @@ bool get_ExcAC2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -715,7 +730,8 @@ bool get_ExcAC2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -729,7 +745,8 @@ bool get_ExcAC2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -743,7 +760,8 @@ bool get_ExcAC2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -757,7 +775,8 @@ bool get_ExcAC2A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC2A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -771,7 +790,8 @@ bool get_ExcAC2A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC2A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -785,7 +805,8 @@ bool get_ExcAC2A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -799,7 +820,8 @@ bool get_ExcAC2A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfemax; if (!buffer.str().empty()) @@ -813,7 +835,8 @@ bool get_ExcAC2A_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcAC2A_vlr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vlr; if (!buffer.str().empty()) @@ -827,7 +850,8 @@ bool get_ExcAC2A_vlr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -841,7 +865,8 @@ bool get_ExcAC2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -853,8 +878,6 @@ bool get_ExcAC2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcAC2A::debugName[] = "ExcAC2A"; const char* ExcAC2A::debugString() const { @@ -863,39 +886,39 @@ const char* ExcAC2A::debugString() const void ExcAC2A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAC2A"), &ExcAC2A_factory)); + factory_map.emplace("cim:ExcAC2A", &ExcAC2A_factory); } void ExcAC2A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.hvgate"), &assign_ExcAC2A_hvgate)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.ka"), &assign_ExcAC2A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.kb"), &assign_ExcAC2A_kb)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.kb1"), &assign_ExcAC2A_kb1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.kc"), &assign_ExcAC2A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.kd"), &assign_ExcAC2A_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.ke"), &assign_ExcAC2A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.kf"), &assign_ExcAC2A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.kh"), &assign_ExcAC2A_kh)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.kl"), &assign_ExcAC2A_kl)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.kl1"), &assign_ExcAC2A_kl1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.ks"), &assign_ExcAC2A_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.lvgate"), &assign_ExcAC2A_lvgate)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.seve1"), &assign_ExcAC2A_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.seve2"), &assign_ExcAC2A_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.ta"), &assign_ExcAC2A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.tb"), &assign_ExcAC2A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.tc"), &assign_ExcAC2A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.te"), &assign_ExcAC2A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.tf"), &assign_ExcAC2A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.vamax"), &assign_ExcAC2A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.vamin"), &assign_ExcAC2A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.ve1"), &assign_ExcAC2A_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.ve2"), &assign_ExcAC2A_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.vfemax"), &assign_ExcAC2A_vfemax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.vlr"), &assign_ExcAC2A_vlr)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.vrmax"), &assign_ExcAC2A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.vrmin"), &assign_ExcAC2A_vrmin)); + assign_map.emplace("cim:ExcAC2A.hvgate", &assign_ExcAC2A_hvgate); + assign_map.emplace("cim:ExcAC2A.ka", &assign_ExcAC2A_ka); + assign_map.emplace("cim:ExcAC2A.kb", &assign_ExcAC2A_kb); + assign_map.emplace("cim:ExcAC2A.kb1", &assign_ExcAC2A_kb1); + assign_map.emplace("cim:ExcAC2A.kc", &assign_ExcAC2A_kc); + assign_map.emplace("cim:ExcAC2A.kd", &assign_ExcAC2A_kd); + assign_map.emplace("cim:ExcAC2A.ke", &assign_ExcAC2A_ke); + assign_map.emplace("cim:ExcAC2A.kf", &assign_ExcAC2A_kf); + assign_map.emplace("cim:ExcAC2A.kh", &assign_ExcAC2A_kh); + assign_map.emplace("cim:ExcAC2A.kl", &assign_ExcAC2A_kl); + assign_map.emplace("cim:ExcAC2A.kl1", &assign_ExcAC2A_kl1); + assign_map.emplace("cim:ExcAC2A.ks", &assign_ExcAC2A_ks); + assign_map.emplace("cim:ExcAC2A.lvgate", &assign_ExcAC2A_lvgate); + assign_map.emplace("cim:ExcAC2A.seve1", &assign_ExcAC2A_seve1); + assign_map.emplace("cim:ExcAC2A.seve2", &assign_ExcAC2A_seve2); + assign_map.emplace("cim:ExcAC2A.ta", &assign_ExcAC2A_ta); + assign_map.emplace("cim:ExcAC2A.tb", &assign_ExcAC2A_tb); + assign_map.emplace("cim:ExcAC2A.tc", &assign_ExcAC2A_tc); + assign_map.emplace("cim:ExcAC2A.te", &assign_ExcAC2A_te); + assign_map.emplace("cim:ExcAC2A.tf", &assign_ExcAC2A_tf); + assign_map.emplace("cim:ExcAC2A.vamax", &assign_ExcAC2A_vamax); + assign_map.emplace("cim:ExcAC2A.vamin", &assign_ExcAC2A_vamin); + assign_map.emplace("cim:ExcAC2A.ve1", &assign_ExcAC2A_ve1); + assign_map.emplace("cim:ExcAC2A.ve2", &assign_ExcAC2A_ve2); + assign_map.emplace("cim:ExcAC2A.vfemax", &assign_ExcAC2A_vfemax); + assign_map.emplace("cim:ExcAC2A.vlr", &assign_ExcAC2A_vlr); + assign_map.emplace("cim:ExcAC2A.vrmax", &assign_ExcAC2A_vrmax); + assign_map.emplace("cim:ExcAC2A.vrmin", &assign_ExcAC2A_vrmin); } void ExcAC2A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcAC2A.hpp b/CGMES_2.4.15_27JAN2020/ExcAC2A.hpp index 91174ea3e..902938d79 100644 --- a/CGMES_2.4.15_27JAN2020/ExcAC2A.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcAC2A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE AC2A alternator-supplied rectifier excitation system with different field current limit. - */ + /** \brief Modified IEEE AC2A alternator-supplied rectifier excitation system with different field current limit. */ class ExcAC2A : public ExcitationSystemDynamics { public: @@ -30,34 +28,89 @@ namespace CIMPP ExcAC2A(); ~ExcAC2A() override; - CIMPP::Boolean hvgate; /* Indicates if HV gate is active (HVgate). true = gate is used false = gate is not used. Typical Value = true. Default: false */ - CIMPP::PU ka; /* Voltage regulator gain (Ka). Typical Value = 400. Default: nullptr */ - CIMPP::PU kb; /* Second stage regulator gain (Kb) (>0). Exciter field current controller gain. Typical Value = 25. Default: nullptr */ - CIMPP::PU kb1; /* Second stage regulator gain (Kb1). It is exciter field current controller gain used as alternative to Kb to represent a variant of the ExcAC2A model. Typical Value = 25. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.28. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (Kd). Typical Value = 0.35. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (Kf). Typical Value = 0.03. Default: nullptr */ - CIMPP::PU kh; /* Exciter field current feedback gain (Kh). Typical Value = 1. Default: nullptr */ - CIMPP::PU kl; /* Exciter field current limiter gain (Kl). Typical Value = 10. Default: nullptr */ - CIMPP::PU kl1; /* Coefficient to allow different usage of the model (Kl1). Typical Value = 1. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ - CIMPP::Boolean lvgate; /* Indicates if LV gate is active (LVgate). true = gate is used false = gate is not used. Typical Value = true. Default: false */ - CIMPP::Simple_Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, Ve, back of commutating reactance (Se[Ve]). Typical Value = 0.037. Default: nullptr */ - CIMPP::Simple_Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, Ve, back of commutating reactance (Se[Ve]). Typical Value = 0.012. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (Ta). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 0.6. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (Tf). Typical Value = 1. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (V). Typical Value = 8. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (V). Typical Value = -8. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve). Typical Value = 4.4. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve). Typical Value = 3.3. Default: nullptr */ - CIMPP::PU vfemax; /* Exciter field current limit reference (Vfemax). Typical Value = 4.4. Default: nullptr */ - CIMPP::PU vlr; /* Maximum exciter field current (Vlr). Typical Value = 4.4. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator outputs (Vrmax). Typical Value = 105. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator outputs (Vrmin). Typical Value = -95. Default: nullptr */ + /** \brief Indicates if HV gate is active (HVgate). true = gate is used false = gate is not used. Typical Value = true. Default: false */ + CIMPP::Boolean hvgate; + + /** \brief Voltage regulator gain (Ka). Typical Value = 400. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Second stage regulator gain (Kb) (>0). Exciter field current controller gain. Typical Value = 25. Default: nullptr */ + CIMPP::PU kb; + + /** \brief Second stage regulator gain (Kb1). It is exciter field current controller gain used as alternative to Kb to represent a variant of the ExcAC2A model. Typical Value = 25. Default: nullptr */ + CIMPP::PU kb1; + + /** \brief Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.28. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (Kd). Typical Value = 0.35. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (Kf). Typical Value = 0.03. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Exciter field current feedback gain (Kh). Typical Value = 1. Default: nullptr */ + CIMPP::PU kh; + + /** \brief Exciter field current limiter gain (Kl). Typical Value = 10. Default: nullptr */ + CIMPP::PU kl; + + /** \brief Coefficient to allow different usage of the model (Kl1). Typical Value = 1. Default: nullptr */ + CIMPP::PU kl1; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Indicates if LV gate is active (LVgate). true = gate is used false = gate is not used. Typical Value = true. Default: false */ + CIMPP::Boolean lvgate; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Ve, back of commutating reactance (Se[Ve]). Typical Value = 0.037. Default: nullptr */ + CIMPP::Simple_Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Ve, back of commutating reactance (Se[Ve]). Typical Value = 0.012. Default: nullptr */ + CIMPP::Simple_Float seve2; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 0.6. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (Tf). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage regulator output (V). Typical Value = 8. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -8. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve). Typical Value = 4.4. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve). Typical Value = 3.3. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Exciter field current limit reference (Vfemax). Typical Value = 4.4. Default: nullptr */ + CIMPP::PU vfemax; + + /** \brief Maximum exciter field current (Vlr). Typical Value = 4.4. Default: nullptr */ + CIMPP::PU vlr; + + /** \brief Maximum voltage regulator outputs (Vrmax). Typical Value = 105. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator outputs (Vrmin). Typical Value = -95. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcAC3A.cpp b/CGMES_2.4.15_27JAN2020/ExcAC3A.cpp index 253f84f1c..254577cfa 100644 --- a/CGMES_2.4.15_27JAN2020/ExcAC3A.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcAC3A.cpp @@ -8,37 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAC3A::ExcAC3A() {}; -ExcAC3A::~ExcAC3A() {}; +ExcAC3A::ExcAC3A() {} +ExcAC3A::~ExcAC3A() {} static const std::list PossibleProfilesForClass = { @@ -90,350 +64,374 @@ ExcAC3A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAC3A_efdn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_efdn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_kf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_kf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_kf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_kf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_klv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_klv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->klv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_kn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_kn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_kr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_kr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_vemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_vemin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vemin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_vfemax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfemax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_vlv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_vlv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vlv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAC3A_efdn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdn; if (!buffer.str().empty()) @@ -447,7 +445,8 @@ bool get_ExcAC3A_efdn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAC3A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -461,7 +460,8 @@ bool get_ExcAC3A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -475,7 +475,8 @@ bool get_ExcAC3A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -489,7 +490,8 @@ bool get_ExcAC3A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -503,7 +505,8 @@ bool get_ExcAC3A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -517,7 +520,8 @@ bool get_ExcAC3A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_kf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf1; if (!buffer.str().empty()) @@ -531,7 +535,8 @@ bool get_ExcAC3A_kf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf2; if (!buffer.str().empty()) @@ -545,7 +550,8 @@ bool get_ExcAC3A_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_klv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->klv; if (!buffer.str().empty()) @@ -559,7 +565,8 @@ bool get_ExcAC3A_klv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_kn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kn; if (!buffer.str().empty()) @@ -573,7 +580,8 @@ bool get_ExcAC3A_kn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_kr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kr; if (!buffer.str().empty()) @@ -587,7 +595,8 @@ bool get_ExcAC3A_kr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -601,7 +610,8 @@ bool get_ExcAC3A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -615,7 +625,8 @@ bool get_ExcAC3A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC3A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -629,7 +640,8 @@ bool get_ExcAC3A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC3A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -643,7 +655,8 @@ bool get_ExcAC3A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -657,7 +670,8 @@ bool get_ExcAC3A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -671,7 +685,8 @@ bool get_ExcAC3A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -685,7 +700,8 @@ bool get_ExcAC3A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -699,7 +715,8 @@ bool get_ExcAC3A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -713,7 +730,8 @@ bool get_ExcAC3A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC3A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -727,7 +745,8 @@ bool get_ExcAC3A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC3A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -741,7 +760,8 @@ bool get_ExcAC3A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -755,7 +775,8 @@ bool get_ExcAC3A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vemin; if (!buffer.str().empty()) @@ -769,7 +790,8 @@ bool get_ExcAC3A_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC3A_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfemax; if (!buffer.str().empty()) @@ -783,7 +805,8 @@ bool get_ExcAC3A_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcAC3A_vlv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vlv; if (!buffer.str().empty()) @@ -795,8 +818,6 @@ bool get_ExcAC3A_vlv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcAC3A::debugName[] = "ExcAC3A"; const char* ExcAC3A::debugString() const { @@ -805,37 +826,37 @@ const char* ExcAC3A::debugString() const void ExcAC3A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAC3A"), &ExcAC3A_factory)); + factory_map.emplace("cim:ExcAC3A", &ExcAC3A_factory); } void ExcAC3A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.efdn"), &assign_ExcAC3A_efdn)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.ka"), &assign_ExcAC3A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.kc"), &assign_ExcAC3A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.kd"), &assign_ExcAC3A_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.ke"), &assign_ExcAC3A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.kf"), &assign_ExcAC3A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.kf1"), &assign_ExcAC3A_kf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.kf2"), &assign_ExcAC3A_kf2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.klv"), &assign_ExcAC3A_klv)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.kn"), &assign_ExcAC3A_kn)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.kr"), &assign_ExcAC3A_kr)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.ks"), &assign_ExcAC3A_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.seve1"), &assign_ExcAC3A_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.seve2"), &assign_ExcAC3A_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.ta"), &assign_ExcAC3A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.tb"), &assign_ExcAC3A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.tc"), &assign_ExcAC3A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.te"), &assign_ExcAC3A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.tf"), &assign_ExcAC3A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.vamax"), &assign_ExcAC3A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.vamin"), &assign_ExcAC3A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.ve1"), &assign_ExcAC3A_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.ve2"), &assign_ExcAC3A_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.vemin"), &assign_ExcAC3A_vemin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.vfemax"), &assign_ExcAC3A_vfemax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.vlv"), &assign_ExcAC3A_vlv)); + assign_map.emplace("cim:ExcAC3A.efdn", &assign_ExcAC3A_efdn); + assign_map.emplace("cim:ExcAC3A.ka", &assign_ExcAC3A_ka); + assign_map.emplace("cim:ExcAC3A.kc", &assign_ExcAC3A_kc); + assign_map.emplace("cim:ExcAC3A.kd", &assign_ExcAC3A_kd); + assign_map.emplace("cim:ExcAC3A.ke", &assign_ExcAC3A_ke); + assign_map.emplace("cim:ExcAC3A.kf", &assign_ExcAC3A_kf); + assign_map.emplace("cim:ExcAC3A.kf1", &assign_ExcAC3A_kf1); + assign_map.emplace("cim:ExcAC3A.kf2", &assign_ExcAC3A_kf2); + assign_map.emplace("cim:ExcAC3A.klv", &assign_ExcAC3A_klv); + assign_map.emplace("cim:ExcAC3A.kn", &assign_ExcAC3A_kn); + assign_map.emplace("cim:ExcAC3A.kr", &assign_ExcAC3A_kr); + assign_map.emplace("cim:ExcAC3A.ks", &assign_ExcAC3A_ks); + assign_map.emplace("cim:ExcAC3A.seve1", &assign_ExcAC3A_seve1); + assign_map.emplace("cim:ExcAC3A.seve2", &assign_ExcAC3A_seve2); + assign_map.emplace("cim:ExcAC3A.ta", &assign_ExcAC3A_ta); + assign_map.emplace("cim:ExcAC3A.tb", &assign_ExcAC3A_tb); + assign_map.emplace("cim:ExcAC3A.tc", &assign_ExcAC3A_tc); + assign_map.emplace("cim:ExcAC3A.te", &assign_ExcAC3A_te); + assign_map.emplace("cim:ExcAC3A.tf", &assign_ExcAC3A_tf); + assign_map.emplace("cim:ExcAC3A.vamax", &assign_ExcAC3A_vamax); + assign_map.emplace("cim:ExcAC3A.vamin", &assign_ExcAC3A_vamin); + assign_map.emplace("cim:ExcAC3A.ve1", &assign_ExcAC3A_ve1); + assign_map.emplace("cim:ExcAC3A.ve2", &assign_ExcAC3A_ve2); + assign_map.emplace("cim:ExcAC3A.vemin", &assign_ExcAC3A_vemin); + assign_map.emplace("cim:ExcAC3A.vfemax", &assign_ExcAC3A_vfemax); + assign_map.emplace("cim:ExcAC3A.vlv", &assign_ExcAC3A_vlv); } void ExcAC3A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcAC3A.hpp b/CGMES_2.4.15_27JAN2020/ExcAC3A.hpp index 51c4e355b..430ee5d27 100644 --- a/CGMES_2.4.15_27JAN2020/ExcAC3A.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcAC3A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE AC3A alternator-supplied rectifier excitation system with different field current limit. - */ + /** \brief Modified IEEE AC3A alternator-supplied rectifier excitation system with different field current limit. */ class ExcAC3A : public ExcitationSystemDynamics { public: @@ -29,32 +27,83 @@ namespace CIMPP ExcAC3A(); ~ExcAC3A() override; - CIMPP::PU efdn; /* Value of at which feedback gain changes (Efdn). Typical Value = 2.36. Default: nullptr */ - CIMPP::Seconds ka; /* Voltage regulator gain (Ka). Typical Value = 45.62. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.104. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (Kd). Typical Value = 0.499. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (Kf). Typical Value = 0.143. Default: nullptr */ - CIMPP::PU kf1; /* Coefficient to allow different usage of the model (Kf1). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf2; /* Coefficient to allow different usage of the model (Kf2). Typical Value = 0. Default: nullptr */ - CIMPP::PU klv; /* Gain used in the minimum field voltage limiter loop (Klv). Typical Value = 0.194. Default: nullptr */ - CIMPP::PU kn; /* Excitation control system stabilizer gain (Kn). Typical Value =0.05. Default: nullptr */ - CIMPP::PU kr; /* Constant associated with regulator and alternator field power supply (Kr). Typical Value =3.77. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, Ve, back of commutating reactance (Se[Ve]). Typical Value = 1.143. Default: nullptr */ - CIMPP::Simple_Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, Ve, back of commutating reactance (Se[Ve]). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU ta; /* Voltage regulator time constant (Ta). Typical Value = 0.013. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 1.17. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (Tf). Typical Value = 1. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (V). Typical Value = 1. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (V). Typical Value = -0.95. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve1) equals Vemax (Ve1). Typical Value = 6.24. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve). Typical Value = 4.68. Default: nullptr */ - CIMPP::PU vemin; /* Minimum exciter voltage output (Vemin). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU vfemax; /* Exciter field current limit reference (Vfemax). Typical Value = 16. Default: nullptr */ - CIMPP::PU vlv; /* Field voltage used in the minimum field voltage limiter loop (Vlv). Typical Value = 0.79. Default: nullptr */ + /** \brief Value of at which feedback gain changes (Efdn). Typical Value = 2.36. Default: nullptr */ + CIMPP::PU efdn; + + /** \brief Voltage regulator gain (Ka). Typical Value = 45.62. Default: nullptr */ + CIMPP::Seconds ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.104. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (Kd). Typical Value = 0.499. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (Kf). Typical Value = 0.143. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Coefficient to allow different usage of the model (Kf1). Typical Value = 1. Default: nullptr */ + CIMPP::PU kf1; + + /** \brief Coefficient to allow different usage of the model (Kf2). Typical Value = 0. Default: nullptr */ + CIMPP::PU kf2; + + /** \brief Gain used in the minimum field voltage limiter loop (Klv). Typical Value = 0.194. Default: nullptr */ + CIMPP::PU klv; + + /** \brief Excitation control system stabilizer gain (Kn). Typical Value =0.05. Default: nullptr */ + CIMPP::PU kn; + + /** \brief Constant associated with regulator and alternator field power supply (Kr). Typical Value =3.77. Default: nullptr */ + CIMPP::PU kr; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Ve, back of commutating reactance (Se[Ve]). Typical Value = 1.143. Default: nullptr */ + CIMPP::Simple_Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Ve, back of commutating reactance (Se[Ve]). Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float seve2; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0.013. Default: nullptr */ + CIMPP::PU ta; + + /** \brief Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 1.17. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (Tf). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage regulator output (V). Typical Value = 1. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -0.95. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve1) equals Vemax (Ve1). Typical Value = 6.24. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve). Typical Value = 4.68. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Minimum exciter voltage output (Vemin). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU vemin; + + /** \brief Exciter field current limit reference (Vfemax). Typical Value = 16. Default: nullptr */ + CIMPP::PU vfemax; + + /** \brief Field voltage used in the minimum field voltage limiter loop (Vlv). Typical Value = 0.79. Default: nullptr */ + CIMPP::PU vlv; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcAC4A.cpp b/CGMES_2.4.15_27JAN2020/ExcAC4A.cpp index f949b4ef8..ee9a03733 100644 --- a/CGMES_2.4.15_27JAN2020/ExcAC4A.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcAC4A.cpp @@ -8,20 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAC4A::ExcAC4A() {}; -ExcAC4A::~ExcAC4A() {}; +ExcAC4A::ExcAC4A() {} +ExcAC4A::~ExcAC4A() {} static const std::list PossibleProfilesForClass = { @@ -56,129 +47,136 @@ ExcAC4A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAC4A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC4A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC4A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC4A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC4A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC4A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC4A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC4A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC4A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC4A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC4A_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC4A_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC4A_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC4A_vimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC4A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC4A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC4A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC4A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAC4A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -192,7 +190,8 @@ bool get_ExcAC4A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC4A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -206,7 +205,8 @@ bool get_ExcAC4A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC4A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -220,7 +220,8 @@ bool get_ExcAC4A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC4A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -234,7 +235,8 @@ bool get_ExcAC4A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC4A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -248,7 +250,8 @@ bool get_ExcAC4A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC4A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -262,7 +265,8 @@ bool get_ExcAC4A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC4A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimin; if (!buffer.str().empty()) @@ -276,7 +280,8 @@ bool get_ExcAC4A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC4A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -290,7 +295,8 @@ bool get_ExcAC4A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC4A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -302,8 +308,6 @@ bool get_ExcAC4A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcAC4A::debugName[] = "ExcAC4A"; const char* ExcAC4A::debugString() const { @@ -312,20 +316,20 @@ const char* ExcAC4A::debugString() const void ExcAC4A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAC4A"), &ExcAC4A_factory)); + factory_map.emplace("cim:ExcAC4A", &ExcAC4A_factory); } void ExcAC4A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAC4A.ka"), &assign_ExcAC4A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC4A.kc"), &assign_ExcAC4A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC4A.ta"), &assign_ExcAC4A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC4A.tb"), &assign_ExcAC4A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC4A.tc"), &assign_ExcAC4A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC4A.vimax"), &assign_ExcAC4A_vimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC4A.vimin"), &assign_ExcAC4A_vimin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC4A.vrmax"), &assign_ExcAC4A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC4A.vrmin"), &assign_ExcAC4A_vrmin)); + assign_map.emplace("cim:ExcAC4A.ka", &assign_ExcAC4A_ka); + assign_map.emplace("cim:ExcAC4A.kc", &assign_ExcAC4A_kc); + assign_map.emplace("cim:ExcAC4A.ta", &assign_ExcAC4A_ta); + assign_map.emplace("cim:ExcAC4A.tb", &assign_ExcAC4A_tb); + assign_map.emplace("cim:ExcAC4A.tc", &assign_ExcAC4A_tc); + assign_map.emplace("cim:ExcAC4A.vimax", &assign_ExcAC4A_vimax); + assign_map.emplace("cim:ExcAC4A.vimin", &assign_ExcAC4A_vimin); + assign_map.emplace("cim:ExcAC4A.vrmax", &assign_ExcAC4A_vrmax); + assign_map.emplace("cim:ExcAC4A.vrmin", &assign_ExcAC4A_vrmin); } void ExcAC4A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcAC4A.hpp b/CGMES_2.4.15_27JAN2020/ExcAC4A.hpp index cbfe82616..d0fc847a7 100644 --- a/CGMES_2.4.15_27JAN2020/ExcAC4A.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcAC4A.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE AC4A alternator-supplied rectifier excitation system with different minimum controller output. - */ + /** \brief Modified IEEE AC4A alternator-supplied rectifier excitation system with different minimum controller output. */ class ExcAC4A : public ExcitationSystemDynamics { public: @@ -28,15 +26,32 @@ namespace CIMPP ExcAC4A(); ~ExcAC4A() override; - CIMPP::PU ka; /* Voltage regulator gain (Ka). Typical Value = 200. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (Ta). Typical Value = 0.015. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (Tb). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (Tc). Typical Value = 1. Default: nullptr */ - CIMPP::PU vimax; /* Maximum voltage regulator input limit (Vimax). Typical Value = 10. Default: nullptr */ - CIMPP::PU vimin; /* Minimum voltage regulator input limit (Vimin). Typical Value = -10. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (Vrmax). Typical Value = 5.64. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (Vrmin). Typical Value = -4.53. Default: nullptr */ + /** \brief Voltage regulator gain (Ka). Typical Value = 200. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0.015. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (Tb). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (Tc). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Maximum voltage regulator input limit (Vimax). Typical Value = 10. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Minimum voltage regulator input limit (Vimin). Typical Value = -10. Default: nullptr */ + CIMPP::PU vimin; + + /** \brief Maximum voltage regulator output (Vrmax). Typical Value = 5.64. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (Vrmin). Typical Value = -4.53. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcAC5A.cpp b/CGMES_2.4.15_27JAN2020/ExcAC5A.cpp index e44f1f114..c0836badb 100644 --- a/CGMES_2.4.15_27JAN2020/ExcAC5A.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcAC5A.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAC5A::ExcAC5A() {}; -ExcAC5A::~ExcAC5A() {}; +ExcAC5A::ExcAC5A() {} +ExcAC5A::~ExcAC5A() {} static const std::list PossibleProfilesForClass = { @@ -74,246 +56,262 @@ ExcAC5A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAC5A_a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_a(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_seefd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_seefd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_tf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_tf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_tf3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_tf3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAC5A_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a; if (!buffer.str().empty()) @@ -327,7 +325,8 @@ bool get_ExcAC5A_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -341,7 +340,8 @@ bool get_ExcAC5A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAC5A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -355,7 +355,8 @@ bool get_ExcAC5A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAC5A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -369,7 +370,8 @@ bool get_ExcAC5A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -383,7 +385,8 @@ bool get_ExcAC5A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -397,7 +400,8 @@ bool get_ExcAC5A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -411,7 +415,8 @@ bool get_ExcAC5A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd1; if (!buffer.str().empty()) @@ -425,7 +430,8 @@ bool get_ExcAC5A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcAC5A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd2; if (!buffer.str().empty()) @@ -439,7 +445,8 @@ bool get_ExcAC5A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcAC5A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -453,7 +460,8 @@ bool get_ExcAC5A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -467,7 +475,8 @@ bool get_ExcAC5A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -481,7 +490,8 @@ bool get_ExcAC5A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -495,7 +505,8 @@ bool get_ExcAC5A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf1; if (!buffer.str().empty()) @@ -509,7 +520,8 @@ bool get_ExcAC5A_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf2; if (!buffer.str().empty()) @@ -523,7 +535,8 @@ bool get_ExcAC5A_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_tf3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf3; if (!buffer.str().empty()) @@ -537,7 +550,8 @@ bool get_ExcAC5A_tf3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -551,7 +565,8 @@ bool get_ExcAC5A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC5A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -563,8 +578,6 @@ bool get_ExcAC5A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcAC5A::debugName[] = "ExcAC5A"; const char* ExcAC5A::debugString() const { @@ -573,29 +586,29 @@ const char* ExcAC5A::debugString() const void ExcAC5A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAC5A"), &ExcAC5A_factory)); + factory_map.emplace("cim:ExcAC5A", &ExcAC5A_factory); } void ExcAC5A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.a"), &assign_ExcAC5A_a)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.efd1"), &assign_ExcAC5A_efd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.efd2"), &assign_ExcAC5A_efd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.ka"), &assign_ExcAC5A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.ke"), &assign_ExcAC5A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.kf"), &assign_ExcAC5A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.ks"), &assign_ExcAC5A_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.seefd1"), &assign_ExcAC5A_seefd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.seefd2"), &assign_ExcAC5A_seefd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.ta"), &assign_ExcAC5A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.tb"), &assign_ExcAC5A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.tc"), &assign_ExcAC5A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.te"), &assign_ExcAC5A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.tf1"), &assign_ExcAC5A_tf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.tf2"), &assign_ExcAC5A_tf2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.tf3"), &assign_ExcAC5A_tf3)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.vrmax"), &assign_ExcAC5A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.vrmin"), &assign_ExcAC5A_vrmin)); + assign_map.emplace("cim:ExcAC5A.a", &assign_ExcAC5A_a); + assign_map.emplace("cim:ExcAC5A.efd1", &assign_ExcAC5A_efd1); + assign_map.emplace("cim:ExcAC5A.efd2", &assign_ExcAC5A_efd2); + assign_map.emplace("cim:ExcAC5A.ka", &assign_ExcAC5A_ka); + assign_map.emplace("cim:ExcAC5A.ke", &assign_ExcAC5A_ke); + assign_map.emplace("cim:ExcAC5A.kf", &assign_ExcAC5A_kf); + assign_map.emplace("cim:ExcAC5A.ks", &assign_ExcAC5A_ks); + assign_map.emplace("cim:ExcAC5A.seefd1", &assign_ExcAC5A_seefd1); + assign_map.emplace("cim:ExcAC5A.seefd2", &assign_ExcAC5A_seefd2); + assign_map.emplace("cim:ExcAC5A.ta", &assign_ExcAC5A_ta); + assign_map.emplace("cim:ExcAC5A.tb", &assign_ExcAC5A_tb); + assign_map.emplace("cim:ExcAC5A.tc", &assign_ExcAC5A_tc); + assign_map.emplace("cim:ExcAC5A.te", &assign_ExcAC5A_te); + assign_map.emplace("cim:ExcAC5A.tf1", &assign_ExcAC5A_tf1); + assign_map.emplace("cim:ExcAC5A.tf2", &assign_ExcAC5A_tf2); + assign_map.emplace("cim:ExcAC5A.tf3", &assign_ExcAC5A_tf3); + assign_map.emplace("cim:ExcAC5A.vrmax", &assign_ExcAC5A_vrmax); + assign_map.emplace("cim:ExcAC5A.vrmin", &assign_ExcAC5A_vrmin); } void ExcAC5A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcAC5A.hpp b/CGMES_2.4.15_27JAN2020/ExcAC5A.hpp index ea67ffeed..17c61ea36 100644 --- a/CGMES_2.4.15_27JAN2020/ExcAC5A.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcAC5A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE AC5A alternator-supplied rectifier excitation system with different minimum controller output. - */ + /** \brief Modified IEEE AC5A alternator-supplied rectifier excitation system with different minimum controller output. */ class ExcAC5A : public ExcitationSystemDynamics { public: @@ -29,24 +27,59 @@ namespace CIMPP ExcAC5A(); ~ExcAC5A() override; - CIMPP::Simple_Float a; /* Coefficient to allow different usage of the model (a). Typical Value = 1. Default: nullptr */ - CIMPP::PU efd1; /* Exciter voltage at which exciter saturation is defined (Efd1). Typical Value = 5.6. Default: nullptr */ - CIMPP::PU efd2; /* Exciter voltage at which exciter saturation is defined (Efd2). Typical Value = 4.2. Default: nullptr */ - CIMPP::PU ka; /* Voltage regulator gain (Ka). Typical Value = 400. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (Kf). Typical Value = 0.03. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float seefd1; /* Exciter saturation function value at the corresponding exciter voltage, Efd1 (S[Efd1]). Typical Value = 0.86. Default: nullptr */ - CIMPP::Simple_Float seefd2; /* Exciter saturation function value at the corresponding exciter voltage, Efd2 (S[Efd2]). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (Ta). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (Tc). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 0.8. Default: nullptr */ - CIMPP::Seconds tf1; /* Excitation control system stabilizer time constant (Tf1). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tf2; /* Excitation control system stabilizer time constant (Tf2). Typical Value = 0.8. Default: nullptr */ - CIMPP::Seconds tf3; /* Excitation control system stabilizer time constant (Tf3). Typical Value = 0. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (Vrmax). Typical Value = 7.3. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (Vrmin). Typical Value =-7.3. Default: nullptr */ + /** \brief Coefficient to allow different usage of the model (a). Typical Value = 1. Default: nullptr */ + CIMPP::Simple_Float a; + + /** \brief Exciter voltage at which exciter saturation is defined (Efd1). Typical Value = 5.6. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Exciter voltage at which exciter saturation is defined (Efd2). Typical Value = 4.2. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief Voltage regulator gain (Ka). Typical Value = 400. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (Kf). Typical Value = 0.03. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Efd1 (S[Efd1]). Typical Value = 0.86. Default: nullptr */ + CIMPP::Simple_Float seefd1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Efd2 (S[Efd2]). Typical Value = 0.5. Default: nullptr */ + CIMPP::Simple_Float seefd2; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (Tc). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 0.8. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (Tf1). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf1; + + /** \brief Excitation control system stabilizer time constant (Tf2). Typical Value = 0.8. Default: nullptr */ + CIMPP::Seconds tf2; + + /** \brief Excitation control system stabilizer time constant (Tf3). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tf3; + + /** \brief Maximum voltage regulator output (Vrmax). Typical Value = 7.3. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (Vrmin). Typical Value =-7.3. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcAC6A.cpp b/CGMES_2.4.15_27JAN2020/ExcAC6A.cpp index b30aa83fe..bcdd5fdcd 100644 --- a/CGMES_2.4.15_27JAN2020/ExcAC6A.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcAC6A.cpp @@ -8,34 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAC6A::ExcAC6A() {}; -ExcAC6A::~ExcAC6A() {}; +ExcAC6A::ExcAC6A() {} +ExcAC6A::~ExcAC6A() {} static const std::list PossibleProfilesForClass = { @@ -84,311 +61,332 @@ ExcAC6A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAC6A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_kh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_th(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_th(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_tj(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_tj(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tj; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_tk(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_tk(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tk; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_vfelim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_vfelim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfelim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_vhmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_vhmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vhmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAC6A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -402,7 +400,8 @@ bool get_ExcAC6A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -416,7 +415,8 @@ bool get_ExcAC6A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -430,7 +430,8 @@ bool get_ExcAC6A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -444,7 +445,8 @@ bool get_ExcAC6A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh; if (!buffer.str().empty()) @@ -458,7 +460,8 @@ bool get_ExcAC6A_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -472,7 +475,8 @@ bool get_ExcAC6A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -486,7 +490,8 @@ bool get_ExcAC6A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC6A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -500,7 +505,8 @@ bool get_ExcAC6A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC6A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -514,7 +520,8 @@ bool get_ExcAC6A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -528,7 +535,8 @@ bool get_ExcAC6A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -542,7 +550,8 @@ bool get_ExcAC6A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -556,7 +565,8 @@ bool get_ExcAC6A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_th(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th; if (!buffer.str().empty()) @@ -570,7 +580,8 @@ bool get_ExcAC6A_th(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_tj(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tj; if (!buffer.str().empty()) @@ -584,7 +595,8 @@ bool get_ExcAC6A_tj(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_tk(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tk; if (!buffer.str().empty()) @@ -598,7 +610,8 @@ bool get_ExcAC6A_tk(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -612,7 +625,8 @@ bool get_ExcAC6A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC6A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -626,7 +640,8 @@ bool get_ExcAC6A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC6A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -640,7 +655,8 @@ bool get_ExcAC6A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -654,7 +670,8 @@ bool get_ExcAC6A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_vfelim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfelim; if (!buffer.str().empty()) @@ -668,7 +685,8 @@ bool get_ExcAC6A_vfelim(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcAC6A_vhmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vhmax; if (!buffer.str().empty()) @@ -682,7 +700,8 @@ bool get_ExcAC6A_vhmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC6A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -696,7 +715,8 @@ bool get_ExcAC6A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC6A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -708,8 +728,6 @@ bool get_ExcAC6A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcAC6A::debugName[] = "ExcAC6A"; const char* ExcAC6A::debugString() const { @@ -718,34 +736,34 @@ const char* ExcAC6A::debugString() const void ExcAC6A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAC6A"), &ExcAC6A_factory)); + factory_map.emplace("cim:ExcAC6A", &ExcAC6A_factory); } void ExcAC6A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.ka"), &assign_ExcAC6A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.kc"), &assign_ExcAC6A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.kd"), &assign_ExcAC6A_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.ke"), &assign_ExcAC6A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.kh"), &assign_ExcAC6A_kh)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.ks"), &assign_ExcAC6A_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.seve1"), &assign_ExcAC6A_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.seve2"), &assign_ExcAC6A_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.ta"), &assign_ExcAC6A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.tb"), &assign_ExcAC6A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.tc"), &assign_ExcAC6A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.te"), &assign_ExcAC6A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.th"), &assign_ExcAC6A_th)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.tj"), &assign_ExcAC6A_tj)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.tk"), &assign_ExcAC6A_tk)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.vamax"), &assign_ExcAC6A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.vamin"), &assign_ExcAC6A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.ve1"), &assign_ExcAC6A_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.ve2"), &assign_ExcAC6A_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.vfelim"), &assign_ExcAC6A_vfelim)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.vhmax"), &assign_ExcAC6A_vhmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.vrmax"), &assign_ExcAC6A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.vrmin"), &assign_ExcAC6A_vrmin)); + assign_map.emplace("cim:ExcAC6A.ka", &assign_ExcAC6A_ka); + assign_map.emplace("cim:ExcAC6A.kc", &assign_ExcAC6A_kc); + assign_map.emplace("cim:ExcAC6A.kd", &assign_ExcAC6A_kd); + assign_map.emplace("cim:ExcAC6A.ke", &assign_ExcAC6A_ke); + assign_map.emplace("cim:ExcAC6A.kh", &assign_ExcAC6A_kh); + assign_map.emplace("cim:ExcAC6A.ks", &assign_ExcAC6A_ks); + assign_map.emplace("cim:ExcAC6A.seve1", &assign_ExcAC6A_seve1); + assign_map.emplace("cim:ExcAC6A.seve2", &assign_ExcAC6A_seve2); + assign_map.emplace("cim:ExcAC6A.ta", &assign_ExcAC6A_ta); + assign_map.emplace("cim:ExcAC6A.tb", &assign_ExcAC6A_tb); + assign_map.emplace("cim:ExcAC6A.tc", &assign_ExcAC6A_tc); + assign_map.emplace("cim:ExcAC6A.te", &assign_ExcAC6A_te); + assign_map.emplace("cim:ExcAC6A.th", &assign_ExcAC6A_th); + assign_map.emplace("cim:ExcAC6A.tj", &assign_ExcAC6A_tj); + assign_map.emplace("cim:ExcAC6A.tk", &assign_ExcAC6A_tk); + assign_map.emplace("cim:ExcAC6A.vamax", &assign_ExcAC6A_vamax); + assign_map.emplace("cim:ExcAC6A.vamin", &assign_ExcAC6A_vamin); + assign_map.emplace("cim:ExcAC6A.ve1", &assign_ExcAC6A_ve1); + assign_map.emplace("cim:ExcAC6A.ve2", &assign_ExcAC6A_ve2); + assign_map.emplace("cim:ExcAC6A.vfelim", &assign_ExcAC6A_vfelim); + assign_map.emplace("cim:ExcAC6A.vhmax", &assign_ExcAC6A_vhmax); + assign_map.emplace("cim:ExcAC6A.vrmax", &assign_ExcAC6A_vrmax); + assign_map.emplace("cim:ExcAC6A.vrmin", &assign_ExcAC6A_vrmin); } void ExcAC6A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcAC6A.hpp b/CGMES_2.4.15_27JAN2020/ExcAC6A.hpp index 0550a756b..9bc679ac4 100644 --- a/CGMES_2.4.15_27JAN2020/ExcAC6A.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcAC6A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE AC6A alternator-supplied rectifier excitation system with speed input. - */ + /** \brief Modified IEEE AC6A alternator-supplied rectifier excitation system with speed input. */ class ExcAC6A : public ExcitationSystemDynamics { public: @@ -29,29 +27,74 @@ namespace CIMPP ExcAC6A(); ~ExcAC6A() override; - CIMPP::PU ka; /* Voltage regulator gain (Ka). Typical Value = 536. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.173. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (Kd). Typical Value = 1.91. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (Ke). Typical Value = 1.6. Default: nullptr */ - CIMPP::PU kh; /* Exciter field current limiter gain (Kh). Typical Value = 92. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, Ve1, back of commutating reactance (Se[Ve1]). Typical Value = 0.214. Default: nullptr */ - CIMPP::Simple_Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, Ve2, back of commutating reactance (Se[Ve2]). Typical Value = 0.044. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (Ta). Typical Value = 0.086. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (Tb). Typical Value = 9. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (Tc). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds th; /* Exciter field current limiter time constant (Th). Typical Value = 0.08. Default: nullptr */ - CIMPP::Seconds tj; /* Exciter field current limiter time constant (Tj). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds tk; /* Voltage regulator time constant (Tk). Typical Value = 0.18. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (Vamax). Typical Value = 75. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (Vamin). Typical Value = -75. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve). Typical Value = 7.4. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve2). Typical Value = 5.55. Default: nullptr */ - CIMPP::PU vfelim; /* Exciter field current limit reference (Vfelim). Typical Value = 19. Default: nullptr */ - CIMPP::PU vhmax; /* Maximum field current limiter signal reference (Vhmax). Typical Value = 75. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (Vrmax). Typical Value = 44. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (Vrmin). Typical Value = -36. Default: nullptr */ + /** \brief Voltage regulator gain (Ka). Typical Value = 536. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.173. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (Kd). Typical Value = 1.91. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter constant related to self-excited field (Ke). Typical Value = 1.6. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Exciter field current limiter gain (Kh). Typical Value = 92. Default: nullptr */ + CIMPP::PU kh; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Ve1, back of commutating reactance (Se[Ve1]). Typical Value = 0.214. Default: nullptr */ + CIMPP::Simple_Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Ve2, back of commutating reactance (Se[Ve2]). Typical Value = 0.044. Default: nullptr */ + CIMPP::Simple_Float seve2; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0.086. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (Tb). Typical Value = 9. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (Tc). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Exciter field current limiter time constant (Th). Typical Value = 0.08. Default: nullptr */ + CIMPP::Seconds th; + + /** \brief Exciter field current limiter time constant (Tj). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds tj; + + /** \brief Voltage regulator time constant (Tk). Typical Value = 0.18. Default: nullptr */ + CIMPP::Seconds tk; + + /** \brief Maximum voltage regulator output (Vamax). Typical Value = 75. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (Vamin). Typical Value = -75. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve). Typical Value = 7.4. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve2). Typical Value = 5.55. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Exciter field current limit reference (Vfelim). Typical Value = 19. Default: nullptr */ + CIMPP::PU vfelim; + + /** \brief Maximum field current limiter signal reference (Vhmax). Typical Value = 75. Default: nullptr */ + CIMPP::PU vhmax; + + /** \brief Maximum voltage regulator output (Vrmax). Typical Value = 44. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (Vrmin). Typical Value = -36. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcAC8B.cpp b/CGMES_2.4.15_27JAN2020/ExcAC8B.cpp index b296f6aca..d43497172 100644 --- a/CGMES_2.4.15_27JAN2020/ExcAC8B.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcAC8B.cpp @@ -8,38 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" using namespace CIMPP; -ExcAC8B::ExcAC8B() {}; -ExcAC8B::~ExcAC8B() {}; +ExcAC8B::ExcAC8B() {} +ExcAC8B::~ExcAC8B() {} static const std::list PossibleProfilesForClass = { @@ -92,363 +65,388 @@ ExcAC8B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAC8B_inlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_inlim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inlim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_kdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_kdr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kdr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_kir(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_kir(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kir; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_kpr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_kpr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_pidlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_pidlim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pidlim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_tdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_tdr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_telim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_telim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->telim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_vemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_vemin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vemin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_vfemax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfemax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_vimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_vpidmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_vpidmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vpidmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_vpidmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_vpidmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vpidmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_vtmult(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_vtmult(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vtmult; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAC8B_inlim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inlim; if (!buffer.str().empty()) @@ -462,7 +460,8 @@ bool get_ExcAC8B_inlim(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC8B_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -476,7 +475,8 @@ bool get_ExcAC8B_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -490,7 +490,8 @@ bool get_ExcAC8B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -504,7 +505,8 @@ bool get_ExcAC8B_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_kdr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdr; if (!buffer.str().empty()) @@ -518,7 +520,8 @@ bool get_ExcAC8B_kdr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -532,7 +535,8 @@ bool get_ExcAC8B_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kir; if (!buffer.str().empty()) @@ -546,7 +550,8 @@ bool get_ExcAC8B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpr; if (!buffer.str().empty()) @@ -560,7 +565,8 @@ bool get_ExcAC8B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -574,7 +580,8 @@ bool get_ExcAC8B_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_pidlim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pidlim; if (!buffer.str().empty()) @@ -588,7 +595,8 @@ bool get_ExcAC8B_pidlim(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcAC8B_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -602,7 +610,8 @@ bool get_ExcAC8B_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC8B_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -616,7 +625,8 @@ bool get_ExcAC8B_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC8B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -630,7 +640,8 @@ bool get_ExcAC8B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_tdr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdr; if (!buffer.str().empty()) @@ -644,7 +655,8 @@ bool get_ExcAC8B_tdr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -658,7 +670,8 @@ bool get_ExcAC8B_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_telim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->telim; if (!buffer.str().empty()) @@ -672,7 +685,8 @@ bool get_ExcAC8B_telim(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC8B_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -686,7 +700,8 @@ bool get_ExcAC8B_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -700,7 +715,8 @@ bool get_ExcAC8B_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vemin; if (!buffer.str().empty()) @@ -714,7 +730,8 @@ bool get_ExcAC8B_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC8B_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfemax; if (!buffer.str().empty()) @@ -728,7 +745,8 @@ bool get_ExcAC8B_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcAC8B_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -742,7 +760,8 @@ bool get_ExcAC8B_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC8B_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimin; if (!buffer.str().empty()) @@ -756,7 +775,8 @@ bool get_ExcAC8B_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC8B_vpidmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vpidmax; if (!buffer.str().empty()) @@ -770,7 +790,8 @@ bool get_ExcAC8B_vpidmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcAC8B_vpidmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vpidmin; if (!buffer.str().empty()) @@ -784,7 +805,8 @@ bool get_ExcAC8B_vpidmin(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcAC8B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -798,7 +820,8 @@ bool get_ExcAC8B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC8B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -812,7 +835,8 @@ bool get_ExcAC8B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC8B_vtmult(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vtmult; if (!buffer.str().empty()) @@ -824,8 +848,6 @@ bool get_ExcAC8B_vtmult(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char ExcAC8B::debugName[] = "ExcAC8B"; const char* ExcAC8B::debugString() const { @@ -834,38 +856,38 @@ const char* ExcAC8B::debugString() const void ExcAC8B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAC8B"), &ExcAC8B_factory)); + factory_map.emplace("cim:ExcAC8B", &ExcAC8B_factory); } void ExcAC8B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.inlim"), &assign_ExcAC8B_inlim)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.ka"), &assign_ExcAC8B_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.kc"), &assign_ExcAC8B_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.kd"), &assign_ExcAC8B_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.kdr"), &assign_ExcAC8B_kdr)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.ke"), &assign_ExcAC8B_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.kir"), &assign_ExcAC8B_kir)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.kpr"), &assign_ExcAC8B_kpr)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.ks"), &assign_ExcAC8B_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.pidlim"), &assign_ExcAC8B_pidlim)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.seve1"), &assign_ExcAC8B_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.seve2"), &assign_ExcAC8B_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.ta"), &assign_ExcAC8B_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.tdr"), &assign_ExcAC8B_tdr)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.te"), &assign_ExcAC8B_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.telim"), &assign_ExcAC8B_telim)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.ve1"), &assign_ExcAC8B_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.ve2"), &assign_ExcAC8B_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.vemin"), &assign_ExcAC8B_vemin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.vfemax"), &assign_ExcAC8B_vfemax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.vimax"), &assign_ExcAC8B_vimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.vimin"), &assign_ExcAC8B_vimin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.vpidmax"), &assign_ExcAC8B_vpidmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.vpidmin"), &assign_ExcAC8B_vpidmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.vrmax"), &assign_ExcAC8B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.vrmin"), &assign_ExcAC8B_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.vtmult"), &assign_ExcAC8B_vtmult)); + assign_map.emplace("cim:ExcAC8B.inlim", &assign_ExcAC8B_inlim); + assign_map.emplace("cim:ExcAC8B.ka", &assign_ExcAC8B_ka); + assign_map.emplace("cim:ExcAC8B.kc", &assign_ExcAC8B_kc); + assign_map.emplace("cim:ExcAC8B.kd", &assign_ExcAC8B_kd); + assign_map.emplace("cim:ExcAC8B.kdr", &assign_ExcAC8B_kdr); + assign_map.emplace("cim:ExcAC8B.ke", &assign_ExcAC8B_ke); + assign_map.emplace("cim:ExcAC8B.kir", &assign_ExcAC8B_kir); + assign_map.emplace("cim:ExcAC8B.kpr", &assign_ExcAC8B_kpr); + assign_map.emplace("cim:ExcAC8B.ks", &assign_ExcAC8B_ks); + assign_map.emplace("cim:ExcAC8B.pidlim", &assign_ExcAC8B_pidlim); + assign_map.emplace("cim:ExcAC8B.seve1", &assign_ExcAC8B_seve1); + assign_map.emplace("cim:ExcAC8B.seve2", &assign_ExcAC8B_seve2); + assign_map.emplace("cim:ExcAC8B.ta", &assign_ExcAC8B_ta); + assign_map.emplace("cim:ExcAC8B.tdr", &assign_ExcAC8B_tdr); + assign_map.emplace("cim:ExcAC8B.te", &assign_ExcAC8B_te); + assign_map.emplace("cim:ExcAC8B.telim", &assign_ExcAC8B_telim); + assign_map.emplace("cim:ExcAC8B.ve1", &assign_ExcAC8B_ve1); + assign_map.emplace("cim:ExcAC8B.ve2", &assign_ExcAC8B_ve2); + assign_map.emplace("cim:ExcAC8B.vemin", &assign_ExcAC8B_vemin); + assign_map.emplace("cim:ExcAC8B.vfemax", &assign_ExcAC8B_vfemax); + assign_map.emplace("cim:ExcAC8B.vimax", &assign_ExcAC8B_vimax); + assign_map.emplace("cim:ExcAC8B.vimin", &assign_ExcAC8B_vimin); + assign_map.emplace("cim:ExcAC8B.vpidmax", &assign_ExcAC8B_vpidmax); + assign_map.emplace("cim:ExcAC8B.vpidmin", &assign_ExcAC8B_vpidmin); + assign_map.emplace("cim:ExcAC8B.vrmax", &assign_ExcAC8B_vrmax); + assign_map.emplace("cim:ExcAC8B.vrmin", &assign_ExcAC8B_vrmin); + assign_map.emplace("cim:ExcAC8B.vtmult", &assign_ExcAC8B_vtmult); } void ExcAC8B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcAC8B.hpp b/CGMES_2.4.15_27JAN2020/ExcAC8B.hpp index 031fb5eca..578b1a281 100644 --- a/CGMES_2.4.15_27JAN2020/ExcAC8B.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcAC8B.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE AC8B alternator-supplied rectifier excitation system with speed input and input limiter. - */ + /** \brief Modified IEEE AC8B alternator-supplied rectifier excitation system with speed input and input limiter. */ class ExcAC8B : public ExcitationSystemDynamics { public: @@ -30,33 +28,86 @@ namespace CIMPP ExcAC8B(); ~ExcAC8B() override; - CIMPP::Boolean inlim; /* Input limiter indicator. true = input limiter Vimax and Vimin is considered false = input limiter Vimax and Vimin is not considered. Typical Value = true. Default: false */ - CIMPP::PU ka; /* Voltage regulator gain (Ka). Typical Value = 1. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.55. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (Kd). Typical Value = 1.1. Default: nullptr */ - CIMPP::PU kdr; /* Voltage regulator derivative gain (Kdr). Typical Value = 10. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ - CIMPP::PU kir; /* Voltage regulator integral gain (Kir). Typical Value = 5. Default: nullptr */ - CIMPP::PU kpr; /* Voltage regulator proportional gain (Kpr). Typical Value = 80. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ - CIMPP::Boolean pidlim; /* PID limiter indicator. true = input limiter Vpidmax and Vpidmin is considered false = input limiter Vpidmax and Vpidmin is not considered. Typical Value = true. Default: false */ - CIMPP::Simple_Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, Ve, back of commutating reactance (Se[Ve1]). Typical Value = 0.3. Default: nullptr */ - CIMPP::Simple_Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, Ve, back of commutating reactance (Se[Ve2]). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (Ta). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tdr; /* Lag time constant (Tdr). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 1.2. Default: nullptr */ - CIMPP::Boolean telim; /* Selector for the limiter on the block [1/sTe]. See diagram for meaning of true and false. Typical Value = false. Default: false */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve) equals V (Ve1). Typical Value = 6.5. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve). Typical Value = 9. Default: nullptr */ - CIMPP::PU vemin; /* Minimum exciter voltage output (Vemin). Typical Value = 0. Default: nullptr */ - CIMPP::PU vfemax; /* Exciter field current limit reference (Vfemax). Typical Value = 6. Default: nullptr */ - CIMPP::PU vimax; /* Input signal maximum (Vimax). Typical Value = 35. Default: nullptr */ - CIMPP::PU vimin; /* Input signal minimum (Vimin). Typical Value = -10. Default: nullptr */ - CIMPP::PU vpidmax; /* PID maximum controller output (Vpidmax). Typical Value = 35. Default: nullptr */ - CIMPP::PU vpidmin; /* PID minimum controller output (Vpidmin). Typical Value = -10. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (Vrmax). Typical Value = 35. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (Vrmin). Typical Value = 0. Default: nullptr */ - CIMPP::Boolean vtmult; /* Multiply by generator`s terminal voltage indicator. true =the limits Vrmax and Vrmin are multiplied by the generator`s terminal voltage to represent a thyristor power stage fed from the generator terminals false = limits are not multiplied by generator`s terminal voltage. Typical Value = false. Default: false */ + /** \brief Input limiter indicator. true = input limiter Vimax and Vimin is considered false = input limiter Vimax and Vimin is not considered. Typical Value = true. Default: false */ + CIMPP::Boolean inlim; + + /** \brief Voltage regulator gain (Ka). Typical Value = 1. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.55. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (Kd). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Voltage regulator derivative gain (Kdr). Typical Value = 10. Default: nullptr */ + CIMPP::PU kdr; + + /** \brief Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Voltage regulator integral gain (Kir). Typical Value = 5. Default: nullptr */ + CIMPP::PU kir; + + /** \brief Voltage regulator proportional gain (Kpr). Typical Value = 80. Default: nullptr */ + CIMPP::PU kpr; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief PID limiter indicator. true = input limiter Vpidmax and Vpidmin is considered false = input limiter Vpidmax and Vpidmin is not considered. Typical Value = true. Default: false */ + CIMPP::Boolean pidlim; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Ve, back of commutating reactance (Se[Ve1]). Typical Value = 0.3. Default: nullptr */ + CIMPP::Simple_Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Ve, back of commutating reactance (Se[Ve2]). Typical Value = 3. Default: nullptr */ + CIMPP::Simple_Float seve2; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Lag time constant (Tdr). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tdr; + + /** \brief Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 1.2. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Selector for the limiter on the block [1/sTe]. See diagram for meaning of true and false. Typical Value = false. Default: false */ + CIMPP::Boolean telim; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve) equals V (Ve1). Typical Value = 6.5. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve). Typical Value = 9. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Minimum exciter voltage output (Vemin). Typical Value = 0. Default: nullptr */ + CIMPP::PU vemin; + + /** \brief Exciter field current limit reference (Vfemax). Typical Value = 6. Default: nullptr */ + CIMPP::PU vfemax; + + /** \brief Input signal maximum (Vimax). Typical Value = 35. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Input signal minimum (Vimin). Typical Value = -10. Default: nullptr */ + CIMPP::PU vimin; + + /** \brief PID maximum controller output (Vpidmax). Typical Value = 35. Default: nullptr */ + CIMPP::PU vpidmax; + + /** \brief PID minimum controller output (Vpidmin). Typical Value = -10. Default: nullptr */ + CIMPP::PU vpidmin; + + /** \brief Maximum voltage regulator output (Vrmax). Typical Value = 35. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (Vrmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief Multiply by generator`s terminal voltage indicator. true =the limits Vrmax and Vrmin are multiplied by the generator`s terminal voltage to represent a thyristor power stage fed from the generator terminals false = limits are not multiplied by generator`s terminal voltage. Typical Value = false. Default: false */ + CIMPP::Boolean vtmult; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcANS.cpp b/CGMES_2.4.15_27JAN2020/ExcANS.cpp index 47d299ea9..afc2cb7d6 100644 --- a/CGMES_2.4.15_27JAN2020/ExcANS.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcANS.cpp @@ -8,25 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Integer.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Integer.hpp" -#include "Integer.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcANS::ExcANS() {}; -ExcANS::~ExcANS() {}; +ExcANS::ExcANS() {} +ExcANS::~ExcANS() {} static const std::list PossibleProfilesForClass = { @@ -66,194 +52,206 @@ ExcANS::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcANS_blint(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_blint(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->blint; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_ifmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_ifmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ifmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_ifmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_ifmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ifmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_kce(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_kce(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kce; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_krvecc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_krvecc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->krvecc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_kvfif(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_kvfif(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kvfif; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_vrmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_vrmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_vrmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_vrmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcANS_blint(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->blint; if (!buffer.str().empty()) @@ -267,7 +265,8 @@ bool get_ExcANS_blint(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcANS_ifmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ifmn; if (!buffer.str().empty()) @@ -281,7 +280,8 @@ bool get_ExcANS_ifmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_ifmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ifmx; if (!buffer.str().empty()) @@ -295,7 +295,8 @@ bool get_ExcANS_ifmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -309,7 +310,8 @@ bool get_ExcANS_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -323,7 +325,8 @@ bool get_ExcANS_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_kce(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kce; if (!buffer.str().empty()) @@ -337,7 +340,8 @@ bool get_ExcANS_kce(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_krvecc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->krvecc; if (!buffer.str().empty()) @@ -351,7 +355,8 @@ bool get_ExcANS_krvecc(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcANS_kvfif(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kvfif; if (!buffer.str().empty()) @@ -365,7 +370,8 @@ bool get_ExcANS_kvfif(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcANS_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -379,7 +385,8 @@ bool get_ExcANS_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -393,7 +400,8 @@ bool get_ExcANS_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -407,7 +415,8 @@ bool get_ExcANS_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -421,7 +430,8 @@ bool get_ExcANS_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmn; if (!buffer.str().empty()) @@ -435,7 +445,8 @@ bool get_ExcANS_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmx; if (!buffer.str().empty()) @@ -447,8 +458,6 @@ bool get_ExcANS_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcANS::debugName[] = "ExcANS"; const char* ExcANS::debugString() const { @@ -457,25 +466,25 @@ const char* ExcANS::debugString() const void ExcANS::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcANS"), &ExcANS_factory)); + factory_map.emplace("cim:ExcANS", &ExcANS_factory); } void ExcANS::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcANS.blint"), &assign_ExcANS_blint)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.ifmn"), &assign_ExcANS_ifmn)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.ifmx"), &assign_ExcANS_ifmx)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.k2"), &assign_ExcANS_k2)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.k3"), &assign_ExcANS_k3)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.kce"), &assign_ExcANS_kce)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.krvecc"), &assign_ExcANS_krvecc)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.kvfif"), &assign_ExcANS_kvfif)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.t1"), &assign_ExcANS_t1)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.t2"), &assign_ExcANS_t2)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.t3"), &assign_ExcANS_t3)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.tb"), &assign_ExcANS_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.vrmn"), &assign_ExcANS_vrmn)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.vrmx"), &assign_ExcANS_vrmx)); + assign_map.emplace("cim:ExcANS.blint", &assign_ExcANS_blint); + assign_map.emplace("cim:ExcANS.ifmn", &assign_ExcANS_ifmn); + assign_map.emplace("cim:ExcANS.ifmx", &assign_ExcANS_ifmx); + assign_map.emplace("cim:ExcANS.k2", &assign_ExcANS_k2); + assign_map.emplace("cim:ExcANS.k3", &assign_ExcANS_k3); + assign_map.emplace("cim:ExcANS.kce", &assign_ExcANS_kce); + assign_map.emplace("cim:ExcANS.krvecc", &assign_ExcANS_krvecc); + assign_map.emplace("cim:ExcANS.kvfif", &assign_ExcANS_kvfif); + assign_map.emplace("cim:ExcANS.t1", &assign_ExcANS_t1); + assign_map.emplace("cim:ExcANS.t2", &assign_ExcANS_t2); + assign_map.emplace("cim:ExcANS.t3", &assign_ExcANS_t3); + assign_map.emplace("cim:ExcANS.tb", &assign_ExcANS_tb); + assign_map.emplace("cim:ExcANS.vrmn", &assign_ExcANS_vrmn); + assign_map.emplace("cim:ExcANS.vrmx", &assign_ExcANS_vrmx); } void ExcANS::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcANS.hpp b/CGMES_2.4.15_27JAN2020/ExcANS.hpp index f7070ce55..b1ba9b1be 100644 --- a/CGMES_2.4.15_27JAN2020/ExcANS.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcANS.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Italian excitation system. It represents static field voltage or excitation current feedback excitation system. - */ + /** \brief Italian excitation system. It represents static field voltage or excitation current feedback excitation system. */ class ExcANS : public ExcitationSystemDynamics { public: @@ -30,20 +28,47 @@ namespace CIMPP ExcANS(); ~ExcANS() override; - CIMPP::Integer blint; /* Governor Control Flag (BLINT). 0 = lead-lag regulator 1 = proportional integral regulator. Typical Value = 0. Default: 0 */ - CIMPP::PU ifmn; /* Minimum exciter current (I). Typical Value = -5.2. Default: nullptr */ - CIMPP::PU ifmx; /* Maximum exciter current (I). Typical Value = 6.5. Default: nullptr */ - CIMPP::Simple_Float k2; /* Exciter gain (K). Typical Value = 20. Default: nullptr */ - CIMPP::Simple_Float k3; /* AVR gain (K). Typical Value = 1000. Default: nullptr */ - CIMPP::Simple_Float kce; /* Ceiling factor (K). Typical Value = 1. Default: nullptr */ - CIMPP::Integer krvecc; /* Feedback enabling (K). 0 = Open loop control 1 = Closed loop control. Typical Value = 1. Default: 0 */ - CIMPP::Integer kvfif; /* Rate feedback signal flag (K). 0 = output voltage of the exciter 1 = exciter field current. Typical Value = 0. Default: 0 */ - CIMPP::Seconds t1; /* Time constant (T). Typical Value = 20. Default: nullptr */ - CIMPP::Seconds t2; /* Time constant (T). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds t3; /* Time constant (T). Typical Value = 1.6. Default: nullptr */ - CIMPP::Seconds tb; /* Exciter time constant (T). Typical Value = 0.04. Default: nullptr */ - CIMPP::PU vrmn; /* Maximum AVR output (V). Typical Value = -5.2. Default: nullptr */ - CIMPP::PU vrmx; /* Minimum AVR output (V). Typical Value = 6.5. Default: nullptr */ + /** \brief Governor Control Flag (BLINT). 0 = lead-lag regulator 1 = proportional integral regulator. Typical Value = 0. Default: 0 */ + CIMPP::Integer blint; + + /** \brief Minimum exciter current (I). Typical Value = -5.2. Default: nullptr */ + CIMPP::PU ifmn; + + /** \brief Maximum exciter current (I). Typical Value = 6.5. Default: nullptr */ + CIMPP::PU ifmx; + + /** \brief Exciter gain (K). Typical Value = 20. Default: nullptr */ + CIMPP::Simple_Float k2; + + /** \brief AVR gain (K). Typical Value = 1000. Default: nullptr */ + CIMPP::Simple_Float k3; + + /** \brief Ceiling factor (K). Typical Value = 1. Default: nullptr */ + CIMPP::Simple_Float kce; + + /** \brief Feedback enabling (K). 0 = Open loop control 1 = Closed loop control. Typical Value = 1. Default: 0 */ + CIMPP::Integer krvecc; + + /** \brief Rate feedback signal flag (K). 0 = output voltage of the exciter 1 = exciter field current. Typical Value = 0. Default: 0 */ + CIMPP::Integer kvfif; + + /** \brief Time constant (T). Typical Value = 20. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Time constant (T). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Time constant (T). Typical Value = 1.6. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Exciter time constant (T). Typical Value = 0.04. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Maximum AVR output (V). Typical Value = -5.2. Default: nullptr */ + CIMPP::PU vrmn; + + /** \brief Minimum AVR output (V). Typical Value = 6.5. Default: nullptr */ + CIMPP::PU vrmx; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcAVR1.cpp b/CGMES_2.4.15_27JAN2020/ExcAVR1.cpp index ebacbeeaa..3daf41454 100644 --- a/CGMES_2.4.15_27JAN2020/ExcAVR1.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcAVR1.cpp @@ -8,23 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAVR1::ExcAVR1() {}; -ExcAVR1::~ExcAVR1() {}; +ExcAVR1::ExcAVR1() {} +ExcAVR1::~ExcAVR1() {} static const std::list PossibleProfilesForClass = { @@ -62,168 +50,178 @@ ExcAVR1::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAVR1_e1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_e1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_e2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_e2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_se1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_se1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_se2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_se2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_vrmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_vrmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_vrmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_vrmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAVR1_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e1; if (!buffer.str().empty()) @@ -237,7 +235,8 @@ bool get_ExcAVR1_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e2; if (!buffer.str().empty()) @@ -251,7 +250,8 @@ bool get_ExcAVR1_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -265,7 +265,8 @@ bool get_ExcAVR1_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -279,7 +280,8 @@ bool get_ExcAVR1_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se1; if (!buffer.str().empty()) @@ -293,7 +295,8 @@ bool get_ExcAVR1_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se2; if (!buffer.str().empty()) @@ -307,7 +310,8 @@ bool get_ExcAVR1_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -321,7 +325,8 @@ bool get_ExcAVR1_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -335,7 +340,8 @@ bool get_ExcAVR1_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -349,7 +355,8 @@ bool get_ExcAVR1_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -363,7 +370,8 @@ bool get_ExcAVR1_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmn; if (!buffer.str().empty()) @@ -377,7 +385,8 @@ bool get_ExcAVR1_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAVR1_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmx; if (!buffer.str().empty()) @@ -389,8 +398,6 @@ bool get_ExcAVR1_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char ExcAVR1::debugName[] = "ExcAVR1"; const char* ExcAVR1::debugString() const { @@ -399,23 +406,23 @@ const char* ExcAVR1::debugString() const void ExcAVR1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAVR1"), &ExcAVR1_factory)); + factory_map.emplace("cim:ExcAVR1", &ExcAVR1_factory); } void ExcAVR1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.e1"), &assign_ExcAVR1_e1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.e2"), &assign_ExcAVR1_e2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.ka"), &assign_ExcAVR1_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.kf"), &assign_ExcAVR1_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.se1"), &assign_ExcAVR1_se1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.se2"), &assign_ExcAVR1_se2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.ta"), &assign_ExcAVR1_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.tb"), &assign_ExcAVR1_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.te"), &assign_ExcAVR1_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.tf"), &assign_ExcAVR1_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.vrmn"), &assign_ExcAVR1_vrmn)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.vrmx"), &assign_ExcAVR1_vrmx)); + assign_map.emplace("cim:ExcAVR1.e1", &assign_ExcAVR1_e1); + assign_map.emplace("cim:ExcAVR1.e2", &assign_ExcAVR1_e2); + assign_map.emplace("cim:ExcAVR1.ka", &assign_ExcAVR1_ka); + assign_map.emplace("cim:ExcAVR1.kf", &assign_ExcAVR1_kf); + assign_map.emplace("cim:ExcAVR1.se1", &assign_ExcAVR1_se1); + assign_map.emplace("cim:ExcAVR1.se2", &assign_ExcAVR1_se2); + assign_map.emplace("cim:ExcAVR1.ta", &assign_ExcAVR1_ta); + assign_map.emplace("cim:ExcAVR1.tb", &assign_ExcAVR1_tb); + assign_map.emplace("cim:ExcAVR1.te", &assign_ExcAVR1_te); + assign_map.emplace("cim:ExcAVR1.tf", &assign_ExcAVR1_tf); + assign_map.emplace("cim:ExcAVR1.vrmn", &assign_ExcAVR1_vrmn); + assign_map.emplace("cim:ExcAVR1.vrmx", &assign_ExcAVR1_vrmx); } void ExcAVR1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcAVR1.hpp b/CGMES_2.4.15_27JAN2020/ExcAVR1.hpp index 7362bd560..867d7920d 100644 --- a/CGMES_2.4.15_27JAN2020/ExcAVR1.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcAVR1.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Italian excitation system corresponding to IEEE (1968) Type 1 Model. It represents exciter dynamo and electromechanical regulator. - */ + /** \brief Italian excitation system corresponding to IEEE (1968) Type 1 Model. It represents exciter dynamo and electromechanical regulator. */ class ExcAVR1 : public ExcitationSystemDynamics { public: @@ -29,18 +27,41 @@ namespace CIMPP ExcAVR1(); ~ExcAVR1() override; - CIMPP::PU e1; /* Field voltage value 1 (E1). Typical Value = 4.18. Default: nullptr */ - CIMPP::PU e2; /* Field voltage value 2 (E2). Typical Value = 3.14. Default: nullptr */ - CIMPP::Simple_Float ka; /* AVR gain (K). Typical Value = 500. Default: nullptr */ - CIMPP::Simple_Float kf; /* Rate feedback gain (K). Typical Value = 0.02. Default: nullptr */ - CIMPP::Simple_Float se1; /* Saturation factor at E1 (S(E1)). Typical Value = 0.1. Default: nullptr */ - CIMPP::Simple_Float se2; /* Saturation factor at E2 (S(E2)). Typical Value = 0.03. Default: nullptr */ - CIMPP::Seconds ta; /* AVR time constant (T). Typical Value = 0.2. Default: nullptr */ - CIMPP::Seconds tb; /* AVR time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tf; /* Rate feedback time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmn; /* Maximum AVR output (V). Typical Value = -6. Default: nullptr */ - CIMPP::PU vrmx; /* Minimum AVR output (V). Typical Value = 7. Default: nullptr */ + /** \brief Field voltage value 1 (E1). Typical Value = 4.18. Default: nullptr */ + CIMPP::PU e1; + + /** \brief Field voltage value 2 (E2). Typical Value = 3.14. Default: nullptr */ + CIMPP::PU e2; + + /** \brief AVR gain (K). Typical Value = 500. Default: nullptr */ + CIMPP::Simple_Float ka; + + /** \brief Rate feedback gain (K). Typical Value = 0.02. Default: nullptr */ + CIMPP::Simple_Float kf; + + /** \brief Saturation factor at E1 (S(E1)). Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float se1; + + /** \brief Saturation factor at E2 (S(E2)). Typical Value = 0.03. Default: nullptr */ + CIMPP::Simple_Float se2; + + /** \brief AVR time constant (T). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief AVR time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Exciter time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Rate feedback time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum AVR output (V). Typical Value = -6. Default: nullptr */ + CIMPP::PU vrmn; + + /** \brief Minimum AVR output (V). Typical Value = 7. Default: nullptr */ + CIMPP::PU vrmx; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcAVR2.cpp b/CGMES_2.4.15_27JAN2020/ExcAVR2.cpp index 8c06474e9..c9f8d13de 100644 --- a/CGMES_2.4.15_27JAN2020/ExcAVR2.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcAVR2.cpp @@ -8,24 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAVR2::ExcAVR2() {}; -ExcAVR2::~ExcAVR2() {}; +ExcAVR2::ExcAVR2() {} +ExcAVR2::~ExcAVR2() {} static const std::list PossibleProfilesForClass = { @@ -64,181 +51,192 @@ ExcAVR2::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAVR2_e1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_e1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_e2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_e2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_se1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_se1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_se2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_se2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_tf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_tf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_vrmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_vrmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_vrmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_vrmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAVR2_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e1; if (!buffer.str().empty()) @@ -252,7 +250,8 @@ bool get_ExcAVR2_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e2; if (!buffer.str().empty()) @@ -266,7 +265,8 @@ bool get_ExcAVR2_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -280,7 +280,8 @@ bool get_ExcAVR2_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -294,7 +295,8 @@ bool get_ExcAVR2_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se1; if (!buffer.str().empty()) @@ -308,7 +310,8 @@ bool get_ExcAVR2_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se2; if (!buffer.str().empty()) @@ -322,7 +325,8 @@ bool get_ExcAVR2_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -336,7 +340,8 @@ bool get_ExcAVR2_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -350,7 +355,8 @@ bool get_ExcAVR2_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -364,7 +370,8 @@ bool get_ExcAVR2_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf1; if (!buffer.str().empty()) @@ -378,7 +385,8 @@ bool get_ExcAVR2_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf2; if (!buffer.str().empty()) @@ -392,7 +400,8 @@ bool get_ExcAVR2_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmn; if (!buffer.str().empty()) @@ -406,7 +415,8 @@ bool get_ExcAVR2_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAVR2_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmx; if (!buffer.str().empty()) @@ -418,8 +428,6 @@ bool get_ExcAVR2_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char ExcAVR2::debugName[] = "ExcAVR2"; const char* ExcAVR2::debugString() const { @@ -428,24 +436,24 @@ const char* ExcAVR2::debugString() const void ExcAVR2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAVR2"), &ExcAVR2_factory)); + factory_map.emplace("cim:ExcAVR2", &ExcAVR2_factory); } void ExcAVR2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.e1"), &assign_ExcAVR2_e1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.e2"), &assign_ExcAVR2_e2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.ka"), &assign_ExcAVR2_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.kf"), &assign_ExcAVR2_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.se1"), &assign_ExcAVR2_se1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.se2"), &assign_ExcAVR2_se2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.ta"), &assign_ExcAVR2_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.tb"), &assign_ExcAVR2_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.te"), &assign_ExcAVR2_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.tf1"), &assign_ExcAVR2_tf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.tf2"), &assign_ExcAVR2_tf2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.vrmn"), &assign_ExcAVR2_vrmn)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.vrmx"), &assign_ExcAVR2_vrmx)); + assign_map.emplace("cim:ExcAVR2.e1", &assign_ExcAVR2_e1); + assign_map.emplace("cim:ExcAVR2.e2", &assign_ExcAVR2_e2); + assign_map.emplace("cim:ExcAVR2.ka", &assign_ExcAVR2_ka); + assign_map.emplace("cim:ExcAVR2.kf", &assign_ExcAVR2_kf); + assign_map.emplace("cim:ExcAVR2.se1", &assign_ExcAVR2_se1); + assign_map.emplace("cim:ExcAVR2.se2", &assign_ExcAVR2_se2); + assign_map.emplace("cim:ExcAVR2.ta", &assign_ExcAVR2_ta); + assign_map.emplace("cim:ExcAVR2.tb", &assign_ExcAVR2_tb); + assign_map.emplace("cim:ExcAVR2.te", &assign_ExcAVR2_te); + assign_map.emplace("cim:ExcAVR2.tf1", &assign_ExcAVR2_tf1); + assign_map.emplace("cim:ExcAVR2.tf2", &assign_ExcAVR2_tf2); + assign_map.emplace("cim:ExcAVR2.vrmn", &assign_ExcAVR2_vrmn); + assign_map.emplace("cim:ExcAVR2.vrmx", &assign_ExcAVR2_vrmx); } void ExcAVR2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcAVR2.hpp b/CGMES_2.4.15_27JAN2020/ExcAVR2.hpp index 7cbf8178f..4ef10bee6 100644 --- a/CGMES_2.4.15_27JAN2020/ExcAVR2.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcAVR2.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Italian excitation system corresponding to IEEE (1968) Type 2 Model. It represents alternator and rotating diodes and electromechanic voltage regulators. - */ + /** \brief Italian excitation system corresponding to IEEE (1968) Type 2 Model. It represents alternator and rotating diodes and electromechanic voltage regulators. */ class ExcAVR2 : public ExcitationSystemDynamics { public: @@ -29,19 +27,44 @@ namespace CIMPP ExcAVR2(); ~ExcAVR2() override; - CIMPP::PU e1; /* Field voltage value 1 (E1). Typical Value = 4.18. Default: nullptr */ - CIMPP::PU e2; /* Field voltage value 2 (E2). Typical Value = 3.14. Default: nullptr */ - CIMPP::Simple_Float ka; /* AVR gain (K). Typical Value = 500. Default: nullptr */ - CIMPP::Simple_Float kf; /* Rate feedback gain (K). Typical Value = 0.02. Default: nullptr */ - CIMPP::Simple_Float se1; /* Saturation factor at E1 (S(E1)). Typical Value = 0.1. Default: nullptr */ - CIMPP::Simple_Float se2; /* Saturation factor at E2 (S(E2)). Typical Value = 0.03. Default: nullptr */ - CIMPP::Seconds ta; /* AVR time constant (T). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds tb; /* AVR time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tf1; /* Rate feedback time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tf2; /* Rate feedback time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmn; /* Maximum AVR output (V). Typical Value = -6. Default: nullptr */ - CIMPP::PU vrmx; /* Minimum AVR output (V). Typical Value = 7. Default: nullptr */ + /** \brief Field voltage value 1 (E1). Typical Value = 4.18. Default: nullptr */ + CIMPP::PU e1; + + /** \brief Field voltage value 2 (E2). Typical Value = 3.14. Default: nullptr */ + CIMPP::PU e2; + + /** \brief AVR gain (K). Typical Value = 500. Default: nullptr */ + CIMPP::Simple_Float ka; + + /** \brief Rate feedback gain (K). Typical Value = 0.02. Default: nullptr */ + CIMPP::Simple_Float kf; + + /** \brief Saturation factor at E1 (S(E1)). Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float se1; + + /** \brief Saturation factor at E2 (S(E2)). Typical Value = 0.03. Default: nullptr */ + CIMPP::Simple_Float se2; + + /** \brief AVR time constant (T). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief AVR time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Exciter time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Rate feedback time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf1; + + /** \brief Rate feedback time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf2; + + /** \brief Maximum AVR output (V). Typical Value = -6. Default: nullptr */ + CIMPP::PU vrmn; + + /** \brief Minimum AVR output (V). Typical Value = 7. Default: nullptr */ + CIMPP::PU vrmx; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcAVR3.cpp b/CGMES_2.4.15_27JAN2020/ExcAVR3.cpp index 00da9f06e..a58bdda7d 100644 --- a/CGMES_2.4.15_27JAN2020/ExcAVR3.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcAVR3.cpp @@ -8,23 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAVR3::ExcAVR3() {}; -ExcAVR3::~ExcAVR3() {}; +ExcAVR3::ExcAVR3() {} +ExcAVR3::~ExcAVR3() {} static const std::list PossibleProfilesForClass = { @@ -62,168 +50,178 @@ ExcAVR3::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAVR3_e1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_e1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_e2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_e2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_se1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_se1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_se2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_se2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_vrmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_vrmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_vrmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_vrmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAVR3_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e1; if (!buffer.str().empty()) @@ -237,7 +235,8 @@ bool get_ExcAVR3_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e2; if (!buffer.str().empty()) @@ -251,7 +250,8 @@ bool get_ExcAVR3_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -265,7 +265,8 @@ bool get_ExcAVR3_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se1; if (!buffer.str().empty()) @@ -279,7 +280,8 @@ bool get_ExcAVR3_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se2; if (!buffer.str().empty()) @@ -293,7 +295,8 @@ bool get_ExcAVR3_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -307,7 +310,8 @@ bool get_ExcAVR3_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -321,7 +325,8 @@ bool get_ExcAVR3_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -335,7 +340,8 @@ bool get_ExcAVR3_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -349,7 +355,8 @@ bool get_ExcAVR3_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -363,7 +370,8 @@ bool get_ExcAVR3_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmn; if (!buffer.str().empty()) @@ -377,7 +385,8 @@ bool get_ExcAVR3_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAVR3_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmx; if (!buffer.str().empty()) @@ -389,8 +398,6 @@ bool get_ExcAVR3_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char ExcAVR3::debugName[] = "ExcAVR3"; const char* ExcAVR3::debugString() const { @@ -399,23 +406,23 @@ const char* ExcAVR3::debugString() const void ExcAVR3::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAVR3"), &ExcAVR3_factory)); + factory_map.emplace("cim:ExcAVR3", &ExcAVR3_factory); } void ExcAVR3::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.e1"), &assign_ExcAVR3_e1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.e2"), &assign_ExcAVR3_e2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.ka"), &assign_ExcAVR3_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.se1"), &assign_ExcAVR3_se1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.se2"), &assign_ExcAVR3_se2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.t1"), &assign_ExcAVR3_t1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.t2"), &assign_ExcAVR3_t2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.t3"), &assign_ExcAVR3_t3)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.t4"), &assign_ExcAVR3_t4)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.te"), &assign_ExcAVR3_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.vrmn"), &assign_ExcAVR3_vrmn)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.vrmx"), &assign_ExcAVR3_vrmx)); + assign_map.emplace("cim:ExcAVR3.e1", &assign_ExcAVR3_e1); + assign_map.emplace("cim:ExcAVR3.e2", &assign_ExcAVR3_e2); + assign_map.emplace("cim:ExcAVR3.ka", &assign_ExcAVR3_ka); + assign_map.emplace("cim:ExcAVR3.se1", &assign_ExcAVR3_se1); + assign_map.emplace("cim:ExcAVR3.se2", &assign_ExcAVR3_se2); + assign_map.emplace("cim:ExcAVR3.t1", &assign_ExcAVR3_t1); + assign_map.emplace("cim:ExcAVR3.t2", &assign_ExcAVR3_t2); + assign_map.emplace("cim:ExcAVR3.t3", &assign_ExcAVR3_t3); + assign_map.emplace("cim:ExcAVR3.t4", &assign_ExcAVR3_t4); + assign_map.emplace("cim:ExcAVR3.te", &assign_ExcAVR3_te); + assign_map.emplace("cim:ExcAVR3.vrmn", &assign_ExcAVR3_vrmn); + assign_map.emplace("cim:ExcAVR3.vrmx", &assign_ExcAVR3_vrmx); } void ExcAVR3::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcAVR3.hpp b/CGMES_2.4.15_27JAN2020/ExcAVR3.hpp index 6fe6dbd5a..9e24fc4b5 100644 --- a/CGMES_2.4.15_27JAN2020/ExcAVR3.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcAVR3.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Italian excitation system. It represents exciter dynamo and electric regulator. - */ + /** \brief Italian excitation system. It represents exciter dynamo and electric regulator. */ class ExcAVR3 : public ExcitationSystemDynamics { public: @@ -29,18 +27,41 @@ namespace CIMPP ExcAVR3(); ~ExcAVR3() override; - CIMPP::PU e1; /* Field voltage value 1 (E1). Typical Value = 4.18. Default: nullptr */ - CIMPP::PU e2; /* Field voltage value 2 (E2). Typical Value = 3.14. Default: nullptr */ - CIMPP::Simple_Float ka; /* AVR gain (K). Typical Value = 3000. Default: nullptr */ - CIMPP::Simple_Float se1; /* Saturation factor at E1 (S(E1)). Typical Value = 0.1. Default: nullptr */ - CIMPP::Simple_Float se2; /* Saturation factor at E2 (S(E2)). Typical Value = 0.03. Default: nullptr */ - CIMPP::Seconds t1; /* AVR time constant (T). Typical Value = 220. Default: nullptr */ - CIMPP::Seconds t2; /* AVR time constant (T). Typical Value = 1.6. Default: nullptr */ - CIMPP::Seconds t3; /* AVR time constant (T). Typical Value = 0.66. Default: nullptr */ - CIMPP::Seconds t4; /* AVR time constant (T). Typical Value = 0.07. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmn; /* Maximum AVR output (V). Typical Value = -7.5. Default: nullptr */ - CIMPP::PU vrmx; /* Minimum AVR output (V). Typical Value = 7.5. Default: nullptr */ + /** \brief Field voltage value 1 (E1). Typical Value = 4.18. Default: nullptr */ + CIMPP::PU e1; + + /** \brief Field voltage value 2 (E2). Typical Value = 3.14. Default: nullptr */ + CIMPP::PU e2; + + /** \brief AVR gain (K). Typical Value = 3000. Default: nullptr */ + CIMPP::Simple_Float ka; + + /** \brief Saturation factor at E1 (S(E1)). Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float se1; + + /** \brief Saturation factor at E2 (S(E2)). Typical Value = 0.03. Default: nullptr */ + CIMPP::Simple_Float se2; + + /** \brief AVR time constant (T). Typical Value = 220. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief AVR time constant (T). Typical Value = 1.6. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief AVR time constant (T). Typical Value = 0.66. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief AVR time constant (T). Typical Value = 0.07. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Exciter time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Maximum AVR output (V). Typical Value = -7.5. Default: nullptr */ + CIMPP::PU vrmn; + + /** \brief Minimum AVR output (V). Typical Value = 7.5. Default: nullptr */ + CIMPP::PU vrmx; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcAVR4.cpp b/CGMES_2.4.15_27JAN2020/ExcAVR4.cpp index a48063509..52fd9e5cd 100644 --- a/CGMES_2.4.15_27JAN2020/ExcAVR4.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcAVR4.cpp @@ -8,25 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAVR4::ExcAVR4() {}; -ExcAVR4::~ExcAVR4() {}; +ExcAVR4::ExcAVR4() {} +ExcAVR4::~ExcAVR4() {} static const std::list PossibleProfilesForClass = { @@ -66,194 +52,206 @@ ExcAVR4::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAVR4_imul(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_imul(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->imul; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_kif(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_kif(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kif; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_t1if(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_t1if(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1if; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_tif(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_tif(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tif; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_vfmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_vfmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_vfmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_vfmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_vrmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_vrmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_vrmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_vrmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAVR4_imul(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->imul; if (!buffer.str().empty()) @@ -267,7 +265,8 @@ bool get_ExcAVR4_imul(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAVR4_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -281,7 +280,8 @@ bool get_ExcAVR4_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR4_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -295,7 +295,8 @@ bool get_ExcAVR4_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR4_kif(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kif; if (!buffer.str().empty()) @@ -309,7 +310,8 @@ bool get_ExcAVR4_kif(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR4_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -323,7 +325,8 @@ bool get_ExcAVR4_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR4_t1if(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1if; if (!buffer.str().empty()) @@ -337,7 +340,8 @@ bool get_ExcAVR4_t1if(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAVR4_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -351,7 +355,8 @@ bool get_ExcAVR4_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR4_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -365,7 +370,8 @@ bool get_ExcAVR4_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR4_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -379,7 +385,8 @@ bool get_ExcAVR4_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR4_tif(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tif; if (!buffer.str().empty()) @@ -393,7 +400,8 @@ bool get_ExcAVR4_tif(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR4_vfmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfmn; if (!buffer.str().empty()) @@ -407,7 +415,8 @@ bool get_ExcAVR4_vfmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAVR4_vfmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfmx; if (!buffer.str().empty()) @@ -421,7 +430,8 @@ bool get_ExcAVR4_vfmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAVR4_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmn; if (!buffer.str().empty()) @@ -435,7 +445,8 @@ bool get_ExcAVR4_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAVR4_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmx; if (!buffer.str().empty()) @@ -447,8 +458,6 @@ bool get_ExcAVR4_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char ExcAVR4::debugName[] = "ExcAVR4"; const char* ExcAVR4::debugString() const { @@ -457,25 +466,25 @@ const char* ExcAVR4::debugString() const void ExcAVR4::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAVR4"), &ExcAVR4_factory)); + factory_map.emplace("cim:ExcAVR4", &ExcAVR4_factory); } void ExcAVR4::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.imul"), &assign_ExcAVR4_imul)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.ka"), &assign_ExcAVR4_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.ke"), &assign_ExcAVR4_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.kif"), &assign_ExcAVR4_kif)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.t1"), &assign_ExcAVR4_t1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.t1if"), &assign_ExcAVR4_t1if)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.t2"), &assign_ExcAVR4_t2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.t3"), &assign_ExcAVR4_t3)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.t4"), &assign_ExcAVR4_t4)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.tif"), &assign_ExcAVR4_tif)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.vfmn"), &assign_ExcAVR4_vfmn)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.vfmx"), &assign_ExcAVR4_vfmx)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.vrmn"), &assign_ExcAVR4_vrmn)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.vrmx"), &assign_ExcAVR4_vrmx)); + assign_map.emplace("cim:ExcAVR4.imul", &assign_ExcAVR4_imul); + assign_map.emplace("cim:ExcAVR4.ka", &assign_ExcAVR4_ka); + assign_map.emplace("cim:ExcAVR4.ke", &assign_ExcAVR4_ke); + assign_map.emplace("cim:ExcAVR4.kif", &assign_ExcAVR4_kif); + assign_map.emplace("cim:ExcAVR4.t1", &assign_ExcAVR4_t1); + assign_map.emplace("cim:ExcAVR4.t1if", &assign_ExcAVR4_t1if); + assign_map.emplace("cim:ExcAVR4.t2", &assign_ExcAVR4_t2); + assign_map.emplace("cim:ExcAVR4.t3", &assign_ExcAVR4_t3); + assign_map.emplace("cim:ExcAVR4.t4", &assign_ExcAVR4_t4); + assign_map.emplace("cim:ExcAVR4.tif", &assign_ExcAVR4_tif); + assign_map.emplace("cim:ExcAVR4.vfmn", &assign_ExcAVR4_vfmn); + assign_map.emplace("cim:ExcAVR4.vfmx", &assign_ExcAVR4_vfmx); + assign_map.emplace("cim:ExcAVR4.vrmn", &assign_ExcAVR4_vrmn); + assign_map.emplace("cim:ExcAVR4.vrmx", &assign_ExcAVR4_vrmx); } void ExcAVR4::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcAVR4.hpp b/CGMES_2.4.15_27JAN2020/ExcAVR4.hpp index c1d41dcdd..f77d11a15 100644 --- a/CGMES_2.4.15_27JAN2020/ExcAVR4.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcAVR4.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Italian excitation system. It represents static exciter and electric voltage regulator. - */ + /** \brief Italian excitation system. It represents static exciter and electric voltage regulator. */ class ExcAVR4 : public ExcitationSystemDynamics { public: @@ -30,20 +28,47 @@ namespace CIMPP ExcAVR4(); ~ExcAVR4() override; - CIMPP::Boolean imul; /* AVR output voltage dependency selector (Imul). true = selector is connected false = selector is not connected. Typical Value = true. Default: false */ - CIMPP::Simple_Float ka; /* AVR gain (K). Typical Value = 300. Default: nullptr */ - CIMPP::Simple_Float ke; /* Exciter gain (K). Typical Value = 1. Default: nullptr */ - CIMPP::Simple_Float kif; /* Exciter internal reactance (K). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t1; /* AVR time constant (T). Typical Value = 4.8. Default: nullptr */ - CIMPP::Seconds t1if; /* Exciter current feedback time constant (T). Typical Value = 60. Default: nullptr */ - CIMPP::Seconds t2; /* AVR time constant (T). Typical Value = 1.5. Default: nullptr */ - CIMPP::Seconds t3; /* AVR time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t4; /* AVR time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tif; /* Exciter current feedback time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::PU vfmn; /* Minimum exciter output (V). Typical Value = 0. Default: nullptr */ - CIMPP::PU vfmx; /* Maximum exciter output (V). Typical Value = 5. Default: nullptr */ - CIMPP::PU vrmn; /* Maximum AVR output (V). Typical Value = 0. Default: nullptr */ - CIMPP::PU vrmx; /* Minimum AVR output (V). Typical Value = 5. Default: nullptr */ + /** \brief AVR output voltage dependency selector (Imul). true = selector is connected false = selector is not connected. Typical Value = true. Default: false */ + CIMPP::Boolean imul; + + /** \brief AVR gain (K). Typical Value = 300. Default: nullptr */ + CIMPP::Simple_Float ka; + + /** \brief Exciter gain (K). Typical Value = 1. Default: nullptr */ + CIMPP::Simple_Float ke; + + /** \brief Exciter internal reactance (K). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float kif; + + /** \brief AVR time constant (T). Typical Value = 4.8. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Exciter current feedback time constant (T). Typical Value = 60. Default: nullptr */ + CIMPP::Seconds t1if; + + /** \brief AVR time constant (T). Typical Value = 1.5. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief AVR time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief AVR time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Exciter current feedback time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tif; + + /** \brief Minimum exciter output (V). Typical Value = 0. Default: nullptr */ + CIMPP::PU vfmn; + + /** \brief Maximum exciter output (V). Typical Value = 5. Default: nullptr */ + CIMPP::PU vfmx; + + /** \brief Maximum AVR output (V). Typical Value = 0. Default: nullptr */ + CIMPP::PU vrmn; + + /** \brief Minimum AVR output (V). Typical Value = 5. Default: nullptr */ + CIMPP::PU vrmx; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcAVR5.cpp b/CGMES_2.4.15_27JAN2020/ExcAVR5.cpp index 5cca6e163..3f6eb23fe 100644 --- a/CGMES_2.4.15_27JAN2020/ExcAVR5.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcAVR5.cpp @@ -8,14 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" using namespace CIMPP; -ExcAVR5::ExcAVR5() {}; -ExcAVR5::~ExcAVR5() {}; +ExcAVR5::ExcAVR5() {} +ExcAVR5::~ExcAVR5() {} static const std::list PossibleProfilesForClass = { @@ -44,51 +41,52 @@ ExcAVR5::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAVR5_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR5_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR5* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR5_rex(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR5_rex(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR5* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rex; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR5_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR5_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR5* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAVR5_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR5* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -102,7 +100,8 @@ bool get_ExcAVR5_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR5_rex(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR5* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rex; if (!buffer.str().empty()) @@ -116,7 +115,8 @@ bool get_ExcAVR5_rex(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR5_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR5* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -128,8 +128,6 @@ bool get_ExcAVR5_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcAVR5::debugName[] = "ExcAVR5"; const char* ExcAVR5::debugString() const { @@ -138,14 +136,14 @@ const char* ExcAVR5::debugString() const void ExcAVR5::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAVR5"), &ExcAVR5_factory)); + factory_map.emplace("cim:ExcAVR5", &ExcAVR5_factory); } void ExcAVR5::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAVR5.ka"), &assign_ExcAVR5_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR5.rex"), &assign_ExcAVR5_rex)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR5.ta"), &assign_ExcAVR5_ta)); + assign_map.emplace("cim:ExcAVR5.ka", &assign_ExcAVR5_ka); + assign_map.emplace("cim:ExcAVR5.rex", &assign_ExcAVR5_rex); + assign_map.emplace("cim:ExcAVR5.ta", &assign_ExcAVR5_ta); } void ExcAVR5::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcAVR5.hpp b/CGMES_2.4.15_27JAN2020/ExcAVR5.hpp index 82afdab11..ddd53d379 100644 --- a/CGMES_2.4.15_27JAN2020/ExcAVR5.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcAVR5.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Manual excitation control with field circuit resistance. This model can be used as a very simple representation of manual voltage control. - */ + /** \brief Manual excitation control with field circuit resistance. This model can be used as a very simple representation of manual voltage control. */ class ExcAVR5 : public ExcitationSystemDynamics { public: @@ -28,9 +26,14 @@ namespace CIMPP ExcAVR5(); ~ExcAVR5() override; - CIMPP::PU ka; /* Gain (Ka). Default: nullptr */ - CIMPP::PU rex; /* Effective Output Resistance (Rex). Rex represents the effective output resistance seen by the excitation system. Default: nullptr */ - CIMPP::Seconds ta; /* Time constant (Ta). Default: nullptr */ + /** \brief Gain (Ka). Default: nullptr */ + CIMPP::PU ka; + + /** \brief Effective Output Resistance (Rex). Rex represents the effective output resistance seen by the excitation system. Default: nullptr */ + CIMPP::PU rex; + + /** \brief Time constant (Ta). Default: nullptr */ + CIMPP::Seconds ta; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcAVR7.cpp b/CGMES_2.4.15_27JAN2020/ExcAVR7.cpp index 0ce874327..3568b24b1 100644 --- a/CGMES_2.4.15_27JAN2020/ExcAVR7.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcAVR7.cpp @@ -8,32 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAVR7::ExcAVR7() {}; -ExcAVR7::~ExcAVR7() {}; +ExcAVR7::ExcAVR7() {} +ExcAVR7::~ExcAVR7() {} static const std::list PossibleProfilesForClass = { @@ -80,285 +59,304 @@ ExcAVR7::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAVR7_a1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_a1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_a2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_a2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_a3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_a3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_a4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_a4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_a5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_a5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_a6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_a6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_k5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_k5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_vmax1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_vmax1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_vmax3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_vmax3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_vmax5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_vmax5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_vmin1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_vmin1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_vmin3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_vmin3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_vmin5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_vmin5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAVR7_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a1; if (!buffer.str().empty()) @@ -372,7 +370,8 @@ bool get_ExcAVR7_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a2; if (!buffer.str().empty()) @@ -386,7 +385,8 @@ bool get_ExcAVR7_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_a3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a3; if (!buffer.str().empty()) @@ -400,7 +400,8 @@ bool get_ExcAVR7_a3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_a4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a4; if (!buffer.str().empty()) @@ -414,7 +415,8 @@ bool get_ExcAVR7_a4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_a5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a5; if (!buffer.str().empty()) @@ -428,7 +430,8 @@ bool get_ExcAVR7_a5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_a6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a6; if (!buffer.str().empty()) @@ -442,7 +445,8 @@ bool get_ExcAVR7_a6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -456,7 +460,8 @@ bool get_ExcAVR7_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -470,7 +475,8 @@ bool get_ExcAVR7_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k5; if (!buffer.str().empty()) @@ -484,7 +490,8 @@ bool get_ExcAVR7_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -498,7 +505,8 @@ bool get_ExcAVR7_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -512,7 +520,8 @@ bool get_ExcAVR7_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -526,7 +535,8 @@ bool get_ExcAVR7_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -540,7 +550,8 @@ bool get_ExcAVR7_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -554,7 +565,8 @@ bool get_ExcAVR7_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -568,7 +580,8 @@ bool get_ExcAVR7_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_vmax1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmax1; if (!buffer.str().empty()) @@ -582,7 +595,8 @@ bool get_ExcAVR7_vmax1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAVR7_vmax3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmax3; if (!buffer.str().empty()) @@ -596,7 +610,8 @@ bool get_ExcAVR7_vmax3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAVR7_vmax5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmax5; if (!buffer.str().empty()) @@ -610,7 +625,8 @@ bool get_ExcAVR7_vmax5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAVR7_vmin1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmin1; if (!buffer.str().empty()) @@ -624,7 +640,8 @@ bool get_ExcAVR7_vmin1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAVR7_vmin3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmin3; if (!buffer.str().empty()) @@ -638,7 +655,8 @@ bool get_ExcAVR7_vmin3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAVR7_vmin5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmin5; if (!buffer.str().empty()) @@ -650,8 +668,6 @@ bool get_ExcAVR7_vmin5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcAVR7::debugName[] = "ExcAVR7"; const char* ExcAVR7::debugString() const { @@ -660,32 +676,32 @@ const char* ExcAVR7::debugString() const void ExcAVR7::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAVR7"), &ExcAVR7_factory)); + factory_map.emplace("cim:ExcAVR7", &ExcAVR7_factory); } void ExcAVR7::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.a1"), &assign_ExcAVR7_a1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.a2"), &assign_ExcAVR7_a2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.a3"), &assign_ExcAVR7_a3)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.a4"), &assign_ExcAVR7_a4)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.a5"), &assign_ExcAVR7_a5)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.a6"), &assign_ExcAVR7_a6)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.k1"), &assign_ExcAVR7_k1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.k3"), &assign_ExcAVR7_k3)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.k5"), &assign_ExcAVR7_k5)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.t1"), &assign_ExcAVR7_t1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.t2"), &assign_ExcAVR7_t2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.t3"), &assign_ExcAVR7_t3)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.t4"), &assign_ExcAVR7_t4)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.t5"), &assign_ExcAVR7_t5)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.t6"), &assign_ExcAVR7_t6)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.vmax1"), &assign_ExcAVR7_vmax1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.vmax3"), &assign_ExcAVR7_vmax3)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.vmax5"), &assign_ExcAVR7_vmax5)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.vmin1"), &assign_ExcAVR7_vmin1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.vmin3"), &assign_ExcAVR7_vmin3)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.vmin5"), &assign_ExcAVR7_vmin5)); + assign_map.emplace("cim:ExcAVR7.a1", &assign_ExcAVR7_a1); + assign_map.emplace("cim:ExcAVR7.a2", &assign_ExcAVR7_a2); + assign_map.emplace("cim:ExcAVR7.a3", &assign_ExcAVR7_a3); + assign_map.emplace("cim:ExcAVR7.a4", &assign_ExcAVR7_a4); + assign_map.emplace("cim:ExcAVR7.a5", &assign_ExcAVR7_a5); + assign_map.emplace("cim:ExcAVR7.a6", &assign_ExcAVR7_a6); + assign_map.emplace("cim:ExcAVR7.k1", &assign_ExcAVR7_k1); + assign_map.emplace("cim:ExcAVR7.k3", &assign_ExcAVR7_k3); + assign_map.emplace("cim:ExcAVR7.k5", &assign_ExcAVR7_k5); + assign_map.emplace("cim:ExcAVR7.t1", &assign_ExcAVR7_t1); + assign_map.emplace("cim:ExcAVR7.t2", &assign_ExcAVR7_t2); + assign_map.emplace("cim:ExcAVR7.t3", &assign_ExcAVR7_t3); + assign_map.emplace("cim:ExcAVR7.t4", &assign_ExcAVR7_t4); + assign_map.emplace("cim:ExcAVR7.t5", &assign_ExcAVR7_t5); + assign_map.emplace("cim:ExcAVR7.t6", &assign_ExcAVR7_t6); + assign_map.emplace("cim:ExcAVR7.vmax1", &assign_ExcAVR7_vmax1); + assign_map.emplace("cim:ExcAVR7.vmax3", &assign_ExcAVR7_vmax3); + assign_map.emplace("cim:ExcAVR7.vmax5", &assign_ExcAVR7_vmax5); + assign_map.emplace("cim:ExcAVR7.vmin1", &assign_ExcAVR7_vmin1); + assign_map.emplace("cim:ExcAVR7.vmin3", &assign_ExcAVR7_vmin3); + assign_map.emplace("cim:ExcAVR7.vmin5", &assign_ExcAVR7_vmin5); } void ExcAVR7::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcAVR7.hpp b/CGMES_2.4.15_27JAN2020/ExcAVR7.hpp index 20fdb3e54..5bd945535 100644 --- a/CGMES_2.4.15_27JAN2020/ExcAVR7.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcAVR7.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IVO excitation system. - */ + /** \brief IVO excitation system. */ class ExcAVR7 : public ExcitationSystemDynamics { public: @@ -28,27 +26,68 @@ namespace CIMPP ExcAVR7(); ~ExcAVR7() override; - CIMPP::PU a1; /* Lead coefficient (A1). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU a2; /* Lag coefficient (A2). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU a3; /* Lead coefficient (A3). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU a4; /* Lag coefficient (A4). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU a5; /* Lead coefficient (A5). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU a6; /* Lag coefficient (A6). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU k1; /* Gain (K1). Typical Value = 1. Default: nullptr */ - CIMPP::PU k3; /* Gain (K3). Typical Value = 3. Default: nullptr */ - CIMPP::PU k5; /* Gain (K5). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds t1; /* Lead time constant (T1). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds t2; /* Lag time constant (T2). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t3; /* Lead time constant (T3). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t4; /* Lag time constant (T4). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t5; /* Lead time constant (T5). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t6; /* Lag time constant (T6). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU vmax1; /* Lead-lag max. limit (Vmax1). Typical Value = 5. Default: nullptr */ - CIMPP::PU vmax3; /* Lead-lag max. limit (Vmax3). Typical Value = 5. Default: nullptr */ - CIMPP::PU vmax5; /* Lead-lag max. limit (Vmax5). Typical Value = 5. Default: nullptr */ - CIMPP::PU vmin1; /* Lead-lag min. limit (Vmin1). Typical Value = -5. Default: nullptr */ - CIMPP::PU vmin3; /* Lead-lag min. limit (Vmin3). Typical Value = -5. Default: nullptr */ - CIMPP::PU vmin5; /* Lead-lag min. limit (Vmin5). Typical Value = -2. Default: nullptr */ + /** \brief Lead coefficient (A1). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU a1; + + /** \brief Lag coefficient (A2). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU a2; + + /** \brief Lead coefficient (A3). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU a3; + + /** \brief Lag coefficient (A4). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU a4; + + /** \brief Lead coefficient (A5). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU a5; + + /** \brief Lag coefficient (A6). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU a6; + + /** \brief Gain (K1). Typical Value = 1. Default: nullptr */ + CIMPP::PU k1; + + /** \brief Gain (K3). Typical Value = 3. Default: nullptr */ + CIMPP::PU k3; + + /** \brief Gain (K5). Typical Value = 1. Default: nullptr */ + CIMPP::PU k5; + + /** \brief Lead time constant (T1). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Lag time constant (T2). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Lead time constant (T3). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Lag time constant (T4). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Lead time constant (T5). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Lag time constant (T6). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Lead-lag max. limit (Vmax1). Typical Value = 5. Default: nullptr */ + CIMPP::PU vmax1; + + /** \brief Lead-lag max. limit (Vmax3). Typical Value = 5. Default: nullptr */ + CIMPP::PU vmax3; + + /** \brief Lead-lag max. limit (Vmax5). Typical Value = 5. Default: nullptr */ + CIMPP::PU vmax5; + + /** \brief Lead-lag min. limit (Vmin1). Typical Value = -5. Default: nullptr */ + CIMPP::PU vmin1; + + /** \brief Lead-lag min. limit (Vmin3). Typical Value = -5. Default: nullptr */ + CIMPP::PU vmin3; + + /** \brief Lead-lag min. limit (Vmin5). Typical Value = -2. Default: nullptr */ + CIMPP::PU vmin5; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcBBC.cpp b/CGMES_2.4.15_27JAN2020/ExcBBC.cpp index fd155fba0..5ed4908bf 100644 --- a/CGMES_2.4.15_27JAN2020/ExcBBC.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcBBC.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcBBC::ExcBBC() {}; -ExcBBC::~ExcBBC() {}; +ExcBBC::ExcBBC() {} +ExcBBC::~ExcBBC() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ ExcBBC::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcBBC_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_efdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_efdmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_switch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_switch(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->_switch; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_xe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_xe(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xe; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcBBC_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmax; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_ExcBBC_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcBBC_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmin; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_ExcBBC_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcBBC_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_ExcBBC_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcBBC_switch(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->_switch; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_ExcBBC_switch(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcBBC_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_ExcBBC_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcBBC_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_ExcBBC_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcBBC_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_ExcBBC_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcBBC_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_ExcBBC_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcBBC_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_ExcBBC_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcBBC_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_ExcBBC_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcBBC_xe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xe; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_ExcBBC_xe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcBBC::debugName[] = "ExcBBC"; const char* ExcBBC::debugString() const { @@ -370,22 +376,22 @@ const char* ExcBBC::debugString() const void ExcBBC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcBBC"), &ExcBBC_factory)); + factory_map.emplace("cim:ExcBBC", &ExcBBC_factory); } void ExcBBC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.efdmax"), &assign_ExcBBC_efdmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.efdmin"), &assign_ExcBBC_efdmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.k"), &assign_ExcBBC_k)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.switch"), &assign_ExcBBC_switch)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.t1"), &assign_ExcBBC_t1)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.t2"), &assign_ExcBBC_t2)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.t3"), &assign_ExcBBC_t3)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.t4"), &assign_ExcBBC_t4)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.vrmax"), &assign_ExcBBC_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.vrmin"), &assign_ExcBBC_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.xe"), &assign_ExcBBC_xe)); + assign_map.emplace("cim:ExcBBC.efdmax", &assign_ExcBBC_efdmax); + assign_map.emplace("cim:ExcBBC.efdmin", &assign_ExcBBC_efdmin); + assign_map.emplace("cim:ExcBBC.k", &assign_ExcBBC_k); + assign_map.emplace("cim:ExcBBC.switch", &assign_ExcBBC_switch); + assign_map.emplace("cim:ExcBBC.t1", &assign_ExcBBC_t1); + assign_map.emplace("cim:ExcBBC.t2", &assign_ExcBBC_t2); + assign_map.emplace("cim:ExcBBC.t3", &assign_ExcBBC_t3); + assign_map.emplace("cim:ExcBBC.t4", &assign_ExcBBC_t4); + assign_map.emplace("cim:ExcBBC.vrmax", &assign_ExcBBC_vrmax); + assign_map.emplace("cim:ExcBBC.vrmin", &assign_ExcBBC_vrmin); + assign_map.emplace("cim:ExcBBC.xe", &assign_ExcBBC_xe); } void ExcBBC::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcBBC.hpp b/CGMES_2.4.15_27JAN2020/ExcBBC.hpp index a41a730ad..069831f27 100644 --- a/CGMES_2.4.15_27JAN2020/ExcBBC.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcBBC.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Transformer fed static excitation system (static with ABB regulator). This model represents a static excitation system in which a gated thyristor bridge fed by a transformer at the main generator terminals feeds the main generator directly. - */ + /** \brief Transformer fed static excitation system (static with ABB regulator). This model represents a static excitation system in which a gated thyristor bridge fed by a transformer at the main generator terminals feeds the main generator directly. */ class ExcBBC : public ExcitationSystemDynamics { public: @@ -29,17 +27,38 @@ namespace CIMPP ExcBBC(); ~ExcBBC() override; - CIMPP::PU efdmax; /* Maximum open circuit exciter voltage (Efdmax). Typical Value = 5. Default: nullptr */ - CIMPP::PU efdmin; /* Minimum open circuit exciter voltage (Efdmin). Typical Value = -5. Default: nullptr */ - CIMPP::PU k; /* Steady state gain (K). Typical Value = 300. Default: nullptr */ - CIMPP::Boolean _switch; /* Supplementary signal routing selector (switch). true = Vs connected to 3rd summing point false = Vs connected to 1st summing point (see diagram). Typical Value = true. Default: false */ - CIMPP::Seconds t1; /* Controller time constant (T1). Typical Value = 6. Default: nullptr */ - CIMPP::Seconds t2; /* Controller time constant (T2). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds t3; /* Lead/lag time constant (T3). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds t4; /* Lead/lag time constant (T4). Typical Value = 0.01. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum control element output (Vrmax). Typical Value = 5. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum control element output (Vrmin). Typical Value = -5. Default: nullptr */ - CIMPP::PU xe; /* Effective excitation transformer reactance (Xe). Typical Value = 0.05. Default: nullptr */ + /** \brief Maximum open circuit exciter voltage (Efdmax). Typical Value = 5. Default: nullptr */ + CIMPP::PU efdmax; + + /** \brief Minimum open circuit exciter voltage (Efdmin). Typical Value = -5. Default: nullptr */ + CIMPP::PU efdmin; + + /** \brief Steady state gain (K). Typical Value = 300. Default: nullptr */ + CIMPP::PU k; + + /** \brief Supplementary signal routing selector (switch). true = Vs connected to 3rd summing point false = Vs connected to 1st summing point (see diagram). Typical Value = true. Default: false */ + CIMPP::Boolean _switch; + + /** \brief Controller time constant (T1). Typical Value = 6. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Controller time constant (T2). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Lead/lag time constant (T3). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Lead/lag time constant (T4). Typical Value = 0.01. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Maximum control element output (Vrmax). Typical Value = 5. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum control element output (Vrmin). Typical Value = -5. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief Effective excitation transformer reactance (Xe). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU xe; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcCZ.cpp b/CGMES_2.4.15_27JAN2020/ExcCZ.cpp index 89b839416..836b963d1 100644 --- a/CGMES_2.4.15_27JAN2020/ExcCZ.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcCZ.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcCZ::ExcCZ() {}; -ExcCZ::~ExcCZ() {}; +ExcCZ::ExcCZ() {} +ExcCZ::~ExcCZ() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ ExcCZ::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcCZ_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_efdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcCZ_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_efdmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcCZ_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcCZ_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcCZ_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcCZ_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcCZ_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcCZ_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcCZ_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcCZ_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcCZ_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmax; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_ExcCZ_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcCZ_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmin; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_ExcCZ_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcCZ_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_ExcCZ_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcCZ_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_ExcCZ_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcCZ_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_ExcCZ_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcCZ_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_ExcCZ_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcCZ_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_ExcCZ_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcCZ_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_ExcCZ_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcCZ_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_ExcCZ_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcCZ_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_ExcCZ_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcCZ::debugName[] = "ExcCZ"; const char* ExcCZ::debugString() const { @@ -341,21 +346,21 @@ const char* ExcCZ::debugString() const void ExcCZ::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcCZ"), &ExcCZ_factory)); + factory_map.emplace("cim:ExcCZ", &ExcCZ_factory); } void ExcCZ::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.efdmax"), &assign_ExcCZ_efdmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.efdmin"), &assign_ExcCZ_efdmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.ka"), &assign_ExcCZ_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.ke"), &assign_ExcCZ_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.kp"), &assign_ExcCZ_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.ta"), &assign_ExcCZ_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.tc"), &assign_ExcCZ_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.te"), &assign_ExcCZ_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.vrmax"), &assign_ExcCZ_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.vrmin"), &assign_ExcCZ_vrmin)); + assign_map.emplace("cim:ExcCZ.efdmax", &assign_ExcCZ_efdmax); + assign_map.emplace("cim:ExcCZ.efdmin", &assign_ExcCZ_efdmin); + assign_map.emplace("cim:ExcCZ.ka", &assign_ExcCZ_ka); + assign_map.emplace("cim:ExcCZ.ke", &assign_ExcCZ_ke); + assign_map.emplace("cim:ExcCZ.kp", &assign_ExcCZ_kp); + assign_map.emplace("cim:ExcCZ.ta", &assign_ExcCZ_ta); + assign_map.emplace("cim:ExcCZ.tc", &assign_ExcCZ_tc); + assign_map.emplace("cim:ExcCZ.te", &assign_ExcCZ_te); + assign_map.emplace("cim:ExcCZ.vrmax", &assign_ExcCZ_vrmax); + assign_map.emplace("cim:ExcCZ.vrmin", &assign_ExcCZ_vrmin); } void ExcCZ::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcCZ.hpp b/CGMES_2.4.15_27JAN2020/ExcCZ.hpp index 1b99a72bd..535e79794 100644 --- a/CGMES_2.4.15_27JAN2020/ExcCZ.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcCZ.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Czech Proportion/Integral Exciter. - */ + /** \brief Czech Proportion/Integral Exciter. */ class ExcCZ : public ExcitationSystemDynamics { public: @@ -28,16 +26,35 @@ namespace CIMPP ExcCZ(); ~ExcCZ() override; - CIMPP::PU efdmax; /* Exciter output maximum limit (Efdmax). Default: nullptr */ - CIMPP::PU efdmin; /* Exciter output minimum limit (Efdmin). Default: nullptr */ - CIMPP::PU ka; /* Regulator gain (Ka). Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (Ke). Default: nullptr */ - CIMPP::PU kp; /* Regulator proportional gain (Kp). Default: nullptr */ - CIMPP::Seconds ta; /* Regulator time constant (Ta). Default: nullptr */ - CIMPP::Seconds tc; /* Regulator integral time constant (Tc). Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (Te). Default: nullptr */ - CIMPP::PU vrmax; /* Voltage regulator maximum limit (Vrmax). Default: nullptr */ - CIMPP::PU vrmin; /* Voltage regulator minimum limit (Vrmin). Default: nullptr */ + /** \brief Exciter output maximum limit (Efdmax). Default: nullptr */ + CIMPP::PU efdmax; + + /** \brief Exciter output minimum limit (Efdmin). Default: nullptr */ + CIMPP::PU efdmin; + + /** \brief Regulator gain (Ka). Default: nullptr */ + CIMPP::PU ka; + + /** \brief Exciter constant related to self-excited field (Ke). Default: nullptr */ + CIMPP::PU ke; + + /** \brief Regulator proportional gain (Kp). Default: nullptr */ + CIMPP::PU kp; + + /** \brief Regulator time constant (Ta). Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Regulator integral time constant (Tc). Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (Te). Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Voltage regulator maximum limit (Vrmax). Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Voltage regulator minimum limit (Vrmin). Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcDC1A.cpp b/CGMES_2.4.15_27JAN2020/ExcDC1A.cpp index 244755fe7..66f08bb53 100644 --- a/CGMES_2.4.15_27JAN2020/ExcDC1A.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcDC1A.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcDC1A::ExcDC1A() {}; -ExcDC1A::~ExcDC1A() {}; +ExcDC1A::ExcDC1A() {} +ExcDC1A::~ExcDC1A() {} static const std::list PossibleProfilesForClass = { @@ -74,246 +56,262 @@ ExcDC1A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcDC1A_edfmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_edfmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->edfmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_efdmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_exclim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exclim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_seefd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_seefd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcDC1A_edfmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->edfmax; if (!buffer.str().empty()) @@ -327,7 +325,8 @@ bool get_ExcDC1A_edfmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC1A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -341,7 +340,8 @@ bool get_ExcDC1A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcDC1A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -355,7 +355,8 @@ bool get_ExcDC1A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcDC1A_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmin; if (!buffer.str().empty()) @@ -369,7 +370,8 @@ bool get_ExcDC1A_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC1A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exclim; if (!buffer.str().empty()) @@ -383,7 +385,8 @@ bool get_ExcDC1A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -397,7 +400,8 @@ bool get_ExcDC1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC1A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -411,7 +415,8 @@ bool get_ExcDC1A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -425,7 +430,8 @@ bool get_ExcDC1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC1A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -439,7 +445,8 @@ bool get_ExcDC1A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC1A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd1; if (!buffer.str().empty()) @@ -453,7 +460,8 @@ bool get_ExcDC1A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC1A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd2; if (!buffer.str().empty()) @@ -467,7 +475,8 @@ bool get_ExcDC1A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -481,7 +490,8 @@ bool get_ExcDC1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -495,7 +505,8 @@ bool get_ExcDC1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -509,7 +520,8 @@ bool get_ExcDC1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC1A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -523,7 +535,8 @@ bool get_ExcDC1A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -537,7 +550,8 @@ bool get_ExcDC1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -551,7 +565,8 @@ bool get_ExcDC1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcDC1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -563,8 +578,6 @@ bool get_ExcDC1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcDC1A::debugName[] = "ExcDC1A"; const char* ExcDC1A::debugString() const { @@ -573,29 +586,29 @@ const char* ExcDC1A::debugString() const void ExcDC1A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcDC1A"), &ExcDC1A_factory)); + factory_map.emplace("cim:ExcDC1A", &ExcDC1A_factory); } void ExcDC1A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.edfmax"), &assign_ExcDC1A_edfmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.efd1"), &assign_ExcDC1A_efd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.efd2"), &assign_ExcDC1A_efd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.efdmin"), &assign_ExcDC1A_efdmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.exclim"), &assign_ExcDC1A_exclim)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.ka"), &assign_ExcDC1A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.ke"), &assign_ExcDC1A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.kf"), &assign_ExcDC1A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.ks"), &assign_ExcDC1A_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.seefd1"), &assign_ExcDC1A_seefd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.seefd2"), &assign_ExcDC1A_seefd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.ta"), &assign_ExcDC1A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.tb"), &assign_ExcDC1A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.tc"), &assign_ExcDC1A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.te"), &assign_ExcDC1A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.tf"), &assign_ExcDC1A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.vrmax"), &assign_ExcDC1A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.vrmin"), &assign_ExcDC1A_vrmin)); + assign_map.emplace("cim:ExcDC1A.edfmax", &assign_ExcDC1A_edfmax); + assign_map.emplace("cim:ExcDC1A.efd1", &assign_ExcDC1A_efd1); + assign_map.emplace("cim:ExcDC1A.efd2", &assign_ExcDC1A_efd2); + assign_map.emplace("cim:ExcDC1A.efdmin", &assign_ExcDC1A_efdmin); + assign_map.emplace("cim:ExcDC1A.exclim", &assign_ExcDC1A_exclim); + assign_map.emplace("cim:ExcDC1A.ka", &assign_ExcDC1A_ka); + assign_map.emplace("cim:ExcDC1A.ke", &assign_ExcDC1A_ke); + assign_map.emplace("cim:ExcDC1A.kf", &assign_ExcDC1A_kf); + assign_map.emplace("cim:ExcDC1A.ks", &assign_ExcDC1A_ks); + assign_map.emplace("cim:ExcDC1A.seefd1", &assign_ExcDC1A_seefd1); + assign_map.emplace("cim:ExcDC1A.seefd2", &assign_ExcDC1A_seefd2); + assign_map.emplace("cim:ExcDC1A.ta", &assign_ExcDC1A_ta); + assign_map.emplace("cim:ExcDC1A.tb", &assign_ExcDC1A_tb); + assign_map.emplace("cim:ExcDC1A.tc", &assign_ExcDC1A_tc); + assign_map.emplace("cim:ExcDC1A.te", &assign_ExcDC1A_te); + assign_map.emplace("cim:ExcDC1A.tf", &assign_ExcDC1A_tf); + assign_map.emplace("cim:ExcDC1A.vrmax", &assign_ExcDC1A_vrmax); + assign_map.emplace("cim:ExcDC1A.vrmin", &assign_ExcDC1A_vrmin); } void ExcDC1A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcDC1A.hpp b/CGMES_2.4.15_27JAN2020/ExcDC1A.hpp index 802c09866..5cff88d2f 100644 --- a/CGMES_2.4.15_27JAN2020/ExcDC1A.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcDC1A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE DC1A direct current commutator exciter with speed input and without underexcitation limiters (UEL) inputs. - */ + /** \brief Modified IEEE DC1A direct current commutator exciter with speed input and without underexcitation limiters (UEL) inputs. */ class ExcDC1A : public ExcitationSystemDynamics { public: @@ -30,24 +28,59 @@ namespace CIMPP ExcDC1A(); ~ExcDC1A() override; - CIMPP::PU edfmax; /* Maximum voltage exciter output limiter (Efdmax). Typical Value = 99. Default: nullptr */ - CIMPP::PU efd1; /* Exciter voltage at which exciter saturation is defined (Efd1). Typical Value = 3.1. Default: nullptr */ - CIMPP::PU efd2; /* Exciter voltage at which exciter saturation is defined (Efd2). Typical Value = 2.3. Default: nullptr */ - CIMPP::PU efdmin; /* Minimum voltage exciter output limiter (Efdmin). Typical Value = -99. Default: nullptr */ - CIMPP::Boolean exclim; /* (exclim). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero is not applied to integrator output. Typical Value = true. Default: false */ - CIMPP::PU ka; /* Voltage regulator gain (Ka). Typical Value = 46. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (Ke). Typical Value = 0. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gain (Kf). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float seefd1; /* Exciter saturation function value at the corresponding exciter voltage, Efd1 (Se[Eefd1]). Typical Value = 0.33. Default: nullptr */ - CIMPP::Simple_Float seefd2; /* Exciter saturation function value at the corresponding exciter voltage, Efd1 (Se[Eefd1]). Typical Value = 0.33. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (Ta). Typical Value = 0.06. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (Tc). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 0.46. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (Tf). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (Vrmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (Vrmin). Typical Value = -0.9. Default: nullptr */ + /** \brief Maximum voltage exciter output limiter (Efdmax). Typical Value = 99. Default: nullptr */ + CIMPP::PU edfmax; + + /** \brief Exciter voltage at which exciter saturation is defined (Efd1). Typical Value = 3.1. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Exciter voltage at which exciter saturation is defined (Efd2). Typical Value = 2.3. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief Minimum voltage exciter output limiter (Efdmin). Typical Value = -99. Default: nullptr */ + CIMPP::PU efdmin; + + /** \brief (exclim). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero is not applied to integrator output. Typical Value = true. Default: false */ + CIMPP::Boolean exclim; + + /** \brief Voltage regulator gain (Ka). Typical Value = 46. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Exciter constant related to self-excited field (Ke). Typical Value = 0. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gain (Kf). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Efd1 (Se[Eefd1]). Typical Value = 0.33. Default: nullptr */ + CIMPP::Simple_Float seefd1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Efd1 (Se[Eefd1]). Typical Value = 0.33. Default: nullptr */ + CIMPP::Simple_Float seefd2; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0.06. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (Tc). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 0.46. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (Tf). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage regulator output (Vrmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (Vrmin). Typical Value = -0.9. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcDC2A.cpp b/CGMES_2.4.15_27JAN2020/ExcDC2A.cpp index 912534708..79a98e618 100644 --- a/CGMES_2.4.15_27JAN2020/ExcDC2A.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcDC2A.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" using namespace CIMPP; -ExcDC2A::ExcDC2A() {}; -ExcDC2A::~ExcDC2A() {}; +ExcDC2A::ExcDC2A() {} +ExcDC2A::~ExcDC2A() {} static const std::list PossibleProfilesForClass = { @@ -74,246 +56,262 @@ ExcDC2A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcDC2A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_exclim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exclim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_seefd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_seefd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_tf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_vtlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_vtlim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vtlim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcDC2A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -327,7 +325,8 @@ bool get_ExcDC2A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcDC2A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -341,7 +340,8 @@ bool get_ExcDC2A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcDC2A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exclim; if (!buffer.str().empty()) @@ -355,7 +355,8 @@ bool get_ExcDC2A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -369,7 +370,8 @@ bool get_ExcDC2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -383,7 +385,8 @@ bool get_ExcDC2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -397,7 +400,8 @@ bool get_ExcDC2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -411,7 +415,8 @@ bool get_ExcDC2A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd1; if (!buffer.str().empty()) @@ -425,7 +430,8 @@ bool get_ExcDC2A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC2A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd2; if (!buffer.str().empty()) @@ -439,7 +445,8 @@ bool get_ExcDC2A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -453,7 +460,8 @@ bool get_ExcDC2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -467,7 +475,8 @@ bool get_ExcDC2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -481,7 +490,8 @@ bool get_ExcDC2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -495,7 +505,8 @@ bool get_ExcDC2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -509,7 +520,8 @@ bool get_ExcDC2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf1; if (!buffer.str().empty()) @@ -523,7 +535,8 @@ bool get_ExcDC2A_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -537,7 +550,8 @@ bool get_ExcDC2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcDC2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -551,7 +565,8 @@ bool get_ExcDC2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcDC2A_vtlim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vtlim; if (!buffer.str().empty()) @@ -563,8 +578,6 @@ bool get_ExcDC2A_vtlim(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcDC2A::debugName[] = "ExcDC2A"; const char* ExcDC2A::debugString() const { @@ -573,29 +586,29 @@ const char* ExcDC2A::debugString() const void ExcDC2A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcDC2A"), &ExcDC2A_factory)); + factory_map.emplace("cim:ExcDC2A", &ExcDC2A_factory); } void ExcDC2A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.efd1"), &assign_ExcDC2A_efd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.efd2"), &assign_ExcDC2A_efd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.exclim"), &assign_ExcDC2A_exclim)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.ka"), &assign_ExcDC2A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.ke"), &assign_ExcDC2A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.kf"), &assign_ExcDC2A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.ks"), &assign_ExcDC2A_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.seefd1"), &assign_ExcDC2A_seefd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.seefd2"), &assign_ExcDC2A_seefd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.ta"), &assign_ExcDC2A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.tb"), &assign_ExcDC2A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.tc"), &assign_ExcDC2A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.te"), &assign_ExcDC2A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.tf"), &assign_ExcDC2A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.tf1"), &assign_ExcDC2A_tf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.vrmax"), &assign_ExcDC2A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.vrmin"), &assign_ExcDC2A_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.vtlim"), &assign_ExcDC2A_vtlim)); + assign_map.emplace("cim:ExcDC2A.efd1", &assign_ExcDC2A_efd1); + assign_map.emplace("cim:ExcDC2A.efd2", &assign_ExcDC2A_efd2); + assign_map.emplace("cim:ExcDC2A.exclim", &assign_ExcDC2A_exclim); + assign_map.emplace("cim:ExcDC2A.ka", &assign_ExcDC2A_ka); + assign_map.emplace("cim:ExcDC2A.ke", &assign_ExcDC2A_ke); + assign_map.emplace("cim:ExcDC2A.kf", &assign_ExcDC2A_kf); + assign_map.emplace("cim:ExcDC2A.ks", &assign_ExcDC2A_ks); + assign_map.emplace("cim:ExcDC2A.seefd1", &assign_ExcDC2A_seefd1); + assign_map.emplace("cim:ExcDC2A.seefd2", &assign_ExcDC2A_seefd2); + assign_map.emplace("cim:ExcDC2A.ta", &assign_ExcDC2A_ta); + assign_map.emplace("cim:ExcDC2A.tb", &assign_ExcDC2A_tb); + assign_map.emplace("cim:ExcDC2A.tc", &assign_ExcDC2A_tc); + assign_map.emplace("cim:ExcDC2A.te", &assign_ExcDC2A_te); + assign_map.emplace("cim:ExcDC2A.tf", &assign_ExcDC2A_tf); + assign_map.emplace("cim:ExcDC2A.tf1", &assign_ExcDC2A_tf1); + assign_map.emplace("cim:ExcDC2A.vrmax", &assign_ExcDC2A_vrmax); + assign_map.emplace("cim:ExcDC2A.vrmin", &assign_ExcDC2A_vrmin); + assign_map.emplace("cim:ExcDC2A.vtlim", &assign_ExcDC2A_vtlim); } void ExcDC2A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcDC2A.hpp b/CGMES_2.4.15_27JAN2020/ExcDC2A.hpp index 2d76aa510..e317a7ea0 100644 --- a/CGMES_2.4.15_27JAN2020/ExcDC2A.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcDC2A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE DC2A direct current commutator exciters with speed input, one more leg block in feedback loop and without underexcitation limiters (UEL) inputs. DC type 2 excitation system model with added speed multiplier, added lead-lag, and voltage-dependent limits. - */ + /** \brief Modified IEEE DC2A direct current commutator exciters with speed input, one more leg block in feedback loop and without underexcitation limiters (UEL) inputs. DC type 2 excitation system model with added speed multiplier, added lead-lag, and voltage-dependent limits. */ class ExcDC2A : public ExcitationSystemDynamics { public: @@ -30,24 +28,59 @@ namespace CIMPP ExcDC2A(); ~ExcDC2A() override; - CIMPP::PU efd1; /* Exciter voltage at which exciter saturation is defined (Efd1). Typical Value = 3.05. Default: nullptr */ - CIMPP::PU efd2; /* Exciter voltage at which exciter saturation is defined (Efd2). Typical Value = 2.29. Default: nullptr */ - CIMPP::Boolean exclim; /* (exclim). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero is not applied to integrator output. Typical Value = true. Default: false */ - CIMPP::PU ka; /* Voltage regulator gain (Ka). Typical Value = 300. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (Ke). If Ke is entered as zero, the model calculates an effective value of Ke such that the initial condition value of Vr is zero. The zero value of Ke is not changed. If Ke is entered as non-zero, its value is used directly, without change. Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gain (Kf). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float seefd1; /* Exciter saturation function value at the corresponding exciter voltage, Efd1 (Se[Eefd1]). Typical Value = 0.279. Default: nullptr */ - CIMPP::Simple_Float seefd2; /* Exciter saturation function value at the corresponding exciter voltage, Efd2 (Se[Efd2]). Typical Value = 0.117. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (Ta). Typical Value = 0.01. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (Tc). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 1.33. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (Tf). Typical Value = 0.675. Default: nullptr */ - CIMPP::Seconds tf1; /* Excitation control system stabilizer time constant (Tf1). Typical Value = 0. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (Vrmax). Typical Value = 4.95. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (Vrmin). Typical Value = -4.9. Default: nullptr */ - CIMPP::Boolean vtlim; /* (Vtlim). true = limiter at the block [Ka/(1+sTa)] is dependent on Vt false = limiter at the block is not dependent on Vt. Typical Value = true. Default: false */ + /** \brief Exciter voltage at which exciter saturation is defined (Efd1). Typical Value = 3.05. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Exciter voltage at which exciter saturation is defined (Efd2). Typical Value = 2.29. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief (exclim). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero is not applied to integrator output. Typical Value = true. Default: false */ + CIMPP::Boolean exclim; + + /** \brief Voltage regulator gain (Ka). Typical Value = 300. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Exciter constant related to self-excited field (Ke). If Ke is entered as zero, the model calculates an effective value of Ke such that the initial condition value of Vr is zero. The zero value of Ke is not changed. If Ke is entered as non-zero, its value is used directly, without change. Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gain (Kf). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Efd1 (Se[Eefd1]). Typical Value = 0.279. Default: nullptr */ + CIMPP::Simple_Float seefd1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Efd2 (Se[Efd2]). Typical Value = 0.117. Default: nullptr */ + CIMPP::Simple_Float seefd2; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0.01. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (Tc). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 1.33. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (Tf). Typical Value = 0.675. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Excitation control system stabilizer time constant (Tf1). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tf1; + + /** \brief Maximum voltage regulator output (Vrmax). Typical Value = 4.95. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (Vrmin). Typical Value = -4.9. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief (Vtlim). true = limiter at the block [Ka/(1+sTa)] is dependent on Vt false = limiter at the block is not dependent on Vt. Typical Value = true. Default: false */ + CIMPP::Boolean vtlim; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcDC3A.cpp b/CGMES_2.4.15_27JAN2020/ExcDC3A.cpp index 1ad6521de..71b995f87 100644 --- a/CGMES_2.4.15_27JAN2020/ExcDC3A.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcDC3A.cpp @@ -8,27 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcDC3A::ExcDC3A() {}; -ExcDC3A::~ExcDC3A() {}; +ExcDC3A::ExcDC3A() {} +ExcDC3A::~ExcDC3A() {} static const std::list PossibleProfilesForClass = { @@ -70,220 +54,234 @@ ExcDC3A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcDC3A_edfmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_edfmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->edfmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_efdlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_efdlim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdlim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_efdmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_exclim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exclim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_kr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_kr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_kv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_kv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_seefd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_seefd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_trh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_trh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->trh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcDC3A_edfmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->edfmax; if (!buffer.str().empty()) @@ -297,7 +295,8 @@ bool get_ExcDC3A_edfmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC3A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -311,7 +310,8 @@ bool get_ExcDC3A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcDC3A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -325,7 +325,8 @@ bool get_ExcDC3A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcDC3A_efdlim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdlim; if (!buffer.str().empty()) @@ -339,7 +340,8 @@ bool get_ExcDC3A_efdlim(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC3A_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmin; if (!buffer.str().empty()) @@ -353,7 +355,8 @@ bool get_ExcDC3A_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC3A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exclim; if (!buffer.str().empty()) @@ -367,7 +370,8 @@ bool get_ExcDC3A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC3A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -381,7 +385,8 @@ bool get_ExcDC3A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A_kr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kr; if (!buffer.str().empty()) @@ -395,7 +400,8 @@ bool get_ExcDC3A_kr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -409,7 +415,8 @@ bool get_ExcDC3A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A_kv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kv; if (!buffer.str().empty()) @@ -423,7 +430,8 @@ bool get_ExcDC3A_kv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd1; if (!buffer.str().empty()) @@ -437,7 +445,8 @@ bool get_ExcDC3A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC3A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd2; if (!buffer.str().empty()) @@ -451,7 +460,8 @@ bool get_ExcDC3A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC3A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -465,7 +475,8 @@ bool get_ExcDC3A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A_trh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->trh; if (!buffer.str().empty()) @@ -479,7 +490,8 @@ bool get_ExcDC3A_trh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -493,7 +505,8 @@ bool get_ExcDC3A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcDC3A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -505,8 +518,6 @@ bool get_ExcDC3A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcDC3A::debugName[] = "ExcDC3A"; const char* ExcDC3A::debugString() const { @@ -515,27 +526,27 @@ const char* ExcDC3A::debugString() const void ExcDC3A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcDC3A"), &ExcDC3A_factory)); + factory_map.emplace("cim:ExcDC3A", &ExcDC3A_factory); } void ExcDC3A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.edfmax"), &assign_ExcDC3A_edfmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.efd1"), &assign_ExcDC3A_efd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.efd2"), &assign_ExcDC3A_efd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.efdlim"), &assign_ExcDC3A_efdlim)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.efdmin"), &assign_ExcDC3A_efdmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.exclim"), &assign_ExcDC3A_exclim)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.ke"), &assign_ExcDC3A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.kr"), &assign_ExcDC3A_kr)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.ks"), &assign_ExcDC3A_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.kv"), &assign_ExcDC3A_kv)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.seefd1"), &assign_ExcDC3A_seefd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.seefd2"), &assign_ExcDC3A_seefd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.te"), &assign_ExcDC3A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.trh"), &assign_ExcDC3A_trh)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.vrmax"), &assign_ExcDC3A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.vrmin"), &assign_ExcDC3A_vrmin)); + assign_map.emplace("cim:ExcDC3A.edfmax", &assign_ExcDC3A_edfmax); + assign_map.emplace("cim:ExcDC3A.efd1", &assign_ExcDC3A_efd1); + assign_map.emplace("cim:ExcDC3A.efd2", &assign_ExcDC3A_efd2); + assign_map.emplace("cim:ExcDC3A.efdlim", &assign_ExcDC3A_efdlim); + assign_map.emplace("cim:ExcDC3A.efdmin", &assign_ExcDC3A_efdmin); + assign_map.emplace("cim:ExcDC3A.exclim", &assign_ExcDC3A_exclim); + assign_map.emplace("cim:ExcDC3A.ke", &assign_ExcDC3A_ke); + assign_map.emplace("cim:ExcDC3A.kr", &assign_ExcDC3A_kr); + assign_map.emplace("cim:ExcDC3A.ks", &assign_ExcDC3A_ks); + assign_map.emplace("cim:ExcDC3A.kv", &assign_ExcDC3A_kv); + assign_map.emplace("cim:ExcDC3A.seefd1", &assign_ExcDC3A_seefd1); + assign_map.emplace("cim:ExcDC3A.seefd2", &assign_ExcDC3A_seefd2); + assign_map.emplace("cim:ExcDC3A.te", &assign_ExcDC3A_te); + assign_map.emplace("cim:ExcDC3A.trh", &assign_ExcDC3A_trh); + assign_map.emplace("cim:ExcDC3A.vrmax", &assign_ExcDC3A_vrmax); + assign_map.emplace("cim:ExcDC3A.vrmin", &assign_ExcDC3A_vrmin); } void ExcDC3A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcDC3A.hpp b/CGMES_2.4.15_27JAN2020/ExcDC3A.hpp index dde872208..53e5af5f0 100644 --- a/CGMES_2.4.15_27JAN2020/ExcDC3A.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcDC3A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - This is modified IEEE DC3A direct current commutator exciters with speed input, and death band. DC old type 4. - */ + /** \brief This is modified IEEE DC3A direct current commutator exciters with speed input, and death band. DC old type 4. */ class ExcDC3A : public ExcitationSystemDynamics { public: @@ -30,22 +28,53 @@ namespace CIMPP ExcDC3A(); ~ExcDC3A() override; - CIMPP::PU edfmax; /* Maximum voltage exciter output limiter (Efdmax). Typical Value = 99. Default: nullptr */ - CIMPP::PU efd1; /* Exciter voltage at which exciter saturation is defined (Efd1). Typical Value = 2.6. Default: nullptr */ - CIMPP::PU efd2; /* Exciter voltage at which exciter saturation is defined (Efd2). Typical Value = 3.45. Default: nullptr */ - CIMPP::Boolean efdlim; /* (Efdlim). true = exciter output limiter is active false = exciter output limiter not active. Typical Value = true. Default: false */ - CIMPP::PU efdmin; /* Minimum voltage exciter output limiter (Efdmin). Typical Value = -99. Default: nullptr */ - CIMPP::Boolean exclim; /* (exclim). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero not applied to integrator output. Typical Value = true. Default: false */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ - CIMPP::PU kr; /* Death band (Kr). If Kr is not zero, the voltage regulator input changes at a constant rate if Verr > Kr or Verr < -Kr as per the IEEE (1968) Type 4 model. If Kr is zero, the error signal drives the voltage regulator continuously as per the IEEE (1980) DC3 and IEEE (1992, 2005) DC3A models. Typical Value = 0. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ - CIMPP::PU kv; /* Fast raise/lower contact setting (Kv). Typical Value = 0.05. Default: nullptr */ - CIMPP::Simple_Float seefd1; /* Exciter saturation function value at the corresponding exciter voltage, Efd1 (Se[Eefd1]). Typical Value = 0.1. Default: nullptr */ - CIMPP::Simple_Float seefd2; /* Exciter saturation function value at the corresponding exciter voltage, Efd2 (Se[Efd2]). Typical Value = 0.35. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 1.83. Default: nullptr */ - CIMPP::Seconds trh; /* Rheostat travel time (Trh). Typical Value = 20. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (Vrmax). Typical Value = 5. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (Vrmin). Typical Value = 0. Default: nullptr */ + /** \brief Maximum voltage exciter output limiter (Efdmax). Typical Value = 99. Default: nullptr */ + CIMPP::PU edfmax; + + /** \brief Exciter voltage at which exciter saturation is defined (Efd1). Typical Value = 2.6. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Exciter voltage at which exciter saturation is defined (Efd2). Typical Value = 3.45. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief (Efdlim). true = exciter output limiter is active false = exciter output limiter not active. Typical Value = true. Default: false */ + CIMPP::Boolean efdlim; + + /** \brief Minimum voltage exciter output limiter (Efdmin). Typical Value = -99. Default: nullptr */ + CIMPP::PU efdmin; + + /** \brief (exclim). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero not applied to integrator output. Typical Value = true. Default: false */ + CIMPP::Boolean exclim; + + /** \brief Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Death band (Kr). If Kr is not zero, the voltage regulator input changes at a constant rate if Verr > Kr or Verr < -Kr as per the IEEE (1968) Type 4 model. If Kr is zero, the error signal drives the voltage regulator continuously as per the IEEE (1980) DC3 and IEEE (1992, 2005) DC3A models. Typical Value = 0. Default: nullptr */ + CIMPP::PU kr; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Fast raise/lower contact setting (Kv). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU kv; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Efd1 (Se[Eefd1]). Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float seefd1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Efd2 (Se[Efd2]). Typical Value = 0.35. Default: nullptr */ + CIMPP::Simple_Float seefd2; + + /** \brief Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 1.83. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Rheostat travel time (Trh). Typical Value = 20. Default: nullptr */ + CIMPP::Seconds trh; + + /** \brief Maximum voltage regulator output (Vrmax). Typical Value = 5. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (Vrmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcDC3A1.cpp b/CGMES_2.4.15_27JAN2020/ExcDC3A1.cpp index e8b7caeb6..4d46a92b7 100644 --- a/CGMES_2.4.15_27JAN2020/ExcDC3A1.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcDC3A1.cpp @@ -8,25 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcDC3A1::ExcDC3A1() {}; -ExcDC3A1::~ExcDC3A1() {}; +ExcDC3A1::ExcDC3A1() {} +ExcDC3A1::~ExcDC3A1() {} static const std::list PossibleProfilesForClass = { @@ -66,194 +52,206 @@ ExcDC3A1::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcDC3A1_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_exclim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exclim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_vb1max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_vb1max(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vb1max; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_vblim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_vblim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vblim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_vbmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_vbmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vbmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcDC3A1_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exclim; if (!buffer.str().empty()) @@ -267,7 +265,8 @@ bool get_ExcDC3A1_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcDC3A1_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -281,7 +280,8 @@ bool get_ExcDC3A1_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A1_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -295,7 +295,8 @@ bool get_ExcDC3A1_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A1_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -309,7 +310,8 @@ bool get_ExcDC3A1_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A1_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -323,7 +325,8 @@ bool get_ExcDC3A1_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A1_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -337,7 +340,8 @@ bool get_ExcDC3A1_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A1_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -351,7 +355,8 @@ bool get_ExcDC3A1_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A1_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -365,7 +370,8 @@ bool get_ExcDC3A1_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A1_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -379,7 +385,8 @@ bool get_ExcDC3A1_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A1_vb1max(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vb1max; if (!buffer.str().empty()) @@ -393,7 +400,8 @@ bool get_ExcDC3A1_vb1max(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcDC3A1_vblim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vblim; if (!buffer.str().empty()) @@ -407,7 +415,8 @@ bool get_ExcDC3A1_vblim(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC3A1_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vbmax; if (!buffer.str().empty()) @@ -421,7 +430,8 @@ bool get_ExcDC3A1_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC3A1_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -435,7 +445,8 @@ bool get_ExcDC3A1_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC3A1_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -447,8 +458,6 @@ bool get_ExcDC3A1_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char ExcDC3A1::debugName[] = "ExcDC3A1"; const char* ExcDC3A1::debugString() const { @@ -457,25 +466,25 @@ const char* ExcDC3A1::debugString() const void ExcDC3A1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcDC3A1"), &ExcDC3A1_factory)); + factory_map.emplace("cim:ExcDC3A1", &ExcDC3A1_factory); } void ExcDC3A1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.exclim"), &assign_ExcDC3A1_exclim)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.ka"), &assign_ExcDC3A1_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.ke"), &assign_ExcDC3A1_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.kf"), &assign_ExcDC3A1_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.ki"), &assign_ExcDC3A1_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.kp"), &assign_ExcDC3A1_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.ta"), &assign_ExcDC3A1_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.te"), &assign_ExcDC3A1_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.tf"), &assign_ExcDC3A1_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.vb1max"), &assign_ExcDC3A1_vb1max)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.vblim"), &assign_ExcDC3A1_vblim)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.vbmax"), &assign_ExcDC3A1_vbmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.vrmax"), &assign_ExcDC3A1_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.vrmin"), &assign_ExcDC3A1_vrmin)); + assign_map.emplace("cim:ExcDC3A1.exclim", &assign_ExcDC3A1_exclim); + assign_map.emplace("cim:ExcDC3A1.ka", &assign_ExcDC3A1_ka); + assign_map.emplace("cim:ExcDC3A1.ke", &assign_ExcDC3A1_ke); + assign_map.emplace("cim:ExcDC3A1.kf", &assign_ExcDC3A1_kf); + assign_map.emplace("cim:ExcDC3A1.ki", &assign_ExcDC3A1_ki); + assign_map.emplace("cim:ExcDC3A1.kp", &assign_ExcDC3A1_kp); + assign_map.emplace("cim:ExcDC3A1.ta", &assign_ExcDC3A1_ta); + assign_map.emplace("cim:ExcDC3A1.te", &assign_ExcDC3A1_te); + assign_map.emplace("cim:ExcDC3A1.tf", &assign_ExcDC3A1_tf); + assign_map.emplace("cim:ExcDC3A1.vb1max", &assign_ExcDC3A1_vb1max); + assign_map.emplace("cim:ExcDC3A1.vblim", &assign_ExcDC3A1_vblim); + assign_map.emplace("cim:ExcDC3A1.vbmax", &assign_ExcDC3A1_vbmax); + assign_map.emplace("cim:ExcDC3A1.vrmax", &assign_ExcDC3A1_vrmax); + assign_map.emplace("cim:ExcDC3A1.vrmin", &assign_ExcDC3A1_vrmin); } void ExcDC3A1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcDC3A1.hpp b/CGMES_2.4.15_27JAN2020/ExcDC3A1.hpp index e89d52595..e58f7643f 100644 --- a/CGMES_2.4.15_27JAN2020/ExcDC3A1.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcDC3A1.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - This is modified old IEEE type 3 excitation system. - */ + /** \brief This is modified old IEEE type 3 excitation system. */ class ExcDC3A1 : public ExcitationSystemDynamics { public: @@ -29,20 +27,47 @@ namespace CIMPP ExcDC3A1(); ~ExcDC3A1() override; - CIMPP::Boolean exclim; /* (exclim). true = lower limit of zero is applied to integrator output false = lower limit of zero not applied to integrator output. Typical Value = true. Default: false */ - CIMPP::PU ka; /* Voltage regulator gain (Ka). Typical Value = 300. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gain (Kf). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU ki; /* Potential circuit gain coefficient (Ki). Typical Value = 4.83. Default: nullptr */ - CIMPP::PU kp; /* Potential circuit gain coefficient (Kp). Typical Value = 4.37. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (Ta). Typical Value = 0.01. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 1.83. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (Tf). Typical Value = 0.675. Default: nullptr */ - CIMPP::PU vb1max; /* Available exciter voltage limiter (Vb1max). Typical Value = 11.63. Default: nullptr */ - CIMPP::Boolean vblim; /* Vb limiter indicator. true = exciter Vbmax limiter is active false = Vb1max is active. Typical Value = true. Default: false */ - CIMPP::PU vbmax; /* Available exciter voltage limiter (Vbmax). Typical Value = 11.63. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (Vrmax). Typical Value = 5. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (Vrmin). Typical Value = 0. Default: nullptr */ + /** \brief (exclim). true = lower limit of zero is applied to integrator output false = lower limit of zero not applied to integrator output. Typical Value = true. Default: false */ + CIMPP::Boolean exclim; + + /** \brief Voltage regulator gain (Ka). Typical Value = 300. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gain (Kf). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Potential circuit gain coefficient (Ki). Typical Value = 4.83. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Potential circuit gain coefficient (Kp). Typical Value = 4.37. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0.01. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 1.83. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (Tf). Typical Value = 0.675. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Available exciter voltage limiter (Vb1max). Typical Value = 11.63. Default: nullptr */ + CIMPP::PU vb1max; + + /** \brief Vb limiter indicator. true = exciter Vbmax limiter is active false = Vb1max is active. Typical Value = true. Default: false */ + CIMPP::Boolean vblim; + + /** \brief Available exciter voltage limiter (Vbmax). Typical Value = 11.63. Default: nullptr */ + CIMPP::PU vbmax; + + /** \brief Maximum voltage regulator output (Vrmax). Typical Value = 5. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (Vrmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcELIN1.cpp b/CGMES_2.4.15_27JAN2020/ExcELIN1.cpp index 38b5a12c4..449d03fd8 100644 --- a/CGMES_2.4.15_27JAN2020/ExcELIN1.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcELIN1.cpp @@ -8,26 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcELIN1::ExcELIN1() {}; -ExcELIN1::~ExcELIN1() {}; +ExcELIN1::ExcELIN1() {} +ExcELIN1::~ExcELIN1() {} static const std::list PossibleProfilesForClass = { @@ -68,207 +53,220 @@ ExcELIN1::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcELIN1_dpnf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_dpnf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dpnf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_efmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_efmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_efmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_efmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_ks1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_ks1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_ks2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_ks2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_smax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_smax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->smax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_tfi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_tfi(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tfi; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_tnu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_tnu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tnu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_ts1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_ts1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_ts2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_ts2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_tsw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_tsw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tsw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_vpi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_vpi(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vpi; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_vpnf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_vpnf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vpnf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_vpu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_vpu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vpu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_xe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_xe(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xe; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcELIN1_dpnf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dpnf; if (!buffer.str().empty()) @@ -282,7 +280,8 @@ bool get_ExcELIN1_dpnf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcELIN1_efmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efmax; if (!buffer.str().empty()) @@ -296,7 +295,8 @@ bool get_ExcELIN1_efmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcELIN1_efmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efmin; if (!buffer.str().empty()) @@ -310,7 +310,8 @@ bool get_ExcELIN1_efmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcELIN1_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks1; if (!buffer.str().empty()) @@ -324,7 +325,8 @@ bool get_ExcELIN1_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN1_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks2; if (!buffer.str().empty()) @@ -338,7 +340,8 @@ bool get_ExcELIN1_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN1_smax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->smax; if (!buffer.str().empty()) @@ -352,7 +355,8 @@ bool get_ExcELIN1_smax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcELIN1_tfi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tfi; if (!buffer.str().empty()) @@ -366,7 +370,8 @@ bool get_ExcELIN1_tfi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN1_tnu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tnu; if (!buffer.str().empty()) @@ -380,7 +385,8 @@ bool get_ExcELIN1_tnu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN1_ts1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts1; if (!buffer.str().empty()) @@ -394,7 +400,8 @@ bool get_ExcELIN1_ts1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN1_ts2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts2; if (!buffer.str().empty()) @@ -408,7 +415,8 @@ bool get_ExcELIN1_ts2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN1_tsw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tsw; if (!buffer.str().empty()) @@ -422,7 +430,8 @@ bool get_ExcELIN1_tsw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN1_vpi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vpi; if (!buffer.str().empty()) @@ -436,7 +445,8 @@ bool get_ExcELIN1_vpi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN1_vpnf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vpnf; if (!buffer.str().empty()) @@ -450,7 +460,8 @@ bool get_ExcELIN1_vpnf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcELIN1_vpu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vpu; if (!buffer.str().empty()) @@ -464,7 +475,8 @@ bool get_ExcELIN1_vpu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN1_xe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xe; if (!buffer.str().empty()) @@ -476,8 +488,6 @@ bool get_ExcELIN1_xe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcELIN1::debugName[] = "ExcELIN1"; const char* ExcELIN1::debugString() const { @@ -486,26 +496,26 @@ const char* ExcELIN1::debugString() const void ExcELIN1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcELIN1"), &ExcELIN1_factory)); + factory_map.emplace("cim:ExcELIN1", &ExcELIN1_factory); } void ExcELIN1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.dpnf"), &assign_ExcELIN1_dpnf)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.efmax"), &assign_ExcELIN1_efmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.efmin"), &assign_ExcELIN1_efmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.ks1"), &assign_ExcELIN1_ks1)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.ks2"), &assign_ExcELIN1_ks2)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.smax"), &assign_ExcELIN1_smax)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.tfi"), &assign_ExcELIN1_tfi)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.tnu"), &assign_ExcELIN1_tnu)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.ts1"), &assign_ExcELIN1_ts1)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.ts2"), &assign_ExcELIN1_ts2)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.tsw"), &assign_ExcELIN1_tsw)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.vpi"), &assign_ExcELIN1_vpi)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.vpnf"), &assign_ExcELIN1_vpnf)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.vpu"), &assign_ExcELIN1_vpu)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.xe"), &assign_ExcELIN1_xe)); + assign_map.emplace("cim:ExcELIN1.dpnf", &assign_ExcELIN1_dpnf); + assign_map.emplace("cim:ExcELIN1.efmax", &assign_ExcELIN1_efmax); + assign_map.emplace("cim:ExcELIN1.efmin", &assign_ExcELIN1_efmin); + assign_map.emplace("cim:ExcELIN1.ks1", &assign_ExcELIN1_ks1); + assign_map.emplace("cim:ExcELIN1.ks2", &assign_ExcELIN1_ks2); + assign_map.emplace("cim:ExcELIN1.smax", &assign_ExcELIN1_smax); + assign_map.emplace("cim:ExcELIN1.tfi", &assign_ExcELIN1_tfi); + assign_map.emplace("cim:ExcELIN1.tnu", &assign_ExcELIN1_tnu); + assign_map.emplace("cim:ExcELIN1.ts1", &assign_ExcELIN1_ts1); + assign_map.emplace("cim:ExcELIN1.ts2", &assign_ExcELIN1_ts2); + assign_map.emplace("cim:ExcELIN1.tsw", &assign_ExcELIN1_tsw); + assign_map.emplace("cim:ExcELIN1.vpi", &assign_ExcELIN1_vpi); + assign_map.emplace("cim:ExcELIN1.vpnf", &assign_ExcELIN1_vpnf); + assign_map.emplace("cim:ExcELIN1.vpu", &assign_ExcELIN1_vpu); + assign_map.emplace("cim:ExcELIN1.xe", &assign_ExcELIN1_xe); } void ExcELIN1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcELIN1.hpp b/CGMES_2.4.15_27JAN2020/ExcELIN1.hpp index 3260ddcae..91e784ce6 100644 --- a/CGMES_2.4.15_27JAN2020/ExcELIN1.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcELIN1.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Static PI transformer fed excitation system: ELIN (VATECH) - simplified model. This model represents an all-static excitation system. A PI voltage controller establishes a desired field current set point for a proportional current controller. The integrator of the PI controller has a follow-up input to match its signal to the present field current. A power system stabilizer with power input is included in the model. - */ + /** \brief Static PI transformer fed excitation system: ELIN (VATECH) - simplified model. This model represents an all-static excitation system. A PI voltage controller establishes a desired field current set point for a proportional current controller. The integrator of the PI controller has a follow-up input to match its signal to the present field current. A power system stabilizer with power input is included in the model. */ class ExcELIN1 : public ExcitationSystemDynamics { public: @@ -28,21 +26,50 @@ namespace CIMPP ExcELIN1(); ~ExcELIN1() override; - CIMPP::PU dpnf; /* Controller follow up dead band (Dpnf). Typical Value = 0. Default: nullptr */ - CIMPP::PU efmax; /* Maximum open circuit excitation voltage (Efmax). Typical Value = 5. Default: nullptr */ - CIMPP::PU efmin; /* Minimum open circuit excitation voltage (Efmin). Typical Value = -5. Default: nullptr */ - CIMPP::PU ks1; /* Stabilizer Gain 1 (Ks1). Typical Value = 0. Default: nullptr */ - CIMPP::PU ks2; /* Stabilizer Gain 2 (Ks2). Typical Value = 0. Default: nullptr */ - CIMPP::PU smax; /* Stabilizer Limit Output (smax). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tfi; /* Current transducer time constant (Tfi). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tnu; /* Controller reset time constant (Tnu). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds ts1; /* Stabilizer Phase Lag Time Constant (Ts1). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds ts2; /* Stabilizer Filter Time Constant (Ts2). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tsw; /* Stabilizer parameters (Tsw). Typical Value = 3. Default: nullptr */ - CIMPP::PU vpi; /* Current controller gain (Vpi). Typical Value = 12.45. Default: nullptr */ - CIMPP::PU vpnf; /* Controller follow up gain (Vpnf). Typical Value = 2. Default: nullptr */ - CIMPP::PU vpu; /* Voltage controller proportional gain (Vpu). Typical Value = 34.5. Default: nullptr */ - CIMPP::PU xe; /* Excitation transformer effective reactance (Xe) (>=0). Xe represents the regulation of the transformer/rectifier unit. Typical Value = 0.06. Default: nullptr */ + /** \brief Controller follow up dead band (Dpnf). Typical Value = 0. Default: nullptr */ + CIMPP::PU dpnf; + + /** \brief Maximum open circuit excitation voltage (Efmax). Typical Value = 5. Default: nullptr */ + CIMPP::PU efmax; + + /** \brief Minimum open circuit excitation voltage (Efmin). Typical Value = -5. Default: nullptr */ + CIMPP::PU efmin; + + /** \brief Stabilizer Gain 1 (Ks1). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks1; + + /** \brief Stabilizer Gain 2 (Ks2). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks2; + + /** \brief Stabilizer Limit Output (smax). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU smax; + + /** \brief Current transducer time constant (Tfi). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tfi; + + /** \brief Controller reset time constant (Tnu). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds tnu; + + /** \brief Stabilizer Phase Lag Time Constant (Ts1). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds ts1; + + /** \brief Stabilizer Filter Time Constant (Ts2). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds ts2; + + /** \brief Stabilizer parameters (Tsw). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds tsw; + + /** \brief Current controller gain (Vpi). Typical Value = 12.45. Default: nullptr */ + CIMPP::PU vpi; + + /** \brief Controller follow up gain (Vpnf). Typical Value = 2. Default: nullptr */ + CIMPP::PU vpnf; + + /** \brief Voltage controller proportional gain (Vpu). Typical Value = 34.5. Default: nullptr */ + CIMPP::PU vpu; + + /** \brief Excitation transformer effective reactance (Xe) (>=0). Xe represents the regulation of the transformer/rectifier unit. Typical Value = 0.06. Default: nullptr */ + CIMPP::PU xe; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcELIN2.cpp b/CGMES_2.4.15_27JAN2020/ExcELIN2.cpp index c61563e77..afd309820 100644 --- a/CGMES_2.4.15_27JAN2020/ExcELIN2.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcELIN2.cpp @@ -8,38 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcELIN2::ExcELIN2() {}; -ExcELIN2::~ExcELIN2() {}; +ExcELIN2::ExcELIN2() {} +ExcELIN2::~ExcELIN2() {} static const std::list PossibleProfilesForClass = { @@ -92,363 +65,388 @@ ExcELIN2::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcELIN2_efdbas(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_efdbas(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdbas; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_iefmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_iefmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->iefmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_iefmax2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_iefmax2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->iefmax2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_iefmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_iefmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->iefmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_k1ec(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_k1ec(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1ec; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_k4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_kd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_kd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_ke2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_ke2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_ketb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_ketb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ketb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_pid1max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_pid1max(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pid1max; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_tb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_tb1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_te2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_te2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_ti1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_ti1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_ti3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_ti3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_ti4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_ti4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_tr4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_tr4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_upmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_upmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->upmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_upmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_upmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->upmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_xp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_xp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcELIN2_efdbas(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdbas; if (!buffer.str().empty()) @@ -462,7 +460,8 @@ bool get_ExcELIN2_efdbas(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcELIN2_iefmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->iefmax; if (!buffer.str().empty()) @@ -476,7 +475,8 @@ bool get_ExcELIN2_iefmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcELIN2_iefmax2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->iefmax2; if (!buffer.str().empty()) @@ -490,7 +490,8 @@ bool get_ExcELIN2_iefmax2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcELIN2_iefmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->iefmin; if (!buffer.str().empty()) @@ -504,7 +505,8 @@ bool get_ExcELIN2_iefmin(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcELIN2_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -518,7 +520,8 @@ bool get_ExcELIN2_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcELIN2_k1ec(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1ec; if (!buffer.str().empty()) @@ -532,7 +535,8 @@ bool get_ExcELIN2_k1ec(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcELIN2_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -546,7 +550,8 @@ bool get_ExcELIN2_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcELIN2_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -560,7 +565,8 @@ bool get_ExcELIN2_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcELIN2_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k4; if (!buffer.str().empty()) @@ -574,7 +580,8 @@ bool get_ExcELIN2_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcELIN2_kd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd1; if (!buffer.str().empty()) @@ -588,7 +595,8 @@ bool get_ExcELIN2_kd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_ke2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke2; if (!buffer.str().empty()) @@ -602,7 +610,8 @@ bool get_ExcELIN2_ke2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_ketb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ketb; if (!buffer.str().empty()) @@ -616,7 +625,8 @@ bool get_ExcELIN2_ketb(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcELIN2_pid1max(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pid1max; if (!buffer.str().empty()) @@ -630,7 +640,8 @@ bool get_ExcELIN2_pid1max(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcELIN2_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -644,7 +655,8 @@ bool get_ExcELIN2_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcELIN2_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -658,7 +670,8 @@ bool get_ExcELIN2_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcELIN2_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb1; if (!buffer.str().empty()) @@ -672,7 +685,8 @@ bool get_ExcELIN2_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -686,7 +700,8 @@ bool get_ExcELIN2_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcELIN2_te2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te2; if (!buffer.str().empty()) @@ -700,7 +715,8 @@ bool get_ExcELIN2_te2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_ti1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti1; if (!buffer.str().empty()) @@ -714,7 +730,8 @@ bool get_ExcELIN2_ti1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_ti3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti3; if (!buffer.str().empty()) @@ -728,7 +745,8 @@ bool get_ExcELIN2_ti3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_ti4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti4; if (!buffer.str().empty()) @@ -742,7 +760,8 @@ bool get_ExcELIN2_ti4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_tr4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr4; if (!buffer.str().empty()) @@ -756,7 +775,8 @@ bool get_ExcELIN2_tr4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_upmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->upmax; if (!buffer.str().empty()) @@ -770,7 +790,8 @@ bool get_ExcELIN2_upmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcELIN2_upmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->upmin; if (!buffer.str().empty()) @@ -784,7 +805,8 @@ bool get_ExcELIN2_upmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcELIN2_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -798,7 +820,8 @@ bool get_ExcELIN2_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -812,7 +835,8 @@ bool get_ExcELIN2_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_xp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xp; if (!buffer.str().empty()) @@ -824,8 +848,6 @@ bool get_ExcELIN2_xp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcELIN2::debugName[] = "ExcELIN2"; const char* ExcELIN2::debugString() const { @@ -834,38 +856,38 @@ const char* ExcELIN2::debugString() const void ExcELIN2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcELIN2"), &ExcELIN2_factory)); + factory_map.emplace("cim:ExcELIN2", &ExcELIN2_factory); } void ExcELIN2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.efdbas"), &assign_ExcELIN2_efdbas)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.iefmax"), &assign_ExcELIN2_iefmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.iefmax2"), &assign_ExcELIN2_iefmax2)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.iefmin"), &assign_ExcELIN2_iefmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.k1"), &assign_ExcELIN2_k1)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.k1ec"), &assign_ExcELIN2_k1ec)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.k2"), &assign_ExcELIN2_k2)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.k3"), &assign_ExcELIN2_k3)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.k4"), &assign_ExcELIN2_k4)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.kd1"), &assign_ExcELIN2_kd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.ke2"), &assign_ExcELIN2_ke2)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.ketb"), &assign_ExcELIN2_ketb)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.pid1max"), &assign_ExcELIN2_pid1max)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.seve1"), &assign_ExcELIN2_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.seve2"), &assign_ExcELIN2_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.tb1"), &assign_ExcELIN2_tb1)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.te"), &assign_ExcELIN2_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.te2"), &assign_ExcELIN2_te2)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.ti1"), &assign_ExcELIN2_ti1)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.ti3"), &assign_ExcELIN2_ti3)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.ti4"), &assign_ExcELIN2_ti4)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.tr4"), &assign_ExcELIN2_tr4)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.upmax"), &assign_ExcELIN2_upmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.upmin"), &assign_ExcELIN2_upmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.ve1"), &assign_ExcELIN2_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.ve2"), &assign_ExcELIN2_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.xp"), &assign_ExcELIN2_xp)); + assign_map.emplace("cim:ExcELIN2.efdbas", &assign_ExcELIN2_efdbas); + assign_map.emplace("cim:ExcELIN2.iefmax", &assign_ExcELIN2_iefmax); + assign_map.emplace("cim:ExcELIN2.iefmax2", &assign_ExcELIN2_iefmax2); + assign_map.emplace("cim:ExcELIN2.iefmin", &assign_ExcELIN2_iefmin); + assign_map.emplace("cim:ExcELIN2.k1", &assign_ExcELIN2_k1); + assign_map.emplace("cim:ExcELIN2.k1ec", &assign_ExcELIN2_k1ec); + assign_map.emplace("cim:ExcELIN2.k2", &assign_ExcELIN2_k2); + assign_map.emplace("cim:ExcELIN2.k3", &assign_ExcELIN2_k3); + assign_map.emplace("cim:ExcELIN2.k4", &assign_ExcELIN2_k4); + assign_map.emplace("cim:ExcELIN2.kd1", &assign_ExcELIN2_kd1); + assign_map.emplace("cim:ExcELIN2.ke2", &assign_ExcELIN2_ke2); + assign_map.emplace("cim:ExcELIN2.ketb", &assign_ExcELIN2_ketb); + assign_map.emplace("cim:ExcELIN2.pid1max", &assign_ExcELIN2_pid1max); + assign_map.emplace("cim:ExcELIN2.seve1", &assign_ExcELIN2_seve1); + assign_map.emplace("cim:ExcELIN2.seve2", &assign_ExcELIN2_seve2); + assign_map.emplace("cim:ExcELIN2.tb1", &assign_ExcELIN2_tb1); + assign_map.emplace("cim:ExcELIN2.te", &assign_ExcELIN2_te); + assign_map.emplace("cim:ExcELIN2.te2", &assign_ExcELIN2_te2); + assign_map.emplace("cim:ExcELIN2.ti1", &assign_ExcELIN2_ti1); + assign_map.emplace("cim:ExcELIN2.ti3", &assign_ExcELIN2_ti3); + assign_map.emplace("cim:ExcELIN2.ti4", &assign_ExcELIN2_ti4); + assign_map.emplace("cim:ExcELIN2.tr4", &assign_ExcELIN2_tr4); + assign_map.emplace("cim:ExcELIN2.upmax", &assign_ExcELIN2_upmax); + assign_map.emplace("cim:ExcELIN2.upmin", &assign_ExcELIN2_upmin); + assign_map.emplace("cim:ExcELIN2.ve1", &assign_ExcELIN2_ve1); + assign_map.emplace("cim:ExcELIN2.ve2", &assign_ExcELIN2_ve2); + assign_map.emplace("cim:ExcELIN2.xp", &assign_ExcELIN2_xp); } void ExcELIN2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcELIN2.hpp b/CGMES_2.4.15_27JAN2020/ExcELIN2.hpp index e2588dab2..b68685963 100644 --- a/CGMES_2.4.15_27JAN2020/ExcELIN2.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcELIN2.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Detailed Excitation System Model - ELIN (VATECH). This model represents an all-static excitation system. A PI voltage controller establishes a desired field current set point for a proportional current controller. The integrator of the PI controller has a follow-up input to match its signal to the present field current. Power system stabilizer models used in conjunction with this excitation system model: PssELIN2, PssIEEE2B, Pss2B. - */ + /** \brief Detailed Excitation System Model - ELIN (VATECH). This model represents an all-static excitation system. A PI voltage controller establishes a desired field current set point for a proportional current controller. The integrator of the PI controller has a follow-up input to match its signal to the present field current. Power system stabilizer models used in conjunction with this excitation system model: PssELIN2, PssIEEE2B, Pss2B. */ class ExcELIN2 : public ExcitationSystemDynamics { public: @@ -28,33 +26,86 @@ namespace CIMPP ExcELIN2(); ~ExcELIN2() override; - CIMPP::PU efdbas; /* Gain (Efdbas). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU iefmax; /* Limiter (Iefmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU iefmax2; /* Minimum open circuit excitation voltage (Iefmax2). Typical Value = -5. Default: nullptr */ - CIMPP::PU iefmin; /* Limiter (Iefmin). Typical Value = 1. Default: nullptr */ - CIMPP::PU k1; /* Voltage regulator input gain (K1). Typical Value = 0. Default: nullptr */ - CIMPP::PU k1ec; /* Voltage regulator input limit (K1ec). Typical Value = 2. Default: nullptr */ - CIMPP::PU k2; /* Gain (K2). Typical Value = 5. Default: nullptr */ - CIMPP::PU k3; /* Gain (K3). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU k4; /* Gain (K4). Typical Value = 0. Default: nullptr */ - CIMPP::PU kd1; /* Voltage controller derivative gain (Kd1). Typical Value = 34.5. Default: nullptr */ - CIMPP::PU ke2; /* Gain (Ke2). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU ketb; /* Gain (Ketb). Typical Value = 0.06. Default: nullptr */ - CIMPP::PU pid1max; /* Controller follow up gain (PID1max). Typical Value = 2. Default: nullptr */ - CIMPP::PU seve1; /* Exciter saturation function value at the corresponding exciter voltage, Ve1, back of commutating reactance (Se[Ve1]). Typical Value = 0. Default: nullptr */ - CIMPP::PU seve2; /* Exciter saturation function value at the corresponding exciter voltage, Ve2, back of commutating reactance (Se[Ve2]). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tb1; /* Voltage controller derivative washout time constant (Tb1). Typical Value = 12.45. Default: nullptr */ - CIMPP::Seconds te; /* Time constant (Te). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te2; /* Time Constant (Te2). Typical Value = 1. Default: nullptr */ - CIMPP::PU ti1; /* Controller follow up dead band (Ti1). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ti3; /* Time constant (Ti3). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds ti4; /* Time constant (Ti4). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tr4; /* Time constant (Tr4). Typical Value = 1. Default: nullptr */ - CIMPP::PU upmax; /* Limiter (Upmax). Typical Value = 3. Default: nullptr */ - CIMPP::PU upmin; /* Limiter (Upmin). Typical Value = 0. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve1). Typical Value = 3. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve2). Typical Value = 0. Default: nullptr */ - CIMPP::PU xp; /* Excitation transformer effective reactance (Xp). Typical Value = 1. Default: nullptr */ + /** \brief Gain (Efdbas). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU efdbas; + + /** \brief Limiter (Iefmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU iefmax; + + /** \brief Minimum open circuit excitation voltage (Iefmax2). Typical Value = -5. Default: nullptr */ + CIMPP::PU iefmax2; + + /** \brief Limiter (Iefmin). Typical Value = 1. Default: nullptr */ + CIMPP::PU iefmin; + + /** \brief Voltage regulator input gain (K1). Typical Value = 0. Default: nullptr */ + CIMPP::PU k1; + + /** \brief Voltage regulator input limit (K1ec). Typical Value = 2. Default: nullptr */ + CIMPP::PU k1ec; + + /** \brief Gain (K2). Typical Value = 5. Default: nullptr */ + CIMPP::PU k2; + + /** \brief Gain (K3). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU k3; + + /** \brief Gain (K4). Typical Value = 0. Default: nullptr */ + CIMPP::PU k4; + + /** \brief Voltage controller derivative gain (Kd1). Typical Value = 34.5. Default: nullptr */ + CIMPP::PU kd1; + + /** \brief Gain (Ke2). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU ke2; + + /** \brief Gain (Ketb). Typical Value = 0.06. Default: nullptr */ + CIMPP::PU ketb; + + /** \brief Controller follow up gain (PID1max). Typical Value = 2. Default: nullptr */ + CIMPP::PU pid1max; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Ve1, back of commutating reactance (Se[Ve1]). Typical Value = 0. Default: nullptr */ + CIMPP::PU seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, Ve2, back of commutating reactance (Se[Ve2]). Typical Value = 1. Default: nullptr */ + CIMPP::PU seve2; + + /** \brief Voltage controller derivative washout time constant (Tb1). Typical Value = 12.45. Default: nullptr */ + CIMPP::Seconds tb1; + + /** \brief Time constant (Te). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Time Constant (Te2). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds te2; + + /** \brief Controller follow up dead band (Ti1). Typical Value = 0. Default: nullptr */ + CIMPP::PU ti1; + + /** \brief Time constant (Ti3). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds ti3; + + /** \brief Time constant (Ti4). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ti4; + + /** \brief Time constant (Tr4). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tr4; + + /** \brief Limiter (Upmax). Typical Value = 3. Default: nullptr */ + CIMPP::PU upmax; + + /** \brief Limiter (Upmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU upmin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve1). Typical Value = 3. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (Ve2). Typical Value = 0. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Excitation transformer effective reactance (Xp). Typical Value = 1. Default: nullptr */ + CIMPP::PU xp; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcHU.cpp b/CGMES_2.4.15_27JAN2020/ExcHU.cpp index d7531c435..d00bf89d8 100644 --- a/CGMES_2.4.15_27JAN2020/ExcHU.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcHU.cpp @@ -8,23 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -ExcHU::ExcHU() {}; -ExcHU::~ExcHU() {}; +ExcHU::ExcHU() {} +ExcHU::~ExcHU() {} static const std::list PossibleProfilesForClass = { @@ -62,168 +50,178 @@ ExcHU::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcHU_ae(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_ae(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ae; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_ai(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_ai(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ai; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_atr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_atr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->atr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_emax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_emax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->emax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_emin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_emin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->emin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_imax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_imax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->imax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_imin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_imin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->imin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_ti(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_ti(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcHU_ae(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ae; if (!buffer.str().empty()) @@ -237,7 +235,8 @@ bool get_ExcHU_ae(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_ai(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ai; if (!buffer.str().empty()) @@ -251,7 +250,8 @@ bool get_ExcHU_ai(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_atr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->atr; if (!buffer.str().empty()) @@ -265,7 +265,8 @@ bool get_ExcHU_atr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->emax; if (!buffer.str().empty()) @@ -279,7 +280,8 @@ bool get_ExcHU_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_emin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->emin; if (!buffer.str().empty()) @@ -293,7 +295,8 @@ bool get_ExcHU_emin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_imax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->imax; if (!buffer.str().empty()) @@ -307,7 +310,8 @@ bool get_ExcHU_imax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_imin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->imin; if (!buffer.str().empty()) @@ -321,7 +325,8 @@ bool get_ExcHU_imin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -335,7 +340,8 @@ bool get_ExcHU_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -349,7 +355,8 @@ bool get_ExcHU_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -363,7 +370,8 @@ bool get_ExcHU_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_ti(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti; if (!buffer.str().empty()) @@ -377,7 +385,8 @@ bool get_ExcHU_ti(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -389,8 +398,6 @@ bool get_ExcHU_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcHU::debugName[] = "ExcHU"; const char* ExcHU::debugString() const { @@ -399,23 +406,23 @@ const char* ExcHU::debugString() const void ExcHU::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcHU"), &ExcHU_factory)); + factory_map.emplace("cim:ExcHU", &ExcHU_factory); } void ExcHU::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcHU.ae"), &assign_ExcHU_ae)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.ai"), &assign_ExcHU_ai)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.atr"), &assign_ExcHU_atr)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.emax"), &assign_ExcHU_emax)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.emin"), &assign_ExcHU_emin)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.imax"), &assign_ExcHU_imax)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.imin"), &assign_ExcHU_imin)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.ke"), &assign_ExcHU_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.ki"), &assign_ExcHU_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.te"), &assign_ExcHU_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.ti"), &assign_ExcHU_ti)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.tr"), &assign_ExcHU_tr)); + assign_map.emplace("cim:ExcHU.ae", &assign_ExcHU_ae); + assign_map.emplace("cim:ExcHU.ai", &assign_ExcHU_ai); + assign_map.emplace("cim:ExcHU.atr", &assign_ExcHU_atr); + assign_map.emplace("cim:ExcHU.emax", &assign_ExcHU_emax); + assign_map.emplace("cim:ExcHU.emin", &assign_ExcHU_emin); + assign_map.emplace("cim:ExcHU.imax", &assign_ExcHU_imax); + assign_map.emplace("cim:ExcHU.imin", &assign_ExcHU_imin); + assign_map.emplace("cim:ExcHU.ke", &assign_ExcHU_ke); + assign_map.emplace("cim:ExcHU.ki", &assign_ExcHU_ki); + assign_map.emplace("cim:ExcHU.te", &assign_ExcHU_te); + assign_map.emplace("cim:ExcHU.ti", &assign_ExcHU_ti); + assign_map.emplace("cim:ExcHU.tr", &assign_ExcHU_tr); } void ExcHU::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcHU.hpp b/CGMES_2.4.15_27JAN2020/ExcHU.hpp index 2912bde7e..6e31eb84e 100644 --- a/CGMES_2.4.15_27JAN2020/ExcHU.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcHU.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Hungarian Excitation System Model, with built-in voltage transducer. - */ + /** \brief Hungarian Excitation System Model, with built-in voltage transducer. */ class ExcHU : public ExcitationSystemDynamics { public: @@ -29,18 +27,41 @@ namespace CIMPP ExcHU(); ~ExcHU() override; - CIMPP::PU ae; /* Major loop PI tag gain factor (Ae). Typical Value = 3. Default: nullptr */ - CIMPP::PU ai; /* Minor loop PI tag gain factor (Ai). Typical Value = 22. Default: nullptr */ - CIMPP::PU atr; /* AVR constant (Atr). Typical Value = 2.19. Default: nullptr */ - CIMPP::PU emax; /* Field voltage control signal upper limit on AVR base (Emax). Typical Value = 0.996. Default: nullptr */ - CIMPP::PU emin; /* Field voltage control signal lower limit on AVR base (Emin). Typical Value = -0.866. Default: nullptr */ - CIMPP::PU imax; /* Major loop PI tag output signal upper limit (Imax). Typical Value = 2.19. Default: nullptr */ - CIMPP::PU imin; /* Major loop PI tag output signal lower limit (Imin). Typical Value = 0.1. Default: nullptr */ - CIMPP::Simple_Float ke; /* Voltage base conversion constant (Ke). Typical Value = 4.666. Default: nullptr */ - CIMPP::Simple_Float ki; /* Current base conversion constant (Ki). Typical Value = 0.21428. Default: nullptr */ - CIMPP::Seconds te; /* Major loop PI tag integration time constant (Te). Typical Value = 0.154. Default: nullptr */ - CIMPP::Seconds ti; /* Minor loop PI control tag integration time constant (Ti). Typical Value = 0.01333. Default: nullptr */ - CIMPP::Seconds tr; /* Filter time constant (Tr). If a voltage compensator is used in conjunction with this excitation system model, Tr should be set to 0. Typical Value = 0.01. Default: nullptr */ + /** \brief Major loop PI tag gain factor (Ae). Typical Value = 3. Default: nullptr */ + CIMPP::PU ae; + + /** \brief Minor loop PI tag gain factor (Ai). Typical Value = 22. Default: nullptr */ + CIMPP::PU ai; + + /** \brief AVR constant (Atr). Typical Value = 2.19. Default: nullptr */ + CIMPP::PU atr; + + /** \brief Field voltage control signal upper limit on AVR base (Emax). Typical Value = 0.996. Default: nullptr */ + CIMPP::PU emax; + + /** \brief Field voltage control signal lower limit on AVR base (Emin). Typical Value = -0.866. Default: nullptr */ + CIMPP::PU emin; + + /** \brief Major loop PI tag output signal upper limit (Imax). Typical Value = 2.19. Default: nullptr */ + CIMPP::PU imax; + + /** \brief Major loop PI tag output signal lower limit (Imin). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU imin; + + /** \brief Voltage base conversion constant (Ke). Typical Value = 4.666. Default: nullptr */ + CIMPP::Simple_Float ke; + + /** \brief Current base conversion constant (Ki). Typical Value = 0.21428. Default: nullptr */ + CIMPP::Simple_Float ki; + + /** \brief Major loop PI tag integration time constant (Te). Typical Value = 0.154. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Minor loop PI control tag integration time constant (Ti). Typical Value = 0.01333. Default: nullptr */ + CIMPP::Seconds ti; + + /** \brief Filter time constant (Tr). If a voltage compensator is used in conjunction with this excitation system model, Tr should be set to 0. Typical Value = 0.01. Default: nullptr */ + CIMPP::Seconds tr; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEAC1A.cpp b/CGMES_2.4.15_27JAN2020/ExcIEEEAC1A.cpp index 20968d73e..9b4889e3d 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEAC1A.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEAC1A.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEAC1A::ExcIEEEAC1A() {}; -ExcIEEEAC1A::~ExcIEEEAC1A() {}; +ExcIEEEAC1A::ExcIEEEAC1A() {} +ExcIEEEAC1A::~ExcIEEEAC1A() {} static const std::list PossibleProfilesForClass = { @@ -74,246 +56,262 @@ ExcIEEEAC1A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEAC1A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEAC1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -327,7 +325,8 @@ bool get_ExcIEEEAC1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -341,7 +340,8 @@ bool get_ExcIEEEAC1A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -355,7 +355,8 @@ bool get_ExcIEEEAC1A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -369,7 +370,8 @@ bool get_ExcIEEEAC1A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -383,7 +385,8 @@ bool get_ExcIEEEAC1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -397,7 +400,8 @@ bool get_ExcIEEEAC1A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC1A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -411,7 +415,8 @@ bool get_ExcIEEEAC1A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -425,7 +430,8 @@ bool get_ExcIEEEAC1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -439,7 +445,8 @@ bool get_ExcIEEEAC1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -453,7 +460,8 @@ bool get_ExcIEEEAC1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -467,7 +475,8 @@ bool get_ExcIEEEAC1A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -481,7 +490,8 @@ bool get_ExcIEEEAC1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -495,7 +505,8 @@ bool get_ExcIEEEAC1A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC1A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -509,7 +520,8 @@ bool get_ExcIEEEAC1A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC1A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -523,7 +535,8 @@ bool get_ExcIEEEAC1A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC1A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -537,7 +550,8 @@ bool get_ExcIEEEAC1A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -551,7 +565,8 @@ bool get_ExcIEEEAC1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -563,8 +578,6 @@ bool get_ExcIEEEAC1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEAC1A::debugName[] = "ExcIEEEAC1A"; const char* ExcIEEEAC1A::debugString() const { @@ -573,29 +586,29 @@ const char* ExcIEEEAC1A::debugString() const void ExcIEEEAC1A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A"), &ExcIEEEAC1A_factory)); + factory_map.emplace("cim:ExcIEEEAC1A", &ExcIEEEAC1A_factory); } void ExcIEEEAC1A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.ka"), &assign_ExcIEEEAC1A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.kc"), &assign_ExcIEEEAC1A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.kd"), &assign_ExcIEEEAC1A_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.ke"), &assign_ExcIEEEAC1A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.kf"), &assign_ExcIEEEAC1A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.seve1"), &assign_ExcIEEEAC1A_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.seve2"), &assign_ExcIEEEAC1A_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.ta"), &assign_ExcIEEEAC1A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.tb"), &assign_ExcIEEEAC1A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.tc"), &assign_ExcIEEEAC1A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.te"), &assign_ExcIEEEAC1A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.tf"), &assign_ExcIEEEAC1A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.vamax"), &assign_ExcIEEEAC1A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.vamin"), &assign_ExcIEEEAC1A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.ve1"), &assign_ExcIEEEAC1A_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.ve2"), &assign_ExcIEEEAC1A_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.vrmax"), &assign_ExcIEEEAC1A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.vrmin"), &assign_ExcIEEEAC1A_vrmin)); + assign_map.emplace("cim:ExcIEEEAC1A.ka", &assign_ExcIEEEAC1A_ka); + assign_map.emplace("cim:ExcIEEEAC1A.kc", &assign_ExcIEEEAC1A_kc); + assign_map.emplace("cim:ExcIEEEAC1A.kd", &assign_ExcIEEEAC1A_kd); + assign_map.emplace("cim:ExcIEEEAC1A.ke", &assign_ExcIEEEAC1A_ke); + assign_map.emplace("cim:ExcIEEEAC1A.kf", &assign_ExcIEEEAC1A_kf); + assign_map.emplace("cim:ExcIEEEAC1A.seve1", &assign_ExcIEEEAC1A_seve1); + assign_map.emplace("cim:ExcIEEEAC1A.seve2", &assign_ExcIEEEAC1A_seve2); + assign_map.emplace("cim:ExcIEEEAC1A.ta", &assign_ExcIEEEAC1A_ta); + assign_map.emplace("cim:ExcIEEEAC1A.tb", &assign_ExcIEEEAC1A_tb); + assign_map.emplace("cim:ExcIEEEAC1A.tc", &assign_ExcIEEEAC1A_tc); + assign_map.emplace("cim:ExcIEEEAC1A.te", &assign_ExcIEEEAC1A_te); + assign_map.emplace("cim:ExcIEEEAC1A.tf", &assign_ExcIEEEAC1A_tf); + assign_map.emplace("cim:ExcIEEEAC1A.vamax", &assign_ExcIEEEAC1A_vamax); + assign_map.emplace("cim:ExcIEEEAC1A.vamin", &assign_ExcIEEEAC1A_vamin); + assign_map.emplace("cim:ExcIEEEAC1A.ve1", &assign_ExcIEEEAC1A_ve1); + assign_map.emplace("cim:ExcIEEEAC1A.ve2", &assign_ExcIEEEAC1A_ve2); + assign_map.emplace("cim:ExcIEEEAC1A.vrmax", &assign_ExcIEEEAC1A_vrmax); + assign_map.emplace("cim:ExcIEEEAC1A.vrmin", &assign_ExcIEEEAC1A_vrmin); } void ExcIEEEAC1A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEAC1A.hpp b/CGMES_2.4.15_27JAN2020/ExcIEEEAC1A.hpp index 1f0f92bab..a3d32c72f 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEAC1A.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEAC1A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type AC1A model. The model represents the field-controlled alternator-rectifier excitation systems designated Type AC1A. These excitation systems consist of an alternator main exciter with non-controlled rectifiers. Reference: IEEE Standard 421.5-2005 Section 6.1. - */ + /** \brief The class represents IEEE Std 421.5-2005 type AC1A model. The model represents the field-controlled alternator-rectifier excitation systems designated Type AC1A. These excitation systems consist of an alternator main exciter with non-controlled rectifiers. Reference: IEEE Standard 421.5-2005 Section 6.1. */ class ExcIEEEAC1A : public ExcitationSystemDynamics { public: @@ -29,24 +27,59 @@ namespace CIMPP ExcIEEEAC1A(); ~ExcIEEEAC1A() override; - CIMPP::PU ka; /* Voltage regulator gain (K). Typical Value = 400. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (K). Typical Value = 0.38. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (K). Typical Value = 0.03. Default: nullptr */ - CIMPP::Simple_Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.1. Default: nullptr */ - CIMPP::Simple_Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.03. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.8. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (V). Typical Value = 14.5. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (V). Typical Value = -14.5. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 4.18. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 3.14. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator outputs (V). Typical Value = 6.03. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator outputs (V). Typical Value = -5.43. Default: nullptr */ + /** \brief Voltage regulator gain (K). Typical Value = 400. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (K). Typical Value = 0.38. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (K). Typical Value = 0.03. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.03. Default: nullptr */ + CIMPP::Simple_Float seve2; + + /** \brief Voltage regulator time constant (T). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.8. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage regulator output (V). Typical Value = 14.5. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -14.5. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 4.18. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 3.14. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Maximum voltage regulator outputs (V). Typical Value = 6.03. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator outputs (V). Typical Value = -5.43. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEAC2A.cpp b/CGMES_2.4.15_27JAN2020/ExcIEEEAC2A.cpp index 527a60763..a6f4da576 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEAC2A.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEAC2A.cpp @@ -8,32 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEAC2A::ExcIEEEAC2A() {}; -ExcIEEEAC2A::~ExcIEEEAC2A() {}; +ExcIEEEAC2A::ExcIEEEAC2A() {} +ExcIEEEAC2A::~ExcIEEEAC2A() {} static const std::list PossibleProfilesForClass = { @@ -80,285 +59,304 @@ ExcIEEEAC2A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEAC2A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_kb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_kb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_kh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_vfemax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfemax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEAC2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -372,7 +370,8 @@ bool get_ExcIEEEAC2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_kb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kb; if (!buffer.str().empty()) @@ -386,7 +385,8 @@ bool get_ExcIEEEAC2A_kb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -400,7 +400,8 @@ bool get_ExcIEEEAC2A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -414,7 +415,8 @@ bool get_ExcIEEEAC2A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -428,7 +430,8 @@ bool get_ExcIEEEAC2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -442,7 +445,8 @@ bool get_ExcIEEEAC2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh; if (!buffer.str().empty()) @@ -456,7 +460,8 @@ bool get_ExcIEEEAC2A_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -470,7 +475,8 @@ bool get_ExcIEEEAC2A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC2A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -484,7 +490,8 @@ bool get_ExcIEEEAC2A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -498,7 +505,8 @@ bool get_ExcIEEEAC2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -512,7 +520,8 @@ bool get_ExcIEEEAC2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -526,7 +535,8 @@ bool get_ExcIEEEAC2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -540,7 +550,8 @@ bool get_ExcIEEEAC2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -554,7 +565,8 @@ bool get_ExcIEEEAC2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -568,7 +580,8 @@ bool get_ExcIEEEAC2A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC2A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -582,7 +595,8 @@ bool get_ExcIEEEAC2A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC2A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -596,7 +610,8 @@ bool get_ExcIEEEAC2A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC2A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -610,7 +625,8 @@ bool get_ExcIEEEAC2A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC2A_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfemax; if (!buffer.str().empty()) @@ -624,7 +640,8 @@ bool get_ExcIEEEAC2A_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEAC2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -638,7 +655,8 @@ bool get_ExcIEEEAC2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -650,8 +668,6 @@ bool get_ExcIEEEAC2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEAC2A::debugName[] = "ExcIEEEAC2A"; const char* ExcIEEEAC2A::debugString() const { @@ -660,32 +676,32 @@ const char* ExcIEEEAC2A::debugString() const void ExcIEEEAC2A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A"), &ExcIEEEAC2A_factory)); + factory_map.emplace("cim:ExcIEEEAC2A", &ExcIEEEAC2A_factory); } void ExcIEEEAC2A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.ka"), &assign_ExcIEEEAC2A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.kb"), &assign_ExcIEEEAC2A_kb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.kc"), &assign_ExcIEEEAC2A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.kd"), &assign_ExcIEEEAC2A_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.ke"), &assign_ExcIEEEAC2A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.kf"), &assign_ExcIEEEAC2A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.kh"), &assign_ExcIEEEAC2A_kh)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.seve1"), &assign_ExcIEEEAC2A_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.seve2"), &assign_ExcIEEEAC2A_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.ta"), &assign_ExcIEEEAC2A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.tb"), &assign_ExcIEEEAC2A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.tc"), &assign_ExcIEEEAC2A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.te"), &assign_ExcIEEEAC2A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.tf"), &assign_ExcIEEEAC2A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.vamax"), &assign_ExcIEEEAC2A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.vamin"), &assign_ExcIEEEAC2A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.ve1"), &assign_ExcIEEEAC2A_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.ve2"), &assign_ExcIEEEAC2A_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.vfemax"), &assign_ExcIEEEAC2A_vfemax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.vrmax"), &assign_ExcIEEEAC2A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.vrmin"), &assign_ExcIEEEAC2A_vrmin)); + assign_map.emplace("cim:ExcIEEEAC2A.ka", &assign_ExcIEEEAC2A_ka); + assign_map.emplace("cim:ExcIEEEAC2A.kb", &assign_ExcIEEEAC2A_kb); + assign_map.emplace("cim:ExcIEEEAC2A.kc", &assign_ExcIEEEAC2A_kc); + assign_map.emplace("cim:ExcIEEEAC2A.kd", &assign_ExcIEEEAC2A_kd); + assign_map.emplace("cim:ExcIEEEAC2A.ke", &assign_ExcIEEEAC2A_ke); + assign_map.emplace("cim:ExcIEEEAC2A.kf", &assign_ExcIEEEAC2A_kf); + assign_map.emplace("cim:ExcIEEEAC2A.kh", &assign_ExcIEEEAC2A_kh); + assign_map.emplace("cim:ExcIEEEAC2A.seve1", &assign_ExcIEEEAC2A_seve1); + assign_map.emplace("cim:ExcIEEEAC2A.seve2", &assign_ExcIEEEAC2A_seve2); + assign_map.emplace("cim:ExcIEEEAC2A.ta", &assign_ExcIEEEAC2A_ta); + assign_map.emplace("cim:ExcIEEEAC2A.tb", &assign_ExcIEEEAC2A_tb); + assign_map.emplace("cim:ExcIEEEAC2A.tc", &assign_ExcIEEEAC2A_tc); + assign_map.emplace("cim:ExcIEEEAC2A.te", &assign_ExcIEEEAC2A_te); + assign_map.emplace("cim:ExcIEEEAC2A.tf", &assign_ExcIEEEAC2A_tf); + assign_map.emplace("cim:ExcIEEEAC2A.vamax", &assign_ExcIEEEAC2A_vamax); + assign_map.emplace("cim:ExcIEEEAC2A.vamin", &assign_ExcIEEEAC2A_vamin); + assign_map.emplace("cim:ExcIEEEAC2A.ve1", &assign_ExcIEEEAC2A_ve1); + assign_map.emplace("cim:ExcIEEEAC2A.ve2", &assign_ExcIEEEAC2A_ve2); + assign_map.emplace("cim:ExcIEEEAC2A.vfemax", &assign_ExcIEEEAC2A_vfemax); + assign_map.emplace("cim:ExcIEEEAC2A.vrmax", &assign_ExcIEEEAC2A_vrmax); + assign_map.emplace("cim:ExcIEEEAC2A.vrmin", &assign_ExcIEEEAC2A_vrmin); } void ExcIEEEAC2A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEAC2A.hpp b/CGMES_2.4.15_27JAN2020/ExcIEEEAC2A.hpp index 6b56ae099..77dc89d3e 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEAC2A.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEAC2A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type AC2A model. The model represents a high initial response field-controlled alternator-rectifier excitation system. The alternator main exciter is used with non-controlled rectifiers. The Type AC2A model is similar to that of Type AC1A except for the inclusion of exciter time constant compensation and exciter field current limiting elements. Reference: IEEE Standard 421.5-2005 Section 6.2. - */ + /** \brief The class represents IEEE Std 421.5-2005 type AC2A model. The model represents a high initial response field-controlled alternator-rectifier excitation system. The alternator main exciter is used with non-controlled rectifiers. The Type AC2A model is similar to that of Type AC1A except for the inclusion of exciter time constant compensation and exciter field current limiting elements. Reference: IEEE Standard 421.5-2005 Section 6.2. */ class ExcIEEEAC2A : public ExcitationSystemDynamics { public: @@ -29,27 +27,68 @@ namespace CIMPP ExcIEEEAC2A(); ~ExcIEEEAC2A() override; - CIMPP::PU ka; /* Voltage regulator gain (K). Typical Value = 400. Default: nullptr */ - CIMPP::PU kb; /* Second stage regulator gain (K). Typical Value = 25. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.28. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (K). Typical Value = 0.35. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (K). Typical Value = 0.03. Default: nullptr */ - CIMPP::PU kh; /* Exciter field current feedback gain (K). Typical Value = 1. Default: nullptr */ - CIMPP::Simple_Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.037. Default: nullptr */ - CIMPP::Simple_Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.012. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.6. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (V). Typical Value = 8. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (V). Typical Value = -8. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 4.4. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 3.3. Default: nullptr */ - CIMPP::PU vfemax; /* Exciter field current limit reference (V). Typical Value = 4.4. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator outputs (V). Typical Value = 105. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator outputs (V). Typical Value = -95. Default: nullptr */ + /** \brief Voltage regulator gain (K). Typical Value = 400. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Second stage regulator gain (K). Typical Value = 25. Default: nullptr */ + CIMPP::PU kb; + + /** \brief Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.28. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (K). Typical Value = 0.35. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (K). Typical Value = 0.03. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Exciter field current feedback gain (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU kh; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.037. Default: nullptr */ + CIMPP::Simple_Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.012. Default: nullptr */ + CIMPP::Simple_Float seve2; + + /** \brief Voltage regulator time constant (T). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.6. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage regulator output (V). Typical Value = 8. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -8. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 4.4. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 3.3. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Exciter field current limit reference (V). Typical Value = 4.4. Default: nullptr */ + CIMPP::PU vfemax; + + /** \brief Maximum voltage regulator outputs (V). Typical Value = 105. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator outputs (V). Typical Value = -95. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEAC3A.cpp b/CGMES_2.4.15_27JAN2020/ExcIEEEAC3A.cpp index 6ad17cf01..a75fa053b 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEAC3A.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEAC3A.cpp @@ -8,32 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEAC3A::ExcIEEEAC3A() {}; -ExcIEEEAC3A::~ExcIEEEAC3A() {}; +ExcIEEEAC3A::ExcIEEEAC3A() {} +ExcIEEEAC3A::~ExcIEEEAC3A() {} static const std::list PossibleProfilesForClass = { @@ -80,285 +59,304 @@ ExcIEEEAC3A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEAC3A_efdn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_efdn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_kn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_kn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_kr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_kr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_vemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_vemin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vemin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_vfemax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfemax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEAC3A_efdn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdn; if (!buffer.str().empty()) @@ -372,7 +370,8 @@ bool get_ExcIEEEAC3A_efdn(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEAC3A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -386,7 +385,8 @@ bool get_ExcIEEEAC3A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -400,7 +400,8 @@ bool get_ExcIEEEAC3A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -414,7 +415,8 @@ bool get_ExcIEEEAC3A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -428,7 +430,8 @@ bool get_ExcIEEEAC3A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -442,7 +445,8 @@ bool get_ExcIEEEAC3A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_kn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kn; if (!buffer.str().empty()) @@ -456,7 +460,8 @@ bool get_ExcIEEEAC3A_kn(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_kr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kr; if (!buffer.str().empty()) @@ -470,7 +475,8 @@ bool get_ExcIEEEAC3A_kr(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -484,7 +490,8 @@ bool get_ExcIEEEAC3A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC3A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -498,7 +505,8 @@ bool get_ExcIEEEAC3A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC3A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -512,7 +520,8 @@ bool get_ExcIEEEAC3A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -526,7 +535,8 @@ bool get_ExcIEEEAC3A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -540,7 +550,8 @@ bool get_ExcIEEEAC3A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -554,7 +565,8 @@ bool get_ExcIEEEAC3A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -568,7 +580,8 @@ bool get_ExcIEEEAC3A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -582,7 +595,8 @@ bool get_ExcIEEEAC3A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC3A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -596,7 +610,8 @@ bool get_ExcIEEEAC3A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC3A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -610,7 +625,8 @@ bool get_ExcIEEEAC3A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC3A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -624,7 +640,8 @@ bool get_ExcIEEEAC3A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC3A_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vemin; if (!buffer.str().empty()) @@ -638,7 +655,8 @@ bool get_ExcIEEEAC3A_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC3A_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfemax; if (!buffer.str().empty()) @@ -650,8 +668,6 @@ bool get_ExcIEEEAC3A_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char ExcIEEEAC3A::debugName[] = "ExcIEEEAC3A"; const char* ExcIEEEAC3A::debugString() const { @@ -660,32 +676,32 @@ const char* ExcIEEEAC3A::debugString() const void ExcIEEEAC3A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A"), &ExcIEEEAC3A_factory)); + factory_map.emplace("cim:ExcIEEEAC3A", &ExcIEEEAC3A_factory); } void ExcIEEEAC3A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.efdn"), &assign_ExcIEEEAC3A_efdn)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.ka"), &assign_ExcIEEEAC3A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.kc"), &assign_ExcIEEEAC3A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.kd"), &assign_ExcIEEEAC3A_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.ke"), &assign_ExcIEEEAC3A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.kf"), &assign_ExcIEEEAC3A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.kn"), &assign_ExcIEEEAC3A_kn)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.kr"), &assign_ExcIEEEAC3A_kr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.seve1"), &assign_ExcIEEEAC3A_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.seve2"), &assign_ExcIEEEAC3A_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.ta"), &assign_ExcIEEEAC3A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.tb"), &assign_ExcIEEEAC3A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.tc"), &assign_ExcIEEEAC3A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.te"), &assign_ExcIEEEAC3A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.tf"), &assign_ExcIEEEAC3A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.vamax"), &assign_ExcIEEEAC3A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.vamin"), &assign_ExcIEEEAC3A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.ve1"), &assign_ExcIEEEAC3A_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.ve2"), &assign_ExcIEEEAC3A_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.vemin"), &assign_ExcIEEEAC3A_vemin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.vfemax"), &assign_ExcIEEEAC3A_vfemax)); + assign_map.emplace("cim:ExcIEEEAC3A.efdn", &assign_ExcIEEEAC3A_efdn); + assign_map.emplace("cim:ExcIEEEAC3A.ka", &assign_ExcIEEEAC3A_ka); + assign_map.emplace("cim:ExcIEEEAC3A.kc", &assign_ExcIEEEAC3A_kc); + assign_map.emplace("cim:ExcIEEEAC3A.kd", &assign_ExcIEEEAC3A_kd); + assign_map.emplace("cim:ExcIEEEAC3A.ke", &assign_ExcIEEEAC3A_ke); + assign_map.emplace("cim:ExcIEEEAC3A.kf", &assign_ExcIEEEAC3A_kf); + assign_map.emplace("cim:ExcIEEEAC3A.kn", &assign_ExcIEEEAC3A_kn); + assign_map.emplace("cim:ExcIEEEAC3A.kr", &assign_ExcIEEEAC3A_kr); + assign_map.emplace("cim:ExcIEEEAC3A.seve1", &assign_ExcIEEEAC3A_seve1); + assign_map.emplace("cim:ExcIEEEAC3A.seve2", &assign_ExcIEEEAC3A_seve2); + assign_map.emplace("cim:ExcIEEEAC3A.ta", &assign_ExcIEEEAC3A_ta); + assign_map.emplace("cim:ExcIEEEAC3A.tb", &assign_ExcIEEEAC3A_tb); + assign_map.emplace("cim:ExcIEEEAC3A.tc", &assign_ExcIEEEAC3A_tc); + assign_map.emplace("cim:ExcIEEEAC3A.te", &assign_ExcIEEEAC3A_te); + assign_map.emplace("cim:ExcIEEEAC3A.tf", &assign_ExcIEEEAC3A_tf); + assign_map.emplace("cim:ExcIEEEAC3A.vamax", &assign_ExcIEEEAC3A_vamax); + assign_map.emplace("cim:ExcIEEEAC3A.vamin", &assign_ExcIEEEAC3A_vamin); + assign_map.emplace("cim:ExcIEEEAC3A.ve1", &assign_ExcIEEEAC3A_ve1); + assign_map.emplace("cim:ExcIEEEAC3A.ve2", &assign_ExcIEEEAC3A_ve2); + assign_map.emplace("cim:ExcIEEEAC3A.vemin", &assign_ExcIEEEAC3A_vemin); + assign_map.emplace("cim:ExcIEEEAC3A.vfemax", &assign_ExcIEEEAC3A_vfemax); } void ExcIEEEAC3A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEAC3A.hpp b/CGMES_2.4.15_27JAN2020/ExcIEEEAC3A.hpp index 2394f05d0..569f22c12 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEAC3A.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEAC3A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type AC3A model. The model represents the field-controlled alternator-rectifier excitation systems designated Type AC3A. These excitation systems include an alternator main exciter with non-controlled rectifiers. The exciter employs self-excitation, and the voltage regulator power is derived from the exciter output voltage. Therefore, this system has an additional nonlinearity, simulated by the use of a multiplier whose inputs are the voltage regulator command signal, , and the exciter output voltage, , times . This model is applicable to excitation systems employing static voltage regulators. Reference: IEEE Standard 421.5-2005 Section 6.3. - */ + /** \brief The class represents IEEE Std 421.5-2005 type AC3A model. The model represents the field-controlled alternator-rectifier excitation systems designated Type AC3A. These excitation systems include an alternator main exciter with non-controlled rectifiers. The exciter employs self-excitation, and the voltage regulator power is derived from the exciter output voltage. Therefore, this system has an additional nonlinearity, simulated by the use of a multiplier whose inputs are the voltage regulator command signal, , and the exciter output voltage, , times . This model is applicable to excitation systems employing static voltage regulators. Reference: IEEE Standard 421.5-2005 Section 6.3. */ class ExcIEEEAC3A : public ExcitationSystemDynamics { public: @@ -29,27 +27,68 @@ namespace CIMPP ExcIEEEAC3A(); ~ExcIEEEAC3A() override; - CIMPP::PU efdn; /* Value of at which feedback gain changes (E). Typical Value = 2.36. Default: nullptr */ - CIMPP::PU ka; /* Voltage regulator gain (K). Typical Value = 45.62. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.104. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (K). Typical Value = 0.499. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (K). Typical Value = 0.143. Default: nullptr */ - CIMPP::PU kn; /* Excitation control system stabilizer gain (K). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU kr; /* Constant associated with regulator and alternator field power supply (K). Typical Value = 3.77. Default: nullptr */ - CIMPP::Simple_Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 1.143. Default: nullptr */ - CIMPP::Simple_Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0.013. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (T). Typical Value = 1.17. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (V). Typical Value = 1. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (V). Typical Value = -0.95. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (V) equals V(V). Typical Value = 6.24. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 4.68. Default: nullptr */ - CIMPP::PU vemin; /* Minimum exciter voltage output (V). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU vfemax; /* Exciter field current limit reference (V). Typical Value = 16. Default: nullptr */ + /** \brief Value of at which feedback gain changes (E). Typical Value = 2.36. Default: nullptr */ + CIMPP::PU efdn; + + /** \brief Voltage regulator gain (K). Typical Value = 45.62. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.104. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (K). Typical Value = 0.499. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (K). Typical Value = 0.143. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Excitation control system stabilizer gain (K). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU kn; + + /** \brief Constant associated with regulator and alternator field power supply (K). Typical Value = 3.77. Default: nullptr */ + CIMPP::PU kr; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 1.143. Default: nullptr */ + CIMPP::Simple_Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float seve2; + + /** \brief Voltage regulator time constant (T). Typical Value = 0.013. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (T). Typical Value = 1.17. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage regulator output (V). Typical Value = 1. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -0.95. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (V) equals V(V). Typical Value = 6.24. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 4.68. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Minimum exciter voltage output (V). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU vemin; + + /** \brief Exciter field current limit reference (V). Typical Value = 16. Default: nullptr */ + CIMPP::PU vfemax; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEAC4A.cpp b/CGMES_2.4.15_27JAN2020/ExcIEEEAC4A.cpp index 59eeb54d8..e1510a699 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEAC4A.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEAC4A.cpp @@ -8,20 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEAC4A::ExcIEEEAC4A() {}; -ExcIEEEAC4A::~ExcIEEEAC4A() {}; +ExcIEEEAC4A::ExcIEEEAC4A() {} +ExcIEEEAC4A::~ExcIEEEAC4A() {} static const std::list PossibleProfilesForClass = { @@ -56,129 +47,136 @@ ExcIEEEAC4A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEAC4A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC4A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC4A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC4A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC4A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC4A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC4A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC4A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC4A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC4A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC4A_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC4A_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC4A_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC4A_vimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC4A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC4A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC4A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC4A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEAC4A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -192,7 +190,8 @@ bool get_ExcIEEEAC4A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC4A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -206,7 +205,8 @@ bool get_ExcIEEEAC4A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC4A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -220,7 +220,8 @@ bool get_ExcIEEEAC4A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC4A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -234,7 +235,8 @@ bool get_ExcIEEEAC4A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC4A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -248,7 +250,8 @@ bool get_ExcIEEEAC4A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC4A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -262,7 +265,8 @@ bool get_ExcIEEEAC4A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC4A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimin; if (!buffer.str().empty()) @@ -276,7 +280,8 @@ bool get_ExcIEEEAC4A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC4A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -290,7 +295,8 @@ bool get_ExcIEEEAC4A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC4A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -302,8 +308,6 @@ bool get_ExcIEEEAC4A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEAC4A::debugName[] = "ExcIEEEAC4A"; const char* ExcIEEEAC4A::debugString() const { @@ -312,20 +316,20 @@ const char* ExcIEEEAC4A::debugString() const void ExcIEEEAC4A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A"), &ExcIEEEAC4A_factory)); + factory_map.emplace("cim:ExcIEEEAC4A", &ExcIEEEAC4A_factory); } void ExcIEEEAC4A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A.ka"), &assign_ExcIEEEAC4A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A.kc"), &assign_ExcIEEEAC4A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A.ta"), &assign_ExcIEEEAC4A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A.tb"), &assign_ExcIEEEAC4A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A.tc"), &assign_ExcIEEEAC4A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A.vimax"), &assign_ExcIEEEAC4A_vimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A.vimin"), &assign_ExcIEEEAC4A_vimin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A.vrmax"), &assign_ExcIEEEAC4A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A.vrmin"), &assign_ExcIEEEAC4A_vrmin)); + assign_map.emplace("cim:ExcIEEEAC4A.ka", &assign_ExcIEEEAC4A_ka); + assign_map.emplace("cim:ExcIEEEAC4A.kc", &assign_ExcIEEEAC4A_kc); + assign_map.emplace("cim:ExcIEEEAC4A.ta", &assign_ExcIEEEAC4A_ta); + assign_map.emplace("cim:ExcIEEEAC4A.tb", &assign_ExcIEEEAC4A_tb); + assign_map.emplace("cim:ExcIEEEAC4A.tc", &assign_ExcIEEEAC4A_tc); + assign_map.emplace("cim:ExcIEEEAC4A.vimax", &assign_ExcIEEEAC4A_vimax); + assign_map.emplace("cim:ExcIEEEAC4A.vimin", &assign_ExcIEEEAC4A_vimin); + assign_map.emplace("cim:ExcIEEEAC4A.vrmax", &assign_ExcIEEEAC4A_vrmax); + assign_map.emplace("cim:ExcIEEEAC4A.vrmin", &assign_ExcIEEEAC4A_vrmin); } void ExcIEEEAC4A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEAC4A.hpp b/CGMES_2.4.15_27JAN2020/ExcIEEEAC4A.hpp index b47be4345..afdfb2fe2 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEAC4A.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEAC4A.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type AC4A model. The model represents type AC4A alternator-supplied controlled-rectifier excitation system which is quite different from the other type ac systems. This high initial response excitation system utilizes a full thyristor bridge in the exciter output circuit. The voltage regulator controls the firing of the thyristor bridges. The exciter alternator uses an independent voltage regulator to control its output voltage to a constant value. These effects are not modeled; however, transient loading effects on the exciter alternator are included. Reference: IEEE Standard 421.5-2005 Section 6.4. - */ + /** \brief The class represents IEEE Std 421.5-2005 type AC4A model. The model represents type AC4A alternator-supplied controlled-rectifier excitation system which is quite different from the other type ac systems. This high initial response excitation system utilizes a full thyristor bridge in the exciter output circuit. The voltage regulator controls the firing of the thyristor bridges. The exciter alternator uses an independent voltage regulator to control its output voltage to a constant value. These effects are not modeled; however, transient loading effects on the exciter alternator are included. Reference: IEEE Standard 421.5-2005 Section 6.4. */ class ExcIEEEAC4A : public ExcitationSystemDynamics { public: @@ -28,15 +26,32 @@ namespace CIMPP ExcIEEEAC4A(); ~ExcIEEEAC4A() override; - CIMPP::PU ka; /* Voltage regulator gain (K). Typical Value = 200. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0.015. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (T). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::PU vimax; /* Maximum voltage regulator input limit (V). Typical Value = 10. Default: nullptr */ - CIMPP::PU vimin; /* Minimum voltage regulator input limit (V). Typical Value = -10. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 5.64. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = -4.53. Default: nullptr */ + /** \brief Voltage regulator gain (K). Typical Value = 200. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Voltage regulator time constant (T). Typical Value = 0.015. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (T). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Maximum voltage regulator input limit (V). Typical Value = 10. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Minimum voltage regulator input limit (V). Typical Value = -10. Default: nullptr */ + CIMPP::PU vimin; + + /** \brief Maximum voltage regulator output (V). Typical Value = 5.64. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -4.53. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEAC5A.cpp b/CGMES_2.4.15_27JAN2020/ExcIEEEAC5A.cpp index d036ba505..8187407bd 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEAC5A.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEAC5A.cpp @@ -8,25 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEAC5A::ExcIEEEAC5A() {}; -ExcIEEEAC5A::~ExcIEEEAC5A() {}; +ExcIEEEAC5A::ExcIEEEAC5A() {} +ExcIEEEAC5A::~ExcIEEEAC5A() {} static const std::list PossibleProfilesForClass = { @@ -66,194 +52,206 @@ ExcIEEEAC5A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEAC5A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_seefd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_seefd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_tf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_tf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_tf3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_tf3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEAC5A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -267,7 +265,8 @@ bool get_ExcIEEEAC5A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEAC5A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -281,7 +280,8 @@ bool get_ExcIEEEAC5A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEAC5A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -295,7 +295,8 @@ bool get_ExcIEEEAC5A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC5A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -309,7 +310,8 @@ bool get_ExcIEEEAC5A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC5A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -323,7 +325,8 @@ bool get_ExcIEEEAC5A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC5A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd1; if (!buffer.str().empty()) @@ -337,7 +340,8 @@ bool get_ExcIEEEAC5A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEAC5A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd2; if (!buffer.str().empty()) @@ -351,7 +355,8 @@ bool get_ExcIEEEAC5A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEAC5A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -365,7 +370,8 @@ bool get_ExcIEEEAC5A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC5A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -379,7 +385,8 @@ bool get_ExcIEEEAC5A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC5A_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf1; if (!buffer.str().empty()) @@ -393,7 +400,8 @@ bool get_ExcIEEEAC5A_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC5A_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf2; if (!buffer.str().empty()) @@ -407,7 +415,8 @@ bool get_ExcIEEEAC5A_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC5A_tf3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf3; if (!buffer.str().empty()) @@ -421,7 +430,8 @@ bool get_ExcIEEEAC5A_tf3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC5A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -435,7 +445,8 @@ bool get_ExcIEEEAC5A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC5A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -447,8 +458,6 @@ bool get_ExcIEEEAC5A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEAC5A::debugName[] = "ExcIEEEAC5A"; const char* ExcIEEEAC5A::debugString() const { @@ -457,25 +466,25 @@ const char* ExcIEEEAC5A::debugString() const void ExcIEEEAC5A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A"), &ExcIEEEAC5A_factory)); + factory_map.emplace("cim:ExcIEEEAC5A", &ExcIEEEAC5A_factory); } void ExcIEEEAC5A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.efd1"), &assign_ExcIEEEAC5A_efd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.efd2"), &assign_ExcIEEEAC5A_efd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.ka"), &assign_ExcIEEEAC5A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.ke"), &assign_ExcIEEEAC5A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.kf"), &assign_ExcIEEEAC5A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.seefd1"), &assign_ExcIEEEAC5A_seefd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.seefd2"), &assign_ExcIEEEAC5A_seefd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.ta"), &assign_ExcIEEEAC5A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.te"), &assign_ExcIEEEAC5A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.tf1"), &assign_ExcIEEEAC5A_tf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.tf2"), &assign_ExcIEEEAC5A_tf2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.tf3"), &assign_ExcIEEEAC5A_tf3)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.vrmax"), &assign_ExcIEEEAC5A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.vrmin"), &assign_ExcIEEEAC5A_vrmin)); + assign_map.emplace("cim:ExcIEEEAC5A.efd1", &assign_ExcIEEEAC5A_efd1); + assign_map.emplace("cim:ExcIEEEAC5A.efd2", &assign_ExcIEEEAC5A_efd2); + assign_map.emplace("cim:ExcIEEEAC5A.ka", &assign_ExcIEEEAC5A_ka); + assign_map.emplace("cim:ExcIEEEAC5A.ke", &assign_ExcIEEEAC5A_ke); + assign_map.emplace("cim:ExcIEEEAC5A.kf", &assign_ExcIEEEAC5A_kf); + assign_map.emplace("cim:ExcIEEEAC5A.seefd1", &assign_ExcIEEEAC5A_seefd1); + assign_map.emplace("cim:ExcIEEEAC5A.seefd2", &assign_ExcIEEEAC5A_seefd2); + assign_map.emplace("cim:ExcIEEEAC5A.ta", &assign_ExcIEEEAC5A_ta); + assign_map.emplace("cim:ExcIEEEAC5A.te", &assign_ExcIEEEAC5A_te); + assign_map.emplace("cim:ExcIEEEAC5A.tf1", &assign_ExcIEEEAC5A_tf1); + assign_map.emplace("cim:ExcIEEEAC5A.tf2", &assign_ExcIEEEAC5A_tf2); + assign_map.emplace("cim:ExcIEEEAC5A.tf3", &assign_ExcIEEEAC5A_tf3); + assign_map.emplace("cim:ExcIEEEAC5A.vrmax", &assign_ExcIEEEAC5A_vrmax); + assign_map.emplace("cim:ExcIEEEAC5A.vrmin", &assign_ExcIEEEAC5A_vrmin); } void ExcIEEEAC5A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEAC5A.hpp b/CGMES_2.4.15_27JAN2020/ExcIEEEAC5A.hpp index ea97a435f..53b26311c 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEAC5A.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEAC5A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type AC5A model. The model represents a simplified model for brushless excitation systems. The regulator is supplied from a source, such as a permanent magnet generator, which is not affected by system disturbances. Unlike other ac models, this model uses loaded rather than open circuit exciter saturation data in the same way as it is used for the dc models. Because the model has been widely implemented by the industry, it is sometimes used to represent other types of systems when either detailed data for them are not available or simplified models are required. Reference: IEEE Standard 421.5-2005 Section 6.5. - */ + /** \brief The class represents IEEE Std 421.5-2005 type AC5A model. The model represents a simplified model for brushless excitation systems. The regulator is supplied from a source, such as a permanent magnet generator, which is not affected by system disturbances. Unlike other ac models, this model uses loaded rather than open circuit exciter saturation data in the same way as it is used for the dc models. Because the model has been widely implemented by the industry, it is sometimes used to represent other types of systems when either detailed data for them are not available or simplified models are required. Reference: IEEE Standard 421.5-2005 Section 6.5. */ class ExcIEEEAC5A : public ExcitationSystemDynamics { public: @@ -29,20 +27,47 @@ namespace CIMPP ExcIEEEAC5A(); ~ExcIEEEAC5A() override; - CIMPP::PU efd1; /* Exciter voltage at which exciter saturation is defined (E). Typical Value = 5.6. Default: nullptr */ - CIMPP::PU efd2; /* Exciter voltage at which exciter saturation is defined (E). Typical Value = 4.2. Default: nullptr */ - CIMPP::PU ka; /* Voltage regulator gain (K). Typical Value = 400. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (K). Typical Value = 0.03. Default: nullptr */ - CIMPP::Simple_Float seefd1; /* Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.86. Default: nullptr */ - CIMPP::Simple_Float seefd2; /* Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.8. Default: nullptr */ - CIMPP::Seconds tf1; /* Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tf2; /* Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tf3; /* Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 7.3. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = -7.3. Default: nullptr */ + /** \brief Exciter voltage at which exciter saturation is defined (E). Typical Value = 5.6. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Exciter voltage at which exciter saturation is defined (E). Typical Value = 4.2. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief Voltage regulator gain (K). Typical Value = 400. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (K). Typical Value = 0.03. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.86. Default: nullptr */ + CIMPP::Simple_Float seefd1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.5. Default: nullptr */ + CIMPP::Simple_Float seefd2; + + /** \brief Voltage regulator time constant (T). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.8. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf1; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf2; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf3; + + /** \brief Maximum voltage regulator output (V). Typical Value = 7.3. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -7.3. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEAC6A.cpp b/CGMES_2.4.15_27JAN2020/ExcIEEEAC6A.cpp index fb81c2571..cf956daff 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEAC6A.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEAC6A.cpp @@ -8,33 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEAC6A::ExcIEEEAC6A() {}; -ExcIEEEAC6A::~ExcIEEEAC6A() {}; +ExcIEEEAC6A::ExcIEEEAC6A() {} +ExcIEEEAC6A::~ExcIEEEAC6A() {} static const std::list PossibleProfilesForClass = { @@ -82,298 +60,318 @@ ExcIEEEAC6A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEAC6A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_kh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_th(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_th(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_tj(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_tj(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tj; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_tk(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_tk(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tk; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_vfelim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_vfelim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfelim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_vhmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_vhmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vhmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEAC6A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -387,7 +385,8 @@ bool get_ExcIEEEAC6A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -401,7 +400,8 @@ bool get_ExcIEEEAC6A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -415,7 +415,8 @@ bool get_ExcIEEEAC6A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -429,7 +430,8 @@ bool get_ExcIEEEAC6A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh; if (!buffer.str().empty()) @@ -443,7 +445,8 @@ bool get_ExcIEEEAC6A_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -457,7 +460,8 @@ bool get_ExcIEEEAC6A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC6A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -471,7 +475,8 @@ bool get_ExcIEEEAC6A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC6A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -485,7 +490,8 @@ bool get_ExcIEEEAC6A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -499,7 +505,8 @@ bool get_ExcIEEEAC6A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -513,7 +520,8 @@ bool get_ExcIEEEAC6A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -527,7 +535,8 @@ bool get_ExcIEEEAC6A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_th(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th; if (!buffer.str().empty()) @@ -541,7 +550,8 @@ bool get_ExcIEEEAC6A_th(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_tj(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tj; if (!buffer.str().empty()) @@ -555,7 +565,8 @@ bool get_ExcIEEEAC6A_tj(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_tk(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tk; if (!buffer.str().empty()) @@ -569,7 +580,8 @@ bool get_ExcIEEEAC6A_tk(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -583,7 +595,8 @@ bool get_ExcIEEEAC6A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC6A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -597,7 +610,8 @@ bool get_ExcIEEEAC6A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC6A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -611,7 +625,8 @@ bool get_ExcIEEEAC6A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC6A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -625,7 +640,8 @@ bool get_ExcIEEEAC6A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC6A_vfelim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfelim; if (!buffer.str().empty()) @@ -639,7 +655,8 @@ bool get_ExcIEEEAC6A_vfelim(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEAC6A_vhmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vhmax; if (!buffer.str().empty()) @@ -653,7 +670,8 @@ bool get_ExcIEEEAC6A_vhmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC6A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -667,7 +685,8 @@ bool get_ExcIEEEAC6A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC6A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -679,8 +698,6 @@ bool get_ExcIEEEAC6A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEAC6A::debugName[] = "ExcIEEEAC6A"; const char* ExcIEEEAC6A::debugString() const { @@ -689,33 +706,33 @@ const char* ExcIEEEAC6A::debugString() const void ExcIEEEAC6A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A"), &ExcIEEEAC6A_factory)); + factory_map.emplace("cim:ExcIEEEAC6A", &ExcIEEEAC6A_factory); } void ExcIEEEAC6A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.ka"), &assign_ExcIEEEAC6A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.kc"), &assign_ExcIEEEAC6A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.kd"), &assign_ExcIEEEAC6A_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.ke"), &assign_ExcIEEEAC6A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.kh"), &assign_ExcIEEEAC6A_kh)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.seve1"), &assign_ExcIEEEAC6A_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.seve2"), &assign_ExcIEEEAC6A_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.ta"), &assign_ExcIEEEAC6A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.tb"), &assign_ExcIEEEAC6A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.tc"), &assign_ExcIEEEAC6A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.te"), &assign_ExcIEEEAC6A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.th"), &assign_ExcIEEEAC6A_th)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.tj"), &assign_ExcIEEEAC6A_tj)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.tk"), &assign_ExcIEEEAC6A_tk)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.vamax"), &assign_ExcIEEEAC6A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.vamin"), &assign_ExcIEEEAC6A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.ve1"), &assign_ExcIEEEAC6A_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.ve2"), &assign_ExcIEEEAC6A_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.vfelim"), &assign_ExcIEEEAC6A_vfelim)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.vhmax"), &assign_ExcIEEEAC6A_vhmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.vrmax"), &assign_ExcIEEEAC6A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.vrmin"), &assign_ExcIEEEAC6A_vrmin)); + assign_map.emplace("cim:ExcIEEEAC6A.ka", &assign_ExcIEEEAC6A_ka); + assign_map.emplace("cim:ExcIEEEAC6A.kc", &assign_ExcIEEEAC6A_kc); + assign_map.emplace("cim:ExcIEEEAC6A.kd", &assign_ExcIEEEAC6A_kd); + assign_map.emplace("cim:ExcIEEEAC6A.ke", &assign_ExcIEEEAC6A_ke); + assign_map.emplace("cim:ExcIEEEAC6A.kh", &assign_ExcIEEEAC6A_kh); + assign_map.emplace("cim:ExcIEEEAC6A.seve1", &assign_ExcIEEEAC6A_seve1); + assign_map.emplace("cim:ExcIEEEAC6A.seve2", &assign_ExcIEEEAC6A_seve2); + assign_map.emplace("cim:ExcIEEEAC6A.ta", &assign_ExcIEEEAC6A_ta); + assign_map.emplace("cim:ExcIEEEAC6A.tb", &assign_ExcIEEEAC6A_tb); + assign_map.emplace("cim:ExcIEEEAC6A.tc", &assign_ExcIEEEAC6A_tc); + assign_map.emplace("cim:ExcIEEEAC6A.te", &assign_ExcIEEEAC6A_te); + assign_map.emplace("cim:ExcIEEEAC6A.th", &assign_ExcIEEEAC6A_th); + assign_map.emplace("cim:ExcIEEEAC6A.tj", &assign_ExcIEEEAC6A_tj); + assign_map.emplace("cim:ExcIEEEAC6A.tk", &assign_ExcIEEEAC6A_tk); + assign_map.emplace("cim:ExcIEEEAC6A.vamax", &assign_ExcIEEEAC6A_vamax); + assign_map.emplace("cim:ExcIEEEAC6A.vamin", &assign_ExcIEEEAC6A_vamin); + assign_map.emplace("cim:ExcIEEEAC6A.ve1", &assign_ExcIEEEAC6A_ve1); + assign_map.emplace("cim:ExcIEEEAC6A.ve2", &assign_ExcIEEEAC6A_ve2); + assign_map.emplace("cim:ExcIEEEAC6A.vfelim", &assign_ExcIEEEAC6A_vfelim); + assign_map.emplace("cim:ExcIEEEAC6A.vhmax", &assign_ExcIEEEAC6A_vhmax); + assign_map.emplace("cim:ExcIEEEAC6A.vrmax", &assign_ExcIEEEAC6A_vrmax); + assign_map.emplace("cim:ExcIEEEAC6A.vrmin", &assign_ExcIEEEAC6A_vrmin); } void ExcIEEEAC6A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEAC6A.hpp b/CGMES_2.4.15_27JAN2020/ExcIEEEAC6A.hpp index 8401ea7df..b32c16c38 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEAC6A.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEAC6A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type AC6A model. The model represents field-controlled alternator-rectifier excitation systems with system-supplied electronic voltage regulators. The maximum output of the regulator, , is a function of terminal voltage, . The field current limiter included in the original model AC6A remains in the 2005 update. Reference: IEEE Standard 421.5-2005 Section 6.6. - */ + /** \brief The class represents IEEE Std 421.5-2005 type AC6A model. The model represents field-controlled alternator-rectifier excitation systems with system-supplied electronic voltage regulators. The maximum output of the regulator, , is a function of terminal voltage, . The field current limiter included in the original model AC6A remains in the 2005 update. Reference: IEEE Standard 421.5-2005 Section 6.6. */ class ExcIEEEAC6A : public ExcitationSystemDynamics { public: @@ -29,28 +27,71 @@ namespace CIMPP ExcIEEEAC6A(); ~ExcIEEEAC6A() override; - CIMPP::PU ka; /* Voltage regulator gain (K). Typical Value = 536. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.173. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (K). Typical Value = 1.91. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (K). Typical Value = 1.6. Default: nullptr */ - CIMPP::PU kh; /* Exciter field current limiter gain (K). Typical Value = 92. Default: nullptr */ - CIMPP::Simple_Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.214. Default: nullptr */ - CIMPP::Simple_Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.044. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0.086. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (T). Typical Value = 9. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (T). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (T). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds th; /* Exciter field current limiter time constant (T). Typical Value = 0.08. Default: nullptr */ - CIMPP::Seconds tj; /* Exciter field current limiter time constant (T). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds tk; /* Voltage regulator time constant (T). Typical Value = 0.18. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (V). Typical Value = 75. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (V). Typical Value = -75. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (V) equals V(V). Typical Value = 7.4. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 5.55. Default: nullptr */ - CIMPP::PU vfelim; /* Exciter field current limit reference (V). Typical Value = 19. Default: nullptr */ - CIMPP::PU vhmax; /* Maximum field current limiter signal reference (V). Typical Value = 75. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 44. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = -36. Default: nullptr */ + /** \brief Voltage regulator gain (K). Typical Value = 536. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.173. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (K). Typical Value = 1.91. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter constant related to self-excited field (K). Typical Value = 1.6. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Exciter field current limiter gain (K). Typical Value = 92. Default: nullptr */ + CIMPP::PU kh; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.214. Default: nullptr */ + CIMPP::Simple_Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.044. Default: nullptr */ + CIMPP::Simple_Float seve2; + + /** \brief Voltage regulator time constant (T). Typical Value = 0.086. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (T). Typical Value = 9. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (T). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Exciter field current limiter time constant (T). Typical Value = 0.08. Default: nullptr */ + CIMPP::Seconds th; + + /** \brief Exciter field current limiter time constant (T). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds tj; + + /** \brief Voltage regulator time constant (T). Typical Value = 0.18. Default: nullptr */ + CIMPP::Seconds tk; + + /** \brief Maximum voltage regulator output (V). Typical Value = 75. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -75. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (V) equals V(V). Typical Value = 7.4. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 5.55. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Exciter field current limit reference (V). Typical Value = 19. Default: nullptr */ + CIMPP::PU vfelim; + + /** \brief Maximum field current limiter signal reference (V). Typical Value = 75. Default: nullptr */ + CIMPP::PU vhmax; + + /** \brief Maximum voltage regulator output (V). Typical Value = 44. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -36. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEAC7B.cpp b/CGMES_2.4.15_27JAN2020/ExcIEEEAC7B.cpp index 8d00c90d5..92658ed8f 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEAC7B.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEAC7B.cpp @@ -8,37 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEAC7B::ExcIEEEAC7B() {}; -ExcIEEEAC7B::~ExcIEEEAC7B() {}; +ExcIEEEAC7B::ExcIEEEAC7B() {} +ExcIEEEAC7B::~ExcIEEEAC7B() {} static const std::list PossibleProfilesForClass = { @@ -90,350 +64,374 @@ ExcIEEEAC7B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEAC7B_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kdr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kdr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kf3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kf3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kia(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kia; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kir(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kir(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kir; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kpa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kpa(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpa; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kpr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kpr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_tdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_tdr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_vemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_vemin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vemin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_vfemax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfemax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEAC7B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -447,7 +445,8 @@ bool get_ExcIEEEAC7B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC7B_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -461,7 +460,8 @@ bool get_ExcIEEEAC7B_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC7B_kdr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdr; if (!buffer.str().empty()) @@ -475,7 +475,8 @@ bool get_ExcIEEEAC7B_kdr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -489,7 +490,8 @@ bool get_ExcIEEEAC7B_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC7B_kf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf1; if (!buffer.str().empty()) @@ -503,7 +505,8 @@ bool get_ExcIEEEAC7B_kf1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf2; if (!buffer.str().empty()) @@ -517,7 +520,8 @@ bool get_ExcIEEEAC7B_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_kf3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf3; if (!buffer.str().empty()) @@ -531,7 +535,8 @@ bool get_ExcIEEEAC7B_kf3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kia; if (!buffer.str().empty()) @@ -545,7 +550,8 @@ bool get_ExcIEEEAC7B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kir; if (!buffer.str().empty()) @@ -559,7 +565,8 @@ bool get_ExcIEEEAC7B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl; if (!buffer.str().empty()) @@ -573,7 +580,8 @@ bool get_ExcIEEEAC7B_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC7B_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -587,7 +595,8 @@ bool get_ExcIEEEAC7B_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC7B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpa; if (!buffer.str().empty()) @@ -601,7 +610,8 @@ bool get_ExcIEEEAC7B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpr; if (!buffer.str().empty()) @@ -615,7 +625,8 @@ bool get_ExcIEEEAC7B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -629,7 +640,8 @@ bool get_ExcIEEEAC7B_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC7B_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -643,7 +655,8 @@ bool get_ExcIEEEAC7B_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC7B_tdr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdr; if (!buffer.str().empty()) @@ -657,7 +670,8 @@ bool get_ExcIEEEAC7B_tdr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -671,7 +685,8 @@ bool get_ExcIEEEAC7B_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC7B_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -685,7 +700,8 @@ bool get_ExcIEEEAC7B_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC7B_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -699,7 +715,8 @@ bool get_ExcIEEEAC7B_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC7B_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -713,7 +730,8 @@ bool get_ExcIEEEAC7B_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC7B_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -727,7 +745,8 @@ bool get_ExcIEEEAC7B_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -741,7 +760,8 @@ bool get_ExcIEEEAC7B_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vemin; if (!buffer.str().empty()) @@ -755,7 +775,8 @@ bool get_ExcIEEEAC7B_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC7B_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfemax; if (!buffer.str().empty()) @@ -769,7 +790,8 @@ bool get_ExcIEEEAC7B_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEAC7B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -783,7 +805,8 @@ bool get_ExcIEEEAC7B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC7B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -795,8 +818,6 @@ bool get_ExcIEEEAC7B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEAC7B::debugName[] = "ExcIEEEAC7B"; const char* ExcIEEEAC7B::debugString() const { @@ -805,37 +826,37 @@ const char* ExcIEEEAC7B::debugString() const void ExcIEEEAC7B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B"), &ExcIEEEAC7B_factory)); + factory_map.emplace("cim:ExcIEEEAC7B", &ExcIEEEAC7B_factory); } void ExcIEEEAC7B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kc"), &assign_ExcIEEEAC7B_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kd"), &assign_ExcIEEEAC7B_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kdr"), &assign_ExcIEEEAC7B_kdr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.ke"), &assign_ExcIEEEAC7B_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kf1"), &assign_ExcIEEEAC7B_kf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kf2"), &assign_ExcIEEEAC7B_kf2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kf3"), &assign_ExcIEEEAC7B_kf3)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kia"), &assign_ExcIEEEAC7B_kia)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kir"), &assign_ExcIEEEAC7B_kir)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kl"), &assign_ExcIEEEAC7B_kl)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kp"), &assign_ExcIEEEAC7B_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kpa"), &assign_ExcIEEEAC7B_kpa)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kpr"), &assign_ExcIEEEAC7B_kpr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.seve1"), &assign_ExcIEEEAC7B_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.seve2"), &assign_ExcIEEEAC7B_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.tdr"), &assign_ExcIEEEAC7B_tdr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.te"), &assign_ExcIEEEAC7B_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.tf"), &assign_ExcIEEEAC7B_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.vamax"), &assign_ExcIEEEAC7B_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.vamin"), &assign_ExcIEEEAC7B_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.ve1"), &assign_ExcIEEEAC7B_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.ve2"), &assign_ExcIEEEAC7B_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.vemin"), &assign_ExcIEEEAC7B_vemin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.vfemax"), &assign_ExcIEEEAC7B_vfemax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.vrmax"), &assign_ExcIEEEAC7B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.vrmin"), &assign_ExcIEEEAC7B_vrmin)); + assign_map.emplace("cim:ExcIEEEAC7B.kc", &assign_ExcIEEEAC7B_kc); + assign_map.emplace("cim:ExcIEEEAC7B.kd", &assign_ExcIEEEAC7B_kd); + assign_map.emplace("cim:ExcIEEEAC7B.kdr", &assign_ExcIEEEAC7B_kdr); + assign_map.emplace("cim:ExcIEEEAC7B.ke", &assign_ExcIEEEAC7B_ke); + assign_map.emplace("cim:ExcIEEEAC7B.kf1", &assign_ExcIEEEAC7B_kf1); + assign_map.emplace("cim:ExcIEEEAC7B.kf2", &assign_ExcIEEEAC7B_kf2); + assign_map.emplace("cim:ExcIEEEAC7B.kf3", &assign_ExcIEEEAC7B_kf3); + assign_map.emplace("cim:ExcIEEEAC7B.kia", &assign_ExcIEEEAC7B_kia); + assign_map.emplace("cim:ExcIEEEAC7B.kir", &assign_ExcIEEEAC7B_kir); + assign_map.emplace("cim:ExcIEEEAC7B.kl", &assign_ExcIEEEAC7B_kl); + assign_map.emplace("cim:ExcIEEEAC7B.kp", &assign_ExcIEEEAC7B_kp); + assign_map.emplace("cim:ExcIEEEAC7B.kpa", &assign_ExcIEEEAC7B_kpa); + assign_map.emplace("cim:ExcIEEEAC7B.kpr", &assign_ExcIEEEAC7B_kpr); + assign_map.emplace("cim:ExcIEEEAC7B.seve1", &assign_ExcIEEEAC7B_seve1); + assign_map.emplace("cim:ExcIEEEAC7B.seve2", &assign_ExcIEEEAC7B_seve2); + assign_map.emplace("cim:ExcIEEEAC7B.tdr", &assign_ExcIEEEAC7B_tdr); + assign_map.emplace("cim:ExcIEEEAC7B.te", &assign_ExcIEEEAC7B_te); + assign_map.emplace("cim:ExcIEEEAC7B.tf", &assign_ExcIEEEAC7B_tf); + assign_map.emplace("cim:ExcIEEEAC7B.vamax", &assign_ExcIEEEAC7B_vamax); + assign_map.emplace("cim:ExcIEEEAC7B.vamin", &assign_ExcIEEEAC7B_vamin); + assign_map.emplace("cim:ExcIEEEAC7B.ve1", &assign_ExcIEEEAC7B_ve1); + assign_map.emplace("cim:ExcIEEEAC7B.ve2", &assign_ExcIEEEAC7B_ve2); + assign_map.emplace("cim:ExcIEEEAC7B.vemin", &assign_ExcIEEEAC7B_vemin); + assign_map.emplace("cim:ExcIEEEAC7B.vfemax", &assign_ExcIEEEAC7B_vfemax); + assign_map.emplace("cim:ExcIEEEAC7B.vrmax", &assign_ExcIEEEAC7B_vrmax); + assign_map.emplace("cim:ExcIEEEAC7B.vrmin", &assign_ExcIEEEAC7B_vrmin); } void ExcIEEEAC7B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEAC7B.hpp b/CGMES_2.4.15_27JAN2020/ExcIEEEAC7B.hpp index cc9972108..8e6afa3e6 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEAC7B.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEAC7B.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type AC7B model. The model represents excitation systems which consist of an ac alternator with either stationary or rotating rectifiers to produce the dc field requirements. It is an upgrade to earlier ac excitation systems, which replace only the controls but retain the ac alternator and diode rectifier bridge. Reference: IEEE Standard 421.5-2005 Section 6.7. In the IEEE Standard 421.5 - 2005, the [1 / sT] block is shown as [1 / (1 + sT)], which is incorrect. - */ + /** \brief The class represents IEEE Std 421.5-2005 type AC7B model. The model represents excitation systems which consist of an ac alternator with either stationary or rotating rectifiers to produce the dc field requirements. It is an upgrade to earlier ac excitation systems, which replace only the controls but retain the ac alternator and diode rectifier bridge. Reference: IEEE Standard 421.5-2005 Section 6.7. In the IEEE Standard 421.5 - 2005, the [1 / sT] block is shown as [1 / (1 + sT)], which is incorrect. */ class ExcIEEEAC7B : public ExcitationSystemDynamics { public: @@ -29,32 +27,83 @@ namespace CIMPP ExcIEEEAC7B(); ~ExcIEEEAC7B() override; - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.18. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (K). Typical Value = 0.02. Default: nullptr */ - CIMPP::PU kdr; /* Voltage regulator derivative gain (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf1; /* Excitation control system stabilizer gain (K). Typical Value = 0.212. Default: nullptr */ - CIMPP::PU kf2; /* Excitation control system stabilizer gain (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU kf3; /* Excitation control system stabilizer gain (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU kia; /* Voltage regulator integral gain (K). Typical Value = 59.69. Default: nullptr */ - CIMPP::PU kir; /* Voltage regulator integral gain (K). Typical Value = 4.24. Default: nullptr */ - CIMPP::PU kl; /* Exciter field voltage lower limit parameter (K). Typical Value = 10. Default: nullptr */ - CIMPP::PU kp; /* Potential circuit gain coefficient (K). Typical Value = 4.96. Default: nullptr */ - CIMPP::PU kpa; /* Voltage regulator proportional gain (K). Typical Value = 65.36. Default: nullptr */ - CIMPP::PU kpr; /* Voltage regulator proportional gain (K). Typical Value = 4.24. Default: nullptr */ - CIMPP::Simple_Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.44. Default: nullptr */ - CIMPP::Simple_Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.075. Default: nullptr */ - CIMPP::Seconds tdr; /* Lag time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (T). Typical Value = 1.1. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (V). Typical Value = 1. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (V). Typical Value = -0.95. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (V) equals V (V). Typical Value = 6.3. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 3.02. Default: nullptr */ - CIMPP::PU vemin; /* Minimum exciter voltage output (V). Typical Value = 0. Default: nullptr */ - CIMPP::PU vfemax; /* Exciter field current limit reference (V). Typical Value = 6.9. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 5.79. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = -5.79. Default: nullptr */ + /** \brief Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.18. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (K). Typical Value = 0.02. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Voltage regulator derivative gain (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU kdr; + + /** \brief Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gain (K). Typical Value = 0.212. Default: nullptr */ + CIMPP::PU kf1; + + /** \brief Excitation control system stabilizer gain (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU kf2; + + /** \brief Excitation control system stabilizer gain (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU kf3; + + /** \brief Voltage regulator integral gain (K). Typical Value = 59.69. Default: nullptr */ + CIMPP::PU kia; + + /** \brief Voltage regulator integral gain (K). Typical Value = 4.24. Default: nullptr */ + CIMPP::PU kir; + + /** \brief Exciter field voltage lower limit parameter (K). Typical Value = 10. Default: nullptr */ + CIMPP::PU kl; + + /** \brief Potential circuit gain coefficient (K). Typical Value = 4.96. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Voltage regulator proportional gain (K). Typical Value = 65.36. Default: nullptr */ + CIMPP::PU kpa; + + /** \brief Voltage regulator proportional gain (K). Typical Value = 4.24. Default: nullptr */ + CIMPP::PU kpr; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.44. Default: nullptr */ + CIMPP::Simple_Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.075. Default: nullptr */ + CIMPP::Simple_Float seve2; + + /** \brief Lag time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tdr; + + /** \brief Exciter time constant, integration rate associated with exciter control (T). Typical Value = 1.1. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage regulator output (V). Typical Value = 1. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -0.95. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (V) equals V (V). Typical Value = 6.3. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 3.02. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Minimum exciter voltage output (V). Typical Value = 0. Default: nullptr */ + CIMPP::PU vemin; + + /** \brief Exciter field current limit reference (V). Typical Value = 6.9. Default: nullptr */ + CIMPP::PU vfemax; + + /** \brief Maximum voltage regulator output (V). Typical Value = 5.79. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -5.79. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEAC8B.cpp b/CGMES_2.4.15_27JAN2020/ExcIEEEAC8B.cpp index 110fc2e48..ebf326092 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEAC8B.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEAC8B.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEAC8B::ExcIEEEAC8B() {}; -ExcIEEEAC8B::~ExcIEEEAC8B() {}; +ExcIEEEAC8B::ExcIEEEAC8B() {} +ExcIEEEAC8B::~ExcIEEEAC8B() {} static const std::list PossibleProfilesForClass = { @@ -74,246 +56,262 @@ ExcIEEEAC8B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEAC8B_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_kdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_kdr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kdr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_kir(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_kir(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kir; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_kpr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_kpr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_tdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_tdr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_vemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_vemin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vemin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_vfemax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfemax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEAC8B_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -327,7 +325,8 @@ bool get_ExcIEEEAC8B_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC8B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -341,7 +340,8 @@ bool get_ExcIEEEAC8B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC8B_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -355,7 +355,8 @@ bool get_ExcIEEEAC8B_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC8B_kdr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdr; if (!buffer.str().empty()) @@ -369,7 +370,8 @@ bool get_ExcIEEEAC8B_kdr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC8B_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -383,7 +385,8 @@ bool get_ExcIEEEAC8B_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC8B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kir; if (!buffer.str().empty()) @@ -397,7 +400,8 @@ bool get_ExcIEEEAC8B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC8B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpr; if (!buffer.str().empty()) @@ -411,7 +415,8 @@ bool get_ExcIEEEAC8B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC8B_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -425,7 +430,8 @@ bool get_ExcIEEEAC8B_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC8B_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -439,7 +445,8 @@ bool get_ExcIEEEAC8B_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC8B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -453,7 +460,8 @@ bool get_ExcIEEEAC8B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC8B_tdr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdr; if (!buffer.str().empty()) @@ -467,7 +475,8 @@ bool get_ExcIEEEAC8B_tdr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC8B_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -481,7 +490,8 @@ bool get_ExcIEEEAC8B_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC8B_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -495,7 +505,8 @@ bool get_ExcIEEEAC8B_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC8B_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -509,7 +520,8 @@ bool get_ExcIEEEAC8B_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC8B_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vemin; if (!buffer.str().empty()) @@ -523,7 +535,8 @@ bool get_ExcIEEEAC8B_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC8B_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfemax; if (!buffer.str().empty()) @@ -537,7 +550,8 @@ bool get_ExcIEEEAC8B_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEAC8B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -551,7 +565,8 @@ bool get_ExcIEEEAC8B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC8B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -563,8 +578,6 @@ bool get_ExcIEEEAC8B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEAC8B::debugName[] = "ExcIEEEAC8B"; const char* ExcIEEEAC8B::debugString() const { @@ -573,29 +586,29 @@ const char* ExcIEEEAC8B::debugString() const void ExcIEEEAC8B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B"), &ExcIEEEAC8B_factory)); + factory_map.emplace("cim:ExcIEEEAC8B", &ExcIEEEAC8B_factory); } void ExcIEEEAC8B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.ka"), &assign_ExcIEEEAC8B_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.kc"), &assign_ExcIEEEAC8B_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.kd"), &assign_ExcIEEEAC8B_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.kdr"), &assign_ExcIEEEAC8B_kdr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.ke"), &assign_ExcIEEEAC8B_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.kir"), &assign_ExcIEEEAC8B_kir)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.kpr"), &assign_ExcIEEEAC8B_kpr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.seve1"), &assign_ExcIEEEAC8B_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.seve2"), &assign_ExcIEEEAC8B_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.ta"), &assign_ExcIEEEAC8B_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.tdr"), &assign_ExcIEEEAC8B_tdr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.te"), &assign_ExcIEEEAC8B_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.ve1"), &assign_ExcIEEEAC8B_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.ve2"), &assign_ExcIEEEAC8B_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.vemin"), &assign_ExcIEEEAC8B_vemin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.vfemax"), &assign_ExcIEEEAC8B_vfemax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.vrmax"), &assign_ExcIEEEAC8B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.vrmin"), &assign_ExcIEEEAC8B_vrmin)); + assign_map.emplace("cim:ExcIEEEAC8B.ka", &assign_ExcIEEEAC8B_ka); + assign_map.emplace("cim:ExcIEEEAC8B.kc", &assign_ExcIEEEAC8B_kc); + assign_map.emplace("cim:ExcIEEEAC8B.kd", &assign_ExcIEEEAC8B_kd); + assign_map.emplace("cim:ExcIEEEAC8B.kdr", &assign_ExcIEEEAC8B_kdr); + assign_map.emplace("cim:ExcIEEEAC8B.ke", &assign_ExcIEEEAC8B_ke); + assign_map.emplace("cim:ExcIEEEAC8B.kir", &assign_ExcIEEEAC8B_kir); + assign_map.emplace("cim:ExcIEEEAC8B.kpr", &assign_ExcIEEEAC8B_kpr); + assign_map.emplace("cim:ExcIEEEAC8B.seve1", &assign_ExcIEEEAC8B_seve1); + assign_map.emplace("cim:ExcIEEEAC8B.seve2", &assign_ExcIEEEAC8B_seve2); + assign_map.emplace("cim:ExcIEEEAC8B.ta", &assign_ExcIEEEAC8B_ta); + assign_map.emplace("cim:ExcIEEEAC8B.tdr", &assign_ExcIEEEAC8B_tdr); + assign_map.emplace("cim:ExcIEEEAC8B.te", &assign_ExcIEEEAC8B_te); + assign_map.emplace("cim:ExcIEEEAC8B.ve1", &assign_ExcIEEEAC8B_ve1); + assign_map.emplace("cim:ExcIEEEAC8B.ve2", &assign_ExcIEEEAC8B_ve2); + assign_map.emplace("cim:ExcIEEEAC8B.vemin", &assign_ExcIEEEAC8B_vemin); + assign_map.emplace("cim:ExcIEEEAC8B.vfemax", &assign_ExcIEEEAC8B_vfemax); + assign_map.emplace("cim:ExcIEEEAC8B.vrmax", &assign_ExcIEEEAC8B_vrmax); + assign_map.emplace("cim:ExcIEEEAC8B.vrmin", &assign_ExcIEEEAC8B_vrmin); } void ExcIEEEAC8B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEAC8B.hpp b/CGMES_2.4.15_27JAN2020/ExcIEEEAC8B.hpp index a5bb045a6..c9ca37813 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEAC8B.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEAC8B.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type AC8B model. This model represents a PID voltage regulator with either a brushless exciter or dc exciter. The AVR in this model consists of PID control, with separate constants for the proportional (), integral (), and derivative () gains. The representation of the brushless exciter (, , , , ) is similar to the model Type AC2A. The Type AC8B model can be used to represent static voltage regulators applied to brushless excitation systems. Digitally based voltage regulators feeding dc rotating main exciters can be represented with the AC Type AC8B model with the parameters and set to 0. For thyristor power stages fed from the generator terminals, the limits and should be a function of terminal voltage: * and * . Reference: IEEE Standard 421.5-2005 Section 6.8. - */ + /** \brief The class represents IEEE Std 421.5-2005 type AC8B model. This model represents a PID voltage regulator with either a brushless exciter or dc exciter. The AVR in this model consists of PID control, with separate constants for the proportional (), integral (), and derivative () gains. The representation of the brushless exciter (, , , , ) is similar to the model Type AC2A. The Type AC8B model can be used to represent static voltage regulators applied to brushless excitation systems. Digitally based voltage regulators feeding dc rotating main exciters can be represented with the AC Type AC8B model with the parameters and set to 0. For thyristor power stages fed from the generator terminals, the limits and should be a function of terminal voltage: * and * . Reference: IEEE Standard 421.5-2005 Section 6.8. */ class ExcIEEEAC8B : public ExcitationSystemDynamics { public: @@ -29,24 +27,59 @@ namespace CIMPP ExcIEEEAC8B(); ~ExcIEEEAC8B() override; - CIMPP::PU ka; /* Voltage regulator gain (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.55. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (K). Typical Value = 1.1. Default: nullptr */ - CIMPP::PU kdr; /* Voltage regulator derivative gain (K). Typical Value = 10. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kir; /* Voltage regulator integral gain (K). Typical Value = 5. Default: nullptr */ - CIMPP::PU kpr; /* Voltage regulator proportional gain (K). Typical Value = 80. Default: nullptr */ - CIMPP::Simple_Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.3. Default: nullptr */ - CIMPP::Simple_Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tdr; /* Lag time constant (T). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (T). Typical Value = 1.2. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (V) equals V (V). Typical Value = 6.5. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 9. Default: nullptr */ - CIMPP::PU vemin; /* Minimum exciter voltage output (V). Typical Value = 0. Default: nullptr */ - CIMPP::PU vfemax; /* Exciter field current limit reference (V). Typical Value = 6. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 35. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = 0. Default: nullptr */ + /** \brief Voltage regulator gain (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.55. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (K). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Voltage regulator derivative gain (K). Typical Value = 10. Default: nullptr */ + CIMPP::PU kdr; + + /** \brief Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Voltage regulator integral gain (K). Typical Value = 5. Default: nullptr */ + CIMPP::PU kir; + + /** \brief Voltage regulator proportional gain (K). Typical Value = 80. Default: nullptr */ + CIMPP::PU kpr; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 0.3. Default: nullptr */ + CIMPP::Simple_Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, V, back of commutating reactance (S[V]). Typical Value = 3. Default: nullptr */ + CIMPP::Simple_Float seve2; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Lag time constant (T). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tdr; + + /** \brief Exciter time constant, integration rate associated with exciter control (T). Typical Value = 1.2. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (V) equals V (V). Typical Value = 6.5. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (V). Typical Value = 9. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Minimum exciter voltage output (V). Typical Value = 0. Default: nullptr */ + CIMPP::PU vemin; + + /** \brief Exciter field current limit reference (V). Typical Value = 6. Default: nullptr */ + CIMPP::PU vfemax; + + /** \brief Maximum voltage regulator output (V). Typical Value = 35. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = 0. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEDC1A.cpp b/CGMES_2.4.15_27JAN2020/ExcIEEEDC1A.cpp index 9f8458ed2..51102e7b5 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEDC1A.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEDC1A.cpp @@ -8,27 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEDC1A::ExcIEEEDC1A() {}; -ExcIEEEDC1A::~ExcIEEEDC1A() {}; +ExcIEEEDC1A::ExcIEEEDC1A() {} +ExcIEEEDC1A::~ExcIEEEDC1A() {} static const std::list PossibleProfilesForClass = { @@ -70,220 +54,234 @@ ExcIEEEDC1A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEDC1A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_exclim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exclim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_seefd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_seefd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_uelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEDC1A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -297,7 +295,8 @@ bool get_ExcIEEEDC1A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEDC1A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -311,7 +310,8 @@ bool get_ExcIEEEDC1A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEDC1A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exclim; if (!buffer.str().empty()) @@ -325,7 +325,8 @@ bool get_ExcIEEEDC1A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -339,7 +340,8 @@ bool get_ExcIEEEDC1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC1A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -353,7 +355,8 @@ bool get_ExcIEEEDC1A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -367,7 +370,8 @@ bool get_ExcIEEEDC1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC1A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd1; if (!buffer.str().empty()) @@ -381,7 +385,8 @@ bool get_ExcIEEEDC1A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC1A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd2; if (!buffer.str().empty()) @@ -395,7 +400,8 @@ bool get_ExcIEEEDC1A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -409,7 +415,8 @@ bool get_ExcIEEEDC1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -423,7 +430,8 @@ bool get_ExcIEEEDC1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -437,7 +445,8 @@ bool get_ExcIEEEDC1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC1A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -451,7 +460,8 @@ bool get_ExcIEEEDC1A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -465,7 +475,8 @@ bool get_ExcIEEEDC1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC1A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uelin; if (!buffer.str().empty()) @@ -479,7 +490,8 @@ bool get_ExcIEEEDC1A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEDC1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -493,7 +505,8 @@ bool get_ExcIEEEDC1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEDC1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -505,8 +518,6 @@ bool get_ExcIEEEDC1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEDC1A::debugName[] = "ExcIEEEDC1A"; const char* ExcIEEEDC1A::debugString() const { @@ -515,27 +526,27 @@ const char* ExcIEEEDC1A::debugString() const void ExcIEEEDC1A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A"), &ExcIEEEDC1A_factory)); + factory_map.emplace("cim:ExcIEEEDC1A", &ExcIEEEDC1A_factory); } void ExcIEEEDC1A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.efd1"), &assign_ExcIEEEDC1A_efd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.efd2"), &assign_ExcIEEEDC1A_efd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.exclim"), &assign_ExcIEEEDC1A_exclim)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.ka"), &assign_ExcIEEEDC1A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.ke"), &assign_ExcIEEEDC1A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.kf"), &assign_ExcIEEEDC1A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.seefd1"), &assign_ExcIEEEDC1A_seefd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.seefd2"), &assign_ExcIEEEDC1A_seefd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.ta"), &assign_ExcIEEEDC1A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.tb"), &assign_ExcIEEEDC1A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.tc"), &assign_ExcIEEEDC1A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.te"), &assign_ExcIEEEDC1A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.tf"), &assign_ExcIEEEDC1A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.uelin"), &assign_ExcIEEEDC1A_uelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.vrmax"), &assign_ExcIEEEDC1A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.vrmin"), &assign_ExcIEEEDC1A_vrmin)); + assign_map.emplace("cim:ExcIEEEDC1A.efd1", &assign_ExcIEEEDC1A_efd1); + assign_map.emplace("cim:ExcIEEEDC1A.efd2", &assign_ExcIEEEDC1A_efd2); + assign_map.emplace("cim:ExcIEEEDC1A.exclim", &assign_ExcIEEEDC1A_exclim); + assign_map.emplace("cim:ExcIEEEDC1A.ka", &assign_ExcIEEEDC1A_ka); + assign_map.emplace("cim:ExcIEEEDC1A.ke", &assign_ExcIEEEDC1A_ke); + assign_map.emplace("cim:ExcIEEEDC1A.kf", &assign_ExcIEEEDC1A_kf); + assign_map.emplace("cim:ExcIEEEDC1A.seefd1", &assign_ExcIEEEDC1A_seefd1); + assign_map.emplace("cim:ExcIEEEDC1A.seefd2", &assign_ExcIEEEDC1A_seefd2); + assign_map.emplace("cim:ExcIEEEDC1A.ta", &assign_ExcIEEEDC1A_ta); + assign_map.emplace("cim:ExcIEEEDC1A.tb", &assign_ExcIEEEDC1A_tb); + assign_map.emplace("cim:ExcIEEEDC1A.tc", &assign_ExcIEEEDC1A_tc); + assign_map.emplace("cim:ExcIEEEDC1A.te", &assign_ExcIEEEDC1A_te); + assign_map.emplace("cim:ExcIEEEDC1A.tf", &assign_ExcIEEEDC1A_tf); + assign_map.emplace("cim:ExcIEEEDC1A.uelin", &assign_ExcIEEEDC1A_uelin); + assign_map.emplace("cim:ExcIEEEDC1A.vrmax", &assign_ExcIEEEDC1A_vrmax); + assign_map.emplace("cim:ExcIEEEDC1A.vrmin", &assign_ExcIEEEDC1A_vrmin); } void ExcIEEEDC1A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEDC1A.hpp b/CGMES_2.4.15_27JAN2020/ExcIEEEDC1A.hpp index f0f9307c6..b3f403da2 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEDC1A.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEDC1A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type DC1A model. This model represents field-controlled dc commutator exciters with continuously acting voltage regulators (especially the direct-acting rheostatic, rotating amplifier, and magnetic amplifier types). Because this model has been widely implemented by the industry, it is sometimes used to represent other types of systems when detailed data for them are not available or when a simplified model is required. Reference: IEEE Standard 421.5-2005 Section 5.1. - */ + /** \brief The class represents IEEE Std 421.5-2005 type DC1A model. This model represents field-controlled dc commutator exciters with continuously acting voltage regulators (especially the direct-acting rheostatic, rotating amplifier, and magnetic amplifier types). Because this model has been widely implemented by the industry, it is sometimes used to represent other types of systems when detailed data for them are not available or when a simplified model is required. Reference: IEEE Standard 421.5-2005 Section 5.1. */ class ExcIEEEDC1A : public ExcitationSystemDynamics { public: @@ -30,22 +28,53 @@ namespace CIMPP ExcIEEEDC1A(); ~ExcIEEEDC1A() override; - CIMPP::PU efd1; /* Exciter voltage at which exciter saturation is defined (E). Typical Value = 3.1. Default: nullptr */ - CIMPP::PU efd2; /* Exciter voltage at which exciter saturation is defined (E). Typical Value = 2.3. Default: nullptr */ - CIMPP::Boolean exclim; /* (exclim). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero is not applied to integrator output. Typical Value = true. Default: false */ - CIMPP::PU ka; /* Voltage regulator gain (K). Typical Value = 46. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gain (K). Typical Value = 0.1. Default: nullptr */ - CIMPP::Simple_Float seefd1; /* Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.33. Default: nullptr */ - CIMPP::Simple_Float seefd2; /* Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0.06. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.46. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::Boolean uelin; /* UEL input (uelin). true = input is connected to the HV gate false = input connects to the error signal. Typical Value = true. Default: false */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = -0.9. Default: nullptr */ + /** \brief Exciter voltage at which exciter saturation is defined (E). Typical Value = 3.1. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Exciter voltage at which exciter saturation is defined (E). Typical Value = 2.3. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief (exclim). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero is not applied to integrator output. Typical Value = true. Default: false */ + CIMPP::Boolean exclim; + + /** \brief Voltage regulator gain (K). Typical Value = 46. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Exciter constant related to self-excited field (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gain (K). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.33. Default: nullptr */ + CIMPP::Simple_Float seefd1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float seefd2; + + /** \brief Voltage regulator time constant (T). Typical Value = 0.06. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.46. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief UEL input (uelin). true = input is connected to the HV gate false = input connects to the error signal. Typical Value = true. Default: false */ + CIMPP::Boolean uelin; + + /** \brief Maximum voltage regulator output (V). Typical Value = 1. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -0.9. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEDC2A.cpp b/CGMES_2.4.15_27JAN2020/ExcIEEEDC2A.cpp index b53eec164..da3ebc726 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEDC2A.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEDC2A.cpp @@ -8,27 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEDC2A::ExcIEEEDC2A() {}; -ExcIEEEDC2A::~ExcIEEEDC2A() {}; +ExcIEEEDC2A::ExcIEEEDC2A() {} +ExcIEEEDC2A::~ExcIEEEDC2A() {} static const std::list PossibleProfilesForClass = { @@ -70,220 +54,234 @@ ExcIEEEDC2A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEDC2A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_exclim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exclim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_seefd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_seefd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_uelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEDC2A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -297,7 +295,8 @@ bool get_ExcIEEEDC2A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEDC2A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -311,7 +310,8 @@ bool get_ExcIEEEDC2A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEDC2A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exclim; if (!buffer.str().empty()) @@ -325,7 +325,8 @@ bool get_ExcIEEEDC2A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -339,7 +340,8 @@ bool get_ExcIEEEDC2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -353,7 +355,8 @@ bool get_ExcIEEEDC2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -367,7 +370,8 @@ bool get_ExcIEEEDC2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC2A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd1; if (!buffer.str().empty()) @@ -381,7 +385,8 @@ bool get_ExcIEEEDC2A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC2A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd2; if (!buffer.str().empty()) @@ -395,7 +400,8 @@ bool get_ExcIEEEDC2A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -409,7 +415,8 @@ bool get_ExcIEEEDC2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -423,7 +430,8 @@ bool get_ExcIEEEDC2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -437,7 +445,8 @@ bool get_ExcIEEEDC2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -451,7 +460,8 @@ bool get_ExcIEEEDC2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -465,7 +475,8 @@ bool get_ExcIEEEDC2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC2A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uelin; if (!buffer.str().empty()) @@ -479,7 +490,8 @@ bool get_ExcIEEEDC2A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEDC2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -493,7 +505,8 @@ bool get_ExcIEEEDC2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEDC2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -505,8 +518,6 @@ bool get_ExcIEEEDC2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEDC2A::debugName[] = "ExcIEEEDC2A"; const char* ExcIEEEDC2A::debugString() const { @@ -515,27 +526,27 @@ const char* ExcIEEEDC2A::debugString() const void ExcIEEEDC2A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A"), &ExcIEEEDC2A_factory)); + factory_map.emplace("cim:ExcIEEEDC2A", &ExcIEEEDC2A_factory); } void ExcIEEEDC2A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.efd1"), &assign_ExcIEEEDC2A_efd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.efd2"), &assign_ExcIEEEDC2A_efd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.exclim"), &assign_ExcIEEEDC2A_exclim)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.ka"), &assign_ExcIEEEDC2A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.ke"), &assign_ExcIEEEDC2A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.kf"), &assign_ExcIEEEDC2A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.seefd1"), &assign_ExcIEEEDC2A_seefd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.seefd2"), &assign_ExcIEEEDC2A_seefd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.ta"), &assign_ExcIEEEDC2A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.tb"), &assign_ExcIEEEDC2A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.tc"), &assign_ExcIEEEDC2A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.te"), &assign_ExcIEEEDC2A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.tf"), &assign_ExcIEEEDC2A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.uelin"), &assign_ExcIEEEDC2A_uelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.vrmax"), &assign_ExcIEEEDC2A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.vrmin"), &assign_ExcIEEEDC2A_vrmin)); + assign_map.emplace("cim:ExcIEEEDC2A.efd1", &assign_ExcIEEEDC2A_efd1); + assign_map.emplace("cim:ExcIEEEDC2A.efd2", &assign_ExcIEEEDC2A_efd2); + assign_map.emplace("cim:ExcIEEEDC2A.exclim", &assign_ExcIEEEDC2A_exclim); + assign_map.emplace("cim:ExcIEEEDC2A.ka", &assign_ExcIEEEDC2A_ka); + assign_map.emplace("cim:ExcIEEEDC2A.ke", &assign_ExcIEEEDC2A_ke); + assign_map.emplace("cim:ExcIEEEDC2A.kf", &assign_ExcIEEEDC2A_kf); + assign_map.emplace("cim:ExcIEEEDC2A.seefd1", &assign_ExcIEEEDC2A_seefd1); + assign_map.emplace("cim:ExcIEEEDC2A.seefd2", &assign_ExcIEEEDC2A_seefd2); + assign_map.emplace("cim:ExcIEEEDC2A.ta", &assign_ExcIEEEDC2A_ta); + assign_map.emplace("cim:ExcIEEEDC2A.tb", &assign_ExcIEEEDC2A_tb); + assign_map.emplace("cim:ExcIEEEDC2A.tc", &assign_ExcIEEEDC2A_tc); + assign_map.emplace("cim:ExcIEEEDC2A.te", &assign_ExcIEEEDC2A_te); + assign_map.emplace("cim:ExcIEEEDC2A.tf", &assign_ExcIEEEDC2A_tf); + assign_map.emplace("cim:ExcIEEEDC2A.uelin", &assign_ExcIEEEDC2A_uelin); + assign_map.emplace("cim:ExcIEEEDC2A.vrmax", &assign_ExcIEEEDC2A_vrmax); + assign_map.emplace("cim:ExcIEEEDC2A.vrmin", &assign_ExcIEEEDC2A_vrmin); } void ExcIEEEDC2A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEDC2A.hpp b/CGMES_2.4.15_27JAN2020/ExcIEEEDC2A.hpp index aae7a5d90..522fb8410 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEDC2A.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEDC2A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type DC2A model. This model represents represent field-controlled dc commutator exciters with continuously acting voltage regulators having supplies obtained from the generator or auxiliary bus. It differs from the Type DC1A model only in the voltage regulator output limits, which are now proportional to terminal voltage . It is representative of solid-state replacements for various forms of older mechanical and rotating amplifier regulating equipment connected to dc commutator exciters. Reference: IEEE Standard 421.5-2005 Section 5.2. - */ + /** \brief The class represents IEEE Std 421.5-2005 type DC2A model. This model represents represent field-controlled dc commutator exciters with continuously acting voltage regulators having supplies obtained from the generator or auxiliary bus. It differs from the Type DC1A model only in the voltage regulator output limits, which are now proportional to terminal voltage . It is representative of solid-state replacements for various forms of older mechanical and rotating amplifier regulating equipment connected to dc commutator exciters. Reference: IEEE Standard 421.5-2005 Section 5.2. */ class ExcIEEEDC2A : public ExcitationSystemDynamics { public: @@ -30,22 +28,53 @@ namespace CIMPP ExcIEEEDC2A(); ~ExcIEEEDC2A() override; - CIMPP::PU efd1; /* Exciter voltage at which exciter saturation is defined (E). Typical Value = 3.05. Default: nullptr */ - CIMPP::PU efd2; /* Exciter voltage at which exciter saturation is defined (E). Typical Value = 2.29. Default: nullptr */ - CIMPP::PU exclim; /* (exclim). IEEE standard is ambiguous about lower limit on exciter output. Typical Value = - 999 which means that there is no limit applied. Default: nullptr */ - CIMPP::PU ka; /* Voltage regulator gain (K). Typical Value = 300. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gain (K). Typical Value = 0.1. Default: nullptr */ - CIMPP::Simple_Float seefd1; /* Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.279. Default: nullptr */ - CIMPP::Simple_Float seefd2; /* Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.117. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0.01. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (T). Typical Value = 1.33. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (T). Typical Value = 0.675. Default: nullptr */ - CIMPP::Boolean uelin; /* UEL input (uelin). true = input is connected to the HV gate false = input connects to the error signal. Typical Value = true. Default: false */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 4.95. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = -4.9. Default: nullptr */ + /** \brief Exciter voltage at which exciter saturation is defined (E). Typical Value = 3.05. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Exciter voltage at which exciter saturation is defined (E). Typical Value = 2.29. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief (exclim). IEEE standard is ambiguous about lower limit on exciter output. Typical Value = - 999 which means that there is no limit applied. Default: nullptr */ + CIMPP::PU exclim; + + /** \brief Voltage regulator gain (K). Typical Value = 300. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gain (K). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.279. Default: nullptr */ + CIMPP::Simple_Float seefd1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.117. Default: nullptr */ + CIMPP::Simple_Float seefd2; + + /** \brief Voltage regulator time constant (T). Typical Value = 0.01. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (T). Typical Value = 1.33. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value = 0.675. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief UEL input (uelin). true = input is connected to the HV gate false = input connects to the error signal. Typical Value = true. Default: false */ + CIMPP::Boolean uelin; + + /** \brief Maximum voltage regulator output (V). Typical Value = 4.95. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -4.9. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEDC3A.cpp b/CGMES_2.4.15_27JAN2020/ExcIEEEDC3A.cpp index a137da293..0a3177ee8 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEDC3A.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEDC3A.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEDC3A::ExcIEEEDC3A() {}; -ExcIEEEDC3A::~ExcIEEEDC3A() {}; +ExcIEEEDC3A::ExcIEEEDC3A() {} +ExcIEEEDC3A::~ExcIEEEDC3A() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ ExcIEEEDC3A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEDC3A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_exclim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exclim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_kv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_kv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_seefd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_seefd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_trh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_trh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->trh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEDC3A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_ExcIEEEDC3A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEDC3A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_ExcIEEEDC3A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEDC3A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exclim; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_ExcIEEEDC3A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC3A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_ExcIEEEDC3A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC3A_kv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kv; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_ExcIEEEDC3A_kv(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC3A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd1; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_ExcIEEEDC3A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC3A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd2; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_ExcIEEEDC3A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC3A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_ExcIEEEDC3A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC3A_trh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->trh; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_ExcIEEEDC3A_trh(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEDC3A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_ExcIEEEDC3A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEDC3A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_ExcIEEEDC3A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEDC3A::debugName[] = "ExcIEEEDC3A"; const char* ExcIEEEDC3A::debugString() const { @@ -370,22 +376,22 @@ const char* ExcIEEEDC3A::debugString() const void ExcIEEEDC3A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A"), &ExcIEEEDC3A_factory)); + factory_map.emplace("cim:ExcIEEEDC3A", &ExcIEEEDC3A_factory); } void ExcIEEEDC3A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.efd1"), &assign_ExcIEEEDC3A_efd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.efd2"), &assign_ExcIEEEDC3A_efd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.exclim"), &assign_ExcIEEEDC3A_exclim)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.ke"), &assign_ExcIEEEDC3A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.kv"), &assign_ExcIEEEDC3A_kv)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.seefd1"), &assign_ExcIEEEDC3A_seefd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.seefd2"), &assign_ExcIEEEDC3A_seefd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.te"), &assign_ExcIEEEDC3A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.trh"), &assign_ExcIEEEDC3A_trh)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.vrmax"), &assign_ExcIEEEDC3A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.vrmin"), &assign_ExcIEEEDC3A_vrmin)); + assign_map.emplace("cim:ExcIEEEDC3A.efd1", &assign_ExcIEEEDC3A_efd1); + assign_map.emplace("cim:ExcIEEEDC3A.efd2", &assign_ExcIEEEDC3A_efd2); + assign_map.emplace("cim:ExcIEEEDC3A.exclim", &assign_ExcIEEEDC3A_exclim); + assign_map.emplace("cim:ExcIEEEDC3A.ke", &assign_ExcIEEEDC3A_ke); + assign_map.emplace("cim:ExcIEEEDC3A.kv", &assign_ExcIEEEDC3A_kv); + assign_map.emplace("cim:ExcIEEEDC3A.seefd1", &assign_ExcIEEEDC3A_seefd1); + assign_map.emplace("cim:ExcIEEEDC3A.seefd2", &assign_ExcIEEEDC3A_seefd2); + assign_map.emplace("cim:ExcIEEEDC3A.te", &assign_ExcIEEEDC3A_te); + assign_map.emplace("cim:ExcIEEEDC3A.trh", &assign_ExcIEEEDC3A_trh); + assign_map.emplace("cim:ExcIEEEDC3A.vrmax", &assign_ExcIEEEDC3A_vrmax); + assign_map.emplace("cim:ExcIEEEDC3A.vrmin", &assign_ExcIEEEDC3A_vrmin); } void ExcIEEEDC3A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEDC3A.hpp b/CGMES_2.4.15_27JAN2020/ExcIEEEDC3A.hpp index 2fa4ead2c..7c97b2656 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEDC3A.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEDC3A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type DC3A model. This model represents represent older systems, in particular those dc commutator exciters with non-continuously acting regulators that were commonly used before the development of the continuously acting varieties. These systems respond at basically two different rates, depending upon the magnitude of voltage error. For small errors, adjustment is made periodically with a signal to a motor-operated rheostat. Larger errors cause resistors to be quickly shorted or inserted and a strong forcing signal applied to the exciter. Continuous motion of the motor-operated rheostat occurs for these larger error signals, even though it is bypassed by contactor action. Reference: IEEE Standard 421.5-2005 Section 5.3. - */ + /** \brief The class represents IEEE Std 421.5-2005 type DC3A model. This model represents represent older systems, in particular those dc commutator exciters with non-continuously acting regulators that were commonly used before the development of the continuously acting varieties. These systems respond at basically two different rates, depending upon the magnitude of voltage error. For small errors, adjustment is made periodically with a signal to a motor-operated rheostat. Larger errors cause resistors to be quickly shorted or inserted and a strong forcing signal applied to the exciter. Continuous motion of the motor-operated rheostat occurs for these larger error signals, even though it is bypassed by contactor action. Reference: IEEE Standard 421.5-2005 Section 5.3. */ class ExcIEEEDC3A : public ExcitationSystemDynamics { public: @@ -30,17 +28,38 @@ namespace CIMPP ExcIEEEDC3A(); ~ExcIEEEDC3A() override; - CIMPP::PU efd1; /* Exciter voltage at which exciter saturation is defined (E). Typical Value = 3.375. Default: nullptr */ - CIMPP::PU efd2; /* Exciter voltage at which exciter saturation is defined (E). Typical Value = 3.15. Default: nullptr */ - CIMPP::Boolean exclim; /* (exclim). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero is not applied to integrator output. Typical Value = true. Default: false */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (K). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU kv; /* Fast raise/lower contact setting (K). Typical Value = 0.05. Default: nullptr */ - CIMPP::Simple_Float seefd1; /* Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.267. Default: nullptr */ - CIMPP::Simple_Float seefd2; /* Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.068. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds trh; /* Rheostat travel time (T). Typical Value = 20. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = 0. Default: nullptr */ + /** \brief Exciter voltage at which exciter saturation is defined (E). Typical Value = 3.375. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Exciter voltage at which exciter saturation is defined (E). Typical Value = 3.15. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief (exclim). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero is not applied to integrator output. Typical Value = true. Default: false */ + CIMPP::Boolean exclim; + + /** \brief Exciter constant related to self-excited field (K). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Fast raise/lower contact setting (K). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU kv; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.267. Default: nullptr */ + CIMPP::Simple_Float seefd1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.068. Default: nullptr */ + CIMPP::Simple_Float seefd2; + + /** \brief Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Rheostat travel time (T). Typical Value = 20. Default: nullptr */ + CIMPP::Seconds trh; + + /** \brief Maximum voltage regulator output (V). Typical Value = 1. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = 0. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEDC4B.cpp b/CGMES_2.4.15_27JAN2020/ExcIEEEDC4B.cpp index 662bf0390..7f3838589 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEDC4B.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEDC4B.cpp @@ -8,30 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEDC4B::ExcIEEEDC4B() {}; -ExcIEEEDC4B::~ExcIEEEDC4B() {}; +ExcIEEEDC4B::ExcIEEEDC4B() {} +ExcIEEEDC4B::~ExcIEEEDC4B() {} static const std::list PossibleProfilesForClass = { @@ -76,259 +57,276 @@ ExcIEEEDC4B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEDC4B_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_oelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_oelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->oelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_seefd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_seefd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_uelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_vemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_vemin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vemin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEDC4B_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -342,7 +340,8 @@ bool get_ExcIEEEDC4B_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEDC4B_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -356,7 +355,8 @@ bool get_ExcIEEEDC4B_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEDC4B_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -370,7 +370,8 @@ bool get_ExcIEEEDC4B_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -384,7 +385,8 @@ bool get_ExcIEEEDC4B_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -398,7 +400,8 @@ bool get_ExcIEEEDC4B_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -412,7 +415,8 @@ bool get_ExcIEEEDC4B_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -426,7 +430,8 @@ bool get_ExcIEEEDC4B_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -440,7 +445,8 @@ bool get_ExcIEEEDC4B_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->oelin; if (!buffer.str().empty()) @@ -454,7 +460,8 @@ bool get_ExcIEEEDC4B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEDC4B_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd1; if (!buffer.str().empty()) @@ -468,7 +475,8 @@ bool get_ExcIEEEDC4B_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC4B_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd2; if (!buffer.str().empty()) @@ -482,7 +490,8 @@ bool get_ExcIEEEDC4B_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC4B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -496,7 +505,8 @@ bool get_ExcIEEEDC4B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -510,7 +520,8 @@ bool get_ExcIEEEDC4B_td(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -524,7 +535,8 @@ bool get_ExcIEEEDC4B_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -538,7 +550,8 @@ bool get_ExcIEEEDC4B_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uelin; if (!buffer.str().empty()) @@ -552,7 +565,8 @@ bool get_ExcIEEEDC4B_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEDC4B_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vemin; if (!buffer.str().empty()) @@ -566,7 +580,8 @@ bool get_ExcIEEEDC4B_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEDC4B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -580,7 +595,8 @@ bool get_ExcIEEEDC4B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEDC4B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -592,8 +608,6 @@ bool get_ExcIEEEDC4B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEDC4B::debugName[] = "ExcIEEEDC4B"; const char* ExcIEEEDC4B::debugString() const { @@ -602,30 +616,30 @@ const char* ExcIEEEDC4B::debugString() const void ExcIEEEDC4B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B"), &ExcIEEEDC4B_factory)); + factory_map.emplace("cim:ExcIEEEDC4B", &ExcIEEEDC4B_factory); } void ExcIEEEDC4B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.efd1"), &assign_ExcIEEEDC4B_efd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.efd2"), &assign_ExcIEEEDC4B_efd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.ka"), &assign_ExcIEEEDC4B_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.kd"), &assign_ExcIEEEDC4B_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.ke"), &assign_ExcIEEEDC4B_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.kf"), &assign_ExcIEEEDC4B_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.ki"), &assign_ExcIEEEDC4B_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.kp"), &assign_ExcIEEEDC4B_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.oelin"), &assign_ExcIEEEDC4B_oelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.seefd1"), &assign_ExcIEEEDC4B_seefd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.seefd2"), &assign_ExcIEEEDC4B_seefd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.ta"), &assign_ExcIEEEDC4B_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.td"), &assign_ExcIEEEDC4B_td)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.te"), &assign_ExcIEEEDC4B_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.tf"), &assign_ExcIEEEDC4B_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.uelin"), &assign_ExcIEEEDC4B_uelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.vemin"), &assign_ExcIEEEDC4B_vemin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.vrmax"), &assign_ExcIEEEDC4B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.vrmin"), &assign_ExcIEEEDC4B_vrmin)); + assign_map.emplace("cim:ExcIEEEDC4B.efd1", &assign_ExcIEEEDC4B_efd1); + assign_map.emplace("cim:ExcIEEEDC4B.efd2", &assign_ExcIEEEDC4B_efd2); + assign_map.emplace("cim:ExcIEEEDC4B.ka", &assign_ExcIEEEDC4B_ka); + assign_map.emplace("cim:ExcIEEEDC4B.kd", &assign_ExcIEEEDC4B_kd); + assign_map.emplace("cim:ExcIEEEDC4B.ke", &assign_ExcIEEEDC4B_ke); + assign_map.emplace("cim:ExcIEEEDC4B.kf", &assign_ExcIEEEDC4B_kf); + assign_map.emplace("cim:ExcIEEEDC4B.ki", &assign_ExcIEEEDC4B_ki); + assign_map.emplace("cim:ExcIEEEDC4B.kp", &assign_ExcIEEEDC4B_kp); + assign_map.emplace("cim:ExcIEEEDC4B.oelin", &assign_ExcIEEEDC4B_oelin); + assign_map.emplace("cim:ExcIEEEDC4B.seefd1", &assign_ExcIEEEDC4B_seefd1); + assign_map.emplace("cim:ExcIEEEDC4B.seefd2", &assign_ExcIEEEDC4B_seefd2); + assign_map.emplace("cim:ExcIEEEDC4B.ta", &assign_ExcIEEEDC4B_ta); + assign_map.emplace("cim:ExcIEEEDC4B.td", &assign_ExcIEEEDC4B_td); + assign_map.emplace("cim:ExcIEEEDC4B.te", &assign_ExcIEEEDC4B_te); + assign_map.emplace("cim:ExcIEEEDC4B.tf", &assign_ExcIEEEDC4B_tf); + assign_map.emplace("cim:ExcIEEEDC4B.uelin", &assign_ExcIEEEDC4B_uelin); + assign_map.emplace("cim:ExcIEEEDC4B.vemin", &assign_ExcIEEEDC4B_vemin); + assign_map.emplace("cim:ExcIEEEDC4B.vrmax", &assign_ExcIEEEDC4B_vrmax); + assign_map.emplace("cim:ExcIEEEDC4B.vrmin", &assign_ExcIEEEDC4B_vrmin); } void ExcIEEEDC4B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEDC4B.hpp b/CGMES_2.4.15_27JAN2020/ExcIEEEDC4B.hpp index 94ae70070..b26843190 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEDC4B.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEDC4B.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type DC4B model. These excitation systems utilize a field-controlled dc commutator exciter with a continuously acting voltage regulator having supplies obtained from the generator or auxiliary bus. Reference: IEEE Standard 421.5-2005 Section 5.4. - */ + /** \brief The class represents IEEE Std 421.5-2005 type DC4B model. These excitation systems utilize a field-controlled dc commutator exciter with a continuously acting voltage regulator having supplies obtained from the generator or auxiliary bus. Reference: IEEE Standard 421.5-2005 Section 5.4. */ class ExcIEEEDC4B : public ExcitationSystemDynamics { public: @@ -30,25 +28,62 @@ namespace CIMPP ExcIEEEDC4B(); ~ExcIEEEDC4B() override; - CIMPP::PU efd1; /* Exciter voltage at which exciter saturation is defined (E). Typical Value = 1.75. Default: nullptr */ - CIMPP::PU efd2; /* Exciter voltage at which exciter saturation is defined (E). Typical Value = 2.33. Default: nullptr */ - CIMPP::PU ka; /* Voltage regulator gain (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kd; /* Regulator derivative gain (K). Typical Value = 20. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gain (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU ki; /* Regulator integral gain (K). Typical Value = 20. Default: nullptr */ - CIMPP::PU kp; /* Regulator proportional gain (K). Typical Value = 20. Default: nullptr */ - CIMPP::Boolean oelin; /* OEL input (OELin). true = LV gate false = subtract from error signal. Typical Value = true. Default: false */ - CIMPP::Simple_Float seefd1; /* Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.08. Default: nullptr */ - CIMPP::Simple_Float seefd2; /* Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.27. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0.2. Default: nullptr */ - CIMPP::Seconds td; /* Regulator derivative filter time constant(T). Typical Value = 0.01. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.8. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::Boolean uelin; /* UEL input (UELin). true = HV gate false = add to error signal. Typical Value = true. Default: false */ - CIMPP::PU vemin; /* Minimum exciter voltage output(V). Typical Value = 0. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 2.7. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = -0.9. Default: nullptr */ + /** \brief Exciter voltage at which exciter saturation is defined (E). Typical Value = 1.75. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Exciter voltage at which exciter saturation is defined (E). Typical Value = 2.33. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief Voltage regulator gain (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Regulator derivative gain (K). Typical Value = 20. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gain (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Regulator integral gain (K). Typical Value = 20. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Regulator proportional gain (K). Typical Value = 20. Default: nullptr */ + CIMPP::PU kp; + + /** \brief OEL input (OELin). true = LV gate false = subtract from error signal. Typical Value = true. Default: false */ + CIMPP::Boolean oelin; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.08. Default: nullptr */ + CIMPP::Simple_Float seefd1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, E (S[E]). Typical Value = 0.27. Default: nullptr */ + CIMPP::Simple_Float seefd2; + + /** \brief Voltage regulator time constant (T). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Regulator derivative filter time constant(T). Typical Value = 0.01. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.8. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief UEL input (UELin). true = HV gate false = add to error signal. Typical Value = true. Default: false */ + CIMPP::Boolean uelin; + + /** \brief Minimum exciter voltage output(V). Typical Value = 0. Default: nullptr */ + CIMPP::PU vemin; + + /** \brief Maximum voltage regulator output (V). Typical Value = 2.7. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -0.9. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEST1A.cpp b/CGMES_2.4.15_27JAN2020/ExcIEEEST1A.cpp index 2b5f7af83..17ef6c50f 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEST1A.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEST1A.cpp @@ -8,30 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "ExcIEEEST1AUELselectorKind.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEST1A::ExcIEEEST1A() {}; -ExcIEEEST1A::~ExcIEEEST1A() {}; +ExcIEEEST1A::ExcIEEEST1A() {} +ExcIEEEST1A::~ExcIEEEST1A() {} static const std::list PossibleProfilesForClass = { @@ -76,259 +57,276 @@ ExcIEEEST1A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEST1A_ilr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_ilr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ilr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_klr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_klr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->klr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_pssin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_pssin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pssin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_tb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_tb1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_tc1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_tc1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_uelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_vimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEST1A_ilr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ilr; if (!buffer.str().empty()) @@ -342,7 +340,8 @@ bool get_ExcIEEEST1A_ilr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -356,7 +355,8 @@ bool get_ExcIEEEST1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST1A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -370,7 +370,8 @@ bool get_ExcIEEEST1A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -384,7 +385,8 @@ bool get_ExcIEEEST1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST1A_klr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->klr; if (!buffer.str().empty()) @@ -398,7 +400,8 @@ bool get_ExcIEEEST1A_klr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST1A_pssin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pssin; if (!buffer.str().empty()) @@ -412,7 +415,8 @@ bool get_ExcIEEEST1A_pssin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -426,7 +430,8 @@ bool get_ExcIEEEST1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -440,7 +445,8 @@ bool get_ExcIEEEST1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST1A_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb1; if (!buffer.str().empty()) @@ -454,7 +460,8 @@ bool get_ExcIEEEST1A_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -468,7 +475,8 @@ bool get_ExcIEEEST1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST1A_tc1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc1; if (!buffer.str().empty()) @@ -482,7 +490,8 @@ bool get_ExcIEEEST1A_tc1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -494,9 +503,25 @@ bool get_ExcIEEEST1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } +bool get_ExcIEEEST1A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->uelin; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_ExcIEEEST1A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -510,7 +535,8 @@ bool get_ExcIEEEST1A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST1A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -524,7 +550,8 @@ bool get_ExcIEEEST1A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST1A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -538,7 +565,8 @@ bool get_ExcIEEEST1A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST1A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimin; if (!buffer.str().empty()) @@ -552,7 +580,8 @@ bool get_ExcIEEEST1A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -566,7 +595,8 @@ bool get_ExcIEEEST1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -578,22 +608,6 @@ bool get_ExcIEEEST1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - -bool get_ExcIEEEST1A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->uelin; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char ExcIEEEST1A::debugName[] = "ExcIEEEST1A"; const char* ExcIEEEST1A::debugString() const { @@ -602,30 +616,30 @@ const char* ExcIEEEST1A::debugString() const void ExcIEEEST1A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A"), &ExcIEEEST1A_factory)); + factory_map.emplace("cim:ExcIEEEST1A", &ExcIEEEST1A_factory); } void ExcIEEEST1A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.ilr"), &assign_ExcIEEEST1A_ilr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.ka"), &assign_ExcIEEEST1A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.kc"), &assign_ExcIEEEST1A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.kf"), &assign_ExcIEEEST1A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.klr"), &assign_ExcIEEEST1A_klr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.pssin"), &assign_ExcIEEEST1A_pssin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.ta"), &assign_ExcIEEEST1A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.tb"), &assign_ExcIEEEST1A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.tb1"), &assign_ExcIEEEST1A_tb1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.tc"), &assign_ExcIEEEST1A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.tc1"), &assign_ExcIEEEST1A_tc1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.tf"), &assign_ExcIEEEST1A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.uelin"), &assign_ExcIEEEST1A_uelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.vamax"), &assign_ExcIEEEST1A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.vamin"), &assign_ExcIEEEST1A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.vimax"), &assign_ExcIEEEST1A_vimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.vimin"), &assign_ExcIEEEST1A_vimin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.vrmax"), &assign_ExcIEEEST1A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.vrmin"), &assign_ExcIEEEST1A_vrmin)); + assign_map.emplace("cim:ExcIEEEST1A.ilr", &assign_ExcIEEEST1A_ilr); + assign_map.emplace("cim:ExcIEEEST1A.ka", &assign_ExcIEEEST1A_ka); + assign_map.emplace("cim:ExcIEEEST1A.kc", &assign_ExcIEEEST1A_kc); + assign_map.emplace("cim:ExcIEEEST1A.kf", &assign_ExcIEEEST1A_kf); + assign_map.emplace("cim:ExcIEEEST1A.klr", &assign_ExcIEEEST1A_klr); + assign_map.emplace("cim:ExcIEEEST1A.pssin", &assign_ExcIEEEST1A_pssin); + assign_map.emplace("cim:ExcIEEEST1A.ta", &assign_ExcIEEEST1A_ta); + assign_map.emplace("cim:ExcIEEEST1A.tb", &assign_ExcIEEEST1A_tb); + assign_map.emplace("cim:ExcIEEEST1A.tb1", &assign_ExcIEEEST1A_tb1); + assign_map.emplace("cim:ExcIEEEST1A.tc", &assign_ExcIEEEST1A_tc); + assign_map.emplace("cim:ExcIEEEST1A.tc1", &assign_ExcIEEEST1A_tc1); + assign_map.emplace("cim:ExcIEEEST1A.tf", &assign_ExcIEEEST1A_tf); + assign_map.emplace("cim:ExcIEEEST1A.uelin", &assign_ExcIEEEST1A_uelin); + assign_map.emplace("cim:ExcIEEEST1A.vamax", &assign_ExcIEEEST1A_vamax); + assign_map.emplace("cim:ExcIEEEST1A.vamin", &assign_ExcIEEEST1A_vamin); + assign_map.emplace("cim:ExcIEEEST1A.vimax", &assign_ExcIEEEST1A_vimax); + assign_map.emplace("cim:ExcIEEEST1A.vimin", &assign_ExcIEEEST1A_vimin); + assign_map.emplace("cim:ExcIEEEST1A.vrmax", &assign_ExcIEEEST1A_vrmax); + assign_map.emplace("cim:ExcIEEEST1A.vrmin", &assign_ExcIEEEST1A_vrmin); } void ExcIEEEST1A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEST1A.hpp b/CGMES_2.4.15_27JAN2020/ExcIEEEST1A.hpp index 76c53769f..66d916386 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEST1A.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEST1A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type ST1A model. This model represents systems in which excitation power is supplied through a transformer from the generator terminals (or the unit's auxiliary bus) and is regulated by a controlled rectifier. The maximum exciter voltage available from such systems is directly related to the generator terminal voltage. Reference: IEEE Standard 421.5-2005 Section 7.1. - */ + /** \brief The class represents IEEE Std 421.5-2005 type ST1A model. This model represents systems in which excitation power is supplied through a transformer from the generator terminals (or the unit's auxiliary bus) and is regulated by a controlled rectifier. The maximum exciter voltage available from such systems is directly related to the generator terminal voltage. Reference: IEEE Standard 421.5-2005 Section 7.1. */ class ExcIEEEST1A : public ExcitationSystemDynamics { public: @@ -30,25 +28,62 @@ namespace CIMPP ExcIEEEST1A(); ~ExcIEEEST1A() override; - CIMPP::PU ilr; /* Exciter output current limit reference (I). Typical Value = 0. Default: nullptr */ - CIMPP::PU ka; /* Voltage regulator gain (K). Typical Value = 190. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.08. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU klr; /* Exciter output current limiter gain (K). Typical Value = 0. Default: nullptr */ - CIMPP::Boolean pssin; /* Selector of the Power System Stabilizer (PSS) input (PSSin). true = PSS input (Vs) added to error signal false = PSS input (Vs) added to voltage regulator output. Typical Value = true. Default: false */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (T). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds tb1; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tc1; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::ExcIEEEST1AUELselectorKind uelin; /* Selector of the connection of the UEL input (UELin). Typical Value = ignoreUELsignal. Default: 0 */ - CIMPP::PU vamax; /* Maximum voltage regulator output (V). Typical Value = 14.5. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (V). Typical Value = -14.5. Default: nullptr */ - CIMPP::PU vimax; /* Maximum voltage regulator input limit (V). Typical Value = 999. Default: nullptr */ - CIMPP::PU vimin; /* Minimum voltage regulator input limit (V). Typical Value = -999. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator outputs (V). Typical Value = 7.8. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator outputs (V). Typical Value = -6.7. Default: nullptr */ + /** \brief Exciter output current limit reference (I). Typical Value = 0. Default: nullptr */ + CIMPP::PU ilr; + + /** \brief Voltage regulator gain (K). Typical Value = 190. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.08. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Excitation control system stabilizer gains (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Exciter output current limiter gain (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU klr; + + /** \brief Selector of the Power System Stabilizer (PSS) input (PSSin). true = PSS input (Vs) added to error signal false = PSS input (Vs) added to voltage regulator output. Typical Value = true. Default: false */ + CIMPP::Boolean pssin; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (T). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb1; + + /** \brief Voltage regulator time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc1; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Selector of the connection of the UEL input (UELin). Typical Value = ignoreUELsignal. Default: 0 */ + CIMPP::ExcIEEEST1AUELselectorKind uelin; + + /** \brief Maximum voltage regulator output (V). Typical Value = 14.5. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -14.5. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Maximum voltage regulator input limit (V). Typical Value = 999. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Minimum voltage regulator input limit (V). Typical Value = -999. Default: nullptr */ + CIMPP::PU vimin; + + /** \brief Maximum voltage regulator outputs (V). Typical Value = 7.8. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator outputs (V). Typical Value = -6.7. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEST1AUELselectorKind.cpp b/CGMES_2.4.15_27JAN2020/ExcIEEEST1AUELselectorKind.cpp index cac712136..bdc148294 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEST1AUELselectorKind.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEST1AUELselectorKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "ExcIEEEST1AUELselectorKind") + if (EnumSymbol.substr(0, pos) != "ExcIEEEST1AUELselectorKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,22 +50,22 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "ignoreUELsignal") + if (EnumSymbol == "ignoreUELsignal") { rop = ExcIEEEST1AUELselectorKind::ignoreUELsignal; return lop; } - if(EnumSymbol == "inputHVgateVoltageOutput") + if (EnumSymbol == "inputHVgateVoltageOutput") { rop = ExcIEEEST1AUELselectorKind::inputHVgateVoltageOutput; return lop; } - if(EnumSymbol == "inputHVgateErrorSignal") + if (EnumSymbol == "inputHVgateErrorSignal") { rop = ExcIEEEST1AUELselectorKind::inputHVgateErrorSignal; return lop; } - if(EnumSymbol == "inputAddedToErrorSignal") + if (EnumSymbol == "inputAddedToErrorSignal") { rop = ExcIEEEST1AUELselectorKind::inputAddedToErrorSignal; return lop; diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEST1AUELselectorKind.hpp b/CGMES_2.4.15_27JAN2020/ExcIEEEST1AUELselectorKind.hpp index 62cd07318..395d11a91 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEST1AUELselectorKind.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEST1AUELselectorKind.hpp @@ -9,29 +9,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of connection for the UEL input used in ExcIEEEST1A. - */ + /** \brief Type of connection for the UEL input used in ExcIEEEST1A. */ class ExcIEEEST1AUELselectorKind { public: enum ExcIEEEST1AUELselectorKind_ENUM { - /** - * Ignore UEL signal. - */ + /** Ignore UEL signal. */ ignoreUELsignal, - /** - * UEL input HV gate with voltage regulator output. - */ + /** UEL input HV gate with voltage regulator output. */ inputHVgateVoltageOutput, - /** - * UEL input HV gate with error signal. - */ + /** UEL input HV gate with error signal. */ inputHVgateErrorSignal, - /** - * UEL input added to error signal. - */ + /** UEL input added to error signal. */ inputAddedToErrorSignal, }; diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEST2A.cpp b/CGMES_2.4.15_27JAN2020/ExcIEEEST2A.cpp index aed479c9d..0d80e5ac3 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEST2A.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEST2A.cpp @@ -8,24 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEST2A::ExcIEEEST2A() {}; -ExcIEEEST2A::~ExcIEEEST2A() {}; +ExcIEEEST2A::ExcIEEEST2A() {} +ExcIEEEST2A::~ExcIEEEST2A() {} static const std::list PossibleProfilesForClass = { @@ -64,181 +51,192 @@ ExcIEEEST2A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEST2A_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_efdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_uelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEST2A_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmax; if (!buffer.str().empty()) @@ -252,7 +250,8 @@ bool get_ExcIEEEST2A_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEST2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -266,7 +265,8 @@ bool get_ExcIEEEST2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST2A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -280,7 +280,8 @@ bool get_ExcIEEEST2A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -294,7 +295,8 @@ bool get_ExcIEEEST2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -308,7 +310,8 @@ bool get_ExcIEEEST2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST2A_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -322,7 +325,8 @@ bool get_ExcIEEEST2A_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST2A_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -336,7 +340,8 @@ bool get_ExcIEEEST2A_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -350,7 +355,8 @@ bool get_ExcIEEEST2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -364,7 +370,8 @@ bool get_ExcIEEEST2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -378,7 +385,8 @@ bool get_ExcIEEEST2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST2A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uelin; if (!buffer.str().empty()) @@ -392,7 +400,8 @@ bool get_ExcIEEEST2A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -406,7 +415,8 @@ bool get_ExcIEEEST2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -418,8 +428,6 @@ bool get_ExcIEEEST2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEST2A::debugName[] = "ExcIEEEST2A"; const char* ExcIEEEST2A::debugString() const { @@ -428,24 +436,24 @@ const char* ExcIEEEST2A::debugString() const void ExcIEEEST2A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A"), &ExcIEEEST2A_factory)); + factory_map.emplace("cim:ExcIEEEST2A", &ExcIEEEST2A_factory); } void ExcIEEEST2A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.efdmax"), &assign_ExcIEEEST2A_efdmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.ka"), &assign_ExcIEEEST2A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.kc"), &assign_ExcIEEEST2A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.ke"), &assign_ExcIEEEST2A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.kf"), &assign_ExcIEEEST2A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.ki"), &assign_ExcIEEEST2A_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.kp"), &assign_ExcIEEEST2A_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.ta"), &assign_ExcIEEEST2A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.te"), &assign_ExcIEEEST2A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.tf"), &assign_ExcIEEEST2A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.uelin"), &assign_ExcIEEEST2A_uelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.vrmax"), &assign_ExcIEEEST2A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.vrmin"), &assign_ExcIEEEST2A_vrmin)); + assign_map.emplace("cim:ExcIEEEST2A.efdmax", &assign_ExcIEEEST2A_efdmax); + assign_map.emplace("cim:ExcIEEEST2A.ka", &assign_ExcIEEEST2A_ka); + assign_map.emplace("cim:ExcIEEEST2A.kc", &assign_ExcIEEEST2A_kc); + assign_map.emplace("cim:ExcIEEEST2A.ke", &assign_ExcIEEEST2A_ke); + assign_map.emplace("cim:ExcIEEEST2A.kf", &assign_ExcIEEEST2A_kf); + assign_map.emplace("cim:ExcIEEEST2A.ki", &assign_ExcIEEEST2A_ki); + assign_map.emplace("cim:ExcIEEEST2A.kp", &assign_ExcIEEEST2A_kp); + assign_map.emplace("cim:ExcIEEEST2A.ta", &assign_ExcIEEEST2A_ta); + assign_map.emplace("cim:ExcIEEEST2A.te", &assign_ExcIEEEST2A_te); + assign_map.emplace("cim:ExcIEEEST2A.tf", &assign_ExcIEEEST2A_tf); + assign_map.emplace("cim:ExcIEEEST2A.uelin", &assign_ExcIEEEST2A_uelin); + assign_map.emplace("cim:ExcIEEEST2A.vrmax", &assign_ExcIEEEST2A_vrmax); + assign_map.emplace("cim:ExcIEEEST2A.vrmin", &assign_ExcIEEEST2A_vrmin); } void ExcIEEEST2A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEST2A.hpp b/CGMES_2.4.15_27JAN2020/ExcIEEEST2A.hpp index c6419e711..14b7fc4ac 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEST2A.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEST2A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type ST2A model. Some static systems utilize both current and voltage sources (generator terminal quantities) to comprise the power source. The regulator controls the exciter output through controlled saturation of the power transformer components. These compound-source rectifier excitation systems are designated Type ST2A and are represented by ExcIEEEST2A. Reference: IEEE Standard 421.5-2005 Section 7.2. - */ + /** \brief The class represents IEEE Std 421.5-2005 type ST2A model. Some static systems utilize both current and voltage sources (generator terminal quantities) to comprise the power source. The regulator controls the exciter output through controlled saturation of the power transformer components. These compound-source rectifier excitation systems are designated Type ST2A and are represented by ExcIEEEST2A. Reference: IEEE Standard 421.5-2005 Section 7.2. */ class ExcIEEEST2A : public ExcitationSystemDynamics { public: @@ -29,19 +27,44 @@ namespace CIMPP ExcIEEEST2A(); ~ExcIEEEST2A() override; - CIMPP::PU efdmax; /* Maximum field voltage (E). Typical Value = 99. Default: nullptr */ - CIMPP::PU ka; /* Voltage regulator gain (K). Typical Value = 120. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (K). Typical Value = 1.82. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (K). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU ki; /* Potential circuit gain coefficient (K). Typical Value = 8. Default: nullptr */ - CIMPP::PU kp; /* Potential circuit gain coefficient (K). Typical Value = 4.88. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0.15. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::Boolean uelin; /* UEL input (UELin). true = HV gate false = add to error signal. Typical Value = true. Default: false */ - CIMPP::PU vrmax; /* Maximum voltage regulator outputs (V). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator outputs (V). Typical Value = 0. Default: nullptr */ + /** \brief Maximum field voltage (E). Typical Value = 99. Default: nullptr */ + CIMPP::PU efdmax; + + /** \brief Voltage regulator gain (K). Typical Value = 120. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (K). Typical Value = 1.82. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Exciter constant related to self-excited field (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (K). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Potential circuit gain coefficient (K). Typical Value = 8. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Potential circuit gain coefficient (K). Typical Value = 4.88. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Voltage regulator time constant (T). Typical Value = 0.15. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Exciter time constant, integration rate associated with exciter control (T). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief UEL input (UELin). true = HV gate false = add to error signal. Typical Value = true. Default: false */ + CIMPP::Boolean uelin; + + /** \brief Maximum voltage regulator outputs (V). Typical Value = 1. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator outputs (V). Typical Value = 0. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEST3A.cpp b/CGMES_2.4.15_27JAN2020/ExcIEEEST3A.cpp index 46dcb0087..143a70444 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEST3A.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEST3A.cpp @@ -8,31 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "AngleDegrees.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEST3A::ExcIEEEST3A() {}; -ExcIEEEST3A::~ExcIEEEST3A() {}; +ExcIEEEST3A::ExcIEEEST3A() {} +ExcIEEEST3A::~ExcIEEEST3A() {} static const std::list PossibleProfilesForClass = { @@ -78,272 +58,290 @@ ExcIEEEST3A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEST3A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_km(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_km(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->km; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_thetap(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_thetap(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->thetap; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_tm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_tm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_vbmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_vbmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vbmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_vgmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_vgmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vgmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_vimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_vmmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_vmmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_vmmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_vmmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_xl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_xl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEST3A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -357,7 +355,8 @@ bool get_ExcIEEEST3A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -371,7 +370,8 @@ bool get_ExcIEEEST3A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -385,7 +385,8 @@ bool get_ExcIEEEST3A_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -399,7 +400,8 @@ bool get_ExcIEEEST3A_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_km(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->km; if (!buffer.str().empty()) @@ -413,7 +415,8 @@ bool get_ExcIEEEST3A_km(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -427,7 +430,8 @@ bool get_ExcIEEEST3A_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -441,7 +445,8 @@ bool get_ExcIEEEST3A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -455,7 +460,8 @@ bool get_ExcIEEEST3A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -469,7 +475,8 @@ bool get_ExcIEEEST3A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_thetap(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thetap; if (!buffer.str().empty()) @@ -483,7 +490,8 @@ bool get_ExcIEEEST3A_thetap(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEST3A_tm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tm; if (!buffer.str().empty()) @@ -497,7 +505,8 @@ bool get_ExcIEEEST3A_tm(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vbmax; if (!buffer.str().empty()) @@ -511,7 +520,8 @@ bool get_ExcIEEEST3A_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST3A_vgmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vgmax; if (!buffer.str().empty()) @@ -525,7 +535,8 @@ bool get_ExcIEEEST3A_vgmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST3A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -539,7 +550,8 @@ bool get_ExcIEEEST3A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST3A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimin; if (!buffer.str().empty()) @@ -553,7 +565,8 @@ bool get_ExcIEEEST3A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST3A_vmmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmmax; if (!buffer.str().empty()) @@ -567,7 +580,8 @@ bool get_ExcIEEEST3A_vmmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST3A_vmmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmmin; if (!buffer.str().empty()) @@ -581,7 +595,8 @@ bool get_ExcIEEEST3A_vmmin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST3A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -595,7 +610,8 @@ bool get_ExcIEEEST3A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST3A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -609,7 +625,8 @@ bool get_ExcIEEEST3A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST3A_xl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xl; if (!buffer.str().empty()) @@ -621,8 +638,6 @@ bool get_ExcIEEEST3A_xl(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char ExcIEEEST3A::debugName[] = "ExcIEEEST3A"; const char* ExcIEEEST3A::debugString() const { @@ -631,31 +646,31 @@ const char* ExcIEEEST3A::debugString() const void ExcIEEEST3A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A"), &ExcIEEEST3A_factory)); + factory_map.emplace("cim:ExcIEEEST3A", &ExcIEEEST3A_factory); } void ExcIEEEST3A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.ka"), &assign_ExcIEEEST3A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.kc"), &assign_ExcIEEEST3A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.kg"), &assign_ExcIEEEST3A_kg)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.ki"), &assign_ExcIEEEST3A_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.km"), &assign_ExcIEEEST3A_km)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.kp"), &assign_ExcIEEEST3A_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.ta"), &assign_ExcIEEEST3A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.tb"), &assign_ExcIEEEST3A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.tc"), &assign_ExcIEEEST3A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.thetap"), &assign_ExcIEEEST3A_thetap)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.tm"), &assign_ExcIEEEST3A_tm)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.vbmax"), &assign_ExcIEEEST3A_vbmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.vgmax"), &assign_ExcIEEEST3A_vgmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.vimax"), &assign_ExcIEEEST3A_vimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.vimin"), &assign_ExcIEEEST3A_vimin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.vmmax"), &assign_ExcIEEEST3A_vmmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.vmmin"), &assign_ExcIEEEST3A_vmmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.vrmax"), &assign_ExcIEEEST3A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.vrmin"), &assign_ExcIEEEST3A_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.xl"), &assign_ExcIEEEST3A_xl)); + assign_map.emplace("cim:ExcIEEEST3A.ka", &assign_ExcIEEEST3A_ka); + assign_map.emplace("cim:ExcIEEEST3A.kc", &assign_ExcIEEEST3A_kc); + assign_map.emplace("cim:ExcIEEEST3A.kg", &assign_ExcIEEEST3A_kg); + assign_map.emplace("cim:ExcIEEEST3A.ki", &assign_ExcIEEEST3A_ki); + assign_map.emplace("cim:ExcIEEEST3A.km", &assign_ExcIEEEST3A_km); + assign_map.emplace("cim:ExcIEEEST3A.kp", &assign_ExcIEEEST3A_kp); + assign_map.emplace("cim:ExcIEEEST3A.ta", &assign_ExcIEEEST3A_ta); + assign_map.emplace("cim:ExcIEEEST3A.tb", &assign_ExcIEEEST3A_tb); + assign_map.emplace("cim:ExcIEEEST3A.tc", &assign_ExcIEEEST3A_tc); + assign_map.emplace("cim:ExcIEEEST3A.thetap", &assign_ExcIEEEST3A_thetap); + assign_map.emplace("cim:ExcIEEEST3A.tm", &assign_ExcIEEEST3A_tm); + assign_map.emplace("cim:ExcIEEEST3A.vbmax", &assign_ExcIEEEST3A_vbmax); + assign_map.emplace("cim:ExcIEEEST3A.vgmax", &assign_ExcIEEEST3A_vgmax); + assign_map.emplace("cim:ExcIEEEST3A.vimax", &assign_ExcIEEEST3A_vimax); + assign_map.emplace("cim:ExcIEEEST3A.vimin", &assign_ExcIEEEST3A_vimin); + assign_map.emplace("cim:ExcIEEEST3A.vmmax", &assign_ExcIEEEST3A_vmmax); + assign_map.emplace("cim:ExcIEEEST3A.vmmin", &assign_ExcIEEEST3A_vmmin); + assign_map.emplace("cim:ExcIEEEST3A.vrmax", &assign_ExcIEEEST3A_vrmax); + assign_map.emplace("cim:ExcIEEEST3A.vrmin", &assign_ExcIEEEST3A_vrmin); + assign_map.emplace("cim:ExcIEEEST3A.xl", &assign_ExcIEEEST3A_xl); } void ExcIEEEST3A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEST3A.hpp b/CGMES_2.4.15_27JAN2020/ExcIEEEST3A.hpp index ead8111ca..e2f7c6f05 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEST3A.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEST3A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type ST3A model. Some static systems utilize a field voltage control loop to linearize the exciter control characteristic. This also makes the output independent of supply source variations until supply limitations are reached. These systems utilize a variety of controlled-rectifier designs: full thyristor complements or hybrid bridges in either series or shunt configurations. The power source may consist of only a potential source, either fed from the machine terminals or from internal windings. Some designs may have compound power sources utilizing both machine potential and current. These power sources are represented as phasor combinations of machine terminal current and voltage and are accommodated by suitable parameters in model Type ST3A which is represented by ExcIEEEST3A. Reference: IEEE Standard 421.5-2005 Section 7.3. - */ + /** \brief The class represents IEEE Std 421.5-2005 type ST3A model. Some static systems utilize a field voltage control loop to linearize the exciter control characteristic. This also makes the output independent of supply source variations until supply limitations are reached. These systems utilize a variety of controlled-rectifier designs: full thyristor complements or hybrid bridges in either series or shunt configurations. The power source may consist of only a potential source, either fed from the machine terminals or from internal windings. Some designs may have compound power sources utilizing both machine potential and current. These power sources are represented as phasor combinations of machine terminal current and voltage and are accommodated by suitable parameters in model Type ST3A which is represented by ExcIEEEST3A. Reference: IEEE Standard 421.5-2005 Section 7.3. */ class ExcIEEEST3A : public ExcitationSystemDynamics { public: @@ -29,26 +27,65 @@ namespace CIMPP ExcIEEEST3A(); ~ExcIEEEST3A() override; - CIMPP::PU ka; /* Voltage regulator gain (K). This is parameter K in the IEEE Std. Typical Value = 200. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU kg; /* Feedback gain constant of the inner loop field regulator (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU ki; /* Potential circuit gain coefficient (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU km; /* Forward gain constant of the inner loop field regulator (K). Typical Value = 7.93. Default: nullptr */ - CIMPP::PU kp; /* Potential circuit gain coefficient (K). Typical Value = 6.15. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (T). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (T). Typical Value = 1. Default: nullptr */ - CIMPP::AngleDegrees thetap; /* Potential circuit phase angle (thetap). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tm; /* Forward time constant of inner loop field regulator (T). Typical Value = 0.4. Default: nullptr */ - CIMPP::PU vbmax; /* Maximum excitation voltage (V). Typical Value = 6.9. Default: nullptr */ - CIMPP::PU vgmax; /* Maximum inner loop feedback voltage (V). Typical Value = 5.8. Default: nullptr */ - CIMPP::PU vimax; /* Maximum voltage regulator input limit (V). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU vimin; /* Minimum voltage regulator input limit (V). Typical Value = -0.2. Default: nullptr */ - CIMPP::PU vmmax; /* Maximum inner loop output (V). Typical Value = 1. Default: nullptr */ - CIMPP::PU vmmin; /* Minimum inner loop output (V). Typical Value = 0. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 10. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = -10. Default: nullptr */ - CIMPP::PU xl; /* Reactance associated with potential source (X). Typical Value = 0.081. Default: nullptr */ + /** \brief Voltage regulator gain (K). This is parameter K in the IEEE Std. Typical Value = 200. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Feedback gain constant of the inner loop field regulator (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Potential circuit gain coefficient (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Forward gain constant of the inner loop field regulator (K). Typical Value = 7.93. Default: nullptr */ + CIMPP::PU km; + + /** \brief Potential circuit gain coefficient (K). Typical Value = 6.15. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Voltage regulator time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (T). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (T). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Potential circuit phase angle (thetap). Typical Value = 0. Default: nullptr */ + CIMPP::AngleDegrees thetap; + + /** \brief Forward time constant of inner loop field regulator (T). Typical Value = 0.4. Default: nullptr */ + CIMPP::Seconds tm; + + /** \brief Maximum excitation voltage (V). Typical Value = 6.9. Default: nullptr */ + CIMPP::PU vbmax; + + /** \brief Maximum inner loop feedback voltage (V). Typical Value = 5.8. Default: nullptr */ + CIMPP::PU vgmax; + + /** \brief Maximum voltage regulator input limit (V). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Minimum voltage regulator input limit (V). Typical Value = -0.2. Default: nullptr */ + CIMPP::PU vimin; + + /** \brief Maximum inner loop output (V). Typical Value = 1. Default: nullptr */ + CIMPP::PU vmmax; + + /** \brief Minimum inner loop output (V). Typical Value = 0. Default: nullptr */ + CIMPP::PU vmmin; + + /** \brief Maximum voltage regulator output (V). Typical Value = 10. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -10. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief Reactance associated with potential source (X). Typical Value = 0.081. Default: nullptr */ + CIMPP::PU xl; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEST4B.cpp b/CGMES_2.4.15_27JAN2020/ExcIEEEST4B.cpp index 007525a0f..9912a54a6 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEST4B.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEST4B.cpp @@ -8,27 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "AngleDegrees.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEST4B::ExcIEEEST4B() {}; -ExcIEEEST4B::~ExcIEEEST4B() {}; +ExcIEEEST4B::ExcIEEEST4B() {} +ExcIEEEST4B::~ExcIEEEST4B() {} static const std::list PossibleProfilesForClass = { @@ -70,220 +54,234 @@ ExcIEEEST4B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEST4B_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_kim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_kim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_kir(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_kir(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kir; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_kpm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_kpm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_kpr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_kpr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_thetap(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_thetap(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->thetap; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_vbmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_vbmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vbmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_vmmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_vmmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_vmmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_vmmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_xl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_xl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEST4B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -297,7 +295,8 @@ bool get_ExcIEEEST4B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST4B_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -311,7 +310,8 @@ bool get_ExcIEEEST4B_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST4B_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -325,7 +325,8 @@ bool get_ExcIEEEST4B_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST4B_kim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kim; if (!buffer.str().empty()) @@ -339,7 +340,8 @@ bool get_ExcIEEEST4B_kim(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST4B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kir; if (!buffer.str().empty()) @@ -353,7 +355,8 @@ bool get_ExcIEEEST4B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST4B_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -367,7 +370,8 @@ bool get_ExcIEEEST4B_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST4B_kpm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpm; if (!buffer.str().empty()) @@ -381,7 +385,8 @@ bool get_ExcIEEEST4B_kpm(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST4B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpr; if (!buffer.str().empty()) @@ -395,7 +400,8 @@ bool get_ExcIEEEST4B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST4B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -409,7 +415,8 @@ bool get_ExcIEEEST4B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST4B_thetap(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thetap; if (!buffer.str().empty()) @@ -423,7 +430,8 @@ bool get_ExcIEEEST4B_thetap(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEST4B_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vbmax; if (!buffer.str().empty()) @@ -437,7 +445,8 @@ bool get_ExcIEEEST4B_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST4B_vmmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmmax; if (!buffer.str().empty()) @@ -451,7 +460,8 @@ bool get_ExcIEEEST4B_vmmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST4B_vmmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmmin; if (!buffer.str().empty()) @@ -465,7 +475,8 @@ bool get_ExcIEEEST4B_vmmin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST4B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -479,7 +490,8 @@ bool get_ExcIEEEST4B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST4B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -493,7 +505,8 @@ bool get_ExcIEEEST4B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST4B_xl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xl; if (!buffer.str().empty()) @@ -505,8 +518,6 @@ bool get_ExcIEEEST4B_xl(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char ExcIEEEST4B::debugName[] = "ExcIEEEST4B"; const char* ExcIEEEST4B::debugString() const { @@ -515,27 +526,27 @@ const char* ExcIEEEST4B::debugString() const void ExcIEEEST4B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B"), &ExcIEEEST4B_factory)); + factory_map.emplace("cim:ExcIEEEST4B", &ExcIEEEST4B_factory); } void ExcIEEEST4B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.kc"), &assign_ExcIEEEST4B_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.kg"), &assign_ExcIEEEST4B_kg)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.ki"), &assign_ExcIEEEST4B_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.kim"), &assign_ExcIEEEST4B_kim)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.kir"), &assign_ExcIEEEST4B_kir)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.kp"), &assign_ExcIEEEST4B_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.kpm"), &assign_ExcIEEEST4B_kpm)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.kpr"), &assign_ExcIEEEST4B_kpr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.ta"), &assign_ExcIEEEST4B_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.thetap"), &assign_ExcIEEEST4B_thetap)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.vbmax"), &assign_ExcIEEEST4B_vbmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.vmmax"), &assign_ExcIEEEST4B_vmmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.vmmin"), &assign_ExcIEEEST4B_vmmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.vrmax"), &assign_ExcIEEEST4B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.vrmin"), &assign_ExcIEEEST4B_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.xl"), &assign_ExcIEEEST4B_xl)); + assign_map.emplace("cim:ExcIEEEST4B.kc", &assign_ExcIEEEST4B_kc); + assign_map.emplace("cim:ExcIEEEST4B.kg", &assign_ExcIEEEST4B_kg); + assign_map.emplace("cim:ExcIEEEST4B.ki", &assign_ExcIEEEST4B_ki); + assign_map.emplace("cim:ExcIEEEST4B.kim", &assign_ExcIEEEST4B_kim); + assign_map.emplace("cim:ExcIEEEST4B.kir", &assign_ExcIEEEST4B_kir); + assign_map.emplace("cim:ExcIEEEST4B.kp", &assign_ExcIEEEST4B_kp); + assign_map.emplace("cim:ExcIEEEST4B.kpm", &assign_ExcIEEEST4B_kpm); + assign_map.emplace("cim:ExcIEEEST4B.kpr", &assign_ExcIEEEST4B_kpr); + assign_map.emplace("cim:ExcIEEEST4B.ta", &assign_ExcIEEEST4B_ta); + assign_map.emplace("cim:ExcIEEEST4B.thetap", &assign_ExcIEEEST4B_thetap); + assign_map.emplace("cim:ExcIEEEST4B.vbmax", &assign_ExcIEEEST4B_vbmax); + assign_map.emplace("cim:ExcIEEEST4B.vmmax", &assign_ExcIEEEST4B_vmmax); + assign_map.emplace("cim:ExcIEEEST4B.vmmin", &assign_ExcIEEEST4B_vmmin); + assign_map.emplace("cim:ExcIEEEST4B.vrmax", &assign_ExcIEEEST4B_vrmax); + assign_map.emplace("cim:ExcIEEEST4B.vrmin", &assign_ExcIEEEST4B_vrmin); + assign_map.emplace("cim:ExcIEEEST4B.xl", &assign_ExcIEEEST4B_xl); } void ExcIEEEST4B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEST4B.hpp b/CGMES_2.4.15_27JAN2020/ExcIEEEST4B.hpp index 87751775d..b3ac3afe3 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEST4B.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEST4B.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type ST4B model. This model is a variation of the Type ST3A model, with a proportional plus integral (PI) regulator block replacing the lag-lead regulator characteristic that is in the ST3A model. Both potential and compound source rectifier excitation systems are modeled. The PI regulator blocks have non-windup limits that are represented. The voltage regulator of this model is typically implemented digitally. Reference: IEEE Standard 421.5-2005 Section 7.4. - */ + /** \brief The class represents IEEE Std 421.5-2005 type ST4B model. This model is a variation of the Type ST3A model, with a proportional plus integral (PI) regulator block replacing the lag-lead regulator characteristic that is in the ST3A model. Both potential and compound source rectifier excitation systems are modeled. The PI regulator blocks have non-windup limits that are represented. The voltage regulator of this model is typically implemented digitally. Reference: IEEE Standard 421.5-2005 Section 7.4. */ class ExcIEEEST4B : public ExcitationSystemDynamics { public: @@ -29,22 +27,53 @@ namespace CIMPP ExcIEEEST4B(); ~ExcIEEEST4B() override; - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.113. Default: nullptr */ - CIMPP::PU kg; /* Feedback gain constant of the inner loop field regulator (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU ki; /* Potential circuit gain coefficient (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU kim; /* Voltage regulator integral gain output (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU kir; /* Voltage regulator integral gain (K). Typical Value = 10.75. Default: nullptr */ - CIMPP::PU kp; /* Potential circuit gain coefficient (K). Typical Value = 9.3. Default: nullptr */ - CIMPP::PU kpm; /* Voltage regulator proportional gain output (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kpr; /* Voltage regulator proportional gain (K). Typical Value = 10.75. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (T). Typical Value = 0.02. Default: nullptr */ - CIMPP::AngleDegrees thetap; /* Potential circuit phase angle (thetap). Typical Value = 0. Default: nullptr */ - CIMPP::PU vbmax; /* Maximum excitation voltage (V). Typical Value = 11.63. Default: nullptr */ - CIMPP::PU vmmax; /* Maximum inner loop output (V). Typical Value = 99. Default: nullptr */ - CIMPP::PU vmmin; /* Minimum inner loop output (V). Typical Value = -99. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = -0.87. Default: nullptr */ - CIMPP::PU xl; /* Reactance associated with potential source (X). Typical Value = 0.124. Default: nullptr */ + /** \brief Rectifier loading factor proportional to commutating reactance (K). Typical Value = 0.113. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Feedback gain constant of the inner loop field regulator (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Potential circuit gain coefficient (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Voltage regulator integral gain output (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU kim; + + /** \brief Voltage regulator integral gain (K). Typical Value = 10.75. Default: nullptr */ + CIMPP::PU kir; + + /** \brief Potential circuit gain coefficient (K). Typical Value = 9.3. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Voltage regulator proportional gain output (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU kpm; + + /** \brief Voltage regulator proportional gain (K). Typical Value = 10.75. Default: nullptr */ + CIMPP::PU kpr; + + /** \brief Voltage regulator time constant (T). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Potential circuit phase angle (thetap). Typical Value = 0. Default: nullptr */ + CIMPP::AngleDegrees thetap; + + /** \brief Maximum excitation voltage (V). Typical Value = 11.63. Default: nullptr */ + CIMPP::PU vbmax; + + /** \brief Maximum inner loop output (V). Typical Value = 99. Default: nullptr */ + CIMPP::PU vmmax; + + /** \brief Minimum inner loop output (V). Typical Value = -99. Default: nullptr */ + CIMPP::PU vmmin; + + /** \brief Maximum voltage regulator output (V). Typical Value = 1. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -0.87. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief Reactance associated with potential source (X). Typical Value = 0.124. Default: nullptr */ + CIMPP::PU xl; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEST5B.cpp b/CGMES_2.4.15_27JAN2020/ExcIEEEST5B.cpp index 4312484ee..49f99553d 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEST5B.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEST5B.cpp @@ -8,28 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEST5B::ExcIEEEST5B() {}; -ExcIEEEST5B::~ExcIEEEST5B() {}; +ExcIEEEST5B::ExcIEEEST5B() {} +ExcIEEEST5B::~ExcIEEEST5B() {} static const std::list PossibleProfilesForClass = { @@ -72,233 +55,248 @@ ExcIEEEST5B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEST5B_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_kr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_kr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tb1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tb2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tb2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tc1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tc1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tc2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tc2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tob1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tob1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tob1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tob2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tob2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tob2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_toc1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_toc1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->toc1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_toc2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_toc2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->toc2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tub1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tub1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tub1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tub2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tub2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tub2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tuc1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tuc1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tuc1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tuc2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tuc2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tuc2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEST5B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -312,7 +310,8 @@ bool get_ExcIEEEST5B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST5B_kr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kr; if (!buffer.str().empty()) @@ -326,7 +325,8 @@ bool get_ExcIEEEST5B_kr(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST5B_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -340,7 +340,8 @@ bool get_ExcIEEEST5B_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST5B_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb1; if (!buffer.str().empty()) @@ -354,7 +355,8 @@ bool get_ExcIEEEST5B_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST5B_tb2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb2; if (!buffer.str().empty()) @@ -368,7 +370,8 @@ bool get_ExcIEEEST5B_tb2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST5B_tc1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc1; if (!buffer.str().empty()) @@ -382,7 +385,8 @@ bool get_ExcIEEEST5B_tc1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST5B_tc2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc2; if (!buffer.str().empty()) @@ -396,7 +400,8 @@ bool get_ExcIEEEST5B_tc2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST5B_tob1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tob1; if (!buffer.str().empty()) @@ -410,7 +415,8 @@ bool get_ExcIEEEST5B_tob1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEST5B_tob2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tob2; if (!buffer.str().empty()) @@ -424,7 +430,8 @@ bool get_ExcIEEEST5B_tob2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEST5B_toc1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->toc1; if (!buffer.str().empty()) @@ -438,7 +445,8 @@ bool get_ExcIEEEST5B_toc1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEST5B_toc2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->toc2; if (!buffer.str().empty()) @@ -452,7 +460,8 @@ bool get_ExcIEEEST5B_toc2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEST5B_tub1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tub1; if (!buffer.str().empty()) @@ -466,7 +475,8 @@ bool get_ExcIEEEST5B_tub1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEST5B_tub2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tub2; if (!buffer.str().empty()) @@ -480,7 +490,8 @@ bool get_ExcIEEEST5B_tub2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEST5B_tuc1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tuc1; if (!buffer.str().empty()) @@ -494,7 +505,8 @@ bool get_ExcIEEEST5B_tuc1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEST5B_tuc2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tuc2; if (!buffer.str().empty()) @@ -508,7 +520,8 @@ bool get_ExcIEEEST5B_tuc2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEST5B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -522,7 +535,8 @@ bool get_ExcIEEEST5B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST5B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -534,8 +548,6 @@ bool get_ExcIEEEST5B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEST5B::debugName[] = "ExcIEEEST5B"; const char* ExcIEEEST5B::debugString() const { @@ -544,28 +556,28 @@ const char* ExcIEEEST5B::debugString() const void ExcIEEEST5B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B"), &ExcIEEEST5B_factory)); + factory_map.emplace("cim:ExcIEEEST5B", &ExcIEEEST5B_factory); } void ExcIEEEST5B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.kc"), &assign_ExcIEEEST5B_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.kr"), &assign_ExcIEEEST5B_kr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.t1"), &assign_ExcIEEEST5B_t1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tb1"), &assign_ExcIEEEST5B_tb1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tb2"), &assign_ExcIEEEST5B_tb2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tc1"), &assign_ExcIEEEST5B_tc1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tc2"), &assign_ExcIEEEST5B_tc2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tob1"), &assign_ExcIEEEST5B_tob1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tob2"), &assign_ExcIEEEST5B_tob2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.toc1"), &assign_ExcIEEEST5B_toc1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.toc2"), &assign_ExcIEEEST5B_toc2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tub1"), &assign_ExcIEEEST5B_tub1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tub2"), &assign_ExcIEEEST5B_tub2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tuc1"), &assign_ExcIEEEST5B_tuc1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tuc2"), &assign_ExcIEEEST5B_tuc2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.vrmax"), &assign_ExcIEEEST5B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.vrmin"), &assign_ExcIEEEST5B_vrmin)); + assign_map.emplace("cim:ExcIEEEST5B.kc", &assign_ExcIEEEST5B_kc); + assign_map.emplace("cim:ExcIEEEST5B.kr", &assign_ExcIEEEST5B_kr); + assign_map.emplace("cim:ExcIEEEST5B.t1", &assign_ExcIEEEST5B_t1); + assign_map.emplace("cim:ExcIEEEST5B.tb1", &assign_ExcIEEEST5B_tb1); + assign_map.emplace("cim:ExcIEEEST5B.tb2", &assign_ExcIEEEST5B_tb2); + assign_map.emplace("cim:ExcIEEEST5B.tc1", &assign_ExcIEEEST5B_tc1); + assign_map.emplace("cim:ExcIEEEST5B.tc2", &assign_ExcIEEEST5B_tc2); + assign_map.emplace("cim:ExcIEEEST5B.tob1", &assign_ExcIEEEST5B_tob1); + assign_map.emplace("cim:ExcIEEEST5B.tob2", &assign_ExcIEEEST5B_tob2); + assign_map.emplace("cim:ExcIEEEST5B.toc1", &assign_ExcIEEEST5B_toc1); + assign_map.emplace("cim:ExcIEEEST5B.toc2", &assign_ExcIEEEST5B_toc2); + assign_map.emplace("cim:ExcIEEEST5B.tub1", &assign_ExcIEEEST5B_tub1); + assign_map.emplace("cim:ExcIEEEST5B.tub2", &assign_ExcIEEEST5B_tub2); + assign_map.emplace("cim:ExcIEEEST5B.tuc1", &assign_ExcIEEEST5B_tuc1); + assign_map.emplace("cim:ExcIEEEST5B.tuc2", &assign_ExcIEEEST5B_tuc2); + assign_map.emplace("cim:ExcIEEEST5B.vrmax", &assign_ExcIEEEST5B_vrmax); + assign_map.emplace("cim:ExcIEEEST5B.vrmin", &assign_ExcIEEEST5B_vrmin); } void ExcIEEEST5B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEST5B.hpp b/CGMES_2.4.15_27JAN2020/ExcIEEEST5B.hpp index 4bf4388bc..c099e151a 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEST5B.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEST5B.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type ST5B model. The Type ST5B excitation system is a variation of the Type ST1A model, with alternative overexcitation and underexcitation inputs and additional limits. Reference: IEEE Standard 421.5-2005 Section 7.5. Note: the block diagram in the IEEE 421.5 standard has input signal Vc and does not indicate the summation point with Vref. The implementation of the ExcIEEEST5B shall consider summation point with Vref. - */ + /** \brief The class represents IEEE Std 421.5-2005 type ST5B model. The Type ST5B excitation system is a variation of the Type ST1A model, with alternative overexcitation and underexcitation inputs and additional limits. Reference: IEEE Standard 421.5-2005 Section 7.5. Note: the block diagram in the IEEE 421.5 standard has input signal Vc and does not indicate the summation point with Vref. The implementation of the ExcIEEEST5B shall consider summation point with Vref. */ class ExcIEEEST5B : public ExcitationSystemDynamics { public: @@ -28,23 +26,56 @@ namespace CIMPP ExcIEEEST5B(); ~ExcIEEEST5B() override; - CIMPP::PU kc; /* Rectifier regulation factor (K). Typical Value = 0.004. Default: nullptr */ - CIMPP::PU kr; /* Regulator gain (K). Typical Value = 200. Default: nullptr */ - CIMPP::Seconds t1; /* Firing circuit time constant (T1). Typical Value = 0.004. Default: nullptr */ - CIMPP::Seconds tb1; /* Regulator lag time constant (T). Typical Value = 6. Default: nullptr */ - CIMPP::Seconds tb2; /* Regulator lag time constant (T). Typical Value = 0.01. Default: nullptr */ - CIMPP::Seconds tc1; /* Regulator lead time constant (T). Typical Value = 0.8. Default: nullptr */ - CIMPP::Seconds tc2; /* Regulator lead time constant (T). Typical Value = 0.08. Default: nullptr */ - CIMPP::Seconds tob1; /* OEL lag time constant (T). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds tob2; /* OEL lag time constant (T). Typical Value = 0.08. Default: nullptr */ - CIMPP::Seconds toc1; /* OEL lead time constant (T). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds toc2; /* OEL lead time constant (T). Typical Value = 0.08. Default: nullptr */ - CIMPP::Seconds tub1; /* UEL lag time constant (T). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds tub2; /* UEL lag time constant (T). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds tuc1; /* UEL lead time constant (T). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds tuc2; /* UEL lead time constant (T). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 5. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = -4. Default: nullptr */ + /** \brief Rectifier regulation factor (K). Typical Value = 0.004. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Regulator gain (K). Typical Value = 200. Default: nullptr */ + CIMPP::PU kr; + + /** \brief Firing circuit time constant (T1). Typical Value = 0.004. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Regulator lag time constant (T). Typical Value = 6. Default: nullptr */ + CIMPP::Seconds tb1; + + /** \brief Regulator lag time constant (T). Typical Value = 0.01. Default: nullptr */ + CIMPP::Seconds tb2; + + /** \brief Regulator lead time constant (T). Typical Value = 0.8. Default: nullptr */ + CIMPP::Seconds tc1; + + /** \brief Regulator lead time constant (T). Typical Value = 0.08. Default: nullptr */ + CIMPP::Seconds tc2; + + /** \brief OEL lag time constant (T). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds tob1; + + /** \brief OEL lag time constant (T). Typical Value = 0.08. Default: nullptr */ + CIMPP::Seconds tob2; + + /** \brief OEL lead time constant (T). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds toc1; + + /** \brief OEL lead time constant (T). Typical Value = 0.08. Default: nullptr */ + CIMPP::Seconds toc2; + + /** \brief UEL lag time constant (T). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds tub1; + + /** \brief UEL lag time constant (T). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds tub2; + + /** \brief UEL lead time constant (T). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds tuc1; + + /** \brief UEL lead time constant (T). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tuc2; + + /** \brief Maximum voltage regulator output (V). Typical Value = 5. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -4. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEST6B.cpp b/CGMES_2.4.15_27JAN2020/ExcIEEEST6B.cpp index f14ebf34b..46aac194f 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEST6B.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEST6B.cpp @@ -8,25 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ExcST6BOELselectorKind.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEST6B::ExcIEEEST6B() {}; -ExcIEEEST6B::~ExcIEEEST6B() {}; +ExcIEEEST6B::ExcIEEEST6B() {} +ExcIEEEST6B::~ExcIEEEST6B() {} static const std::list PossibleProfilesForClass = { @@ -66,194 +52,206 @@ ExcIEEEST6B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEST6B_ilr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_ilr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ilr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_kci(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_kci(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kci; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_kff(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_kff(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kff; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_kia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_kia(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kia; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_klr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_klr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->klr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_km(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_km(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->km; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_kpa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_kpa(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpa; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_oelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_oelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->oelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEST6B_ilr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ilr; if (!buffer.str().empty()) @@ -267,7 +265,8 @@ bool get_ExcIEEEST6B_ilr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST6B_kci(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kci; if (!buffer.str().empty()) @@ -281,7 +280,8 @@ bool get_ExcIEEEST6B_kci(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST6B_kff(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kff; if (!buffer.str().empty()) @@ -295,7 +295,8 @@ bool get_ExcIEEEST6B_kff(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST6B_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -309,7 +310,8 @@ bool get_ExcIEEEST6B_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST6B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kia; if (!buffer.str().empty()) @@ -323,7 +325,8 @@ bool get_ExcIEEEST6B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST6B_klr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->klr; if (!buffer.str().empty()) @@ -337,7 +340,8 @@ bool get_ExcIEEEST6B_klr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST6B_km(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->km; if (!buffer.str().empty()) @@ -351,7 +355,8 @@ bool get_ExcIEEEST6B_km(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST6B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpa; if (!buffer.str().empty()) @@ -363,11 +368,12 @@ bool get_ExcIEEEST6B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } -bool get_ExcIEEEST6B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST6B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tg; + buffer << element->oelin; if (!buffer.str().empty()) { return true; @@ -377,11 +383,12 @@ bool get_ExcIEEEST6B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } -bool get_ExcIEEEST6B_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST6B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vamax; + buffer << element->tg; if (!buffer.str().empty()) { return true; @@ -391,11 +398,12 @@ bool get_ExcIEEEST6B_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } -bool get_ExcIEEEST6B_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST6B_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vamin; + buffer << element->vamax; if (!buffer.str().empty()) { return true; @@ -405,11 +413,12 @@ bool get_ExcIEEEST6B_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } -bool get_ExcIEEEST6B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST6B_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vrmax; + buffer << element->vamin; if (!buffer.str().empty()) { return true; @@ -419,11 +428,12 @@ bool get_ExcIEEEST6B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } -bool get_ExcIEEEST6B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST6B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vrmin; + buffer << element->vrmax; if (!buffer.str().empty()) { return true; @@ -433,13 +443,12 @@ bool get_ExcIEEEST6B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - -bool get_ExcIEEEST6B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST6B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->oelin; + buffer << element->vrmin; if (!buffer.str().empty()) { return true; @@ -457,25 +466,25 @@ const char* ExcIEEEST6B::debugString() const void ExcIEEEST6B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B"), &ExcIEEEST6B_factory)); + factory_map.emplace("cim:ExcIEEEST6B", &ExcIEEEST6B_factory); } void ExcIEEEST6B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.ilr"), &assign_ExcIEEEST6B_ilr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.kci"), &assign_ExcIEEEST6B_kci)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.kff"), &assign_ExcIEEEST6B_kff)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.kg"), &assign_ExcIEEEST6B_kg)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.kia"), &assign_ExcIEEEST6B_kia)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.klr"), &assign_ExcIEEEST6B_klr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.km"), &assign_ExcIEEEST6B_km)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.kpa"), &assign_ExcIEEEST6B_kpa)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.oelin"), &assign_ExcIEEEST6B_oelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.tg"), &assign_ExcIEEEST6B_tg)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.vamax"), &assign_ExcIEEEST6B_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.vamin"), &assign_ExcIEEEST6B_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.vrmax"), &assign_ExcIEEEST6B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.vrmin"), &assign_ExcIEEEST6B_vrmin)); + assign_map.emplace("cim:ExcIEEEST6B.ilr", &assign_ExcIEEEST6B_ilr); + assign_map.emplace("cim:ExcIEEEST6B.kci", &assign_ExcIEEEST6B_kci); + assign_map.emplace("cim:ExcIEEEST6B.kff", &assign_ExcIEEEST6B_kff); + assign_map.emplace("cim:ExcIEEEST6B.kg", &assign_ExcIEEEST6B_kg); + assign_map.emplace("cim:ExcIEEEST6B.kia", &assign_ExcIEEEST6B_kia); + assign_map.emplace("cim:ExcIEEEST6B.klr", &assign_ExcIEEEST6B_klr); + assign_map.emplace("cim:ExcIEEEST6B.km", &assign_ExcIEEEST6B_km); + assign_map.emplace("cim:ExcIEEEST6B.kpa", &assign_ExcIEEEST6B_kpa); + assign_map.emplace("cim:ExcIEEEST6B.oelin", &assign_ExcIEEEST6B_oelin); + assign_map.emplace("cim:ExcIEEEST6B.tg", &assign_ExcIEEEST6B_tg); + assign_map.emplace("cim:ExcIEEEST6B.vamax", &assign_ExcIEEEST6B_vamax); + assign_map.emplace("cim:ExcIEEEST6B.vamin", &assign_ExcIEEEST6B_vamin); + assign_map.emplace("cim:ExcIEEEST6B.vrmax", &assign_ExcIEEEST6B_vrmax); + assign_map.emplace("cim:ExcIEEEST6B.vrmin", &assign_ExcIEEEST6B_vrmin); } void ExcIEEEST6B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEST6B.hpp b/CGMES_2.4.15_27JAN2020/ExcIEEEST6B.hpp index a44a3f043..554b6609b 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEST6B.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEST6B.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type ST6B model. This model consists of a PI voltage regulator with an inner loop field voltage regulator and pre-control. The field voltage regulator implements a proportional control. The pre-control and the delay in the feedback circuit increase the dynamic response. Reference: IEEE Standard 421.5-2005 Section 7.6. - */ + /** \brief The class represents IEEE Std 421.5-2005 type ST6B model. This model consists of a PI voltage regulator with an inner loop field voltage regulator and pre-control. The field voltage regulator implements a proportional control. The pre-control and the delay in the feedback circuit increase the dynamic response. Reference: IEEE Standard 421.5-2005 Section 7.6. */ class ExcIEEEST6B : public ExcitationSystemDynamics { public: @@ -29,20 +27,47 @@ namespace CIMPP ExcIEEEST6B(); ~ExcIEEEST6B() override; - CIMPP::PU ilr; /* Exciter output current limit reference (I). Typical Value = 4.164. Default: nullptr */ - CIMPP::PU kci; /* Exciter output current limit adjustment (K). Typical Value = 1.0577. Default: nullptr */ - CIMPP::PU kff; /* Pre-control gain constant of the inner loop field regulator (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kg; /* Feedback gain constant of the inner loop field regulator (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kia; /* Voltage regulator integral gain (K). Typical Value = 45.094. Default: nullptr */ - CIMPP::PU klr; /* Exciter output current limiter gain (K). Typical Value = 17.33. Default: nullptr */ - CIMPP::PU km; /* Forward gain constant of the inner loop field regulator (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kpa; /* Voltage regulator proportional gain (K). Typical Value = 18.038. Default: nullptr */ - CIMPP::ExcST6BOELselectorKind oelin; /* OEL input selector (OELin). Typical Value = noOELinput. Default: 0 */ - CIMPP::Seconds tg; /* Feedback time constant of inner loop field voltage regulator (T). Typical Value = 0.02. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (V). Typical Value = 4.81. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (V). Typical Value = -3.85. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 4.81. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = -3.85. Default: nullptr */ + /** \brief Exciter output current limit reference (I). Typical Value = 4.164. Default: nullptr */ + CIMPP::PU ilr; + + /** \brief Exciter output current limit adjustment (K). Typical Value = 1.0577. Default: nullptr */ + CIMPP::PU kci; + + /** \brief Pre-control gain constant of the inner loop field regulator (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU kff; + + /** \brief Feedback gain constant of the inner loop field regulator (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Voltage regulator integral gain (K). Typical Value = 45.094. Default: nullptr */ + CIMPP::PU kia; + + /** \brief Exciter output current limiter gain (K). Typical Value = 17.33. Default: nullptr */ + CIMPP::PU klr; + + /** \brief Forward gain constant of the inner loop field regulator (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU km; + + /** \brief Voltage regulator proportional gain (K). Typical Value = 18.038. Default: nullptr */ + CIMPP::PU kpa; + + /** \brief OEL input selector (OELin). Typical Value = noOELinput. Default: 0 */ + CIMPP::ExcST6BOELselectorKind oelin; + + /** \brief Feedback time constant of inner loop field voltage regulator (T). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Maximum voltage regulator output (V). Typical Value = 4.81. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -3.85. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Maximum voltage regulator output (V). Typical Value = 4.81. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -3.85. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEST7B.cpp b/CGMES_2.4.15_27JAN2020/ExcIEEEST7B.cpp index aad96d91b..20513a7f9 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEST7B.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEST7B.cpp @@ -8,26 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ExcST7BOELselectorKind.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "ExcST7BUELselectorKind.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEST7B::ExcIEEEST7B() {}; -ExcIEEEST7B::~ExcIEEEST7B() {}; +ExcIEEEST7B::ExcIEEEST7B() {} +ExcIEEEST7B::~ExcIEEEST7B() {} static const std::list PossibleProfilesForClass = { @@ -68,207 +53,220 @@ ExcIEEEST7B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEST7B_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_kh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_kia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_kia(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kia; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_kl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_kl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_kpa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_kpa(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpa; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_oelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_oelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->oelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_tia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_tia(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tia; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_uelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_vmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_vmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEST7B_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh; if (!buffer.str().empty()) @@ -282,7 +280,8 @@ bool get_ExcIEEEST7B_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST7B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kia; if (!buffer.str().empty()) @@ -296,7 +295,8 @@ bool get_ExcIEEEST7B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST7B_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl; if (!buffer.str().empty()) @@ -310,7 +310,8 @@ bool get_ExcIEEEST7B_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST7B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpa; if (!buffer.str().empty()) @@ -322,11 +323,12 @@ bool get_ExcIEEEST7B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } -bool get_ExcIEEEST7B_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tb; + buffer << element->oelin; if (!buffer.str().empty()) { return true; @@ -336,11 +338,12 @@ bool get_ExcIEEEST7B_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } -bool get_ExcIEEEST7B_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tc; + buffer << element->tb; if (!buffer.str().empty()) { return true; @@ -350,11 +353,12 @@ bool get_ExcIEEEST7B_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } -bool get_ExcIEEEST7B_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tf; + buffer << element->tc; if (!buffer.str().empty()) { return true; @@ -364,11 +368,12 @@ bool get_ExcIEEEST7B_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } -bool get_ExcIEEEST7B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tg; + buffer << element->tf; if (!buffer.str().empty()) { return true; @@ -378,11 +383,12 @@ bool get_ExcIEEEST7B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } -bool get_ExcIEEEST7B_tia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tia; + buffer << element->tg; if (!buffer.str().empty()) { return true; @@ -392,11 +398,12 @@ bool get_ExcIEEEST7B_tia(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } -bool get_ExcIEEEST7B_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_tia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vmax; + buffer << element->tia; if (!buffer.str().empty()) { return true; @@ -406,11 +413,12 @@ bool get_ExcIEEEST7B_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } -bool get_ExcIEEEST7B_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vmin; + buffer << element->uelin; if (!buffer.str().empty()) { return true; @@ -420,11 +428,12 @@ bool get_ExcIEEEST7B_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } -bool get_ExcIEEEST7B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vrmax; + buffer << element->vmax; if (!buffer.str().empty()) { return true; @@ -434,11 +443,12 @@ bool get_ExcIEEEST7B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } -bool get_ExcIEEEST7B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vrmin; + buffer << element->vmin; if (!buffer.str().empty()) { return true; @@ -448,13 +458,12 @@ bool get_ExcIEEEST7B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - -bool get_ExcIEEEST7B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->oelin; + buffer << element->vrmax; if (!buffer.str().empty()) { return true; @@ -464,11 +473,12 @@ bool get_ExcIEEEST7B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } -bool get_ExcIEEEST7B_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->uelin; + buffer << element->vrmin; if (!buffer.str().empty()) { return true; @@ -486,26 +496,26 @@ const char* ExcIEEEST7B::debugString() const void ExcIEEEST7B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B"), &ExcIEEEST7B_factory)); + factory_map.emplace("cim:ExcIEEEST7B", &ExcIEEEST7B_factory); } void ExcIEEEST7B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.kh"), &assign_ExcIEEEST7B_kh)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.kia"), &assign_ExcIEEEST7B_kia)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.kl"), &assign_ExcIEEEST7B_kl)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.kpa"), &assign_ExcIEEEST7B_kpa)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.oelin"), &assign_ExcIEEEST7B_oelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.tb"), &assign_ExcIEEEST7B_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.tc"), &assign_ExcIEEEST7B_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.tf"), &assign_ExcIEEEST7B_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.tg"), &assign_ExcIEEEST7B_tg)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.tia"), &assign_ExcIEEEST7B_tia)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.uelin"), &assign_ExcIEEEST7B_uelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.vmax"), &assign_ExcIEEEST7B_vmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.vmin"), &assign_ExcIEEEST7B_vmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.vrmax"), &assign_ExcIEEEST7B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.vrmin"), &assign_ExcIEEEST7B_vrmin)); + assign_map.emplace("cim:ExcIEEEST7B.kh", &assign_ExcIEEEST7B_kh); + assign_map.emplace("cim:ExcIEEEST7B.kia", &assign_ExcIEEEST7B_kia); + assign_map.emplace("cim:ExcIEEEST7B.kl", &assign_ExcIEEEST7B_kl); + assign_map.emplace("cim:ExcIEEEST7B.kpa", &assign_ExcIEEEST7B_kpa); + assign_map.emplace("cim:ExcIEEEST7B.oelin", &assign_ExcIEEEST7B_oelin); + assign_map.emplace("cim:ExcIEEEST7B.tb", &assign_ExcIEEEST7B_tb); + assign_map.emplace("cim:ExcIEEEST7B.tc", &assign_ExcIEEEST7B_tc); + assign_map.emplace("cim:ExcIEEEST7B.tf", &assign_ExcIEEEST7B_tf); + assign_map.emplace("cim:ExcIEEEST7B.tg", &assign_ExcIEEEST7B_tg); + assign_map.emplace("cim:ExcIEEEST7B.tia", &assign_ExcIEEEST7B_tia); + assign_map.emplace("cim:ExcIEEEST7B.uelin", &assign_ExcIEEEST7B_uelin); + assign_map.emplace("cim:ExcIEEEST7B.vmax", &assign_ExcIEEEST7B_vmax); + assign_map.emplace("cim:ExcIEEEST7B.vmin", &assign_ExcIEEEST7B_vmin); + assign_map.emplace("cim:ExcIEEEST7B.vrmax", &assign_ExcIEEEST7B_vrmax); + assign_map.emplace("cim:ExcIEEEST7B.vrmin", &assign_ExcIEEEST7B_vrmin); } void ExcIEEEST7B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcIEEEST7B.hpp b/CGMES_2.4.15_27JAN2020/ExcIEEEST7B.hpp index f38aee3af..d1428a0fe 100644 --- a/CGMES_2.4.15_27JAN2020/ExcIEEEST7B.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcIEEEST7B.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type ST7B model. This model is representative of static potential-source excitation systems. In this system, the AVR consists of a PI voltage regulator. A phase lead-lag filter in series allows introduction of a derivative function, typically used with brushless excitation systems. In that case, the regulator is of the PID type. In addition, the terminal voltage channel includes a phase lead-lag filter. The AVR includes the appropriate inputs on its reference for overexcitation limiter (OEL1), underexcitation limiter (UEL), stator current limiter (SCL), and current compensator (DROOP). All these limitations, when they work at voltage reference level, keep the PSS (VS signal from Type PSS1A, PSS2A, or PSS2B) in operation. However, the UEL limitation can also be transferred to the high value (HV) gate acting on the output signal. In addition, the output signal passes through a low value (LV) gate for a ceiling overexcitation limiter (OEL2). Reference: IEEE Standard 421.5-2005 Section 7.7. - */ + /** \brief The class represents IEEE Std 421.5-2005 type ST7B model. This model is representative of static potential-source excitation systems. In this system, the AVR consists of a PI voltage regulator. A phase lead-lag filter in series allows introduction of a derivative function, typically used with brushless excitation systems. In that case, the regulator is of the PID type. In addition, the terminal voltage channel includes a phase lead-lag filter. The AVR includes the appropriate inputs on its reference for overexcitation limiter (OEL1), underexcitation limiter (UEL), stator current limiter (SCL), and current compensator (DROOP). All these limitations, when they work at voltage reference level, keep the PSS (VS signal from Type PSS1A, PSS2A, or PSS2B) in operation. However, the UEL limitation can also be transferred to the high value (HV) gate acting on the output signal. In addition, the output signal passes through a low value (LV) gate for a ceiling overexcitation limiter (OEL2). Reference: IEEE Standard 421.5-2005 Section 7.7. */ class ExcIEEEST7B : public ExcitationSystemDynamics { public: @@ -30,21 +28,50 @@ namespace CIMPP ExcIEEEST7B(); ~ExcIEEEST7B() override; - CIMPP::PU kh; /* High-value gate feedback gain (K). Typical Value 1. Default: nullptr */ - CIMPP::PU kia; /* Voltage regulator integral gain (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kl; /* Low-value gate feedback gain (K). Typical Value 1. Default: nullptr */ - CIMPP::PU kpa; /* Voltage regulator proportional gain (K). Typical Value = 40. Default: nullptr */ - CIMPP::ExcST7BOELselectorKind oelin; /* OEL input selector (OELin). Typical Value = noOELinput. Default: 0 */ - CIMPP::Seconds tb; /* Regulator lag time constant (T). Typical Value 1. Default: nullptr */ - CIMPP::Seconds tc; /* Regulator lead time constant (T). Typical Value 1. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (T). Typical Value 1. Default: nullptr */ - CIMPP::Seconds tg; /* Feedback time constant of inner loop field voltage regulator (T). Typical Value 1. Default: nullptr */ - CIMPP::Seconds tia; /* Feedback time constant (T). Typical Value = 3. Default: nullptr */ - CIMPP::ExcST7BUELselectorKind uelin; /* UEL input selector (UELin). Typical Value = noUELinput. Default: 0 */ - CIMPP::PU vmax; /* Maximum voltage reference signal (V). Typical Value = 1.1. Default: nullptr */ - CIMPP::PU vmin; /* Minimum voltage reference signal (V). Typical Value = 0.9. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (V). Typical Value = 5. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (V). Typical Value = -4.5. Default: nullptr */ + /** \brief High-value gate feedback gain (K). Typical Value 1. Default: nullptr */ + CIMPP::PU kh; + + /** \brief Voltage regulator integral gain (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU kia; + + /** \brief Low-value gate feedback gain (K). Typical Value 1. Default: nullptr */ + CIMPP::PU kl; + + /** \brief Voltage regulator proportional gain (K). Typical Value = 40. Default: nullptr */ + CIMPP::PU kpa; + + /** \brief OEL input selector (OELin). Typical Value = noOELinput. Default: 0 */ + CIMPP::ExcST7BOELselectorKind oelin; + + /** \brief Regulator lag time constant (T). Typical Value 1. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Regulator lead time constant (T). Typical Value 1. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Excitation control system stabilizer time constant (T). Typical Value 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Feedback time constant of inner loop field voltage regulator (T). Typical Value 1. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Feedback time constant (T). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds tia; + + /** \brief UEL input selector (UELin). Typical Value = noUELinput. Default: 0 */ + CIMPP::ExcST7BUELselectorKind uelin; + + /** \brief Maximum voltage reference signal (V). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU vmax; + + /** \brief Minimum voltage reference signal (V). Typical Value = 0.9. Default: nullptr */ + CIMPP::PU vmin; + + /** \brief Maximum voltage regulator output (V). Typical Value = 5. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (V). Typical Value = -4.5. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcOEX3T.cpp b/CGMES_2.4.15_27JAN2020/ExcOEX3T.cpp index a3bfdb7a7..3fc422d40 100644 --- a/CGMES_2.4.15_27JAN2020/ExcOEX3T.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcOEX3T.cpp @@ -8,30 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcOEX3T::ExcOEX3T() {}; -ExcOEX3T::~ExcOEX3T() {}; +ExcOEX3T::ExcOEX3T() {} +ExcOEX3T::~ExcOEX3T() {} static const std::list PossibleProfilesForClass = { @@ -76,259 +57,276 @@ ExcOEX3T::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcOEX3T_e1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_e1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_e2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_e2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_see1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_see1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->see1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_see2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_see2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->see2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcOEX3T_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e1; if (!buffer.str().empty()) @@ -342,7 +340,8 @@ bool get_ExcOEX3T_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e2; if (!buffer.str().empty()) @@ -356,7 +355,8 @@ bool get_ExcOEX3T_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -370,7 +370,8 @@ bool get_ExcOEX3T_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -384,7 +385,8 @@ bool get_ExcOEX3T_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -398,7 +400,8 @@ bool get_ExcOEX3T_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -412,7 +415,8 @@ bool get_ExcOEX3T_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -426,7 +430,8 @@ bool get_ExcOEX3T_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_see1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->see1; if (!buffer.str().empty()) @@ -440,7 +445,8 @@ bool get_ExcOEX3T_see1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcOEX3T_see2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->see2; if (!buffer.str().empty()) @@ -454,7 +460,8 @@ bool get_ExcOEX3T_see2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcOEX3T_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -468,7 +475,8 @@ bool get_ExcOEX3T_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -482,7 +490,8 @@ bool get_ExcOEX3T_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -496,7 +505,8 @@ bool get_ExcOEX3T_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -510,7 +520,8 @@ bool get_ExcOEX3T_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -524,7 +535,8 @@ bool get_ExcOEX3T_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -538,7 +550,8 @@ bool get_ExcOEX3T_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -552,7 +565,8 @@ bool get_ExcOEX3T_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -566,7 +580,8 @@ bool get_ExcOEX3T_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -580,7 +595,8 @@ bool get_ExcOEX3T_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcOEX3T_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -592,8 +608,6 @@ bool get_ExcOEX3T_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char ExcOEX3T::debugName[] = "ExcOEX3T"; const char* ExcOEX3T::debugString() const { @@ -602,30 +616,30 @@ const char* ExcOEX3T::debugString() const void ExcOEX3T::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcOEX3T"), &ExcOEX3T_factory)); + factory_map.emplace("cim:ExcOEX3T", &ExcOEX3T_factory); } void ExcOEX3T::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.e1"), &assign_ExcOEX3T_e1)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.e2"), &assign_ExcOEX3T_e2)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.ka"), &assign_ExcOEX3T_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.kc"), &assign_ExcOEX3T_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.kd"), &assign_ExcOEX3T_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.ke"), &assign_ExcOEX3T_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.kf"), &assign_ExcOEX3T_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.see1"), &assign_ExcOEX3T_see1)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.see2"), &assign_ExcOEX3T_see2)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.t1"), &assign_ExcOEX3T_t1)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.t2"), &assign_ExcOEX3T_t2)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.t3"), &assign_ExcOEX3T_t3)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.t4"), &assign_ExcOEX3T_t4)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.t5"), &assign_ExcOEX3T_t5)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.t6"), &assign_ExcOEX3T_t6)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.te"), &assign_ExcOEX3T_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.tf"), &assign_ExcOEX3T_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.vrmax"), &assign_ExcOEX3T_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.vrmin"), &assign_ExcOEX3T_vrmin)); + assign_map.emplace("cim:ExcOEX3T.e1", &assign_ExcOEX3T_e1); + assign_map.emplace("cim:ExcOEX3T.e2", &assign_ExcOEX3T_e2); + assign_map.emplace("cim:ExcOEX3T.ka", &assign_ExcOEX3T_ka); + assign_map.emplace("cim:ExcOEX3T.kc", &assign_ExcOEX3T_kc); + assign_map.emplace("cim:ExcOEX3T.kd", &assign_ExcOEX3T_kd); + assign_map.emplace("cim:ExcOEX3T.ke", &assign_ExcOEX3T_ke); + assign_map.emplace("cim:ExcOEX3T.kf", &assign_ExcOEX3T_kf); + assign_map.emplace("cim:ExcOEX3T.see1", &assign_ExcOEX3T_see1); + assign_map.emplace("cim:ExcOEX3T.see2", &assign_ExcOEX3T_see2); + assign_map.emplace("cim:ExcOEX3T.t1", &assign_ExcOEX3T_t1); + assign_map.emplace("cim:ExcOEX3T.t2", &assign_ExcOEX3T_t2); + assign_map.emplace("cim:ExcOEX3T.t3", &assign_ExcOEX3T_t3); + assign_map.emplace("cim:ExcOEX3T.t4", &assign_ExcOEX3T_t4); + assign_map.emplace("cim:ExcOEX3T.t5", &assign_ExcOEX3T_t5); + assign_map.emplace("cim:ExcOEX3T.t6", &assign_ExcOEX3T_t6); + assign_map.emplace("cim:ExcOEX3T.te", &assign_ExcOEX3T_te); + assign_map.emplace("cim:ExcOEX3T.tf", &assign_ExcOEX3T_tf); + assign_map.emplace("cim:ExcOEX3T.vrmax", &assign_ExcOEX3T_vrmax); + assign_map.emplace("cim:ExcOEX3T.vrmin", &assign_ExcOEX3T_vrmin); } void ExcOEX3T::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcOEX3T.hpp b/CGMES_2.4.15_27JAN2020/ExcOEX3T.hpp index 16ec9cd48..da7bc97eb 100644 --- a/CGMES_2.4.15_27JAN2020/ExcOEX3T.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcOEX3T.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE Type ST1 Excitation System with semi-continuous and acting terminal voltage limiter. - */ + /** \brief Modified IEEE Type ST1 Excitation System with semi-continuous and acting terminal voltage limiter. */ class ExcOEX3T : public ExcitationSystemDynamics { public: @@ -28,25 +26,62 @@ namespace CIMPP ExcOEX3T(); ~ExcOEX3T() override; - CIMPP::PU e1; /* Saturation parameter (E). Default: nullptr */ - CIMPP::PU e2; /* Saturation parameter (E). Default: nullptr */ - CIMPP::PU ka; /* Gain (K). Default: nullptr */ - CIMPP::PU kc; /* Gain (K). Default: nullptr */ - CIMPP::PU kd; /* Gain (K). Default: nullptr */ - CIMPP::PU ke; /* Gain (K). Default: nullptr */ - CIMPP::PU kf; /* Gain (K). Default: nullptr */ - CIMPP::PU see1; /* Saturation parameter (S(E)). Default: nullptr */ - CIMPP::PU see2; /* Saturation parameter (S(E)). Default: nullptr */ - CIMPP::Seconds t1; /* Time constant (T). Default: nullptr */ - CIMPP::Seconds t2; /* Time constant (T). Default: nullptr */ - CIMPP::Seconds t3; /* Time constant (T). Default: nullptr */ - CIMPP::Seconds t4; /* Time constant (T). Default: nullptr */ - CIMPP::Seconds t5; /* Time constant (T). Default: nullptr */ - CIMPP::Seconds t6; /* Time constant (T). Default: nullptr */ - CIMPP::Seconds te; /* Time constant (T). Default: nullptr */ - CIMPP::Seconds tf; /* Time constant (T). Default: nullptr */ - CIMPP::PU vrmax; /* Limiter (V). Default: nullptr */ - CIMPP::PU vrmin; /* Limiter (V). Default: nullptr */ + /** \brief Saturation parameter (E). Default: nullptr */ + CIMPP::PU e1; + + /** \brief Saturation parameter (E). Default: nullptr */ + CIMPP::PU e2; + + /** \brief Gain (K). Default: nullptr */ + CIMPP::PU ka; + + /** \brief Gain (K). Default: nullptr */ + CIMPP::PU kc; + + /** \brief Gain (K). Default: nullptr */ + CIMPP::PU kd; + + /** \brief Gain (K). Default: nullptr */ + CIMPP::PU ke; + + /** \brief Gain (K). Default: nullptr */ + CIMPP::PU kf; + + /** \brief Saturation parameter (S(E)). Default: nullptr */ + CIMPP::PU see1; + + /** \brief Saturation parameter (S(E)). Default: nullptr */ + CIMPP::PU see2; + + /** \brief Time constant (T). Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Time constant (T). Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Time constant (T). Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Time constant (T). Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant (T). Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Time constant (T). Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time constant (T). Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Time constant (T). Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Limiter (V). Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Limiter (V). Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcPIC.cpp b/CGMES_2.4.15_27JAN2020/ExcPIC.cpp index e4c81265d..dbace3479 100644 --- a/CGMES_2.4.15_27JAN2020/ExcPIC.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcPIC.cpp @@ -8,34 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcPIC::ExcPIC() {}; -ExcPIC::~ExcPIC() {}; +ExcPIC::ExcPIC() {} +ExcPIC::~ExcPIC() {} static const std::list PossibleProfilesForClass = { @@ -84,311 +61,332 @@ ExcPIC::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcPIC_e1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_e1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_e2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_e2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_efdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_efdmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_se1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_se1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_se2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_se2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_ta1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_ta1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_ta2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_ta2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_ta3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_ta3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_ta4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_ta4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_tf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_tf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_vr1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_vr1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vr1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_vr2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_vr2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vr2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcPIC_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e1; if (!buffer.str().empty()) @@ -402,7 +400,8 @@ bool get_ExcPIC_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e2; if (!buffer.str().empty()) @@ -416,7 +415,8 @@ bool get_ExcPIC_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmax; if (!buffer.str().empty()) @@ -430,7 +430,8 @@ bool get_ExcPIC_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcPIC_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmin; if (!buffer.str().empty()) @@ -444,7 +445,8 @@ bool get_ExcPIC_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcPIC_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -458,7 +460,8 @@ bool get_ExcPIC_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -472,7 +475,8 @@ bool get_ExcPIC_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -486,7 +490,8 @@ bool get_ExcPIC_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -500,7 +505,8 @@ bool get_ExcPIC_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -514,7 +520,8 @@ bool get_ExcPIC_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -528,7 +535,8 @@ bool get_ExcPIC_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se1; if (!buffer.str().empty()) @@ -542,7 +550,8 @@ bool get_ExcPIC_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se2; if (!buffer.str().empty()) @@ -556,7 +565,8 @@ bool get_ExcPIC_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_ta1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta1; if (!buffer.str().empty()) @@ -570,7 +580,8 @@ bool get_ExcPIC_ta1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_ta2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta2; if (!buffer.str().empty()) @@ -584,7 +595,8 @@ bool get_ExcPIC_ta2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_ta3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta3; if (!buffer.str().empty()) @@ -598,7 +610,8 @@ bool get_ExcPIC_ta3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_ta4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta4; if (!buffer.str().empty()) @@ -612,7 +625,8 @@ bool get_ExcPIC_ta4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -626,7 +640,8 @@ bool get_ExcPIC_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf1; if (!buffer.str().empty()) @@ -640,7 +655,8 @@ bool get_ExcPIC_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf2; if (!buffer.str().empty()) @@ -654,7 +670,8 @@ bool get_ExcPIC_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_vr1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vr1; if (!buffer.str().empty()) @@ -668,7 +685,8 @@ bool get_ExcPIC_vr1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_vr2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vr2; if (!buffer.str().empty()) @@ -682,7 +700,8 @@ bool get_ExcPIC_vr2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -696,7 +715,8 @@ bool get_ExcPIC_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcPIC_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -708,8 +728,6 @@ bool get_ExcPIC_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char ExcPIC::debugName[] = "ExcPIC"; const char* ExcPIC::debugString() const { @@ -718,34 +736,34 @@ const char* ExcPIC::debugString() const void ExcPIC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcPIC"), &ExcPIC_factory)); + factory_map.emplace("cim:ExcPIC", &ExcPIC_factory); } void ExcPIC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.e1"), &assign_ExcPIC_e1)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.e2"), &assign_ExcPIC_e2)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.efdmax"), &assign_ExcPIC_efdmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.efdmin"), &assign_ExcPIC_efdmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.ka"), &assign_ExcPIC_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.kc"), &assign_ExcPIC_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.ke"), &assign_ExcPIC_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.kf"), &assign_ExcPIC_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.ki"), &assign_ExcPIC_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.kp"), &assign_ExcPIC_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.se1"), &assign_ExcPIC_se1)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.se2"), &assign_ExcPIC_se2)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.ta1"), &assign_ExcPIC_ta1)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.ta2"), &assign_ExcPIC_ta2)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.ta3"), &assign_ExcPIC_ta3)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.ta4"), &assign_ExcPIC_ta4)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.te"), &assign_ExcPIC_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.tf1"), &assign_ExcPIC_tf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.tf2"), &assign_ExcPIC_tf2)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.vr1"), &assign_ExcPIC_vr1)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.vr2"), &assign_ExcPIC_vr2)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.vrmax"), &assign_ExcPIC_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.vrmin"), &assign_ExcPIC_vrmin)); + assign_map.emplace("cim:ExcPIC.e1", &assign_ExcPIC_e1); + assign_map.emplace("cim:ExcPIC.e2", &assign_ExcPIC_e2); + assign_map.emplace("cim:ExcPIC.efdmax", &assign_ExcPIC_efdmax); + assign_map.emplace("cim:ExcPIC.efdmin", &assign_ExcPIC_efdmin); + assign_map.emplace("cim:ExcPIC.ka", &assign_ExcPIC_ka); + assign_map.emplace("cim:ExcPIC.kc", &assign_ExcPIC_kc); + assign_map.emplace("cim:ExcPIC.ke", &assign_ExcPIC_ke); + assign_map.emplace("cim:ExcPIC.kf", &assign_ExcPIC_kf); + assign_map.emplace("cim:ExcPIC.ki", &assign_ExcPIC_ki); + assign_map.emplace("cim:ExcPIC.kp", &assign_ExcPIC_kp); + assign_map.emplace("cim:ExcPIC.se1", &assign_ExcPIC_se1); + assign_map.emplace("cim:ExcPIC.se2", &assign_ExcPIC_se2); + assign_map.emplace("cim:ExcPIC.ta1", &assign_ExcPIC_ta1); + assign_map.emplace("cim:ExcPIC.ta2", &assign_ExcPIC_ta2); + assign_map.emplace("cim:ExcPIC.ta3", &assign_ExcPIC_ta3); + assign_map.emplace("cim:ExcPIC.ta4", &assign_ExcPIC_ta4); + assign_map.emplace("cim:ExcPIC.te", &assign_ExcPIC_te); + assign_map.emplace("cim:ExcPIC.tf1", &assign_ExcPIC_tf1); + assign_map.emplace("cim:ExcPIC.tf2", &assign_ExcPIC_tf2); + assign_map.emplace("cim:ExcPIC.vr1", &assign_ExcPIC_vr1); + assign_map.emplace("cim:ExcPIC.vr2", &assign_ExcPIC_vr2); + assign_map.emplace("cim:ExcPIC.vrmax", &assign_ExcPIC_vrmax); + assign_map.emplace("cim:ExcPIC.vrmin", &assign_ExcPIC_vrmin); } void ExcPIC::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcPIC.hpp b/CGMES_2.4.15_27JAN2020/ExcPIC.hpp index f3937ed14..152d86aa7 100644 --- a/CGMES_2.4.15_27JAN2020/ExcPIC.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcPIC.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Proportional/Integral Regulator Excitation System Model. This model can be used to represent excitation systems with a proportional-integral (PI) voltage regulator controller. - */ + /** \brief Proportional/Integral Regulator Excitation System Model. This model can be used to represent excitation systems with a proportional-integral (PI) voltage regulator controller. */ class ExcPIC : public ExcitationSystemDynamics { public: @@ -28,29 +26,74 @@ namespace CIMPP ExcPIC(); ~ExcPIC() override; - CIMPP::PU e1; /* Field voltage value 1 (E1). Typical Value = 0. Default: nullptr */ - CIMPP::PU e2; /* Field voltage value 2 (E2). Typical Value = 0. Default: nullptr */ - CIMPP::PU efdmax; /* Exciter maximum limit (Efdmax). Typical Value = 8. Default: nullptr */ - CIMPP::PU efdmin; /* Exciter minimum limit (Efdmin). Typical Value = -0.87. Default: nullptr */ - CIMPP::PU ka; /* PI controller gain (Ka). Typical Value = 3.15. Default: nullptr */ - CIMPP::PU kc; /* Exciter regulation factor (Kc). Typical Value = 0.08. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant (Ke). Typical Value = 0. Default: nullptr */ - CIMPP::PU kf; /* Rate feedback gain (Kf). Typical Value = 0. Default: nullptr */ - CIMPP::PU ki; /* Current source gain (Ki). Typical Value = 0. Default: nullptr */ - CIMPP::PU kp; /* Potential source gain (Kp). Typical Value = 6.5. Default: nullptr */ - CIMPP::PU se1; /* Saturation factor at E1 (Se1). Typical Value = 0. Default: nullptr */ - CIMPP::PU se2; /* Saturation factor at E2 (Se2). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ta1; /* PI controller time constant (Ta1). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds ta2; /* Voltage regulator time constant (Ta2). Typical Value = 0.01. Default: nullptr */ - CIMPP::Seconds ta3; /* Lead time constant (Ta3). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ta4; /* Lag time constant (Ta4). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant (Te). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tf1; /* Rate feedback time constant (Tf1). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tf2; /* Rate feedback lag time constant (Tf2). Typical Value = 0. Default: nullptr */ - CIMPP::PU vr1; /* PI maximum limit (Vr1). Typical Value = 1. Default: nullptr */ - CIMPP::PU vr2; /* PI minimum limit (Vr2). Typical Value = -0.87. Default: nullptr */ - CIMPP::PU vrmax; /* Voltage regulator maximum limit (Vrmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmin; /* Voltage regulator minimum limit (Vrmin). Typical Value = -0.87. Default: nullptr */ + /** \brief Field voltage value 1 (E1). Typical Value = 0. Default: nullptr */ + CIMPP::PU e1; + + /** \brief Field voltage value 2 (E2). Typical Value = 0. Default: nullptr */ + CIMPP::PU e2; + + /** \brief Exciter maximum limit (Efdmax). Typical Value = 8. Default: nullptr */ + CIMPP::PU efdmax; + + /** \brief Exciter minimum limit (Efdmin). Typical Value = -0.87. Default: nullptr */ + CIMPP::PU efdmin; + + /** \brief PI controller gain (Ka). Typical Value = 3.15. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Exciter regulation factor (Kc). Typical Value = 0.08. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Exciter constant (Ke). Typical Value = 0. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Rate feedback gain (Kf). Typical Value = 0. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Current source gain (Ki). Typical Value = 0. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Potential source gain (Kp). Typical Value = 6.5. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Saturation factor at E1 (Se1). Typical Value = 0. Default: nullptr */ + CIMPP::PU se1; + + /** \brief Saturation factor at E2 (Se2). Typical Value = 0. Default: nullptr */ + CIMPP::PU se2; + + /** \brief PI controller time constant (Ta1). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds ta1; + + /** \brief Voltage regulator time constant (Ta2). Typical Value = 0.01. Default: nullptr */ + CIMPP::Seconds ta2; + + /** \brief Lead time constant (Ta3). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ta3; + + /** \brief Lag time constant (Ta4). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ta4; + + /** \brief Exciter time constant (Te). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Rate feedback time constant (Tf1). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tf1; + + /** \brief Rate feedback lag time constant (Tf2). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tf2; + + /** \brief PI maximum limit (Vr1). Typical Value = 1. Default: nullptr */ + CIMPP::PU vr1; + + /** \brief PI minimum limit (Vr2). Typical Value = -0.87. Default: nullptr */ + CIMPP::PU vr2; + + /** \brief Voltage regulator maximum limit (Vrmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Voltage regulator minimum limit (Vrmin). Typical Value = -0.87. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcREXS.cpp b/CGMES_2.4.15_27JAN2020/ExcREXS.cpp index 8e0575509..7c198209c 100644 --- a/CGMES_2.4.15_27JAN2020/ExcREXS.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcREXS.cpp @@ -8,47 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "ExcREXSFeedbackSignalKind.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcREXS::ExcREXS() {}; -ExcREXS::~ExcREXS() {}; +ExcREXS::ExcREXS() {} +ExcREXS::~ExcREXS() {} static const std::list PossibleProfilesForClass = { @@ -110,480 +74,514 @@ ExcREXS::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcREXS_e1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_e1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_e2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_e2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_fbf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_fbf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fbf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_flimf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_flimf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flimf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kefd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kefd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kefd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kii(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kii(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kii; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kip(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kip; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kvi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kvi(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kvi; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kvp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kvp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kvp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kvphz(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kvphz(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kvphz; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_nvphz(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_nvphz(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nvphz; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_se1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_se1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_se2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_se2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_tb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_tb1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_tb2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_tb2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_tc1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_tc1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_tc2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_tc2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_tf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_tf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_vcmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_vcmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vcmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_vfmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_vfmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_vfmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_vfmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_xc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_xc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcREXS_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e1; if (!buffer.str().empty()) @@ -597,7 +595,8 @@ bool get_ExcREXS_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e2; if (!buffer.str().empty()) @@ -609,9 +608,25 @@ bool get_ExcREXS_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } +bool get_ExcREXS_fbf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->fbf; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_ExcREXS_flimf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flimf; if (!buffer.str().empty()) @@ -625,7 +640,8 @@ bool get_ExcREXS_flimf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcREXS_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -639,7 +655,8 @@ bool get_ExcREXS_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -653,7 +670,8 @@ bool get_ExcREXS_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -667,7 +685,8 @@ bool get_ExcREXS_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_kefd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kefd; if (!buffer.str().empty()) @@ -681,7 +700,8 @@ bool get_ExcREXS_kefd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcREXS_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -695,7 +715,8 @@ bool get_ExcREXS_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh; if (!buffer.str().empty()) @@ -709,7 +730,8 @@ bool get_ExcREXS_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_kii(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kii; if (!buffer.str().empty()) @@ -723,7 +745,8 @@ bool get_ExcREXS_kii(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_kip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kip; if (!buffer.str().empty()) @@ -737,7 +760,8 @@ bool get_ExcREXS_kip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -751,7 +775,8 @@ bool get_ExcREXS_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_kvi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kvi; if (!buffer.str().empty()) @@ -765,7 +790,8 @@ bool get_ExcREXS_kvi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_kvp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kvp; if (!buffer.str().empty()) @@ -779,7 +805,8 @@ bool get_ExcREXS_kvp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_kvphz(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kvphz; if (!buffer.str().empty()) @@ -793,7 +820,8 @@ bool get_ExcREXS_kvphz(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcREXS_nvphz(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nvphz; if (!buffer.str().empty()) @@ -807,7 +835,8 @@ bool get_ExcREXS_nvphz(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcREXS_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se1; if (!buffer.str().empty()) @@ -821,7 +850,8 @@ bool get_ExcREXS_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se2; if (!buffer.str().empty()) @@ -835,7 +865,8 @@ bool get_ExcREXS_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -849,7 +880,8 @@ bool get_ExcREXS_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb1; if (!buffer.str().empty()) @@ -863,7 +895,8 @@ bool get_ExcREXS_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_tb2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb2; if (!buffer.str().empty()) @@ -877,7 +910,8 @@ bool get_ExcREXS_tb2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_tc1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc1; if (!buffer.str().empty()) @@ -891,7 +925,8 @@ bool get_ExcREXS_tc1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_tc2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc2; if (!buffer.str().empty()) @@ -905,7 +940,8 @@ bool get_ExcREXS_tc2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -919,7 +955,8 @@ bool get_ExcREXS_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -933,7 +970,8 @@ bool get_ExcREXS_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf1; if (!buffer.str().empty()) @@ -947,7 +985,8 @@ bool get_ExcREXS_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf2; if (!buffer.str().empty()) @@ -961,7 +1000,8 @@ bool get_ExcREXS_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -975,7 +1015,8 @@ bool get_ExcREXS_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_vcmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vcmax; if (!buffer.str().empty()) @@ -989,7 +1030,8 @@ bool get_ExcREXS_vcmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcREXS_vfmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfmax; if (!buffer.str().empty()) @@ -1003,7 +1045,8 @@ bool get_ExcREXS_vfmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcREXS_vfmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfmin; if (!buffer.str().empty()) @@ -1017,7 +1060,8 @@ bool get_ExcREXS_vfmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcREXS_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -1031,7 +1075,8 @@ bool get_ExcREXS_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcREXS_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -1045,7 +1090,8 @@ bool get_ExcREXS_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcREXS_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -1059,7 +1105,8 @@ bool get_ExcREXS_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcREXS_xc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xc; if (!buffer.str().empty()) @@ -1071,22 +1118,6 @@ bool get_ExcREXS_xc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - -bool get_ExcREXS_fbf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->fbf; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char ExcREXS::debugName[] = "ExcREXS"; const char* ExcREXS::debugString() const { @@ -1095,47 +1126,47 @@ const char* ExcREXS::debugString() const void ExcREXS::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcREXS"), &ExcREXS_factory)); + factory_map.emplace("cim:ExcREXS", &ExcREXS_factory); } void ExcREXS::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.e1"), &assign_ExcREXS_e1)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.e2"), &assign_ExcREXS_e2)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.fbf"), &assign_ExcREXS_fbf)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.flimf"), &assign_ExcREXS_flimf)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kc"), &assign_ExcREXS_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kd"), &assign_ExcREXS_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.ke"), &assign_ExcREXS_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kefd"), &assign_ExcREXS_kefd)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kf"), &assign_ExcREXS_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kh"), &assign_ExcREXS_kh)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kii"), &assign_ExcREXS_kii)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kip"), &assign_ExcREXS_kip)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.ks"), &assign_ExcREXS_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kvi"), &assign_ExcREXS_kvi)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kvp"), &assign_ExcREXS_kvp)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kvphz"), &assign_ExcREXS_kvphz)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.nvphz"), &assign_ExcREXS_nvphz)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.se1"), &assign_ExcREXS_se1)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.se2"), &assign_ExcREXS_se2)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.ta"), &assign_ExcREXS_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.tb1"), &assign_ExcREXS_tb1)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.tb2"), &assign_ExcREXS_tb2)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.tc1"), &assign_ExcREXS_tc1)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.tc2"), &assign_ExcREXS_tc2)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.te"), &assign_ExcREXS_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.tf"), &assign_ExcREXS_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.tf1"), &assign_ExcREXS_tf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.tf2"), &assign_ExcREXS_tf2)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.tp"), &assign_ExcREXS_tp)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.vcmax"), &assign_ExcREXS_vcmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.vfmax"), &assign_ExcREXS_vfmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.vfmin"), &assign_ExcREXS_vfmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.vimax"), &assign_ExcREXS_vimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.vrmax"), &assign_ExcREXS_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.vrmin"), &assign_ExcREXS_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.xc"), &assign_ExcREXS_xc)); + assign_map.emplace("cim:ExcREXS.e1", &assign_ExcREXS_e1); + assign_map.emplace("cim:ExcREXS.e2", &assign_ExcREXS_e2); + assign_map.emplace("cim:ExcREXS.fbf", &assign_ExcREXS_fbf); + assign_map.emplace("cim:ExcREXS.flimf", &assign_ExcREXS_flimf); + assign_map.emplace("cim:ExcREXS.kc", &assign_ExcREXS_kc); + assign_map.emplace("cim:ExcREXS.kd", &assign_ExcREXS_kd); + assign_map.emplace("cim:ExcREXS.ke", &assign_ExcREXS_ke); + assign_map.emplace("cim:ExcREXS.kefd", &assign_ExcREXS_kefd); + assign_map.emplace("cim:ExcREXS.kf", &assign_ExcREXS_kf); + assign_map.emplace("cim:ExcREXS.kh", &assign_ExcREXS_kh); + assign_map.emplace("cim:ExcREXS.kii", &assign_ExcREXS_kii); + assign_map.emplace("cim:ExcREXS.kip", &assign_ExcREXS_kip); + assign_map.emplace("cim:ExcREXS.ks", &assign_ExcREXS_ks); + assign_map.emplace("cim:ExcREXS.kvi", &assign_ExcREXS_kvi); + assign_map.emplace("cim:ExcREXS.kvp", &assign_ExcREXS_kvp); + assign_map.emplace("cim:ExcREXS.kvphz", &assign_ExcREXS_kvphz); + assign_map.emplace("cim:ExcREXS.nvphz", &assign_ExcREXS_nvphz); + assign_map.emplace("cim:ExcREXS.se1", &assign_ExcREXS_se1); + assign_map.emplace("cim:ExcREXS.se2", &assign_ExcREXS_se2); + assign_map.emplace("cim:ExcREXS.ta", &assign_ExcREXS_ta); + assign_map.emplace("cim:ExcREXS.tb1", &assign_ExcREXS_tb1); + assign_map.emplace("cim:ExcREXS.tb2", &assign_ExcREXS_tb2); + assign_map.emplace("cim:ExcREXS.tc1", &assign_ExcREXS_tc1); + assign_map.emplace("cim:ExcREXS.tc2", &assign_ExcREXS_tc2); + assign_map.emplace("cim:ExcREXS.te", &assign_ExcREXS_te); + assign_map.emplace("cim:ExcREXS.tf", &assign_ExcREXS_tf); + assign_map.emplace("cim:ExcREXS.tf1", &assign_ExcREXS_tf1); + assign_map.emplace("cim:ExcREXS.tf2", &assign_ExcREXS_tf2); + assign_map.emplace("cim:ExcREXS.tp", &assign_ExcREXS_tp); + assign_map.emplace("cim:ExcREXS.vcmax", &assign_ExcREXS_vcmax); + assign_map.emplace("cim:ExcREXS.vfmax", &assign_ExcREXS_vfmax); + assign_map.emplace("cim:ExcREXS.vfmin", &assign_ExcREXS_vfmin); + assign_map.emplace("cim:ExcREXS.vimax", &assign_ExcREXS_vimax); + assign_map.emplace("cim:ExcREXS.vrmax", &assign_ExcREXS_vrmax); + assign_map.emplace("cim:ExcREXS.vrmin", &assign_ExcREXS_vrmin); + assign_map.emplace("cim:ExcREXS.xc", &assign_ExcREXS_xc); } void ExcREXS::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcREXS.hpp b/CGMES_2.4.15_27JAN2020/ExcREXS.hpp index 4d9138e12..18cd27ace 100644 --- a/CGMES_2.4.15_27JAN2020/ExcREXS.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcREXS.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - General Purpose Rotating Excitation System Model. This model can be used to represent a wide range of excitation systems whose DC power source is an AC or DC generator. It encompasses IEEE type AC1, AC2, DC1, and DC2 excitation system models. - */ + /** \brief General Purpose Rotating Excitation System Model. This model can be used to represent a wide range of excitation systems whose DC power source is an AC or DC generator. It encompasses IEEE type AC1, AC2, DC1, and DC2 excitation system models. */ class ExcREXS : public ExcitationSystemDynamics { public: @@ -29,42 +27,113 @@ namespace CIMPP ExcREXS(); ~ExcREXS() override; - CIMPP::PU e1; /* Field voltage value 1 (E1). Typical Value = 3. Default: nullptr */ - CIMPP::PU e2; /* Field voltage value 2 (E2). Typical Value = 4. Default: nullptr */ - CIMPP::ExcREXSFeedbackSignalKind fbf; /* Rate feedback signal flag (Fbf). Typical Value = fieldCurrent. Default: 0 */ - CIMPP::PU flimf; /* Limit type flag (Flimf). Typical Value = 0. Default: nullptr */ - CIMPP::PU kc; /* Rectifier regulation factor (Kc). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU kd; /* Exciter regulation factor (Kd). Typical Value = 2. Default: nullptr */ - CIMPP::PU ke; /* Exciter field proportional constant (Ke). Typical Value = 1. Default: nullptr */ - CIMPP::PU kefd; /* Field voltage feedback gain (Kefd). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds kf; /* Rate feedback gain (Kf). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU kh; /* Field voltage controller feedback gain (Kh). Typical Value = 0. Default: nullptr */ - CIMPP::PU kii; /* Field Current Regulator Integral Gain (Kii). Typical Value = 0. Default: nullptr */ - CIMPP::PU kip; /* Field Current Regulator Proportional Gain (Kip). Typical Value = 1. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ - CIMPP::PU kvi; /* Voltage Regulator Integral Gain (Kvi). Typical Value = 0. Default: nullptr */ - CIMPP::PU kvp; /* Voltage Regulator Proportional Gain (Kvp). Typical Value = 2800. Default: nullptr */ - CIMPP::PU kvphz; /* V/Hz limiter gain (Kvphz). Typical Value = 0. Default: nullptr */ - CIMPP::PU nvphz; /* Pickup speed of V/Hz limiter (Nvphz). Typical Value = 0. Default: nullptr */ - CIMPP::PU se1; /* Saturation factor at E1 (Se1). Typical Value = 0.0001. Default: nullptr */ - CIMPP::PU se2; /* Saturation factor at E2 (Se2). Typical Value = 0.001. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage Regulator time constant (Ta). Typical Value = 0.01. Default: nullptr */ - CIMPP::Seconds tb1; /* Lag time constant (Tb1). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tb2; /* Lag time constant (Tb2). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc1; /* Lead time constant (Tc1). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc2; /* Lead time constant (Tc2). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter field time constant (Te). Typical Value = 1.2. Default: nullptr */ - CIMPP::Seconds tf; /* Rate feedback time constant (Tf). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tf1; /* Feedback lead time constant (Tf1). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tf2; /* Feedback lag time constant (Tf2). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tp; /* Field current Bridge time constant (Tp). Typical Value = 0. Default: nullptr */ - CIMPP::PU vcmax; /* Maximum compounding voltage (Vcmax). Typical Value = 0. Default: nullptr */ - CIMPP::PU vfmax; /* Maximum Exciter Field Current (Vfmax). Typical Value = 47. Default: nullptr */ - CIMPP::PU vfmin; /* Minimum Exciter Field Current (Vfmin). Typical Value = -20. Default: nullptr */ - CIMPP::PU vimax; /* Voltage Regulator Input Limit (Vimax). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum controller output (Vrmax). Typical Value = 47. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum controller output (Vrmin). Typical Value = -20. Default: nullptr */ - CIMPP::PU xc; /* Exciter compounding reactance (Xc). Typical Value = 0. Default: nullptr */ + /** \brief Field voltage value 1 (E1). Typical Value = 3. Default: nullptr */ + CIMPP::PU e1; + + /** \brief Field voltage value 2 (E2). Typical Value = 4. Default: nullptr */ + CIMPP::PU e2; + + /** \brief Rate feedback signal flag (Fbf). Typical Value = fieldCurrent. Default: 0 */ + CIMPP::ExcREXSFeedbackSignalKind fbf; + + /** \brief Limit type flag (Flimf). Typical Value = 0. Default: nullptr */ + CIMPP::PU flimf; + + /** \brief Rectifier regulation factor (Kc). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Exciter regulation factor (Kd). Typical Value = 2. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter field proportional constant (Ke). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Field voltage feedback gain (Kefd). Typical Value = 0. Default: nullptr */ + CIMPP::PU kefd; + + /** \brief Rate feedback gain (Kf). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds kf; + + /** \brief Field voltage controller feedback gain (Kh). Typical Value = 0. Default: nullptr */ + CIMPP::PU kh; + + /** \brief Field Current Regulator Integral Gain (Kii). Typical Value = 0. Default: nullptr */ + CIMPP::PU kii; + + /** \brief Field Current Regulator Proportional Gain (Kip). Typical Value = 1. Default: nullptr */ + CIMPP::PU kip; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Voltage Regulator Integral Gain (Kvi). Typical Value = 0. Default: nullptr */ + CIMPP::PU kvi; + + /** \brief Voltage Regulator Proportional Gain (Kvp). Typical Value = 2800. Default: nullptr */ + CIMPP::PU kvp; + + /** \brief V/Hz limiter gain (Kvphz). Typical Value = 0. Default: nullptr */ + CIMPP::PU kvphz; + + /** \brief Pickup speed of V/Hz limiter (Nvphz). Typical Value = 0. Default: nullptr */ + CIMPP::PU nvphz; + + /** \brief Saturation factor at E1 (Se1). Typical Value = 0.0001. Default: nullptr */ + CIMPP::PU se1; + + /** \brief Saturation factor at E2 (Se2). Typical Value = 0.001. Default: nullptr */ + CIMPP::PU se2; + + /** \brief Voltage Regulator time constant (Ta). Typical Value = 0.01. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Lag time constant (Tb1). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb1; + + /** \brief Lag time constant (Tb2). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb2; + + /** \brief Lead time constant (Tc1). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc1; + + /** \brief Lead time constant (Tc2). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc2; + + /** \brief Exciter field time constant (Te). Typical Value = 1.2. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Rate feedback time constant (Tf). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Feedback lead time constant (Tf1). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tf1; + + /** \brief Feedback lag time constant (Tf2). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tf2; + + /** \brief Field current Bridge time constant (Tp). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Maximum compounding voltage (Vcmax). Typical Value = 0. Default: nullptr */ + CIMPP::PU vcmax; + + /** \brief Maximum Exciter Field Current (Vfmax). Typical Value = 47. Default: nullptr */ + CIMPP::PU vfmax; + + /** \brief Minimum Exciter Field Current (Vfmin). Typical Value = -20. Default: nullptr */ + CIMPP::PU vfmin; + + /** \brief Voltage Regulator Input Limit (Vimax). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Maximum controller output (Vrmax). Typical Value = 47. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum controller output (Vrmin). Typical Value = -20. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief Exciter compounding reactance (Xc). Typical Value = 0. Default: nullptr */ + CIMPP::PU xc; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcREXSFeedbackSignalKind.cpp b/CGMES_2.4.15_27JAN2020/ExcREXSFeedbackSignalKind.cpp index de55c6691..e05a1487d 100644 --- a/CGMES_2.4.15_27JAN2020/ExcREXSFeedbackSignalKind.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcREXSFeedbackSignalKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "ExcREXSFeedbackSignalKind") + if (EnumSymbol.substr(0, pos) != "ExcREXSFeedbackSignalKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "fieldVoltage") + if (EnumSymbol == "fieldVoltage") { rop = ExcREXSFeedbackSignalKind::fieldVoltage; return lop; } - if(EnumSymbol == "fieldCurrent") + if (EnumSymbol == "fieldCurrent") { rop = ExcREXSFeedbackSignalKind::fieldCurrent; return lop; } - if(EnumSymbol == "outputVoltage") + if (EnumSymbol == "outputVoltage") { rop = ExcREXSFeedbackSignalKind::outputVoltage; return lop; diff --git a/CGMES_2.4.15_27JAN2020/ExcREXSFeedbackSignalKind.hpp b/CGMES_2.4.15_27JAN2020/ExcREXSFeedbackSignalKind.hpp index 2ca199680..37cf82ab7 100644 --- a/CGMES_2.4.15_27JAN2020/ExcREXSFeedbackSignalKind.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcREXSFeedbackSignalKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of rate feedback signals. - */ + /** \brief Type of rate feedback signals. */ class ExcREXSFeedbackSignalKind { public: enum ExcREXSFeedbackSignalKind_ENUM { - /** - * The voltage regulator output voltage is used. It is the same as exciter field voltage. - */ + /** The voltage regulator output voltage is used. It is the same as exciter field voltage. */ fieldVoltage, - /** - * The exciter field current is used. - */ + /** The exciter field current is used. */ fieldCurrent, - /** - * The output voltage of the exciter is used. - */ + /** The output voltage of the exciter is used. */ outputVoltage, }; diff --git a/CGMES_2.4.15_27JAN2020/ExcSCRX.cpp b/CGMES_2.4.15_27JAN2020/ExcSCRX.cpp index 309ab1b3d..be7b304c3 100644 --- a/CGMES_2.4.15_27JAN2020/ExcSCRX.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcSCRX.cpp @@ -8,19 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -ExcSCRX::ExcSCRX() {}; -ExcSCRX::~ExcSCRX() {}; +ExcSCRX::ExcSCRX() {} +ExcSCRX::~ExcSCRX() {} static const std::list PossibleProfilesForClass = { @@ -54,116 +46,122 @@ ExcSCRX::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcSCRX_cswitch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSCRX_cswitch(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->cswitch; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSCRX_emax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSCRX_emax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->emax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSCRX_emin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSCRX_emin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->emin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSCRX_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSCRX_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSCRX_rcrfd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSCRX_rcrfd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rcrfd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSCRX_tatb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSCRX_tatb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tatb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSCRX_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSCRX_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSCRX_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSCRX_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcSCRX_cswitch(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + const ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->cswitch; if (!buffer.str().empty()) @@ -177,7 +175,8 @@ bool get_ExcSCRX_cswitch(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcSCRX_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + const ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->emax; if (!buffer.str().empty()) @@ -191,7 +190,8 @@ bool get_ExcSCRX_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcSCRX_emin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + const ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->emin; if (!buffer.str().empty()) @@ -205,7 +205,8 @@ bool get_ExcSCRX_emin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcSCRX_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + const ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -219,7 +220,8 @@ bool get_ExcSCRX_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSCRX_rcrfd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + const ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rcrfd; if (!buffer.str().empty()) @@ -233,7 +235,8 @@ bool get_ExcSCRX_rcrfd(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcSCRX_tatb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + const ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tatb; if (!buffer.str().empty()) @@ -247,7 +250,8 @@ bool get_ExcSCRX_tatb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcSCRX_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + const ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -261,7 +265,8 @@ bool get_ExcSCRX_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSCRX_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + const ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -273,8 +278,6 @@ bool get_ExcSCRX_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcSCRX::debugName[] = "ExcSCRX"; const char* ExcSCRX::debugString() const { @@ -283,19 +286,19 @@ const char* ExcSCRX::debugString() const void ExcSCRX::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcSCRX"), &ExcSCRX_factory)); + factory_map.emplace("cim:ExcSCRX", &ExcSCRX_factory); } void ExcSCRX::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcSCRX.cswitch"), &assign_ExcSCRX_cswitch)); - assign_map.insert(std::make_pair(std::string("cim:ExcSCRX.emax"), &assign_ExcSCRX_emax)); - assign_map.insert(std::make_pair(std::string("cim:ExcSCRX.emin"), &assign_ExcSCRX_emin)); - assign_map.insert(std::make_pair(std::string("cim:ExcSCRX.k"), &assign_ExcSCRX_k)); - assign_map.insert(std::make_pair(std::string("cim:ExcSCRX.rcrfd"), &assign_ExcSCRX_rcrfd)); - assign_map.insert(std::make_pair(std::string("cim:ExcSCRX.tatb"), &assign_ExcSCRX_tatb)); - assign_map.insert(std::make_pair(std::string("cim:ExcSCRX.tb"), &assign_ExcSCRX_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcSCRX.te"), &assign_ExcSCRX_te)); + assign_map.emplace("cim:ExcSCRX.cswitch", &assign_ExcSCRX_cswitch); + assign_map.emplace("cim:ExcSCRX.emax", &assign_ExcSCRX_emax); + assign_map.emplace("cim:ExcSCRX.emin", &assign_ExcSCRX_emin); + assign_map.emplace("cim:ExcSCRX.k", &assign_ExcSCRX_k); + assign_map.emplace("cim:ExcSCRX.rcrfd", &assign_ExcSCRX_rcrfd); + assign_map.emplace("cim:ExcSCRX.tatb", &assign_ExcSCRX_tatb); + assign_map.emplace("cim:ExcSCRX.tb", &assign_ExcSCRX_tb); + assign_map.emplace("cim:ExcSCRX.te", &assign_ExcSCRX_te); } void ExcSCRX::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcSCRX.hpp b/CGMES_2.4.15_27JAN2020/ExcSCRX.hpp index b99bbc5b2..5bf3e69b6 100644 --- a/CGMES_2.4.15_27JAN2020/ExcSCRX.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcSCRX.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Simple excitation system model representing generic characteristics of many excitation systems; intended for use where negative field current may be a problem. - */ + /** \brief Simple excitation system model representing generic characteristics of many excitation systems; intended for use where negative field current may be a problem. */ class ExcSCRX : public ExcitationSystemDynamics { public: @@ -30,14 +28,29 @@ namespace CIMPP ExcSCRX(); ~ExcSCRX() override; - CIMPP::Boolean cswitch; /* Power source switch (Cswitch). true = fixed voltage of 1.0 PU false = generator terminal voltage. Default: false */ - CIMPP::PU emax; /* Maximum field voltage output (Emax). Typical Value = 5. Default: nullptr */ - CIMPP::PU emin; /* Minimum field voltage output (Emin). Typical Value = 0. Default: nullptr */ - CIMPP::PU k; /* Gain (K) (>0). Typical Value = 200. Default: nullptr */ - CIMPP::Simple_Float rcrfd; /* Rc/Rfd - ratio of field discharge resistance to field winding resistance (RcRfd). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float tatb; /* Ta/Tb - gain reduction ratio of lag-lead element (TaTb). The parameter Ta is not defined explicitly. Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tb; /* Denominator time constant of lag-lead block (Tb). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds te; /* Time constant of gain block (Te) (>0). Typical Value = 0.02. Default: nullptr */ + /** \brief Power source switch (Cswitch). true = fixed voltage of 1.0 PU false = generator terminal voltage. Default: false */ + CIMPP::Boolean cswitch; + + /** \brief Maximum field voltage output (Emax). Typical Value = 5. Default: nullptr */ + CIMPP::PU emax; + + /** \brief Minimum field voltage output (Emin). Typical Value = 0. Default: nullptr */ + CIMPP::PU emin; + + /** \brief Gain (K) (>0). Typical Value = 200. Default: nullptr */ + CIMPP::PU k; + + /** \brief Rc/Rfd - ratio of field discharge resistance to field winding resistance (RcRfd). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float rcrfd; + + /** \brief Ta/Tb - gain reduction ratio of lag-lead element (TaTb). The parameter Ta is not defined explicitly. Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float tatb; + + /** \brief Denominator time constant of lag-lead block (Tb). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Time constant of gain block (Te) (>0). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds te; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcSEXS.cpp b/CGMES_2.4.15_27JAN2020/ExcSEXS.cpp index 2f9d7141a..e78222ab6 100644 --- a/CGMES_2.4.15_27JAN2020/ExcSEXS.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcSEXS.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -ExcSEXS::ExcSEXS() {}; -ExcSEXS::~ExcSEXS() {}; +ExcSEXS::ExcSEXS() {} +ExcSEXS::~ExcSEXS() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ ExcSEXS::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcSEXS_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_efdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSEXS_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_efdmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSEXS_emax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_emax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->emax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSEXS_emin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_emin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->emin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSEXS_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSEXS_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSEXS_tatb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_tatb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tatb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSEXS_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSEXS_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSEXS_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcSEXS_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmax; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_ExcSEXS_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcSEXS_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmin; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_ExcSEXS_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcSEXS_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->emax; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_ExcSEXS_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcSEXS_emin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->emin; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_ExcSEXS_emin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcSEXS_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_ExcSEXS_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSEXS_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_ExcSEXS_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSEXS_tatb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tatb; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_ExcSEXS_tatb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcSEXS_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_ExcSEXS_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSEXS_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_ExcSEXS_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSEXS_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_ExcSEXS_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcSEXS::debugName[] = "ExcSEXS"; const char* ExcSEXS::debugString() const { @@ -341,21 +346,21 @@ const char* ExcSEXS::debugString() const void ExcSEXS::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcSEXS"), &ExcSEXS_factory)); + factory_map.emplace("cim:ExcSEXS", &ExcSEXS_factory); } void ExcSEXS::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.efdmax"), &assign_ExcSEXS_efdmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.efdmin"), &assign_ExcSEXS_efdmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.emax"), &assign_ExcSEXS_emax)); - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.emin"), &assign_ExcSEXS_emin)); - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.k"), &assign_ExcSEXS_k)); - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.kc"), &assign_ExcSEXS_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.tatb"), &assign_ExcSEXS_tatb)); - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.tb"), &assign_ExcSEXS_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.tc"), &assign_ExcSEXS_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.te"), &assign_ExcSEXS_te)); + assign_map.emplace("cim:ExcSEXS.efdmax", &assign_ExcSEXS_efdmax); + assign_map.emplace("cim:ExcSEXS.efdmin", &assign_ExcSEXS_efdmin); + assign_map.emplace("cim:ExcSEXS.emax", &assign_ExcSEXS_emax); + assign_map.emplace("cim:ExcSEXS.emin", &assign_ExcSEXS_emin); + assign_map.emplace("cim:ExcSEXS.k", &assign_ExcSEXS_k); + assign_map.emplace("cim:ExcSEXS.kc", &assign_ExcSEXS_kc); + assign_map.emplace("cim:ExcSEXS.tatb", &assign_ExcSEXS_tatb); + assign_map.emplace("cim:ExcSEXS.tb", &assign_ExcSEXS_tb); + assign_map.emplace("cim:ExcSEXS.tc", &assign_ExcSEXS_tc); + assign_map.emplace("cim:ExcSEXS.te", &assign_ExcSEXS_te); } void ExcSEXS::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcSEXS.hpp b/CGMES_2.4.15_27JAN2020/ExcSEXS.hpp index fa02fc7ce..2b957eb4e 100644 --- a/CGMES_2.4.15_27JAN2020/ExcSEXS.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcSEXS.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Simplified Excitation System Model. - */ + /** \brief Simplified Excitation System Model. */ class ExcSEXS : public ExcitationSystemDynamics { public: @@ -29,16 +27,35 @@ namespace CIMPP ExcSEXS(); ~ExcSEXS() override; - CIMPP::PU efdmax; /* Field voltage clipping maximum limit (Efdmax). Typical Value = 5. Default: nullptr */ - CIMPP::PU efdmin; /* Field voltage clipping minimum limit (Efdmin). Typical Value = -5. Default: nullptr */ - CIMPP::PU emax; /* Maximum field voltage output (Emax). Typical Value = 5. Default: nullptr */ - CIMPP::PU emin; /* Minimum field voltage output (Emin). Typical Value = -5. Default: nullptr */ - CIMPP::PU k; /* Gain (K) (>0). Typical Value = 100. Default: nullptr */ - CIMPP::PU kc; /* PI controller gain (Kc). Typical Value = 0.08. Default: nullptr */ - CIMPP::Simple_Float tatb; /* Ta/Tb - gain reduction ratio of lag-lead element (TaTb). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tb; /* Denominator time constant of lag-lead block (Tb). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds tc; /* PI controller phase lead time constant (Tc). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Time constant of gain block (Te). Typical Value = 0.05. Default: nullptr */ + /** \brief Field voltage clipping maximum limit (Efdmax). Typical Value = 5. Default: nullptr */ + CIMPP::PU efdmax; + + /** \brief Field voltage clipping minimum limit (Efdmin). Typical Value = -5. Default: nullptr */ + CIMPP::PU efdmin; + + /** \brief Maximum field voltage output (Emax). Typical Value = 5. Default: nullptr */ + CIMPP::PU emax; + + /** \brief Minimum field voltage output (Emin). Typical Value = -5. Default: nullptr */ + CIMPP::PU emin; + + /** \brief Gain (K) (>0). Typical Value = 100. Default: nullptr */ + CIMPP::PU k; + + /** \brief PI controller gain (Kc). Typical Value = 0.08. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Ta/Tb - gain reduction ratio of lag-lead element (TaTb). Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float tatb; + + /** \brief Denominator time constant of lag-lead block (Tb). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief PI controller phase lead time constant (Tc). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Time constant of gain block (Te). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds te; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcSK.cpp b/CGMES_2.4.15_27JAN2020/ExcSK.cpp index cb3427545..0c8d97812 100644 --- a/CGMES_2.4.15_27JAN2020/ExcSK.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcSK.cpp @@ -8,43 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "ApparentPower.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcSK::ExcSK() {}; -ExcSK::~ExcSK() {}; +ExcSK::ExcSK() {} +ExcSK::~ExcSK() {} static const std::list PossibleProfilesForClass = { @@ -102,428 +70,458 @@ ExcSK::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcSK_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_efdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_efdmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_emax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_emax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->emax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_emin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_emin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->emin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_kce(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_kce(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kce; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_kgob(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_kgob(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kgob; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_kqi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_kqi(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kqi; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_kqob(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_kqob(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kqob; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_kqp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_kqp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kqp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_nq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_nq(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nq; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_qconoff(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_qconoff(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qconoff; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_qz(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_qz(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qz; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_remote(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_remote(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->remote; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_sbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_sbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->sbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_ti(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_ti(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_uimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_uimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_uimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_uimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_urmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_urmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->urmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_urmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_urmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->urmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_vtmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_vtmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vtmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_vtmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_vtmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vtmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_yp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_yp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->yp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcSK_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmax; if (!buffer.str().empty()) @@ -537,7 +535,8 @@ bool get_ExcSK_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcSK_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmin; if (!buffer.str().empty()) @@ -551,7 +550,8 @@ bool get_ExcSK_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcSK_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->emax; if (!buffer.str().empty()) @@ -565,7 +565,8 @@ bool get_ExcSK_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_emin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->emin; if (!buffer.str().empty()) @@ -579,7 +580,8 @@ bool get_ExcSK_emin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -593,7 +595,8 @@ bool get_ExcSK_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -607,7 +610,8 @@ bool get_ExcSK_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -621,7 +625,8 @@ bool get_ExcSK_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -635,7 +640,8 @@ bool get_ExcSK_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_kce(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kce; if (!buffer.str().empty()) @@ -649,7 +655,8 @@ bool get_ExcSK_kce(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -663,7 +670,8 @@ bool get_ExcSK_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_kgob(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kgob; if (!buffer.str().empty()) @@ -677,7 +685,8 @@ bool get_ExcSK_kgob(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -691,7 +700,8 @@ bool get_ExcSK_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_kqi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kqi; if (!buffer.str().empty()) @@ -705,7 +715,8 @@ bool get_ExcSK_kqi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_kqob(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kqob; if (!buffer.str().empty()) @@ -719,7 +730,8 @@ bool get_ExcSK_kqob(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_kqp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kqp; if (!buffer.str().empty()) @@ -733,7 +745,8 @@ bool get_ExcSK_kqp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_nq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nq; if (!buffer.str().empty()) @@ -747,7 +760,8 @@ bool get_ExcSK_nq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_qconoff(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qconoff; if (!buffer.str().empty()) @@ -761,7 +775,8 @@ bool get_ExcSK_qconoff(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcSK_qz(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qz; if (!buffer.str().empty()) @@ -775,7 +790,8 @@ bool get_ExcSK_qz(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_remote(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->remote; if (!buffer.str().empty()) @@ -789,7 +805,8 @@ bool get_ExcSK_remote(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcSK_sbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->sbase; if (!buffer.str().empty()) @@ -803,7 +820,8 @@ bool get_ExcSK_sbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -817,7 +835,8 @@ bool get_ExcSK_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -831,7 +850,8 @@ bool get_ExcSK_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_ti(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti; if (!buffer.str().empty()) @@ -845,7 +865,8 @@ bool get_ExcSK_ti(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -859,7 +880,8 @@ bool get_ExcSK_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -873,7 +895,8 @@ bool get_ExcSK_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_uimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uimax; if (!buffer.str().empty()) @@ -887,7 +910,8 @@ bool get_ExcSK_uimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_uimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uimin; if (!buffer.str().empty()) @@ -901,7 +925,8 @@ bool get_ExcSK_uimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_urmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->urmax; if (!buffer.str().empty()) @@ -915,7 +940,8 @@ bool get_ExcSK_urmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_urmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->urmin; if (!buffer.str().empty()) @@ -929,7 +955,8 @@ bool get_ExcSK_urmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_vtmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vtmax; if (!buffer.str().empty()) @@ -943,7 +970,8 @@ bool get_ExcSK_vtmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_vtmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vtmin; if (!buffer.str().empty()) @@ -957,7 +985,8 @@ bool get_ExcSK_vtmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_yp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->yp; if (!buffer.str().empty()) @@ -969,8 +998,6 @@ bool get_ExcSK_yp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcSK::debugName[] = "ExcSK"; const char* ExcSK::debugString() const { @@ -979,43 +1006,43 @@ const char* ExcSK::debugString() const void ExcSK::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcSK"), &ExcSK_factory)); + factory_map.emplace("cim:ExcSK", &ExcSK_factory); } void ExcSK::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcSK.efdmax"), &assign_ExcSK_efdmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.efdmin"), &assign_ExcSK_efdmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.emax"), &assign_ExcSK_emax)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.emin"), &assign_ExcSK_emin)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.k"), &assign_ExcSK_k)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.k1"), &assign_ExcSK_k1)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.k2"), &assign_ExcSK_k2)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.kc"), &assign_ExcSK_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.kce"), &assign_ExcSK_kce)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.kd"), &assign_ExcSK_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.kgob"), &assign_ExcSK_kgob)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.kp"), &assign_ExcSK_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.kqi"), &assign_ExcSK_kqi)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.kqob"), &assign_ExcSK_kqob)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.kqp"), &assign_ExcSK_kqp)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.nq"), &assign_ExcSK_nq)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.qconoff"), &assign_ExcSK_qconoff)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.qz"), &assign_ExcSK_qz)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.remote"), &assign_ExcSK_remote)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.sbase"), &assign_ExcSK_sbase)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.tc"), &assign_ExcSK_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.te"), &assign_ExcSK_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.ti"), &assign_ExcSK_ti)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.tp"), &assign_ExcSK_tp)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.tr"), &assign_ExcSK_tr)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.uimax"), &assign_ExcSK_uimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.uimin"), &assign_ExcSK_uimin)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.urmax"), &assign_ExcSK_urmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.urmin"), &assign_ExcSK_urmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.vtmax"), &assign_ExcSK_vtmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.vtmin"), &assign_ExcSK_vtmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.yp"), &assign_ExcSK_yp)); + assign_map.emplace("cim:ExcSK.efdmax", &assign_ExcSK_efdmax); + assign_map.emplace("cim:ExcSK.efdmin", &assign_ExcSK_efdmin); + assign_map.emplace("cim:ExcSK.emax", &assign_ExcSK_emax); + assign_map.emplace("cim:ExcSK.emin", &assign_ExcSK_emin); + assign_map.emplace("cim:ExcSK.k", &assign_ExcSK_k); + assign_map.emplace("cim:ExcSK.k1", &assign_ExcSK_k1); + assign_map.emplace("cim:ExcSK.k2", &assign_ExcSK_k2); + assign_map.emplace("cim:ExcSK.kc", &assign_ExcSK_kc); + assign_map.emplace("cim:ExcSK.kce", &assign_ExcSK_kce); + assign_map.emplace("cim:ExcSK.kd", &assign_ExcSK_kd); + assign_map.emplace("cim:ExcSK.kgob", &assign_ExcSK_kgob); + assign_map.emplace("cim:ExcSK.kp", &assign_ExcSK_kp); + assign_map.emplace("cim:ExcSK.kqi", &assign_ExcSK_kqi); + assign_map.emplace("cim:ExcSK.kqob", &assign_ExcSK_kqob); + assign_map.emplace("cim:ExcSK.kqp", &assign_ExcSK_kqp); + assign_map.emplace("cim:ExcSK.nq", &assign_ExcSK_nq); + assign_map.emplace("cim:ExcSK.qconoff", &assign_ExcSK_qconoff); + assign_map.emplace("cim:ExcSK.qz", &assign_ExcSK_qz); + assign_map.emplace("cim:ExcSK.remote", &assign_ExcSK_remote); + assign_map.emplace("cim:ExcSK.sbase", &assign_ExcSK_sbase); + assign_map.emplace("cim:ExcSK.tc", &assign_ExcSK_tc); + assign_map.emplace("cim:ExcSK.te", &assign_ExcSK_te); + assign_map.emplace("cim:ExcSK.ti", &assign_ExcSK_ti); + assign_map.emplace("cim:ExcSK.tp", &assign_ExcSK_tp); + assign_map.emplace("cim:ExcSK.tr", &assign_ExcSK_tr); + assign_map.emplace("cim:ExcSK.uimax", &assign_ExcSK_uimax); + assign_map.emplace("cim:ExcSK.uimin", &assign_ExcSK_uimin); + assign_map.emplace("cim:ExcSK.urmax", &assign_ExcSK_urmax); + assign_map.emplace("cim:ExcSK.urmin", &assign_ExcSK_urmin); + assign_map.emplace("cim:ExcSK.vtmax", &assign_ExcSK_vtmax); + assign_map.emplace("cim:ExcSK.vtmin", &assign_ExcSK_vtmin); + assign_map.emplace("cim:ExcSK.yp", &assign_ExcSK_yp); } void ExcSK::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcSK.hpp b/CGMES_2.4.15_27JAN2020/ExcSK.hpp index c151b3973..3d724e1da 100644 --- a/CGMES_2.4.15_27JAN2020/ExcSK.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcSK.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Slovakian Excitation System Model. UEL and secondary voltage control are included in this model. When this model is used, there cannot be a separate underexcitation limiter or VAr controller model. - */ + /** \brief Slovakian Excitation System Model. UEL and secondary voltage control are included in this model. When this model is used, there cannot be a separate underexcitation limiter or VAr controller model. */ class ExcSK : public ExcitationSystemDynamics { public: @@ -30,38 +28,101 @@ namespace CIMPP ExcSK(); ~ExcSK() override; - CIMPP::PU efdmax; /* Field voltage clipping limit (Efdmax). Default: nullptr */ - CIMPP::PU efdmin; /* Field voltage clipping limit (Efdmin). Default: nullptr */ - CIMPP::PU emax; /* Maximum field voltage output (Emax). Typical Value = 20. Default: nullptr */ - CIMPP::PU emin; /* Minimum field voltage output (Emin). Typical Value = -20. Default: nullptr */ - CIMPP::PU k; /* Gain (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU k1; /* Parameter of underexcitation limit (K1). Typical Value = 0.1364. Default: nullptr */ - CIMPP::PU k2; /* Parameter of underexcitation limit (K2). Typical Value = -0.3861. Default: nullptr */ - CIMPP::PU kc; /* PI controller gain (Kc). Typical Value = 70. Default: nullptr */ - CIMPP::PU kce; /* Rectifier regulation factor (Kce). Typical Value = 0. Default: nullptr */ - CIMPP::PU kd; /* Exciter internal reactance (Kd). Typical Value = 0. Default: nullptr */ - CIMPP::PU kgob; /* P controller gain (Kgob). Typical Value = 10. Default: nullptr */ - CIMPP::PU kp; /* PI controller gain (Kp). Typical Value = 1. Default: nullptr */ - CIMPP::PU kqi; /* PI controller gain of integral component (Kqi). Typical Value = 0. Default: nullptr */ - CIMPP::PU kqob; /* Rate of rise of the reactive power (Kqob). Default: nullptr */ - CIMPP::PU kqp; /* PI controller gain (Kqp). Typical Value = 0. Default: nullptr */ - CIMPP::PU nq; /* Dead band of reactive power (nq). Determines the range of sensitivity. Typical Value = 0.001. Default: nullptr */ - CIMPP::Boolean qconoff; /* Secondary voltage control state (Qc_on_off). true = secondary voltage control is ON false = secondary voltage control is OFF. Typical Value = false. Default: false */ - CIMPP::PU qz; /* Desired value (setpoint) of reactive power, manual setting (Qz). Default: nullptr */ - CIMPP::Boolean remote; /* Selector to apply automatic calculation in secondary controller model. true = automatic calculation is activated false = manual set is active; the use of desired value of reactive power (Qz) is required. Typical Value = true. Default: false */ - CIMPP::ApparentPower sbase; /* Apparent power of the unit (Sbase). Unit = MVA. Typical Value = 259. Default: nullptr */ - CIMPP::Seconds tc; /* PI controller phase lead time constant (Tc). Typical Value = 8. Default: nullptr */ - CIMPP::Seconds te; /* Time constant of gain block (Te). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds ti; /* PI controller phase lead time constant (Ti). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds tp; /* Time constant (Tp). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tr; /* Voltage transducer time constant (Tr). Typical Value = 0.01. Default: nullptr */ - CIMPP::PU uimax; /* Maximum error (Uimax). Typical Value = 10. Default: nullptr */ - CIMPP::PU uimin; /* Minimum error (UImin). Typical Value = -10. Default: nullptr */ - CIMPP::PU urmax; /* Maximum controller output (URmax). Typical Value = 10. Default: nullptr */ - CIMPP::PU urmin; /* Minimum controller output (URmin). Typical Value = -10. Default: nullptr */ - CIMPP::PU vtmax; /* Maximum terminal voltage input (Vtmax). Determines the range of voltage dead band. Typical Value = 1.05. Default: nullptr */ - CIMPP::PU vtmin; /* Minimum terminal voltage input (Vtmin). Determines the range of voltage dead band. Typical Value = 0.95. Default: nullptr */ - CIMPP::PU yp; /* Maximum output (Yp). Minimum output = 0. Typical Value = 1. Default: nullptr */ + /** \brief Field voltage clipping limit (Efdmax). Default: nullptr */ + CIMPP::PU efdmax; + + /** \brief Field voltage clipping limit (Efdmin). Default: nullptr */ + CIMPP::PU efdmin; + + /** \brief Maximum field voltage output (Emax). Typical Value = 20. Default: nullptr */ + CIMPP::PU emax; + + /** \brief Minimum field voltage output (Emin). Typical Value = -20. Default: nullptr */ + CIMPP::PU emin; + + /** \brief Gain (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU k; + + /** \brief Parameter of underexcitation limit (K1). Typical Value = 0.1364. Default: nullptr */ + CIMPP::PU k1; + + /** \brief Parameter of underexcitation limit (K2). Typical Value = -0.3861. Default: nullptr */ + CIMPP::PU k2; + + /** \brief PI controller gain (Kc). Typical Value = 70. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Rectifier regulation factor (Kce). Typical Value = 0. Default: nullptr */ + CIMPP::PU kce; + + /** \brief Exciter internal reactance (Kd). Typical Value = 0. Default: nullptr */ + CIMPP::PU kd; + + /** \brief P controller gain (Kgob). Typical Value = 10. Default: nullptr */ + CIMPP::PU kgob; + + /** \brief PI controller gain (Kp). Typical Value = 1. Default: nullptr */ + CIMPP::PU kp; + + /** \brief PI controller gain of integral component (Kqi). Typical Value = 0. Default: nullptr */ + CIMPP::PU kqi; + + /** \brief Rate of rise of the reactive power (Kqob). Default: nullptr */ + CIMPP::PU kqob; + + /** \brief PI controller gain (Kqp). Typical Value = 0. Default: nullptr */ + CIMPP::PU kqp; + + /** \brief Dead band of reactive power (nq). Determines the range of sensitivity. Typical Value = 0.001. Default: nullptr */ + CIMPP::PU nq; + + /** \brief Secondary voltage control state (Qc_on_off). true = secondary voltage control is ON false = secondary voltage control is OFF. Typical Value = false. Default: false */ + CIMPP::Boolean qconoff; + + /** \brief Desired value (setpoint) of reactive power, manual setting (Qz). Default: nullptr */ + CIMPP::PU qz; + + /** \brief Selector to apply automatic calculation in secondary controller model. true = automatic calculation is activated false = manual set is active; the use of desired value of reactive power (Qz) is required. Typical Value = true. Default: false */ + CIMPP::Boolean remote; + + /** \brief Apparent power of the unit (Sbase). Unit = MVA. Typical Value = 259. Default: nullptr */ + CIMPP::ApparentPower sbase; + + /** \brief PI controller phase lead time constant (Tc). Typical Value = 8. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Time constant of gain block (Te). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief PI controller phase lead time constant (Ti). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds ti; + + /** \brief Time constant (Tp). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Voltage transducer time constant (Tr). Typical Value = 0.01. Default: nullptr */ + CIMPP::Seconds tr; + + /** \brief Maximum error (Uimax). Typical Value = 10. Default: nullptr */ + CIMPP::PU uimax; + + /** \brief Minimum error (UImin). Typical Value = -10. Default: nullptr */ + CIMPP::PU uimin; + + /** \brief Maximum controller output (URmax). Typical Value = 10. Default: nullptr */ + CIMPP::PU urmax; + + /** \brief Minimum controller output (URmin). Typical Value = -10. Default: nullptr */ + CIMPP::PU urmin; + + /** \brief Maximum terminal voltage input (Vtmax). Determines the range of voltage dead band. Typical Value = 1.05. Default: nullptr */ + CIMPP::PU vtmax; + + /** \brief Minimum terminal voltage input (Vtmin). Determines the range of voltage dead band. Typical Value = 0.95. Default: nullptr */ + CIMPP::PU vtmin; + + /** \brief Maximum output (Yp). Minimum output = 0. Typical Value = 1. Default: nullptr */ + CIMPP::PU yp; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcST1A.cpp b/CGMES_2.4.15_27JAN2020/ExcST1A.cpp index 882df3069..f96434060 100644 --- a/CGMES_2.4.15_27JAN2020/ExcST1A.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcST1A.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcST1A::ExcST1A() {}; -ExcST1A::~ExcST1A() {}; +ExcST1A::ExcST1A() {} +ExcST1A::~ExcST1A() {} static const std::list PossibleProfilesForClass = { @@ -74,246 +56,262 @@ ExcST1A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcST1A_ilr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_ilr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ilr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_klr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_klr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->klr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_tb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_tb1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_tc1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_tc1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_vimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_xe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_xe(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xe; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcST1A_ilr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ilr; if (!buffer.str().empty()) @@ -327,7 +325,8 @@ bool get_ExcST1A_ilr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -341,7 +340,8 @@ bool get_ExcST1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -355,7 +355,8 @@ bool get_ExcST1A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -369,7 +370,8 @@ bool get_ExcST1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_klr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->klr; if (!buffer.str().empty()) @@ -383,7 +385,8 @@ bool get_ExcST1A_klr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -397,7 +400,8 @@ bool get_ExcST1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -411,7 +415,8 @@ bool get_ExcST1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb1; if (!buffer.str().empty()) @@ -425,7 +430,8 @@ bool get_ExcST1A_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -439,7 +445,8 @@ bool get_ExcST1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_tc1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc1; if (!buffer.str().empty()) @@ -453,7 +460,8 @@ bool get_ExcST1A_tc1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -467,7 +475,8 @@ bool get_ExcST1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -481,7 +490,8 @@ bool get_ExcST1A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST1A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -495,7 +505,8 @@ bool get_ExcST1A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST1A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -509,7 +520,8 @@ bool get_ExcST1A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST1A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimin; if (!buffer.str().empty()) @@ -523,7 +535,8 @@ bool get_ExcST1A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -537,7 +550,8 @@ bool get_ExcST1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -551,7 +565,8 @@ bool get_ExcST1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST1A_xe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xe; if (!buffer.str().empty()) @@ -563,8 +578,6 @@ bool get_ExcST1A_xe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcST1A::debugName[] = "ExcST1A"; const char* ExcST1A::debugString() const { @@ -573,29 +586,29 @@ const char* ExcST1A::debugString() const void ExcST1A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcST1A"), &ExcST1A_factory)); + factory_map.emplace("cim:ExcST1A", &ExcST1A_factory); } void ExcST1A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.ilr"), &assign_ExcST1A_ilr)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.ka"), &assign_ExcST1A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.kc"), &assign_ExcST1A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.kf"), &assign_ExcST1A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.klr"), &assign_ExcST1A_klr)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.ta"), &assign_ExcST1A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.tb"), &assign_ExcST1A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.tb1"), &assign_ExcST1A_tb1)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.tc"), &assign_ExcST1A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.tc1"), &assign_ExcST1A_tc1)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.tf"), &assign_ExcST1A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.vamax"), &assign_ExcST1A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.vamin"), &assign_ExcST1A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.vimax"), &assign_ExcST1A_vimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.vimin"), &assign_ExcST1A_vimin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.vrmax"), &assign_ExcST1A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.vrmin"), &assign_ExcST1A_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.xe"), &assign_ExcST1A_xe)); + assign_map.emplace("cim:ExcST1A.ilr", &assign_ExcST1A_ilr); + assign_map.emplace("cim:ExcST1A.ka", &assign_ExcST1A_ka); + assign_map.emplace("cim:ExcST1A.kc", &assign_ExcST1A_kc); + assign_map.emplace("cim:ExcST1A.kf", &assign_ExcST1A_kf); + assign_map.emplace("cim:ExcST1A.klr", &assign_ExcST1A_klr); + assign_map.emplace("cim:ExcST1A.ta", &assign_ExcST1A_ta); + assign_map.emplace("cim:ExcST1A.tb", &assign_ExcST1A_tb); + assign_map.emplace("cim:ExcST1A.tb1", &assign_ExcST1A_tb1); + assign_map.emplace("cim:ExcST1A.tc", &assign_ExcST1A_tc); + assign_map.emplace("cim:ExcST1A.tc1", &assign_ExcST1A_tc1); + assign_map.emplace("cim:ExcST1A.tf", &assign_ExcST1A_tf); + assign_map.emplace("cim:ExcST1A.vamax", &assign_ExcST1A_vamax); + assign_map.emplace("cim:ExcST1A.vamin", &assign_ExcST1A_vamin); + assign_map.emplace("cim:ExcST1A.vimax", &assign_ExcST1A_vimax); + assign_map.emplace("cim:ExcST1A.vimin", &assign_ExcST1A_vimin); + assign_map.emplace("cim:ExcST1A.vrmax", &assign_ExcST1A_vrmax); + assign_map.emplace("cim:ExcST1A.vrmin", &assign_ExcST1A_vrmin); + assign_map.emplace("cim:ExcST1A.xe", &assign_ExcST1A_xe); } void ExcST1A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcST1A.hpp b/CGMES_2.4.15_27JAN2020/ExcST1A.hpp index 820aa0bea..2c1805a46 100644 --- a/CGMES_2.4.15_27JAN2020/ExcST1A.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcST1A.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modification of an old IEEE ST1A static excitation system without overexcitation limiter (OEL) and underexcitation limiter (UEL). - */ + /** \brief Modification of an old IEEE ST1A static excitation system without overexcitation limiter (OEL) and underexcitation limiter (UEL). */ class ExcST1A : public ExcitationSystemDynamics { public: @@ -28,24 +26,59 @@ namespace CIMPP ExcST1A(); ~ExcST1A() override; - CIMPP::PU ilr; /* Exciter output current limit reference (Ilr). Typical Value = 0. Default: nullptr */ - CIMPP::PU ka; /* Voltage regulator gain (Ka). Typical Value = 190. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (Kf). Typical Value = 0. Default: nullptr */ - CIMPP::PU klr; /* Exciter output current limiter gain (Klr). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (Ta). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (Tb). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds tb1; /* Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (Tc). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tc1; /* Voltage regulator time constant (Tc). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (Tf). Typical Value = 1. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (Vamax). Typical Value = 999. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (Vamin). Typical Value = -999. Default: nullptr */ - CIMPP::PU vimax; /* Maximum voltage regulator input limit (Vimax). Typical Value = 999. Default: nullptr */ - CIMPP::PU vimin; /* Minimum voltage regulator input limit (Vimin). Typical Value = -999. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator outputs (Vrmax). Typical Value = 7.8. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator outputs (Vrmin). Typical Value = -6.7. Default: nullptr */ - CIMPP::PU xe; /* Excitation xfmr effective reactance (Xe). Typical Value = 0.04. Default: nullptr */ + /** \brief Exciter output current limit reference (Ilr). Typical Value = 0. Default: nullptr */ + CIMPP::PU ilr; + + /** \brief Voltage regulator gain (Ka). Typical Value = 190. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Excitation control system stabilizer gains (Kf). Typical Value = 0. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Exciter output current limiter gain (Klr). Typical Value = 0. Default: nullptr */ + CIMPP::PU klr; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (Tb). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb1; + + /** \brief Voltage regulator time constant (Tc). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Voltage regulator time constant (Tc). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc1; + + /** \brief Excitation control system stabilizer time constant (Tf). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage regulator output (Vamax). Typical Value = 999. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (Vamin). Typical Value = -999. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Maximum voltage regulator input limit (Vimax). Typical Value = 999. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Minimum voltage regulator input limit (Vimin). Typical Value = -999. Default: nullptr */ + CIMPP::PU vimin; + + /** \brief Maximum voltage regulator outputs (Vrmax). Typical Value = 7.8. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator outputs (Vrmin). Typical Value = -6.7. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief Excitation xfmr effective reactance (Xe). Typical Value = 0.04. Default: nullptr */ + CIMPP::PU xe; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcST2A.cpp b/CGMES_2.4.15_27JAN2020/ExcST2A.cpp index c9808278a..afa9e20ff 100644 --- a/CGMES_2.4.15_27JAN2020/ExcST2A.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcST2A.cpp @@ -8,26 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcST2A::ExcST2A() {}; -ExcST2A::~ExcST2A() {}; +ExcST2A::ExcST2A() {} +ExcST2A::~ExcST2A() {} static const std::list PossibleProfilesForClass = { @@ -68,207 +53,220 @@ ExcST2A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcST2A_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_efdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_uelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcST2A_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmax; if (!buffer.str().empty()) @@ -282,7 +280,8 @@ bool get_ExcST2A_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcST2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -296,7 +295,8 @@ bool get_ExcST2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -310,7 +310,8 @@ bool get_ExcST2A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -324,7 +325,8 @@ bool get_ExcST2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -338,7 +340,8 @@ bool get_ExcST2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -352,7 +355,8 @@ bool get_ExcST2A_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -366,7 +370,8 @@ bool get_ExcST2A_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -380,7 +385,8 @@ bool get_ExcST2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -394,7 +400,8 @@ bool get_ExcST2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -408,7 +415,8 @@ bool get_ExcST2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -422,7 +430,8 @@ bool get_ExcST2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -436,7 +445,8 @@ bool get_ExcST2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uelin; if (!buffer.str().empty()) @@ -450,7 +460,8 @@ bool get_ExcST2A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -464,7 +475,8 @@ bool get_ExcST2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -476,8 +488,6 @@ bool get_ExcST2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcST2A::debugName[] = "ExcST2A"; const char* ExcST2A::debugString() const { @@ -486,26 +496,26 @@ const char* ExcST2A::debugString() const void ExcST2A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcST2A"), &ExcST2A_factory)); + factory_map.emplace("cim:ExcST2A", &ExcST2A_factory); } void ExcST2A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.efdmax"), &assign_ExcST2A_efdmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.ka"), &assign_ExcST2A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.kc"), &assign_ExcST2A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.ke"), &assign_ExcST2A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.kf"), &assign_ExcST2A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.ki"), &assign_ExcST2A_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.kp"), &assign_ExcST2A_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.ta"), &assign_ExcST2A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.tb"), &assign_ExcST2A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.tc"), &assign_ExcST2A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.te"), &assign_ExcST2A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.tf"), &assign_ExcST2A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.uelin"), &assign_ExcST2A_uelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.vrmax"), &assign_ExcST2A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.vrmin"), &assign_ExcST2A_vrmin)); + assign_map.emplace("cim:ExcST2A.efdmax", &assign_ExcST2A_efdmax); + assign_map.emplace("cim:ExcST2A.ka", &assign_ExcST2A_ka); + assign_map.emplace("cim:ExcST2A.kc", &assign_ExcST2A_kc); + assign_map.emplace("cim:ExcST2A.ke", &assign_ExcST2A_ke); + assign_map.emplace("cim:ExcST2A.kf", &assign_ExcST2A_kf); + assign_map.emplace("cim:ExcST2A.ki", &assign_ExcST2A_ki); + assign_map.emplace("cim:ExcST2A.kp", &assign_ExcST2A_kp); + assign_map.emplace("cim:ExcST2A.ta", &assign_ExcST2A_ta); + assign_map.emplace("cim:ExcST2A.tb", &assign_ExcST2A_tb); + assign_map.emplace("cim:ExcST2A.tc", &assign_ExcST2A_tc); + assign_map.emplace("cim:ExcST2A.te", &assign_ExcST2A_te); + assign_map.emplace("cim:ExcST2A.tf", &assign_ExcST2A_tf); + assign_map.emplace("cim:ExcST2A.uelin", &assign_ExcST2A_uelin); + assign_map.emplace("cim:ExcST2A.vrmax", &assign_ExcST2A_vrmax); + assign_map.emplace("cim:ExcST2A.vrmin", &assign_ExcST2A_vrmin); } void ExcST2A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcST2A.hpp b/CGMES_2.4.15_27JAN2020/ExcST2A.hpp index b809b1ce3..1da9826e1 100644 --- a/CGMES_2.4.15_27JAN2020/ExcST2A.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcST2A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE ST2A static excitation system - another lead-lag block added to match the model defined by WECC. - */ + /** \brief Modified IEEE ST2A static excitation system - another lead-lag block added to match the model defined by WECC. */ class ExcST2A : public ExcitationSystemDynamics { public: @@ -29,21 +27,50 @@ namespace CIMPP ExcST2A(); ~ExcST2A() override; - CIMPP::PU efdmax; /* Maximum field voltage (Efdmax). Typical Value = 99. Default: nullptr */ - CIMPP::PU ka; /* Voltage regulator gain (Ka). Typical Value = 120. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 1.82. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (Kf). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU ki; /* Potential circuit gain coefficient (Ki). Typical Value = 8. Default: nullptr */ - CIMPP::PU kp; /* Potential circuit gain coefficient (Kp). Typical Value = 4.88. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (Ta). Typical Value = 0.15. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (Tc). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (Tf). Typical Value = 0.7. Default: nullptr */ - CIMPP::Boolean uelin; /* UEL input (UELin). true = HV gate false = add to error signal. Typical Value = false. Default: false */ - CIMPP::PU vrmax; /* Maximum voltage regulator outputs (Vrmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator outputs (Vrmin). Typical Value = -1. Default: nullptr */ + /** \brief Maximum field voltage (Efdmax). Typical Value = 99. Default: nullptr */ + CIMPP::PU efdmax; + + /** \brief Voltage regulator gain (Ka). Typical Value = 120. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 1.82. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Exciter constant related to self-excited field (Ke). Typical Value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (Kf). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Potential circuit gain coefficient (Ki). Typical Value = 8. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Potential circuit gain coefficient (Kp). Typical Value = 4.88. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0.15. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (Tb). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (Tc). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (Te). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (Tf). Typical Value = 0.7. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief UEL input (UELin). true = HV gate false = add to error signal. Typical Value = false. Default: false */ + CIMPP::Boolean uelin; + + /** \brief Maximum voltage regulator outputs (Vrmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator outputs (Vrmin). Typical Value = -1. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcST3A.cpp b/CGMES_2.4.15_27JAN2020/ExcST3A.cpp index 1ecf6df79..e31c2b37c 100644 --- a/CGMES_2.4.15_27JAN2020/ExcST3A.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcST3A.cpp @@ -8,31 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "AngleDegrees.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcST3A::ExcST3A() {}; -ExcST3A::~ExcST3A() {}; +ExcST3A::ExcST3A() {} +ExcST3A::~ExcST3A() {} static const std::list PossibleProfilesForClass = { @@ -78,272 +58,290 @@ ExcST3A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcST3A_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_efdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_kj(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_kj(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kj; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_km(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_km(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->km; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_ks1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_ks1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_thetap(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_thetap(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->thetap; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_tm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_tm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_vbmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_vbmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vbmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_vgmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_vgmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vgmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_vimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_xl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_xl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcST3A_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmax; if (!buffer.str().empty()) @@ -357,7 +355,8 @@ bool get_ExcST3A_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcST3A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -371,7 +370,8 @@ bool get_ExcST3A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -385,7 +385,8 @@ bool get_ExcST3A_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -399,7 +400,8 @@ bool get_ExcST3A_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_kj(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kj; if (!buffer.str().empty()) @@ -413,7 +415,8 @@ bool get_ExcST3A_kj(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_km(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->km; if (!buffer.str().empty()) @@ -427,7 +430,8 @@ bool get_ExcST3A_km(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -441,7 +445,8 @@ bool get_ExcST3A_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -455,7 +460,8 @@ bool get_ExcST3A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks1; if (!buffer.str().empty()) @@ -469,7 +475,8 @@ bool get_ExcST3A_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -483,7 +490,8 @@ bool get_ExcST3A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -497,7 +505,8 @@ bool get_ExcST3A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_thetap(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thetap; if (!buffer.str().empty()) @@ -511,7 +520,8 @@ bool get_ExcST3A_thetap(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcST3A_tm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tm; if (!buffer.str().empty()) @@ -525,7 +535,8 @@ bool get_ExcST3A_tm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vbmax; if (!buffer.str().empty()) @@ -539,7 +550,8 @@ bool get_ExcST3A_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST3A_vgmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vgmax; if (!buffer.str().empty()) @@ -553,7 +565,8 @@ bool get_ExcST3A_vgmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST3A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -567,7 +580,8 @@ bool get_ExcST3A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST3A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimin; if (!buffer.str().empty()) @@ -581,7 +595,8 @@ bool get_ExcST3A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST3A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -595,7 +610,8 @@ bool get_ExcST3A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST3A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -609,7 +625,8 @@ bool get_ExcST3A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST3A_xl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xl; if (!buffer.str().empty()) @@ -621,8 +638,6 @@ bool get_ExcST3A_xl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcST3A::debugName[] = "ExcST3A"; const char* ExcST3A::debugString() const { @@ -631,31 +646,31 @@ const char* ExcST3A::debugString() const void ExcST3A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcST3A"), &ExcST3A_factory)); + factory_map.emplace("cim:ExcST3A", &ExcST3A_factory); } void ExcST3A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.efdmax"), &assign_ExcST3A_efdmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.kc"), &assign_ExcST3A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.kg"), &assign_ExcST3A_kg)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.ki"), &assign_ExcST3A_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.kj"), &assign_ExcST3A_kj)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.km"), &assign_ExcST3A_km)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.kp"), &assign_ExcST3A_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.ks"), &assign_ExcST3A_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.ks1"), &assign_ExcST3A_ks1)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.tb"), &assign_ExcST3A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.tc"), &assign_ExcST3A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.thetap"), &assign_ExcST3A_thetap)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.tm"), &assign_ExcST3A_tm)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.vbmax"), &assign_ExcST3A_vbmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.vgmax"), &assign_ExcST3A_vgmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.vimax"), &assign_ExcST3A_vimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.vimin"), &assign_ExcST3A_vimin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.vrmax"), &assign_ExcST3A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.vrmin"), &assign_ExcST3A_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.xl"), &assign_ExcST3A_xl)); + assign_map.emplace("cim:ExcST3A.efdmax", &assign_ExcST3A_efdmax); + assign_map.emplace("cim:ExcST3A.kc", &assign_ExcST3A_kc); + assign_map.emplace("cim:ExcST3A.kg", &assign_ExcST3A_kg); + assign_map.emplace("cim:ExcST3A.ki", &assign_ExcST3A_ki); + assign_map.emplace("cim:ExcST3A.kj", &assign_ExcST3A_kj); + assign_map.emplace("cim:ExcST3A.km", &assign_ExcST3A_km); + assign_map.emplace("cim:ExcST3A.kp", &assign_ExcST3A_kp); + assign_map.emplace("cim:ExcST3A.ks", &assign_ExcST3A_ks); + assign_map.emplace("cim:ExcST3A.ks1", &assign_ExcST3A_ks1); + assign_map.emplace("cim:ExcST3A.tb", &assign_ExcST3A_tb); + assign_map.emplace("cim:ExcST3A.tc", &assign_ExcST3A_tc); + assign_map.emplace("cim:ExcST3A.thetap", &assign_ExcST3A_thetap); + assign_map.emplace("cim:ExcST3A.tm", &assign_ExcST3A_tm); + assign_map.emplace("cim:ExcST3A.vbmax", &assign_ExcST3A_vbmax); + assign_map.emplace("cim:ExcST3A.vgmax", &assign_ExcST3A_vgmax); + assign_map.emplace("cim:ExcST3A.vimax", &assign_ExcST3A_vimax); + assign_map.emplace("cim:ExcST3A.vimin", &assign_ExcST3A_vimin); + assign_map.emplace("cim:ExcST3A.vrmax", &assign_ExcST3A_vrmax); + assign_map.emplace("cim:ExcST3A.vrmin", &assign_ExcST3A_vrmin); + assign_map.emplace("cim:ExcST3A.xl", &assign_ExcST3A_xl); } void ExcST3A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcST3A.hpp b/CGMES_2.4.15_27JAN2020/ExcST3A.hpp index 938915f89..522bb2633 100644 --- a/CGMES_2.4.15_27JAN2020/ExcST3A.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcST3A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE ST3A static excitation system with added speed multiplier. - */ + /** \brief Modified IEEE ST3A static excitation system with added speed multiplier. */ class ExcST3A : public ExcitationSystemDynamics { public: @@ -29,26 +27,65 @@ namespace CIMPP ExcST3A(); ~ExcST3A() override; - CIMPP::PU efdmax; /* Maximum AVR output (Efdmax). Typical Value = 6.9. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 1.1. Default: nullptr */ - CIMPP::PU kg; /* Feedback gain constant of the inner loop field regulator (Kg). Typical Value = 1. Default: nullptr */ - CIMPP::PU ki; /* Potential circuit gain coefficient (Ki). Typical Value = 4.83. Default: nullptr */ - CIMPP::PU kj; /* AVR gain (Kj). Typical Value = 200. Default: nullptr */ - CIMPP::PU km; /* Forward gain constant of the inner loop field regulator (Km). Typical Value = 7.04. Default: nullptr */ - CIMPP::PU kp; /* Potential source gain (Kp) (>0). Typical Value = 4.37. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ - CIMPP::PU ks1; /* Coefficient to allow different usage of the model-speed coefficient (Ks1). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (Tb). Typical Value = 6.67. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (Tc). Typical Value = 1. Default: nullptr */ - CIMPP::AngleDegrees thetap; /* Potential circuit phase angle (thetap). Typical Value = 20. Default: nullptr */ - CIMPP::Seconds tm; /* Forward time constant of inner loop field regulator (Tm). Typical Value = 1. Default: nullptr */ - CIMPP::PU vbmax; /* Maximum excitation voltage (Vbmax). Typical Value = 8.63. Default: nullptr */ - CIMPP::PU vgmax; /* Maximum inner loop feedback voltage (Vgmax). Typical Value = 6.53. Default: nullptr */ - CIMPP::PU vimax; /* Maximum voltage regulator input limit (Vimax). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU vimin; /* Minimum voltage regulator input limit (Vimin). Typical Value = -0.2. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (Vrmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (Vrmin). Typical Value = 0. Default: nullptr */ - CIMPP::PU xl; /* Reactance associated with potential source (Xl). Typical Value = 0.09. Default: nullptr */ + /** \brief Maximum AVR output (Efdmax). Typical Value = 6.9. Default: nullptr */ + CIMPP::PU efdmax; + + /** \brief Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Feedback gain constant of the inner loop field regulator (Kg). Typical Value = 1. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Potential circuit gain coefficient (Ki). Typical Value = 4.83. Default: nullptr */ + CIMPP::PU ki; + + /** \brief AVR gain (Kj). Typical Value = 200. Default: nullptr */ + CIMPP::PU kj; + + /** \brief Forward gain constant of the inner loop field regulator (Km). Typical Value = 7.04. Default: nullptr */ + CIMPP::PU km; + + /** \brief Potential source gain (Kp) (>0). Typical Value = 4.37. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (Ks). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (Ks1). Typical Value = 0. Default: nullptr */ + CIMPP::PU ks1; + + /** \brief Voltage regulator time constant (Tb). Typical Value = 6.67. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (Tc). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Potential circuit phase angle (thetap). Typical Value = 20. Default: nullptr */ + CIMPP::AngleDegrees thetap; + + /** \brief Forward time constant of inner loop field regulator (Tm). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tm; + + /** \brief Maximum excitation voltage (Vbmax). Typical Value = 8.63. Default: nullptr */ + CIMPP::PU vbmax; + + /** \brief Maximum inner loop feedback voltage (Vgmax). Typical Value = 6.53. Default: nullptr */ + CIMPP::PU vgmax; + + /** \brief Maximum voltage regulator input limit (Vimax). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Minimum voltage regulator input limit (Vimin). Typical Value = -0.2. Default: nullptr */ + CIMPP::PU vimin; + + /** \brief Maximum voltage regulator output (Vrmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (Vrmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief Reactance associated with potential source (Xl). Typical Value = 0.09. Default: nullptr */ + CIMPP::PU xl; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcST4B.cpp b/CGMES_2.4.15_27JAN2020/ExcST4B.cpp index ecb63b6d4..b09570552 100644 --- a/CGMES_2.4.15_27JAN2020/ExcST4B.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcST4B.cpp @@ -8,30 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "AngleDegrees.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcST4B::ExcST4B() {}; -ExcST4B::~ExcST4B() {}; +ExcST4B::ExcST4B() {} +ExcST4B::~ExcST4B() {} static const std::list PossibleProfilesForClass = { @@ -76,259 +57,276 @@ ExcST4B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcST4B_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_kim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_kim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_kir(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_kir(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kir; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_kpm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_kpm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_kpr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_kpr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_lvgate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_lvgate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lvgate; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_thetap(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_thetap(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->thetap; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_uel(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_uel(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uel; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_vbmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_vbmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vbmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_vgmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_vgmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vgmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_vmmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_vmmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_vmmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_vmmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_xl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_xl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcST4B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -342,7 +340,8 @@ bool get_ExcST4B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -356,7 +355,8 @@ bool get_ExcST4B_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -370,7 +370,8 @@ bool get_ExcST4B_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_kim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kim; if (!buffer.str().empty()) @@ -384,7 +385,8 @@ bool get_ExcST4B_kim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kir; if (!buffer.str().empty()) @@ -398,7 +400,8 @@ bool get_ExcST4B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -412,7 +415,8 @@ bool get_ExcST4B_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_kpm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpm; if (!buffer.str().empty()) @@ -426,7 +430,8 @@ bool get_ExcST4B_kpm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpr; if (!buffer.str().empty()) @@ -440,7 +445,8 @@ bool get_ExcST4B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_lvgate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lvgate; if (!buffer.str().empty()) @@ -454,7 +460,8 @@ bool get_ExcST4B_lvgate(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcST4B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -468,7 +475,8 @@ bool get_ExcST4B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_thetap(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thetap; if (!buffer.str().empty()) @@ -482,7 +490,8 @@ bool get_ExcST4B_thetap(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcST4B_uel(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uel; if (!buffer.str().empty()) @@ -496,7 +505,8 @@ bool get_ExcST4B_uel(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vbmax; if (!buffer.str().empty()) @@ -510,7 +520,8 @@ bool get_ExcST4B_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST4B_vgmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vgmax; if (!buffer.str().empty()) @@ -524,7 +535,8 @@ bool get_ExcST4B_vgmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST4B_vmmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmmax; if (!buffer.str().empty()) @@ -538,7 +550,8 @@ bool get_ExcST4B_vmmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST4B_vmmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmmin; if (!buffer.str().empty()) @@ -552,7 +565,8 @@ bool get_ExcST4B_vmmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST4B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -566,7 +580,8 @@ bool get_ExcST4B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST4B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -580,7 +595,8 @@ bool get_ExcST4B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST4B_xl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xl; if (!buffer.str().empty()) @@ -592,8 +608,6 @@ bool get_ExcST4B_xl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcST4B::debugName[] = "ExcST4B"; const char* ExcST4B::debugString() const { @@ -602,30 +616,30 @@ const char* ExcST4B::debugString() const void ExcST4B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcST4B"), &ExcST4B_factory)); + factory_map.emplace("cim:ExcST4B", &ExcST4B_factory); } void ExcST4B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.kc"), &assign_ExcST4B_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.kg"), &assign_ExcST4B_kg)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.ki"), &assign_ExcST4B_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.kim"), &assign_ExcST4B_kim)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.kir"), &assign_ExcST4B_kir)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.kp"), &assign_ExcST4B_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.kpm"), &assign_ExcST4B_kpm)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.kpr"), &assign_ExcST4B_kpr)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.lvgate"), &assign_ExcST4B_lvgate)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.ta"), &assign_ExcST4B_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.thetap"), &assign_ExcST4B_thetap)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.uel"), &assign_ExcST4B_uel)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.vbmax"), &assign_ExcST4B_vbmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.vgmax"), &assign_ExcST4B_vgmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.vmmax"), &assign_ExcST4B_vmmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.vmmin"), &assign_ExcST4B_vmmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.vrmax"), &assign_ExcST4B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.vrmin"), &assign_ExcST4B_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.xl"), &assign_ExcST4B_xl)); + assign_map.emplace("cim:ExcST4B.kc", &assign_ExcST4B_kc); + assign_map.emplace("cim:ExcST4B.kg", &assign_ExcST4B_kg); + assign_map.emplace("cim:ExcST4B.ki", &assign_ExcST4B_ki); + assign_map.emplace("cim:ExcST4B.kim", &assign_ExcST4B_kim); + assign_map.emplace("cim:ExcST4B.kir", &assign_ExcST4B_kir); + assign_map.emplace("cim:ExcST4B.kp", &assign_ExcST4B_kp); + assign_map.emplace("cim:ExcST4B.kpm", &assign_ExcST4B_kpm); + assign_map.emplace("cim:ExcST4B.kpr", &assign_ExcST4B_kpr); + assign_map.emplace("cim:ExcST4B.lvgate", &assign_ExcST4B_lvgate); + assign_map.emplace("cim:ExcST4B.ta", &assign_ExcST4B_ta); + assign_map.emplace("cim:ExcST4B.thetap", &assign_ExcST4B_thetap); + assign_map.emplace("cim:ExcST4B.uel", &assign_ExcST4B_uel); + assign_map.emplace("cim:ExcST4B.vbmax", &assign_ExcST4B_vbmax); + assign_map.emplace("cim:ExcST4B.vgmax", &assign_ExcST4B_vgmax); + assign_map.emplace("cim:ExcST4B.vmmax", &assign_ExcST4B_vmmax); + assign_map.emplace("cim:ExcST4B.vmmin", &assign_ExcST4B_vmmin); + assign_map.emplace("cim:ExcST4B.vrmax", &assign_ExcST4B_vrmax); + assign_map.emplace("cim:ExcST4B.vrmin", &assign_ExcST4B_vrmin); + assign_map.emplace("cim:ExcST4B.xl", &assign_ExcST4B_xl); } void ExcST4B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcST4B.hpp b/CGMES_2.4.15_27JAN2020/ExcST4B.hpp index 9195981a2..5aa265787 100644 --- a/CGMES_2.4.15_27JAN2020/ExcST4B.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcST4B.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE ST4B static excitation system with maximum inner loop feedback gain . - */ + /** \brief Modified IEEE ST4B static excitation system with maximum inner loop feedback gain . */ class ExcST4B : public ExcitationSystemDynamics { public: @@ -30,25 +28,62 @@ namespace CIMPP ExcST4B(); ~ExcST4B() override; - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.113. Default: nullptr */ - CIMPP::PU kg; /* Feedback gain constant of the inner loop field regulator (Kg). Typical Value = 0. Default: nullptr */ - CIMPP::PU ki; /* Potential circuit gain coefficient (Ki). Typical Value = 0. Default: nullptr */ - CIMPP::PU kim; /* Voltage regulator integral gain output (Kim). Typical Value = 0. Default: nullptr */ - CIMPP::PU kir; /* Voltage regulator integral gain (Kir). Typical Value = 10.75. Default: nullptr */ - CIMPP::PU kp; /* Potential circuit gain coefficient (Kp). Typical Value = 9.3. Default: nullptr */ - CIMPP::PU kpm; /* Voltage regulator proportional gain output (Kpm). Typical Value = 1. Default: nullptr */ - CIMPP::PU kpr; /* Voltage regulator proportional gain (Kpr). Typical Value = 10.75. Default: nullptr */ - CIMPP::Boolean lvgate; /* Selector (LVgate). true = LVgate is part of the block diagram false = LVgate is not part of the block diagram. Typical Value = false. Default: false */ - CIMPP::Seconds ta; /* Voltage regulator time constant (Ta). Typical Value = 0.02. Default: nullptr */ - CIMPP::AngleDegrees thetap; /* Potential circuit phase angle (thetap). Typical Value = 0. Default: nullptr */ - CIMPP::Boolean uel; /* Selector (Uel). true = UEL is part of block diagram false = UEL is not part of block diagram. Typical Value = false. Default: false */ - CIMPP::PU vbmax; /* Maximum excitation voltage (Vbmax). Typical Value = 11.63. Default: nullptr */ - CIMPP::PU vgmax; /* Maximum inner loop feedback voltage (Vgmax). Typical Value = 5.8. Default: nullptr */ - CIMPP::PU vmmax; /* Maximum inner loop output (Vmmax). Typical Value = 99. Default: nullptr */ - CIMPP::PU vmmin; /* Minimum inner loop output (Vmmin). Typical Value = -99. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (Vrmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (Vrmin). Typical Value = -0.87. Default: nullptr */ - CIMPP::PU xl; /* Reactance associated with potential source (Xl). Typical Value = 0.124. Default: nullptr */ + /** \brief Rectifier loading factor proportional to commutating reactance (Kc). Typical Value = 0.113. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Feedback gain constant of the inner loop field regulator (Kg). Typical Value = 0. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Potential circuit gain coefficient (Ki). Typical Value = 0. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Voltage regulator integral gain output (Kim). Typical Value = 0. Default: nullptr */ + CIMPP::PU kim; + + /** \brief Voltage regulator integral gain (Kir). Typical Value = 10.75. Default: nullptr */ + CIMPP::PU kir; + + /** \brief Potential circuit gain coefficient (Kp). Typical Value = 9.3. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Voltage regulator proportional gain output (Kpm). Typical Value = 1. Default: nullptr */ + CIMPP::PU kpm; + + /** \brief Voltage regulator proportional gain (Kpr). Typical Value = 10.75. Default: nullptr */ + CIMPP::PU kpr; + + /** \brief Selector (LVgate). true = LVgate is part of the block diagram false = LVgate is not part of the block diagram. Typical Value = false. Default: false */ + CIMPP::Boolean lvgate; + + /** \brief Voltage regulator time constant (Ta). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Potential circuit phase angle (thetap). Typical Value = 0. Default: nullptr */ + CIMPP::AngleDegrees thetap; + + /** \brief Selector (Uel). true = UEL is part of block diagram false = UEL is not part of block diagram. Typical Value = false. Default: false */ + CIMPP::Boolean uel; + + /** \brief Maximum excitation voltage (Vbmax). Typical Value = 11.63. Default: nullptr */ + CIMPP::PU vbmax; + + /** \brief Maximum inner loop feedback voltage (Vgmax). Typical Value = 5.8. Default: nullptr */ + CIMPP::PU vgmax; + + /** \brief Maximum inner loop output (Vmmax). Typical Value = 99. Default: nullptr */ + CIMPP::PU vmmax; + + /** \brief Minimum inner loop output (Vmmin). Typical Value = -99. Default: nullptr */ + CIMPP::PU vmmin; + + /** \brief Maximum voltage regulator output (Vrmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (Vrmin). Typical Value = -0.87. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief Reactance associated with potential source (Xl). Typical Value = 0.124. Default: nullptr */ + CIMPP::PU xl; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcST6B.cpp b/CGMES_2.4.15_27JAN2020/ExcST6B.cpp index afee55093..9942e0b7a 100644 --- a/CGMES_2.4.15_27JAN2020/ExcST6B.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcST6B.cpp @@ -8,34 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ExcST6BOELselectorKind.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcST6B::ExcST6B() {}; -ExcST6B::~ExcST6B() {}; +ExcST6B::ExcST6B() {} +ExcST6B::~ExcST6B() {} static const std::list PossibleProfilesForClass = { @@ -84,311 +61,332 @@ ExcST6B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcST6B_ilr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_ilr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ilr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_kcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_kcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kcl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_kff(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_kff(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kff; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_kia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_kia(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kia; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_klr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_klr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->klr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_km(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_km(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->km; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_kpa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_kpa(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpa; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_kvd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_kvd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kvd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_oelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_oelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->oelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_ts(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_ts(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_tvd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_tvd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tvd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_vilim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_vilim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vilim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_vimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_vmult(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_vmult(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmult; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_xc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_xc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcST6B_ilr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ilr; if (!buffer.str().empty()) @@ -402,7 +400,8 @@ bool get_ExcST6B_ilr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -416,7 +415,8 @@ bool get_ExcST6B_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_kcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kcl; if (!buffer.str().empty()) @@ -430,7 +430,8 @@ bool get_ExcST6B_kcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_kff(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kff; if (!buffer.str().empty()) @@ -444,7 +445,8 @@ bool get_ExcST6B_kff(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -458,7 +460,8 @@ bool get_ExcST6B_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kia; if (!buffer.str().empty()) @@ -472,7 +475,8 @@ bool get_ExcST6B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_klr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->klr; if (!buffer.str().empty()) @@ -486,7 +490,8 @@ bool get_ExcST6B_klr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_km(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->km; if (!buffer.str().empty()) @@ -500,7 +505,8 @@ bool get_ExcST6B_km(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpa; if (!buffer.str().empty()) @@ -514,7 +520,8 @@ bool get_ExcST6B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_kvd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kvd; if (!buffer.str().empty()) @@ -526,9 +533,25 @@ bool get_ExcST6B_kvd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } +bool get_ExcST6B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->oelin; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_ExcST6B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -542,7 +565,8 @@ bool get_ExcST6B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_ts(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts; if (!buffer.str().empty()) @@ -556,7 +580,8 @@ bool get_ExcST6B_ts(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_tvd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tvd; if (!buffer.str().empty()) @@ -570,7 +595,8 @@ bool get_ExcST6B_tvd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -584,7 +610,8 @@ bool get_ExcST6B_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST6B_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -598,7 +625,8 @@ bool get_ExcST6B_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST6B_vilim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vilim; if (!buffer.str().empty()) @@ -612,7 +640,8 @@ bool get_ExcST6B_vilim(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST6B_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -626,7 +655,8 @@ bool get_ExcST6B_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST6B_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimin; if (!buffer.str().empty()) @@ -640,7 +670,8 @@ bool get_ExcST6B_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST6B_vmult(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmult; if (!buffer.str().empty()) @@ -654,7 +685,8 @@ bool get_ExcST6B_vmult(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST6B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -668,7 +700,8 @@ bool get_ExcST6B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST6B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -682,7 +715,8 @@ bool get_ExcST6B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST6B_xc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xc; if (!buffer.str().empty()) @@ -694,22 +728,6 @@ bool get_ExcST6B_xc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - -bool get_ExcST6B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->oelin; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char ExcST6B::debugName[] = "ExcST6B"; const char* ExcST6B::debugString() const { @@ -718,34 +736,34 @@ const char* ExcST6B::debugString() const void ExcST6B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcST6B"), &ExcST6B_factory)); + factory_map.emplace("cim:ExcST6B", &ExcST6B_factory); } void ExcST6B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.ilr"), &assign_ExcST6B_ilr)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.k1"), &assign_ExcST6B_k1)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.kcl"), &assign_ExcST6B_kcl)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.kff"), &assign_ExcST6B_kff)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.kg"), &assign_ExcST6B_kg)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.kia"), &assign_ExcST6B_kia)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.klr"), &assign_ExcST6B_klr)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.km"), &assign_ExcST6B_km)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.kpa"), &assign_ExcST6B_kpa)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.kvd"), &assign_ExcST6B_kvd)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.oelin"), &assign_ExcST6B_oelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.tg"), &assign_ExcST6B_tg)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.ts"), &assign_ExcST6B_ts)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.tvd"), &assign_ExcST6B_tvd)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.vamax"), &assign_ExcST6B_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.vamin"), &assign_ExcST6B_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.vilim"), &assign_ExcST6B_vilim)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.vimax"), &assign_ExcST6B_vimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.vimin"), &assign_ExcST6B_vimin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.vmult"), &assign_ExcST6B_vmult)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.vrmax"), &assign_ExcST6B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.vrmin"), &assign_ExcST6B_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.xc"), &assign_ExcST6B_xc)); + assign_map.emplace("cim:ExcST6B.ilr", &assign_ExcST6B_ilr); + assign_map.emplace("cim:ExcST6B.k1", &assign_ExcST6B_k1); + assign_map.emplace("cim:ExcST6B.kcl", &assign_ExcST6B_kcl); + assign_map.emplace("cim:ExcST6B.kff", &assign_ExcST6B_kff); + assign_map.emplace("cim:ExcST6B.kg", &assign_ExcST6B_kg); + assign_map.emplace("cim:ExcST6B.kia", &assign_ExcST6B_kia); + assign_map.emplace("cim:ExcST6B.klr", &assign_ExcST6B_klr); + assign_map.emplace("cim:ExcST6B.km", &assign_ExcST6B_km); + assign_map.emplace("cim:ExcST6B.kpa", &assign_ExcST6B_kpa); + assign_map.emplace("cim:ExcST6B.kvd", &assign_ExcST6B_kvd); + assign_map.emplace("cim:ExcST6B.oelin", &assign_ExcST6B_oelin); + assign_map.emplace("cim:ExcST6B.tg", &assign_ExcST6B_tg); + assign_map.emplace("cim:ExcST6B.ts", &assign_ExcST6B_ts); + assign_map.emplace("cim:ExcST6B.tvd", &assign_ExcST6B_tvd); + assign_map.emplace("cim:ExcST6B.vamax", &assign_ExcST6B_vamax); + assign_map.emplace("cim:ExcST6B.vamin", &assign_ExcST6B_vamin); + assign_map.emplace("cim:ExcST6B.vilim", &assign_ExcST6B_vilim); + assign_map.emplace("cim:ExcST6B.vimax", &assign_ExcST6B_vimax); + assign_map.emplace("cim:ExcST6B.vimin", &assign_ExcST6B_vimin); + assign_map.emplace("cim:ExcST6B.vmult", &assign_ExcST6B_vmult); + assign_map.emplace("cim:ExcST6B.vrmax", &assign_ExcST6B_vrmax); + assign_map.emplace("cim:ExcST6B.vrmin", &assign_ExcST6B_vrmin); + assign_map.emplace("cim:ExcST6B.xc", &assign_ExcST6B_xc); } void ExcST6B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcST6B.hpp b/CGMES_2.4.15_27JAN2020/ExcST6B.hpp index 2f7fef5c8..5b79ac602 100644 --- a/CGMES_2.4.15_27JAN2020/ExcST6B.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcST6B.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE ST6B static excitation system with PID controller and optional inner feedbacks loop. - */ + /** \brief Modified IEEE ST6B static excitation system with PID controller and optional inner feedbacks loop. */ class ExcST6B : public ExcitationSystemDynamics { public: @@ -30,29 +28,74 @@ namespace CIMPP ExcST6B(); ~ExcST6B() override; - CIMPP::PU ilr; /* Exciter output current limit reference (Ilr). Typical Value = 4.164. Default: nullptr */ - CIMPP::Boolean k1; /* Selector (K1). true = feedback is from Ifd false = feedback is not from Ifd. Typical Value = true. Default: false */ - CIMPP::PU kcl; /* Exciter output current limit adjustment (Kcl). Typical Value = 1.0577. Default: nullptr */ - CIMPP::PU kff; /* Pre-control gain constant of the inner loop field regulator (Kff). Typical Value = 1. Default: nullptr */ - CIMPP::PU kg; /* Feedback gain constant of the inner loop field regulator (Kg). Typical Value = 1. Default: nullptr */ - CIMPP::PU kia; /* Voltage regulator integral gain (Kia). Typical Value = 45.094. Default: nullptr */ - CIMPP::PU klr; /* Exciter output current limit adjustment (Kcl). Typical Value = 17.33. Default: nullptr */ - CIMPP::PU km; /* Forward gain constant of the inner loop field regulator (Km). Typical Value = 1. Default: nullptr */ - CIMPP::PU kpa; /* Voltage regulator proportional gain (Kpa). Typical Value = 18.038. Default: nullptr */ - CIMPP::PU kvd; /* Voltage regulator derivative gain (Kvd). Typical Value = 0. Default: nullptr */ - CIMPP::ExcST6BOELselectorKind oelin; /* OEL input selector (OELin). Typical Value = noOELinput. Default: 0 */ - CIMPP::Seconds tg; /* Feedback time constant of inner loop field voltage regulator (Tg). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds ts; /* Rectifier firing time constant (Ts). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tvd; /* Voltage regulator derivative gain (Tvd). Typical Value = 0. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (Vamax). Typical Value = 4.81. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (Vamin). Typical Value = -3.85. Default: nullptr */ - CIMPP::Boolean vilim; /* Selector (Vilim). true = Vimin-Vimax limiter is active false = Vimin-Vimax limiter is not active. Typical Value = true. Default: false */ - CIMPP::PU vimax; /* Maximum voltage regulator input limit (Vimax). Typical Value = 10. Default: nullptr */ - CIMPP::PU vimin; /* Minimum voltage regulator input limit (Vimin). Typical Value = -10. Default: nullptr */ - CIMPP::Boolean vmult; /* Selector (Vmult). true = multiply regulator output by terminal voltage false = do not multiply regulator output by terminal voltage. Typical Value = true. Default: false */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (Vrmax). Typical Value = 4.81. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (Vrmin). Typical Value = -3.85. Default: nullptr */ - CIMPP::PU xc; /* Excitation source reactance (Xc). Typical Value = 0.05. Default: nullptr */ + /** \brief Exciter output current limit reference (Ilr). Typical Value = 4.164. Default: nullptr */ + CIMPP::PU ilr; + + /** \brief Selector (K1). true = feedback is from Ifd false = feedback is not from Ifd. Typical Value = true. Default: false */ + CIMPP::Boolean k1; + + /** \brief Exciter output current limit adjustment (Kcl). Typical Value = 1.0577. Default: nullptr */ + CIMPP::PU kcl; + + /** \brief Pre-control gain constant of the inner loop field regulator (Kff). Typical Value = 1. Default: nullptr */ + CIMPP::PU kff; + + /** \brief Feedback gain constant of the inner loop field regulator (Kg). Typical Value = 1. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Voltage regulator integral gain (Kia). Typical Value = 45.094. Default: nullptr */ + CIMPP::PU kia; + + /** \brief Exciter output current limit adjustment (Kcl). Typical Value = 17.33. Default: nullptr */ + CIMPP::PU klr; + + /** \brief Forward gain constant of the inner loop field regulator (Km). Typical Value = 1. Default: nullptr */ + CIMPP::PU km; + + /** \brief Voltage regulator proportional gain (Kpa). Typical Value = 18.038. Default: nullptr */ + CIMPP::PU kpa; + + /** \brief Voltage regulator derivative gain (Kvd). Typical Value = 0. Default: nullptr */ + CIMPP::PU kvd; + + /** \brief OEL input selector (OELin). Typical Value = noOELinput. Default: 0 */ + CIMPP::ExcST6BOELselectorKind oelin; + + /** \brief Feedback time constant of inner loop field voltage regulator (Tg). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Rectifier firing time constant (Ts). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ts; + + /** \brief Voltage regulator derivative gain (Tvd). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tvd; + + /** \brief Maximum voltage regulator output (Vamax). Typical Value = 4.81. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (Vamin). Typical Value = -3.85. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Selector (Vilim). true = Vimin-Vimax limiter is active false = Vimin-Vimax limiter is not active. Typical Value = true. Default: false */ + CIMPP::Boolean vilim; + + /** \brief Maximum voltage regulator input limit (Vimax). Typical Value = 10. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Minimum voltage regulator input limit (Vimin). Typical Value = -10. Default: nullptr */ + CIMPP::PU vimin; + + /** \brief Selector (Vmult). true = multiply regulator output by terminal voltage false = do not multiply regulator output by terminal voltage. Typical Value = true. Default: false */ + CIMPP::Boolean vmult; + + /** \brief Maximum voltage regulator output (Vrmax). Typical Value = 4.81. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (Vrmin). Typical Value = -3.85. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief Excitation source reactance (Xc). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU xc; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcST6BOELselectorKind.cpp b/CGMES_2.4.15_27JAN2020/ExcST6BOELselectorKind.cpp index 4a1e0d921..51950ed6b 100644 --- a/CGMES_2.4.15_27JAN2020/ExcST6BOELselectorKind.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcST6BOELselectorKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "ExcST6BOELselectorKind") + if (EnumSymbol.substr(0, pos) != "ExcST6BOELselectorKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "noOELinput") + if (EnumSymbol == "noOELinput") { rop = ExcST6BOELselectorKind::noOELinput; return lop; } - if(EnumSymbol == "beforeUEL") + if (EnumSymbol == "beforeUEL") { rop = ExcST6BOELselectorKind::beforeUEL; return lop; } - if(EnumSymbol == "afterUEL") + if (EnumSymbol == "afterUEL") { rop = ExcST6BOELselectorKind::afterUEL; return lop; diff --git a/CGMES_2.4.15_27JAN2020/ExcST6BOELselectorKind.hpp b/CGMES_2.4.15_27JAN2020/ExcST6BOELselectorKind.hpp index b30b3b8df..da01aa9f6 100644 --- a/CGMES_2.4.15_27JAN2020/ExcST6BOELselectorKind.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcST6BOELselectorKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of connection for the OEL input used for static excitation systems type 6B. - */ + /** \brief Type of connection for the OEL input used for static excitation systems type 6B. */ class ExcST6BOELselectorKind { public: enum ExcST6BOELselectorKind_ENUM { - /** - * No OEL input is used. - */ + /** No OEL input is used. */ noOELinput, - /** - * The connection is before UEL. - */ + /** The connection is before UEL. */ beforeUEL, - /** - * The connection is after UEL. - */ + /** The connection is after UEL. */ afterUEL, }; diff --git a/CGMES_2.4.15_27JAN2020/ExcST7B.cpp b/CGMES_2.4.15_27JAN2020/ExcST7B.cpp index 1107dc70a..b353d3afa 100644 --- a/CGMES_2.4.15_27JAN2020/ExcST7B.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcST7B.cpp @@ -8,27 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ExcST7BOELselectorKind.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "ExcST7BUELselectorKind.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcST7B::ExcST7B() {}; -ExcST7B::~ExcST7B() {}; +ExcST7B::ExcST7B() {} +ExcST7B::~ExcST7B() {} static const std::list PossibleProfilesForClass = { @@ -70,220 +54,234 @@ ExcST7B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcST7B_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_kh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_kia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_kia(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kia; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_kl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_kl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_kpa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_kpa(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpa; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_oelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_oelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->oelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_tia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_tia(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tia; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_ts(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_ts(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_uelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_vmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_vmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcST7B_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh; if (!buffer.str().empty()) @@ -297,7 +295,8 @@ bool get_ExcST7B_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST7B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kia; if (!buffer.str().empty()) @@ -311,7 +310,8 @@ bool get_ExcST7B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST7B_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl; if (!buffer.str().empty()) @@ -325,7 +325,8 @@ bool get_ExcST7B_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST7B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpa; if (!buffer.str().empty()) @@ -337,9 +338,25 @@ bool get_ExcST7B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } +bool get_ExcST7B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->oelin; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_ExcST7B_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -353,7 +370,8 @@ bool get_ExcST7B_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST7B_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -367,7 +385,8 @@ bool get_ExcST7B_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST7B_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -381,7 +400,8 @@ bool get_ExcST7B_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST7B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -395,7 +415,8 @@ bool get_ExcST7B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST7B_tia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tia; if (!buffer.str().empty()) @@ -409,7 +430,8 @@ bool get_ExcST7B_tia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST7B_ts(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts; if (!buffer.str().empty()) @@ -421,25 +443,12 @@ bool get_ExcST7B_ts(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } -bool get_ExcST7B_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->vmax; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - -bool get_ExcST7B_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcST7B_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vmin; + buffer << element->uelin; if (!buffer.str().empty()) { return true; @@ -449,11 +458,12 @@ bool get_ExcST7B_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } -bool get_ExcST7B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcST7B_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vrmax; + buffer << element->vmax; if (!buffer.str().empty()) { return true; @@ -463,11 +473,12 @@ bool get_ExcST7B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } -bool get_ExcST7B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcST7B_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vrmin; + buffer << element->vmin; if (!buffer.str().empty()) { return true; @@ -477,13 +488,12 @@ bool get_ExcST7B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - -bool get_ExcST7B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcST7B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->oelin; + buffer << element->vrmax; if (!buffer.str().empty()) { return true; @@ -493,11 +503,12 @@ bool get_ExcST7B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } -bool get_ExcST7B_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcST7B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->uelin; + buffer << element->vrmin; if (!buffer.str().empty()) { return true; @@ -515,27 +526,27 @@ const char* ExcST7B::debugString() const void ExcST7B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcST7B"), &ExcST7B_factory)); + factory_map.emplace("cim:ExcST7B", &ExcST7B_factory); } void ExcST7B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.kh"), &assign_ExcST7B_kh)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.kia"), &assign_ExcST7B_kia)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.kl"), &assign_ExcST7B_kl)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.kpa"), &assign_ExcST7B_kpa)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.oelin"), &assign_ExcST7B_oelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.tb"), &assign_ExcST7B_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.tc"), &assign_ExcST7B_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.tf"), &assign_ExcST7B_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.tg"), &assign_ExcST7B_tg)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.tia"), &assign_ExcST7B_tia)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.ts"), &assign_ExcST7B_ts)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.uelin"), &assign_ExcST7B_uelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.vmax"), &assign_ExcST7B_vmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.vmin"), &assign_ExcST7B_vmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.vrmax"), &assign_ExcST7B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.vrmin"), &assign_ExcST7B_vrmin)); + assign_map.emplace("cim:ExcST7B.kh", &assign_ExcST7B_kh); + assign_map.emplace("cim:ExcST7B.kia", &assign_ExcST7B_kia); + assign_map.emplace("cim:ExcST7B.kl", &assign_ExcST7B_kl); + assign_map.emplace("cim:ExcST7B.kpa", &assign_ExcST7B_kpa); + assign_map.emplace("cim:ExcST7B.oelin", &assign_ExcST7B_oelin); + assign_map.emplace("cim:ExcST7B.tb", &assign_ExcST7B_tb); + assign_map.emplace("cim:ExcST7B.tc", &assign_ExcST7B_tc); + assign_map.emplace("cim:ExcST7B.tf", &assign_ExcST7B_tf); + assign_map.emplace("cim:ExcST7B.tg", &assign_ExcST7B_tg); + assign_map.emplace("cim:ExcST7B.tia", &assign_ExcST7B_tia); + assign_map.emplace("cim:ExcST7B.ts", &assign_ExcST7B_ts); + assign_map.emplace("cim:ExcST7B.uelin", &assign_ExcST7B_uelin); + assign_map.emplace("cim:ExcST7B.vmax", &assign_ExcST7B_vmax); + assign_map.emplace("cim:ExcST7B.vmin", &assign_ExcST7B_vmin); + assign_map.emplace("cim:ExcST7B.vrmax", &assign_ExcST7B_vrmax); + assign_map.emplace("cim:ExcST7B.vrmin", &assign_ExcST7B_vrmin); } void ExcST7B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExcST7B.hpp b/CGMES_2.4.15_27JAN2020/ExcST7B.hpp index 20c23baab..3a015ea97 100644 --- a/CGMES_2.4.15_27JAN2020/ExcST7B.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcST7B.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE ST7B static excitation system without stator current limiter (SCL) and current compensator (DROOP) inputs. - */ + /** \brief Modified IEEE ST7B static excitation system without stator current limiter (SCL) and current compensator (DROOP) inputs. */ class ExcST7B : public ExcitationSystemDynamics { public: @@ -30,22 +28,53 @@ namespace CIMPP ExcST7B(); ~ExcST7B() override; - CIMPP::PU kh; /* High-value gate feedback gain (Kh). Typical Value = 1. Default: nullptr */ - CIMPP::PU kia; /* Voltage regulator integral gain (Kia). Typical Value = 1. Default: nullptr */ - CIMPP::PU kl; /* Low-value gate feedback gain (Kl). Typical Value = 1. Default: nullptr */ - CIMPP::PU kpa; /* Voltage regulator proportional gain (Kpa). Typical Value = 40. Default: nullptr */ - CIMPP::ExcST7BOELselectorKind oelin; /* OEL input selector (OELin). Typical Value = noOELinput. Default: 0 */ - CIMPP::Seconds tb; /* Regulator lag time constant (Tb). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tc; /* Regulator lead time constant (Tc). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (Tf). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tg; /* Feedback time constant of inner loop field voltage regulator (Tg). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tia; /* Feedback time constant (Tia). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds ts; /* Rectifier firing time constant (Ts). Typical Value = 0. Default: nullptr */ - CIMPP::ExcST7BUELselectorKind uelin; /* UEL input selector (UELin). Typical Value = noUELinput. Default: 0 */ - CIMPP::PU vmax; /* Maximum voltage reference signal (Vmax). Typical Value = 1.1. Default: nullptr */ - CIMPP::PU vmin; /* Minimum voltage reference signal (Vmin). Typical Value = 0.9. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (Vrmax). Typical Value = 5. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (Vrmin). Typical Value = -4.5. Default: nullptr */ + /** \brief High-value gate feedback gain (Kh). Typical Value = 1. Default: nullptr */ + CIMPP::PU kh; + + /** \brief Voltage regulator integral gain (Kia). Typical Value = 1. Default: nullptr */ + CIMPP::PU kia; + + /** \brief Low-value gate feedback gain (Kl). Typical Value = 1. Default: nullptr */ + CIMPP::PU kl; + + /** \brief Voltage regulator proportional gain (Kpa). Typical Value = 40. Default: nullptr */ + CIMPP::PU kpa; + + /** \brief OEL input selector (OELin). Typical Value = noOELinput. Default: 0 */ + CIMPP::ExcST7BOELselectorKind oelin; + + /** \brief Regulator lag time constant (Tb). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Regulator lead time constant (Tc). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Excitation control system stabilizer time constant (Tf). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Feedback time constant of inner loop field voltage regulator (Tg). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Feedback time constant (Tia). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds tia; + + /** \brief Rectifier firing time constant (Ts). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ts; + + /** \brief UEL input selector (UELin). Typical Value = noUELinput. Default: 0 */ + CIMPP::ExcST7BUELselectorKind uelin; + + /** \brief Maximum voltage reference signal (Vmax). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU vmax; + + /** \brief Minimum voltage reference signal (Vmin). Typical Value = 0.9. Default: nullptr */ + CIMPP::PU vmin; + + /** \brief Maximum voltage regulator output (Vrmax). Typical Value = 5. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (Vrmin). Typical Value = -4.5. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcST7BOELselectorKind.cpp b/CGMES_2.4.15_27JAN2020/ExcST7BOELselectorKind.cpp index d400a7859..dada552c0 100644 --- a/CGMES_2.4.15_27JAN2020/ExcST7BOELselectorKind.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcST7BOELselectorKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "ExcST7BOELselectorKind") + if (EnumSymbol.substr(0, pos) != "ExcST7BOELselectorKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,22 +50,22 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "noOELinput") + if (EnumSymbol == "noOELinput") { rop = ExcST7BOELselectorKind::noOELinput; return lop; } - if(EnumSymbol == "addVref") + if (EnumSymbol == "addVref") { rop = ExcST7BOELselectorKind::addVref; return lop; } - if(EnumSymbol == "inputLVgate") + if (EnumSymbol == "inputLVgate") { rop = ExcST7BOELselectorKind::inputLVgate; return lop; } - if(EnumSymbol == "outputLVgate") + if (EnumSymbol == "outputLVgate") { rop = ExcST7BOELselectorKind::outputLVgate; return lop; diff --git a/CGMES_2.4.15_27JAN2020/ExcST7BOELselectorKind.hpp b/CGMES_2.4.15_27JAN2020/ExcST7BOELselectorKind.hpp index 66d97cdae..12dda93d8 100644 --- a/CGMES_2.4.15_27JAN2020/ExcST7BOELselectorKind.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcST7BOELselectorKind.hpp @@ -9,29 +9,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of connection for the OEL input used for static excitation systems type 7B. - */ + /** \brief Type of connection for the OEL input used for static excitation systems type 7B. */ class ExcST7BOELselectorKind { public: enum ExcST7BOELselectorKind_ENUM { - /** - * No OEL input is used. - */ + /** No OEL input is used. */ noOELinput, - /** - * The signal is added to Vref. - */ + /** The signal is added to Vref. */ addVref, - /** - * The signal is connected in the input of the LV gate. - */ + /** The signal is connected in the input of the LV gate. */ inputLVgate, - /** - * The signal is connected in the output of the LV gate. - */ + /** The signal is connected in the output of the LV gate. */ outputLVgate, }; diff --git a/CGMES_2.4.15_27JAN2020/ExcST7BUELselectorKind.cpp b/CGMES_2.4.15_27JAN2020/ExcST7BUELselectorKind.cpp index 2260a4e4d..b1e5d769d 100644 --- a/CGMES_2.4.15_27JAN2020/ExcST7BUELselectorKind.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcST7BUELselectorKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "ExcST7BUELselectorKind") + if (EnumSymbol.substr(0, pos) != "ExcST7BUELselectorKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,22 +50,22 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "noUELinput") + if (EnumSymbol == "noUELinput") { rop = ExcST7BUELselectorKind::noUELinput; return lop; } - if(EnumSymbol == "addVref") + if (EnumSymbol == "addVref") { rop = ExcST7BUELselectorKind::addVref; return lop; } - if(EnumSymbol == "inputHVgate") + if (EnumSymbol == "inputHVgate") { rop = ExcST7BUELselectorKind::inputHVgate; return lop; } - if(EnumSymbol == "outputHVgate") + if (EnumSymbol == "outputHVgate") { rop = ExcST7BUELselectorKind::outputHVgate; return lop; diff --git a/CGMES_2.4.15_27JAN2020/ExcST7BUELselectorKind.hpp b/CGMES_2.4.15_27JAN2020/ExcST7BUELselectorKind.hpp index b509d7dad..59ed16d28 100644 --- a/CGMES_2.4.15_27JAN2020/ExcST7BUELselectorKind.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcST7BUELselectorKind.hpp @@ -9,29 +9,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of connection for the UEL input used for static excitation systems type 7B. - */ + /** \brief Type of connection for the UEL input used for static excitation systems type 7B. */ class ExcST7BUELselectorKind { public: enum ExcST7BUELselectorKind_ENUM { - /** - * No UEL input is used. - */ + /** No UEL input is used. */ noUELinput, - /** - * The signal is added to Vref. - */ + /** The signal is added to Vref. */ addVref, - /** - * The signal is connected in the input of the HV gate. - */ + /** The signal is connected in the input of the HV gate. */ inputHVgate, - /** - * The signal is connected in the output of the HV gate. - */ + /** The signal is connected in the output of the HV gate. */ outputHVgate, }; diff --git a/CGMES_2.4.15_27JAN2020/ExcitationSystemDynamics.cpp b/CGMES_2.4.15_27JAN2020/ExcitationSystemDynamics.cpp index dcd25126a..540af8c6a 100644 --- a/CGMES_2.4.15_27JAN2020/ExcitationSystemDynamics.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcitationSystemDynamics.cpp @@ -19,8 +19,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ExcitationSystemDynamics::ExcitationSystemDynamics() : DiscontinuousExcitationControlDynamics(nullptr), OverexcitationLimiterDynamics(nullptr), PFVArControllerType1Dynamics(nullptr), PFVArControllerType2Dynamics(nullptr), PowerSystemStabilizerDynamics(nullptr), SynchronousMachineDynamics(nullptr), UnderexcitationLimiterDynamics(nullptr), VoltageCompensatorDynamics(nullptr) {}; -ExcitationSystemDynamics::~ExcitationSystemDynamics() {}; +ExcitationSystemDynamics::ExcitationSystemDynamics() : DiscontinuousExcitationControlDynamics(nullptr), OverexcitationLimiterDynamics(nullptr), PFVArControllerType1Dynamics(nullptr), PFVArControllerType2Dynamics(nullptr), PowerSystemStabilizerDynamics(nullptr), SynchronousMachineDynamics(nullptr), UnderexcitationLimiterDynamics(nullptr), VoltageCompensatorDynamics(nullptr) {} +ExcitationSystemDynamics::~ExcitationSystemDynamics() {} static const std::list PossibleProfilesForClass = { @@ -54,8 +54,6 @@ ExcitationSystemDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_DiscontinuousExcitationControlDynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); bool assign_ExcitationSystemDynamics_DiscontinuousExcitationControlDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -72,6 +70,7 @@ bool assign_ExcitationSystemDynamics_DiscontinuousExcitationControlDynamics(Base } return false; } + bool assign_OverexcitationLimiterDynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); bool assign_ExcitationSystemDynamics_OverexcitationLimiterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -88,6 +87,7 @@ bool assign_ExcitationSystemDynamics_OverexcitationLimiterDynamics(BaseClass* Ba } return false; } + bool assign_PFVArControllerType1Dynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); bool assign_ExcitationSystemDynamics_PFVArControllerType1Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -104,6 +104,7 @@ bool assign_ExcitationSystemDynamics_PFVArControllerType1Dynamics(BaseClass* Bas } return false; } + bool assign_PFVArControllerType2Dynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); bool assign_ExcitationSystemDynamics_PFVArControllerType2Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -120,6 +121,7 @@ bool assign_ExcitationSystemDynamics_PFVArControllerType2Dynamics(BaseClass* Bas } return false; } + bool assign_PowerSystemStabilizerDynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); bool assign_ExcitationSystemDynamics_PowerSystemStabilizerDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -136,6 +138,7 @@ bool assign_ExcitationSystemDynamics_PowerSystemStabilizerDynamics(BaseClass* Ba } return false; } + bool assign_SynchronousMachineDynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); bool assign_ExcitationSystemDynamics_SynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -152,6 +155,7 @@ bool assign_ExcitationSystemDynamics_SynchronousMachineDynamics(BaseClass* BaseC } return false; } + bool assign_UnderexcitationLimiterDynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); bool assign_ExcitationSystemDynamics_UnderexcitationLimiterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -168,6 +172,7 @@ bool assign_ExcitationSystemDynamics_UnderexcitationLimiterDynamics(BaseClass* B } return false; } + bool assign_VoltageCompensatorDynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); bool assign_ExcitationSystemDynamics_VoltageCompensatorDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -186,9 +191,14 @@ bool assign_ExcitationSystemDynamics_VoltageCompensatorDynamics(BaseClass* BaseC } + + + + bool get_ExcitationSystemDynamics_SynchronousMachineDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ExcitationSystemDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ExcitationSystemDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->SynchronousMachineDynamics != 0) { @@ -200,6 +210,7 @@ bool get_ExcitationSystemDynamics_SynchronousMachineDynamics(const BaseClass* Ba } + const char ExcitationSystemDynamics::debugName[] = "ExcitationSystemDynamics"; const char* ExcitationSystemDynamics::debugString() const { @@ -208,7 +219,7 @@ const char* ExcitationSystemDynamics::debugString() const void ExcitationSystemDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics"), &ExcitationSystemDynamics_factory)); + factory_map.emplace("cim:ExcitationSystemDynamics", &ExcitationSystemDynamics_factory); } void ExcitationSystemDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -217,14 +228,14 @@ void ExcitationSystemDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics.DiscontinuousExcitationControlDynamics"), &assign_ExcitationSystemDynamics_DiscontinuousExcitationControlDynamics)); - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics.OverexcitationLimiterDynamics"), &assign_ExcitationSystemDynamics_OverexcitationLimiterDynamics)); - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics.PFVArControllerType1Dynamics"), &assign_ExcitationSystemDynamics_PFVArControllerType1Dynamics)); - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics.PFVArControllerType2Dynamics"), &assign_ExcitationSystemDynamics_PFVArControllerType2Dynamics)); - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics.PowerSystemStabilizerDynamics"), &assign_ExcitationSystemDynamics_PowerSystemStabilizerDynamics)); - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics.SynchronousMachineDynamics"), &assign_ExcitationSystemDynamics_SynchronousMachineDynamics)); - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics.UnderexcitationLimiterDynamics"), &assign_ExcitationSystemDynamics_UnderexcitationLimiterDynamics)); - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics.VoltageCompensatorDynamics"), &assign_ExcitationSystemDynamics_VoltageCompensatorDynamics)); + assign_map.emplace("cim:ExcitationSystemDynamics.DiscontinuousExcitationControlDynamics", &assign_ExcitationSystemDynamics_DiscontinuousExcitationControlDynamics); + assign_map.emplace("cim:ExcitationSystemDynamics.OverexcitationLimiterDynamics", &assign_ExcitationSystemDynamics_OverexcitationLimiterDynamics); + assign_map.emplace("cim:ExcitationSystemDynamics.PFVArControllerType1Dynamics", &assign_ExcitationSystemDynamics_PFVArControllerType1Dynamics); + assign_map.emplace("cim:ExcitationSystemDynamics.PFVArControllerType2Dynamics", &assign_ExcitationSystemDynamics_PFVArControllerType2Dynamics); + assign_map.emplace("cim:ExcitationSystemDynamics.PowerSystemStabilizerDynamics", &assign_ExcitationSystemDynamics_PowerSystemStabilizerDynamics); + assign_map.emplace("cim:ExcitationSystemDynamics.SynchronousMachineDynamics", &assign_ExcitationSystemDynamics_SynchronousMachineDynamics); + assign_map.emplace("cim:ExcitationSystemDynamics.UnderexcitationLimiterDynamics", &assign_ExcitationSystemDynamics_UnderexcitationLimiterDynamics); + assign_map.emplace("cim:ExcitationSystemDynamics.VoltageCompensatorDynamics", &assign_ExcitationSystemDynamics_VoltageCompensatorDynamics); } void ExcitationSystemDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/ExcitationSystemDynamics.hpp b/CGMES_2.4.15_27JAN2020/ExcitationSystemDynamics.hpp index eb633b2b1..eb20de209 100644 --- a/CGMES_2.4.15_27JAN2020/ExcitationSystemDynamics.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcitationSystemDynamics.hpp @@ -24,9 +24,7 @@ namespace CIMPP class UnderexcitationLimiterDynamics; class VoltageCompensatorDynamics; - /* - Excitation system function block whose behavior is described by reference to a standard model - */ + /** \brief Excitation system function block whose behavior is described by reference to a standard model */ class ExcitationSystemDynamics : public DynamicsFunctionBlock { public: @@ -34,14 +32,29 @@ namespace CIMPP ExcitationSystemDynamics(); ~ExcitationSystemDynamics() override; - CIMPP::DiscontinuousExcitationControlDynamics* DiscontinuousExcitationControlDynamics; /* Discontinuous excitation control model associated with this excitation system model. Default: 0 */ - CIMPP::OverexcitationLimiterDynamics* OverexcitationLimiterDynamics; /* Overexcitation limiter model associated with this excitation system model. Default: 0 */ - CIMPP::PFVArControllerType1Dynamics* PFVArControllerType1Dynamics; /* Power Factor or VAr controller Type I model associated with this excitation system model. Default: 0 */ - CIMPP::PFVArControllerType2Dynamics* PFVArControllerType2Dynamics; /* Power Factor or VAr controller Type II model associated with this excitation system model. Default: 0 */ - CIMPP::PowerSystemStabilizerDynamics* PowerSystemStabilizerDynamics; /* Power system stabilizer model associated with this excitation system model. Default: 0 */ - CIMPP::SynchronousMachineDynamics* SynchronousMachineDynamics; /* Synchronous machine model with which this excitation system model is associated. Default: 0 */ - CIMPP::UnderexcitationLimiterDynamics* UnderexcitationLimiterDynamics; /* Undrexcitation limiter model associated with this excitation system model. Default: 0 */ - CIMPP::VoltageCompensatorDynamics* VoltageCompensatorDynamics; /* Voltage compensator model associated with this excitation system model. Default: 0 */ + /** \brief Discontinuous excitation control model associated with this excitation system model. Default: 0 */ + CIMPP::DiscontinuousExcitationControlDynamics* DiscontinuousExcitationControlDynamics; + + /** \brief Overexcitation limiter model associated with this excitation system model. Default: 0 */ + CIMPP::OverexcitationLimiterDynamics* OverexcitationLimiterDynamics; + + /** \brief Power Factor or VAr controller Type I model associated with this excitation system model. Default: 0 */ + CIMPP::PFVArControllerType1Dynamics* PFVArControllerType1Dynamics; + + /** \brief Power Factor or VAr controller Type II model associated with this excitation system model. Default: 0 */ + CIMPP::PFVArControllerType2Dynamics* PFVArControllerType2Dynamics; + + /** \brief Power system stabilizer model associated with this excitation system model. Default: 0 */ + CIMPP::PowerSystemStabilizerDynamics* PowerSystemStabilizerDynamics; + + /** \brief Synchronous machine model with which this excitation system model is associated. Default: 0 */ + CIMPP::SynchronousMachineDynamics* SynchronousMachineDynamics; + + /** \brief Undrexcitation limiter model associated with this excitation system model. Default: 0 */ + CIMPP::UnderexcitationLimiterDynamics* UnderexcitationLimiterDynamics; + + /** \brief Voltage compensator model associated with this excitation system model. Default: 0 */ + CIMPP::VoltageCompensatorDynamics* VoltageCompensatorDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExcitationSystemUserDefined.cpp b/CGMES_2.4.15_27JAN2020/ExcitationSystemUserDefined.cpp index 15f84f6b0..362ef357e 100644 --- a/CGMES_2.4.15_27JAN2020/ExcitationSystemUserDefined.cpp +++ b/CGMES_2.4.15_27JAN2020/ExcitationSystemUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -ExcitationSystemUserDefined::ExcitationSystemUserDefined() {}; -ExcitationSystemUserDefined::~ExcitationSystemUserDefined() {}; +ExcitationSystemUserDefined::ExcitationSystemUserDefined() {} +ExcitationSystemUserDefined::~ExcitationSystemUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ ExcitationSystemUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcitationSystemUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ExcitationSystemUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_ExcitationSystemUserDefined(BaseClass*, BaseClass*); bool assign_ExcitationSystemUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_ExcitationSystemUserDefined_ProprietaryParameterDynamics(BaseClass* return false; } +bool assign_ExcitationSystemUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + ExcitationSystemUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_ExcitationSystemUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcitationSystemUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const ExcitationSystemUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_ExcitationSystemUserDefined_proprietary(const BaseClass* BaseClass_ptr1 return false; } - - const char ExcitationSystemUserDefined::debugName[] = "ExcitationSystemUserDefined"; const char* ExcitationSystemUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* ExcitationSystemUserDefined::debugString() const void ExcitationSystemUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcitationSystemUserDefined"), &ExcitationSystemUserDefined_factory)); + factory_map.emplace("cim:ExcitationSystemUserDefined", &ExcitationSystemUserDefined_factory); } void ExcitationSystemUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemUserDefined.proprietary"), &assign_ExcitationSystemUserDefined_proprietary)); + assign_map.emplace("cim:ExcitationSystemUserDefined.proprietary", &assign_ExcitationSystemUserDefined_proprietary); } void ExcitationSystemUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemUserDefined.ProprietaryParameterDynamics"), &assign_ExcitationSystemUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:ExcitationSystemUserDefined.ProprietaryParameterDynamics", &assign_ExcitationSystemUserDefined_ProprietaryParameterDynamics); } void ExcitationSystemUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/ExcitationSystemUserDefined.hpp b/CGMES_2.4.15_27JAN2020/ExcitationSystemUserDefined.hpp index f5d11a2fe..02b86bd95 100644 --- a/CGMES_2.4.15_27JAN2020/ExcitationSystemUserDefined.hpp +++ b/CGMES_2.4.15_27JAN2020/ExcitationSystemUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Excitation system function block whose dynamic behaviour is described by - */ + /** \brief Excitation system function block whose dynamic behaviour is described by */ class ExcitationSystemUserDefined : public ExcitationSystemDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP ExcitationSystemUserDefined(); ~ExcitationSystemUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ExternalNetworkInjection.cpp b/CGMES_2.4.15_27JAN2020/ExternalNetworkInjection.cpp index 39d931fff..134627b99 100644 --- a/CGMES_2.4.15_27JAN2020/ExternalNetworkInjection.cpp +++ b/CGMES_2.4.15_27JAN2020/ExternalNetworkInjection.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "ActivePowerPerFrequency.hpp" -#include "Boolean.hpp" -#include "CurrentFlow.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "CurrentFlow.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" -#include "Integer.hpp" -#include "PU.hpp" using namespace CIMPP; -ExternalNetworkInjection::ExternalNetworkInjection() {}; -ExternalNetworkInjection::~ExternalNetworkInjection() {}; +ExternalNetworkInjection::ExternalNetworkInjection() {} +ExternalNetworkInjection::~ExternalNetworkInjection() {} static const std::list PossibleProfilesForClass = { @@ -75,246 +57,262 @@ ExternalNetworkInjection::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExternalNetworkInjection_governorSCD(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_governorSCD(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->governorSCD; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_ikSecond(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_ikSecond(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ikSecond; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_maxInitialSymShCCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_maxInitialSymShCCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxInitialSymShCCurrent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_maxP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_maxP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_maxQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_maxQ(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxQ; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_maxR0ToX0Ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_maxR0ToX0Ratio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxR0ToX0Ratio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_maxR1ToX1Ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_maxR1ToX1Ratio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxR1ToX1Ratio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_maxZ0ToZ1Ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_maxZ0ToZ1Ratio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxZ0ToZ1Ratio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_minInitialSymShCCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_minInitialSymShCCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minInitialSymShCCurrent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_minP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_minP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_minQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_minQ(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minQ; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_minR0ToX0Ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_minR0ToX0Ratio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minR0ToX0Ratio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_minR1ToX1Ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_minR1ToX1Ratio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minR1ToX1Ratio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_minZ0ToZ1Ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_minZ0ToZ1Ratio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minZ0ToZ1Ratio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_p(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_referencePriority(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_referencePriority(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->referencePriority; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_voltageFactor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_voltageFactor(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->voltageFactor; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExternalNetworkInjection_governorSCD(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->governorSCD; if (!buffer.str().empty()) @@ -328,7 +326,8 @@ bool get_ExternalNetworkInjection_governorSCD(const BaseClass* BaseClass_ptr1, s bool get_ExternalNetworkInjection_ikSecond(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ikSecond; if (!buffer.str().empty()) @@ -342,7 +341,8 @@ bool get_ExternalNetworkInjection_ikSecond(const BaseClass* BaseClass_ptr1, std: bool get_ExternalNetworkInjection_maxInitialSymShCCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxInitialSymShCCurrent; if (!buffer.str().empty()) @@ -356,7 +356,8 @@ bool get_ExternalNetworkInjection_maxInitialSymShCCurrent(const BaseClass* BaseC bool get_ExternalNetworkInjection_maxP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxP; if (!buffer.str().empty()) @@ -370,7 +371,8 @@ bool get_ExternalNetworkInjection_maxP(const BaseClass* BaseClass_ptr1, std::str bool get_ExternalNetworkInjection_maxQ(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxQ; if (!buffer.str().empty()) @@ -384,7 +386,8 @@ bool get_ExternalNetworkInjection_maxQ(const BaseClass* BaseClass_ptr1, std::str bool get_ExternalNetworkInjection_maxR0ToX0Ratio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxR0ToX0Ratio; if (!buffer.str().empty()) @@ -398,7 +401,8 @@ bool get_ExternalNetworkInjection_maxR0ToX0Ratio(const BaseClass* BaseClass_ptr1 bool get_ExternalNetworkInjection_maxR1ToX1Ratio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxR1ToX1Ratio; if (!buffer.str().empty()) @@ -412,7 +416,8 @@ bool get_ExternalNetworkInjection_maxR1ToX1Ratio(const BaseClass* BaseClass_ptr1 bool get_ExternalNetworkInjection_maxZ0ToZ1Ratio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxZ0ToZ1Ratio; if (!buffer.str().empty()) @@ -426,7 +431,8 @@ bool get_ExternalNetworkInjection_maxZ0ToZ1Ratio(const BaseClass* BaseClass_ptr1 bool get_ExternalNetworkInjection_minInitialSymShCCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minInitialSymShCCurrent; if (!buffer.str().empty()) @@ -440,7 +446,8 @@ bool get_ExternalNetworkInjection_minInitialSymShCCurrent(const BaseClass* BaseC bool get_ExternalNetworkInjection_minP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minP; if (!buffer.str().empty()) @@ -454,7 +461,8 @@ bool get_ExternalNetworkInjection_minP(const BaseClass* BaseClass_ptr1, std::str bool get_ExternalNetworkInjection_minQ(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minQ; if (!buffer.str().empty()) @@ -468,7 +476,8 @@ bool get_ExternalNetworkInjection_minQ(const BaseClass* BaseClass_ptr1, std::str bool get_ExternalNetworkInjection_minR0ToX0Ratio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minR0ToX0Ratio; if (!buffer.str().empty()) @@ -482,7 +491,8 @@ bool get_ExternalNetworkInjection_minR0ToX0Ratio(const BaseClass* BaseClass_ptr1 bool get_ExternalNetworkInjection_minR1ToX1Ratio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minR1ToX1Ratio; if (!buffer.str().empty()) @@ -496,7 +506,8 @@ bool get_ExternalNetworkInjection_minR1ToX1Ratio(const BaseClass* BaseClass_ptr1 bool get_ExternalNetworkInjection_minZ0ToZ1Ratio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minZ0ToZ1Ratio; if (!buffer.str().empty()) @@ -510,7 +521,8 @@ bool get_ExternalNetworkInjection_minZ0ToZ1Ratio(const BaseClass* BaseClass_ptr1 bool get_ExternalNetworkInjection_p(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p; if (!buffer.str().empty()) @@ -524,7 +536,8 @@ bool get_ExternalNetworkInjection_p(const BaseClass* BaseClass_ptr1, std::string bool get_ExternalNetworkInjection_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q; if (!buffer.str().empty()) @@ -538,7 +551,8 @@ bool get_ExternalNetworkInjection_q(const BaseClass* BaseClass_ptr1, std::string bool get_ExternalNetworkInjection_referencePriority(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->referencePriority; if (!buffer.str().empty()) @@ -552,7 +566,8 @@ bool get_ExternalNetworkInjection_referencePriority(const BaseClass* BaseClass_p bool get_ExternalNetworkInjection_voltageFactor(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->voltageFactor; if (!buffer.str().empty()) @@ -564,8 +579,6 @@ bool get_ExternalNetworkInjection_voltageFactor(const BaseClass* BaseClass_ptr1, return false; } - - const char ExternalNetworkInjection::debugName[] = "ExternalNetworkInjection"; const char* ExternalNetworkInjection::debugString() const { @@ -574,29 +587,29 @@ const char* ExternalNetworkInjection::debugString() const void ExternalNetworkInjection::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection"), &ExternalNetworkInjection_factory)); + factory_map.emplace("cim:ExternalNetworkInjection", &ExternalNetworkInjection_factory); } void ExternalNetworkInjection::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.governorSCD"), &assign_ExternalNetworkInjection_governorSCD)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.ikSecond"), &assign_ExternalNetworkInjection_ikSecond)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.maxInitialSymShCCurrent"), &assign_ExternalNetworkInjection_maxInitialSymShCCurrent)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.maxP"), &assign_ExternalNetworkInjection_maxP)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.maxQ"), &assign_ExternalNetworkInjection_maxQ)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.maxR0ToX0Ratio"), &assign_ExternalNetworkInjection_maxR0ToX0Ratio)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.maxR1ToX1Ratio"), &assign_ExternalNetworkInjection_maxR1ToX1Ratio)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.maxZ0ToZ1Ratio"), &assign_ExternalNetworkInjection_maxZ0ToZ1Ratio)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.minInitialSymShCCurrent"), &assign_ExternalNetworkInjection_minInitialSymShCCurrent)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.minP"), &assign_ExternalNetworkInjection_minP)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.minQ"), &assign_ExternalNetworkInjection_minQ)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.minR0ToX0Ratio"), &assign_ExternalNetworkInjection_minR0ToX0Ratio)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.minR1ToX1Ratio"), &assign_ExternalNetworkInjection_minR1ToX1Ratio)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.minZ0ToZ1Ratio"), &assign_ExternalNetworkInjection_minZ0ToZ1Ratio)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.p"), &assign_ExternalNetworkInjection_p)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.q"), &assign_ExternalNetworkInjection_q)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.referencePriority"), &assign_ExternalNetworkInjection_referencePriority)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.voltageFactor"), &assign_ExternalNetworkInjection_voltageFactor)); + assign_map.emplace("cim:ExternalNetworkInjection.governorSCD", &assign_ExternalNetworkInjection_governorSCD); + assign_map.emplace("cim:ExternalNetworkInjection.ikSecond", &assign_ExternalNetworkInjection_ikSecond); + assign_map.emplace("cim:ExternalNetworkInjection.maxInitialSymShCCurrent", &assign_ExternalNetworkInjection_maxInitialSymShCCurrent); + assign_map.emplace("cim:ExternalNetworkInjection.maxP", &assign_ExternalNetworkInjection_maxP); + assign_map.emplace("cim:ExternalNetworkInjection.maxQ", &assign_ExternalNetworkInjection_maxQ); + assign_map.emplace("cim:ExternalNetworkInjection.maxR0ToX0Ratio", &assign_ExternalNetworkInjection_maxR0ToX0Ratio); + assign_map.emplace("cim:ExternalNetworkInjection.maxR1ToX1Ratio", &assign_ExternalNetworkInjection_maxR1ToX1Ratio); + assign_map.emplace("cim:ExternalNetworkInjection.maxZ0ToZ1Ratio", &assign_ExternalNetworkInjection_maxZ0ToZ1Ratio); + assign_map.emplace("cim:ExternalNetworkInjection.minInitialSymShCCurrent", &assign_ExternalNetworkInjection_minInitialSymShCCurrent); + assign_map.emplace("cim:ExternalNetworkInjection.minP", &assign_ExternalNetworkInjection_minP); + assign_map.emplace("cim:ExternalNetworkInjection.minQ", &assign_ExternalNetworkInjection_minQ); + assign_map.emplace("cim:ExternalNetworkInjection.minR0ToX0Ratio", &assign_ExternalNetworkInjection_minR0ToX0Ratio); + assign_map.emplace("cim:ExternalNetworkInjection.minR1ToX1Ratio", &assign_ExternalNetworkInjection_minR1ToX1Ratio); + assign_map.emplace("cim:ExternalNetworkInjection.minZ0ToZ1Ratio", &assign_ExternalNetworkInjection_minZ0ToZ1Ratio); + assign_map.emplace("cim:ExternalNetworkInjection.p", &assign_ExternalNetworkInjection_p); + assign_map.emplace("cim:ExternalNetworkInjection.q", &assign_ExternalNetworkInjection_q); + assign_map.emplace("cim:ExternalNetworkInjection.referencePriority", &assign_ExternalNetworkInjection_referencePriority); + assign_map.emplace("cim:ExternalNetworkInjection.voltageFactor", &assign_ExternalNetworkInjection_voltageFactor); } void ExternalNetworkInjection::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ExternalNetworkInjection.hpp b/CGMES_2.4.15_27JAN2020/ExternalNetworkInjection.hpp index b74ba9ef6..e4e61c828 100644 --- a/CGMES_2.4.15_27JAN2020/ExternalNetworkInjection.hpp +++ b/CGMES_2.4.15_27JAN2020/ExternalNetworkInjection.hpp @@ -24,9 +24,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - This class represents external network and it is used for IEC 60909 calculations. - */ + /** \brief This class represents external network and it is used for IEC 60909 calculations. */ class ExternalNetworkInjection : public RegulatingCondEq { public: @@ -34,24 +32,59 @@ namespace CIMPP ExternalNetworkInjection(); ~ExternalNetworkInjection() override; - CIMPP::ActivePowerPerFrequency governorSCD; /* Power Frequency Bias. This is the change in power injection divided by the change in frequency and negated. A positive value of the power frequency bias provides additional power injection upon a drop in frequency. Default: nullptr */ - CIMPP::Boolean ikSecond; /* Indicates whether initial symmetrical short-circuit current and power have been calculated according to IEC (Ik`). Default: false */ - CIMPP::CurrentFlow maxInitialSymShCCurrent; /* Maximum initial symmetrical short-circuit currents (Ik` max) in A (Ik` = Sk`/(SQRT(3) Un)). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::ActivePower maxP; /* Maximum active power of the injection. Default: nullptr */ - CIMPP::ReactivePower maxQ; /* Not for short circuit modelling; It is used for modelling of infeed for load flow exchange. If maxQ and minQ are not used ReactiveCapabilityCurve can be used Default: nullptr */ - CIMPP::Simple_Float maxR0ToX0Ratio; /* Maximum ratio of zero sequence resistance of Network Feeder to its zero sequence reactance (R(0)/X(0) max). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::Simple_Float maxR1ToX1Ratio; /* Maximum ratio of positive sequence resistance of Network Feeder to its positive sequence reactance (R(1)/X(1) max). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::Simple_Float maxZ0ToZ1Ratio; /* Maximum ratio of zero sequence impedance to its positive sequence impedance (Z(0)/Z(1) max). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::CurrentFlow minInitialSymShCCurrent; /* Minimum initial symmetrical short-circuit currents (Ik` min) in A (Ik` = Sk`/(SQRT(3) Un)). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::ActivePower minP; /* Minimum active power of the injection. Default: nullptr */ - CIMPP::ReactivePower minQ; /* Not for short circuit modelling; It is used for modelling of infeed for load flow exchange. If maxQ and minQ are not used ReactiveCapabilityCurve can be used Default: nullptr */ - CIMPP::Simple_Float minR0ToX0Ratio; /* Indicates whether initial symmetrical short-circuit current and power have been calculated according to IEC (Ik`). Used for short circuit data exchange according to IEC 6090 Default: nullptr */ - CIMPP::Simple_Float minR1ToX1Ratio; /* Minimum ratio of positive sequence resistance of Network Feeder to its positive sequence reactance (R(1)/X(1) min). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::Simple_Float minZ0ToZ1Ratio; /* Minimum ratio of zero sequence impedance to its positive sequence impedance (Z(0)/Z(1) min). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::ActivePower p; /* Active power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ - CIMPP::ReactivePower q; /* Reactive power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ - CIMPP::Integer referencePriority; /* Priority of unit for use as powerflow voltage phase angle reference bus selection. 0 = don t care (default) 1 = highest priority. 2 is less than 1 and so on. Default: 0 */ - CIMPP::PU voltageFactor; /* Voltage factor in pu, which was used to calculate short-circuit current Ik` and power Sk`. Default: nullptr */ + /** \brief Power Frequency Bias. This is the change in power injection divided by the change in frequency and negated. A positive value of the power frequency bias provides additional power injection upon a drop in frequency. Default: nullptr */ + CIMPP::ActivePowerPerFrequency governorSCD; + + /** \brief Indicates whether initial symmetrical short-circuit current and power have been calculated according to IEC (Ik`). Default: false */ + CIMPP::Boolean ikSecond; + + /** \brief Maximum initial symmetrical short-circuit currents (Ik` max) in A (Ik` = Sk`/(SQRT(3) Un)). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::CurrentFlow maxInitialSymShCCurrent; + + /** \brief Maximum active power of the injection. Default: nullptr */ + CIMPP::ActivePower maxP; + + /** \brief Not for short circuit modelling; It is used for modelling of infeed for load flow exchange. If maxQ and minQ are not used ReactiveCapabilityCurve can be used Default: nullptr */ + CIMPP::ReactivePower maxQ; + + /** \brief Maximum ratio of zero sequence resistance of Network Feeder to its zero sequence reactance (R(0)/X(0) max). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::Simple_Float maxR0ToX0Ratio; + + /** \brief Maximum ratio of positive sequence resistance of Network Feeder to its positive sequence reactance (R(1)/X(1) max). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::Simple_Float maxR1ToX1Ratio; + + /** \brief Maximum ratio of zero sequence impedance to its positive sequence impedance (Z(0)/Z(1) max). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::Simple_Float maxZ0ToZ1Ratio; + + /** \brief Minimum initial symmetrical short-circuit currents (Ik` min) in A (Ik` = Sk`/(SQRT(3) Un)). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::CurrentFlow minInitialSymShCCurrent; + + /** \brief Minimum active power of the injection. Default: nullptr */ + CIMPP::ActivePower minP; + + /** \brief Not for short circuit modelling; It is used for modelling of infeed for load flow exchange. If maxQ and minQ are not used ReactiveCapabilityCurve can be used Default: nullptr */ + CIMPP::ReactivePower minQ; + + /** \brief Indicates whether initial symmetrical short-circuit current and power have been calculated according to IEC (Ik`). Used for short circuit data exchange according to IEC 6090 Default: nullptr */ + CIMPP::Simple_Float minR0ToX0Ratio; + + /** \brief Minimum ratio of positive sequence resistance of Network Feeder to its positive sequence reactance (R(1)/X(1) min). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::Simple_Float minR1ToX1Ratio; + + /** \brief Minimum ratio of zero sequence impedance to its positive sequence impedance (Z(0)/Z(1) min). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::Simple_Float minZ0ToZ1Ratio; + + /** \brief Active power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ + CIMPP::ActivePower p; + + /** \brief Reactive power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ + CIMPP::ReactivePower q; + + /** \brief Priority of unit for use as powerflow voltage phase angle reference bus selection. 0 = don t care (default) 1 = highest priority. 2 is less than 1 and so on. Default: 0 */ + CIMPP::Integer referencePriority; + + /** \brief Voltage factor in pu, which was used to calculate short-circuit current Ik` and power Sk`. Default: nullptr */ + CIMPP::PU voltageFactor; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Float.hpp b/CGMES_2.4.15_27JAN2020/Float.hpp index ede68d395..71ceca0e4 100644 --- a/CGMES_2.4.15_27JAN2020/Float.hpp +++ b/CGMES_2.4.15_27JAN2020/Float.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A floating point number. The range is unspecified and not limited. - */ + /** \brief A floating point number. The range is unspecified and not limited. */ class Float { public: diff --git a/CGMES_2.4.15_27JAN2020/FossilFuel.cpp b/CGMES_2.4.15_27JAN2020/FossilFuel.cpp index ae681b131..d8564bf4d 100644 --- a/CGMES_2.4.15_27JAN2020/FossilFuel.cpp +++ b/CGMES_2.4.15_27JAN2020/FossilFuel.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ThermalGeneratingUnit.hpp" -#include "FuelType.hpp" using namespace CIMPP; -FossilFuel::FossilFuel() : ThermalGeneratingUnit(nullptr) {}; -FossilFuel::~FossilFuel() {}; +FossilFuel::FossilFuel() : ThermalGeneratingUnit(nullptr) {} +FossilFuel::~FossilFuel() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ FossilFuel::getPossibleProfilesForAttributes() const return map; } - -bool assign_FossilFuel_fossilFuelType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (FossilFuel* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->fossilFuelType; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ThermalGeneratingUnit_FossilFuels(BaseClass*, BaseClass*); bool assign_FossilFuel_ThermalGeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,10 +58,24 @@ bool assign_FossilFuel_ThermalGeneratingUnit(BaseClass* BaseClass_ptr1, BaseClas return false; } +bool assign_FossilFuel_fossilFuelType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + FossilFuel* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->fossilFuelType; + if (!buffer.fail()) + { + return true; + } + } + return false; +} bool get_FossilFuel_ThermalGeneratingUnit(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const FossilFuel* element = dynamic_cast(BaseClass_ptr1)) + const FossilFuel* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ThermalGeneratingUnit != 0) { @@ -88,10 +86,10 @@ bool get_FossilFuel_ThermalGeneratingUnit(const BaseClass* BaseClass_ptr1, std:: return false; } - bool get_FossilFuel_fossilFuelType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const FossilFuel* element = dynamic_cast(BaseClass_ptr1)) + const FossilFuel* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fossilFuelType; if (!buffer.str().empty()) @@ -111,17 +109,17 @@ const char* FossilFuel::debugString() const void FossilFuel::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:FossilFuel"), &FossilFuel_factory)); + factory_map.emplace("cim:FossilFuel", &FossilFuel_factory); } void FossilFuel::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:FossilFuel.fossilFuelType"), &assign_FossilFuel_fossilFuelType)); + assign_map.emplace("cim:FossilFuel.fossilFuelType", &assign_FossilFuel_fossilFuelType); } void FossilFuel::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:FossilFuel.ThermalGeneratingUnit"), &assign_FossilFuel_ThermalGeneratingUnit)); + assign_map.emplace("cim:FossilFuel.ThermalGeneratingUnit", &assign_FossilFuel_ThermalGeneratingUnit); } void FossilFuel::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/FossilFuel.hpp b/CGMES_2.4.15_27JAN2020/FossilFuel.hpp index 02981bec5..8b402a908 100644 --- a/CGMES_2.4.15_27JAN2020/FossilFuel.hpp +++ b/CGMES_2.4.15_27JAN2020/FossilFuel.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ThermalGeneratingUnit; - /* - The fossil fuel consumed by the non-nuclear thermal generating unit. For example, coal, oil, gas, etc. This a the specific fuels that the generating unit can consume. - */ + /** \brief The fossil fuel consumed by the non-nuclear thermal generating unit. For example, coal, oil, gas, etc. This a the specific fuels that the generating unit can consume. */ class FossilFuel : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP FossilFuel(); ~FossilFuel() override; - CIMPP::ThermalGeneratingUnit* ThermalGeneratingUnit; /* A thermal generating unit may have one or more fossil fuels. Default: 0 */ - CIMPP::FuelType fossilFuelType; /* The type of fossil fuel, such as coal, oil, or gas. Default: 0 */ + /** \brief A thermal generating unit may have one or more fossil fuels. Default: 0 */ + CIMPP::ThermalGeneratingUnit* ThermalGeneratingUnit; + + /** \brief The type of fossil fuel, such as coal, oil, or gas. Default: 0 */ + CIMPP::FuelType fossilFuelType; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/FrancisGovernorControlKind.cpp b/CGMES_2.4.15_27JAN2020/FrancisGovernorControlKind.cpp index dd419372c..45933271f 100644 --- a/CGMES_2.4.15_27JAN2020/FrancisGovernorControlKind.cpp +++ b/CGMES_2.4.15_27JAN2020/FrancisGovernorControlKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "FrancisGovernorControlKind") + if (EnumSymbol.substr(0, pos) != "FrancisGovernorControlKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "mechanicHydrolicTachoAccelerator") + if (EnumSymbol == "mechanicHydrolicTachoAccelerator") { rop = FrancisGovernorControlKind::mechanicHydrolicTachoAccelerator; return lop; } - if(EnumSymbol == "mechanicHydraulicTransientFeedback") + if (EnumSymbol == "mechanicHydraulicTransientFeedback") { rop = FrancisGovernorControlKind::mechanicHydraulicTransientFeedback; return lop; } - if(EnumSymbol == "electromechanicalElectrohydraulic") + if (EnumSymbol == "electromechanicalElectrohydraulic") { rop = FrancisGovernorControlKind::electromechanicalElectrohydraulic; return lop; diff --git a/CGMES_2.4.15_27JAN2020/FrancisGovernorControlKind.hpp b/CGMES_2.4.15_27JAN2020/FrancisGovernorControlKind.hpp index a694f5429..703dda54c 100644 --- a/CGMES_2.4.15_27JAN2020/FrancisGovernorControlKind.hpp +++ b/CGMES_2.4.15_27JAN2020/FrancisGovernorControlKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Governor control flag for Francis hydro model. - */ + /** \brief Governor control flag for Francis hydro model. */ class FrancisGovernorControlKind { public: enum FrancisGovernorControlKind_ENUM { - /** - * Mechanic-hydraulic regulator with tacho-accelerometer (Cflag = 1). - */ + /** Mechanic-hydraulic regulator with tacho-accelerometer (Cflag = 1). */ mechanicHydrolicTachoAccelerator, - /** - * Mechanic-hydraulic regulator with transient feedback (Cflag=2). - */ + /** Mechanic-hydraulic regulator with transient feedback (Cflag=2). */ mechanicHydraulicTransientFeedback, - /** - * Electromechanical and electrohydraulic regulator (Cflag=3). - */ + /** Electromechanical and electrohydraulic regulator (Cflag=3). */ electromechanicalElectrohydraulic, }; diff --git a/CGMES_2.4.15_27JAN2020/Frequency.hpp b/CGMES_2.4.15_27JAN2020/Frequency.hpp index 28f5a1022..cca9a1dc8 100644 --- a/CGMES_2.4.15_27JAN2020/Frequency.hpp +++ b/CGMES_2.4.15_27JAN2020/Frequency.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Cycles per second. - */ + /** \brief Cycles per second. */ class Frequency { public: diff --git a/CGMES_2.4.15_27JAN2020/FuelType.cpp b/CGMES_2.4.15_27JAN2020/FuelType.cpp index e59bf1fd4..9b97cf206 100644 --- a/CGMES_2.4.15_27JAN2020/FuelType.cpp +++ b/CGMES_2.4.15_27JAN2020/FuelType.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "FuelType") + if (EnumSymbol.substr(0, pos) != "FuelType") { lop.setstate(std::ios::failbit); return lop; @@ -50,32 +50,32 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "coal") + if (EnumSymbol == "coal") { rop = FuelType::coal; return lop; } - if(EnumSymbol == "oil") + if (EnumSymbol == "oil") { rop = FuelType::oil; return lop; } - if(EnumSymbol == "gas") + if (EnumSymbol == "gas") { rop = FuelType::gas; return lop; } - if(EnumSymbol == "lignite") + if (EnumSymbol == "lignite") { rop = FuelType::lignite; return lop; } - if(EnumSymbol == "hardCoal") + if (EnumSymbol == "hardCoal") { rop = FuelType::hardCoal; return lop; } - if(EnumSymbol == "oilShale") + if (EnumSymbol == "oilShale") { rop = FuelType::oilShale; return lop; diff --git a/CGMES_2.4.15_27JAN2020/FuelType.hpp b/CGMES_2.4.15_27JAN2020/FuelType.hpp index 452590f12..980625028 100644 --- a/CGMES_2.4.15_27JAN2020/FuelType.hpp +++ b/CGMES_2.4.15_27JAN2020/FuelType.hpp @@ -9,37 +9,23 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of fuel. - */ + /** \brief Type of fuel. */ class FuelType { public: enum FuelType_ENUM { - /** - * Generic coal, not including lignite type. - */ + /** Generic coal, not including lignite type. */ coal, - /** - * Oil. - */ + /** Oil. */ oil, - /** - * Natural gas. - */ + /** Natural gas. */ gas, - /** - * The fuel is lignite coal. Note that this is a special type of coal, so the other enum of coal is reserved for hard coal types or if the exact type of coal is not known. - */ + /** The fuel is lignite coal. Note that this is a special type of coal, so the other enum of coal is reserved for hard coal types or if the exact type of coal is not known. */ lignite, - /** - * Hard coal - */ + /** Hard coal */ hardCoal, - /** - * Oil Shale - */ + /** Oil Shale */ oilShale, }; diff --git a/CGMES_2.4.15_27JAN2020/GenICompensationForGenJ.cpp b/CGMES_2.4.15_27JAN2020/GenICompensationForGenJ.cpp index a378b1488..ade258b3c 100644 --- a/CGMES_2.4.15_27JAN2020/GenICompensationForGenJ.cpp +++ b/CGMES_2.4.15_27JAN2020/GenICompensationForGenJ.cpp @@ -10,13 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "SynchronousMachineDynamics.hpp" #include "VCompIEEEType2.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -GenICompensationForGenJ::GenICompensationForGenJ() : SynchronousMachineDynamics(nullptr), VcompIEEEType2(nullptr) {}; -GenICompensationForGenJ::~GenICompensationForGenJ() {}; +GenICompensationForGenJ::GenICompensationForGenJ() : SynchronousMachineDynamics(nullptr), VcompIEEEType2(nullptr) {} +GenICompensationForGenJ::~GenICompensationForGenJ() {} static const std::list PossibleProfilesForClass = { @@ -46,34 +44,6 @@ GenICompensationForGenJ::getPossibleProfilesForAttributes() const return map; } - -bool assign_GenICompensationForGenJ_rcij(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->rcij; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_GenICompensationForGenJ_xcij(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->xcij; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_SynchronousMachineDynamics_GenICompensationForGenJ(BaseClass*, BaseClass*); bool assign_GenICompensationForGenJ_SynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -90,6 +60,7 @@ bool assign_GenICompensationForGenJ_SynchronousMachineDynamics(BaseClass* BaseCl } return false; } + bool assign_VCompIEEEType2_GenICompensationForGenJ(BaseClass*, BaseClass*); bool assign_GenICompensationForGenJ_VcompIEEEType2(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -107,38 +78,38 @@ bool assign_GenICompensationForGenJ_VcompIEEEType2(BaseClass* BaseClass_ptr1, Ba return false; } -bool get_GenICompensationForGenJ_rcij(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_GenICompensationForGenJ_rcij(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1)) + GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->rcij; - if (!buffer.str().empty()) + buffer >> element->rcij; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_GenICompensationForGenJ_xcij(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_GenICompensationForGenJ_xcij(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1)) + GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xcij; - if (!buffer.str().empty()) + buffer >> element->xcij; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_GenICompensationForGenJ_SynchronousMachineDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1)) + const GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->SynchronousMachineDynamics != 0) { @@ -151,7 +122,8 @@ bool get_GenICompensationForGenJ_SynchronousMachineDynamics(const BaseClass* Bas bool get_GenICompensationForGenJ_VcompIEEEType2(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1)) + const GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->VcompIEEEType2 != 0) { @@ -162,6 +134,35 @@ bool get_GenICompensationForGenJ_VcompIEEEType2(const BaseClass* BaseClass_ptr1, return false; } +bool get_GenICompensationForGenJ_rcij(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->rcij; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_GenICompensationForGenJ_xcij(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->xcij; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char GenICompensationForGenJ::debugName[] = "GenICompensationForGenJ"; const char* GenICompensationForGenJ::debugString() const @@ -171,19 +172,19 @@ const char* GenICompensationForGenJ::debugString() const void GenICompensationForGenJ::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GenICompensationForGenJ"), &GenICompensationForGenJ_factory)); + factory_map.emplace("cim:GenICompensationForGenJ", &GenICompensationForGenJ_factory); } void GenICompensationForGenJ::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GenICompensationForGenJ.rcij"), &assign_GenICompensationForGenJ_rcij)); - assign_map.insert(std::make_pair(std::string("cim:GenICompensationForGenJ.xcij"), &assign_GenICompensationForGenJ_xcij)); + assign_map.emplace("cim:GenICompensationForGenJ.rcij", &assign_GenICompensationForGenJ_rcij); + assign_map.emplace("cim:GenICompensationForGenJ.xcij", &assign_GenICompensationForGenJ_xcij); } void GenICompensationForGenJ::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GenICompensationForGenJ.SynchronousMachineDynamics"), &assign_GenICompensationForGenJ_SynchronousMachineDynamics)); - assign_map.insert(std::make_pair(std::string("cim:GenICompensationForGenJ.VcompIEEEType2"), &assign_GenICompensationForGenJ_VcompIEEEType2)); + assign_map.emplace("cim:GenICompensationForGenJ.SynchronousMachineDynamics", &assign_GenICompensationForGenJ_SynchronousMachineDynamics); + assign_map.emplace("cim:GenICompensationForGenJ.VcompIEEEType2", &assign_GenICompensationForGenJ_VcompIEEEType2); } void GenICompensationForGenJ::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/GenICompensationForGenJ.hpp b/CGMES_2.4.15_27JAN2020/GenICompensationForGenJ.hpp index 69b479b55..01a042d67 100644 --- a/CGMES_2.4.15_27JAN2020/GenICompensationForGenJ.hpp +++ b/CGMES_2.4.15_27JAN2020/GenICompensationForGenJ.hpp @@ -19,9 +19,7 @@ namespace CIMPP class SynchronousMachineDynamics; class VCompIEEEType2; - /* - This class provides the resistive and reactive components of compensation for the generator associated with the IEEE Type 2 voltage compensator for current flow out of one of the other generators in the interconnection. - */ + /** \brief This class provides the resistive and reactive components of compensation for the generator associated with the IEEE Type 2 voltage compensator for current flow out of one of the other generators in the interconnection. */ class GenICompensationForGenJ : public IdentifiedObject { public: @@ -29,10 +27,17 @@ namespace CIMPP GenICompensationForGenJ(); ~GenICompensationForGenJ() override; - CIMPP::SynchronousMachineDynamics* SynchronousMachineDynamics; /* Standard synchronous machine out of which current flow is being compensated for. Default: 0 */ - CIMPP::VCompIEEEType2* VcompIEEEType2; /* The standard IEEE Type 2 voltage compensator of this compensation. Default: 0 */ - CIMPP::PU rcij; /* Default: nullptr */ - CIMPP::PU xcij; /* Default: nullptr */ + /** \brief Standard synchronous machine out of which current flow is being compensated for. Default: 0 */ + CIMPP::SynchronousMachineDynamics* SynchronousMachineDynamics; + + /** \brief The standard IEEE Type 2 voltage compensator of this compensation. Default: 0 */ + CIMPP::VCompIEEEType2* VcompIEEEType2; + + /** \brief Default: nullptr */ + CIMPP::PU rcij; + + /** \brief Default: nullptr */ + CIMPP::PU xcij; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GeneratingUnit.cpp b/CGMES_2.4.15_27JAN2020/GeneratingUnit.cpp index 44d6506b9..247f593eb 100644 --- a/CGMES_2.4.15_27JAN2020/GeneratingUnit.cpp +++ b/CGMES_2.4.15_27JAN2020/GeneratingUnit.cpp @@ -11,27 +11,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "ControlAreaGeneratingUnit.hpp" #include "GrossToNetActivePowerCurve.hpp" #include "RotatingMachine.hpp" -#include "GeneratorControlSource.hpp" -#include "PerCent.hpp" -#include "ActivePower.hpp" -#include "Simple_Float.hpp" -#include "ActivePower.hpp" -#include "ActivePower.hpp" -#include "ActivePower.hpp" -#include "ActivePower.hpp" -#include "Simple_Float.hpp" -#include "ActivePower.hpp" -#include "ActivePower.hpp" -#include "ActivePower.hpp" -#include "Simple_Float.hpp" -#include "Money.hpp" -#include "PerCent.hpp" -#include "Money.hpp" using namespace CIMPP; -GeneratingUnit::GeneratingUnit() {}; -GeneratingUnit::~GeneratingUnit() {}; +GeneratingUnit::GeneratingUnit() {} +GeneratingUnit::~GeneratingUnit() {} static const std::list PossibleProfilesForClass = { @@ -77,268 +61,303 @@ GeneratingUnit::getPossibleProfilesForAttributes() const return map; } +bool assign_ControlAreaGeneratingUnit_GeneratingUnit(BaseClass*, BaseClass*); +bool assign_GeneratingUnit_ControlAreaGeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + ControlAreaGeneratingUnit* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ControlAreaGeneratingUnit.begin(), element->ControlAreaGeneratingUnit.end(), element2) == element->ControlAreaGeneratingUnit.end()) + { + element->ControlAreaGeneratingUnit.push_back(element2); + return assign_ControlAreaGeneratingUnit_GeneratingUnit(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_GeneratingUnit_genControlSource(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GrossToNetActivePowerCurve_GeneratingUnit(BaseClass*, BaseClass*); +bool assign_GeneratingUnit_GrossToNetActivePowerCurves(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + GrossToNetActivePowerCurve* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->GrossToNetActivePowerCurves.begin(), element->GrossToNetActivePowerCurves.end(), element2) == element->GrossToNetActivePowerCurves.end()) + { + element->GrossToNetActivePowerCurves.push_back(element2); + return assign_GrossToNetActivePowerCurve_GeneratingUnit(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_RotatingMachine_GeneratingUnit(BaseClass*, BaseClass*); +bool assign_GeneratingUnit_RotatingMachine(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + RotatingMachine* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->RotatingMachine.begin(), element->RotatingMachine.end(), element2) == element->RotatingMachine.end()) + { + element->RotatingMachine.push_back(element2); + return assign_RotatingMachine_GeneratingUnit(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_GeneratingUnit_genControlSource(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->genControlSource; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_governorSCD(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_governorSCD(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->governorSCD; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_initialP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_initialP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->initialP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_longPF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_longPF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->longPF; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_maxOperatingP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_maxOperatingP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxOperatingP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_maximumAllowableSpinningReserve(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_maximumAllowableSpinningReserve(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maximumAllowableSpinningReserve; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_minOperatingP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_minOperatingP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minOperatingP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_nominalP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_nominalP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nominalP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_normalPF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_normalPF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->normalPF; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_ratedGrossMaxP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_ratedGrossMaxP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedGrossMaxP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_ratedGrossMinP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_ratedGrossMinP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedGrossMinP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_ratedNetMaxP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_ratedNetMaxP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedNetMaxP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_shortPF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_shortPF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->shortPF; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_startupCost(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_startupCost(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->startupCost; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_totalEfficiency(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_totalEfficiency(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->totalEfficiency; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_variableCost(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_variableCost(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->variableCost; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ControlAreaGeneratingUnit_GeneratingUnit(BaseClass*, BaseClass*); -bool assign_GeneratingUnit_ControlAreaGeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) -{ - GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); - ControlAreaGeneratingUnit* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) - { - if (std::find(element->ControlAreaGeneratingUnit.begin(), element->ControlAreaGeneratingUnit.end(), element2) == element->ControlAreaGeneratingUnit.end()) - { - element->ControlAreaGeneratingUnit.push_back(element2); - return assign_ControlAreaGeneratingUnit_GeneratingUnit(BaseClass_ptr2, BaseClass_ptr1); - } - return true; - } - return false; -} -bool assign_GrossToNetActivePowerCurve_GeneratingUnit(BaseClass*, BaseClass*); -bool assign_GeneratingUnit_GrossToNetActivePowerCurves(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) -{ - GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); - GrossToNetActivePowerCurve* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) - { - if (std::find(element->GrossToNetActivePowerCurves.begin(), element->GrossToNetActivePowerCurves.end(), element2) == element->GrossToNetActivePowerCurves.end()) - { - element->GrossToNetActivePowerCurves.push_back(element2); - return assign_GrossToNetActivePowerCurve_GeneratingUnit(BaseClass_ptr2, BaseClass_ptr1); - } - return true; - } - return false; -} -bool assign_RotatingMachine_GeneratingUnit(BaseClass*, BaseClass*); -bool assign_GeneratingUnit_RotatingMachine(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + + +bool get_GeneratingUnit_genControlSource(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); - RotatingMachine* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (std::find(element->RotatingMachine.begin(), element->RotatingMachine.end(), element2) == element->RotatingMachine.end()) + buffer << element->genControlSource; + if (!buffer.str().empty()) { - element->RotatingMachine.push_back(element2); - return assign_RotatingMachine_GeneratingUnit(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } + buffer.setstate(std::ios::failbit); return false; } bool get_GeneratingUnit_governorSCD(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->governorSCD; if (!buffer.str().empty()) @@ -352,7 +371,8 @@ bool get_GeneratingUnit_governorSCD(const BaseClass* BaseClass_ptr1, std::string bool get_GeneratingUnit_initialP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->initialP; if (!buffer.str().empty()) @@ -366,7 +386,8 @@ bool get_GeneratingUnit_initialP(const BaseClass* BaseClass_ptr1, std::stringstr bool get_GeneratingUnit_longPF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->longPF; if (!buffer.str().empty()) @@ -380,7 +401,8 @@ bool get_GeneratingUnit_longPF(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_GeneratingUnit_maxOperatingP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxOperatingP; if (!buffer.str().empty()) @@ -394,7 +416,8 @@ bool get_GeneratingUnit_maxOperatingP(const BaseClass* BaseClass_ptr1, std::stri bool get_GeneratingUnit_maximumAllowableSpinningReserve(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maximumAllowableSpinningReserve; if (!buffer.str().empty()) @@ -408,7 +431,8 @@ bool get_GeneratingUnit_maximumAllowableSpinningReserve(const BaseClass* BaseCla bool get_GeneratingUnit_minOperatingP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minOperatingP; if (!buffer.str().empty()) @@ -422,7 +446,8 @@ bool get_GeneratingUnit_minOperatingP(const BaseClass* BaseClass_ptr1, std::stri bool get_GeneratingUnit_nominalP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nominalP; if (!buffer.str().empty()) @@ -436,7 +461,8 @@ bool get_GeneratingUnit_nominalP(const BaseClass* BaseClass_ptr1, std::stringstr bool get_GeneratingUnit_normalPF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->normalPF; if (!buffer.str().empty()) @@ -450,7 +476,8 @@ bool get_GeneratingUnit_normalPF(const BaseClass* BaseClass_ptr1, std::stringstr bool get_GeneratingUnit_ratedGrossMaxP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedGrossMaxP; if (!buffer.str().empty()) @@ -464,7 +491,8 @@ bool get_GeneratingUnit_ratedGrossMaxP(const BaseClass* BaseClass_ptr1, std::str bool get_GeneratingUnit_ratedGrossMinP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedGrossMinP; if (!buffer.str().empty()) @@ -478,7 +506,8 @@ bool get_GeneratingUnit_ratedGrossMinP(const BaseClass* BaseClass_ptr1, std::str bool get_GeneratingUnit_ratedNetMaxP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedNetMaxP; if (!buffer.str().empty()) @@ -492,7 +521,8 @@ bool get_GeneratingUnit_ratedNetMaxP(const BaseClass* BaseClass_ptr1, std::strin bool get_GeneratingUnit_shortPF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortPF; if (!buffer.str().empty()) @@ -506,7 +536,8 @@ bool get_GeneratingUnit_shortPF(const BaseClass* BaseClass_ptr1, std::stringstre bool get_GeneratingUnit_startupCost(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->startupCost; if (!buffer.str().empty()) @@ -520,7 +551,8 @@ bool get_GeneratingUnit_startupCost(const BaseClass* BaseClass_ptr1, std::string bool get_GeneratingUnit_totalEfficiency(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->totalEfficiency; if (!buffer.str().empty()) @@ -534,7 +566,8 @@ bool get_GeneratingUnit_totalEfficiency(const BaseClass* BaseClass_ptr1, std::st bool get_GeneratingUnit_variableCost(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->variableCost; if (!buffer.str().empty()) @@ -546,22 +579,6 @@ bool get_GeneratingUnit_variableCost(const BaseClass* BaseClass_ptr1, std::strin return false; } - - -bool get_GeneratingUnit_genControlSource(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->genControlSource; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char GeneratingUnit::debugName[] = "GeneratingUnit"; const char* GeneratingUnit::debugString() const { @@ -570,34 +587,34 @@ const char* GeneratingUnit::debugString() const void GeneratingUnit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GeneratingUnit"), &GeneratingUnit_factory)); + factory_map.emplace("cim:GeneratingUnit", &GeneratingUnit_factory); } void GeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.genControlSource"), &assign_GeneratingUnit_genControlSource)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.governorSCD"), &assign_GeneratingUnit_governorSCD)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.initialP"), &assign_GeneratingUnit_initialP)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.longPF"), &assign_GeneratingUnit_longPF)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.maxOperatingP"), &assign_GeneratingUnit_maxOperatingP)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.maximumAllowableSpinningReserve"), &assign_GeneratingUnit_maximumAllowableSpinningReserve)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.minOperatingP"), &assign_GeneratingUnit_minOperatingP)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.nominalP"), &assign_GeneratingUnit_nominalP)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.normalPF"), &assign_GeneratingUnit_normalPF)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.ratedGrossMaxP"), &assign_GeneratingUnit_ratedGrossMaxP)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.ratedGrossMinP"), &assign_GeneratingUnit_ratedGrossMinP)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.ratedNetMaxP"), &assign_GeneratingUnit_ratedNetMaxP)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.shortPF"), &assign_GeneratingUnit_shortPF)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.startupCost"), &assign_GeneratingUnit_startupCost)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.totalEfficiency"), &assign_GeneratingUnit_totalEfficiency)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.variableCost"), &assign_GeneratingUnit_variableCost)); + assign_map.emplace("cim:GeneratingUnit.genControlSource", &assign_GeneratingUnit_genControlSource); + assign_map.emplace("cim:GeneratingUnit.governorSCD", &assign_GeneratingUnit_governorSCD); + assign_map.emplace("cim:GeneratingUnit.initialP", &assign_GeneratingUnit_initialP); + assign_map.emplace("cim:GeneratingUnit.longPF", &assign_GeneratingUnit_longPF); + assign_map.emplace("cim:GeneratingUnit.maxOperatingP", &assign_GeneratingUnit_maxOperatingP); + assign_map.emplace("cim:GeneratingUnit.maximumAllowableSpinningReserve", &assign_GeneratingUnit_maximumAllowableSpinningReserve); + assign_map.emplace("cim:GeneratingUnit.minOperatingP", &assign_GeneratingUnit_minOperatingP); + assign_map.emplace("cim:GeneratingUnit.nominalP", &assign_GeneratingUnit_nominalP); + assign_map.emplace("cim:GeneratingUnit.normalPF", &assign_GeneratingUnit_normalPF); + assign_map.emplace("cim:GeneratingUnit.ratedGrossMaxP", &assign_GeneratingUnit_ratedGrossMaxP); + assign_map.emplace("cim:GeneratingUnit.ratedGrossMinP", &assign_GeneratingUnit_ratedGrossMinP); + assign_map.emplace("cim:GeneratingUnit.ratedNetMaxP", &assign_GeneratingUnit_ratedNetMaxP); + assign_map.emplace("cim:GeneratingUnit.shortPF", &assign_GeneratingUnit_shortPF); + assign_map.emplace("cim:GeneratingUnit.startupCost", &assign_GeneratingUnit_startupCost); + assign_map.emplace("cim:GeneratingUnit.totalEfficiency", &assign_GeneratingUnit_totalEfficiency); + assign_map.emplace("cim:GeneratingUnit.variableCost", &assign_GeneratingUnit_variableCost); } void GeneratingUnit::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.ControlAreaGeneratingUnit"), &assign_GeneratingUnit_ControlAreaGeneratingUnit)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.GrossToNetActivePowerCurves"), &assign_GeneratingUnit_GrossToNetActivePowerCurves)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.RotatingMachine"), &assign_GeneratingUnit_RotatingMachine)); + assign_map.emplace("cim:GeneratingUnit.ControlAreaGeneratingUnit", &assign_GeneratingUnit_ControlAreaGeneratingUnit); + assign_map.emplace("cim:GeneratingUnit.GrossToNetActivePowerCurves", &assign_GeneratingUnit_GrossToNetActivePowerCurves); + assign_map.emplace("cim:GeneratingUnit.RotatingMachine", &assign_GeneratingUnit_RotatingMachine); } void GeneratingUnit::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/GeneratingUnit.hpp b/CGMES_2.4.15_27JAN2020/GeneratingUnit.hpp index 06ad23551..6261629bb 100644 --- a/CGMES_2.4.15_27JAN2020/GeneratingUnit.hpp +++ b/CGMES_2.4.15_27JAN2020/GeneratingUnit.hpp @@ -24,9 +24,7 @@ namespace CIMPP class GrossToNetActivePowerCurve; class RotatingMachine; - /* - A single or set of synchronous machines for converting mechanical power into alternating-current power. For example, individual machines within a set may be defined for scheduling purposes while a single control signal is derived for the set. In this case there would be a GeneratingUnit for each member of the set and an additional GeneratingUnit corresponding to the set. - */ + /** \brief A single or set of synchronous machines for converting mechanical power into alternating-current power. For example, individual machines within a set may be defined for scheduling purposes while a single control signal is derived for the set. In this case there would be a GeneratingUnit for each member of the set and an additional GeneratingUnit corresponding to the set. */ class GeneratingUnit : public Equipment { public: @@ -34,25 +32,62 @@ namespace CIMPP GeneratingUnit(); ~GeneratingUnit() override; - std::list ControlAreaGeneratingUnit; /* ControlArea specifications for this generating unit. Default: 0 */ - std::list GrossToNetActivePowerCurves; /* A generating unit may have a gross active power to net active power curve, describing the losses and auxiliary power requirements of the unit. Default: 0 */ - std::list RotatingMachine; /* A synchronous machine may operate as a generator and as such becomes a member of a generating unit. Default: 0 */ - CIMPP::GeneratorControlSource genControlSource; /* The source of controls for a generating unit. Default: 0 */ - CIMPP::PerCent governorSCD; /* Governor Speed Changer Droop. This is the change in generator power output divided by the change in frequency normalized by the nominal power of the generator and the nominal frequency and expressed in percent and negated. A positive value of speed change droop provides additional generator output upon a drop in frequency. Default: nullptr */ - CIMPP::ActivePower initialP; /* Default initial active power which is used to store a powerflow result for the initial active power for this unit in this network configuration. Default: nullptr */ - CIMPP::Simple_Float longPF; /* Generating unit long term economic participation factor. Default: nullptr */ - CIMPP::ActivePower maxOperatingP; /* This is the maximum operating active power limit the dispatcher can enter for this unit. Default: nullptr */ - CIMPP::ActivePower maximumAllowableSpinningReserve; /* Maximum allowable spinning reserve. Spinning reserve will never be considered greater than this value regardless of the current operating point. Default: nullptr */ - CIMPP::ActivePower minOperatingP; /* This is the minimum operating active power limit the dispatcher can enter for this unit. Default: nullptr */ - CIMPP::ActivePower nominalP; /* The nominal power of the generating unit. Used to give precise meaning to percentage based attributes such as the governor speed change droop (governorSCD attribute). The attribute shall be a positive value equal or less than RotatingMachine.ratedS. Default: nullptr */ - CIMPP::Simple_Float normalPF; /* Generating unit economic participation factor. Default: nullptr */ - CIMPP::ActivePower ratedGrossMaxP; /* The unit`s gross rated maximum capacity (book value). Default: nullptr */ - CIMPP::ActivePower ratedGrossMinP; /* The gross rated minimum generation level which the unit can safely operate at while delivering power to the transmission grid. Default: nullptr */ - CIMPP::ActivePower ratedNetMaxP; /* The net rated maximum capacity determined by subtracting the auxiliary power used to operate the internal plant machinery from the rated gross maximum capacity. Default: nullptr */ - CIMPP::Simple_Float shortPF; /* Generating unit short term economic participation factor. Default: nullptr */ - CIMPP::Money startupCost; /* The initial startup cost incurred for each start of the GeneratingUnit. Default: nullptr */ - CIMPP::PerCent totalEfficiency; /* The efficiency of the unit in converting the fuel into electrical energy. Default: nullptr */ - CIMPP::Money variableCost; /* The variable cost component of production per unit of ActivePower. Default: nullptr */ + /** \brief ControlArea specifications for this generating unit. Default: 0 */ + std::list ControlAreaGeneratingUnit; + + /** \brief A generating unit may have a gross active power to net active power curve, describing the losses and auxiliary power requirements of the unit. Default: 0 */ + std::list GrossToNetActivePowerCurves; + + /** \brief A synchronous machine may operate as a generator and as such becomes a member of a generating unit. Default: 0 */ + std::list RotatingMachine; + + /** \brief The source of controls for a generating unit. Default: 0 */ + CIMPP::GeneratorControlSource genControlSource; + + /** \brief Governor Speed Changer Droop. This is the change in generator power output divided by the change in frequency normalized by the nominal power of the generator and the nominal frequency and expressed in percent and negated. A positive value of speed change droop provides additional generator output upon a drop in frequency. Default: nullptr */ + CIMPP::PerCent governorSCD; + + /** \brief Default initial active power which is used to store a powerflow result for the initial active power for this unit in this network configuration. Default: nullptr */ + CIMPP::ActivePower initialP; + + /** \brief Generating unit long term economic participation factor. Default: nullptr */ + CIMPP::Simple_Float longPF; + + /** \brief This is the maximum operating active power limit the dispatcher can enter for this unit. Default: nullptr */ + CIMPP::ActivePower maxOperatingP; + + /** \brief Maximum allowable spinning reserve. Spinning reserve will never be considered greater than this value regardless of the current operating point. Default: nullptr */ + CIMPP::ActivePower maximumAllowableSpinningReserve; + + /** \brief This is the minimum operating active power limit the dispatcher can enter for this unit. Default: nullptr */ + CIMPP::ActivePower minOperatingP; + + /** \brief The nominal power of the generating unit. Used to give precise meaning to percentage based attributes such as the governor speed change droop (governorSCD attribute). The attribute shall be a positive value equal or less than RotatingMachine.ratedS. Default: nullptr */ + CIMPP::ActivePower nominalP; + + /** \brief Generating unit economic participation factor. Default: nullptr */ + CIMPP::Simple_Float normalPF; + + /** \brief The unit`s gross rated maximum capacity (book value). Default: nullptr */ + CIMPP::ActivePower ratedGrossMaxP; + + /** \brief The gross rated minimum generation level which the unit can safely operate at while delivering power to the transmission grid. Default: nullptr */ + CIMPP::ActivePower ratedGrossMinP; + + /** \brief The net rated maximum capacity determined by subtracting the auxiliary power used to operate the internal plant machinery from the rated gross maximum capacity. Default: nullptr */ + CIMPP::ActivePower ratedNetMaxP; + + /** \brief Generating unit short term economic participation factor. Default: nullptr */ + CIMPP::Simple_Float shortPF; + + /** \brief The initial startup cost incurred for each start of the GeneratingUnit. Default: nullptr */ + CIMPP::Money startupCost; + + /** \brief The efficiency of the unit in converting the fuel into electrical energy. Default: nullptr */ + CIMPP::PerCent totalEfficiency; + + /** \brief The variable cost component of production per unit of ActivePower. Default: nullptr */ + CIMPP::Money variableCost; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GeneratorControlSource.cpp b/CGMES_2.4.15_27JAN2020/GeneratorControlSource.cpp index 1850d2514..dade3b6eb 100644 --- a/CGMES_2.4.15_27JAN2020/GeneratorControlSource.cpp +++ b/CGMES_2.4.15_27JAN2020/GeneratorControlSource.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "GeneratorControlSource") + if (EnumSymbol.substr(0, pos) != "GeneratorControlSource") { lop.setstate(std::ios::failbit); return lop; @@ -50,22 +50,22 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "unavailable") + if (EnumSymbol == "unavailable") { rop = GeneratorControlSource::unavailable; return lop; } - if(EnumSymbol == "offAGC") + if (EnumSymbol == "offAGC") { rop = GeneratorControlSource::offAGC; return lop; } - if(EnumSymbol == "onAGC") + if (EnumSymbol == "onAGC") { rop = GeneratorControlSource::onAGC; return lop; } - if(EnumSymbol == "plantControl") + if (EnumSymbol == "plantControl") { rop = GeneratorControlSource::plantControl; return lop; diff --git a/CGMES_2.4.15_27JAN2020/GeneratorControlSource.hpp b/CGMES_2.4.15_27JAN2020/GeneratorControlSource.hpp index 463a53ab3..28b3b722f 100644 --- a/CGMES_2.4.15_27JAN2020/GeneratorControlSource.hpp +++ b/CGMES_2.4.15_27JAN2020/GeneratorControlSource.hpp @@ -9,29 +9,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The source of controls for a generating unit. - */ + /** \brief The source of controls for a generating unit. */ class GeneratorControlSource { public: enum GeneratorControlSource_ENUM { - /** - * Not available. - */ + /** Not available. */ unavailable, - /** - * Off of automatic generation control (AGC). - */ + /** Off of automatic generation control (AGC). */ offAGC, - /** - * On automatic generation control (AGC). - */ + /** On automatic generation control (AGC). */ onAGC, - /** - * Plant is controlling. - */ + /** Plant is controlling. */ plantControl, }; diff --git a/CGMES_2.4.15_27JAN2020/GenericNonLinearLoadModelKind.cpp b/CGMES_2.4.15_27JAN2020/GenericNonLinearLoadModelKind.cpp index 2d1052ed1..037223a57 100644 --- a/CGMES_2.4.15_27JAN2020/GenericNonLinearLoadModelKind.cpp +++ b/CGMES_2.4.15_27JAN2020/GenericNonLinearLoadModelKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "GenericNonLinearLoadModelKind") + if (EnumSymbol.substr(0, pos) != "GenericNonLinearLoadModelKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,12 +50,12 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "exponentialRecovery") + if (EnumSymbol == "exponentialRecovery") { rop = GenericNonLinearLoadModelKind::exponentialRecovery; return lop; } - if(EnumSymbol == "loadAdaptive") + if (EnumSymbol == "loadAdaptive") { rop = GenericNonLinearLoadModelKind::loadAdaptive; return lop; diff --git a/CGMES_2.4.15_27JAN2020/GenericNonLinearLoadModelKind.hpp b/CGMES_2.4.15_27JAN2020/GenericNonLinearLoadModelKind.hpp index 7b6aa0c38..48f94578a 100644 --- a/CGMES_2.4.15_27JAN2020/GenericNonLinearLoadModelKind.hpp +++ b/CGMES_2.4.15_27JAN2020/GenericNonLinearLoadModelKind.hpp @@ -9,21 +9,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of generic non-linear load model. - */ + /** \brief Type of generic non-linear load model. */ class GenericNonLinearLoadModelKind { public: enum GenericNonLinearLoadModelKind_ENUM { - /** - * Exponential recovery model. - */ + /** Exponential recovery model. */ exponentialRecovery, - /** - * Load adaptive model. - */ + /** Load adaptive model. */ loadAdaptive, }; diff --git a/CGMES_2.4.15_27JAN2020/GeographicalLocationVersion.cpp b/CGMES_2.4.15_27JAN2020/GeographicalLocationVersion.cpp index d48c4690d..f7622e2dc 100644 --- a/CGMES_2.4.15_27JAN2020/GeographicalLocationVersion.cpp +++ b/CGMES_2.4.15_27JAN2020/GeographicalLocationVersion.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "String.hpp" -#include "String.hpp" -#include "Date.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -GeographicalLocationVersion::GeographicalLocationVersion() {}; -GeographicalLocationVersion::~GeographicalLocationVersion() {}; +GeographicalLocationVersion::GeographicalLocationVersion() {} +GeographicalLocationVersion::~GeographicalLocationVersion() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ GeographicalLocationVersion::getPossibleProfilesForAttributes() const return map; } - -bool assign_GeographicalLocationVersion_baseUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeographicalLocationVersion_baseUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeographicalLocationVersion_baseURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeographicalLocationVersion_baseURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeographicalLocationVersion_date(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeographicalLocationVersion_date(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->date = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeographicalLocationVersion_differenceModelURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeographicalLocationVersion_differenceModelURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->differenceModelURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeographicalLocationVersion_entsoeUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeographicalLocationVersion_entsoeUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeographicalLocationVersion_entsoeURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeographicalLocationVersion_entsoeURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeographicalLocationVersion_modelDescriptionURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeographicalLocationVersion_modelDescriptionURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->modelDescriptionURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeographicalLocationVersion_namespaceRDF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeographicalLocationVersion_namespaceRDF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceRDF = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeographicalLocationVersion_namespaceUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeographicalLocationVersion_namespaceUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeographicalLocationVersion_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeographicalLocationVersion_shortName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->shortName = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GeographicalLocationVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseUML; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_GeographicalLocationVersion_baseUML(const BaseClass* BaseClass_ptr1, st bool get_GeographicalLocationVersion_baseURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseURI; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_GeographicalLocationVersion_baseURI(const BaseClass* BaseClass_ptr1, st bool get_GeographicalLocationVersion_date(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->date; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_GeographicalLocationVersion_date(const BaseClass* BaseClass_ptr1, std:: bool get_GeographicalLocationVersion_differenceModelURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->differenceModelURI; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_GeographicalLocationVersion_differenceModelURI(const BaseClass* BaseCla bool get_GeographicalLocationVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeUML; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_GeographicalLocationVersion_entsoeUML(const BaseClass* BaseClass_ptr1, bool get_GeographicalLocationVersion_entsoeURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeURI; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_GeographicalLocationVersion_entsoeURI(const BaseClass* BaseClass_ptr1, bool get_GeographicalLocationVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->modelDescriptionURI; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_GeographicalLocationVersion_modelDescriptionURI(const BaseClass* BaseCl bool get_GeographicalLocationVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceRDF; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_GeographicalLocationVersion_namespaceRDF(const BaseClass* BaseClass_ptr bool get_GeographicalLocationVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceUML; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_GeographicalLocationVersion_namespaceUML(const BaseClass* BaseClass_ptr bool get_GeographicalLocationVersion_shortName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1)) + const GeographicalLocationVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortName; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_GeographicalLocationVersion_shortName(const BaseClass* BaseClass_ptr1, return false; } - - const char GeographicalLocationVersion::debugName[] = "GeographicalLocationVersion"; const char* GeographicalLocationVersion::debugString() const { @@ -341,21 +346,21 @@ const char* GeographicalLocationVersion::debugString() const void GeographicalLocationVersion::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GeographicalLocationVersion"), &GeographicalLocationVersion_factory)); + factory_map.emplace("cim:GeographicalLocationVersion", &GeographicalLocationVersion_factory); } void GeographicalLocationVersion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GeographicalLocationVersion.baseUML"), &assign_GeographicalLocationVersion_baseUML)); - assign_map.insert(std::make_pair(std::string("cim:GeographicalLocationVersion.baseURI"), &assign_GeographicalLocationVersion_baseURI)); - assign_map.insert(std::make_pair(std::string("cim:GeographicalLocationVersion.date"), &assign_GeographicalLocationVersion_date)); - assign_map.insert(std::make_pair(std::string("cim:GeographicalLocationVersion.differenceModelURI"), &assign_GeographicalLocationVersion_differenceModelURI)); - assign_map.insert(std::make_pair(std::string("cim:GeographicalLocationVersion.entsoeUML"), &assign_GeographicalLocationVersion_entsoeUML)); - assign_map.insert(std::make_pair(std::string("cim:GeographicalLocationVersion.entsoeURI"), &assign_GeographicalLocationVersion_entsoeURI)); - assign_map.insert(std::make_pair(std::string("cim:GeographicalLocationVersion.modelDescriptionURI"), &assign_GeographicalLocationVersion_modelDescriptionURI)); - assign_map.insert(std::make_pair(std::string("cim:GeographicalLocationVersion.namespaceRDF"), &assign_GeographicalLocationVersion_namespaceRDF)); - assign_map.insert(std::make_pair(std::string("cim:GeographicalLocationVersion.namespaceUML"), &assign_GeographicalLocationVersion_namespaceUML)); - assign_map.insert(std::make_pair(std::string("cim:GeographicalLocationVersion.shortName"), &assign_GeographicalLocationVersion_shortName)); + assign_map.emplace("cim:GeographicalLocationVersion.baseUML", &assign_GeographicalLocationVersion_baseUML); + assign_map.emplace("cim:GeographicalLocationVersion.baseURI", &assign_GeographicalLocationVersion_baseURI); + assign_map.emplace("cim:GeographicalLocationVersion.date", &assign_GeographicalLocationVersion_date); + assign_map.emplace("cim:GeographicalLocationVersion.differenceModelURI", &assign_GeographicalLocationVersion_differenceModelURI); + assign_map.emplace("cim:GeographicalLocationVersion.entsoeUML", &assign_GeographicalLocationVersion_entsoeUML); + assign_map.emplace("cim:GeographicalLocationVersion.entsoeURI", &assign_GeographicalLocationVersion_entsoeURI); + assign_map.emplace("cim:GeographicalLocationVersion.modelDescriptionURI", &assign_GeographicalLocationVersion_modelDescriptionURI); + assign_map.emplace("cim:GeographicalLocationVersion.namespaceRDF", &assign_GeographicalLocationVersion_namespaceRDF); + assign_map.emplace("cim:GeographicalLocationVersion.namespaceUML", &assign_GeographicalLocationVersion_namespaceUML); + assign_map.emplace("cim:GeographicalLocationVersion.shortName", &assign_GeographicalLocationVersion_shortName); } void GeographicalLocationVersion::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/GeographicalLocationVersion.hpp b/CGMES_2.4.15_27JAN2020/GeographicalLocationVersion.hpp index 94d99aabb..b8b3523b3 100644 --- a/CGMES_2.4.15_27JAN2020/GeographicalLocationVersion.hpp +++ b/CGMES_2.4.15_27JAN2020/GeographicalLocationVersion.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Version details. - */ + /** \brief Version details. */ class GeographicalLocationVersion : public BaseClass { public: @@ -28,16 +26,35 @@ namespace CIMPP GeographicalLocationVersion(); ~GeographicalLocationVersion() override; - CIMPP::String baseUML; /* Base UML provided by CIM model manager. Default: '' */ - CIMPP::String baseURI; /* Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ - CIMPP::Date date; /* Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ - CIMPP::String differenceModelURI; /* Difference model URI defined by IEC 61970-552. Default: '' */ - CIMPP::String entsoeUML; /* UML provided by ENTSO-E. Default: '' */ - CIMPP::String entsoeURI; /* Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/GeographicalLocation/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ - CIMPP::String modelDescriptionURI; /* Model Description URI defined by IEC 61970-552. Default: '' */ - CIMPP::String namespaceRDF; /* RDF namespace. Default: '' */ - CIMPP::String namespaceUML; /* CIM UML namespace. Default: '' */ - CIMPP::String shortName; /* The short name of the profile used in profile documentation. Default: '' */ + /** \brief Base UML provided by CIM model manager. Default: '' */ + CIMPP::String baseUML; + + /** \brief Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ + CIMPP::String baseURI; + + /** \brief Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ + CIMPP::Date date; + + /** \brief Difference model URI defined by IEC 61970-552. Default: '' */ + CIMPP::String differenceModelURI; + + /** \brief UML provided by ENTSO-E. Default: '' */ + CIMPP::String entsoeUML; + + /** \brief Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/GeographicalLocation/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ + CIMPP::String entsoeURI; + + /** \brief Model Description URI defined by IEC 61970-552. Default: '' */ + CIMPP::String modelDescriptionURI; + + /** \brief RDF namespace. Default: '' */ + CIMPP::String namespaceRDF; + + /** \brief CIM UML namespace. Default: '' */ + CIMPP::String namespaceUML; + + /** \brief The short name of the profile used in profile documentation. Default: '' */ + CIMPP::String shortName; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GeographicalRegion.cpp b/CGMES_2.4.15_27JAN2020/GeographicalRegion.cpp index 8648eae7d..229df2030 100644 --- a/CGMES_2.4.15_27JAN2020/GeographicalRegion.cpp +++ b/CGMES_2.4.15_27JAN2020/GeographicalRegion.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -GeographicalRegion::GeographicalRegion() {}; -GeographicalRegion::~GeographicalRegion() {}; +GeographicalRegion::GeographicalRegion() {} +GeographicalRegion::~GeographicalRegion() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ GeographicalRegion::getPossibleProfilesForAttributes() const return map; } - - bool assign_SubGeographicalRegion_Region(BaseClass*, BaseClass*); bool assign_GeographicalRegion_Regions(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,7 +59,6 @@ bool assign_GeographicalRegion_Regions(BaseClass* BaseClass_ptr1, BaseClass* Bas } - const char GeographicalRegion::debugName[] = "GeographicalRegion"; const char* GeographicalRegion::debugString() const { @@ -70,7 +67,7 @@ const char* GeographicalRegion::debugString() const void GeographicalRegion::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GeographicalRegion"), &GeographicalRegion_factory)); + factory_map.emplace("cim:GeographicalRegion", &GeographicalRegion_factory); } void GeographicalRegion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -79,7 +76,7 @@ void GeographicalRegion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GeographicalRegion.Regions"), &assign_GeographicalRegion_Regions)); + assign_map.emplace("cim:GeographicalRegion.Regions", &assign_GeographicalRegion_Regions); } void GeographicalRegion::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/GeographicalRegion.hpp b/CGMES_2.4.15_27JAN2020/GeographicalRegion.hpp index 1ab108682..8e23a3694 100644 --- a/CGMES_2.4.15_27JAN2020/GeographicalRegion.hpp +++ b/CGMES_2.4.15_27JAN2020/GeographicalRegion.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class SubGeographicalRegion; - /* - A geographical region of a power system network model. - */ + /** \brief A geographical region of a power system network model. */ class GeographicalRegion : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP GeographicalRegion(); ~GeographicalRegion() override; - std::list Regions; /* All sub-geograhpical regions within this geographical region. Default: 0 */ + /** \brief All sub-geograhpical regions within this geographical region. Default: 0 */ + std::list Regions; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GovCT1.cpp b/CGMES_2.4.15_27JAN2020/GovCT1.cpp index 6a6f13ccb..c8ede5eab 100644 --- a/CGMES_2.4.15_27JAN2020/GovCT1.cpp +++ b/CGMES_2.4.15_27JAN2020/GovCT1.cpp @@ -8,46 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "DroopSignalFeedbackKind.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" using namespace CIMPP; -GovCT1::GovCT1() {}; -GovCT1::~GovCT1() {}; +GovCT1::GovCT1() {} +GovCT1::~GovCT1() {} static const std::list PossibleProfilesForClass = { @@ -108,467 +73,500 @@ GovCT1::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovCT1_aset(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_aset(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->aset; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_db(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_db(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_dm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_dm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_kdgov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_kdgov(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kdgov; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_kigov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_kigov(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kigov; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_kiload(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_kiload(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kiload; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_kimw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_kimw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kimw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_kpgov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_kpgov(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpgov; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_kpload(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_kpload(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpload; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_kturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_kturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_ldref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_ldref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ldref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_maxerr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_maxerr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxerr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_minerr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_minerr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minerr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_rclose(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_rclose(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rclose; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_rdown(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_rdown(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rdown; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_ropen(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_ropen(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ropen; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_rselect(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_rselect(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rselect; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_rup(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_rup(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rup; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_tact(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_tact(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tact; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_tdgov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_tdgov(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdgov; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_teng(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_teng(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->teng; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_tfload(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_tfload(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tfload; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_tpelec(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_tpelec(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpelec; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_tsa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_tsa(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tsa; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_tsb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_tsb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tsb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_vmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_vmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_wfnl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_wfnl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wfnl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_wfspd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_wfspd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wfspd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovCT1_aset(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->aset; if (!buffer.str().empty()) @@ -582,7 +580,8 @@ bool get_GovCT1_aset(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_db(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db; if (!buffer.str().empty()) @@ -596,7 +595,8 @@ bool get_GovCT1_db(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_dm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dm; if (!buffer.str().empty()) @@ -610,7 +610,8 @@ bool get_GovCT1_dm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -624,7 +625,8 @@ bool get_GovCT1_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_kdgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdgov; if (!buffer.str().empty()) @@ -638,7 +640,8 @@ bool get_GovCT1_kdgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT1_kigov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kigov; if (!buffer.str().empty()) @@ -652,7 +655,8 @@ bool get_GovCT1_kigov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT1_kiload(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kiload; if (!buffer.str().empty()) @@ -666,7 +670,8 @@ bool get_GovCT1_kiload(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT1_kimw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kimw; if (!buffer.str().empty()) @@ -680,7 +685,8 @@ bool get_GovCT1_kimw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_kpgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpgov; if (!buffer.str().empty()) @@ -694,7 +700,8 @@ bool get_GovCT1_kpgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT1_kpload(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpload; if (!buffer.str().empty()) @@ -708,7 +715,8 @@ bool get_GovCT1_kpload(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT1_kturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kturb; if (!buffer.str().empty()) @@ -722,7 +730,8 @@ bool get_GovCT1_kturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT1_ldref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ldref; if (!buffer.str().empty()) @@ -736,7 +745,8 @@ bool get_GovCT1_ldref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT1_maxerr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxerr; if (!buffer.str().empty()) @@ -750,7 +760,8 @@ bool get_GovCT1_maxerr(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT1_minerr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minerr; if (!buffer.str().empty()) @@ -764,7 +775,8 @@ bool get_GovCT1_minerr(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -778,7 +790,8 @@ bool get_GovCT1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT1_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -792,7 +805,8 @@ bool get_GovCT1_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_rclose(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rclose; if (!buffer.str().empty()) @@ -806,7 +820,8 @@ bool get_GovCT1_rclose(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT1_rdown(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rdown; if (!buffer.str().empty()) @@ -820,7 +835,8 @@ bool get_GovCT1_rdown(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT1_ropen(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ropen; if (!buffer.str().empty()) @@ -832,9 +848,25 @@ bool get_GovCT1_ropen(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } +bool get_GovCT1_rselect(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->rselect; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_GovCT1_rup(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rup; if (!buffer.str().empty()) @@ -848,7 +880,8 @@ bool get_GovCT1_rup(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -862,7 +895,8 @@ bool get_GovCT1_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_tact(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tact; if (!buffer.str().empty()) @@ -876,7 +910,8 @@ bool get_GovCT1_tact(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -890,7 +925,8 @@ bool get_GovCT1_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -904,7 +940,8 @@ bool get_GovCT1_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_tdgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdgov; if (!buffer.str().empty()) @@ -918,7 +955,8 @@ bool get_GovCT1_tdgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT1_teng(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->teng; if (!buffer.str().empty()) @@ -932,7 +970,8 @@ bool get_GovCT1_teng(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_tfload(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tfload; if (!buffer.str().empty()) @@ -946,7 +985,8 @@ bool get_GovCT1_tfload(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT1_tpelec(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpelec; if (!buffer.str().empty()) @@ -960,7 +1000,8 @@ bool get_GovCT1_tpelec(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT1_tsa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tsa; if (!buffer.str().empty()) @@ -974,7 +1015,8 @@ bool get_GovCT1_tsa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_tsb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tsb; if (!buffer.str().empty()) @@ -988,7 +1030,8 @@ bool get_GovCT1_tsb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmax; if (!buffer.str().empty()) @@ -1002,7 +1045,8 @@ bool get_GovCT1_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmin; if (!buffer.str().empty()) @@ -1016,7 +1060,8 @@ bool get_GovCT1_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_wfnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wfnl; if (!buffer.str().empty()) @@ -1030,7 +1075,8 @@ bool get_GovCT1_wfnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_wfspd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wfspd; if (!buffer.str().empty()) @@ -1042,22 +1088,6 @@ bool get_GovCT1_wfspd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - -bool get_GovCT1_rselect(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->rselect; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char GovCT1::debugName[] = "GovCT1"; const char* GovCT1::debugString() const { @@ -1066,46 +1096,46 @@ const char* GovCT1::debugString() const void GovCT1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovCT1"), &GovCT1_factory)); + factory_map.emplace("cim:GovCT1", &GovCT1_factory); } void GovCT1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovCT1.aset"), &assign_GovCT1_aset)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.db"), &assign_GovCT1_db)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.dm"), &assign_GovCT1_dm)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.ka"), &assign_GovCT1_ka)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.kdgov"), &assign_GovCT1_kdgov)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.kigov"), &assign_GovCT1_kigov)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.kiload"), &assign_GovCT1_kiload)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.kimw"), &assign_GovCT1_kimw)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.kpgov"), &assign_GovCT1_kpgov)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.kpload"), &assign_GovCT1_kpload)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.kturb"), &assign_GovCT1_kturb)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.ldref"), &assign_GovCT1_ldref)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.maxerr"), &assign_GovCT1_maxerr)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.minerr"), &assign_GovCT1_minerr)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.mwbase"), &assign_GovCT1_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.r"), &assign_GovCT1_r)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.rclose"), &assign_GovCT1_rclose)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.rdown"), &assign_GovCT1_rdown)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.ropen"), &assign_GovCT1_ropen)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.rselect"), &assign_GovCT1_rselect)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.rup"), &assign_GovCT1_rup)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.ta"), &assign_GovCT1_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.tact"), &assign_GovCT1_tact)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.tb"), &assign_GovCT1_tb)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.tc"), &assign_GovCT1_tc)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.tdgov"), &assign_GovCT1_tdgov)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.teng"), &assign_GovCT1_teng)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.tfload"), &assign_GovCT1_tfload)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.tpelec"), &assign_GovCT1_tpelec)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.tsa"), &assign_GovCT1_tsa)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.tsb"), &assign_GovCT1_tsb)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.vmax"), &assign_GovCT1_vmax)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.vmin"), &assign_GovCT1_vmin)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.wfnl"), &assign_GovCT1_wfnl)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.wfspd"), &assign_GovCT1_wfspd)); + assign_map.emplace("cim:GovCT1.aset", &assign_GovCT1_aset); + assign_map.emplace("cim:GovCT1.db", &assign_GovCT1_db); + assign_map.emplace("cim:GovCT1.dm", &assign_GovCT1_dm); + assign_map.emplace("cim:GovCT1.ka", &assign_GovCT1_ka); + assign_map.emplace("cim:GovCT1.kdgov", &assign_GovCT1_kdgov); + assign_map.emplace("cim:GovCT1.kigov", &assign_GovCT1_kigov); + assign_map.emplace("cim:GovCT1.kiload", &assign_GovCT1_kiload); + assign_map.emplace("cim:GovCT1.kimw", &assign_GovCT1_kimw); + assign_map.emplace("cim:GovCT1.kpgov", &assign_GovCT1_kpgov); + assign_map.emplace("cim:GovCT1.kpload", &assign_GovCT1_kpload); + assign_map.emplace("cim:GovCT1.kturb", &assign_GovCT1_kturb); + assign_map.emplace("cim:GovCT1.ldref", &assign_GovCT1_ldref); + assign_map.emplace("cim:GovCT1.maxerr", &assign_GovCT1_maxerr); + assign_map.emplace("cim:GovCT1.minerr", &assign_GovCT1_minerr); + assign_map.emplace("cim:GovCT1.mwbase", &assign_GovCT1_mwbase); + assign_map.emplace("cim:GovCT1.r", &assign_GovCT1_r); + assign_map.emplace("cim:GovCT1.rclose", &assign_GovCT1_rclose); + assign_map.emplace("cim:GovCT1.rdown", &assign_GovCT1_rdown); + assign_map.emplace("cim:GovCT1.ropen", &assign_GovCT1_ropen); + assign_map.emplace("cim:GovCT1.rselect", &assign_GovCT1_rselect); + assign_map.emplace("cim:GovCT1.rup", &assign_GovCT1_rup); + assign_map.emplace("cim:GovCT1.ta", &assign_GovCT1_ta); + assign_map.emplace("cim:GovCT1.tact", &assign_GovCT1_tact); + assign_map.emplace("cim:GovCT1.tb", &assign_GovCT1_tb); + assign_map.emplace("cim:GovCT1.tc", &assign_GovCT1_tc); + assign_map.emplace("cim:GovCT1.tdgov", &assign_GovCT1_tdgov); + assign_map.emplace("cim:GovCT1.teng", &assign_GovCT1_teng); + assign_map.emplace("cim:GovCT1.tfload", &assign_GovCT1_tfload); + assign_map.emplace("cim:GovCT1.tpelec", &assign_GovCT1_tpelec); + assign_map.emplace("cim:GovCT1.tsa", &assign_GovCT1_tsa); + assign_map.emplace("cim:GovCT1.tsb", &assign_GovCT1_tsb); + assign_map.emplace("cim:GovCT1.vmax", &assign_GovCT1_vmax); + assign_map.emplace("cim:GovCT1.vmin", &assign_GovCT1_vmin); + assign_map.emplace("cim:GovCT1.wfnl", &assign_GovCT1_wfnl); + assign_map.emplace("cim:GovCT1.wfspd", &assign_GovCT1_wfspd); } void GovCT1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/GovCT1.hpp b/CGMES_2.4.15_27JAN2020/GovCT1.hpp index 40520dfe6..4bcbc8131 100644 --- a/CGMES_2.4.15_27JAN2020/GovCT1.hpp +++ b/CGMES_2.4.15_27JAN2020/GovCT1.hpp @@ -22,9 +22,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - General model for any prime mover with a PID governor, used primarily for combustion turbine and combined cycle units. This model can be used to represent a variety of prime movers controlled by PID governors. It is suitable, for example, for representation of Additional information on this model is available in the 2012 IEEE report, , section 3.1.2.3 page 3-4 (GGOV1). - */ + /** \brief General model for any prime mover with a PID governor, used primarily for combustion turbine and combined cycle units. This model can be used to represent a variety of prime movers controlled by PID governors. It is suitable, for example, for representation of Additional information on this model is available in the 2012 IEEE report, , section 3.1.2.3 page 3-4 (GGOV1). */ class GovCT1 : public TurbineGovernorDynamics { public: @@ -32,41 +30,110 @@ namespace CIMPP GovCT1(); ~GovCT1() override; - CIMPP::Simple_Float aset; /* Acceleration limiter setpoint (Aset). Unit = PU/sec. Typical Value = 0.01. Default: nullptr */ - CIMPP::PU db; /* Speed governor dead band in per unit speed (db). In the majority of applications, it is recommended that this value be set to zero. Typical Value = 0. Default: nullptr */ - CIMPP::PU dm; /* Speed sensitivity coefficient (Dm). Dm can represent either the variation of the engine power with the shaft speed or the variation of maximum power capability with shaft speed. If it is positive it describes the falling slope of the engine speed verses power characteristic as speed increases. A slightly falling characteristic is typical for reciprocating engines and some aero-derivative turbines. If it is negative the engine power is assumed to be unaffected by the shaft speed, but the maximum permissible fuel flow is taken to fall with falling shaft speed. This is characteristic of single-shaft industrial turbines due to exhaust temperature limits. Typical Value = 0. Default: nullptr */ - CIMPP::PU ka; /* Acceleration limiter gain (Ka). Typical Value = 10. Default: nullptr */ - CIMPP::PU kdgov; /* Governor derivative gain (Kdgov). Typical Value = 0. Default: nullptr */ - CIMPP::PU kigov; /* Governor integral gain (Kigov). Typical Value = 2. Default: nullptr */ - CIMPP::PU kiload; /* Load limiter integral gain for PI controller (Kiload). Typical Value = 0.67. Default: nullptr */ - CIMPP::PU kimw; /* Power controller (reset) gain (Kimw). The default value of 0.01 corresponds to a reset time of 100 seconds. A value of 0.001 corresponds to a relatively slow acting load controller. Typical Value = 0.01. Default: nullptr */ - CIMPP::PU kpgov; /* Governor proportional gain (Kpgov). Typical Value = 10. Default: nullptr */ - CIMPP::PU kpload; /* Load limiter proportional gain for PI controller (Kpload). Typical Value = 2. Default: nullptr */ - CIMPP::PU kturb; /* Turbine gain (Kturb) (>0). Typical Value = 1.5. Default: nullptr */ - CIMPP::PU ldref; /* Load limiter reference value (Ldref). Typical Value = 1. Default: nullptr */ - CIMPP::PU maxerr; /* Maximum value for speed error signal (maxerr). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU minerr; /* Minimum value for speed error signal (minerr). Typical Value = -0.05. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ - CIMPP::PU r; /* Permanent droop (R). Typical Value = 0.04. Default: nullptr */ - CIMPP::Simple_Float rclose; /* Minimum valve closing rate (Rclose). Unit = PU/sec. Typical Value = -0.1. Default: nullptr */ - CIMPP::PU rdown; /* Maximum rate of load limit decrease (Rdown). Typical Value = -99. Default: nullptr */ - CIMPP::Simple_Float ropen; /* Maximum valve opening rate (Ropen). Unit = PU/sec. Typical Value = 0.10. Default: nullptr */ - CIMPP::DroopSignalFeedbackKind rselect; /* Feedback signal for droop (Rselect). Typical Value = electricalPower. Default: 0 */ - CIMPP::PU rup; /* Maximum rate of load limit increase (Rup). Typical Value = 99. Default: nullptr */ - CIMPP::Seconds ta; /* Acceleration limiter time constant (Ta) (>0). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tact; /* Actuator time constant (Tact). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tb; /* Turbine lag time constant (Tb) (>0). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tc; /* Turbine lead time constant (Tc). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tdgov; /* Governor derivative controller time constant (Tdgov). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds teng; /* Transport time delay for diesel engine used in representing diesel engines where there is a small but measurable transport delay between a change in fuel flow setting and the development of torque (Teng). Teng should be zero in all but special cases where this transport delay is of particular concern. Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tfload; /* Load Limiter time constant (Tfload) (>0). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds tpelec; /* Electrical power transducer time constant (Tpelec) (>0). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tsa; /* Temperature detection lead time constant (Tsa). Typical Value = 4. Default: nullptr */ - CIMPP::Seconds tsb; /* Temperature detection lag time constant (Tsb). Typical Value = 5. Default: nullptr */ - CIMPP::PU vmax; /* Maximum valve position limit (Vmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU vmin; /* Minimum valve position limit (Vmin). Typical Value = 0.15. Default: nullptr */ - CIMPP::PU wfnl; /* No load fuel flow (Wfnl). Typical Value = 0.2. Default: nullptr */ - CIMPP::Boolean wfspd; /* Switch for fuel source characteristic to recognize that fuel flow, for a given fuel valve stroke, can be proportional to engine speed (Wfspd). true = fuel flow proportional to speed (for some gas turbines and diesel engines with positive displacement fuel injectors) false = fuel control system keeps fuel flow independent of engine speed. Typical Value = true. Default: false */ + /** \brief Acceleration limiter setpoint (Aset). Unit = PU/sec. Typical Value = 0.01. Default: nullptr */ + CIMPP::Simple_Float aset; + + /** \brief Speed governor dead band in per unit speed (db). In the majority of applications, it is recommended that this value be set to zero. Typical Value = 0. Default: nullptr */ + CIMPP::PU db; + + /** \brief Speed sensitivity coefficient (Dm). Dm can represent either the variation of the engine power with the shaft speed or the variation of maximum power capability with shaft speed. If it is positive it describes the falling slope of the engine speed verses power characteristic as speed increases. A slightly falling characteristic is typical for reciprocating engines and some aero-derivative turbines. If it is negative the engine power is assumed to be unaffected by the shaft speed, but the maximum permissible fuel flow is taken to fall with falling shaft speed. This is characteristic of single-shaft industrial turbines due to exhaust temperature limits. Typical Value = 0. Default: nullptr */ + CIMPP::PU dm; + + /** \brief Acceleration limiter gain (Ka). Typical Value = 10. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Governor derivative gain (Kdgov). Typical Value = 0. Default: nullptr */ + CIMPP::PU kdgov; + + /** \brief Governor integral gain (Kigov). Typical Value = 2. Default: nullptr */ + CIMPP::PU kigov; + + /** \brief Load limiter integral gain for PI controller (Kiload). Typical Value = 0.67. Default: nullptr */ + CIMPP::PU kiload; + + /** \brief Power controller (reset) gain (Kimw). The default value of 0.01 corresponds to a reset time of 100 seconds. A value of 0.001 corresponds to a relatively slow acting load controller. Typical Value = 0.01. Default: nullptr */ + CIMPP::PU kimw; + + /** \brief Governor proportional gain (Kpgov). Typical Value = 10. Default: nullptr */ + CIMPP::PU kpgov; + + /** \brief Load limiter proportional gain for PI controller (Kpload). Typical Value = 2. Default: nullptr */ + CIMPP::PU kpload; + + /** \brief Turbine gain (Kturb) (>0). Typical Value = 1.5. Default: nullptr */ + CIMPP::PU kturb; + + /** \brief Load limiter reference value (Ldref). Typical Value = 1. Default: nullptr */ + CIMPP::PU ldref; + + /** \brief Maximum value for speed error signal (maxerr). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU maxerr; + + /** \brief Minimum value for speed error signal (minerr). Typical Value = -0.05. Default: nullptr */ + CIMPP::PU minerr; + + /** \brief Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Permanent droop (R). Typical Value = 0.04. Default: nullptr */ + CIMPP::PU r; + + /** \brief Minimum valve closing rate (Rclose). Unit = PU/sec. Typical Value = -0.1. Default: nullptr */ + CIMPP::Simple_Float rclose; + + /** \brief Maximum rate of load limit decrease (Rdown). Typical Value = -99. Default: nullptr */ + CIMPP::PU rdown; + + /** \brief Maximum valve opening rate (Ropen). Unit = PU/sec. Typical Value = 0.10. Default: nullptr */ + CIMPP::Simple_Float ropen; + + /** \brief Feedback signal for droop (Rselect). Typical Value = electricalPower. Default: 0 */ + CIMPP::DroopSignalFeedbackKind rselect; + + /** \brief Maximum rate of load limit increase (Rup). Typical Value = 99. Default: nullptr */ + CIMPP::PU rup; + + /** \brief Acceleration limiter time constant (Ta) (>0). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Actuator time constant (Tact). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds tact; + + /** \brief Turbine lag time constant (Tb) (>0). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Turbine lead time constant (Tc). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Governor derivative controller time constant (Tdgov). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tdgov; + + /** \brief Transport time delay for diesel engine used in representing diesel engines where there is a small but measurable transport delay between a change in fuel flow setting and the development of torque (Teng). Teng should be zero in all but special cases where this transport delay is of particular concern. Typical Value = 0. Default: nullptr */ + CIMPP::Seconds teng; + + /** \brief Load Limiter time constant (Tfload) (>0). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds tfload; + + /** \brief Electrical power transducer time constant (Tpelec) (>0). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tpelec; + + /** \brief Temperature detection lead time constant (Tsa). Typical Value = 4. Default: nullptr */ + CIMPP::Seconds tsa; + + /** \brief Temperature detection lag time constant (Tsb). Typical Value = 5. Default: nullptr */ + CIMPP::Seconds tsb; + + /** \brief Maximum valve position limit (Vmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU vmax; + + /** \brief Minimum valve position limit (Vmin). Typical Value = 0.15. Default: nullptr */ + CIMPP::PU vmin; + + /** \brief No load fuel flow (Wfnl). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU wfnl; + + /** \brief Switch for fuel source characteristic to recognize that fuel flow, for a given fuel valve stroke, can be proportional to engine speed (Wfspd). true = fuel flow proportional to speed (for some gas turbines and diesel engines with positive displacement fuel injectors) false = fuel control system keeps fuel flow independent of engine speed. Typical Value = true. Default: false */ + CIMPP::Boolean wfspd; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GovCT2.cpp b/CGMES_2.4.15_27JAN2020/GovCT2.cpp index c0dc255dc..482a2691f 100644 --- a/CGMES_2.4.15_27JAN2020/GovCT2.cpp +++ b/CGMES_2.4.15_27JAN2020/GovCT2.cpp @@ -8,67 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "DroopSignalFeedbackKind.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" using namespace CIMPP; -GovCT2::GovCT2() {}; -GovCT2::~GovCT2() {}; +GovCT2::GovCT2() {} +GovCT2::~GovCT2() {} static const std::list PossibleProfilesForClass = { @@ -150,740 +94,794 @@ GovCT2::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovCT2_aset(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_aset(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->aset; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_db(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_db(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_dm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_dm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_kdgov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_kdgov(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kdgov; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_kigov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_kigov(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kigov; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_kiload(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_kiload(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kiload; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_kimw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_kimw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kimw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_kpgov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_kpgov(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpgov; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_kpload(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_kpload(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpload; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_kturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_kturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_ldref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_ldref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ldref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_maxerr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_maxerr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxerr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_minerr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_minerr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minerr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_prate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_prate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->prate; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_rclose(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_rclose(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rclose; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_rdown(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_rdown(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rdown; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_ropen(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_ropen(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ropen; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_rselect(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_rselect(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rselect; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_rup(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_rup(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rup; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_tact(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_tact(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tact; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_tdgov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_tdgov(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdgov; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_teng(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_teng(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->teng; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_tfload(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_tfload(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tfload; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_tpelec(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_tpelec(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpelec; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_tsa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_tsa(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tsa; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_tsb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_tsb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tsb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_vmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_vmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_wfnl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_wfnl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wfnl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_wfspd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_wfspd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wfspd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovCT2_aset(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->aset; if (!buffer.str().empty()) @@ -897,7 +895,8 @@ bool get_GovCT2_aset(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_db(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db; if (!buffer.str().empty()) @@ -911,7 +910,8 @@ bool get_GovCT2_db(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_dm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dm; if (!buffer.str().empty()) @@ -925,7 +925,8 @@ bool get_GovCT2_dm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_flim1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim1; if (!buffer.str().empty()) @@ -939,7 +940,8 @@ bool get_GovCT2_flim1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_flim10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim10; if (!buffer.str().empty()) @@ -953,7 +955,8 @@ bool get_GovCT2_flim10(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_flim2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim2; if (!buffer.str().empty()) @@ -967,7 +970,8 @@ bool get_GovCT2_flim2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_flim3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim3; if (!buffer.str().empty()) @@ -981,7 +985,8 @@ bool get_GovCT2_flim3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_flim4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim4; if (!buffer.str().empty()) @@ -995,7 +1000,8 @@ bool get_GovCT2_flim4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_flim5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim5; if (!buffer.str().empty()) @@ -1009,7 +1015,8 @@ bool get_GovCT2_flim5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_flim6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim6; if (!buffer.str().empty()) @@ -1023,7 +1030,8 @@ bool get_GovCT2_flim6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_flim7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim7; if (!buffer.str().empty()) @@ -1037,7 +1045,8 @@ bool get_GovCT2_flim7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_flim8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim8; if (!buffer.str().empty()) @@ -1051,7 +1060,8 @@ bool get_GovCT2_flim8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_flim9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim9; if (!buffer.str().empty()) @@ -1065,7 +1075,8 @@ bool get_GovCT2_flim9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -1079,7 +1090,8 @@ bool get_GovCT2_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_kdgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdgov; if (!buffer.str().empty()) @@ -1093,7 +1105,8 @@ bool get_GovCT2_kdgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_kigov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kigov; if (!buffer.str().empty()) @@ -1107,7 +1120,8 @@ bool get_GovCT2_kigov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_kiload(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kiload; if (!buffer.str().empty()) @@ -1121,7 +1135,8 @@ bool get_GovCT2_kiload(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_kimw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kimw; if (!buffer.str().empty()) @@ -1135,7 +1150,8 @@ bool get_GovCT2_kimw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_kpgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpgov; if (!buffer.str().empty()) @@ -1149,7 +1165,8 @@ bool get_GovCT2_kpgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_kpload(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpload; if (!buffer.str().empty()) @@ -1163,7 +1180,8 @@ bool get_GovCT2_kpload(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_kturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kturb; if (!buffer.str().empty()) @@ -1177,7 +1195,8 @@ bool get_GovCT2_kturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_ldref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ldref; if (!buffer.str().empty()) @@ -1191,7 +1210,8 @@ bool get_GovCT2_ldref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_maxerr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxerr; if (!buffer.str().empty()) @@ -1205,7 +1225,8 @@ bool get_GovCT2_maxerr(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_minerr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minerr; if (!buffer.str().empty()) @@ -1219,7 +1240,8 @@ bool get_GovCT2_minerr(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -1233,7 +1255,8 @@ bool get_GovCT2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_plim1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim1; if (!buffer.str().empty()) @@ -1247,7 +1270,8 @@ bool get_GovCT2_plim1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_plim10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim10; if (!buffer.str().empty()) @@ -1261,7 +1285,8 @@ bool get_GovCT2_plim10(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_plim2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim2; if (!buffer.str().empty()) @@ -1275,7 +1300,8 @@ bool get_GovCT2_plim2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_plim3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim3; if (!buffer.str().empty()) @@ -1289,7 +1315,8 @@ bool get_GovCT2_plim3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_plim4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim4; if (!buffer.str().empty()) @@ -1303,7 +1330,8 @@ bool get_GovCT2_plim4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_plim5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim5; if (!buffer.str().empty()) @@ -1317,7 +1345,8 @@ bool get_GovCT2_plim5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_plim6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim6; if (!buffer.str().empty()) @@ -1331,7 +1360,8 @@ bool get_GovCT2_plim6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_plim7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim7; if (!buffer.str().empty()) @@ -1345,7 +1375,8 @@ bool get_GovCT2_plim7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_plim8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim8; if (!buffer.str().empty()) @@ -1359,7 +1390,8 @@ bool get_GovCT2_plim8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_plim9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim9; if (!buffer.str().empty()) @@ -1373,7 +1405,8 @@ bool get_GovCT2_plim9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_prate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->prate; if (!buffer.str().empty()) @@ -1387,7 +1420,8 @@ bool get_GovCT2_prate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -1401,7 +1435,8 @@ bool get_GovCT2_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_rclose(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rclose; if (!buffer.str().empty()) @@ -1415,7 +1450,8 @@ bool get_GovCT2_rclose(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_rdown(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rdown; if (!buffer.str().empty()) @@ -1429,7 +1465,8 @@ bool get_GovCT2_rdown(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_ropen(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ropen; if (!buffer.str().empty()) @@ -1441,9 +1478,25 @@ bool get_GovCT2_ropen(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } +bool get_GovCT2_rselect(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->rselect; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_GovCT2_rup(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rup; if (!buffer.str().empty()) @@ -1457,7 +1510,8 @@ bool get_GovCT2_rup(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -1471,7 +1525,8 @@ bool get_GovCT2_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_tact(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tact; if (!buffer.str().empty()) @@ -1485,7 +1540,8 @@ bool get_GovCT2_tact(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -1499,7 +1555,8 @@ bool get_GovCT2_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -1513,7 +1570,8 @@ bool get_GovCT2_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_tdgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdgov; if (!buffer.str().empty()) @@ -1527,7 +1585,8 @@ bool get_GovCT2_tdgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_teng(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->teng; if (!buffer.str().empty()) @@ -1541,7 +1600,8 @@ bool get_GovCT2_teng(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_tfload(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tfload; if (!buffer.str().empty()) @@ -1555,7 +1615,8 @@ bool get_GovCT2_tfload(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_tpelec(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpelec; if (!buffer.str().empty()) @@ -1569,7 +1630,8 @@ bool get_GovCT2_tpelec(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_tsa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tsa; if (!buffer.str().empty()) @@ -1583,7 +1645,8 @@ bool get_GovCT2_tsa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_tsb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tsb; if (!buffer.str().empty()) @@ -1597,7 +1660,8 @@ bool get_GovCT2_tsb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmax; if (!buffer.str().empty()) @@ -1611,7 +1675,8 @@ bool get_GovCT2_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmin; if (!buffer.str().empty()) @@ -1625,7 +1690,8 @@ bool get_GovCT2_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_wfnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wfnl; if (!buffer.str().empty()) @@ -1639,7 +1705,8 @@ bool get_GovCT2_wfnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_wfspd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wfspd; if (!buffer.str().empty()) @@ -1651,22 +1718,6 @@ bool get_GovCT2_wfspd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - -bool get_GovCT2_rselect(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->rselect; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char GovCT2::debugName[] = "GovCT2"; const char* GovCT2::debugString() const { @@ -1675,67 +1726,67 @@ const char* GovCT2::debugString() const void GovCT2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovCT2"), &GovCT2_factory)); + factory_map.emplace("cim:GovCT2", &GovCT2_factory); } void GovCT2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovCT2.aset"), &assign_GovCT2_aset)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.db"), &assign_GovCT2_db)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.dm"), &assign_GovCT2_dm)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim1"), &assign_GovCT2_flim1)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim10"), &assign_GovCT2_flim10)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim2"), &assign_GovCT2_flim2)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim3"), &assign_GovCT2_flim3)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim4"), &assign_GovCT2_flim4)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim5"), &assign_GovCT2_flim5)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim6"), &assign_GovCT2_flim6)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim7"), &assign_GovCT2_flim7)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim8"), &assign_GovCT2_flim8)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim9"), &assign_GovCT2_flim9)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.ka"), &assign_GovCT2_ka)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.kdgov"), &assign_GovCT2_kdgov)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.kigov"), &assign_GovCT2_kigov)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.kiload"), &assign_GovCT2_kiload)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.kimw"), &assign_GovCT2_kimw)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.kpgov"), &assign_GovCT2_kpgov)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.kpload"), &assign_GovCT2_kpload)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.kturb"), &assign_GovCT2_kturb)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.ldref"), &assign_GovCT2_ldref)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.maxerr"), &assign_GovCT2_maxerr)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.minerr"), &assign_GovCT2_minerr)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.mwbase"), &assign_GovCT2_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim1"), &assign_GovCT2_plim1)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim10"), &assign_GovCT2_plim10)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim2"), &assign_GovCT2_plim2)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim3"), &assign_GovCT2_plim3)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim4"), &assign_GovCT2_plim4)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim5"), &assign_GovCT2_plim5)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim6"), &assign_GovCT2_plim6)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim7"), &assign_GovCT2_plim7)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim8"), &assign_GovCT2_plim8)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim9"), &assign_GovCT2_plim9)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.prate"), &assign_GovCT2_prate)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.r"), &assign_GovCT2_r)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.rclose"), &assign_GovCT2_rclose)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.rdown"), &assign_GovCT2_rdown)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.ropen"), &assign_GovCT2_ropen)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.rselect"), &assign_GovCT2_rselect)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.rup"), &assign_GovCT2_rup)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.ta"), &assign_GovCT2_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.tact"), &assign_GovCT2_tact)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.tb"), &assign_GovCT2_tb)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.tc"), &assign_GovCT2_tc)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.tdgov"), &assign_GovCT2_tdgov)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.teng"), &assign_GovCT2_teng)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.tfload"), &assign_GovCT2_tfload)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.tpelec"), &assign_GovCT2_tpelec)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.tsa"), &assign_GovCT2_tsa)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.tsb"), &assign_GovCT2_tsb)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.vmax"), &assign_GovCT2_vmax)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.vmin"), &assign_GovCT2_vmin)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.wfnl"), &assign_GovCT2_wfnl)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.wfspd"), &assign_GovCT2_wfspd)); + assign_map.emplace("cim:GovCT2.aset", &assign_GovCT2_aset); + assign_map.emplace("cim:GovCT2.db", &assign_GovCT2_db); + assign_map.emplace("cim:GovCT2.dm", &assign_GovCT2_dm); + assign_map.emplace("cim:GovCT2.flim1", &assign_GovCT2_flim1); + assign_map.emplace("cim:GovCT2.flim10", &assign_GovCT2_flim10); + assign_map.emplace("cim:GovCT2.flim2", &assign_GovCT2_flim2); + assign_map.emplace("cim:GovCT2.flim3", &assign_GovCT2_flim3); + assign_map.emplace("cim:GovCT2.flim4", &assign_GovCT2_flim4); + assign_map.emplace("cim:GovCT2.flim5", &assign_GovCT2_flim5); + assign_map.emplace("cim:GovCT2.flim6", &assign_GovCT2_flim6); + assign_map.emplace("cim:GovCT2.flim7", &assign_GovCT2_flim7); + assign_map.emplace("cim:GovCT2.flim8", &assign_GovCT2_flim8); + assign_map.emplace("cim:GovCT2.flim9", &assign_GovCT2_flim9); + assign_map.emplace("cim:GovCT2.ka", &assign_GovCT2_ka); + assign_map.emplace("cim:GovCT2.kdgov", &assign_GovCT2_kdgov); + assign_map.emplace("cim:GovCT2.kigov", &assign_GovCT2_kigov); + assign_map.emplace("cim:GovCT2.kiload", &assign_GovCT2_kiload); + assign_map.emplace("cim:GovCT2.kimw", &assign_GovCT2_kimw); + assign_map.emplace("cim:GovCT2.kpgov", &assign_GovCT2_kpgov); + assign_map.emplace("cim:GovCT2.kpload", &assign_GovCT2_kpload); + assign_map.emplace("cim:GovCT2.kturb", &assign_GovCT2_kturb); + assign_map.emplace("cim:GovCT2.ldref", &assign_GovCT2_ldref); + assign_map.emplace("cim:GovCT2.maxerr", &assign_GovCT2_maxerr); + assign_map.emplace("cim:GovCT2.minerr", &assign_GovCT2_minerr); + assign_map.emplace("cim:GovCT2.mwbase", &assign_GovCT2_mwbase); + assign_map.emplace("cim:GovCT2.plim1", &assign_GovCT2_plim1); + assign_map.emplace("cim:GovCT2.plim10", &assign_GovCT2_plim10); + assign_map.emplace("cim:GovCT2.plim2", &assign_GovCT2_plim2); + assign_map.emplace("cim:GovCT2.plim3", &assign_GovCT2_plim3); + assign_map.emplace("cim:GovCT2.plim4", &assign_GovCT2_plim4); + assign_map.emplace("cim:GovCT2.plim5", &assign_GovCT2_plim5); + assign_map.emplace("cim:GovCT2.plim6", &assign_GovCT2_plim6); + assign_map.emplace("cim:GovCT2.plim7", &assign_GovCT2_plim7); + assign_map.emplace("cim:GovCT2.plim8", &assign_GovCT2_plim8); + assign_map.emplace("cim:GovCT2.plim9", &assign_GovCT2_plim9); + assign_map.emplace("cim:GovCT2.prate", &assign_GovCT2_prate); + assign_map.emplace("cim:GovCT2.r", &assign_GovCT2_r); + assign_map.emplace("cim:GovCT2.rclose", &assign_GovCT2_rclose); + assign_map.emplace("cim:GovCT2.rdown", &assign_GovCT2_rdown); + assign_map.emplace("cim:GovCT2.ropen", &assign_GovCT2_ropen); + assign_map.emplace("cim:GovCT2.rselect", &assign_GovCT2_rselect); + assign_map.emplace("cim:GovCT2.rup", &assign_GovCT2_rup); + assign_map.emplace("cim:GovCT2.ta", &assign_GovCT2_ta); + assign_map.emplace("cim:GovCT2.tact", &assign_GovCT2_tact); + assign_map.emplace("cim:GovCT2.tb", &assign_GovCT2_tb); + assign_map.emplace("cim:GovCT2.tc", &assign_GovCT2_tc); + assign_map.emplace("cim:GovCT2.tdgov", &assign_GovCT2_tdgov); + assign_map.emplace("cim:GovCT2.teng", &assign_GovCT2_teng); + assign_map.emplace("cim:GovCT2.tfload", &assign_GovCT2_tfload); + assign_map.emplace("cim:GovCT2.tpelec", &assign_GovCT2_tpelec); + assign_map.emplace("cim:GovCT2.tsa", &assign_GovCT2_tsa); + assign_map.emplace("cim:GovCT2.tsb", &assign_GovCT2_tsb); + assign_map.emplace("cim:GovCT2.vmax", &assign_GovCT2_vmax); + assign_map.emplace("cim:GovCT2.vmin", &assign_GovCT2_vmin); + assign_map.emplace("cim:GovCT2.wfnl", &assign_GovCT2_wfnl); + assign_map.emplace("cim:GovCT2.wfspd", &assign_GovCT2_wfspd); } void GovCT2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/GovCT2.hpp b/CGMES_2.4.15_27JAN2020/GovCT2.hpp index cc7c53d56..bb33e770d 100644 --- a/CGMES_2.4.15_27JAN2020/GovCT2.hpp +++ b/CGMES_2.4.15_27JAN2020/GovCT2.hpp @@ -23,9 +23,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - General governor model with frequency-dependent fuel flow limit. This model is a modification of the GovCT1model in order to represent the frequency-dependent fuel flow limit of a specific gas turbine manufacturer. - */ + /** \brief General governor model with frequency-dependent fuel flow limit. This model is a modification of the GovCT1model in order to represent the frequency-dependent fuel flow limit of a specific gas turbine manufacturer. */ class GovCT2 : public TurbineGovernorDynamics { public: @@ -33,62 +31,173 @@ namespace CIMPP GovCT2(); ~GovCT2() override; - CIMPP::Simple_Float aset; /* Acceleration limiter setpoint (Aset). Unit = PU/sec. Typical Value = 10. Default: nullptr */ - CIMPP::PU db; /* Speed governor dead band in per unit speed (db). In the majority of applications, it is recommended that this value be set to zero. Typical Value = 0. Default: nullptr */ - CIMPP::PU dm; /* Speed sensitivity coefficient (Dm). Dm can represent either the variation of the engine power with the shaft speed or the variation of maximum power capability with shaft speed. If it is positive it describes the falling slope of the engine speed verses power characteristic as speed increases. A slightly falling characteristic is typical for reciprocating engines and some aero-derivative turbines. If it is negative the engine power is assumed to be unaffected by the shaft speed, but the maximum permissible fuel flow is taken to fall with falling shaft speed. This is characteristic of single-shaft industrial turbines due to exhaust temperature limits. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency flim1; /* Frequency threshold 1 (Flim1). Unit = Hz. Typical Value = 59. Default: nullptr */ - CIMPP::Frequency flim10; /* Frequency threshold 10 (Flim10). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency flim2; /* Frequency threshold 2 (Flim2). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency flim3; /* Frequency threshold 3 (Flim3). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency flim4; /* Frequency threshold 4 (Flim4). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency flim5; /* Frequency threshold 5 (Flim5). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency flim6; /* Frequency threshold 6 (Flim6). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency flim7; /* Frequency threshold 7 (Flim7). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency flim8; /* Frequency threshold 8 (Flim8). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency flim9; /* Frequency threshold 9 (Flim9). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::PU ka; /* Acceleration limiter Gain (Ka). Typical Value = 10. Default: nullptr */ - CIMPP::PU kdgov; /* Governor derivative gain (Kdgov). Typical Value = 0. Default: nullptr */ - CIMPP::PU kigov; /* Governor integral gain (Kigov). Typical Value = 0.45. Default: nullptr */ - CIMPP::PU kiload; /* Load limiter integral gain for PI controller (Kiload). Typical Value = 1. Default: nullptr */ - CIMPP::PU kimw; /* Power controller (reset) gain (Kimw). The default value of 0.01 corresponds to a reset time of 100 seconds. A value of 0.001 corresponds to a relatively slow acting load controller. Typical Value = 0. Default: nullptr */ - CIMPP::PU kpgov; /* Governor proportional gain (Kpgov). Typical Value = 4. Default: nullptr */ - CIMPP::PU kpload; /* Load limiter proportional gain for PI controller (Kpload). Typical Value = 1. Default: nullptr */ - CIMPP::PU kturb; /* Turbine gain (Kturb). Typical Value = 1.9168. Default: nullptr */ - CIMPP::PU ldref; /* Load limiter reference value (Ldref). Typical Value = 1. Default: nullptr */ - CIMPP::PU maxerr; /* Maximum value for speed error signal (Maxerr). Typical Value = 1. Default: nullptr */ - CIMPP::PU minerr; /* Minimum value for speed error signal (Minerr). Typical Value = -1. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ - CIMPP::PU plim1; /* Power limit 1 (Plim1). Typical Value = 0.8325. Default: nullptr */ - CIMPP::PU plim10; /* Power limit 10 (Plim10). Typical Value = 0. Default: nullptr */ - CIMPP::PU plim2; /* Power limit 2 (Plim2). Typical Value = 0. Default: nullptr */ - CIMPP::PU plim3; /* Power limit 3 (Plim3). Typical Value = 0. Default: nullptr */ - CIMPP::PU plim4; /* Power limit 4 (Plim4). Typical Value = 0. Default: nullptr */ - CIMPP::PU plim5; /* Power limit 5 (Plim5). Typical Value = 0. Default: nullptr */ - CIMPP::PU plim6; /* Power limit 6 (Plim6). Typical Value = 0. Default: nullptr */ - CIMPP::PU plim7; /* Power limit 7 (Plim7). Typical Value = 0. Default: nullptr */ - CIMPP::PU plim8; /* Power limit 8 (Plim8). Typical Value = 0. Default: nullptr */ - CIMPP::PU plim9; /* Power Limit 9 (Plim9). Typical Value = 0. Default: nullptr */ - CIMPP::PU prate; /* Ramp rate for frequency-dependent power limit (Prate). Typical Value = 0.017. Default: nullptr */ - CIMPP::PU r; /* Permanent droop (R). Typical Value = 0.05. Default: nullptr */ - CIMPP::Simple_Float rclose; /* Minimum valve closing rate (Rclose). Unit = PU/sec. Typical Value = -99. Default: nullptr */ - CIMPP::PU rdown; /* Maximum rate of load limit decrease (Rdown). Typical Value = -99. Default: nullptr */ - CIMPP::Simple_Float ropen; /* Maximum valve opening rate (Ropen). Unit = PU/sec. Typical Value = 99. Default: nullptr */ - CIMPP::DroopSignalFeedbackKind rselect; /* Feedback signal for droop (Rselect). Typical Value = electricalPower. Default: 0 */ - CIMPP::PU rup; /* Maximum rate of load limit increase (Rup). Typical Value = 99. Default: nullptr */ - CIMPP::Seconds ta; /* Acceleration limiter time constant (Ta). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tact; /* Actuator time constant (Tact). Typical Value = 0.4. Default: nullptr */ - CIMPP::Seconds tb; /* Turbine lag time constant (Tb). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tc; /* Turbine lead time constant (Tc). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tdgov; /* Governor derivative controller time constant (Tdgov). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds teng; /* Transport time delay for diesel engine used in representing diesel engines where there is a small but measurable transport delay between a change in fuel flow setting and the development of torque (Teng). Teng should be zero in all but special cases where this transport delay is of particular concern. Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tfload; /* Load Limiter time constant (Tfload). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds tpelec; /* Electrical power transducer time constant (Tpelec). Typical Value = 2.5. Default: nullptr */ - CIMPP::Seconds tsa; /* Temperature detection lead time constant (Tsa). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tsb; /* Temperature detection lag time constant (Tsb). Typical Value = 50. Default: nullptr */ - CIMPP::PU vmax; /* Maximum valve position limit (Vmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU vmin; /* Minimum valve position limit (Vmin). Typical Value = 0.175. Default: nullptr */ - CIMPP::PU wfnl; /* No load fuel flow (Wfnl). Typical Value = 0.187. Default: nullptr */ - CIMPP::Boolean wfspd; /* Switch for fuel source characteristic to recognize that fuel flow, for a given fuel valve stroke, can be proportional to engine speed (Wfspd). true = fuel flow proportional to speed (for some gas turbines and diesel engines with positive displacement fuel injectors) false = fuel control system keeps fuel flow independent of engine speed. Typical Value = false. Default: false */ + /** \brief Acceleration limiter setpoint (Aset). Unit = PU/sec. Typical Value = 10. Default: nullptr */ + CIMPP::Simple_Float aset; + + /** \brief Speed governor dead band in per unit speed (db). In the majority of applications, it is recommended that this value be set to zero. Typical Value = 0. Default: nullptr */ + CIMPP::PU db; + + /** \brief Speed sensitivity coefficient (Dm). Dm can represent either the variation of the engine power with the shaft speed or the variation of maximum power capability with shaft speed. If it is positive it describes the falling slope of the engine speed verses power characteristic as speed increases. A slightly falling characteristic is typical for reciprocating engines and some aero-derivative turbines. If it is negative the engine power is assumed to be unaffected by the shaft speed, but the maximum permissible fuel flow is taken to fall with falling shaft speed. This is characteristic of single-shaft industrial turbines due to exhaust temperature limits. Typical Value = 0. Default: nullptr */ + CIMPP::PU dm; + + /** \brief Frequency threshold 1 (Flim1). Unit = Hz. Typical Value = 59. Default: nullptr */ + CIMPP::Frequency flim1; + + /** \brief Frequency threshold 10 (Flim10). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency flim10; + + /** \brief Frequency threshold 2 (Flim2). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency flim2; + + /** \brief Frequency threshold 3 (Flim3). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency flim3; + + /** \brief Frequency threshold 4 (Flim4). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency flim4; + + /** \brief Frequency threshold 5 (Flim5). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency flim5; + + /** \brief Frequency threshold 6 (Flim6). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency flim6; + + /** \brief Frequency threshold 7 (Flim7). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency flim7; + + /** \brief Frequency threshold 8 (Flim8). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency flim8; + + /** \brief Frequency threshold 9 (Flim9). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency flim9; + + /** \brief Acceleration limiter Gain (Ka). Typical Value = 10. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Governor derivative gain (Kdgov). Typical Value = 0. Default: nullptr */ + CIMPP::PU kdgov; + + /** \brief Governor integral gain (Kigov). Typical Value = 0.45. Default: nullptr */ + CIMPP::PU kigov; + + /** \brief Load limiter integral gain for PI controller (Kiload). Typical Value = 1. Default: nullptr */ + CIMPP::PU kiload; + + /** \brief Power controller (reset) gain (Kimw). The default value of 0.01 corresponds to a reset time of 100 seconds. A value of 0.001 corresponds to a relatively slow acting load controller. Typical Value = 0. Default: nullptr */ + CIMPP::PU kimw; + + /** \brief Governor proportional gain (Kpgov). Typical Value = 4. Default: nullptr */ + CIMPP::PU kpgov; + + /** \brief Load limiter proportional gain for PI controller (Kpload). Typical Value = 1. Default: nullptr */ + CIMPP::PU kpload; + + /** \brief Turbine gain (Kturb). Typical Value = 1.9168. Default: nullptr */ + CIMPP::PU kturb; + + /** \brief Load limiter reference value (Ldref). Typical Value = 1. Default: nullptr */ + CIMPP::PU ldref; + + /** \brief Maximum value for speed error signal (Maxerr). Typical Value = 1. Default: nullptr */ + CIMPP::PU maxerr; + + /** \brief Minimum value for speed error signal (Minerr). Typical Value = -1. Default: nullptr */ + CIMPP::PU minerr; + + /** \brief Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Power limit 1 (Plim1). Typical Value = 0.8325. Default: nullptr */ + CIMPP::PU plim1; + + /** \brief Power limit 10 (Plim10). Typical Value = 0. Default: nullptr */ + CIMPP::PU plim10; + + /** \brief Power limit 2 (Plim2). Typical Value = 0. Default: nullptr */ + CIMPP::PU plim2; + + /** \brief Power limit 3 (Plim3). Typical Value = 0. Default: nullptr */ + CIMPP::PU plim3; + + /** \brief Power limit 4 (Plim4). Typical Value = 0. Default: nullptr */ + CIMPP::PU plim4; + + /** \brief Power limit 5 (Plim5). Typical Value = 0. Default: nullptr */ + CIMPP::PU plim5; + + /** \brief Power limit 6 (Plim6). Typical Value = 0. Default: nullptr */ + CIMPP::PU plim6; + + /** \brief Power limit 7 (Plim7). Typical Value = 0. Default: nullptr */ + CIMPP::PU plim7; + + /** \brief Power limit 8 (Plim8). Typical Value = 0. Default: nullptr */ + CIMPP::PU plim8; + + /** \brief Power Limit 9 (Plim9). Typical Value = 0. Default: nullptr */ + CIMPP::PU plim9; + + /** \brief Ramp rate for frequency-dependent power limit (Prate). Typical Value = 0.017. Default: nullptr */ + CIMPP::PU prate; + + /** \brief Permanent droop (R). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU r; + + /** \brief Minimum valve closing rate (Rclose). Unit = PU/sec. Typical Value = -99. Default: nullptr */ + CIMPP::Simple_Float rclose; + + /** \brief Maximum rate of load limit decrease (Rdown). Typical Value = -99. Default: nullptr */ + CIMPP::PU rdown; + + /** \brief Maximum valve opening rate (Ropen). Unit = PU/sec. Typical Value = 99. Default: nullptr */ + CIMPP::Simple_Float ropen; + + /** \brief Feedback signal for droop (Rselect). Typical Value = electricalPower. Default: 0 */ + CIMPP::DroopSignalFeedbackKind rselect; + + /** \brief Maximum rate of load limit increase (Rup). Typical Value = 99. Default: nullptr */ + CIMPP::PU rup; + + /** \brief Acceleration limiter time constant (Ta). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Actuator time constant (Tact). Typical Value = 0.4. Default: nullptr */ + CIMPP::Seconds tact; + + /** \brief Turbine lag time constant (Tb). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Turbine lead time constant (Tc). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Governor derivative controller time constant (Tdgov). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tdgov; + + /** \brief Transport time delay for diesel engine used in representing diesel engines where there is a small but measurable transport delay between a change in fuel flow setting and the development of torque (Teng). Teng should be zero in all but special cases where this transport delay is of particular concern. Typical Value = 0. Default: nullptr */ + CIMPP::Seconds teng; + + /** \brief Load Limiter time constant (Tfload). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds tfload; + + /** \brief Electrical power transducer time constant (Tpelec). Typical Value = 2.5. Default: nullptr */ + CIMPP::Seconds tpelec; + + /** \brief Temperature detection lead time constant (Tsa). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tsa; + + /** \brief Temperature detection lag time constant (Tsb). Typical Value = 50. Default: nullptr */ + CIMPP::Seconds tsb; + + /** \brief Maximum valve position limit (Vmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU vmax; + + /** \brief Minimum valve position limit (Vmin). Typical Value = 0.175. Default: nullptr */ + CIMPP::PU vmin; + + /** \brief No load fuel flow (Wfnl). Typical Value = 0.187. Default: nullptr */ + CIMPP::PU wfnl; + + /** \brief Switch for fuel source characteristic to recognize that fuel flow, for a given fuel valve stroke, can be proportional to engine speed (Wfspd). true = fuel flow proportional to speed (for some gas turbines and diesel engines with positive displacement fuel injectors) false = fuel control system keeps fuel flow independent of engine speed. Typical Value = false. Default: false */ + CIMPP::Boolean wfspd; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GovGAST.cpp b/CGMES_2.4.15_27JAN2020/GovGAST.cpp index d91027d02..cc94e78ad 100644 --- a/CGMES_2.4.15_27JAN2020/GovGAST.cpp +++ b/CGMES_2.4.15_27JAN2020/GovGAST.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -GovGAST::GovGAST() {}; -GovGAST::~GovGAST() {}; +GovGAST::GovGAST() {} +GovGAST::~GovGAST() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ GovGAST::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovGAST_at(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_at(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->at; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST_dturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_dturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST_kt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_kt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_vmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_vmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovGAST_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->at; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_GovGAST_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dturb; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_GovGAST_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST_kt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kt; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_GovGAST_kt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_GovGAST_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovGAST_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_GovGAST_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_GovGAST_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_GovGAST_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_GovGAST_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmax; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_GovGAST_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmin; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_GovGAST_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char GovGAST::debugName[] = "GovGAST"; const char* GovGAST::debugString() const { @@ -341,21 +346,21 @@ const char* GovGAST::debugString() const void GovGAST::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovGAST"), &GovGAST_factory)); + factory_map.emplace("cim:GovGAST", &GovGAST_factory); } void GovGAST::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovGAST.at"), &assign_GovGAST_at)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST.dturb"), &assign_GovGAST_dturb)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST.kt"), &assign_GovGAST_kt)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST.mwbase"), &assign_GovGAST_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST.r"), &assign_GovGAST_r)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST.t1"), &assign_GovGAST_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST.t2"), &assign_GovGAST_t2)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST.t3"), &assign_GovGAST_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST.vmax"), &assign_GovGAST_vmax)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST.vmin"), &assign_GovGAST_vmin)); + assign_map.emplace("cim:GovGAST.at", &assign_GovGAST_at); + assign_map.emplace("cim:GovGAST.dturb", &assign_GovGAST_dturb); + assign_map.emplace("cim:GovGAST.kt", &assign_GovGAST_kt); + assign_map.emplace("cim:GovGAST.mwbase", &assign_GovGAST_mwbase); + assign_map.emplace("cim:GovGAST.r", &assign_GovGAST_r); + assign_map.emplace("cim:GovGAST.t1", &assign_GovGAST_t1); + assign_map.emplace("cim:GovGAST.t2", &assign_GovGAST_t2); + assign_map.emplace("cim:GovGAST.t3", &assign_GovGAST_t3); + assign_map.emplace("cim:GovGAST.vmax", &assign_GovGAST_vmax); + assign_map.emplace("cim:GovGAST.vmin", &assign_GovGAST_vmin); } void GovGAST::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/GovGAST.hpp b/CGMES_2.4.15_27JAN2020/GovGAST.hpp index f29598550..497af8aa8 100644 --- a/CGMES_2.4.15_27JAN2020/GovGAST.hpp +++ b/CGMES_2.4.15_27JAN2020/GovGAST.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Single shaft gas turbine. - */ + /** \brief Single shaft gas turbine. */ class GovGAST : public TurbineGovernorDynamics { public: @@ -29,16 +27,35 @@ namespace CIMPP GovGAST(); ~GovGAST() override; - CIMPP::PU at; /* Ambient temperature load limit (Load Limit). Typical Value = 1. Default: nullptr */ - CIMPP::PU dturb; /* Turbine damping factor (Dturb). Typical Value = 0.18. Default: nullptr */ - CIMPP::PU kt; /* Temperature limiter gain (Kt). Typical Value = 3. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (> 0). Default: nullptr */ - CIMPP::PU r; /* Permanent droop (R). Typical Value = 0.04. Default: nullptr */ - CIMPP::Seconds t1; /* Governor mechanism time constant (T1). T1 represents the natural valve positioning time constant of the governor for small disturbances, as seen when rate limiting is not in effect. Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds t2; /* Turbine power time constant (T2). T2 represents delay due to internal energy storage of the gas turbine engine. T2 can be used to give a rough approximation to the delay associated with acceleration of the compressor spool of a multi-shaft engine, or with the compressibility of gas in the plenum of a the free power turbine of an aero-derivative unit, for example. Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds t3; /* Turbine exhaust temperature time constant (T3). Typical Value = 3. Default: nullptr */ - CIMPP::PU vmax; /* Maximum turbine power, PU of MWbase (Vmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU vmin; /* Minimum turbine power, PU of MWbase (Vmin). Typical Value = 0. Default: nullptr */ + /** \brief Ambient temperature load limit (Load Limit). Typical Value = 1. Default: nullptr */ + CIMPP::PU at; + + /** \brief Turbine damping factor (Dturb). Typical Value = 0.18. Default: nullptr */ + CIMPP::PU dturb; + + /** \brief Temperature limiter gain (Kt). Typical Value = 3. Default: nullptr */ + CIMPP::PU kt; + + /** \brief Base for power values (MWbase) (> 0). Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Permanent droop (R). Typical Value = 0.04. Default: nullptr */ + CIMPP::PU r; + + /** \brief Governor mechanism time constant (T1). T1 represents the natural valve positioning time constant of the governor for small disturbances, as seen when rate limiting is not in effect. Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Turbine power time constant (T2). T2 represents delay due to internal energy storage of the gas turbine engine. T2 can be used to give a rough approximation to the delay associated with acceleration of the compressor spool of a multi-shaft engine, or with the compressibility of gas in the plenum of a the free power turbine of an aero-derivative unit, for example. Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Turbine exhaust temperature time constant (T3). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Maximum turbine power, PU of MWbase (Vmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU vmax; + + /** \brief Minimum turbine power, PU of MWbase (Vmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU vmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GovGAST1.cpp b/CGMES_2.4.15_27JAN2020/GovGAST1.cpp index 10ed047f3..4acaed7db 100644 --- a/CGMES_2.4.15_27JAN2020/GovGAST1.cpp +++ b/CGMES_2.4.15_27JAN2020/GovGAST1.cpp @@ -8,45 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Frequency.hpp" -#include "ActivePower.hpp" -#include "Frequency.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -GovGAST1::GovGAST1() {}; -GovGAST1::~GovGAST1() {}; +GovGAST1::GovGAST1() {} +GovGAST1::~GovGAST1() {} static const std::list PossibleProfilesForClass = { @@ -106,454 +72,486 @@ GovGAST1::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovGAST1_a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_a(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_b(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_eps(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eps; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_fidle(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_fidle(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fidle; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_gv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_kt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_kt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_lmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_lmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_loadinc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_loadinc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->loadinc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_ltrate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_ltrate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ltrate; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_pgv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_rmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_rmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_tltr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_tltr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tltr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_vmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_vmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovGAST1_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a; if (!buffer.str().empty()) @@ -567,7 +565,8 @@ bool get_GovGAST1_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b; if (!buffer.str().empty()) @@ -581,7 +580,8 @@ bool get_GovGAST1_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -595,7 +595,8 @@ bool get_GovGAST1_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST1_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -609,7 +610,8 @@ bool get_GovGAST1_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST1_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eps; if (!buffer.str().empty()) @@ -623,7 +625,8 @@ bool get_GovGAST1_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST1_fidle(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fidle; if (!buffer.str().empty()) @@ -637,7 +640,8 @@ bool get_GovGAST1_fidle(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovGAST1_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -651,7 +655,8 @@ bool get_GovGAST1_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST1_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -665,7 +670,8 @@ bool get_GovGAST1_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST1_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -679,7 +685,8 @@ bool get_GovGAST1_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST1_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -693,7 +700,8 @@ bool get_GovGAST1_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST1_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -707,7 +715,8 @@ bool get_GovGAST1_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST1_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv6; if (!buffer.str().empty()) @@ -721,7 +730,8 @@ bool get_GovGAST1_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST1_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -735,7 +745,8 @@ bool get_GovGAST1_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_kt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kt; if (!buffer.str().empty()) @@ -749,7 +760,8 @@ bool get_GovGAST1_kt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_lmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lmax; if (!buffer.str().empty()) @@ -763,7 +775,8 @@ bool get_GovGAST1_lmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_loadinc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->loadinc; if (!buffer.str().empty()) @@ -777,7 +790,8 @@ bool get_GovGAST1_loadinc(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovGAST1_ltrate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ltrate; if (!buffer.str().empty()) @@ -791,7 +805,8 @@ bool get_GovGAST1_ltrate(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovGAST1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -805,7 +820,8 @@ bool get_GovGAST1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovGAST1_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -819,7 +835,8 @@ bool get_GovGAST1_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -833,7 +850,8 @@ bool get_GovGAST1_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -847,7 +865,8 @@ bool get_GovGAST1_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -861,7 +880,8 @@ bool get_GovGAST1_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -875,7 +895,8 @@ bool get_GovGAST1_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv6; if (!buffer.str().empty()) @@ -889,7 +910,8 @@ bool get_GovGAST1_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -903,7 +925,8 @@ bool get_GovGAST1_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_rmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rmax; if (!buffer.str().empty()) @@ -917,7 +940,8 @@ bool get_GovGAST1_rmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -931,7 +955,8 @@ bool get_GovGAST1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -945,7 +970,8 @@ bool get_GovGAST1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -959,7 +985,8 @@ bool get_GovGAST1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -973,7 +1000,8 @@ bool get_GovGAST1_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -987,7 +1015,8 @@ bool get_GovGAST1_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_tltr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tltr; if (!buffer.str().empty()) @@ -1001,7 +1030,8 @@ bool get_GovGAST1_tltr(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmax; if (!buffer.str().empty()) @@ -1015,7 +1045,8 @@ bool get_GovGAST1_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmin; if (!buffer.str().empty()) @@ -1027,8 +1058,6 @@ bool get_GovGAST1_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char GovGAST1::debugName[] = "GovGAST1"; const char* GovGAST1::debugString() const { @@ -1037,45 +1066,45 @@ const char* GovGAST1::debugString() const void GovGAST1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovGAST1"), &GovGAST1_factory)); + factory_map.emplace("cim:GovGAST1", &GovGAST1_factory); } void GovGAST1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.a"), &assign_GovGAST1_a)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.b"), &assign_GovGAST1_b)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.db1"), &assign_GovGAST1_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.db2"), &assign_GovGAST1_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.eps"), &assign_GovGAST1_eps)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.fidle"), &assign_GovGAST1_fidle)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.gv1"), &assign_GovGAST1_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.gv2"), &assign_GovGAST1_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.gv3"), &assign_GovGAST1_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.gv4"), &assign_GovGAST1_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.gv5"), &assign_GovGAST1_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.gv6"), &assign_GovGAST1_gv6)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.ka"), &assign_GovGAST1_ka)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.kt"), &assign_GovGAST1_kt)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.lmax"), &assign_GovGAST1_lmax)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.loadinc"), &assign_GovGAST1_loadinc)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.ltrate"), &assign_GovGAST1_ltrate)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.mwbase"), &assign_GovGAST1_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.pgv1"), &assign_GovGAST1_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.pgv2"), &assign_GovGAST1_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.pgv3"), &assign_GovGAST1_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.pgv4"), &assign_GovGAST1_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.pgv5"), &assign_GovGAST1_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.pgv6"), &assign_GovGAST1_pgv6)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.r"), &assign_GovGAST1_r)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.rmax"), &assign_GovGAST1_rmax)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.t1"), &assign_GovGAST1_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.t2"), &assign_GovGAST1_t2)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.t3"), &assign_GovGAST1_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.t4"), &assign_GovGAST1_t4)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.t5"), &assign_GovGAST1_t5)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.tltr"), &assign_GovGAST1_tltr)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.vmax"), &assign_GovGAST1_vmax)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.vmin"), &assign_GovGAST1_vmin)); + assign_map.emplace("cim:GovGAST1.a", &assign_GovGAST1_a); + assign_map.emplace("cim:GovGAST1.b", &assign_GovGAST1_b); + assign_map.emplace("cim:GovGAST1.db1", &assign_GovGAST1_db1); + assign_map.emplace("cim:GovGAST1.db2", &assign_GovGAST1_db2); + assign_map.emplace("cim:GovGAST1.eps", &assign_GovGAST1_eps); + assign_map.emplace("cim:GovGAST1.fidle", &assign_GovGAST1_fidle); + assign_map.emplace("cim:GovGAST1.gv1", &assign_GovGAST1_gv1); + assign_map.emplace("cim:GovGAST1.gv2", &assign_GovGAST1_gv2); + assign_map.emplace("cim:GovGAST1.gv3", &assign_GovGAST1_gv3); + assign_map.emplace("cim:GovGAST1.gv4", &assign_GovGAST1_gv4); + assign_map.emplace("cim:GovGAST1.gv5", &assign_GovGAST1_gv5); + assign_map.emplace("cim:GovGAST1.gv6", &assign_GovGAST1_gv6); + assign_map.emplace("cim:GovGAST1.ka", &assign_GovGAST1_ka); + assign_map.emplace("cim:GovGAST1.kt", &assign_GovGAST1_kt); + assign_map.emplace("cim:GovGAST1.lmax", &assign_GovGAST1_lmax); + assign_map.emplace("cim:GovGAST1.loadinc", &assign_GovGAST1_loadinc); + assign_map.emplace("cim:GovGAST1.ltrate", &assign_GovGAST1_ltrate); + assign_map.emplace("cim:GovGAST1.mwbase", &assign_GovGAST1_mwbase); + assign_map.emplace("cim:GovGAST1.pgv1", &assign_GovGAST1_pgv1); + assign_map.emplace("cim:GovGAST1.pgv2", &assign_GovGAST1_pgv2); + assign_map.emplace("cim:GovGAST1.pgv3", &assign_GovGAST1_pgv3); + assign_map.emplace("cim:GovGAST1.pgv4", &assign_GovGAST1_pgv4); + assign_map.emplace("cim:GovGAST1.pgv5", &assign_GovGAST1_pgv5); + assign_map.emplace("cim:GovGAST1.pgv6", &assign_GovGAST1_pgv6); + assign_map.emplace("cim:GovGAST1.r", &assign_GovGAST1_r); + assign_map.emplace("cim:GovGAST1.rmax", &assign_GovGAST1_rmax); + assign_map.emplace("cim:GovGAST1.t1", &assign_GovGAST1_t1); + assign_map.emplace("cim:GovGAST1.t2", &assign_GovGAST1_t2); + assign_map.emplace("cim:GovGAST1.t3", &assign_GovGAST1_t3); + assign_map.emplace("cim:GovGAST1.t4", &assign_GovGAST1_t4); + assign_map.emplace("cim:GovGAST1.t5", &assign_GovGAST1_t5); + assign_map.emplace("cim:GovGAST1.tltr", &assign_GovGAST1_tltr); + assign_map.emplace("cim:GovGAST1.vmax", &assign_GovGAST1_vmax); + assign_map.emplace("cim:GovGAST1.vmin", &assign_GovGAST1_vmin); } void GovGAST1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/GovGAST1.hpp b/CGMES_2.4.15_27JAN2020/GovGAST1.hpp index 6a950664b..2eaf845e2 100644 --- a/CGMES_2.4.15_27JAN2020/GovGAST1.hpp +++ b/CGMES_2.4.15_27JAN2020/GovGAST1.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified single shaft gas turbine. - */ + /** \brief Modified single shaft gas turbine. */ class GovGAST1 : public TurbineGovernorDynamics { public: @@ -31,40 +29,107 @@ namespace CIMPP GovGAST1(); ~GovGAST1() override; - CIMPP::Simple_Float a; /* Turbine power time constant numerator scale factor (a). Typical Value = 0.8. Default: nullptr */ - CIMPP::Simple_Float b; /* Turbine power time constant denominator scale factor (b). Typical Value = 1. Default: nullptr */ - CIMPP::Frequency db1; /* Intentional dead-band width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower db2; /* Unintentional dead-band (db2). Unit = MW. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency eps; /* Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::PU fidle; /* Fuel flow at zero power output (Fidle). Typical Value = 0.18. Default: nullptr */ - CIMPP::PU gv1; /* Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain point 2,PU gv (Gv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv6; /* Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU ka; /* Governor gain (Ka). Typical Value = 0. Default: nullptr */ - CIMPP::PU kt; /* Temperature limiter gain (Kt). Typical Value = 3. Default: nullptr */ - CIMPP::PU lmax; /* Ambient temperature load limit (Lmax). Lmax is the turbine power output corresponding to the limiting exhaust gas temperature. Typical Value = 1. Default: nullptr */ - CIMPP::PU loadinc; /* Valve position change allowed at fast rate (Loadinc). Typical Value = 0.05. Default: nullptr */ - CIMPP::Simple_Float ltrate; /* Maximum long term fuel valve opening rate (Ltrate). Typical Value = 0.02. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv6; /* Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU r; /* Permanent droop (R). Typical Value = 0.04. Default: nullptr */ - CIMPP::Simple_Float rmax; /* Maximum fuel valve opening rate (Rmax). Unit = PU/sec. Typical Value = 1. Default: nullptr */ - CIMPP::Seconds t1; /* Governor mechanism time constant (T1). T1 represents the natural valve positioning time constant of the governor for small disturbances, as seen when rate limiting is not in effect. Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds t2; /* Turbine power time constant (T2). T2 represents delay due to internal energy storage of the gas turbine engine. T2 can be used to give a rough approximation to the delay associated with acceleration of the compressor spool of a multi-shaft engine, or with the compressibility of gas in the plenum of the free power turbine of an aero-derivative unit, for example. Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds t3; /* Turbine exhaust temperature time constant (T3). T3 represents delay in the exhaust temperature and load limiting system. Typical Value = 3. Default: nullptr */ - CIMPP::Seconds t4; /* Governor lead time constant (T4). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t5; /* Governor lag time constant (T5). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tltr; /* Valve position averaging time constant (Tltr). Typical Value = 10. Default: nullptr */ - CIMPP::PU vmax; /* Maximum turbine power, PU of MWbase (Vmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU vmin; /* Minimum turbine power, PU of MWbase (Vmin). Typical Value = 0. Default: nullptr */ + /** \brief Turbine power time constant numerator scale factor (a). Typical Value = 0.8. Default: nullptr */ + CIMPP::Simple_Float a; + + /** \brief Turbine power time constant denominator scale factor (b). Typical Value = 1. Default: nullptr */ + CIMPP::Simple_Float b; + + /** \brief Intentional dead-band width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Unintentional dead-band (db2). Unit = MW. Typical Value = 0. Default: nullptr */ + CIMPP::ActivePower db2; + + /** \brief Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency eps; + + /** \brief Fuel flow at zero power output (Fidle). Typical Value = 0.18. Default: nullptr */ + CIMPP::PU fidle; + + /** \brief Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain point 2,PU gv (Gv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv6; + + /** \brief Governor gain (Ka). Typical Value = 0. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Temperature limiter gain (Kt). Typical Value = 3. Default: nullptr */ + CIMPP::PU kt; + + /** \brief Ambient temperature load limit (Lmax). Lmax is the turbine power output corresponding to the limiting exhaust gas temperature. Typical Value = 1. Default: nullptr */ + CIMPP::PU lmax; + + /** \brief Valve position change allowed at fast rate (Loadinc). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU loadinc; + + /** \brief Maximum long term fuel valve opening rate (Ltrate). Typical Value = 0.02. Default: nullptr */ + CIMPP::Simple_Float ltrate; + + /** \brief Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv6; + + /** \brief Permanent droop (R). Typical Value = 0.04. Default: nullptr */ + CIMPP::PU r; + + /** \brief Maximum fuel valve opening rate (Rmax). Unit = PU/sec. Typical Value = 1. Default: nullptr */ + CIMPP::Simple_Float rmax; + + /** \brief Governor mechanism time constant (T1). T1 represents the natural valve positioning time constant of the governor for small disturbances, as seen when rate limiting is not in effect. Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Turbine power time constant (T2). T2 represents delay due to internal energy storage of the gas turbine engine. T2 can be used to give a rough approximation to the delay associated with acceleration of the compressor spool of a multi-shaft engine, or with the compressibility of gas in the plenum of the free power turbine of an aero-derivative unit, for example. Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Turbine exhaust temperature time constant (T3). T3 represents delay in the exhaust temperature and load limiting system. Typical Value = 3. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Governor lead time constant (T4). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Governor lag time constant (T5). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Valve position averaging time constant (Tltr). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds tltr; + + /** \brief Maximum turbine power, PU of MWbase (Vmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU vmax; + + /** \brief Minimum turbine power, PU of MWbase (Vmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU vmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GovGAST2.cpp b/CGMES_2.4.15_27JAN2020/GovGAST2.cpp index fae415955..c78ffe45c 100644 --- a/CGMES_2.4.15_27JAN2020/GovGAST2.cpp +++ b/CGMES_2.4.15_27JAN2020/GovGAST2.cpp @@ -8,43 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Temperature.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Temperature.hpp" -#include "ActivePower.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" using namespace CIMPP; -GovGAST2::GovGAST2() {}; -GovGAST2::~GovGAST2() {}; +GovGAST2::GovGAST2() {} +GovGAST2::~GovGAST2() {} static const std::list PossibleProfilesForClass = { @@ -102,428 +70,458 @@ GovGAST2::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovGAST2_a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_a(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_af1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_af1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->af1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_af2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_af2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->af2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_b(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_bf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_bf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_bf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_bf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_c(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_c(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->c; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_cf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_cf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->cf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_ecr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_ecr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ecr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_etd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_etd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->etd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_k4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_k5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_k5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_k6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_k6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_t(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_t(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_tcd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_tcd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tcd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_tmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_tmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_tmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_tmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_trate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_trate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->trate; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_tt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_w(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_w(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->w; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_x(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_y(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_y(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->y; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_z(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_z(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->z; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovGAST2_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a; if (!buffer.str().empty()) @@ -537,7 +535,8 @@ bool get_GovGAST2_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_af1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->af1; if (!buffer.str().empty()) @@ -551,7 +550,8 @@ bool get_GovGAST2_af1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST2_af2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->af2; if (!buffer.str().empty()) @@ -565,7 +565,8 @@ bool get_GovGAST2_af2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST2_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b; if (!buffer.str().empty()) @@ -579,7 +580,8 @@ bool get_GovGAST2_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_bf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bf1; if (!buffer.str().empty()) @@ -593,7 +595,8 @@ bool get_GovGAST2_bf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST2_bf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bf2; if (!buffer.str().empty()) @@ -607,7 +610,8 @@ bool get_GovGAST2_bf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST2_c(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->c; if (!buffer.str().empty()) @@ -621,7 +625,8 @@ bool get_GovGAST2_c(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_cf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->cf2; if (!buffer.str().empty()) @@ -635,7 +640,8 @@ bool get_GovGAST2_cf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST2_ecr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ecr; if (!buffer.str().empty()) @@ -649,7 +655,8 @@ bool get_GovGAST2_ecr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST2_etd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->etd; if (!buffer.str().empty()) @@ -663,7 +670,8 @@ bool get_GovGAST2_etd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST2_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -677,7 +685,8 @@ bool get_GovGAST2_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k4; if (!buffer.str().empty()) @@ -691,7 +700,8 @@ bool get_GovGAST2_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k5; if (!buffer.str().empty()) @@ -705,7 +715,8 @@ bool get_GovGAST2_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_k6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k6; if (!buffer.str().empty()) @@ -719,7 +730,8 @@ bool get_GovGAST2_k6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -733,7 +745,8 @@ bool get_GovGAST2_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -747,7 +760,8 @@ bool get_GovGAST2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovGAST2_t(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t; if (!buffer.str().empty()) @@ -761,7 +775,8 @@ bool get_GovGAST2_t(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -775,7 +790,8 @@ bool get_GovGAST2_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -789,7 +805,8 @@ bool get_GovGAST2_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -803,7 +820,8 @@ bool get_GovGAST2_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -817,7 +835,8 @@ bool get_GovGAST2_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_tcd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tcd; if (!buffer.str().empty()) @@ -831,7 +850,8 @@ bool get_GovGAST2_tcd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST2_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -845,7 +865,8 @@ bool get_GovGAST2_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_tmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tmax; if (!buffer.str().empty()) @@ -859,7 +880,8 @@ bool get_GovGAST2_tmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST2_tmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tmin; if (!buffer.str().empty()) @@ -873,7 +895,8 @@ bool get_GovGAST2_tmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST2_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -887,7 +910,8 @@ bool get_GovGAST2_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_trate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->trate; if (!buffer.str().empty()) @@ -901,7 +925,8 @@ bool get_GovGAST2_trate(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovGAST2_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tt; if (!buffer.str().empty()) @@ -915,7 +940,8 @@ bool get_GovGAST2_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_w(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->w; if (!buffer.str().empty()) @@ -929,7 +955,8 @@ bool get_GovGAST2_w(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x; if (!buffer.str().empty()) @@ -943,7 +970,8 @@ bool get_GovGAST2_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_y(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->y; if (!buffer.str().empty()) @@ -957,7 +985,8 @@ bool get_GovGAST2_y(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_z(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->z; if (!buffer.str().empty()) @@ -969,8 +998,6 @@ bool get_GovGAST2_z(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char GovGAST2::debugName[] = "GovGAST2"; const char* GovGAST2::debugString() const { @@ -979,43 +1006,43 @@ const char* GovGAST2::debugString() const void GovGAST2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovGAST2"), &GovGAST2_factory)); + factory_map.emplace("cim:GovGAST2", &GovGAST2_factory); } void GovGAST2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.a"), &assign_GovGAST2_a)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.af1"), &assign_GovGAST2_af1)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.af2"), &assign_GovGAST2_af2)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.b"), &assign_GovGAST2_b)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.bf1"), &assign_GovGAST2_bf1)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.bf2"), &assign_GovGAST2_bf2)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.c"), &assign_GovGAST2_c)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.cf2"), &assign_GovGAST2_cf2)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.ecr"), &assign_GovGAST2_ecr)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.etd"), &assign_GovGAST2_etd)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.k3"), &assign_GovGAST2_k3)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.k4"), &assign_GovGAST2_k4)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.k5"), &assign_GovGAST2_k5)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.k6"), &assign_GovGAST2_k6)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.kf"), &assign_GovGAST2_kf)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.mwbase"), &assign_GovGAST2_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.t"), &assign_GovGAST2_t)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.t3"), &assign_GovGAST2_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.t4"), &assign_GovGAST2_t4)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.t5"), &assign_GovGAST2_t5)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.tc"), &assign_GovGAST2_tc)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.tcd"), &assign_GovGAST2_tcd)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.tf"), &assign_GovGAST2_tf)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.tmax"), &assign_GovGAST2_tmax)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.tmin"), &assign_GovGAST2_tmin)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.tr"), &assign_GovGAST2_tr)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.trate"), &assign_GovGAST2_trate)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.tt"), &assign_GovGAST2_tt)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.w"), &assign_GovGAST2_w)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.x"), &assign_GovGAST2_x)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.y"), &assign_GovGAST2_y)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.z"), &assign_GovGAST2_z)); + assign_map.emplace("cim:GovGAST2.a", &assign_GovGAST2_a); + assign_map.emplace("cim:GovGAST2.af1", &assign_GovGAST2_af1); + assign_map.emplace("cim:GovGAST2.af2", &assign_GovGAST2_af2); + assign_map.emplace("cim:GovGAST2.b", &assign_GovGAST2_b); + assign_map.emplace("cim:GovGAST2.bf1", &assign_GovGAST2_bf1); + assign_map.emplace("cim:GovGAST2.bf2", &assign_GovGAST2_bf2); + assign_map.emplace("cim:GovGAST2.c", &assign_GovGAST2_c); + assign_map.emplace("cim:GovGAST2.cf2", &assign_GovGAST2_cf2); + assign_map.emplace("cim:GovGAST2.ecr", &assign_GovGAST2_ecr); + assign_map.emplace("cim:GovGAST2.etd", &assign_GovGAST2_etd); + assign_map.emplace("cim:GovGAST2.k3", &assign_GovGAST2_k3); + assign_map.emplace("cim:GovGAST2.k4", &assign_GovGAST2_k4); + assign_map.emplace("cim:GovGAST2.k5", &assign_GovGAST2_k5); + assign_map.emplace("cim:GovGAST2.k6", &assign_GovGAST2_k6); + assign_map.emplace("cim:GovGAST2.kf", &assign_GovGAST2_kf); + assign_map.emplace("cim:GovGAST2.mwbase", &assign_GovGAST2_mwbase); + assign_map.emplace("cim:GovGAST2.t", &assign_GovGAST2_t); + assign_map.emplace("cim:GovGAST2.t3", &assign_GovGAST2_t3); + assign_map.emplace("cim:GovGAST2.t4", &assign_GovGAST2_t4); + assign_map.emplace("cim:GovGAST2.t5", &assign_GovGAST2_t5); + assign_map.emplace("cim:GovGAST2.tc", &assign_GovGAST2_tc); + assign_map.emplace("cim:GovGAST2.tcd", &assign_GovGAST2_tcd); + assign_map.emplace("cim:GovGAST2.tf", &assign_GovGAST2_tf); + assign_map.emplace("cim:GovGAST2.tmax", &assign_GovGAST2_tmax); + assign_map.emplace("cim:GovGAST2.tmin", &assign_GovGAST2_tmin); + assign_map.emplace("cim:GovGAST2.tr", &assign_GovGAST2_tr); + assign_map.emplace("cim:GovGAST2.trate", &assign_GovGAST2_trate); + assign_map.emplace("cim:GovGAST2.tt", &assign_GovGAST2_tt); + assign_map.emplace("cim:GovGAST2.w", &assign_GovGAST2_w); + assign_map.emplace("cim:GovGAST2.x", &assign_GovGAST2_x); + assign_map.emplace("cim:GovGAST2.y", &assign_GovGAST2_y); + assign_map.emplace("cim:GovGAST2.z", &assign_GovGAST2_z); } void GovGAST2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/GovGAST2.hpp b/CGMES_2.4.15_27JAN2020/GovGAST2.hpp index d761848e3..37de9cf50 100644 --- a/CGMES_2.4.15_27JAN2020/GovGAST2.hpp +++ b/CGMES_2.4.15_27JAN2020/GovGAST2.hpp @@ -22,9 +22,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Gas turbine model. - */ + /** \brief Gas turbine model. */ class GovGAST2 : public TurbineGovernorDynamics { public: @@ -32,38 +30,101 @@ namespace CIMPP GovGAST2(); ~GovGAST2() override; - CIMPP::Simple_Float a; /* Valve positioner (A). Default: nullptr */ - CIMPP::PU af1; /* Exhaust temperature Parameter (Af1). Unit = per unit temperature. Based on temperature in degrees C. Default: nullptr */ - CIMPP::PU af2; /* Coefficient equal to 0.5(1-speed) (Af2). Default: nullptr */ - CIMPP::Simple_Float b; /* Valve positioner (B). Default: nullptr */ - CIMPP::PU bf1; /* (Bf1). Bf1 = E(1-w) where E (speed sensitivity coefficient) is 0.55 to 0.65 x Tr. Unit = per unit temperature. Based on temperature in degrees C. Default: nullptr */ - CIMPP::PU bf2; /* Turbine Torque Coefficient K (depends on heating value of fuel stream in combustion chamber) (Bf2). Default: nullptr */ - CIMPP::Simple_Float c; /* Valve positioner (C). Default: nullptr */ - CIMPP::PU cf2; /* Coefficient defining fuel flow where power output is 0% (Cf2). Synchronous but no output. Typically 0.23 x K (23% fuel flow). Default: nullptr */ - CIMPP::Seconds ecr; /* Combustion reaction time delay (Ecr). Default: nullptr */ - CIMPP::Seconds etd; /* Turbine and exhaust delay (Etd). Default: nullptr */ - CIMPP::PU k3; /* Ratio of Fuel Adjustment (K3). Default: nullptr */ - CIMPP::PU k4; /* Gain of radiation shield (K4). Default: nullptr */ - CIMPP::PU k5; /* Gain of radiation shield (K5). Default: nullptr */ - CIMPP::PU k6; /* Minimum fuel flow (K6). Default: nullptr */ - CIMPP::PU kf; /* Fuel system feedback (Kf). Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ - CIMPP::Seconds t; /* Fuel Control Time Constant (T). Default: nullptr */ - CIMPP::Seconds t3; /* Radiation shield time constant (T3). Default: nullptr */ - CIMPP::Seconds t4; /* Thermocouple time constant (T4). Default: nullptr */ - CIMPP::Seconds t5; /* Temperature control time constant (T5). Default: nullptr */ - CIMPP::Temperature tc; /* Temperature control (Tc). Unit = [SYMBOL REMOVED]F or [SYMBOL REMOVED]C depending on constants Af1 and Bf1. Default: nullptr */ - CIMPP::Seconds tcd; /* Compressor discharge time constant (Tcd). Default: nullptr */ - CIMPP::Seconds tf; /* Fuel system time constant (Tf). Default: nullptr */ - CIMPP::PU tmax; /* Maximum Turbine limit (Tmax). Default: nullptr */ - CIMPP::PU tmin; /* Minimum Turbine limit (Tmin). Default: nullptr */ - CIMPP::Temperature tr; /* Rated temperature (Tr). Unit = [SYMBOL REMOVED]C depending on parameters Af1 and Bf1. Default: nullptr */ - CIMPP::ActivePower trate; /* Turbine rating (Trate). Unit = MW. Default: nullptr */ - CIMPP::Seconds tt; /* Temperature controller integration rate (Tt). Default: nullptr */ - CIMPP::PU w; /* Governor gain (1/droop) on turbine rating (W). Default: nullptr */ - CIMPP::Seconds x; /* Governor lead time constant (X). Default: nullptr */ - CIMPP::Seconds y; /* Governor lag time constant (Y) (>0). Default: nullptr */ - CIMPP::Boolean z; /* Governor mode (Z). true = Droop false = ISO. Default: false */ + /** \brief Valve positioner (A). Default: nullptr */ + CIMPP::Simple_Float a; + + /** \brief Exhaust temperature Parameter (Af1). Unit = per unit temperature. Based on temperature in degrees C. Default: nullptr */ + CIMPP::PU af1; + + /** \brief Coefficient equal to 0.5(1-speed) (Af2). Default: nullptr */ + CIMPP::PU af2; + + /** \brief Valve positioner (B). Default: nullptr */ + CIMPP::Simple_Float b; + + /** \brief (Bf1). Bf1 = E(1-w) where E (speed sensitivity coefficient) is 0.55 to 0.65 x Tr. Unit = per unit temperature. Based on temperature in degrees C. Default: nullptr */ + CIMPP::PU bf1; + + /** \brief Turbine Torque Coefficient K (depends on heating value of fuel stream in combustion chamber) (Bf2). Default: nullptr */ + CIMPP::PU bf2; + + /** \brief Valve positioner (C). Default: nullptr */ + CIMPP::Simple_Float c; + + /** \brief Coefficient defining fuel flow where power output is 0% (Cf2). Synchronous but no output. Typically 0.23 x K (23% fuel flow). Default: nullptr */ + CIMPP::PU cf2; + + /** \brief Combustion reaction time delay (Ecr). Default: nullptr */ + CIMPP::Seconds ecr; + + /** \brief Turbine and exhaust delay (Etd). Default: nullptr */ + CIMPP::Seconds etd; + + /** \brief Ratio of Fuel Adjustment (K3). Default: nullptr */ + CIMPP::PU k3; + + /** \brief Gain of radiation shield (K4). Default: nullptr */ + CIMPP::PU k4; + + /** \brief Gain of radiation shield (K5). Default: nullptr */ + CIMPP::PU k5; + + /** \brief Minimum fuel flow (K6). Default: nullptr */ + CIMPP::PU k6; + + /** \brief Fuel system feedback (Kf). Default: nullptr */ + CIMPP::PU kf; + + /** \brief Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Fuel Control Time Constant (T). Default: nullptr */ + CIMPP::Seconds t; + + /** \brief Radiation shield time constant (T3). Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Thermocouple time constant (T4). Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Temperature control time constant (T5). Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Temperature control (Tc). Unit = [SYMBOL REMOVED]F or [SYMBOL REMOVED]C depending on constants Af1 and Bf1. Default: nullptr */ + CIMPP::Temperature tc; + + /** \brief Compressor discharge time constant (Tcd). Default: nullptr */ + CIMPP::Seconds tcd; + + /** \brief Fuel system time constant (Tf). Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum Turbine limit (Tmax). Default: nullptr */ + CIMPP::PU tmax; + + /** \brief Minimum Turbine limit (Tmin). Default: nullptr */ + CIMPP::PU tmin; + + /** \brief Rated temperature (Tr). Unit = [SYMBOL REMOVED]C depending on parameters Af1 and Bf1. Default: nullptr */ + CIMPP::Temperature tr; + + /** \brief Turbine rating (Trate). Unit = MW. Default: nullptr */ + CIMPP::ActivePower trate; + + /** \brief Temperature controller integration rate (Tt). Default: nullptr */ + CIMPP::Seconds tt; + + /** \brief Governor gain (1/droop) on turbine rating (W). Default: nullptr */ + CIMPP::PU w; + + /** \brief Governor lead time constant (X). Default: nullptr */ + CIMPP::Seconds x; + + /** \brief Governor lag time constant (Y) (>0). Default: nullptr */ + CIMPP::Seconds y; + + /** \brief Governor mode (Z). true = Droop false = ISO. Default: false */ + CIMPP::Boolean z; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GovGAST3.cpp b/CGMES_2.4.15_27JAN2020/GovGAST3.cpp index 31493116e..d80998b75 100644 --- a/CGMES_2.4.15_27JAN2020/GovGAST3.cpp +++ b/CGMES_2.4.15_27JAN2020/GovGAST3.cpp @@ -8,32 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Temperature.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Temperature.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Temperature.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -GovGAST3::GovGAST3() {}; -GovGAST3::~GovGAST3() {}; +GovGAST3::GovGAST3() {} +GovGAST3::~GovGAST3() {} static const std::list PossibleProfilesForClass = { @@ -80,285 +59,304 @@ GovGAST3::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovGAST3_bca(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_bca(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bca; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_bp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_bp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_dtc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_dtc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dtc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_kac(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_kac(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kac; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_kca(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_kca(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kca; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_ksi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_ksi(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ksi; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_ky(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_ky(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ky; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_mnef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_mnef(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mnef; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_mxef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_mxef(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mxef; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_rcmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_rcmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rcmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_rcmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_rcmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rcmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_tac(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_tac(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tac; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_tfen(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_tfen(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tfen; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_tsi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_tsi(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tsi; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_tt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_ttc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_ttc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ttc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_ty(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_ty(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ty; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovGAST3_bca(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bca; if (!buffer.str().empty()) @@ -372,7 +370,8 @@ bool get_GovGAST3_bca(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST3_bp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bp; if (!buffer.str().empty()) @@ -386,7 +385,8 @@ bool get_GovGAST3_bp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST3_dtc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dtc; if (!buffer.str().empty()) @@ -400,7 +400,8 @@ bool get_GovGAST3_dtc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST3_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -414,7 +415,8 @@ bool get_GovGAST3_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST3_kac(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kac; if (!buffer.str().empty()) @@ -428,7 +430,8 @@ bool get_GovGAST3_kac(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST3_kca(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kca; if (!buffer.str().empty()) @@ -442,7 +445,8 @@ bool get_GovGAST3_kca(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST3_ksi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ksi; if (!buffer.str().empty()) @@ -456,7 +460,8 @@ bool get_GovGAST3_ksi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST3_ky(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ky; if (!buffer.str().empty()) @@ -470,7 +475,8 @@ bool get_GovGAST3_ky(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST3_mnef(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mnef; if (!buffer.str().empty()) @@ -484,7 +490,8 @@ bool get_GovGAST3_mnef(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST3_mxef(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mxef; if (!buffer.str().empty()) @@ -498,7 +505,8 @@ bool get_GovGAST3_mxef(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST3_rcmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rcmn; if (!buffer.str().empty()) @@ -512,7 +520,8 @@ bool get_GovGAST3_rcmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST3_rcmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rcmx; if (!buffer.str().empty()) @@ -526,7 +535,8 @@ bool get_GovGAST3_rcmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST3_tac(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tac; if (!buffer.str().empty()) @@ -540,7 +550,8 @@ bool get_GovGAST3_tac(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST3_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -554,7 +565,8 @@ bool get_GovGAST3_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST3_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -568,7 +580,8 @@ bool get_GovGAST3_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST3_tfen(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tfen; if (!buffer.str().empty()) @@ -582,7 +595,8 @@ bool get_GovGAST3_tfen(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST3_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -596,7 +610,8 @@ bool get_GovGAST3_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST3_tsi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tsi; if (!buffer.str().empty()) @@ -610,7 +625,8 @@ bool get_GovGAST3_tsi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST3_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tt; if (!buffer.str().empty()) @@ -624,7 +640,8 @@ bool get_GovGAST3_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST3_ttc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ttc; if (!buffer.str().empty()) @@ -638,7 +655,8 @@ bool get_GovGAST3_ttc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST3_ty(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ty; if (!buffer.str().empty()) @@ -650,8 +668,6 @@ bool get_GovGAST3_ty(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char GovGAST3::debugName[] = "GovGAST3"; const char* GovGAST3::debugString() const { @@ -660,32 +676,32 @@ const char* GovGAST3::debugString() const void GovGAST3::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovGAST3"), &GovGAST3_factory)); + factory_map.emplace("cim:GovGAST3", &GovGAST3_factory); } void GovGAST3::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.bca"), &assign_GovGAST3_bca)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.bp"), &assign_GovGAST3_bp)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.dtc"), &assign_GovGAST3_dtc)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.ka"), &assign_GovGAST3_ka)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.kac"), &assign_GovGAST3_kac)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.kca"), &assign_GovGAST3_kca)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.ksi"), &assign_GovGAST3_ksi)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.ky"), &assign_GovGAST3_ky)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.mnef"), &assign_GovGAST3_mnef)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.mxef"), &assign_GovGAST3_mxef)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.rcmn"), &assign_GovGAST3_rcmn)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.rcmx"), &assign_GovGAST3_rcmx)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.tac"), &assign_GovGAST3_tac)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.tc"), &assign_GovGAST3_tc)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.td"), &assign_GovGAST3_td)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.tfen"), &assign_GovGAST3_tfen)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.tg"), &assign_GovGAST3_tg)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.tsi"), &assign_GovGAST3_tsi)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.tt"), &assign_GovGAST3_tt)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.ttc"), &assign_GovGAST3_ttc)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.ty"), &assign_GovGAST3_ty)); + assign_map.emplace("cim:GovGAST3.bca", &assign_GovGAST3_bca); + assign_map.emplace("cim:GovGAST3.bp", &assign_GovGAST3_bp); + assign_map.emplace("cim:GovGAST3.dtc", &assign_GovGAST3_dtc); + assign_map.emplace("cim:GovGAST3.ka", &assign_GovGAST3_ka); + assign_map.emplace("cim:GovGAST3.kac", &assign_GovGAST3_kac); + assign_map.emplace("cim:GovGAST3.kca", &assign_GovGAST3_kca); + assign_map.emplace("cim:GovGAST3.ksi", &assign_GovGAST3_ksi); + assign_map.emplace("cim:GovGAST3.ky", &assign_GovGAST3_ky); + assign_map.emplace("cim:GovGAST3.mnef", &assign_GovGAST3_mnef); + assign_map.emplace("cim:GovGAST3.mxef", &assign_GovGAST3_mxef); + assign_map.emplace("cim:GovGAST3.rcmn", &assign_GovGAST3_rcmn); + assign_map.emplace("cim:GovGAST3.rcmx", &assign_GovGAST3_rcmx); + assign_map.emplace("cim:GovGAST3.tac", &assign_GovGAST3_tac); + assign_map.emplace("cim:GovGAST3.tc", &assign_GovGAST3_tc); + assign_map.emplace("cim:GovGAST3.td", &assign_GovGAST3_td); + assign_map.emplace("cim:GovGAST3.tfen", &assign_GovGAST3_tfen); + assign_map.emplace("cim:GovGAST3.tg", &assign_GovGAST3_tg); + assign_map.emplace("cim:GovGAST3.tsi", &assign_GovGAST3_tsi); + assign_map.emplace("cim:GovGAST3.tt", &assign_GovGAST3_tt); + assign_map.emplace("cim:GovGAST3.ttc", &assign_GovGAST3_ttc); + assign_map.emplace("cim:GovGAST3.ty", &assign_GovGAST3_ty); } void GovGAST3::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/GovGAST3.hpp b/CGMES_2.4.15_27JAN2020/GovGAST3.hpp index d943e9b85..8d460f127 100644 --- a/CGMES_2.4.15_27JAN2020/GovGAST3.hpp +++ b/CGMES_2.4.15_27JAN2020/GovGAST3.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Generic turbogas with acceleration and temperature controller. - */ + /** \brief Generic turbogas with acceleration and temperature controller. */ class GovGAST3 : public TurbineGovernorDynamics { public: @@ -30,27 +28,68 @@ namespace CIMPP GovGAST3(); ~GovGAST3() override; - CIMPP::Simple_Float bca; /* Acceleration limit set-point (Bca). Unit = 1/s. Typical Value = 0.01. Default: nullptr */ - CIMPP::PU bp; /* Droop (bp). Typical Value = 0.05. Default: nullptr */ - CIMPP::Temperature dtc; /* Exhaust temperature variation due to fuel flow increasing from 0 to 1 PU (deltaTc). Typical Value = 390. Default: nullptr */ - CIMPP::PU ka; /* Minimum fuel flow (Ka). Typical Value = 0.23. Default: nullptr */ - CIMPP::Simple_Float kac; /* Fuel system feedback (K). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float kca; /* Acceleration control integral gain (Kca). Unit = 1/s. Typical Value = 100. Default: nullptr */ - CIMPP::Simple_Float ksi; /* Gain of radiation shield (Ksi). Typical Value = 0.8. Default: nullptr */ - CIMPP::Simple_Float ky; /* Coefficient of transfer function of fuel valve positioner (Ky). Typical Value = 1. Default: nullptr */ - CIMPP::PU mnef; /* Fuel flow maximum negative error value (MN). Typical Value = -0.05. Default: nullptr */ - CIMPP::PU mxef; /* Fuel flow maximum positive error value (MX). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU rcmn; /* Minimum fuel flow (RCMN). Typical Value = -0.1. Default: nullptr */ - CIMPP::PU rcmx; /* Maximum fuel flow (RCMX). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tac; /* Fuel control time constant (Tac). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tc; /* Compressor discharge volume time constant (Tc). Typical Value = 0.2. Default: nullptr */ - CIMPP::Seconds td; /* Temperature controller derivative gain (Td). Typical Value = 3.3. Default: nullptr */ - CIMPP::Temperature tfen; /* Turbine rated exhaust temperature correspondent to Pm=1 PU (Tfen). Typical Value = 540. Default: nullptr */ - CIMPP::Seconds tg; /* Time constant of speed governor (Tg). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds tsi; /* Time constant of radiation shield (Tsi). Typical Value = 15. Default: nullptr */ - CIMPP::Temperature tt; /* Temperature controller integration rate (Tt). Typical Value = 250. Default: nullptr */ - CIMPP::Seconds ttc; /* Time constant of thermocouple (Ttc). Typical Value = 2.5. Default: nullptr */ - CIMPP::Seconds ty; /* Time constant of fuel valve positioner (Ty). Typical Value = 0.2. Default: nullptr */ + /** \brief Acceleration limit set-point (Bca). Unit = 1/s. Typical Value = 0.01. Default: nullptr */ + CIMPP::Simple_Float bca; + + /** \brief Droop (bp). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU bp; + + /** \brief Exhaust temperature variation due to fuel flow increasing from 0 to 1 PU (deltaTc). Typical Value = 390. Default: nullptr */ + CIMPP::Temperature dtc; + + /** \brief Minimum fuel flow (Ka). Typical Value = 0.23. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Fuel system feedback (K). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float kac; + + /** \brief Acceleration control integral gain (Kca). Unit = 1/s. Typical Value = 100. Default: nullptr */ + CIMPP::Simple_Float kca; + + /** \brief Gain of radiation shield (Ksi). Typical Value = 0.8. Default: nullptr */ + CIMPP::Simple_Float ksi; + + /** \brief Coefficient of transfer function of fuel valve positioner (Ky). Typical Value = 1. Default: nullptr */ + CIMPP::Simple_Float ky; + + /** \brief Fuel flow maximum negative error value (MN). Typical Value = -0.05. Default: nullptr */ + CIMPP::PU mnef; + + /** \brief Fuel flow maximum positive error value (MX). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU mxef; + + /** \brief Minimum fuel flow (RCMN). Typical Value = -0.1. Default: nullptr */ + CIMPP::PU rcmn; + + /** \brief Maximum fuel flow (RCMX). Typical Value = 1. Default: nullptr */ + CIMPP::PU rcmx; + + /** \brief Fuel control time constant (Tac). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tac; + + /** \brief Compressor discharge volume time constant (Tc). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Temperature controller derivative gain (Td). Typical Value = 3.3. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Turbine rated exhaust temperature correspondent to Pm=1 PU (Tfen). Typical Value = 540. Default: nullptr */ + CIMPP::Temperature tfen; + + /** \brief Time constant of speed governor (Tg). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Time constant of radiation shield (Tsi). Typical Value = 15. Default: nullptr */ + CIMPP::Seconds tsi; + + /** \brief Temperature controller integration rate (Tt). Typical Value = 250. Default: nullptr */ + CIMPP::Temperature tt; + + /** \brief Time constant of thermocouple (Ttc). Typical Value = 2.5. Default: nullptr */ + CIMPP::Seconds ttc; + + /** \brief Time constant of fuel valve positioner (Ty). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds ty; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GovGAST4.cpp b/CGMES_2.4.15_27JAN2020/GovGAST4.cpp index 5036fcf63..43052f31f 100644 --- a/CGMES_2.4.15_27JAN2020/GovGAST4.cpp +++ b/CGMES_2.4.15_27JAN2020/GovGAST4.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -GovGAST4::GovGAST4() {}; -GovGAST4::~GovGAST4() {}; +GovGAST4::GovGAST4() {} +GovGAST4::~GovGAST4() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ GovGAST4::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovGAST4_bp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_bp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_ktm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_ktm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ktm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_mnef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_mnef(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mnef; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_mxef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_mxef(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mxef; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_rymn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_rymn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rymn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_rymx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_rymx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rymx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_tcm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_tcm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tcm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_tm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_tm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_tv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_tv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovGAST4_bp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bp; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_GovGAST4_bp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST4_ktm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ktm; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_GovGAST4_ktm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST4_mnef(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mnef; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_GovGAST4_mnef(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST4_mxef(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mxef; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_GovGAST4_mxef(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST4_rymn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rymn; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_GovGAST4_rymn(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST4_rymx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rymx; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_GovGAST4_rymx(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST4_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_GovGAST4_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST4_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_GovGAST4_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST4_tcm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tcm; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_GovGAST4_tcm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST4_tm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tm; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_GovGAST4_tm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST4_tv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tv; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_GovGAST4_tv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char GovGAST4::debugName[] = "GovGAST4"; const char* GovGAST4::debugString() const { @@ -370,22 +376,22 @@ const char* GovGAST4::debugString() const void GovGAST4::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovGAST4"), &GovGAST4_factory)); + factory_map.emplace("cim:GovGAST4", &GovGAST4_factory); } void GovGAST4::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.bp"), &assign_GovGAST4_bp)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.ktm"), &assign_GovGAST4_ktm)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.mnef"), &assign_GovGAST4_mnef)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.mxef"), &assign_GovGAST4_mxef)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.rymn"), &assign_GovGAST4_rymn)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.rymx"), &assign_GovGAST4_rymx)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.ta"), &assign_GovGAST4_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.tc"), &assign_GovGAST4_tc)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.tcm"), &assign_GovGAST4_tcm)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.tm"), &assign_GovGAST4_tm)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.tv"), &assign_GovGAST4_tv)); + assign_map.emplace("cim:GovGAST4.bp", &assign_GovGAST4_bp); + assign_map.emplace("cim:GovGAST4.ktm", &assign_GovGAST4_ktm); + assign_map.emplace("cim:GovGAST4.mnef", &assign_GovGAST4_mnef); + assign_map.emplace("cim:GovGAST4.mxef", &assign_GovGAST4_mxef); + assign_map.emplace("cim:GovGAST4.rymn", &assign_GovGAST4_rymn); + assign_map.emplace("cim:GovGAST4.rymx", &assign_GovGAST4_rymx); + assign_map.emplace("cim:GovGAST4.ta", &assign_GovGAST4_ta); + assign_map.emplace("cim:GovGAST4.tc", &assign_GovGAST4_tc); + assign_map.emplace("cim:GovGAST4.tcm", &assign_GovGAST4_tcm); + assign_map.emplace("cim:GovGAST4.tm", &assign_GovGAST4_tm); + assign_map.emplace("cim:GovGAST4.tv", &assign_GovGAST4_tv); } void GovGAST4::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/GovGAST4.hpp b/CGMES_2.4.15_27JAN2020/GovGAST4.hpp index 901976bdd..aa017e229 100644 --- a/CGMES_2.4.15_27JAN2020/GovGAST4.hpp +++ b/CGMES_2.4.15_27JAN2020/GovGAST4.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Generic turbogas. - */ + /** \brief Generic turbogas. */ class GovGAST4 : public TurbineGovernorDynamics { public: @@ -28,17 +26,38 @@ namespace CIMPP GovGAST4(); ~GovGAST4() override; - CIMPP::PU bp; /* Droop (bp). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU ktm; /* Compressor gain (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU mnef; /* Fuel flow maximum negative error value (MN). Typical Value = -0.05. Default: nullptr */ - CIMPP::PU mxef; /* Fuel flow maximum positive error value (MX). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU rymn; /* Minimum valve opening (RYMN). Typical Value = 0. Default: nullptr */ - CIMPP::PU rymx; /* Maximum valve opening (RYMX). Typical Value = 1.1. Default: nullptr */ - CIMPP::Seconds ta; /* Maximum gate opening velocity (T). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds tc; /* Maximum gate closing velocity (T). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tcm; /* Fuel control time constant (T). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tm; /* Compressor discharge volume time constant (T). Typical Value = 0.2. Default: nullptr */ - CIMPP::Seconds tv; /* Time constant of fuel valve positioner (T). Typical Value = 0.1. Default: nullptr */ + /** \brief Droop (bp). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU bp; + + /** \brief Compressor gain (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU ktm; + + /** \brief Fuel flow maximum negative error value (MN). Typical Value = -0.05. Default: nullptr */ + CIMPP::PU mnef; + + /** \brief Fuel flow maximum positive error value (MX). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU mxef; + + /** \brief Minimum valve opening (RYMN). Typical Value = 0. Default: nullptr */ + CIMPP::PU rymn; + + /** \brief Maximum valve opening (RYMX). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU rymx; + + /** \brief Maximum gate opening velocity (T). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Maximum gate closing velocity (T). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Fuel control time constant (T). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tcm; + + /** \brief Compressor discharge volume time constant (T). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds tm; + + /** \brief Time constant of fuel valve positioner (T). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tv; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GovGASTWD.cpp b/CGMES_2.4.15_27JAN2020/GovGASTWD.cpp index 08890f106..06560d02d 100644 --- a/CGMES_2.4.15_27JAN2020/GovGASTWD.cpp +++ b/CGMES_2.4.15_27JAN2020/GovGASTWD.cpp @@ -8,44 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Temperature.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Temperature.hpp" -#include "ActivePower.hpp" -#include "Seconds.hpp" using namespace CIMPP; -GovGASTWD::GovGASTWD() {}; -GovGASTWD::~GovGASTWD() {}; +GovGASTWD::GovGASTWD() {} +GovGASTWD::~GovGASTWD() {} static const std::list PossibleProfilesForClass = { @@ -104,441 +71,472 @@ GovGASTWD::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovGASTWD_a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_a(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_af1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_af1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->af1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_af2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_af2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->af2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_b(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_bf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_bf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_bf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_bf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_c(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_c(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->c; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_cf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_cf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->cf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_ecr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_ecr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ecr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_etd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_etd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->etd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_k4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_k5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_k5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_k6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_k6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_kdroop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_kdroop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kdroop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_t(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_t(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_tcd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_tcd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tcd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_tmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_tmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_tmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_tmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_trate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_trate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->trate; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_tt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovGASTWD_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a; if (!buffer.str().empty()) @@ -552,7 +550,8 @@ bool get_GovGASTWD_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGASTWD_af1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->af1; if (!buffer.str().empty()) @@ -566,7 +565,8 @@ bool get_GovGASTWD_af1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGASTWD_af2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->af2; if (!buffer.str().empty()) @@ -580,7 +580,8 @@ bool get_GovGASTWD_af2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGASTWD_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b; if (!buffer.str().empty()) @@ -594,7 +595,8 @@ bool get_GovGASTWD_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGASTWD_bf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bf1; if (!buffer.str().empty()) @@ -608,7 +610,8 @@ bool get_GovGASTWD_bf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGASTWD_bf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bf2; if (!buffer.str().empty()) @@ -622,7 +625,8 @@ bool get_GovGASTWD_bf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGASTWD_c(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->c; if (!buffer.str().empty()) @@ -636,7 +640,8 @@ bool get_GovGASTWD_c(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGASTWD_cf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->cf2; if (!buffer.str().empty()) @@ -650,7 +655,8 @@ bool get_GovGASTWD_cf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGASTWD_ecr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ecr; if (!buffer.str().empty()) @@ -664,7 +670,8 @@ bool get_GovGASTWD_ecr(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGASTWD_etd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->etd; if (!buffer.str().empty()) @@ -678,7 +685,8 @@ bool get_GovGASTWD_etd(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGASTWD_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -692,7 +700,8 @@ bool get_GovGASTWD_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k4; if (!buffer.str().empty()) @@ -706,7 +715,8 @@ bool get_GovGASTWD_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k5; if (!buffer.str().empty()) @@ -720,7 +730,8 @@ bool get_GovGASTWD_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_k6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k6; if (!buffer.str().empty()) @@ -734,7 +745,8 @@ bool get_GovGASTWD_k6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -748,7 +760,8 @@ bool get_GovGASTWD_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_kdroop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdroop; if (!buffer.str().empty()) @@ -762,7 +775,8 @@ bool get_GovGASTWD_kdroop(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovGASTWD_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -776,7 +790,8 @@ bool get_GovGASTWD_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -790,7 +805,8 @@ bool get_GovGASTWD_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -804,7 +820,8 @@ bool get_GovGASTWD_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -818,7 +835,8 @@ bool get_GovGASTWD_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovGASTWD_t(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t; if (!buffer.str().empty()) @@ -832,7 +850,8 @@ bool get_GovGASTWD_t(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGASTWD_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -846,7 +865,8 @@ bool get_GovGASTWD_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -860,7 +880,8 @@ bool get_GovGASTWD_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -874,7 +895,8 @@ bool get_GovGASTWD_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -888,7 +910,8 @@ bool get_GovGASTWD_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_tcd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tcd; if (!buffer.str().empty()) @@ -902,7 +925,8 @@ bool get_GovGASTWD_tcd(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGASTWD_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -916,7 +940,8 @@ bool get_GovGASTWD_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -930,7 +955,8 @@ bool get_GovGASTWD_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_tmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tmax; if (!buffer.str().empty()) @@ -944,7 +970,8 @@ bool get_GovGASTWD_tmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovGASTWD_tmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tmin; if (!buffer.str().empty()) @@ -958,7 +985,8 @@ bool get_GovGASTWD_tmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovGASTWD_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -972,7 +1000,8 @@ bool get_GovGASTWD_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_trate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->trate; if (!buffer.str().empty()) @@ -986,7 +1015,8 @@ bool get_GovGASTWD_trate(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovGASTWD_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tt; if (!buffer.str().empty()) @@ -998,8 +1028,6 @@ bool get_GovGASTWD_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char GovGASTWD::debugName[] = "GovGASTWD"; const char* GovGASTWD::debugString() const { @@ -1008,44 +1036,44 @@ const char* GovGASTWD::debugString() const void GovGASTWD::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovGASTWD"), &GovGASTWD_factory)); + factory_map.emplace("cim:GovGASTWD", &GovGASTWD_factory); } void GovGASTWD::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.a"), &assign_GovGASTWD_a)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.af1"), &assign_GovGASTWD_af1)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.af2"), &assign_GovGASTWD_af2)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.b"), &assign_GovGASTWD_b)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.bf1"), &assign_GovGASTWD_bf1)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.bf2"), &assign_GovGASTWD_bf2)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.c"), &assign_GovGASTWD_c)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.cf2"), &assign_GovGASTWD_cf2)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.ecr"), &assign_GovGASTWD_ecr)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.etd"), &assign_GovGASTWD_etd)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.k3"), &assign_GovGASTWD_k3)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.k4"), &assign_GovGASTWD_k4)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.k5"), &assign_GovGASTWD_k5)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.k6"), &assign_GovGASTWD_k6)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.kd"), &assign_GovGASTWD_kd)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.kdroop"), &assign_GovGASTWD_kdroop)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.kf"), &assign_GovGASTWD_kf)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.ki"), &assign_GovGASTWD_ki)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.kp"), &assign_GovGASTWD_kp)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.mwbase"), &assign_GovGASTWD_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.t"), &assign_GovGASTWD_t)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.t3"), &assign_GovGASTWD_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.t4"), &assign_GovGASTWD_t4)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.t5"), &assign_GovGASTWD_t5)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.tc"), &assign_GovGASTWD_tc)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.tcd"), &assign_GovGASTWD_tcd)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.td"), &assign_GovGASTWD_td)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.tf"), &assign_GovGASTWD_tf)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.tmax"), &assign_GovGASTWD_tmax)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.tmin"), &assign_GovGASTWD_tmin)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.tr"), &assign_GovGASTWD_tr)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.trate"), &assign_GovGASTWD_trate)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.tt"), &assign_GovGASTWD_tt)); + assign_map.emplace("cim:GovGASTWD.a", &assign_GovGASTWD_a); + assign_map.emplace("cim:GovGASTWD.af1", &assign_GovGASTWD_af1); + assign_map.emplace("cim:GovGASTWD.af2", &assign_GovGASTWD_af2); + assign_map.emplace("cim:GovGASTWD.b", &assign_GovGASTWD_b); + assign_map.emplace("cim:GovGASTWD.bf1", &assign_GovGASTWD_bf1); + assign_map.emplace("cim:GovGASTWD.bf2", &assign_GovGASTWD_bf2); + assign_map.emplace("cim:GovGASTWD.c", &assign_GovGASTWD_c); + assign_map.emplace("cim:GovGASTWD.cf2", &assign_GovGASTWD_cf2); + assign_map.emplace("cim:GovGASTWD.ecr", &assign_GovGASTWD_ecr); + assign_map.emplace("cim:GovGASTWD.etd", &assign_GovGASTWD_etd); + assign_map.emplace("cim:GovGASTWD.k3", &assign_GovGASTWD_k3); + assign_map.emplace("cim:GovGASTWD.k4", &assign_GovGASTWD_k4); + assign_map.emplace("cim:GovGASTWD.k5", &assign_GovGASTWD_k5); + assign_map.emplace("cim:GovGASTWD.k6", &assign_GovGASTWD_k6); + assign_map.emplace("cim:GovGASTWD.kd", &assign_GovGASTWD_kd); + assign_map.emplace("cim:GovGASTWD.kdroop", &assign_GovGASTWD_kdroop); + assign_map.emplace("cim:GovGASTWD.kf", &assign_GovGASTWD_kf); + assign_map.emplace("cim:GovGASTWD.ki", &assign_GovGASTWD_ki); + assign_map.emplace("cim:GovGASTWD.kp", &assign_GovGASTWD_kp); + assign_map.emplace("cim:GovGASTWD.mwbase", &assign_GovGASTWD_mwbase); + assign_map.emplace("cim:GovGASTWD.t", &assign_GovGASTWD_t); + assign_map.emplace("cim:GovGASTWD.t3", &assign_GovGASTWD_t3); + assign_map.emplace("cim:GovGASTWD.t4", &assign_GovGASTWD_t4); + assign_map.emplace("cim:GovGASTWD.t5", &assign_GovGASTWD_t5); + assign_map.emplace("cim:GovGASTWD.tc", &assign_GovGASTWD_tc); + assign_map.emplace("cim:GovGASTWD.tcd", &assign_GovGASTWD_tcd); + assign_map.emplace("cim:GovGASTWD.td", &assign_GovGASTWD_td); + assign_map.emplace("cim:GovGASTWD.tf", &assign_GovGASTWD_tf); + assign_map.emplace("cim:GovGASTWD.tmax", &assign_GovGASTWD_tmax); + assign_map.emplace("cim:GovGASTWD.tmin", &assign_GovGASTWD_tmin); + assign_map.emplace("cim:GovGASTWD.tr", &assign_GovGASTWD_tr); + assign_map.emplace("cim:GovGASTWD.trate", &assign_GovGASTWD_trate); + assign_map.emplace("cim:GovGASTWD.tt", &assign_GovGASTWD_tt); } void GovGASTWD::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/GovGASTWD.hpp b/CGMES_2.4.15_27JAN2020/GovGASTWD.hpp index 5a33bd21d..8623cf082 100644 --- a/CGMES_2.4.15_27JAN2020/GovGASTWD.hpp +++ b/CGMES_2.4.15_27JAN2020/GovGASTWD.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Woodward Gas turbine governor model. - */ + /** \brief Woodward Gas turbine governor model. */ class GovGASTWD : public TurbineGovernorDynamics { public: @@ -31,39 +29,104 @@ namespace CIMPP GovGASTWD(); ~GovGASTWD() override; - CIMPP::Simple_Float a; /* Valve positioner (). Default: nullptr */ - CIMPP::PU af1; /* Exhaust temperature Parameter (Af1). Default: nullptr */ - CIMPP::PU af2; /* Coefficient equal to 0.5(1-speed) (Af2). Default: nullptr */ - CIMPP::Simple_Float b; /* Valve positioner (). Default: nullptr */ - CIMPP::PU bf1; /* (Bf1). Bf1 = E(1-w) where E (speed sensitivity coefficient) is 0.55 to 0.65 x Tr. Default: nullptr */ - CIMPP::PU bf2; /* Turbine Torque Coefficient K (depends on heating value of fuel stream in combustion chamber) (Bf2). Default: nullptr */ - CIMPP::Simple_Float c; /* Valve positioner (). Default: nullptr */ - CIMPP::PU cf2; /* Coefficient defining fuel flow where power output is 0% (Cf2). Synchronous but no output. Typically 0.23 x K(23% fuel flow). Default: nullptr */ - CIMPP::Seconds ecr; /* Combustion reaction time delay (Ecr). Default: nullptr */ - CIMPP::Seconds etd; /* Turbine and exhaust delay (Etd). Default: nullptr */ - CIMPP::PU k3; /* Ratio of Fuel Adjustment (K3). Default: nullptr */ - CIMPP::PU k4; /* Gain of radiation shield (K4). Default: nullptr */ - CIMPP::PU k5; /* Gain of radiation shield (K5). Default: nullptr */ - CIMPP::PU k6; /* Minimum fuel flow (K6). Default: nullptr */ - CIMPP::PU kd; /* Drop Governor Gain (Kd). Default: nullptr */ - CIMPP::PU kdroop; /* (Kdroop). Default: nullptr */ - CIMPP::PU kf; /* Fuel system feedback (Kf). Default: nullptr */ - CIMPP::PU ki; /* Isochronous Governor Gain (Ki). Default: nullptr */ - CIMPP::PU kp; /* PID Proportional gain (Kp). Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ - CIMPP::Seconds t; /* Fuel Control Time Constant (T). Default: nullptr */ - CIMPP::Seconds t3; /* Radiation shield time constant (T3). Default: nullptr */ - CIMPP::Seconds t4; /* Thermocouple time constant (T4). Default: nullptr */ - CIMPP::Seconds t5; /* Temperature control time constant (T5). Default: nullptr */ - CIMPP::Temperature tc; /* Temperature control (Tc). Default: nullptr */ - CIMPP::Seconds tcd; /* Compressor discharge time constant (Tcd). Default: nullptr */ - CIMPP::Seconds td; /* Power transducer time constant (Td). Default: nullptr */ - CIMPP::Seconds tf; /* Fuel system time constant (Tf). Default: nullptr */ - CIMPP::PU tmax; /* Maximum Turbine limit (Tmax). Default: nullptr */ - CIMPP::PU tmin; /* Minimum Turbine limit (Tmin). Default: nullptr */ - CIMPP::Temperature tr; /* Rated temperature (Tr). Default: nullptr */ - CIMPP::ActivePower trate; /* Turbine rating (Trate). Unit = MW. Default: nullptr */ - CIMPP::Seconds tt; /* Temperature controller integration rate (Tt). Default: nullptr */ + /** \brief Valve positioner (). Default: nullptr */ + CIMPP::Simple_Float a; + + /** \brief Exhaust temperature Parameter (Af1). Default: nullptr */ + CIMPP::PU af1; + + /** \brief Coefficient equal to 0.5(1-speed) (Af2). Default: nullptr */ + CIMPP::PU af2; + + /** \brief Valve positioner (). Default: nullptr */ + CIMPP::Simple_Float b; + + /** \brief (Bf1). Bf1 = E(1-w) where E (speed sensitivity coefficient) is 0.55 to 0.65 x Tr. Default: nullptr */ + CIMPP::PU bf1; + + /** \brief Turbine Torque Coefficient K (depends on heating value of fuel stream in combustion chamber) (Bf2). Default: nullptr */ + CIMPP::PU bf2; + + /** \brief Valve positioner (). Default: nullptr */ + CIMPP::Simple_Float c; + + /** \brief Coefficient defining fuel flow where power output is 0% (Cf2). Synchronous but no output. Typically 0.23 x K(23% fuel flow). Default: nullptr */ + CIMPP::PU cf2; + + /** \brief Combustion reaction time delay (Ecr). Default: nullptr */ + CIMPP::Seconds ecr; + + /** \brief Turbine and exhaust delay (Etd). Default: nullptr */ + CIMPP::Seconds etd; + + /** \brief Ratio of Fuel Adjustment (K3). Default: nullptr */ + CIMPP::PU k3; + + /** \brief Gain of radiation shield (K4). Default: nullptr */ + CIMPP::PU k4; + + /** \brief Gain of radiation shield (K5). Default: nullptr */ + CIMPP::PU k5; + + /** \brief Minimum fuel flow (K6). Default: nullptr */ + CIMPP::PU k6; + + /** \brief Drop Governor Gain (Kd). Default: nullptr */ + CIMPP::PU kd; + + /** \brief (Kdroop). Default: nullptr */ + CIMPP::PU kdroop; + + /** \brief Fuel system feedback (Kf). Default: nullptr */ + CIMPP::PU kf; + + /** \brief Isochronous Governor Gain (Ki). Default: nullptr */ + CIMPP::PU ki; + + /** \brief PID Proportional gain (Kp). Default: nullptr */ + CIMPP::PU kp; + + /** \brief Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Fuel Control Time Constant (T). Default: nullptr */ + CIMPP::Seconds t; + + /** \brief Radiation shield time constant (T3). Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Thermocouple time constant (T4). Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Temperature control time constant (T5). Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Temperature control (Tc). Default: nullptr */ + CIMPP::Temperature tc; + + /** \brief Compressor discharge time constant (Tcd). Default: nullptr */ + CIMPP::Seconds tcd; + + /** \brief Power transducer time constant (Td). Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Fuel system time constant (Tf). Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum Turbine limit (Tmax). Default: nullptr */ + CIMPP::PU tmax; + + /** \brief Minimum Turbine limit (Tmin). Default: nullptr */ + CIMPP::PU tmin; + + /** \brief Rated temperature (Tr). Default: nullptr */ + CIMPP::Temperature tr; + + /** \brief Turbine rating (Trate). Unit = MW. Default: nullptr */ + CIMPP::ActivePower trate; + + /** \brief Temperature controller integration rate (Tt). Default: nullptr */ + CIMPP::Seconds tt; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GovHydro1.cpp b/CGMES_2.4.15_27JAN2020/GovHydro1.cpp index d36e951b5..ba0d33f7d 100644 --- a/CGMES_2.4.15_27JAN2020/GovHydro1.cpp +++ b/CGMES_2.4.15_27JAN2020/GovHydro1.cpp @@ -8,25 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -GovHydro1::GovHydro1() {}; -GovHydro1::~GovHydro1() {}; +GovHydro1::GovHydro1() {} +GovHydro1::~GovHydro1() {} static const std::list PossibleProfilesForClass = { @@ -66,194 +52,206 @@ GovHydro1::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydro1_at(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_at(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->at; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_dturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_dturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_gmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_gmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_gmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_gmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_hdam(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_hdam(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->hdam; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_qnl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_qnl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qnl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_rperm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_rperm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rperm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_rtemp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_rtemp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rtemp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_velm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_velm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydro1_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->at; if (!buffer.str().empty()) @@ -267,7 +265,8 @@ bool get_GovHydro1_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro1_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dturb; if (!buffer.str().empty()) @@ -281,7 +280,8 @@ bool get_GovHydro1_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro1_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmax; if (!buffer.str().empty()) @@ -295,7 +295,8 @@ bool get_GovHydro1_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro1_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmin; if (!buffer.str().empty()) @@ -309,7 +310,8 @@ bool get_GovHydro1_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro1_hdam(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hdam; if (!buffer.str().empty()) @@ -323,7 +325,8 @@ bool get_GovHydro1_hdam(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -337,7 +340,8 @@ bool get_GovHydro1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydro1_qnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qnl; if (!buffer.str().empty()) @@ -351,7 +355,8 @@ bool get_GovHydro1_qnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro1_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rperm; if (!buffer.str().empty()) @@ -365,7 +370,8 @@ bool get_GovHydro1_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro1_rtemp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rtemp; if (!buffer.str().empty()) @@ -379,7 +385,8 @@ bool get_GovHydro1_rtemp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro1_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -393,7 +400,8 @@ bool get_GovHydro1_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro1_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -407,7 +415,8 @@ bool get_GovHydro1_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro1_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -421,7 +430,8 @@ bool get_GovHydro1_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro1_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -435,7 +445,8 @@ bool get_GovHydro1_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro1_velm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velm; if (!buffer.str().empty()) @@ -447,8 +458,6 @@ bool get_GovHydro1_velm(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char GovHydro1::debugName[] = "GovHydro1"; const char* GovHydro1::debugString() const { @@ -457,25 +466,25 @@ const char* GovHydro1::debugString() const void GovHydro1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydro1"), &GovHydro1_factory)); + factory_map.emplace("cim:GovHydro1", &GovHydro1_factory); } void GovHydro1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.at"), &assign_GovHydro1_at)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.dturb"), &assign_GovHydro1_dturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.gmax"), &assign_GovHydro1_gmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.gmin"), &assign_GovHydro1_gmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.hdam"), &assign_GovHydro1_hdam)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.mwbase"), &assign_GovHydro1_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.qnl"), &assign_GovHydro1_qnl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.rperm"), &assign_GovHydro1_rperm)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.rtemp"), &assign_GovHydro1_rtemp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.tf"), &assign_GovHydro1_tf)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.tg"), &assign_GovHydro1_tg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.tr"), &assign_GovHydro1_tr)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.tw"), &assign_GovHydro1_tw)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.velm"), &assign_GovHydro1_velm)); + assign_map.emplace("cim:GovHydro1.at", &assign_GovHydro1_at); + assign_map.emplace("cim:GovHydro1.dturb", &assign_GovHydro1_dturb); + assign_map.emplace("cim:GovHydro1.gmax", &assign_GovHydro1_gmax); + assign_map.emplace("cim:GovHydro1.gmin", &assign_GovHydro1_gmin); + assign_map.emplace("cim:GovHydro1.hdam", &assign_GovHydro1_hdam); + assign_map.emplace("cim:GovHydro1.mwbase", &assign_GovHydro1_mwbase); + assign_map.emplace("cim:GovHydro1.qnl", &assign_GovHydro1_qnl); + assign_map.emplace("cim:GovHydro1.rperm", &assign_GovHydro1_rperm); + assign_map.emplace("cim:GovHydro1.rtemp", &assign_GovHydro1_rtemp); + assign_map.emplace("cim:GovHydro1.tf", &assign_GovHydro1_tf); + assign_map.emplace("cim:GovHydro1.tg", &assign_GovHydro1_tg); + assign_map.emplace("cim:GovHydro1.tr", &assign_GovHydro1_tr); + assign_map.emplace("cim:GovHydro1.tw", &assign_GovHydro1_tw); + assign_map.emplace("cim:GovHydro1.velm", &assign_GovHydro1_velm); } void GovHydro1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/GovHydro1.hpp b/CGMES_2.4.15_27JAN2020/GovHydro1.hpp index 288576b07..f0f99628b 100644 --- a/CGMES_2.4.15_27JAN2020/GovHydro1.hpp +++ b/CGMES_2.4.15_27JAN2020/GovHydro1.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Basic Hydro turbine governor model. - */ + /** \brief Basic Hydro turbine governor model. */ class GovHydro1 : public TurbineGovernorDynamics { public: @@ -30,20 +28,47 @@ namespace CIMPP GovHydro1(); ~GovHydro1() override; - CIMPP::PU at; /* Turbine gain (At) (>0). Typical Value = 1.2. Default: nullptr */ - CIMPP::PU dturb; /* Turbine damping factor (Dturb) (>=0). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU gmax; /* Maximum gate opening (Gmax) (>0). Typical Value = 1. Default: nullptr */ - CIMPP::PU gmin; /* Minimum gate opening (Gmin) (>=0). Typical Value = 0. Default: nullptr */ - CIMPP::PU hdam; /* Turbine nominal head (hdam). Typical Value = 1. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ - CIMPP::PU qnl; /* No-load flow at nominal head (qnl) (>=0). Typical Value = 0.08. Default: nullptr */ - CIMPP::PU rperm; /* Permanent droop (R) (>0). Typical Value = 0.04. Default: nullptr */ - CIMPP::PU rtemp; /* Temporary droop (r) (>R). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds tf; /* Filter time constant () (>0). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds tg; /* Gate servo time constant (Tg) (>0). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tr; /* Washout time constant (Tr) (>0). Typical Value = 5. Default: nullptr */ - CIMPP::Seconds tw; /* Water inertia time constant (Tw) (>0). Typical Value = 1. Default: nullptr */ - CIMPP::Simple_Float velm; /* Maximum gate velocity (Vlem) (>0). Typical Value = 0.2. Default: nullptr */ + /** \brief Turbine gain (At) (>0). Typical Value = 1.2. Default: nullptr */ + CIMPP::PU at; + + /** \brief Turbine damping factor (Dturb) (>=0). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU dturb; + + /** \brief Maximum gate opening (Gmax) (>0). Typical Value = 1. Default: nullptr */ + CIMPP::PU gmax; + + /** \brief Minimum gate opening (Gmin) (>=0). Typical Value = 0. Default: nullptr */ + CIMPP::PU gmin; + + /** \brief Turbine nominal head (hdam). Typical Value = 1. Default: nullptr */ + CIMPP::PU hdam; + + /** \brief Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief No-load flow at nominal head (qnl) (>=0). Typical Value = 0.08. Default: nullptr */ + CIMPP::PU qnl; + + /** \brief Permanent droop (R) (>0). Typical Value = 0.04. Default: nullptr */ + CIMPP::PU rperm; + + /** \brief Temporary droop (r) (>R). Typical Value = 0.3. Default: nullptr */ + CIMPP::PU rtemp; + + /** \brief Filter time constant () (>0). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Gate servo time constant (Tg) (>0). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Washout time constant (Tr) (>0). Typical Value = 5. Default: nullptr */ + CIMPP::Seconds tr; + + /** \brief Water inertia time constant (Tw) (>0). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tw; + + /** \brief Maximum gate velocity (Vlem) (>0). Typical Value = 0.2. Default: nullptr */ + CIMPP::Simple_Float velm; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GovHydro2.cpp b/CGMES_2.4.15_27JAN2020/GovHydro2.cpp index a4fa05ccb..83cb2dbf7 100644 --- a/CGMES_2.4.15_27JAN2020/GovHydro2.cpp +++ b/CGMES_2.4.15_27JAN2020/GovHydro2.cpp @@ -8,40 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Frequency.hpp" -#include "ActivePower.hpp" -#include "Frequency.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -GovHydro2::GovHydro2() {}; -GovHydro2::~GovHydro2() {}; +GovHydro2::GovHydro2() {} +GovHydro2::~GovHydro2() {} static const std::list PossibleProfilesForClass = { @@ -96,389 +67,416 @@ GovHydro2::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydro2_aturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_aturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->aturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_bturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_bturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_eps(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eps; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_gv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_kturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_kturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_pgv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_rperm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_rperm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rperm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_rtemp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_rtemp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rtemp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_uc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_uo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_uo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydro2_aturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->aturb; if (!buffer.str().empty()) @@ -492,7 +490,8 @@ bool get_GovHydro2_aturb(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro2_bturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bturb; if (!buffer.str().empty()) @@ -506,7 +505,8 @@ bool get_GovHydro2_bturb(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro2_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -520,7 +520,8 @@ bool get_GovHydro2_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro2_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -534,7 +535,8 @@ bool get_GovHydro2_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro2_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eps; if (!buffer.str().empty()) @@ -548,7 +550,8 @@ bool get_GovHydro2_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro2_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -562,7 +565,8 @@ bool get_GovHydro2_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro2_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -576,7 +580,8 @@ bool get_GovHydro2_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro2_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -590,7 +595,8 @@ bool get_GovHydro2_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro2_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -604,7 +610,8 @@ bool get_GovHydro2_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro2_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -618,7 +625,8 @@ bool get_GovHydro2_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro2_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv6; if (!buffer.str().empty()) @@ -632,7 +640,8 @@ bool get_GovHydro2_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro2_kturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kturb; if (!buffer.str().empty()) @@ -646,7 +655,8 @@ bool get_GovHydro2_kturb(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -660,7 +670,8 @@ bool get_GovHydro2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydro2_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -674,7 +685,8 @@ bool get_GovHydro2_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro2_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -688,7 +700,8 @@ bool get_GovHydro2_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro2_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -702,7 +715,8 @@ bool get_GovHydro2_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro2_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -716,7 +730,8 @@ bool get_GovHydro2_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro2_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -730,7 +745,8 @@ bool get_GovHydro2_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro2_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv6; if (!buffer.str().empty()) @@ -744,7 +760,8 @@ bool get_GovHydro2_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro2_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -758,7 +775,8 @@ bool get_GovHydro2_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro2_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -772,7 +790,8 @@ bool get_GovHydro2_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro2_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rperm; if (!buffer.str().empty()) @@ -786,7 +805,8 @@ bool get_GovHydro2_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro2_rtemp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rtemp; if (!buffer.str().empty()) @@ -800,7 +820,8 @@ bool get_GovHydro2_rtemp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro2_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -814,7 +835,8 @@ bool get_GovHydro2_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro2_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -828,7 +850,8 @@ bool get_GovHydro2_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro2_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -842,7 +865,8 @@ bool get_GovHydro2_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro2_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -856,7 +880,8 @@ bool get_GovHydro2_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro2_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uc; if (!buffer.str().empty()) @@ -870,7 +895,8 @@ bool get_GovHydro2_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro2_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uo; if (!buffer.str().empty()) @@ -882,8 +908,6 @@ bool get_GovHydro2_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char GovHydro2::debugName[] = "GovHydro2"; const char* GovHydro2::debugString() const { @@ -892,40 +916,40 @@ const char* GovHydro2::debugString() const void GovHydro2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydro2"), &GovHydro2_factory)); + factory_map.emplace("cim:GovHydro2", &GovHydro2_factory); } void GovHydro2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.aturb"), &assign_GovHydro2_aturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.bturb"), &assign_GovHydro2_bturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.db1"), &assign_GovHydro2_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.db2"), &assign_GovHydro2_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.eps"), &assign_GovHydro2_eps)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.gv1"), &assign_GovHydro2_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.gv2"), &assign_GovHydro2_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.gv3"), &assign_GovHydro2_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.gv4"), &assign_GovHydro2_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.gv5"), &assign_GovHydro2_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.gv6"), &assign_GovHydro2_gv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.kturb"), &assign_GovHydro2_kturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.mwbase"), &assign_GovHydro2_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.pgv1"), &assign_GovHydro2_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.pgv2"), &assign_GovHydro2_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.pgv3"), &assign_GovHydro2_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.pgv4"), &assign_GovHydro2_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.pgv5"), &assign_GovHydro2_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.pgv6"), &assign_GovHydro2_pgv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.pmax"), &assign_GovHydro2_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.pmin"), &assign_GovHydro2_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.rperm"), &assign_GovHydro2_rperm)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.rtemp"), &assign_GovHydro2_rtemp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.tg"), &assign_GovHydro2_tg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.tp"), &assign_GovHydro2_tp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.tr"), &assign_GovHydro2_tr)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.tw"), &assign_GovHydro2_tw)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.uc"), &assign_GovHydro2_uc)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.uo"), &assign_GovHydro2_uo)); + assign_map.emplace("cim:GovHydro2.aturb", &assign_GovHydro2_aturb); + assign_map.emplace("cim:GovHydro2.bturb", &assign_GovHydro2_bturb); + assign_map.emplace("cim:GovHydro2.db1", &assign_GovHydro2_db1); + assign_map.emplace("cim:GovHydro2.db2", &assign_GovHydro2_db2); + assign_map.emplace("cim:GovHydro2.eps", &assign_GovHydro2_eps); + assign_map.emplace("cim:GovHydro2.gv1", &assign_GovHydro2_gv1); + assign_map.emplace("cim:GovHydro2.gv2", &assign_GovHydro2_gv2); + assign_map.emplace("cim:GovHydro2.gv3", &assign_GovHydro2_gv3); + assign_map.emplace("cim:GovHydro2.gv4", &assign_GovHydro2_gv4); + assign_map.emplace("cim:GovHydro2.gv5", &assign_GovHydro2_gv5); + assign_map.emplace("cim:GovHydro2.gv6", &assign_GovHydro2_gv6); + assign_map.emplace("cim:GovHydro2.kturb", &assign_GovHydro2_kturb); + assign_map.emplace("cim:GovHydro2.mwbase", &assign_GovHydro2_mwbase); + assign_map.emplace("cim:GovHydro2.pgv1", &assign_GovHydro2_pgv1); + assign_map.emplace("cim:GovHydro2.pgv2", &assign_GovHydro2_pgv2); + assign_map.emplace("cim:GovHydro2.pgv3", &assign_GovHydro2_pgv3); + assign_map.emplace("cim:GovHydro2.pgv4", &assign_GovHydro2_pgv4); + assign_map.emplace("cim:GovHydro2.pgv5", &assign_GovHydro2_pgv5); + assign_map.emplace("cim:GovHydro2.pgv6", &assign_GovHydro2_pgv6); + assign_map.emplace("cim:GovHydro2.pmax", &assign_GovHydro2_pmax); + assign_map.emplace("cim:GovHydro2.pmin", &assign_GovHydro2_pmin); + assign_map.emplace("cim:GovHydro2.rperm", &assign_GovHydro2_rperm); + assign_map.emplace("cim:GovHydro2.rtemp", &assign_GovHydro2_rtemp); + assign_map.emplace("cim:GovHydro2.tg", &assign_GovHydro2_tg); + assign_map.emplace("cim:GovHydro2.tp", &assign_GovHydro2_tp); + assign_map.emplace("cim:GovHydro2.tr", &assign_GovHydro2_tr); + assign_map.emplace("cim:GovHydro2.tw", &assign_GovHydro2_tw); + assign_map.emplace("cim:GovHydro2.uc", &assign_GovHydro2_uc); + assign_map.emplace("cim:GovHydro2.uo", &assign_GovHydro2_uo); } void GovHydro2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/GovHydro2.hpp b/CGMES_2.4.15_27JAN2020/GovHydro2.hpp index aaf315aa8..3919c3e7b 100644 --- a/CGMES_2.4.15_27JAN2020/GovHydro2.hpp +++ b/CGMES_2.4.15_27JAN2020/GovHydro2.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE hydro turbine governor model represents plants with straightforward penstock configurations and hydraulic-dashpot governors. - */ + /** \brief IEEE hydro turbine governor model represents plants with straightforward penstock configurations and hydraulic-dashpot governors. */ class GovHydro2 : public TurbineGovernorDynamics { public: @@ -31,35 +29,92 @@ namespace CIMPP GovHydro2(); ~GovHydro2() override; - CIMPP::PU aturb; /* Turbine numerator multiplier (Aturb). Typical Value = -1. Default: nullptr */ - CIMPP::PU bturb; /* Turbine denominator multiplier (Bturb). Typical Value = 0.5. Default: nullptr */ - CIMPP::Frequency db1; /* Intentional deadband width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower db2; /* Unintentional deadband (db2). Unit = MW. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency eps; /* Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::PU gv1; /* Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv6; /* Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU kturb; /* Turbine gain (Kturb). Typical Value = 1. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv6; /* Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU pmax; /* Maximum gate opening (Pmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum gate opening; (). Typical Value = 0. Default: nullptr */ - CIMPP::PU rperm; /* Permanent droop (Rperm). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU rtemp; /* Temporary droop (Rtemp). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tg; /* Gate servo time constant (Tg). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tp; /* Pilot servo valve time constant (Tp). Typical Value = 0.03. Default: nullptr */ - CIMPP::Seconds tr; /* Dashpot time constant (Tr). Typical Value = 12. Default: nullptr */ - CIMPP::Seconds tw; /* Water inertia time constant (Tw). Typical Value = 2. Default: nullptr */ - CIMPP::Simple_Float uc; /* Maximum gate closing velocity (Uc) (<0). Unit = PU/sec. Typical Value = -0.1. Default: nullptr */ - CIMPP::Simple_Float uo; /* Maximum gate opening velocity (Uo). Unit = PU/sec. Typical Value = 0.1. Default: nullptr */ + /** \brief Turbine numerator multiplier (Aturb). Typical Value = -1. Default: nullptr */ + CIMPP::PU aturb; + + /** \brief Turbine denominator multiplier (Bturb). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU bturb; + + /** \brief Intentional deadband width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Unintentional deadband (db2). Unit = MW. Typical Value = 0. Default: nullptr */ + CIMPP::ActivePower db2; + + /** \brief Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency eps; + + /** \brief Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv6; + + /** \brief Turbine gain (Kturb). Typical Value = 1. Default: nullptr */ + CIMPP::PU kturb; + + /** \brief Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv6; + + /** \brief Maximum gate opening (Pmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum gate opening; (). Typical Value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Permanent droop (Rperm). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU rperm; + + /** \brief Temporary droop (Rtemp). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU rtemp; + + /** \brief Gate servo time constant (Tg). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Pilot servo valve time constant (Tp). Typical Value = 0.03. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Dashpot time constant (Tr). Typical Value = 12. Default: nullptr */ + CIMPP::Seconds tr; + + /** \brief Water inertia time constant (Tw). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds tw; + + /** \brief Maximum gate closing velocity (Uc) (<0). Unit = PU/sec. Typical Value = -0.1. Default: nullptr */ + CIMPP::Simple_Float uc; + + /** \brief Maximum gate opening velocity (Uo). Unit = PU/sec. Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float uo; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GovHydro3.cpp b/CGMES_2.4.15_27JAN2020/GovHydro3.cpp index 4e6aeced8..e942b6ea1 100644 --- a/CGMES_2.4.15_27JAN2020/GovHydro3.cpp +++ b/CGMES_2.4.15_27JAN2020/GovHydro3.cpp @@ -8,47 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "Frequency.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "Frequency.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -GovHydro3::GovHydro3() {}; -GovHydro3::~GovHydro3() {}; +GovHydro3::GovHydro3() {} +GovHydro3::~GovHydro3() {} static const std::list PossibleProfilesForClass = { @@ -110,480 +74,514 @@ GovHydro3::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydro3_at(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_at(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->at; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_dturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_dturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_eps(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eps; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_governorControl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_governorControl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->governorControl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_gv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_h0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_h0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->h0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_pgv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_qnl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_qnl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qnl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_relec(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_relec(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->relec; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_rgate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_rgate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rgate; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_tt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_velcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_velcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velcl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_velop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_velop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydro3_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->at; if (!buffer.str().empty()) @@ -597,7 +595,8 @@ bool get_GovHydro3_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -611,7 +610,8 @@ bool get_GovHydro3_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -625,7 +625,8 @@ bool get_GovHydro3_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dturb; if (!buffer.str().empty()) @@ -639,7 +640,8 @@ bool get_GovHydro3_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro3_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eps; if (!buffer.str().empty()) @@ -653,7 +655,8 @@ bool get_GovHydro3_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_governorControl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->governorControl; if (!buffer.str().empty()) @@ -667,7 +670,8 @@ bool get_GovHydro3_governorControl(const BaseClass* BaseClass_ptr1, std::strings bool get_GovHydro3_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -681,7 +685,8 @@ bool get_GovHydro3_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -695,7 +700,8 @@ bool get_GovHydro3_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -709,7 +715,8 @@ bool get_GovHydro3_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -723,7 +730,8 @@ bool get_GovHydro3_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -737,7 +745,8 @@ bool get_GovHydro3_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv6; if (!buffer.str().empty()) @@ -751,7 +760,8 @@ bool get_GovHydro3_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_h0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->h0; if (!buffer.str().empty()) @@ -765,7 +775,8 @@ bool get_GovHydro3_h0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -779,7 +790,8 @@ bool get_GovHydro3_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -793,7 +805,8 @@ bool get_GovHydro3_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -807,7 +820,8 @@ bool get_GovHydro3_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -821,7 +835,8 @@ bool get_GovHydro3_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -835,7 +850,8 @@ bool get_GovHydro3_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydro3_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -849,7 +865,8 @@ bool get_GovHydro3_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro3_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -863,7 +880,8 @@ bool get_GovHydro3_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro3_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -877,7 +895,8 @@ bool get_GovHydro3_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro3_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -891,7 +910,8 @@ bool get_GovHydro3_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro3_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -905,7 +925,8 @@ bool get_GovHydro3_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro3_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv6; if (!buffer.str().empty()) @@ -919,7 +940,8 @@ bool get_GovHydro3_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro3_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -933,7 +955,8 @@ bool get_GovHydro3_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro3_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -947,7 +970,8 @@ bool get_GovHydro3_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro3_qnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qnl; if (!buffer.str().empty()) @@ -961,7 +985,8 @@ bool get_GovHydro3_qnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_relec(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->relec; if (!buffer.str().empty()) @@ -975,7 +1000,8 @@ bool get_GovHydro3_relec(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro3_rgate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rgate; if (!buffer.str().empty()) @@ -989,7 +1015,8 @@ bool get_GovHydro3_rgate(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro3_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -1003,7 +1030,8 @@ bool get_GovHydro3_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -1017,7 +1045,8 @@ bool get_GovHydro3_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -1031,7 +1060,8 @@ bool get_GovHydro3_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tt; if (!buffer.str().empty()) @@ -1045,7 +1075,8 @@ bool get_GovHydro3_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -1059,7 +1090,8 @@ bool get_GovHydro3_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_velcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velcl; if (!buffer.str().empty()) @@ -1073,7 +1105,8 @@ bool get_GovHydro3_velcl(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro3_velop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velop; if (!buffer.str().empty()) @@ -1085,8 +1118,6 @@ bool get_GovHydro3_velop(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } - - const char GovHydro3::debugName[] = "GovHydro3"; const char* GovHydro3::debugString() const { @@ -1095,47 +1126,47 @@ const char* GovHydro3::debugString() const void GovHydro3::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydro3"), &GovHydro3_factory)); + factory_map.emplace("cim:GovHydro3", &GovHydro3_factory); } void GovHydro3::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.at"), &assign_GovHydro3_at)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.db1"), &assign_GovHydro3_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.db2"), &assign_GovHydro3_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.dturb"), &assign_GovHydro3_dturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.eps"), &assign_GovHydro3_eps)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.governorControl"), &assign_GovHydro3_governorControl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.gv1"), &assign_GovHydro3_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.gv2"), &assign_GovHydro3_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.gv3"), &assign_GovHydro3_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.gv4"), &assign_GovHydro3_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.gv5"), &assign_GovHydro3_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.gv6"), &assign_GovHydro3_gv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.h0"), &assign_GovHydro3_h0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.k1"), &assign_GovHydro3_k1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.k2"), &assign_GovHydro3_k2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.kg"), &assign_GovHydro3_kg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.ki"), &assign_GovHydro3_ki)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.mwbase"), &assign_GovHydro3_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.pgv1"), &assign_GovHydro3_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.pgv2"), &assign_GovHydro3_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.pgv3"), &assign_GovHydro3_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.pgv4"), &assign_GovHydro3_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.pgv5"), &assign_GovHydro3_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.pgv6"), &assign_GovHydro3_pgv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.pmax"), &assign_GovHydro3_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.pmin"), &assign_GovHydro3_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.qnl"), &assign_GovHydro3_qnl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.relec"), &assign_GovHydro3_relec)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.rgate"), &assign_GovHydro3_rgate)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.td"), &assign_GovHydro3_td)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.tf"), &assign_GovHydro3_tf)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.tp"), &assign_GovHydro3_tp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.tt"), &assign_GovHydro3_tt)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.tw"), &assign_GovHydro3_tw)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.velcl"), &assign_GovHydro3_velcl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.velop"), &assign_GovHydro3_velop)); + assign_map.emplace("cim:GovHydro3.at", &assign_GovHydro3_at); + assign_map.emplace("cim:GovHydro3.db1", &assign_GovHydro3_db1); + assign_map.emplace("cim:GovHydro3.db2", &assign_GovHydro3_db2); + assign_map.emplace("cim:GovHydro3.dturb", &assign_GovHydro3_dturb); + assign_map.emplace("cim:GovHydro3.eps", &assign_GovHydro3_eps); + assign_map.emplace("cim:GovHydro3.governorControl", &assign_GovHydro3_governorControl); + assign_map.emplace("cim:GovHydro3.gv1", &assign_GovHydro3_gv1); + assign_map.emplace("cim:GovHydro3.gv2", &assign_GovHydro3_gv2); + assign_map.emplace("cim:GovHydro3.gv3", &assign_GovHydro3_gv3); + assign_map.emplace("cim:GovHydro3.gv4", &assign_GovHydro3_gv4); + assign_map.emplace("cim:GovHydro3.gv5", &assign_GovHydro3_gv5); + assign_map.emplace("cim:GovHydro3.gv6", &assign_GovHydro3_gv6); + assign_map.emplace("cim:GovHydro3.h0", &assign_GovHydro3_h0); + assign_map.emplace("cim:GovHydro3.k1", &assign_GovHydro3_k1); + assign_map.emplace("cim:GovHydro3.k2", &assign_GovHydro3_k2); + assign_map.emplace("cim:GovHydro3.kg", &assign_GovHydro3_kg); + assign_map.emplace("cim:GovHydro3.ki", &assign_GovHydro3_ki); + assign_map.emplace("cim:GovHydro3.mwbase", &assign_GovHydro3_mwbase); + assign_map.emplace("cim:GovHydro3.pgv1", &assign_GovHydro3_pgv1); + assign_map.emplace("cim:GovHydro3.pgv2", &assign_GovHydro3_pgv2); + assign_map.emplace("cim:GovHydro3.pgv3", &assign_GovHydro3_pgv3); + assign_map.emplace("cim:GovHydro3.pgv4", &assign_GovHydro3_pgv4); + assign_map.emplace("cim:GovHydro3.pgv5", &assign_GovHydro3_pgv5); + assign_map.emplace("cim:GovHydro3.pgv6", &assign_GovHydro3_pgv6); + assign_map.emplace("cim:GovHydro3.pmax", &assign_GovHydro3_pmax); + assign_map.emplace("cim:GovHydro3.pmin", &assign_GovHydro3_pmin); + assign_map.emplace("cim:GovHydro3.qnl", &assign_GovHydro3_qnl); + assign_map.emplace("cim:GovHydro3.relec", &assign_GovHydro3_relec); + assign_map.emplace("cim:GovHydro3.rgate", &assign_GovHydro3_rgate); + assign_map.emplace("cim:GovHydro3.td", &assign_GovHydro3_td); + assign_map.emplace("cim:GovHydro3.tf", &assign_GovHydro3_tf); + assign_map.emplace("cim:GovHydro3.tp", &assign_GovHydro3_tp); + assign_map.emplace("cim:GovHydro3.tt", &assign_GovHydro3_tt); + assign_map.emplace("cim:GovHydro3.tw", &assign_GovHydro3_tw); + assign_map.emplace("cim:GovHydro3.velcl", &assign_GovHydro3_velcl); + assign_map.emplace("cim:GovHydro3.velop", &assign_GovHydro3_velop); } void GovHydro3::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/GovHydro3.hpp b/CGMES_2.4.15_27JAN2020/GovHydro3.hpp index 8c61cac08..d3e458631 100644 --- a/CGMES_2.4.15_27JAN2020/GovHydro3.hpp +++ b/CGMES_2.4.15_27JAN2020/GovHydro3.hpp @@ -22,9 +22,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE Hydro Governor-Turbine Model. This model differs from that defined in the IEEE modeling guideline paper in that the limits on gate position and velocity do not permit "wind up" of the upstream signals. - */ + /** \brief Modified IEEE Hydro Governor-Turbine Model. This model differs from that defined in the IEEE modeling guideline paper in that the limits on gate position and velocity do not permit "wind up" of the upstream signals. */ class GovHydro3 : public TurbineGovernorDynamics { public: @@ -32,42 +30,113 @@ namespace CIMPP GovHydro3(); ~GovHydro3() override; - CIMPP::PU at; /* Turbine gain (At). Typical Value = 1.2. Default: nullptr */ - CIMPP::Frequency db1; /* Intentional dead-band width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower db2; /* Unintentional dead-band (db2). Unit = MW. Typical Value = 0. Default: nullptr */ - CIMPP::PU dturb; /* Turbine damping factor (Dturb). Typical Value = 0.2. Default: nullptr */ - CIMPP::Frequency eps; /* Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::Boolean governorControl; /* Governor control flag (Cflag). true = PID control is active false = double derivative control is active. Typical Value = true. Default: false */ - CIMPP::PU gv1; /* Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv6; /* Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU h0; /* Turbine nominal head (H0). Typical Value = 1. Default: nullptr */ - CIMPP::PU k1; /* Derivative gain (K1). Typical Value = 0.01. Default: nullptr */ - CIMPP::PU k2; /* Double derivative gain, if Cflag = -1 (K2). Typical Value = 2.5. Default: nullptr */ - CIMPP::PU kg; /* Gate servo gain (Kg). Typical Value = 2. Default: nullptr */ - CIMPP::PU ki; /* Integral gain (Ki). Typical Value = 0.5. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv6; /* Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU pmax; /* Maximum gate opening, PU of MWbase (Pmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum gate opening, PU of MWbase (Pmin). Typical Value = 0. Default: nullptr */ - CIMPP::PU qnl; /* No-load turbine flow at nominal head (Qnl). Typical Value = 0.08. Default: nullptr */ - CIMPP::PU relec; /* Steady-state droop, PU, for electrical power feedback (Relec). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU rgate; /* Steady-state droop, PU, for governor output feedback (Rgate). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds td; /* Input filter time constant (Td). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds tf; /* Washout time constant (Tf). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tp; /* Gate servo time constant (Tp). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds tt; /* Power feedback time constant (Tt). Typical Value = 0.2. Default: nullptr */ - CIMPP::Seconds tw; /* Water inertia time constant (Tw). Typical Value = 1. Default: nullptr */ - CIMPP::Simple_Float velcl; /* Maximum gate closing velocity (Velcl). Unit = PU/sec. Typical Value = -0.2. Default: nullptr */ - CIMPP::Simple_Float velop; /* Maximum gate opening velocity (Velop). Unit = PU/sec. Typical Value = 0.2. Default: nullptr */ + /** \brief Turbine gain (At). Typical Value = 1.2. Default: nullptr */ + CIMPP::PU at; + + /** \brief Intentional dead-band width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Unintentional dead-band (db2). Unit = MW. Typical Value = 0. Default: nullptr */ + CIMPP::ActivePower db2; + + /** \brief Turbine damping factor (Dturb). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU dturb; + + /** \brief Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency eps; + + /** \brief Governor control flag (Cflag). true = PID control is active false = double derivative control is active. Typical Value = true. Default: false */ + CIMPP::Boolean governorControl; + + /** \brief Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv6; + + /** \brief Turbine nominal head (H0). Typical Value = 1. Default: nullptr */ + CIMPP::PU h0; + + /** \brief Derivative gain (K1). Typical Value = 0.01. Default: nullptr */ + CIMPP::PU k1; + + /** \brief Double derivative gain, if Cflag = -1 (K2). Typical Value = 2.5. Default: nullptr */ + CIMPP::PU k2; + + /** \brief Gate servo gain (Kg). Typical Value = 2. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Integral gain (Ki). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv6; + + /** \brief Maximum gate opening, PU of MWbase (Pmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum gate opening, PU of MWbase (Pmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief No-load turbine flow at nominal head (Qnl). Typical Value = 0.08. Default: nullptr */ + CIMPP::PU qnl; + + /** \brief Steady-state droop, PU, for electrical power feedback (Relec). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU relec; + + /** \brief Steady-state droop, PU, for governor output feedback (Rgate). Typical Value = 0. Default: nullptr */ + CIMPP::PU rgate; + + /** \brief Input filter time constant (Td). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Washout time constant (Tf). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Gate servo time constant (Tp). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Power feedback time constant (Tt). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds tt; + + /** \brief Water inertia time constant (Tw). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tw; + + /** \brief Maximum gate closing velocity (Velcl). Unit = PU/sec. Typical Value = -0.2. Default: nullptr */ + CIMPP::Simple_Float velcl; + + /** \brief Maximum gate opening velocity (Velop). Unit = PU/sec. Typical Value = 0.2. Default: nullptr */ + CIMPP::Simple_Float velop; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GovHydro4.cpp b/CGMES_2.4.15_27JAN2020/GovHydro4.cpp index 0480e892e..4a841df9c 100644 --- a/CGMES_2.4.15_27JAN2020/GovHydro4.cpp +++ b/CGMES_2.4.15_27JAN2020/GovHydro4.cpp @@ -8,49 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Frequency.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "Frequency.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -GovHydro4::GovHydro4() {}; -GovHydro4::~GovHydro4() {}; +GovHydro4::GovHydro4() {} +GovHydro4::~GovHydro4() {} static const std::list PossibleProfilesForClass = { @@ -114,506 +76,542 @@ GovHydro4::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydro4_at(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_at(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->at; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_bgv0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_bgv0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bgv0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_bgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_bgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_bgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_bgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_bgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_bgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_bgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_bgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_bgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_bgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_bmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_bmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_dturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_dturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_eps(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eps; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_gmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_gmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_gmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_gmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_gv0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_gv0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_hdam(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_hdam(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->hdam; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_pgv0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_pgv0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_qn1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_qn1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qn1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_rperm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_rperm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rperm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_rtemp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_rtemp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rtemp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_tblade(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_tblade(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tblade; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_uc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_uo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_uo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydro4_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->at; if (!buffer.str().empty()) @@ -627,7 +625,8 @@ bool get_GovHydro4_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro4_bgv0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bgv0; if (!buffer.str().empty()) @@ -641,7 +640,8 @@ bool get_GovHydro4_bgv0(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_bgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bgv1; if (!buffer.str().empty()) @@ -655,7 +655,8 @@ bool get_GovHydro4_bgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_bgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bgv2; if (!buffer.str().empty()) @@ -669,7 +670,8 @@ bool get_GovHydro4_bgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_bgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bgv3; if (!buffer.str().empty()) @@ -683,7 +685,8 @@ bool get_GovHydro4_bgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_bgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bgv4; if (!buffer.str().empty()) @@ -697,7 +700,8 @@ bool get_GovHydro4_bgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_bgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bgv5; if (!buffer.str().empty()) @@ -711,7 +715,8 @@ bool get_GovHydro4_bgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_bmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bmax; if (!buffer.str().empty()) @@ -725,7 +730,8 @@ bool get_GovHydro4_bmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -739,7 +745,8 @@ bool get_GovHydro4_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -753,7 +760,8 @@ bool get_GovHydro4_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dturb; if (!buffer.str().empty()) @@ -767,7 +775,8 @@ bool get_GovHydro4_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro4_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eps; if (!buffer.str().empty()) @@ -781,7 +790,8 @@ bool get_GovHydro4_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmax; if (!buffer.str().empty()) @@ -795,7 +805,8 @@ bool get_GovHydro4_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmin; if (!buffer.str().empty()) @@ -809,7 +820,8 @@ bool get_GovHydro4_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_gv0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv0; if (!buffer.str().empty()) @@ -823,7 +835,8 @@ bool get_GovHydro4_gv0(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -837,7 +850,8 @@ bool get_GovHydro4_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -851,7 +865,8 @@ bool get_GovHydro4_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -865,7 +880,8 @@ bool get_GovHydro4_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -879,7 +895,8 @@ bool get_GovHydro4_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -893,7 +910,8 @@ bool get_GovHydro4_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_hdam(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hdam; if (!buffer.str().empty()) @@ -907,7 +925,8 @@ bool get_GovHydro4_hdam(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -921,7 +940,8 @@ bool get_GovHydro4_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydro4_pgv0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv0; if (!buffer.str().empty()) @@ -935,7 +955,8 @@ bool get_GovHydro4_pgv0(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -949,7 +970,8 @@ bool get_GovHydro4_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -963,7 +985,8 @@ bool get_GovHydro4_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -977,7 +1000,8 @@ bool get_GovHydro4_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -991,7 +1015,8 @@ bool get_GovHydro4_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -1005,7 +1030,8 @@ bool get_GovHydro4_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_qn1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qn1; if (!buffer.str().empty()) @@ -1019,7 +1045,8 @@ bool get_GovHydro4_qn1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rperm; if (!buffer.str().empty()) @@ -1033,7 +1060,8 @@ bool get_GovHydro4_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro4_rtemp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rtemp; if (!buffer.str().empty()) @@ -1047,7 +1075,8 @@ bool get_GovHydro4_rtemp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro4_tblade(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tblade; if (!buffer.str().empty()) @@ -1061,7 +1090,8 @@ bool get_GovHydro4_tblade(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydro4_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -1075,7 +1105,8 @@ bool get_GovHydro4_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro4_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -1089,7 +1120,8 @@ bool get_GovHydro4_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro4_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -1103,7 +1135,8 @@ bool get_GovHydro4_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro4_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -1117,7 +1150,8 @@ bool get_GovHydro4_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro4_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uc; if (!buffer.str().empty()) @@ -1131,7 +1165,8 @@ bool get_GovHydro4_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro4_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uo; if (!buffer.str().empty()) @@ -1143,8 +1178,6 @@ bool get_GovHydro4_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char GovHydro4::debugName[] = "GovHydro4"; const char* GovHydro4::debugString() const { @@ -1153,49 +1186,49 @@ const char* GovHydro4::debugString() const void GovHydro4::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydro4"), &GovHydro4_factory)); + factory_map.emplace("cim:GovHydro4", &GovHydro4_factory); } void GovHydro4::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.at"), &assign_GovHydro4_at)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.bgv0"), &assign_GovHydro4_bgv0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.bgv1"), &assign_GovHydro4_bgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.bgv2"), &assign_GovHydro4_bgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.bgv3"), &assign_GovHydro4_bgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.bgv4"), &assign_GovHydro4_bgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.bgv5"), &assign_GovHydro4_bgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.bmax"), &assign_GovHydro4_bmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.db1"), &assign_GovHydro4_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.db2"), &assign_GovHydro4_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.dturb"), &assign_GovHydro4_dturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.eps"), &assign_GovHydro4_eps)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.gmax"), &assign_GovHydro4_gmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.gmin"), &assign_GovHydro4_gmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.gv0"), &assign_GovHydro4_gv0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.gv1"), &assign_GovHydro4_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.gv2"), &assign_GovHydro4_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.gv3"), &assign_GovHydro4_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.gv4"), &assign_GovHydro4_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.gv5"), &assign_GovHydro4_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.hdam"), &assign_GovHydro4_hdam)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.mwbase"), &assign_GovHydro4_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.pgv0"), &assign_GovHydro4_pgv0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.pgv1"), &assign_GovHydro4_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.pgv2"), &assign_GovHydro4_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.pgv3"), &assign_GovHydro4_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.pgv4"), &assign_GovHydro4_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.pgv5"), &assign_GovHydro4_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.qn1"), &assign_GovHydro4_qn1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.rperm"), &assign_GovHydro4_rperm)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.rtemp"), &assign_GovHydro4_rtemp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.tblade"), &assign_GovHydro4_tblade)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.tg"), &assign_GovHydro4_tg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.tp"), &assign_GovHydro4_tp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.tr"), &assign_GovHydro4_tr)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.tw"), &assign_GovHydro4_tw)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.uc"), &assign_GovHydro4_uc)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.uo"), &assign_GovHydro4_uo)); + assign_map.emplace("cim:GovHydro4.at", &assign_GovHydro4_at); + assign_map.emplace("cim:GovHydro4.bgv0", &assign_GovHydro4_bgv0); + assign_map.emplace("cim:GovHydro4.bgv1", &assign_GovHydro4_bgv1); + assign_map.emplace("cim:GovHydro4.bgv2", &assign_GovHydro4_bgv2); + assign_map.emplace("cim:GovHydro4.bgv3", &assign_GovHydro4_bgv3); + assign_map.emplace("cim:GovHydro4.bgv4", &assign_GovHydro4_bgv4); + assign_map.emplace("cim:GovHydro4.bgv5", &assign_GovHydro4_bgv5); + assign_map.emplace("cim:GovHydro4.bmax", &assign_GovHydro4_bmax); + assign_map.emplace("cim:GovHydro4.db1", &assign_GovHydro4_db1); + assign_map.emplace("cim:GovHydro4.db2", &assign_GovHydro4_db2); + assign_map.emplace("cim:GovHydro4.dturb", &assign_GovHydro4_dturb); + assign_map.emplace("cim:GovHydro4.eps", &assign_GovHydro4_eps); + assign_map.emplace("cim:GovHydro4.gmax", &assign_GovHydro4_gmax); + assign_map.emplace("cim:GovHydro4.gmin", &assign_GovHydro4_gmin); + assign_map.emplace("cim:GovHydro4.gv0", &assign_GovHydro4_gv0); + assign_map.emplace("cim:GovHydro4.gv1", &assign_GovHydro4_gv1); + assign_map.emplace("cim:GovHydro4.gv2", &assign_GovHydro4_gv2); + assign_map.emplace("cim:GovHydro4.gv3", &assign_GovHydro4_gv3); + assign_map.emplace("cim:GovHydro4.gv4", &assign_GovHydro4_gv4); + assign_map.emplace("cim:GovHydro4.gv5", &assign_GovHydro4_gv5); + assign_map.emplace("cim:GovHydro4.hdam", &assign_GovHydro4_hdam); + assign_map.emplace("cim:GovHydro4.mwbase", &assign_GovHydro4_mwbase); + assign_map.emplace("cim:GovHydro4.pgv0", &assign_GovHydro4_pgv0); + assign_map.emplace("cim:GovHydro4.pgv1", &assign_GovHydro4_pgv1); + assign_map.emplace("cim:GovHydro4.pgv2", &assign_GovHydro4_pgv2); + assign_map.emplace("cim:GovHydro4.pgv3", &assign_GovHydro4_pgv3); + assign_map.emplace("cim:GovHydro4.pgv4", &assign_GovHydro4_pgv4); + assign_map.emplace("cim:GovHydro4.pgv5", &assign_GovHydro4_pgv5); + assign_map.emplace("cim:GovHydro4.qn1", &assign_GovHydro4_qn1); + assign_map.emplace("cim:GovHydro4.rperm", &assign_GovHydro4_rperm); + assign_map.emplace("cim:GovHydro4.rtemp", &assign_GovHydro4_rtemp); + assign_map.emplace("cim:GovHydro4.tblade", &assign_GovHydro4_tblade); + assign_map.emplace("cim:GovHydro4.tg", &assign_GovHydro4_tg); + assign_map.emplace("cim:GovHydro4.tp", &assign_GovHydro4_tp); + assign_map.emplace("cim:GovHydro4.tr", &assign_GovHydro4_tr); + assign_map.emplace("cim:GovHydro4.tw", &assign_GovHydro4_tw); + assign_map.emplace("cim:GovHydro4.uc", &assign_GovHydro4_uc); + assign_map.emplace("cim:GovHydro4.uo", &assign_GovHydro4_uo); } void GovHydro4::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/GovHydro4.hpp b/CGMES_2.4.15_27JAN2020/GovHydro4.hpp index cb020cb0a..f5165645e 100644 --- a/CGMES_2.4.15_27JAN2020/GovHydro4.hpp +++ b/CGMES_2.4.15_27JAN2020/GovHydro4.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Hydro turbine and governor. Represents plants with straight-forward penstock configurations and hydraulic governors of traditional 'dashpot' type. This model can be used to represent simple, Francis, Pelton or Kaplan turbines. - */ + /** \brief Hydro turbine and governor. Represents plants with straight-forward penstock configurations and hydraulic governors of traditional 'dashpot' type. This model can be used to represent simple, Francis, Pelton or Kaplan turbines. */ class GovHydro4 : public TurbineGovernorDynamics { public: @@ -31,44 +29,119 @@ namespace CIMPP GovHydro4(); ~GovHydro4() override; - CIMPP::PU at; /* Turbine gain (At). Typical Value = 1.2. Default: nullptr */ - CIMPP::PU bgv0; /* Kaplan blade servo point 0 (Bgv0). Typical Value = 0. Default: nullptr */ - CIMPP::PU bgv1; /* Kaplan blade servo point 1 (Bgv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU bgv2; /* Kaplan blade servo point 2 (Bgv2). Typical Value = 0. Typical Value Francis = 0, Kaplan = 0.1. Default: nullptr */ - CIMPP::PU bgv3; /* Kaplan blade servo point 3 (Bgv3). Typical Value = 0. Typical Value Francis = 0, Kaplan = 0.667. Default: nullptr */ - CIMPP::PU bgv4; /* Kaplan blade servo point 4 (Bgv4). Typical Value = 0. Typical Value Francis = 0, Kaplan = 0.9. Default: nullptr */ - CIMPP::PU bgv5; /* Kaplan blade servo point 5 (Bgv5). Typical Value = 0. Typical Value Francis = 0, Kaplan = 1. Default: nullptr */ - CIMPP::Simple_Float bmax; /* Maximum blade adjustment factor (Bmax). Typical Value = 0. Typical Value Francis = 0, Kaplan = 1.1276. Default: nullptr */ - CIMPP::Frequency db1; /* Intentional deadband width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower db2; /* Unintentional dead-band (db2). Unit = MW. Typical Value = 0. Default: nullptr */ - CIMPP::PU dturb; /* Turbine damping factor (Dturb). Unit = delta P (PU of MWbase) / delta speed (PU). Typical Value = 0.5. Typical Value Francis = 1.1, Kaplan = 1.1. Default: nullptr */ - CIMPP::Frequency eps; /* Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::PU gmax; /* Maximum gate opening, PU of MWbase (Gmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU gmin; /* Minimum gate opening, PU of MWbase (Gmin). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv0; /* Nonlinear gain point 0, PU gv (Gv0). Typical Value = 0. Typical Value Francis = 0.1, Kaplan = 0.1. Default: nullptr */ - CIMPP::PU gv1; /* Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Typical Value Francis = 0.4, Kaplan = 0.4. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Typical Value Francis = 0.5, Kaplan = 0.5. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Typical Value Francis = 0.7, Kaplan = 0.7. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Typical Value Francis = 0.8, Kaplan = 0.8. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Typical Value Francis = 0.9, Kaplan = 0.9. Default: nullptr */ - CIMPP::PU hdam; /* Head available at dam (hdam). Typical Value = 1. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv0; /* Nonlinear gain point 0, PU power (Pgv0). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Typical Value Francis = 0.42, Kaplan = 0.35. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Typical Value Francis = 0.56, Kaplan = 0.468. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Typical Value Francis = 0.8, Kaplan = 0.796. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Typical Value Francis = 0.9, Kaplan = 0.917. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Typical Value Francis = 0.97, Kaplan = 0.99. Default: nullptr */ - CIMPP::PU qn1; /* No-load flow at nominal head (Qnl). Typical Value = 0.08. Typical Value Francis = 0, Kaplan = 0. Default: nullptr */ - CIMPP::Seconds rperm; /* Permanent droop (Rperm). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds rtemp; /* Temporary droop (Rtemp). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds tblade; /* Blade servo time constant (Tblade). Typical Value = 100. Default: nullptr */ - CIMPP::Seconds tg; /* Gate servo time constant (Tg) (>0). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tp; /* Pilot servo time constant (Tp). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tr; /* Dashpot time constant (Tr) (>0). Typical Value = 5. Default: nullptr */ - CIMPP::Seconds tw; /* Water inertia time constant (Tw) (>0). Typical Value = 1. Default: nullptr */ - CIMPP::Simple_Float uc; /* Max gate closing velocity (Uc). Typical Value = 0.2. Default: nullptr */ - CIMPP::Simple_Float uo; /* Max gate opening velocity (Uo). Typical Vlaue = 0.2. Default: nullptr */ + /** \brief Turbine gain (At). Typical Value = 1.2. Default: nullptr */ + CIMPP::PU at; + + /** \brief Kaplan blade servo point 0 (Bgv0). Typical Value = 0. Default: nullptr */ + CIMPP::PU bgv0; + + /** \brief Kaplan blade servo point 1 (Bgv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU bgv1; + + /** \brief Kaplan blade servo point 2 (Bgv2). Typical Value = 0. Typical Value Francis = 0, Kaplan = 0.1. Default: nullptr */ + CIMPP::PU bgv2; + + /** \brief Kaplan blade servo point 3 (Bgv3). Typical Value = 0. Typical Value Francis = 0, Kaplan = 0.667. Default: nullptr */ + CIMPP::PU bgv3; + + /** \brief Kaplan blade servo point 4 (Bgv4). Typical Value = 0. Typical Value Francis = 0, Kaplan = 0.9. Default: nullptr */ + CIMPP::PU bgv4; + + /** \brief Kaplan blade servo point 5 (Bgv5). Typical Value = 0. Typical Value Francis = 0, Kaplan = 1. Default: nullptr */ + CIMPP::PU bgv5; + + /** \brief Maximum blade adjustment factor (Bmax). Typical Value = 0. Typical Value Francis = 0, Kaplan = 1.1276. Default: nullptr */ + CIMPP::Simple_Float bmax; + + /** \brief Intentional deadband width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Unintentional dead-band (db2). Unit = MW. Typical Value = 0. Default: nullptr */ + CIMPP::ActivePower db2; + + /** \brief Turbine damping factor (Dturb). Unit = delta P (PU of MWbase) / delta speed (PU). Typical Value = 0.5. Typical Value Francis = 1.1, Kaplan = 1.1. Default: nullptr */ + CIMPP::PU dturb; + + /** \brief Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency eps; + + /** \brief Maximum gate opening, PU of MWbase (Gmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU gmax; + + /** \brief Minimum gate opening, PU of MWbase (Gmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU gmin; + + /** \brief Nonlinear gain point 0, PU gv (Gv0). Typical Value = 0. Typical Value Francis = 0.1, Kaplan = 0.1. Default: nullptr */ + CIMPP::PU gv0; + + /** \brief Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Typical Value Francis = 0.4, Kaplan = 0.4. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Typical Value Francis = 0.5, Kaplan = 0.5. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Typical Value Francis = 0.7, Kaplan = 0.7. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Typical Value Francis = 0.8, Kaplan = 0.8. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Typical Value Francis = 0.9, Kaplan = 0.9. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Head available at dam (hdam). Typical Value = 1. Default: nullptr */ + CIMPP::PU hdam; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain point 0, PU power (Pgv0). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv0; + + /** \brief Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Typical Value Francis = 0.42, Kaplan = 0.35. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Typical Value Francis = 0.56, Kaplan = 0.468. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Typical Value Francis = 0.8, Kaplan = 0.796. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Typical Value Francis = 0.9, Kaplan = 0.917. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Typical Value Francis = 0.97, Kaplan = 0.99. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief No-load flow at nominal head (Qnl). Typical Value = 0.08. Typical Value Francis = 0, Kaplan = 0. Default: nullptr */ + CIMPP::PU qn1; + + /** \brief Permanent droop (Rperm). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds rperm; + + /** \brief Temporary droop (Rtemp). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds rtemp; + + /** \brief Blade servo time constant (Tblade). Typical Value = 100. Default: nullptr */ + CIMPP::Seconds tblade; + + /** \brief Gate servo time constant (Tg) (>0). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Pilot servo time constant (Tp). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Dashpot time constant (Tr) (>0). Typical Value = 5. Default: nullptr */ + CIMPP::Seconds tr; + + /** \brief Water inertia time constant (Tw) (>0). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tw; + + /** \brief Max gate closing velocity (Uc). Typical Value = 0.2. Default: nullptr */ + CIMPP::Simple_Float uc; + + /** \brief Max gate opening velocity (Uo). Typical Vlaue = 0.2. Default: nullptr */ + CIMPP::Simple_Float uo; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GovHydroDD.cpp b/CGMES_2.4.15_27JAN2020/GovHydroDD.cpp index f4baf7592..c7efe476c 100644 --- a/CGMES_2.4.15_27JAN2020/GovHydroDD.cpp +++ b/CGMES_2.4.15_27JAN2020/GovHydroDD.cpp @@ -8,46 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Frequency.hpp" -#include "ActivePower.hpp" -#include "Frequency.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -GovHydroDD::GovHydroDD() {}; -GovHydroDD::~GovHydroDD() {}; +GovHydroDD::GovHydroDD() {} +GovHydroDD::~GovHydroDD() {} static const std::list PossibleProfilesForClass = { @@ -108,467 +73,500 @@ GovHydroDD::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroDD_aturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_aturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->aturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_bturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_bturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_eps(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eps; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_gmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_gmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_gmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_gmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_gv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_inputSignal(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_inputSignal(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_pgv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_tt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_tturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_tturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_velcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_velcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velcl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_velop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_velop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroDD_aturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->aturb; if (!buffer.str().empty()) @@ -582,7 +580,8 @@ bool get_GovHydroDD_aturb(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroDD_bturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bturb; if (!buffer.str().empty()) @@ -596,7 +595,8 @@ bool get_GovHydroDD_bturb(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroDD_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -610,7 +610,8 @@ bool get_GovHydroDD_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroDD_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -624,7 +625,8 @@ bool get_GovHydroDD_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroDD_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eps; if (!buffer.str().empty()) @@ -638,7 +640,8 @@ bool get_GovHydroDD_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroDD_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmax; if (!buffer.str().empty()) @@ -652,7 +655,8 @@ bool get_GovHydroDD_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmin; if (!buffer.str().empty()) @@ -666,7 +670,8 @@ bool get_GovHydroDD_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -680,7 +685,8 @@ bool get_GovHydroDD_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroDD_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -694,7 +700,8 @@ bool get_GovHydroDD_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroDD_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -708,7 +715,8 @@ bool get_GovHydroDD_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroDD_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -722,7 +730,8 @@ bool get_GovHydroDD_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroDD_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -736,7 +745,8 @@ bool get_GovHydroDD_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroDD_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv6; if (!buffer.str().empty()) @@ -750,7 +760,8 @@ bool get_GovHydroDD_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroDD_inputSignal(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inputSignal; if (!buffer.str().empty()) @@ -764,7 +775,8 @@ bool get_GovHydroDD_inputSignal(const BaseClass* BaseClass_ptr1, std::stringstre bool get_GovHydroDD_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -778,7 +790,8 @@ bool get_GovHydroDD_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroDD_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -792,7 +805,8 @@ bool get_GovHydroDD_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroDD_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -806,7 +820,8 @@ bool get_GovHydroDD_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroDD_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -820,7 +835,8 @@ bool get_GovHydroDD_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroDD_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -834,7 +850,8 @@ bool get_GovHydroDD_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroDD_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -848,7 +865,8 @@ bool get_GovHydroDD_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -862,7 +880,8 @@ bool get_GovHydroDD_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -876,7 +895,8 @@ bool get_GovHydroDD_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -890,7 +910,8 @@ bool get_GovHydroDD_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -904,7 +925,8 @@ bool get_GovHydroDD_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv6; if (!buffer.str().empty()) @@ -918,7 +940,8 @@ bool get_GovHydroDD_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -932,7 +955,8 @@ bool get_GovHydroDD_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -946,7 +970,8 @@ bool get_GovHydroDD_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -960,7 +985,8 @@ bool get_GovHydroDD_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroDD_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -974,7 +1000,8 @@ bool get_GovHydroDD_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroDD_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -988,7 +1015,8 @@ bool get_GovHydroDD_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroDD_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -1002,7 +1030,8 @@ bool get_GovHydroDD_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroDD_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tt; if (!buffer.str().empty()) @@ -1016,7 +1045,8 @@ bool get_GovHydroDD_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroDD_tturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tturb; if (!buffer.str().empty()) @@ -1030,7 +1060,8 @@ bool get_GovHydroDD_tturb(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroDD_velcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velcl; if (!buffer.str().empty()) @@ -1044,7 +1075,8 @@ bool get_GovHydroDD_velcl(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroDD_velop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velop; if (!buffer.str().empty()) @@ -1056,8 +1088,6 @@ bool get_GovHydroDD_velop(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char GovHydroDD::debugName[] = "GovHydroDD"; const char* GovHydroDD::debugString() const { @@ -1066,46 +1096,46 @@ const char* GovHydroDD::debugString() const void GovHydroDD::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroDD"), &GovHydroDD_factory)); + factory_map.emplace("cim:GovHydroDD", &GovHydroDD_factory); } void GovHydroDD::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.aturb"), &assign_GovHydroDD_aturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.bturb"), &assign_GovHydroDD_bturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.db1"), &assign_GovHydroDD_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.db2"), &assign_GovHydroDD_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.eps"), &assign_GovHydroDD_eps)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.gmax"), &assign_GovHydroDD_gmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.gmin"), &assign_GovHydroDD_gmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.gv1"), &assign_GovHydroDD_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.gv2"), &assign_GovHydroDD_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.gv3"), &assign_GovHydroDD_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.gv4"), &assign_GovHydroDD_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.gv5"), &assign_GovHydroDD_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.gv6"), &assign_GovHydroDD_gv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.inputSignal"), &assign_GovHydroDD_inputSignal)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.k1"), &assign_GovHydroDD_k1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.k2"), &assign_GovHydroDD_k2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.kg"), &assign_GovHydroDD_kg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.ki"), &assign_GovHydroDD_ki)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.mwbase"), &assign_GovHydroDD_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.pgv1"), &assign_GovHydroDD_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.pgv2"), &assign_GovHydroDD_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.pgv3"), &assign_GovHydroDD_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.pgv4"), &assign_GovHydroDD_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.pgv5"), &assign_GovHydroDD_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.pgv6"), &assign_GovHydroDD_pgv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.pmax"), &assign_GovHydroDD_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.pmin"), &assign_GovHydroDD_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.r"), &assign_GovHydroDD_r)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.td"), &assign_GovHydroDD_td)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.tf"), &assign_GovHydroDD_tf)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.tp"), &assign_GovHydroDD_tp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.tt"), &assign_GovHydroDD_tt)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.tturb"), &assign_GovHydroDD_tturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.velcl"), &assign_GovHydroDD_velcl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.velop"), &assign_GovHydroDD_velop)); + assign_map.emplace("cim:GovHydroDD.aturb", &assign_GovHydroDD_aturb); + assign_map.emplace("cim:GovHydroDD.bturb", &assign_GovHydroDD_bturb); + assign_map.emplace("cim:GovHydroDD.db1", &assign_GovHydroDD_db1); + assign_map.emplace("cim:GovHydroDD.db2", &assign_GovHydroDD_db2); + assign_map.emplace("cim:GovHydroDD.eps", &assign_GovHydroDD_eps); + assign_map.emplace("cim:GovHydroDD.gmax", &assign_GovHydroDD_gmax); + assign_map.emplace("cim:GovHydroDD.gmin", &assign_GovHydroDD_gmin); + assign_map.emplace("cim:GovHydroDD.gv1", &assign_GovHydroDD_gv1); + assign_map.emplace("cim:GovHydroDD.gv2", &assign_GovHydroDD_gv2); + assign_map.emplace("cim:GovHydroDD.gv3", &assign_GovHydroDD_gv3); + assign_map.emplace("cim:GovHydroDD.gv4", &assign_GovHydroDD_gv4); + assign_map.emplace("cim:GovHydroDD.gv5", &assign_GovHydroDD_gv5); + assign_map.emplace("cim:GovHydroDD.gv6", &assign_GovHydroDD_gv6); + assign_map.emplace("cim:GovHydroDD.inputSignal", &assign_GovHydroDD_inputSignal); + assign_map.emplace("cim:GovHydroDD.k1", &assign_GovHydroDD_k1); + assign_map.emplace("cim:GovHydroDD.k2", &assign_GovHydroDD_k2); + assign_map.emplace("cim:GovHydroDD.kg", &assign_GovHydroDD_kg); + assign_map.emplace("cim:GovHydroDD.ki", &assign_GovHydroDD_ki); + assign_map.emplace("cim:GovHydroDD.mwbase", &assign_GovHydroDD_mwbase); + assign_map.emplace("cim:GovHydroDD.pgv1", &assign_GovHydroDD_pgv1); + assign_map.emplace("cim:GovHydroDD.pgv2", &assign_GovHydroDD_pgv2); + assign_map.emplace("cim:GovHydroDD.pgv3", &assign_GovHydroDD_pgv3); + assign_map.emplace("cim:GovHydroDD.pgv4", &assign_GovHydroDD_pgv4); + assign_map.emplace("cim:GovHydroDD.pgv5", &assign_GovHydroDD_pgv5); + assign_map.emplace("cim:GovHydroDD.pgv6", &assign_GovHydroDD_pgv6); + assign_map.emplace("cim:GovHydroDD.pmax", &assign_GovHydroDD_pmax); + assign_map.emplace("cim:GovHydroDD.pmin", &assign_GovHydroDD_pmin); + assign_map.emplace("cim:GovHydroDD.r", &assign_GovHydroDD_r); + assign_map.emplace("cim:GovHydroDD.td", &assign_GovHydroDD_td); + assign_map.emplace("cim:GovHydroDD.tf", &assign_GovHydroDD_tf); + assign_map.emplace("cim:GovHydroDD.tp", &assign_GovHydroDD_tp); + assign_map.emplace("cim:GovHydroDD.tt", &assign_GovHydroDD_tt); + assign_map.emplace("cim:GovHydroDD.tturb", &assign_GovHydroDD_tturb); + assign_map.emplace("cim:GovHydroDD.velcl", &assign_GovHydroDD_velcl); + assign_map.emplace("cim:GovHydroDD.velop", &assign_GovHydroDD_velop); } void GovHydroDD::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/GovHydroDD.hpp b/CGMES_2.4.15_27JAN2020/GovHydroDD.hpp index 67bc201c8..cca2ca2c0 100644 --- a/CGMES_2.4.15_27JAN2020/GovHydroDD.hpp +++ b/CGMES_2.4.15_27JAN2020/GovHydroDD.hpp @@ -22,9 +22,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Double derivative hydro governor and turbine. - */ + /** \brief Double derivative hydro governor and turbine. */ class GovHydroDD : public TurbineGovernorDynamics { public: @@ -32,41 +30,110 @@ namespace CIMPP GovHydroDD(); ~GovHydroDD() override; - CIMPP::PU aturb; /* Turbine numerator multiplier (Aturb) (note 3). Typical Value = -1. Default: nullptr */ - CIMPP::PU bturb; /* Turbine denominator multiplier (Bturb) (note 3). Typical Value = 0.5. Default: nullptr */ - CIMPP::Frequency db1; /* Intentional dead-band width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower db2; /* Unintentional dead-band (db2). Unit = MW. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency eps; /* Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::PU gmax; /* Maximum gate opening (Gmax). Typical Value = 0. Default: nullptr */ - CIMPP::PU gmin; /* Minimum gate opening (Gmin). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv1; /* Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv6; /* Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ - CIMPP::Boolean inputSignal; /* Input signal switch (Flag). true = Pe input is used false = feedback is received from CV. Flag is normally dependent on Tt. If Tf is zero, Flag is set to false. If Tf is not zero, Flag is set to true. Typical Value = true. Default: false */ - CIMPP::PU k1; /* Single derivative gain (K1). Typical Value = 3.6. Default: nullptr */ - CIMPP::PU k2; /* Double derivative gain (K2). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU kg; /* Gate servo gain (Kg). Typical Value = 3. Default: nullptr */ - CIMPP::PU ki; /* Integral gain (Ki). Typical Value = 1. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv6; /* Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU pmax; /* Maximum gate opening, PU of MWbase (Pmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum gate opening, PU of MWbase (Pmin). Typical Value = 0. Default: nullptr */ - CIMPP::PU r; /* Steady state droop (R). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds td; /* Input filter time constant (Td). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tf; /* Washout time constant (Tf). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tp; /* Gate servo time constant (Tp). Typical Value = 0.35. Default: nullptr */ - CIMPP::Seconds tt; /* Power feedback time constant (Tt). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds tturb; /* Turbine time constant (Tturb) (note 3). Typical Value = 0.8. Default: nullptr */ - CIMPP::Simple_Float velcl; /* Maximum gate closing velocity (Velcl). Unit = PU/sec. Typical Value = -0.14. Default: nullptr */ - CIMPP::Simple_Float velop; /* Maximum gate opening velocity (Velop). Unit = PU/sec. Typical Value = 0.09. Default: nullptr */ + /** \brief Turbine numerator multiplier (Aturb) (note 3). Typical Value = -1. Default: nullptr */ + CIMPP::PU aturb; + + /** \brief Turbine denominator multiplier (Bturb) (note 3). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU bturb; + + /** \brief Intentional dead-band width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Unintentional dead-band (db2). Unit = MW. Typical Value = 0. Default: nullptr */ + CIMPP::ActivePower db2; + + /** \brief Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency eps; + + /** \brief Maximum gate opening (Gmax). Typical Value = 0. Default: nullptr */ + CIMPP::PU gmax; + + /** \brief Minimum gate opening (Gmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU gmin; + + /** \brief Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv6; + + /** \brief Input signal switch (Flag). true = Pe input is used false = feedback is received from CV. Flag is normally dependent on Tt. If Tf is zero, Flag is set to false. If Tf is not zero, Flag is set to true. Typical Value = true. Default: false */ + CIMPP::Boolean inputSignal; + + /** \brief Single derivative gain (K1). Typical Value = 3.6. Default: nullptr */ + CIMPP::PU k1; + + /** \brief Double derivative gain (K2). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU k2; + + /** \brief Gate servo gain (Kg). Typical Value = 3. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Integral gain (Ki). Typical Value = 1. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv6; + + /** \brief Maximum gate opening, PU of MWbase (Pmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum gate opening, PU of MWbase (Pmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Steady state droop (R). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU r; + + /** \brief Input filter time constant (Td). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Washout time constant (Tf). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Gate servo time constant (Tp). Typical Value = 0.35. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Power feedback time constant (Tt). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds tt; + + /** \brief Turbine time constant (Tturb) (note 3). Typical Value = 0.8. Default: nullptr */ + CIMPP::Seconds tturb; + + /** \brief Maximum gate closing velocity (Velcl). Unit = PU/sec. Typical Value = -0.14. Default: nullptr */ + CIMPP::Simple_Float velcl; + + /** \brief Maximum gate opening velocity (Velop). Unit = PU/sec. Typical Value = 0.09. Default: nullptr */ + CIMPP::Simple_Float velop; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GovHydroFrancis.cpp b/CGMES_2.4.15_27JAN2020/GovHydroFrancis.cpp index ea80c6b88..92cca504b 100644 --- a/CGMES_2.4.15_27JAN2020/GovHydroFrancis.cpp +++ b/CGMES_2.4.15_27JAN2020/GovHydroFrancis.cpp @@ -8,38 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "Area.hpp" -#include "Area.hpp" -#include "PU.hpp" -#include "Frequency.hpp" -#include "PU.hpp" -#include "FrancisGovernorControlKind.hpp" -#include "Length.hpp" -#include "Length.hpp" -#include "Length.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "VolumeFlowRate.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Boolean.hpp" -#include "Length.hpp" using namespace CIMPP; -GovHydroFrancis::GovHydroFrancis() {}; -GovHydroFrancis::~GovHydroFrancis() {}; +GovHydroFrancis::GovHydroFrancis() {} +GovHydroFrancis::~GovHydroFrancis() {} static const std::list PossibleProfilesForClass = { @@ -92,363 +65,388 @@ GovHydroFrancis::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroFrancis_am(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_am(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->am; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_av0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_av0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->av0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_av1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_av1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->av1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_bp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_bp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_etamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_etamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->etamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_governorControl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_governorControl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->governorControl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_h1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_h1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->h1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_h2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_h2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->h2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_hn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_hn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->hn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_kt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_kt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_qc0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_qc0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qc0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_qn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_qn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_ts(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_ts(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_twnc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_twnc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->twnc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_twng(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_twng(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->twng; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_tx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_tx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_va(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_va(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->va; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_valvmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_valvmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->valvmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_valvmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_valvmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->valvmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_vc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_vc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_waterTunnelSurgeChamberSimulation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_waterTunnelSurgeChamberSimulation(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->waterTunnelSurgeChamberSimulation; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_zsfc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_zsfc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->zsfc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroFrancis_am(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->am; if (!buffer.str().empty()) @@ -462,7 +460,8 @@ bool get_GovHydroFrancis_am(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_av0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->av0; if (!buffer.str().empty()) @@ -476,7 +475,8 @@ bool get_GovHydroFrancis_av0(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_av1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->av1; if (!buffer.str().empty()) @@ -490,7 +490,8 @@ bool get_GovHydroFrancis_av1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_bp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bp; if (!buffer.str().empty()) @@ -504,7 +505,8 @@ bool get_GovHydroFrancis_bp(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -518,7 +520,8 @@ bool get_GovHydroFrancis_db1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_etamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->etamax; if (!buffer.str().empty()) @@ -530,9 +533,25 @@ bool get_GovHydroFrancis_etamax(const BaseClass* BaseClass_ptr1, std::stringstre return false; } +bool get_GovHydroFrancis_governorControl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->governorControl; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_GovHydroFrancis_h1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->h1; if (!buffer.str().empty()) @@ -546,7 +565,8 @@ bool get_GovHydroFrancis_h1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_h2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->h2; if (!buffer.str().empty()) @@ -560,7 +580,8 @@ bool get_GovHydroFrancis_h2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_hn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hn; if (!buffer.str().empty()) @@ -574,7 +595,8 @@ bool get_GovHydroFrancis_hn(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -588,7 +610,8 @@ bool get_GovHydroFrancis_kc(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -602,7 +625,8 @@ bool get_GovHydroFrancis_kg(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_kt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kt; if (!buffer.str().empty()) @@ -616,7 +640,8 @@ bool get_GovHydroFrancis_kt(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_qc0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qc0; if (!buffer.str().empty()) @@ -630,7 +655,8 @@ bool get_GovHydroFrancis_qc0(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_qn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qn; if (!buffer.str().empty()) @@ -644,7 +670,8 @@ bool get_GovHydroFrancis_qn(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -658,7 +685,8 @@ bool get_GovHydroFrancis_ta(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -672,7 +700,8 @@ bool get_GovHydroFrancis_td(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_ts(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts; if (!buffer.str().empty()) @@ -686,7 +715,8 @@ bool get_GovHydroFrancis_ts(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_twnc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twnc; if (!buffer.str().empty()) @@ -700,7 +730,8 @@ bool get_GovHydroFrancis_twnc(const BaseClass* BaseClass_ptr1, std::stringstream bool get_GovHydroFrancis_twng(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twng; if (!buffer.str().empty()) @@ -714,7 +745,8 @@ bool get_GovHydroFrancis_twng(const BaseClass* BaseClass_ptr1, std::stringstream bool get_GovHydroFrancis_tx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tx; if (!buffer.str().empty()) @@ -728,7 +760,8 @@ bool get_GovHydroFrancis_tx(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_va(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->va; if (!buffer.str().empty()) @@ -742,7 +775,8 @@ bool get_GovHydroFrancis_va(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_valvmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->valvmax; if (!buffer.str().empty()) @@ -756,7 +790,8 @@ bool get_GovHydroFrancis_valvmax(const BaseClass* BaseClass_ptr1, std::stringstr bool get_GovHydroFrancis_valvmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->valvmin; if (!buffer.str().empty()) @@ -770,7 +805,8 @@ bool get_GovHydroFrancis_valvmin(const BaseClass* BaseClass_ptr1, std::stringstr bool get_GovHydroFrancis_vc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vc; if (!buffer.str().empty()) @@ -784,7 +820,8 @@ bool get_GovHydroFrancis_vc(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_waterTunnelSurgeChamberSimulation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->waterTunnelSurgeChamberSimulation; if (!buffer.str().empty()) @@ -798,7 +835,8 @@ bool get_GovHydroFrancis_waterTunnelSurgeChamberSimulation(const BaseClass* Base bool get_GovHydroFrancis_zsfc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->zsfc; if (!buffer.str().empty()) @@ -810,22 +848,6 @@ bool get_GovHydroFrancis_zsfc(const BaseClass* BaseClass_ptr1, std::stringstream return false; } - - -bool get_GovHydroFrancis_governorControl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->governorControl; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char GovHydroFrancis::debugName[] = "GovHydroFrancis"; const char* GovHydroFrancis::debugString() const { @@ -834,38 +856,38 @@ const char* GovHydroFrancis::debugString() const void GovHydroFrancis::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroFrancis"), &GovHydroFrancis_factory)); + factory_map.emplace("cim:GovHydroFrancis", &GovHydroFrancis_factory); } void GovHydroFrancis::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.am"), &assign_GovHydroFrancis_am)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.av0"), &assign_GovHydroFrancis_av0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.av1"), &assign_GovHydroFrancis_av1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.bp"), &assign_GovHydroFrancis_bp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.db1"), &assign_GovHydroFrancis_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.etamax"), &assign_GovHydroFrancis_etamax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.governorControl"), &assign_GovHydroFrancis_governorControl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.h1"), &assign_GovHydroFrancis_h1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.h2"), &assign_GovHydroFrancis_h2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.hn"), &assign_GovHydroFrancis_hn)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.kc"), &assign_GovHydroFrancis_kc)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.kg"), &assign_GovHydroFrancis_kg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.kt"), &assign_GovHydroFrancis_kt)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.qc0"), &assign_GovHydroFrancis_qc0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.qn"), &assign_GovHydroFrancis_qn)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.ta"), &assign_GovHydroFrancis_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.td"), &assign_GovHydroFrancis_td)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.ts"), &assign_GovHydroFrancis_ts)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.twnc"), &assign_GovHydroFrancis_twnc)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.twng"), &assign_GovHydroFrancis_twng)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.tx"), &assign_GovHydroFrancis_tx)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.va"), &assign_GovHydroFrancis_va)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.valvmax"), &assign_GovHydroFrancis_valvmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.valvmin"), &assign_GovHydroFrancis_valvmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.vc"), &assign_GovHydroFrancis_vc)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.waterTunnelSurgeChamberSimulation"), &assign_GovHydroFrancis_waterTunnelSurgeChamberSimulation)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.zsfc"), &assign_GovHydroFrancis_zsfc)); + assign_map.emplace("cim:GovHydroFrancis.am", &assign_GovHydroFrancis_am); + assign_map.emplace("cim:GovHydroFrancis.av0", &assign_GovHydroFrancis_av0); + assign_map.emplace("cim:GovHydroFrancis.av1", &assign_GovHydroFrancis_av1); + assign_map.emplace("cim:GovHydroFrancis.bp", &assign_GovHydroFrancis_bp); + assign_map.emplace("cim:GovHydroFrancis.db1", &assign_GovHydroFrancis_db1); + assign_map.emplace("cim:GovHydroFrancis.etamax", &assign_GovHydroFrancis_etamax); + assign_map.emplace("cim:GovHydroFrancis.governorControl", &assign_GovHydroFrancis_governorControl); + assign_map.emplace("cim:GovHydroFrancis.h1", &assign_GovHydroFrancis_h1); + assign_map.emplace("cim:GovHydroFrancis.h2", &assign_GovHydroFrancis_h2); + assign_map.emplace("cim:GovHydroFrancis.hn", &assign_GovHydroFrancis_hn); + assign_map.emplace("cim:GovHydroFrancis.kc", &assign_GovHydroFrancis_kc); + assign_map.emplace("cim:GovHydroFrancis.kg", &assign_GovHydroFrancis_kg); + assign_map.emplace("cim:GovHydroFrancis.kt", &assign_GovHydroFrancis_kt); + assign_map.emplace("cim:GovHydroFrancis.qc0", &assign_GovHydroFrancis_qc0); + assign_map.emplace("cim:GovHydroFrancis.qn", &assign_GovHydroFrancis_qn); + assign_map.emplace("cim:GovHydroFrancis.ta", &assign_GovHydroFrancis_ta); + assign_map.emplace("cim:GovHydroFrancis.td", &assign_GovHydroFrancis_td); + assign_map.emplace("cim:GovHydroFrancis.ts", &assign_GovHydroFrancis_ts); + assign_map.emplace("cim:GovHydroFrancis.twnc", &assign_GovHydroFrancis_twnc); + assign_map.emplace("cim:GovHydroFrancis.twng", &assign_GovHydroFrancis_twng); + assign_map.emplace("cim:GovHydroFrancis.tx", &assign_GovHydroFrancis_tx); + assign_map.emplace("cim:GovHydroFrancis.va", &assign_GovHydroFrancis_va); + assign_map.emplace("cim:GovHydroFrancis.valvmax", &assign_GovHydroFrancis_valvmax); + assign_map.emplace("cim:GovHydroFrancis.valvmin", &assign_GovHydroFrancis_valvmin); + assign_map.emplace("cim:GovHydroFrancis.vc", &assign_GovHydroFrancis_vc); + assign_map.emplace("cim:GovHydroFrancis.waterTunnelSurgeChamberSimulation", &assign_GovHydroFrancis_waterTunnelSurgeChamberSimulation); + assign_map.emplace("cim:GovHydroFrancis.zsfc", &assign_GovHydroFrancis_zsfc); } void GovHydroFrancis::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/GovHydroFrancis.hpp b/CGMES_2.4.15_27JAN2020/GovHydroFrancis.hpp index 2a213b58f..a69654b37 100644 --- a/CGMES_2.4.15_27JAN2020/GovHydroFrancis.hpp +++ b/CGMES_2.4.15_27JAN2020/GovHydroFrancis.hpp @@ -25,9 +25,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Detailed hydro unit - Francis model. This model can be used to represent three types of governors. A schematic of the hydraulic system of detailed hydro unit models, like Francis and Pelton, is provided in the DetailedHydroModelHydraulicSystem diagram. - */ + /** \brief Detailed hydro unit - Francis model. This model can be used to represent three types of governors. A schematic of the hydraulic system of detailed hydro unit models, like Francis and Pelton, is provided in the DetailedHydroModelHydraulicSystem diagram. */ class GovHydroFrancis : public TurbineGovernorDynamics { public: @@ -35,33 +33,86 @@ namespace CIMPP GovHydroFrancis(); ~GovHydroFrancis() override; - CIMPP::PU am; /* Opening section S at the maximum efficiency (Am). Typical Value = 0.7. Default: nullptr */ - CIMPP::Area av0; /* Area of the surge tank (A). Unit = m. Typical Value = 30. Default: nullptr */ - CIMPP::Area av1; /* Area of the compensation tank (A). Unit = m. Typical Value = 700. Default: nullptr */ - CIMPP::PU bp; /* Droop (Bp). Typical Value = 0.05. Default: nullptr */ - CIMPP::Frequency db1; /* Intentional dead-band width (DB1). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::PU etamax; /* Maximum efficiency (EtaMax). Typical Value = 1.05. Default: nullptr */ - CIMPP::FrancisGovernorControlKind governorControl; /* Governor control flag (Cflag). Typical Value = mechanicHydrolicTachoAccelerator. Default: 0 */ - CIMPP::Length h1; /* Head of compensation chamber water level with respect to the level of penstock (H). Unit = m. Typical Value = 4. Default: nullptr */ - CIMPP::Length h2; /* Head of surge tank water level with respect to the level of penstock (H). Unit = m. Typical Value = 40. Default: nullptr */ - CIMPP::Length hn; /* Rated hydraulic head (H). Unit = m. Typical Value = 250. Default: nullptr */ - CIMPP::PU kc; /* Penstock loss coefficient (due to friction) (Kc). Typical Value = 0.025. Default: nullptr */ - CIMPP::PU kg; /* Water tunnel and surge chamber loss coefficient (due to friction) (Kg). Typical Value = 0.025. Default: nullptr */ - CIMPP::PU kt; /* Washout gain (Kt). Typical Value = 0.25. Default: nullptr */ - CIMPP::PU qc0; /* No-load turbine flow at nominal head (Qc0). Typical Value = 0.21. Default: nullptr */ - CIMPP::VolumeFlowRate qn; /* Rated flow (Q). Unit = m/s. Typical Value = 40. Default: nullptr */ - CIMPP::Seconds ta; /* Derivative gain (Ta). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds td; /* Washout time constant (Td). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds ts; /* Gate servo time constant (Ts). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds twnc; /* Water inertia time constant (Twnc). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds twng; /* Water tunnel and surge chamber inertia time constant (Twng). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds tx; /* Derivative feedback gain (Tx). Typical Value = 1. Default: nullptr */ - CIMPP::Simple_Float va; /* Maximum gate opening velocity (Va). Unit = PU/sec. Typical Value = 0.011. Default: nullptr */ - CIMPP::PU valvmax; /* Maximum gate opening (ValvMax). Typical Value = 1. Default: nullptr */ - CIMPP::PU valvmin; /* Minimum gate opening (ValvMin). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float vc; /* Maximum gate closing velocity (Vc). Unit = PU/sec. Typical Value = -0.011. Default: nullptr */ - CIMPP::Boolean waterTunnelSurgeChamberSimulation; /* Water tunnel and surge chamber simulation (Tflag). true = enable of water tunnel and surge chamber simulation false = inhibit of water tunnel and surge chamber simulation. Typical Value = false. Default: false */ - CIMPP::Length zsfc; /* Head of upper water level with respect to the level of penstock (Zsfc). Unit = m. Typical Value = 25. Default: nullptr */ + /** \brief Opening section S at the maximum efficiency (Am). Typical Value = 0.7. Default: nullptr */ + CIMPP::PU am; + + /** \brief Area of the surge tank (A). Unit = m. Typical Value = 30. Default: nullptr */ + CIMPP::Area av0; + + /** \brief Area of the compensation tank (A). Unit = m. Typical Value = 700. Default: nullptr */ + CIMPP::Area av1; + + /** \brief Droop (Bp). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU bp; + + /** \brief Intentional dead-band width (DB1). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Maximum efficiency (EtaMax). Typical Value = 1.05. Default: nullptr */ + CIMPP::PU etamax; + + /** \brief Governor control flag (Cflag). Typical Value = mechanicHydrolicTachoAccelerator. Default: 0 */ + CIMPP::FrancisGovernorControlKind governorControl; + + /** \brief Head of compensation chamber water level with respect to the level of penstock (H). Unit = m. Typical Value = 4. Default: nullptr */ + CIMPP::Length h1; + + /** \brief Head of surge tank water level with respect to the level of penstock (H). Unit = m. Typical Value = 40. Default: nullptr */ + CIMPP::Length h2; + + /** \brief Rated hydraulic head (H). Unit = m. Typical Value = 250. Default: nullptr */ + CIMPP::Length hn; + + /** \brief Penstock loss coefficient (due to friction) (Kc). Typical Value = 0.025. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Water tunnel and surge chamber loss coefficient (due to friction) (Kg). Typical Value = 0.025. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Washout gain (Kt). Typical Value = 0.25. Default: nullptr */ + CIMPP::PU kt; + + /** \brief No-load turbine flow at nominal head (Qc0). Typical Value = 0.21. Default: nullptr */ + CIMPP::PU qc0; + + /** \brief Rated flow (Q). Unit = m/s. Typical Value = 40. Default: nullptr */ + CIMPP::VolumeFlowRate qn; + + /** \brief Derivative gain (Ta). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Washout time constant (Td). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Gate servo time constant (Ts). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds ts; + + /** \brief Water inertia time constant (Twnc). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds twnc; + + /** \brief Water tunnel and surge chamber inertia time constant (Twng). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds twng; + + /** \brief Derivative feedback gain (Tx). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tx; + + /** \brief Maximum gate opening velocity (Va). Unit = PU/sec. Typical Value = 0.011. Default: nullptr */ + CIMPP::Simple_Float va; + + /** \brief Maximum gate opening (ValvMax). Typical Value = 1. Default: nullptr */ + CIMPP::PU valvmax; + + /** \brief Minimum gate opening (ValvMin). Typical Value = 0. Default: nullptr */ + CIMPP::PU valvmin; + + /** \brief Maximum gate closing velocity (Vc). Unit = PU/sec. Typical Value = -0.011. Default: nullptr */ + CIMPP::Simple_Float vc; + + /** \brief Water tunnel and surge chamber simulation (Tflag). true = enable of water tunnel and surge chamber simulation false = inhibit of water tunnel and surge chamber simulation. Typical Value = false. Default: false */ + CIMPP::Boolean waterTunnelSurgeChamberSimulation; + + /** \brief Head of upper water level with respect to the level of penstock (Zsfc). Unit = m. Typical Value = 25. Default: nullptr */ + CIMPP::Length zsfc; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GovHydroIEEE0.cpp b/CGMES_2.4.15_27JAN2020/GovHydroIEEE0.cpp index 1d00646d8..7038d0233 100644 --- a/CGMES_2.4.15_27JAN2020/GovHydroIEEE0.cpp +++ b/CGMES_2.4.15_27JAN2020/GovHydroIEEE0.cpp @@ -8,19 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -GovHydroIEEE0::GovHydroIEEE0() {}; -GovHydroIEEE0::~GovHydroIEEE0() {}; +GovHydroIEEE0::GovHydroIEEE0() {} +GovHydroIEEE0::~GovHydroIEEE0() {} static const std::list PossibleProfilesForClass = { @@ -54,116 +46,122 @@ GovHydroIEEE0::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroIEEE0_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE0_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE0_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE0_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE0_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE0_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE0_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE0_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE0_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE0_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE0_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE0_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE0_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE0_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE0_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE0_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroIEEE0_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -177,7 +175,8 @@ bool get_GovHydroIEEE0_k(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroIEEE0_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -191,7 +190,8 @@ bool get_GovHydroIEEE0_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream bool get_GovHydroIEEE0_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -205,7 +205,8 @@ bool get_GovHydroIEEE0_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE0_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -219,7 +220,8 @@ bool get_GovHydroIEEE0_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE0_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -233,7 +235,8 @@ bool get_GovHydroIEEE0_t1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroIEEE0_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -247,7 +250,8 @@ bool get_GovHydroIEEE0_t2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroIEEE0_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -261,7 +265,8 @@ bool get_GovHydroIEEE0_t3(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroIEEE0_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -273,8 +278,6 @@ bool get_GovHydroIEEE0_t4(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char GovHydroIEEE0::debugName[] = "GovHydroIEEE0"; const char* GovHydroIEEE0::debugString() const { @@ -283,19 +286,19 @@ const char* GovHydroIEEE0::debugString() const void GovHydroIEEE0::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroIEEE0"), &GovHydroIEEE0_factory)); + factory_map.emplace("cim:GovHydroIEEE0", &GovHydroIEEE0_factory); } void GovHydroIEEE0::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE0.k"), &assign_GovHydroIEEE0_k)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE0.mwbase"), &assign_GovHydroIEEE0_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE0.pmax"), &assign_GovHydroIEEE0_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE0.pmin"), &assign_GovHydroIEEE0_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE0.t1"), &assign_GovHydroIEEE0_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE0.t2"), &assign_GovHydroIEEE0_t2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE0.t3"), &assign_GovHydroIEEE0_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE0.t4"), &assign_GovHydroIEEE0_t4)); + assign_map.emplace("cim:GovHydroIEEE0.k", &assign_GovHydroIEEE0_k); + assign_map.emplace("cim:GovHydroIEEE0.mwbase", &assign_GovHydroIEEE0_mwbase); + assign_map.emplace("cim:GovHydroIEEE0.pmax", &assign_GovHydroIEEE0_pmax); + assign_map.emplace("cim:GovHydroIEEE0.pmin", &assign_GovHydroIEEE0_pmin); + assign_map.emplace("cim:GovHydroIEEE0.t1", &assign_GovHydroIEEE0_t1); + assign_map.emplace("cim:GovHydroIEEE0.t2", &assign_GovHydroIEEE0_t2); + assign_map.emplace("cim:GovHydroIEEE0.t3", &assign_GovHydroIEEE0_t3); + assign_map.emplace("cim:GovHydroIEEE0.t4", &assign_GovHydroIEEE0_t4); } void GovHydroIEEE0::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/GovHydroIEEE0.hpp b/CGMES_2.4.15_27JAN2020/GovHydroIEEE0.hpp index aafbd9a2a..715982cd2 100644 --- a/CGMES_2.4.15_27JAN2020/GovHydroIEEE0.hpp +++ b/CGMES_2.4.15_27JAN2020/GovHydroIEEE0.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE Simplified Hydro Governor-Turbine Model. Used for Mechanical-Hydraulic and Electro-Hydraulic turbine governors, with our without steam feedback. Typical values given are for Mechanical-Hydraulic. Ref - */ + /** \brief IEEE Simplified Hydro Governor-Turbine Model. Used for Mechanical-Hydraulic and Electro-Hydraulic turbine governors, with our without steam feedback. Typical values given are for Mechanical-Hydraulic. Ref */ class GovHydroIEEE0 : public TurbineGovernorDynamics { public: @@ -29,14 +27,29 @@ namespace CIMPP GovHydroIEEE0(); ~GovHydroIEEE0() override; - CIMPP::PU k; /* Governor gain (K. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ - CIMPP::PU pmax; /* Gate maximum (Pmax). Default: nullptr */ - CIMPP::PU pmin; /* Gate minimum (Pmin). Default: nullptr */ - CIMPP::Seconds t1; /* Governor lag time constant (T1). Typical Value = 0.25. Default: nullptr */ - CIMPP::Seconds t2; /* Governor lead time constant (T2. Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t3; /* Gate actuator time constant (T3). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t4; /* Water starting time (T4). Default: nullptr */ + /** \brief Governor gain (K. Default: nullptr */ + CIMPP::PU k; + + /** \brief Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Gate maximum (Pmax). Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Gate minimum (Pmin). Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Governor lag time constant (T1). Typical Value = 0.25. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Governor lead time constant (T2. Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Gate actuator time constant (T3). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Water starting time (T4). Default: nullptr */ + CIMPP::Seconds t4; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GovHydroIEEE2.cpp b/CGMES_2.4.15_27JAN2020/GovHydroIEEE2.cpp index 09445cf65..abbf5cf5e 100644 --- a/CGMES_2.4.15_27JAN2020/GovHydroIEEE2.cpp +++ b/CGMES_2.4.15_27JAN2020/GovHydroIEEE2.cpp @@ -8,37 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -GovHydroIEEE2::GovHydroIEEE2() {}; -GovHydroIEEE2::~GovHydroIEEE2() {}; +GovHydroIEEE2::GovHydroIEEE2() {} +GovHydroIEEE2::~GovHydroIEEE2() {} static const std::list PossibleProfilesForClass = { @@ -90,350 +64,374 @@ GovHydroIEEE2::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroIEEE2_aturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_aturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->aturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_bturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_bturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_gv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_kturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_kturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_pgv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_rperm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_rperm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rperm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_rtemp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_rtemp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rtemp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_uc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_uo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_uo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroIEEE2_aturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->aturb; if (!buffer.str().empty()) @@ -447,7 +445,8 @@ bool get_GovHydroIEEE2_aturb(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_bturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bturb; if (!buffer.str().empty()) @@ -461,7 +460,8 @@ bool get_GovHydroIEEE2_bturb(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -475,7 +475,8 @@ bool get_GovHydroIEEE2_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroIEEE2_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -489,7 +490,8 @@ bool get_GovHydroIEEE2_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroIEEE2_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -503,7 +505,8 @@ bool get_GovHydroIEEE2_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroIEEE2_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -517,7 +520,8 @@ bool get_GovHydroIEEE2_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroIEEE2_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -531,7 +535,8 @@ bool get_GovHydroIEEE2_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroIEEE2_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv6; if (!buffer.str().empty()) @@ -545,7 +550,8 @@ bool get_GovHydroIEEE2_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroIEEE2_kturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kturb; if (!buffer.str().empty()) @@ -559,7 +565,8 @@ bool get_GovHydroIEEE2_kturb(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -573,7 +580,8 @@ bool get_GovHydroIEEE2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream bool get_GovHydroIEEE2_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -587,7 +595,8 @@ bool get_GovHydroIEEE2_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -601,7 +610,8 @@ bool get_GovHydroIEEE2_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -615,7 +625,8 @@ bool get_GovHydroIEEE2_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -629,7 +640,8 @@ bool get_GovHydroIEEE2_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -643,7 +655,8 @@ bool get_GovHydroIEEE2_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv6; if (!buffer.str().empty()) @@ -657,7 +670,8 @@ bool get_GovHydroIEEE2_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -671,7 +685,8 @@ bool get_GovHydroIEEE2_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -685,7 +700,8 @@ bool get_GovHydroIEEE2_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rperm; if (!buffer.str().empty()) @@ -699,7 +715,8 @@ bool get_GovHydroIEEE2_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_rtemp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rtemp; if (!buffer.str().empty()) @@ -713,7 +730,8 @@ bool get_GovHydroIEEE2_rtemp(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -727,7 +745,8 @@ bool get_GovHydroIEEE2_tg(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroIEEE2_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -741,7 +760,8 @@ bool get_GovHydroIEEE2_tp(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroIEEE2_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -755,7 +775,8 @@ bool get_GovHydroIEEE2_tr(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroIEEE2_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -769,7 +790,8 @@ bool get_GovHydroIEEE2_tw(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroIEEE2_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uc; if (!buffer.str().empty()) @@ -783,7 +805,8 @@ bool get_GovHydroIEEE2_uc(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroIEEE2_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uo; if (!buffer.str().empty()) @@ -795,8 +818,6 @@ bool get_GovHydroIEEE2_uo(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char GovHydroIEEE2::debugName[] = "GovHydroIEEE2"; const char* GovHydroIEEE2::debugString() const { @@ -805,37 +826,37 @@ const char* GovHydroIEEE2::debugString() const void GovHydroIEEE2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2"), &GovHydroIEEE2_factory)); + factory_map.emplace("cim:GovHydroIEEE2", &GovHydroIEEE2_factory); } void GovHydroIEEE2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.aturb"), &assign_GovHydroIEEE2_aturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.bturb"), &assign_GovHydroIEEE2_bturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.gv1"), &assign_GovHydroIEEE2_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.gv2"), &assign_GovHydroIEEE2_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.gv3"), &assign_GovHydroIEEE2_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.gv4"), &assign_GovHydroIEEE2_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.gv5"), &assign_GovHydroIEEE2_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.gv6"), &assign_GovHydroIEEE2_gv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.kturb"), &assign_GovHydroIEEE2_kturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.mwbase"), &assign_GovHydroIEEE2_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.pgv1"), &assign_GovHydroIEEE2_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.pgv2"), &assign_GovHydroIEEE2_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.pgv3"), &assign_GovHydroIEEE2_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.pgv4"), &assign_GovHydroIEEE2_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.pgv5"), &assign_GovHydroIEEE2_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.pgv6"), &assign_GovHydroIEEE2_pgv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.pmax"), &assign_GovHydroIEEE2_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.pmin"), &assign_GovHydroIEEE2_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.rperm"), &assign_GovHydroIEEE2_rperm)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.rtemp"), &assign_GovHydroIEEE2_rtemp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.tg"), &assign_GovHydroIEEE2_tg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.tp"), &assign_GovHydroIEEE2_tp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.tr"), &assign_GovHydroIEEE2_tr)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.tw"), &assign_GovHydroIEEE2_tw)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.uc"), &assign_GovHydroIEEE2_uc)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.uo"), &assign_GovHydroIEEE2_uo)); + assign_map.emplace("cim:GovHydroIEEE2.aturb", &assign_GovHydroIEEE2_aturb); + assign_map.emplace("cim:GovHydroIEEE2.bturb", &assign_GovHydroIEEE2_bturb); + assign_map.emplace("cim:GovHydroIEEE2.gv1", &assign_GovHydroIEEE2_gv1); + assign_map.emplace("cim:GovHydroIEEE2.gv2", &assign_GovHydroIEEE2_gv2); + assign_map.emplace("cim:GovHydroIEEE2.gv3", &assign_GovHydroIEEE2_gv3); + assign_map.emplace("cim:GovHydroIEEE2.gv4", &assign_GovHydroIEEE2_gv4); + assign_map.emplace("cim:GovHydroIEEE2.gv5", &assign_GovHydroIEEE2_gv5); + assign_map.emplace("cim:GovHydroIEEE2.gv6", &assign_GovHydroIEEE2_gv6); + assign_map.emplace("cim:GovHydroIEEE2.kturb", &assign_GovHydroIEEE2_kturb); + assign_map.emplace("cim:GovHydroIEEE2.mwbase", &assign_GovHydroIEEE2_mwbase); + assign_map.emplace("cim:GovHydroIEEE2.pgv1", &assign_GovHydroIEEE2_pgv1); + assign_map.emplace("cim:GovHydroIEEE2.pgv2", &assign_GovHydroIEEE2_pgv2); + assign_map.emplace("cim:GovHydroIEEE2.pgv3", &assign_GovHydroIEEE2_pgv3); + assign_map.emplace("cim:GovHydroIEEE2.pgv4", &assign_GovHydroIEEE2_pgv4); + assign_map.emplace("cim:GovHydroIEEE2.pgv5", &assign_GovHydroIEEE2_pgv5); + assign_map.emplace("cim:GovHydroIEEE2.pgv6", &assign_GovHydroIEEE2_pgv6); + assign_map.emplace("cim:GovHydroIEEE2.pmax", &assign_GovHydroIEEE2_pmax); + assign_map.emplace("cim:GovHydroIEEE2.pmin", &assign_GovHydroIEEE2_pmin); + assign_map.emplace("cim:GovHydroIEEE2.rperm", &assign_GovHydroIEEE2_rperm); + assign_map.emplace("cim:GovHydroIEEE2.rtemp", &assign_GovHydroIEEE2_rtemp); + assign_map.emplace("cim:GovHydroIEEE2.tg", &assign_GovHydroIEEE2_tg); + assign_map.emplace("cim:GovHydroIEEE2.tp", &assign_GovHydroIEEE2_tp); + assign_map.emplace("cim:GovHydroIEEE2.tr", &assign_GovHydroIEEE2_tr); + assign_map.emplace("cim:GovHydroIEEE2.tw", &assign_GovHydroIEEE2_tw); + assign_map.emplace("cim:GovHydroIEEE2.uc", &assign_GovHydroIEEE2_uc); + assign_map.emplace("cim:GovHydroIEEE2.uo", &assign_GovHydroIEEE2_uo); } void GovHydroIEEE2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/GovHydroIEEE2.hpp b/CGMES_2.4.15_27JAN2020/GovHydroIEEE2.hpp index 579366ede..33d231831 100644 --- a/CGMES_2.4.15_27JAN2020/GovHydroIEEE2.hpp +++ b/CGMES_2.4.15_27JAN2020/GovHydroIEEE2.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE hydro turbine governor model represents plants with straightforward penstock configurations and hydraulic-dashpot governors. Ref - */ + /** \brief IEEE hydro turbine governor model represents plants with straightforward penstock configurations and hydraulic-dashpot governors. Ref */ class GovHydroIEEE2 : public TurbineGovernorDynamics { public: @@ -30,32 +28,83 @@ namespace CIMPP GovHydroIEEE2(); ~GovHydroIEEE2() override; - CIMPP::PU aturb; /* Turbine numerator multiplier (Aturb). Typical Value = -1. Default: nullptr */ - CIMPP::PU bturb; /* Turbine denominator multiplier (Bturb). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU gv1; /* Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv6; /* Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU kturb; /* Turbine gain (Kturb). Typical Value = 1. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv6; /* Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU pmax; /* Maximum gate opening (Pmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum gate opening (Pmin). Typical Value = 0. Default: nullptr */ - CIMPP::PU rperm; /* Permanent droop (Rperm). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU rtemp; /* Temporary droop (Rtemp). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tg; /* Gate servo time constant (Tg). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tp; /* Pilot servo valve time constant (Tp). Typical Value = 0.03. Default: nullptr */ - CIMPP::Seconds tr; /* Dashpot time constant (Tr). Typical Value = 12. Default: nullptr */ - CIMPP::Seconds tw; /* Water inertia time constant (Tw). Typical Value = 2. Default: nullptr */ - CIMPP::Simple_Float uc; /* Maximum gate closing velocity (Uc) (<0). Typical Value = -0.1. Default: nullptr */ - CIMPP::Simple_Float uo; /* Maximum gate opening velocity (Uo). Unit = PU/sec. Typical Value = 0.1. Default: nullptr */ + /** \brief Turbine numerator multiplier (Aturb). Typical Value = -1. Default: nullptr */ + CIMPP::PU aturb; + + /** \brief Turbine denominator multiplier (Bturb). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU bturb; + + /** \brief Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv6; + + /** \brief Turbine gain (Kturb). Typical Value = 1. Default: nullptr */ + CIMPP::PU kturb; + + /** \brief Base for power values (MWbase) (> 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv6; + + /** \brief Maximum gate opening (Pmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum gate opening (Pmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Permanent droop (Rperm). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU rperm; + + /** \brief Temporary droop (Rtemp). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU rtemp; + + /** \brief Gate servo time constant (Tg). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Pilot servo valve time constant (Tp). Typical Value = 0.03. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Dashpot time constant (Tr). Typical Value = 12. Default: nullptr */ + CIMPP::Seconds tr; + + /** \brief Water inertia time constant (Tw). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds tw; + + /** \brief Maximum gate closing velocity (Uc) (<0). Typical Value = -0.1. Default: nullptr */ + CIMPP::Simple_Float uc; + + /** \brief Maximum gate opening velocity (Uo). Unit = PU/sec. Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float uo; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GovHydroPID.cpp b/CGMES_2.4.15_27JAN2020/GovHydroPID.cpp index 776008c7f..45136a44f 100644 --- a/CGMES_2.4.15_27JAN2020/GovHydroPID.cpp +++ b/CGMES_2.4.15_27JAN2020/GovHydroPID.cpp @@ -8,44 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Frequency.hpp" -#include "ActivePower.hpp" -#include "Frequency.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -GovHydroPID::GovHydroPID() {}; -GovHydroPID::~GovHydroPID() {}; +GovHydroPID::GovHydroPID() {} +GovHydroPID::~GovHydroPID() {} static const std::list PossibleProfilesForClass = { @@ -104,441 +71,472 @@ GovHydroPID::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroPID_aturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_aturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->aturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_bturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_bturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_eps(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eps; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_gv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_inputSignal(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_inputSignal(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_pgv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_tt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_tturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_tturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_velcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_velcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velcl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_velop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_velop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroPID_aturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->aturb; if (!buffer.str().empty()) @@ -552,7 +550,8 @@ bool get_GovHydroPID_aturb(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPID_bturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bturb; if (!buffer.str().empty()) @@ -566,7 +565,8 @@ bool get_GovHydroPID_bturb(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPID_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -580,7 +580,8 @@ bool get_GovHydroPID_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -594,7 +595,8 @@ bool get_GovHydroPID_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eps; if (!buffer.str().empty()) @@ -608,7 +610,8 @@ bool get_GovHydroPID_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -622,7 +625,8 @@ bool get_GovHydroPID_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -636,7 +640,8 @@ bool get_GovHydroPID_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -650,7 +655,8 @@ bool get_GovHydroPID_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -664,7 +670,8 @@ bool get_GovHydroPID_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -678,7 +685,8 @@ bool get_GovHydroPID_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv6; if (!buffer.str().empty()) @@ -692,7 +700,8 @@ bool get_GovHydroPID_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID_inputSignal(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inputSignal; if (!buffer.str().empty()) @@ -706,7 +715,8 @@ bool get_GovHydroPID_inputSignal(const BaseClass* BaseClass_ptr1, std::stringstr bool get_GovHydroPID_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -720,7 +730,8 @@ bool get_GovHydroPID_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroPID_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -734,7 +745,8 @@ bool get_GovHydroPID_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroPID_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -748,7 +760,8 @@ bool get_GovHydroPID_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroPID_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -762,7 +775,8 @@ bool get_GovHydroPID_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroPID_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -776,7 +790,8 @@ bool get_GovHydroPID_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPID_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -790,7 +805,8 @@ bool get_GovHydroPID_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroPID_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -804,7 +820,8 @@ bool get_GovHydroPID_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroPID_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -818,7 +835,8 @@ bool get_GovHydroPID_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroPID_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -832,7 +850,8 @@ bool get_GovHydroPID_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroPID_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -846,7 +865,8 @@ bool get_GovHydroPID_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroPID_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv6; if (!buffer.str().empty()) @@ -860,7 +880,8 @@ bool get_GovHydroPID_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroPID_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -874,7 +895,8 @@ bool get_GovHydroPID_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroPID_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -888,7 +910,8 @@ bool get_GovHydroPID_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroPID_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -902,7 +925,8 @@ bool get_GovHydroPID_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroPID_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -916,7 +940,8 @@ bool get_GovHydroPID_td(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroPID_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -930,7 +955,8 @@ bool get_GovHydroPID_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroPID_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -944,7 +970,8 @@ bool get_GovHydroPID_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroPID_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tt; if (!buffer.str().empty()) @@ -958,7 +985,8 @@ bool get_GovHydroPID_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroPID_tturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tturb; if (!buffer.str().empty()) @@ -972,7 +1000,8 @@ bool get_GovHydroPID_tturb(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPID_velcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velcl; if (!buffer.str().empty()) @@ -986,7 +1015,8 @@ bool get_GovHydroPID_velcl(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPID_velop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velop; if (!buffer.str().empty()) @@ -998,8 +1028,6 @@ bool get_GovHydroPID_velop(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char GovHydroPID::debugName[] = "GovHydroPID"; const char* GovHydroPID::debugString() const { @@ -1008,44 +1036,44 @@ const char* GovHydroPID::debugString() const void GovHydroPID::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroPID"), &GovHydroPID_factory)); + factory_map.emplace("cim:GovHydroPID", &GovHydroPID_factory); } void GovHydroPID::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.aturb"), &assign_GovHydroPID_aturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.bturb"), &assign_GovHydroPID_bturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.db1"), &assign_GovHydroPID_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.db2"), &assign_GovHydroPID_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.eps"), &assign_GovHydroPID_eps)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.gv1"), &assign_GovHydroPID_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.gv2"), &assign_GovHydroPID_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.gv3"), &assign_GovHydroPID_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.gv4"), &assign_GovHydroPID_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.gv5"), &assign_GovHydroPID_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.gv6"), &assign_GovHydroPID_gv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.inputSignal"), &assign_GovHydroPID_inputSignal)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.kd"), &assign_GovHydroPID_kd)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.kg"), &assign_GovHydroPID_kg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.ki"), &assign_GovHydroPID_ki)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.kp"), &assign_GovHydroPID_kp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.mwbase"), &assign_GovHydroPID_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.pgv1"), &assign_GovHydroPID_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.pgv2"), &assign_GovHydroPID_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.pgv3"), &assign_GovHydroPID_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.pgv4"), &assign_GovHydroPID_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.pgv5"), &assign_GovHydroPID_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.pgv6"), &assign_GovHydroPID_pgv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.pmax"), &assign_GovHydroPID_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.pmin"), &assign_GovHydroPID_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.r"), &assign_GovHydroPID_r)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.td"), &assign_GovHydroPID_td)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.tf"), &assign_GovHydroPID_tf)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.tp"), &assign_GovHydroPID_tp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.tt"), &assign_GovHydroPID_tt)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.tturb"), &assign_GovHydroPID_tturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.velcl"), &assign_GovHydroPID_velcl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.velop"), &assign_GovHydroPID_velop)); + assign_map.emplace("cim:GovHydroPID.aturb", &assign_GovHydroPID_aturb); + assign_map.emplace("cim:GovHydroPID.bturb", &assign_GovHydroPID_bturb); + assign_map.emplace("cim:GovHydroPID.db1", &assign_GovHydroPID_db1); + assign_map.emplace("cim:GovHydroPID.db2", &assign_GovHydroPID_db2); + assign_map.emplace("cim:GovHydroPID.eps", &assign_GovHydroPID_eps); + assign_map.emplace("cim:GovHydroPID.gv1", &assign_GovHydroPID_gv1); + assign_map.emplace("cim:GovHydroPID.gv2", &assign_GovHydroPID_gv2); + assign_map.emplace("cim:GovHydroPID.gv3", &assign_GovHydroPID_gv3); + assign_map.emplace("cim:GovHydroPID.gv4", &assign_GovHydroPID_gv4); + assign_map.emplace("cim:GovHydroPID.gv5", &assign_GovHydroPID_gv5); + assign_map.emplace("cim:GovHydroPID.gv6", &assign_GovHydroPID_gv6); + assign_map.emplace("cim:GovHydroPID.inputSignal", &assign_GovHydroPID_inputSignal); + assign_map.emplace("cim:GovHydroPID.kd", &assign_GovHydroPID_kd); + assign_map.emplace("cim:GovHydroPID.kg", &assign_GovHydroPID_kg); + assign_map.emplace("cim:GovHydroPID.ki", &assign_GovHydroPID_ki); + assign_map.emplace("cim:GovHydroPID.kp", &assign_GovHydroPID_kp); + assign_map.emplace("cim:GovHydroPID.mwbase", &assign_GovHydroPID_mwbase); + assign_map.emplace("cim:GovHydroPID.pgv1", &assign_GovHydroPID_pgv1); + assign_map.emplace("cim:GovHydroPID.pgv2", &assign_GovHydroPID_pgv2); + assign_map.emplace("cim:GovHydroPID.pgv3", &assign_GovHydroPID_pgv3); + assign_map.emplace("cim:GovHydroPID.pgv4", &assign_GovHydroPID_pgv4); + assign_map.emplace("cim:GovHydroPID.pgv5", &assign_GovHydroPID_pgv5); + assign_map.emplace("cim:GovHydroPID.pgv6", &assign_GovHydroPID_pgv6); + assign_map.emplace("cim:GovHydroPID.pmax", &assign_GovHydroPID_pmax); + assign_map.emplace("cim:GovHydroPID.pmin", &assign_GovHydroPID_pmin); + assign_map.emplace("cim:GovHydroPID.r", &assign_GovHydroPID_r); + assign_map.emplace("cim:GovHydroPID.td", &assign_GovHydroPID_td); + assign_map.emplace("cim:GovHydroPID.tf", &assign_GovHydroPID_tf); + assign_map.emplace("cim:GovHydroPID.tp", &assign_GovHydroPID_tp); + assign_map.emplace("cim:GovHydroPID.tt", &assign_GovHydroPID_tt); + assign_map.emplace("cim:GovHydroPID.tturb", &assign_GovHydroPID_tturb); + assign_map.emplace("cim:GovHydroPID.velcl", &assign_GovHydroPID_velcl); + assign_map.emplace("cim:GovHydroPID.velop", &assign_GovHydroPID_velop); } void GovHydroPID::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/GovHydroPID.hpp b/CGMES_2.4.15_27JAN2020/GovHydroPID.hpp index f39106205..2d69e696b 100644 --- a/CGMES_2.4.15_27JAN2020/GovHydroPID.hpp +++ b/CGMES_2.4.15_27JAN2020/GovHydroPID.hpp @@ -22,9 +22,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - PID governor and turbine. - */ + /** \brief PID governor and turbine. */ class GovHydroPID : public TurbineGovernorDynamics { public: @@ -32,39 +30,104 @@ namespace CIMPP GovHydroPID(); ~GovHydroPID() override; - CIMPP::PU aturb; /* Turbine numerator multiplier (Aturb) (note 3). Typical Value -1. Default: nullptr */ - CIMPP::PU bturb; /* Turbine denominator multiplier (Bturb) (note 3). Typical Value = 0.5. Default: nullptr */ - CIMPP::Frequency db1; /* Intentional dead-band width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower db2; /* Unintentional dead-band (db2). Unit = MW. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency eps; /* Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::PU gv1; /* Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv6; /* Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ - CIMPP::Boolean inputSignal; /* Input signal switch (Flag). true = Pe input is used false = feedback is received from CV. Flag is normally dependent on Tt. If Tf is zero, Flag is set to false. If Tf is not zero, Flag is set to true. Typical Value = true. Default: false */ - CIMPP::PU kd; /* Derivative gain (Kd). Typical Value = 1.11. Default: nullptr */ - CIMPP::PU kg; /* Gate servo gain (Kg). Typical Value = 2.5. Default: nullptr */ - CIMPP::PU ki; /* Integral gain (Ki). Typical Value = 0.36. Default: nullptr */ - CIMPP::PU kp; /* Proportional gain (Kp). Typical Value = 0.1. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv6; /* Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU pmax; /* Maximum gate opening, PU of MWbase (Pmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum gate opening, PU of MWbase (Pmin). Typical Value = 0. Default: nullptr */ - CIMPP::PU r; /* Steady state droop (R). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds td; /* Input filter time constant (Td). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tf; /* Washout time constant (Tf). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tp; /* Gate servo time constant (Tp). Typical Value = 0.35. Default: nullptr */ - CIMPP::Seconds tt; /* Power feedback time constant (Tt). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds tturb; /* Turbine time constant (Tturb) (note 3). Typical Value = 0.8. Default: nullptr */ - CIMPP::Simple_Float velcl; /* Maximum gate closing velocity (Velcl). Unit = PU/sec. Typical Value = -0.14. Default: nullptr */ - CIMPP::Simple_Float velop; /* Maximum gate opening velocity (Velop). Unit = PU/sec. Typical Value = 0.09. Default: nullptr */ + /** \brief Turbine numerator multiplier (Aturb) (note 3). Typical Value -1. Default: nullptr */ + CIMPP::PU aturb; + + /** \brief Turbine denominator multiplier (Bturb) (note 3). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU bturb; + + /** \brief Intentional dead-band width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Unintentional dead-band (db2). Unit = MW. Typical Value = 0. Default: nullptr */ + CIMPP::ActivePower db2; + + /** \brief Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency eps; + + /** \brief Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv6; + + /** \brief Input signal switch (Flag). true = Pe input is used false = feedback is received from CV. Flag is normally dependent on Tt. If Tf is zero, Flag is set to false. If Tf is not zero, Flag is set to true. Typical Value = true. Default: false */ + CIMPP::Boolean inputSignal; + + /** \brief Derivative gain (Kd). Typical Value = 1.11. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Gate servo gain (Kg). Typical Value = 2.5. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Integral gain (Ki). Typical Value = 0.36. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Proportional gain (Kp). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv6; + + /** \brief Maximum gate opening, PU of MWbase (Pmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum gate opening, PU of MWbase (Pmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Steady state droop (R). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU r; + + /** \brief Input filter time constant (Td). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Washout time constant (Tf). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Gate servo time constant (Tp). Typical Value = 0.35. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Power feedback time constant (Tt). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds tt; + + /** \brief Turbine time constant (Tturb) (note 3). Typical Value = 0.8. Default: nullptr */ + CIMPP::Seconds tturb; + + /** \brief Maximum gate closing velocity (Velcl). Unit = PU/sec. Typical Value = -0.14. Default: nullptr */ + CIMPP::Simple_Float velcl; + + /** \brief Maximum gate opening velocity (Velop). Unit = PU/sec. Typical Value = 0.09. Default: nullptr */ + CIMPP::Simple_Float velop; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GovHydroPID2.cpp b/CGMES_2.4.15_27JAN2020/GovHydroPID2.cpp index bbbbf968f..59654db7b 100644 --- a/CGMES_2.4.15_27JAN2020/GovHydroPID2.cpp +++ b/CGMES_2.4.15_27JAN2020/GovHydroPID2.cpp @@ -8,33 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -GovHydroPID2::GovHydroPID2() {}; -GovHydroPID2::~GovHydroPID2() {}; +GovHydroPID2::GovHydroPID2() {} +GovHydroPID2::~GovHydroPID2() {} static const std::list PossibleProfilesForClass = { @@ -82,298 +60,318 @@ GovHydroPID2::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroPID2_atw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_atw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->atw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_d(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->d; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_feedbackSignal(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_feedbackSignal(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->feedbackSignal; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_g0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_g0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_g1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_g1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_g2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_g2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_gmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_gmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_gmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_gmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_p1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_p1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_p2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_p2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_p3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_p3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_rperm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_rperm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rperm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_treg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_treg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->treg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_velmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_velmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_velmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_velmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroPID2_atw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->atw; if (!buffer.str().empty()) @@ -387,7 +385,8 @@ bool get_GovHydroPID2_atw(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroPID2_d(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->d; if (!buffer.str().empty()) @@ -401,7 +400,8 @@ bool get_GovHydroPID2_d(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroPID2_feedbackSignal(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->feedbackSignal; if (!buffer.str().empty()) @@ -415,7 +415,8 @@ bool get_GovHydroPID2_feedbackSignal(const BaseClass* BaseClass_ptr1, std::strin bool get_GovHydroPID2_g0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g0; if (!buffer.str().empty()) @@ -429,7 +430,8 @@ bool get_GovHydroPID2_g0(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_g1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g1; if (!buffer.str().empty()) @@ -443,7 +445,8 @@ bool get_GovHydroPID2_g1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_g2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g2; if (!buffer.str().empty()) @@ -457,7 +460,8 @@ bool get_GovHydroPID2_g2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmax; if (!buffer.str().empty()) @@ -471,7 +475,8 @@ bool get_GovHydroPID2_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPID2_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmin; if (!buffer.str().empty()) @@ -485,7 +490,8 @@ bool get_GovHydroPID2_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPID2_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -499,7 +505,8 @@ bool get_GovHydroPID2_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -513,7 +520,8 @@ bool get_GovHydroPID2_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -527,7 +535,8 @@ bool get_GovHydroPID2_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -541,7 +550,8 @@ bool get_GovHydroPID2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPID2_p1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p1; if (!buffer.str().empty()) @@ -555,7 +565,8 @@ bool get_GovHydroPID2_p1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_p2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p2; if (!buffer.str().empty()) @@ -569,7 +580,8 @@ bool get_GovHydroPID2_p2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_p3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p3; if (!buffer.str().empty()) @@ -583,7 +595,8 @@ bool get_GovHydroPID2_p3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rperm; if (!buffer.str().empty()) @@ -597,7 +610,8 @@ bool get_GovHydroPID2_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPID2_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -611,7 +625,8 @@ bool get_GovHydroPID2_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -625,7 +640,8 @@ bool get_GovHydroPID2_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_treg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->treg; if (!buffer.str().empty()) @@ -639,7 +655,8 @@ bool get_GovHydroPID2_treg(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPID2_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -653,7 +670,8 @@ bool get_GovHydroPID2_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_velmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velmax; if (!buffer.str().empty()) @@ -667,7 +685,8 @@ bool get_GovHydroPID2_velmax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPID2_velmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velmin; if (!buffer.str().empty()) @@ -679,8 +698,6 @@ bool get_GovHydroPID2_velmin(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char GovHydroPID2::debugName[] = "GovHydroPID2"; const char* GovHydroPID2::debugString() const { @@ -689,33 +706,33 @@ const char* GovHydroPID2::debugString() const void GovHydroPID2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroPID2"), &GovHydroPID2_factory)); + factory_map.emplace("cim:GovHydroPID2", &GovHydroPID2_factory); } void GovHydroPID2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.atw"), &assign_GovHydroPID2_atw)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.d"), &assign_GovHydroPID2_d)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.feedbackSignal"), &assign_GovHydroPID2_feedbackSignal)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.g0"), &assign_GovHydroPID2_g0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.g1"), &assign_GovHydroPID2_g1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.g2"), &assign_GovHydroPID2_g2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.gmax"), &assign_GovHydroPID2_gmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.gmin"), &assign_GovHydroPID2_gmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.kd"), &assign_GovHydroPID2_kd)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.ki"), &assign_GovHydroPID2_ki)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.kp"), &assign_GovHydroPID2_kp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.mwbase"), &assign_GovHydroPID2_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.p1"), &assign_GovHydroPID2_p1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.p2"), &assign_GovHydroPID2_p2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.p3"), &assign_GovHydroPID2_p3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.rperm"), &assign_GovHydroPID2_rperm)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.ta"), &assign_GovHydroPID2_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.tb"), &assign_GovHydroPID2_tb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.treg"), &assign_GovHydroPID2_treg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.tw"), &assign_GovHydroPID2_tw)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.velmax"), &assign_GovHydroPID2_velmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.velmin"), &assign_GovHydroPID2_velmin)); + assign_map.emplace("cim:GovHydroPID2.atw", &assign_GovHydroPID2_atw); + assign_map.emplace("cim:GovHydroPID2.d", &assign_GovHydroPID2_d); + assign_map.emplace("cim:GovHydroPID2.feedbackSignal", &assign_GovHydroPID2_feedbackSignal); + assign_map.emplace("cim:GovHydroPID2.g0", &assign_GovHydroPID2_g0); + assign_map.emplace("cim:GovHydroPID2.g1", &assign_GovHydroPID2_g1); + assign_map.emplace("cim:GovHydroPID2.g2", &assign_GovHydroPID2_g2); + assign_map.emplace("cim:GovHydroPID2.gmax", &assign_GovHydroPID2_gmax); + assign_map.emplace("cim:GovHydroPID2.gmin", &assign_GovHydroPID2_gmin); + assign_map.emplace("cim:GovHydroPID2.kd", &assign_GovHydroPID2_kd); + assign_map.emplace("cim:GovHydroPID2.ki", &assign_GovHydroPID2_ki); + assign_map.emplace("cim:GovHydroPID2.kp", &assign_GovHydroPID2_kp); + assign_map.emplace("cim:GovHydroPID2.mwbase", &assign_GovHydroPID2_mwbase); + assign_map.emplace("cim:GovHydroPID2.p1", &assign_GovHydroPID2_p1); + assign_map.emplace("cim:GovHydroPID2.p2", &assign_GovHydroPID2_p2); + assign_map.emplace("cim:GovHydroPID2.p3", &assign_GovHydroPID2_p3); + assign_map.emplace("cim:GovHydroPID2.rperm", &assign_GovHydroPID2_rperm); + assign_map.emplace("cim:GovHydroPID2.ta", &assign_GovHydroPID2_ta); + assign_map.emplace("cim:GovHydroPID2.tb", &assign_GovHydroPID2_tb); + assign_map.emplace("cim:GovHydroPID2.treg", &assign_GovHydroPID2_treg); + assign_map.emplace("cim:GovHydroPID2.tw", &assign_GovHydroPID2_tw); + assign_map.emplace("cim:GovHydroPID2.velmax", &assign_GovHydroPID2_velmax); + assign_map.emplace("cim:GovHydroPID2.velmin", &assign_GovHydroPID2_velmin); } void GovHydroPID2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/GovHydroPID2.hpp b/CGMES_2.4.15_27JAN2020/GovHydroPID2.hpp index 5f5d7c1fb..3bbeb694e 100644 --- a/CGMES_2.4.15_27JAN2020/GovHydroPID2.hpp +++ b/CGMES_2.4.15_27JAN2020/GovHydroPID2.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Hydro turbine and governor. Represents plants with straight forward penstock configurations and "three term" electro-hydraulic governors (i.e. Woodard electronic). - */ + /** \brief Hydro turbine and governor. Represents plants with straight forward penstock configurations and "three term" electro-hydraulic governors (i.e. Woodard electronic). */ class GovHydroPID2 : public TurbineGovernorDynamics { public: @@ -31,28 +29,71 @@ namespace CIMPP GovHydroPID2(); ~GovHydroPID2() override; - CIMPP::PU atw; /* Factor multiplying Tw (Atw). Typical Value = 0. Default: nullptr */ - CIMPP::PU d; /* Turbine damping factor (D). Unit = delta P / delta speed. Typical Value = 0. Default: nullptr */ - CIMPP::Boolean feedbackSignal; /* Feedback signal type flag (Flag). true = use gate position feedback signal false = use Pe. Default: false */ - CIMPP::PU g0; /* Gate opening at speed no load (G0). Typical Value = 0. Default: nullptr */ - CIMPP::PU g1; /* Intermediate gate opening (G1). Typical Value = 0. Default: nullptr */ - CIMPP::PU g2; /* Intermediate gate opening (G2). Typical Value = 0. Default: nullptr */ - CIMPP::PU gmax; /* Maximum gate opening (Gmax). Typical Value = 0. Default: nullptr */ - CIMPP::PU gmin; /* Minimum gate opening (Gmin). Typical Value = 0. Default: nullptr */ - CIMPP::PU kd; /* Derivative gain (Kd). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float ki; /* Reset gain (Ki). Unit = PU/ sec. Typical Value = 0. Default: nullptr */ - CIMPP::PU kp; /* Proportional gain (Kp). Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU p1; /* Power at gate opening G1 (P1). Typical Value = 0. Default: nullptr */ - CIMPP::PU p2; /* Power at gate opening G2 (P2). Typical Value = 0. Default: nullptr */ - CIMPP::PU p3; /* Power at full opened gate (P3). Typical Value = 0. Default: nullptr */ - CIMPP::PU rperm; /* Permanent drop (Rperm). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ta; /* Controller time constant (Ta) (>0). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tb; /* Gate servo time constant (Tb) (>0). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds treg; /* Speed detector time constant (Treg). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tw; /* Water inertia time constant (Tw) (>0). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float velmax; /* Maximum gate opening velocity (Velmax). Unit = PU/sec. Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float velmin; /* Maximum gate closing velocity (Velmin). Unit = PU/sec. Typical Value = 0. Default: nullptr */ + /** \brief Factor multiplying Tw (Atw). Typical Value = 0. Default: nullptr */ + CIMPP::PU atw; + + /** \brief Turbine damping factor (D). Unit = delta P / delta speed. Typical Value = 0. Default: nullptr */ + CIMPP::PU d; + + /** \brief Feedback signal type flag (Flag). true = use gate position feedback signal false = use Pe. Default: false */ + CIMPP::Boolean feedbackSignal; + + /** \brief Gate opening at speed no load (G0). Typical Value = 0. Default: nullptr */ + CIMPP::PU g0; + + /** \brief Intermediate gate opening (G1). Typical Value = 0. Default: nullptr */ + CIMPP::PU g1; + + /** \brief Intermediate gate opening (G2). Typical Value = 0. Default: nullptr */ + CIMPP::PU g2; + + /** \brief Maximum gate opening (Gmax). Typical Value = 0. Default: nullptr */ + CIMPP::PU gmax; + + /** \brief Minimum gate opening (Gmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU gmin; + + /** \brief Derivative gain (Kd). Typical Value = 0. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Reset gain (Ki). Unit = PU/ sec. Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float ki; + + /** \brief Proportional gain (Kp). Typical Value = 0. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Power at gate opening G1 (P1). Typical Value = 0. Default: nullptr */ + CIMPP::PU p1; + + /** \brief Power at gate opening G2 (P2). Typical Value = 0. Default: nullptr */ + CIMPP::PU p2; + + /** \brief Power at full opened gate (P3). Typical Value = 0. Default: nullptr */ + CIMPP::PU p3; + + /** \brief Permanent drop (Rperm). Typical Value = 0. Default: nullptr */ + CIMPP::PU rperm; + + /** \brief Controller time constant (Ta) (>0). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Gate servo time constant (Tb) (>0). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Speed detector time constant (Treg). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds treg; + + /** \brief Water inertia time constant (Tw) (>0). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tw; + + /** \brief Maximum gate opening velocity (Velmax). Unit = PU/sec. Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float velmax; + + /** \brief Maximum gate closing velocity (Velmin). Unit = PU/sec. Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float velmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GovHydroPelton.cpp b/CGMES_2.4.15_27JAN2020/GovHydroPelton.cpp index a2ef71006..1f8f2bbfe 100644 --- a/CGMES_2.4.15_27JAN2020/GovHydroPelton.cpp +++ b/CGMES_2.4.15_27JAN2020/GovHydroPelton.cpp @@ -8,39 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Area.hpp" -#include "Area.hpp" -#include "PU.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "Length.hpp" -#include "Length.hpp" -#include "Length.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "VolumeFlowRate.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Length.hpp" using namespace CIMPP; -GovHydroPelton::GovHydroPelton() {}; -GovHydroPelton::~GovHydroPelton() {}; +GovHydroPelton::GovHydroPelton() {} +GovHydroPelton::~GovHydroPelton() {} static const std::list PossibleProfilesForClass = { @@ -94,376 +66,402 @@ GovHydroPelton::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroPelton_av0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_av0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->av0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_av1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_av1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->av1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_bp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_bp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_h1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_h1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->h1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_h2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_h2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->h2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_hn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_hn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->hn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_qc0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_qc0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qc0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_qn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_qn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_simplifiedPelton(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_simplifiedPelton(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->simplifiedPelton; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_staticCompensating(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_staticCompensating(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->staticCompensating; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_ts(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_ts(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_tv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_tv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_twnc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_twnc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->twnc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_twng(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_twng(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->twng; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_tx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_tx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_va(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_va(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->va; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_valvmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_valvmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->valvmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_valvmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_valvmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->valvmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_vav(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_vav(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vav; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_vc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_vc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_vcv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_vcv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vcv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_waterTunnelSurgeChamberSimulation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_waterTunnelSurgeChamberSimulation(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->waterTunnelSurgeChamberSimulation; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_zsfc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_zsfc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->zsfc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroPelton_av0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->av0; if (!buffer.str().empty()) @@ -477,7 +475,8 @@ bool get_GovHydroPelton_av0(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPelton_av1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->av1; if (!buffer.str().empty()) @@ -491,7 +490,8 @@ bool get_GovHydroPelton_av1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPelton_bp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bp; if (!buffer.str().empty()) @@ -505,7 +505,8 @@ bool get_GovHydroPelton_bp(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -519,7 +520,8 @@ bool get_GovHydroPelton_db1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPelton_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -533,7 +535,8 @@ bool get_GovHydroPelton_db2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPelton_h1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->h1; if (!buffer.str().empty()) @@ -547,7 +550,8 @@ bool get_GovHydroPelton_h1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_h2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->h2; if (!buffer.str().empty()) @@ -561,7 +565,8 @@ bool get_GovHydroPelton_h2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_hn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hn; if (!buffer.str().empty()) @@ -575,7 +580,8 @@ bool get_GovHydroPelton_hn(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -589,7 +595,8 @@ bool get_GovHydroPelton_kc(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -603,7 +610,8 @@ bool get_GovHydroPelton_kg(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_qc0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qc0; if (!buffer.str().empty()) @@ -617,7 +625,8 @@ bool get_GovHydroPelton_qc0(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPelton_qn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qn; if (!buffer.str().empty()) @@ -631,7 +640,8 @@ bool get_GovHydroPelton_qn(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_simplifiedPelton(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->simplifiedPelton; if (!buffer.str().empty()) @@ -645,7 +655,8 @@ bool get_GovHydroPelton_simplifiedPelton(const BaseClass* BaseClass_ptr1, std::s bool get_GovHydroPelton_staticCompensating(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->staticCompensating; if (!buffer.str().empty()) @@ -659,7 +670,8 @@ bool get_GovHydroPelton_staticCompensating(const BaseClass* BaseClass_ptr1, std: bool get_GovHydroPelton_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -673,7 +685,8 @@ bool get_GovHydroPelton_ta(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_ts(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts; if (!buffer.str().empty()) @@ -687,7 +700,8 @@ bool get_GovHydroPelton_ts(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_tv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tv; if (!buffer.str().empty()) @@ -701,7 +715,8 @@ bool get_GovHydroPelton_tv(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_twnc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twnc; if (!buffer.str().empty()) @@ -715,7 +730,8 @@ bool get_GovHydroPelton_twnc(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPelton_twng(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twng; if (!buffer.str().empty()) @@ -729,7 +745,8 @@ bool get_GovHydroPelton_twng(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPelton_tx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tx; if (!buffer.str().empty()) @@ -743,7 +760,8 @@ bool get_GovHydroPelton_tx(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_va(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->va; if (!buffer.str().empty()) @@ -757,7 +775,8 @@ bool get_GovHydroPelton_va(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_valvmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->valvmax; if (!buffer.str().empty()) @@ -771,7 +790,8 @@ bool get_GovHydroPelton_valvmax(const BaseClass* BaseClass_ptr1, std::stringstre bool get_GovHydroPelton_valvmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->valvmin; if (!buffer.str().empty()) @@ -785,7 +805,8 @@ bool get_GovHydroPelton_valvmin(const BaseClass* BaseClass_ptr1, std::stringstre bool get_GovHydroPelton_vav(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vav; if (!buffer.str().empty()) @@ -799,7 +820,8 @@ bool get_GovHydroPelton_vav(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPelton_vc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vc; if (!buffer.str().empty()) @@ -813,7 +835,8 @@ bool get_GovHydroPelton_vc(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_vcv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vcv; if (!buffer.str().empty()) @@ -827,7 +850,8 @@ bool get_GovHydroPelton_vcv(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPelton_waterTunnelSurgeChamberSimulation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->waterTunnelSurgeChamberSimulation; if (!buffer.str().empty()) @@ -841,7 +865,8 @@ bool get_GovHydroPelton_waterTunnelSurgeChamberSimulation(const BaseClass* BaseC bool get_GovHydroPelton_zsfc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->zsfc; if (!buffer.str().empty()) @@ -853,8 +878,6 @@ bool get_GovHydroPelton_zsfc(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char GovHydroPelton::debugName[] = "GovHydroPelton"; const char* GovHydroPelton::debugString() const { @@ -863,39 +886,39 @@ const char* GovHydroPelton::debugString() const void GovHydroPelton::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroPelton"), &GovHydroPelton_factory)); + factory_map.emplace("cim:GovHydroPelton", &GovHydroPelton_factory); } void GovHydroPelton::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.av0"), &assign_GovHydroPelton_av0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.av1"), &assign_GovHydroPelton_av1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.bp"), &assign_GovHydroPelton_bp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.db1"), &assign_GovHydroPelton_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.db2"), &assign_GovHydroPelton_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.h1"), &assign_GovHydroPelton_h1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.h2"), &assign_GovHydroPelton_h2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.hn"), &assign_GovHydroPelton_hn)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.kc"), &assign_GovHydroPelton_kc)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.kg"), &assign_GovHydroPelton_kg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.qc0"), &assign_GovHydroPelton_qc0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.qn"), &assign_GovHydroPelton_qn)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.simplifiedPelton"), &assign_GovHydroPelton_simplifiedPelton)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.staticCompensating"), &assign_GovHydroPelton_staticCompensating)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.ta"), &assign_GovHydroPelton_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.ts"), &assign_GovHydroPelton_ts)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.tv"), &assign_GovHydroPelton_tv)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.twnc"), &assign_GovHydroPelton_twnc)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.twng"), &assign_GovHydroPelton_twng)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.tx"), &assign_GovHydroPelton_tx)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.va"), &assign_GovHydroPelton_va)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.valvmax"), &assign_GovHydroPelton_valvmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.valvmin"), &assign_GovHydroPelton_valvmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.vav"), &assign_GovHydroPelton_vav)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.vc"), &assign_GovHydroPelton_vc)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.vcv"), &assign_GovHydroPelton_vcv)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.waterTunnelSurgeChamberSimulation"), &assign_GovHydroPelton_waterTunnelSurgeChamberSimulation)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.zsfc"), &assign_GovHydroPelton_zsfc)); + assign_map.emplace("cim:GovHydroPelton.av0", &assign_GovHydroPelton_av0); + assign_map.emplace("cim:GovHydroPelton.av1", &assign_GovHydroPelton_av1); + assign_map.emplace("cim:GovHydroPelton.bp", &assign_GovHydroPelton_bp); + assign_map.emplace("cim:GovHydroPelton.db1", &assign_GovHydroPelton_db1); + assign_map.emplace("cim:GovHydroPelton.db2", &assign_GovHydroPelton_db2); + assign_map.emplace("cim:GovHydroPelton.h1", &assign_GovHydroPelton_h1); + assign_map.emplace("cim:GovHydroPelton.h2", &assign_GovHydroPelton_h2); + assign_map.emplace("cim:GovHydroPelton.hn", &assign_GovHydroPelton_hn); + assign_map.emplace("cim:GovHydroPelton.kc", &assign_GovHydroPelton_kc); + assign_map.emplace("cim:GovHydroPelton.kg", &assign_GovHydroPelton_kg); + assign_map.emplace("cim:GovHydroPelton.qc0", &assign_GovHydroPelton_qc0); + assign_map.emplace("cim:GovHydroPelton.qn", &assign_GovHydroPelton_qn); + assign_map.emplace("cim:GovHydroPelton.simplifiedPelton", &assign_GovHydroPelton_simplifiedPelton); + assign_map.emplace("cim:GovHydroPelton.staticCompensating", &assign_GovHydroPelton_staticCompensating); + assign_map.emplace("cim:GovHydroPelton.ta", &assign_GovHydroPelton_ta); + assign_map.emplace("cim:GovHydroPelton.ts", &assign_GovHydroPelton_ts); + assign_map.emplace("cim:GovHydroPelton.tv", &assign_GovHydroPelton_tv); + assign_map.emplace("cim:GovHydroPelton.twnc", &assign_GovHydroPelton_twnc); + assign_map.emplace("cim:GovHydroPelton.twng", &assign_GovHydroPelton_twng); + assign_map.emplace("cim:GovHydroPelton.tx", &assign_GovHydroPelton_tx); + assign_map.emplace("cim:GovHydroPelton.va", &assign_GovHydroPelton_va); + assign_map.emplace("cim:GovHydroPelton.valvmax", &assign_GovHydroPelton_valvmax); + assign_map.emplace("cim:GovHydroPelton.valvmin", &assign_GovHydroPelton_valvmin); + assign_map.emplace("cim:GovHydroPelton.vav", &assign_GovHydroPelton_vav); + assign_map.emplace("cim:GovHydroPelton.vc", &assign_GovHydroPelton_vc); + assign_map.emplace("cim:GovHydroPelton.vcv", &assign_GovHydroPelton_vcv); + assign_map.emplace("cim:GovHydroPelton.waterTunnelSurgeChamberSimulation", &assign_GovHydroPelton_waterTunnelSurgeChamberSimulation); + assign_map.emplace("cim:GovHydroPelton.zsfc", &assign_GovHydroPelton_zsfc); } void GovHydroPelton::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/GovHydroPelton.hpp b/CGMES_2.4.15_27JAN2020/GovHydroPelton.hpp index 53b3c0d70..8536bb331 100644 --- a/CGMES_2.4.15_27JAN2020/GovHydroPelton.hpp +++ b/CGMES_2.4.15_27JAN2020/GovHydroPelton.hpp @@ -24,9 +24,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Detailed hydro unit - Pelton model. This model can be used to represent the dynamic related to water tunnel and surge chamber. A schematic of the hydraulic system of detailed hydro unit models, like Francis and Pelton, is located under the GovHydroFrancis class. - */ + /** \brief Detailed hydro unit - Pelton model. This model can be used to represent the dynamic related to water tunnel and surge chamber. A schematic of the hydraulic system of detailed hydro unit models, like Francis and Pelton, is located under the GovHydroFrancis class. */ class GovHydroPelton : public TurbineGovernorDynamics { public: @@ -34,34 +32,89 @@ namespace CIMPP GovHydroPelton(); ~GovHydroPelton() override; - CIMPP::Area av0; /* Area of the surge tank (A). Unit = m. Typical Value = 30. Default: nullptr */ - CIMPP::Area av1; /* Area of the compensation tank (A). Unit = m. Typical Value = 700. Default: nullptr */ - CIMPP::PU bp; /* Droop (bp). Typical Value = 0.05. Default: nullptr */ - CIMPP::Frequency db1; /* Intentional dead-band width (DB1). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency db2; /* Intentional dead-band width of valve opening error (DB2). Unit = Hz. Typical Value = 0.01. Default: nullptr */ - CIMPP::Length h1; /* Head of compensation chamber water level with respect to the level of penstock (H). Unit = m. Typical Value = 4. Default: nullptr */ - CIMPP::Length h2; /* Head of surge tank water level with respect to the level of penstock (H). Unit = m. Typical Value = 40. Default: nullptr */ - CIMPP::Length hn; /* Rated hydraulic head (H). Unit = m. Typical Value = 250. Default: nullptr */ - CIMPP::PU kc; /* Penstock loss coefficient (due to friction) (Kc). Typical Value = 0.025. Default: nullptr */ - CIMPP::PU kg; /* Water tunnel and surge chamber loss coefficient (due to friction) (Kg). Typical Value = -0.025. Default: nullptr */ - CIMPP::PU qc0; /* No-load turbine flow at nominal head (Qc0). Typical Value = 0.05. Default: nullptr */ - CIMPP::VolumeFlowRate qn; /* Rated flow (Q). Unit = m/s. Typical Value = 40. Default: nullptr */ - CIMPP::Boolean simplifiedPelton; /* Simplified Pelton model simulation (Sflag). true = enable of simplified Pelton model simulation false = enable of complete Pelton model simulation (non linear gain). Typical Value = false. Default: false */ - CIMPP::Boolean staticCompensating; /* Static compensating characteristic (Cflag). true = enable of static compensating characteristic false = inhibit of static compensating characteristic. Typical Value = false. Default: false */ - CIMPP::Seconds ta; /* Derivative gain (accelerometer time constant) (Ta). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds ts; /* Gate servo time constant (Ts). Typical Value = 0.15. Default: nullptr */ - CIMPP::Seconds tv; /* Servomotor integrator time constant (TV). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds twnc; /* Water inertia time constant (Twnc). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds twng; /* Water tunnel and surge chamber inertia time constant (Twng). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds tx; /* Electronic integrator time constant (Tx). Typical Value = 0.5. Default: nullptr */ - CIMPP::Simple_Float va; /* Maximum gate opening velocity (Va). Unit = PU/sec. Typical Value = 0.016. Default: nullptr */ - CIMPP::PU valvmax; /* Maximum gate opening (ValvMax). Typical Value = 1. Default: nullptr */ - CIMPP::PU valvmin; /* Minimum gate opening (ValvMin). Typical Value = 0. Default: nullptr */ - CIMPP::PU vav; /* Maximum servomotor valve opening velocity (Vav). Typical Value = 0.017. Default: nullptr */ - CIMPP::Simple_Float vc; /* Maximum gate closing velocity (Vc). Unit = PU/sec. Typical Value = -0.016. Default: nullptr */ - CIMPP::PU vcv; /* Maximum servomotor valve closing velocity (Vcv). Typical Value = -0.017. Default: nullptr */ - CIMPP::Boolean waterTunnelSurgeChamberSimulation; /* Water tunnel and surge chamber simulation (Tflag). true = enable of water tunnel and surge chamber simulation false = inhibit of water tunnel and surge chamber simulation. Typical Value = false. Default: false */ - CIMPP::Length zsfc; /* Head of upper water level with respect to the level of penstock (Zsfc). Unit = m. Typical Value = 25. Default: nullptr */ + /** \brief Area of the surge tank (A). Unit = m. Typical Value = 30. Default: nullptr */ + CIMPP::Area av0; + + /** \brief Area of the compensation tank (A). Unit = m. Typical Value = 700. Default: nullptr */ + CIMPP::Area av1; + + /** \brief Droop (bp). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU bp; + + /** \brief Intentional dead-band width (DB1). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Intentional dead-band width of valve opening error (DB2). Unit = Hz. Typical Value = 0.01. Default: nullptr */ + CIMPP::Frequency db2; + + /** \brief Head of compensation chamber water level with respect to the level of penstock (H). Unit = m. Typical Value = 4. Default: nullptr */ + CIMPP::Length h1; + + /** \brief Head of surge tank water level with respect to the level of penstock (H). Unit = m. Typical Value = 40. Default: nullptr */ + CIMPP::Length h2; + + /** \brief Rated hydraulic head (H). Unit = m. Typical Value = 250. Default: nullptr */ + CIMPP::Length hn; + + /** \brief Penstock loss coefficient (due to friction) (Kc). Typical Value = 0.025. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Water tunnel and surge chamber loss coefficient (due to friction) (Kg). Typical Value = -0.025. Default: nullptr */ + CIMPP::PU kg; + + /** \brief No-load turbine flow at nominal head (Qc0). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU qc0; + + /** \brief Rated flow (Q). Unit = m/s. Typical Value = 40. Default: nullptr */ + CIMPP::VolumeFlowRate qn; + + /** \brief Simplified Pelton model simulation (Sflag). true = enable of simplified Pelton model simulation false = enable of complete Pelton model simulation (non linear gain). Typical Value = false. Default: false */ + CIMPP::Boolean simplifiedPelton; + + /** \brief Static compensating characteristic (Cflag). true = enable of static compensating characteristic false = inhibit of static compensating characteristic. Typical Value = false. Default: false */ + CIMPP::Boolean staticCompensating; + + /** \brief Derivative gain (accelerometer time constant) (Ta). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Gate servo time constant (Ts). Typical Value = 0.15. Default: nullptr */ + CIMPP::Seconds ts; + + /** \brief Servomotor integrator time constant (TV). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds tv; + + /** \brief Water inertia time constant (Twnc). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds twnc; + + /** \brief Water tunnel and surge chamber inertia time constant (Twng). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds twng; + + /** \brief Electronic integrator time constant (Tx). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds tx; + + /** \brief Maximum gate opening velocity (Va). Unit = PU/sec. Typical Value = 0.016. Default: nullptr */ + CIMPP::Simple_Float va; + + /** \brief Maximum gate opening (ValvMax). Typical Value = 1. Default: nullptr */ + CIMPP::PU valvmax; + + /** \brief Minimum gate opening (ValvMin). Typical Value = 0. Default: nullptr */ + CIMPP::PU valvmin; + + /** \brief Maximum servomotor valve opening velocity (Vav). Typical Value = 0.017. Default: nullptr */ + CIMPP::PU vav; + + /** \brief Maximum gate closing velocity (Vc). Unit = PU/sec. Typical Value = -0.016. Default: nullptr */ + CIMPP::Simple_Float vc; + + /** \brief Maximum servomotor valve closing velocity (Vcv). Typical Value = -0.017. Default: nullptr */ + CIMPP::PU vcv; + + /** \brief Water tunnel and surge chamber simulation (Tflag). true = enable of water tunnel and surge chamber simulation false = inhibit of water tunnel and surge chamber simulation. Typical Value = false. Default: false */ + CIMPP::Boolean waterTunnelSurgeChamberSimulation; + + /** \brief Head of upper water level with respect to the level of penstock (Zsfc). Unit = m. Typical Value = 25. Default: nullptr */ + CIMPP::Length zsfc; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GovHydroR.cpp b/CGMES_2.4.15_27JAN2020/GovHydroR.cpp index 37199eb2c..b98e8cfc6 100644 --- a/CGMES_2.4.15_27JAN2020/GovHydroR.cpp +++ b/CGMES_2.4.15_27JAN2020/GovHydroR.cpp @@ -8,53 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "Frequency.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "Frequency.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -GovHydroR::GovHydroR() {}; -GovHydroR::~GovHydroR() {}; +GovHydroR::GovHydroR() {} +GovHydroR::~GovHydroR() {} static const std::list PossibleProfilesForClass = { @@ -122,558 +80,598 @@ GovHydroR::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroR_at(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_at(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->at; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_dturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_dturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_eps(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eps; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_gmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_gmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_gmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_gmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_gv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_h0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_h0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->h0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_inputSignal(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_inputSignal(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_pgv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_qnl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_qnl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qnl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_t7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_t8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_t8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_tt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_velcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_velcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velcl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_velop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_velop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroR_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->at; if (!buffer.str().empty()) @@ -687,7 +685,8 @@ bool get_GovHydroR_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -701,7 +700,8 @@ bool get_GovHydroR_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -715,7 +715,8 @@ bool get_GovHydroR_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dturb; if (!buffer.str().empty()) @@ -729,7 +730,8 @@ bool get_GovHydroR_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroR_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eps; if (!buffer.str().empty()) @@ -743,7 +745,8 @@ bool get_GovHydroR_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmax; if (!buffer.str().empty()) @@ -757,7 +760,8 @@ bool get_GovHydroR_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmin; if (!buffer.str().empty()) @@ -771,7 +775,8 @@ bool get_GovHydroR_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -785,7 +790,8 @@ bool get_GovHydroR_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -799,7 +805,8 @@ bool get_GovHydroR_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -813,7 +820,8 @@ bool get_GovHydroR_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -827,7 +835,8 @@ bool get_GovHydroR_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -841,7 +850,8 @@ bool get_GovHydroR_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv6; if (!buffer.str().empty()) @@ -855,7 +865,8 @@ bool get_GovHydroR_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_h0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->h0; if (!buffer.str().empty()) @@ -869,7 +880,8 @@ bool get_GovHydroR_h0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_inputSignal(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inputSignal; if (!buffer.str().empty()) @@ -883,7 +895,8 @@ bool get_GovHydroR_inputSignal(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_GovHydroR_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -897,7 +910,8 @@ bool get_GovHydroR_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -911,7 +925,8 @@ bool get_GovHydroR_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -925,7 +940,8 @@ bool get_GovHydroR_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroR_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -939,7 +955,8 @@ bool get_GovHydroR_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -953,7 +970,8 @@ bool get_GovHydroR_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -967,7 +985,8 @@ bool get_GovHydroR_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -981,7 +1000,8 @@ bool get_GovHydroR_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -995,7 +1015,8 @@ bool get_GovHydroR_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv6; if (!buffer.str().empty()) @@ -1009,7 +1030,8 @@ bool get_GovHydroR_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -1023,7 +1045,8 @@ bool get_GovHydroR_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -1037,7 +1060,8 @@ bool get_GovHydroR_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_qnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qnl; if (!buffer.str().empty()) @@ -1051,7 +1075,8 @@ bool get_GovHydroR_qnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -1065,7 +1090,8 @@ bool get_GovHydroR_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovHydroR_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -1079,7 +1105,8 @@ bool get_GovHydroR_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -1093,7 +1120,8 @@ bool get_GovHydroR_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -1107,7 +1135,8 @@ bool get_GovHydroR_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -1121,7 +1150,8 @@ bool get_GovHydroR_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -1135,7 +1165,8 @@ bool get_GovHydroR_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -1149,7 +1180,8 @@ bool get_GovHydroR_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t7; if (!buffer.str().empty()) @@ -1163,7 +1195,8 @@ bool get_GovHydroR_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t8; if (!buffer.str().empty()) @@ -1177,7 +1210,8 @@ bool get_GovHydroR_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -1191,7 +1225,8 @@ bool get_GovHydroR_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -1205,7 +1240,8 @@ bool get_GovHydroR_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tt; if (!buffer.str().empty()) @@ -1219,7 +1255,8 @@ bool get_GovHydroR_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -1233,7 +1270,8 @@ bool get_GovHydroR_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_velcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velcl; if (!buffer.str().empty()) @@ -1247,7 +1285,8 @@ bool get_GovHydroR_velcl(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroR_velop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velop; if (!buffer.str().empty()) @@ -1259,8 +1298,6 @@ bool get_GovHydroR_velop(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } - - const char GovHydroR::debugName[] = "GovHydroR"; const char* GovHydroR::debugString() const { @@ -1269,53 +1306,53 @@ const char* GovHydroR::debugString() const void GovHydroR::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroR"), &GovHydroR_factory)); + factory_map.emplace("cim:GovHydroR", &GovHydroR_factory); } void GovHydroR::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.at"), &assign_GovHydroR_at)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.db1"), &assign_GovHydroR_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.db2"), &assign_GovHydroR_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.dturb"), &assign_GovHydroR_dturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.eps"), &assign_GovHydroR_eps)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.gmax"), &assign_GovHydroR_gmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.gmin"), &assign_GovHydroR_gmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.gv1"), &assign_GovHydroR_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.gv2"), &assign_GovHydroR_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.gv3"), &assign_GovHydroR_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.gv4"), &assign_GovHydroR_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.gv5"), &assign_GovHydroR_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.gv6"), &assign_GovHydroR_gv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.h0"), &assign_GovHydroR_h0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.inputSignal"), &assign_GovHydroR_inputSignal)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.kg"), &assign_GovHydroR_kg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.ki"), &assign_GovHydroR_ki)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.mwbase"), &assign_GovHydroR_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.pgv1"), &assign_GovHydroR_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.pgv2"), &assign_GovHydroR_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.pgv3"), &assign_GovHydroR_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.pgv4"), &assign_GovHydroR_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.pgv5"), &assign_GovHydroR_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.pgv6"), &assign_GovHydroR_pgv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.pmax"), &assign_GovHydroR_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.pmin"), &assign_GovHydroR_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.qnl"), &assign_GovHydroR_qnl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.r"), &assign_GovHydroR_r)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.t1"), &assign_GovHydroR_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.t2"), &assign_GovHydroR_t2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.t3"), &assign_GovHydroR_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.t4"), &assign_GovHydroR_t4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.t5"), &assign_GovHydroR_t5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.t6"), &assign_GovHydroR_t6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.t7"), &assign_GovHydroR_t7)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.t8"), &assign_GovHydroR_t8)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.td"), &assign_GovHydroR_td)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.tp"), &assign_GovHydroR_tp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.tt"), &assign_GovHydroR_tt)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.tw"), &assign_GovHydroR_tw)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.velcl"), &assign_GovHydroR_velcl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.velop"), &assign_GovHydroR_velop)); + assign_map.emplace("cim:GovHydroR.at", &assign_GovHydroR_at); + assign_map.emplace("cim:GovHydroR.db1", &assign_GovHydroR_db1); + assign_map.emplace("cim:GovHydroR.db2", &assign_GovHydroR_db2); + assign_map.emplace("cim:GovHydroR.dturb", &assign_GovHydroR_dturb); + assign_map.emplace("cim:GovHydroR.eps", &assign_GovHydroR_eps); + assign_map.emplace("cim:GovHydroR.gmax", &assign_GovHydroR_gmax); + assign_map.emplace("cim:GovHydroR.gmin", &assign_GovHydroR_gmin); + assign_map.emplace("cim:GovHydroR.gv1", &assign_GovHydroR_gv1); + assign_map.emplace("cim:GovHydroR.gv2", &assign_GovHydroR_gv2); + assign_map.emplace("cim:GovHydroR.gv3", &assign_GovHydroR_gv3); + assign_map.emplace("cim:GovHydroR.gv4", &assign_GovHydroR_gv4); + assign_map.emplace("cim:GovHydroR.gv5", &assign_GovHydroR_gv5); + assign_map.emplace("cim:GovHydroR.gv6", &assign_GovHydroR_gv6); + assign_map.emplace("cim:GovHydroR.h0", &assign_GovHydroR_h0); + assign_map.emplace("cim:GovHydroR.inputSignal", &assign_GovHydroR_inputSignal); + assign_map.emplace("cim:GovHydroR.kg", &assign_GovHydroR_kg); + assign_map.emplace("cim:GovHydroR.ki", &assign_GovHydroR_ki); + assign_map.emplace("cim:GovHydroR.mwbase", &assign_GovHydroR_mwbase); + assign_map.emplace("cim:GovHydroR.pgv1", &assign_GovHydroR_pgv1); + assign_map.emplace("cim:GovHydroR.pgv2", &assign_GovHydroR_pgv2); + assign_map.emplace("cim:GovHydroR.pgv3", &assign_GovHydroR_pgv3); + assign_map.emplace("cim:GovHydroR.pgv4", &assign_GovHydroR_pgv4); + assign_map.emplace("cim:GovHydroR.pgv5", &assign_GovHydroR_pgv5); + assign_map.emplace("cim:GovHydroR.pgv6", &assign_GovHydroR_pgv6); + assign_map.emplace("cim:GovHydroR.pmax", &assign_GovHydroR_pmax); + assign_map.emplace("cim:GovHydroR.pmin", &assign_GovHydroR_pmin); + assign_map.emplace("cim:GovHydroR.qnl", &assign_GovHydroR_qnl); + assign_map.emplace("cim:GovHydroR.r", &assign_GovHydroR_r); + assign_map.emplace("cim:GovHydroR.t1", &assign_GovHydroR_t1); + assign_map.emplace("cim:GovHydroR.t2", &assign_GovHydroR_t2); + assign_map.emplace("cim:GovHydroR.t3", &assign_GovHydroR_t3); + assign_map.emplace("cim:GovHydroR.t4", &assign_GovHydroR_t4); + assign_map.emplace("cim:GovHydroR.t5", &assign_GovHydroR_t5); + assign_map.emplace("cim:GovHydroR.t6", &assign_GovHydroR_t6); + assign_map.emplace("cim:GovHydroR.t7", &assign_GovHydroR_t7); + assign_map.emplace("cim:GovHydroR.t8", &assign_GovHydroR_t8); + assign_map.emplace("cim:GovHydroR.td", &assign_GovHydroR_td); + assign_map.emplace("cim:GovHydroR.tp", &assign_GovHydroR_tp); + assign_map.emplace("cim:GovHydroR.tt", &assign_GovHydroR_tt); + assign_map.emplace("cim:GovHydroR.tw", &assign_GovHydroR_tw); + assign_map.emplace("cim:GovHydroR.velcl", &assign_GovHydroR_velcl); + assign_map.emplace("cim:GovHydroR.velop", &assign_GovHydroR_velop); } void GovHydroR::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/GovHydroR.hpp b/CGMES_2.4.15_27JAN2020/GovHydroR.hpp index 77138dc46..a14a39e56 100644 --- a/CGMES_2.4.15_27JAN2020/GovHydroR.hpp +++ b/CGMES_2.4.15_27JAN2020/GovHydroR.hpp @@ -22,9 +22,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Fourth order lead-lag governor and hydro turbine. - */ + /** \brief Fourth order lead-lag governor and hydro turbine. */ class GovHydroR : public TurbineGovernorDynamics { public: @@ -32,48 +30,131 @@ namespace CIMPP GovHydroR(); ~GovHydroR() override; - CIMPP::PU at; /* Turbine gain (At). Typical Value = 1.2. Default: nullptr */ - CIMPP::Frequency db1; /* Intentional dead-band width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower db2; /* Unintentional dead-band (db2). Unit = MW. Typical Value = 0. Default: nullptr */ - CIMPP::PU dturb; /* Turbine damping factor (Dturb). Typical Value = 0.2. Default: nullptr */ - CIMPP::Frequency eps; /* Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::PU gmax; /* Maximum governor output (Gmax). Typical Value = 1.05. Default: nullptr */ - CIMPP::PU gmin; /* Minimum governor output (Gmin). Typical Value = -0.05. Default: nullptr */ - CIMPP::PU gv1; /* Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv6; /* Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU h0; /* Turbine nominal head (H0). Typical Value = 1. Default: nullptr */ - CIMPP::Boolean inputSignal; /* Input signal switch (Flag). true = Pe input is used false = feedback is received from CV. Flag is normally dependent on Tt. If Tf is zero, Flag is set to false. If Tf is not zero, Flag is set to true. Typical Value = true. Default: false */ - CIMPP::PU kg; /* Gate servo gain (Kg). Typical Value = 2. Default: nullptr */ - CIMPP::PU ki; /* Integral gain (Ki). Typical Value = 0.5. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv6; /* Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU pmax; /* Maximum gate opening, PU of MWbase (Pmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum gate opening, PU of MWbase (Pmin). Typical Value = 0. Default: nullptr */ - CIMPP::PU qnl; /* No-load turbine flow at nominal head (Qnl). Typical Value = 0.08. Default: nullptr */ - CIMPP::PU r; /* Steady-state droop (R). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds t1; /* Lead time constant 1 (T1). Typical Value = 1.5. Default: nullptr */ - CIMPP::Seconds t2; /* Lag time constant 1 (T2). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t3; /* Lead time constant 2 (T3). Typical Value = 1.5. Default: nullptr */ - CIMPP::Seconds t4; /* Lag time constant 2 (T4). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t5; /* Lead time constant 3 (T5). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t6; /* Lag time constant 3 (T6). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds t7; /* Lead time constant 4 (T7). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t8; /* Lag time constant 4 (T8). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds td; /* Input filter time constant (Td). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds tp; /* Gate servo time constant (Tp). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds tt; /* Power feedback time constant (Tt). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tw; /* Water inertia time constant (Tw). Typical Value = 1. Default: nullptr */ - CIMPP::Simple_Float velcl; /* Maximum gate closing velocity (Velcl). Unit = PU/sec. Typical Value = -0.2. Default: nullptr */ - CIMPP::Simple_Float velop; /* Maximum gate opening velocity (Velop). Unit = PU/sec. Typical Value = 0.2. Default: nullptr */ + /** \brief Turbine gain (At). Typical Value = 1.2. Default: nullptr */ + CIMPP::PU at; + + /** \brief Intentional dead-band width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Unintentional dead-band (db2). Unit = MW. Typical Value = 0. Default: nullptr */ + CIMPP::ActivePower db2; + + /** \brief Turbine damping factor (Dturb). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU dturb; + + /** \brief Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency eps; + + /** \brief Maximum governor output (Gmax). Typical Value = 1.05. Default: nullptr */ + CIMPP::PU gmax; + + /** \brief Minimum governor output (Gmin). Typical Value = -0.05. Default: nullptr */ + CIMPP::PU gmin; + + /** \brief Nonlinear gain point 1, PU gv (Gv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain point 2, PU gv (Gv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain point 3, PU gv (Gv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain point 4, PU gv (Gv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain point 5, PU gv (Gv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Nonlinear gain point 6, PU gv (Gv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv6; + + /** \brief Turbine nominal head (H0). Typical Value = 1. Default: nullptr */ + CIMPP::PU h0; + + /** \brief Input signal switch (Flag). true = Pe input is used false = feedback is received from CV. Flag is normally dependent on Tt. If Tf is zero, Flag is set to false. If Tf is not zero, Flag is set to true. Typical Value = true. Default: false */ + CIMPP::Boolean inputSignal; + + /** \brief Gate servo gain (Kg). Typical Value = 2. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Integral gain (Ki). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain point 1, PU power (Pgv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain point 2, PU power (Pgv2). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain point 3, PU power (Pgv3). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain point 4, PU power (Pgv4). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain point 5, PU power (Pgv5). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief Nonlinear gain point 6, PU power (Pgv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv6; + + /** \brief Maximum gate opening, PU of MWbase (Pmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum gate opening, PU of MWbase (Pmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief No-load turbine flow at nominal head (Qnl). Typical Value = 0.08. Default: nullptr */ + CIMPP::PU qnl; + + /** \brief Steady-state droop (R). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU r; + + /** \brief Lead time constant 1 (T1). Typical Value = 1.5. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Lag time constant 1 (T2). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Lead time constant 2 (T3). Typical Value = 1.5. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Lag time constant 2 (T4). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Lead time constant 3 (T5). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Lag time constant 3 (T6). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Lead time constant 4 (T7). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t7; + + /** \brief Lag time constant 4 (T8). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds t8; + + /** \brief Input filter time constant (Td). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Gate servo time constant (Tp). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Power feedback time constant (Tt). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tt; + + /** \brief Water inertia time constant (Tw). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tw; + + /** \brief Maximum gate closing velocity (Velcl). Unit = PU/sec. Typical Value = -0.2. Default: nullptr */ + CIMPP::Simple_Float velcl; + + /** \brief Maximum gate opening velocity (Velop). Unit = PU/sec. Typical Value = 0.2. Default: nullptr */ + CIMPP::Simple_Float velop; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GovHydroWEH.cpp b/CGMES_2.4.15_27JAN2020/GovHydroWEH.cpp index 7a8ac432b..a59096688 100644 --- a/CGMES_2.4.15_27JAN2020/GovHydroWEH.cpp +++ b/CGMES_2.4.15_27JAN2020/GovHydroWEH.cpp @@ -8,62 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -GovHydroWEH::GovHydroWEH() {}; -GovHydroWEH::~GovHydroWEH() {}; +GovHydroWEH::GovHydroWEH() {} +GovHydroWEH::~GovHydroWEH() {} static const std::list PossibleProfilesForClass = { @@ -140,675 +89,724 @@ GovHydroWEH::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroWEH_db(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_db(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_dicn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_dicn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dicn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_dpv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_dpv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dpv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_dturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_dturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_feedbackSignal(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_feedbackSignal(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->feedbackSignal; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fl1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fl1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fl2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fl2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fl3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fl3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fl3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fl4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fl4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fl4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fl5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fl5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fl5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_gmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_gmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_gmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_gmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_gtmxcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_gtmxcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gtmxcl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_gtmxop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_gtmxop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gtmxop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_rpg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_rpg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rpg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_rpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_rpp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rpp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_tdv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_tdv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_tpe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_tpe(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpe; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroWEH_db(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db; if (!buffer.str().empty()) @@ -822,7 +820,8 @@ bool get_GovHydroWEH_db(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroWEH_dicn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dicn; if (!buffer.str().empty()) @@ -836,7 +835,8 @@ bool get_GovHydroWEH_dicn(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroWEH_dpv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dpv; if (!buffer.str().empty()) @@ -850,7 +850,8 @@ bool get_GovHydroWEH_dpv(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dturb; if (!buffer.str().empty()) @@ -864,7 +865,8 @@ bool get_GovHydroWEH_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_feedbackSignal(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->feedbackSignal; if (!buffer.str().empty()) @@ -878,7 +880,8 @@ bool get_GovHydroWEH_feedbackSignal(const BaseClass* BaseClass_ptr1, std::string bool get_GovHydroWEH_fl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fl1; if (!buffer.str().empty()) @@ -892,7 +895,8 @@ bool get_GovHydroWEH_fl1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fl2; if (!buffer.str().empty()) @@ -906,7 +910,8 @@ bool get_GovHydroWEH_fl2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fl3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fl3; if (!buffer.str().empty()) @@ -920,7 +925,8 @@ bool get_GovHydroWEH_fl3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fl4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fl4; if (!buffer.str().empty()) @@ -934,7 +940,8 @@ bool get_GovHydroWEH_fl4(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fl5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fl5; if (!buffer.str().empty()) @@ -948,7 +955,8 @@ bool get_GovHydroWEH_fl5(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fp1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp1; if (!buffer.str().empty()) @@ -962,7 +970,8 @@ bool get_GovHydroWEH_fp1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fp10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp10; if (!buffer.str().empty()) @@ -976,7 +985,8 @@ bool get_GovHydroWEH_fp10(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroWEH_fp2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp2; if (!buffer.str().empty()) @@ -990,7 +1000,8 @@ bool get_GovHydroWEH_fp2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fp3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp3; if (!buffer.str().empty()) @@ -1004,7 +1015,8 @@ bool get_GovHydroWEH_fp3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fp4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp4; if (!buffer.str().empty()) @@ -1018,7 +1030,8 @@ bool get_GovHydroWEH_fp4(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fp5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp5; if (!buffer.str().empty()) @@ -1032,7 +1045,8 @@ bool get_GovHydroWEH_fp5(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fp6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp6; if (!buffer.str().empty()) @@ -1046,7 +1060,8 @@ bool get_GovHydroWEH_fp6(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fp7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp7; if (!buffer.str().empty()) @@ -1060,7 +1075,8 @@ bool get_GovHydroWEH_fp7(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fp8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp8; if (!buffer.str().empty()) @@ -1074,7 +1090,8 @@ bool get_GovHydroWEH_fp8(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fp9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp9; if (!buffer.str().empty()) @@ -1088,7 +1105,8 @@ bool get_GovHydroWEH_fp9(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmax; if (!buffer.str().empty()) @@ -1102,7 +1120,8 @@ bool get_GovHydroWEH_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroWEH_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmin; if (!buffer.str().empty()) @@ -1116,7 +1135,8 @@ bool get_GovHydroWEH_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroWEH_gtmxcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gtmxcl; if (!buffer.str().empty()) @@ -1130,7 +1150,8 @@ bool get_GovHydroWEH_gtmxcl(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroWEH_gtmxop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gtmxop; if (!buffer.str().empty()) @@ -1144,7 +1165,8 @@ bool get_GovHydroWEH_gtmxop(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroWEH_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -1158,7 +1180,8 @@ bool get_GovHydroWEH_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -1172,7 +1195,8 @@ bool get_GovHydroWEH_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -1186,7 +1210,8 @@ bool get_GovHydroWEH_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -1200,7 +1225,8 @@ bool get_GovHydroWEH_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -1214,7 +1240,8 @@ bool get_GovHydroWEH_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -1228,7 +1255,8 @@ bool get_GovHydroWEH_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroWEH_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -1242,7 +1270,8 @@ bool get_GovHydroWEH_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroWEH_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -1256,7 +1285,8 @@ bool get_GovHydroWEH_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroWEH_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -1270,7 +1300,8 @@ bool get_GovHydroWEH_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroWEH_pmss1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss1; if (!buffer.str().empty()) @@ -1284,7 +1315,8 @@ bool get_GovHydroWEH_pmss1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_pmss10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss10; if (!buffer.str().empty()) @@ -1298,7 +1330,8 @@ bool get_GovHydroWEH_pmss10(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroWEH_pmss2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss2; if (!buffer.str().empty()) @@ -1312,7 +1345,8 @@ bool get_GovHydroWEH_pmss2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_pmss3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss3; if (!buffer.str().empty()) @@ -1326,7 +1360,8 @@ bool get_GovHydroWEH_pmss3(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_pmss4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss4; if (!buffer.str().empty()) @@ -1340,7 +1375,8 @@ bool get_GovHydroWEH_pmss4(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_pmss5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss5; if (!buffer.str().empty()) @@ -1354,7 +1390,8 @@ bool get_GovHydroWEH_pmss5(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_pmss6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss6; if (!buffer.str().empty()) @@ -1368,7 +1405,8 @@ bool get_GovHydroWEH_pmss6(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_pmss7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss7; if (!buffer.str().empty()) @@ -1382,7 +1420,8 @@ bool get_GovHydroWEH_pmss7(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_pmss8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss8; if (!buffer.str().empty()) @@ -1396,7 +1435,8 @@ bool get_GovHydroWEH_pmss8(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_pmss9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss9; if (!buffer.str().empty()) @@ -1410,7 +1450,8 @@ bool get_GovHydroWEH_pmss9(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_rpg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rpg; if (!buffer.str().empty()) @@ -1424,7 +1465,8 @@ bool get_GovHydroWEH_rpg(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_rpp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rpp; if (!buffer.str().empty()) @@ -1438,7 +1480,8 @@ bool get_GovHydroWEH_rpp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -1452,7 +1495,8 @@ bool get_GovHydroWEH_td(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroWEH_tdv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdv; if (!buffer.str().empty()) @@ -1466,7 +1510,8 @@ bool get_GovHydroWEH_tdv(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -1480,7 +1525,8 @@ bool get_GovHydroWEH_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroWEH_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -1494,7 +1540,8 @@ bool get_GovHydroWEH_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroWEH_tpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpe; if (!buffer.str().empty()) @@ -1508,7 +1555,8 @@ bool get_GovHydroWEH_tpe(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -1520,8 +1568,6 @@ bool get_GovHydroWEH_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char GovHydroWEH::debugName[] = "GovHydroWEH"; const char* GovHydroWEH::debugString() const { @@ -1530,62 +1576,62 @@ const char* GovHydroWEH::debugString() const void GovHydroWEH::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroWEH"), &GovHydroWEH_factory)); + factory_map.emplace("cim:GovHydroWEH", &GovHydroWEH_factory); } void GovHydroWEH::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.db"), &assign_GovHydroWEH_db)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.dicn"), &assign_GovHydroWEH_dicn)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.dpv"), &assign_GovHydroWEH_dpv)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.dturb"), &assign_GovHydroWEH_dturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.feedbackSignal"), &assign_GovHydroWEH_feedbackSignal)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fl1"), &assign_GovHydroWEH_fl1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fl2"), &assign_GovHydroWEH_fl2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fl3"), &assign_GovHydroWEH_fl3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fl4"), &assign_GovHydroWEH_fl4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fl5"), &assign_GovHydroWEH_fl5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp1"), &assign_GovHydroWEH_fp1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp10"), &assign_GovHydroWEH_fp10)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp2"), &assign_GovHydroWEH_fp2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp3"), &assign_GovHydroWEH_fp3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp4"), &assign_GovHydroWEH_fp4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp5"), &assign_GovHydroWEH_fp5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp6"), &assign_GovHydroWEH_fp6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp7"), &assign_GovHydroWEH_fp7)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp8"), &assign_GovHydroWEH_fp8)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp9"), &assign_GovHydroWEH_fp9)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.gmax"), &assign_GovHydroWEH_gmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.gmin"), &assign_GovHydroWEH_gmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.gtmxcl"), &assign_GovHydroWEH_gtmxcl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.gtmxop"), &assign_GovHydroWEH_gtmxop)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.gv1"), &assign_GovHydroWEH_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.gv2"), &assign_GovHydroWEH_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.gv3"), &assign_GovHydroWEH_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.gv4"), &assign_GovHydroWEH_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.gv5"), &assign_GovHydroWEH_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.kd"), &assign_GovHydroWEH_kd)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.ki"), &assign_GovHydroWEH_ki)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.kp"), &assign_GovHydroWEH_kp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.mwbase"), &assign_GovHydroWEH_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss1"), &assign_GovHydroWEH_pmss1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss10"), &assign_GovHydroWEH_pmss10)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss2"), &assign_GovHydroWEH_pmss2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss3"), &assign_GovHydroWEH_pmss3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss4"), &assign_GovHydroWEH_pmss4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss5"), &assign_GovHydroWEH_pmss5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss6"), &assign_GovHydroWEH_pmss6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss7"), &assign_GovHydroWEH_pmss7)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss8"), &assign_GovHydroWEH_pmss8)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss9"), &assign_GovHydroWEH_pmss9)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.rpg"), &assign_GovHydroWEH_rpg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.rpp"), &assign_GovHydroWEH_rpp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.td"), &assign_GovHydroWEH_td)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.tdv"), &assign_GovHydroWEH_tdv)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.tg"), &assign_GovHydroWEH_tg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.tp"), &assign_GovHydroWEH_tp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.tpe"), &assign_GovHydroWEH_tpe)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.tw"), &assign_GovHydroWEH_tw)); + assign_map.emplace("cim:GovHydroWEH.db", &assign_GovHydroWEH_db); + assign_map.emplace("cim:GovHydroWEH.dicn", &assign_GovHydroWEH_dicn); + assign_map.emplace("cim:GovHydroWEH.dpv", &assign_GovHydroWEH_dpv); + assign_map.emplace("cim:GovHydroWEH.dturb", &assign_GovHydroWEH_dturb); + assign_map.emplace("cim:GovHydroWEH.feedbackSignal", &assign_GovHydroWEH_feedbackSignal); + assign_map.emplace("cim:GovHydroWEH.fl1", &assign_GovHydroWEH_fl1); + assign_map.emplace("cim:GovHydroWEH.fl2", &assign_GovHydroWEH_fl2); + assign_map.emplace("cim:GovHydroWEH.fl3", &assign_GovHydroWEH_fl3); + assign_map.emplace("cim:GovHydroWEH.fl4", &assign_GovHydroWEH_fl4); + assign_map.emplace("cim:GovHydroWEH.fl5", &assign_GovHydroWEH_fl5); + assign_map.emplace("cim:GovHydroWEH.fp1", &assign_GovHydroWEH_fp1); + assign_map.emplace("cim:GovHydroWEH.fp10", &assign_GovHydroWEH_fp10); + assign_map.emplace("cim:GovHydroWEH.fp2", &assign_GovHydroWEH_fp2); + assign_map.emplace("cim:GovHydroWEH.fp3", &assign_GovHydroWEH_fp3); + assign_map.emplace("cim:GovHydroWEH.fp4", &assign_GovHydroWEH_fp4); + assign_map.emplace("cim:GovHydroWEH.fp5", &assign_GovHydroWEH_fp5); + assign_map.emplace("cim:GovHydroWEH.fp6", &assign_GovHydroWEH_fp6); + assign_map.emplace("cim:GovHydroWEH.fp7", &assign_GovHydroWEH_fp7); + assign_map.emplace("cim:GovHydroWEH.fp8", &assign_GovHydroWEH_fp8); + assign_map.emplace("cim:GovHydroWEH.fp9", &assign_GovHydroWEH_fp9); + assign_map.emplace("cim:GovHydroWEH.gmax", &assign_GovHydroWEH_gmax); + assign_map.emplace("cim:GovHydroWEH.gmin", &assign_GovHydroWEH_gmin); + assign_map.emplace("cim:GovHydroWEH.gtmxcl", &assign_GovHydroWEH_gtmxcl); + assign_map.emplace("cim:GovHydroWEH.gtmxop", &assign_GovHydroWEH_gtmxop); + assign_map.emplace("cim:GovHydroWEH.gv1", &assign_GovHydroWEH_gv1); + assign_map.emplace("cim:GovHydroWEH.gv2", &assign_GovHydroWEH_gv2); + assign_map.emplace("cim:GovHydroWEH.gv3", &assign_GovHydroWEH_gv3); + assign_map.emplace("cim:GovHydroWEH.gv4", &assign_GovHydroWEH_gv4); + assign_map.emplace("cim:GovHydroWEH.gv5", &assign_GovHydroWEH_gv5); + assign_map.emplace("cim:GovHydroWEH.kd", &assign_GovHydroWEH_kd); + assign_map.emplace("cim:GovHydroWEH.ki", &assign_GovHydroWEH_ki); + assign_map.emplace("cim:GovHydroWEH.kp", &assign_GovHydroWEH_kp); + assign_map.emplace("cim:GovHydroWEH.mwbase", &assign_GovHydroWEH_mwbase); + assign_map.emplace("cim:GovHydroWEH.pmss1", &assign_GovHydroWEH_pmss1); + assign_map.emplace("cim:GovHydroWEH.pmss10", &assign_GovHydroWEH_pmss10); + assign_map.emplace("cim:GovHydroWEH.pmss2", &assign_GovHydroWEH_pmss2); + assign_map.emplace("cim:GovHydroWEH.pmss3", &assign_GovHydroWEH_pmss3); + assign_map.emplace("cim:GovHydroWEH.pmss4", &assign_GovHydroWEH_pmss4); + assign_map.emplace("cim:GovHydroWEH.pmss5", &assign_GovHydroWEH_pmss5); + assign_map.emplace("cim:GovHydroWEH.pmss6", &assign_GovHydroWEH_pmss6); + assign_map.emplace("cim:GovHydroWEH.pmss7", &assign_GovHydroWEH_pmss7); + assign_map.emplace("cim:GovHydroWEH.pmss8", &assign_GovHydroWEH_pmss8); + assign_map.emplace("cim:GovHydroWEH.pmss9", &assign_GovHydroWEH_pmss9); + assign_map.emplace("cim:GovHydroWEH.rpg", &assign_GovHydroWEH_rpg); + assign_map.emplace("cim:GovHydroWEH.rpp", &assign_GovHydroWEH_rpp); + assign_map.emplace("cim:GovHydroWEH.td", &assign_GovHydroWEH_td); + assign_map.emplace("cim:GovHydroWEH.tdv", &assign_GovHydroWEH_tdv); + assign_map.emplace("cim:GovHydroWEH.tg", &assign_GovHydroWEH_tg); + assign_map.emplace("cim:GovHydroWEH.tp", &assign_GovHydroWEH_tp); + assign_map.emplace("cim:GovHydroWEH.tpe", &assign_GovHydroWEH_tpe); + assign_map.emplace("cim:GovHydroWEH.tw", &assign_GovHydroWEH_tw); } void GovHydroWEH::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/GovHydroWEH.hpp b/CGMES_2.4.15_27JAN2020/GovHydroWEH.hpp index 687f3bd88..8417378d5 100644 --- a/CGMES_2.4.15_27JAN2020/GovHydroWEH.hpp +++ b/CGMES_2.4.15_27JAN2020/GovHydroWEH.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Woodward Electric Hydro Governor Model. - */ + /** \brief Woodward Electric Hydro Governor Model. */ class GovHydroWEH : public TurbineGovernorDynamics { public: @@ -31,57 +29,158 @@ namespace CIMPP GovHydroWEH(); ~GovHydroWEH() override; - CIMPP::PU db; /* Speed Dead Band (db). Default: nullptr */ - CIMPP::PU dicn; /* Value to allow the integral controller to advance beyond the gate limits (Dicn). Default: nullptr */ - CIMPP::PU dpv; /* Value to allow the Pilot valve controller to advance beyond the gate limits (Dpv). Default: nullptr */ - CIMPP::PU dturb; /* Turbine damping factor (Dturb). Unit = delta P (PU of MWbase) / delta speed (PU). Default: nullptr */ - CIMPP::Boolean feedbackSignal; /* Feedback signal selection (Sw). true = PID Output (if R-Perm-Gate=droop and R-Perm-Pe=0) false = Electrical Power (if R-Perm-Gate=0 and R-Perm-Pe=droop) or false = Gate Position (if R-Perm-Gate=droop and R-Perm-Pe=0). Default: false */ - CIMPP::PU fl1; /* Flow Gate 1 (Fl1). Flow value for gate position point 1 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU fl2; /* Flow Gate 2 (Fl2). Flow value for gate position point 2 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU fl3; /* Flow Gate 3 (Fl3). Flow value for gate position point 3 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU fl4; /* Flow Gate 4 (Fl4). Flow value for gate position point 4 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU fl5; /* Flow Gate 5 (Fl5). Flow value for gate position point 5 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU fp1; /* Flow P1 (Fp1). Turbine Flow value for point 1 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU fp10; /* Flow P10 (Fp10). Turbine Flow value for point 10 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU fp2; /* Flow P2 (Fp2). Turbine Flow value for point 2 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU fp3; /* Flow P3 (Fp3). Turbine Flow value for point 3 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU fp4; /* Flow P4 (Fp4). Turbine Flow value for point 4 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU fp5; /* Flow P5 (Fp5). Turbine Flow value for point 5 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU fp6; /* Flow P6 (Fp6). Turbine Flow value for point 6 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU fp7; /* Flow P7 (Fp7). Turbine Flow value for point 7 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU fp8; /* Flow P8 (Fp8). Turbine Flow value for point 8 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU fp9; /* Flow P9 (Fp9). Turbine Flow value for point 9 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU gmax; /* Maximum Gate Position (Gmax). Default: nullptr */ - CIMPP::PU gmin; /* Minimum Gate Position (Gmin). Default: nullptr */ - CIMPP::PU gtmxcl; /* Maximum gate closing rate (Gtmxcl). Default: nullptr */ - CIMPP::PU gtmxop; /* Maximum gate opening rate (Gtmxop). Default: nullptr */ - CIMPP::PU gv1; /* Gate 1 (Gv1). Gate Position value for point 1 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU gv2; /* Gate 2 (Gv2). Gate Position value for point 2 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU gv3; /* Gate 3 (Gv3). Gate Position value for point 3 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU gv4; /* Gate 4 (Gv4). Gate Position value for point 4 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU gv5; /* Gate 5 (Gv5). Gate Position value for point 5 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU kd; /* Derivative controller derivative gain (Kd). Default: nullptr */ - CIMPP::PU ki; /* Derivative controller Integral gain (Ki). Default: nullptr */ - CIMPP::PU kp; /* Derivative control gain (Kp). Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU pmss1; /* Pmss Flow P1 (Pmss1). Mechanical Power output Pmss for Turbine Flow point 1 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU pmss10; /* Pmss Flow P10 (Pmss10). Mechanical Power output Pmss for Turbine Flow point 10 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU pmss2; /* Pmss Flow P2 (Pmss2). Mechanical Power output Pmss for Turbine Flow point 2 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU pmss3; /* Pmss Flow P3 (Pmss3). Mechanical Power output Pmss for Turbine Flow point 3 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU pmss4; /* Pmss Flow P4 (Pmss4). Mechanical Power output Pmss for Turbine Flow point 4 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU pmss5; /* Pmss Flow P5 (Pmss5). Mechanical Power output Pmss for Turbine Flow point 5 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU pmss6; /* Pmss Flow P6 (Pmss6). Mechanical Power output Pmss for Turbine Flow point 6 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU pmss7; /* Pmss Flow P7 (Pmss7). Mechanical Power output Pmss for Turbine Flow point 7 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU pmss8; /* Pmss Flow P8 (Pmss8). Mechanical Power output Pmss for Turbine Flow point 8 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU pmss9; /* Pmss Flow P9 (Pmss9). Mechanical Power output Pmss for Turbine Flow point 9 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::Simple_Float rpg; /* Permanent droop for governor output feedback (R-Perm-Gate). Default: nullptr */ - CIMPP::Simple_Float rpp; /* Permanent droop for electrical power feedback (R-Perm-Pe). Default: nullptr */ - CIMPP::Seconds td; /* Derivative controller time constant to limit the derivative characteristic beyond a breakdown frequency to avoid amplification of high-frequency noise (Td). Default: nullptr */ - CIMPP::Seconds tdv; /* Distributive Valve time lag time constant (Tdv). Default: nullptr */ - CIMPP::Seconds tg; /* Value to allow the Distribution valve controller to advance beyond the gate movement rate limit (Tg). Default: nullptr */ - CIMPP::Seconds tp; /* Pilot Valve time lag time constant (Tp). Default: nullptr */ - CIMPP::Seconds tpe; /* Electrical power droop time constant (Tpe). Default: nullptr */ - CIMPP::Seconds tw; /* Water inertia time constant (Tw) (>0). Default: nullptr */ + /** \brief Speed Dead Band (db). Default: nullptr */ + CIMPP::PU db; + + /** \brief Value to allow the integral controller to advance beyond the gate limits (Dicn). Default: nullptr */ + CIMPP::PU dicn; + + /** \brief Value to allow the Pilot valve controller to advance beyond the gate limits (Dpv). Default: nullptr */ + CIMPP::PU dpv; + + /** \brief Turbine damping factor (Dturb). Unit = delta P (PU of MWbase) / delta speed (PU). Default: nullptr */ + CIMPP::PU dturb; + + /** \brief Feedback signal selection (Sw). true = PID Output (if R-Perm-Gate=droop and R-Perm-Pe=0) false = Electrical Power (if R-Perm-Gate=0 and R-Perm-Pe=droop) or false = Gate Position (if R-Perm-Gate=droop and R-Perm-Pe=0). Default: false */ + CIMPP::Boolean feedbackSignal; + + /** \brief Flow Gate 1 (Fl1). Flow value for gate position point 1 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU fl1; + + /** \brief Flow Gate 2 (Fl2). Flow value for gate position point 2 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU fl2; + + /** \brief Flow Gate 3 (Fl3). Flow value for gate position point 3 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU fl3; + + /** \brief Flow Gate 4 (Fl4). Flow value for gate position point 4 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU fl4; + + /** \brief Flow Gate 5 (Fl5). Flow value for gate position point 5 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU fl5; + + /** \brief Flow P1 (Fp1). Turbine Flow value for point 1 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp1; + + /** \brief Flow P10 (Fp10). Turbine Flow value for point 10 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp10; + + /** \brief Flow P2 (Fp2). Turbine Flow value for point 2 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp2; + + /** \brief Flow P3 (Fp3). Turbine Flow value for point 3 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp3; + + /** \brief Flow P4 (Fp4). Turbine Flow value for point 4 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp4; + + /** \brief Flow P5 (Fp5). Turbine Flow value for point 5 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp5; + + /** \brief Flow P6 (Fp6). Turbine Flow value for point 6 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp6; + + /** \brief Flow P7 (Fp7). Turbine Flow value for point 7 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp7; + + /** \brief Flow P8 (Fp8). Turbine Flow value for point 8 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp8; + + /** \brief Flow P9 (Fp9). Turbine Flow value for point 9 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp9; + + /** \brief Maximum Gate Position (Gmax). Default: nullptr */ + CIMPP::PU gmax; + + /** \brief Minimum Gate Position (Gmin). Default: nullptr */ + CIMPP::PU gmin; + + /** \brief Maximum gate closing rate (Gtmxcl). Default: nullptr */ + CIMPP::PU gtmxcl; + + /** \brief Maximum gate opening rate (Gtmxop). Default: nullptr */ + CIMPP::PU gtmxop; + + /** \brief Gate 1 (Gv1). Gate Position value for point 1 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Gate 2 (Gv2). Gate Position value for point 2 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Gate 3 (Gv3). Gate Position value for point 3 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Gate 4 (Gv4). Gate Position value for point 4 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Gate 5 (Gv5). Gate Position value for point 5 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Derivative controller derivative gain (Kd). Default: nullptr */ + CIMPP::PU kd; + + /** \brief Derivative controller Integral gain (Ki). Default: nullptr */ + CIMPP::PU ki; + + /** \brief Derivative control gain (Kp). Default: nullptr */ + CIMPP::PU kp; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Pmss Flow P1 (Pmss1). Mechanical Power output Pmss for Turbine Flow point 1 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss1; + + /** \brief Pmss Flow P10 (Pmss10). Mechanical Power output Pmss for Turbine Flow point 10 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss10; + + /** \brief Pmss Flow P2 (Pmss2). Mechanical Power output Pmss for Turbine Flow point 2 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss2; + + /** \brief Pmss Flow P3 (Pmss3). Mechanical Power output Pmss for Turbine Flow point 3 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss3; + + /** \brief Pmss Flow P4 (Pmss4). Mechanical Power output Pmss for Turbine Flow point 4 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss4; + + /** \brief Pmss Flow P5 (Pmss5). Mechanical Power output Pmss for Turbine Flow point 5 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss5; + + /** \brief Pmss Flow P6 (Pmss6). Mechanical Power output Pmss for Turbine Flow point 6 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss6; + + /** \brief Pmss Flow P7 (Pmss7). Mechanical Power output Pmss for Turbine Flow point 7 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss7; + + /** \brief Pmss Flow P8 (Pmss8). Mechanical Power output Pmss for Turbine Flow point 8 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss8; + + /** \brief Pmss Flow P9 (Pmss9). Mechanical Power output Pmss for Turbine Flow point 9 for lookup table representing per unit mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss9; + + /** \brief Permanent droop for governor output feedback (R-Perm-Gate). Default: nullptr */ + CIMPP::Simple_Float rpg; + + /** \brief Permanent droop for electrical power feedback (R-Perm-Pe). Default: nullptr */ + CIMPP::Simple_Float rpp; + + /** \brief Derivative controller time constant to limit the derivative characteristic beyond a breakdown frequency to avoid amplification of high-frequency noise (Td). Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Distributive Valve time lag time constant (Tdv). Default: nullptr */ + CIMPP::Seconds tdv; + + /** \brief Value to allow the Distribution valve controller to advance beyond the gate movement rate limit (Tg). Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Pilot Valve time lag time constant (Tp). Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Electrical power droop time constant (Tpe). Default: nullptr */ + CIMPP::Seconds tpe; + + /** \brief Water inertia time constant (Tw) (>0). Default: nullptr */ + CIMPP::Seconds tw; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GovHydroWPID.cpp b/CGMES_2.4.15_27JAN2020/GovHydroWPID.cpp index 4a392e676..52c605514 100644 --- a/CGMES_2.4.15_27JAN2020/GovHydroWPID.cpp +++ b/CGMES_2.4.15_27JAN2020/GovHydroWPID.cpp @@ -8,33 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -GovHydroWPID::GovHydroWPID() {}; -GovHydroWPID::~GovHydroWPID() {}; +GovHydroWPID::GovHydroWPID() {} +GovHydroWPID::~GovHydroWPID() {} static const std::list PossibleProfilesForClass = { @@ -82,298 +60,318 @@ GovHydroWPID::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroWPID_d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_d(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->d; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_gatmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_gatmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gatmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_gatmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_gatmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gatmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_reg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_reg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->reg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_treg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_treg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->treg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_velmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_velmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_velmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_velmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroWPID_d(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->d; if (!buffer.str().empty()) @@ -387,7 +385,8 @@ bool get_GovHydroWPID_d(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroWPID_gatmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gatmax; if (!buffer.str().empty()) @@ -401,7 +400,8 @@ bool get_GovHydroWPID_gatmax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroWPID_gatmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gatmin; if (!buffer.str().empty()) @@ -415,7 +415,8 @@ bool get_GovHydroWPID_gatmin(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroWPID_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -429,7 +430,8 @@ bool get_GovHydroWPID_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroWPID_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -443,7 +445,8 @@ bool get_GovHydroWPID_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroWPID_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -457,7 +460,8 @@ bool get_GovHydroWPID_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroWPID_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -471,7 +475,8 @@ bool get_GovHydroWPID_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWPID_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -485,7 +490,8 @@ bool get_GovHydroWPID_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWPID_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -499,7 +505,8 @@ bool get_GovHydroWPID_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWPID_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -513,7 +520,8 @@ bool get_GovHydroWPID_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroWPID_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -527,7 +535,8 @@ bool get_GovHydroWPID_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWPID_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -541,7 +550,8 @@ bool get_GovHydroWPID_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWPID_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -555,7 +565,8 @@ bool get_GovHydroWPID_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWPID_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -569,7 +580,8 @@ bool get_GovHydroWPID_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWPID_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -583,7 +595,8 @@ bool get_GovHydroWPID_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWPID_reg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->reg; if (!buffer.str().empty()) @@ -597,7 +610,8 @@ bool get_GovHydroWPID_reg(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroWPID_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -611,7 +625,8 @@ bool get_GovHydroWPID_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWPID_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -625,7 +640,8 @@ bool get_GovHydroWPID_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWPID_treg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->treg; if (!buffer.str().empty()) @@ -639,7 +655,8 @@ bool get_GovHydroWPID_treg(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWPID_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -653,7 +670,8 @@ bool get_GovHydroWPID_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWPID_velmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velmax; if (!buffer.str().empty()) @@ -667,7 +685,8 @@ bool get_GovHydroWPID_velmax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroWPID_velmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velmin; if (!buffer.str().empty()) @@ -679,8 +698,6 @@ bool get_GovHydroWPID_velmin(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char GovHydroWPID::debugName[] = "GovHydroWPID"; const char* GovHydroWPID::debugString() const { @@ -689,33 +706,33 @@ const char* GovHydroWPID::debugString() const void GovHydroWPID::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroWPID"), &GovHydroWPID_factory)); + factory_map.emplace("cim:GovHydroWPID", &GovHydroWPID_factory); } void GovHydroWPID::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.d"), &assign_GovHydroWPID_d)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.gatmax"), &assign_GovHydroWPID_gatmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.gatmin"), &assign_GovHydroWPID_gatmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.gv1"), &assign_GovHydroWPID_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.gv2"), &assign_GovHydroWPID_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.gv3"), &assign_GovHydroWPID_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.kd"), &assign_GovHydroWPID_kd)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.ki"), &assign_GovHydroWPID_ki)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.kp"), &assign_GovHydroWPID_kp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.mwbase"), &assign_GovHydroWPID_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.pgv1"), &assign_GovHydroWPID_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.pgv2"), &assign_GovHydroWPID_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.pgv3"), &assign_GovHydroWPID_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.pmax"), &assign_GovHydroWPID_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.pmin"), &assign_GovHydroWPID_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.reg"), &assign_GovHydroWPID_reg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.ta"), &assign_GovHydroWPID_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.tb"), &assign_GovHydroWPID_tb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.treg"), &assign_GovHydroWPID_treg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.tw"), &assign_GovHydroWPID_tw)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.velmax"), &assign_GovHydroWPID_velmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.velmin"), &assign_GovHydroWPID_velmin)); + assign_map.emplace("cim:GovHydroWPID.d", &assign_GovHydroWPID_d); + assign_map.emplace("cim:GovHydroWPID.gatmax", &assign_GovHydroWPID_gatmax); + assign_map.emplace("cim:GovHydroWPID.gatmin", &assign_GovHydroWPID_gatmin); + assign_map.emplace("cim:GovHydroWPID.gv1", &assign_GovHydroWPID_gv1); + assign_map.emplace("cim:GovHydroWPID.gv2", &assign_GovHydroWPID_gv2); + assign_map.emplace("cim:GovHydroWPID.gv3", &assign_GovHydroWPID_gv3); + assign_map.emplace("cim:GovHydroWPID.kd", &assign_GovHydroWPID_kd); + assign_map.emplace("cim:GovHydroWPID.ki", &assign_GovHydroWPID_ki); + assign_map.emplace("cim:GovHydroWPID.kp", &assign_GovHydroWPID_kp); + assign_map.emplace("cim:GovHydroWPID.mwbase", &assign_GovHydroWPID_mwbase); + assign_map.emplace("cim:GovHydroWPID.pgv1", &assign_GovHydroWPID_pgv1); + assign_map.emplace("cim:GovHydroWPID.pgv2", &assign_GovHydroWPID_pgv2); + assign_map.emplace("cim:GovHydroWPID.pgv3", &assign_GovHydroWPID_pgv3); + assign_map.emplace("cim:GovHydroWPID.pmax", &assign_GovHydroWPID_pmax); + assign_map.emplace("cim:GovHydroWPID.pmin", &assign_GovHydroWPID_pmin); + assign_map.emplace("cim:GovHydroWPID.reg", &assign_GovHydroWPID_reg); + assign_map.emplace("cim:GovHydroWPID.ta", &assign_GovHydroWPID_ta); + assign_map.emplace("cim:GovHydroWPID.tb", &assign_GovHydroWPID_tb); + assign_map.emplace("cim:GovHydroWPID.treg", &assign_GovHydroWPID_treg); + assign_map.emplace("cim:GovHydroWPID.tw", &assign_GovHydroWPID_tw); + assign_map.emplace("cim:GovHydroWPID.velmax", &assign_GovHydroWPID_velmax); + assign_map.emplace("cim:GovHydroWPID.velmin", &assign_GovHydroWPID_velmin); } void GovHydroWPID::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/GovHydroWPID.hpp b/CGMES_2.4.15_27JAN2020/GovHydroWPID.hpp index de5f8f0c6..7c5d870fa 100644 --- a/CGMES_2.4.15_27JAN2020/GovHydroWPID.hpp +++ b/CGMES_2.4.15_27JAN2020/GovHydroWPID.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Woodward PID Hydro Governor. - */ + /** \brief Woodward PID Hydro Governor. */ class GovHydroWPID : public TurbineGovernorDynamics { public: @@ -29,28 +27,71 @@ namespace CIMPP GovHydroWPID(); ~GovHydroWPID() override; - CIMPP::PU d; /* Turbine damping factor (D). Unit = delta P / delta speed. Default: nullptr */ - CIMPP::PU gatmax; /* Gate opening Limit Maximum (Gatmax). Default: nullptr */ - CIMPP::PU gatmin; /* Gate opening Limit Minimum (Gatmin). Default: nullptr */ - CIMPP::PU gv1; /* Gate position 1 (Gv1). Default: nullptr */ - CIMPP::PU gv2; /* Gate position 2 (Gv2). Default: nullptr */ - CIMPP::PU gv3; /* Gate position 3 (Gv3). Default: nullptr */ - CIMPP::PU kd; /* Derivative gain (Kd). Typical Value = 1.11. Default: nullptr */ - CIMPP::PU ki; /* Reset gain (Ki). Typical Value = 0.36. Default: nullptr */ - CIMPP::PU kp; /* Proportional gain (Kp). Typical Value = 0.1. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Output at Gv1 PU of MWbase (Pgv1). Default: nullptr */ - CIMPP::PU pgv2; /* Output at Gv2 PU of MWbase (Pgv2). Default: nullptr */ - CIMPP::PU pgv3; /* Output at Gv3 PU of MWbase (Pgv3). Default: nullptr */ - CIMPP::PU pmax; /* Maximum Power Output (Pmax). Default: nullptr */ - CIMPP::PU pmin; /* Minimum Power Output (Pmin). Default: nullptr */ - CIMPP::PU reg; /* Permanent drop (Reg). Default: nullptr */ - CIMPP::Seconds ta; /* Controller time constant (Ta) (>0). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tb; /* Gate servo time constant (Tb) (>0). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds treg; /* Speed detector time constant (Treg). Default: nullptr */ - CIMPP::Seconds tw; /* Water inertia time constant (Tw) (>0). Typical Value = 0. Default: nullptr */ - CIMPP::PU velmax; /* Maximum gate opening velocity (Velmax). Unit = PU/sec. Typical Value = 0. Default: nullptr */ - CIMPP::PU velmin; /* Maximum gate closing velocity (Velmin). Unit = PU/sec. Typical Value = 0. Default: nullptr */ + /** \brief Turbine damping factor (D). Unit = delta P / delta speed. Default: nullptr */ + CIMPP::PU d; + + /** \brief Gate opening Limit Maximum (Gatmax). Default: nullptr */ + CIMPP::PU gatmax; + + /** \brief Gate opening Limit Minimum (Gatmin). Default: nullptr */ + CIMPP::PU gatmin; + + /** \brief Gate position 1 (Gv1). Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Gate position 2 (Gv2). Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Gate position 3 (Gv3). Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Derivative gain (Kd). Typical Value = 1.11. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Reset gain (Ki). Typical Value = 0.36. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Proportional gain (Kp). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Output at Gv1 PU of MWbase (Pgv1). Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Output at Gv2 PU of MWbase (Pgv2). Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Output at Gv3 PU of MWbase (Pgv3). Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Maximum Power Output (Pmax). Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum Power Output (Pmin). Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Permanent drop (Reg). Default: nullptr */ + CIMPP::PU reg; + + /** \brief Controller time constant (Ta) (>0). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Gate servo time constant (Tb) (>0). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Speed detector time constant (Treg). Default: nullptr */ + CIMPP::Seconds treg; + + /** \brief Water inertia time constant (Tw) (>0). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tw; + + /** \brief Maximum gate opening velocity (Velmax). Unit = PU/sec. Typical Value = 0. Default: nullptr */ + CIMPP::PU velmax; + + /** \brief Maximum gate closing velocity (Velmin). Unit = PU/sec. Typical Value = 0. Default: nullptr */ + CIMPP::PU velmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GovSteam0.cpp b/CGMES_2.4.15_27JAN2020/GovSteam0.cpp index 936ef9f65..cc1c74f62 100644 --- a/CGMES_2.4.15_27JAN2020/GovSteam0.cpp +++ b/CGMES_2.4.15_27JAN2020/GovSteam0.cpp @@ -8,19 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -GovSteam0::GovSteam0() {}; -GovSteam0::~GovSteam0() {}; +GovSteam0::GovSteam0() {} +GovSteam0::~GovSteam0() {} static const std::list PossibleProfilesForClass = { @@ -54,116 +46,122 @@ GovSteam0::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteam0_dt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam0_dt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam0_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam0_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam0_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam0_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam0_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam0_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam0_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam0_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam0_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam0_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam0_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam0_vmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam0_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam0_vmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteam0_dt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dt; if (!buffer.str().empty()) @@ -177,7 +175,8 @@ bool get_GovSteam0_dt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam0_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -191,7 +190,8 @@ bool get_GovSteam0_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteam0_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -205,7 +205,8 @@ bool get_GovSteam0_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovSteam0_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -219,7 +220,8 @@ bool get_GovSteam0_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam0_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -233,7 +235,8 @@ bool get_GovSteam0_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam0_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -247,7 +250,8 @@ bool get_GovSteam0_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam0_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmax; if (!buffer.str().empty()) @@ -261,7 +265,8 @@ bool get_GovSteam0_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam0_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmin; if (!buffer.str().empty()) @@ -273,8 +278,6 @@ bool get_GovSteam0_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char GovSteam0::debugName[] = "GovSteam0"; const char* GovSteam0::debugString() const { @@ -283,19 +286,19 @@ const char* GovSteam0::debugString() const void GovSteam0::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteam0"), &GovSteam0_factory)); + factory_map.emplace("cim:GovSteam0", &GovSteam0_factory); } void GovSteam0::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteam0.dt"), &assign_GovSteam0_dt)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam0.mwbase"), &assign_GovSteam0_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam0.r"), &assign_GovSteam0_r)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam0.t1"), &assign_GovSteam0_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam0.t2"), &assign_GovSteam0_t2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam0.t3"), &assign_GovSteam0_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam0.vmax"), &assign_GovSteam0_vmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam0.vmin"), &assign_GovSteam0_vmin)); + assign_map.emplace("cim:GovSteam0.dt", &assign_GovSteam0_dt); + assign_map.emplace("cim:GovSteam0.mwbase", &assign_GovSteam0_mwbase); + assign_map.emplace("cim:GovSteam0.r", &assign_GovSteam0_r); + assign_map.emplace("cim:GovSteam0.t1", &assign_GovSteam0_t1); + assign_map.emplace("cim:GovSteam0.t2", &assign_GovSteam0_t2); + assign_map.emplace("cim:GovSteam0.t3", &assign_GovSteam0_t3); + assign_map.emplace("cim:GovSteam0.vmax", &assign_GovSteam0_vmax); + assign_map.emplace("cim:GovSteam0.vmin", &assign_GovSteam0_vmin); } void GovSteam0::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/GovSteam0.hpp b/CGMES_2.4.15_27JAN2020/GovSteam0.hpp index 1a700ab1d..9929fe7ad 100644 --- a/CGMES_2.4.15_27JAN2020/GovSteam0.hpp +++ b/CGMES_2.4.15_27JAN2020/GovSteam0.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A simplified steam turbine governor model. - */ + /** \brief A simplified steam turbine governor model. */ class GovSteam0 : public TurbineGovernorDynamics { public: @@ -29,14 +27,29 @@ namespace CIMPP GovSteam0(); ~GovSteam0() override; - CIMPP::PU dt; /* Turbine damping coefficient (Dt). Unit = delta P / delta speed. Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU r; /* Permanent droop (R). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds t1; /* Steam bowl time constant (T1). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds t2; /* Numerator time constant of T2/T3 block (T2). Typical Value = 3. Default: nullptr */ - CIMPP::Seconds t3; /* Reheater time constant (T3). Typical Value = 10. Default: nullptr */ - CIMPP::PU vmax; /* Maximum valve position, PU of mwcap (Vmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU vmin; /* Minimum valve position, PU of mwcap (Vmin). Typical Value = 0. Default: nullptr */ + /** \brief Turbine damping coefficient (Dt). Unit = delta P / delta speed. Typical Value = 0. Default: nullptr */ + CIMPP::PU dt; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Permanent droop (R). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU r; + + /** \brief Steam bowl time constant (T1). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Numerator time constant of T2/T3 block (T2). Typical Value = 3. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Reheater time constant (T3). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Maximum valve position, PU of mwcap (Vmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU vmax; + + /** \brief Minimum valve position, PU of mwcap (Vmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU vmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GovSteam1.cpp b/CGMES_2.4.15_27JAN2020/GovSteam1.cpp index 0eb4ba0ba..9f3c107a5 100644 --- a/CGMES_2.4.15_27JAN2020/GovSteam1.cpp +++ b/CGMES_2.4.15_27JAN2020/GovSteam1.cpp @@ -8,50 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Frequency.hpp" -#include "ActivePower.hpp" -#include "Frequency.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Boolean.hpp" using namespace CIMPP; -GovSteam1::GovSteam1() {}; -GovSteam1::~GovSteam1() {}; +GovSteam1::GovSteam1() {} +GovSteam1::~GovSteam1() {} static const std::list PossibleProfilesForClass = { @@ -116,519 +77,556 @@ GovSteam1::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteam1_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_eps(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eps; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_gv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_k4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_k5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_k5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_k6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_k6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_k7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_k7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_k8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_k8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_pgv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_sdb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_sdb1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->sdb1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_sdb2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_sdb2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->sdb2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_t7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_uc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_uo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_uo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_valve(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_valve(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->valve; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteam1_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -642,7 +640,8 @@ bool get_GovSteam1_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam1_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -656,7 +655,8 @@ bool get_GovSteam1_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam1_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eps; if (!buffer.str().empty()) @@ -670,7 +670,8 @@ bool get_GovSteam1_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam1_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -684,7 +685,8 @@ bool get_GovSteam1_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam1_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -698,7 +700,8 @@ bool get_GovSteam1_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam1_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -712,7 +715,8 @@ bool get_GovSteam1_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam1_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -726,7 +730,8 @@ bool get_GovSteam1_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam1_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -740,7 +745,8 @@ bool get_GovSteam1_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam1_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv6; if (!buffer.str().empty()) @@ -754,7 +760,8 @@ bool get_GovSteam1_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam1_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -768,7 +775,8 @@ bool get_GovSteam1_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovSteam1_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -782,7 +790,8 @@ bool get_GovSteam1_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -796,7 +805,8 @@ bool get_GovSteam1_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -810,7 +820,8 @@ bool get_GovSteam1_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k4; if (!buffer.str().empty()) @@ -824,7 +835,8 @@ bool get_GovSteam1_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k5; if (!buffer.str().empty()) @@ -838,7 +850,8 @@ bool get_GovSteam1_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_k6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k6; if (!buffer.str().empty()) @@ -852,7 +865,8 @@ bool get_GovSteam1_k6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_k7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k7; if (!buffer.str().empty()) @@ -866,7 +880,8 @@ bool get_GovSteam1_k7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_k8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k8; if (!buffer.str().empty()) @@ -880,7 +895,8 @@ bool get_GovSteam1_k8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -894,7 +910,8 @@ bool get_GovSteam1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteam1_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -908,7 +925,8 @@ bool get_GovSteam1_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -922,7 +940,8 @@ bool get_GovSteam1_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -936,7 +955,8 @@ bool get_GovSteam1_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -950,7 +970,8 @@ bool get_GovSteam1_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -964,7 +985,8 @@ bool get_GovSteam1_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv6; if (!buffer.str().empty()) @@ -978,7 +1000,8 @@ bool get_GovSteam1_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -992,7 +1015,8 @@ bool get_GovSteam1_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -1006,7 +1030,8 @@ bool get_GovSteam1_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_sdb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->sdb1; if (!buffer.str().empty()) @@ -1020,7 +1045,8 @@ bool get_GovSteam1_sdb1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_sdb2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->sdb2; if (!buffer.str().empty()) @@ -1034,7 +1060,8 @@ bool get_GovSteam1_sdb2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -1048,7 +1075,8 @@ bool get_GovSteam1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -1062,7 +1090,8 @@ bool get_GovSteam1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -1076,7 +1105,8 @@ bool get_GovSteam1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -1090,7 +1120,8 @@ bool get_GovSteam1_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -1104,7 +1135,8 @@ bool get_GovSteam1_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -1118,7 +1150,8 @@ bool get_GovSteam1_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t7; if (!buffer.str().empty()) @@ -1132,7 +1165,8 @@ bool get_GovSteam1_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uc; if (!buffer.str().empty()) @@ -1146,7 +1180,8 @@ bool get_GovSteam1_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uo; if (!buffer.str().empty()) @@ -1160,7 +1195,8 @@ bool get_GovSteam1_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_valve(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->valve; if (!buffer.str().empty()) @@ -1172,8 +1208,6 @@ bool get_GovSteam1_valve(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } - - const char GovSteam1::debugName[] = "GovSteam1"; const char* GovSteam1::debugString() const { @@ -1182,50 +1216,50 @@ const char* GovSteam1::debugString() const void GovSteam1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteam1"), &GovSteam1_factory)); + factory_map.emplace("cim:GovSteam1", &GovSteam1_factory); } void GovSteam1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.db1"), &assign_GovSteam1_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.db2"), &assign_GovSteam1_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.eps"), &assign_GovSteam1_eps)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.gv1"), &assign_GovSteam1_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.gv2"), &assign_GovSteam1_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.gv3"), &assign_GovSteam1_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.gv4"), &assign_GovSteam1_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.gv5"), &assign_GovSteam1_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.gv6"), &assign_GovSteam1_gv6)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.k"), &assign_GovSteam1_k)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.k1"), &assign_GovSteam1_k1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.k2"), &assign_GovSteam1_k2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.k3"), &assign_GovSteam1_k3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.k4"), &assign_GovSteam1_k4)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.k5"), &assign_GovSteam1_k5)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.k6"), &assign_GovSteam1_k6)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.k7"), &assign_GovSteam1_k7)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.k8"), &assign_GovSteam1_k8)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.mwbase"), &assign_GovSteam1_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.pgv1"), &assign_GovSteam1_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.pgv2"), &assign_GovSteam1_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.pgv3"), &assign_GovSteam1_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.pgv4"), &assign_GovSteam1_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.pgv5"), &assign_GovSteam1_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.pgv6"), &assign_GovSteam1_pgv6)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.pmax"), &assign_GovSteam1_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.pmin"), &assign_GovSteam1_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.sdb1"), &assign_GovSteam1_sdb1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.sdb2"), &assign_GovSteam1_sdb2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.t1"), &assign_GovSteam1_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.t2"), &assign_GovSteam1_t2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.t3"), &assign_GovSteam1_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.t4"), &assign_GovSteam1_t4)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.t5"), &assign_GovSteam1_t5)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.t6"), &assign_GovSteam1_t6)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.t7"), &assign_GovSteam1_t7)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.uc"), &assign_GovSteam1_uc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.uo"), &assign_GovSteam1_uo)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.valve"), &assign_GovSteam1_valve)); + assign_map.emplace("cim:GovSteam1.db1", &assign_GovSteam1_db1); + assign_map.emplace("cim:GovSteam1.db2", &assign_GovSteam1_db2); + assign_map.emplace("cim:GovSteam1.eps", &assign_GovSteam1_eps); + assign_map.emplace("cim:GovSteam1.gv1", &assign_GovSteam1_gv1); + assign_map.emplace("cim:GovSteam1.gv2", &assign_GovSteam1_gv2); + assign_map.emplace("cim:GovSteam1.gv3", &assign_GovSteam1_gv3); + assign_map.emplace("cim:GovSteam1.gv4", &assign_GovSteam1_gv4); + assign_map.emplace("cim:GovSteam1.gv5", &assign_GovSteam1_gv5); + assign_map.emplace("cim:GovSteam1.gv6", &assign_GovSteam1_gv6); + assign_map.emplace("cim:GovSteam1.k", &assign_GovSteam1_k); + assign_map.emplace("cim:GovSteam1.k1", &assign_GovSteam1_k1); + assign_map.emplace("cim:GovSteam1.k2", &assign_GovSteam1_k2); + assign_map.emplace("cim:GovSteam1.k3", &assign_GovSteam1_k3); + assign_map.emplace("cim:GovSteam1.k4", &assign_GovSteam1_k4); + assign_map.emplace("cim:GovSteam1.k5", &assign_GovSteam1_k5); + assign_map.emplace("cim:GovSteam1.k6", &assign_GovSteam1_k6); + assign_map.emplace("cim:GovSteam1.k7", &assign_GovSteam1_k7); + assign_map.emplace("cim:GovSteam1.k8", &assign_GovSteam1_k8); + assign_map.emplace("cim:GovSteam1.mwbase", &assign_GovSteam1_mwbase); + assign_map.emplace("cim:GovSteam1.pgv1", &assign_GovSteam1_pgv1); + assign_map.emplace("cim:GovSteam1.pgv2", &assign_GovSteam1_pgv2); + assign_map.emplace("cim:GovSteam1.pgv3", &assign_GovSteam1_pgv3); + assign_map.emplace("cim:GovSteam1.pgv4", &assign_GovSteam1_pgv4); + assign_map.emplace("cim:GovSteam1.pgv5", &assign_GovSteam1_pgv5); + assign_map.emplace("cim:GovSteam1.pgv6", &assign_GovSteam1_pgv6); + assign_map.emplace("cim:GovSteam1.pmax", &assign_GovSteam1_pmax); + assign_map.emplace("cim:GovSteam1.pmin", &assign_GovSteam1_pmin); + assign_map.emplace("cim:GovSteam1.sdb1", &assign_GovSteam1_sdb1); + assign_map.emplace("cim:GovSteam1.sdb2", &assign_GovSteam1_sdb2); + assign_map.emplace("cim:GovSteam1.t1", &assign_GovSteam1_t1); + assign_map.emplace("cim:GovSteam1.t2", &assign_GovSteam1_t2); + assign_map.emplace("cim:GovSteam1.t3", &assign_GovSteam1_t3); + assign_map.emplace("cim:GovSteam1.t4", &assign_GovSteam1_t4); + assign_map.emplace("cim:GovSteam1.t5", &assign_GovSteam1_t5); + assign_map.emplace("cim:GovSteam1.t6", &assign_GovSteam1_t6); + assign_map.emplace("cim:GovSteam1.t7", &assign_GovSteam1_t7); + assign_map.emplace("cim:GovSteam1.uc", &assign_GovSteam1_uc); + assign_map.emplace("cim:GovSteam1.uo", &assign_GovSteam1_uo); + assign_map.emplace("cim:GovSteam1.valve", &assign_GovSteam1_valve); } void GovSteam1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/GovSteam1.hpp b/CGMES_2.4.15_27JAN2020/GovSteam1.hpp index 6600a3c67..da362ba99 100644 --- a/CGMES_2.4.15_27JAN2020/GovSteam1.hpp +++ b/CGMES_2.4.15_27JAN2020/GovSteam1.hpp @@ -22,9 +22,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Steam turbine governor model, based on the GovSteamIEEE1 model (with optional deadband and nonlinear valve gain added). - */ + /** \brief Steam turbine governor model, based on the GovSteamIEEE1 model (with optional deadband and nonlinear valve gain added). */ class GovSteam1 : public TurbineGovernorDynamics { public: @@ -32,45 +30,122 @@ namespace CIMPP GovSteam1(); ~GovSteam1() override; - CIMPP::Frequency db1; /* Intentional deadband width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower db2; /* Unintentional deadband (db2). Unit = MW. Typical Value = 0. Default: nullptr */ - CIMPP::Frequency eps; /* Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ - CIMPP::PU gv1; /* Nonlinear gain valve position point 1 (GV1). Typical Value = 0. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain valve position point 2 (GV2). Typical Value = 0.4. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain valve position point 3 (GV3). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain valve position point 4 (GV4). Typical Value = 0.6. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain valve position point 5 (GV5). Typical Value = 1. Default: nullptr */ - CIMPP::PU gv6; /* Nonlinear gain valve position point 6 (GV6). Typical Value = 0. Default: nullptr */ - CIMPP::PU k; /* Governor gain (reciprocal of droop) (K) (>0). Typical Value = 25. Default: nullptr */ - CIMPP::Simple_Float k1; /* Fraction of HP shaft power after first boiler pass (K1). Typical Value = 0.2. Default: nullptr */ - CIMPP::Simple_Float k2; /* Fraction of LP shaft power after first boiler pass (K2). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float k3; /* Fraction of HP shaft power after second boiler pass (K3). Typical Value = 0.3. Default: nullptr */ - CIMPP::Simple_Float k4; /* Fraction of LP shaft power after second boiler pass (K4). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float k5; /* Fraction of HP shaft power after third boiler pass (K5). Typical Value = 0.5. Default: nullptr */ - CIMPP::Simple_Float k6; /* Fraction of LP shaft power after third boiler pass (K6). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float k7; /* Fraction of HP shaft power after fourth boiler pass (K7). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float k8; /* Fraction of LP shaft power after fourth boiler pass (K8). Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain power value point 1 (Pgv1). Typical Value = 0. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain power value point 2 (Pgv2). Typical Value = 0.75. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain power value point 3 (Pgv3). Typical Value = 0.91. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain power value point 4 (Pgv4). Typical Value = 0.98. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain power value point 5 (Pgv5). Typical Value = 1. Default: nullptr */ - CIMPP::PU pgv6; /* Nonlinear gain power value point 6 (Pgv6). Typical Value = 0. Default: nullptr */ - CIMPP::PU pmax; /* Maximum valve opening (Pmax) (> Pmin). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum valve opening (Pmin) (>=0). Typical Value = 0. Default: nullptr */ - CIMPP::Boolean sdb1; /* Intentional deadband indicator. true = intentional deadband is applied false = intentional deadband is not applied. Typical Value = true. Default: false */ - CIMPP::Boolean sdb2; /* Unintentional deadband location. true = intentional deadband is applied before point `A` false = intentional deadband is applied after point `A`. Typical Value = true. Default: false */ - CIMPP::Seconds t1; /* Governor lag time constant (T1). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t2; /* Governor lead time constant (T2). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t3; /* Valve positioner time constant (T3(>0). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t4; /* Inlet piping/steam bowl time constant (T4). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds t5; /* Time constant of second boiler pass (T5). Typical Value = 5. Default: nullptr */ - CIMPP::Seconds t6; /* Time constant of third boiler pass (T6). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds t7; /* Time constant of fourth boiler pass (T7). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float uc; /* Maximum valve closing velocity (Uc) (<0). Unit = PU/sec. Typical Value = -10. Default: nullptr */ - CIMPP::Simple_Float uo; /* Maximum valve opening velocity (Uo) (>0). Unit = PU/sec. Typical Value = 1. Default: nullptr */ - CIMPP::Boolean valve; /* Nonlinear valve characteristic. true = nonlinear valve characteristic is used false = nonlinear valve characteristic is not used. Typical Value = true. Default: false */ + /** \brief Intentional deadband width (db1). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Unintentional deadband (db2). Unit = MW. Typical Value = 0. Default: nullptr */ + CIMPP::ActivePower db2; + + /** \brief Intentional db hysteresis (eps). Unit = Hz. Typical Value = 0. Default: nullptr */ + CIMPP::Frequency eps; + + /** \brief Nonlinear gain valve position point 1 (GV1). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain valve position point 2 (GV2). Typical Value = 0.4. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain valve position point 3 (GV3). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain valve position point 4 (GV4). Typical Value = 0.6. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain valve position point 5 (GV5). Typical Value = 1. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Nonlinear gain valve position point 6 (GV6). Typical Value = 0. Default: nullptr */ + CIMPP::PU gv6; + + /** \brief Governor gain (reciprocal of droop) (K) (>0). Typical Value = 25. Default: nullptr */ + CIMPP::PU k; + + /** \brief Fraction of HP shaft power after first boiler pass (K1). Typical Value = 0.2. Default: nullptr */ + CIMPP::Simple_Float k1; + + /** \brief Fraction of LP shaft power after first boiler pass (K2). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float k2; + + /** \brief Fraction of HP shaft power after second boiler pass (K3). Typical Value = 0.3. Default: nullptr */ + CIMPP::Simple_Float k3; + + /** \brief Fraction of LP shaft power after second boiler pass (K4). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float k4; + + /** \brief Fraction of HP shaft power after third boiler pass (K5). Typical Value = 0.5. Default: nullptr */ + CIMPP::Simple_Float k5; + + /** \brief Fraction of LP shaft power after third boiler pass (K6). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float k6; + + /** \brief Fraction of HP shaft power after fourth boiler pass (K7). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float k7; + + /** \brief Fraction of LP shaft power after fourth boiler pass (K8). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float k8; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain power value point 1 (Pgv1). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain power value point 2 (Pgv2). Typical Value = 0.75. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain power value point 3 (Pgv3). Typical Value = 0.91. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain power value point 4 (Pgv4). Typical Value = 0.98. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain power value point 5 (Pgv5). Typical Value = 1. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief Nonlinear gain power value point 6 (Pgv6). Typical Value = 0. Default: nullptr */ + CIMPP::PU pgv6; + + /** \brief Maximum valve opening (Pmax) (> Pmin). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum valve opening (Pmin) (>=0). Typical Value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Intentional deadband indicator. true = intentional deadband is applied false = intentional deadband is not applied. Typical Value = true. Default: false */ + CIMPP::Boolean sdb1; + + /** \brief Unintentional deadband location. true = intentional deadband is applied before point `A` false = intentional deadband is applied after point `A`. Typical Value = true. Default: false */ + CIMPP::Boolean sdb2; + + /** \brief Governor lag time constant (T1). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Governor lead time constant (T2). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Valve positioner time constant (T3(>0). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Inlet piping/steam bowl time constant (T4). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant of second boiler pass (T5). Typical Value = 5. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Time constant of third boiler pass (T6). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time constant of fourth boiler pass (T7). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t7; + + /** \brief Maximum valve closing velocity (Uc) (<0). Unit = PU/sec. Typical Value = -10. Default: nullptr */ + CIMPP::Simple_Float uc; + + /** \brief Maximum valve opening velocity (Uo) (>0). Unit = PU/sec. Typical Value = 1. Default: nullptr */ + CIMPP::Simple_Float uo; + + /** \brief Nonlinear valve characteristic. true = nonlinear valve characteristic is used false = nonlinear valve characteristic is not used. Typical Value = true. Default: false */ + CIMPP::Boolean valve; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GovSteam2.cpp b/CGMES_2.4.15_27JAN2020/GovSteam2.cpp index c67011777..8696d39ab 100644 --- a/CGMES_2.4.15_27JAN2020/GovSteam2.cpp +++ b/CGMES_2.4.15_27JAN2020/GovSteam2.cpp @@ -8,19 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -GovSteam2::GovSteam2() {}; -GovSteam2::~GovSteam2() {}; +GovSteam2::GovSteam2() {} +GovSteam2::~GovSteam2() {} static const std::list PossibleProfilesForClass = { @@ -54,116 +46,122 @@ GovSteam2::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteam2_dbf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam2_dbf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dbf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam2_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam2_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam2_mnef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam2_mnef(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mnef; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam2_mxef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam2_mxef(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mxef; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam2_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam2_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam2_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam2_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam2_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam2_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam2_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam2_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteam2_dbf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dbf; if (!buffer.str().empty()) @@ -177,7 +175,8 @@ bool get_GovSteam2_dbf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam2_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -191,7 +190,8 @@ bool get_GovSteam2_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovSteam2_mnef(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mnef; if (!buffer.str().empty()) @@ -205,7 +205,8 @@ bool get_GovSteam2_mnef(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam2_mxef(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mxef; if (!buffer.str().empty()) @@ -219,7 +220,8 @@ bool get_GovSteam2_mxef(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam2_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -233,7 +235,8 @@ bool get_GovSteam2_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam2_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -247,7 +250,8 @@ bool get_GovSteam2_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam2_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -261,7 +265,8 @@ bool get_GovSteam2_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam2_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -273,8 +278,6 @@ bool get_GovSteam2_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char GovSteam2::debugName[] = "GovSteam2"; const char* GovSteam2::debugString() const { @@ -283,19 +286,19 @@ const char* GovSteam2::debugString() const void GovSteam2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteam2"), &GovSteam2_factory)); + factory_map.emplace("cim:GovSteam2", &GovSteam2_factory); } void GovSteam2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteam2.dbf"), &assign_GovSteam2_dbf)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam2.k"), &assign_GovSteam2_k)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam2.mnef"), &assign_GovSteam2_mnef)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam2.mxef"), &assign_GovSteam2_mxef)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam2.pmax"), &assign_GovSteam2_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam2.pmin"), &assign_GovSteam2_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam2.t1"), &assign_GovSteam2_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam2.t2"), &assign_GovSteam2_t2)); + assign_map.emplace("cim:GovSteam2.dbf", &assign_GovSteam2_dbf); + assign_map.emplace("cim:GovSteam2.k", &assign_GovSteam2_k); + assign_map.emplace("cim:GovSteam2.mnef", &assign_GovSteam2_mnef); + assign_map.emplace("cim:GovSteam2.mxef", &assign_GovSteam2_mxef); + assign_map.emplace("cim:GovSteam2.pmax", &assign_GovSteam2_pmax); + assign_map.emplace("cim:GovSteam2.pmin", &assign_GovSteam2_pmin); + assign_map.emplace("cim:GovSteam2.t1", &assign_GovSteam2_t1); + assign_map.emplace("cim:GovSteam2.t2", &assign_GovSteam2_t2); } void GovSteam2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/GovSteam2.hpp b/CGMES_2.4.15_27JAN2020/GovSteam2.hpp index d3571354f..1968c0eb3 100644 --- a/CGMES_2.4.15_27JAN2020/GovSteam2.hpp +++ b/CGMES_2.4.15_27JAN2020/GovSteam2.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Simplified governor model. - */ + /** \brief Simplified governor model. */ class GovSteam2 : public TurbineGovernorDynamics { public: @@ -29,14 +27,29 @@ namespace CIMPP GovSteam2(); ~GovSteam2() override; - CIMPP::PU dbf; /* Frequency dead band (DBF). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float k; /* Governor gain (reciprocal of droop) (K). Typical Value = 20. Default: nullptr */ - CIMPP::PU mnef; /* Fuel flow maximum negative error value (MN). Typical Value = -1. Default: nullptr */ - CIMPP::PU mxef; /* Fuel flow maximum positive error value (MX). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmax; /* Maximum fuel flow (P). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum fuel flow (P). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t1; /* Governor lag time constant (T) (>0). Typical Value = 0.45. Default: nullptr */ - CIMPP::Seconds t2; /* Governor lead time constant (T) (may be 0). Typical Value = 0. Default: nullptr */ + /** \brief Frequency dead band (DBF). Typical Value = 0. Default: nullptr */ + CIMPP::PU dbf; + + /** \brief Governor gain (reciprocal of droop) (K). Typical Value = 20. Default: nullptr */ + CIMPP::Simple_Float k; + + /** \brief Fuel flow maximum negative error value (MN). Typical Value = -1. Default: nullptr */ + CIMPP::PU mnef; + + /** \brief Fuel flow maximum positive error value (MX). Typical Value = 1. Default: nullptr */ + CIMPP::PU mxef; + + /** \brief Maximum fuel flow (P). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum fuel flow (P). Typical Value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Governor lag time constant (T) (>0). Typical Value = 0.45. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Governor lead time constant (T) (may be 0). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t2; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GovSteamCC.cpp b/CGMES_2.4.15_27JAN2020/GovSteamCC.cpp index ba02e8c7f..9d214c83b 100644 --- a/CGMES_2.4.15_27JAN2020/GovSteamCC.cpp +++ b/CGMES_2.4.15_27JAN2020/GovSteamCC.cpp @@ -8,28 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -GovSteamCC::GovSteamCC() {}; -GovSteamCC::~GovSteamCC() {}; +GovSteamCC::GovSteamCC() {} +GovSteamCC::~GovSteamCC() {} static const std::list PossibleProfilesForClass = { @@ -72,233 +55,248 @@ GovSteamCC::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteamCC_dhp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_dhp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dhp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_dlp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_dlp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dlp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_fhp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_fhp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fhp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_flp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_flp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_pmaxhp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_pmaxhp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmaxhp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_pmaxlp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_pmaxlp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmaxlp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_rhp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_rhp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rhp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_rlp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_rlp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rlp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_t1hp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_t1hp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1hp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_t1lp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_t1lp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1lp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_t3hp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_t3hp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3hp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_t3lp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_t3lp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3lp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_t4hp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_t4hp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4hp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_t4lp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_t4lp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4lp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_t5hp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_t5hp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5hp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_t5lp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_t5lp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5lp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteamCC_dhp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dhp; if (!buffer.str().empty()) @@ -312,7 +310,8 @@ bool get_GovSteamCC_dhp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamCC_dlp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dlp; if (!buffer.str().empty()) @@ -326,7 +325,8 @@ bool get_GovSteamCC_dlp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamCC_fhp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fhp; if (!buffer.str().empty()) @@ -340,7 +340,8 @@ bool get_GovSteamCC_fhp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamCC_flp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flp; if (!buffer.str().empty()) @@ -354,7 +355,8 @@ bool get_GovSteamCC_flp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamCC_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -368,7 +370,8 @@ bool get_GovSteamCC_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamCC_pmaxhp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmaxhp; if (!buffer.str().empty()) @@ -382,7 +385,8 @@ bool get_GovSteamCC_pmaxhp(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamCC_pmaxlp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmaxlp; if (!buffer.str().empty()) @@ -396,7 +400,8 @@ bool get_GovSteamCC_pmaxlp(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamCC_rhp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rhp; if (!buffer.str().empty()) @@ -410,7 +415,8 @@ bool get_GovSteamCC_rhp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamCC_rlp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rlp; if (!buffer.str().empty()) @@ -424,7 +430,8 @@ bool get_GovSteamCC_rlp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamCC_t1hp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1hp; if (!buffer.str().empty()) @@ -438,7 +445,8 @@ bool get_GovSteamCC_t1hp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamCC_t1lp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1lp; if (!buffer.str().empty()) @@ -452,7 +460,8 @@ bool get_GovSteamCC_t1lp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamCC_t3hp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3hp; if (!buffer.str().empty()) @@ -466,7 +475,8 @@ bool get_GovSteamCC_t3hp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamCC_t3lp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3lp; if (!buffer.str().empty()) @@ -480,7 +490,8 @@ bool get_GovSteamCC_t3lp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamCC_t4hp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4hp; if (!buffer.str().empty()) @@ -494,7 +505,8 @@ bool get_GovSteamCC_t4hp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamCC_t4lp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4lp; if (!buffer.str().empty()) @@ -508,7 +520,8 @@ bool get_GovSteamCC_t4lp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamCC_t5hp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5hp; if (!buffer.str().empty()) @@ -522,7 +535,8 @@ bool get_GovSteamCC_t5hp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamCC_t5lp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5lp; if (!buffer.str().empty()) @@ -534,8 +548,6 @@ bool get_GovSteamCC_t5lp(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } - - const char GovSteamCC::debugName[] = "GovSteamCC"; const char* GovSteamCC::debugString() const { @@ -544,28 +556,28 @@ const char* GovSteamCC::debugString() const void GovSteamCC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteamCC"), &GovSteamCC_factory)); + factory_map.emplace("cim:GovSteamCC", &GovSteamCC_factory); } void GovSteamCC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.dhp"), &assign_GovSteamCC_dhp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.dlp"), &assign_GovSteamCC_dlp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.fhp"), &assign_GovSteamCC_fhp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.flp"), &assign_GovSteamCC_flp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.mwbase"), &assign_GovSteamCC_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.pmaxhp"), &assign_GovSteamCC_pmaxhp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.pmaxlp"), &assign_GovSteamCC_pmaxlp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.rhp"), &assign_GovSteamCC_rhp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.rlp"), &assign_GovSteamCC_rlp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.t1hp"), &assign_GovSteamCC_t1hp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.t1lp"), &assign_GovSteamCC_t1lp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.t3hp"), &assign_GovSteamCC_t3hp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.t3lp"), &assign_GovSteamCC_t3lp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.t4hp"), &assign_GovSteamCC_t4hp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.t4lp"), &assign_GovSteamCC_t4lp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.t5hp"), &assign_GovSteamCC_t5hp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.t5lp"), &assign_GovSteamCC_t5lp)); + assign_map.emplace("cim:GovSteamCC.dhp", &assign_GovSteamCC_dhp); + assign_map.emplace("cim:GovSteamCC.dlp", &assign_GovSteamCC_dlp); + assign_map.emplace("cim:GovSteamCC.fhp", &assign_GovSteamCC_fhp); + assign_map.emplace("cim:GovSteamCC.flp", &assign_GovSteamCC_flp); + assign_map.emplace("cim:GovSteamCC.mwbase", &assign_GovSteamCC_mwbase); + assign_map.emplace("cim:GovSteamCC.pmaxhp", &assign_GovSteamCC_pmaxhp); + assign_map.emplace("cim:GovSteamCC.pmaxlp", &assign_GovSteamCC_pmaxlp); + assign_map.emplace("cim:GovSteamCC.rhp", &assign_GovSteamCC_rhp); + assign_map.emplace("cim:GovSteamCC.rlp", &assign_GovSteamCC_rlp); + assign_map.emplace("cim:GovSteamCC.t1hp", &assign_GovSteamCC_t1hp); + assign_map.emplace("cim:GovSteamCC.t1lp", &assign_GovSteamCC_t1lp); + assign_map.emplace("cim:GovSteamCC.t3hp", &assign_GovSteamCC_t3hp); + assign_map.emplace("cim:GovSteamCC.t3lp", &assign_GovSteamCC_t3lp); + assign_map.emplace("cim:GovSteamCC.t4hp", &assign_GovSteamCC_t4hp); + assign_map.emplace("cim:GovSteamCC.t4lp", &assign_GovSteamCC_t4lp); + assign_map.emplace("cim:GovSteamCC.t5hp", &assign_GovSteamCC_t5hp); + assign_map.emplace("cim:GovSteamCC.t5lp", &assign_GovSteamCC_t5lp); } void GovSteamCC::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/GovSteamCC.hpp b/CGMES_2.4.15_27JAN2020/GovSteamCC.hpp index f29c2642d..1e7c7a97d 100644 --- a/CGMES_2.4.15_27JAN2020/GovSteamCC.hpp +++ b/CGMES_2.4.15_27JAN2020/GovSteamCC.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Cross compound turbine governor model. - */ + /** \brief Cross compound turbine governor model. */ class GovSteamCC : public TurbineGovernorDynamics { public: @@ -29,23 +27,56 @@ namespace CIMPP GovSteamCC(); ~GovSteamCC() override; - CIMPP::PU dhp; /* HP damping factor (Dhp). Typical Value = 0. Default: nullptr */ - CIMPP::PU dlp; /* LP damping factor (Dlp). Typical Value = 0. Default: nullptr */ - CIMPP::PU fhp; /* Fraction of HP power ahead of reheater (Fhp). Typical Value = 0.3. Default: nullptr */ - CIMPP::PU flp; /* Fraction of LP power ahead of reheater (Flp). Typical Value = 0.7. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU pmaxhp; /* Maximum HP value position (Pmaxhp). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmaxlp; /* Maximum LP value position (Pmaxlp). Typical Value = 1. Default: nullptr */ - CIMPP::PU rhp; /* HP governor droop (Rhp). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU rlp; /* LP governor droop (Rlp). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds t1hp; /* HP governor time constant (T1hp). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t1lp; /* LP governor time constant (T1lp). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t3hp; /* HP turbine time constant (T3hp). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t3lp; /* LP turbine time constant (T3lp). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t4hp; /* HP turbine time constant (T4hp). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t4lp; /* LP turbine time constant (T4lp). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t5hp; /* HP reheater time constant (T5hp). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds t5lp; /* LP reheater time constant (T5lp). Typical Value = 10. Default: nullptr */ + /** \brief HP damping factor (Dhp). Typical Value = 0. Default: nullptr */ + CIMPP::PU dhp; + + /** \brief LP damping factor (Dlp). Typical Value = 0. Default: nullptr */ + CIMPP::PU dlp; + + /** \brief Fraction of HP power ahead of reheater (Fhp). Typical Value = 0.3. Default: nullptr */ + CIMPP::PU fhp; + + /** \brief Fraction of LP power ahead of reheater (Flp). Typical Value = 0.7. Default: nullptr */ + CIMPP::PU flp; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Maximum HP value position (Pmaxhp). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmaxhp; + + /** \brief Maximum LP value position (Pmaxlp). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmaxlp; + + /** \brief HP governor droop (Rhp). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU rhp; + + /** \brief LP governor droop (Rlp). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU rlp; + + /** \brief HP governor time constant (T1hp). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t1hp; + + /** \brief LP governor time constant (T1lp). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t1lp; + + /** \brief HP turbine time constant (T3hp). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t3hp; + + /** \brief LP turbine time constant (T3lp). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t3lp; + + /** \brief HP turbine time constant (T4hp). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t4hp; + + /** \brief LP turbine time constant (T4lp). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t4lp; + + /** \brief HP reheater time constant (T5hp). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds t5hp; + + /** \brief LP reheater time constant (T5lp). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds t5lp; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GovSteamEU.cpp b/CGMES_2.4.15_27JAN2020/GovSteamEU.cpp index 892a23aad..79c47df8b 100644 --- a/CGMES_2.4.15_27JAN2020/GovSteamEU.cpp +++ b/CGMES_2.4.15_27JAN2020/GovSteamEU.cpp @@ -8,46 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -GovSteamEU::GovSteamEU() {}; -GovSteamEU::~GovSteamEU() {}; +GovSteamEU::GovSteamEU() {} +GovSteamEU::~GovSteamEU() {} static const std::list PossibleProfilesForClass = { @@ -108,467 +73,500 @@ GovSteamEU::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteamEU_chc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_chc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->chc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_cho(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_cho(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->cho; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_cic(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_cic(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->cic; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_cio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_cio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->cio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_hhpmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_hhpmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->hhpmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_kfcor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_kfcor(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kfcor; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_khp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_khp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->khp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_klp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_klp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->klp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_kwcor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_kwcor(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kwcor; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_prhmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_prhmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->prhmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_simx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_simx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->simx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tdp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tdp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_ten(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_ten(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ten; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tfp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tfp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tfp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_thp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_thp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->thp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tip(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tip; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tlp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tlp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tlp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_trh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_trh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->trh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tvhp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tvhp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tvhp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tvip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tvip(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tvip; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_wfmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_wfmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wfmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_wfmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_wfmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wfmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_wmax1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_wmax1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wmax1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_wmax2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_wmax2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wmax2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_wwmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_wwmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wwmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_wwmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_wwmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wwmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteamEU_chc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->chc; if (!buffer.str().empty()) @@ -582,7 +580,8 @@ bool get_GovSteamEU_chc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_cho(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->cho; if (!buffer.str().empty()) @@ -596,7 +595,8 @@ bool get_GovSteamEU_cho(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_cic(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->cic; if (!buffer.str().empty()) @@ -610,7 +610,8 @@ bool get_GovSteamEU_cic(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_cio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->cio; if (!buffer.str().empty()) @@ -624,7 +625,8 @@ bool get_GovSteamEU_cio(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -638,7 +640,8 @@ bool get_GovSteamEU_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -652,7 +655,8 @@ bool get_GovSteamEU_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_hhpmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hhpmax; if (!buffer.str().empty()) @@ -666,7 +670,8 @@ bool get_GovSteamEU_hhpmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamEU_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -680,7 +685,8 @@ bool get_GovSteamEU_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamEU_kfcor(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kfcor; if (!buffer.str().empty()) @@ -694,7 +700,8 @@ bool get_GovSteamEU_kfcor(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamEU_khp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->khp; if (!buffer.str().empty()) @@ -708,7 +715,8 @@ bool get_GovSteamEU_khp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_klp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->klp; if (!buffer.str().empty()) @@ -722,7 +730,8 @@ bool get_GovSteamEU_klp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_kwcor(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kwcor; if (!buffer.str().empty()) @@ -736,7 +745,8 @@ bool get_GovSteamEU_kwcor(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamEU_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -750,7 +760,8 @@ bool get_GovSteamEU_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamEU_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -764,7 +775,8 @@ bool get_GovSteamEU_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamEU_prhmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->prhmax; if (!buffer.str().empty()) @@ -778,7 +790,8 @@ bool get_GovSteamEU_prhmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamEU_simx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->simx; if (!buffer.str().empty()) @@ -792,7 +805,8 @@ bool get_GovSteamEU_simx(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamEU_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -806,7 +820,8 @@ bool get_GovSteamEU_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamEU_tdp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdp; if (!buffer.str().empty()) @@ -820,7 +835,8 @@ bool get_GovSteamEU_tdp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_ten(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ten; if (!buffer.str().empty()) @@ -834,7 +850,8 @@ bool get_GovSteamEU_ten(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -848,7 +865,8 @@ bool get_GovSteamEU_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamEU_tfp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tfp; if (!buffer.str().empty()) @@ -862,7 +880,8 @@ bool get_GovSteamEU_tfp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_thp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thp; if (!buffer.str().empty()) @@ -876,7 +895,8 @@ bool get_GovSteamEU_thp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_tip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tip; if (!buffer.str().empty()) @@ -890,7 +910,8 @@ bool get_GovSteamEU_tip(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_tlp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tlp; if (!buffer.str().empty()) @@ -904,7 +925,8 @@ bool get_GovSteamEU_tlp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -918,7 +940,8 @@ bool get_GovSteamEU_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamEU_trh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->trh; if (!buffer.str().empty()) @@ -932,7 +955,8 @@ bool get_GovSteamEU_trh(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_tvhp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tvhp; if (!buffer.str().empty()) @@ -946,7 +970,8 @@ bool get_GovSteamEU_tvhp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamEU_tvip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tvip; if (!buffer.str().empty()) @@ -960,7 +985,8 @@ bool get_GovSteamEU_tvip(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamEU_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -974,7 +1000,8 @@ bool get_GovSteamEU_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamEU_wfmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wfmax; if (!buffer.str().empty()) @@ -988,7 +1015,8 @@ bool get_GovSteamEU_wfmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamEU_wfmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wfmin; if (!buffer.str().empty()) @@ -1002,7 +1030,8 @@ bool get_GovSteamEU_wfmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamEU_wmax1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wmax1; if (!buffer.str().empty()) @@ -1016,7 +1045,8 @@ bool get_GovSteamEU_wmax1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamEU_wmax2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wmax2; if (!buffer.str().empty()) @@ -1030,7 +1060,8 @@ bool get_GovSteamEU_wmax2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamEU_wwmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wwmax; if (!buffer.str().empty()) @@ -1044,7 +1075,8 @@ bool get_GovSteamEU_wwmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamEU_wwmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wwmin; if (!buffer.str().empty()) @@ -1056,8 +1088,6 @@ bool get_GovSteamEU_wwmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char GovSteamEU::debugName[] = "GovSteamEU"; const char* GovSteamEU::debugString() const { @@ -1066,46 +1096,46 @@ const char* GovSteamEU::debugString() const void GovSteamEU::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteamEU"), &GovSteamEU_factory)); + factory_map.emplace("cim:GovSteamEU", &GovSteamEU_factory); } void GovSteamEU::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.chc"), &assign_GovSteamEU_chc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.cho"), &assign_GovSteamEU_cho)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.cic"), &assign_GovSteamEU_cic)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.cio"), &assign_GovSteamEU_cio)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.db1"), &assign_GovSteamEU_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.db2"), &assign_GovSteamEU_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.hhpmax"), &assign_GovSteamEU_hhpmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.ke"), &assign_GovSteamEU_ke)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.kfcor"), &assign_GovSteamEU_kfcor)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.khp"), &assign_GovSteamEU_khp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.klp"), &assign_GovSteamEU_klp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.kwcor"), &assign_GovSteamEU_kwcor)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.mwbase"), &assign_GovSteamEU_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.pmax"), &assign_GovSteamEU_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.prhmax"), &assign_GovSteamEU_prhmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.simx"), &assign_GovSteamEU_simx)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tb"), &assign_GovSteamEU_tb)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tdp"), &assign_GovSteamEU_tdp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.ten"), &assign_GovSteamEU_ten)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tf"), &assign_GovSteamEU_tf)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tfp"), &assign_GovSteamEU_tfp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.thp"), &assign_GovSteamEU_thp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tip"), &assign_GovSteamEU_tip)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tlp"), &assign_GovSteamEU_tlp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tp"), &assign_GovSteamEU_tp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.trh"), &assign_GovSteamEU_trh)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tvhp"), &assign_GovSteamEU_tvhp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tvip"), &assign_GovSteamEU_tvip)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tw"), &assign_GovSteamEU_tw)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.wfmax"), &assign_GovSteamEU_wfmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.wfmin"), &assign_GovSteamEU_wfmin)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.wmax1"), &assign_GovSteamEU_wmax1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.wmax2"), &assign_GovSteamEU_wmax2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.wwmax"), &assign_GovSteamEU_wwmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.wwmin"), &assign_GovSteamEU_wwmin)); + assign_map.emplace("cim:GovSteamEU.chc", &assign_GovSteamEU_chc); + assign_map.emplace("cim:GovSteamEU.cho", &assign_GovSteamEU_cho); + assign_map.emplace("cim:GovSteamEU.cic", &assign_GovSteamEU_cic); + assign_map.emplace("cim:GovSteamEU.cio", &assign_GovSteamEU_cio); + assign_map.emplace("cim:GovSteamEU.db1", &assign_GovSteamEU_db1); + assign_map.emplace("cim:GovSteamEU.db2", &assign_GovSteamEU_db2); + assign_map.emplace("cim:GovSteamEU.hhpmax", &assign_GovSteamEU_hhpmax); + assign_map.emplace("cim:GovSteamEU.ke", &assign_GovSteamEU_ke); + assign_map.emplace("cim:GovSteamEU.kfcor", &assign_GovSteamEU_kfcor); + assign_map.emplace("cim:GovSteamEU.khp", &assign_GovSteamEU_khp); + assign_map.emplace("cim:GovSteamEU.klp", &assign_GovSteamEU_klp); + assign_map.emplace("cim:GovSteamEU.kwcor", &assign_GovSteamEU_kwcor); + assign_map.emplace("cim:GovSteamEU.mwbase", &assign_GovSteamEU_mwbase); + assign_map.emplace("cim:GovSteamEU.pmax", &assign_GovSteamEU_pmax); + assign_map.emplace("cim:GovSteamEU.prhmax", &assign_GovSteamEU_prhmax); + assign_map.emplace("cim:GovSteamEU.simx", &assign_GovSteamEU_simx); + assign_map.emplace("cim:GovSteamEU.tb", &assign_GovSteamEU_tb); + assign_map.emplace("cim:GovSteamEU.tdp", &assign_GovSteamEU_tdp); + assign_map.emplace("cim:GovSteamEU.ten", &assign_GovSteamEU_ten); + assign_map.emplace("cim:GovSteamEU.tf", &assign_GovSteamEU_tf); + assign_map.emplace("cim:GovSteamEU.tfp", &assign_GovSteamEU_tfp); + assign_map.emplace("cim:GovSteamEU.thp", &assign_GovSteamEU_thp); + assign_map.emplace("cim:GovSteamEU.tip", &assign_GovSteamEU_tip); + assign_map.emplace("cim:GovSteamEU.tlp", &assign_GovSteamEU_tlp); + assign_map.emplace("cim:GovSteamEU.tp", &assign_GovSteamEU_tp); + assign_map.emplace("cim:GovSteamEU.trh", &assign_GovSteamEU_trh); + assign_map.emplace("cim:GovSteamEU.tvhp", &assign_GovSteamEU_tvhp); + assign_map.emplace("cim:GovSteamEU.tvip", &assign_GovSteamEU_tvip); + assign_map.emplace("cim:GovSteamEU.tw", &assign_GovSteamEU_tw); + assign_map.emplace("cim:GovSteamEU.wfmax", &assign_GovSteamEU_wfmax); + assign_map.emplace("cim:GovSteamEU.wfmin", &assign_GovSteamEU_wfmin); + assign_map.emplace("cim:GovSteamEU.wmax1", &assign_GovSteamEU_wmax1); + assign_map.emplace("cim:GovSteamEU.wmax2", &assign_GovSteamEU_wmax2); + assign_map.emplace("cim:GovSteamEU.wwmax", &assign_GovSteamEU_wwmax); + assign_map.emplace("cim:GovSteamEU.wwmin", &assign_GovSteamEU_wwmin); } void GovSteamEU::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/GovSteamEU.hpp b/CGMES_2.4.15_27JAN2020/GovSteamEU.hpp index 2203532f0..8a76be166 100644 --- a/CGMES_2.4.15_27JAN2020/GovSteamEU.hpp +++ b/CGMES_2.4.15_27JAN2020/GovSteamEU.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Simplified model of boiler and steam turbine with PID governor. - */ + /** \brief Simplified model of boiler and steam turbine with PID governor. */ class GovSteamEU : public TurbineGovernorDynamics { public: @@ -30,41 +28,110 @@ namespace CIMPP GovSteamEU(); ~GovSteamEU() override; - CIMPP::Simple_Float chc; /* Control valves rate closing limit (Chc). Unit = PU/sec. Typical Value = -3.3. Default: nullptr */ - CIMPP::Simple_Float cho; /* Control valves rate opening limit (Cho). Unit = PU/sec. Typical Value = 0.17. Default: nullptr */ - CIMPP::PU cic; /* Intercept valves rate closing limit (Cic). Typical Value = -2.2. Default: nullptr */ - CIMPP::PU cio; /* Intercept valves rate opening limit (Cio). Typical Value = 0.123. Default: nullptr */ - CIMPP::PU db1; /* Dead band of the frequency corrector (db1). Typical Value = 0. Default: nullptr */ - CIMPP::PU db2; /* Dead band of the speed governor (db2). Typical Value = 0.0004. Default: nullptr */ - CIMPP::PU hhpmax; /* Maximum control valve position (Hhpmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU ke; /* Gain of the power controller (Ke). Typical Value = 0.65. Default: nullptr */ - CIMPP::PU kfcor; /* Gain of the frequency corrector (Kfcor). Typical Value = 20. Default: nullptr */ - CIMPP::PU khp; /* Fraction of total turbine output generated by HP part (Khp). Typical Value = 0.277. Default: nullptr */ - CIMPP::PU klp; /* Fraction of total turbine output generated by HP part (Klp). Typical Value = 0.723. Default: nullptr */ - CIMPP::PU kwcor; /* Gain of the speed governor (Kwcor). Typical Value = 20. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU pmax; /* Maximal active power of the turbine (Pmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU prhmax; /* Maximum low pressure limit (Prhmax). Typical Value = 1.4. Default: nullptr */ - CIMPP::PU simx; /* Intercept valves transfer limit (Simx). Typical Value = 0.425. Default: nullptr */ - CIMPP::Seconds tb; /* Boiler time constant (Tb). Typical Value = 100. Default: nullptr */ - CIMPP::Seconds tdp; /* Derivative time constant of the power controller (Tdp). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ten; /* Electro hydraulic transducer (Ten). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tf; /* Frequency transducer time constant (Tf). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tfp; /* Time constant of the power controller (Tfp). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds thp; /* High pressure (HP) time constant of the turbine (Thp). Typical Value = 0.31. Default: nullptr */ - CIMPP::Seconds tip; /* Integral time constant of the power controller (Tip). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds tlp; /* Low pressure(LP) time constant of the turbine (Tlp). Typical Value = 0.45. Default: nullptr */ - CIMPP::Seconds tp; /* Power transducer time constant (Tp). Typical Value = 0.07. Default: nullptr */ - CIMPP::Seconds trh; /* Reheater time constant of the turbine (Trh). Typical Value = 8. Default: nullptr */ - CIMPP::Seconds tvhp; /* Control valves servo time constant (Tvhp). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tvip; /* Intercept valves servo time constant (Tvip). Typical Value = 0.15. Default: nullptr */ - CIMPP::Seconds tw; /* Speed transducer time constant (Tw). Typical Value = 0.02. Default: nullptr */ - CIMPP::PU wfmax; /* Upper limit for frequency correction (Wfmax). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU wfmin; /* Lower limit for frequency correction (Wfmin). Typical Value = -0.05. Default: nullptr */ - CIMPP::PU wmax1; /* Emergency speed control lower limit (wmax1). Typical Value = 1.025. Default: nullptr */ - CIMPP::PU wmax2; /* Emergency speed control upper limit (wmax2). Typical Value = 1.05. Default: nullptr */ - CIMPP::PU wwmax; /* Upper limit for the speed governor (Wwmax). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU wwmin; /* Lower limit for the speed governor frequency correction (Wwmin). Typical Value = -1. Default: nullptr */ + /** \brief Control valves rate closing limit (Chc). Unit = PU/sec. Typical Value = -3.3. Default: nullptr */ + CIMPP::Simple_Float chc; + + /** \brief Control valves rate opening limit (Cho). Unit = PU/sec. Typical Value = 0.17. Default: nullptr */ + CIMPP::Simple_Float cho; + + /** \brief Intercept valves rate closing limit (Cic). Typical Value = -2.2. Default: nullptr */ + CIMPP::PU cic; + + /** \brief Intercept valves rate opening limit (Cio). Typical Value = 0.123. Default: nullptr */ + CIMPP::PU cio; + + /** \brief Dead band of the frequency corrector (db1). Typical Value = 0. Default: nullptr */ + CIMPP::PU db1; + + /** \brief Dead band of the speed governor (db2). Typical Value = 0.0004. Default: nullptr */ + CIMPP::PU db2; + + /** \brief Maximum control valve position (Hhpmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU hhpmax; + + /** \brief Gain of the power controller (Ke). Typical Value = 0.65. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Gain of the frequency corrector (Kfcor). Typical Value = 20. Default: nullptr */ + CIMPP::PU kfcor; + + /** \brief Fraction of total turbine output generated by HP part (Khp). Typical Value = 0.277. Default: nullptr */ + CIMPP::PU khp; + + /** \brief Fraction of total turbine output generated by HP part (Klp). Typical Value = 0.723. Default: nullptr */ + CIMPP::PU klp; + + /** \brief Gain of the speed governor (Kwcor). Typical Value = 20. Default: nullptr */ + CIMPP::PU kwcor; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Maximal active power of the turbine (Pmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Maximum low pressure limit (Prhmax). Typical Value = 1.4. Default: nullptr */ + CIMPP::PU prhmax; + + /** \brief Intercept valves transfer limit (Simx). Typical Value = 0.425. Default: nullptr */ + CIMPP::PU simx; + + /** \brief Boiler time constant (Tb). Typical Value = 100. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Derivative time constant of the power controller (Tdp). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tdp; + + /** \brief Electro hydraulic transducer (Ten). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds ten; + + /** \brief Frequency transducer time constant (Tf). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Time constant of the power controller (Tfp). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tfp; + + /** \brief High pressure (HP) time constant of the turbine (Thp). Typical Value = 0.31. Default: nullptr */ + CIMPP::Seconds thp; + + /** \brief Integral time constant of the power controller (Tip). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds tip; + + /** \brief Low pressure(LP) time constant of the turbine (Tlp). Typical Value = 0.45. Default: nullptr */ + CIMPP::Seconds tlp; + + /** \brief Power transducer time constant (Tp). Typical Value = 0.07. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Reheater time constant of the turbine (Trh). Typical Value = 8. Default: nullptr */ + CIMPP::Seconds trh; + + /** \brief Control valves servo time constant (Tvhp). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tvhp; + + /** \brief Intercept valves servo time constant (Tvip). Typical Value = 0.15. Default: nullptr */ + CIMPP::Seconds tvip; + + /** \brief Speed transducer time constant (Tw). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds tw; + + /** \brief Upper limit for frequency correction (Wfmax). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU wfmax; + + /** \brief Lower limit for frequency correction (Wfmin). Typical Value = -0.05. Default: nullptr */ + CIMPP::PU wfmin; + + /** \brief Emergency speed control lower limit (wmax1). Typical Value = 1.025. Default: nullptr */ + CIMPP::PU wmax1; + + /** \brief Emergency speed control upper limit (wmax2). Typical Value = 1.05. Default: nullptr */ + CIMPP::PU wmax2; + + /** \brief Upper limit for the speed governor (Wwmax). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU wwmax; + + /** \brief Lower limit for the speed governor frequency correction (Wwmin). Typical Value = -1. Default: nullptr */ + CIMPP::PU wwmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GovSteamFV2.cpp b/CGMES_2.4.15_27JAN2020/GovSteamFV2.cpp index 39cd34463..2859415ca 100644 --- a/CGMES_2.4.15_27JAN2020/GovSteamFV2.cpp +++ b/CGMES_2.4.15_27JAN2020/GovSteamFV2.cpp @@ -8,24 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -GovSteamFV2::GovSteamFV2() {}; -GovSteamFV2::~GovSteamFV2() {}; +GovSteamFV2::GovSteamFV2() {} +GovSteamFV2::~GovSteamFV2() {} static const std::list PossibleProfilesForClass = { @@ -64,181 +51,192 @@ GovSteamFV2::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteamFV2_dt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_dt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_ti(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_ti(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_tt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_vmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_vmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteamFV2_dt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dt; if (!buffer.str().empty()) @@ -252,7 +250,8 @@ bool get_GovSteamFV2_dt(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV2_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -266,7 +265,8 @@ bool get_GovSteamFV2_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamFV2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -280,7 +280,8 @@ bool get_GovSteamFV2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovSteamFV2_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -294,7 +295,8 @@ bool get_GovSteamFV2_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamFV2_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -308,7 +310,8 @@ bool get_GovSteamFV2_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV2_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -322,7 +325,8 @@ bool get_GovSteamFV2_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV2_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -336,7 +340,8 @@ bool get_GovSteamFV2_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV2_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -350,7 +355,8 @@ bool get_GovSteamFV2_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV2_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -364,7 +370,8 @@ bool get_GovSteamFV2_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV2_ti(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti; if (!buffer.str().empty()) @@ -378,7 +385,8 @@ bool get_GovSteamFV2_ti(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV2_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tt; if (!buffer.str().empty()) @@ -392,7 +400,8 @@ bool get_GovSteamFV2_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV2_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmax; if (!buffer.str().empty()) @@ -406,7 +415,8 @@ bool get_GovSteamFV2_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV2_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmin; if (!buffer.str().empty()) @@ -418,8 +428,6 @@ bool get_GovSteamFV2_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char GovSteamFV2::debugName[] = "GovSteamFV2"; const char* GovSteamFV2::debugString() const { @@ -428,24 +436,24 @@ const char* GovSteamFV2::debugString() const void GovSteamFV2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteamFV2"), &GovSteamFV2_factory)); + factory_map.emplace("cim:GovSteamFV2", &GovSteamFV2_factory); } void GovSteamFV2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.dt"), &assign_GovSteamFV2_dt)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.k"), &assign_GovSteamFV2_k)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.mwbase"), &assign_GovSteamFV2_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.r"), &assign_GovSteamFV2_r)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.t1"), &assign_GovSteamFV2_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.t3"), &assign_GovSteamFV2_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.ta"), &assign_GovSteamFV2_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.tb"), &assign_GovSteamFV2_tb)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.tc"), &assign_GovSteamFV2_tc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.ti"), &assign_GovSteamFV2_ti)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.tt"), &assign_GovSteamFV2_tt)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.vmax"), &assign_GovSteamFV2_vmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.vmin"), &assign_GovSteamFV2_vmin)); + assign_map.emplace("cim:GovSteamFV2.dt", &assign_GovSteamFV2_dt); + assign_map.emplace("cim:GovSteamFV2.k", &assign_GovSteamFV2_k); + assign_map.emplace("cim:GovSteamFV2.mwbase", &assign_GovSteamFV2_mwbase); + assign_map.emplace("cim:GovSteamFV2.r", &assign_GovSteamFV2_r); + assign_map.emplace("cim:GovSteamFV2.t1", &assign_GovSteamFV2_t1); + assign_map.emplace("cim:GovSteamFV2.t3", &assign_GovSteamFV2_t3); + assign_map.emplace("cim:GovSteamFV2.ta", &assign_GovSteamFV2_ta); + assign_map.emplace("cim:GovSteamFV2.tb", &assign_GovSteamFV2_tb); + assign_map.emplace("cim:GovSteamFV2.tc", &assign_GovSteamFV2_tc); + assign_map.emplace("cim:GovSteamFV2.ti", &assign_GovSteamFV2_ti); + assign_map.emplace("cim:GovSteamFV2.tt", &assign_GovSteamFV2_tt); + assign_map.emplace("cim:GovSteamFV2.vmax", &assign_GovSteamFV2_vmax); + assign_map.emplace("cim:GovSteamFV2.vmin", &assign_GovSteamFV2_vmin); } void GovSteamFV2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/GovSteamFV2.hpp b/CGMES_2.4.15_27JAN2020/GovSteamFV2.hpp index b255ec8cc..7df266adb 100644 --- a/CGMES_2.4.15_27JAN2020/GovSteamFV2.hpp +++ b/CGMES_2.4.15_27JAN2020/GovSteamFV2.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Steam turbine governor with reheat time constants and modeling of the effects of fast valve closing to reduce mechanical power. - */ + /** \brief Steam turbine governor with reheat time constants and modeling of the effects of fast valve closing to reduce mechanical power. */ class GovSteamFV2 : public TurbineGovernorDynamics { public: @@ -29,19 +27,44 @@ namespace CIMPP GovSteamFV2(); ~GovSteamFV2() override; - CIMPP::PU dt; /* (Dt). Default: nullptr */ - CIMPP::PU k; /* Fraction of the turbine power developed by turbine sections not involved in fast valving (K). Default: nullptr */ - CIMPP::ActivePower mwbase; /* Alternate Base used instead of Machine base in equipment model if necessary (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU r; /* (R). Default: nullptr */ - CIMPP::Seconds t1; /* Governor time constant (T1). Default: nullptr */ - CIMPP::Seconds t3; /* Reheater time constant (T3). Default: nullptr */ - CIMPP::Seconds ta; /* Time after initial time for valve to close (Ta). Default: nullptr */ - CIMPP::Seconds tb; /* Time after initial time for valve to begin opening (Tb). Default: nullptr */ - CIMPP::Seconds tc; /* Time after initial time for valve to become fully open (Tc). Default: nullptr */ - CIMPP::Seconds ti; /* Initial time to begin fast valving (Ti). Default: nullptr */ - CIMPP::Seconds tt; /* Time constant with which power falls off after intercept valve closure (Tt). Default: nullptr */ - CIMPP::PU vmax; /* (Vmax). Default: nullptr */ - CIMPP::PU vmin; /* (Vmin). Default: nullptr */ + /** \brief (Dt). Default: nullptr */ + CIMPP::PU dt; + + /** \brief Fraction of the turbine power developed by turbine sections not involved in fast valving (K). Default: nullptr */ + CIMPP::PU k; + + /** \brief Alternate Base used instead of Machine base in equipment model if necessary (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief (R). Default: nullptr */ + CIMPP::PU r; + + /** \brief Governor time constant (T1). Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Reheater time constant (T3). Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Time after initial time for valve to close (Ta). Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Time after initial time for valve to begin opening (Tb). Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Time after initial time for valve to become fully open (Tc). Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Initial time to begin fast valving (Ti). Default: nullptr */ + CIMPP::Seconds ti; + + /** \brief Time constant with which power falls off after intercept valve closure (Tt). Default: nullptr */ + CIMPP::Seconds tt; + + /** \brief (Vmax). Default: nullptr */ + CIMPP::PU vmax; + + /** \brief (Vmin). Default: nullptr */ + CIMPP::PU vmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GovSteamFV3.cpp b/CGMES_2.4.15_27JAN2020/GovSteamFV3.cpp index c9f2c8a79..871238fb7 100644 --- a/CGMES_2.4.15_27JAN2020/GovSteamFV3.cpp +++ b/CGMES_2.4.15_27JAN2020/GovSteamFV3.cpp @@ -8,30 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -GovSteamFV3::GovSteamFV3() {}; -GovSteamFV3::~GovSteamFV3() {}; +GovSteamFV3::GovSteamFV3() {} +GovSteamFV3::~GovSteamFV3() {} static const std::list PossibleProfilesForClass = { @@ -76,259 +57,276 @@ GovSteamFV3::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteamFV3_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_prmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_prmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->prmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_uc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_uo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_uo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteamFV3_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -342,7 +340,8 @@ bool get_GovSteamFV3_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamFV3_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -356,7 +355,8 @@ bool get_GovSteamFV3_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -370,7 +370,8 @@ bool get_GovSteamFV3_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -384,7 +385,8 @@ bool get_GovSteamFV3_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -398,7 +400,8 @@ bool get_GovSteamFV3_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovSteamFV3_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -412,7 +415,8 @@ bool get_GovSteamFV3_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV3_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -426,7 +430,8 @@ bool get_GovSteamFV3_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV3_prmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->prmax; if (!buffer.str().empty()) @@ -440,7 +445,8 @@ bool get_GovSteamFV3_prmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamFV3_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -454,7 +460,8 @@ bool get_GovSteamFV3_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -468,7 +475,8 @@ bool get_GovSteamFV3_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -482,7 +490,8 @@ bool get_GovSteamFV3_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -496,7 +505,8 @@ bool get_GovSteamFV3_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -510,7 +520,8 @@ bool get_GovSteamFV3_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -524,7 +535,8 @@ bool get_GovSteamFV3_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -538,7 +550,8 @@ bool get_GovSteamFV3_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -552,7 +565,8 @@ bool get_GovSteamFV3_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -566,7 +580,8 @@ bool get_GovSteamFV3_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uc; if (!buffer.str().empty()) @@ -580,7 +595,8 @@ bool get_GovSteamFV3_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uo; if (!buffer.str().empty()) @@ -592,8 +608,6 @@ bool get_GovSteamFV3_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char GovSteamFV3::debugName[] = "GovSteamFV3"; const char* GovSteamFV3::debugString() const { @@ -602,30 +616,30 @@ const char* GovSteamFV3::debugString() const void GovSteamFV3::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteamFV3"), &GovSteamFV3_factory)); + factory_map.emplace("cim:GovSteamFV3", &GovSteamFV3_factory); } void GovSteamFV3::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.k"), &assign_GovSteamFV3_k)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.k1"), &assign_GovSteamFV3_k1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.k2"), &assign_GovSteamFV3_k2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.k3"), &assign_GovSteamFV3_k3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.mwbase"), &assign_GovSteamFV3_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.pmax"), &assign_GovSteamFV3_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.pmin"), &assign_GovSteamFV3_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.prmax"), &assign_GovSteamFV3_prmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.t1"), &assign_GovSteamFV3_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.t2"), &assign_GovSteamFV3_t2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.t3"), &assign_GovSteamFV3_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.t4"), &assign_GovSteamFV3_t4)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.t5"), &assign_GovSteamFV3_t5)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.t6"), &assign_GovSteamFV3_t6)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.ta"), &assign_GovSteamFV3_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.tb"), &assign_GovSteamFV3_tb)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.tc"), &assign_GovSteamFV3_tc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.uc"), &assign_GovSteamFV3_uc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.uo"), &assign_GovSteamFV3_uo)); + assign_map.emplace("cim:GovSteamFV3.k", &assign_GovSteamFV3_k); + assign_map.emplace("cim:GovSteamFV3.k1", &assign_GovSteamFV3_k1); + assign_map.emplace("cim:GovSteamFV3.k2", &assign_GovSteamFV3_k2); + assign_map.emplace("cim:GovSteamFV3.k3", &assign_GovSteamFV3_k3); + assign_map.emplace("cim:GovSteamFV3.mwbase", &assign_GovSteamFV3_mwbase); + assign_map.emplace("cim:GovSteamFV3.pmax", &assign_GovSteamFV3_pmax); + assign_map.emplace("cim:GovSteamFV3.pmin", &assign_GovSteamFV3_pmin); + assign_map.emplace("cim:GovSteamFV3.prmax", &assign_GovSteamFV3_prmax); + assign_map.emplace("cim:GovSteamFV3.t1", &assign_GovSteamFV3_t1); + assign_map.emplace("cim:GovSteamFV3.t2", &assign_GovSteamFV3_t2); + assign_map.emplace("cim:GovSteamFV3.t3", &assign_GovSteamFV3_t3); + assign_map.emplace("cim:GovSteamFV3.t4", &assign_GovSteamFV3_t4); + assign_map.emplace("cim:GovSteamFV3.t5", &assign_GovSteamFV3_t5); + assign_map.emplace("cim:GovSteamFV3.t6", &assign_GovSteamFV3_t6); + assign_map.emplace("cim:GovSteamFV3.ta", &assign_GovSteamFV3_ta); + assign_map.emplace("cim:GovSteamFV3.tb", &assign_GovSteamFV3_tb); + assign_map.emplace("cim:GovSteamFV3.tc", &assign_GovSteamFV3_tc); + assign_map.emplace("cim:GovSteamFV3.uc", &assign_GovSteamFV3_uc); + assign_map.emplace("cim:GovSteamFV3.uo", &assign_GovSteamFV3_uo); } void GovSteamFV3::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/GovSteamFV3.hpp b/CGMES_2.4.15_27JAN2020/GovSteamFV3.hpp index ac88cc953..d69d84dd6 100644 --- a/CGMES_2.4.15_27JAN2020/GovSteamFV3.hpp +++ b/CGMES_2.4.15_27JAN2020/GovSteamFV3.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Simplified GovSteamIEEE1 Steam turbine governor model with Prmax limit and fast valving. - */ + /** \brief Simplified GovSteamIEEE1 Steam turbine governor model with Prmax limit and fast valving. */ class GovSteamFV3 : public TurbineGovernorDynamics { public: @@ -30,25 +28,62 @@ namespace CIMPP GovSteamFV3(); ~GovSteamFV3() override; - CIMPP::PU k; /* Governor gain, (reciprocal of droop) (K). Typical Value = 20. Default: nullptr */ - CIMPP::PU k1; /* Fraction of turbine power developed after first boiler pass (K1). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU k2; /* Fraction of turbine power developed after second boiler pass (K2). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU k3; /* Fraction of hp turbine power developed after crossover or third boiler pass (K3). Typical Value = 0.6. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU pmax; /* Maximum valve opening, PU of MWbase (Pmax). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum valve opening, PU of MWbase (Pmin). Typical Value = 0. Default: nullptr */ - CIMPP::PU prmax; /* Max. pressure in reheater (Prmax). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds t1; /* Governor lead time constant (T1). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t2; /* Governor lag time constant (T2). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t3; /* Valve positioner time constant (T3). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t4; /* Inlet piping/steam bowl time constant (T4). Typical Value = 0.2. Default: nullptr */ - CIMPP::Seconds t5; /* Time constant of second boiler pass (i.e. reheater) (T5). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds t6; /* Time constant of crossover or third boiler pass (T6). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds ta; /* Time to close intercept valve (IV) (Ta). Typical Value = 0.97. Default: nullptr */ - CIMPP::Seconds tb; /* Time until IV starts to reopen (Tb). Typical Value = 0.98. Default: nullptr */ - CIMPP::Seconds tc; /* Time until IV is fully open (Tc). Typical Value = 0.99. Default: nullptr */ - CIMPP::Simple_Float uc; /* Maximum valve closing velocity (Uc). Unit = PU/sec. Typical Value = -1. Default: nullptr */ - CIMPP::Simple_Float uo; /* Maximum valve opening velocity (Uo). Unit = PU/sec. Typical Value = 0.1. Default: nullptr */ + /** \brief Governor gain, (reciprocal of droop) (K). Typical Value = 20. Default: nullptr */ + CIMPP::PU k; + + /** \brief Fraction of turbine power developed after first boiler pass (K1). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU k1; + + /** \brief Fraction of turbine power developed after second boiler pass (K2). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU k2; + + /** \brief Fraction of hp turbine power developed after crossover or third boiler pass (K3). Typical Value = 0.6. Default: nullptr */ + CIMPP::PU k3; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Maximum valve opening, PU of MWbase (Pmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum valve opening, PU of MWbase (Pmin). Typical Value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Max. pressure in reheater (Prmax). Typical Value = 1. Default: nullptr */ + CIMPP::PU prmax; + + /** \brief Governor lead time constant (T1). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Governor lag time constant (T2). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Valve positioner time constant (T3). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Inlet piping/steam bowl time constant (T4). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant of second boiler pass (i.e. reheater) (T5). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Time constant of crossover or third boiler pass (T6). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time to close intercept valve (IV) (Ta). Typical Value = 0.97. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Time until IV starts to reopen (Tb). Typical Value = 0.98. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Time until IV is fully open (Tc). Typical Value = 0.99. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Maximum valve closing velocity (Uc). Unit = PU/sec. Typical Value = -1. Default: nullptr */ + CIMPP::Simple_Float uc; + + /** \brief Maximum valve opening velocity (Uo). Unit = PU/sec. Typical Value = 0.1. Default: nullptr */ + CIMPP::Simple_Float uo; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GovSteamFV4.cpp b/CGMES_2.4.15_27JAN2020/GovSteamFV4.cpp index 3e0591698..18cb0f39c 100644 --- a/CGMES_2.4.15_27JAN2020/GovSteamFV4.cpp +++ b/CGMES_2.4.15_27JAN2020/GovSteamFV4.cpp @@ -8,62 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -GovSteamFV4::GovSteamFV4() {}; -GovSteamFV4::~GovSteamFV4() {}; +GovSteamFV4::GovSteamFV4() {} +GovSteamFV4::~GovSteamFV4() {} static const std::list PossibleProfilesForClass = { @@ -140,675 +89,724 @@ GovSteamFV4::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteamFV4_cpsmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_cpsmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->cpsmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_cpsmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_cpsmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->cpsmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_crmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_crmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->crmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_crmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_crmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->crmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kf3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kf3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_khp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_khp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->khp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kic(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kic(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kic; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kip(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kip; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kit; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kmp1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kmp1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kmp1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kmp2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kmp2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kmp2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kpc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kpc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kpp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kpt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kpt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_krc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_krc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->krc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_ksh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_ksh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ksh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_lpi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_lpi(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lpi; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_lps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_lps(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lps; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_mnef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_mnef(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mnef; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_mxef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_mxef(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mxef; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_pr1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_pr1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pr1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_pr2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_pr2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pr2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_psmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_psmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->psmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_rsmimn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_rsmimn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rsmimn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_rsmimx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_rsmimx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rsmimx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_rvgmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_rvgmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rvgmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_rvgmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_rvgmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rvgmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_srmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_srmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->srmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_srmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_srmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->srmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_srsmp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_srsmp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->srsmp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_svmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_svmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->svmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_svmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_svmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->svmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_tam(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_tam(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tam; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_tcm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_tcm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tcm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_tdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_tdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_tf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_tf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_thp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_thp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->thp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_tmp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_tmp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tmp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_trh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_trh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->trh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_tv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_tv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_ty(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_ty(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ty; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_y(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_y(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->y; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_yhpmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_yhpmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->yhpmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_yhpmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_yhpmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->yhpmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_ympmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_ympmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ympmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_ympmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_ympmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ympmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteamFV4_cpsmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->cpsmn; if (!buffer.str().empty()) @@ -822,7 +820,8 @@ bool get_GovSteamFV4_cpsmn(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamFV4_cpsmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->cpsmx; if (!buffer.str().empty()) @@ -836,7 +835,8 @@ bool get_GovSteamFV4_cpsmx(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamFV4_crmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->crmn; if (!buffer.str().empty()) @@ -850,7 +850,8 @@ bool get_GovSteamFV4_crmn(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_crmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->crmx; if (!buffer.str().empty()) @@ -864,7 +865,8 @@ bool get_GovSteamFV4_crmx(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_kdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdc; if (!buffer.str().empty()) @@ -878,7 +880,8 @@ bool get_GovSteamFV4_kdc(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_kf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf1; if (!buffer.str().empty()) @@ -892,7 +895,8 @@ bool get_GovSteamFV4_kf1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_kf3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf3; if (!buffer.str().empty()) @@ -906,7 +910,8 @@ bool get_GovSteamFV4_kf3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_khp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->khp; if (!buffer.str().empty()) @@ -920,7 +925,8 @@ bool get_GovSteamFV4_khp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_kic(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kic; if (!buffer.str().empty()) @@ -934,7 +940,8 @@ bool get_GovSteamFV4_kic(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_kip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kip; if (!buffer.str().empty()) @@ -948,7 +955,8 @@ bool get_GovSteamFV4_kip(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_kit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kit; if (!buffer.str().empty()) @@ -962,7 +970,8 @@ bool get_GovSteamFV4_kit(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_kmp1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kmp1; if (!buffer.str().empty()) @@ -976,7 +985,8 @@ bool get_GovSteamFV4_kmp1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_kmp2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kmp2; if (!buffer.str().empty()) @@ -990,7 +1000,8 @@ bool get_GovSteamFV4_kmp2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_kpc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpc; if (!buffer.str().empty()) @@ -1004,7 +1015,8 @@ bool get_GovSteamFV4_kpc(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_kpp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpp; if (!buffer.str().empty()) @@ -1018,7 +1030,8 @@ bool get_GovSteamFV4_kpp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_kpt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpt; if (!buffer.str().empty()) @@ -1032,7 +1045,8 @@ bool get_GovSteamFV4_kpt(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_krc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->krc; if (!buffer.str().empty()) @@ -1046,7 +1060,8 @@ bool get_GovSteamFV4_krc(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_ksh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ksh; if (!buffer.str().empty()) @@ -1060,7 +1075,8 @@ bool get_GovSteamFV4_ksh(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_lpi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lpi; if (!buffer.str().empty()) @@ -1074,7 +1090,8 @@ bool get_GovSteamFV4_lpi(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_lps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lps; if (!buffer.str().empty()) @@ -1088,7 +1105,8 @@ bool get_GovSteamFV4_lps(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_mnef(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mnef; if (!buffer.str().empty()) @@ -1102,7 +1120,8 @@ bool get_GovSteamFV4_mnef(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_mxef(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mxef; if (!buffer.str().empty()) @@ -1116,7 +1135,8 @@ bool get_GovSteamFV4_mxef(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_pr1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pr1; if (!buffer.str().empty()) @@ -1130,7 +1150,8 @@ bool get_GovSteamFV4_pr1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_pr2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pr2; if (!buffer.str().empty()) @@ -1144,7 +1165,8 @@ bool get_GovSteamFV4_pr2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_psmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->psmn; if (!buffer.str().empty()) @@ -1158,7 +1180,8 @@ bool get_GovSteamFV4_psmn(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_rsmimn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rsmimn; if (!buffer.str().empty()) @@ -1172,7 +1195,8 @@ bool get_GovSteamFV4_rsmimn(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovSteamFV4_rsmimx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rsmimx; if (!buffer.str().empty()) @@ -1186,7 +1210,8 @@ bool get_GovSteamFV4_rsmimx(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovSteamFV4_rvgmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rvgmn; if (!buffer.str().empty()) @@ -1200,7 +1225,8 @@ bool get_GovSteamFV4_rvgmn(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamFV4_rvgmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rvgmx; if (!buffer.str().empty()) @@ -1214,7 +1240,8 @@ bool get_GovSteamFV4_rvgmx(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamFV4_srmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->srmn; if (!buffer.str().empty()) @@ -1228,7 +1255,8 @@ bool get_GovSteamFV4_srmn(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_srmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->srmx; if (!buffer.str().empty()) @@ -1242,7 +1270,8 @@ bool get_GovSteamFV4_srmx(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_srsmp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->srsmp; if (!buffer.str().empty()) @@ -1256,7 +1285,8 @@ bool get_GovSteamFV4_srsmp(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamFV4_svmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->svmn; if (!buffer.str().empty()) @@ -1270,7 +1300,8 @@ bool get_GovSteamFV4_svmn(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_svmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->svmx; if (!buffer.str().empty()) @@ -1284,7 +1315,8 @@ bool get_GovSteamFV4_svmx(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -1298,7 +1330,8 @@ bool get_GovSteamFV4_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV4_tam(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tam; if (!buffer.str().empty()) @@ -1312,7 +1345,8 @@ bool get_GovSteamFV4_tam(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -1326,7 +1360,8 @@ bool get_GovSteamFV4_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV4_tcm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tcm; if (!buffer.str().empty()) @@ -1340,7 +1375,8 @@ bool get_GovSteamFV4_tcm(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_tdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdc; if (!buffer.str().empty()) @@ -1354,7 +1390,8 @@ bool get_GovSteamFV4_tdc(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf1; if (!buffer.str().empty()) @@ -1368,7 +1405,8 @@ bool get_GovSteamFV4_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf2; if (!buffer.str().empty()) @@ -1382,7 +1420,8 @@ bool get_GovSteamFV4_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_thp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thp; if (!buffer.str().empty()) @@ -1396,7 +1435,8 @@ bool get_GovSteamFV4_thp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_tmp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tmp; if (!buffer.str().empty()) @@ -1410,7 +1450,8 @@ bool get_GovSteamFV4_tmp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_trh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->trh; if (!buffer.str().empty()) @@ -1424,7 +1465,8 @@ bool get_GovSteamFV4_trh(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_tv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tv; if (!buffer.str().empty()) @@ -1438,7 +1480,8 @@ bool get_GovSteamFV4_tv(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV4_ty(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ty; if (!buffer.str().empty()) @@ -1452,7 +1495,8 @@ bool get_GovSteamFV4_ty(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV4_y(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->y; if (!buffer.str().empty()) @@ -1466,7 +1510,8 @@ bool get_GovSteamFV4_y(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamFV4_yhpmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->yhpmn; if (!buffer.str().empty()) @@ -1480,7 +1525,8 @@ bool get_GovSteamFV4_yhpmn(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamFV4_yhpmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->yhpmx; if (!buffer.str().empty()) @@ -1494,7 +1540,8 @@ bool get_GovSteamFV4_yhpmx(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamFV4_ympmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ympmn; if (!buffer.str().empty()) @@ -1508,7 +1555,8 @@ bool get_GovSteamFV4_ympmn(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamFV4_ympmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ympmx; if (!buffer.str().empty()) @@ -1520,8 +1568,6 @@ bool get_GovSteamFV4_ympmx(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char GovSteamFV4::debugName[] = "GovSteamFV4"; const char* GovSteamFV4::debugString() const { @@ -1530,62 +1576,62 @@ const char* GovSteamFV4::debugString() const void GovSteamFV4::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteamFV4"), &GovSteamFV4_factory)); + factory_map.emplace("cim:GovSteamFV4", &GovSteamFV4_factory); } void GovSteamFV4::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.cpsmn"), &assign_GovSteamFV4_cpsmn)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.cpsmx"), &assign_GovSteamFV4_cpsmx)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.crmn"), &assign_GovSteamFV4_crmn)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.crmx"), &assign_GovSteamFV4_crmx)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kdc"), &assign_GovSteamFV4_kdc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kf1"), &assign_GovSteamFV4_kf1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kf3"), &assign_GovSteamFV4_kf3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.khp"), &assign_GovSteamFV4_khp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kic"), &assign_GovSteamFV4_kic)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kip"), &assign_GovSteamFV4_kip)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kit"), &assign_GovSteamFV4_kit)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kmp1"), &assign_GovSteamFV4_kmp1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kmp2"), &assign_GovSteamFV4_kmp2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kpc"), &assign_GovSteamFV4_kpc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kpp"), &assign_GovSteamFV4_kpp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kpt"), &assign_GovSteamFV4_kpt)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.krc"), &assign_GovSteamFV4_krc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.ksh"), &assign_GovSteamFV4_ksh)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.lpi"), &assign_GovSteamFV4_lpi)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.lps"), &assign_GovSteamFV4_lps)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.mnef"), &assign_GovSteamFV4_mnef)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.mxef"), &assign_GovSteamFV4_mxef)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.pr1"), &assign_GovSteamFV4_pr1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.pr2"), &assign_GovSteamFV4_pr2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.psmn"), &assign_GovSteamFV4_psmn)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.rsmimn"), &assign_GovSteamFV4_rsmimn)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.rsmimx"), &assign_GovSteamFV4_rsmimx)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.rvgmn"), &assign_GovSteamFV4_rvgmn)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.rvgmx"), &assign_GovSteamFV4_rvgmx)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.srmn"), &assign_GovSteamFV4_srmn)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.srmx"), &assign_GovSteamFV4_srmx)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.srsmp"), &assign_GovSteamFV4_srsmp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.svmn"), &assign_GovSteamFV4_svmn)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.svmx"), &assign_GovSteamFV4_svmx)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.ta"), &assign_GovSteamFV4_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.tam"), &assign_GovSteamFV4_tam)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.tc"), &assign_GovSteamFV4_tc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.tcm"), &assign_GovSteamFV4_tcm)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.tdc"), &assign_GovSteamFV4_tdc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.tf1"), &assign_GovSteamFV4_tf1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.tf2"), &assign_GovSteamFV4_tf2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.thp"), &assign_GovSteamFV4_thp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.tmp"), &assign_GovSteamFV4_tmp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.trh"), &assign_GovSteamFV4_trh)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.tv"), &assign_GovSteamFV4_tv)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.ty"), &assign_GovSteamFV4_ty)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.y"), &assign_GovSteamFV4_y)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.yhpmn"), &assign_GovSteamFV4_yhpmn)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.yhpmx"), &assign_GovSteamFV4_yhpmx)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.ympmn"), &assign_GovSteamFV4_ympmn)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.ympmx"), &assign_GovSteamFV4_ympmx)); + assign_map.emplace("cim:GovSteamFV4.cpsmn", &assign_GovSteamFV4_cpsmn); + assign_map.emplace("cim:GovSteamFV4.cpsmx", &assign_GovSteamFV4_cpsmx); + assign_map.emplace("cim:GovSteamFV4.crmn", &assign_GovSteamFV4_crmn); + assign_map.emplace("cim:GovSteamFV4.crmx", &assign_GovSteamFV4_crmx); + assign_map.emplace("cim:GovSteamFV4.kdc", &assign_GovSteamFV4_kdc); + assign_map.emplace("cim:GovSteamFV4.kf1", &assign_GovSteamFV4_kf1); + assign_map.emplace("cim:GovSteamFV4.kf3", &assign_GovSteamFV4_kf3); + assign_map.emplace("cim:GovSteamFV4.khp", &assign_GovSteamFV4_khp); + assign_map.emplace("cim:GovSteamFV4.kic", &assign_GovSteamFV4_kic); + assign_map.emplace("cim:GovSteamFV4.kip", &assign_GovSteamFV4_kip); + assign_map.emplace("cim:GovSteamFV4.kit", &assign_GovSteamFV4_kit); + assign_map.emplace("cim:GovSteamFV4.kmp1", &assign_GovSteamFV4_kmp1); + assign_map.emplace("cim:GovSteamFV4.kmp2", &assign_GovSteamFV4_kmp2); + assign_map.emplace("cim:GovSteamFV4.kpc", &assign_GovSteamFV4_kpc); + assign_map.emplace("cim:GovSteamFV4.kpp", &assign_GovSteamFV4_kpp); + assign_map.emplace("cim:GovSteamFV4.kpt", &assign_GovSteamFV4_kpt); + assign_map.emplace("cim:GovSteamFV4.krc", &assign_GovSteamFV4_krc); + assign_map.emplace("cim:GovSteamFV4.ksh", &assign_GovSteamFV4_ksh); + assign_map.emplace("cim:GovSteamFV4.lpi", &assign_GovSteamFV4_lpi); + assign_map.emplace("cim:GovSteamFV4.lps", &assign_GovSteamFV4_lps); + assign_map.emplace("cim:GovSteamFV4.mnef", &assign_GovSteamFV4_mnef); + assign_map.emplace("cim:GovSteamFV4.mxef", &assign_GovSteamFV4_mxef); + assign_map.emplace("cim:GovSteamFV4.pr1", &assign_GovSteamFV4_pr1); + assign_map.emplace("cim:GovSteamFV4.pr2", &assign_GovSteamFV4_pr2); + assign_map.emplace("cim:GovSteamFV4.psmn", &assign_GovSteamFV4_psmn); + assign_map.emplace("cim:GovSteamFV4.rsmimn", &assign_GovSteamFV4_rsmimn); + assign_map.emplace("cim:GovSteamFV4.rsmimx", &assign_GovSteamFV4_rsmimx); + assign_map.emplace("cim:GovSteamFV4.rvgmn", &assign_GovSteamFV4_rvgmn); + assign_map.emplace("cim:GovSteamFV4.rvgmx", &assign_GovSteamFV4_rvgmx); + assign_map.emplace("cim:GovSteamFV4.srmn", &assign_GovSteamFV4_srmn); + assign_map.emplace("cim:GovSteamFV4.srmx", &assign_GovSteamFV4_srmx); + assign_map.emplace("cim:GovSteamFV4.srsmp", &assign_GovSteamFV4_srsmp); + assign_map.emplace("cim:GovSteamFV4.svmn", &assign_GovSteamFV4_svmn); + assign_map.emplace("cim:GovSteamFV4.svmx", &assign_GovSteamFV4_svmx); + assign_map.emplace("cim:GovSteamFV4.ta", &assign_GovSteamFV4_ta); + assign_map.emplace("cim:GovSteamFV4.tam", &assign_GovSteamFV4_tam); + assign_map.emplace("cim:GovSteamFV4.tc", &assign_GovSteamFV4_tc); + assign_map.emplace("cim:GovSteamFV4.tcm", &assign_GovSteamFV4_tcm); + assign_map.emplace("cim:GovSteamFV4.tdc", &assign_GovSteamFV4_tdc); + assign_map.emplace("cim:GovSteamFV4.tf1", &assign_GovSteamFV4_tf1); + assign_map.emplace("cim:GovSteamFV4.tf2", &assign_GovSteamFV4_tf2); + assign_map.emplace("cim:GovSteamFV4.thp", &assign_GovSteamFV4_thp); + assign_map.emplace("cim:GovSteamFV4.tmp", &assign_GovSteamFV4_tmp); + assign_map.emplace("cim:GovSteamFV4.trh", &assign_GovSteamFV4_trh); + assign_map.emplace("cim:GovSteamFV4.tv", &assign_GovSteamFV4_tv); + assign_map.emplace("cim:GovSteamFV4.ty", &assign_GovSteamFV4_ty); + assign_map.emplace("cim:GovSteamFV4.y", &assign_GovSteamFV4_y); + assign_map.emplace("cim:GovSteamFV4.yhpmn", &assign_GovSteamFV4_yhpmn); + assign_map.emplace("cim:GovSteamFV4.yhpmx", &assign_GovSteamFV4_yhpmx); + assign_map.emplace("cim:GovSteamFV4.ympmn", &assign_GovSteamFV4_ympmn); + assign_map.emplace("cim:GovSteamFV4.ympmx", &assign_GovSteamFV4_ympmx); } void GovSteamFV4::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/GovSteamFV4.hpp b/CGMES_2.4.15_27JAN2020/GovSteamFV4.hpp index 1797a634c..1a9e91160 100644 --- a/CGMES_2.4.15_27JAN2020/GovSteamFV4.hpp +++ b/CGMES_2.4.15_27JAN2020/GovSteamFV4.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Detailed electro-hydraulic governor for steam unit. - */ + /** \brief Detailed electro-hydraulic governor for steam unit. */ class GovSteamFV4 : public TurbineGovernorDynamics { public: @@ -29,57 +27,158 @@ namespace CIMPP GovSteamFV4(); ~GovSteamFV4() override; - CIMPP::PU cpsmn; /* Minimum value of pressure regulator output (Cpsmn). Typical Value = -1. Default: nullptr */ - CIMPP::PU cpsmx; /* Maximum value of pressure regulator output (Cpsmx). Typical Value = 1. Default: nullptr */ - CIMPP::PU crmn; /* Minimum value of regulator set-point (Crmn). Typical Value = 0. Default: nullptr */ - CIMPP::PU crmx; /* Maximum value of regulator set-point (Crmx). Typical Value = 1.2. Default: nullptr */ - CIMPP::PU kdc; /* Derivative gain of pressure regulator (Kdc). Typical Value = 1. Default: nullptr */ - CIMPP::PU kf1; /* Frequency bias (reciprocal of droop) (Kf1). Typical Value = 20. Default: nullptr */ - CIMPP::PU kf3; /* Frequency control (reciprocal of droop) (Kf3). Typical Value = 20. Default: nullptr */ - CIMPP::PU khp; /* Fraction of total turbine output generated by HP part (Khp). Typical Value = 0.35. Default: nullptr */ - CIMPP::PU kic; /* Integral gain of pressure regulator (Kic). Typical Value = 0.0033. Default: nullptr */ - CIMPP::PU kip; /* Integral gain of pressure feedback regulator (Kip). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU kit; /* Integral gain of electro-hydraulic regulator (Kit). Typical Value = 0.04. Default: nullptr */ - CIMPP::PU kmp1; /* First gain coefficient of intercept valves characteristic (Kmp1). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU kmp2; /* Second gain coefficient of intercept valves characteristic (Kmp2). Typical Value = 3.5. Default: nullptr */ - CIMPP::PU kpc; /* Proportional gain of pressure regulator (Kpc). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU kpp; /* Proportional gain of pressure feedback regulator (Kpp). Typical Value = 1. Default: nullptr */ - CIMPP::PU kpt; /* Proportional gain of electro-hydraulic regulator (Kpt). Typical Value = 0.3. Default: nullptr */ - CIMPP::PU krc; /* Maximum variation of fuel flow (Krc). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU ksh; /* Pressure loss due to flow friction in the boiler tubes (Ksh). Typical Value = 0.08. Default: nullptr */ - CIMPP::PU lpi; /* Maximum negative power error (Lpi). Typical Value = -0.15. Default: nullptr */ - CIMPP::PU lps; /* Maximum positive power error (Lps). Typical Value = 0.03. Default: nullptr */ - CIMPP::PU mnef; /* Lower limit for frequency correction (MN). Typical Value = -0.05. Default: nullptr */ - CIMPP::PU mxef; /* Upper limit for frequency correction (MX). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU pr1; /* First value of pressure set point static characteristic (Pr1). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU pr2; /* Second value of pressure set point static characteristic, corresponding to Ps0 = 1.0 PU (Pr2). Typical Value = 0.75. Default: nullptr */ - CIMPP::PU psmn; /* Minimum value of pressure set point static characteristic (Psmn). Typical Value = 1. Default: nullptr */ - CIMPP::PU rsmimn; /* Minimum value of integral regulator (Rsmimn). Typical Value = 0. Default: nullptr */ - CIMPP::PU rsmimx; /* Maximum value of integral regulator (Rsmimx). Typical Value = 1.1. Default: nullptr */ - CIMPP::PU rvgmn; /* Minimum value of integral regulator (Rvgmn). Typical Value = 0. Default: nullptr */ - CIMPP::PU rvgmx; /* Maximum value of integral regulator (Rvgmx). Typical Value = 1.2. Default: nullptr */ - CIMPP::PU srmn; /* Minimum valve opening (Srmn). Typical Value = 0. Default: nullptr */ - CIMPP::PU srmx; /* Maximum valve opening (Srmx). Typical Value = 1.1. Default: nullptr */ - CIMPP::PU srsmp; /* Intercept valves characteristic discontinuity point (Srsmp). Typical Value = 0.43. Default: nullptr */ - CIMPP::Simple_Float svmn; /* Maximum regulator gate closing velocity (Svmn). Typical Value = -0.0333. Default: nullptr */ - CIMPP::Simple_Float svmx; /* Maximum regulator gate opening velocity (Svmx). Typical Value = 0.0333. Default: nullptr */ - CIMPP::Seconds ta; /* Control valves rate opening time (Ta). Typical Value = 0.8. Default: nullptr */ - CIMPP::Seconds tam; /* Intercept valves rate opening time (Tam). Typical Value = 0.8. Default: nullptr */ - CIMPP::Seconds tc; /* Control valves rate closing time (Tc). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tcm; /* Intercept valves rate closing time (Tcm). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds tdc; /* Derivative time constant of pressure regulator (Tdc). Typical Value = 90. Default: nullptr */ - CIMPP::Seconds tf1; /* Time constant of fuel regulation (Tf1). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds tf2; /* Time constant of steam chest (Tf2). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds thp; /* High pressure (HP) time constant of the turbine (Thp). Typical Value = 0.15. Default: nullptr */ - CIMPP::Seconds tmp; /* Low pressure (LP) time constant of the turbine (Tmp). Typical Value = 0.4. Default: nullptr */ - CIMPP::Seconds trh; /* Reheater time constant of the turbine (Trh). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds tv; /* Boiler time constant (Tv). Typical Value = 60. Default: nullptr */ - CIMPP::Seconds ty; /* Control valves servo time constant (Ty). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU y; /* Coefficient of linearized equations of turbine (Stodola formulation) (Y). Typical Value = 0.13. Default: nullptr */ - CIMPP::PU yhpmn; /* Minimum control valve position (Yhpmn). Typical Value = 0. Default: nullptr */ - CIMPP::PU yhpmx; /* Maximum control valve position (Yhpmx). Typical Value = 1.1. Default: nullptr */ - CIMPP::PU ympmn; /* Minimum intercept valve position (Ympmn). Typical Value = 0. Default: nullptr */ - CIMPP::PU ympmx; /* Maximum intercept valve position (Ympmx). Typical Value = 1.1. Default: nullptr */ + /** \brief Minimum value of pressure regulator output (Cpsmn). Typical Value = -1. Default: nullptr */ + CIMPP::PU cpsmn; + + /** \brief Maximum value of pressure regulator output (Cpsmx). Typical Value = 1. Default: nullptr */ + CIMPP::PU cpsmx; + + /** \brief Minimum value of regulator set-point (Crmn). Typical Value = 0. Default: nullptr */ + CIMPP::PU crmn; + + /** \brief Maximum value of regulator set-point (Crmx). Typical Value = 1.2. Default: nullptr */ + CIMPP::PU crmx; + + /** \brief Derivative gain of pressure regulator (Kdc). Typical Value = 1. Default: nullptr */ + CIMPP::PU kdc; + + /** \brief Frequency bias (reciprocal of droop) (Kf1). Typical Value = 20. Default: nullptr */ + CIMPP::PU kf1; + + /** \brief Frequency control (reciprocal of droop) (Kf3). Typical Value = 20. Default: nullptr */ + CIMPP::PU kf3; + + /** \brief Fraction of total turbine output generated by HP part (Khp). Typical Value = 0.35. Default: nullptr */ + CIMPP::PU khp; + + /** \brief Integral gain of pressure regulator (Kic). Typical Value = 0.0033. Default: nullptr */ + CIMPP::PU kic; + + /** \brief Integral gain of pressure feedback regulator (Kip). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU kip; + + /** \brief Integral gain of electro-hydraulic regulator (Kit). Typical Value = 0.04. Default: nullptr */ + CIMPP::PU kit; + + /** \brief First gain coefficient of intercept valves characteristic (Kmp1). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU kmp1; + + /** \brief Second gain coefficient of intercept valves characteristic (Kmp2). Typical Value = 3.5. Default: nullptr */ + CIMPP::PU kmp2; + + /** \brief Proportional gain of pressure regulator (Kpc). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU kpc; + + /** \brief Proportional gain of pressure feedback regulator (Kpp). Typical Value = 1. Default: nullptr */ + CIMPP::PU kpp; + + /** \brief Proportional gain of electro-hydraulic regulator (Kpt). Typical Value = 0.3. Default: nullptr */ + CIMPP::PU kpt; + + /** \brief Maximum variation of fuel flow (Krc). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU krc; + + /** \brief Pressure loss due to flow friction in the boiler tubes (Ksh). Typical Value = 0.08. Default: nullptr */ + CIMPP::PU ksh; + + /** \brief Maximum negative power error (Lpi). Typical Value = -0.15. Default: nullptr */ + CIMPP::PU lpi; + + /** \brief Maximum positive power error (Lps). Typical Value = 0.03. Default: nullptr */ + CIMPP::PU lps; + + /** \brief Lower limit for frequency correction (MN). Typical Value = -0.05. Default: nullptr */ + CIMPP::PU mnef; + + /** \brief Upper limit for frequency correction (MX). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU mxef; + + /** \brief First value of pressure set point static characteristic (Pr1). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU pr1; + + /** \brief Second value of pressure set point static characteristic, corresponding to Ps0 = 1.0 PU (Pr2). Typical Value = 0.75. Default: nullptr */ + CIMPP::PU pr2; + + /** \brief Minimum value of pressure set point static characteristic (Psmn). Typical Value = 1. Default: nullptr */ + CIMPP::PU psmn; + + /** \brief Minimum value of integral regulator (Rsmimn). Typical Value = 0. Default: nullptr */ + CIMPP::PU rsmimn; + + /** \brief Maximum value of integral regulator (Rsmimx). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU rsmimx; + + /** \brief Minimum value of integral regulator (Rvgmn). Typical Value = 0. Default: nullptr */ + CIMPP::PU rvgmn; + + /** \brief Maximum value of integral regulator (Rvgmx). Typical Value = 1.2. Default: nullptr */ + CIMPP::PU rvgmx; + + /** \brief Minimum valve opening (Srmn). Typical Value = 0. Default: nullptr */ + CIMPP::PU srmn; + + /** \brief Maximum valve opening (Srmx). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU srmx; + + /** \brief Intercept valves characteristic discontinuity point (Srsmp). Typical Value = 0.43. Default: nullptr */ + CIMPP::PU srsmp; + + /** \brief Maximum regulator gate closing velocity (Svmn). Typical Value = -0.0333. Default: nullptr */ + CIMPP::Simple_Float svmn; + + /** \brief Maximum regulator gate opening velocity (Svmx). Typical Value = 0.0333. Default: nullptr */ + CIMPP::Simple_Float svmx; + + /** \brief Control valves rate opening time (Ta). Typical Value = 0.8. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Intercept valves rate opening time (Tam). Typical Value = 0.8. Default: nullptr */ + CIMPP::Seconds tam; + + /** \brief Control valves rate closing time (Tc). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Intercept valves rate closing time (Tcm). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds tcm; + + /** \brief Derivative time constant of pressure regulator (Tdc). Typical Value = 90. Default: nullptr */ + CIMPP::Seconds tdc; + + /** \brief Time constant of fuel regulation (Tf1). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds tf1; + + /** \brief Time constant of steam chest (Tf2). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds tf2; + + /** \brief High pressure (HP) time constant of the turbine (Thp). Typical Value = 0.15. Default: nullptr */ + CIMPP::Seconds thp; + + /** \brief Low pressure (LP) time constant of the turbine (Tmp). Typical Value = 0.4. Default: nullptr */ + CIMPP::Seconds tmp; + + /** \brief Reheater time constant of the turbine (Trh). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds trh; + + /** \brief Boiler time constant (Tv). Typical Value = 60. Default: nullptr */ + CIMPP::Seconds tv; + + /** \brief Control valves servo time constant (Ty). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds ty; + + /** \brief Coefficient of linearized equations of turbine (Stodola formulation) (Y). Typical Value = 0.13. Default: nullptr */ + CIMPP::PU y; + + /** \brief Minimum control valve position (Yhpmn). Typical Value = 0. Default: nullptr */ + CIMPP::PU yhpmn; + + /** \brief Maximum control valve position (Yhpmx). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU yhpmx; + + /** \brief Minimum intercept valve position (Ympmn). Typical Value = 0. Default: nullptr */ + CIMPP::PU ympmn; + + /** \brief Maximum intercept valve position (Ympmx). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU ympmx; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GovSteamIEEE1.cpp b/CGMES_2.4.15_27JAN2020/GovSteamIEEE1.cpp index c6207bca9..8dafb5bc6 100644 --- a/CGMES_2.4.15_27JAN2020/GovSteamIEEE1.cpp +++ b/CGMES_2.4.15_27JAN2020/GovSteamIEEE1.cpp @@ -8,32 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -GovSteamIEEE1::GovSteamIEEE1() {}; -GovSteamIEEE1::~GovSteamIEEE1() {}; +GovSteamIEEE1::GovSteamIEEE1() {} +GovSteamIEEE1::~GovSteamIEEE1() {} static const std::list PossibleProfilesForClass = { @@ -80,285 +59,304 @@ GovSteamIEEE1::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteamIEEE1_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_k4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_k5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_k5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_k6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_k6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_k7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_k7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_k8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_k8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_t7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_uc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_uo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_uo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteamIEEE1_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -372,7 +370,8 @@ bool get_GovSteamIEEE1_k(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamIEEE1_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -386,7 +385,8 @@ bool get_GovSteamIEEE1_k1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -400,7 +400,8 @@ bool get_GovSteamIEEE1_k2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -414,7 +415,8 @@ bool get_GovSteamIEEE1_k3(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k4; if (!buffer.str().empty()) @@ -428,7 +430,8 @@ bool get_GovSteamIEEE1_k4(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k5; if (!buffer.str().empty()) @@ -442,7 +445,8 @@ bool get_GovSteamIEEE1_k5(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_k6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k6; if (!buffer.str().empty()) @@ -456,7 +460,8 @@ bool get_GovSteamIEEE1_k6(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_k7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k7; if (!buffer.str().empty()) @@ -470,7 +475,8 @@ bool get_GovSteamIEEE1_k7(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_k8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k8; if (!buffer.str().empty()) @@ -484,7 +490,8 @@ bool get_GovSteamIEEE1_k8(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -498,7 +505,8 @@ bool get_GovSteamIEEE1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream bool get_GovSteamIEEE1_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -512,7 +520,8 @@ bool get_GovSteamIEEE1_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovSteamIEEE1_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -526,7 +535,8 @@ bool get_GovSteamIEEE1_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovSteamIEEE1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -540,7 +550,8 @@ bool get_GovSteamIEEE1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -554,7 +565,8 @@ bool get_GovSteamIEEE1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -568,7 +580,8 @@ bool get_GovSteamIEEE1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -582,7 +595,8 @@ bool get_GovSteamIEEE1_t4(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -596,7 +610,8 @@ bool get_GovSteamIEEE1_t5(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -610,7 +625,8 @@ bool get_GovSteamIEEE1_t6(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t7; if (!buffer.str().empty()) @@ -624,7 +640,8 @@ bool get_GovSteamIEEE1_t7(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uc; if (!buffer.str().empty()) @@ -638,7 +655,8 @@ bool get_GovSteamIEEE1_uc(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uo; if (!buffer.str().empty()) @@ -650,8 +668,6 @@ bool get_GovSteamIEEE1_uo(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char GovSteamIEEE1::debugName[] = "GovSteamIEEE1"; const char* GovSteamIEEE1::debugString() const { @@ -660,32 +676,32 @@ const char* GovSteamIEEE1::debugString() const void GovSteamIEEE1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1"), &GovSteamIEEE1_factory)); + factory_map.emplace("cim:GovSteamIEEE1", &GovSteamIEEE1_factory); } void GovSteamIEEE1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.k"), &assign_GovSteamIEEE1_k)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.k1"), &assign_GovSteamIEEE1_k1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.k2"), &assign_GovSteamIEEE1_k2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.k3"), &assign_GovSteamIEEE1_k3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.k4"), &assign_GovSteamIEEE1_k4)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.k5"), &assign_GovSteamIEEE1_k5)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.k6"), &assign_GovSteamIEEE1_k6)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.k7"), &assign_GovSteamIEEE1_k7)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.k8"), &assign_GovSteamIEEE1_k8)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.mwbase"), &assign_GovSteamIEEE1_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.pmax"), &assign_GovSteamIEEE1_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.pmin"), &assign_GovSteamIEEE1_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.t1"), &assign_GovSteamIEEE1_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.t2"), &assign_GovSteamIEEE1_t2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.t3"), &assign_GovSteamIEEE1_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.t4"), &assign_GovSteamIEEE1_t4)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.t5"), &assign_GovSteamIEEE1_t5)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.t6"), &assign_GovSteamIEEE1_t6)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.t7"), &assign_GovSteamIEEE1_t7)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.uc"), &assign_GovSteamIEEE1_uc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.uo"), &assign_GovSteamIEEE1_uo)); + assign_map.emplace("cim:GovSteamIEEE1.k", &assign_GovSteamIEEE1_k); + assign_map.emplace("cim:GovSteamIEEE1.k1", &assign_GovSteamIEEE1_k1); + assign_map.emplace("cim:GovSteamIEEE1.k2", &assign_GovSteamIEEE1_k2); + assign_map.emplace("cim:GovSteamIEEE1.k3", &assign_GovSteamIEEE1_k3); + assign_map.emplace("cim:GovSteamIEEE1.k4", &assign_GovSteamIEEE1_k4); + assign_map.emplace("cim:GovSteamIEEE1.k5", &assign_GovSteamIEEE1_k5); + assign_map.emplace("cim:GovSteamIEEE1.k6", &assign_GovSteamIEEE1_k6); + assign_map.emplace("cim:GovSteamIEEE1.k7", &assign_GovSteamIEEE1_k7); + assign_map.emplace("cim:GovSteamIEEE1.k8", &assign_GovSteamIEEE1_k8); + assign_map.emplace("cim:GovSteamIEEE1.mwbase", &assign_GovSteamIEEE1_mwbase); + assign_map.emplace("cim:GovSteamIEEE1.pmax", &assign_GovSteamIEEE1_pmax); + assign_map.emplace("cim:GovSteamIEEE1.pmin", &assign_GovSteamIEEE1_pmin); + assign_map.emplace("cim:GovSteamIEEE1.t1", &assign_GovSteamIEEE1_t1); + assign_map.emplace("cim:GovSteamIEEE1.t2", &assign_GovSteamIEEE1_t2); + assign_map.emplace("cim:GovSteamIEEE1.t3", &assign_GovSteamIEEE1_t3); + assign_map.emplace("cim:GovSteamIEEE1.t4", &assign_GovSteamIEEE1_t4); + assign_map.emplace("cim:GovSteamIEEE1.t5", &assign_GovSteamIEEE1_t5); + assign_map.emplace("cim:GovSteamIEEE1.t6", &assign_GovSteamIEEE1_t6); + assign_map.emplace("cim:GovSteamIEEE1.t7", &assign_GovSteamIEEE1_t7); + assign_map.emplace("cim:GovSteamIEEE1.uc", &assign_GovSteamIEEE1_uc); + assign_map.emplace("cim:GovSteamIEEE1.uo", &assign_GovSteamIEEE1_uo); } void GovSteamIEEE1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/GovSteamIEEE1.hpp b/CGMES_2.4.15_27JAN2020/GovSteamIEEE1.hpp index 83051bda8..23784774a 100644 --- a/CGMES_2.4.15_27JAN2020/GovSteamIEEE1.hpp +++ b/CGMES_2.4.15_27JAN2020/GovSteamIEEE1.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE steam turbine governor model. Ref - */ + /** \brief IEEE steam turbine governor model. Ref */ class GovSteamIEEE1 : public TurbineGovernorDynamics { public: @@ -30,27 +28,68 @@ namespace CIMPP GovSteamIEEE1(); ~GovSteamIEEE1() override; - CIMPP::PU k; /* Governor gain (reciprocal of droop) (K) (> 0). Typical Value = 25. Default: nullptr */ - CIMPP::Simple_Float k1; /* Fraction of HP shaft power after first boiler pass (K1). Typical Value = 0.2. Default: nullptr */ - CIMPP::Simple_Float k2; /* Fraction of LP shaft power after first boiler pass (K2). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float k3; /* Fraction of HP shaft power after second boiler pass (K3). Typical Value = 0.3. Default: nullptr */ - CIMPP::Simple_Float k4; /* Fraction of LP shaft power after second boiler pass (K4). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float k5; /* Fraction of HP shaft power after third boiler pass (K5). Typical Value = 0.5. Default: nullptr */ - CIMPP::Simple_Float k6; /* Fraction of LP shaft power after third boiler pass (K6). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float k7; /* Fraction of HP shaft power after fourth boiler pass (K7). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float k8; /* Fraction of LP shaft power after fourth boiler pass (K8). Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (> 0) Default: nullptr */ - CIMPP::PU pmax; /* Maximum valve opening (Pmax) (> Pmin). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum valve opening (Pmin) (>= 0). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t1; /* Governor lag time constant (T1). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t2; /* Governor lead time constant (T2). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t3; /* Valve positioner time constant (T3) (> 0). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t4; /* Inlet piping/steam bowl time constant (T4). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds t5; /* Time constant of second boiler pass (T5). Typical Value = 5. Default: nullptr */ - CIMPP::Seconds t6; /* Time constant of third boiler pass (T6). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds t7; /* Time constant of fourth boiler pass (T7). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float uc; /* Maximum valve closing velocity (Uc) (< 0). Unit = PU/sec. Typical Value = -10. Default: nullptr */ - CIMPP::Simple_Float uo; /* Maximum valve opening velocity (Uo) (> 0). Unit = PU/sec. Typical Value = 1. Default: nullptr */ + /** \brief Governor gain (reciprocal of droop) (K) (> 0). Typical Value = 25. Default: nullptr */ + CIMPP::PU k; + + /** \brief Fraction of HP shaft power after first boiler pass (K1). Typical Value = 0.2. Default: nullptr */ + CIMPP::Simple_Float k1; + + /** \brief Fraction of LP shaft power after first boiler pass (K2). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float k2; + + /** \brief Fraction of HP shaft power after second boiler pass (K3). Typical Value = 0.3. Default: nullptr */ + CIMPP::Simple_Float k3; + + /** \brief Fraction of LP shaft power after second boiler pass (K4). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float k4; + + /** \brief Fraction of HP shaft power after third boiler pass (K5). Typical Value = 0.5. Default: nullptr */ + CIMPP::Simple_Float k5; + + /** \brief Fraction of LP shaft power after third boiler pass (K6). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float k6; + + /** \brief Fraction of HP shaft power after fourth boiler pass (K7). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float k7; + + /** \brief Fraction of LP shaft power after fourth boiler pass (K8). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float k8; + + /** \brief Base for power values (MWbase) (> 0) Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Maximum valve opening (Pmax) (> Pmin). Typical Value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum valve opening (Pmin) (>= 0). Typical Value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Governor lag time constant (T1). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Governor lead time constant (T2). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Valve positioner time constant (T3) (> 0). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Inlet piping/steam bowl time constant (T4). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant of second boiler pass (T5). Typical Value = 5. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Time constant of third boiler pass (T6). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time constant of fourth boiler pass (T7). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t7; + + /** \brief Maximum valve closing velocity (Uc) (< 0). Unit = PU/sec. Typical Value = -10. Default: nullptr */ + CIMPP::Simple_Float uc; + + /** \brief Maximum valve opening velocity (Uo) (> 0). Unit = PU/sec. Typical Value = 1. Default: nullptr */ + CIMPP::Simple_Float uo; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GovSteamSGO.cpp b/CGMES_2.4.15_27JAN2020/GovSteamSGO.cpp index dbe420a31..8b1ecdec7 100644 --- a/CGMES_2.4.15_27JAN2020/GovSteamSGO.cpp +++ b/CGMES_2.4.15_27JAN2020/GovSteamSGO.cpp @@ -8,23 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -GovSteamSGO::GovSteamSGO() {}; -GovSteamSGO::~GovSteamSGO() {}; +GovSteamSGO::GovSteamSGO() {} +GovSteamSGO::~GovSteamSGO() {} static const std::list PossibleProfilesForClass = { @@ -62,168 +50,178 @@ GovSteamSGO::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteamSGO_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteamSGO_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -237,7 +235,8 @@ bool get_GovSteamSGO_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamSGO_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -251,7 +250,8 @@ bool get_GovSteamSGO_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamSGO_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -265,7 +265,8 @@ bool get_GovSteamSGO_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamSGO_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -279,7 +280,8 @@ bool get_GovSteamSGO_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovSteamSGO_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -293,7 +295,8 @@ bool get_GovSteamSGO_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamSGO_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -307,7 +310,8 @@ bool get_GovSteamSGO_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamSGO_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -321,7 +325,8 @@ bool get_GovSteamSGO_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamSGO_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -335,7 +340,8 @@ bool get_GovSteamSGO_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamSGO_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -349,7 +355,8 @@ bool get_GovSteamSGO_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamSGO_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -363,7 +370,8 @@ bool get_GovSteamSGO_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamSGO_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -377,7 +385,8 @@ bool get_GovSteamSGO_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamSGO_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -389,8 +398,6 @@ bool get_GovSteamSGO_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char GovSteamSGO::debugName[] = "GovSteamSGO"; const char* GovSteamSGO::debugString() const { @@ -399,23 +406,23 @@ const char* GovSteamSGO::debugString() const void GovSteamSGO::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteamSGO"), &GovSteamSGO_factory)); + factory_map.emplace("cim:GovSteamSGO", &GovSteamSGO_factory); } void GovSteamSGO::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.k1"), &assign_GovSteamSGO_k1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.k2"), &assign_GovSteamSGO_k2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.k3"), &assign_GovSteamSGO_k3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.mwbase"), &assign_GovSteamSGO_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.pmax"), &assign_GovSteamSGO_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.pmin"), &assign_GovSteamSGO_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.t1"), &assign_GovSteamSGO_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.t2"), &assign_GovSteamSGO_t2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.t3"), &assign_GovSteamSGO_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.t4"), &assign_GovSteamSGO_t4)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.t5"), &assign_GovSteamSGO_t5)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.t6"), &assign_GovSteamSGO_t6)); + assign_map.emplace("cim:GovSteamSGO.k1", &assign_GovSteamSGO_k1); + assign_map.emplace("cim:GovSteamSGO.k2", &assign_GovSteamSGO_k2); + assign_map.emplace("cim:GovSteamSGO.k3", &assign_GovSteamSGO_k3); + assign_map.emplace("cim:GovSteamSGO.mwbase", &assign_GovSteamSGO_mwbase); + assign_map.emplace("cim:GovSteamSGO.pmax", &assign_GovSteamSGO_pmax); + assign_map.emplace("cim:GovSteamSGO.pmin", &assign_GovSteamSGO_pmin); + assign_map.emplace("cim:GovSteamSGO.t1", &assign_GovSteamSGO_t1); + assign_map.emplace("cim:GovSteamSGO.t2", &assign_GovSteamSGO_t2); + assign_map.emplace("cim:GovSteamSGO.t3", &assign_GovSteamSGO_t3); + assign_map.emplace("cim:GovSteamSGO.t4", &assign_GovSteamSGO_t4); + assign_map.emplace("cim:GovSteamSGO.t5", &assign_GovSteamSGO_t5); + assign_map.emplace("cim:GovSteamSGO.t6", &assign_GovSteamSGO_t6); } void GovSteamSGO::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/GovSteamSGO.hpp b/CGMES_2.4.15_27JAN2020/GovSteamSGO.hpp index 1f9d6d587..337ba6a63 100644 --- a/CGMES_2.4.15_27JAN2020/GovSteamSGO.hpp +++ b/CGMES_2.4.15_27JAN2020/GovSteamSGO.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Simplified Steam turbine governor model. - */ + /** \brief Simplified Steam turbine governor model. */ class GovSteamSGO : public TurbineGovernorDynamics { public: @@ -29,18 +27,41 @@ namespace CIMPP GovSteamSGO(); ~GovSteamSGO() override; - CIMPP::PU k1; /* One/per unit regulation (K1). Default: nullptr */ - CIMPP::PU k2; /* Fraction (K2). Default: nullptr */ - CIMPP::PU k3; /* Fraction (K3). Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::PU pmax; /* Upper power limit (Pmax). Default: nullptr */ - CIMPP::Seconds pmin; /* Lower power limit (Pmin). Default: nullptr */ - CIMPP::Seconds t1; /* Controller lag (T1). Default: nullptr */ - CIMPP::Seconds t2; /* Controller lead compensation (T2). Default: nullptr */ - CIMPP::Seconds t3; /* Governor lag (T3) (>0). Default: nullptr */ - CIMPP::Seconds t4; /* Delay due to steam inlet volumes associated with steam chest and inlet piping (T4). Default: nullptr */ - CIMPP::Seconds t5; /* Reheater delay including hot and cold leads (T5). Default: nullptr */ - CIMPP::Seconds t6; /* Delay due to IP-LP turbine, crossover pipes and LP end hoods (T6). Default: nullptr */ + /** \brief One/per unit regulation (K1). Default: nullptr */ + CIMPP::PU k1; + + /** \brief Fraction (K2). Default: nullptr */ + CIMPP::PU k2; + + /** \brief Fraction (K3). Default: nullptr */ + CIMPP::PU k3; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Upper power limit (Pmax). Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Lower power limit (Pmin). Default: nullptr */ + CIMPP::Seconds pmin; + + /** \brief Controller lag (T1). Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Controller lead compensation (T2). Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Governor lag (T3) (>0). Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Delay due to steam inlet volumes associated with steam chest and inlet piping (T4). Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Reheater delay including hot and cold leads (T5). Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Delay due to IP-LP turbine, crossover pipes and LP end hoods (T6). Default: nullptr */ + CIMPP::Seconds t6; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GrossToNetActivePowerCurve.cpp b/CGMES_2.4.15_27JAN2020/GrossToNetActivePowerCurve.cpp index 2e70aaac8..8e293b959 100644 --- a/CGMES_2.4.15_27JAN2020/GrossToNetActivePowerCurve.cpp +++ b/CGMES_2.4.15_27JAN2020/GrossToNetActivePowerCurve.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -GrossToNetActivePowerCurve::GrossToNetActivePowerCurve() : GeneratingUnit(nullptr) {}; -GrossToNetActivePowerCurve::~GrossToNetActivePowerCurve() {}; +GrossToNetActivePowerCurve::GrossToNetActivePowerCurve() : GeneratingUnit(nullptr) {} +GrossToNetActivePowerCurve::~GrossToNetActivePowerCurve() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ GrossToNetActivePowerCurve::getPossibleProfilesForAttributes() const return map; } - - bool assign_GeneratingUnit_GrossToNetActivePowerCurves(BaseClass*, BaseClass*); bool assign_GrossToNetActivePowerCurve_GeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_GrossToNetActivePowerCurve_GeneratingUnit(BaseClass* BaseClass_ptr1, return false; } - bool get_GrossToNetActivePowerCurve_GeneratingUnit(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const GrossToNetActivePowerCurve* element = dynamic_cast(BaseClass_ptr1)) + const GrossToNetActivePowerCurve* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->GeneratingUnit != 0) { @@ -73,7 +71,6 @@ bool get_GrossToNetActivePowerCurve_GeneratingUnit(const BaseClass* BaseClass_pt return false; } - const char GrossToNetActivePowerCurve::debugName[] = "GrossToNetActivePowerCurve"; const char* GrossToNetActivePowerCurve::debugString() const { @@ -82,7 +79,7 @@ const char* GrossToNetActivePowerCurve::debugString() const void GrossToNetActivePowerCurve::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GrossToNetActivePowerCurve"), &GrossToNetActivePowerCurve_factory)); + factory_map.emplace("cim:GrossToNetActivePowerCurve", &GrossToNetActivePowerCurve_factory); } void GrossToNetActivePowerCurve::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void GrossToNetActivePowerCurve::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GrossToNetActivePowerCurve.GeneratingUnit"), &assign_GrossToNetActivePowerCurve_GeneratingUnit)); + assign_map.emplace("cim:GrossToNetActivePowerCurve.GeneratingUnit", &assign_GrossToNetActivePowerCurve_GeneratingUnit); } void GrossToNetActivePowerCurve::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/GrossToNetActivePowerCurve.hpp b/CGMES_2.4.15_27JAN2020/GrossToNetActivePowerCurve.hpp index d3a65bedc..eb1b8ea60 100644 --- a/CGMES_2.4.15_27JAN2020/GrossToNetActivePowerCurve.hpp +++ b/CGMES_2.4.15_27JAN2020/GrossToNetActivePowerCurve.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class GeneratingUnit; - /* - Relationship between the generating unit's gross active power output on the X-axis (measured at the terminals of the machine(s)) and the generating unit's net active power output on the Y-axis (based on utility-defined measurements at the power station). Station service loads, when modeled, should be treated as non-conforming bus loads. There may be more than one curve, depending on the auxiliary equipment that is in service. - */ + /** \brief Relationship between the generating unit's gross active power output on the X-axis (measured at the terminals of the machine(s)) and the generating unit's net active power output on the Y-axis (based on utility-defined measurements at the power station). Station service loads, when modeled, should be treated as non-conforming bus loads. There may be more than one curve, depending on the auxiliary equipment that is in service. */ class GrossToNetActivePowerCurve : public Curve { public: @@ -27,7 +25,8 @@ namespace CIMPP GrossToNetActivePowerCurve(); ~GrossToNetActivePowerCurve() override; - CIMPP::GeneratingUnit* GeneratingUnit; /* A generating unit may have a gross active power to net active power curve, describing the losses and auxiliary power requirements of the unit. Default: 0 */ + /** \brief A generating unit may have a gross active power to net active power curve, describing the losses and auxiliary power requirements of the unit. Default: 0 */ + CIMPP::GeneratingUnit* GeneratingUnit; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Ground.cpp b/CGMES_2.4.15_27JAN2020/Ground.cpp index fa0b071bc..e2e2a0868 100644 --- a/CGMES_2.4.15_27JAN2020/Ground.cpp +++ b/CGMES_2.4.15_27JAN2020/Ground.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Ground::Ground() {}; -Ground::~Ground() {}; +Ground::Ground() {} +Ground::~Ground() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ Ground::getPossibleProfilesForAttributes() const return map; } - - - - - const char Ground::debugName[] = "Ground"; const char* Ground::debugString() const { @@ -51,7 +46,7 @@ const char* Ground::debugString() const void Ground::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Ground"), &Ground_factory)); + factory_map.emplace("cim:Ground", &Ground_factory); } void Ground::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/Ground.hpp b/CGMES_2.4.15_27JAN2020/Ground.hpp index 8ff5cf74f..56bd33323 100644 --- a/CGMES_2.4.15_27JAN2020/Ground.hpp +++ b/CGMES_2.4.15_27JAN2020/Ground.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A point where the system is grounded used for connecting conducting equipment to ground. The power system model can have any number of grounds. - */ + /** \brief A point where the system is grounded used for connecting conducting equipment to ground. The power system model can have any number of grounds. */ class Ground : public ConductingEquipment { public: @@ -26,7 +24,6 @@ namespace CIMPP Ground(); ~Ground() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GroundDisconnector.cpp b/CGMES_2.4.15_27JAN2020/GroundDisconnector.cpp index ebe1006e0..1926b56f9 100644 --- a/CGMES_2.4.15_27JAN2020/GroundDisconnector.cpp +++ b/CGMES_2.4.15_27JAN2020/GroundDisconnector.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -GroundDisconnector::GroundDisconnector() {}; -GroundDisconnector::~GroundDisconnector() {}; +GroundDisconnector::GroundDisconnector() {} +GroundDisconnector::~GroundDisconnector() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ GroundDisconnector::getPossibleProfilesForAttributes() const return map; } - - - - - const char GroundDisconnector::debugName[] = "GroundDisconnector"; const char* GroundDisconnector::debugString() const { @@ -52,7 +47,7 @@ const char* GroundDisconnector::debugString() const void GroundDisconnector::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GroundDisconnector"), &GroundDisconnector_factory)); + factory_map.emplace("cim:GroundDisconnector", &GroundDisconnector_factory); } void GroundDisconnector::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/GroundDisconnector.hpp b/CGMES_2.4.15_27JAN2020/GroundDisconnector.hpp index 0e06b381a..ccf2b2c27 100644 --- a/CGMES_2.4.15_27JAN2020/GroundDisconnector.hpp +++ b/CGMES_2.4.15_27JAN2020/GroundDisconnector.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A manually operated or motor operated mechanical switching device used for isolating a circuit or equipment from ground. - */ + /** \brief A manually operated or motor operated mechanical switching device used for isolating a circuit or equipment from ground. */ class GroundDisconnector : public Switch { public: @@ -26,7 +24,6 @@ namespace CIMPP GroundDisconnector(); ~GroundDisconnector() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/GroundingImpedance.cpp b/CGMES_2.4.15_27JAN2020/GroundingImpedance.cpp index 346a40027..db7a16992 100644 --- a/CGMES_2.4.15_27JAN2020/GroundingImpedance.cpp +++ b/CGMES_2.4.15_27JAN2020/GroundingImpedance.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Reactance.hpp" using namespace CIMPP; -GroundingImpedance::GroundingImpedance() {}; -GroundingImpedance::~GroundingImpedance() {}; +GroundingImpedance::GroundingImpedance() {} +GroundingImpedance::~GroundingImpedance() {} static const std::list PossibleProfilesForClass = { @@ -40,25 +39,24 @@ GroundingImpedance::getPossibleProfilesForAttributes() const return map; } - -bool assign_GroundingImpedance_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GroundingImpedance_x(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GroundingImpedance* element = dynamic_cast(BaseClass_ptr1)) + GroundingImpedance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GroundingImpedance_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GroundingImpedance* element = dynamic_cast(BaseClass_ptr1)) + const GroundingImpedance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x; if (!buffer.str().empty()) @@ -70,8 +68,6 @@ bool get_GroundingImpedance_x(const BaseClass* BaseClass_ptr1, std::stringstream return false; } - - const char GroundingImpedance::debugName[] = "GroundingImpedance"; const char* GroundingImpedance::debugString() const { @@ -80,12 +76,12 @@ const char* GroundingImpedance::debugString() const void GroundingImpedance::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GroundingImpedance"), &GroundingImpedance_factory)); + factory_map.emplace("cim:GroundingImpedance", &GroundingImpedance_factory); } void GroundingImpedance::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GroundingImpedance.x"), &assign_GroundingImpedance_x)); + assign_map.emplace("cim:GroundingImpedance.x", &assign_GroundingImpedance_x); } void GroundingImpedance::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/GroundingImpedance.hpp b/CGMES_2.4.15_27JAN2020/GroundingImpedance.hpp index f821443f8..ad05b5aaa 100644 --- a/CGMES_2.4.15_27JAN2020/GroundingImpedance.hpp +++ b/CGMES_2.4.15_27JAN2020/GroundingImpedance.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A fixed impedance device used for grounding. - */ + /** \brief A fixed impedance device used for grounding. */ class GroundingImpedance : public EarthFaultCompensator { public: @@ -27,7 +25,8 @@ namespace CIMPP GroundingImpedance(); ~GroundingImpedance() override; - CIMPP::Reactance x; /* Reactance of device. Default: nullptr */ + /** \brief Reactance of device. Default: nullptr */ + CIMPP::Reactance x; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/HydroEnergyConversionKind.cpp b/CGMES_2.4.15_27JAN2020/HydroEnergyConversionKind.cpp index 1bc81701f..aeddc62cb 100644 --- a/CGMES_2.4.15_27JAN2020/HydroEnergyConversionKind.cpp +++ b/CGMES_2.4.15_27JAN2020/HydroEnergyConversionKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "HydroEnergyConversionKind") + if (EnumSymbol.substr(0, pos) != "HydroEnergyConversionKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,12 +50,12 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "generator") + if (EnumSymbol == "generator") { rop = HydroEnergyConversionKind::generator; return lop; } - if(EnumSymbol == "pumpAndGenerator") + if (EnumSymbol == "pumpAndGenerator") { rop = HydroEnergyConversionKind::pumpAndGenerator; return lop; diff --git a/CGMES_2.4.15_27JAN2020/HydroEnergyConversionKind.hpp b/CGMES_2.4.15_27JAN2020/HydroEnergyConversionKind.hpp index fb666b097..968163466 100644 --- a/CGMES_2.4.15_27JAN2020/HydroEnergyConversionKind.hpp +++ b/CGMES_2.4.15_27JAN2020/HydroEnergyConversionKind.hpp @@ -9,21 +9,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Specifies the capability of the hydro generating unit to convert energy as a generator or pump. - */ + /** \brief Specifies the capability of the hydro generating unit to convert energy as a generator or pump. */ class HydroEnergyConversionKind { public: enum HydroEnergyConversionKind_ENUM { - /** - * Able to generate power, but not able to pump water for energy storage. - */ + /** Able to generate power, but not able to pump water for energy storage. */ generator, - /** - * Able to both generate power and pump water for energy storage. - */ + /** Able to both generate power and pump water for energy storage. */ pumpAndGenerator, }; diff --git a/CGMES_2.4.15_27JAN2020/HydroGeneratingUnit.cpp b/CGMES_2.4.15_27JAN2020/HydroGeneratingUnit.cpp index 5a146ad59..13c3f4210 100644 --- a/CGMES_2.4.15_27JAN2020/HydroGeneratingUnit.cpp +++ b/CGMES_2.4.15_27JAN2020/HydroGeneratingUnit.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "HydroPowerPlant.hpp" -#include "HydroEnergyConversionKind.hpp" using namespace CIMPP; -HydroGeneratingUnit::HydroGeneratingUnit() : HydroPowerPlant(nullptr) {}; -HydroGeneratingUnit::~HydroGeneratingUnit() {}; +HydroGeneratingUnit::HydroGeneratingUnit() : HydroPowerPlant(nullptr) {} +HydroGeneratingUnit::~HydroGeneratingUnit() {} static const std::list PossibleProfilesForClass = { @@ -43,21 +42,6 @@ HydroGeneratingUnit::getPossibleProfilesForAttributes() const return map; } - -bool assign_HydroGeneratingUnit_energyConversionCapability(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->energyConversionCapability; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_HydroPowerPlant_HydroGeneratingUnits(BaseClass*, BaseClass*); bool assign_HydroGeneratingUnit_HydroPowerPlant(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -75,10 +59,24 @@ bool assign_HydroGeneratingUnit_HydroPowerPlant(BaseClass* BaseClass_ptr1, BaseC return false; } +bool assign_HydroGeneratingUnit_energyConversionCapability(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->energyConversionCapability; + if (!buffer.fail()) + { + return true; + } + } + return false; +} bool get_HydroGeneratingUnit_HydroPowerPlant(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->HydroPowerPlant != 0) { @@ -89,10 +87,10 @@ bool get_HydroGeneratingUnit_HydroPowerPlant(const BaseClass* BaseClass_ptr1, st return false; } - bool get_HydroGeneratingUnit_energyConversionCapability(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->energyConversionCapability; if (!buffer.str().empty()) @@ -112,17 +110,17 @@ const char* HydroGeneratingUnit::debugString() const void HydroGeneratingUnit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:HydroGeneratingUnit"), &HydroGeneratingUnit_factory)); + factory_map.emplace("cim:HydroGeneratingUnit", &HydroGeneratingUnit_factory); } void HydroGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:HydroGeneratingUnit.energyConversionCapability"), &assign_HydroGeneratingUnit_energyConversionCapability)); + assign_map.emplace("cim:HydroGeneratingUnit.energyConversionCapability", &assign_HydroGeneratingUnit_energyConversionCapability); } void HydroGeneratingUnit::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:HydroGeneratingUnit.HydroPowerPlant"), &assign_HydroGeneratingUnit_HydroPowerPlant)); + assign_map.emplace("cim:HydroGeneratingUnit.HydroPowerPlant", &assign_HydroGeneratingUnit_HydroPowerPlant); } void HydroGeneratingUnit::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/HydroGeneratingUnit.hpp b/CGMES_2.4.15_27JAN2020/HydroGeneratingUnit.hpp index 39eda04a4..74455c5e9 100644 --- a/CGMES_2.4.15_27JAN2020/HydroGeneratingUnit.hpp +++ b/CGMES_2.4.15_27JAN2020/HydroGeneratingUnit.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class HydroPowerPlant; - /* - A generating unit whose prime mover is a hydraulic turbine (e.g., Francis, Pelton, Kaplan). - */ + /** \brief A generating unit whose prime mover is a hydraulic turbine (e.g., Francis, Pelton, Kaplan). */ class HydroGeneratingUnit : public GeneratingUnit { public: @@ -28,8 +26,11 @@ namespace CIMPP HydroGeneratingUnit(); ~HydroGeneratingUnit() override; - CIMPP::HydroPowerPlant* HydroPowerPlant; /* The hydro generating unit belongs to a hydro power plant. Default: 0 */ - CIMPP::HydroEnergyConversionKind energyConversionCapability; /* Energy conversion capability for generating. Default: 0 */ + /** \brief The hydro generating unit belongs to a hydro power plant. Default: 0 */ + CIMPP::HydroPowerPlant* HydroPowerPlant; + + /** \brief Energy conversion capability for generating. Default: 0 */ + CIMPP::HydroEnergyConversionKind energyConversionCapability; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/HydroPlantStorageKind.cpp b/CGMES_2.4.15_27JAN2020/HydroPlantStorageKind.cpp index 4930efb66..61d7d942b 100644 --- a/CGMES_2.4.15_27JAN2020/HydroPlantStorageKind.cpp +++ b/CGMES_2.4.15_27JAN2020/HydroPlantStorageKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "HydroPlantStorageKind") + if (EnumSymbol.substr(0, pos) != "HydroPlantStorageKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "runOfRiver") + if (EnumSymbol == "runOfRiver") { rop = HydroPlantStorageKind::runOfRiver; return lop; } - if(EnumSymbol == "pumpedStorage") + if (EnumSymbol == "pumpedStorage") { rop = HydroPlantStorageKind::pumpedStorage; return lop; } - if(EnumSymbol == "storage") + if (EnumSymbol == "storage") { rop = HydroPlantStorageKind::storage; return lop; diff --git a/CGMES_2.4.15_27JAN2020/HydroPlantStorageKind.hpp b/CGMES_2.4.15_27JAN2020/HydroPlantStorageKind.hpp index ddd375110..c5894a490 100644 --- a/CGMES_2.4.15_27JAN2020/HydroPlantStorageKind.hpp +++ b/CGMES_2.4.15_27JAN2020/HydroPlantStorageKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The type of hydro power plant. - */ + /** \brief The type of hydro power plant. */ class HydroPlantStorageKind { public: enum HydroPlantStorageKind_ENUM { - /** - * Run of river. - */ + /** Run of river. */ runOfRiver, - /** - * Pumped storage. - */ + /** Pumped storage. */ pumpedStorage, - /** - * Storage. - */ + /** Storage. */ storage, }; diff --git a/CGMES_2.4.15_27JAN2020/HydroPowerPlant.cpp b/CGMES_2.4.15_27JAN2020/HydroPowerPlant.cpp index 9d0c8c562..ad177ac88 100644 --- a/CGMES_2.4.15_27JAN2020/HydroPowerPlant.cpp +++ b/CGMES_2.4.15_27JAN2020/HydroPowerPlant.cpp @@ -10,12 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "HydroGeneratingUnit.hpp" #include "HydroPump.hpp" -#include "HydroPlantStorageKind.hpp" using namespace CIMPP; -HydroPowerPlant::HydroPowerPlant() {}; -HydroPowerPlant::~HydroPowerPlant() {}; +HydroPowerPlant::HydroPowerPlant() {} +HydroPowerPlant::~HydroPowerPlant() {} static const std::list PossibleProfilesForClass = { @@ -44,21 +43,6 @@ HydroPowerPlant::getPossibleProfilesForAttributes() const return map; } - -bool assign_HydroPowerPlant_hydroPlantStorageType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (HydroPowerPlant* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->hydroPlantStorageType; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_HydroGeneratingUnit_HydroPowerPlant(BaseClass*, BaseClass*); bool assign_HydroPowerPlant_HydroGeneratingUnits(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -75,6 +59,7 @@ bool assign_HydroPowerPlant_HydroGeneratingUnits(BaseClass* BaseClass_ptr1, Base } return false; } + bool assign_HydroPump_HydroPowerPlant(BaseClass*, BaseClass*); bool assign_HydroPowerPlant_HydroPumps(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -92,11 +77,26 @@ bool assign_HydroPowerPlant_HydroPumps(BaseClass* BaseClass_ptr1, BaseClass* Bas return false; } +bool assign_HydroPowerPlant_hydroPlantStorageType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + HydroPowerPlant* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->hydroPlantStorageType; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + bool get_HydroPowerPlant_hydroPlantStorageType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const HydroPowerPlant* element = dynamic_cast(BaseClass_ptr1)) + const HydroPowerPlant* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hydroPlantStorageType; if (!buffer.str().empty()) @@ -116,18 +116,18 @@ const char* HydroPowerPlant::debugString() const void HydroPowerPlant::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:HydroPowerPlant"), &HydroPowerPlant_factory)); + factory_map.emplace("cim:HydroPowerPlant", &HydroPowerPlant_factory); } void HydroPowerPlant::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:HydroPowerPlant.hydroPlantStorageType"), &assign_HydroPowerPlant_hydroPlantStorageType)); + assign_map.emplace("cim:HydroPowerPlant.hydroPlantStorageType", &assign_HydroPowerPlant_hydroPlantStorageType); } void HydroPowerPlant::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:HydroPowerPlant.HydroGeneratingUnits"), &assign_HydroPowerPlant_HydroGeneratingUnits)); - assign_map.insert(std::make_pair(std::string("cim:HydroPowerPlant.HydroPumps"), &assign_HydroPowerPlant_HydroPumps)); + assign_map.emplace("cim:HydroPowerPlant.HydroGeneratingUnits", &assign_HydroPowerPlant_HydroGeneratingUnits); + assign_map.emplace("cim:HydroPowerPlant.HydroPumps", &assign_HydroPowerPlant_HydroPumps); } void HydroPowerPlant::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/HydroPowerPlant.hpp b/CGMES_2.4.15_27JAN2020/HydroPowerPlant.hpp index 71bb379b4..ab7712608 100644 --- a/CGMES_2.4.15_27JAN2020/HydroPowerPlant.hpp +++ b/CGMES_2.4.15_27JAN2020/HydroPowerPlant.hpp @@ -19,9 +19,7 @@ namespace CIMPP class HydroGeneratingUnit; class HydroPump; - /* - A hydro power station which can generate or pump. When generating, the generator turbines receive water from an upper reservoir. When pumping, the pumps receive their water from a lower reservoir. - */ + /** \brief A hydro power station which can generate or pump. When generating, the generator turbines receive water from an upper reservoir. When pumping, the pumps receive their water from a lower reservoir. */ class HydroPowerPlant : public PowerSystemResource { public: @@ -29,9 +27,14 @@ namespace CIMPP HydroPowerPlant(); ~HydroPowerPlant() override; - std::list HydroGeneratingUnits; /* The hydro generating unit belongs to a hydro power plant. Default: 0 */ - std::list HydroPumps; /* The hydro pump may be a member of a pumped storage plant or a pump for distributing water. Default: 0 */ - CIMPP::HydroPlantStorageKind hydroPlantStorageType; /* The type of hydro power plant water storage. Default: 0 */ + /** \brief The hydro generating unit belongs to a hydro power plant. Default: 0 */ + std::list HydroGeneratingUnits; + + /** \brief The hydro pump may be a member of a pumped storage plant or a pump for distributing water. Default: 0 */ + std::list HydroPumps; + + /** \brief The type of hydro power plant water storage. Default: 0 */ + CIMPP::HydroPlantStorageKind hydroPlantStorageType; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/HydroPump.cpp b/CGMES_2.4.15_27JAN2020/HydroPump.cpp index 698253b53..8d0613e79 100644 --- a/CGMES_2.4.15_27JAN2020/HydroPump.cpp +++ b/CGMES_2.4.15_27JAN2020/HydroPump.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -HydroPump::HydroPump() : HydroPowerPlant(nullptr), RotatingMachine(nullptr) {}; -HydroPump::~HydroPump() {}; +HydroPump::HydroPump() : HydroPowerPlant(nullptr), RotatingMachine(nullptr) {} +HydroPump::~HydroPump() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ HydroPump::getPossibleProfilesForAttributes() const return map; } - - bool assign_HydroPowerPlant_HydroPumps(BaseClass*, BaseClass*); bool assign_HydroPump_HydroPowerPlant(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_HydroPump_HydroPowerPlant(BaseClass* BaseClass_ptr1, BaseClass* Base } return false; } + bool assign_RotatingMachine_HydroPump(BaseClass*, BaseClass*); bool assign_HydroPump_RotatingMachine(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_HydroPump_RotatingMachine(BaseClass* BaseClass_ptr1, BaseClass* Base return false; } - bool get_HydroPump_HydroPowerPlant(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const HydroPump* element = dynamic_cast(BaseClass_ptr1)) + const HydroPump* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->HydroPowerPlant != 0) { @@ -93,7 +92,8 @@ bool get_HydroPump_HydroPowerPlant(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const HydroPump* element = dynamic_cast(BaseClass_ptr1)) + const HydroPump* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->RotatingMachine != 0) { @@ -104,7 +104,6 @@ bool get_HydroPump_RotatingMachine(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:HydroPump"), &HydroPump_factory)); + factory_map.emplace("cim:HydroPump", &HydroPump_factory); } void HydroPump::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void HydroPump::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:HydroPump.HydroPowerPlant"), &assign_HydroPump_HydroPowerPlant)); - assign_map.insert(std::make_pair(std::string("cim:HydroPump.RotatingMachine"), &assign_HydroPump_RotatingMachine)); + assign_map.emplace("cim:HydroPump.HydroPowerPlant", &assign_HydroPump_HydroPowerPlant); + assign_map.emplace("cim:HydroPump.RotatingMachine", &assign_HydroPump_RotatingMachine); } void HydroPump::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/HydroPump.hpp b/CGMES_2.4.15_27JAN2020/HydroPump.hpp index d744a3728..9830eee7a 100644 --- a/CGMES_2.4.15_27JAN2020/HydroPump.hpp +++ b/CGMES_2.4.15_27JAN2020/HydroPump.hpp @@ -18,9 +18,7 @@ namespace CIMPP class HydroPowerPlant; class RotatingMachine; - /* - A synchronous motor-driven pump, typically associated with a pumped storage plant. - */ + /** \brief A synchronous motor-driven pump, typically associated with a pumped storage plant. */ class HydroPump : public Equipment { public: @@ -28,8 +26,11 @@ namespace CIMPP HydroPump(); ~HydroPump() override; - CIMPP::HydroPowerPlant* HydroPowerPlant; /* The hydro pump may be a member of a pumped storage plant or a pump for distributing water. Default: 0 */ - CIMPP::RotatingMachine* RotatingMachine; /* The synchronous machine drives the turbine which moves the water from a low elevation to a higher elevation. The direction of machine rotation for pumping may or may not be the same as for generating. Default: 0 */ + /** \brief The hydro pump may be a member of a pumped storage plant or a pump for distributing water. Default: 0 */ + CIMPP::HydroPowerPlant* HydroPowerPlant; + + /** \brief The synchronous machine drives the turbine which moves the water from a low elevation to a higher elevation. The direction of machine rotation for pumping may or may not be the same as for generating. Default: 0 */ + CIMPP::RotatingMachine* RotatingMachine; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/IEC61970.hpp b/CGMES_2.4.15_27JAN2020/IEC61970.hpp index 32e9abca4..b7bd2b2c1 100644 --- a/CGMES_2.4.15_27JAN2020/IEC61970.hpp +++ b/CGMES_2.4.15_27JAN2020/IEC61970.hpp @@ -401,4 +401,5 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindType1or2UserDefined.hpp" #include "WindType3or4UserDefined.hpp" #include "UnknownType.hpp" -#endif \ No newline at end of file + +#endif diff --git a/CGMES_2.4.15_27JAN2020/IdentifiedObject.cpp b/CGMES_2.4.15_27JAN2020/IdentifiedObject.cpp index f9ebb00b4..b32ec2f29 100644 --- a/CGMES_2.4.15_27JAN2020/IdentifiedObject.cpp +++ b/CGMES_2.4.15_27JAN2020/IdentifiedObject.cpp @@ -9,16 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "DiagramObject.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -IdentifiedObject::IdentifiedObject() {}; -IdentifiedObject::~IdentifiedObject() {}; +IdentifiedObject::IdentifiedObject() {} +IdentifiedObject::~IdentifiedObject() {} static const std::list PossibleProfilesForClass = { @@ -58,93 +53,98 @@ IdentifiedObject::getPossibleProfilesForAttributes() const return map; } - -bool assign_IdentifiedObject_description(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramObject_IdentifiedObject(BaseClass*, BaseClass*); +bool assign_IdentifiedObject_DiagramObjects(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + DiagramObject* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - element->description = buffer.str(); - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->DiagramObjects.begin(), element->DiagramObjects.end(), element2) == element->DiagramObjects.end()) + { + element->DiagramObjects.push_back(element2); + return assign_DiagramObject_IdentifiedObject(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_IdentifiedObject_energyIdentCodeEic(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_IdentifiedObject_description(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - element->energyIdentCodeEic = buffer.str(); - if (buffer.fail()) - return false; - else + element->description = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_IdentifiedObject_mRID(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_IdentifiedObject_energyIdentCodeEic(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - element->mRID = buffer.str(); - if (buffer.fail()) - return false; - else + element->energyIdentCodeEic = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_IdentifiedObject_name(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_IdentifiedObject_mRID(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - element->name = buffer.str(); - if (buffer.fail()) - return false; - else + element->mRID = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_IdentifiedObject_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_IdentifiedObject_name(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - element->shortName = buffer.str(); - if (buffer.fail()) - return false; - else + element->name = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_DiagramObject_IdentifiedObject(BaseClass*, BaseClass*); -bool assign_IdentifiedObject_DiagramObjects(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_IdentifiedObject_shortName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); - DiagramObject* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->DiagramObjects.begin(), element->DiagramObjects.end(), element2) == element->DiagramObjects.end()) + element->shortName = buffer.str(); + if (!buffer.fail()) { - element->DiagramObjects.push_back(element2); - return assign_DiagramObject_IdentifiedObject(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_IdentifiedObject_description(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->description; if (!buffer.str().empty()) @@ -158,7 +158,8 @@ bool get_IdentifiedObject_description(const BaseClass* BaseClass_ptr1, std::stri bool get_IdentifiedObject_energyIdentCodeEic(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->energyIdentCodeEic; if (!buffer.str().empty()) @@ -172,7 +173,8 @@ bool get_IdentifiedObject_energyIdentCodeEic(const BaseClass* BaseClass_ptr1, st bool get_IdentifiedObject_mRID(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mRID; if (!buffer.str().empty()) @@ -186,7 +188,8 @@ bool get_IdentifiedObject_mRID(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_IdentifiedObject_name(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->name; if (!buffer.str().empty()) @@ -200,7 +203,8 @@ bool get_IdentifiedObject_name(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_IdentifiedObject_shortName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortName; if (!buffer.str().empty()) @@ -212,8 +216,6 @@ bool get_IdentifiedObject_shortName(const BaseClass* BaseClass_ptr1, std::string return false; } - - const char IdentifiedObject::debugName[] = "IdentifiedObject"; const char* IdentifiedObject::debugString() const { @@ -222,21 +224,21 @@ const char* IdentifiedObject::debugString() const void IdentifiedObject::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:IdentifiedObject"), &IdentifiedObject_factory)); + factory_map.emplace("cim:IdentifiedObject", &IdentifiedObject_factory); } void IdentifiedObject::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:IdentifiedObject.description"), &assign_IdentifiedObject_description)); - assign_map.insert(std::make_pair(std::string("cim:IdentifiedObject.energyIdentCodeEic"), &assign_IdentifiedObject_energyIdentCodeEic)); - assign_map.insert(std::make_pair(std::string("cim:IdentifiedObject.mRID"), &assign_IdentifiedObject_mRID)); - assign_map.insert(std::make_pair(std::string("cim:IdentifiedObject.name"), &assign_IdentifiedObject_name)); - assign_map.insert(std::make_pair(std::string("cim:IdentifiedObject.shortName"), &assign_IdentifiedObject_shortName)); + assign_map.emplace("cim:IdentifiedObject.description", &assign_IdentifiedObject_description); + assign_map.emplace("cim:IdentifiedObject.energyIdentCodeEic", &assign_IdentifiedObject_energyIdentCodeEic); + assign_map.emplace("cim:IdentifiedObject.mRID", &assign_IdentifiedObject_mRID); + assign_map.emplace("cim:IdentifiedObject.name", &assign_IdentifiedObject_name); + assign_map.emplace("cim:IdentifiedObject.shortName", &assign_IdentifiedObject_shortName); } void IdentifiedObject::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:IdentifiedObject.DiagramObjects"), &assign_IdentifiedObject_DiagramObjects)); + assign_map.emplace("cim:IdentifiedObject.DiagramObjects", &assign_IdentifiedObject_DiagramObjects); } void IdentifiedObject::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/IdentifiedObject.hpp b/CGMES_2.4.15_27JAN2020/IdentifiedObject.hpp index 0de7c9fa5..43941ab22 100644 --- a/CGMES_2.4.15_27JAN2020/IdentifiedObject.hpp +++ b/CGMES_2.4.15_27JAN2020/IdentifiedObject.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class DiagramObject; - /* - This is a root class to provide common identification for all classes needing identification and naming attributes. - */ + /** \brief This is a root class to provide common identification for all classes needing identification and naming attributes. */ class IdentifiedObject : public BaseClass { public: @@ -28,12 +26,23 @@ namespace CIMPP IdentifiedObject(); ~IdentifiedObject() override; - std::list DiagramObjects; /* The domain object to which this diagram object is associated. Default: 0 */ - CIMPP::String description; /* The description is a free human readable text describing or naming the object. It may be non unique and may not correlate to a naming hierarchy. Default: '' */ - CIMPP::String energyIdentCodeEic; /* The attribute is used for an exchange of the EIC code (Energy identification Code). The length of the string is 16 characters as defined by the EIC code. References: Default: '' */ - CIMPP::String mRID; /* Master resource identifier issued by a model authority. The mRID is globally unique within an exchange context. Global uniqueness is easily achieved by using a UUID, as specified in RFC 4122, for the mRID. The use of UUID is strongly recommended. For CIMXML data files in RDF syntax conforming to IEC 61970-552 Edition 1, the mRID is mapped to rdf:ID or rdf:about attributes that identify CIM object elements. Default: '' */ - CIMPP::String name; /* The name is any free human readable and possibly non unique text naming the object. Default: '' */ - CIMPP::String shortName; /* The attribute is used for an exchange of a human readable short name with length of the string 12 characters maximum. Default: '' */ + /** \brief The domain object to which this diagram object is associated. Default: 0 */ + std::list DiagramObjects; + + /** \brief The description is a free human readable text describing or naming the object. It may be non unique and may not correlate to a naming hierarchy. Default: '' */ + CIMPP::String description; + + /** \brief The attribute is used for an exchange of the EIC code (Energy identification Code). The length of the string is 16 characters as defined by the EIC code. References: Default: '' */ + CIMPP::String energyIdentCodeEic; + + /** \brief Master resource identifier issued by a model authority. The mRID is globally unique within an exchange context. Global uniqueness is easily achieved by using a UUID, as specified in RFC 4122, for the mRID. The use of UUID is strongly recommended. For CIMXML data files in RDF syntax conforming to IEC 61970-552 Edition 1, the mRID is mapped to rdf:ID or rdf:about attributes that identify CIM object elements. Default: '' */ + CIMPP::String mRID; + + /** \brief The name is any free human readable and possibly non unique text naming the object. Default: '' */ + CIMPP::String name; + + /** \brief The attribute is used for an exchange of a human readable short name with length of the string 12 characters maximum. Default: '' */ + CIMPP::String shortName; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/IfdBaseKind.cpp b/CGMES_2.4.15_27JAN2020/IfdBaseKind.cpp index 06c6513c2..d0777efc8 100644 --- a/CGMES_2.4.15_27JAN2020/IfdBaseKind.cpp +++ b/CGMES_2.4.15_27JAN2020/IfdBaseKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "IfdBaseKind") + if (EnumSymbol.substr(0, pos) != "IfdBaseKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,22 +50,22 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "ifag") + if (EnumSymbol == "ifag") { rop = IfdBaseKind::ifag; return lop; } - if(EnumSymbol == "ifnl") + if (EnumSymbol == "ifnl") { rop = IfdBaseKind::ifnl; return lop; } - if(EnumSymbol == "iffl") + if (EnumSymbol == "iffl") { rop = IfdBaseKind::iffl; return lop; } - if(EnumSymbol == "other") + if (EnumSymbol == "other") { rop = IfdBaseKind::other; return lop; diff --git a/CGMES_2.4.15_27JAN2020/IfdBaseKind.hpp b/CGMES_2.4.15_27JAN2020/IfdBaseKind.hpp index 6938195f3..29c9e79cb 100644 --- a/CGMES_2.4.15_27JAN2020/IfdBaseKind.hpp +++ b/CGMES_2.4.15_27JAN2020/IfdBaseKind.hpp @@ -9,29 +9,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Excitation base system mode. - */ + /** \brief Excitation base system mode. */ class IfdBaseKind { public: enum IfdBaseKind_ENUM { - /** - * Air gap line mode. ifdBaseValue is computed, not defined by the user, in this mode. - */ + /** Air gap line mode. ifdBaseValue is computed, not defined by the user, in this mode. */ ifag, - /** - * No load system with saturation mode. ifdBaseValue is computed, not defined by the user, in this mode. - */ + /** No load system with saturation mode. ifdBaseValue is computed, not defined by the user, in this mode. */ ifnl, - /** - * Full load system mode. ifdBaseValue is computed, not defined by the user, in this mode. - */ + /** Full load system mode. ifdBaseValue is computed, not defined by the user, in this mode. */ iffl, - /** - * Free mode. ifdBaseValue is defined by the user in this mode. - */ + /** Free mode. ifdBaseValue is defined by the user in this mode. */ other, }; diff --git a/CGMES_2.4.15_27JAN2020/Inductance.hpp b/CGMES_2.4.15_27JAN2020/Inductance.hpp index 9d5005915..f9b404e47 100644 --- a/CGMES_2.4.15_27JAN2020/Inductance.hpp +++ b/CGMES_2.4.15_27JAN2020/Inductance.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Inductive part of reactance (imaginary part of impedance), at rated frequency. - */ + /** \brief Inductive part of reactance (imaginary part of impedance), at rated frequency. */ class Inductance { public: diff --git a/CGMES_2.4.15_27JAN2020/InductancePerLength.hpp b/CGMES_2.4.15_27JAN2020/InductancePerLength.hpp index 8ede31f20..49ea2eb9c 100644 --- a/CGMES_2.4.15_27JAN2020/InductancePerLength.hpp +++ b/CGMES_2.4.15_27JAN2020/InductancePerLength.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Inductance per unit of length. - */ + /** \brief Inductance per unit of length. */ class InductancePerLength { public: diff --git a/CGMES_2.4.15_27JAN2020/InputSignalKind.cpp b/CGMES_2.4.15_27JAN2020/InputSignalKind.cpp index fc207f2f1..454514c57 100644 --- a/CGMES_2.4.15_27JAN2020/InputSignalKind.cpp +++ b/CGMES_2.4.15_27JAN2020/InputSignalKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "InputSignalKind") + if (EnumSymbol.substr(0, pos) != "InputSignalKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,52 +50,52 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "rotorSpeed") + if (EnumSymbol == "rotorSpeed") { rop = InputSignalKind::rotorSpeed; return lop; } - if(EnumSymbol == "rotorAngularFrequencyDeviation") + if (EnumSymbol == "rotorAngularFrequencyDeviation") { rop = InputSignalKind::rotorAngularFrequencyDeviation; return lop; } - if(EnumSymbol == "busFrequency") + if (EnumSymbol == "busFrequency") { rop = InputSignalKind::busFrequency; return lop; } - if(EnumSymbol == "busFrequencyDeviation") + if (EnumSymbol == "busFrequencyDeviation") { rop = InputSignalKind::busFrequencyDeviation; return lop; } - if(EnumSymbol == "generatorElectricalPower") + if (EnumSymbol == "generatorElectricalPower") { rop = InputSignalKind::generatorElectricalPower; return lop; } - if(EnumSymbol == "generatorAcceleratingPower") + if (EnumSymbol == "generatorAcceleratingPower") { rop = InputSignalKind::generatorAcceleratingPower; return lop; } - if(EnumSymbol == "busVoltage") + if (EnumSymbol == "busVoltage") { rop = InputSignalKind::busVoltage; return lop; } - if(EnumSymbol == "busVoltageDerivative") + if (EnumSymbol == "busVoltageDerivative") { rop = InputSignalKind::busVoltageDerivative; return lop; } - if(EnumSymbol == "branchCurrent") + if (EnumSymbol == "branchCurrent") { rop = InputSignalKind::branchCurrent; return lop; } - if(EnumSymbol == "fieldCurrent") + if (EnumSymbol == "fieldCurrent") { rop = InputSignalKind::fieldCurrent; return lop; diff --git a/CGMES_2.4.15_27JAN2020/InputSignalKind.hpp b/CGMES_2.4.15_27JAN2020/InputSignalKind.hpp index 98b85d1f8..bad391db9 100644 --- a/CGMES_2.4.15_27JAN2020/InputSignalKind.hpp +++ b/CGMES_2.4.15_27JAN2020/InputSignalKind.hpp @@ -9,53 +9,31 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Input signal type. In Dynamics modelling, commonly represented by j parameter. - */ + /** \brief Input signal type. In Dynamics modelling, commonly represented by j parameter. */ class InputSignalKind { public: enum InputSignalKind_ENUM { - /** - * Input signal is rotor or shaft speed (angular frequency). - */ + /** Input signal is rotor or shaft speed (angular frequency). */ rotorSpeed, - /** - * Input signal is rotor or shaft angular frequency deviation. - */ + /** Input signal is rotor or shaft angular frequency deviation. */ rotorAngularFrequencyDeviation, - /** - * Input signal is bus voltage fr - */ + /** Input signal is bus voltage fr */ busFrequency, - /** - * Input signal is deviation of bus voltage frequ - */ + /** Input signal is deviation of bus voltage frequ */ busFrequencyDeviation, - /** - * Input signal is generator electrical power on rated S. - */ + /** Input signal is generator electrical power on rated S. */ generatorElectricalPower, - /** - * Input signal is generating accelerating power. - */ + /** Input signal is generating accelerating power. */ generatorAcceleratingPower, - /** - * Input signal - */ + /** Input signal */ busVoltage, - /** - * Input signal is derivative of bus voltag - */ + /** Input signal is derivative of bus voltag */ busVoltageDerivative, - /** - * Input signal is amplitude of remote branch current. - */ + /** Input signal is amplitude of remote branch current. */ branchCurrent, - /** - * Input signal is generator field current. - */ + /** Input signal is generator field current. */ fieldCurrent, }; diff --git a/CGMES_2.4.15_27JAN2020/Junction.cpp b/CGMES_2.4.15_27JAN2020/Junction.cpp index 765819a3f..cd2b7c69d 100644 --- a/CGMES_2.4.15_27JAN2020/Junction.cpp +++ b/CGMES_2.4.15_27JAN2020/Junction.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Junction::Junction() {}; -Junction::~Junction() {}; +Junction::Junction() {} +Junction::~Junction() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ Junction::getPossibleProfilesForAttributes() const return map; } - - - - - const char Junction::debugName[] = "Junction"; const char* Junction::debugString() const { @@ -52,7 +47,7 @@ const char* Junction::debugString() const void Junction::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Junction"), &Junction_factory)); + factory_map.emplace("cim:Junction", &Junction_factory); } void Junction::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/Junction.hpp b/CGMES_2.4.15_27JAN2020/Junction.hpp index 656b24ae0..4f48dfc33 100644 --- a/CGMES_2.4.15_27JAN2020/Junction.hpp +++ b/CGMES_2.4.15_27JAN2020/Junction.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A point where one or more conducting equipments are connected with zero resistance. - */ + /** \brief A point where one or more conducting equipments are connected with zero resistance. */ class Junction : public Connector { public: @@ -26,7 +24,6 @@ namespace CIMPP Junction(); ~Junction() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Length.hpp b/CGMES_2.4.15_27JAN2020/Length.hpp index f3f5c9403..fe5c38711 100644 --- a/CGMES_2.4.15_27JAN2020/Length.hpp +++ b/CGMES_2.4.15_27JAN2020/Length.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Unit of length. Never negative. - */ + /** \brief Unit of length. Never negative. */ class Length { public: diff --git a/CGMES_2.4.15_27JAN2020/Limit.cpp b/CGMES_2.4.15_27JAN2020/Limit.cpp index 66f178e53..a83eaee0d 100644 --- a/CGMES_2.4.15_27JAN2020/Limit.cpp +++ b/CGMES_2.4.15_27JAN2020/Limit.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Limit::Limit() {}; -Limit::~Limit() {}; +Limit::Limit() {} +Limit::~Limit() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ Limit::getPossibleProfilesForAttributes() const return map; } - - - - - const char Limit::debugName[] = "Limit"; const char* Limit::debugString() const { @@ -51,7 +46,7 @@ const char* Limit::debugString() const void Limit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Limit"), &Limit_factory)); + factory_map.emplace("cim:Limit", &Limit_factory); } void Limit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/Limit.hpp b/CGMES_2.4.15_27JAN2020/Limit.hpp index 1ea9636e1..76b2b4799 100644 --- a/CGMES_2.4.15_27JAN2020/Limit.hpp +++ b/CGMES_2.4.15_27JAN2020/Limit.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Specifies one limit value for a Measurement. A Measurement typically has several limits that are kept together by the LimitSet class. The actual meaning and use of a Limit instance (i.e., if it is an alarm or warning limit or if it is a high or low limit) is not captured in the Limit class. However the name of a Limit instance may indicate both meaning and use. - */ + /** \brief Specifies one limit value for a Measurement. A Measurement typically has several limits that are kept together by the LimitSet class. The actual meaning and use of a Limit instance (i.e., if it is an alarm or warning limit or if it is a high or low limit) is not captured in the Limit class. However the name of a Limit instance may indicate both meaning and use. */ class Limit : public IdentifiedObject { public: @@ -26,7 +24,6 @@ namespace CIMPP Limit(); ~Limit() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/LimitSet.cpp b/CGMES_2.4.15_27JAN2020/LimitSet.cpp index 748127585..77176570f 100644 --- a/CGMES_2.4.15_27JAN2020/LimitSet.cpp +++ b/CGMES_2.4.15_27JAN2020/LimitSet.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" using namespace CIMPP; -LimitSet::LimitSet() {}; -LimitSet::~LimitSet() {}; +LimitSet::LimitSet() {} +LimitSet::~LimitSet() {} static const std::list PossibleProfilesForClass = { @@ -40,25 +39,24 @@ LimitSet::getPossibleProfilesForAttributes() const return map; } - -bool assign_LimitSet_isPercentageLimits(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LimitSet_isPercentageLimits(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LimitSet* element = dynamic_cast(BaseClass_ptr1)) + LimitSet* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->isPercentageLimits; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_LimitSet_isPercentageLimits(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LimitSet* element = dynamic_cast(BaseClass_ptr1)) + const LimitSet* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->isPercentageLimits; if (!buffer.str().empty()) @@ -70,8 +68,6 @@ bool get_LimitSet_isPercentageLimits(const BaseClass* BaseClass_ptr1, std::strin return false; } - - const char LimitSet::debugName[] = "LimitSet"; const char* LimitSet::debugString() const { @@ -80,12 +76,12 @@ const char* LimitSet::debugString() const void LimitSet::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LimitSet"), &LimitSet_factory)); + factory_map.emplace("cim:LimitSet", &LimitSet_factory); } void LimitSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LimitSet.isPercentageLimits"), &assign_LimitSet_isPercentageLimits)); + assign_map.emplace("cim:LimitSet.isPercentageLimits", &assign_LimitSet_isPercentageLimits); } void LimitSet::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/LimitSet.hpp b/CGMES_2.4.15_27JAN2020/LimitSet.hpp index b2363aef2..ee31c5731 100644 --- a/CGMES_2.4.15_27JAN2020/LimitSet.hpp +++ b/CGMES_2.4.15_27JAN2020/LimitSet.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Specifies a set of Limits that are associated with a Measurement. A Measurement may have several LimitSets corresponding to seasonal or other changing conditions. The condition is captured in the name and description attributes. The same LimitSet may be used for several Measurements. In particular percentage limits are used this way. - */ + /** \brief Specifies a set of Limits that are associated with a Measurement. A Measurement may have several LimitSets corresponding to seasonal or other changing conditions. The condition is captured in the name and description attributes. The same LimitSet may be used for several Measurements. In particular percentage limits are used this way. */ class LimitSet : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP LimitSet(); ~LimitSet() override; - CIMPP::Boolean isPercentageLimits; /* Tells if the limit values are in percentage of normalValue or the specified Unit for Measurements and Controls. Default: false */ + /** \brief Tells if the limit values are in percentage of normalValue or the specified Unit for Measurements and Controls. Default: false */ + CIMPP::Boolean isPercentageLimits; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/LimitTypeKind.cpp b/CGMES_2.4.15_27JAN2020/LimitTypeKind.cpp index d6bf93a42..52e511c3f 100644 --- a/CGMES_2.4.15_27JAN2020/LimitTypeKind.cpp +++ b/CGMES_2.4.15_27JAN2020/LimitTypeKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "LimitTypeKind") + if (EnumSymbol.substr(0, pos) != "LimitTypeKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,37 +50,37 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "patl") + if (EnumSymbol == "patl") { rop = LimitTypeKind::patl; return lop; } - if(EnumSymbol == "patlt") + if (EnumSymbol == "patlt") { rop = LimitTypeKind::patlt; return lop; } - if(EnumSymbol == "tatl") + if (EnumSymbol == "tatl") { rop = LimitTypeKind::tatl; return lop; } - if(EnumSymbol == "tc") + if (EnumSymbol == "tc") { rop = LimitTypeKind::tc; return lop; } - if(EnumSymbol == "tct") + if (EnumSymbol == "tct") { rop = LimitTypeKind::tct; return lop; } - if(EnumSymbol == "highVoltage") + if (EnumSymbol == "highVoltage") { rop = LimitTypeKind::highVoltage; return lop; } - if(EnumSymbol == "lowVoltage") + if (EnumSymbol == "lowVoltage") { rop = LimitTypeKind::lowVoltage; return lop; diff --git a/CGMES_2.4.15_27JAN2020/LimitTypeKind.hpp b/CGMES_2.4.15_27JAN2020/LimitTypeKind.hpp index 3d95bd4ec..e6ad6e727 100644 --- a/CGMES_2.4.15_27JAN2020/LimitTypeKind.hpp +++ b/CGMES_2.4.15_27JAN2020/LimitTypeKind.hpp @@ -9,41 +9,25 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The enumeration defines the kinds of the limit types. - */ + /** \brief The enumeration defines the kinds of the limit types. */ class LimitTypeKind { public: enum LimitTypeKind_ENUM { - /** - * The Permanent Admissible Transmission Loading (PATL) is the loading in Amps, MVA or MW that can be accepted by a network branch for an unlimited duration without any risk for the material. The duration attribute is not used and shall be excluded for the PATL limit type. Hence only one limit value exists for the PATL type. - */ + /** The Permanent Admissible Transmission Loading (PATL) is the loading in Amps, MVA or MW that can be accepted by a network branch for an unlimited duration without any risk for the material. The duration attribute is not used and shall be excluded for the PATL limit type. Hence only one limit value exists for the PATL type. */ patl, - /** - * Permanent Admissible Transmission Loading Threshold (PATLT) is a value in engineering units defined for PATL and calculated using percentage less than 100 of the PATL type intended to alert operators of an arising condition. The percentage should be given in the name of the OperationalLimitSet. The aceptableDuration is another way to express the severity of the limit. - */ + /** Permanent Admissible Transmission Loading Threshold (PATLT) is a value in engineering units defined for PATL and calculated using percentage less than 100 of the PATL type intended to alert operators of an arising condition. The percentage should be given in the name of the OperationalLimitSet. The aceptableDuration is another way to express the severity of the limit. */ patlt, - /** - * Temporarily Admissible Transmission Loading (TATL) which is the loading in Amps, MVA or MW that can be accepted by a branch for a certain limited duration. The TATL can be defined in different ways: Such a definition of TATL can depend on the initial operating conditions of the network element (sag situation of a line). The duration attribute can be used define several TATL limit types. Hence multiple TATL limit values may exist having different durations. - */ + /** Temporarily Admissible Transmission Loading (TATL) which is the loading in Amps, MVA or MW that can be accepted by a branch for a certain limited duration. The TATL can be defined in different ways: Such a definition of TATL can depend on the initial operating conditions of the network element (sag situation of a line). The duration attribute can be used define several TATL limit types. Hence multiple TATL limit values may exist having different durations. */ tatl, - /** - * Tripping Current (TC) is the ultimate intensity without any delay. It is defined as the threshold the line will trip without any possible remedial actions. The tripping of the network element is ordered by protections against short circuits or by overload protections, but in any case, the activation delay of these protections is not compatible with the reaction delay of an operator (less than one minute). The duration is always zero and the duration attribute may be left out. Hence only one limit value exists for the TC type. - */ + /** Tripping Current (TC) is the ultimate intensity without any delay. It is defined as the threshold the line will trip without any possible remedial actions. The tripping of the network element is ordered by protections against short circuits or by overload protections, but in any case, the activation delay of these protections is not compatible with the reaction delay of an operator (less than one minute). The duration is always zero and the duration attribute may be left out. Hence only one limit value exists for the TC type. */ tc, - /** - * Tripping Current Threshold (TCT) is a value in engineering units defined for TC and calculated using percentage less than 100 of the TC type intended to alert operators of an arising condition. The percentage should be given in the name of the OperationalLimitSet. The aceptableDuration is another way to express the severity of the limit. - */ + /** Tripping Current Threshold (TCT) is a value in engineering units defined for TC and calculated using percentage less than 100 of the TC type intended to alert operators of an arising condition. The percentage should be given in the name of the OperationalLimitSet. The aceptableDuration is another way to express the severity of the limit. */ tct, - /** - * Referring to the rating of the equipments, a voltage too high can lead to accelerated ageing or the destruction of the equipment. This limit type may or may not have duration. - */ + /** Referring to the rating of the equipments, a voltage too high can lead to accelerated ageing or the destruction of the equipment. This limit type may or may not have duration. */ highVoltage, - /** - * A too low voltage can disturb the normal operation of some protections and transformer equipped with on-load tap changers, electronic power devices or can affect the behaviour of the auxiliaries of generation units. This limit type may or may not have duration. - */ + /** A too low voltage can disturb the normal operation of some protections and transformer equipped with on-load tap changers, electronic power devices or can affect the behaviour of the auxiliaries of generation units. This limit type may or may not have duration. */ lowVoltage, }; diff --git a/CGMES_2.4.15_27JAN2020/Line.cpp b/CGMES_2.4.15_27JAN2020/Line.cpp index 7586ae9a9..098452102 100644 --- a/CGMES_2.4.15_27JAN2020/Line.cpp +++ b/CGMES_2.4.15_27JAN2020/Line.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Line::Line() : Region(nullptr) {}; -Line::~Line() {}; +Line::Line() : Region(nullptr) {} +Line::~Line() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ Line::getPossibleProfilesForAttributes() const return map; } - - bool assign_SubGeographicalRegion_Lines(BaseClass*, BaseClass*); bool assign_Line_Region(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,10 +58,10 @@ bool assign_Line_Region(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) return false; } - bool get_Line_Region(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Line* element = dynamic_cast(BaseClass_ptr1)) + const Line* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Region != 0) { @@ -74,7 +72,6 @@ bool get_Line_Region(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Line"), &Line_factory)); + factory_map.emplace("cim:Line", &Line_factory); } void Line::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -92,7 +89,7 @@ void Line::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Line.Region"), &assign_Line_Region)); + assign_map.emplace("cim:Line.Region", &assign_Line_Region); } void Line::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/Line.hpp b/CGMES_2.4.15_27JAN2020/Line.hpp index 54de53581..5a544c8ac 100644 --- a/CGMES_2.4.15_27JAN2020/Line.hpp +++ b/CGMES_2.4.15_27JAN2020/Line.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class SubGeographicalRegion; - /* - Contains equipment beyond a substation belonging to a power transmission line. - */ + /** \brief Contains equipment beyond a substation belonging to a power transmission line. */ class Line : public EquipmentContainer { public: @@ -27,7 +25,8 @@ namespace CIMPP Line(); ~Line() override; - CIMPP::SubGeographicalRegion* Region; /* The lines within the sub-geographical region. Default: 0 */ + /** \brief The lines within the sub-geographical region. Default: 0 */ + CIMPP::SubGeographicalRegion* Region; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/LinearShuntCompensator.cpp b/CGMES_2.4.15_27JAN2020/LinearShuntCompensator.cpp index ff44c5b0e..e8914787f 100644 --- a/CGMES_2.4.15_27JAN2020/LinearShuntCompensator.cpp +++ b/CGMES_2.4.15_27JAN2020/LinearShuntCompensator.cpp @@ -8,15 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Susceptance.hpp" -#include "Susceptance.hpp" -#include "Conductance.hpp" -#include "Conductance.hpp" using namespace CIMPP; -LinearShuntCompensator::LinearShuntCompensator() {}; -LinearShuntCompensator::~LinearShuntCompensator() {}; +LinearShuntCompensator::LinearShuntCompensator() {} +LinearShuntCompensator::~LinearShuntCompensator() {} static const std::list PossibleProfilesForClass = { @@ -47,64 +43,66 @@ LinearShuntCompensator::getPossibleProfilesForAttributes() const return map; } - -bool assign_LinearShuntCompensator_b0PerSection(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LinearShuntCompensator_b0PerSection(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b0PerSection; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LinearShuntCompensator_bPerSection(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LinearShuntCompensator_bPerSection(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bPerSection; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LinearShuntCompensator_g0PerSection(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LinearShuntCompensator_g0PerSection(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g0PerSection; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LinearShuntCompensator_gPerSection(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LinearShuntCompensator_gPerSection(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gPerSection; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_LinearShuntCompensator_b0PerSection(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b0PerSection; if (!buffer.str().empty()) @@ -118,7 +116,8 @@ bool get_LinearShuntCompensator_b0PerSection(const BaseClass* BaseClass_ptr1, st bool get_LinearShuntCompensator_bPerSection(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bPerSection; if (!buffer.str().empty()) @@ -132,7 +131,8 @@ bool get_LinearShuntCompensator_bPerSection(const BaseClass* BaseClass_ptr1, std bool get_LinearShuntCompensator_g0PerSection(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g0PerSection; if (!buffer.str().empty()) @@ -146,7 +146,8 @@ bool get_LinearShuntCompensator_g0PerSection(const BaseClass* BaseClass_ptr1, st bool get_LinearShuntCompensator_gPerSection(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gPerSection; if (!buffer.str().empty()) @@ -158,8 +159,6 @@ bool get_LinearShuntCompensator_gPerSection(const BaseClass* BaseClass_ptr1, std return false; } - - const char LinearShuntCompensator::debugName[] = "LinearShuntCompensator"; const char* LinearShuntCompensator::debugString() const { @@ -168,15 +167,15 @@ const char* LinearShuntCompensator::debugString() const void LinearShuntCompensator::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LinearShuntCompensator"), &LinearShuntCompensator_factory)); + factory_map.emplace("cim:LinearShuntCompensator", &LinearShuntCompensator_factory); } void LinearShuntCompensator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LinearShuntCompensator.b0PerSection"), &assign_LinearShuntCompensator_b0PerSection)); - assign_map.insert(std::make_pair(std::string("cim:LinearShuntCompensator.bPerSection"), &assign_LinearShuntCompensator_bPerSection)); - assign_map.insert(std::make_pair(std::string("cim:LinearShuntCompensator.g0PerSection"), &assign_LinearShuntCompensator_g0PerSection)); - assign_map.insert(std::make_pair(std::string("cim:LinearShuntCompensator.gPerSection"), &assign_LinearShuntCompensator_gPerSection)); + assign_map.emplace("cim:LinearShuntCompensator.b0PerSection", &assign_LinearShuntCompensator_b0PerSection); + assign_map.emplace("cim:LinearShuntCompensator.bPerSection", &assign_LinearShuntCompensator_bPerSection); + assign_map.emplace("cim:LinearShuntCompensator.g0PerSection", &assign_LinearShuntCompensator_g0PerSection); + assign_map.emplace("cim:LinearShuntCompensator.gPerSection", &assign_LinearShuntCompensator_gPerSection); } void LinearShuntCompensator::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/LinearShuntCompensator.hpp b/CGMES_2.4.15_27JAN2020/LinearShuntCompensator.hpp index 0ad76bec1..135910c4f 100644 --- a/CGMES_2.4.15_27JAN2020/LinearShuntCompensator.hpp +++ b/CGMES_2.4.15_27JAN2020/LinearShuntCompensator.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A linear shunt compensator has banks or sections with equal admittance values. - */ + /** \brief A linear shunt compensator has banks or sections with equal admittance values. */ class LinearShuntCompensator : public ShuntCompensator { public: @@ -28,10 +26,17 @@ namespace CIMPP LinearShuntCompensator(); ~LinearShuntCompensator() override; - CIMPP::Susceptance b0PerSection; /* Zero sequence shunt (charging) susceptance per section Default: nullptr */ - CIMPP::Susceptance bPerSection; /* Positive sequence shunt (charging) susceptance per section Default: nullptr */ - CIMPP::Conductance g0PerSection; /* Zero sequence shunt (charging) conductance per section Default: nullptr */ - CIMPP::Conductance gPerSection; /* Positive sequence shunt (charging) conductance per section Default: nullptr */ + /** \brief Zero sequence shunt (charging) susceptance per section Default: nullptr */ + CIMPP::Susceptance b0PerSection; + + /** \brief Positive sequence shunt (charging) susceptance per section Default: nullptr */ + CIMPP::Susceptance bPerSection; + + /** \brief Zero sequence shunt (charging) conductance per section Default: nullptr */ + CIMPP::Conductance g0PerSection; + + /** \brief Positive sequence shunt (charging) conductance per section Default: nullptr */ + CIMPP::Conductance gPerSection; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/LoadAggregate.cpp b/CGMES_2.4.15_27JAN2020/LoadAggregate.cpp index 1af1aac26..56bc69716 100644 --- a/CGMES_2.4.15_27JAN2020/LoadAggregate.cpp +++ b/CGMES_2.4.15_27JAN2020/LoadAggregate.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -LoadAggregate::LoadAggregate() : LoadMotor(nullptr), LoadStatic(nullptr) {}; -LoadAggregate::~LoadAggregate() {}; +LoadAggregate::LoadAggregate() : LoadMotor(nullptr), LoadStatic(nullptr) {} +LoadAggregate::~LoadAggregate() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ LoadAggregate::getPossibleProfilesForAttributes() const return map; } - - bool assign_LoadMotor_LoadAggregate(BaseClass*, BaseClass*); bool assign_LoadAggregate_LoadMotor(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_LoadAggregate_LoadMotor(BaseClass* BaseClass_ptr1, BaseClass* BaseCl } return false; } + bool assign_LoadStatic_LoadAggregate(BaseClass*, BaseClass*); bool assign_LoadAggregate_LoadStatic(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -87,7 +86,7 @@ const char* LoadAggregate::debugString() const void LoadAggregate::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadAggregate"), &LoadAggregate_factory)); + factory_map.emplace("cim:LoadAggregate", &LoadAggregate_factory); } void LoadAggregate::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -96,8 +95,8 @@ void LoadAggregate::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadAggregate.LoadMotor"), &assign_LoadAggregate_LoadMotor)); - assign_map.insert(std::make_pair(std::string("cim:LoadAggregate.LoadStatic"), &assign_LoadAggregate_LoadStatic)); + assign_map.emplace("cim:LoadAggregate.LoadMotor", &assign_LoadAggregate_LoadMotor); + assign_map.emplace("cim:LoadAggregate.LoadStatic", &assign_LoadAggregate_LoadStatic); } void LoadAggregate::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/LoadAggregate.hpp b/CGMES_2.4.15_27JAN2020/LoadAggregate.hpp index 510b51ab5..4fb10931d 100644 --- a/CGMES_2.4.15_27JAN2020/LoadAggregate.hpp +++ b/CGMES_2.4.15_27JAN2020/LoadAggregate.hpp @@ -18,9 +18,7 @@ namespace CIMPP class LoadMotor; class LoadStatic; - /* - Standard aggregate load model comprised of static and/or dynamic components. A static load model represents the sensitivity of the real and reactive power consumed by the load to the amplitude and frequency of the bus voltage. A dynamic load model can used to represent the aggregate response of the motor components of the load. - */ + /** \brief Standard aggregate load model comprised of static and/or dynamic components. A static load model represents the sensitivity of the real and reactive power consumed by the load to the amplitude and frequency of the bus voltage. A dynamic load model can used to represent the aggregate response of the motor components of the load. */ class LoadAggregate : public LoadDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP LoadAggregate(); ~LoadAggregate() override; - CIMPP::LoadMotor* LoadMotor; /* Aggregate motor (dynamic) load associated with this aggregate load. Default: 0 */ - CIMPP::LoadStatic* LoadStatic; /* Aggregate static load associated with this aggregate load. Default: 0 */ + /** \brief Aggregate motor (dynamic) load associated with this aggregate load. Default: 0 */ + CIMPP::LoadMotor* LoadMotor; + + /** \brief Aggregate static load associated with this aggregate load. Default: 0 */ + CIMPP::LoadStatic* LoadStatic; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/LoadArea.cpp b/CGMES_2.4.15_27JAN2020/LoadArea.cpp index 1e019fe74..8154b9035 100644 --- a/CGMES_2.4.15_27JAN2020/LoadArea.cpp +++ b/CGMES_2.4.15_27JAN2020/LoadArea.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -LoadArea::LoadArea() {}; -LoadArea::~LoadArea() {}; +LoadArea::LoadArea() {} +LoadArea::~LoadArea() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ LoadArea::getPossibleProfilesForAttributes() const return map; } - - bool assign_SubLoadArea_LoadArea(BaseClass*, BaseClass*); bool assign_LoadArea_SubLoadAreas(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_LoadArea_SubLoadAreas(BaseClass* BaseClass_ptr1, BaseClass* BaseClas } - const char LoadArea::debugName[] = "LoadArea"; const char* LoadArea::debugString() const { @@ -69,7 +66,7 @@ const char* LoadArea::debugString() const void LoadArea::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadArea"), &LoadArea_factory)); + factory_map.emplace("cim:LoadArea", &LoadArea_factory); } void LoadArea::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void LoadArea::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadArea.SubLoadAreas"), &assign_LoadArea_SubLoadAreas)); + assign_map.emplace("cim:LoadArea.SubLoadAreas", &assign_LoadArea_SubLoadAreas); } void LoadArea::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/LoadArea.hpp b/CGMES_2.4.15_27JAN2020/LoadArea.hpp index 90ea4d907..9142620cd 100644 --- a/CGMES_2.4.15_27JAN2020/LoadArea.hpp +++ b/CGMES_2.4.15_27JAN2020/LoadArea.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class SubLoadArea; - /* - The class is the root or first level in a hierarchical structure for grouping of loads for the purpose of load flow load scaling. - */ + /** \brief The class is the root or first level in a hierarchical structure for grouping of loads for the purpose of load flow load scaling. */ class LoadArea : public EnergyArea { public: @@ -27,7 +25,8 @@ namespace CIMPP LoadArea(); ~LoadArea() override; - std::list SubLoadAreas; /* The SubLoadAreas in the LoadArea. Default: 0 */ + /** \brief The SubLoadAreas in the LoadArea. Default: 0 */ + std::list SubLoadAreas; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/LoadBreakSwitch.cpp b/CGMES_2.4.15_27JAN2020/LoadBreakSwitch.cpp index 2562f5898..881f3cd8a 100644 --- a/CGMES_2.4.15_27JAN2020/LoadBreakSwitch.cpp +++ b/CGMES_2.4.15_27JAN2020/LoadBreakSwitch.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -LoadBreakSwitch::LoadBreakSwitch() {}; -LoadBreakSwitch::~LoadBreakSwitch() {}; +LoadBreakSwitch::LoadBreakSwitch() {} +LoadBreakSwitch::~LoadBreakSwitch() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ LoadBreakSwitch::getPossibleProfilesForAttributes() const return map; } - - - - - const char LoadBreakSwitch::debugName[] = "LoadBreakSwitch"; const char* LoadBreakSwitch::debugString() const { @@ -52,7 +47,7 @@ const char* LoadBreakSwitch::debugString() const void LoadBreakSwitch::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadBreakSwitch"), &LoadBreakSwitch_factory)); + factory_map.emplace("cim:LoadBreakSwitch", &LoadBreakSwitch_factory); } void LoadBreakSwitch::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/LoadBreakSwitch.hpp b/CGMES_2.4.15_27JAN2020/LoadBreakSwitch.hpp index 4af01750e..e6c20cc50 100644 --- a/CGMES_2.4.15_27JAN2020/LoadBreakSwitch.hpp +++ b/CGMES_2.4.15_27JAN2020/LoadBreakSwitch.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A mechanical switching device capable of making, carrying, and breaking currents under normal operating conditions. - */ + /** \brief A mechanical switching device capable of making, carrying, and breaking currents under normal operating conditions. */ class LoadBreakSwitch : public ProtectedSwitch { public: @@ -26,7 +24,6 @@ namespace CIMPP LoadBreakSwitch(); ~LoadBreakSwitch() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/LoadComposite.cpp b/CGMES_2.4.15_27JAN2020/LoadComposite.cpp index bf3d70d0c..3502dc5ba 100644 --- a/CGMES_2.4.15_27JAN2020/LoadComposite.cpp +++ b/CGMES_2.4.15_27JAN2020/LoadComposite.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -LoadComposite::LoadComposite() {}; -LoadComposite::~LoadComposite() {}; +LoadComposite::LoadComposite() {} +LoadComposite::~LoadComposite() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ LoadComposite::getPossibleProfilesForAttributes() const return map; } - -bool assign_LoadComposite_epfd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_epfd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->epfd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_epfs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_epfs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->epfs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_epvd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_epvd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->epvd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_epvs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_epvs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->epvs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_eqfd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_eqfd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eqfd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_eqfs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_eqfs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eqfs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_eqvd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_eqvd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eqvd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_eqvs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_eqvs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eqvs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_h(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_h(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->h; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_lfrac(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_lfrac(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lfrac; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_pfrac(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_pfrac(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pfrac; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_LoadComposite_epfd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->epfd; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_LoadComposite_epfd(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_LoadComposite_epfs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->epfs; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_LoadComposite_epfs(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_LoadComposite_epvd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->epvd; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_LoadComposite_epvd(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_LoadComposite_epvs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->epvs; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_LoadComposite_epvs(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_LoadComposite_eqfd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eqfd; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_LoadComposite_eqfd(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_LoadComposite_eqfs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eqfs; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_LoadComposite_eqfs(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_LoadComposite_eqvd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eqvd; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_LoadComposite_eqvd(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_LoadComposite_eqvs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eqvs; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_LoadComposite_eqvs(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_LoadComposite_h(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->h; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_LoadComposite_h(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_LoadComposite_lfrac(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lfrac; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_LoadComposite_lfrac(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_LoadComposite_pfrac(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pfrac; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_LoadComposite_pfrac(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char LoadComposite::debugName[] = "LoadComposite"; const char* LoadComposite::debugString() const { @@ -370,22 +376,22 @@ const char* LoadComposite::debugString() const void LoadComposite::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadComposite"), &LoadComposite_factory)); + factory_map.emplace("cim:LoadComposite", &LoadComposite_factory); } void LoadComposite::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.epfd"), &assign_LoadComposite_epfd)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.epfs"), &assign_LoadComposite_epfs)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.epvd"), &assign_LoadComposite_epvd)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.epvs"), &assign_LoadComposite_epvs)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.eqfd"), &assign_LoadComposite_eqfd)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.eqfs"), &assign_LoadComposite_eqfs)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.eqvd"), &assign_LoadComposite_eqvd)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.eqvs"), &assign_LoadComposite_eqvs)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.h"), &assign_LoadComposite_h)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.lfrac"), &assign_LoadComposite_lfrac)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.pfrac"), &assign_LoadComposite_pfrac)); + assign_map.emplace("cim:LoadComposite.epfd", &assign_LoadComposite_epfd); + assign_map.emplace("cim:LoadComposite.epfs", &assign_LoadComposite_epfs); + assign_map.emplace("cim:LoadComposite.epvd", &assign_LoadComposite_epvd); + assign_map.emplace("cim:LoadComposite.epvs", &assign_LoadComposite_epvs); + assign_map.emplace("cim:LoadComposite.eqfd", &assign_LoadComposite_eqfd); + assign_map.emplace("cim:LoadComposite.eqfs", &assign_LoadComposite_eqfs); + assign_map.emplace("cim:LoadComposite.eqvd", &assign_LoadComposite_eqvd); + assign_map.emplace("cim:LoadComposite.eqvs", &assign_LoadComposite_eqvs); + assign_map.emplace("cim:LoadComposite.h", &assign_LoadComposite_h); + assign_map.emplace("cim:LoadComposite.lfrac", &assign_LoadComposite_lfrac); + assign_map.emplace("cim:LoadComposite.pfrac", &assign_LoadComposite_pfrac); } void LoadComposite::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/LoadComposite.hpp b/CGMES_2.4.15_27JAN2020/LoadComposite.hpp index 9ed68bc0c..37bbc8ac6 100644 --- a/CGMES_2.4.15_27JAN2020/LoadComposite.hpp +++ b/CGMES_2.4.15_27JAN2020/LoadComposite.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - This models combines static load and induction motor load effects. The dynamics of the motor are simplified by linearizing the induction machine equations. - */ + /** \brief This models combines static load and induction motor load effects. The dynamics of the motor are simplified by linearizing the induction machine equations. */ class LoadComposite : public LoadDynamics { public: @@ -28,17 +26,38 @@ namespace CIMPP LoadComposite(); ~LoadComposite() override; - CIMPP::Simple_Float epfd; /* Active load-frequency dependence index (dynamic) (Epfd). Typical Value = 1.5. Default: nullptr */ - CIMPP::Simple_Float epfs; /* Active load-frequency dependence index (static) (Epfs). Typical Value = 1.5. Default: nullptr */ - CIMPP::Simple_Float epvd; /* Active load-voltage dependence index (dynamic) (Epvd). Typical Value = 0.7. Default: nullptr */ - CIMPP::Simple_Float epvs; /* Active load-voltage dependence index (static) (Epvs). Typical Value = 0.7. Default: nullptr */ - CIMPP::Simple_Float eqfd; /* Reactive load-frequency dependence index (dynamic) (Eqfd). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float eqfs; /* Reactive load-frequency dependence index (static) (Eqfs). Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float eqvd; /* Reactive load-voltage dependence index (dynamic) (Eqvd). Typical Value = 2. Default: nullptr */ - CIMPP::Simple_Float eqvs; /* Reactive load-voltage dependence index (static) (Eqvs). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds h; /* Inertia constant (H). Typical Value = 2.5. Default: nullptr */ - CIMPP::Simple_Float lfrac; /* Loading factor - ratio of initial P to motor MVA base (Lfrac). Typical Value = 0.8. Default: nullptr */ - CIMPP::Simple_Float pfrac; /* Fraction of constant-power load to be represented by this motor model (Pfrac) (>=0.0 and <=1.0). Typical Value = 0.5. Default: nullptr */ + /** \brief Active load-frequency dependence index (dynamic) (Epfd). Typical Value = 1.5. Default: nullptr */ + CIMPP::Simple_Float epfd; + + /** \brief Active load-frequency dependence index (static) (Epfs). Typical Value = 1.5. Default: nullptr */ + CIMPP::Simple_Float epfs; + + /** \brief Active load-voltage dependence index (dynamic) (Epvd). Typical Value = 0.7. Default: nullptr */ + CIMPP::Simple_Float epvd; + + /** \brief Active load-voltage dependence index (static) (Epvs). Typical Value = 0.7. Default: nullptr */ + CIMPP::Simple_Float epvs; + + /** \brief Reactive load-frequency dependence index (dynamic) (Eqfd). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float eqfd; + + /** \brief Reactive load-frequency dependence index (static) (Eqfs). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float eqfs; + + /** \brief Reactive load-voltage dependence index (dynamic) (Eqvd). Typical Value = 2. Default: nullptr */ + CIMPP::Simple_Float eqvd; + + /** \brief Reactive load-voltage dependence index (static) (Eqvs). Typical Value = 2. Default: nullptr */ + CIMPP::Simple_Float eqvs; + + /** \brief Inertia constant (H). Typical Value = 2.5. Default: nullptr */ + CIMPP::Seconds h; + + /** \brief Loading factor - ratio of initial P to motor MVA base (Lfrac). Typical Value = 0.8. Default: nullptr */ + CIMPP::Simple_Float lfrac; + + /** \brief Fraction of constant-power load to be represented by this motor model (Pfrac) (>=0.0 and <=1.0). Typical Value = 0.5. Default: nullptr */ + CIMPP::Simple_Float pfrac; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/LoadDynamics.cpp b/CGMES_2.4.15_27JAN2020/LoadDynamics.cpp index 0907fb345..35cf6f647 100644 --- a/CGMES_2.4.15_27JAN2020/LoadDynamics.cpp +++ b/CGMES_2.4.15_27JAN2020/LoadDynamics.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -LoadDynamics::LoadDynamics() {}; -LoadDynamics::~LoadDynamics() {}; +LoadDynamics::LoadDynamics() {} +LoadDynamics::~LoadDynamics() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ LoadDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_EnergyConsumer_LoadDynamics(BaseClass*, BaseClass*); bool assign_LoadDynamics_EnergyConsumer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_LoadDynamics_EnergyConsumer(BaseClass* BaseClass_ptr1, BaseClass* Ba } - const char LoadDynamics::debugName[] = "LoadDynamics"; const char* LoadDynamics::debugString() const { @@ -69,7 +66,7 @@ const char* LoadDynamics::debugString() const void LoadDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadDynamics"), &LoadDynamics_factory)); + factory_map.emplace("cim:LoadDynamics", &LoadDynamics_factory); } void LoadDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void LoadDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadDynamics.EnergyConsumer"), &assign_LoadDynamics_EnergyConsumer)); + assign_map.emplace("cim:LoadDynamics.EnergyConsumer", &assign_LoadDynamics_EnergyConsumer); } void LoadDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/LoadDynamics.hpp b/CGMES_2.4.15_27JAN2020/LoadDynamics.hpp index 35a9d29f8..ffaa8be53 100644 --- a/CGMES_2.4.15_27JAN2020/LoadDynamics.hpp +++ b/CGMES_2.4.15_27JAN2020/LoadDynamics.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class EnergyConsumer; - /* - Load whose behaviour is described by reference to a standard model A standard feature of dynamic load behaviour modelling is the ability to associate the same behaviour to multiple energy consumers by means of a single aggregate load definition. Aggregate loads are used to represent all or part of the real and reactive load from one or more loads in the static (power flow) data. This load is usually the aggregation of many individual load devices and the load model is approximate representation of the aggregate response of the load devices to system disturbances. The load model is always applied to individual bus loads (energy consumers) but a single set of load model parameters can used for all loads in the grouping. - */ + /** \brief Load whose behaviour is described by reference to a standard model A standard feature of dynamic load behaviour modelling is the ability to associate the same behaviour to multiple energy consumers by means of a single aggregate load definition. Aggregate loads are used to represent all or part of the real and reactive load from one or more loads in the static (power flow) data. This load is usually the aggregation of many individual load devices and the load model is approximate representation of the aggregate response of the load devices to system disturbances. The load model is always applied to individual bus loads (energy consumers) but a single set of load model parameters can used for all loads in the grouping. */ class LoadDynamics : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP LoadDynamics(); ~LoadDynamics() override; - std::list EnergyConsumer; /* Energy consumer to which this dynamics load model applies. Default: 0 */ + /** \brief Energy consumer to which this dynamics load model applies. Default: 0 */ + std::list EnergyConsumer; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/LoadGenericNonLinear.cpp b/CGMES_2.4.15_27JAN2020/LoadGenericNonLinear.cpp index e0e5491ff..9bae002fa 100644 --- a/CGMES_2.4.15_27JAN2020/LoadGenericNonLinear.cpp +++ b/CGMES_2.4.15_27JAN2020/LoadGenericNonLinear.cpp @@ -8,20 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "GenericNonLinearLoadModelKind.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -LoadGenericNonLinear::LoadGenericNonLinear() {}; -LoadGenericNonLinear::~LoadGenericNonLinear() {}; +LoadGenericNonLinear::LoadGenericNonLinear() {} +LoadGenericNonLinear::~LoadGenericNonLinear() {} static const std::list PossibleProfilesForClass = { @@ -56,129 +47,136 @@ LoadGenericNonLinear::getPossibleProfilesForAttributes() const return map; } - -bool assign_LoadGenericNonLinear_bs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadGenericNonLinear_bs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadGenericNonLinear_bt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadGenericNonLinear_bt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadGenericNonLinear_genericNonLinearLoadModelType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadGenericNonLinear_genericNonLinearLoadModelType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->genericNonLinearLoadModelType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadGenericNonLinear_ls(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadGenericNonLinear_ls(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ls; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadGenericNonLinear_lt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadGenericNonLinear_lt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadGenericNonLinear_pt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadGenericNonLinear_pt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadGenericNonLinear_qt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadGenericNonLinear_qt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadGenericNonLinear_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadGenericNonLinear_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadGenericNonLinear_tq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadGenericNonLinear_tq(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tq; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_LoadGenericNonLinear_bs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bs; if (!buffer.str().empty()) @@ -192,7 +190,8 @@ bool get_LoadGenericNonLinear_bs(const BaseClass* BaseClass_ptr1, std::stringstr bool get_LoadGenericNonLinear_bt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bt; if (!buffer.str().empty()) @@ -204,9 +203,25 @@ bool get_LoadGenericNonLinear_bt(const BaseClass* BaseClass_ptr1, std::stringstr return false; } +bool get_LoadGenericNonLinear_genericNonLinearLoadModelType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->genericNonLinearLoadModelType; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_LoadGenericNonLinear_ls(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ls; if (!buffer.str().empty()) @@ -220,7 +235,8 @@ bool get_LoadGenericNonLinear_ls(const BaseClass* BaseClass_ptr1, std::stringstr bool get_LoadGenericNonLinear_lt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lt; if (!buffer.str().empty()) @@ -234,7 +250,8 @@ bool get_LoadGenericNonLinear_lt(const BaseClass* BaseClass_ptr1, std::stringstr bool get_LoadGenericNonLinear_pt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pt; if (!buffer.str().empty()) @@ -248,7 +265,8 @@ bool get_LoadGenericNonLinear_pt(const BaseClass* BaseClass_ptr1, std::stringstr bool get_LoadGenericNonLinear_qt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qt; if (!buffer.str().empty()) @@ -262,7 +280,8 @@ bool get_LoadGenericNonLinear_qt(const BaseClass* BaseClass_ptr1, std::stringstr bool get_LoadGenericNonLinear_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -276,7 +295,8 @@ bool get_LoadGenericNonLinear_tp(const BaseClass* BaseClass_ptr1, std::stringstr bool get_LoadGenericNonLinear_tq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tq; if (!buffer.str().empty()) @@ -288,22 +308,6 @@ bool get_LoadGenericNonLinear_tq(const BaseClass* BaseClass_ptr1, std::stringstr return false; } - - -bool get_LoadGenericNonLinear_genericNonLinearLoadModelType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->genericNonLinearLoadModelType; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char LoadGenericNonLinear::debugName[] = "LoadGenericNonLinear"; const char* LoadGenericNonLinear::debugString() const { @@ -312,20 +316,20 @@ const char* LoadGenericNonLinear::debugString() const void LoadGenericNonLinear::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear"), &LoadGenericNonLinear_factory)); + factory_map.emplace("cim:LoadGenericNonLinear", &LoadGenericNonLinear_factory); } void LoadGenericNonLinear::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear.bs"), &assign_LoadGenericNonLinear_bs)); - assign_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear.bt"), &assign_LoadGenericNonLinear_bt)); - assign_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear.genericNonLinearLoadModelType"), &assign_LoadGenericNonLinear_genericNonLinearLoadModelType)); - assign_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear.ls"), &assign_LoadGenericNonLinear_ls)); - assign_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear.lt"), &assign_LoadGenericNonLinear_lt)); - assign_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear.pt"), &assign_LoadGenericNonLinear_pt)); - assign_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear.qt"), &assign_LoadGenericNonLinear_qt)); - assign_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear.tp"), &assign_LoadGenericNonLinear_tp)); - assign_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear.tq"), &assign_LoadGenericNonLinear_tq)); + assign_map.emplace("cim:LoadGenericNonLinear.bs", &assign_LoadGenericNonLinear_bs); + assign_map.emplace("cim:LoadGenericNonLinear.bt", &assign_LoadGenericNonLinear_bt); + assign_map.emplace("cim:LoadGenericNonLinear.genericNonLinearLoadModelType", &assign_LoadGenericNonLinear_genericNonLinearLoadModelType); + assign_map.emplace("cim:LoadGenericNonLinear.ls", &assign_LoadGenericNonLinear_ls); + assign_map.emplace("cim:LoadGenericNonLinear.lt", &assign_LoadGenericNonLinear_lt); + assign_map.emplace("cim:LoadGenericNonLinear.pt", &assign_LoadGenericNonLinear_pt); + assign_map.emplace("cim:LoadGenericNonLinear.qt", &assign_LoadGenericNonLinear_qt); + assign_map.emplace("cim:LoadGenericNonLinear.tp", &assign_LoadGenericNonLinear_tp); + assign_map.emplace("cim:LoadGenericNonLinear.tq", &assign_LoadGenericNonLinear_tq); } void LoadGenericNonLinear::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/LoadGenericNonLinear.hpp b/CGMES_2.4.15_27JAN2020/LoadGenericNonLinear.hpp index 4a840e93b..c291b52e3 100644 --- a/CGMES_2.4.15_27JAN2020/LoadGenericNonLinear.hpp +++ b/CGMES_2.4.15_27JAN2020/LoadGenericNonLinear.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - These load models (known also as generic non-linear dynamic (GNLD) load models) can be used in mid-term and long-term voltage stability simulations (i.e., to study voltage collapse), as they can replace a more detailed representation of aggregate load, including induction motors, thermostatically controlled and static loads. - */ + /** \brief These load models (known also as generic non-linear dynamic (GNLD) load models) can be used in mid-term and long-term voltage stability simulations (i.e., to study voltage collapse), as they can replace a more detailed representation of aggregate load, including induction motors, thermostatically controlled and static loads. */ class LoadGenericNonLinear : public LoadDynamics { public: @@ -29,15 +27,32 @@ namespace CIMPP LoadGenericNonLinear(); ~LoadGenericNonLinear() override; - CIMPP::Simple_Float bs; /* Steady state voltage index for reactive power (BS). Default: nullptr */ - CIMPP::Simple_Float bt; /* Transient voltage index for reactive power (BT). Default: nullptr */ - CIMPP::GenericNonLinearLoadModelKind genericNonLinearLoadModelType; /* Type of generic non-linear load model. Default: 0 */ - CIMPP::Simple_Float ls; /* Steady state voltage index for active power (LS). Default: nullptr */ - CIMPP::Simple_Float lt; /* Transient voltage index for active power (LT). Default: nullptr */ - CIMPP::Simple_Float pt; /* Dynamic portion of active load (P). Default: nullptr */ - CIMPP::Simple_Float qt; /* Dynamic portion of reactive load (Q). Default: nullptr */ - CIMPP::Seconds tp; /* Time constant of lag function of active power (T). Default: nullptr */ - CIMPP::Seconds tq; /* Time constant of lag function of reactive power (T). Default: nullptr */ + /** \brief Steady state voltage index for reactive power (BS). Default: nullptr */ + CIMPP::Simple_Float bs; + + /** \brief Transient voltage index for reactive power (BT). Default: nullptr */ + CIMPP::Simple_Float bt; + + /** \brief Type of generic non-linear load model. Default: 0 */ + CIMPP::GenericNonLinearLoadModelKind genericNonLinearLoadModelType; + + /** \brief Steady state voltage index for active power (LS). Default: nullptr */ + CIMPP::Simple_Float ls; + + /** \brief Transient voltage index for active power (LT). Default: nullptr */ + CIMPP::Simple_Float lt; + + /** \brief Dynamic portion of active load (P). Default: nullptr */ + CIMPP::Simple_Float pt; + + /** \brief Dynamic portion of reactive load (Q). Default: nullptr */ + CIMPP::Simple_Float qt; + + /** \brief Time constant of lag function of active power (T). Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Time constant of lag function of reactive power (T). Default: nullptr */ + CIMPP::Seconds tq; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/LoadGroup.cpp b/CGMES_2.4.15_27JAN2020/LoadGroup.cpp index 7580cae1b..142619bf7 100644 --- a/CGMES_2.4.15_27JAN2020/LoadGroup.cpp +++ b/CGMES_2.4.15_27JAN2020/LoadGroup.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -LoadGroup::LoadGroup() : SubLoadArea(nullptr) {}; -LoadGroup::~LoadGroup() {}; +LoadGroup::LoadGroup() : SubLoadArea(nullptr) {} +LoadGroup::~LoadGroup() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ LoadGroup::getPossibleProfilesForAttributes() const return map; } - - bool assign_SubLoadArea_LoadGroups(BaseClass*, BaseClass*); bool assign_LoadGroup_SubLoadArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_LoadGroup_SubLoadArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClas return false; } - bool get_LoadGroup_SubLoadArea(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const LoadGroup* element = dynamic_cast(BaseClass_ptr1)) + const LoadGroup* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->SubLoadArea != 0) { @@ -73,7 +71,6 @@ bool get_LoadGroup_SubLoadArea(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadGroup"), &LoadGroup_factory)); + factory_map.emplace("cim:LoadGroup", &LoadGroup_factory); } void LoadGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void LoadGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadGroup.SubLoadArea"), &assign_LoadGroup_SubLoadArea)); + assign_map.emplace("cim:LoadGroup.SubLoadArea", &assign_LoadGroup_SubLoadArea); } void LoadGroup::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/LoadGroup.hpp b/CGMES_2.4.15_27JAN2020/LoadGroup.hpp index 2e6a4a9b8..d0fa3dd27 100644 --- a/CGMES_2.4.15_27JAN2020/LoadGroup.hpp +++ b/CGMES_2.4.15_27JAN2020/LoadGroup.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class SubLoadArea; - /* - The class is the third level in a hierarchical structure for grouping of loads for the purpose of load flow load scaling. - */ + /** \brief The class is the third level in a hierarchical structure for grouping of loads for the purpose of load flow load scaling. */ class LoadGroup : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP LoadGroup(); ~LoadGroup() override; - CIMPP::SubLoadArea* SubLoadArea; /* The SubLoadArea where the Loadgroup belongs. Default: 0 */ + /** \brief The SubLoadArea where the Loadgroup belongs. Default: 0 */ + CIMPP::SubLoadArea* SubLoadArea; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/LoadMotor.cpp b/CGMES_2.4.15_27JAN2020/LoadMotor.cpp index 34d7be7a5..b1eddcd2a 100644 --- a/CGMES_2.4.15_27JAN2020/LoadMotor.cpp +++ b/CGMES_2.4.15_27JAN2020/LoadMotor.cpp @@ -9,24 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "LoadAggregate.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" using namespace CIMPP; -LoadMotor::LoadMotor() : LoadAggregate(nullptr) {}; -LoadMotor::~LoadMotor() {}; +LoadMotor::LoadMotor() : LoadAggregate(nullptr) {} +LoadMotor::~LoadMotor() {} static const std::list PossibleProfilesForClass = { @@ -66,197 +53,223 @@ LoadMotor::getPossibleProfilesForAttributes() const return map; } +bool assign_LoadAggregate_LoadMotor(BaseClass*, BaseClass*); +bool assign_LoadMotor_LoadAggregate(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + LoadAggregate* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->LoadAggregate != element2) + { + element->LoadAggregate = element2; + return assign_LoadAggregate_LoadMotor(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_LoadMotor_d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_d(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->d; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_h(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_h(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->h; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_lfac(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_lfac(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lfac; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_lp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_lp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_lpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_lpp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lpp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_ls(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_ls(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ls; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_pfrac(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_pfrac(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pfrac; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_ra(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_ra(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ra; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_tbkr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_tbkr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tbkr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_tpo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_tpo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_tppo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_tppo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tppo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_tv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_tv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_vt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_vt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_LoadAggregate_LoadMotor(BaseClass*, BaseClass*); -bool assign_LoadMotor_LoadAggregate(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_LoadMotor_LoadAggregate(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - LoadMotor* element = dynamic_cast(BaseClass_ptr1); - LoadAggregate* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->LoadAggregate != element2) + if (element->LoadAggregate != 0) { - element->LoadAggregate = element2; - return assign_LoadAggregate_LoadMotor(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->LoadAggregate); + return true; } - return true; } return false; } bool get_LoadMotor_d(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->d; if (!buffer.str().empty()) @@ -270,7 +283,8 @@ bool get_LoadMotor_d(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_LoadMotor_h(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->h; if (!buffer.str().empty()) @@ -284,7 +298,8 @@ bool get_LoadMotor_h(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_LoadMotor_lfac(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lfac; if (!buffer.str().empty()) @@ -298,7 +313,8 @@ bool get_LoadMotor_lfac(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadMotor_lp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lp; if (!buffer.str().empty()) @@ -312,7 +328,8 @@ bool get_LoadMotor_lp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_LoadMotor_lpp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lpp; if (!buffer.str().empty()) @@ -326,7 +343,8 @@ bool get_LoadMotor_lpp(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_LoadMotor_ls(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ls; if (!buffer.str().empty()) @@ -340,7 +358,8 @@ bool get_LoadMotor_ls(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_LoadMotor_pfrac(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pfrac; if (!buffer.str().empty()) @@ -354,7 +373,8 @@ bool get_LoadMotor_pfrac(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_LoadMotor_ra(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ra; if (!buffer.str().empty()) @@ -368,7 +388,8 @@ bool get_LoadMotor_ra(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_LoadMotor_tbkr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tbkr; if (!buffer.str().empty()) @@ -382,7 +403,8 @@ bool get_LoadMotor_tbkr(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadMotor_tpo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpo; if (!buffer.str().empty()) @@ -396,7 +418,8 @@ bool get_LoadMotor_tpo(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_LoadMotor_tppo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tppo; if (!buffer.str().empty()) @@ -410,7 +433,8 @@ bool get_LoadMotor_tppo(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadMotor_tv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tv; if (!buffer.str().empty()) @@ -424,7 +448,8 @@ bool get_LoadMotor_tv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_LoadMotor_vt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vt; if (!buffer.str().empty()) @@ -436,21 +461,6 @@ bool get_LoadMotor_vt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - -bool get_LoadMotor_LoadAggregate(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->LoadAggregate != 0) - { - BaseClass_list.push_back(element->LoadAggregate); - return true; - } - } - return false; -} - - const char LoadMotor::debugName[] = "LoadMotor"; const char* LoadMotor::debugString() const { @@ -459,29 +469,29 @@ const char* LoadMotor::debugString() const void LoadMotor::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadMotor"), &LoadMotor_factory)); + factory_map.emplace("cim:LoadMotor", &LoadMotor_factory); } void LoadMotor::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.d"), &assign_LoadMotor_d)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.h"), &assign_LoadMotor_h)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.lfac"), &assign_LoadMotor_lfac)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.lp"), &assign_LoadMotor_lp)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.lpp"), &assign_LoadMotor_lpp)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.ls"), &assign_LoadMotor_ls)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.pfrac"), &assign_LoadMotor_pfrac)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.ra"), &assign_LoadMotor_ra)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.tbkr"), &assign_LoadMotor_tbkr)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.tpo"), &assign_LoadMotor_tpo)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.tppo"), &assign_LoadMotor_tppo)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.tv"), &assign_LoadMotor_tv)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.vt"), &assign_LoadMotor_vt)); + assign_map.emplace("cim:LoadMotor.d", &assign_LoadMotor_d); + assign_map.emplace("cim:LoadMotor.h", &assign_LoadMotor_h); + assign_map.emplace("cim:LoadMotor.lfac", &assign_LoadMotor_lfac); + assign_map.emplace("cim:LoadMotor.lp", &assign_LoadMotor_lp); + assign_map.emplace("cim:LoadMotor.lpp", &assign_LoadMotor_lpp); + assign_map.emplace("cim:LoadMotor.ls", &assign_LoadMotor_ls); + assign_map.emplace("cim:LoadMotor.pfrac", &assign_LoadMotor_pfrac); + assign_map.emplace("cim:LoadMotor.ra", &assign_LoadMotor_ra); + assign_map.emplace("cim:LoadMotor.tbkr", &assign_LoadMotor_tbkr); + assign_map.emplace("cim:LoadMotor.tpo", &assign_LoadMotor_tpo); + assign_map.emplace("cim:LoadMotor.tppo", &assign_LoadMotor_tppo); + assign_map.emplace("cim:LoadMotor.tv", &assign_LoadMotor_tv); + assign_map.emplace("cim:LoadMotor.vt", &assign_LoadMotor_vt); } void LoadMotor::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.LoadAggregate"), &assign_LoadMotor_LoadAggregate)); + assign_map.emplace("cim:LoadMotor.LoadAggregate", &assign_LoadMotor_LoadAggregate); } void LoadMotor::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/LoadMotor.hpp b/CGMES_2.4.15_27JAN2020/LoadMotor.hpp index 5501f3611..66ad36cff 100644 --- a/CGMES_2.4.15_27JAN2020/LoadMotor.hpp +++ b/CGMES_2.4.15_27JAN2020/LoadMotor.hpp @@ -20,9 +20,7 @@ namespace CIMPP { class LoadAggregate; - /* - Aggregate induction motor load. This model is used to represent a fraction of an ordinary load as "induction motor load". It allows load that is treated as ordinary constant power in power flow analysis to be represented by an induction motor in dynamic simulation. If = 0. or = , or = 0., only one cage is represented. Magnetic saturation is not modelled. Either a "one-cage" or "two-cage" model of the induction machine can be modelled. Magnetic saturation is not modelled. This model is intended for representation of aggregations of many motors dispersed through a load represented at a high voltage bus but where there is no information on the characteristics of individual motors. This model treats a fraction of the constant power part of a load as a motor. During initialisation, the initial power drawn by the motor is set equal to times the constant part of the static load. The remainder of the load is left as static load. The reactive power demand of the motor is calculated during initialisation as a function of voltage at the load bus. This reactive power demand may be less than or greater than the constant component of the load. If the motor's reactive demand is greater than the constant component of the load, the model inserts a shunt capacitor at the terminal of the motor to bring its reactive demand down to equal the constant reactive load. If a motor model and a static load model are both present for a load, the motor is assumed to be subtracted from the power flow constant load before the static load model is applied. The remainder of the load, if any, is then represented by the static load model. - */ + /** \brief Aggregate induction motor load. This model is used to represent a fraction of an ordinary load as "induction motor load". It allows load that is treated as ordinary constant power in power flow analysis to be represented by an induction motor in dynamic simulation. If = 0. or = , or = 0., only one cage is represented. Magnetic saturation is not modelled. Either a "one-cage" or "two-cage" model of the induction machine can be modelled. Magnetic saturation is not modelled. This model is intended for representation of aggregations of many motors dispersed through a load represented at a high voltage bus but where there is no information on the characteristics of individual motors. This model treats a fraction of the constant power part of a load as a motor. During initialisation, the initial power drawn by the motor is set equal to times the constant part of the static load. The remainder of the load is left as static load. The reactive power demand of the motor is calculated during initialisation as a function of voltage at the load bus. This reactive power demand may be less than or greater than the constant component of the load. If the motor's reactive demand is greater than the constant component of the load, the model inserts a shunt capacitor at the terminal of the motor to bring its reactive demand down to equal the constant reactive load. If a motor model and a static load model are both present for a load, the motor is assumed to be subtracted from the power flow constant load before the static load model is applied. The remainder of the load, if any, is then represented by the static load model. */ class LoadMotor : public IdentifiedObject { public: @@ -30,20 +28,47 @@ namespace CIMPP LoadMotor(); ~LoadMotor() override; - CIMPP::LoadAggregate* LoadAggregate; /* Aggregate load to which this aggregate motor (dynamic) load belongs. Default: 0 */ - CIMPP::Simple_Float d; /* Damping factor (D). Unit = delta P/delta speed. Typical Value = 2. Default: nullptr */ - CIMPP::Seconds h; /* Inertia constant (H) (not=0). Typical Value = 0.4. Default: nullptr */ - CIMPP::Simple_Float lfac; /* Loading factor - ratio of initial P to motor MVA base (Lfac). Typical Value = 0.8. Default: nullptr */ - CIMPP::PU lp; /* Transient reactance (Lp). Typical Value = 0.15. Default: nullptr */ - CIMPP::PU lpp; /* Subtransient reactance (Lpp). Typical Value = 0.15. Default: nullptr */ - CIMPP::PU ls; /* Synchronous reactance (Ls). Typical Value = 3.2. Default: nullptr */ - CIMPP::Simple_Float pfrac; /* Fraction of constant-power load to be represented by this motor model (Pfrac) (>=0.0 and <=1.0). Typical Value = 0.3. Default: nullptr */ - CIMPP::PU ra; /* Stator resistance (Ra). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tbkr; /* Circuit breaker operating time (Tbkr). Typical Value = 0.08. Default: nullptr */ - CIMPP::Seconds tpo; /* Transient rotor time constant (Tpo) (not=0). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds tppo; /* Subtransient rotor time constant (Tppo). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds tv; /* Voltage trip pickup time (Tv). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU vt; /* Voltage threshold for tripping (Vt). Typical Value = 0.7. Default: nullptr */ + /** \brief Aggregate load to which this aggregate motor (dynamic) load belongs. Default: 0 */ + CIMPP::LoadAggregate* LoadAggregate; + + /** \brief Damping factor (D). Unit = delta P/delta speed. Typical Value = 2. Default: nullptr */ + CIMPP::Simple_Float d; + + /** \brief Inertia constant (H) (not=0). Typical Value = 0.4. Default: nullptr */ + CIMPP::Seconds h; + + /** \brief Loading factor - ratio of initial P to motor MVA base (Lfac). Typical Value = 0.8. Default: nullptr */ + CIMPP::Simple_Float lfac; + + /** \brief Transient reactance (Lp). Typical Value = 0.15. Default: nullptr */ + CIMPP::PU lp; + + /** \brief Subtransient reactance (Lpp). Typical Value = 0.15. Default: nullptr */ + CIMPP::PU lpp; + + /** \brief Synchronous reactance (Ls). Typical Value = 3.2. Default: nullptr */ + CIMPP::PU ls; + + /** \brief Fraction of constant-power load to be represented by this motor model (Pfrac) (>=0.0 and <=1.0). Typical Value = 0.3. Default: nullptr */ + CIMPP::Simple_Float pfrac; + + /** \brief Stator resistance (Ra). Typical Value = 0. Default: nullptr */ + CIMPP::PU ra; + + /** \brief Circuit breaker operating time (Tbkr). Typical Value = 0.08. Default: nullptr */ + CIMPP::Seconds tbkr; + + /** \brief Transient rotor time constant (Tpo) (not=0). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds tpo; + + /** \brief Subtransient rotor time constant (Tppo). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds tppo; + + /** \brief Voltage trip pickup time (Tv). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds tv; + + /** \brief Voltage threshold for tripping (Vt). Typical Value = 0.7. Default: nullptr */ + CIMPP::PU vt; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/LoadResponseCharacteristic.cpp b/CGMES_2.4.15_27JAN2020/LoadResponseCharacteristic.cpp index 8bacbbe22..f4c2368ce 100644 --- a/CGMES_2.4.15_27JAN2020/LoadResponseCharacteristic.cpp +++ b/CGMES_2.4.15_27JAN2020/LoadResponseCharacteristic.cpp @@ -9,22 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "EnergyConsumer.hpp" -#include "Boolean.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -LoadResponseCharacteristic::LoadResponseCharacteristic() {}; -LoadResponseCharacteristic::~LoadResponseCharacteristic() {}; +LoadResponseCharacteristic::LoadResponseCharacteristic() {} +LoadResponseCharacteristic::~LoadResponseCharacteristic() {} static const std::list PossibleProfilesForClass = { @@ -62,171 +51,182 @@ LoadResponseCharacteristic::getPossibleProfilesForAttributes() const return map; } +bool assign_EnergyConsumer_LoadResponse(BaseClass*, BaseClass*); +bool assign_LoadResponseCharacteristic_EnergyConsumer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + EnergyConsumer* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->EnergyConsumer.begin(), element->EnergyConsumer.end(), element2) == element->EnergyConsumer.end()) + { + element->EnergyConsumer.push_back(element2); + return assign_EnergyConsumer_LoadResponse(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_LoadResponseCharacteristic_exponentModel(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_exponentModel(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exponentModel; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadResponseCharacteristic_pConstantCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_pConstantCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pConstantCurrent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadResponseCharacteristic_pConstantImpedance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_pConstantImpedance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pConstantImpedance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadResponseCharacteristic_pConstantPower(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_pConstantPower(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pConstantPower; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadResponseCharacteristic_pFrequencyExponent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_pFrequencyExponent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pFrequencyExponent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadResponseCharacteristic_pVoltageExponent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_pVoltageExponent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pVoltageExponent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadResponseCharacteristic_qConstantCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_qConstantCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qConstantCurrent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadResponseCharacteristic_qConstantImpedance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_qConstantImpedance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qConstantImpedance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadResponseCharacteristic_qConstantPower(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_qConstantPower(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qConstantPower; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadResponseCharacteristic_qFrequencyExponent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_qFrequencyExponent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qFrequencyExponent; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_LoadResponseCharacteristic_qVoltageExponent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->qVoltageExponent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_EnergyConsumer_LoadResponse(BaseClass*, BaseClass*); -bool assign_LoadResponseCharacteristic_EnergyConsumer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_LoadResponseCharacteristic_qVoltageExponent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); - EnergyConsumer* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->EnergyConsumer.begin(), element->EnergyConsumer.end(), element2) == element->EnergyConsumer.end()) + buffer >> element->qVoltageExponent; + if (!buffer.fail()) { - element->EnergyConsumer.push_back(element2); - return assign_EnergyConsumer_LoadResponse(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_LoadResponseCharacteristic_exponentModel(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exponentModel; if (!buffer.str().empty()) @@ -240,7 +240,8 @@ bool get_LoadResponseCharacteristic_exponentModel(const BaseClass* BaseClass_ptr bool get_LoadResponseCharacteristic_pConstantCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pConstantCurrent; if (!buffer.str().empty()) @@ -254,7 +255,8 @@ bool get_LoadResponseCharacteristic_pConstantCurrent(const BaseClass* BaseClass_ bool get_LoadResponseCharacteristic_pConstantImpedance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pConstantImpedance; if (!buffer.str().empty()) @@ -268,7 +270,8 @@ bool get_LoadResponseCharacteristic_pConstantImpedance(const BaseClass* BaseClas bool get_LoadResponseCharacteristic_pConstantPower(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pConstantPower; if (!buffer.str().empty()) @@ -282,7 +285,8 @@ bool get_LoadResponseCharacteristic_pConstantPower(const BaseClass* BaseClass_pt bool get_LoadResponseCharacteristic_pFrequencyExponent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pFrequencyExponent; if (!buffer.str().empty()) @@ -296,7 +300,8 @@ bool get_LoadResponseCharacteristic_pFrequencyExponent(const BaseClass* BaseClas bool get_LoadResponseCharacteristic_pVoltageExponent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pVoltageExponent; if (!buffer.str().empty()) @@ -310,7 +315,8 @@ bool get_LoadResponseCharacteristic_pVoltageExponent(const BaseClass* BaseClass_ bool get_LoadResponseCharacteristic_qConstantCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qConstantCurrent; if (!buffer.str().empty()) @@ -324,7 +330,8 @@ bool get_LoadResponseCharacteristic_qConstantCurrent(const BaseClass* BaseClass_ bool get_LoadResponseCharacteristic_qConstantImpedance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qConstantImpedance; if (!buffer.str().empty()) @@ -338,7 +345,8 @@ bool get_LoadResponseCharacteristic_qConstantImpedance(const BaseClass* BaseClas bool get_LoadResponseCharacteristic_qConstantPower(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qConstantPower; if (!buffer.str().empty()) @@ -352,7 +360,8 @@ bool get_LoadResponseCharacteristic_qConstantPower(const BaseClass* BaseClass_pt bool get_LoadResponseCharacteristic_qFrequencyExponent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qFrequencyExponent; if (!buffer.str().empty()) @@ -366,7 +375,8 @@ bool get_LoadResponseCharacteristic_qFrequencyExponent(const BaseClass* BaseClas bool get_LoadResponseCharacteristic_qVoltageExponent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qVoltageExponent; if (!buffer.str().empty()) @@ -378,8 +388,6 @@ bool get_LoadResponseCharacteristic_qVoltageExponent(const BaseClass* BaseClass_ return false; } - - const char LoadResponseCharacteristic::debugName[] = "LoadResponseCharacteristic"; const char* LoadResponseCharacteristic::debugString() const { @@ -388,27 +396,27 @@ const char* LoadResponseCharacteristic::debugString() const void LoadResponseCharacteristic::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic"), &LoadResponseCharacteristic_factory)); + factory_map.emplace("cim:LoadResponseCharacteristic", &LoadResponseCharacteristic_factory); } void LoadResponseCharacteristic::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.exponentModel"), &assign_LoadResponseCharacteristic_exponentModel)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.pConstantCurrent"), &assign_LoadResponseCharacteristic_pConstantCurrent)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.pConstantImpedance"), &assign_LoadResponseCharacteristic_pConstantImpedance)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.pConstantPower"), &assign_LoadResponseCharacteristic_pConstantPower)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.pFrequencyExponent"), &assign_LoadResponseCharacteristic_pFrequencyExponent)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.pVoltageExponent"), &assign_LoadResponseCharacteristic_pVoltageExponent)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.qConstantCurrent"), &assign_LoadResponseCharacteristic_qConstantCurrent)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.qConstantImpedance"), &assign_LoadResponseCharacteristic_qConstantImpedance)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.qConstantPower"), &assign_LoadResponseCharacteristic_qConstantPower)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.qFrequencyExponent"), &assign_LoadResponseCharacteristic_qFrequencyExponent)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.qVoltageExponent"), &assign_LoadResponseCharacteristic_qVoltageExponent)); + assign_map.emplace("cim:LoadResponseCharacteristic.exponentModel", &assign_LoadResponseCharacteristic_exponentModel); + assign_map.emplace("cim:LoadResponseCharacteristic.pConstantCurrent", &assign_LoadResponseCharacteristic_pConstantCurrent); + assign_map.emplace("cim:LoadResponseCharacteristic.pConstantImpedance", &assign_LoadResponseCharacteristic_pConstantImpedance); + assign_map.emplace("cim:LoadResponseCharacteristic.pConstantPower", &assign_LoadResponseCharacteristic_pConstantPower); + assign_map.emplace("cim:LoadResponseCharacteristic.pFrequencyExponent", &assign_LoadResponseCharacteristic_pFrequencyExponent); + assign_map.emplace("cim:LoadResponseCharacteristic.pVoltageExponent", &assign_LoadResponseCharacteristic_pVoltageExponent); + assign_map.emplace("cim:LoadResponseCharacteristic.qConstantCurrent", &assign_LoadResponseCharacteristic_qConstantCurrent); + assign_map.emplace("cim:LoadResponseCharacteristic.qConstantImpedance", &assign_LoadResponseCharacteristic_qConstantImpedance); + assign_map.emplace("cim:LoadResponseCharacteristic.qConstantPower", &assign_LoadResponseCharacteristic_qConstantPower); + assign_map.emplace("cim:LoadResponseCharacteristic.qFrequencyExponent", &assign_LoadResponseCharacteristic_qFrequencyExponent); + assign_map.emplace("cim:LoadResponseCharacteristic.qVoltageExponent", &assign_LoadResponseCharacteristic_qVoltageExponent); } void LoadResponseCharacteristic::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.EnergyConsumer"), &assign_LoadResponseCharacteristic_EnergyConsumer)); + assign_map.emplace("cim:LoadResponseCharacteristic.EnergyConsumer", &assign_LoadResponseCharacteristic_EnergyConsumer); } void LoadResponseCharacteristic::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/LoadResponseCharacteristic.hpp b/CGMES_2.4.15_27JAN2020/LoadResponseCharacteristic.hpp index f97b8dac4..48e1ab3ae 100644 --- a/CGMES_2.4.15_27JAN2020/LoadResponseCharacteristic.hpp +++ b/CGMES_2.4.15_27JAN2020/LoadResponseCharacteristic.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class EnergyConsumer; - /* - Models the characteristic response of the load demand due to changes in system conditions such as voltage and frequency. This is not related to demand response. If LoadResponseCharacteristic.exponentModel is True, the voltage exponents are specified and used as to calculate: Active power component = Pnominal * (Voltage/cim:BaseVoltage.nominalVoltage) ** cim:LoadResponseCharacteristic.pVoltageExponent Reactive power component = Qnominal * (Voltage/cim:BaseVoltage.nominalVoltage)** cim:LoadResponseCharacteristic.qVoltageExponent Where * means "multiply" and ** is "raised to power of". - */ + /** \brief Models the characteristic response of the load demand due to changes in system conditions such as voltage and frequency. This is not related to demand response. If LoadResponseCharacteristic.exponentModel is True, the voltage exponents are specified and used as to calculate: Active power component = Pnominal * (Voltage/cim:BaseVoltage.nominalVoltage) ** cim:LoadResponseCharacteristic.pVoltageExponent Reactive power component = Qnominal * (Voltage/cim:BaseVoltage.nominalVoltage)** cim:LoadResponseCharacteristic.qVoltageExponent Where * means "multiply" and ** is "raised to power of". */ class LoadResponseCharacteristic : public IdentifiedObject { public: @@ -29,18 +27,41 @@ namespace CIMPP LoadResponseCharacteristic(); ~LoadResponseCharacteristic() override; - std::list EnergyConsumer; /* The set of loads that have the response characteristics. Default: 0 */ - CIMPP::Boolean exponentModel; /* Indicates the exponential voltage dependency model is to be used. If false, the coefficient model is to be used. The exponential voltage dependency model consist of the attributes - pVoltageExponent - qVoltageExponent. The coefficient model consist of the attributes - pConstantImpedance - pConstantCurrent - pConstantPower - qConstantImpedance - qConstantCurrent - qConstantPower. The sum of pConstantImpedance, pConstantCurrent and pConstantPower shall equal 1. The sum of qConstantImpedance, qConstantCurrent and qConstantPower shall equal 1. Default: false */ - CIMPP::Simple_Float pConstantCurrent; /* Portion of active power load modeled as constant current. Default: nullptr */ - CIMPP::Simple_Float pConstantImpedance; /* Portion of active power load modeled as constant impedance. Default: nullptr */ - CIMPP::Simple_Float pConstantPower; /* Portion of active power load modeled as constant power. Default: nullptr */ - CIMPP::Simple_Float pFrequencyExponent; /* Exponent of per unit frequency effecting active power. Default: nullptr */ - CIMPP::Simple_Float pVoltageExponent; /* Exponent of per unit voltage effecting real power. Default: nullptr */ - CIMPP::Simple_Float qConstantCurrent; /* Portion of reactive power load modeled as constant current. Default: nullptr */ - CIMPP::Simple_Float qConstantImpedance; /* Portion of reactive power load modeled as constant impedance. Default: nullptr */ - CIMPP::Simple_Float qConstantPower; /* Portion of reactive power load modeled as constant power. Default: nullptr */ - CIMPP::Simple_Float qFrequencyExponent; /* Exponent of per unit frequency effecting reactive power. Default: nullptr */ - CIMPP::Simple_Float qVoltageExponent; /* Exponent of per unit voltage effecting reactive power. Default: nullptr */ + /** \brief The set of loads that have the response characteristics. Default: 0 */ + std::list EnergyConsumer; + + /** \brief Indicates the exponential voltage dependency model is to be used. If false, the coefficient model is to be used. The exponential voltage dependency model consist of the attributes - pVoltageExponent - qVoltageExponent. The coefficient model consist of the attributes - pConstantImpedance - pConstantCurrent - pConstantPower - qConstantImpedance - qConstantCurrent - qConstantPower. The sum of pConstantImpedance, pConstantCurrent and pConstantPower shall equal 1. The sum of qConstantImpedance, qConstantCurrent and qConstantPower shall equal 1. Default: false */ + CIMPP::Boolean exponentModel; + + /** \brief Portion of active power load modeled as constant current. Default: nullptr */ + CIMPP::Simple_Float pConstantCurrent; + + /** \brief Portion of active power load modeled as constant impedance. Default: nullptr */ + CIMPP::Simple_Float pConstantImpedance; + + /** \brief Portion of active power load modeled as constant power. Default: nullptr */ + CIMPP::Simple_Float pConstantPower; + + /** \brief Exponent of per unit frequency effecting active power. Default: nullptr */ + CIMPP::Simple_Float pFrequencyExponent; + + /** \brief Exponent of per unit voltage effecting real power. Default: nullptr */ + CIMPP::Simple_Float pVoltageExponent; + + /** \brief Portion of reactive power load modeled as constant current. Default: nullptr */ + CIMPP::Simple_Float qConstantCurrent; + + /** \brief Portion of reactive power load modeled as constant impedance. Default: nullptr */ + CIMPP::Simple_Float qConstantImpedance; + + /** \brief Portion of reactive power load modeled as constant power. Default: nullptr */ + CIMPP::Simple_Float qConstantPower; + + /** \brief Exponent of per unit frequency effecting reactive power. Default: nullptr */ + CIMPP::Simple_Float qFrequencyExponent; + + /** \brief Exponent of per unit voltage effecting reactive power. Default: nullptr */ + CIMPP::Simple_Float qVoltageExponent; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/LoadStatic.cpp b/CGMES_2.4.15_27JAN2020/LoadStatic.cpp index 929cd897f..1ae8c3ffb 100644 --- a/CGMES_2.4.15_27JAN2020/LoadStatic.cpp +++ b/CGMES_2.4.15_27JAN2020/LoadStatic.cpp @@ -9,28 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "LoadAggregate.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "StaticLoadModelKind.hpp" using namespace CIMPP; -LoadStatic::LoadStatic() : LoadAggregate(nullptr) {}; -LoadStatic::~LoadStatic() {}; +LoadStatic::LoadStatic() : LoadAggregate(nullptr) {} +LoadStatic::~LoadStatic() {} static const std::list PossibleProfilesForClass = { @@ -74,249 +57,279 @@ LoadStatic::getPossibleProfilesForAttributes() const return map; } +bool assign_LoadAggregate_LoadStatic(BaseClass*, BaseClass*); +bool assign_LoadStatic_LoadAggregate(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + LoadAggregate* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->LoadAggregate != element2) + { + element->LoadAggregate = element2; + return assign_LoadAggregate_LoadStatic(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_LoadStatic_ep1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_ep1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ep1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_ep2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_ep2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ep2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_ep3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_ep3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ep3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_eq1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_eq1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eq1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_eq2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_eq2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eq2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_eq3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_eq3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eq3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kp1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kp1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kp2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kp2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kp3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kp3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kp4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kp4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kpf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kpf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kq1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kq1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kq1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kq2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kq2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kq2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kq3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kq3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kq3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kq4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kq4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kq4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kqf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kqf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kqf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_staticLoadModelType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_staticLoadModelType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->staticLoadModelType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_LoadAggregate_LoadStatic(BaseClass*, BaseClass*); -bool assign_LoadStatic_LoadAggregate(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_LoadStatic_LoadAggregate(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - LoadStatic* element = dynamic_cast(BaseClass_ptr1); - LoadAggregate* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->LoadAggregate != element2) + if (element->LoadAggregate != 0) { - element->LoadAggregate = element2; - return assign_LoadAggregate_LoadStatic(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->LoadAggregate); + return true; } - return true; } return false; } bool get_LoadStatic_ep1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ep1; if (!buffer.str().empty()) @@ -330,7 +343,8 @@ bool get_LoadStatic_ep1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_ep2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ep2; if (!buffer.str().empty()) @@ -344,7 +358,8 @@ bool get_LoadStatic_ep2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_ep3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ep3; if (!buffer.str().empty()) @@ -358,7 +373,8 @@ bool get_LoadStatic_ep3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_eq1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eq1; if (!buffer.str().empty()) @@ -372,7 +388,8 @@ bool get_LoadStatic_eq1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_eq2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eq2; if (!buffer.str().empty()) @@ -386,7 +403,8 @@ bool get_LoadStatic_eq2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_eq3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eq3; if (!buffer.str().empty()) @@ -400,7 +418,8 @@ bool get_LoadStatic_eq3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kp1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp1; if (!buffer.str().empty()) @@ -414,7 +433,8 @@ bool get_LoadStatic_kp1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kp2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp2; if (!buffer.str().empty()) @@ -428,7 +448,8 @@ bool get_LoadStatic_kp2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kp3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp3; if (!buffer.str().empty()) @@ -442,7 +463,8 @@ bool get_LoadStatic_kp3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kp4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp4; if (!buffer.str().empty()) @@ -456,7 +478,8 @@ bool get_LoadStatic_kp4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kpf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpf; if (!buffer.str().empty()) @@ -470,7 +493,8 @@ bool get_LoadStatic_kpf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kq1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kq1; if (!buffer.str().empty()) @@ -484,7 +508,8 @@ bool get_LoadStatic_kq1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kq2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kq2; if (!buffer.str().empty()) @@ -498,7 +523,8 @@ bool get_LoadStatic_kq2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kq3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kq3; if (!buffer.str().empty()) @@ -512,7 +538,8 @@ bool get_LoadStatic_kq3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kq4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kq4; if (!buffer.str().empty()) @@ -526,7 +553,8 @@ bool get_LoadStatic_kq4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kqf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kqf; if (!buffer.str().empty()) @@ -538,24 +566,10 @@ bool get_LoadStatic_kqf(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - -bool get_LoadStatic_LoadAggregate(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->LoadAggregate != 0) - { - BaseClass_list.push_back(element->LoadAggregate); - return true; - } - } - return false; -} - - bool get_LoadStatic_staticLoadModelType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->staticLoadModelType; if (!buffer.str().empty()) @@ -575,33 +589,33 @@ const char* LoadStatic::debugString() const void LoadStatic::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadStatic"), &LoadStatic_factory)); + factory_map.emplace("cim:LoadStatic", &LoadStatic_factory); } void LoadStatic::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.ep1"), &assign_LoadStatic_ep1)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.ep2"), &assign_LoadStatic_ep2)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.ep3"), &assign_LoadStatic_ep3)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.eq1"), &assign_LoadStatic_eq1)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.eq2"), &assign_LoadStatic_eq2)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.eq3"), &assign_LoadStatic_eq3)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kp1"), &assign_LoadStatic_kp1)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kp2"), &assign_LoadStatic_kp2)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kp3"), &assign_LoadStatic_kp3)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kp4"), &assign_LoadStatic_kp4)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kpf"), &assign_LoadStatic_kpf)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kq1"), &assign_LoadStatic_kq1)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kq2"), &assign_LoadStatic_kq2)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kq3"), &assign_LoadStatic_kq3)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kq4"), &assign_LoadStatic_kq4)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kqf"), &assign_LoadStatic_kqf)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.staticLoadModelType"), &assign_LoadStatic_staticLoadModelType)); + assign_map.emplace("cim:LoadStatic.ep1", &assign_LoadStatic_ep1); + assign_map.emplace("cim:LoadStatic.ep2", &assign_LoadStatic_ep2); + assign_map.emplace("cim:LoadStatic.ep3", &assign_LoadStatic_ep3); + assign_map.emplace("cim:LoadStatic.eq1", &assign_LoadStatic_eq1); + assign_map.emplace("cim:LoadStatic.eq2", &assign_LoadStatic_eq2); + assign_map.emplace("cim:LoadStatic.eq3", &assign_LoadStatic_eq3); + assign_map.emplace("cim:LoadStatic.kp1", &assign_LoadStatic_kp1); + assign_map.emplace("cim:LoadStatic.kp2", &assign_LoadStatic_kp2); + assign_map.emplace("cim:LoadStatic.kp3", &assign_LoadStatic_kp3); + assign_map.emplace("cim:LoadStatic.kp4", &assign_LoadStatic_kp4); + assign_map.emplace("cim:LoadStatic.kpf", &assign_LoadStatic_kpf); + assign_map.emplace("cim:LoadStatic.kq1", &assign_LoadStatic_kq1); + assign_map.emplace("cim:LoadStatic.kq2", &assign_LoadStatic_kq2); + assign_map.emplace("cim:LoadStatic.kq3", &assign_LoadStatic_kq3); + assign_map.emplace("cim:LoadStatic.kq4", &assign_LoadStatic_kq4); + assign_map.emplace("cim:LoadStatic.kqf", &assign_LoadStatic_kqf); + assign_map.emplace("cim:LoadStatic.staticLoadModelType", &assign_LoadStatic_staticLoadModelType); } void LoadStatic::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.LoadAggregate"), &assign_LoadStatic_LoadAggregate)); + assign_map.emplace("cim:LoadStatic.LoadAggregate", &assign_LoadStatic_LoadAggregate); } void LoadStatic::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/LoadStatic.hpp b/CGMES_2.4.15_27JAN2020/LoadStatic.hpp index 58a50621a..7cea8b85f 100644 --- a/CGMES_2.4.15_27JAN2020/LoadStatic.hpp +++ b/CGMES_2.4.15_27JAN2020/LoadStatic.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class LoadAggregate; - /* - General static load model representing the sensitivity of the real and reactive power consumed by the load to the amplitude and frequency of the bus voltage. - */ + /** \brief General static load model representing the sensitivity of the real and reactive power consumed by the load to the amplitude and frequency of the bus voltage. */ class LoadStatic : public IdentifiedObject { public: @@ -29,24 +27,59 @@ namespace CIMPP LoadStatic(); ~LoadStatic() override; - CIMPP::LoadAggregate* LoadAggregate; /* Aggregate load to which this aggregate static load belongs. Default: 0 */ - CIMPP::Simple_Float ep1; /* First term voltage exponent for active power (Ep1). Used only when .staticLoadModelType = exponential. Default: nullptr */ - CIMPP::Simple_Float ep2; /* Second term voltage exponent for active power (Ep2). Used only when .staticLoadModelType = exponential. Default: nullptr */ - CIMPP::Simple_Float ep3; /* Third term voltage exponent for active power (Ep3). Used only when .staticLoadModelType = exponential. Default: nullptr */ - CIMPP::Simple_Float eq1; /* First term voltage exponent for reactive power (Eq1). Used only when .staticLoadModelType = exponential. Default: nullptr */ - CIMPP::Simple_Float eq2; /* Second term voltage exponent for reactive power (Eq2). Used only when .staticLoadModelType = exponential. Default: nullptr */ - CIMPP::Simple_Float eq3; /* Third term voltage exponent for reactive power (Eq3). Used only when .staticLoadModelType = exponential. Default: nullptr */ - CIMPP::Simple_Float kp1; /* First term voltage coefficient for active power (Kp1). Not used when .staticLoadModelType = constantZ. Default: nullptr */ - CIMPP::Simple_Float kp2; /* Second term voltage coefficient for active power (Kp2). Not used when .staticLoadModelType = constantZ. Default: nullptr */ - CIMPP::Simple_Float kp3; /* Third term voltage coefficient for active power (Kp3). Not used when .staticLoadModelType = constantZ. Default: nullptr */ - CIMPP::Simple_Float kp4; /* Frequency coefficient for active power (Kp4). Must be non-zero when .staticLoadModelType = ZIP2. Not used for all other values of .staticLoadModelType. Default: nullptr */ - CIMPP::Simple_Float kpf; /* Frequency deviation coefficient for active power (Kpf). Not used when .staticLoadModelType = constantZ. Default: nullptr */ - CIMPP::Simple_Float kq1; /* First term voltage coefficient for reactive power (Kq1). Not used when .staticLoadModelType = constantZ. Default: nullptr */ - CIMPP::Simple_Float kq2; /* Second term voltage coefficient for reactive power (Kq2). Not used when .staticLoadModelType = constantZ. Default: nullptr */ - CIMPP::Simple_Float kq3; /* Third term voltage coefficient for reactive power (Kq3). Not used when .staticLoadModelType = constantZ. Default: nullptr */ - CIMPP::Simple_Float kq4; /* Frequency coefficient for reactive power (Kq4). Must be non-zero when .staticLoadModelType = ZIP2. Not used for all other values of .staticLoadModelType. Default: nullptr */ - CIMPP::Simple_Float kqf; /* Frequency deviation coefficient for reactive power (Kqf). Not used when .staticLoadModelType = constantZ. Default: nullptr */ - CIMPP::StaticLoadModelKind staticLoadModelType; /* Type of static load model. Typical Value = constantZ. Default: 0 */ + /** \brief Aggregate load to which this aggregate static load belongs. Default: 0 */ + CIMPP::LoadAggregate* LoadAggregate; + + /** \brief First term voltage exponent for active power (Ep1). Used only when .staticLoadModelType = exponential. Default: nullptr */ + CIMPP::Simple_Float ep1; + + /** \brief Second term voltage exponent for active power (Ep2). Used only when .staticLoadModelType = exponential. Default: nullptr */ + CIMPP::Simple_Float ep2; + + /** \brief Third term voltage exponent for active power (Ep3). Used only when .staticLoadModelType = exponential. Default: nullptr */ + CIMPP::Simple_Float ep3; + + /** \brief First term voltage exponent for reactive power (Eq1). Used only when .staticLoadModelType = exponential. Default: nullptr */ + CIMPP::Simple_Float eq1; + + /** \brief Second term voltage exponent for reactive power (Eq2). Used only when .staticLoadModelType = exponential. Default: nullptr */ + CIMPP::Simple_Float eq2; + + /** \brief Third term voltage exponent for reactive power (Eq3). Used only when .staticLoadModelType = exponential. Default: nullptr */ + CIMPP::Simple_Float eq3; + + /** \brief First term voltage coefficient for active power (Kp1). Not used when .staticLoadModelType = constantZ. Default: nullptr */ + CIMPP::Simple_Float kp1; + + /** \brief Second term voltage coefficient for active power (Kp2). Not used when .staticLoadModelType = constantZ. Default: nullptr */ + CIMPP::Simple_Float kp2; + + /** \brief Third term voltage coefficient for active power (Kp3). Not used when .staticLoadModelType = constantZ. Default: nullptr */ + CIMPP::Simple_Float kp3; + + /** \brief Frequency coefficient for active power (Kp4). Must be non-zero when .staticLoadModelType = ZIP2. Not used for all other values of .staticLoadModelType. Default: nullptr */ + CIMPP::Simple_Float kp4; + + /** \brief Frequency deviation coefficient for active power (Kpf). Not used when .staticLoadModelType = constantZ. Default: nullptr */ + CIMPP::Simple_Float kpf; + + /** \brief First term voltage coefficient for reactive power (Kq1). Not used when .staticLoadModelType = constantZ. Default: nullptr */ + CIMPP::Simple_Float kq1; + + /** \brief Second term voltage coefficient for reactive power (Kq2). Not used when .staticLoadModelType = constantZ. Default: nullptr */ + CIMPP::Simple_Float kq2; + + /** \brief Third term voltage coefficient for reactive power (Kq3). Not used when .staticLoadModelType = constantZ. Default: nullptr */ + CIMPP::Simple_Float kq3; + + /** \brief Frequency coefficient for reactive power (Kq4). Must be non-zero when .staticLoadModelType = ZIP2. Not used for all other values of .staticLoadModelType. Default: nullptr */ + CIMPP::Simple_Float kq4; + + /** \brief Frequency deviation coefficient for reactive power (Kqf). Not used when .staticLoadModelType = constantZ. Default: nullptr */ + CIMPP::Simple_Float kqf; + + /** \brief Type of static load model. Typical Value = constantZ. Default: 0 */ + CIMPP::StaticLoadModelKind staticLoadModelType; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/LoadUserDefined.cpp b/CGMES_2.4.15_27JAN2020/LoadUserDefined.cpp index 976f5f8a4..ad0a491aa 100644 --- a/CGMES_2.4.15_27JAN2020/LoadUserDefined.cpp +++ b/CGMES_2.4.15_27JAN2020/LoadUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -LoadUserDefined::LoadUserDefined() {}; -LoadUserDefined::~LoadUserDefined() {}; +LoadUserDefined::LoadUserDefined() {} +LoadUserDefined::~LoadUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ LoadUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_LoadUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (LoadUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_LoadUserDefined(BaseClass*, BaseClass*); bool assign_LoadUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_LoadUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_pt return false; } +bool assign_LoadUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + LoadUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_LoadUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const LoadUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_LoadUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::strin return false; } - - const char LoadUserDefined::debugName[] = "LoadUserDefined"; const char* LoadUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* LoadUserDefined::debugString() const void LoadUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadUserDefined"), &LoadUserDefined_factory)); + factory_map.emplace("cim:LoadUserDefined", &LoadUserDefined_factory); } void LoadUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadUserDefined.proprietary"), &assign_LoadUserDefined_proprietary)); + assign_map.emplace("cim:LoadUserDefined.proprietary", &assign_LoadUserDefined_proprietary); } void LoadUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadUserDefined.ProprietaryParameterDynamics"), &assign_LoadUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:LoadUserDefined.ProprietaryParameterDynamics", &assign_LoadUserDefined_ProprietaryParameterDynamics); } void LoadUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/LoadUserDefined.hpp b/CGMES_2.4.15_27JAN2020/LoadUserDefined.hpp index 0c0faaf50..d9bea6707 100644 --- a/CGMES_2.4.15_27JAN2020/LoadUserDefined.hpp +++ b/CGMES_2.4.15_27JAN2020/LoadUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Load whose dynamic behaviour is described by a user-defined model. - */ + /** \brief Load whose dynamic behaviour is described by a user-defined model. */ class LoadUserDefined : public LoadDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP LoadUserDefined(); ~LoadUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Location.cpp b/CGMES_2.4.15_27JAN2020/Location.cpp index 7728072c8..d57fd2700 100644 --- a/CGMES_2.4.15_27JAN2020/Location.cpp +++ b/CGMES_2.4.15_27JAN2020/Location.cpp @@ -14,8 +14,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Location::Location() : CoordinateSystem(nullptr), PowerSystemResources(nullptr) {}; -Location::~Location() {}; +Location::Location() : CoordinateSystem(nullptr), PowerSystemResources(nullptr) {} +Location::~Location() {} static const std::list PossibleProfilesForClass = { @@ -44,8 +44,6 @@ Location::getPossibleProfilesForAttributes() const return map; } - - bool assign_CoordinateSystem_Location(BaseClass*, BaseClass*); bool assign_Location_CoordinateSystem(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -62,6 +60,7 @@ bool assign_Location_CoordinateSystem(BaseClass* BaseClass_ptr1, BaseClass* Base } return false; } + bool assign_PositionPoint_Location(BaseClass*, BaseClass*); bool assign_Location_PositionPoints(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -78,6 +77,7 @@ bool assign_Location_PositionPoints(BaseClass* BaseClass_ptr1, BaseClass* BaseCl } return false; } + bool assign_PowerSystemResource_Location(BaseClass*, BaseClass*); bool assign_Location_PowerSystemResources(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -95,10 +95,10 @@ bool assign_Location_PowerSystemResources(BaseClass* BaseClass_ptr1, BaseClass* return false; } - bool get_Location_CoordinateSystem(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Location* element = dynamic_cast(BaseClass_ptr1)) + const Location* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->CoordinateSystem != 0) { @@ -109,9 +109,11 @@ bool get_Location_CoordinateSystem(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Location* element = dynamic_cast(BaseClass_ptr1)) + const Location* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PowerSystemResources != 0) { @@ -122,7 +124,6 @@ bool get_Location_PowerSystemResources(const BaseClass* BaseClass_ptr1, std::lis return false; } - const char Location::debugName[] = "Location"; const char* Location::debugString() const { @@ -131,7 +132,7 @@ const char* Location::debugString() const void Location::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Location"), &Location_factory)); + factory_map.emplace("cim:Location", &Location_factory); } void Location::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -140,9 +141,9 @@ void Location::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Location.CoordinateSystem"), &assign_Location_CoordinateSystem)); - assign_map.insert(std::make_pair(std::string("cim:Location.PositionPoints"), &assign_Location_PositionPoints)); - assign_map.insert(std::make_pair(std::string("cim:Location.PowerSystemResources"), &assign_Location_PowerSystemResources)); + assign_map.emplace("cim:Location.CoordinateSystem", &assign_Location_CoordinateSystem); + assign_map.emplace("cim:Location.PositionPoints", &assign_Location_PositionPoints); + assign_map.emplace("cim:Location.PowerSystemResources", &assign_Location_PowerSystemResources); } void Location::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/Location.hpp b/CGMES_2.4.15_27JAN2020/Location.hpp index 9dbc8dcfb..4d10bdb15 100644 --- a/CGMES_2.4.15_27JAN2020/Location.hpp +++ b/CGMES_2.4.15_27JAN2020/Location.hpp @@ -19,9 +19,7 @@ namespace CIMPP class PositionPoint; class PowerSystemResource; - /* - The place, scene, or point of something where someone or something has been, is, and/or will be at a given moment in time. It can be defined with one or more postition points (coordinates) in a given coordinate system. - */ + /** \brief The place, scene, or point of something where someone or something has been, is, and/or will be at a given moment in time. It can be defined with one or more postition points (coordinates) in a given coordinate system. */ class Location : public IdentifiedObject { public: @@ -29,9 +27,14 @@ namespace CIMPP Location(); ~Location() override; - CIMPP::CoordinateSystem* CoordinateSystem; /* Coordinate system used to describe position points of this location. Default: 0 */ - std::list PositionPoints; /* Sequence of position points describing this location, expressed in coordinate system `Location.CoordinateSystem`. Default: 0 */ - CIMPP::PowerSystemResource* PowerSystemResources; /* All power system resources at this location. Default: 0 */ + /** \brief Coordinate system used to describe position points of this location. Default: 0 */ + CIMPP::CoordinateSystem* CoordinateSystem; + + /** \brief Sequence of position points describing this location, expressed in coordinate system `Location.CoordinateSystem`. Default: 0 */ + std::list PositionPoints; + + /** \brief All power system resources at this location. Default: 0 */ + CIMPP::PowerSystemResource* PowerSystemResources; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Measurement.cpp b/CGMES_2.4.15_27JAN2020/Measurement.cpp index 4d46ccab4..87a4ea88d 100644 --- a/CGMES_2.4.15_27JAN2020/Measurement.cpp +++ b/CGMES_2.4.15_27JAN2020/Measurement.cpp @@ -8,17 +8,13 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PowerSystemResource.hpp" #include "ACDCTerminal.hpp" -#include "String.hpp" -#include "PhaseCode.hpp" -#include "UnitMultiplier.hpp" -#include "UnitSymbol.hpp" +#include "PowerSystemResource.hpp" using namespace CIMPP; -Measurement::Measurement() : PowerSystemResource(nullptr), Terminal(nullptr) {}; -Measurement::~Measurement() {}; +Measurement::Measurement() : PowerSystemResource(nullptr), Terminal(nullptr) {} +Measurement::~Measurement() {} static const std::list PossibleProfilesForClass = { @@ -50,111 +46,100 @@ Measurement::getPossibleProfilesForAttributes() const return map; } - -bool assign_Measurement_measurementType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerSystemResource_Measurements(BaseClass*, BaseClass*); +bool assign_Measurement_PowerSystemResource(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (Measurement* element = dynamic_cast(BaseClass_ptr1)) + Measurement* element = dynamic_cast(BaseClass_ptr1); + PowerSystemResource* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - element->measurementType = buffer.str(); - if (buffer.fail()) - return false; - else - return true; + if (element->PowerSystemResource != element2) + { + element->PowerSystemResource = element2; + return assign_PowerSystemResource_Measurements(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_Measurement_phases(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCTerminal_Measurements(BaseClass*, BaseClass*); +bool assign_Measurement_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (Measurement* element = dynamic_cast(BaseClass_ptr1)) + Measurement* element = dynamic_cast(BaseClass_ptr1); + ACDCTerminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->phases; - if (buffer.fail()) - return false; - else - return true; + if (element->Terminal != element2) + { + element->Terminal = element2; + return assign_ACDCTerminal_Measurements(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_Measurement_unitMultiplier(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Measurement_measurementType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Measurement* element = dynamic_cast(BaseClass_ptr1)) + Measurement* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->unitMultiplier; - if (buffer.fail()) - return false; - else + element->measurementType = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Measurement_unitSymbol(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (Measurement* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->unitSymbol; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - -bool assign_PowerSystemResource_Measurements(BaseClass*, BaseClass*); -bool assign_Measurement_PowerSystemResource(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_Measurement_phases(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { Measurement* element = dynamic_cast(BaseClass_ptr1); - PowerSystemResource* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->PowerSystemResource != element2) + buffer >> element->phases; + if (!buffer.fail()) { - element->PowerSystemResource = element2; - return assign_PowerSystemResource_Measurements(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_ACDCTerminal_Measurements(BaseClass*, BaseClass*); -bool assign_Measurement_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_Measurement_unitMultiplier(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { Measurement* element = dynamic_cast(BaseClass_ptr1); - ACDCTerminal* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->Terminal != element2) + buffer >> element->unitMultiplier; + if (!buffer.fail()) { - element->Terminal = element2; - return assign_ACDCTerminal_Measurements(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool get_Measurement_measurementType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_Measurement_unitSymbol(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const Measurement* element = dynamic_cast(BaseClass_ptr1)) + Measurement* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->measurementType; - if (!buffer.str().empty()) + buffer >> element->unitSymbol; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_Measurement_PowerSystemResource(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Measurement* element = dynamic_cast(BaseClass_ptr1)) + const Measurement* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PowerSystemResource != 0) { @@ -167,7 +152,8 @@ bool get_Measurement_PowerSystemResource(const BaseClass* BaseClass_ptr1, std::l bool get_Measurement_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Measurement* element = dynamic_cast(BaseClass_ptr1)) + const Measurement* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Terminal != 0) { @@ -178,10 +164,25 @@ bool get_Measurement_Terminal(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->measurementType; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} bool get_Measurement_phases(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Measurement* element = dynamic_cast(BaseClass_ptr1)) + const Measurement* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->phases; if (!buffer.str().empty()) @@ -195,7 +196,8 @@ bool get_Measurement_phases(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_Measurement_unitMultiplier(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Measurement* element = dynamic_cast(BaseClass_ptr1)) + const Measurement* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->unitMultiplier; if (!buffer.str().empty()) @@ -209,7 +211,8 @@ bool get_Measurement_unitMultiplier(const BaseClass* BaseClass_ptr1, std::string bool get_Measurement_unitSymbol(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Measurement* element = dynamic_cast(BaseClass_ptr1)) + const Measurement* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->unitSymbol; if (!buffer.str().empty()) @@ -229,21 +232,21 @@ const char* Measurement::debugString() const void Measurement::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Measurement"), &Measurement_factory)); + factory_map.emplace("cim:Measurement", &Measurement_factory); } void Measurement::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Measurement.measurementType"), &assign_Measurement_measurementType)); - assign_map.insert(std::make_pair(std::string("cim:Measurement.phases"), &assign_Measurement_phases)); - assign_map.insert(std::make_pair(std::string("cim:Measurement.unitMultiplier"), &assign_Measurement_unitMultiplier)); - assign_map.insert(std::make_pair(std::string("cim:Measurement.unitSymbol"), &assign_Measurement_unitSymbol)); + assign_map.emplace("cim:Measurement.measurementType", &assign_Measurement_measurementType); + assign_map.emplace("cim:Measurement.phases", &assign_Measurement_phases); + assign_map.emplace("cim:Measurement.unitMultiplier", &assign_Measurement_unitMultiplier); + assign_map.emplace("cim:Measurement.unitSymbol", &assign_Measurement_unitSymbol); } void Measurement::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Measurement.PowerSystemResource"), &assign_Measurement_PowerSystemResource)); - assign_map.insert(std::make_pair(std::string("cim:Measurement.Terminal"), &assign_Measurement_Terminal)); + assign_map.emplace("cim:Measurement.PowerSystemResource", &assign_Measurement_PowerSystemResource); + assign_map.emplace("cim:Measurement.Terminal", &assign_Measurement_Terminal); } void Measurement::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/Measurement.hpp b/CGMES_2.4.15_27JAN2020/Measurement.hpp index 2d19ee4f7..60b15fbaf 100644 --- a/CGMES_2.4.15_27JAN2020/Measurement.hpp +++ b/CGMES_2.4.15_27JAN2020/Measurement.hpp @@ -22,9 +22,7 @@ namespace CIMPP class ACDCTerminal; class PowerSystemResource; - /* - A Measurement represents any measured, calculated or non-measured non-calculated quantity. Any piece of equipment may contain Measurements, e.g. a substation may have temperature measurements and door open indications, a transformer may have oil temperature and tank pressure measurements, a bay may contain a number of power flow measurements and a Breaker may contain a switch status measurement. The PSR - Measurement association is intended to capture this use of Measurement and is included in the naming hierarchy based on EquipmentContainer. The naming hierarchy typically has Measurements as leafs, e.g. Substation-VoltageLevel-Bay-Switch-Measurement. Some Measurements represent quantities related to a particular sensor location in the network, e.g. a voltage transformer (PT) at a busbar or a current transformer (CT) at the bar between a breaker and an isolator. The sensing position is not captured in the PSR - Measurement association. Instead it is captured by the Measurement - Terminal association that is used to define the sensing location in the network topology. The location is defined by the connection of the Terminal to ConductingEquipment. If both a Terminal and PSR are associated, and the PSR is of type ConductingEquipment, the associated Terminal should belong to that ConductingEquipment instance. When the sensor location is needed both Measurement-PSR and Measurement-Terminal are used. The Measurement-Terminal association is never used alone. - */ + /** \brief A Measurement represents any measured, calculated or non-measured non-calculated quantity. Any piece of equipment may contain Measurements, e.g. a substation may have temperature measurements and door open indications, a transformer may have oil temperature and tank pressure measurements, a bay may contain a number of power flow measurements and a Breaker may contain a switch status measurement. The PSR - Measurement association is intended to capture this use of Measurement and is included in the naming hierarchy based on EquipmentContainer. The naming hierarchy typically has Measurements as leafs, e.g. Substation-VoltageLevel-Bay-Switch-Measurement. Some Measurements represent quantities related to a particular sensor location in the network, e.g. a voltage transformer (PT) at a busbar or a current transformer (CT) at the bar between a breaker and an isolator. The sensing position is not captured in the PSR - Measurement association. Instead it is captured by the Measurement - Terminal association that is used to define the sensing location in the network topology. The location is defined by the connection of the Terminal to ConductingEquipment. If both a Terminal and PSR are associated, and the PSR is of type ConductingEquipment, the associated Terminal should belong to that ConductingEquipment instance. When the sensor location is needed both Measurement-PSR and Measurement-Terminal are used. The Measurement-Terminal association is never used alone. */ class Measurement : public IdentifiedObject { public: @@ -32,12 +30,23 @@ namespace CIMPP Measurement(); ~Measurement() override; - CIMPP::PowerSystemResource* PowerSystemResource; /* The measurements associated with this power system resource. Default: 0 */ - CIMPP::ACDCTerminal* Terminal; /* One or more measurements may be associated with a terminal in the network. Default: 0 */ - CIMPP::String measurementType; /* Specifies the type of measurement. For example, this specifies if the measurement represents an indoor temperature, outdoor temperature, bus voltage, line flow, etc. Default: '' */ - CIMPP::PhaseCode phases; /* Indicates to which phases the measurement applies and avoids the need to use `measurementType` to also encode phase information (which would explode the types). The phase information in Measurement, along with `measurementType` and `phases` uniquely defines a Measurement for a device, based on normal network phase. Their meaning will not change when the computed energizing phasing is changed due to jumpers or other reasons. If the attribute is missing three phases (ABC) shall be assumed. Default: 0 */ - CIMPP::UnitMultiplier unitMultiplier; /* The unit multiplier of the measured quantity. Default: 0 */ - CIMPP::UnitSymbol unitSymbol; /* The unit of measure of the measured quantity. Default: 0 */ + /** \brief The measurements associated with this power system resource. Default: 0 */ + CIMPP::PowerSystemResource* PowerSystemResource; + + /** \brief One or more measurements may be associated with a terminal in the network. Default: 0 */ + CIMPP::ACDCTerminal* Terminal; + + /** \brief Specifies the type of measurement. For example, this specifies if the measurement represents an indoor temperature, outdoor temperature, bus voltage, line flow, etc. Default: '' */ + CIMPP::String measurementType; + + /** \brief Indicates to which phases the measurement applies and avoids the need to use `measurementType` to also encode phase information (which would explode the types). The phase information in Measurement, along with `measurementType` and `phases` uniquely defines a Measurement for a device, based on normal network phase. Their meaning will not change when the computed energizing phasing is changed due to jumpers or other reasons. If the attribute is missing three phases (ABC) shall be assumed. Default: 0 */ + CIMPP::PhaseCode phases; + + /** \brief The unit multiplier of the measured quantity. Default: 0 */ + CIMPP::UnitMultiplier unitMultiplier; + + /** \brief The unit of measure of the measured quantity. Default: 0 */ + CIMPP::UnitSymbol unitSymbol; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/MeasurementValue.cpp b/CGMES_2.4.15_27JAN2020/MeasurementValue.cpp index e8f72157a..ed6bb5624 100644 --- a/CGMES_2.4.15_27JAN2020/MeasurementValue.cpp +++ b/CGMES_2.4.15_27JAN2020/MeasurementValue.cpp @@ -10,13 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "MeasurementValueQuality.hpp" #include "MeasurementValueSource.hpp" -#include "PerCent.hpp" -#include "DateTime.hpp" using namespace CIMPP; -MeasurementValue::MeasurementValue() : MeasurementValueQuality(nullptr), MeasurementValueSource(nullptr) {}; -MeasurementValue::~MeasurementValue() {}; +MeasurementValue::MeasurementValue() : MeasurementValueQuality(nullptr), MeasurementValueSource(nullptr) {} +MeasurementValue::~MeasurementValue() {} static const std::list PossibleProfilesForClass = { @@ -46,34 +44,6 @@ MeasurementValue::getPossibleProfilesForAttributes() const return map; } - -bool assign_MeasurementValue_sensorAccuracy(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (MeasurementValue* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->sensorAccuracy; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_MeasurementValue_timeStamp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (MeasurementValue* element = dynamic_cast(BaseClass_ptr1)) - { - element->timeStamp = buffer.str(); - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_MeasurementValueQuality_MeasurementValue(BaseClass*, BaseClass*); bool assign_MeasurementValue_MeasurementValueQuality(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -90,6 +60,7 @@ bool assign_MeasurementValue_MeasurementValueQuality(BaseClass* BaseClass_ptr1, } return false; } + bool assign_MeasurementValueSource_MeasurementValues(BaseClass*, BaseClass*); bool assign_MeasurementValue_MeasurementValueSource(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -107,38 +78,39 @@ bool assign_MeasurementValue_MeasurementValueSource(BaseClass* BaseClass_ptr1, B return false; } -bool get_MeasurementValue_sensorAccuracy(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_MeasurementValue_sensorAccuracy(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const MeasurementValue* element = dynamic_cast(BaseClass_ptr1)) + MeasurementValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->sensorAccuracy; - if (!buffer.str().empty()) + buffer >> element->sensorAccuracy; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_MeasurementValue_timeStamp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_MeasurementValue_timeStamp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const MeasurementValue* element = dynamic_cast(BaseClass_ptr1)) + MeasurementValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->timeStamp; - if (!buffer.str().empty()) + element->timeStamp = buffer.str(); + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } bool get_MeasurementValue_MeasurementValueSource(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const MeasurementValue* element = dynamic_cast(BaseClass_ptr1)) + const MeasurementValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->MeasurementValueSource != 0) { @@ -149,6 +121,35 @@ bool get_MeasurementValue_MeasurementValueSource(const BaseClass* BaseClass_ptr1 return false; } +bool get_MeasurementValue_sensorAccuracy(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const MeasurementValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->sensorAccuracy; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_MeasurementValue_timeStamp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const MeasurementValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->timeStamp; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char MeasurementValue::debugName[] = "MeasurementValue"; const char* MeasurementValue::debugString() const @@ -158,19 +159,19 @@ const char* MeasurementValue::debugString() const void MeasurementValue::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:MeasurementValue"), &MeasurementValue_factory)); + factory_map.emplace("cim:MeasurementValue", &MeasurementValue_factory); } void MeasurementValue::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MeasurementValue.sensorAccuracy"), &assign_MeasurementValue_sensorAccuracy)); - assign_map.insert(std::make_pair(std::string("cim:MeasurementValue.timeStamp"), &assign_MeasurementValue_timeStamp)); + assign_map.emplace("cim:MeasurementValue.sensorAccuracy", &assign_MeasurementValue_sensorAccuracy); + assign_map.emplace("cim:MeasurementValue.timeStamp", &assign_MeasurementValue_timeStamp); } void MeasurementValue::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MeasurementValue.MeasurementValueQuality"), &assign_MeasurementValue_MeasurementValueQuality)); - assign_map.insert(std::make_pair(std::string("cim:MeasurementValue.MeasurementValueSource"), &assign_MeasurementValue_MeasurementValueSource)); + assign_map.emplace("cim:MeasurementValue.MeasurementValueQuality", &assign_MeasurementValue_MeasurementValueQuality); + assign_map.emplace("cim:MeasurementValue.MeasurementValueSource", &assign_MeasurementValue_MeasurementValueSource); } void MeasurementValue::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/MeasurementValue.hpp b/CGMES_2.4.15_27JAN2020/MeasurementValue.hpp index 820a01378..5e4745ae7 100644 --- a/CGMES_2.4.15_27JAN2020/MeasurementValue.hpp +++ b/CGMES_2.4.15_27JAN2020/MeasurementValue.hpp @@ -20,9 +20,7 @@ namespace CIMPP class MeasurementValueQuality; class MeasurementValueSource; - /* - The current state for a measurement. A state value is an instance of a measurement from a specific source. Measurements can be associated with many state values, each representing a different source for the measurement. - */ + /** \brief The current state for a measurement. A state value is an instance of a measurement from a specific source. Measurements can be associated with many state values, each representing a different source for the measurement. */ class MeasurementValue : public IdentifiedObject { public: @@ -30,10 +28,17 @@ namespace CIMPP MeasurementValue(); ~MeasurementValue() override; - CIMPP::MeasurementValueQuality* MeasurementValueQuality; /* A MeasurementValue has a MeasurementValueQuality associated with it. Default: 0 */ - CIMPP::MeasurementValueSource* MeasurementValueSource; /* The MeasurementValues updated by the source. Default: 0 */ - CIMPP::PerCent sensorAccuracy; /* The limit, expressed as a percentage of the sensor maximum, that errors will not exceed when the sensor is used under reference conditions. Default: nullptr */ - CIMPP::DateTime timeStamp; /* The time when the value was last updated Default: '' */ + /** \brief A MeasurementValue has a MeasurementValueQuality associated with it. Default: 0 */ + CIMPP::MeasurementValueQuality* MeasurementValueQuality; + + /** \brief The MeasurementValues updated by the source. Default: 0 */ + CIMPP::MeasurementValueSource* MeasurementValueSource; + + /** \brief The limit, expressed as a percentage of the sensor maximum, that errors will not exceed when the sensor is used under reference conditions. Default: nullptr */ + CIMPP::PerCent sensorAccuracy; + + /** \brief The time when the value was last updated Default: '' */ + CIMPP::DateTime timeStamp; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/MeasurementValueQuality.cpp b/CGMES_2.4.15_27JAN2020/MeasurementValueQuality.cpp index 5bebd6fd7..2137766e7 100644 --- a/CGMES_2.4.15_27JAN2020/MeasurementValueQuality.cpp +++ b/CGMES_2.4.15_27JAN2020/MeasurementValueQuality.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -MeasurementValueQuality::MeasurementValueQuality() : MeasurementValue(nullptr) {}; -MeasurementValueQuality::~MeasurementValueQuality() {}; +MeasurementValueQuality::MeasurementValueQuality() : MeasurementValue(nullptr) {} +MeasurementValueQuality::~MeasurementValueQuality() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ MeasurementValueQuality::getPossibleProfilesForAttributes() const return map; } - - bool assign_MeasurementValue_MeasurementValueQuality(BaseClass*, BaseClass*); bool assign_MeasurementValueQuality_MeasurementValue(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_MeasurementValueQuality_MeasurementValue(BaseClass* BaseClass_ptr1, return false; } - bool get_MeasurementValueQuality_MeasurementValue(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const MeasurementValueQuality* element = dynamic_cast(BaseClass_ptr1)) + const MeasurementValueQuality* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->MeasurementValue != 0) { @@ -73,7 +71,6 @@ bool get_MeasurementValueQuality_MeasurementValue(const BaseClass* BaseClass_ptr return false; } - const char MeasurementValueQuality::debugName[] = "MeasurementValueQuality"; const char* MeasurementValueQuality::debugString() const { @@ -82,7 +79,7 @@ const char* MeasurementValueQuality::debugString() const void MeasurementValueQuality::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:MeasurementValueQuality"), &MeasurementValueQuality_factory)); + factory_map.emplace("cim:MeasurementValueQuality", &MeasurementValueQuality_factory); } void MeasurementValueQuality::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void MeasurementValueQuality::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MeasurementValueQuality.MeasurementValue"), &assign_MeasurementValueQuality_MeasurementValue)); + assign_map.emplace("cim:MeasurementValueQuality.MeasurementValue", &assign_MeasurementValueQuality_MeasurementValue); } void MeasurementValueQuality::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/MeasurementValueQuality.hpp b/CGMES_2.4.15_27JAN2020/MeasurementValueQuality.hpp index e4ee4d3db..bc0991186 100644 --- a/CGMES_2.4.15_27JAN2020/MeasurementValueQuality.hpp +++ b/CGMES_2.4.15_27JAN2020/MeasurementValueQuality.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class MeasurementValue; - /* - Measurement quality flags. Bits 0-10 are defined for substation automation in draft IEC 61850 part 7-3. Bits 11-15 are reserved for future expansion by that document. Bits 16-31 are reserved for EMS applications. - */ + /** \brief Measurement quality flags. Bits 0-10 are defined for substation automation in draft IEC 61850 part 7-3. Bits 11-15 are reserved for future expansion by that document. Bits 16-31 are reserved for EMS applications. */ class MeasurementValueQuality : public Quality61850 { public: @@ -27,7 +25,8 @@ namespace CIMPP MeasurementValueQuality(); ~MeasurementValueQuality() override; - CIMPP::MeasurementValue* MeasurementValue; /* A MeasurementValue has a MeasurementValueQuality associated with it. Default: 0 */ + /** \brief A MeasurementValue has a MeasurementValueQuality associated with it. Default: 0 */ + CIMPP::MeasurementValue* MeasurementValue; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/MeasurementValueSource.cpp b/CGMES_2.4.15_27JAN2020/MeasurementValueSource.cpp index ffb5a1545..b276344bf 100644 --- a/CGMES_2.4.15_27JAN2020/MeasurementValueSource.cpp +++ b/CGMES_2.4.15_27JAN2020/MeasurementValueSource.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -MeasurementValueSource::MeasurementValueSource() {}; -MeasurementValueSource::~MeasurementValueSource() {}; +MeasurementValueSource::MeasurementValueSource() {} +MeasurementValueSource::~MeasurementValueSource() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ MeasurementValueSource::getPossibleProfilesForAttributes() const return map; } - - bool assign_MeasurementValue_MeasurementValueSource(BaseClass*, BaseClass*); bool assign_MeasurementValueSource_MeasurementValues(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_MeasurementValueSource_MeasurementValues(BaseClass* BaseClass_ptr1, } - const char MeasurementValueSource::debugName[] = "MeasurementValueSource"; const char* MeasurementValueSource::debugString() const { @@ -69,7 +66,7 @@ const char* MeasurementValueSource::debugString() const void MeasurementValueSource::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:MeasurementValueSource"), &MeasurementValueSource_factory)); + factory_map.emplace("cim:MeasurementValueSource", &MeasurementValueSource_factory); } void MeasurementValueSource::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void MeasurementValueSource::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MeasurementValueSource.MeasurementValues"), &assign_MeasurementValueSource_MeasurementValues)); + assign_map.emplace("cim:MeasurementValueSource.MeasurementValues", &assign_MeasurementValueSource_MeasurementValues); } void MeasurementValueSource::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/MeasurementValueSource.hpp b/CGMES_2.4.15_27JAN2020/MeasurementValueSource.hpp index cbb8e256c..3411d326b 100644 --- a/CGMES_2.4.15_27JAN2020/MeasurementValueSource.hpp +++ b/CGMES_2.4.15_27JAN2020/MeasurementValueSource.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class MeasurementValue; - /* - MeasurementValueSource describes the alternative sources updating a MeasurementValue. User conventions for how to use the MeasurementValueSource attributes are described in the introduction to IEC 61970-301. - */ + /** \brief MeasurementValueSource describes the alternative sources updating a MeasurementValue. User conventions for how to use the MeasurementValueSource attributes are described in the introduction to IEC 61970-301. */ class MeasurementValueSource : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP MeasurementValueSource(); ~MeasurementValueSource() override; - std::list MeasurementValues; /* A reference to the type of source that updates the MeasurementValue, e.g. SCADA, CCLink, manual, etc. User conventions for the names of sources are contained in the introduction to IEC 61970-301. Default: 0 */ + /** \brief A reference to the type of source that updates the MeasurementValue, e.g. SCADA, CCLink, manual, etc. User conventions for the names of sources are contained in the introduction to IEC 61970-301. Default: 0 */ + std::list MeasurementValues; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/MechLoad1.cpp b/CGMES_2.4.15_27JAN2020/MechLoad1.cpp index 5aceb8f4b..7016b3c19 100644 --- a/CGMES_2.4.15_27JAN2020/MechLoad1.cpp +++ b/CGMES_2.4.15_27JAN2020/MechLoad1.cpp @@ -8,15 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -MechLoad1::MechLoad1() {}; -MechLoad1::~MechLoad1() {}; +MechLoad1::MechLoad1() {} +MechLoad1::~MechLoad1() {} static const std::list PossibleProfilesForClass = { @@ -46,64 +42,66 @@ MechLoad1::getPossibleProfilesForAttributes() const return map; } - -bool assign_MechLoad1_a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MechLoad1_a(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + MechLoad1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MechLoad1_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MechLoad1_b(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + MechLoad1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MechLoad1_d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MechLoad1_d(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + MechLoad1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->d; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MechLoad1_e(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MechLoad1_e(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + MechLoad1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_MechLoad1_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + const MechLoad1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a; if (!buffer.str().empty()) @@ -117,7 +115,8 @@ bool get_MechLoad1_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_MechLoad1_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + const MechLoad1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b; if (!buffer.str().empty()) @@ -131,7 +130,8 @@ bool get_MechLoad1_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_MechLoad1_d(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + const MechLoad1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->d; if (!buffer.str().empty()) @@ -145,7 +145,8 @@ bool get_MechLoad1_d(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_MechLoad1_e(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + const MechLoad1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e; if (!buffer.str().empty()) @@ -157,8 +158,6 @@ bool get_MechLoad1_e(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char MechLoad1::debugName[] = "MechLoad1"; const char* MechLoad1::debugString() const { @@ -167,15 +166,15 @@ const char* MechLoad1::debugString() const void MechLoad1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:MechLoad1"), &MechLoad1_factory)); + factory_map.emplace("cim:MechLoad1", &MechLoad1_factory); } void MechLoad1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MechLoad1.a"), &assign_MechLoad1_a)); - assign_map.insert(std::make_pair(std::string("cim:MechLoad1.b"), &assign_MechLoad1_b)); - assign_map.insert(std::make_pair(std::string("cim:MechLoad1.d"), &assign_MechLoad1_d)); - assign_map.insert(std::make_pair(std::string("cim:MechLoad1.e"), &assign_MechLoad1_e)); + assign_map.emplace("cim:MechLoad1.a", &assign_MechLoad1_a); + assign_map.emplace("cim:MechLoad1.b", &assign_MechLoad1_b); + assign_map.emplace("cim:MechLoad1.d", &assign_MechLoad1_d); + assign_map.emplace("cim:MechLoad1.e", &assign_MechLoad1_e); } void MechLoad1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/MechLoad1.hpp b/CGMES_2.4.15_27JAN2020/MechLoad1.hpp index 5fb5620bd..9b16f17c2 100644 --- a/CGMES_2.4.15_27JAN2020/MechLoad1.hpp +++ b/CGMES_2.4.15_27JAN2020/MechLoad1.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Mechanical load model type 1. - */ + /** \brief Mechanical load model type 1. */ class MechLoad1 : public MechanicalLoadDynamics { public: @@ -27,10 +25,17 @@ namespace CIMPP MechLoad1(); ~MechLoad1() override; - CIMPP::Simple_Float a; /* Speed squared coefficient (a). Default: nullptr */ - CIMPP::Simple_Float b; /* Speed coefficient (b). Default: nullptr */ - CIMPP::Simple_Float d; /* Speed to the exponent coefficient (d). Default: nullptr */ - CIMPP::Simple_Float e; /* Exponent (e). Default: nullptr */ + /** \brief Speed squared coefficient (a). Default: nullptr */ + CIMPP::Simple_Float a; + + /** \brief Speed coefficient (b). Default: nullptr */ + CIMPP::Simple_Float b; + + /** \brief Speed to the exponent coefficient (d). Default: nullptr */ + CIMPP::Simple_Float d; + + /** \brief Exponent (e). Default: nullptr */ + CIMPP::Simple_Float e; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/MechanicalLoadDynamics.cpp b/CGMES_2.4.15_27JAN2020/MechanicalLoadDynamics.cpp index 2235d8b48..dc44cac2d 100644 --- a/CGMES_2.4.15_27JAN2020/MechanicalLoadDynamics.cpp +++ b/CGMES_2.4.15_27JAN2020/MechanicalLoadDynamics.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -MechanicalLoadDynamics::MechanicalLoadDynamics() : AsynchronousMachineDynamics(nullptr), SynchronousMachineDynamics(nullptr) {}; -MechanicalLoadDynamics::~MechanicalLoadDynamics() {}; +MechanicalLoadDynamics::MechanicalLoadDynamics() : AsynchronousMachineDynamics(nullptr), SynchronousMachineDynamics(nullptr) {} +MechanicalLoadDynamics::~MechanicalLoadDynamics() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ MechanicalLoadDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_AsynchronousMachineDynamics_MechanicalLoadDynamics(BaseClass*, BaseClass*); bool assign_MechanicalLoadDynamics_AsynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_MechanicalLoadDynamics_AsynchronousMachineDynamics(BaseClass* BaseCl } return false; } + bool assign_SynchronousMachineDynamics_MechanicalLoadDynamics(BaseClass*, BaseClass*); bool assign_MechanicalLoadDynamics_SynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_MechanicalLoadDynamics_SynchronousMachineDynamics(BaseClass* BaseCla return false; } - bool get_MechanicalLoadDynamics_AsynchronousMachineDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const MechanicalLoadDynamics* element = dynamic_cast(BaseClass_ptr1)) + const MechanicalLoadDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->AsynchronousMachineDynamics != 0) { @@ -93,7 +92,8 @@ bool get_MechanicalLoadDynamics_AsynchronousMachineDynamics(const BaseClass* Bas bool get_MechanicalLoadDynamics_SynchronousMachineDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const MechanicalLoadDynamics* element = dynamic_cast(BaseClass_ptr1)) + const MechanicalLoadDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->SynchronousMachineDynamics != 0) { @@ -104,7 +104,6 @@ bool get_MechanicalLoadDynamics_SynchronousMachineDynamics(const BaseClass* Base return false; } - const char MechanicalLoadDynamics::debugName[] = "MechanicalLoadDynamics"; const char* MechanicalLoadDynamics::debugString() const { @@ -113,7 +112,7 @@ const char* MechanicalLoadDynamics::debugString() const void MechanicalLoadDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:MechanicalLoadDynamics"), &MechanicalLoadDynamics_factory)); + factory_map.emplace("cim:MechanicalLoadDynamics", &MechanicalLoadDynamics_factory); } void MechanicalLoadDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void MechanicalLoadDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MechanicalLoadDynamics.AsynchronousMachineDynamics"), &assign_MechanicalLoadDynamics_AsynchronousMachineDynamics)); - assign_map.insert(std::make_pair(std::string("cim:MechanicalLoadDynamics.SynchronousMachineDynamics"), &assign_MechanicalLoadDynamics_SynchronousMachineDynamics)); + assign_map.emplace("cim:MechanicalLoadDynamics.AsynchronousMachineDynamics", &assign_MechanicalLoadDynamics_AsynchronousMachineDynamics); + assign_map.emplace("cim:MechanicalLoadDynamics.SynchronousMachineDynamics", &assign_MechanicalLoadDynamics_SynchronousMachineDynamics); } void MechanicalLoadDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/MechanicalLoadDynamics.hpp b/CGMES_2.4.15_27JAN2020/MechanicalLoadDynamics.hpp index 58676855b..57b474f87 100644 --- a/CGMES_2.4.15_27JAN2020/MechanicalLoadDynamics.hpp +++ b/CGMES_2.4.15_27JAN2020/MechanicalLoadDynamics.hpp @@ -18,9 +18,7 @@ namespace CIMPP class AsynchronousMachineDynamics; class SynchronousMachineDynamics; - /* - Mechanical load function block whose behavior is described by reference to a standard model - */ + /** \brief Mechanical load function block whose behavior is described by reference to a standard model */ class MechanicalLoadDynamics : public DynamicsFunctionBlock { public: @@ -28,8 +26,11 @@ namespace CIMPP MechanicalLoadDynamics(); ~MechanicalLoadDynamics() override; - CIMPP::AsynchronousMachineDynamics* AsynchronousMachineDynamics; /* Asynchronous machine model with which this mechanical load model is associated. Default: 0 */ - CIMPP::SynchronousMachineDynamics* SynchronousMachineDynamics; /* Synchronous machine model with which this mechanical load model is associated. Default: 0 */ + /** \brief Asynchronous machine model with which this mechanical load model is associated. Default: 0 */ + CIMPP::AsynchronousMachineDynamics* AsynchronousMachineDynamics; + + /** \brief Synchronous machine model with which this mechanical load model is associated. Default: 0 */ + CIMPP::SynchronousMachineDynamics* SynchronousMachineDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/MechanicalLoadUserDefined.cpp b/CGMES_2.4.15_27JAN2020/MechanicalLoadUserDefined.cpp index e750697ad..0fcdb6dee 100644 --- a/CGMES_2.4.15_27JAN2020/MechanicalLoadUserDefined.cpp +++ b/CGMES_2.4.15_27JAN2020/MechanicalLoadUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -MechanicalLoadUserDefined::MechanicalLoadUserDefined() {}; -MechanicalLoadUserDefined::~MechanicalLoadUserDefined() {}; +MechanicalLoadUserDefined::MechanicalLoadUserDefined() {} +MechanicalLoadUserDefined::~MechanicalLoadUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ MechanicalLoadUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_MechanicalLoadUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (MechanicalLoadUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_MechanicalLoadUserDefined(BaseClass*, BaseClass*); bool assign_MechanicalLoadUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_MechanicalLoadUserDefined_ProprietaryParameterDynamics(BaseClass* Ba return false; } +bool assign_MechanicalLoadUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + MechanicalLoadUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_MechanicalLoadUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MechanicalLoadUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const MechanicalLoadUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_MechanicalLoadUserDefined_proprietary(const BaseClass* BaseClass_ptr1, return false; } - - const char MechanicalLoadUserDefined::debugName[] = "MechanicalLoadUserDefined"; const char* MechanicalLoadUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* MechanicalLoadUserDefined::debugString() const void MechanicalLoadUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:MechanicalLoadUserDefined"), &MechanicalLoadUserDefined_factory)); + factory_map.emplace("cim:MechanicalLoadUserDefined", &MechanicalLoadUserDefined_factory); } void MechanicalLoadUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MechanicalLoadUserDefined.proprietary"), &assign_MechanicalLoadUserDefined_proprietary)); + assign_map.emplace("cim:MechanicalLoadUserDefined.proprietary", &assign_MechanicalLoadUserDefined_proprietary); } void MechanicalLoadUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MechanicalLoadUserDefined.ProprietaryParameterDynamics"), &assign_MechanicalLoadUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:MechanicalLoadUserDefined.ProprietaryParameterDynamics", &assign_MechanicalLoadUserDefined_ProprietaryParameterDynamics); } void MechanicalLoadUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/MechanicalLoadUserDefined.hpp b/CGMES_2.4.15_27JAN2020/MechanicalLoadUserDefined.hpp index d48634cbc..474c01c3d 100644 --- a/CGMES_2.4.15_27JAN2020/MechanicalLoadUserDefined.hpp +++ b/CGMES_2.4.15_27JAN2020/MechanicalLoadUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Mechanical load function block whose dynamic behaviour is described by - */ + /** \brief Mechanical load function block whose dynamic behaviour is described by */ class MechanicalLoadUserDefined : public MechanicalLoadDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP MechanicalLoadUserDefined(); ~MechanicalLoadUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Money.hpp b/CGMES_2.4.15_27JAN2020/Money.hpp index b6c47f743..5a75488fd 100644 --- a/CGMES_2.4.15_27JAN2020/Money.hpp +++ b/CGMES_2.4.15_27JAN2020/Money.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Amount of money. - */ + /** \brief Amount of money. */ class Money { public: diff --git a/CGMES_2.4.15_27JAN2020/MonthDay.hpp b/CGMES_2.4.15_27JAN2020/MonthDay.hpp index 1669168fe..ae83a209f 100644 --- a/CGMES_2.4.15_27JAN2020/MonthDay.hpp +++ b/CGMES_2.4.15_27JAN2020/MonthDay.hpp @@ -4,22 +4,20 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen */ -#include #include #include +#include namespace CIMPP { - /* - MonthDay format as "--mm-dd", which conforms with XSD data type gMonthDay. - */ + /** \brief MonthDay format as "--mm-dd", which conforms with XSD data type gMonthDay. */ class MonthDay { public: MonthDay() : initialized(false) {} MonthDay(const std::string& value) : value(value), initialized(true) {} - MonthDay& operator=(const std::string &rop); + MonthDay& operator=(const std::string& rop); operator std::string() const; std::string value; diff --git a/CGMES_2.4.15_27JAN2020/MutualCoupling.cpp b/CGMES_2.4.15_27JAN2020/MutualCoupling.cpp index bbd4b5962..0b97f5f70 100644 --- a/CGMES_2.4.15_27JAN2020/MutualCoupling.cpp +++ b/CGMES_2.4.15_27JAN2020/MutualCoupling.cpp @@ -9,20 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "Terminal.hpp" -#include "Terminal.hpp" -#include "Susceptance.hpp" -#include "Length.hpp" -#include "Length.hpp" -#include "Length.hpp" -#include "Length.hpp" -#include "Conductance.hpp" -#include "Resistance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -MutualCoupling::MutualCoupling() : First_Terminal(nullptr), Second_Terminal(nullptr) {}; -MutualCoupling::~MutualCoupling() {}; +MutualCoupling::MutualCoupling() : First_Terminal(nullptr), Second_Terminal(nullptr) {} +MutualCoupling::~MutualCoupling() {} static const std::list PossibleProfilesForClass = { @@ -58,148 +49,184 @@ MutualCoupling::getPossibleProfilesForAttributes() const return map; } +bool assign_Terminal_HasFirstMutualCoupling(BaseClass*, BaseClass*); +bool assign_MutualCoupling_First_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->First_Terminal != element2) + { + element->First_Terminal = element2; + return assign_Terminal_HasFirstMutualCoupling(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Terminal_HasSecondMutualCoupling(BaseClass*, BaseClass*); +bool assign_MutualCoupling_Second_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Second_Terminal != element2) + { + element->Second_Terminal = element2; + return assign_Terminal_HasSecondMutualCoupling(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_MutualCoupling_b0ch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MutualCoupling_b0ch(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b0ch; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MutualCoupling_distance11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MutualCoupling_distance11(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->distance11; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MutualCoupling_distance12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MutualCoupling_distance12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->distance12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MutualCoupling_distance21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MutualCoupling_distance21(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->distance21; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MutualCoupling_distance22(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MutualCoupling_distance22(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->distance22; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MutualCoupling_g0ch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MutualCoupling_g0ch(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g0ch; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MutualCoupling_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MutualCoupling_r0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MutualCoupling_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MutualCoupling_x0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_Terminal_HasFirstMutualCoupling(BaseClass*, BaseClass*); -bool assign_MutualCoupling_First_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_MutualCoupling_First_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - MutualCoupling* element = dynamic_cast(BaseClass_ptr1); - Terminal* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->First_Terminal != element2) + if (element->First_Terminal != 0) { - element->First_Terminal = element2; - return assign_Terminal_HasFirstMutualCoupling(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->First_Terminal); + return true; } - return true; } return false; } -bool assign_Terminal_HasSecondMutualCoupling(BaseClass*, BaseClass*); -bool assign_MutualCoupling_Second_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool get_MutualCoupling_Second_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - MutualCoupling* element = dynamic_cast(BaseClass_ptr1); - Terminal* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->Second_Terminal != element2) + if (element->Second_Terminal != 0) { - element->Second_Terminal = element2; - return assign_Terminal_HasSecondMutualCoupling(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->Second_Terminal); + return true; } - return true; } return false; } bool get_MutualCoupling_b0ch(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b0ch; if (!buffer.str().empty()) @@ -213,7 +240,8 @@ bool get_MutualCoupling_b0ch(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_MutualCoupling_distance11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->distance11; if (!buffer.str().empty()) @@ -227,7 +255,8 @@ bool get_MutualCoupling_distance11(const BaseClass* BaseClass_ptr1, std::strings bool get_MutualCoupling_distance12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->distance12; if (!buffer.str().empty()) @@ -241,7 +270,8 @@ bool get_MutualCoupling_distance12(const BaseClass* BaseClass_ptr1, std::strings bool get_MutualCoupling_distance21(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->distance21; if (!buffer.str().empty()) @@ -255,7 +285,8 @@ bool get_MutualCoupling_distance21(const BaseClass* BaseClass_ptr1, std::strings bool get_MutualCoupling_distance22(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->distance22; if (!buffer.str().empty()) @@ -269,7 +300,8 @@ bool get_MutualCoupling_distance22(const BaseClass* BaseClass_ptr1, std::strings bool get_MutualCoupling_g0ch(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g0ch; if (!buffer.str().empty()) @@ -283,7 +315,8 @@ bool get_MutualCoupling_g0ch(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_MutualCoupling_r0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r0; if (!buffer.str().empty()) @@ -297,7 +330,8 @@ bool get_MutualCoupling_r0(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_MutualCoupling_x0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x0; if (!buffer.str().empty()) @@ -309,34 +343,6 @@ bool get_MutualCoupling_x0(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - -bool get_MutualCoupling_First_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->First_Terminal != 0) - { - BaseClass_list.push_back(element->First_Terminal); - return true; - } - } - return false; -} - -bool get_MutualCoupling_Second_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->Second_Terminal != 0) - { - BaseClass_list.push_back(element->Second_Terminal); - return true; - } - } - return false; -} - - const char MutualCoupling::debugName[] = "MutualCoupling"; const char* MutualCoupling::debugString() const { @@ -345,25 +351,25 @@ const char* MutualCoupling::debugString() const void MutualCoupling::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:MutualCoupling"), &MutualCoupling_factory)); + factory_map.emplace("cim:MutualCoupling", &MutualCoupling_factory); } void MutualCoupling::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.b0ch"), &assign_MutualCoupling_b0ch)); - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.distance11"), &assign_MutualCoupling_distance11)); - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.distance12"), &assign_MutualCoupling_distance12)); - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.distance21"), &assign_MutualCoupling_distance21)); - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.distance22"), &assign_MutualCoupling_distance22)); - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.g0ch"), &assign_MutualCoupling_g0ch)); - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.r0"), &assign_MutualCoupling_r0)); - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.x0"), &assign_MutualCoupling_x0)); + assign_map.emplace("cim:MutualCoupling.b0ch", &assign_MutualCoupling_b0ch); + assign_map.emplace("cim:MutualCoupling.distance11", &assign_MutualCoupling_distance11); + assign_map.emplace("cim:MutualCoupling.distance12", &assign_MutualCoupling_distance12); + assign_map.emplace("cim:MutualCoupling.distance21", &assign_MutualCoupling_distance21); + assign_map.emplace("cim:MutualCoupling.distance22", &assign_MutualCoupling_distance22); + assign_map.emplace("cim:MutualCoupling.g0ch", &assign_MutualCoupling_g0ch); + assign_map.emplace("cim:MutualCoupling.r0", &assign_MutualCoupling_r0); + assign_map.emplace("cim:MutualCoupling.x0", &assign_MutualCoupling_x0); } void MutualCoupling::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.First_Terminal"), &assign_MutualCoupling_First_Terminal)); - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.Second_Terminal"), &assign_MutualCoupling_Second_Terminal)); + assign_map.emplace("cim:MutualCoupling.First_Terminal", &assign_MutualCoupling_First_Terminal); + assign_map.emplace("cim:MutualCoupling.Second_Terminal", &assign_MutualCoupling_Second_Terminal); } void MutualCoupling::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/MutualCoupling.hpp b/CGMES_2.4.15_27JAN2020/MutualCoupling.hpp index a218d4c4a..00b130bed 100644 --- a/CGMES_2.4.15_27JAN2020/MutualCoupling.hpp +++ b/CGMES_2.4.15_27JAN2020/MutualCoupling.hpp @@ -22,9 +22,7 @@ namespace CIMPP { class Terminal; - /* - This class represents the zero sequence line mutual coupling. - */ + /** \brief This class represents the zero sequence line mutual coupling. */ class MutualCoupling : public IdentifiedObject { public: @@ -32,16 +30,35 @@ namespace CIMPP MutualCoupling(); ~MutualCoupling() override; - CIMPP::Terminal* First_Terminal; /* The starting terminal for the calculation of distances along the first branch of the mutual coupling. Normally MutualCoupling would only be used for terminals of AC line segments. The first and second terminals of a mutual coupling should point to different AC line segments. Default: 0 */ - CIMPP::Terminal* Second_Terminal; /* The starting terminal for the calculation of distances along the second branch of the mutual coupling. Default: 0 */ - CIMPP::Susceptance b0ch; /* Zero sequence mutual coupling shunt (charging) susceptance, uniformly distributed, of the entire line section. Default: nullptr */ - CIMPP::Length distance11; /* Distance to the start of the coupled region from the first line`s terminal having sequence number equal to 1. Default: nullptr */ - CIMPP::Length distance12; /* Distance to the end of the coupled region from the first line`s terminal with sequence number equal to 1. Default: nullptr */ - CIMPP::Length distance21; /* Distance to the start of coupled region from the second line`s terminal with sequence number equal to 1. Default: nullptr */ - CIMPP::Length distance22; /* Distance to the end of coupled region from the second line`s terminal with sequence number equal to 1. Default: nullptr */ - CIMPP::Conductance g0ch; /* Zero sequence mutual coupling shunt (charging) conductance, uniformly distributed, of the entire line section. Default: nullptr */ - CIMPP::Resistance r0; /* Zero sequence branch-to-branch mutual impedance coupling, resistance. Default: nullptr */ - CIMPP::Reactance x0; /* Zero sequence branch-to-branch mutual impedance coupling, reactance. Default: nullptr */ + /** \brief The starting terminal for the calculation of distances along the first branch of the mutual coupling. Normally MutualCoupling would only be used for terminals of AC line segments. The first and second terminals of a mutual coupling should point to different AC line segments. Default: 0 */ + CIMPP::Terminal* First_Terminal; + + /** \brief The starting terminal for the calculation of distances along the second branch of the mutual coupling. Default: 0 */ + CIMPP::Terminal* Second_Terminal; + + /** \brief Zero sequence mutual coupling shunt (charging) susceptance, uniformly distributed, of the entire line section. Default: nullptr */ + CIMPP::Susceptance b0ch; + + /** \brief Distance to the start of the coupled region from the first line`s terminal having sequence number equal to 1. Default: nullptr */ + CIMPP::Length distance11; + + /** \brief Distance to the end of the coupled region from the first line`s terminal with sequence number equal to 1. Default: nullptr */ + CIMPP::Length distance12; + + /** \brief Distance to the start of coupled region from the second line`s terminal with sequence number equal to 1. Default: nullptr */ + CIMPP::Length distance21; + + /** \brief Distance to the end of coupled region from the second line`s terminal with sequence number equal to 1. Default: nullptr */ + CIMPP::Length distance22; + + /** \brief Zero sequence mutual coupling shunt (charging) conductance, uniformly distributed, of the entire line section. Default: nullptr */ + CIMPP::Conductance g0ch; + + /** \brief Zero sequence branch-to-branch mutual impedance coupling, resistance. Default: nullptr */ + CIMPP::Resistance r0; + + /** \brief Zero sequence branch-to-branch mutual impedance coupling, reactance. Default: nullptr */ + CIMPP::Reactance x0; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/NonConformLoad.cpp b/CGMES_2.4.15_27JAN2020/NonConformLoad.cpp index 23e687bdb..00d77b1ae 100644 --- a/CGMES_2.4.15_27JAN2020/NonConformLoad.cpp +++ b/CGMES_2.4.15_27JAN2020/NonConformLoad.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -NonConformLoad::NonConformLoad() : LoadGroup(nullptr) {}; -NonConformLoad::~NonConformLoad() {}; +NonConformLoad::NonConformLoad() : LoadGroup(nullptr) {} +NonConformLoad::~NonConformLoad() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ NonConformLoad::getPossibleProfilesForAttributes() const return map; } - - bool assign_NonConformLoadGroup_EnergyConsumers(BaseClass*, BaseClass*); bool assign_NonConformLoad_LoadGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,10 +58,10 @@ bool assign_NonConformLoad_LoadGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseC return false; } - bool get_NonConformLoad_LoadGroup(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const NonConformLoad* element = dynamic_cast(BaseClass_ptr1)) + const NonConformLoad* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->LoadGroup != 0) { @@ -74,7 +72,6 @@ bool get_NonConformLoad_LoadGroup(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:NonConformLoad"), &NonConformLoad_factory)); + factory_map.emplace("cim:NonConformLoad", &NonConformLoad_factory); } void NonConformLoad::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -92,7 +89,7 @@ void NonConformLoad::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:NonConformLoad.LoadGroup"), &assign_NonConformLoad_LoadGroup)); + assign_map.emplace("cim:NonConformLoad.LoadGroup", &assign_NonConformLoad_LoadGroup); } void NonConformLoad::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/NonConformLoad.hpp b/CGMES_2.4.15_27JAN2020/NonConformLoad.hpp index 2e336a8b1..d30929052 100644 --- a/CGMES_2.4.15_27JAN2020/NonConformLoad.hpp +++ b/CGMES_2.4.15_27JAN2020/NonConformLoad.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class NonConformLoadGroup; - /* - NonConformLoad represent loads that do not follow a daily load change pattern and changes are not correlated with the daily load change pattern. - */ + /** \brief NonConformLoad represent loads that do not follow a daily load change pattern and changes are not correlated with the daily load change pattern. */ class NonConformLoad : public EnergyConsumer { public: @@ -27,7 +25,8 @@ namespace CIMPP NonConformLoad(); ~NonConformLoad() override; - CIMPP::NonConformLoadGroup* LoadGroup; /* Conform loads assigned to this ConformLoadGroup. Default: 0 */ + /** \brief Conform loads assigned to this ConformLoadGroup. Default: 0 */ + CIMPP::NonConformLoadGroup* LoadGroup; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/NonConformLoadGroup.cpp b/CGMES_2.4.15_27JAN2020/NonConformLoadGroup.cpp index 23646be3e..0ffa2111f 100644 --- a/CGMES_2.4.15_27JAN2020/NonConformLoadGroup.cpp +++ b/CGMES_2.4.15_27JAN2020/NonConformLoadGroup.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -NonConformLoadGroup::NonConformLoadGroup() {}; -NonConformLoadGroup::~NonConformLoadGroup() {}; +NonConformLoadGroup::NonConformLoadGroup() {} +NonConformLoadGroup::~NonConformLoadGroup() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ NonConformLoadGroup::getPossibleProfilesForAttributes() const return map; } - - bool assign_NonConformLoad_LoadGroup(BaseClass*, BaseClass*); bool assign_NonConformLoadGroup_EnergyConsumers(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_NonConformLoadGroup_EnergyConsumers(BaseClass* BaseClass_ptr1, BaseC } return false; } + bool assign_NonConformLoadSchedule_NonConformLoadGroup(BaseClass*, BaseClass*); bool assign_NonConformLoadGroup_NonConformLoadSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -87,7 +86,7 @@ const char* NonConformLoadGroup::debugString() const void NonConformLoadGroup::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:NonConformLoadGroup"), &NonConformLoadGroup_factory)); + factory_map.emplace("cim:NonConformLoadGroup", &NonConformLoadGroup_factory); } void NonConformLoadGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -96,8 +95,8 @@ void NonConformLoadGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:NonConformLoadGroup.EnergyConsumers"), &assign_NonConformLoadGroup_EnergyConsumers)); - assign_map.insert(std::make_pair(std::string("cim:NonConformLoadGroup.NonConformLoadSchedules"), &assign_NonConformLoadGroup_NonConformLoadSchedules)); + assign_map.emplace("cim:NonConformLoadGroup.EnergyConsumers", &assign_NonConformLoadGroup_EnergyConsumers); + assign_map.emplace("cim:NonConformLoadGroup.NonConformLoadSchedules", &assign_NonConformLoadGroup_NonConformLoadSchedules); } void NonConformLoadGroup::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/NonConformLoadGroup.hpp b/CGMES_2.4.15_27JAN2020/NonConformLoadGroup.hpp index db8e81eaa..928188af7 100644 --- a/CGMES_2.4.15_27JAN2020/NonConformLoadGroup.hpp +++ b/CGMES_2.4.15_27JAN2020/NonConformLoadGroup.hpp @@ -18,9 +18,7 @@ namespace CIMPP class NonConformLoad; class NonConformLoadSchedule; - /* - Loads that do not follow a daily and seasonal load variation pattern. - */ + /** \brief Loads that do not follow a daily and seasonal load variation pattern. */ class NonConformLoadGroup : public LoadGroup { public: @@ -28,8 +26,11 @@ namespace CIMPP NonConformLoadGroup(); ~NonConformLoadGroup() override; - std::list EnergyConsumers; /* Group of this ConformLoad. Default: 0 */ - std::list NonConformLoadSchedules; /* The NonConformLoadSchedules in the NonConformLoadGroup. Default: 0 */ + /** \brief Group of this ConformLoad. Default: 0 */ + std::list EnergyConsumers; + + /** \brief The NonConformLoadSchedules in the NonConformLoadGroup. Default: 0 */ + std::list NonConformLoadSchedules; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/NonConformLoadSchedule.cpp b/CGMES_2.4.15_27JAN2020/NonConformLoadSchedule.cpp index c7ee3837c..f4a6a8203 100644 --- a/CGMES_2.4.15_27JAN2020/NonConformLoadSchedule.cpp +++ b/CGMES_2.4.15_27JAN2020/NonConformLoadSchedule.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -NonConformLoadSchedule::NonConformLoadSchedule() : NonConformLoadGroup(nullptr) {}; -NonConformLoadSchedule::~NonConformLoadSchedule() {}; +NonConformLoadSchedule::NonConformLoadSchedule() : NonConformLoadGroup(nullptr) {} +NonConformLoadSchedule::~NonConformLoadSchedule() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ NonConformLoadSchedule::getPossibleProfilesForAttributes() const return map; } - - bool assign_NonConformLoadGroup_NonConformLoadSchedules(BaseClass*, BaseClass*); bool assign_NonConformLoadSchedule_NonConformLoadGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_NonConformLoadSchedule_NonConformLoadGroup(BaseClass* BaseClass_ptr1 return false; } - bool get_NonConformLoadSchedule_NonConformLoadGroup(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const NonConformLoadSchedule* element = dynamic_cast(BaseClass_ptr1)) + const NonConformLoadSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->NonConformLoadGroup != 0) { @@ -73,7 +71,6 @@ bool get_NonConformLoadSchedule_NonConformLoadGroup(const BaseClass* BaseClass_p return false; } - const char NonConformLoadSchedule::debugName[] = "NonConformLoadSchedule"; const char* NonConformLoadSchedule::debugString() const { @@ -82,7 +79,7 @@ const char* NonConformLoadSchedule::debugString() const void NonConformLoadSchedule::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:NonConformLoadSchedule"), &NonConformLoadSchedule_factory)); + factory_map.emplace("cim:NonConformLoadSchedule", &NonConformLoadSchedule_factory); } void NonConformLoadSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void NonConformLoadSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:NonConformLoadSchedule.NonConformLoadGroup"), &assign_NonConformLoadSchedule_NonConformLoadGroup)); + assign_map.emplace("cim:NonConformLoadSchedule.NonConformLoadGroup", &assign_NonConformLoadSchedule_NonConformLoadGroup); } void NonConformLoadSchedule::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/NonConformLoadSchedule.hpp b/CGMES_2.4.15_27JAN2020/NonConformLoadSchedule.hpp index be2f843db..c0ae51ebb 100644 --- a/CGMES_2.4.15_27JAN2020/NonConformLoadSchedule.hpp +++ b/CGMES_2.4.15_27JAN2020/NonConformLoadSchedule.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class NonConformLoadGroup; - /* - An active power (Y1-axis) and reactive power (Y2-axis) schedule (curves) versus time (X-axis) for non-conforming loads, e.g., large industrial load or power station service (where modeled). - */ + /** \brief An active power (Y1-axis) and reactive power (Y2-axis) schedule (curves) versus time (X-axis) for non-conforming loads, e.g., large industrial load or power station service (where modeled). */ class NonConformLoadSchedule : public SeasonDayTypeSchedule { public: @@ -27,7 +25,8 @@ namespace CIMPP NonConformLoadSchedule(); ~NonConformLoadSchedule() override; - CIMPP::NonConformLoadGroup* NonConformLoadGroup; /* The NonConformLoadGroup where the NonConformLoadSchedule belongs. Default: 0 */ + /** \brief The NonConformLoadGroup where the NonConformLoadSchedule belongs. Default: 0 */ + CIMPP::NonConformLoadGroup* NonConformLoadGroup; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/NonlinearShuntCompensator.cpp b/CGMES_2.4.15_27JAN2020/NonlinearShuntCompensator.cpp index 13f02ad2f..5fd272895 100644 --- a/CGMES_2.4.15_27JAN2020/NonlinearShuntCompensator.cpp +++ b/CGMES_2.4.15_27JAN2020/NonlinearShuntCompensator.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -NonlinearShuntCompensator::NonlinearShuntCompensator() {}; -NonlinearShuntCompensator::~NonlinearShuntCompensator() {}; +NonlinearShuntCompensator::NonlinearShuntCompensator() {} +NonlinearShuntCompensator::~NonlinearShuntCompensator() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ NonlinearShuntCompensator::getPossibleProfilesForAttributes() const return map; } - - bool assign_NonlinearShuntCompensatorPoint_NonlinearShuntCompensator(BaseClass*, BaseClass*); bool assign_NonlinearShuntCompensator_NonlinearShuntCompensatorPoints(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,7 +59,6 @@ bool assign_NonlinearShuntCompensator_NonlinearShuntCompensatorPoints(BaseClass* } - const char NonlinearShuntCompensator::debugName[] = "NonlinearShuntCompensator"; const char* NonlinearShuntCompensator::debugString() const { @@ -70,7 +67,7 @@ const char* NonlinearShuntCompensator::debugString() const void NonlinearShuntCompensator::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensator"), &NonlinearShuntCompensator_factory)); + factory_map.emplace("cim:NonlinearShuntCompensator", &NonlinearShuntCompensator_factory); } void NonlinearShuntCompensator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -79,7 +76,7 @@ void NonlinearShuntCompensator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensator.NonlinearShuntCompensatorPoints"), &assign_NonlinearShuntCompensator_NonlinearShuntCompensatorPoints)); + assign_map.emplace("cim:NonlinearShuntCompensator.NonlinearShuntCompensatorPoints", &assign_NonlinearShuntCompensator_NonlinearShuntCompensatorPoints); } void NonlinearShuntCompensator::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/NonlinearShuntCompensator.hpp b/CGMES_2.4.15_27JAN2020/NonlinearShuntCompensator.hpp index c67ea0fa6..c39f1cb1f 100644 --- a/CGMES_2.4.15_27JAN2020/NonlinearShuntCompensator.hpp +++ b/CGMES_2.4.15_27JAN2020/NonlinearShuntCompensator.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class NonlinearShuntCompensatorPoint; - /* - A non linear shunt compensator has bank or section admittance values that differs. - */ + /** \brief A non linear shunt compensator has bank or section admittance values that differs. */ class NonlinearShuntCompensator : public ShuntCompensator { public: @@ -27,7 +25,8 @@ namespace CIMPP NonlinearShuntCompensator(); ~NonlinearShuntCompensator() override; - std::list NonlinearShuntCompensatorPoints; /* All points of the non-linear shunt compensator. Default: 0 */ + /** \brief All points of the non-linear shunt compensator. Default: 0 */ + std::list NonlinearShuntCompensatorPoints; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/NonlinearShuntCompensatorPoint.cpp b/CGMES_2.4.15_27JAN2020/NonlinearShuntCompensatorPoint.cpp index 527cb2218..39f049438 100644 --- a/CGMES_2.4.15_27JAN2020/NonlinearShuntCompensatorPoint.cpp +++ b/CGMES_2.4.15_27JAN2020/NonlinearShuntCompensatorPoint.cpp @@ -9,16 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "NonlinearShuntCompensator.hpp" -#include "Susceptance.hpp" -#include "Susceptance.hpp" -#include "Conductance.hpp" -#include "Conductance.hpp" -#include "Integer.hpp" using namespace CIMPP; -NonlinearShuntCompensatorPoint::NonlinearShuntCompensatorPoint() : NonlinearShuntCompensator(nullptr) {}; -NonlinearShuntCompensatorPoint::~NonlinearShuntCompensatorPoint() {}; +NonlinearShuntCompensatorPoint::NonlinearShuntCompensatorPoint() : NonlinearShuntCompensator(nullptr) {} +NonlinearShuntCompensatorPoint::~NonlinearShuntCompensatorPoint() {} static const std::list PossibleProfilesForClass = { @@ -50,93 +45,111 @@ NonlinearShuntCompensatorPoint::getPossibleProfilesForAttributes() const return map; } +bool assign_NonlinearShuntCompensator_NonlinearShuntCompensatorPoints(BaseClass*, BaseClass*); +bool assign_NonlinearShuntCompensatorPoint_NonlinearShuntCompensator(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + NonlinearShuntCompensator* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->NonlinearShuntCompensator != element2) + { + element->NonlinearShuntCompensator = element2; + return assign_NonlinearShuntCompensator_NonlinearShuntCompensatorPoints(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_NonlinearShuntCompensatorPoint_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_NonlinearShuntCompensatorPoint_b(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_NonlinearShuntCompensatorPoint_b0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_NonlinearShuntCompensatorPoint_b0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_NonlinearShuntCompensatorPoint_g(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_NonlinearShuntCompensatorPoint_g(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_NonlinearShuntCompensatorPoint_g0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_NonlinearShuntCompensatorPoint_g0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_NonlinearShuntCompensatorPoint_sectionNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_NonlinearShuntCompensatorPoint_sectionNumber(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->sectionNumber; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_NonlinearShuntCompensator_NonlinearShuntCompensatorPoints(BaseClass*, BaseClass*); -bool assign_NonlinearShuntCompensatorPoint_NonlinearShuntCompensator(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_NonlinearShuntCompensatorPoint_NonlinearShuntCompensator(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); - NonlinearShuntCompensator* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->NonlinearShuntCompensator != element2) + if (element->NonlinearShuntCompensator != 0) { - element->NonlinearShuntCompensator = element2; - return assign_NonlinearShuntCompensator_NonlinearShuntCompensatorPoints(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->NonlinearShuntCompensator); + return true; } - return true; } return false; } bool get_NonlinearShuntCompensatorPoint_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b; if (!buffer.str().empty()) @@ -150,7 +163,8 @@ bool get_NonlinearShuntCompensatorPoint_b(const BaseClass* BaseClass_ptr1, std:: bool get_NonlinearShuntCompensatorPoint_b0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b0; if (!buffer.str().empty()) @@ -164,7 +178,8 @@ bool get_NonlinearShuntCompensatorPoint_b0(const BaseClass* BaseClass_ptr1, std: bool get_NonlinearShuntCompensatorPoint_g(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g; if (!buffer.str().empty()) @@ -178,7 +193,8 @@ bool get_NonlinearShuntCompensatorPoint_g(const BaseClass* BaseClass_ptr1, std:: bool get_NonlinearShuntCompensatorPoint_g0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g0; if (!buffer.str().empty()) @@ -192,7 +208,8 @@ bool get_NonlinearShuntCompensatorPoint_g0(const BaseClass* BaseClass_ptr1, std: bool get_NonlinearShuntCompensatorPoint_sectionNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->sectionNumber; if (!buffer.str().empty()) @@ -204,21 +221,6 @@ bool get_NonlinearShuntCompensatorPoint_sectionNumber(const BaseClass* BaseClass return false; } - -bool get_NonlinearShuntCompensatorPoint_NonlinearShuntCompensator(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->NonlinearShuntCompensator != 0) - { - BaseClass_list.push_back(element->NonlinearShuntCompensator); - return true; - } - } - return false; -} - - const char NonlinearShuntCompensatorPoint::debugName[] = "NonlinearShuntCompensatorPoint"; const char* NonlinearShuntCompensatorPoint::debugString() const { @@ -227,21 +229,21 @@ const char* NonlinearShuntCompensatorPoint::debugString() const void NonlinearShuntCompensatorPoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensatorPoint"), &NonlinearShuntCompensatorPoint_factory)); + factory_map.emplace("cim:NonlinearShuntCompensatorPoint", &NonlinearShuntCompensatorPoint_factory); } void NonlinearShuntCompensatorPoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensatorPoint.b"), &assign_NonlinearShuntCompensatorPoint_b)); - assign_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensatorPoint.b0"), &assign_NonlinearShuntCompensatorPoint_b0)); - assign_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensatorPoint.g"), &assign_NonlinearShuntCompensatorPoint_g)); - assign_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensatorPoint.g0"), &assign_NonlinearShuntCompensatorPoint_g0)); - assign_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensatorPoint.sectionNumber"), &assign_NonlinearShuntCompensatorPoint_sectionNumber)); + assign_map.emplace("cim:NonlinearShuntCompensatorPoint.b", &assign_NonlinearShuntCompensatorPoint_b); + assign_map.emplace("cim:NonlinearShuntCompensatorPoint.b0", &assign_NonlinearShuntCompensatorPoint_b0); + assign_map.emplace("cim:NonlinearShuntCompensatorPoint.g", &assign_NonlinearShuntCompensatorPoint_g); + assign_map.emplace("cim:NonlinearShuntCompensatorPoint.g0", &assign_NonlinearShuntCompensatorPoint_g0); + assign_map.emplace("cim:NonlinearShuntCompensatorPoint.sectionNumber", &assign_NonlinearShuntCompensatorPoint_sectionNumber); } void NonlinearShuntCompensatorPoint::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensatorPoint.NonlinearShuntCompensator"), &assign_NonlinearShuntCompensatorPoint_NonlinearShuntCompensator)); + assign_map.emplace("cim:NonlinearShuntCompensatorPoint.NonlinearShuntCompensator", &assign_NonlinearShuntCompensatorPoint_NonlinearShuntCompensator); } void NonlinearShuntCompensatorPoint::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/NonlinearShuntCompensatorPoint.hpp b/CGMES_2.4.15_27JAN2020/NonlinearShuntCompensatorPoint.hpp index 7eaca08db..eaf108691 100644 --- a/CGMES_2.4.15_27JAN2020/NonlinearShuntCompensatorPoint.hpp +++ b/CGMES_2.4.15_27JAN2020/NonlinearShuntCompensatorPoint.hpp @@ -20,9 +20,7 @@ namespace CIMPP { class NonlinearShuntCompensator; - /* - A non linear shunt compensator bank or section admittance value. - */ + /** \brief A non linear shunt compensator bank or section admittance value. */ class NonlinearShuntCompensatorPoint : public BaseClass { public: @@ -30,12 +28,23 @@ namespace CIMPP NonlinearShuntCompensatorPoint(); ~NonlinearShuntCompensatorPoint() override; - CIMPP::NonlinearShuntCompensator* NonlinearShuntCompensator; /* Non-linear shunt compensator owning this point. Default: 0 */ - CIMPP::Susceptance b; /* Positive sequence shunt (charging) susceptance per section Default: nullptr */ - CIMPP::Susceptance b0; /* Zero sequence shunt (charging) susceptance per section Default: nullptr */ - CIMPP::Conductance g; /* Positive sequence shunt (charging) conductance per section Default: nullptr */ - CIMPP::Conductance g0; /* Zero sequence shunt (charging) conductance per section Default: nullptr */ - CIMPP::Integer sectionNumber; /* The number of the section. Default: 0 */ + /** \brief Non-linear shunt compensator owning this point. Default: 0 */ + CIMPP::NonlinearShuntCompensator* NonlinearShuntCompensator; + + /** \brief Positive sequence shunt (charging) susceptance per section Default: nullptr */ + CIMPP::Susceptance b; + + /** \brief Zero sequence shunt (charging) susceptance per section Default: nullptr */ + CIMPP::Susceptance b0; + + /** \brief Positive sequence shunt (charging) conductance per section Default: nullptr */ + CIMPP::Conductance g; + + /** \brief Zero sequence shunt (charging) conductance per section Default: nullptr */ + CIMPP::Conductance g0; + + /** \brief The number of the section. Default: 0 */ + CIMPP::Integer sectionNumber; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/NuclearGeneratingUnit.cpp b/CGMES_2.4.15_27JAN2020/NuclearGeneratingUnit.cpp index 9e3fcec38..3ce0ed75a 100644 --- a/CGMES_2.4.15_27JAN2020/NuclearGeneratingUnit.cpp +++ b/CGMES_2.4.15_27JAN2020/NuclearGeneratingUnit.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -NuclearGeneratingUnit::NuclearGeneratingUnit() {}; -NuclearGeneratingUnit::~NuclearGeneratingUnit() {}; +NuclearGeneratingUnit::NuclearGeneratingUnit() {} +NuclearGeneratingUnit::~NuclearGeneratingUnit() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ NuclearGeneratingUnit::getPossibleProfilesForAttributes() const return map; } - - - - - const char NuclearGeneratingUnit::debugName[] = "NuclearGeneratingUnit"; const char* NuclearGeneratingUnit::debugString() const { @@ -52,7 +47,7 @@ const char* NuclearGeneratingUnit::debugString() const void NuclearGeneratingUnit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:NuclearGeneratingUnit"), &NuclearGeneratingUnit_factory)); + factory_map.emplace("cim:NuclearGeneratingUnit", &NuclearGeneratingUnit_factory); } void NuclearGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/NuclearGeneratingUnit.hpp b/CGMES_2.4.15_27JAN2020/NuclearGeneratingUnit.hpp index 4ee5186cd..81ab7cd3d 100644 --- a/CGMES_2.4.15_27JAN2020/NuclearGeneratingUnit.hpp +++ b/CGMES_2.4.15_27JAN2020/NuclearGeneratingUnit.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A nuclear generating unit. - */ + /** \brief A nuclear generating unit. */ class NuclearGeneratingUnit : public GeneratingUnit { public: @@ -26,7 +24,6 @@ namespace CIMPP NuclearGeneratingUnit(); ~NuclearGeneratingUnit() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/OperationalLimit.cpp b/CGMES_2.4.15_27JAN2020/OperationalLimit.cpp index c32b84037..2f6e5f3f8 100644 --- a/CGMES_2.4.15_27JAN2020/OperationalLimit.cpp +++ b/CGMES_2.4.15_27JAN2020/OperationalLimit.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -OperationalLimit::OperationalLimit() : OperationalLimitSet(nullptr), OperationalLimitType(nullptr) {}; -OperationalLimit::~OperationalLimit() {}; +OperationalLimit::OperationalLimit() : OperationalLimitSet(nullptr), OperationalLimitType(nullptr) {} +OperationalLimit::~OperationalLimit() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ OperationalLimit::getPossibleProfilesForAttributes() const return map; } - - bool assign_OperationalLimitSet_OperationalLimitValue(BaseClass*, BaseClass*); bool assign_OperationalLimit_OperationalLimitSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_OperationalLimit_OperationalLimitSet(BaseClass* BaseClass_ptr1, Base } return false; } + bool assign_OperationalLimitType_OperationalLimit(BaseClass*, BaseClass*); bool assign_OperationalLimit_OperationalLimitType(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_OperationalLimit_OperationalLimitType(BaseClass* BaseClass_ptr1, Bas return false; } - bool get_OperationalLimit_OperationalLimitSet(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const OperationalLimit* element = dynamic_cast(BaseClass_ptr1)) + const OperationalLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->OperationalLimitSet != 0) { @@ -93,7 +92,8 @@ bool get_OperationalLimit_OperationalLimitSet(const BaseClass* BaseClass_ptr1, s bool get_OperationalLimit_OperationalLimitType(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const OperationalLimit* element = dynamic_cast(BaseClass_ptr1)) + const OperationalLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->OperationalLimitType != 0) { @@ -104,7 +104,6 @@ bool get_OperationalLimit_OperationalLimitType(const BaseClass* BaseClass_ptr1, return false; } - const char OperationalLimit::debugName[] = "OperationalLimit"; const char* OperationalLimit::debugString() const { @@ -113,7 +112,7 @@ const char* OperationalLimit::debugString() const void OperationalLimit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:OperationalLimit"), &OperationalLimit_factory)); + factory_map.emplace("cim:OperationalLimit", &OperationalLimit_factory); } void OperationalLimit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void OperationalLimit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OperationalLimit.OperationalLimitSet"), &assign_OperationalLimit_OperationalLimitSet)); - assign_map.insert(std::make_pair(std::string("cim:OperationalLimit.OperationalLimitType"), &assign_OperationalLimit_OperationalLimitType)); + assign_map.emplace("cim:OperationalLimit.OperationalLimitSet", &assign_OperationalLimit_OperationalLimitSet); + assign_map.emplace("cim:OperationalLimit.OperationalLimitType", &assign_OperationalLimit_OperationalLimitType); } void OperationalLimit::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/OperationalLimit.hpp b/CGMES_2.4.15_27JAN2020/OperationalLimit.hpp index 2d67bbf7a..1e167b812 100644 --- a/CGMES_2.4.15_27JAN2020/OperationalLimit.hpp +++ b/CGMES_2.4.15_27JAN2020/OperationalLimit.hpp @@ -18,9 +18,7 @@ namespace CIMPP class OperationalLimitSet; class OperationalLimitType; - /* - A value associated with a specific kind of limit. The sub class value attribute shall be positive. The sub class value attribute is inversely proportional to OperationalLimitType.acceptableDuration (acceptableDuration for short). A pair of value_x and acceptableDuration_x are related to each other as follows: if value_1 > value_2 > value_3 >... then acceptableDuration_1 < acceptableDuration_2 < acceptableDuration_3 < ... A value_x with direction="high" shall be greater than a value_y with direction="low". - */ + /** \brief A value associated with a specific kind of limit. The sub class value attribute shall be positive. The sub class value attribute is inversely proportional to OperationalLimitType.acceptableDuration (acceptableDuration for short). A pair of value_x and acceptableDuration_x are related to each other as follows: if value_1 > value_2 > value_3 >... then acceptableDuration_1 < acceptableDuration_2 < acceptableDuration_3 < ... A value_x with direction="high" shall be greater than a value_y with direction="low". */ class OperationalLimit : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP OperationalLimit(); ~OperationalLimit() override; - CIMPP::OperationalLimitSet* OperationalLimitSet; /* Values of equipment limits. Default: 0 */ - CIMPP::OperationalLimitType* OperationalLimitType; /* The limit type associated with this limit. Default: 0 */ + /** \brief Values of equipment limits. Default: 0 */ + CIMPP::OperationalLimitSet* OperationalLimitSet; + + /** \brief The limit type associated with this limit. Default: 0 */ + CIMPP::OperationalLimitType* OperationalLimitType; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/OperationalLimitDirectionKind.cpp b/CGMES_2.4.15_27JAN2020/OperationalLimitDirectionKind.cpp index 4aeb56e6d..77fce153e 100644 --- a/CGMES_2.4.15_27JAN2020/OperationalLimitDirectionKind.cpp +++ b/CGMES_2.4.15_27JAN2020/OperationalLimitDirectionKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "OperationalLimitDirectionKind") + if (EnumSymbol.substr(0, pos) != "OperationalLimitDirectionKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "high") + if (EnumSymbol == "high") { rop = OperationalLimitDirectionKind::high; return lop; } - if(EnumSymbol == "low") + if (EnumSymbol == "low") { rop = OperationalLimitDirectionKind::low; return lop; } - if(EnumSymbol == "absoluteValue") + if (EnumSymbol == "absoluteValue") { rop = OperationalLimitDirectionKind::absoluteValue; return lop; diff --git a/CGMES_2.4.15_27JAN2020/OperationalLimitDirectionKind.hpp b/CGMES_2.4.15_27JAN2020/OperationalLimitDirectionKind.hpp index 33d23f39a..295417e17 100644 --- a/CGMES_2.4.15_27JAN2020/OperationalLimitDirectionKind.hpp +++ b/CGMES_2.4.15_27JAN2020/OperationalLimitDirectionKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The direction attribute describes the side of a limit that is a violation. - */ + /** \brief The direction attribute describes the side of a limit that is a violation. */ class OperationalLimitDirectionKind { public: enum OperationalLimitDirectionKind_ENUM { - /** - * High means that a monitored value above the limit value is a violation. If applied to a terminal flow, the positive direction is into the terminal. - */ + /** High means that a monitored value above the limit value is a violation. If applied to a terminal flow, the positive direction is into the terminal. */ high, - /** - * Low means a monitored value below the limit is a violation. If applied to a terminal flow, the positive direction is into the terminal. - */ + /** Low means a monitored value below the limit is a violation. If applied to a terminal flow, the positive direction is into the terminal. */ low, - /** - * An absoluteValue limit means that a monitored absolute value above the limit value is a violation. - */ + /** An absoluteValue limit means that a monitored absolute value above the limit value is a violation. */ absoluteValue, }; diff --git a/CGMES_2.4.15_27JAN2020/OperationalLimitSet.cpp b/CGMES_2.4.15_27JAN2020/OperationalLimitSet.cpp index 615a0edcd..b2d24e3d4 100644 --- a/CGMES_2.4.15_27JAN2020/OperationalLimitSet.cpp +++ b/CGMES_2.4.15_27JAN2020/OperationalLimitSet.cpp @@ -8,14 +8,14 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include +#include "ACDCTerminal.hpp" #include "Equipment.hpp" #include "OperationalLimit.hpp" -#include "ACDCTerminal.hpp" using namespace CIMPP; -OperationalLimitSet::OperationalLimitSet() : Equipment(nullptr), Terminal(nullptr) {}; -OperationalLimitSet::~OperationalLimitSet() {}; +OperationalLimitSet::OperationalLimitSet() : Equipment(nullptr), Terminal(nullptr) {} +OperationalLimitSet::~OperationalLimitSet() {} static const std::list PossibleProfilesForClass = { @@ -44,8 +44,6 @@ OperationalLimitSet::getPossibleProfilesForAttributes() const return map; } - - bool assign_Equipment_OperationalLimitSet(BaseClass*, BaseClass*); bool assign_OperationalLimitSet_Equipment(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -62,6 +60,7 @@ bool assign_OperationalLimitSet_Equipment(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_OperationalLimit_OperationalLimitSet(BaseClass*, BaseClass*); bool assign_OperationalLimitSet_OperationalLimitValue(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -78,6 +77,7 @@ bool assign_OperationalLimitSet_OperationalLimitValue(BaseClass* BaseClass_ptr1, } return false; } + bool assign_ACDCTerminal_OperationalLimitSet(BaseClass*, BaseClass*); bool assign_OperationalLimitSet_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -95,10 +95,10 @@ bool assign_OperationalLimitSet_Terminal(BaseClass* BaseClass_ptr1, BaseClass* B return false; } - bool get_OperationalLimitSet_Equipment(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const OperationalLimitSet* element = dynamic_cast(BaseClass_ptr1)) + const OperationalLimitSet* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Equipment != 0) { @@ -109,9 +109,11 @@ bool get_OperationalLimitSet_Equipment(const BaseClass* BaseClass_ptr1, std::lis return false; } + bool get_OperationalLimitSet_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const OperationalLimitSet* element = dynamic_cast(BaseClass_ptr1)) + const OperationalLimitSet* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Terminal != 0) { @@ -122,7 +124,6 @@ bool get_OperationalLimitSet_Terminal(const BaseClass* BaseClass_ptr1, std::list return false; } - const char OperationalLimitSet::debugName[] = "OperationalLimitSet"; const char* OperationalLimitSet::debugString() const { @@ -131,7 +132,7 @@ const char* OperationalLimitSet::debugString() const void OperationalLimitSet::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:OperationalLimitSet"), &OperationalLimitSet_factory)); + factory_map.emplace("cim:OperationalLimitSet", &OperationalLimitSet_factory); } void OperationalLimitSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -140,9 +141,9 @@ void OperationalLimitSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OperationalLimitSet.Equipment"), &assign_OperationalLimitSet_Equipment)); - assign_map.insert(std::make_pair(std::string("cim:OperationalLimitSet.OperationalLimitValue"), &assign_OperationalLimitSet_OperationalLimitValue)); - assign_map.insert(std::make_pair(std::string("cim:OperationalLimitSet.Terminal"), &assign_OperationalLimitSet_Terminal)); + assign_map.emplace("cim:OperationalLimitSet.Equipment", &assign_OperationalLimitSet_Equipment); + assign_map.emplace("cim:OperationalLimitSet.OperationalLimitValue", &assign_OperationalLimitSet_OperationalLimitValue); + assign_map.emplace("cim:OperationalLimitSet.Terminal", &assign_OperationalLimitSet_Terminal); } void OperationalLimitSet::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/OperationalLimitSet.hpp b/CGMES_2.4.15_27JAN2020/OperationalLimitSet.hpp index 4c968db6d..97bb28d50 100644 --- a/CGMES_2.4.15_27JAN2020/OperationalLimitSet.hpp +++ b/CGMES_2.4.15_27JAN2020/OperationalLimitSet.hpp @@ -19,9 +19,7 @@ namespace CIMPP class Equipment; class OperationalLimit; - /* - A set of limits associated with equipment. Sets of limits might apply to a specific temperature, or season for example. A set of limits may contain different severities of limit levels that would apply to the same equipment. The set may contain limits of different types such as apparent power and current limits or high and low voltage limits that are logically applied together as a set. - */ + /** \brief A set of limits associated with equipment. Sets of limits might apply to a specific temperature, or season for example. A set of limits may contain different severities of limit levels that would apply to the same equipment. The set may contain limits of different types such as apparent power and current limits or high and low voltage limits that are logically applied together as a set. */ class OperationalLimitSet : public IdentifiedObject { public: @@ -29,9 +27,14 @@ namespace CIMPP OperationalLimitSet(); ~OperationalLimitSet() override; - CIMPP::Equipment* Equipment; /* The equipment to which the limit set applies. Default: 0 */ - std::list OperationalLimitValue; /* The limit set to which the limit values belong. Default: 0 */ - CIMPP::ACDCTerminal* Terminal; /* Default: 0 */ + /** \brief The equipment to which the limit set applies. Default: 0 */ + CIMPP::Equipment* Equipment; + + /** \brief The limit set to which the limit values belong. Default: 0 */ + std::list OperationalLimitValue; + + /** \brief Default: 0 */ + CIMPP::ACDCTerminal* Terminal; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/OperationalLimitType.cpp b/CGMES_2.4.15_27JAN2020/OperationalLimitType.cpp index 5f9534fef..d487e6145 100644 --- a/CGMES_2.4.15_27JAN2020/OperationalLimitType.cpp +++ b/CGMES_2.4.15_27JAN2020/OperationalLimitType.cpp @@ -9,14 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "OperationalLimit.hpp" -#include "Seconds.hpp" -#include "OperationalLimitDirectionKind.hpp" -#include "LimitTypeKind.hpp" using namespace CIMPP; -OperationalLimitType::OperationalLimitType() {}; -OperationalLimitType::~OperationalLimitType() {}; +OperationalLimitType::OperationalLimitType() {} +OperationalLimitType::~OperationalLimitType() {} static const std::list PossibleProfilesForClass = { @@ -46,67 +43,70 @@ OperationalLimitType::getPossibleProfilesForAttributes() const return map; } - -bool assign_OperationalLimitType_acceptableDuration(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OperationalLimit_OperationalLimitType(BaseClass*, BaseClass*); +bool assign_OperationalLimitType_OperationalLimit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (OperationalLimitType* element = dynamic_cast(BaseClass_ptr1)) + OperationalLimitType* element = dynamic_cast(BaseClass_ptr1); + OperationalLimit* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->acceptableDuration; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->OperationalLimit.begin(), element->OperationalLimit.end(), element2) == element->OperationalLimit.end()) + { + element->OperationalLimit.push_back(element2); + return assign_OperationalLimit_OperationalLimitType(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_OperationalLimitType_direction(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OperationalLimitType_acceptableDuration(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OperationalLimitType* element = dynamic_cast(BaseClass_ptr1)) + OperationalLimitType* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->direction; - if (buffer.fail()) - return false; - else + buffer >> element->acceptableDuration; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OperationalLimitType_limitType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OperationalLimitType_direction(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OperationalLimitType* element = dynamic_cast(BaseClass_ptr1)) + OperationalLimitType* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->limitType; - if (buffer.fail()) - return false; - else + buffer >> element->direction; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_OperationalLimit_OperationalLimitType(BaseClass*, BaseClass*); -bool assign_OperationalLimitType_OperationalLimit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_OperationalLimitType_limitType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { OperationalLimitType* element = dynamic_cast(BaseClass_ptr1); - OperationalLimit* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->OperationalLimit.begin(), element->OperationalLimit.end(), element2) == element->OperationalLimit.end()) + buffer >> element->limitType; + if (!buffer.fail()) { - element->OperationalLimit.push_back(element2); - return assign_OperationalLimit_OperationalLimitType(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_OperationalLimitType_acceptableDuration(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OperationalLimitType* element = dynamic_cast(BaseClass_ptr1)) + const OperationalLimitType* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->acceptableDuration; if (!buffer.str().empty()) @@ -118,11 +118,10 @@ bool get_OperationalLimitType_acceptableDuration(const BaseClass* BaseClass_ptr1 return false; } - - bool get_OperationalLimitType_direction(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OperationalLimitType* element = dynamic_cast(BaseClass_ptr1)) + const OperationalLimitType* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->direction; if (!buffer.str().empty()) @@ -136,7 +135,8 @@ bool get_OperationalLimitType_direction(const BaseClass* BaseClass_ptr1, std::st bool get_OperationalLimitType_limitType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OperationalLimitType* element = dynamic_cast(BaseClass_ptr1)) + const OperationalLimitType* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->limitType; if (!buffer.str().empty()) @@ -156,19 +156,19 @@ const char* OperationalLimitType::debugString() const void OperationalLimitType::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:OperationalLimitType"), &OperationalLimitType_factory)); + factory_map.emplace("cim:OperationalLimitType", &OperationalLimitType_factory); } void OperationalLimitType::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OperationalLimitType.acceptableDuration"), &assign_OperationalLimitType_acceptableDuration)); - assign_map.insert(std::make_pair(std::string("cim:OperationalLimitType.direction"), &assign_OperationalLimitType_direction)); - assign_map.insert(std::make_pair(std::string("cim:OperationalLimitType.limitType"), &assign_OperationalLimitType_limitType)); + assign_map.emplace("cim:OperationalLimitType.acceptableDuration", &assign_OperationalLimitType_acceptableDuration); + assign_map.emplace("cim:OperationalLimitType.direction", &assign_OperationalLimitType_direction); + assign_map.emplace("cim:OperationalLimitType.limitType", &assign_OperationalLimitType_limitType); } void OperationalLimitType::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OperationalLimitType.OperationalLimit"), &assign_OperationalLimitType_OperationalLimit)); + assign_map.emplace("cim:OperationalLimitType.OperationalLimit", &assign_OperationalLimitType_OperationalLimit); } void OperationalLimitType::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/OperationalLimitType.hpp b/CGMES_2.4.15_27JAN2020/OperationalLimitType.hpp index 5ff8db6ab..3b07eb447 100644 --- a/CGMES_2.4.15_27JAN2020/OperationalLimitType.hpp +++ b/CGMES_2.4.15_27JAN2020/OperationalLimitType.hpp @@ -20,9 +20,7 @@ namespace CIMPP { class OperationalLimit; - /* - The operational meaning of a category of limits. - */ + /** \brief The operational meaning of a category of limits. */ class OperationalLimitType : public IdentifiedObject { public: @@ -30,10 +28,17 @@ namespace CIMPP OperationalLimitType(); ~OperationalLimitType() override; - std::list OperationalLimit; /* The operational limits associated with this type of limit. Default: 0 */ - CIMPP::Seconds acceptableDuration; /* The nominal acceptable duration of the limit. Limits are commonly expressed in terms of the a time limit for which the limit is normally acceptable. The actual acceptable duration of a specific limit may depend on other local factors such as temperature or wind speed. Default: nullptr */ - CIMPP::OperationalLimitDirectionKind direction; /* The direction of the limit. Default: 0 */ - CIMPP::LimitTypeKind limitType; /* Types of limits defined in the ENTSO-E Operational Handbook Policy 3. Default: 0 */ + /** \brief The operational limits associated with this type of limit. Default: 0 */ + std::list OperationalLimit; + + /** \brief The nominal acceptable duration of the limit. Limits are commonly expressed in terms of the a time limit for which the limit is normally acceptable. The actual acceptable duration of a specific limit may depend on other local factors such as temperature or wind speed. Default: nullptr */ + CIMPP::Seconds acceptableDuration; + + /** \brief The direction of the limit. Default: 0 */ + CIMPP::OperationalLimitDirectionKind direction; + + /** \brief Types of limits defined in the ENTSO-E Operational Handbook Policy 3. Default: 0 */ + CIMPP::LimitTypeKind limitType; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/OrientationKind.cpp b/CGMES_2.4.15_27JAN2020/OrientationKind.cpp index e02a50057..ea4f69b21 100644 --- a/CGMES_2.4.15_27JAN2020/OrientationKind.cpp +++ b/CGMES_2.4.15_27JAN2020/OrientationKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "OrientationKind") + if (EnumSymbol.substr(0, pos) != "OrientationKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,7 +50,7 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "negative") + if (EnumSymbol == "negative") { rop = OrientationKind::negative; return lop; diff --git a/CGMES_2.4.15_27JAN2020/OrientationKind.hpp b/CGMES_2.4.15_27JAN2020/OrientationKind.hpp index 0ab661444..4666948b8 100644 --- a/CGMES_2.4.15_27JAN2020/OrientationKind.hpp +++ b/CGMES_2.4.15_27JAN2020/OrientationKind.hpp @@ -9,17 +9,13 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The orientation of the coordinate system with respect to top, left, and the coordinate number system. - */ + /** \brief The orientation of the coordinate system with respect to top, left, and the coordinate number system. */ class OrientationKind { public: enum OrientationKind_ENUM { - /** - * For 2D diagrams, a negative orientation gives the left-hand orientation (favoured by computer graphics displays) with X values increasing from left to right and Y values increasing from top to bottom. This is also known as a left hand orientation. - */ + /** For 2D diagrams, a negative orientation gives the left-hand orientation (favoured by computer graphics displays) with X values increasing from left to right and Y values increasing from top to bottom. This is also known as a left hand orientation. */ negative, }; diff --git a/CGMES_2.4.15_27JAN2020/OverexcLim2.cpp b/CGMES_2.4.15_27JAN2020/OverexcLim2.cpp index 72fdf8856..2e9009b9b 100644 --- a/CGMES_2.4.15_27JAN2020/OverexcLim2.cpp +++ b/CGMES_2.4.15_27JAN2020/OverexcLim2.cpp @@ -8,15 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -OverexcLim2::OverexcLim2() {}; -OverexcLim2::~OverexcLim2() {}; +OverexcLim2::OverexcLim2() {} +OverexcLim2::~OverexcLim2() {} static const std::list PossibleProfilesForClass = { @@ -46,64 +42,66 @@ OverexcLim2::getPossibleProfilesForAttributes() const return map; } - -bool assign_OverexcLim2_ifdlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLim2_ifdlim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLim2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ifdlim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLim2_koi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLim2_koi(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLim2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->koi; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLim2_voimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLim2_voimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLim2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->voimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLim2_voimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLim2_voimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLim2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->voimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_OverexcLim2_ifdlim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLim2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ifdlim; if (!buffer.str().empty()) @@ -117,7 +115,8 @@ bool get_OverexcLim2_ifdlim(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_OverexcLim2_koi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLim2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->koi; if (!buffer.str().empty()) @@ -131,7 +130,8 @@ bool get_OverexcLim2_koi(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_OverexcLim2_voimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLim2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->voimax; if (!buffer.str().empty()) @@ -145,7 +145,8 @@ bool get_OverexcLim2_voimax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_OverexcLim2_voimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLim2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->voimin; if (!buffer.str().empty()) @@ -157,8 +158,6 @@ bool get_OverexcLim2_voimin(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char OverexcLim2::debugName[] = "OverexcLim2"; const char* OverexcLim2::debugString() const { @@ -167,15 +166,15 @@ const char* OverexcLim2::debugString() const void OverexcLim2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:OverexcLim2"), &OverexcLim2_factory)); + factory_map.emplace("cim:OverexcLim2", &OverexcLim2_factory); } void OverexcLim2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OverexcLim2.ifdlim"), &assign_OverexcLim2_ifdlim)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLim2.koi"), &assign_OverexcLim2_koi)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLim2.voimax"), &assign_OverexcLim2_voimax)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLim2.voimin"), &assign_OverexcLim2_voimin)); + assign_map.emplace("cim:OverexcLim2.ifdlim", &assign_OverexcLim2_ifdlim); + assign_map.emplace("cim:OverexcLim2.koi", &assign_OverexcLim2_koi); + assign_map.emplace("cim:OverexcLim2.voimax", &assign_OverexcLim2_voimax); + assign_map.emplace("cim:OverexcLim2.voimin", &assign_OverexcLim2_voimin); } void OverexcLim2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/OverexcLim2.hpp b/CGMES_2.4.15_27JAN2020/OverexcLim2.hpp index 1160df132..0278bfc7e 100644 --- a/CGMES_2.4.15_27JAN2020/OverexcLim2.hpp +++ b/CGMES_2.4.15_27JAN2020/OverexcLim2.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Different from LimIEEEOEL, LimOEL2 has a fixed pickup threshold and reduces the excitation set-point by mean of non-windup integral regulator. Irated is the rated machine excitation current (calculated from nameplate conditions: V, P, CosPhi). - */ + /** \brief Different from LimIEEEOEL, LimOEL2 has a fixed pickup threshold and reduces the excitation set-point by mean of non-windup integral regulator. Irated is the rated machine excitation current (calculated from nameplate conditions: V, P, CosPhi). */ class OverexcLim2 : public OverexcitationLimiterDynamics { public: @@ -27,10 +25,17 @@ namespace CIMPP OverexcLim2(); ~OverexcLim2() override; - CIMPP::PU ifdlim; /* Limit value of rated field current (I). Typical Value = 1.05. Default: nullptr */ - CIMPP::PU koi; /* Gain Over excitation limiter (K). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU voimax; /* Maximum error signal (V). Typical Value = 0. Default: nullptr */ - CIMPP::PU voimin; /* Minimum error signal (V). Typical Value = -9999. Default: nullptr */ + /** \brief Limit value of rated field current (I). Typical Value = 1.05. Default: nullptr */ + CIMPP::PU ifdlim; + + /** \brief Gain Over excitation limiter (K). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU koi; + + /** \brief Maximum error signal (V). Typical Value = 0. Default: nullptr */ + CIMPP::PU voimax; + + /** \brief Minimum error signal (V). Typical Value = -9999. Default: nullptr */ + CIMPP::PU voimin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/OverexcLimIEEE.cpp b/CGMES_2.4.15_27JAN2020/OverexcLimIEEE.cpp index 5c44ec73e..0fb3e9857 100644 --- a/CGMES_2.4.15_27JAN2020/OverexcLimIEEE.cpp +++ b/CGMES_2.4.15_27JAN2020/OverexcLimIEEE.cpp @@ -8,17 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -OverexcLimIEEE::OverexcLimIEEE() {}; -OverexcLimIEEE::~OverexcLimIEEE() {}; +OverexcLimIEEE::OverexcLimIEEE() {} +OverexcLimIEEE::~OverexcLimIEEE() {} static const std::list PossibleProfilesForClass = { @@ -50,90 +44,94 @@ OverexcLimIEEE::getPossibleProfilesForAttributes() const return map; } - -bool assign_OverexcLimIEEE_hyst(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimIEEE_hyst(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->hyst; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimIEEE_ifdlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimIEEE_ifdlim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ifdlim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimIEEE_ifdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimIEEE_ifdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ifdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimIEEE_itfpu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimIEEE_itfpu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->itfpu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimIEEE_kcd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimIEEE_kcd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kcd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimIEEE_kramp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimIEEE_kramp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kramp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_OverexcLimIEEE_hyst(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hyst; if (!buffer.str().empty()) @@ -147,7 +145,8 @@ bool get_OverexcLimIEEE_hyst(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_OverexcLimIEEE_ifdlim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ifdlim; if (!buffer.str().empty()) @@ -161,7 +160,8 @@ bool get_OverexcLimIEEE_ifdlim(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_OverexcLimIEEE_ifdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ifdmax; if (!buffer.str().empty()) @@ -175,7 +175,8 @@ bool get_OverexcLimIEEE_ifdmax(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_OverexcLimIEEE_itfpu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->itfpu; if (!buffer.str().empty()) @@ -189,7 +190,8 @@ bool get_OverexcLimIEEE_itfpu(const BaseClass* BaseClass_ptr1, std::stringstream bool get_OverexcLimIEEE_kcd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kcd; if (!buffer.str().empty()) @@ -203,7 +205,8 @@ bool get_OverexcLimIEEE_kcd(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_OverexcLimIEEE_kramp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kramp; if (!buffer.str().empty()) @@ -215,8 +218,6 @@ bool get_OverexcLimIEEE_kramp(const BaseClass* BaseClass_ptr1, std::stringstream return false; } - - const char OverexcLimIEEE::debugName[] = "OverexcLimIEEE"; const char* OverexcLimIEEE::debugString() const { @@ -225,17 +226,17 @@ const char* OverexcLimIEEE::debugString() const void OverexcLimIEEE::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:OverexcLimIEEE"), &OverexcLimIEEE_factory)); + factory_map.emplace("cim:OverexcLimIEEE", &OverexcLimIEEE_factory); } void OverexcLimIEEE::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OverexcLimIEEE.hyst"), &assign_OverexcLimIEEE_hyst)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimIEEE.ifdlim"), &assign_OverexcLimIEEE_ifdlim)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimIEEE.ifdmax"), &assign_OverexcLimIEEE_ifdmax)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimIEEE.itfpu"), &assign_OverexcLimIEEE_itfpu)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimIEEE.kcd"), &assign_OverexcLimIEEE_kcd)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimIEEE.kramp"), &assign_OverexcLimIEEE_kramp)); + assign_map.emplace("cim:OverexcLimIEEE.hyst", &assign_OverexcLimIEEE_hyst); + assign_map.emplace("cim:OverexcLimIEEE.ifdlim", &assign_OverexcLimIEEE_ifdlim); + assign_map.emplace("cim:OverexcLimIEEE.ifdmax", &assign_OverexcLimIEEE_ifdmax); + assign_map.emplace("cim:OverexcLimIEEE.itfpu", &assign_OverexcLimIEEE_itfpu); + assign_map.emplace("cim:OverexcLimIEEE.kcd", &assign_OverexcLimIEEE_kcd); + assign_map.emplace("cim:OverexcLimIEEE.kramp", &assign_OverexcLimIEEE_kramp); } void OverexcLimIEEE::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/OverexcLimIEEE.hpp b/CGMES_2.4.15_27JAN2020/OverexcLimIEEE.hpp index 6159231e3..de8e58374 100644 --- a/CGMES_2.4.15_27JAN2020/OverexcLimIEEE.hpp +++ b/CGMES_2.4.15_27JAN2020/OverexcLimIEEE.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The over excitation limiter model is intended to represent the significant features of OELs necessary for some large-scale system studies. It is the result of a pragmatic approach to obtain a model that can be widely applied with attainable data from generator owners. An attempt to include all variations in the functionality of OELs and duplicate how they interact with the rest of the excitation systems would likely result in a level of application insufficient for the studies for which they are intended. Reference: IEEE OEL 421.5-2005 Section 9. - */ + /** \brief The over excitation limiter model is intended to represent the significant features of OELs necessary for some large-scale system studies. It is the result of a pragmatic approach to obtain a model that can be widely applied with attainable data from generator owners. An attempt to include all variations in the functionality of OELs and duplicate how they interact with the rest of the excitation systems would likely result in a level of application insufficient for the studies for which they are intended. Reference: IEEE OEL 421.5-2005 Section 9. */ class OverexcLimIEEE : public OverexcitationLimiterDynamics { public: @@ -28,12 +26,23 @@ namespace CIMPP OverexcLimIEEE(); ~OverexcLimIEEE() override; - CIMPP::PU hyst; /* OEL pickup/drop-out hysteresis (HYST). Typical Value = 0.03. Default: nullptr */ - CIMPP::PU ifdlim; /* OEL timed field current limit (I). Typical Value = 1.05. Default: nullptr */ - CIMPP::PU ifdmax; /* OEL instantaneous field current limit (I). Typical Value = 1.5. Default: nullptr */ - CIMPP::PU itfpu; /* OEL timed field current limiter pickup level (I). Typical Value = 1.05. Default: nullptr */ - CIMPP::PU kcd; /* OEL cooldown gain (K). Typical Value = 1. Default: nullptr */ - CIMPP::Simple_Float kramp; /* OEL ramped limit rate (K). Unit = PU/sec. Typical Value = 10. Default: nullptr */ + /** \brief OEL pickup/drop-out hysteresis (HYST). Typical Value = 0.03. Default: nullptr */ + CIMPP::PU hyst; + + /** \brief OEL timed field current limit (I). Typical Value = 1.05. Default: nullptr */ + CIMPP::PU ifdlim; + + /** \brief OEL instantaneous field current limit (I). Typical Value = 1.5. Default: nullptr */ + CIMPP::PU ifdmax; + + /** \brief OEL timed field current limiter pickup level (I). Typical Value = 1.05. Default: nullptr */ + CIMPP::PU itfpu; + + /** \brief OEL cooldown gain (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU kcd; + + /** \brief OEL ramped limit rate (K). Unit = PU/sec. Typical Value = 10. Default: nullptr */ + CIMPP::Simple_Float kramp; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/OverexcLimX1.cpp b/CGMES_2.4.15_27JAN2020/OverexcLimX1.cpp index 626fe56e4..c299b0d73 100644 --- a/CGMES_2.4.15_27JAN2020/OverexcLimX1.cpp +++ b/CGMES_2.4.15_27JAN2020/OverexcLimX1.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" using namespace CIMPP; -OverexcLimX1::OverexcLimX1() {}; -OverexcLimX1::~OverexcLimX1() {}; +OverexcLimX1::OverexcLimX1() {} +OverexcLimX1::~OverexcLimX1() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ OverexcLimX1::getPossibleProfilesForAttributes() const return map; } - -bool assign_OverexcLimX1_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX1_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX1_efd3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_efd3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX1_efddes(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_efddes(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efddes; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX1_efdrated(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_efdrated(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdrated; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX1_kmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_kmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX1_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX1_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX1_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX1_vlow(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_vlow(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vlow; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_OverexcLimX1_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_OverexcLimX1_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_OverexcLimX1_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_OverexcLimX1_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_OverexcLimX1_efd3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd3; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_OverexcLimX1_efd3(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_OverexcLimX1_efddes(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efddes; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_OverexcLimX1_efddes(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_OverexcLimX1_efdrated(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdrated; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_OverexcLimX1_efdrated(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_OverexcLimX1_kmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kmx; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_OverexcLimX1_kmx(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_OverexcLimX1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_OverexcLimX1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_OverexcLimX1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_OverexcLimX1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_OverexcLimX1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_OverexcLimX1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_OverexcLimX1_vlow(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vlow; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_OverexcLimX1_vlow(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char OverexcLimX1::debugName[] = "OverexcLimX1"; const char* OverexcLimX1::debugString() const { @@ -341,21 +346,21 @@ const char* OverexcLimX1::debugString() const void OverexcLimX1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:OverexcLimX1"), &OverexcLimX1_factory)); + factory_map.emplace("cim:OverexcLimX1", &OverexcLimX1_factory); } void OverexcLimX1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.efd1"), &assign_OverexcLimX1_efd1)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.efd2"), &assign_OverexcLimX1_efd2)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.efd3"), &assign_OverexcLimX1_efd3)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.efddes"), &assign_OverexcLimX1_efddes)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.efdrated"), &assign_OverexcLimX1_efdrated)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.kmx"), &assign_OverexcLimX1_kmx)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.t1"), &assign_OverexcLimX1_t1)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.t2"), &assign_OverexcLimX1_t2)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.t3"), &assign_OverexcLimX1_t3)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.vlow"), &assign_OverexcLimX1_vlow)); + assign_map.emplace("cim:OverexcLimX1.efd1", &assign_OverexcLimX1_efd1); + assign_map.emplace("cim:OverexcLimX1.efd2", &assign_OverexcLimX1_efd2); + assign_map.emplace("cim:OverexcLimX1.efd3", &assign_OverexcLimX1_efd3); + assign_map.emplace("cim:OverexcLimX1.efddes", &assign_OverexcLimX1_efddes); + assign_map.emplace("cim:OverexcLimX1.efdrated", &assign_OverexcLimX1_efdrated); + assign_map.emplace("cim:OverexcLimX1.kmx", &assign_OverexcLimX1_kmx); + assign_map.emplace("cim:OverexcLimX1.t1", &assign_OverexcLimX1_t1); + assign_map.emplace("cim:OverexcLimX1.t2", &assign_OverexcLimX1_t2); + assign_map.emplace("cim:OverexcLimX1.t3", &assign_OverexcLimX1_t3); + assign_map.emplace("cim:OverexcLimX1.vlow", &assign_OverexcLimX1_vlow); } void OverexcLimX1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/OverexcLimX1.hpp b/CGMES_2.4.15_27JAN2020/OverexcLimX1.hpp index f49d083aa..b0ac52a6c 100644 --- a/CGMES_2.4.15_27JAN2020/OverexcLimX1.hpp +++ b/CGMES_2.4.15_27JAN2020/OverexcLimX1.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Field voltage over excitation limiter. - */ + /** \brief Field voltage over excitation limiter. */ class OverexcLimX1 : public OverexcitationLimiterDynamics { public: @@ -28,16 +26,35 @@ namespace CIMPP OverexcLimX1(); ~OverexcLimX1() override; - CIMPP::PU efd1; /* Low voltage point on the inverse time characteristic (EFD). Typical Value = 1.1. Default: nullptr */ - CIMPP::PU efd2; /* Mid voltage point on the inverse time characteristic (EFD). Typical Value = 1.2. Default: nullptr */ - CIMPP::PU efd3; /* High voltage point on the inverse time characteristic (EFD). Typical Value = 1.5. Default: nullptr */ - CIMPP::PU efddes; /* Desired field voltage (EFD). Typical Value = 0.9. Default: nullptr */ - CIMPP::PU efdrated; /* Rated field voltage (EFD). Typical Value = 1.05. Default: nullptr */ - CIMPP::PU kmx; /* Gain (K). Typical Value = 0.01. Default: nullptr */ - CIMPP::Seconds t1; /* Time to trip the exciter at the low voltage point on the inverse time characteristic (TIME). Typical Value = 120. Default: nullptr */ - CIMPP::Seconds t2; /* Time to trip the exciter at the mid voltage point on the inverse time characteristic (TIME). Typical Value = 40. Default: nullptr */ - CIMPP::Seconds t3; /* Time to trip the exciter at the high voltage point on the inverse time characteristic (TIME). Typical Value = 15. Default: nullptr */ - CIMPP::PU vlow; /* Low voltage limit (V) (>0). Default: nullptr */ + /** \brief Low voltage point on the inverse time characteristic (EFD). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Mid voltage point on the inverse time characteristic (EFD). Typical Value = 1.2. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief High voltage point on the inverse time characteristic (EFD). Typical Value = 1.5. Default: nullptr */ + CIMPP::PU efd3; + + /** \brief Desired field voltage (EFD). Typical Value = 0.9. Default: nullptr */ + CIMPP::PU efddes; + + /** \brief Rated field voltage (EFD). Typical Value = 1.05. Default: nullptr */ + CIMPP::PU efdrated; + + /** \brief Gain (K). Typical Value = 0.01. Default: nullptr */ + CIMPP::PU kmx; + + /** \brief Time to trip the exciter at the low voltage point on the inverse time characteristic (TIME). Typical Value = 120. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Time to trip the exciter at the mid voltage point on the inverse time characteristic (TIME). Typical Value = 40. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Time to trip the exciter at the high voltage point on the inverse time characteristic (TIME). Typical Value = 15. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Low voltage limit (V) (>0). Default: nullptr */ + CIMPP::PU vlow; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/OverexcLimX2.cpp b/CGMES_2.4.15_27JAN2020/OverexcLimX2.cpp index 687643215..0a0443e80 100644 --- a/CGMES_2.4.15_27JAN2020/OverexcLimX2.cpp +++ b/CGMES_2.4.15_27JAN2020/OverexcLimX2.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" using namespace CIMPP; -OverexcLimX2::OverexcLimX2() {}; -OverexcLimX2::~OverexcLimX2() {}; +OverexcLimX2::OverexcLimX2() {} +OverexcLimX2::~OverexcLimX2() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ OverexcLimX2::getPossibleProfilesForAttributes() const return map; } - -bool assign_OverexcLimX2_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_efd3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_efd3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_efddes(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_efddes(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efddes; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_efdrated(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_efdrated(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdrated; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_kmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_kmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_m(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_m(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->m; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_vlow(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_vlow(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vlow; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_OverexcLimX2_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_OverexcLimX2_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_OverexcLimX2_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_OverexcLimX2_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_OverexcLimX2_efd3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd3; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_OverexcLimX2_efd3(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_OverexcLimX2_efddes(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efddes; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_OverexcLimX2_efddes(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_OverexcLimX2_efdrated(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdrated; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_OverexcLimX2_efdrated(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_OverexcLimX2_kmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kmx; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_OverexcLimX2_kmx(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_OverexcLimX2_m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->m; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_OverexcLimX2_m(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_OverexcLimX2_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_OverexcLimX2_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_OverexcLimX2_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_OverexcLimX2_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_OverexcLimX2_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_OverexcLimX2_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_OverexcLimX2_vlow(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vlow; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_OverexcLimX2_vlow(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char OverexcLimX2::debugName[] = "OverexcLimX2"; const char* OverexcLimX2::debugString() const { @@ -370,22 +376,22 @@ const char* OverexcLimX2::debugString() const void OverexcLimX2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:OverexcLimX2"), &OverexcLimX2_factory)); + factory_map.emplace("cim:OverexcLimX2", &OverexcLimX2_factory); } void OverexcLimX2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.efd1"), &assign_OverexcLimX2_efd1)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.efd2"), &assign_OverexcLimX2_efd2)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.efd3"), &assign_OverexcLimX2_efd3)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.efddes"), &assign_OverexcLimX2_efddes)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.efdrated"), &assign_OverexcLimX2_efdrated)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.kmx"), &assign_OverexcLimX2_kmx)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.m"), &assign_OverexcLimX2_m)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.t1"), &assign_OverexcLimX2_t1)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.t2"), &assign_OverexcLimX2_t2)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.t3"), &assign_OverexcLimX2_t3)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.vlow"), &assign_OverexcLimX2_vlow)); + assign_map.emplace("cim:OverexcLimX2.efd1", &assign_OverexcLimX2_efd1); + assign_map.emplace("cim:OverexcLimX2.efd2", &assign_OverexcLimX2_efd2); + assign_map.emplace("cim:OverexcLimX2.efd3", &assign_OverexcLimX2_efd3); + assign_map.emplace("cim:OverexcLimX2.efddes", &assign_OverexcLimX2_efddes); + assign_map.emplace("cim:OverexcLimX2.efdrated", &assign_OverexcLimX2_efdrated); + assign_map.emplace("cim:OverexcLimX2.kmx", &assign_OverexcLimX2_kmx); + assign_map.emplace("cim:OverexcLimX2.m", &assign_OverexcLimX2_m); + assign_map.emplace("cim:OverexcLimX2.t1", &assign_OverexcLimX2_t1); + assign_map.emplace("cim:OverexcLimX2.t2", &assign_OverexcLimX2_t2); + assign_map.emplace("cim:OverexcLimX2.t3", &assign_OverexcLimX2_t3); + assign_map.emplace("cim:OverexcLimX2.vlow", &assign_OverexcLimX2_vlow); } void OverexcLimX2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/OverexcLimX2.hpp b/CGMES_2.4.15_27JAN2020/OverexcLimX2.hpp index dc1b719b4..c361d076c 100644 --- a/CGMES_2.4.15_27JAN2020/OverexcLimX2.hpp +++ b/CGMES_2.4.15_27JAN2020/OverexcLimX2.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Field Voltage or Current overexcitation limiter designed to protect the generator field of an AC machine with automatic excitation control from overheating due to prolonged overexcitation. - */ + /** \brief Field Voltage or Current overexcitation limiter designed to protect the generator field of an AC machine with automatic excitation control from overheating due to prolonged overexcitation. */ class OverexcLimX2 : public OverexcitationLimiterDynamics { public: @@ -29,17 +27,38 @@ namespace CIMPP OverexcLimX2(); ~OverexcLimX2() override; - CIMPP::PU efd1; /* Low voltage or current point on the inverse time characteristic (EFD). Typical Value = 1.1. Default: nullptr */ - CIMPP::PU efd2; /* Mid voltage or current point on the inverse time characteristic (EFD). Typical Value = 1.2. Default: nullptr */ - CIMPP::PU efd3; /* High voltage or current point on the inverse time characteristic (EFD). Typical Value = 1.5. Default: nullptr */ - CIMPP::PU efddes; /* Desired field voltage if m=F or field current if m=T (EFD). Typical Value = 1. Default: nullptr */ - CIMPP::PU efdrated; /* Rated field voltage if m=F or field current if m=T (EFD). Typical Value = 1.05. Default: nullptr */ - CIMPP::PU kmx; /* Gain (K). Typical Value = 0.002. Default: nullptr */ - CIMPP::Boolean m; /* (m). true = IFD limiting false = EFD limiting. Default: false */ - CIMPP::Seconds t1; /* Time to trip the exciter at the low voltage or current point on the inverse time characteristic (TIME). Typical Value = 120. Default: nullptr */ - CIMPP::Seconds t2; /* Time to trip the exciter at the mid voltage or current point on the inverse time characteristic (TIME). Typical Value = 40. Default: nullptr */ - CIMPP::Seconds t3; /* Time to trip the exciter at the high voltage or current point on the inverse time characteristic (TIME). Typical Value = 15. Default: nullptr */ - CIMPP::PU vlow; /* Low voltage limit (V) (>0). Default: nullptr */ + /** \brief Low voltage or current point on the inverse time characteristic (EFD). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Mid voltage or current point on the inverse time characteristic (EFD). Typical Value = 1.2. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief High voltage or current point on the inverse time characteristic (EFD). Typical Value = 1.5. Default: nullptr */ + CIMPP::PU efd3; + + /** \brief Desired field voltage if m=F or field current if m=T (EFD). Typical Value = 1. Default: nullptr */ + CIMPP::PU efddes; + + /** \brief Rated field voltage if m=F or field current if m=T (EFD). Typical Value = 1.05. Default: nullptr */ + CIMPP::PU efdrated; + + /** \brief Gain (K). Typical Value = 0.002. Default: nullptr */ + CIMPP::PU kmx; + + /** \brief (m). true = IFD limiting false = EFD limiting. Default: false */ + CIMPP::Boolean m; + + /** \brief Time to trip the exciter at the low voltage or current point on the inverse time characteristic (TIME). Typical Value = 120. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Time to trip the exciter at the mid voltage or current point on the inverse time characteristic (TIME). Typical Value = 40. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Time to trip the exciter at the high voltage or current point on the inverse time characteristic (TIME). Typical Value = 15. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Low voltage limit (V) (>0). Default: nullptr */ + CIMPP::PU vlow; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/OverexcitationLimiterDynamics.cpp b/CGMES_2.4.15_27JAN2020/OverexcitationLimiterDynamics.cpp index d21fcf0aa..bab89ee82 100644 --- a/CGMES_2.4.15_27JAN2020/OverexcitationLimiterDynamics.cpp +++ b/CGMES_2.4.15_27JAN2020/OverexcitationLimiterDynamics.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -OverexcitationLimiterDynamics::OverexcitationLimiterDynamics() : ExcitationSystemDynamics(nullptr) {}; -OverexcitationLimiterDynamics::~OverexcitationLimiterDynamics() {}; +OverexcitationLimiterDynamics::OverexcitationLimiterDynamics() : ExcitationSystemDynamics(nullptr) {} +OverexcitationLimiterDynamics::~OverexcitationLimiterDynamics() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ OverexcitationLimiterDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_ExcitationSystemDynamics_OverexcitationLimiterDynamics(BaseClass*, BaseClass*); bool assign_OverexcitationLimiterDynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_OverexcitationLimiterDynamics_ExcitationSystemDynamics(BaseClass* Ba return false; } - bool get_OverexcitationLimiterDynamics_ExcitationSystemDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const OverexcitationLimiterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const OverexcitationLimiterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ExcitationSystemDynamics != 0) { @@ -73,7 +71,6 @@ bool get_OverexcitationLimiterDynamics_ExcitationSystemDynamics(const BaseClass* return false; } - const char OverexcitationLimiterDynamics::debugName[] = "OverexcitationLimiterDynamics"; const char* OverexcitationLimiterDynamics::debugString() const { @@ -82,7 +79,7 @@ const char* OverexcitationLimiterDynamics::debugString() const void OverexcitationLimiterDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:OverexcitationLimiterDynamics"), &OverexcitationLimiterDynamics_factory)); + factory_map.emplace("cim:OverexcitationLimiterDynamics", &OverexcitationLimiterDynamics_factory); } void OverexcitationLimiterDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void OverexcitationLimiterDynamics::addPrimitiveAssignFnsToMap(std::unordered_ma void OverexcitationLimiterDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OverexcitationLimiterDynamics.ExcitationSystemDynamics"), &assign_OverexcitationLimiterDynamics_ExcitationSystemDynamics)); + assign_map.emplace("cim:OverexcitationLimiterDynamics.ExcitationSystemDynamics", &assign_OverexcitationLimiterDynamics_ExcitationSystemDynamics); } void OverexcitationLimiterDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/OverexcitationLimiterDynamics.hpp b/CGMES_2.4.15_27JAN2020/OverexcitationLimiterDynamics.hpp index eb6bbd80b..ec4713524 100644 --- a/CGMES_2.4.15_27JAN2020/OverexcitationLimiterDynamics.hpp +++ b/CGMES_2.4.15_27JAN2020/OverexcitationLimiterDynamics.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class ExcitationSystemDynamics; - /* - Overexcitation limiter function block whose behaviour is described by reference to a standard model - */ + /** \brief Overexcitation limiter function block whose behaviour is described by reference to a standard model */ class OverexcitationLimiterDynamics : public DynamicsFunctionBlock { public: @@ -27,7 +25,8 @@ namespace CIMPP OverexcitationLimiterDynamics(); ~OverexcitationLimiterDynamics() override; - CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; /* Excitation system model with which this overexcitation limiter model is associated. Default: 0 */ + /** \brief Excitation system model with which this overexcitation limiter model is associated. Default: 0 */ + CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/OverexcitationLimiterUserDefined.cpp b/CGMES_2.4.15_27JAN2020/OverexcitationLimiterUserDefined.cpp index d5969a0f7..18a97fc36 100644 --- a/CGMES_2.4.15_27JAN2020/OverexcitationLimiterUserDefined.cpp +++ b/CGMES_2.4.15_27JAN2020/OverexcitationLimiterUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -OverexcitationLimiterUserDefined::OverexcitationLimiterUserDefined() {}; -OverexcitationLimiterUserDefined::~OverexcitationLimiterUserDefined() {}; +OverexcitationLimiterUserDefined::OverexcitationLimiterUserDefined() {} +OverexcitationLimiterUserDefined::~OverexcitationLimiterUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ OverexcitationLimiterUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_OverexcitationLimiterUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (OverexcitationLimiterUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_OverexcitationLimiterUserDefined(BaseClass*, BaseClass*); bool assign_OverexcitationLimiterUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_OverexcitationLimiterUserDefined_ProprietaryParameterDynamics(BaseCl return false; } +bool assign_OverexcitationLimiterUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + OverexcitationLimiterUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_OverexcitationLimiterUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcitationLimiterUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const OverexcitationLimiterUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_OverexcitationLimiterUserDefined_proprietary(const BaseClass* BaseClass return false; } - - const char OverexcitationLimiterUserDefined::debugName[] = "OverexcitationLimiterUserDefined"; const char* OverexcitationLimiterUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* OverexcitationLimiterUserDefined::debugString() const void OverexcitationLimiterUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:OverexcitationLimiterUserDefined"), &OverexcitationLimiterUserDefined_factory)); + factory_map.emplace("cim:OverexcitationLimiterUserDefined", &OverexcitationLimiterUserDefined_factory); } void OverexcitationLimiterUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OverexcitationLimiterUserDefined.proprietary"), &assign_OverexcitationLimiterUserDefined_proprietary)); + assign_map.emplace("cim:OverexcitationLimiterUserDefined.proprietary", &assign_OverexcitationLimiterUserDefined_proprietary); } void OverexcitationLimiterUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OverexcitationLimiterUserDefined.ProprietaryParameterDynamics"), &assign_OverexcitationLimiterUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:OverexcitationLimiterUserDefined.ProprietaryParameterDynamics", &assign_OverexcitationLimiterUserDefined_ProprietaryParameterDynamics); } void OverexcitationLimiterUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/OverexcitationLimiterUserDefined.hpp b/CGMES_2.4.15_27JAN2020/OverexcitationLimiterUserDefined.hpp index 66680b8f8..385c02fb4 100644 --- a/CGMES_2.4.15_27JAN2020/OverexcitationLimiterUserDefined.hpp +++ b/CGMES_2.4.15_27JAN2020/OverexcitationLimiterUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Overexcitation limiter system function block whose dynamic behaviour is described by - */ + /** \brief Overexcitation limiter system function block whose dynamic behaviour is described by */ class OverexcitationLimiterUserDefined : public OverexcitationLimiterDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP OverexcitationLimiterUserDefined(); ~OverexcitationLimiterUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/PFVArControllerType1Dynamics.cpp b/CGMES_2.4.15_27JAN2020/PFVArControllerType1Dynamics.cpp index 544174545..a9e1de1b5 100644 --- a/CGMES_2.4.15_27JAN2020/PFVArControllerType1Dynamics.cpp +++ b/CGMES_2.4.15_27JAN2020/PFVArControllerType1Dynamics.cpp @@ -14,8 +14,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -PFVArControllerType1Dynamics::PFVArControllerType1Dynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr), VoltageAdjusterDynamics(nullptr) {}; -PFVArControllerType1Dynamics::~PFVArControllerType1Dynamics() {}; +PFVArControllerType1Dynamics::PFVArControllerType1Dynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr), VoltageAdjusterDynamics(nullptr) {} +PFVArControllerType1Dynamics::~PFVArControllerType1Dynamics() {} static const std::list PossibleProfilesForClass = { @@ -44,8 +44,6 @@ PFVArControllerType1Dynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_ExcitationSystemDynamics_PFVArControllerType1Dynamics(BaseClass*, BaseClass*); bool assign_PFVArControllerType1Dynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -62,6 +60,7 @@ bool assign_PFVArControllerType1Dynamics_ExcitationSystemDynamics(BaseClass* Bas } return false; } + bool assign_RemoteInputSignal_PFVArControllerType1Dynamics(BaseClass*, BaseClass*); bool assign_PFVArControllerType1Dynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -78,6 +77,7 @@ bool assign_PFVArControllerType1Dynamics_RemoteInputSignal(BaseClass* BaseClass_ } return false; } + bool assign_VoltageAdjusterDynamics_PFVArControllerType1Dynamics(BaseClass*, BaseClass*); bool assign_PFVArControllerType1Dynamics_VoltageAdjusterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -95,10 +95,10 @@ bool assign_PFVArControllerType1Dynamics_VoltageAdjusterDynamics(BaseClass* Base return false; } - bool get_PFVArControllerType1Dynamics_ExcitationSystemDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const PFVArControllerType1Dynamics* element = dynamic_cast(BaseClass_ptr1)) + const PFVArControllerType1Dynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ExcitationSystemDynamics != 0) { @@ -110,6 +110,7 @@ bool get_PFVArControllerType1Dynamics_ExcitationSystemDynamics(const BaseClass* } + const char PFVArControllerType1Dynamics::debugName[] = "PFVArControllerType1Dynamics"; const char* PFVArControllerType1Dynamics::debugString() const { @@ -118,7 +119,7 @@ const char* PFVArControllerType1Dynamics::debugString() const void PFVArControllerType1Dynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PFVArControllerType1Dynamics"), &PFVArControllerType1Dynamics_factory)); + factory_map.emplace("cim:PFVArControllerType1Dynamics", &PFVArControllerType1Dynamics_factory); } void PFVArControllerType1Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -127,9 +128,9 @@ void PFVArControllerType1Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map void PFVArControllerType1Dynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType1Dynamics.ExcitationSystemDynamics"), &assign_PFVArControllerType1Dynamics_ExcitationSystemDynamics)); - assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType1Dynamics.RemoteInputSignal"), &assign_PFVArControllerType1Dynamics_RemoteInputSignal)); - assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType1Dynamics.VoltageAdjusterDynamics"), &assign_PFVArControllerType1Dynamics_VoltageAdjusterDynamics)); + assign_map.emplace("cim:PFVArControllerType1Dynamics.ExcitationSystemDynamics", &assign_PFVArControllerType1Dynamics_ExcitationSystemDynamics); + assign_map.emplace("cim:PFVArControllerType1Dynamics.RemoteInputSignal", &assign_PFVArControllerType1Dynamics_RemoteInputSignal); + assign_map.emplace("cim:PFVArControllerType1Dynamics.VoltageAdjusterDynamics", &assign_PFVArControllerType1Dynamics_VoltageAdjusterDynamics); } void PFVArControllerType1Dynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/PFVArControllerType1Dynamics.hpp b/CGMES_2.4.15_27JAN2020/PFVArControllerType1Dynamics.hpp index e9005ed20..722dc238b 100644 --- a/CGMES_2.4.15_27JAN2020/PFVArControllerType1Dynamics.hpp +++ b/CGMES_2.4.15_27JAN2020/PFVArControllerType1Dynamics.hpp @@ -19,9 +19,7 @@ namespace CIMPP class RemoteInputSignal; class VoltageAdjusterDynamics; - /* - Power Factor or VAr controller Type I function block whose behaviour is described by reference to a standard model - */ + /** \brief Power Factor or VAr controller Type I function block whose behaviour is described by reference to a standard model */ class PFVArControllerType1Dynamics : public DynamicsFunctionBlock { public: @@ -29,9 +27,14 @@ namespace CIMPP PFVArControllerType1Dynamics(); ~PFVArControllerType1Dynamics() override; - CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; /* Excitation system model with which this Power Factor or VAr controller Type I model is associated. Default: 0 */ - CIMPP::RemoteInputSignal* RemoteInputSignal; /* Remote input signal used by this Power Factor or VAr controller Type I model. Default: 0 */ - CIMPP::VoltageAdjusterDynamics* VoltageAdjusterDynamics; /* Voltage adjuster model associated with this Power Factor or VA controller Type I model. Default: 0 */ + /** \brief Excitation system model with which this Power Factor or VAr controller Type I model is associated. Default: 0 */ + CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; + + /** \brief Remote input signal used by this Power Factor or VAr controller Type I model. Default: 0 */ + CIMPP::RemoteInputSignal* RemoteInputSignal; + + /** \brief Voltage adjuster model associated with this Power Factor or VA controller Type I model. Default: 0 */ + CIMPP::VoltageAdjusterDynamics* VoltageAdjusterDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/PFVArControllerType1UserDefined.cpp b/CGMES_2.4.15_27JAN2020/PFVArControllerType1UserDefined.cpp index e539e26f4..10b773647 100644 --- a/CGMES_2.4.15_27JAN2020/PFVArControllerType1UserDefined.cpp +++ b/CGMES_2.4.15_27JAN2020/PFVArControllerType1UserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -PFVArControllerType1UserDefined::PFVArControllerType1UserDefined() {}; -PFVArControllerType1UserDefined::~PFVArControllerType1UserDefined() {}; +PFVArControllerType1UserDefined::PFVArControllerType1UserDefined() {} +PFVArControllerType1UserDefined::~PFVArControllerType1UserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ PFVArControllerType1UserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_PFVArControllerType1UserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (PFVArControllerType1UserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_PFVArControllerType1UserDefined(BaseClass*, BaseClass*); bool assign_PFVArControllerType1UserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_PFVArControllerType1UserDefined_ProprietaryParameterDynamics(BaseCla return false; } +bool assign_PFVArControllerType1UserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + PFVArControllerType1UserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_PFVArControllerType1UserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArControllerType1UserDefined* element = dynamic_cast(BaseClass_ptr1)) + const PFVArControllerType1UserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_PFVArControllerType1UserDefined_proprietary(const BaseClass* BaseClass_ return false; } - - const char PFVArControllerType1UserDefined::debugName[] = "PFVArControllerType1UserDefined"; const char* PFVArControllerType1UserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* PFVArControllerType1UserDefined::debugString() const void PFVArControllerType1UserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PFVArControllerType1UserDefined"), &PFVArControllerType1UserDefined_factory)); + factory_map.emplace("cim:PFVArControllerType1UserDefined", &PFVArControllerType1UserDefined_factory); } void PFVArControllerType1UserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType1UserDefined.proprietary"), &assign_PFVArControllerType1UserDefined_proprietary)); + assign_map.emplace("cim:PFVArControllerType1UserDefined.proprietary", &assign_PFVArControllerType1UserDefined_proprietary); } void PFVArControllerType1UserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType1UserDefined.ProprietaryParameterDynamics"), &assign_PFVArControllerType1UserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:PFVArControllerType1UserDefined.ProprietaryParameterDynamics", &assign_PFVArControllerType1UserDefined_ProprietaryParameterDynamics); } void PFVArControllerType1UserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/PFVArControllerType1UserDefined.hpp b/CGMES_2.4.15_27JAN2020/PFVArControllerType1UserDefined.hpp index 8fe7e1e23..c324b0c9f 100644 --- a/CGMES_2.4.15_27JAN2020/PFVArControllerType1UserDefined.hpp +++ b/CGMES_2.4.15_27JAN2020/PFVArControllerType1UserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Power Factor or VAr controller Type I function block whose dynamic behaviour is described by - */ + /** \brief Power Factor or VAr controller Type I function block whose dynamic behaviour is described by */ class PFVArControllerType1UserDefined : public PFVArControllerType1Dynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP PFVArControllerType1UserDefined(); ~PFVArControllerType1UserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/PFVArControllerType2Dynamics.cpp b/CGMES_2.4.15_27JAN2020/PFVArControllerType2Dynamics.cpp index c595f575a..e6c875b3a 100644 --- a/CGMES_2.4.15_27JAN2020/PFVArControllerType2Dynamics.cpp +++ b/CGMES_2.4.15_27JAN2020/PFVArControllerType2Dynamics.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -PFVArControllerType2Dynamics::PFVArControllerType2Dynamics() : ExcitationSystemDynamics(nullptr) {}; -PFVArControllerType2Dynamics::~PFVArControllerType2Dynamics() {}; +PFVArControllerType2Dynamics::PFVArControllerType2Dynamics() : ExcitationSystemDynamics(nullptr) {} +PFVArControllerType2Dynamics::~PFVArControllerType2Dynamics() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ PFVArControllerType2Dynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_ExcitationSystemDynamics_PFVArControllerType2Dynamics(BaseClass*, BaseClass*); bool assign_PFVArControllerType2Dynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_PFVArControllerType2Dynamics_ExcitationSystemDynamics(BaseClass* Bas return false; } - bool get_PFVArControllerType2Dynamics_ExcitationSystemDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const PFVArControllerType2Dynamics* element = dynamic_cast(BaseClass_ptr1)) + const PFVArControllerType2Dynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ExcitationSystemDynamics != 0) { @@ -73,7 +71,6 @@ bool get_PFVArControllerType2Dynamics_ExcitationSystemDynamics(const BaseClass* return false; } - const char PFVArControllerType2Dynamics::debugName[] = "PFVArControllerType2Dynamics"; const char* PFVArControllerType2Dynamics::debugString() const { @@ -82,7 +79,7 @@ const char* PFVArControllerType2Dynamics::debugString() const void PFVArControllerType2Dynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PFVArControllerType2Dynamics"), &PFVArControllerType2Dynamics_factory)); + factory_map.emplace("cim:PFVArControllerType2Dynamics", &PFVArControllerType2Dynamics_factory); } void PFVArControllerType2Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void PFVArControllerType2Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map void PFVArControllerType2Dynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType2Dynamics.ExcitationSystemDynamics"), &assign_PFVArControllerType2Dynamics_ExcitationSystemDynamics)); + assign_map.emplace("cim:PFVArControllerType2Dynamics.ExcitationSystemDynamics", &assign_PFVArControllerType2Dynamics_ExcitationSystemDynamics); } void PFVArControllerType2Dynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/PFVArControllerType2Dynamics.hpp b/CGMES_2.4.15_27JAN2020/PFVArControllerType2Dynamics.hpp index 4c3b5e3eb..28e466647 100644 --- a/CGMES_2.4.15_27JAN2020/PFVArControllerType2Dynamics.hpp +++ b/CGMES_2.4.15_27JAN2020/PFVArControllerType2Dynamics.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class ExcitationSystemDynamics; - /* - Power Factor or VAr controller Type II function block whose behaviour is described by reference to a standard model - */ + /** \brief Power Factor or VAr controller Type II function block whose behaviour is described by reference to a standard model */ class PFVArControllerType2Dynamics : public DynamicsFunctionBlock { public: @@ -27,7 +25,8 @@ namespace CIMPP PFVArControllerType2Dynamics(); ~PFVArControllerType2Dynamics() override; - CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; /* Excitation system model with which this Power Factor or VAr controller Type II is associated. Default: 0 */ + /** \brief Excitation system model with which this Power Factor or VAr controller Type II is associated. Default: 0 */ + CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/PFVArControllerType2UserDefined.cpp b/CGMES_2.4.15_27JAN2020/PFVArControllerType2UserDefined.cpp index 4862d275e..166ceecea 100644 --- a/CGMES_2.4.15_27JAN2020/PFVArControllerType2UserDefined.cpp +++ b/CGMES_2.4.15_27JAN2020/PFVArControllerType2UserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -PFVArControllerType2UserDefined::PFVArControllerType2UserDefined() {}; -PFVArControllerType2UserDefined::~PFVArControllerType2UserDefined() {}; +PFVArControllerType2UserDefined::PFVArControllerType2UserDefined() {} +PFVArControllerType2UserDefined::~PFVArControllerType2UserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ PFVArControllerType2UserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_PFVArControllerType2UserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (PFVArControllerType2UserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_PFVArControllerType2UserDefined(BaseClass*, BaseClass*); bool assign_PFVArControllerType2UserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_PFVArControllerType2UserDefined_ProprietaryParameterDynamics(BaseCla return false; } +bool assign_PFVArControllerType2UserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + PFVArControllerType2UserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_PFVArControllerType2UserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArControllerType2UserDefined* element = dynamic_cast(BaseClass_ptr1)) + const PFVArControllerType2UserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_PFVArControllerType2UserDefined_proprietary(const BaseClass* BaseClass_ return false; } - - const char PFVArControllerType2UserDefined::debugName[] = "PFVArControllerType2UserDefined"; const char* PFVArControllerType2UserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* PFVArControllerType2UserDefined::debugString() const void PFVArControllerType2UserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PFVArControllerType2UserDefined"), &PFVArControllerType2UserDefined_factory)); + factory_map.emplace("cim:PFVArControllerType2UserDefined", &PFVArControllerType2UserDefined_factory); } void PFVArControllerType2UserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType2UserDefined.proprietary"), &assign_PFVArControllerType2UserDefined_proprietary)); + assign_map.emplace("cim:PFVArControllerType2UserDefined.proprietary", &assign_PFVArControllerType2UserDefined_proprietary); } void PFVArControllerType2UserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType2UserDefined.ProprietaryParameterDynamics"), &assign_PFVArControllerType2UserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:PFVArControllerType2UserDefined.ProprietaryParameterDynamics", &assign_PFVArControllerType2UserDefined_ProprietaryParameterDynamics); } void PFVArControllerType2UserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/PFVArControllerType2UserDefined.hpp b/CGMES_2.4.15_27JAN2020/PFVArControllerType2UserDefined.hpp index c549ea396..7a58fa35b 100644 --- a/CGMES_2.4.15_27JAN2020/PFVArControllerType2UserDefined.hpp +++ b/CGMES_2.4.15_27JAN2020/PFVArControllerType2UserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Power Factor or VAr controller Type II function block whose dynamic behaviour is described by - */ + /** \brief Power Factor or VAr controller Type II function block whose dynamic behaviour is described by */ class PFVArControllerType2UserDefined : public PFVArControllerType2Dynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP PFVArControllerType2UserDefined(); ~PFVArControllerType2UserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/PFVArType1IEEEPFController.cpp b/CGMES_2.4.15_27JAN2020/PFVArType1IEEEPFController.cpp index a805b5c82..0bce66721 100644 --- a/CGMES_2.4.15_27JAN2020/PFVArType1IEEEPFController.cpp +++ b/CGMES_2.4.15_27JAN2020/PFVArType1IEEEPFController.cpp @@ -8,19 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PFVArType1IEEEPFController::PFVArType1IEEEPFController() {}; -PFVArType1IEEEPFController::~PFVArType1IEEEPFController() {}; +PFVArType1IEEEPFController::PFVArType1IEEEPFController() {} +PFVArType1IEEEPFController::~PFVArType1IEEEPFController() {} static const std::list PossibleProfilesForClass = { @@ -54,116 +46,122 @@ PFVArType1IEEEPFController::getPossibleProfilesForAttributes() const return map; } - -bool assign_PFVArType1IEEEPFController_ovex(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEPFController_ovex(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ovex; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEPFController_tpfc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEPFController_tpfc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpfc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEPFController_vitmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEPFController_vitmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vitmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEPFController_vpf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEPFController_vpf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vpf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEPFController_vpfcbw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEPFController_vpfcbw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vpfcbw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEPFController_vpfref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEPFController_vpfref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vpfref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEPFController_vvtmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEPFController_vvtmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vvtmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEPFController_vvtmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEPFController_vvtmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vvtmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PFVArType1IEEEPFController_ovex(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ovex; if (!buffer.str().empty()) @@ -177,7 +175,8 @@ bool get_PFVArType1IEEEPFController_ovex(const BaseClass* BaseClass_ptr1, std::s bool get_PFVArType1IEEEPFController_tpfc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpfc; if (!buffer.str().empty()) @@ -191,7 +190,8 @@ bool get_PFVArType1IEEEPFController_tpfc(const BaseClass* BaseClass_ptr1, std::s bool get_PFVArType1IEEEPFController_vitmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vitmin; if (!buffer.str().empty()) @@ -205,7 +205,8 @@ bool get_PFVArType1IEEEPFController_vitmin(const BaseClass* BaseClass_ptr1, std: bool get_PFVArType1IEEEPFController_vpf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vpf; if (!buffer.str().empty()) @@ -219,7 +220,8 @@ bool get_PFVArType1IEEEPFController_vpf(const BaseClass* BaseClass_ptr1, std::st bool get_PFVArType1IEEEPFController_vpfcbw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vpfcbw; if (!buffer.str().empty()) @@ -233,7 +235,8 @@ bool get_PFVArType1IEEEPFController_vpfcbw(const BaseClass* BaseClass_ptr1, std: bool get_PFVArType1IEEEPFController_vpfref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vpfref; if (!buffer.str().empty()) @@ -247,7 +250,8 @@ bool get_PFVArType1IEEEPFController_vpfref(const BaseClass* BaseClass_ptr1, std: bool get_PFVArType1IEEEPFController_vvtmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vvtmax; if (!buffer.str().empty()) @@ -261,7 +265,8 @@ bool get_PFVArType1IEEEPFController_vvtmax(const BaseClass* BaseClass_ptr1, std: bool get_PFVArType1IEEEPFController_vvtmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vvtmin; if (!buffer.str().empty()) @@ -273,8 +278,6 @@ bool get_PFVArType1IEEEPFController_vvtmin(const BaseClass* BaseClass_ptr1, std: return false; } - - const char PFVArType1IEEEPFController::debugName[] = "PFVArType1IEEEPFController"; const char* PFVArType1IEEEPFController::debugString() const { @@ -283,19 +286,19 @@ const char* PFVArType1IEEEPFController::debugString() const void PFVArType1IEEEPFController::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEPFController"), &PFVArType1IEEEPFController_factory)); + factory_map.emplace("cim:PFVArType1IEEEPFController", &PFVArType1IEEEPFController_factory); } void PFVArType1IEEEPFController::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEPFController.ovex"), &assign_PFVArType1IEEEPFController_ovex)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEPFController.tpfc"), &assign_PFVArType1IEEEPFController_tpfc)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEPFController.vitmin"), &assign_PFVArType1IEEEPFController_vitmin)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEPFController.vpf"), &assign_PFVArType1IEEEPFController_vpf)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEPFController.vpfcbw"), &assign_PFVArType1IEEEPFController_vpfcbw)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEPFController.vpfref"), &assign_PFVArType1IEEEPFController_vpfref)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEPFController.vvtmax"), &assign_PFVArType1IEEEPFController_vvtmax)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEPFController.vvtmin"), &assign_PFVArType1IEEEPFController_vvtmin)); + assign_map.emplace("cim:PFVArType1IEEEPFController.ovex", &assign_PFVArType1IEEEPFController_ovex); + assign_map.emplace("cim:PFVArType1IEEEPFController.tpfc", &assign_PFVArType1IEEEPFController_tpfc); + assign_map.emplace("cim:PFVArType1IEEEPFController.vitmin", &assign_PFVArType1IEEEPFController_vitmin); + assign_map.emplace("cim:PFVArType1IEEEPFController.vpf", &assign_PFVArType1IEEEPFController_vpf); + assign_map.emplace("cim:PFVArType1IEEEPFController.vpfcbw", &assign_PFVArType1IEEEPFController_vpfcbw); + assign_map.emplace("cim:PFVArType1IEEEPFController.vpfref", &assign_PFVArType1IEEEPFController_vpfref); + assign_map.emplace("cim:PFVArType1IEEEPFController.vvtmax", &assign_PFVArType1IEEEPFController_vvtmax); + assign_map.emplace("cim:PFVArType1IEEEPFController.vvtmin", &assign_PFVArType1IEEEPFController_vvtmin); } void PFVArType1IEEEPFController::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/PFVArType1IEEEPFController.hpp b/CGMES_2.4.15_27JAN2020/PFVArType1IEEEPFController.hpp index 106df1541..752d31f36 100644 --- a/CGMES_2.4.15_27JAN2020/PFVArType1IEEEPFController.hpp +++ b/CGMES_2.4.15_27JAN2020/PFVArType1IEEEPFController.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE PF Controller Type 1 which operates by moving the voltage reference directly. Reference: IEEE Standard 421.5-2005 Section 11.2. - */ + /** \brief The class represents IEEE PF Controller Type 1 which operates by moving the voltage reference directly. Reference: IEEE Standard 421.5-2005 Section 11.2. */ class PFVArType1IEEEPFController : public PFVArControllerType1Dynamics { public: @@ -30,14 +28,29 @@ namespace CIMPP PFVArType1IEEEPFController(); ~PFVArType1IEEEPFController() override; - CIMPP::Boolean ovex; /* Overexcitation Flag () true = overexcited false = underexcited. Default: false */ - CIMPP::Seconds tpfc; /* PF controller time delay (). Typical Value = 5. Default: nullptr */ - CIMPP::PU vitmin; /* Minimum machine terminal current needed to enable pf/var controller (). Default: nullptr */ - CIMPP::PU vpf; /* Synchronous machine power factor (). Default: nullptr */ - CIMPP::Simple_Float vpfcbw; /* PF controller dead band (). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU vpfref; /* PF controller reference (). Default: nullptr */ - CIMPP::PU vvtmax; /* Maximum machine terminal voltage needed for pf/var controller to be enabled (). Default: nullptr */ - CIMPP::PU vvtmin; /* Minimum machine terminal voltage needed to enable pf/var controller (). Default: nullptr */ + /** \brief Overexcitation Flag () true = overexcited false = underexcited. Default: false */ + CIMPP::Boolean ovex; + + /** \brief PF controller time delay (). Typical Value = 5. Default: nullptr */ + CIMPP::Seconds tpfc; + + /** \brief Minimum machine terminal current needed to enable pf/var controller (). Default: nullptr */ + CIMPP::PU vitmin; + + /** \brief Synchronous machine power factor (). Default: nullptr */ + CIMPP::PU vpf; + + /** \brief PF controller dead band (). Typical Value = 0.05. Default: nullptr */ + CIMPP::Simple_Float vpfcbw; + + /** \brief PF controller reference (). Default: nullptr */ + CIMPP::PU vpfref; + + /** \brief Maximum machine terminal voltage needed for pf/var controller to be enabled (). Default: nullptr */ + CIMPP::PU vvtmax; + + /** \brief Minimum machine terminal voltage needed to enable pf/var controller (). Default: nullptr */ + CIMPP::PU vvtmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/PFVArType1IEEEVArController.cpp b/CGMES_2.4.15_27JAN2020/PFVArType1IEEEVArController.cpp index cab3906b3..589dd60a6 100644 --- a/CGMES_2.4.15_27JAN2020/PFVArType1IEEEVArController.cpp +++ b/CGMES_2.4.15_27JAN2020/PFVArType1IEEEVArController.cpp @@ -8,17 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Seconds.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PFVArType1IEEEVArController::PFVArType1IEEEVArController() {}; -PFVArType1IEEEVArController::~PFVArType1IEEEVArController() {}; +PFVArType1IEEEVArController::PFVArType1IEEEVArController() {} +PFVArType1IEEEVArController::~PFVArType1IEEEVArController() {} static const std::list PossibleProfilesForClass = { @@ -50,90 +44,94 @@ PFVArType1IEEEVArController::getPossibleProfilesForAttributes() const return map; } - -bool assign_PFVArType1IEEEVArController_tvarc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEVArController_tvarc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tvarc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEVArController_vvar(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEVArController_vvar(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vvar; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEVArController_vvarcbw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEVArController_vvarcbw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vvarcbw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEVArController_vvarref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEVArController_vvarref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vvarref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEVArController_vvtmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEVArController_vvtmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vvtmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEVArController_vvtmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEVArController_vvtmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vvtmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PFVArType1IEEEVArController_tvarc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tvarc; if (!buffer.str().empty()) @@ -147,7 +145,8 @@ bool get_PFVArType1IEEEVArController_tvarc(const BaseClass* BaseClass_ptr1, std: bool get_PFVArType1IEEEVArController_vvar(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vvar; if (!buffer.str().empty()) @@ -161,7 +160,8 @@ bool get_PFVArType1IEEEVArController_vvar(const BaseClass* BaseClass_ptr1, std:: bool get_PFVArType1IEEEVArController_vvarcbw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vvarcbw; if (!buffer.str().empty()) @@ -175,7 +175,8 @@ bool get_PFVArType1IEEEVArController_vvarcbw(const BaseClass* BaseClass_ptr1, st bool get_PFVArType1IEEEVArController_vvarref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vvarref; if (!buffer.str().empty()) @@ -189,7 +190,8 @@ bool get_PFVArType1IEEEVArController_vvarref(const BaseClass* BaseClass_ptr1, st bool get_PFVArType1IEEEVArController_vvtmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vvtmax; if (!buffer.str().empty()) @@ -203,7 +205,8 @@ bool get_PFVArType1IEEEVArController_vvtmax(const BaseClass* BaseClass_ptr1, std bool get_PFVArType1IEEEVArController_vvtmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vvtmin; if (!buffer.str().empty()) @@ -215,8 +218,6 @@ bool get_PFVArType1IEEEVArController_vvtmin(const BaseClass* BaseClass_ptr1, std return false; } - - const char PFVArType1IEEEVArController::debugName[] = "PFVArType1IEEEVArController"; const char* PFVArType1IEEEVArController::debugString() const { @@ -225,17 +226,17 @@ const char* PFVArType1IEEEVArController::debugString() const void PFVArType1IEEEVArController::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEVArController"), &PFVArType1IEEEVArController_factory)); + factory_map.emplace("cim:PFVArType1IEEEVArController", &PFVArType1IEEEVArController_factory); } void PFVArType1IEEEVArController::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEVArController.tvarc"), &assign_PFVArType1IEEEVArController_tvarc)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEVArController.vvar"), &assign_PFVArType1IEEEVArController_vvar)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEVArController.vvarcbw"), &assign_PFVArType1IEEEVArController_vvarcbw)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEVArController.vvarref"), &assign_PFVArType1IEEEVArController_vvarref)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEVArController.vvtmax"), &assign_PFVArType1IEEEVArController_vvtmax)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEVArController.vvtmin"), &assign_PFVArType1IEEEVArController_vvtmin)); + assign_map.emplace("cim:PFVArType1IEEEVArController.tvarc", &assign_PFVArType1IEEEVArController_tvarc); + assign_map.emplace("cim:PFVArType1IEEEVArController.vvar", &assign_PFVArType1IEEEVArController_vvar); + assign_map.emplace("cim:PFVArType1IEEEVArController.vvarcbw", &assign_PFVArType1IEEEVArController_vvarcbw); + assign_map.emplace("cim:PFVArType1IEEEVArController.vvarref", &assign_PFVArType1IEEEVArController_vvarref); + assign_map.emplace("cim:PFVArType1IEEEVArController.vvtmax", &assign_PFVArType1IEEEVArController_vvtmax); + assign_map.emplace("cim:PFVArType1IEEEVArController.vvtmin", &assign_PFVArType1IEEEVArController_vvtmin); } void PFVArType1IEEEVArController::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/PFVArType1IEEEVArController.hpp b/CGMES_2.4.15_27JAN2020/PFVArType1IEEEVArController.hpp index 0927c56e5..ccc74b4a4 100644 --- a/CGMES_2.4.15_27JAN2020/PFVArType1IEEEVArController.hpp +++ b/CGMES_2.4.15_27JAN2020/PFVArType1IEEEVArController.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE VAR Controller Type 1 which operates by moving the voltage reference directly. Reference: IEEE Standard 421.5-2005 Section 11.3. - */ + /** \brief The class represents IEEE VAR Controller Type 1 which operates by moving the voltage reference directly. Reference: IEEE Standard 421.5-2005 Section 11.3. */ class PFVArType1IEEEVArController : public PFVArControllerType1Dynamics { public: @@ -29,12 +27,23 @@ namespace CIMPP PFVArType1IEEEVArController(); ~PFVArType1IEEEVArController() override; - CIMPP::Seconds tvarc; /* Var controller time delay (). Typical Value = 5. Default: nullptr */ - CIMPP::PU vvar; /* Synchronous machine power factor (). Default: nullptr */ - CIMPP::Simple_Float vvarcbw; /* Var controller dead band (). Typical Value = 0.02. Default: nullptr */ - CIMPP::PU vvarref; /* Var controller reference (). Default: nullptr */ - CIMPP::PU vvtmax; /* Maximum machine terminal voltage needed for pf/var controller to be enabled (). Default: nullptr */ - CIMPP::PU vvtmin; /* Minimum machine terminal voltage needed to enable pf/var controller (). Default: nullptr */ + /** \brief Var controller time delay (). Typical Value = 5. Default: nullptr */ + CIMPP::Seconds tvarc; + + /** \brief Synchronous machine power factor (). Default: nullptr */ + CIMPP::PU vvar; + + /** \brief Var controller dead band (). Typical Value = 0.02. Default: nullptr */ + CIMPP::Simple_Float vvarcbw; + + /** \brief Var controller reference (). Default: nullptr */ + CIMPP::PU vvarref; + + /** \brief Maximum machine terminal voltage needed for pf/var controller to be enabled (). Default: nullptr */ + CIMPP::PU vvtmax; + + /** \brief Minimum machine terminal voltage needed to enable pf/var controller (). Default: nullptr */ + CIMPP::PU vvtmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/PFVArType2Common1.cpp b/CGMES_2.4.15_27JAN2020/PFVArType2Common1.cpp index 90a818731..8bd6aecd5 100644 --- a/CGMES_2.4.15_27JAN2020/PFVArType2Common1.cpp +++ b/CGMES_2.4.15_27JAN2020/PFVArType2Common1.cpp @@ -8,16 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PFVArType2Common1::PFVArType2Common1() {}; -PFVArType2Common1::~PFVArType2Common1() {}; +PFVArType2Common1::PFVArType2Common1() {} +PFVArType2Common1::~PFVArType2Common1() {} static const std::list PossibleProfilesForClass = { @@ -48,77 +43,80 @@ PFVArType2Common1::getPossibleProfilesForAttributes() const return map; } - -bool assign_PFVArType2Common1_j(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2Common1_j(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->j; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2Common1_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2Common1_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2Common1_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2Common1_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2Common1_max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2Common1_max(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->max; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2Common1_ref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2Common1_ref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PFVArType2Common1_j(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->j; if (!buffer.str().empty()) @@ -132,7 +130,8 @@ bool get_PFVArType2Common1_j(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_PFVArType2Common1_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -146,7 +145,8 @@ bool get_PFVArType2Common1_ki(const BaseClass* BaseClass_ptr1, std::stringstream bool get_PFVArType2Common1_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -160,7 +160,8 @@ bool get_PFVArType2Common1_kp(const BaseClass* BaseClass_ptr1, std::stringstream bool get_PFVArType2Common1_max(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->max; if (!buffer.str().empty()) @@ -174,7 +175,8 @@ bool get_PFVArType2Common1_max(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_PFVArType2Common1_ref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ref; if (!buffer.str().empty()) @@ -186,8 +188,6 @@ bool get_PFVArType2Common1_ref(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } - - const char PFVArType2Common1::debugName[] = "PFVArType2Common1"; const char* PFVArType2Common1::debugString() const { @@ -196,16 +196,16 @@ const char* PFVArType2Common1::debugString() const void PFVArType2Common1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PFVArType2Common1"), &PFVArType2Common1_factory)); + factory_map.emplace("cim:PFVArType2Common1", &PFVArType2Common1_factory); } void PFVArType2Common1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArType2Common1.j"), &assign_PFVArType2Common1_j)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2Common1.ki"), &assign_PFVArType2Common1_ki)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2Common1.kp"), &assign_PFVArType2Common1_kp)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2Common1.max"), &assign_PFVArType2Common1_max)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2Common1.ref"), &assign_PFVArType2Common1_ref)); + assign_map.emplace("cim:PFVArType2Common1.j", &assign_PFVArType2Common1_j); + assign_map.emplace("cim:PFVArType2Common1.ki", &assign_PFVArType2Common1_ki); + assign_map.emplace("cim:PFVArType2Common1.kp", &assign_PFVArType2Common1_kp); + assign_map.emplace("cim:PFVArType2Common1.max", &assign_PFVArType2Common1_max); + assign_map.emplace("cim:PFVArType2Common1.ref", &assign_PFVArType2Common1_ref); } void PFVArType2Common1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/PFVArType2Common1.hpp b/CGMES_2.4.15_27JAN2020/PFVArType2Common1.hpp index 9ea37bc5b..e6ccc4d7a 100644 --- a/CGMES_2.4.15_27JAN2020/PFVArType2Common1.hpp +++ b/CGMES_2.4.15_27JAN2020/PFVArType2Common1.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Power factor / Reactive power regulator. This model represents the power factor or reactive power controller such as the Basler SCP-250. The controller measures power factor or reactive power (PU on generator rated power) and compares it with the operator's set point. - */ + /** \brief Power factor / Reactive power regulator. This model represents the power factor or reactive power controller such as the Basler SCP-250. The controller measures power factor or reactive power (PU on generator rated power) and compares it with the operator's set point. */ class PFVArType2Common1 : public PFVArControllerType2Dynamics { public: @@ -28,11 +26,20 @@ namespace CIMPP PFVArType2Common1(); ~PFVArType2Common1() override; - CIMPP::Boolean j; /* Selector (J). true = control mode for reactive power false = control mode for power factor. Default: false */ - CIMPP::PU ki; /* Reset gain (Ki). Default: nullptr */ - CIMPP::PU kp; /* Proportional gain (Kp). Default: nullptr */ - CIMPP::PU max; /* Output limit (max). Default: nullptr */ - CIMPP::PU ref; /* Reference value of reactive power or power factor (Ref). The reference value is initialised by this model. This initialisation may override the value exchanged by this attribute to represent a plant operator`s change of the reference setting. Default: nullptr */ + /** \brief Selector (J). true = control mode for reactive power false = control mode for power factor. Default: false */ + CIMPP::Boolean j; + + /** \brief Reset gain (Ki). Default: nullptr */ + CIMPP::PU ki; + + /** \brief Proportional gain (Kp). Default: nullptr */ + CIMPP::PU kp; + + /** \brief Output limit (max). Default: nullptr */ + CIMPP::PU max; + + /** \brief Reference value of reactive power or power factor (Ref). The reference value is initialised by this model. This initialisation may override the value exchanged by this attribute to represent a plant operator`s change of the reference setting. Default: nullptr */ + CIMPP::PU ref; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/PFVArType2IEEEPFController.cpp b/CGMES_2.4.15_27JAN2020/PFVArType2IEEEPFController.cpp index bca2a4b63..bdf95df85 100644 --- a/CGMES_2.4.15_27JAN2020/PFVArType2IEEEPFController.cpp +++ b/CGMES_2.4.15_27JAN2020/PFVArType2IEEEPFController.cpp @@ -8,18 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -PFVArType2IEEEPFController::PFVArType2IEEEPFController() {}; -PFVArType2IEEEPFController::~PFVArType2IEEEPFController() {}; +PFVArType2IEEEPFController::PFVArType2IEEEPFController() {} +PFVArType2IEEEPFController::~PFVArType2IEEEPFController() {} static const std::list PossibleProfilesForClass = { @@ -52,103 +45,108 @@ PFVArType2IEEEPFController::getPossibleProfilesForAttributes() const return map; } - -bool assign_PFVArType2IEEEPFController_exlon(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEPFController_exlon(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exlon; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEPFController_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEPFController_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEPFController_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEPFController_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEPFController_pfref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEPFController_pfref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pfref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEPFController_vclmt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEPFController_vclmt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vclmt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEPFController_vref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEPFController_vref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEPFController_vs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEPFController_vs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PFVArType2IEEEPFController_exlon(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exlon; if (!buffer.str().empty()) @@ -162,7 +160,8 @@ bool get_PFVArType2IEEEPFController_exlon(const BaseClass* BaseClass_ptr1, std:: bool get_PFVArType2IEEEPFController_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -176,7 +175,8 @@ bool get_PFVArType2IEEEPFController_ki(const BaseClass* BaseClass_ptr1, std::str bool get_PFVArType2IEEEPFController_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -190,7 +190,8 @@ bool get_PFVArType2IEEEPFController_kp(const BaseClass* BaseClass_ptr1, std::str bool get_PFVArType2IEEEPFController_pfref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pfref; if (!buffer.str().empty()) @@ -204,7 +205,8 @@ bool get_PFVArType2IEEEPFController_pfref(const BaseClass* BaseClass_ptr1, std:: bool get_PFVArType2IEEEPFController_vclmt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vclmt; if (!buffer.str().empty()) @@ -218,7 +220,8 @@ bool get_PFVArType2IEEEPFController_vclmt(const BaseClass* BaseClass_ptr1, std:: bool get_PFVArType2IEEEPFController_vref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vref; if (!buffer.str().empty()) @@ -232,7 +235,8 @@ bool get_PFVArType2IEEEPFController_vref(const BaseClass* BaseClass_ptr1, std::s bool get_PFVArType2IEEEPFController_vs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vs; if (!buffer.str().empty()) @@ -244,8 +248,6 @@ bool get_PFVArType2IEEEPFController_vs(const BaseClass* BaseClass_ptr1, std::str return false; } - - const char PFVArType2IEEEPFController::debugName[] = "PFVArType2IEEEPFController"; const char* PFVArType2IEEEPFController::debugString() const { @@ -254,18 +256,18 @@ const char* PFVArType2IEEEPFController::debugString() const void PFVArType2IEEEPFController::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEPFController"), &PFVArType2IEEEPFController_factory)); + factory_map.emplace("cim:PFVArType2IEEEPFController", &PFVArType2IEEEPFController_factory); } void PFVArType2IEEEPFController::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEPFController.exlon"), &assign_PFVArType2IEEEPFController_exlon)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEPFController.ki"), &assign_PFVArType2IEEEPFController_ki)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEPFController.kp"), &assign_PFVArType2IEEEPFController_kp)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEPFController.pfref"), &assign_PFVArType2IEEEPFController_pfref)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEPFController.vclmt"), &assign_PFVArType2IEEEPFController_vclmt)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEPFController.vref"), &assign_PFVArType2IEEEPFController_vref)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEPFController.vs"), &assign_PFVArType2IEEEPFController_vs)); + assign_map.emplace("cim:PFVArType2IEEEPFController.exlon", &assign_PFVArType2IEEEPFController_exlon); + assign_map.emplace("cim:PFVArType2IEEEPFController.ki", &assign_PFVArType2IEEEPFController_ki); + assign_map.emplace("cim:PFVArType2IEEEPFController.kp", &assign_PFVArType2IEEEPFController_kp); + assign_map.emplace("cim:PFVArType2IEEEPFController.pfref", &assign_PFVArType2IEEEPFController_pfref); + assign_map.emplace("cim:PFVArType2IEEEPFController.vclmt", &assign_PFVArType2IEEEPFController_vclmt); + assign_map.emplace("cim:PFVArType2IEEEPFController.vref", &assign_PFVArType2IEEEPFController_vref); + assign_map.emplace("cim:PFVArType2IEEEPFController.vs", &assign_PFVArType2IEEEPFController_vs); } void PFVArType2IEEEPFController::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/PFVArType2IEEEPFController.hpp b/CGMES_2.4.15_27JAN2020/PFVArType2IEEEPFController.hpp index 19aebd703..b75160448 100644 --- a/CGMES_2.4.15_27JAN2020/PFVArType2IEEEPFController.hpp +++ b/CGMES_2.4.15_27JAN2020/PFVArType2IEEEPFController.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE PF Controller Type 2 which is a summing point type controller and makes up the outside loop of a two-loop system. This controller is implemented as a slow PI type controller. The voltage regulator forms the inner loop and is implemented as a fast controller. Reference: IEEE Standard 421.5-2005 Section 11.4. - */ + /** \brief The class represents IEEE PF Controller Type 2 which is a summing point type controller and makes up the outside loop of a two-loop system. This controller is implemented as a slow PI type controller. The voltage regulator forms the inner loop and is implemented as a fast controller. Reference: IEEE Standard 421.5-2005 Section 11.4. */ class PFVArType2IEEEPFController : public PFVArControllerType2Dynamics { public: @@ -29,13 +27,26 @@ namespace CIMPP PFVArType2IEEEPFController(); ~PFVArType2IEEEPFController() override; - CIMPP::Boolean exlon; /* Overexcitation or under excitation flag () true = 1 (not in the overexcitation or underexcitation state, integral action is active) false = 0 (in the overexcitation or underexcitation state, so integral action is disabled to allow the limiter to play its role). Default: false */ - CIMPP::PU ki; /* Integral gain of the pf controller (). Typical Value = 1. Default: nullptr */ - CIMPP::PU kp; /* Proportional gain of the pf controller (). Typical Value = 1. Default: nullptr */ - CIMPP::PU pfref; /* Power factor reference (). Default: nullptr */ - CIMPP::PU vclmt; /* Maximum output of the pf controller (). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU vref; /* Voltage regulator reference (). Default: nullptr */ - CIMPP::Simple_Float vs; /* Generator sensing voltage (). Default: nullptr */ + /** \brief Overexcitation or under excitation flag () true = 1 (not in the overexcitation or underexcitation state, integral action is active) false = 0 (in the overexcitation or underexcitation state, so integral action is disabled to allow the limiter to play its role). Default: false */ + CIMPP::Boolean exlon; + + /** \brief Integral gain of the pf controller (). Typical Value = 1. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Proportional gain of the pf controller (). Typical Value = 1. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Power factor reference (). Default: nullptr */ + CIMPP::PU pfref; + + /** \brief Maximum output of the pf controller (). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU vclmt; + + /** \brief Voltage regulator reference (). Default: nullptr */ + CIMPP::PU vref; + + /** \brief Generator sensing voltage (). Default: nullptr */ + CIMPP::Simple_Float vs; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/PFVArType2IEEEVArController.cpp b/CGMES_2.4.15_27JAN2020/PFVArType2IEEEVArController.cpp index ac0459fe6..56e3c29b0 100644 --- a/CGMES_2.4.15_27JAN2020/PFVArType2IEEEVArController.cpp +++ b/CGMES_2.4.15_27JAN2020/PFVArType2IEEEVArController.cpp @@ -8,18 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -PFVArType2IEEEVArController::PFVArType2IEEEVArController() {}; -PFVArType2IEEEVArController::~PFVArType2IEEEVArController() {}; +PFVArType2IEEEVArController::PFVArType2IEEEVArController() {} +PFVArType2IEEEVArController::~PFVArType2IEEEVArController() {} static const std::list PossibleProfilesForClass = { @@ -52,103 +45,108 @@ PFVArType2IEEEVArController::getPossibleProfilesForAttributes() const return map; } - -bool assign_PFVArType2IEEEVArController_exlon(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEVArController_exlon(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exlon; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEVArController_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEVArController_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEVArController_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEVArController_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEVArController_qref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEVArController_qref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEVArController_vclmt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEVArController_vclmt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vclmt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEVArController_vref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEVArController_vref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEVArController_vs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEVArController_vs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PFVArType2IEEEVArController_exlon(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exlon; if (!buffer.str().empty()) @@ -162,7 +160,8 @@ bool get_PFVArType2IEEEVArController_exlon(const BaseClass* BaseClass_ptr1, std: bool get_PFVArType2IEEEVArController_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -176,7 +175,8 @@ bool get_PFVArType2IEEEVArController_ki(const BaseClass* BaseClass_ptr1, std::st bool get_PFVArType2IEEEVArController_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -190,7 +190,8 @@ bool get_PFVArType2IEEEVArController_kp(const BaseClass* BaseClass_ptr1, std::st bool get_PFVArType2IEEEVArController_qref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qref; if (!buffer.str().empty()) @@ -204,7 +205,8 @@ bool get_PFVArType2IEEEVArController_qref(const BaseClass* BaseClass_ptr1, std:: bool get_PFVArType2IEEEVArController_vclmt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vclmt; if (!buffer.str().empty()) @@ -218,7 +220,8 @@ bool get_PFVArType2IEEEVArController_vclmt(const BaseClass* BaseClass_ptr1, std: bool get_PFVArType2IEEEVArController_vref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vref; if (!buffer.str().empty()) @@ -232,7 +235,8 @@ bool get_PFVArType2IEEEVArController_vref(const BaseClass* BaseClass_ptr1, std:: bool get_PFVArType2IEEEVArController_vs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vs; if (!buffer.str().empty()) @@ -244,8 +248,6 @@ bool get_PFVArType2IEEEVArController_vs(const BaseClass* BaseClass_ptr1, std::st return false; } - - const char PFVArType2IEEEVArController::debugName[] = "PFVArType2IEEEVArController"; const char* PFVArType2IEEEVArController::debugString() const { @@ -254,18 +256,18 @@ const char* PFVArType2IEEEVArController::debugString() const void PFVArType2IEEEVArController::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEVArController"), &PFVArType2IEEEVArController_factory)); + factory_map.emplace("cim:PFVArType2IEEEVArController", &PFVArType2IEEEVArController_factory); } void PFVArType2IEEEVArController::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEVArController.exlon"), &assign_PFVArType2IEEEVArController_exlon)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEVArController.ki"), &assign_PFVArType2IEEEVArController_ki)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEVArController.kp"), &assign_PFVArType2IEEEVArController_kp)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEVArController.qref"), &assign_PFVArType2IEEEVArController_qref)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEVArController.vclmt"), &assign_PFVArType2IEEEVArController_vclmt)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEVArController.vref"), &assign_PFVArType2IEEEVArController_vref)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEVArController.vs"), &assign_PFVArType2IEEEVArController_vs)); + assign_map.emplace("cim:PFVArType2IEEEVArController.exlon", &assign_PFVArType2IEEEVArController_exlon); + assign_map.emplace("cim:PFVArType2IEEEVArController.ki", &assign_PFVArType2IEEEVArController_ki); + assign_map.emplace("cim:PFVArType2IEEEVArController.kp", &assign_PFVArType2IEEEVArController_kp); + assign_map.emplace("cim:PFVArType2IEEEVArController.qref", &assign_PFVArType2IEEEVArController_qref); + assign_map.emplace("cim:PFVArType2IEEEVArController.vclmt", &assign_PFVArType2IEEEVArController_vclmt); + assign_map.emplace("cim:PFVArType2IEEEVArController.vref", &assign_PFVArType2IEEEVArController_vref); + assign_map.emplace("cim:PFVArType2IEEEVArController.vs", &assign_PFVArType2IEEEVArController_vs); } void PFVArType2IEEEVArController::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/PFVArType2IEEEVArController.hpp b/CGMES_2.4.15_27JAN2020/PFVArType2IEEEVArController.hpp index 746687398..e5a578551 100644 --- a/CGMES_2.4.15_27JAN2020/PFVArType2IEEEVArController.hpp +++ b/CGMES_2.4.15_27JAN2020/PFVArType2IEEEVArController.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE VAR Controller Type 2 which is a summing point type controller. It makes up the outside loop of a two-loop system. This controller is implemented as a slow PI type controller, and the voltage regulator forms the inner loop and is implemented as a fast controller. Reference: IEEE Standard 421.5-2005 Section 11.5. - */ + /** \brief The class represents IEEE VAR Controller Type 2 which is a summing point type controller. It makes up the outside loop of a two-loop system. This controller is implemented as a slow PI type controller, and the voltage regulator forms the inner loop and is implemented as a fast controller. Reference: IEEE Standard 421.5-2005 Section 11.5. */ class PFVArType2IEEEVArController : public PFVArControllerType2Dynamics { public: @@ -29,13 +27,26 @@ namespace CIMPP PFVArType2IEEEVArController(); ~PFVArType2IEEEVArController() override; - CIMPP::Boolean exlon; /* Overexcitation or under excitation flag () true = 1 (not in the overexcitation or underexcitation state, integral action is active) false = 0 (in the overexcitation or underexcitation state, so integral action is disabled to allow the limiter to play its role). Default: false */ - CIMPP::PU ki; /* Integral gain of the pf controller (). Default: nullptr */ - CIMPP::PU kp; /* Proportional gain of the pf controller (). Default: nullptr */ - CIMPP::PU qref; /* Reactive power reference (). Default: nullptr */ - CIMPP::PU vclmt; /* Maximum output of the pf controller (). Default: nullptr */ - CIMPP::PU vref; /* Voltage regulator reference (). Default: nullptr */ - CIMPP::Simple_Float vs; /* Generator sensing voltage (). Default: nullptr */ + /** \brief Overexcitation or under excitation flag () true = 1 (not in the overexcitation or underexcitation state, integral action is active) false = 0 (in the overexcitation or underexcitation state, so integral action is disabled to allow the limiter to play its role). Default: false */ + CIMPP::Boolean exlon; + + /** \brief Integral gain of the pf controller (). Default: nullptr */ + CIMPP::PU ki; + + /** \brief Proportional gain of the pf controller (). Default: nullptr */ + CIMPP::PU kp; + + /** \brief Reactive power reference (). Default: nullptr */ + CIMPP::PU qref; + + /** \brief Maximum output of the pf controller (). Default: nullptr */ + CIMPP::PU vclmt; + + /** \brief Voltage regulator reference (). Default: nullptr */ + CIMPP::PU vref; + + /** \brief Generator sensing voltage (). Default: nullptr */ + CIMPP::Simple_Float vs; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/PU.hpp b/CGMES_2.4.15_27JAN2020/PU.hpp index 51a1d1117..623ad9e3b 100644 --- a/CGMES_2.4.15_27JAN2020/PU.hpp +++ b/CGMES_2.4.15_27JAN2020/PU.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Per Unit - a positive or negative value referred to a defined base. Values typically range from -10 to +10. - */ + /** \brief Per Unit - a positive or negative value referred to a defined base. Values typically range from -10 to +10. */ class PU { public: diff --git a/CGMES_2.4.15_27JAN2020/PerCent.hpp b/CGMES_2.4.15_27JAN2020/PerCent.hpp index 67bb36e78..d395c6119 100644 --- a/CGMES_2.4.15_27JAN2020/PerCent.hpp +++ b/CGMES_2.4.15_27JAN2020/PerCent.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Percentage on a defined base. For example, specify as 100 to indicate at the defined base. - */ + /** \brief Percentage on a defined base. For example, specify as 100 to indicate at the defined base. */ class PerCent { public: diff --git a/CGMES_2.4.15_27JAN2020/PerLengthDCLineParameter.cpp b/CGMES_2.4.15_27JAN2020/PerLengthDCLineParameter.cpp index b0b2d3ade..f92329e76 100644 --- a/CGMES_2.4.15_27JAN2020/PerLengthDCLineParameter.cpp +++ b/CGMES_2.4.15_27JAN2020/PerLengthDCLineParameter.cpp @@ -9,14 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "DCLineSegment.hpp" -#include "CapacitancePerLength.hpp" -#include "InductancePerLength.hpp" -#include "ResistancePerLength.hpp" using namespace CIMPP; -PerLengthDCLineParameter::PerLengthDCLineParameter() {}; -PerLengthDCLineParameter::~PerLengthDCLineParameter() {}; +PerLengthDCLineParameter::PerLengthDCLineParameter() {} +PerLengthDCLineParameter::~PerLengthDCLineParameter() {} static const std::list PossibleProfilesForClass = { @@ -46,67 +43,70 @@ PerLengthDCLineParameter::getPossibleProfilesForAttributes() const return map; } - -bool assign_PerLengthDCLineParameter_capacitance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCLineSegment_PerLengthParameter(BaseClass*, BaseClass*); +bool assign_PerLengthDCLineParameter_DCLineSegments(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1)) + PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1); + DCLineSegment* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->capacitance; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->DCLineSegments.begin(), element->DCLineSegments.end(), element2) == element->DCLineSegments.end()) + { + element->DCLineSegments.push_back(element2); + return assign_DCLineSegment_PerLengthParameter(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_PerLengthDCLineParameter_inductance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PerLengthDCLineParameter_capacitance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1)) + PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->inductance; - if (buffer.fail()) - return false; - else + buffer >> element->capacitance; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PerLengthDCLineParameter_resistance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PerLengthDCLineParameter_inductance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1)) + PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->resistance; - if (buffer.fail()) - return false; - else + buffer >> element->inductance; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_DCLineSegment_PerLengthParameter(BaseClass*, BaseClass*); -bool assign_PerLengthDCLineParameter_DCLineSegments(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_PerLengthDCLineParameter_resistance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1); - DCLineSegment* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->DCLineSegments.begin(), element->DCLineSegments.end(), element2) == element->DCLineSegments.end()) + buffer >> element->resistance; + if (!buffer.fail()) { - element->DCLineSegments.push_back(element2); - return assign_DCLineSegment_PerLengthParameter(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_PerLengthDCLineParameter_capacitance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1)) + const PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->capacitance; if (!buffer.str().empty()) @@ -120,7 +120,8 @@ bool get_PerLengthDCLineParameter_capacitance(const BaseClass* BaseClass_ptr1, s bool get_PerLengthDCLineParameter_inductance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1)) + const PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inductance; if (!buffer.str().empty()) @@ -134,7 +135,8 @@ bool get_PerLengthDCLineParameter_inductance(const BaseClass* BaseClass_ptr1, st bool get_PerLengthDCLineParameter_resistance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1)) + const PerLengthDCLineParameter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->resistance; if (!buffer.str().empty()) @@ -146,8 +148,6 @@ bool get_PerLengthDCLineParameter_resistance(const BaseClass* BaseClass_ptr1, st return false; } - - const char PerLengthDCLineParameter::debugName[] = "PerLengthDCLineParameter"; const char* PerLengthDCLineParameter::debugString() const { @@ -156,19 +156,19 @@ const char* PerLengthDCLineParameter::debugString() const void PerLengthDCLineParameter::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PerLengthDCLineParameter"), &PerLengthDCLineParameter_factory)); + factory_map.emplace("cim:PerLengthDCLineParameter", &PerLengthDCLineParameter_factory); } void PerLengthDCLineParameter::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PerLengthDCLineParameter.capacitance"), &assign_PerLengthDCLineParameter_capacitance)); - assign_map.insert(std::make_pair(std::string("cim:PerLengthDCLineParameter.inductance"), &assign_PerLengthDCLineParameter_inductance)); - assign_map.insert(std::make_pair(std::string("cim:PerLengthDCLineParameter.resistance"), &assign_PerLengthDCLineParameter_resistance)); + assign_map.emplace("cim:PerLengthDCLineParameter.capacitance", &assign_PerLengthDCLineParameter_capacitance); + assign_map.emplace("cim:PerLengthDCLineParameter.inductance", &assign_PerLengthDCLineParameter_inductance); + assign_map.emplace("cim:PerLengthDCLineParameter.resistance", &assign_PerLengthDCLineParameter_resistance); } void PerLengthDCLineParameter::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PerLengthDCLineParameter.DCLineSegments"), &assign_PerLengthDCLineParameter_DCLineSegments)); + assign_map.emplace("cim:PerLengthDCLineParameter.DCLineSegments", &assign_PerLengthDCLineParameter_DCLineSegments); } void PerLengthDCLineParameter::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/PerLengthDCLineParameter.hpp b/CGMES_2.4.15_27JAN2020/PerLengthDCLineParameter.hpp index 9fc92a350..5f5cadcde 100644 --- a/CGMES_2.4.15_27JAN2020/PerLengthDCLineParameter.hpp +++ b/CGMES_2.4.15_27JAN2020/PerLengthDCLineParameter.hpp @@ -27,10 +27,17 @@ namespace CIMPP PerLengthDCLineParameter(); ~PerLengthDCLineParameter() override; - std::list DCLineSegments; /* All line segments described by this set of per-length parameters. Default: 0 */ - CIMPP::CapacitancePerLength capacitance; /* Capacitance per unit of length of the DC line segment; significant for cables only. Default: nullptr */ - CIMPP::InductancePerLength inductance; /* Inductance per unit of length of the DC line segment. Default: nullptr */ - CIMPP::ResistancePerLength resistance; /* Resistance per length of the DC line segment. Default: nullptr */ + /** \brief All line segments described by this set of per-length parameters. Default: 0 */ + std::list DCLineSegments; + + /** \brief Capacitance per unit of length of the DC line segment; significant for cables only. Default: nullptr */ + CIMPP::CapacitancePerLength capacitance; + + /** \brief Inductance per unit of length of the DC line segment. Default: nullptr */ + CIMPP::InductancePerLength inductance; + + /** \brief Resistance per length of the DC line segment. Default: nullptr */ + CIMPP::ResistancePerLength resistance; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/PetersenCoil.cpp b/CGMES_2.4.15_27JAN2020/PetersenCoil.cpp index 61cbe6c5a..d19f1fbad 100644 --- a/CGMES_2.4.15_27JAN2020/PetersenCoil.cpp +++ b/CGMES_2.4.15_27JAN2020/PetersenCoil.cpp @@ -8,18 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PetersenCoilModeKind.hpp" -#include "Voltage.hpp" -#include "CurrentFlow.hpp" -#include "CurrentFlow.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -PetersenCoil::PetersenCoil() {}; -PetersenCoil::~PetersenCoil() {}; +PetersenCoil::PetersenCoil() {} +PetersenCoil::~PetersenCoil() {} static const std::list PossibleProfilesForClass = { @@ -52,103 +45,123 @@ PetersenCoil::getPossibleProfilesForAttributes() const return map; } - -bool assign_PetersenCoil_mode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PetersenCoil_mode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mode; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PetersenCoil_nominalU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PetersenCoil_nominalU(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nominalU; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PetersenCoil_offsetCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PetersenCoil_offsetCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->offsetCurrent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PetersenCoil_positionCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PetersenCoil_positionCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->positionCurrent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PetersenCoil_xGroundMax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PetersenCoil_xGroundMax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xGroundMax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PetersenCoil_xGroundMin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PetersenCoil_xGroundMin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xGroundMin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PetersenCoil_xGroundNominal(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PetersenCoil_xGroundNominal(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xGroundNominal; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - +bool get_PetersenCoil_mode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->mode; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} bool get_PetersenCoil_nominalU(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + const PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nominalU; if (!buffer.str().empty()) @@ -162,7 +175,8 @@ bool get_PetersenCoil_nominalU(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_PetersenCoil_offsetCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + const PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->offsetCurrent; if (!buffer.str().empty()) @@ -176,7 +190,8 @@ bool get_PetersenCoil_offsetCurrent(const BaseClass* BaseClass_ptr1, std::string bool get_PetersenCoil_positionCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + const PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->positionCurrent; if (!buffer.str().empty()) @@ -190,7 +205,8 @@ bool get_PetersenCoil_positionCurrent(const BaseClass* BaseClass_ptr1, std::stri bool get_PetersenCoil_xGroundMax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + const PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xGroundMax; if (!buffer.str().empty()) @@ -204,7 +220,8 @@ bool get_PetersenCoil_xGroundMax(const BaseClass* BaseClass_ptr1, std::stringstr bool get_PetersenCoil_xGroundMin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + const PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xGroundMin; if (!buffer.str().empty()) @@ -218,7 +235,8 @@ bool get_PetersenCoil_xGroundMin(const BaseClass* BaseClass_ptr1, std::stringstr bool get_PetersenCoil_xGroundNominal(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + const PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xGroundNominal; if (!buffer.str().empty()) @@ -230,22 +248,6 @@ bool get_PetersenCoil_xGroundNominal(const BaseClass* BaseClass_ptr1, std::strin return false; } - - -bool get_PetersenCoil_mode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->mode; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char PetersenCoil::debugName[] = "PetersenCoil"; const char* PetersenCoil::debugString() const { @@ -254,18 +256,18 @@ const char* PetersenCoil::debugString() const void PetersenCoil::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PetersenCoil"), &PetersenCoil_factory)); + factory_map.emplace("cim:PetersenCoil", &PetersenCoil_factory); } void PetersenCoil::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PetersenCoil.mode"), &assign_PetersenCoil_mode)); - assign_map.insert(std::make_pair(std::string("cim:PetersenCoil.nominalU"), &assign_PetersenCoil_nominalU)); - assign_map.insert(std::make_pair(std::string("cim:PetersenCoil.offsetCurrent"), &assign_PetersenCoil_offsetCurrent)); - assign_map.insert(std::make_pair(std::string("cim:PetersenCoil.positionCurrent"), &assign_PetersenCoil_positionCurrent)); - assign_map.insert(std::make_pair(std::string("cim:PetersenCoil.xGroundMax"), &assign_PetersenCoil_xGroundMax)); - assign_map.insert(std::make_pair(std::string("cim:PetersenCoil.xGroundMin"), &assign_PetersenCoil_xGroundMin)); - assign_map.insert(std::make_pair(std::string("cim:PetersenCoil.xGroundNominal"), &assign_PetersenCoil_xGroundNominal)); + assign_map.emplace("cim:PetersenCoil.mode", &assign_PetersenCoil_mode); + assign_map.emplace("cim:PetersenCoil.nominalU", &assign_PetersenCoil_nominalU); + assign_map.emplace("cim:PetersenCoil.offsetCurrent", &assign_PetersenCoil_offsetCurrent); + assign_map.emplace("cim:PetersenCoil.positionCurrent", &assign_PetersenCoil_positionCurrent); + assign_map.emplace("cim:PetersenCoil.xGroundMax", &assign_PetersenCoil_xGroundMax); + assign_map.emplace("cim:PetersenCoil.xGroundMin", &assign_PetersenCoil_xGroundMin); + assign_map.emplace("cim:PetersenCoil.xGroundNominal", &assign_PetersenCoil_xGroundNominal); } void PetersenCoil::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/PetersenCoil.hpp b/CGMES_2.4.15_27JAN2020/PetersenCoil.hpp index 3aa9c3444..3fcf3a91b 100644 --- a/CGMES_2.4.15_27JAN2020/PetersenCoil.hpp +++ b/CGMES_2.4.15_27JAN2020/PetersenCoil.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A tunable impedance device normally used to offset line charging during single line faults in an ungrounded section of network. - */ + /** \brief A tunable impedance device normally used to offset line charging during single line faults in an ungrounded section of network. */ class PetersenCoil : public EarthFaultCompensator { public: @@ -30,13 +28,26 @@ namespace CIMPP PetersenCoil(); ~PetersenCoil() override; - CIMPP::PetersenCoilModeKind mode; /* The mode of operation of the Petersen coil. Default: 0 */ - CIMPP::Voltage nominalU; /* The nominal voltage for which the coil is designed. Default: nullptr */ - CIMPP::CurrentFlow offsetCurrent; /* The offset current that the Petersen coil controller is operating from the resonant point. This is normally a fixed amount for which the controller is configured and could be positive or negative. Typically 0 to 60 Amperes depending on voltage and resonance conditions. Default: nullptr */ - CIMPP::CurrentFlow positionCurrent; /* The control current used to control the Petersen coil also known as the position current. Typically in the range of 20-200mA. Default: nullptr */ - CIMPP::Reactance xGroundMax; /* The maximum reactance. Default: nullptr */ - CIMPP::Reactance xGroundMin; /* The minimum reactance. Default: nullptr */ - CIMPP::Reactance xGroundNominal; /* The nominal reactance. This is the operating point (normally over compensation) that is defined based on the resonance point in the healthy network condition. The impedance is calculated based on nominal voltage divided by position current. Default: nullptr */ + /** \brief The mode of operation of the Petersen coil. Default: 0 */ + CIMPP::PetersenCoilModeKind mode; + + /** \brief The nominal voltage for which the coil is designed. Default: nullptr */ + CIMPP::Voltage nominalU; + + /** \brief The offset current that the Petersen coil controller is operating from the resonant point. This is normally a fixed amount for which the controller is configured and could be positive or negative. Typically 0 to 60 Amperes depending on voltage and resonance conditions. Default: nullptr */ + CIMPP::CurrentFlow offsetCurrent; + + /** \brief The control current used to control the Petersen coil also known as the position current. Typically in the range of 20-200mA. Default: nullptr */ + CIMPP::CurrentFlow positionCurrent; + + /** \brief The maximum reactance. Default: nullptr */ + CIMPP::Reactance xGroundMax; + + /** \brief The minimum reactance. Default: nullptr */ + CIMPP::Reactance xGroundMin; + + /** \brief The nominal reactance. This is the operating point (normally over compensation) that is defined based on the resonance point in the healthy network condition. The impedance is calculated based on nominal voltage divided by position current. Default: nullptr */ + CIMPP::Reactance xGroundNominal; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/PetersenCoilModeKind.cpp b/CGMES_2.4.15_27JAN2020/PetersenCoilModeKind.cpp index a2e6dcbf7..441a95595 100644 --- a/CGMES_2.4.15_27JAN2020/PetersenCoilModeKind.cpp +++ b/CGMES_2.4.15_27JAN2020/PetersenCoilModeKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "PetersenCoilModeKind") + if (EnumSymbol.substr(0, pos) != "PetersenCoilModeKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "fixed") + if (EnumSymbol == "fixed") { rop = PetersenCoilModeKind::fixed; return lop; } - if(EnumSymbol == "manual") + if (EnumSymbol == "manual") { rop = PetersenCoilModeKind::manual; return lop; } - if(EnumSymbol == "automaticPositioning") + if (EnumSymbol == "automaticPositioning") { rop = PetersenCoilModeKind::automaticPositioning; return lop; diff --git a/CGMES_2.4.15_27JAN2020/PetersenCoilModeKind.hpp b/CGMES_2.4.15_27JAN2020/PetersenCoilModeKind.hpp index 6bfff0ea0..07e6e819e 100644 --- a/CGMES_2.4.15_27JAN2020/PetersenCoilModeKind.hpp +++ b/CGMES_2.4.15_27JAN2020/PetersenCoilModeKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The mode of operation for a Petersen coil. - */ + /** \brief The mode of operation for a Petersen coil. */ class PetersenCoilModeKind { public: enum PetersenCoilModeKind_ENUM { - /** - * Fixed position. - */ + /** Fixed position. */ fixed, - /** - * Manual positioning. - */ + /** Manual positioning. */ manual, - /** - * Automatic positioning. - */ + /** Automatic positioning. */ automaticPositioning, }; diff --git a/CGMES_2.4.15_27JAN2020/PhaseCode.cpp b/CGMES_2.4.15_27JAN2020/PhaseCode.cpp index 49aa040c7..d8fe957a4 100644 --- a/CGMES_2.4.15_27JAN2020/PhaseCode.cpp +++ b/CGMES_2.4.15_27JAN2020/PhaseCode.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "PhaseCode") + if (EnumSymbol.substr(0, pos) != "PhaseCode") { lop.setstate(std::ios::failbit); return lop; @@ -50,107 +50,107 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "ABCN") + if (EnumSymbol == "ABCN") { rop = PhaseCode::ABCN; return lop; } - if(EnumSymbol == "ABC") + if (EnumSymbol == "ABC") { rop = PhaseCode::ABC; return lop; } - if(EnumSymbol == "ABN") + if (EnumSymbol == "ABN") { rop = PhaseCode::ABN; return lop; } - if(EnumSymbol == "ACN") + if (EnumSymbol == "ACN") { rop = PhaseCode::ACN; return lop; } - if(EnumSymbol == "BCN") + if (EnumSymbol == "BCN") { rop = PhaseCode::BCN; return lop; } - if(EnumSymbol == "AB") + if (EnumSymbol == "AB") { rop = PhaseCode::AB; return lop; } - if(EnumSymbol == "AC") + if (EnumSymbol == "AC") { rop = PhaseCode::AC; return lop; } - if(EnumSymbol == "BC") + if (EnumSymbol == "BC") { rop = PhaseCode::BC; return lop; } - if(EnumSymbol == "AN") + if (EnumSymbol == "AN") { rop = PhaseCode::AN; return lop; } - if(EnumSymbol == "BN") + if (EnumSymbol == "BN") { rop = PhaseCode::BN; return lop; } - if(EnumSymbol == "CN") + if (EnumSymbol == "CN") { rop = PhaseCode::CN; return lop; } - if(EnumSymbol == "A") + if (EnumSymbol == "A") { rop = PhaseCode::A; return lop; } - if(EnumSymbol == "B") + if (EnumSymbol == "B") { rop = PhaseCode::B; return lop; } - if(EnumSymbol == "C") + if (EnumSymbol == "C") { rop = PhaseCode::C; return lop; } - if(EnumSymbol == "N") + if (EnumSymbol == "N") { rop = PhaseCode::N; return lop; } - if(EnumSymbol == "s1N") + if (EnumSymbol == "s1N") { rop = PhaseCode::s1N; return lop; } - if(EnumSymbol == "s2N") + if (EnumSymbol == "s2N") { rop = PhaseCode::s2N; return lop; } - if(EnumSymbol == "s12N") + if (EnumSymbol == "s12N") { rop = PhaseCode::s12N; return lop; } - if(EnumSymbol == "s1") + if (EnumSymbol == "s1") { rop = PhaseCode::s1; return lop; } - if(EnumSymbol == "s2") + if (EnumSymbol == "s2") { rop = PhaseCode::s2; return lop; } - if(EnumSymbol == "s12") + if (EnumSymbol == "s12") { rop = PhaseCode::s12; return lop; diff --git a/CGMES_2.4.15_27JAN2020/PhaseCode.hpp b/CGMES_2.4.15_27JAN2020/PhaseCode.hpp index 37a523ed2..bca621aca 100644 --- a/CGMES_2.4.15_27JAN2020/PhaseCode.hpp +++ b/CGMES_2.4.15_27JAN2020/PhaseCode.hpp @@ -9,97 +9,53 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Enumeration of phase identifiers. Allows designation of phases for both transmission and distribution equipment, circuits and loads. Residential and small commercial loads are often served from single-phase, or split-phase, secondary circuits. For example of s12N, phases 1 and 2 refer to hot wires that are 180 degrees out of phase, while N refers to the neutral wire. Through single-phase transformer connections, these secondary circuits may be served from one or two of the primary phases A, B, and C. For three-phase loads, use the A, B, C phase codes instead of s12N. - */ + /** \brief Enumeration of phase identifiers. Allows designation of phases for both transmission and distribution equipment, circuits and loads. Residential and small commercial loads are often served from single-phase, or split-phase, secondary circuits. For example of s12N, phases 1 and 2 refer to hot wires that are 180 degrees out of phase, while N refers to the neutral wire. Through single-phase transformer connections, these secondary circuits may be served from one or two of the primary phases A, B, and C. For three-phase loads, use the A, B, C phase codes instead of s12N. */ class PhaseCode { public: enum PhaseCode_ENUM { - /** - * Phases A, B, C, and N. - */ + /** Phases A, B, C, and N. */ ABCN, - /** - * Phases A, B, and C. - */ + /** Phases A, B, and C. */ ABC, - /** - * Phases A, B, and neutral. - */ + /** Phases A, B, and neutral. */ ABN, - /** - * Phases A, C and neutral. - */ + /** Phases A, C and neutral. */ ACN, - /** - * Phases B, C, and neutral. - */ + /** Phases B, C, and neutral. */ BCN, - /** - * Phases A and B. - */ + /** Phases A and B. */ AB, - /** - * Phases A and C. - */ + /** Phases A and C. */ AC, - /** - * Phases B and C. - */ + /** Phases B and C. */ BC, - /** - * Phases A and neutral. - */ + /** Phases A and neutral. */ AN, - /** - * Phases B and neutral. - */ + /** Phases B and neutral. */ BN, - /** - * Phases C and neutral. - */ + /** Phases C and neutral. */ CN, - /** - * Phase A. - */ + /** Phase A. */ A, - /** - * Phase B. - */ + /** Phase B. */ B, - /** - * Phase C. - */ + /** Phase C. */ C, - /** - * Neutral phase. - */ + /** Neutral phase. */ N, - /** - * Secondary phase 1 and neutral. - */ + /** Secondary phase 1 and neutral. */ s1N, - /** - * Secondary phase 2 and neutral. - */ + /** Secondary phase 2 and neutral. */ s2N, - /** - * Secondary phases 1, 2, and neutral. - */ + /** Secondary phases 1, 2, and neutral. */ s12N, - /** - * Secondary phase 1. - */ + /** Secondary phase 1. */ s1, - /** - * Secondary phase 2. - */ + /** Secondary phase 2. */ s2, - /** - * Secondary phase 1 and 2. - */ + /** Secondary phase 1 and 2. */ s12, }; diff --git a/CGMES_2.4.15_27JAN2020/PhaseTapChanger.cpp b/CGMES_2.4.15_27JAN2020/PhaseTapChanger.cpp index 0454241af..7e542043f 100644 --- a/CGMES_2.4.15_27JAN2020/PhaseTapChanger.cpp +++ b/CGMES_2.4.15_27JAN2020/PhaseTapChanger.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -PhaseTapChanger::PhaseTapChanger() : TransformerEnd(nullptr) {}; -PhaseTapChanger::~PhaseTapChanger() {}; +PhaseTapChanger::PhaseTapChanger() : TransformerEnd(nullptr) {} +PhaseTapChanger::~PhaseTapChanger() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ PhaseTapChanger::getPossibleProfilesForAttributes() const return map; } - - bool assign_TransformerEnd_PhaseTapChanger(BaseClass*, BaseClass*); bool assign_PhaseTapChanger_TransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,10 +58,10 @@ bool assign_PhaseTapChanger_TransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* return false; } - bool get_PhaseTapChanger_TransformerEnd(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const PhaseTapChanger* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->TransformerEnd != 0) { @@ -74,7 +72,6 @@ bool get_PhaseTapChanger_TransformerEnd(const BaseClass* BaseClass_ptr1, std::li return false; } - const char PhaseTapChanger::debugName[] = "PhaseTapChanger"; const char* PhaseTapChanger::debugString() const { @@ -83,7 +80,7 @@ const char* PhaseTapChanger::debugString() const void PhaseTapChanger::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PhaseTapChanger"), &PhaseTapChanger_factory)); + factory_map.emplace("cim:PhaseTapChanger", &PhaseTapChanger_factory); } void PhaseTapChanger::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -92,7 +89,7 @@ void PhaseTapChanger::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChanger.TransformerEnd"), &assign_PhaseTapChanger_TransformerEnd)); + assign_map.emplace("cim:PhaseTapChanger.TransformerEnd", &assign_PhaseTapChanger_TransformerEnd); } void PhaseTapChanger::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/PhaseTapChanger.hpp b/CGMES_2.4.15_27JAN2020/PhaseTapChanger.hpp index 37489a23b..9fdaa4aa7 100644 --- a/CGMES_2.4.15_27JAN2020/PhaseTapChanger.hpp +++ b/CGMES_2.4.15_27JAN2020/PhaseTapChanger.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class TransformerEnd; - /* - A transformer phase shifting tap model that controls the phase angle difference across the power transformer and potentially the active power flow through the power transformer. This phase tap model may also impact the voltage magnitude. - */ + /** \brief A transformer phase shifting tap model that controls the phase angle difference across the power transformer and potentially the active power flow through the power transformer. This phase tap model may also impact the voltage magnitude. */ class PhaseTapChanger : public TapChanger { public: @@ -27,7 +25,8 @@ namespace CIMPP PhaseTapChanger(); ~PhaseTapChanger() override; - CIMPP::TransformerEnd* TransformerEnd; /* Phase tap changer associated with this transformer end. Default: 0 */ + /** \brief Phase tap changer associated with this transformer end. Default: 0 */ + CIMPP::TransformerEnd* TransformerEnd; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/PhaseTapChangerAsymmetrical.cpp b/CGMES_2.4.15_27JAN2020/PhaseTapChangerAsymmetrical.cpp index d7575eea8..c8b178100 100644 --- a/CGMES_2.4.15_27JAN2020/PhaseTapChangerAsymmetrical.cpp +++ b/CGMES_2.4.15_27JAN2020/PhaseTapChangerAsymmetrical.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "AngleDegrees.hpp" using namespace CIMPP; -PhaseTapChangerAsymmetrical::PhaseTapChangerAsymmetrical() {}; -PhaseTapChangerAsymmetrical::~PhaseTapChangerAsymmetrical() {}; +PhaseTapChangerAsymmetrical::PhaseTapChangerAsymmetrical() {} +PhaseTapChangerAsymmetrical::~PhaseTapChangerAsymmetrical() {} static const std::list PossibleProfilesForClass = { @@ -41,25 +40,24 @@ PhaseTapChangerAsymmetrical::getPossibleProfilesForAttributes() const return map; } - -bool assign_PhaseTapChangerAsymmetrical_windingConnectionAngle(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PhaseTapChangerAsymmetrical_windingConnectionAngle(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PhaseTapChangerAsymmetrical* element = dynamic_cast(BaseClass_ptr1)) + PhaseTapChangerAsymmetrical* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->windingConnectionAngle; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PhaseTapChangerAsymmetrical_windingConnectionAngle(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PhaseTapChangerAsymmetrical* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChangerAsymmetrical* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->windingConnectionAngle; if (!buffer.str().empty()) @@ -71,8 +69,6 @@ bool get_PhaseTapChangerAsymmetrical_windingConnectionAngle(const BaseClass* Bas return false; } - - const char PhaseTapChangerAsymmetrical::debugName[] = "PhaseTapChangerAsymmetrical"; const char* PhaseTapChangerAsymmetrical::debugString() const { @@ -81,12 +77,12 @@ const char* PhaseTapChangerAsymmetrical::debugString() const void PhaseTapChangerAsymmetrical::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PhaseTapChangerAsymmetrical"), &PhaseTapChangerAsymmetrical_factory)); + factory_map.emplace("cim:PhaseTapChangerAsymmetrical", &PhaseTapChangerAsymmetrical_factory); } void PhaseTapChangerAsymmetrical::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerAsymmetrical.windingConnectionAngle"), &assign_PhaseTapChangerAsymmetrical_windingConnectionAngle)); + assign_map.emplace("cim:PhaseTapChangerAsymmetrical.windingConnectionAngle", &assign_PhaseTapChangerAsymmetrical_windingConnectionAngle); } void PhaseTapChangerAsymmetrical::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/PhaseTapChangerAsymmetrical.hpp b/CGMES_2.4.15_27JAN2020/PhaseTapChangerAsymmetrical.hpp index 6f6bbc14c..580e7ca49 100644 --- a/CGMES_2.4.15_27JAN2020/PhaseTapChangerAsymmetrical.hpp +++ b/CGMES_2.4.15_27JAN2020/PhaseTapChangerAsymmetrical.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Describes the tap model for an asymmetrical phase shifting transformer in which the difference voltage vector adds to the primary side voltage. The angle between the primary side voltage and the difference voltage is named the winding connection angle. The phase shift depends on both the difference voltage magnitude and the winding connection angle. - */ + /** \brief Describes the tap model for an asymmetrical phase shifting transformer in which the difference voltage vector adds to the primary side voltage. The angle between the primary side voltage and the difference voltage is named the winding connection angle. The phase shift depends on both the difference voltage magnitude and the winding connection angle. */ class PhaseTapChangerAsymmetrical : public PhaseTapChangerNonLinear { public: @@ -27,7 +25,8 @@ namespace CIMPP PhaseTapChangerAsymmetrical(); ~PhaseTapChangerAsymmetrical() override; - CIMPP::AngleDegrees windingConnectionAngle; /* The phase angle between the in-phase winding and the out-of -phase winding used for creating phase shift. The out-of-phase winding produces what is known as the difference voltage. Setting this angle to 90 degrees is not the same as a symmemtrical transformer. Default: nullptr */ + /** \brief The phase angle between the in-phase winding and the out-of -phase winding used for creating phase shift. The out-of-phase winding produces what is known as the difference voltage. Setting this angle to 90 degrees is not the same as a symmemtrical transformer. Default: nullptr */ + CIMPP::AngleDegrees windingConnectionAngle; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/PhaseTapChangerLinear.cpp b/CGMES_2.4.15_27JAN2020/PhaseTapChangerLinear.cpp index 3adf2a61c..a54861567 100644 --- a/CGMES_2.4.15_27JAN2020/PhaseTapChangerLinear.cpp +++ b/CGMES_2.4.15_27JAN2020/PhaseTapChangerLinear.cpp @@ -8,14 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "AngleDegrees.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -PhaseTapChangerLinear::PhaseTapChangerLinear() {}; -PhaseTapChangerLinear::~PhaseTapChangerLinear() {}; +PhaseTapChangerLinear::PhaseTapChangerLinear() {} +PhaseTapChangerLinear::~PhaseTapChangerLinear() {} static const std::list PossibleProfilesForClass = { @@ -45,51 +42,52 @@ PhaseTapChangerLinear::getPossibleProfilesForAttributes() const return map; } - -bool assign_PhaseTapChangerLinear_stepPhaseShiftIncrement(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PhaseTapChangerLinear_stepPhaseShiftIncrement(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1)) + PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->stepPhaseShiftIncrement; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PhaseTapChangerLinear_xMax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PhaseTapChangerLinear_xMax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1)) + PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xMax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PhaseTapChangerLinear_xMin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PhaseTapChangerLinear_xMin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1)) + PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xMin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PhaseTapChangerLinear_stepPhaseShiftIncrement(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->stepPhaseShiftIncrement; if (!buffer.str().empty()) @@ -103,7 +101,8 @@ bool get_PhaseTapChangerLinear_stepPhaseShiftIncrement(const BaseClass* BaseClas bool get_PhaseTapChangerLinear_xMax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xMax; if (!buffer.str().empty()) @@ -117,7 +116,8 @@ bool get_PhaseTapChangerLinear_xMax(const BaseClass* BaseClass_ptr1, std::string bool get_PhaseTapChangerLinear_xMin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xMin; if (!buffer.str().empty()) @@ -129,8 +129,6 @@ bool get_PhaseTapChangerLinear_xMin(const BaseClass* BaseClass_ptr1, std::string return false; } - - const char PhaseTapChangerLinear::debugName[] = "PhaseTapChangerLinear"; const char* PhaseTapChangerLinear::debugString() const { @@ -139,14 +137,14 @@ const char* PhaseTapChangerLinear::debugString() const void PhaseTapChangerLinear::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PhaseTapChangerLinear"), &PhaseTapChangerLinear_factory)); + factory_map.emplace("cim:PhaseTapChangerLinear", &PhaseTapChangerLinear_factory); } void PhaseTapChangerLinear::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerLinear.stepPhaseShiftIncrement"), &assign_PhaseTapChangerLinear_stepPhaseShiftIncrement)); - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerLinear.xMax"), &assign_PhaseTapChangerLinear_xMax)); - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerLinear.xMin"), &assign_PhaseTapChangerLinear_xMin)); + assign_map.emplace("cim:PhaseTapChangerLinear.stepPhaseShiftIncrement", &assign_PhaseTapChangerLinear_stepPhaseShiftIncrement); + assign_map.emplace("cim:PhaseTapChangerLinear.xMax", &assign_PhaseTapChangerLinear_xMax); + assign_map.emplace("cim:PhaseTapChangerLinear.xMin", &assign_PhaseTapChangerLinear_xMin); } void PhaseTapChangerLinear::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/PhaseTapChangerLinear.hpp b/CGMES_2.4.15_27JAN2020/PhaseTapChangerLinear.hpp index 81c711cca..fb4655393 100644 --- a/CGMES_2.4.15_27JAN2020/PhaseTapChangerLinear.hpp +++ b/CGMES_2.4.15_27JAN2020/PhaseTapChangerLinear.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Describes a tap changer with a linear relation between the tap step and the phase angle difference across the transformer. This is a mathematical model that is an approximation of a real phase tap changer. The phase angle is computed as stepPhaseShitfIncrement times the tap position. The secondary side voltage magnitude is the same as at the primary side. - */ + /** \brief Describes a tap changer with a linear relation between the tap step and the phase angle difference across the transformer. This is a mathematical model that is an approximation of a real phase tap changer. The phase angle is computed as stepPhaseShitfIncrement times the tap position. The secondary side voltage magnitude is the same as at the primary side. */ class PhaseTapChangerLinear : public PhaseTapChanger { public: @@ -28,9 +26,14 @@ namespace CIMPP PhaseTapChangerLinear(); ~PhaseTapChangerLinear() override; - CIMPP::AngleDegrees stepPhaseShiftIncrement; /* Phase shift per step position. A positive value indicates a positive phase shift from the winding where the tap is located to the other winding (for a two-winding transformer). The actual phase shift increment might be more accurately computed from the symmetrical or asymmetrical models or a tap step table lookup if those are available. Default: nullptr */ - CIMPP::Reactance xMax; /* The reactance depend on the tap position according to a `u` shaped curve. The maximum reactance (xMax) appear at the low and high tap positions. Default: nullptr */ - CIMPP::Reactance xMin; /* The reactance depend on the tap position according to a `u` shaped curve. The minimum reactance (xMin) appear at the mid tap position. Default: nullptr */ + /** \brief Phase shift per step position. A positive value indicates a positive phase shift from the winding where the tap is located to the other winding (for a two-winding transformer). The actual phase shift increment might be more accurately computed from the symmetrical or asymmetrical models or a tap step table lookup if those are available. Default: nullptr */ + CIMPP::AngleDegrees stepPhaseShiftIncrement; + + /** \brief The reactance depend on the tap position according to a `u` shaped curve. The maximum reactance (xMax) appear at the low and high tap positions. Default: nullptr */ + CIMPP::Reactance xMax; + + /** \brief The reactance depend on the tap position according to a `u` shaped curve. The minimum reactance (xMin) appear at the mid tap position. Default: nullptr */ + CIMPP::Reactance xMin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/PhaseTapChangerNonLinear.cpp b/CGMES_2.4.15_27JAN2020/PhaseTapChangerNonLinear.cpp index 3dc961ecb..349dad6b6 100644 --- a/CGMES_2.4.15_27JAN2020/PhaseTapChangerNonLinear.cpp +++ b/CGMES_2.4.15_27JAN2020/PhaseTapChangerNonLinear.cpp @@ -8,14 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PerCent.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -PhaseTapChangerNonLinear::PhaseTapChangerNonLinear() {}; -PhaseTapChangerNonLinear::~PhaseTapChangerNonLinear() {}; +PhaseTapChangerNonLinear::PhaseTapChangerNonLinear() {} +PhaseTapChangerNonLinear::~PhaseTapChangerNonLinear() {} static const std::list PossibleProfilesForClass = { @@ -45,51 +42,52 @@ PhaseTapChangerNonLinear::getPossibleProfilesForAttributes() const return map; } - -bool assign_PhaseTapChangerNonLinear_voltageStepIncrement(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PhaseTapChangerNonLinear_voltageStepIncrement(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1)) + PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->voltageStepIncrement; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PhaseTapChangerNonLinear_xMax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PhaseTapChangerNonLinear_xMax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1)) + PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xMax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PhaseTapChangerNonLinear_xMin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PhaseTapChangerNonLinear_xMin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1)) + PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xMin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PhaseTapChangerNonLinear_voltageStepIncrement(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->voltageStepIncrement; if (!buffer.str().empty()) @@ -103,7 +101,8 @@ bool get_PhaseTapChangerNonLinear_voltageStepIncrement(const BaseClass* BaseClas bool get_PhaseTapChangerNonLinear_xMax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xMax; if (!buffer.str().empty()) @@ -117,7 +116,8 @@ bool get_PhaseTapChangerNonLinear_xMax(const BaseClass* BaseClass_ptr1, std::str bool get_PhaseTapChangerNonLinear_xMin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xMin; if (!buffer.str().empty()) @@ -129,8 +129,6 @@ bool get_PhaseTapChangerNonLinear_xMin(const BaseClass* BaseClass_ptr1, std::str return false; } - - const char PhaseTapChangerNonLinear::debugName[] = "PhaseTapChangerNonLinear"; const char* PhaseTapChangerNonLinear::debugString() const { @@ -139,14 +137,14 @@ const char* PhaseTapChangerNonLinear::debugString() const void PhaseTapChangerNonLinear::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PhaseTapChangerNonLinear"), &PhaseTapChangerNonLinear_factory)); + factory_map.emplace("cim:PhaseTapChangerNonLinear", &PhaseTapChangerNonLinear_factory); } void PhaseTapChangerNonLinear::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerNonLinear.voltageStepIncrement"), &assign_PhaseTapChangerNonLinear_voltageStepIncrement)); - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerNonLinear.xMax"), &assign_PhaseTapChangerNonLinear_xMax)); - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerNonLinear.xMin"), &assign_PhaseTapChangerNonLinear_xMin)); + assign_map.emplace("cim:PhaseTapChangerNonLinear.voltageStepIncrement", &assign_PhaseTapChangerNonLinear_voltageStepIncrement); + assign_map.emplace("cim:PhaseTapChangerNonLinear.xMax", &assign_PhaseTapChangerNonLinear_xMax); + assign_map.emplace("cim:PhaseTapChangerNonLinear.xMin", &assign_PhaseTapChangerNonLinear_xMin); } void PhaseTapChangerNonLinear::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/PhaseTapChangerNonLinear.hpp b/CGMES_2.4.15_27JAN2020/PhaseTapChangerNonLinear.hpp index a35713ecc..f45bdb493 100644 --- a/CGMES_2.4.15_27JAN2020/PhaseTapChangerNonLinear.hpp +++ b/CGMES_2.4.15_27JAN2020/PhaseTapChangerNonLinear.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The non-linear phase tap changer describes the non-linear behavior of a phase tap changer. This is a base class for the symmetrical and asymmetrical phase tap changer models. The details of these models can be found in the IEC 61970-301 document. - */ + /** \brief The non-linear phase tap changer describes the non-linear behavior of a phase tap changer. This is a base class for the symmetrical and asymmetrical phase tap changer models. The details of these models can be found in the IEC 61970-301 document. */ class PhaseTapChangerNonLinear : public PhaseTapChanger { public: @@ -28,9 +26,14 @@ namespace CIMPP PhaseTapChangerNonLinear(); ~PhaseTapChangerNonLinear() override; - CIMPP::PerCent voltageStepIncrement; /* The voltage step increment on the out of phase winding specified in percent of nominal voltage of the transformer end. Default: nullptr */ - CIMPP::Reactance xMax; /* The reactance depend on the tap position according to a `u` shaped curve. The maximum reactance (xMax) appear at the low and high tap positions. Default: nullptr */ - CIMPP::Reactance xMin; /* The reactance depend on the tap position according to a `u` shaped curve. The minimum reactance (xMin) appear at the mid tap position. Default: nullptr */ + /** \brief The voltage step increment on the out of phase winding specified in percent of nominal voltage of the transformer end. Default: nullptr */ + CIMPP::PerCent voltageStepIncrement; + + /** \brief The reactance depend on the tap position according to a `u` shaped curve. The maximum reactance (xMax) appear at the low and high tap positions. Default: nullptr */ + CIMPP::Reactance xMax; + + /** \brief The reactance depend on the tap position according to a `u` shaped curve. The minimum reactance (xMin) appear at the mid tap position. Default: nullptr */ + CIMPP::Reactance xMin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/PhaseTapChangerSymmetrical.cpp b/CGMES_2.4.15_27JAN2020/PhaseTapChangerSymmetrical.cpp index 5abde9dad..11987b7ee 100644 --- a/CGMES_2.4.15_27JAN2020/PhaseTapChangerSymmetrical.cpp +++ b/CGMES_2.4.15_27JAN2020/PhaseTapChangerSymmetrical.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -PhaseTapChangerSymmetrical::PhaseTapChangerSymmetrical() {}; -PhaseTapChangerSymmetrical::~PhaseTapChangerSymmetrical() {}; +PhaseTapChangerSymmetrical::PhaseTapChangerSymmetrical() {} +PhaseTapChangerSymmetrical::~PhaseTapChangerSymmetrical() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ PhaseTapChangerSymmetrical::getPossibleProfilesForAttributes() const return map; } - - - - - const char PhaseTapChangerSymmetrical::debugName[] = "PhaseTapChangerSymmetrical"; const char* PhaseTapChangerSymmetrical::debugString() const { @@ -52,7 +47,7 @@ const char* PhaseTapChangerSymmetrical::debugString() const void PhaseTapChangerSymmetrical::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PhaseTapChangerSymmetrical"), &PhaseTapChangerSymmetrical_factory)); + factory_map.emplace("cim:PhaseTapChangerSymmetrical", &PhaseTapChangerSymmetrical_factory); } void PhaseTapChangerSymmetrical::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/PhaseTapChangerSymmetrical.hpp b/CGMES_2.4.15_27JAN2020/PhaseTapChangerSymmetrical.hpp index 736a21f3c..ee1910790 100644 --- a/CGMES_2.4.15_27JAN2020/PhaseTapChangerSymmetrical.hpp +++ b/CGMES_2.4.15_27JAN2020/PhaseTapChangerSymmetrical.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Describes a symmetrical phase shifting transformer tap model in which the secondary side voltage magnitude is the same as at the primary side. The difference voltage magnitude is the base in an equal-sided triangle where the sides corresponds to the primary and secondary voltages. The phase angle difference corresponds to the top angle and can be expressed as twice the arctangent of half the total difference voltage. - */ + /** \brief Describes a symmetrical phase shifting transformer tap model in which the secondary side voltage magnitude is the same as at the primary side. The difference voltage magnitude is the base in an equal-sided triangle where the sides corresponds to the primary and secondary voltages. The phase angle difference corresponds to the top angle and can be expressed as twice the arctangent of half the total difference voltage. */ class PhaseTapChangerSymmetrical : public PhaseTapChangerNonLinear { public: @@ -26,7 +24,6 @@ namespace CIMPP PhaseTapChangerSymmetrical(); ~PhaseTapChangerSymmetrical() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/PhaseTapChangerTable.cpp b/CGMES_2.4.15_27JAN2020/PhaseTapChangerTable.cpp index b9d353812..81e747699 100644 --- a/CGMES_2.4.15_27JAN2020/PhaseTapChangerTable.cpp +++ b/CGMES_2.4.15_27JAN2020/PhaseTapChangerTable.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -PhaseTapChangerTable::PhaseTapChangerTable() {}; -PhaseTapChangerTable::~PhaseTapChangerTable() {}; +PhaseTapChangerTable::PhaseTapChangerTable() {} +PhaseTapChangerTable::~PhaseTapChangerTable() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ PhaseTapChangerTable::getPossibleProfilesForAttributes() const return map; } - - bool assign_PhaseTapChangerTablePoint_PhaseTapChangerTable(BaseClass*, BaseClass*); bool assign_PhaseTapChangerTable_PhaseTapChangerTablePoint(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_PhaseTapChangerTable_PhaseTapChangerTablePoint(BaseClass* BaseClass_ } return false; } + bool assign_PhaseTapChangerTabular_PhaseTapChangerTable(BaseClass*, BaseClass*); bool assign_PhaseTapChangerTable_PhaseTapChangerTabular(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -87,7 +86,7 @@ const char* PhaseTapChangerTable::debugString() const void PhaseTapChangerTable::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTable"), &PhaseTapChangerTable_factory)); + factory_map.emplace("cim:PhaseTapChangerTable", &PhaseTapChangerTable_factory); } void PhaseTapChangerTable::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -96,8 +95,8 @@ void PhaseTapChangerTable::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTable.PhaseTapChangerTablePoint"), &assign_PhaseTapChangerTable_PhaseTapChangerTablePoint)); - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTable.PhaseTapChangerTabular"), &assign_PhaseTapChangerTable_PhaseTapChangerTabular)); + assign_map.emplace("cim:PhaseTapChangerTable.PhaseTapChangerTablePoint", &assign_PhaseTapChangerTable_PhaseTapChangerTablePoint); + assign_map.emplace("cim:PhaseTapChangerTable.PhaseTapChangerTabular", &assign_PhaseTapChangerTable_PhaseTapChangerTabular); } void PhaseTapChangerTable::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/PhaseTapChangerTable.hpp b/CGMES_2.4.15_27JAN2020/PhaseTapChangerTable.hpp index 6291c316c..9b76ee650 100644 --- a/CGMES_2.4.15_27JAN2020/PhaseTapChangerTable.hpp +++ b/CGMES_2.4.15_27JAN2020/PhaseTapChangerTable.hpp @@ -18,9 +18,7 @@ namespace CIMPP class PhaseTapChangerTablePoint; class PhaseTapChangerTabular; - /* - Describes a tabular curve for how the phase angle difference and impedance varies with the tap step. - */ + /** \brief Describes a tabular curve for how the phase angle difference and impedance varies with the tap step. */ class PhaseTapChangerTable : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP PhaseTapChangerTable(); ~PhaseTapChangerTable() override; - std::list PhaseTapChangerTablePoint; /* The points of this table. Default: 0 */ - std::list PhaseTapChangerTabular; /* The phase tap changers to which this phase tap table applies. Default: 0 */ + /** \brief The points of this table. Default: 0 */ + std::list PhaseTapChangerTablePoint; + + /** \brief The phase tap changers to which this phase tap table applies. Default: 0 */ + std::list PhaseTapChangerTabular; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/PhaseTapChangerTablePoint.cpp b/CGMES_2.4.15_27JAN2020/PhaseTapChangerTablePoint.cpp index 156dcecab..e4c877019 100644 --- a/CGMES_2.4.15_27JAN2020/PhaseTapChangerTablePoint.cpp +++ b/CGMES_2.4.15_27JAN2020/PhaseTapChangerTablePoint.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "PhaseTapChangerTable.hpp" -#include "AngleDegrees.hpp" using namespace CIMPP; -PhaseTapChangerTablePoint::PhaseTapChangerTablePoint() : PhaseTapChangerTable(nullptr) {}; -PhaseTapChangerTablePoint::~PhaseTapChangerTablePoint() {}; +PhaseTapChangerTablePoint::PhaseTapChangerTablePoint() : PhaseTapChangerTable(nullptr) {} +PhaseTapChangerTablePoint::~PhaseTapChangerTablePoint() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ PhaseTapChangerTablePoint::getPossibleProfilesForAttributes() const return map; } - -bool assign_PhaseTapChangerTablePoint_angle(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (PhaseTapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->angle; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_PhaseTapChangerTable_PhaseTapChangerTablePoint(BaseClass*, BaseClass*); bool assign_PhaseTapChangerTablePoint_PhaseTapChangerTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_PhaseTapChangerTablePoint_PhaseTapChangerTable(BaseClass* BaseClass_ return false; } -bool get_PhaseTapChangerTablePoint_angle(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_PhaseTapChangerTablePoint_angle(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const PhaseTapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + PhaseTapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->angle; - if (!buffer.str().empty()) + buffer >> element->angle; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_PhaseTapChangerTablePoint_PhaseTapChangerTable(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const PhaseTapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PhaseTapChangerTable != 0) { @@ -102,6 +86,20 @@ bool get_PhaseTapChangerTablePoint_PhaseTapChangerTable(const BaseClass* BaseCla return false; } +bool get_PhaseTapChangerTablePoint_angle(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const PhaseTapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->angle; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char PhaseTapChangerTablePoint::debugName[] = "PhaseTapChangerTablePoint"; const char* PhaseTapChangerTablePoint::debugString() const @@ -111,17 +109,17 @@ const char* PhaseTapChangerTablePoint::debugString() const void PhaseTapChangerTablePoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTablePoint"), &PhaseTapChangerTablePoint_factory)); + factory_map.emplace("cim:PhaseTapChangerTablePoint", &PhaseTapChangerTablePoint_factory); } void PhaseTapChangerTablePoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTablePoint.angle"), &assign_PhaseTapChangerTablePoint_angle)); + assign_map.emplace("cim:PhaseTapChangerTablePoint.angle", &assign_PhaseTapChangerTablePoint_angle); } void PhaseTapChangerTablePoint::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTablePoint.PhaseTapChangerTable"), &assign_PhaseTapChangerTablePoint_PhaseTapChangerTable)); + assign_map.emplace("cim:PhaseTapChangerTablePoint.PhaseTapChangerTable", &assign_PhaseTapChangerTablePoint_PhaseTapChangerTable); } void PhaseTapChangerTablePoint::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/PhaseTapChangerTablePoint.hpp b/CGMES_2.4.15_27JAN2020/PhaseTapChangerTablePoint.hpp index 333ffbc2e..451bb17ad 100644 --- a/CGMES_2.4.15_27JAN2020/PhaseTapChangerTablePoint.hpp +++ b/CGMES_2.4.15_27JAN2020/PhaseTapChangerTablePoint.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class PhaseTapChangerTable; - /* - Describes each tap step in the phase tap changer tabular curve. - */ + /** \brief Describes each tap step in the phase tap changer tabular curve. */ class PhaseTapChangerTablePoint : public TapChangerTablePoint { public: @@ -28,8 +26,11 @@ namespace CIMPP PhaseTapChangerTablePoint(); ~PhaseTapChangerTablePoint() override; - CIMPP::PhaseTapChangerTable* PhaseTapChangerTable; /* The table of this point. Default: 0 */ - CIMPP::AngleDegrees angle; /* The angle difference in degrees. Default: nullptr */ + /** \brief The table of this point. Default: 0 */ + CIMPP::PhaseTapChangerTable* PhaseTapChangerTable; + + /** \brief The angle difference in degrees. Default: nullptr */ + CIMPP::AngleDegrees angle; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/PhaseTapChangerTabular.cpp b/CGMES_2.4.15_27JAN2020/PhaseTapChangerTabular.cpp index b5cec68a7..34a8103ba 100644 --- a/CGMES_2.4.15_27JAN2020/PhaseTapChangerTabular.cpp +++ b/CGMES_2.4.15_27JAN2020/PhaseTapChangerTabular.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -PhaseTapChangerTabular::PhaseTapChangerTabular() : PhaseTapChangerTable(nullptr) {}; -PhaseTapChangerTabular::~PhaseTapChangerTabular() {}; +PhaseTapChangerTabular::PhaseTapChangerTabular() : PhaseTapChangerTable(nullptr) {} +PhaseTapChangerTabular::~PhaseTapChangerTabular() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ PhaseTapChangerTabular::getPossibleProfilesForAttributes() const return map; } - - bool assign_PhaseTapChangerTable_PhaseTapChangerTabular(BaseClass*, BaseClass*); bool assign_PhaseTapChangerTabular_PhaseTapChangerTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,10 +58,10 @@ bool assign_PhaseTapChangerTabular_PhaseTapChangerTable(BaseClass* BaseClass_ptr return false; } - bool get_PhaseTapChangerTabular_PhaseTapChangerTable(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const PhaseTapChangerTabular* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChangerTabular* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PhaseTapChangerTable != 0) { @@ -74,7 +72,6 @@ bool get_PhaseTapChangerTabular_PhaseTapChangerTable(const BaseClass* BaseClass_ return false; } - const char PhaseTapChangerTabular::debugName[] = "PhaseTapChangerTabular"; const char* PhaseTapChangerTabular::debugString() const { @@ -83,7 +80,7 @@ const char* PhaseTapChangerTabular::debugString() const void PhaseTapChangerTabular::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTabular"), &PhaseTapChangerTabular_factory)); + factory_map.emplace("cim:PhaseTapChangerTabular", &PhaseTapChangerTabular_factory); } void PhaseTapChangerTabular::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -92,7 +89,7 @@ void PhaseTapChangerTabular::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTabular.PhaseTapChangerTable"), &assign_PhaseTapChangerTabular_PhaseTapChangerTable)); + assign_map.emplace("cim:PhaseTapChangerTabular.PhaseTapChangerTable", &assign_PhaseTapChangerTabular_PhaseTapChangerTable); } void PhaseTapChangerTabular::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/PhaseTapChangerTabular.hpp b/CGMES_2.4.15_27JAN2020/PhaseTapChangerTabular.hpp index 9d5d9053e..85b69cbec 100644 --- a/CGMES_2.4.15_27JAN2020/PhaseTapChangerTabular.hpp +++ b/CGMES_2.4.15_27JAN2020/PhaseTapChangerTabular.hpp @@ -24,7 +24,8 @@ namespace CIMPP PhaseTapChangerTabular(); ~PhaseTapChangerTabular() override; - CIMPP::PhaseTapChangerTable* PhaseTapChangerTable; /* The phase tap changer table for this phase tap changer. Default: 0 */ + /** \brief The phase tap changer table for this phase tap changer. Default: 0 */ + CIMPP::PhaseTapChangerTable* PhaseTapChangerTable; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/PositionPoint.cpp b/CGMES_2.4.15_27JAN2020/PositionPoint.cpp index 2944edacc..9fbc902cc 100644 --- a/CGMES_2.4.15_27JAN2020/PositionPoint.cpp +++ b/CGMES_2.4.15_27JAN2020/PositionPoint.cpp @@ -9,15 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "Location.hpp" -#include "Integer.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -PositionPoint::PositionPoint() : Location(nullptr) {}; -PositionPoint::~PositionPoint() {}; +PositionPoint::PositionPoint() : Location(nullptr) {} +PositionPoint::~PositionPoint() {} static const std::list PossibleProfilesForClass = { @@ -48,80 +44,97 @@ PositionPoint::getPossibleProfilesForAttributes() const return map; } +bool assign_Location_PositionPoints(BaseClass*, BaseClass*); +bool assign_PositionPoint_Location(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PositionPoint* element = dynamic_cast(BaseClass_ptr1); + Location* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Location != element2) + { + element->Location = element2; + return assign_Location_PositionPoints(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_PositionPoint_sequenceNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PositionPoint_sequenceNumber(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + PositionPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->sequenceNumber; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PositionPoint_xPosition(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PositionPoint_xPosition(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + PositionPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->xPosition = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PositionPoint_yPosition(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PositionPoint_yPosition(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + PositionPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->yPosition = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PositionPoint_zPosition(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PositionPoint_zPosition(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + PositionPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->zPosition = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_Location_PositionPoints(BaseClass*, BaseClass*); -bool assign_PositionPoint_Location(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_PositionPoint_Location(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - PositionPoint* element = dynamic_cast(BaseClass_ptr1); - Location* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const PositionPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->Location != element2) + if (element->Location != 0) { - element->Location = element2; - return assign_Location_PositionPoints(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->Location); + return true; } - return true; } return false; } bool get_PositionPoint_sequenceNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + const PositionPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->sequenceNumber; if (!buffer.str().empty()) @@ -135,7 +148,8 @@ bool get_PositionPoint_sequenceNumber(const BaseClass* BaseClass_ptr1, std::stri bool get_PositionPoint_xPosition(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + const PositionPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xPosition; if (!buffer.str().empty()) @@ -149,7 +163,8 @@ bool get_PositionPoint_xPosition(const BaseClass* BaseClass_ptr1, std::stringstr bool get_PositionPoint_yPosition(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + const PositionPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->yPosition; if (!buffer.str().empty()) @@ -163,7 +178,8 @@ bool get_PositionPoint_yPosition(const BaseClass* BaseClass_ptr1, std::stringstr bool get_PositionPoint_zPosition(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + const PositionPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->zPosition; if (!buffer.str().empty()) @@ -175,21 +191,6 @@ bool get_PositionPoint_zPosition(const BaseClass* BaseClass_ptr1, std::stringstr return false; } - -bool get_PositionPoint_Location(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const PositionPoint* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->Location != 0) - { - BaseClass_list.push_back(element->Location); - return true; - } - } - return false; -} - - const char PositionPoint::debugName[] = "PositionPoint"; const char* PositionPoint::debugString() const { @@ -198,20 +199,20 @@ const char* PositionPoint::debugString() const void PositionPoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PositionPoint"), &PositionPoint_factory)); + factory_map.emplace("cim:PositionPoint", &PositionPoint_factory); } void PositionPoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PositionPoint.sequenceNumber"), &assign_PositionPoint_sequenceNumber)); - assign_map.insert(std::make_pair(std::string("cim:PositionPoint.xPosition"), &assign_PositionPoint_xPosition)); - assign_map.insert(std::make_pair(std::string("cim:PositionPoint.yPosition"), &assign_PositionPoint_yPosition)); - assign_map.insert(std::make_pair(std::string("cim:PositionPoint.zPosition"), &assign_PositionPoint_zPosition)); + assign_map.emplace("cim:PositionPoint.sequenceNumber", &assign_PositionPoint_sequenceNumber); + assign_map.emplace("cim:PositionPoint.xPosition", &assign_PositionPoint_xPosition); + assign_map.emplace("cim:PositionPoint.yPosition", &assign_PositionPoint_yPosition); + assign_map.emplace("cim:PositionPoint.zPosition", &assign_PositionPoint_zPosition); } void PositionPoint::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PositionPoint.Location"), &assign_PositionPoint_Location)); + assign_map.emplace("cim:PositionPoint.Location", &assign_PositionPoint_Location); } void PositionPoint::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/PositionPoint.hpp b/CGMES_2.4.15_27JAN2020/PositionPoint.hpp index b3b6be209..b7eead20b 100644 --- a/CGMES_2.4.15_27JAN2020/PositionPoint.hpp +++ b/CGMES_2.4.15_27JAN2020/PositionPoint.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class Location; - /* - Set of spatial coordinates that determine a point, defined in the coordinate system specified in 'Location.CoordinateSystem'. Use a single position point instance to desribe a point-oriented location. Use a sequence of position points to describe a line-oriented object (physical location of non-point oriented objects like cables or lines), or area of an object (like a substation or a geographical zone - in this case, have first and last position point with the same values). - */ + /** \brief Set of spatial coordinates that determine a point, defined in the coordinate system specified in 'Location.CoordinateSystem'. Use a single position point instance to desribe a point-oriented location. Use a sequence of position points to describe a line-oriented object (physical location of non-point oriented objects like cables or lines), or area of an object (like a substation or a geographical zone - in this case, have first and last position point with the same values). */ class PositionPoint : public BaseClass { public: @@ -29,11 +27,20 @@ namespace CIMPP PositionPoint(); ~PositionPoint() override; - CIMPP::Location* Location; /* Location described by this position point. Default: 0 */ - CIMPP::Integer sequenceNumber; /* Zero-relative sequence number of this point within a series of points. Default: 0 */ - CIMPP::String xPosition; /* X axis position. Default: '' */ - CIMPP::String yPosition; /* Y axis position. Default: '' */ - CIMPP::String zPosition; /* (if applicable) Z axis position. Default: '' */ + /** \brief Location described by this position point. Default: 0 */ + CIMPP::Location* Location; + + /** \brief Zero-relative sequence number of this point within a series of points. Default: 0 */ + CIMPP::Integer sequenceNumber; + + /** \brief X axis position. Default: '' */ + CIMPP::String xPosition; + + /** \brief Y axis position. Default: '' */ + CIMPP::String yPosition; + + /** \brief (if applicable) Z axis position. Default: '' */ + CIMPP::String zPosition; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/PowerSystemResource.cpp b/CGMES_2.4.15_27JAN2020/PowerSystemResource.cpp index 073756be0..dd4878f2c 100644 --- a/CGMES_2.4.15_27JAN2020/PowerSystemResource.cpp +++ b/CGMES_2.4.15_27JAN2020/PowerSystemResource.cpp @@ -14,8 +14,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -PowerSystemResource::PowerSystemResource() : Location(nullptr) {}; -PowerSystemResource::~PowerSystemResource() {}; +PowerSystemResource::PowerSystemResource() : Location(nullptr) {} +PowerSystemResource::~PowerSystemResource() {} static const std::list PossibleProfilesForClass = { @@ -48,8 +48,6 @@ PowerSystemResource::getPossibleProfilesForAttributes() const return map; } - - bool assign_Control_PowerSystemResource(BaseClass*, BaseClass*); bool assign_PowerSystemResource_Controls(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -66,6 +64,7 @@ bool assign_PowerSystemResource_Controls(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_Location_PowerSystemResources(BaseClass*, BaseClass*); bool assign_PowerSystemResource_Location(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -82,6 +81,7 @@ bool assign_PowerSystemResource_Location(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_Measurement_PowerSystemResource(BaseClass*, BaseClass*); bool assign_PowerSystemResource_Measurements(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -101,6 +101,7 @@ bool assign_PowerSystemResource_Measurements(BaseClass* BaseClass_ptr1, BaseClas + const char PowerSystemResource::debugName[] = "PowerSystemResource"; const char* PowerSystemResource::debugString() const { @@ -109,7 +110,7 @@ const char* PowerSystemResource::debugString() const void PowerSystemResource::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PowerSystemResource"), &PowerSystemResource_factory)); + factory_map.emplace("cim:PowerSystemResource", &PowerSystemResource_factory); } void PowerSystemResource::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -118,9 +119,9 @@ void PowerSystemResource::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PowerSystemResource.Controls"), &assign_PowerSystemResource_Controls)); - assign_map.insert(std::make_pair(std::string("cim:PowerSystemResource.Location"), &assign_PowerSystemResource_Location)); - assign_map.insert(std::make_pair(std::string("cim:PowerSystemResource.Measurements"), &assign_PowerSystemResource_Measurements)); + assign_map.emplace("cim:PowerSystemResource.Controls", &assign_PowerSystemResource_Controls); + assign_map.emplace("cim:PowerSystemResource.Location", &assign_PowerSystemResource_Location); + assign_map.emplace("cim:PowerSystemResource.Measurements", &assign_PowerSystemResource_Measurements); } void PowerSystemResource::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/PowerSystemResource.hpp b/CGMES_2.4.15_27JAN2020/PowerSystemResource.hpp index be028a916..ddf8d2070 100644 --- a/CGMES_2.4.15_27JAN2020/PowerSystemResource.hpp +++ b/CGMES_2.4.15_27JAN2020/PowerSystemResource.hpp @@ -19,9 +19,7 @@ namespace CIMPP class Location; class Measurement; - /* - A power system resource can be an item of equipment such as a switch, an equipment container containing many individual items of equipment such as a substation, or an organisational entity such as sub-control area. Power system resources can have measurements associated. - */ + /** \brief A power system resource can be an item of equipment such as a switch, an equipment container containing many individual items of equipment such as a substation, or an organisational entity such as sub-control area. Power system resources can have measurements associated. */ class PowerSystemResource : public IdentifiedObject { public: @@ -29,9 +27,14 @@ namespace CIMPP PowerSystemResource(); ~PowerSystemResource() override; - std::list Controls; /* Regulating device governed by this control output. Default: 0 */ - CIMPP::Location* Location; /* Location of this power system resource. Default: 0 */ - std::list Measurements; /* The power system resource that contains the measurement. Default: 0 */ + /** \brief Regulating device governed by this control output. Default: 0 */ + std::list Controls; + + /** \brief Location of this power system resource. Default: 0 */ + CIMPP::Location* Location; + + /** \brief The power system resource that contains the measurement. Default: 0 */ + std::list Measurements; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/PowerSystemStabilizerDynamics.cpp b/CGMES_2.4.15_27JAN2020/PowerSystemStabilizerDynamics.cpp index a961e08aa..fb50d8a2e 100644 --- a/CGMES_2.4.15_27JAN2020/PowerSystemStabilizerDynamics.cpp +++ b/CGMES_2.4.15_27JAN2020/PowerSystemStabilizerDynamics.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -PowerSystemStabilizerDynamics::PowerSystemStabilizerDynamics() : ExcitationSystemDynamics(nullptr) {}; -PowerSystemStabilizerDynamics::~PowerSystemStabilizerDynamics() {}; +PowerSystemStabilizerDynamics::PowerSystemStabilizerDynamics() : ExcitationSystemDynamics(nullptr) {} +PowerSystemStabilizerDynamics::~PowerSystemStabilizerDynamics() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ PowerSystemStabilizerDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_ExcitationSystemDynamics_PowerSystemStabilizerDynamics(BaseClass*, BaseClass*); bool assign_PowerSystemStabilizerDynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_PowerSystemStabilizerDynamics_ExcitationSystemDynamics(BaseClass* Ba } return false; } + bool assign_RemoteInputSignal_PowerSystemStabilizerDynamics(BaseClass*, BaseClass*); bool assign_PowerSystemStabilizerDynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_PowerSystemStabilizerDynamics_RemoteInputSignal(BaseClass* BaseClass return false; } - bool get_PowerSystemStabilizerDynamics_ExcitationSystemDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const PowerSystemStabilizerDynamics* element = dynamic_cast(BaseClass_ptr1)) + const PowerSystemStabilizerDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ExcitationSystemDynamics != 0) { @@ -100,7 +99,7 @@ const char* PowerSystemStabilizerDynamics::debugString() const void PowerSystemStabilizerDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PowerSystemStabilizerDynamics"), &PowerSystemStabilizerDynamics_factory)); + factory_map.emplace("cim:PowerSystemStabilizerDynamics", &PowerSystemStabilizerDynamics_factory); } void PowerSystemStabilizerDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -109,8 +108,8 @@ void PowerSystemStabilizerDynamics::addPrimitiveAssignFnsToMap(std::unordered_ma void PowerSystemStabilizerDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PowerSystemStabilizerDynamics.ExcitationSystemDynamics"), &assign_PowerSystemStabilizerDynamics_ExcitationSystemDynamics)); - assign_map.insert(std::make_pair(std::string("cim:PowerSystemStabilizerDynamics.RemoteInputSignal"), &assign_PowerSystemStabilizerDynamics_RemoteInputSignal)); + assign_map.emplace("cim:PowerSystemStabilizerDynamics.ExcitationSystemDynamics", &assign_PowerSystemStabilizerDynamics_ExcitationSystemDynamics); + assign_map.emplace("cim:PowerSystemStabilizerDynamics.RemoteInputSignal", &assign_PowerSystemStabilizerDynamics_RemoteInputSignal); } void PowerSystemStabilizerDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/PowerSystemStabilizerDynamics.hpp b/CGMES_2.4.15_27JAN2020/PowerSystemStabilizerDynamics.hpp index 6dec17c33..949c55171 100644 --- a/CGMES_2.4.15_27JAN2020/PowerSystemStabilizerDynamics.hpp +++ b/CGMES_2.4.15_27JAN2020/PowerSystemStabilizerDynamics.hpp @@ -18,9 +18,7 @@ namespace CIMPP class ExcitationSystemDynamics; class RemoteInputSignal; - /* - Power system stabilizer function block whose behaviour is described by reference to a standard model - */ + /** \brief Power system stabilizer function block whose behaviour is described by reference to a standard model */ class PowerSystemStabilizerDynamics : public DynamicsFunctionBlock { public: @@ -28,8 +26,11 @@ namespace CIMPP PowerSystemStabilizerDynamics(); ~PowerSystemStabilizerDynamics() override; - CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; /* Excitation system model with which this power system stabilizer model is associated. Default: 0 */ - std::list RemoteInputSignal; /* Remote input signal used by this power system stabilizer model. Default: 0 */ + /** \brief Excitation system model with which this power system stabilizer model is associated. Default: 0 */ + CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; + + /** \brief Remote input signal used by this power system stabilizer model. Default: 0 */ + std::list RemoteInputSignal; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/PowerSystemStabilizerUserDefined.cpp b/CGMES_2.4.15_27JAN2020/PowerSystemStabilizerUserDefined.cpp index 03243c2a0..a444c0d8b 100644 --- a/CGMES_2.4.15_27JAN2020/PowerSystemStabilizerUserDefined.cpp +++ b/CGMES_2.4.15_27JAN2020/PowerSystemStabilizerUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -PowerSystemStabilizerUserDefined::PowerSystemStabilizerUserDefined() {}; -PowerSystemStabilizerUserDefined::~PowerSystemStabilizerUserDefined() {}; +PowerSystemStabilizerUserDefined::PowerSystemStabilizerUserDefined() {} +PowerSystemStabilizerUserDefined::~PowerSystemStabilizerUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ PowerSystemStabilizerUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_PowerSystemStabilizerUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (PowerSystemStabilizerUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_PowerSystemStabilizerUserDefined(BaseClass*, BaseClass*); bool assign_PowerSystemStabilizerUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_PowerSystemStabilizerUserDefined_ProprietaryParameterDynamics(BaseCl return false; } +bool assign_PowerSystemStabilizerUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + PowerSystemStabilizerUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_PowerSystemStabilizerUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerSystemStabilizerUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const PowerSystemStabilizerUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_PowerSystemStabilizerUserDefined_proprietary(const BaseClass* BaseClass return false; } - - const char PowerSystemStabilizerUserDefined::debugName[] = "PowerSystemStabilizerUserDefined"; const char* PowerSystemStabilizerUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* PowerSystemStabilizerUserDefined::debugString() const void PowerSystemStabilizerUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PowerSystemStabilizerUserDefined"), &PowerSystemStabilizerUserDefined_factory)); + factory_map.emplace("cim:PowerSystemStabilizerUserDefined", &PowerSystemStabilizerUserDefined_factory); } void PowerSystemStabilizerUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PowerSystemStabilizerUserDefined.proprietary"), &assign_PowerSystemStabilizerUserDefined_proprietary)); + assign_map.emplace("cim:PowerSystemStabilizerUserDefined.proprietary", &assign_PowerSystemStabilizerUserDefined_proprietary); } void PowerSystemStabilizerUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PowerSystemStabilizerUserDefined.ProprietaryParameterDynamics"), &assign_PowerSystemStabilizerUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:PowerSystemStabilizerUserDefined.ProprietaryParameterDynamics", &assign_PowerSystemStabilizerUserDefined_ProprietaryParameterDynamics); } void PowerSystemStabilizerUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/PowerSystemStabilizerUserDefined.hpp b/CGMES_2.4.15_27JAN2020/PowerSystemStabilizerUserDefined.hpp index 3622772dc..db8af6276 100644 --- a/CGMES_2.4.15_27JAN2020/PowerSystemStabilizerUserDefined.hpp +++ b/CGMES_2.4.15_27JAN2020/PowerSystemStabilizerUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - function block whose dynamic behaviour is described by - */ + /** \brief function block whose dynamic behaviour is described by */ class PowerSystemStabilizerUserDefined : public PowerSystemStabilizerDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP PowerSystemStabilizerUserDefined(); ~PowerSystemStabilizerUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/PowerTransformer.cpp b/CGMES_2.4.15_27JAN2020/PowerTransformer.cpp index 43ba53d05..80ac17033 100644 --- a/CGMES_2.4.15_27JAN2020/PowerTransformer.cpp +++ b/CGMES_2.4.15_27JAN2020/PowerTransformer.cpp @@ -9,17 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "PowerTransformerEnd.hpp" -#include "CurrentFlow.hpp" -#include "Voltage.hpp" -#include "AngleDegrees.hpp" -#include "Voltage.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" using namespace CIMPP; -PowerTransformer::PowerTransformer() {}; -PowerTransformer::~PowerTransformer() {}; +PowerTransformer::PowerTransformer() {} +PowerTransformer::~PowerTransformer() {} static const std::list PossibleProfilesForClass = { @@ -52,106 +46,112 @@ PowerTransformer::getPossibleProfilesForAttributes() const return map; } - -bool assign_PowerTransformer_beforeShCircuitHighestOperatingCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_PowerTransformer(BaseClass*, BaseClass*); +bool assign_PowerTransformer_PowerTransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + PowerTransformerEnd* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->beforeShCircuitHighestOperatingCurrent; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->PowerTransformerEnd.begin(), element->PowerTransformerEnd.end(), element2) == element->PowerTransformerEnd.end()) + { + element->PowerTransformerEnd.push_back(element2); + return assign_PowerTransformerEnd_PowerTransformer(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_PowerTransformer_beforeShCircuitHighestOperatingVoltage(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformer_beforeShCircuitHighestOperatingCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->beforeShCircuitHighestOperatingVoltage; - if (buffer.fail()) - return false; - else + buffer >> element->beforeShCircuitHighestOperatingCurrent; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformer_beforeShortCircuitAnglePf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformer_beforeShCircuitHighestOperatingVoltage(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->beforeShortCircuitAnglePf; - if (buffer.fail()) - return false; - else + buffer >> element->beforeShCircuitHighestOperatingVoltage; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformer_highSideMinOperatingU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformer_beforeShortCircuitAnglePf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->highSideMinOperatingU; - if (buffer.fail()) - return false; - else + buffer >> element->beforeShortCircuitAnglePf; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformer_isPartOfGeneratorUnit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformer_highSideMinOperatingU(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->isPartOfGeneratorUnit; - if (buffer.fail()) - return false; - else + buffer >> element->highSideMinOperatingU; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformer_operationalValuesConsidered(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformer_isPartOfGeneratorUnit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->operationalValuesConsidered; - if (buffer.fail()) - return false; - else + buffer >> element->isPartOfGeneratorUnit; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_PowerTransformerEnd_PowerTransformer(BaseClass*, BaseClass*); -bool assign_PowerTransformer_PowerTransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_PowerTransformer_operationalValuesConsidered(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { PowerTransformer* element = dynamic_cast(BaseClass_ptr1); - PowerTransformerEnd* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->PowerTransformerEnd.begin(), element->PowerTransformerEnd.end(), element2) == element->PowerTransformerEnd.end()) + buffer >> element->operationalValuesConsidered; + if (!buffer.fail()) { - element->PowerTransformerEnd.push_back(element2); - return assign_PowerTransformerEnd_PowerTransformer(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_PowerTransformer_beforeShCircuitHighestOperatingCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->beforeShCircuitHighestOperatingCurrent; if (!buffer.str().empty()) @@ -165,7 +165,8 @@ bool get_PowerTransformer_beforeShCircuitHighestOperatingCurrent(const BaseClass bool get_PowerTransformer_beforeShCircuitHighestOperatingVoltage(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->beforeShCircuitHighestOperatingVoltage; if (!buffer.str().empty()) @@ -179,7 +180,8 @@ bool get_PowerTransformer_beforeShCircuitHighestOperatingVoltage(const BaseClass bool get_PowerTransformer_beforeShortCircuitAnglePf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->beforeShortCircuitAnglePf; if (!buffer.str().empty()) @@ -193,7 +195,8 @@ bool get_PowerTransformer_beforeShortCircuitAnglePf(const BaseClass* BaseClass_p bool get_PowerTransformer_highSideMinOperatingU(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->highSideMinOperatingU; if (!buffer.str().empty()) @@ -207,7 +210,8 @@ bool get_PowerTransformer_highSideMinOperatingU(const BaseClass* BaseClass_ptr1, bool get_PowerTransformer_isPartOfGeneratorUnit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->isPartOfGeneratorUnit; if (!buffer.str().empty()) @@ -221,7 +225,8 @@ bool get_PowerTransformer_isPartOfGeneratorUnit(const BaseClass* BaseClass_ptr1, bool get_PowerTransformer_operationalValuesConsidered(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->operationalValuesConsidered; if (!buffer.str().empty()) @@ -233,8 +238,6 @@ bool get_PowerTransformer_operationalValuesConsidered(const BaseClass* BaseClass return false; } - - const char PowerTransformer::debugName[] = "PowerTransformer"; const char* PowerTransformer::debugString() const { @@ -243,22 +246,22 @@ const char* PowerTransformer::debugString() const void PowerTransformer::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PowerTransformer"), &PowerTransformer_factory)); + factory_map.emplace("cim:PowerTransformer", &PowerTransformer_factory); } void PowerTransformer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PowerTransformer.beforeShCircuitHighestOperatingCurrent"), &assign_PowerTransformer_beforeShCircuitHighestOperatingCurrent)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformer.beforeShCircuitHighestOperatingVoltage"), &assign_PowerTransformer_beforeShCircuitHighestOperatingVoltage)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformer.beforeShortCircuitAnglePf"), &assign_PowerTransformer_beforeShortCircuitAnglePf)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformer.highSideMinOperatingU"), &assign_PowerTransformer_highSideMinOperatingU)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformer.isPartOfGeneratorUnit"), &assign_PowerTransformer_isPartOfGeneratorUnit)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformer.operationalValuesConsidered"), &assign_PowerTransformer_operationalValuesConsidered)); + assign_map.emplace("cim:PowerTransformer.beforeShCircuitHighestOperatingCurrent", &assign_PowerTransformer_beforeShCircuitHighestOperatingCurrent); + assign_map.emplace("cim:PowerTransformer.beforeShCircuitHighestOperatingVoltage", &assign_PowerTransformer_beforeShCircuitHighestOperatingVoltage); + assign_map.emplace("cim:PowerTransformer.beforeShortCircuitAnglePf", &assign_PowerTransformer_beforeShortCircuitAnglePf); + assign_map.emplace("cim:PowerTransformer.highSideMinOperatingU", &assign_PowerTransformer_highSideMinOperatingU); + assign_map.emplace("cim:PowerTransformer.isPartOfGeneratorUnit", &assign_PowerTransformer_isPartOfGeneratorUnit); + assign_map.emplace("cim:PowerTransformer.operationalValuesConsidered", &assign_PowerTransformer_operationalValuesConsidered); } void PowerTransformer::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PowerTransformer.PowerTransformerEnd"), &assign_PowerTransformer_PowerTransformerEnd)); + assign_map.emplace("cim:PowerTransformer.PowerTransformerEnd", &assign_PowerTransformer_PowerTransformerEnd); } void PowerTransformer::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/PowerTransformer.hpp b/CGMES_2.4.15_27JAN2020/PowerTransformer.hpp index 277963531..0970df0d5 100644 --- a/CGMES_2.4.15_27JAN2020/PowerTransformer.hpp +++ b/CGMES_2.4.15_27JAN2020/PowerTransformer.hpp @@ -21,9 +21,7 @@ namespace CIMPP { class PowerTransformerEnd; - /* - An electrical device consisting of two or more coupled windings, with or without a magnetic core, for introducing mutual coupling between electric circuits. Transformers can be used to control voltage and phase shift (active power flow). A power transformer may be composed of separate transformer tanks that need not be identical. A power transformer can be modeled with or without tanks and is intended for use in both balanced and unbalanced representations. A power transformer typically has two terminals, but may have one (grounding), three or more terminals. The inherited association ConductingEquipment.BaseVoltage should not be used. The association from TransformerEnd to BaseVoltage should be used instead. - */ + /** \brief An electrical device consisting of two or more coupled windings, with or without a magnetic core, for introducing mutual coupling between electric circuits. Transformers can be used to control voltage and phase shift (active power flow). A power transformer may be composed of separate transformer tanks that need not be identical. A power transformer can be modeled with or without tanks and is intended for use in both balanced and unbalanced representations. A power transformer typically has two terminals, but may have one (grounding), three or more terminals. The inherited association ConductingEquipment.BaseVoltage should not be used. The association from TransformerEnd to BaseVoltage should be used instead. */ class PowerTransformer : public ConductingEquipment { public: @@ -31,13 +29,26 @@ namespace CIMPP PowerTransformer(); ~PowerTransformer() override; - std::list PowerTransformerEnd; /* The power transformer of this power transformer end. Default: 0 */ - CIMPP::CurrentFlow beforeShCircuitHighestOperatingCurrent; /* The highest operating current (Ib in the IEC 60909-0) before short circuit (depends on network configuration and relevant reliability philosophy). It is used for calculation of the impedance correction factor KT defined in IEC 60909-0. Default: nullptr */ - CIMPP::Voltage beforeShCircuitHighestOperatingVoltage; /* The highest operating voltage (Ub in the IEC 60909-0) before short circuit. It is used for calculation of the impedance correction factor KT defined in IEC 60909-0. This is worst case voltage on the low side winding (Section 3.7.1 in the standard). Used to define operating conditions. Default: nullptr */ - CIMPP::AngleDegrees beforeShortCircuitAnglePf; /* The angle of power factor before short circuit (phib in the IEC 60909-0). It is used for calculation of the impedance correction factor KT defined in IEC 60909-0. This is the worst case power factor. Used to define operating conditions. Default: nullptr */ - CIMPP::Voltage highSideMinOperatingU; /* The minimum operating voltage (uQmin in the IEC 60909-0) at the high voltage side (Q side) of the unit transformer of the power station unit. A value well established from long-term operating experience of the system. It is used for calculation of the impedance correction factor KG defined in IEC 60909-0 Default: nullptr */ - CIMPP::Boolean isPartOfGeneratorUnit; /* Indicates whether the machine is part of a power station unit. Used for short circuit data exchange according to IEC 60909 Default: false */ - CIMPP::Boolean operationalValuesConsidered; /* It is used to define if the data (other attributes related to short circuit data exchange) defines long term operational conditions or not. Used for short circuit data exchange according to IEC 60909. Default: false */ + /** \brief The power transformer of this power transformer end. Default: 0 */ + std::list PowerTransformerEnd; + + /** \brief The highest operating current (Ib in the IEC 60909-0) before short circuit (depends on network configuration and relevant reliability philosophy). It is used for calculation of the impedance correction factor KT defined in IEC 60909-0. Default: nullptr */ + CIMPP::CurrentFlow beforeShCircuitHighestOperatingCurrent; + + /** \brief The highest operating voltage (Ub in the IEC 60909-0) before short circuit. It is used for calculation of the impedance correction factor KT defined in IEC 60909-0. This is worst case voltage on the low side winding (Section 3.7.1 in the standard). Used to define operating conditions. Default: nullptr */ + CIMPP::Voltage beforeShCircuitHighestOperatingVoltage; + + /** \brief The angle of power factor before short circuit (phib in the IEC 60909-0). It is used for calculation of the impedance correction factor KT defined in IEC 60909-0. This is the worst case power factor. Used to define operating conditions. Default: nullptr */ + CIMPP::AngleDegrees beforeShortCircuitAnglePf; + + /** \brief The minimum operating voltage (uQmin in the IEC 60909-0) at the high voltage side (Q side) of the unit transformer of the power station unit. A value well established from long-term operating experience of the system. It is used for calculation of the impedance correction factor KG defined in IEC 60909-0 Default: nullptr */ + CIMPP::Voltage highSideMinOperatingU; + + /** \brief Indicates whether the machine is part of a power station unit. Used for short circuit data exchange according to IEC 60909 Default: false */ + CIMPP::Boolean isPartOfGeneratorUnit; + + /** \brief It is used to define if the data (other attributes related to short circuit data exchange) defines long term operational conditions or not. Used for short circuit data exchange according to IEC 60909. Default: false */ + CIMPP::Boolean operationalValuesConsidered; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/PowerTransformerEnd.cpp b/CGMES_2.4.15_27JAN2020/PowerTransformerEnd.cpp index beb25fa82..cb0bb8628 100644 --- a/CGMES_2.4.15_27JAN2020/PowerTransformerEnd.cpp +++ b/CGMES_2.4.15_27JAN2020/PowerTransformerEnd.cpp @@ -9,23 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "PowerTransformer.hpp" -#include "Susceptance.hpp" -#include "Susceptance.hpp" -#include "WindingConnection.hpp" -#include "Conductance.hpp" -#include "Conductance.hpp" -#include "Integer.hpp" -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "ApparentPower.hpp" -#include "Voltage.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -PowerTransformerEnd::PowerTransformerEnd() : PowerTransformer(nullptr) {}; -PowerTransformerEnd::~PowerTransformerEnd() {}; +PowerTransformerEnd::PowerTransformerEnd() : PowerTransformer(nullptr) {} +PowerTransformerEnd::~PowerTransformerEnd() {} static const std::list PossibleProfilesForClass = { @@ -64,184 +52,209 @@ PowerTransformerEnd::getPossibleProfilesForAttributes() const return map; } +bool assign_PowerTransformer_PowerTransformerEnd(BaseClass*, BaseClass*); +bool assign_PowerTransformerEnd_PowerTransformer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + PowerTransformer* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PowerTransformer != element2) + { + element->PowerTransformer = element2; + return assign_PowerTransformer_PowerTransformerEnd(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_PowerTransformerEnd_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_b(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_b0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_b0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_connectionKind(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_connectionKind(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->connectionKind; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_g(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_g(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_g0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_g0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_phaseAngleClock(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_phaseAngleClock(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->phaseAngleClock; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_r0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_ratedS(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_ratedS(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedS; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_ratedU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_ratedU(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedU; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_x(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_x0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_PowerTransformer_PowerTransformerEnd(BaseClass*, BaseClass*); -bool assign_PowerTransformerEnd_PowerTransformer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_PowerTransformerEnd_PowerTransformer(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); - PowerTransformer* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->PowerTransformer != element2) + if (element->PowerTransformer != 0) { - element->PowerTransformer = element2; - return assign_PowerTransformer_PowerTransformerEnd(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->PowerTransformer); + return true; } - return true; } return false; } bool get_PowerTransformerEnd_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b; if (!buffer.str().empty()) @@ -255,7 +268,8 @@ bool get_PowerTransformerEnd_b(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_PowerTransformerEnd_b0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b0; if (!buffer.str().empty()) @@ -267,9 +281,25 @@ bool get_PowerTransformerEnd_b0(const BaseClass* BaseClass_ptr1, std::stringstre return false; } +bool get_PowerTransformerEnd_connectionKind(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->connectionKind; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_PowerTransformerEnd_g(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g; if (!buffer.str().empty()) @@ -283,7 +313,8 @@ bool get_PowerTransformerEnd_g(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_PowerTransformerEnd_g0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g0; if (!buffer.str().empty()) @@ -297,7 +328,8 @@ bool get_PowerTransformerEnd_g0(const BaseClass* BaseClass_ptr1, std::stringstre bool get_PowerTransformerEnd_phaseAngleClock(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->phaseAngleClock; if (!buffer.str().empty()) @@ -311,7 +343,8 @@ bool get_PowerTransformerEnd_phaseAngleClock(const BaseClass* BaseClass_ptr1, st bool get_PowerTransformerEnd_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -325,7 +358,8 @@ bool get_PowerTransformerEnd_r(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_PowerTransformerEnd_r0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r0; if (!buffer.str().empty()) @@ -339,7 +373,8 @@ bool get_PowerTransformerEnd_r0(const BaseClass* BaseClass_ptr1, std::stringstre bool get_PowerTransformerEnd_ratedS(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedS; if (!buffer.str().empty()) @@ -353,7 +388,8 @@ bool get_PowerTransformerEnd_ratedS(const BaseClass* BaseClass_ptr1, std::string bool get_PowerTransformerEnd_ratedU(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedU; if (!buffer.str().empty()) @@ -367,7 +403,8 @@ bool get_PowerTransformerEnd_ratedU(const BaseClass* BaseClass_ptr1, std::string bool get_PowerTransformerEnd_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x; if (!buffer.str().empty()) @@ -381,7 +418,8 @@ bool get_PowerTransformerEnd_x(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_PowerTransformerEnd_x0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x0; if (!buffer.str().empty()) @@ -393,35 +431,6 @@ bool get_PowerTransformerEnd_x0(const BaseClass* BaseClass_ptr1, std::stringstre return false; } - -bool get_PowerTransformerEnd_PowerTransformer(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->PowerTransformer != 0) - { - BaseClass_list.push_back(element->PowerTransformer); - return true; - } - } - return false; -} - - -bool get_PowerTransformerEnd_connectionKind(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->connectionKind; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char PowerTransformerEnd::debugName[] = "PowerTransformerEnd"; const char* PowerTransformerEnd::debugString() const { @@ -430,28 +439,28 @@ const char* PowerTransformerEnd::debugString() const void PowerTransformerEnd::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd"), &PowerTransformerEnd_factory)); + factory_map.emplace("cim:PowerTransformerEnd", &PowerTransformerEnd_factory); } void PowerTransformerEnd::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.b"), &assign_PowerTransformerEnd_b)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.b0"), &assign_PowerTransformerEnd_b0)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.connectionKind"), &assign_PowerTransformerEnd_connectionKind)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.g"), &assign_PowerTransformerEnd_g)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.g0"), &assign_PowerTransformerEnd_g0)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.phaseAngleClock"), &assign_PowerTransformerEnd_phaseAngleClock)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.r"), &assign_PowerTransformerEnd_r)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.r0"), &assign_PowerTransformerEnd_r0)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.ratedS"), &assign_PowerTransformerEnd_ratedS)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.ratedU"), &assign_PowerTransformerEnd_ratedU)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.x"), &assign_PowerTransformerEnd_x)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.x0"), &assign_PowerTransformerEnd_x0)); + assign_map.emplace("cim:PowerTransformerEnd.b", &assign_PowerTransformerEnd_b); + assign_map.emplace("cim:PowerTransformerEnd.b0", &assign_PowerTransformerEnd_b0); + assign_map.emplace("cim:PowerTransformerEnd.connectionKind", &assign_PowerTransformerEnd_connectionKind); + assign_map.emplace("cim:PowerTransformerEnd.g", &assign_PowerTransformerEnd_g); + assign_map.emplace("cim:PowerTransformerEnd.g0", &assign_PowerTransformerEnd_g0); + assign_map.emplace("cim:PowerTransformerEnd.phaseAngleClock", &assign_PowerTransformerEnd_phaseAngleClock); + assign_map.emplace("cim:PowerTransformerEnd.r", &assign_PowerTransformerEnd_r); + assign_map.emplace("cim:PowerTransformerEnd.r0", &assign_PowerTransformerEnd_r0); + assign_map.emplace("cim:PowerTransformerEnd.ratedS", &assign_PowerTransformerEnd_ratedS); + assign_map.emplace("cim:PowerTransformerEnd.ratedU", &assign_PowerTransformerEnd_ratedU); + assign_map.emplace("cim:PowerTransformerEnd.x", &assign_PowerTransformerEnd_x); + assign_map.emplace("cim:PowerTransformerEnd.x0", &assign_PowerTransformerEnd_x0); } void PowerTransformerEnd::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.PowerTransformer"), &assign_PowerTransformerEnd_PowerTransformer)); + assign_map.emplace("cim:PowerTransformerEnd.PowerTransformer", &assign_PowerTransformerEnd_PowerTransformer); } void PowerTransformerEnd::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/PowerTransformerEnd.hpp b/CGMES_2.4.15_27JAN2020/PowerTransformerEnd.hpp index bb20e0c1f..b4f4de48e 100644 --- a/CGMES_2.4.15_27JAN2020/PowerTransformerEnd.hpp +++ b/CGMES_2.4.15_27JAN2020/PowerTransformerEnd.hpp @@ -25,9 +25,7 @@ namespace CIMPP { class PowerTransformer; - /* - A PowerTransformerEnd is associated with each Terminal of a PowerTransformer. The impedance values r, r0, x, and x0 of a PowerTransformerEnd represents a star equivalent as follows 1) for a two Terminal PowerTransformer the high voltage PowerTransformerEnd has non zero values on r, r0, x, and x0 while the low voltage PowerTransformerEnd has zero values for r, r0, x, and x0. 2) for a three Terminal PowerTransformer the three PowerTransformerEnds represents a star equivalent with each leg in the star represented by r, r0, x, and x0 values. 3) for a PowerTransformer with more than three Terminals the PowerTransformerEnd impedance values cannot be used. Instead use the TransformerMeshImpedance or split the transformer into multiple PowerTransformers. - */ + /** \brief A PowerTransformerEnd is associated with each Terminal of a PowerTransformer. The impedance values r, r0, x, and x0 of a PowerTransformerEnd represents a star equivalent as follows 1) for a two Terminal PowerTransformer the high voltage PowerTransformerEnd has non zero values on r, r0, x, and x0 while the low voltage PowerTransformerEnd has zero values for r, r0, x, and x0. 2) for a three Terminal PowerTransformer the three PowerTransformerEnds represents a star equivalent with each leg in the star represented by r, r0, x, and x0 values. 3) for a PowerTransformer with more than three Terminals the PowerTransformerEnd impedance values cannot be used. Instead use the TransformerMeshImpedance or split the transformer into multiple PowerTransformers. */ class PowerTransformerEnd : public TransformerEnd { public: @@ -35,19 +33,44 @@ namespace CIMPP PowerTransformerEnd(); ~PowerTransformerEnd() override; - CIMPP::PowerTransformer* PowerTransformer; /* The ends of this power transformer. Default: 0 */ - CIMPP::Susceptance b; /* Magnetizing branch susceptance (B mag). The value can be positive or negative. Default: nullptr */ - CIMPP::Susceptance b0; /* Zero sequence magnetizing branch susceptance. Default: nullptr */ - CIMPP::WindingConnection connectionKind; /* Kind of connection. Default: 0 */ - CIMPP::Conductance g; /* Magnetizing branch conductance. Default: nullptr */ - CIMPP::Conductance g0; /* Zero sequence magnetizing branch conductance (star-model). Default: nullptr */ - CIMPP::Integer phaseAngleClock; /* Terminal voltage phase angle displacement where 360 degrees are represented with clock hours. The valid values are 0 to 11. For example, for the secondary side end of a transformer with vector group code of `Dyn11`, specify the connection kind as wye with neutral and specify the phase angle of the clock as 11. The clock value of the transformer end number specified as 1, is assumed to be zero. Note the transformer end number is not assumed to be the same as the terminal sequence number. Default: 0 */ - CIMPP::Resistance r; /* Resistance (star-model) of the transformer end. The attribute shall be equal or greater than zero for non-equivalent transformers. Default: nullptr */ - CIMPP::Resistance r0; /* Zero sequence series resistance (star-model) of the transformer end. Default: nullptr */ - CIMPP::ApparentPower ratedS; /* Normal apparent power rating. The attribute shall be a positive value. For a two-winding transformer the values for the high and low voltage sides shall be identical. Default: nullptr */ - CIMPP::Voltage ratedU; /* Rated voltage: phase-phase for three-phase windings, and either phase-phase or phase-neutral for single-phase windings. A high voltage side, as given by TransformerEnd.endNumber, shall have a ratedU that is greater or equal than ratedU for the lower voltage sides. Default: nullptr */ - CIMPP::Reactance x; /* Positive sequence series reactance (star-model) of the transformer end. Default: nullptr */ - CIMPP::Reactance x0; /* Zero sequence series reactance of the transformer end. Default: nullptr */ + /** \brief The ends of this power transformer. Default: 0 */ + CIMPP::PowerTransformer* PowerTransformer; + + /** \brief Magnetizing branch susceptance (B mag). The value can be positive or negative. Default: nullptr */ + CIMPP::Susceptance b; + + /** \brief Zero sequence magnetizing branch susceptance. Default: nullptr */ + CIMPP::Susceptance b0; + + /** \brief Kind of connection. Default: 0 */ + CIMPP::WindingConnection connectionKind; + + /** \brief Magnetizing branch conductance. Default: nullptr */ + CIMPP::Conductance g; + + /** \brief Zero sequence magnetizing branch conductance (star-model). Default: nullptr */ + CIMPP::Conductance g0; + + /** \brief Terminal voltage phase angle displacement where 360 degrees are represented with clock hours. The valid values are 0 to 11. For example, for the secondary side end of a transformer with vector group code of `Dyn11`, specify the connection kind as wye with neutral and specify the phase angle of the clock as 11. The clock value of the transformer end number specified as 1, is assumed to be zero. Note the transformer end number is not assumed to be the same as the terminal sequence number. Default: 0 */ + CIMPP::Integer phaseAngleClock; + + /** \brief Resistance (star-model) of the transformer end. The attribute shall be equal or greater than zero for non-equivalent transformers. Default: nullptr */ + CIMPP::Resistance r; + + /** \brief Zero sequence series resistance (star-model) of the transformer end. Default: nullptr */ + CIMPP::Resistance r0; + + /** \brief Normal apparent power rating. The attribute shall be a positive value. For a two-winding transformer the values for the high and low voltage sides shall be identical. Default: nullptr */ + CIMPP::ApparentPower ratedS; + + /** \brief Rated voltage: phase-phase for three-phase windings, and either phase-phase or phase-neutral for single-phase windings. A high voltage side, as given by TransformerEnd.endNumber, shall have a ratedU that is greater or equal than ratedU for the lower voltage sides. Default: nullptr */ + CIMPP::Voltage ratedU; + + /** \brief Positive sequence series reactance (star-model) of the transformer end. Default: nullptr */ + CIMPP::Reactance x; + + /** \brief Zero sequence series reactance of the transformer end. Default: nullptr */ + CIMPP::Reactance x0; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ProprietaryParameterDynamics.cpp b/CGMES_2.4.15_27JAN2020/ProprietaryParameterDynamics.cpp index eeaf20aaf..cc1ac6f02 100644 --- a/CGMES_2.4.15_27JAN2020/ProprietaryParameterDynamics.cpp +++ b/CGMES_2.4.15_27JAN2020/ProprietaryParameterDynamics.cpp @@ -26,15 +26,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindPlantUserDefined.hpp" #include "WindType1or2UserDefined.hpp" #include "WindType3or4UserDefined.hpp" -#include "Boolean.hpp" -#include "Simple_Float.hpp" -#include "Integer.hpp" -#include "Integer.hpp" using namespace CIMPP; -ProprietaryParameterDynamics::ProprietaryParameterDynamics() : AsynchronousMachineUserDefined(nullptr), DiscontinuousExcitationControlUserDefined(nullptr), ExcitationSystemUserDefined(nullptr), LoadUserDefined(nullptr), MechanicalLoadUserDefined(nullptr), OverexcitationLimiterUserDefined(nullptr), PFVArControllerType1UserDefined(nullptr), PFVArControllerType2UserDefined(nullptr), PowerSystemStabilizerUserDefined(nullptr), SynchronousMachineUserDefined(nullptr), TurbineGovernorUserDefined(nullptr), TurbineLoadControllerUserDefined(nullptr), UnderexcitationLimiterUserDefined(nullptr), VoltageAdjusterUserDefined(nullptr), VoltageCompensatorUserDefined(nullptr), WindPlantUserDefined(nullptr), WindType1or2UserDefined(nullptr), WindType3or4UserDefined(nullptr) {}; -ProprietaryParameterDynamics::~ProprietaryParameterDynamics() {}; +ProprietaryParameterDynamics::ProprietaryParameterDynamics() : AsynchronousMachineUserDefined(nullptr), DiscontinuousExcitationControlUserDefined(nullptr), ExcitationSystemUserDefined(nullptr), LoadUserDefined(nullptr), MechanicalLoadUserDefined(nullptr), OverexcitationLimiterUserDefined(nullptr), PFVArControllerType1UserDefined(nullptr), PFVArControllerType2UserDefined(nullptr), PowerSystemStabilizerUserDefined(nullptr), SynchronousMachineUserDefined(nullptr), TurbineGovernorUserDefined(nullptr), TurbineLoadControllerUserDefined(nullptr), UnderexcitationLimiterUserDefined(nullptr), VoltageAdjusterUserDefined(nullptr), VoltageCompensatorUserDefined(nullptr), WindPlantUserDefined(nullptr), WindType1or2UserDefined(nullptr), WindType3or4UserDefined(nullptr) {} +ProprietaryParameterDynamics::~ProprietaryParameterDynamics() {} static const std::list PossibleProfilesForClass = { @@ -82,60 +78,6 @@ ProprietaryParameterDynamics::getPossibleProfilesForAttributes() const return map; } - -bool assign_ProprietaryParameterDynamics_booleanParameterValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->booleanParameterValue; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_ProprietaryParameterDynamics_floatParameterValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->floatParameterValue; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_ProprietaryParameterDynamics_integerParameterValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->integerParameterValue; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_ProprietaryParameterDynamics_parameterNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->parameterNumber; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_AsynchronousMachineUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_AsynchronousMachineUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -152,6 +94,7 @@ bool assign_ProprietaryParameterDynamics_AsynchronousMachineUserDefined(BaseClas } return false; } + bool assign_DiscontinuousExcitationControlUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_DiscontinuousExcitationControlUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -168,6 +111,7 @@ bool assign_ProprietaryParameterDynamics_DiscontinuousExcitationControlUserDefin } return false; } + bool assign_ExcitationSystemUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_ExcitationSystemUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -184,6 +128,7 @@ bool assign_ProprietaryParameterDynamics_ExcitationSystemUserDefined(BaseClass* } return false; } + bool assign_LoadUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_LoadUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -200,6 +145,7 @@ bool assign_ProprietaryParameterDynamics_LoadUserDefined(BaseClass* BaseClass_pt } return false; } + bool assign_MechanicalLoadUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_MechanicalLoadUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -216,6 +162,7 @@ bool assign_ProprietaryParameterDynamics_MechanicalLoadUserDefined(BaseClass* Ba } return false; } + bool assign_OverexcitationLimiterUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_OverexcitationLimiterUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -232,6 +179,7 @@ bool assign_ProprietaryParameterDynamics_OverexcitationLimiterUserDefined(BaseCl } return false; } + bool assign_PFVArControllerType1UserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_PFVArControllerType1UserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -248,6 +196,7 @@ bool assign_ProprietaryParameterDynamics_PFVArControllerType1UserDefined(BaseCla } return false; } + bool assign_PFVArControllerType2UserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_PFVArControllerType2UserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -264,6 +213,7 @@ bool assign_ProprietaryParameterDynamics_PFVArControllerType2UserDefined(BaseCla } return false; } + bool assign_PowerSystemStabilizerUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_PowerSystemStabilizerUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -280,6 +230,7 @@ bool assign_ProprietaryParameterDynamics_PowerSystemStabilizerUserDefined(BaseCl } return false; } + bool assign_SynchronousMachineUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_SynchronousMachineUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -296,6 +247,7 @@ bool assign_ProprietaryParameterDynamics_SynchronousMachineUserDefined(BaseClass } return false; } + bool assign_TurbineGovernorUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_TurbineGovernorUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -312,6 +264,7 @@ bool assign_ProprietaryParameterDynamics_TurbineGovernorUserDefined(BaseClass* B } return false; } + bool assign_TurbineLoadControllerUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_TurbineLoadControllerUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -328,6 +281,7 @@ bool assign_ProprietaryParameterDynamics_TurbineLoadControllerUserDefined(BaseCl } return false; } + bool assign_UnderexcitationLimiterUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_UnderexcitationLimiterUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -344,6 +298,7 @@ bool assign_ProprietaryParameterDynamics_UnderexcitationLimiterUserDefined(BaseC } return false; } + bool assign_VoltageAdjusterUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_VoltageAdjusterUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -360,6 +315,7 @@ bool assign_ProprietaryParameterDynamics_VoltageAdjusterUserDefined(BaseClass* B } return false; } + bool assign_VoltageCompensatorUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_VoltageCompensatorUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -376,6 +332,7 @@ bool assign_ProprietaryParameterDynamics_VoltageCompensatorUserDefined(BaseClass } return false; } + bool assign_WindPlantUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_WindPlantUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -392,6 +349,7 @@ bool assign_ProprietaryParameterDynamics_WindPlantUserDefined(BaseClass* BaseCla } return false; } + bool assign_WindType1or2UserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_WindType1or2UserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -408,6 +366,7 @@ bool assign_ProprietaryParameterDynamics_WindType1or2UserDefined(BaseClass* Base } return false; } + bool assign_WindType3or4UserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_WindType3or4UserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -425,66 +384,66 @@ bool assign_ProprietaryParameterDynamics_WindType3or4UserDefined(BaseClass* Base return false; } -bool get_ProprietaryParameterDynamics_booleanParameterValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_ProprietaryParameterDynamics_booleanParameterValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->booleanParameterValue; - if (!buffer.str().empty()) + buffer >> element->booleanParameterValue; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_ProprietaryParameterDynamics_floatParameterValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_ProprietaryParameterDynamics_floatParameterValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->floatParameterValue; - if (!buffer.str().empty()) + buffer >> element->floatParameterValue; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_ProprietaryParameterDynamics_integerParameterValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_ProprietaryParameterDynamics_integerParameterValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->integerParameterValue; - if (!buffer.str().empty()) + buffer >> element->integerParameterValue; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_ProprietaryParameterDynamics_parameterNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_ProprietaryParameterDynamics_parameterNumber(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->parameterNumber; - if (!buffer.str().empty()) + buffer >> element->parameterNumber; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_ProprietaryParameterDynamics_AsynchronousMachineUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->AsynchronousMachineUserDefined != 0) { @@ -497,7 +456,8 @@ bool get_ProprietaryParameterDynamics_AsynchronousMachineUserDefined(const BaseC bool get_ProprietaryParameterDynamics_DiscontinuousExcitationControlUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DiscontinuousExcitationControlUserDefined != 0) { @@ -510,7 +470,8 @@ bool get_ProprietaryParameterDynamics_DiscontinuousExcitationControlUserDefined( bool get_ProprietaryParameterDynamics_ExcitationSystemUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ExcitationSystemUserDefined != 0) { @@ -523,7 +484,8 @@ bool get_ProprietaryParameterDynamics_ExcitationSystemUserDefined(const BaseClas bool get_ProprietaryParameterDynamics_LoadUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->LoadUserDefined != 0) { @@ -536,7 +498,8 @@ bool get_ProprietaryParameterDynamics_LoadUserDefined(const BaseClass* BaseClass bool get_ProprietaryParameterDynamics_MechanicalLoadUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->MechanicalLoadUserDefined != 0) { @@ -549,7 +512,8 @@ bool get_ProprietaryParameterDynamics_MechanicalLoadUserDefined(const BaseClass* bool get_ProprietaryParameterDynamics_OverexcitationLimiterUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->OverexcitationLimiterUserDefined != 0) { @@ -562,7 +526,8 @@ bool get_ProprietaryParameterDynamics_OverexcitationLimiterUserDefined(const Bas bool get_ProprietaryParameterDynamics_PFVArControllerType1UserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PFVArControllerType1UserDefined != 0) { @@ -575,7 +540,8 @@ bool get_ProprietaryParameterDynamics_PFVArControllerType1UserDefined(const Base bool get_ProprietaryParameterDynamics_PFVArControllerType2UserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PFVArControllerType2UserDefined != 0) { @@ -588,7 +554,8 @@ bool get_ProprietaryParameterDynamics_PFVArControllerType2UserDefined(const Base bool get_ProprietaryParameterDynamics_PowerSystemStabilizerUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PowerSystemStabilizerUserDefined != 0) { @@ -601,7 +568,8 @@ bool get_ProprietaryParameterDynamics_PowerSystemStabilizerUserDefined(const Bas bool get_ProprietaryParameterDynamics_SynchronousMachineUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->SynchronousMachineUserDefined != 0) { @@ -614,7 +582,8 @@ bool get_ProprietaryParameterDynamics_SynchronousMachineUserDefined(const BaseCl bool get_ProprietaryParameterDynamics_TurbineGovernorUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->TurbineGovernorUserDefined != 0) { @@ -627,7 +596,8 @@ bool get_ProprietaryParameterDynamics_TurbineGovernorUserDefined(const BaseClass bool get_ProprietaryParameterDynamics_TurbineLoadControllerUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->TurbineLoadControllerUserDefined != 0) { @@ -640,7 +610,8 @@ bool get_ProprietaryParameterDynamics_TurbineLoadControllerUserDefined(const Bas bool get_ProprietaryParameterDynamics_UnderexcitationLimiterUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->UnderexcitationLimiterUserDefined != 0) { @@ -653,7 +624,8 @@ bool get_ProprietaryParameterDynamics_UnderexcitationLimiterUserDefined(const Ba bool get_ProprietaryParameterDynamics_VoltageAdjusterUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->VoltageAdjusterUserDefined != 0) { @@ -666,7 +638,8 @@ bool get_ProprietaryParameterDynamics_VoltageAdjusterUserDefined(const BaseClass bool get_ProprietaryParameterDynamics_VoltageCompensatorUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->VoltageCompensatorUserDefined != 0) { @@ -679,7 +652,8 @@ bool get_ProprietaryParameterDynamics_VoltageCompensatorUserDefined(const BaseCl bool get_ProprietaryParameterDynamics_WindPlantUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindPlantUserDefined != 0) { @@ -692,7 +666,8 @@ bool get_ProprietaryParameterDynamics_WindPlantUserDefined(const BaseClass* Base bool get_ProprietaryParameterDynamics_WindType1or2UserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindType1or2UserDefined != 0) { @@ -705,7 +680,8 @@ bool get_ProprietaryParameterDynamics_WindType1or2UserDefined(const BaseClass* B bool get_ProprietaryParameterDynamics_WindType3or4UserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindType3or4UserDefined != 0) { @@ -716,6 +692,65 @@ bool get_ProprietaryParameterDynamics_WindType3or4UserDefined(const BaseClass* B return false; } +bool get_ProprietaryParameterDynamics_booleanParameterValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->booleanParameterValue; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_ProprietaryParameterDynamics_floatParameterValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->floatParameterValue; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_ProprietaryParameterDynamics_integerParameterValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->integerParameterValue; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_ProprietaryParameterDynamics_parameterNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->parameterNumber; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char ProprietaryParameterDynamics::debugName[] = "ProprietaryParameterDynamics"; const char* ProprietaryParameterDynamics::debugString() const @@ -725,37 +760,37 @@ const char* ProprietaryParameterDynamics::debugString() const void ProprietaryParameterDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics"), &ProprietaryParameterDynamics_factory)); + factory_map.emplace("cim:ProprietaryParameterDynamics", &ProprietaryParameterDynamics_factory); } void ProprietaryParameterDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.booleanParameterValue"), &assign_ProprietaryParameterDynamics_booleanParameterValue)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.floatParameterValue"), &assign_ProprietaryParameterDynamics_floatParameterValue)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.integerParameterValue"), &assign_ProprietaryParameterDynamics_integerParameterValue)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.parameterNumber"), &assign_ProprietaryParameterDynamics_parameterNumber)); + assign_map.emplace("cim:ProprietaryParameterDynamics.booleanParameterValue", &assign_ProprietaryParameterDynamics_booleanParameterValue); + assign_map.emplace("cim:ProprietaryParameterDynamics.floatParameterValue", &assign_ProprietaryParameterDynamics_floatParameterValue); + assign_map.emplace("cim:ProprietaryParameterDynamics.integerParameterValue", &assign_ProprietaryParameterDynamics_integerParameterValue); + assign_map.emplace("cim:ProprietaryParameterDynamics.parameterNumber", &assign_ProprietaryParameterDynamics_parameterNumber); } void ProprietaryParameterDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.AsynchronousMachineUserDefined"), &assign_ProprietaryParameterDynamics_AsynchronousMachineUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.DiscontinuousExcitationControlUserDefined"), &assign_ProprietaryParameterDynamics_DiscontinuousExcitationControlUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.ExcitationSystemUserDefined"), &assign_ProprietaryParameterDynamics_ExcitationSystemUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.LoadUserDefined"), &assign_ProprietaryParameterDynamics_LoadUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.MechanicalLoadUserDefined"), &assign_ProprietaryParameterDynamics_MechanicalLoadUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.OverexcitationLimiterUserDefined"), &assign_ProprietaryParameterDynamics_OverexcitationLimiterUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.PFVArControllerType1UserDefined"), &assign_ProprietaryParameterDynamics_PFVArControllerType1UserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.PFVArControllerType2UserDefined"), &assign_ProprietaryParameterDynamics_PFVArControllerType2UserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.PowerSystemStabilizerUserDefined"), &assign_ProprietaryParameterDynamics_PowerSystemStabilizerUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.SynchronousMachineUserDefined"), &assign_ProprietaryParameterDynamics_SynchronousMachineUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.TurbineGovernorUserDefined"), &assign_ProprietaryParameterDynamics_TurbineGovernorUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.TurbineLoadControllerUserDefined"), &assign_ProprietaryParameterDynamics_TurbineLoadControllerUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.UnderexcitationLimiterUserDefined"), &assign_ProprietaryParameterDynamics_UnderexcitationLimiterUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.VoltageAdjusterUserDefined"), &assign_ProprietaryParameterDynamics_VoltageAdjusterUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.VoltageCompensatorUserDefined"), &assign_ProprietaryParameterDynamics_VoltageCompensatorUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.WindPlantUserDefined"), &assign_ProprietaryParameterDynamics_WindPlantUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.WindType1or2UserDefined"), &assign_ProprietaryParameterDynamics_WindType1or2UserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.WindType3or4UserDefined"), &assign_ProprietaryParameterDynamics_WindType3or4UserDefined)); + assign_map.emplace("cim:ProprietaryParameterDynamics.AsynchronousMachineUserDefined", &assign_ProprietaryParameterDynamics_AsynchronousMachineUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.DiscontinuousExcitationControlUserDefined", &assign_ProprietaryParameterDynamics_DiscontinuousExcitationControlUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.ExcitationSystemUserDefined", &assign_ProprietaryParameterDynamics_ExcitationSystemUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.LoadUserDefined", &assign_ProprietaryParameterDynamics_LoadUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.MechanicalLoadUserDefined", &assign_ProprietaryParameterDynamics_MechanicalLoadUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.OverexcitationLimiterUserDefined", &assign_ProprietaryParameterDynamics_OverexcitationLimiterUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.PFVArControllerType1UserDefined", &assign_ProprietaryParameterDynamics_PFVArControllerType1UserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.PFVArControllerType2UserDefined", &assign_ProprietaryParameterDynamics_PFVArControllerType2UserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.PowerSystemStabilizerUserDefined", &assign_ProprietaryParameterDynamics_PowerSystemStabilizerUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.SynchronousMachineUserDefined", &assign_ProprietaryParameterDynamics_SynchronousMachineUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.TurbineGovernorUserDefined", &assign_ProprietaryParameterDynamics_TurbineGovernorUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.TurbineLoadControllerUserDefined", &assign_ProprietaryParameterDynamics_TurbineLoadControllerUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.UnderexcitationLimiterUserDefined", &assign_ProprietaryParameterDynamics_UnderexcitationLimiterUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.VoltageAdjusterUserDefined", &assign_ProprietaryParameterDynamics_VoltageAdjusterUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.VoltageCompensatorUserDefined", &assign_ProprietaryParameterDynamics_VoltageCompensatorUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.WindPlantUserDefined", &assign_ProprietaryParameterDynamics_WindPlantUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.WindType1or2UserDefined", &assign_ProprietaryParameterDynamics_WindType1or2UserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.WindType3or4UserDefined", &assign_ProprietaryParameterDynamics_WindType3or4UserDefined); } void ProprietaryParameterDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/ProprietaryParameterDynamics.hpp b/CGMES_2.4.15_27JAN2020/ProprietaryParameterDynamics.hpp index a8d49dc07..3aa47cdc9 100644 --- a/CGMES_2.4.15_27JAN2020/ProprietaryParameterDynamics.hpp +++ b/CGMES_2.4.15_27JAN2020/ProprietaryParameterDynamics.hpp @@ -37,9 +37,7 @@ namespace CIMPP class WindType1or2UserDefined; class WindType3or4UserDefined; - /* - Supports definition of one or more parameters of several different datatypes for use by proprietary user-defined models. NOTE: This class does not inherit from IdentifiedObject since it is not intended that a single instance of it be referenced by more than one proprietary user-defined model instance. - */ + /** \brief Supports definition of one or more parameters of several different datatypes for use by proprietary user-defined models. NOTE: This class does not inherit from IdentifiedObject since it is not intended that a single instance of it be referenced by more than one proprietary user-defined model instance. */ class ProprietaryParameterDynamics : public BaseClass { public: @@ -47,28 +45,71 @@ namespace CIMPP ProprietaryParameterDynamics(); ~ProprietaryParameterDynamics() override; - CIMPP::AsynchronousMachineUserDefined* AsynchronousMachineUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::DiscontinuousExcitationControlUserDefined* DiscontinuousExcitationControlUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::ExcitationSystemUserDefined* ExcitationSystemUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::LoadUserDefined* LoadUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::MechanicalLoadUserDefined* MechanicalLoadUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::OverexcitationLimiterUserDefined* OverexcitationLimiterUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::PFVArControllerType1UserDefined* PFVArControllerType1UserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::PFVArControllerType2UserDefined* PFVArControllerType2UserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::PowerSystemStabilizerUserDefined* PowerSystemStabilizerUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::SynchronousMachineUserDefined* SynchronousMachineUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::TurbineGovernorUserDefined* TurbineGovernorUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::TurbineLoadControllerUserDefined* TurbineLoadControllerUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::UnderexcitationLimiterUserDefined* UnderexcitationLimiterUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::VoltageAdjusterUserDefined* VoltageAdjusterUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::VoltageCompensatorUserDefined* VoltageCompensatorUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::WindPlantUserDefined* WindPlantUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::WindType1or2UserDefined* WindType1or2UserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::WindType3or4UserDefined* WindType3or4UserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::Boolean booleanParameterValue; /* Used for boolean parameter value. If this attribute is populated, integerParameterValue and floatParameterValue will not be. Default: false */ - CIMPP::Simple_Float floatParameterValue; /* Used for floating point parameter value. If this attribute is populated, booleanParameterValue and integerParameterValue will not be. Default: nullptr */ - CIMPP::Integer integerParameterValue; /* Used for integer parameter value. If this attribute is populated, booleanParameterValue and floatParameterValue will not be. Default: 0 */ - CIMPP::Integer parameterNumber; /* Sequence number of the parameter among the set of parameters associated with the related proprietary user-defined model. Default: 0 */ + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::AsynchronousMachineUserDefined* AsynchronousMachineUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::DiscontinuousExcitationControlUserDefined* DiscontinuousExcitationControlUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::ExcitationSystemUserDefined* ExcitationSystemUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::LoadUserDefined* LoadUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::MechanicalLoadUserDefined* MechanicalLoadUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::OverexcitationLimiterUserDefined* OverexcitationLimiterUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::PFVArControllerType1UserDefined* PFVArControllerType1UserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::PFVArControllerType2UserDefined* PFVArControllerType2UserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::PowerSystemStabilizerUserDefined* PowerSystemStabilizerUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::SynchronousMachineUserDefined* SynchronousMachineUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::TurbineGovernorUserDefined* TurbineGovernorUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::TurbineLoadControllerUserDefined* TurbineLoadControllerUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::UnderexcitationLimiterUserDefined* UnderexcitationLimiterUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::VoltageAdjusterUserDefined* VoltageAdjusterUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::VoltageCompensatorUserDefined* VoltageCompensatorUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::WindPlantUserDefined* WindPlantUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::WindType1or2UserDefined* WindType1or2UserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::WindType3or4UserDefined* WindType3or4UserDefined; + + /** \brief Used for boolean parameter value. If this attribute is populated, integerParameterValue and floatParameterValue will not be. Default: false */ + CIMPP::Boolean booleanParameterValue; + + /** \brief Used for floating point parameter value. If this attribute is populated, booleanParameterValue and integerParameterValue will not be. Default: nullptr */ + CIMPP::Simple_Float floatParameterValue; + + /** \brief Used for integer parameter value. If this attribute is populated, booleanParameterValue and floatParameterValue will not be. Default: 0 */ + CIMPP::Integer integerParameterValue; + + /** \brief Sequence number of the parameter among the set of parameters associated with the related proprietary user-defined model. Default: 0 */ + CIMPP::Integer parameterNumber; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ProtectedSwitch.cpp b/CGMES_2.4.15_27JAN2020/ProtectedSwitch.cpp index f80191fcf..2b6f24097 100644 --- a/CGMES_2.4.15_27JAN2020/ProtectedSwitch.cpp +++ b/CGMES_2.4.15_27JAN2020/ProtectedSwitch.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ProtectedSwitch::ProtectedSwitch() {}; -ProtectedSwitch::~ProtectedSwitch() {}; +ProtectedSwitch::ProtectedSwitch() {} +ProtectedSwitch::~ProtectedSwitch() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ ProtectedSwitch::getPossibleProfilesForAttributes() const return map; } - - - - - const char ProtectedSwitch::debugName[] = "ProtectedSwitch"; const char* ProtectedSwitch::debugString() const { @@ -52,7 +47,7 @@ const char* ProtectedSwitch::debugString() const void ProtectedSwitch::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ProtectedSwitch"), &ProtectedSwitch_factory)); + factory_map.emplace("cim:ProtectedSwitch", &ProtectedSwitch_factory); } void ProtectedSwitch::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/ProtectedSwitch.hpp b/CGMES_2.4.15_27JAN2020/ProtectedSwitch.hpp index 188feccca..e7161aa71 100644 --- a/CGMES_2.4.15_27JAN2020/ProtectedSwitch.hpp +++ b/CGMES_2.4.15_27JAN2020/ProtectedSwitch.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A ProtectedSwitch is a switching device that can be operated by ProtectionEquipment. - */ + /** \brief A ProtectedSwitch is a switching device that can be operated by ProtectionEquipment. */ class ProtectedSwitch : public Switch { public: @@ -26,7 +24,6 @@ namespace CIMPP ProtectedSwitch(); ~ProtectedSwitch() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Pss1.cpp b/CGMES_2.4.15_27JAN2020/Pss1.cpp index 1dd19fafc..a1bc68391 100644 --- a/CGMES_2.4.15_27JAN2020/Pss1.cpp +++ b/CGMES_2.4.15_27JAN2020/Pss1.cpp @@ -8,26 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -Pss1::Pss1() {}; -Pss1::~Pss1() {}; +Pss1::Pss1() {} +Pss1::~Pss1() {} static const std::list PossibleProfilesForClass = { @@ -68,207 +53,220 @@ Pss1::getPossibleProfilesForAttributes() const return map; } - -bool assign_Pss1_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_kpe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_kpe(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpe; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_kw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_kw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_t10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_t10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_t7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_t8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_t8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_t9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_t9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_tpe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_tpe(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpe; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_vadat(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_vadat(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vadat; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_vsmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_vsmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_vsmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_vsmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_Pss1_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -282,7 +280,8 @@ bool get_Pss1_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_kpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpe; if (!buffer.str().empty()) @@ -296,7 +295,8 @@ bool get_Pss1_kpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -310,7 +310,8 @@ bool get_Pss1_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_kw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kw; if (!buffer.str().empty()) @@ -324,7 +325,8 @@ bool get_Pss1_kw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -338,7 +340,8 @@ bool get_Pss1_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t10; if (!buffer.str().empty()) @@ -352,7 +355,8 @@ bool get_Pss1_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -366,7 +370,8 @@ bool get_Pss1_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -380,7 +385,8 @@ bool get_Pss1_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t7; if (!buffer.str().empty()) @@ -394,7 +400,8 @@ bool get_Pss1_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t8; if (!buffer.str().empty()) @@ -408,7 +415,8 @@ bool get_Pss1_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t9; if (!buffer.str().empty()) @@ -422,7 +430,8 @@ bool get_Pss1_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_tpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpe; if (!buffer.str().empty()) @@ -436,7 +445,8 @@ bool get_Pss1_tpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_vadat(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vadat; if (!buffer.str().empty()) @@ -450,7 +460,8 @@ bool get_Pss1_vadat(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_vsmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmn; if (!buffer.str().empty()) @@ -464,7 +475,8 @@ bool get_Pss1_vsmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_vsmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmx; if (!buffer.str().empty()) @@ -476,8 +488,6 @@ bool get_Pss1_vsmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char Pss1::debugName[] = "Pss1"; const char* Pss1::debugString() const { @@ -486,26 +496,26 @@ const char* Pss1::debugString() const void Pss1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Pss1"), &Pss1_factory)); + factory_map.emplace("cim:Pss1", &Pss1_factory); } void Pss1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Pss1.kf"), &assign_Pss1_kf)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.kpe"), &assign_Pss1_kpe)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.ks"), &assign_Pss1_ks)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.kw"), &assign_Pss1_kw)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.pmin"), &assign_Pss1_pmin)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.t10"), &assign_Pss1_t10)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.t5"), &assign_Pss1_t5)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.t6"), &assign_Pss1_t6)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.t7"), &assign_Pss1_t7)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.t8"), &assign_Pss1_t8)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.t9"), &assign_Pss1_t9)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.tpe"), &assign_Pss1_tpe)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.vadat"), &assign_Pss1_vadat)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.vsmn"), &assign_Pss1_vsmn)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.vsmx"), &assign_Pss1_vsmx)); + assign_map.emplace("cim:Pss1.kf", &assign_Pss1_kf); + assign_map.emplace("cim:Pss1.kpe", &assign_Pss1_kpe); + assign_map.emplace("cim:Pss1.ks", &assign_Pss1_ks); + assign_map.emplace("cim:Pss1.kw", &assign_Pss1_kw); + assign_map.emplace("cim:Pss1.pmin", &assign_Pss1_pmin); + assign_map.emplace("cim:Pss1.t10", &assign_Pss1_t10); + assign_map.emplace("cim:Pss1.t5", &assign_Pss1_t5); + assign_map.emplace("cim:Pss1.t6", &assign_Pss1_t6); + assign_map.emplace("cim:Pss1.t7", &assign_Pss1_t7); + assign_map.emplace("cim:Pss1.t8", &assign_Pss1_t8); + assign_map.emplace("cim:Pss1.t9", &assign_Pss1_t9); + assign_map.emplace("cim:Pss1.tpe", &assign_Pss1_tpe); + assign_map.emplace("cim:Pss1.vadat", &assign_Pss1_vadat); + assign_map.emplace("cim:Pss1.vsmn", &assign_Pss1_vsmn); + assign_map.emplace("cim:Pss1.vsmx", &assign_Pss1_vsmx); } void Pss1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/Pss1.hpp b/CGMES_2.4.15_27JAN2020/Pss1.hpp index 1a0e315e9..d0b00aadb 100644 --- a/CGMES_2.4.15_27JAN2020/Pss1.hpp +++ b/CGMES_2.4.15_27JAN2020/Pss1.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Italian PSS - three input PSS (speed, frequency, power). - */ + /** \brief Italian PSS - three input PSS (speed, frequency, power). */ class Pss1 : public PowerSystemStabilizerDynamics { public: @@ -30,21 +28,50 @@ namespace CIMPP Pss1(); ~Pss1() override; - CIMPP::Simple_Float kf; /* Frequency power input gain (K). Typical Value = 5. Default: nullptr */ - CIMPP::Simple_Float kpe; /* Electric power input gain (K). Typical Value = 0.3. Default: nullptr */ - CIMPP::Simple_Float ks; /* PSS gain (K). Typical Value = 1. Default: nullptr */ - CIMPP::Simple_Float kw; /* Shaft speed power input gain (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU pmin; /* Minimum power PSS enabling (P). Typical Value = 0.25. Default: nullptr */ - CIMPP::Seconds t10; /* Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t5; /* Washout (T). Typical Value = 3.5. Default: nullptr */ - CIMPP::Seconds t6; /* Filter time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t7; /* Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t8; /* Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t9; /* Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tpe; /* Electric power filter time constant (T). Typical Value = 0.05. Default: nullptr */ - CIMPP::Boolean vadat; /* Default: false */ - CIMPP::PU vsmn; /* Stabilizer output max limit (V). Typical Value = -0.06. Default: nullptr */ - CIMPP::PU vsmx; /* Stabilizer output min limit (V). Typical Value = 0.06. Default: nullptr */ + /** \brief Frequency power input gain (K). Typical Value = 5. Default: nullptr */ + CIMPP::Simple_Float kf; + + /** \brief Electric power input gain (K). Typical Value = 0.3. Default: nullptr */ + CIMPP::Simple_Float kpe; + + /** \brief PSS gain (K). Typical Value = 1. Default: nullptr */ + CIMPP::Simple_Float ks; + + /** \brief Shaft speed power input gain (K). Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float kw; + + /** \brief Minimum power PSS enabling (P). Typical Value = 0.25. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t10; + + /** \brief Washout (T). Typical Value = 3.5. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Filter time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t7; + + /** \brief Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t8; + + /** \brief Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t9; + + /** \brief Electric power filter time constant (T). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds tpe; + + /** \brief Default: false */ + CIMPP::Boolean vadat; + + /** \brief Stabilizer output max limit (V). Typical Value = -0.06. Default: nullptr */ + CIMPP::PU vsmn; + + /** \brief Stabilizer output min limit (V). Typical Value = 0.06. Default: nullptr */ + CIMPP::PU vsmx; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Pss1A.cpp b/CGMES_2.4.15_27JAN2020/Pss1A.cpp index 9f69780d8..219c3f935 100644 --- a/CGMES_2.4.15_27JAN2020/Pss1A.cpp +++ b/CGMES_2.4.15_27JAN2020/Pss1A.cpp @@ -8,33 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "InputSignalKind.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -Pss1A::Pss1A() {}; -Pss1A::~Pss1A() {}; +Pss1A::Pss1A() {} +Pss1A::~Pss1A() {} static const std::list PossibleProfilesForClass = { @@ -82,298 +60,318 @@ Pss1A::getPossibleProfilesForAttributes() const return map; } - -bool assign_Pss1A_a1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_a1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_a2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_a2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_a3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_a3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_a4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_a4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_a5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_a5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_a6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_a6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_a7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_a7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_a8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_a8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_inputSignalType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_inputSignalType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignalType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_tdelay(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_tdelay(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdelay; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_vcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_vcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vcl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_vcu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_vcu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vcu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_Pss1A_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a1; if (!buffer.str().empty()) @@ -387,7 +385,8 @@ bool get_Pss1A_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a2; if (!buffer.str().empty()) @@ -401,7 +400,8 @@ bool get_Pss1A_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_a3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a3; if (!buffer.str().empty()) @@ -415,7 +415,8 @@ bool get_Pss1A_a3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_a4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a4; if (!buffer.str().empty()) @@ -429,7 +430,8 @@ bool get_Pss1A_a4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_a5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a5; if (!buffer.str().empty()) @@ -443,7 +445,8 @@ bool get_Pss1A_a5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_a6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a6; if (!buffer.str().empty()) @@ -457,7 +460,8 @@ bool get_Pss1A_a6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_a7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a7; if (!buffer.str().empty()) @@ -471,7 +475,8 @@ bool get_Pss1A_a7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_a8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a8; if (!buffer.str().empty()) @@ -483,9 +488,25 @@ bool get_Pss1A_a8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } +bool get_Pss1A_inputSignalType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignalType; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_Pss1A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -499,7 +520,8 @@ bool get_Pss1A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -513,7 +535,8 @@ bool get_Pss1A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -527,7 +550,8 @@ bool get_Pss1A_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -541,7 +565,8 @@ bool get_Pss1A_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -555,7 +580,8 @@ bool get_Pss1A_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -569,7 +595,8 @@ bool get_Pss1A_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -583,7 +610,8 @@ bool get_Pss1A_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -597,7 +625,8 @@ bool get_Pss1A_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_tdelay(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdelay; if (!buffer.str().empty()) @@ -611,7 +640,8 @@ bool get_Pss1A_tdelay(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_Pss1A_vcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vcl; if (!buffer.str().empty()) @@ -625,7 +655,8 @@ bool get_Pss1A_vcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_vcu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vcu; if (!buffer.str().empty()) @@ -639,7 +670,8 @@ bool get_Pss1A_vcu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -653,7 +685,8 @@ bool get_Pss1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -665,22 +698,6 @@ bool get_Pss1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - -bool get_Pss1A_inputSignalType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignalType; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char Pss1A::debugName[] = "Pss1A"; const char* Pss1A::debugString() const { @@ -689,33 +706,33 @@ const char* Pss1A::debugString() const void Pss1A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Pss1A"), &Pss1A_factory)); + factory_map.emplace("cim:Pss1A", &Pss1A_factory); } void Pss1A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Pss1A.a1"), &assign_Pss1A_a1)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.a2"), &assign_Pss1A_a2)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.a3"), &assign_Pss1A_a3)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.a4"), &assign_Pss1A_a4)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.a5"), &assign_Pss1A_a5)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.a6"), &assign_Pss1A_a6)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.a7"), &assign_Pss1A_a7)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.a8"), &assign_Pss1A_a8)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.inputSignalType"), &assign_Pss1A_inputSignalType)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.kd"), &assign_Pss1A_kd)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.ks"), &assign_Pss1A_ks)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.t1"), &assign_Pss1A_t1)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.t2"), &assign_Pss1A_t2)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.t3"), &assign_Pss1A_t3)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.t4"), &assign_Pss1A_t4)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.t5"), &assign_Pss1A_t5)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.t6"), &assign_Pss1A_t6)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.tdelay"), &assign_Pss1A_tdelay)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.vcl"), &assign_Pss1A_vcl)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.vcu"), &assign_Pss1A_vcu)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.vrmax"), &assign_Pss1A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.vrmin"), &assign_Pss1A_vrmin)); + assign_map.emplace("cim:Pss1A.a1", &assign_Pss1A_a1); + assign_map.emplace("cim:Pss1A.a2", &assign_Pss1A_a2); + assign_map.emplace("cim:Pss1A.a3", &assign_Pss1A_a3); + assign_map.emplace("cim:Pss1A.a4", &assign_Pss1A_a4); + assign_map.emplace("cim:Pss1A.a5", &assign_Pss1A_a5); + assign_map.emplace("cim:Pss1A.a6", &assign_Pss1A_a6); + assign_map.emplace("cim:Pss1A.a7", &assign_Pss1A_a7); + assign_map.emplace("cim:Pss1A.a8", &assign_Pss1A_a8); + assign_map.emplace("cim:Pss1A.inputSignalType", &assign_Pss1A_inputSignalType); + assign_map.emplace("cim:Pss1A.kd", &assign_Pss1A_kd); + assign_map.emplace("cim:Pss1A.ks", &assign_Pss1A_ks); + assign_map.emplace("cim:Pss1A.t1", &assign_Pss1A_t1); + assign_map.emplace("cim:Pss1A.t2", &assign_Pss1A_t2); + assign_map.emplace("cim:Pss1A.t3", &assign_Pss1A_t3); + assign_map.emplace("cim:Pss1A.t4", &assign_Pss1A_t4); + assign_map.emplace("cim:Pss1A.t5", &assign_Pss1A_t5); + assign_map.emplace("cim:Pss1A.t6", &assign_Pss1A_t6); + assign_map.emplace("cim:Pss1A.tdelay", &assign_Pss1A_tdelay); + assign_map.emplace("cim:Pss1A.vcl", &assign_Pss1A_vcl); + assign_map.emplace("cim:Pss1A.vcu", &assign_Pss1A_vcu); + assign_map.emplace("cim:Pss1A.vrmax", &assign_Pss1A_vrmax); + assign_map.emplace("cim:Pss1A.vrmin", &assign_Pss1A_vrmin); } void Pss1A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/Pss1A.hpp b/CGMES_2.4.15_27JAN2020/Pss1A.hpp index 17cb944a4..e1b282d6d 100644 --- a/CGMES_2.4.15_27JAN2020/Pss1A.hpp +++ b/CGMES_2.4.15_27JAN2020/Pss1A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Single input power system stabilizer. It is a modified version in order to allow representation of various vendors' implementations on PSS type 1A. - */ + /** \brief Single input power system stabilizer. It is a modified version in order to allow representation of various vendors' implementations on PSS type 1A. */ class Pss1A : public PowerSystemStabilizerDynamics { public: @@ -30,28 +28,71 @@ namespace CIMPP Pss1A(); ~Pss1A() override; - CIMPP::PU a1; /* Notch filter parameter (A1). Default: nullptr */ - CIMPP::PU a2; /* Notch filter parameter (A2). Default: nullptr */ - CIMPP::PU a3; /* Notch filter parameter (A3). Default: nullptr */ - CIMPP::PU a4; /* Notch filter parameter (A4). Default: nullptr */ - CIMPP::PU a5; /* Notch filter parameter (A5). Default: nullptr */ - CIMPP::PU a6; /* Notch filter parameter (A6). Default: nullptr */ - CIMPP::PU a7; /* Notch filter parameter (A7). Default: nullptr */ - CIMPP::PU a8; /* Notch filter parameter (A8). Default: nullptr */ - CIMPP::InputSignalKind inputSignalType; /* Type of input signal. Default: 0 */ - CIMPP::Boolean kd; /* Selector (Kd). true = e used false = e not used. Default: false */ - CIMPP::PU ks; /* Stabilizer gain (Ks). Default: nullptr */ - CIMPP::Seconds t1; /* Lead/lag time constant (T1). Default: nullptr */ - CIMPP::Seconds t2; /* Lead/lag time constant (T2). Default: nullptr */ - CIMPP::Seconds t3; /* Lead/lag time constant (T3). Default: nullptr */ - CIMPP::Seconds t4; /* Lead/lag time constant (T4). Default: nullptr */ - CIMPP::Seconds t5; /* Washout time constant (T5). Default: nullptr */ - CIMPP::Seconds t6; /* Transducer time constant (T6). Default: nullptr */ - CIMPP::Seconds tdelay; /* Time constant (Tdelay). Default: nullptr */ - CIMPP::PU vcl; /* Stabilizer input cutoff threshold (Vcl). Default: nullptr */ - CIMPP::PU vcu; /* Stabilizer input cutoff threshold (Vcu). Default: nullptr */ - CIMPP::PU vrmax; /* Maximum stabilizer output (Vrmax). Default: nullptr */ - CIMPP::PU vrmin; /* Minimum stabilizer output (Vrmin). Default: nullptr */ + /** \brief Notch filter parameter (A1). Default: nullptr */ + CIMPP::PU a1; + + /** \brief Notch filter parameter (A2). Default: nullptr */ + CIMPP::PU a2; + + /** \brief Notch filter parameter (A3). Default: nullptr */ + CIMPP::PU a3; + + /** \brief Notch filter parameter (A4). Default: nullptr */ + CIMPP::PU a4; + + /** \brief Notch filter parameter (A5). Default: nullptr */ + CIMPP::PU a5; + + /** \brief Notch filter parameter (A6). Default: nullptr */ + CIMPP::PU a6; + + /** \brief Notch filter parameter (A7). Default: nullptr */ + CIMPP::PU a7; + + /** \brief Notch filter parameter (A8). Default: nullptr */ + CIMPP::PU a8; + + /** \brief Type of input signal. Default: 0 */ + CIMPP::InputSignalKind inputSignalType; + + /** \brief Selector (Kd). true = e used false = e not used. Default: false */ + CIMPP::Boolean kd; + + /** \brief Stabilizer gain (Ks). Default: nullptr */ + CIMPP::PU ks; + + /** \brief Lead/lag time constant (T1). Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Lead/lag time constant (T2). Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Lead/lag time constant (T3). Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Lead/lag time constant (T4). Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Washout time constant (T5). Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Transducer time constant (T6). Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time constant (Tdelay). Default: nullptr */ + CIMPP::Seconds tdelay; + + /** \brief Stabilizer input cutoff threshold (Vcl). Default: nullptr */ + CIMPP::PU vcl; + + /** \brief Stabilizer input cutoff threshold (Vcu). Default: nullptr */ + CIMPP::PU vcu; + + /** \brief Maximum stabilizer output (Vrmax). Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum stabilizer output (Vrmin). Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Pss2B.cpp b/CGMES_2.4.15_27JAN2020/Pss2B.cpp index c5cde1d14..71b0429d6 100644 --- a/CGMES_2.4.15_27JAN2020/Pss2B.cpp +++ b/CGMES_2.4.15_27JAN2020/Pss2B.cpp @@ -8,42 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "InputSignalKind.hpp" -#include "InputSignalKind.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Integer.hpp" -#include "Integer.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -Pss2B::Pss2B() {}; -Pss2B::~Pss2B() {}; +Pss2B::Pss2B() {} +Pss2B::~Pss2B() {} static const std::list PossibleProfilesForClass = { @@ -100,415 +69,444 @@ Pss2B::getPossibleProfilesForAttributes() const return map; } - -bool assign_Pss2B_a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_a(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_inputSignal1Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_inputSignal1Type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal1Type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_inputSignal2Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_inputSignal2Type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal2Type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_ks1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_ks1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_ks2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_ks2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_ks3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_ks3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_ks4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_ks4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_m(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_m(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->m; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_n(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_n(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->n; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t11(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t11; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_tw1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_tw1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_tw2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_tw2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_tw3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_tw3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_tw4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_tw4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_vsi1max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_vsi1max(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsi1max; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_vsi1min(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_vsi1min(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsi1min; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_vsi2max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_vsi2max(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsi2max; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_vsi2min(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_vsi2min(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsi2min; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_vstmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_vstmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vstmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_vstmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_vstmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vstmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_Pss2B_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a; if (!buffer.str().empty()) @@ -520,9 +518,40 @@ bool get_Pss2B_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } +bool get_Pss2B_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignal1Type; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_Pss2B_inputSignal2Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignal2Type; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_Pss2B_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks1; if (!buffer.str().empty()) @@ -536,7 +565,8 @@ bool get_Pss2B_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks2; if (!buffer.str().empty()) @@ -550,7 +580,8 @@ bool get_Pss2B_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_ks3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks3; if (!buffer.str().empty()) @@ -564,7 +595,8 @@ bool get_Pss2B_ks3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_ks4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks4; if (!buffer.str().empty()) @@ -578,7 +610,8 @@ bool get_Pss2B_ks4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->m; if (!buffer.str().empty()) @@ -592,7 +625,8 @@ bool get_Pss2B_m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_n(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->n; if (!buffer.str().empty()) @@ -606,7 +640,8 @@ bool get_Pss2B_n(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -620,7 +655,8 @@ bool get_Pss2B_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t10; if (!buffer.str().empty()) @@ -634,7 +670,8 @@ bool get_Pss2B_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t11; if (!buffer.str().empty()) @@ -648,7 +685,8 @@ bool get_Pss2B_t11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -662,7 +700,8 @@ bool get_Pss2B_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -676,7 +715,8 @@ bool get_Pss2B_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -690,7 +730,8 @@ bool get_Pss2B_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -704,7 +745,8 @@ bool get_Pss2B_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t7; if (!buffer.str().empty()) @@ -718,7 +760,8 @@ bool get_Pss2B_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t8; if (!buffer.str().empty()) @@ -732,7 +775,8 @@ bool get_Pss2B_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t9; if (!buffer.str().empty()) @@ -746,7 +790,8 @@ bool get_Pss2B_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -760,7 +805,8 @@ bool get_Pss2B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -774,7 +820,8 @@ bool get_Pss2B_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_tw1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw1; if (!buffer.str().empty()) @@ -788,7 +835,8 @@ bool get_Pss2B_tw1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_tw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw2; if (!buffer.str().empty()) @@ -802,7 +850,8 @@ bool get_Pss2B_tw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_tw3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw3; if (!buffer.str().empty()) @@ -816,7 +865,8 @@ bool get_Pss2B_tw3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_tw4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw4; if (!buffer.str().empty()) @@ -830,7 +880,8 @@ bool get_Pss2B_tw4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_vsi1max(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsi1max; if (!buffer.str().empty()) @@ -844,7 +895,8 @@ bool get_Pss2B_vsi1max(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_Pss2B_vsi1min(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsi1min; if (!buffer.str().empty()) @@ -858,7 +910,8 @@ bool get_Pss2B_vsi1min(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_Pss2B_vsi2max(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsi2max; if (!buffer.str().empty()) @@ -872,7 +925,8 @@ bool get_Pss2B_vsi2max(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_Pss2B_vsi2min(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsi2min; if (!buffer.str().empty()) @@ -886,7 +940,8 @@ bool get_Pss2B_vsi2min(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_Pss2B_vstmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vstmax; if (!buffer.str().empty()) @@ -900,7 +955,8 @@ bool get_Pss2B_vstmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_Pss2B_vstmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vstmin; if (!buffer.str().empty()) @@ -912,36 +968,6 @@ bool get_Pss2B_vstmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - -bool get_Pss2B_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignal1Type; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - -bool get_Pss2B_inputSignal2Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignal2Type; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char Pss2B::debugName[] = "Pss2B"; const char* Pss2B::debugString() const { @@ -950,42 +976,42 @@ const char* Pss2B::debugString() const void Pss2B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Pss2B"), &Pss2B_factory)); + factory_map.emplace("cim:Pss2B", &Pss2B_factory); } void Pss2B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Pss2B.a"), &assign_Pss2B_a)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.inputSignal1Type"), &assign_Pss2B_inputSignal1Type)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.inputSignal2Type"), &assign_Pss2B_inputSignal2Type)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.ks1"), &assign_Pss2B_ks1)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.ks2"), &assign_Pss2B_ks2)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.ks3"), &assign_Pss2B_ks3)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.ks4"), &assign_Pss2B_ks4)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.m"), &assign_Pss2B_m)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.n"), &assign_Pss2B_n)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t1"), &assign_Pss2B_t1)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t10"), &assign_Pss2B_t10)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t11"), &assign_Pss2B_t11)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t2"), &assign_Pss2B_t2)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t3"), &assign_Pss2B_t3)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t4"), &assign_Pss2B_t4)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t6"), &assign_Pss2B_t6)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t7"), &assign_Pss2B_t7)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t8"), &assign_Pss2B_t8)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t9"), &assign_Pss2B_t9)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.ta"), &assign_Pss2B_ta)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.tb"), &assign_Pss2B_tb)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.tw1"), &assign_Pss2B_tw1)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.tw2"), &assign_Pss2B_tw2)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.tw3"), &assign_Pss2B_tw3)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.tw4"), &assign_Pss2B_tw4)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.vsi1max"), &assign_Pss2B_vsi1max)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.vsi1min"), &assign_Pss2B_vsi1min)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.vsi2max"), &assign_Pss2B_vsi2max)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.vsi2min"), &assign_Pss2B_vsi2min)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.vstmax"), &assign_Pss2B_vstmax)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.vstmin"), &assign_Pss2B_vstmin)); + assign_map.emplace("cim:Pss2B.a", &assign_Pss2B_a); + assign_map.emplace("cim:Pss2B.inputSignal1Type", &assign_Pss2B_inputSignal1Type); + assign_map.emplace("cim:Pss2B.inputSignal2Type", &assign_Pss2B_inputSignal2Type); + assign_map.emplace("cim:Pss2B.ks1", &assign_Pss2B_ks1); + assign_map.emplace("cim:Pss2B.ks2", &assign_Pss2B_ks2); + assign_map.emplace("cim:Pss2B.ks3", &assign_Pss2B_ks3); + assign_map.emplace("cim:Pss2B.ks4", &assign_Pss2B_ks4); + assign_map.emplace("cim:Pss2B.m", &assign_Pss2B_m); + assign_map.emplace("cim:Pss2B.n", &assign_Pss2B_n); + assign_map.emplace("cim:Pss2B.t1", &assign_Pss2B_t1); + assign_map.emplace("cim:Pss2B.t10", &assign_Pss2B_t10); + assign_map.emplace("cim:Pss2B.t11", &assign_Pss2B_t11); + assign_map.emplace("cim:Pss2B.t2", &assign_Pss2B_t2); + assign_map.emplace("cim:Pss2B.t3", &assign_Pss2B_t3); + assign_map.emplace("cim:Pss2B.t4", &assign_Pss2B_t4); + assign_map.emplace("cim:Pss2B.t6", &assign_Pss2B_t6); + assign_map.emplace("cim:Pss2B.t7", &assign_Pss2B_t7); + assign_map.emplace("cim:Pss2B.t8", &assign_Pss2B_t8); + assign_map.emplace("cim:Pss2B.t9", &assign_Pss2B_t9); + assign_map.emplace("cim:Pss2B.ta", &assign_Pss2B_ta); + assign_map.emplace("cim:Pss2B.tb", &assign_Pss2B_tb); + assign_map.emplace("cim:Pss2B.tw1", &assign_Pss2B_tw1); + assign_map.emplace("cim:Pss2B.tw2", &assign_Pss2B_tw2); + assign_map.emplace("cim:Pss2B.tw3", &assign_Pss2B_tw3); + assign_map.emplace("cim:Pss2B.tw4", &assign_Pss2B_tw4); + assign_map.emplace("cim:Pss2B.vsi1max", &assign_Pss2B_vsi1max); + assign_map.emplace("cim:Pss2B.vsi1min", &assign_Pss2B_vsi1min); + assign_map.emplace("cim:Pss2B.vsi2max", &assign_Pss2B_vsi2max); + assign_map.emplace("cim:Pss2B.vsi2min", &assign_Pss2B_vsi2min); + assign_map.emplace("cim:Pss2B.vstmax", &assign_Pss2B_vstmax); + assign_map.emplace("cim:Pss2B.vstmin", &assign_Pss2B_vstmin); } void Pss2B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/Pss2B.hpp b/CGMES_2.4.15_27JAN2020/Pss2B.hpp index 55c64c3fc..90e74ab8e 100644 --- a/CGMES_2.4.15_27JAN2020/Pss2B.hpp +++ b/CGMES_2.4.15_27JAN2020/Pss2B.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE PSS2B Model. Extra lead/lag (or rate) block added at end (up to 4 lead/lags total). - */ + /** \brief Modified IEEE PSS2B Model. Extra lead/lag (or rate) block added at end (up to 4 lead/lags total). */ class Pss2B : public PowerSystemStabilizerDynamics { public: @@ -31,37 +29,98 @@ namespace CIMPP Pss2B(); ~Pss2B() override; - CIMPP::Simple_Float a; /* Numerator constant (a). Typical Value = 1. Default: nullptr */ - CIMPP::InputSignalKind inputSignal1Type; /* Type of input signal #1. Typical Value = rotorSpeed. Default: 0 */ - CIMPP::InputSignalKind inputSignal2Type; /* Type of input signal #2. Typical Value = generatorElectricalPower. Default: 0 */ - CIMPP::PU ks1; /* Stabilizer gain (Ks1). Typical Value = 12. Default: nullptr */ - CIMPP::PU ks2; /* Gain on signal #2 (Ks2). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU ks3; /* Gain on signal #2 input before ramp-tracking filter (Ks3). Typical Value = 1. Default: nullptr */ - CIMPP::PU ks4; /* Gain on signal #2 input after ramp-tracking filter (Ks4). Typical Value = 1. Default: nullptr */ - CIMPP::Integer m; /* Denominator order of ramp tracking filter (M). Typical Value = 5. Default: 0 */ - CIMPP::Integer n; /* Order of ramp tracking filter (N). Typical Value = 1. Default: 0 */ - CIMPP::Seconds t1; /* Lead/lag time constant (T1). Typical Value = 0.12. Default: nullptr */ - CIMPP::Seconds t10; /* Lead/lag time constant (T10). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t11; /* Lead/lag time constant (T11). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t2; /* Lead/lag time constant (T2). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds t3; /* Lead/lag time constant (T3). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds t4; /* Lead/lag time constant (T4). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds t6; /* Time constant on signal #1 (T6). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t7; /* Time constant on signal #2 (T7). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds t8; /* Lead of ramp tracking filter (T8). Typical Value = 0.2. Default: nullptr */ - CIMPP::Seconds t9; /* Lag of ramp tracking filter (T9). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds ta; /* Lead constant (Ta). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tb; /* Lag time constant (Tb). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tw1; /* First washout on signal #1 (Tw1). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds tw2; /* Second washout on signal #1 (Tw2). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds tw3; /* First washout on signal #2 (Tw3). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds tw4; /* Second washout on signal #2 (Tw4). Typical Value = 0. Default: nullptr */ - CIMPP::PU vsi1max; /* Input signal #1 max limit (Vsi1max). Typical Value = 2. Default: nullptr */ - CIMPP::PU vsi1min; /* Input signal #1 min limit (Vsi1min). Typical Value = -2. Default: nullptr */ - CIMPP::PU vsi2max; /* Input signal #2 max limit (Vsi2max). Typical Value = 2. Default: nullptr */ - CIMPP::PU vsi2min; /* Input signal #2 min limit (Vsi2min). Typical Value = -2. Default: nullptr */ - CIMPP::PU vstmax; /* Stabilizer output max limit (Vstmax). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU vstmin; /* Stabilizer output min limit (Vstmin). Typical Value = -0.1. Default: nullptr */ + /** \brief Numerator constant (a). Typical Value = 1. Default: nullptr */ + CIMPP::Simple_Float a; + + /** \brief Type of input signal #1. Typical Value = rotorSpeed. Default: 0 */ + CIMPP::InputSignalKind inputSignal1Type; + + /** \brief Type of input signal #2. Typical Value = generatorElectricalPower. Default: 0 */ + CIMPP::InputSignalKind inputSignal2Type; + + /** \brief Stabilizer gain (Ks1). Typical Value = 12. Default: nullptr */ + CIMPP::PU ks1; + + /** \brief Gain on signal #2 (Ks2). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU ks2; + + /** \brief Gain on signal #2 input before ramp-tracking filter (Ks3). Typical Value = 1. Default: nullptr */ + CIMPP::PU ks3; + + /** \brief Gain on signal #2 input after ramp-tracking filter (Ks4). Typical Value = 1. Default: nullptr */ + CIMPP::PU ks4; + + /** \brief Denominator order of ramp tracking filter (M). Typical Value = 5. Default: 0 */ + CIMPP::Integer m; + + /** \brief Order of ramp tracking filter (N). Typical Value = 1. Default: 0 */ + CIMPP::Integer n; + + /** \brief Lead/lag time constant (T1). Typical Value = 0.12. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Lead/lag time constant (T10). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t10; + + /** \brief Lead/lag time constant (T11). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t11; + + /** \brief Lead/lag time constant (T2). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Lead/lag time constant (T3). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Lead/lag time constant (T4). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant on signal #1 (T6). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time constant on signal #2 (T7). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds t7; + + /** \brief Lead of ramp tracking filter (T8). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds t8; + + /** \brief Lag of ramp tracking filter (T9). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t9; + + /** \brief Lead constant (Ta). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Lag time constant (Tb). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief First washout on signal #1 (Tw1). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds tw1; + + /** \brief Second washout on signal #1 (Tw2). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds tw2; + + /** \brief First washout on signal #2 (Tw3). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds tw3; + + /** \brief Second washout on signal #2 (Tw4). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tw4; + + /** \brief Input signal #1 max limit (Vsi1max). Typical Value = 2. Default: nullptr */ + CIMPP::PU vsi1max; + + /** \brief Input signal #1 min limit (Vsi1min). Typical Value = -2. Default: nullptr */ + CIMPP::PU vsi1min; + + /** \brief Input signal #2 max limit (Vsi2max). Typical Value = 2. Default: nullptr */ + CIMPP::PU vsi2max; + + /** \brief Input signal #2 min limit (Vsi2min). Typical Value = -2. Default: nullptr */ + CIMPP::PU vsi2min; + + /** \brief Stabilizer output max limit (Vstmax). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU vstmax; + + /** \brief Stabilizer output min limit (Vstmin). Typical Value = -0.1. Default: nullptr */ + CIMPP::PU vstmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Pss2ST.cpp b/CGMES_2.4.15_27JAN2020/Pss2ST.cpp index d66a34602..9a42e067c 100644 --- a/CGMES_2.4.15_27JAN2020/Pss2ST.cpp +++ b/CGMES_2.4.15_27JAN2020/Pss2ST.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "InputSignalKind.hpp" -#include "InputSignalKind.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -Pss2ST::Pss2ST() {}; -Pss2ST::~Pss2ST() {}; +Pss2ST::Pss2ST() {} +Pss2ST::~Pss2ST() {} static const std::list PossibleProfilesForClass = { @@ -74,246 +56,292 @@ Pss2ST::getPossibleProfilesForAttributes() const return map; } - -bool assign_Pss2ST_inputSignal1Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_inputSignal1Type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal1Type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_inputSignal2Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_inputSignal2Type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal2Type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_lsmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_lsmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lsmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_lsmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_lsmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lsmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_vcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_vcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vcl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_vcu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_vcu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vcu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } +bool get_Pss2ST_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignal1Type; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} +bool get_Pss2ST_inputSignal2Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignal2Type; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} bool get_Pss2ST_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -327,7 +355,8 @@ bool get_Pss2ST_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -341,7 +370,8 @@ bool get_Pss2ST_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_lsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lsmax; if (!buffer.str().empty()) @@ -355,7 +385,8 @@ bool get_Pss2ST_lsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_Pss2ST_lsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lsmin; if (!buffer.str().empty()) @@ -369,7 +400,8 @@ bool get_Pss2ST_lsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_Pss2ST_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -383,7 +415,8 @@ bool get_Pss2ST_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t10; if (!buffer.str().empty()) @@ -397,7 +430,8 @@ bool get_Pss2ST_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -411,7 +445,8 @@ bool get_Pss2ST_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -425,7 +460,8 @@ bool get_Pss2ST_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -439,7 +475,8 @@ bool get_Pss2ST_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -453,7 +490,8 @@ bool get_Pss2ST_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -467,7 +505,8 @@ bool get_Pss2ST_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t7; if (!buffer.str().empty()) @@ -481,7 +520,8 @@ bool get_Pss2ST_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t8; if (!buffer.str().empty()) @@ -495,7 +535,8 @@ bool get_Pss2ST_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t9; if (!buffer.str().empty()) @@ -509,7 +550,8 @@ bool get_Pss2ST_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_vcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vcl; if (!buffer.str().empty()) @@ -523,7 +565,8 @@ bool get_Pss2ST_vcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_vcu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vcu; if (!buffer.str().empty()) @@ -535,36 +578,6 @@ bool get_Pss2ST_vcu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - -bool get_Pss2ST_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignal1Type; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - -bool get_Pss2ST_inputSignal2Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignal2Type; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char Pss2ST::debugName[] = "Pss2ST"; const char* Pss2ST::debugString() const { @@ -573,29 +586,29 @@ const char* Pss2ST::debugString() const void Pss2ST::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Pss2ST"), &Pss2ST_factory)); + factory_map.emplace("cim:Pss2ST", &Pss2ST_factory); } void Pss2ST::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.inputSignal1Type"), &assign_Pss2ST_inputSignal1Type)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.inputSignal2Type"), &assign_Pss2ST_inputSignal2Type)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.k1"), &assign_Pss2ST_k1)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.k2"), &assign_Pss2ST_k2)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.lsmax"), &assign_Pss2ST_lsmax)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.lsmin"), &assign_Pss2ST_lsmin)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t1"), &assign_Pss2ST_t1)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t10"), &assign_Pss2ST_t10)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t2"), &assign_Pss2ST_t2)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t3"), &assign_Pss2ST_t3)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t4"), &assign_Pss2ST_t4)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t5"), &assign_Pss2ST_t5)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t6"), &assign_Pss2ST_t6)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t7"), &assign_Pss2ST_t7)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t8"), &assign_Pss2ST_t8)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t9"), &assign_Pss2ST_t9)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.vcl"), &assign_Pss2ST_vcl)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.vcu"), &assign_Pss2ST_vcu)); + assign_map.emplace("cim:Pss2ST.inputSignal1Type", &assign_Pss2ST_inputSignal1Type); + assign_map.emplace("cim:Pss2ST.inputSignal2Type", &assign_Pss2ST_inputSignal2Type); + assign_map.emplace("cim:Pss2ST.k1", &assign_Pss2ST_k1); + assign_map.emplace("cim:Pss2ST.k2", &assign_Pss2ST_k2); + assign_map.emplace("cim:Pss2ST.lsmax", &assign_Pss2ST_lsmax); + assign_map.emplace("cim:Pss2ST.lsmin", &assign_Pss2ST_lsmin); + assign_map.emplace("cim:Pss2ST.t1", &assign_Pss2ST_t1); + assign_map.emplace("cim:Pss2ST.t10", &assign_Pss2ST_t10); + assign_map.emplace("cim:Pss2ST.t2", &assign_Pss2ST_t2); + assign_map.emplace("cim:Pss2ST.t3", &assign_Pss2ST_t3); + assign_map.emplace("cim:Pss2ST.t4", &assign_Pss2ST_t4); + assign_map.emplace("cim:Pss2ST.t5", &assign_Pss2ST_t5); + assign_map.emplace("cim:Pss2ST.t6", &assign_Pss2ST_t6); + assign_map.emplace("cim:Pss2ST.t7", &assign_Pss2ST_t7); + assign_map.emplace("cim:Pss2ST.t8", &assign_Pss2ST_t8); + assign_map.emplace("cim:Pss2ST.t9", &assign_Pss2ST_t9); + assign_map.emplace("cim:Pss2ST.vcl", &assign_Pss2ST_vcl); + assign_map.emplace("cim:Pss2ST.vcu", &assign_Pss2ST_vcu); } void Pss2ST::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/Pss2ST.hpp b/CGMES_2.4.15_27JAN2020/Pss2ST.hpp index c37d7fa68..abd31dcb0 100644 --- a/CGMES_2.4.15_27JAN2020/Pss2ST.hpp +++ b/CGMES_2.4.15_27JAN2020/Pss2ST.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - PTI Microprocessor-Based Stabilizer type 1. - */ + /** \brief PTI Microprocessor-Based Stabilizer type 1. */ class Pss2ST : public PowerSystemStabilizerDynamics { public: @@ -29,24 +27,59 @@ namespace CIMPP Pss2ST(); ~Pss2ST() override; - CIMPP::InputSignalKind inputSignal1Type; /* Type of input signal #1. Typical Value = rotorAngularFrequencyDeviation. Default: 0 */ - CIMPP::InputSignalKind inputSignal2Type; /* Type of input signal #2. Typical Value = generatorElectricalPower. Default: 0 */ - CIMPP::PU k1; /* Gain (K1). Default: nullptr */ - CIMPP::PU k2; /* Gain (K2). Default: nullptr */ - CIMPP::PU lsmax; /* Limiter (Lsmax). Default: nullptr */ - CIMPP::PU lsmin; /* Limiter (Lsmin). Default: nullptr */ - CIMPP::Seconds t1; /* Time constant (T1). Default: nullptr */ - CIMPP::Seconds t10; /* Time constant (T10). Default: nullptr */ - CIMPP::Seconds t2; /* Time constant (T2). Default: nullptr */ - CIMPP::Seconds t3; /* Time constant (T3). Default: nullptr */ - CIMPP::Seconds t4; /* Time constant (T4). Default: nullptr */ - CIMPP::Seconds t5; /* Time constant (T5). Default: nullptr */ - CIMPP::Seconds t6; /* Time constant (T6). Default: nullptr */ - CIMPP::Seconds t7; /* Time constant (T7). Default: nullptr */ - CIMPP::Seconds t8; /* Time constant (T8). Default: nullptr */ - CIMPP::Seconds t9; /* Time constant (T9). Default: nullptr */ - CIMPP::PU vcl; /* Cutoff limiter (Vcl). Default: nullptr */ - CIMPP::PU vcu; /* Cutoff limiter (Vcu). Default: nullptr */ + /** \brief Type of input signal #1. Typical Value = rotorAngularFrequencyDeviation. Default: 0 */ + CIMPP::InputSignalKind inputSignal1Type; + + /** \brief Type of input signal #2. Typical Value = generatorElectricalPower. Default: 0 */ + CIMPP::InputSignalKind inputSignal2Type; + + /** \brief Gain (K1). Default: nullptr */ + CIMPP::PU k1; + + /** \brief Gain (K2). Default: nullptr */ + CIMPP::PU k2; + + /** \brief Limiter (Lsmax). Default: nullptr */ + CIMPP::PU lsmax; + + /** \brief Limiter (Lsmin). Default: nullptr */ + CIMPP::PU lsmin; + + /** \brief Time constant (T1). Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Time constant (T10). Default: nullptr */ + CIMPP::Seconds t10; + + /** \brief Time constant (T2). Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Time constant (T3). Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Time constant (T4). Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant (T5). Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Time constant (T6). Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time constant (T7). Default: nullptr */ + CIMPP::Seconds t7; + + /** \brief Time constant (T8). Default: nullptr */ + CIMPP::Seconds t8; + + /** \brief Time constant (T9). Default: nullptr */ + CIMPP::Seconds t9; + + /** \brief Cutoff limiter (Vcl). Default: nullptr */ + CIMPP::PU vcl; + + /** \brief Cutoff limiter (Vcu). Default: nullptr */ + CIMPP::PU vcu; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Pss5.cpp b/CGMES_2.4.15_27JAN2020/Pss5.cpp index 3c55da9e1..41a4f0631 100644 --- a/CGMES_2.4.15_27JAN2020/Pss5.cpp +++ b/CGMES_2.4.15_27JAN2020/Pss5.cpp @@ -8,28 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -Pss5::Pss5() {}; -Pss5::~Pss5() {}; +Pss5::Pss5() {} +Pss5::~Pss5() {} static const std::list PossibleProfilesForClass = { @@ -72,233 +55,248 @@ Pss5::getPossibleProfilesForAttributes() const return map; } - -bool assign_Pss5_ctw2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_ctw2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ctw2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_deadband(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_deadband(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->deadband; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_isfreq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_isfreq(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->isfreq; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_kpe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_kpe(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpe; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_kpss(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_kpss(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpss; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_pmm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_pmm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_tl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_tl1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_tl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_tl2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_tl3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_tl3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_tl4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_tl4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_tpe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_tpe(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpe; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_tw1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_tw1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_tw2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_tw2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_vadat(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_vadat(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vadat; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_vsmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_vsmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_vsmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_vsmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_Pss5_ctw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ctw2; if (!buffer.str().empty()) @@ -312,7 +310,8 @@ bool get_Pss5_ctw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_deadband(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->deadband; if (!buffer.str().empty()) @@ -326,7 +325,8 @@ bool get_Pss5_deadband(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_Pss5_isfreq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->isfreq; if (!buffer.str().empty()) @@ -340,7 +340,8 @@ bool get_Pss5_isfreq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -354,7 +355,8 @@ bool get_Pss5_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_kpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpe; if (!buffer.str().empty()) @@ -368,7 +370,8 @@ bool get_Pss5_kpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_kpss(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpss; if (!buffer.str().empty()) @@ -382,7 +385,8 @@ bool get_Pss5_kpss(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_pmm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmm; if (!buffer.str().empty()) @@ -396,7 +400,8 @@ bool get_Pss5_pmm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_tl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl1; if (!buffer.str().empty()) @@ -410,7 +415,8 @@ bool get_Pss5_tl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_tl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl2; if (!buffer.str().empty()) @@ -424,7 +430,8 @@ bool get_Pss5_tl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_tl3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl3; if (!buffer.str().empty()) @@ -438,7 +445,8 @@ bool get_Pss5_tl3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_tl4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl4; if (!buffer.str().empty()) @@ -452,7 +460,8 @@ bool get_Pss5_tl4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_tpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpe; if (!buffer.str().empty()) @@ -466,7 +475,8 @@ bool get_Pss5_tpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_tw1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw1; if (!buffer.str().empty()) @@ -480,7 +490,8 @@ bool get_Pss5_tw1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_tw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw2; if (!buffer.str().empty()) @@ -494,7 +505,8 @@ bool get_Pss5_tw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_vadat(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vadat; if (!buffer.str().empty()) @@ -508,7 +520,8 @@ bool get_Pss5_vadat(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_vsmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmn; if (!buffer.str().empty()) @@ -522,7 +535,8 @@ bool get_Pss5_vsmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_vsmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmx; if (!buffer.str().empty()) @@ -534,8 +548,6 @@ bool get_Pss5_vsmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char Pss5::debugName[] = "Pss5"; const char* Pss5::debugString() const { @@ -544,28 +556,28 @@ const char* Pss5::debugString() const void Pss5::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Pss5"), &Pss5_factory)); + factory_map.emplace("cim:Pss5", &Pss5_factory); } void Pss5::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Pss5.ctw2"), &assign_Pss5_ctw2)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.deadband"), &assign_Pss5_deadband)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.isfreq"), &assign_Pss5_isfreq)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.kf"), &assign_Pss5_kf)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.kpe"), &assign_Pss5_kpe)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.kpss"), &assign_Pss5_kpss)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.pmm"), &assign_Pss5_pmm)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.tl1"), &assign_Pss5_tl1)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.tl2"), &assign_Pss5_tl2)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.tl3"), &assign_Pss5_tl3)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.tl4"), &assign_Pss5_tl4)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.tpe"), &assign_Pss5_tpe)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.tw1"), &assign_Pss5_tw1)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.tw2"), &assign_Pss5_tw2)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.vadat"), &assign_Pss5_vadat)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.vsmn"), &assign_Pss5_vsmn)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.vsmx"), &assign_Pss5_vsmx)); + assign_map.emplace("cim:Pss5.ctw2", &assign_Pss5_ctw2); + assign_map.emplace("cim:Pss5.deadband", &assign_Pss5_deadband); + assign_map.emplace("cim:Pss5.isfreq", &assign_Pss5_isfreq); + assign_map.emplace("cim:Pss5.kf", &assign_Pss5_kf); + assign_map.emplace("cim:Pss5.kpe", &assign_Pss5_kpe); + assign_map.emplace("cim:Pss5.kpss", &assign_Pss5_kpss); + assign_map.emplace("cim:Pss5.pmm", &assign_Pss5_pmm); + assign_map.emplace("cim:Pss5.tl1", &assign_Pss5_tl1); + assign_map.emplace("cim:Pss5.tl2", &assign_Pss5_tl2); + assign_map.emplace("cim:Pss5.tl3", &assign_Pss5_tl3); + assign_map.emplace("cim:Pss5.tl4", &assign_Pss5_tl4); + assign_map.emplace("cim:Pss5.tpe", &assign_Pss5_tpe); + assign_map.emplace("cim:Pss5.tw1", &assign_Pss5_tw1); + assign_map.emplace("cim:Pss5.tw2", &assign_Pss5_tw2); + assign_map.emplace("cim:Pss5.vadat", &assign_Pss5_vadat); + assign_map.emplace("cim:Pss5.vsmn", &assign_Pss5_vsmn); + assign_map.emplace("cim:Pss5.vsmx", &assign_Pss5_vsmx); } void Pss5::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/Pss5.hpp b/CGMES_2.4.15_27JAN2020/Pss5.hpp index 2f2c5a10c..9855524fa 100644 --- a/CGMES_2.4.15_27JAN2020/Pss5.hpp +++ b/CGMES_2.4.15_27JAN2020/Pss5.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Italian PSS - Detailed PSS. - */ + /** \brief Italian PSS - Detailed PSS. */ class Pss5 : public PowerSystemStabilizerDynamics { public: @@ -30,23 +28,56 @@ namespace CIMPP Pss5(); ~Pss5() override; - CIMPP::Boolean ctw2; /* Selector for Second washout enabling (C). true = second washout filter is bypassed false = second washout filter in use. Typical Value = true. Default: false */ - CIMPP::PU deadband; /* Stabilizer output dead band (DeadBand). Typical Value = 0. Default: nullptr */ - CIMPP::Boolean isfreq; /* Selector for Frequency/shaft speed input (IsFreq). true = speed false = frequency. Typical Value = true. Default: false */ - CIMPP::Simple_Float kf; /* Frequency/shaft speed input gain (K). Typical Value = 5. Default: nullptr */ - CIMPP::Simple_Float kpe; /* Electric power input gain (K). Typical Value = 0.3. Default: nullptr */ - CIMPP::Simple_Float kpss; /* PSS gain (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU pmm; /* Minimum power PSS enabling (P). Typical Value = 0.25. Default: nullptr */ - CIMPP::Seconds tl1; /* Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tl2; /* Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tl3; /* Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tl4; /* Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tpe; /* Electric power filter time constant (T). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds tw1; /* First WashOut (T). Typical Value = 3.5. Default: nullptr */ - CIMPP::Seconds tw2; /* Second WashOut (T). Typical Value = 0. Default: nullptr */ - CIMPP::Boolean vadat; /* Default: false */ - CIMPP::PU vsmn; /* Stabilizer output max limit (V). Typical Value = -0.1. Default: nullptr */ - CIMPP::PU vsmx; /* Stabilizer output min limit (V). Typical Value = 0.1. Default: nullptr */ + /** \brief Selector for Second washout enabling (C). true = second washout filter is bypassed false = second washout filter in use. Typical Value = true. Default: false */ + CIMPP::Boolean ctw2; + + /** \brief Stabilizer output dead band (DeadBand). Typical Value = 0. Default: nullptr */ + CIMPP::PU deadband; + + /** \brief Selector for Frequency/shaft speed input (IsFreq). true = speed false = frequency. Typical Value = true. Default: false */ + CIMPP::Boolean isfreq; + + /** \brief Frequency/shaft speed input gain (K). Typical Value = 5. Default: nullptr */ + CIMPP::Simple_Float kf; + + /** \brief Electric power input gain (K). Typical Value = 0.3. Default: nullptr */ + CIMPP::Simple_Float kpe; + + /** \brief PSS gain (K). Typical Value = 1. Default: nullptr */ + CIMPP::Simple_Float kpss; + + /** \brief Minimum power PSS enabling (P). Typical Value = 0.25. Default: nullptr */ + CIMPP::PU pmm; + + /** \brief Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tl1; + + /** \brief Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tl2; + + /** \brief Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tl3; + + /** \brief Lead/lag time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tl4; + + /** \brief Electric power filter time constant (T). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds tpe; + + /** \brief First WashOut (T). Typical Value = 3.5. Default: nullptr */ + CIMPP::Seconds tw1; + + /** \brief Second WashOut (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tw2; + + /** \brief Default: false */ + CIMPP::Boolean vadat; + + /** \brief Stabilizer output max limit (V). Typical Value = -0.1. Default: nullptr */ + CIMPP::PU vsmn; + + /** \brief Stabilizer output min limit (V). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU vsmx; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/PssELIN2.cpp b/CGMES_2.4.15_27JAN2020/PssELIN2.cpp index d7e853587..394cf185f 100644 --- a/CGMES_2.4.15_27JAN2020/PssELIN2.cpp +++ b/CGMES_2.4.15_27JAN2020/PssELIN2.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -PssELIN2::PssELIN2() {}; -PssELIN2::~PssELIN2() {}; +PssELIN2::PssELIN2() {} +PssELIN2::~PssELIN2() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ PssELIN2::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssELIN2_apss(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_apss(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->apss; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_ks1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_ks1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_ks2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_ks2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_ppss(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_ppss(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ppss; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_psslim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_psslim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->psslim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_ts1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_ts1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_ts2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_ts2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_ts3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_ts3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_ts4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_ts4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_ts5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_ts5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_ts6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_ts6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssELIN2_apss(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->apss; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_PssELIN2_apss(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssELIN2_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks1; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_PssELIN2_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssELIN2_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks2; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_PssELIN2_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssELIN2_ppss(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ppss; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_PssELIN2_ppss(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssELIN2_psslim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->psslim; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_PssELIN2_psslim(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_PssELIN2_ts1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts1; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_PssELIN2_ts1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssELIN2_ts2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts2; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_PssELIN2_ts2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssELIN2_ts3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts3; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_PssELIN2_ts3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssELIN2_ts4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts4; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_PssELIN2_ts4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssELIN2_ts5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts5; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_PssELIN2_ts5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssELIN2_ts6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts6; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_PssELIN2_ts6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char PssELIN2::debugName[] = "PssELIN2"; const char* PssELIN2::debugString() const { @@ -370,22 +376,22 @@ const char* PssELIN2::debugString() const void PssELIN2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssELIN2"), &PssELIN2_factory)); + factory_map.emplace("cim:PssELIN2", &PssELIN2_factory); } void PssELIN2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.apss"), &assign_PssELIN2_apss)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.ks1"), &assign_PssELIN2_ks1)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.ks2"), &assign_PssELIN2_ks2)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.ppss"), &assign_PssELIN2_ppss)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.psslim"), &assign_PssELIN2_psslim)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.ts1"), &assign_PssELIN2_ts1)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.ts2"), &assign_PssELIN2_ts2)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.ts3"), &assign_PssELIN2_ts3)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.ts4"), &assign_PssELIN2_ts4)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.ts5"), &assign_PssELIN2_ts5)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.ts6"), &assign_PssELIN2_ts6)); + assign_map.emplace("cim:PssELIN2.apss", &assign_PssELIN2_apss); + assign_map.emplace("cim:PssELIN2.ks1", &assign_PssELIN2_ks1); + assign_map.emplace("cim:PssELIN2.ks2", &assign_PssELIN2_ks2); + assign_map.emplace("cim:PssELIN2.ppss", &assign_PssELIN2_ppss); + assign_map.emplace("cim:PssELIN2.psslim", &assign_PssELIN2_psslim); + assign_map.emplace("cim:PssELIN2.ts1", &assign_PssELIN2_ts1); + assign_map.emplace("cim:PssELIN2.ts2", &assign_PssELIN2_ts2); + assign_map.emplace("cim:PssELIN2.ts3", &assign_PssELIN2_ts3); + assign_map.emplace("cim:PssELIN2.ts4", &assign_PssELIN2_ts4); + assign_map.emplace("cim:PssELIN2.ts5", &assign_PssELIN2_ts5); + assign_map.emplace("cim:PssELIN2.ts6", &assign_PssELIN2_ts6); } void PssELIN2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/PssELIN2.hpp b/CGMES_2.4.15_27JAN2020/PssELIN2.hpp index 082facadc..d5ebed820 100644 --- a/CGMES_2.4.15_27JAN2020/PssELIN2.hpp +++ b/CGMES_2.4.15_27JAN2020/PssELIN2.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Power system stabilizer typically associated with ExcELIN2 (though PssIEEE2B or Pss2B can also be used). - */ + /** \brief Power system stabilizer typically associated with ExcELIN2 (though PssIEEE2B or Pss2B can also be used). */ class PssELIN2 : public PowerSystemStabilizerDynamics { public: @@ -28,17 +26,38 @@ namespace CIMPP PssELIN2(); ~PssELIN2() override; - CIMPP::PU apss; /* Coefficient (a_PSS). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU ks1; /* Gain (Ks1). Typical Value = 1. Default: nullptr */ - CIMPP::PU ks2; /* Gain (Ks2). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU ppss; /* Coefficient (p_PSS) (>=0 and <=4). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU psslim; /* PSS limiter (psslim). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds ts1; /* Time constant (Ts1). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ts2; /* Time constant (Ts2). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds ts3; /* Time constant (Ts3). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds ts4; /* Time constant (Ts4). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds ts5; /* Time constant (Ts5). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ts6; /* Time constant (Ts6). Typical Value = 1. Default: nullptr */ + /** \brief Coefficient (a_PSS). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU apss; + + /** \brief Gain (Ks1). Typical Value = 1. Default: nullptr */ + CIMPP::PU ks1; + + /** \brief Gain (Ks2). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU ks2; + + /** \brief Coefficient (p_PSS) (>=0 and <=4). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU ppss; + + /** \brief PSS limiter (psslim). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU psslim; + + /** \brief Time constant (Ts1). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ts1; + + /** \brief Time constant (Ts2). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds ts2; + + /** \brief Time constant (Ts3). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds ts3; + + /** \brief Time constant (Ts4). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds ts4; + + /** \brief Time constant (Ts5). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ts5; + + /** \brief Time constant (Ts6). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds ts6; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/PssIEEE1A.cpp b/CGMES_2.4.15_27JAN2020/PssIEEE1A.cpp index c6de783ee..7387ba08e 100644 --- a/CGMES_2.4.15_27JAN2020/PssIEEE1A.cpp +++ b/CGMES_2.4.15_27JAN2020/PssIEEE1A.cpp @@ -8,23 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "InputSignalKind.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PssIEEE1A::PssIEEE1A() {}; -PssIEEE1A::~PssIEEE1A() {}; +PssIEEE1A::PssIEEE1A() {} +PssIEEE1A::~PssIEEE1A() {} static const std::list PossibleProfilesForClass = { @@ -62,168 +50,178 @@ PssIEEE1A::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssIEEE1A_a1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_a1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_a2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_a2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_inputSignalType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_inputSignalType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignalType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssIEEE1A_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a1; if (!buffer.str().empty()) @@ -237,7 +235,8 @@ bool get_PssIEEE1A_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE1A_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a2; if (!buffer.str().empty()) @@ -249,9 +248,25 @@ bool get_PssIEEE1A_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } +bool get_PssIEEE1A_inputSignalType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignalType; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_PssIEEE1A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -265,7 +280,8 @@ bool get_PssIEEE1A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE1A_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -279,7 +295,8 @@ bool get_PssIEEE1A_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE1A_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -293,7 +310,8 @@ bool get_PssIEEE1A_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE1A_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -307,7 +325,8 @@ bool get_PssIEEE1A_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE1A_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -321,7 +340,8 @@ bool get_PssIEEE1A_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE1A_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -335,7 +355,8 @@ bool get_PssIEEE1A_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE1A_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -349,7 +370,8 @@ bool get_PssIEEE1A_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -363,7 +385,8 @@ bool get_PssIEEE1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_PssIEEE1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -375,22 +398,6 @@ bool get_PssIEEE1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } - - -bool get_PssIEEE1A_inputSignalType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignalType; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char PssIEEE1A::debugName[] = "PssIEEE1A"; const char* PssIEEE1A::debugString() const { @@ -399,23 +406,23 @@ const char* PssIEEE1A::debugString() const void PssIEEE1A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssIEEE1A"), &PssIEEE1A_factory)); + factory_map.emplace("cim:PssIEEE1A", &PssIEEE1A_factory); } void PssIEEE1A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.a1"), &assign_PssIEEE1A_a1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.a2"), &assign_PssIEEE1A_a2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.inputSignalType"), &assign_PssIEEE1A_inputSignalType)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.ks"), &assign_PssIEEE1A_ks)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.t1"), &assign_PssIEEE1A_t1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.t2"), &assign_PssIEEE1A_t2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.t3"), &assign_PssIEEE1A_t3)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.t4"), &assign_PssIEEE1A_t4)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.t5"), &assign_PssIEEE1A_t5)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.t6"), &assign_PssIEEE1A_t6)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.vrmax"), &assign_PssIEEE1A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.vrmin"), &assign_PssIEEE1A_vrmin)); + assign_map.emplace("cim:PssIEEE1A.a1", &assign_PssIEEE1A_a1); + assign_map.emplace("cim:PssIEEE1A.a2", &assign_PssIEEE1A_a2); + assign_map.emplace("cim:PssIEEE1A.inputSignalType", &assign_PssIEEE1A_inputSignalType); + assign_map.emplace("cim:PssIEEE1A.ks", &assign_PssIEEE1A_ks); + assign_map.emplace("cim:PssIEEE1A.t1", &assign_PssIEEE1A_t1); + assign_map.emplace("cim:PssIEEE1A.t2", &assign_PssIEEE1A_t2); + assign_map.emplace("cim:PssIEEE1A.t3", &assign_PssIEEE1A_t3); + assign_map.emplace("cim:PssIEEE1A.t4", &assign_PssIEEE1A_t4); + assign_map.emplace("cim:PssIEEE1A.t5", &assign_PssIEEE1A_t5); + assign_map.emplace("cim:PssIEEE1A.t6", &assign_PssIEEE1A_t6); + assign_map.emplace("cim:PssIEEE1A.vrmax", &assign_PssIEEE1A_vrmax); + assign_map.emplace("cim:PssIEEE1A.vrmin", &assign_PssIEEE1A_vrmin); } void PssIEEE1A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/PssIEEE1A.hpp b/CGMES_2.4.15_27JAN2020/PssIEEE1A.hpp index cec8ba246..783b9d15e 100644 --- a/CGMES_2.4.15_27JAN2020/PssIEEE1A.hpp +++ b/CGMES_2.4.15_27JAN2020/PssIEEE1A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type PSS1A power system stabilizer model. PSS1A is the generalized form of a PSS with a single input. Some common stabilizer input signals are speed, frequency, and power. Reference: IEEE 1A 421.5-2005 Section 8.1. - */ + /** \brief The class represents IEEE Std 421.5-2005 type PSS1A power system stabilizer model. PSS1A is the generalized form of a PSS with a single input. Some common stabilizer input signals are speed, frequency, and power. Reference: IEEE 1A 421.5-2005 Section 8.1. */ class PssIEEE1A : public PowerSystemStabilizerDynamics { public: @@ -29,18 +27,41 @@ namespace CIMPP PssIEEE1A(); ~PssIEEE1A() override; - CIMPP::PU a1; /* PSS signal conditioning frequency filter constant (A1). Typical Value = 0.061. Default: nullptr */ - CIMPP::PU a2; /* PSS signal conditioning frequency filter constant (A2). Typical Value = 0.0017. Default: nullptr */ - CIMPP::InputSignalKind inputSignalType; /* Type of input signal. Typical Value = rotorAngularFrequencyDeviation. Default: 0 */ - CIMPP::PU ks; /* Stabilizer gain (Ks). Typical Value = 5. Default: nullptr */ - CIMPP::Seconds t1; /* Lead/lag time constant (T1). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds t2; /* Lead/lag time constant (T2). Typical Value = 0.03. Default: nullptr */ - CIMPP::Seconds t3; /* Lead/lag time constant (T3). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds t4; /* Lead/lag time constant (T4). Typical Value = 0.03. Default: nullptr */ - CIMPP::Seconds t5; /* Washout time constant (T5). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds t6; /* Transducer time constant (T6). Typical Value = 0.01. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum stabilizer output (Vrmax). Typical Value = 0.05. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum stabilizer output (Vrmin). Typical Value = -0.05. Default: nullptr */ + /** \brief PSS signal conditioning frequency filter constant (A1). Typical Value = 0.061. Default: nullptr */ + CIMPP::PU a1; + + /** \brief PSS signal conditioning frequency filter constant (A2). Typical Value = 0.0017. Default: nullptr */ + CIMPP::PU a2; + + /** \brief Type of input signal. Typical Value = rotorAngularFrequencyDeviation. Default: 0 */ + CIMPP::InputSignalKind inputSignalType; + + /** \brief Stabilizer gain (Ks). Typical Value = 5. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Lead/lag time constant (T1). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Lead/lag time constant (T2). Typical Value = 0.03. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Lead/lag time constant (T3). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Lead/lag time constant (T4). Typical Value = 0.03. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Washout time constant (T5). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Transducer time constant (T6). Typical Value = 0.01. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Maximum stabilizer output (Vrmax). Typical Value = 0.05. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum stabilizer output (Vrmin). Typical Value = -0.05. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/PssIEEE2B.cpp b/CGMES_2.4.15_27JAN2020/PssIEEE2B.cpp index 39ac7e801..7b46362be 100644 --- a/CGMES_2.4.15_27JAN2020/PssIEEE2B.cpp +++ b/CGMES_2.4.15_27JAN2020/PssIEEE2B.cpp @@ -8,38 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "InputSignalKind.hpp" -#include "InputSignalKind.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Integer.hpp" -#include "Integer.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PssIEEE2B::PssIEEE2B() {}; -PssIEEE2B::~PssIEEE2B() {}; +PssIEEE2B::PssIEEE2B() {} +PssIEEE2B::~PssIEEE2B() {} static const std::list PossibleProfilesForClass = { @@ -92,363 +65,418 @@ PssIEEE2B::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssIEEE2B_inputSignal1Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_inputSignal1Type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal1Type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_inputSignal2Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_inputSignal2Type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal2Type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_ks1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_ks1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_ks2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_ks2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_ks3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_ks3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_m(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_m(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->m; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_n(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_n(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->n; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t11(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t11; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_tw1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_tw1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_tw2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_tw2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_tw3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_tw3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_tw4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_tw4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_vsi1max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_vsi1max(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsi1max; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_vsi1min(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_vsi1min(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsi1min; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_vsi2max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_vsi2max(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsi2max; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_vsi2min(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_vsi2min(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsi2min; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_vstmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_vstmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vstmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_vstmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_vstmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vstmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } +bool get_PssIEEE2B_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignal1Type; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} +bool get_PssIEEE2B_inputSignal2Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignal2Type; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} bool get_PssIEEE2B_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks1; if (!buffer.str().empty()) @@ -462,7 +490,8 @@ bool get_PssIEEE2B_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE2B_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks2; if (!buffer.str().empty()) @@ -476,7 +505,8 @@ bool get_PssIEEE2B_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE2B_ks3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks3; if (!buffer.str().empty()) @@ -490,7 +520,8 @@ bool get_PssIEEE2B_ks3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE2B_m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->m; if (!buffer.str().empty()) @@ -504,7 +535,8 @@ bool get_PssIEEE2B_m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssIEEE2B_n(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->n; if (!buffer.str().empty()) @@ -518,7 +550,8 @@ bool get_PssIEEE2B_n(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssIEEE2B_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -532,7 +565,8 @@ bool get_PssIEEE2B_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE2B_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t10; if (!buffer.str().empty()) @@ -546,7 +580,8 @@ bool get_PssIEEE2B_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE2B_t11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t11; if (!buffer.str().empty()) @@ -560,7 +595,8 @@ bool get_PssIEEE2B_t11(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE2B_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -574,7 +610,8 @@ bool get_PssIEEE2B_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE2B_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -588,7 +625,8 @@ bool get_PssIEEE2B_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE2B_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -602,7 +640,8 @@ bool get_PssIEEE2B_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE2B_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -616,7 +655,8 @@ bool get_PssIEEE2B_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE2B_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t7; if (!buffer.str().empty()) @@ -630,7 +670,8 @@ bool get_PssIEEE2B_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE2B_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t8; if (!buffer.str().empty()) @@ -644,7 +685,8 @@ bool get_PssIEEE2B_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE2B_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t9; if (!buffer.str().empty()) @@ -658,7 +700,8 @@ bool get_PssIEEE2B_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE2B_tw1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw1; if (!buffer.str().empty()) @@ -672,7 +715,8 @@ bool get_PssIEEE2B_tw1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE2B_tw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw2; if (!buffer.str().empty()) @@ -686,7 +730,8 @@ bool get_PssIEEE2B_tw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE2B_tw3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw3; if (!buffer.str().empty()) @@ -700,7 +745,8 @@ bool get_PssIEEE2B_tw3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE2B_tw4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw4; if (!buffer.str().empty()) @@ -714,7 +760,8 @@ bool get_PssIEEE2B_tw4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE2B_vsi1max(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsi1max; if (!buffer.str().empty()) @@ -728,7 +775,8 @@ bool get_PssIEEE2B_vsi1max(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_PssIEEE2B_vsi1min(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsi1min; if (!buffer.str().empty()) @@ -742,7 +790,8 @@ bool get_PssIEEE2B_vsi1min(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_PssIEEE2B_vsi2max(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsi2max; if (!buffer.str().empty()) @@ -756,7 +805,8 @@ bool get_PssIEEE2B_vsi2max(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_PssIEEE2B_vsi2min(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsi2min; if (!buffer.str().empty()) @@ -770,7 +820,8 @@ bool get_PssIEEE2B_vsi2min(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_PssIEEE2B_vstmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vstmax; if (!buffer.str().empty()) @@ -784,7 +835,8 @@ bool get_PssIEEE2B_vstmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_PssIEEE2B_vstmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vstmin; if (!buffer.str().empty()) @@ -796,36 +848,6 @@ bool get_PssIEEE2B_vstmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - -bool get_PssIEEE2B_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignal1Type; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - -bool get_PssIEEE2B_inputSignal2Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignal2Type; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char PssIEEE2B::debugName[] = "PssIEEE2B"; const char* PssIEEE2B::debugString() const { @@ -834,38 +856,38 @@ const char* PssIEEE2B::debugString() const void PssIEEE2B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssIEEE2B"), &PssIEEE2B_factory)); + factory_map.emplace("cim:PssIEEE2B", &PssIEEE2B_factory); } void PssIEEE2B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.inputSignal1Type"), &assign_PssIEEE2B_inputSignal1Type)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.inputSignal2Type"), &assign_PssIEEE2B_inputSignal2Type)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.ks1"), &assign_PssIEEE2B_ks1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.ks2"), &assign_PssIEEE2B_ks2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.ks3"), &assign_PssIEEE2B_ks3)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.m"), &assign_PssIEEE2B_m)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.n"), &assign_PssIEEE2B_n)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t1"), &assign_PssIEEE2B_t1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t10"), &assign_PssIEEE2B_t10)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t11"), &assign_PssIEEE2B_t11)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t2"), &assign_PssIEEE2B_t2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t3"), &assign_PssIEEE2B_t3)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t4"), &assign_PssIEEE2B_t4)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t6"), &assign_PssIEEE2B_t6)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t7"), &assign_PssIEEE2B_t7)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t8"), &assign_PssIEEE2B_t8)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t9"), &assign_PssIEEE2B_t9)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.tw1"), &assign_PssIEEE2B_tw1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.tw2"), &assign_PssIEEE2B_tw2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.tw3"), &assign_PssIEEE2B_tw3)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.tw4"), &assign_PssIEEE2B_tw4)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.vsi1max"), &assign_PssIEEE2B_vsi1max)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.vsi1min"), &assign_PssIEEE2B_vsi1min)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.vsi2max"), &assign_PssIEEE2B_vsi2max)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.vsi2min"), &assign_PssIEEE2B_vsi2min)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.vstmax"), &assign_PssIEEE2B_vstmax)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.vstmin"), &assign_PssIEEE2B_vstmin)); + assign_map.emplace("cim:PssIEEE2B.inputSignal1Type", &assign_PssIEEE2B_inputSignal1Type); + assign_map.emplace("cim:PssIEEE2B.inputSignal2Type", &assign_PssIEEE2B_inputSignal2Type); + assign_map.emplace("cim:PssIEEE2B.ks1", &assign_PssIEEE2B_ks1); + assign_map.emplace("cim:PssIEEE2B.ks2", &assign_PssIEEE2B_ks2); + assign_map.emplace("cim:PssIEEE2B.ks3", &assign_PssIEEE2B_ks3); + assign_map.emplace("cim:PssIEEE2B.m", &assign_PssIEEE2B_m); + assign_map.emplace("cim:PssIEEE2B.n", &assign_PssIEEE2B_n); + assign_map.emplace("cim:PssIEEE2B.t1", &assign_PssIEEE2B_t1); + assign_map.emplace("cim:PssIEEE2B.t10", &assign_PssIEEE2B_t10); + assign_map.emplace("cim:PssIEEE2B.t11", &assign_PssIEEE2B_t11); + assign_map.emplace("cim:PssIEEE2B.t2", &assign_PssIEEE2B_t2); + assign_map.emplace("cim:PssIEEE2B.t3", &assign_PssIEEE2B_t3); + assign_map.emplace("cim:PssIEEE2B.t4", &assign_PssIEEE2B_t4); + assign_map.emplace("cim:PssIEEE2B.t6", &assign_PssIEEE2B_t6); + assign_map.emplace("cim:PssIEEE2B.t7", &assign_PssIEEE2B_t7); + assign_map.emplace("cim:PssIEEE2B.t8", &assign_PssIEEE2B_t8); + assign_map.emplace("cim:PssIEEE2B.t9", &assign_PssIEEE2B_t9); + assign_map.emplace("cim:PssIEEE2B.tw1", &assign_PssIEEE2B_tw1); + assign_map.emplace("cim:PssIEEE2B.tw2", &assign_PssIEEE2B_tw2); + assign_map.emplace("cim:PssIEEE2B.tw3", &assign_PssIEEE2B_tw3); + assign_map.emplace("cim:PssIEEE2B.tw4", &assign_PssIEEE2B_tw4); + assign_map.emplace("cim:PssIEEE2B.vsi1max", &assign_PssIEEE2B_vsi1max); + assign_map.emplace("cim:PssIEEE2B.vsi1min", &assign_PssIEEE2B_vsi1min); + assign_map.emplace("cim:PssIEEE2B.vsi2max", &assign_PssIEEE2B_vsi2max); + assign_map.emplace("cim:PssIEEE2B.vsi2min", &assign_PssIEEE2B_vsi2min); + assign_map.emplace("cim:PssIEEE2B.vstmax", &assign_PssIEEE2B_vstmax); + assign_map.emplace("cim:PssIEEE2B.vstmin", &assign_PssIEEE2B_vstmin); } void PssIEEE2B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/PssIEEE2B.hpp b/CGMES_2.4.15_27JAN2020/PssIEEE2B.hpp index b38886649..0a629b803 100644 --- a/CGMES_2.4.15_27JAN2020/PssIEEE2B.hpp +++ b/CGMES_2.4.15_27JAN2020/PssIEEE2B.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type PSS2B power system stabilizer model. This stabilizer model is designed to represent a variety of dual-input stabilizers, which normally use combinations of power and speed or frequency to derive the stabilizing signal. Reference: IEEE 2B 421.5-2005 Section 8.2. - */ + /** \brief The class represents IEEE Std 421.5-2005 type PSS2B power system stabilizer model. This stabilizer model is designed to represent a variety of dual-input stabilizers, which normally use combinations of power and speed or frequency to derive the stabilizing signal. Reference: IEEE 2B 421.5-2005 Section 8.2. */ class PssIEEE2B : public PowerSystemStabilizerDynamics { public: @@ -30,33 +28,86 @@ namespace CIMPP PssIEEE2B(); ~PssIEEE2B() override; - CIMPP::InputSignalKind inputSignal1Type; /* Type of input signal #1. Typical Value = rotorSpeed. Default: 0 */ - CIMPP::InputSignalKind inputSignal2Type; /* Type of input signal #2. Typical Value = generatorElectricalPower. Default: 0 */ - CIMPP::PU ks1; /* Stabilizer gain (Ks1). Typical Value = 12. Default: nullptr */ - CIMPP::PU ks2; /* Gain on signal #2 (Ks2). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU ks3; /* Gain on signal #2 input before ramp-tracking filter (Ks3). Typical Value = 1. Default: nullptr */ - CIMPP::Integer m; /* Denominator order of ramp tracking filter (M). Typical Value = 5. Default: 0 */ - CIMPP::Integer n; /* Order of ramp tracking filter (N). Typical Value = 1. Default: 0 */ - CIMPP::Seconds t1; /* Lead/lag time constant (T1). Typical Value = 0.12. Default: nullptr */ - CIMPP::Seconds t10; /* Lead/lag time constant (T10). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t11; /* Lead/lag time constant (T11). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t2; /* Lead/lag time constant (T2). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds t3; /* Lead/lag time constant (T3). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds t4; /* Lead/lag time constant (T4). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds t6; /* Time constant on signal #1 (T6). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds t7; /* Time constant on signal #2 (T7). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds t8; /* Lead of ramp tracking filter (T8). Typical Value = 0.2. Default: nullptr */ - CIMPP::Seconds t9; /* Lag of ramp tracking filter (T9). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds tw1; /* First washout on signal #1 (Tw1). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds tw2; /* Second washout on signal #1 (Tw2). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds tw3; /* First washout on signal #2 (Tw3). Typical Value = 2. Default: nullptr */ - CIMPP::Seconds tw4; /* Second washout on signal #2 (Tw4). Typical Value = 0. Default: nullptr */ - CIMPP::PU vsi1max; /* Input signal #1 max limit (Vsi1max). Typical Value = 2. Default: nullptr */ - CIMPP::PU vsi1min; /* Input signal #1 min limit (Vsi1min). Typical Value = -2. Default: nullptr */ - CIMPP::PU vsi2max; /* Input signal #2 max limit (Vsi2max). Typical Value = 2. Default: nullptr */ - CIMPP::PU vsi2min; /* Input signal #2 min limit (Vsi2min). Typical Value = -2. Default: nullptr */ - CIMPP::PU vstmax; /* Stabilizer output max limit (Vstmax). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU vstmin; /* Stabilizer output min limit (Vstmin). Typical Value = -0.1. Default: nullptr */ + /** \brief Type of input signal #1. Typical Value = rotorSpeed. Default: 0 */ + CIMPP::InputSignalKind inputSignal1Type; + + /** \brief Type of input signal #2. Typical Value = generatorElectricalPower. Default: 0 */ + CIMPP::InputSignalKind inputSignal2Type; + + /** \brief Stabilizer gain (Ks1). Typical Value = 12. Default: nullptr */ + CIMPP::PU ks1; + + /** \brief Gain on signal #2 (Ks2). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU ks2; + + /** \brief Gain on signal #2 input before ramp-tracking filter (Ks3). Typical Value = 1. Default: nullptr */ + CIMPP::PU ks3; + + /** \brief Denominator order of ramp tracking filter (M). Typical Value = 5. Default: 0 */ + CIMPP::Integer m; + + /** \brief Order of ramp tracking filter (N). Typical Value = 1. Default: 0 */ + CIMPP::Integer n; + + /** \brief Lead/lag time constant (T1). Typical Value = 0.12. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Lead/lag time constant (T10). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t10; + + /** \brief Lead/lag time constant (T11). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t11; + + /** \brief Lead/lag time constant (T2). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Lead/lag time constant (T3). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Lead/lag time constant (T4). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant on signal #1 (T6). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time constant on signal #2 (T7). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds t7; + + /** \brief Lead of ramp tracking filter (T8). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds t8; + + /** \brief Lag of ramp tracking filter (T9). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds t9; + + /** \brief First washout on signal #1 (Tw1). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds tw1; + + /** \brief Second washout on signal #1 (Tw2). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds tw2; + + /** \brief First washout on signal #2 (Tw3). Typical Value = 2. Default: nullptr */ + CIMPP::Seconds tw3; + + /** \brief Second washout on signal #2 (Tw4). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tw4; + + /** \brief Input signal #1 max limit (Vsi1max). Typical Value = 2. Default: nullptr */ + CIMPP::PU vsi1max; + + /** \brief Input signal #1 min limit (Vsi1min). Typical Value = -2. Default: nullptr */ + CIMPP::PU vsi1min; + + /** \brief Input signal #2 max limit (Vsi2max). Typical Value = 2. Default: nullptr */ + CIMPP::PU vsi2max; + + /** \brief Input signal #2 min limit (Vsi2min). Typical Value = -2. Default: nullptr */ + CIMPP::PU vsi2min; + + /** \brief Stabilizer output max limit (Vstmax). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU vstmax; + + /** \brief Stabilizer output min limit (Vstmin). Typical Value = -0.1. Default: nullptr */ + CIMPP::PU vstmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/PssIEEE3B.cpp b/CGMES_2.4.15_27JAN2020/PssIEEE3B.cpp index 8fc5552af..f4cf47980 100644 --- a/CGMES_2.4.15_27JAN2020/PssIEEE3B.cpp +++ b/CGMES_2.4.15_27JAN2020/PssIEEE3B.cpp @@ -8,30 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "InputSignalKind.hpp" -#include "InputSignalKind.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PssIEEE3B::PssIEEE3B() {}; -PssIEEE3B::~PssIEEE3B() {}; +PssIEEE3B::PssIEEE3B() {} +PssIEEE3B::~PssIEEE3B() {} static const std::list PossibleProfilesForClass = { @@ -76,259 +57,276 @@ PssIEEE3B::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssIEEE3B_a1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_a1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_a2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_a2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_a3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_a3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_a4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_a4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_a5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_a5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_a6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_a6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_a7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_a7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_a8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_a8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_inputSignal1Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_inputSignal1Type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal1Type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_inputSignal2Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_inputSignal2Type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal2Type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_ks1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_ks1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_ks2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_ks2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_tw1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_tw1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_tw2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_tw2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_tw3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_tw3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_vstmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_vstmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vstmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_vstmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_vstmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vstmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssIEEE3B_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a1; if (!buffer.str().empty()) @@ -342,7 +340,8 @@ bool get_PssIEEE3B_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE3B_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a2; if (!buffer.str().empty()) @@ -356,7 +355,8 @@ bool get_PssIEEE3B_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE3B_a3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a3; if (!buffer.str().empty()) @@ -370,7 +370,8 @@ bool get_PssIEEE3B_a3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE3B_a4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a4; if (!buffer.str().empty()) @@ -384,7 +385,8 @@ bool get_PssIEEE3B_a4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE3B_a5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a5; if (!buffer.str().empty()) @@ -398,7 +400,8 @@ bool get_PssIEEE3B_a5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE3B_a6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a6; if (!buffer.str().empty()) @@ -412,7 +415,8 @@ bool get_PssIEEE3B_a6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE3B_a7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a7; if (!buffer.str().empty()) @@ -426,7 +430,8 @@ bool get_PssIEEE3B_a7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE3B_a8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a8; if (!buffer.str().empty()) @@ -438,11 +443,12 @@ bool get_PssIEEE3B_a8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } -bool get_PssIEEE3B_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_PssIEEE3B_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->ks1; + buffer << element->inputSignal1Type; if (!buffer.str().empty()) { return true; @@ -452,11 +458,12 @@ bool get_PssIEEE3B_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } -bool get_PssIEEE3B_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_PssIEEE3B_inputSignal2Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->ks2; + buffer << element->inputSignal2Type; if (!buffer.str().empty()) { return true; @@ -466,11 +473,12 @@ bool get_PssIEEE3B_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } -bool get_PssIEEE3B_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_PssIEEE3B_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->t1; + buffer << element->ks1; if (!buffer.str().empty()) { return true; @@ -480,11 +488,12 @@ bool get_PssIEEE3B_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } -bool get_PssIEEE3B_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_PssIEEE3B_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->t2; + buffer << element->ks2; if (!buffer.str().empty()) { return true; @@ -494,11 +503,12 @@ bool get_PssIEEE3B_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } -bool get_PssIEEE3B_tw1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_PssIEEE3B_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tw1; + buffer << element->t1; if (!buffer.str().empty()) { return true; @@ -508,11 +518,12 @@ bool get_PssIEEE3B_tw1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } -bool get_PssIEEE3B_tw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_PssIEEE3B_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tw2; + buffer << element->t2; if (!buffer.str().empty()) { return true; @@ -522,11 +533,12 @@ bool get_PssIEEE3B_tw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } -bool get_PssIEEE3B_tw3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_PssIEEE3B_tw1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tw3; + buffer << element->tw1; if (!buffer.str().empty()) { return true; @@ -536,11 +548,12 @@ bool get_PssIEEE3B_tw3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } -bool get_PssIEEE3B_vstmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_PssIEEE3B_tw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vstmax; + buffer << element->tw2; if (!buffer.str().empty()) { return true; @@ -550,11 +563,12 @@ bool get_PssIEEE3B_vstmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } -bool get_PssIEEE3B_vstmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_PssIEEE3B_tw3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vstmin; + buffer << element->tw3; if (!buffer.str().empty()) { return true; @@ -564,13 +578,12 @@ bool get_PssIEEE3B_vstmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - -bool get_PssIEEE3B_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_PssIEEE3B_vstmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->inputSignal1Type; + buffer << element->vstmax; if (!buffer.str().empty()) { return true; @@ -580,11 +593,12 @@ bool get_PssIEEE3B_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::string return false; } -bool get_PssIEEE3B_inputSignal2Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_PssIEEE3B_vstmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->inputSignal2Type; + buffer << element->vstmin; if (!buffer.str().empty()) { return true; @@ -602,30 +616,30 @@ const char* PssIEEE3B::debugString() const void PssIEEE3B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssIEEE3B"), &PssIEEE3B_factory)); + factory_map.emplace("cim:PssIEEE3B", &PssIEEE3B_factory); } void PssIEEE3B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.a1"), &assign_PssIEEE3B_a1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.a2"), &assign_PssIEEE3B_a2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.a3"), &assign_PssIEEE3B_a3)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.a4"), &assign_PssIEEE3B_a4)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.a5"), &assign_PssIEEE3B_a5)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.a6"), &assign_PssIEEE3B_a6)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.a7"), &assign_PssIEEE3B_a7)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.a8"), &assign_PssIEEE3B_a8)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.inputSignal1Type"), &assign_PssIEEE3B_inputSignal1Type)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.inputSignal2Type"), &assign_PssIEEE3B_inputSignal2Type)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.ks1"), &assign_PssIEEE3B_ks1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.ks2"), &assign_PssIEEE3B_ks2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.t1"), &assign_PssIEEE3B_t1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.t2"), &assign_PssIEEE3B_t2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.tw1"), &assign_PssIEEE3B_tw1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.tw2"), &assign_PssIEEE3B_tw2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.tw3"), &assign_PssIEEE3B_tw3)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.vstmax"), &assign_PssIEEE3B_vstmax)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.vstmin"), &assign_PssIEEE3B_vstmin)); + assign_map.emplace("cim:PssIEEE3B.a1", &assign_PssIEEE3B_a1); + assign_map.emplace("cim:PssIEEE3B.a2", &assign_PssIEEE3B_a2); + assign_map.emplace("cim:PssIEEE3B.a3", &assign_PssIEEE3B_a3); + assign_map.emplace("cim:PssIEEE3B.a4", &assign_PssIEEE3B_a4); + assign_map.emplace("cim:PssIEEE3B.a5", &assign_PssIEEE3B_a5); + assign_map.emplace("cim:PssIEEE3B.a6", &assign_PssIEEE3B_a6); + assign_map.emplace("cim:PssIEEE3B.a7", &assign_PssIEEE3B_a7); + assign_map.emplace("cim:PssIEEE3B.a8", &assign_PssIEEE3B_a8); + assign_map.emplace("cim:PssIEEE3B.inputSignal1Type", &assign_PssIEEE3B_inputSignal1Type); + assign_map.emplace("cim:PssIEEE3B.inputSignal2Type", &assign_PssIEEE3B_inputSignal2Type); + assign_map.emplace("cim:PssIEEE3B.ks1", &assign_PssIEEE3B_ks1); + assign_map.emplace("cim:PssIEEE3B.ks2", &assign_PssIEEE3B_ks2); + assign_map.emplace("cim:PssIEEE3B.t1", &assign_PssIEEE3B_t1); + assign_map.emplace("cim:PssIEEE3B.t2", &assign_PssIEEE3B_t2); + assign_map.emplace("cim:PssIEEE3B.tw1", &assign_PssIEEE3B_tw1); + assign_map.emplace("cim:PssIEEE3B.tw2", &assign_PssIEEE3B_tw2); + assign_map.emplace("cim:PssIEEE3B.tw3", &assign_PssIEEE3B_tw3); + assign_map.emplace("cim:PssIEEE3B.vstmax", &assign_PssIEEE3B_vstmax); + assign_map.emplace("cim:PssIEEE3B.vstmin", &assign_PssIEEE3B_vstmin); } void PssIEEE3B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/PssIEEE3B.hpp b/CGMES_2.4.15_27JAN2020/PssIEEE3B.hpp index 98e5144a8..8f5a867f9 100644 --- a/CGMES_2.4.15_27JAN2020/PssIEEE3B.hpp +++ b/CGMES_2.4.15_27JAN2020/PssIEEE3B.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type PSS3B power system stabilizer model. The PSS model PSS3B has dual inputs of electrical power and rotor angular frequency deviation. The signals are used to derive an equivalent mechanical power signal. Reference: IEEE 3B 421.5-2005 Section 8.3. - */ + /** \brief The class represents IEEE Std 421.5-2005 type PSS3B power system stabilizer model. The PSS model PSS3B has dual inputs of electrical power and rotor angular frequency deviation. The signals are used to derive an equivalent mechanical power signal. Reference: IEEE 3B 421.5-2005 Section 8.3. */ class PssIEEE3B : public PowerSystemStabilizerDynamics { public: @@ -29,25 +27,62 @@ namespace CIMPP PssIEEE3B(); ~PssIEEE3B() override; - CIMPP::PU a1; /* Notch filter parameter (A1). Typical Value = 0.359. Default: nullptr */ - CIMPP::PU a2; /* Notch filter parameter (A2). Typical Value = 0.586. Default: nullptr */ - CIMPP::PU a3; /* Notch filter parameter (A3). Typical Value = 0.429. Default: nullptr */ - CIMPP::PU a4; /* Notch filter parameter (A4). Typical Value = 0.564. Default: nullptr */ - CIMPP::PU a5; /* Notch filter parameter (A5). Typical Value = 0.001. Default: nullptr */ - CIMPP::PU a6; /* Notch filter parameter (A6). Typical Value = 0. Default: nullptr */ - CIMPP::PU a7; /* Notch filter parameter (A7). Typical Value = 0.031. Default: nullptr */ - CIMPP::PU a8; /* Notch filter parameter (A8). Typical Value = 0. Default: nullptr */ - CIMPP::InputSignalKind inputSignal1Type; /* Type of input signal #1. Typical Value = generatorElectricalPower. Default: 0 */ - CIMPP::InputSignalKind inputSignal2Type; /* Type of input signal #2. Typical Value = rotorSpeed. Default: 0 */ - CIMPP::PU ks1; /* Gain on signal # 1 (Ks1). Typical Value = -0.602. Default: nullptr */ - CIMPP::PU ks2; /* Gain on signal # 2 (Ks2). Typical Value = 30.12. Default: nullptr */ - CIMPP::Seconds t1; /* Transducer time constant (T1). Typical Value = 0.012. Default: nullptr */ - CIMPP::Seconds t2; /* Transducer time constant (T2). Typical Value = 0.012. Default: nullptr */ - CIMPP::Seconds tw1; /* Washout time constant (Tw1). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds tw2; /* Washout time constant (Tw2). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds tw3; /* Washout time constant (Tw3). Typical Value = 0.6. Default: nullptr */ - CIMPP::PU vstmax; /* Stabilizer output max limit (Vstmax). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU vstmin; /* Stabilizer output min limit (Vstmin). Typical Value = -0.1. Default: nullptr */ + /** \brief Notch filter parameter (A1). Typical Value = 0.359. Default: nullptr */ + CIMPP::PU a1; + + /** \brief Notch filter parameter (A2). Typical Value = 0.586. Default: nullptr */ + CIMPP::PU a2; + + /** \brief Notch filter parameter (A3). Typical Value = 0.429. Default: nullptr */ + CIMPP::PU a3; + + /** \brief Notch filter parameter (A4). Typical Value = 0.564. Default: nullptr */ + CIMPP::PU a4; + + /** \brief Notch filter parameter (A5). Typical Value = 0.001. Default: nullptr */ + CIMPP::PU a5; + + /** \brief Notch filter parameter (A6). Typical Value = 0. Default: nullptr */ + CIMPP::PU a6; + + /** \brief Notch filter parameter (A7). Typical Value = 0.031. Default: nullptr */ + CIMPP::PU a7; + + /** \brief Notch filter parameter (A8). Typical Value = 0. Default: nullptr */ + CIMPP::PU a8; + + /** \brief Type of input signal #1. Typical Value = generatorElectricalPower. Default: 0 */ + CIMPP::InputSignalKind inputSignal1Type; + + /** \brief Type of input signal #2. Typical Value = rotorSpeed. Default: 0 */ + CIMPP::InputSignalKind inputSignal2Type; + + /** \brief Gain on signal # 1 (Ks1). Typical Value = -0.602. Default: nullptr */ + CIMPP::PU ks1; + + /** \brief Gain on signal # 2 (Ks2). Typical Value = 30.12. Default: nullptr */ + CIMPP::PU ks2; + + /** \brief Transducer time constant (T1). Typical Value = 0.012. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Transducer time constant (T2). Typical Value = 0.012. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Washout time constant (Tw1). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds tw1; + + /** \brief Washout time constant (Tw2). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds tw2; + + /** \brief Washout time constant (Tw3). Typical Value = 0.6. Default: nullptr */ + CIMPP::Seconds tw3; + + /** \brief Stabilizer output max limit (Vstmax). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU vstmax; + + /** \brief Stabilizer output min limit (Vstmin). Typical Value = -0.1. Default: nullptr */ + CIMPP::PU vstmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/PssIEEE4B.cpp b/CGMES_2.4.15_27JAN2020/PssIEEE4B.cpp index d3b867c21..6eb537c95 100644 --- a/CGMES_2.4.15_27JAN2020/PssIEEE4B.cpp +++ b/CGMES_2.4.15_27JAN2020/PssIEEE4B.cpp @@ -8,78 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PssIEEE4B::PssIEEE4B() {}; -PssIEEE4B::~PssIEEE4B() {}; +PssIEEE4B::PssIEEE4B() {} +PssIEEE4B::~PssIEEE4B() {} static const std::list PossibleProfilesForClass = { @@ -172,883 +105,948 @@ PssIEEE4B::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssIEEE4B_bwh1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_bwh1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bwh1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_bwh2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_bwh2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bwh2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_bwl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_bwl1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bwl1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_bwl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_bwl2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bwl2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kh1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kh1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kh11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kh11(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh11; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kh17(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kh17(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh17; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kh2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kh2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ki1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ki1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ki11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ki11(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki11; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ki17(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ki17(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki17; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ki2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ki2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kl1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kl11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kl11(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl11; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kl17(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kl17(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl17; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kl2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_omeganh1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_omeganh1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->omeganh1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_omeganh2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_omeganh2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->omeganh2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_omeganl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_omeganl1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->omeganl1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_omeganl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_omeganl2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->omeganl2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th11(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th11; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti11(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti11; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl11(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl11; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_vhmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_vhmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vhmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_vhmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_vhmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vhmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_vimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_vlmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_vlmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vlmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_vlmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_vlmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vlmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_vstmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_vstmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vstmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_vstmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_vstmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vstmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssIEEE4B_bwh1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bwh1; if (!buffer.str().empty()) @@ -1062,7 +1060,8 @@ bool get_PssIEEE4B_bwh1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_bwh2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bwh2; if (!buffer.str().empty()) @@ -1076,7 +1075,8 @@ bool get_PssIEEE4B_bwh2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_bwl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bwl1; if (!buffer.str().empty()) @@ -1090,7 +1090,8 @@ bool get_PssIEEE4B_bwl1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_bwl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bwl2; if (!buffer.str().empty()) @@ -1104,7 +1105,8 @@ bool get_PssIEEE4B_bwl2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh; if (!buffer.str().empty()) @@ -1118,7 +1120,8 @@ bool get_PssIEEE4B_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE4B_kh1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh1; if (!buffer.str().empty()) @@ -1132,7 +1135,8 @@ bool get_PssIEEE4B_kh1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_kh11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh11; if (!buffer.str().empty()) @@ -1146,7 +1150,8 @@ bool get_PssIEEE4B_kh11(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_kh17(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh17; if (!buffer.str().empty()) @@ -1160,7 +1165,8 @@ bool get_PssIEEE4B_kh17(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_kh2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh2; if (!buffer.str().empty()) @@ -1174,7 +1180,8 @@ bool get_PssIEEE4B_kh2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -1188,7 +1195,8 @@ bool get_PssIEEE4B_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE4B_ki1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki1; if (!buffer.str().empty()) @@ -1202,7 +1210,8 @@ bool get_PssIEEE4B_ki1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ki11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki11; if (!buffer.str().empty()) @@ -1216,7 +1225,8 @@ bool get_PssIEEE4B_ki11(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_ki17(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki17; if (!buffer.str().empty()) @@ -1230,7 +1240,8 @@ bool get_PssIEEE4B_ki17(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_ki2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki2; if (!buffer.str().empty()) @@ -1244,7 +1255,8 @@ bool get_PssIEEE4B_ki2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl; if (!buffer.str().empty()) @@ -1258,7 +1270,8 @@ bool get_PssIEEE4B_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE4B_kl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl1; if (!buffer.str().empty()) @@ -1272,7 +1285,8 @@ bool get_PssIEEE4B_kl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_kl11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl11; if (!buffer.str().empty()) @@ -1286,7 +1300,8 @@ bool get_PssIEEE4B_kl11(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_kl17(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl17; if (!buffer.str().empty()) @@ -1300,7 +1315,8 @@ bool get_PssIEEE4B_kl17(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_kl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl2; if (!buffer.str().empty()) @@ -1314,7 +1330,8 @@ bool get_PssIEEE4B_kl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_omeganh1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->omeganh1; if (!buffer.str().empty()) @@ -1328,7 +1345,8 @@ bool get_PssIEEE4B_omeganh1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_PssIEEE4B_omeganh2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->omeganh2; if (!buffer.str().empty()) @@ -1342,7 +1360,8 @@ bool get_PssIEEE4B_omeganh2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_PssIEEE4B_omeganl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->omeganl1; if (!buffer.str().empty()) @@ -1356,7 +1375,8 @@ bool get_PssIEEE4B_omeganl1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_PssIEEE4B_omeganl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->omeganl2; if (!buffer.str().empty()) @@ -1370,7 +1390,8 @@ bool get_PssIEEE4B_omeganl2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_PssIEEE4B_th1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th1; if (!buffer.str().empty()) @@ -1384,7 +1405,8 @@ bool get_PssIEEE4B_th1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_th10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th10; if (!buffer.str().empty()) @@ -1398,7 +1420,8 @@ bool get_PssIEEE4B_th10(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_th11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th11; if (!buffer.str().empty()) @@ -1412,7 +1435,8 @@ bool get_PssIEEE4B_th11(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_th12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th12; if (!buffer.str().empty()) @@ -1426,7 +1450,8 @@ bool get_PssIEEE4B_th12(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_th2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th2; if (!buffer.str().empty()) @@ -1440,7 +1465,8 @@ bool get_PssIEEE4B_th2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_th3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th3; if (!buffer.str().empty()) @@ -1454,7 +1480,8 @@ bool get_PssIEEE4B_th3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_th4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th4; if (!buffer.str().empty()) @@ -1468,7 +1495,8 @@ bool get_PssIEEE4B_th4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_th5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th5; if (!buffer.str().empty()) @@ -1482,7 +1510,8 @@ bool get_PssIEEE4B_th5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_th6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th6; if (!buffer.str().empty()) @@ -1496,7 +1525,8 @@ bool get_PssIEEE4B_th6(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_th7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th7; if (!buffer.str().empty()) @@ -1510,7 +1540,8 @@ bool get_PssIEEE4B_th7(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_th8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th8; if (!buffer.str().empty()) @@ -1524,7 +1555,8 @@ bool get_PssIEEE4B_th8(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_th9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th9; if (!buffer.str().empty()) @@ -1538,7 +1570,8 @@ bool get_PssIEEE4B_th9(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ti1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti1; if (!buffer.str().empty()) @@ -1552,7 +1585,8 @@ bool get_PssIEEE4B_ti1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ti10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti10; if (!buffer.str().empty()) @@ -1566,7 +1600,8 @@ bool get_PssIEEE4B_ti10(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_ti11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti11; if (!buffer.str().empty()) @@ -1580,7 +1615,8 @@ bool get_PssIEEE4B_ti11(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_ti12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti12; if (!buffer.str().empty()) @@ -1594,7 +1630,8 @@ bool get_PssIEEE4B_ti12(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_ti2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti2; if (!buffer.str().empty()) @@ -1608,7 +1645,8 @@ bool get_PssIEEE4B_ti2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ti3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti3; if (!buffer.str().empty()) @@ -1622,7 +1660,8 @@ bool get_PssIEEE4B_ti3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ti4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti4; if (!buffer.str().empty()) @@ -1636,7 +1675,8 @@ bool get_PssIEEE4B_ti4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ti5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti5; if (!buffer.str().empty()) @@ -1650,7 +1690,8 @@ bool get_PssIEEE4B_ti5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ti6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti6; if (!buffer.str().empty()) @@ -1664,7 +1705,8 @@ bool get_PssIEEE4B_ti6(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ti7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti7; if (!buffer.str().empty()) @@ -1678,7 +1720,8 @@ bool get_PssIEEE4B_ti7(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ti8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti8; if (!buffer.str().empty()) @@ -1692,7 +1735,8 @@ bool get_PssIEEE4B_ti8(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ti9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti9; if (!buffer.str().empty()) @@ -1706,7 +1750,8 @@ bool get_PssIEEE4B_ti9(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_tl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl1; if (!buffer.str().empty()) @@ -1720,7 +1765,8 @@ bool get_PssIEEE4B_tl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_tl10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl10; if (!buffer.str().empty()) @@ -1734,7 +1780,8 @@ bool get_PssIEEE4B_tl10(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_tl11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl11; if (!buffer.str().empty()) @@ -1748,7 +1795,8 @@ bool get_PssIEEE4B_tl11(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_tl12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl12; if (!buffer.str().empty()) @@ -1762,7 +1810,8 @@ bool get_PssIEEE4B_tl12(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_tl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl2; if (!buffer.str().empty()) @@ -1776,7 +1825,8 @@ bool get_PssIEEE4B_tl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_tl3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl3; if (!buffer.str().empty()) @@ -1790,7 +1840,8 @@ bool get_PssIEEE4B_tl3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_tl4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl4; if (!buffer.str().empty()) @@ -1804,7 +1855,8 @@ bool get_PssIEEE4B_tl4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_tl5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl5; if (!buffer.str().empty()) @@ -1818,7 +1870,8 @@ bool get_PssIEEE4B_tl5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_tl6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl6; if (!buffer.str().empty()) @@ -1832,7 +1885,8 @@ bool get_PssIEEE4B_tl6(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_tl7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl7; if (!buffer.str().empty()) @@ -1846,7 +1900,8 @@ bool get_PssIEEE4B_tl7(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_tl8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl8; if (!buffer.str().empty()) @@ -1860,7 +1915,8 @@ bool get_PssIEEE4B_tl8(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_tl9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl9; if (!buffer.str().empty()) @@ -1874,7 +1930,8 @@ bool get_PssIEEE4B_tl9(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_vhmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vhmax; if (!buffer.str().empty()) @@ -1888,7 +1945,8 @@ bool get_PssIEEE4B_vhmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_PssIEEE4B_vhmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vhmin; if (!buffer.str().empty()) @@ -1902,7 +1960,8 @@ bool get_PssIEEE4B_vhmin(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_PssIEEE4B_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -1916,7 +1975,8 @@ bool get_PssIEEE4B_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_PssIEEE4B_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimin; if (!buffer.str().empty()) @@ -1930,7 +1990,8 @@ bool get_PssIEEE4B_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_PssIEEE4B_vlmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vlmax; if (!buffer.str().empty()) @@ -1944,7 +2005,8 @@ bool get_PssIEEE4B_vlmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_PssIEEE4B_vlmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vlmin; if (!buffer.str().empty()) @@ -1958,7 +2020,8 @@ bool get_PssIEEE4B_vlmin(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_PssIEEE4B_vstmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vstmax; if (!buffer.str().empty()) @@ -1972,7 +2035,8 @@ bool get_PssIEEE4B_vstmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_PssIEEE4B_vstmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vstmin; if (!buffer.str().empty()) @@ -1984,8 +2048,6 @@ bool get_PssIEEE4B_vstmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char PssIEEE4B::debugName[] = "PssIEEE4B"; const char* PssIEEE4B::debugString() const { @@ -1994,78 +2056,78 @@ const char* PssIEEE4B::debugString() const void PssIEEE4B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssIEEE4B"), &PssIEEE4B_factory)); + factory_map.emplace("cim:PssIEEE4B", &PssIEEE4B_factory); } void PssIEEE4B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.bwh1"), &assign_PssIEEE4B_bwh1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.bwh2"), &assign_PssIEEE4B_bwh2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.bwl1"), &assign_PssIEEE4B_bwl1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.bwl2"), &assign_PssIEEE4B_bwl2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kh"), &assign_PssIEEE4B_kh)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kh1"), &assign_PssIEEE4B_kh1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kh11"), &assign_PssIEEE4B_kh11)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kh17"), &assign_PssIEEE4B_kh17)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kh2"), &assign_PssIEEE4B_kh2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ki"), &assign_PssIEEE4B_ki)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ki1"), &assign_PssIEEE4B_ki1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ki11"), &assign_PssIEEE4B_ki11)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ki17"), &assign_PssIEEE4B_ki17)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ki2"), &assign_PssIEEE4B_ki2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kl"), &assign_PssIEEE4B_kl)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kl1"), &assign_PssIEEE4B_kl1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kl11"), &assign_PssIEEE4B_kl11)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kl17"), &assign_PssIEEE4B_kl17)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kl2"), &assign_PssIEEE4B_kl2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.omeganh1"), &assign_PssIEEE4B_omeganh1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.omeganh2"), &assign_PssIEEE4B_omeganh2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.omeganl1"), &assign_PssIEEE4B_omeganl1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.omeganl2"), &assign_PssIEEE4B_omeganl2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th1"), &assign_PssIEEE4B_th1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th10"), &assign_PssIEEE4B_th10)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th11"), &assign_PssIEEE4B_th11)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th12"), &assign_PssIEEE4B_th12)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th2"), &assign_PssIEEE4B_th2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th3"), &assign_PssIEEE4B_th3)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th4"), &assign_PssIEEE4B_th4)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th5"), &assign_PssIEEE4B_th5)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th6"), &assign_PssIEEE4B_th6)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th7"), &assign_PssIEEE4B_th7)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th8"), &assign_PssIEEE4B_th8)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th9"), &assign_PssIEEE4B_th9)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti1"), &assign_PssIEEE4B_ti1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti10"), &assign_PssIEEE4B_ti10)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti11"), &assign_PssIEEE4B_ti11)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti12"), &assign_PssIEEE4B_ti12)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti2"), &assign_PssIEEE4B_ti2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti3"), &assign_PssIEEE4B_ti3)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti4"), &assign_PssIEEE4B_ti4)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti5"), &assign_PssIEEE4B_ti5)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti6"), &assign_PssIEEE4B_ti6)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti7"), &assign_PssIEEE4B_ti7)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti8"), &assign_PssIEEE4B_ti8)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti9"), &assign_PssIEEE4B_ti9)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl1"), &assign_PssIEEE4B_tl1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl10"), &assign_PssIEEE4B_tl10)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl11"), &assign_PssIEEE4B_tl11)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl12"), &assign_PssIEEE4B_tl12)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl2"), &assign_PssIEEE4B_tl2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl3"), &assign_PssIEEE4B_tl3)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl4"), &assign_PssIEEE4B_tl4)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl5"), &assign_PssIEEE4B_tl5)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl6"), &assign_PssIEEE4B_tl6)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl7"), &assign_PssIEEE4B_tl7)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl8"), &assign_PssIEEE4B_tl8)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl9"), &assign_PssIEEE4B_tl9)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.vhmax"), &assign_PssIEEE4B_vhmax)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.vhmin"), &assign_PssIEEE4B_vhmin)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.vimax"), &assign_PssIEEE4B_vimax)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.vimin"), &assign_PssIEEE4B_vimin)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.vlmax"), &assign_PssIEEE4B_vlmax)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.vlmin"), &assign_PssIEEE4B_vlmin)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.vstmax"), &assign_PssIEEE4B_vstmax)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.vstmin"), &assign_PssIEEE4B_vstmin)); + assign_map.emplace("cim:PssIEEE4B.bwh1", &assign_PssIEEE4B_bwh1); + assign_map.emplace("cim:PssIEEE4B.bwh2", &assign_PssIEEE4B_bwh2); + assign_map.emplace("cim:PssIEEE4B.bwl1", &assign_PssIEEE4B_bwl1); + assign_map.emplace("cim:PssIEEE4B.bwl2", &assign_PssIEEE4B_bwl2); + assign_map.emplace("cim:PssIEEE4B.kh", &assign_PssIEEE4B_kh); + assign_map.emplace("cim:PssIEEE4B.kh1", &assign_PssIEEE4B_kh1); + assign_map.emplace("cim:PssIEEE4B.kh11", &assign_PssIEEE4B_kh11); + assign_map.emplace("cim:PssIEEE4B.kh17", &assign_PssIEEE4B_kh17); + assign_map.emplace("cim:PssIEEE4B.kh2", &assign_PssIEEE4B_kh2); + assign_map.emplace("cim:PssIEEE4B.ki", &assign_PssIEEE4B_ki); + assign_map.emplace("cim:PssIEEE4B.ki1", &assign_PssIEEE4B_ki1); + assign_map.emplace("cim:PssIEEE4B.ki11", &assign_PssIEEE4B_ki11); + assign_map.emplace("cim:PssIEEE4B.ki17", &assign_PssIEEE4B_ki17); + assign_map.emplace("cim:PssIEEE4B.ki2", &assign_PssIEEE4B_ki2); + assign_map.emplace("cim:PssIEEE4B.kl", &assign_PssIEEE4B_kl); + assign_map.emplace("cim:PssIEEE4B.kl1", &assign_PssIEEE4B_kl1); + assign_map.emplace("cim:PssIEEE4B.kl11", &assign_PssIEEE4B_kl11); + assign_map.emplace("cim:PssIEEE4B.kl17", &assign_PssIEEE4B_kl17); + assign_map.emplace("cim:PssIEEE4B.kl2", &assign_PssIEEE4B_kl2); + assign_map.emplace("cim:PssIEEE4B.omeganh1", &assign_PssIEEE4B_omeganh1); + assign_map.emplace("cim:PssIEEE4B.omeganh2", &assign_PssIEEE4B_omeganh2); + assign_map.emplace("cim:PssIEEE4B.omeganl1", &assign_PssIEEE4B_omeganl1); + assign_map.emplace("cim:PssIEEE4B.omeganl2", &assign_PssIEEE4B_omeganl2); + assign_map.emplace("cim:PssIEEE4B.th1", &assign_PssIEEE4B_th1); + assign_map.emplace("cim:PssIEEE4B.th10", &assign_PssIEEE4B_th10); + assign_map.emplace("cim:PssIEEE4B.th11", &assign_PssIEEE4B_th11); + assign_map.emplace("cim:PssIEEE4B.th12", &assign_PssIEEE4B_th12); + assign_map.emplace("cim:PssIEEE4B.th2", &assign_PssIEEE4B_th2); + assign_map.emplace("cim:PssIEEE4B.th3", &assign_PssIEEE4B_th3); + assign_map.emplace("cim:PssIEEE4B.th4", &assign_PssIEEE4B_th4); + assign_map.emplace("cim:PssIEEE4B.th5", &assign_PssIEEE4B_th5); + assign_map.emplace("cim:PssIEEE4B.th6", &assign_PssIEEE4B_th6); + assign_map.emplace("cim:PssIEEE4B.th7", &assign_PssIEEE4B_th7); + assign_map.emplace("cim:PssIEEE4B.th8", &assign_PssIEEE4B_th8); + assign_map.emplace("cim:PssIEEE4B.th9", &assign_PssIEEE4B_th9); + assign_map.emplace("cim:PssIEEE4B.ti1", &assign_PssIEEE4B_ti1); + assign_map.emplace("cim:PssIEEE4B.ti10", &assign_PssIEEE4B_ti10); + assign_map.emplace("cim:PssIEEE4B.ti11", &assign_PssIEEE4B_ti11); + assign_map.emplace("cim:PssIEEE4B.ti12", &assign_PssIEEE4B_ti12); + assign_map.emplace("cim:PssIEEE4B.ti2", &assign_PssIEEE4B_ti2); + assign_map.emplace("cim:PssIEEE4B.ti3", &assign_PssIEEE4B_ti3); + assign_map.emplace("cim:PssIEEE4B.ti4", &assign_PssIEEE4B_ti4); + assign_map.emplace("cim:PssIEEE4B.ti5", &assign_PssIEEE4B_ti5); + assign_map.emplace("cim:PssIEEE4B.ti6", &assign_PssIEEE4B_ti6); + assign_map.emplace("cim:PssIEEE4B.ti7", &assign_PssIEEE4B_ti7); + assign_map.emplace("cim:PssIEEE4B.ti8", &assign_PssIEEE4B_ti8); + assign_map.emplace("cim:PssIEEE4B.ti9", &assign_PssIEEE4B_ti9); + assign_map.emplace("cim:PssIEEE4B.tl1", &assign_PssIEEE4B_tl1); + assign_map.emplace("cim:PssIEEE4B.tl10", &assign_PssIEEE4B_tl10); + assign_map.emplace("cim:PssIEEE4B.tl11", &assign_PssIEEE4B_tl11); + assign_map.emplace("cim:PssIEEE4B.tl12", &assign_PssIEEE4B_tl12); + assign_map.emplace("cim:PssIEEE4B.tl2", &assign_PssIEEE4B_tl2); + assign_map.emplace("cim:PssIEEE4B.tl3", &assign_PssIEEE4B_tl3); + assign_map.emplace("cim:PssIEEE4B.tl4", &assign_PssIEEE4B_tl4); + assign_map.emplace("cim:PssIEEE4B.tl5", &assign_PssIEEE4B_tl5); + assign_map.emplace("cim:PssIEEE4B.tl6", &assign_PssIEEE4B_tl6); + assign_map.emplace("cim:PssIEEE4B.tl7", &assign_PssIEEE4B_tl7); + assign_map.emplace("cim:PssIEEE4B.tl8", &assign_PssIEEE4B_tl8); + assign_map.emplace("cim:PssIEEE4B.tl9", &assign_PssIEEE4B_tl9); + assign_map.emplace("cim:PssIEEE4B.vhmax", &assign_PssIEEE4B_vhmax); + assign_map.emplace("cim:PssIEEE4B.vhmin", &assign_PssIEEE4B_vhmin); + assign_map.emplace("cim:PssIEEE4B.vimax", &assign_PssIEEE4B_vimax); + assign_map.emplace("cim:PssIEEE4B.vimin", &assign_PssIEEE4B_vimin); + assign_map.emplace("cim:PssIEEE4B.vlmax", &assign_PssIEEE4B_vlmax); + assign_map.emplace("cim:PssIEEE4B.vlmin", &assign_PssIEEE4B_vlmin); + assign_map.emplace("cim:PssIEEE4B.vstmax", &assign_PssIEEE4B_vstmax); + assign_map.emplace("cim:PssIEEE4B.vstmin", &assign_PssIEEE4B_vstmin); } void PssIEEE4B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/PssIEEE4B.hpp b/CGMES_2.4.15_27JAN2020/PssIEEE4B.hpp index aa08efe3b..f984ccfa7 100644 --- a/CGMES_2.4.15_27JAN2020/PssIEEE4B.hpp +++ b/CGMES_2.4.15_27JAN2020/PssIEEE4B.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Std 421.5-2005 type PSS2B power system stabilizer model. The PSS4B model represents a structure based on multiple working frequency bands. Three separate bands, respectively dedicated to the low-, intermediate- and high-frequency modes of oscillations, are used in this delta-omega (speed input) PSS. Reference: IEEE 4B 421.5-2005 Section 8.4. - */ + /** \brief The class represents IEEE Std 421.5-2005 type PSS2B power system stabilizer model. The PSS4B model represents a structure based on multiple working frequency bands. Three separate bands, respectively dedicated to the low-, intermediate- and high-frequency modes of oscillations, are used in this delta-omega (speed input) PSS. Reference: IEEE 4B 421.5-2005 Section 8.4. */ class PssIEEE4B : public PowerSystemStabilizerDynamics { public: @@ -29,73 +27,206 @@ namespace CIMPP PssIEEE4B(); ~PssIEEE4B() override; - CIMPP::Simple_Float bwh1; /* Notch filter 1 (high-frequency band): Three dB bandwidth (B). Default: nullptr */ - CIMPP::Simple_Float bwh2; /* Notch filter 2 (high-frequency band): Three dB bandwidth (B). Default: nullptr */ - CIMPP::Simple_Float bwl1; /* Notch filter 1 (low-frequency band): Three dB bandwidth (B). Default: nullptr */ - CIMPP::Simple_Float bwl2; /* Notch filter 2 (low-frequency band): Three dB bandwidth (B). Default: nullptr */ - CIMPP::PU kh; /* High band gain (K). Typical Value = 120. Default: nullptr */ - CIMPP::PU kh1; /* High band differential filter gain (K). Typical Value = 66. Default: nullptr */ - CIMPP::PU kh11; /* High band first lead-lag blocks coefficient (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kh17; /* High band first lead-lag blocks coefficient (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kh2; /* High band differential filter gain (K). Typical Value = 66. Default: nullptr */ - CIMPP::PU ki; /* Intermediate band gain (K). Typical Value = 30. Default: nullptr */ - CIMPP::PU ki1; /* Intermediate band differential filter gain (K). Typical Value = 66. Default: nullptr */ - CIMPP::PU ki11; /* Intermediate band first lead-lag blocks coefficient (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU ki17; /* Intermediate band first lead-lag blocks coefficient (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU ki2; /* Intermediate band differential filter gain (K). Typical Value = 66. Default: nullptr */ - CIMPP::PU kl; /* Low band gain (K). Typical Value = 7.5. Default: nullptr */ - CIMPP::PU kl1; /* Low band differential filter gain (K). Typical Value = 66. Default: nullptr */ - CIMPP::PU kl11; /* Low band first lead-lag blocks coefficient (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kl17; /* Low band first lead-lag blocks coefficient (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU kl2; /* Low band differential filter gain (K). Typical Value = 66. Default: nullptr */ - CIMPP::Simple_Float omeganh1; /* Notch filter 1 (high-frequency band): filter frequency (omega). Default: nullptr */ - CIMPP::Simple_Float omeganh2; /* Notch filter 2 (high-frequency band): filter frequency (omega). Default: nullptr */ - CIMPP::Simple_Float omeganl1; /* Notch filter 1 (low-frequency band): filter frequency (omega). Default: nullptr */ - CIMPP::Simple_Float omeganl2; /* Notch filter 2 (low-frequency band): filter frequency (omega). Default: nullptr */ - CIMPP::Seconds th1; /* High band time constant (T). Typical Value = 0.01513. Default: nullptr */ - CIMPP::Seconds th10; /* High band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds th11; /* High band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds th12; /* High band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds th2; /* High band time constant (T). Typical Value = 0.01816. Default: nullptr */ - CIMPP::Seconds th3; /* High band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds th4; /* High band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds th5; /* High band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds th6; /* High band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds th7; /* High band time constant (T). Typical Value = 0.01816. Default: nullptr */ - CIMPP::Seconds th8; /* High band time constant (T). Typical Value = 0.02179. Default: nullptr */ - CIMPP::Seconds th9; /* High band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ti1; /* Intermediate band time constant (T). Typical Value = 0.173. Default: nullptr */ - CIMPP::Seconds ti10; /* Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ti11; /* Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ti12; /* Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ti2; /* Intermediate band time constant (T). Typical Value = 0.2075. Default: nullptr */ - CIMPP::Seconds ti3; /* Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ti4; /* Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ti5; /* Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ti6; /* Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds ti7; /* Intermediate band time constant (T). Typical Value = 0.2075. Default: nullptr */ - CIMPP::Seconds ti8; /* Intermediate band time constant (T). Typical Value = 0.2491. Default: nullptr */ - CIMPP::Seconds ti9; /* Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tl1; /* Low band time constant (T). Typical Value = 1.73. Default: nullptr */ - CIMPP::Seconds tl10; /* Low band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tl11; /* Low band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tl12; /* Low band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tl2; /* Low band time constant (T). Typical Value = 2.075. Default: nullptr */ - CIMPP::Seconds tl3; /* Low band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tl4; /* Low band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tl5; /* Low band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tl6; /* Low band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tl7; /* Low band time constant (T). Typical Value = 2.075. Default: nullptr */ - CIMPP::Seconds tl8; /* Low band time constant (T). Typical Value = 2.491. Default: nullptr */ - CIMPP::Seconds tl9; /* Low band time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::PU vhmax; /* High band output maximum limit (V). Typical Value = 0.6. Default: nullptr */ - CIMPP::PU vhmin; /* High band output minimum limit (V). Typical Value = -0.6. Default: nullptr */ - CIMPP::PU vimax; /* Intermediate band output maximum limit (V). Typical Value = 0.6. Default: nullptr */ - CIMPP::PU vimin; /* Intermediate band output minimum limit (V). Typical Value = -0.6. Default: nullptr */ - CIMPP::PU vlmax; /* Low band output maximum limit (V). Typical Value = 0.075. Default: nullptr */ - CIMPP::PU vlmin; /* Low band output minimum limit (V). Typical Value = -0.075. Default: nullptr */ - CIMPP::PU vstmax; /* PSS output maximum limit (V). Typical Value = 0.15. Default: nullptr */ - CIMPP::PU vstmin; /* PSS output minimum limit (V). Typical Value = -0.15. Default: nullptr */ + /** \brief Notch filter 1 (high-frequency band): Three dB bandwidth (B). Default: nullptr */ + CIMPP::Simple_Float bwh1; + + /** \brief Notch filter 2 (high-frequency band): Three dB bandwidth (B). Default: nullptr */ + CIMPP::Simple_Float bwh2; + + /** \brief Notch filter 1 (low-frequency band): Three dB bandwidth (B). Default: nullptr */ + CIMPP::Simple_Float bwl1; + + /** \brief Notch filter 2 (low-frequency band): Three dB bandwidth (B). Default: nullptr */ + CIMPP::Simple_Float bwl2; + + /** \brief High band gain (K). Typical Value = 120. Default: nullptr */ + CIMPP::PU kh; + + /** \brief High band differential filter gain (K). Typical Value = 66. Default: nullptr */ + CIMPP::PU kh1; + + /** \brief High band first lead-lag blocks coefficient (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU kh11; + + /** \brief High band first lead-lag blocks coefficient (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU kh17; + + /** \brief High band differential filter gain (K). Typical Value = 66. Default: nullptr */ + CIMPP::PU kh2; + + /** \brief Intermediate band gain (K). Typical Value = 30. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Intermediate band differential filter gain (K). Typical Value = 66. Default: nullptr */ + CIMPP::PU ki1; + + /** \brief Intermediate band first lead-lag blocks coefficient (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ki11; + + /** \brief Intermediate band first lead-lag blocks coefficient (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU ki17; + + /** \brief Intermediate band differential filter gain (K). Typical Value = 66. Default: nullptr */ + CIMPP::PU ki2; + + /** \brief Low band gain (K). Typical Value = 7.5. Default: nullptr */ + CIMPP::PU kl; + + /** \brief Low band differential filter gain (K). Typical Value = 66. Default: nullptr */ + CIMPP::PU kl1; + + /** \brief Low band first lead-lag blocks coefficient (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU kl11; + + /** \brief Low band first lead-lag blocks coefficient (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU kl17; + + /** \brief Low band differential filter gain (K). Typical Value = 66. Default: nullptr */ + CIMPP::PU kl2; + + /** \brief Notch filter 1 (high-frequency band): filter frequency (omega). Default: nullptr */ + CIMPP::Simple_Float omeganh1; + + /** \brief Notch filter 2 (high-frequency band): filter frequency (omega). Default: nullptr */ + CIMPP::Simple_Float omeganh2; + + /** \brief Notch filter 1 (low-frequency band): filter frequency (omega). Default: nullptr */ + CIMPP::Simple_Float omeganl1; + + /** \brief Notch filter 2 (low-frequency band): filter frequency (omega). Default: nullptr */ + CIMPP::Simple_Float omeganl2; + + /** \brief High band time constant (T). Typical Value = 0.01513. Default: nullptr */ + CIMPP::Seconds th1; + + /** \brief High band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds th10; + + /** \brief High band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds th11; + + /** \brief High band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds th12; + + /** \brief High band time constant (T). Typical Value = 0.01816. Default: nullptr */ + CIMPP::Seconds th2; + + /** \brief High band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds th3; + + /** \brief High band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds th4; + + /** \brief High band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds th5; + + /** \brief High band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds th6; + + /** \brief High band time constant (T). Typical Value = 0.01816. Default: nullptr */ + CIMPP::Seconds th7; + + /** \brief High band time constant (T). Typical Value = 0.02179. Default: nullptr */ + CIMPP::Seconds th8; + + /** \brief High band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds th9; + + /** \brief Intermediate band time constant (T). Typical Value = 0.173. Default: nullptr */ + CIMPP::Seconds ti1; + + /** \brief Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ti10; + + /** \brief Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ti11; + + /** \brief Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ti12; + + /** \brief Intermediate band time constant (T). Typical Value = 0.2075. Default: nullptr */ + CIMPP::Seconds ti2; + + /** \brief Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ti3; + + /** \brief Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ti4; + + /** \brief Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ti5; + + /** \brief Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ti6; + + /** \brief Intermediate band time constant (T). Typical Value = 0.2075. Default: nullptr */ + CIMPP::Seconds ti7; + + /** \brief Intermediate band time constant (T). Typical Value = 0.2491. Default: nullptr */ + CIMPP::Seconds ti8; + + /** \brief Intermediate band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds ti9; + + /** \brief Low band time constant (T). Typical Value = 1.73. Default: nullptr */ + CIMPP::Seconds tl1; + + /** \brief Low band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tl10; + + /** \brief Low band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tl11; + + /** \brief Low band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tl12; + + /** \brief Low band time constant (T). Typical Value = 2.075. Default: nullptr */ + CIMPP::Seconds tl2; + + /** \brief Low band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tl3; + + /** \brief Low band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tl4; + + /** \brief Low band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tl5; + + /** \brief Low band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tl6; + + /** \brief Low band time constant (T). Typical Value = 2.075. Default: nullptr */ + CIMPP::Seconds tl7; + + /** \brief Low band time constant (T). Typical Value = 2.491. Default: nullptr */ + CIMPP::Seconds tl8; + + /** \brief Low band time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tl9; + + /** \brief High band output maximum limit (V). Typical Value = 0.6. Default: nullptr */ + CIMPP::PU vhmax; + + /** \brief High band output minimum limit (V). Typical Value = -0.6. Default: nullptr */ + CIMPP::PU vhmin; + + /** \brief Intermediate band output maximum limit (V). Typical Value = 0.6. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Intermediate band output minimum limit (V). Typical Value = -0.6. Default: nullptr */ + CIMPP::PU vimin; + + /** \brief Low band output maximum limit (V). Typical Value = 0.075. Default: nullptr */ + CIMPP::PU vlmax; + + /** \brief Low band output minimum limit (V). Typical Value = -0.075. Default: nullptr */ + CIMPP::PU vlmin; + + /** \brief PSS output maximum limit (V). Typical Value = 0.15. Default: nullptr */ + CIMPP::PU vstmax; + + /** \brief PSS output minimum limit (V). Typical Value = -0.15. Default: nullptr */ + CIMPP::PU vstmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/PssPTIST1.cpp b/CGMES_2.4.15_27JAN2020/PssPTIST1.cpp index c3f386e9f..beea82b09 100644 --- a/CGMES_2.4.15_27JAN2020/PssPTIST1.cpp +++ b/CGMES_2.4.15_27JAN2020/PssPTIST1.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -PssPTIST1::PssPTIST1() {}; -PssPTIST1::~PssPTIST1() {}; +PssPTIST1::PssPTIST1() {} +PssPTIST1::~PssPTIST1() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ PssPTIST1::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssPTIST1_dtc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_dtc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dtc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_dtf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_dtf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dtf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_dtp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_dtp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dtp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_m(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_m(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->m; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssPTIST1_dtc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dtc; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_PssPTIST1_dtc(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST1_dtf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dtf; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_PssPTIST1_dtf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST1_dtp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dtp; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_PssPTIST1_dtp(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST1_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_PssPTIST1_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssPTIST1_m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->m; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_PssPTIST1_m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssPTIST1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_PssPTIST1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_PssPTIST1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_PssPTIST1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST1_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_PssPTIST1_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST1_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_PssPTIST1_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST1_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_PssPTIST1_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char PssPTIST1::debugName[] = "PssPTIST1"; const char* PssPTIST1::debugString() const { @@ -370,22 +376,22 @@ const char* PssPTIST1::debugString() const void PssPTIST1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssPTIST1"), &PssPTIST1_factory)); + factory_map.emplace("cim:PssPTIST1", &PssPTIST1_factory); } void PssPTIST1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.dtc"), &assign_PssPTIST1_dtc)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.dtf"), &assign_PssPTIST1_dtf)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.dtp"), &assign_PssPTIST1_dtp)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.k"), &assign_PssPTIST1_k)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.m"), &assign_PssPTIST1_m)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.t1"), &assign_PssPTIST1_t1)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.t2"), &assign_PssPTIST1_t2)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.t3"), &assign_PssPTIST1_t3)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.t4"), &assign_PssPTIST1_t4)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.tf"), &assign_PssPTIST1_tf)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.tp"), &assign_PssPTIST1_tp)); + assign_map.emplace("cim:PssPTIST1.dtc", &assign_PssPTIST1_dtc); + assign_map.emplace("cim:PssPTIST1.dtf", &assign_PssPTIST1_dtf); + assign_map.emplace("cim:PssPTIST1.dtp", &assign_PssPTIST1_dtp); + assign_map.emplace("cim:PssPTIST1.k", &assign_PssPTIST1_k); + assign_map.emplace("cim:PssPTIST1.m", &assign_PssPTIST1_m); + assign_map.emplace("cim:PssPTIST1.t1", &assign_PssPTIST1_t1); + assign_map.emplace("cim:PssPTIST1.t2", &assign_PssPTIST1_t2); + assign_map.emplace("cim:PssPTIST1.t3", &assign_PssPTIST1_t3); + assign_map.emplace("cim:PssPTIST1.t4", &assign_PssPTIST1_t4); + assign_map.emplace("cim:PssPTIST1.tf", &assign_PssPTIST1_tf); + assign_map.emplace("cim:PssPTIST1.tp", &assign_PssPTIST1_tp); } void PssPTIST1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/PssPTIST1.hpp b/CGMES_2.4.15_27JAN2020/PssPTIST1.hpp index 9dd1c12e6..b48716169 100644 --- a/CGMES_2.4.15_27JAN2020/PssPTIST1.hpp +++ b/CGMES_2.4.15_27JAN2020/PssPTIST1.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - PTI Microprocessor-Based Stabilizer type 1. - */ + /** \brief PTI Microprocessor-Based Stabilizer type 1. */ class PssPTIST1 : public PowerSystemStabilizerDynamics { public: @@ -28,17 +26,38 @@ namespace CIMPP PssPTIST1(); ~PssPTIST1() override; - CIMPP::Seconds dtc; /* Time step related to activation of controls (Dtc). Typical Value = 0.025. Default: nullptr */ - CIMPP::Seconds dtf; /* Time step frequency calculation (Dtf). Typical Value = 0.025. Default: nullptr */ - CIMPP::Seconds dtp; /* Time step active power calculation (Dtp). Typical Value = 0.0125. Default: nullptr */ - CIMPP::PU k; /* Gain (K). Typical Value = 9. Default: nullptr */ - CIMPP::PU m; /* (M). M=2*H. Typical Value = 5. Default: nullptr */ - CIMPP::Seconds t1; /* Time constant (T1). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds t2; /* Time constant (T2). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds t3; /* Time constant (T3). Typical Value = 0.2. Default: nullptr */ - CIMPP::Seconds t4; /* Time constant (T4). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds tf; /* Time constant (Tf). Typical Value = 0.2. Default: nullptr */ - CIMPP::Seconds tp; /* Time constant (Tp). Typical Value = 0.2. Default: nullptr */ + /** \brief Time step related to activation of controls (Dtc). Typical Value = 0.025. Default: nullptr */ + CIMPP::Seconds dtc; + + /** \brief Time step frequency calculation (Dtf). Typical Value = 0.025. Default: nullptr */ + CIMPP::Seconds dtf; + + /** \brief Time step active power calculation (Dtp). Typical Value = 0.0125. Default: nullptr */ + CIMPP::Seconds dtp; + + /** \brief Gain (K). Typical Value = 9. Default: nullptr */ + CIMPP::PU k; + + /** \brief (M). M=2*H. Typical Value = 5. Default: nullptr */ + CIMPP::PU m; + + /** \brief Time constant (T1). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Time constant (T2). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Time constant (T3). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Time constant (T4). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant (Tf). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Time constant (Tp). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds tp; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/PssPTIST3.cpp b/CGMES_2.4.15_27JAN2020/PssPTIST3.cpp index d563abbea..42a3072e3 100644 --- a/CGMES_2.4.15_27JAN2020/PssPTIST3.cpp +++ b/CGMES_2.4.15_27JAN2020/PssPTIST3.cpp @@ -8,45 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -PssPTIST3::PssPTIST3() {}; -PssPTIST3::~PssPTIST3() {}; +PssPTIST3::PssPTIST3() {} +PssPTIST3::~PssPTIST3() {} static const std::list PossibleProfilesForClass = { @@ -106,454 +72,486 @@ PssPTIST3::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssPTIST3_a0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_a0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_a1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_a1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_a2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_a2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_a3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_a3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_a4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_a4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_a5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_a5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_al(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_al(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->al; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_athres(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_athres(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->athres; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_b0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_b0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_b1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_b1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_b2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_b2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_b3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_b3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_b4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_b4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_b5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_b5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_dl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_dl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_dtc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_dtc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dtc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_dtf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_dtf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dtf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_dtp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_dtp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dtp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_isw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_isw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->isw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_lthres(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_lthres(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lthres; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_m(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_m(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->m; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_nav(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_nav(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nav; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_ncl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_ncl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ncl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_ncr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_ncr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ncr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssPTIST3_a0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a0; if (!buffer.str().empty()) @@ -567,7 +565,8 @@ bool get_PssPTIST3_a0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a1; if (!buffer.str().empty()) @@ -581,7 +580,8 @@ bool get_PssPTIST3_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a2; if (!buffer.str().empty()) @@ -595,7 +595,8 @@ bool get_PssPTIST3_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_a3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a3; if (!buffer.str().empty()) @@ -609,7 +610,8 @@ bool get_PssPTIST3_a3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_a4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a4; if (!buffer.str().empty()) @@ -623,7 +625,8 @@ bool get_PssPTIST3_a4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_a5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a5; if (!buffer.str().empty()) @@ -637,7 +640,8 @@ bool get_PssPTIST3_a5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_al(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->al; if (!buffer.str().empty()) @@ -651,7 +655,8 @@ bool get_PssPTIST3_al(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_athres(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->athres; if (!buffer.str().empty()) @@ -665,7 +670,8 @@ bool get_PssPTIST3_athres(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_PssPTIST3_b0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b0; if (!buffer.str().empty()) @@ -679,7 +685,8 @@ bool get_PssPTIST3_b0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_b1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b1; if (!buffer.str().empty()) @@ -693,7 +700,8 @@ bool get_PssPTIST3_b1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_b2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b2; if (!buffer.str().empty()) @@ -707,7 +715,8 @@ bool get_PssPTIST3_b2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_b3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b3; if (!buffer.str().empty()) @@ -721,7 +730,8 @@ bool get_PssPTIST3_b3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_b4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b4; if (!buffer.str().empty()) @@ -735,7 +745,8 @@ bool get_PssPTIST3_b4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_b5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b5; if (!buffer.str().empty()) @@ -749,7 +760,8 @@ bool get_PssPTIST3_b5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_dl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dl; if (!buffer.str().empty()) @@ -763,7 +775,8 @@ bool get_PssPTIST3_dl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_dtc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dtc; if (!buffer.str().empty()) @@ -777,7 +790,8 @@ bool get_PssPTIST3_dtc(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST3_dtf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dtf; if (!buffer.str().empty()) @@ -791,7 +805,8 @@ bool get_PssPTIST3_dtf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST3_dtp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dtp; if (!buffer.str().empty()) @@ -805,7 +820,8 @@ bool get_PssPTIST3_dtp(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST3_isw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->isw; if (!buffer.str().empty()) @@ -819,7 +835,8 @@ bool get_PssPTIST3_isw(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST3_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -833,7 +850,8 @@ bool get_PssPTIST3_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssPTIST3_lthres(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lthres; if (!buffer.str().empty()) @@ -847,7 +865,8 @@ bool get_PssPTIST3_lthres(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_PssPTIST3_m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->m; if (!buffer.str().empty()) @@ -861,7 +880,8 @@ bool get_PssPTIST3_m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssPTIST3_nav(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nav; if (!buffer.str().empty()) @@ -875,7 +895,8 @@ bool get_PssPTIST3_nav(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST3_ncl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ncl; if (!buffer.str().empty()) @@ -889,7 +910,8 @@ bool get_PssPTIST3_ncl(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST3_ncr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ncr; if (!buffer.str().empty()) @@ -903,7 +925,8 @@ bool get_PssPTIST3_ncr(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST3_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -917,7 +940,8 @@ bool get_PssPTIST3_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssPTIST3_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -931,7 +955,8 @@ bool get_PssPTIST3_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -945,7 +970,8 @@ bool get_PssPTIST3_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -959,7 +985,8 @@ bool get_PssPTIST3_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -973,7 +1000,8 @@ bool get_PssPTIST3_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -987,7 +1015,8 @@ bool get_PssPTIST3_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -1001,7 +1030,8 @@ bool get_PssPTIST3_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -1015,7 +1045,8 @@ bool get_PssPTIST3_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -1027,8 +1058,6 @@ bool get_PssPTIST3_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char PssPTIST3::debugName[] = "PssPTIST3"; const char* PssPTIST3::debugString() const { @@ -1037,45 +1066,45 @@ const char* PssPTIST3::debugString() const void PssPTIST3::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssPTIST3"), &PssPTIST3_factory)); + factory_map.emplace("cim:PssPTIST3", &PssPTIST3_factory); } void PssPTIST3::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.a0"), &assign_PssPTIST3_a0)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.a1"), &assign_PssPTIST3_a1)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.a2"), &assign_PssPTIST3_a2)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.a3"), &assign_PssPTIST3_a3)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.a4"), &assign_PssPTIST3_a4)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.a5"), &assign_PssPTIST3_a5)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.al"), &assign_PssPTIST3_al)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.athres"), &assign_PssPTIST3_athres)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.b0"), &assign_PssPTIST3_b0)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.b1"), &assign_PssPTIST3_b1)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.b2"), &assign_PssPTIST3_b2)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.b3"), &assign_PssPTIST3_b3)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.b4"), &assign_PssPTIST3_b4)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.b5"), &assign_PssPTIST3_b5)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.dl"), &assign_PssPTIST3_dl)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.dtc"), &assign_PssPTIST3_dtc)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.dtf"), &assign_PssPTIST3_dtf)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.dtp"), &assign_PssPTIST3_dtp)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.isw"), &assign_PssPTIST3_isw)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.k"), &assign_PssPTIST3_k)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.lthres"), &assign_PssPTIST3_lthres)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.m"), &assign_PssPTIST3_m)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.nav"), &assign_PssPTIST3_nav)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.ncl"), &assign_PssPTIST3_ncl)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.ncr"), &assign_PssPTIST3_ncr)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.pmin"), &assign_PssPTIST3_pmin)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.t1"), &assign_PssPTIST3_t1)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.t2"), &assign_PssPTIST3_t2)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.t3"), &assign_PssPTIST3_t3)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.t4"), &assign_PssPTIST3_t4)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.t5"), &assign_PssPTIST3_t5)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.t6"), &assign_PssPTIST3_t6)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.tf"), &assign_PssPTIST3_tf)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.tp"), &assign_PssPTIST3_tp)); + assign_map.emplace("cim:PssPTIST3.a0", &assign_PssPTIST3_a0); + assign_map.emplace("cim:PssPTIST3.a1", &assign_PssPTIST3_a1); + assign_map.emplace("cim:PssPTIST3.a2", &assign_PssPTIST3_a2); + assign_map.emplace("cim:PssPTIST3.a3", &assign_PssPTIST3_a3); + assign_map.emplace("cim:PssPTIST3.a4", &assign_PssPTIST3_a4); + assign_map.emplace("cim:PssPTIST3.a5", &assign_PssPTIST3_a5); + assign_map.emplace("cim:PssPTIST3.al", &assign_PssPTIST3_al); + assign_map.emplace("cim:PssPTIST3.athres", &assign_PssPTIST3_athres); + assign_map.emplace("cim:PssPTIST3.b0", &assign_PssPTIST3_b0); + assign_map.emplace("cim:PssPTIST3.b1", &assign_PssPTIST3_b1); + assign_map.emplace("cim:PssPTIST3.b2", &assign_PssPTIST3_b2); + assign_map.emplace("cim:PssPTIST3.b3", &assign_PssPTIST3_b3); + assign_map.emplace("cim:PssPTIST3.b4", &assign_PssPTIST3_b4); + assign_map.emplace("cim:PssPTIST3.b5", &assign_PssPTIST3_b5); + assign_map.emplace("cim:PssPTIST3.dl", &assign_PssPTIST3_dl); + assign_map.emplace("cim:PssPTIST3.dtc", &assign_PssPTIST3_dtc); + assign_map.emplace("cim:PssPTIST3.dtf", &assign_PssPTIST3_dtf); + assign_map.emplace("cim:PssPTIST3.dtp", &assign_PssPTIST3_dtp); + assign_map.emplace("cim:PssPTIST3.isw", &assign_PssPTIST3_isw); + assign_map.emplace("cim:PssPTIST3.k", &assign_PssPTIST3_k); + assign_map.emplace("cim:PssPTIST3.lthres", &assign_PssPTIST3_lthres); + assign_map.emplace("cim:PssPTIST3.m", &assign_PssPTIST3_m); + assign_map.emplace("cim:PssPTIST3.nav", &assign_PssPTIST3_nav); + assign_map.emplace("cim:PssPTIST3.ncl", &assign_PssPTIST3_ncl); + assign_map.emplace("cim:PssPTIST3.ncr", &assign_PssPTIST3_ncr); + assign_map.emplace("cim:PssPTIST3.pmin", &assign_PssPTIST3_pmin); + assign_map.emplace("cim:PssPTIST3.t1", &assign_PssPTIST3_t1); + assign_map.emplace("cim:PssPTIST3.t2", &assign_PssPTIST3_t2); + assign_map.emplace("cim:PssPTIST3.t3", &assign_PssPTIST3_t3); + assign_map.emplace("cim:PssPTIST3.t4", &assign_PssPTIST3_t4); + assign_map.emplace("cim:PssPTIST3.t5", &assign_PssPTIST3_t5); + assign_map.emplace("cim:PssPTIST3.t6", &assign_PssPTIST3_t6); + assign_map.emplace("cim:PssPTIST3.tf", &assign_PssPTIST3_tf); + assign_map.emplace("cim:PssPTIST3.tp", &assign_PssPTIST3_tp); } void PssPTIST3::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/PssPTIST3.hpp b/CGMES_2.4.15_27JAN2020/PssPTIST3.hpp index 1faa7df62..84ac9463b 100644 --- a/CGMES_2.4.15_27JAN2020/PssPTIST3.hpp +++ b/CGMES_2.4.15_27JAN2020/PssPTIST3.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - PTI Microprocessor-Based Stabilizer type 3. - */ + /** \brief PTI Microprocessor-Based Stabilizer type 3. */ class PssPTIST3 : public PowerSystemStabilizerDynamics { public: @@ -30,40 +28,107 @@ namespace CIMPP PssPTIST3(); ~PssPTIST3() override; - CIMPP::PU a0; /* Filter coefficient (A0). Default: nullptr */ - CIMPP::PU a1; /* Limiter (Al). Default: nullptr */ - CIMPP::PU a2; /* Filter coefficient (A2). Default: nullptr */ - CIMPP::PU a3; /* Filter coefficient (A3). Default: nullptr */ - CIMPP::PU a4; /* Filter coefficient (A4). Default: nullptr */ - CIMPP::PU a5; /* Filter coefficient (A5). Default: nullptr */ - CIMPP::PU al; /* Limiter (Al). Default: nullptr */ - CIMPP::PU athres; /* Threshold value above which output averaging will be bypassed (Athres). Typical Value = 0.005. Default: nullptr */ - CIMPP::PU b0; /* Filter coefficient (B0). Default: nullptr */ - CIMPP::PU b1; /* Filter coefficient (B1). Default: nullptr */ - CIMPP::PU b2; /* Filter coefficient (B2). Default: nullptr */ - CIMPP::PU b3; /* Filter coefficient (B3). Default: nullptr */ - CIMPP::PU b4; /* Filter coefficient (B4). Default: nullptr */ - CIMPP::PU b5; /* Filter coefficient (B5). Default: nullptr */ - CIMPP::PU dl; /* Limiter (Dl). Default: nullptr */ - CIMPP::Seconds dtc; /* Time step related to activation of controls (0.03 for 50 Hz) (Dtc). Typical Value = 0.025. Default: nullptr */ - CIMPP::Seconds dtf; /* Time step frequency calculation (0.03 for 50 Hz) (Dtf). Typical Value = 0.025. Default: nullptr */ - CIMPP::Seconds dtp; /* Time step active power calculation (0.015 for 50 Hz) (Dtp). Typical Value = 0.0125. Default: nullptr */ - CIMPP::Boolean isw; /* Digital/analog output switch (Isw). true = produce analog output false = convert to digital output, using tap selection table. Default: false */ - CIMPP::PU k; /* Gain (K). Typical Value = 9. Default: nullptr */ - CIMPP::PU lthres; /* Threshold value (Lthres). Default: nullptr */ - CIMPP::PU m; /* (M). M=2*H. Typical Value = 5. Default: nullptr */ - CIMPP::Simple_Float nav; /* Number of control outputs to average (Nav) (1 <= Nav <= 16). Typical Value = 4. Default: nullptr */ - CIMPP::Simple_Float ncl; /* Number of counts at limit to active limit function (Ncl) (>0). Default: nullptr */ - CIMPP::Simple_Float ncr; /* Number of counts until reset after limit function is triggered (Ncr). Default: nullptr */ - CIMPP::PU pmin; /* (Pmin). Default: nullptr */ - CIMPP::Seconds t1; /* Time constant (T1). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds t2; /* Time constant (T2). Typical Value = 1. Default: nullptr */ - CIMPP::Seconds t3; /* Time constant (T3). Typical Value = 0.2. Default: nullptr */ - CIMPP::Seconds t4; /* Time constant (T4). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds t5; /* Time constant (T5). Default: nullptr */ - CIMPP::Seconds t6; /* Time constant (T6). Default: nullptr */ - CIMPP::Seconds tf; /* Time constant (Tf). Typical Value = 0.2. Default: nullptr */ - CIMPP::Seconds tp; /* Time constant (Tp). Typical Value = 0.2. Default: nullptr */ + /** \brief Filter coefficient (A0). Default: nullptr */ + CIMPP::PU a0; + + /** \brief Limiter (Al). Default: nullptr */ + CIMPP::PU a1; + + /** \brief Filter coefficient (A2). Default: nullptr */ + CIMPP::PU a2; + + /** \brief Filter coefficient (A3). Default: nullptr */ + CIMPP::PU a3; + + /** \brief Filter coefficient (A4). Default: nullptr */ + CIMPP::PU a4; + + /** \brief Filter coefficient (A5). Default: nullptr */ + CIMPP::PU a5; + + /** \brief Limiter (Al). Default: nullptr */ + CIMPP::PU al; + + /** \brief Threshold value above which output averaging will be bypassed (Athres). Typical Value = 0.005. Default: nullptr */ + CIMPP::PU athres; + + /** \brief Filter coefficient (B0). Default: nullptr */ + CIMPP::PU b0; + + /** \brief Filter coefficient (B1). Default: nullptr */ + CIMPP::PU b1; + + /** \brief Filter coefficient (B2). Default: nullptr */ + CIMPP::PU b2; + + /** \brief Filter coefficient (B3). Default: nullptr */ + CIMPP::PU b3; + + /** \brief Filter coefficient (B4). Default: nullptr */ + CIMPP::PU b4; + + /** \brief Filter coefficient (B5). Default: nullptr */ + CIMPP::PU b5; + + /** \brief Limiter (Dl). Default: nullptr */ + CIMPP::PU dl; + + /** \brief Time step related to activation of controls (0.03 for 50 Hz) (Dtc). Typical Value = 0.025. Default: nullptr */ + CIMPP::Seconds dtc; + + /** \brief Time step frequency calculation (0.03 for 50 Hz) (Dtf). Typical Value = 0.025. Default: nullptr */ + CIMPP::Seconds dtf; + + /** \brief Time step active power calculation (0.015 for 50 Hz) (Dtp). Typical Value = 0.0125. Default: nullptr */ + CIMPP::Seconds dtp; + + /** \brief Digital/analog output switch (Isw). true = produce analog output false = convert to digital output, using tap selection table. Default: false */ + CIMPP::Boolean isw; + + /** \brief Gain (K). Typical Value = 9. Default: nullptr */ + CIMPP::PU k; + + /** \brief Threshold value (Lthres). Default: nullptr */ + CIMPP::PU lthres; + + /** \brief (M). M=2*H. Typical Value = 5. Default: nullptr */ + CIMPP::PU m; + + /** \brief Number of control outputs to average (Nav) (1 <= Nav <= 16). Typical Value = 4. Default: nullptr */ + CIMPP::Simple_Float nav; + + /** \brief Number of counts at limit to active limit function (Ncl) (>0). Default: nullptr */ + CIMPP::Simple_Float ncl; + + /** \brief Number of counts until reset after limit function is triggered (Ncr). Default: nullptr */ + CIMPP::Simple_Float ncr; + + /** \brief (Pmin). Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Time constant (T1). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Time constant (T2). Typical Value = 1. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Time constant (T3). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Time constant (T4). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant (T5). Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Time constant (T6). Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time constant (Tf). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Time constant (Tp). Typical Value = 0.2. Default: nullptr */ + CIMPP::Seconds tp; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/PssSB4.cpp b/CGMES_2.4.15_27JAN2020/PssSB4.cpp index 886022e1c..ff54c429f 100644 --- a/CGMES_2.4.15_27JAN2020/PssSB4.cpp +++ b/CGMES_2.4.15_27JAN2020/PssSB4.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PssSB4::PssSB4() {}; -PssSB4::~PssSB4() {}; +PssSB4::PssSB4() {} +PssSB4::~PssSB4() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ PssSB4::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssSB4_kx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_kx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_tt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_tx1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_tx1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tx1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_tx2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_tx2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tx2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_vsmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_vsmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_vsmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_vsmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssSB4_kx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kx; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_PssSB4_kx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSB4_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_PssSB4_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSB4_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_PssSB4_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSB4_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_PssSB4_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSB4_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_PssSB4_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSB4_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_PssSB4_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSB4_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tt; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_PssSB4_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSB4_tx1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tx1; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_PssSB4_tx1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSB4_tx2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tx2; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_PssSB4_tx2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSB4_vsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmax; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_PssSB4_vsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssSB4_vsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmin; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_PssSB4_vsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char PssSB4::debugName[] = "PssSB4"; const char* PssSB4::debugString() const { @@ -370,22 +376,22 @@ const char* PssSB4::debugString() const void PssSB4::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssSB4"), &PssSB4_factory)); + factory_map.emplace("cim:PssSB4", &PssSB4_factory); } void PssSB4::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssSB4.kx"), &assign_PssSB4_kx)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.ta"), &assign_PssSB4_ta)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.tb"), &assign_PssSB4_tb)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.tc"), &assign_PssSB4_tc)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.td"), &assign_PssSB4_td)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.te"), &assign_PssSB4_te)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.tt"), &assign_PssSB4_tt)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.tx1"), &assign_PssSB4_tx1)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.tx2"), &assign_PssSB4_tx2)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.vsmax"), &assign_PssSB4_vsmax)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.vsmin"), &assign_PssSB4_vsmin)); + assign_map.emplace("cim:PssSB4.kx", &assign_PssSB4_kx); + assign_map.emplace("cim:PssSB4.ta", &assign_PssSB4_ta); + assign_map.emplace("cim:PssSB4.tb", &assign_PssSB4_tb); + assign_map.emplace("cim:PssSB4.tc", &assign_PssSB4_tc); + assign_map.emplace("cim:PssSB4.td", &assign_PssSB4_td); + assign_map.emplace("cim:PssSB4.te", &assign_PssSB4_te); + assign_map.emplace("cim:PssSB4.tt", &assign_PssSB4_tt); + assign_map.emplace("cim:PssSB4.tx1", &assign_PssSB4_tx1); + assign_map.emplace("cim:PssSB4.tx2", &assign_PssSB4_tx2); + assign_map.emplace("cim:PssSB4.vsmax", &assign_PssSB4_vsmax); + assign_map.emplace("cim:PssSB4.vsmin", &assign_PssSB4_vsmin); } void PssSB4::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/PssSB4.hpp b/CGMES_2.4.15_27JAN2020/PssSB4.hpp index e54b13b13..4fb9cc24a 100644 --- a/CGMES_2.4.15_27JAN2020/PssSB4.hpp +++ b/CGMES_2.4.15_27JAN2020/PssSB4.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Power sensitive stabilizer model. - */ + /** \brief Power sensitive stabilizer model. */ class PssSB4 : public PowerSystemStabilizerDynamics { public: @@ -28,17 +26,38 @@ namespace CIMPP PssSB4(); ~PssSB4() override; - CIMPP::PU kx; /* Gain (Kx). Default: nullptr */ - CIMPP::Seconds ta; /* Time constant (Ta). Default: nullptr */ - CIMPP::Seconds tb; /* Time constant (Tb). Default: nullptr */ - CIMPP::Seconds tc; /* Time constant (Tc). Default: nullptr */ - CIMPP::Seconds td; /* Time constant (Td). Default: nullptr */ - CIMPP::Seconds te; /* Time constant (Te). Default: nullptr */ - CIMPP::Seconds tt; /* Time constant (Tt). Default: nullptr */ - CIMPP::Seconds tx1; /* Reset time constant (Tx1). Default: nullptr */ - CIMPP::Seconds tx2; /* Time constant (Tx2). Default: nullptr */ - CIMPP::PU vsmax; /* Limiter (Vsmax). Default: nullptr */ - CIMPP::PU vsmin; /* Limiter (Vsmin). Default: nullptr */ + /** \brief Gain (Kx). Default: nullptr */ + CIMPP::PU kx; + + /** \brief Time constant (Ta). Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Time constant (Tb). Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Time constant (Tc). Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Time constant (Td). Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Time constant (Te). Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Time constant (Tt). Default: nullptr */ + CIMPP::Seconds tt; + + /** \brief Reset time constant (Tx1). Default: nullptr */ + CIMPP::Seconds tx1; + + /** \brief Time constant (Tx2). Default: nullptr */ + CIMPP::Seconds tx2; + + /** \brief Limiter (Vsmax). Default: nullptr */ + CIMPP::PU vsmax; + + /** \brief Limiter (Vsmin). Default: nullptr */ + CIMPP::PU vsmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/PssSH.cpp b/CGMES_2.4.15_27JAN2020/PssSH.cpp index eb34d8442..5e06369a1 100644 --- a/CGMES_2.4.15_27JAN2020/PssSH.cpp +++ b/CGMES_2.4.15_27JAN2020/PssSH.cpp @@ -8,24 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PssSH::PssSH() {}; -PssSH::~PssSH() {}; +PssSH::PssSH() {} +PssSH::~PssSH() {} static const std::list PossibleProfilesForClass = { @@ -64,181 +51,192 @@ PssSH::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssSH_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_k0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_k0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_k4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_vsmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_vsmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_vsmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_vsmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssSH_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -252,7 +250,8 @@ bool get_PssSH_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_k0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k0; if (!buffer.str().empty()) @@ -266,7 +265,8 @@ bool get_PssSH_k0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -280,7 +280,8 @@ bool get_PssSH_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -294,7 +295,8 @@ bool get_PssSH_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -308,7 +310,8 @@ bool get_PssSH_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k4; if (!buffer.str().empty()) @@ -322,7 +325,8 @@ bool get_PssSH_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -336,7 +340,8 @@ bool get_PssSH_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -350,7 +355,8 @@ bool get_PssSH_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -364,7 +370,8 @@ bool get_PssSH_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -378,7 +385,8 @@ bool get_PssSH_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -392,7 +400,8 @@ bool get_PssSH_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_vsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmax; if (!buffer.str().empty()) @@ -406,7 +415,8 @@ bool get_PssSH_vsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_vsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmin; if (!buffer.str().empty()) @@ -418,8 +428,6 @@ bool get_PssSH_vsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char PssSH::debugName[] = "PssSH"; const char* PssSH::debugString() const { @@ -428,24 +436,24 @@ const char* PssSH::debugString() const void PssSH::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssSH"), &PssSH_factory)); + factory_map.emplace("cim:PssSH", &PssSH_factory); } void PssSH::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssSH.k"), &assign_PssSH_k)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.k0"), &assign_PssSH_k0)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.k1"), &assign_PssSH_k1)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.k2"), &assign_PssSH_k2)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.k3"), &assign_PssSH_k3)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.k4"), &assign_PssSH_k4)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.t1"), &assign_PssSH_t1)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.t2"), &assign_PssSH_t2)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.t3"), &assign_PssSH_t3)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.t4"), &assign_PssSH_t4)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.td"), &assign_PssSH_td)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.vsmax"), &assign_PssSH_vsmax)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.vsmin"), &assign_PssSH_vsmin)); + assign_map.emplace("cim:PssSH.k", &assign_PssSH_k); + assign_map.emplace("cim:PssSH.k0", &assign_PssSH_k0); + assign_map.emplace("cim:PssSH.k1", &assign_PssSH_k1); + assign_map.emplace("cim:PssSH.k2", &assign_PssSH_k2); + assign_map.emplace("cim:PssSH.k3", &assign_PssSH_k3); + assign_map.emplace("cim:PssSH.k4", &assign_PssSH_k4); + assign_map.emplace("cim:PssSH.t1", &assign_PssSH_t1); + assign_map.emplace("cim:PssSH.t2", &assign_PssSH_t2); + assign_map.emplace("cim:PssSH.t3", &assign_PssSH_t3); + assign_map.emplace("cim:PssSH.t4", &assign_PssSH_t4); + assign_map.emplace("cim:PssSH.td", &assign_PssSH_td); + assign_map.emplace("cim:PssSH.vsmax", &assign_PssSH_vsmax); + assign_map.emplace("cim:PssSH.vsmin", &assign_PssSH_vsmin); } void PssSH::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/PssSH.hpp b/CGMES_2.4.15_27JAN2020/PssSH.hpp index e08fdce49..f93e0ee7b 100644 --- a/CGMES_2.4.15_27JAN2020/PssSH.hpp +++ b/CGMES_2.4.15_27JAN2020/PssSH.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Model for Siemens "H infinity" power system stabilizer with generator electrical power input. - */ + /** \brief Model for Siemens "H infinity" power system stabilizer with generator electrical power input. */ class PssSH : public PowerSystemStabilizerDynamics { public: @@ -28,19 +26,44 @@ namespace CIMPP PssSH(); ~PssSH() override; - CIMPP::PU k; /* Main gain (K). Typical Value = 1. Default: nullptr */ - CIMPP::PU k0; /* Gain 0 (K0). Typical Value = 0.012. Default: nullptr */ - CIMPP::PU k1; /* Gain 1 (K1). Typical Value = 0.488. Default: nullptr */ - CIMPP::PU k2; /* Gain 2 (K2). Typical Value = 0.064. Default: nullptr */ - CIMPP::PU k3; /* Gain 3 (K3). Typical Value = 0.224. Default: nullptr */ - CIMPP::PU k4; /* Gain 4 (K4). Typical Value = 0.1. Default: nullptr */ - CIMPP::Seconds t1; /* Time constant 1 (T1). Typical Value = 0.076. Default: nullptr */ - CIMPP::Seconds t2; /* Time constant 2 (T2). Typical Value = 0.086. Default: nullptr */ - CIMPP::Seconds t3; /* Time constant 3 (T3). Typical Value = 1.068. Default: nullptr */ - CIMPP::Seconds t4; /* Time constant 4 (T4). Typical Value = 1.913. Default: nullptr */ - CIMPP::Seconds td; /* Input time constant (Td). Typical Value = 10. Default: nullptr */ - CIMPP::PU vsmax; /* Output maximum limit (Vsmax). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU vsmin; /* Output minimum limit (Vsmin). Typical Value = -0.1. Default: nullptr */ + /** \brief Main gain (K). Typical Value = 1. Default: nullptr */ + CIMPP::PU k; + + /** \brief Gain 0 (K0). Typical Value = 0.012. Default: nullptr */ + CIMPP::PU k0; + + /** \brief Gain 1 (K1). Typical Value = 0.488. Default: nullptr */ + CIMPP::PU k1; + + /** \brief Gain 2 (K2). Typical Value = 0.064. Default: nullptr */ + CIMPP::PU k2; + + /** \brief Gain 3 (K3). Typical Value = 0.224. Default: nullptr */ + CIMPP::PU k3; + + /** \brief Gain 4 (K4). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU k4; + + /** \brief Time constant 1 (T1). Typical Value = 0.076. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Time constant 2 (T2). Typical Value = 0.086. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Time constant 3 (T3). Typical Value = 1.068. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Time constant 4 (T4). Typical Value = 1.913. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Input time constant (Td). Typical Value = 10. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Output maximum limit (Vsmax). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU vsmax; + + /** \brief Output minimum limit (Vsmin). Typical Value = -0.1. Default: nullptr */ + CIMPP::PU vsmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/PssSK.cpp b/CGMES_2.4.15_27JAN2020/PssSK.cpp index 21e59004b..1c23f5dbd 100644 --- a/CGMES_2.4.15_27JAN2020/PssSK.cpp +++ b/CGMES_2.4.15_27JAN2020/PssSK.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PssSK::PssSK() {}; -PssSK::~PssSK() {}; +PssSK::PssSK() {} +PssSK::~PssSK() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ PssSK::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssSK_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_vsmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_vsmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_vsmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_vsmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssSK_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_PssSK_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_PssSK_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_PssSK_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_PssSK_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_PssSK_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_PssSK_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_PssSK_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_PssSK_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_PssSK_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_vsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmax; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_PssSK_vsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_vsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmin; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_PssSK_vsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char PssSK::debugName[] = "PssSK"; const char* PssSK::debugString() const { @@ -370,22 +376,22 @@ const char* PssSK::debugString() const void PssSK::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssSK"), &PssSK_factory)); + factory_map.emplace("cim:PssSK", &PssSK_factory); } void PssSK::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssSK.k1"), &assign_PssSK_k1)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.k2"), &assign_PssSK_k2)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.k3"), &assign_PssSK_k3)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.t1"), &assign_PssSK_t1)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.t2"), &assign_PssSK_t2)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.t3"), &assign_PssSK_t3)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.t4"), &assign_PssSK_t4)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.t5"), &assign_PssSK_t5)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.t6"), &assign_PssSK_t6)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.vsmax"), &assign_PssSK_vsmax)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.vsmin"), &assign_PssSK_vsmin)); + assign_map.emplace("cim:PssSK.k1", &assign_PssSK_k1); + assign_map.emplace("cim:PssSK.k2", &assign_PssSK_k2); + assign_map.emplace("cim:PssSK.k3", &assign_PssSK_k3); + assign_map.emplace("cim:PssSK.t1", &assign_PssSK_t1); + assign_map.emplace("cim:PssSK.t2", &assign_PssSK_t2); + assign_map.emplace("cim:PssSK.t3", &assign_PssSK_t3); + assign_map.emplace("cim:PssSK.t4", &assign_PssSK_t4); + assign_map.emplace("cim:PssSK.t5", &assign_PssSK_t5); + assign_map.emplace("cim:PssSK.t6", &assign_PssSK_t6); + assign_map.emplace("cim:PssSK.vsmax", &assign_PssSK_vsmax); + assign_map.emplace("cim:PssSK.vsmin", &assign_PssSK_vsmin); } void PssSK::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/PssSK.hpp b/CGMES_2.4.15_27JAN2020/PssSK.hpp index 285b28244..1af0641d1 100644 --- a/CGMES_2.4.15_27JAN2020/PssSK.hpp +++ b/CGMES_2.4.15_27JAN2020/PssSK.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - PSS Slovakian type - three inputs. - */ + /** \brief PSS Slovakian type - three inputs. */ class PssSK : public PowerSystemStabilizerDynamics { public: @@ -28,17 +26,38 @@ namespace CIMPP PssSK(); ~PssSK() override; - CIMPP::PU k1; /* Gain P (K1). Typical Value = -0.3. Default: nullptr */ - CIMPP::PU k2; /* Gain fe (K2). Typical Value = -0.15. Default: nullptr */ - CIMPP::PU k3; /* Gain If (K3). Typical Value = 10. Default: nullptr */ - CIMPP::Seconds t1; /* Denominator time constant (T1). Typical Value = 0.3. Default: nullptr */ - CIMPP::Seconds t2; /* Filter time constant (T2). Typical Value = 0.35. Default: nullptr */ - CIMPP::Seconds t3; /* Denominator time constant (T3). Typical Value = 0.22. Default: nullptr */ - CIMPP::Seconds t4; /* Filter time constant (T4). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds t5; /* Denominator time constant (T5). Typical Value = 0.02. Default: nullptr */ - CIMPP::Seconds t6; /* Filter time constant (T6). Typical Value = 0.02. Default: nullptr */ - CIMPP::PU vsmax; /* Stabilizer output max limit (Vsmax). Typical Value = 0.4. Default: nullptr */ - CIMPP::PU vsmin; /* Stabilizer output min limit (Vsmin). Typical Value = -0.4. Default: nullptr */ + /** \brief Gain P (K1). Typical Value = -0.3. Default: nullptr */ + CIMPP::PU k1; + + /** \brief Gain fe (K2). Typical Value = -0.15. Default: nullptr */ + CIMPP::PU k2; + + /** \brief Gain If (K3). Typical Value = 10. Default: nullptr */ + CIMPP::PU k3; + + /** \brief Denominator time constant (T1). Typical Value = 0.3. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Filter time constant (T2). Typical Value = 0.35. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Denominator time constant (T3). Typical Value = 0.22. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Filter time constant (T4). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Denominator time constant (T5). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Filter time constant (T6). Typical Value = 0.02. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Stabilizer output max limit (Vsmax). Typical Value = 0.4. Default: nullptr */ + CIMPP::PU vsmax; + + /** \brief Stabilizer output min limit (Vsmin). Typical Value = -0.4. Default: nullptr */ + CIMPP::PU vsmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/PssWECC.cpp b/CGMES_2.4.15_27JAN2020/PssWECC.cpp index 40f8e2a16..e3044b133 100644 --- a/CGMES_2.4.15_27JAN2020/PssWECC.cpp +++ b/CGMES_2.4.15_27JAN2020/PssWECC.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "InputSignalKind.hpp" -#include "InputSignalKind.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PssWECC::PssWECC() {}; -PssWECC::~PssWECC() {}; +PssWECC::PssWECC() {} +PssWECC::~PssWECC() {} static const std::list PossibleProfilesForClass = { @@ -74,246 +56,292 @@ PssWECC::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssWECC_inputSignal1Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_inputSignal1Type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal1Type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_inputSignal2Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_inputSignal2Type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal2Type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_vcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_vcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vcl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_vcu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_vcu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vcu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_vsmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_vsmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_vsmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_vsmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } +bool get_PssWECC_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignal1Type; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} +bool get_PssWECC_inputSignal2Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignal2Type; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} bool get_PssWECC_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -327,7 +355,8 @@ bool get_PssWECC_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -341,7 +370,8 @@ bool get_PssWECC_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -355,7 +385,8 @@ bool get_PssWECC_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t10; if (!buffer.str().empty()) @@ -369,7 +400,8 @@ bool get_PssWECC_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -383,7 +415,8 @@ bool get_PssWECC_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -397,7 +430,8 @@ bool get_PssWECC_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -411,7 +445,8 @@ bool get_PssWECC_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -425,7 +460,8 @@ bool get_PssWECC_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -439,7 +475,8 @@ bool get_PssWECC_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t7; if (!buffer.str().empty()) @@ -453,7 +490,8 @@ bool get_PssWECC_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t8; if (!buffer.str().empty()) @@ -467,7 +505,8 @@ bool get_PssWECC_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t9; if (!buffer.str().empty()) @@ -481,7 +520,8 @@ bool get_PssWECC_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_vcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vcl; if (!buffer.str().empty()) @@ -495,7 +535,8 @@ bool get_PssWECC_vcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_vcu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vcu; if (!buffer.str().empty()) @@ -509,7 +550,8 @@ bool get_PssWECC_vcu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_vsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmax; if (!buffer.str().empty()) @@ -523,7 +565,8 @@ bool get_PssWECC_vsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssWECC_vsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmin; if (!buffer.str().empty()) @@ -535,36 +578,6 @@ bool get_PssWECC_vsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - -bool get_PssWECC_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignal1Type; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - -bool get_PssWECC_inputSignal2Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignal2Type; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char PssWECC::debugName[] = "PssWECC"; const char* PssWECC::debugString() const { @@ -573,29 +586,29 @@ const char* PssWECC::debugString() const void PssWECC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssWECC"), &PssWECC_factory)); + factory_map.emplace("cim:PssWECC", &PssWECC_factory); } void PssWECC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssWECC.inputSignal1Type"), &assign_PssWECC_inputSignal1Type)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.inputSignal2Type"), &assign_PssWECC_inputSignal2Type)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.k1"), &assign_PssWECC_k1)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.k2"), &assign_PssWECC_k2)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t1"), &assign_PssWECC_t1)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t10"), &assign_PssWECC_t10)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t2"), &assign_PssWECC_t2)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t3"), &assign_PssWECC_t3)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t4"), &assign_PssWECC_t4)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t5"), &assign_PssWECC_t5)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t6"), &assign_PssWECC_t6)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t7"), &assign_PssWECC_t7)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t8"), &assign_PssWECC_t8)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t9"), &assign_PssWECC_t9)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.vcl"), &assign_PssWECC_vcl)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.vcu"), &assign_PssWECC_vcu)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.vsmax"), &assign_PssWECC_vsmax)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.vsmin"), &assign_PssWECC_vsmin)); + assign_map.emplace("cim:PssWECC.inputSignal1Type", &assign_PssWECC_inputSignal1Type); + assign_map.emplace("cim:PssWECC.inputSignal2Type", &assign_PssWECC_inputSignal2Type); + assign_map.emplace("cim:PssWECC.k1", &assign_PssWECC_k1); + assign_map.emplace("cim:PssWECC.k2", &assign_PssWECC_k2); + assign_map.emplace("cim:PssWECC.t1", &assign_PssWECC_t1); + assign_map.emplace("cim:PssWECC.t10", &assign_PssWECC_t10); + assign_map.emplace("cim:PssWECC.t2", &assign_PssWECC_t2); + assign_map.emplace("cim:PssWECC.t3", &assign_PssWECC_t3); + assign_map.emplace("cim:PssWECC.t4", &assign_PssWECC_t4); + assign_map.emplace("cim:PssWECC.t5", &assign_PssWECC_t5); + assign_map.emplace("cim:PssWECC.t6", &assign_PssWECC_t6); + assign_map.emplace("cim:PssWECC.t7", &assign_PssWECC_t7); + assign_map.emplace("cim:PssWECC.t8", &assign_PssWECC_t8); + assign_map.emplace("cim:PssWECC.t9", &assign_PssWECC_t9); + assign_map.emplace("cim:PssWECC.vcl", &assign_PssWECC_vcl); + assign_map.emplace("cim:PssWECC.vcu", &assign_PssWECC_vcu); + assign_map.emplace("cim:PssWECC.vsmax", &assign_PssWECC_vsmax); + assign_map.emplace("cim:PssWECC.vsmin", &assign_PssWECC_vsmin); } void PssWECC::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/PssWECC.hpp b/CGMES_2.4.15_27JAN2020/PssWECC.hpp index 4edb4f4af..a5bb2c5de 100644 --- a/CGMES_2.4.15_27JAN2020/PssWECC.hpp +++ b/CGMES_2.4.15_27JAN2020/PssWECC.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Dual input Power System Stabilizer, based on IEEE type 2, with modified output limiter defined by WECC (Western Electricity Coordinating Council, USA). - */ + /** \brief Dual input Power System Stabilizer, based on IEEE type 2, with modified output limiter defined by WECC (Western Electricity Coordinating Council, USA). */ class PssWECC : public PowerSystemStabilizerDynamics { public: @@ -29,24 +27,59 @@ namespace CIMPP PssWECC(); ~PssWECC() override; - CIMPP::InputSignalKind inputSignal1Type; /* Type of input signal #1. Default: 0 */ - CIMPP::InputSignalKind inputSignal2Type; /* Type of input signal #2. Default: 0 */ - CIMPP::PU k1; /* Input signal 1 gain (K). Default: nullptr */ - CIMPP::PU k2; /* Input signal 2 gain (K). Default: nullptr */ - CIMPP::Seconds t1; /* Input signal 1 transducer time constant (T). Default: nullptr */ - CIMPP::Seconds t10; /* Lag time constant (T). Default: nullptr */ - CIMPP::Seconds t2; /* Input signal 2 transducer time constant (T). Default: nullptr */ - CIMPP::Seconds t3; /* Stabilizer washout time constant (T). Default: nullptr */ - CIMPP::Seconds t4; /* Stabilizer washout time lag constant (T) (>0). Default: nullptr */ - CIMPP::Seconds t5; /* Lead time constant (T). Default: nullptr */ - CIMPP::Seconds t6; /* Lag time constant (T). Default: nullptr */ - CIMPP::Seconds t7; /* Lead time constant (T). Default: nullptr */ - CIMPP::Seconds t8; /* Lag time constant (T). Default: nullptr */ - CIMPP::Seconds t9; /* Lead time constant (T). Default: nullptr */ - CIMPP::PU vcl; /* Minimum value for voltage compensator output (V). Default: nullptr */ - CIMPP::PU vcu; /* Maximum value for voltage compensator output (V). Default: nullptr */ - CIMPP::PU vsmax; /* Maximum output signal (Vsmax). Default: nullptr */ - CIMPP::PU vsmin; /* Minimum output signal (Vsmin). Default: nullptr */ + /** \brief Type of input signal #1. Default: 0 */ + CIMPP::InputSignalKind inputSignal1Type; + + /** \brief Type of input signal #2. Default: 0 */ + CIMPP::InputSignalKind inputSignal2Type; + + /** \brief Input signal 1 gain (K). Default: nullptr */ + CIMPP::PU k1; + + /** \brief Input signal 2 gain (K). Default: nullptr */ + CIMPP::PU k2; + + /** \brief Input signal 1 transducer time constant (T). Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Lag time constant (T). Default: nullptr */ + CIMPP::Seconds t10; + + /** \brief Input signal 2 transducer time constant (T). Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Stabilizer washout time constant (T). Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Stabilizer washout time lag constant (T) (>0). Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Lead time constant (T). Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Lag time constant (T). Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Lead time constant (T). Default: nullptr */ + CIMPP::Seconds t7; + + /** \brief Lag time constant (T). Default: nullptr */ + CIMPP::Seconds t8; + + /** \brief Lead time constant (T). Default: nullptr */ + CIMPP::Seconds t9; + + /** \brief Minimum value for voltage compensator output (V). Default: nullptr */ + CIMPP::PU vcl; + + /** \brief Maximum value for voltage compensator output (V). Default: nullptr */ + CIMPP::PU vcu; + + /** \brief Maximum output signal (Vsmax). Default: nullptr */ + CIMPP::PU vsmax; + + /** \brief Minimum output signal (Vsmin). Default: nullptr */ + CIMPP::PU vsmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Quality61850.cpp b/CGMES_2.4.15_27JAN2020/Quality61850.cpp index 9771f8dda..99169f619 100644 --- a/CGMES_2.4.15_27JAN2020/Quality61850.cpp +++ b/CGMES_2.4.15_27JAN2020/Quality61850.cpp @@ -8,23 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Source.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Validity.hpp" using namespace CIMPP; -Quality61850::Quality61850() {}; -Quality61850::~Quality61850() {}; +Quality61850::Quality61850() {} +Quality61850::~Quality61850() {} static const std::list PossibleProfilesForClass = { @@ -62,168 +50,178 @@ Quality61850::getPossibleProfilesForAttributes() const return map; } - -bool assign_Quality61850_badReference(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_badReference(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->badReference; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_estimatorReplaced(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_estimatorReplaced(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->estimatorReplaced; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_failure(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_failure(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->failure; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_oldData(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_oldData(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->oldData; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_operatorBlocked(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_operatorBlocked(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->operatorBlocked; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_oscillatory(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_oscillatory(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->oscillatory; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_outOfRange(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_outOfRange(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->outOfRange; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_overFlow(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_overFlow(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->overFlow; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_source(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_source(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->source; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_suspect(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_suspect(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->suspect; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_test(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_test(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->test; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_validity(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_validity(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->validity; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_Quality61850_badReference(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->badReference; if (!buffer.str().empty()) @@ -237,7 +235,8 @@ bool get_Quality61850_badReference(const BaseClass* BaseClass_ptr1, std::strings bool get_Quality61850_estimatorReplaced(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->estimatorReplaced; if (!buffer.str().empty()) @@ -251,7 +250,8 @@ bool get_Quality61850_estimatorReplaced(const BaseClass* BaseClass_ptr1, std::st bool get_Quality61850_failure(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->failure; if (!buffer.str().empty()) @@ -265,7 +265,8 @@ bool get_Quality61850_failure(const BaseClass* BaseClass_ptr1, std::stringstream bool get_Quality61850_oldData(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->oldData; if (!buffer.str().empty()) @@ -279,7 +280,8 @@ bool get_Quality61850_oldData(const BaseClass* BaseClass_ptr1, std::stringstream bool get_Quality61850_operatorBlocked(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->operatorBlocked; if (!buffer.str().empty()) @@ -293,7 +295,8 @@ bool get_Quality61850_operatorBlocked(const BaseClass* BaseClass_ptr1, std::stri bool get_Quality61850_oscillatory(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->oscillatory; if (!buffer.str().empty()) @@ -307,7 +310,8 @@ bool get_Quality61850_oscillatory(const BaseClass* BaseClass_ptr1, std::stringst bool get_Quality61850_outOfRange(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->outOfRange; if (!buffer.str().empty()) @@ -321,7 +325,8 @@ bool get_Quality61850_outOfRange(const BaseClass* BaseClass_ptr1, std::stringstr bool get_Quality61850_overFlow(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->overFlow; if (!buffer.str().empty()) @@ -333,11 +338,12 @@ bool get_Quality61850_overFlow(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } -bool get_Quality61850_suspect(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_Quality61850_source(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->suspect; + buffer << element->source; if (!buffer.str().empty()) { return true; @@ -347,11 +353,12 @@ bool get_Quality61850_suspect(const BaseClass* BaseClass_ptr1, std::stringstream return false; } -bool get_Quality61850_test(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_Quality61850_suspect(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->test; + buffer << element->suspect; if (!buffer.str().empty()) { return true; @@ -361,13 +368,12 @@ bool get_Quality61850_test(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - -bool get_Quality61850_source(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_Quality61850_test(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->source; + buffer << element->test; if (!buffer.str().empty()) { return true; @@ -379,7 +385,8 @@ bool get_Quality61850_source(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_Quality61850_validity(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->validity; if (!buffer.str().empty()) @@ -399,23 +406,23 @@ const char* Quality61850::debugString() const void Quality61850::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Quality61850"), &Quality61850_factory)); + factory_map.emplace("cim:Quality61850", &Quality61850_factory); } void Quality61850::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Quality61850.badReference"), &assign_Quality61850_badReference)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.estimatorReplaced"), &assign_Quality61850_estimatorReplaced)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.failure"), &assign_Quality61850_failure)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.oldData"), &assign_Quality61850_oldData)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.operatorBlocked"), &assign_Quality61850_operatorBlocked)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.oscillatory"), &assign_Quality61850_oscillatory)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.outOfRange"), &assign_Quality61850_outOfRange)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.overFlow"), &assign_Quality61850_overFlow)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.source"), &assign_Quality61850_source)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.suspect"), &assign_Quality61850_suspect)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.test"), &assign_Quality61850_test)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.validity"), &assign_Quality61850_validity)); + assign_map.emplace("cim:Quality61850.badReference", &assign_Quality61850_badReference); + assign_map.emplace("cim:Quality61850.estimatorReplaced", &assign_Quality61850_estimatorReplaced); + assign_map.emplace("cim:Quality61850.failure", &assign_Quality61850_failure); + assign_map.emplace("cim:Quality61850.oldData", &assign_Quality61850_oldData); + assign_map.emplace("cim:Quality61850.operatorBlocked", &assign_Quality61850_operatorBlocked); + assign_map.emplace("cim:Quality61850.oscillatory", &assign_Quality61850_oscillatory); + assign_map.emplace("cim:Quality61850.outOfRange", &assign_Quality61850_outOfRange); + assign_map.emplace("cim:Quality61850.overFlow", &assign_Quality61850_overFlow); + assign_map.emplace("cim:Quality61850.source", &assign_Quality61850_source); + assign_map.emplace("cim:Quality61850.suspect", &assign_Quality61850_suspect); + assign_map.emplace("cim:Quality61850.test", &assign_Quality61850_test); + assign_map.emplace("cim:Quality61850.validity", &assign_Quality61850_validity); } void Quality61850::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/Quality61850.hpp b/CGMES_2.4.15_27JAN2020/Quality61850.hpp index 84109cd81..455802f53 100644 --- a/CGMES_2.4.15_27JAN2020/Quality61850.hpp +++ b/CGMES_2.4.15_27JAN2020/Quality61850.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Quality flags in this class are as defined in IEC 61850, except for estimatorReplaced, which has been included in this class for convenience. - */ + /** \brief Quality flags in this class are as defined in IEC 61850, except for estimatorReplaced, which has been included in this class for convenience. */ class Quality61850 : public BaseClass { public: @@ -29,18 +27,41 @@ namespace CIMPP Quality61850(); ~Quality61850() override; - CIMPP::Boolean badReference; /* Measurement value may be incorrect due to a reference being out of calibration. Default: false */ - CIMPP::Boolean estimatorReplaced; /* Value has been replaced by State Estimator. estimatorReplaced is not an IEC61850 quality bit but has been put in this class for convenience. Default: false */ - CIMPP::Boolean failure; /* This identifier indicates that a supervision function has detected an internal or external failure, e.g. communication failure. Default: false */ - CIMPP::Boolean oldData; /* Measurement value is old and possibly invalid, as it has not been successfully updated during a specified time interval. Default: false */ - CIMPP::Boolean operatorBlocked; /* Measurement value is blocked and hence unavailable for transmission. Default: false */ - CIMPP::Boolean oscillatory; /* To prevent some overload of the communication it is sensible to detect and suppress oscillating (fast changing) binary inputs. If a signal changes in a defined time (tosc) twice in the same direction (from 0 to 1 or from 1 to 0) then oscillation is detected and the detail quality identifier `oscillatory` is set. If it is detected a configured numbers of transient changes could be passed by. In this time the validity status `questionable` is set. If after this defined numbers of changes the signal is still in the oscillating state the value shall be set either to the opposite state of the previous stable value or to a defined default value. In this case the validity status `questionable` is reset and `invalid` is set as long as the signal is oscillating. If it is configured such that no transient changes should be passed by then the validity status `invalid` is set immediately in addition to the detail quality identifier `oscillatory` (used for status information only). Default: false */ - CIMPP::Boolean outOfRange; /* Measurement value is beyond a predefined range of value. Default: false */ - CIMPP::Boolean overFlow; /* Measurement value is beyond the capability of being represented properly. For example, a counter value overflows from maximum count back to a value of zero. Default: false */ - CIMPP::Source source; /* Source gives information related to the origin of a value. The value may be acquired from the process, defaulted or substituted. Default: 0 */ - CIMPP::Boolean suspect; /* A correlation function has detected that the value is not consitent with other values. Typically set by a network State Estimator. Default: false */ - CIMPP::Boolean test; /* Measurement value is transmitted for test purposes. Default: false */ - CIMPP::Validity validity; /* Validity of the measurement value. Default: 0 */ + /** \brief Measurement value may be incorrect due to a reference being out of calibration. Default: false */ + CIMPP::Boolean badReference; + + /** \brief Value has been replaced by State Estimator. estimatorReplaced is not an IEC61850 quality bit but has been put in this class for convenience. Default: false */ + CIMPP::Boolean estimatorReplaced; + + /** \brief This identifier indicates that a supervision function has detected an internal or external failure, e.g. communication failure. Default: false */ + CIMPP::Boolean failure; + + /** \brief Measurement value is old and possibly invalid, as it has not been successfully updated during a specified time interval. Default: false */ + CIMPP::Boolean oldData; + + /** \brief Measurement value is blocked and hence unavailable for transmission. Default: false */ + CIMPP::Boolean operatorBlocked; + + /** \brief To prevent some overload of the communication it is sensible to detect and suppress oscillating (fast changing) binary inputs. If a signal changes in a defined time (tosc) twice in the same direction (from 0 to 1 or from 1 to 0) then oscillation is detected and the detail quality identifier `oscillatory` is set. If it is detected a configured numbers of transient changes could be passed by. In this time the validity status `questionable` is set. If after this defined numbers of changes the signal is still in the oscillating state the value shall be set either to the opposite state of the previous stable value or to a defined default value. In this case the validity status `questionable` is reset and `invalid` is set as long as the signal is oscillating. If it is configured such that no transient changes should be passed by then the validity status `invalid` is set immediately in addition to the detail quality identifier `oscillatory` (used for status information only). Default: false */ + CIMPP::Boolean oscillatory; + + /** \brief Measurement value is beyond a predefined range of value. Default: false */ + CIMPP::Boolean outOfRange; + + /** \brief Measurement value is beyond the capability of being represented properly. For example, a counter value overflows from maximum count back to a value of zero. Default: false */ + CIMPP::Boolean overFlow; + + /** \brief Source gives information related to the origin of a value. The value may be acquired from the process, defaulted or substituted. Default: 0 */ + CIMPP::Source source; + + /** \brief A correlation function has detected that the value is not consitent with other values. Typically set by a network State Estimator. Default: false */ + CIMPP::Boolean suspect; + + /** \brief Measurement value is transmitted for test purposes. Default: false */ + CIMPP::Boolean test; + + /** \brief Validity of the measurement value. Default: 0 */ + CIMPP::Validity validity; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/RaiseLowerCommand.cpp b/CGMES_2.4.15_27JAN2020/RaiseLowerCommand.cpp index ba30e7516..59622eff6 100644 --- a/CGMES_2.4.15_27JAN2020/RaiseLowerCommand.cpp +++ b/CGMES_2.4.15_27JAN2020/RaiseLowerCommand.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -RaiseLowerCommand::RaiseLowerCommand() : ValueAliasSet(nullptr) {}; -RaiseLowerCommand::~RaiseLowerCommand() {}; +RaiseLowerCommand::RaiseLowerCommand() : ValueAliasSet(nullptr) {} +RaiseLowerCommand::~RaiseLowerCommand() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ RaiseLowerCommand::getPossibleProfilesForAttributes() const return map; } - - bool assign_ValueAliasSet_RaiseLowerCommands(BaseClass*, BaseClass*); bool assign_RaiseLowerCommand_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_RaiseLowerCommand_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass return false; } - bool get_RaiseLowerCommand_ValueAliasSet(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RaiseLowerCommand* element = dynamic_cast(BaseClass_ptr1)) + const RaiseLowerCommand* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ValueAliasSet != 0) { @@ -73,7 +71,6 @@ bool get_RaiseLowerCommand_ValueAliasSet(const BaseClass* BaseClass_ptr1, std::l return false; } - const char RaiseLowerCommand::debugName[] = "RaiseLowerCommand"; const char* RaiseLowerCommand::debugString() const { @@ -82,7 +79,7 @@ const char* RaiseLowerCommand::debugString() const void RaiseLowerCommand::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RaiseLowerCommand"), &RaiseLowerCommand_factory)); + factory_map.emplace("cim:RaiseLowerCommand", &RaiseLowerCommand_factory); } void RaiseLowerCommand::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void RaiseLowerCommand::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RaiseLowerCommand.ValueAliasSet"), &assign_RaiseLowerCommand_ValueAliasSet)); + assign_map.emplace("cim:RaiseLowerCommand.ValueAliasSet", &assign_RaiseLowerCommand_ValueAliasSet); } void RaiseLowerCommand::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/RaiseLowerCommand.hpp b/CGMES_2.4.15_27JAN2020/RaiseLowerCommand.hpp index a6b9dba1e..97530d3cb 100644 --- a/CGMES_2.4.15_27JAN2020/RaiseLowerCommand.hpp +++ b/CGMES_2.4.15_27JAN2020/RaiseLowerCommand.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class ValueAliasSet; - /* - An analog control that increase or decrease a set point value with pulses. - */ + /** \brief An analog control that increase or decrease a set point value with pulses. */ class RaiseLowerCommand : public AnalogControl { public: @@ -27,7 +25,8 @@ namespace CIMPP RaiseLowerCommand(); ~RaiseLowerCommand() override; - CIMPP::ValueAliasSet* ValueAliasSet; /* The ValueAliasSet used for translation of a Control value to a name. Default: 0 */ + /** \brief The ValueAliasSet used for translation of a Control value to a name. Default: 0 */ + CIMPP::ValueAliasSet* ValueAliasSet; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/RatioTapChanger.cpp b/CGMES_2.4.15_27JAN2020/RatioTapChanger.cpp index 5c424bc14..f67722c8a 100644 --- a/CGMES_2.4.15_27JAN2020/RatioTapChanger.cpp +++ b/CGMES_2.4.15_27JAN2020/RatioTapChanger.cpp @@ -10,13 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "RatioTapChangerTable.hpp" #include "TransformerEnd.hpp" -#include "PerCent.hpp" -#include "TransformerControlMode.hpp" using namespace CIMPP; -RatioTapChanger::RatioTapChanger() : RatioTapChangerTable(nullptr), TransformerEnd(nullptr) {}; -RatioTapChanger::~RatioTapChanger() {}; +RatioTapChanger::RatioTapChanger() : RatioTapChangerTable(nullptr), TransformerEnd(nullptr) {} +RatioTapChanger::~RatioTapChanger() {} static const std::list PossibleProfilesForClass = { @@ -47,34 +45,6 @@ RatioTapChanger::getPossibleProfilesForAttributes() const return map; } - -bool assign_RatioTapChanger_stepVoltageIncrement(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (RatioTapChanger* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->stepVoltageIncrement; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_RatioTapChanger_tculControlMode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (RatioTapChanger* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->tculControlMode; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_RatioTapChangerTable_RatioTapChanger(BaseClass*, BaseClass*); bool assign_RatioTapChanger_RatioTapChangerTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -91,6 +61,7 @@ bool assign_RatioTapChanger_RatioTapChangerTable(BaseClass* BaseClass_ptr1, Base } return false; } + bool assign_TransformerEnd_RatioTapChanger(BaseClass*, BaseClass*); bool assign_RatioTapChanger_TransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -108,24 +79,38 @@ bool assign_RatioTapChanger_TransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* return false; } -bool get_RatioTapChanger_stepVoltageIncrement(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_RatioTapChanger_stepVoltageIncrement(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const RatioTapChanger* element = dynamic_cast(BaseClass_ptr1)) + RatioTapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->stepVoltageIncrement; - if (!buffer.str().empty()) + buffer >> element->stepVoltageIncrement; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } +bool assign_RatioTapChanger_tculControlMode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + RatioTapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->tculControlMode; + if (!buffer.fail()) + { + return true; + } + } + return false; +} bool get_RatioTapChanger_RatioTapChangerTable(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RatioTapChanger* element = dynamic_cast(BaseClass_ptr1)) + const RatioTapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->RatioTapChangerTable != 0) { @@ -138,7 +123,8 @@ bool get_RatioTapChanger_RatioTapChangerTable(const BaseClass* BaseClass_ptr1, s bool get_RatioTapChanger_TransformerEnd(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RatioTapChanger* element = dynamic_cast(BaseClass_ptr1)) + const RatioTapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->TransformerEnd != 0) { @@ -149,10 +135,25 @@ bool get_RatioTapChanger_TransformerEnd(const BaseClass* BaseClass_ptr1, std::li return false; } +bool get_RatioTapChanger_stepVoltageIncrement(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const RatioTapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->stepVoltageIncrement; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} bool get_RatioTapChanger_tculControlMode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RatioTapChanger* element = dynamic_cast(BaseClass_ptr1)) + const RatioTapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tculControlMode; if (!buffer.str().empty()) @@ -172,19 +173,19 @@ const char* RatioTapChanger::debugString() const void RatioTapChanger::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RatioTapChanger"), &RatioTapChanger_factory)); + factory_map.emplace("cim:RatioTapChanger", &RatioTapChanger_factory); } void RatioTapChanger::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RatioTapChanger.stepVoltageIncrement"), &assign_RatioTapChanger_stepVoltageIncrement)); - assign_map.insert(std::make_pair(std::string("cim:RatioTapChanger.tculControlMode"), &assign_RatioTapChanger_tculControlMode)); + assign_map.emplace("cim:RatioTapChanger.stepVoltageIncrement", &assign_RatioTapChanger_stepVoltageIncrement); + assign_map.emplace("cim:RatioTapChanger.tculControlMode", &assign_RatioTapChanger_tculControlMode); } void RatioTapChanger::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RatioTapChanger.RatioTapChangerTable"), &assign_RatioTapChanger_RatioTapChangerTable)); - assign_map.insert(std::make_pair(std::string("cim:RatioTapChanger.TransformerEnd"), &assign_RatioTapChanger_TransformerEnd)); + assign_map.emplace("cim:RatioTapChanger.RatioTapChangerTable", &assign_RatioTapChanger_RatioTapChangerTable); + assign_map.emplace("cim:RatioTapChanger.TransformerEnd", &assign_RatioTapChanger_TransformerEnd); } void RatioTapChanger::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/RatioTapChanger.hpp b/CGMES_2.4.15_27JAN2020/RatioTapChanger.hpp index 9e01cd807..fafbcad25 100644 --- a/CGMES_2.4.15_27JAN2020/RatioTapChanger.hpp +++ b/CGMES_2.4.15_27JAN2020/RatioTapChanger.hpp @@ -20,9 +20,7 @@ namespace CIMPP class RatioTapChangerTable; class TransformerEnd; - /* - A tap changer that changes the voltage ratio impacting the voltage magnitude but not the phase angle across the transformer. - */ + /** \brief A tap changer that changes the voltage ratio impacting the voltage magnitude but not the phase angle across the transformer. */ class RatioTapChanger : public TapChanger { public: @@ -30,10 +28,17 @@ namespace CIMPP RatioTapChanger(); ~RatioTapChanger() override; - CIMPP::RatioTapChangerTable* RatioTapChangerTable; /* The ratio tap changer of this tap ratio table. Default: 0 */ - CIMPP::TransformerEnd* TransformerEnd; /* Ratio tap changer associated with this transformer end. Default: 0 */ - CIMPP::PerCent stepVoltageIncrement; /* Tap step increment, in per cent of nominal voltage, per step position. Default: nullptr */ - CIMPP::TransformerControlMode tculControlMode; /* Specifies the regulation control mode (voltage or reactive) of the RatioTapChanger. Default: 0 */ + /** \brief The ratio tap changer of this tap ratio table. Default: 0 */ + CIMPP::RatioTapChangerTable* RatioTapChangerTable; + + /** \brief Ratio tap changer associated with this transformer end. Default: 0 */ + CIMPP::TransformerEnd* TransformerEnd; + + /** \brief Tap step increment, in per cent of nominal voltage, per step position. Default: nullptr */ + CIMPP::PerCent stepVoltageIncrement; + + /** \brief Specifies the regulation control mode (voltage or reactive) of the RatioTapChanger. Default: 0 */ + CIMPP::TransformerControlMode tculControlMode; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/RatioTapChangerTable.cpp b/CGMES_2.4.15_27JAN2020/RatioTapChangerTable.cpp index 3088057a7..1c743986f 100644 --- a/CGMES_2.4.15_27JAN2020/RatioTapChangerTable.cpp +++ b/CGMES_2.4.15_27JAN2020/RatioTapChangerTable.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -RatioTapChangerTable::RatioTapChangerTable() {}; -RatioTapChangerTable::~RatioTapChangerTable() {}; +RatioTapChangerTable::RatioTapChangerTable() {} +RatioTapChangerTable::~RatioTapChangerTable() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ RatioTapChangerTable::getPossibleProfilesForAttributes() const return map; } - - bool assign_RatioTapChanger_RatioTapChangerTable(BaseClass*, BaseClass*); bool assign_RatioTapChangerTable_RatioTapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_RatioTapChangerTable_RatioTapChanger(BaseClass* BaseClass_ptr1, Base } return false; } + bool assign_RatioTapChangerTablePoint_RatioTapChangerTable(BaseClass*, BaseClass*); bool assign_RatioTapChangerTable_RatioTapChangerTablePoint(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -87,7 +86,7 @@ const char* RatioTapChangerTable::debugString() const void RatioTapChangerTable::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RatioTapChangerTable"), &RatioTapChangerTable_factory)); + factory_map.emplace("cim:RatioTapChangerTable", &RatioTapChangerTable_factory); } void RatioTapChangerTable::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -96,8 +95,8 @@ void RatioTapChangerTable::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RatioTapChangerTable.RatioTapChanger"), &assign_RatioTapChangerTable_RatioTapChanger)); - assign_map.insert(std::make_pair(std::string("cim:RatioTapChangerTable.RatioTapChangerTablePoint"), &assign_RatioTapChangerTable_RatioTapChangerTablePoint)); + assign_map.emplace("cim:RatioTapChangerTable.RatioTapChanger", &assign_RatioTapChangerTable_RatioTapChanger); + assign_map.emplace("cim:RatioTapChangerTable.RatioTapChangerTablePoint", &assign_RatioTapChangerTable_RatioTapChangerTablePoint); } void RatioTapChangerTable::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/RatioTapChangerTable.hpp b/CGMES_2.4.15_27JAN2020/RatioTapChangerTable.hpp index 932fd0e42..fdb0e4be4 100644 --- a/CGMES_2.4.15_27JAN2020/RatioTapChangerTable.hpp +++ b/CGMES_2.4.15_27JAN2020/RatioTapChangerTable.hpp @@ -18,9 +18,7 @@ namespace CIMPP class RatioTapChanger; class RatioTapChangerTablePoint; - /* - Describes a curve for how the voltage magnitude and impedance varies with the tap step. - */ + /** \brief Describes a curve for how the voltage magnitude and impedance varies with the tap step. */ class RatioTapChangerTable : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP RatioTapChangerTable(); ~RatioTapChangerTable() override; - std::list RatioTapChanger; /* The tap ratio table for this ratio tap changer. Default: 0 */ - std::list RatioTapChangerTablePoint; /* Table of this point. Default: 0 */ + /** \brief The tap ratio table for this ratio tap changer. Default: 0 */ + std::list RatioTapChanger; + + /** \brief Table of this point. Default: 0 */ + std::list RatioTapChangerTablePoint; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/RatioTapChangerTablePoint.cpp b/CGMES_2.4.15_27JAN2020/RatioTapChangerTablePoint.cpp index 358496d9f..fb837e687 100644 --- a/CGMES_2.4.15_27JAN2020/RatioTapChangerTablePoint.cpp +++ b/CGMES_2.4.15_27JAN2020/RatioTapChangerTablePoint.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -RatioTapChangerTablePoint::RatioTapChangerTablePoint() : RatioTapChangerTable(nullptr) {}; -RatioTapChangerTablePoint::~RatioTapChangerTablePoint() {}; +RatioTapChangerTablePoint::RatioTapChangerTablePoint() : RatioTapChangerTable(nullptr) {} +RatioTapChangerTablePoint::~RatioTapChangerTablePoint() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ RatioTapChangerTablePoint::getPossibleProfilesForAttributes() const return map; } - - bool assign_RatioTapChangerTable_RatioTapChangerTablePoint(BaseClass*, BaseClass*); bool assign_RatioTapChangerTablePoint_RatioTapChangerTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_RatioTapChangerTablePoint_RatioTapChangerTable(BaseClass* BaseClass_ return false; } - bool get_RatioTapChangerTablePoint_RatioTapChangerTable(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RatioTapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + const RatioTapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->RatioTapChangerTable != 0) { @@ -73,7 +71,6 @@ bool get_RatioTapChangerTablePoint_RatioTapChangerTable(const BaseClass* BaseCla return false; } - const char RatioTapChangerTablePoint::debugName[] = "RatioTapChangerTablePoint"; const char* RatioTapChangerTablePoint::debugString() const { @@ -82,7 +79,7 @@ const char* RatioTapChangerTablePoint::debugString() const void RatioTapChangerTablePoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RatioTapChangerTablePoint"), &RatioTapChangerTablePoint_factory)); + factory_map.emplace("cim:RatioTapChangerTablePoint", &RatioTapChangerTablePoint_factory); } void RatioTapChangerTablePoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void RatioTapChangerTablePoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RatioTapChangerTablePoint.RatioTapChangerTable"), &assign_RatioTapChangerTablePoint_RatioTapChangerTable)); + assign_map.emplace("cim:RatioTapChangerTablePoint.RatioTapChangerTable", &assign_RatioTapChangerTablePoint_RatioTapChangerTable); } void RatioTapChangerTablePoint::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/RatioTapChangerTablePoint.hpp b/CGMES_2.4.15_27JAN2020/RatioTapChangerTablePoint.hpp index fb2c87124..a2a695328 100644 --- a/CGMES_2.4.15_27JAN2020/RatioTapChangerTablePoint.hpp +++ b/CGMES_2.4.15_27JAN2020/RatioTapChangerTablePoint.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class RatioTapChangerTable; - /* - Describes each tap step in the ratio tap changer tabular curve. - */ + /** \brief Describes each tap step in the ratio tap changer tabular curve. */ class RatioTapChangerTablePoint : public TapChangerTablePoint { public: @@ -27,7 +25,8 @@ namespace CIMPP RatioTapChangerTablePoint(); ~RatioTapChangerTablePoint() override; - CIMPP::RatioTapChangerTable* RatioTapChangerTable; /* Points of this table. Default: 0 */ + /** \brief Points of this table. Default: 0 */ + CIMPP::RatioTapChangerTable* RatioTapChangerTable; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Reactance.hpp b/CGMES_2.4.15_27JAN2020/Reactance.hpp index a811d499a..e49646947 100644 --- a/CGMES_2.4.15_27JAN2020/Reactance.hpp +++ b/CGMES_2.4.15_27JAN2020/Reactance.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Reactance (imaginary part of impedance), at rated frequency. - */ + /** \brief Reactance (imaginary part of impedance), at rated frequency. */ class Reactance { public: diff --git a/CGMES_2.4.15_27JAN2020/ReactiveCapabilityCurve.cpp b/CGMES_2.4.15_27JAN2020/ReactiveCapabilityCurve.cpp index e82001919..5d3fe1f54 100644 --- a/CGMES_2.4.15_27JAN2020/ReactiveCapabilityCurve.cpp +++ b/CGMES_2.4.15_27JAN2020/ReactiveCapabilityCurve.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ReactiveCapabilityCurve::ReactiveCapabilityCurve() {}; -ReactiveCapabilityCurve::~ReactiveCapabilityCurve() {}; +ReactiveCapabilityCurve::ReactiveCapabilityCurve() {} +ReactiveCapabilityCurve::~ReactiveCapabilityCurve() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ ReactiveCapabilityCurve::getPossibleProfilesForAttributes() const return map; } - - bool assign_EquivalentInjection_ReactiveCapabilityCurve(BaseClass*, BaseClass*); bool assign_ReactiveCapabilityCurve_EquivalentInjection(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_ReactiveCapabilityCurve_EquivalentInjection(BaseClass* BaseClass_ptr } return false; } + bool assign_SynchronousMachine_InitialReactiveCapabilityCurve(BaseClass*, BaseClass*); bool assign_ReactiveCapabilityCurve_InitiallyUsedBySynchronousMachines(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -87,7 +86,7 @@ const char* ReactiveCapabilityCurve::debugString() const void ReactiveCapabilityCurve::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ReactiveCapabilityCurve"), &ReactiveCapabilityCurve_factory)); + factory_map.emplace("cim:ReactiveCapabilityCurve", &ReactiveCapabilityCurve_factory); } void ReactiveCapabilityCurve::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -96,8 +95,8 @@ void ReactiveCapabilityCurve::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ReactiveCapabilityCurve.EquivalentInjection"), &assign_ReactiveCapabilityCurve_EquivalentInjection)); - assign_map.insert(std::make_pair(std::string("cim:ReactiveCapabilityCurve.InitiallyUsedBySynchronousMachines"), &assign_ReactiveCapabilityCurve_InitiallyUsedBySynchronousMachines)); + assign_map.emplace("cim:ReactiveCapabilityCurve.EquivalentInjection", &assign_ReactiveCapabilityCurve_EquivalentInjection); + assign_map.emplace("cim:ReactiveCapabilityCurve.InitiallyUsedBySynchronousMachines", &assign_ReactiveCapabilityCurve_InitiallyUsedBySynchronousMachines); } void ReactiveCapabilityCurve::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/ReactiveCapabilityCurve.hpp b/CGMES_2.4.15_27JAN2020/ReactiveCapabilityCurve.hpp index 26c52f7e3..e843629e2 100644 --- a/CGMES_2.4.15_27JAN2020/ReactiveCapabilityCurve.hpp +++ b/CGMES_2.4.15_27JAN2020/ReactiveCapabilityCurve.hpp @@ -18,9 +18,7 @@ namespace CIMPP class EquivalentInjection; class SynchronousMachine; - /* - Reactive power rating envelope versus the synchronous machine's active power, in both the generating and motoring modes. For each active power value there is a corresponding high and low reactive power limit value. Typically there will be a separate curve for each coolant condition, such as hydrogen pressure. The Y1 axis values represent reactive minimum and the Y2 axis values represent reactive maximum. - */ + /** \brief Reactive power rating envelope versus the synchronous machine's active power, in both the generating and motoring modes. For each active power value there is a corresponding high and low reactive power limit value. Typically there will be a separate curve for each coolant condition, such as hydrogen pressure. The Y1 axis values represent reactive minimum and the Y2 axis values represent reactive maximum. */ class ReactiveCapabilityCurve : public Curve { public: @@ -28,8 +26,11 @@ namespace CIMPP ReactiveCapabilityCurve(); ~ReactiveCapabilityCurve() override; - std::list EquivalentInjection; /* The reactive capability curve used by this equivalent injection. Default: 0 */ - std::list InitiallyUsedBySynchronousMachines; /* The default reactive capability curve for use by a synchronous machine. Default: 0 */ + /** \brief The reactive capability curve used by this equivalent injection. Default: 0 */ + std::list EquivalentInjection; + + /** \brief The default reactive capability curve for use by a synchronous machine. Default: 0 */ + std::list InitiallyUsedBySynchronousMachines; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ReactivePower.hpp b/CGMES_2.4.15_27JAN2020/ReactivePower.hpp index e80659b92..28e434b24 100644 --- a/CGMES_2.4.15_27JAN2020/ReactivePower.hpp +++ b/CGMES_2.4.15_27JAN2020/ReactivePower.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Product of RMS value of the voltage and the RMS value of the quadrature component of the current. - */ + /** \brief Product of RMS value of the voltage and the RMS value of the quadrature component of the current. */ class ReactivePower { public: diff --git a/CGMES_2.4.15_27JAN2020/RegularIntervalSchedule.cpp b/CGMES_2.4.15_27JAN2020/RegularIntervalSchedule.cpp index 28f390358..604197cd4 100644 --- a/CGMES_2.4.15_27JAN2020/RegularIntervalSchedule.cpp +++ b/CGMES_2.4.15_27JAN2020/RegularIntervalSchedule.cpp @@ -9,13 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "RegularTimePoint.hpp" -#include "DateTime.hpp" -#include "Seconds.hpp" using namespace CIMPP; -RegularIntervalSchedule::RegularIntervalSchedule() {}; -RegularIntervalSchedule::~RegularIntervalSchedule() {}; +RegularIntervalSchedule::RegularIntervalSchedule() {} +RegularIntervalSchedule::~RegularIntervalSchedule() {} static const std::list PossibleProfilesForClass = { @@ -44,54 +42,56 @@ RegularIntervalSchedule::getPossibleProfilesForAttributes() const return map; } - -bool assign_RegularIntervalSchedule_endTime(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegularTimePoint_IntervalSchedule(BaseClass*, BaseClass*); +bool assign_RegularIntervalSchedule_TimePoints(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + RegularTimePoint* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - element->endTime = buffer.str(); - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->TimePoints.begin(), element->TimePoints.end(), element2) == element->TimePoints.end()) + { + element->TimePoints.push_back(element2); + return assign_RegularTimePoint_IntervalSchedule(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_RegularIntervalSchedule_timeStep(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegularIntervalSchedule_endTime(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->timeStep; - if (buffer.fail()) - return false; - else + element->endTime = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_RegularTimePoint_IntervalSchedule(BaseClass*, BaseClass*); -bool assign_RegularIntervalSchedule_TimePoints(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_RegularIntervalSchedule_timeStep(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); - RegularTimePoint* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->TimePoints.begin(), element->TimePoints.end(), element2) == element->TimePoints.end()) + buffer >> element->timeStep; + if (!buffer.fail()) { - element->TimePoints.push_back(element2); - return assign_RegularTimePoint_IntervalSchedule(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_RegularIntervalSchedule_endTime(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + const RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->endTime; if (!buffer.str().empty()) @@ -105,7 +105,8 @@ bool get_RegularIntervalSchedule_endTime(const BaseClass* BaseClass_ptr1, std::s bool get_RegularIntervalSchedule_timeStep(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + const RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->timeStep; if (!buffer.str().empty()) @@ -117,8 +118,6 @@ bool get_RegularIntervalSchedule_timeStep(const BaseClass* BaseClass_ptr1, std:: return false; } - - const char RegularIntervalSchedule::debugName[] = "RegularIntervalSchedule"; const char* RegularIntervalSchedule::debugString() const { @@ -127,18 +126,18 @@ const char* RegularIntervalSchedule::debugString() const void RegularIntervalSchedule::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RegularIntervalSchedule"), &RegularIntervalSchedule_factory)); + factory_map.emplace("cim:RegularIntervalSchedule", &RegularIntervalSchedule_factory); } void RegularIntervalSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RegularIntervalSchedule.endTime"), &assign_RegularIntervalSchedule_endTime)); - assign_map.insert(std::make_pair(std::string("cim:RegularIntervalSchedule.timeStep"), &assign_RegularIntervalSchedule_timeStep)); + assign_map.emplace("cim:RegularIntervalSchedule.endTime", &assign_RegularIntervalSchedule_endTime); + assign_map.emplace("cim:RegularIntervalSchedule.timeStep", &assign_RegularIntervalSchedule_timeStep); } void RegularIntervalSchedule::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RegularIntervalSchedule.TimePoints"), &assign_RegularIntervalSchedule_TimePoints)); + assign_map.emplace("cim:RegularIntervalSchedule.TimePoints", &assign_RegularIntervalSchedule_TimePoints); } void RegularIntervalSchedule::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/RegularIntervalSchedule.hpp b/CGMES_2.4.15_27JAN2020/RegularIntervalSchedule.hpp index 95a998d55..d34235f88 100644 --- a/CGMES_2.4.15_27JAN2020/RegularIntervalSchedule.hpp +++ b/CGMES_2.4.15_27JAN2020/RegularIntervalSchedule.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class RegularTimePoint; - /* - The schedule has time points where the time between them is constant. - */ + /** \brief The schedule has time points where the time between them is constant. */ class RegularIntervalSchedule : public BasicIntervalSchedule { public: @@ -29,9 +27,14 @@ namespace CIMPP RegularIntervalSchedule(); ~RegularIntervalSchedule() override; - std::list TimePoints; /* The regular interval time point data values that define this schedule. Default: 0 */ - CIMPP::DateTime endTime; /* The time for the last time point. Default: '' */ - CIMPP::Seconds timeStep; /* The time between each pair of subsequent regular time points in sequence order. Default: nullptr */ + /** \brief The regular interval time point data values that define this schedule. Default: 0 */ + std::list TimePoints; + + /** \brief The time for the last time point. Default: '' */ + CIMPP::DateTime endTime; + + /** \brief The time between each pair of subsequent regular time points in sequence order. Default: nullptr */ + CIMPP::Seconds timeStep; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/RegularTimePoint.cpp b/CGMES_2.4.15_27JAN2020/RegularTimePoint.cpp index 500197fc4..5903ad467 100644 --- a/CGMES_2.4.15_27JAN2020/RegularTimePoint.cpp +++ b/CGMES_2.4.15_27JAN2020/RegularTimePoint.cpp @@ -9,14 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "RegularIntervalSchedule.hpp" -#include "Integer.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -RegularTimePoint::RegularTimePoint() : IntervalSchedule(nullptr) {}; -RegularTimePoint::~RegularTimePoint() {}; +RegularTimePoint::RegularTimePoint() : IntervalSchedule(nullptr) {} +RegularTimePoint::~RegularTimePoint() {} static const std::list PossibleProfilesForClass = { @@ -46,67 +43,83 @@ RegularTimePoint::getPossibleProfilesForAttributes() const return map; } +bool assign_RegularIntervalSchedule_TimePoints(BaseClass*, BaseClass*); +bool assign_RegularTimePoint_IntervalSchedule(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RegularTimePoint* element = dynamic_cast(BaseClass_ptr1); + RegularIntervalSchedule* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->IntervalSchedule != element2) + { + element->IntervalSchedule = element2; + return assign_RegularIntervalSchedule_TimePoints(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_RegularTimePoint_sequenceNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegularTimePoint_sequenceNumber(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RegularTimePoint* element = dynamic_cast(BaseClass_ptr1)) + RegularTimePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->sequenceNumber; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RegularTimePoint_value1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegularTimePoint_value1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RegularTimePoint* element = dynamic_cast(BaseClass_ptr1)) + RegularTimePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->value1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RegularTimePoint_value2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegularTimePoint_value2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RegularTimePoint* element = dynamic_cast(BaseClass_ptr1)) + RegularTimePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->value2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_RegularIntervalSchedule_TimePoints(BaseClass*, BaseClass*); -bool assign_RegularTimePoint_IntervalSchedule(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_RegularTimePoint_IntervalSchedule(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - RegularTimePoint* element = dynamic_cast(BaseClass_ptr1); - RegularIntervalSchedule* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const RegularTimePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->IntervalSchedule != element2) + if (element->IntervalSchedule != 0) { - element->IntervalSchedule = element2; - return assign_RegularIntervalSchedule_TimePoints(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->IntervalSchedule); + return true; } - return true; } return false; } bool get_RegularTimePoint_sequenceNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegularTimePoint* element = dynamic_cast(BaseClass_ptr1)) + const RegularTimePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->sequenceNumber; if (!buffer.str().empty()) @@ -120,7 +133,8 @@ bool get_RegularTimePoint_sequenceNumber(const BaseClass* BaseClass_ptr1, std::s bool get_RegularTimePoint_value1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegularTimePoint* element = dynamic_cast(BaseClass_ptr1)) + const RegularTimePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value1; if (!buffer.str().empty()) @@ -134,7 +148,8 @@ bool get_RegularTimePoint_value1(const BaseClass* BaseClass_ptr1, std::stringstr bool get_RegularTimePoint_value2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegularTimePoint* element = dynamic_cast(BaseClass_ptr1)) + const RegularTimePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value2; if (!buffer.str().empty()) @@ -146,21 +161,6 @@ bool get_RegularTimePoint_value2(const BaseClass* BaseClass_ptr1, std::stringstr return false; } - -bool get_RegularTimePoint_IntervalSchedule(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const RegularTimePoint* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->IntervalSchedule != 0) - { - BaseClass_list.push_back(element->IntervalSchedule); - return true; - } - } - return false; -} - - const char RegularTimePoint::debugName[] = "RegularTimePoint"; const char* RegularTimePoint::debugString() const { @@ -169,19 +169,19 @@ const char* RegularTimePoint::debugString() const void RegularTimePoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RegularTimePoint"), &RegularTimePoint_factory)); + factory_map.emplace("cim:RegularTimePoint", &RegularTimePoint_factory); } void RegularTimePoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RegularTimePoint.sequenceNumber"), &assign_RegularTimePoint_sequenceNumber)); - assign_map.insert(std::make_pair(std::string("cim:RegularTimePoint.value1"), &assign_RegularTimePoint_value1)); - assign_map.insert(std::make_pair(std::string("cim:RegularTimePoint.value2"), &assign_RegularTimePoint_value2)); + assign_map.emplace("cim:RegularTimePoint.sequenceNumber", &assign_RegularTimePoint_sequenceNumber); + assign_map.emplace("cim:RegularTimePoint.value1", &assign_RegularTimePoint_value1); + assign_map.emplace("cim:RegularTimePoint.value2", &assign_RegularTimePoint_value2); } void RegularTimePoint::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RegularTimePoint.IntervalSchedule"), &assign_RegularTimePoint_IntervalSchedule)); + assign_map.emplace("cim:RegularTimePoint.IntervalSchedule", &assign_RegularTimePoint_IntervalSchedule); } void RegularTimePoint::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/RegularTimePoint.hpp b/CGMES_2.4.15_27JAN2020/RegularTimePoint.hpp index 160814cc9..1d84dddda 100644 --- a/CGMES_2.4.15_27JAN2020/RegularTimePoint.hpp +++ b/CGMES_2.4.15_27JAN2020/RegularTimePoint.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class RegularIntervalSchedule; - /* - Time point for a schedule where the time between the consecutive points is constant. - */ + /** \brief Time point for a schedule where the time between the consecutive points is constant. */ class RegularTimePoint : public BaseClass { public: @@ -29,10 +27,17 @@ namespace CIMPP RegularTimePoint(); ~RegularTimePoint() override; - CIMPP::RegularIntervalSchedule* IntervalSchedule; /* Regular interval schedule containing this time point. Default: 0 */ - CIMPP::Integer sequenceNumber; /* The position of the regular time point in the sequence. Note that time points don`t have to be sequential, i.e. time points may be omitted. The actual time for a RegularTimePoint is computed by multiplying the associated regular interval schedule`s time step with the regular time point sequence number and adding the associated schedules start time. Default: 0 */ - CIMPP::Simple_Float value1; /* The first value at the time. The meaning of the value is defined by the derived type of the associated schedule. Default: nullptr */ - CIMPP::Simple_Float value2; /* The second value at the time. The meaning of the value is defined by the derived type of the associated schedule. Default: nullptr */ + /** \brief Regular interval schedule containing this time point. Default: 0 */ + CIMPP::RegularIntervalSchedule* IntervalSchedule; + + /** \brief The position of the regular time point in the sequence. Note that time points don`t have to be sequential, i.e. time points may be omitted. The actual time for a RegularTimePoint is computed by multiplying the associated regular interval schedule`s time step with the regular time point sequence number and adding the associated schedules start time. Default: 0 */ + CIMPP::Integer sequenceNumber; + + /** \brief The first value at the time. The meaning of the value is defined by the derived type of the associated schedule. Default: nullptr */ + CIMPP::Simple_Float value1; + + /** \brief The second value at the time. The meaning of the value is defined by the derived type of the associated schedule. Default: nullptr */ + CIMPP::Simple_Float value2; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/RegulatingCondEq.cpp b/CGMES_2.4.15_27JAN2020/RegulatingCondEq.cpp index 57a92235e..19a2d09e9 100644 --- a/CGMES_2.4.15_27JAN2020/RegulatingCondEq.cpp +++ b/CGMES_2.4.15_27JAN2020/RegulatingCondEq.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "RegulatingControl.hpp" -#include "Boolean.hpp" using namespace CIMPP; -RegulatingCondEq::RegulatingCondEq() : RegulatingControl(nullptr) {}; -RegulatingCondEq::~RegulatingCondEq() {}; +RegulatingCondEq::RegulatingCondEq() : RegulatingControl(nullptr) {} +RegulatingCondEq::~RegulatingCondEq() {} static const std::list PossibleProfilesForClass = { @@ -44,21 +43,6 @@ RegulatingCondEq::getPossibleProfilesForAttributes() const return map; } - -bool assign_RegulatingCondEq_controlEnabled(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (RegulatingCondEq* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->controlEnabled; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_RegulatingControl_RegulatingCondEq(BaseClass*, BaseClass*); bool assign_RegulatingCondEq_RegulatingControl(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -76,24 +60,24 @@ bool assign_RegulatingCondEq_RegulatingControl(BaseClass* BaseClass_ptr1, BaseCl return false; } -bool get_RegulatingCondEq_controlEnabled(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_RegulatingCondEq_controlEnabled(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const RegulatingCondEq* element = dynamic_cast(BaseClass_ptr1)) + RegulatingCondEq* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->controlEnabled; - if (!buffer.str().empty()) + buffer >> element->controlEnabled; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_RegulatingCondEq_RegulatingControl(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RegulatingCondEq* element = dynamic_cast(BaseClass_ptr1)) + const RegulatingCondEq* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->RegulatingControl != 0) { @@ -104,6 +88,20 @@ bool get_RegulatingCondEq_RegulatingControl(const BaseClass* BaseClass_ptr1, std return false; } +bool get_RegulatingCondEq_controlEnabled(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const RegulatingCondEq* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->controlEnabled; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char RegulatingCondEq::debugName[] = "RegulatingCondEq"; const char* RegulatingCondEq::debugString() const @@ -113,17 +111,17 @@ const char* RegulatingCondEq::debugString() const void RegulatingCondEq::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RegulatingCondEq"), &RegulatingCondEq_factory)); + factory_map.emplace("cim:RegulatingCondEq", &RegulatingCondEq_factory); } void RegulatingCondEq::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RegulatingCondEq.controlEnabled"), &assign_RegulatingCondEq_controlEnabled)); + assign_map.emplace("cim:RegulatingCondEq.controlEnabled", &assign_RegulatingCondEq_controlEnabled); } void RegulatingCondEq::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RegulatingCondEq.RegulatingControl"), &assign_RegulatingCondEq_RegulatingControl)); + assign_map.emplace("cim:RegulatingCondEq.RegulatingControl", &assign_RegulatingCondEq_RegulatingControl); } void RegulatingCondEq::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/RegulatingCondEq.hpp b/CGMES_2.4.15_27JAN2020/RegulatingCondEq.hpp index a18f5b481..9df3386a1 100644 --- a/CGMES_2.4.15_27JAN2020/RegulatingCondEq.hpp +++ b/CGMES_2.4.15_27JAN2020/RegulatingCondEq.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class RegulatingControl; - /* - A type of conducting equipment that can regulate a quantity (i.e. voltage or flow) at a specific point in the network. - */ + /** \brief A type of conducting equipment that can regulate a quantity (i.e. voltage or flow) at a specific point in the network. */ class RegulatingCondEq : public ConductingEquipment { public: @@ -28,8 +26,11 @@ namespace CIMPP RegulatingCondEq(); ~RegulatingCondEq() override; - CIMPP::RegulatingControl* RegulatingControl; /* The regulating control scheme in which this equipment participates. Default: 0 */ - CIMPP::Boolean controlEnabled; /* Specifies the regulation status of the equipment. True is regulating, false is not regulating. Default: false */ + /** \brief The regulating control scheme in which this equipment participates. Default: 0 */ + CIMPP::RegulatingControl* RegulatingControl; + + /** \brief Specifies the regulation status of the equipment. True is regulating, false is not regulating. Default: false */ + CIMPP::Boolean controlEnabled; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/RegulatingControl.cpp b/CGMES_2.4.15_27JAN2020/RegulatingControl.cpp index d892aad6c..7f14bad90 100644 --- a/CGMES_2.4.15_27JAN2020/RegulatingControl.cpp +++ b/CGMES_2.4.15_27JAN2020/RegulatingControl.cpp @@ -11,17 +11,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "RegulatingCondEq.hpp" #include "RegulationSchedule.hpp" #include "Terminal.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "RegulatingControlModeKind.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "UnitMultiplier.hpp" using namespace CIMPP; -RegulatingControl::RegulatingControl() : Terminal(nullptr) {}; -RegulatingControl::~RegulatingControl() {}; +RegulatingControl::RegulatingControl() : Terminal(nullptr) {} +RegulatingControl::~RegulatingControl() {} static const std::list PossibleProfilesForClass = { @@ -57,154 +51,163 @@ RegulatingControl::getPossibleProfilesForAttributes() const return map; } - -bool assign_RegulatingControl_discrete(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegulatingCondEq_RegulatingControl(BaseClass*, BaseClass*); +bool assign_RegulatingControl_RegulatingCondEq(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + RegulatingCondEq* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->discrete; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->RegulatingCondEq.begin(), element->RegulatingCondEq.end(), element2) == element->RegulatingCondEq.end()) + { + element->RegulatingCondEq.push_back(element2); + return assign_RegulatingCondEq_RegulatingControl(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_RegulatingControl_enabled(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegulationSchedule_RegulatingControl(BaseClass*, BaseClass*); +bool assign_RegulatingControl_RegulationSchedule(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + RegulationSchedule* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->enabled; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->RegulationSchedule.begin(), element->RegulationSchedule.end(), element2) == element->RegulationSchedule.end()) + { + element->RegulationSchedule.push_back(element2); + return assign_RegulationSchedule_RegulatingControl(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_RegulatingControl_mode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Terminal_RegulatingControl(BaseClass*, BaseClass*); +bool assign_RegulatingControl_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->mode; - if (buffer.fail()) - return false; - else - return true; + if (element->Terminal != element2) + { + element->Terminal = element2; + return assign_Terminal_RegulatingControl(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_RegulatingControl_targetDeadband(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegulatingControl_discrete(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->targetDeadband; - if (buffer.fail()) - return false; - else + buffer >> element->discrete; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RegulatingControl_targetValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegulatingControl_enabled(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->targetValue; - if (buffer.fail()) - return false; - else + buffer >> element->enabled; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RegulatingControl_targetValueUnitMultiplier(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegulatingControl_mode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->targetValueUnitMultiplier; - if (buffer.fail()) - return false; - else + buffer >> element->mode; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_RegulatingCondEq_RegulatingControl(BaseClass*, BaseClass*); -bool assign_RegulatingControl_RegulatingCondEq(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_RegulatingControl_targetDeadband(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { RegulatingControl* element = dynamic_cast(BaseClass_ptr1); - RegulatingCondEq* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->RegulatingCondEq.begin(), element->RegulatingCondEq.end(), element2) == element->RegulatingCondEq.end()) + buffer >> element->targetDeadband; + if (!buffer.fail()) { - element->RegulatingCondEq.push_back(element2); - return assign_RegulatingCondEq_RegulatingControl(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_RegulationSchedule_RegulatingControl(BaseClass*, BaseClass*); -bool assign_RegulatingControl_RegulationSchedule(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_RegulatingControl_targetValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { RegulatingControl* element = dynamic_cast(BaseClass_ptr1); - RegulationSchedule* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->RegulationSchedule.begin(), element->RegulationSchedule.end(), element2) == element->RegulationSchedule.end()) + buffer >> element->targetValue; + if (!buffer.fail()) { - element->RegulationSchedule.push_back(element2); - return assign_RegulationSchedule_RegulatingControl(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_Terminal_RegulatingControl(BaseClass*, BaseClass*); -bool assign_RegulatingControl_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_RegulatingControl_targetValueUnitMultiplier(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { RegulatingControl* element = dynamic_cast(BaseClass_ptr1); - Terminal* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->Terminal != element2) + buffer >> element->targetValueUnitMultiplier; + if (!buffer.fail()) { - element->Terminal = element2; - return assign_Terminal_RegulatingControl(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool get_RegulatingControl_discrete(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) + + +bool get_RegulatingControl_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + const RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->discrete; - if (!buffer.str().empty()) + if (element->Terminal != 0) { + BaseClass_list.push_back(element->Terminal); return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_RegulatingControl_enabled(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_RegulatingControl_discrete(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + const RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->enabled; + buffer << element->discrete; if (!buffer.str().empty()) { return true; @@ -214,11 +217,12 @@ bool get_RegulatingControl_enabled(const BaseClass* BaseClass_ptr1, std::strings return false; } -bool get_RegulatingControl_targetDeadband(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_RegulatingControl_enabled(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + const RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->targetDeadband; + buffer << element->enabled; if (!buffer.str().empty()) { return true; @@ -228,11 +232,12 @@ bool get_RegulatingControl_targetDeadband(const BaseClass* BaseClass_ptr1, std:: return false; } -bool get_RegulatingControl_targetValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_RegulatingControl_mode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + const RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->targetValue; + buffer << element->mode; if (!buffer.str().empty()) { return true; @@ -242,26 +247,27 @@ bool get_RegulatingControl_targetValue(const BaseClass* BaseClass_ptr1, std::str return false; } - -bool get_RegulatingControl_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) +bool get_RegulatingControl_targetDeadband(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + const RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->Terminal != 0) + buffer << element->targetDeadband; + if (!buffer.str().empty()) { - BaseClass_list.push_back(element->Terminal); return true; } } + buffer.setstate(std::ios::failbit); return false; } - -bool get_RegulatingControl_mode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_RegulatingControl_targetValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + const RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->mode; + buffer << element->targetValue; if (!buffer.str().empty()) { return true; @@ -273,7 +279,8 @@ bool get_RegulatingControl_mode(const BaseClass* BaseClass_ptr1, std::stringstre bool get_RegulatingControl_targetValueUnitMultiplier(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + const RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->targetValueUnitMultiplier; if (!buffer.str().empty()) @@ -293,24 +300,24 @@ const char* RegulatingControl::debugString() const void RegulatingControl::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RegulatingControl"), &RegulatingControl_factory)); + factory_map.emplace("cim:RegulatingControl", &RegulatingControl_factory); } void RegulatingControl::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.discrete"), &assign_RegulatingControl_discrete)); - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.enabled"), &assign_RegulatingControl_enabled)); - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.mode"), &assign_RegulatingControl_mode)); - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.targetDeadband"), &assign_RegulatingControl_targetDeadband)); - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.targetValue"), &assign_RegulatingControl_targetValue)); - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.targetValueUnitMultiplier"), &assign_RegulatingControl_targetValueUnitMultiplier)); + assign_map.emplace("cim:RegulatingControl.discrete", &assign_RegulatingControl_discrete); + assign_map.emplace("cim:RegulatingControl.enabled", &assign_RegulatingControl_enabled); + assign_map.emplace("cim:RegulatingControl.mode", &assign_RegulatingControl_mode); + assign_map.emplace("cim:RegulatingControl.targetDeadband", &assign_RegulatingControl_targetDeadband); + assign_map.emplace("cim:RegulatingControl.targetValue", &assign_RegulatingControl_targetValue); + assign_map.emplace("cim:RegulatingControl.targetValueUnitMultiplier", &assign_RegulatingControl_targetValueUnitMultiplier); } void RegulatingControl::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.RegulatingCondEq"), &assign_RegulatingControl_RegulatingCondEq)); - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.RegulationSchedule"), &assign_RegulatingControl_RegulationSchedule)); - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.Terminal"), &assign_RegulatingControl_Terminal)); + assign_map.emplace("cim:RegulatingControl.RegulatingCondEq", &assign_RegulatingControl_RegulatingCondEq); + assign_map.emplace("cim:RegulatingControl.RegulationSchedule", &assign_RegulatingControl_RegulationSchedule); + assign_map.emplace("cim:RegulatingControl.Terminal", &assign_RegulatingControl_Terminal); } void RegulatingControl::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/RegulatingControl.hpp b/CGMES_2.4.15_27JAN2020/RegulatingControl.hpp index 6b2c95eae..f6be989fc 100644 --- a/CGMES_2.4.15_27JAN2020/RegulatingControl.hpp +++ b/CGMES_2.4.15_27JAN2020/RegulatingControl.hpp @@ -23,9 +23,7 @@ namespace CIMPP class RegulationSchedule; class Terminal; - /* - Specifies a set of equipment that works together to control a power system quantity such as voltage or flow. Remote bus voltage control is possible by specifying the controlled terminal located at some place remote from the controlling equipment. In case multiple equipment, possibly of different types, control same terminal there must be only one RegulatingControl at that terminal. The most specific subtype of RegulatingControl shall be used in case such equipment participate in the control, e.g. TapChangerControl for tap changers. For flow control load sign convention is used, i.e. positive sign means flow out from a TopologicalNode (bus) into the conducting equipment. - */ + /** \brief Specifies a set of equipment that works together to control a power system quantity such as voltage or flow. Remote bus voltage control is possible by specifying the controlled terminal located at some place remote from the controlling equipment. In case multiple equipment, possibly of different types, control same terminal there must be only one RegulatingControl at that terminal. The most specific subtype of RegulatingControl shall be used in case such equipment participate in the control, e.g. TapChangerControl for tap changers. For flow control load sign convention is used, i.e. positive sign means flow out from a TopologicalNode (bus) into the conducting equipment. */ class RegulatingControl : public PowerSystemResource { public: @@ -33,15 +31,32 @@ namespace CIMPP RegulatingControl(); ~RegulatingControl() override; - std::list RegulatingCondEq; /* The equipment that participates in this regulating control scheme. Default: 0 */ - std::list RegulationSchedule; /* Schedule for this Regulating regulating control. Default: 0 */ - CIMPP::Terminal* Terminal; /* The controls regulating this terminal. Default: 0 */ - CIMPP::Boolean discrete; /* The regulation is performed in a discrete mode. This applies to equipment with discrete controls, e.g. tap changers and shunt compensators. Default: false */ - CIMPP::Boolean enabled; /* The flag tells if regulation is enabled. Default: false */ - CIMPP::RegulatingControlModeKind mode; /* The regulating control mode presently available. This specification allows for determining the kind of regulation without need for obtaining the units from a schedule. Default: 0 */ - CIMPP::Simple_Float targetDeadband; /* This is a deadband used with discrete control to avoid excessive update of controls like tap changers and shunt compensator banks while regulating. The units of those appropriate for the mode. Default: nullptr */ - CIMPP::Simple_Float targetValue; /* The target value specified for case input. This value can be used for the target value without the use of schedules. The value has the units appropriate to the mode attribute. Default: nullptr */ - CIMPP::UnitMultiplier targetValueUnitMultiplier; /* Specify the multiplier for used for the targetValue. Default: 0 */ + /** \brief The equipment that participates in this regulating control scheme. Default: 0 */ + std::list RegulatingCondEq; + + /** \brief Schedule for this Regulating regulating control. Default: 0 */ + std::list RegulationSchedule; + + /** \brief The controls regulating this terminal. Default: 0 */ + CIMPP::Terminal* Terminal; + + /** \brief The regulation is performed in a discrete mode. This applies to equipment with discrete controls, e.g. tap changers and shunt compensators. Default: false */ + CIMPP::Boolean discrete; + + /** \brief The flag tells if regulation is enabled. Default: false */ + CIMPP::Boolean enabled; + + /** \brief The regulating control mode presently available. This specification allows for determining the kind of regulation without need for obtaining the units from a schedule. Default: 0 */ + CIMPP::RegulatingControlModeKind mode; + + /** \brief This is a deadband used with discrete control to avoid excessive update of controls like tap changers and shunt compensator banks while regulating. The units of those appropriate for the mode. Default: nullptr */ + CIMPP::Simple_Float targetDeadband; + + /** \brief The target value specified for case input. This value can be used for the target value without the use of schedules. The value has the units appropriate to the mode attribute. Default: nullptr */ + CIMPP::Simple_Float targetValue; + + /** \brief Specify the multiplier for used for the targetValue. Default: 0 */ + CIMPP::UnitMultiplier targetValueUnitMultiplier; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/RegulatingControlModeKind.cpp b/CGMES_2.4.15_27JAN2020/RegulatingControlModeKind.cpp index 7ac923d24..e30b5adcc 100644 --- a/CGMES_2.4.15_27JAN2020/RegulatingControlModeKind.cpp +++ b/CGMES_2.4.15_27JAN2020/RegulatingControlModeKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "RegulatingControlModeKind") + if (EnumSymbol.substr(0, pos) != "RegulatingControlModeKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,42 +50,42 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "voltage") + if (EnumSymbol == "voltage") { rop = RegulatingControlModeKind::voltage; return lop; } - if(EnumSymbol == "activePower") + if (EnumSymbol == "activePower") { rop = RegulatingControlModeKind::activePower; return lop; } - if(EnumSymbol == "reactivePower") + if (EnumSymbol == "reactivePower") { rop = RegulatingControlModeKind::reactivePower; return lop; } - if(EnumSymbol == "currentFlow") + if (EnumSymbol == "currentFlow") { rop = RegulatingControlModeKind::currentFlow; return lop; } - if(EnumSymbol == "admittance") + if (EnumSymbol == "admittance") { rop = RegulatingControlModeKind::admittance; return lop; } - if(EnumSymbol == "timeScheduled") + if (EnumSymbol == "timeScheduled") { rop = RegulatingControlModeKind::timeScheduled; return lop; } - if(EnumSymbol == "temperature") + if (EnumSymbol == "temperature") { rop = RegulatingControlModeKind::temperature; return lop; } - if(EnumSymbol == "powerFactor") + if (EnumSymbol == "powerFactor") { rop = RegulatingControlModeKind::powerFactor; return lop; diff --git a/CGMES_2.4.15_27JAN2020/RegulatingControlModeKind.hpp b/CGMES_2.4.15_27JAN2020/RegulatingControlModeKind.hpp index ed5351e3e..d47d046cd 100644 --- a/CGMES_2.4.15_27JAN2020/RegulatingControlModeKind.hpp +++ b/CGMES_2.4.15_27JAN2020/RegulatingControlModeKind.hpp @@ -9,45 +9,27 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The kind of regulation model. For example regulating voltage, reactive power, active power, etc. - */ + /** \brief The kind of regulation model. For example regulating voltage, reactive power, active power, etc. */ class RegulatingControlModeKind { public: enum RegulatingControlModeKind_ENUM { - /** - * Voltage is specified. - */ + /** Voltage is specified. */ voltage, - /** - * Active power is specified. - */ + /** Active power is specified. */ activePower, - /** - * Reactive power is specified. - */ + /** Reactive power is specified. */ reactivePower, - /** - * Current flow is specified. - */ + /** Current flow is specified. */ currentFlow, - /** - * Admittance is specified. - */ + /** Admittance is specified. */ admittance, - /** - * Control switches on/off by time of day. The times may change on the weekend, or in different seasons. - */ + /** Control switches on/off by time of day. The times may change on the weekend, or in different seasons. */ timeScheduled, - /** - * Control switches on/off based on the local temperature (i.e., a thermostat). - */ + /** Control switches on/off based on the local temperature (i.e., a thermostat). */ temperature, - /** - * Power factor is specified. - */ + /** Power factor is specified. */ powerFactor, }; diff --git a/CGMES_2.4.15_27JAN2020/RegulationSchedule.cpp b/CGMES_2.4.15_27JAN2020/RegulationSchedule.cpp index 521188f5f..8750abb1a 100644 --- a/CGMES_2.4.15_27JAN2020/RegulationSchedule.cpp +++ b/CGMES_2.4.15_27JAN2020/RegulationSchedule.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -RegulationSchedule::RegulationSchedule() : RegulatingControl(nullptr) {}; -RegulationSchedule::~RegulationSchedule() {}; +RegulationSchedule::RegulationSchedule() : RegulatingControl(nullptr) {} +RegulationSchedule::~RegulationSchedule() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ RegulationSchedule::getPossibleProfilesForAttributes() const return map; } - - bool assign_RegulatingControl_RegulationSchedule(BaseClass*, BaseClass*); bool assign_RegulationSchedule_RegulatingControl(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_RegulationSchedule_RegulatingControl(BaseClass* BaseClass_ptr1, Base return false; } - bool get_RegulationSchedule_RegulatingControl(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RegulationSchedule* element = dynamic_cast(BaseClass_ptr1)) + const RegulationSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->RegulatingControl != 0) { @@ -73,7 +71,6 @@ bool get_RegulationSchedule_RegulatingControl(const BaseClass* BaseClass_ptr1, s return false; } - const char RegulationSchedule::debugName[] = "RegulationSchedule"; const char* RegulationSchedule::debugString() const { @@ -82,7 +79,7 @@ const char* RegulationSchedule::debugString() const void RegulationSchedule::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RegulationSchedule"), &RegulationSchedule_factory)); + factory_map.emplace("cim:RegulationSchedule", &RegulationSchedule_factory); } void RegulationSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void RegulationSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RegulationSchedule.RegulatingControl"), &assign_RegulationSchedule_RegulatingControl)); + assign_map.emplace("cim:RegulationSchedule.RegulatingControl", &assign_RegulationSchedule_RegulatingControl); } void RegulationSchedule::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/RegulationSchedule.hpp b/CGMES_2.4.15_27JAN2020/RegulationSchedule.hpp index 14d6d58f9..4b0f45cec 100644 --- a/CGMES_2.4.15_27JAN2020/RegulationSchedule.hpp +++ b/CGMES_2.4.15_27JAN2020/RegulationSchedule.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class RegulatingControl; - /* - A pre-established pattern over time for a controlled variable, e.g., busbar voltage. - */ + /** \brief A pre-established pattern over time for a controlled variable, e.g., busbar voltage. */ class RegulationSchedule : public SeasonDayTypeSchedule { public: @@ -27,7 +25,8 @@ namespace CIMPP RegulationSchedule(); ~RegulationSchedule() override; - CIMPP::RegulatingControl* RegulatingControl; /* Regulating controls that have this Schedule. Default: 0 */ + /** \brief Regulating controls that have this Schedule. Default: 0 */ + CIMPP::RegulatingControl* RegulatingControl; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/RemoteInputSignal.cpp b/CGMES_2.4.15_27JAN2020/RemoteInputSignal.cpp index f5926461c..f187b941e 100644 --- a/CGMES_2.4.15_27JAN2020/RemoteInputSignal.cpp +++ b/CGMES_2.4.15_27JAN2020/RemoteInputSignal.cpp @@ -17,12 +17,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindPlantDynamics.hpp" #include "WindTurbineType1or2Dynamics.hpp" #include "WindTurbineType3or4Dynamics.hpp" -#include "RemoteSignalKind.hpp" using namespace CIMPP; -RemoteInputSignal::RemoteInputSignal() : DiscontinuousExcitationControlDynamics(nullptr), PFVArControllerType1Dynamics(nullptr), PowerSystemStabilizerDynamics(nullptr), Terminal(nullptr), UnderexcitationLimiterDynamics(nullptr), VoltageCompensatorDynamics(nullptr), WindPlantDynamics(nullptr), WindTurbineType1or2Dynamics(nullptr), WindTurbineType3or4Dynamics(nullptr) {}; -RemoteInputSignal::~RemoteInputSignal() {}; +RemoteInputSignal::RemoteInputSignal() : DiscontinuousExcitationControlDynamics(nullptr), PFVArControllerType1Dynamics(nullptr), PowerSystemStabilizerDynamics(nullptr), Terminal(nullptr), UnderexcitationLimiterDynamics(nullptr), VoltageCompensatorDynamics(nullptr), WindPlantDynamics(nullptr), WindTurbineType1or2Dynamics(nullptr), WindTurbineType3or4Dynamics(nullptr) {} +RemoteInputSignal::~RemoteInputSignal() {} static const std::list PossibleProfilesForClass = { @@ -58,21 +57,6 @@ RemoteInputSignal::getPossibleProfilesForAttributes() const return map; } - -bool assign_RemoteInputSignal_remoteSignalType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->remoteSignalType; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_DiscontinuousExcitationControlDynamics_RemoteInputSignal(BaseClass*, BaseClass*); bool assign_RemoteInputSignal_DiscontinuousExcitationControlDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -89,6 +73,7 @@ bool assign_RemoteInputSignal_DiscontinuousExcitationControlDynamics(BaseClass* } return false; } + bool assign_PFVArControllerType1Dynamics_RemoteInputSignal(BaseClass*, BaseClass*); bool assign_RemoteInputSignal_PFVArControllerType1Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -105,6 +90,7 @@ bool assign_RemoteInputSignal_PFVArControllerType1Dynamics(BaseClass* BaseClass_ } return false; } + bool assign_PowerSystemStabilizerDynamics_RemoteInputSignal(BaseClass*, BaseClass*); bool assign_RemoteInputSignal_PowerSystemStabilizerDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -121,6 +107,7 @@ bool assign_RemoteInputSignal_PowerSystemStabilizerDynamics(BaseClass* BaseClass } return false; } + bool assign_Terminal_RemoteInputSignal(BaseClass*, BaseClass*); bool assign_RemoteInputSignal_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -137,6 +124,7 @@ bool assign_RemoteInputSignal_Terminal(BaseClass* BaseClass_ptr1, BaseClass* Bas } return false; } + bool assign_UnderexcitationLimiterDynamics_RemoteInputSignal(BaseClass*, BaseClass*); bool assign_RemoteInputSignal_UnderexcitationLimiterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -153,6 +141,7 @@ bool assign_RemoteInputSignal_UnderexcitationLimiterDynamics(BaseClass* BaseClas } return false; } + bool assign_VoltageCompensatorDynamics_RemoteInputSignal(BaseClass*, BaseClass*); bool assign_RemoteInputSignal_VoltageCompensatorDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -169,6 +158,7 @@ bool assign_RemoteInputSignal_VoltageCompensatorDynamics(BaseClass* BaseClass_pt } return false; } + bool assign_WindPlantDynamics_RemoteInputSignal(BaseClass*, BaseClass*); bool assign_RemoteInputSignal_WindPlantDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -185,6 +175,7 @@ bool assign_RemoteInputSignal_WindPlantDynamics(BaseClass* BaseClass_ptr1, BaseC } return false; } + bool assign_WindTurbineType1or2Dynamics_RemoteInputSignal(BaseClass*, BaseClass*); bool assign_RemoteInputSignal_WindTurbineType1or2Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -201,6 +192,7 @@ bool assign_RemoteInputSignal_WindTurbineType1or2Dynamics(BaseClass* BaseClass_p } return false; } + bool assign_WindTurbineType3or4Dynamics_RemoteInputSignal(BaseClass*, BaseClass*); bool assign_RemoteInputSignal_WindTurbineType3or4Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -218,10 +210,24 @@ bool assign_RemoteInputSignal_WindTurbineType3or4Dynamics(BaseClass* BaseClass_p return false; } +bool assign_RemoteInputSignal_remoteSignalType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->remoteSignalType; + if (!buffer.fail()) + { + return true; + } + } + return false; +} bool get_RemoteInputSignal_DiscontinuousExcitationControlDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1)) + const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DiscontinuousExcitationControlDynamics != 0) { @@ -234,7 +240,8 @@ bool get_RemoteInputSignal_DiscontinuousExcitationControlDynamics(const BaseClas bool get_RemoteInputSignal_PFVArControllerType1Dynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1)) + const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PFVArControllerType1Dynamics != 0) { @@ -247,7 +254,8 @@ bool get_RemoteInputSignal_PFVArControllerType1Dynamics(const BaseClass* BaseCla bool get_RemoteInputSignal_PowerSystemStabilizerDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1)) + const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PowerSystemStabilizerDynamics != 0) { @@ -260,7 +268,8 @@ bool get_RemoteInputSignal_PowerSystemStabilizerDynamics(const BaseClass* BaseCl bool get_RemoteInputSignal_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1)) + const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Terminal != 0) { @@ -273,7 +282,8 @@ bool get_RemoteInputSignal_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1)) + const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->UnderexcitationLimiterDynamics != 0) { @@ -286,7 +296,8 @@ bool get_RemoteInputSignal_UnderexcitationLimiterDynamics(const BaseClass* BaseC bool get_RemoteInputSignal_VoltageCompensatorDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1)) + const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->VoltageCompensatorDynamics != 0) { @@ -298,9 +309,12 @@ bool get_RemoteInputSignal_VoltageCompensatorDynamics(const BaseClass* BaseClass } + + bool get_RemoteInputSignal_remoteSignalType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1)) + const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->remoteSignalType; if (!buffer.str().empty()) @@ -320,25 +334,25 @@ const char* RemoteInputSignal::debugString() const void RemoteInputSignal::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RemoteInputSignal"), &RemoteInputSignal_factory)); + factory_map.emplace("cim:RemoteInputSignal", &RemoteInputSignal_factory); } void RemoteInputSignal::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.remoteSignalType"), &assign_RemoteInputSignal_remoteSignalType)); + assign_map.emplace("cim:RemoteInputSignal.remoteSignalType", &assign_RemoteInputSignal_remoteSignalType); } void RemoteInputSignal::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.DiscontinuousExcitationControlDynamics"), &assign_RemoteInputSignal_DiscontinuousExcitationControlDynamics)); - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.PFVArControllerType1Dynamics"), &assign_RemoteInputSignal_PFVArControllerType1Dynamics)); - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.PowerSystemStabilizerDynamics"), &assign_RemoteInputSignal_PowerSystemStabilizerDynamics)); - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.Terminal"), &assign_RemoteInputSignal_Terminal)); - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.UnderexcitationLimiterDynamics"), &assign_RemoteInputSignal_UnderexcitationLimiterDynamics)); - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.VoltageCompensatorDynamics"), &assign_RemoteInputSignal_VoltageCompensatorDynamics)); - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.WindPlantDynamics"), &assign_RemoteInputSignal_WindPlantDynamics)); - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.WindTurbineType1or2Dynamics"), &assign_RemoteInputSignal_WindTurbineType1or2Dynamics)); - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.WindTurbineType3or4Dynamics"), &assign_RemoteInputSignal_WindTurbineType3or4Dynamics)); + assign_map.emplace("cim:RemoteInputSignal.DiscontinuousExcitationControlDynamics", &assign_RemoteInputSignal_DiscontinuousExcitationControlDynamics); + assign_map.emplace("cim:RemoteInputSignal.PFVArControllerType1Dynamics", &assign_RemoteInputSignal_PFVArControllerType1Dynamics); + assign_map.emplace("cim:RemoteInputSignal.PowerSystemStabilizerDynamics", &assign_RemoteInputSignal_PowerSystemStabilizerDynamics); + assign_map.emplace("cim:RemoteInputSignal.Terminal", &assign_RemoteInputSignal_Terminal); + assign_map.emplace("cim:RemoteInputSignal.UnderexcitationLimiterDynamics", &assign_RemoteInputSignal_UnderexcitationLimiterDynamics); + assign_map.emplace("cim:RemoteInputSignal.VoltageCompensatorDynamics", &assign_RemoteInputSignal_VoltageCompensatorDynamics); + assign_map.emplace("cim:RemoteInputSignal.WindPlantDynamics", &assign_RemoteInputSignal_WindPlantDynamics); + assign_map.emplace("cim:RemoteInputSignal.WindTurbineType1or2Dynamics", &assign_RemoteInputSignal_WindTurbineType1or2Dynamics); + assign_map.emplace("cim:RemoteInputSignal.WindTurbineType3or4Dynamics", &assign_RemoteInputSignal_WindTurbineType3or4Dynamics); } void RemoteInputSignal::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/RemoteInputSignal.hpp b/CGMES_2.4.15_27JAN2020/RemoteInputSignal.hpp index 30da288a7..f33baab80 100644 --- a/CGMES_2.4.15_27JAN2020/RemoteInputSignal.hpp +++ b/CGMES_2.4.15_27JAN2020/RemoteInputSignal.hpp @@ -26,9 +26,7 @@ namespace CIMPP class WindTurbineType1or2Dynamics; class WindTurbineType3or4Dynamics; - /* - Supports connection to a terminal associated with a remote bus from which an input signal of a specific type is coming. - */ + /** \brief Supports connection to a terminal associated with a remote bus from which an input signal of a specific type is coming. */ class RemoteInputSignal : public IdentifiedObject { public: @@ -36,16 +34,35 @@ namespace CIMPP RemoteInputSignal(); ~RemoteInputSignal() override; - CIMPP::DiscontinuousExcitationControlDynamics* DiscontinuousExcitationControlDynamics; /* Discontinuous excitation control model using this remote input signal. Default: 0 */ - CIMPP::PFVArControllerType1Dynamics* PFVArControllerType1Dynamics; /* Power Factor or VAr controller Type I model using this remote input signal. Default: 0 */ - CIMPP::PowerSystemStabilizerDynamics* PowerSystemStabilizerDynamics; /* Power system stabilizer model using this remote input signal. Default: 0 */ - CIMPP::Terminal* Terminal; /* Remote terminal with which this input signal is associated. Default: 0 */ - CIMPP::UnderexcitationLimiterDynamics* UnderexcitationLimiterDynamics; /* Underexcitation limiter model using this remote input signal. Default: 0 */ - CIMPP::VoltageCompensatorDynamics* VoltageCompensatorDynamics; /* Voltage compensator model using this remote input signal. Default: 0 */ - CIMPP::WindPlantDynamics* WindPlantDynamics; /* The remote signal with which this power plant is associated. Default: 0 */ - CIMPP::WindTurbineType1or2Dynamics* WindTurbineType1or2Dynamics; /* Wind generator Type 1 or Type 2 model using this remote input signal. Default: 0 */ - CIMPP::WindTurbineType3or4Dynamics* WindTurbineType3or4Dynamics; /* Remote input signal used by these wind turbine Type 3 or 4 models. Default: 0 */ - CIMPP::RemoteSignalKind remoteSignalType; /* Type of input signal. Default: 0 */ + /** \brief Discontinuous excitation control model using this remote input signal. Default: 0 */ + CIMPP::DiscontinuousExcitationControlDynamics* DiscontinuousExcitationControlDynamics; + + /** \brief Power Factor or VAr controller Type I model using this remote input signal. Default: 0 */ + CIMPP::PFVArControllerType1Dynamics* PFVArControllerType1Dynamics; + + /** \brief Power system stabilizer model using this remote input signal. Default: 0 */ + CIMPP::PowerSystemStabilizerDynamics* PowerSystemStabilizerDynamics; + + /** \brief Remote terminal with which this input signal is associated. Default: 0 */ + CIMPP::Terminal* Terminal; + + /** \brief Underexcitation limiter model using this remote input signal. Default: 0 */ + CIMPP::UnderexcitationLimiterDynamics* UnderexcitationLimiterDynamics; + + /** \brief Voltage compensator model using this remote input signal. Default: 0 */ + CIMPP::VoltageCompensatorDynamics* VoltageCompensatorDynamics; + + /** \brief The remote signal with which this power plant is associated. Default: 0 */ + CIMPP::WindPlantDynamics* WindPlantDynamics; + + /** \brief Wind generator Type 1 or Type 2 model using this remote input signal. Default: 0 */ + CIMPP::WindTurbineType1or2Dynamics* WindTurbineType1or2Dynamics; + + /** \brief Remote input signal used by these wind turbine Type 3 or 4 models. Default: 0 */ + CIMPP::WindTurbineType3or4Dynamics* WindTurbineType3or4Dynamics; + + /** \brief Type of input signal. Default: 0 */ + CIMPP::RemoteSignalKind remoteSignalType; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/RemoteSignalKind.cpp b/CGMES_2.4.15_27JAN2020/RemoteSignalKind.cpp index e1cd4d2e7..a5b95bd01 100644 --- a/CGMES_2.4.15_27JAN2020/RemoteSignalKind.cpp +++ b/CGMES_2.4.15_27JAN2020/RemoteSignalKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "RemoteSignalKind") + if (EnumSymbol.substr(0, pos) != "RemoteSignalKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,47 +50,47 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "remoteBusVoltageFrequency") + if (EnumSymbol == "remoteBusVoltageFrequency") { rop = RemoteSignalKind::remoteBusVoltageFrequency; return lop; } - if(EnumSymbol == "remoteBusVoltageFrequencyDeviation") + if (EnumSymbol == "remoteBusVoltageFrequencyDeviation") { rop = RemoteSignalKind::remoteBusVoltageFrequencyDeviation; return lop; } - if(EnumSymbol == "remoteBusFrequency") + if (EnumSymbol == "remoteBusFrequency") { rop = RemoteSignalKind::remoteBusFrequency; return lop; } - if(EnumSymbol == "remoteBusFrequencyDeviation") + if (EnumSymbol == "remoteBusFrequencyDeviation") { rop = RemoteSignalKind::remoteBusFrequencyDeviation; return lop; } - if(EnumSymbol == "remoteBusVoltageAmplitude") + if (EnumSymbol == "remoteBusVoltageAmplitude") { rop = RemoteSignalKind::remoteBusVoltageAmplitude; return lop; } - if(EnumSymbol == "remoteBusVoltage") + if (EnumSymbol == "remoteBusVoltage") { rop = RemoteSignalKind::remoteBusVoltage; return lop; } - if(EnumSymbol == "remoteBranchCurrentAmplitude") + if (EnumSymbol == "remoteBranchCurrentAmplitude") { rop = RemoteSignalKind::remoteBranchCurrentAmplitude; return lop; } - if(EnumSymbol == "remoteBusVoltageAmplitudeDerivative") + if (EnumSymbol == "remoteBusVoltageAmplitudeDerivative") { rop = RemoteSignalKind::remoteBusVoltageAmplitudeDerivative; return lop; } - if(EnumSymbol == "remotePuBusVoltageDerivative") + if (EnumSymbol == "remotePuBusVoltageDerivative") { rop = RemoteSignalKind::remotePuBusVoltageDerivative; return lop; diff --git a/CGMES_2.4.15_27JAN2020/RemoteSignalKind.hpp b/CGMES_2.4.15_27JAN2020/RemoteSignalKind.hpp index 17a1358d3..ebdf3d268 100644 --- a/CGMES_2.4.15_27JAN2020/RemoteSignalKind.hpp +++ b/CGMES_2.4.15_27JAN2020/RemoteSignalKind.hpp @@ -9,49 +9,29 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of input signal coming from remote bus. - */ + /** \brief Type of input signal coming from remote bus. */ class RemoteSignalKind { public: enum RemoteSignalKind_ENUM { - /** - * Input is voltage frequency from remote terminal bus. - */ + /** Input is voltage frequency from remote terminal bus. */ remoteBusVoltageFrequency, - /** - * Input is voltage frequency deviation from remote terminal bus. - */ + /** Input is voltage frequency deviation from remote terminal bus. */ remoteBusVoltageFrequencyDeviation, - /** - * Input is frequency from remote terminal bus. - */ + /** Input is frequency from remote terminal bus. */ remoteBusFrequency, - /** - * Input is frequency deviation from remote terminal bus. - */ + /** Input is frequency deviation from remote terminal bus. */ remoteBusFrequencyDeviation, - /** - * Input is voltage amplitude from remote terminal bus. - */ + /** Input is voltage amplitude from remote terminal bus. */ remoteBusVoltageAmplitude, - /** - * Input is voltage from remote terminal bus. - */ + /** Input is voltage from remote terminal bus. */ remoteBusVoltage, - /** - * Input is branch current amplitude from remote terminal bus. - */ + /** Input is branch current amplitude from remote terminal bus. */ remoteBranchCurrentAmplitude, - /** - * Input is branch current amplitude derivative from remote terminal bus. - */ + /** Input is branch current amplitude derivative from remote terminal bus. */ remoteBusVoltageAmplitudeDerivative, - /** - * Input is PU voltage derivative from remote terminal bus. - */ + /** Input is PU voltage derivative from remote terminal bus. */ remotePuBusVoltageDerivative, }; diff --git a/CGMES_2.4.15_27JAN2020/ReportingGroup.cpp b/CGMES_2.4.15_27JAN2020/ReportingGroup.cpp index bb65d3090..5a8463cce 100644 --- a/CGMES_2.4.15_27JAN2020/ReportingGroup.cpp +++ b/CGMES_2.4.15_27JAN2020/ReportingGroup.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ReportingGroup::ReportingGroup() {}; -ReportingGroup::~ReportingGroup() {}; +ReportingGroup::ReportingGroup() {} +ReportingGroup::~ReportingGroup() {} static const std::list PossibleProfilesForClass = { @@ -43,8 +43,6 @@ ReportingGroup::getPossibleProfilesForAttributes() const return map; } - - bool assign_BusNameMarker_ReportingGroup(BaseClass*, BaseClass*); bool assign_ReportingGroup_BusNameMarker(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,6 +59,7 @@ bool assign_ReportingGroup_BusNameMarker(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_TopologicalNode_ReportingGroup(BaseClass*, BaseClass*); bool assign_ReportingGroup_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -88,7 +87,7 @@ const char* ReportingGroup::debugString() const void ReportingGroup::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ReportingGroup"), &ReportingGroup_factory)); + factory_map.emplace("cim:ReportingGroup", &ReportingGroup_factory); } void ReportingGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -97,8 +96,8 @@ void ReportingGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ReportingGroup.BusNameMarker"), &assign_ReportingGroup_BusNameMarker)); - assign_map.insert(std::make_pair(std::string("cim:ReportingGroup.TopologicalNode"), &assign_ReportingGroup_TopologicalNode)); + assign_map.emplace("cim:ReportingGroup.BusNameMarker", &assign_ReportingGroup_BusNameMarker); + assign_map.emplace("cim:ReportingGroup.TopologicalNode", &assign_ReportingGroup_TopologicalNode); } void ReportingGroup::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/ReportingGroup.hpp b/CGMES_2.4.15_27JAN2020/ReportingGroup.hpp index ddefec6f2..bed31d9d8 100644 --- a/CGMES_2.4.15_27JAN2020/ReportingGroup.hpp +++ b/CGMES_2.4.15_27JAN2020/ReportingGroup.hpp @@ -18,9 +18,7 @@ namespace CIMPP class BusNameMarker; class TopologicalNode; - /* - A reporting group is used for various ad-hoc groupings used for reporting. - */ + /** \brief A reporting group is used for various ad-hoc groupings used for reporting. */ class ReportingGroup : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP ReportingGroup(); ~ReportingGroup() override; - std::list BusNameMarker; /* The reporting group to which this bus name marker belongs. Default: 0 */ - std::list TopologicalNode; /* The reporting group to which the topological node belongs. Default: 0 */ + /** \brief The reporting group to which this bus name marker belongs. Default: 0 */ + std::list BusNameMarker; + + /** \brief The reporting group to which the topological node belongs. Default: 0 */ + std::list TopologicalNode; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Resistance.hpp b/CGMES_2.4.15_27JAN2020/Resistance.hpp index cd68a214f..ebb467d82 100644 --- a/CGMES_2.4.15_27JAN2020/Resistance.hpp +++ b/CGMES_2.4.15_27JAN2020/Resistance.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Resistance (real part of impedance). - */ + /** \brief Resistance (real part of impedance). */ class Resistance { public: diff --git a/CGMES_2.4.15_27JAN2020/ResistancePerLength.hpp b/CGMES_2.4.15_27JAN2020/ResistancePerLength.hpp index dc8f5da8d..e87d6316a 100644 --- a/CGMES_2.4.15_27JAN2020/ResistancePerLength.hpp +++ b/CGMES_2.4.15_27JAN2020/ResistancePerLength.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Resistance (real part of impedance) per unit of length. - */ + /** \brief Resistance (real part of impedance) per unit of length. */ class ResistancePerLength { public: diff --git a/CGMES_2.4.15_27JAN2020/RotatingMachine.cpp b/CGMES_2.4.15_27JAN2020/RotatingMachine.cpp index c36cd704f..167772853 100644 --- a/CGMES_2.4.15_27JAN2020/RotatingMachine.cpp +++ b/CGMES_2.4.15_27JAN2020/RotatingMachine.cpp @@ -10,16 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "GeneratingUnit.hpp" #include "HydroPump.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" -#include "Simple_Float.hpp" -#include "ApparentPower.hpp" -#include "Voltage.hpp" using namespace CIMPP; -RotatingMachine::RotatingMachine() : GeneratingUnit(nullptr), HydroPump(nullptr) {}; -RotatingMachine::~RotatingMachine() {}; +RotatingMachine::RotatingMachine() : GeneratingUnit(nullptr), HydroPump(nullptr) {} +RotatingMachine::~RotatingMachine() {} static const std::list PossibleProfilesForClass = { @@ -54,109 +49,129 @@ RotatingMachine::getPossibleProfilesForAttributes() const return map; } +bool assign_GeneratingUnit_RotatingMachine(BaseClass*, BaseClass*); +bool assign_RotatingMachine_GeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + GeneratingUnit* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->GeneratingUnit != element2) + { + element->GeneratingUnit = element2; + return assign_GeneratingUnit_RotatingMachine(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_RotatingMachine_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_HydroPump_RotatingMachine(BaseClass*, BaseClass*); +bool assign_RotatingMachine_HydroPump(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + HydroPump* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->p; - if (buffer.fail()) - return false; - else - return true; + if (element->HydroPump != element2) + { + element->HydroPump = element2; + return assign_HydroPump_RotatingMachine(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_RotatingMachine_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachine_p(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->q; - if (buffer.fail()) - return false; - else + buffer >> element->p; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RotatingMachine_ratedPowerFactor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachine_q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->ratedPowerFactor; - if (buffer.fail()) - return false; - else + buffer >> element->q; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RotatingMachine_ratedS(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachine_ratedPowerFactor(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->ratedS; - if (buffer.fail()) - return false; - else + buffer >> element->ratedPowerFactor; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RotatingMachine_ratedU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachine_ratedS(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->ratedU; - if (buffer.fail()) - return false; - else + buffer >> element->ratedS; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_GeneratingUnit_RotatingMachine(BaseClass*, BaseClass*); -bool assign_RotatingMachine_GeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_RotatingMachine_ratedU(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { RotatingMachine* element = dynamic_cast(BaseClass_ptr1); - GeneratingUnit* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->GeneratingUnit != element2) + buffer >> element->ratedU; + if (!buffer.fail()) { - element->GeneratingUnit = element2; - return assign_GeneratingUnit_RotatingMachine(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_HydroPump_RotatingMachine(BaseClass*, BaseClass*); -bool assign_RotatingMachine_HydroPump(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool get_RotatingMachine_GeneratingUnit(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - RotatingMachine* element = dynamic_cast(BaseClass_ptr1); - HydroPump* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->HydroPump != element2) + if (element->GeneratingUnit != 0) { - element->HydroPump = element2; - return assign_HydroPump_RotatingMachine(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->GeneratingUnit); + return true; } - return true; } return false; } + bool get_RotatingMachine_p(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p; if (!buffer.str().empty()) @@ -170,7 +185,8 @@ bool get_RotatingMachine_p(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_RotatingMachine_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q; if (!buffer.str().empty()) @@ -184,7 +200,8 @@ bool get_RotatingMachine_q(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_RotatingMachine_ratedPowerFactor(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedPowerFactor; if (!buffer.str().empty()) @@ -198,7 +215,8 @@ bool get_RotatingMachine_ratedPowerFactor(const BaseClass* BaseClass_ptr1, std:: bool get_RotatingMachine_ratedS(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedS; if (!buffer.str().empty()) @@ -212,7 +230,8 @@ bool get_RotatingMachine_ratedS(const BaseClass* BaseClass_ptr1, std::stringstre bool get_RotatingMachine_ratedU(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedU; if (!buffer.str().empty()) @@ -224,21 +243,6 @@ bool get_RotatingMachine_ratedU(const BaseClass* BaseClass_ptr1, std::stringstre return false; } - -bool get_RotatingMachine_GeneratingUnit(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->GeneratingUnit != 0) - { - BaseClass_list.push_back(element->GeneratingUnit); - return true; - } - } - return false; -} - - const char RotatingMachine::debugName[] = "RotatingMachine"; const char* RotatingMachine::debugString() const { @@ -247,22 +251,22 @@ const char* RotatingMachine::debugString() const void RotatingMachine::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RotatingMachine"), &RotatingMachine_factory)); + factory_map.emplace("cim:RotatingMachine", &RotatingMachine_factory); } void RotatingMachine::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RotatingMachine.p"), &assign_RotatingMachine_p)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachine.q"), &assign_RotatingMachine_q)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachine.ratedPowerFactor"), &assign_RotatingMachine_ratedPowerFactor)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachine.ratedS"), &assign_RotatingMachine_ratedS)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachine.ratedU"), &assign_RotatingMachine_ratedU)); + assign_map.emplace("cim:RotatingMachine.p", &assign_RotatingMachine_p); + assign_map.emplace("cim:RotatingMachine.q", &assign_RotatingMachine_q); + assign_map.emplace("cim:RotatingMachine.ratedPowerFactor", &assign_RotatingMachine_ratedPowerFactor); + assign_map.emplace("cim:RotatingMachine.ratedS", &assign_RotatingMachine_ratedS); + assign_map.emplace("cim:RotatingMachine.ratedU", &assign_RotatingMachine_ratedU); } void RotatingMachine::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RotatingMachine.GeneratingUnit"), &assign_RotatingMachine_GeneratingUnit)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachine.HydroPump"), &assign_RotatingMachine_HydroPump)); + assign_map.emplace("cim:RotatingMachine.GeneratingUnit", &assign_RotatingMachine_GeneratingUnit); + assign_map.emplace("cim:RotatingMachine.HydroPump", &assign_RotatingMachine_HydroPump); } void RotatingMachine::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/RotatingMachine.hpp b/CGMES_2.4.15_27JAN2020/RotatingMachine.hpp index 14a963aad..94e3078ed 100644 --- a/CGMES_2.4.15_27JAN2020/RotatingMachine.hpp +++ b/CGMES_2.4.15_27JAN2020/RotatingMachine.hpp @@ -23,9 +23,7 @@ namespace CIMPP class GeneratingUnit; class HydroPump; - /* - A rotating machine which may be used as a generator or motor. - */ + /** \brief A rotating machine which may be used as a generator or motor. */ class RotatingMachine : public RegulatingCondEq { public: @@ -33,13 +31,26 @@ namespace CIMPP RotatingMachine(); ~RotatingMachine() override; - CIMPP::GeneratingUnit* GeneratingUnit; /* A synchronous machine may operate as a generator and as such becomes a member of a generating unit. Default: 0 */ - CIMPP::HydroPump* HydroPump; /* The synchronous machine drives the turbine which moves the water from a low elevation to a higher elevation. The direction of machine rotation for pumping may or may not be the same as for generating. Default: 0 */ - CIMPP::ActivePower p; /* Active power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution. Default: nullptr */ - CIMPP::ReactivePower q; /* Reactive power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution. Default: nullptr */ - CIMPP::Simple_Float ratedPowerFactor; /* Power factor (nameplate data). It is primarily used for short circuit data exchange according to IEC 60909. Default: nullptr */ - CIMPP::ApparentPower ratedS; /* Nameplate apparent power rating for the unit. The attribute shall have a positive value. Default: nullptr */ - CIMPP::Voltage ratedU; /* Rated voltage (nameplate data, Ur in IEC 60909-0). It is primarily used for short circuit data exchange according to IEC 60909. Default: nullptr */ + /** \brief A synchronous machine may operate as a generator and as such becomes a member of a generating unit. Default: 0 */ + CIMPP::GeneratingUnit* GeneratingUnit; + + /** \brief The synchronous machine drives the turbine which moves the water from a low elevation to a higher elevation. The direction of machine rotation for pumping may or may not be the same as for generating. Default: 0 */ + CIMPP::HydroPump* HydroPump; + + /** \brief Active power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution. Default: nullptr */ + CIMPP::ActivePower p; + + /** \brief Reactive power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution. Default: nullptr */ + CIMPP::ReactivePower q; + + /** \brief Power factor (nameplate data). It is primarily used for short circuit data exchange according to IEC 60909. Default: nullptr */ + CIMPP::Simple_Float ratedPowerFactor; + + /** \brief Nameplate apparent power rating for the unit. The attribute shall have a positive value. Default: nullptr */ + CIMPP::ApparentPower ratedS; + + /** \brief Rated voltage (nameplate data, Ur in IEC 60909-0). It is primarily used for short circuit data exchange according to IEC 60909. Default: nullptr */ + CIMPP::Voltage ratedU; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/RotatingMachineDynamics.cpp b/CGMES_2.4.15_27JAN2020/RotatingMachineDynamics.cpp index 81cc6d9d1..57dd9d608 100644 --- a/CGMES_2.4.15_27JAN2020/RotatingMachineDynamics.cpp +++ b/CGMES_2.4.15_27JAN2020/RotatingMachineDynamics.cpp @@ -8,17 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -RotatingMachineDynamics::RotatingMachineDynamics() {}; -RotatingMachineDynamics::~RotatingMachineDynamics() {}; +RotatingMachineDynamics::RotatingMachineDynamics() {} +RotatingMachineDynamics::~RotatingMachineDynamics() {} static const std::list PossibleProfilesForClass = { @@ -50,90 +44,94 @@ RotatingMachineDynamics::getPossibleProfilesForAttributes() const return map; } - -bool assign_RotatingMachineDynamics_damping(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachineDynamics_damping(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->damping; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RotatingMachineDynamics_inertia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachineDynamics_inertia(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inertia; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RotatingMachineDynamics_saturationFactor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachineDynamics_saturationFactor(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->saturationFactor; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RotatingMachineDynamics_saturationFactor120(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachineDynamics_saturationFactor120(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->saturationFactor120; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RotatingMachineDynamics_statorLeakageReactance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachineDynamics_statorLeakageReactance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->statorLeakageReactance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RotatingMachineDynamics_statorResistance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachineDynamics_statorResistance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->statorResistance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_RotatingMachineDynamics_damping(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->damping; if (!buffer.str().empty()) @@ -147,7 +145,8 @@ bool get_RotatingMachineDynamics_damping(const BaseClass* BaseClass_ptr1, std::s bool get_RotatingMachineDynamics_inertia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inertia; if (!buffer.str().empty()) @@ -161,7 +160,8 @@ bool get_RotatingMachineDynamics_inertia(const BaseClass* BaseClass_ptr1, std::s bool get_RotatingMachineDynamics_saturationFactor(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->saturationFactor; if (!buffer.str().empty()) @@ -175,7 +175,8 @@ bool get_RotatingMachineDynamics_saturationFactor(const BaseClass* BaseClass_ptr bool get_RotatingMachineDynamics_saturationFactor120(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->saturationFactor120; if (!buffer.str().empty()) @@ -189,7 +190,8 @@ bool get_RotatingMachineDynamics_saturationFactor120(const BaseClass* BaseClass_ bool get_RotatingMachineDynamics_statorLeakageReactance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->statorLeakageReactance; if (!buffer.str().empty()) @@ -203,7 +205,8 @@ bool get_RotatingMachineDynamics_statorLeakageReactance(const BaseClass* BaseCla bool get_RotatingMachineDynamics_statorResistance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->statorResistance; if (!buffer.str().empty()) @@ -215,8 +218,6 @@ bool get_RotatingMachineDynamics_statorResistance(const BaseClass* BaseClass_ptr return false; } - - const char RotatingMachineDynamics::debugName[] = "RotatingMachineDynamics"; const char* RotatingMachineDynamics::debugString() const { @@ -225,17 +226,17 @@ const char* RotatingMachineDynamics::debugString() const void RotatingMachineDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RotatingMachineDynamics"), &RotatingMachineDynamics_factory)); + factory_map.emplace("cim:RotatingMachineDynamics", &RotatingMachineDynamics_factory); } void RotatingMachineDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RotatingMachineDynamics.damping"), &assign_RotatingMachineDynamics_damping)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachineDynamics.inertia"), &assign_RotatingMachineDynamics_inertia)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachineDynamics.saturationFactor"), &assign_RotatingMachineDynamics_saturationFactor)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachineDynamics.saturationFactor120"), &assign_RotatingMachineDynamics_saturationFactor120)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachineDynamics.statorLeakageReactance"), &assign_RotatingMachineDynamics_statorLeakageReactance)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachineDynamics.statorResistance"), &assign_RotatingMachineDynamics_statorResistance)); + assign_map.emplace("cim:RotatingMachineDynamics.damping", &assign_RotatingMachineDynamics_damping); + assign_map.emplace("cim:RotatingMachineDynamics.inertia", &assign_RotatingMachineDynamics_inertia); + assign_map.emplace("cim:RotatingMachineDynamics.saturationFactor", &assign_RotatingMachineDynamics_saturationFactor); + assign_map.emplace("cim:RotatingMachineDynamics.saturationFactor120", &assign_RotatingMachineDynamics_saturationFactor120); + assign_map.emplace("cim:RotatingMachineDynamics.statorLeakageReactance", &assign_RotatingMachineDynamics_statorLeakageReactance); + assign_map.emplace("cim:RotatingMachineDynamics.statorResistance", &assign_RotatingMachineDynamics_statorResistance); } void RotatingMachineDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/RotatingMachineDynamics.hpp b/CGMES_2.4.15_27JAN2020/RotatingMachineDynamics.hpp index b6a308942..97a2d57c7 100644 --- a/CGMES_2.4.15_27JAN2020/RotatingMachineDynamics.hpp +++ b/CGMES_2.4.15_27JAN2020/RotatingMachineDynamics.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Abstract parent class for all synchronous and asynchronous machine standard models. - */ + /** \brief Abstract parent class for all synchronous and asynchronous machine standard models. */ class RotatingMachineDynamics : public DynamicsFunctionBlock { public: @@ -29,12 +27,23 @@ namespace CIMPP RotatingMachineDynamics(); ~RotatingMachineDynamics() override; - CIMPP::Simple_Float damping; /* Damping torque coefficient (D). A proportionality constant that, when multiplied by the angular velocity of the rotor poles with respect to the magnetic field (frequency), results in the damping torque. This value is often zero when the sources of damping torques (generator damper windings, load damping effects, etc.) are modelled in detail. Typical Value = 0. Default: nullptr */ - CIMPP::Seconds inertia; /* Inertia constant of generator or motor and mechanical load (H) (>0). This is the specification for the stored energy in the rotating mass when operating at rated speed. For a generator, this includes the generator plus all other elements (turbine, exciter) on the same shaft and has units of MW*sec. For a motor, it includes the motor plus its mechanical load. Conventional units are per unit on the generator MVA base, usually expressed as MW*second/MVA or just second. This value is used in the accelerating power reference frame for operator training simulator solutions. Typical Value = 3. Default: nullptr */ - CIMPP::Simple_Float saturationFactor; /* Saturation factor at rated terminal voltage (S1) (> or =0). Not used by simplified model. Defined by defined by S(E1) in the SynchronousMachineSaturationParameters diagram. Typical Value = 0.02. Default: nullptr */ - CIMPP::Simple_Float saturationFactor120; /* Saturation factor at 120% of rated terminal voltage (S12) (> or =S1). Not used by the simplified model, defined by S(E2) in the SynchronousMachineSaturationParameters diagram. Typical Value = 0.12. Default: nullptr */ - CIMPP::PU statorLeakageReactance; /* Stator leakage reactance (Xl) (> or =0). Typical Value = 0.15. Default: nullptr */ - CIMPP::PU statorResistance; /* Stator (armature) resistance (Rs) (> or =0). Typical Value = 0.005. Default: nullptr */ + /** \brief Damping torque coefficient (D). A proportionality constant that, when multiplied by the angular velocity of the rotor poles with respect to the magnetic field (frequency), results in the damping torque. This value is often zero when the sources of damping torques (generator damper windings, load damping effects, etc.) are modelled in detail. Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float damping; + + /** \brief Inertia constant of generator or motor and mechanical load (H) (>0). This is the specification for the stored energy in the rotating mass when operating at rated speed. For a generator, this includes the generator plus all other elements (turbine, exciter) on the same shaft and has units of MW*sec. For a motor, it includes the motor plus its mechanical load. Conventional units are per unit on the generator MVA base, usually expressed as MW*second/MVA or just second. This value is used in the accelerating power reference frame for operator training simulator solutions. Typical Value = 3. Default: nullptr */ + CIMPP::Seconds inertia; + + /** \brief Saturation factor at rated terminal voltage (S1) (> or =0). Not used by simplified model. Defined by defined by S(E1) in the SynchronousMachineSaturationParameters diagram. Typical Value = 0.02. Default: nullptr */ + CIMPP::Simple_Float saturationFactor; + + /** \brief Saturation factor at 120% of rated terminal voltage (S12) (> or =S1). Not used by the simplified model, defined by S(E2) in the SynchronousMachineSaturationParameters diagram. Typical Value = 0.12. Default: nullptr */ + CIMPP::Simple_Float saturationFactor120; + + /** \brief Stator leakage reactance (Xl) (> or =0). Typical Value = 0.15. Default: nullptr */ + CIMPP::PU statorLeakageReactance; + + /** \brief Stator (armature) resistance (Rs) (> or =0). Typical Value = 0.005. Default: nullptr */ + CIMPP::PU statorResistance; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/RotationSpeed.hpp b/CGMES_2.4.15_27JAN2020/RotationSpeed.hpp index 20dae4027..3ffdcb396 100644 --- a/CGMES_2.4.15_27JAN2020/RotationSpeed.hpp +++ b/CGMES_2.4.15_27JAN2020/RotationSpeed.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Number of revolutions per second. - */ + /** \brief Number of revolutions per second. */ class RotationSpeed { public: diff --git a/CGMES_2.4.15_27JAN2020/RotorKind.cpp b/CGMES_2.4.15_27JAN2020/RotorKind.cpp index 155faceec..5474d65a5 100644 --- a/CGMES_2.4.15_27JAN2020/RotorKind.cpp +++ b/CGMES_2.4.15_27JAN2020/RotorKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "RotorKind") + if (EnumSymbol.substr(0, pos) != "RotorKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,12 +50,12 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "roundRotor") + if (EnumSymbol == "roundRotor") { rop = RotorKind::roundRotor; return lop; } - if(EnumSymbol == "salientPole") + if (EnumSymbol == "salientPole") { rop = RotorKind::salientPole; return lop; diff --git a/CGMES_2.4.15_27JAN2020/RotorKind.hpp b/CGMES_2.4.15_27JAN2020/RotorKind.hpp index d86eccaa1..1208e8979 100644 --- a/CGMES_2.4.15_27JAN2020/RotorKind.hpp +++ b/CGMES_2.4.15_27JAN2020/RotorKind.hpp @@ -9,21 +9,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of rotor on physical machine. - */ + /** \brief Type of rotor on physical machine. */ class RotorKind { public: enum RotorKind_ENUM { - /** - * Round rotor type of synchronous machine. - */ + /** Round rotor type of synchronous machine. */ roundRotor, - /** - * Salient pole type of synchronous machine. - */ + /** Salient pole type of synchronous machine. */ salientPole, }; diff --git a/CGMES_2.4.15_27JAN2020/SVCControlMode.cpp b/CGMES_2.4.15_27JAN2020/SVCControlMode.cpp index 4ccad37d6..d065e0216 100644 --- a/CGMES_2.4.15_27JAN2020/SVCControlMode.cpp +++ b/CGMES_2.4.15_27JAN2020/SVCControlMode.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "SVCControlMode") + if (EnumSymbol.substr(0, pos) != "SVCControlMode") { lop.setstate(std::ios::failbit); return lop; @@ -50,12 +50,12 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "reactivePower") + if (EnumSymbol == "reactivePower") { rop = SVCControlMode::reactivePower; return lop; } - if(EnumSymbol == "voltage") + if (EnumSymbol == "voltage") { rop = SVCControlMode::voltage; return lop; diff --git a/CGMES_2.4.15_27JAN2020/SVCControlMode.hpp b/CGMES_2.4.15_27JAN2020/SVCControlMode.hpp index 52da28bad..43127f392 100644 --- a/CGMES_2.4.15_27JAN2020/SVCControlMode.hpp +++ b/CGMES_2.4.15_27JAN2020/SVCControlMode.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Static VAr Compensator control mode. - */ + /** \brief Static VAr Compensator control mode. */ class SVCControlMode { public: diff --git a/CGMES_2.4.15_27JAN2020/Season.cpp b/CGMES_2.4.15_27JAN2020/Season.cpp index 02f2e0db6..bd79ad860 100644 --- a/CGMES_2.4.15_27JAN2020/Season.cpp +++ b/CGMES_2.4.15_27JAN2020/Season.cpp @@ -9,13 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "SeasonDayTypeSchedule.hpp" -#include "MonthDay.hpp" -#include "MonthDay.hpp" using namespace CIMPP; -Season::Season() {}; -Season::~Season() {}; +Season::Season() {} +Season::~Season() {} static const std::list PossibleProfilesForClass = { @@ -44,54 +42,56 @@ Season::getPossibleProfilesForAttributes() const return map; } - -bool assign_Season_endDate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SeasonDayTypeSchedule_Season(BaseClass*, BaseClass*); +bool assign_Season_SeasonDayTypeSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (Season* element = dynamic_cast(BaseClass_ptr1)) + Season* element = dynamic_cast(BaseClass_ptr1); + SeasonDayTypeSchedule* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - element->endDate = buffer.str(); - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->SeasonDayTypeSchedules.begin(), element->SeasonDayTypeSchedules.end(), element2) == element->SeasonDayTypeSchedules.end()) + { + element->SeasonDayTypeSchedules.push_back(element2); + return assign_SeasonDayTypeSchedule_Season(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_Season_startDate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Season_endDate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Season* element = dynamic_cast(BaseClass_ptr1)) + Season* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - element->startDate = buffer.str(); - if (buffer.fail()) - return false; - else + element->endDate = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_SeasonDayTypeSchedule_Season(BaseClass*, BaseClass*); -bool assign_Season_SeasonDayTypeSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_Season_startDate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { Season* element = dynamic_cast(BaseClass_ptr1); - SeasonDayTypeSchedule* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->SeasonDayTypeSchedules.begin(), element->SeasonDayTypeSchedules.end(), element2) == element->SeasonDayTypeSchedules.end()) + element->startDate = buffer.str(); + if (!buffer.fail()) { - element->SeasonDayTypeSchedules.push_back(element2); - return assign_SeasonDayTypeSchedule_Season(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_Season_endDate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Season* element = dynamic_cast(BaseClass_ptr1)) + const Season* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->endDate; if (!buffer.str().empty()) @@ -105,7 +105,8 @@ bool get_Season_endDate(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_Season_startDate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Season* element = dynamic_cast(BaseClass_ptr1)) + const Season* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->startDate; if (!buffer.str().empty()) @@ -117,8 +118,6 @@ bool get_Season_startDate(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char Season::debugName[] = "Season"; const char* Season::debugString() const { @@ -127,18 +126,18 @@ const char* Season::debugString() const void Season::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Season"), &Season_factory)); + factory_map.emplace("cim:Season", &Season_factory); } void Season::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Season.endDate"), &assign_Season_endDate)); - assign_map.insert(std::make_pair(std::string("cim:Season.startDate"), &assign_Season_startDate)); + assign_map.emplace("cim:Season.endDate", &assign_Season_endDate); + assign_map.emplace("cim:Season.startDate", &assign_Season_startDate); } void Season::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Season.SeasonDayTypeSchedules"), &assign_Season_SeasonDayTypeSchedules)); + assign_map.emplace("cim:Season.SeasonDayTypeSchedules", &assign_Season_SeasonDayTypeSchedules); } void Season::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/Season.hpp b/CGMES_2.4.15_27JAN2020/Season.hpp index f56c355a0..884a07e64 100644 --- a/CGMES_2.4.15_27JAN2020/Season.hpp +++ b/CGMES_2.4.15_27JAN2020/Season.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class SeasonDayTypeSchedule; - /* - A specified time period of the year. - */ + /** \brief A specified time period of the year. */ class Season : public IdentifiedObject { public: @@ -28,9 +26,14 @@ namespace CIMPP Season(); ~Season() override; - std::list SeasonDayTypeSchedules; /* Season for the Schedule. Default: 0 */ - CIMPP::MonthDay endDate; /* Date season ends. Default: nullptr */ - CIMPP::MonthDay startDate; /* Date season starts. Default: nullptr */ + /** \brief Season for the Schedule. Default: 0 */ + std::list SeasonDayTypeSchedules; + + /** \brief Date season ends. Default: nullptr */ + CIMPP::MonthDay endDate; + + /** \brief Date season starts. Default: nullptr */ + CIMPP::MonthDay startDate; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/SeasonDayTypeSchedule.cpp b/CGMES_2.4.15_27JAN2020/SeasonDayTypeSchedule.cpp index 284c63264..dcc36cca0 100644 --- a/CGMES_2.4.15_27JAN2020/SeasonDayTypeSchedule.cpp +++ b/CGMES_2.4.15_27JAN2020/SeasonDayTypeSchedule.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -SeasonDayTypeSchedule::SeasonDayTypeSchedule() : DayType(nullptr), Season(nullptr) {}; -SeasonDayTypeSchedule::~SeasonDayTypeSchedule() {}; +SeasonDayTypeSchedule::SeasonDayTypeSchedule() : DayType(nullptr), Season(nullptr) {} +SeasonDayTypeSchedule::~SeasonDayTypeSchedule() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ SeasonDayTypeSchedule::getPossibleProfilesForAttributes() const return map; } - - bool assign_DayType_SeasonDayTypeSchedules(BaseClass*, BaseClass*); bool assign_SeasonDayTypeSchedule_DayType(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_SeasonDayTypeSchedule_DayType(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_Season_SeasonDayTypeSchedules(BaseClass*, BaseClass*); bool assign_SeasonDayTypeSchedule_Season(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_SeasonDayTypeSchedule_Season(BaseClass* BaseClass_ptr1, BaseClass* B return false; } - bool get_SeasonDayTypeSchedule_DayType(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SeasonDayTypeSchedule* element = dynamic_cast(BaseClass_ptr1)) + const SeasonDayTypeSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DayType != 0) { @@ -93,7 +92,8 @@ bool get_SeasonDayTypeSchedule_DayType(const BaseClass* BaseClass_ptr1, std::lis bool get_SeasonDayTypeSchedule_Season(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SeasonDayTypeSchedule* element = dynamic_cast(BaseClass_ptr1)) + const SeasonDayTypeSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Season != 0) { @@ -104,7 +104,6 @@ bool get_SeasonDayTypeSchedule_Season(const BaseClass* BaseClass_ptr1, std::list return false; } - const char SeasonDayTypeSchedule::debugName[] = "SeasonDayTypeSchedule"; const char* SeasonDayTypeSchedule::debugString() const { @@ -113,7 +112,7 @@ const char* SeasonDayTypeSchedule::debugString() const void SeasonDayTypeSchedule::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SeasonDayTypeSchedule"), &SeasonDayTypeSchedule_factory)); + factory_map.emplace("cim:SeasonDayTypeSchedule", &SeasonDayTypeSchedule_factory); } void SeasonDayTypeSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void SeasonDayTypeSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SeasonDayTypeSchedule.DayType"), &assign_SeasonDayTypeSchedule_DayType)); - assign_map.insert(std::make_pair(std::string("cim:SeasonDayTypeSchedule.Season"), &assign_SeasonDayTypeSchedule_Season)); + assign_map.emplace("cim:SeasonDayTypeSchedule.DayType", &assign_SeasonDayTypeSchedule_DayType); + assign_map.emplace("cim:SeasonDayTypeSchedule.Season", &assign_SeasonDayTypeSchedule_Season); } void SeasonDayTypeSchedule::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/SeasonDayTypeSchedule.hpp b/CGMES_2.4.15_27JAN2020/SeasonDayTypeSchedule.hpp index 8658cffe8..bb3b41a35 100644 --- a/CGMES_2.4.15_27JAN2020/SeasonDayTypeSchedule.hpp +++ b/CGMES_2.4.15_27JAN2020/SeasonDayTypeSchedule.hpp @@ -18,9 +18,7 @@ namespace CIMPP class DayType; class Season; - /* - A time schedule covering a 24 hour period, with curve data for a specific type of season and day. - */ + /** \brief A time schedule covering a 24 hour period, with curve data for a specific type of season and day. */ class SeasonDayTypeSchedule : public RegularIntervalSchedule { public: @@ -28,8 +26,11 @@ namespace CIMPP SeasonDayTypeSchedule(); ~SeasonDayTypeSchedule() override; - CIMPP::DayType* DayType; /* Schedules that use this DayType. Default: 0 */ - CIMPP::Season* Season; /* Schedules that use this Season. Default: 0 */ + /** \brief Schedules that use this DayType. Default: 0 */ + CIMPP::DayType* DayType; + + /** \brief Schedules that use this Season. Default: 0 */ + CIMPP::Season* Season; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Seconds.hpp b/CGMES_2.4.15_27JAN2020/Seconds.hpp index 60e9a668b..9284aa059 100644 --- a/CGMES_2.4.15_27JAN2020/Seconds.hpp +++ b/CGMES_2.4.15_27JAN2020/Seconds.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Time, in seconds. - */ + /** \brief Time, in seconds. */ class Seconds { public: diff --git a/CGMES_2.4.15_27JAN2020/SeriesCompensator.cpp b/CGMES_2.4.15_27JAN2020/SeriesCompensator.cpp index bf05698f2..291e18404 100644 --- a/CGMES_2.4.15_27JAN2020/SeriesCompensator.cpp +++ b/CGMES_2.4.15_27JAN2020/SeriesCompensator.cpp @@ -8,18 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "Boolean.hpp" -#include "CurrentFlow.hpp" -#include "Voltage.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -SeriesCompensator::SeriesCompensator() {}; -SeriesCompensator::~SeriesCompensator() {}; +SeriesCompensator::SeriesCompensator() {} +SeriesCompensator::~SeriesCompensator() {} static const std::list PossibleProfilesForClass = { @@ -52,103 +45,108 @@ SeriesCompensator::getPossibleProfilesForAttributes() const return map; } - -bool assign_SeriesCompensator_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SeriesCompensator_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SeriesCompensator_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SeriesCompensator_r0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SeriesCompensator_varistorPresent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SeriesCompensator_varistorPresent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->varistorPresent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SeriesCompensator_varistorRatedCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SeriesCompensator_varistorRatedCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->varistorRatedCurrent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SeriesCompensator_varistorVoltageThreshold(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SeriesCompensator_varistorVoltageThreshold(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->varistorVoltageThreshold; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SeriesCompensator_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SeriesCompensator_x(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SeriesCompensator_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SeriesCompensator_x0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_SeriesCompensator_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -162,7 +160,8 @@ bool get_SeriesCompensator_r(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_SeriesCompensator_r0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r0; if (!buffer.str().empty()) @@ -176,7 +175,8 @@ bool get_SeriesCompensator_r0(const BaseClass* BaseClass_ptr1, std::stringstream bool get_SeriesCompensator_varistorPresent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->varistorPresent; if (!buffer.str().empty()) @@ -190,7 +190,8 @@ bool get_SeriesCompensator_varistorPresent(const BaseClass* BaseClass_ptr1, std: bool get_SeriesCompensator_varistorRatedCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->varistorRatedCurrent; if (!buffer.str().empty()) @@ -204,7 +205,8 @@ bool get_SeriesCompensator_varistorRatedCurrent(const BaseClass* BaseClass_ptr1, bool get_SeriesCompensator_varistorVoltageThreshold(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->varistorVoltageThreshold; if (!buffer.str().empty()) @@ -218,7 +220,8 @@ bool get_SeriesCompensator_varistorVoltageThreshold(const BaseClass* BaseClass_p bool get_SeriesCompensator_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x; if (!buffer.str().empty()) @@ -232,7 +235,8 @@ bool get_SeriesCompensator_x(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_SeriesCompensator_x0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x0; if (!buffer.str().empty()) @@ -244,8 +248,6 @@ bool get_SeriesCompensator_x0(const BaseClass* BaseClass_ptr1, std::stringstream return false; } - - const char SeriesCompensator::debugName[] = "SeriesCompensator"; const char* SeriesCompensator::debugString() const { @@ -254,18 +256,18 @@ const char* SeriesCompensator::debugString() const void SeriesCompensator::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SeriesCompensator"), &SeriesCompensator_factory)); + factory_map.emplace("cim:SeriesCompensator", &SeriesCompensator_factory); } void SeriesCompensator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SeriesCompensator.r"), &assign_SeriesCompensator_r)); - assign_map.insert(std::make_pair(std::string("cim:SeriesCompensator.r0"), &assign_SeriesCompensator_r0)); - assign_map.insert(std::make_pair(std::string("cim:SeriesCompensator.varistorPresent"), &assign_SeriesCompensator_varistorPresent)); - assign_map.insert(std::make_pair(std::string("cim:SeriesCompensator.varistorRatedCurrent"), &assign_SeriesCompensator_varistorRatedCurrent)); - assign_map.insert(std::make_pair(std::string("cim:SeriesCompensator.varistorVoltageThreshold"), &assign_SeriesCompensator_varistorVoltageThreshold)); - assign_map.insert(std::make_pair(std::string("cim:SeriesCompensator.x"), &assign_SeriesCompensator_x)); - assign_map.insert(std::make_pair(std::string("cim:SeriesCompensator.x0"), &assign_SeriesCompensator_x0)); + assign_map.emplace("cim:SeriesCompensator.r", &assign_SeriesCompensator_r); + assign_map.emplace("cim:SeriesCompensator.r0", &assign_SeriesCompensator_r0); + assign_map.emplace("cim:SeriesCompensator.varistorPresent", &assign_SeriesCompensator_varistorPresent); + assign_map.emplace("cim:SeriesCompensator.varistorRatedCurrent", &assign_SeriesCompensator_varistorRatedCurrent); + assign_map.emplace("cim:SeriesCompensator.varistorVoltageThreshold", &assign_SeriesCompensator_varistorVoltageThreshold); + assign_map.emplace("cim:SeriesCompensator.x", &assign_SeriesCompensator_x); + assign_map.emplace("cim:SeriesCompensator.x0", &assign_SeriesCompensator_x0); } void SeriesCompensator::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/SeriesCompensator.hpp b/CGMES_2.4.15_27JAN2020/SeriesCompensator.hpp index 858b49588..8d77b514a 100644 --- a/CGMES_2.4.15_27JAN2020/SeriesCompensator.hpp +++ b/CGMES_2.4.15_27JAN2020/SeriesCompensator.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A Series Compensator is a series capacitor or reactor or an AC transmission line without charging susceptance. It is a two terminal device. - */ + /** \brief A Series Compensator is a series capacitor or reactor or an AC transmission line without charging susceptance. It is a two terminal device. */ class SeriesCompensator : public ConductingEquipment { public: @@ -31,13 +29,26 @@ namespace CIMPP SeriesCompensator(); ~SeriesCompensator() override; - CIMPP::Resistance r; /* Positive sequence resistance. Default: nullptr */ - CIMPP::Resistance r0; /* Zero sequence resistance. Default: nullptr */ - CIMPP::Boolean varistorPresent; /* Describe if a metal oxide varistor (mov) for over voltage protection is configured at the series compensator. Default: false */ - CIMPP::CurrentFlow varistorRatedCurrent; /* The maximum current the varistor is designed to handle at specified duration. Default: nullptr */ - CIMPP::Voltage varistorVoltageThreshold; /* The dc voltage at which the varistor start conducting. Default: nullptr */ - CIMPP::Reactance x; /* Positive sequence reactance. Default: nullptr */ - CIMPP::Reactance x0; /* Zero sequence reactance. Default: nullptr */ + /** \brief Positive sequence resistance. Default: nullptr */ + CIMPP::Resistance r; + + /** \brief Zero sequence resistance. Default: nullptr */ + CIMPP::Resistance r0; + + /** \brief Describe if a metal oxide varistor (mov) for over voltage protection is configured at the series compensator. Default: false */ + CIMPP::Boolean varistorPresent; + + /** \brief The maximum current the varistor is designed to handle at specified duration. Default: nullptr */ + CIMPP::CurrentFlow varistorRatedCurrent; + + /** \brief The dc voltage at which the varistor start conducting. Default: nullptr */ + CIMPP::Voltage varistorVoltageThreshold; + + /** \brief Positive sequence reactance. Default: nullptr */ + CIMPP::Reactance x; + + /** \brief Zero sequence reactance. Default: nullptr */ + CIMPP::Reactance x0; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/SetPoint.cpp b/CGMES_2.4.15_27JAN2020/SetPoint.cpp index efd3b8575..5282827e5 100644 --- a/CGMES_2.4.15_27JAN2020/SetPoint.cpp +++ b/CGMES_2.4.15_27JAN2020/SetPoint.cpp @@ -8,13 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -SetPoint::SetPoint() {}; -SetPoint::~SetPoint() {}; +SetPoint::SetPoint() {} +SetPoint::~SetPoint() {} static const std::list PossibleProfilesForClass = { @@ -42,38 +40,38 @@ SetPoint::getPossibleProfilesForAttributes() const return map; } - -bool assign_SetPoint_normalValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SetPoint_normalValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SetPoint* element = dynamic_cast(BaseClass_ptr1)) + SetPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->normalValue; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SetPoint_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SetPoint_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SetPoint* element = dynamic_cast(BaseClass_ptr1)) + SetPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->value; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_SetPoint_normalValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SetPoint* element = dynamic_cast(BaseClass_ptr1)) + const SetPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->normalValue; if (!buffer.str().empty()) @@ -87,7 +85,8 @@ bool get_SetPoint_normalValue(const BaseClass* BaseClass_ptr1, std::stringstream bool get_SetPoint_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SetPoint* element = dynamic_cast(BaseClass_ptr1)) + const SetPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value; if (!buffer.str().empty()) @@ -99,8 +98,6 @@ bool get_SetPoint_value(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char SetPoint::debugName[] = "SetPoint"; const char* SetPoint::debugString() const { @@ -109,13 +106,13 @@ const char* SetPoint::debugString() const void SetPoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SetPoint"), &SetPoint_factory)); + factory_map.emplace("cim:SetPoint", &SetPoint_factory); } void SetPoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SetPoint.normalValue"), &assign_SetPoint_normalValue)); - assign_map.insert(std::make_pair(std::string("cim:SetPoint.value"), &assign_SetPoint_value)); + assign_map.emplace("cim:SetPoint.normalValue", &assign_SetPoint_normalValue); + assign_map.emplace("cim:SetPoint.value", &assign_SetPoint_value); } void SetPoint::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/SetPoint.hpp b/CGMES_2.4.15_27JAN2020/SetPoint.hpp index b88b8246b..373731845 100644 --- a/CGMES_2.4.15_27JAN2020/SetPoint.hpp +++ b/CGMES_2.4.15_27JAN2020/SetPoint.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - An analog control that issue a set point value. - */ + /** \brief An analog control that issue a set point value. */ class SetPoint : public AnalogControl { public: @@ -27,8 +25,11 @@ namespace CIMPP SetPoint(); ~SetPoint() override; - CIMPP::Simple_Float normalValue; /* Normal value for Control.value e.g. used for percentage scaling. Default: nullptr */ - CIMPP::Simple_Float value; /* The value representing the actuator output. Default: nullptr */ + /** \brief Normal value for Control.value e.g. used for percentage scaling. Default: nullptr */ + CIMPP::Simple_Float normalValue; + + /** \brief The value representing the actuator output. Default: nullptr */ + CIMPP::Simple_Float value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ShortCircuitRotorKind.cpp b/CGMES_2.4.15_27JAN2020/ShortCircuitRotorKind.cpp index 9e7ea1852..8c6e07eb8 100644 --- a/CGMES_2.4.15_27JAN2020/ShortCircuitRotorKind.cpp +++ b/CGMES_2.4.15_27JAN2020/ShortCircuitRotorKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "ShortCircuitRotorKind") + if (EnumSymbol.substr(0, pos) != "ShortCircuitRotorKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,22 +50,22 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "salientPole1") + if (EnumSymbol == "salientPole1") { rop = ShortCircuitRotorKind::salientPole1; return lop; } - if(EnumSymbol == "salientPole2") + if (EnumSymbol == "salientPole2") { rop = ShortCircuitRotorKind::salientPole2; return lop; } - if(EnumSymbol == "turboSeries1") + if (EnumSymbol == "turboSeries1") { rop = ShortCircuitRotorKind::turboSeries1; return lop; } - if(EnumSymbol == "turboSeries2") + if (EnumSymbol == "turboSeries2") { rop = ShortCircuitRotorKind::turboSeries2; return lop; diff --git a/CGMES_2.4.15_27JAN2020/ShortCircuitRotorKind.hpp b/CGMES_2.4.15_27JAN2020/ShortCircuitRotorKind.hpp index 76f473214..71b3acfc3 100644 --- a/CGMES_2.4.15_27JAN2020/ShortCircuitRotorKind.hpp +++ b/CGMES_2.4.15_27JAN2020/ShortCircuitRotorKind.hpp @@ -9,29 +9,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of rotor, used by short circuit applications. - */ + /** \brief Type of rotor, used by short circuit applications. */ class ShortCircuitRotorKind { public: enum ShortCircuitRotorKind_ENUM { - /** - * Salient pole 1 in the IEC 60909 - */ + /** Salient pole 1 in the IEC 60909 */ salientPole1, - /** - * Salient pole 2 in IEC 60909 - */ + /** Salient pole 2 in IEC 60909 */ salientPole2, - /** - * Turbo Series 1 in the IEC 60909 - */ + /** Turbo Series 1 in the IEC 60909 */ turboSeries1, - /** - * Turbo series 2 in IEC 60909 - */ + /** Turbo series 2 in IEC 60909 */ turboSeries2, }; diff --git a/CGMES_2.4.15_27JAN2020/ShuntCompensator.cpp b/CGMES_2.4.15_27JAN2020/ShuntCompensator.cpp index c6ffcbea0..53878ebfa 100644 --- a/CGMES_2.4.15_27JAN2020/ShuntCompensator.cpp +++ b/CGMES_2.4.15_27JAN2020/ShuntCompensator.cpp @@ -9,20 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "SvShuntCompensatorSections.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "Integer.hpp" -#include "Voltage.hpp" -#include "Integer.hpp" -#include "Simple_Float.hpp" -#include "Integer.hpp" -#include "DateTime.hpp" -#include "VoltagePerReactivePower.hpp" using namespace CIMPP; -ShuntCompensator::ShuntCompensator() : SvShuntCompensatorSections(nullptr) {}; -ShuntCompensator::~ShuntCompensator() {}; +ShuntCompensator::ShuntCompensator() : SvShuntCompensatorSections(nullptr) {} +ShuntCompensator::~ShuntCompensator() {} static const std::list PossibleProfilesForClass = { @@ -60,145 +51,154 @@ ShuntCompensator::getPossibleProfilesForAttributes() const return map; } +bool assign_SvShuntCompensatorSections_ShuntCompensator(BaseClass*, BaseClass*); +bool assign_ShuntCompensator_SvShuntCompensatorSections(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + SvShuntCompensatorSections* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->SvShuntCompensatorSections != element2) + { + element->SvShuntCompensatorSections = element2; + return assign_SvShuntCompensatorSections_ShuntCompensator(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_ShuntCompensator_aVRDelay(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ShuntCompensator_aVRDelay(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->aVRDelay; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ShuntCompensator_grounded(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ShuntCompensator_grounded(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->grounded; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ShuntCompensator_maximumSections(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ShuntCompensator_maximumSections(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maximumSections; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ShuntCompensator_nomU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ShuntCompensator_nomU(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nomU; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ShuntCompensator_normalSections(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ShuntCompensator_normalSections(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->normalSections; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ShuntCompensator_sections(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ShuntCompensator_sections(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->sections; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ShuntCompensator_switchOnCount(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ShuntCompensator_switchOnCount(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->switchOnCount; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ShuntCompensator_switchOnDate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ShuntCompensator_switchOnDate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->switchOnDate = buffer.str(); - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_ShuntCompensator_voltageSensitivity(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->voltageSensitivity; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_SvShuntCompensatorSections_ShuntCompensator(BaseClass*, BaseClass*); -bool assign_ShuntCompensator_SvShuntCompensatorSections(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_ShuntCompensator_voltageSensitivity(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); - SvShuntCompensatorSections* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->SvShuntCompensatorSections != element2) + buffer >> element->voltageSensitivity; + if (!buffer.fail()) { - element->SvShuntCompensatorSections = element2; - return assign_SvShuntCompensatorSections_ShuntCompensator(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_ShuntCompensator_aVRDelay(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->aVRDelay; if (!buffer.str().empty()) @@ -212,7 +212,8 @@ bool get_ShuntCompensator_aVRDelay(const BaseClass* BaseClass_ptr1, std::strings bool get_ShuntCompensator_grounded(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->grounded; if (!buffer.str().empty()) @@ -226,7 +227,8 @@ bool get_ShuntCompensator_grounded(const BaseClass* BaseClass_ptr1, std::strings bool get_ShuntCompensator_maximumSections(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maximumSections; if (!buffer.str().empty()) @@ -240,7 +242,8 @@ bool get_ShuntCompensator_maximumSections(const BaseClass* BaseClass_ptr1, std:: bool get_ShuntCompensator_nomU(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nomU; if (!buffer.str().empty()) @@ -254,7 +257,8 @@ bool get_ShuntCompensator_nomU(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_ShuntCompensator_normalSections(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->normalSections; if (!buffer.str().empty()) @@ -268,7 +272,8 @@ bool get_ShuntCompensator_normalSections(const BaseClass* BaseClass_ptr1, std::s bool get_ShuntCompensator_sections(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->sections; if (!buffer.str().empty()) @@ -282,7 +287,8 @@ bool get_ShuntCompensator_sections(const BaseClass* BaseClass_ptr1, std::strings bool get_ShuntCompensator_switchOnCount(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->switchOnCount; if (!buffer.str().empty()) @@ -296,7 +302,8 @@ bool get_ShuntCompensator_switchOnCount(const BaseClass* BaseClass_ptr1, std::st bool get_ShuntCompensator_switchOnDate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->switchOnDate; if (!buffer.str().empty()) @@ -310,7 +317,8 @@ bool get_ShuntCompensator_switchOnDate(const BaseClass* BaseClass_ptr1, std::str bool get_ShuntCompensator_voltageSensitivity(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->voltageSensitivity; if (!buffer.str().empty()) @@ -322,8 +330,6 @@ bool get_ShuntCompensator_voltageSensitivity(const BaseClass* BaseClass_ptr1, st return false; } - - const char ShuntCompensator::debugName[] = "ShuntCompensator"; const char* ShuntCompensator::debugString() const { @@ -332,25 +338,25 @@ const char* ShuntCompensator::debugString() const void ShuntCompensator::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ShuntCompensator"), &ShuntCompensator_factory)); + factory_map.emplace("cim:ShuntCompensator", &ShuntCompensator_factory); } void ShuntCompensator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.aVRDelay"), &assign_ShuntCompensator_aVRDelay)); - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.grounded"), &assign_ShuntCompensator_grounded)); - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.maximumSections"), &assign_ShuntCompensator_maximumSections)); - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.nomU"), &assign_ShuntCompensator_nomU)); - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.normalSections"), &assign_ShuntCompensator_normalSections)); - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.sections"), &assign_ShuntCompensator_sections)); - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.switchOnCount"), &assign_ShuntCompensator_switchOnCount)); - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.switchOnDate"), &assign_ShuntCompensator_switchOnDate)); - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.voltageSensitivity"), &assign_ShuntCompensator_voltageSensitivity)); + assign_map.emplace("cim:ShuntCompensator.aVRDelay", &assign_ShuntCompensator_aVRDelay); + assign_map.emplace("cim:ShuntCompensator.grounded", &assign_ShuntCompensator_grounded); + assign_map.emplace("cim:ShuntCompensator.maximumSections", &assign_ShuntCompensator_maximumSections); + assign_map.emplace("cim:ShuntCompensator.nomU", &assign_ShuntCompensator_nomU); + assign_map.emplace("cim:ShuntCompensator.normalSections", &assign_ShuntCompensator_normalSections); + assign_map.emplace("cim:ShuntCompensator.sections", &assign_ShuntCompensator_sections); + assign_map.emplace("cim:ShuntCompensator.switchOnCount", &assign_ShuntCompensator_switchOnCount); + assign_map.emplace("cim:ShuntCompensator.switchOnDate", &assign_ShuntCompensator_switchOnDate); + assign_map.emplace("cim:ShuntCompensator.voltageSensitivity", &assign_ShuntCompensator_voltageSensitivity); } void ShuntCompensator::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.SvShuntCompensatorSections"), &assign_ShuntCompensator_SvShuntCompensatorSections)); + assign_map.emplace("cim:ShuntCompensator.SvShuntCompensatorSections", &assign_ShuntCompensator_SvShuntCompensatorSections); } void ShuntCompensator::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/ShuntCompensator.hpp b/CGMES_2.4.15_27JAN2020/ShuntCompensator.hpp index f49148733..96927b2f6 100644 --- a/CGMES_2.4.15_27JAN2020/ShuntCompensator.hpp +++ b/CGMES_2.4.15_27JAN2020/ShuntCompensator.hpp @@ -24,9 +24,7 @@ namespace CIMPP { class SvShuntCompensatorSections; - /* - A shunt capacitor or reactor or switchable bank of shunt capacitors or reactors. A section of a shunt compensator is an individual capacitor or reactor. A negative value for reactivePerSection indicates that the compensator is a reactor. ShuntCompensator is a single terminal device. Ground is implied. - */ + /** \brief A shunt capacitor or reactor or switchable bank of shunt capacitors or reactors. A section of a shunt compensator is an individual capacitor or reactor. A negative value for reactivePerSection indicates that the compensator is a reactor. ShuntCompensator is a single terminal device. Ground is implied. */ class ShuntCompensator : public RegulatingCondEq { public: @@ -34,16 +32,35 @@ namespace CIMPP ShuntCompensator(); ~ShuntCompensator() override; - CIMPP::SvShuntCompensatorSections* SvShuntCompensatorSections; /* The state for the number of shunt compensator sections in service. Default: 0 */ - CIMPP::Seconds aVRDelay; /* Time delay required for the device to be connected or disconnected by automatic voltage regulation (AVR). Default: nullptr */ - CIMPP::Boolean grounded; /* Used for Yn and Zn connections. True if the neutral is solidly grounded. Default: false */ - CIMPP::Integer maximumSections; /* The maximum number of sections that may be switched in. Default: 0 */ - CIMPP::Voltage nomU; /* The voltage at which the nominal reactive power may be calculated. This should normally be within 10% of the voltage at which the capacitor is connected to the network. Default: nullptr */ - CIMPP::Integer normalSections; /* The normal number of sections switched in. Default: 0 */ - CIMPP::Simple_Float sections; /* Shunt compensator sections in use. Starting value for steady state solution. Non integer values are allowed to support continuous variables. The reasons for continuous value are to support study cases where no discrete shunt compensators has yet been designed, a solutions where a narrow voltage band force the sections to oscillate or accommodate for a continuous solution as input. Default: nullptr */ - CIMPP::Integer switchOnCount; /* The switch on count since the capacitor count was last reset or initialized. Default: 0 */ - CIMPP::DateTime switchOnDate; /* The date and time when the capacitor bank was last switched on. Default: '' */ - CIMPP::VoltagePerReactivePower voltageSensitivity; /* Voltage sensitivity required for the device to regulate the bus voltage, in voltage/reactive power. Default: nullptr */ + /** \brief The state for the number of shunt compensator sections in service. Default: 0 */ + CIMPP::SvShuntCompensatorSections* SvShuntCompensatorSections; + + /** \brief Time delay required for the device to be connected or disconnected by automatic voltage regulation (AVR). Default: nullptr */ + CIMPP::Seconds aVRDelay; + + /** \brief Used for Yn and Zn connections. True if the neutral is solidly grounded. Default: false */ + CIMPP::Boolean grounded; + + /** \brief The maximum number of sections that may be switched in. Default: 0 */ + CIMPP::Integer maximumSections; + + /** \brief The voltage at which the nominal reactive power may be calculated. This should normally be within 10% of the voltage at which the capacitor is connected to the network. Default: nullptr */ + CIMPP::Voltage nomU; + + /** \brief The normal number of sections switched in. Default: 0 */ + CIMPP::Integer normalSections; + + /** \brief Shunt compensator sections in use. Starting value for steady state solution. Non integer values are allowed to support continuous variables. The reasons for continuous value are to support study cases where no discrete shunt compensators has yet been designed, a solutions where a narrow voltage band force the sections to oscillate or accommodate for a continuous solution as input. Default: nullptr */ + CIMPP::Simple_Float sections; + + /** \brief The switch on count since the capacitor count was last reset or initialized. Default: 0 */ + CIMPP::Integer switchOnCount; + + /** \brief The date and time when the capacitor bank was last switched on. Default: '' */ + CIMPP::DateTime switchOnDate; + + /** \brief Voltage sensitivity required for the device to regulate the bus voltage, in voltage/reactive power. Default: nullptr */ + CIMPP::VoltagePerReactivePower voltageSensitivity; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Simple_Float.hpp b/CGMES_2.4.15_27JAN2020/Simple_Float.hpp index 58d48ce8f..c8918cd32 100644 --- a/CGMES_2.4.15_27JAN2020/Simple_Float.hpp +++ b/CGMES_2.4.15_27JAN2020/Simple_Float.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A floating point number. The range is unspecified and not limited. - */ + /** \brief A floating point number. The range is unspecified and not limited. */ class Simple_Float { public: diff --git a/CGMES_2.4.15_27JAN2020/SolarGeneratingUnit.cpp b/CGMES_2.4.15_27JAN2020/SolarGeneratingUnit.cpp index 065a49e1f..0887d1cbb 100644 --- a/CGMES_2.4.15_27JAN2020/SolarGeneratingUnit.cpp +++ b/CGMES_2.4.15_27JAN2020/SolarGeneratingUnit.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -SolarGeneratingUnit::SolarGeneratingUnit() {}; -SolarGeneratingUnit::~SolarGeneratingUnit() {}; +SolarGeneratingUnit::SolarGeneratingUnit() {} +SolarGeneratingUnit::~SolarGeneratingUnit() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ SolarGeneratingUnit::getPossibleProfilesForAttributes() const return map; } - - - - - const char SolarGeneratingUnit::debugName[] = "SolarGeneratingUnit"; const char* SolarGeneratingUnit::debugString() const { @@ -52,7 +47,7 @@ const char* SolarGeneratingUnit::debugString() const void SolarGeneratingUnit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SolarGeneratingUnit"), &SolarGeneratingUnit_factory)); + factory_map.emplace("cim:SolarGeneratingUnit", &SolarGeneratingUnit_factory); } void SolarGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/SolarGeneratingUnit.hpp b/CGMES_2.4.15_27JAN2020/SolarGeneratingUnit.hpp index 7292ac264..30f338f85 100644 --- a/CGMES_2.4.15_27JAN2020/SolarGeneratingUnit.hpp +++ b/CGMES_2.4.15_27JAN2020/SolarGeneratingUnit.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A solar thermal generating unit. - */ + /** \brief A solar thermal generating unit. */ class SolarGeneratingUnit : public GeneratingUnit { public: @@ -26,7 +24,6 @@ namespace CIMPP SolarGeneratingUnit(); ~SolarGeneratingUnit() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Source.cpp b/CGMES_2.4.15_27JAN2020/Source.cpp index 54f9266b5..c3fcca81b 100644 --- a/CGMES_2.4.15_27JAN2020/Source.cpp +++ b/CGMES_2.4.15_27JAN2020/Source.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "Source") + if (EnumSymbol.substr(0, pos) != "Source") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "PROCESS") + if (EnumSymbol == "PROCESS") { rop = Source::PROCESS; return lop; } - if(EnumSymbol == "DEFAULTED") + if (EnumSymbol == "DEFAULTED") { rop = Source::DEFAULTED; return lop; } - if(EnumSymbol == "SUBSTITUTED") + if (EnumSymbol == "SUBSTITUTED") { rop = Source::SUBSTITUTED; return lop; diff --git a/CGMES_2.4.15_27JAN2020/Source.hpp b/CGMES_2.4.15_27JAN2020/Source.hpp index 0cbf17fb0..a4c8dd465 100644 --- a/CGMES_2.4.15_27JAN2020/Source.hpp +++ b/CGMES_2.4.15_27JAN2020/Source.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Source gives information related to the origin of a value. - */ + /** \brief Source gives information related to the origin of a value. */ class Source { public: enum Source_ENUM { - /** - * The value is provided by input from the process I/O or being calculated from some function. - */ + /** The value is provided by input from the process I/O or being calculated from some function. */ PROCESS, - /** - * The value contains a default value. - */ + /** The value contains a default value. */ DEFAULTED, - /** - * The value is provided by input of an operator or by an automatic source. - */ + /** The value is provided by input of an operator or by an automatic source. */ SUBSTITUTED, }; diff --git a/CGMES_2.4.15_27JAN2020/StateVariablesVersion.cpp b/CGMES_2.4.15_27JAN2020/StateVariablesVersion.cpp index 6cb121be2..f123f86d6 100644 --- a/CGMES_2.4.15_27JAN2020/StateVariablesVersion.cpp +++ b/CGMES_2.4.15_27JAN2020/StateVariablesVersion.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "String.hpp" -#include "String.hpp" -#include "Date.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -StateVariablesVersion::StateVariablesVersion() {}; -StateVariablesVersion::~StateVariablesVersion() {}; +StateVariablesVersion::StateVariablesVersion() {} +StateVariablesVersion::~StateVariablesVersion() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ StateVariablesVersion::getPossibleProfilesForAttributes() const return map; } - -bool assign_StateVariablesVersion_baseUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StateVariablesVersion_baseUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StateVariablesVersion_baseURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StateVariablesVersion_baseURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StateVariablesVersion_date(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StateVariablesVersion_date(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->date = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StateVariablesVersion_differenceModelURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StateVariablesVersion_differenceModelURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->differenceModelURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StateVariablesVersion_entsoeUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StateVariablesVersion_entsoeUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StateVariablesVersion_entsoeURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StateVariablesVersion_entsoeURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StateVariablesVersion_modelDescriptionURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StateVariablesVersion_modelDescriptionURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->modelDescriptionURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StateVariablesVersion_namespaceRDF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StateVariablesVersion_namespaceRDF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceRDF = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StateVariablesVersion_namespaceUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StateVariablesVersion_namespaceUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StateVariablesVersion_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StateVariablesVersion_shortName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->shortName = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_StateVariablesVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseUML; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_StateVariablesVersion_baseUML(const BaseClass* BaseClass_ptr1, std::str bool get_StateVariablesVersion_baseURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseURI; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_StateVariablesVersion_baseURI(const BaseClass* BaseClass_ptr1, std::str bool get_StateVariablesVersion_date(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->date; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_StateVariablesVersion_date(const BaseClass* BaseClass_ptr1, std::string bool get_StateVariablesVersion_differenceModelURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->differenceModelURI; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_StateVariablesVersion_differenceModelURI(const BaseClass* BaseClass_ptr bool get_StateVariablesVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeUML; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_StateVariablesVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::s bool get_StateVariablesVersion_entsoeURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeURI; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_StateVariablesVersion_entsoeURI(const BaseClass* BaseClass_ptr1, std::s bool get_StateVariablesVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->modelDescriptionURI; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_StateVariablesVersion_modelDescriptionURI(const BaseClass* BaseClass_pt bool get_StateVariablesVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceRDF; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_StateVariablesVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std bool get_StateVariablesVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceUML; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_StateVariablesVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std bool get_StateVariablesVersion_shortName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1)) + const StateVariablesVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortName; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_StateVariablesVersion_shortName(const BaseClass* BaseClass_ptr1, std::s return false; } - - const char StateVariablesVersion::debugName[] = "StateVariablesVersion"; const char* StateVariablesVersion::debugString() const { @@ -341,21 +346,21 @@ const char* StateVariablesVersion::debugString() const void StateVariablesVersion::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:StateVariablesVersion"), &StateVariablesVersion_factory)); + factory_map.emplace("cim:StateVariablesVersion", &StateVariablesVersion_factory); } void StateVariablesVersion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:StateVariablesVersion.baseUML"), &assign_StateVariablesVersion_baseUML)); - assign_map.insert(std::make_pair(std::string("cim:StateVariablesVersion.baseURI"), &assign_StateVariablesVersion_baseURI)); - assign_map.insert(std::make_pair(std::string("cim:StateVariablesVersion.date"), &assign_StateVariablesVersion_date)); - assign_map.insert(std::make_pair(std::string("cim:StateVariablesVersion.differenceModelURI"), &assign_StateVariablesVersion_differenceModelURI)); - assign_map.insert(std::make_pair(std::string("cim:StateVariablesVersion.entsoeUML"), &assign_StateVariablesVersion_entsoeUML)); - assign_map.insert(std::make_pair(std::string("cim:StateVariablesVersion.entsoeURI"), &assign_StateVariablesVersion_entsoeURI)); - assign_map.insert(std::make_pair(std::string("cim:StateVariablesVersion.modelDescriptionURI"), &assign_StateVariablesVersion_modelDescriptionURI)); - assign_map.insert(std::make_pair(std::string("cim:StateVariablesVersion.namespaceRDF"), &assign_StateVariablesVersion_namespaceRDF)); - assign_map.insert(std::make_pair(std::string("cim:StateVariablesVersion.namespaceUML"), &assign_StateVariablesVersion_namespaceUML)); - assign_map.insert(std::make_pair(std::string("cim:StateVariablesVersion.shortName"), &assign_StateVariablesVersion_shortName)); + assign_map.emplace("cim:StateVariablesVersion.baseUML", &assign_StateVariablesVersion_baseUML); + assign_map.emplace("cim:StateVariablesVersion.baseURI", &assign_StateVariablesVersion_baseURI); + assign_map.emplace("cim:StateVariablesVersion.date", &assign_StateVariablesVersion_date); + assign_map.emplace("cim:StateVariablesVersion.differenceModelURI", &assign_StateVariablesVersion_differenceModelURI); + assign_map.emplace("cim:StateVariablesVersion.entsoeUML", &assign_StateVariablesVersion_entsoeUML); + assign_map.emplace("cim:StateVariablesVersion.entsoeURI", &assign_StateVariablesVersion_entsoeURI); + assign_map.emplace("cim:StateVariablesVersion.modelDescriptionURI", &assign_StateVariablesVersion_modelDescriptionURI); + assign_map.emplace("cim:StateVariablesVersion.namespaceRDF", &assign_StateVariablesVersion_namespaceRDF); + assign_map.emplace("cim:StateVariablesVersion.namespaceUML", &assign_StateVariablesVersion_namespaceUML); + assign_map.emplace("cim:StateVariablesVersion.shortName", &assign_StateVariablesVersion_shortName); } void StateVariablesVersion::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/StateVariablesVersion.hpp b/CGMES_2.4.15_27JAN2020/StateVariablesVersion.hpp index f9f24fef7..d6263d5d7 100644 --- a/CGMES_2.4.15_27JAN2020/StateVariablesVersion.hpp +++ b/CGMES_2.4.15_27JAN2020/StateVariablesVersion.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Version details. - */ + /** \brief Version details. */ class StateVariablesVersion : public BaseClass { public: @@ -28,16 +26,35 @@ namespace CIMPP StateVariablesVersion(); ~StateVariablesVersion() override; - CIMPP::String baseUML; /* Base UML provided by CIM model manager. Default: '' */ - CIMPP::String baseURI; /* Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ - CIMPP::Date date; /* Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ - CIMPP::String differenceModelURI; /* Difference model URI defined by IEC 61970-552. Default: '' */ - CIMPP::String entsoeUML; /* UML provided by ENTSO-E. Default: '' */ - CIMPP::String entsoeURI; /* Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/StateVariables/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ - CIMPP::String modelDescriptionURI; /* Model Description URI defined by IEC 61970-552. Default: '' */ - CIMPP::String namespaceRDF; /* RDF namespace. Default: '' */ - CIMPP::String namespaceUML; /* CIM UML namespace. Default: '' */ - CIMPP::String shortName; /* The short name of the profile used in profile documentation. Default: '' */ + /** \brief Base UML provided by CIM model manager. Default: '' */ + CIMPP::String baseUML; + + /** \brief Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ + CIMPP::String baseURI; + + /** \brief Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ + CIMPP::Date date; + + /** \brief Difference model URI defined by IEC 61970-552. Default: '' */ + CIMPP::String differenceModelURI; + + /** \brief UML provided by ENTSO-E. Default: '' */ + CIMPP::String entsoeUML; + + /** \brief Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/StateVariables/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ + CIMPP::String entsoeURI; + + /** \brief Model Description URI defined by IEC 61970-552. Default: '' */ + CIMPP::String modelDescriptionURI; + + /** \brief RDF namespace. Default: '' */ + CIMPP::String namespaceRDF; + + /** \brief CIM UML namespace. Default: '' */ + CIMPP::String namespaceUML; + + /** \brief The short name of the profile used in profile documentation. Default: '' */ + CIMPP::String shortName; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/StaticLoadModelKind.cpp b/CGMES_2.4.15_27JAN2020/StaticLoadModelKind.cpp index e3d149299..20695a176 100644 --- a/CGMES_2.4.15_27JAN2020/StaticLoadModelKind.cpp +++ b/CGMES_2.4.15_27JAN2020/StaticLoadModelKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "StaticLoadModelKind") + if (EnumSymbol.substr(0, pos) != "StaticLoadModelKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,22 +50,22 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "exponential") + if (EnumSymbol == "exponential") { rop = StaticLoadModelKind::exponential; return lop; } - if(EnumSymbol == "zIP1") + if (EnumSymbol == "zIP1") { rop = StaticLoadModelKind::zIP1; return lop; } - if(EnumSymbol == "zIP2") + if (EnumSymbol == "zIP2") { rop = StaticLoadModelKind::zIP2; return lop; } - if(EnumSymbol == "constantZ") + if (EnumSymbol == "constantZ") { rop = StaticLoadModelKind::constantZ; return lop; diff --git a/CGMES_2.4.15_27JAN2020/StaticLoadModelKind.hpp b/CGMES_2.4.15_27JAN2020/StaticLoadModelKind.hpp index 362cca7ea..2cd61a19c 100644 --- a/CGMES_2.4.15_27JAN2020/StaticLoadModelKind.hpp +++ b/CGMES_2.4.15_27JAN2020/StaticLoadModelKind.hpp @@ -9,29 +9,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of static load model. - */ + /** \brief Type of static load model. */ class StaticLoadModelKind { public: enum StaticLoadModelKind_ENUM { - /** - * Exponential P and Q equations are used and the following attributes are required: kp1, kp2, kp3, kpf, ep1, ep2, ep3 kq1, kq2, kq3, kqf, eq1, eq2, eq3. - */ + /** Exponential P and Q equations are used and the following attributes are required: kp1, kp2, kp3, kpf, ep1, ep2, ep3 kq1, kq2, kq3, kqf, eq1, eq2, eq3. */ exponential, - /** - * ZIP1 P and Q equations are used and the following attributes are required: kp1, kp2, kp3, kpf kq1, kq2, kq3, kqf. - */ + /** ZIP1 P and Q equations are used and the following attributes are required: kp1, kp2, kp3, kpf kq1, kq2, kq3, kqf. */ zIP1, - /** - * This model separates the frequency-dependent load (primarily motors) from other load. ZIP2 P and Q equations are used and the following attributes are required: kp1, kp2, kp3, kq4, kpf kq1, kq2, kq3, kq4, kqf. - */ + /** This model separates the frequency-dependent load (primarily motors) from other load. ZIP2 P and Q equations are used and the following attributes are required: kp1, kp2, kp3, kq4, kpf kq1, kq2, kq3, kq4, kqf. */ zIP2, - /** - * The load is represented as a constant impedance. ConstantZ P and Q equations are used and no attributes are required. - */ + /** The load is represented as a constant impedance. ConstantZ P and Q equations are used and no attributes are required. */ constantZ, }; diff --git a/CGMES_2.4.15_27JAN2020/StaticVarCompensator.cpp b/CGMES_2.4.15_27JAN2020/StaticVarCompensator.cpp index 2bff984da..ae413174a 100644 --- a/CGMES_2.4.15_27JAN2020/StaticVarCompensator.cpp +++ b/CGMES_2.4.15_27JAN2020/StaticVarCompensator.cpp @@ -8,17 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Reactance.hpp" -#include "Reactance.hpp" -#include "ReactivePower.hpp" -#include "SVCControlMode.hpp" -#include "VoltagePerReactivePower.hpp" -#include "Voltage.hpp" using namespace CIMPP; -StaticVarCompensator::StaticVarCompensator() {}; -StaticVarCompensator::~StaticVarCompensator() {}; +StaticVarCompensator::StaticVarCompensator() {} +StaticVarCompensator::~StaticVarCompensator() {} static const std::list PossibleProfilesForClass = { @@ -51,90 +45,94 @@ StaticVarCompensator::getPossibleProfilesForAttributes() const return map; } - -bool assign_StaticVarCompensator_capacitiveRating(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StaticVarCompensator_capacitiveRating(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->capacitiveRating; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StaticVarCompensator_inductiveRating(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StaticVarCompensator_inductiveRating(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inductiveRating; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StaticVarCompensator_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StaticVarCompensator_q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StaticVarCompensator_sVCControlMode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StaticVarCompensator_sVCControlMode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->sVCControlMode; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StaticVarCompensator_slope(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StaticVarCompensator_slope(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->slope; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StaticVarCompensator_voltageSetPoint(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StaticVarCompensator_voltageSetPoint(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->voltageSetPoint; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_StaticVarCompensator_capacitiveRating(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->capacitiveRating; if (!buffer.str().empty()) @@ -148,7 +146,8 @@ bool get_StaticVarCompensator_capacitiveRating(const BaseClass* BaseClass_ptr1, bool get_StaticVarCompensator_inductiveRating(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inductiveRating; if (!buffer.str().empty()) @@ -162,7 +161,8 @@ bool get_StaticVarCompensator_inductiveRating(const BaseClass* BaseClass_ptr1, s bool get_StaticVarCompensator_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q; if (!buffer.str().empty()) @@ -174,11 +174,12 @@ bool get_StaticVarCompensator_q(const BaseClass* BaseClass_ptr1, std::stringstre return false; } -bool get_StaticVarCompensator_slope(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_StaticVarCompensator_sVCControlMode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->slope; + buffer << element->sVCControlMode; if (!buffer.str().empty()) { return true; @@ -188,11 +189,12 @@ bool get_StaticVarCompensator_slope(const BaseClass* BaseClass_ptr1, std::string return false; } -bool get_StaticVarCompensator_voltageSetPoint(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_StaticVarCompensator_slope(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->voltageSetPoint; + buffer << element->slope; if (!buffer.str().empty()) { return true; @@ -202,13 +204,12 @@ bool get_StaticVarCompensator_voltageSetPoint(const BaseClass* BaseClass_ptr1, s return false; } - - -bool get_StaticVarCompensator_sVCControlMode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_StaticVarCompensator_voltageSetPoint(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->sVCControlMode; + buffer << element->voltageSetPoint; if (!buffer.str().empty()) { return true; @@ -226,17 +227,17 @@ const char* StaticVarCompensator::debugString() const void StaticVarCompensator::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:StaticVarCompensator"), &StaticVarCompensator_factory)); + factory_map.emplace("cim:StaticVarCompensator", &StaticVarCompensator_factory); } void StaticVarCompensator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:StaticVarCompensator.capacitiveRating"), &assign_StaticVarCompensator_capacitiveRating)); - assign_map.insert(std::make_pair(std::string("cim:StaticVarCompensator.inductiveRating"), &assign_StaticVarCompensator_inductiveRating)); - assign_map.insert(std::make_pair(std::string("cim:StaticVarCompensator.q"), &assign_StaticVarCompensator_q)); - assign_map.insert(std::make_pair(std::string("cim:StaticVarCompensator.sVCControlMode"), &assign_StaticVarCompensator_sVCControlMode)); - assign_map.insert(std::make_pair(std::string("cim:StaticVarCompensator.slope"), &assign_StaticVarCompensator_slope)); - assign_map.insert(std::make_pair(std::string("cim:StaticVarCompensator.voltageSetPoint"), &assign_StaticVarCompensator_voltageSetPoint)); + assign_map.emplace("cim:StaticVarCompensator.capacitiveRating", &assign_StaticVarCompensator_capacitiveRating); + assign_map.emplace("cim:StaticVarCompensator.inductiveRating", &assign_StaticVarCompensator_inductiveRating); + assign_map.emplace("cim:StaticVarCompensator.q", &assign_StaticVarCompensator_q); + assign_map.emplace("cim:StaticVarCompensator.sVCControlMode", &assign_StaticVarCompensator_sVCControlMode); + assign_map.emplace("cim:StaticVarCompensator.slope", &assign_StaticVarCompensator_slope); + assign_map.emplace("cim:StaticVarCompensator.voltageSetPoint", &assign_StaticVarCompensator_voltageSetPoint); } void StaticVarCompensator::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/StaticVarCompensator.hpp b/CGMES_2.4.15_27JAN2020/StaticVarCompensator.hpp index 02e2be550..b6770d818 100644 --- a/CGMES_2.4.15_27JAN2020/StaticVarCompensator.hpp +++ b/CGMES_2.4.15_27JAN2020/StaticVarCompensator.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A facility for providing variable and controllable shunt reactive power. The SVC typically consists of a stepdown transformer, filter, thyristor-controlled reactor, and thyristor-switched capacitor arms. The SVC may operate in fixed MVar output mode or in voltage control mode. When in voltage control mode, the output of the SVC will be proportional to the deviation of voltage at the controlled bus from the voltage setpoint. The SVC characteristic slope defines the proportion. If the voltage at the controlled bus is equal to the voltage setpoint, the SVC MVar output is zero. - */ + /** \brief A facility for providing variable and controllable shunt reactive power. The SVC typically consists of a stepdown transformer, filter, thyristor-controlled reactor, and thyristor-switched capacitor arms. The SVC may operate in fixed MVar output mode or in voltage control mode. When in voltage control mode, the output of the SVC will be proportional to the deviation of voltage at the controlled bus from the voltage setpoint. The SVC characteristic slope defines the proportion. If the voltage at the controlled bus is equal to the voltage setpoint, the SVC MVar output is zero. */ class StaticVarCompensator : public RegulatingCondEq { public: @@ -31,12 +29,23 @@ namespace CIMPP StaticVarCompensator(); ~StaticVarCompensator() override; - CIMPP::Reactance capacitiveRating; /* Maximum available capacitive reactance. Default: nullptr */ - CIMPP::Reactance inductiveRating; /* Maximum available inductive reactance. Default: nullptr */ - CIMPP::ReactivePower q; /* Reactive power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution. Default: nullptr */ - CIMPP::SVCControlMode sVCControlMode; /* SVC control mode. Default: 0 */ - CIMPP::VoltagePerReactivePower slope; /* The characteristics slope of an SVC defines how the reactive power output changes in proportion to the difference between the regulated bus voltage and the voltage setpoint. Default: nullptr */ - CIMPP::Voltage voltageSetPoint; /* The reactive power output of the SVC is proportional to the difference between the voltage at the regulated bus and the voltage setpoint. When the regulated bus voltage is equal to the voltage setpoint, the reactive power output is zero. Default: nullptr */ + /** \brief Maximum available capacitive reactance. Default: nullptr */ + CIMPP::Reactance capacitiveRating; + + /** \brief Maximum available inductive reactance. Default: nullptr */ + CIMPP::Reactance inductiveRating; + + /** \brief Reactive power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution. Default: nullptr */ + CIMPP::ReactivePower q; + + /** \brief SVC control mode. Default: 0 */ + CIMPP::SVCControlMode sVCControlMode; + + /** \brief The characteristics slope of an SVC defines how the reactive power output changes in proportion to the difference between the regulated bus voltage and the voltage setpoint. Default: nullptr */ + CIMPP::VoltagePerReactivePower slope; + + /** \brief The reactive power output of the SVC is proportional to the difference between the voltage at the regulated bus and the voltage setpoint. When the regulated bus voltage is equal to the voltage setpoint, the reactive power output is zero. Default: nullptr */ + CIMPP::Voltage voltageSetPoint; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/StationSupply.cpp b/CGMES_2.4.15_27JAN2020/StationSupply.cpp index 86990151b..71ca77084 100644 --- a/CGMES_2.4.15_27JAN2020/StationSupply.cpp +++ b/CGMES_2.4.15_27JAN2020/StationSupply.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -StationSupply::StationSupply() {}; -StationSupply::~StationSupply() {}; +StationSupply::StationSupply() {} +StationSupply::~StationSupply() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ StationSupply::getPossibleProfilesForAttributes() const return map; } - - - - - const char StationSupply::debugName[] = "StationSupply"; const char* StationSupply::debugString() const { @@ -52,7 +47,7 @@ const char* StationSupply::debugString() const void StationSupply::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:StationSupply"), &StationSupply_factory)); + factory_map.emplace("cim:StationSupply", &StationSupply_factory); } void StationSupply::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/StationSupply.hpp b/CGMES_2.4.15_27JAN2020/StationSupply.hpp index 728fd30bb..f95e7ce94 100644 --- a/CGMES_2.4.15_27JAN2020/StationSupply.hpp +++ b/CGMES_2.4.15_27JAN2020/StationSupply.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Station supply with load derived from the station output. - */ + /** \brief Station supply with load derived from the station output. */ class StationSupply : public EnergyConsumer { public: @@ -26,7 +24,6 @@ namespace CIMPP StationSupply(); ~StationSupply() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/SteadyStateHypothesisVersion.cpp b/CGMES_2.4.15_27JAN2020/SteadyStateHypothesisVersion.cpp index 802514ff4..3a521cfe8 100644 --- a/CGMES_2.4.15_27JAN2020/SteadyStateHypothesisVersion.cpp +++ b/CGMES_2.4.15_27JAN2020/SteadyStateHypothesisVersion.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "String.hpp" -#include "String.hpp" -#include "Date.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -SteadyStateHypothesisVersion::SteadyStateHypothesisVersion() {}; -SteadyStateHypothesisVersion::~SteadyStateHypothesisVersion() {}; +SteadyStateHypothesisVersion::SteadyStateHypothesisVersion() {} +SteadyStateHypothesisVersion::~SteadyStateHypothesisVersion() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ SteadyStateHypothesisVersion::getPossibleProfilesForAttributes() const return map; } - -bool assign_SteadyStateHypothesisVersion_baseUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SteadyStateHypothesisVersion_baseUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SteadyStateHypothesisVersion_baseURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SteadyStateHypothesisVersion_baseURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SteadyStateHypothesisVersion_date(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SteadyStateHypothesisVersion_date(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->date = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SteadyStateHypothesisVersion_differenceModelURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SteadyStateHypothesisVersion_differenceModelURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->differenceModelURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SteadyStateHypothesisVersion_entsoeUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SteadyStateHypothesisVersion_entsoeUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SteadyStateHypothesisVersion_entsoeURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SteadyStateHypothesisVersion_entsoeURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SteadyStateHypothesisVersion_modelDescriptionURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SteadyStateHypothesisVersion_modelDescriptionURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->modelDescriptionURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SteadyStateHypothesisVersion_namespaceRDF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SteadyStateHypothesisVersion_namespaceRDF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceRDF = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SteadyStateHypothesisVersion_namespaceUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SteadyStateHypothesisVersion_namespaceUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SteadyStateHypothesisVersion_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SteadyStateHypothesisVersion_shortName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->shortName = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_SteadyStateHypothesisVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseUML; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_SteadyStateHypothesisVersion_baseUML(const BaseClass* BaseClass_ptr1, s bool get_SteadyStateHypothesisVersion_baseURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseURI; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_SteadyStateHypothesisVersion_baseURI(const BaseClass* BaseClass_ptr1, s bool get_SteadyStateHypothesisVersion_date(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->date; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_SteadyStateHypothesisVersion_date(const BaseClass* BaseClass_ptr1, std: bool get_SteadyStateHypothesisVersion_differenceModelURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->differenceModelURI; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_SteadyStateHypothesisVersion_differenceModelURI(const BaseClass* BaseCl bool get_SteadyStateHypothesisVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeUML; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_SteadyStateHypothesisVersion_entsoeUML(const BaseClass* BaseClass_ptr1, bool get_SteadyStateHypothesisVersion_entsoeURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeURI; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_SteadyStateHypothesisVersion_entsoeURI(const BaseClass* BaseClass_ptr1, bool get_SteadyStateHypothesisVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->modelDescriptionURI; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_SteadyStateHypothesisVersion_modelDescriptionURI(const BaseClass* BaseC bool get_SteadyStateHypothesisVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceRDF; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_SteadyStateHypothesisVersion_namespaceRDF(const BaseClass* BaseClass_pt bool get_SteadyStateHypothesisVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceUML; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_SteadyStateHypothesisVersion_namespaceUML(const BaseClass* BaseClass_pt bool get_SteadyStateHypothesisVersion_shortName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1)) + const SteadyStateHypothesisVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortName; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_SteadyStateHypothesisVersion_shortName(const BaseClass* BaseClass_ptr1, return false; } - - const char SteadyStateHypothesisVersion::debugName[] = "SteadyStateHypothesisVersion"; const char* SteadyStateHypothesisVersion::debugString() const { @@ -341,21 +346,21 @@ const char* SteadyStateHypothesisVersion::debugString() const void SteadyStateHypothesisVersion::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SteadyStateHypothesisVersion"), &SteadyStateHypothesisVersion_factory)); + factory_map.emplace("cim:SteadyStateHypothesisVersion", &SteadyStateHypothesisVersion_factory); } void SteadyStateHypothesisVersion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SteadyStateHypothesisVersion.baseUML"), &assign_SteadyStateHypothesisVersion_baseUML)); - assign_map.insert(std::make_pair(std::string("cim:SteadyStateHypothesisVersion.baseURI"), &assign_SteadyStateHypothesisVersion_baseURI)); - assign_map.insert(std::make_pair(std::string("cim:SteadyStateHypothesisVersion.date"), &assign_SteadyStateHypothesisVersion_date)); - assign_map.insert(std::make_pair(std::string("cim:SteadyStateHypothesisVersion.differenceModelURI"), &assign_SteadyStateHypothesisVersion_differenceModelURI)); - assign_map.insert(std::make_pair(std::string("cim:SteadyStateHypothesisVersion.entsoeUML"), &assign_SteadyStateHypothesisVersion_entsoeUML)); - assign_map.insert(std::make_pair(std::string("cim:SteadyStateHypothesisVersion.entsoeURI"), &assign_SteadyStateHypothesisVersion_entsoeURI)); - assign_map.insert(std::make_pair(std::string("cim:SteadyStateHypothesisVersion.modelDescriptionURI"), &assign_SteadyStateHypothesisVersion_modelDescriptionURI)); - assign_map.insert(std::make_pair(std::string("cim:SteadyStateHypothesisVersion.namespaceRDF"), &assign_SteadyStateHypothesisVersion_namespaceRDF)); - assign_map.insert(std::make_pair(std::string("cim:SteadyStateHypothesisVersion.namespaceUML"), &assign_SteadyStateHypothesisVersion_namespaceUML)); - assign_map.insert(std::make_pair(std::string("cim:SteadyStateHypothesisVersion.shortName"), &assign_SteadyStateHypothesisVersion_shortName)); + assign_map.emplace("cim:SteadyStateHypothesisVersion.baseUML", &assign_SteadyStateHypothesisVersion_baseUML); + assign_map.emplace("cim:SteadyStateHypothesisVersion.baseURI", &assign_SteadyStateHypothesisVersion_baseURI); + assign_map.emplace("cim:SteadyStateHypothesisVersion.date", &assign_SteadyStateHypothesisVersion_date); + assign_map.emplace("cim:SteadyStateHypothesisVersion.differenceModelURI", &assign_SteadyStateHypothesisVersion_differenceModelURI); + assign_map.emplace("cim:SteadyStateHypothesisVersion.entsoeUML", &assign_SteadyStateHypothesisVersion_entsoeUML); + assign_map.emplace("cim:SteadyStateHypothesisVersion.entsoeURI", &assign_SteadyStateHypothesisVersion_entsoeURI); + assign_map.emplace("cim:SteadyStateHypothesisVersion.modelDescriptionURI", &assign_SteadyStateHypothesisVersion_modelDescriptionURI); + assign_map.emplace("cim:SteadyStateHypothesisVersion.namespaceRDF", &assign_SteadyStateHypothesisVersion_namespaceRDF); + assign_map.emplace("cim:SteadyStateHypothesisVersion.namespaceUML", &assign_SteadyStateHypothesisVersion_namespaceUML); + assign_map.emplace("cim:SteadyStateHypothesisVersion.shortName", &assign_SteadyStateHypothesisVersion_shortName); } void SteadyStateHypothesisVersion::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/SteadyStateHypothesisVersion.hpp b/CGMES_2.4.15_27JAN2020/SteadyStateHypothesisVersion.hpp index 007f35230..a856a19e7 100644 --- a/CGMES_2.4.15_27JAN2020/SteadyStateHypothesisVersion.hpp +++ b/CGMES_2.4.15_27JAN2020/SteadyStateHypothesisVersion.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Version details. - */ + /** \brief Version details. */ class SteadyStateHypothesisVersion : public BaseClass { public: @@ -28,16 +26,35 @@ namespace CIMPP SteadyStateHypothesisVersion(); ~SteadyStateHypothesisVersion() override; - CIMPP::String baseUML; /* Base UML provided by CIM model manager. Default: '' */ - CIMPP::String baseURI; /* Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ - CIMPP::Date date; /* Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ - CIMPP::String differenceModelURI; /* Difference model URI defined by IEC 61970-552. Default: '' */ - CIMPP::String entsoeUML; /* UML provided by ENTSO-E. Default: '' */ - CIMPP::String entsoeURI; /* Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/SteadyStateHypothesis/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ - CIMPP::String modelDescriptionURI; /* Model Description URI defined by IEC 61970-552. Default: '' */ - CIMPP::String namespaceRDF; /* RDF namespace. Default: '' */ - CIMPP::String namespaceUML; /* CIM UML namespace. Default: '' */ - CIMPP::String shortName; /* The short name of the profile used in profile documentation. Default: '' */ + /** \brief Base UML provided by CIM model manager. Default: '' */ + CIMPP::String baseUML; + + /** \brief Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ + CIMPP::String baseURI; + + /** \brief Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ + CIMPP::Date date; + + /** \brief Difference model URI defined by IEC 61970-552. Default: '' */ + CIMPP::String differenceModelURI; + + /** \brief UML provided by ENTSO-E. Default: '' */ + CIMPP::String entsoeUML; + + /** \brief Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/SteadyStateHypothesis/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ + CIMPP::String entsoeURI; + + /** \brief Model Description URI defined by IEC 61970-552. Default: '' */ + CIMPP::String modelDescriptionURI; + + /** \brief RDF namespace. Default: '' */ + CIMPP::String namespaceRDF; + + /** \brief CIM UML namespace. Default: '' */ + CIMPP::String namespaceUML; + + /** \brief The short name of the profile used in profile documentation. Default: '' */ + CIMPP::String shortName; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/String.hpp b/CGMES_2.4.15_27JAN2020/String.hpp index 60fcbbbc0..8c3dbedcf 100644 --- a/CGMES_2.4.15_27JAN2020/String.hpp +++ b/CGMES_2.4.15_27JAN2020/String.hpp @@ -4,22 +4,20 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen */ -#include #include #include +#include namespace CIMPP { - /* - A string consisting of a sequence of characters. The character encoding is UTF-8. The string length is unspecified and unlimited. - */ + /** \brief A string consisting of a sequence of characters. The character encoding is UTF-8. The string length is unspecified and unlimited. */ class String { public: String() : initialized(false) {} String(const std::string& value) : value(value), initialized(true) {} - String& operator=(const std::string &rop); + String& operator=(const std::string& rop); operator std::string() const; std::string value; diff --git a/CGMES_2.4.15_27JAN2020/StringMeasurement.cpp b/CGMES_2.4.15_27JAN2020/StringMeasurement.cpp index 6b03b449d..ca7025e57 100644 --- a/CGMES_2.4.15_27JAN2020/StringMeasurement.cpp +++ b/CGMES_2.4.15_27JAN2020/StringMeasurement.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -StringMeasurement::StringMeasurement() {}; -StringMeasurement::~StringMeasurement() {}; +StringMeasurement::StringMeasurement() {} +StringMeasurement::~StringMeasurement() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ StringMeasurement::getPossibleProfilesForAttributes() const return map; } - - bool assign_StringMeasurementValue_StringMeasurement(BaseClass*, BaseClass*); bool assign_StringMeasurement_StringMeasurementValues(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_StringMeasurement_StringMeasurementValues(BaseClass* BaseClass_ptr1, } - const char StringMeasurement::debugName[] = "StringMeasurement"; const char* StringMeasurement::debugString() const { @@ -69,7 +66,7 @@ const char* StringMeasurement::debugString() const void StringMeasurement::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:StringMeasurement"), &StringMeasurement_factory)); + factory_map.emplace("cim:StringMeasurement", &StringMeasurement_factory); } void StringMeasurement::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void StringMeasurement::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:StringMeasurement.StringMeasurementValues"), &assign_StringMeasurement_StringMeasurementValues)); + assign_map.emplace("cim:StringMeasurement.StringMeasurementValues", &assign_StringMeasurement_StringMeasurementValues); } void StringMeasurement::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/StringMeasurement.hpp b/CGMES_2.4.15_27JAN2020/StringMeasurement.hpp index a4e95edb8..21841ff08 100644 --- a/CGMES_2.4.15_27JAN2020/StringMeasurement.hpp +++ b/CGMES_2.4.15_27JAN2020/StringMeasurement.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class StringMeasurementValue; - /* - StringMeasurement represents a measurement with values of type string. - */ + /** \brief StringMeasurement represents a measurement with values of type string. */ class StringMeasurement : public Measurement { public: @@ -27,7 +25,8 @@ namespace CIMPP StringMeasurement(); ~StringMeasurement() override; - std::list StringMeasurementValues; /* The values connected to this measurement. Default: 0 */ + /** \brief The values connected to this measurement. Default: 0 */ + std::list StringMeasurementValues; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/StringMeasurementValue.cpp b/CGMES_2.4.15_27JAN2020/StringMeasurementValue.cpp index 57ab9da48..217c82c6c 100644 --- a/CGMES_2.4.15_27JAN2020/StringMeasurementValue.cpp +++ b/CGMES_2.4.15_27JAN2020/StringMeasurementValue.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "StringMeasurement.hpp" -#include "String.hpp" using namespace CIMPP; -StringMeasurementValue::StringMeasurementValue() : StringMeasurement(nullptr) {}; -StringMeasurementValue::~StringMeasurementValue() {}; +StringMeasurementValue::StringMeasurementValue() : StringMeasurement(nullptr) {} +StringMeasurementValue::~StringMeasurementValue() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ StringMeasurementValue::getPossibleProfilesForAttributes() const return map; } - -bool assign_StringMeasurementValue_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (StringMeasurementValue* element = dynamic_cast(BaseClass_ptr1)) - { - element->value = buffer.str(); - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_StringMeasurement_StringMeasurementValues(BaseClass*, BaseClass*); bool assign_StringMeasurementValue_StringMeasurement(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_StringMeasurementValue_StringMeasurement(BaseClass* BaseClass_ptr1, return false; } -bool get_StringMeasurementValue_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_StringMeasurementValue_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const StringMeasurementValue* element = dynamic_cast(BaseClass_ptr1)) + StringMeasurementValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->value; - if (!buffer.str().empty()) + element->value = buffer.str(); + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_StringMeasurementValue_StringMeasurement(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const StringMeasurementValue* element = dynamic_cast(BaseClass_ptr1)) + const StringMeasurementValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->StringMeasurement != 0) { @@ -102,6 +86,20 @@ bool get_StringMeasurementValue_StringMeasurement(const BaseClass* BaseClass_ptr return false; } +bool get_StringMeasurementValue_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const StringMeasurementValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->value; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char StringMeasurementValue::debugName[] = "StringMeasurementValue"; const char* StringMeasurementValue::debugString() const @@ -111,17 +109,17 @@ const char* StringMeasurementValue::debugString() const void StringMeasurementValue::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:StringMeasurementValue"), &StringMeasurementValue_factory)); + factory_map.emplace("cim:StringMeasurementValue", &StringMeasurementValue_factory); } void StringMeasurementValue::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:StringMeasurementValue.value"), &assign_StringMeasurementValue_value)); + assign_map.emplace("cim:StringMeasurementValue.value", &assign_StringMeasurementValue_value); } void StringMeasurementValue::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:StringMeasurementValue.StringMeasurement"), &assign_StringMeasurementValue_StringMeasurement)); + assign_map.emplace("cim:StringMeasurementValue.StringMeasurement", &assign_StringMeasurementValue_StringMeasurement); } void StringMeasurementValue::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/StringMeasurementValue.hpp b/CGMES_2.4.15_27JAN2020/StringMeasurementValue.hpp index 2c22c626b..1207671b5 100644 --- a/CGMES_2.4.15_27JAN2020/StringMeasurementValue.hpp +++ b/CGMES_2.4.15_27JAN2020/StringMeasurementValue.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class StringMeasurement; - /* - StringMeasurementValue represents a measurement value of type string. - */ + /** \brief StringMeasurementValue represents a measurement value of type string. */ class StringMeasurementValue : public MeasurementValue { public: @@ -28,8 +26,11 @@ namespace CIMPP StringMeasurementValue(); ~StringMeasurementValue() override; - CIMPP::StringMeasurement* StringMeasurement; /* Measurement to which this value is connected. Default: 0 */ - CIMPP::String value; /* The value to supervise. Default: '' */ + /** \brief Measurement to which this value is connected. Default: 0 */ + CIMPP::StringMeasurement* StringMeasurement; + + /** \brief The value to supervise. Default: '' */ + CIMPP::String value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/SubGeographicalRegion.cpp b/CGMES_2.4.15_27JAN2020/SubGeographicalRegion.cpp index ed9222e4d..2bc1a8c1b 100644 --- a/CGMES_2.4.15_27JAN2020/SubGeographicalRegion.cpp +++ b/CGMES_2.4.15_27JAN2020/SubGeographicalRegion.cpp @@ -9,14 +9,14 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "DCLine.hpp" -#include "Line.hpp" #include "GeographicalRegion.hpp" +#include "Line.hpp" #include "Substation.hpp" using namespace CIMPP; -SubGeographicalRegion::SubGeographicalRegion() : Region(nullptr) {}; -SubGeographicalRegion::~SubGeographicalRegion() {}; +SubGeographicalRegion::SubGeographicalRegion() : Region(nullptr) {} +SubGeographicalRegion::~SubGeographicalRegion() {} static const std::list PossibleProfilesForClass = { @@ -47,8 +47,6 @@ SubGeographicalRegion::getPossibleProfilesForAttributes() const return map; } - - bool assign_DCLine_Region(BaseClass*, BaseClass*); bool assign_SubGeographicalRegion_DCLines(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -65,6 +63,7 @@ bool assign_SubGeographicalRegion_DCLines(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_Line_Region(BaseClass*, BaseClass*); bool assign_SubGeographicalRegion_Lines(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -81,6 +80,7 @@ bool assign_SubGeographicalRegion_Lines(BaseClass* BaseClass_ptr1, BaseClass* Ba } return false; } + bool assign_GeographicalRegion_Regions(BaseClass*, BaseClass*); bool assign_SubGeographicalRegion_Region(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -97,6 +97,7 @@ bool assign_SubGeographicalRegion_Region(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_Substation_Region(BaseClass*, BaseClass*); bool assign_SubGeographicalRegion_Substations(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -115,9 +116,11 @@ bool assign_SubGeographicalRegion_Substations(BaseClass* BaseClass_ptr1, BaseCla } + bool get_SubGeographicalRegion_Region(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SubGeographicalRegion* element = dynamic_cast(BaseClass_ptr1)) + const SubGeographicalRegion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Region != 0) { @@ -137,7 +140,7 @@ const char* SubGeographicalRegion::debugString() const void SubGeographicalRegion::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SubGeographicalRegion"), &SubGeographicalRegion_factory)); + factory_map.emplace("cim:SubGeographicalRegion", &SubGeographicalRegion_factory); } void SubGeographicalRegion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -146,10 +149,10 @@ void SubGeographicalRegion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SubGeographicalRegion.DCLines"), &assign_SubGeographicalRegion_DCLines)); - assign_map.insert(std::make_pair(std::string("cim:SubGeographicalRegion.Lines"), &assign_SubGeographicalRegion_Lines)); - assign_map.insert(std::make_pair(std::string("cim:SubGeographicalRegion.Region"), &assign_SubGeographicalRegion_Region)); - assign_map.insert(std::make_pair(std::string("cim:SubGeographicalRegion.Substations"), &assign_SubGeographicalRegion_Substations)); + assign_map.emplace("cim:SubGeographicalRegion.DCLines", &assign_SubGeographicalRegion_DCLines); + assign_map.emplace("cim:SubGeographicalRegion.Lines", &assign_SubGeographicalRegion_Lines); + assign_map.emplace("cim:SubGeographicalRegion.Region", &assign_SubGeographicalRegion_Region); + assign_map.emplace("cim:SubGeographicalRegion.Substations", &assign_SubGeographicalRegion_Substations); } void SubGeographicalRegion::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/SubGeographicalRegion.hpp b/CGMES_2.4.15_27JAN2020/SubGeographicalRegion.hpp index 72c6f96f9..27232b895 100644 --- a/CGMES_2.4.15_27JAN2020/SubGeographicalRegion.hpp +++ b/CGMES_2.4.15_27JAN2020/SubGeographicalRegion.hpp @@ -20,9 +20,7 @@ namespace CIMPP class Line; class Substation; - /* - A subset of a geographical region of a power system network model. - */ + /** \brief A subset of a geographical region of a power system network model. */ class SubGeographicalRegion : public IdentifiedObject { public: @@ -30,10 +28,17 @@ namespace CIMPP SubGeographicalRegion(); ~SubGeographicalRegion() override; - std::list DCLines; /* Default: 0 */ - std::list Lines; /* The sub-geographical region of the line. Default: 0 */ - CIMPP::GeographicalRegion* Region; /* The geographical region to which this sub-geographical region is within. Default: 0 */ - std::list Substations; /* The substations in this sub-geographical region. Default: 0 */ + /** \brief Default: 0 */ + std::list DCLines; + + /** \brief The sub-geographical region of the line. Default: 0 */ + std::list Lines; + + /** \brief The geographical region to which this sub-geographical region is within. Default: 0 */ + CIMPP::GeographicalRegion* Region; + + /** \brief The substations in this sub-geographical region. Default: 0 */ + std::list Substations; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/SubLoadArea.cpp b/CGMES_2.4.15_27JAN2020/SubLoadArea.cpp index 6cf7e03f8..b14f7db79 100644 --- a/CGMES_2.4.15_27JAN2020/SubLoadArea.cpp +++ b/CGMES_2.4.15_27JAN2020/SubLoadArea.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -SubLoadArea::SubLoadArea() : LoadArea(nullptr) {}; -SubLoadArea::~SubLoadArea() {}; +SubLoadArea::SubLoadArea() : LoadArea(nullptr) {} +SubLoadArea::~SubLoadArea() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ SubLoadArea::getPossibleProfilesForAttributes() const return map; } - - bool assign_LoadArea_SubLoadAreas(BaseClass*, BaseClass*); bool assign_SubLoadArea_LoadArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_SubLoadArea_LoadArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass } return false; } + bool assign_LoadGroup_SubLoadArea(BaseClass*, BaseClass*); bool assign_SubLoadArea_LoadGroups(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_SubLoadArea_LoadGroups(BaseClass* BaseClass_ptr1, BaseClass* BaseCla return false; } - bool get_SubLoadArea_LoadArea(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SubLoadArea* element = dynamic_cast(BaseClass_ptr1)) + const SubLoadArea* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->LoadArea != 0) { @@ -100,7 +99,7 @@ const char* SubLoadArea::debugString() const void SubLoadArea::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SubLoadArea"), &SubLoadArea_factory)); + factory_map.emplace("cim:SubLoadArea", &SubLoadArea_factory); } void SubLoadArea::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -109,8 +108,8 @@ void SubLoadArea::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SubLoadArea.LoadArea"), &assign_SubLoadArea_LoadArea)); - assign_map.insert(std::make_pair(std::string("cim:SubLoadArea.LoadGroups"), &assign_SubLoadArea_LoadGroups)); + assign_map.emplace("cim:SubLoadArea.LoadArea", &assign_SubLoadArea_LoadArea); + assign_map.emplace("cim:SubLoadArea.LoadGroups", &assign_SubLoadArea_LoadGroups); } void SubLoadArea::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/SubLoadArea.hpp b/CGMES_2.4.15_27JAN2020/SubLoadArea.hpp index 6d39dc9ee..eb2947510 100644 --- a/CGMES_2.4.15_27JAN2020/SubLoadArea.hpp +++ b/CGMES_2.4.15_27JAN2020/SubLoadArea.hpp @@ -18,9 +18,7 @@ namespace CIMPP class LoadArea; class LoadGroup; - /* - The class is the second level in a hierarchical structure for grouping of loads for the purpose of load flow load scaling. - */ + /** \brief The class is the second level in a hierarchical structure for grouping of loads for the purpose of load flow load scaling. */ class SubLoadArea : public EnergyArea { public: @@ -28,8 +26,11 @@ namespace CIMPP SubLoadArea(); ~SubLoadArea() override; - CIMPP::LoadArea* LoadArea; /* The LoadArea where the SubLoadArea belongs. Default: 0 */ - std::list LoadGroups; /* The Loadgroups in the SubLoadArea. Default: 0 */ + /** \brief The LoadArea where the SubLoadArea belongs. Default: 0 */ + CIMPP::LoadArea* LoadArea; + + /** \brief The Loadgroups in the SubLoadArea. Default: 0 */ + std::list LoadGroups; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Substation.cpp b/CGMES_2.4.15_27JAN2020/Substation.cpp index 8a8f525bf..d0d5471ff 100644 --- a/CGMES_2.4.15_27JAN2020/Substation.cpp +++ b/CGMES_2.4.15_27JAN2020/Substation.cpp @@ -14,8 +14,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Substation::Substation() : Region(nullptr) {}; -Substation::~Substation() {}; +Substation::Substation() : Region(nullptr) {} +Substation::~Substation() {} static const std::list PossibleProfilesForClass = { @@ -44,8 +44,6 @@ Substation::getPossibleProfilesForAttributes() const return map; } - - bool assign_DCConverterUnit_Substation(BaseClass*, BaseClass*); bool assign_Substation_DCConverterUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -62,6 +60,7 @@ bool assign_Substation_DCConverterUnit(BaseClass* BaseClass_ptr1, BaseClass* Bas } return false; } + bool assign_SubGeographicalRegion_Substations(BaseClass*, BaseClass*); bool assign_Substation_Region(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -78,6 +77,7 @@ bool assign_Substation_Region(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_pt } return false; } + bool assign_VoltageLevel_Substation(BaseClass*, BaseClass*); bool assign_Substation_VoltageLevels(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -98,7 +98,8 @@ bool assign_Substation_VoltageLevels(BaseClass* BaseClass_ptr1, BaseClass* BaseC bool get_Substation_Region(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Substation* element = dynamic_cast(BaseClass_ptr1)) + const Substation* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Region != 0) { @@ -118,7 +119,7 @@ const char* Substation::debugString() const void Substation::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Substation"), &Substation_factory)); + factory_map.emplace("cim:Substation", &Substation_factory); } void Substation::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -127,9 +128,9 @@ void Substation::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Substation.DCConverterUnit"), &assign_Substation_DCConverterUnit)); - assign_map.insert(std::make_pair(std::string("cim:Substation.Region"), &assign_Substation_Region)); - assign_map.insert(std::make_pair(std::string("cim:Substation.VoltageLevels"), &assign_Substation_VoltageLevels)); + assign_map.emplace("cim:Substation.DCConverterUnit", &assign_Substation_DCConverterUnit); + assign_map.emplace("cim:Substation.Region", &assign_Substation_Region); + assign_map.emplace("cim:Substation.VoltageLevels", &assign_Substation_VoltageLevels); } void Substation::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/Substation.hpp b/CGMES_2.4.15_27JAN2020/Substation.hpp index ddeb6c98f..57ef9396c 100644 --- a/CGMES_2.4.15_27JAN2020/Substation.hpp +++ b/CGMES_2.4.15_27JAN2020/Substation.hpp @@ -19,9 +19,7 @@ namespace CIMPP class SubGeographicalRegion; class VoltageLevel; - /* - A collection of equipment for purposes other than generation or utilization, through which electric energy in bulk is passed for the purposes of switching or modifying its characteristics. - */ + /** \brief A collection of equipment for purposes other than generation or utilization, through which electric energy in bulk is passed for the purposes of switching or modifying its characteristics. */ class Substation : public EquipmentContainer { public: @@ -29,9 +27,14 @@ namespace CIMPP Substation(); ~Substation() override; - std::list DCConverterUnit; /* Default: 0 */ - CIMPP::SubGeographicalRegion* Region; /* The SubGeographicalRegion containing the substation. Default: 0 */ - std::list VoltageLevels; /* The voltage levels within this substation. Default: 0 */ + /** \brief Default: 0 */ + std::list DCConverterUnit; + + /** \brief The SubGeographicalRegion containing the substation. Default: 0 */ + CIMPP::SubGeographicalRegion* Region; + + /** \brief The voltage levels within this substation. Default: 0 */ + std::list VoltageLevels; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Susceptance.hpp b/CGMES_2.4.15_27JAN2020/Susceptance.hpp index c213337b1..f98655834 100644 --- a/CGMES_2.4.15_27JAN2020/Susceptance.hpp +++ b/CGMES_2.4.15_27JAN2020/Susceptance.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Imaginary part of admittance. - */ + /** \brief Imaginary part of admittance. */ class Susceptance { public: diff --git a/CGMES_2.4.15_27JAN2020/SvInjection.cpp b/CGMES_2.4.15_27JAN2020/SvInjection.cpp index 568fdb45e..4b2198756 100644 --- a/CGMES_2.4.15_27JAN2020/SvInjection.cpp +++ b/CGMES_2.4.15_27JAN2020/SvInjection.cpp @@ -9,13 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "TopologicalNode.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" using namespace CIMPP; -SvInjection::SvInjection() : TopologicalNode(nullptr) {}; -SvInjection::~SvInjection() {}; +SvInjection::SvInjection() : TopologicalNode(nullptr) {} +SvInjection::~SvInjection() {} static const std::list PossibleProfilesForClass = { @@ -44,70 +42,71 @@ SvInjection::getPossibleProfilesForAttributes() const return map; } - -bool assign_SvInjection_pInjection(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologicalNode_SvInjection(BaseClass*, BaseClass*); +bool assign_SvInjection_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (SvInjection* element = dynamic_cast(BaseClass_ptr1)) + SvInjection* element = dynamic_cast(BaseClass_ptr1); + TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->pInjection; - if (buffer.fail()) - return false; - else - return true; + if (element->TopologicalNode != element2) + { + element->TopologicalNode = element2; + return assign_TopologicalNode_SvInjection(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_SvInjection_qInjection(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SvInjection_pInjection(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SvInjection* element = dynamic_cast(BaseClass_ptr1)) + SvInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->qInjection; - if (buffer.fail()) - return false; - else + buffer >> element->pInjection; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_TopologicalNode_SvInjection(BaseClass*, BaseClass*); -bool assign_SvInjection_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_SvInjection_qInjection(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { SvInjection* element = dynamic_cast(BaseClass_ptr1); - TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->TopologicalNode != element2) + buffer >> element->qInjection; + if (!buffer.fail()) { - element->TopologicalNode = element2; - return assign_TopologicalNode_SvInjection(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool get_SvInjection_pInjection(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SvInjection_TopologicalNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SvInjection* element = dynamic_cast(BaseClass_ptr1)) + const SvInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->pInjection; - if (!buffer.str().empty()) + if (element->TopologicalNode != 0) { + BaseClass_list.push_back(element->TopologicalNode); return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_SvInjection_qInjection(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SvInjection_pInjection(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SvInjection* element = dynamic_cast(BaseClass_ptr1)) + const SvInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->qInjection; + buffer << element->pInjection; if (!buffer.str().empty()) { return true; @@ -117,21 +116,21 @@ bool get_SvInjection_qInjection(const BaseClass* BaseClass_ptr1, std::stringstre return false; } - -bool get_SvInjection_TopologicalNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) +bool get_SvInjection_qInjection(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SvInjection* element = dynamic_cast(BaseClass_ptr1)) + const SvInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->TopologicalNode != 0) + buffer << element->qInjection; + if (!buffer.str().empty()) { - BaseClass_list.push_back(element->TopologicalNode); return true; } } + buffer.setstate(std::ios::failbit); return false; } - const char SvInjection::debugName[] = "SvInjection"; const char* SvInjection::debugString() const { @@ -140,18 +139,18 @@ const char* SvInjection::debugString() const void SvInjection::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SvInjection"), &SvInjection_factory)); + factory_map.emplace("cim:SvInjection", &SvInjection_factory); } void SvInjection::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvInjection.pInjection"), &assign_SvInjection_pInjection)); - assign_map.insert(std::make_pair(std::string("cim:SvInjection.qInjection"), &assign_SvInjection_qInjection)); + assign_map.emplace("cim:SvInjection.pInjection", &assign_SvInjection_pInjection); + assign_map.emplace("cim:SvInjection.qInjection", &assign_SvInjection_qInjection); } void SvInjection::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvInjection.TopologicalNode"), &assign_SvInjection_TopologicalNode)); + assign_map.emplace("cim:SvInjection.TopologicalNode", &assign_SvInjection_TopologicalNode); } void SvInjection::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/SvInjection.hpp b/CGMES_2.4.15_27JAN2020/SvInjection.hpp index 88e58a1b2..73b97137a 100644 --- a/CGMES_2.4.15_27JAN2020/SvInjection.hpp +++ b/CGMES_2.4.15_27JAN2020/SvInjection.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class TopologicalNode; - /* - The SvInjection is reporting the calculated bus injection minus the sum of the terminal flows. The terminal flow is positive out from the bus (load sign convention) and bus injection has positive flow into the bus. SvInjection may have the remainder after state estimation or slack after power flow calculation. - */ + /** \brief The SvInjection is reporting the calculated bus injection minus the sum of the terminal flows. The terminal flow is positive out from the bus (load sign convention) and bus injection has positive flow into the bus. SvInjection may have the remainder after state estimation or slack after power flow calculation. */ class SvInjection : public BaseClass { public: @@ -29,9 +27,14 @@ namespace CIMPP SvInjection(); ~SvInjection() override; - CIMPP::TopologicalNode* TopologicalNode; /* The injection flows state variables associated with the topological node. Default: 0 */ - CIMPP::ActivePower pInjection; /* The active power injected into the bus in addition to injections from equipment terminals. Positive sign means injection into the TopologicalNode (bus). Default: nullptr */ - CIMPP::ReactivePower qInjection; /* The reactive power injected into the bus in addition to injections from equipment terminals. Positive sign means injection into the TopologicalNode (bus). Default: nullptr */ + /** \brief The injection flows state variables associated with the topological node. Default: 0 */ + CIMPP::TopologicalNode* TopologicalNode; + + /** \brief The active power injected into the bus in addition to injections from equipment terminals. Positive sign means injection into the TopologicalNode (bus). Default: nullptr */ + CIMPP::ActivePower pInjection; + + /** \brief The reactive power injected into the bus in addition to injections from equipment terminals. Positive sign means injection into the TopologicalNode (bus). Default: nullptr */ + CIMPP::ReactivePower qInjection; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/SvPowerFlow.cpp b/CGMES_2.4.15_27JAN2020/SvPowerFlow.cpp index c2d0e86a0..dfc4eab2e 100644 --- a/CGMES_2.4.15_27JAN2020/SvPowerFlow.cpp +++ b/CGMES_2.4.15_27JAN2020/SvPowerFlow.cpp @@ -9,13 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "Terminal.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" using namespace CIMPP; -SvPowerFlow::SvPowerFlow() : Terminal(nullptr) {}; -SvPowerFlow::~SvPowerFlow() {}; +SvPowerFlow::SvPowerFlow() : Terminal(nullptr) {} +SvPowerFlow::~SvPowerFlow() {} static const std::list PossibleProfilesForClass = { @@ -44,70 +42,71 @@ SvPowerFlow::getPossibleProfilesForAttributes() const return map; } - -bool assign_SvPowerFlow_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Terminal_SvPowerFlow(BaseClass*, BaseClass*); +bool assign_SvPowerFlow_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (SvPowerFlow* element = dynamic_cast(BaseClass_ptr1)) + SvPowerFlow* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->p; - if (buffer.fail()) - return false; - else - return true; + if (element->Terminal != element2) + { + element->Terminal = element2; + return assign_Terminal_SvPowerFlow(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_SvPowerFlow_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SvPowerFlow_p(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SvPowerFlow* element = dynamic_cast(BaseClass_ptr1)) + SvPowerFlow* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->q; - if (buffer.fail()) - return false; - else + buffer >> element->p; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_Terminal_SvPowerFlow(BaseClass*, BaseClass*); -bool assign_SvPowerFlow_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_SvPowerFlow_q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { SvPowerFlow* element = dynamic_cast(BaseClass_ptr1); - Terminal* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->Terminal != element2) + buffer >> element->q; + if (!buffer.fail()) { - element->Terminal = element2; - return assign_Terminal_SvPowerFlow(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool get_SvPowerFlow_p(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SvPowerFlow_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SvPowerFlow* element = dynamic_cast(BaseClass_ptr1)) + const SvPowerFlow* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->p; - if (!buffer.str().empty()) + if (element->Terminal != 0) { + BaseClass_list.push_back(element->Terminal); return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_SvPowerFlow_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SvPowerFlow_p(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SvPowerFlow* element = dynamic_cast(BaseClass_ptr1)) + const SvPowerFlow* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->q; + buffer << element->p; if (!buffer.str().empty()) { return true; @@ -117,21 +116,21 @@ bool get_SvPowerFlow_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - -bool get_SvPowerFlow_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) +bool get_SvPowerFlow_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SvPowerFlow* element = dynamic_cast(BaseClass_ptr1)) + const SvPowerFlow* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->Terminal != 0) + buffer << element->q; + if (!buffer.str().empty()) { - BaseClass_list.push_back(element->Terminal); return true; } } + buffer.setstate(std::ios::failbit); return false; } - const char SvPowerFlow::debugName[] = "SvPowerFlow"; const char* SvPowerFlow::debugString() const { @@ -140,18 +139,18 @@ const char* SvPowerFlow::debugString() const void SvPowerFlow::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SvPowerFlow"), &SvPowerFlow_factory)); + factory_map.emplace("cim:SvPowerFlow", &SvPowerFlow_factory); } void SvPowerFlow::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvPowerFlow.p"), &assign_SvPowerFlow_p)); - assign_map.insert(std::make_pair(std::string("cim:SvPowerFlow.q"), &assign_SvPowerFlow_q)); + assign_map.emplace("cim:SvPowerFlow.p", &assign_SvPowerFlow_p); + assign_map.emplace("cim:SvPowerFlow.q", &assign_SvPowerFlow_q); } void SvPowerFlow::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvPowerFlow.Terminal"), &assign_SvPowerFlow_Terminal)); + assign_map.emplace("cim:SvPowerFlow.Terminal", &assign_SvPowerFlow_Terminal); } void SvPowerFlow::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/SvPowerFlow.hpp b/CGMES_2.4.15_27JAN2020/SvPowerFlow.hpp index b42f057c1..a27cce2a2 100644 --- a/CGMES_2.4.15_27JAN2020/SvPowerFlow.hpp +++ b/CGMES_2.4.15_27JAN2020/SvPowerFlow.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class Terminal; - /* - State variable for power flow. Load convention is used for flow direction. This means flow out from the TopologicalNode into the equipment is positive. - */ + /** \brief State variable for power flow. Load convention is used for flow direction. This means flow out from the TopologicalNode into the equipment is positive. */ class SvPowerFlow : public BaseClass { public: @@ -29,9 +27,14 @@ namespace CIMPP SvPowerFlow(); ~SvPowerFlow() override; - CIMPP::Terminal* Terminal; /* The terminal associated with the power flow state variable. Default: 0 */ - CIMPP::ActivePower p; /* The active power flow. Load sign convention is used, i.e. positive sign means flow out from a TopologicalNode (bus) into the conducting equipment. Default: nullptr */ - CIMPP::ReactivePower q; /* The reactive power flow. Load sign convention is used, i.e. positive sign means flow out from a TopologicalNode (bus) into the conducting equipment. Default: nullptr */ + /** \brief The terminal associated with the power flow state variable. Default: 0 */ + CIMPP::Terminal* Terminal; + + /** \brief The active power flow. Load sign convention is used, i.e. positive sign means flow out from a TopologicalNode (bus) into the conducting equipment. Default: nullptr */ + CIMPP::ActivePower p; + + /** \brief The reactive power flow. Load sign convention is used, i.e. positive sign means flow out from a TopologicalNode (bus) into the conducting equipment. Default: nullptr */ + CIMPP::ReactivePower q; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/SvShuntCompensatorSections.cpp b/CGMES_2.4.15_27JAN2020/SvShuntCompensatorSections.cpp index ea26dfa08..a14be0d1b 100644 --- a/CGMES_2.4.15_27JAN2020/SvShuntCompensatorSections.cpp +++ b/CGMES_2.4.15_27JAN2020/SvShuntCompensatorSections.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ShuntCompensator.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -SvShuntCompensatorSections::SvShuntCompensatorSections() : ShuntCompensator(nullptr) {}; -SvShuntCompensatorSections::~SvShuntCompensatorSections() {}; +SvShuntCompensatorSections::SvShuntCompensatorSections() : ShuntCompensator(nullptr) {} +SvShuntCompensatorSections::~SvShuntCompensatorSections() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ SvShuntCompensatorSections::getPossibleProfilesForAttributes() const return map; } - -bool assign_SvShuntCompensatorSections_sections(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (SvShuntCompensatorSections* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->sections; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ShuntCompensator_SvShuntCompensatorSections(BaseClass*, BaseClass*); bool assign_SvShuntCompensatorSections_ShuntCompensator(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_SvShuntCompensatorSections_ShuntCompensator(BaseClass* BaseClass_ptr return false; } -bool get_SvShuntCompensatorSections_sections(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_SvShuntCompensatorSections_sections(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const SvShuntCompensatorSections* element = dynamic_cast(BaseClass_ptr1)) + SvShuntCompensatorSections* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->sections; - if (!buffer.str().empty()) + buffer >> element->sections; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_SvShuntCompensatorSections_ShuntCompensator(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SvShuntCompensatorSections* element = dynamic_cast(BaseClass_ptr1)) + const SvShuntCompensatorSections* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ShuntCompensator != 0) { @@ -102,6 +86,20 @@ bool get_SvShuntCompensatorSections_ShuntCompensator(const BaseClass* BaseClass_ return false; } +bool get_SvShuntCompensatorSections_sections(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const SvShuntCompensatorSections* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->sections; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char SvShuntCompensatorSections::debugName[] = "SvShuntCompensatorSections"; const char* SvShuntCompensatorSections::debugString() const @@ -111,17 +109,17 @@ const char* SvShuntCompensatorSections::debugString() const void SvShuntCompensatorSections::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SvShuntCompensatorSections"), &SvShuntCompensatorSections_factory)); + factory_map.emplace("cim:SvShuntCompensatorSections", &SvShuntCompensatorSections_factory); } void SvShuntCompensatorSections::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvShuntCompensatorSections.sections"), &assign_SvShuntCompensatorSections_sections)); + assign_map.emplace("cim:SvShuntCompensatorSections.sections", &assign_SvShuntCompensatorSections_sections); } void SvShuntCompensatorSections::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvShuntCompensatorSections.ShuntCompensator"), &assign_SvShuntCompensatorSections_ShuntCompensator)); + assign_map.emplace("cim:SvShuntCompensatorSections.ShuntCompensator", &assign_SvShuntCompensatorSections_ShuntCompensator); } void SvShuntCompensatorSections::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/SvShuntCompensatorSections.hpp b/CGMES_2.4.15_27JAN2020/SvShuntCompensatorSections.hpp index 5fbb8611d..357a98c95 100644 --- a/CGMES_2.4.15_27JAN2020/SvShuntCompensatorSections.hpp +++ b/CGMES_2.4.15_27JAN2020/SvShuntCompensatorSections.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ShuntCompensator; - /* - State variable for the number of sections in service for a shunt compensator. - */ + /** \brief State variable for the number of sections in service for a shunt compensator. */ class SvShuntCompensatorSections : public BaseClass { public: @@ -28,8 +26,11 @@ namespace CIMPP SvShuntCompensatorSections(); ~SvShuntCompensatorSections() override; - CIMPP::ShuntCompensator* ShuntCompensator; /* The shunt compensator for which the state applies. Default: 0 */ - CIMPP::Simple_Float sections; /* The number of sections in service as a continous variable. To get integer value scale with ShuntCompensator.bPerSection. Default: nullptr */ + /** \brief The shunt compensator for which the state applies. Default: 0 */ + CIMPP::ShuntCompensator* ShuntCompensator; + + /** \brief The number of sections in service as a continous variable. To get integer value scale with ShuntCompensator.bPerSection. Default: nullptr */ + CIMPP::Simple_Float sections; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/SvStatus.cpp b/CGMES_2.4.15_27JAN2020/SvStatus.cpp index 3ab5f6a66..17aca7359 100644 --- a/CGMES_2.4.15_27JAN2020/SvStatus.cpp +++ b/CGMES_2.4.15_27JAN2020/SvStatus.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ConductingEquipment.hpp" -#include "Boolean.hpp" using namespace CIMPP; -SvStatus::SvStatus() : ConductingEquipment(nullptr) {}; -SvStatus::~SvStatus() {}; +SvStatus::SvStatus() : ConductingEquipment(nullptr) {} +SvStatus::~SvStatus() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ SvStatus::getPossibleProfilesForAttributes() const return map; } - -bool assign_SvStatus_inService(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (SvStatus* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->inService; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ConductingEquipment_SvStatus(BaseClass*, BaseClass*); bool assign_SvStatus_ConductingEquipment(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_SvStatus_ConductingEquipment(BaseClass* BaseClass_ptr1, BaseClass* B return false; } -bool get_SvStatus_inService(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_SvStatus_inService(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const SvStatus* element = dynamic_cast(BaseClass_ptr1)) + SvStatus* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->inService; - if (!buffer.str().empty()) + buffer >> element->inService; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_SvStatus_ConductingEquipment(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SvStatus* element = dynamic_cast(BaseClass_ptr1)) + const SvStatus* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ConductingEquipment != 0) { @@ -102,6 +86,20 @@ bool get_SvStatus_ConductingEquipment(const BaseClass* BaseClass_ptr1, std::list return false; } +bool get_SvStatus_inService(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const SvStatus* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inService; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char SvStatus::debugName[] = "SvStatus"; const char* SvStatus::debugString() const @@ -111,17 +109,17 @@ const char* SvStatus::debugString() const void SvStatus::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SvStatus"), &SvStatus_factory)); + factory_map.emplace("cim:SvStatus", &SvStatus_factory); } void SvStatus::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvStatus.inService"), &assign_SvStatus_inService)); + assign_map.emplace("cim:SvStatus.inService", &assign_SvStatus_inService); } void SvStatus::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvStatus.ConductingEquipment"), &assign_SvStatus_ConductingEquipment)); + assign_map.emplace("cim:SvStatus.ConductingEquipment", &assign_SvStatus_ConductingEquipment); } void SvStatus::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/SvStatus.hpp b/CGMES_2.4.15_27JAN2020/SvStatus.hpp index e93a0b476..e1b7266b5 100644 --- a/CGMES_2.4.15_27JAN2020/SvStatus.hpp +++ b/CGMES_2.4.15_27JAN2020/SvStatus.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ConductingEquipment; - /* - State variable for status. - */ + /** \brief State variable for status. */ class SvStatus : public BaseClass { public: @@ -28,8 +26,11 @@ namespace CIMPP SvStatus(); ~SvStatus() override; - CIMPP::ConductingEquipment* ConductingEquipment; /* The conducting equipment associated with the status state variable. Default: 0 */ - CIMPP::Boolean inService; /* The in service status as a result of topology processing. Default: false */ + /** \brief The conducting equipment associated with the status state variable. Default: 0 */ + CIMPP::ConductingEquipment* ConductingEquipment; + + /** \brief The in service status as a result of topology processing. Default: false */ + CIMPP::Boolean inService; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/SvTapStep.cpp b/CGMES_2.4.15_27JAN2020/SvTapStep.cpp index 63dafc3ea..717c92b1a 100644 --- a/CGMES_2.4.15_27JAN2020/SvTapStep.cpp +++ b/CGMES_2.4.15_27JAN2020/SvTapStep.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "TapChanger.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -SvTapStep::SvTapStep() : TapChanger(nullptr) {}; -SvTapStep::~SvTapStep() {}; +SvTapStep::SvTapStep() : TapChanger(nullptr) {} +SvTapStep::~SvTapStep() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ SvTapStep::getPossibleProfilesForAttributes() const return map; } - -bool assign_SvTapStep_position(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (SvTapStep* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->position; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_TapChanger_SvTapStep(BaseClass*, BaseClass*); bool assign_SvTapStep_TapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_SvTapStep_TapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass return false; } -bool get_SvTapStep_position(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_SvTapStep_position(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const SvTapStep* element = dynamic_cast(BaseClass_ptr1)) + SvTapStep* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->position; - if (!buffer.str().empty()) + buffer >> element->position; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_SvTapStep_TapChanger(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SvTapStep* element = dynamic_cast(BaseClass_ptr1)) + const SvTapStep* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->TapChanger != 0) { @@ -102,6 +86,20 @@ bool get_SvTapStep_TapChanger(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->position; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char SvTapStep::debugName[] = "SvTapStep"; const char* SvTapStep::debugString() const @@ -111,17 +109,17 @@ const char* SvTapStep::debugString() const void SvTapStep::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SvTapStep"), &SvTapStep_factory)); + factory_map.emplace("cim:SvTapStep", &SvTapStep_factory); } void SvTapStep::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvTapStep.position"), &assign_SvTapStep_position)); + assign_map.emplace("cim:SvTapStep.position", &assign_SvTapStep_position); } void SvTapStep::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvTapStep.TapChanger"), &assign_SvTapStep_TapChanger)); + assign_map.emplace("cim:SvTapStep.TapChanger", &assign_SvTapStep_TapChanger); } void SvTapStep::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/SvTapStep.hpp b/CGMES_2.4.15_27JAN2020/SvTapStep.hpp index 7a0d6e63e..57f08cda1 100644 --- a/CGMES_2.4.15_27JAN2020/SvTapStep.hpp +++ b/CGMES_2.4.15_27JAN2020/SvTapStep.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class TapChanger; - /* - State variable for transformer tap step. This class is to be used for taps of LTC (load tap changing) transformers, not fixed tap transformers. - */ + /** \brief State variable for transformer tap step. This class is to be used for taps of LTC (load tap changing) transformers, not fixed tap transformers. */ class SvTapStep : public BaseClass { public: @@ -28,8 +26,11 @@ namespace CIMPP SvTapStep(); ~SvTapStep() override; - CIMPP::TapChanger* TapChanger; /* The tap changer associated with the tap step state. Default: 0 */ - CIMPP::Simple_Float position; /* The floating point tap position. This is not the tap ratio, but rather the tap step position as defined by the related tap changer model and normally is constrained to be within the range of minimum and maximum tap positions. Default: nullptr */ + /** \brief The tap changer associated with the tap step state. Default: 0 */ + CIMPP::TapChanger* TapChanger; + + /** \brief The floating point tap position. This is not the tap ratio, but rather the tap step position as defined by the related tap changer model and normally is constrained to be within the range of minimum and maximum tap positions. Default: nullptr */ + CIMPP::Simple_Float position; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/SvVoltage.cpp b/CGMES_2.4.15_27JAN2020/SvVoltage.cpp index 9d4c2a6dd..697cd57c5 100644 --- a/CGMES_2.4.15_27JAN2020/SvVoltage.cpp +++ b/CGMES_2.4.15_27JAN2020/SvVoltage.cpp @@ -9,13 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "TopologicalNode.hpp" -#include "AngleDegrees.hpp" -#include "Voltage.hpp" using namespace CIMPP; -SvVoltage::SvVoltage() : TopologicalNode(nullptr) {}; -SvVoltage::~SvVoltage() {}; +SvVoltage::SvVoltage() : TopologicalNode(nullptr) {} +SvVoltage::~SvVoltage() {} static const std::list PossibleProfilesForClass = { @@ -44,70 +42,71 @@ SvVoltage::getPossibleProfilesForAttributes() const return map; } - -bool assign_SvVoltage_angle(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologicalNode_SvVoltage(BaseClass*, BaseClass*); +bool assign_SvVoltage_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (SvVoltage* element = dynamic_cast(BaseClass_ptr1)) + SvVoltage* element = dynamic_cast(BaseClass_ptr1); + TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->angle; - if (buffer.fail()) - return false; - else - return true; + if (element->TopologicalNode != element2) + { + element->TopologicalNode = element2; + return assign_TopologicalNode_SvVoltage(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_SvVoltage_v(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SvVoltage_angle(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SvVoltage* element = dynamic_cast(BaseClass_ptr1)) + SvVoltage* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->v; - if (buffer.fail()) - return false; - else + buffer >> element->angle; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_TopologicalNode_SvVoltage(BaseClass*, BaseClass*); -bool assign_SvVoltage_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_SvVoltage_v(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { SvVoltage* element = dynamic_cast(BaseClass_ptr1); - TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->TopologicalNode != element2) + buffer >> element->v; + if (!buffer.fail()) { - element->TopologicalNode = element2; - return assign_TopologicalNode_SvVoltage(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool get_SvVoltage_angle(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SvVoltage_TopologicalNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SvVoltage* element = dynamic_cast(BaseClass_ptr1)) + const SvVoltage* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->angle; - if (!buffer.str().empty()) + if (element->TopologicalNode != 0) { + BaseClass_list.push_back(element->TopologicalNode); return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_SvVoltage_v(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SvVoltage_angle(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SvVoltage* element = dynamic_cast(BaseClass_ptr1)) + const SvVoltage* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->v; + buffer << element->angle; if (!buffer.str().empty()) { return true; @@ -117,21 +116,21 @@ bool get_SvVoltage_v(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - -bool get_SvVoltage_TopologicalNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) +bool get_SvVoltage_v(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SvVoltage* element = dynamic_cast(BaseClass_ptr1)) + const SvVoltage* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->TopologicalNode != 0) + buffer << element->v; + if (!buffer.str().empty()) { - BaseClass_list.push_back(element->TopologicalNode); return true; } } + buffer.setstate(std::ios::failbit); return false; } - const char SvVoltage::debugName[] = "SvVoltage"; const char* SvVoltage::debugString() const { @@ -140,18 +139,18 @@ const char* SvVoltage::debugString() const void SvVoltage::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SvVoltage"), &SvVoltage_factory)); + factory_map.emplace("cim:SvVoltage", &SvVoltage_factory); } void SvVoltage::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvVoltage.angle"), &assign_SvVoltage_angle)); - assign_map.insert(std::make_pair(std::string("cim:SvVoltage.v"), &assign_SvVoltage_v)); + assign_map.emplace("cim:SvVoltage.angle", &assign_SvVoltage_angle); + assign_map.emplace("cim:SvVoltage.v", &assign_SvVoltage_v); } void SvVoltage::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvVoltage.TopologicalNode"), &assign_SvVoltage_TopologicalNode)); + assign_map.emplace("cim:SvVoltage.TopologicalNode", &assign_SvVoltage_TopologicalNode); } void SvVoltage::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/SvVoltage.hpp b/CGMES_2.4.15_27JAN2020/SvVoltage.hpp index 629e92f49..04595982a 100644 --- a/CGMES_2.4.15_27JAN2020/SvVoltage.hpp +++ b/CGMES_2.4.15_27JAN2020/SvVoltage.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class TopologicalNode; - /* - State variable for voltage. - */ + /** \brief State variable for voltage. */ class SvVoltage : public BaseClass { public: @@ -29,9 +27,14 @@ namespace CIMPP SvVoltage(); ~SvVoltage() override; - CIMPP::TopologicalNode* TopologicalNode; /* The state voltage associated with the topological node. Default: 0 */ - CIMPP::AngleDegrees angle; /* The voltage angle of the topological node complex voltage with respect to system reference. Default: nullptr */ - CIMPP::Voltage v; /* The voltage magnitude of the topological node. Default: nullptr */ + /** \brief The state voltage associated with the topological node. Default: 0 */ + CIMPP::TopologicalNode* TopologicalNode; + + /** \brief The voltage angle of the topological node complex voltage with respect to system reference. Default: nullptr */ + CIMPP::AngleDegrees angle; + + /** \brief The voltage magnitude of the topological node. Default: nullptr */ + CIMPP::Voltage v; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Switch.cpp b/CGMES_2.4.15_27JAN2020/Switch.cpp index bcd8d6aca..5f84a2d7a 100644 --- a/CGMES_2.4.15_27JAN2020/Switch.cpp +++ b/CGMES_2.4.15_27JAN2020/Switch.cpp @@ -9,15 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "SwitchSchedule.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "CurrentFlow.hpp" -#include "Boolean.hpp" using namespace CIMPP; -Switch::Switch() {}; -Switch::~Switch() {}; +Switch::Switch() {} +Switch::~Switch() {} static const std::list PossibleProfilesForClass = { @@ -49,80 +45,84 @@ Switch::getPossibleProfilesForAttributes() const return map; } - -bool assign_Switch_normalOpen(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SwitchSchedule_Switch(BaseClass*, BaseClass*); +bool assign_Switch_SwitchSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (Switch* element = dynamic_cast(BaseClass_ptr1)) + Switch* element = dynamic_cast(BaseClass_ptr1); + SwitchSchedule* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->normalOpen; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->SwitchSchedules.begin(), element->SwitchSchedules.end(), element2) == element->SwitchSchedules.end()) + { + element->SwitchSchedules.push_back(element2); + return assign_SwitchSchedule_Switch(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_Switch_open(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Switch_normalOpen(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Switch* element = dynamic_cast(BaseClass_ptr1)) + Switch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->open; - if (buffer.fail()) - return false; - else + buffer >> element->normalOpen; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Switch_ratedCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Switch_open(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Switch* element = dynamic_cast(BaseClass_ptr1)) + Switch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->ratedCurrent; - if (buffer.fail()) - return false; - else + buffer >> element->open; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Switch_retained(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Switch_ratedCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Switch* element = dynamic_cast(BaseClass_ptr1)) + Switch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->retained; - if (buffer.fail()) - return false; - else + buffer >> element->ratedCurrent; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_SwitchSchedule_Switch(BaseClass*, BaseClass*); -bool assign_Switch_SwitchSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_Switch_retained(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { Switch* element = dynamic_cast(BaseClass_ptr1); - SwitchSchedule* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->SwitchSchedules.begin(), element->SwitchSchedules.end(), element2) == element->SwitchSchedules.end()) + buffer >> element->retained; + if (!buffer.fail()) { - element->SwitchSchedules.push_back(element2); - return assign_SwitchSchedule_Switch(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_Switch_normalOpen(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Switch* element = dynamic_cast(BaseClass_ptr1)) + const Switch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->normalOpen; if (!buffer.str().empty()) @@ -136,7 +136,8 @@ bool get_Switch_normalOpen(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_Switch_open(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Switch* element = dynamic_cast(BaseClass_ptr1)) + const Switch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->open; if (!buffer.str().empty()) @@ -150,7 +151,8 @@ bool get_Switch_open(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Switch_ratedCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Switch* element = dynamic_cast(BaseClass_ptr1)) + const Switch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedCurrent; if (!buffer.str().empty()) @@ -164,7 +166,8 @@ bool get_Switch_ratedCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_Switch_retained(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Switch* element = dynamic_cast(BaseClass_ptr1)) + const Switch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->retained; if (!buffer.str().empty()) @@ -176,8 +179,6 @@ bool get_Switch_retained(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } - - const char Switch::debugName[] = "Switch"; const char* Switch::debugString() const { @@ -186,20 +187,20 @@ const char* Switch::debugString() const void Switch::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Switch"), &Switch_factory)); + factory_map.emplace("cim:Switch", &Switch_factory); } void Switch::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Switch.normalOpen"), &assign_Switch_normalOpen)); - assign_map.insert(std::make_pair(std::string("cim:Switch.open"), &assign_Switch_open)); - assign_map.insert(std::make_pair(std::string("cim:Switch.ratedCurrent"), &assign_Switch_ratedCurrent)); - assign_map.insert(std::make_pair(std::string("cim:Switch.retained"), &assign_Switch_retained)); + assign_map.emplace("cim:Switch.normalOpen", &assign_Switch_normalOpen); + assign_map.emplace("cim:Switch.open", &assign_Switch_open); + assign_map.emplace("cim:Switch.ratedCurrent", &assign_Switch_ratedCurrent); + assign_map.emplace("cim:Switch.retained", &assign_Switch_retained); } void Switch::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Switch.SwitchSchedules"), &assign_Switch_SwitchSchedules)); + assign_map.emplace("cim:Switch.SwitchSchedules", &assign_Switch_SwitchSchedules); } void Switch::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/Switch.hpp b/CGMES_2.4.15_27JAN2020/Switch.hpp index 4139a8582..1b8c13160 100644 --- a/CGMES_2.4.15_27JAN2020/Switch.hpp +++ b/CGMES_2.4.15_27JAN2020/Switch.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class SwitchSchedule; - /* - A generic device designed to close, or open, or both, one or more electric circuits. All switches are two terminal devices including grounding switches. - */ + /** \brief A generic device designed to close, or open, or both, one or more electric circuits. All switches are two terminal devices including grounding switches. */ class Switch : public ConductingEquipment { public: @@ -29,11 +27,20 @@ namespace CIMPP Switch(); ~Switch() override; - std::list SwitchSchedules; /* A SwitchSchedule is associated with a Switch. Default: 0 */ - CIMPP::Boolean normalOpen; /* The attribute is used in cases when no Measurement for the status value is present. If the Switch has a status measurement the Discrete.normalValue is expected to match with the Switch.normalOpen. Default: false */ - CIMPP::Boolean open; /* The attribute tells if the switch is considered open when used as input to topology processing. Default: false */ - CIMPP::CurrentFlow ratedCurrent; /* The maximum continuous current carrying capacity in amps governed by the device material and construction. Default: nullptr */ - CIMPP::Boolean retained; /* Branch is retained in a bus branch model. The flow through retained switches will normally be calculated in power flow. Default: false */ + /** \brief A SwitchSchedule is associated with a Switch. Default: 0 */ + std::list SwitchSchedules; + + /** \brief The attribute is used in cases when no Measurement for the status value is present. If the Switch has a status measurement the Discrete.normalValue is expected to match with the Switch.normalOpen. Default: false */ + CIMPP::Boolean normalOpen; + + /** \brief The attribute tells if the switch is considered open when used as input to topology processing. Default: false */ + CIMPP::Boolean open; + + /** \brief The maximum continuous current carrying capacity in amps governed by the device material and construction. Default: nullptr */ + CIMPP::CurrentFlow ratedCurrent; + + /** \brief Branch is retained in a bus branch model. The flow through retained switches will normally be calculated in power flow. Default: false */ + CIMPP::Boolean retained; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/SwitchSchedule.cpp b/CGMES_2.4.15_27JAN2020/SwitchSchedule.cpp index 01f9175cf..17357887b 100644 --- a/CGMES_2.4.15_27JAN2020/SwitchSchedule.cpp +++ b/CGMES_2.4.15_27JAN2020/SwitchSchedule.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -SwitchSchedule::SwitchSchedule() : Switch(nullptr) {}; -SwitchSchedule::~SwitchSchedule() {}; +SwitchSchedule::SwitchSchedule() : Switch(nullptr) {} +SwitchSchedule::~SwitchSchedule() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ SwitchSchedule::getPossibleProfilesForAttributes() const return map; } - - bool assign_Switch_SwitchSchedules(BaseClass*, BaseClass*); bool assign_SwitchSchedule_Switch(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_SwitchSchedule_Switch(BaseClass* BaseClass_ptr1, BaseClass* BaseClas return false; } - bool get_SwitchSchedule_Switch(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SwitchSchedule* element = dynamic_cast(BaseClass_ptr1)) + const SwitchSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Switch != 0) { @@ -73,7 +71,6 @@ bool get_SwitchSchedule_Switch(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SwitchSchedule"), &SwitchSchedule_factory)); + factory_map.emplace("cim:SwitchSchedule", &SwitchSchedule_factory); } void SwitchSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void SwitchSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SwitchSchedule.Switch"), &assign_SwitchSchedule_Switch)); + assign_map.emplace("cim:SwitchSchedule.Switch", &assign_SwitchSchedule_Switch); } void SwitchSchedule::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/SwitchSchedule.hpp b/CGMES_2.4.15_27JAN2020/SwitchSchedule.hpp index 7304bc07e..929ce0e77 100644 --- a/CGMES_2.4.15_27JAN2020/SwitchSchedule.hpp +++ b/CGMES_2.4.15_27JAN2020/SwitchSchedule.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class Switch; - /* - A schedule of switch positions. If RegularTimePoint.value1 is 0, the switch is open. If 1, the switch is closed. - */ + /** \brief A schedule of switch positions. If RegularTimePoint.value1 is 0, the switch is open. If 1, the switch is closed. */ class SwitchSchedule : public SeasonDayTypeSchedule { public: @@ -27,7 +25,8 @@ namespace CIMPP SwitchSchedule(); ~SwitchSchedule() override; - CIMPP::Switch* Switch; /* A Switch can be associated with SwitchSchedules. Default: 0 */ + /** \brief A Switch can be associated with SwitchSchedules. Default: 0 */ + CIMPP::Switch* Switch; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/SynchronousMachine.cpp b/CGMES_2.4.15_27JAN2020/SynchronousMachine.cpp index a5ac49a77..deb1e1cca 100644 --- a/CGMES_2.4.15_27JAN2020/SynchronousMachine.cpp +++ b/CGMES_2.4.15_27JAN2020/SynchronousMachine.cpp @@ -10,32 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "ReactiveCapabilityCurve.hpp" #include "SynchronousMachineDynamics.hpp" -#include "Boolean.hpp" -#include "Resistance.hpp" -#include "Reactance.hpp" -#include "CurrentFlow.hpp" -#include "ReactivePower.hpp" -#include "ReactivePower.hpp" -#include "Simple_Float.hpp" -#include "SynchronousMachineOperatingMode.hpp" -#include "PerCent.hpp" -#include "Resistance.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Integer.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ShortCircuitRotorKind.hpp" -#include "SynchronousMachineKind.hpp" -#include "PerCent.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -SynchronousMachine::SynchronousMachine() : InitialReactiveCapabilityCurve(nullptr), SynchronousMachineDynamics(nullptr) {}; -SynchronousMachine::~SynchronousMachine() {}; +SynchronousMachine::SynchronousMachine() : InitialReactiveCapabilityCurve(nullptr), SynchronousMachineDynamics(nullptr) {} +SynchronousMachine::~SynchronousMachine() {} static const std::list PossibleProfilesForClass = { @@ -86,317 +65,353 @@ SynchronousMachine::getPossibleProfilesForAttributes() const return map; } +bool assign_ReactiveCapabilityCurve_InitiallyUsedBySynchronousMachines(BaseClass*, BaseClass*); +bool assign_SynchronousMachine_InitialReactiveCapabilityCurve(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + ReactiveCapabilityCurve* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->InitialReactiveCapabilityCurve != element2) + { + element->InitialReactiveCapabilityCurve = element2; + return assign_ReactiveCapabilityCurve_InitiallyUsedBySynchronousMachines(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_SynchronousMachine_earthing(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineDynamics_SynchronousMachine(BaseClass*, BaseClass*); +bool assign_SynchronousMachine_SynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + SynchronousMachineDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->SynchronousMachineDynamics != element2) + { + element->SynchronousMachineDynamics = element2; + return assign_SynchronousMachineDynamics_SynchronousMachine(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_SynchronousMachine_earthing(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->earthing; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_earthingStarPointR(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_earthingStarPointR(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->earthingStarPointR; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_earthingStarPointX(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_earthingStarPointX(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->earthingStarPointX; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_ikk(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_ikk(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ikk; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_maxQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_maxQ(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxQ; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_minQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_minQ(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minQ; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_mu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_mu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_operatingMode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_operatingMode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->operatingMode; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_qPercent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_qPercent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qPercent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_r0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_r2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_r2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_referencePriority(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_referencePriority(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->referencePriority; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_satDirectSubtransX(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_satDirectSubtransX(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->satDirectSubtransX; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_satDirectSyncX(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_satDirectSyncX(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->satDirectSyncX; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_satDirectTransX(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_satDirectTransX(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->satDirectTransX; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_shortCircuitRotorType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_shortCircuitRotorType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->shortCircuitRotorType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_voltageRegulationRange(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_voltageRegulationRange(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->voltageRegulationRange; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_x0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x0; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_SynchronousMachine_x2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->x2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_ReactiveCapabilityCurve_InitiallyUsedBySynchronousMachines(BaseClass*, BaseClass*); -bool assign_SynchronousMachine_InitialReactiveCapabilityCurve(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_SynchronousMachine_x2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); - ReactiveCapabilityCurve* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->InitialReactiveCapabilityCurve != element2) + buffer >> element->x2; + if (!buffer.fail()) { - element->InitialReactiveCapabilityCurve = element2; - return assign_ReactiveCapabilityCurve_InitiallyUsedBySynchronousMachines(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_SynchronousMachineDynamics_SynchronousMachine(BaseClass*, BaseClass*); -bool assign_SynchronousMachine_SynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool get_SynchronousMachine_InitialReactiveCapabilityCurve(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); - SynchronousMachineDynamics* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->SynchronousMachineDynamics != element2) + if (element->InitialReactiveCapabilityCurve != 0) { - element->SynchronousMachineDynamics = element2; - return assign_SynchronousMachineDynamics_SynchronousMachine(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->InitialReactiveCapabilityCurve); + return true; } - return true; } return false; } + bool get_SynchronousMachine_earthing(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->earthing; if (!buffer.str().empty()) @@ -410,7 +425,8 @@ bool get_SynchronousMachine_earthing(const BaseClass* BaseClass_ptr1, std::strin bool get_SynchronousMachine_earthingStarPointR(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->earthingStarPointR; if (!buffer.str().empty()) @@ -424,7 +440,8 @@ bool get_SynchronousMachine_earthingStarPointR(const BaseClass* BaseClass_ptr1, bool get_SynchronousMachine_earthingStarPointX(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->earthingStarPointX; if (!buffer.str().empty()) @@ -438,7 +455,8 @@ bool get_SynchronousMachine_earthingStarPointX(const BaseClass* BaseClass_ptr1, bool get_SynchronousMachine_ikk(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ikk; if (!buffer.str().empty()) @@ -452,7 +470,8 @@ bool get_SynchronousMachine_ikk(const BaseClass* BaseClass_ptr1, std::stringstre bool get_SynchronousMachine_maxQ(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxQ; if (!buffer.str().empty()) @@ -466,7 +485,8 @@ bool get_SynchronousMachine_maxQ(const BaseClass* BaseClass_ptr1, std::stringstr bool get_SynchronousMachine_minQ(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minQ; if (!buffer.str().empty()) @@ -480,7 +500,8 @@ bool get_SynchronousMachine_minQ(const BaseClass* BaseClass_ptr1, std::stringstr bool get_SynchronousMachine_mu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mu; if (!buffer.str().empty()) @@ -492,9 +513,25 @@ bool get_SynchronousMachine_mu(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } +bool get_SynchronousMachine_operatingMode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->operatingMode; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_SynchronousMachine_qPercent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qPercent; if (!buffer.str().empty()) @@ -508,7 +545,8 @@ bool get_SynchronousMachine_qPercent(const BaseClass* BaseClass_ptr1, std::strin bool get_SynchronousMachine_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -522,7 +560,8 @@ bool get_SynchronousMachine_r(const BaseClass* BaseClass_ptr1, std::stringstream bool get_SynchronousMachine_r0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r0; if (!buffer.str().empty()) @@ -536,7 +575,8 @@ bool get_SynchronousMachine_r0(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_SynchronousMachine_r2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r2; if (!buffer.str().empty()) @@ -550,7 +590,8 @@ bool get_SynchronousMachine_r2(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_SynchronousMachine_referencePriority(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->referencePriority; if (!buffer.str().empty()) @@ -564,7 +605,8 @@ bool get_SynchronousMachine_referencePriority(const BaseClass* BaseClass_ptr1, s bool get_SynchronousMachine_satDirectSubtransX(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->satDirectSubtransX; if (!buffer.str().empty()) @@ -578,7 +620,8 @@ bool get_SynchronousMachine_satDirectSubtransX(const BaseClass* BaseClass_ptr1, bool get_SynchronousMachine_satDirectSyncX(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->satDirectSyncX; if (!buffer.str().empty()) @@ -592,7 +635,8 @@ bool get_SynchronousMachine_satDirectSyncX(const BaseClass* BaseClass_ptr1, std: bool get_SynchronousMachine_satDirectTransX(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->satDirectTransX; if (!buffer.str().empty()) @@ -604,25 +648,12 @@ bool get_SynchronousMachine_satDirectTransX(const BaseClass* BaseClass_ptr1, std return false; } -bool get_SynchronousMachine_voltageRegulationRange(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->voltageRegulationRange; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - -bool get_SynchronousMachine_x0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachine_shortCircuitRotorType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->x0; + buffer << element->shortCircuitRotorType; if (!buffer.str().empty()) { return true; @@ -632,11 +663,12 @@ bool get_SynchronousMachine_x0(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } -bool get_SynchronousMachine_x2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachine_type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->x2; + buffer << element->type; if (!buffer.str().empty()) { return true; @@ -646,26 +678,12 @@ bool get_SynchronousMachine_x2(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } - -bool get_SynchronousMachine_InitialReactiveCapabilityCurve(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->InitialReactiveCapabilityCurve != 0) - { - BaseClass_list.push_back(element->InitialReactiveCapabilityCurve); - return true; - } - } - return false; -} - - -bool get_SynchronousMachine_operatingMode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachine_voltageRegulationRange(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->operatingMode; + buffer << element->voltageRegulationRange; if (!buffer.str().empty()) { return true; @@ -675,11 +693,12 @@ bool get_SynchronousMachine_operatingMode(const BaseClass* BaseClass_ptr1, std:: return false; } -bool get_SynchronousMachine_shortCircuitRotorType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachine_x0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->shortCircuitRotorType; + buffer << element->x0; if (!buffer.str().empty()) { return true; @@ -689,11 +708,12 @@ bool get_SynchronousMachine_shortCircuitRotorType(const BaseClass* BaseClass_ptr return false; } -bool get_SynchronousMachine_type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachine_x2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->type; + buffer << element->x2; if (!buffer.str().empty()) { return true; @@ -711,38 +731,38 @@ const char* SynchronousMachine::debugString() const void SynchronousMachine::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SynchronousMachine"), &SynchronousMachine_factory)); + factory_map.emplace("cim:SynchronousMachine", &SynchronousMachine_factory); } void SynchronousMachine::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.earthing"), &assign_SynchronousMachine_earthing)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.earthingStarPointR"), &assign_SynchronousMachine_earthingStarPointR)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.earthingStarPointX"), &assign_SynchronousMachine_earthingStarPointX)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.ikk"), &assign_SynchronousMachine_ikk)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.maxQ"), &assign_SynchronousMachine_maxQ)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.minQ"), &assign_SynchronousMachine_minQ)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.mu"), &assign_SynchronousMachine_mu)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.operatingMode"), &assign_SynchronousMachine_operatingMode)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.qPercent"), &assign_SynchronousMachine_qPercent)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.r"), &assign_SynchronousMachine_r)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.r0"), &assign_SynchronousMachine_r0)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.r2"), &assign_SynchronousMachine_r2)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.referencePriority"), &assign_SynchronousMachine_referencePriority)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.satDirectSubtransX"), &assign_SynchronousMachine_satDirectSubtransX)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.satDirectSyncX"), &assign_SynchronousMachine_satDirectSyncX)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.satDirectTransX"), &assign_SynchronousMachine_satDirectTransX)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.shortCircuitRotorType"), &assign_SynchronousMachine_shortCircuitRotorType)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.type"), &assign_SynchronousMachine_type)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.voltageRegulationRange"), &assign_SynchronousMachine_voltageRegulationRange)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.x0"), &assign_SynchronousMachine_x0)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.x2"), &assign_SynchronousMachine_x2)); + assign_map.emplace("cim:SynchronousMachine.earthing", &assign_SynchronousMachine_earthing); + assign_map.emplace("cim:SynchronousMachine.earthingStarPointR", &assign_SynchronousMachine_earthingStarPointR); + assign_map.emplace("cim:SynchronousMachine.earthingStarPointX", &assign_SynchronousMachine_earthingStarPointX); + assign_map.emplace("cim:SynchronousMachine.ikk", &assign_SynchronousMachine_ikk); + assign_map.emplace("cim:SynchronousMachine.maxQ", &assign_SynchronousMachine_maxQ); + assign_map.emplace("cim:SynchronousMachine.minQ", &assign_SynchronousMachine_minQ); + assign_map.emplace("cim:SynchronousMachine.mu", &assign_SynchronousMachine_mu); + assign_map.emplace("cim:SynchronousMachine.operatingMode", &assign_SynchronousMachine_operatingMode); + assign_map.emplace("cim:SynchronousMachine.qPercent", &assign_SynchronousMachine_qPercent); + assign_map.emplace("cim:SynchronousMachine.r", &assign_SynchronousMachine_r); + assign_map.emplace("cim:SynchronousMachine.r0", &assign_SynchronousMachine_r0); + assign_map.emplace("cim:SynchronousMachine.r2", &assign_SynchronousMachine_r2); + assign_map.emplace("cim:SynchronousMachine.referencePriority", &assign_SynchronousMachine_referencePriority); + assign_map.emplace("cim:SynchronousMachine.satDirectSubtransX", &assign_SynchronousMachine_satDirectSubtransX); + assign_map.emplace("cim:SynchronousMachine.satDirectSyncX", &assign_SynchronousMachine_satDirectSyncX); + assign_map.emplace("cim:SynchronousMachine.satDirectTransX", &assign_SynchronousMachine_satDirectTransX); + assign_map.emplace("cim:SynchronousMachine.shortCircuitRotorType", &assign_SynchronousMachine_shortCircuitRotorType); + assign_map.emplace("cim:SynchronousMachine.type", &assign_SynchronousMachine_type); + assign_map.emplace("cim:SynchronousMachine.voltageRegulationRange", &assign_SynchronousMachine_voltageRegulationRange); + assign_map.emplace("cim:SynchronousMachine.x0", &assign_SynchronousMachine_x0); + assign_map.emplace("cim:SynchronousMachine.x2", &assign_SynchronousMachine_x2); } void SynchronousMachine::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.InitialReactiveCapabilityCurve"), &assign_SynchronousMachine_InitialReactiveCapabilityCurve)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.SynchronousMachineDynamics"), &assign_SynchronousMachine_SynchronousMachineDynamics)); + assign_map.emplace("cim:SynchronousMachine.InitialReactiveCapabilityCurve", &assign_SynchronousMachine_InitialReactiveCapabilityCurve); + assign_map.emplace("cim:SynchronousMachine.SynchronousMachineDynamics", &assign_SynchronousMachine_SynchronousMachineDynamics); } void SynchronousMachine::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/SynchronousMachine.hpp b/CGMES_2.4.15_27JAN2020/SynchronousMachine.hpp index 6af1d5ade..91fe2995e 100644 --- a/CGMES_2.4.15_27JAN2020/SynchronousMachine.hpp +++ b/CGMES_2.4.15_27JAN2020/SynchronousMachine.hpp @@ -30,9 +30,7 @@ namespace CIMPP class ReactiveCapabilityCurve; class SynchronousMachineDynamics; - /* - An electromechanical device that operates with shaft rotating synchronously with the network. It is a single machine operating either as a generator or synchronous condenser or pump. - */ + /** \brief An electromechanical device that operates with shaft rotating synchronously with the network. It is a single machine operating either as a generator or synchronous condenser or pump. */ class SynchronousMachine : public RotatingMachine { public: @@ -40,29 +38,74 @@ namespace CIMPP SynchronousMachine(); ~SynchronousMachine() override; - CIMPP::ReactiveCapabilityCurve* InitialReactiveCapabilityCurve; /* Synchronous machines using this curve as default. Default: 0 */ - CIMPP::SynchronousMachineDynamics* SynchronousMachineDynamics; /* Synchronous machine dynamics model used to describe dynamic behavior of this synchronous machine. Default: 0 */ - CIMPP::Boolean earthing; /* Indicates whether or not the generator is earthed. Used for short circuit data exchange according to IEC 60909 Default: false */ - CIMPP::Resistance earthingStarPointR; /* Generator star point earthing resistance (Re). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::Reactance earthingStarPointX; /* Generator star point earthing reactance (Xe). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::CurrentFlow ikk; /* Steady-state short-circuit current (in A for the profile) of generator with compound excitation during 3-phase short circuit. - Ikk=0: Generator with no compound excitation. - Ikk?0: Generator with compound excitation. Ikk is used to calculate the minimum steady-state short-circuit current for generators with compound excitation (Section 4.6.1.2 in the IEC 60909-0) Used only for single fed short circuit on a generator. (Section 4.3.4.2. in the IEC 60909-0) Default: nullptr */ - CIMPP::ReactivePower maxQ; /* Maximum reactive power limit. This is the maximum (nameplate) limit for the unit. Default: nullptr */ - CIMPP::ReactivePower minQ; /* Minimum reactive power limit for the unit. Default: nullptr */ - CIMPP::Simple_Float mu; /* Factor to calculate the breaking current (Section 4.5.2.1 in the IEC 60909-0). Used only for single fed short circuit on a generator (Section 4.3.4.2. in the IEC 60909-0). Default: nullptr */ - CIMPP::SynchronousMachineOperatingMode operatingMode; /* Current mode of operation. Default: 0 */ - CIMPP::PerCent qPercent; /* Percent of the coordinated reactive control that comes from this machine. Default: nullptr */ - CIMPP::Resistance r; /* Equivalent resistance (RG) of generator. RG is considered for the calculation of all currents, except for the calculation of the peak current ip. Used for short circuit data exchange according to IEC 60909 Default: nullptr */ - CIMPP::PU r0; /* Zero sequence resistance of the synchronous machine. Default: nullptr */ - CIMPP::PU r2; /* Negative sequence resistance. Default: nullptr */ - CIMPP::Integer referencePriority; /* Priority of unit for use as powerflow voltage phase angle reference bus selection. 0 = don t care (default) 1 = highest priority. 2 is less than 1 and so on. Default: 0 */ - CIMPP::PU satDirectSubtransX; /* Direct-axis subtransient reactance saturated, also known as Xd`sat. Default: nullptr */ - CIMPP::PU satDirectSyncX; /* Direct-axes saturated synchronous reactance (xdsat); reciprocal of short-circuit ration. Used for short circuit data exchange, only for single fed short circuit on a generator. (Section 4.3.4.2. in the IEC 60909-0). Default: nullptr */ - CIMPP::PU satDirectTransX; /* Saturated Direct-axis transient reactance. The attribute is primarily used for short circuit calculations according to ANSI. Default: nullptr */ - CIMPP::ShortCircuitRotorKind shortCircuitRotorType; /* Type of rotor, used by short circuit applications, only for single fed short circuit according to IEC 60909. Default: 0 */ - CIMPP::SynchronousMachineKind type; /* Modes that this synchronous machine can operate in. Default: 0 */ - CIMPP::PerCent voltageRegulationRange; /* Range of generator voltage regulation (PG in the IEC 60909-0) used for calculation of the impedance correction factor KG defined in IEC 60909-0 This attribute is used to describe the operating voltage of the generating unit. Default: nullptr */ - CIMPP::PU x0; /* Zero sequence reactance of the synchronous machine. Default: nullptr */ - CIMPP::PU x2; /* Negative sequence reactance. Default: nullptr */ + /** \brief Synchronous machines using this curve as default. Default: 0 */ + CIMPP::ReactiveCapabilityCurve* InitialReactiveCapabilityCurve; + + /** \brief Synchronous machine dynamics model used to describe dynamic behavior of this synchronous machine. Default: 0 */ + CIMPP::SynchronousMachineDynamics* SynchronousMachineDynamics; + + /** \brief Indicates whether or not the generator is earthed. Used for short circuit data exchange according to IEC 60909 Default: false */ + CIMPP::Boolean earthing; + + /** \brief Generator star point earthing resistance (Re). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::Resistance earthingStarPointR; + + /** \brief Generator star point earthing reactance (Xe). Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::Reactance earthingStarPointX; + + /** \brief Steady-state short-circuit current (in A for the profile) of generator with compound excitation during 3-phase short circuit. - Ikk=0: Generator with no compound excitation. - Ikk?0: Generator with compound excitation. Ikk is used to calculate the minimum steady-state short-circuit current for generators with compound excitation (Section 4.6.1.2 in the IEC 60909-0) Used only for single fed short circuit on a generator. (Section 4.3.4.2. in the IEC 60909-0) Default: nullptr */ + CIMPP::CurrentFlow ikk; + + /** \brief Maximum reactive power limit. This is the maximum (nameplate) limit for the unit. Default: nullptr */ + CIMPP::ReactivePower maxQ; + + /** \brief Minimum reactive power limit for the unit. Default: nullptr */ + CIMPP::ReactivePower minQ; + + /** \brief Factor to calculate the breaking current (Section 4.5.2.1 in the IEC 60909-0). Used only for single fed short circuit on a generator (Section 4.3.4.2. in the IEC 60909-0). Default: nullptr */ + CIMPP::Simple_Float mu; + + /** \brief Current mode of operation. Default: 0 */ + CIMPP::SynchronousMachineOperatingMode operatingMode; + + /** \brief Percent of the coordinated reactive control that comes from this machine. Default: nullptr */ + CIMPP::PerCent qPercent; + + /** \brief Equivalent resistance (RG) of generator. RG is considered for the calculation of all currents, except for the calculation of the peak current ip. Used for short circuit data exchange according to IEC 60909 Default: nullptr */ + CIMPP::Resistance r; + + /** \brief Zero sequence resistance of the synchronous machine. Default: nullptr */ + CIMPP::PU r0; + + /** \brief Negative sequence resistance. Default: nullptr */ + CIMPP::PU r2; + + /** \brief Priority of unit for use as powerflow voltage phase angle reference bus selection. 0 = don t care (default) 1 = highest priority. 2 is less than 1 and so on. Default: 0 */ + CIMPP::Integer referencePriority; + + /** \brief Direct-axis subtransient reactance saturated, also known as Xd`sat. Default: nullptr */ + CIMPP::PU satDirectSubtransX; + + /** \brief Direct-axes saturated synchronous reactance (xdsat); reciprocal of short-circuit ration. Used for short circuit data exchange, only for single fed short circuit on a generator. (Section 4.3.4.2. in the IEC 60909-0). Default: nullptr */ + CIMPP::PU satDirectSyncX; + + /** \brief Saturated Direct-axis transient reactance. The attribute is primarily used for short circuit calculations according to ANSI. Default: nullptr */ + CIMPP::PU satDirectTransX; + + /** \brief Type of rotor, used by short circuit applications, only for single fed short circuit according to IEC 60909. Default: 0 */ + CIMPP::ShortCircuitRotorKind shortCircuitRotorType; + + /** \brief Modes that this synchronous machine can operate in. Default: 0 */ + CIMPP::SynchronousMachineKind type; + + /** \brief Range of generator voltage regulation (PG in the IEC 60909-0) used for calculation of the impedance correction factor KG defined in IEC 60909-0 This attribute is used to describe the operating voltage of the generating unit. Default: nullptr */ + CIMPP::PerCent voltageRegulationRange; + + /** \brief Zero sequence reactance of the synchronous machine. Default: nullptr */ + CIMPP::PU x0; + + /** \brief Negative sequence reactance. Default: nullptr */ + CIMPP::PU x2; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/SynchronousMachineDetailed.cpp b/CGMES_2.4.15_27JAN2020/SynchronousMachineDetailed.cpp index 97a329b93..b24f3e4d9 100644 --- a/CGMES_2.4.15_27JAN2020/SynchronousMachineDetailed.cpp +++ b/CGMES_2.4.15_27JAN2020/SynchronousMachineDetailed.cpp @@ -8,16 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "IfdBaseKind.hpp" -#include "CurrentFlow.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -SynchronousMachineDetailed::SynchronousMachineDetailed() {}; -SynchronousMachineDetailed::~SynchronousMachineDetailed() {}; +SynchronousMachineDetailed::SynchronousMachineDetailed() {} +SynchronousMachineDetailed::~SynchronousMachineDetailed() {} static const std::list PossibleProfilesForClass = { @@ -48,77 +43,80 @@ SynchronousMachineDetailed::getPossibleProfilesForAttributes() const return map; } - -bool assign_SynchronousMachineDetailed_efdBaseRatio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineDetailed_efdBaseRatio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdBaseRatio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineDetailed_ifdBaseType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineDetailed_ifdBaseType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ifdBaseType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineDetailed_ifdBaseValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineDetailed_ifdBaseValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ifdBaseValue; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineDetailed_saturationFactor120QAxis(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineDetailed_saturationFactor120QAxis(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->saturationFactor120QAxis; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineDetailed_saturationFactorQAxis(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineDetailed_saturationFactorQAxis(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->saturationFactorQAxis; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_SynchronousMachineDetailed_efdBaseRatio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdBaseRatio; if (!buffer.str().empty()) @@ -130,11 +128,12 @@ bool get_SynchronousMachineDetailed_efdBaseRatio(const BaseClass* BaseClass_ptr1 return false; } -bool get_SynchronousMachineDetailed_ifdBaseValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineDetailed_ifdBaseType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->ifdBaseValue; + buffer << element->ifdBaseType; if (!buffer.str().empty()) { return true; @@ -144,11 +143,12 @@ bool get_SynchronousMachineDetailed_ifdBaseValue(const BaseClass* BaseClass_ptr1 return false; } -bool get_SynchronousMachineDetailed_saturationFactor120QAxis(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineDetailed_ifdBaseValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->saturationFactor120QAxis; + buffer << element->ifdBaseValue; if (!buffer.str().empty()) { return true; @@ -158,11 +158,12 @@ bool get_SynchronousMachineDetailed_saturationFactor120QAxis(const BaseClass* Ba return false; } -bool get_SynchronousMachineDetailed_saturationFactorQAxis(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineDetailed_saturationFactor120QAxis(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->saturationFactorQAxis; + buffer << element->saturationFactor120QAxis; if (!buffer.str().empty()) { return true; @@ -172,13 +173,12 @@ bool get_SynchronousMachineDetailed_saturationFactorQAxis(const BaseClass* BaseC return false; } - - -bool get_SynchronousMachineDetailed_ifdBaseType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineDetailed_saturationFactorQAxis(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->ifdBaseType; + buffer << element->saturationFactorQAxis; if (!buffer.str().empty()) { return true; @@ -196,16 +196,16 @@ const char* SynchronousMachineDetailed::debugString() const void SynchronousMachineDetailed::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SynchronousMachineDetailed"), &SynchronousMachineDetailed_factory)); + factory_map.emplace("cim:SynchronousMachineDetailed", &SynchronousMachineDetailed_factory); } void SynchronousMachineDetailed::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDetailed.efdBaseRatio"), &assign_SynchronousMachineDetailed_efdBaseRatio)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDetailed.ifdBaseType"), &assign_SynchronousMachineDetailed_ifdBaseType)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDetailed.ifdBaseValue"), &assign_SynchronousMachineDetailed_ifdBaseValue)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDetailed.saturationFactor120QAxis"), &assign_SynchronousMachineDetailed_saturationFactor120QAxis)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDetailed.saturationFactorQAxis"), &assign_SynchronousMachineDetailed_saturationFactorQAxis)); + assign_map.emplace("cim:SynchronousMachineDetailed.efdBaseRatio", &assign_SynchronousMachineDetailed_efdBaseRatio); + assign_map.emplace("cim:SynchronousMachineDetailed.ifdBaseType", &assign_SynchronousMachineDetailed_ifdBaseType); + assign_map.emplace("cim:SynchronousMachineDetailed.ifdBaseValue", &assign_SynchronousMachineDetailed_ifdBaseValue); + assign_map.emplace("cim:SynchronousMachineDetailed.saturationFactor120QAxis", &assign_SynchronousMachineDetailed_saturationFactor120QAxis); + assign_map.emplace("cim:SynchronousMachineDetailed.saturationFactorQAxis", &assign_SynchronousMachineDetailed_saturationFactorQAxis); } void SynchronousMachineDetailed::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/SynchronousMachineDetailed.hpp b/CGMES_2.4.15_27JAN2020/SynchronousMachineDetailed.hpp index c50628bb3..877ee12bc 100644 --- a/CGMES_2.4.15_27JAN2020/SynchronousMachineDetailed.hpp +++ b/CGMES_2.4.15_27JAN2020/SynchronousMachineDetailed.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - All synchronous machine detailed types use a subset of the same data parameters and input/output variables. The several variations differ in the following ways: It is not necessary for each simulation tool to have separate models for each of the model types. The same model can often be used for several types by alternative logic within the model. Also, differences in saturation representation may not result in significant model performance differences so model substitutions are often acceptable. - */ + /** \brief All synchronous machine detailed types use a subset of the same data parameters and input/output variables. The several variations differ in the following ways: It is not necessary for each simulation tool to have separate models for each of the model types. The same model can often be used for several types by alternative logic within the model. Also, differences in saturation representation may not result in significant model performance differences so model substitutions are often acceptable. */ class SynchronousMachineDetailed : public SynchronousMachineDynamics { public: @@ -29,11 +27,20 @@ namespace CIMPP SynchronousMachineDetailed(); ~SynchronousMachineDetailed() override; - CIMPP::Simple_Float efdBaseRatio; /* Ratio of Efd bases of exciter and generator models. Typical Value = 1. Default: nullptr */ - CIMPP::IfdBaseKind ifdBaseType; /* Excitation base system mode. Typical Value = ifag. Default: 0 */ - CIMPP::CurrentFlow ifdBaseValue; /* Ifd base current if .ifdBaseType = other. Not needed if .ifdBaseType not = other. Unit = A. Typical Value = 0. Default: nullptr */ - CIMPP::Simple_Float saturationFactor120QAxis; /* Q-axis saturation factor at 120% of rated terminal voltage (S12q) (>=S1q). Typical Value = 0.12. Default: nullptr */ - CIMPP::Simple_Float saturationFactorQAxis; /* Q-axis saturation factor at rated terminal voltage (S1q) (>= 0). Typical Value = 0.02. Default: nullptr */ + /** \brief Ratio of Efd bases of exciter and generator models. Typical Value = 1. Default: nullptr */ + CIMPP::Simple_Float efdBaseRatio; + + /** \brief Excitation base system mode. Typical Value = ifag. Default: 0 */ + CIMPP::IfdBaseKind ifdBaseType; + + /** \brief Ifd base current if .ifdBaseType = other. Not needed if .ifdBaseType not = other. Unit = A. Typical Value = 0. Default: nullptr */ + CIMPP::CurrentFlow ifdBaseValue; + + /** \brief Q-axis saturation factor at 120% of rated terminal voltage (S12q) (>=S1q). Typical Value = 0.12. Default: nullptr */ + CIMPP::Simple_Float saturationFactor120QAxis; + + /** \brief Q-axis saturation factor at rated terminal voltage (S1q) (>= 0). Typical Value = 0.02. Default: nullptr */ + CIMPP::Simple_Float saturationFactorQAxis; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/SynchronousMachineDynamics.cpp b/CGMES_2.4.15_27JAN2020/SynchronousMachineDynamics.cpp index bb961da54..c26909c88 100644 --- a/CGMES_2.4.15_27JAN2020/SynchronousMachineDynamics.cpp +++ b/CGMES_2.4.15_27JAN2020/SynchronousMachineDynamics.cpp @@ -16,8 +16,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -SynchronousMachineDynamics::SynchronousMachineDynamics() : ExcitationSystemDynamics(nullptr), MechanicalLoadDynamics(nullptr), SynchronousMachine(nullptr) {}; -SynchronousMachineDynamics::~SynchronousMachineDynamics() {}; +SynchronousMachineDynamics::SynchronousMachineDynamics() : ExcitationSystemDynamics(nullptr), MechanicalLoadDynamics(nullptr), SynchronousMachine(nullptr) {} +SynchronousMachineDynamics::~SynchronousMachineDynamics() {} static const std::list PossibleProfilesForClass = { @@ -48,8 +48,6 @@ SynchronousMachineDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_ExcitationSystemDynamics_SynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_SynchronousMachineDynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -66,6 +64,7 @@ bool assign_SynchronousMachineDynamics_ExcitationSystemDynamics(BaseClass* BaseC } return false; } + bool assign_GenICompensationForGenJ_SynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_SynchronousMachineDynamics_GenICompensationForGenJ(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -82,6 +81,7 @@ bool assign_SynchronousMachineDynamics_GenICompensationForGenJ(BaseClass* BaseCl } return false; } + bool assign_MechanicalLoadDynamics_SynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_SynchronousMachineDynamics_MechanicalLoadDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -98,6 +98,7 @@ bool assign_SynchronousMachineDynamics_MechanicalLoadDynamics(BaseClass* BaseCla } return false; } + bool assign_SynchronousMachine_SynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_SynchronousMachineDynamics_SynchronousMachine(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -114,6 +115,7 @@ bool assign_SynchronousMachineDynamics_SynchronousMachine(BaseClass* BaseClass_p } return false; } + bool assign_TurbineGovernorDynamics_SynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_SynchronousMachineDynamics_TurbineGovernorDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -132,9 +134,12 @@ bool assign_SynchronousMachineDynamics_TurbineGovernorDynamics(BaseClass* BaseCl } + + bool get_SynchronousMachineDynamics_SynchronousMachine(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SynchronousMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->SynchronousMachine != 0) { @@ -154,7 +159,7 @@ const char* SynchronousMachineDynamics::debugString() const void SynchronousMachineDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SynchronousMachineDynamics"), &SynchronousMachineDynamics_factory)); + factory_map.emplace("cim:SynchronousMachineDynamics", &SynchronousMachineDynamics_factory); } void SynchronousMachineDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -163,11 +168,11 @@ void SynchronousMachineDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDynamics.ExcitationSystemDynamics"), &assign_SynchronousMachineDynamics_ExcitationSystemDynamics)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDynamics.GenICompensationForGenJ"), &assign_SynchronousMachineDynamics_GenICompensationForGenJ)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDynamics.MechanicalLoadDynamics"), &assign_SynchronousMachineDynamics_MechanicalLoadDynamics)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDynamics.SynchronousMachine"), &assign_SynchronousMachineDynamics_SynchronousMachine)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDynamics.TurbineGovernorDynamics"), &assign_SynchronousMachineDynamics_TurbineGovernorDynamics)); + assign_map.emplace("cim:SynchronousMachineDynamics.ExcitationSystemDynamics", &assign_SynchronousMachineDynamics_ExcitationSystemDynamics); + assign_map.emplace("cim:SynchronousMachineDynamics.GenICompensationForGenJ", &assign_SynchronousMachineDynamics_GenICompensationForGenJ); + assign_map.emplace("cim:SynchronousMachineDynamics.MechanicalLoadDynamics", &assign_SynchronousMachineDynamics_MechanicalLoadDynamics); + assign_map.emplace("cim:SynchronousMachineDynamics.SynchronousMachine", &assign_SynchronousMachineDynamics_SynchronousMachine); + assign_map.emplace("cim:SynchronousMachineDynamics.TurbineGovernorDynamics", &assign_SynchronousMachineDynamics_TurbineGovernorDynamics); } void SynchronousMachineDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/SynchronousMachineDynamics.hpp b/CGMES_2.4.15_27JAN2020/SynchronousMachineDynamics.hpp index b3b34f00b..77e6df94e 100644 --- a/CGMES_2.4.15_27JAN2020/SynchronousMachineDynamics.hpp +++ b/CGMES_2.4.15_27JAN2020/SynchronousMachineDynamics.hpp @@ -21,9 +21,7 @@ namespace CIMPP class SynchronousMachine; class TurbineGovernorDynamics; - /* - Synchronous machine whose behaviour is described by reference to a standard model expressed in one of the following forms: - */ + /** \brief Synchronous machine whose behaviour is described by reference to a standard model expressed in one of the following forms: */ class SynchronousMachineDynamics : public RotatingMachineDynamics { public: @@ -31,11 +29,20 @@ namespace CIMPP SynchronousMachineDynamics(); ~SynchronousMachineDynamics() override; - CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; /* Excitation system model associated with this synchronous machine model. Default: 0 */ - std::list GenICompensationForGenJ; /* Compensation of voltage compensator`s generator for current flow out of this generator. Default: 0 */ - CIMPP::MechanicalLoadDynamics* MechanicalLoadDynamics; /* Mechanical load model associated with this synchronous machine model. Default: 0 */ - CIMPP::SynchronousMachine* SynchronousMachine; /* Synchronous machine to which synchronous machine dynamics model applies. Default: 0 */ - std::list TurbineGovernorDynamics; /* Synchronous machine model with which this turbine-governor model is associated. Default: 0 */ + /** \brief Excitation system model associated with this synchronous machine model. Default: 0 */ + CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; + + /** \brief Compensation of voltage compensator`s generator for current flow out of this generator. Default: 0 */ + std::list GenICompensationForGenJ; + + /** \brief Mechanical load model associated with this synchronous machine model. Default: 0 */ + CIMPP::MechanicalLoadDynamics* MechanicalLoadDynamics; + + /** \brief Synchronous machine to which synchronous machine dynamics model applies. Default: 0 */ + CIMPP::SynchronousMachine* SynchronousMachine; + + /** \brief Synchronous machine model with which this turbine-governor model is associated. Default: 0 */ + std::list TurbineGovernorDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/SynchronousMachineEquivalentCircuit.cpp b/CGMES_2.4.15_27JAN2020/SynchronousMachineEquivalentCircuit.cpp index b64fe290e..7ef58f9f7 100644 --- a/CGMES_2.4.15_27JAN2020/SynchronousMachineEquivalentCircuit.cpp +++ b/CGMES_2.4.15_27JAN2020/SynchronousMachineEquivalentCircuit.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -SynchronousMachineEquivalentCircuit::SynchronousMachineEquivalentCircuit() {}; -SynchronousMachineEquivalentCircuit::~SynchronousMachineEquivalentCircuit() {}; +SynchronousMachineEquivalentCircuit::SynchronousMachineEquivalentCircuit() {} +SynchronousMachineEquivalentCircuit::~SynchronousMachineEquivalentCircuit() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ SynchronousMachineEquivalentCircuit::getPossibleProfilesForAttributes() const return map; } - -bool assign_SynchronousMachineEquivalentCircuit_r1d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_r1d(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r1d; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_r1q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_r1q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r1q; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_r2q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_r2q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r2q; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_rfd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_rfd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rfd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_x1d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_x1d(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x1d; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_x1q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_x1q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x1q; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_x2q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_x2q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x2q; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_xad(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_xad(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xad; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_xaq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_xaq(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xaq; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_xf1d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_xf1d(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xf1d; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_xfd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_xfd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xfd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_SynchronousMachineEquivalentCircuit_r1d(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r1d; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_SynchronousMachineEquivalentCircuit_r1d(const BaseClass* BaseClass_ptr1 bool get_SynchronousMachineEquivalentCircuit_r1q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r1q; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_SynchronousMachineEquivalentCircuit_r1q(const BaseClass* BaseClass_ptr1 bool get_SynchronousMachineEquivalentCircuit_r2q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r2q; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_SynchronousMachineEquivalentCircuit_r2q(const BaseClass* BaseClass_ptr1 bool get_SynchronousMachineEquivalentCircuit_rfd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rfd; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_SynchronousMachineEquivalentCircuit_rfd(const BaseClass* BaseClass_ptr1 bool get_SynchronousMachineEquivalentCircuit_x1d(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x1d; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_SynchronousMachineEquivalentCircuit_x1d(const BaseClass* BaseClass_ptr1 bool get_SynchronousMachineEquivalentCircuit_x1q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x1q; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_SynchronousMachineEquivalentCircuit_x1q(const BaseClass* BaseClass_ptr1 bool get_SynchronousMachineEquivalentCircuit_x2q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x2q; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_SynchronousMachineEquivalentCircuit_x2q(const BaseClass* BaseClass_ptr1 bool get_SynchronousMachineEquivalentCircuit_xad(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xad; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_SynchronousMachineEquivalentCircuit_xad(const BaseClass* BaseClass_ptr1 bool get_SynchronousMachineEquivalentCircuit_xaq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xaq; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_SynchronousMachineEquivalentCircuit_xaq(const BaseClass* BaseClass_ptr1 bool get_SynchronousMachineEquivalentCircuit_xf1d(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xf1d; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_SynchronousMachineEquivalentCircuit_xf1d(const BaseClass* BaseClass_ptr bool get_SynchronousMachineEquivalentCircuit_xfd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xfd; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_SynchronousMachineEquivalentCircuit_xfd(const BaseClass* BaseClass_ptr1 return false; } - - const char SynchronousMachineEquivalentCircuit::debugName[] = "SynchronousMachineEquivalentCircuit"; const char* SynchronousMachineEquivalentCircuit::debugString() const { @@ -370,22 +376,22 @@ const char* SynchronousMachineEquivalentCircuit::debugString() const void SynchronousMachineEquivalentCircuit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit"), &SynchronousMachineEquivalentCircuit_factory)); + factory_map.emplace("cim:SynchronousMachineEquivalentCircuit", &SynchronousMachineEquivalentCircuit_factory); } void SynchronousMachineEquivalentCircuit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.r1d"), &assign_SynchronousMachineEquivalentCircuit_r1d)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.r1q"), &assign_SynchronousMachineEquivalentCircuit_r1q)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.r2q"), &assign_SynchronousMachineEquivalentCircuit_r2q)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.rfd"), &assign_SynchronousMachineEquivalentCircuit_rfd)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.x1d"), &assign_SynchronousMachineEquivalentCircuit_x1d)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.x1q"), &assign_SynchronousMachineEquivalentCircuit_x1q)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.x2q"), &assign_SynchronousMachineEquivalentCircuit_x2q)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.xad"), &assign_SynchronousMachineEquivalentCircuit_xad)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.xaq"), &assign_SynchronousMachineEquivalentCircuit_xaq)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.xf1d"), &assign_SynchronousMachineEquivalentCircuit_xf1d)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.xfd"), &assign_SynchronousMachineEquivalentCircuit_xfd)); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.r1d", &assign_SynchronousMachineEquivalentCircuit_r1d); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.r1q", &assign_SynchronousMachineEquivalentCircuit_r1q); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.r2q", &assign_SynchronousMachineEquivalentCircuit_r2q); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.rfd", &assign_SynchronousMachineEquivalentCircuit_rfd); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.x1d", &assign_SynchronousMachineEquivalentCircuit_x1d); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.x1q", &assign_SynchronousMachineEquivalentCircuit_x1q); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.x2q", &assign_SynchronousMachineEquivalentCircuit_x2q); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.xad", &assign_SynchronousMachineEquivalentCircuit_xad); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.xaq", &assign_SynchronousMachineEquivalentCircuit_xaq); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.xf1d", &assign_SynchronousMachineEquivalentCircuit_xf1d); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.xfd", &assign_SynchronousMachineEquivalentCircuit_xfd); } void SynchronousMachineEquivalentCircuit::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/SynchronousMachineEquivalentCircuit.hpp b/CGMES_2.4.15_27JAN2020/SynchronousMachineEquivalentCircuit.hpp index 7df6c9f41..bc55bc9cd 100644 --- a/CGMES_2.4.15_27JAN2020/SynchronousMachineEquivalentCircuit.hpp +++ b/CGMES_2.4.15_27JAN2020/SynchronousMachineEquivalentCircuit.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The electrical equations for all variations of the synchronous models are based on the SynchronousEquivalentCircuit diagram for the direct and quadrature axes. = + = + * / ( + ) = + * * / ( * + * + * ) = + = + * / (+ ) = + ** / ( * + * + * ) = ( + ) / ( * ) = ( * + * + * ) / ( * * ( + ) = ( + ) / ( * ) = ( * + * + * )/ ( * * ( + ) Same equations using CIM attributes from SynchronousMachineTimeConstantReactance class on left of = sign and SynchronousMachineEquivalentCircuit class on right (except as noted): xDirectSync = xad + RotatingMachineDynamics.statorLeakageReactance xDirectTrans = RotatingMachineDynamics.statorLeakageReactance + xad * xfd / (xad + xfd) xDirectSubtrans = RotatingMachineDynamics.statorLeakageReactance + xad * xfd * x1d / (xad * xfd + xad * x1d + xfd * x1d) xQuadSync = xaq + RotatingMachineDynamics.statorLeakageReactance xQuadTrans = RotatingMachineDynamics.statorLeakageReactance + xaq * x1q / (xaq+ x1q) xQuadSubtrans = RotatingMachineDynamics.statorLeakageReactance + xaq * x1q* x2q / (xaq * x1q + xaq * x2q + x1q * x2q) tpdo = (xad + xfd) / (2*pi*nominal frequency * rfd) tppdo = (xad * xfd + xad * x1d + xfd * x1d) / (2*pi*nominal frequency * r1d * (xad + xfd) tpqo = (xaq + x1q) / (2*pi*nominal frequency * r1q) tppqo = (xaq * x1q + xaq * x2q + x1q * x2q)/ (2*pi*nominal frequency * r2q * (xaq + x1q). Are only valid for a simplified model where "Canay" reactance is zero. - */ + /** \brief The electrical equations for all variations of the synchronous models are based on the SynchronousEquivalentCircuit diagram for the direct and quadrature axes. = + = + * / ( + ) = + * * / ( * + * + * ) = + = + * / (+ ) = + ** / ( * + * + * ) = ( + ) / ( * ) = ( * + * + * ) / ( * * ( + ) = ( + ) / ( * ) = ( * + * + * )/ ( * * ( + ) Same equations using CIM attributes from SynchronousMachineTimeConstantReactance class on left of = sign and SynchronousMachineEquivalentCircuit class on right (except as noted): xDirectSync = xad + RotatingMachineDynamics.statorLeakageReactance xDirectTrans = RotatingMachineDynamics.statorLeakageReactance + xad * xfd / (xad + xfd) xDirectSubtrans = RotatingMachineDynamics.statorLeakageReactance + xad * xfd * x1d / (xad * xfd + xad * x1d + xfd * x1d) xQuadSync = xaq + RotatingMachineDynamics.statorLeakageReactance xQuadTrans = RotatingMachineDynamics.statorLeakageReactance + xaq * x1q / (xaq+ x1q) xQuadSubtrans = RotatingMachineDynamics.statorLeakageReactance + xaq * x1q* x2q / (xaq * x1q + xaq * x2q + x1q * x2q) tpdo = (xad + xfd) / (2*pi*nominal frequency * rfd) tppdo = (xad * xfd + xad * x1d + xfd * x1d) / (2*pi*nominal frequency * r1d * (xad + xfd) tpqo = (xaq + x1q) / (2*pi*nominal frequency * r1q) tppqo = (xaq * x1q + xaq * x2q + x1q * x2q)/ (2*pi*nominal frequency * r2q * (xaq + x1q). Are only valid for a simplified model where "Canay" reactance is zero. */ class SynchronousMachineEquivalentCircuit : public SynchronousMachineDetailed { public: @@ -27,17 +25,38 @@ namespace CIMPP SynchronousMachineEquivalentCircuit(); ~SynchronousMachineEquivalentCircuit() override; - CIMPP::PU r1d; /* D-axis damper 1 winding resistance. Default: nullptr */ - CIMPP::PU r1q; /* Q-axis damper 1 winding resistance. Default: nullptr */ - CIMPP::PU r2q; /* Q-axis damper 2 winding resistance. Default: nullptr */ - CIMPP::PU rfd; /* Field winding resistance. Default: nullptr */ - CIMPP::PU x1d; /* D-axis damper 1 winding leakage reactance. Default: nullptr */ - CIMPP::PU x1q; /* Q-axis damper 1 winding leakage reactance. Default: nullptr */ - CIMPP::PU x2q; /* Q-axis damper 2 winding leakage reactance. Default: nullptr */ - CIMPP::PU xad; /* D-axis mutual reactance. Default: nullptr */ - CIMPP::PU xaq; /* Q-axis mutual reactance. Default: nullptr */ - CIMPP::PU xf1d; /* Differential mutual (`Canay`) reactance. Default: nullptr */ - CIMPP::PU xfd; /* Field winding leakage reactance. Default: nullptr */ + /** \brief D-axis damper 1 winding resistance. Default: nullptr */ + CIMPP::PU r1d; + + /** \brief Q-axis damper 1 winding resistance. Default: nullptr */ + CIMPP::PU r1q; + + /** \brief Q-axis damper 2 winding resistance. Default: nullptr */ + CIMPP::PU r2q; + + /** \brief Field winding resistance. Default: nullptr */ + CIMPP::PU rfd; + + /** \brief D-axis damper 1 winding leakage reactance. Default: nullptr */ + CIMPP::PU x1d; + + /** \brief Q-axis damper 1 winding leakage reactance. Default: nullptr */ + CIMPP::PU x1q; + + /** \brief Q-axis damper 2 winding leakage reactance. Default: nullptr */ + CIMPP::PU x2q; + + /** \brief D-axis mutual reactance. Default: nullptr */ + CIMPP::PU xad; + + /** \brief Q-axis mutual reactance. Default: nullptr */ + CIMPP::PU xaq; + + /** \brief Differential mutual (`Canay`) reactance. Default: nullptr */ + CIMPP::PU xf1d; + + /** \brief Field winding leakage reactance. Default: nullptr */ + CIMPP::PU xfd; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/SynchronousMachineKind.cpp b/CGMES_2.4.15_27JAN2020/SynchronousMachineKind.cpp index 55bd958b0..26781d9bd 100644 --- a/CGMES_2.4.15_27JAN2020/SynchronousMachineKind.cpp +++ b/CGMES_2.4.15_27JAN2020/SynchronousMachineKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "SynchronousMachineKind") + if (EnumSymbol.substr(0, pos) != "SynchronousMachineKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,37 +50,37 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "generator") + if (EnumSymbol == "generator") { rop = SynchronousMachineKind::generator; return lop; } - if(EnumSymbol == "condenser") + if (EnumSymbol == "condenser") { rop = SynchronousMachineKind::condenser; return lop; } - if(EnumSymbol == "generatorOrCondenser") + if (EnumSymbol == "generatorOrCondenser") { rop = SynchronousMachineKind::generatorOrCondenser; return lop; } - if(EnumSymbol == "motor") + if (EnumSymbol == "motor") { rop = SynchronousMachineKind::motor; return lop; } - if(EnumSymbol == "generatorOrMotor") + if (EnumSymbol == "generatorOrMotor") { rop = SynchronousMachineKind::generatorOrMotor; return lop; } - if(EnumSymbol == "motorOrCondenser") + if (EnumSymbol == "motorOrCondenser") { rop = SynchronousMachineKind::motorOrCondenser; return lop; } - if(EnumSymbol == "generatorOrCondenserOrMotor") + if (EnumSymbol == "generatorOrCondenserOrMotor") { rop = SynchronousMachineKind::generatorOrCondenserOrMotor; return lop; diff --git a/CGMES_2.4.15_27JAN2020/SynchronousMachineKind.hpp b/CGMES_2.4.15_27JAN2020/SynchronousMachineKind.hpp index 9b3eaf71b..fa2868489 100644 --- a/CGMES_2.4.15_27JAN2020/SynchronousMachineKind.hpp +++ b/CGMES_2.4.15_27JAN2020/SynchronousMachineKind.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Synchronous machine type. - */ + /** \brief Synchronous machine type. */ class SynchronousMachineKind { public: diff --git a/CGMES_2.4.15_27JAN2020/SynchronousMachineModelKind.cpp b/CGMES_2.4.15_27JAN2020/SynchronousMachineModelKind.cpp index 10460ede1..761cee9cb 100644 --- a/CGMES_2.4.15_27JAN2020/SynchronousMachineModelKind.cpp +++ b/CGMES_2.4.15_27JAN2020/SynchronousMachineModelKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "SynchronousMachineModelKind") + if (EnumSymbol.substr(0, pos) != "SynchronousMachineModelKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,27 +50,27 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "subtransient") + if (EnumSymbol == "subtransient") { rop = SynchronousMachineModelKind::subtransient; return lop; } - if(EnumSymbol == "subtransientTypeF") + if (EnumSymbol == "subtransientTypeF") { rop = SynchronousMachineModelKind::subtransientTypeF; return lop; } - if(EnumSymbol == "subtransientTypeJ") + if (EnumSymbol == "subtransientTypeJ") { rop = SynchronousMachineModelKind::subtransientTypeJ; return lop; } - if(EnumSymbol == "subtransientSimplified") + if (EnumSymbol == "subtransientSimplified") { rop = SynchronousMachineModelKind::subtransientSimplified; return lop; } - if(EnumSymbol == "subtransientSimplifiedDirectAxis") + if (EnumSymbol == "subtransientSimplifiedDirectAxis") { rop = SynchronousMachineModelKind::subtransientSimplifiedDirectAxis; return lop; diff --git a/CGMES_2.4.15_27JAN2020/SynchronousMachineModelKind.hpp b/CGMES_2.4.15_27JAN2020/SynchronousMachineModelKind.hpp index 06da8b2b5..fadb85ac5 100644 --- a/CGMES_2.4.15_27JAN2020/SynchronousMachineModelKind.hpp +++ b/CGMES_2.4.15_27JAN2020/SynchronousMachineModelKind.hpp @@ -9,33 +9,21 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of synchronous machine model used in Dynamic simulation applications. - */ + /** \brief Type of synchronous machine model used in Dynamic simulation applications. */ class SynchronousMachineModelKind { public: enum SynchronousMachineModelKind_ENUM { - /** - * Subtransient synchronous machine model. - */ + /** Subtransient synchronous machine model. */ subtransient, - /** - * WECC Type F variant of subtransient synchronous machine model. - */ + /** WECC Type F variant of subtransient synchronous machine model. */ subtransientTypeF, - /** - * WECC Type J variant of subtransient synchronous machine model. - */ + /** WECC Type J variant of subtransient synchronous machine model. */ subtransientTypeJ, - /** - * Simplified version of subtransient synchronous machine model where magnetic coupling between the direct and quadrature axes is ignored. - */ + /** Simplified version of subtransient synchronous machine model where magnetic coupling between the direct and quadrature axes is ignored. */ subtransientSimplified, - /** - * Simplified version of a subtransient synchronous machine model with no damper circuit on d-axis. - */ + /** Simplified version of a subtransient synchronous machine model with no damper circuit on d-axis. */ subtransientSimplifiedDirectAxis, }; diff --git a/CGMES_2.4.15_27JAN2020/SynchronousMachineOperatingMode.cpp b/CGMES_2.4.15_27JAN2020/SynchronousMachineOperatingMode.cpp index 92b1e2cc3..bca6dbe66 100644 --- a/CGMES_2.4.15_27JAN2020/SynchronousMachineOperatingMode.cpp +++ b/CGMES_2.4.15_27JAN2020/SynchronousMachineOperatingMode.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "SynchronousMachineOperatingMode") + if (EnumSymbol.substr(0, pos) != "SynchronousMachineOperatingMode") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "generator") + if (EnumSymbol == "generator") { rop = SynchronousMachineOperatingMode::generator; return lop; } - if(EnumSymbol == "condenser") + if (EnumSymbol == "condenser") { rop = SynchronousMachineOperatingMode::condenser; return lop; } - if(EnumSymbol == "motor") + if (EnumSymbol == "motor") { rop = SynchronousMachineOperatingMode::motor; return lop; diff --git a/CGMES_2.4.15_27JAN2020/SynchronousMachineOperatingMode.hpp b/CGMES_2.4.15_27JAN2020/SynchronousMachineOperatingMode.hpp index 464590a5b..1272878d5 100644 --- a/CGMES_2.4.15_27JAN2020/SynchronousMachineOperatingMode.hpp +++ b/CGMES_2.4.15_27JAN2020/SynchronousMachineOperatingMode.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Synchronous machine operating mode. - */ + /** \brief Synchronous machine operating mode. */ class SynchronousMachineOperatingMode { public: diff --git a/CGMES_2.4.15_27JAN2020/SynchronousMachineSimplified.cpp b/CGMES_2.4.15_27JAN2020/SynchronousMachineSimplified.cpp index 78f5ae00d..565a93b19 100644 --- a/CGMES_2.4.15_27JAN2020/SynchronousMachineSimplified.cpp +++ b/CGMES_2.4.15_27JAN2020/SynchronousMachineSimplified.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -SynchronousMachineSimplified::SynchronousMachineSimplified() {}; -SynchronousMachineSimplified::~SynchronousMachineSimplified() {}; +SynchronousMachineSimplified::SynchronousMachineSimplified() {} +SynchronousMachineSimplified::~SynchronousMachineSimplified() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ SynchronousMachineSimplified::getPossibleProfilesForAttributes() const return map; } - - - - - const char SynchronousMachineSimplified::debugName[] = "SynchronousMachineSimplified"; const char* SynchronousMachineSimplified::debugString() const { @@ -51,7 +46,7 @@ const char* SynchronousMachineSimplified::debugString() const void SynchronousMachineSimplified::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SynchronousMachineSimplified"), &SynchronousMachineSimplified_factory)); + factory_map.emplace("cim:SynchronousMachineSimplified", &SynchronousMachineSimplified_factory); } void SynchronousMachineSimplified::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/SynchronousMachineSimplified.hpp b/CGMES_2.4.15_27JAN2020/SynchronousMachineSimplified.hpp index 4523e6baf..0de0ea229 100644 --- a/CGMES_2.4.15_27JAN2020/SynchronousMachineSimplified.hpp +++ b/CGMES_2.4.15_27JAN2020/SynchronousMachineSimplified.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The simplified model represents a synchronous generator as a constant internal voltage behind an impedance ( + ) as shown in the Simplified diagram. Since internal voltage is held constant, there is no input and any excitation system model will be ignored. There is also no output. This model should not be used for representing a real generator except, perhaps, small generators whose response is insignificant. The parameters used for the Simplified model include: - */ + /** \brief The simplified model represents a synchronous generator as a constant internal voltage behind an impedance ( + ) as shown in the Simplified diagram. Since internal voltage is held constant, there is no input and any excitation system model will be ignored. There is also no output. This model should not be used for representing a real generator except, perhaps, small generators whose response is insignificant. The parameters used for the Simplified model include: */ class SynchronousMachineSimplified : public SynchronousMachineDynamics { public: @@ -26,7 +24,6 @@ namespace CIMPP SynchronousMachineSimplified(); ~SynchronousMachineSimplified() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/SynchronousMachineTimeConstantReactance.cpp b/CGMES_2.4.15_27JAN2020/SynchronousMachineTimeConstantReactance.cpp index 39c775b65..0abb79508 100644 --- a/CGMES_2.4.15_27JAN2020/SynchronousMachineTimeConstantReactance.cpp +++ b/CGMES_2.4.15_27JAN2020/SynchronousMachineTimeConstantReactance.cpp @@ -8,25 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "SynchronousMachineModelKind.hpp" -#include "RotorKind.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -SynchronousMachineTimeConstantReactance::SynchronousMachineTimeConstantReactance() {}; -SynchronousMachineTimeConstantReactance::~SynchronousMachineTimeConstantReactance() {}; +SynchronousMachineTimeConstantReactance::SynchronousMachineTimeConstantReactance() {} +SynchronousMachineTimeConstantReactance::~SynchronousMachineTimeConstantReactance() {} static const std::list PossibleProfilesForClass = { @@ -66,194 +52,206 @@ SynchronousMachineTimeConstantReactance::getPossibleProfilesForAttributes() cons return map; } - -bool assign_SynchronousMachineTimeConstantReactance_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_modelType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_modelType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->modelType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_rotorType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_rotorType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rotorType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_tpdo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_tpdo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpdo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_tppdo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_tppdo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tppdo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_tppqo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_tppqo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tppqo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_tpqo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_tpqo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpqo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_xDirectSubtrans(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_xDirectSubtrans(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xDirectSubtrans; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_xDirectSync(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_xDirectSync(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xDirectSync; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_xDirectTrans(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_xDirectTrans(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xDirectTrans; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_xQuadSubtrans(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_xQuadSubtrans(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xQuadSubtrans; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_xQuadSync(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_xQuadSync(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xQuadSync; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_xQuadTrans(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_xQuadTrans(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xQuadTrans; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_SynchronousMachineTimeConstantReactance_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -265,11 +263,12 @@ bool get_SynchronousMachineTimeConstantReactance_ks(const BaseClass* BaseClass_p return false; } -bool get_SynchronousMachineTimeConstantReactance_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_modelType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tc; + buffer << element->modelType; if (!buffer.str().empty()) { return true; @@ -279,11 +278,12 @@ bool get_SynchronousMachineTimeConstantReactance_tc(const BaseClass* BaseClass_p return false; } -bool get_SynchronousMachineTimeConstantReactance_tpdo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_rotorType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tpdo; + buffer << element->rotorType; if (!buffer.str().empty()) { return true; @@ -293,11 +293,12 @@ bool get_SynchronousMachineTimeConstantReactance_tpdo(const BaseClass* BaseClass return false; } -bool get_SynchronousMachineTimeConstantReactance_tppdo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tppdo; + buffer << element->tc; if (!buffer.str().empty()) { return true; @@ -307,11 +308,12 @@ bool get_SynchronousMachineTimeConstantReactance_tppdo(const BaseClass* BaseClas return false; } -bool get_SynchronousMachineTimeConstantReactance_tppqo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_tpdo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tppqo; + buffer << element->tpdo; if (!buffer.str().empty()) { return true; @@ -321,11 +323,12 @@ bool get_SynchronousMachineTimeConstantReactance_tppqo(const BaseClass* BaseClas return false; } -bool get_SynchronousMachineTimeConstantReactance_tpqo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_tppdo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tpqo; + buffer << element->tppdo; if (!buffer.str().empty()) { return true; @@ -335,11 +338,12 @@ bool get_SynchronousMachineTimeConstantReactance_tpqo(const BaseClass* BaseClass return false; } -bool get_SynchronousMachineTimeConstantReactance_xDirectSubtrans(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_tppqo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xDirectSubtrans; + buffer << element->tppqo; if (!buffer.str().empty()) { return true; @@ -349,11 +353,12 @@ bool get_SynchronousMachineTimeConstantReactance_xDirectSubtrans(const BaseClass return false; } -bool get_SynchronousMachineTimeConstantReactance_xDirectSync(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_tpqo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xDirectSync; + buffer << element->tpqo; if (!buffer.str().empty()) { return true; @@ -363,11 +368,12 @@ bool get_SynchronousMachineTimeConstantReactance_xDirectSync(const BaseClass* Ba return false; } -bool get_SynchronousMachineTimeConstantReactance_xDirectTrans(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_xDirectSubtrans(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xDirectTrans; + buffer << element->xDirectSubtrans; if (!buffer.str().empty()) { return true; @@ -377,11 +383,12 @@ bool get_SynchronousMachineTimeConstantReactance_xDirectTrans(const BaseClass* B return false; } -bool get_SynchronousMachineTimeConstantReactance_xQuadSubtrans(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_xDirectSync(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xQuadSubtrans; + buffer << element->xDirectSync; if (!buffer.str().empty()) { return true; @@ -391,11 +398,12 @@ bool get_SynchronousMachineTimeConstantReactance_xQuadSubtrans(const BaseClass* return false; } -bool get_SynchronousMachineTimeConstantReactance_xQuadSync(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_xDirectTrans(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xQuadSync; + buffer << element->xDirectTrans; if (!buffer.str().empty()) { return true; @@ -405,11 +413,12 @@ bool get_SynchronousMachineTimeConstantReactance_xQuadSync(const BaseClass* Base return false; } -bool get_SynchronousMachineTimeConstantReactance_xQuadTrans(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_xQuadSubtrans(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xQuadTrans; + buffer << element->xQuadSubtrans; if (!buffer.str().empty()) { return true; @@ -419,13 +428,12 @@ bool get_SynchronousMachineTimeConstantReactance_xQuadTrans(const BaseClass* Bas return false; } - - -bool get_SynchronousMachineTimeConstantReactance_modelType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_xQuadSync(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->modelType; + buffer << element->xQuadSync; if (!buffer.str().empty()) { return true; @@ -435,11 +443,12 @@ bool get_SynchronousMachineTimeConstantReactance_modelType(const BaseClass* Base return false; } -bool get_SynchronousMachineTimeConstantReactance_rotorType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_xQuadTrans(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->rotorType; + buffer << element->xQuadTrans; if (!buffer.str().empty()) { return true; @@ -457,25 +466,25 @@ const char* SynchronousMachineTimeConstantReactance::debugString() const void SynchronousMachineTimeConstantReactance::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance"), &SynchronousMachineTimeConstantReactance_factory)); + factory_map.emplace("cim:SynchronousMachineTimeConstantReactance", &SynchronousMachineTimeConstantReactance_factory); } void SynchronousMachineTimeConstantReactance::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.ks"), &assign_SynchronousMachineTimeConstantReactance_ks)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.modelType"), &assign_SynchronousMachineTimeConstantReactance_modelType)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.rotorType"), &assign_SynchronousMachineTimeConstantReactance_rotorType)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.tc"), &assign_SynchronousMachineTimeConstantReactance_tc)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.tpdo"), &assign_SynchronousMachineTimeConstantReactance_tpdo)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.tppdo"), &assign_SynchronousMachineTimeConstantReactance_tppdo)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.tppqo"), &assign_SynchronousMachineTimeConstantReactance_tppqo)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.tpqo"), &assign_SynchronousMachineTimeConstantReactance_tpqo)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.xDirectSubtrans"), &assign_SynchronousMachineTimeConstantReactance_xDirectSubtrans)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.xDirectSync"), &assign_SynchronousMachineTimeConstantReactance_xDirectSync)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.xDirectTrans"), &assign_SynchronousMachineTimeConstantReactance_xDirectTrans)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.xQuadSubtrans"), &assign_SynchronousMachineTimeConstantReactance_xQuadSubtrans)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.xQuadSync"), &assign_SynchronousMachineTimeConstantReactance_xQuadSync)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.xQuadTrans"), &assign_SynchronousMachineTimeConstantReactance_xQuadTrans)); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.ks", &assign_SynchronousMachineTimeConstantReactance_ks); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.modelType", &assign_SynchronousMachineTimeConstantReactance_modelType); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.rotorType", &assign_SynchronousMachineTimeConstantReactance_rotorType); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.tc", &assign_SynchronousMachineTimeConstantReactance_tc); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.tpdo", &assign_SynchronousMachineTimeConstantReactance_tpdo); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.tppdo", &assign_SynchronousMachineTimeConstantReactance_tppdo); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.tppqo", &assign_SynchronousMachineTimeConstantReactance_tppqo); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.tpqo", &assign_SynchronousMachineTimeConstantReactance_tpqo); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.xDirectSubtrans", &assign_SynchronousMachineTimeConstantReactance_xDirectSubtrans); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.xDirectSync", &assign_SynchronousMachineTimeConstantReactance_xDirectSync); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.xDirectTrans", &assign_SynchronousMachineTimeConstantReactance_xDirectTrans); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.xQuadSubtrans", &assign_SynchronousMachineTimeConstantReactance_xQuadSubtrans); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.xQuadSync", &assign_SynchronousMachineTimeConstantReactance_xQuadSync); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.xQuadTrans", &assign_SynchronousMachineTimeConstantReactance_xQuadTrans); } void SynchronousMachineTimeConstantReactance::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/SynchronousMachineTimeConstantReactance.hpp b/CGMES_2.4.15_27JAN2020/SynchronousMachineTimeConstantReactance.hpp index 8d9ac309a..51a881b24 100644 --- a/CGMES_2.4.15_27JAN2020/SynchronousMachineTimeConstantReactance.hpp +++ b/CGMES_2.4.15_27JAN2020/SynchronousMachineTimeConstantReactance.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Synchronous machine detailed modelling types are defined by the combination of the attributes SynchronousMachineTimeConstantReactance.modelType and SynchronousMachineTimeConstantReactance.rotorType. The parameters used for models expressed in time constant reactance form include: - */ + /** \brief Synchronous machine detailed modelling types are defined by the combination of the attributes SynchronousMachineTimeConstantReactance.modelType and SynchronousMachineTimeConstantReactance.rotorType. The parameters used for models expressed in time constant reactance form include: */ class SynchronousMachineTimeConstantReactance : public SynchronousMachineDetailed { public: @@ -31,20 +29,47 @@ namespace CIMPP SynchronousMachineTimeConstantReactance(); ~SynchronousMachineTimeConstantReactance() override; - CIMPP::Simple_Float ks; /* Saturation loading correction factor (Ks) (>= 0). Used only by Type J model. Typical Value = 0. Default: nullptr */ - CIMPP::SynchronousMachineModelKind modelType; /* Type of synchronous machine model used in Dynamic simulation applications. Default: 0 */ - CIMPP::RotorKind rotorType; /* Type of rotor on physical machine. Default: 0 */ - CIMPP::Seconds tc; /* Damping time constant for `Canay` reactance. Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tpdo; /* Direct-axis transient rotor time constant (T`do) (> T``do). Typical Value = 5. Default: nullptr */ - CIMPP::Seconds tppdo; /* Direct-axis subtransient rotor time constant (T``do) (> 0). Typical Value = 0.03. Default: nullptr */ - CIMPP::Seconds tppqo; /* Quadrature-axis subtransient rotor time constant (T``qo) (> 0). Typical Value = 0.03. Default: nullptr */ - CIMPP::Seconds tpqo; /* Quadrature-axis transient rotor time constant (T`qo) (> T``qo). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU xDirectSubtrans; /* Direct-axis subtransient reactance (unsaturated) (X``d) (> Xl). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU xDirectSync; /* Direct-axis synchronous reactance (Xd) (>= X`d). The quotient of a sustained value of that AC component of armature voltage that is produced by the total direct-axis flux due to direct-axis armature current and the value of the AC component of this current, the machine running at rated speed. Typical Value = 1.8. Default: nullptr */ - CIMPP::PU xDirectTrans; /* Direct-axis transient reactance (unsaturated) (X`d) (> =X``d). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU xQuadSubtrans; /* Quadrature-axis subtransient reactance (X``q) (> Xl). Typical Value = 0.2. Default: nullptr */ - CIMPP::PU xQuadSync; /* Quadrature-axis synchronous reactance (Xq) (> =X`q). The ratio of the component of reactive armature voltage, due to the quadrature-axis component of armature current, to this component of current, under steady state conditions and at rated frequency. Typical Value = 1.6. Default: nullptr */ - CIMPP::PU xQuadTrans; /* Quadrature-axis transient reactance (X`q) (> =X``q). Typical Value = 0.3. Default: nullptr */ + /** \brief Saturation loading correction factor (Ks) (>= 0). Used only by Type J model. Typical Value = 0. Default: nullptr */ + CIMPP::Simple_Float ks; + + /** \brief Type of synchronous machine model used in Dynamic simulation applications. Default: 0 */ + CIMPP::SynchronousMachineModelKind modelType; + + /** \brief Type of rotor on physical machine. Default: 0 */ + CIMPP::RotorKind rotorType; + + /** \brief Damping time constant for `Canay` reactance. Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Direct-axis transient rotor time constant (T`do) (> T``do). Typical Value = 5. Default: nullptr */ + CIMPP::Seconds tpdo; + + /** \brief Direct-axis subtransient rotor time constant (T``do) (> 0). Typical Value = 0.03. Default: nullptr */ + CIMPP::Seconds tppdo; + + /** \brief Quadrature-axis subtransient rotor time constant (T``qo) (> 0). Typical Value = 0.03. Default: nullptr */ + CIMPP::Seconds tppqo; + + /** \brief Quadrature-axis transient rotor time constant (T`qo) (> T``qo). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds tpqo; + + /** \brief Direct-axis subtransient reactance (unsaturated) (X``d) (> Xl). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU xDirectSubtrans; + + /** \brief Direct-axis synchronous reactance (Xd) (>= X`d). The quotient of a sustained value of that AC component of armature voltage that is produced by the total direct-axis flux due to direct-axis armature current and the value of the AC component of this current, the machine running at rated speed. Typical Value = 1.8. Default: nullptr */ + CIMPP::PU xDirectSync; + + /** \brief Direct-axis transient reactance (unsaturated) (X`d) (> =X``d). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU xDirectTrans; + + /** \brief Quadrature-axis subtransient reactance (X``q) (> Xl). Typical Value = 0.2. Default: nullptr */ + CIMPP::PU xQuadSubtrans; + + /** \brief Quadrature-axis synchronous reactance (Xq) (> =X`q). The ratio of the component of reactive armature voltage, due to the quadrature-axis component of armature current, to this component of current, under steady state conditions and at rated frequency. Typical Value = 1.6. Default: nullptr */ + CIMPP::PU xQuadSync; + + /** \brief Quadrature-axis transient reactance (X`q) (> =X``q). Typical Value = 0.3. Default: nullptr */ + CIMPP::PU xQuadTrans; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/SynchronousMachineUserDefined.cpp b/CGMES_2.4.15_27JAN2020/SynchronousMachineUserDefined.cpp index 80f8bfed6..9bdfab19d 100644 --- a/CGMES_2.4.15_27JAN2020/SynchronousMachineUserDefined.cpp +++ b/CGMES_2.4.15_27JAN2020/SynchronousMachineUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -SynchronousMachineUserDefined::SynchronousMachineUserDefined() {}; -SynchronousMachineUserDefined::~SynchronousMachineUserDefined() {}; +SynchronousMachineUserDefined::SynchronousMachineUserDefined() {} +SynchronousMachineUserDefined::~SynchronousMachineUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ SynchronousMachineUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_SynchronousMachineUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (SynchronousMachineUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_SynchronousMachineUserDefined(BaseClass*, BaseClass*); bool assign_SynchronousMachineUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_SynchronousMachineUserDefined_ProprietaryParameterDynamics(BaseClass return false; } +bool assign_SynchronousMachineUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + SynchronousMachineUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_SynchronousMachineUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_SynchronousMachineUserDefined_proprietary(const BaseClass* BaseClass_pt return false; } - - const char SynchronousMachineUserDefined::debugName[] = "SynchronousMachineUserDefined"; const char* SynchronousMachineUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* SynchronousMachineUserDefined::debugString() const void SynchronousMachineUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SynchronousMachineUserDefined"), &SynchronousMachineUserDefined_factory)); + factory_map.emplace("cim:SynchronousMachineUserDefined", &SynchronousMachineUserDefined_factory); } void SynchronousMachineUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineUserDefined.proprietary"), &assign_SynchronousMachineUserDefined_proprietary)); + assign_map.emplace("cim:SynchronousMachineUserDefined.proprietary", &assign_SynchronousMachineUserDefined_proprietary); } void SynchronousMachineUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineUserDefined.ProprietaryParameterDynamics"), &assign_SynchronousMachineUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:SynchronousMachineUserDefined.ProprietaryParameterDynamics", &assign_SynchronousMachineUserDefined_ProprietaryParameterDynamics); } void SynchronousMachineUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/SynchronousMachineUserDefined.hpp b/CGMES_2.4.15_27JAN2020/SynchronousMachineUserDefined.hpp index e575390b2..6a9b6c7f7 100644 --- a/CGMES_2.4.15_27JAN2020/SynchronousMachineUserDefined.hpp +++ b/CGMES_2.4.15_27JAN2020/SynchronousMachineUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Synchronous machine whose dynamic behaviour is described by a user-defined model. - */ + /** \brief Synchronous machine whose dynamic behaviour is described by a user-defined model. */ class SynchronousMachineUserDefined : public SynchronousMachineDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP SynchronousMachineUserDefined(); ~SynchronousMachineUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/TapChanger.cpp b/CGMES_2.4.15_27JAN2020/TapChanger.cpp index 9d1a3cdd3..eeecf62b0 100644 --- a/CGMES_2.4.15_27JAN2020/TapChanger.cpp +++ b/CGMES_2.4.15_27JAN2020/TapChanger.cpp @@ -11,19 +11,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "SvTapStep.hpp" #include "TapChangerControl.hpp" #include "TapSchedule.hpp" -#include "Boolean.hpp" -#include "Integer.hpp" -#include "Integer.hpp" -#include "Boolean.hpp" -#include "Integer.hpp" -#include "Voltage.hpp" -#include "Integer.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -TapChanger::TapChanger() : SvTapStep(nullptr), TapChangerControl(nullptr) {}; -TapChanger::~TapChanger() {}; +TapChanger::TapChanger() : SvTapStep(nullptr), TapChangerControl(nullptr) {} +TapChanger::~TapChanger() {} static const std::list PossibleProfilesForClass = { @@ -62,164 +54,189 @@ TapChanger::getPossibleProfilesForAttributes() const return map; } +bool assign_SvTapStep_TapChanger(BaseClass*, BaseClass*); +bool assign_TapChanger_SvTapStep(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TapChanger* element = dynamic_cast(BaseClass_ptr1); + SvTapStep* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->SvTapStep != element2) + { + element->SvTapStep = element2; + return assign_SvTapStep_TapChanger(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_TapChanger_controlEnabled(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChangerControl_TapChanger(BaseClass*, BaseClass*); +bool assign_TapChanger_TapChangerControl(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + TapChanger* element = dynamic_cast(BaseClass_ptr1); + TapChangerControl* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->controlEnabled; - if (buffer.fail()) - return false; - else - return true; + if (element->TapChangerControl != element2) + { + element->TapChangerControl = element2; + return assign_TapChangerControl_TapChanger(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_TapChanger_highStep(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapSchedule_TapChanger(BaseClass*, BaseClass*); +bool assign_TapChanger_TapSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + TapChanger* element = dynamic_cast(BaseClass_ptr1); + TapSchedule* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->highStep; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->TapSchedules.begin(), element->TapSchedules.end(), element2) == element->TapSchedules.end()) + { + element->TapSchedules.push_back(element2); + return assign_TapSchedule_TapChanger(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_TapChanger_lowStep(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChanger_controlEnabled(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->lowStep; - if (buffer.fail()) - return false; - else + buffer >> element->controlEnabled; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChanger_ltcFlag(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChanger_highStep(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->ltcFlag; - if (buffer.fail()) - return false; - else + buffer >> element->highStep; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChanger_neutralStep(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChanger_lowStep(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->neutralStep; - if (buffer.fail()) - return false; - else + buffer >> element->lowStep; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChanger_neutralU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChanger_ltcFlag(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->neutralU; - if (buffer.fail()) - return false; - else + buffer >> element->ltcFlag; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChanger_normalStep(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChanger_neutralStep(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->normalStep; - if (buffer.fail()) - return false; - else + buffer >> element->neutralStep; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChanger_step(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChanger_neutralU(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->step; - if (buffer.fail()) - return false; - else + buffer >> element->neutralU; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_SvTapStep_TapChanger(BaseClass*, BaseClass*); -bool assign_TapChanger_SvTapStep(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_TapChanger_normalStep(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { TapChanger* element = dynamic_cast(BaseClass_ptr1); - SvTapStep* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->SvTapStep != element2) + buffer >> element->normalStep; + if (!buffer.fail()) { - element->SvTapStep = element2; - return assign_SvTapStep_TapChanger(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_TapChangerControl_TapChanger(BaseClass*, BaseClass*); -bool assign_TapChanger_TapChangerControl(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_TapChanger_step(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { TapChanger* element = dynamic_cast(BaseClass_ptr1); - TapChangerControl* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->TapChangerControl != element2) + buffer >> element->step; + if (!buffer.fail()) { - element->TapChangerControl = element2; - return assign_TapChangerControl_TapChanger(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_TapSchedule_TapChanger(BaseClass*, BaseClass*); -bool assign_TapChanger_TapSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + + +bool get_TapChanger_TapChangerControl(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - TapChanger* element = dynamic_cast(BaseClass_ptr1); - TapSchedule* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (std::find(element->TapSchedules.begin(), element->TapSchedules.end(), element2) == element->TapSchedules.end()) + if (element->TapChangerControl != 0) { - element->TapSchedules.push_back(element2); - return assign_TapSchedule_TapChanger(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->TapChangerControl); + return true; } - return true; } return false; } + bool get_TapChanger_controlEnabled(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChanger* element = dynamic_cast(BaseClass_ptr1)) + const TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->controlEnabled; if (!buffer.str().empty()) @@ -233,7 +250,8 @@ bool get_TapChanger_controlEnabled(const BaseClass* BaseClass_ptr1, std::strings bool get_TapChanger_highStep(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChanger* element = dynamic_cast(BaseClass_ptr1)) + const TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->highStep; if (!buffer.str().empty()) @@ -247,7 +265,8 @@ bool get_TapChanger_highStep(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_TapChanger_lowStep(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChanger* element = dynamic_cast(BaseClass_ptr1)) + const TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lowStep; if (!buffer.str().empty()) @@ -261,7 +280,8 @@ bool get_TapChanger_lowStep(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_TapChanger_ltcFlag(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChanger* element = dynamic_cast(BaseClass_ptr1)) + const TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ltcFlag; if (!buffer.str().empty()) @@ -275,7 +295,8 @@ bool get_TapChanger_ltcFlag(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_TapChanger_neutralStep(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChanger* element = dynamic_cast(BaseClass_ptr1)) + const TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->neutralStep; if (!buffer.str().empty()) @@ -289,7 +310,8 @@ bool get_TapChanger_neutralStep(const BaseClass* BaseClass_ptr1, std::stringstre bool get_TapChanger_neutralU(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChanger* element = dynamic_cast(BaseClass_ptr1)) + const TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->neutralU; if (!buffer.str().empty()) @@ -303,7 +325,8 @@ bool get_TapChanger_neutralU(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_TapChanger_normalStep(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChanger* element = dynamic_cast(BaseClass_ptr1)) + const TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->normalStep; if (!buffer.str().empty()) @@ -317,7 +340,8 @@ bool get_TapChanger_normalStep(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_TapChanger_step(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChanger* element = dynamic_cast(BaseClass_ptr1)) + const TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->step; if (!buffer.str().empty()) @@ -329,21 +353,6 @@ bool get_TapChanger_step(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } - -bool get_TapChanger_TapChangerControl(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const TapChanger* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->TapChangerControl != 0) - { - BaseClass_list.push_back(element->TapChangerControl); - return true; - } - } - return false; -} - - const char TapChanger::debugName[] = "TapChanger"; const char* TapChanger::debugString() const { @@ -352,26 +361,26 @@ const char* TapChanger::debugString() const void TapChanger::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TapChanger"), &TapChanger_factory)); + factory_map.emplace("cim:TapChanger", &TapChanger_factory); } void TapChanger::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TapChanger.controlEnabled"), &assign_TapChanger_controlEnabled)); - assign_map.insert(std::make_pair(std::string("cim:TapChanger.highStep"), &assign_TapChanger_highStep)); - assign_map.insert(std::make_pair(std::string("cim:TapChanger.lowStep"), &assign_TapChanger_lowStep)); - assign_map.insert(std::make_pair(std::string("cim:TapChanger.ltcFlag"), &assign_TapChanger_ltcFlag)); - assign_map.insert(std::make_pair(std::string("cim:TapChanger.neutralStep"), &assign_TapChanger_neutralStep)); - assign_map.insert(std::make_pair(std::string("cim:TapChanger.neutralU"), &assign_TapChanger_neutralU)); - assign_map.insert(std::make_pair(std::string("cim:TapChanger.normalStep"), &assign_TapChanger_normalStep)); - assign_map.insert(std::make_pair(std::string("cim:TapChanger.step"), &assign_TapChanger_step)); + assign_map.emplace("cim:TapChanger.controlEnabled", &assign_TapChanger_controlEnabled); + assign_map.emplace("cim:TapChanger.highStep", &assign_TapChanger_highStep); + assign_map.emplace("cim:TapChanger.lowStep", &assign_TapChanger_lowStep); + assign_map.emplace("cim:TapChanger.ltcFlag", &assign_TapChanger_ltcFlag); + assign_map.emplace("cim:TapChanger.neutralStep", &assign_TapChanger_neutralStep); + assign_map.emplace("cim:TapChanger.neutralU", &assign_TapChanger_neutralU); + assign_map.emplace("cim:TapChanger.normalStep", &assign_TapChanger_normalStep); + assign_map.emplace("cim:TapChanger.step", &assign_TapChanger_step); } void TapChanger::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TapChanger.SvTapStep"), &assign_TapChanger_SvTapStep)); - assign_map.insert(std::make_pair(std::string("cim:TapChanger.TapChangerControl"), &assign_TapChanger_TapChangerControl)); - assign_map.insert(std::make_pair(std::string("cim:TapChanger.TapSchedules"), &assign_TapChanger_TapSchedules)); + assign_map.emplace("cim:TapChanger.SvTapStep", &assign_TapChanger_SvTapStep); + assign_map.emplace("cim:TapChanger.TapChangerControl", &assign_TapChanger_TapChangerControl); + assign_map.emplace("cim:TapChanger.TapSchedules", &assign_TapChanger_TapSchedules); } void TapChanger::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/TapChanger.hpp b/CGMES_2.4.15_27JAN2020/TapChanger.hpp index bf60d5805..f76517308 100644 --- a/CGMES_2.4.15_27JAN2020/TapChanger.hpp +++ b/CGMES_2.4.15_27JAN2020/TapChanger.hpp @@ -23,9 +23,7 @@ namespace CIMPP class TapChangerControl; class TapSchedule; - /* - Mechanism for changing transformer winding tap positions. - */ + /** \brief Mechanism for changing transformer winding tap positions. */ class TapChanger : public PowerSystemResource { public: @@ -33,17 +31,38 @@ namespace CIMPP TapChanger(); ~TapChanger() override; - CIMPP::SvTapStep* SvTapStep; /* The tap step state associated with the tap changer. Default: 0 */ - CIMPP::TapChangerControl* TapChangerControl; /* The tap changers that participates in this regulating tap control scheme. Default: 0 */ - std::list TapSchedules; /* A TapSchedule is associated with a TapChanger. Default: 0 */ - CIMPP::Boolean controlEnabled; /* Specifies the regulation status of the equipment. True is regulating, false is not regulating. Default: false */ - CIMPP::Integer highStep; /* Highest possible tap step position, advance from neutral. The attribute shall be greater than lowStep. Default: 0 */ - CIMPP::Integer lowStep; /* Lowest possible tap step position, retard from neutral Default: 0 */ - CIMPP::Boolean ltcFlag; /* Specifies whether or not a TapChanger has load tap changing capabilities. Default: false */ - CIMPP::Integer neutralStep; /* The neutral tap step position for this winding. The attribute shall be equal or greater than lowStep and equal or less than highStep. Default: 0 */ - CIMPP::Voltage neutralU; /* Voltage at which the winding operates at the neutral tap setting. Default: nullptr */ - CIMPP::Integer normalStep; /* The tap step position used in `normal` network operation for this winding. For a `Fixed` tap changer indicates the current physical tap setting. The attribute shall be equal or greater than lowStep and equal or less than highStep. Default: 0 */ - CIMPP::Simple_Float step; /* Tap changer position. Starting step for a steady state solution. Non integer values are allowed to support continuous tap variables. The reasons for continuous value are to support study cases where no discrete tap changers has yet been designed, a solutions where a narrow voltage band force the tap step to oscillate or accommodate for a continuous solution as input. The attribute shall be equal or greater than lowStep and equal or less than highStep. Default: nullptr */ + /** \brief The tap step state associated with the tap changer. Default: 0 */ + CIMPP::SvTapStep* SvTapStep; + + /** \brief The tap changers that participates in this regulating tap control scheme. Default: 0 */ + CIMPP::TapChangerControl* TapChangerControl; + + /** \brief A TapSchedule is associated with a TapChanger. Default: 0 */ + std::list TapSchedules; + + /** \brief Specifies the regulation status of the equipment. True is regulating, false is not regulating. Default: false */ + CIMPP::Boolean controlEnabled; + + /** \brief Highest possible tap step position, advance from neutral. The attribute shall be greater than lowStep. Default: 0 */ + CIMPP::Integer highStep; + + /** \brief Lowest possible tap step position, retard from neutral Default: 0 */ + CIMPP::Integer lowStep; + + /** \brief Specifies whether or not a TapChanger has load tap changing capabilities. Default: false */ + CIMPP::Boolean ltcFlag; + + /** \brief The neutral tap step position for this winding. The attribute shall be equal or greater than lowStep and equal or less than highStep. Default: 0 */ + CIMPP::Integer neutralStep; + + /** \brief Voltage at which the winding operates at the neutral tap setting. Default: nullptr */ + CIMPP::Voltage neutralU; + + /** \brief The tap step position used in `normal` network operation for this winding. For a `Fixed` tap changer indicates the current physical tap setting. The attribute shall be equal or greater than lowStep and equal or less than highStep. Default: 0 */ + CIMPP::Integer normalStep; + + /** \brief Tap changer position. Starting step for a steady state solution. Non integer values are allowed to support continuous tap variables. The reasons for continuous value are to support study cases where no discrete tap changers has yet been designed, a solutions where a narrow voltage band force the tap step to oscillate or accommodate for a continuous solution as input. The attribute shall be equal or greater than lowStep and equal or less than highStep. Default: nullptr */ + CIMPP::Simple_Float step; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/TapChangerControl.cpp b/CGMES_2.4.15_27JAN2020/TapChangerControl.cpp index 4b1f495eb..167b0d3a7 100644 --- a/CGMES_2.4.15_27JAN2020/TapChangerControl.cpp +++ b/CGMES_2.4.15_27JAN2020/TapChangerControl.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -TapChangerControl::TapChangerControl() {}; -TapChangerControl::~TapChangerControl() {}; +TapChangerControl::TapChangerControl() {} +TapChangerControl::~TapChangerControl() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ TapChangerControl::getPossibleProfilesForAttributes() const return map; } - - bool assign_TapChanger_TapChangerControl(BaseClass*, BaseClass*); bool assign_TapChangerControl_TapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,7 +59,6 @@ bool assign_TapChangerControl_TapChanger(BaseClass* BaseClass_ptr1, BaseClass* B } - const char TapChangerControl::debugName[] = "TapChangerControl"; const char* TapChangerControl::debugString() const { @@ -70,7 +67,7 @@ const char* TapChangerControl::debugString() const void TapChangerControl::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TapChangerControl"), &TapChangerControl_factory)); + factory_map.emplace("cim:TapChangerControl", &TapChangerControl_factory); } void TapChangerControl::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -79,7 +76,7 @@ void TapChangerControl::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TapChangerControl.TapChanger"), &assign_TapChangerControl_TapChanger)); + assign_map.emplace("cim:TapChangerControl.TapChanger", &assign_TapChangerControl_TapChanger); } void TapChangerControl::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/TapChangerControl.hpp b/CGMES_2.4.15_27JAN2020/TapChangerControl.hpp index c42973e2f..ee70475dc 100644 --- a/CGMES_2.4.15_27JAN2020/TapChangerControl.hpp +++ b/CGMES_2.4.15_27JAN2020/TapChangerControl.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class TapChanger; - /* - Describes behavior specific to tap changers, e.g. how the voltage at the end of a line varies with the load level and compensation of the voltage drop by tap adjustment. - */ + /** \brief Describes behavior specific to tap changers, e.g. how the voltage at the end of a line varies with the load level and compensation of the voltage drop by tap adjustment. */ class TapChangerControl : public RegulatingControl { public: @@ -27,7 +25,8 @@ namespace CIMPP TapChangerControl(); ~TapChangerControl() override; - std::list TapChanger; /* The regulating control scheme in which this tap changer participates. Default: 0 */ + /** \brief The regulating control scheme in which this tap changer participates. Default: 0 */ + std::list TapChanger; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/TapChangerTablePoint.cpp b/CGMES_2.4.15_27JAN2020/TapChangerTablePoint.cpp index 3f0e77404..2044a9212 100644 --- a/CGMES_2.4.15_27JAN2020/TapChangerTablePoint.cpp +++ b/CGMES_2.4.15_27JAN2020/TapChangerTablePoint.cpp @@ -8,17 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PerCent.hpp" -#include "PerCent.hpp" -#include "PerCent.hpp" -#include "Simple_Float.hpp" -#include "Integer.hpp" -#include "PerCent.hpp" using namespace CIMPP; -TapChangerTablePoint::TapChangerTablePoint() {}; -TapChangerTablePoint::~TapChangerTablePoint() {}; +TapChangerTablePoint::TapChangerTablePoint() {} +TapChangerTablePoint::~TapChangerTablePoint() {} static const std::list PossibleProfilesForClass = { @@ -50,90 +44,94 @@ TapChangerTablePoint::getPossibleProfilesForAttributes() const return map; } - -bool assign_TapChangerTablePoint_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChangerTablePoint_b(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChangerTablePoint_g(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChangerTablePoint_g(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChangerTablePoint_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChangerTablePoint_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChangerTablePoint_ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChangerTablePoint_ratio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChangerTablePoint_step(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChangerTablePoint_step(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->step; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChangerTablePoint_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChangerTablePoint_x(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_TapChangerTablePoint_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b; if (!buffer.str().empty()) @@ -147,7 +145,8 @@ bool get_TapChangerTablePoint_b(const BaseClass* BaseClass_ptr1, std::stringstre bool get_TapChangerTablePoint_g(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g; if (!buffer.str().empty()) @@ -161,7 +160,8 @@ bool get_TapChangerTablePoint_g(const BaseClass* BaseClass_ptr1, std::stringstre bool get_TapChangerTablePoint_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -175,7 +175,8 @@ bool get_TapChangerTablePoint_r(const BaseClass* BaseClass_ptr1, std::stringstre bool get_TapChangerTablePoint_ratio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratio; if (!buffer.str().empty()) @@ -189,7 +190,8 @@ bool get_TapChangerTablePoint_ratio(const BaseClass* BaseClass_ptr1, std::string bool get_TapChangerTablePoint_step(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->step; if (!buffer.str().empty()) @@ -203,7 +205,8 @@ bool get_TapChangerTablePoint_step(const BaseClass* BaseClass_ptr1, std::strings bool get_TapChangerTablePoint_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x; if (!buffer.str().empty()) @@ -215,8 +218,6 @@ bool get_TapChangerTablePoint_x(const BaseClass* BaseClass_ptr1, std::stringstre return false; } - - const char TapChangerTablePoint::debugName[] = "TapChangerTablePoint"; const char* TapChangerTablePoint::debugString() const { @@ -225,17 +226,17 @@ const char* TapChangerTablePoint::debugString() const void TapChangerTablePoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TapChangerTablePoint"), &TapChangerTablePoint_factory)); + factory_map.emplace("cim:TapChangerTablePoint", &TapChangerTablePoint_factory); } void TapChangerTablePoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TapChangerTablePoint.b"), &assign_TapChangerTablePoint_b)); - assign_map.insert(std::make_pair(std::string("cim:TapChangerTablePoint.g"), &assign_TapChangerTablePoint_g)); - assign_map.insert(std::make_pair(std::string("cim:TapChangerTablePoint.r"), &assign_TapChangerTablePoint_r)); - assign_map.insert(std::make_pair(std::string("cim:TapChangerTablePoint.ratio"), &assign_TapChangerTablePoint_ratio)); - assign_map.insert(std::make_pair(std::string("cim:TapChangerTablePoint.step"), &assign_TapChangerTablePoint_step)); - assign_map.insert(std::make_pair(std::string("cim:TapChangerTablePoint.x"), &assign_TapChangerTablePoint_x)); + assign_map.emplace("cim:TapChangerTablePoint.b", &assign_TapChangerTablePoint_b); + assign_map.emplace("cim:TapChangerTablePoint.g", &assign_TapChangerTablePoint_g); + assign_map.emplace("cim:TapChangerTablePoint.r", &assign_TapChangerTablePoint_r); + assign_map.emplace("cim:TapChangerTablePoint.ratio", &assign_TapChangerTablePoint_ratio); + assign_map.emplace("cim:TapChangerTablePoint.step", &assign_TapChangerTablePoint_step); + assign_map.emplace("cim:TapChangerTablePoint.x", &assign_TapChangerTablePoint_x); } void TapChangerTablePoint::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/TapChangerTablePoint.hpp b/CGMES_2.4.15_27JAN2020/TapChangerTablePoint.hpp index 58c557043..aa6327644 100644 --- a/CGMES_2.4.15_27JAN2020/TapChangerTablePoint.hpp +++ b/CGMES_2.4.15_27JAN2020/TapChangerTablePoint.hpp @@ -26,12 +26,23 @@ namespace CIMPP TapChangerTablePoint(); ~TapChangerTablePoint() override; - CIMPP::PerCent b; /* The magnetizing branch susceptance deviation in percent of nominal value. The actual susceptance is calculated as follows: calculated magnetizing susceptance = b(nominal) * (1 + b(from this class)/100). The b(nominal) is defined as the static magnetizing susceptance on the associated power transformer end or ends. This model assumes the star impedance (pi model) form. Default: nullptr */ - CIMPP::PerCent g; /* The magnetizing branch conductance deviation in percent of nominal value. The actual conductance is calculated as follows: calculated magnetizing conductance = g(nominal) * (1 + g(from this class)/100). The g(nominal) is defined as the static magnetizing conductance on the associated power transformer end or ends. This model assumes the star impedance (pi model) form. Default: nullptr */ - CIMPP::PerCent r; /* The resistance deviation in percent of nominal value. The actual reactance is calculated as follows: calculated resistance = r(nominal) * (1 + r(from this class)/100). The r(nominal) is defined as the static resistance on the associated power transformer end or ends. This model assumes the star impedance (pi model) form. Default: nullptr */ - CIMPP::Simple_Float ratio; /* The voltage ratio in per unit. Hence this is a value close to one. Default: nullptr */ - CIMPP::Integer step; /* The tap step. Default: 0 */ - CIMPP::PerCent x; /* The series reactance deviation in percent of nominal value. The actual reactance is calculated as follows: calculated reactance = x(nominal) * (1 + x(from this class)/100). The x(nominal) is defined as the static series reactance on the associated power transformer end or ends. This model assumes the star impedance (pi model) form. Default: nullptr */ + /** \brief The magnetizing branch susceptance deviation in percent of nominal value. The actual susceptance is calculated as follows: calculated magnetizing susceptance = b(nominal) * (1 + b(from this class)/100). The b(nominal) is defined as the static magnetizing susceptance on the associated power transformer end or ends. This model assumes the star impedance (pi model) form. Default: nullptr */ + CIMPP::PerCent b; + + /** \brief The magnetizing branch conductance deviation in percent of nominal value. The actual conductance is calculated as follows: calculated magnetizing conductance = g(nominal) * (1 + g(from this class)/100). The g(nominal) is defined as the static magnetizing conductance on the associated power transformer end or ends. This model assumes the star impedance (pi model) form. Default: nullptr */ + CIMPP::PerCent g; + + /** \brief The resistance deviation in percent of nominal value. The actual reactance is calculated as follows: calculated resistance = r(nominal) * (1 + r(from this class)/100). The r(nominal) is defined as the static resistance on the associated power transformer end or ends. This model assumes the star impedance (pi model) form. Default: nullptr */ + CIMPP::PerCent r; + + /** \brief The voltage ratio in per unit. Hence this is a value close to one. Default: nullptr */ + CIMPP::Simple_Float ratio; + + /** \brief The tap step. Default: 0 */ + CIMPP::Integer step; + + /** \brief The series reactance deviation in percent of nominal value. The actual reactance is calculated as follows: calculated reactance = x(nominal) * (1 + x(from this class)/100). The x(nominal) is defined as the static series reactance on the associated power transformer end or ends. This model assumes the star impedance (pi model) form. Default: nullptr */ + CIMPP::PerCent x; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/TapSchedule.cpp b/CGMES_2.4.15_27JAN2020/TapSchedule.cpp index d294bd984..039a79967 100644 --- a/CGMES_2.4.15_27JAN2020/TapSchedule.cpp +++ b/CGMES_2.4.15_27JAN2020/TapSchedule.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -TapSchedule::TapSchedule() : TapChanger(nullptr) {}; -TapSchedule::~TapSchedule() {}; +TapSchedule::TapSchedule() : TapChanger(nullptr) {} +TapSchedule::~TapSchedule() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ TapSchedule::getPossibleProfilesForAttributes() const return map; } - - bool assign_TapChanger_TapSchedules(BaseClass*, BaseClass*); bool assign_TapSchedule_TapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_TapSchedule_TapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseCla return false; } - bool get_TapSchedule_TapChanger(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TapSchedule* element = dynamic_cast(BaseClass_ptr1)) + const TapSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->TapChanger != 0) { @@ -73,7 +71,6 @@ bool get_TapSchedule_TapChanger(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TapSchedule"), &TapSchedule_factory)); + factory_map.emplace("cim:TapSchedule", &TapSchedule_factory); } void TapSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void TapSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TapSchedule.TapChanger"), &assign_TapSchedule_TapChanger)); + assign_map.emplace("cim:TapSchedule.TapChanger", &assign_TapSchedule_TapChanger); } void TapSchedule::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/TapSchedule.hpp b/CGMES_2.4.15_27JAN2020/TapSchedule.hpp index 3f391e682..70565884c 100644 --- a/CGMES_2.4.15_27JAN2020/TapSchedule.hpp +++ b/CGMES_2.4.15_27JAN2020/TapSchedule.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class TapChanger; - /* - A pre-established pattern over time for a tap step. - */ + /** \brief A pre-established pattern over time for a tap step. */ class TapSchedule : public SeasonDayTypeSchedule { public: @@ -27,7 +25,8 @@ namespace CIMPP TapSchedule(); ~TapSchedule() override; - CIMPP::TapChanger* TapChanger; /* A TapChanger can have TapSchedules. Default: 0 */ + /** \brief A TapChanger can have TapSchedules. Default: 0 */ + CIMPP::TapChanger* TapChanger; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Temperature.hpp b/CGMES_2.4.15_27JAN2020/Temperature.hpp index 33ba8ea2b..b7dfa3115 100644 --- a/CGMES_2.4.15_27JAN2020/Temperature.hpp +++ b/CGMES_2.4.15_27JAN2020/Temperature.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Value of temperature in degrees Celsius. - */ + /** \brief Value of temperature in degrees Celsius. */ class Temperature { public: diff --git a/CGMES_2.4.15_27JAN2020/Terminal.cpp b/CGMES_2.4.15_27JAN2020/Terminal.cpp index b3b9ab2ef..25d0c3a25 100644 --- a/CGMES_2.4.15_27JAN2020/Terminal.cpp +++ b/CGMES_2.4.15_27JAN2020/Terminal.cpp @@ -8,10 +8,9 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include +#include "ACDCConverter.hpp" #include "ConductingEquipment.hpp" #include "ConnectivityNode.hpp" -#include "ACDCConverter.hpp" -#include "MutualCoupling.hpp" #include "MutualCoupling.hpp" #include "RegulatingControl.hpp" #include "RemoteInputSignal.hpp" @@ -19,12 +18,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "TieFlow.hpp" #include "TopologicalNode.hpp" #include "TransformerEnd.hpp" -#include "PhaseCode.hpp" using namespace CIMPP; -Terminal::Terminal() : ConductingEquipment(nullptr), ConnectivityNode(nullptr), RegulatingControl(nullptr), SvPowerFlow(nullptr), TopologicalNode(nullptr) {}; -Terminal::~Terminal() {}; +Terminal::Terminal() : ConductingEquipment(nullptr), ConnectivityNode(nullptr), RegulatingControl(nullptr), SvPowerFlow(nullptr), TopologicalNode(nullptr) {} +Terminal::~Terminal() {} static const std::list PossibleProfilesForClass = { @@ -67,21 +65,6 @@ Terminal::getPossibleProfilesForAttributes() const return map; } - -bool assign_Terminal_phases(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (Terminal* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->phases; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ConductingEquipment_Terminals(BaseClass*, BaseClass*); bool assign_Terminal_ConductingEquipment(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -98,6 +81,7 @@ bool assign_Terminal_ConductingEquipment(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_ConnectivityNode_Terminals(BaseClass*, BaseClass*); bool assign_Terminal_ConnectivityNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -114,6 +98,7 @@ bool assign_Terminal_ConnectivityNode(BaseClass* BaseClass_ptr1, BaseClass* Base } return false; } + bool assign_ACDCConverter_PccTerminal(BaseClass*, BaseClass*); bool assign_Terminal_ConverterDCSides(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -130,6 +115,7 @@ bool assign_Terminal_ConverterDCSides(BaseClass* BaseClass_ptr1, BaseClass* Base } return false; } + bool assign_MutualCoupling_First_Terminal(BaseClass*, BaseClass*); bool assign_Terminal_HasFirstMutualCoupling(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -146,6 +132,7 @@ bool assign_Terminal_HasFirstMutualCoupling(BaseClass* BaseClass_ptr1, BaseClass } return false; } + bool assign_MutualCoupling_Second_Terminal(BaseClass*, BaseClass*); bool assign_Terminal_HasSecondMutualCoupling(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -162,6 +149,7 @@ bool assign_Terminal_HasSecondMutualCoupling(BaseClass* BaseClass_ptr1, BaseClas } return false; } + bool assign_RegulatingControl_Terminal(BaseClass*, BaseClass*); bool assign_Terminal_RegulatingControl(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -178,6 +166,7 @@ bool assign_Terminal_RegulatingControl(BaseClass* BaseClass_ptr1, BaseClass* Bas } return false; } + bool assign_RemoteInputSignal_Terminal(BaseClass*, BaseClass*); bool assign_Terminal_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -194,6 +183,7 @@ bool assign_Terminal_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* Bas } return false; } + bool assign_SvPowerFlow_Terminal(BaseClass*, BaseClass*); bool assign_Terminal_SvPowerFlow(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -210,6 +200,7 @@ bool assign_Terminal_SvPowerFlow(BaseClass* BaseClass_ptr1, BaseClass* BaseClass } return false; } + bool assign_TieFlow_Terminal(BaseClass*, BaseClass*); bool assign_Terminal_TieFlow(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -226,6 +217,7 @@ bool assign_Terminal_TieFlow(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr } return false; } + bool assign_TopologicalNode_Terminal(BaseClass*, BaseClass*); bool assign_Terminal_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -242,6 +234,7 @@ bool assign_Terminal_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseC } return false; } + bool assign_TransformerEnd_Terminal(BaseClass*, BaseClass*); bool assign_Terminal_TransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -259,10 +252,24 @@ bool assign_Terminal_TransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* BaseCl return false; } +bool assign_Terminal_phases(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + Terminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->phases; + if (!buffer.fail()) + { + return true; + } + } + return false; +} bool get_Terminal_ConductingEquipment(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Terminal* element = dynamic_cast(BaseClass_ptr1)) + const Terminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ConductingEquipment != 0) { @@ -275,7 +282,8 @@ bool get_Terminal_ConductingEquipment(const BaseClass* BaseClass_ptr1, std::list bool get_Terminal_ConnectivityNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Terminal* element = dynamic_cast(BaseClass_ptr1)) + const Terminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ConnectivityNode != 0) { @@ -286,9 +294,17 @@ bool get_Terminal_ConnectivityNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Terminal* element = dynamic_cast(BaseClass_ptr1)) + const Terminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->TopologicalNode != 0) { @@ -302,7 +318,8 @@ bool get_Terminal_TopologicalNode(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1)) + const Terminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->phases; if (!buffer.str().empty()) @@ -322,27 +339,27 @@ const char* Terminal::debugString() const void Terminal::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Terminal"), &Terminal_factory)); + factory_map.emplace("cim:Terminal", &Terminal_factory); } void Terminal::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Terminal.phases"), &assign_Terminal_phases)); + assign_map.emplace("cim:Terminal.phases", &assign_Terminal_phases); } void Terminal::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Terminal.ConductingEquipment"), &assign_Terminal_ConductingEquipment)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.ConnectivityNode"), &assign_Terminal_ConnectivityNode)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.ConverterDCSides"), &assign_Terminal_ConverterDCSides)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.HasFirstMutualCoupling"), &assign_Terminal_HasFirstMutualCoupling)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.HasSecondMutualCoupling"), &assign_Terminal_HasSecondMutualCoupling)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.RegulatingControl"), &assign_Terminal_RegulatingControl)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.RemoteInputSignal"), &assign_Terminal_RemoteInputSignal)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.SvPowerFlow"), &assign_Terminal_SvPowerFlow)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.TieFlow"), &assign_Terminal_TieFlow)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.TopologicalNode"), &assign_Terminal_TopologicalNode)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.TransformerEnd"), &assign_Terminal_TransformerEnd)); + assign_map.emplace("cim:Terminal.ConductingEquipment", &assign_Terminal_ConductingEquipment); + assign_map.emplace("cim:Terminal.ConnectivityNode", &assign_Terminal_ConnectivityNode); + assign_map.emplace("cim:Terminal.ConverterDCSides", &assign_Terminal_ConverterDCSides); + assign_map.emplace("cim:Terminal.HasFirstMutualCoupling", &assign_Terminal_HasFirstMutualCoupling); + assign_map.emplace("cim:Terminal.HasSecondMutualCoupling", &assign_Terminal_HasSecondMutualCoupling); + assign_map.emplace("cim:Terminal.RegulatingControl", &assign_Terminal_RegulatingControl); + assign_map.emplace("cim:Terminal.RemoteInputSignal", &assign_Terminal_RemoteInputSignal); + assign_map.emplace("cim:Terminal.SvPowerFlow", &assign_Terminal_SvPowerFlow); + assign_map.emplace("cim:Terminal.TieFlow", &assign_Terminal_TieFlow); + assign_map.emplace("cim:Terminal.TopologicalNode", &assign_Terminal_TopologicalNode); + assign_map.emplace("cim:Terminal.TransformerEnd", &assign_Terminal_TransformerEnd); } void Terminal::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/Terminal.hpp b/CGMES_2.4.15_27JAN2020/Terminal.hpp index 9551684a2..58895e261 100644 --- a/CGMES_2.4.15_27JAN2020/Terminal.hpp +++ b/CGMES_2.4.15_27JAN2020/Terminal.hpp @@ -27,9 +27,7 @@ namespace CIMPP class TopologicalNode; class TransformerEnd; - /* - An AC electrical connection point to a piece of conducting equipment. Terminals are connected at physical connection points called connectivity nodes. - */ + /** \brief An AC electrical connection point to a piece of conducting equipment. Terminals are connected at physical connection points called connectivity nodes. */ class Terminal : public ACDCTerminal { public: @@ -37,18 +35,41 @@ namespace CIMPP Terminal(); ~Terminal() override; - CIMPP::ConductingEquipment* ConductingEquipment; /* The conducting equipment of the terminal. Conducting equipment have terminals that may be connected to other conducting equipment terminals via connectivity nodes or topological nodes. Default: 0 */ - CIMPP::ConnectivityNode* ConnectivityNode; /* Terminals interconnected with zero impedance at a this connectivity node. Default: 0 */ - std::list ConverterDCSides; /* Point of common coupling terminal for this converter DC side. It is typically the terminal on the power transformer (or switch) closest to the AC network. The power flow measurement must be the sum of all flows into the transformer. Default: 0 */ - std::list HasFirstMutualCoupling; /* Mutual couplings associated with the branch as the first branch. Default: 0 */ - std::list HasSecondMutualCoupling; /* Mutual couplings with the branch associated as the first branch. Default: 0 */ - CIMPP::RegulatingControl* RegulatingControl; /* The terminal associated with this regulating control. The terminal is associated instead of a node, since the terminal could connect into either a topological node (bus in bus-branch model) or a connectivity node (detailed switch model). Sometimes it is useful to model regulation at a terminal of a bus bar object since the bus bar can be present in both a bus-branch model or a model with switch detail. Default: 0 */ - std::list RemoteInputSignal; /* Input signal coming from this terminal. Default: 0 */ - CIMPP::SvPowerFlow* SvPowerFlow; /* The power flow state variable associated with the terminal. Default: 0 */ - std::list TieFlow; /* The control area tie flows to which this terminal associates. Default: 0 */ - CIMPP::TopologicalNode* TopologicalNode; /* The terminals associated with the topological node. This can be used as an alternative to the connectivity node path to terminal, thus making it unneccesary to model connectivity nodes in some cases. Note that if connectivity nodes are in the model, this association would probably not be used as an input specification. Default: 0 */ - std::list TransformerEnd; /* All transformer ends connected at this terminal. Default: 0 */ - CIMPP::PhaseCode phases; /* Represents the normal network phasing condition. If the attribute is missing three phases (ABC or ABCN) shall be assumed. Default: 0 */ + /** \brief The conducting equipment of the terminal. Conducting equipment have terminals that may be connected to other conducting equipment terminals via connectivity nodes or topological nodes. Default: 0 */ + CIMPP::ConductingEquipment* ConductingEquipment; + + /** \brief Terminals interconnected with zero impedance at a this connectivity node. Default: 0 */ + CIMPP::ConnectivityNode* ConnectivityNode; + + /** \brief Point of common coupling terminal for this converter DC side. It is typically the terminal on the power transformer (or switch) closest to the AC network. The power flow measurement must be the sum of all flows into the transformer. Default: 0 */ + std::list ConverterDCSides; + + /** \brief Mutual couplings associated with the branch as the first branch. Default: 0 */ + std::list HasFirstMutualCoupling; + + /** \brief Mutual couplings with the branch associated as the first branch. Default: 0 */ + std::list HasSecondMutualCoupling; + + /** \brief The terminal associated with this regulating control. The terminal is associated instead of a node, since the terminal could connect into either a topological node (bus in bus-branch model) or a connectivity node (detailed switch model). Sometimes it is useful to model regulation at a terminal of a bus bar object since the bus bar can be present in both a bus-branch model or a model with switch detail. Default: 0 */ + CIMPP::RegulatingControl* RegulatingControl; + + /** \brief Input signal coming from this terminal. Default: 0 */ + std::list RemoteInputSignal; + + /** \brief The power flow state variable associated with the terminal. Default: 0 */ + CIMPP::SvPowerFlow* SvPowerFlow; + + /** \brief The control area tie flows to which this terminal associates. Default: 0 */ + std::list TieFlow; + + /** \brief The terminals associated with the topological node. This can be used as an alternative to the connectivity node path to terminal, thus making it unneccesary to model connectivity nodes in some cases. Note that if connectivity nodes are in the model, this association would probably not be used as an input specification. Default: 0 */ + CIMPP::TopologicalNode* TopologicalNode; + + /** \brief All transformer ends connected at this terminal. Default: 0 */ + std::list TransformerEnd; + + /** \brief Represents the normal network phasing condition. If the attribute is missing three phases (ABC or ABCN) shall be assumed. Default: 0 */ + CIMPP::PhaseCode phases; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/TextDiagramObject.cpp b/CGMES_2.4.15_27JAN2020/TextDiagramObject.cpp index d9738a22b..684542b39 100644 --- a/CGMES_2.4.15_27JAN2020/TextDiagramObject.cpp +++ b/CGMES_2.4.15_27JAN2020/TextDiagramObject.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "String.hpp" using namespace CIMPP; -TextDiagramObject::TextDiagramObject() {}; -TextDiagramObject::~TextDiagramObject() {}; +TextDiagramObject::TextDiagramObject() {} +TextDiagramObject::~TextDiagramObject() {} static const std::list PossibleProfilesForClass = { @@ -40,25 +39,24 @@ TextDiagramObject::getPossibleProfilesForAttributes() const return map; } - -bool assign_TextDiagramObject_text(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TextDiagramObject_text(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TextDiagramObject* element = dynamic_cast(BaseClass_ptr1)) + TextDiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->text = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_TextDiagramObject_text(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TextDiagramObject* element = dynamic_cast(BaseClass_ptr1)) + const TextDiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->text; if (!buffer.str().empty()) @@ -70,8 +68,6 @@ bool get_TextDiagramObject_text(const BaseClass* BaseClass_ptr1, std::stringstre return false; } - - const char TextDiagramObject::debugName[] = "TextDiagramObject"; const char* TextDiagramObject::debugString() const { @@ -80,12 +76,12 @@ const char* TextDiagramObject::debugString() const void TextDiagramObject::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TextDiagramObject"), &TextDiagramObject_factory)); + factory_map.emplace("cim:TextDiagramObject", &TextDiagramObject_factory); } void TextDiagramObject::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TextDiagramObject.text"), &assign_TextDiagramObject_text)); + assign_map.emplace("cim:TextDiagramObject.text", &assign_TextDiagramObject_text); } void TextDiagramObject::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/TextDiagramObject.hpp b/CGMES_2.4.15_27JAN2020/TextDiagramObject.hpp index 3328c0922..188381ff3 100644 --- a/CGMES_2.4.15_27JAN2020/TextDiagramObject.hpp +++ b/CGMES_2.4.15_27JAN2020/TextDiagramObject.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A diagram object for placing free-text or text derived from an associated domain object. - */ + /** \brief A diagram object for placing free-text or text derived from an associated domain object. */ class TextDiagramObject : public DiagramObject { public: @@ -27,7 +25,8 @@ namespace CIMPP TextDiagramObject(); ~TextDiagramObject() override; - CIMPP::String text; /* The text that is displayed by this text diagram object. Default: '' */ + /** \brief The text that is displayed by this text diagram object. Default: '' */ + CIMPP::String text; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ThermalGeneratingUnit.cpp b/CGMES_2.4.15_27JAN2020/ThermalGeneratingUnit.cpp index c789d053f..ee36322aa 100644 --- a/CGMES_2.4.15_27JAN2020/ThermalGeneratingUnit.cpp +++ b/CGMES_2.4.15_27JAN2020/ThermalGeneratingUnit.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ThermalGeneratingUnit::ThermalGeneratingUnit() {}; -ThermalGeneratingUnit::~ThermalGeneratingUnit() {}; +ThermalGeneratingUnit::ThermalGeneratingUnit() {} +ThermalGeneratingUnit::~ThermalGeneratingUnit() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ ThermalGeneratingUnit::getPossibleProfilesForAttributes() const return map; } - - bool assign_FossilFuel_ThermalGeneratingUnit(BaseClass*, BaseClass*); bool assign_ThermalGeneratingUnit_FossilFuels(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,7 +59,6 @@ bool assign_ThermalGeneratingUnit_FossilFuels(BaseClass* BaseClass_ptr1, BaseCla } - const char ThermalGeneratingUnit::debugName[] = "ThermalGeneratingUnit"; const char* ThermalGeneratingUnit::debugString() const { @@ -70,7 +67,7 @@ const char* ThermalGeneratingUnit::debugString() const void ThermalGeneratingUnit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ThermalGeneratingUnit"), &ThermalGeneratingUnit_factory)); + factory_map.emplace("cim:ThermalGeneratingUnit", &ThermalGeneratingUnit_factory); } void ThermalGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -79,7 +76,7 @@ void ThermalGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ThermalGeneratingUnit.FossilFuels"), &assign_ThermalGeneratingUnit_FossilFuels)); + assign_map.emplace("cim:ThermalGeneratingUnit.FossilFuels", &assign_ThermalGeneratingUnit_FossilFuels); } void ThermalGeneratingUnit::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/ThermalGeneratingUnit.hpp b/CGMES_2.4.15_27JAN2020/ThermalGeneratingUnit.hpp index 68b3885e4..2bbb34a5f 100644 --- a/CGMES_2.4.15_27JAN2020/ThermalGeneratingUnit.hpp +++ b/CGMES_2.4.15_27JAN2020/ThermalGeneratingUnit.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class FossilFuel; - /* - A generating unit whose prime mover could be a steam turbine, combustion turbine, or diesel engine. - */ + /** \brief A generating unit whose prime mover could be a steam turbine, combustion turbine, or diesel engine. */ class ThermalGeneratingUnit : public GeneratingUnit { public: @@ -27,7 +25,8 @@ namespace CIMPP ThermalGeneratingUnit(); ~ThermalGeneratingUnit() override; - std::list FossilFuels; /* A thermal generating unit may have one or more fossil fuels. Default: 0 */ + /** \brief A thermal generating unit may have one or more fossil fuels. Default: 0 */ + std::list FossilFuels; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/TieFlow.cpp b/CGMES_2.4.15_27JAN2020/TieFlow.cpp index 1c2a320b7..324dce327 100644 --- a/CGMES_2.4.15_27JAN2020/TieFlow.cpp +++ b/CGMES_2.4.15_27JAN2020/TieFlow.cpp @@ -10,12 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "ControlArea.hpp" #include "Terminal.hpp" -#include "Boolean.hpp" using namespace CIMPP; -TieFlow::TieFlow() : ControlArea(nullptr), Terminal(nullptr) {}; -TieFlow::~TieFlow() {}; +TieFlow::TieFlow() : ControlArea(nullptr), Terminal(nullptr) {} +TieFlow::~TieFlow() {} static const std::list PossibleProfilesForClass = { @@ -44,21 +43,6 @@ TieFlow::getPossibleProfilesForAttributes() const return map; } - -bool assign_TieFlow_positiveFlowIn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TieFlow* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->positiveFlowIn; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ControlArea_TieFlow(BaseClass*, BaseClass*); bool assign_TieFlow_ControlArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -75,6 +59,7 @@ bool assign_TieFlow_ControlArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ } return false; } + bool assign_Terminal_TieFlow(BaseClass*, BaseClass*); bool assign_TieFlow_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -92,24 +77,24 @@ bool assign_TieFlow_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr return false; } -bool get_TieFlow_positiveFlowIn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TieFlow_positiveFlowIn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TieFlow* element = dynamic_cast(BaseClass_ptr1)) + TieFlow* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->positiveFlowIn; - if (!buffer.str().empty()) + buffer >> element->positiveFlowIn; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_TieFlow_ControlArea(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TieFlow* element = dynamic_cast(BaseClass_ptr1)) + const TieFlow* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ControlArea != 0) { @@ -122,7 +107,8 @@ bool get_TieFlow_ControlArea(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TieFlow* element = dynamic_cast(BaseClass_ptr1)) + const TieFlow* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Terminal != 0) { @@ -133,6 +119,20 @@ bool get_TieFlow_Terminal(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->positiveFlowIn; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char TieFlow::debugName[] = "TieFlow"; const char* TieFlow::debugString() const @@ -142,18 +142,18 @@ const char* TieFlow::debugString() const void TieFlow::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TieFlow"), &TieFlow_factory)); + factory_map.emplace("cim:TieFlow", &TieFlow_factory); } void TieFlow::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TieFlow.positiveFlowIn"), &assign_TieFlow_positiveFlowIn)); + assign_map.emplace("cim:TieFlow.positiveFlowIn", &assign_TieFlow_positiveFlowIn); } void TieFlow::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TieFlow.ControlArea"), &assign_TieFlow_ControlArea)); - assign_map.insert(std::make_pair(std::string("cim:TieFlow.Terminal"), &assign_TieFlow_Terminal)); + assign_map.emplace("cim:TieFlow.ControlArea", &assign_TieFlow_ControlArea); + assign_map.emplace("cim:TieFlow.Terminal", &assign_TieFlow_Terminal); } void TieFlow::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/TieFlow.hpp b/CGMES_2.4.15_27JAN2020/TieFlow.hpp index 5b7a975f9..b25ac939b 100644 --- a/CGMES_2.4.15_27JAN2020/TieFlow.hpp +++ b/CGMES_2.4.15_27JAN2020/TieFlow.hpp @@ -19,9 +19,7 @@ namespace CIMPP class ControlArea; class Terminal; - /* - A flow specification in terms of location and direction for a control area. - */ + /** \brief A flow specification in terms of location and direction for a control area. */ class TieFlow : public BaseClass { public: @@ -29,9 +27,14 @@ namespace CIMPP TieFlow(); ~TieFlow() override; - CIMPP::ControlArea* ControlArea; /* The control area of the tie flows. Default: 0 */ - CIMPP::Terminal* Terminal; /* The terminal to which this tie flow belongs. Default: 0 */ - CIMPP::Boolean positiveFlowIn; /* True if the flow into the terminal (load convention) is also flow into the control area. For example, this attribute should be true if using the tie line terminal further away from the control area. For example to represent a tie to a shunt component (like a load or generator) in another area, this is the near end of a branch and this attribute would be specified as false. Default: false */ + /** \brief The control area of the tie flows. Default: 0 */ + CIMPP::ControlArea* ControlArea; + + /** \brief The terminal to which this tie flow belongs. Default: 0 */ + CIMPP::Terminal* Terminal; + + /** \brief True if the flow into the terminal (load convention) is also flow into the control area. For example, this attribute should be true if using the tie line terminal further away from the control area. For example to represent a tie to a shunt component (like a load or generator) in another area, this is the near end of a branch and this attribute would be specified as false. Default: false */ + CIMPP::Boolean positiveFlowIn; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/TopologicalIsland.cpp b/CGMES_2.4.15_27JAN2020/TopologicalIsland.cpp index 03db597fa..46b353666 100644 --- a/CGMES_2.4.15_27JAN2020/TopologicalIsland.cpp +++ b/CGMES_2.4.15_27JAN2020/TopologicalIsland.cpp @@ -8,13 +8,12 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "TopologicalNode.hpp" #include "TopologicalNode.hpp" using namespace CIMPP; -TopologicalIsland::TopologicalIsland() : AngleRefTopologicalNode(nullptr) {}; -TopologicalIsland::~TopologicalIsland() {}; +TopologicalIsland::TopologicalIsland() : AngleRefTopologicalNode(nullptr) {} +TopologicalIsland::~TopologicalIsland() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +41,6 @@ TopologicalIsland::getPossibleProfilesForAttributes() const return map; } - - bool assign_TopologicalNode_AngleRefTopologicalIsland(BaseClass*, BaseClass*); bool assign_TopologicalIsland_AngleRefTopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +57,7 @@ bool assign_TopologicalIsland_AngleRefTopologicalNode(BaseClass* BaseClass_ptr1, } return false; } + bool assign_TopologicalNode_TopologicalIsland(BaseClass*, BaseClass*); bool assign_TopologicalIsland_TopologicalNodes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +75,10 @@ bool assign_TopologicalIsland_TopologicalNodes(BaseClass* BaseClass_ptr1, BaseCl return false; } - bool get_TopologicalIsland_AngleRefTopologicalNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TopologicalIsland* element = dynamic_cast(BaseClass_ptr1)) + const TopologicalIsland* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->AngleRefTopologicalNode != 0) { @@ -93,7 +91,8 @@ bool get_TopologicalIsland_AngleRefTopologicalNode(const BaseClass* BaseClass_pt bool get_TopologicalIsland_TopologicalNodes(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TopologicalIsland* element = dynamic_cast(BaseClass_ptr1)) + const TopologicalIsland* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { std::copy(element->TopologicalNodes.begin(), element->TopologicalNodes.end(), std::back_inserter(BaseClass_list)); return !BaseClass_list.empty(); @@ -101,7 +100,6 @@ bool get_TopologicalIsland_TopologicalNodes(const BaseClass* BaseClass_ptr1, std return false; } - const char TopologicalIsland::debugName[] = "TopologicalIsland"; const char* TopologicalIsland::debugString() const { @@ -110,7 +108,7 @@ const char* TopologicalIsland::debugString() const void TopologicalIsland::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TopologicalIsland"), &TopologicalIsland_factory)); + factory_map.emplace("cim:TopologicalIsland", &TopologicalIsland_factory); } void TopologicalIsland::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -119,8 +117,8 @@ void TopologicalIsland::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TopologicalIsland.AngleRefTopologicalNode"), &assign_TopologicalIsland_AngleRefTopologicalNode)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalIsland.TopologicalNodes"), &assign_TopologicalIsland_TopologicalNodes)); + assign_map.emplace("cim:TopologicalIsland.AngleRefTopologicalNode", &assign_TopologicalIsland_AngleRefTopologicalNode); + assign_map.emplace("cim:TopologicalIsland.TopologicalNodes", &assign_TopologicalIsland_TopologicalNodes); } void TopologicalIsland::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/TopologicalIsland.hpp b/CGMES_2.4.15_27JAN2020/TopologicalIsland.hpp index 26dc94200..a6c5a898c 100644 --- a/CGMES_2.4.15_27JAN2020/TopologicalIsland.hpp +++ b/CGMES_2.4.15_27JAN2020/TopologicalIsland.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class TopologicalNode; - /* - An electrically connected subset of the network. Topological islands can change as the current network state changes: e.g. due to - disconnect switches or breakers change state in a SCADA/EMS - manual creation, change or deletion of topological nodes in a planning tool. - */ + /** \brief An electrically connected subset of the network. Topological islands can change as the current network state changes: e.g. due to - disconnect switches or breakers change state in a SCADA/EMS - manual creation, change or deletion of topological nodes in a planning tool. */ class TopologicalIsland : public IdentifiedObject { public: @@ -27,8 +25,11 @@ namespace CIMPP TopologicalIsland(); ~TopologicalIsland() override; - CIMPP::TopologicalNode* AngleRefTopologicalNode; /* The angle reference for the island. Normally there is one TopologicalNode that is selected as the angle reference for each island. Other reference schemes exist, so the association is typically optional. Default: 0 */ - std::list TopologicalNodes; /* A topological node belongs to a topological island. Default: 0 */ + /** \brief The angle reference for the island. Normally there is one TopologicalNode that is selected as the angle reference for each island. Other reference schemes exist, so the association is typically optional. Default: 0 */ + CIMPP::TopologicalNode* AngleRefTopologicalNode; + + /** \brief A topological node belongs to a topological island. Default: 0 */ + std::list TopologicalNodes; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/TopologicalNode.cpp b/CGMES_2.4.15_27JAN2020/TopologicalNode.cpp index 07fba3691..962a0d94b 100644 --- a/CGMES_2.4.15_27JAN2020/TopologicalNode.cpp +++ b/CGMES_2.4.15_27JAN2020/TopologicalNode.cpp @@ -8,27 +8,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "TopologicalIsland.hpp" #include "BaseVoltage.hpp" -#include "ConnectivityNodeContainer.hpp" #include "ConnectivityNode.hpp" +#include "ConnectivityNodeContainer.hpp" #include "ReportingGroup.hpp" #include "SvInjection.hpp" #include "SvVoltage.hpp" #include "Terminal.hpp" #include "TopologicalIsland.hpp" -#include "Boolean.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -TopologicalNode::TopologicalNode() : AngleRefTopologicalIsland(nullptr), BaseVoltage(nullptr), ConnectivityNodeContainer(nullptr), ReportingGroup(nullptr), SvInjection(nullptr), SvVoltage(nullptr), TopologicalIsland(nullptr) {}; -TopologicalNode::~TopologicalNode() {}; +TopologicalNode::TopologicalNode() : AngleRefTopologicalIsland(nullptr), BaseVoltage(nullptr), ConnectivityNodeContainer(nullptr), ReportingGroup(nullptr), SvInjection(nullptr), SvVoltage(nullptr), TopologicalIsland(nullptr) {} +TopologicalNode::~TopologicalNode() {} static const std::list PossibleProfilesForClass = { @@ -72,99 +64,6 @@ TopologicalNode::getPossibleProfilesForAttributes() const return map; } - -bool assign_TopologicalNode_boundaryPoint(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->boundaryPoint; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_TopologicalNode_fromEndIsoCode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) - { - element->fromEndIsoCode = buffer.str(); - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_TopologicalNode_fromEndName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) - { - element->fromEndName = buffer.str(); - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_TopologicalNode_fromEndNameTso(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) - { - element->fromEndNameTso = buffer.str(); - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_TopologicalNode_toEndIsoCode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) - { - element->toEndIsoCode = buffer.str(); - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_TopologicalNode_toEndName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) - { - element->toEndName = buffer.str(); - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_TopologicalNode_toEndNameTso(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) - { - element->toEndNameTso = buffer.str(); - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_TopologicalIsland_AngleRefTopologicalNode(BaseClass*, BaseClass*); bool assign_TopologicalNode_AngleRefTopologicalIsland(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -181,6 +80,7 @@ bool assign_TopologicalNode_AngleRefTopologicalIsland(BaseClass* BaseClass_ptr1, } return false; } + bool assign_BaseVoltage_TopologicalNode(BaseClass*, BaseClass*); bool assign_TopologicalNode_BaseVoltage(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -197,6 +97,7 @@ bool assign_TopologicalNode_BaseVoltage(BaseClass* BaseClass_ptr1, BaseClass* Ba } return false; } + bool assign_ConnectivityNodeContainer_TopologicalNode(BaseClass*, BaseClass*); bool assign_TopologicalNode_ConnectivityNodeContainer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -213,6 +114,7 @@ bool assign_TopologicalNode_ConnectivityNodeContainer(BaseClass* BaseClass_ptr1, } return false; } + bool assign_ConnectivityNode_TopologicalNode(BaseClass*, BaseClass*); bool assign_TopologicalNode_ConnectivityNodes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -229,6 +131,7 @@ bool assign_TopologicalNode_ConnectivityNodes(BaseClass* BaseClass_ptr1, BaseCla } return false; } + bool assign_ReportingGroup_TopologicalNode(BaseClass*, BaseClass*); bool assign_TopologicalNode_ReportingGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -245,6 +148,7 @@ bool assign_TopologicalNode_ReportingGroup(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_SvInjection_TopologicalNode(BaseClass*, BaseClass*); bool assign_TopologicalNode_SvInjection(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -261,6 +165,7 @@ bool assign_TopologicalNode_SvInjection(BaseClass* BaseClass_ptr1, BaseClass* Ba } return false; } + bool assign_SvVoltage_TopologicalNode(BaseClass*, BaseClass*); bool assign_TopologicalNode_SvVoltage(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -277,6 +182,7 @@ bool assign_TopologicalNode_SvVoltage(BaseClass* BaseClass_ptr1, BaseClass* Base } return false; } + bool assign_Terminal_TopologicalNode(BaseClass*, BaseClass*); bool assign_TopologicalNode_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -293,6 +199,7 @@ bool assign_TopologicalNode_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseC } return false; } + bool assign_TopologicalIsland_TopologicalNodes(BaseClass*, BaseClass*); bool assign_TopologicalNode_TopologicalIsland(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -310,108 +217,109 @@ bool assign_TopologicalNode_TopologicalIsland(BaseClass* BaseClass_ptr1, BaseCla return false; } -bool get_TopologicalNode_boundaryPoint(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TopologicalNode_boundaryPoint(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->boundaryPoint; - if (!buffer.str().empty()) + buffer >> element->boundaryPoint; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_TopologicalNode_fromEndIsoCode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TopologicalNode_fromEndIsoCode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->fromEndIsoCode; - if (!buffer.str().empty()) + element->fromEndIsoCode = buffer.str(); + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_TopologicalNode_fromEndName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TopologicalNode_fromEndName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->fromEndName; - if (!buffer.str().empty()) + element->fromEndName = buffer.str(); + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_TopologicalNode_fromEndNameTso(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TopologicalNode_fromEndNameTso(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->fromEndNameTso; - if (!buffer.str().empty()) + element->fromEndNameTso = buffer.str(); + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_TopologicalNode_toEndIsoCode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TopologicalNode_toEndIsoCode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->toEndIsoCode; - if (!buffer.str().empty()) + element->toEndIsoCode = buffer.str(); + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_TopologicalNode_toEndName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TopologicalNode_toEndName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->toEndName; - if (!buffer.str().empty()) + element->toEndName = buffer.str(); + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_TopologicalNode_toEndNameTso(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TopologicalNode_toEndNameTso(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->toEndNameTso; - if (!buffer.str().empty()) + element->toEndNameTso = buffer.str(); + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } bool get_TopologicalNode_BaseVoltage(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + const TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->BaseVoltage != 0) { @@ -424,7 +332,8 @@ bool get_TopologicalNode_BaseVoltage(const BaseClass* BaseClass_ptr1, std::list< bool get_TopologicalNode_ConnectivityNodeContainer(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + const TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ConnectivityNodeContainer != 0) { @@ -435,9 +344,11 @@ bool get_TopologicalNode_ConnectivityNodeContainer(const BaseClass* BaseClass_pt return false; } + bool get_TopologicalNode_ReportingGroup(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + const TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ReportingGroup != 0) { @@ -449,6 +360,114 @@ bool get_TopologicalNode_ReportingGroup(const BaseClass* BaseClass_ptr1, std::li } + + + +bool get_TopologicalNode_boundaryPoint(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->boundaryPoint; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_TopologicalNode_fromEndIsoCode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->fromEndIsoCode; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_TopologicalNode_fromEndName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->fromEndName; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_TopologicalNode_fromEndNameTso(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->fromEndNameTso; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_TopologicalNode_toEndIsoCode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->toEndIsoCode; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_TopologicalNode_toEndName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->toEndName; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_TopologicalNode_toEndNameTso(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->toEndNameTso; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + const char TopologicalNode::debugName[] = "TopologicalNode"; const char* TopologicalNode::debugString() const { @@ -457,31 +476,31 @@ const char* TopologicalNode::debugString() const void TopologicalNode::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TopologicalNode"), &TopologicalNode_factory)); + factory_map.emplace("cim:TopologicalNode", &TopologicalNode_factory); } void TopologicalNode::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.boundaryPoint"), &assign_TopologicalNode_boundaryPoint)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.fromEndIsoCode"), &assign_TopologicalNode_fromEndIsoCode)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.fromEndName"), &assign_TopologicalNode_fromEndName)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.fromEndNameTso"), &assign_TopologicalNode_fromEndNameTso)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.toEndIsoCode"), &assign_TopologicalNode_toEndIsoCode)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.toEndName"), &assign_TopologicalNode_toEndName)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.toEndNameTso"), &assign_TopologicalNode_toEndNameTso)); + assign_map.emplace("cim:TopologicalNode.boundaryPoint", &assign_TopologicalNode_boundaryPoint); + assign_map.emplace("cim:TopologicalNode.fromEndIsoCode", &assign_TopologicalNode_fromEndIsoCode); + assign_map.emplace("cim:TopologicalNode.fromEndName", &assign_TopologicalNode_fromEndName); + assign_map.emplace("cim:TopologicalNode.fromEndNameTso", &assign_TopologicalNode_fromEndNameTso); + assign_map.emplace("cim:TopologicalNode.toEndIsoCode", &assign_TopologicalNode_toEndIsoCode); + assign_map.emplace("cim:TopologicalNode.toEndName", &assign_TopologicalNode_toEndName); + assign_map.emplace("cim:TopologicalNode.toEndNameTso", &assign_TopologicalNode_toEndNameTso); } void TopologicalNode::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.AngleRefTopologicalIsland"), &assign_TopologicalNode_AngleRefTopologicalIsland)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.BaseVoltage"), &assign_TopologicalNode_BaseVoltage)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.ConnectivityNodeContainer"), &assign_TopologicalNode_ConnectivityNodeContainer)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.ConnectivityNodes"), &assign_TopologicalNode_ConnectivityNodes)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.ReportingGroup"), &assign_TopologicalNode_ReportingGroup)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.SvInjection"), &assign_TopologicalNode_SvInjection)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.SvVoltage"), &assign_TopologicalNode_SvVoltage)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.Terminal"), &assign_TopologicalNode_Terminal)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.TopologicalIsland"), &assign_TopologicalNode_TopologicalIsland)); + assign_map.emplace("cim:TopologicalNode.AngleRefTopologicalIsland", &assign_TopologicalNode_AngleRefTopologicalIsland); + assign_map.emplace("cim:TopologicalNode.BaseVoltage", &assign_TopologicalNode_BaseVoltage); + assign_map.emplace("cim:TopologicalNode.ConnectivityNodeContainer", &assign_TopologicalNode_ConnectivityNodeContainer); + assign_map.emplace("cim:TopologicalNode.ConnectivityNodes", &assign_TopologicalNode_ConnectivityNodes); + assign_map.emplace("cim:TopologicalNode.ReportingGroup", &assign_TopologicalNode_ReportingGroup); + assign_map.emplace("cim:TopologicalNode.SvInjection", &assign_TopologicalNode_SvInjection); + assign_map.emplace("cim:TopologicalNode.SvVoltage", &assign_TopologicalNode_SvVoltage); + assign_map.emplace("cim:TopologicalNode.Terminal", &assign_TopologicalNode_Terminal); + assign_map.emplace("cim:TopologicalNode.TopologicalIsland", &assign_TopologicalNode_TopologicalIsland); } void TopologicalNode::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/TopologicalNode.hpp b/CGMES_2.4.15_27JAN2020/TopologicalNode.hpp index 0dfb99b0c..b9eecea3e 100644 --- a/CGMES_2.4.15_27JAN2020/TopologicalNode.hpp +++ b/CGMES_2.4.15_27JAN2020/TopologicalNode.hpp @@ -26,9 +26,7 @@ namespace CIMPP class Terminal; class TopologicalIsland; - /* - For a detailed substation model a topological node is a set of connectivity nodes that, in the current network state, are connected together through any type of closed switches, including jumpers. Topological nodes change as the current network state changes (i.e., switches, breakers, etc. change state). For a planning model, switch statuses are not used to form topological nodes. Instead they are manually created or deleted in a model builder tool. Topological nodes maintained this way are also called "busses". - */ + /** \brief For a detailed substation model a topological node is a set of connectivity nodes that, in the current network state, are connected together through any type of closed switches, including jumpers. Topological nodes change as the current network state changes (i.e., switches, breakers, etc. change state). For a planning model, switch statuses are not used to form topological nodes. Instead they are manually created or deleted in a model builder tool. Topological nodes maintained this way are also called "busses". */ class TopologicalNode : public IdentifiedObject { public: @@ -36,22 +34,53 @@ namespace CIMPP TopologicalNode(); ~TopologicalNode() override; - CIMPP::TopologicalIsland* AngleRefTopologicalIsland; /* The island for which the node is an angle reference. Normally there is one angle reference node for each island. Default: 0 */ - CIMPP::BaseVoltage* BaseVoltage; /* The base voltage of the topologocial node. Default: 0 */ - CIMPP::ConnectivityNodeContainer* ConnectivityNodeContainer; /* The connectivity node container to which the toplogical node belongs. Default: 0 */ - std::list ConnectivityNodes; /* The connectivity nodes combine together to form this topological node. May depend on the current state of switches in the network. Default: 0 */ - CIMPP::ReportingGroup* ReportingGroup; /* The topological nodes that belong to the reporting group. Default: 0 */ - CIMPP::SvInjection* SvInjection; /* The topological node associated with the flow injection state variable. Default: 0 */ - CIMPP::SvVoltage* SvVoltage; /* The topological node associated with the voltage state. Default: 0 */ - std::list Terminal; /* The topological node associated with the terminal. This can be used as an alternative to the connectivity node path to topological node, thus making it unneccesary to model connectivity nodes in some cases. Note that the if connectivity nodes are in the model, this association would probably not be used as an input specification. Default: 0 */ - CIMPP::TopologicalIsland* TopologicalIsland; /* A topological node belongs to a topological island. Default: 0 */ - CIMPP::Boolean boundaryPoint; /* Identifies if a node is a BoundaryPoint. If boundaryPoint=true the ConnectivityNode or the TopologicalNode represents a BoundaryPoint. Default: false */ - CIMPP::String fromEndIsoCode; /* The attribute is used for an exchange of the ISO code of the region to which the `From` side of the Boundary point belongs to or it is connected to. The ISO code is two characters country code as defined by ISO 3166 (). The length of the string is 2 characters maximum. The attribute is a required for the Boundary Model Authority Set where this attribute is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ - CIMPP::String fromEndName; /* The attribute is used for an exchange of a human readable name with length of the string 32 characters maximum. The attribute covers two cases: The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ - CIMPP::String fromEndNameTso; /* The attribute is used for an exchange of the name of the TSO to which the `From` side of the Boundary point belongs to or it is connected to. The length of the string is 32 characters maximum. The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ - CIMPP::String toEndIsoCode; /* The attribute is used for an exchange of the ISO code of the region to which the `To` side of the Boundary point belongs to or it is connected to. The ISO code is two characters country code as defined by ISO 3166 (). The length of the string is 2 characters maximum. The attribute is a required for the Boundary Model Authority Set where this attribute is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ - CIMPP::String toEndName; /* The attribute is used for an exchange of a human readable name with length of the string 32 characters maximum. The attribute covers two cases: The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ - CIMPP::String toEndNameTso; /* The attribute is used for an exchange of the name of the TSO to which the `To` side of the Boundary point belongs to or it is connected to. The length of the string is 32 characters maximum. The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + /** \brief The island for which the node is an angle reference. Normally there is one angle reference node for each island. Default: 0 */ + CIMPP::TopologicalIsland* AngleRefTopologicalIsland; + + /** \brief The base voltage of the topologocial node. Default: 0 */ + CIMPP::BaseVoltage* BaseVoltage; + + /** \brief The connectivity node container to which the toplogical node belongs. Default: 0 */ + CIMPP::ConnectivityNodeContainer* ConnectivityNodeContainer; + + /** \brief The connectivity nodes combine together to form this topological node. May depend on the current state of switches in the network. Default: 0 */ + std::list ConnectivityNodes; + + /** \brief The topological nodes that belong to the reporting group. Default: 0 */ + CIMPP::ReportingGroup* ReportingGroup; + + /** \brief The topological node associated with the flow injection state variable. Default: 0 */ + CIMPP::SvInjection* SvInjection; + + /** \brief The topological node associated with the voltage state. Default: 0 */ + CIMPP::SvVoltage* SvVoltage; + + /** \brief The topological node associated with the terminal. This can be used as an alternative to the connectivity node path to topological node, thus making it unneccesary to model connectivity nodes in some cases. Note that the if connectivity nodes are in the model, this association would probably not be used as an input specification. Default: 0 */ + std::list Terminal; + + /** \brief A topological node belongs to a topological island. Default: 0 */ + CIMPP::TopologicalIsland* TopologicalIsland; + + /** \brief Identifies if a node is a BoundaryPoint. If boundaryPoint=true the ConnectivityNode or the TopologicalNode represents a BoundaryPoint. Default: false */ + CIMPP::Boolean boundaryPoint; + + /** \brief The attribute is used for an exchange of the ISO code of the region to which the `From` side of the Boundary point belongs to or it is connected to. The ISO code is two characters country code as defined by ISO 3166 (). The length of the string is 2 characters maximum. The attribute is a required for the Boundary Model Authority Set where this attribute is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + CIMPP::String fromEndIsoCode; + + /** \brief The attribute is used for an exchange of a human readable name with length of the string 32 characters maximum. The attribute covers two cases: The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + CIMPP::String fromEndName; + + /** \brief The attribute is used for an exchange of the name of the TSO to which the `From` side of the Boundary point belongs to or it is connected to. The length of the string is 32 characters maximum. The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + CIMPP::String fromEndNameTso; + + /** \brief The attribute is used for an exchange of the ISO code of the region to which the `To` side of the Boundary point belongs to or it is connected to. The ISO code is two characters country code as defined by ISO 3166 (). The length of the string is 2 characters maximum. The attribute is a required for the Boundary Model Authority Set where this attribute is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + CIMPP::String toEndIsoCode; + + /** \brief The attribute is used for an exchange of a human readable name with length of the string 32 characters maximum. The attribute covers two cases: The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + CIMPP::String toEndName; + + /** \brief The attribute is used for an exchange of the name of the TSO to which the `To` side of the Boundary point belongs to or it is connected to. The length of the string is 32 characters maximum. The attribute is required for the Boundary Model Authority Set where it is used only for the TopologicalNode in the Boundary Topology profile and ConnectivityNode in the Boundary Equipment profile. Default: '' */ + CIMPP::String toEndNameTso; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/TopologyBoundaryVersion.cpp b/CGMES_2.4.15_27JAN2020/TopologyBoundaryVersion.cpp index 5fd7f7165..ca78ca44d 100644 --- a/CGMES_2.4.15_27JAN2020/TopologyBoundaryVersion.cpp +++ b/CGMES_2.4.15_27JAN2020/TopologyBoundaryVersion.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "String.hpp" -#include "String.hpp" -#include "Date.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -TopologyBoundaryVersion::TopologyBoundaryVersion() {}; -TopologyBoundaryVersion::~TopologyBoundaryVersion() {}; +TopologyBoundaryVersion::TopologyBoundaryVersion() {} +TopologyBoundaryVersion::~TopologyBoundaryVersion() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ TopologyBoundaryVersion::getPossibleProfilesForAttributes() const return map; } - -bool assign_TopologyBoundaryVersion_baseUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyBoundaryVersion_baseUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyBoundaryVersion_baseURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyBoundaryVersion_baseURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyBoundaryVersion_date(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyBoundaryVersion_date(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->date = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyBoundaryVersion_differenceModelURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyBoundaryVersion_differenceModelURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->differenceModelURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyBoundaryVersion_entsoeUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyBoundaryVersion_entsoeUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyBoundaryVersion_entsoeURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyBoundaryVersion_entsoeURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyBoundaryVersion_modelDescriptionURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyBoundaryVersion_modelDescriptionURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->modelDescriptionURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyBoundaryVersion_namespaceRDF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyBoundaryVersion_namespaceRDF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceRDF = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyBoundaryVersion_namespaceUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyBoundaryVersion_namespaceUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyBoundaryVersion_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyBoundaryVersion_shortName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->shortName = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_TopologyBoundaryVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseUML; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_TopologyBoundaryVersion_baseUML(const BaseClass* BaseClass_ptr1, std::s bool get_TopologyBoundaryVersion_baseURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseURI; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_TopologyBoundaryVersion_baseURI(const BaseClass* BaseClass_ptr1, std::s bool get_TopologyBoundaryVersion_date(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->date; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_TopologyBoundaryVersion_date(const BaseClass* BaseClass_ptr1, std::stri bool get_TopologyBoundaryVersion_differenceModelURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->differenceModelURI; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_TopologyBoundaryVersion_differenceModelURI(const BaseClass* BaseClass_p bool get_TopologyBoundaryVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeUML; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_TopologyBoundaryVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std: bool get_TopologyBoundaryVersion_entsoeURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeURI; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_TopologyBoundaryVersion_entsoeURI(const BaseClass* BaseClass_ptr1, std: bool get_TopologyBoundaryVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->modelDescriptionURI; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_TopologyBoundaryVersion_modelDescriptionURI(const BaseClass* BaseClass_ bool get_TopologyBoundaryVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceRDF; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_TopologyBoundaryVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, s bool get_TopologyBoundaryVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceUML; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_TopologyBoundaryVersion_namespaceUML(const BaseClass* BaseClass_ptr1, s bool get_TopologyBoundaryVersion_shortName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyBoundaryVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortName; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_TopologyBoundaryVersion_shortName(const BaseClass* BaseClass_ptr1, std: return false; } - - const char TopologyBoundaryVersion::debugName[] = "TopologyBoundaryVersion"; const char* TopologyBoundaryVersion::debugString() const { @@ -341,21 +346,21 @@ const char* TopologyBoundaryVersion::debugString() const void TopologyBoundaryVersion::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TopologyBoundaryVersion"), &TopologyBoundaryVersion_factory)); + factory_map.emplace("cim:TopologyBoundaryVersion", &TopologyBoundaryVersion_factory); } void TopologyBoundaryVersion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TopologyBoundaryVersion.baseUML"), &assign_TopologyBoundaryVersion_baseUML)); - assign_map.insert(std::make_pair(std::string("cim:TopologyBoundaryVersion.baseURI"), &assign_TopologyBoundaryVersion_baseURI)); - assign_map.insert(std::make_pair(std::string("cim:TopologyBoundaryVersion.date"), &assign_TopologyBoundaryVersion_date)); - assign_map.insert(std::make_pair(std::string("cim:TopologyBoundaryVersion.differenceModelURI"), &assign_TopologyBoundaryVersion_differenceModelURI)); - assign_map.insert(std::make_pair(std::string("cim:TopologyBoundaryVersion.entsoeUML"), &assign_TopologyBoundaryVersion_entsoeUML)); - assign_map.insert(std::make_pair(std::string("cim:TopologyBoundaryVersion.entsoeURI"), &assign_TopologyBoundaryVersion_entsoeURI)); - assign_map.insert(std::make_pair(std::string("cim:TopologyBoundaryVersion.modelDescriptionURI"), &assign_TopologyBoundaryVersion_modelDescriptionURI)); - assign_map.insert(std::make_pair(std::string("cim:TopologyBoundaryVersion.namespaceRDF"), &assign_TopologyBoundaryVersion_namespaceRDF)); - assign_map.insert(std::make_pair(std::string("cim:TopologyBoundaryVersion.namespaceUML"), &assign_TopologyBoundaryVersion_namespaceUML)); - assign_map.insert(std::make_pair(std::string("cim:TopologyBoundaryVersion.shortName"), &assign_TopologyBoundaryVersion_shortName)); + assign_map.emplace("cim:TopologyBoundaryVersion.baseUML", &assign_TopologyBoundaryVersion_baseUML); + assign_map.emplace("cim:TopologyBoundaryVersion.baseURI", &assign_TopologyBoundaryVersion_baseURI); + assign_map.emplace("cim:TopologyBoundaryVersion.date", &assign_TopologyBoundaryVersion_date); + assign_map.emplace("cim:TopologyBoundaryVersion.differenceModelURI", &assign_TopologyBoundaryVersion_differenceModelURI); + assign_map.emplace("cim:TopologyBoundaryVersion.entsoeUML", &assign_TopologyBoundaryVersion_entsoeUML); + assign_map.emplace("cim:TopologyBoundaryVersion.entsoeURI", &assign_TopologyBoundaryVersion_entsoeURI); + assign_map.emplace("cim:TopologyBoundaryVersion.modelDescriptionURI", &assign_TopologyBoundaryVersion_modelDescriptionURI); + assign_map.emplace("cim:TopologyBoundaryVersion.namespaceRDF", &assign_TopologyBoundaryVersion_namespaceRDF); + assign_map.emplace("cim:TopologyBoundaryVersion.namespaceUML", &assign_TopologyBoundaryVersion_namespaceUML); + assign_map.emplace("cim:TopologyBoundaryVersion.shortName", &assign_TopologyBoundaryVersion_shortName); } void TopologyBoundaryVersion::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/TopologyBoundaryVersion.hpp b/CGMES_2.4.15_27JAN2020/TopologyBoundaryVersion.hpp index 4a7c617ba..54e049f56 100644 --- a/CGMES_2.4.15_27JAN2020/TopologyBoundaryVersion.hpp +++ b/CGMES_2.4.15_27JAN2020/TopologyBoundaryVersion.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Version details. - */ + /** \brief Version details. */ class TopologyBoundaryVersion : public BaseClass { public: @@ -28,16 +26,35 @@ namespace CIMPP TopologyBoundaryVersion(); ~TopologyBoundaryVersion() override; - CIMPP::String baseUML; /* Base UML provided by CIM model manager. Default: '' */ - CIMPP::String baseURI; /* Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ - CIMPP::Date date; /* Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ - CIMPP::String differenceModelURI; /* Difference model URI defined by IEC 61970-552. Default: '' */ - CIMPP::String entsoeUML; /* UML provided by ENTSO-E. Default: '' */ - CIMPP::String entsoeURI; /* Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/TopologyBoundary/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ - CIMPP::String modelDescriptionURI; /* Model Description URI defined by IEC 61970-552. Default: '' */ - CIMPP::String namespaceRDF; /* RDF namespace. Default: '' */ - CIMPP::String namespaceUML; /* CIM UML namespace. Default: '' */ - CIMPP::String shortName; /* The short name of the profile used in profile documentation. Default: '' */ + /** \brief Base UML provided by CIM model manager. Default: '' */ + CIMPP::String baseUML; + + /** \brief Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ + CIMPP::String baseURI; + + /** \brief Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ + CIMPP::Date date; + + /** \brief Difference model URI defined by IEC 61970-552. Default: '' */ + CIMPP::String differenceModelURI; + + /** \brief UML provided by ENTSO-E. Default: '' */ + CIMPP::String entsoeUML; + + /** \brief Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/TopologyBoundary/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ + CIMPP::String entsoeURI; + + /** \brief Model Description URI defined by IEC 61970-552. Default: '' */ + CIMPP::String modelDescriptionURI; + + /** \brief RDF namespace. Default: '' */ + CIMPP::String namespaceRDF; + + /** \brief CIM UML namespace. Default: '' */ + CIMPP::String namespaceUML; + + /** \brief The short name of the profile used in profile documentation. Default: '' */ + CIMPP::String shortName; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/TopologyVersion.cpp b/CGMES_2.4.15_27JAN2020/TopologyVersion.cpp index c8bfafdca..e54da7674 100644 --- a/CGMES_2.4.15_27JAN2020/TopologyVersion.cpp +++ b/CGMES_2.4.15_27JAN2020/TopologyVersion.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "String.hpp" -#include "String.hpp" -#include "Date.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -TopologyVersion::TopologyVersion() {}; -TopologyVersion::~TopologyVersion() {}; +TopologyVersion::TopologyVersion() {} +TopologyVersion::~TopologyVersion() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ TopologyVersion::getPossibleProfilesForAttributes() const return map; } - -bool assign_TopologyVersion_baseUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyVersion_baseUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyVersion_baseURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyVersion_baseURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->baseURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyVersion_date(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyVersion_date(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->date = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyVersion_differenceModelURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyVersion_differenceModelURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->differenceModelURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyVersion_entsoeUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyVersion_entsoeUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyVersion_entsoeURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyVersion_entsoeURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->entsoeURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyVersion_modelDescriptionURI(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyVersion_modelDescriptionURI(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->modelDescriptionURI = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyVersion_namespaceRDF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyVersion_namespaceRDF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceRDF = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyVersion_namespaceUML(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyVersion_namespaceUML(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->namespaceUML = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TopologyVersion_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologyVersion_shortName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->shortName = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_TopologyVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseUML; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_TopologyVersion_baseUML(const BaseClass* BaseClass_ptr1, std::stringstr bool get_TopologyVersion_baseURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseURI; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_TopologyVersion_baseURI(const BaseClass* BaseClass_ptr1, std::stringstr bool get_TopologyVersion_date(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->date; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_TopologyVersion_date(const BaseClass* BaseClass_ptr1, std::stringstream bool get_TopologyVersion_differenceModelURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->differenceModelURI; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_TopologyVersion_differenceModelURI(const BaseClass* BaseClass_ptr1, std bool get_TopologyVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeUML; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_TopologyVersion_entsoeUML(const BaseClass* BaseClass_ptr1, std::strings bool get_TopologyVersion_entsoeURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->entsoeURI; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_TopologyVersion_entsoeURI(const BaseClass* BaseClass_ptr1, std::strings bool get_TopologyVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->modelDescriptionURI; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_TopologyVersion_modelDescriptionURI(const BaseClass* BaseClass_ptr1, st bool get_TopologyVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceRDF; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_TopologyVersion_namespaceRDF(const BaseClass* BaseClass_ptr1, std::stri bool get_TopologyVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->namespaceUML; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_TopologyVersion_namespaceUML(const BaseClass* BaseClass_ptr1, std::stri bool get_TopologyVersion_shortName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TopologyVersion* element = dynamic_cast(BaseClass_ptr1)) + const TopologyVersion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortName; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_TopologyVersion_shortName(const BaseClass* BaseClass_ptr1, std::strings return false; } - - const char TopologyVersion::debugName[] = "TopologyVersion"; const char* TopologyVersion::debugString() const { @@ -341,21 +346,21 @@ const char* TopologyVersion::debugString() const void TopologyVersion::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TopologyVersion"), &TopologyVersion_factory)); + factory_map.emplace("cim:TopologyVersion", &TopologyVersion_factory); } void TopologyVersion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TopologyVersion.baseUML"), &assign_TopologyVersion_baseUML)); - assign_map.insert(std::make_pair(std::string("cim:TopologyVersion.baseURI"), &assign_TopologyVersion_baseURI)); - assign_map.insert(std::make_pair(std::string("cim:TopologyVersion.date"), &assign_TopologyVersion_date)); - assign_map.insert(std::make_pair(std::string("cim:TopologyVersion.differenceModelURI"), &assign_TopologyVersion_differenceModelURI)); - assign_map.insert(std::make_pair(std::string("cim:TopologyVersion.entsoeUML"), &assign_TopologyVersion_entsoeUML)); - assign_map.insert(std::make_pair(std::string("cim:TopologyVersion.entsoeURI"), &assign_TopologyVersion_entsoeURI)); - assign_map.insert(std::make_pair(std::string("cim:TopologyVersion.modelDescriptionURI"), &assign_TopologyVersion_modelDescriptionURI)); - assign_map.insert(std::make_pair(std::string("cim:TopologyVersion.namespaceRDF"), &assign_TopologyVersion_namespaceRDF)); - assign_map.insert(std::make_pair(std::string("cim:TopologyVersion.namespaceUML"), &assign_TopologyVersion_namespaceUML)); - assign_map.insert(std::make_pair(std::string("cim:TopologyVersion.shortName"), &assign_TopologyVersion_shortName)); + assign_map.emplace("cim:TopologyVersion.baseUML", &assign_TopologyVersion_baseUML); + assign_map.emplace("cim:TopologyVersion.baseURI", &assign_TopologyVersion_baseURI); + assign_map.emplace("cim:TopologyVersion.date", &assign_TopologyVersion_date); + assign_map.emplace("cim:TopologyVersion.differenceModelURI", &assign_TopologyVersion_differenceModelURI); + assign_map.emplace("cim:TopologyVersion.entsoeUML", &assign_TopologyVersion_entsoeUML); + assign_map.emplace("cim:TopologyVersion.entsoeURI", &assign_TopologyVersion_entsoeURI); + assign_map.emplace("cim:TopologyVersion.modelDescriptionURI", &assign_TopologyVersion_modelDescriptionURI); + assign_map.emplace("cim:TopologyVersion.namespaceRDF", &assign_TopologyVersion_namespaceRDF); + assign_map.emplace("cim:TopologyVersion.namespaceUML", &assign_TopologyVersion_namespaceUML); + assign_map.emplace("cim:TopologyVersion.shortName", &assign_TopologyVersion_shortName); } void TopologyVersion::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/TopologyVersion.hpp b/CGMES_2.4.15_27JAN2020/TopologyVersion.hpp index 7e0f6da91..5c9119a35 100644 --- a/CGMES_2.4.15_27JAN2020/TopologyVersion.hpp +++ b/CGMES_2.4.15_27JAN2020/TopologyVersion.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Version details. - */ + /** \brief Version details. */ class TopologyVersion : public BaseClass { public: @@ -28,16 +26,35 @@ namespace CIMPP TopologyVersion(); ~TopologyVersion() override; - CIMPP::String baseUML; /* Base UML provided by CIM model manager. Default: '' */ - CIMPP::String baseURI; /* Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ - CIMPP::Date date; /* Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ - CIMPP::String differenceModelURI; /* Difference model URI defined by IEC 61970-552. Default: '' */ - CIMPP::String entsoeUML; /* UML provided by ENTSO-E. Default: '' */ - CIMPP::String entsoeURI; /* Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/Topology/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ - CIMPP::String modelDescriptionURI; /* Model Description URI defined by IEC 61970-552. Default: '' */ - CIMPP::String namespaceRDF; /* RDF namespace. Default: '' */ - CIMPP::String namespaceUML; /* CIM UML namespace. Default: '' */ - CIMPP::String shortName; /* The short name of the profile used in profile documentation. Default: '' */ + /** \brief Base UML provided by CIM model manager. Default: '' */ + CIMPP::String baseUML; + + /** \brief Profile URI used in the Model Exchange header and defined in IEC standards. It uniquely identifies the Profile and its version. It is given for information only and to identify the closest IEC profile to which this CGMES profile is based on. Default: '' */ + CIMPP::String baseURI; + + /** \brief Profile creation date Form is YYYY-MM-DD for example for January 5, 2009 it is 2009-01-05. Default: '' */ + CIMPP::Date date; + + /** \brief Difference model URI defined by IEC 61970-552. Default: '' */ + CIMPP::String differenceModelURI; + + /** \brief UML provided by ENTSO-E. Default: '' */ + CIMPP::String entsoeUML; + + /** \brief Profile URI defined by ENTSO-E and used in the Model Exchange header. It uniquely identifies the Profile and its version. The last two elements in the URI (http://entsoe.eu/CIM/Topology/yy/zzz) indicate major and minor versions where: - yy - indicates a major version; - zzz - indicates a minor version. Default: '' */ + CIMPP::String entsoeURI; + + /** \brief Model Description URI defined by IEC 61970-552. Default: '' */ + CIMPP::String modelDescriptionURI; + + /** \brief RDF namespace. Default: '' */ + CIMPP::String namespaceRDF; + + /** \brief CIM UML namespace. Default: '' */ + CIMPP::String namespaceUML; + + /** \brief The short name of the profile used in profile documentation. Default: '' */ + CIMPP::String shortName; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/TransformerControlMode.cpp b/CGMES_2.4.15_27JAN2020/TransformerControlMode.cpp index 3f49e0952..520a5e156 100644 --- a/CGMES_2.4.15_27JAN2020/TransformerControlMode.cpp +++ b/CGMES_2.4.15_27JAN2020/TransformerControlMode.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "TransformerControlMode") + if (EnumSymbol.substr(0, pos) != "TransformerControlMode") { lop.setstate(std::ios::failbit); return lop; @@ -50,12 +50,12 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "volt") + if (EnumSymbol == "volt") { rop = TransformerControlMode::volt; return lop; } - if(EnumSymbol == "reactive") + if (EnumSymbol == "reactive") { rop = TransformerControlMode::reactive; return lop; diff --git a/CGMES_2.4.15_27JAN2020/TransformerControlMode.hpp b/CGMES_2.4.15_27JAN2020/TransformerControlMode.hpp index 563b222e5..4007f385c 100644 --- a/CGMES_2.4.15_27JAN2020/TransformerControlMode.hpp +++ b/CGMES_2.4.15_27JAN2020/TransformerControlMode.hpp @@ -9,21 +9,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Control modes for a transformer. - */ + /** \brief Control modes for a transformer. */ class TransformerControlMode { public: enum TransformerControlMode_ENUM { - /** - * Voltage control - */ + /** Voltage control */ volt, - /** - * Reactive power flow control - */ + /** Reactive power flow control */ reactive, }; diff --git a/CGMES_2.4.15_27JAN2020/TransformerEnd.cpp b/CGMES_2.4.15_27JAN2020/TransformerEnd.cpp index dd8bb4fa1..86e31752c 100644 --- a/CGMES_2.4.15_27JAN2020/TransformerEnd.cpp +++ b/CGMES_2.4.15_27JAN2020/TransformerEnd.cpp @@ -12,15 +12,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "PhaseTapChanger.hpp" #include "RatioTapChanger.hpp" #include "Terminal.hpp" -#include "Integer.hpp" -#include "Boolean.hpp" -#include "Resistance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -TransformerEnd::TransformerEnd() : BaseVoltage(nullptr), PhaseTapChanger(nullptr), RatioTapChanger(nullptr), Terminal(nullptr) {}; -TransformerEnd::~TransformerEnd() {}; +TransformerEnd::TransformerEnd() : BaseVoltage(nullptr), PhaseTapChanger(nullptr), RatioTapChanger(nullptr), Terminal(nullptr) {} +TransformerEnd::~TransformerEnd() {} static const std::list PossibleProfilesForClass = { @@ -54,60 +50,6 @@ TransformerEnd::getPossibleProfilesForAttributes() const return map; } - -bool assign_TransformerEnd_endNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->endNumber; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_TransformerEnd_grounded(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->grounded; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_TransformerEnd_rground(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->rground; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_TransformerEnd_xground(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->xground; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_BaseVoltage_TransformerEnds(BaseClass*, BaseClass*); bool assign_TransformerEnd_BaseVoltage(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -124,6 +66,7 @@ bool assign_TransformerEnd_BaseVoltage(BaseClass* BaseClass_ptr1, BaseClass* Bas } return false; } + bool assign_PhaseTapChanger_TransformerEnd(BaseClass*, BaseClass*); bool assign_TransformerEnd_PhaseTapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -140,6 +83,7 @@ bool assign_TransformerEnd_PhaseTapChanger(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_RatioTapChanger_TransformerEnd(BaseClass*, BaseClass*); bool assign_TransformerEnd_RatioTapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -156,6 +100,7 @@ bool assign_TransformerEnd_RatioTapChanger(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_Terminal_TransformerEnd(BaseClass*, BaseClass*); bool assign_TransformerEnd_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -173,66 +118,66 @@ bool assign_TransformerEnd_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseCl return false; } -bool get_TransformerEnd_endNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TransformerEnd_endNumber(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->endNumber; - if (!buffer.str().empty()) + buffer >> element->endNumber; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_TransformerEnd_grounded(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TransformerEnd_grounded(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->grounded; - if (!buffer.str().empty()) + buffer >> element->grounded; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_TransformerEnd_rground(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TransformerEnd_rground(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->rground; - if (!buffer.str().empty()) + buffer >> element->rground; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_TransformerEnd_xground(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TransformerEnd_xground(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xground; - if (!buffer.str().empty()) + buffer >> element->xground; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_TransformerEnd_BaseVoltage(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->BaseVoltage != 0) { @@ -243,9 +188,12 @@ bool get_TransformerEnd_BaseVoltage(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Terminal != 0) { @@ -256,6 +204,65 @@ bool get_TransformerEnd_Terminal(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->endNumber; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_TransformerEnd_grounded(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->grounded; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_TransformerEnd_rground(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->rground; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_TransformerEnd_xground(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->xground; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char TransformerEnd::debugName[] = "TransformerEnd"; const char* TransformerEnd::debugString() const @@ -265,23 +272,23 @@ const char* TransformerEnd::debugString() const void TransformerEnd::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TransformerEnd"), &TransformerEnd_factory)); + factory_map.emplace("cim:TransformerEnd", &TransformerEnd_factory); } void TransformerEnd::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TransformerEnd.endNumber"), &assign_TransformerEnd_endNumber)); - assign_map.insert(std::make_pair(std::string("cim:TransformerEnd.grounded"), &assign_TransformerEnd_grounded)); - assign_map.insert(std::make_pair(std::string("cim:TransformerEnd.rground"), &assign_TransformerEnd_rground)); - assign_map.insert(std::make_pair(std::string("cim:TransformerEnd.xground"), &assign_TransformerEnd_xground)); + assign_map.emplace("cim:TransformerEnd.endNumber", &assign_TransformerEnd_endNumber); + assign_map.emplace("cim:TransformerEnd.grounded", &assign_TransformerEnd_grounded); + assign_map.emplace("cim:TransformerEnd.rground", &assign_TransformerEnd_rground); + assign_map.emplace("cim:TransformerEnd.xground", &assign_TransformerEnd_xground); } void TransformerEnd::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TransformerEnd.BaseVoltage"), &assign_TransformerEnd_BaseVoltage)); - assign_map.insert(std::make_pair(std::string("cim:TransformerEnd.PhaseTapChanger"), &assign_TransformerEnd_PhaseTapChanger)); - assign_map.insert(std::make_pair(std::string("cim:TransformerEnd.RatioTapChanger"), &assign_TransformerEnd_RatioTapChanger)); - assign_map.insert(std::make_pair(std::string("cim:TransformerEnd.Terminal"), &assign_TransformerEnd_Terminal)); + assign_map.emplace("cim:TransformerEnd.BaseVoltage", &assign_TransformerEnd_BaseVoltage); + assign_map.emplace("cim:TransformerEnd.PhaseTapChanger", &assign_TransformerEnd_PhaseTapChanger); + assign_map.emplace("cim:TransformerEnd.RatioTapChanger", &assign_TransformerEnd_RatioTapChanger); + assign_map.emplace("cim:TransformerEnd.Terminal", &assign_TransformerEnd_Terminal); } void TransformerEnd::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/TransformerEnd.hpp b/CGMES_2.4.15_27JAN2020/TransformerEnd.hpp index 557e221a1..163603fd7 100644 --- a/CGMES_2.4.15_27JAN2020/TransformerEnd.hpp +++ b/CGMES_2.4.15_27JAN2020/TransformerEnd.hpp @@ -24,9 +24,7 @@ namespace CIMPP class RatioTapChanger; class Terminal; - /* - A conducting connection point of a power transformer. It corresponds to a physical transformer winding terminal. In earlier CIM versions, the TransformerWinding class served a similar purpose, but this class is more flexible because it associates to terminal but is not a specialization of ConductingEquipment. - */ + /** \brief A conducting connection point of a power transformer. It corresponds to a physical transformer winding terminal. In earlier CIM versions, the TransformerWinding class served a similar purpose, but this class is more flexible because it associates to terminal but is not a specialization of ConductingEquipment. */ class TransformerEnd : public IdentifiedObject { public: @@ -34,14 +32,29 @@ namespace CIMPP TransformerEnd(); ~TransformerEnd() override; - CIMPP::BaseVoltage* BaseVoltage; /* Base voltage of the transformer end. This is essential for PU calculation. Default: 0 */ - CIMPP::PhaseTapChanger* PhaseTapChanger; /* Transformer end to which this phase tap changer belongs. Default: 0 */ - CIMPP::RatioTapChanger* RatioTapChanger; /* Transformer end to which this ratio tap changer belongs. Default: 0 */ - CIMPP::Terminal* Terminal; /* Terminal of the power transformer to which this transformer end belongs. Default: 0 */ - CIMPP::Integer endNumber; /* Number for this transformer end, corresponding to the end`s order in the power transformer vector group or phase angle clock number. Highest voltage winding should be 1. Each end within a power transformer should have a unique subsequent end number. Note the transformer end number need not match the terminal sequence number. Default: 0 */ - CIMPP::Boolean grounded; /* (for Yn and Zn connections) True if the neutral is solidly grounded. Default: false */ - CIMPP::Resistance rground; /* (for Yn and Zn connections) Resistance part of neutral impedance where `grounded` is true. Default: nullptr */ - CIMPP::Reactance xground; /* (for Yn and Zn connections) Reactive part of neutral impedance where `grounded` is true. Default: nullptr */ + /** \brief Base voltage of the transformer end. This is essential for PU calculation. Default: 0 */ + CIMPP::BaseVoltage* BaseVoltage; + + /** \brief Transformer end to which this phase tap changer belongs. Default: 0 */ + CIMPP::PhaseTapChanger* PhaseTapChanger; + + /** \brief Transformer end to which this ratio tap changer belongs. Default: 0 */ + CIMPP::RatioTapChanger* RatioTapChanger; + + /** \brief Terminal of the power transformer to which this transformer end belongs. Default: 0 */ + CIMPP::Terminal* Terminal; + + /** \brief Number for this transformer end, corresponding to the end`s order in the power transformer vector group or phase angle clock number. Highest voltage winding should be 1. Each end within a power transformer should have a unique subsequent end number. Note the transformer end number need not match the terminal sequence number. Default: 0 */ + CIMPP::Integer endNumber; + + /** \brief (for Yn and Zn connections) True if the neutral is solidly grounded. Default: false */ + CIMPP::Boolean grounded; + + /** \brief (for Yn and Zn connections) Resistance part of neutral impedance where `grounded` is true. Default: nullptr */ + CIMPP::Resistance rground; + + /** \brief (for Yn and Zn connections) Reactive part of neutral impedance where `grounded` is true. Default: nullptr */ + CIMPP::Reactance xground; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/TurbLCFB1.cpp b/CGMES_2.4.15_27JAN2020/TurbLCFB1.cpp index a193582c6..338c975ef 100644 --- a/CGMES_2.4.15_27JAN2020/TurbLCFB1.cpp +++ b/CGMES_2.4.15_27JAN2020/TurbLCFB1.cpp @@ -8,23 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "Boolean.hpp" -#include "ActivePower.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" using namespace CIMPP; -TurbLCFB1::TurbLCFB1() {}; -TurbLCFB1::~TurbLCFB1() {}; +TurbLCFB1::TurbLCFB1() {} +TurbLCFB1::~TurbLCFB1() {} static const std::list PossibleProfilesForClass = { @@ -62,168 +50,178 @@ TurbLCFB1::getPossibleProfilesForAttributes() const return map; } - -bool assign_TurbLCFB1_db(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_db(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_emax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_emax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->emax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_fb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_fb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_fbf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_fbf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fbf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_irmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_irmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->irmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_pbf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_pbf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pbf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_pmwset(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_pmwset(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmwset; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_speedReferenceGovernor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_speedReferenceGovernor(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->speedReferenceGovernor; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_tpelec(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_tpelec(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpelec; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_TurbLCFB1_db(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db; if (!buffer.str().empty()) @@ -237,7 +235,8 @@ bool get_TurbLCFB1_db(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_TurbLCFB1_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->emax; if (!buffer.str().empty()) @@ -251,7 +250,8 @@ bool get_TurbLCFB1_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_TurbLCFB1_fb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fb; if (!buffer.str().empty()) @@ -265,7 +265,8 @@ bool get_TurbLCFB1_fb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_TurbLCFB1_fbf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fbf; if (!buffer.str().empty()) @@ -279,7 +280,8 @@ bool get_TurbLCFB1_fbf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_TurbLCFB1_irmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->irmax; if (!buffer.str().empty()) @@ -293,7 +295,8 @@ bool get_TurbLCFB1_irmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_TurbLCFB1_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -307,7 +310,8 @@ bool get_TurbLCFB1_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_TurbLCFB1_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -321,7 +325,8 @@ bool get_TurbLCFB1_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_TurbLCFB1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -335,7 +340,8 @@ bool get_TurbLCFB1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_TurbLCFB1_pbf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pbf; if (!buffer.str().empty()) @@ -349,7 +355,8 @@ bool get_TurbLCFB1_pbf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_TurbLCFB1_pmwset(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmwset; if (!buffer.str().empty()) @@ -363,7 +370,8 @@ bool get_TurbLCFB1_pmwset(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_TurbLCFB1_speedReferenceGovernor(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->speedReferenceGovernor; if (!buffer.str().empty()) @@ -377,7 +385,8 @@ bool get_TurbLCFB1_speedReferenceGovernor(const BaseClass* BaseClass_ptr1, std:: bool get_TurbLCFB1_tpelec(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpelec; if (!buffer.str().empty()) @@ -389,8 +398,6 @@ bool get_TurbLCFB1_tpelec(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char TurbLCFB1::debugName[] = "TurbLCFB1"; const char* TurbLCFB1::debugString() const { @@ -399,23 +406,23 @@ const char* TurbLCFB1::debugString() const void TurbLCFB1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TurbLCFB1"), &TurbLCFB1_factory)); + factory_map.emplace("cim:TurbLCFB1", &TurbLCFB1_factory); } void TurbLCFB1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.db"), &assign_TurbLCFB1_db)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.emax"), &assign_TurbLCFB1_emax)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.fb"), &assign_TurbLCFB1_fb)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.fbf"), &assign_TurbLCFB1_fbf)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.irmax"), &assign_TurbLCFB1_irmax)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.ki"), &assign_TurbLCFB1_ki)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.kp"), &assign_TurbLCFB1_kp)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.mwbase"), &assign_TurbLCFB1_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.pbf"), &assign_TurbLCFB1_pbf)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.pmwset"), &assign_TurbLCFB1_pmwset)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.speedReferenceGovernor"), &assign_TurbLCFB1_speedReferenceGovernor)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.tpelec"), &assign_TurbLCFB1_tpelec)); + assign_map.emplace("cim:TurbLCFB1.db", &assign_TurbLCFB1_db); + assign_map.emplace("cim:TurbLCFB1.emax", &assign_TurbLCFB1_emax); + assign_map.emplace("cim:TurbLCFB1.fb", &assign_TurbLCFB1_fb); + assign_map.emplace("cim:TurbLCFB1.fbf", &assign_TurbLCFB1_fbf); + assign_map.emplace("cim:TurbLCFB1.irmax", &assign_TurbLCFB1_irmax); + assign_map.emplace("cim:TurbLCFB1.ki", &assign_TurbLCFB1_ki); + assign_map.emplace("cim:TurbLCFB1.kp", &assign_TurbLCFB1_kp); + assign_map.emplace("cim:TurbLCFB1.mwbase", &assign_TurbLCFB1_mwbase); + assign_map.emplace("cim:TurbLCFB1.pbf", &assign_TurbLCFB1_pbf); + assign_map.emplace("cim:TurbLCFB1.pmwset", &assign_TurbLCFB1_pmwset); + assign_map.emplace("cim:TurbLCFB1.speedReferenceGovernor", &assign_TurbLCFB1_speedReferenceGovernor); + assign_map.emplace("cim:TurbLCFB1.tpelec", &assign_TurbLCFB1_tpelec); } void TurbLCFB1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/TurbLCFB1.hpp b/CGMES_2.4.15_27JAN2020/TurbLCFB1.hpp index 9a057c88b..f45fd978f 100644 --- a/CGMES_2.4.15_27JAN2020/TurbLCFB1.hpp +++ b/CGMES_2.4.15_27JAN2020/TurbLCFB1.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Turbine Load Controller model developed in the WECC. This model represents a supervisory turbine load controller that acts to maintain turbine power at a set value by continuous adjustment of the turbine governor speed-load reference. This model is intended to represent slow reset 'outer loop' controllers managing the action of the turbine governor. - */ + /** \brief Turbine Load Controller model developed in the WECC. This model represents a supervisory turbine load controller that acts to maintain turbine power at a set value by continuous adjustment of the turbine governor speed-load reference. This model is intended to represent slow reset 'outer loop' controllers managing the action of the turbine governor. */ class TurbLCFB1 : public TurbineLoadControllerDynamics { public: @@ -30,18 +28,41 @@ namespace CIMPP TurbLCFB1(); ~TurbLCFB1() override; - CIMPP::PU db; /* Controller dead band (db). Typical Value = 0. Default: nullptr */ - CIMPP::PU emax; /* Maximum control error (Emax) (note 4). Typical Value = 0.02. Default: nullptr */ - CIMPP::PU fb; /* Frequency bias gain (Fb). Typical Value = 0. Default: nullptr */ - CIMPP::Boolean fbf; /* Frequency bias flag (Fbf). true = enable frequency bias false = disable frequency bias. Typical Value = false. Default: false */ - CIMPP::PU irmax; /* Maximum turbine speed/load reference bias (Irmax) (note 3). Typical Value = 0. Default: nullptr */ - CIMPP::PU ki; /* Integral gain (Ki). Typical Value = 0. Default: nullptr */ - CIMPP::PU kp; /* Proportional gain (Kp). Typical Value = 0. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ - CIMPP::Boolean pbf; /* Power controller flag (Pbf). true = enable load controller false = disable load controller. Typical Value = false. Default: false */ - CIMPP::ActivePower pmwset; /* Power controller setpoint (Pmwset) (note 1). Unit = MW. Typical Value = 0. Default: nullptr */ - CIMPP::Boolean speedReferenceGovernor; /* Type of turbine governor reference (Type). true = speed reference governor false = load reference governor. Typical Value = true. Default: false */ - CIMPP::Seconds tpelec; /* Power transducer time constant (Tpelec). Typical Value = 0. Default: nullptr */ + /** \brief Controller dead band (db). Typical Value = 0. Default: nullptr */ + CIMPP::PU db; + + /** \brief Maximum control error (Emax) (note 4). Typical Value = 0.02. Default: nullptr */ + CIMPP::PU emax; + + /** \brief Frequency bias gain (Fb). Typical Value = 0. Default: nullptr */ + CIMPP::PU fb; + + /** \brief Frequency bias flag (Fbf). true = enable frequency bias false = disable frequency bias. Typical Value = false. Default: false */ + CIMPP::Boolean fbf; + + /** \brief Maximum turbine speed/load reference bias (Irmax) (note 3). Typical Value = 0. Default: nullptr */ + CIMPP::PU irmax; + + /** \brief Integral gain (Ki). Typical Value = 0. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Proportional gain (Kp). Typical Value = 0. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Base for power values (MWbase) (>0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Power controller flag (Pbf). true = enable load controller false = disable load controller. Typical Value = false. Default: false */ + CIMPP::Boolean pbf; + + /** \brief Power controller setpoint (Pmwset) (note 1). Unit = MW. Typical Value = 0. Default: nullptr */ + CIMPP::ActivePower pmwset; + + /** \brief Type of turbine governor reference (Type). true = speed reference governor false = load reference governor. Typical Value = true. Default: false */ + CIMPP::Boolean speedReferenceGovernor; + + /** \brief Power transducer time constant (Tpelec). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tpelec; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/TurbineGovernorDynamics.cpp b/CGMES_2.4.15_27JAN2020/TurbineGovernorDynamics.cpp index 8c08348f9..cebece4b4 100644 --- a/CGMES_2.4.15_27JAN2020/TurbineGovernorDynamics.cpp +++ b/CGMES_2.4.15_27JAN2020/TurbineGovernorDynamics.cpp @@ -14,8 +14,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -TurbineGovernorDynamics::TurbineGovernorDynamics() : AsynchronousMachineDynamics(nullptr), TurbineLoadControllerDynamics(nullptr) {}; -TurbineGovernorDynamics::~TurbineGovernorDynamics() {}; +TurbineGovernorDynamics::TurbineGovernorDynamics() : AsynchronousMachineDynamics(nullptr), TurbineLoadControllerDynamics(nullptr) {} +TurbineGovernorDynamics::~TurbineGovernorDynamics() {} static const std::list PossibleProfilesForClass = { @@ -44,8 +44,6 @@ TurbineGovernorDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_AsynchronousMachineDynamics_TurbineGovernorDynamics(BaseClass*, BaseClass*); bool assign_TurbineGovernorDynamics_AsynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -62,6 +60,7 @@ bool assign_TurbineGovernorDynamics_AsynchronousMachineDynamics(BaseClass* BaseC } return false; } + bool assign_SynchronousMachineDynamics_TurbineGovernorDynamics(BaseClass*, BaseClass*); bool assign_TurbineGovernorDynamics_SynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -78,6 +77,7 @@ bool assign_TurbineGovernorDynamics_SynchronousMachineDynamics(BaseClass* BaseCl } return false; } + bool assign_TurbineLoadControllerDynamics_TurbineGovernorDynamics(BaseClass*, BaseClass*); bool assign_TurbineGovernorDynamics_TurbineLoadControllerDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -95,10 +95,10 @@ bool assign_TurbineGovernorDynamics_TurbineLoadControllerDynamics(BaseClass* Bas return false; } - bool get_TurbineGovernorDynamics_AsynchronousMachineDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TurbineGovernorDynamics* element = dynamic_cast(BaseClass_ptr1)) + const TurbineGovernorDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->AsynchronousMachineDynamics != 0) { @@ -111,7 +111,8 @@ bool get_TurbineGovernorDynamics_AsynchronousMachineDynamics(const BaseClass* Ba bool get_TurbineGovernorDynamics_SynchronousMachineDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TurbineGovernorDynamics* element = dynamic_cast(BaseClass_ptr1)) + const TurbineGovernorDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { std::copy(element->SynchronousMachineDynamics.begin(), element->SynchronousMachineDynamics.end(), std::back_inserter(BaseClass_list)); return !BaseClass_list.empty(); @@ -128,7 +129,7 @@ const char* TurbineGovernorDynamics::debugString() const void TurbineGovernorDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TurbineGovernorDynamics"), &TurbineGovernorDynamics_factory)); + factory_map.emplace("cim:TurbineGovernorDynamics", &TurbineGovernorDynamics_factory); } void TurbineGovernorDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -137,9 +138,9 @@ void TurbineGovernorDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TurbineGovernorDynamics.AsynchronousMachineDynamics"), &assign_TurbineGovernorDynamics_AsynchronousMachineDynamics)); - assign_map.insert(std::make_pair(std::string("cim:TurbineGovernorDynamics.SynchronousMachineDynamics"), &assign_TurbineGovernorDynamics_SynchronousMachineDynamics)); - assign_map.insert(std::make_pair(std::string("cim:TurbineGovernorDynamics.TurbineLoadControllerDynamics"), &assign_TurbineGovernorDynamics_TurbineLoadControllerDynamics)); + assign_map.emplace("cim:TurbineGovernorDynamics.AsynchronousMachineDynamics", &assign_TurbineGovernorDynamics_AsynchronousMachineDynamics); + assign_map.emplace("cim:TurbineGovernorDynamics.SynchronousMachineDynamics", &assign_TurbineGovernorDynamics_SynchronousMachineDynamics); + assign_map.emplace("cim:TurbineGovernorDynamics.TurbineLoadControllerDynamics", &assign_TurbineGovernorDynamics_TurbineLoadControllerDynamics); } void TurbineGovernorDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/TurbineGovernorDynamics.hpp b/CGMES_2.4.15_27JAN2020/TurbineGovernorDynamics.hpp index 1e521e825..dda79cfd7 100644 --- a/CGMES_2.4.15_27JAN2020/TurbineGovernorDynamics.hpp +++ b/CGMES_2.4.15_27JAN2020/TurbineGovernorDynamics.hpp @@ -19,9 +19,7 @@ namespace CIMPP class SynchronousMachineDynamics; class TurbineLoadControllerDynamics; - /* - Turbine-governor function block whose behavior is described by reference to a standard model - */ + /** \brief Turbine-governor function block whose behavior is described by reference to a standard model */ class TurbineGovernorDynamics : public DynamicsFunctionBlock { public: @@ -29,9 +27,14 @@ namespace CIMPP TurbineGovernorDynamics(); ~TurbineGovernorDynamics() override; - CIMPP::AsynchronousMachineDynamics* AsynchronousMachineDynamics; /* Asynchronous machine model with which this turbine-governor model is associated. Default: 0 */ - std::list SynchronousMachineDynamics; /* Turbine-governor model associated with this synchronous machine model. Default: 0 */ - CIMPP::TurbineLoadControllerDynamics* TurbineLoadControllerDynamics; /* Turbine load controller providing input to this turbine-governor. Default: 0 */ + /** \brief Asynchronous machine model with which this turbine-governor model is associated. Default: 0 */ + CIMPP::AsynchronousMachineDynamics* AsynchronousMachineDynamics; + + /** \brief Turbine-governor model associated with this synchronous machine model. Default: 0 */ + std::list SynchronousMachineDynamics; + + /** \brief Turbine load controller providing input to this turbine-governor. Default: 0 */ + CIMPP::TurbineLoadControllerDynamics* TurbineLoadControllerDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/TurbineGovernorUserDefined.cpp b/CGMES_2.4.15_27JAN2020/TurbineGovernorUserDefined.cpp index cbaea87d3..ad7d7ef5f 100644 --- a/CGMES_2.4.15_27JAN2020/TurbineGovernorUserDefined.cpp +++ b/CGMES_2.4.15_27JAN2020/TurbineGovernorUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -TurbineGovernorUserDefined::TurbineGovernorUserDefined() {}; -TurbineGovernorUserDefined::~TurbineGovernorUserDefined() {}; +TurbineGovernorUserDefined::TurbineGovernorUserDefined() {} +TurbineGovernorUserDefined::~TurbineGovernorUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ TurbineGovernorUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_TurbineGovernorUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TurbineGovernorUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_TurbineGovernorUserDefined(BaseClass*, BaseClass*); bool assign_TurbineGovernorUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_TurbineGovernorUserDefined_ProprietaryParameterDynamics(BaseClass* B return false; } +bool assign_TurbineGovernorUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + TurbineGovernorUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_TurbineGovernorUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbineGovernorUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const TurbineGovernorUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_TurbineGovernorUserDefined_proprietary(const BaseClass* BaseClass_ptr1, return false; } - - const char TurbineGovernorUserDefined::debugName[] = "TurbineGovernorUserDefined"; const char* TurbineGovernorUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* TurbineGovernorUserDefined::debugString() const void TurbineGovernorUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TurbineGovernorUserDefined"), &TurbineGovernorUserDefined_factory)); + factory_map.emplace("cim:TurbineGovernorUserDefined", &TurbineGovernorUserDefined_factory); } void TurbineGovernorUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TurbineGovernorUserDefined.proprietary"), &assign_TurbineGovernorUserDefined_proprietary)); + assign_map.emplace("cim:TurbineGovernorUserDefined.proprietary", &assign_TurbineGovernorUserDefined_proprietary); } void TurbineGovernorUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TurbineGovernorUserDefined.ProprietaryParameterDynamics"), &assign_TurbineGovernorUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:TurbineGovernorUserDefined.ProprietaryParameterDynamics", &assign_TurbineGovernorUserDefined_ProprietaryParameterDynamics); } void TurbineGovernorUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/TurbineGovernorUserDefined.hpp b/CGMES_2.4.15_27JAN2020/TurbineGovernorUserDefined.hpp index 515cd55e9..47aa48210 100644 --- a/CGMES_2.4.15_27JAN2020/TurbineGovernorUserDefined.hpp +++ b/CGMES_2.4.15_27JAN2020/TurbineGovernorUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Turbine-governor function block whose dynamic behaviour is described by - */ + /** \brief Turbine-governor function block whose dynamic behaviour is described by */ class TurbineGovernorUserDefined : public TurbineGovernorDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP TurbineGovernorUserDefined(); ~TurbineGovernorUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/TurbineLoadControllerDynamics.cpp b/CGMES_2.4.15_27JAN2020/TurbineLoadControllerDynamics.cpp index fe5f1ad16..d9ae03d4f 100644 --- a/CGMES_2.4.15_27JAN2020/TurbineLoadControllerDynamics.cpp +++ b/CGMES_2.4.15_27JAN2020/TurbineLoadControllerDynamics.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -TurbineLoadControllerDynamics::TurbineLoadControllerDynamics() : TurbineGovernorDynamics(nullptr) {}; -TurbineLoadControllerDynamics::~TurbineLoadControllerDynamics() {}; +TurbineLoadControllerDynamics::TurbineLoadControllerDynamics() : TurbineGovernorDynamics(nullptr) {} +TurbineLoadControllerDynamics::~TurbineLoadControllerDynamics() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ TurbineLoadControllerDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_TurbineGovernorDynamics_TurbineLoadControllerDynamics(BaseClass*, BaseClass*); bool assign_TurbineLoadControllerDynamics_TurbineGovernorDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_TurbineLoadControllerDynamics_TurbineGovernorDynamics(BaseClass* Bas return false; } - bool get_TurbineLoadControllerDynamics_TurbineGovernorDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TurbineLoadControllerDynamics* element = dynamic_cast(BaseClass_ptr1)) + const TurbineLoadControllerDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->TurbineGovernorDynamics != 0) { @@ -73,7 +71,6 @@ bool get_TurbineLoadControllerDynamics_TurbineGovernorDynamics(const BaseClass* return false; } - const char TurbineLoadControllerDynamics::debugName[] = "TurbineLoadControllerDynamics"; const char* TurbineLoadControllerDynamics::debugString() const { @@ -82,7 +79,7 @@ const char* TurbineLoadControllerDynamics::debugString() const void TurbineLoadControllerDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TurbineLoadControllerDynamics"), &TurbineLoadControllerDynamics_factory)); + factory_map.emplace("cim:TurbineLoadControllerDynamics", &TurbineLoadControllerDynamics_factory); } void TurbineLoadControllerDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void TurbineLoadControllerDynamics::addPrimitiveAssignFnsToMap(std::unordered_ma void TurbineLoadControllerDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TurbineLoadControllerDynamics.TurbineGovernorDynamics"), &assign_TurbineLoadControllerDynamics_TurbineGovernorDynamics)); + assign_map.emplace("cim:TurbineLoadControllerDynamics.TurbineGovernorDynamics", &assign_TurbineLoadControllerDynamics_TurbineGovernorDynamics); } void TurbineLoadControllerDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/TurbineLoadControllerDynamics.hpp b/CGMES_2.4.15_27JAN2020/TurbineLoadControllerDynamics.hpp index eb7210c2d..12ec05aec 100644 --- a/CGMES_2.4.15_27JAN2020/TurbineLoadControllerDynamics.hpp +++ b/CGMES_2.4.15_27JAN2020/TurbineLoadControllerDynamics.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class TurbineGovernorDynamics; - /* - Turbine load controller function block whose behavior is described by reference to a standard model - */ + /** \brief Turbine load controller function block whose behavior is described by reference to a standard model */ class TurbineLoadControllerDynamics : public DynamicsFunctionBlock { public: @@ -27,7 +25,8 @@ namespace CIMPP TurbineLoadControllerDynamics(); ~TurbineLoadControllerDynamics() override; - CIMPP::TurbineGovernorDynamics* TurbineGovernorDynamics; /* Turbine-governor controlled by this turbine load controller. Default: 0 */ + /** \brief Turbine-governor controlled by this turbine load controller. Default: 0 */ + CIMPP::TurbineGovernorDynamics* TurbineGovernorDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/TurbineLoadControllerUserDefined.cpp b/CGMES_2.4.15_27JAN2020/TurbineLoadControllerUserDefined.cpp index a46c191e9..842adf4c4 100644 --- a/CGMES_2.4.15_27JAN2020/TurbineLoadControllerUserDefined.cpp +++ b/CGMES_2.4.15_27JAN2020/TurbineLoadControllerUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -TurbineLoadControllerUserDefined::TurbineLoadControllerUserDefined() {}; -TurbineLoadControllerUserDefined::~TurbineLoadControllerUserDefined() {}; +TurbineLoadControllerUserDefined::TurbineLoadControllerUserDefined() {} +TurbineLoadControllerUserDefined::~TurbineLoadControllerUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ TurbineLoadControllerUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_TurbineLoadControllerUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TurbineLoadControllerUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_TurbineLoadControllerUserDefined(BaseClass*, BaseClass*); bool assign_TurbineLoadControllerUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_TurbineLoadControllerUserDefined_ProprietaryParameterDynamics(BaseCl return false; } +bool assign_TurbineLoadControllerUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + TurbineLoadControllerUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_TurbineLoadControllerUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbineLoadControllerUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const TurbineLoadControllerUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_TurbineLoadControllerUserDefined_proprietary(const BaseClass* BaseClass return false; } - - const char TurbineLoadControllerUserDefined::debugName[] = "TurbineLoadControllerUserDefined"; const char* TurbineLoadControllerUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* TurbineLoadControllerUserDefined::debugString() const void TurbineLoadControllerUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TurbineLoadControllerUserDefined"), &TurbineLoadControllerUserDefined_factory)); + factory_map.emplace("cim:TurbineLoadControllerUserDefined", &TurbineLoadControllerUserDefined_factory); } void TurbineLoadControllerUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TurbineLoadControllerUserDefined.proprietary"), &assign_TurbineLoadControllerUserDefined_proprietary)); + assign_map.emplace("cim:TurbineLoadControllerUserDefined.proprietary", &assign_TurbineLoadControllerUserDefined_proprietary); } void TurbineLoadControllerUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TurbineLoadControllerUserDefined.ProprietaryParameterDynamics"), &assign_TurbineLoadControllerUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:TurbineLoadControllerUserDefined.ProprietaryParameterDynamics", &assign_TurbineLoadControllerUserDefined_ProprietaryParameterDynamics); } void TurbineLoadControllerUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/TurbineLoadControllerUserDefined.hpp b/CGMES_2.4.15_27JAN2020/TurbineLoadControllerUserDefined.hpp index 20fe71ab6..ce15803d0 100644 --- a/CGMES_2.4.15_27JAN2020/TurbineLoadControllerUserDefined.hpp +++ b/CGMES_2.4.15_27JAN2020/TurbineLoadControllerUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Turbine load controller function block whose dynamic behaviour is described by - */ + /** \brief Turbine load controller function block whose dynamic behaviour is described by */ class TurbineLoadControllerUserDefined : public TurbineLoadControllerDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP TurbineLoadControllerUserDefined(); ~TurbineLoadControllerUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/UnderexcLim2Simplified.cpp b/CGMES_2.4.15_27JAN2020/UnderexcLim2Simplified.cpp index f26bd20ff..d3524b97d 100644 --- a/CGMES_2.4.15_27JAN2020/UnderexcLim2Simplified.cpp +++ b/CGMES_2.4.15_27JAN2020/UnderexcLim2Simplified.cpp @@ -8,18 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -UnderexcLim2Simplified::UnderexcLim2Simplified() {}; -UnderexcLim2Simplified::~UnderexcLim2Simplified() {}; +UnderexcLim2Simplified::UnderexcLim2Simplified() {} +UnderexcLim2Simplified::~UnderexcLim2Simplified() {} static const std::list PossibleProfilesForClass = { @@ -52,103 +45,108 @@ UnderexcLim2Simplified::getPossibleProfilesForAttributes() const return map; } - -bool assign_UnderexcLim2Simplified_kui(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLim2Simplified_kui(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kui; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLim2Simplified_p0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLim2Simplified_p0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLim2Simplified_p1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLim2Simplified_p1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLim2Simplified_q0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLim2Simplified_q0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLim2Simplified_q1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLim2Simplified_q1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLim2Simplified_vuimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLim2Simplified_vuimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vuimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLim2Simplified_vuimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLim2Simplified_vuimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vuimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_UnderexcLim2Simplified_kui(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kui; if (!buffer.str().empty()) @@ -162,7 +160,8 @@ bool get_UnderexcLim2Simplified_kui(const BaseClass* BaseClass_ptr1, std::string bool get_UnderexcLim2Simplified_p0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p0; if (!buffer.str().empty()) @@ -176,7 +175,8 @@ bool get_UnderexcLim2Simplified_p0(const BaseClass* BaseClass_ptr1, std::strings bool get_UnderexcLim2Simplified_p1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p1; if (!buffer.str().empty()) @@ -190,7 +190,8 @@ bool get_UnderexcLim2Simplified_p1(const BaseClass* BaseClass_ptr1, std::strings bool get_UnderexcLim2Simplified_q0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q0; if (!buffer.str().empty()) @@ -204,7 +205,8 @@ bool get_UnderexcLim2Simplified_q0(const BaseClass* BaseClass_ptr1, std::strings bool get_UnderexcLim2Simplified_q1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q1; if (!buffer.str().empty()) @@ -218,7 +220,8 @@ bool get_UnderexcLim2Simplified_q1(const BaseClass* BaseClass_ptr1, std::strings bool get_UnderexcLim2Simplified_vuimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vuimax; if (!buffer.str().empty()) @@ -232,7 +235,8 @@ bool get_UnderexcLim2Simplified_vuimax(const BaseClass* BaseClass_ptr1, std::str bool get_UnderexcLim2Simplified_vuimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vuimin; if (!buffer.str().empty()) @@ -244,8 +248,6 @@ bool get_UnderexcLim2Simplified_vuimin(const BaseClass* BaseClass_ptr1, std::str return false; } - - const char UnderexcLim2Simplified::debugName[] = "UnderexcLim2Simplified"; const char* UnderexcLim2Simplified::debugString() const { @@ -254,18 +256,18 @@ const char* UnderexcLim2Simplified::debugString() const void UnderexcLim2Simplified::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:UnderexcLim2Simplified"), &UnderexcLim2Simplified_factory)); + factory_map.emplace("cim:UnderexcLim2Simplified", &UnderexcLim2Simplified_factory); } void UnderexcLim2Simplified::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:UnderexcLim2Simplified.kui"), &assign_UnderexcLim2Simplified_kui)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLim2Simplified.p0"), &assign_UnderexcLim2Simplified_p0)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLim2Simplified.p1"), &assign_UnderexcLim2Simplified_p1)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLim2Simplified.q0"), &assign_UnderexcLim2Simplified_q0)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLim2Simplified.q1"), &assign_UnderexcLim2Simplified_q1)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLim2Simplified.vuimax"), &assign_UnderexcLim2Simplified_vuimax)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLim2Simplified.vuimin"), &assign_UnderexcLim2Simplified_vuimin)); + assign_map.emplace("cim:UnderexcLim2Simplified.kui", &assign_UnderexcLim2Simplified_kui); + assign_map.emplace("cim:UnderexcLim2Simplified.p0", &assign_UnderexcLim2Simplified_p0); + assign_map.emplace("cim:UnderexcLim2Simplified.p1", &assign_UnderexcLim2Simplified_p1); + assign_map.emplace("cim:UnderexcLim2Simplified.q0", &assign_UnderexcLim2Simplified_q0); + assign_map.emplace("cim:UnderexcLim2Simplified.q1", &assign_UnderexcLim2Simplified_q1); + assign_map.emplace("cim:UnderexcLim2Simplified.vuimax", &assign_UnderexcLim2Simplified_vuimax); + assign_map.emplace("cim:UnderexcLim2Simplified.vuimin", &assign_UnderexcLim2Simplified_vuimin); } void UnderexcLim2Simplified::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/UnderexcLim2Simplified.hpp b/CGMES_2.4.15_27JAN2020/UnderexcLim2Simplified.hpp index b6f8d0494..5c1e361db 100644 --- a/CGMES_2.4.15_27JAN2020/UnderexcLim2Simplified.hpp +++ b/CGMES_2.4.15_27JAN2020/UnderexcLim2Simplified.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - This model can be derived from UnderexcLimIEEE2. The limit characteristic (look -up table) is a single straight-line, the same as UnderexcLimIEEE2 (see Figure 10.4 (p 32), IEEE 421.5-2005 Section 10.2). - */ + /** \brief This model can be derived from UnderexcLimIEEE2. The limit characteristic (look -up table) is a single straight-line, the same as UnderexcLimIEEE2 (see Figure 10.4 (p 32), IEEE 421.5-2005 Section 10.2). */ class UnderexcLim2Simplified : public UnderexcitationLimiterDynamics { public: @@ -27,13 +25,26 @@ namespace CIMPP UnderexcLim2Simplified(); ~UnderexcLim2Simplified() override; - CIMPP::PU kui; /* Gain Under excitation limiter (Kui). Typical Value = 0.1. Default: nullptr */ - CIMPP::PU p0; /* Segment P initial point (P0). Typical Value = 0. Default: nullptr */ - CIMPP::PU p1; /* Segment P end point (P1). Typical Value = 1. Default: nullptr */ - CIMPP::PU q0; /* Segment Q initial point (Q0). Typical Value = -0.31. Default: nullptr */ - CIMPP::PU q1; /* Segment Q end point (Q1). Typical Value = -0.1. Default: nullptr */ - CIMPP::PU vuimax; /* Maximum error signal (V). Typical Value = 1. Default: nullptr */ - CIMPP::PU vuimin; /* Minimum error signal (V). Typical Value = 0. Default: nullptr */ + /** \brief Gain Under excitation limiter (Kui). Typical Value = 0.1. Default: nullptr */ + CIMPP::PU kui; + + /** \brief Segment P initial point (P0). Typical Value = 0. Default: nullptr */ + CIMPP::PU p0; + + /** \brief Segment P end point (P1). Typical Value = 1. Default: nullptr */ + CIMPP::PU p1; + + /** \brief Segment Q initial point (Q0). Typical Value = -0.31. Default: nullptr */ + CIMPP::PU q0; + + /** \brief Segment Q end point (Q1). Typical Value = -0.1. Default: nullptr */ + CIMPP::PU q1; + + /** \brief Maximum error signal (V). Typical Value = 1. Default: nullptr */ + CIMPP::PU vuimax; + + /** \brief Minimum error signal (V). Typical Value = 0. Default: nullptr */ + CIMPP::PU vuimin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/UnderexcLimIEEE1.cpp b/CGMES_2.4.15_27JAN2020/UnderexcLimIEEE1.cpp index 56b0a574b..ed960945f 100644 --- a/CGMES_2.4.15_27JAN2020/UnderexcLimIEEE1.cpp +++ b/CGMES_2.4.15_27JAN2020/UnderexcLimIEEE1.cpp @@ -8,26 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -UnderexcLimIEEE1::UnderexcLimIEEE1() {}; -UnderexcLimIEEE1::~UnderexcLimIEEE1() {}; +UnderexcLimIEEE1::UnderexcLimIEEE1() {} +UnderexcLimIEEE1::~UnderexcLimIEEE1() {} static const std::list PossibleProfilesForClass = { @@ -68,207 +53,220 @@ UnderexcLimIEEE1::getPossibleProfilesForAttributes() const return map; } - -bool assign_UnderexcLimIEEE1_kuc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_kuc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kuc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_kuf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_kuf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kuf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_kui(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_kui(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kui; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_kul(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_kul(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kul; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_kur(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_kur(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kur; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_tu1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_tu1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tu1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_tu2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_tu2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tu2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_tu3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_tu3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tu3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_tu4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_tu4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tu4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_vucmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_vucmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vucmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_vuimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_vuimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vuimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_vuimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_vuimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vuimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_vulmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_vulmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vulmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_vulmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_vulmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vulmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_vurmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_vurmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vurmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_UnderexcLimIEEE1_kuc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kuc; if (!buffer.str().empty()) @@ -282,7 +280,8 @@ bool get_UnderexcLimIEEE1_kuc(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE1_kuf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kuf; if (!buffer.str().empty()) @@ -296,7 +295,8 @@ bool get_UnderexcLimIEEE1_kuf(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE1_kui(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kui; if (!buffer.str().empty()) @@ -310,7 +310,8 @@ bool get_UnderexcLimIEEE1_kui(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE1_kul(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kul; if (!buffer.str().empty()) @@ -324,7 +325,8 @@ bool get_UnderexcLimIEEE1_kul(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE1_kur(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kur; if (!buffer.str().empty()) @@ -338,7 +340,8 @@ bool get_UnderexcLimIEEE1_kur(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE1_tu1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tu1; if (!buffer.str().empty()) @@ -352,7 +355,8 @@ bool get_UnderexcLimIEEE1_tu1(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE1_tu2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tu2; if (!buffer.str().empty()) @@ -366,7 +370,8 @@ bool get_UnderexcLimIEEE1_tu2(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE1_tu3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tu3; if (!buffer.str().empty()) @@ -380,7 +385,8 @@ bool get_UnderexcLimIEEE1_tu3(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE1_tu4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tu4; if (!buffer.str().empty()) @@ -394,7 +400,8 @@ bool get_UnderexcLimIEEE1_tu4(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE1_vucmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vucmax; if (!buffer.str().empty()) @@ -408,7 +415,8 @@ bool get_UnderexcLimIEEE1_vucmax(const BaseClass* BaseClass_ptr1, std::stringstr bool get_UnderexcLimIEEE1_vuimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vuimax; if (!buffer.str().empty()) @@ -422,7 +430,8 @@ bool get_UnderexcLimIEEE1_vuimax(const BaseClass* BaseClass_ptr1, std::stringstr bool get_UnderexcLimIEEE1_vuimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vuimin; if (!buffer.str().empty()) @@ -436,7 +445,8 @@ bool get_UnderexcLimIEEE1_vuimin(const BaseClass* BaseClass_ptr1, std::stringstr bool get_UnderexcLimIEEE1_vulmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vulmax; if (!buffer.str().empty()) @@ -450,7 +460,8 @@ bool get_UnderexcLimIEEE1_vulmax(const BaseClass* BaseClass_ptr1, std::stringstr bool get_UnderexcLimIEEE1_vulmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vulmin; if (!buffer.str().empty()) @@ -464,7 +475,8 @@ bool get_UnderexcLimIEEE1_vulmin(const BaseClass* BaseClass_ptr1, std::stringstr bool get_UnderexcLimIEEE1_vurmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vurmax; if (!buffer.str().empty()) @@ -476,8 +488,6 @@ bool get_UnderexcLimIEEE1_vurmax(const BaseClass* BaseClass_ptr1, std::stringstr return false; } - - const char UnderexcLimIEEE1::debugName[] = "UnderexcLimIEEE1"; const char* UnderexcLimIEEE1::debugString() const { @@ -486,26 +496,26 @@ const char* UnderexcLimIEEE1::debugString() const void UnderexcLimIEEE1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1"), &UnderexcLimIEEE1_factory)); + factory_map.emplace("cim:UnderexcLimIEEE1", &UnderexcLimIEEE1_factory); } void UnderexcLimIEEE1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.kuc"), &assign_UnderexcLimIEEE1_kuc)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.kuf"), &assign_UnderexcLimIEEE1_kuf)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.kui"), &assign_UnderexcLimIEEE1_kui)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.kul"), &assign_UnderexcLimIEEE1_kul)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.kur"), &assign_UnderexcLimIEEE1_kur)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.tu1"), &assign_UnderexcLimIEEE1_tu1)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.tu2"), &assign_UnderexcLimIEEE1_tu2)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.tu3"), &assign_UnderexcLimIEEE1_tu3)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.tu4"), &assign_UnderexcLimIEEE1_tu4)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.vucmax"), &assign_UnderexcLimIEEE1_vucmax)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.vuimax"), &assign_UnderexcLimIEEE1_vuimax)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.vuimin"), &assign_UnderexcLimIEEE1_vuimin)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.vulmax"), &assign_UnderexcLimIEEE1_vulmax)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.vulmin"), &assign_UnderexcLimIEEE1_vulmin)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.vurmax"), &assign_UnderexcLimIEEE1_vurmax)); + assign_map.emplace("cim:UnderexcLimIEEE1.kuc", &assign_UnderexcLimIEEE1_kuc); + assign_map.emplace("cim:UnderexcLimIEEE1.kuf", &assign_UnderexcLimIEEE1_kuf); + assign_map.emplace("cim:UnderexcLimIEEE1.kui", &assign_UnderexcLimIEEE1_kui); + assign_map.emplace("cim:UnderexcLimIEEE1.kul", &assign_UnderexcLimIEEE1_kul); + assign_map.emplace("cim:UnderexcLimIEEE1.kur", &assign_UnderexcLimIEEE1_kur); + assign_map.emplace("cim:UnderexcLimIEEE1.tu1", &assign_UnderexcLimIEEE1_tu1); + assign_map.emplace("cim:UnderexcLimIEEE1.tu2", &assign_UnderexcLimIEEE1_tu2); + assign_map.emplace("cim:UnderexcLimIEEE1.tu3", &assign_UnderexcLimIEEE1_tu3); + assign_map.emplace("cim:UnderexcLimIEEE1.tu4", &assign_UnderexcLimIEEE1_tu4); + assign_map.emplace("cim:UnderexcLimIEEE1.vucmax", &assign_UnderexcLimIEEE1_vucmax); + assign_map.emplace("cim:UnderexcLimIEEE1.vuimax", &assign_UnderexcLimIEEE1_vuimax); + assign_map.emplace("cim:UnderexcLimIEEE1.vuimin", &assign_UnderexcLimIEEE1_vuimin); + assign_map.emplace("cim:UnderexcLimIEEE1.vulmax", &assign_UnderexcLimIEEE1_vulmax); + assign_map.emplace("cim:UnderexcLimIEEE1.vulmin", &assign_UnderexcLimIEEE1_vulmin); + assign_map.emplace("cim:UnderexcLimIEEE1.vurmax", &assign_UnderexcLimIEEE1_vurmax); } void UnderexcLimIEEE1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/UnderexcLimIEEE1.hpp b/CGMES_2.4.15_27JAN2020/UnderexcLimIEEE1.hpp index 153211aa7..7e60e75df 100644 --- a/CGMES_2.4.15_27JAN2020/UnderexcLimIEEE1.hpp +++ b/CGMES_2.4.15_27JAN2020/UnderexcLimIEEE1.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents the Type UEL1 model which has a circular limit boundary when plotted in terms of machine reactive power vs. real power output. Reference: IEEE UEL1 421.5-2005 Section 10.1. - */ + /** \brief The class represents the Type UEL1 model which has a circular limit boundary when plotted in terms of machine reactive power vs. real power output. Reference: IEEE UEL1 421.5-2005 Section 10.1. */ class UnderexcLimIEEE1 : public UnderexcitationLimiterDynamics { public: @@ -28,21 +26,50 @@ namespace CIMPP UnderexcLimIEEE1(); ~UnderexcLimIEEE1() override; - CIMPP::PU kuc; /* UEL center setting (K). Typical Value = 1.38. Default: nullptr */ - CIMPP::PU kuf; /* UEL excitation system stabilizer gain (K). Typical Value = 3.3. Default: nullptr */ - CIMPP::PU kui; /* UEL integral gain (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU kul; /* UEL proportional gain (K). Typical Value = 100. Default: nullptr */ - CIMPP::PU kur; /* UEL radius setting (K). Typical Value = 1.95. Default: nullptr */ - CIMPP::Seconds tu1; /* UEL lead time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tu2; /* UEL lag time constant (T). Typical Value = 0.05. Default: nullptr */ - CIMPP::Seconds tu3; /* UEL lead time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tu4; /* UEL lag time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::PU vucmax; /* UEL maximum limit for operating point phasor magnitude (V). Typical Value = 5.8. Default: nullptr */ - CIMPP::PU vuimax; /* UEL integrator output maximum limit (V). Default: nullptr */ - CIMPP::PU vuimin; /* UEL integrator output minimum limit (V). Default: nullptr */ - CIMPP::PU vulmax; /* UEL output maximum limit (V). Typical Value = 18. Default: nullptr */ - CIMPP::PU vulmin; /* UEL output minimum limit (V). Typical Value = -18. Default: nullptr */ - CIMPP::PU vurmax; /* UEL maximum limit for radius phasor magnitude (V). Typical Value = 5.8. Default: nullptr */ + /** \brief UEL center setting (K). Typical Value = 1.38. Default: nullptr */ + CIMPP::PU kuc; + + /** \brief UEL excitation system stabilizer gain (K). Typical Value = 3.3. Default: nullptr */ + CIMPP::PU kuf; + + /** \brief UEL integral gain (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU kui; + + /** \brief UEL proportional gain (K). Typical Value = 100. Default: nullptr */ + CIMPP::PU kul; + + /** \brief UEL radius setting (K). Typical Value = 1.95. Default: nullptr */ + CIMPP::PU kur; + + /** \brief UEL lead time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tu1; + + /** \brief UEL lag time constant (T). Typical Value = 0.05. Default: nullptr */ + CIMPP::Seconds tu2; + + /** \brief UEL lead time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tu3; + + /** \brief UEL lag time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tu4; + + /** \brief UEL maximum limit for operating point phasor magnitude (V). Typical Value = 5.8. Default: nullptr */ + CIMPP::PU vucmax; + + /** \brief UEL integrator output maximum limit (V). Default: nullptr */ + CIMPP::PU vuimax; + + /** \brief UEL integrator output minimum limit (V). Default: nullptr */ + CIMPP::PU vuimin; + + /** \brief UEL output maximum limit (V). Typical Value = 18. Default: nullptr */ + CIMPP::PU vulmax; + + /** \brief UEL output minimum limit (V). Typical Value = -18. Default: nullptr */ + CIMPP::PU vulmin; + + /** \brief UEL maximum limit for radius phasor magnitude (V). Typical Value = 5.8. Default: nullptr */ + CIMPP::PU vurmax; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/UnderexcLimIEEE2.cpp b/CGMES_2.4.15_27JAN2020/UnderexcLimIEEE2.cpp index 8a0cd3c3a..da9274105 100644 --- a/CGMES_2.4.15_27JAN2020/UnderexcLimIEEE2.cpp +++ b/CGMES_2.4.15_27JAN2020/UnderexcLimIEEE2.cpp @@ -8,51 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -UnderexcLimIEEE2::UnderexcLimIEEE2() {}; -UnderexcLimIEEE2::~UnderexcLimIEEE2() {}; +UnderexcLimIEEE2::UnderexcLimIEEE2() {} +UnderexcLimIEEE2::~UnderexcLimIEEE2() {} static const std::list PossibleProfilesForClass = { @@ -118,532 +78,570 @@ UnderexcLimIEEE2::getPossibleProfilesForAttributes() const return map; } - -bool assign_UnderexcLimIEEE2_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_kfb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_kfb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kfb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_kuf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_kuf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kuf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_kui(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_kui(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kui; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_kul(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_kul(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kul; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_tu1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_tu1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tu1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_tu2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_tu2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tu2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_tu3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_tu3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tu3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_tu4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_tu4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tu4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_tul(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_tul(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tul; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_tup(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_tup(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tup; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_tuq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_tuq(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tuq; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_tuv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_tuv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tuv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_vuimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_vuimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vuimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_vuimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_vuimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vuimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_vulmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_vulmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vulmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_vulmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_vulmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vulmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_UnderexcLimIEEE2_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -657,7 +655,8 @@ bool get_UnderexcLimIEEE2_k1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -671,7 +670,8 @@ bool get_UnderexcLimIEEE2_k2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_kfb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kfb; if (!buffer.str().empty()) @@ -685,7 +685,8 @@ bool get_UnderexcLimIEEE2_kfb(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_kuf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kuf; if (!buffer.str().empty()) @@ -699,7 +700,8 @@ bool get_UnderexcLimIEEE2_kuf(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_kui(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kui; if (!buffer.str().empty()) @@ -713,7 +715,8 @@ bool get_UnderexcLimIEEE2_kui(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_kul(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kul; if (!buffer.str().empty()) @@ -727,7 +730,8 @@ bool get_UnderexcLimIEEE2_kul(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_p0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p0; if (!buffer.str().empty()) @@ -741,7 +745,8 @@ bool get_UnderexcLimIEEE2_p0(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_p1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p1; if (!buffer.str().empty()) @@ -755,7 +760,8 @@ bool get_UnderexcLimIEEE2_p1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_p10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p10; if (!buffer.str().empty()) @@ -769,7 +775,8 @@ bool get_UnderexcLimIEEE2_p10(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_p2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p2; if (!buffer.str().empty()) @@ -783,7 +790,8 @@ bool get_UnderexcLimIEEE2_p2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_p3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p3; if (!buffer.str().empty()) @@ -797,7 +805,8 @@ bool get_UnderexcLimIEEE2_p3(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_p4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p4; if (!buffer.str().empty()) @@ -811,7 +820,8 @@ bool get_UnderexcLimIEEE2_p4(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_p5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p5; if (!buffer.str().empty()) @@ -825,7 +835,8 @@ bool get_UnderexcLimIEEE2_p5(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_p6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p6; if (!buffer.str().empty()) @@ -839,7 +850,8 @@ bool get_UnderexcLimIEEE2_p6(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_p7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p7; if (!buffer.str().empty()) @@ -853,7 +865,8 @@ bool get_UnderexcLimIEEE2_p7(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_p8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p8; if (!buffer.str().empty()) @@ -867,7 +880,8 @@ bool get_UnderexcLimIEEE2_p8(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_p9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p9; if (!buffer.str().empty()) @@ -881,7 +895,8 @@ bool get_UnderexcLimIEEE2_p9(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q0; if (!buffer.str().empty()) @@ -895,7 +910,8 @@ bool get_UnderexcLimIEEE2_q0(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q1; if (!buffer.str().empty()) @@ -909,7 +925,8 @@ bool get_UnderexcLimIEEE2_q1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q10; if (!buffer.str().empty()) @@ -923,7 +940,8 @@ bool get_UnderexcLimIEEE2_q10(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_q2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q2; if (!buffer.str().empty()) @@ -937,7 +955,8 @@ bool get_UnderexcLimIEEE2_q2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q3; if (!buffer.str().empty()) @@ -951,7 +970,8 @@ bool get_UnderexcLimIEEE2_q3(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q4; if (!buffer.str().empty()) @@ -965,7 +985,8 @@ bool get_UnderexcLimIEEE2_q4(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q5; if (!buffer.str().empty()) @@ -979,7 +1000,8 @@ bool get_UnderexcLimIEEE2_q5(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q6; if (!buffer.str().empty()) @@ -993,7 +1015,8 @@ bool get_UnderexcLimIEEE2_q6(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q7; if (!buffer.str().empty()) @@ -1007,7 +1030,8 @@ bool get_UnderexcLimIEEE2_q7(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q8; if (!buffer.str().empty()) @@ -1021,7 +1045,8 @@ bool get_UnderexcLimIEEE2_q8(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q9; if (!buffer.str().empty()) @@ -1035,7 +1060,8 @@ bool get_UnderexcLimIEEE2_q9(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_tu1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tu1; if (!buffer.str().empty()) @@ -1049,7 +1075,8 @@ bool get_UnderexcLimIEEE2_tu1(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_tu2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tu2; if (!buffer.str().empty()) @@ -1063,7 +1090,8 @@ bool get_UnderexcLimIEEE2_tu2(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_tu3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tu3; if (!buffer.str().empty()) @@ -1077,7 +1105,8 @@ bool get_UnderexcLimIEEE2_tu3(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_tu4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tu4; if (!buffer.str().empty()) @@ -1091,7 +1120,8 @@ bool get_UnderexcLimIEEE2_tu4(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_tul(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tul; if (!buffer.str().empty()) @@ -1105,7 +1135,8 @@ bool get_UnderexcLimIEEE2_tul(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_tup(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tup; if (!buffer.str().empty()) @@ -1119,7 +1150,8 @@ bool get_UnderexcLimIEEE2_tup(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_tuq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tuq; if (!buffer.str().empty()) @@ -1133,7 +1165,8 @@ bool get_UnderexcLimIEEE2_tuq(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_tuv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tuv; if (!buffer.str().empty()) @@ -1147,7 +1180,8 @@ bool get_UnderexcLimIEEE2_tuv(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_vuimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vuimax; if (!buffer.str().empty()) @@ -1161,7 +1195,8 @@ bool get_UnderexcLimIEEE2_vuimax(const BaseClass* BaseClass_ptr1, std::stringstr bool get_UnderexcLimIEEE2_vuimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vuimin; if (!buffer.str().empty()) @@ -1175,7 +1210,8 @@ bool get_UnderexcLimIEEE2_vuimin(const BaseClass* BaseClass_ptr1, std::stringstr bool get_UnderexcLimIEEE2_vulmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vulmax; if (!buffer.str().empty()) @@ -1189,7 +1225,8 @@ bool get_UnderexcLimIEEE2_vulmax(const BaseClass* BaseClass_ptr1, std::stringstr bool get_UnderexcLimIEEE2_vulmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vulmin; if (!buffer.str().empty()) @@ -1201,8 +1238,6 @@ bool get_UnderexcLimIEEE2_vulmin(const BaseClass* BaseClass_ptr1, std::stringstr return false; } - - const char UnderexcLimIEEE2::debugName[] = "UnderexcLimIEEE2"; const char* UnderexcLimIEEE2::debugString() const { @@ -1211,51 +1246,51 @@ const char* UnderexcLimIEEE2::debugString() const void UnderexcLimIEEE2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2"), &UnderexcLimIEEE2_factory)); + factory_map.emplace("cim:UnderexcLimIEEE2", &UnderexcLimIEEE2_factory); } void UnderexcLimIEEE2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.k1"), &assign_UnderexcLimIEEE2_k1)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.k2"), &assign_UnderexcLimIEEE2_k2)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.kfb"), &assign_UnderexcLimIEEE2_kfb)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.kuf"), &assign_UnderexcLimIEEE2_kuf)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.kui"), &assign_UnderexcLimIEEE2_kui)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.kul"), &assign_UnderexcLimIEEE2_kul)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p0"), &assign_UnderexcLimIEEE2_p0)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p1"), &assign_UnderexcLimIEEE2_p1)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p10"), &assign_UnderexcLimIEEE2_p10)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p2"), &assign_UnderexcLimIEEE2_p2)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p3"), &assign_UnderexcLimIEEE2_p3)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p4"), &assign_UnderexcLimIEEE2_p4)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p5"), &assign_UnderexcLimIEEE2_p5)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p6"), &assign_UnderexcLimIEEE2_p6)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p7"), &assign_UnderexcLimIEEE2_p7)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p8"), &assign_UnderexcLimIEEE2_p8)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p9"), &assign_UnderexcLimIEEE2_p9)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q0"), &assign_UnderexcLimIEEE2_q0)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q1"), &assign_UnderexcLimIEEE2_q1)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q10"), &assign_UnderexcLimIEEE2_q10)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q2"), &assign_UnderexcLimIEEE2_q2)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q3"), &assign_UnderexcLimIEEE2_q3)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q4"), &assign_UnderexcLimIEEE2_q4)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q5"), &assign_UnderexcLimIEEE2_q5)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q6"), &assign_UnderexcLimIEEE2_q6)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q7"), &assign_UnderexcLimIEEE2_q7)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q8"), &assign_UnderexcLimIEEE2_q8)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q9"), &assign_UnderexcLimIEEE2_q9)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.tu1"), &assign_UnderexcLimIEEE2_tu1)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.tu2"), &assign_UnderexcLimIEEE2_tu2)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.tu3"), &assign_UnderexcLimIEEE2_tu3)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.tu4"), &assign_UnderexcLimIEEE2_tu4)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.tul"), &assign_UnderexcLimIEEE2_tul)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.tup"), &assign_UnderexcLimIEEE2_tup)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.tuq"), &assign_UnderexcLimIEEE2_tuq)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.tuv"), &assign_UnderexcLimIEEE2_tuv)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.vuimax"), &assign_UnderexcLimIEEE2_vuimax)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.vuimin"), &assign_UnderexcLimIEEE2_vuimin)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.vulmax"), &assign_UnderexcLimIEEE2_vulmax)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.vulmin"), &assign_UnderexcLimIEEE2_vulmin)); + assign_map.emplace("cim:UnderexcLimIEEE2.k1", &assign_UnderexcLimIEEE2_k1); + assign_map.emplace("cim:UnderexcLimIEEE2.k2", &assign_UnderexcLimIEEE2_k2); + assign_map.emplace("cim:UnderexcLimIEEE2.kfb", &assign_UnderexcLimIEEE2_kfb); + assign_map.emplace("cim:UnderexcLimIEEE2.kuf", &assign_UnderexcLimIEEE2_kuf); + assign_map.emplace("cim:UnderexcLimIEEE2.kui", &assign_UnderexcLimIEEE2_kui); + assign_map.emplace("cim:UnderexcLimIEEE2.kul", &assign_UnderexcLimIEEE2_kul); + assign_map.emplace("cim:UnderexcLimIEEE2.p0", &assign_UnderexcLimIEEE2_p0); + assign_map.emplace("cim:UnderexcLimIEEE2.p1", &assign_UnderexcLimIEEE2_p1); + assign_map.emplace("cim:UnderexcLimIEEE2.p10", &assign_UnderexcLimIEEE2_p10); + assign_map.emplace("cim:UnderexcLimIEEE2.p2", &assign_UnderexcLimIEEE2_p2); + assign_map.emplace("cim:UnderexcLimIEEE2.p3", &assign_UnderexcLimIEEE2_p3); + assign_map.emplace("cim:UnderexcLimIEEE2.p4", &assign_UnderexcLimIEEE2_p4); + assign_map.emplace("cim:UnderexcLimIEEE2.p5", &assign_UnderexcLimIEEE2_p5); + assign_map.emplace("cim:UnderexcLimIEEE2.p6", &assign_UnderexcLimIEEE2_p6); + assign_map.emplace("cim:UnderexcLimIEEE2.p7", &assign_UnderexcLimIEEE2_p7); + assign_map.emplace("cim:UnderexcLimIEEE2.p8", &assign_UnderexcLimIEEE2_p8); + assign_map.emplace("cim:UnderexcLimIEEE2.p9", &assign_UnderexcLimIEEE2_p9); + assign_map.emplace("cim:UnderexcLimIEEE2.q0", &assign_UnderexcLimIEEE2_q0); + assign_map.emplace("cim:UnderexcLimIEEE2.q1", &assign_UnderexcLimIEEE2_q1); + assign_map.emplace("cim:UnderexcLimIEEE2.q10", &assign_UnderexcLimIEEE2_q10); + assign_map.emplace("cim:UnderexcLimIEEE2.q2", &assign_UnderexcLimIEEE2_q2); + assign_map.emplace("cim:UnderexcLimIEEE2.q3", &assign_UnderexcLimIEEE2_q3); + assign_map.emplace("cim:UnderexcLimIEEE2.q4", &assign_UnderexcLimIEEE2_q4); + assign_map.emplace("cim:UnderexcLimIEEE2.q5", &assign_UnderexcLimIEEE2_q5); + assign_map.emplace("cim:UnderexcLimIEEE2.q6", &assign_UnderexcLimIEEE2_q6); + assign_map.emplace("cim:UnderexcLimIEEE2.q7", &assign_UnderexcLimIEEE2_q7); + assign_map.emplace("cim:UnderexcLimIEEE2.q8", &assign_UnderexcLimIEEE2_q8); + assign_map.emplace("cim:UnderexcLimIEEE2.q9", &assign_UnderexcLimIEEE2_q9); + assign_map.emplace("cim:UnderexcLimIEEE2.tu1", &assign_UnderexcLimIEEE2_tu1); + assign_map.emplace("cim:UnderexcLimIEEE2.tu2", &assign_UnderexcLimIEEE2_tu2); + assign_map.emplace("cim:UnderexcLimIEEE2.tu3", &assign_UnderexcLimIEEE2_tu3); + assign_map.emplace("cim:UnderexcLimIEEE2.tu4", &assign_UnderexcLimIEEE2_tu4); + assign_map.emplace("cim:UnderexcLimIEEE2.tul", &assign_UnderexcLimIEEE2_tul); + assign_map.emplace("cim:UnderexcLimIEEE2.tup", &assign_UnderexcLimIEEE2_tup); + assign_map.emplace("cim:UnderexcLimIEEE2.tuq", &assign_UnderexcLimIEEE2_tuq); + assign_map.emplace("cim:UnderexcLimIEEE2.tuv", &assign_UnderexcLimIEEE2_tuv); + assign_map.emplace("cim:UnderexcLimIEEE2.vuimax", &assign_UnderexcLimIEEE2_vuimax); + assign_map.emplace("cim:UnderexcLimIEEE2.vuimin", &assign_UnderexcLimIEEE2_vuimin); + assign_map.emplace("cim:UnderexcLimIEEE2.vulmax", &assign_UnderexcLimIEEE2_vulmax); + assign_map.emplace("cim:UnderexcLimIEEE2.vulmin", &assign_UnderexcLimIEEE2_vulmin); } void UnderexcLimIEEE2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/UnderexcLimIEEE2.hpp b/CGMES_2.4.15_27JAN2020/UnderexcLimIEEE2.hpp index db393d18a..1a95ced19 100644 --- a/CGMES_2.4.15_27JAN2020/UnderexcLimIEEE2.hpp +++ b/CGMES_2.4.15_27JAN2020/UnderexcLimIEEE2.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents the Type UEL2 which has either a straight-line or multi-segment characteristic when plotted in terms of machine reactive power output vs. real power output. Reference: IEEE UEL2 421.5-2005 Section 10.2. (Limit characteristic lookup table shown in Figure 10.4 (p 32) of the standard). - */ + /** \brief The class represents the Type UEL2 which has either a straight-line or multi-segment characteristic when plotted in terms of machine reactive power output vs. real power output. Reference: IEEE UEL2 421.5-2005 Section 10.2. (Limit characteristic lookup table shown in Figure 10.4 (p 32) of the standard). */ class UnderexcLimIEEE2 : public UnderexcitationLimiterDynamics { public: @@ -29,46 +27,125 @@ namespace CIMPP UnderexcLimIEEE2(); ~UnderexcLimIEEE2() override; - CIMPP::Simple_Float k1; /* UEL terminal voltage exponent applied to real power input to UEL limit look-up table (k1). Typical Value = 2. Default: nullptr */ - CIMPP::Simple_Float k2; /* UEL terminal voltage exponent applied to reactive power output from UEL limit look-up table (k2). Typical Value = 2. Default: nullptr */ - CIMPP::PU kfb; /* Gain associated with optional integrator feedback input signal to UEL (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU kuf; /* UEL excitation system stabilizer gain (K). Typical Value = 0. Default: nullptr */ - CIMPP::PU kui; /* UEL integral gain (K). Typical Value = 0.5. Default: nullptr */ - CIMPP::PU kul; /* UEL proportional gain (K). Typical Value = 0.8. Default: nullptr */ - CIMPP::PU p0; /* Real power values for endpoints (P). Typical Value = 0. Default: nullptr */ - CIMPP::PU p1; /* Real power values for endpoints (P). Typical Value = 0.3. Default: nullptr */ - CIMPP::PU p10; /* Real power values for endpoints (P). Default: nullptr */ - CIMPP::PU p2; /* Real power values for endpoints (P). Typical Value = 0.6. Default: nullptr */ - CIMPP::PU p3; /* Real power values for endpoints (P). Typical Value = 0.9. Default: nullptr */ - CIMPP::PU p4; /* Real power values for endpoints (P). Typical Value = 1.02. Default: nullptr */ - CIMPP::PU p5; /* Real power values for endpoints (P). Default: nullptr */ - CIMPP::PU p6; /* Real power values for endpoints (P). Default: nullptr */ - CIMPP::PU p7; /* Real power values for endpoints (P). Default: nullptr */ - CIMPP::PU p8; /* Real power values for endpoints (P). Default: nullptr */ - CIMPP::PU p9; /* Real power values for endpoints (P). Default: nullptr */ - CIMPP::PU q0; /* Reactive power values for endpoints (Q). Typical Value = -0.31. Default: nullptr */ - CIMPP::PU q1; /* Reactive power values for endpoints (Q). Typical Value = -0.31. Default: nullptr */ - CIMPP::PU q10; /* Reactive power values for endpoints (Q). Default: nullptr */ - CIMPP::PU q2; /* Reactive power values for endpoints (Q). Typical Value = -0.28. Default: nullptr */ - CIMPP::PU q3; /* Reactive power values for endpoints (Q). Typical Value = -0.21. Default: nullptr */ - CIMPP::PU q4; /* Reactive power values for endpoints (Q). Typical Value = 0. Default: nullptr */ - CIMPP::PU q5; /* Reactive power values for endpoints (Q). Default: nullptr */ - CIMPP::PU q6; /* Reactive power values for endpoints (Q). Default: nullptr */ - CIMPP::PU q7; /* Reactive power values for endpoints (Q). Default: nullptr */ - CIMPP::PU q8; /* Reactive power values for endpoints (Q). Default: nullptr */ - CIMPP::PU q9; /* Reactive power values for endpoints (Q). Default: nullptr */ - CIMPP::Seconds tu1; /* UEL lead time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tu2; /* UEL lag time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tu3; /* UEL lead time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tu4; /* UEL lag time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tul; /* Time constant associated with optional integrator feedback input signal to UEL (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tup; /* Real power filter time constant (T). Typical Value = 5. Default: nullptr */ - CIMPP::Seconds tuq; /* Reactive power filter time constant (T). Typical Value = 0. Default: nullptr */ - CIMPP::Seconds tuv; /* Voltage filter time constant (T). Typical Value = 5. Default: nullptr */ - CIMPP::PU vuimax; /* UEL integrator output maximum limit (V). Typical Value = 0.25. Default: nullptr */ - CIMPP::PU vuimin; /* UEL integrator output minimum limit (V). Typical Value = 0. Default: nullptr */ - CIMPP::PU vulmax; /* UEL output maximum limit (V). Typical Value = 0.25. Default: nullptr */ - CIMPP::PU vulmin; /* UEL output minimum limit (V). Typical Value = 0. Default: nullptr */ + /** \brief UEL terminal voltage exponent applied to real power input to UEL limit look-up table (k1). Typical Value = 2. Default: nullptr */ + CIMPP::Simple_Float k1; + + /** \brief UEL terminal voltage exponent applied to reactive power output from UEL limit look-up table (k2). Typical Value = 2. Default: nullptr */ + CIMPP::Simple_Float k2; + + /** \brief Gain associated with optional integrator feedback input signal to UEL (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU kfb; + + /** \brief UEL excitation system stabilizer gain (K). Typical Value = 0. Default: nullptr */ + CIMPP::PU kuf; + + /** \brief UEL integral gain (K). Typical Value = 0.5. Default: nullptr */ + CIMPP::PU kui; + + /** \brief UEL proportional gain (K). Typical Value = 0.8. Default: nullptr */ + CIMPP::PU kul; + + /** \brief Real power values for endpoints (P). Typical Value = 0. Default: nullptr */ + CIMPP::PU p0; + + /** \brief Real power values for endpoints (P). Typical Value = 0.3. Default: nullptr */ + CIMPP::PU p1; + + /** \brief Real power values for endpoints (P). Default: nullptr */ + CIMPP::PU p10; + + /** \brief Real power values for endpoints (P). Typical Value = 0.6. Default: nullptr */ + CIMPP::PU p2; + + /** \brief Real power values for endpoints (P). Typical Value = 0.9. Default: nullptr */ + CIMPP::PU p3; + + /** \brief Real power values for endpoints (P). Typical Value = 1.02. Default: nullptr */ + CIMPP::PU p4; + + /** \brief Real power values for endpoints (P). Default: nullptr */ + CIMPP::PU p5; + + /** \brief Real power values for endpoints (P). Default: nullptr */ + CIMPP::PU p6; + + /** \brief Real power values for endpoints (P). Default: nullptr */ + CIMPP::PU p7; + + /** \brief Real power values for endpoints (P). Default: nullptr */ + CIMPP::PU p8; + + /** \brief Real power values for endpoints (P). Default: nullptr */ + CIMPP::PU p9; + + /** \brief Reactive power values for endpoints (Q). Typical Value = -0.31. Default: nullptr */ + CIMPP::PU q0; + + /** \brief Reactive power values for endpoints (Q). Typical Value = -0.31. Default: nullptr */ + CIMPP::PU q1; + + /** \brief Reactive power values for endpoints (Q). Default: nullptr */ + CIMPP::PU q10; + + /** \brief Reactive power values for endpoints (Q). Typical Value = -0.28. Default: nullptr */ + CIMPP::PU q2; + + /** \brief Reactive power values for endpoints (Q). Typical Value = -0.21. Default: nullptr */ + CIMPP::PU q3; + + /** \brief Reactive power values for endpoints (Q). Typical Value = 0. Default: nullptr */ + CIMPP::PU q4; + + /** \brief Reactive power values for endpoints (Q). Default: nullptr */ + CIMPP::PU q5; + + /** \brief Reactive power values for endpoints (Q). Default: nullptr */ + CIMPP::PU q6; + + /** \brief Reactive power values for endpoints (Q). Default: nullptr */ + CIMPP::PU q7; + + /** \brief Reactive power values for endpoints (Q). Default: nullptr */ + CIMPP::PU q8; + + /** \brief Reactive power values for endpoints (Q). Default: nullptr */ + CIMPP::PU q9; + + /** \brief UEL lead time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tu1; + + /** \brief UEL lag time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tu2; + + /** \brief UEL lead time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tu3; + + /** \brief UEL lag time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tu4; + + /** \brief Time constant associated with optional integrator feedback input signal to UEL (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tul; + + /** \brief Real power filter time constant (T). Typical Value = 5. Default: nullptr */ + CIMPP::Seconds tup; + + /** \brief Reactive power filter time constant (T). Typical Value = 0. Default: nullptr */ + CIMPP::Seconds tuq; + + /** \brief Voltage filter time constant (T). Typical Value = 5. Default: nullptr */ + CIMPP::Seconds tuv; + + /** \brief UEL integrator output maximum limit (V). Typical Value = 0.25. Default: nullptr */ + CIMPP::PU vuimax; + + /** \brief UEL integrator output minimum limit (V). Typical Value = 0. Default: nullptr */ + CIMPP::PU vuimin; + + /** \brief UEL output maximum limit (V). Typical Value = 0.25. Default: nullptr */ + CIMPP::PU vulmax; + + /** \brief UEL output minimum limit (V). Typical Value = 0. Default: nullptr */ + CIMPP::PU vulmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/UnderexcLimX1.cpp b/CGMES_2.4.15_27JAN2020/UnderexcLimX1.cpp index cba09ede6..a14d1ce69 100644 --- a/CGMES_2.4.15_27JAN2020/UnderexcLimX1.cpp +++ b/CGMES_2.4.15_27JAN2020/UnderexcLimX1.cpp @@ -8,17 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -UnderexcLimX1::UnderexcLimX1() {}; -UnderexcLimX1::~UnderexcLimX1() {}; +UnderexcLimX1::UnderexcLimX1() {} +UnderexcLimX1::~UnderexcLimX1() {} static const std::list PossibleProfilesForClass = { @@ -50,90 +44,94 @@ UnderexcLimX1::getPossibleProfilesForAttributes() const return map; } - -bool assign_UnderexcLimX1_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX1_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX1_kf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX1_kf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX1_km(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX1_km(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->km; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX1_melmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX1_melmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->melmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX1_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX1_tf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX1_tm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX1_tm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_UnderexcLimX1_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -147,7 +145,8 @@ bool get_UnderexcLimX1_k(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_UnderexcLimX1_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf2; if (!buffer.str().empty()) @@ -161,7 +160,8 @@ bool get_UnderexcLimX1_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_UnderexcLimX1_km(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->km; if (!buffer.str().empty()) @@ -175,7 +175,8 @@ bool get_UnderexcLimX1_km(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_UnderexcLimX1_melmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->melmax; if (!buffer.str().empty()) @@ -189,7 +190,8 @@ bool get_UnderexcLimX1_melmax(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimX1_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf2; if (!buffer.str().empty()) @@ -203,7 +205,8 @@ bool get_UnderexcLimX1_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_UnderexcLimX1_tm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tm; if (!buffer.str().empty()) @@ -215,8 +218,6 @@ bool get_UnderexcLimX1_tm(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char UnderexcLimX1::debugName[] = "UnderexcLimX1"; const char* UnderexcLimX1::debugString() const { @@ -225,17 +226,17 @@ const char* UnderexcLimX1::debugString() const void UnderexcLimX1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:UnderexcLimX1"), &UnderexcLimX1_factory)); + factory_map.emplace("cim:UnderexcLimX1", &UnderexcLimX1_factory); } void UnderexcLimX1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX1.k"), &assign_UnderexcLimX1_k)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX1.kf2"), &assign_UnderexcLimX1_kf2)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX1.km"), &assign_UnderexcLimX1_km)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX1.melmax"), &assign_UnderexcLimX1_melmax)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX1.tf2"), &assign_UnderexcLimX1_tf2)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX1.tm"), &assign_UnderexcLimX1_tm)); + assign_map.emplace("cim:UnderexcLimX1.k", &assign_UnderexcLimX1_k); + assign_map.emplace("cim:UnderexcLimX1.kf2", &assign_UnderexcLimX1_kf2); + assign_map.emplace("cim:UnderexcLimX1.km", &assign_UnderexcLimX1_km); + assign_map.emplace("cim:UnderexcLimX1.melmax", &assign_UnderexcLimX1_melmax); + assign_map.emplace("cim:UnderexcLimX1.tf2", &assign_UnderexcLimX1_tf2); + assign_map.emplace("cim:UnderexcLimX1.tm", &assign_UnderexcLimX1_tm); } void UnderexcLimX1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/UnderexcLimX1.hpp b/CGMES_2.4.15_27JAN2020/UnderexcLimX1.hpp index 44648be8c..cd15dda37 100644 --- a/CGMES_2.4.15_27JAN2020/UnderexcLimX1.hpp +++ b/CGMES_2.4.15_27JAN2020/UnderexcLimX1.hpp @@ -25,12 +25,23 @@ namespace CIMPP UnderexcLimX1(); ~UnderexcLimX1() override; - CIMPP::PU k; /* Minimum excitation limit slope (K) (>0). Default: nullptr */ - CIMPP::PU kf2; /* Differential gain (Kf2). Default: nullptr */ - CIMPP::PU km; /* Minimum excitation limit gain (Km). Default: nullptr */ - CIMPP::PU melmax; /* Minimum excitation limit value (MELMAX). Default: nullptr */ - CIMPP::Seconds tf2; /* Differential time constant (Tf2) (>0). Default: nullptr */ - CIMPP::Seconds tm; /* Minimum excitation limit time constant (Tm). Default: nullptr */ + /** \brief Minimum excitation limit slope (K) (>0). Default: nullptr */ + CIMPP::PU k; + + /** \brief Differential gain (Kf2). Default: nullptr */ + CIMPP::PU kf2; + + /** \brief Minimum excitation limit gain (Km). Default: nullptr */ + CIMPP::PU km; + + /** \brief Minimum excitation limit value (MELMAX). Default: nullptr */ + CIMPP::PU melmax; + + /** \brief Differential time constant (Tf2) (>0). Default: nullptr */ + CIMPP::Seconds tf2; + + /** \brief Minimum excitation limit time constant (Tm). Default: nullptr */ + CIMPP::Seconds tm; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/UnderexcLimX2.cpp b/CGMES_2.4.15_27JAN2020/UnderexcLimX2.cpp index 31ded8424..64bf7f3c5 100644 --- a/CGMES_2.4.15_27JAN2020/UnderexcLimX2.cpp +++ b/CGMES_2.4.15_27JAN2020/UnderexcLimX2.cpp @@ -8,18 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -UnderexcLimX2::UnderexcLimX2() {}; -UnderexcLimX2::~UnderexcLimX2() {}; +UnderexcLimX2::UnderexcLimX2() {} +UnderexcLimX2::~UnderexcLimX2() {} static const std::list PossibleProfilesForClass = { @@ -52,103 +45,108 @@ UnderexcLimX2::getPossibleProfilesForAttributes() const return map; } - -bool assign_UnderexcLimX2_kf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX2_kf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX2_km(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX2_km(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->km; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX2_melmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX2_melmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->melmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX2_qo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX2_qo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX2_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX2_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX2_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX2_tf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX2_tm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX2_tm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_UnderexcLimX2_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf2; if (!buffer.str().empty()) @@ -162,7 +160,8 @@ bool get_UnderexcLimX2_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_UnderexcLimX2_km(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->km; if (!buffer.str().empty()) @@ -176,7 +175,8 @@ bool get_UnderexcLimX2_km(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_UnderexcLimX2_melmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->melmax; if (!buffer.str().empty()) @@ -190,7 +190,8 @@ bool get_UnderexcLimX2_melmax(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimX2_qo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qo; if (!buffer.str().empty()) @@ -204,7 +205,8 @@ bool get_UnderexcLimX2_qo(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_UnderexcLimX2_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -218,7 +220,8 @@ bool get_UnderexcLimX2_r(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_UnderexcLimX2_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf2; if (!buffer.str().empty()) @@ -232,7 +235,8 @@ bool get_UnderexcLimX2_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_UnderexcLimX2_tm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tm; if (!buffer.str().empty()) @@ -244,8 +248,6 @@ bool get_UnderexcLimX2_tm(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char UnderexcLimX2::debugName[] = "UnderexcLimX2"; const char* UnderexcLimX2::debugString() const { @@ -254,18 +256,18 @@ const char* UnderexcLimX2::debugString() const void UnderexcLimX2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:UnderexcLimX2"), &UnderexcLimX2_factory)); + factory_map.emplace("cim:UnderexcLimX2", &UnderexcLimX2_factory); } void UnderexcLimX2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX2.kf2"), &assign_UnderexcLimX2_kf2)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX2.km"), &assign_UnderexcLimX2_km)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX2.melmax"), &assign_UnderexcLimX2_melmax)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX2.qo"), &assign_UnderexcLimX2_qo)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX2.r"), &assign_UnderexcLimX2_r)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX2.tf2"), &assign_UnderexcLimX2_tf2)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX2.tm"), &assign_UnderexcLimX2_tm)); + assign_map.emplace("cim:UnderexcLimX2.kf2", &assign_UnderexcLimX2_kf2); + assign_map.emplace("cim:UnderexcLimX2.km", &assign_UnderexcLimX2_km); + assign_map.emplace("cim:UnderexcLimX2.melmax", &assign_UnderexcLimX2_melmax); + assign_map.emplace("cim:UnderexcLimX2.qo", &assign_UnderexcLimX2_qo); + assign_map.emplace("cim:UnderexcLimX2.r", &assign_UnderexcLimX2_r); + assign_map.emplace("cim:UnderexcLimX2.tf2", &assign_UnderexcLimX2_tf2); + assign_map.emplace("cim:UnderexcLimX2.tm", &assign_UnderexcLimX2_tm); } void UnderexcLimX2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/UnderexcLimX2.hpp b/CGMES_2.4.15_27JAN2020/UnderexcLimX2.hpp index f1f3ce17b..43f2bfa49 100644 --- a/CGMES_2.4.15_27JAN2020/UnderexcLimX2.hpp +++ b/CGMES_2.4.15_27JAN2020/UnderexcLimX2.hpp @@ -25,13 +25,26 @@ namespace CIMPP UnderexcLimX2(); ~UnderexcLimX2() override; - CIMPP::PU kf2; /* Differential gain (Kf2). Default: nullptr */ - CIMPP::PU km; /* Minimum excitation limit gain (Km). Default: nullptr */ - CIMPP::PU melmax; /* Minimum excitation limit value (MELMAX). Default: nullptr */ - CIMPP::PU qo; /* Excitation center setting (Qo). Default: nullptr */ - CIMPP::PU r; /* Excitation radius (R). Default: nullptr */ - CIMPP::Seconds tf2; /* Differential time constant (Tf2) (>0). Default: nullptr */ - CIMPP::Seconds tm; /* Minimum excitation limit time constant (Tm). Default: nullptr */ + /** \brief Differential gain (Kf2). Default: nullptr */ + CIMPP::PU kf2; + + /** \brief Minimum excitation limit gain (Km). Default: nullptr */ + CIMPP::PU km; + + /** \brief Minimum excitation limit value (MELMAX). Default: nullptr */ + CIMPP::PU melmax; + + /** \brief Excitation center setting (Qo). Default: nullptr */ + CIMPP::PU qo; + + /** \brief Excitation radius (R). Default: nullptr */ + CIMPP::PU r; + + /** \brief Differential time constant (Tf2) (>0). Default: nullptr */ + CIMPP::Seconds tf2; + + /** \brief Minimum excitation limit time constant (Tm). Default: nullptr */ + CIMPP::Seconds tm; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/UnderexcitationLimiterDynamics.cpp b/CGMES_2.4.15_27JAN2020/UnderexcitationLimiterDynamics.cpp index 9d024e743..18ef7b3ec 100644 --- a/CGMES_2.4.15_27JAN2020/UnderexcitationLimiterDynamics.cpp +++ b/CGMES_2.4.15_27JAN2020/UnderexcitationLimiterDynamics.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -UnderexcitationLimiterDynamics::UnderexcitationLimiterDynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr) {}; -UnderexcitationLimiterDynamics::~UnderexcitationLimiterDynamics() {}; +UnderexcitationLimiterDynamics::UnderexcitationLimiterDynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr) {} +UnderexcitationLimiterDynamics::~UnderexcitationLimiterDynamics() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ UnderexcitationLimiterDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_ExcitationSystemDynamics_UnderexcitationLimiterDynamics(BaseClass*, BaseClass*); bool assign_UnderexcitationLimiterDynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_UnderexcitationLimiterDynamics_ExcitationSystemDynamics(BaseClass* B } return false; } + bool assign_RemoteInputSignal_UnderexcitationLimiterDynamics(BaseClass*, BaseClass*); bool assign_UnderexcitationLimiterDynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_UnderexcitationLimiterDynamics_RemoteInputSignal(BaseClass* BaseClas return false; } - bool get_UnderexcitationLimiterDynamics_ExcitationSystemDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const UnderexcitationLimiterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcitationLimiterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ExcitationSystemDynamics != 0) { @@ -100,7 +99,7 @@ const char* UnderexcitationLimiterDynamics::debugString() const void UnderexcitationLimiterDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:UnderexcitationLimiterDynamics"), &UnderexcitationLimiterDynamics_factory)); + factory_map.emplace("cim:UnderexcitationLimiterDynamics", &UnderexcitationLimiterDynamics_factory); } void UnderexcitationLimiterDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -109,8 +108,8 @@ void UnderexcitationLimiterDynamics::addPrimitiveAssignFnsToMap(std::unordered_m void UnderexcitationLimiterDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:UnderexcitationLimiterDynamics.ExcitationSystemDynamics"), &assign_UnderexcitationLimiterDynamics_ExcitationSystemDynamics)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcitationLimiterDynamics.RemoteInputSignal"), &assign_UnderexcitationLimiterDynamics_RemoteInputSignal)); + assign_map.emplace("cim:UnderexcitationLimiterDynamics.ExcitationSystemDynamics", &assign_UnderexcitationLimiterDynamics_ExcitationSystemDynamics); + assign_map.emplace("cim:UnderexcitationLimiterDynamics.RemoteInputSignal", &assign_UnderexcitationLimiterDynamics_RemoteInputSignal); } void UnderexcitationLimiterDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/UnderexcitationLimiterDynamics.hpp b/CGMES_2.4.15_27JAN2020/UnderexcitationLimiterDynamics.hpp index cbb670151..3836bf4cc 100644 --- a/CGMES_2.4.15_27JAN2020/UnderexcitationLimiterDynamics.hpp +++ b/CGMES_2.4.15_27JAN2020/UnderexcitationLimiterDynamics.hpp @@ -18,9 +18,7 @@ namespace CIMPP class ExcitationSystemDynamics; class RemoteInputSignal; - /* - Underexcitation limiter function block whose behaviour is described by reference to a standard model - */ + /** \brief Underexcitation limiter function block whose behaviour is described by reference to a standard model */ class UnderexcitationLimiterDynamics : public DynamicsFunctionBlock { public: @@ -28,8 +26,11 @@ namespace CIMPP UnderexcitationLimiterDynamics(); ~UnderexcitationLimiterDynamics() override; - CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; /* Excitation system model with which this underexcitation limiter model is associated. Default: 0 */ - CIMPP::RemoteInputSignal* RemoteInputSignal; /* Remote input signal used by this underexcitation limiter model. Default: 0 */ + /** \brief Excitation system model with which this underexcitation limiter model is associated. Default: 0 */ + CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; + + /** \brief Remote input signal used by this underexcitation limiter model. Default: 0 */ + CIMPP::RemoteInputSignal* RemoteInputSignal; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/UnderexcitationLimiterUserDefined.cpp b/CGMES_2.4.15_27JAN2020/UnderexcitationLimiterUserDefined.cpp index 87727bcc9..fb5ad61c2 100644 --- a/CGMES_2.4.15_27JAN2020/UnderexcitationLimiterUserDefined.cpp +++ b/CGMES_2.4.15_27JAN2020/UnderexcitationLimiterUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -UnderexcitationLimiterUserDefined::UnderexcitationLimiterUserDefined() {}; -UnderexcitationLimiterUserDefined::~UnderexcitationLimiterUserDefined() {}; +UnderexcitationLimiterUserDefined::UnderexcitationLimiterUserDefined() {} +UnderexcitationLimiterUserDefined::~UnderexcitationLimiterUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ UnderexcitationLimiterUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_UnderexcitationLimiterUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (UnderexcitationLimiterUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_UnderexcitationLimiterUserDefined(BaseClass*, BaseClass*); bool assign_UnderexcitationLimiterUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_UnderexcitationLimiterUserDefined_ProprietaryParameterDynamics(BaseC return false; } +bool assign_UnderexcitationLimiterUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + UnderexcitationLimiterUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_UnderexcitationLimiterUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcitationLimiterUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcitationLimiterUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_UnderexcitationLimiterUserDefined_proprietary(const BaseClass* BaseClas return false; } - - const char UnderexcitationLimiterUserDefined::debugName[] = "UnderexcitationLimiterUserDefined"; const char* UnderexcitationLimiterUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* UnderexcitationLimiterUserDefined::debugString() const void UnderexcitationLimiterUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:UnderexcitationLimiterUserDefined"), &UnderexcitationLimiterUserDefined_factory)); + factory_map.emplace("cim:UnderexcitationLimiterUserDefined", &UnderexcitationLimiterUserDefined_factory); } void UnderexcitationLimiterUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:UnderexcitationLimiterUserDefined.proprietary"), &assign_UnderexcitationLimiterUserDefined_proprietary)); + assign_map.emplace("cim:UnderexcitationLimiterUserDefined.proprietary", &assign_UnderexcitationLimiterUserDefined_proprietary); } void UnderexcitationLimiterUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:UnderexcitationLimiterUserDefined.ProprietaryParameterDynamics"), &assign_UnderexcitationLimiterUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:UnderexcitationLimiterUserDefined.ProprietaryParameterDynamics", &assign_UnderexcitationLimiterUserDefined_ProprietaryParameterDynamics); } void UnderexcitationLimiterUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/UnderexcitationLimiterUserDefined.hpp b/CGMES_2.4.15_27JAN2020/UnderexcitationLimiterUserDefined.hpp index 4e7c237b2..5971269bc 100644 --- a/CGMES_2.4.15_27JAN2020/UnderexcitationLimiterUserDefined.hpp +++ b/CGMES_2.4.15_27JAN2020/UnderexcitationLimiterUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Underexcitation limiter function block whose dynamic behaviour is described by - */ + /** \brief Underexcitation limiter function block whose dynamic behaviour is described by */ class UnderexcitationLimiterUserDefined : public UnderexcitationLimiterDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP UnderexcitationLimiterUserDefined(); ~UnderexcitationLimiterUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/UnitMultiplier.cpp b/CGMES_2.4.15_27JAN2020/UnitMultiplier.cpp index 51e68a621..8bfba0220 100644 --- a/CGMES_2.4.15_27JAN2020/UnitMultiplier.cpp +++ b/CGMES_2.4.15_27JAN2020/UnitMultiplier.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "UnitMultiplier") + if (EnumSymbol.substr(0, pos) != "UnitMultiplier") { lop.setstate(std::ios::failbit); return lop; @@ -50,57 +50,57 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "p") + if (EnumSymbol == "p") { rop = UnitMultiplier::p; return lop; } - if(EnumSymbol == "n") + if (EnumSymbol == "n") { rop = UnitMultiplier::n; return lop; } - if(EnumSymbol == "micro") + if (EnumSymbol == "micro") { rop = UnitMultiplier::micro; return lop; } - if(EnumSymbol == "m") + if (EnumSymbol == "m") { rop = UnitMultiplier::m; return lop; } - if(EnumSymbol == "c") + if (EnumSymbol == "c") { rop = UnitMultiplier::c; return lop; } - if(EnumSymbol == "d") + if (EnumSymbol == "d") { rop = UnitMultiplier::d; return lop; } - if(EnumSymbol == "k") + if (EnumSymbol == "k") { rop = UnitMultiplier::k; return lop; } - if(EnumSymbol == "M") + if (EnumSymbol == "M") { rop = UnitMultiplier::M; return lop; } - if(EnumSymbol == "G") + if (EnumSymbol == "G") { rop = UnitMultiplier::G; return lop; } - if(EnumSymbol == "T") + if (EnumSymbol == "T") { rop = UnitMultiplier::T; return lop; } - if(EnumSymbol == "none") + if (EnumSymbol == "none") { rop = UnitMultiplier::none; return lop; diff --git a/CGMES_2.4.15_27JAN2020/UnitMultiplier.hpp b/CGMES_2.4.15_27JAN2020/UnitMultiplier.hpp index 710c6f153..622b2d589 100644 --- a/CGMES_2.4.15_27JAN2020/UnitMultiplier.hpp +++ b/CGMES_2.4.15_27JAN2020/UnitMultiplier.hpp @@ -9,57 +9,33 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The unit multipliers defined for the CIM. - */ + /** \brief The unit multipliers defined for the CIM. */ class UnitMultiplier { public: enum UnitMultiplier_ENUM { - /** - * Pico 10**-12. - */ + /** Pico 10**-12. */ p, - /** - * Nano 10**-9. - */ + /** Nano 10**-9. */ n, - /** - * Micro 10**-6. - */ + /** Micro 10**-6. */ micro, - /** - * Milli 10**-3. - */ + /** Milli 10**-3. */ m, - /** - * Centi 10**-2. - */ + /** Centi 10**-2. */ c, - /** - * Deci 10**-1. - */ + /** Deci 10**-1. */ d, - /** - * Kilo 10**3. - */ + /** Kilo 10**3. */ k, - /** - * Mega 10**6. - */ + /** Mega 10**6. */ M, - /** - * Giga 10**9. - */ + /** Giga 10**9. */ G, - /** - * Tera 10**12. - */ + /** Tera 10**12. */ T, - /** - * No multiplier or equivalently multiply by 1. - */ + /** No multiplier or equivalently multiply by 1. */ none, }; diff --git a/CGMES_2.4.15_27JAN2020/UnitSymbol.cpp b/CGMES_2.4.15_27JAN2020/UnitSymbol.cpp index 8812cdffb..92f259356 100644 --- a/CGMES_2.4.15_27JAN2020/UnitSymbol.cpp +++ b/CGMES_2.4.15_27JAN2020/UnitSymbol.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "UnitSymbol") + if (EnumSymbol.substr(0, pos) != "UnitSymbol") { lop.setstate(std::ios::failbit); return lop; @@ -50,137 +50,137 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "VA") + if (EnumSymbol == "VA") { rop = UnitSymbol::VA; return lop; } - if(EnumSymbol == "W") + if (EnumSymbol == "W") { rop = UnitSymbol::W; return lop; } - if(EnumSymbol == "VAr") + if (EnumSymbol == "VAr") { rop = UnitSymbol::VAr; return lop; } - if(EnumSymbol == "VAh") + if (EnumSymbol == "VAh") { rop = UnitSymbol::VAh; return lop; } - if(EnumSymbol == "Wh") + if (EnumSymbol == "Wh") { rop = UnitSymbol::Wh; return lop; } - if(EnumSymbol == "VArh") + if (EnumSymbol == "VArh") { rop = UnitSymbol::VArh; return lop; } - if(EnumSymbol == "V") + if (EnumSymbol == "V") { rop = UnitSymbol::V; return lop; } - if(EnumSymbol == "ohm") + if (EnumSymbol == "ohm") { rop = UnitSymbol::ohm; return lop; } - if(EnumSymbol == "A") + if (EnumSymbol == "A") { rop = UnitSymbol::A; return lop; } - if(EnumSymbol == "F") + if (EnumSymbol == "F") { rop = UnitSymbol::F; return lop; } - if(EnumSymbol == "H") + if (EnumSymbol == "H") { rop = UnitSymbol::H; return lop; } - if(EnumSymbol == "degC") + if (EnumSymbol == "degC") { rop = UnitSymbol::degC; return lop; } - if(EnumSymbol == "s") + if (EnumSymbol == "s") { rop = UnitSymbol::s; return lop; } - if(EnumSymbol == "min") + if (EnumSymbol == "min") { rop = UnitSymbol::min; return lop; } - if(EnumSymbol == "h") + if (EnumSymbol == "h") { rop = UnitSymbol::h; return lop; } - if(EnumSymbol == "deg") + if (EnumSymbol == "deg") { rop = UnitSymbol::deg; return lop; } - if(EnumSymbol == "rad") + if (EnumSymbol == "rad") { rop = UnitSymbol::rad; return lop; } - if(EnumSymbol == "J") + if (EnumSymbol == "J") { rop = UnitSymbol::J; return lop; } - if(EnumSymbol == "N") + if (EnumSymbol == "N") { rop = UnitSymbol::N; return lop; } - if(EnumSymbol == "S") + if (EnumSymbol == "S") { rop = UnitSymbol::S; return lop; } - if(EnumSymbol == "none") + if (EnumSymbol == "none") { rop = UnitSymbol::none; return lop; } - if(EnumSymbol == "Hz") + if (EnumSymbol == "Hz") { rop = UnitSymbol::Hz; return lop; } - if(EnumSymbol == "g") + if (EnumSymbol == "g") { rop = UnitSymbol::g; return lop; } - if(EnumSymbol == "Pa") + if (EnumSymbol == "Pa") { rop = UnitSymbol::Pa; return lop; } - if(EnumSymbol == "m") + if (EnumSymbol == "m") { rop = UnitSymbol::m; return lop; } - if(EnumSymbol == "m2") + if (EnumSymbol == "m2") { rop = UnitSymbol::m2; return lop; } - if(EnumSymbol == "m3") + if (EnumSymbol == "m3") { rop = UnitSymbol::m3; return lop; diff --git a/CGMES_2.4.15_27JAN2020/UnitSymbol.hpp b/CGMES_2.4.15_27JAN2020/UnitSymbol.hpp index b63a20465..6cf87bb05 100644 --- a/CGMES_2.4.15_27JAN2020/UnitSymbol.hpp +++ b/CGMES_2.4.15_27JAN2020/UnitSymbol.hpp @@ -9,121 +9,65 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The units defined for usage in the CIM. - */ + /** \brief The units defined for usage in the CIM. */ class UnitSymbol { public: enum UnitSymbol_ENUM { - /** - * Apparent power in volt ampere. - */ + /** Apparent power in volt ampere. */ VA, - /** - * Active power in watt. - */ + /** Active power in watt. */ W, - /** - * Reactive power in volt ampere reactive. - */ + /** Reactive power in volt ampere reactive. */ VAr, - /** - * Apparent energy in volt ampere hours. - */ + /** Apparent energy in volt ampere hours. */ VAh, - /** - * Real energy in what hours. - */ + /** Real energy in what hours. */ Wh, - /** - * Reactive energy in volt ampere reactive hours. - */ + /** Reactive energy in volt ampere reactive hours. */ VArh, - /** - * Voltage in volt. - */ + /** Voltage in volt. */ V, - /** - * Resistance in ohm. - */ + /** Resistance in ohm. */ ohm, - /** - * Current in ampere. - */ + /** Current in ampere. */ A, - /** - * Capacitance in farad. - */ + /** Capacitance in farad. */ F, - /** - * Inductance in henry. - */ + /** Inductance in henry. */ H, - /** - * Relative temperature in degrees Celsius. In the SI unit system the symbol is [SYMBOL REMOVED]C. Electric charge is measured in coulomb that has the unit symbol C. To distinguish degree Celsius form coulomb the symbol used in the UML is degC. Reason for not using [SYMBOL REMOVED]C is the special character [SYMBOL REMOVED] is difficult to manage in software. - */ + /** Relative temperature in degrees Celsius. In the SI unit system the symbol is [SYMBOL REMOVED]C. Electric charge is measured in coulomb that has the unit symbol C. To distinguish degree Celsius form coulomb the symbol used in the UML is degC. Reason for not using [SYMBOL REMOVED]C is the special character [SYMBOL REMOVED] is difficult to manage in software. */ degC, - /** - * Time in seconds. - */ + /** Time in seconds. */ s, - /** - * Time in minutes. - */ + /** Time in minutes. */ min, - /** - * Time in hours. - */ + /** Time in hours. */ h, - /** - * Plane angle in degrees. - */ + /** Plane angle in degrees. */ deg, - /** - * Plane angle in radians. - */ + /** Plane angle in radians. */ rad, - /** - * Energy in joule. - */ + /** Energy in joule. */ J, - /** - * Force in newton. - */ + /** Force in newton. */ N, - /** - * Conductance in siemens. - */ + /** Conductance in siemens. */ S, - /** - * Dimension less quantity, e.g. count, per unit, etc. - */ + /** Dimension less quantity, e.g. count, per unit, etc. */ none, - /** - * Frequency in hertz. - */ + /** Frequency in hertz. */ Hz, - /** - * Mass in gram. - */ + /** Mass in gram. */ g, - /** - * Pressure in pascal (n/m2). - */ + /** Pressure in pascal (n/m2). */ Pa, - /** - * Length in meter. - */ + /** Length in meter. */ m, - /** - * Area in square meters. - */ + /** Area in square meters. */ m2, - /** - * Volume in cubic meters. - */ + /** Volume in cubic meters. */ m3, }; diff --git a/CGMES_2.4.15_27JAN2020/VAdjIEEE.cpp b/CGMES_2.4.15_27JAN2020/VAdjIEEE.cpp index b5043b34b..f62f88f4f 100644 --- a/CGMES_2.4.15_27JAN2020/VAdjIEEE.cpp +++ b/CGMES_2.4.15_27JAN2020/VAdjIEEE.cpp @@ -8,17 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -VAdjIEEE::VAdjIEEE() {}; -VAdjIEEE::~VAdjIEEE() {}; +VAdjIEEE::VAdjIEEE() {} +VAdjIEEE::~VAdjIEEE() {} static const std::list PossibleProfilesForClass = { @@ -50,90 +44,94 @@ VAdjIEEE::getPossibleProfilesForAttributes() const return map; } - -bool assign_VAdjIEEE_adjslew(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VAdjIEEE_adjslew(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->adjslew; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VAdjIEEE_taoff(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VAdjIEEE_taoff(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->taoff; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VAdjIEEE_taon(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VAdjIEEE_taon(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->taon; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VAdjIEEE_vadjf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VAdjIEEE_vadjf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vadjf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VAdjIEEE_vadjmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VAdjIEEE_vadjmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vadjmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VAdjIEEE_vadjmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VAdjIEEE_vadjmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vadjmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_VAdjIEEE_adjslew(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->adjslew; if (!buffer.str().empty()) @@ -147,7 +145,8 @@ bool get_VAdjIEEE_adjslew(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_VAdjIEEE_taoff(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->taoff; if (!buffer.str().empty()) @@ -161,7 +160,8 @@ bool get_VAdjIEEE_taoff(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_VAdjIEEE_taon(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->taon; if (!buffer.str().empty()) @@ -175,7 +175,8 @@ bool get_VAdjIEEE_taon(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_VAdjIEEE_vadjf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vadjf; if (!buffer.str().empty()) @@ -189,7 +190,8 @@ bool get_VAdjIEEE_vadjf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_VAdjIEEE_vadjmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vadjmax; if (!buffer.str().empty()) @@ -203,7 +205,8 @@ bool get_VAdjIEEE_vadjmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_VAdjIEEE_vadjmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vadjmin; if (!buffer.str().empty()) @@ -215,8 +218,6 @@ bool get_VAdjIEEE_vadjmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char VAdjIEEE::debugName[] = "VAdjIEEE"; const char* VAdjIEEE::debugString() const { @@ -225,17 +226,17 @@ const char* VAdjIEEE::debugString() const void VAdjIEEE::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VAdjIEEE"), &VAdjIEEE_factory)); + factory_map.emplace("cim:VAdjIEEE", &VAdjIEEE_factory); } void VAdjIEEE::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VAdjIEEE.adjslew"), &assign_VAdjIEEE_adjslew)); - assign_map.insert(std::make_pair(std::string("cim:VAdjIEEE.taoff"), &assign_VAdjIEEE_taoff)); - assign_map.insert(std::make_pair(std::string("cim:VAdjIEEE.taon"), &assign_VAdjIEEE_taon)); - assign_map.insert(std::make_pair(std::string("cim:VAdjIEEE.vadjf"), &assign_VAdjIEEE_vadjf)); - assign_map.insert(std::make_pair(std::string("cim:VAdjIEEE.vadjmax"), &assign_VAdjIEEE_vadjmax)); - assign_map.insert(std::make_pair(std::string("cim:VAdjIEEE.vadjmin"), &assign_VAdjIEEE_vadjmin)); + assign_map.emplace("cim:VAdjIEEE.adjslew", &assign_VAdjIEEE_adjslew); + assign_map.emplace("cim:VAdjIEEE.taoff", &assign_VAdjIEEE_taoff); + assign_map.emplace("cim:VAdjIEEE.taon", &assign_VAdjIEEE_taon); + assign_map.emplace("cim:VAdjIEEE.vadjf", &assign_VAdjIEEE_vadjf); + assign_map.emplace("cim:VAdjIEEE.vadjmax", &assign_VAdjIEEE_vadjmax); + assign_map.emplace("cim:VAdjIEEE.vadjmin", &assign_VAdjIEEE_vadjmin); } void VAdjIEEE::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/VAdjIEEE.hpp b/CGMES_2.4.15_27JAN2020/VAdjIEEE.hpp index 747098fe2..8ada8dfb7 100644 --- a/CGMES_2.4.15_27JAN2020/VAdjIEEE.hpp +++ b/CGMES_2.4.15_27JAN2020/VAdjIEEE.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents IEEE Voltage Adjuster which is used to represent the voltage adjuster in either a power factor or var control system. Reference: IEEE Standard 421.5-2005 Section 11.1. - */ + /** \brief The class represents IEEE Voltage Adjuster which is used to represent the voltage adjuster in either a power factor or var control system. Reference: IEEE Standard 421.5-2005 Section 11.1. */ class VAdjIEEE : public VoltageAdjusterDynamics { public: @@ -29,12 +27,23 @@ namespace CIMPP VAdjIEEE(); ~VAdjIEEE() override; - CIMPP::Simple_Float adjslew; /* Rate at which output of adjuster changes (). Unit = sec./PU. Typical Value = 300. Default: nullptr */ - CIMPP::Seconds taoff; /* Time that adjuster pulses are off (). Typical Value = 0.5. Default: nullptr */ - CIMPP::Seconds taon; /* Time that adjuster pulses are on (). Typical Value = 0.1. Default: nullptr */ - CIMPP::Simple_Float vadjf; /* Set high to provide a continuous raise or lower (). Default: nullptr */ - CIMPP::PU vadjmax; /* Maximum output of the adjuster (). Typical Value = 1.1. Default: nullptr */ - CIMPP::PU vadjmin; /* Minimum output of the adjuster (). Typical Value = 0.9. Default: nullptr */ + /** \brief Rate at which output of adjuster changes (). Unit = sec./PU. Typical Value = 300. Default: nullptr */ + CIMPP::Simple_Float adjslew; + + /** \brief Time that adjuster pulses are off (). Typical Value = 0.5. Default: nullptr */ + CIMPP::Seconds taoff; + + /** \brief Time that adjuster pulses are on (). Typical Value = 0.1. Default: nullptr */ + CIMPP::Seconds taon; + + /** \brief Set high to provide a continuous raise or lower (). Default: nullptr */ + CIMPP::Simple_Float vadjf; + + /** \brief Maximum output of the adjuster (). Typical Value = 1.1. Default: nullptr */ + CIMPP::PU vadjmax; + + /** \brief Minimum output of the adjuster (). Typical Value = 0.9. Default: nullptr */ + CIMPP::PU vadjmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/VCompIEEEType1.cpp b/CGMES_2.4.15_27JAN2020/VCompIEEEType1.cpp index c229ab6cb..92cbabebb 100644 --- a/CGMES_2.4.15_27JAN2020/VCompIEEEType1.cpp +++ b/CGMES_2.4.15_27JAN2020/VCompIEEEType1.cpp @@ -8,14 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "Seconds.hpp" -#include "PU.hpp" using namespace CIMPP; -VCompIEEEType1::VCompIEEEType1() {}; -VCompIEEEType1::~VCompIEEEType1() {}; +VCompIEEEType1::VCompIEEEType1() {} +VCompIEEEType1::~VCompIEEEType1() {} static const std::list PossibleProfilesForClass = { @@ -44,51 +41,52 @@ VCompIEEEType1::getPossibleProfilesForAttributes() const return map; } - -bool assign_VCompIEEEType1_rc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VCompIEEEType1_rc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1)) + VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VCompIEEEType1_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VCompIEEEType1_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1)) + VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VCompIEEEType1_xc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VCompIEEEType1_xc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1)) + VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_VCompIEEEType1_rc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1)) + const VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rc; if (!buffer.str().empty()) @@ -102,7 +100,8 @@ bool get_VCompIEEEType1_rc(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_VCompIEEEType1_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1)) + const VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -116,7 +115,8 @@ bool get_VCompIEEEType1_tr(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_VCompIEEEType1_xc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1)) + const VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xc; if (!buffer.str().empty()) @@ -128,8 +128,6 @@ bool get_VCompIEEEType1_xc(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char VCompIEEEType1::debugName[] = "VCompIEEEType1"; const char* VCompIEEEType1::debugString() const { @@ -138,14 +136,14 @@ const char* VCompIEEEType1::debugString() const void VCompIEEEType1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VCompIEEEType1"), &VCompIEEEType1_factory)); + factory_map.emplace("cim:VCompIEEEType1", &VCompIEEEType1_factory); } void VCompIEEEType1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VCompIEEEType1.rc"), &assign_VCompIEEEType1_rc)); - assign_map.insert(std::make_pair(std::string("cim:VCompIEEEType1.tr"), &assign_VCompIEEEType1_tr)); - assign_map.insert(std::make_pair(std::string("cim:VCompIEEEType1.xc"), &assign_VCompIEEEType1_xc)); + assign_map.emplace("cim:VCompIEEEType1.rc", &assign_VCompIEEEType1_rc); + assign_map.emplace("cim:VCompIEEEType1.tr", &assign_VCompIEEEType1_tr); + assign_map.emplace("cim:VCompIEEEType1.xc", &assign_VCompIEEEType1_xc); } void VCompIEEEType1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/VCompIEEEType1.hpp b/CGMES_2.4.15_27JAN2020/VCompIEEEType1.hpp index 520521f70..d5232a748 100644 --- a/CGMES_2.4.15_27JAN2020/VCompIEEEType1.hpp +++ b/CGMES_2.4.15_27JAN2020/VCompIEEEType1.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Reference: IEEE Standard 421.5-2005 Section 4. - */ + /** \brief Reference: IEEE Standard 421.5-2005 Section 4. */ class VCompIEEEType1 : public VoltageCompensatorDynamics { public: @@ -28,9 +26,14 @@ namespace CIMPP VCompIEEEType1(); ~VCompIEEEType1() override; - CIMPP::PU rc; /* Default: nullptr */ - CIMPP::Seconds tr; /* Default: nullptr */ - CIMPP::PU xc; /* Default: nullptr */ + /** \brief Default: nullptr */ + CIMPP::PU rc; + + /** \brief Default: nullptr */ + CIMPP::Seconds tr; + + /** \brief Default: nullptr */ + CIMPP::PU xc; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/VCompIEEEType2.cpp b/CGMES_2.4.15_27JAN2020/VCompIEEEType2.cpp index 9317fd9a8..1377d7b30 100644 --- a/CGMES_2.4.15_27JAN2020/VCompIEEEType2.cpp +++ b/CGMES_2.4.15_27JAN2020/VCompIEEEType2.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "GenICompensationForGenJ.hpp" -#include "Seconds.hpp" using namespace CIMPP; -VCompIEEEType2::VCompIEEEType2() {}; -VCompIEEEType2::~VCompIEEEType2() {}; +VCompIEEEType2::VCompIEEEType2() {} +VCompIEEEType2::~VCompIEEEType2() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ VCompIEEEType2::getPossibleProfilesForAttributes() const return map; } - -bool assign_VCompIEEEType2_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (VCompIEEEType2* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->tr; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_GenICompensationForGenJ_VcompIEEEType2(BaseClass*, BaseClass*); bool assign_VCompIEEEType2_GenICompensationForGenJ(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_VCompIEEEType2_GenICompensationForGenJ(BaseClass* BaseClass_ptr1, Ba return false; } +bool assign_VCompIEEEType2_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + VCompIEEEType2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->tr; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_VCompIEEEType2_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VCompIEEEType2* element = dynamic_cast(BaseClass_ptr1)) + const VCompIEEEType2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_VCompIEEEType2_tr(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char VCompIEEEType2::debugName[] = "VCompIEEEType2"; const char* VCompIEEEType2::debugString() const { @@ -98,17 +96,17 @@ const char* VCompIEEEType2::debugString() const void VCompIEEEType2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VCompIEEEType2"), &VCompIEEEType2_factory)); + factory_map.emplace("cim:VCompIEEEType2", &VCompIEEEType2_factory); } void VCompIEEEType2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VCompIEEEType2.tr"), &assign_VCompIEEEType2_tr)); + assign_map.emplace("cim:VCompIEEEType2.tr", &assign_VCompIEEEType2_tr); } void VCompIEEEType2::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VCompIEEEType2.GenICompensationForGenJ"), &assign_VCompIEEEType2_GenICompensationForGenJ)); + assign_map.emplace("cim:VCompIEEEType2.GenICompensationForGenJ", &assign_VCompIEEEType2_GenICompensationForGenJ); } void VCompIEEEType2::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/VCompIEEEType2.hpp b/CGMES_2.4.15_27JAN2020/VCompIEEEType2.hpp index 939a3436f..67fe38c34 100644 --- a/CGMES_2.4.15_27JAN2020/VCompIEEEType2.hpp +++ b/CGMES_2.4.15_27JAN2020/VCompIEEEType2.hpp @@ -25,8 +25,11 @@ namespace CIMPP VCompIEEEType2(); ~VCompIEEEType2() override; - std::list GenICompensationForGenJ; /* Compensation of this voltage compensator`s generator for current flow out of another generator. Default: 0 */ - CIMPP::Seconds tr; /* Default: nullptr */ + /** \brief Compensation of this voltage compensator`s generator for current flow out of another generator. Default: 0 */ + std::list GenICompensationForGenJ; + + /** \brief Default: nullptr */ + CIMPP::Seconds tr; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Validity.cpp b/CGMES_2.4.15_27JAN2020/Validity.cpp index 9796a2efa..02845a923 100644 --- a/CGMES_2.4.15_27JAN2020/Validity.cpp +++ b/CGMES_2.4.15_27JAN2020/Validity.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "Validity") + if (EnumSymbol.substr(0, pos) != "Validity") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "GOOD") + if (EnumSymbol == "GOOD") { rop = Validity::GOOD; return lop; } - if(EnumSymbol == "QUESTIONABLE") + if (EnumSymbol == "QUESTIONABLE") { rop = Validity::QUESTIONABLE; return lop; } - if(EnumSymbol == "INVALID") + if (EnumSymbol == "INVALID") { rop = Validity::INVALID; return lop; diff --git a/CGMES_2.4.15_27JAN2020/Validity.hpp b/CGMES_2.4.15_27JAN2020/Validity.hpp index fb4d8ce56..73e0f28c5 100644 --- a/CGMES_2.4.15_27JAN2020/Validity.hpp +++ b/CGMES_2.4.15_27JAN2020/Validity.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Validity for MeasurementValue. - */ + /** \brief Validity for MeasurementValue. */ class Validity { public: enum Validity_ENUM { - /** - * The value is marked good if no abnormal condition of the acquisition function or the information source is detected. - */ + /** The value is marked good if no abnormal condition of the acquisition function or the information source is detected. */ GOOD, - /** - * The value is marked questionable if a supervision function detects an abnormal behaviour, however the value could still be valid. The client is responsible for determining whether or not values marked "questionable" should be used. - */ + /** The value is marked questionable if a supervision function detects an abnormal behaviour, however the value could still be valid. The client is responsible for determining whether or not values marked "questionable" should be used. */ QUESTIONABLE, - /** - * The value is marked invalid when a supervision function recognises abnormal conditions of the acquisition function or the information source (missing or non-operating updating devices). The value is not defined under this condition. The mark invalid is used to indicate to the client that the value may be incorrect and shall not be used. - */ + /** The value is marked invalid when a supervision function recognises abnormal conditions of the acquisition function or the information source (missing or non-operating updating devices). The value is not defined under this condition. The mark invalid is used to indicate to the client that the value may be incorrect and shall not be used. */ INVALID, }; diff --git a/CGMES_2.4.15_27JAN2020/ValueAliasSet.cpp b/CGMES_2.4.15_27JAN2020/ValueAliasSet.cpp index b6a111e61..1ba46808c 100644 --- a/CGMES_2.4.15_27JAN2020/ValueAliasSet.cpp +++ b/CGMES_2.4.15_27JAN2020/ValueAliasSet.cpp @@ -15,8 +15,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ValueAliasSet::ValueAliasSet() {}; -ValueAliasSet::~ValueAliasSet() {}; +ValueAliasSet::ValueAliasSet() {} +ValueAliasSet::~ValueAliasSet() {} static const std::list PossibleProfilesForClass = { @@ -46,8 +46,6 @@ ValueAliasSet::getPossibleProfilesForAttributes() const return map; } - - bool assign_Command_ValueAliasSet(BaseClass*, BaseClass*); bool assign_ValueAliasSet_Commands(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -64,6 +62,7 @@ bool assign_ValueAliasSet_Commands(BaseClass* BaseClass_ptr1, BaseClass* BaseCla } return false; } + bool assign_Discrete_ValueAliasSet(BaseClass*, BaseClass*); bool assign_ValueAliasSet_Discretes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -80,6 +79,7 @@ bool assign_ValueAliasSet_Discretes(BaseClass* BaseClass_ptr1, BaseClass* BaseCl } return false; } + bool assign_RaiseLowerCommand_ValueAliasSet(BaseClass*, BaseClass*); bool assign_ValueAliasSet_RaiseLowerCommands(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -96,6 +96,7 @@ bool assign_ValueAliasSet_RaiseLowerCommands(BaseClass* BaseClass_ptr1, BaseClas } return false; } + bool assign_ValueToAlias_ValueAliasSet(BaseClass*, BaseClass*); bool assign_ValueAliasSet_Values(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -115,6 +116,8 @@ bool assign_ValueAliasSet_Values(BaseClass* BaseClass_ptr1, BaseClass* BaseClass + + const char ValueAliasSet::debugName[] = "ValueAliasSet"; const char* ValueAliasSet::debugString() const { @@ -123,7 +126,7 @@ const char* ValueAliasSet::debugString() const void ValueAliasSet::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ValueAliasSet"), &ValueAliasSet_factory)); + factory_map.emplace("cim:ValueAliasSet", &ValueAliasSet_factory); } void ValueAliasSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -132,10 +135,10 @@ void ValueAliasSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ValueAliasSet.Commands"), &assign_ValueAliasSet_Commands)); - assign_map.insert(std::make_pair(std::string("cim:ValueAliasSet.Discretes"), &assign_ValueAliasSet_Discretes)); - assign_map.insert(std::make_pair(std::string("cim:ValueAliasSet.RaiseLowerCommands"), &assign_ValueAliasSet_RaiseLowerCommands)); - assign_map.insert(std::make_pair(std::string("cim:ValueAliasSet.Values"), &assign_ValueAliasSet_Values)); + assign_map.emplace("cim:ValueAliasSet.Commands", &assign_ValueAliasSet_Commands); + assign_map.emplace("cim:ValueAliasSet.Discretes", &assign_ValueAliasSet_Discretes); + assign_map.emplace("cim:ValueAliasSet.RaiseLowerCommands", &assign_ValueAliasSet_RaiseLowerCommands); + assign_map.emplace("cim:ValueAliasSet.Values", &assign_ValueAliasSet_Values); } void ValueAliasSet::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/ValueAliasSet.hpp b/CGMES_2.4.15_27JAN2020/ValueAliasSet.hpp index 66dcbd455..80a9bad49 100644 --- a/CGMES_2.4.15_27JAN2020/ValueAliasSet.hpp +++ b/CGMES_2.4.15_27JAN2020/ValueAliasSet.hpp @@ -20,9 +20,7 @@ namespace CIMPP class RaiseLowerCommand; class ValueToAlias; - /* - Describes the translation of a set of values into a name and is intendend to facilitate cusom translations. Each ValueAliasSet has a name, description etc. A specific Measurement may represent a discrete state like Open, Closed, Intermediate etc. This requires a translation from the MeasurementValue.value number to a string, e.g. 0->"Invalid", 1->"Open", 2->"Closed", 3->"Intermediate". Each ValueToAlias member in ValueAliasSet.Value describe a mapping for one particular value to a name. - */ + /** \brief Describes the translation of a set of values into a name and is intendend to facilitate cusom translations. Each ValueAliasSet has a name, description etc. A specific Measurement may represent a discrete state like Open, Closed, Intermediate etc. This requires a translation from the MeasurementValue.value number to a string, e.g. 0->"Invalid", 1->"Open", 2->"Closed", 3->"Intermediate". Each ValueToAlias member in ValueAliasSet.Value describe a mapping for one particular value to a name. */ class ValueAliasSet : public IdentifiedObject { public: @@ -30,10 +28,17 @@ namespace CIMPP ValueAliasSet(); ~ValueAliasSet() override; - std::list Commands; /* The Commands using the set for translation. Default: 0 */ - std::list Discretes; /* The Measurements using the set for translation. Default: 0 */ - std::list RaiseLowerCommands; /* The Commands using the set for translation. Default: 0 */ - std::list Values; /* The ValueAliasSet having the ValueToAlias mappings. Default: 0 */ + /** \brief The Commands using the set for translation. Default: 0 */ + std::list Commands; + + /** \brief The Measurements using the set for translation. Default: 0 */ + std::list Discretes; + + /** \brief The Commands using the set for translation. Default: 0 */ + std::list RaiseLowerCommands; + + /** \brief The ValueAliasSet having the ValueToAlias mappings. Default: 0 */ + std::list Values; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/ValueToAlias.cpp b/CGMES_2.4.15_27JAN2020/ValueToAlias.cpp index dc6fbcec4..e0b3ae3d9 100644 --- a/CGMES_2.4.15_27JAN2020/ValueToAlias.cpp +++ b/CGMES_2.4.15_27JAN2020/ValueToAlias.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ValueAliasSet.hpp" -#include "Integer.hpp" using namespace CIMPP; -ValueToAlias::ValueToAlias() : ValueAliasSet(nullptr) {}; -ValueToAlias::~ValueToAlias() {}; +ValueToAlias::ValueToAlias() : ValueAliasSet(nullptr) {} +ValueToAlias::~ValueToAlias() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ ValueToAlias::getPossibleProfilesForAttributes() const return map; } - -bool assign_ValueToAlias_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ValueToAlias* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->value; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ValueAliasSet_Values(BaseClass*, BaseClass*); bool assign_ValueToAlias_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_ValueToAlias_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass* Bas return false; } -bool get_ValueToAlias_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_ValueToAlias_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const ValueToAlias* element = dynamic_cast(BaseClass_ptr1)) + ValueToAlias* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->value; - if (!buffer.str().empty()) + buffer >> element->value; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_ValueToAlias_ValueAliasSet(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ValueToAlias* element = dynamic_cast(BaseClass_ptr1)) + const ValueToAlias* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ValueAliasSet != 0) { @@ -102,6 +86,20 @@ bool get_ValueToAlias_ValueAliasSet(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->value; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char ValueToAlias::debugName[] = "ValueToAlias"; const char* ValueToAlias::debugString() const @@ -111,17 +109,17 @@ const char* ValueToAlias::debugString() const void ValueToAlias::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ValueToAlias"), &ValueToAlias_factory)); + factory_map.emplace("cim:ValueToAlias", &ValueToAlias_factory); } void ValueToAlias::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ValueToAlias.value"), &assign_ValueToAlias_value)); + assign_map.emplace("cim:ValueToAlias.value", &assign_ValueToAlias_value); } void ValueToAlias::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ValueToAlias.ValueAliasSet"), &assign_ValueToAlias_ValueAliasSet)); + assign_map.emplace("cim:ValueToAlias.ValueAliasSet", &assign_ValueToAlias_ValueAliasSet); } void ValueToAlias::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/ValueToAlias.hpp b/CGMES_2.4.15_27JAN2020/ValueToAlias.hpp index 7df4daa8e..f2faa5f11 100644 --- a/CGMES_2.4.15_27JAN2020/ValueToAlias.hpp +++ b/CGMES_2.4.15_27JAN2020/ValueToAlias.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ValueAliasSet; - /* - Describes the translation of one particular value into a name, e.g. 1 as "Open". - */ + /** \brief Describes the translation of one particular value into a name, e.g. 1 as "Open". */ class ValueToAlias : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP ValueToAlias(); ~ValueToAlias() override; - CIMPP::ValueAliasSet* ValueAliasSet; /* The ValueToAlias mappings included in the set. Default: 0 */ - CIMPP::Integer value; /* The value that is mapped. Default: 0 */ + /** \brief The ValueToAlias mappings included in the set. Default: 0 */ + CIMPP::ValueAliasSet* ValueAliasSet; + + /** \brief The value that is mapped. Default: 0 */ + CIMPP::Integer value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/VisibilityLayer.cpp b/CGMES_2.4.15_27JAN2020/VisibilityLayer.cpp index 763004423..342592e16 100644 --- a/CGMES_2.4.15_27JAN2020/VisibilityLayer.cpp +++ b/CGMES_2.4.15_27JAN2020/VisibilityLayer.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "DiagramObject.hpp" -#include "Integer.hpp" using namespace CIMPP; -VisibilityLayer::VisibilityLayer() {}; -VisibilityLayer::~VisibilityLayer() {}; +VisibilityLayer::VisibilityLayer() {} +VisibilityLayer::~VisibilityLayer() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ VisibilityLayer::getPossibleProfilesForAttributes() const return map; } - -bool assign_VisibilityLayer_drawingOrder(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (VisibilityLayer* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->drawingOrder; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_DiagramObject_VisibilityLayers(BaseClass*, BaseClass*); bool assign_VisibilityLayer_VisibleObjects(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_VisibilityLayer_VisibleObjects(BaseClass* BaseClass_ptr1, BaseClass* return false; } -bool get_VisibilityLayer_drawingOrder(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_VisibilityLayer_drawingOrder(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const VisibilityLayer* element = dynamic_cast(BaseClass_ptr1)) + VisibilityLayer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->drawingOrder; - if (!buffer.str().empty()) + buffer >> element->drawingOrder; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_VisibilityLayer_VisibleObjects(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const VisibilityLayer* element = dynamic_cast(BaseClass_ptr1)) + const VisibilityLayer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { std::copy(element->VisibleObjects.begin(), element->VisibleObjects.end(), std::back_inserter(BaseClass_list)); return !BaseClass_list.empty(); @@ -99,6 +83,20 @@ bool get_VisibilityLayer_VisibleObjects(const BaseClass* BaseClass_ptr1, std::li return false; } +bool get_VisibilityLayer_drawingOrder(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const VisibilityLayer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->drawingOrder; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char VisibilityLayer::debugName[] = "VisibilityLayer"; const char* VisibilityLayer::debugString() const @@ -108,17 +106,17 @@ const char* VisibilityLayer::debugString() const void VisibilityLayer::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VisibilityLayer"), &VisibilityLayer_factory)); + factory_map.emplace("cim:VisibilityLayer", &VisibilityLayer_factory); } void VisibilityLayer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VisibilityLayer.drawingOrder"), &assign_VisibilityLayer_drawingOrder)); + assign_map.emplace("cim:VisibilityLayer.drawingOrder", &assign_VisibilityLayer_drawingOrder); } void VisibilityLayer::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VisibilityLayer.VisibleObjects"), &assign_VisibilityLayer_VisibleObjects)); + assign_map.emplace("cim:VisibilityLayer.VisibleObjects", &assign_VisibilityLayer_VisibleObjects); } void VisibilityLayer::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/VisibilityLayer.hpp b/CGMES_2.4.15_27JAN2020/VisibilityLayer.hpp index 0eb4565e2..20a6810e6 100644 --- a/CGMES_2.4.15_27JAN2020/VisibilityLayer.hpp +++ b/CGMES_2.4.15_27JAN2020/VisibilityLayer.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class DiagramObject; - /* - Layers are typically used for grouping diagram objects according to themes and scales. Themes are used to display or hide certain information (e.g., lakes, borders), while scales are used for hiding or displaying information depending on the current zoom level (hide text when it is too small to be read, or when it exceeds the screen size). This is also called de-cluttering. CIM based graphics exchange will support an m:n relationship between diagram objects and layers. It will be the task of the importing system to convert an m:n case into an appropriate 1:n representation if the importing system does not support m:n. - */ + /** \brief Layers are typically used for grouping diagram objects according to themes and scales. Themes are used to display or hide certain information (e.g., lakes, borders), while scales are used for hiding or displaying information depending on the current zoom level (hide text when it is too small to be read, or when it exceeds the screen size). This is also called de-cluttering. CIM based graphics exchange will support an m:n relationship between diagram objects and layers. It will be the task of the importing system to convert an m:n case into an appropriate 1:n representation if the importing system does not support m:n. */ class VisibilityLayer : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP VisibilityLayer(); ~VisibilityLayer() override; - std::list VisibleObjects; /* A visibility layer can contain one or more diagram objects. Default: 0 */ - CIMPP::Integer drawingOrder; /* The drawing order for this layer. The higher the number, the later the layer and the objects within it are rendered. Default: 0 */ + /** \brief A visibility layer can contain one or more diagram objects. Default: 0 */ + std::list VisibleObjects; + + /** \brief The drawing order for this layer. The higher the number, the later the layer and the objects within it are rendered. Default: 0 */ + CIMPP::Integer drawingOrder; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/Voltage.hpp b/CGMES_2.4.15_27JAN2020/Voltage.hpp index 12eb87179..a0682e3d6 100644 --- a/CGMES_2.4.15_27JAN2020/Voltage.hpp +++ b/CGMES_2.4.15_27JAN2020/Voltage.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Electrical voltage, can be both AC and DC. - */ + /** \brief Electrical voltage, can be both AC and DC. */ class Voltage { public: diff --git a/CGMES_2.4.15_27JAN2020/VoltageAdjusterDynamics.cpp b/CGMES_2.4.15_27JAN2020/VoltageAdjusterDynamics.cpp index a3ef9d037..5ab8b68ac 100644 --- a/CGMES_2.4.15_27JAN2020/VoltageAdjusterDynamics.cpp +++ b/CGMES_2.4.15_27JAN2020/VoltageAdjusterDynamics.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -VoltageAdjusterDynamics::VoltageAdjusterDynamics() : PFVArControllerType1Dynamics(nullptr) {}; -VoltageAdjusterDynamics::~VoltageAdjusterDynamics() {}; +VoltageAdjusterDynamics::VoltageAdjusterDynamics() : PFVArControllerType1Dynamics(nullptr) {} +VoltageAdjusterDynamics::~VoltageAdjusterDynamics() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ VoltageAdjusterDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_PFVArControllerType1Dynamics_VoltageAdjusterDynamics(BaseClass*, BaseClass*); bool assign_VoltageAdjusterDynamics_PFVArControllerType1Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_VoltageAdjusterDynamics_PFVArControllerType1Dynamics(BaseClass* Base return false; } - bool get_VoltageAdjusterDynamics_PFVArControllerType1Dynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const VoltageAdjusterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const VoltageAdjusterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PFVArControllerType1Dynamics != 0) { @@ -73,7 +71,6 @@ bool get_VoltageAdjusterDynamics_PFVArControllerType1Dynamics(const BaseClass* B return false; } - const char VoltageAdjusterDynamics::debugName[] = "VoltageAdjusterDynamics"; const char* VoltageAdjusterDynamics::debugString() const { @@ -82,7 +79,7 @@ const char* VoltageAdjusterDynamics::debugString() const void VoltageAdjusterDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VoltageAdjusterDynamics"), &VoltageAdjusterDynamics_factory)); + factory_map.emplace("cim:VoltageAdjusterDynamics", &VoltageAdjusterDynamics_factory); } void VoltageAdjusterDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void VoltageAdjusterDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VoltageAdjusterDynamics.PFVArControllerType1Dynamics"), &assign_VoltageAdjusterDynamics_PFVArControllerType1Dynamics)); + assign_map.emplace("cim:VoltageAdjusterDynamics.PFVArControllerType1Dynamics", &assign_VoltageAdjusterDynamics_PFVArControllerType1Dynamics); } void VoltageAdjusterDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/VoltageAdjusterDynamics.hpp b/CGMES_2.4.15_27JAN2020/VoltageAdjusterDynamics.hpp index 16d132c96..38c64482e 100644 --- a/CGMES_2.4.15_27JAN2020/VoltageAdjusterDynamics.hpp +++ b/CGMES_2.4.15_27JAN2020/VoltageAdjusterDynamics.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class PFVArControllerType1Dynamics; - /* - Voltage adjuster function block whose behaviour is described by reference to a standard model - */ + /** \brief Voltage adjuster function block whose behaviour is described by reference to a standard model */ class VoltageAdjusterDynamics : public DynamicsFunctionBlock { public: @@ -27,7 +25,8 @@ namespace CIMPP VoltageAdjusterDynamics(); ~VoltageAdjusterDynamics() override; - CIMPP::PFVArControllerType1Dynamics* PFVArControllerType1Dynamics; /* Power Factor or VAr controller Type I model with which this voltage adjuster is associated. Default: 0 */ + /** \brief Power Factor or VAr controller Type I model with which this voltage adjuster is associated. Default: 0 */ + CIMPP::PFVArControllerType1Dynamics* PFVArControllerType1Dynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/VoltageAdjusterUserDefined.cpp b/CGMES_2.4.15_27JAN2020/VoltageAdjusterUserDefined.cpp index 4a51799ed..c89e76a0e 100644 --- a/CGMES_2.4.15_27JAN2020/VoltageAdjusterUserDefined.cpp +++ b/CGMES_2.4.15_27JAN2020/VoltageAdjusterUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -VoltageAdjusterUserDefined::VoltageAdjusterUserDefined() {}; -VoltageAdjusterUserDefined::~VoltageAdjusterUserDefined() {}; +VoltageAdjusterUserDefined::VoltageAdjusterUserDefined() {} +VoltageAdjusterUserDefined::~VoltageAdjusterUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ VoltageAdjusterUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_VoltageAdjusterUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (VoltageAdjusterUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_VoltageAdjusterUserDefined(BaseClass*, BaseClass*); bool assign_VoltageAdjusterUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_VoltageAdjusterUserDefined_ProprietaryParameterDynamics(BaseClass* B return false; } +bool assign_VoltageAdjusterUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + VoltageAdjusterUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_VoltageAdjusterUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VoltageAdjusterUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const VoltageAdjusterUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_VoltageAdjusterUserDefined_proprietary(const BaseClass* BaseClass_ptr1, return false; } - - const char VoltageAdjusterUserDefined::debugName[] = "VoltageAdjusterUserDefined"; const char* VoltageAdjusterUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* VoltageAdjusterUserDefined::debugString() const void VoltageAdjusterUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VoltageAdjusterUserDefined"), &VoltageAdjusterUserDefined_factory)); + factory_map.emplace("cim:VoltageAdjusterUserDefined", &VoltageAdjusterUserDefined_factory); } void VoltageAdjusterUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VoltageAdjusterUserDefined.proprietary"), &assign_VoltageAdjusterUserDefined_proprietary)); + assign_map.emplace("cim:VoltageAdjusterUserDefined.proprietary", &assign_VoltageAdjusterUserDefined_proprietary); } void VoltageAdjusterUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VoltageAdjusterUserDefined.ProprietaryParameterDynamics"), &assign_VoltageAdjusterUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:VoltageAdjusterUserDefined.ProprietaryParameterDynamics", &assign_VoltageAdjusterUserDefined_ProprietaryParameterDynamics); } void VoltageAdjusterUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/VoltageAdjusterUserDefined.hpp b/CGMES_2.4.15_27JAN2020/VoltageAdjusterUserDefined.hpp index 9f9c707a9..b1e9da031 100644 --- a/CGMES_2.4.15_27JAN2020/VoltageAdjusterUserDefined.hpp +++ b/CGMES_2.4.15_27JAN2020/VoltageAdjusterUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - function block whose dynamic behaviour is described by - */ + /** \brief function block whose dynamic behaviour is described by */ class VoltageAdjusterUserDefined : public VoltageAdjusterDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP VoltageAdjusterUserDefined(); ~VoltageAdjusterUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/VoltageCompensatorDynamics.cpp b/CGMES_2.4.15_27JAN2020/VoltageCompensatorDynamics.cpp index d255c5a7b..b1b3c20fd 100644 --- a/CGMES_2.4.15_27JAN2020/VoltageCompensatorDynamics.cpp +++ b/CGMES_2.4.15_27JAN2020/VoltageCompensatorDynamics.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -VoltageCompensatorDynamics::VoltageCompensatorDynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr) {}; -VoltageCompensatorDynamics::~VoltageCompensatorDynamics() {}; +VoltageCompensatorDynamics::VoltageCompensatorDynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr) {} +VoltageCompensatorDynamics::~VoltageCompensatorDynamics() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ VoltageCompensatorDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_ExcitationSystemDynamics_VoltageCompensatorDynamics(BaseClass*, BaseClass*); bool assign_VoltageCompensatorDynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_VoltageCompensatorDynamics_ExcitationSystemDynamics(BaseClass* BaseC } return false; } + bool assign_RemoteInputSignal_VoltageCompensatorDynamics(BaseClass*, BaseClass*); bool assign_VoltageCompensatorDynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_VoltageCompensatorDynamics_RemoteInputSignal(BaseClass* BaseClass_pt return false; } - bool get_VoltageCompensatorDynamics_ExcitationSystemDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const VoltageCompensatorDynamics* element = dynamic_cast(BaseClass_ptr1)) + const VoltageCompensatorDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ExcitationSystemDynamics != 0) { @@ -100,7 +99,7 @@ const char* VoltageCompensatorDynamics::debugString() const void VoltageCompensatorDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VoltageCompensatorDynamics"), &VoltageCompensatorDynamics_factory)); + factory_map.emplace("cim:VoltageCompensatorDynamics", &VoltageCompensatorDynamics_factory); } void VoltageCompensatorDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -109,8 +108,8 @@ void VoltageCompensatorDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VoltageCompensatorDynamics.ExcitationSystemDynamics"), &assign_VoltageCompensatorDynamics_ExcitationSystemDynamics)); - assign_map.insert(std::make_pair(std::string("cim:VoltageCompensatorDynamics.RemoteInputSignal"), &assign_VoltageCompensatorDynamics_RemoteInputSignal)); + assign_map.emplace("cim:VoltageCompensatorDynamics.ExcitationSystemDynamics", &assign_VoltageCompensatorDynamics_ExcitationSystemDynamics); + assign_map.emplace("cim:VoltageCompensatorDynamics.RemoteInputSignal", &assign_VoltageCompensatorDynamics_RemoteInputSignal); } void VoltageCompensatorDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/VoltageCompensatorDynamics.hpp b/CGMES_2.4.15_27JAN2020/VoltageCompensatorDynamics.hpp index 9f1b0d557..858af27b2 100644 --- a/CGMES_2.4.15_27JAN2020/VoltageCompensatorDynamics.hpp +++ b/CGMES_2.4.15_27JAN2020/VoltageCompensatorDynamics.hpp @@ -18,9 +18,7 @@ namespace CIMPP class ExcitationSystemDynamics; class RemoteInputSignal; - /* - Voltage compensator function block whose behaviour is described by reference to a standard model - */ + /** \brief Voltage compensator function block whose behaviour is described by reference to a standard model */ class VoltageCompensatorDynamics : public DynamicsFunctionBlock { public: @@ -28,8 +26,11 @@ namespace CIMPP VoltageCompensatorDynamics(); ~VoltageCompensatorDynamics() override; - CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; /* Excitation system model with which this voltage compensator is associated. Default: 0 */ - CIMPP::RemoteInputSignal* RemoteInputSignal; /* Remote input signal used by this voltage compensator model. Default: 0 */ + /** \brief Excitation system model with which this voltage compensator is associated. Default: 0 */ + CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; + + /** \brief Remote input signal used by this voltage compensator model. Default: 0 */ + CIMPP::RemoteInputSignal* RemoteInputSignal; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/VoltageCompensatorUserDefined.cpp b/CGMES_2.4.15_27JAN2020/VoltageCompensatorUserDefined.cpp index 54c2e492b..dc3b5ff50 100644 --- a/CGMES_2.4.15_27JAN2020/VoltageCompensatorUserDefined.cpp +++ b/CGMES_2.4.15_27JAN2020/VoltageCompensatorUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -VoltageCompensatorUserDefined::VoltageCompensatorUserDefined() {}; -VoltageCompensatorUserDefined::~VoltageCompensatorUserDefined() {}; +VoltageCompensatorUserDefined::VoltageCompensatorUserDefined() {} +VoltageCompensatorUserDefined::~VoltageCompensatorUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ VoltageCompensatorUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_VoltageCompensatorUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (VoltageCompensatorUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_VoltageCompensatorUserDefined(BaseClass*, BaseClass*); bool assign_VoltageCompensatorUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_VoltageCompensatorUserDefined_ProprietaryParameterDynamics(BaseClass return false; } +bool assign_VoltageCompensatorUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + VoltageCompensatorUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_VoltageCompensatorUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VoltageCompensatorUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const VoltageCompensatorUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_VoltageCompensatorUserDefined_proprietary(const BaseClass* BaseClass_pt return false; } - - const char VoltageCompensatorUserDefined::debugName[] = "VoltageCompensatorUserDefined"; const char* VoltageCompensatorUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* VoltageCompensatorUserDefined::debugString() const void VoltageCompensatorUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VoltageCompensatorUserDefined"), &VoltageCompensatorUserDefined_factory)); + factory_map.emplace("cim:VoltageCompensatorUserDefined", &VoltageCompensatorUserDefined_factory); } void VoltageCompensatorUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VoltageCompensatorUserDefined.proprietary"), &assign_VoltageCompensatorUserDefined_proprietary)); + assign_map.emplace("cim:VoltageCompensatorUserDefined.proprietary", &assign_VoltageCompensatorUserDefined_proprietary); } void VoltageCompensatorUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VoltageCompensatorUserDefined.ProprietaryParameterDynamics"), &assign_VoltageCompensatorUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:VoltageCompensatorUserDefined.ProprietaryParameterDynamics", &assign_VoltageCompensatorUserDefined_ProprietaryParameterDynamics); } void VoltageCompensatorUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/VoltageCompensatorUserDefined.hpp b/CGMES_2.4.15_27JAN2020/VoltageCompensatorUserDefined.hpp index 924914260..7f6055be5 100644 --- a/CGMES_2.4.15_27JAN2020/VoltageCompensatorUserDefined.hpp +++ b/CGMES_2.4.15_27JAN2020/VoltageCompensatorUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Voltage compensator function block whose dynamic behaviour is described by - */ + /** \brief Voltage compensator function block whose dynamic behaviour is described by */ class VoltageCompensatorUserDefined : public VoltageCompensatorDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP VoltageCompensatorUserDefined(); ~VoltageCompensatorUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/VoltageLevel.cpp b/CGMES_2.4.15_27JAN2020/VoltageLevel.cpp index 4f42553d2..31ba7dc6a 100644 --- a/CGMES_2.4.15_27JAN2020/VoltageLevel.cpp +++ b/CGMES_2.4.15_27JAN2020/VoltageLevel.cpp @@ -11,13 +11,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "BaseVoltage.hpp" #include "Bay.hpp" #include "Substation.hpp" -#include "Voltage.hpp" -#include "Voltage.hpp" using namespace CIMPP; -VoltageLevel::VoltageLevel() : BaseVoltage(nullptr), Substation(nullptr) {}; -VoltageLevel::~VoltageLevel() {}; +VoltageLevel::VoltageLevel() : BaseVoltage(nullptr), Substation(nullptr) {} +VoltageLevel::~VoltageLevel() {} static const std::list PossibleProfilesForClass = { @@ -48,34 +46,6 @@ VoltageLevel::getPossibleProfilesForAttributes() const return map; } - -bool assign_VoltageLevel_highVoltageLimit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (VoltageLevel* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->highVoltageLimit; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_VoltageLevel_lowVoltageLimit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (VoltageLevel* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->lowVoltageLimit; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_BaseVoltage_VoltageLevel(BaseClass*, BaseClass*); bool assign_VoltageLevel_BaseVoltage(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -92,6 +62,7 @@ bool assign_VoltageLevel_BaseVoltage(BaseClass* BaseClass_ptr1, BaseClass* BaseC } return false; } + bool assign_Bay_VoltageLevel(BaseClass*, BaseClass*); bool assign_VoltageLevel_Bays(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -108,6 +79,7 @@ bool assign_VoltageLevel_Bays(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_pt } return false; } + bool assign_Substation_VoltageLevels(BaseClass*, BaseClass*); bool assign_VoltageLevel_Substation(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -125,38 +97,38 @@ bool assign_VoltageLevel_Substation(BaseClass* BaseClass_ptr1, BaseClass* BaseCl return false; } -bool get_VoltageLevel_highVoltageLimit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_VoltageLevel_highVoltageLimit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const VoltageLevel* element = dynamic_cast(BaseClass_ptr1)) + VoltageLevel* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->highVoltageLimit; - if (!buffer.str().empty()) + buffer >> element->highVoltageLimit; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_VoltageLevel_lowVoltageLimit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_VoltageLevel_lowVoltageLimit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const VoltageLevel* element = dynamic_cast(BaseClass_ptr1)) + VoltageLevel* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->lowVoltageLimit; - if (!buffer.str().empty()) + buffer >> element->lowVoltageLimit; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_VoltageLevel_BaseVoltage(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const VoltageLevel* element = dynamic_cast(BaseClass_ptr1)) + const VoltageLevel* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->BaseVoltage != 0) { @@ -167,9 +139,11 @@ bool get_VoltageLevel_BaseVoltage(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const VoltageLevel* element = dynamic_cast(BaseClass_ptr1)) + const VoltageLevel* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Substation != 0) { @@ -180,6 +154,35 @@ bool get_VoltageLevel_Substation(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->highVoltageLimit; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_VoltageLevel_lowVoltageLimit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const VoltageLevel* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->lowVoltageLimit; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char VoltageLevel::debugName[] = "VoltageLevel"; const char* VoltageLevel::debugString() const @@ -189,20 +192,20 @@ const char* VoltageLevel::debugString() const void VoltageLevel::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VoltageLevel"), &VoltageLevel_factory)); + factory_map.emplace("cim:VoltageLevel", &VoltageLevel_factory); } void VoltageLevel::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VoltageLevel.highVoltageLimit"), &assign_VoltageLevel_highVoltageLimit)); - assign_map.insert(std::make_pair(std::string("cim:VoltageLevel.lowVoltageLimit"), &assign_VoltageLevel_lowVoltageLimit)); + assign_map.emplace("cim:VoltageLevel.highVoltageLimit", &assign_VoltageLevel_highVoltageLimit); + assign_map.emplace("cim:VoltageLevel.lowVoltageLimit", &assign_VoltageLevel_lowVoltageLimit); } void VoltageLevel::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VoltageLevel.BaseVoltage"), &assign_VoltageLevel_BaseVoltage)); - assign_map.insert(std::make_pair(std::string("cim:VoltageLevel.Bays"), &assign_VoltageLevel_Bays)); - assign_map.insert(std::make_pair(std::string("cim:VoltageLevel.Substation"), &assign_VoltageLevel_Substation)); + assign_map.emplace("cim:VoltageLevel.BaseVoltage", &assign_VoltageLevel_BaseVoltage); + assign_map.emplace("cim:VoltageLevel.Bays", &assign_VoltageLevel_Bays); + assign_map.emplace("cim:VoltageLevel.Substation", &assign_VoltageLevel_Substation); } void VoltageLevel::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/VoltageLevel.hpp b/CGMES_2.4.15_27JAN2020/VoltageLevel.hpp index fe71f62cc..5b32798e6 100644 --- a/CGMES_2.4.15_27JAN2020/VoltageLevel.hpp +++ b/CGMES_2.4.15_27JAN2020/VoltageLevel.hpp @@ -20,9 +20,7 @@ namespace CIMPP class Bay; class Substation; - /* - A collection of equipment at one common system voltage forming a switchgear. The equipment typically consist of breakers, busbars, instrumentation, control, regulation and protection devices as well as assemblies of all these. - */ + /** \brief A collection of equipment at one common system voltage forming a switchgear. The equipment typically consist of breakers, busbars, instrumentation, control, regulation and protection devices as well as assemblies of all these. */ class VoltageLevel : public EquipmentContainer { public: @@ -30,11 +28,20 @@ namespace CIMPP VoltageLevel(); ~VoltageLevel() override; - CIMPP::BaseVoltage* BaseVoltage; /* The base voltage used for all equipment within the voltage level. Default: 0 */ - std::list Bays; /* The bays within this voltage level. Default: 0 */ - CIMPP::Substation* Substation; /* The substation of the voltage level. Default: 0 */ - CIMPP::Voltage highVoltageLimit; /* The bus bar`s high voltage limit Default: nullptr */ - CIMPP::Voltage lowVoltageLimit; /* The bus bar`s low voltage limit Default: nullptr */ + /** \brief The base voltage used for all equipment within the voltage level. Default: 0 */ + CIMPP::BaseVoltage* BaseVoltage; + + /** \brief The bays within this voltage level. Default: 0 */ + std::list Bays; + + /** \brief The substation of the voltage level. Default: 0 */ + CIMPP::Substation* Substation; + + /** \brief The bus bar`s high voltage limit Default: nullptr */ + CIMPP::Voltage highVoltageLimit; + + /** \brief The bus bar`s low voltage limit Default: nullptr */ + CIMPP::Voltage lowVoltageLimit; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/VoltageLimit.cpp b/CGMES_2.4.15_27JAN2020/VoltageLimit.cpp index 5eec5d9ff..b8a2d59db 100644 --- a/CGMES_2.4.15_27JAN2020/VoltageLimit.cpp +++ b/CGMES_2.4.15_27JAN2020/VoltageLimit.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Voltage.hpp" using namespace CIMPP; -VoltageLimit::VoltageLimit() {}; -VoltageLimit::~VoltageLimit() {}; +VoltageLimit::VoltageLimit() {} +VoltageLimit::~VoltageLimit() {} static const std::list PossibleProfilesForClass = { @@ -40,25 +39,24 @@ VoltageLimit::getPossibleProfilesForAttributes() const return map; } - -bool assign_VoltageLimit_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VoltageLimit_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VoltageLimit* element = dynamic_cast(BaseClass_ptr1)) + VoltageLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->value; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_VoltageLimit_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VoltageLimit* element = dynamic_cast(BaseClass_ptr1)) + const VoltageLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value; if (!buffer.str().empty()) @@ -70,8 +68,6 @@ bool get_VoltageLimit_value(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char VoltageLimit::debugName[] = "VoltageLimit"; const char* VoltageLimit::debugString() const { @@ -80,12 +76,12 @@ const char* VoltageLimit::debugString() const void VoltageLimit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VoltageLimit"), &VoltageLimit_factory)); + factory_map.emplace("cim:VoltageLimit", &VoltageLimit_factory); } void VoltageLimit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VoltageLimit.value"), &assign_VoltageLimit_value)); + assign_map.emplace("cim:VoltageLimit.value", &assign_VoltageLimit_value); } void VoltageLimit::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/VoltageLimit.hpp b/CGMES_2.4.15_27JAN2020/VoltageLimit.hpp index 8673e3ee2..7f2ddc83a 100644 --- a/CGMES_2.4.15_27JAN2020/VoltageLimit.hpp +++ b/CGMES_2.4.15_27JAN2020/VoltageLimit.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Operational limit applied to voltage. - */ + /** \brief Operational limit applied to voltage. */ class VoltageLimit : public OperationalLimit { public: @@ -27,7 +25,8 @@ namespace CIMPP VoltageLimit(); ~VoltageLimit() override; - CIMPP::Voltage value; /* Limit on voltage. High or low limit nature of the limit depends upon the properties of the operational limit type. Default: nullptr */ + /** \brief Limit on voltage. High or low limit nature of the limit depends upon the properties of the operational limit type. Default: nullptr */ + CIMPP::Voltage value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/VoltagePerReactivePower.hpp b/CGMES_2.4.15_27JAN2020/VoltagePerReactivePower.hpp index 51ef9b955..521c38a90 100644 --- a/CGMES_2.4.15_27JAN2020/VoltagePerReactivePower.hpp +++ b/CGMES_2.4.15_27JAN2020/VoltagePerReactivePower.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Voltage variation with reactive power. - */ + /** \brief Voltage variation with reactive power. */ class VoltagePerReactivePower { public: diff --git a/CGMES_2.4.15_27JAN2020/VolumeFlowRate.hpp b/CGMES_2.4.15_27JAN2020/VolumeFlowRate.hpp index 256cf7e18..4c78de832 100644 --- a/CGMES_2.4.15_27JAN2020/VolumeFlowRate.hpp +++ b/CGMES_2.4.15_27JAN2020/VolumeFlowRate.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Volume per time. - */ + /** \brief Volume per time. */ class VolumeFlowRate { public: diff --git a/CGMES_2.4.15_27JAN2020/VsCapabilityCurve.cpp b/CGMES_2.4.15_27JAN2020/VsCapabilityCurve.cpp index b1e03e9fd..5a75f1880 100644 --- a/CGMES_2.4.15_27JAN2020/VsCapabilityCurve.cpp +++ b/CGMES_2.4.15_27JAN2020/VsCapabilityCurve.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -VsCapabilityCurve::VsCapabilityCurve() {}; -VsCapabilityCurve::~VsCapabilityCurve() {}; +VsCapabilityCurve::VsCapabilityCurve() {} +VsCapabilityCurve::~VsCapabilityCurve() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ VsCapabilityCurve::getPossibleProfilesForAttributes() const return map; } - - bool assign_VsConverter_CapabilityCurve(BaseClass*, BaseClass*); bool assign_VsCapabilityCurve_VsConverterDCSides(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_VsCapabilityCurve_VsConverterDCSides(BaseClass* BaseClass_ptr1, Base } - const char VsCapabilityCurve::debugName[] = "VsCapabilityCurve"; const char* VsCapabilityCurve::debugString() const { @@ -69,7 +66,7 @@ const char* VsCapabilityCurve::debugString() const void VsCapabilityCurve::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VsCapabilityCurve"), &VsCapabilityCurve_factory)); + factory_map.emplace("cim:VsCapabilityCurve", &VsCapabilityCurve_factory); } void VsCapabilityCurve::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void VsCapabilityCurve::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VsCapabilityCurve.VsConverterDCSides"), &assign_VsCapabilityCurve_VsConverterDCSides)); + assign_map.emplace("cim:VsCapabilityCurve.VsConverterDCSides", &assign_VsCapabilityCurve_VsConverterDCSides); } void VsCapabilityCurve::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/VsCapabilityCurve.hpp b/CGMES_2.4.15_27JAN2020/VsCapabilityCurve.hpp index 7794e4b4f..9eaa77b41 100644 --- a/CGMES_2.4.15_27JAN2020/VsCapabilityCurve.hpp +++ b/CGMES_2.4.15_27JAN2020/VsCapabilityCurve.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class VsConverter; - /* - The P-Q capability curve for a voltage source converter, with P on x-axis and Qmin and Qmax on y1-axis and y2-axis. - */ + /** \brief The P-Q capability curve for a voltage source converter, with P on x-axis and Qmin and Qmax on y1-axis and y2-axis. */ class VsCapabilityCurve : public Curve { public: @@ -27,7 +25,8 @@ namespace CIMPP VsCapabilityCurve(); ~VsCapabilityCurve() override; - std::list VsConverterDCSides; /* Capability curve of this converter. Default: 0 */ + /** \brief Capability curve of this converter. Default: 0 */ + std::list VsConverterDCSides; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/VsConverter.cpp b/CGMES_2.4.15_27JAN2020/VsConverter.cpp index 18df31fb9..3cc9a7c0c 100644 --- a/CGMES_2.4.15_27JAN2020/VsConverter.cpp +++ b/CGMES_2.4.15_27JAN2020/VsConverter.cpp @@ -9,22 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "VsCapabilityCurve.hpp" -#include "AngleDegrees.hpp" -#include "PU.hpp" -#include "Resistance.hpp" -#include "Simple_Float.hpp" -#include "CurrentFlow.hpp" -#include "VsPpccControlKind.hpp" -#include "VsQpccControlKind.hpp" -#include "PerCent.hpp" -#include "ReactivePower.hpp" -#include "Voltage.hpp" -#include "Voltage.hpp" using namespace CIMPP; -VsConverter::VsConverter() : CapabilityCurve(nullptr) {}; -VsConverter::~VsConverter() {}; +VsConverter::VsConverter() : CapabilityCurve(nullptr) {} +VsConverter::~VsConverter() {} static const std::list PossibleProfilesForClass = { @@ -64,171 +53,195 @@ VsConverter::getPossibleProfilesForAttributes() const return map; } +bool assign_VsCapabilityCurve_VsConverterDCSides(BaseClass*, BaseClass*); +bool assign_VsConverter_CapabilityCurve(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + VsConverter* element = dynamic_cast(BaseClass_ptr1); + VsCapabilityCurve* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->CapabilityCurve != element2) + { + element->CapabilityCurve = element2; + return assign_VsCapabilityCurve_VsConverterDCSides(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_VsConverter_delta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_delta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->delta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_droop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_droop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->droop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_droopCompensation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_droopCompensation(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->droopCompensation; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_maxModulationIndex(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_maxModulationIndex(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxModulationIndex; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_maxValveCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_maxValveCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxValveCurrent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_pPccControl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_pPccControl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pPccControl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_qPccControl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_qPccControl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qPccControl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_qShare(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_qShare(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qShare; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_targetQpcc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_targetQpcc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->targetQpcc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_targetUpcc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_targetUpcc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->targetUpcc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_uf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_uf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_VsCapabilityCurve_VsConverterDCSides(BaseClass*, BaseClass*); -bool assign_VsConverter_CapabilityCurve(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_VsConverter_CapabilityCurve(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - VsConverter* element = dynamic_cast(BaseClass_ptr1); - VsCapabilityCurve* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->CapabilityCurve != element2) + if (element->CapabilityCurve != 0) { - element->CapabilityCurve = element2; - return assign_VsCapabilityCurve_VsConverterDCSides(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->CapabilityCurve); + return true; } - return true; } return false; } bool get_VsConverter_delta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->delta; if (!buffer.str().empty()) @@ -242,7 +255,8 @@ bool get_VsConverter_delta(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_VsConverter_droop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->droop; if (!buffer.str().empty()) @@ -256,7 +270,8 @@ bool get_VsConverter_droop(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_VsConverter_droopCompensation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->droopCompensation; if (!buffer.str().empty()) @@ -270,7 +285,8 @@ bool get_VsConverter_droopCompensation(const BaseClass* BaseClass_ptr1, std::str bool get_VsConverter_maxModulationIndex(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxModulationIndex; if (!buffer.str().empty()) @@ -284,7 +300,8 @@ bool get_VsConverter_maxModulationIndex(const BaseClass* BaseClass_ptr1, std::st bool get_VsConverter_maxValveCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxValveCurrent; if (!buffer.str().empty()) @@ -296,11 +313,12 @@ bool get_VsConverter_maxValveCurrent(const BaseClass* BaseClass_ptr1, std::strin return false; } -bool get_VsConverter_qShare(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_VsConverter_pPccControl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->qShare; + buffer << element->pPccControl; if (!buffer.str().empty()) { return true; @@ -310,11 +328,12 @@ bool get_VsConverter_qShare(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } -bool get_VsConverter_targetQpcc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_VsConverter_qPccControl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->targetQpcc; + buffer << element->qPccControl; if (!buffer.str().empty()) { return true; @@ -324,11 +343,12 @@ bool get_VsConverter_targetQpcc(const BaseClass* BaseClass_ptr1, std::stringstre return false; } -bool get_VsConverter_targetUpcc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_VsConverter_qShare(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->targetUpcc; + buffer << element->qShare; if (!buffer.str().empty()) { return true; @@ -338,11 +358,12 @@ bool get_VsConverter_targetUpcc(const BaseClass* BaseClass_ptr1, std::stringstre return false; } -bool get_VsConverter_uf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_VsConverter_targetQpcc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->uf; + buffer << element->targetQpcc; if (!buffer.str().empty()) { return true; @@ -352,26 +373,12 @@ bool get_VsConverter_uf(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - -bool get_VsConverter_CapabilityCurve(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->CapabilityCurve != 0) - { - BaseClass_list.push_back(element->CapabilityCurve); - return true; - } - } - return false; -} - - -bool get_VsConverter_pPccControl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_VsConverter_targetUpcc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->pPccControl; + buffer << element->targetUpcc; if (!buffer.str().empty()) { return true; @@ -381,11 +388,12 @@ bool get_VsConverter_pPccControl(const BaseClass* BaseClass_ptr1, std::stringstr return false; } -bool get_VsConverter_qPccControl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_VsConverter_uf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->qPccControl; + buffer << element->uf; if (!buffer.str().empty()) { return true; @@ -403,27 +411,27 @@ const char* VsConverter::debugString() const void VsConverter::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VsConverter"), &VsConverter_factory)); + factory_map.emplace("cim:VsConverter", &VsConverter_factory); } void VsConverter::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VsConverter.delta"), &assign_VsConverter_delta)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.droop"), &assign_VsConverter_droop)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.droopCompensation"), &assign_VsConverter_droopCompensation)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.maxModulationIndex"), &assign_VsConverter_maxModulationIndex)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.maxValveCurrent"), &assign_VsConverter_maxValveCurrent)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.pPccControl"), &assign_VsConverter_pPccControl)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.qPccControl"), &assign_VsConverter_qPccControl)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.qShare"), &assign_VsConverter_qShare)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.targetQpcc"), &assign_VsConverter_targetQpcc)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.targetUpcc"), &assign_VsConverter_targetUpcc)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.uf"), &assign_VsConverter_uf)); + assign_map.emplace("cim:VsConverter.delta", &assign_VsConverter_delta); + assign_map.emplace("cim:VsConverter.droop", &assign_VsConverter_droop); + assign_map.emplace("cim:VsConverter.droopCompensation", &assign_VsConverter_droopCompensation); + assign_map.emplace("cim:VsConverter.maxModulationIndex", &assign_VsConverter_maxModulationIndex); + assign_map.emplace("cim:VsConverter.maxValveCurrent", &assign_VsConverter_maxValveCurrent); + assign_map.emplace("cim:VsConverter.pPccControl", &assign_VsConverter_pPccControl); + assign_map.emplace("cim:VsConverter.qPccControl", &assign_VsConverter_qPccControl); + assign_map.emplace("cim:VsConverter.qShare", &assign_VsConverter_qShare); + assign_map.emplace("cim:VsConverter.targetQpcc", &assign_VsConverter_targetQpcc); + assign_map.emplace("cim:VsConverter.targetUpcc", &assign_VsConverter_targetUpcc); + assign_map.emplace("cim:VsConverter.uf", &assign_VsConverter_uf); } void VsConverter::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VsConverter.CapabilityCurve"), &assign_VsConverter_CapabilityCurve)); + assign_map.emplace("cim:VsConverter.CapabilityCurve", &assign_VsConverter_CapabilityCurve); } void VsConverter::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/VsConverter.hpp b/CGMES_2.4.15_27JAN2020/VsConverter.hpp index 37bf00c28..046abdfd8 100644 --- a/CGMES_2.4.15_27JAN2020/VsConverter.hpp +++ b/CGMES_2.4.15_27JAN2020/VsConverter.hpp @@ -27,9 +27,7 @@ namespace CIMPP { class VsCapabilityCurve; - /* - DC side of the voltage source converter (VSC). - */ + /** \brief DC side of the voltage source converter (VSC). */ class VsConverter : public ACDCConverter { public: @@ -37,18 +35,41 @@ namespace CIMPP VsConverter(); ~VsConverter() override; - CIMPP::VsCapabilityCurve* CapabilityCurve; /* All converters with this capability curve. Default: 0 */ - CIMPP::AngleDegrees delta; /* Angle between uf and uc. Converter state variable used in power flow. Default: nullptr */ - CIMPP::PU droop; /* Droop constant; pu value is obtained as D [kV^2 / MW] x Sb / Ubdc^2. Default: nullptr */ - CIMPP::Resistance droopCompensation; /* Compensation (resistance) constant. Used to compensate for voltage drop when controlling voltage at a distant bus. Default: nullptr */ - CIMPP::Simple_Float maxModulationIndex; /* The max quotient between the AC converter voltage (Uc) and DC voltage (Ud). A factor typically less than 1. VSC configuration data used in power flow. Default: nullptr */ - CIMPP::CurrentFlow maxValveCurrent; /* The maximum current through a valve. This current limit is the basis for calculating the capability diagram. VSC configuration data. Default: nullptr */ - CIMPP::VsPpccControlKind pPccControl; /* Kind of control of real power and/or DC voltage. Default: 0 */ - CIMPP::VsQpccControlKind qPccControl; /* Default: 0 */ - CIMPP::PerCent qShare; /* Reactive power sharing factor among parallel converters on Uac control. Default: nullptr */ - CIMPP::ReactivePower targetQpcc; /* Reactive power injection target in AC grid, at point of common coupling. Default: nullptr */ - CIMPP::Voltage targetUpcc; /* Voltage target in AC grid, at point of common coupling. Default: nullptr */ - CIMPP::Voltage uf; /* Filter bus voltage. Converter state variable, result from power flow. Default: nullptr */ + /** \brief All converters with this capability curve. Default: 0 */ + CIMPP::VsCapabilityCurve* CapabilityCurve; + + /** \brief Angle between uf and uc. Converter state variable used in power flow. Default: nullptr */ + CIMPP::AngleDegrees delta; + + /** \brief Droop constant; pu value is obtained as D [kV^2 / MW] x Sb / Ubdc^2. Default: nullptr */ + CIMPP::PU droop; + + /** \brief Compensation (resistance) constant. Used to compensate for voltage drop when controlling voltage at a distant bus. Default: nullptr */ + CIMPP::Resistance droopCompensation; + + /** \brief The max quotient between the AC converter voltage (Uc) and DC voltage (Ud). A factor typically less than 1. VSC configuration data used in power flow. Default: nullptr */ + CIMPP::Simple_Float maxModulationIndex; + + /** \brief The maximum current through a valve. This current limit is the basis for calculating the capability diagram. VSC configuration data. Default: nullptr */ + CIMPP::CurrentFlow maxValveCurrent; + + /** \brief Kind of control of real power and/or DC voltage. Default: 0 */ + CIMPP::VsPpccControlKind pPccControl; + + /** \brief Default: 0 */ + CIMPP::VsQpccControlKind qPccControl; + + /** \brief Reactive power sharing factor among parallel converters on Uac control. Default: nullptr */ + CIMPP::PerCent qShare; + + /** \brief Reactive power injection target in AC grid, at point of common coupling. Default: nullptr */ + CIMPP::ReactivePower targetQpcc; + + /** \brief Voltage target in AC grid, at point of common coupling. Default: nullptr */ + CIMPP::Voltage targetUpcc; + + /** \brief Filter bus voltage. Converter state variable, result from power flow. Default: nullptr */ + CIMPP::Voltage uf; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/VsPpccControlKind.cpp b/CGMES_2.4.15_27JAN2020/VsPpccControlKind.cpp index bc8b2d84a..9fc07a8bc 100644 --- a/CGMES_2.4.15_27JAN2020/VsPpccControlKind.cpp +++ b/CGMES_2.4.15_27JAN2020/VsPpccControlKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "VsPpccControlKind") + if (EnumSymbol.substr(0, pos) != "VsPpccControlKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,27 +50,27 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "pPcc") + if (EnumSymbol == "pPcc") { rop = VsPpccControlKind::pPcc; return lop; } - if(EnumSymbol == "udc") + if (EnumSymbol == "udc") { rop = VsPpccControlKind::udc; return lop; } - if(EnumSymbol == "pPccAndUdcDroop") + if (EnumSymbol == "pPccAndUdcDroop") { rop = VsPpccControlKind::pPccAndUdcDroop; return lop; } - if(EnumSymbol == "pPccAndUdcDroopWithCompensation") + if (EnumSymbol == "pPccAndUdcDroopWithCompensation") { rop = VsPpccControlKind::pPccAndUdcDroopWithCompensation; return lop; } - if(EnumSymbol == "pPccAndUdcDroopPilot") + if (EnumSymbol == "pPccAndUdcDroopPilot") { rop = VsPpccControlKind::pPccAndUdcDroopPilot; return lop; diff --git a/CGMES_2.4.15_27JAN2020/VsPpccControlKind.hpp b/CGMES_2.4.15_27JAN2020/VsPpccControlKind.hpp index 3aec56bb0..b7f76babe 100644 --- a/CGMES_2.4.15_27JAN2020/VsPpccControlKind.hpp +++ b/CGMES_2.4.15_27JAN2020/VsPpccControlKind.hpp @@ -9,33 +9,21 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Types applicable to the control of real power and/or DC voltage by voltage source converter. - */ + /** \brief Types applicable to the control of real power and/or DC voltage by voltage source converter. */ class VsPpccControlKind { public: enum VsPpccControlKind_ENUM { - /** - * Control variable (target) is real power at PCC bus. - */ + /** Control variable (target) is real power at PCC bus. */ pPcc, - /** - * Control variable (target) is DC voltage and real power at PCC bus is derived. - */ + /** Control variable (target) is DC voltage and real power at PCC bus is derived. */ udc, - /** - * Control variables (targets) are both active power at point of common coupling and local DC voltage, with the droop. - */ + /** Control variables (targets) are both active power at point of common coupling and local DC voltage, with the droop. */ pPccAndUdcDroop, - /** - * Control variables (targets) are both active power at point of common coupling and compensated DC voltage, with the droop; compensation factor is the resistance, as an approximation of the DC voltage of a common (real or virtual) node in the DC network. - */ + /** Control variables (targets) are both active power at point of common coupling and compensated DC voltage, with the droop; compensation factor is the resistance, as an approximation of the DC voltage of a common (real or virtual) node in the DC network. */ pPccAndUdcDroopWithCompensation, - /** - * Control variables (targets) are both active power at point of common coupling and the pilot DC voltage, with the droop. - */ + /** Control variables (targets) are both active power at point of common coupling and the pilot DC voltage, with the droop. */ pPccAndUdcDroopPilot, }; diff --git a/CGMES_2.4.15_27JAN2020/VsQpccControlKind.cpp b/CGMES_2.4.15_27JAN2020/VsQpccControlKind.cpp index 7f438e41c..34cd1e0de 100644 --- a/CGMES_2.4.15_27JAN2020/VsQpccControlKind.cpp +++ b/CGMES_2.4.15_27JAN2020/VsQpccControlKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "VsQpccControlKind") + if (EnumSymbol.substr(0, pos) != "VsQpccControlKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "reactivePcc") + if (EnumSymbol == "reactivePcc") { rop = VsQpccControlKind::reactivePcc; return lop; } - if(EnumSymbol == "voltagePcc") + if (EnumSymbol == "voltagePcc") { rop = VsQpccControlKind::voltagePcc; return lop; } - if(EnumSymbol == "powerFactorPcc") + if (EnumSymbol == "powerFactorPcc") { rop = VsQpccControlKind::powerFactorPcc; return lop; diff --git a/CGMES_2.4.15_27JAN2020/WindAeroConstIEC.cpp b/CGMES_2.4.15_27JAN2020/WindAeroConstIEC.cpp index 0b2323f45..62ae00aaa 100644 --- a/CGMES_2.4.15_27JAN2020/WindAeroConstIEC.cpp +++ b/CGMES_2.4.15_27JAN2020/WindAeroConstIEC.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindAeroConstIEC::WindAeroConstIEC() : WindGenTurbineType1IEC(nullptr) {}; -WindAeroConstIEC::~WindAeroConstIEC() {}; +WindAeroConstIEC::WindAeroConstIEC() : WindGenTurbineType1IEC(nullptr) {} +WindAeroConstIEC::~WindAeroConstIEC() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ WindAeroConstIEC::getPossibleProfilesForAttributes() const return map; } - - bool assign_WindGenTurbineType1IEC_WindAeroConstIEC(BaseClass*, BaseClass*); bool assign_WindAeroConstIEC_WindGenTurbineType1IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_WindAeroConstIEC_WindGenTurbineType1IEC(BaseClass* BaseClass_ptr1, B } - const char WindAeroConstIEC::debugName[] = "WindAeroConstIEC"; const char* WindAeroConstIEC::debugString() const { @@ -69,7 +66,7 @@ const char* WindAeroConstIEC::debugString() const void WindAeroConstIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindAeroConstIEC"), &WindAeroConstIEC_factory)); + factory_map.emplace("cim:WindAeroConstIEC", &WindAeroConstIEC_factory); } void WindAeroConstIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void WindAeroConstIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindAeroConstIEC.WindGenTurbineType1IEC"), &assign_WindAeroConstIEC_WindGenTurbineType1IEC)); + assign_map.emplace("cim:WindAeroConstIEC.WindGenTurbineType1IEC", &assign_WindAeroConstIEC_WindGenTurbineType1IEC); } void WindAeroConstIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/WindAeroConstIEC.hpp b/CGMES_2.4.15_27JAN2020/WindAeroConstIEC.hpp index a36d11654..f6ed16d26 100644 --- a/CGMES_2.4.15_27JAN2020/WindAeroConstIEC.hpp +++ b/CGMES_2.4.15_27JAN2020/WindAeroConstIEC.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class WindGenTurbineType1IEC; - /* - The constant aerodynamic torque model assumes that the aerodynamic torque is constant. Reference: IEC Standard 61400-27-1 Section 6.6.1.1. - */ + /** \brief The constant aerodynamic torque model assumes that the aerodynamic torque is constant. Reference: IEC Standard 61400-27-1 Section 6.6.1.1. */ class WindAeroConstIEC : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP WindAeroConstIEC(); ~WindAeroConstIEC() override; - CIMPP::WindGenTurbineType1IEC* WindGenTurbineType1IEC; /* Wind turbine type 1 model with which this wind aerodynamic model is associated. Default: 0 */ + /** \brief Wind turbine type 1 model with which this wind aerodynamic model is associated. Default: 0 */ + CIMPP::WindGenTurbineType1IEC* WindGenTurbineType1IEC; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/WindAeroLinearIEC.cpp b/CGMES_2.4.15_27JAN2020/WindAeroLinearIEC.cpp index bc59b364a..9301ffa49 100644 --- a/CGMES_2.4.15_27JAN2020/WindAeroLinearIEC.cpp +++ b/CGMES_2.4.15_27JAN2020/WindAeroLinearIEC.cpp @@ -9,16 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "WindGenTurbineType3IEC.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "AngleDegrees.hpp" using namespace CIMPP; -WindAeroLinearIEC::WindAeroLinearIEC() : WindGenTurbineType3IEC(nullptr) {}; -WindAeroLinearIEC::~WindAeroLinearIEC() {}; +WindAeroLinearIEC::WindAeroLinearIEC() : WindGenTurbineType3IEC(nullptr) {} +WindAeroLinearIEC::~WindAeroLinearIEC() {} static const std::list PossibleProfilesForClass = { @@ -50,93 +45,98 @@ WindAeroLinearIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindAeroLinearIEC_dpomega(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType3IEC_WindAeroLinearIEC(BaseClass*, BaseClass*); +bool assign_WindAeroLinearIEC_WindGenTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1)) + WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1); + WindGenTurbineType3IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->dpomega; - if (buffer.fail()) - return false; - else - return true; + if (element->WindGenTurbineType3IEC != element2) + { + element->WindGenTurbineType3IEC = element2; + return assign_WindGenTurbineType3IEC_WindAeroLinearIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindAeroLinearIEC_dptheta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindAeroLinearIEC_dpomega(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1)) + WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->dptheta; - if (buffer.fail()) - return false; - else + buffer >> element->dpomega; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindAeroLinearIEC_omegazero(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindAeroLinearIEC_dptheta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1)) + WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->omegazero; - if (buffer.fail()) - return false; - else + buffer >> element->dptheta; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindAeroLinearIEC_pavail(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindAeroLinearIEC_omegazero(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1)) + WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->pavail; - if (buffer.fail()) - return false; - else + buffer >> element->omegazero; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindAeroLinearIEC_thetazero(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindAeroLinearIEC_pavail(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1)) + WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->thetazero; - if (buffer.fail()) - return false; - else + buffer >> element->pavail; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindGenTurbineType3IEC_WindAeroLinearIEC(BaseClass*, BaseClass*); -bool assign_WindAeroLinearIEC_WindGenTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindAeroLinearIEC_thetazero(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1); - WindGenTurbineType3IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindGenTurbineType3IEC != element2) + buffer >> element->thetazero; + if (!buffer.fail()) { - element->WindGenTurbineType3IEC = element2; - return assign_WindGenTurbineType3IEC_WindAeroLinearIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_WindAeroLinearIEC_dpomega(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dpomega; if (!buffer.str().empty()) @@ -150,7 +150,8 @@ bool get_WindAeroLinearIEC_dpomega(const BaseClass* BaseClass_ptr1, std::strings bool get_WindAeroLinearIEC_dptheta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dptheta; if (!buffer.str().empty()) @@ -164,7 +165,8 @@ bool get_WindAeroLinearIEC_dptheta(const BaseClass* BaseClass_ptr1, std::strings bool get_WindAeroLinearIEC_omegazero(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->omegazero; if (!buffer.str().empty()) @@ -178,7 +180,8 @@ bool get_WindAeroLinearIEC_omegazero(const BaseClass* BaseClass_ptr1, std::strin bool get_WindAeroLinearIEC_pavail(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pavail; if (!buffer.str().empty()) @@ -192,7 +195,8 @@ bool get_WindAeroLinearIEC_pavail(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindAeroLinearIEC_thetazero(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindAeroLinearIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thetazero; if (!buffer.str().empty()) @@ -204,8 +208,6 @@ bool get_WindAeroLinearIEC_thetazero(const BaseClass* BaseClass_ptr1, std::strin return false; } - - const char WindAeroLinearIEC::debugName[] = "WindAeroLinearIEC"; const char* WindAeroLinearIEC::debugString() const { @@ -214,21 +216,21 @@ const char* WindAeroLinearIEC::debugString() const void WindAeroLinearIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindAeroLinearIEC"), &WindAeroLinearIEC_factory)); + factory_map.emplace("cim:WindAeroLinearIEC", &WindAeroLinearIEC_factory); } void WindAeroLinearIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindAeroLinearIEC.dpomega"), &assign_WindAeroLinearIEC_dpomega)); - assign_map.insert(std::make_pair(std::string("cim:WindAeroLinearIEC.dptheta"), &assign_WindAeroLinearIEC_dptheta)); - assign_map.insert(std::make_pair(std::string("cim:WindAeroLinearIEC.omegazero"), &assign_WindAeroLinearIEC_omegazero)); - assign_map.insert(std::make_pair(std::string("cim:WindAeroLinearIEC.pavail"), &assign_WindAeroLinearIEC_pavail)); - assign_map.insert(std::make_pair(std::string("cim:WindAeroLinearIEC.thetazero"), &assign_WindAeroLinearIEC_thetazero)); + assign_map.emplace("cim:WindAeroLinearIEC.dpomega", &assign_WindAeroLinearIEC_dpomega); + assign_map.emplace("cim:WindAeroLinearIEC.dptheta", &assign_WindAeroLinearIEC_dptheta); + assign_map.emplace("cim:WindAeroLinearIEC.omegazero", &assign_WindAeroLinearIEC_omegazero); + assign_map.emplace("cim:WindAeroLinearIEC.pavail", &assign_WindAeroLinearIEC_pavail); + assign_map.emplace("cim:WindAeroLinearIEC.thetazero", &assign_WindAeroLinearIEC_thetazero); } void WindAeroLinearIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindAeroLinearIEC.WindGenTurbineType3IEC"), &assign_WindAeroLinearIEC_WindGenTurbineType3IEC)); + assign_map.emplace("cim:WindAeroLinearIEC.WindGenTurbineType3IEC", &assign_WindAeroLinearIEC_WindGenTurbineType3IEC); } void WindAeroLinearIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/WindAeroLinearIEC.hpp b/CGMES_2.4.15_27JAN2020/WindAeroLinearIEC.hpp index d7d0521b1..0e71d0eb4 100644 --- a/CGMES_2.4.15_27JAN2020/WindAeroLinearIEC.hpp +++ b/CGMES_2.4.15_27JAN2020/WindAeroLinearIEC.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class WindGenTurbineType3IEC; - /* - The linearised aerodynamic model. Reference: IEC Standard 614000-27-1 Section 6.6.1.2. - */ + /** \brief The linearised aerodynamic model. Reference: IEC Standard 614000-27-1 Section 6.6.1.2. */ class WindAeroLinearIEC : public IdentifiedObject { public: @@ -29,12 +27,23 @@ namespace CIMPP WindAeroLinearIEC(); ~WindAeroLinearIEC() override; - CIMPP::WindGenTurbineType3IEC* WindGenTurbineType3IEC; /* Wind generator type 3 model with which this wind aerodynamic model is associated. Default: 0 */ - CIMPP::PU dpomega; /* Partial derivative of aerodynamic power with respect to changes in WTR speed (). It is case dependent parameter. Default: nullptr */ - CIMPP::PU dptheta; /* Partial derivative of aerodynamic power with respect to changes in pitch angle (). It is case dependent parameter. Default: nullptr */ - CIMPP::PU omegazero; /* Rotor speed if the wind turbine is not derated (). It is case dependent parameter. Default: nullptr */ - CIMPP::PU pavail; /* Available aerodynamic power (). It is case dependent parameter. Default: nullptr */ - CIMPP::AngleDegrees thetazero; /* Pitch angle if the wind turbine is not derated (). It is case dependent parameter. Default: nullptr */ + /** \brief Wind generator type 3 model with which this wind aerodynamic model is associated. Default: 0 */ + CIMPP::WindGenTurbineType3IEC* WindGenTurbineType3IEC; + + /** \brief Partial derivative of aerodynamic power with respect to changes in WTR speed (). It is case dependent parameter. Default: nullptr */ + CIMPP::PU dpomega; + + /** \brief Partial derivative of aerodynamic power with respect to changes in pitch angle (). It is case dependent parameter. Default: nullptr */ + CIMPP::PU dptheta; + + /** \brief Rotor speed if the wind turbine is not derated (). It is case dependent parameter. Default: nullptr */ + CIMPP::PU omegazero; + + /** \brief Available aerodynamic power (). It is case dependent parameter. Default: nullptr */ + CIMPP::PU pavail; + + /** \brief Pitch angle if the wind turbine is not derated (). It is case dependent parameter. Default: nullptr */ + CIMPP::AngleDegrees thetazero; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/WindContCurrLimIEC.cpp b/CGMES_2.4.15_27JAN2020/WindContCurrLimIEC.cpp index 917cb4c05..68e2ece08 100644 --- a/CGMES_2.4.15_27JAN2020/WindContCurrLimIEC.cpp +++ b/CGMES_2.4.15_27JAN2020/WindContCurrLimIEC.cpp @@ -10,16 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindDynamicsLookupTable.hpp" #include "WindTurbineType3or4IEC.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" using namespace CIMPP; -WindContCurrLimIEC::WindContCurrLimIEC() : WindTurbineType3or4IEC(nullptr) {}; -WindContCurrLimIEC::~WindContCurrLimIEC() {}; +WindContCurrLimIEC::WindContCurrLimIEC() : WindTurbineType3or4IEC(nullptr) {} +WindContCurrLimIEC::~WindContCurrLimIEC() {} static const std::list PossibleProfilesForClass = { @@ -52,109 +47,116 @@ WindContCurrLimIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindContCurrLimIEC_imax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindDynamicsLookupTable_WindContCurrLimIEC(BaseClass*, BaseClass*); +bool assign_WindContCurrLimIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->imax; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) + { + element->WindDynamicsLookupTable.push_back(element2); + return assign_WindDynamicsLookupTable_WindContCurrLimIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindContCurrLimIEC_imaxdip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType3or4IEC_WindContCurrLimIEC(BaseClass*, BaseClass*); +bool assign_WindContCurrLimIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType3or4IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->imaxdip; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType3or4IEC != element2) + { + element->WindTurbineType3or4IEC = element2; + return assign_WindTurbineType3or4IEC_WindContCurrLimIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindContCurrLimIEC_mdfslim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContCurrLimIEC_imax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->mdfslim; - if (buffer.fail()) - return false; - else + buffer >> element->imax; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContCurrLimIEC_mqpri(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContCurrLimIEC_imaxdip(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->mqpri; - if (buffer.fail()) - return false; - else + buffer >> element->imaxdip; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContCurrLimIEC_tufilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContCurrLimIEC_mdfslim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tufilt; - if (buffer.fail()) - return false; - else + buffer >> element->mdfslim; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindDynamicsLookupTable_WindContCurrLimIEC(BaseClass*, BaseClass*); -bool assign_WindContCurrLimIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindContCurrLimIEC_mqpri(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); - WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) + buffer >> element->mqpri; + if (!buffer.fail()) { - element->WindDynamicsLookupTable.push_back(element2); - return assign_WindDynamicsLookupTable_WindContCurrLimIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_WindTurbineType3or4IEC_WindContCurrLimIEC(BaseClass*, BaseClass*); -bool assign_WindContCurrLimIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_WindContCurrLimIEC_tufilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType3or4IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType3or4IEC != element2) + buffer >> element->tufilt; + if (!buffer.fail()) { - element->WindTurbineType3or4IEC = element2; - return assign_WindTurbineType3or4IEC_WindContCurrLimIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + + bool get_WindContCurrLimIEC_imax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->imax; if (!buffer.str().empty()) @@ -168,7 +170,8 @@ bool get_WindContCurrLimIEC_imax(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindContCurrLimIEC_imaxdip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->imaxdip; if (!buffer.str().empty()) @@ -182,7 +185,8 @@ bool get_WindContCurrLimIEC_imaxdip(const BaseClass* BaseClass_ptr1, std::string bool get_WindContCurrLimIEC_mdfslim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mdfslim; if (!buffer.str().empty()) @@ -196,7 +200,8 @@ bool get_WindContCurrLimIEC_mdfslim(const BaseClass* BaseClass_ptr1, std::string bool get_WindContCurrLimIEC_mqpri(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mqpri; if (!buffer.str().empty()) @@ -210,7 +215,8 @@ bool get_WindContCurrLimIEC_mqpri(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindContCurrLimIEC_tufilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tufilt; if (!buffer.str().empty()) @@ -222,8 +228,6 @@ bool get_WindContCurrLimIEC_tufilt(const BaseClass* BaseClass_ptr1, std::strings return false; } - - const char WindContCurrLimIEC::debugName[] = "WindContCurrLimIEC"; const char* WindContCurrLimIEC::debugString() const { @@ -232,22 +236,22 @@ const char* WindContCurrLimIEC::debugString() const void WindContCurrLimIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindContCurrLimIEC"), &WindContCurrLimIEC_factory)); + factory_map.emplace("cim:WindContCurrLimIEC", &WindContCurrLimIEC_factory); } void WindContCurrLimIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContCurrLimIEC.imax"), &assign_WindContCurrLimIEC_imax)); - assign_map.insert(std::make_pair(std::string("cim:WindContCurrLimIEC.imaxdip"), &assign_WindContCurrLimIEC_imaxdip)); - assign_map.insert(std::make_pair(std::string("cim:WindContCurrLimIEC.mdfslim"), &assign_WindContCurrLimIEC_mdfslim)); - assign_map.insert(std::make_pair(std::string("cim:WindContCurrLimIEC.mqpri"), &assign_WindContCurrLimIEC_mqpri)); - assign_map.insert(std::make_pair(std::string("cim:WindContCurrLimIEC.tufilt"), &assign_WindContCurrLimIEC_tufilt)); + assign_map.emplace("cim:WindContCurrLimIEC.imax", &assign_WindContCurrLimIEC_imax); + assign_map.emplace("cim:WindContCurrLimIEC.imaxdip", &assign_WindContCurrLimIEC_imaxdip); + assign_map.emplace("cim:WindContCurrLimIEC.mdfslim", &assign_WindContCurrLimIEC_mdfslim); + assign_map.emplace("cim:WindContCurrLimIEC.mqpri", &assign_WindContCurrLimIEC_mqpri); + assign_map.emplace("cim:WindContCurrLimIEC.tufilt", &assign_WindContCurrLimIEC_tufilt); } void WindContCurrLimIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContCurrLimIEC.WindDynamicsLookupTable"), &assign_WindContCurrLimIEC_WindDynamicsLookupTable)); - assign_map.insert(std::make_pair(std::string("cim:WindContCurrLimIEC.WindTurbineType3or4IEC"), &assign_WindContCurrLimIEC_WindTurbineType3or4IEC)); + assign_map.emplace("cim:WindContCurrLimIEC.WindDynamicsLookupTable", &assign_WindContCurrLimIEC_WindDynamicsLookupTable); + assign_map.emplace("cim:WindContCurrLimIEC.WindTurbineType3or4IEC", &assign_WindContCurrLimIEC_WindTurbineType3or4IEC); } void WindContCurrLimIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/WindContCurrLimIEC.hpp b/CGMES_2.4.15_27JAN2020/WindContCurrLimIEC.hpp index 96153b35a..eee20358c 100644 --- a/CGMES_2.4.15_27JAN2020/WindContCurrLimIEC.hpp +++ b/CGMES_2.4.15_27JAN2020/WindContCurrLimIEC.hpp @@ -21,9 +21,7 @@ namespace CIMPP class WindDynamicsLookupTable; class WindTurbineType3or4IEC; - /* - Current limitation model. The current limitation model combines the physical limits. Reference: IEC Standard 61400-27-1 Section 6.6.5.7. - */ + /** \brief Current limitation model. The current limitation model combines the physical limits. Reference: IEC Standard 61400-27-1 Section 6.6.5.7. */ class WindContCurrLimIEC : public IdentifiedObject { public: @@ -31,13 +29,26 @@ namespace CIMPP WindContCurrLimIEC(); ~WindContCurrLimIEC() override; - std::list WindDynamicsLookupTable; /* The current control limitation model with which this wind dynamics lookup table is associated. Default: 0 */ - CIMPP::WindTurbineType3or4IEC* WindTurbineType3or4IEC; /* Wind turbine type 3 or 4 model with which this wind control current limitation model is associated. Default: 0 */ - CIMPP::PU imax; /* Maximum continuous current at the wind turbine terminals (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU imaxdip; /* Maximum current during voltage dip at the wind turbine terminals (). It is project dependent parameter. Default: nullptr */ - CIMPP::Boolean mdfslim; /* Limitation of type 3 stator current (): - false=0: total current limitation, - true=1: stator current limitation). It is type dependent parameter. Default: false */ - CIMPP::Boolean mqpri; /* Prioritisation of q control during LVRT (): - true = 1: reactive power priority, - false = 0: active power priority. It is project dependent parameter. Default: false */ - CIMPP::Seconds tufilt; /* Voltage measurement filter time constant (). It is type dependent parameter. Default: nullptr */ + /** \brief The current control limitation model with which this wind dynamics lookup table is associated. Default: 0 */ + std::list WindDynamicsLookupTable; + + /** \brief Wind turbine type 3 or 4 model with which this wind control current limitation model is associated. Default: 0 */ + CIMPP::WindTurbineType3or4IEC* WindTurbineType3or4IEC; + + /** \brief Maximum continuous current at the wind turbine terminals (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU imax; + + /** \brief Maximum current during voltage dip at the wind turbine terminals (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU imaxdip; + + /** \brief Limitation of type 3 stator current (): - false=0: total current limitation, - true=1: stator current limitation). It is type dependent parameter. Default: false */ + CIMPP::Boolean mdfslim; + + /** \brief Prioritisation of q control during LVRT (): - true = 1: reactive power priority, - false = 0: active power priority. It is project dependent parameter. Default: false */ + CIMPP::Boolean mqpri; + + /** \brief Voltage measurement filter time constant (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tufilt; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/WindContPType3IEC.cpp b/CGMES_2.4.15_27JAN2020/WindContPType3IEC.cpp index c34b16422..441be1a61 100644 --- a/CGMES_2.4.15_27JAN2020/WindContPType3IEC.cpp +++ b/CGMES_2.4.15_27JAN2020/WindContPType3IEC.cpp @@ -10,32 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindDynamicsLookupTable.hpp" #include "WindGenTurbineType3IEC.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" using namespace CIMPP; -WindContPType3IEC::WindContPType3IEC() : WindGenTurbineType3IEC(nullptr) {}; -WindContPType3IEC::~WindContPType3IEC() {}; +WindContPType3IEC::WindContPType3IEC() : WindGenTurbineType3IEC(nullptr) {} +WindContPType3IEC::~WindContPType3IEC() {} static const std::list PossibleProfilesForClass = { @@ -84,317 +63,340 @@ WindContPType3IEC::getPossibleProfilesForAttributes() const return map; } +bool assign_WindDynamicsLookupTable_WindContPType3IEC(BaseClass*, BaseClass*); +bool assign_WindContPType3IEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) + { + element->WindDynamicsLookupTable.push_back(element2); + return assign_WindDynamicsLookupTable_WindContPType3IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_WindContPType3IEC_dpmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType3IEC_WindContPType3IEC(BaseClass*, BaseClass*); +bool assign_WindContPType3IEC_WindGenTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + WindGenTurbineType3IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindGenTurbineType3IEC != element2) + { + element->WindGenTurbineType3IEC = element2; + return assign_WindGenTurbineType3IEC_WindContPType3IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindContPType3IEC_dpmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dpmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_dtrisemaxlvrt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_dtrisemaxlvrt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dtrisemaxlvrt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_kdtd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_kdtd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kdtd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_kip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_kip(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kip; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_kpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_kpp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_mplvrt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_mplvrt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mplvrt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_omegaoffset(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_omegaoffset(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->omegaoffset; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_pdtdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_pdtdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pdtdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_rramp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_rramp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rramp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_tdvs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_tdvs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdvs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_temin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_temin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->temin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_tomegafilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_tomegafilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tomegafilt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_tpfilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_tpfilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpfilt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_tpord(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_tpord(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpord; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_tufilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_tufilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tufilt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_tuscale(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_tuscale(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tuscale; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_twref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_twref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->twref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_udvs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_udvs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->udvs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_updip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_updip(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->updip; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_wdtd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_wdtd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wdtd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_zeta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_zeta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->zeta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindDynamicsLookupTable_WindContPType3IEC(BaseClass*, BaseClass*); -bool assign_WindContPType3IEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) -{ - WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); - WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) - { - if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) - { - element->WindDynamicsLookupTable.push_back(element2); - return assign_WindDynamicsLookupTable_WindContPType3IEC(BaseClass_ptr2, BaseClass_ptr1); - } - return true; - } - return false; -} -bool assign_WindGenTurbineType3IEC_WindContPType3IEC(BaseClass*, BaseClass*); -bool assign_WindContPType3IEC_WindGenTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) -{ - WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); - WindGenTurbineType3IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) - { - if (element->WindGenTurbineType3IEC != element2) - { - element->WindGenTurbineType3IEC = element2; - return assign_WindGenTurbineType3IEC_WindContPType3IEC(BaseClass_ptr2, BaseClass_ptr1); - } - return true; - } - return false; -} bool get_WindContPType3IEC_dpmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dpmax; if (!buffer.str().empty()) @@ -408,7 +410,8 @@ bool get_WindContPType3IEC_dpmax(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindContPType3IEC_dtrisemaxlvrt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dtrisemaxlvrt; if (!buffer.str().empty()) @@ -422,7 +425,8 @@ bool get_WindContPType3IEC_dtrisemaxlvrt(const BaseClass* BaseClass_ptr1, std::s bool get_WindContPType3IEC_kdtd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdtd; if (!buffer.str().empty()) @@ -436,7 +440,8 @@ bool get_WindContPType3IEC_kdtd(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindContPType3IEC_kip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kip; if (!buffer.str().empty()) @@ -450,7 +455,8 @@ bool get_WindContPType3IEC_kip(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_WindContPType3IEC_kpp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpp; if (!buffer.str().empty()) @@ -464,7 +470,8 @@ bool get_WindContPType3IEC_kpp(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_WindContPType3IEC_mplvrt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mplvrt; if (!buffer.str().empty()) @@ -478,7 +485,8 @@ bool get_WindContPType3IEC_mplvrt(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindContPType3IEC_omegaoffset(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->omegaoffset; if (!buffer.str().empty()) @@ -492,7 +500,8 @@ bool get_WindContPType3IEC_omegaoffset(const BaseClass* BaseClass_ptr1, std::str bool get_WindContPType3IEC_pdtdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pdtdmax; if (!buffer.str().empty()) @@ -506,7 +515,8 @@ bool get_WindContPType3IEC_pdtdmax(const BaseClass* BaseClass_ptr1, std::strings bool get_WindContPType3IEC_rramp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rramp; if (!buffer.str().empty()) @@ -520,7 +530,8 @@ bool get_WindContPType3IEC_rramp(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindContPType3IEC_tdvs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdvs; if (!buffer.str().empty()) @@ -534,7 +545,8 @@ bool get_WindContPType3IEC_tdvs(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindContPType3IEC_temin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->temin; if (!buffer.str().empty()) @@ -548,7 +560,8 @@ bool get_WindContPType3IEC_temin(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindContPType3IEC_tomegafilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tomegafilt; if (!buffer.str().empty()) @@ -562,7 +575,8 @@ bool get_WindContPType3IEC_tomegafilt(const BaseClass* BaseClass_ptr1, std::stri bool get_WindContPType3IEC_tpfilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpfilt; if (!buffer.str().empty()) @@ -576,7 +590,8 @@ bool get_WindContPType3IEC_tpfilt(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindContPType3IEC_tpord(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpord; if (!buffer.str().empty()) @@ -590,7 +605,8 @@ bool get_WindContPType3IEC_tpord(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindContPType3IEC_tufilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tufilt; if (!buffer.str().empty()) @@ -604,7 +620,8 @@ bool get_WindContPType3IEC_tufilt(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindContPType3IEC_tuscale(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tuscale; if (!buffer.str().empty()) @@ -618,7 +635,8 @@ bool get_WindContPType3IEC_tuscale(const BaseClass* BaseClass_ptr1, std::strings bool get_WindContPType3IEC_twref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twref; if (!buffer.str().empty()) @@ -632,7 +650,8 @@ bool get_WindContPType3IEC_twref(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindContPType3IEC_udvs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->udvs; if (!buffer.str().empty()) @@ -646,7 +665,8 @@ bool get_WindContPType3IEC_udvs(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindContPType3IEC_updip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->updip; if (!buffer.str().empty()) @@ -660,7 +680,8 @@ bool get_WindContPType3IEC_updip(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindContPType3IEC_wdtd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wdtd; if (!buffer.str().empty()) @@ -674,7 +695,8 @@ bool get_WindContPType3IEC_wdtd(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindContPType3IEC_zeta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->zeta; if (!buffer.str().empty()) @@ -686,8 +708,6 @@ bool get_WindContPType3IEC_zeta(const BaseClass* BaseClass_ptr1, std::stringstre return false; } - - const char WindContPType3IEC::debugName[] = "WindContPType3IEC"; const char* WindContPType3IEC::debugString() const { @@ -696,38 +716,38 @@ const char* WindContPType3IEC::debugString() const void WindContPType3IEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindContPType3IEC"), &WindContPType3IEC_factory)); + factory_map.emplace("cim:WindContPType3IEC", &WindContPType3IEC_factory); } void WindContPType3IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.dpmax"), &assign_WindContPType3IEC_dpmax)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.dtrisemaxlvrt"), &assign_WindContPType3IEC_dtrisemaxlvrt)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.kdtd"), &assign_WindContPType3IEC_kdtd)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.kip"), &assign_WindContPType3IEC_kip)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.kpp"), &assign_WindContPType3IEC_kpp)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.mplvrt"), &assign_WindContPType3IEC_mplvrt)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.omegaoffset"), &assign_WindContPType3IEC_omegaoffset)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.pdtdmax"), &assign_WindContPType3IEC_pdtdmax)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.rramp"), &assign_WindContPType3IEC_rramp)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.tdvs"), &assign_WindContPType3IEC_tdvs)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.temin"), &assign_WindContPType3IEC_temin)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.tomegafilt"), &assign_WindContPType3IEC_tomegafilt)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.tpfilt"), &assign_WindContPType3IEC_tpfilt)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.tpord"), &assign_WindContPType3IEC_tpord)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.tufilt"), &assign_WindContPType3IEC_tufilt)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.tuscale"), &assign_WindContPType3IEC_tuscale)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.twref"), &assign_WindContPType3IEC_twref)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.udvs"), &assign_WindContPType3IEC_udvs)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.updip"), &assign_WindContPType3IEC_updip)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.wdtd"), &assign_WindContPType3IEC_wdtd)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.zeta"), &assign_WindContPType3IEC_zeta)); + assign_map.emplace("cim:WindContPType3IEC.dpmax", &assign_WindContPType3IEC_dpmax); + assign_map.emplace("cim:WindContPType3IEC.dtrisemaxlvrt", &assign_WindContPType3IEC_dtrisemaxlvrt); + assign_map.emplace("cim:WindContPType3IEC.kdtd", &assign_WindContPType3IEC_kdtd); + assign_map.emplace("cim:WindContPType3IEC.kip", &assign_WindContPType3IEC_kip); + assign_map.emplace("cim:WindContPType3IEC.kpp", &assign_WindContPType3IEC_kpp); + assign_map.emplace("cim:WindContPType3IEC.mplvrt", &assign_WindContPType3IEC_mplvrt); + assign_map.emplace("cim:WindContPType3IEC.omegaoffset", &assign_WindContPType3IEC_omegaoffset); + assign_map.emplace("cim:WindContPType3IEC.pdtdmax", &assign_WindContPType3IEC_pdtdmax); + assign_map.emplace("cim:WindContPType3IEC.rramp", &assign_WindContPType3IEC_rramp); + assign_map.emplace("cim:WindContPType3IEC.tdvs", &assign_WindContPType3IEC_tdvs); + assign_map.emplace("cim:WindContPType3IEC.temin", &assign_WindContPType3IEC_temin); + assign_map.emplace("cim:WindContPType3IEC.tomegafilt", &assign_WindContPType3IEC_tomegafilt); + assign_map.emplace("cim:WindContPType3IEC.tpfilt", &assign_WindContPType3IEC_tpfilt); + assign_map.emplace("cim:WindContPType3IEC.tpord", &assign_WindContPType3IEC_tpord); + assign_map.emplace("cim:WindContPType3IEC.tufilt", &assign_WindContPType3IEC_tufilt); + assign_map.emplace("cim:WindContPType3IEC.tuscale", &assign_WindContPType3IEC_tuscale); + assign_map.emplace("cim:WindContPType3IEC.twref", &assign_WindContPType3IEC_twref); + assign_map.emplace("cim:WindContPType3IEC.udvs", &assign_WindContPType3IEC_udvs); + assign_map.emplace("cim:WindContPType3IEC.updip", &assign_WindContPType3IEC_updip); + assign_map.emplace("cim:WindContPType3IEC.wdtd", &assign_WindContPType3IEC_wdtd); + assign_map.emplace("cim:WindContPType3IEC.zeta", &assign_WindContPType3IEC_zeta); } void WindContPType3IEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.WindDynamicsLookupTable"), &assign_WindContPType3IEC_WindDynamicsLookupTable)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.WindGenTurbineType3IEC"), &assign_WindContPType3IEC_WindGenTurbineType3IEC)); + assign_map.emplace("cim:WindContPType3IEC.WindDynamicsLookupTable", &assign_WindContPType3IEC_WindDynamicsLookupTable); + assign_map.emplace("cim:WindContPType3IEC.WindGenTurbineType3IEC", &assign_WindContPType3IEC_WindGenTurbineType3IEC); } void WindContPType3IEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/WindContPType3IEC.hpp b/CGMES_2.4.15_27JAN2020/WindContPType3IEC.hpp index 4731d4ce7..f73e04869 100644 --- a/CGMES_2.4.15_27JAN2020/WindContPType3IEC.hpp +++ b/CGMES_2.4.15_27JAN2020/WindContPType3IEC.hpp @@ -22,9 +22,7 @@ namespace CIMPP class WindDynamicsLookupTable; class WindGenTurbineType3IEC; - /* - P control model Type 3. Reference: IEC Standard 61400-27-1 Section 6.6.5.3. - */ + /** \brief P control model Type 3. Reference: IEC Standard 61400-27-1 Section 6.6.5.3. */ class WindContPType3IEC : public IdentifiedObject { public: @@ -32,29 +30,74 @@ namespace CIMPP WindContPType3IEC(); ~WindContPType3IEC() override; - std::list WindDynamicsLookupTable; /* The P control type 3 model with which this wind dynamics lookup table is associated. Default: 0 */ - CIMPP::WindGenTurbineType3IEC* WindGenTurbineType3IEC; /* Wind turbine type 3 model with which this Wind control P type 3 model is associated. Default: 0 */ - CIMPP::PU dpmax; /* Maximum wind turbine power ramp rate (). It is project dependent parameter. Default: nullptr */ - CIMPP::PU dtrisemaxlvrt; /* Limitation of torque rise rate during LVRT for S (d). It is project dependent parameter. Default: nullptr */ - CIMPP::PU kdtd; /* Gain for active drive train damping (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kip; /* PI controller integration parameter (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kpp; /* PI controller proportional gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::Boolean mplvrt; /* Enable LVRT power control mode (M true = 1: voltage control false = 0: reactive power control. It is project dependent parameter. Default: false */ - CIMPP::PU omegaoffset; /* Offset to reference value that limits controller action during rotor speed changes (omega). It is case dependent parameter. Default: nullptr */ - CIMPP::PU pdtdmax; /* Maximum active drive train damping power (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU rramp; /* Ramp limitation of torque, required in some grid codes (). It is project dependent parameter. Default: nullptr */ - CIMPP::Seconds tdvs; /* Timedelay after deep voltage sags (T). It is project dependent parameter. Default: nullptr */ - CIMPP::PU temin; /* Minimum electrical generator torque (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tomegafilt; /* Filter time constant for generator speed measurement (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tpfilt; /* Filter time constant for power measurement (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU tpord; /* Time constant in power order lag (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tufilt; /* Filter time constant for voltage measurement (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU tuscale; /* Voltage scaling factor of reset-torque (T). It is project dependent parameter. Default: nullptr */ - CIMPP::Seconds twref; /* Time constant in speed reference filter (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU udvs; /* Voltage limit for hold LVRT status after deep voltage sags (). It is project dependent parameter. Default: nullptr */ - CIMPP::PU updip; /* Voltage dip threshold for P-control (). Part of turbine control, often different (e.g 0.8) from converter thresholds. It is project dependent parameter. Default: nullptr */ - CIMPP::PU wdtd; /* Active drive train damping frequency (omega). It can be calculated from two mass model parameters. It is type dependent parameter. Default: nullptr */ - CIMPP::Simple_Float zeta; /* Coefficient for active drive train damping (zeta). It is type dependent parameter. Default: nullptr */ + /** \brief The P control type 3 model with which this wind dynamics lookup table is associated. Default: 0 */ + std::list WindDynamicsLookupTable; + + /** \brief Wind turbine type 3 model with which this Wind control P type 3 model is associated. Default: 0 */ + CIMPP::WindGenTurbineType3IEC* WindGenTurbineType3IEC; + + /** \brief Maximum wind turbine power ramp rate (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU dpmax; + + /** \brief Limitation of torque rise rate during LVRT for S (d). It is project dependent parameter. Default: nullptr */ + CIMPP::PU dtrisemaxlvrt; + + /** \brief Gain for active drive train damping (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kdtd; + + /** \brief PI controller integration parameter (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kip; + + /** \brief PI controller proportional gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kpp; + + /** \brief Enable LVRT power control mode (M true = 1: voltage control false = 0: reactive power control. It is project dependent parameter. Default: false */ + CIMPP::Boolean mplvrt; + + /** \brief Offset to reference value that limits controller action during rotor speed changes (omega). It is case dependent parameter. Default: nullptr */ + CIMPP::PU omegaoffset; + + /** \brief Maximum active drive train damping power (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU pdtdmax; + + /** \brief Ramp limitation of torque, required in some grid codes (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU rramp; + + /** \brief Timedelay after deep voltage sags (T). It is project dependent parameter. Default: nullptr */ + CIMPP::Seconds tdvs; + + /** \brief Minimum electrical generator torque (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU temin; + + /** \brief Filter time constant for generator speed measurement (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tomegafilt; + + /** \brief Filter time constant for power measurement (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tpfilt; + + /** \brief Time constant in power order lag (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU tpord; + + /** \brief Filter time constant for voltage measurement (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tufilt; + + /** \brief Voltage scaling factor of reset-torque (T). It is project dependent parameter. Default: nullptr */ + CIMPP::PU tuscale; + + /** \brief Time constant in speed reference filter (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds twref; + + /** \brief Voltage limit for hold LVRT status after deep voltage sags (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU udvs; + + /** \brief Voltage dip threshold for P-control (). Part of turbine control, often different (e.g 0.8) from converter thresholds. It is project dependent parameter. Default: nullptr */ + CIMPP::PU updip; + + /** \brief Active drive train damping frequency (omega). It can be calculated from two mass model parameters. It is type dependent parameter. Default: nullptr */ + CIMPP::PU wdtd; + + /** \brief Coefficient for active drive train damping (zeta). It is type dependent parameter. Default: nullptr */ + CIMPP::Simple_Float zeta; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/WindContPType4aIEC.cpp b/CGMES_2.4.15_27JAN2020/WindContPType4aIEC.cpp index ef175b49d..1c26a76c5 100644 --- a/CGMES_2.4.15_27JAN2020/WindContPType4aIEC.cpp +++ b/CGMES_2.4.15_27JAN2020/WindContPType4aIEC.cpp @@ -9,14 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "WindTurbineType4aIEC.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -WindContPType4aIEC::WindContPType4aIEC() : WindTurbineType4aIEC(nullptr) {}; -WindContPType4aIEC::~WindContPType4aIEC() {}; +WindContPType4aIEC::WindContPType4aIEC() : WindTurbineType4aIEC(nullptr) {} +WindContPType4aIEC::~WindContPType4aIEC() {} static const std::list PossibleProfilesForClass = { @@ -46,67 +43,70 @@ WindContPType4aIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindContPType4aIEC_dpmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType4aIEC_WindContPType4aIEC(BaseClass*, BaseClass*); +bool assign_WindContPType4aIEC_WindTurbineType4aIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType4aIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->dpmax; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType4aIEC != element2) + { + element->WindTurbineType4aIEC = element2; + return assign_WindTurbineType4aIEC_WindContPType4aIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindContPType4aIEC_tpord(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType4aIEC_dpmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tpord; - if (buffer.fail()) - return false; - else + buffer >> element->dpmax; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType4aIEC_tufilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType4aIEC_tpord(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tufilt; - if (buffer.fail()) - return false; - else + buffer >> element->tpord; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindTurbineType4aIEC_WindContPType4aIEC(BaseClass*, BaseClass*); -bool assign_WindContPType4aIEC_WindTurbineType4aIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindContPType4aIEC_tufilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType4aIEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType4aIEC != element2) + buffer >> element->tufilt; + if (!buffer.fail()) { - element->WindTurbineType4aIEC = element2; - return assign_WindTurbineType4aIEC_WindContPType4aIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_WindContPType4aIEC_dpmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dpmax; if (!buffer.str().empty()) @@ -120,7 +120,8 @@ bool get_WindContPType4aIEC_dpmax(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindContPType4aIEC_tpord(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpord; if (!buffer.str().empty()) @@ -134,7 +135,8 @@ bool get_WindContPType4aIEC_tpord(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindContPType4aIEC_tufilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tufilt; if (!buffer.str().empty()) @@ -146,8 +148,6 @@ bool get_WindContPType4aIEC_tufilt(const BaseClass* BaseClass_ptr1, std::strings return false; } - - const char WindContPType4aIEC::debugName[] = "WindContPType4aIEC"; const char* WindContPType4aIEC::debugString() const { @@ -156,19 +156,19 @@ const char* WindContPType4aIEC::debugString() const void WindContPType4aIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindContPType4aIEC"), &WindContPType4aIEC_factory)); + factory_map.emplace("cim:WindContPType4aIEC", &WindContPType4aIEC_factory); } void WindContPType4aIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContPType4aIEC.dpmax"), &assign_WindContPType4aIEC_dpmax)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType4aIEC.tpord"), &assign_WindContPType4aIEC_tpord)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType4aIEC.tufilt"), &assign_WindContPType4aIEC_tufilt)); + assign_map.emplace("cim:WindContPType4aIEC.dpmax", &assign_WindContPType4aIEC_dpmax); + assign_map.emplace("cim:WindContPType4aIEC.tpord", &assign_WindContPType4aIEC_tpord); + assign_map.emplace("cim:WindContPType4aIEC.tufilt", &assign_WindContPType4aIEC_tufilt); } void WindContPType4aIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContPType4aIEC.WindTurbineType4aIEC"), &assign_WindContPType4aIEC_WindTurbineType4aIEC)); + assign_map.emplace("cim:WindContPType4aIEC.WindTurbineType4aIEC", &assign_WindContPType4aIEC_WindTurbineType4aIEC); } void WindContPType4aIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/WindContPType4aIEC.hpp b/CGMES_2.4.15_27JAN2020/WindContPType4aIEC.hpp index 43e01221f..da1dc150e 100644 --- a/CGMES_2.4.15_27JAN2020/WindContPType4aIEC.hpp +++ b/CGMES_2.4.15_27JAN2020/WindContPType4aIEC.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class WindTurbineType4aIEC; - /* - P control model Type 4A. Reference: IEC Standard 61400-27-1 Section 6.6.5.4. - */ + /** \brief P control model Type 4A. Reference: IEC Standard 61400-27-1 Section 6.6.5.4. */ class WindContPType4aIEC : public IdentifiedObject { public: @@ -29,10 +27,17 @@ namespace CIMPP WindContPType4aIEC(); ~WindContPType4aIEC() override; - CIMPP::WindTurbineType4aIEC* WindTurbineType4aIEC; /* Wind turbine type 4A model with which this wind control P type 4A model is associated. Default: 0 */ - CIMPP::PU dpmax; /* Maximum wind turbine power ramp rate (). It is project dependent parameter. Default: nullptr */ - CIMPP::Seconds tpord; /* Time constant in power order lag (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tufilt; /* Voltage measurement filter time constant (). It is type dependent parameter. Default: nullptr */ + /** \brief Wind turbine type 4A model with which this wind control P type 4A model is associated. Default: 0 */ + CIMPP::WindTurbineType4aIEC* WindTurbineType4aIEC; + + /** \brief Maximum wind turbine power ramp rate (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU dpmax; + + /** \brief Time constant in power order lag (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tpord; + + /** \brief Voltage measurement filter time constant (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tufilt; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/WindContPType4bIEC.cpp b/CGMES_2.4.15_27JAN2020/WindContPType4bIEC.cpp index 85291e38c..63bf79cac 100644 --- a/CGMES_2.4.15_27JAN2020/WindContPType4bIEC.cpp +++ b/CGMES_2.4.15_27JAN2020/WindContPType4bIEC.cpp @@ -9,15 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "WindTurbineType4bIEC.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -WindContPType4bIEC::WindContPType4bIEC() : WindTurbineType4bIEC(nullptr) {}; -WindContPType4bIEC::~WindContPType4bIEC() {}; +WindContPType4bIEC::WindContPType4bIEC() : WindTurbineType4bIEC(nullptr) {} +WindContPType4bIEC::~WindContPType4bIEC() {} static const std::list PossibleProfilesForClass = { @@ -48,80 +44,84 @@ WindContPType4bIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindContPType4bIEC_dpmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType4bIEC_WindContPType4bIEC(BaseClass*, BaseClass*); +bool assign_WindContPType4bIEC_WindTurbineType4bIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType4bIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->dpmax; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType4bIEC != element2) + { + element->WindTurbineType4bIEC = element2; + return assign_WindTurbineType4bIEC_WindContPType4bIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindContPType4bIEC_tpaero(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType4bIEC_dpmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tpaero; - if (buffer.fail()) - return false; - else + buffer >> element->dpmax; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType4bIEC_tpord(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType4bIEC_tpaero(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tpord; - if (buffer.fail()) - return false; - else + buffer >> element->tpaero; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType4bIEC_tufilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType4bIEC_tpord(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tufilt; - if (buffer.fail()) - return false; - else + buffer >> element->tpord; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindTurbineType4bIEC_WindContPType4bIEC(BaseClass*, BaseClass*); -bool assign_WindContPType4bIEC_WindTurbineType4bIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindContPType4bIEC_tufilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType4bIEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType4bIEC != element2) + buffer >> element->tufilt; + if (!buffer.fail()) { - element->WindTurbineType4bIEC = element2; - return assign_WindTurbineType4bIEC_WindContPType4bIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_WindContPType4bIEC_dpmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dpmax; if (!buffer.str().empty()) @@ -135,7 +135,8 @@ bool get_WindContPType4bIEC_dpmax(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindContPType4bIEC_tpaero(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpaero; if (!buffer.str().empty()) @@ -149,7 +150,8 @@ bool get_WindContPType4bIEC_tpaero(const BaseClass* BaseClass_ptr1, std::strings bool get_WindContPType4bIEC_tpord(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpord; if (!buffer.str().empty()) @@ -163,7 +165,8 @@ bool get_WindContPType4bIEC_tpord(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindContPType4bIEC_tufilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tufilt; if (!buffer.str().empty()) @@ -175,8 +178,6 @@ bool get_WindContPType4bIEC_tufilt(const BaseClass* BaseClass_ptr1, std::strings return false; } - - const char WindContPType4bIEC::debugName[] = "WindContPType4bIEC"; const char* WindContPType4bIEC::debugString() const { @@ -185,20 +186,20 @@ const char* WindContPType4bIEC::debugString() const void WindContPType4bIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindContPType4bIEC"), &WindContPType4bIEC_factory)); + factory_map.emplace("cim:WindContPType4bIEC", &WindContPType4bIEC_factory); } void WindContPType4bIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContPType4bIEC.dpmax"), &assign_WindContPType4bIEC_dpmax)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType4bIEC.tpaero"), &assign_WindContPType4bIEC_tpaero)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType4bIEC.tpord"), &assign_WindContPType4bIEC_tpord)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType4bIEC.tufilt"), &assign_WindContPType4bIEC_tufilt)); + assign_map.emplace("cim:WindContPType4bIEC.dpmax", &assign_WindContPType4bIEC_dpmax); + assign_map.emplace("cim:WindContPType4bIEC.tpaero", &assign_WindContPType4bIEC_tpaero); + assign_map.emplace("cim:WindContPType4bIEC.tpord", &assign_WindContPType4bIEC_tpord); + assign_map.emplace("cim:WindContPType4bIEC.tufilt", &assign_WindContPType4bIEC_tufilt); } void WindContPType4bIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContPType4bIEC.WindTurbineType4bIEC"), &assign_WindContPType4bIEC_WindTurbineType4bIEC)); + assign_map.emplace("cim:WindContPType4bIEC.WindTurbineType4bIEC", &assign_WindContPType4bIEC_WindTurbineType4bIEC); } void WindContPType4bIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/WindContPType4bIEC.hpp b/CGMES_2.4.15_27JAN2020/WindContPType4bIEC.hpp index 3b49ddcb4..945825f0c 100644 --- a/CGMES_2.4.15_27JAN2020/WindContPType4bIEC.hpp +++ b/CGMES_2.4.15_27JAN2020/WindContPType4bIEC.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class WindTurbineType4bIEC; - /* - P control model Type 4B. Reference: IEC Standard 61400-27-1 Section 6.6.5.5. - */ + /** \brief P control model Type 4B. Reference: IEC Standard 61400-27-1 Section 6.6.5.5. */ class WindContPType4bIEC : public IdentifiedObject { public: @@ -29,11 +27,20 @@ namespace CIMPP WindContPType4bIEC(); ~WindContPType4bIEC() override; - CIMPP::WindTurbineType4bIEC* WindTurbineType4bIEC; /* Wind turbine type 4B model with which this wind control P type 4B model is associated. Default: 0 */ - CIMPP::PU dpmax; /* Maximum wind turbine power ramp rate (). It is project dependent parameter. Default: nullptr */ - CIMPP::Seconds tpaero; /* Time constant in aerodynamic power response (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tpord; /* Time constant in power order lag (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tufilt; /* Voltage measurement filter time constant (). It is type dependent parameter. Default: nullptr */ + /** \brief Wind turbine type 4B model with which this wind control P type 4B model is associated. Default: 0 */ + CIMPP::WindTurbineType4bIEC* WindTurbineType4bIEC; + + /** \brief Maximum wind turbine power ramp rate (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU dpmax; + + /** \brief Time constant in aerodynamic power response (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tpaero; + + /** \brief Time constant in power order lag (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tpord; + + /** \brief Voltage measurement filter time constant (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tufilt; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/WindContPitchAngleIEC.cpp b/CGMES_2.4.15_27JAN2020/WindContPitchAngleIEC.cpp index c7658e6fb..055ba9674 100644 --- a/CGMES_2.4.15_27JAN2020/WindContPitchAngleIEC.cpp +++ b/CGMES_2.4.15_27JAN2020/WindContPitchAngleIEC.cpp @@ -9,21 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "WindGenTurbineType3IEC.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "AngleDegrees.hpp" -#include "AngleDegrees.hpp" -#include "Seconds.hpp" using namespace CIMPP; -WindContPitchAngleIEC::WindContPitchAngleIEC() : WindGenTurbineType3IEC(nullptr) {}; -WindContPitchAngleIEC::~WindContPitchAngleIEC() {}; +WindContPitchAngleIEC::WindContPitchAngleIEC() : WindGenTurbineType3IEC(nullptr) {} +WindContPitchAngleIEC::~WindContPitchAngleIEC() {} static const std::list PossibleProfilesForClass = { @@ -60,158 +50,168 @@ WindContPitchAngleIEC::getPossibleProfilesForAttributes() const return map; } +bool assign_WindGenTurbineType3IEC_WindContPitchAngleIEC(BaseClass*, BaseClass*); +bool assign_WindContPitchAngleIEC_WindGenTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + WindGenTurbineType3IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindGenTurbineType3IEC != element2) + { + element->WindGenTurbineType3IEC = element2; + return assign_WindGenTurbineType3IEC_WindContPitchAngleIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_WindContPitchAngleIEC_dthetamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPitchAngleIEC_dthetamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dthetamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPitchAngleIEC_dthetamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPitchAngleIEC_dthetamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dthetamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPitchAngleIEC_kic(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPitchAngleIEC_kic(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kic; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPitchAngleIEC_kiomega(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPitchAngleIEC_kiomega(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kiomega; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPitchAngleIEC_kpc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPitchAngleIEC_kpc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPitchAngleIEC_kpomega(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPitchAngleIEC_kpomega(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpomega; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPitchAngleIEC_kpx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPitchAngleIEC_kpx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPitchAngleIEC_thetamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPitchAngleIEC_thetamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->thetamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPitchAngleIEC_thetamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPitchAngleIEC_thetamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->thetamin; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_WindContPitchAngleIEC_ttheta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->ttheta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindGenTurbineType3IEC_WindContPitchAngleIEC(BaseClass*, BaseClass*); -bool assign_WindContPitchAngleIEC_WindGenTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindContPitchAngleIEC_ttheta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); - WindGenTurbineType3IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindGenTurbineType3IEC != element2) + buffer >> element->ttheta; + if (!buffer.fail()) { - element->WindGenTurbineType3IEC = element2; - return assign_WindGenTurbineType3IEC_WindContPitchAngleIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_WindContPitchAngleIEC_dthetamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dthetamax; if (!buffer.str().empty()) @@ -225,7 +225,8 @@ bool get_WindContPitchAngleIEC_dthetamax(const BaseClass* BaseClass_ptr1, std::s bool get_WindContPitchAngleIEC_dthetamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dthetamin; if (!buffer.str().empty()) @@ -239,7 +240,8 @@ bool get_WindContPitchAngleIEC_dthetamin(const BaseClass* BaseClass_ptr1, std::s bool get_WindContPitchAngleIEC_kic(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kic; if (!buffer.str().empty()) @@ -253,7 +255,8 @@ bool get_WindContPitchAngleIEC_kic(const BaseClass* BaseClass_ptr1, std::strings bool get_WindContPitchAngleIEC_kiomega(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kiomega; if (!buffer.str().empty()) @@ -267,7 +270,8 @@ bool get_WindContPitchAngleIEC_kiomega(const BaseClass* BaseClass_ptr1, std::str bool get_WindContPitchAngleIEC_kpc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpc; if (!buffer.str().empty()) @@ -281,7 +285,8 @@ bool get_WindContPitchAngleIEC_kpc(const BaseClass* BaseClass_ptr1, std::strings bool get_WindContPitchAngleIEC_kpomega(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpomega; if (!buffer.str().empty()) @@ -295,7 +300,8 @@ bool get_WindContPitchAngleIEC_kpomega(const BaseClass* BaseClass_ptr1, std::str bool get_WindContPitchAngleIEC_kpx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpx; if (!buffer.str().empty()) @@ -309,7 +315,8 @@ bool get_WindContPitchAngleIEC_kpx(const BaseClass* BaseClass_ptr1, std::strings bool get_WindContPitchAngleIEC_thetamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thetamax; if (!buffer.str().empty()) @@ -323,7 +330,8 @@ bool get_WindContPitchAngleIEC_thetamax(const BaseClass* BaseClass_ptr1, std::st bool get_WindContPitchAngleIEC_thetamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thetamin; if (!buffer.str().empty()) @@ -337,7 +345,8 @@ bool get_WindContPitchAngleIEC_thetamin(const BaseClass* BaseClass_ptr1, std::st bool get_WindContPitchAngleIEC_ttheta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ttheta; if (!buffer.str().empty()) @@ -349,8 +358,6 @@ bool get_WindContPitchAngleIEC_ttheta(const BaseClass* BaseClass_ptr1, std::stri return false; } - - const char WindContPitchAngleIEC::debugName[] = "WindContPitchAngleIEC"; const char* WindContPitchAngleIEC::debugString() const { @@ -359,26 +366,26 @@ const char* WindContPitchAngleIEC::debugString() const void WindContPitchAngleIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC"), &WindContPitchAngleIEC_factory)); + factory_map.emplace("cim:WindContPitchAngleIEC", &WindContPitchAngleIEC_factory); } void WindContPitchAngleIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.dthetamax"), &assign_WindContPitchAngleIEC_dthetamax)); - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.dthetamin"), &assign_WindContPitchAngleIEC_dthetamin)); - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.kic"), &assign_WindContPitchAngleIEC_kic)); - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.kiomega"), &assign_WindContPitchAngleIEC_kiomega)); - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.kpc"), &assign_WindContPitchAngleIEC_kpc)); - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.kpomega"), &assign_WindContPitchAngleIEC_kpomega)); - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.kpx"), &assign_WindContPitchAngleIEC_kpx)); - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.thetamax"), &assign_WindContPitchAngleIEC_thetamax)); - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.thetamin"), &assign_WindContPitchAngleIEC_thetamin)); - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.ttheta"), &assign_WindContPitchAngleIEC_ttheta)); + assign_map.emplace("cim:WindContPitchAngleIEC.dthetamax", &assign_WindContPitchAngleIEC_dthetamax); + assign_map.emplace("cim:WindContPitchAngleIEC.dthetamin", &assign_WindContPitchAngleIEC_dthetamin); + assign_map.emplace("cim:WindContPitchAngleIEC.kic", &assign_WindContPitchAngleIEC_kic); + assign_map.emplace("cim:WindContPitchAngleIEC.kiomega", &assign_WindContPitchAngleIEC_kiomega); + assign_map.emplace("cim:WindContPitchAngleIEC.kpc", &assign_WindContPitchAngleIEC_kpc); + assign_map.emplace("cim:WindContPitchAngleIEC.kpomega", &assign_WindContPitchAngleIEC_kpomega); + assign_map.emplace("cim:WindContPitchAngleIEC.kpx", &assign_WindContPitchAngleIEC_kpx); + assign_map.emplace("cim:WindContPitchAngleIEC.thetamax", &assign_WindContPitchAngleIEC_thetamax); + assign_map.emplace("cim:WindContPitchAngleIEC.thetamin", &assign_WindContPitchAngleIEC_thetamin); + assign_map.emplace("cim:WindContPitchAngleIEC.ttheta", &assign_WindContPitchAngleIEC_ttheta); } void WindContPitchAngleIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.WindGenTurbineType3IEC"), &assign_WindContPitchAngleIEC_WindGenTurbineType3IEC)); + assign_map.emplace("cim:WindContPitchAngleIEC.WindGenTurbineType3IEC", &assign_WindContPitchAngleIEC_WindGenTurbineType3IEC); } void WindContPitchAngleIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/WindContPitchAngleIEC.hpp b/CGMES_2.4.15_27JAN2020/WindContPitchAngleIEC.hpp index 58a74453d..57dd765dc 100644 --- a/CGMES_2.4.15_27JAN2020/WindContPitchAngleIEC.hpp +++ b/CGMES_2.4.15_27JAN2020/WindContPitchAngleIEC.hpp @@ -21,9 +21,7 @@ namespace CIMPP { class WindGenTurbineType3IEC; - /* - Pitch angle control model. Reference: IEC Standard 61400-27-1 Section 6.6.5.8. - */ + /** \brief Pitch angle control model. Reference: IEC Standard 61400-27-1 Section 6.6.5.8. */ class WindContPitchAngleIEC : public IdentifiedObject { public: @@ -31,17 +29,38 @@ namespace CIMPP WindContPitchAngleIEC(); ~WindContPitchAngleIEC() override; - CIMPP::WindGenTurbineType3IEC* WindGenTurbineType3IEC; /* Wind turbine type 3 model with which this pitch control model is associated. Default: 0 */ - CIMPP::Simple_Float dthetamax; /* Maximum pitch positive ramp rate (d). It is type dependent parameter. Unit = degrees/sec. Default: nullptr */ - CIMPP::Simple_Float dthetamin; /* Maximum pitch negative ramp rate (d). It is type dependent parameter. Unit = degrees/sec. Default: nullptr */ - CIMPP::PU kic; /* Power PI controller integration gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kiomega; /* Speed PI controller integration gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kpc; /* Power PI controller proportional gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kpomega; /* Speed PI controller proportional gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kpx; /* Pitch cross coupling gain (K). It is type dependent parameter. Default: nullptr */ - CIMPP::AngleDegrees thetamax; /* Maximum pitch angle (). It is type dependent parameter. Default: nullptr */ - CIMPP::AngleDegrees thetamin; /* Minimum pitch angle (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds ttheta; /* Pitch time constant (t). It is type dependent parameter. Default: nullptr */ + /** \brief Wind turbine type 3 model with which this pitch control model is associated. Default: 0 */ + CIMPP::WindGenTurbineType3IEC* WindGenTurbineType3IEC; + + /** \brief Maximum pitch positive ramp rate (d). It is type dependent parameter. Unit = degrees/sec. Default: nullptr */ + CIMPP::Simple_Float dthetamax; + + /** \brief Maximum pitch negative ramp rate (d). It is type dependent parameter. Unit = degrees/sec. Default: nullptr */ + CIMPP::Simple_Float dthetamin; + + /** \brief Power PI controller integration gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kic; + + /** \brief Speed PI controller integration gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kiomega; + + /** \brief Power PI controller proportional gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kpc; + + /** \brief Speed PI controller proportional gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kpomega; + + /** \brief Pitch cross coupling gain (K). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kpx; + + /** \brief Maximum pitch angle (). It is type dependent parameter. Default: nullptr */ + CIMPP::AngleDegrees thetamax; + + /** \brief Minimum pitch angle (). It is type dependent parameter. Default: nullptr */ + CIMPP::AngleDegrees thetamin; + + /** \brief Pitch time constant (t). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds ttheta; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/WindContQIEC.cpp b/CGMES_2.4.15_27JAN2020/WindContQIEC.cpp index 12fe80123..2b20f6ee7 100644 --- a/CGMES_2.4.15_27JAN2020/WindContQIEC.cpp +++ b/CGMES_2.4.15_27JAN2020/WindContQIEC.cpp @@ -9,37 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "WindTurbineType3or4IEC.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "WindLVRTQcontrolModesKind.hpp" -#include "WindQcontrolModesKind.hpp" -#include "PU.hpp" using namespace CIMPP; -WindContQIEC::WindContQIEC() : WindTurbineType3or4IEC(nullptr) {}; -WindContQIEC::~WindContQIEC() {}; +WindContQIEC::WindContQIEC() : WindTurbineType3or4IEC(nullptr) {} +WindContQIEC::~WindContQIEC() {} static const std::list PossibleProfilesForClass = { @@ -92,366 +66,392 @@ WindContQIEC::getPossibleProfilesForAttributes() const return map; } +bool assign_WindTurbineType3or4IEC_WIndContQIEC(BaseClass*, BaseClass*); +bool assign_WindContQIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType3or4IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindTurbineType3or4IEC != element2) + { + element->WindTurbineType3or4IEC = element2; + return assign_WindTurbineType3or4IEC_WIndContQIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_WindContQIEC_iqh1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_iqh1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->iqh1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_iqmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_iqmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->iqmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_iqmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_iqmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->iqmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_iqpost(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_iqpost(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->iqpost; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_kiq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_kiq(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kiq; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_kiu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_kiu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kiu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_kpq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_kpq(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpq; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_kpu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_kpu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_kqv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_kqv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kqv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_qmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_qmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_qmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_qmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_rdroop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_rdroop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rdroop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_tiq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_tiq(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tiq; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_tpfilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_tpfilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpfilt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_tpost(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_tpost(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpost; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_tqord(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_tqord(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tqord; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_tufilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_tufilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tufilt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_udb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_udb1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->udb1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_udb2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_udb2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->udb2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_umax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_umax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->umax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_umin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_umin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->umin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_uqdip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_uqdip(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uqdip; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_uref0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_uref0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uref0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_windLVRTQcontrolModesType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_windLVRTQcontrolModesType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->windLVRTQcontrolModesType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_windQcontrolModesType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_windQcontrolModesType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->windQcontrolModesType; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_WindContQIEC_xdroop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->xdroop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindTurbineType3or4IEC_WIndContQIEC(BaseClass*, BaseClass*); -bool assign_WindContQIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindContQIEC_xdroop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindContQIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType3or4IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType3or4IEC != element2) + buffer >> element->xdroop; + if (!buffer.fail()) { - element->WindTurbineType3or4IEC = element2; - return assign_WindTurbineType3or4IEC_WIndContQIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_WindContQIEC_iqh1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->iqh1; if (!buffer.str().empty()) @@ -465,7 +465,8 @@ bool get_WindContQIEC_iqh1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_WindContQIEC_iqmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->iqmax; if (!buffer.str().empty()) @@ -479,7 +480,8 @@ bool get_WindContQIEC_iqmax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_WindContQIEC_iqmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->iqmin; if (!buffer.str().empty()) @@ -493,7 +495,8 @@ bool get_WindContQIEC_iqmin(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_WindContQIEC_iqpost(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->iqpost; if (!buffer.str().empty()) @@ -507,7 +510,8 @@ bool get_WindContQIEC_iqpost(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_WindContQIEC_kiq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kiq; if (!buffer.str().empty()) @@ -521,7 +525,8 @@ bool get_WindContQIEC_kiq(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_WindContQIEC_kiu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kiu; if (!buffer.str().empty()) @@ -535,7 +540,8 @@ bool get_WindContQIEC_kiu(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_WindContQIEC_kpq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpq; if (!buffer.str().empty()) @@ -549,7 +555,8 @@ bool get_WindContQIEC_kpq(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_WindContQIEC_kpu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpu; if (!buffer.str().empty()) @@ -563,7 +570,8 @@ bool get_WindContQIEC_kpu(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_WindContQIEC_kqv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kqv; if (!buffer.str().empty()) @@ -577,7 +585,8 @@ bool get_WindContQIEC_kqv(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_WindContQIEC_qmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qmax; if (!buffer.str().empty()) @@ -591,7 +600,8 @@ bool get_WindContQIEC_qmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_WindContQIEC_qmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qmin; if (!buffer.str().empty()) @@ -605,7 +615,8 @@ bool get_WindContQIEC_qmin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_WindContQIEC_rdroop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rdroop; if (!buffer.str().empty()) @@ -619,7 +630,8 @@ bool get_WindContQIEC_rdroop(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_WindContQIEC_tiq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tiq; if (!buffer.str().empty()) @@ -633,7 +645,8 @@ bool get_WindContQIEC_tiq(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_WindContQIEC_tpfilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpfilt; if (!buffer.str().empty()) @@ -647,7 +660,8 @@ bool get_WindContQIEC_tpfilt(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_WindContQIEC_tpost(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpost; if (!buffer.str().empty()) @@ -661,7 +675,8 @@ bool get_WindContQIEC_tpost(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_WindContQIEC_tqord(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tqord; if (!buffer.str().empty()) @@ -675,7 +690,8 @@ bool get_WindContQIEC_tqord(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_WindContQIEC_tufilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tufilt; if (!buffer.str().empty()) @@ -689,7 +705,8 @@ bool get_WindContQIEC_tufilt(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_WindContQIEC_udb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->udb1; if (!buffer.str().empty()) @@ -703,7 +720,8 @@ bool get_WindContQIEC_udb1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_WindContQIEC_udb2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->udb2; if (!buffer.str().empty()) @@ -717,7 +735,8 @@ bool get_WindContQIEC_udb2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_WindContQIEC_umax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->umax; if (!buffer.str().empty()) @@ -731,7 +750,8 @@ bool get_WindContQIEC_umax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_WindContQIEC_umin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->umin; if (!buffer.str().empty()) @@ -745,7 +765,8 @@ bool get_WindContQIEC_umin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_WindContQIEC_uqdip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uqdip; if (!buffer.str().empty()) @@ -759,7 +780,8 @@ bool get_WindContQIEC_uqdip(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_WindContQIEC_uref0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uref0; if (!buffer.str().empty()) @@ -771,11 +793,12 @@ bool get_WindContQIEC_uref0(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } -bool get_WindContQIEC_xdroop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_WindContQIEC_windLVRTQcontrolModesType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xdroop; + buffer << element->windLVRTQcontrolModesType; if (!buffer.str().empty()) { return true; @@ -785,13 +808,12 @@ bool get_WindContQIEC_xdroop(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - -bool get_WindContQIEC_windLVRTQcontrolModesType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_WindContQIEC_windQcontrolModesType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->windLVRTQcontrolModesType; + buffer << element->windQcontrolModesType; if (!buffer.str().empty()) { return true; @@ -801,11 +823,12 @@ bool get_WindContQIEC_windLVRTQcontrolModesType(const BaseClass* BaseClass_ptr1, return false; } -bool get_WindContQIEC_windQcontrolModesType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_WindContQIEC_xdroop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->windQcontrolModesType; + buffer << element->xdroop; if (!buffer.str().empty()) { return true; @@ -823,42 +846,42 @@ const char* WindContQIEC::debugString() const void WindContQIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindContQIEC"), &WindContQIEC_factory)); + factory_map.emplace("cim:WindContQIEC", &WindContQIEC_factory); } void WindContQIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.iqh1"), &assign_WindContQIEC_iqh1)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.iqmax"), &assign_WindContQIEC_iqmax)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.iqmin"), &assign_WindContQIEC_iqmin)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.iqpost"), &assign_WindContQIEC_iqpost)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.kiq"), &assign_WindContQIEC_kiq)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.kiu"), &assign_WindContQIEC_kiu)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.kpq"), &assign_WindContQIEC_kpq)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.kpu"), &assign_WindContQIEC_kpu)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.kqv"), &assign_WindContQIEC_kqv)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.qmax"), &assign_WindContQIEC_qmax)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.qmin"), &assign_WindContQIEC_qmin)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.rdroop"), &assign_WindContQIEC_rdroop)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.tiq"), &assign_WindContQIEC_tiq)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.tpfilt"), &assign_WindContQIEC_tpfilt)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.tpost"), &assign_WindContQIEC_tpost)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.tqord"), &assign_WindContQIEC_tqord)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.tufilt"), &assign_WindContQIEC_tufilt)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.udb1"), &assign_WindContQIEC_udb1)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.udb2"), &assign_WindContQIEC_udb2)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.umax"), &assign_WindContQIEC_umax)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.umin"), &assign_WindContQIEC_umin)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.uqdip"), &assign_WindContQIEC_uqdip)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.uref0"), &assign_WindContQIEC_uref0)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.windLVRTQcontrolModesType"), &assign_WindContQIEC_windLVRTQcontrolModesType)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.windQcontrolModesType"), &assign_WindContQIEC_windQcontrolModesType)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.xdroop"), &assign_WindContQIEC_xdroop)); + assign_map.emplace("cim:WindContQIEC.iqh1", &assign_WindContQIEC_iqh1); + assign_map.emplace("cim:WindContQIEC.iqmax", &assign_WindContQIEC_iqmax); + assign_map.emplace("cim:WindContQIEC.iqmin", &assign_WindContQIEC_iqmin); + assign_map.emplace("cim:WindContQIEC.iqpost", &assign_WindContQIEC_iqpost); + assign_map.emplace("cim:WindContQIEC.kiq", &assign_WindContQIEC_kiq); + assign_map.emplace("cim:WindContQIEC.kiu", &assign_WindContQIEC_kiu); + assign_map.emplace("cim:WindContQIEC.kpq", &assign_WindContQIEC_kpq); + assign_map.emplace("cim:WindContQIEC.kpu", &assign_WindContQIEC_kpu); + assign_map.emplace("cim:WindContQIEC.kqv", &assign_WindContQIEC_kqv); + assign_map.emplace("cim:WindContQIEC.qmax", &assign_WindContQIEC_qmax); + assign_map.emplace("cim:WindContQIEC.qmin", &assign_WindContQIEC_qmin); + assign_map.emplace("cim:WindContQIEC.rdroop", &assign_WindContQIEC_rdroop); + assign_map.emplace("cim:WindContQIEC.tiq", &assign_WindContQIEC_tiq); + assign_map.emplace("cim:WindContQIEC.tpfilt", &assign_WindContQIEC_tpfilt); + assign_map.emplace("cim:WindContQIEC.tpost", &assign_WindContQIEC_tpost); + assign_map.emplace("cim:WindContQIEC.tqord", &assign_WindContQIEC_tqord); + assign_map.emplace("cim:WindContQIEC.tufilt", &assign_WindContQIEC_tufilt); + assign_map.emplace("cim:WindContQIEC.udb1", &assign_WindContQIEC_udb1); + assign_map.emplace("cim:WindContQIEC.udb2", &assign_WindContQIEC_udb2); + assign_map.emplace("cim:WindContQIEC.umax", &assign_WindContQIEC_umax); + assign_map.emplace("cim:WindContQIEC.umin", &assign_WindContQIEC_umin); + assign_map.emplace("cim:WindContQIEC.uqdip", &assign_WindContQIEC_uqdip); + assign_map.emplace("cim:WindContQIEC.uref0", &assign_WindContQIEC_uref0); + assign_map.emplace("cim:WindContQIEC.windLVRTQcontrolModesType", &assign_WindContQIEC_windLVRTQcontrolModesType); + assign_map.emplace("cim:WindContQIEC.windQcontrolModesType", &assign_WindContQIEC_windQcontrolModesType); + assign_map.emplace("cim:WindContQIEC.xdroop", &assign_WindContQIEC_xdroop); } void WindContQIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.WindTurbineType3or4IEC"), &assign_WindContQIEC_WindTurbineType3or4IEC)); + assign_map.emplace("cim:WindContQIEC.WindTurbineType3or4IEC", &assign_WindContQIEC_WindTurbineType3or4IEC); } void WindContQIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/WindContQIEC.hpp b/CGMES_2.4.15_27JAN2020/WindContQIEC.hpp index 461131d55..024e73ccd 100644 --- a/CGMES_2.4.15_27JAN2020/WindContQIEC.hpp +++ b/CGMES_2.4.15_27JAN2020/WindContQIEC.hpp @@ -21,9 +21,7 @@ namespace CIMPP { class WindTurbineType3or4IEC; - /* - Q control model. Reference: IEC Standard 61400-27-1 Section 6.6.5.6. - */ + /** \brief Q control model. Reference: IEC Standard 61400-27-1 Section 6.6.5.6. */ class WindContQIEC : public IdentifiedObject { public: @@ -31,33 +29,86 @@ namespace CIMPP WindContQIEC(); ~WindContQIEC() override; - CIMPP::WindTurbineType3or4IEC* WindTurbineType3or4IEC; /* Wind turbine type 3 or 4 model with which this reactive control mode is associated. Default: 0 */ - CIMPP::PU iqh1; /* Maximum reactive current injection during dip (i). It is type dependent parameter. Default: nullptr */ - CIMPP::PU iqmax; /* Maximum reactive current injection (i). It is type dependent parameter. Default: nullptr */ - CIMPP::PU iqmin; /* Minimum reactive current injection (i). It is type dependent parameter. Default: nullptr */ - CIMPP::PU iqpost; /* Post fault reactive current injection (). It is project dependent parameter. Default: nullptr */ - CIMPP::PU kiq; /* Reactive power PI controller integration gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kiu; /* Voltage PI controller integration gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kpq; /* Reactive power PI controller proportional gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kpu; /* Voltage PI controller proportional gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kqv; /* Voltage scaling factor for LVRT current (). It is project dependent parameter. Default: nullptr */ - CIMPP::PU qmax; /* Maximum reactive power (q). It is type dependent parameter. Default: nullptr */ - CIMPP::PU qmin; /* Minimum reactive power (q). It is type dependent parameter. Default: nullptr */ - CIMPP::PU rdroop; /* Resistive component of voltage drop impedance (). It is project dependent parameter. Default: nullptr */ - CIMPP::Seconds tiq; /* Time constant in reactive current lag (T). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tpfilt; /* Power measurement filter time constant (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tpost; /* Length of time period where post fault reactive power is injected (). It is project dependent parameter. Default: nullptr */ - CIMPP::Seconds tqord; /* Time constant in reactive power order lag (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tufilt; /* Voltage measurement filter time constant (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU udb1; /* Voltage dead band lower limit (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU udb2; /* Voltage dead band upper limit (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU umax; /* Maximum voltage in voltage PI controller integral term (u). It is type dependent parameter. Default: nullptr */ - CIMPP::PU umin; /* Minimum voltage in voltage PI controller integral term (u). It is type dependent parameter. Default: nullptr */ - CIMPP::PU uqdip; /* Voltage threshold for LVRT detection in q control (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU uref0; /* User defined bias in voltage reference (), used when =. It is case dependent parameter. Default: nullptr */ - CIMPP::WindLVRTQcontrolModesKind windLVRTQcontrolModesType; /* Types of LVRT Q control modes (). It is project dependent parameter. Default: 0 */ - CIMPP::WindQcontrolModesKind windQcontrolModesType; /* Types of general wind turbine Q control modes (). It is project dependent parameter. Default: 0 */ - CIMPP::PU xdroop; /* Inductive component of voltage drop impedance (). It is project dependent parameter. Default: nullptr */ + /** \brief Wind turbine type 3 or 4 model with which this reactive control mode is associated. Default: 0 */ + CIMPP::WindTurbineType3or4IEC* WindTurbineType3or4IEC; + + /** \brief Maximum reactive current injection during dip (i). It is type dependent parameter. Default: nullptr */ + CIMPP::PU iqh1; + + /** \brief Maximum reactive current injection (i). It is type dependent parameter. Default: nullptr */ + CIMPP::PU iqmax; + + /** \brief Minimum reactive current injection (i). It is type dependent parameter. Default: nullptr */ + CIMPP::PU iqmin; + + /** \brief Post fault reactive current injection (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU iqpost; + + /** \brief Reactive power PI controller integration gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kiq; + + /** \brief Voltage PI controller integration gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kiu; + + /** \brief Reactive power PI controller proportional gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kpq; + + /** \brief Voltage PI controller proportional gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kpu; + + /** \brief Voltage scaling factor for LVRT current (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU kqv; + + /** \brief Maximum reactive power (q). It is type dependent parameter. Default: nullptr */ + CIMPP::PU qmax; + + /** \brief Minimum reactive power (q). It is type dependent parameter. Default: nullptr */ + CIMPP::PU qmin; + + /** \brief Resistive component of voltage drop impedance (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU rdroop; + + /** \brief Time constant in reactive current lag (T). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tiq; + + /** \brief Power measurement filter time constant (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tpfilt; + + /** \brief Length of time period where post fault reactive power is injected (). It is project dependent parameter. Default: nullptr */ + CIMPP::Seconds tpost; + + /** \brief Time constant in reactive power order lag (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tqord; + + /** \brief Voltage measurement filter time constant (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tufilt; + + /** \brief Voltage dead band lower limit (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU udb1; + + /** \brief Voltage dead band upper limit (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU udb2; + + /** \brief Maximum voltage in voltage PI controller integral term (u). It is type dependent parameter. Default: nullptr */ + CIMPP::PU umax; + + /** \brief Minimum voltage in voltage PI controller integral term (u). It is type dependent parameter. Default: nullptr */ + CIMPP::PU umin; + + /** \brief Voltage threshold for LVRT detection in q control (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU uqdip; + + /** \brief User defined bias in voltage reference (), used when =. It is case dependent parameter. Default: nullptr */ + CIMPP::PU uref0; + + /** \brief Types of LVRT Q control modes (). It is project dependent parameter. Default: 0 */ + CIMPP::WindLVRTQcontrolModesKind windLVRTQcontrolModesType; + + /** \brief Types of general wind turbine Q control modes (). It is project dependent parameter. Default: 0 */ + CIMPP::WindQcontrolModesKind windQcontrolModesType; + + /** \brief Inductive component of voltage drop impedance (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU xdroop; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/WindContRotorRIEC.cpp b/CGMES_2.4.15_27JAN2020/WindContRotorRIEC.cpp index 2f2775fa0..67c95d633 100644 --- a/CGMES_2.4.15_27JAN2020/WindContRotorRIEC.cpp +++ b/CGMES_2.4.15_27JAN2020/WindContRotorRIEC.cpp @@ -10,19 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindDynamicsLookupTable.hpp" #include "WindGenTurbineType2IEC.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -WindContRotorRIEC::WindContRotorRIEC() : WindGenTurbineType2IEC(nullptr) {}; -WindContRotorRIEC::~WindContRotorRIEC() {}; +WindContRotorRIEC::WindContRotorRIEC() : WindGenTurbineType2IEC(nullptr) {} +WindContRotorRIEC::~WindContRotorRIEC() {} static const std::list PossibleProfilesForClass = { @@ -58,148 +50,158 @@ WindContRotorRIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindContRotorRIEC_kirr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindDynamicsLookupTable_WindContRotorRIEC(BaseClass*, BaseClass*); +bool assign_WindContRotorRIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->kirr; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) + { + element->WindDynamicsLookupTable.push_back(element2); + return assign_WindDynamicsLookupTable_WindContRotorRIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindContRotorRIEC_komegafilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType2IEC_WindContRotorRIEC(BaseClass*, BaseClass*); +bool assign_WindContRotorRIEC_WindGenTurbineType2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + WindGenTurbineType2IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->komegafilt; - if (buffer.fail()) - return false; - else - return true; + if (element->WindGenTurbineType2IEC != element2) + { + element->WindGenTurbineType2IEC = element2; + return assign_WindGenTurbineType2IEC_WindContRotorRIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindContRotorRIEC_kpfilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContRotorRIEC_kirr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->kpfilt; - if (buffer.fail()) - return false; - else + buffer >> element->kirr; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContRotorRIEC_kprr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContRotorRIEC_komegafilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->kprr; - if (buffer.fail()) - return false; - else + buffer >> element->komegafilt; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContRotorRIEC_rmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContRotorRIEC_kpfilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->rmax; - if (buffer.fail()) - return false; - else + buffer >> element->kpfilt; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContRotorRIEC_rmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContRotorRIEC_kprr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->rmin; - if (buffer.fail()) - return false; - else + buffer >> element->kprr; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContRotorRIEC_tomegafilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContRotorRIEC_rmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tomegafilt; - if (buffer.fail()) - return false; - else + buffer >> element->rmax; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContRotorRIEC_tpfilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContRotorRIEC_rmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tpfilt; - if (buffer.fail()) - return false; - else + buffer >> element->rmin; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindDynamicsLookupTable_WindContRotorRIEC(BaseClass*, BaseClass*); -bool assign_WindContRotorRIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindContRotorRIEC_tomegafilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); - WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) + buffer >> element->tomegafilt; + if (!buffer.fail()) { - element->WindDynamicsLookupTable.push_back(element2); - return assign_WindDynamicsLookupTable_WindContRotorRIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_WindGenTurbineType2IEC_WindContRotorRIEC(BaseClass*, BaseClass*); -bool assign_WindContRotorRIEC_WindGenTurbineType2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_WindContRotorRIEC_tpfilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); - WindGenTurbineType2IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindGenTurbineType2IEC != element2) + buffer >> element->tpfilt; + if (!buffer.fail()) { - element->WindGenTurbineType2IEC = element2; - return assign_WindGenTurbineType2IEC_WindContRotorRIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + + bool get_WindContRotorRIEC_kirr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kirr; if (!buffer.str().empty()) @@ -213,7 +215,8 @@ bool get_WindContRotorRIEC_kirr(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindContRotorRIEC_komegafilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->komegafilt; if (!buffer.str().empty()) @@ -227,7 +230,8 @@ bool get_WindContRotorRIEC_komegafilt(const BaseClass* BaseClass_ptr1, std::stri bool get_WindContRotorRIEC_kpfilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpfilt; if (!buffer.str().empty()) @@ -241,7 +245,8 @@ bool get_WindContRotorRIEC_kpfilt(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindContRotorRIEC_kprr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kprr; if (!buffer.str().empty()) @@ -255,7 +260,8 @@ bool get_WindContRotorRIEC_kprr(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindContRotorRIEC_rmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rmax; if (!buffer.str().empty()) @@ -269,7 +275,8 @@ bool get_WindContRotorRIEC_rmax(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindContRotorRIEC_rmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rmin; if (!buffer.str().empty()) @@ -283,7 +290,8 @@ bool get_WindContRotorRIEC_rmin(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindContRotorRIEC_tomegafilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tomegafilt; if (!buffer.str().empty()) @@ -297,7 +305,8 @@ bool get_WindContRotorRIEC_tomegafilt(const BaseClass* BaseClass_ptr1, std::stri bool get_WindContRotorRIEC_tpfilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpfilt; if (!buffer.str().empty()) @@ -309,8 +318,6 @@ bool get_WindContRotorRIEC_tpfilt(const BaseClass* BaseClass_ptr1, std::stringst return false; } - - const char WindContRotorRIEC::debugName[] = "WindContRotorRIEC"; const char* WindContRotorRIEC::debugString() const { @@ -319,25 +326,25 @@ const char* WindContRotorRIEC::debugString() const void WindContRotorRIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC"), &WindContRotorRIEC_factory)); + factory_map.emplace("cim:WindContRotorRIEC", &WindContRotorRIEC_factory); } void WindContRotorRIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.kirr"), &assign_WindContRotorRIEC_kirr)); - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.komegafilt"), &assign_WindContRotorRIEC_komegafilt)); - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.kpfilt"), &assign_WindContRotorRIEC_kpfilt)); - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.kprr"), &assign_WindContRotorRIEC_kprr)); - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.rmax"), &assign_WindContRotorRIEC_rmax)); - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.rmin"), &assign_WindContRotorRIEC_rmin)); - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.tomegafilt"), &assign_WindContRotorRIEC_tomegafilt)); - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.tpfilt"), &assign_WindContRotorRIEC_tpfilt)); + assign_map.emplace("cim:WindContRotorRIEC.kirr", &assign_WindContRotorRIEC_kirr); + assign_map.emplace("cim:WindContRotorRIEC.komegafilt", &assign_WindContRotorRIEC_komegafilt); + assign_map.emplace("cim:WindContRotorRIEC.kpfilt", &assign_WindContRotorRIEC_kpfilt); + assign_map.emplace("cim:WindContRotorRIEC.kprr", &assign_WindContRotorRIEC_kprr); + assign_map.emplace("cim:WindContRotorRIEC.rmax", &assign_WindContRotorRIEC_rmax); + assign_map.emplace("cim:WindContRotorRIEC.rmin", &assign_WindContRotorRIEC_rmin); + assign_map.emplace("cim:WindContRotorRIEC.tomegafilt", &assign_WindContRotorRIEC_tomegafilt); + assign_map.emplace("cim:WindContRotorRIEC.tpfilt", &assign_WindContRotorRIEC_tpfilt); } void WindContRotorRIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.WindDynamicsLookupTable"), &assign_WindContRotorRIEC_WindDynamicsLookupTable)); - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.WindGenTurbineType2IEC"), &assign_WindContRotorRIEC_WindGenTurbineType2IEC)); + assign_map.emplace("cim:WindContRotorRIEC.WindDynamicsLookupTable", &assign_WindContRotorRIEC_WindDynamicsLookupTable); + assign_map.emplace("cim:WindContRotorRIEC.WindGenTurbineType2IEC", &assign_WindContRotorRIEC_WindGenTurbineType2IEC); } void WindContRotorRIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/WindContRotorRIEC.hpp b/CGMES_2.4.15_27JAN2020/WindContRotorRIEC.hpp index 52b6df6d7..50c215acb 100644 --- a/CGMES_2.4.15_27JAN2020/WindContRotorRIEC.hpp +++ b/CGMES_2.4.15_27JAN2020/WindContRotorRIEC.hpp @@ -21,9 +21,7 @@ namespace CIMPP class WindDynamicsLookupTable; class WindGenTurbineType2IEC; - /* - Rotor resistance control model. Reference: IEC Standard 61400-27-1 Section 6.6.5.2. - */ + /** \brief Rotor resistance control model. Reference: IEC Standard 61400-27-1 Section 6.6.5.2. */ class WindContRotorRIEC : public IdentifiedObject { public: @@ -31,16 +29,35 @@ namespace CIMPP WindContRotorRIEC(); ~WindContRotorRIEC() override; - std::list WindDynamicsLookupTable; /* The wind dynamics lookup table associated with this rotor resistance control model. Default: 0 */ - CIMPP::WindGenTurbineType2IEC* WindGenTurbineType2IEC; /* Wind turbine type 2 model with whitch this wind control rotor resistance model is associated. Default: 0 */ - CIMPP::PU kirr; /* Integral gain in rotor resistance PI controller (). It is type dependent parameter. Default: nullptr */ - CIMPP::Simple_Float komegafilt; /* Filter gain for generator speed measurement (K). It is type dependent parameter. Default: nullptr */ - CIMPP::Simple_Float kpfilt; /* Filter gain for power measurement (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kprr; /* Proportional gain in rotor resistance PI controller (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU rmax; /* Maximum rotor resistance (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU rmin; /* Minimum rotor resistance (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tomegafilt; /* Filter time constant for generator speed measurement (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tpfilt; /* Filter time constant for power measurement (). It is type dependent parameter. Default: nullptr */ + /** \brief The wind dynamics lookup table associated with this rotor resistance control model. Default: 0 */ + std::list WindDynamicsLookupTable; + + /** \brief Wind turbine type 2 model with whitch this wind control rotor resistance model is associated. Default: 0 */ + CIMPP::WindGenTurbineType2IEC* WindGenTurbineType2IEC; + + /** \brief Integral gain in rotor resistance PI controller (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kirr; + + /** \brief Filter gain for generator speed measurement (K). It is type dependent parameter. Default: nullptr */ + CIMPP::Simple_Float komegafilt; + + /** \brief Filter gain for power measurement (). It is type dependent parameter. Default: nullptr */ + CIMPP::Simple_Float kpfilt; + + /** \brief Proportional gain in rotor resistance PI controller (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kprr; + + /** \brief Maximum rotor resistance (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU rmax; + + /** \brief Minimum rotor resistance (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU rmin; + + /** \brief Filter time constant for generator speed measurement (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tomegafilt; + + /** \brief Filter time constant for power measurement (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tpfilt; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/WindDynamicsLookupTable.cpp b/CGMES_2.4.15_27JAN2020/WindDynamicsLookupTable.cpp index a688de86e..e88345af5 100644 --- a/CGMES_2.4.15_27JAN2020/WindDynamicsLookupTable.cpp +++ b/CGMES_2.4.15_27JAN2020/WindDynamicsLookupTable.cpp @@ -12,15 +12,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindContPType3IEC.hpp" #include "WindContRotorRIEC.hpp" #include "WindPlantFreqPcontrolIEC.hpp" -#include "Simple_Float.hpp" -#include "WindLookupTableFunctionKind.hpp" -#include "Simple_Float.hpp" -#include "Integer.hpp" using namespace CIMPP; -WindDynamicsLookupTable::WindDynamicsLookupTable() : WindContCurrLimIEC(nullptr), WindContPType3IEC(nullptr), WindContRotorRIEC(nullptr), WindPlantFreqPcontrolIEC(nullptr) {}; -WindDynamicsLookupTable::~WindDynamicsLookupTable() {}; +WindDynamicsLookupTable::WindDynamicsLookupTable() : WindContCurrLimIEC(nullptr), WindContPType3IEC(nullptr), WindContRotorRIEC(nullptr), WindPlantFreqPcontrolIEC(nullptr) {} +WindDynamicsLookupTable::~WindDynamicsLookupTable() {} static const std::list PossibleProfilesForClass = { @@ -54,60 +50,6 @@ WindDynamicsLookupTable::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindDynamicsLookupTable_input(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->input; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_WindDynamicsLookupTable_lookupTableFunctionType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->lookupTableFunctionType; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_WindDynamicsLookupTable_output(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->output; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_WindDynamicsLookupTable_sequence(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->sequence; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_WindContCurrLimIEC_WindDynamicsLookupTable(BaseClass*, BaseClass*); bool assign_WindDynamicsLookupTable_WindContCurrLimIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -124,6 +66,7 @@ bool assign_WindDynamicsLookupTable_WindContCurrLimIEC(BaseClass* BaseClass_ptr1 } return false; } + bool assign_WindContPType3IEC_WindDynamicsLookupTable(BaseClass*, BaseClass*); bool assign_WindDynamicsLookupTable_WindContPType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -140,6 +83,7 @@ bool assign_WindDynamicsLookupTable_WindContPType3IEC(BaseClass* BaseClass_ptr1, } return false; } + bool assign_WindContRotorRIEC_WindDynamicsLookupTable(BaseClass*, BaseClass*); bool assign_WindDynamicsLookupTable_WindContRotorRIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -156,6 +100,7 @@ bool assign_WindDynamicsLookupTable_WindContRotorRIEC(BaseClass* BaseClass_ptr1, } return false; } + bool assign_WindPlantFreqPcontrolIEC_WindDynamicsLookupTable(BaseClass*, BaseClass*); bool assign_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -173,52 +118,66 @@ bool assign_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC(BaseClass* BaseClas return false; } -bool get_WindDynamicsLookupTable_input(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_WindDynamicsLookupTable_input(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->input; - if (!buffer.str().empty()) + buffer >> element->input; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_WindDynamicsLookupTable_output(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_WindDynamicsLookupTable_lookupTableFunctionType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->output; - if (!buffer.str().empty()) + buffer >> element->lookupTableFunctionType; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_WindDynamicsLookupTable_sequence(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_WindDynamicsLookupTable_output(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->sequence; - if (!buffer.str().empty()) + buffer >> element->output; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } +bool assign_WindDynamicsLookupTable_sequence(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->sequence; + if (!buffer.fail()) + { + return true; + } + } + return false; +} bool get_WindDynamicsLookupTable_WindContCurrLimIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContCurrLimIEC != 0) { @@ -231,7 +190,8 @@ bool get_WindDynamicsLookupTable_WindContCurrLimIEC(const BaseClass* BaseClass_p bool get_WindDynamicsLookupTable_WindContPType3IEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContPType3IEC != 0) { @@ -244,7 +204,8 @@ bool get_WindDynamicsLookupTable_WindContPType3IEC(const BaseClass* BaseClass_pt bool get_WindDynamicsLookupTable_WindContRotorRIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContRotorRIEC != 0) { @@ -257,7 +218,8 @@ bool get_WindDynamicsLookupTable_WindContRotorRIEC(const BaseClass* BaseClass_pt bool get_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindPlantFreqPcontrolIEC != 0) { @@ -268,10 +230,25 @@ bool get_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC(const BaseClass* BaseC return false; } +bool get_WindDynamicsLookupTable_input(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->input; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} bool get_WindDynamicsLookupTable_lookupTableFunctionType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lookupTableFunctionType; if (!buffer.str().empty()) @@ -283,6 +260,36 @@ bool get_WindDynamicsLookupTable_lookupTableFunctionType(const BaseClass* BaseCl return false; } +bool get_WindDynamicsLookupTable_output(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->output; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_WindDynamicsLookupTable_sequence(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->sequence; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + const char WindDynamicsLookupTable::debugName[] = "WindDynamicsLookupTable"; const char* WindDynamicsLookupTable::debugString() const { @@ -291,23 +298,23 @@ const char* WindDynamicsLookupTable::debugString() const void WindDynamicsLookupTable::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable"), &WindDynamicsLookupTable_factory)); + factory_map.emplace("cim:WindDynamicsLookupTable", &WindDynamicsLookupTable_factory); } void WindDynamicsLookupTable::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.input"), &assign_WindDynamicsLookupTable_input)); - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.lookupTableFunctionType"), &assign_WindDynamicsLookupTable_lookupTableFunctionType)); - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.output"), &assign_WindDynamicsLookupTable_output)); - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.sequence"), &assign_WindDynamicsLookupTable_sequence)); + assign_map.emplace("cim:WindDynamicsLookupTable.input", &assign_WindDynamicsLookupTable_input); + assign_map.emplace("cim:WindDynamicsLookupTable.lookupTableFunctionType", &assign_WindDynamicsLookupTable_lookupTableFunctionType); + assign_map.emplace("cim:WindDynamicsLookupTable.output", &assign_WindDynamicsLookupTable_output); + assign_map.emplace("cim:WindDynamicsLookupTable.sequence", &assign_WindDynamicsLookupTable_sequence); } void WindDynamicsLookupTable::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.WindContCurrLimIEC"), &assign_WindDynamicsLookupTable_WindContCurrLimIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.WindContPType3IEC"), &assign_WindDynamicsLookupTable_WindContPType3IEC)); - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.WindContRotorRIEC"), &assign_WindDynamicsLookupTable_WindContRotorRIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.WindPlantFreqPcontrolIEC"), &assign_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC)); + assign_map.emplace("cim:WindDynamicsLookupTable.WindContCurrLimIEC", &assign_WindDynamicsLookupTable_WindContCurrLimIEC); + assign_map.emplace("cim:WindDynamicsLookupTable.WindContPType3IEC", &assign_WindDynamicsLookupTable_WindContPType3IEC); + assign_map.emplace("cim:WindDynamicsLookupTable.WindContRotorRIEC", &assign_WindDynamicsLookupTable_WindContRotorRIEC); + assign_map.emplace("cim:WindDynamicsLookupTable.WindPlantFreqPcontrolIEC", &assign_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC); } void WindDynamicsLookupTable::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/WindDynamicsLookupTable.hpp b/CGMES_2.4.15_27JAN2020/WindDynamicsLookupTable.hpp index 8c0e3c1cb..06d99ff11 100644 --- a/CGMES_2.4.15_27JAN2020/WindDynamicsLookupTable.hpp +++ b/CGMES_2.4.15_27JAN2020/WindDynamicsLookupTable.hpp @@ -23,9 +23,7 @@ namespace CIMPP class WindContRotorRIEC; class WindPlantFreqPcontrolIEC; - /* - The class models a look up table for the purpose of wind standard models. - */ + /** \brief The class models a look up table for the purpose of wind standard models. */ class WindDynamicsLookupTable : public IdentifiedObject { public: @@ -33,14 +31,29 @@ namespace CIMPP WindDynamicsLookupTable(); ~WindDynamicsLookupTable() override; - CIMPP::WindContCurrLimIEC* WindContCurrLimIEC; /* The wind dynamics lookup table associated with this current control limitation model. Default: 0 */ - CIMPP::WindContPType3IEC* WindContPType3IEC; /* The wind dynamics lookup table associated with this P control type 3 model. Default: 0 */ - CIMPP::WindContRotorRIEC* WindContRotorRIEC; /* The rotor resistance control model with which this wind dynamics lookup table is associated. Default: 0 */ - CIMPP::WindPlantFreqPcontrolIEC* WindPlantFreqPcontrolIEC; /* The wind dynamics lookup table associated with this frequency and active power wind plant model. Default: 0 */ - CIMPP::Simple_Float input; /* Input value (x) for the lookup table function. Default: nullptr */ - CIMPP::WindLookupTableFunctionKind lookupTableFunctionType; /* Type of the lookup table function. Default: 0 */ - CIMPP::Simple_Float output; /* Output value (y) for the lookup table function. Default: nullptr */ - CIMPP::Integer sequence; /* Sequence numbers of the pairs of the input (x) and the output (y) of the lookup table function. Default: 0 */ + /** \brief The wind dynamics lookup table associated with this current control limitation model. Default: 0 */ + CIMPP::WindContCurrLimIEC* WindContCurrLimIEC; + + /** \brief The wind dynamics lookup table associated with this P control type 3 model. Default: 0 */ + CIMPP::WindContPType3IEC* WindContPType3IEC; + + /** \brief The rotor resistance control model with which this wind dynamics lookup table is associated. Default: 0 */ + CIMPP::WindContRotorRIEC* WindContRotorRIEC; + + /** \brief The wind dynamics lookup table associated with this frequency and active power wind plant model. Default: 0 */ + CIMPP::WindPlantFreqPcontrolIEC* WindPlantFreqPcontrolIEC; + + /** \brief Input value (x) for the lookup table function. Default: nullptr */ + CIMPP::Simple_Float input; + + /** \brief Type of the lookup table function. Default: 0 */ + CIMPP::WindLookupTableFunctionKind lookupTableFunctionType; + + /** \brief Output value (y) for the lookup table function. Default: nullptr */ + CIMPP::Simple_Float output; + + /** \brief Sequence numbers of the pairs of the input (x) and the output (y) of the lookup table function. Default: 0 */ + CIMPP::Integer sequence; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/WindGenTurbineType1IEC.cpp b/CGMES_2.4.15_27JAN2020/WindGenTurbineType1IEC.cpp index 0233c9ed6..3b78fca73 100644 --- a/CGMES_2.4.15_27JAN2020/WindGenTurbineType1IEC.cpp +++ b/CGMES_2.4.15_27JAN2020/WindGenTurbineType1IEC.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindGenTurbineType1IEC::WindGenTurbineType1IEC() : WindAeroConstIEC(nullptr) {}; -WindGenTurbineType1IEC::~WindGenTurbineType1IEC() {}; +WindGenTurbineType1IEC::WindGenTurbineType1IEC() : WindAeroConstIEC(nullptr) {} +WindGenTurbineType1IEC::~WindGenTurbineType1IEC() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ WindGenTurbineType1IEC::getPossibleProfilesForAttributes() const return map; } - - bool assign_WindAeroConstIEC_WindGenTurbineType1IEC(BaseClass*, BaseClass*); bool assign_WindGenTurbineType1IEC_WindAeroConstIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_WindGenTurbineType1IEC_WindAeroConstIEC(BaseClass* BaseClass_ptr1, B return false; } - bool get_WindGenTurbineType1IEC_WindAeroConstIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindGenTurbineType1IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType1IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindAeroConstIEC != 0) { @@ -73,7 +71,6 @@ bool get_WindGenTurbineType1IEC_WindAeroConstIEC(const BaseClass* BaseClass_ptr1 return false; } - const char WindGenTurbineType1IEC::debugName[] = "WindGenTurbineType1IEC"; const char* WindGenTurbineType1IEC::debugString() const { @@ -82,7 +79,7 @@ const char* WindGenTurbineType1IEC::debugString() const void WindGenTurbineType1IEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindGenTurbineType1IEC"), &WindGenTurbineType1IEC_factory)); + factory_map.emplace("cim:WindGenTurbineType1IEC", &WindGenTurbineType1IEC_factory); } void WindGenTurbineType1IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void WindGenTurbineType1IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType1IEC.WindAeroConstIEC"), &assign_WindGenTurbineType1IEC_WindAeroConstIEC)); + assign_map.emplace("cim:WindGenTurbineType1IEC.WindAeroConstIEC", &assign_WindGenTurbineType1IEC_WindAeroConstIEC); } void WindGenTurbineType1IEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/WindGenTurbineType1IEC.hpp b/CGMES_2.4.15_27JAN2020/WindGenTurbineType1IEC.hpp index aafdadbcf..d4e30e4cc 100644 --- a/CGMES_2.4.15_27JAN2020/WindGenTurbineType1IEC.hpp +++ b/CGMES_2.4.15_27JAN2020/WindGenTurbineType1IEC.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class WindAeroConstIEC; - /* - Wind turbine IEC Type 1. Reference: IEC Standard 61400-27-1, section 6.5.2. - */ + /** \brief Wind turbine IEC Type 1. Reference: IEC Standard 61400-27-1, section 6.5.2. */ class WindGenTurbineType1IEC : public WindTurbineType1or2IEC { public: @@ -27,7 +25,8 @@ namespace CIMPP WindGenTurbineType1IEC(); ~WindGenTurbineType1IEC() override; - CIMPP::WindAeroConstIEC* WindAeroConstIEC; /* Wind aerodynamic model associated with this wind turbine type 1 model. Default: 0 */ + /** \brief Wind aerodynamic model associated with this wind turbine type 1 model. Default: 0 */ + CIMPP::WindAeroConstIEC* WindAeroConstIEC; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/WindGenTurbineType2IEC.cpp b/CGMES_2.4.15_27JAN2020/WindGenTurbineType2IEC.cpp index a637739a7..145486473 100644 --- a/CGMES_2.4.15_27JAN2020/WindGenTurbineType2IEC.cpp +++ b/CGMES_2.4.15_27JAN2020/WindGenTurbineType2IEC.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindGenTurbineType2IEC::WindGenTurbineType2IEC() : WindContRotorRIEC(nullptr), WindPitchContEmulIEC(nullptr) {}; -WindGenTurbineType2IEC::~WindGenTurbineType2IEC() {}; +WindGenTurbineType2IEC::WindGenTurbineType2IEC() : WindContRotorRIEC(nullptr), WindPitchContEmulIEC(nullptr) {} +WindGenTurbineType2IEC::~WindGenTurbineType2IEC() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ WindGenTurbineType2IEC::getPossibleProfilesForAttributes() const return map; } - - bool assign_WindContRotorRIEC_WindGenTurbineType2IEC(BaseClass*, BaseClass*); bool assign_WindGenTurbineType2IEC_WindContRotorRIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_WindGenTurbineType2IEC_WindContRotorRIEC(BaseClass* BaseClass_ptr1, } return false; } + bool assign_WindPitchContEmulIEC_WindGenTurbineType2IEC(BaseClass*, BaseClass*); bool assign_WindGenTurbineType2IEC_WindPitchContEmulIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_WindGenTurbineType2IEC_WindPitchContEmulIEC(BaseClass* BaseClass_ptr return false; } - bool get_WindGenTurbineType2IEC_WindContRotorRIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindGenTurbineType2IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType2IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContRotorRIEC != 0) { @@ -93,7 +92,8 @@ bool get_WindGenTurbineType2IEC_WindContRotorRIEC(const BaseClass* BaseClass_ptr bool get_WindGenTurbineType2IEC_WindPitchContEmulIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindGenTurbineType2IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType2IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindPitchContEmulIEC != 0) { @@ -104,7 +104,6 @@ bool get_WindGenTurbineType2IEC_WindPitchContEmulIEC(const BaseClass* BaseClass_ return false; } - const char WindGenTurbineType2IEC::debugName[] = "WindGenTurbineType2IEC"; const char* WindGenTurbineType2IEC::debugString() const { @@ -113,7 +112,7 @@ const char* WindGenTurbineType2IEC::debugString() const void WindGenTurbineType2IEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindGenTurbineType2IEC"), &WindGenTurbineType2IEC_factory)); + factory_map.emplace("cim:WindGenTurbineType2IEC", &WindGenTurbineType2IEC_factory); } void WindGenTurbineType2IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void WindGenTurbineType2IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType2IEC.WindContRotorRIEC"), &assign_WindGenTurbineType2IEC_WindContRotorRIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType2IEC.WindPitchContEmulIEC"), &assign_WindGenTurbineType2IEC_WindPitchContEmulIEC)); + assign_map.emplace("cim:WindGenTurbineType2IEC.WindContRotorRIEC", &assign_WindGenTurbineType2IEC_WindContRotorRIEC); + assign_map.emplace("cim:WindGenTurbineType2IEC.WindPitchContEmulIEC", &assign_WindGenTurbineType2IEC_WindPitchContEmulIEC); } void WindGenTurbineType2IEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/WindGenTurbineType2IEC.hpp b/CGMES_2.4.15_27JAN2020/WindGenTurbineType2IEC.hpp index f323b7d53..435504800 100644 --- a/CGMES_2.4.15_27JAN2020/WindGenTurbineType2IEC.hpp +++ b/CGMES_2.4.15_27JAN2020/WindGenTurbineType2IEC.hpp @@ -18,9 +18,7 @@ namespace CIMPP class WindContRotorRIEC; class WindPitchContEmulIEC; - /* - Wind turbine IEC Type 2. Reference: IEC Standard 61400-27-1, section 6.5.3. - */ + /** \brief Wind turbine IEC Type 2. Reference: IEC Standard 61400-27-1, section 6.5.3. */ class WindGenTurbineType2IEC : public WindTurbineType1or2IEC { public: @@ -28,8 +26,11 @@ namespace CIMPP WindGenTurbineType2IEC(); ~WindGenTurbineType2IEC() override; - CIMPP::WindContRotorRIEC* WindContRotorRIEC; /* Wind control rotor resistance model associated with wind turbine type 2 model. Default: 0 */ - CIMPP::WindPitchContEmulIEC* WindPitchContEmulIEC; /* Pitch control emulator model associated with this wind turbine type 2 model. Default: 0 */ + /** \brief Wind control rotor resistance model associated with wind turbine type 2 model. Default: 0 */ + CIMPP::WindContRotorRIEC* WindContRotorRIEC; + + /** \brief Pitch control emulator model associated with this wind turbine type 2 model. Default: 0 */ + CIMPP::WindPitchContEmulIEC* WindPitchContEmulIEC; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/WindGenTurbineType3IEC.cpp b/CGMES_2.4.15_27JAN2020/WindGenTurbineType3IEC.cpp index a3dc45672..06d7e4bf4 100644 --- a/CGMES_2.4.15_27JAN2020/WindGenTurbineType3IEC.cpp +++ b/CGMES_2.4.15_27JAN2020/WindGenTurbineType3IEC.cpp @@ -12,13 +12,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindContPType3IEC.hpp" #include "WindContPitchAngleIEC.hpp" #include "WindMechIEC.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -WindGenTurbineType3IEC::WindGenTurbineType3IEC() : WindAeroLinearIEC(nullptr), WindContPType3IEC(nullptr), WindContPitchAngleIEC(nullptr), WindMechIEC(nullptr) {}; -WindGenTurbineType3IEC::~WindGenTurbineType3IEC() {}; +WindGenTurbineType3IEC::WindGenTurbineType3IEC() : WindAeroLinearIEC(nullptr), WindContPType3IEC(nullptr), WindContPitchAngleIEC(nullptr), WindMechIEC(nullptr) {} +WindGenTurbineType3IEC::~WindGenTurbineType3IEC() {} static const std::list PossibleProfilesForClass = { @@ -50,34 +48,6 @@ WindGenTurbineType3IEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindGenTurbineType3IEC_dipmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->dipmax; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_WindGenTurbineType3IEC_diqmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->diqmax; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_WindAeroLinearIEC_WindGenTurbineType3IEC(BaseClass*, BaseClass*); bool assign_WindGenTurbineType3IEC_WindAeroLinearIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -94,6 +64,7 @@ bool assign_WindGenTurbineType3IEC_WindAeroLinearIEC(BaseClass* BaseClass_ptr1, } return false; } + bool assign_WindContPType3IEC_WindGenTurbineType3IEC(BaseClass*, BaseClass*); bool assign_WindGenTurbineType3IEC_WindContPType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -110,6 +81,7 @@ bool assign_WindGenTurbineType3IEC_WindContPType3IEC(BaseClass* BaseClass_ptr1, } return false; } + bool assign_WindContPitchAngleIEC_WindGenTurbineType3IEC(BaseClass*, BaseClass*); bool assign_WindGenTurbineType3IEC_WindContPitchAngleIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -126,6 +98,7 @@ bool assign_WindGenTurbineType3IEC_WindContPitchAngleIEC(BaseClass* BaseClass_pt } return false; } + bool assign_WindMechIEC_WindGenTurbineType3IEC(BaseClass*, BaseClass*); bool assign_WindGenTurbineType3IEC_WindMechIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -143,38 +116,38 @@ bool assign_WindGenTurbineType3IEC_WindMechIEC(BaseClass* BaseClass_ptr1, BaseCl return false; } -bool get_WindGenTurbineType3IEC_dipmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_WindGenTurbineType3IEC_dipmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->dipmax; - if (!buffer.str().empty()) + buffer >> element->dipmax; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_WindGenTurbineType3IEC_diqmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_WindGenTurbineType3IEC_diqmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->diqmax; - if (!buffer.str().empty()) + buffer >> element->diqmax; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_WindGenTurbineType3IEC_WindAeroLinearIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindAeroLinearIEC != 0) { @@ -187,7 +160,8 @@ bool get_WindGenTurbineType3IEC_WindAeroLinearIEC(const BaseClass* BaseClass_ptr bool get_WindGenTurbineType3IEC_WindContPType3IEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContPType3IEC != 0) { @@ -200,7 +174,8 @@ bool get_WindGenTurbineType3IEC_WindContPType3IEC(const BaseClass* BaseClass_ptr bool get_WindGenTurbineType3IEC_WindContPitchAngleIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContPitchAngleIEC != 0) { @@ -213,7 +188,8 @@ bool get_WindGenTurbineType3IEC_WindContPitchAngleIEC(const BaseClass* BaseClass bool get_WindGenTurbineType3IEC_WindMechIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindMechIEC != 0) { @@ -224,6 +200,35 @@ bool get_WindGenTurbineType3IEC_WindMechIEC(const BaseClass* BaseClass_ptr1, std return false; } +bool get_WindGenTurbineType3IEC_dipmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->dipmax; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_WindGenTurbineType3IEC_diqmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const WindGenTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->diqmax; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char WindGenTurbineType3IEC::debugName[] = "WindGenTurbineType3IEC"; const char* WindGenTurbineType3IEC::debugString() const @@ -233,21 +238,21 @@ const char* WindGenTurbineType3IEC::debugString() const void WindGenTurbineType3IEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3IEC"), &WindGenTurbineType3IEC_factory)); + factory_map.emplace("cim:WindGenTurbineType3IEC", &WindGenTurbineType3IEC_factory); } void WindGenTurbineType3IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3IEC.dipmax"), &assign_WindGenTurbineType3IEC_dipmax)); - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3IEC.diqmax"), &assign_WindGenTurbineType3IEC_diqmax)); + assign_map.emplace("cim:WindGenTurbineType3IEC.dipmax", &assign_WindGenTurbineType3IEC_dipmax); + assign_map.emplace("cim:WindGenTurbineType3IEC.diqmax", &assign_WindGenTurbineType3IEC_diqmax); } void WindGenTurbineType3IEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3IEC.WindAeroLinearIEC"), &assign_WindGenTurbineType3IEC_WindAeroLinearIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3IEC.WindContPType3IEC"), &assign_WindGenTurbineType3IEC_WindContPType3IEC)); - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3IEC.WindContPitchAngleIEC"), &assign_WindGenTurbineType3IEC_WindContPitchAngleIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3IEC.WindMechIEC"), &assign_WindGenTurbineType3IEC_WindMechIEC)); + assign_map.emplace("cim:WindGenTurbineType3IEC.WindAeroLinearIEC", &assign_WindGenTurbineType3IEC_WindAeroLinearIEC); + assign_map.emplace("cim:WindGenTurbineType3IEC.WindContPType3IEC", &assign_WindGenTurbineType3IEC_WindContPType3IEC); + assign_map.emplace("cim:WindGenTurbineType3IEC.WindContPitchAngleIEC", &assign_WindGenTurbineType3IEC_WindContPitchAngleIEC); + assign_map.emplace("cim:WindGenTurbineType3IEC.WindMechIEC", &assign_WindGenTurbineType3IEC_WindMechIEC); } void WindGenTurbineType3IEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/WindGenTurbineType3IEC.hpp b/CGMES_2.4.15_27JAN2020/WindGenTurbineType3IEC.hpp index b968e187a..f51005682 100644 --- a/CGMES_2.4.15_27JAN2020/WindGenTurbineType3IEC.hpp +++ b/CGMES_2.4.15_27JAN2020/WindGenTurbineType3IEC.hpp @@ -21,9 +21,7 @@ namespace CIMPP class WindContPitchAngleIEC; class WindMechIEC; - /* - Generator model for wind turbines of IEC type 3A and 3B. - */ + /** \brief Generator model for wind turbines of IEC type 3A and 3B. */ class WindGenTurbineType3IEC : public WindTurbineType3or4IEC { public: @@ -31,12 +29,23 @@ namespace CIMPP WindGenTurbineType3IEC(); ~WindGenTurbineType3IEC() override; - CIMPP::WindAeroLinearIEC* WindAeroLinearIEC; /* Wind aerodynamic model associated with this wind generator type 3 model. Default: 0 */ - CIMPP::WindContPType3IEC* WindContPType3IEC; /* Wind control P type 3 model associated with this wind turbine type 3 model. Default: 0 */ - CIMPP::WindContPitchAngleIEC* WindContPitchAngleIEC; /* Wind control pitch angle model associated with this wind turbine type 3. Default: 0 */ - CIMPP::WindMechIEC* WindMechIEC; /* Wind mechanical model associated with this wind turbine Type 3 model. Default: 0 */ - CIMPP::PU dipmax; /* Maximum active current ramp rate (di). It is project dependent parameter. Default: nullptr */ - CIMPP::PU diqmax; /* Maximum reactive current ramp rate (di). It is project dependent parameter. Default: nullptr */ + /** \brief Wind aerodynamic model associated with this wind generator type 3 model. Default: 0 */ + CIMPP::WindAeroLinearIEC* WindAeroLinearIEC; + + /** \brief Wind control P type 3 model associated with this wind turbine type 3 model. Default: 0 */ + CIMPP::WindContPType3IEC* WindContPType3IEC; + + /** \brief Wind control pitch angle model associated with this wind turbine type 3. Default: 0 */ + CIMPP::WindContPitchAngleIEC* WindContPitchAngleIEC; + + /** \brief Wind mechanical model associated with this wind turbine Type 3 model. Default: 0 */ + CIMPP::WindMechIEC* WindMechIEC; + + /** \brief Maximum active current ramp rate (di). It is project dependent parameter. Default: nullptr */ + CIMPP::PU dipmax; + + /** \brief Maximum reactive current ramp rate (di). It is project dependent parameter. Default: nullptr */ + CIMPP::PU diqmax; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/WindGenTurbineType3aIEC.cpp b/CGMES_2.4.15_27JAN2020/WindGenTurbineType3aIEC.cpp index 4488af1f2..e72c76ed4 100644 --- a/CGMES_2.4.15_27JAN2020/WindGenTurbineType3aIEC.cpp +++ b/CGMES_2.4.15_27JAN2020/WindGenTurbineType3aIEC.cpp @@ -8,14 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Seconds.hpp" -#include "PU.hpp" using namespace CIMPP; -WindGenTurbineType3aIEC::WindGenTurbineType3aIEC() {}; -WindGenTurbineType3aIEC::~WindGenTurbineType3aIEC() {}; +WindGenTurbineType3aIEC::WindGenTurbineType3aIEC() {} +WindGenTurbineType3aIEC::~WindGenTurbineType3aIEC() {} static const std::list PossibleProfilesForClass = { @@ -44,51 +41,52 @@ WindGenTurbineType3aIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindGenTurbineType3aIEC_kpc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType3aIEC_kpc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindGenTurbineType3aIEC_tic(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType3aIEC_tic(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tic; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindGenTurbineType3aIEC_xs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType3aIEC_xs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_WindGenTurbineType3aIEC_kpc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpc; if (!buffer.str().empty()) @@ -102,7 +100,8 @@ bool get_WindGenTurbineType3aIEC_kpc(const BaseClass* BaseClass_ptr1, std::strin bool get_WindGenTurbineType3aIEC_tic(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tic; if (!buffer.str().empty()) @@ -116,7 +115,8 @@ bool get_WindGenTurbineType3aIEC_tic(const BaseClass* BaseClass_ptr1, std::strin bool get_WindGenTurbineType3aIEC_xs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType3aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xs; if (!buffer.str().empty()) @@ -128,8 +128,6 @@ bool get_WindGenTurbineType3aIEC_xs(const BaseClass* BaseClass_ptr1, std::string return false; } - - const char WindGenTurbineType3aIEC::debugName[] = "WindGenTurbineType3aIEC"; const char* WindGenTurbineType3aIEC::debugString() const { @@ -138,14 +136,14 @@ const char* WindGenTurbineType3aIEC::debugString() const void WindGenTurbineType3aIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3aIEC"), &WindGenTurbineType3aIEC_factory)); + factory_map.emplace("cim:WindGenTurbineType3aIEC", &WindGenTurbineType3aIEC_factory); } void WindGenTurbineType3aIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3aIEC.kpc"), &assign_WindGenTurbineType3aIEC_kpc)); - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3aIEC.tic"), &assign_WindGenTurbineType3aIEC_tic)); - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3aIEC.xs"), &assign_WindGenTurbineType3aIEC_xs)); + assign_map.emplace("cim:WindGenTurbineType3aIEC.kpc", &assign_WindGenTurbineType3aIEC_kpc); + assign_map.emplace("cim:WindGenTurbineType3aIEC.tic", &assign_WindGenTurbineType3aIEC_tic); + assign_map.emplace("cim:WindGenTurbineType3aIEC.xs", &assign_WindGenTurbineType3aIEC_xs); } void WindGenTurbineType3aIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/WindGenTurbineType3aIEC.hpp b/CGMES_2.4.15_27JAN2020/WindGenTurbineType3aIEC.hpp index 09582f1b1..027ac9e1b 100644 --- a/CGMES_2.4.15_27JAN2020/WindGenTurbineType3aIEC.hpp +++ b/CGMES_2.4.15_27JAN2020/WindGenTurbineType3aIEC.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEC Type 3A generator set model. Reference: IEC Standard 61400-27-1 Section 6.6.3.2. - */ + /** \brief IEC Type 3A generator set model. Reference: IEC Standard 61400-27-1 Section 6.6.3.2. */ class WindGenTurbineType3aIEC : public WindGenTurbineType3IEC { public: @@ -29,9 +27,14 @@ namespace CIMPP WindGenTurbineType3aIEC(); ~WindGenTurbineType3aIEC() override; - CIMPP::Simple_Float kpc; /* Current PI controller proportional gain (K). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tic; /* Current PI controller integration time constant (T). It is type dependent parameter. Default: nullptr */ - CIMPP::PU xs; /* Electromagnetic transient reactance (x). It is type dependent parameter. Default: nullptr */ + /** \brief Current PI controller proportional gain (K). It is type dependent parameter. Default: nullptr */ + CIMPP::Simple_Float kpc; + + /** \brief Current PI controller integration time constant (T). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tic; + + /** \brief Electromagnetic transient reactance (x). It is type dependent parameter. Default: nullptr */ + CIMPP::PU xs; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/WindGenTurbineType3bIEC.cpp b/CGMES_2.4.15_27JAN2020/WindGenTurbineType3bIEC.cpp index 01d8c1ec4..bd7b7fba3 100644 --- a/CGMES_2.4.15_27JAN2020/WindGenTurbineType3bIEC.cpp +++ b/CGMES_2.4.15_27JAN2020/WindGenTurbineType3bIEC.cpp @@ -8,16 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Simple_Float.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" using namespace CIMPP; -WindGenTurbineType3bIEC::WindGenTurbineType3bIEC() {}; -WindGenTurbineType3bIEC::~WindGenTurbineType3bIEC() {}; +WindGenTurbineType3bIEC::WindGenTurbineType3bIEC() {} +WindGenTurbineType3bIEC::~WindGenTurbineType3bIEC() {} static const std::list PossibleProfilesForClass = { @@ -48,77 +43,80 @@ WindGenTurbineType3bIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindGenTurbineType3bIEC_fducw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType3bIEC_fducw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fducw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindGenTurbineType3bIEC_mwtcwp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType3bIEC_mwtcwp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwtcwp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindGenTurbineType3bIEC_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType3bIEC_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindGenTurbineType3bIEC_two(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType3bIEC_two(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->two; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindGenTurbineType3bIEC_xs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType3bIEC_xs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_WindGenTurbineType3bIEC_fducw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fducw; if (!buffer.str().empty()) @@ -132,7 +130,8 @@ bool get_WindGenTurbineType3bIEC_fducw(const BaseClass* BaseClass_ptr1, std::str bool get_WindGenTurbineType3bIEC_mwtcwp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwtcwp; if (!buffer.str().empty()) @@ -146,7 +145,8 @@ bool get_WindGenTurbineType3bIEC_mwtcwp(const BaseClass* BaseClass_ptr1, std::st bool get_WindGenTurbineType3bIEC_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -160,7 +160,8 @@ bool get_WindGenTurbineType3bIEC_tg(const BaseClass* BaseClass_ptr1, std::string bool get_WindGenTurbineType3bIEC_two(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->two; if (!buffer.str().empty()) @@ -174,7 +175,8 @@ bool get_WindGenTurbineType3bIEC_two(const BaseClass* BaseClass_ptr1, std::strin bool get_WindGenTurbineType3bIEC_xs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType3bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xs; if (!buffer.str().empty()) @@ -186,8 +188,6 @@ bool get_WindGenTurbineType3bIEC_xs(const BaseClass* BaseClass_ptr1, std::string return false; } - - const char WindGenTurbineType3bIEC::debugName[] = "WindGenTurbineType3bIEC"; const char* WindGenTurbineType3bIEC::debugString() const { @@ -196,16 +196,16 @@ const char* WindGenTurbineType3bIEC::debugString() const void WindGenTurbineType3bIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3bIEC"), &WindGenTurbineType3bIEC_factory)); + factory_map.emplace("cim:WindGenTurbineType3bIEC", &WindGenTurbineType3bIEC_factory); } void WindGenTurbineType3bIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3bIEC.fducw"), &assign_WindGenTurbineType3bIEC_fducw)); - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3bIEC.mwtcwp"), &assign_WindGenTurbineType3bIEC_mwtcwp)); - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3bIEC.tg"), &assign_WindGenTurbineType3bIEC_tg)); - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3bIEC.two"), &assign_WindGenTurbineType3bIEC_two)); - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType3bIEC.xs"), &assign_WindGenTurbineType3bIEC_xs)); + assign_map.emplace("cim:WindGenTurbineType3bIEC.fducw", &assign_WindGenTurbineType3bIEC_fducw); + assign_map.emplace("cim:WindGenTurbineType3bIEC.mwtcwp", &assign_WindGenTurbineType3bIEC_mwtcwp); + assign_map.emplace("cim:WindGenTurbineType3bIEC.tg", &assign_WindGenTurbineType3bIEC_tg); + assign_map.emplace("cim:WindGenTurbineType3bIEC.two", &assign_WindGenTurbineType3bIEC_two); + assign_map.emplace("cim:WindGenTurbineType3bIEC.xs", &assign_WindGenTurbineType3bIEC_xs); } void WindGenTurbineType3bIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/WindGenTurbineType3bIEC.hpp b/CGMES_2.4.15_27JAN2020/WindGenTurbineType3bIEC.hpp index d97a6b792..37a684772 100644 --- a/CGMES_2.4.15_27JAN2020/WindGenTurbineType3bIEC.hpp +++ b/CGMES_2.4.15_27JAN2020/WindGenTurbineType3bIEC.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEC Type 3B generator set model. Reference: IEC Standard 61400-27-1 Section 6.6.3.3. - */ + /** \brief IEC Type 3B generator set model. Reference: IEC Standard 61400-27-1 Section 6.6.3.3. */ class WindGenTurbineType3bIEC : public WindGenTurbineType3IEC { public: @@ -30,11 +28,20 @@ namespace CIMPP WindGenTurbineType3bIEC(); ~WindGenTurbineType3bIEC() override; - CIMPP::Simple_Float fducw; /* Crowbar duration versus voltage variation look-up table (f()). It is case dependent parameter. Default: nullptr */ - CIMPP::Boolean mwtcwp; /* Crowbar control mode (). The parameter is case dependent parameter. Default: false */ - CIMPP::Seconds tg; /* Current generation Time constant (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds two; /* Time constant for crowbar washout filter (). It is case dependent parameter. Default: nullptr */ - CIMPP::PU xs; /* Electromagnetic transient reactance (x). It is type dependent parameter. Default: nullptr */ + /** \brief Crowbar duration versus voltage variation look-up table (f()). It is case dependent parameter. Default: nullptr */ + CIMPP::Simple_Float fducw; + + /** \brief Crowbar control mode (). The parameter is case dependent parameter. Default: false */ + CIMPP::Boolean mwtcwp; + + /** \brief Current generation Time constant (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Time constant for crowbar washout filter (). It is case dependent parameter. Default: nullptr */ + CIMPP::Seconds two; + + /** \brief Electromagnetic transient reactance (x). It is type dependent parameter. Default: nullptr */ + CIMPP::PU xs; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/WindGenType4IEC.cpp b/CGMES_2.4.15_27JAN2020/WindGenType4IEC.cpp index 0161a30cf..103b066bf 100644 --- a/CGMES_2.4.15_27JAN2020/WindGenType4IEC.cpp +++ b/CGMES_2.4.15_27JAN2020/WindGenType4IEC.cpp @@ -8,15 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" using namespace CIMPP; -WindGenType4IEC::WindGenType4IEC() {}; -WindGenType4IEC::~WindGenType4IEC() {}; +WindGenType4IEC::WindGenType4IEC() {} +WindGenType4IEC::~WindGenType4IEC() {} static const std::list PossibleProfilesForClass = { @@ -46,64 +42,66 @@ WindGenType4IEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindGenType4IEC_dipmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenType4IEC_dipmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dipmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindGenType4IEC_diqmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenType4IEC_diqmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->diqmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindGenType4IEC_diqmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenType4IEC_diqmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->diqmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindGenType4IEC_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenType4IEC_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_WindGenType4IEC_dipmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dipmax; if (!buffer.str().empty()) @@ -117,7 +115,8 @@ bool get_WindGenType4IEC_dipmax(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindGenType4IEC_diqmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->diqmax; if (!buffer.str().empty()) @@ -131,7 +130,8 @@ bool get_WindGenType4IEC_diqmax(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindGenType4IEC_diqmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->diqmin; if (!buffer.str().empty()) @@ -145,7 +145,8 @@ bool get_WindGenType4IEC_diqmin(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindGenType4IEC_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -157,8 +158,6 @@ bool get_WindGenType4IEC_tg(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char WindGenType4IEC::debugName[] = "WindGenType4IEC"; const char* WindGenType4IEC::debugString() const { @@ -167,15 +166,15 @@ const char* WindGenType4IEC::debugString() const void WindGenType4IEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindGenType4IEC"), &WindGenType4IEC_factory)); + factory_map.emplace("cim:WindGenType4IEC", &WindGenType4IEC_factory); } void WindGenType4IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGenType4IEC.dipmax"), &assign_WindGenType4IEC_dipmax)); - assign_map.insert(std::make_pair(std::string("cim:WindGenType4IEC.diqmax"), &assign_WindGenType4IEC_diqmax)); - assign_map.insert(std::make_pair(std::string("cim:WindGenType4IEC.diqmin"), &assign_WindGenType4IEC_diqmin)); - assign_map.insert(std::make_pair(std::string("cim:WindGenType4IEC.tg"), &assign_WindGenType4IEC_tg)); + assign_map.emplace("cim:WindGenType4IEC.dipmax", &assign_WindGenType4IEC_dipmax); + assign_map.emplace("cim:WindGenType4IEC.diqmax", &assign_WindGenType4IEC_diqmax); + assign_map.emplace("cim:WindGenType4IEC.diqmin", &assign_WindGenType4IEC_diqmin); + assign_map.emplace("cim:WindGenType4IEC.tg", &assign_WindGenType4IEC_tg); } void WindGenType4IEC::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/WindGenType4IEC.hpp b/CGMES_2.4.15_27JAN2020/WindGenType4IEC.hpp index ce8bb4469..f76748389 100644 --- a/CGMES_2.4.15_27JAN2020/WindGenType4IEC.hpp +++ b/CGMES_2.4.15_27JAN2020/WindGenType4IEC.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEC Type 4 generator set model. Reference: IEC Standard 61400-27-1 Section 6.6.3.4. - */ + /** \brief IEC Type 4 generator set model. Reference: IEC Standard 61400-27-1 Section 6.6.3.4. */ class WindGenType4IEC : public WindTurbineType3or4IEC { public: @@ -28,10 +26,17 @@ namespace CIMPP WindGenType4IEC(); ~WindGenType4IEC() override; - CIMPP::PU dipmax; /* Maximum active current ramp rate (di). It is project dependent parameter. Default: nullptr */ - CIMPP::PU diqmax; /* Maximum reactive current ramp rate (di). It is project dependent parameter. Default: nullptr */ - CIMPP::PU diqmin; /* Minimum reactive current ramp rate (d). It is case dependent parameter. Default: nullptr */ - CIMPP::Seconds tg; /* Time constant (T). It is type dependent parameter. Default: nullptr */ + /** \brief Maximum active current ramp rate (di). It is project dependent parameter. Default: nullptr */ + CIMPP::PU dipmax; + + /** \brief Maximum reactive current ramp rate (di). It is project dependent parameter. Default: nullptr */ + CIMPP::PU diqmax; + + /** \brief Minimum reactive current ramp rate (d). It is case dependent parameter. Default: nullptr */ + CIMPP::PU diqmin; + + /** \brief Time constant (T). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tg; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/WindGenUnitKind.cpp b/CGMES_2.4.15_27JAN2020/WindGenUnitKind.cpp index f92814598..c2290d973 100644 --- a/CGMES_2.4.15_27JAN2020/WindGenUnitKind.cpp +++ b/CGMES_2.4.15_27JAN2020/WindGenUnitKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "WindGenUnitKind") + if (EnumSymbol.substr(0, pos) != "WindGenUnitKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,12 +50,12 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "offshore") + if (EnumSymbol == "offshore") { rop = WindGenUnitKind::offshore; return lop; } - if(EnumSymbol == "onshore") + if (EnumSymbol == "onshore") { rop = WindGenUnitKind::onshore; return lop; diff --git a/CGMES_2.4.15_27JAN2020/WindGenUnitKind.hpp b/CGMES_2.4.15_27JAN2020/WindGenUnitKind.hpp index 4aa57c46c..52d17765c 100644 --- a/CGMES_2.4.15_27JAN2020/WindGenUnitKind.hpp +++ b/CGMES_2.4.15_27JAN2020/WindGenUnitKind.hpp @@ -9,21 +9,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Kind of wind generating unit. - */ + /** \brief Kind of wind generating unit. */ class WindGenUnitKind { public: enum WindGenUnitKind_ENUM { - /** - * The wind generating unit is located offshore. - */ + /** The wind generating unit is located offshore. */ offshore, - /** - * The wind generating unit is located onshore. - */ + /** The wind generating unit is located onshore. */ onshore, }; diff --git a/CGMES_2.4.15_27JAN2020/WindGeneratingUnit.cpp b/CGMES_2.4.15_27JAN2020/WindGeneratingUnit.cpp index c3eb51f99..d2764afc7 100644 --- a/CGMES_2.4.15_27JAN2020/WindGeneratingUnit.cpp +++ b/CGMES_2.4.15_27JAN2020/WindGeneratingUnit.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "WindGenUnitKind.hpp" using namespace CIMPP; -WindGeneratingUnit::WindGeneratingUnit() {}; -WindGeneratingUnit::~WindGeneratingUnit() {}; +WindGeneratingUnit::WindGeneratingUnit() {} +WindGeneratingUnit::~WindGeneratingUnit() {} static const std::list PossibleProfilesForClass = { @@ -41,27 +40,24 @@ WindGeneratingUnit::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindGeneratingUnit_windGenUnitType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGeneratingUnit_windGenUnitType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + WindGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->windGenUnitType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - - - bool get_WindGeneratingUnit_windGenUnitType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const WindGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->windGenUnitType; if (!buffer.str().empty()) @@ -81,12 +77,12 @@ const char* WindGeneratingUnit::debugString() const void WindGeneratingUnit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindGeneratingUnit"), &WindGeneratingUnit_factory)); + factory_map.emplace("cim:WindGeneratingUnit", &WindGeneratingUnit_factory); } void WindGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGeneratingUnit.windGenUnitType"), &assign_WindGeneratingUnit_windGenUnitType)); + assign_map.emplace("cim:WindGeneratingUnit.windGenUnitType", &assign_WindGeneratingUnit_windGenUnitType); } void WindGeneratingUnit::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_2.4.15_27JAN2020/WindGeneratingUnit.hpp b/CGMES_2.4.15_27JAN2020/WindGeneratingUnit.hpp index 9289c1160..d6f2ffd7f 100644 --- a/CGMES_2.4.15_27JAN2020/WindGeneratingUnit.hpp +++ b/CGMES_2.4.15_27JAN2020/WindGeneratingUnit.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A wind driven generating unit. May be used to represent a single turbine or an aggregation. - */ + /** \brief A wind driven generating unit. May be used to represent a single turbine or an aggregation. */ class WindGeneratingUnit : public GeneratingUnit { public: @@ -27,7 +25,8 @@ namespace CIMPP WindGeneratingUnit(); ~WindGeneratingUnit() override; - CIMPP::WindGenUnitKind windGenUnitType; /* The kind of wind generating unit Default: 0 */ + /** \brief The kind of wind generating unit Default: 0 */ + CIMPP::WindGenUnitKind windGenUnitType; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/WindLVRTQcontrolModesKind.cpp b/CGMES_2.4.15_27JAN2020/WindLVRTQcontrolModesKind.cpp index 1cd506474..32c42c5fd 100644 --- a/CGMES_2.4.15_27JAN2020/WindLVRTQcontrolModesKind.cpp +++ b/CGMES_2.4.15_27JAN2020/WindLVRTQcontrolModesKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "WindLVRTQcontrolModesKind") + if (EnumSymbol.substr(0, pos) != "WindLVRTQcontrolModesKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "mode1") + if (EnumSymbol == "mode1") { rop = WindLVRTQcontrolModesKind::mode1; return lop; } - if(EnumSymbol == "mode2") + if (EnumSymbol == "mode2") { rop = WindLVRTQcontrolModesKind::mode2; return lop; } - if(EnumSymbol == "mode3") + if (EnumSymbol == "mode3") { rop = WindLVRTQcontrolModesKind::mode3; return lop; diff --git a/CGMES_2.4.15_27JAN2020/WindLVRTQcontrolModesKind.hpp b/CGMES_2.4.15_27JAN2020/WindLVRTQcontrolModesKind.hpp index 7b731082a..3f5f0d084 100644 --- a/CGMES_2.4.15_27JAN2020/WindLVRTQcontrolModesKind.hpp +++ b/CGMES_2.4.15_27JAN2020/WindLVRTQcontrolModesKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - LVRT Q control modes . - */ + /** \brief LVRT Q control modes . */ class WindLVRTQcontrolModesKind { public: enum WindLVRTQcontrolModesKind_ENUM { - /** - * Voltage dependent reactive current injection (). - */ + /** Voltage dependent reactive current injection (). */ mode1, - /** - * Reactive current injection controlled as the pre-fault value plus an additional voltage dependent reactive current injection (). - */ + /** Reactive current injection controlled as the pre-fault value plus an additional voltage dependent reactive current injection (). */ mode2, - /** - * Reactive current injection controlled as the pre-fault value plus an additional voltage dependent reactive current injection during fault, and as the pre-fault value plus an additional constant reactive current injection post fault (). - */ + /** Reactive current injection controlled as the pre-fault value plus an additional voltage dependent reactive current injection during fault, and as the pre-fault value plus an additional constant reactive current injection post fault (). */ mode3, }; diff --git a/CGMES_2.4.15_27JAN2020/WindLookupTableFunctionKind.cpp b/CGMES_2.4.15_27JAN2020/WindLookupTableFunctionKind.cpp index e6d94391f..ff9a280cc 100644 --- a/CGMES_2.4.15_27JAN2020/WindLookupTableFunctionKind.cpp +++ b/CGMES_2.4.15_27JAN2020/WindLookupTableFunctionKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "WindLookupTableFunctionKind") + if (EnumSymbol.substr(0, pos) != "WindLookupTableFunctionKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,27 +50,27 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "fpslip") + if (EnumSymbol == "fpslip") { rop = WindLookupTableFunctionKind::fpslip; return lop; } - if(EnumSymbol == "fpomega") + if (EnumSymbol == "fpomega") { rop = WindLookupTableFunctionKind::fpomega; return lop; } - if(EnumSymbol == "ipvdl") + if (EnumSymbol == "ipvdl") { rop = WindLookupTableFunctionKind::ipvdl; return lop; } - if(EnumSymbol == "iqvdl") + if (EnumSymbol == "iqvdl") { rop = WindLookupTableFunctionKind::iqvdl; return lop; } - if(EnumSymbol == "fdpf") + if (EnumSymbol == "fdpf") { rop = WindLookupTableFunctionKind::fdpf; return lop; diff --git a/CGMES_2.4.15_27JAN2020/WindLookupTableFunctionKind.hpp b/CGMES_2.4.15_27JAN2020/WindLookupTableFunctionKind.hpp index 98f42e4fa..e055847de 100644 --- a/CGMES_2.4.15_27JAN2020/WindLookupTableFunctionKind.hpp +++ b/CGMES_2.4.15_27JAN2020/WindLookupTableFunctionKind.hpp @@ -9,33 +9,21 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Function of the lookup table. - */ + /** \brief Function of the lookup table. */ class WindLookupTableFunctionKind { public: enum WindLookupTableFunctionKind_ENUM { - /** - * Power versus slip lookup table (f()). It is used for rotor resistance control model, IEC 61400-27-1, section 6.6.5.2. - */ + /** Power versus slip lookup table (f()). It is used for rotor resistance control model, IEC 61400-27-1, section 6.6.5.2. */ fpslip, - /** - * Power vs. speed lookup table (f()). It is used for P control model type 3, IEC 61400-27-1, section 6.6.5.3. - */ + /** Power vs. speed lookup table (f()). It is used for P control model type 3, IEC 61400-27-1, section 6.6.5.3. */ fpomega, - /** - * Lookup table for voltage dependency of active current limits (i()). It is used for current limitation model, IEC 61400-27-1, section 6.6.5.7. - */ + /** Lookup table for voltage dependency of active current limits (i()). It is used for current limitation model, IEC 61400-27-1, section 6.6.5.7. */ ipvdl, - /** - * Lookup table for voltage dependency of reactive current limits (i()). It is used for current limitation model, IEC 61400-27-1, section 6.6.5.7. - */ + /** Lookup table for voltage dependency of reactive current limits (i()). It is used for current limitation model, IEC 61400-27-1, section 6.6.5.7. */ iqvdl, - /** - * Power vs. frequency lookup table (()). It is used for wind power plant frequency and active power control model, IEC 61400-27-1, Annex E. - */ + /** Power vs. frequency lookup table (()). It is used for wind power plant frequency and active power control model, IEC 61400-27-1, Annex E. */ fdpf, }; diff --git a/CGMES_2.4.15_27JAN2020/WindMechIEC.cpp b/CGMES_2.4.15_27JAN2020/WindMechIEC.cpp index b52b48f35..358889264 100644 --- a/CGMES_2.4.15_27JAN2020/WindMechIEC.cpp +++ b/CGMES_2.4.15_27JAN2020/WindMechIEC.cpp @@ -11,15 +11,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindGenTurbineType3IEC.hpp" #include "WindTurbineType1or2IEC.hpp" #include "WindTurbineType4bIEC.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" using namespace CIMPP; -WindMechIEC::WindMechIEC() : WindGenTurbineType3IEC(nullptr), WindTurbineType1or2IEC(nullptr), WindTurbineType4bIEC(nullptr) {}; -WindMechIEC::~WindMechIEC() {}; +WindMechIEC::WindMechIEC() : WindGenTurbineType3IEC(nullptr), WindTurbineType1or2IEC(nullptr), WindTurbineType4bIEC(nullptr) {} +WindMechIEC::~WindMechIEC() {} static const std::list PossibleProfilesForClass = { @@ -52,112 +48,120 @@ WindMechIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindMechIEC_cdrt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType3IEC_WindMechIEC(BaseClass*, BaseClass*); +bool assign_WindMechIEC_WindGenTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + WindMechIEC* element = dynamic_cast(BaseClass_ptr1); + WindGenTurbineType3IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->cdrt; - if (buffer.fail()) - return false; - else - return true; + if (element->WindGenTurbineType3IEC != element2) + { + element->WindGenTurbineType3IEC = element2; + return assign_WindGenTurbineType3IEC_WindMechIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindMechIEC_hgen(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType1or2IEC_WindMechIEC(BaseClass*, BaseClass*); +bool assign_WindMechIEC_WindTurbineType1or2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + WindMechIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType1or2IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->hgen; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType1or2IEC != element2) + { + element->WindTurbineType1or2IEC = element2; + return assign_WindTurbineType1or2IEC_WindMechIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindMechIEC_hwtr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType4bIEC_WindMechIEC(BaseClass*, BaseClass*); +bool assign_WindMechIEC_WindTurbineType4bIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + WindMechIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType4bIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->hwtr; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType4bIEC != element2) + { + element->WindTurbineType4bIEC = element2; + return assign_WindTurbineType4bIEC_WindMechIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindMechIEC_kdrt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindMechIEC_cdrt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + WindMechIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->kdrt; - if (buffer.fail()) - return false; - else + buffer >> element->cdrt; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindGenTurbineType3IEC_WindMechIEC(BaseClass*, BaseClass*); -bool assign_WindMechIEC_WindGenTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindMechIEC_hgen(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindMechIEC* element = dynamic_cast(BaseClass_ptr1); - WindGenTurbineType3IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindGenTurbineType3IEC != element2) + buffer >> element->hgen; + if (!buffer.fail()) { - element->WindGenTurbineType3IEC = element2; - return assign_WindGenTurbineType3IEC_WindMechIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_WindTurbineType1or2IEC_WindMechIEC(BaseClass*, BaseClass*); -bool assign_WindMechIEC_WindTurbineType1or2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_WindMechIEC_hwtr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindMechIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType1or2IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType1or2IEC != element2) + buffer >> element->hwtr; + if (!buffer.fail()) { - element->WindTurbineType1or2IEC = element2; - return assign_WindTurbineType1or2IEC_WindMechIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_WindTurbineType4bIEC_WindMechIEC(BaseClass*, BaseClass*); -bool assign_WindMechIEC_WindTurbineType4bIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_WindMechIEC_kdrt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindMechIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType4bIEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType4bIEC != element2) + buffer >> element->kdrt; + if (!buffer.fail()) { - element->WindTurbineType4bIEC = element2; - return assign_WindTurbineType4bIEC_WindMechIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + + + bool get_WindMechIEC_cdrt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindMechIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->cdrt; if (!buffer.str().empty()) @@ -171,7 +175,8 @@ bool get_WindMechIEC_cdrt(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_WindMechIEC_hgen(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindMechIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hgen; if (!buffer.str().empty()) @@ -185,7 +190,8 @@ bool get_WindMechIEC_hgen(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_WindMechIEC_hwtr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindMechIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hwtr; if (!buffer.str().empty()) @@ -199,7 +205,8 @@ bool get_WindMechIEC_hwtr(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_WindMechIEC_kdrt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindMechIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdrt; if (!buffer.str().empty()) @@ -211,8 +218,6 @@ bool get_WindMechIEC_kdrt(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char WindMechIEC::debugName[] = "WindMechIEC"; const char* WindMechIEC::debugString() const { @@ -221,22 +226,22 @@ const char* WindMechIEC::debugString() const void WindMechIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindMechIEC"), &WindMechIEC_factory)); + factory_map.emplace("cim:WindMechIEC", &WindMechIEC_factory); } void WindMechIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindMechIEC.cdrt"), &assign_WindMechIEC_cdrt)); - assign_map.insert(std::make_pair(std::string("cim:WindMechIEC.hgen"), &assign_WindMechIEC_hgen)); - assign_map.insert(std::make_pair(std::string("cim:WindMechIEC.hwtr"), &assign_WindMechIEC_hwtr)); - assign_map.insert(std::make_pair(std::string("cim:WindMechIEC.kdrt"), &assign_WindMechIEC_kdrt)); + assign_map.emplace("cim:WindMechIEC.cdrt", &assign_WindMechIEC_cdrt); + assign_map.emplace("cim:WindMechIEC.hgen", &assign_WindMechIEC_hgen); + assign_map.emplace("cim:WindMechIEC.hwtr", &assign_WindMechIEC_hwtr); + assign_map.emplace("cim:WindMechIEC.kdrt", &assign_WindMechIEC_kdrt); } void WindMechIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindMechIEC.WindGenTurbineType3IEC"), &assign_WindMechIEC_WindGenTurbineType3IEC)); - assign_map.insert(std::make_pair(std::string("cim:WindMechIEC.WindTurbineType1or2IEC"), &assign_WindMechIEC_WindTurbineType1or2IEC)); - assign_map.insert(std::make_pair(std::string("cim:WindMechIEC.WindTurbineType4bIEC"), &assign_WindMechIEC_WindTurbineType4bIEC)); + assign_map.emplace("cim:WindMechIEC.WindGenTurbineType3IEC", &assign_WindMechIEC_WindGenTurbineType3IEC); + assign_map.emplace("cim:WindMechIEC.WindTurbineType1or2IEC", &assign_WindMechIEC_WindTurbineType1or2IEC); + assign_map.emplace("cim:WindMechIEC.WindTurbineType4bIEC", &assign_WindMechIEC_WindTurbineType4bIEC); } void WindMechIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/WindMechIEC.hpp b/CGMES_2.4.15_27JAN2020/WindMechIEC.hpp index 650d95c77..59019c1ae 100644 --- a/CGMES_2.4.15_27JAN2020/WindMechIEC.hpp +++ b/CGMES_2.4.15_27JAN2020/WindMechIEC.hpp @@ -21,9 +21,7 @@ namespace CIMPP class WindTurbineType1or2IEC; class WindTurbineType4bIEC; - /* - Two mass model. Reference: IEC Standard 61400-27-1 Section 6.6.2.1. - */ + /** \brief Two mass model. Reference: IEC Standard 61400-27-1 Section 6.6.2.1. */ class WindMechIEC : public IdentifiedObject { public: @@ -31,13 +29,26 @@ namespace CIMPP WindMechIEC(); ~WindMechIEC() override; - CIMPP::WindGenTurbineType3IEC* WindGenTurbineType3IEC; /* Wind turbine Type 3 model with which this wind mechanical model is associated. Default: 0 */ - CIMPP::WindTurbineType1or2IEC* WindTurbineType1or2IEC; /* Wind generator type 1 or 2 model with which this wind mechanical model is associated. Default: 0 */ - CIMPP::WindTurbineType4bIEC* WindTurbineType4bIEC; /* Wind turbine type 4B model with which this wind mechanical model is associated. Default: 0 */ - CIMPP::PU cdrt; /* Drive train damping (. It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds hgen; /* Inertia constant of generator (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds hwtr; /* Inertia constant of wind turbine rotor (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kdrt; /* Drive train stiffness (). It is type dependent parameter. Default: nullptr */ + /** \brief Wind turbine Type 3 model with which this wind mechanical model is associated. Default: 0 */ + CIMPP::WindGenTurbineType3IEC* WindGenTurbineType3IEC; + + /** \brief Wind generator type 1 or 2 model with which this wind mechanical model is associated. Default: 0 */ + CIMPP::WindTurbineType1or2IEC* WindTurbineType1or2IEC; + + /** \brief Wind turbine type 4B model with which this wind mechanical model is associated. Default: 0 */ + CIMPP::WindTurbineType4bIEC* WindTurbineType4bIEC; + + /** \brief Drive train damping (. It is type dependent parameter. Default: nullptr */ + CIMPP::PU cdrt; + + /** \brief Inertia constant of generator (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds hgen; + + /** \brief Inertia constant of wind turbine rotor (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds hwtr; + + /** \brief Drive train stiffness (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU kdrt; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/WindPitchContEmulIEC.cpp b/CGMES_2.4.15_27JAN2020/WindPitchContEmulIEC.cpp index 19756384e..c78632e74 100644 --- a/CGMES_2.4.15_27JAN2020/WindPitchContEmulIEC.cpp +++ b/CGMES_2.4.15_27JAN2020/WindPitchContEmulIEC.cpp @@ -9,21 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "WindGenTurbineType2IEC.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -WindPitchContEmulIEC::WindPitchContEmulIEC() : WindGenTurbineType2IEC(nullptr) {}; -WindPitchContEmulIEC::~WindPitchContEmulIEC() {}; +WindPitchContEmulIEC::WindPitchContEmulIEC() : WindGenTurbineType2IEC(nullptr) {} +WindPitchContEmulIEC::~WindPitchContEmulIEC() {} static const std::list PossibleProfilesForClass = { @@ -60,158 +50,168 @@ WindPitchContEmulIEC::getPossibleProfilesForAttributes() const return map; } +bool assign_WindGenTurbineType2IEC_WindPitchContEmulIEC(BaseClass*, BaseClass*); +bool assign_WindPitchContEmulIEC_WindGenTurbineType2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + WindGenTurbineType2IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindGenTurbineType2IEC != element2) + { + element->WindGenTurbineType2IEC = element2; + return assign_WindGenTurbineType2IEC_WindPitchContEmulIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_WindPitchContEmulIEC_kdroop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPitchContEmulIEC_kdroop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kdroop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPitchContEmulIEC_kipce(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPitchContEmulIEC_kipce(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kipce; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPitchContEmulIEC_komegaaero(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPitchContEmulIEC_komegaaero(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->komegaaero; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPitchContEmulIEC_kppce(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPitchContEmulIEC_kppce(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kppce; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPitchContEmulIEC_omegaref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPitchContEmulIEC_omegaref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->omegaref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPitchContEmulIEC_pimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPitchContEmulIEC_pimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPitchContEmulIEC_pimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPitchContEmulIEC_pimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPitchContEmulIEC_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPitchContEmulIEC_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPitchContEmulIEC_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPitchContEmulIEC_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_WindPitchContEmulIEC_tpe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->tpe; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindGenTurbineType2IEC_WindPitchContEmulIEC(BaseClass*, BaseClass*); -bool assign_WindPitchContEmulIEC_WindGenTurbineType2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindPitchContEmulIEC_tpe(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); - WindGenTurbineType2IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindGenTurbineType2IEC != element2) + buffer >> element->tpe; + if (!buffer.fail()) { - element->WindGenTurbineType2IEC = element2; - return assign_WindGenTurbineType2IEC_WindPitchContEmulIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_WindPitchContEmulIEC_kdroop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdroop; if (!buffer.str().empty()) @@ -225,7 +225,8 @@ bool get_WindPitchContEmulIEC_kdroop(const BaseClass* BaseClass_ptr1, std::strin bool get_WindPitchContEmulIEC_kipce(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kipce; if (!buffer.str().empty()) @@ -239,7 +240,8 @@ bool get_WindPitchContEmulIEC_kipce(const BaseClass* BaseClass_ptr1, std::string bool get_WindPitchContEmulIEC_komegaaero(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->komegaaero; if (!buffer.str().empty()) @@ -253,7 +255,8 @@ bool get_WindPitchContEmulIEC_komegaaero(const BaseClass* BaseClass_ptr1, std::s bool get_WindPitchContEmulIEC_kppce(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kppce; if (!buffer.str().empty()) @@ -267,7 +270,8 @@ bool get_WindPitchContEmulIEC_kppce(const BaseClass* BaseClass_ptr1, std::string bool get_WindPitchContEmulIEC_omegaref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->omegaref; if (!buffer.str().empty()) @@ -281,7 +285,8 @@ bool get_WindPitchContEmulIEC_omegaref(const BaseClass* BaseClass_ptr1, std::str bool get_WindPitchContEmulIEC_pimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pimax; if (!buffer.str().empty()) @@ -295,7 +300,8 @@ bool get_WindPitchContEmulIEC_pimax(const BaseClass* BaseClass_ptr1, std::string bool get_WindPitchContEmulIEC_pimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pimin; if (!buffer.str().empty()) @@ -309,7 +315,8 @@ bool get_WindPitchContEmulIEC_pimin(const BaseClass* BaseClass_ptr1, std::string bool get_WindPitchContEmulIEC_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -323,7 +330,8 @@ bool get_WindPitchContEmulIEC_t1(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindPitchContEmulIEC_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -337,7 +345,8 @@ bool get_WindPitchContEmulIEC_t2(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindPitchContEmulIEC_tpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContEmulIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpe; if (!buffer.str().empty()) @@ -349,8 +358,6 @@ bool get_WindPitchContEmulIEC_tpe(const BaseClass* BaseClass_ptr1, std::stringst return false; } - - const char WindPitchContEmulIEC::debugName[] = "WindPitchContEmulIEC"; const char* WindPitchContEmulIEC::debugString() const { @@ -359,26 +366,26 @@ const char* WindPitchContEmulIEC::debugString() const void WindPitchContEmulIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC"), &WindPitchContEmulIEC_factory)); + factory_map.emplace("cim:WindPitchContEmulIEC", &WindPitchContEmulIEC_factory); } void WindPitchContEmulIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC.kdroop"), &assign_WindPitchContEmulIEC_kdroop)); - assign_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC.kipce"), &assign_WindPitchContEmulIEC_kipce)); - assign_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC.komegaaero"), &assign_WindPitchContEmulIEC_komegaaero)); - assign_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC.kppce"), &assign_WindPitchContEmulIEC_kppce)); - assign_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC.omegaref"), &assign_WindPitchContEmulIEC_omegaref)); - assign_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC.pimax"), &assign_WindPitchContEmulIEC_pimax)); - assign_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC.pimin"), &assign_WindPitchContEmulIEC_pimin)); - assign_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC.t1"), &assign_WindPitchContEmulIEC_t1)); - assign_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC.t2"), &assign_WindPitchContEmulIEC_t2)); - assign_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC.tpe"), &assign_WindPitchContEmulIEC_tpe)); + assign_map.emplace("cim:WindPitchContEmulIEC.kdroop", &assign_WindPitchContEmulIEC_kdroop); + assign_map.emplace("cim:WindPitchContEmulIEC.kipce", &assign_WindPitchContEmulIEC_kipce); + assign_map.emplace("cim:WindPitchContEmulIEC.komegaaero", &assign_WindPitchContEmulIEC_komegaaero); + assign_map.emplace("cim:WindPitchContEmulIEC.kppce", &assign_WindPitchContEmulIEC_kppce); + assign_map.emplace("cim:WindPitchContEmulIEC.omegaref", &assign_WindPitchContEmulIEC_omegaref); + assign_map.emplace("cim:WindPitchContEmulIEC.pimax", &assign_WindPitchContEmulIEC_pimax); + assign_map.emplace("cim:WindPitchContEmulIEC.pimin", &assign_WindPitchContEmulIEC_pimin); + assign_map.emplace("cim:WindPitchContEmulIEC.t1", &assign_WindPitchContEmulIEC_t1); + assign_map.emplace("cim:WindPitchContEmulIEC.t2", &assign_WindPitchContEmulIEC_t2); + assign_map.emplace("cim:WindPitchContEmulIEC.tpe", &assign_WindPitchContEmulIEC_tpe); } void WindPitchContEmulIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPitchContEmulIEC.WindGenTurbineType2IEC"), &assign_WindPitchContEmulIEC_WindGenTurbineType2IEC)); + assign_map.emplace("cim:WindPitchContEmulIEC.WindGenTurbineType2IEC", &assign_WindPitchContEmulIEC_WindGenTurbineType2IEC); } void WindPitchContEmulIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/WindPitchContEmulIEC.hpp b/CGMES_2.4.15_27JAN2020/WindPitchContEmulIEC.hpp index ba0894a15..dcdefc9bb 100644 --- a/CGMES_2.4.15_27JAN2020/WindPitchContEmulIEC.hpp +++ b/CGMES_2.4.15_27JAN2020/WindPitchContEmulIEC.hpp @@ -20,9 +20,7 @@ namespace CIMPP { class WindGenTurbineType2IEC; - /* - Pitch control emulator model. Reference: IEC Standard 61400-27-1 Section 6.6.5.1. - */ + /** \brief Pitch control emulator model. Reference: IEC Standard 61400-27-1 Section 6.6.5.1. */ class WindPitchContEmulIEC : public IdentifiedObject { public: @@ -30,17 +28,38 @@ namespace CIMPP WindPitchContEmulIEC(); ~WindPitchContEmulIEC() override; - CIMPP::WindGenTurbineType2IEC* WindGenTurbineType2IEC; /* Wind turbine type 2 model with which this Pitch control emulator model is associated. Default: 0 */ - CIMPP::Simple_Float kdroop; /* Power error gain (). It is case dependent parameter. Default: nullptr */ - CIMPP::Simple_Float kipce; /* Pitch control emulator integral constant (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU komegaaero; /* Aerodynamic power change vs. omegachange (). It is case dependent parameter. Default: nullptr */ - CIMPP::Simple_Float kppce; /* Pitch control emulator proportional constant (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU omegaref; /* Rotor speed in initial steady state (omega). It is case dependent parameter. Default: nullptr */ - CIMPP::PU pimax; /* Maximum steady state power (). It is case dependent parameter. Default: nullptr */ - CIMPP::PU pimin; /* Minimum steady state power (). It is case dependent parameter. Default: nullptr */ - CIMPP::Seconds t1; /* First time constant in pitch control lag (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds t2; /* Second time constant in pitch control lag (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tpe; /* Time constant in generator air gap power lag (). It is type dependent parameter. Default: nullptr */ + /** \brief Wind turbine type 2 model with which this Pitch control emulator model is associated. Default: 0 */ + CIMPP::WindGenTurbineType2IEC* WindGenTurbineType2IEC; + + /** \brief Power error gain (). It is case dependent parameter. Default: nullptr */ + CIMPP::Simple_Float kdroop; + + /** \brief Pitch control emulator integral constant (). It is type dependent parameter. Default: nullptr */ + CIMPP::Simple_Float kipce; + + /** \brief Aerodynamic power change vs. omegachange (). It is case dependent parameter. Default: nullptr */ + CIMPP::PU komegaaero; + + /** \brief Pitch control emulator proportional constant (). It is type dependent parameter. Default: nullptr */ + CIMPP::Simple_Float kppce; + + /** \brief Rotor speed in initial steady state (omega). It is case dependent parameter. Default: nullptr */ + CIMPP::PU omegaref; + + /** \brief Maximum steady state power (). It is case dependent parameter. Default: nullptr */ + CIMPP::PU pimax; + + /** \brief Minimum steady state power (). It is case dependent parameter. Default: nullptr */ + CIMPP::PU pimin; + + /** \brief First time constant in pitch control lag (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Second time constant in pitch control lag (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Time constant in generator air gap power lag (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tpe; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/WindPlantDynamics.cpp b/CGMES_2.4.15_27JAN2020/WindPlantDynamics.cpp index 07c27bcf5..c89fc1bb8 100644 --- a/CGMES_2.4.15_27JAN2020/WindPlantDynamics.cpp +++ b/CGMES_2.4.15_27JAN2020/WindPlantDynamics.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindPlantDynamics::WindPlantDynamics() : RemoteInputSignal(nullptr) {}; -WindPlantDynamics::~WindPlantDynamics() {}; +WindPlantDynamics::WindPlantDynamics() : RemoteInputSignal(nullptr) {} +WindPlantDynamics::~WindPlantDynamics() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ WindPlantDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_RemoteInputSignal_WindPlantDynamics(BaseClass*, BaseClass*); bool assign_WindPlantDynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_WindPlantDynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseC } return false; } + bool assign_WindTurbineType3or4Dynamics_WindPlantDynamics(BaseClass*, BaseClass*); bool assign_WindPlantDynamics_WindTurbineType3or4Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_WindPlantDynamics_WindTurbineType3or4Dynamics(BaseClass* BaseClass_p return false; } - bool get_WindPlantDynamics_RemoteInputSignal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindPlantDynamics* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->RemoteInputSignal != 0) { @@ -100,7 +99,7 @@ const char* WindPlantDynamics::debugString() const void WindPlantDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindPlantDynamics"), &WindPlantDynamics_factory)); + factory_map.emplace("cim:WindPlantDynamics", &WindPlantDynamics_factory); } void WindPlantDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -109,8 +108,8 @@ void WindPlantDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPlantDynamics.RemoteInputSignal"), &assign_WindPlantDynamics_RemoteInputSignal)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantDynamics.WindTurbineType3or4Dynamics"), &assign_WindPlantDynamics_WindTurbineType3or4Dynamics)); + assign_map.emplace("cim:WindPlantDynamics.RemoteInputSignal", &assign_WindPlantDynamics_RemoteInputSignal); + assign_map.emplace("cim:WindPlantDynamics.WindTurbineType3or4Dynamics", &assign_WindPlantDynamics_WindTurbineType3or4Dynamics); } void WindPlantDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/WindPlantDynamics.hpp b/CGMES_2.4.15_27JAN2020/WindPlantDynamics.hpp index 2ac516cd6..0b8314fc3 100644 --- a/CGMES_2.4.15_27JAN2020/WindPlantDynamics.hpp +++ b/CGMES_2.4.15_27JAN2020/WindPlantDynamics.hpp @@ -18,9 +18,7 @@ namespace CIMPP class RemoteInputSignal; class WindTurbineType3or4Dynamics; - /* - Parent class supporting relationships to wind turbines Type 3 and 4 and wind plant IEC and user defined wind plants including their control models. - */ + /** \brief Parent class supporting relationships to wind turbines Type 3 and 4 and wind plant IEC and user defined wind plants including their control models. */ class WindPlantDynamics : public DynamicsFunctionBlock { public: @@ -28,8 +26,11 @@ namespace CIMPP WindPlantDynamics(); ~WindPlantDynamics() override; - CIMPP::RemoteInputSignal* RemoteInputSignal; /* The wind plant using the remote signal. Default: 0 */ - std::list WindTurbineType3or4Dynamics; /* The wind turbine type 3 or 4 associated with this wind plant. Default: 0 */ + /** \brief The wind plant using the remote signal. Default: 0 */ + CIMPP::RemoteInputSignal* RemoteInputSignal; + + /** \brief The wind turbine type 3 or 4 associated with this wind plant. Default: 0 */ + std::list WindTurbineType3or4Dynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/WindPlantFreqPcontrolIEC.cpp b/CGMES_2.4.15_27JAN2020/WindPlantFreqPcontrolIEC.cpp index e7c7ac1c6..f21322dd3 100644 --- a/CGMES_2.4.15_27JAN2020/WindPlantFreqPcontrolIEC.cpp +++ b/CGMES_2.4.15_27JAN2020/WindPlantFreqPcontrolIEC.cpp @@ -10,21 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindDynamicsLookupTable.hpp" #include "WindPlantIEC.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -WindPlantFreqPcontrolIEC::WindPlantFreqPcontrolIEC() : WindPlantIEC(nullptr) {}; -WindPlantFreqPcontrolIEC::~WindPlantFreqPcontrolIEC() {}; +WindPlantFreqPcontrolIEC::WindPlantFreqPcontrolIEC() : WindPlantIEC(nullptr) {} +WindPlantFreqPcontrolIEC::~WindPlantFreqPcontrolIEC() {} static const std::list PossibleProfilesForClass = { @@ -62,174 +52,186 @@ WindPlantFreqPcontrolIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindPlantFreqPcontrolIEC_dprefmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC(BaseClass*, BaseClass*); +bool assign_WindPlantFreqPcontrolIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->dprefmax; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) + { + element->WindDynamicsLookupTable.push_back(element2); + return assign_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindPlantFreqPcontrolIEC_dprefmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantIEC_WindPlantFreqPcontrolIEC(BaseClass*, BaseClass*); +bool assign_WindPlantFreqPcontrolIEC_WindPlantIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + WindPlantIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->dprefmin; - if (buffer.fail()) - return false; - else - return true; + if (element->WindPlantIEC != element2) + { + element->WindPlantIEC = element2; + return assign_WindPlantIEC_WindPlantFreqPcontrolIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindPlantFreqPcontrolIEC_kiwpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_dprefmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->kiwpp; - if (buffer.fail()) - return false; - else + buffer >> element->dprefmax; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantFreqPcontrolIEC_kpwpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_dprefmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->kpwpp; - if (buffer.fail()) - return false; - else + buffer >> element->dprefmin; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantFreqPcontrolIEC_prefmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_kiwpp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->prefmax; - if (buffer.fail()) - return false; - else + buffer >> element->kiwpp; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantFreqPcontrolIEC_prefmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_kpwpp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->prefmin; - if (buffer.fail()) - return false; - else + buffer >> element->kpwpp; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantFreqPcontrolIEC_tpft(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_prefmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tpft; - if (buffer.fail()) - return false; - else + buffer >> element->prefmax; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantFreqPcontrolIEC_tpfv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_prefmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tpfv; - if (buffer.fail()) - return false; - else + buffer >> element->prefmin; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantFreqPcontrolIEC_twpffilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_tpft(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->twpffilt; - if (buffer.fail()) - return false; - else + buffer >> element->tpft; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantFreqPcontrolIEC_twppfilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_tpfv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->twppfilt; - if (buffer.fail()) - return false; - else + buffer >> element->tpfv; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC(BaseClass*, BaseClass*); -bool assign_WindPlantFreqPcontrolIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindPlantFreqPcontrolIEC_twpffilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); - WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) + buffer >> element->twpffilt; + if (!buffer.fail()) { - element->WindDynamicsLookupTable.push_back(element2); - return assign_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_WindPlantIEC_WindPlantFreqPcontrolIEC(BaseClass*, BaseClass*); -bool assign_WindPlantFreqPcontrolIEC_WindPlantIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_WindPlantFreqPcontrolIEC_twppfilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); - WindPlantIEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindPlantIEC != element2) + buffer >> element->twppfilt; + if (!buffer.fail()) { - element->WindPlantIEC = element2; - return assign_WindPlantIEC_WindPlantFreqPcontrolIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + + bool get_WindPlantFreqPcontrolIEC_dprefmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dprefmax; if (!buffer.str().empty()) @@ -243,7 +245,8 @@ bool get_WindPlantFreqPcontrolIEC_dprefmax(const BaseClass* BaseClass_ptr1, std: bool get_WindPlantFreqPcontrolIEC_dprefmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dprefmin; if (!buffer.str().empty()) @@ -257,7 +260,8 @@ bool get_WindPlantFreqPcontrolIEC_dprefmin(const BaseClass* BaseClass_ptr1, std: bool get_WindPlantFreqPcontrolIEC_kiwpp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kiwpp; if (!buffer.str().empty()) @@ -271,7 +275,8 @@ bool get_WindPlantFreqPcontrolIEC_kiwpp(const BaseClass* BaseClass_ptr1, std::st bool get_WindPlantFreqPcontrolIEC_kpwpp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpwpp; if (!buffer.str().empty()) @@ -285,7 +290,8 @@ bool get_WindPlantFreqPcontrolIEC_kpwpp(const BaseClass* BaseClass_ptr1, std::st bool get_WindPlantFreqPcontrolIEC_prefmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->prefmax; if (!buffer.str().empty()) @@ -299,7 +305,8 @@ bool get_WindPlantFreqPcontrolIEC_prefmax(const BaseClass* BaseClass_ptr1, std:: bool get_WindPlantFreqPcontrolIEC_prefmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->prefmin; if (!buffer.str().empty()) @@ -313,7 +320,8 @@ bool get_WindPlantFreqPcontrolIEC_prefmin(const BaseClass* BaseClass_ptr1, std:: bool get_WindPlantFreqPcontrolIEC_tpft(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpft; if (!buffer.str().empty()) @@ -327,7 +335,8 @@ bool get_WindPlantFreqPcontrolIEC_tpft(const BaseClass* BaseClass_ptr1, std::str bool get_WindPlantFreqPcontrolIEC_tpfv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpfv; if (!buffer.str().empty()) @@ -341,7 +350,8 @@ bool get_WindPlantFreqPcontrolIEC_tpfv(const BaseClass* BaseClass_ptr1, std::str bool get_WindPlantFreqPcontrolIEC_twpffilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twpffilt; if (!buffer.str().empty()) @@ -355,7 +365,8 @@ bool get_WindPlantFreqPcontrolIEC_twpffilt(const BaseClass* BaseClass_ptr1, std: bool get_WindPlantFreqPcontrolIEC_twppfilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twppfilt; if (!buffer.str().empty()) @@ -367,8 +378,6 @@ bool get_WindPlantFreqPcontrolIEC_twppfilt(const BaseClass* BaseClass_ptr1, std: return false; } - - const char WindPlantFreqPcontrolIEC::debugName[] = "WindPlantFreqPcontrolIEC"; const char* WindPlantFreqPcontrolIEC::debugString() const { @@ -377,27 +386,27 @@ const char* WindPlantFreqPcontrolIEC::debugString() const void WindPlantFreqPcontrolIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC"), &WindPlantFreqPcontrolIEC_factory)); + factory_map.emplace("cim:WindPlantFreqPcontrolIEC", &WindPlantFreqPcontrolIEC_factory); } void WindPlantFreqPcontrolIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.dprefmax"), &assign_WindPlantFreqPcontrolIEC_dprefmax)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.dprefmin"), &assign_WindPlantFreqPcontrolIEC_dprefmin)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.kiwpp"), &assign_WindPlantFreqPcontrolIEC_kiwpp)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.kpwpp"), &assign_WindPlantFreqPcontrolIEC_kpwpp)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.prefmax"), &assign_WindPlantFreqPcontrolIEC_prefmax)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.prefmin"), &assign_WindPlantFreqPcontrolIEC_prefmin)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.tpft"), &assign_WindPlantFreqPcontrolIEC_tpft)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.tpfv"), &assign_WindPlantFreqPcontrolIEC_tpfv)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.twpffilt"), &assign_WindPlantFreqPcontrolIEC_twpffilt)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.twppfilt"), &assign_WindPlantFreqPcontrolIEC_twppfilt)); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.dprefmax", &assign_WindPlantFreqPcontrolIEC_dprefmax); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.dprefmin", &assign_WindPlantFreqPcontrolIEC_dprefmin); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.kiwpp", &assign_WindPlantFreqPcontrolIEC_kiwpp); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.kpwpp", &assign_WindPlantFreqPcontrolIEC_kpwpp); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.prefmax", &assign_WindPlantFreqPcontrolIEC_prefmax); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.prefmin", &assign_WindPlantFreqPcontrolIEC_prefmin); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.tpft", &assign_WindPlantFreqPcontrolIEC_tpft); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.tpfv", &assign_WindPlantFreqPcontrolIEC_tpfv); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.twpffilt", &assign_WindPlantFreqPcontrolIEC_twpffilt); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.twppfilt", &assign_WindPlantFreqPcontrolIEC_twppfilt); } void WindPlantFreqPcontrolIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.WindDynamicsLookupTable"), &assign_WindPlantFreqPcontrolIEC_WindDynamicsLookupTable)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.WindPlantIEC"), &assign_WindPlantFreqPcontrolIEC_WindPlantIEC)); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.WindDynamicsLookupTable", &assign_WindPlantFreqPcontrolIEC_WindDynamicsLookupTable); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.WindPlantIEC", &assign_WindPlantFreqPcontrolIEC_WindPlantIEC); } void WindPlantFreqPcontrolIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/WindPlantFreqPcontrolIEC.hpp b/CGMES_2.4.15_27JAN2020/WindPlantFreqPcontrolIEC.hpp index 4ce4f541a..069d958c9 100644 --- a/CGMES_2.4.15_27JAN2020/WindPlantFreqPcontrolIEC.hpp +++ b/CGMES_2.4.15_27JAN2020/WindPlantFreqPcontrolIEC.hpp @@ -21,9 +21,7 @@ namespace CIMPP class WindDynamicsLookupTable; class WindPlantIEC; - /* - Frequency and active power controller model. Reference: IEC Standard 61400-27-1 Annex E. - */ + /** \brief Frequency and active power controller model. Reference: IEC Standard 61400-27-1 Annex E. */ class WindPlantFreqPcontrolIEC : public IdentifiedObject { public: @@ -31,18 +29,41 @@ namespace CIMPP WindPlantFreqPcontrolIEC(); ~WindPlantFreqPcontrolIEC() override; - std::list WindDynamicsLookupTable; /* The frequency and active power wind plant control model with which this wind dynamics lookup table is associated. Default: 0 */ - CIMPP::WindPlantIEC* WindPlantIEC; /* Wind plant model with which this wind plant frequency and active power control is associated. Default: 0 */ - CIMPP::PU dprefmax; /* Maximum ramp rate of request from the plant controller to the wind turbines (). It is project dependent parameter. Default: nullptr */ - CIMPP::PU dprefmin; /* Minimum (negative) ramp rate of request from the plant controller to the wind turbines (). It is project dependent parameter. Default: nullptr */ - CIMPP::Simple_Float kiwpp; /* Plant P controller integral gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::Simple_Float kpwpp; /* Plant P controller proportional gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU prefmax; /* Maximum request from the plant controller to the wind turbines (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU prefmin; /* Minimum request from the plant controller to the wind turbines (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tpft; /* Lead time constant in reference value transfer function (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds tpfv; /* Lag time constant in reference value transfer function (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds twpffilt; /* Filter time constant for frequency measurement (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds twppfilt; /* Filter time constant for active power measurement (). It is type dependent parameter. Default: nullptr */ + /** \brief The frequency and active power wind plant control model with which this wind dynamics lookup table is associated. Default: 0 */ + std::list WindDynamicsLookupTable; + + /** \brief Wind plant model with which this wind plant frequency and active power control is associated. Default: 0 */ + CIMPP::WindPlantIEC* WindPlantIEC; + + /** \brief Maximum ramp rate of request from the plant controller to the wind turbines (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU dprefmax; + + /** \brief Minimum (negative) ramp rate of request from the plant controller to the wind turbines (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU dprefmin; + + /** \brief Plant P controller integral gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::Simple_Float kiwpp; + + /** \brief Plant P controller proportional gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::Simple_Float kpwpp; + + /** \brief Maximum request from the plant controller to the wind turbines (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU prefmax; + + /** \brief Minimum request from the plant controller to the wind turbines (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU prefmin; + + /** \brief Lead time constant in reference value transfer function (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tpft; + + /** \brief Lag time constant in reference value transfer function (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds tpfv; + + /** \brief Filter time constant for frequency measurement (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds twpffilt; + + /** \brief Filter time constant for active power measurement (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds twppfilt; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/WindPlantIEC.cpp b/CGMES_2.4.15_27JAN2020/WindPlantIEC.cpp index 5e9a20c83..b455a5284 100644 --- a/CGMES_2.4.15_27JAN2020/WindPlantIEC.cpp +++ b/CGMES_2.4.15_27JAN2020/WindPlantIEC.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindPlantIEC::WindPlantIEC() : WindPlantFreqPcontrolIEC(nullptr), WindPlantReactiveControlIEC(nullptr) {}; -WindPlantIEC::~WindPlantIEC() {}; +WindPlantIEC::WindPlantIEC() : WindPlantFreqPcontrolIEC(nullptr), WindPlantReactiveControlIEC(nullptr) {} +WindPlantIEC::~WindPlantIEC() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ WindPlantIEC::getPossibleProfilesForAttributes() const return map; } - - bool assign_WindPlantFreqPcontrolIEC_WindPlantIEC(BaseClass*, BaseClass*); bool assign_WindPlantIEC_WindPlantFreqPcontrolIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_WindPlantIEC_WindPlantFreqPcontrolIEC(BaseClass* BaseClass_ptr1, Bas } return false; } + bool assign_WindPlantReactiveControlIEC_WindPlantIEC(BaseClass*, BaseClass*); bool assign_WindPlantIEC_WindPlantReactiveControlIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_WindPlantIEC_WindPlantReactiveControlIEC(BaseClass* BaseClass_ptr1, return false; } - bool get_WindPlantIEC_WindPlantFreqPcontrolIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindPlantIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindPlantFreqPcontrolIEC != 0) { @@ -93,7 +92,8 @@ bool get_WindPlantIEC_WindPlantFreqPcontrolIEC(const BaseClass* BaseClass_ptr1, bool get_WindPlantIEC_WindPlantReactiveControlIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindPlantIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindPlantReactiveControlIEC != 0) { @@ -104,7 +104,6 @@ bool get_WindPlantIEC_WindPlantReactiveControlIEC(const BaseClass* BaseClass_ptr return false; } - const char WindPlantIEC::debugName[] = "WindPlantIEC"; const char* WindPlantIEC::debugString() const { @@ -113,7 +112,7 @@ const char* WindPlantIEC::debugString() const void WindPlantIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindPlantIEC"), &WindPlantIEC_factory)); + factory_map.emplace("cim:WindPlantIEC", &WindPlantIEC_factory); } void WindPlantIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void WindPlantIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPlantIEC.WindPlantFreqPcontrolIEC"), &assign_WindPlantIEC_WindPlantFreqPcontrolIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantIEC.WindPlantReactiveControlIEC"), &assign_WindPlantIEC_WindPlantReactiveControlIEC)); + assign_map.emplace("cim:WindPlantIEC.WindPlantFreqPcontrolIEC", &assign_WindPlantIEC_WindPlantFreqPcontrolIEC); + assign_map.emplace("cim:WindPlantIEC.WindPlantReactiveControlIEC", &assign_WindPlantIEC_WindPlantReactiveControlIEC); } void WindPlantIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/WindPlantIEC.hpp b/CGMES_2.4.15_27JAN2020/WindPlantIEC.hpp index 4b2d8e239..8f277cafa 100644 --- a/CGMES_2.4.15_27JAN2020/WindPlantIEC.hpp +++ b/CGMES_2.4.15_27JAN2020/WindPlantIEC.hpp @@ -18,9 +18,7 @@ namespace CIMPP class WindPlantFreqPcontrolIEC; class WindPlantReactiveControlIEC; - /* - Simplified IEC type plant level model. Reference: IEC 61400-27-1, AnnexE. - */ + /** \brief Simplified IEC type plant level model. Reference: IEC 61400-27-1, AnnexE. */ class WindPlantIEC : public WindPlantDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP WindPlantIEC(); ~WindPlantIEC() override; - CIMPP::WindPlantFreqPcontrolIEC* WindPlantFreqPcontrolIEC; /* Wind plant frequency and active power control model associated with this wind plant. Default: 0 */ - CIMPP::WindPlantReactiveControlIEC* WindPlantReactiveControlIEC; /* Wind plant reactive control model associated with this wind plant. Default: 0 */ + /** \brief Wind plant frequency and active power control model associated with this wind plant. Default: 0 */ + CIMPP::WindPlantFreqPcontrolIEC* WindPlantFreqPcontrolIEC; + + /** \brief Wind plant reactive control model associated with this wind plant. Default: 0 */ + CIMPP::WindPlantReactiveControlIEC* WindPlantReactiveControlIEC; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/WindPlantReactiveControlIEC.cpp b/CGMES_2.4.15_27JAN2020/WindPlantReactiveControlIEC.cpp index b37d33409..8135d692c 100644 --- a/CGMES_2.4.15_27JAN2020/WindPlantReactiveControlIEC.cpp +++ b/CGMES_2.4.15_27JAN2020/WindPlantReactiveControlIEC.cpp @@ -9,24 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "WindPlantIEC.hpp" -#include "Simple_Float.hpp" -#include "Simple_Float.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -WindPlantReactiveControlIEC::WindPlantReactiveControlIEC() : WindPlantIEC(nullptr) {}; -WindPlantReactiveControlIEC::~WindPlantReactiveControlIEC() {}; +WindPlantReactiveControlIEC::WindPlantReactiveControlIEC() : WindPlantIEC(nullptr) {} +WindPlantReactiveControlIEC::~WindPlantReactiveControlIEC() {} static const std::list PossibleProfilesForClass = { @@ -66,197 +53,210 @@ WindPlantReactiveControlIEC::getPossibleProfilesForAttributes() const return map; } +bool assign_WindPlantIEC_WindPlantReactiveControlIEC(BaseClass*, BaseClass*); +bool assign_WindPlantReactiveControlIEC_WindPlantIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + WindPlantIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindPlantIEC != element2) + { + element->WindPlantIEC = element2; + return assign_WindPlantIEC_WindPlantReactiveControlIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_WindPlantReactiveControlIEC_kiwpx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_kiwpx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kiwpx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_kpwpx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_kpwpx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpwpx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_kwpqu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_kwpqu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kwpqu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_mwppf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_mwppf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwppf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_mwpu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_mwpu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwpu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_twppfilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_twppfilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->twppfilt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_twpqfilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_twpqfilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->twpqfilt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_twpufilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_twpufilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->twpufilt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_txft(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_txft(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->txft; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_txfv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_txfv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->txfv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_uwpqdip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_uwpqdip(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uwpqdip; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_xrefmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_xrefmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xrefmax; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_WindPlantReactiveControlIEC_xrefmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->xrefmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindPlantIEC_WindPlantReactiveControlIEC(BaseClass*, BaseClass*); -bool assign_WindPlantReactiveControlIEC_WindPlantIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindPlantReactiveControlIEC_xrefmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); - WindPlantIEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindPlantIEC != element2) + buffer >> element->xrefmin; + if (!buffer.fail()) { - element->WindPlantIEC = element2; - return assign_WindPlantIEC_WindPlantReactiveControlIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_WindPlantReactiveControlIEC_kiwpx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kiwpx; if (!buffer.str().empty()) @@ -270,7 +270,8 @@ bool get_WindPlantReactiveControlIEC_kiwpx(const BaseClass* BaseClass_ptr1, std: bool get_WindPlantReactiveControlIEC_kpwpx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpwpx; if (!buffer.str().empty()) @@ -284,7 +285,8 @@ bool get_WindPlantReactiveControlIEC_kpwpx(const BaseClass* BaseClass_ptr1, std: bool get_WindPlantReactiveControlIEC_kwpqu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kwpqu; if (!buffer.str().empty()) @@ -298,7 +300,8 @@ bool get_WindPlantReactiveControlIEC_kwpqu(const BaseClass* BaseClass_ptr1, std: bool get_WindPlantReactiveControlIEC_mwppf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwppf; if (!buffer.str().empty()) @@ -312,7 +315,8 @@ bool get_WindPlantReactiveControlIEC_mwppf(const BaseClass* BaseClass_ptr1, std: bool get_WindPlantReactiveControlIEC_mwpu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwpu; if (!buffer.str().empty()) @@ -326,7 +330,8 @@ bool get_WindPlantReactiveControlIEC_mwpu(const BaseClass* BaseClass_ptr1, std:: bool get_WindPlantReactiveControlIEC_twppfilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twppfilt; if (!buffer.str().empty()) @@ -340,7 +345,8 @@ bool get_WindPlantReactiveControlIEC_twppfilt(const BaseClass* BaseClass_ptr1, s bool get_WindPlantReactiveControlIEC_twpqfilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twpqfilt; if (!buffer.str().empty()) @@ -354,7 +360,8 @@ bool get_WindPlantReactiveControlIEC_twpqfilt(const BaseClass* BaseClass_ptr1, s bool get_WindPlantReactiveControlIEC_twpufilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twpufilt; if (!buffer.str().empty()) @@ -368,7 +375,8 @@ bool get_WindPlantReactiveControlIEC_twpufilt(const BaseClass* BaseClass_ptr1, s bool get_WindPlantReactiveControlIEC_txft(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->txft; if (!buffer.str().empty()) @@ -382,7 +390,8 @@ bool get_WindPlantReactiveControlIEC_txft(const BaseClass* BaseClass_ptr1, std:: bool get_WindPlantReactiveControlIEC_txfv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->txfv; if (!buffer.str().empty()) @@ -396,7 +405,8 @@ bool get_WindPlantReactiveControlIEC_txfv(const BaseClass* BaseClass_ptr1, std:: bool get_WindPlantReactiveControlIEC_uwpqdip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uwpqdip; if (!buffer.str().empty()) @@ -410,7 +420,8 @@ bool get_WindPlantReactiveControlIEC_uwpqdip(const BaseClass* BaseClass_ptr1, st bool get_WindPlantReactiveControlIEC_xrefmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xrefmax; if (!buffer.str().empty()) @@ -424,7 +435,8 @@ bool get_WindPlantReactiveControlIEC_xrefmax(const BaseClass* BaseClass_ptr1, st bool get_WindPlantReactiveControlIEC_xrefmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xrefmin; if (!buffer.str().empty()) @@ -436,8 +448,6 @@ bool get_WindPlantReactiveControlIEC_xrefmin(const BaseClass* BaseClass_ptr1, st return false; } - - const char WindPlantReactiveControlIEC::debugName[] = "WindPlantReactiveControlIEC"; const char* WindPlantReactiveControlIEC::debugString() const { @@ -446,29 +456,29 @@ const char* WindPlantReactiveControlIEC::debugString() const void WindPlantReactiveControlIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC"), &WindPlantReactiveControlIEC_factory)); + factory_map.emplace("cim:WindPlantReactiveControlIEC", &WindPlantReactiveControlIEC_factory); } void WindPlantReactiveControlIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.kiwpx"), &assign_WindPlantReactiveControlIEC_kiwpx)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.kpwpx"), &assign_WindPlantReactiveControlIEC_kpwpx)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.kwpqu"), &assign_WindPlantReactiveControlIEC_kwpqu)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.mwppf"), &assign_WindPlantReactiveControlIEC_mwppf)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.mwpu"), &assign_WindPlantReactiveControlIEC_mwpu)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.twppfilt"), &assign_WindPlantReactiveControlIEC_twppfilt)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.twpqfilt"), &assign_WindPlantReactiveControlIEC_twpqfilt)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.twpufilt"), &assign_WindPlantReactiveControlIEC_twpufilt)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.txft"), &assign_WindPlantReactiveControlIEC_txft)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.txfv"), &assign_WindPlantReactiveControlIEC_txfv)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.uwpqdip"), &assign_WindPlantReactiveControlIEC_uwpqdip)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.xrefmax"), &assign_WindPlantReactiveControlIEC_xrefmax)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.xrefmin"), &assign_WindPlantReactiveControlIEC_xrefmin)); + assign_map.emplace("cim:WindPlantReactiveControlIEC.kiwpx", &assign_WindPlantReactiveControlIEC_kiwpx); + assign_map.emplace("cim:WindPlantReactiveControlIEC.kpwpx", &assign_WindPlantReactiveControlIEC_kpwpx); + assign_map.emplace("cim:WindPlantReactiveControlIEC.kwpqu", &assign_WindPlantReactiveControlIEC_kwpqu); + assign_map.emplace("cim:WindPlantReactiveControlIEC.mwppf", &assign_WindPlantReactiveControlIEC_mwppf); + assign_map.emplace("cim:WindPlantReactiveControlIEC.mwpu", &assign_WindPlantReactiveControlIEC_mwpu); + assign_map.emplace("cim:WindPlantReactiveControlIEC.twppfilt", &assign_WindPlantReactiveControlIEC_twppfilt); + assign_map.emplace("cim:WindPlantReactiveControlIEC.twpqfilt", &assign_WindPlantReactiveControlIEC_twpqfilt); + assign_map.emplace("cim:WindPlantReactiveControlIEC.twpufilt", &assign_WindPlantReactiveControlIEC_twpufilt); + assign_map.emplace("cim:WindPlantReactiveControlIEC.txft", &assign_WindPlantReactiveControlIEC_txft); + assign_map.emplace("cim:WindPlantReactiveControlIEC.txfv", &assign_WindPlantReactiveControlIEC_txfv); + assign_map.emplace("cim:WindPlantReactiveControlIEC.uwpqdip", &assign_WindPlantReactiveControlIEC_uwpqdip); + assign_map.emplace("cim:WindPlantReactiveControlIEC.xrefmax", &assign_WindPlantReactiveControlIEC_xrefmax); + assign_map.emplace("cim:WindPlantReactiveControlIEC.xrefmin", &assign_WindPlantReactiveControlIEC_xrefmin); } void WindPlantReactiveControlIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.WindPlantIEC"), &assign_WindPlantReactiveControlIEC_WindPlantIEC)); + assign_map.emplace("cim:WindPlantReactiveControlIEC.WindPlantIEC", &assign_WindPlantReactiveControlIEC_WindPlantIEC); } void WindPlantReactiveControlIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/WindPlantReactiveControlIEC.hpp b/CGMES_2.4.15_27JAN2020/WindPlantReactiveControlIEC.hpp index 963b7f804..fdcfe8416 100644 --- a/CGMES_2.4.15_27JAN2020/WindPlantReactiveControlIEC.hpp +++ b/CGMES_2.4.15_27JAN2020/WindPlantReactiveControlIEC.hpp @@ -21,9 +21,7 @@ namespace CIMPP { class WindPlantIEC; - /* - Simplified plant voltage and reactive power control model for use with type 3 and type 4 wind turbine models. Reference: IEC Standard 61400-27-1 Annex E. - */ + /** \brief Simplified plant voltage and reactive power control model for use with type 3 and type 4 wind turbine models. Reference: IEC Standard 61400-27-1 Annex E. */ class WindPlantReactiveControlIEC : public IdentifiedObject { public: @@ -31,20 +29,47 @@ namespace CIMPP WindPlantReactiveControlIEC(); ~WindPlantReactiveControlIEC() override; - CIMPP::WindPlantIEC* WindPlantIEC; /* Wind plant model with which this wind reactive control is associated. Default: 0 */ - CIMPP::Simple_Float kiwpx; /* Plant Q controller integral gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::Simple_Float kpwpx; /* Plant Q controller proportional gain (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU kwpqu; /* Plant voltage control droop (). It is project dependent parameter. Default: nullptr */ - CIMPP::Boolean mwppf; /* Power factor control modes selector (). Used only if mwpu is set to false. true = 1: power factor control false = 0: reactive power control. It is project dependent parameter. Default: false */ - CIMPP::Boolean mwpu; /* Reactive power control modes selector (). true = 1: voltage control false = 0: reactive power control. It is project dependent parameter. Default: false */ - CIMPP::Seconds twppfilt; /* Filter time constant for active power measurement (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds twpqfilt; /* Filter time constant for reactive power measurement (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds twpufilt; /* Filter time constant for voltage measurement (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds txft; /* Lead time constant in reference value transfer function (). It is type dependent parameter. Default: nullptr */ - CIMPP::Seconds txfv; /* Lag time constant in reference value transfer function (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU uwpqdip; /* Voltage threshold for LVRT detection in q control (). It is type dependent parameter. Default: nullptr */ - CIMPP::PU xrefmax; /* Maximum ( or delta ) request from the plant controller (). It is project dependent parameter. Default: nullptr */ - CIMPP::PU xrefmin; /* Minimum ( or delta) request from the plant controller (). It is project dependent parameter. Default: nullptr */ + /** \brief Wind plant model with which this wind reactive control is associated. Default: 0 */ + CIMPP::WindPlantIEC* WindPlantIEC; + + /** \brief Plant Q controller integral gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::Simple_Float kiwpx; + + /** \brief Plant Q controller proportional gain (). It is type dependent parameter. Default: nullptr */ + CIMPP::Simple_Float kpwpx; + + /** \brief Plant voltage control droop (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU kwpqu; + + /** \brief Power factor control modes selector (). Used only if mwpu is set to false. true = 1: power factor control false = 0: reactive power control. It is project dependent parameter. Default: false */ + CIMPP::Boolean mwppf; + + /** \brief Reactive power control modes selector (). true = 1: voltage control false = 0: reactive power control. It is project dependent parameter. Default: false */ + CIMPP::Boolean mwpu; + + /** \brief Filter time constant for active power measurement (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds twppfilt; + + /** \brief Filter time constant for reactive power measurement (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds twpqfilt; + + /** \brief Filter time constant for voltage measurement (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds twpufilt; + + /** \brief Lead time constant in reference value transfer function (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds txft; + + /** \brief Lag time constant in reference value transfer function (). It is type dependent parameter. Default: nullptr */ + CIMPP::Seconds txfv; + + /** \brief Voltage threshold for LVRT detection in q control (). It is type dependent parameter. Default: nullptr */ + CIMPP::PU uwpqdip; + + /** \brief Maximum ( or delta ) request from the plant controller (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU xrefmax; + + /** \brief Minimum ( or delta) request from the plant controller (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU xrefmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/WindPlantUserDefined.cpp b/CGMES_2.4.15_27JAN2020/WindPlantUserDefined.cpp index 8c93c7a24..549a06449 100644 --- a/CGMES_2.4.15_27JAN2020/WindPlantUserDefined.cpp +++ b/CGMES_2.4.15_27JAN2020/WindPlantUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -WindPlantUserDefined::WindPlantUserDefined() {}; -WindPlantUserDefined::~WindPlantUserDefined() {}; +WindPlantUserDefined::WindPlantUserDefined() {} +WindPlantUserDefined::~WindPlantUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ WindPlantUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindPlantUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindPlantUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_WindPlantUserDefined(BaseClass*, BaseClass*); bool assign_WindPlantUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_WindPlantUserDefined_ProprietaryParameterDynamics(BaseClass* BaseCla return false; } +bool assign_WindPlantUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + WindPlantUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_WindPlantUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_WindPlantUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std:: return false; } - - const char WindPlantUserDefined::debugName[] = "WindPlantUserDefined"; const char* WindPlantUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* WindPlantUserDefined::debugString() const void WindPlantUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindPlantUserDefined"), &WindPlantUserDefined_factory)); + factory_map.emplace("cim:WindPlantUserDefined", &WindPlantUserDefined_factory); } void WindPlantUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPlantUserDefined.proprietary"), &assign_WindPlantUserDefined_proprietary)); + assign_map.emplace("cim:WindPlantUserDefined.proprietary", &assign_WindPlantUserDefined_proprietary); } void WindPlantUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPlantUserDefined.ProprietaryParameterDynamics"), &assign_WindPlantUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:WindPlantUserDefined.ProprietaryParameterDynamics", &assign_WindPlantUserDefined_ProprietaryParameterDynamics); } void WindPlantUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/WindPlantUserDefined.hpp b/CGMES_2.4.15_27JAN2020/WindPlantUserDefined.hpp index 127fde57f..d64898dfb 100644 --- a/CGMES_2.4.15_27JAN2020/WindPlantUserDefined.hpp +++ b/CGMES_2.4.15_27JAN2020/WindPlantUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Wind plant function block whose dynamic behaviour is described by - */ + /** \brief Wind plant function block whose dynamic behaviour is described by */ class WindPlantUserDefined : public WindPlantDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP WindPlantUserDefined(); ~WindPlantUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/WindProtectionIEC.cpp b/CGMES_2.4.15_27JAN2020/WindProtectionIEC.cpp index 5f0532fb0..b9bcdc44e 100644 --- a/CGMES_2.4.15_27JAN2020/WindProtectionIEC.cpp +++ b/CGMES_2.4.15_27JAN2020/WindProtectionIEC.cpp @@ -10,19 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindTurbineType1or2IEC.hpp" #include "WindTurbineType3or4IEC.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -WindProtectionIEC::WindProtectionIEC() : WindTurbineType1or2IEC(nullptr), WindTurbineType3or4IEC(nullptr) {}; -WindProtectionIEC::~WindProtectionIEC() {}; +WindProtectionIEC::WindProtectionIEC() : WindTurbineType1or2IEC(nullptr), WindTurbineType3or4IEC(nullptr) {} +WindProtectionIEC::~WindProtectionIEC() {} static const std::list PossibleProfilesForClass = { @@ -58,148 +50,158 @@ WindProtectionIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindProtectionIEC_fover(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType1or2IEC_WindProtectionIEC(BaseClass*, BaseClass*); +bool assign_WindProtectionIEC_WindTurbineType1or2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType1or2IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->fover; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType1or2IEC != element2) + { + element->WindTurbineType1or2IEC = element2; + return assign_WindTurbineType1or2IEC_WindProtectionIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindProtectionIEC_funder(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType3or4IEC_WindProtectionIEC(BaseClass*, BaseClass*); +bool assign_WindProtectionIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType3or4IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->funder; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType3or4IEC != element2) + { + element->WindTurbineType3or4IEC = element2; + return assign_WindTurbineType3or4IEC_WindProtectionIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindProtectionIEC_tfover(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindProtectionIEC_fover(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tfover; - if (buffer.fail()) - return false; - else + buffer >> element->fover; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindProtectionIEC_tfunder(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindProtectionIEC_funder(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tfunder; - if (buffer.fail()) - return false; - else + buffer >> element->funder; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindProtectionIEC_tuover(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindProtectionIEC_tfover(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tuover; - if (buffer.fail()) - return false; - else + buffer >> element->tfover; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindProtectionIEC_tuunder(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindProtectionIEC_tfunder(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tuunder; - if (buffer.fail()) - return false; - else + buffer >> element->tfunder; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindProtectionIEC_uover(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindProtectionIEC_tuover(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->uover; - if (buffer.fail()) - return false; - else + buffer >> element->tuover; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindProtectionIEC_uunder(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindProtectionIEC_tuunder(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->uunder; - if (buffer.fail()) - return false; - else + buffer >> element->tuunder; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindTurbineType1or2IEC_WindProtectionIEC(BaseClass*, BaseClass*); -bool assign_WindProtectionIEC_WindTurbineType1or2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindProtectionIEC_uover(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType1or2IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType1or2IEC != element2) + buffer >> element->uover; + if (!buffer.fail()) { - element->WindTurbineType1or2IEC = element2; - return assign_WindTurbineType1or2IEC_WindProtectionIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_WindTurbineType3or4IEC_WindProtectionIEC(BaseClass*, BaseClass*); -bool assign_WindProtectionIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_WindProtectionIEC_uunder(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType3or4IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType3or4IEC != element2) + buffer >> element->uunder; + if (!buffer.fail()) { - element->WindTurbineType3or4IEC = element2; - return assign_WindTurbineType3or4IEC_WindProtectionIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + + bool get_WindProtectionIEC_fover(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fover; if (!buffer.str().empty()) @@ -213,7 +215,8 @@ bool get_WindProtectionIEC_fover(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindProtectionIEC_funder(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->funder; if (!buffer.str().empty()) @@ -227,7 +230,8 @@ bool get_WindProtectionIEC_funder(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindProtectionIEC_tfover(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tfover; if (!buffer.str().empty()) @@ -241,7 +245,8 @@ bool get_WindProtectionIEC_tfover(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindProtectionIEC_tfunder(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tfunder; if (!buffer.str().empty()) @@ -255,7 +260,8 @@ bool get_WindProtectionIEC_tfunder(const BaseClass* BaseClass_ptr1, std::strings bool get_WindProtectionIEC_tuover(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tuover; if (!buffer.str().empty()) @@ -269,7 +275,8 @@ bool get_WindProtectionIEC_tuover(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindProtectionIEC_tuunder(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tuunder; if (!buffer.str().empty()) @@ -283,7 +290,8 @@ bool get_WindProtectionIEC_tuunder(const BaseClass* BaseClass_ptr1, std::strings bool get_WindProtectionIEC_uover(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uover; if (!buffer.str().empty()) @@ -297,7 +305,8 @@ bool get_WindProtectionIEC_uover(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindProtectionIEC_uunder(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uunder; if (!buffer.str().empty()) @@ -309,8 +318,6 @@ bool get_WindProtectionIEC_uunder(const BaseClass* BaseClass_ptr1, std::stringst return false; } - - const char WindProtectionIEC::debugName[] = "WindProtectionIEC"; const char* WindProtectionIEC::debugString() const { @@ -319,25 +326,25 @@ const char* WindProtectionIEC::debugString() const void WindProtectionIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindProtectionIEC"), &WindProtectionIEC_factory)); + factory_map.emplace("cim:WindProtectionIEC", &WindProtectionIEC_factory); } void WindProtectionIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.fover"), &assign_WindProtectionIEC_fover)); - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.funder"), &assign_WindProtectionIEC_funder)); - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.tfover"), &assign_WindProtectionIEC_tfover)); - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.tfunder"), &assign_WindProtectionIEC_tfunder)); - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.tuover"), &assign_WindProtectionIEC_tuover)); - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.tuunder"), &assign_WindProtectionIEC_tuunder)); - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.uover"), &assign_WindProtectionIEC_uover)); - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.uunder"), &assign_WindProtectionIEC_uunder)); + assign_map.emplace("cim:WindProtectionIEC.fover", &assign_WindProtectionIEC_fover); + assign_map.emplace("cim:WindProtectionIEC.funder", &assign_WindProtectionIEC_funder); + assign_map.emplace("cim:WindProtectionIEC.tfover", &assign_WindProtectionIEC_tfover); + assign_map.emplace("cim:WindProtectionIEC.tfunder", &assign_WindProtectionIEC_tfunder); + assign_map.emplace("cim:WindProtectionIEC.tuover", &assign_WindProtectionIEC_tuover); + assign_map.emplace("cim:WindProtectionIEC.tuunder", &assign_WindProtectionIEC_tuunder); + assign_map.emplace("cim:WindProtectionIEC.uover", &assign_WindProtectionIEC_uover); + assign_map.emplace("cim:WindProtectionIEC.uunder", &assign_WindProtectionIEC_uunder); } void WindProtectionIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.WindTurbineType1or2IEC"), &assign_WindProtectionIEC_WindTurbineType1or2IEC)); - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.WindTurbineType3or4IEC"), &assign_WindProtectionIEC_WindTurbineType3or4IEC)); + assign_map.emplace("cim:WindProtectionIEC.WindTurbineType1or2IEC", &assign_WindProtectionIEC_WindTurbineType1or2IEC); + assign_map.emplace("cim:WindProtectionIEC.WindTurbineType3or4IEC", &assign_WindProtectionIEC_WindTurbineType3or4IEC); } void WindProtectionIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/WindProtectionIEC.hpp b/CGMES_2.4.15_27JAN2020/WindProtectionIEC.hpp index bcc203c4d..38c2e8b1a 100644 --- a/CGMES_2.4.15_27JAN2020/WindProtectionIEC.hpp +++ b/CGMES_2.4.15_27JAN2020/WindProtectionIEC.hpp @@ -20,9 +20,7 @@ namespace CIMPP class WindTurbineType1or2IEC; class WindTurbineType3or4IEC; - /* - The grid protection model includes protection against over and under voltage, and against over and under frequency. Reference: IEC Standard 614000-27-1 Section 6.6.6. - */ + /** \brief The grid protection model includes protection against over and under voltage, and against over and under frequency. Reference: IEC Standard 614000-27-1 Section 6.6.6. */ class WindProtectionIEC : public IdentifiedObject { public: @@ -30,16 +28,35 @@ namespace CIMPP WindProtectionIEC(); ~WindProtectionIEC() override; - CIMPP::WindTurbineType1or2IEC* WindTurbineType1or2IEC; /* Wind generator type 1 or 2 model with which this wind turbine protection model is associated. Default: 0 */ - CIMPP::WindTurbineType3or4IEC* WindTurbineType3or4IEC; /* Wind generator type 3 or 4 model with which this wind turbine protection model is associated. Default: 0 */ - CIMPP::PU fover; /* Set of wind turbine over frequency protection levels (). It is project dependent parameter. Default: nullptr */ - CIMPP::PU funder; /* Set of wind turbine under frequency protection levels (). It is project dependent parameter. Default: nullptr */ - CIMPP::Seconds tfover; /* Set of corresponding wind turbine over frequency protection disconnection times (). It is project dependent parameter. Default: nullptr */ - CIMPP::Seconds tfunder; /* Set of corresponding wind turbine under frequency protection disconnection times (). It is project dependent parameter. Default: nullptr */ - CIMPP::Seconds tuover; /* Set of corresponding wind turbine over voltage protection disconnection times (). It is project dependent parameter. Default: nullptr */ - CIMPP::Seconds tuunder; /* Set of corresponding wind turbine under voltage protection disconnection times (). It is project dependent parameter. Default: nullptr */ - CIMPP::PU uover; /* Set of wind turbine over voltage protection levels (). It is project dependent parameter. Default: nullptr */ - CIMPP::PU uunder; /* Set of wind turbine under voltage protection levels (). It is project dependent parameter. Default: nullptr */ + /** \brief Wind generator type 1 or 2 model with which this wind turbine protection model is associated. Default: 0 */ + CIMPP::WindTurbineType1or2IEC* WindTurbineType1or2IEC; + + /** \brief Wind generator type 3 or 4 model with which this wind turbine protection model is associated. Default: 0 */ + CIMPP::WindTurbineType3or4IEC* WindTurbineType3or4IEC; + + /** \brief Set of wind turbine over frequency protection levels (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU fover; + + /** \brief Set of wind turbine under frequency protection levels (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU funder; + + /** \brief Set of corresponding wind turbine over frequency protection disconnection times (). It is project dependent parameter. Default: nullptr */ + CIMPP::Seconds tfover; + + /** \brief Set of corresponding wind turbine under frequency protection disconnection times (). It is project dependent parameter. Default: nullptr */ + CIMPP::Seconds tfunder; + + /** \brief Set of corresponding wind turbine over voltage protection disconnection times (). It is project dependent parameter. Default: nullptr */ + CIMPP::Seconds tuover; + + /** \brief Set of corresponding wind turbine under voltage protection disconnection times (). It is project dependent parameter. Default: nullptr */ + CIMPP::Seconds tuunder; + + /** \brief Set of wind turbine over voltage protection levels (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU uover; + + /** \brief Set of wind turbine under voltage protection levels (). It is project dependent parameter. Default: nullptr */ + CIMPP::PU uunder; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/WindQcontrolModesKind.cpp b/CGMES_2.4.15_27JAN2020/WindQcontrolModesKind.cpp index b5c887e96..3e9f617b5 100644 --- a/CGMES_2.4.15_27JAN2020/WindQcontrolModesKind.cpp +++ b/CGMES_2.4.15_27JAN2020/WindQcontrolModesKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "WindQcontrolModesKind") + if (EnumSymbol.substr(0, pos) != "WindQcontrolModesKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,22 +50,22 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "voltage") + if (EnumSymbol == "voltage") { rop = WindQcontrolModesKind::voltage; return lop; } - if(EnumSymbol == "reactivePower") + if (EnumSymbol == "reactivePower") { rop = WindQcontrolModesKind::reactivePower; return lop; } - if(EnumSymbol == "openLoopReactivePower") + if (EnumSymbol == "openLoopReactivePower") { rop = WindQcontrolModesKind::openLoopReactivePower; return lop; } - if(EnumSymbol == "powerFactor") + if (EnumSymbol == "powerFactor") { rop = WindQcontrolModesKind::powerFactor; return lop; diff --git a/CGMES_2.4.15_27JAN2020/WindQcontrolModesKind.hpp b/CGMES_2.4.15_27JAN2020/WindQcontrolModesKind.hpp index 770a20720..de75bba95 100644 --- a/CGMES_2.4.15_27JAN2020/WindQcontrolModesKind.hpp +++ b/CGMES_2.4.15_27JAN2020/WindQcontrolModesKind.hpp @@ -9,29 +9,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - General wind turbine Q control modes . - */ + /** \brief General wind turbine Q control modes . */ class WindQcontrolModesKind { public: enum WindQcontrolModesKind_ENUM { - /** - * Voltage control (). - */ + /** Voltage control (). */ voltage, - /** - * Reactive power control (). - */ + /** Reactive power control (). */ reactivePower, - /** - * Open loop reactive power control (only used with closed loop at plant level) (). - */ + /** Open loop reactive power control (only used with closed loop at plant level) (). */ openLoopReactivePower, - /** - * Power factor control (). - */ + /** Power factor control (). */ powerFactor, }; diff --git a/CGMES_2.4.15_27JAN2020/WindTurbineType1or2Dynamics.cpp b/CGMES_2.4.15_27JAN2020/WindTurbineType1or2Dynamics.cpp index 0b1deb098..2d438018b 100644 --- a/CGMES_2.4.15_27JAN2020/WindTurbineType1or2Dynamics.cpp +++ b/CGMES_2.4.15_27JAN2020/WindTurbineType1or2Dynamics.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindTurbineType1or2Dynamics::WindTurbineType1or2Dynamics() : AsynchronousMachineDynamics(nullptr), RemoteInputSignal(nullptr) {}; -WindTurbineType1or2Dynamics::~WindTurbineType1or2Dynamics() {}; +WindTurbineType1or2Dynamics::WindTurbineType1or2Dynamics() : AsynchronousMachineDynamics(nullptr), RemoteInputSignal(nullptr) {} +WindTurbineType1or2Dynamics::~WindTurbineType1or2Dynamics() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ WindTurbineType1or2Dynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_AsynchronousMachineDynamics_WindTurbineType1or2Dynamics(BaseClass*, BaseClass*); bool assign_WindTurbineType1or2Dynamics_AsynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_WindTurbineType1or2Dynamics_AsynchronousMachineDynamics(BaseClass* B } return false; } + bool assign_RemoteInputSignal_WindTurbineType1or2Dynamics(BaseClass*, BaseClass*); bool assign_WindTurbineType1or2Dynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_WindTurbineType1or2Dynamics_RemoteInputSignal(BaseClass* BaseClass_p return false; } - bool get_WindTurbineType1or2Dynamics_AsynchronousMachineDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType1or2Dynamics* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType1or2Dynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->AsynchronousMachineDynamics != 0) { @@ -93,7 +92,8 @@ bool get_WindTurbineType1or2Dynamics_AsynchronousMachineDynamics(const BaseClass bool get_WindTurbineType1or2Dynamics_RemoteInputSignal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType1or2Dynamics* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType1or2Dynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->RemoteInputSignal != 0) { @@ -104,7 +104,6 @@ bool get_WindTurbineType1or2Dynamics_RemoteInputSignal(const BaseClass* BaseClas return false; } - const char WindTurbineType1or2Dynamics::debugName[] = "WindTurbineType1or2Dynamics"; const char* WindTurbineType1or2Dynamics::debugString() const { @@ -113,7 +112,7 @@ const char* WindTurbineType1or2Dynamics::debugString() const void WindTurbineType1or2Dynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindTurbineType1or2Dynamics"), &WindTurbineType1or2Dynamics_factory)); + factory_map.emplace("cim:WindTurbineType1or2Dynamics", &WindTurbineType1or2Dynamics_factory); } void WindTurbineType1or2Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void WindTurbineType1or2Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map< void WindTurbineType1or2Dynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType1or2Dynamics.AsynchronousMachineDynamics"), &assign_WindTurbineType1or2Dynamics_AsynchronousMachineDynamics)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType1or2Dynamics.RemoteInputSignal"), &assign_WindTurbineType1or2Dynamics_RemoteInputSignal)); + assign_map.emplace("cim:WindTurbineType1or2Dynamics.AsynchronousMachineDynamics", &assign_WindTurbineType1or2Dynamics_AsynchronousMachineDynamics); + assign_map.emplace("cim:WindTurbineType1or2Dynamics.RemoteInputSignal", &assign_WindTurbineType1or2Dynamics_RemoteInputSignal); } void WindTurbineType1or2Dynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/WindTurbineType1or2Dynamics.hpp b/CGMES_2.4.15_27JAN2020/WindTurbineType1or2Dynamics.hpp index 00bfc307a..9cd8ce493 100644 --- a/CGMES_2.4.15_27JAN2020/WindTurbineType1or2Dynamics.hpp +++ b/CGMES_2.4.15_27JAN2020/WindTurbineType1or2Dynamics.hpp @@ -18,9 +18,7 @@ namespace CIMPP class AsynchronousMachineDynamics; class RemoteInputSignal; - /* - Parent class supporting relationships to wind turbines Type 1 and 2 and their control models. - */ + /** \brief Parent class supporting relationships to wind turbines Type 1 and 2 and their control models. */ class WindTurbineType1or2Dynamics : public DynamicsFunctionBlock { public: @@ -28,8 +26,11 @@ namespace CIMPP WindTurbineType1or2Dynamics(); ~WindTurbineType1or2Dynamics() override; - CIMPP::AsynchronousMachineDynamics* AsynchronousMachineDynamics; /* Asynchronous machine model with which this wind generator type 1 or 2 model is associated. Default: 0 */ - CIMPP::RemoteInputSignal* RemoteInputSignal; /* Remote input signal used by this wind generator Type 1 or Type 2 model. Default: 0 */ + /** \brief Asynchronous machine model with which this wind generator type 1 or 2 model is associated. Default: 0 */ + CIMPP::AsynchronousMachineDynamics* AsynchronousMachineDynamics; + + /** \brief Remote input signal used by this wind generator Type 1 or Type 2 model. Default: 0 */ + CIMPP::RemoteInputSignal* RemoteInputSignal; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/WindTurbineType1or2IEC.cpp b/CGMES_2.4.15_27JAN2020/WindTurbineType1or2IEC.cpp index f27dc7912..251c07766 100644 --- a/CGMES_2.4.15_27JAN2020/WindTurbineType1or2IEC.cpp +++ b/CGMES_2.4.15_27JAN2020/WindTurbineType1or2IEC.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindTurbineType1or2IEC::WindTurbineType1or2IEC() : WindMechIEC(nullptr), WindProtectionIEC(nullptr) {}; -WindTurbineType1or2IEC::~WindTurbineType1or2IEC() {}; +WindTurbineType1or2IEC::WindTurbineType1or2IEC() : WindMechIEC(nullptr), WindProtectionIEC(nullptr) {} +WindTurbineType1or2IEC::~WindTurbineType1or2IEC() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ WindTurbineType1or2IEC::getPossibleProfilesForAttributes() const return map; } - - bool assign_WindMechIEC_WindTurbineType1or2IEC(BaseClass*, BaseClass*); bool assign_WindTurbineType1or2IEC_WindMechIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_WindTurbineType1or2IEC_WindMechIEC(BaseClass* BaseClass_ptr1, BaseCl } return false; } + bool assign_WindProtectionIEC_WindTurbineType1or2IEC(BaseClass*, BaseClass*); bool assign_WindTurbineType1or2IEC_WindProtectionIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_WindTurbineType1or2IEC_WindProtectionIEC(BaseClass* BaseClass_ptr1, return false; } - bool get_WindTurbineType1or2IEC_WindMechIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType1or2IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType1or2IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindMechIEC != 0) { @@ -93,7 +92,8 @@ bool get_WindTurbineType1or2IEC_WindMechIEC(const BaseClass* BaseClass_ptr1, std bool get_WindTurbineType1or2IEC_WindProtectionIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType1or2IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType1or2IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindProtectionIEC != 0) { @@ -104,7 +104,6 @@ bool get_WindTurbineType1or2IEC_WindProtectionIEC(const BaseClass* BaseClass_ptr return false; } - const char WindTurbineType1or2IEC::debugName[] = "WindTurbineType1or2IEC"; const char* WindTurbineType1or2IEC::debugString() const { @@ -113,7 +112,7 @@ const char* WindTurbineType1or2IEC::debugString() const void WindTurbineType1or2IEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindTurbineType1or2IEC"), &WindTurbineType1or2IEC_factory)); + factory_map.emplace("cim:WindTurbineType1or2IEC", &WindTurbineType1or2IEC_factory); } void WindTurbineType1or2IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void WindTurbineType1or2IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType1or2IEC.WindMechIEC"), &assign_WindTurbineType1or2IEC_WindMechIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType1or2IEC.WindProtectionIEC"), &assign_WindTurbineType1or2IEC_WindProtectionIEC)); + assign_map.emplace("cim:WindTurbineType1or2IEC.WindMechIEC", &assign_WindTurbineType1or2IEC_WindMechIEC); + assign_map.emplace("cim:WindTurbineType1or2IEC.WindProtectionIEC", &assign_WindTurbineType1or2IEC_WindProtectionIEC); } void WindTurbineType1or2IEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/WindTurbineType1or2IEC.hpp b/CGMES_2.4.15_27JAN2020/WindTurbineType1or2IEC.hpp index e120fa228..909b188a3 100644 --- a/CGMES_2.4.15_27JAN2020/WindTurbineType1or2IEC.hpp +++ b/CGMES_2.4.15_27JAN2020/WindTurbineType1or2IEC.hpp @@ -18,9 +18,7 @@ namespace CIMPP class WindMechIEC; class WindProtectionIEC; - /* - Generator model for wind turbine of IEC Type 1 or Type 2 is a standard asynchronous generator model. Reference: IEC Standard 614000-27-1 Section 6.6.3.1. - */ + /** \brief Generator model for wind turbine of IEC Type 1 or Type 2 is a standard asynchronous generator model. Reference: IEC Standard 614000-27-1 Section 6.6.3.1. */ class WindTurbineType1or2IEC : public WindTurbineType1or2Dynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP WindTurbineType1or2IEC(); ~WindTurbineType1or2IEC() override; - CIMPP::WindMechIEC* WindMechIEC; /* Wind mechanical model associated with this wind generator type 1 or 2 model. Default: 0 */ - CIMPP::WindProtectionIEC* WindProtectionIEC; /* Wind turbune protection model associated with this wind generator type 1 or 2 model. Default: 0 */ + /** \brief Wind mechanical model associated with this wind generator type 1 or 2 model. Default: 0 */ + CIMPP::WindMechIEC* WindMechIEC; + + /** \brief Wind turbune protection model associated with this wind generator type 1 or 2 model. Default: 0 */ + CIMPP::WindProtectionIEC* WindProtectionIEC; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/WindTurbineType3or4Dynamics.cpp b/CGMES_2.4.15_27JAN2020/WindTurbineType3or4Dynamics.cpp index a33613f66..921087b71 100644 --- a/CGMES_2.4.15_27JAN2020/WindTurbineType3or4Dynamics.cpp +++ b/CGMES_2.4.15_27JAN2020/WindTurbineType3or4Dynamics.cpp @@ -14,8 +14,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindTurbineType3or4Dynamics::WindTurbineType3or4Dynamics() : EnergySource(nullptr), RemoteInputSignal(nullptr), WindPlantDynamics(nullptr) {}; -WindTurbineType3or4Dynamics::~WindTurbineType3or4Dynamics() {}; +WindTurbineType3or4Dynamics::WindTurbineType3or4Dynamics() : EnergySource(nullptr), RemoteInputSignal(nullptr), WindPlantDynamics(nullptr) {} +WindTurbineType3or4Dynamics::~WindTurbineType3or4Dynamics() {} static const std::list PossibleProfilesForClass = { @@ -44,8 +44,6 @@ WindTurbineType3or4Dynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_EnergySource_WindTurbineType3or4Dynamics(BaseClass*, BaseClass*); bool assign_WindTurbineType3or4Dynamics_EnergySource(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -62,6 +60,7 @@ bool assign_WindTurbineType3or4Dynamics_EnergySource(BaseClass* BaseClass_ptr1, } return false; } + bool assign_RemoteInputSignal_WindTurbineType3or4Dynamics(BaseClass*, BaseClass*); bool assign_WindTurbineType3or4Dynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -78,6 +77,7 @@ bool assign_WindTurbineType3or4Dynamics_RemoteInputSignal(BaseClass* BaseClass_p } return false; } + bool assign_WindPlantDynamics_WindTurbineType3or4Dynamics(BaseClass*, BaseClass*); bool assign_WindTurbineType3or4Dynamics_WindPlantDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -95,10 +95,10 @@ bool assign_WindTurbineType3or4Dynamics_WindPlantDynamics(BaseClass* BaseClass_p return false; } - bool get_WindTurbineType3or4Dynamics_EnergySource(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType3or4Dynamics* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType3or4Dynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->EnergySource != 0) { @@ -111,7 +111,8 @@ bool get_WindTurbineType3or4Dynamics_EnergySource(const BaseClass* BaseClass_ptr bool get_WindTurbineType3or4Dynamics_RemoteInputSignal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType3or4Dynamics* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType3or4Dynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->RemoteInputSignal != 0) { @@ -124,7 +125,8 @@ bool get_WindTurbineType3or4Dynamics_RemoteInputSignal(const BaseClass* BaseClas bool get_WindTurbineType3or4Dynamics_WindPlantDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType3or4Dynamics* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType3or4Dynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindPlantDynamics != 0) { @@ -135,7 +137,6 @@ bool get_WindTurbineType3or4Dynamics_WindPlantDynamics(const BaseClass* BaseClas return false; } - const char WindTurbineType3or4Dynamics::debugName[] = "WindTurbineType3or4Dynamics"; const char* WindTurbineType3or4Dynamics::debugString() const { @@ -144,7 +145,7 @@ const char* WindTurbineType3or4Dynamics::debugString() const void WindTurbineType3or4Dynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4Dynamics"), &WindTurbineType3or4Dynamics_factory)); + factory_map.emplace("cim:WindTurbineType3or4Dynamics", &WindTurbineType3or4Dynamics_factory); } void WindTurbineType3or4Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -153,9 +154,9 @@ void WindTurbineType3or4Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map< void WindTurbineType3or4Dynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4Dynamics.EnergySource"), &assign_WindTurbineType3or4Dynamics_EnergySource)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4Dynamics.RemoteInputSignal"), &assign_WindTurbineType3or4Dynamics_RemoteInputSignal)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4Dynamics.WindPlantDynamics"), &assign_WindTurbineType3or4Dynamics_WindPlantDynamics)); + assign_map.emplace("cim:WindTurbineType3or4Dynamics.EnergySource", &assign_WindTurbineType3or4Dynamics_EnergySource); + assign_map.emplace("cim:WindTurbineType3or4Dynamics.RemoteInputSignal", &assign_WindTurbineType3or4Dynamics_RemoteInputSignal); + assign_map.emplace("cim:WindTurbineType3or4Dynamics.WindPlantDynamics", &assign_WindTurbineType3or4Dynamics_WindPlantDynamics); } void WindTurbineType3or4Dynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/WindTurbineType3or4Dynamics.hpp b/CGMES_2.4.15_27JAN2020/WindTurbineType3or4Dynamics.hpp index 581bfb43b..9c123fe1d 100644 --- a/CGMES_2.4.15_27JAN2020/WindTurbineType3or4Dynamics.hpp +++ b/CGMES_2.4.15_27JAN2020/WindTurbineType3or4Dynamics.hpp @@ -19,9 +19,7 @@ namespace CIMPP class RemoteInputSignal; class WindPlantDynamics; - /* - Parent class supporting relationships to wind turbines Type 3 and 4 and wind plant including their control models. - */ + /** \brief Parent class supporting relationships to wind turbines Type 3 and 4 and wind plant including their control models. */ class WindTurbineType3or4Dynamics : public DynamicsFunctionBlock { public: @@ -29,9 +27,14 @@ namespace CIMPP WindTurbineType3or4Dynamics(); ~WindTurbineType3or4Dynamics() override; - CIMPP::EnergySource* EnergySource; /* Energy Source (current source) with which this wind Type 3 or 4 dynamics model is asoociated. Default: 0 */ - CIMPP::RemoteInputSignal* RemoteInputSignal; /* Wind turbine Type 3 or 4 models using this remote input signal. Default: 0 */ - CIMPP::WindPlantDynamics* WindPlantDynamics; /* The wind plant with which the wind turbines type 3 or 4 are associated. Default: 0 */ + /** \brief Energy Source (current source) with which this wind Type 3 or 4 dynamics model is asoociated. Default: 0 */ + CIMPP::EnergySource* EnergySource; + + /** \brief Wind turbine Type 3 or 4 models using this remote input signal. Default: 0 */ + CIMPP::RemoteInputSignal* RemoteInputSignal; + + /** \brief The wind plant with which the wind turbines type 3 or 4 are associated. Default: 0 */ + CIMPP::WindPlantDynamics* WindPlantDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/WindTurbineType3or4IEC.cpp b/CGMES_2.4.15_27JAN2020/WindTurbineType3or4IEC.cpp index 2d1dd0fc6..7dd415768 100644 --- a/CGMES_2.4.15_27JAN2020/WindTurbineType3or4IEC.cpp +++ b/CGMES_2.4.15_27JAN2020/WindTurbineType3or4IEC.cpp @@ -8,14 +8,14 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "WindContQIEC.hpp" #include "WindContCurrLimIEC.hpp" +#include "WindContQIEC.hpp" #include "WindProtectionIEC.hpp" using namespace CIMPP; -WindTurbineType3or4IEC::WindTurbineType3or4IEC() : WIndContQIEC(nullptr), WindContCurrLimIEC(nullptr), WindProtectionIEC(nullptr) {}; -WindTurbineType3or4IEC::~WindTurbineType3or4IEC() {}; +WindTurbineType3or4IEC::WindTurbineType3or4IEC() : WIndContQIEC(nullptr), WindContCurrLimIEC(nullptr), WindProtectionIEC(nullptr) {} +WindTurbineType3or4IEC::~WindTurbineType3or4IEC() {} static const std::list PossibleProfilesForClass = { @@ -44,8 +44,6 @@ WindTurbineType3or4IEC::getPossibleProfilesForAttributes() const return map; } - - bool assign_WindContQIEC_WindTurbineType3or4IEC(BaseClass*, BaseClass*); bool assign_WindTurbineType3or4IEC_WIndContQIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -62,6 +60,7 @@ bool assign_WindTurbineType3or4IEC_WIndContQIEC(BaseClass* BaseClass_ptr1, BaseC } return false; } + bool assign_WindContCurrLimIEC_WindTurbineType3or4IEC(BaseClass*, BaseClass*); bool assign_WindTurbineType3or4IEC_WindContCurrLimIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -78,6 +77,7 @@ bool assign_WindTurbineType3or4IEC_WindContCurrLimIEC(BaseClass* BaseClass_ptr1, } return false; } + bool assign_WindProtectionIEC_WindTurbineType3or4IEC(BaseClass*, BaseClass*); bool assign_WindTurbineType3or4IEC_WindProtectionIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -95,10 +95,10 @@ bool assign_WindTurbineType3or4IEC_WindProtectionIEC(BaseClass* BaseClass_ptr1, return false; } - bool get_WindTurbineType3or4IEC_WIndContQIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WIndContQIEC != 0) { @@ -111,7 +111,8 @@ bool get_WindTurbineType3or4IEC_WIndContQIEC(const BaseClass* BaseClass_ptr1, st bool get_WindTurbineType3or4IEC_WindContCurrLimIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContCurrLimIEC != 0) { @@ -124,7 +125,8 @@ bool get_WindTurbineType3or4IEC_WindContCurrLimIEC(const BaseClass* BaseClass_pt bool get_WindTurbineType3or4IEC_WindProtectionIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindProtectionIEC != 0) { @@ -135,7 +137,6 @@ bool get_WindTurbineType3or4IEC_WindProtectionIEC(const BaseClass* BaseClass_ptr return false; } - const char WindTurbineType3or4IEC::debugName[] = "WindTurbineType3or4IEC"; const char* WindTurbineType3or4IEC::debugString() const { @@ -144,7 +145,7 @@ const char* WindTurbineType3or4IEC::debugString() const void WindTurbineType3or4IEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4IEC"), &WindTurbineType3or4IEC_factory)); + factory_map.emplace("cim:WindTurbineType3or4IEC", &WindTurbineType3or4IEC_factory); } void WindTurbineType3or4IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -153,9 +154,9 @@ void WindTurbineType3or4IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4IEC.WIndContQIEC"), &assign_WindTurbineType3or4IEC_WIndContQIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4IEC.WindContCurrLimIEC"), &assign_WindTurbineType3or4IEC_WindContCurrLimIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4IEC.WindProtectionIEC"), &assign_WindTurbineType3or4IEC_WindProtectionIEC)); + assign_map.emplace("cim:WindTurbineType3or4IEC.WIndContQIEC", &assign_WindTurbineType3or4IEC_WIndContQIEC); + assign_map.emplace("cim:WindTurbineType3or4IEC.WindContCurrLimIEC", &assign_WindTurbineType3or4IEC_WindContCurrLimIEC); + assign_map.emplace("cim:WindTurbineType3or4IEC.WindProtectionIEC", &assign_WindTurbineType3or4IEC_WindProtectionIEC); } void WindTurbineType3or4IEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/WindTurbineType3or4IEC.hpp b/CGMES_2.4.15_27JAN2020/WindTurbineType3or4IEC.hpp index 3808a1eae..8246ead01 100644 --- a/CGMES_2.4.15_27JAN2020/WindTurbineType3or4IEC.hpp +++ b/CGMES_2.4.15_27JAN2020/WindTurbineType3or4IEC.hpp @@ -19,9 +19,7 @@ namespace CIMPP class WindContQIEC; class WindProtectionIEC; - /* - Parent class supporting relationships to IEC wind turbines Type 3 and 4 and wind plant including their control models. - */ + /** \brief Parent class supporting relationships to IEC wind turbines Type 3 and 4 and wind plant including their control models. */ class WindTurbineType3or4IEC : public WindTurbineType3or4Dynamics { public: @@ -29,9 +27,14 @@ namespace CIMPP WindTurbineType3or4IEC(); ~WindTurbineType3or4IEC() override; - CIMPP::WindContQIEC* WIndContQIEC; /* Wind control Q model associated with this wind turbine type 3 or 4 model. Default: 0 */ - CIMPP::WindContCurrLimIEC* WindContCurrLimIEC; /* Wind control current limitation model associated with this wind turbine type 3 or 4 model. Default: 0 */ - CIMPP::WindProtectionIEC* WindProtectionIEC; /* Wind turbune protection model associated with this wind generator type 3 or 4 model. Default: 0 */ + /** \brief Wind control Q model associated with this wind turbine type 3 or 4 model. Default: 0 */ + CIMPP::WindContQIEC* WIndContQIEC; + + /** \brief Wind control current limitation model associated with this wind turbine type 3 or 4 model. Default: 0 */ + CIMPP::WindContCurrLimIEC* WindContCurrLimIEC; + + /** \brief Wind turbune protection model associated with this wind generator type 3 or 4 model. Default: 0 */ + CIMPP::WindProtectionIEC* WindProtectionIEC; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/WindTurbineType4aIEC.cpp b/CGMES_2.4.15_27JAN2020/WindTurbineType4aIEC.cpp index f1170dc4c..19a53dd03 100644 --- a/CGMES_2.4.15_27JAN2020/WindTurbineType4aIEC.cpp +++ b/CGMES_2.4.15_27JAN2020/WindTurbineType4aIEC.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindTurbineType4aIEC::WindTurbineType4aIEC() : WindContPType4aIEC(nullptr) {}; -WindTurbineType4aIEC::~WindTurbineType4aIEC() {}; +WindTurbineType4aIEC::WindTurbineType4aIEC() : WindContPType4aIEC(nullptr) {} +WindTurbineType4aIEC::~WindTurbineType4aIEC() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ WindTurbineType4aIEC::getPossibleProfilesForAttributes() const return map; } - - bool assign_WindContPType4aIEC_WindTurbineType4aIEC(BaseClass*, BaseClass*); bool assign_WindTurbineType4aIEC_WindContPType4aIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_WindTurbineType4aIEC_WindContPType4aIEC(BaseClass* BaseClass_ptr1, B return false; } - bool get_WindTurbineType4aIEC_WindContPType4aIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType4aIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType4aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContPType4aIEC != 0) { @@ -73,7 +71,6 @@ bool get_WindTurbineType4aIEC_WindContPType4aIEC(const BaseClass* BaseClass_ptr1 return false; } - const char WindTurbineType4aIEC::debugName[] = "WindTurbineType4aIEC"; const char* WindTurbineType4aIEC::debugString() const { @@ -82,7 +79,7 @@ const char* WindTurbineType4aIEC::debugString() const void WindTurbineType4aIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindTurbineType4aIEC"), &WindTurbineType4aIEC_factory)); + factory_map.emplace("cim:WindTurbineType4aIEC", &WindTurbineType4aIEC_factory); } void WindTurbineType4aIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void WindTurbineType4aIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType4aIEC.WindContPType4aIEC"), &assign_WindTurbineType4aIEC_WindContPType4aIEC)); + assign_map.emplace("cim:WindTurbineType4aIEC.WindContPType4aIEC", &assign_WindTurbineType4aIEC_WindContPType4aIEC); } void WindTurbineType4aIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/WindTurbineType4aIEC.hpp b/CGMES_2.4.15_27JAN2020/WindTurbineType4aIEC.hpp index 980d5388d..67bcd203b 100644 --- a/CGMES_2.4.15_27JAN2020/WindTurbineType4aIEC.hpp +++ b/CGMES_2.4.15_27JAN2020/WindTurbineType4aIEC.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class WindContPType4aIEC; - /* - Wind turbine IEC Type 4A. Reference: IEC Standard 61400-27-1, section 6.5.5.2. - */ + /** \brief Wind turbine IEC Type 4A. Reference: IEC Standard 61400-27-1, section 6.5.5.2. */ class WindTurbineType4aIEC : public WindGenType4IEC { public: @@ -27,7 +25,8 @@ namespace CIMPP WindTurbineType4aIEC(); ~WindTurbineType4aIEC() override; - CIMPP::WindContPType4aIEC* WindContPType4aIEC; /* Wind control P type 4A model associated with this wind turbine type 4A model. Default: 0 */ + /** \brief Wind control P type 4A model associated with this wind turbine type 4A model. Default: 0 */ + CIMPP::WindContPType4aIEC* WindContPType4aIEC; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/WindTurbineType4bIEC.cpp b/CGMES_2.4.15_27JAN2020/WindTurbineType4bIEC.cpp index 1dd86053d..ad7a668db 100644 --- a/CGMES_2.4.15_27JAN2020/WindTurbineType4bIEC.cpp +++ b/CGMES_2.4.15_27JAN2020/WindTurbineType4bIEC.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindTurbineType4bIEC::WindTurbineType4bIEC() : WindContPType4bIEC(nullptr), WindMechIEC(nullptr) {}; -WindTurbineType4bIEC::~WindTurbineType4bIEC() {}; +WindTurbineType4bIEC::WindTurbineType4bIEC() : WindContPType4bIEC(nullptr), WindMechIEC(nullptr) {} +WindTurbineType4bIEC::~WindTurbineType4bIEC() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ WindTurbineType4bIEC::getPossibleProfilesForAttributes() const return map; } - - bool assign_WindContPType4bIEC_WindTurbineType4bIEC(BaseClass*, BaseClass*); bool assign_WindTurbineType4bIEC_WindContPType4bIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_WindTurbineType4bIEC_WindContPType4bIEC(BaseClass* BaseClass_ptr1, B } return false; } + bool assign_WindMechIEC_WindTurbineType4bIEC(BaseClass*, BaseClass*); bool assign_WindTurbineType4bIEC_WindMechIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_WindTurbineType4bIEC_WindMechIEC(BaseClass* BaseClass_ptr1, BaseClas return false; } - bool get_WindTurbineType4bIEC_WindContPType4bIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContPType4bIEC != 0) { @@ -93,7 +92,8 @@ bool get_WindTurbineType4bIEC_WindContPType4bIEC(const BaseClass* BaseClass_ptr1 bool get_WindTurbineType4bIEC_WindMechIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindMechIEC != 0) { @@ -104,7 +104,6 @@ bool get_WindTurbineType4bIEC_WindMechIEC(const BaseClass* BaseClass_ptr1, std:: return false; } - const char WindTurbineType4bIEC::debugName[] = "WindTurbineType4bIEC"; const char* WindTurbineType4bIEC::debugString() const { @@ -113,7 +112,7 @@ const char* WindTurbineType4bIEC::debugString() const void WindTurbineType4bIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindTurbineType4bIEC"), &WindTurbineType4bIEC_factory)); + factory_map.emplace("cim:WindTurbineType4bIEC", &WindTurbineType4bIEC_factory); } void WindTurbineType4bIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void WindTurbineType4bIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType4bIEC.WindContPType4bIEC"), &assign_WindTurbineType4bIEC_WindContPType4bIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType4bIEC.WindMechIEC"), &assign_WindTurbineType4bIEC_WindMechIEC)); + assign_map.emplace("cim:WindTurbineType4bIEC.WindContPType4bIEC", &assign_WindTurbineType4bIEC_WindContPType4bIEC); + assign_map.emplace("cim:WindTurbineType4bIEC.WindMechIEC", &assign_WindTurbineType4bIEC_WindMechIEC); } void WindTurbineType4bIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/WindTurbineType4bIEC.hpp b/CGMES_2.4.15_27JAN2020/WindTurbineType4bIEC.hpp index ad1094a43..26da27746 100644 --- a/CGMES_2.4.15_27JAN2020/WindTurbineType4bIEC.hpp +++ b/CGMES_2.4.15_27JAN2020/WindTurbineType4bIEC.hpp @@ -18,9 +18,7 @@ namespace CIMPP class WindContPType4bIEC; class WindMechIEC; - /* - Wind turbine IEC Type 4A. Reference: IEC Standard 61400-27-1, section 6.5.5.3. - */ + /** \brief Wind turbine IEC Type 4A. Reference: IEC Standard 61400-27-1, section 6.5.5.3. */ class WindTurbineType4bIEC : public WindGenType4IEC { public: @@ -28,8 +26,11 @@ namespace CIMPP WindTurbineType4bIEC(); ~WindTurbineType4bIEC() override; - CIMPP::WindContPType4bIEC* WindContPType4bIEC; /* Wind control P type 4B model associated with this wind turbine type 4B model. Default: 0 */ - CIMPP::WindMechIEC* WindMechIEC; /* Wind mechanical model associated with this wind turbine Type 4B model. Default: 0 */ + /** \brief Wind control P type 4B model associated with this wind turbine type 4B model. Default: 0 */ + CIMPP::WindContPType4bIEC* WindContPType4bIEC; + + /** \brief Wind mechanical model associated with this wind turbine Type 4B model. Default: 0 */ + CIMPP::WindMechIEC* WindMechIEC; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/WindType1or2UserDefined.cpp b/CGMES_2.4.15_27JAN2020/WindType1or2UserDefined.cpp index 9a6a86bd9..be1daa797 100644 --- a/CGMES_2.4.15_27JAN2020/WindType1or2UserDefined.cpp +++ b/CGMES_2.4.15_27JAN2020/WindType1or2UserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -WindType1or2UserDefined::WindType1or2UserDefined() {}; -WindType1or2UserDefined::~WindType1or2UserDefined() {}; +WindType1or2UserDefined::WindType1or2UserDefined() {} +WindType1or2UserDefined::~WindType1or2UserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ WindType1or2UserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindType1or2UserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindType1or2UserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_WindType1or2UserDefined(BaseClass*, BaseClass*); bool assign_WindType1or2UserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_WindType1or2UserDefined_ProprietaryParameterDynamics(BaseClass* Base return false; } +bool assign_WindType1or2UserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + WindType1or2UserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_WindType1or2UserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindType1or2UserDefined* element = dynamic_cast(BaseClass_ptr1)) + const WindType1or2UserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_WindType1or2UserDefined_proprietary(const BaseClass* BaseClass_ptr1, st return false; } - - const char WindType1or2UserDefined::debugName[] = "WindType1or2UserDefined"; const char* WindType1or2UserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* WindType1or2UserDefined::debugString() const void WindType1or2UserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindType1or2UserDefined"), &WindType1or2UserDefined_factory)); + factory_map.emplace("cim:WindType1or2UserDefined", &WindType1or2UserDefined_factory); } void WindType1or2UserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindType1or2UserDefined.proprietary"), &assign_WindType1or2UserDefined_proprietary)); + assign_map.emplace("cim:WindType1or2UserDefined.proprietary", &assign_WindType1or2UserDefined_proprietary); } void WindType1or2UserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindType1or2UserDefined.ProprietaryParameterDynamics"), &assign_WindType1or2UserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:WindType1or2UserDefined.ProprietaryParameterDynamics", &assign_WindType1or2UserDefined_ProprietaryParameterDynamics); } void WindType1or2UserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/WindType1or2UserDefined.hpp b/CGMES_2.4.15_27JAN2020/WindType1or2UserDefined.hpp index 9d7145ff4..dc0abcc62 100644 --- a/CGMES_2.4.15_27JAN2020/WindType1or2UserDefined.hpp +++ b/CGMES_2.4.15_27JAN2020/WindType1or2UserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Wind Type 1 or Type 2 function block whose dynamic behaviour is described by - */ + /** \brief Wind Type 1 or Type 2 function block whose dynamic behaviour is described by */ class WindType1or2UserDefined : public WindTurbineType1or2Dynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP WindType1or2UserDefined(); ~WindType1or2UserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/WindType3or4UserDefined.cpp b/CGMES_2.4.15_27JAN2020/WindType3or4UserDefined.cpp index d749efa43..300908ba4 100644 --- a/CGMES_2.4.15_27JAN2020/WindType3or4UserDefined.cpp +++ b/CGMES_2.4.15_27JAN2020/WindType3or4UserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -WindType3or4UserDefined::WindType3or4UserDefined() {}; -WindType3or4UserDefined::~WindType3or4UserDefined() {}; +WindType3or4UserDefined::WindType3or4UserDefined() {} +WindType3or4UserDefined::~WindType3or4UserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ WindType3or4UserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindType3or4UserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindType3or4UserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_WindType3or4UserDefined(BaseClass*, BaseClass*); bool assign_WindType3or4UserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_WindType3or4UserDefined_ProprietaryParameterDynamics(BaseClass* Base return false; } +bool assign_WindType3or4UserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + WindType3or4UserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_WindType3or4UserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindType3or4UserDefined* element = dynamic_cast(BaseClass_ptr1)) + const WindType3or4UserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_WindType3or4UserDefined_proprietary(const BaseClass* BaseClass_ptr1, st return false; } - - const char WindType3or4UserDefined::debugName[] = "WindType3or4UserDefined"; const char* WindType3or4UserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* WindType3or4UserDefined::debugString() const void WindType3or4UserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindType3or4UserDefined"), &WindType3or4UserDefined_factory)); + factory_map.emplace("cim:WindType3or4UserDefined", &WindType3or4UserDefined_factory); } void WindType3or4UserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindType3or4UserDefined.proprietary"), &assign_WindType3or4UserDefined_proprietary)); + assign_map.emplace("cim:WindType3or4UserDefined.proprietary", &assign_WindType3or4UserDefined_proprietary); } void WindType3or4UserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindType3or4UserDefined.ProprietaryParameterDynamics"), &assign_WindType3or4UserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:WindType3or4UserDefined.ProprietaryParameterDynamics", &assign_WindType3or4UserDefined_ProprietaryParameterDynamics); } void WindType3or4UserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_2.4.15_27JAN2020/WindType3or4UserDefined.hpp b/CGMES_2.4.15_27JAN2020/WindType3or4UserDefined.hpp index 2e8317b5f..5259b5916 100644 --- a/CGMES_2.4.15_27JAN2020/WindType3or4UserDefined.hpp +++ b/CGMES_2.4.15_27JAN2020/WindType3or4UserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Wind Type 3 or Type 4 function block whose dynamic behaviour is described by - */ + /** \brief Wind Type 3 or Type 4 function block whose dynamic behaviour is described by */ class WindType3or4UserDefined : public WindTurbineType3or4Dynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP WindType3or4UserDefined(); ~WindType3or4UserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on proprietary model as opposed to detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_2.4.15_27JAN2020/WindingConnection.cpp b/CGMES_2.4.15_27JAN2020/WindingConnection.cpp index 498dcbe94..90e8fc5af 100644 --- a/CGMES_2.4.15_27JAN2020/WindingConnection.cpp +++ b/CGMES_2.4.15_27JAN2020/WindingConnection.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "WindingConnection") + if (EnumSymbol.substr(0, pos) != "WindingConnection") { lop.setstate(std::ios::failbit); return lop; @@ -50,37 +50,37 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "D") + if (EnumSymbol == "D") { rop = WindingConnection::D; return lop; } - if(EnumSymbol == "Y") + if (EnumSymbol == "Y") { rop = WindingConnection::Y; return lop; } - if(EnumSymbol == "Z") + if (EnumSymbol == "Z") { rop = WindingConnection::Z; return lop; } - if(EnumSymbol == "Yn") + if (EnumSymbol == "Yn") { rop = WindingConnection::Yn; return lop; } - if(EnumSymbol == "Zn") + if (EnumSymbol == "Zn") { rop = WindingConnection::Zn; return lop; } - if(EnumSymbol == "A") + if (EnumSymbol == "A") { rop = WindingConnection::A; return lop; } - if(EnumSymbol == "I") + if (EnumSymbol == "I") { rop = WindingConnection::I; return lop; diff --git a/CGMES_2.4.15_27JAN2020/WindingConnection.hpp b/CGMES_2.4.15_27JAN2020/WindingConnection.hpp index 398f89ecf..897bb3e00 100644 --- a/CGMES_2.4.15_27JAN2020/WindingConnection.hpp +++ b/CGMES_2.4.15_27JAN2020/WindingConnection.hpp @@ -9,41 +9,25 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Winding connection type. - */ + /** \brief Winding connection type. */ class WindingConnection { public: enum WindingConnection_ENUM { - /** - * Delta - */ + /** Delta */ D, - /** - * Wye - */ + /** Wye */ Y, - /** - * ZigZag - */ + /** ZigZag */ Z, - /** - * Wye, with neutral brought out for grounding. - */ + /** Wye, with neutral brought out for grounding. */ Yn, - /** - * ZigZag, with neutral brought out for grounding. - */ + /** ZigZag, with neutral brought out for grounding. */ Zn, - /** - * Autotransformer common winding - */ + /** Autotransformer common winding */ A, - /** - * Independent winding, for single-phase connections - */ + /** Independent winding, for single-phase connections */ I, }; diff --git a/CGMES_3.0.0/ACDCConverter.cpp b/CGMES_3.0.0/ACDCConverter.cpp index 8f3d1f162..7928158c3 100644 --- a/CGMES_3.0.0/ACDCConverter.cpp +++ b/CGMES_3.0.0/ACDCConverter.cpp @@ -10,30 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "ACDCConverterDCTerminal.hpp" #include "Terminal.hpp" -#include "ApparentPower.hpp" -#include "CurrentFlow.hpp" -#include "ActivePower.hpp" -#include "ActivePower.hpp" -#include "Voltage.hpp" -#include "ActivePower.hpp" -#include "Voltage.hpp" -#include "Integer.hpp" -#include "ActivePower.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" -#include "Voltage.hpp" -#include "Resistance.hpp" -#include "ActivePowerPerCurrentFlow.hpp" -#include "ActivePower.hpp" -#include "Voltage.hpp" -#include "Voltage.hpp" -#include "Voltage.hpp" -#include "Voltage.hpp" using namespace CIMPP; -ACDCConverter::ACDCConverter() : PccTerminal(nullptr) {}; -ACDCConverter::~ACDCConverter() {}; +ACDCConverter::ACDCConverter() : PccTerminal(nullptr) {} +ACDCConverter::~ACDCConverter() {} static const std::list PossibleProfilesForClass = { @@ -83,291 +64,325 @@ ACDCConverter::getPossibleProfilesForAttributes() const return map; } +bool assign_ACDCConverterDCTerminal_DCConductingEquipment(BaseClass*, BaseClass*); +bool assign_ACDCConverter_DCTerminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + ACDCConverterDCTerminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->DCTerminals.begin(), element->DCTerminals.end(), element2) == element->DCTerminals.end()) + { + element->DCTerminals.push_back(element2); + return assign_ACDCConverterDCTerminal_DCConductingEquipment(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Terminal_ConverterDCSides(BaseClass*, BaseClass*); +bool assign_ACDCConverter_PccTerminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PccTerminal != element2) + { + element->PccTerminal = element2; + return assign_Terminal_ConverterDCSides(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_ACDCConverter_baseS(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_baseS(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->baseS; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_idc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_idc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->idc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_idleLoss(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_idleLoss(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->idleLoss; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_maxP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_maxP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_maxUdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_maxUdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxUdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_minP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_minP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_minUdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_minUdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minUdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_numberOfValves(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_numberOfValves(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->numberOfValves; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_p(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_poleLossP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_poleLossP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->poleLossP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_ratedUdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_ratedUdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedUdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_resistiveLoss(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_resistiveLoss(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->resistiveLoss; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_switchingLoss(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_switchingLoss(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->switchingLoss; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_targetPpcc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_targetPpcc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->targetPpcc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_targetUdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_targetUdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->targetUdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_uc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_udc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_udc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->udc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverter_valveU0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCConverter_valveU0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->valveU0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACDCConverterDCTerminal_DCConductingEquipment(BaseClass*, BaseClass*); -bool assign_ACDCConverter_DCTerminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) -{ - ACDCConverter* element = dynamic_cast(BaseClass_ptr1); - ACDCConverterDCTerminal* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) - { - if (std::find(element->DCTerminals.begin(), element->DCTerminals.end(), element2) == element->DCTerminals.end()) - { - element->DCTerminals.push_back(element2); - return assign_ACDCConverterDCTerminal_DCConductingEquipment(BaseClass_ptr2, BaseClass_ptr1); - } - return true; - } - return false; -} -bool assign_Terminal_ConverterDCSides(BaseClass*, BaseClass*); -bool assign_ACDCConverter_PccTerminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_ACDCConverter_PccTerminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - ACDCConverter* element = dynamic_cast(BaseClass_ptr1); - Terminal* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->PccTerminal != element2) + if (element->PccTerminal != 0) { - element->PccTerminal = element2; - return assign_Terminal_ConverterDCSides(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->PccTerminal); + return true; } - return true; } return false; } bool get_ACDCConverter_baseS(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->baseS; if (!buffer.str().empty()) @@ -381,7 +396,8 @@ bool get_ACDCConverter_baseS(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ACDCConverter_idc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->idc; if (!buffer.str().empty()) @@ -395,7 +411,8 @@ bool get_ACDCConverter_idc(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ACDCConverter_idleLoss(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->idleLoss; if (!buffer.str().empty()) @@ -409,7 +426,8 @@ bool get_ACDCConverter_idleLoss(const BaseClass* BaseClass_ptr1, std::stringstre bool get_ACDCConverter_maxP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxP; if (!buffer.str().empty()) @@ -423,7 +441,8 @@ bool get_ACDCConverter_maxP(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ACDCConverter_maxUdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxUdc; if (!buffer.str().empty()) @@ -437,7 +456,8 @@ bool get_ACDCConverter_maxUdc(const BaseClass* BaseClass_ptr1, std::stringstream bool get_ACDCConverter_minP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minP; if (!buffer.str().empty()) @@ -451,7 +471,8 @@ bool get_ACDCConverter_minP(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ACDCConverter_minUdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minUdc; if (!buffer.str().empty()) @@ -465,7 +486,8 @@ bool get_ACDCConverter_minUdc(const BaseClass* BaseClass_ptr1, std::stringstream bool get_ACDCConverter_numberOfValves(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->numberOfValves; if (!buffer.str().empty()) @@ -479,7 +501,8 @@ bool get_ACDCConverter_numberOfValves(const BaseClass* BaseClass_ptr1, std::stri bool get_ACDCConverter_p(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p; if (!buffer.str().empty()) @@ -493,7 +516,8 @@ bool get_ACDCConverter_p(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ACDCConverter_poleLossP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->poleLossP; if (!buffer.str().empty()) @@ -507,7 +531,8 @@ bool get_ACDCConverter_poleLossP(const BaseClass* BaseClass_ptr1, std::stringstr bool get_ACDCConverter_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q; if (!buffer.str().empty()) @@ -521,7 +546,8 @@ bool get_ACDCConverter_q(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ACDCConverter_ratedUdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedUdc; if (!buffer.str().empty()) @@ -535,7 +561,8 @@ bool get_ACDCConverter_ratedUdc(const BaseClass* BaseClass_ptr1, std::stringstre bool get_ACDCConverter_resistiveLoss(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->resistiveLoss; if (!buffer.str().empty()) @@ -549,7 +576,8 @@ bool get_ACDCConverter_resistiveLoss(const BaseClass* BaseClass_ptr1, std::strin bool get_ACDCConverter_switchingLoss(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->switchingLoss; if (!buffer.str().empty()) @@ -563,7 +591,8 @@ bool get_ACDCConverter_switchingLoss(const BaseClass* BaseClass_ptr1, std::strin bool get_ACDCConverter_targetPpcc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->targetPpcc; if (!buffer.str().empty()) @@ -577,7 +606,8 @@ bool get_ACDCConverter_targetPpcc(const BaseClass* BaseClass_ptr1, std::stringst bool get_ACDCConverter_targetUdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->targetUdc; if (!buffer.str().empty()) @@ -591,7 +621,8 @@ bool get_ACDCConverter_targetUdc(const BaseClass* BaseClass_ptr1, std::stringstr bool get_ACDCConverter_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uc; if (!buffer.str().empty()) @@ -605,7 +636,8 @@ bool get_ACDCConverter_uc(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ACDCConverter_udc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->udc; if (!buffer.str().empty()) @@ -619,7 +651,8 @@ bool get_ACDCConverter_udc(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ACDCConverter_valveU0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->valveU0; if (!buffer.str().empty()) @@ -631,21 +664,6 @@ bool get_ACDCConverter_valveU0(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } - -bool get_ACDCConverter_PccTerminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const ACDCConverter* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->PccTerminal != 0) - { - BaseClass_list.push_back(element->PccTerminal); - return true; - } - } - return false; -} - - const char ACDCConverter::debugName[] = "ACDCConverter"; const char* ACDCConverter::debugString() const { @@ -654,36 +672,36 @@ const char* ACDCConverter::debugString() const void ACDCConverter::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ACDCConverter"), &ACDCConverter_factory)); + factory_map.emplace("cim:ACDCConverter", &ACDCConverter_factory); } void ACDCConverter::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.baseS"), &assign_ACDCConverter_baseS)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.idc"), &assign_ACDCConverter_idc)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.idleLoss"), &assign_ACDCConverter_idleLoss)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.maxP"), &assign_ACDCConverter_maxP)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.maxUdc"), &assign_ACDCConverter_maxUdc)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.minP"), &assign_ACDCConverter_minP)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.minUdc"), &assign_ACDCConverter_minUdc)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.numberOfValves"), &assign_ACDCConverter_numberOfValves)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.p"), &assign_ACDCConverter_p)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.poleLossP"), &assign_ACDCConverter_poleLossP)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.q"), &assign_ACDCConverter_q)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.ratedUdc"), &assign_ACDCConverter_ratedUdc)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.resistiveLoss"), &assign_ACDCConverter_resistiveLoss)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.switchingLoss"), &assign_ACDCConverter_switchingLoss)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.targetPpcc"), &assign_ACDCConverter_targetPpcc)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.targetUdc"), &assign_ACDCConverter_targetUdc)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.uc"), &assign_ACDCConverter_uc)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.udc"), &assign_ACDCConverter_udc)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.valveU0"), &assign_ACDCConverter_valveU0)); + assign_map.emplace("cim:ACDCConverter.baseS", &assign_ACDCConverter_baseS); + assign_map.emplace("cim:ACDCConverter.idc", &assign_ACDCConverter_idc); + assign_map.emplace("cim:ACDCConverter.idleLoss", &assign_ACDCConverter_idleLoss); + assign_map.emplace("cim:ACDCConverter.maxP", &assign_ACDCConverter_maxP); + assign_map.emplace("cim:ACDCConverter.maxUdc", &assign_ACDCConverter_maxUdc); + assign_map.emplace("cim:ACDCConverter.minP", &assign_ACDCConverter_minP); + assign_map.emplace("cim:ACDCConverter.minUdc", &assign_ACDCConverter_minUdc); + assign_map.emplace("cim:ACDCConverter.numberOfValves", &assign_ACDCConverter_numberOfValves); + assign_map.emplace("cim:ACDCConverter.p", &assign_ACDCConverter_p); + assign_map.emplace("cim:ACDCConverter.poleLossP", &assign_ACDCConverter_poleLossP); + assign_map.emplace("cim:ACDCConverter.q", &assign_ACDCConverter_q); + assign_map.emplace("cim:ACDCConverter.ratedUdc", &assign_ACDCConverter_ratedUdc); + assign_map.emplace("cim:ACDCConverter.resistiveLoss", &assign_ACDCConverter_resistiveLoss); + assign_map.emplace("cim:ACDCConverter.switchingLoss", &assign_ACDCConverter_switchingLoss); + assign_map.emplace("cim:ACDCConverter.targetPpcc", &assign_ACDCConverter_targetPpcc); + assign_map.emplace("cim:ACDCConverter.targetUdc", &assign_ACDCConverter_targetUdc); + assign_map.emplace("cim:ACDCConverter.uc", &assign_ACDCConverter_uc); + assign_map.emplace("cim:ACDCConverter.udc", &assign_ACDCConverter_udc); + assign_map.emplace("cim:ACDCConverter.valveU0", &assign_ACDCConverter_valveU0); } void ACDCConverter::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.DCTerminals"), &assign_ACDCConverter_DCTerminals)); - assign_map.insert(std::make_pair(std::string("cim:ACDCConverter.PccTerminal"), &assign_ACDCConverter_PccTerminal)); + assign_map.emplace("cim:ACDCConverter.DCTerminals", &assign_ACDCConverter_DCTerminals); + assign_map.emplace("cim:ACDCConverter.PccTerminal", &assign_ACDCConverter_PccTerminal); } void ACDCConverter::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/ACDCConverter.hpp b/CGMES_3.0.0/ACDCConverter.hpp index 39366360e..85235adf6 100644 --- a/CGMES_3.0.0/ACDCConverter.hpp +++ b/CGMES_3.0.0/ACDCConverter.hpp @@ -26,9 +26,7 @@ namespace CIMPP class ACDCConverterDCTerminal; class Terminal; - /* - A unit with valves for three phases, together with unit control equipment, essential protective and switching devices, DC storage capacitors, phase reactors and auxiliaries, if any, used for conversion. - */ + /** \brief A unit with valves for three phases, together with unit control equipment, essential protective and switching devices, DC storage capacitors, phase reactors and auxiliaries, if any, used for conversion. */ class ACDCConverter : public ConductingEquipment { public: @@ -36,27 +34,68 @@ namespace CIMPP ACDCConverter(); ~ACDCConverter() override; - std::list DCTerminals; /* A DC converter have DC converter terminals. A converter has two DC converter terminals. Default: 0 */ - CIMPP::Terminal* PccTerminal; /* Point of common coupling terminal for this converter DC side. It is typically the terminal on the power transformer (or switch) closest to the AC network. Default: 0 */ - CIMPP::ApparentPower baseS; /* Base apparent power of the converter pole. The attribute shall be a positive value. Default: nullptr */ - CIMPP::CurrentFlow idc; /* Converter DC current, also called Id. It is converter`s state variable, result from power flow. Default: nullptr */ - CIMPP::ActivePower idleLoss; /* Active power loss in pole at no power transfer. It is converter`s configuration data used in power flow. The attribute shall be a positive value. Default: nullptr */ - CIMPP::ActivePower maxP; /* Maximum active power limit. The value is overwritten by values of VsCapabilityCurve, if present. Default: nullptr */ - CIMPP::Voltage maxUdc; /* The maximum voltage on the DC side at which the converter should operate. It is converter`s configuration data used in power flow. The attribute shall be a positive value. Default: nullptr */ - CIMPP::ActivePower minP; /* Minimum active power limit. The value is overwritten by values of VsCapabilityCurve, if present. Default: nullptr */ - CIMPP::Voltage minUdc; /* The minimum voltage on the DC side at which the converter should operate. It is converter`s configuration data used in power flow. The attribute shall be a positive value. Default: nullptr */ - CIMPP::Integer numberOfValves; /* Number of valves in the converter. Used in loss calculations. Default: 0 */ - CIMPP::ActivePower p; /* Active power at the point of common coupling. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution in the case a simplified power flow model is used. Default: nullptr */ - CIMPP::ActivePower poleLossP; /* The active power loss at a DC Pole = idleLoss + switchingLoss*|Idc| + resitiveLoss*Idc^2. For lossless operation Pdc=Pac. For rectifier operation with losses Pdc=Pac-lossP. For inverter operation with losses Pdc=Pac+lossP. It is converter`s state variable used in power flow. The attribute shall be a positive value. Default: nullptr */ - CIMPP::ReactivePower q; /* Reactive power at the point of common coupling. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution in the case a simplified power flow model is used. Default: nullptr */ - CIMPP::Voltage ratedUdc; /* Rated converter DC voltage, also called UdN. The attribute shall be a positive value. It is converter`s configuration data used in power flow. For instance a bipolar HVDC link with value 200 kV has a 400kV difference between the dc lines. Default: nullptr */ - CIMPP::Resistance resistiveLoss; /* It is converter`s configuration data used in power flow. Refer to poleLossP. The attribute shall be a positive value. Default: nullptr */ - CIMPP::ActivePowerPerCurrentFlow switchingLoss; /* Switching losses, relative to the base apparent power `baseS`. Refer to poleLossP. The attribute shall be a positive value. Default: nullptr */ - CIMPP::ActivePower targetPpcc; /* Real power injection target in AC grid, at point of common coupling. Load sign convention is used, i.e. positive sign means flow out from a node. Default: nullptr */ - CIMPP::Voltage targetUdc; /* Target value for DC voltage magnitude. The attribute shall be a positive value. Default: nullptr */ - CIMPP::Voltage uc; /* Line-to-line converter voltage, the voltage at the AC side of the valve. It is converter`s state variable, result from power flow. The attribute shall be a positive value. Default: nullptr */ - CIMPP::Voltage udc; /* Converter voltage at the DC side, also called Ud. It is converter`s state variable, result from power flow. The attribute shall be a positive value. Default: nullptr */ - CIMPP::Voltage valveU0; /* Valve threshold voltage, also called Uvalve. Forward voltage drop when the valve is conducting. Used in loss calculations, i.e. the switchLoss depend on numberOfValves * valveU0. Default: nullptr */ + /** \brief A DC converter have DC converter terminals. A converter has two DC converter terminals. Default: 0 */ + std::list DCTerminals; + + /** \brief Point of common coupling terminal for this converter DC side. It is typically the terminal on the power transformer (or switch) closest to the AC network. Default: 0 */ + CIMPP::Terminal* PccTerminal; + + /** \brief Base apparent power of the converter pole. The attribute shall be a positive value. Default: nullptr */ + CIMPP::ApparentPower baseS; + + /** \brief Converter DC current, also called Id. It is converter`s state variable, result from power flow. Default: nullptr */ + CIMPP::CurrentFlow idc; + + /** \brief Active power loss in pole at no power transfer. It is converter`s configuration data used in power flow. The attribute shall be a positive value. Default: nullptr */ + CIMPP::ActivePower idleLoss; + + /** \brief Maximum active power limit. The value is overwritten by values of VsCapabilityCurve, if present. Default: nullptr */ + CIMPP::ActivePower maxP; + + /** \brief The maximum voltage on the DC side at which the converter should operate. It is converter`s configuration data used in power flow. The attribute shall be a positive value. Default: nullptr */ + CIMPP::Voltage maxUdc; + + /** \brief Minimum active power limit. The value is overwritten by values of VsCapabilityCurve, if present. Default: nullptr */ + CIMPP::ActivePower minP; + + /** \brief The minimum voltage on the DC side at which the converter should operate. It is converter`s configuration data used in power flow. The attribute shall be a positive value. Default: nullptr */ + CIMPP::Voltage minUdc; + + /** \brief Number of valves in the converter. Used in loss calculations. Default: 0 */ + CIMPP::Integer numberOfValves; + + /** \brief Active power at the point of common coupling. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution in the case a simplified power flow model is used. Default: nullptr */ + CIMPP::ActivePower p; + + /** \brief The active power loss at a DC Pole = idleLoss + switchingLoss*|Idc| + resitiveLoss*Idc^2. For lossless operation Pdc=Pac. For rectifier operation with losses Pdc=Pac-lossP. For inverter operation with losses Pdc=Pac+lossP. It is converter`s state variable used in power flow. The attribute shall be a positive value. Default: nullptr */ + CIMPP::ActivePower poleLossP; + + /** \brief Reactive power at the point of common coupling. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution in the case a simplified power flow model is used. Default: nullptr */ + CIMPP::ReactivePower q; + + /** \brief Rated converter DC voltage, also called UdN. The attribute shall be a positive value. It is converter`s configuration data used in power flow. For instance a bipolar HVDC link with value 200 kV has a 400kV difference between the dc lines. Default: nullptr */ + CIMPP::Voltage ratedUdc; + + /** \brief It is converter`s configuration data used in power flow. Refer to poleLossP. The attribute shall be a positive value. Default: nullptr */ + CIMPP::Resistance resistiveLoss; + + /** \brief Switching losses, relative to the base apparent power `baseS`. Refer to poleLossP. The attribute shall be a positive value. Default: nullptr */ + CIMPP::ActivePowerPerCurrentFlow switchingLoss; + + /** \brief Real power injection target in AC grid, at point of common coupling. Load sign convention is used, i.e. positive sign means flow out from a node. Default: nullptr */ + CIMPP::ActivePower targetPpcc; + + /** \brief Target value for DC voltage magnitude. The attribute shall be a positive value. Default: nullptr */ + CIMPP::Voltage targetUdc; + + /** \brief Line-to-line converter voltage, the voltage at the AC side of the valve. It is converter`s state variable, result from power flow. The attribute shall be a positive value. Default: nullptr */ + CIMPP::Voltage uc; + + /** \brief Converter voltage at the DC side, also called Ud. It is converter`s state variable, result from power flow. The attribute shall be a positive value. Default: nullptr */ + CIMPP::Voltage udc; + + /** \brief Valve threshold voltage, also called Uvalve. Forward voltage drop when the valve is conducting. Used in loss calculations, i.e. the switchLoss depend on numberOfValves * valveU0. Default: nullptr */ + CIMPP::Voltage valveU0; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ACDCConverterDCTerminal.cpp b/CGMES_3.0.0/ACDCConverterDCTerminal.cpp index c524cfbe9..1f445f5c1 100644 --- a/CGMES_3.0.0/ACDCConverterDCTerminal.cpp +++ b/CGMES_3.0.0/ACDCConverterDCTerminal.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ACDCConverter.hpp" -#include "DCPolarityKind.hpp" using namespace CIMPP; -ACDCConverterDCTerminal::ACDCConverterDCTerminal() : DCConductingEquipment(nullptr) {}; -ACDCConverterDCTerminal::~ACDCConverterDCTerminal() {}; +ACDCConverterDCTerminal::ACDCConverterDCTerminal() : DCConductingEquipment(nullptr) {} +ACDCConverterDCTerminal::~ACDCConverterDCTerminal() {} static const std::list PossibleProfilesForClass = { @@ -44,21 +43,6 @@ ACDCConverterDCTerminal::getPossibleProfilesForAttributes() const return map; } - -bool assign_ACDCConverterDCTerminal_polarity(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ACDCConverterDCTerminal* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->polarity; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ACDCConverter_DCTerminals(BaseClass*, BaseClass*); bool assign_ACDCConverterDCTerminal_DCConductingEquipment(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -76,10 +60,24 @@ bool assign_ACDCConverterDCTerminal_DCConductingEquipment(BaseClass* BaseClass_p return false; } +bool assign_ACDCConverterDCTerminal_polarity(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + ACDCConverterDCTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->polarity; + if (!buffer.fail()) + { + return true; + } + } + return false; +} bool get_ACDCConverterDCTerminal_DCConductingEquipment(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ACDCConverterDCTerminal* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverterDCTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DCConductingEquipment != 0) { @@ -90,10 +88,10 @@ bool get_ACDCConverterDCTerminal_DCConductingEquipment(const BaseClass* BaseClas return false; } - bool get_ACDCConverterDCTerminal_polarity(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACDCConverterDCTerminal* element = dynamic_cast(BaseClass_ptr1)) + const ACDCConverterDCTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->polarity; if (!buffer.str().empty()) @@ -113,17 +111,17 @@ const char* ACDCConverterDCTerminal::debugString() const void ACDCConverterDCTerminal::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ACDCConverterDCTerminal"), &ACDCConverterDCTerminal_factory)); + factory_map.emplace("cim:ACDCConverterDCTerminal", &ACDCConverterDCTerminal_factory); } void ACDCConverterDCTerminal::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ACDCConverterDCTerminal.polarity"), &assign_ACDCConverterDCTerminal_polarity)); + assign_map.emplace("cim:ACDCConverterDCTerminal.polarity", &assign_ACDCConverterDCTerminal_polarity); } void ACDCConverterDCTerminal::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ACDCConverterDCTerminal.DCConductingEquipment"), &assign_ACDCConverterDCTerminal_DCConductingEquipment)); + assign_map.emplace("cim:ACDCConverterDCTerminal.DCConductingEquipment", &assign_ACDCConverterDCTerminal_DCConductingEquipment); } void ACDCConverterDCTerminal::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/ACDCConverterDCTerminal.hpp b/CGMES_3.0.0/ACDCConverterDCTerminal.hpp index 017a11d60..8a967d40b 100644 --- a/CGMES_3.0.0/ACDCConverterDCTerminal.hpp +++ b/CGMES_3.0.0/ACDCConverterDCTerminal.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ACDCConverter; - /* - A DC electrical connection point at the AC/DC converter. The AC/DC converter is electrically connected also to the AC side. The AC connection is inherited from the AC conducting equipment in the same way as any other AC equipment. The AC/DC converter DC terminal is separate from generic DC terminal to restrict the connection with the AC side to AC/DC converter and so that no other DC conducting equipment can be connected to the AC side. - */ + /** \brief A DC electrical connection point at the AC/DC converter. The AC/DC converter is electrically connected also to the AC side. The AC connection is inherited from the AC conducting equipment in the same way as any other AC equipment. The AC/DC converter DC terminal is separate from generic DC terminal to restrict the connection with the AC side to AC/DC converter and so that no other DC conducting equipment can be connected to the AC side. */ class ACDCConverterDCTerminal : public DCBaseTerminal { public: @@ -28,8 +26,11 @@ namespace CIMPP ACDCConverterDCTerminal(); ~ACDCConverterDCTerminal() override; - CIMPP::ACDCConverter* DCConductingEquipment; /* A DC converter terminal belong to an DC converter. Default: 0 */ - CIMPP::DCPolarityKind polarity; /* Represents the normal network polarity condition. Depending on the converter configuration the value shall be set as follows: - For a monopole with two converter terminals use DCPolarityKind `positive` and `negative`. - For a bi-pole or symmetric monopole with three converter terminals use DCPolarityKind `positive`, `middle` and `negative`. Default: 0 */ + /** \brief A DC converter terminal belong to an DC converter. Default: 0 */ + CIMPP::ACDCConverter* DCConductingEquipment; + + /** \brief Represents the normal network polarity condition. Depending on the converter configuration the value shall be set as follows: - For a monopole with two converter terminals use DCPolarityKind `positive` and `negative`. - For a bi-pole or symmetric monopole with three converter terminals use DCPolarityKind `positive`, `middle` and `negative`. Default: 0 */ + CIMPP::DCPolarityKind polarity; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ACDCTerminal.cpp b/CGMES_3.0.0/ACDCTerminal.cpp index 5a2ef0c59..e6f7c4a24 100644 --- a/CGMES_3.0.0/ACDCTerminal.cpp +++ b/CGMES_3.0.0/ACDCTerminal.cpp @@ -11,13 +11,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "BusNameMarker.hpp" #include "Measurement.hpp" #include "OperationalLimitSet.hpp" -#include "Boolean.hpp" -#include "Integer.hpp" using namespace CIMPP; -ACDCTerminal::ACDCTerminal() : BusNameMarker(nullptr) {}; -ACDCTerminal::~ACDCTerminal() {}; +ACDCTerminal::ACDCTerminal() : BusNameMarker(nullptr) {} +ACDCTerminal::~ACDCTerminal() {} static const std::list PossibleProfilesForClass = { @@ -55,34 +53,6 @@ ACDCTerminal::getPossibleProfilesForAttributes() const return map; } - -bool assign_ACDCTerminal_connected(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ACDCTerminal* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->connected; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_ACDCTerminal_sequenceNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ACDCTerminal* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->sequenceNumber; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_BusNameMarker_Terminal(BaseClass*, BaseClass*); bool assign_ACDCTerminal_BusNameMarker(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -99,6 +69,7 @@ bool assign_ACDCTerminal_BusNameMarker(BaseClass* BaseClass_ptr1, BaseClass* Bas } return false; } + bool assign_Measurement_Terminal(BaseClass*, BaseClass*); bool assign_ACDCTerminal_Measurements(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -115,6 +86,7 @@ bool assign_ACDCTerminal_Measurements(BaseClass* BaseClass_ptr1, BaseClass* Base } return false; } + bool assign_OperationalLimitSet_Terminal(BaseClass*, BaseClass*); bool assign_ACDCTerminal_OperationalLimitSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -132,38 +104,38 @@ bool assign_ACDCTerminal_OperationalLimitSet(BaseClass* BaseClass_ptr1, BaseClas return false; } -bool get_ACDCTerminal_connected(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_ACDCTerminal_connected(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const ACDCTerminal* element = dynamic_cast(BaseClass_ptr1)) + ACDCTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->connected; - if (!buffer.str().empty()) + buffer >> element->connected; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_ACDCTerminal_sequenceNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_ACDCTerminal_sequenceNumber(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const ACDCTerminal* element = dynamic_cast(BaseClass_ptr1)) + ACDCTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->sequenceNumber; - if (!buffer.str().empty()) + buffer >> element->sequenceNumber; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_ACDCTerminal_BusNameMarker(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ACDCTerminal* element = dynamic_cast(BaseClass_ptr1)) + const ACDCTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->BusNameMarker != 0) { @@ -175,6 +147,37 @@ bool get_ACDCTerminal_BusNameMarker(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->connected; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_ACDCTerminal_sequenceNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ACDCTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->sequenceNumber; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + const char ACDCTerminal::debugName[] = "ACDCTerminal"; const char* ACDCTerminal::debugString() const { @@ -183,20 +186,20 @@ const char* ACDCTerminal::debugString() const void ACDCTerminal::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ACDCTerminal"), &ACDCTerminal_factory)); + factory_map.emplace("cim:ACDCTerminal", &ACDCTerminal_factory); } void ACDCTerminal::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ACDCTerminal.connected"), &assign_ACDCTerminal_connected)); - assign_map.insert(std::make_pair(std::string("cim:ACDCTerminal.sequenceNumber"), &assign_ACDCTerminal_sequenceNumber)); + assign_map.emplace("cim:ACDCTerminal.connected", &assign_ACDCTerminal_connected); + assign_map.emplace("cim:ACDCTerminal.sequenceNumber", &assign_ACDCTerminal_sequenceNumber); } void ACDCTerminal::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ACDCTerminal.BusNameMarker"), &assign_ACDCTerminal_BusNameMarker)); - assign_map.insert(std::make_pair(std::string("cim:ACDCTerminal.Measurements"), &assign_ACDCTerminal_Measurements)); - assign_map.insert(std::make_pair(std::string("cim:ACDCTerminal.OperationalLimitSet"), &assign_ACDCTerminal_OperationalLimitSet)); + assign_map.emplace("cim:ACDCTerminal.BusNameMarker", &assign_ACDCTerminal_BusNameMarker); + assign_map.emplace("cim:ACDCTerminal.Measurements", &assign_ACDCTerminal_Measurements); + assign_map.emplace("cim:ACDCTerminal.OperationalLimitSet", &assign_ACDCTerminal_OperationalLimitSet); } void ACDCTerminal::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/ACDCTerminal.hpp b/CGMES_3.0.0/ACDCTerminal.hpp index 93488895f..a54555603 100644 --- a/CGMES_3.0.0/ACDCTerminal.hpp +++ b/CGMES_3.0.0/ACDCTerminal.hpp @@ -21,9 +21,7 @@ namespace CIMPP class Measurement; class OperationalLimitSet; - /* - An electrical connection point (AC or DC) to a piece of conducting equipment. Terminals are connected at physical connection points called connectivity nodes. - */ + /** \brief An electrical connection point (AC or DC) to a piece of conducting equipment. Terminals are connected at physical connection points called connectivity nodes. */ class ACDCTerminal : public IdentifiedObject { public: @@ -31,11 +29,20 @@ namespace CIMPP ACDCTerminal(); ~ACDCTerminal() override; - CIMPP::BusNameMarker* BusNameMarker; /* The bus name marker used to name the bus (topological node). Default: 0 */ - std::list Measurements; /* Measurements associated with this terminal defining where the measurement is placed in the network topology. It may be used, for instance, to capture the sensor position, such as a voltage transformer (PT) at a busbar or a current transformer (CT) at the bar between a breaker and an isolator. Default: 0 */ - std::list OperationalLimitSet; /* The operational limit sets at the terminal. Default: 0 */ - CIMPP::Boolean connected; /* The connected status is related to a bus-branch model and the topological node to terminal relation. True implies the terminal is connected to the related topological node and false implies it is not. In a bus-branch model, the connected status is used to tell if equipment is disconnected without having to change the connectivity described by the topological node to terminal relation. A valid case is that conducting equipment can be connected in one end and open in the other. In particular for an AC line segment, where the reactive line charging can be significant, this is a relevant case. Default: false */ - CIMPP::Integer sequenceNumber; /* The orientation of the terminal connections for a multiple terminal conducting equipment. The sequence numbering starts with 1 and additional terminals should follow in increasing order. The first terminal is the `starting point` for a two terminal branch. Default: 0 */ + /** \brief The bus name marker used to name the bus (topological node). Default: 0 */ + CIMPP::BusNameMarker* BusNameMarker; + + /** \brief Measurements associated with this terminal defining where the measurement is placed in the network topology. It may be used, for instance, to capture the sensor position, such as a voltage transformer (PT) at a busbar or a current transformer (CT) at the bar between a breaker and an isolator. Default: 0 */ + std::list Measurements; + + /** \brief The operational limit sets at the terminal. Default: 0 */ + std::list OperationalLimitSet; + + /** \brief The connected status is related to a bus-branch model and the topological node to terminal relation. True implies the terminal is connected to the related topological node and false implies it is not. In a bus-branch model, the connected status is used to tell if equipment is disconnected without having to change the connectivity described by the topological node to terminal relation. A valid case is that conducting equipment can be connected in one end and open in the other. In particular for an AC line segment, where the reactive line charging can be significant, this is a relevant case. Default: false */ + CIMPP::Boolean connected; + + /** \brief The orientation of the terminal connections for a multiple terminal conducting equipment. The sequence numbering starts with 1 and additional terminals should follow in increasing order. The first terminal is the `starting point` for a two terminal branch. Default: 0 */ + CIMPP::Integer sequenceNumber; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ACLineSegment.cpp b/CGMES_3.0.0/ACLineSegment.cpp index 7203ecf53..b9b82b046 100644 --- a/CGMES_3.0.0/ACLineSegment.cpp +++ b/CGMES_3.0.0/ACLineSegment.cpp @@ -10,20 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "Clamp.hpp" #include "Cut.hpp" -#include "Susceptance.hpp" -#include "Susceptance.hpp" -#include "Conductance.hpp" -#include "Conductance.hpp" -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "Temperature.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -ACLineSegment::ACLineSegment() {}; -ACLineSegment::~ACLineSegment() {}; +ACLineSegment::ACLineSegment() {} +ACLineSegment::~ACLineSegment() {} static const std::list PossibleProfilesForClass = { @@ -61,161 +52,172 @@ ACLineSegment::getPossibleProfilesForAttributes() const return map; } - -bool assign_ACLineSegment_b0ch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Clamp_ACLineSegment(BaseClass*, BaseClass*); +bool assign_ACLineSegment_Clamp(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + Clamp* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->b0ch; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->Clamp.begin(), element->Clamp.end(), element2) == element->Clamp.end()) + { + element->Clamp.push_back(element2); + return assign_Clamp_ACLineSegment(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_ACLineSegment_bch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Cut_ACLineSegment(BaseClass*, BaseClass*); +bool assign_ACLineSegment_Cut(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + Cut* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->bch; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->Cut.begin(), element->Cut.end(), element2) == element->Cut.end()) + { + element->Cut.push_back(element2); + return assign_Cut_ACLineSegment(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_ACLineSegment_g0ch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACLineSegment_b0ch(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->g0ch; - if (buffer.fail()) - return false; - else + buffer >> element->b0ch; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACLineSegment_gch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACLineSegment_bch(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->gch; - if (buffer.fail()) - return false; - else + buffer >> element->bch; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACLineSegment_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACLineSegment_g0ch(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->r; - if (buffer.fail()) - return false; - else + buffer >> element->g0ch; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACLineSegment_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACLineSegment_gch(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->r0; - if (buffer.fail()) - return false; - else + buffer >> element->gch; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACLineSegment_shortCircuitEndTemperature(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACLineSegment_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->shortCircuitEndTemperature; - if (buffer.fail()) - return false; - else + buffer >> element->r; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACLineSegment_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACLineSegment_r0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->x; - if (buffer.fail()) - return false; - else + buffer >> element->r0; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ACLineSegment_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACLineSegment_shortCircuitEndTemperature(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->x0; - if (buffer.fail()) - return false; - else + buffer >> element->shortCircuitEndTemperature; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_Clamp_ACLineSegment(BaseClass*, BaseClass*); -bool assign_ACLineSegment_Clamp(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_ACLineSegment_x(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { ACLineSegment* element = dynamic_cast(BaseClass_ptr1); - Clamp* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->Clamp.begin(), element->Clamp.end(), element2) == element->Clamp.end()) + buffer >> element->x; + if (!buffer.fail()) { - element->Clamp.push_back(element2); - return assign_Clamp_ACLineSegment(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_Cut_ACLineSegment(BaseClass*, BaseClass*); -bool assign_ACLineSegment_Cut(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_ACLineSegment_x0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { ACLineSegment* element = dynamic_cast(BaseClass_ptr1); - Cut* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->Cut.begin(), element->Cut.end(), element2) == element->Cut.end()) + buffer >> element->x0; + if (!buffer.fail()) { - element->Cut.push_back(element2); - return assign_Cut_ACLineSegment(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + + bool get_ACLineSegment_b0ch(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b0ch; if (!buffer.str().empty()) @@ -229,7 +231,8 @@ bool get_ACLineSegment_b0ch(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ACLineSegment_bch(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bch; if (!buffer.str().empty()) @@ -243,7 +246,8 @@ bool get_ACLineSegment_bch(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ACLineSegment_g0ch(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g0ch; if (!buffer.str().empty()) @@ -257,7 +261,8 @@ bool get_ACLineSegment_g0ch(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ACLineSegment_gch(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gch; if (!buffer.str().empty()) @@ -271,7 +276,8 @@ bool get_ACLineSegment_gch(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ACLineSegment_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -285,7 +291,8 @@ bool get_ACLineSegment_r(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ACLineSegment_r0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r0; if (!buffer.str().empty()) @@ -299,7 +306,8 @@ bool get_ACLineSegment_r0(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ACLineSegment_shortCircuitEndTemperature(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortCircuitEndTemperature; if (!buffer.str().empty()) @@ -313,7 +321,8 @@ bool get_ACLineSegment_shortCircuitEndTemperature(const BaseClass* BaseClass_ptr bool get_ACLineSegment_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x; if (!buffer.str().empty()) @@ -327,7 +336,8 @@ bool get_ACLineSegment_x(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ACLineSegment_x0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ACLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const ACLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x0; if (!buffer.str().empty()) @@ -339,8 +349,6 @@ bool get_ACLineSegment_x0(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char ACLineSegment::debugName[] = "ACLineSegment"; const char* ACLineSegment::debugString() const { @@ -349,26 +357,26 @@ const char* ACLineSegment::debugString() const void ACLineSegment::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ACLineSegment"), &ACLineSegment_factory)); + factory_map.emplace("cim:ACLineSegment", &ACLineSegment_factory); } void ACLineSegment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.b0ch"), &assign_ACLineSegment_b0ch)); - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.bch"), &assign_ACLineSegment_bch)); - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.g0ch"), &assign_ACLineSegment_g0ch)); - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.gch"), &assign_ACLineSegment_gch)); - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.r"), &assign_ACLineSegment_r)); - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.r0"), &assign_ACLineSegment_r0)); - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.shortCircuitEndTemperature"), &assign_ACLineSegment_shortCircuitEndTemperature)); - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.x"), &assign_ACLineSegment_x)); - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.x0"), &assign_ACLineSegment_x0)); + assign_map.emplace("cim:ACLineSegment.b0ch", &assign_ACLineSegment_b0ch); + assign_map.emplace("cim:ACLineSegment.bch", &assign_ACLineSegment_bch); + assign_map.emplace("cim:ACLineSegment.g0ch", &assign_ACLineSegment_g0ch); + assign_map.emplace("cim:ACLineSegment.gch", &assign_ACLineSegment_gch); + assign_map.emplace("cim:ACLineSegment.r", &assign_ACLineSegment_r); + assign_map.emplace("cim:ACLineSegment.r0", &assign_ACLineSegment_r0); + assign_map.emplace("cim:ACLineSegment.shortCircuitEndTemperature", &assign_ACLineSegment_shortCircuitEndTemperature); + assign_map.emplace("cim:ACLineSegment.x", &assign_ACLineSegment_x); + assign_map.emplace("cim:ACLineSegment.x0", &assign_ACLineSegment_x0); } void ACLineSegment::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.Clamp"), &assign_ACLineSegment_Clamp)); - assign_map.insert(std::make_pair(std::string("cim:ACLineSegment.Cut"), &assign_ACLineSegment_Cut)); + assign_map.emplace("cim:ACLineSegment.Clamp", &assign_ACLineSegment_Clamp); + assign_map.emplace("cim:ACLineSegment.Cut", &assign_ACLineSegment_Cut); } void ACLineSegment::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/ACLineSegment.hpp b/CGMES_3.0.0/ACLineSegment.hpp index 4b6ed3497..a39e180b1 100644 --- a/CGMES_3.0.0/ACLineSegment.hpp +++ b/CGMES_3.0.0/ACLineSegment.hpp @@ -23,9 +23,7 @@ namespace CIMPP class Clamp; class Cut; - /* - A wire or combination of wires, with consistent electrical characteristics, building a single electrical system, used to carry alternating current between points in the power system. For symmetrical, transposed three phase lines, it is sufficient to use attributes of the line segment, which describe impedances and admittances for the entire length of the segment. Additionally impedances can be computed by using length and associated per length impedances. The BaseVoltage at the two ends of ACLineSegments in a Line shall have the same BaseVoltage.nominalVoltage. However, boundary lines may have slightly different BaseVoltage.nominalVoltages and variation is allowed. Larger voltage difference in general requires use of an equivalent branch. - */ + /** \brief A wire or combination of wires, with consistent electrical characteristics, building a single electrical system, used to carry alternating current between points in the power system. For symmetrical, transposed three phase lines, it is sufficient to use attributes of the line segment, which describe impedances and admittances for the entire length of the segment. Additionally impedances can be computed by using length and associated per length impedances. The BaseVoltage at the two ends of ACLineSegments in a Line shall have the same BaseVoltage.nominalVoltage. However, boundary lines may have slightly different BaseVoltage.nominalVoltages and variation is allowed. Larger voltage difference in general requires use of an equivalent branch. */ class ACLineSegment : public Conductor { public: @@ -33,17 +31,38 @@ namespace CIMPP ACLineSegment(); ~ACLineSegment() override; - std::list Clamp; /* The clamps connected to the line segment. Default: 0 */ - std::list Cut; /* Cuts applied to the line segment. Default: 0 */ - CIMPP::Susceptance b0ch; /* Zero sequence shunt (charging) susceptance, uniformly distributed, of the entire line section. Default: nullptr */ - CIMPP::Susceptance bch; /* Positive sequence shunt (charging) susceptance, uniformly distributed, of the entire line section. This value represents the full charging over the full length of the line. Default: nullptr */ - CIMPP::Conductance g0ch; /* Zero sequence shunt (charging) conductance, uniformly distributed, of the entire line section. Default: nullptr */ - CIMPP::Conductance gch; /* Positive sequence shunt (charging) conductance, uniformly distributed, of the entire line section. Default: nullptr */ - CIMPP::Resistance r; /* Positive sequence series resistance of the entire line section. Default: nullptr */ - CIMPP::Resistance r0; /* Zero sequence series resistance of the entire line section. Default: nullptr */ - CIMPP::Temperature shortCircuitEndTemperature; /* Maximum permitted temperature at the end of SC for the calculation of minimum short-circuit currents. Used for short circuit data exchange according to IEC 60909. Default: nullptr */ - CIMPP::Reactance x; /* Positive sequence series reactance of the entire line section. Default: nullptr */ - CIMPP::Reactance x0; /* Zero sequence series reactance of the entire line section. Default: nullptr */ + /** \brief The clamps connected to the line segment. Default: 0 */ + std::list Clamp; + + /** \brief Cuts applied to the line segment. Default: 0 */ + std::list Cut; + + /** \brief Zero sequence shunt (charging) susceptance, uniformly distributed, of the entire line section. Default: nullptr */ + CIMPP::Susceptance b0ch; + + /** \brief Positive sequence shunt (charging) susceptance, uniformly distributed, of the entire line section. This value represents the full charging over the full length of the line. Default: nullptr */ + CIMPP::Susceptance bch; + + /** \brief Zero sequence shunt (charging) conductance, uniformly distributed, of the entire line section. Default: nullptr */ + CIMPP::Conductance g0ch; + + /** \brief Positive sequence shunt (charging) conductance, uniformly distributed, of the entire line section. Default: nullptr */ + CIMPP::Conductance gch; + + /** \brief Positive sequence series resistance of the entire line section. Default: nullptr */ + CIMPP::Resistance r; + + /** \brief Zero sequence series resistance of the entire line section. Default: nullptr */ + CIMPP::Resistance r0; + + /** \brief Maximum permitted temperature at the end of SC for the calculation of minimum short-circuit currents. Used for short circuit data exchange according to IEC 60909. Default: nullptr */ + CIMPP::Temperature shortCircuitEndTemperature; + + /** \brief Positive sequence series reactance of the entire line section. Default: nullptr */ + CIMPP::Reactance x; + + /** \brief Zero sequence series reactance of the entire line section. Default: nullptr */ + CIMPP::Reactance x0; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Accumulator.cpp b/CGMES_3.0.0/Accumulator.cpp index e2e8767c5..c6ad3cc55 100644 --- a/CGMES_3.0.0/Accumulator.cpp +++ b/CGMES_3.0.0/Accumulator.cpp @@ -8,13 +8,13 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "AccumulatorValue.hpp" #include "AccumulatorLimitSet.hpp" +#include "AccumulatorValue.hpp" using namespace CIMPP; -Accumulator::Accumulator() {}; -Accumulator::~Accumulator() {}; +Accumulator::Accumulator() {} +Accumulator::~Accumulator() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ Accumulator::getPossibleProfilesForAttributes() const return map; } - - bool assign_AccumulatorValue_Accumulator(BaseClass*, BaseClass*); bool assign_Accumulator_AccumulatorValues(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_Accumulator_AccumulatorValues(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_AccumulatorLimitSet_Measurements(BaseClass*, BaseClass*); bool assign_Accumulator_LimitSets(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -87,7 +86,7 @@ const char* Accumulator::debugString() const void Accumulator::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Accumulator"), &Accumulator_factory)); + factory_map.emplace("cim:Accumulator", &Accumulator_factory); } void Accumulator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -96,8 +95,8 @@ void Accumulator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Accumulator.AccumulatorValues"), &assign_Accumulator_AccumulatorValues)); - assign_map.insert(std::make_pair(std::string("cim:Accumulator.LimitSets"), &assign_Accumulator_LimitSets)); + assign_map.emplace("cim:Accumulator.AccumulatorValues", &assign_Accumulator_AccumulatorValues); + assign_map.emplace("cim:Accumulator.LimitSets", &assign_Accumulator_LimitSets); } void Accumulator::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/Accumulator.hpp b/CGMES_3.0.0/Accumulator.hpp index c3ac29e38..feed1d527 100644 --- a/CGMES_3.0.0/Accumulator.hpp +++ b/CGMES_3.0.0/Accumulator.hpp @@ -18,9 +18,7 @@ namespace CIMPP class AccumulatorLimitSet; class AccumulatorValue; - /* - Accumulator represents an accumulated (counted) Measurement, e.g. an energy value. - */ + /** \brief Accumulator represents an accumulated (counted) Measurement, e.g. an energy value. */ class Accumulator : public Measurement { public: @@ -28,8 +26,11 @@ namespace CIMPP Accumulator(); ~Accumulator() override; - std::list AccumulatorValues; /* The values connected to this measurement. Default: 0 */ - std::list LimitSets; /* A measurement may have zero or more limit ranges defined for it. Default: 0 */ + /** \brief The values connected to this measurement. Default: 0 */ + std::list AccumulatorValues; + + /** \brief A measurement may have zero or more limit ranges defined for it. Default: 0 */ + std::list LimitSets; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/AccumulatorLimit.cpp b/CGMES_3.0.0/AccumulatorLimit.cpp index ecd386bcb..d06cd184b 100644 --- a/CGMES_3.0.0/AccumulatorLimit.cpp +++ b/CGMES_3.0.0/AccumulatorLimit.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "AccumulatorLimitSet.hpp" -#include "Integer.hpp" using namespace CIMPP; -AccumulatorLimit::AccumulatorLimit() : LimitSet(nullptr) {}; -AccumulatorLimit::~AccumulatorLimit() {}; +AccumulatorLimit::AccumulatorLimit() : LimitSet(nullptr) {} +AccumulatorLimit::~AccumulatorLimit() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ AccumulatorLimit::getPossibleProfilesForAttributes() const return map; } - -bool assign_AccumulatorLimit_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (AccumulatorLimit* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->value; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_AccumulatorLimitSet_Limits(BaseClass*, BaseClass*); bool assign_AccumulatorLimit_LimitSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_AccumulatorLimit_LimitSet(BaseClass* BaseClass_ptr1, BaseClass* Base return false; } -bool get_AccumulatorLimit_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_AccumulatorLimit_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const AccumulatorLimit* element = dynamic_cast(BaseClass_ptr1)) + AccumulatorLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->value; - if (!buffer.str().empty()) + buffer >> element->value; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_AccumulatorLimit_LimitSet(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AccumulatorLimit* element = dynamic_cast(BaseClass_ptr1)) + const AccumulatorLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->LimitSet != 0) { @@ -102,6 +86,20 @@ bool get_AccumulatorLimit_LimitSet(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->value; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char AccumulatorLimit::debugName[] = "AccumulatorLimit"; const char* AccumulatorLimit::debugString() const @@ -111,17 +109,17 @@ const char* AccumulatorLimit::debugString() const void AccumulatorLimit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AccumulatorLimit"), &AccumulatorLimit_factory)); + factory_map.emplace("cim:AccumulatorLimit", &AccumulatorLimit_factory); } void AccumulatorLimit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AccumulatorLimit.value"), &assign_AccumulatorLimit_value)); + assign_map.emplace("cim:AccumulatorLimit.value", &assign_AccumulatorLimit_value); } void AccumulatorLimit::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AccumulatorLimit.LimitSet"), &assign_AccumulatorLimit_LimitSet)); + assign_map.emplace("cim:AccumulatorLimit.LimitSet", &assign_AccumulatorLimit_LimitSet); } void AccumulatorLimit::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/AccumulatorLimit.hpp b/CGMES_3.0.0/AccumulatorLimit.hpp index b1e0ce12f..c72bcab6f 100644 --- a/CGMES_3.0.0/AccumulatorLimit.hpp +++ b/CGMES_3.0.0/AccumulatorLimit.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class AccumulatorLimitSet; - /* - Limit values for Accumulator measurements. - */ + /** \brief Limit values for Accumulator measurements. */ class AccumulatorLimit : public Limit { public: @@ -28,8 +26,11 @@ namespace CIMPP AccumulatorLimit(); ~AccumulatorLimit() override; - CIMPP::AccumulatorLimitSet* LimitSet; /* The set of limits. Default: 0 */ - CIMPP::Integer value; /* The value to supervise against. The value is positive. Default: 0 */ + /** \brief The set of limits. Default: 0 */ + CIMPP::AccumulatorLimitSet* LimitSet; + + /** \brief The value to supervise against. The value is positive. Default: 0 */ + CIMPP::Integer value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/AccumulatorLimitSet.cpp b/CGMES_3.0.0/AccumulatorLimitSet.cpp index c858c3224..ecc611925 100644 --- a/CGMES_3.0.0/AccumulatorLimitSet.cpp +++ b/CGMES_3.0.0/AccumulatorLimitSet.cpp @@ -8,13 +8,13 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "AccumulatorLimit.hpp" #include "Accumulator.hpp" +#include "AccumulatorLimit.hpp" using namespace CIMPP; -AccumulatorLimitSet::AccumulatorLimitSet() {}; -AccumulatorLimitSet::~AccumulatorLimitSet() {}; +AccumulatorLimitSet::AccumulatorLimitSet() {} +AccumulatorLimitSet::~AccumulatorLimitSet() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ AccumulatorLimitSet::getPossibleProfilesForAttributes() const return map; } - - bool assign_AccumulatorLimit_LimitSet(BaseClass*, BaseClass*); bool assign_AccumulatorLimitSet_Limits(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_AccumulatorLimitSet_Limits(BaseClass* BaseClass_ptr1, BaseClass* Bas } return false; } + bool assign_Accumulator_LimitSets(BaseClass*, BaseClass*); bool assign_AccumulatorLimitSet_Measurements(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -80,7 +79,8 @@ bool assign_AccumulatorLimitSet_Measurements(BaseClass* BaseClass_ptr1, BaseClas bool get_AccumulatorLimitSet_Measurements(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AccumulatorLimitSet* element = dynamic_cast(BaseClass_ptr1)) + const AccumulatorLimitSet* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { std::copy(element->Measurements.begin(), element->Measurements.end(), std::back_inserter(BaseClass_list)); return !BaseClass_list.empty(); @@ -88,7 +88,6 @@ bool get_AccumulatorLimitSet_Measurements(const BaseClass* BaseClass_ptr1, std:: return false; } - const char AccumulatorLimitSet::debugName[] = "AccumulatorLimitSet"; const char* AccumulatorLimitSet::debugString() const { @@ -97,7 +96,7 @@ const char* AccumulatorLimitSet::debugString() const void AccumulatorLimitSet::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AccumulatorLimitSet"), &AccumulatorLimitSet_factory)); + factory_map.emplace("cim:AccumulatorLimitSet", &AccumulatorLimitSet_factory); } void AccumulatorLimitSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -106,8 +105,8 @@ void AccumulatorLimitSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AccumulatorLimitSet.Limits"), &assign_AccumulatorLimitSet_Limits)); - assign_map.insert(std::make_pair(std::string("cim:AccumulatorLimitSet.Measurements"), &assign_AccumulatorLimitSet_Measurements)); + assign_map.emplace("cim:AccumulatorLimitSet.Limits", &assign_AccumulatorLimitSet_Limits); + assign_map.emplace("cim:AccumulatorLimitSet.Measurements", &assign_AccumulatorLimitSet_Measurements); } void AccumulatorLimitSet::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/AccumulatorLimitSet.hpp b/CGMES_3.0.0/AccumulatorLimitSet.hpp index 93991b753..d945f69e2 100644 --- a/CGMES_3.0.0/AccumulatorLimitSet.hpp +++ b/CGMES_3.0.0/AccumulatorLimitSet.hpp @@ -18,9 +18,7 @@ namespace CIMPP class Accumulator; class AccumulatorLimit; - /* - An AccumulatorLimitSet specifies a set of Limits that are associated with an Accumulator measurement. - */ + /** \brief An AccumulatorLimitSet specifies a set of Limits that are associated with an Accumulator measurement. */ class AccumulatorLimitSet : public LimitSet { public: @@ -28,8 +26,11 @@ namespace CIMPP AccumulatorLimitSet(); ~AccumulatorLimitSet() override; - std::list Limits; /* The limit values used for supervision of Measurements. Default: 0 */ - std::list Measurements; /* The Measurements using the LimitSet. Default: 0 */ + /** \brief The limit values used for supervision of Measurements. Default: 0 */ + std::list Limits; + + /** \brief The Measurements using the LimitSet. Default: 0 */ + std::list Measurements; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/AccumulatorReset.cpp b/CGMES_3.0.0/AccumulatorReset.cpp index 2d0243f7b..4d6c7af0f 100644 --- a/CGMES_3.0.0/AccumulatorReset.cpp +++ b/CGMES_3.0.0/AccumulatorReset.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -AccumulatorReset::AccumulatorReset() : AccumulatorValue(nullptr) {}; -AccumulatorReset::~AccumulatorReset() {}; +AccumulatorReset::AccumulatorReset() : AccumulatorValue(nullptr) {} +AccumulatorReset::~AccumulatorReset() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ AccumulatorReset::getPossibleProfilesForAttributes() const return map; } - - bool assign_AccumulatorValue_AccumulatorReset(BaseClass*, BaseClass*); bool assign_AccumulatorReset_AccumulatorValue(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_AccumulatorReset_AccumulatorValue(BaseClass* BaseClass_ptr1, BaseCla return false; } - bool get_AccumulatorReset_AccumulatorValue(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AccumulatorReset* element = dynamic_cast(BaseClass_ptr1)) + const AccumulatorReset* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->AccumulatorValue != 0) { @@ -73,7 +71,6 @@ bool get_AccumulatorReset_AccumulatorValue(const BaseClass* BaseClass_ptr1, std: return false; } - const char AccumulatorReset::debugName[] = "AccumulatorReset"; const char* AccumulatorReset::debugString() const { @@ -82,7 +79,7 @@ const char* AccumulatorReset::debugString() const void AccumulatorReset::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AccumulatorReset"), &AccumulatorReset_factory)); + factory_map.emplace("cim:AccumulatorReset", &AccumulatorReset_factory); } void AccumulatorReset::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void AccumulatorReset::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AccumulatorReset.AccumulatorValue"), &assign_AccumulatorReset_AccumulatorValue)); + assign_map.emplace("cim:AccumulatorReset.AccumulatorValue", &assign_AccumulatorReset_AccumulatorValue); } void AccumulatorReset::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/AccumulatorReset.hpp b/CGMES_3.0.0/AccumulatorReset.hpp index 182849e0f..72cdd232a 100644 --- a/CGMES_3.0.0/AccumulatorReset.hpp +++ b/CGMES_3.0.0/AccumulatorReset.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class AccumulatorValue; - /* - This command resets the counter value to zero. - */ + /** \brief This command resets the counter value to zero. */ class AccumulatorReset : public Control { public: @@ -27,7 +25,8 @@ namespace CIMPP AccumulatorReset(); ~AccumulatorReset() override; - CIMPP::AccumulatorValue* AccumulatorValue; /* The accumulator value that is reset by the command. Default: 0 */ + /** \brief The accumulator value that is reset by the command. Default: 0 */ + CIMPP::AccumulatorValue* AccumulatorValue; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/AccumulatorValue.cpp b/CGMES_3.0.0/AccumulatorValue.cpp index 4af9eb450..291ba1e5d 100644 --- a/CGMES_3.0.0/AccumulatorValue.cpp +++ b/CGMES_3.0.0/AccumulatorValue.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -AccumulatorValue::AccumulatorValue() : Accumulator(nullptr), AccumulatorReset(nullptr) {}; -AccumulatorValue::~AccumulatorValue() {}; +AccumulatorValue::AccumulatorValue() : Accumulator(nullptr), AccumulatorReset(nullptr) {} +AccumulatorValue::~AccumulatorValue() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ AccumulatorValue::getPossibleProfilesForAttributes() const return map; } - - bool assign_Accumulator_AccumulatorValues(BaseClass*, BaseClass*); bool assign_AccumulatorValue_Accumulator(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_AccumulatorValue_Accumulator(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_AccumulatorReset_AccumulatorValue(BaseClass*, BaseClass*); bool assign_AccumulatorValue_AccumulatorReset(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_AccumulatorValue_AccumulatorReset(BaseClass* BaseClass_ptr1, BaseCla return false; } - bool get_AccumulatorValue_Accumulator(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AccumulatorValue* element = dynamic_cast(BaseClass_ptr1)) + const AccumulatorValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Accumulator != 0) { @@ -100,7 +99,7 @@ const char* AccumulatorValue::debugString() const void AccumulatorValue::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AccumulatorValue"), &AccumulatorValue_factory)); + factory_map.emplace("cim:AccumulatorValue", &AccumulatorValue_factory); } void AccumulatorValue::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -109,8 +108,8 @@ void AccumulatorValue::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AccumulatorValue.Accumulator"), &assign_AccumulatorValue_Accumulator)); - assign_map.insert(std::make_pair(std::string("cim:AccumulatorValue.AccumulatorReset"), &assign_AccumulatorValue_AccumulatorReset)); + assign_map.emplace("cim:AccumulatorValue.Accumulator", &assign_AccumulatorValue_Accumulator); + assign_map.emplace("cim:AccumulatorValue.AccumulatorReset", &assign_AccumulatorValue_AccumulatorReset); } void AccumulatorValue::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/AccumulatorValue.hpp b/CGMES_3.0.0/AccumulatorValue.hpp index beb0f3231..2a0273503 100644 --- a/CGMES_3.0.0/AccumulatorValue.hpp +++ b/CGMES_3.0.0/AccumulatorValue.hpp @@ -18,9 +18,7 @@ namespace CIMPP class Accumulator; class AccumulatorReset; - /* - AccumulatorValue represents an accumulated (counted) MeasurementValue. - */ + /** \brief AccumulatorValue represents an accumulated (counted) MeasurementValue. */ class AccumulatorValue : public MeasurementValue { public: @@ -28,8 +26,11 @@ namespace CIMPP AccumulatorValue(); ~AccumulatorValue() override; - CIMPP::Accumulator* Accumulator; /* Measurement to which this value is connected. Default: 0 */ - CIMPP::AccumulatorReset* AccumulatorReset; /* The command that resets the accumulator value. Default: 0 */ + /** \brief Measurement to which this value is connected. Default: 0 */ + CIMPP::Accumulator* Accumulator; + + /** \brief The command that resets the accumulator value. Default: 0 */ + CIMPP::AccumulatorReset* AccumulatorReset; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ActivePower.hpp b/CGMES_3.0.0/ActivePower.hpp index d1a142af8..37f33d93d 100644 --- a/CGMES_3.0.0/ActivePower.hpp +++ b/CGMES_3.0.0/ActivePower.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Product of RMS value of the voltage and the RMS value of the in-phase component of the current. - */ + /** \brief Product of RMS value of the voltage and the RMS value of the in-phase component of the current. */ class ActivePower { public: diff --git a/CGMES_3.0.0/ActivePowerLimit.cpp b/CGMES_3.0.0/ActivePowerLimit.cpp index bd135f001..0ae1a565e 100644 --- a/CGMES_3.0.0/ActivePowerLimit.cpp +++ b/CGMES_3.0.0/ActivePowerLimit.cpp @@ -8,13 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "ActivePower.hpp" -#include "ActivePower.hpp" using namespace CIMPP; -ActivePowerLimit::ActivePowerLimit() {}; -ActivePowerLimit::~ActivePowerLimit() {}; +ActivePowerLimit::ActivePowerLimit() {} +ActivePowerLimit::~ActivePowerLimit() {} static const std::list PossibleProfilesForClass = { @@ -43,38 +41,38 @@ ActivePowerLimit::getPossibleProfilesForAttributes() const return map; } - -bool assign_ActivePowerLimit_normalValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ActivePowerLimit_normalValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ActivePowerLimit* element = dynamic_cast(BaseClass_ptr1)) + ActivePowerLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->normalValue; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ActivePowerLimit_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ActivePowerLimit_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ActivePowerLimit* element = dynamic_cast(BaseClass_ptr1)) + ActivePowerLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->value; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ActivePowerLimit_normalValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ActivePowerLimit* element = dynamic_cast(BaseClass_ptr1)) + const ActivePowerLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->normalValue; if (!buffer.str().empty()) @@ -88,7 +86,8 @@ bool get_ActivePowerLimit_normalValue(const BaseClass* BaseClass_ptr1, std::stri bool get_ActivePowerLimit_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ActivePowerLimit* element = dynamic_cast(BaseClass_ptr1)) + const ActivePowerLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value; if (!buffer.str().empty()) @@ -100,8 +99,6 @@ bool get_ActivePowerLimit_value(const BaseClass* BaseClass_ptr1, std::stringstre return false; } - - const char ActivePowerLimit::debugName[] = "ActivePowerLimit"; const char* ActivePowerLimit::debugString() const { @@ -110,13 +107,13 @@ const char* ActivePowerLimit::debugString() const void ActivePowerLimit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ActivePowerLimit"), &ActivePowerLimit_factory)); + factory_map.emplace("cim:ActivePowerLimit", &ActivePowerLimit_factory); } void ActivePowerLimit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ActivePowerLimit.normalValue"), &assign_ActivePowerLimit_normalValue)); - assign_map.insert(std::make_pair(std::string("cim:ActivePowerLimit.value"), &assign_ActivePowerLimit_value)); + assign_map.emplace("cim:ActivePowerLimit.normalValue", &assign_ActivePowerLimit_normalValue); + assign_map.emplace("cim:ActivePowerLimit.value", &assign_ActivePowerLimit_value); } void ActivePowerLimit::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ActivePowerLimit.hpp b/CGMES_3.0.0/ActivePowerLimit.hpp index 3bcdd45fa..460a9d322 100644 --- a/CGMES_3.0.0/ActivePowerLimit.hpp +++ b/CGMES_3.0.0/ActivePowerLimit.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Limit on active power flow. - */ + /** \brief Limit on active power flow. */ class ActivePowerLimit : public OperationalLimit { public: @@ -27,8 +25,11 @@ namespace CIMPP ActivePowerLimit(); ~ActivePowerLimit() override; - CIMPP::ActivePower normalValue; /* The normal value of active power limit. The attribute shall be a positive value or zero. Default: nullptr */ - CIMPP::ActivePower value; /* Value of active power limit. The attribute shall be a positive value or zero. Default: nullptr */ + /** \brief The normal value of active power limit. The attribute shall be a positive value or zero. Default: nullptr */ + CIMPP::ActivePower normalValue; + + /** \brief Value of active power limit. The attribute shall be a positive value or zero. Default: nullptr */ + CIMPP::ActivePower value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ActivePowerPerCurrentFlow.hpp b/CGMES_3.0.0/ActivePowerPerCurrentFlow.hpp index bf8409efa..b297b6d04 100644 --- a/CGMES_3.0.0/ActivePowerPerCurrentFlow.hpp +++ b/CGMES_3.0.0/ActivePowerPerCurrentFlow.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Active power variation with current flow. - */ + /** \brief Active power variation with current flow. */ class ActivePowerPerCurrentFlow { public: diff --git a/CGMES_3.0.0/ActivePowerPerFrequency.hpp b/CGMES_3.0.0/ActivePowerPerFrequency.hpp index f8b5bd3ab..dbbdb347e 100644 --- a/CGMES_3.0.0/ActivePowerPerFrequency.hpp +++ b/CGMES_3.0.0/ActivePowerPerFrequency.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Active power variation with frequency. - */ + /** \brief Active power variation with frequency. */ class ActivePowerPerFrequency { public: diff --git a/CGMES_3.0.0/Analog.cpp b/CGMES_3.0.0/Analog.cpp index 5651f44b0..5bdba8ca4 100644 --- a/CGMES_3.0.0/Analog.cpp +++ b/CGMES_3.0.0/Analog.cpp @@ -8,14 +8,13 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "AnalogValue.hpp" #include "AnalogLimitSet.hpp" -#include "Boolean.hpp" +#include "AnalogValue.hpp" using namespace CIMPP; -Analog::Analog() {}; -Analog::~Analog() {}; +Analog::Analog() {} +Analog::~Analog() {} static const std::list PossibleProfilesForClass = { @@ -44,21 +43,6 @@ Analog::getPossibleProfilesForAttributes() const return map; } - -bool assign_Analog_positiveFlowIn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (Analog* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->positiveFlowIn; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_AnalogValue_Analog(BaseClass*, BaseClass*); bool assign_Analog_AnalogValues(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -75,6 +59,7 @@ bool assign_Analog_AnalogValues(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ } return false; } + bool assign_AnalogLimitSet_Measurements(BaseClass*, BaseClass*); bool assign_Analog_LimitSets(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -92,9 +77,26 @@ bool assign_Analog_LimitSets(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr return false; } +bool assign_Analog_positiveFlowIn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + Analog* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->positiveFlowIn; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + + bool get_Analog_positiveFlowIn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Analog* element = dynamic_cast(BaseClass_ptr1)) + const Analog* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->positiveFlowIn; if (!buffer.str().empty()) @@ -106,8 +108,6 @@ bool get_Analog_positiveFlowIn(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } - - const char Analog::debugName[] = "Analog"; const char* Analog::debugString() const { @@ -116,18 +116,18 @@ const char* Analog::debugString() const void Analog::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Analog"), &Analog_factory)); + factory_map.emplace("cim:Analog", &Analog_factory); } void Analog::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Analog.positiveFlowIn"), &assign_Analog_positiveFlowIn)); + assign_map.emplace("cim:Analog.positiveFlowIn", &assign_Analog_positiveFlowIn); } void Analog::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Analog.AnalogValues"), &assign_Analog_AnalogValues)); - assign_map.insert(std::make_pair(std::string("cim:Analog.LimitSets"), &assign_Analog_LimitSets)); + assign_map.emplace("cim:Analog.AnalogValues", &assign_Analog_AnalogValues); + assign_map.emplace("cim:Analog.LimitSets", &assign_Analog_LimitSets); } void Analog::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/Analog.hpp b/CGMES_3.0.0/Analog.hpp index 393b7b1ae..03d53749e 100644 --- a/CGMES_3.0.0/Analog.hpp +++ b/CGMES_3.0.0/Analog.hpp @@ -19,9 +19,7 @@ namespace CIMPP class AnalogLimitSet; class AnalogValue; - /* - Analog represents an analog Measurement. - */ + /** \brief Analog represents an analog Measurement. */ class Analog : public Measurement { public: @@ -29,9 +27,14 @@ namespace CIMPP Analog(); ~Analog() override; - std::list AnalogValues; /* The values connected to this measurement. Default: 0 */ - std::list LimitSets; /* A measurement may have zero or more limit ranges defined for it. Default: 0 */ - CIMPP::Boolean positiveFlowIn; /* If true then this measurement is an active power, reactive power or current with the convention that a positive value measured at the Terminal means power is flowing into the related PowerSystemResource. Default: false */ + /** \brief The values connected to this measurement. Default: 0 */ + std::list AnalogValues; + + /** \brief A measurement may have zero or more limit ranges defined for it. Default: 0 */ + std::list LimitSets; + + /** \brief If true then this measurement is an active power, reactive power or current with the convention that a positive value measured at the Terminal means power is flowing into the related PowerSystemResource. Default: false */ + CIMPP::Boolean positiveFlowIn; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/AnalogControl.cpp b/CGMES_3.0.0/AnalogControl.cpp index 4c00be78d..e2715bec0 100644 --- a/CGMES_3.0.0/AnalogControl.cpp +++ b/CGMES_3.0.0/AnalogControl.cpp @@ -9,13 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "AnalogValue.hpp" -#include "Float.hpp" -#include "Float.hpp" using namespace CIMPP; -AnalogControl::AnalogControl() : AnalogValue(nullptr) {}; -AnalogControl::~AnalogControl() {}; +AnalogControl::AnalogControl() : AnalogValue(nullptr) {} +AnalogControl::~AnalogControl() {} static const std::list PossibleProfilesForClass = { @@ -44,70 +42,71 @@ AnalogControl::getPossibleProfilesForAttributes() const return map; } - -bool assign_AnalogControl_maxValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AnalogValue_AnalogControl(BaseClass*, BaseClass*); +bool assign_AnalogControl_AnalogValue(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (AnalogControl* element = dynamic_cast(BaseClass_ptr1)) + AnalogControl* element = dynamic_cast(BaseClass_ptr1); + AnalogValue* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->maxValue; - if (buffer.fail()) - return false; - else - return true; + if (element->AnalogValue != element2) + { + element->AnalogValue = element2; + return assign_AnalogValue_AnalogControl(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_AnalogControl_minValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AnalogControl_maxValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AnalogControl* element = dynamic_cast(BaseClass_ptr1)) + AnalogControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->minValue; - if (buffer.fail()) - return false; - else + buffer >> element->maxValue; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_AnalogValue_AnalogControl(BaseClass*, BaseClass*); -bool assign_AnalogControl_AnalogValue(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_AnalogControl_minValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { AnalogControl* element = dynamic_cast(BaseClass_ptr1); - AnalogValue* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->AnalogValue != element2) + buffer >> element->minValue; + if (!buffer.fail()) { - element->AnalogValue = element2; - return assign_AnalogValue_AnalogControl(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool get_AnalogControl_maxValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_AnalogControl_AnalogValue(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AnalogControl* element = dynamic_cast(BaseClass_ptr1)) + const AnalogControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->maxValue; - if (!buffer.str().empty()) + if (element->AnalogValue != 0) { + BaseClass_list.push_back(element->AnalogValue); return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_AnalogControl_minValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_AnalogControl_maxValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AnalogControl* element = dynamic_cast(BaseClass_ptr1)) + const AnalogControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->minValue; + buffer << element->maxValue; if (!buffer.str().empty()) { return true; @@ -117,21 +116,21 @@ bool get_AnalogControl_minValue(const BaseClass* BaseClass_ptr1, std::stringstre return false; } - -bool get_AnalogControl_AnalogValue(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) +bool get_AnalogControl_minValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AnalogControl* element = dynamic_cast(BaseClass_ptr1)) + const AnalogControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->AnalogValue != 0) + buffer << element->minValue; + if (!buffer.str().empty()) { - BaseClass_list.push_back(element->AnalogValue); return true; } } + buffer.setstate(std::ios::failbit); return false; } - const char AnalogControl::debugName[] = "AnalogControl"; const char* AnalogControl::debugString() const { @@ -140,18 +139,18 @@ const char* AnalogControl::debugString() const void AnalogControl::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AnalogControl"), &AnalogControl_factory)); + factory_map.emplace("cim:AnalogControl", &AnalogControl_factory); } void AnalogControl::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AnalogControl.maxValue"), &assign_AnalogControl_maxValue)); - assign_map.insert(std::make_pair(std::string("cim:AnalogControl.minValue"), &assign_AnalogControl_minValue)); + assign_map.emplace("cim:AnalogControl.maxValue", &assign_AnalogControl_maxValue); + assign_map.emplace("cim:AnalogControl.minValue", &assign_AnalogControl_minValue); } void AnalogControl::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AnalogControl.AnalogValue"), &assign_AnalogControl_AnalogValue)); + assign_map.emplace("cim:AnalogControl.AnalogValue", &assign_AnalogControl_AnalogValue); } void AnalogControl::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/AnalogControl.hpp b/CGMES_3.0.0/AnalogControl.hpp index 65f544a15..93d5d22ee 100644 --- a/CGMES_3.0.0/AnalogControl.hpp +++ b/CGMES_3.0.0/AnalogControl.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class AnalogValue; - /* - An analog control used for supervisory control. - */ + /** \brief An analog control used for supervisory control. */ class AnalogControl : public Control { public: @@ -28,9 +26,14 @@ namespace CIMPP AnalogControl(); ~AnalogControl() override; - CIMPP::AnalogValue* AnalogValue; /* The MeasurementValue that is controlled. Default: 0 */ - CIMPP::Float maxValue; /* Normal value range maximum for any of the Control.value. Used for scaling, e.g. in bar graphs. Default: 0.0 */ - CIMPP::Float minValue; /* Normal value range minimum for any of the Control.value. Used for scaling, e.g. in bar graphs. Default: 0.0 */ + /** \brief The MeasurementValue that is controlled. Default: 0 */ + CIMPP::AnalogValue* AnalogValue; + + /** \brief Normal value range maximum for any of the Control.value. Used for scaling, e.g. in bar graphs. Default: 0.0 */ + CIMPP::Float maxValue; + + /** \brief Normal value range minimum for any of the Control.value. Used for scaling, e.g. in bar graphs. Default: 0.0 */ + CIMPP::Float minValue; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/AnalogLimit.cpp b/CGMES_3.0.0/AnalogLimit.cpp index c025ed19c..416324bcf 100644 --- a/CGMES_3.0.0/AnalogLimit.cpp +++ b/CGMES_3.0.0/AnalogLimit.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "AnalogLimitSet.hpp" -#include "Float.hpp" using namespace CIMPP; -AnalogLimit::AnalogLimit() : LimitSet(nullptr) {}; -AnalogLimit::~AnalogLimit() {}; +AnalogLimit::AnalogLimit() : LimitSet(nullptr) {} +AnalogLimit::~AnalogLimit() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ AnalogLimit::getPossibleProfilesForAttributes() const return map; } - -bool assign_AnalogLimit_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (AnalogLimit* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->value; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_AnalogLimitSet_Limits(BaseClass*, BaseClass*); bool assign_AnalogLimit_LimitSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_AnalogLimit_LimitSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass return false; } -bool get_AnalogLimit_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_AnalogLimit_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const AnalogLimit* element = dynamic_cast(BaseClass_ptr1)) + AnalogLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->value; - if (!buffer.str().empty()) + buffer >> element->value; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_AnalogLimit_LimitSet(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AnalogLimit* element = dynamic_cast(BaseClass_ptr1)) + const AnalogLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->LimitSet != 0) { @@ -102,6 +86,20 @@ bool get_AnalogLimit_LimitSet(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->value; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char AnalogLimit::debugName[] = "AnalogLimit"; const char* AnalogLimit::debugString() const @@ -111,17 +109,17 @@ const char* AnalogLimit::debugString() const void AnalogLimit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AnalogLimit"), &AnalogLimit_factory)); + factory_map.emplace("cim:AnalogLimit", &AnalogLimit_factory); } void AnalogLimit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AnalogLimit.value"), &assign_AnalogLimit_value)); + assign_map.emplace("cim:AnalogLimit.value", &assign_AnalogLimit_value); } void AnalogLimit::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AnalogLimit.LimitSet"), &assign_AnalogLimit_LimitSet)); + assign_map.emplace("cim:AnalogLimit.LimitSet", &assign_AnalogLimit_LimitSet); } void AnalogLimit::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/AnalogLimit.hpp b/CGMES_3.0.0/AnalogLimit.hpp index ab42c70ac..39170f133 100644 --- a/CGMES_3.0.0/AnalogLimit.hpp +++ b/CGMES_3.0.0/AnalogLimit.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class AnalogLimitSet; - /* - Limit values for Analog measurements. - */ + /** \brief Limit values for Analog measurements. */ class AnalogLimit : public Limit { public: @@ -28,8 +26,11 @@ namespace CIMPP AnalogLimit(); ~AnalogLimit() override; - CIMPP::AnalogLimitSet* LimitSet; /* The set of limits. Default: 0 */ - CIMPP::Float value; /* The value to supervise against. Default: 0.0 */ + /** \brief The set of limits. Default: 0 */ + CIMPP::AnalogLimitSet* LimitSet; + + /** \brief The value to supervise against. Default: 0.0 */ + CIMPP::Float value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/AnalogLimitSet.cpp b/CGMES_3.0.0/AnalogLimitSet.cpp index 286866064..40231fdd4 100644 --- a/CGMES_3.0.0/AnalogLimitSet.cpp +++ b/CGMES_3.0.0/AnalogLimitSet.cpp @@ -8,13 +8,13 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "AnalogLimit.hpp" #include "Analog.hpp" +#include "AnalogLimit.hpp" using namespace CIMPP; -AnalogLimitSet::AnalogLimitSet() {}; -AnalogLimitSet::~AnalogLimitSet() {}; +AnalogLimitSet::AnalogLimitSet() {} +AnalogLimitSet::~AnalogLimitSet() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ AnalogLimitSet::getPossibleProfilesForAttributes() const return map; } - - bool assign_AnalogLimit_LimitSet(BaseClass*, BaseClass*); bool assign_AnalogLimitSet_Limits(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_AnalogLimitSet_Limits(BaseClass* BaseClass_ptr1, BaseClass* BaseClas } return false; } + bool assign_Analog_LimitSets(BaseClass*, BaseClass*); bool assign_AnalogLimitSet_Measurements(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -80,7 +79,8 @@ bool assign_AnalogLimitSet_Measurements(BaseClass* BaseClass_ptr1, BaseClass* Ba bool get_AnalogLimitSet_Measurements(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AnalogLimitSet* element = dynamic_cast(BaseClass_ptr1)) + const AnalogLimitSet* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { std::copy(element->Measurements.begin(), element->Measurements.end(), std::back_inserter(BaseClass_list)); return !BaseClass_list.empty(); @@ -88,7 +88,6 @@ bool get_AnalogLimitSet_Measurements(const BaseClass* BaseClass_ptr1, std::list< return false; } - const char AnalogLimitSet::debugName[] = "AnalogLimitSet"; const char* AnalogLimitSet::debugString() const { @@ -97,7 +96,7 @@ const char* AnalogLimitSet::debugString() const void AnalogLimitSet::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AnalogLimitSet"), &AnalogLimitSet_factory)); + factory_map.emplace("cim:AnalogLimitSet", &AnalogLimitSet_factory); } void AnalogLimitSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -106,8 +105,8 @@ void AnalogLimitSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AnalogLimitSet.Limits"), &assign_AnalogLimitSet_Limits)); - assign_map.insert(std::make_pair(std::string("cim:AnalogLimitSet.Measurements"), &assign_AnalogLimitSet_Measurements)); + assign_map.emplace("cim:AnalogLimitSet.Limits", &assign_AnalogLimitSet_Limits); + assign_map.emplace("cim:AnalogLimitSet.Measurements", &assign_AnalogLimitSet_Measurements); } void AnalogLimitSet::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/AnalogLimitSet.hpp b/CGMES_3.0.0/AnalogLimitSet.hpp index 8841a1f29..9578bccd6 100644 --- a/CGMES_3.0.0/AnalogLimitSet.hpp +++ b/CGMES_3.0.0/AnalogLimitSet.hpp @@ -18,9 +18,7 @@ namespace CIMPP class Analog; class AnalogLimit; - /* - An AnalogLimitSet specifies a set of Limits that are associated with an Analog measurement. - */ + /** \brief An AnalogLimitSet specifies a set of Limits that are associated with an Analog measurement. */ class AnalogLimitSet : public LimitSet { public: @@ -28,8 +26,11 @@ namespace CIMPP AnalogLimitSet(); ~AnalogLimitSet() override; - std::list Limits; /* The limit values used for supervision of Measurements. Default: 0 */ - std::list Measurements; /* The Measurements using the LimitSet. Default: 0 */ + /** \brief The limit values used for supervision of Measurements. Default: 0 */ + std::list Limits; + + /** \brief The Measurements using the LimitSet. Default: 0 */ + std::list Measurements; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/AnalogValue.cpp b/CGMES_3.0.0/AnalogValue.cpp index d620d76c1..e7b125791 100644 --- a/CGMES_3.0.0/AnalogValue.cpp +++ b/CGMES_3.0.0/AnalogValue.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -AnalogValue::AnalogValue() : Analog(nullptr), AnalogControl(nullptr) {}; -AnalogValue::~AnalogValue() {}; +AnalogValue::AnalogValue() : Analog(nullptr), AnalogControl(nullptr) {} +AnalogValue::~AnalogValue() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ AnalogValue::getPossibleProfilesForAttributes() const return map; } - - bool assign_Analog_AnalogValues(BaseClass*, BaseClass*); bool assign_AnalogValue_Analog(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_AnalogValue_Analog(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_p } return false; } + bool assign_AnalogControl_AnalogValue(BaseClass*, BaseClass*); bool assign_AnalogValue_AnalogControl(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_AnalogValue_AnalogControl(BaseClass* BaseClass_ptr1, BaseClass* Base return false; } - bool get_AnalogValue_Analog(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AnalogValue* element = dynamic_cast(BaseClass_ptr1)) + const AnalogValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Analog != 0) { @@ -100,7 +99,7 @@ const char* AnalogValue::debugString() const void AnalogValue::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AnalogValue"), &AnalogValue_factory)); + factory_map.emplace("cim:AnalogValue", &AnalogValue_factory); } void AnalogValue::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -109,8 +108,8 @@ void AnalogValue::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AnalogValue.Analog"), &assign_AnalogValue_Analog)); - assign_map.insert(std::make_pair(std::string("cim:AnalogValue.AnalogControl"), &assign_AnalogValue_AnalogControl)); + assign_map.emplace("cim:AnalogValue.Analog", &assign_AnalogValue_Analog); + assign_map.emplace("cim:AnalogValue.AnalogControl", &assign_AnalogValue_AnalogControl); } void AnalogValue::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/AnalogValue.hpp b/CGMES_3.0.0/AnalogValue.hpp index 6b3571c40..d08665c53 100644 --- a/CGMES_3.0.0/AnalogValue.hpp +++ b/CGMES_3.0.0/AnalogValue.hpp @@ -18,9 +18,7 @@ namespace CIMPP class Analog; class AnalogControl; - /* - AnalogValue represents an analog MeasurementValue. - */ + /** \brief AnalogValue represents an analog MeasurementValue. */ class AnalogValue : public MeasurementValue { public: @@ -28,8 +26,11 @@ namespace CIMPP AnalogValue(); ~AnalogValue() override; - CIMPP::Analog* Analog; /* Measurement to which this value is connected. Default: 0 */ - CIMPP::AnalogControl* AnalogControl; /* The Control variable associated with the MeasurementValue. Default: 0 */ + /** \brief Measurement to which this value is connected. Default: 0 */ + CIMPP::Analog* Analog; + + /** \brief The Control variable associated with the MeasurementValue. Default: 0 */ + CIMPP::AnalogControl* AnalogControl; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/AngleDegrees.hpp b/CGMES_3.0.0/AngleDegrees.hpp index 39204363b..99fe46c0d 100644 --- a/CGMES_3.0.0/AngleDegrees.hpp +++ b/CGMES_3.0.0/AngleDegrees.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Measurement of angle in degrees. - */ + /** \brief Measurement of angle in degrees. */ class AngleDegrees { public: diff --git a/CGMES_3.0.0/AngleRadians.hpp b/CGMES_3.0.0/AngleRadians.hpp index 2ac29ff28..8f1659629 100644 --- a/CGMES_3.0.0/AngleRadians.hpp +++ b/CGMES_3.0.0/AngleRadians.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Phase angle in radians. - */ + /** \brief Phase angle in radians. */ class AngleRadians { public: diff --git a/CGMES_3.0.0/ApparentPower.hpp b/CGMES_3.0.0/ApparentPower.hpp index bcb8201e6..0142a98c0 100644 --- a/CGMES_3.0.0/ApparentPower.hpp +++ b/CGMES_3.0.0/ApparentPower.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Product of the RMS value of the voltage and the RMS value of the current. - */ + /** \brief Product of the RMS value of the voltage and the RMS value of the current. */ class ApparentPower { public: diff --git a/CGMES_3.0.0/ApparentPowerLimit.cpp b/CGMES_3.0.0/ApparentPowerLimit.cpp index ffaac8126..e204319d7 100644 --- a/CGMES_3.0.0/ApparentPowerLimit.cpp +++ b/CGMES_3.0.0/ApparentPowerLimit.cpp @@ -8,13 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "ApparentPower.hpp" -#include "ApparentPower.hpp" using namespace CIMPP; -ApparentPowerLimit::ApparentPowerLimit() {}; -ApparentPowerLimit::~ApparentPowerLimit() {}; +ApparentPowerLimit::ApparentPowerLimit() {} +ApparentPowerLimit::~ApparentPowerLimit() {} static const std::list PossibleProfilesForClass = { @@ -43,38 +41,38 @@ ApparentPowerLimit::getPossibleProfilesForAttributes() const return map; } - -bool assign_ApparentPowerLimit_normalValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ApparentPowerLimit_normalValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ApparentPowerLimit* element = dynamic_cast(BaseClass_ptr1)) + ApparentPowerLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->normalValue; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ApparentPowerLimit_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ApparentPowerLimit_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ApparentPowerLimit* element = dynamic_cast(BaseClass_ptr1)) + ApparentPowerLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->value; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ApparentPowerLimit_normalValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ApparentPowerLimit* element = dynamic_cast(BaseClass_ptr1)) + const ApparentPowerLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->normalValue; if (!buffer.str().empty()) @@ -88,7 +86,8 @@ bool get_ApparentPowerLimit_normalValue(const BaseClass* BaseClass_ptr1, std::st bool get_ApparentPowerLimit_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ApparentPowerLimit* element = dynamic_cast(BaseClass_ptr1)) + const ApparentPowerLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value; if (!buffer.str().empty()) @@ -100,8 +99,6 @@ bool get_ApparentPowerLimit_value(const BaseClass* BaseClass_ptr1, std::stringst return false; } - - const char ApparentPowerLimit::debugName[] = "ApparentPowerLimit"; const char* ApparentPowerLimit::debugString() const { @@ -110,13 +107,13 @@ const char* ApparentPowerLimit::debugString() const void ApparentPowerLimit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ApparentPowerLimit"), &ApparentPowerLimit_factory)); + factory_map.emplace("cim:ApparentPowerLimit", &ApparentPowerLimit_factory); } void ApparentPowerLimit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ApparentPowerLimit.normalValue"), &assign_ApparentPowerLimit_normalValue)); - assign_map.insert(std::make_pair(std::string("cim:ApparentPowerLimit.value"), &assign_ApparentPowerLimit_value)); + assign_map.emplace("cim:ApparentPowerLimit.normalValue", &assign_ApparentPowerLimit_normalValue); + assign_map.emplace("cim:ApparentPowerLimit.value", &assign_ApparentPowerLimit_value); } void ApparentPowerLimit::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ApparentPowerLimit.hpp b/CGMES_3.0.0/ApparentPowerLimit.hpp index d8965f9ea..c118d7e3e 100644 --- a/CGMES_3.0.0/ApparentPowerLimit.hpp +++ b/CGMES_3.0.0/ApparentPowerLimit.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Apparent power limit. - */ + /** \brief Apparent power limit. */ class ApparentPowerLimit : public OperationalLimit { public: @@ -27,8 +25,11 @@ namespace CIMPP ApparentPowerLimit(); ~ApparentPowerLimit() override; - CIMPP::ApparentPower normalValue; /* The normal apparent power limit. The attribute shall be a positive value or zero. Default: nullptr */ - CIMPP::ApparentPower value; /* The apparent power limit. The attribute shall be a positive value or zero. Default: nullptr */ + /** \brief The normal apparent power limit. The attribute shall be a positive value or zero. Default: nullptr */ + CIMPP::ApparentPower normalValue; + + /** \brief The apparent power limit. The attribute shall be a positive value or zero. Default: nullptr */ + CIMPP::ApparentPower value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Area.hpp b/CGMES_3.0.0/Area.hpp index 681c909b6..847a38b94 100644 --- a/CGMES_3.0.0/Area.hpp +++ b/CGMES_3.0.0/Area.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Area. - */ + /** \brief Area. */ class Area { public: diff --git a/CGMES_3.0.0/AsynchronousMachine.cpp b/CGMES_3.0.0/AsynchronousMachine.cpp index bb1b3fc99..85fbc9c4b 100644 --- a/CGMES_3.0.0/AsynchronousMachine.cpp +++ b/CGMES_3.0.0/AsynchronousMachine.cpp @@ -9,21 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "AsynchronousMachineDynamics.hpp" -#include "AsynchronousMachineKind.hpp" -#include "Boolean.hpp" -#include "PerCent.hpp" -#include "Float.hpp" -#include "Frequency.hpp" -#include "RotationSpeed.hpp" -#include "Integer.hpp" -#include "ActivePower.hpp" -#include "Boolean.hpp" -#include "Float.hpp" using namespace CIMPP; -AsynchronousMachine::AsynchronousMachine() : AsynchronousMachineDynamics(nullptr) {}; -AsynchronousMachine::~AsynchronousMachine() {}; +AsynchronousMachine::AsynchronousMachine() : AsynchronousMachineDynamics(nullptr) {} +AsynchronousMachine::~AsynchronousMachine() {} static const std::list PossibleProfilesForClass = { @@ -63,158 +53,183 @@ AsynchronousMachine::getPossibleProfilesForAttributes() const return map; } +bool assign_AsynchronousMachineDynamics_AsynchronousMachine(BaseClass*, BaseClass*); +bool assign_AsynchronousMachine_AsynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + AsynchronousMachineDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->AsynchronousMachineDynamics != element2) + { + element->AsynchronousMachineDynamics = element2; + return assign_AsynchronousMachineDynamics_AsynchronousMachine(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_AsynchronousMachine_asynchronousMachineType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_asynchronousMachineType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->asynchronousMachineType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachine_converterFedDrive(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_converterFedDrive(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->converterFedDrive; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachine_efficiency(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_efficiency(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efficiency; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachine_iaIrRatio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_iaIrRatio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->iaIrRatio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachine_nominalFrequency(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_nominalFrequency(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nominalFrequency; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachine_nominalSpeed(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_nominalSpeed(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nominalSpeed; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachine_polePairNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_polePairNumber(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->polePairNumber; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachine_ratedMechanicalPower(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_ratedMechanicalPower(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedMechanicalPower; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachine_reversible(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_reversible(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->reversible; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachine_rxLockedRotorRatio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachine_rxLockedRotorRatio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rxLockedRotorRatio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachineDynamics_AsynchronousMachine(BaseClass*, BaseClass*); -bool assign_AsynchronousMachine_AsynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_AsynchronousMachine_asynchronousMachineType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); - AsynchronousMachineDynamics* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->AsynchronousMachineDynamics != element2) + buffer << element->asynchronousMachineType; + if (!buffer.str().empty()) { - element->AsynchronousMachineDynamics = element2; - return assign_AsynchronousMachineDynamics_AsynchronousMachine(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } + buffer.setstate(std::ios::failbit); return false; } bool get_AsynchronousMachine_converterFedDrive(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->converterFedDrive; if (!buffer.str().empty()) @@ -228,7 +243,8 @@ bool get_AsynchronousMachine_converterFedDrive(const BaseClass* BaseClass_ptr1, bool get_AsynchronousMachine_efficiency(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efficiency; if (!buffer.str().empty()) @@ -242,7 +258,8 @@ bool get_AsynchronousMachine_efficiency(const BaseClass* BaseClass_ptr1, std::st bool get_AsynchronousMachine_iaIrRatio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->iaIrRatio; if (!buffer.str().empty()) @@ -256,7 +273,8 @@ bool get_AsynchronousMachine_iaIrRatio(const BaseClass* BaseClass_ptr1, std::str bool get_AsynchronousMachine_nominalFrequency(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nominalFrequency; if (!buffer.str().empty()) @@ -270,7 +288,8 @@ bool get_AsynchronousMachine_nominalFrequency(const BaseClass* BaseClass_ptr1, s bool get_AsynchronousMachine_nominalSpeed(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nominalSpeed; if (!buffer.str().empty()) @@ -284,7 +303,8 @@ bool get_AsynchronousMachine_nominalSpeed(const BaseClass* BaseClass_ptr1, std:: bool get_AsynchronousMachine_polePairNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->polePairNumber; if (!buffer.str().empty()) @@ -298,7 +318,8 @@ bool get_AsynchronousMachine_polePairNumber(const BaseClass* BaseClass_ptr1, std bool get_AsynchronousMachine_ratedMechanicalPower(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedMechanicalPower; if (!buffer.str().empty()) @@ -312,7 +333,8 @@ bool get_AsynchronousMachine_ratedMechanicalPower(const BaseClass* BaseClass_ptr bool get_AsynchronousMachine_reversible(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->reversible; if (!buffer.str().empty()) @@ -326,7 +348,8 @@ bool get_AsynchronousMachine_reversible(const BaseClass* BaseClass_ptr1, std::st bool get_AsynchronousMachine_rxLockedRotorRatio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rxLockedRotorRatio; if (!buffer.str().empty()) @@ -338,22 +361,6 @@ bool get_AsynchronousMachine_rxLockedRotorRatio(const BaseClass* BaseClass_ptr1, return false; } - - -bool get_AsynchronousMachine_asynchronousMachineType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const AsynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->asynchronousMachineType; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char AsynchronousMachine::debugName[] = "AsynchronousMachine"; const char* AsynchronousMachine::debugString() const { @@ -362,26 +369,26 @@ const char* AsynchronousMachine::debugString() const void AsynchronousMachine::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AsynchronousMachine"), &AsynchronousMachine_factory)); + factory_map.emplace("cim:AsynchronousMachine", &AsynchronousMachine_factory); } void AsynchronousMachine::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.asynchronousMachineType"), &assign_AsynchronousMachine_asynchronousMachineType)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.converterFedDrive"), &assign_AsynchronousMachine_converterFedDrive)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.efficiency"), &assign_AsynchronousMachine_efficiency)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.iaIrRatio"), &assign_AsynchronousMachine_iaIrRatio)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.nominalFrequency"), &assign_AsynchronousMachine_nominalFrequency)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.nominalSpeed"), &assign_AsynchronousMachine_nominalSpeed)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.polePairNumber"), &assign_AsynchronousMachine_polePairNumber)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.ratedMechanicalPower"), &assign_AsynchronousMachine_ratedMechanicalPower)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.reversible"), &assign_AsynchronousMachine_reversible)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.rxLockedRotorRatio"), &assign_AsynchronousMachine_rxLockedRotorRatio)); + assign_map.emplace("cim:AsynchronousMachine.asynchronousMachineType", &assign_AsynchronousMachine_asynchronousMachineType); + assign_map.emplace("cim:AsynchronousMachine.converterFedDrive", &assign_AsynchronousMachine_converterFedDrive); + assign_map.emplace("cim:AsynchronousMachine.efficiency", &assign_AsynchronousMachine_efficiency); + assign_map.emplace("cim:AsynchronousMachine.iaIrRatio", &assign_AsynchronousMachine_iaIrRatio); + assign_map.emplace("cim:AsynchronousMachine.nominalFrequency", &assign_AsynchronousMachine_nominalFrequency); + assign_map.emplace("cim:AsynchronousMachine.nominalSpeed", &assign_AsynchronousMachine_nominalSpeed); + assign_map.emplace("cim:AsynchronousMachine.polePairNumber", &assign_AsynchronousMachine_polePairNumber); + assign_map.emplace("cim:AsynchronousMachine.ratedMechanicalPower", &assign_AsynchronousMachine_ratedMechanicalPower); + assign_map.emplace("cim:AsynchronousMachine.reversible", &assign_AsynchronousMachine_reversible); + assign_map.emplace("cim:AsynchronousMachine.rxLockedRotorRatio", &assign_AsynchronousMachine_rxLockedRotorRatio); } void AsynchronousMachine::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachine.AsynchronousMachineDynamics"), &assign_AsynchronousMachine_AsynchronousMachineDynamics)); + assign_map.emplace("cim:AsynchronousMachine.AsynchronousMachineDynamics", &assign_AsynchronousMachine_AsynchronousMachineDynamics); } void AsynchronousMachine::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/AsynchronousMachine.hpp b/CGMES_3.0.0/AsynchronousMachine.hpp index 54fd5f544..3ae526452 100644 --- a/CGMES_3.0.0/AsynchronousMachine.hpp +++ b/CGMES_3.0.0/AsynchronousMachine.hpp @@ -25,9 +25,7 @@ namespace CIMPP { class AsynchronousMachineDynamics; - /* - A rotating machine whose shaft rotates asynchronously with the electrical field. Also known as an induction machine with no external connection to the rotor windings, e.g. squirrel-cage induction machine. - */ + /** \brief A rotating machine whose shaft rotates asynchronously with the electrical field. Also known as an induction machine with no external connection to the rotor windings, e.g. squirrel-cage induction machine. */ class AsynchronousMachine : public RotatingMachine { public: @@ -35,17 +33,38 @@ namespace CIMPP AsynchronousMachine(); ~AsynchronousMachine() override; - CIMPP::AsynchronousMachineDynamics* AsynchronousMachineDynamics; /* Asynchronous machine dynamics model used to describe dynamic behaviour of this asynchronous machine. Default: 0 */ - CIMPP::AsynchronousMachineKind asynchronousMachineType; /* Indicates the type of Asynchronous Machine (motor or generator). Default: 0 */ - CIMPP::Boolean converterFedDrive; /* Indicates whether the machine is a converter fed drive. Used for short circuit data exchange according to IEC 60909. Default: false */ - CIMPP::PerCent efficiency; /* Efficiency of the asynchronous machine at nominal operation as a percentage. Indicator for converter drive motors. Used for short circuit data exchange according to IEC 60909. Default: nullptr */ - CIMPP::Float iaIrRatio; /* Ratio of locked-rotor current to the rated current of the motor (Ia/Ir). Used for short circuit data exchange according to IEC 60909. Default: 0.0 */ - CIMPP::Frequency nominalFrequency; /* Nameplate data indicates if the machine is 50 Hz or 60 Hz. Default: nullptr */ - CIMPP::RotationSpeed nominalSpeed; /* Nameplate data. Depends on the slip and number of pole pairs. Default: nullptr */ - CIMPP::Integer polePairNumber; /* Number of pole pairs of stator. Used for short circuit data exchange according to IEC 60909. Default: 0 */ - CIMPP::ActivePower ratedMechanicalPower; /* Rated mechanical power (Pr in IEC 60909-0). Used for short circuit data exchange according to IEC 60909. Default: nullptr */ - CIMPP::Boolean reversible; /* Indicates for converter drive motors if the power can be reversible. Used for short circuit data exchange according to IEC 60909. Default: false */ - CIMPP::Float rxLockedRotorRatio; /* Locked rotor ratio (R/X). Used for short circuit data exchange according to IEC 60909. Default: 0.0 */ + /** \brief Asynchronous machine dynamics model used to describe dynamic behaviour of this asynchronous machine. Default: 0 */ + CIMPP::AsynchronousMachineDynamics* AsynchronousMachineDynamics; + + /** \brief Indicates the type of Asynchronous Machine (motor or generator). Default: 0 */ + CIMPP::AsynchronousMachineKind asynchronousMachineType; + + /** \brief Indicates whether the machine is a converter fed drive. Used for short circuit data exchange according to IEC 60909. Default: false */ + CIMPP::Boolean converterFedDrive; + + /** \brief Efficiency of the asynchronous machine at nominal operation as a percentage. Indicator for converter drive motors. Used for short circuit data exchange according to IEC 60909. Default: nullptr */ + CIMPP::PerCent efficiency; + + /** \brief Ratio of locked-rotor current to the rated current of the motor (Ia/Ir). Used for short circuit data exchange according to IEC 60909. Default: 0.0 */ + CIMPP::Float iaIrRatio; + + /** \brief Nameplate data indicates if the machine is 50 Hz or 60 Hz. Default: nullptr */ + CIMPP::Frequency nominalFrequency; + + /** \brief Nameplate data. Depends on the slip and number of pole pairs. Default: nullptr */ + CIMPP::RotationSpeed nominalSpeed; + + /** \brief Number of pole pairs of stator. Used for short circuit data exchange according to IEC 60909. Default: 0 */ + CIMPP::Integer polePairNumber; + + /** \brief Rated mechanical power (Pr in IEC 60909-0). Used for short circuit data exchange according to IEC 60909. Default: nullptr */ + CIMPP::ActivePower ratedMechanicalPower; + + /** \brief Indicates for converter drive motors if the power can be reversible. Used for short circuit data exchange according to IEC 60909. Default: false */ + CIMPP::Boolean reversible; + + /** \brief Locked rotor ratio (R/X). Used for short circuit data exchange according to IEC 60909. Default: 0.0 */ + CIMPP::Float rxLockedRotorRatio; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/AsynchronousMachineDynamics.cpp b/CGMES_3.0.0/AsynchronousMachineDynamics.cpp index bfe9a4fb3..a7e89471f 100644 --- a/CGMES_3.0.0/AsynchronousMachineDynamics.cpp +++ b/CGMES_3.0.0/AsynchronousMachineDynamics.cpp @@ -15,8 +15,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -AsynchronousMachineDynamics::AsynchronousMachineDynamics() : AsynchronousMachine(nullptr), MechanicalLoadDynamics(nullptr), TurbineGovernorDynamics(nullptr), WindTurbineType1or2Dynamics(nullptr) {}; -AsynchronousMachineDynamics::~AsynchronousMachineDynamics() {}; +AsynchronousMachineDynamics::AsynchronousMachineDynamics() : AsynchronousMachine(nullptr), MechanicalLoadDynamics(nullptr), TurbineGovernorDynamics(nullptr), WindTurbineType1or2Dynamics(nullptr) {} +AsynchronousMachineDynamics::~AsynchronousMachineDynamics() {} static const std::list PossibleProfilesForClass = { @@ -46,8 +46,6 @@ AsynchronousMachineDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_AsynchronousMachine_AsynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_AsynchronousMachineDynamics_AsynchronousMachine(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -64,6 +62,7 @@ bool assign_AsynchronousMachineDynamics_AsynchronousMachine(BaseClass* BaseClass } return false; } + bool assign_MechanicalLoadDynamics_AsynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_AsynchronousMachineDynamics_MechanicalLoadDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -80,6 +79,7 @@ bool assign_AsynchronousMachineDynamics_MechanicalLoadDynamics(BaseClass* BaseCl } return false; } + bool assign_TurbineGovernorDynamics_AsynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_AsynchronousMachineDynamics_TurbineGovernorDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -96,6 +96,7 @@ bool assign_AsynchronousMachineDynamics_TurbineGovernorDynamics(BaseClass* BaseC } return false; } + bool assign_WindTurbineType1or2Dynamics_AsynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_AsynchronousMachineDynamics_WindTurbineType1or2Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -113,10 +114,10 @@ bool assign_AsynchronousMachineDynamics_WindTurbineType1or2Dynamics(BaseClass* B return false; } - bool get_AsynchronousMachineDynamics_AsynchronousMachine(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AsynchronousMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->AsynchronousMachine != 0) { @@ -128,6 +129,8 @@ bool get_AsynchronousMachineDynamics_AsynchronousMachine(const BaseClass* BaseCl } + + const char AsynchronousMachineDynamics::debugName[] = "AsynchronousMachineDynamics"; const char* AsynchronousMachineDynamics::debugString() const { @@ -136,7 +139,7 @@ const char* AsynchronousMachineDynamics::debugString() const void AsynchronousMachineDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AsynchronousMachineDynamics"), &AsynchronousMachineDynamics_factory)); + factory_map.emplace("cim:AsynchronousMachineDynamics", &AsynchronousMachineDynamics_factory); } void AsynchronousMachineDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -145,10 +148,10 @@ void AsynchronousMachineDynamics::addPrimitiveAssignFnsToMap(std::unordered_map< void AsynchronousMachineDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineDynamics.AsynchronousMachine"), &assign_AsynchronousMachineDynamics_AsynchronousMachine)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineDynamics.MechanicalLoadDynamics"), &assign_AsynchronousMachineDynamics_MechanicalLoadDynamics)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineDynamics.TurbineGovernorDynamics"), &assign_AsynchronousMachineDynamics_TurbineGovernorDynamics)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineDynamics.WindTurbineType1or2Dynamics"), &assign_AsynchronousMachineDynamics_WindTurbineType1or2Dynamics)); + assign_map.emplace("cim:AsynchronousMachineDynamics.AsynchronousMachine", &assign_AsynchronousMachineDynamics_AsynchronousMachine); + assign_map.emplace("cim:AsynchronousMachineDynamics.MechanicalLoadDynamics", &assign_AsynchronousMachineDynamics_MechanicalLoadDynamics); + assign_map.emplace("cim:AsynchronousMachineDynamics.TurbineGovernorDynamics", &assign_AsynchronousMachineDynamics_TurbineGovernorDynamics); + assign_map.emplace("cim:AsynchronousMachineDynamics.WindTurbineType1or2Dynamics", &assign_AsynchronousMachineDynamics_WindTurbineType1or2Dynamics); } void AsynchronousMachineDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/AsynchronousMachineDynamics.hpp b/CGMES_3.0.0/AsynchronousMachineDynamics.hpp index df45e3ef2..7be25edc8 100644 --- a/CGMES_3.0.0/AsynchronousMachineDynamics.hpp +++ b/CGMES_3.0.0/AsynchronousMachineDynamics.hpp @@ -20,9 +20,7 @@ namespace CIMPP class TurbineGovernorDynamics; class WindTurbineType1or2Dynamics; - /* - Asynchronous machine whose behaviour is described by reference to a standard model expressed in either time constant reactance form or equivalent circuit form or by definition of a user-defined model. Parameter details:
  1. Asynchronous machine parameters such as Xl, Xs, etc. are actually used as inductances in the model, but are commonly referred to as reactances since, at nominal frequency, the PU values are the same. However, some references use the symbol L instead of X.
- */ + /** \brief Asynchronous machine whose behaviour is described by reference to a standard model expressed in either time constant reactance form or equivalent circuit form or by definition of a user-defined model. Parameter details:
  1. Asynchronous machine parameters such as Xl, Xs, etc. are actually used as inductances in the model, but are commonly referred to as reactances since, at nominal frequency, the PU values are the same. However, some references use the symbol L instead of X.
*/ class AsynchronousMachineDynamics : public RotatingMachineDynamics { public: @@ -30,10 +28,17 @@ namespace CIMPP AsynchronousMachineDynamics(); ~AsynchronousMachineDynamics() override; - CIMPP::AsynchronousMachine* AsynchronousMachine; /* Asynchronous machine to which this asynchronous machine dynamics model applies. Default: 0 */ - CIMPP::MechanicalLoadDynamics* MechanicalLoadDynamics; /* Mechanical load model associated with this asynchronous machine model. Default: 0 */ - CIMPP::TurbineGovernorDynamics* TurbineGovernorDynamics; /* Turbine-governor model associated with this asynchronous machine model. Default: 0 */ - CIMPP::WindTurbineType1or2Dynamics* WindTurbineType1or2Dynamics; /* Wind generator type 1 or type 2 model associated with this asynchronous machine model. Default: 0 */ + /** \brief Asynchronous machine to which this asynchronous machine dynamics model applies. Default: 0 */ + CIMPP::AsynchronousMachine* AsynchronousMachine; + + /** \brief Mechanical load model associated with this asynchronous machine model. Default: 0 */ + CIMPP::MechanicalLoadDynamics* MechanicalLoadDynamics; + + /** \brief Turbine-governor model associated with this asynchronous machine model. Default: 0 */ + CIMPP::TurbineGovernorDynamics* TurbineGovernorDynamics; + + /** \brief Wind generator type 1 or type 2 model associated with this asynchronous machine model. Default: 0 */ + CIMPP::WindTurbineType1or2Dynamics* WindTurbineType1or2Dynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/AsynchronousMachineEquivalentCircuit.cpp b/CGMES_3.0.0/AsynchronousMachineEquivalentCircuit.cpp index 8aed225a4..5ed52c82d 100644 --- a/CGMES_3.0.0/AsynchronousMachineEquivalentCircuit.cpp +++ b/CGMES_3.0.0/AsynchronousMachineEquivalentCircuit.cpp @@ -8,16 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -AsynchronousMachineEquivalentCircuit::AsynchronousMachineEquivalentCircuit() {}; -AsynchronousMachineEquivalentCircuit::~AsynchronousMachineEquivalentCircuit() {}; +AsynchronousMachineEquivalentCircuit::AsynchronousMachineEquivalentCircuit() {} +AsynchronousMachineEquivalentCircuit::~AsynchronousMachineEquivalentCircuit() {} static const std::list PossibleProfilesForClass = { @@ -48,77 +43,80 @@ AsynchronousMachineEquivalentCircuit::getPossibleProfilesForAttributes() const return map; } - -bool assign_AsynchronousMachineEquivalentCircuit_rr1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineEquivalentCircuit_rr1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rr1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachineEquivalentCircuit_rr2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineEquivalentCircuit_rr2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rr2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachineEquivalentCircuit_xlr1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineEquivalentCircuit_xlr1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xlr1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachineEquivalentCircuit_xlr2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineEquivalentCircuit_xlr2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xlr2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachineEquivalentCircuit_xm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineEquivalentCircuit_xm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_AsynchronousMachineEquivalentCircuit_rr1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rr1; if (!buffer.str().empty()) @@ -132,7 +130,8 @@ bool get_AsynchronousMachineEquivalentCircuit_rr1(const BaseClass* BaseClass_ptr bool get_AsynchronousMachineEquivalentCircuit_rr2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rr2; if (!buffer.str().empty()) @@ -146,7 +145,8 @@ bool get_AsynchronousMachineEquivalentCircuit_rr2(const BaseClass* BaseClass_ptr bool get_AsynchronousMachineEquivalentCircuit_xlr1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xlr1; if (!buffer.str().empty()) @@ -160,7 +160,8 @@ bool get_AsynchronousMachineEquivalentCircuit_xlr1(const BaseClass* BaseClass_pt bool get_AsynchronousMachineEquivalentCircuit_xlr2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xlr2; if (!buffer.str().empty()) @@ -174,7 +175,8 @@ bool get_AsynchronousMachineEquivalentCircuit_xlr2(const BaseClass* BaseClass_pt bool get_AsynchronousMachineEquivalentCircuit_xm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xm; if (!buffer.str().empty()) @@ -186,8 +188,6 @@ bool get_AsynchronousMachineEquivalentCircuit_xm(const BaseClass* BaseClass_ptr1 return false; } - - const char AsynchronousMachineEquivalentCircuit::debugName[] = "AsynchronousMachineEquivalentCircuit"; const char* AsynchronousMachineEquivalentCircuit::debugString() const { @@ -196,16 +196,16 @@ const char* AsynchronousMachineEquivalentCircuit::debugString() const void AsynchronousMachineEquivalentCircuit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AsynchronousMachineEquivalentCircuit"), &AsynchronousMachineEquivalentCircuit_factory)); + factory_map.emplace("cim:AsynchronousMachineEquivalentCircuit", &AsynchronousMachineEquivalentCircuit_factory); } void AsynchronousMachineEquivalentCircuit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineEquivalentCircuit.rr1"), &assign_AsynchronousMachineEquivalentCircuit_rr1)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineEquivalentCircuit.rr2"), &assign_AsynchronousMachineEquivalentCircuit_rr2)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineEquivalentCircuit.xlr1"), &assign_AsynchronousMachineEquivalentCircuit_xlr1)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineEquivalentCircuit.xlr2"), &assign_AsynchronousMachineEquivalentCircuit_xlr2)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineEquivalentCircuit.xm"), &assign_AsynchronousMachineEquivalentCircuit_xm)); + assign_map.emplace("cim:AsynchronousMachineEquivalentCircuit.rr1", &assign_AsynchronousMachineEquivalentCircuit_rr1); + assign_map.emplace("cim:AsynchronousMachineEquivalentCircuit.rr2", &assign_AsynchronousMachineEquivalentCircuit_rr2); + assign_map.emplace("cim:AsynchronousMachineEquivalentCircuit.xlr1", &assign_AsynchronousMachineEquivalentCircuit_xlr1); + assign_map.emplace("cim:AsynchronousMachineEquivalentCircuit.xlr2", &assign_AsynchronousMachineEquivalentCircuit_xlr2); + assign_map.emplace("cim:AsynchronousMachineEquivalentCircuit.xm", &assign_AsynchronousMachineEquivalentCircuit_xm); } void AsynchronousMachineEquivalentCircuit::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/AsynchronousMachineEquivalentCircuit.hpp b/CGMES_3.0.0/AsynchronousMachineEquivalentCircuit.hpp index bdfe4ef5a..2da0252af 100644 --- a/CGMES_3.0.0/AsynchronousMachineEquivalentCircuit.hpp +++ b/CGMES_3.0.0/AsynchronousMachineEquivalentCircuit.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The electrical equations of all variations of the asynchronous model are based on the AsynchronousEquivalentCircuit diagram for the direct- and quadrature- axes, with two equivalent rotor windings in each axis. Equations for conversion between equivalent circuit and time constant reactance forms: Xs = Xm + Xl X' = Xl + Xm x Xlr1 / (Xm + Xlr1) X'' = Xl + Xm x Xlr1 x Xlr2 / (Xm x Xlr1 + Xm x Xlr2 + Xlr1 x Xlr2) T'o = (Xm + Xlr1) / (omega0 x Rr1) T''o = (Xm x Xlr1 + Xm x Xlr2 + Xlr1 x Xlr2) / (omega0 x Rr2 x (Xm + Xlr1) Same equations using CIM attributes from AsynchronousMachineTimeConstantReactance class on left of "=" and AsynchronousMachineEquivalentCircuit class on right (except as noted): xs = xm + RotatingMachineDynamics.statorLeakageReactance xp = RotatingMachineDynamics.statorLeakageReactance + xm x xlr1 / (xm + xlr1) xpp = RotatingMachineDynamics.statorLeakageReactance + xm x xlr1 x xlr2 / (xm x xlr1 + xm x xlr2 + xlr1 x xlr2) tpo = (xm + xlr1) / (2 x pi x nominal frequency x rr1) tppo = (xm x xlr1 + xm x xlr2 + xlr1 x xlr2) / (2 x pi x nominal frequency x rr2 x (xm + xlr1). - */ + /** \brief The electrical equations of all variations of the asynchronous model are based on the AsynchronousEquivalentCircuit diagram for the direct- and quadrature- axes, with two equivalent rotor windings in each axis. Equations for conversion between equivalent circuit and time constant reactance forms: Xs = Xm + Xl X' = Xl + Xm x Xlr1 / (Xm + Xlr1) X'' = Xl + Xm x Xlr1 x Xlr2 / (Xm x Xlr1 + Xm x Xlr2 + Xlr1 x Xlr2) T'o = (Xm + Xlr1) / (omega0 x Rr1) T''o = (Xm x Xlr1 + Xm x Xlr2 + Xlr1 x Xlr2) / (omega0 x Rr2 x (Xm + Xlr1) Same equations using CIM attributes from AsynchronousMachineTimeConstantReactance class on left of "=" and AsynchronousMachineEquivalentCircuit class on right (except as noted): xs = xm + RotatingMachineDynamics.statorLeakageReactance xp = RotatingMachineDynamics.statorLeakageReactance + xm x xlr1 / (xm + xlr1) xpp = RotatingMachineDynamics.statorLeakageReactance + xm x xlr1 x xlr2 / (xm x xlr1 + xm x xlr2 + xlr1 x xlr2) tpo = (xm + xlr1) / (2 x pi x nominal frequency x rr1) tppo = (xm x xlr1 + xm x xlr2 + xlr1 x xlr2) / (2 x pi x nominal frequency x rr2 x (xm + xlr1). */ class AsynchronousMachineEquivalentCircuit : public AsynchronousMachineDynamics { public: @@ -27,11 +25,20 @@ namespace CIMPP AsynchronousMachineEquivalentCircuit(); ~AsynchronousMachineEquivalentCircuit() override; - CIMPP::PU rr1; /* Damper 1 winding resistance. Default: nullptr */ - CIMPP::PU rr2; /* Damper 2 winding resistance. Default: nullptr */ - CIMPP::PU xlr1; /* Damper 1 winding leakage reactance. Default: nullptr */ - CIMPP::PU xlr2; /* Damper 2 winding leakage reactance. Default: nullptr */ - CIMPP::PU xm; /* Magnetizing reactance. Default: nullptr */ + /** \brief Damper 1 winding resistance. Default: nullptr */ + CIMPP::PU rr1; + + /** \brief Damper 2 winding resistance. Default: nullptr */ + CIMPP::PU rr2; + + /** \brief Damper 1 winding leakage reactance. Default: nullptr */ + CIMPP::PU xlr1; + + /** \brief Damper 2 winding leakage reactance. Default: nullptr */ + CIMPP::PU xlr2; + + /** \brief Magnetizing reactance. Default: nullptr */ + CIMPP::PU xm; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/AsynchronousMachineKind.cpp b/CGMES_3.0.0/AsynchronousMachineKind.cpp index d9b39ecb0..795ae96ee 100644 --- a/CGMES_3.0.0/AsynchronousMachineKind.cpp +++ b/CGMES_3.0.0/AsynchronousMachineKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "AsynchronousMachineKind") + if (EnumSymbol.substr(0, pos) != "AsynchronousMachineKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,12 +50,12 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "generator") + if (EnumSymbol == "generator") { rop = AsynchronousMachineKind::generator; return lop; } - if(EnumSymbol == "motor") + if (EnumSymbol == "motor") { rop = AsynchronousMachineKind::motor; return lop; diff --git a/CGMES_3.0.0/AsynchronousMachineKind.hpp b/CGMES_3.0.0/AsynchronousMachineKind.hpp index 8b8e54e57..f82a69df1 100644 --- a/CGMES_3.0.0/AsynchronousMachineKind.hpp +++ b/CGMES_3.0.0/AsynchronousMachineKind.hpp @@ -9,21 +9,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Kind of Asynchronous Machine. - */ + /** \brief Kind of Asynchronous Machine. */ class AsynchronousMachineKind { public: enum AsynchronousMachineKind_ENUM { - /** - * The Asynchronous Machine is a generator. - */ + /** The Asynchronous Machine is a generator. */ generator, - /** - * The Asynchronous Machine is a motor. - */ + /** The Asynchronous Machine is a motor. */ motor, }; diff --git a/CGMES_3.0.0/AsynchronousMachineTimeConstantReactance.cpp b/CGMES_3.0.0/AsynchronousMachineTimeConstantReactance.cpp index dd33a441b..4f8d1492d 100644 --- a/CGMES_3.0.0/AsynchronousMachineTimeConstantReactance.cpp +++ b/CGMES_3.0.0/AsynchronousMachineTimeConstantReactance.cpp @@ -8,16 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -AsynchronousMachineTimeConstantReactance::AsynchronousMachineTimeConstantReactance() {}; -AsynchronousMachineTimeConstantReactance::~AsynchronousMachineTimeConstantReactance() {}; +AsynchronousMachineTimeConstantReactance::AsynchronousMachineTimeConstantReactance() {} +AsynchronousMachineTimeConstantReactance::~AsynchronousMachineTimeConstantReactance() {} static const std::list PossibleProfilesForClass = { @@ -48,77 +43,80 @@ AsynchronousMachineTimeConstantReactance::getPossibleProfilesForAttributes() con return map; } - -bool assign_AsynchronousMachineTimeConstantReactance_tpo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineTimeConstantReactance_tpo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachineTimeConstantReactance_tppo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineTimeConstantReactance_tppo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tppo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachineTimeConstantReactance_xp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineTimeConstantReactance_xp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachineTimeConstantReactance_xpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineTimeConstantReactance_xpp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xpp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_AsynchronousMachineTimeConstantReactance_xs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_AsynchronousMachineTimeConstantReactance_xs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_AsynchronousMachineTimeConstantReactance_tpo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpo; if (!buffer.str().empty()) @@ -132,7 +130,8 @@ bool get_AsynchronousMachineTimeConstantReactance_tpo(const BaseClass* BaseClass bool get_AsynchronousMachineTimeConstantReactance_tppo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tppo; if (!buffer.str().empty()) @@ -146,7 +145,8 @@ bool get_AsynchronousMachineTimeConstantReactance_tppo(const BaseClass* BaseClas bool get_AsynchronousMachineTimeConstantReactance_xp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xp; if (!buffer.str().empty()) @@ -160,7 +160,8 @@ bool get_AsynchronousMachineTimeConstantReactance_xp(const BaseClass* BaseClass_ bool get_AsynchronousMachineTimeConstantReactance_xpp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xpp; if (!buffer.str().empty()) @@ -174,7 +175,8 @@ bool get_AsynchronousMachineTimeConstantReactance_xpp(const BaseClass* BaseClass bool get_AsynchronousMachineTimeConstantReactance_xs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xs; if (!buffer.str().empty()) @@ -186,8 +188,6 @@ bool get_AsynchronousMachineTimeConstantReactance_xs(const BaseClass* BaseClass_ return false; } - - const char AsynchronousMachineTimeConstantReactance::debugName[] = "AsynchronousMachineTimeConstantReactance"; const char* AsynchronousMachineTimeConstantReactance::debugString() const { @@ -196,16 +196,16 @@ const char* AsynchronousMachineTimeConstantReactance::debugString() const void AsynchronousMachineTimeConstantReactance::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AsynchronousMachineTimeConstantReactance"), &AsynchronousMachineTimeConstantReactance_factory)); + factory_map.emplace("cim:AsynchronousMachineTimeConstantReactance", &AsynchronousMachineTimeConstantReactance_factory); } void AsynchronousMachineTimeConstantReactance::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineTimeConstantReactance.tpo"), &assign_AsynchronousMachineTimeConstantReactance_tpo)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineTimeConstantReactance.tppo"), &assign_AsynchronousMachineTimeConstantReactance_tppo)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineTimeConstantReactance.xp"), &assign_AsynchronousMachineTimeConstantReactance_xp)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineTimeConstantReactance.xpp"), &assign_AsynchronousMachineTimeConstantReactance_xpp)); - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineTimeConstantReactance.xs"), &assign_AsynchronousMachineTimeConstantReactance_xs)); + assign_map.emplace("cim:AsynchronousMachineTimeConstantReactance.tpo", &assign_AsynchronousMachineTimeConstantReactance_tpo); + assign_map.emplace("cim:AsynchronousMachineTimeConstantReactance.tppo", &assign_AsynchronousMachineTimeConstantReactance_tppo); + assign_map.emplace("cim:AsynchronousMachineTimeConstantReactance.xp", &assign_AsynchronousMachineTimeConstantReactance_xp); + assign_map.emplace("cim:AsynchronousMachineTimeConstantReactance.xpp", &assign_AsynchronousMachineTimeConstantReactance_xpp); + assign_map.emplace("cim:AsynchronousMachineTimeConstantReactance.xs", &assign_AsynchronousMachineTimeConstantReactance_xs); } void AsynchronousMachineTimeConstantReactance::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/AsynchronousMachineTimeConstantReactance.hpp b/CGMES_3.0.0/AsynchronousMachineTimeConstantReactance.hpp index 14aed5a54..4d32e602d 100644 --- a/CGMES_3.0.0/AsynchronousMachineTimeConstantReactance.hpp +++ b/CGMES_3.0.0/AsynchronousMachineTimeConstantReactance.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Parameter details:
  1. If X'' = X', a single cage (one equivalent rotor winding per axis) is modelled.
  2. The "p" in the attribute names is a substitution for a "prime" in the usual parameter notation, e.g. tpo refers to T'o.
The parameters used for models expressed in time constant reactance form include: - RotatingMachine.ratedS (MVAbase); - RotatingMachineDynamics.damping (D); - RotatingMachineDynamics.inertia (H); - RotatingMachineDynamics.saturationFactor (S1); - RotatingMachineDynamics.saturationFactor120 (S12); - RotatingMachineDynamics.statorLeakageReactance (Xl); - RotatingMachineDynamics.statorResistance (Rs); - .xs (Xs); - .xp (X'); - .xpp (X''); - .tpo (T'o); - .tppo (T''o). - */ + /** \brief Parameter details:
  1. If X'' = X', a single cage (one equivalent rotor winding per axis) is modelled.
  2. The "p" in the attribute names is a substitution for a "prime" in the usual parameter notation, e.g. tpo refers to T'o.
The parameters used for models expressed in time constant reactance form include: - RotatingMachine.ratedS (MVAbase); - RotatingMachineDynamics.damping (D); - RotatingMachineDynamics.inertia (H); - RotatingMachineDynamics.saturationFactor (S1); - RotatingMachineDynamics.saturationFactor120 (S12); - RotatingMachineDynamics.statorLeakageReactance (Xl); - RotatingMachineDynamics.statorResistance (Rs); - .xs (Xs); - .xp (X'); - .xpp (X''); - .tpo (T'o); - .tppo (T''o). */ class AsynchronousMachineTimeConstantReactance : public AsynchronousMachineDynamics { public: @@ -28,11 +26,20 @@ namespace CIMPP AsynchronousMachineTimeConstantReactance(); ~AsynchronousMachineTimeConstantReactance() override; - CIMPP::Seconds tpo; /* Transient rotor time constant (<i>T`o</i>) (&gt; AsynchronousMachineTimeConstantReactance.tppo). Typical value = 5. Default: nullptr */ - CIMPP::Seconds tppo; /* Subtransient rotor time constant (<i>T``o</i>) (&gt; 0). Typical value = 0,03. Default: nullptr */ - CIMPP::PU xp; /* Transient reactance (unsaturated) (<i>X`</i>) (&gt;= AsynchronousMachineTimeConstantReactance.xpp). Typical value = 0,5. Default: nullptr */ - CIMPP::PU xpp; /* Subtransient reactance (unsaturated) (<i>X``</i>) (&gt; RotatingMachineDynamics.statorLeakageReactance). Typical value = 0,2. Default: nullptr */ - CIMPP::PU xs; /* Synchronous reactance (<i>Xs</i>) (&gt;= AsynchronousMachineTimeConstantReactance.xp). Typical value = 1,8. Default: nullptr */ + /** \brief Transient rotor time constant (<i>T`o</i>) (&gt; AsynchronousMachineTimeConstantReactance.tppo). Typical value = 5. Default: nullptr */ + CIMPP::Seconds tpo; + + /** \brief Subtransient rotor time constant (<i>T``o</i>) (&gt; 0). Typical value = 0,03. Default: nullptr */ + CIMPP::Seconds tppo; + + /** \brief Transient reactance (unsaturated) (<i>X`</i>) (&gt;= AsynchronousMachineTimeConstantReactance.xpp). Typical value = 0,5. Default: nullptr */ + CIMPP::PU xp; + + /** \brief Subtransient reactance (unsaturated) (<i>X``</i>) (&gt; RotatingMachineDynamics.statorLeakageReactance). Typical value = 0,2. Default: nullptr */ + CIMPP::PU xpp; + + /** \brief Synchronous reactance (<i>Xs</i>) (&gt;= AsynchronousMachineTimeConstantReactance.xp). Typical value = 1,8. Default: nullptr */ + CIMPP::PU xs; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/AsynchronousMachineUserDefined.cpp b/CGMES_3.0.0/AsynchronousMachineUserDefined.cpp index dd1fad853..df2454abf 100644 --- a/CGMES_3.0.0/AsynchronousMachineUserDefined.cpp +++ b/CGMES_3.0.0/AsynchronousMachineUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -AsynchronousMachineUserDefined::AsynchronousMachineUserDefined() {}; -AsynchronousMachineUserDefined::~AsynchronousMachineUserDefined() {}; +AsynchronousMachineUserDefined::AsynchronousMachineUserDefined() {} +AsynchronousMachineUserDefined::~AsynchronousMachineUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ AsynchronousMachineUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_AsynchronousMachineUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (AsynchronousMachineUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_AsynchronousMachineUserDefined(BaseClass*, BaseClass*); bool assign_AsynchronousMachineUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_AsynchronousMachineUserDefined_ProprietaryParameterDynamics(BaseClas return false; } +bool assign_AsynchronousMachineUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + AsynchronousMachineUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_AsynchronousMachineUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const AsynchronousMachineUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const AsynchronousMachineUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_AsynchronousMachineUserDefined_proprietary(const BaseClass* BaseClass_p return false; } - - const char AsynchronousMachineUserDefined::debugName[] = "AsynchronousMachineUserDefined"; const char* AsynchronousMachineUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* AsynchronousMachineUserDefined::debugString() const void AsynchronousMachineUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AsynchronousMachineUserDefined"), &AsynchronousMachineUserDefined_factory)); + factory_map.emplace("cim:AsynchronousMachineUserDefined", &AsynchronousMachineUserDefined_factory); } void AsynchronousMachineUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineUserDefined.proprietary"), &assign_AsynchronousMachineUserDefined_proprietary)); + assign_map.emplace("cim:AsynchronousMachineUserDefined.proprietary", &assign_AsynchronousMachineUserDefined_proprietary); } void AsynchronousMachineUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AsynchronousMachineUserDefined.ProprietaryParameterDynamics"), &assign_AsynchronousMachineUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:AsynchronousMachineUserDefined.ProprietaryParameterDynamics", &assign_AsynchronousMachineUserDefined_ProprietaryParameterDynamics); } void AsynchronousMachineUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/AsynchronousMachineUserDefined.hpp b/CGMES_3.0.0/AsynchronousMachineUserDefined.hpp index 12efb5164..bc914b662 100644 --- a/CGMES_3.0.0/AsynchronousMachineUserDefined.hpp +++ b/CGMES_3.0.0/AsynchronousMachineUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Asynchronous machine whose dynamic behaviour is described by a user-defined model. - */ + /** \brief Asynchronous machine whose dynamic behaviour is described by a user-defined model. */ class AsynchronousMachineUserDefined : public AsynchronousMachineDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP AsynchronousMachineUserDefined(); ~AsynchronousMachineUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/AuxiliaryEquipment.cpp b/CGMES_3.0.0/AuxiliaryEquipment.cpp index 5a3a80b08..1ec47768f 100644 --- a/CGMES_3.0.0/AuxiliaryEquipment.cpp +++ b/CGMES_3.0.0/AuxiliaryEquipment.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -AuxiliaryEquipment::AuxiliaryEquipment() : Terminal(nullptr) {}; -AuxiliaryEquipment::~AuxiliaryEquipment() {}; +AuxiliaryEquipment::AuxiliaryEquipment() : Terminal(nullptr) {} +AuxiliaryEquipment::~AuxiliaryEquipment() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ AuxiliaryEquipment::getPossibleProfilesForAttributes() const return map; } - - bool assign_Terminal_AuxiliaryEquipment(BaseClass*, BaseClass*); bool assign_AuxiliaryEquipment_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_AuxiliaryEquipment_Terminal(BaseClass* BaseClass_ptr1, BaseClass* Ba return false; } - bool get_AuxiliaryEquipment_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const AuxiliaryEquipment* element = dynamic_cast(BaseClass_ptr1)) + const AuxiliaryEquipment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Terminal != 0) { @@ -73,7 +71,6 @@ bool get_AuxiliaryEquipment_Terminal(const BaseClass* BaseClass_ptr1, std::list< return false; } - const char AuxiliaryEquipment::debugName[] = "AuxiliaryEquipment"; const char* AuxiliaryEquipment::debugString() const { @@ -82,7 +79,7 @@ const char* AuxiliaryEquipment::debugString() const void AuxiliaryEquipment::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:AuxiliaryEquipment"), &AuxiliaryEquipment_factory)); + factory_map.emplace("cim:AuxiliaryEquipment", &AuxiliaryEquipment_factory); } void AuxiliaryEquipment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void AuxiliaryEquipment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:AuxiliaryEquipment.Terminal"), &assign_AuxiliaryEquipment_Terminal)); + assign_map.emplace("cim:AuxiliaryEquipment.Terminal", &assign_AuxiliaryEquipment_Terminal); } void AuxiliaryEquipment::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/AuxiliaryEquipment.hpp b/CGMES_3.0.0/AuxiliaryEquipment.hpp index 042e5f5ce..bfe248080 100644 --- a/CGMES_3.0.0/AuxiliaryEquipment.hpp +++ b/CGMES_3.0.0/AuxiliaryEquipment.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class Terminal; - /* - AuxiliaryEquipment describe equipment that is not performing any primary functions but support for the equipment performing the primary function. AuxiliaryEquipment is attached to primary equipment via an association with Terminal. - */ + /** \brief AuxiliaryEquipment describe equipment that is not performing any primary functions but support for the equipment performing the primary function. AuxiliaryEquipment is attached to primary equipment via an association with Terminal. */ class AuxiliaryEquipment : public Equipment { public: @@ -27,7 +25,8 @@ namespace CIMPP AuxiliaryEquipment(); ~AuxiliaryEquipment() override; - CIMPP::Terminal* Terminal; /* The Terminal at the equipment where the AuxiliaryEquipment is attached. Default: 0 */ + /** \brief The Terminal at the equipment where the AuxiliaryEquipment is attached. Default: 0 */ + CIMPP::Terminal* Terminal; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/BaseVoltage.cpp b/CGMES_3.0.0/BaseVoltage.cpp index 9900f5b88..b772d9a60 100644 --- a/CGMES_3.0.0/BaseVoltage.cpp +++ b/CGMES_3.0.0/BaseVoltage.cpp @@ -12,12 +12,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "TopologicalNode.hpp" #include "TransformerEnd.hpp" #include "VoltageLevel.hpp" -#include "Voltage.hpp" using namespace CIMPP; -BaseVoltage::BaseVoltage() {}; -BaseVoltage::~BaseVoltage() {}; +BaseVoltage::BaseVoltage() {} +BaseVoltage::~BaseVoltage() {} static const std::list PossibleProfilesForClass = { @@ -50,21 +49,6 @@ BaseVoltage::getPossibleProfilesForAttributes() const return map; } - -bool assign_BaseVoltage_nominalVoltage(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (BaseVoltage* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->nominalVoltage; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ConductingEquipment_BaseVoltage(BaseClass*, BaseClass*); bool assign_BaseVoltage_ConductingEquipment(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -81,6 +65,7 @@ bool assign_BaseVoltage_ConductingEquipment(BaseClass* BaseClass_ptr1, BaseClass } return false; } + bool assign_TopologicalNode_BaseVoltage(BaseClass*, BaseClass*); bool assign_BaseVoltage_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -97,6 +82,7 @@ bool assign_BaseVoltage_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* Ba } return false; } + bool assign_TransformerEnd_BaseVoltage(BaseClass*, BaseClass*); bool assign_BaseVoltage_TransformerEnds(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -113,6 +99,7 @@ bool assign_BaseVoltage_TransformerEnds(BaseClass* BaseClass_ptr1, BaseClass* Ba } return false; } + bool assign_VoltageLevel_BaseVoltage(BaseClass*, BaseClass*); bool assign_BaseVoltage_VoltageLevel(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -130,9 +117,28 @@ bool assign_BaseVoltage_VoltageLevel(BaseClass* BaseClass_ptr1, BaseClass* BaseC return false; } +bool assign_BaseVoltage_nominalVoltage(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + BaseVoltage* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->nominalVoltage; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + + + + bool get_BaseVoltage_nominalVoltage(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const BaseVoltage* element = dynamic_cast(BaseClass_ptr1)) + const BaseVoltage* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nominalVoltage; if (!buffer.str().empty()) @@ -144,8 +150,6 @@ bool get_BaseVoltage_nominalVoltage(const BaseClass* BaseClass_ptr1, std::string return false; } - - const char BaseVoltage::debugName[] = "BaseVoltage"; const char* BaseVoltage::debugString() const { @@ -154,20 +158,20 @@ const char* BaseVoltage::debugString() const void BaseVoltage::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:BaseVoltage"), &BaseVoltage_factory)); + factory_map.emplace("cim:BaseVoltage", &BaseVoltage_factory); } void BaseVoltage::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:BaseVoltage.nominalVoltage"), &assign_BaseVoltage_nominalVoltage)); + assign_map.emplace("cim:BaseVoltage.nominalVoltage", &assign_BaseVoltage_nominalVoltage); } void BaseVoltage::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:BaseVoltage.ConductingEquipment"), &assign_BaseVoltage_ConductingEquipment)); - assign_map.insert(std::make_pair(std::string("cim:BaseVoltage.TopologicalNode"), &assign_BaseVoltage_TopologicalNode)); - assign_map.insert(std::make_pair(std::string("cim:BaseVoltage.TransformerEnds"), &assign_BaseVoltage_TransformerEnds)); - assign_map.insert(std::make_pair(std::string("cim:BaseVoltage.VoltageLevel"), &assign_BaseVoltage_VoltageLevel)); + assign_map.emplace("cim:BaseVoltage.ConductingEquipment", &assign_BaseVoltage_ConductingEquipment); + assign_map.emplace("cim:BaseVoltage.TopologicalNode", &assign_BaseVoltage_TopologicalNode); + assign_map.emplace("cim:BaseVoltage.TransformerEnds", &assign_BaseVoltage_TransformerEnds); + assign_map.emplace("cim:BaseVoltage.VoltageLevel", &assign_BaseVoltage_VoltageLevel); } void BaseVoltage::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/BaseVoltage.hpp b/CGMES_3.0.0/BaseVoltage.hpp index 93e974871..1cc73887e 100644 --- a/CGMES_3.0.0/BaseVoltage.hpp +++ b/CGMES_3.0.0/BaseVoltage.hpp @@ -21,9 +21,7 @@ namespace CIMPP class TransformerEnd; class VoltageLevel; - /* - Defines a system base voltage which is referenced. - */ + /** \brief Defines a system base voltage which is referenced. */ class BaseVoltage : public IdentifiedObject { public: @@ -31,11 +29,20 @@ namespace CIMPP BaseVoltage(); ~BaseVoltage() override; - std::list ConductingEquipment; /* All conducting equipment with this base voltage. Use only when there is no voltage level container used and only one base voltage applies. For example, not used for transformers. Default: 0 */ - std::list TopologicalNode; /* The topological nodes at the base voltage. Default: 0 */ - std::list TransformerEnds; /* Transformer ends at the base voltage. This is essential for PU calculation. Default: 0 */ - std::list VoltageLevel; /* The voltage levels having this base voltage. Default: 0 */ - CIMPP::Voltage nominalVoltage; /* The power system resource`s base voltage. Shall be a positive value and not zero. Default: nullptr */ + /** \brief All conducting equipment with this base voltage. Use only when there is no voltage level container used and only one base voltage applies. For example, not used for transformers. Default: 0 */ + std::list ConductingEquipment; + + /** \brief The topological nodes at the base voltage. Default: 0 */ + std::list TopologicalNode; + + /** \brief Transformer ends at the base voltage. This is essential for PU calculation. Default: 0 */ + std::list TransformerEnds; + + /** \brief The voltage levels having this base voltage. Default: 0 */ + std::list VoltageLevel; + + /** \brief The power system resource`s base voltage. Shall be a positive value and not zero. Default: nullptr */ + CIMPP::Voltage nominalVoltage; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/BasicIntervalSchedule.cpp b/CGMES_3.0.0/BasicIntervalSchedule.cpp index 876fcee65..2daa4c674 100644 --- a/CGMES_3.0.0/BasicIntervalSchedule.cpp +++ b/CGMES_3.0.0/BasicIntervalSchedule.cpp @@ -8,14 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "DateTime.hpp" -#include "UnitSymbol.hpp" -#include "UnitSymbol.hpp" using namespace CIMPP; -BasicIntervalSchedule::BasicIntervalSchedule() {}; -BasicIntervalSchedule::~BasicIntervalSchedule() {}; +BasicIntervalSchedule::BasicIntervalSchedule() {} +BasicIntervalSchedule::~BasicIntervalSchedule() {} static const std::list PossibleProfilesForClass = { @@ -44,51 +41,52 @@ BasicIntervalSchedule::getPossibleProfilesForAttributes() const return map; } - -bool assign_BasicIntervalSchedule_startTime(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_BasicIntervalSchedule_startTime(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->startTime = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_BasicIntervalSchedule_value1Unit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_BasicIntervalSchedule_value1Unit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->value1Unit; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_BasicIntervalSchedule_value2Unit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_BasicIntervalSchedule_value2Unit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->value2Unit; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_BasicIntervalSchedule_startTime(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + const BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->startTime; if (!buffer.str().empty()) @@ -100,11 +98,10 @@ bool get_BasicIntervalSchedule_startTime(const BaseClass* BaseClass_ptr1, std::s return false; } - - bool get_BasicIntervalSchedule_value1Unit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + const BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value1Unit; if (!buffer.str().empty()) @@ -118,7 +115,8 @@ bool get_BasicIntervalSchedule_value1Unit(const BaseClass* BaseClass_ptr1, std:: bool get_BasicIntervalSchedule_value2Unit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + const BasicIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value2Unit; if (!buffer.str().empty()) @@ -138,14 +136,14 @@ const char* BasicIntervalSchedule::debugString() const void BasicIntervalSchedule::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:BasicIntervalSchedule"), &BasicIntervalSchedule_factory)); + factory_map.emplace("cim:BasicIntervalSchedule", &BasicIntervalSchedule_factory); } void BasicIntervalSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:BasicIntervalSchedule.startTime"), &assign_BasicIntervalSchedule_startTime)); - assign_map.insert(std::make_pair(std::string("cim:BasicIntervalSchedule.value1Unit"), &assign_BasicIntervalSchedule_value1Unit)); - assign_map.insert(std::make_pair(std::string("cim:BasicIntervalSchedule.value2Unit"), &assign_BasicIntervalSchedule_value2Unit)); + assign_map.emplace("cim:BasicIntervalSchedule.startTime", &assign_BasicIntervalSchedule_startTime); + assign_map.emplace("cim:BasicIntervalSchedule.value1Unit", &assign_BasicIntervalSchedule_value1Unit); + assign_map.emplace("cim:BasicIntervalSchedule.value2Unit", &assign_BasicIntervalSchedule_value2Unit); } void BasicIntervalSchedule::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/BasicIntervalSchedule.hpp b/CGMES_3.0.0/BasicIntervalSchedule.hpp index 0e057bb25..a11e4b0b6 100644 --- a/CGMES_3.0.0/BasicIntervalSchedule.hpp +++ b/CGMES_3.0.0/BasicIntervalSchedule.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Schedule of values at points in time. - */ + /** \brief Schedule of values at points in time. */ class BasicIntervalSchedule : public IdentifiedObject { public: @@ -28,9 +26,14 @@ namespace CIMPP BasicIntervalSchedule(); ~BasicIntervalSchedule() override; - CIMPP::DateTime startTime; /* The time for the first time point. The value can be a time of day, not a specific date. Default: '' */ - CIMPP::UnitSymbol value1Unit; /* Value1 units of measure. Default: 0 */ - CIMPP::UnitSymbol value2Unit; /* Value2 units of measure. Default: 0 */ + /** \brief The time for the first time point. The value can be a time of day, not a specific date. Default: '' */ + CIMPP::DateTime startTime; + + /** \brief Value1 units of measure. Default: 0 */ + CIMPP::UnitSymbol value1Unit; + + /** \brief Value2 units of measure. Default: 0 */ + CIMPP::UnitSymbol value2Unit; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/BatteryStateKind.cpp b/CGMES_3.0.0/BatteryStateKind.cpp index 2ec96ea87..7b5e5b590 100644 --- a/CGMES_3.0.0/BatteryStateKind.cpp +++ b/CGMES_3.0.0/BatteryStateKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "BatteryStateKind") + if (EnumSymbol.substr(0, pos) != "BatteryStateKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,27 +50,27 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "discharging") + if (EnumSymbol == "discharging") { rop = BatteryStateKind::discharging; return lop; } - if(EnumSymbol == "full") + if (EnumSymbol == "full") { rop = BatteryStateKind::full; return lop; } - if(EnumSymbol == "waiting") + if (EnumSymbol == "waiting") { rop = BatteryStateKind::waiting; return lop; } - if(EnumSymbol == "charging") + if (EnumSymbol == "charging") { rop = BatteryStateKind::charging; return lop; } - if(EnumSymbol == "empty") + if (EnumSymbol == "empty") { rop = BatteryStateKind::empty; return lop; diff --git a/CGMES_3.0.0/BatteryStateKind.hpp b/CGMES_3.0.0/BatteryStateKind.hpp index ba3f22d4f..291dadbcd 100644 --- a/CGMES_3.0.0/BatteryStateKind.hpp +++ b/CGMES_3.0.0/BatteryStateKind.hpp @@ -9,33 +9,21 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The state of the battery unit. - */ + /** \brief The state of the battery unit. */ class BatteryStateKind { public: enum BatteryStateKind_ENUM { - /** - * Stored energy is decreasing. - */ + /** Stored energy is decreasing. */ discharging, - /** - * Unable to charge, and not discharging. - */ + /** Unable to charge, and not discharging. */ full, - /** - * Neither charging nor discharging, but able to do so. - */ + /** Neither charging nor discharging, but able to do so. */ waiting, - /** - * Stored energy is increasing. - */ + /** Stored energy is increasing. */ charging, - /** - * Unable to discharge, and not charging. - */ + /** Unable to discharge, and not charging. */ empty, }; diff --git a/CGMES_3.0.0/BatteryUnit.cpp b/CGMES_3.0.0/BatteryUnit.cpp index 6008051ff..06255ee27 100644 --- a/CGMES_3.0.0/BatteryUnit.cpp +++ b/CGMES_3.0.0/BatteryUnit.cpp @@ -8,14 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "BatteryStateKind.hpp" -#include "RealEnergy.hpp" -#include "RealEnergy.hpp" using namespace CIMPP; -BatteryUnit::BatteryUnit() {}; -BatteryUnit::~BatteryUnit() {}; +BatteryUnit::BatteryUnit() {} +BatteryUnit::~BatteryUnit() {} static const std::list PossibleProfilesForClass = { @@ -45,53 +42,54 @@ BatteryUnit::getPossibleProfilesForAttributes() const return map; } - -bool assign_BatteryUnit_batteryState(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_BatteryUnit_batteryState(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (BatteryUnit* element = dynamic_cast(BaseClass_ptr1)) + BatteryUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->batteryState; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_BatteryUnit_ratedE(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_BatteryUnit_ratedE(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (BatteryUnit* element = dynamic_cast(BaseClass_ptr1)) + BatteryUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedE; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_BatteryUnit_storedE(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_BatteryUnit_storedE(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (BatteryUnit* element = dynamic_cast(BaseClass_ptr1)) + BatteryUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->storedE; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - -bool get_BatteryUnit_ratedE(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_BatteryUnit_batteryState(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const BatteryUnit* element = dynamic_cast(BaseClass_ptr1)) + const BatteryUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->ratedE; + buffer << element->batteryState; if (!buffer.str().empty()) { return true; @@ -101,11 +99,12 @@ bool get_BatteryUnit_ratedE(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } -bool get_BatteryUnit_storedE(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_BatteryUnit_ratedE(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const BatteryUnit* element = dynamic_cast(BaseClass_ptr1)) + const BatteryUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->storedE; + buffer << element->ratedE; if (!buffer.str().empty()) { return true; @@ -115,13 +114,12 @@ bool get_BatteryUnit_storedE(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - -bool get_BatteryUnit_batteryState(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_BatteryUnit_storedE(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const BatteryUnit* element = dynamic_cast(BaseClass_ptr1)) + const BatteryUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->batteryState; + buffer << element->storedE; if (!buffer.str().empty()) { return true; @@ -139,14 +137,14 @@ const char* BatteryUnit::debugString() const void BatteryUnit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:BatteryUnit"), &BatteryUnit_factory)); + factory_map.emplace("cim:BatteryUnit", &BatteryUnit_factory); } void BatteryUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:BatteryUnit.batteryState"), &assign_BatteryUnit_batteryState)); - assign_map.insert(std::make_pair(std::string("cim:BatteryUnit.ratedE"), &assign_BatteryUnit_ratedE)); - assign_map.insert(std::make_pair(std::string("cim:BatteryUnit.storedE"), &assign_BatteryUnit_storedE)); + assign_map.emplace("cim:BatteryUnit.batteryState", &assign_BatteryUnit_batteryState); + assign_map.emplace("cim:BatteryUnit.ratedE", &assign_BatteryUnit_ratedE); + assign_map.emplace("cim:BatteryUnit.storedE", &assign_BatteryUnit_storedE); } void BatteryUnit::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/BatteryUnit.hpp b/CGMES_3.0.0/BatteryUnit.hpp index 509a71061..8ef3fb527 100644 --- a/CGMES_3.0.0/BatteryUnit.hpp +++ b/CGMES_3.0.0/BatteryUnit.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - An electrochemical energy storage device. - */ + /** \brief An electrochemical energy storage device. */ class BatteryUnit : public PowerElectronicsUnit { public: @@ -28,9 +26,14 @@ namespace CIMPP BatteryUnit(); ~BatteryUnit() override; - CIMPP::BatteryStateKind batteryState; /* The current state of the battery (charging, full, etc.). Default: 0 */ - CIMPP::RealEnergy ratedE; /* Full energy storage capacity of the battery. The attribute shall be a positive value. Default: nullptr */ - CIMPP::RealEnergy storedE; /* Amount of energy currently stored. The attribute shall be a positive value or zero and lower than BatteryUnit.ratedE. Default: nullptr */ + /** \brief The current state of the battery (charging, full, etc.). Default: 0 */ + CIMPP::BatteryStateKind batteryState; + + /** \brief Full energy storage capacity of the battery. The attribute shall be a positive value. Default: nullptr */ + CIMPP::RealEnergy ratedE; + + /** \brief Amount of energy currently stored. The attribute shall be a positive value or zero and lower than BatteryUnit.ratedE. Default: nullptr */ + CIMPP::RealEnergy storedE; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Bay.cpp b/CGMES_3.0.0/Bay.cpp index e43154e97..b14257a28 100644 --- a/CGMES_3.0.0/Bay.cpp +++ b/CGMES_3.0.0/Bay.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Bay::Bay() : VoltageLevel(nullptr) {}; -Bay::~Bay() {}; +Bay::Bay() : VoltageLevel(nullptr) {} +Bay::~Bay() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ Bay::getPossibleProfilesForAttributes() const return map; } - - bool assign_VoltageLevel_Bays(BaseClass*, BaseClass*); bool assign_Bay_VoltageLevel(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,10 +58,10 @@ bool assign_Bay_VoltageLevel(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr return false; } - bool get_Bay_VoltageLevel(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Bay* element = dynamic_cast(BaseClass_ptr1)) + const Bay* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->VoltageLevel != 0) { @@ -74,7 +72,6 @@ bool get_Bay_VoltageLevel(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Bay"), &Bay_factory)); + factory_map.emplace("cim:Bay", &Bay_factory); } void Bay::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -92,7 +89,7 @@ void Bay::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Bay.VoltageLevel"), &assign_Bay_VoltageLevel)); + assign_map.emplace("cim:Bay.VoltageLevel", &assign_Bay_VoltageLevel); } void Bay::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/Bay.hpp b/CGMES_3.0.0/Bay.hpp index b9ff9679a..7d30425e4 100644 --- a/CGMES_3.0.0/Bay.hpp +++ b/CGMES_3.0.0/Bay.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class VoltageLevel; - /* - A collection of power system resources (within a given substation) including conducting equipment, protection relays, measurements, and telemetry. A bay typically represents a physical grouping related to modularization of equipment. - */ + /** \brief A collection of power system resources (within a given substation) including conducting equipment, protection relays, measurements, and telemetry. A bay typically represents a physical grouping related to modularization of equipment. */ class Bay : public EquipmentContainer { public: @@ -27,7 +25,8 @@ namespace CIMPP Bay(); ~Bay() override; - CIMPP::VoltageLevel* VoltageLevel; /* The voltage level containing this bay. Default: 0 */ + /** \brief The voltage level containing this bay. Default: 0 */ + CIMPP::VoltageLevel* VoltageLevel; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/BoundaryPoint.cpp b/CGMES_3.0.0/BoundaryPoint.cpp index b5dc551b8..c251d2bfd 100644 --- a/CGMES_3.0.0/BoundaryPoint.cpp +++ b/CGMES_3.0.0/BoundaryPoint.cpp @@ -9,19 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ConnectivityNode.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -BoundaryPoint::BoundaryPoint() : ConnectivityNode(nullptr) {}; -BoundaryPoint::~BoundaryPoint() {}; +BoundaryPoint::BoundaryPoint() : ConnectivityNode(nullptr) {} +BoundaryPoint::~BoundaryPoint() {} static const std::list PossibleProfilesForClass = { @@ -57,132 +49,153 @@ BoundaryPoint::getPossibleProfilesForAttributes() const return map; } +bool assign_ConnectivityNode_BoundaryPoint(BaseClass*, BaseClass*); +bool assign_BoundaryPoint_ConnectivityNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + BoundaryPoint* element = dynamic_cast(BaseClass_ptr1); + ConnectivityNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ConnectivityNode != element2) + { + element->ConnectivityNode = element2; + return assign_ConnectivityNode_BoundaryPoint(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_BoundaryPoint_fromEndIsoCode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_BoundaryPoint_fromEndIsoCode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (BoundaryPoint* element = dynamic_cast(BaseClass_ptr1)) + BoundaryPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->fromEndIsoCode = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_BoundaryPoint_fromEndName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_BoundaryPoint_fromEndName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (BoundaryPoint* element = dynamic_cast(BaseClass_ptr1)) + BoundaryPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->fromEndName = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_BoundaryPoint_fromEndNameTso(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_BoundaryPoint_fromEndNameTso(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (BoundaryPoint* element = dynamic_cast(BaseClass_ptr1)) + BoundaryPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->fromEndNameTso = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_BoundaryPoint_isDirectCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_BoundaryPoint_isDirectCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (BoundaryPoint* element = dynamic_cast(BaseClass_ptr1)) + BoundaryPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->isDirectCurrent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_BoundaryPoint_isExcludedFromAreaInterchange(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_BoundaryPoint_isExcludedFromAreaInterchange(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (BoundaryPoint* element = dynamic_cast(BaseClass_ptr1)) + BoundaryPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->isExcludedFromAreaInterchange; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_BoundaryPoint_toEndIsoCode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_BoundaryPoint_toEndIsoCode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (BoundaryPoint* element = dynamic_cast(BaseClass_ptr1)) + BoundaryPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->toEndIsoCode = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_BoundaryPoint_toEndName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_BoundaryPoint_toEndName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (BoundaryPoint* element = dynamic_cast(BaseClass_ptr1)) + BoundaryPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->toEndName = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_BoundaryPoint_toEndNameTso(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_BoundaryPoint_toEndNameTso(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (BoundaryPoint* element = dynamic_cast(BaseClass_ptr1)) + BoundaryPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->toEndNameTso = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_ConnectivityNode_BoundaryPoint(BaseClass*, BaseClass*); -bool assign_BoundaryPoint_ConnectivityNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_BoundaryPoint_ConnectivityNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - BoundaryPoint* element = dynamic_cast(BaseClass_ptr1); - ConnectivityNode* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const BoundaryPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->ConnectivityNode != element2) + if (element->ConnectivityNode != 0) { - element->ConnectivityNode = element2; - return assign_ConnectivityNode_BoundaryPoint(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->ConnectivityNode); + return true; } - return true; } return false; } bool get_BoundaryPoint_fromEndIsoCode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const BoundaryPoint* element = dynamic_cast(BaseClass_ptr1)) + const BoundaryPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fromEndIsoCode; if (!buffer.str().empty()) @@ -196,7 +209,8 @@ bool get_BoundaryPoint_fromEndIsoCode(const BaseClass* BaseClass_ptr1, std::stri bool get_BoundaryPoint_fromEndName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const BoundaryPoint* element = dynamic_cast(BaseClass_ptr1)) + const BoundaryPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fromEndName; if (!buffer.str().empty()) @@ -210,7 +224,8 @@ bool get_BoundaryPoint_fromEndName(const BaseClass* BaseClass_ptr1, std::strings bool get_BoundaryPoint_fromEndNameTso(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const BoundaryPoint* element = dynamic_cast(BaseClass_ptr1)) + const BoundaryPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fromEndNameTso; if (!buffer.str().empty()) @@ -224,7 +239,8 @@ bool get_BoundaryPoint_fromEndNameTso(const BaseClass* BaseClass_ptr1, std::stri bool get_BoundaryPoint_isDirectCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const BoundaryPoint* element = dynamic_cast(BaseClass_ptr1)) + const BoundaryPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->isDirectCurrent; if (!buffer.str().empty()) @@ -238,7 +254,8 @@ bool get_BoundaryPoint_isDirectCurrent(const BaseClass* BaseClass_ptr1, std::str bool get_BoundaryPoint_isExcludedFromAreaInterchange(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const BoundaryPoint* element = dynamic_cast(BaseClass_ptr1)) + const BoundaryPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->isExcludedFromAreaInterchange; if (!buffer.str().empty()) @@ -252,7 +269,8 @@ bool get_BoundaryPoint_isExcludedFromAreaInterchange(const BaseClass* BaseClass_ bool get_BoundaryPoint_toEndIsoCode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const BoundaryPoint* element = dynamic_cast(BaseClass_ptr1)) + const BoundaryPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->toEndIsoCode; if (!buffer.str().empty()) @@ -266,7 +284,8 @@ bool get_BoundaryPoint_toEndIsoCode(const BaseClass* BaseClass_ptr1, std::string bool get_BoundaryPoint_toEndName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const BoundaryPoint* element = dynamic_cast(BaseClass_ptr1)) + const BoundaryPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->toEndName; if (!buffer.str().empty()) @@ -280,7 +299,8 @@ bool get_BoundaryPoint_toEndName(const BaseClass* BaseClass_ptr1, std::stringstr bool get_BoundaryPoint_toEndNameTso(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const BoundaryPoint* element = dynamic_cast(BaseClass_ptr1)) + const BoundaryPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->toEndNameTso; if (!buffer.str().empty()) @@ -292,21 +312,6 @@ bool get_BoundaryPoint_toEndNameTso(const BaseClass* BaseClass_ptr1, std::string return false; } - -bool get_BoundaryPoint_ConnectivityNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const BoundaryPoint* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->ConnectivityNode != 0) - { - BaseClass_list.push_back(element->ConnectivityNode); - return true; - } - } - return false; -} - - const char BoundaryPoint::debugName[] = "BoundaryPoint"; const char* BoundaryPoint::debugString() const { @@ -315,24 +320,24 @@ const char* BoundaryPoint::debugString() const void BoundaryPoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:BoundaryPoint"), &BoundaryPoint_factory)); + factory_map.emplace("cim:BoundaryPoint", &BoundaryPoint_factory); } void BoundaryPoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:BoundaryPoint.fromEndIsoCode"), &assign_BoundaryPoint_fromEndIsoCode)); - assign_map.insert(std::make_pair(std::string("cim:BoundaryPoint.fromEndName"), &assign_BoundaryPoint_fromEndName)); - assign_map.insert(std::make_pair(std::string("cim:BoundaryPoint.fromEndNameTso"), &assign_BoundaryPoint_fromEndNameTso)); - assign_map.insert(std::make_pair(std::string("cim:BoundaryPoint.isDirectCurrent"), &assign_BoundaryPoint_isDirectCurrent)); - assign_map.insert(std::make_pair(std::string("cim:BoundaryPoint.isExcludedFromAreaInterchange"), &assign_BoundaryPoint_isExcludedFromAreaInterchange)); - assign_map.insert(std::make_pair(std::string("cim:BoundaryPoint.toEndIsoCode"), &assign_BoundaryPoint_toEndIsoCode)); - assign_map.insert(std::make_pair(std::string("cim:BoundaryPoint.toEndName"), &assign_BoundaryPoint_toEndName)); - assign_map.insert(std::make_pair(std::string("cim:BoundaryPoint.toEndNameTso"), &assign_BoundaryPoint_toEndNameTso)); + assign_map.emplace("cim:BoundaryPoint.fromEndIsoCode", &assign_BoundaryPoint_fromEndIsoCode); + assign_map.emplace("cim:BoundaryPoint.fromEndName", &assign_BoundaryPoint_fromEndName); + assign_map.emplace("cim:BoundaryPoint.fromEndNameTso", &assign_BoundaryPoint_fromEndNameTso); + assign_map.emplace("cim:BoundaryPoint.isDirectCurrent", &assign_BoundaryPoint_isDirectCurrent); + assign_map.emplace("cim:BoundaryPoint.isExcludedFromAreaInterchange", &assign_BoundaryPoint_isExcludedFromAreaInterchange); + assign_map.emplace("cim:BoundaryPoint.toEndIsoCode", &assign_BoundaryPoint_toEndIsoCode); + assign_map.emplace("cim:BoundaryPoint.toEndName", &assign_BoundaryPoint_toEndName); + assign_map.emplace("cim:BoundaryPoint.toEndNameTso", &assign_BoundaryPoint_toEndNameTso); } void BoundaryPoint::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:BoundaryPoint.ConnectivityNode"), &assign_BoundaryPoint_ConnectivityNode)); + assign_map.emplace("cim:BoundaryPoint.ConnectivityNode", &assign_BoundaryPoint_ConnectivityNode); } void BoundaryPoint::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/BoundaryPoint.hpp b/CGMES_3.0.0/BoundaryPoint.hpp index 2ced68ddf..39f795339 100644 --- a/CGMES_3.0.0/BoundaryPoint.hpp +++ b/CGMES_3.0.0/BoundaryPoint.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class ConnectivityNode; - /* - Designates a connection point at which one or more model authority sets shall connect to. The location of the connection point as well as other properties are agreed between organisations responsible for the interconnection, hence all attributes of the class represent this agreement. It is primarily used in a boundary model authority set which can contain one or many BoundaryPoint-s among other Equipment-s and their connections. - */ + /** \brief Designates a connection point at which one or more model authority sets shall connect to. The location of the connection point as well as other properties are agreed between organisations responsible for the interconnection, hence all attributes of the class represent this agreement. It is primarily used in a boundary model authority set which can contain one or many BoundaryPoint-s among other Equipment-s and their connections. */ class BoundaryPoint : public PowerSystemResource { public: @@ -29,15 +27,32 @@ namespace CIMPP BoundaryPoint(); ~BoundaryPoint() override; - CIMPP::ConnectivityNode* ConnectivityNode; /* The connectivity node that is designated as a boundary point. Default: 0 */ - CIMPP::String fromEndIsoCode; /* The ISO code of the region which the `From` side of the Boundary point belongs to or it is connected to. The ISO code is a two-character country code as defined by ISO 3166 (http://www.iso.org/iso/country_codes). The length of the string is 2 characters maximum. Default: '' */ - CIMPP::String fromEndName; /* A human readable name with length of the string 64 characters maximum. It covers the following two cases: -if the Boundary point is placed on a tie-line, it is the name (IdentifiedObject.name) of the substation at which the `From` side of the tie-line is connected to. -if the Boundary point is placed in a substation, it is the name (IdentifiedObject.name) of the element (e.g. PowerTransformer, ACLineSegment, Switch, etc.) at which the `From` side of the Boundary point is connected to. Default: '' */ - CIMPP::String fromEndNameTso; /* Identifies the name of the transmission system operator, distribution system operator or other entity at which the `From` side of the interconnection is connected to. The length of the string is 64 characters maximum. Default: '' */ - CIMPP::Boolean isDirectCurrent; /* If true, this boundary point is a point of common coupling (PCC) of a direct current (DC) interconnection, otherwise the interconnection is AC (default). Default: false */ - CIMPP::Boolean isExcludedFromAreaInterchange; /* If true, this boundary point is on the interconnection that is excluded from control area interchange calculation and consequently has no related tie flows. Otherwise, the interconnection is included in control area interchange and a TieFlow is required at all sides of the boundary point (default). Default: false */ - CIMPP::String toEndIsoCode; /* The ISO code of the region which the `To` side of the Boundary point belongs to or is connected to. The ISO code is a two-character country code as defined by ISO 3166 (http://www.iso.org/iso/country_codes). The length of the string is 2 characters maximum. Default: '' */ - CIMPP::String toEndName; /* A human readable name with length of the string 64 characters maximum. It covers the following two cases: -if the Boundary point is placed on a tie-line, it is the name (IdentifiedObject.name) of the substation at which the `To` side of the tie-line is connected to. -if the Boundary point is placed in a substation, it is the name (IdentifiedObject.name) of the element (e.g. PowerTransformer, ACLineSegment, Switch, etc.) at which the `To` side of the Boundary point is connected to. Default: '' */ - CIMPP::String toEndNameTso; /* Identifies the name of the transmission system operator, distribution system operator or other entity at which the `To` side of the interconnection is connected to. The length of the string is 64 characters maximum. Default: '' */ + /** \brief The connectivity node that is designated as a boundary point. Default: 0 */ + CIMPP::ConnectivityNode* ConnectivityNode; + + /** \brief The ISO code of the region which the `From` side of the Boundary point belongs to or it is connected to. The ISO code is a two-character country code as defined by ISO 3166 (http://www.iso.org/iso/country_codes). The length of the string is 2 characters maximum. Default: '' */ + CIMPP::String fromEndIsoCode; + + /** \brief A human readable name with length of the string 64 characters maximum. It covers the following two cases: -if the Boundary point is placed on a tie-line, it is the name (IdentifiedObject.name) of the substation at which the `From` side of the tie-line is connected to. -if the Boundary point is placed in a substation, it is the name (IdentifiedObject.name) of the element (e.g. PowerTransformer, ACLineSegment, Switch, etc.) at which the `From` side of the Boundary point is connected to. Default: '' */ + CIMPP::String fromEndName; + + /** \brief Identifies the name of the transmission system operator, distribution system operator or other entity at which the `From` side of the interconnection is connected to. The length of the string is 64 characters maximum. Default: '' */ + CIMPP::String fromEndNameTso; + + /** \brief If true, this boundary point is a point of common coupling (PCC) of a direct current (DC) interconnection, otherwise the interconnection is AC (default). Default: false */ + CIMPP::Boolean isDirectCurrent; + + /** \brief If true, this boundary point is on the interconnection that is excluded from control area interchange calculation and consequently has no related tie flows. Otherwise, the interconnection is included in control area interchange and a TieFlow is required at all sides of the boundary point (default). Default: false */ + CIMPP::Boolean isExcludedFromAreaInterchange; + + /** \brief The ISO code of the region which the `To` side of the Boundary point belongs to or is connected to. The ISO code is a two-character country code as defined by ISO 3166 (http://www.iso.org/iso/country_codes). The length of the string is 2 characters maximum. Default: '' */ + CIMPP::String toEndIsoCode; + + /** \brief A human readable name with length of the string 64 characters maximum. It covers the following two cases: -if the Boundary point is placed on a tie-line, it is the name (IdentifiedObject.name) of the substation at which the `To` side of the tie-line is connected to. -if the Boundary point is placed in a substation, it is the name (IdentifiedObject.name) of the element (e.g. PowerTransformer, ACLineSegment, Switch, etc.) at which the `To` side of the Boundary point is connected to. Default: '' */ + CIMPP::String toEndName; + + /** \brief Identifies the name of the transmission system operator, distribution system operator or other entity at which the `To` side of the interconnection is connected to. The length of the string is 64 characters maximum. Default: '' */ + CIMPP::String toEndNameTso; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Breaker.cpp b/CGMES_3.0.0/Breaker.cpp index 88a01ff00..034b1ee93 100644 --- a/CGMES_3.0.0/Breaker.cpp +++ b/CGMES_3.0.0/Breaker.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Breaker::Breaker() {}; -Breaker::~Breaker() {}; +Breaker::Breaker() {} +Breaker::~Breaker() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ Breaker::getPossibleProfilesForAttributes() const return map; } - - - - - const char Breaker::debugName[] = "Breaker"; const char* Breaker::debugString() const { @@ -52,7 +47,7 @@ const char* Breaker::debugString() const void Breaker::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Breaker"), &Breaker_factory)); + factory_map.emplace("cim:Breaker", &Breaker_factory); } void Breaker::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/Breaker.hpp b/CGMES_3.0.0/Breaker.hpp index d760e2518..812da0f56 100644 --- a/CGMES_3.0.0/Breaker.hpp +++ b/CGMES_3.0.0/Breaker.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A mechanical switching device capable of making, carrying, and breaking currents under normal circuit conditions and also making, carrying for a specified time, and breaking currents under specified abnormal circuit conditions e.g. those of short circuit. - */ + /** \brief A mechanical switching device capable of making, carrying, and breaking currents under normal circuit conditions and also making, carrying for a specified time, and breaking currents under specified abnormal circuit conditions e.g. those of short circuit. */ class Breaker : public ProtectedSwitch { public: @@ -26,7 +24,6 @@ namespace CIMPP Breaker(); ~Breaker() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/BusNameMarker.cpp b/CGMES_3.0.0/BusNameMarker.cpp index ed137f2f8..24a10645f 100644 --- a/CGMES_3.0.0/BusNameMarker.cpp +++ b/CGMES_3.0.0/BusNameMarker.cpp @@ -8,14 +8,13 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "ReportingGroup.hpp" #include "ACDCTerminal.hpp" -#include "Integer.hpp" +#include "ReportingGroup.hpp" using namespace CIMPP; -BusNameMarker::BusNameMarker() : ReportingGroup(nullptr) {}; -BusNameMarker::~BusNameMarker() {}; +BusNameMarker::BusNameMarker() : ReportingGroup(nullptr) {} +BusNameMarker::~BusNameMarker() {} static const std::list PossibleProfilesForClass = { @@ -44,21 +43,6 @@ BusNameMarker::getPossibleProfilesForAttributes() const return map; } - -bool assign_BusNameMarker_priority(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (BusNameMarker* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->priority; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ReportingGroup_BusNameMarker(BaseClass*, BaseClass*); bool assign_BusNameMarker_ReportingGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -75,6 +59,7 @@ bool assign_BusNameMarker_ReportingGroup(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_ACDCTerminal_BusNameMarker(BaseClass*, BaseClass*); bool assign_BusNameMarker_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -92,24 +77,24 @@ bool assign_BusNameMarker_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseCla return false; } -bool get_BusNameMarker_priority(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_BusNameMarker_priority(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const BusNameMarker* element = dynamic_cast(BaseClass_ptr1)) + BusNameMarker* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->priority; - if (!buffer.str().empty()) + buffer >> element->priority; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_BusNameMarker_ReportingGroup(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const BusNameMarker* element = dynamic_cast(BaseClass_ptr1)) + const BusNameMarker* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ReportingGroup != 0) { @@ -121,6 +106,21 @@ bool get_BusNameMarker_ReportingGroup(const BaseClass* BaseClass_ptr1, std::list } +bool get_BusNameMarker_priority(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const BusNameMarker* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->priority; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + const char BusNameMarker::debugName[] = "BusNameMarker"; const char* BusNameMarker::debugString() const { @@ -129,18 +129,18 @@ const char* BusNameMarker::debugString() const void BusNameMarker::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:BusNameMarker"), &BusNameMarker_factory)); + factory_map.emplace("cim:BusNameMarker", &BusNameMarker_factory); } void BusNameMarker::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:BusNameMarker.priority"), &assign_BusNameMarker_priority)); + assign_map.emplace("cim:BusNameMarker.priority", &assign_BusNameMarker_priority); } void BusNameMarker::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:BusNameMarker.ReportingGroup"), &assign_BusNameMarker_ReportingGroup)); - assign_map.insert(std::make_pair(std::string("cim:BusNameMarker.Terminal"), &assign_BusNameMarker_Terminal)); + assign_map.emplace("cim:BusNameMarker.ReportingGroup", &assign_BusNameMarker_ReportingGroup); + assign_map.emplace("cim:BusNameMarker.Terminal", &assign_BusNameMarker_Terminal); } void BusNameMarker::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/BusNameMarker.hpp b/CGMES_3.0.0/BusNameMarker.hpp index 8fdf0eda3..5c5d93f69 100644 --- a/CGMES_3.0.0/BusNameMarker.hpp +++ b/CGMES_3.0.0/BusNameMarker.hpp @@ -19,9 +19,7 @@ namespace CIMPP class ACDCTerminal; class ReportingGroup; - /* - Used to apply user standard names to TopologicalNodes. Associated with one or more terminals that are normally connected with the bus name. The associated terminals are normally connected by non-retained switches. For a ring bus station configuration, all BusbarSection terminals in the ring are typically associated. For a breaker and a half scheme, both BusbarSections would normally be associated. For a ring bus, all BusbarSections would normally be associated. For a "straight" busbar configuration, normally only the main terminal at the BusbarSection would be associated. - */ + /** \brief Used to apply user standard names to TopologicalNodes. Associated with one or more terminals that are normally connected with the bus name. The associated terminals are normally connected by non-retained switches. For a ring bus station configuration, all BusbarSection terminals in the ring are typically associated. For a breaker and a half scheme, both BusbarSections would normally be associated. For a ring bus, all BusbarSections would normally be associated. For a "straight" busbar configuration, normally only the main terminal at the BusbarSection would be associated. */ class BusNameMarker : public IdentifiedObject { public: @@ -29,9 +27,14 @@ namespace CIMPP BusNameMarker(); ~BusNameMarker() override; - CIMPP::ReportingGroup* ReportingGroup; /* The reporting group to which this bus name marker belongs. Default: 0 */ - std::list Terminal; /* The terminals associated with this bus name marker. Default: 0 */ - CIMPP::Integer priority; /* Priority of bus name marker for use as topology bus name. Use 0 for do not care. Use 1 for highest priority. Use 2 as priority is less than 1 and so on. Default: 0 */ + /** \brief The reporting group to which this bus name marker belongs. Default: 0 */ + CIMPP::ReportingGroup* ReportingGroup; + + /** \brief The terminals associated with this bus name marker. Default: 0 */ + std::list Terminal; + + /** \brief Priority of bus name marker for use as topology bus name. Use 0 for do not care. Use 1 for highest priority. Use 2 as priority is less than 1 and so on. Default: 0 */ + CIMPP::Integer priority; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/BusbarSection.cpp b/CGMES_3.0.0/BusbarSection.cpp index 5af9bff64..3f2c1be50 100644 --- a/CGMES_3.0.0/BusbarSection.cpp +++ b/CGMES_3.0.0/BusbarSection.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "CurrentFlow.hpp" using namespace CIMPP; -BusbarSection::BusbarSection() {}; -BusbarSection::~BusbarSection() {}; +BusbarSection::BusbarSection() {} +BusbarSection::~BusbarSection() {} static const std::list PossibleProfilesForClass = { @@ -41,25 +40,24 @@ BusbarSection::getPossibleProfilesForAttributes() const return map; } - -bool assign_BusbarSection_ipMax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_BusbarSection_ipMax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (BusbarSection* element = dynamic_cast(BaseClass_ptr1)) + BusbarSection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ipMax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_BusbarSection_ipMax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const BusbarSection* element = dynamic_cast(BaseClass_ptr1)) + const BusbarSection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ipMax; if (!buffer.str().empty()) @@ -71,8 +69,6 @@ bool get_BusbarSection_ipMax(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char BusbarSection::debugName[] = "BusbarSection"; const char* BusbarSection::debugString() const { @@ -81,12 +77,12 @@ const char* BusbarSection::debugString() const void BusbarSection::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:BusbarSection"), &BusbarSection_factory)); + factory_map.emplace("cim:BusbarSection", &BusbarSection_factory); } void BusbarSection::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:BusbarSection.ipMax"), &assign_BusbarSection_ipMax)); + assign_map.emplace("cim:BusbarSection.ipMax", &assign_BusbarSection_ipMax); } void BusbarSection::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/BusbarSection.hpp b/CGMES_3.0.0/BusbarSection.hpp index e08bbf80f..cba2960ad 100644 --- a/CGMES_3.0.0/BusbarSection.hpp +++ b/CGMES_3.0.0/BusbarSection.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A conductor, or group of conductors, with negligible impedance, that serve to connect other conducting equipment within a single substation. Voltage measurements are typically obtained from voltage transformers that are connected to busbar sections. A bus bar section may have many physical terminals but for analysis is modelled with exactly one logical terminal. - */ + /** \brief A conductor, or group of conductors, with negligible impedance, that serve to connect other conducting equipment within a single substation. Voltage measurements are typically obtained from voltage transformers that are connected to busbar sections. A bus bar section may have many physical terminals but for analysis is modelled with exactly one logical terminal. */ class BusbarSection : public Connector { public: @@ -27,7 +25,8 @@ namespace CIMPP BusbarSection(); ~BusbarSection() override; - CIMPP::CurrentFlow ipMax; /* Maximum allowable peak short-circuit current of busbar (Ipmax in IEC 60909-0). Mechanical limit of the busbar in the substation itself. Used for short circuit data exchange according to IEC 60909. Default: nullptr */ + /** \brief Maximum allowable peak short-circuit current of busbar (Ipmax in IEC 60909-0). Mechanical limit of the busbar in the substation itself. Used for short circuit data exchange according to IEC 60909. Default: nullptr */ + CIMPP::CurrentFlow ipMax; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/CAESPlant.cpp b/CGMES_3.0.0/CAESPlant.cpp index 5888cd5dd..170ef195e 100644 --- a/CGMES_3.0.0/CAESPlant.cpp +++ b/CGMES_3.0.0/CAESPlant.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -CAESPlant::CAESPlant() : ThermalGeneratingUnit(nullptr) {}; -CAESPlant::~CAESPlant() {}; +CAESPlant::CAESPlant() : ThermalGeneratingUnit(nullptr) {} +CAESPlant::~CAESPlant() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ CAESPlant::getPossibleProfilesForAttributes() const return map; } - - bool assign_ThermalGeneratingUnit_CAESPlant(BaseClass*, BaseClass*); bool assign_CAESPlant_ThermalGeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_CAESPlant_ThermalGeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass } - const char CAESPlant::debugName[] = "CAESPlant"; const char* CAESPlant::debugString() const { @@ -69,7 +66,7 @@ const char* CAESPlant::debugString() const void CAESPlant::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:CAESPlant"), &CAESPlant_factory)); + factory_map.emplace("cim:CAESPlant", &CAESPlant_factory); } void CAESPlant::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void CAESPlant::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:CAESPlant.ThermalGeneratingUnit"), &assign_CAESPlant_ThermalGeneratingUnit)); + assign_map.emplace("cim:CAESPlant.ThermalGeneratingUnit", &assign_CAESPlant_ThermalGeneratingUnit); } void CAESPlant::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/CAESPlant.hpp b/CGMES_3.0.0/CAESPlant.hpp index bd9be5b3f..4d4550b5f 100644 --- a/CGMES_3.0.0/CAESPlant.hpp +++ b/CGMES_3.0.0/CAESPlant.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class ThermalGeneratingUnit; - /* - Compressed air energy storage plant. - */ + /** \brief Compressed air energy storage plant. */ class CAESPlant : public PowerSystemResource { public: @@ -27,7 +25,8 @@ namespace CIMPP CAESPlant(); ~CAESPlant() override; - CIMPP::ThermalGeneratingUnit* ThermalGeneratingUnit; /* A thermal generating unit may be a member of a compressed air energy storage plant. Default: 0 */ + /** \brief A thermal generating unit may be a member of a compressed air energy storage plant. Default: 0 */ + CIMPP::ThermalGeneratingUnit* ThermalGeneratingUnit; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/CGMESProfile.cpp b/CGMES_3.0.0/CGMESProfile.cpp index 0e62e51b7..608749021 100644 --- a/CGMES_3.0.0/CGMESProfile.cpp +++ b/CGMES_3.0.0/CGMESProfile.cpp @@ -63,8 +63,6 @@ static const std::map> ProfileURIs = { CGMESProfile::TP, { "http://iec.ch/TC57/ns/CIM/Topology-EU/3.0", } }, }; -static const std::string CimNamespace = "http://iec.ch/TC57/CIM100#"; - const std::list& getProfileList() { @@ -130,9 +128,3 @@ getProfileFromLongName(const std::string& name) } return UnknownProfile; } - -std::string -getCimNamespace() -{ - return CimNamespace; -} diff --git a/CGMES_3.0.0/CGMESProfile.hpp b/CGMES_3.0.0/CGMESProfile.hpp index 439c022c4..19dfba736 100644 --- a/CGMES_3.0.0/CGMESProfile.hpp +++ b/CGMES_3.0.0/CGMESProfile.hpp @@ -32,6 +32,4 @@ const std::list& getProfileURIs(CGMESProfile profile); CGMESProfile getProfileFromShortName(const std::string& name); CGMESProfile getProfileFromLongName(const std::string& name); -std::string getCimNamespace(); - -#endif // CGMESPROFILE_HPP +#endif diff --git a/CGMES_3.0.0/CIMClassList.hpp b/CGMES_3.0.0/CIMClassList.hpp index 4d71fe359..ae7dbbee2 100644 --- a/CGMES_3.0.0/CIMClassList.hpp +++ b/CGMES_3.0.0/CIMClassList.hpp @@ -3,9 +3,14 @@ /* Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen */ + #include + +#include "BaseClassDefiner.hpp" #include "IEC61970.hpp" + using namespace CIMPP; + static std::list CIMClassList = { ACDCConverter::declare(), @@ -449,4 +454,4 @@ static std::list CIMClassList = WorkLocation::declare(), UnknownType::declare(), }; -#endif // CIMCLASSLIST_H +#endif diff --git a/CGMES_3.0.0/CSCDynamics.cpp b/CGMES_3.0.0/CSCDynamics.cpp index 8f6ee4f7f..9d5854f9f 100644 --- a/CGMES_3.0.0/CSCDynamics.cpp +++ b/CGMES_3.0.0/CSCDynamics.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -CSCDynamics::CSCDynamics() : CSConverter(nullptr) {}; -CSCDynamics::~CSCDynamics() {}; +CSCDynamics::CSCDynamics() : CSConverter(nullptr) {} +CSCDynamics::~CSCDynamics() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ CSCDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_CsConverter_CSCDynamics(BaseClass*, BaseClass*); bool assign_CSCDynamics_CSConverter(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_CSCDynamics_CSConverter(BaseClass* BaseClass_ptr1, BaseClass* BaseCl return false; } - bool get_CSCDynamics_CSConverter(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const CSCDynamics* element = dynamic_cast(BaseClass_ptr1)) + const CSCDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->CSConverter != 0) { @@ -73,7 +71,6 @@ bool get_CSCDynamics_CSConverter(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:CSCDynamics"), &CSCDynamics_factory)); + factory_map.emplace("cim:CSCDynamics", &CSCDynamics_factory); } void CSCDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void CSCDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:CSCDynamics.CSConverter"), &assign_CSCDynamics_CSConverter)); + assign_map.emplace("cim:CSCDynamics.CSConverter", &assign_CSCDynamics_CSConverter); } void CSCDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/CSCDynamics.hpp b/CGMES_3.0.0/CSCDynamics.hpp index 63fc693ff..d5ada410a 100644 --- a/CGMES_3.0.0/CSCDynamics.hpp +++ b/CGMES_3.0.0/CSCDynamics.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class CsConverter; - /* - CSC function block whose behaviour is described by reference to a standard model or by definition of a user-defined model. - */ + /** \brief CSC function block whose behaviour is described by reference to a standard model or by definition of a user-defined model. */ class CSCDynamics : public HVDCDynamics { public: @@ -27,7 +25,8 @@ namespace CIMPP CSCDynamics(); ~CSCDynamics() override; - CIMPP::CsConverter* CSConverter; /* Current source converter to which current source converter dynamics model applies. Default: 0 */ + /** \brief Current source converter to which current source converter dynamics model applies. Default: 0 */ + CIMPP::CsConverter* CSConverter; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/CSCUserDefined.cpp b/CGMES_3.0.0/CSCUserDefined.cpp index 0764b907d..7682b7c8e 100644 --- a/CGMES_3.0.0/CSCUserDefined.cpp +++ b/CGMES_3.0.0/CSCUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -CSCUserDefined::CSCUserDefined() {}; -CSCUserDefined::~CSCUserDefined() {}; +CSCUserDefined::CSCUserDefined() {} +CSCUserDefined::~CSCUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ CSCUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_CSCUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (CSCUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_CSCUserDefined(BaseClass*, BaseClass*); bool assign_CSCUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_CSCUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr return false; } +bool assign_CSCUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + CSCUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_CSCUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CSCUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const CSCUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_CSCUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::string return false; } - - const char CSCUserDefined::debugName[] = "CSCUserDefined"; const char* CSCUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* CSCUserDefined::debugString() const void CSCUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:CSCUserDefined"), &CSCUserDefined_factory)); + factory_map.emplace("cim:CSCUserDefined", &CSCUserDefined_factory); } void CSCUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:CSCUserDefined.proprietary"), &assign_CSCUserDefined_proprietary)); + assign_map.emplace("cim:CSCUserDefined.proprietary", &assign_CSCUserDefined_proprietary); } void CSCUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:CSCUserDefined.ProprietaryParameterDynamics"), &assign_CSCUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:CSCUserDefined.ProprietaryParameterDynamics", &assign_CSCUserDefined_ProprietaryParameterDynamics); } void CSCUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/CSCUserDefined.hpp b/CGMES_3.0.0/CSCUserDefined.hpp index 100da0e25..07ac6fb08 100644 --- a/CGMES_3.0.0/CSCUserDefined.hpp +++ b/CGMES_3.0.0/CSCUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Current source converter (CSC) function block whose dynamic behaviour is described by a user-defined model. - */ + /** \brief Current source converter (CSC) function block whose dynamic behaviour is described by a user-defined model. */ class CSCUserDefined : public CSCDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP CSCUserDefined(); ~CSCUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Capacitance.hpp b/CGMES_3.0.0/Capacitance.hpp index 0f2f8bad2..f08217712 100644 --- a/CGMES_3.0.0/Capacitance.hpp +++ b/CGMES_3.0.0/Capacitance.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Capacitive part of reactance (imaginary part of impedance), at rated frequency. - */ + /** \brief Capacitive part of reactance (imaginary part of impedance), at rated frequency. */ class Capacitance { public: diff --git a/CGMES_3.0.0/CimConstants.cpp b/CGMES_3.0.0/CimConstants.cpp new file mode 100644 index 000000000..50ec23e22 --- /dev/null +++ b/CGMES_3.0.0/CimConstants.cpp @@ -0,0 +1,14 @@ +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ +#include "CimConstants.hpp" + +const std::string CimVersion = "cgmes_v3_0_0"; + +const std::map NamespaceMap = +{ + { "cim", "http://iec.ch/TC57/CIM100#" }, + { "eu", "http://iec.ch/TC57/CIM100-European#" }, + { "md", "http://iec.ch/TC57/61970-552/ModelDescription/1#" }, + { "rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#" }, +}; diff --git a/CGMES_3.0.0/CimConstants.hpp b/CGMES_3.0.0/CimConstants.hpp new file mode 100644 index 000000000..124197842 --- /dev/null +++ b/CGMES_3.0.0/CimConstants.hpp @@ -0,0 +1,16 @@ +#ifndef CIM_CONSTANTS_HPP +#define CIM_CONSTANTS_HPP +/* +Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen +*/ + +#include +#include + +/** \brief CIM version string. */ +extern const std::string CimVersion; + +/** \brief Default namespaces used by CGMES. Map of namespace key to URL. */ +extern const std::map NamespaceMap; + +#endif diff --git a/CGMES_3.0.0/Clamp.cpp b/CGMES_3.0.0/Clamp.cpp index 25f9cd055..b2375226c 100644 --- a/CGMES_3.0.0/Clamp.cpp +++ b/CGMES_3.0.0/Clamp.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ACLineSegment.hpp" -#include "Length.hpp" using namespace CIMPP; -Clamp::Clamp() : ACLineSegment(nullptr) {}; -Clamp::~Clamp() {}; +Clamp::Clamp() : ACLineSegment(nullptr) {} +Clamp::~Clamp() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ Clamp::getPossibleProfilesForAttributes() const return map; } - -bool assign_Clamp_lengthFromTerminal1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (Clamp* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->lengthFromTerminal1; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ACLineSegment_Clamp(BaseClass*, BaseClass*); bool assign_Clamp_ACLineSegment(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_Clamp_ACLineSegment(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ return false; } -bool get_Clamp_lengthFromTerminal1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_Clamp_lengthFromTerminal1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const Clamp* element = dynamic_cast(BaseClass_ptr1)) + Clamp* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->lengthFromTerminal1; - if (!buffer.str().empty()) + buffer >> element->lengthFromTerminal1; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_Clamp_ACLineSegment(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Clamp* element = dynamic_cast(BaseClass_ptr1)) + const Clamp* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ACLineSegment != 0) { @@ -102,6 +86,20 @@ bool get_Clamp_ACLineSegment(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->lengthFromTerminal1; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char Clamp::debugName[] = "Clamp"; const char* Clamp::debugString() const @@ -111,17 +109,17 @@ const char* Clamp::debugString() const void Clamp::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Clamp"), &Clamp_factory)); + factory_map.emplace("cim:Clamp", &Clamp_factory); } void Clamp::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Clamp.lengthFromTerminal1"), &assign_Clamp_lengthFromTerminal1)); + assign_map.emplace("cim:Clamp.lengthFromTerminal1", &assign_Clamp_lengthFromTerminal1); } void Clamp::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Clamp.ACLineSegment"), &assign_Clamp_ACLineSegment)); + assign_map.emplace("cim:Clamp.ACLineSegment", &assign_Clamp_ACLineSegment); } void Clamp::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/Clamp.hpp b/CGMES_3.0.0/Clamp.hpp index ec13b2a67..b36efb6cf 100644 --- a/CGMES_3.0.0/Clamp.hpp +++ b/CGMES_3.0.0/Clamp.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ACLineSegment; - /* - A Clamp is a galvanic connection at a line segment where other equipment is connected. A Clamp does not cut the line segment. A Clamp is ConductingEquipment and has one Terminal with an associated ConnectivityNode. Any other ConductingEquipment can be connected to the Clamp ConnectivityNode. - */ + /** \brief A Clamp is a galvanic connection at a line segment where other equipment is connected. A Clamp does not cut the line segment. A Clamp is ConductingEquipment and has one Terminal with an associated ConnectivityNode. Any other ConductingEquipment can be connected to the Clamp ConnectivityNode. */ class Clamp : public ConductingEquipment { public: @@ -28,8 +26,11 @@ namespace CIMPP Clamp(); ~Clamp() override; - CIMPP::ACLineSegment* ACLineSegment; /* The line segment to which the clamp is connected. Default: 0 */ - CIMPP::Length lengthFromTerminal1; /* The length to the place where the clamp is located starting from side one of the line segment, i.e. the line segment terminal with sequence number equal to 1. Default: nullptr */ + /** \brief The line segment to which the clamp is connected. Default: 0 */ + CIMPP::ACLineSegment* ACLineSegment; + + /** \brief The length to the place where the clamp is located starting from side one of the line segment, i.e. the line segment terminal with sequence number equal to 1. Default: nullptr */ + CIMPP::Length lengthFromTerminal1; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/CogenerationPlant.cpp b/CGMES_3.0.0/CogenerationPlant.cpp index 11fe01802..b7cdcd03c 100644 --- a/CGMES_3.0.0/CogenerationPlant.cpp +++ b/CGMES_3.0.0/CogenerationPlant.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -CogenerationPlant::CogenerationPlant() {}; -CogenerationPlant::~CogenerationPlant() {}; +CogenerationPlant::CogenerationPlant() {} +CogenerationPlant::~CogenerationPlant() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ CogenerationPlant::getPossibleProfilesForAttributes() const return map; } - - bool assign_ThermalGeneratingUnit_CogenerationPlant(BaseClass*, BaseClass*); bool assign_CogenerationPlant_ThermalGeneratingUnits(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_CogenerationPlant_ThermalGeneratingUnits(BaseClass* BaseClass_ptr1, } - const char CogenerationPlant::debugName[] = "CogenerationPlant"; const char* CogenerationPlant::debugString() const { @@ -69,7 +66,7 @@ const char* CogenerationPlant::debugString() const void CogenerationPlant::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:CogenerationPlant"), &CogenerationPlant_factory)); + factory_map.emplace("cim:CogenerationPlant", &CogenerationPlant_factory); } void CogenerationPlant::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void CogenerationPlant::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:CogenerationPlant.ThermalGeneratingUnits"), &assign_CogenerationPlant_ThermalGeneratingUnits)); + assign_map.emplace("cim:CogenerationPlant.ThermalGeneratingUnits", &assign_CogenerationPlant_ThermalGeneratingUnits); } void CogenerationPlant::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/CogenerationPlant.hpp b/CGMES_3.0.0/CogenerationPlant.hpp index 7eb6ad990..b91bd5f88 100644 --- a/CGMES_3.0.0/CogenerationPlant.hpp +++ b/CGMES_3.0.0/CogenerationPlant.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class ThermalGeneratingUnit; - /* - A set of thermal generating units for the production of electrical energy and process steam (usually from the output of the steam turbines). The steam sendout is typically used for industrial purposes or for municipal heating and cooling. - */ + /** \brief A set of thermal generating units for the production of electrical energy and process steam (usually from the output of the steam turbines). The steam sendout is typically used for industrial purposes or for municipal heating and cooling. */ class CogenerationPlant : public PowerSystemResource { public: @@ -27,7 +25,8 @@ namespace CIMPP CogenerationPlant(); ~CogenerationPlant() override; - std::list ThermalGeneratingUnits; /* A thermal generating unit may be a member of a cogeneration plant. Default: 0 */ + /** \brief A thermal generating unit may be a member of a cogeneration plant. Default: 0 */ + std::list ThermalGeneratingUnits; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/CombinedCyclePlant.cpp b/CGMES_3.0.0/CombinedCyclePlant.cpp index ee71122b3..1d823929e 100644 --- a/CGMES_3.0.0/CombinedCyclePlant.cpp +++ b/CGMES_3.0.0/CombinedCyclePlant.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -CombinedCyclePlant::CombinedCyclePlant() {}; -CombinedCyclePlant::~CombinedCyclePlant() {}; +CombinedCyclePlant::CombinedCyclePlant() {} +CombinedCyclePlant::~CombinedCyclePlant() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ CombinedCyclePlant::getPossibleProfilesForAttributes() const return map; } - - bool assign_ThermalGeneratingUnit_CombinedCyclePlant(BaseClass*, BaseClass*); bool assign_CombinedCyclePlant_ThermalGeneratingUnits(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_CombinedCyclePlant_ThermalGeneratingUnits(BaseClass* BaseClass_ptr1, } - const char CombinedCyclePlant::debugName[] = "CombinedCyclePlant"; const char* CombinedCyclePlant::debugString() const { @@ -69,7 +66,7 @@ const char* CombinedCyclePlant::debugString() const void CombinedCyclePlant::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:CombinedCyclePlant"), &CombinedCyclePlant_factory)); + factory_map.emplace("cim:CombinedCyclePlant", &CombinedCyclePlant_factory); } void CombinedCyclePlant::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void CombinedCyclePlant::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:CombinedCyclePlant.ThermalGeneratingUnits"), &assign_CombinedCyclePlant_ThermalGeneratingUnits)); + assign_map.emplace("cim:CombinedCyclePlant.ThermalGeneratingUnits", &assign_CombinedCyclePlant_ThermalGeneratingUnits); } void CombinedCyclePlant::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/CombinedCyclePlant.hpp b/CGMES_3.0.0/CombinedCyclePlant.hpp index 00eb826c5..73d782500 100644 --- a/CGMES_3.0.0/CombinedCyclePlant.hpp +++ b/CGMES_3.0.0/CombinedCyclePlant.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class ThermalGeneratingUnit; - /* - A set of combustion turbines and steam turbines where the exhaust heat from the combustion turbines is recovered to make steam for the steam turbines, resulting in greater overall plant efficiency. - */ + /** \brief A set of combustion turbines and steam turbines where the exhaust heat from the combustion turbines is recovered to make steam for the steam turbines, resulting in greater overall plant efficiency. */ class CombinedCyclePlant : public PowerSystemResource { public: @@ -27,7 +25,8 @@ namespace CIMPP CombinedCyclePlant(); ~CombinedCyclePlant() override; - std::list ThermalGeneratingUnits; /* A thermal generating unit may be a member of a combined cycle plant. Default: 0 */ + /** \brief A thermal generating unit may be a member of a combined cycle plant. Default: 0 */ + std::list ThermalGeneratingUnits; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Command.cpp b/CGMES_3.0.0/Command.cpp index fd449d734..2a09af566 100644 --- a/CGMES_3.0.0/Command.cpp +++ b/CGMES_3.0.0/Command.cpp @@ -10,13 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "DiscreteValue.hpp" #include "ValueAliasSet.hpp" -#include "Integer.hpp" -#include "Integer.hpp" using namespace CIMPP; -Command::Command() : DiscreteValue(nullptr), ValueAliasSet(nullptr) {}; -Command::~Command() {}; +Command::Command() : DiscreteValue(nullptr), ValueAliasSet(nullptr) {} +Command::~Command() {} static const std::list PossibleProfilesForClass = { @@ -46,34 +44,6 @@ Command::getPossibleProfilesForAttributes() const return map; } - -bool assign_Command_normalValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (Command* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->normalValue; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_Command_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (Command* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->value; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_DiscreteValue_Command(BaseClass*, BaseClass*); bool assign_Command_DiscreteValue(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -90,6 +60,7 @@ bool assign_Command_DiscreteValue(BaseClass* BaseClass_ptr1, BaseClass* BaseClas } return false; } + bool assign_ValueAliasSet_Commands(BaseClass*, BaseClass*); bool assign_Command_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -107,38 +78,38 @@ bool assign_Command_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClas return false; } -bool get_Command_normalValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_Command_normalValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const Command* element = dynamic_cast(BaseClass_ptr1)) + Command* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->normalValue; - if (!buffer.str().empty()) + buffer >> element->normalValue; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_Command_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_Command_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const Command* element = dynamic_cast(BaseClass_ptr1)) + Command* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->value; - if (!buffer.str().empty()) + buffer >> element->value; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_Command_DiscreteValue(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Command* element = dynamic_cast(BaseClass_ptr1)) + const Command* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DiscreteValue != 0) { @@ -151,7 +122,8 @@ bool get_Command_DiscreteValue(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Command* element = dynamic_cast(BaseClass_ptr1)) + const Command* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ValueAliasSet != 0) { @@ -162,6 +134,35 @@ bool get_Command_ValueAliasSet(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->normalValue; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_Command_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const Command* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->value; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char Command::debugName[] = "Command"; const char* Command::debugString() const @@ -171,19 +172,19 @@ const char* Command::debugString() const void Command::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Command"), &Command_factory)); + factory_map.emplace("cim:Command", &Command_factory); } void Command::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Command.normalValue"), &assign_Command_normalValue)); - assign_map.insert(std::make_pair(std::string("cim:Command.value"), &assign_Command_value)); + assign_map.emplace("cim:Command.normalValue", &assign_Command_normalValue); + assign_map.emplace("cim:Command.value", &assign_Command_value); } void Command::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Command.DiscreteValue"), &assign_Command_DiscreteValue)); - assign_map.insert(std::make_pair(std::string("cim:Command.ValueAliasSet"), &assign_Command_ValueAliasSet)); + assign_map.emplace("cim:Command.DiscreteValue", &assign_Command_DiscreteValue); + assign_map.emplace("cim:Command.ValueAliasSet", &assign_Command_ValueAliasSet); } void Command::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/Command.hpp b/CGMES_3.0.0/Command.hpp index 7642cbd10..9c87ed759 100644 --- a/CGMES_3.0.0/Command.hpp +++ b/CGMES_3.0.0/Command.hpp @@ -19,9 +19,7 @@ namespace CIMPP class DiscreteValue; class ValueAliasSet; - /* - A Command is a discrete control used for supervisory control. - */ + /** \brief A Command is a discrete control used for supervisory control. */ class Command : public Control { public: @@ -29,10 +27,17 @@ namespace CIMPP Command(); ~Command() override; - CIMPP::DiscreteValue* DiscreteValue; /* The MeasurementValue that is controlled. Default: 0 */ - CIMPP::ValueAliasSet* ValueAliasSet; /* The ValueAliasSet used for translation of a Control value to a name. Default: 0 */ - CIMPP::Integer normalValue; /* Normal value for Control.value e.g. used for percentage scaling. Default: 0 */ - CIMPP::Integer value; /* The value representing the actuator output. Default: 0 */ + /** \brief The MeasurementValue that is controlled. Default: 0 */ + CIMPP::DiscreteValue* DiscreteValue; + + /** \brief The ValueAliasSet used for translation of a Control value to a name. Default: 0 */ + CIMPP::ValueAliasSet* ValueAliasSet; + + /** \brief Normal value for Control.value e.g. used for percentage scaling. Default: 0 */ + CIMPP::Integer normalValue; + + /** \brief The value representing the actuator output. Default: 0 */ + CIMPP::Integer value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Conductance.hpp b/CGMES_3.0.0/Conductance.hpp index 6a99df04e..08f09a881 100644 --- a/CGMES_3.0.0/Conductance.hpp +++ b/CGMES_3.0.0/Conductance.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Factor by which voltage must be multiplied to give corresponding power lost from a circuit. Real part of admittance. - */ + /** \brief Factor by which voltage must be multiplied to give corresponding power lost from a circuit. Real part of admittance. */ class Conductance { public: diff --git a/CGMES_3.0.0/ConductingEquipment.cpp b/CGMES_3.0.0/ConductingEquipment.cpp index 149641fbb..c66f4d773 100644 --- a/CGMES_3.0.0/ConductingEquipment.cpp +++ b/CGMES_3.0.0/ConductingEquipment.cpp @@ -14,8 +14,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ConductingEquipment::ConductingEquipment() : BaseVoltage(nullptr), SvStatus(nullptr) {}; -ConductingEquipment::~ConductingEquipment() {}; +ConductingEquipment::ConductingEquipment() : BaseVoltage(nullptr), SvStatus(nullptr) {} +ConductingEquipment::~ConductingEquipment() {} static const std::list PossibleProfilesForClass = { @@ -49,8 +49,6 @@ ConductingEquipment::getPossibleProfilesForAttributes() const return map; } - - bool assign_BaseVoltage_ConductingEquipment(BaseClass*, BaseClass*); bool assign_ConductingEquipment_BaseVoltage(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -67,6 +65,7 @@ bool assign_ConductingEquipment_BaseVoltage(BaseClass* BaseClass_ptr1, BaseClass } return false; } + bool assign_SvStatus_ConductingEquipment(BaseClass*, BaseClass*); bool assign_ConductingEquipment_SvStatus(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -83,6 +82,7 @@ bool assign_ConductingEquipment_SvStatus(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_Terminal_ConductingEquipment(BaseClass*, BaseClass*); bool assign_ConductingEquipment_Terminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -100,10 +100,10 @@ bool assign_ConductingEquipment_Terminals(BaseClass* BaseClass_ptr1, BaseClass* return false; } - bool get_ConductingEquipment_BaseVoltage(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ConductingEquipment* element = dynamic_cast(BaseClass_ptr1)) + const ConductingEquipment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->BaseVoltage != 0) { @@ -115,6 +115,7 @@ bool get_ConductingEquipment_BaseVoltage(const BaseClass* BaseClass_ptr1, std::l } + const char ConductingEquipment::debugName[] = "ConductingEquipment"; const char* ConductingEquipment::debugString() const { @@ -123,7 +124,7 @@ const char* ConductingEquipment::debugString() const void ConductingEquipment::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ConductingEquipment"), &ConductingEquipment_factory)); + factory_map.emplace("cim:ConductingEquipment", &ConductingEquipment_factory); } void ConductingEquipment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -132,9 +133,9 @@ void ConductingEquipment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ConductingEquipment.BaseVoltage"), &assign_ConductingEquipment_BaseVoltage)); - assign_map.insert(std::make_pair(std::string("cim:ConductingEquipment.SvStatus"), &assign_ConductingEquipment_SvStatus)); - assign_map.insert(std::make_pair(std::string("cim:ConductingEquipment.Terminals"), &assign_ConductingEquipment_Terminals)); + assign_map.emplace("cim:ConductingEquipment.BaseVoltage", &assign_ConductingEquipment_BaseVoltage); + assign_map.emplace("cim:ConductingEquipment.SvStatus", &assign_ConductingEquipment_SvStatus); + assign_map.emplace("cim:ConductingEquipment.Terminals", &assign_ConductingEquipment_Terminals); } void ConductingEquipment::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/ConductingEquipment.hpp b/CGMES_3.0.0/ConductingEquipment.hpp index a12374d53..111940ad9 100644 --- a/CGMES_3.0.0/ConductingEquipment.hpp +++ b/CGMES_3.0.0/ConductingEquipment.hpp @@ -19,9 +19,7 @@ namespace CIMPP class SvStatus; class Terminal; - /* - The parts of the AC power system that are designed to carry current or that are conductively connected through terminals. - */ + /** \brief The parts of the AC power system that are designed to carry current or that are conductively connected through terminals. */ class ConductingEquipment : public Equipment { public: @@ -29,9 +27,14 @@ namespace CIMPP ConductingEquipment(); ~ConductingEquipment() override; - CIMPP::BaseVoltage* BaseVoltage; /* Base voltage of this conducting equipment. Use only when there is no voltage level container used and only one base voltage applies. For example, not used for transformers. Default: 0 */ - CIMPP::SvStatus* SvStatus; /* The status state variable associated with this conducting equipment. Default: 0 */ - std::list Terminals; /* Conducting equipment have terminals that may be connected to other conducting equipment terminals via connectivity nodes or topological nodes. Default: 0 */ + /** \brief Base voltage of this conducting equipment. Use only when there is no voltage level container used and only one base voltage applies. For example, not used for transformers. Default: 0 */ + CIMPP::BaseVoltage* BaseVoltage; + + /** \brief The status state variable associated with this conducting equipment. Default: 0 */ + CIMPP::SvStatus* SvStatus; + + /** \brief Conducting equipment have terminals that may be connected to other conducting equipment terminals via connectivity nodes or topological nodes. Default: 0 */ + std::list Terminals; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Conductor.cpp b/CGMES_3.0.0/Conductor.cpp index 1fe6be844..88f96f1b2 100644 --- a/CGMES_3.0.0/Conductor.cpp +++ b/CGMES_3.0.0/Conductor.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Length.hpp" using namespace CIMPP; -Conductor::Conductor() {}; -Conductor::~Conductor() {}; +Conductor::Conductor() {} +Conductor::~Conductor() {} static const std::list PossibleProfilesForClass = { @@ -41,25 +40,24 @@ Conductor::getPossibleProfilesForAttributes() const return map; } - -bool assign_Conductor_length(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Conductor_length(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Conductor* element = dynamic_cast(BaseClass_ptr1)) + Conductor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->length; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_Conductor_length(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Conductor* element = dynamic_cast(BaseClass_ptr1)) + const Conductor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->length; if (!buffer.str().empty()) @@ -71,8 +69,6 @@ bool get_Conductor_length(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char Conductor::debugName[] = "Conductor"; const char* Conductor::debugString() const { @@ -81,12 +77,12 @@ const char* Conductor::debugString() const void Conductor::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Conductor"), &Conductor_factory)); + factory_map.emplace("cim:Conductor", &Conductor_factory); } void Conductor::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Conductor.length"), &assign_Conductor_length)); + assign_map.emplace("cim:Conductor.length", &assign_Conductor_length); } void Conductor::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/Conductor.hpp b/CGMES_3.0.0/Conductor.hpp index 4061f107b..577088354 100644 --- a/CGMES_3.0.0/Conductor.hpp +++ b/CGMES_3.0.0/Conductor.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Combination of conducting material with consistent electrical characteristics, building a single electrical system, used to carry current between points in the power system. - */ + /** \brief Combination of conducting material with consistent electrical characteristics, building a single electrical system, used to carry current between points in the power system. */ class Conductor : public ConductingEquipment { public: @@ -27,7 +25,8 @@ namespace CIMPP Conductor(); ~Conductor() override; - CIMPP::Length length; /* Segment length for calculating line section capabilities. Default: nullptr */ + /** \brief Segment length for calculating line section capabilities. Default: nullptr */ + CIMPP::Length length; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ConformLoad.cpp b/CGMES_3.0.0/ConformLoad.cpp index a71db54b1..ab5e59f20 100644 --- a/CGMES_3.0.0/ConformLoad.cpp +++ b/CGMES_3.0.0/ConformLoad.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ConformLoad::ConformLoad() : LoadGroup(nullptr) {}; -ConformLoad::~ConformLoad() {}; +ConformLoad::ConformLoad() : LoadGroup(nullptr) {} +ConformLoad::~ConformLoad() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ ConformLoad::getPossibleProfilesForAttributes() const return map; } - - bool assign_ConformLoadGroup_EnergyConsumers(BaseClass*, BaseClass*); bool assign_ConformLoad_LoadGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,10 +58,10 @@ bool assign_ConformLoad_LoadGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClas return false; } - bool get_ConformLoad_LoadGroup(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ConformLoad* element = dynamic_cast(BaseClass_ptr1)) + const ConformLoad* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->LoadGroup != 0) { @@ -74,7 +72,6 @@ bool get_ConformLoad_LoadGroup(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ConformLoad"), &ConformLoad_factory)); + factory_map.emplace("cim:ConformLoad", &ConformLoad_factory); } void ConformLoad::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -92,7 +89,7 @@ void ConformLoad::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ConformLoad.LoadGroup"), &assign_ConformLoad_LoadGroup)); + assign_map.emplace("cim:ConformLoad.LoadGroup", &assign_ConformLoad_LoadGroup); } void ConformLoad::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/ConformLoad.hpp b/CGMES_3.0.0/ConformLoad.hpp index 31946d05a..0448c6f96 100644 --- a/CGMES_3.0.0/ConformLoad.hpp +++ b/CGMES_3.0.0/ConformLoad.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class ConformLoadGroup; - /* - ConformLoad represent loads that follow a daily load change pattern where the pattern can be used to scale the load with a system load. - */ + /** \brief ConformLoad represent loads that follow a daily load change pattern where the pattern can be used to scale the load with a system load. */ class ConformLoad : public EnergyConsumer { public: @@ -27,7 +25,8 @@ namespace CIMPP ConformLoad(); ~ConformLoad() override; - CIMPP::ConformLoadGroup* LoadGroup; /* Group of this ConformLoad. Default: 0 */ + /** \brief Group of this ConformLoad. Default: 0 */ + CIMPP::ConformLoadGroup* LoadGroup; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ConformLoadGroup.cpp b/CGMES_3.0.0/ConformLoadGroup.cpp index cccde6cb4..c8d5c15fa 100644 --- a/CGMES_3.0.0/ConformLoadGroup.cpp +++ b/CGMES_3.0.0/ConformLoadGroup.cpp @@ -8,13 +8,13 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "ConformLoadSchedule.hpp" #include "ConformLoad.hpp" +#include "ConformLoadSchedule.hpp" using namespace CIMPP; -ConformLoadGroup::ConformLoadGroup() {}; -ConformLoadGroup::~ConformLoadGroup() {}; +ConformLoadGroup::ConformLoadGroup() {} +ConformLoadGroup::~ConformLoadGroup() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ ConformLoadGroup::getPossibleProfilesForAttributes() const return map; } - - bool assign_ConformLoadSchedule_ConformLoadGroup(BaseClass*, BaseClass*); bool assign_ConformLoadGroup_ConformLoadSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_ConformLoadGroup_ConformLoadSchedules(BaseClass* BaseClass_ptr1, Bas } return false; } + bool assign_ConformLoad_LoadGroup(BaseClass*, BaseClass*); bool assign_ConformLoadGroup_EnergyConsumers(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -87,7 +86,7 @@ const char* ConformLoadGroup::debugString() const void ConformLoadGroup::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ConformLoadGroup"), &ConformLoadGroup_factory)); + factory_map.emplace("cim:ConformLoadGroup", &ConformLoadGroup_factory); } void ConformLoadGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -96,8 +95,8 @@ void ConformLoadGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ConformLoadGroup.ConformLoadSchedules"), &assign_ConformLoadGroup_ConformLoadSchedules)); - assign_map.insert(std::make_pair(std::string("cim:ConformLoadGroup.EnergyConsumers"), &assign_ConformLoadGroup_EnergyConsumers)); + assign_map.emplace("cim:ConformLoadGroup.ConformLoadSchedules", &assign_ConformLoadGroup_ConformLoadSchedules); + assign_map.emplace("cim:ConformLoadGroup.EnergyConsumers", &assign_ConformLoadGroup_EnergyConsumers); } void ConformLoadGroup::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/ConformLoadGroup.hpp b/CGMES_3.0.0/ConformLoadGroup.hpp index 9c9ab4de7..5e59426da 100644 --- a/CGMES_3.0.0/ConformLoadGroup.hpp +++ b/CGMES_3.0.0/ConformLoadGroup.hpp @@ -18,9 +18,7 @@ namespace CIMPP class ConformLoad; class ConformLoadSchedule; - /* - A group of loads conforming to an allocation pattern. - */ + /** \brief A group of loads conforming to an allocation pattern. */ class ConformLoadGroup : public LoadGroup { public: @@ -28,8 +26,11 @@ namespace CIMPP ConformLoadGroup(); ~ConformLoadGroup() override; - std::list ConformLoadSchedules; /* The ConformLoadSchedules in the ConformLoadGroup. Default: 0 */ - std::list EnergyConsumers; /* Conform loads assigned to this ConformLoadGroup. Default: 0 */ + /** \brief The ConformLoadSchedules in the ConformLoadGroup. Default: 0 */ + std::list ConformLoadSchedules; + + /** \brief Conform loads assigned to this ConformLoadGroup. Default: 0 */ + std::list EnergyConsumers; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ConformLoadSchedule.cpp b/CGMES_3.0.0/ConformLoadSchedule.cpp index 5f93ccf7f..51bb1e07b 100644 --- a/CGMES_3.0.0/ConformLoadSchedule.cpp +++ b/CGMES_3.0.0/ConformLoadSchedule.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ConformLoadSchedule::ConformLoadSchedule() : ConformLoadGroup(nullptr) {}; -ConformLoadSchedule::~ConformLoadSchedule() {}; +ConformLoadSchedule::ConformLoadSchedule() : ConformLoadGroup(nullptr) {} +ConformLoadSchedule::~ConformLoadSchedule() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ ConformLoadSchedule::getPossibleProfilesForAttributes() const return map; } - - bool assign_ConformLoadGroup_ConformLoadSchedules(BaseClass*, BaseClass*); bool assign_ConformLoadSchedule_ConformLoadGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_ConformLoadSchedule_ConformLoadGroup(BaseClass* BaseClass_ptr1, Base return false; } - bool get_ConformLoadSchedule_ConformLoadGroup(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ConformLoadSchedule* element = dynamic_cast(BaseClass_ptr1)) + const ConformLoadSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ConformLoadGroup != 0) { @@ -73,7 +71,6 @@ bool get_ConformLoadSchedule_ConformLoadGroup(const BaseClass* BaseClass_ptr1, s return false; } - const char ConformLoadSchedule::debugName[] = "ConformLoadSchedule"; const char* ConformLoadSchedule::debugString() const { @@ -82,7 +79,7 @@ const char* ConformLoadSchedule::debugString() const void ConformLoadSchedule::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ConformLoadSchedule"), &ConformLoadSchedule_factory)); + factory_map.emplace("cim:ConformLoadSchedule", &ConformLoadSchedule_factory); } void ConformLoadSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void ConformLoadSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ConformLoadSchedule.ConformLoadGroup"), &assign_ConformLoadSchedule_ConformLoadGroup)); + assign_map.emplace("cim:ConformLoadSchedule.ConformLoadGroup", &assign_ConformLoadSchedule_ConformLoadGroup); } void ConformLoadSchedule::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/ConformLoadSchedule.hpp b/CGMES_3.0.0/ConformLoadSchedule.hpp index 9712fa6c4..72fd6f6af 100644 --- a/CGMES_3.0.0/ConformLoadSchedule.hpp +++ b/CGMES_3.0.0/ConformLoadSchedule.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class ConformLoadGroup; - /* - A curve of load versus time (X-axis) showing the active power values (Y1-axis) and reactive power (Y2-axis) for each unit of the period covered. This curve represents a typical pattern of load over the time period for a given day type and season. - */ + /** \brief A curve of load versus time (X-axis) showing the active power values (Y1-axis) and reactive power (Y2-axis) for each unit of the period covered. This curve represents a typical pattern of load over the time period for a given day type and season. */ class ConformLoadSchedule : public SeasonDayTypeSchedule { public: @@ -27,7 +25,8 @@ namespace CIMPP ConformLoadSchedule(); ~ConformLoadSchedule() override; - CIMPP::ConformLoadGroup* ConformLoadGroup; /* The ConformLoadGroup where the ConformLoadSchedule belongs. Default: 0 */ + /** \brief The ConformLoadGroup where the ConformLoadSchedule belongs. Default: 0 */ + CIMPP::ConformLoadGroup* ConformLoadGroup; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ConnectivityNode.cpp b/CGMES_3.0.0/ConnectivityNode.cpp index 95982a623..9b36c69ad 100644 --- a/CGMES_3.0.0/ConnectivityNode.cpp +++ b/CGMES_3.0.0/ConnectivityNode.cpp @@ -15,8 +15,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ConnectivityNode::ConnectivityNode() : BoundaryPoint(nullptr), ConnectivityNodeContainer(nullptr), TopologicalNode(nullptr) {}; -ConnectivityNode::~ConnectivityNode() {}; +ConnectivityNode::ConnectivityNode() : BoundaryPoint(nullptr), ConnectivityNodeContainer(nullptr), TopologicalNode(nullptr) {} +ConnectivityNode::~ConnectivityNode() {} static const std::list PossibleProfilesForClass = { @@ -48,8 +48,6 @@ ConnectivityNode::getPossibleProfilesForAttributes() const return map; } - - bool assign_BoundaryPoint_ConnectivityNode(BaseClass*, BaseClass*); bool assign_ConnectivityNode_BoundaryPoint(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -66,6 +64,7 @@ bool assign_ConnectivityNode_BoundaryPoint(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_ConnectivityNodeContainer_ConnectivityNodes(BaseClass*, BaseClass*); bool assign_ConnectivityNode_ConnectivityNodeContainer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -82,6 +81,7 @@ bool assign_ConnectivityNode_ConnectivityNodeContainer(BaseClass* BaseClass_ptr1 } return false; } + bool assign_Terminal_ConnectivityNode(BaseClass*, BaseClass*); bool assign_ConnectivityNode_Terminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -98,6 +98,7 @@ bool assign_ConnectivityNode_Terminals(BaseClass* BaseClass_ptr1, BaseClass* Bas } return false; } + bool assign_TopologicalNode_ConnectivityNodes(BaseClass*, BaseClass*); bool assign_ConnectivityNode_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -118,7 +119,8 @@ bool assign_ConnectivityNode_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClas bool get_ConnectivityNode_ConnectivityNodeContainer(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ConnectivityNodeContainer != 0) { @@ -129,9 +131,11 @@ bool get_ConnectivityNode_ConnectivityNodeContainer(const BaseClass* BaseClass_p return false; } + bool get_ConnectivityNode_TopologicalNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1)) + const ConnectivityNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->TopologicalNode != 0) { @@ -142,7 +146,6 @@ bool get_ConnectivityNode_TopologicalNode(const BaseClass* BaseClass_ptr1, std:: return false; } - const char ConnectivityNode::debugName[] = "ConnectivityNode"; const char* ConnectivityNode::debugString() const { @@ -151,7 +154,7 @@ const char* ConnectivityNode::debugString() const void ConnectivityNode::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ConnectivityNode"), &ConnectivityNode_factory)); + factory_map.emplace("cim:ConnectivityNode", &ConnectivityNode_factory); } void ConnectivityNode::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -160,10 +163,10 @@ void ConnectivityNode::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNode.BoundaryPoint"), &assign_ConnectivityNode_BoundaryPoint)); - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNode.ConnectivityNodeContainer"), &assign_ConnectivityNode_ConnectivityNodeContainer)); - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNode.Terminals"), &assign_ConnectivityNode_Terminals)); - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNode.TopologicalNode"), &assign_ConnectivityNode_TopologicalNode)); + assign_map.emplace("cim:ConnectivityNode.BoundaryPoint", &assign_ConnectivityNode_BoundaryPoint); + assign_map.emplace("cim:ConnectivityNode.ConnectivityNodeContainer", &assign_ConnectivityNode_ConnectivityNodeContainer); + assign_map.emplace("cim:ConnectivityNode.Terminals", &assign_ConnectivityNode_Terminals); + assign_map.emplace("cim:ConnectivityNode.TopologicalNode", &assign_ConnectivityNode_TopologicalNode); } void ConnectivityNode::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/ConnectivityNode.hpp b/CGMES_3.0.0/ConnectivityNode.hpp index 7c61c1841..a4af858d7 100644 --- a/CGMES_3.0.0/ConnectivityNode.hpp +++ b/CGMES_3.0.0/ConnectivityNode.hpp @@ -20,9 +20,7 @@ namespace CIMPP class Terminal; class TopologicalNode; - /* - Connectivity nodes are points where terminals of AC conducting equipment are connected together with zero impedance. - */ + /** \brief Connectivity nodes are points where terminals of AC conducting equipment are connected together with zero impedance. */ class ConnectivityNode : public IdentifiedObject { public: @@ -30,10 +28,17 @@ namespace CIMPP ConnectivityNode(); ~ConnectivityNode() override; - CIMPP::BoundaryPoint* BoundaryPoint; /* The boundary point associated with the connectivity node. Default: 0 */ - CIMPP::ConnectivityNodeContainer* ConnectivityNodeContainer; /* Container of this connectivity node. Default: 0 */ - std::list Terminals; /* Terminals interconnected with zero impedance at a this connectivity node. Default: 0 */ - CIMPP::TopologicalNode* TopologicalNode; /* The topological node to which this connectivity node is assigned. May depend on the current state of switches in the network. Default: 0 */ + /** \brief The boundary point associated with the connectivity node. Default: 0 */ + CIMPP::BoundaryPoint* BoundaryPoint; + + /** \brief Container of this connectivity node. Default: 0 */ + CIMPP::ConnectivityNodeContainer* ConnectivityNodeContainer; + + /** \brief Terminals interconnected with zero impedance at a this connectivity node. Default: 0 */ + std::list Terminals; + + /** \brief The topological node to which this connectivity node is assigned. May depend on the current state of switches in the network. Default: 0 */ + CIMPP::TopologicalNode* TopologicalNode; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ConnectivityNodeContainer.cpp b/CGMES_3.0.0/ConnectivityNodeContainer.cpp index a401cddcf..4d1464ce8 100644 --- a/CGMES_3.0.0/ConnectivityNodeContainer.cpp +++ b/CGMES_3.0.0/ConnectivityNodeContainer.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ConnectivityNodeContainer::ConnectivityNodeContainer() {}; -ConnectivityNodeContainer::~ConnectivityNodeContainer() {}; +ConnectivityNodeContainer::ConnectivityNodeContainer() {} +ConnectivityNodeContainer::~ConnectivityNodeContainer() {} static const std::list PossibleProfilesForClass = { @@ -44,8 +44,6 @@ ConnectivityNodeContainer::getPossibleProfilesForAttributes() const return map; } - - bool assign_ConnectivityNode_ConnectivityNodeContainer(BaseClass*, BaseClass*); bool assign_ConnectivityNodeContainer_ConnectivityNodes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -62,6 +60,7 @@ bool assign_ConnectivityNodeContainer_ConnectivityNodes(BaseClass* BaseClass_ptr } return false; } + bool assign_TopologicalNode_ConnectivityNodeContainer(BaseClass*, BaseClass*); bool assign_ConnectivityNodeContainer_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -89,7 +88,7 @@ const char* ConnectivityNodeContainer::debugString() const void ConnectivityNodeContainer::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ConnectivityNodeContainer"), &ConnectivityNodeContainer_factory)); + factory_map.emplace("cim:ConnectivityNodeContainer", &ConnectivityNodeContainer_factory); } void ConnectivityNodeContainer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -98,8 +97,8 @@ void ConnectivityNodeContainer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNodeContainer.ConnectivityNodes"), &assign_ConnectivityNodeContainer_ConnectivityNodes)); - assign_map.insert(std::make_pair(std::string("cim:ConnectivityNodeContainer.TopologicalNode"), &assign_ConnectivityNodeContainer_TopologicalNode)); + assign_map.emplace("cim:ConnectivityNodeContainer.ConnectivityNodes", &assign_ConnectivityNodeContainer_ConnectivityNodes); + assign_map.emplace("cim:ConnectivityNodeContainer.TopologicalNode", &assign_ConnectivityNodeContainer_TopologicalNode); } void ConnectivityNodeContainer::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/ConnectivityNodeContainer.hpp b/CGMES_3.0.0/ConnectivityNodeContainer.hpp index 5ceabeeb0..4ab1c963f 100644 --- a/CGMES_3.0.0/ConnectivityNodeContainer.hpp +++ b/CGMES_3.0.0/ConnectivityNodeContainer.hpp @@ -18,9 +18,7 @@ namespace CIMPP class ConnectivityNode; class TopologicalNode; - /* - A base class for all objects that may contain connectivity nodes or topological nodes. - */ + /** \brief A base class for all objects that may contain connectivity nodes or topological nodes. */ class ConnectivityNodeContainer : public PowerSystemResource { public: @@ -28,8 +26,11 @@ namespace CIMPP ConnectivityNodeContainer(); ~ConnectivityNodeContainer() override; - std::list ConnectivityNodes; /* Connectivity nodes which belong to this connectivity node container. Default: 0 */ - std::list TopologicalNode; /* The topological nodes which belong to this connectivity node container. Default: 0 */ + /** \brief Connectivity nodes which belong to this connectivity node container. Default: 0 */ + std::list ConnectivityNodes; + + /** \brief The topological nodes which belong to this connectivity node container. Default: 0 */ + std::list TopologicalNode; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Connector.cpp b/CGMES_3.0.0/Connector.cpp index 5875f2e70..f1e1ceaab 100644 --- a/CGMES_3.0.0/Connector.cpp +++ b/CGMES_3.0.0/Connector.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Connector::Connector() {}; -Connector::~Connector() {}; +Connector::Connector() {} +Connector::~Connector() {} static const std::list PossibleProfilesForClass = { @@ -40,11 +40,6 @@ Connector::getPossibleProfilesForAttributes() const return map; } - - - - - const char Connector::debugName[] = "Connector"; const char* Connector::debugString() const { @@ -53,7 +48,7 @@ const char* Connector::debugString() const void Connector::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Connector"), &Connector_factory)); + factory_map.emplace("cim:Connector", &Connector_factory); } void Connector::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/Connector.hpp b/CGMES_3.0.0/Connector.hpp index c1a8e2267..0c319c834 100644 --- a/CGMES_3.0.0/Connector.hpp +++ b/CGMES_3.0.0/Connector.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A conductor, or group of conductors, with negligible impedance, that serve to connect other conducting equipment within a single substation and are modelled with a single logical terminal. - */ + /** \brief A conductor, or group of conductors, with negligible impedance, that serve to connect other conducting equipment within a single substation and are modelled with a single logical terminal. */ class Connector : public ConductingEquipment { public: @@ -26,7 +24,6 @@ namespace CIMPP Connector(); ~Connector() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Control.cpp b/CGMES_3.0.0/Control.cpp index 7877ab82e..c87cff223 100644 --- a/CGMES_3.0.0/Control.cpp +++ b/CGMES_3.0.0/Control.cpp @@ -9,16 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "PowerSystemResource.hpp" -#include "String.hpp" -#include "Boolean.hpp" -#include "DateTime.hpp" -#include "UnitMultiplier.hpp" -#include "UnitSymbol.hpp" using namespace CIMPP; -Control::Control() : PowerSystemResource(nullptr) {}; -Control::~Control() {}; +Control::Control() : PowerSystemResource(nullptr) {} +Control::~Control() {} static const std::list PossibleProfilesForClass = { @@ -50,93 +45,111 @@ Control::getPossibleProfilesForAttributes() const return map; } +bool assign_PowerSystemResource_Controls(BaseClass*, BaseClass*); +bool assign_Control_PowerSystemResource(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + Control* element = dynamic_cast(BaseClass_ptr1); + PowerSystemResource* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PowerSystemResource != element2) + { + element->PowerSystemResource = element2; + return assign_PowerSystemResource_Controls(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_Control_controlType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Control_controlType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Control* element = dynamic_cast(BaseClass_ptr1)) + Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->controlType = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Control_operationInProgress(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Control_operationInProgress(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Control* element = dynamic_cast(BaseClass_ptr1)) + Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->operationInProgress; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Control_timeStamp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Control_timeStamp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Control* element = dynamic_cast(BaseClass_ptr1)) + Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->timeStamp = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Control_unitMultiplier(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Control_unitMultiplier(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Control* element = dynamic_cast(BaseClass_ptr1)) + Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->unitMultiplier; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Control_unitSymbol(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Control_unitSymbol(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Control* element = dynamic_cast(BaseClass_ptr1)) + Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->unitSymbol; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_PowerSystemResource_Controls(BaseClass*, BaseClass*); -bool assign_Control_PowerSystemResource(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_Control_PowerSystemResource(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - Control* element = dynamic_cast(BaseClass_ptr1); - PowerSystemResource* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->PowerSystemResource != element2) + if (element->PowerSystemResource != 0) { - element->PowerSystemResource = element2; - return assign_PowerSystemResource_Controls(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->PowerSystemResource); + return true; } - return true; } return false; } bool get_Control_controlType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Control* element = dynamic_cast(BaseClass_ptr1)) + const Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->controlType; if (!buffer.str().empty()) @@ -150,7 +163,8 @@ bool get_Control_controlType(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_Control_operationInProgress(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Control* element = dynamic_cast(BaseClass_ptr1)) + const Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->operationInProgress; if (!buffer.str().empty()) @@ -164,7 +178,8 @@ bool get_Control_operationInProgress(const BaseClass* BaseClass_ptr1, std::strin bool get_Control_timeStamp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Control* element = dynamic_cast(BaseClass_ptr1)) + const Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->timeStamp; if (!buffer.str().empty()) @@ -176,24 +191,10 @@ bool get_Control_timeStamp(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - -bool get_Control_PowerSystemResource(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const Control* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->PowerSystemResource != 0) - { - BaseClass_list.push_back(element->PowerSystemResource); - return true; - } - } - return false; -} - - bool get_Control_unitMultiplier(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Control* element = dynamic_cast(BaseClass_ptr1)) + const Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->unitMultiplier; if (!buffer.str().empty()) @@ -207,7 +208,8 @@ bool get_Control_unitMultiplier(const BaseClass* BaseClass_ptr1, std::stringstre bool get_Control_unitSymbol(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Control* element = dynamic_cast(BaseClass_ptr1)) + const Control* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->unitSymbol; if (!buffer.str().empty()) @@ -227,21 +229,21 @@ const char* Control::debugString() const void Control::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Control"), &Control_factory)); + factory_map.emplace("cim:Control", &Control_factory); } void Control::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Control.controlType"), &assign_Control_controlType)); - assign_map.insert(std::make_pair(std::string("cim:Control.operationInProgress"), &assign_Control_operationInProgress)); - assign_map.insert(std::make_pair(std::string("cim:Control.timeStamp"), &assign_Control_timeStamp)); - assign_map.insert(std::make_pair(std::string("cim:Control.unitMultiplier"), &assign_Control_unitMultiplier)); - assign_map.insert(std::make_pair(std::string("cim:Control.unitSymbol"), &assign_Control_unitSymbol)); + assign_map.emplace("cim:Control.controlType", &assign_Control_controlType); + assign_map.emplace("cim:Control.operationInProgress", &assign_Control_operationInProgress); + assign_map.emplace("cim:Control.timeStamp", &assign_Control_timeStamp); + assign_map.emplace("cim:Control.unitMultiplier", &assign_Control_unitMultiplier); + assign_map.emplace("cim:Control.unitSymbol", &assign_Control_unitSymbol); } void Control::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Control.PowerSystemResource"), &assign_Control_PowerSystemResource)); + assign_map.emplace("cim:Control.PowerSystemResource", &assign_Control_PowerSystemResource); } void Control::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/Control.hpp b/CGMES_3.0.0/Control.hpp index 56c8620d3..2adbd5c7e 100644 --- a/CGMES_3.0.0/Control.hpp +++ b/CGMES_3.0.0/Control.hpp @@ -22,9 +22,7 @@ namespace CIMPP { class PowerSystemResource; - /* - Control is used for supervisory/device control. It represents control outputs that are used to change the state in a process, e.g. close or open breaker, a set point value or a raise lower command. - */ + /** \brief Control is used for supervisory/device control. It represents control outputs that are used to change the state in a process, e.g. close or open breaker, a set point value or a raise lower command. */ class Control : public IOPoint { public: @@ -32,12 +30,23 @@ namespace CIMPP Control(); ~Control() override; - CIMPP::PowerSystemResource* PowerSystemResource; /* Regulating device governed by this control output. Default: 0 */ - CIMPP::String controlType; /* Specifies the type of Control. For example, this specifies if the Control represents BreakerOpen, BreakerClose, GeneratorVoltageSetPoint, GeneratorRaise, GeneratorLower, etc. Default: '' */ - CIMPP::Boolean operationInProgress; /* Indicates that a client is currently sending control commands that has not completed. Default: false */ - CIMPP::DateTime timeStamp; /* The last time a control output was sent. Default: '' */ - CIMPP::UnitMultiplier unitMultiplier; /* The unit multiplier of the controlled quantity. Default: 0 */ - CIMPP::UnitSymbol unitSymbol; /* The unit of measure of the controlled quantity. Default: 0 */ + /** \brief Regulating device governed by this control output. Default: 0 */ + CIMPP::PowerSystemResource* PowerSystemResource; + + /** \brief Specifies the type of Control. For example, this specifies if the Control represents BreakerOpen, BreakerClose, GeneratorVoltageSetPoint, GeneratorRaise, GeneratorLower, etc. Default: '' */ + CIMPP::String controlType; + + /** \brief Indicates that a client is currently sending control commands that has not completed. Default: false */ + CIMPP::Boolean operationInProgress; + + /** \brief The last time a control output was sent. Default: '' */ + CIMPP::DateTime timeStamp; + + /** \brief The unit multiplier of the controlled quantity. Default: 0 */ + CIMPP::UnitMultiplier unitMultiplier; + + /** \brief The unit of measure of the controlled quantity. Default: 0 */ + CIMPP::UnitSymbol unitSymbol; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ControlArea.cpp b/CGMES_3.0.0/ControlArea.cpp index 28cf13ad4..21c90385d 100644 --- a/CGMES_3.0.0/ControlArea.cpp +++ b/CGMES_3.0.0/ControlArea.cpp @@ -11,14 +11,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "ControlAreaGeneratingUnit.hpp" #include "EnergyArea.hpp" #include "TieFlow.hpp" -#include "ActivePower.hpp" -#include "ActivePower.hpp" -#include "ControlAreaTypeKind.hpp" using namespace CIMPP; -ControlArea::ControlArea() : EnergyArea(nullptr) {}; -ControlArea::~ControlArea() {}; +ControlArea::ControlArea() : EnergyArea(nullptr) {} +ControlArea::~ControlArea() {} static const std::list PossibleProfilesForClass = { @@ -51,47 +48,6 @@ ControlArea::getPossibleProfilesForAttributes() const return map; } - -bool assign_ControlArea_netInterchange(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ControlArea* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->netInterchange; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_ControlArea_pTolerance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ControlArea* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->pTolerance; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_ControlArea_type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ControlArea* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->type; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ControlAreaGeneratingUnit_ControlArea(BaseClass*, BaseClass*); bool assign_ControlArea_ControlAreaGeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -108,6 +64,7 @@ bool assign_ControlArea_ControlAreaGeneratingUnit(BaseClass* BaseClass_ptr1, Bas } return false; } + bool assign_EnergyArea_ControlArea(BaseClass*, BaseClass*); bool assign_ControlArea_EnergyArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -124,6 +81,7 @@ bool assign_ControlArea_EnergyArea(BaseClass* BaseClass_ptr1, BaseClass* BaseCla } return false; } + bool assign_TieFlow_ControlArea(BaseClass*, BaseClass*); bool assign_ControlArea_TieFlow(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -141,38 +99,53 @@ bool assign_ControlArea_TieFlow(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ return false; } -bool get_ControlArea_netInterchange(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_ControlArea_netInterchange(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const ControlArea* element = dynamic_cast(BaseClass_ptr1)) + ControlArea* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->netInterchange; - if (!buffer.str().empty()) + buffer >> element->netInterchange; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_ControlArea_pTolerance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_ControlArea_pTolerance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const ControlArea* element = dynamic_cast(BaseClass_ptr1)) + ControlArea* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->pTolerance; - if (!buffer.str().empty()) + buffer >> element->pTolerance; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + +bool assign_ControlArea_type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + ControlArea* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->type; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } bool get_ControlArea_EnergyArea(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ControlArea* element = dynamic_cast(BaseClass_ptr1)) + const ControlArea* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->EnergyArea != 0) { @@ -184,9 +157,40 @@ bool get_ControlArea_EnergyArea(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->netInterchange; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_ControlArea_pTolerance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ControlArea* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->pTolerance; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_ControlArea_type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ControlArea* element = dynamic_cast(BaseClass_ptr1)) + const ControlArea* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->type; if (!buffer.str().empty()) @@ -206,21 +210,21 @@ const char* ControlArea::debugString() const void ControlArea::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ControlArea"), &ControlArea_factory)); + factory_map.emplace("cim:ControlArea", &ControlArea_factory); } void ControlArea::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ControlArea.netInterchange"), &assign_ControlArea_netInterchange)); - assign_map.insert(std::make_pair(std::string("cim:ControlArea.pTolerance"), &assign_ControlArea_pTolerance)); - assign_map.insert(std::make_pair(std::string("cim:ControlArea.type"), &assign_ControlArea_type)); + assign_map.emplace("cim:ControlArea.netInterchange", &assign_ControlArea_netInterchange); + assign_map.emplace("cim:ControlArea.pTolerance", &assign_ControlArea_pTolerance); + assign_map.emplace("cim:ControlArea.type", &assign_ControlArea_type); } void ControlArea::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ControlArea.ControlAreaGeneratingUnit"), &assign_ControlArea_ControlAreaGeneratingUnit)); - assign_map.insert(std::make_pair(std::string("cim:ControlArea.EnergyArea"), &assign_ControlArea_EnergyArea)); - assign_map.insert(std::make_pair(std::string("cim:ControlArea.TieFlow"), &assign_ControlArea_TieFlow)); + assign_map.emplace("cim:ControlArea.ControlAreaGeneratingUnit", &assign_ControlArea_ControlAreaGeneratingUnit); + assign_map.emplace("cim:ControlArea.EnergyArea", &assign_ControlArea_EnergyArea); + assign_map.emplace("cim:ControlArea.TieFlow", &assign_ControlArea_TieFlow); } void ControlArea::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/ControlArea.hpp b/CGMES_3.0.0/ControlArea.hpp index 438216659..cc55ab1dd 100644 --- a/CGMES_3.0.0/ControlArea.hpp +++ b/CGMES_3.0.0/ControlArea.hpp @@ -21,9 +21,7 @@ namespace CIMPP class EnergyArea; class TieFlow; - /* - A control area is a grouping of generating units and/or loads and a cutset of tie lines (as terminals) which may be used for a variety of purposes including automatic generation control, power flow solution area interchange control specification, and input to load forecasting. All generation and load within the area defined by the terminals on the border are considered in the area interchange control. Note that any number of overlapping control area specifications can be superimposed on the physical model. The following general principles apply to ControlArea: 1. The control area orientation for net interchange is positive for an import, negative for an export. 2. The control area net interchange is determined by summing flows in Terminals. The Terminals are identified by creating a set of TieFlow objects associated with a ControlArea object. Each TieFlow object identifies one Terminal. 3. In a single network model, a tie between two control areas must be modelled in both control area specifications, such that the two representations of the tie flow sum to zero. 4. The normal orientation of Terminal flow is positive for flow into the conducting equipment that owns the Terminal. (i.e. flow from a bus into a device is positive.) However, the orientation of each flow in the control area specification must align with the control area convention, i.e. import is positive. If the orientation of the Terminal flow referenced by a TieFlow is positive into the control area, then this is confirmed by setting TieFlow.positiveFlowIn flag TRUE. If not, the orientation must be reversed by setting the TieFlow.positiveFlowIn flag FALSE. - */ + /** \brief A control area is a grouping of generating units and/or loads and a cutset of tie lines (as terminals) which may be used for a variety of purposes including automatic generation control, power flow solution area interchange control specification, and input to load forecasting. All generation and load within the area defined by the terminals on the border are considered in the area interchange control. Note that any number of overlapping control area specifications can be superimposed on the physical model. The following general principles apply to ControlArea: 1. The control area orientation for net interchange is positive for an import, negative for an export. 2. The control area net interchange is determined by summing flows in Terminals. The Terminals are identified by creating a set of TieFlow objects associated with a ControlArea object. Each TieFlow object identifies one Terminal. 3. In a single network model, a tie between two control areas must be modelled in both control area specifications, such that the two representations of the tie flow sum to zero. 4. The normal orientation of Terminal flow is positive for flow into the conducting equipment that owns the Terminal. (i.e. flow from a bus into a device is positive.) However, the orientation of each flow in the control area specification must align with the control area convention, i.e. import is positive. If the orientation of the Terminal flow referenced by a TieFlow is positive into the control area, then this is confirmed by setting TieFlow.positiveFlowIn flag TRUE. If not, the orientation must be reversed by setting the TieFlow.positiveFlowIn flag FALSE. */ class ControlArea : public PowerSystemResource { public: @@ -31,12 +29,23 @@ namespace CIMPP ControlArea(); ~ControlArea() override; - std::list ControlAreaGeneratingUnit; /* The generating unit specifications for the control area. Default: 0 */ - CIMPP::EnergyArea* EnergyArea; /* The energy area that is forecast from this control area specification. Default: 0 */ - std::list TieFlow; /* The tie flows associated with the control area. Default: 0 */ - CIMPP::ActivePower netInterchange; /* The specified positive net interchange into the control area, i.e. positive sign means flow into the area. Default: nullptr */ - CIMPP::ActivePower pTolerance; /* Active power net interchange tolerance. The attribute shall be a positive value or zero. Default: nullptr */ - CIMPP::ControlAreaTypeKind type; /* The primary type of control area definition used to determine if this is used for automatic generation control, for planning interchange control, or other purposes. A control area specified with primary type of automatic generation control could still be forecast and used as an interchange area in power flow analysis. Default: 0 */ + /** \brief The generating unit specifications for the control area. Default: 0 */ + std::list ControlAreaGeneratingUnit; + + /** \brief The energy area that is forecast from this control area specification. Default: 0 */ + CIMPP::EnergyArea* EnergyArea; + + /** \brief The tie flows associated with the control area. Default: 0 */ + std::list TieFlow; + + /** \brief The specified positive net interchange into the control area, i.e. positive sign means flow into the area. Default: nullptr */ + CIMPP::ActivePower netInterchange; + + /** \brief Active power net interchange tolerance. The attribute shall be a positive value or zero. Default: nullptr */ + CIMPP::ActivePower pTolerance; + + /** \brief The primary type of control area definition used to determine if this is used for automatic generation control, for planning interchange control, or other purposes. A control area specified with primary type of automatic generation control could still be forecast and used as an interchange area in power flow analysis. Default: 0 */ + CIMPP::ControlAreaTypeKind type; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ControlAreaGeneratingUnit.cpp b/CGMES_3.0.0/ControlAreaGeneratingUnit.cpp index 8512e2641..907553a54 100644 --- a/CGMES_3.0.0/ControlAreaGeneratingUnit.cpp +++ b/CGMES_3.0.0/ControlAreaGeneratingUnit.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ControlAreaGeneratingUnit::ControlAreaGeneratingUnit() : ControlArea(nullptr), GeneratingUnit(nullptr) {}; -ControlAreaGeneratingUnit::~ControlAreaGeneratingUnit() {}; +ControlAreaGeneratingUnit::ControlAreaGeneratingUnit() : ControlArea(nullptr), GeneratingUnit(nullptr) {} +ControlAreaGeneratingUnit::~ControlAreaGeneratingUnit() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ ControlAreaGeneratingUnit::getPossibleProfilesForAttributes() const return map; } - - bool assign_ControlArea_ControlAreaGeneratingUnit(BaseClass*, BaseClass*); bool assign_ControlAreaGeneratingUnit_ControlArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_ControlAreaGeneratingUnit_ControlArea(BaseClass* BaseClass_ptr1, Bas } return false; } + bool assign_GeneratingUnit_ControlAreaGeneratingUnit(BaseClass*, BaseClass*); bool assign_ControlAreaGeneratingUnit_GeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_ControlAreaGeneratingUnit_GeneratingUnit(BaseClass* BaseClass_ptr1, return false; } - bool get_ControlAreaGeneratingUnit_ControlArea(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ControlAreaGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const ControlAreaGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ControlArea != 0) { @@ -93,7 +92,8 @@ bool get_ControlAreaGeneratingUnit_ControlArea(const BaseClass* BaseClass_ptr1, bool get_ControlAreaGeneratingUnit_GeneratingUnit(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ControlAreaGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const ControlAreaGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->GeneratingUnit != 0) { @@ -104,7 +104,6 @@ bool get_ControlAreaGeneratingUnit_GeneratingUnit(const BaseClass* BaseClass_ptr return false; } - const char ControlAreaGeneratingUnit::debugName[] = "ControlAreaGeneratingUnit"; const char* ControlAreaGeneratingUnit::debugString() const { @@ -113,7 +112,7 @@ const char* ControlAreaGeneratingUnit::debugString() const void ControlAreaGeneratingUnit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ControlAreaGeneratingUnit"), &ControlAreaGeneratingUnit_factory)); + factory_map.emplace("cim:ControlAreaGeneratingUnit", &ControlAreaGeneratingUnit_factory); } void ControlAreaGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void ControlAreaGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ControlAreaGeneratingUnit.ControlArea"), &assign_ControlAreaGeneratingUnit_ControlArea)); - assign_map.insert(std::make_pair(std::string("cim:ControlAreaGeneratingUnit.GeneratingUnit"), &assign_ControlAreaGeneratingUnit_GeneratingUnit)); + assign_map.emplace("cim:ControlAreaGeneratingUnit.ControlArea", &assign_ControlAreaGeneratingUnit_ControlArea); + assign_map.emplace("cim:ControlAreaGeneratingUnit.GeneratingUnit", &assign_ControlAreaGeneratingUnit_GeneratingUnit); } void ControlAreaGeneratingUnit::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/ControlAreaGeneratingUnit.hpp b/CGMES_3.0.0/ControlAreaGeneratingUnit.hpp index b0b749450..2fbe40d06 100644 --- a/CGMES_3.0.0/ControlAreaGeneratingUnit.hpp +++ b/CGMES_3.0.0/ControlAreaGeneratingUnit.hpp @@ -18,9 +18,7 @@ namespace CIMPP class ControlArea; class GeneratingUnit; - /* - A control area generating unit. This class is needed so that alternate control area definitions may include the same generating unit. It should be noted that only one instance within a control area should reference a specific generating unit. - */ + /** \brief A control area generating unit. This class is needed so that alternate control area definitions may include the same generating unit. It should be noted that only one instance within a control area should reference a specific generating unit. */ class ControlAreaGeneratingUnit : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP ControlAreaGeneratingUnit(); ~ControlAreaGeneratingUnit() override; - CIMPP::ControlArea* ControlArea; /* The parent control area for the generating unit specifications. Default: 0 */ - CIMPP::GeneratingUnit* GeneratingUnit; /* The generating unit specified for this control area. Note that a control area should include a GeneratingUnit only once. Default: 0 */ + /** \brief The parent control area for the generating unit specifications. Default: 0 */ + CIMPP::ControlArea* ControlArea; + + /** \brief The generating unit specified for this control area. Note that a control area should include a GeneratingUnit only once. Default: 0 */ + CIMPP::GeneratingUnit* GeneratingUnit; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ControlAreaTypeKind.cpp b/CGMES_3.0.0/ControlAreaTypeKind.cpp index 48f6c0cb5..21a7b1dec 100644 --- a/CGMES_3.0.0/ControlAreaTypeKind.cpp +++ b/CGMES_3.0.0/ControlAreaTypeKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "ControlAreaTypeKind") + if (EnumSymbol.substr(0, pos) != "ControlAreaTypeKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "AGC") + if (EnumSymbol == "AGC") { rop = ControlAreaTypeKind::AGC; return lop; } - if(EnumSymbol == "Forecast") + if (EnumSymbol == "Forecast") { rop = ControlAreaTypeKind::Forecast; return lop; } - if(EnumSymbol == "Interchange") + if (EnumSymbol == "Interchange") { rop = ControlAreaTypeKind::Interchange; return lop; diff --git a/CGMES_3.0.0/ControlAreaTypeKind.hpp b/CGMES_3.0.0/ControlAreaTypeKind.hpp index 025df1d5c..4597eedd8 100644 --- a/CGMES_3.0.0/ControlAreaTypeKind.hpp +++ b/CGMES_3.0.0/ControlAreaTypeKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The type of control area. - */ + /** \brief The type of control area. */ class ControlAreaTypeKind { public: enum ControlAreaTypeKind_ENUM { - /** - * Used for automatic generation control. - */ + /** Used for automatic generation control. */ AGC, - /** - * Used for load forecast. - */ + /** Used for load forecast. */ Forecast, - /** - * Used for interchange specification or control. - */ + /** Used for interchange specification or control. */ Interchange, }; diff --git a/CGMES_3.0.0/CoordinateSystem.cpp b/CGMES_3.0.0/CoordinateSystem.cpp index 7e7b36b9d..59f293cfa 100644 --- a/CGMES_3.0.0/CoordinateSystem.cpp +++ b/CGMES_3.0.0/CoordinateSystem.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "Location.hpp" -#include "String.hpp" using namespace CIMPP; -CoordinateSystem::CoordinateSystem() {}; -CoordinateSystem::~CoordinateSystem() {}; +CoordinateSystem::CoordinateSystem() {} +CoordinateSystem::~CoordinateSystem() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ CoordinateSystem::getPossibleProfilesForAttributes() const return map; } - -bool assign_CoordinateSystem_crsUrn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (CoordinateSystem* element = dynamic_cast(BaseClass_ptr1)) - { - element->crsUrn = buffer.str(); - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_Location_CoordinateSystem(BaseClass*, BaseClass*); bool assign_CoordinateSystem_Locations(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_CoordinateSystem_Locations(BaseClass* BaseClass_ptr1, BaseClass* Bas return false; } +bool assign_CoordinateSystem_crsUrn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + CoordinateSystem* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + element->crsUrn = buffer.str(); + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_CoordinateSystem_crsUrn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CoordinateSystem* element = dynamic_cast(BaseClass_ptr1)) + const CoordinateSystem* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->crsUrn; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_CoordinateSystem_crsUrn(const BaseClass* BaseClass_ptr1, std::stringstr return false; } - - const char CoordinateSystem::debugName[] = "CoordinateSystem"; const char* CoordinateSystem::debugString() const { @@ -98,17 +96,17 @@ const char* CoordinateSystem::debugString() const void CoordinateSystem::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:CoordinateSystem"), &CoordinateSystem_factory)); + factory_map.emplace("cim:CoordinateSystem", &CoordinateSystem_factory); } void CoordinateSystem::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:CoordinateSystem.crsUrn"), &assign_CoordinateSystem_crsUrn)); + assign_map.emplace("cim:CoordinateSystem.crsUrn", &assign_CoordinateSystem_crsUrn); } void CoordinateSystem::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:CoordinateSystem.Locations"), &assign_CoordinateSystem_Locations)); + assign_map.emplace("cim:CoordinateSystem.Locations", &assign_CoordinateSystem_Locations); } void CoordinateSystem::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/CoordinateSystem.hpp b/CGMES_3.0.0/CoordinateSystem.hpp index 92235dba3..3c2c88d76 100644 --- a/CGMES_3.0.0/CoordinateSystem.hpp +++ b/CGMES_3.0.0/CoordinateSystem.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class Location; - /* - Coordinate reference system. - */ + /** \brief Coordinate reference system. */ class CoordinateSystem : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP CoordinateSystem(); ~CoordinateSystem() override; - std::list Locations; /* All locations described with position points in this coordinate system. Default: 0 */ - CIMPP::String crsUrn; /* A Uniform Resource Name (URN) for the coordinate reference system (crs) used to define `Location.PositionPoints`. An example would be the European Petroleum Survey Group (EPSG) code for a coordinate reference system, defined in URN under the Open Geospatial Consortium (OGC) namespace as: urn:ogc:def:crs:EPSG::XXXX, where XXXX is an EPSG code (a full list of codes can be found at the EPSG Registry web site http://www.epsg-registry.org/). To define the coordinate system as being WGS84 (latitude, longitude) using an EPSG OGC, this attribute would be urn:ogc:def:crs:EPSG::4236. A profile should limit this code to a set of allowed URNs agreed to by all sending and receiving parties. Default: '' */ + /** \brief All locations described with position points in this coordinate system. Default: 0 */ + std::list Locations; + + /** \brief A Uniform Resource Name (URN) for the coordinate reference system (crs) used to define `Location.PositionPoints`. An example would be the European Petroleum Survey Group (EPSG) code for a coordinate reference system, defined in URN under the Open Geospatial Consortium (OGC) namespace as: urn:ogc:def:crs:EPSG::XXXX, where XXXX is an EPSG code (a full list of codes can be found at the EPSG Registry web site http://www.epsg-registry.org/). To define the coordinate system as being WGS84 (latitude, longitude) using an EPSG OGC, this attribute would be urn:ogc:def:crs:EPSG::4236. A profile should limit this code to a set of allowed URNs agreed to by all sending and receiving parties. Default: '' */ + CIMPP::String crsUrn; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/CrossCompoundTurbineGovernorDynamics.cpp b/CGMES_3.0.0/CrossCompoundTurbineGovernorDynamics.cpp index 6f1b5038a..b5d193524 100644 --- a/CGMES_3.0.0/CrossCompoundTurbineGovernorDynamics.cpp +++ b/CGMES_3.0.0/CrossCompoundTurbineGovernorDynamics.cpp @@ -8,13 +8,12 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "SynchronousMachineDynamics.hpp" #include "SynchronousMachineDynamics.hpp" using namespace CIMPP; -CrossCompoundTurbineGovernorDynamics::CrossCompoundTurbineGovernorDynamics() : HighPressureSynchronousMachineDynamics(nullptr), LowPressureSynchronousMachineDynamics(nullptr) {}; -CrossCompoundTurbineGovernorDynamics::~CrossCompoundTurbineGovernorDynamics() {}; +CrossCompoundTurbineGovernorDynamics::CrossCompoundTurbineGovernorDynamics() : HighPressureSynchronousMachineDynamics(nullptr), LowPressureSynchronousMachineDynamics(nullptr) {} +CrossCompoundTurbineGovernorDynamics::~CrossCompoundTurbineGovernorDynamics() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +41,6 @@ CrossCompoundTurbineGovernorDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_SynchronousMachineDynamics_CrossCompoundTurbineGovernorDyanmics(BaseClass*, BaseClass*); bool assign_CrossCompoundTurbineGovernorDynamics_HighPressureSynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +57,7 @@ bool assign_CrossCompoundTurbineGovernorDynamics_HighPressureSynchronousMachineD } return false; } + bool assign_SynchronousMachineDynamics_CrossCompoundTurbineGovernorDynamics(BaseClass*, BaseClass*); bool assign_CrossCompoundTurbineGovernorDynamics_LowPressureSynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +75,10 @@ bool assign_CrossCompoundTurbineGovernorDynamics_LowPressureSynchronousMachineDy return false; } - bool get_CrossCompoundTurbineGovernorDynamics_HighPressureSynchronousMachineDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const CrossCompoundTurbineGovernorDynamics* element = dynamic_cast(BaseClass_ptr1)) + const CrossCompoundTurbineGovernorDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->HighPressureSynchronousMachineDynamics != 0) { @@ -93,7 +91,8 @@ bool get_CrossCompoundTurbineGovernorDynamics_HighPressureSynchronousMachineDyna bool get_CrossCompoundTurbineGovernorDynamics_LowPressureSynchronousMachineDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const CrossCompoundTurbineGovernorDynamics* element = dynamic_cast(BaseClass_ptr1)) + const CrossCompoundTurbineGovernorDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->LowPressureSynchronousMachineDynamics != 0) { @@ -104,7 +103,6 @@ bool get_CrossCompoundTurbineGovernorDynamics_LowPressureSynchronousMachineDynam return false; } - const char CrossCompoundTurbineGovernorDynamics::debugName[] = "CrossCompoundTurbineGovernorDynamics"; const char* CrossCompoundTurbineGovernorDynamics::debugString() const { @@ -113,7 +111,7 @@ const char* CrossCompoundTurbineGovernorDynamics::debugString() const void CrossCompoundTurbineGovernorDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:CrossCompoundTurbineGovernorDynamics"), &CrossCompoundTurbineGovernorDynamics_factory)); + factory_map.emplace("cim:CrossCompoundTurbineGovernorDynamics", &CrossCompoundTurbineGovernorDynamics_factory); } void CrossCompoundTurbineGovernorDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +120,8 @@ void CrossCompoundTurbineGovernorDynamics::addPrimitiveAssignFnsToMap(std::unord void CrossCompoundTurbineGovernorDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:CrossCompoundTurbineGovernorDynamics.HighPressureSynchronousMachineDynamics"), &assign_CrossCompoundTurbineGovernorDynamics_HighPressureSynchronousMachineDynamics)); - assign_map.insert(std::make_pair(std::string("cim:CrossCompoundTurbineGovernorDynamics.LowPressureSynchronousMachineDynamics"), &assign_CrossCompoundTurbineGovernorDynamics_LowPressureSynchronousMachineDynamics)); + assign_map.emplace("cim:CrossCompoundTurbineGovernorDynamics.HighPressureSynchronousMachineDynamics", &assign_CrossCompoundTurbineGovernorDynamics_HighPressureSynchronousMachineDynamics); + assign_map.emplace("cim:CrossCompoundTurbineGovernorDynamics.LowPressureSynchronousMachineDynamics", &assign_CrossCompoundTurbineGovernorDynamics_LowPressureSynchronousMachineDynamics); } void CrossCompoundTurbineGovernorDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/CrossCompoundTurbineGovernorDynamics.hpp b/CGMES_3.0.0/CrossCompoundTurbineGovernorDynamics.hpp index e3da361fb..b85917963 100644 --- a/CGMES_3.0.0/CrossCompoundTurbineGovernorDynamics.hpp +++ b/CGMES_3.0.0/CrossCompoundTurbineGovernorDynamics.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class SynchronousMachineDynamics; - /* - Turbine-governor cross-compound function block whose behaviour is described by reference to a standard model or by definition of a user-defined model. - */ + /** \brief Turbine-governor cross-compound function block whose behaviour is described by reference to a standard model or by definition of a user-defined model. */ class CrossCompoundTurbineGovernorDynamics : public DynamicsFunctionBlock { public: @@ -27,8 +25,11 @@ namespace CIMPP CrossCompoundTurbineGovernorDynamics(); ~CrossCompoundTurbineGovernorDynamics() override; - CIMPP::SynchronousMachineDynamics* HighPressureSynchronousMachineDynamics; /* High-pressure synchronous machine with which this cross-compound turbine governor is associated. Default: 0 */ - CIMPP::SynchronousMachineDynamics* LowPressureSynchronousMachineDynamics; /* Low-pressure synchronous machine with which this cross-compound turbine governor is associated. Default: 0 */ + /** \brief High-pressure synchronous machine with which this cross-compound turbine governor is associated. Default: 0 */ + CIMPP::SynchronousMachineDynamics* HighPressureSynchronousMachineDynamics; + + /** \brief Low-pressure synchronous machine with which this cross-compound turbine governor is associated. Default: 0 */ + CIMPP::SynchronousMachineDynamics* LowPressureSynchronousMachineDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/CsConverter.cpp b/CGMES_3.0.0/CsConverter.cpp index 5f26d6550..cb7fec9a1 100644 --- a/CGMES_3.0.0/CsConverter.cpp +++ b/CGMES_3.0.0/CsConverter.cpp @@ -9,25 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "CSCDynamics.hpp" -#include "AngleDegrees.hpp" -#include "AngleDegrees.hpp" -#include "AngleDegrees.hpp" -#include "AngleDegrees.hpp" -#include "CurrentFlow.hpp" -#include "AngleDegrees.hpp" -#include "AngleDegrees.hpp" -#include "CurrentFlow.hpp" -#include "CsOperatingModeKind.hpp" -#include "CsPpccControlKind.hpp" -#include "CurrentFlow.hpp" -#include "AngleDegrees.hpp" -#include "AngleDegrees.hpp" -#include "CurrentFlow.hpp" using namespace CIMPP; -CsConverter::CsConverter() : CSCDynamics(nullptr) {}; -CsConverter::~CsConverter() {}; +CsConverter::CsConverter() : CSCDynamics(nullptr) {} +CsConverter::~CsConverter() {} static const std::list PossibleProfilesForClass = { @@ -71,210 +57,224 @@ CsConverter::getPossibleProfilesForAttributes() const return map; } +bool assign_CSCDynamics_CSConverter(BaseClass*, BaseClass*); +bool assign_CsConverter_CSCDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + CsConverter* element = dynamic_cast(BaseClass_ptr1); + CSCDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->CSCDynamics != element2) + { + element->CSCDynamics = element2; + return assign_CSCDynamics_CSConverter(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_CsConverter_alpha(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_alpha(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->alpha; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_gamma(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_gamma(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gamma; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_maxAlpha(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_maxAlpha(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxAlpha; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_maxGamma(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_maxGamma(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxGamma; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_maxIdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_maxIdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxIdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_minAlpha(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_minAlpha(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minAlpha; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_minGamma(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_minGamma(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minGamma; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_minIdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_minIdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minIdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_operatingMode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_operatingMode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->operatingMode; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_pPccControl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_pPccControl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pPccControl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_ratedIdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_ratedIdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedIdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_targetAlpha(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_targetAlpha(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->targetAlpha; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_targetGamma(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CsConverter_targetGamma(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) + CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->targetGamma; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CsConverter_targetIdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (CsConverter* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->targetIdc; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - -bool assign_CSCDynamics_CSConverter(BaseClass*, BaseClass*); -bool assign_CsConverter_CSCDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_CsConverter_targetIdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { CsConverter* element = dynamic_cast(BaseClass_ptr1); - CSCDynamics* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->CSCDynamics != element2) + buffer >> element->targetIdc; + if (!buffer.fail()) { - element->CSCDynamics = element2; - return assign_CSCDynamics_CSConverter(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_CsConverter_alpha(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->alpha; if (!buffer.str().empty()) @@ -288,7 +288,8 @@ bool get_CsConverter_alpha(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_CsConverter_gamma(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gamma; if (!buffer.str().empty()) @@ -302,7 +303,8 @@ bool get_CsConverter_gamma(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_CsConverter_maxAlpha(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxAlpha; if (!buffer.str().empty()) @@ -316,7 +318,8 @@ bool get_CsConverter_maxAlpha(const BaseClass* BaseClass_ptr1, std::stringstream bool get_CsConverter_maxGamma(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxGamma; if (!buffer.str().empty()) @@ -330,7 +333,8 @@ bool get_CsConverter_maxGamma(const BaseClass* BaseClass_ptr1, std::stringstream bool get_CsConverter_maxIdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxIdc; if (!buffer.str().empty()) @@ -344,7 +348,8 @@ bool get_CsConverter_maxIdc(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_CsConverter_minAlpha(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minAlpha; if (!buffer.str().empty()) @@ -358,7 +363,8 @@ bool get_CsConverter_minAlpha(const BaseClass* BaseClass_ptr1, std::stringstream bool get_CsConverter_minGamma(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minGamma; if (!buffer.str().empty()) @@ -372,7 +378,8 @@ bool get_CsConverter_minGamma(const BaseClass* BaseClass_ptr1, std::stringstream bool get_CsConverter_minIdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minIdc; if (!buffer.str().empty()) @@ -384,11 +391,12 @@ bool get_CsConverter_minIdc(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } -bool get_CsConverter_ratedIdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_CsConverter_operatingMode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->ratedIdc; + buffer << element->operatingMode; if (!buffer.str().empty()) { return true; @@ -398,11 +406,12 @@ bool get_CsConverter_ratedIdc(const BaseClass* BaseClass_ptr1, std::stringstream return false; } -bool get_CsConverter_targetAlpha(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_CsConverter_pPccControl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->targetAlpha; + buffer << element->pPccControl; if (!buffer.str().empty()) { return true; @@ -412,11 +421,12 @@ bool get_CsConverter_targetAlpha(const BaseClass* BaseClass_ptr1, std::stringstr return false; } -bool get_CsConverter_targetGamma(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_CsConverter_ratedIdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->targetGamma; + buffer << element->ratedIdc; if (!buffer.str().empty()) { return true; @@ -426,11 +436,12 @@ bool get_CsConverter_targetGamma(const BaseClass* BaseClass_ptr1, std::stringstr return false; } -bool get_CsConverter_targetIdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_CsConverter_targetAlpha(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->targetIdc; + buffer << element->targetAlpha; if (!buffer.str().empty()) { return true; @@ -440,13 +451,12 @@ bool get_CsConverter_targetIdc(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } - - -bool get_CsConverter_operatingMode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_CsConverter_targetGamma(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->operatingMode; + buffer << element->targetGamma; if (!buffer.str().empty()) { return true; @@ -456,11 +466,12 @@ bool get_CsConverter_operatingMode(const BaseClass* BaseClass_ptr1, std::strings return false; } -bool get_CsConverter_pPccControl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_CsConverter_targetIdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CsConverter* element = dynamic_cast(BaseClass_ptr1)) + const CsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->pPccControl; + buffer << element->targetIdc; if (!buffer.str().empty()) { return true; @@ -478,30 +489,30 @@ const char* CsConverter::debugString() const void CsConverter::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:CsConverter"), &CsConverter_factory)); + factory_map.emplace("cim:CsConverter", &CsConverter_factory); } void CsConverter::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:CsConverter.alpha"), &assign_CsConverter_alpha)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.gamma"), &assign_CsConverter_gamma)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.maxAlpha"), &assign_CsConverter_maxAlpha)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.maxGamma"), &assign_CsConverter_maxGamma)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.maxIdc"), &assign_CsConverter_maxIdc)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.minAlpha"), &assign_CsConverter_minAlpha)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.minGamma"), &assign_CsConverter_minGamma)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.minIdc"), &assign_CsConverter_minIdc)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.operatingMode"), &assign_CsConverter_operatingMode)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.pPccControl"), &assign_CsConverter_pPccControl)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.ratedIdc"), &assign_CsConverter_ratedIdc)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.targetAlpha"), &assign_CsConverter_targetAlpha)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.targetGamma"), &assign_CsConverter_targetGamma)); - assign_map.insert(std::make_pair(std::string("cim:CsConverter.targetIdc"), &assign_CsConverter_targetIdc)); + assign_map.emplace("cim:CsConverter.alpha", &assign_CsConverter_alpha); + assign_map.emplace("cim:CsConverter.gamma", &assign_CsConverter_gamma); + assign_map.emplace("cim:CsConverter.maxAlpha", &assign_CsConverter_maxAlpha); + assign_map.emplace("cim:CsConverter.maxGamma", &assign_CsConverter_maxGamma); + assign_map.emplace("cim:CsConverter.maxIdc", &assign_CsConverter_maxIdc); + assign_map.emplace("cim:CsConverter.minAlpha", &assign_CsConverter_minAlpha); + assign_map.emplace("cim:CsConverter.minGamma", &assign_CsConverter_minGamma); + assign_map.emplace("cim:CsConverter.minIdc", &assign_CsConverter_minIdc); + assign_map.emplace("cim:CsConverter.operatingMode", &assign_CsConverter_operatingMode); + assign_map.emplace("cim:CsConverter.pPccControl", &assign_CsConverter_pPccControl); + assign_map.emplace("cim:CsConverter.ratedIdc", &assign_CsConverter_ratedIdc); + assign_map.emplace("cim:CsConverter.targetAlpha", &assign_CsConverter_targetAlpha); + assign_map.emplace("cim:CsConverter.targetGamma", &assign_CsConverter_targetGamma); + assign_map.emplace("cim:CsConverter.targetIdc", &assign_CsConverter_targetIdc); } void CsConverter::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:CsConverter.CSCDynamics"), &assign_CsConverter_CSCDynamics)); + assign_map.emplace("cim:CsConverter.CSCDynamics", &assign_CsConverter_CSCDynamics); } void CsConverter::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/CsConverter.hpp b/CGMES_3.0.0/CsConverter.hpp index d20c4881b..6dff81699 100644 --- a/CGMES_3.0.0/CsConverter.hpp +++ b/CGMES_3.0.0/CsConverter.hpp @@ -21,9 +21,7 @@ namespace CIMPP { class CSCDynamics; - /* - DC side of the current source converter (CSC). The firing angle controls the dc voltage at the converter, both for rectifier and inverter. The difference between the dc voltages of the rectifier and inverter determines the dc current. The extinction angle is used to limit the dc voltage at the inverter, if needed, and is not used in active power control. The firing angle, transformer tap position and number of connected filters are the primary means to control a current source dc line. Higher level controls are built on top, e.g. dc voltage, dc current and active power. From a steady state perspective it is sufficient to specify the wanted active power transfer (ACDCConverter.targetPpcc) and the control functions will set the dc voltage, dc current, firing angle, transformer tap position and number of connected filters to meet this. Therefore attributes targetAlpha and targetGamma are not applicable in this case. The reactive power consumed by the converter is a function of the firing angle, transformer tap position and number of connected filter, which can be approximated with half of the active power. The losses is a function of the dc voltage and dc current. The attributes minAlpha and maxAlpha define the range of firing angles for rectifier operation between which no discrete tap changer action takes place. The range is typically 10-18 degrees. The attributes minGamma and maxGamma define the range of extinction angles for inverter operation between which no discrete tap changer action takes place. The range is typically 17-20 degrees. - */ + /** \brief DC side of the current source converter (CSC). The firing angle controls the dc voltage at the converter, both for rectifier and inverter. The difference between the dc voltages of the rectifier and inverter determines the dc current. The extinction angle is used to limit the dc voltage at the inverter, if needed, and is not used in active power control. The firing angle, transformer tap position and number of connected filters are the primary means to control a current source dc line. Higher level controls are built on top, e.g. dc voltage, dc current and active power. From a steady state perspective it is sufficient to specify the wanted active power transfer (ACDCConverter.targetPpcc) and the control functions will set the dc voltage, dc current, firing angle, transformer tap position and number of connected filters to meet this. Therefore attributes targetAlpha and targetGamma are not applicable in this case. The reactive power consumed by the converter is a function of the firing angle, transformer tap position and number of connected filter, which can be approximated with half of the active power. The losses is a function of the dc voltage and dc current. The attributes minAlpha and maxAlpha define the range of firing angles for rectifier operation between which no discrete tap changer action takes place. The range is typically 10-18 degrees. The attributes minGamma and maxGamma define the range of extinction angles for inverter operation between which no discrete tap changer action takes place. The range is typically 17-20 degrees. */ class CsConverter : public ACDCConverter { public: @@ -31,21 +29,50 @@ namespace CIMPP CsConverter(); ~CsConverter() override; - CIMPP::CSCDynamics* CSCDynamics; /* Current source converter dynamics model used to describe dynamic behaviour of this converter. Default: 0 */ - CIMPP::AngleDegrees alpha; /* Firing angle that determines the dc voltage at the converter dc terminal. Typical value between 10 degrees and 18 degrees for a rectifier. It is converter`s state variable, result from power flow. The attribute shall be a positive value. Default: nullptr */ - CIMPP::AngleDegrees gamma; /* Extinction angle. It is used to limit the dc voltage at the inverter if needed. Typical value between 17 degrees and 20 degrees for an inverter. It is converter`s state variable, result from power flow. The attribute shall be a positive value. Default: nullptr */ - CIMPP::AngleDegrees maxAlpha; /* Maximum firing angle. It is converter`s configuration data used in power flow. The attribute shall be a positive value. Default: nullptr */ - CIMPP::AngleDegrees maxGamma; /* Maximum extinction angle. It is converter`s configuration data used in power flow. The attribute shall be a positive value. Default: nullptr */ - CIMPP::CurrentFlow maxIdc; /* The maximum direct current (Id) on the DC side at which the converter should operate. It is converter`s configuration data use in power flow. The attribute shall be a positive value. Default: nullptr */ - CIMPP::AngleDegrees minAlpha; /* Minimum firing angle. It is converter`s configuration data used in power flow. The attribute shall be a positive value. Default: nullptr */ - CIMPP::AngleDegrees minGamma; /* Minimum extinction angle. It is converter`s configuration data used in power flow. The attribute shall be a positive value. Default: nullptr */ - CIMPP::CurrentFlow minIdc; /* The minimum direct current (Id) on the DC side at which the converter should operate. It is converter`s configuration data used in power flow. The attribute shall be a positive value. Default: nullptr */ - CIMPP::CsOperatingModeKind operatingMode; /* Indicates whether the DC pole is operating as an inverter or as a rectifier. It is converter`s control variable used in power flow. Default: 0 */ - CIMPP::CsPpccControlKind pPccControl; /* Kind of active power control. Default: 0 */ - CIMPP::CurrentFlow ratedIdc; /* Rated converter DC current, also called IdN. The attribute shall be a positive value. It is converter`s configuration data used in power flow. Default: nullptr */ - CIMPP::AngleDegrees targetAlpha; /* Target firing angle. It is converter`s control variable used in power flow. It is only applicable for rectifier if continuous tap changer control is used. Allowed values are within the range minAlpha&lt;=targetAlpha&lt;=maxAlpha. The attribute shall be a positive value. Default: nullptr */ - CIMPP::AngleDegrees targetGamma; /* Target extinction angle. It is converter`s control variable used in power flow. It is only applicable for inverter if continuous tap changer control is used. Allowed values are within the range minGamma&lt;=targetGamma&lt;=maxGamma. The attribute shall be a positive value. Default: nullptr */ - CIMPP::CurrentFlow targetIdc; /* DC current target value. It is converter`s control variable used in power flow. The attribute shall be a positive value. Default: nullptr */ + /** \brief Current source converter dynamics model used to describe dynamic behaviour of this converter. Default: 0 */ + CIMPP::CSCDynamics* CSCDynamics; + + /** \brief Firing angle that determines the dc voltage at the converter dc terminal. Typical value between 10 degrees and 18 degrees for a rectifier. It is converter`s state variable, result from power flow. The attribute shall be a positive value. Default: nullptr */ + CIMPP::AngleDegrees alpha; + + /** \brief Extinction angle. It is used to limit the dc voltage at the inverter if needed. Typical value between 17 degrees and 20 degrees for an inverter. It is converter`s state variable, result from power flow. The attribute shall be a positive value. Default: nullptr */ + CIMPP::AngleDegrees gamma; + + /** \brief Maximum firing angle. It is converter`s configuration data used in power flow. The attribute shall be a positive value. Default: nullptr */ + CIMPP::AngleDegrees maxAlpha; + + /** \brief Maximum extinction angle. It is converter`s configuration data used in power flow. The attribute shall be a positive value. Default: nullptr */ + CIMPP::AngleDegrees maxGamma; + + /** \brief The maximum direct current (Id) on the DC side at which the converter should operate. It is converter`s configuration data use in power flow. The attribute shall be a positive value. Default: nullptr */ + CIMPP::CurrentFlow maxIdc; + + /** \brief Minimum firing angle. It is converter`s configuration data used in power flow. The attribute shall be a positive value. Default: nullptr */ + CIMPP::AngleDegrees minAlpha; + + /** \brief Minimum extinction angle. It is converter`s configuration data used in power flow. The attribute shall be a positive value. Default: nullptr */ + CIMPP::AngleDegrees minGamma; + + /** \brief The minimum direct current (Id) on the DC side at which the converter should operate. It is converter`s configuration data used in power flow. The attribute shall be a positive value. Default: nullptr */ + CIMPP::CurrentFlow minIdc; + + /** \brief Indicates whether the DC pole is operating as an inverter or as a rectifier. It is converter`s control variable used in power flow. Default: 0 */ + CIMPP::CsOperatingModeKind operatingMode; + + /** \brief Kind of active power control. Default: 0 */ + CIMPP::CsPpccControlKind pPccControl; + + /** \brief Rated converter DC current, also called IdN. The attribute shall be a positive value. It is converter`s configuration data used in power flow. Default: nullptr */ + CIMPP::CurrentFlow ratedIdc; + + /** \brief Target firing angle. It is converter`s control variable used in power flow. It is only applicable for rectifier if continuous tap changer control is used. Allowed values are within the range minAlpha&lt;=targetAlpha&lt;=maxAlpha. The attribute shall be a positive value. Default: nullptr */ + CIMPP::AngleDegrees targetAlpha; + + /** \brief Target extinction angle. It is converter`s control variable used in power flow. It is only applicable for inverter if continuous tap changer control is used. Allowed values are within the range minGamma&lt;=targetGamma&lt;=maxGamma. The attribute shall be a positive value. Default: nullptr */ + CIMPP::AngleDegrees targetGamma; + + /** \brief DC current target value. It is converter`s control variable used in power flow. The attribute shall be a positive value. Default: nullptr */ + CIMPP::CurrentFlow targetIdc; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/CsOperatingModeKind.cpp b/CGMES_3.0.0/CsOperatingModeKind.cpp index 61074c399..3f119efe8 100644 --- a/CGMES_3.0.0/CsOperatingModeKind.cpp +++ b/CGMES_3.0.0/CsOperatingModeKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "CsOperatingModeKind") + if (EnumSymbol.substr(0, pos) != "CsOperatingModeKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,12 +50,12 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "inverter") + if (EnumSymbol == "inverter") { rop = CsOperatingModeKind::inverter; return lop; } - if(EnumSymbol == "rectifier") + if (EnumSymbol == "rectifier") { rop = CsOperatingModeKind::rectifier; return lop; diff --git a/CGMES_3.0.0/CsOperatingModeKind.hpp b/CGMES_3.0.0/CsOperatingModeKind.hpp index 0f855a35c..ee9f3833d 100644 --- a/CGMES_3.0.0/CsOperatingModeKind.hpp +++ b/CGMES_3.0.0/CsOperatingModeKind.hpp @@ -9,21 +9,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Operating mode for HVDC line operating as Current Source Converter. - */ + /** \brief Operating mode for HVDC line operating as Current Source Converter. */ class CsOperatingModeKind { public: enum CsOperatingModeKind_ENUM { - /** - * Operating as inverter, which is the power receiving end. - */ + /** Operating as inverter, which is the power receiving end. */ inverter, - /** - * Operating as rectifier, which is the power sending end. - */ + /** Operating as rectifier, which is the power sending end. */ rectifier, }; diff --git a/CGMES_3.0.0/CsPpccControlKind.cpp b/CGMES_3.0.0/CsPpccControlKind.cpp index e4e9aa9b2..ff79e272f 100644 --- a/CGMES_3.0.0/CsPpccControlKind.cpp +++ b/CGMES_3.0.0/CsPpccControlKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "CsPpccControlKind") + if (EnumSymbol.substr(0, pos) != "CsPpccControlKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "activePower") + if (EnumSymbol == "activePower") { rop = CsPpccControlKind::activePower; return lop; } - if(EnumSymbol == "dcVoltage") + if (EnumSymbol == "dcVoltage") { rop = CsPpccControlKind::dcVoltage; return lop; } - if(EnumSymbol == "dcCurrent") + if (EnumSymbol == "dcCurrent") { rop = CsPpccControlKind::dcCurrent; return lop; diff --git a/CGMES_3.0.0/CsPpccControlKind.hpp b/CGMES_3.0.0/CsPpccControlKind.hpp index 6ddd26742..263dd43e7 100644 --- a/CGMES_3.0.0/CsPpccControlKind.hpp +++ b/CGMES_3.0.0/CsPpccControlKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Active power control modes for HVDC line operating as Current Source Converter. - */ + /** \brief Active power control modes for HVDC line operating as Current Source Converter. */ class CsPpccControlKind { public: enum CsPpccControlKind_ENUM { - /** - * Control is active power control at AC side, at point of common coupling. Target is provided by ACDCConverter.targetPpcc. - */ + /** Control is active power control at AC side, at point of common coupling. Target is provided by ACDCConverter.targetPpcc. */ activePower, - /** - * Control is DC voltage with target value provided by ACDCConverter.targetUdc. - */ + /** Control is DC voltage with target value provided by ACDCConverter.targetUdc. */ dcVoltage, - /** - * Control is DC current with target value provided by CsConverter.targetIdc. - */ + /** Control is DC current with target value provided by CsConverter.targetIdc. */ dcCurrent, }; diff --git a/CGMES_3.0.0/Currency.cpp b/CGMES_3.0.0/Currency.cpp index 42d2e490d..834373124 100644 --- a/CGMES_3.0.0/Currency.cpp +++ b/CGMES_3.0.0/Currency.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "Currency") + if (EnumSymbol.substr(0, pos) != "Currency") { lop.setstate(std::ios::failbit); return lop; @@ -50,807 +50,807 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "AED") + if (EnumSymbol == "AED") { rop = Currency::AED; return lop; } - if(EnumSymbol == "AFN") + if (EnumSymbol == "AFN") { rop = Currency::AFN; return lop; } - if(EnumSymbol == "ALL") + if (EnumSymbol == "ALL") { rop = Currency::ALL; return lop; } - if(EnumSymbol == "AMD") + if (EnumSymbol == "AMD") { rop = Currency::AMD; return lop; } - if(EnumSymbol == "ANG") + if (EnumSymbol == "ANG") { rop = Currency::ANG; return lop; } - if(EnumSymbol == "AOA") + if (EnumSymbol == "AOA") { rop = Currency::AOA; return lop; } - if(EnumSymbol == "ARS") + if (EnumSymbol == "ARS") { rop = Currency::ARS; return lop; } - if(EnumSymbol == "AUD") + if (EnumSymbol == "AUD") { rop = Currency::AUD; return lop; } - if(EnumSymbol == "AWG") + if (EnumSymbol == "AWG") { rop = Currency::AWG; return lop; } - if(EnumSymbol == "AZN") + if (EnumSymbol == "AZN") { rop = Currency::AZN; return lop; } - if(EnumSymbol == "BAM") + if (EnumSymbol == "BAM") { rop = Currency::BAM; return lop; } - if(EnumSymbol == "BBD") + if (EnumSymbol == "BBD") { rop = Currency::BBD; return lop; } - if(EnumSymbol == "BDT") + if (EnumSymbol == "BDT") { rop = Currency::BDT; return lop; } - if(EnumSymbol == "BGN") + if (EnumSymbol == "BGN") { rop = Currency::BGN; return lop; } - if(EnumSymbol == "BHD") + if (EnumSymbol == "BHD") { rop = Currency::BHD; return lop; } - if(EnumSymbol == "BIF") + if (EnumSymbol == "BIF") { rop = Currency::BIF; return lop; } - if(EnumSymbol == "BMD") + if (EnumSymbol == "BMD") { rop = Currency::BMD; return lop; } - if(EnumSymbol == "BND") + if (EnumSymbol == "BND") { rop = Currency::BND; return lop; } - if(EnumSymbol == "BOB") + if (EnumSymbol == "BOB") { rop = Currency::BOB; return lop; } - if(EnumSymbol == "BOV") + if (EnumSymbol == "BOV") { rop = Currency::BOV; return lop; } - if(EnumSymbol == "BRL") + if (EnumSymbol == "BRL") { rop = Currency::BRL; return lop; } - if(EnumSymbol == "BSD") + if (EnumSymbol == "BSD") { rop = Currency::BSD; return lop; } - if(EnumSymbol == "BTN") + if (EnumSymbol == "BTN") { rop = Currency::BTN; return lop; } - if(EnumSymbol == "BWP") + if (EnumSymbol == "BWP") { rop = Currency::BWP; return lop; } - if(EnumSymbol == "BYR") + if (EnumSymbol == "BYR") { rop = Currency::BYR; return lop; } - if(EnumSymbol == "BZD") + if (EnumSymbol == "BZD") { rop = Currency::BZD; return lop; } - if(EnumSymbol == "CAD") + if (EnumSymbol == "CAD") { rop = Currency::CAD; return lop; } - if(EnumSymbol == "CDF") + if (EnumSymbol == "CDF") { rop = Currency::CDF; return lop; } - if(EnumSymbol == "CHF") + if (EnumSymbol == "CHF") { rop = Currency::CHF; return lop; } - if(EnumSymbol == "CLF") + if (EnumSymbol == "CLF") { rop = Currency::CLF; return lop; } - if(EnumSymbol == "CLP") + if (EnumSymbol == "CLP") { rop = Currency::CLP; return lop; } - if(EnumSymbol == "CNY") + if (EnumSymbol == "CNY") { rop = Currency::CNY; return lop; } - if(EnumSymbol == "COP") + if (EnumSymbol == "COP") { rop = Currency::COP; return lop; } - if(EnumSymbol == "COU") + if (EnumSymbol == "COU") { rop = Currency::COU; return lop; } - if(EnumSymbol == "CRC") + if (EnumSymbol == "CRC") { rop = Currency::CRC; return lop; } - if(EnumSymbol == "CUC") + if (EnumSymbol == "CUC") { rop = Currency::CUC; return lop; } - if(EnumSymbol == "CUP") + if (EnumSymbol == "CUP") { rop = Currency::CUP; return lop; } - if(EnumSymbol == "CVE") + if (EnumSymbol == "CVE") { rop = Currency::CVE; return lop; } - if(EnumSymbol == "CZK") + if (EnumSymbol == "CZK") { rop = Currency::CZK; return lop; } - if(EnumSymbol == "DJF") + if (EnumSymbol == "DJF") { rop = Currency::DJF; return lop; } - if(EnumSymbol == "DKK") + if (EnumSymbol == "DKK") { rop = Currency::DKK; return lop; } - if(EnumSymbol == "DOP") + if (EnumSymbol == "DOP") { rop = Currency::DOP; return lop; } - if(EnumSymbol == "DZD") + if (EnumSymbol == "DZD") { rop = Currency::DZD; return lop; } - if(EnumSymbol == "EEK") + if (EnumSymbol == "EEK") { rop = Currency::EEK; return lop; } - if(EnumSymbol == "EGP") + if (EnumSymbol == "EGP") { rop = Currency::EGP; return lop; } - if(EnumSymbol == "ERN") + if (EnumSymbol == "ERN") { rop = Currency::ERN; return lop; } - if(EnumSymbol == "ETB") + if (EnumSymbol == "ETB") { rop = Currency::ETB; return lop; } - if(EnumSymbol == "EUR") + if (EnumSymbol == "EUR") { rop = Currency::EUR; return lop; } - if(EnumSymbol == "FJD") + if (EnumSymbol == "FJD") { rop = Currency::FJD; return lop; } - if(EnumSymbol == "FKP") + if (EnumSymbol == "FKP") { rop = Currency::FKP; return lop; } - if(EnumSymbol == "GBP") + if (EnumSymbol == "GBP") { rop = Currency::GBP; return lop; } - if(EnumSymbol == "GEL") + if (EnumSymbol == "GEL") { rop = Currency::GEL; return lop; } - if(EnumSymbol == "GHS") + if (EnumSymbol == "GHS") { rop = Currency::GHS; return lop; } - if(EnumSymbol == "GIP") + if (EnumSymbol == "GIP") { rop = Currency::GIP; return lop; } - if(EnumSymbol == "GMD") + if (EnumSymbol == "GMD") { rop = Currency::GMD; return lop; } - if(EnumSymbol == "GNF") + if (EnumSymbol == "GNF") { rop = Currency::GNF; return lop; } - if(EnumSymbol == "GTQ") + if (EnumSymbol == "GTQ") { rop = Currency::GTQ; return lop; } - if(EnumSymbol == "GYD") + if (EnumSymbol == "GYD") { rop = Currency::GYD; return lop; } - if(EnumSymbol == "HKD") + if (EnumSymbol == "HKD") { rop = Currency::HKD; return lop; } - if(EnumSymbol == "HNL") + if (EnumSymbol == "HNL") { rop = Currency::HNL; return lop; } - if(EnumSymbol == "HRK") + if (EnumSymbol == "HRK") { rop = Currency::HRK; return lop; } - if(EnumSymbol == "HTG") + if (EnumSymbol == "HTG") { rop = Currency::HTG; return lop; } - if(EnumSymbol == "HUF") + if (EnumSymbol == "HUF") { rop = Currency::HUF; return lop; } - if(EnumSymbol == "IDR") + if (EnumSymbol == "IDR") { rop = Currency::IDR; return lop; } - if(EnumSymbol == "ILS") + if (EnumSymbol == "ILS") { rop = Currency::ILS; return lop; } - if(EnumSymbol == "INR") + if (EnumSymbol == "INR") { rop = Currency::INR; return lop; } - if(EnumSymbol == "IQD") + if (EnumSymbol == "IQD") { rop = Currency::IQD; return lop; } - if(EnumSymbol == "IRR") + if (EnumSymbol == "IRR") { rop = Currency::IRR; return lop; } - if(EnumSymbol == "ISK") + if (EnumSymbol == "ISK") { rop = Currency::ISK; return lop; } - if(EnumSymbol == "JMD") + if (EnumSymbol == "JMD") { rop = Currency::JMD; return lop; } - if(EnumSymbol == "JOD") + if (EnumSymbol == "JOD") { rop = Currency::JOD; return lop; } - if(EnumSymbol == "JPY") + if (EnumSymbol == "JPY") { rop = Currency::JPY; return lop; } - if(EnumSymbol == "KES") + if (EnumSymbol == "KES") { rop = Currency::KES; return lop; } - if(EnumSymbol == "KGS") + if (EnumSymbol == "KGS") { rop = Currency::KGS; return lop; } - if(EnumSymbol == "KHR") + if (EnumSymbol == "KHR") { rop = Currency::KHR; return lop; } - if(EnumSymbol == "KMF") + if (EnumSymbol == "KMF") { rop = Currency::KMF; return lop; } - if(EnumSymbol == "KPW") + if (EnumSymbol == "KPW") { rop = Currency::KPW; return lop; } - if(EnumSymbol == "KRW") + if (EnumSymbol == "KRW") { rop = Currency::KRW; return lop; } - if(EnumSymbol == "KWD") + if (EnumSymbol == "KWD") { rop = Currency::KWD; return lop; } - if(EnumSymbol == "KYD") + if (EnumSymbol == "KYD") { rop = Currency::KYD; return lop; } - if(EnumSymbol == "KZT") + if (EnumSymbol == "KZT") { rop = Currency::KZT; return lop; } - if(EnumSymbol == "LAK") + if (EnumSymbol == "LAK") { rop = Currency::LAK; return lop; } - if(EnumSymbol == "LBP") + if (EnumSymbol == "LBP") { rop = Currency::LBP; return lop; } - if(EnumSymbol == "LKR") + if (EnumSymbol == "LKR") { rop = Currency::LKR; return lop; } - if(EnumSymbol == "LRD") + if (EnumSymbol == "LRD") { rop = Currency::LRD; return lop; } - if(EnumSymbol == "LSL") + if (EnumSymbol == "LSL") { rop = Currency::LSL; return lop; } - if(EnumSymbol == "LTL") + if (EnumSymbol == "LTL") { rop = Currency::LTL; return lop; } - if(EnumSymbol == "LVL") + if (EnumSymbol == "LVL") { rop = Currency::LVL; return lop; } - if(EnumSymbol == "LYD") + if (EnumSymbol == "LYD") { rop = Currency::LYD; return lop; } - if(EnumSymbol == "MAD") + if (EnumSymbol == "MAD") { rop = Currency::MAD; return lop; } - if(EnumSymbol == "MDL") + if (EnumSymbol == "MDL") { rop = Currency::MDL; return lop; } - if(EnumSymbol == "MGA") + if (EnumSymbol == "MGA") { rop = Currency::MGA; return lop; } - if(EnumSymbol == "MKD") + if (EnumSymbol == "MKD") { rop = Currency::MKD; return lop; } - if(EnumSymbol == "MMK") + if (EnumSymbol == "MMK") { rop = Currency::MMK; return lop; } - if(EnumSymbol == "MNT") + if (EnumSymbol == "MNT") { rop = Currency::MNT; return lop; } - if(EnumSymbol == "MOP") + if (EnumSymbol == "MOP") { rop = Currency::MOP; return lop; } - if(EnumSymbol == "MRO") + if (EnumSymbol == "MRO") { rop = Currency::MRO; return lop; } - if(EnumSymbol == "MUR") + if (EnumSymbol == "MUR") { rop = Currency::MUR; return lop; } - if(EnumSymbol == "MVR") + if (EnumSymbol == "MVR") { rop = Currency::MVR; return lop; } - if(EnumSymbol == "MWK") + if (EnumSymbol == "MWK") { rop = Currency::MWK; return lop; } - if(EnumSymbol == "MXN") + if (EnumSymbol == "MXN") { rop = Currency::MXN; return lop; } - if(EnumSymbol == "MYR") + if (EnumSymbol == "MYR") { rop = Currency::MYR; return lop; } - if(EnumSymbol == "MZN") + if (EnumSymbol == "MZN") { rop = Currency::MZN; return lop; } - if(EnumSymbol == "NAD") + if (EnumSymbol == "NAD") { rop = Currency::NAD; return lop; } - if(EnumSymbol == "NGN") + if (EnumSymbol == "NGN") { rop = Currency::NGN; return lop; } - if(EnumSymbol == "NIO") + if (EnumSymbol == "NIO") { rop = Currency::NIO; return lop; } - if(EnumSymbol == "NOK") + if (EnumSymbol == "NOK") { rop = Currency::NOK; return lop; } - if(EnumSymbol == "NPR") + if (EnumSymbol == "NPR") { rop = Currency::NPR; return lop; } - if(EnumSymbol == "NZD") + if (EnumSymbol == "NZD") { rop = Currency::NZD; return lop; } - if(EnumSymbol == "OMR") + if (EnumSymbol == "OMR") { rop = Currency::OMR; return lop; } - if(EnumSymbol == "PAB") + if (EnumSymbol == "PAB") { rop = Currency::PAB; return lop; } - if(EnumSymbol == "PEN") + if (EnumSymbol == "PEN") { rop = Currency::PEN; return lop; } - if(EnumSymbol == "PGK") + if (EnumSymbol == "PGK") { rop = Currency::PGK; return lop; } - if(EnumSymbol == "PHP") + if (EnumSymbol == "PHP") { rop = Currency::PHP; return lop; } - if(EnumSymbol == "PKR") + if (EnumSymbol == "PKR") { rop = Currency::PKR; return lop; } - if(EnumSymbol == "PLN") + if (EnumSymbol == "PLN") { rop = Currency::PLN; return lop; } - if(EnumSymbol == "PYG") + if (EnumSymbol == "PYG") { rop = Currency::PYG; return lop; } - if(EnumSymbol == "QAR") + if (EnumSymbol == "QAR") { rop = Currency::QAR; return lop; } - if(EnumSymbol == "RON") + if (EnumSymbol == "RON") { rop = Currency::RON; return lop; } - if(EnumSymbol == "RSD") + if (EnumSymbol == "RSD") { rop = Currency::RSD; return lop; } - if(EnumSymbol == "RUB") + if (EnumSymbol == "RUB") { rop = Currency::RUB; return lop; } - if(EnumSymbol == "RWF") + if (EnumSymbol == "RWF") { rop = Currency::RWF; return lop; } - if(EnumSymbol == "SAR") + if (EnumSymbol == "SAR") { rop = Currency::SAR; return lop; } - if(EnumSymbol == "SBD") + if (EnumSymbol == "SBD") { rop = Currency::SBD; return lop; } - if(EnumSymbol == "SCR") + if (EnumSymbol == "SCR") { rop = Currency::SCR; return lop; } - if(EnumSymbol == "SDG") + if (EnumSymbol == "SDG") { rop = Currency::SDG; return lop; } - if(EnumSymbol == "SEK") + if (EnumSymbol == "SEK") { rop = Currency::SEK; return lop; } - if(EnumSymbol == "SGD") + if (EnumSymbol == "SGD") { rop = Currency::SGD; return lop; } - if(EnumSymbol == "SHP") + if (EnumSymbol == "SHP") { rop = Currency::SHP; return lop; } - if(EnumSymbol == "SLL") + if (EnumSymbol == "SLL") { rop = Currency::SLL; return lop; } - if(EnumSymbol == "SOS") + if (EnumSymbol == "SOS") { rop = Currency::SOS; return lop; } - if(EnumSymbol == "SRD") + if (EnumSymbol == "SRD") { rop = Currency::SRD; return lop; } - if(EnumSymbol == "STD") + if (EnumSymbol == "STD") { rop = Currency::STD; return lop; } - if(EnumSymbol == "SYP") + if (EnumSymbol == "SYP") { rop = Currency::SYP; return lop; } - if(EnumSymbol == "SZL") + if (EnumSymbol == "SZL") { rop = Currency::SZL; return lop; } - if(EnumSymbol == "THB") + if (EnumSymbol == "THB") { rop = Currency::THB; return lop; } - if(EnumSymbol == "TJS") + if (EnumSymbol == "TJS") { rop = Currency::TJS; return lop; } - if(EnumSymbol == "TMT") + if (EnumSymbol == "TMT") { rop = Currency::TMT; return lop; } - if(EnumSymbol == "TND") + if (EnumSymbol == "TND") { rop = Currency::TND; return lop; } - if(EnumSymbol == "TOP") + if (EnumSymbol == "TOP") { rop = Currency::TOP; return lop; } - if(EnumSymbol == "TRY") + if (EnumSymbol == "TRY") { rop = Currency::TRY; return lop; } - if(EnumSymbol == "TTD") + if (EnumSymbol == "TTD") { rop = Currency::TTD; return lop; } - if(EnumSymbol == "TWD") + if (EnumSymbol == "TWD") { rop = Currency::TWD; return lop; } - if(EnumSymbol == "TZS") + if (EnumSymbol == "TZS") { rop = Currency::TZS; return lop; } - if(EnumSymbol == "UAH") + if (EnumSymbol == "UAH") { rop = Currency::UAH; return lop; } - if(EnumSymbol == "UGX") + if (EnumSymbol == "UGX") { rop = Currency::UGX; return lop; } - if(EnumSymbol == "USD") + if (EnumSymbol == "USD") { rop = Currency::USD; return lop; } - if(EnumSymbol == "UYU") + if (EnumSymbol == "UYU") { rop = Currency::UYU; return lop; } - if(EnumSymbol == "UZS") + if (EnumSymbol == "UZS") { rop = Currency::UZS; return lop; } - if(EnumSymbol == "VEF") + if (EnumSymbol == "VEF") { rop = Currency::VEF; return lop; } - if(EnumSymbol == "VND") + if (EnumSymbol == "VND") { rop = Currency::VND; return lop; } - if(EnumSymbol == "VUV") + if (EnumSymbol == "VUV") { rop = Currency::VUV; return lop; } - if(EnumSymbol == "WST") + if (EnumSymbol == "WST") { rop = Currency::WST; return lop; } - if(EnumSymbol == "XAF") + if (EnumSymbol == "XAF") { rop = Currency::XAF; return lop; } - if(EnumSymbol == "XCD") + if (EnumSymbol == "XCD") { rop = Currency::XCD; return lop; } - if(EnumSymbol == "XOF") + if (EnumSymbol == "XOF") { rop = Currency::XOF; return lop; } - if(EnumSymbol == "XPF") + if (EnumSymbol == "XPF") { rop = Currency::XPF; return lop; } - if(EnumSymbol == "YER") + if (EnumSymbol == "YER") { rop = Currency::YER; return lop; } - if(EnumSymbol == "ZAR") + if (EnumSymbol == "ZAR") { rop = Currency::ZAR; return lop; } - if(EnumSymbol == "ZMK") + if (EnumSymbol == "ZMK") { rop = Currency::ZMK; return lop; } - if(EnumSymbol == "ZWL") + if (EnumSymbol == "ZWL") { rop = Currency::ZWL; return lop; diff --git a/CGMES_3.0.0/Currency.hpp b/CGMES_3.0.0/Currency.hpp index 21cec965c..c4b610a00 100644 --- a/CGMES_3.0.0/Currency.hpp +++ b/CGMES_3.0.0/Currency.hpp @@ -9,657 +9,333 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Monetary currencies. ISO 4217 standard including 3-character currency code. - */ + /** \brief Monetary currencies. ISO 4217 standard including 3-character currency code. */ class Currency { public: enum Currency_ENUM { - /** - * United Arab Emirates dirham. - */ + /** United Arab Emirates dirham. */ AED, - /** - * Afghan afghani. - */ + /** Afghan afghani. */ AFN, - /** - * Albanian lek. - */ + /** Albanian lek. */ ALL, - /** - * Armenian dram. - */ + /** Armenian dram. */ AMD, - /** - * Netherlands Antillean guilder. - */ + /** Netherlands Antillean guilder. */ ANG, - /** - * Angolan kwanza. - */ + /** Angolan kwanza. */ AOA, - /** - * Argentine peso. - */ + /** Argentine peso. */ ARS, - /** - * Australian dollar. - */ + /** Australian dollar. */ AUD, - /** - * Aruban florin. - */ + /** Aruban florin. */ AWG, - /** - * Azerbaijani manat. - */ + /** Azerbaijani manat. */ AZN, - /** - * Bosnia and Herzegovina convertible mark. - */ + /** Bosnia and Herzegovina convertible mark. */ BAM, - /** - * Barbados dollar. - */ + /** Barbados dollar. */ BBD, - /** - * Bangladeshi taka. - */ + /** Bangladeshi taka. */ BDT, - /** - * Bulgarian lev. - */ + /** Bulgarian lev. */ BGN, - /** - * Bahraini dinar. - */ + /** Bahraini dinar. */ BHD, - /** - * Burundian franc. - */ + /** Burundian franc. */ BIF, - /** - * Bermudian dollar (customarily known as Bermuda dollar). - */ + /** Bermudian dollar (customarily known as Bermuda dollar). */ BMD, - /** - * Brunei dollar. - */ + /** Brunei dollar. */ BND, - /** - * Boliviano. - */ + /** Boliviano. */ BOB, - /** - * Bolivian Mvdol (funds code). - */ + /** Bolivian Mvdol (funds code). */ BOV, - /** - * Brazilian real. - */ + /** Brazilian real. */ BRL, - /** - * Bahamian dollar. - */ + /** Bahamian dollar. */ BSD, - /** - * Bhutanese ngultrum. - */ + /** Bhutanese ngultrum. */ BTN, - /** - * Botswana pula. - */ + /** Botswana pula. */ BWP, - /** - * Belarusian ruble. - */ + /** Belarusian ruble. */ BYR, - /** - * Belize dollar. - */ + /** Belize dollar. */ BZD, - /** - * Canadian dollar. - */ + /** Canadian dollar. */ CAD, - /** - * Congolese franc. - */ + /** Congolese franc. */ CDF, - /** - * Swiss franc. - */ + /** Swiss franc. */ CHF, - /** - * Unidad de Fomento (funds code), Chile. - */ + /** Unidad de Fomento (funds code), Chile. */ CLF, - /** - * Chilean peso. - */ + /** Chilean peso. */ CLP, - /** - * Chinese yuan. - */ + /** Chinese yuan. */ CNY, - /** - * Colombian peso. - */ + /** Colombian peso. */ COP, - /** - * Unidad de Valor Real. - */ + /** Unidad de Valor Real. */ COU, - /** - * Costa Rican colon. - */ + /** Costa Rican colon. */ CRC, - /** - * Cuban convertible peso. - */ + /** Cuban convertible peso. */ CUC, - /** - * Cuban peso. - */ + /** Cuban peso. */ CUP, - /** - * Cape Verde escudo. - */ + /** Cape Verde escudo. */ CVE, - /** - * Czech koruna. - */ + /** Czech koruna. */ CZK, - /** - * Djiboutian franc. - */ + /** Djiboutian franc. */ DJF, - /** - * Danish krone. - */ + /** Danish krone. */ DKK, - /** - * Dominican peso. - */ + /** Dominican peso. */ DOP, - /** - * Algerian dinar. - */ + /** Algerian dinar. */ DZD, - /** - * Estonian kroon. - */ + /** Estonian kroon. */ EEK, - /** - * Egyptian pound. - */ + /** Egyptian pound. */ EGP, - /** - * Eritrean nakfa. - */ + /** Eritrean nakfa. */ ERN, - /** - * Ethiopian birr. - */ + /** Ethiopian birr. */ ETB, - /** - * Euro. - */ + /** Euro. */ EUR, - /** - * Fiji dollar. - */ + /** Fiji dollar. */ FJD, - /** - * Falkland Islands pound. - */ + /** Falkland Islands pound. */ FKP, - /** - * Pound sterling. - */ + /** Pound sterling. */ GBP, - /** - * Georgian lari. - */ + /** Georgian lari. */ GEL, - /** - * Ghanaian cedi. - */ + /** Ghanaian cedi. */ GHS, - /** - * Gibraltar pound. - */ + /** Gibraltar pound. */ GIP, - /** - * Gambian dalasi. - */ + /** Gambian dalasi. */ GMD, - /** - * Guinean franc. - */ + /** Guinean franc. */ GNF, - /** - * Guatemalan quetzal. - */ + /** Guatemalan quetzal. */ GTQ, - /** - * Guyanese dollar. - */ + /** Guyanese dollar. */ GYD, - /** - * Hong Kong dollar. - */ + /** Hong Kong dollar. */ HKD, - /** - * Honduran lempira. - */ + /** Honduran lempira. */ HNL, - /** - * Croatian kuna. - */ + /** Croatian kuna. */ HRK, - /** - * Haitian gourde. - */ + /** Haitian gourde. */ HTG, - /** - * Hungarian forint. - */ + /** Hungarian forint. */ HUF, - /** - * Indonesian rupiah. - */ + /** Indonesian rupiah. */ IDR, - /** - * Israeli new sheqel. - */ + /** Israeli new sheqel. */ ILS, - /** - * Indian rupee. - */ + /** Indian rupee. */ INR, - /** - * Iraqi dinar. - */ + /** Iraqi dinar. */ IQD, - /** - * Iranian rial. - */ + /** Iranian rial. */ IRR, - /** - * Icelandic króna. - */ + /** Icelandic króna. */ ISK, - /** - * Jamaican dollar. - */ + /** Jamaican dollar. */ JMD, - /** - * Jordanian dinar. - */ + /** Jordanian dinar. */ JOD, - /** - * Japanese yen. - */ + /** Japanese yen. */ JPY, - /** - * Kenyan shilling. - */ + /** Kenyan shilling. */ KES, - /** - * Kyrgyzstani som. - */ + /** Kyrgyzstani som. */ KGS, - /** - * Cambodian riel. - */ + /** Cambodian riel. */ KHR, - /** - * Comoro franc. - */ + /** Comoro franc. */ KMF, - /** - * North Korean won. - */ + /** North Korean won. */ KPW, - /** - * South Korean won. - */ + /** South Korean won. */ KRW, - /** - * Kuwaiti dinar. - */ + /** Kuwaiti dinar. */ KWD, - /** - * Cayman Islands dollar. - */ + /** Cayman Islands dollar. */ KYD, - /** - * Kazakhstani tenge. - */ + /** Kazakhstani tenge. */ KZT, - /** - * Lao kip. - */ + /** Lao kip. */ LAK, - /** - * Lebanese pound. - */ + /** Lebanese pound. */ LBP, - /** - * Sri Lanka rupee. - */ + /** Sri Lanka rupee. */ LKR, - /** - * Liberian dollar. - */ + /** Liberian dollar. */ LRD, - /** - * Lesotho loti. - */ + /** Lesotho loti. */ LSL, - /** - * Lithuanian litas. - */ + /** Lithuanian litas. */ LTL, - /** - * Latvian lats. - */ + /** Latvian lats. */ LVL, - /** - * Libyan dinar. - */ + /** Libyan dinar. */ LYD, - /** - * Moroccan dirham. - */ + /** Moroccan dirham. */ MAD, - /** - * Moldovan leu. - */ + /** Moldovan leu. */ MDL, - /** - * Malagasy ariary. - */ + /** Malagasy ariary. */ MGA, - /** - * Macedonian denar. - */ + /** Macedonian denar. */ MKD, - /** - * Myanma kyat. - */ + /** Myanma kyat. */ MMK, - /** - * Mongolian tugrik. - */ + /** Mongolian tugrik. */ MNT, - /** - * Macanese pataca. - */ + /** Macanese pataca. */ MOP, - /** - * Mauritanian ouguiya. - */ + /** Mauritanian ouguiya. */ MRO, - /** - * Mauritian rupee. - */ + /** Mauritian rupee. */ MUR, - /** - * Maldivian rufiyaa. - */ + /** Maldivian rufiyaa. */ MVR, - /** - * Malawian kwacha. - */ + /** Malawian kwacha. */ MWK, - /** - * Mexican peso. - */ + /** Mexican peso. */ MXN, - /** - * Malaysian ringgit. - */ + /** Malaysian ringgit. */ MYR, - /** - * Mozambican metical. - */ + /** Mozambican metical. */ MZN, - /** - * Namibian dollar. - */ + /** Namibian dollar. */ NAD, - /** - * Nigerian naira. - */ + /** Nigerian naira. */ NGN, - /** - * Cordoba oro. - */ + /** Cordoba oro. */ NIO, - /** - * Norwegian krone. - */ + /** Norwegian krone. */ NOK, - /** - * Nepalese rupee. - */ + /** Nepalese rupee. */ NPR, - /** - * New Zealand dollar. - */ + /** New Zealand dollar. */ NZD, - /** - * Omani rial. - */ + /** Omani rial. */ OMR, - /** - * Panamanian balboa. - */ + /** Panamanian balboa. */ PAB, - /** - * Peruvian nuevo sol. - */ + /** Peruvian nuevo sol. */ PEN, - /** - * Papua New Guinean kina. - */ + /** Papua New Guinean kina. */ PGK, - /** - * Philippine peso. - */ + /** Philippine peso. */ PHP, - /** - * Pakistani rupee. - */ + /** Pakistani rupee. */ PKR, - /** - * Polish zloty. - */ + /** Polish zloty. */ PLN, - /** - * Paraguayan guaraní. - */ + /** Paraguayan guaraní. */ PYG, - /** - * Qatari rial. - */ + /** Qatari rial. */ QAR, - /** - * Romanian new leu. - */ + /** Romanian new leu. */ RON, - /** - * Serbian dinar. - */ + /** Serbian dinar. */ RSD, - /** - * Russian rouble. - */ + /** Russian rouble. */ RUB, - /** - * Rwandan franc. - */ + /** Rwandan franc. */ RWF, - /** - * Saudi riyal. - */ + /** Saudi riyal. */ SAR, - /** - * Solomon Islands dollar. - */ + /** Solomon Islands dollar. */ SBD, - /** - * Seychelles rupee. - */ + /** Seychelles rupee. */ SCR, - /** - * Sudanese pound. - */ + /** Sudanese pound. */ SDG, - /** - * Swedish krona/kronor. - */ + /** Swedish krona/kronor. */ SEK, - /** - * Singapore dollar. - */ + /** Singapore dollar. */ SGD, - /** - * Saint Helena pound. - */ + /** Saint Helena pound. */ SHP, - /** - * Sierra Leonean leone. - */ + /** Sierra Leonean leone. */ SLL, - /** - * Somali shilling. - */ + /** Somali shilling. */ SOS, - /** - * Surinamese dollar. - */ + /** Surinamese dollar. */ SRD, - /** - * São Tomé and Príncipe dobra. - */ + /** São Tomé and Príncipe dobra. */ STD, - /** - * Syrian pound. - */ + /** Syrian pound. */ SYP, - /** - * Lilangeni. - */ + /** Lilangeni. */ SZL, - /** - * Thai baht. - */ + /** Thai baht. */ THB, - /** - * Tajikistani somoni. - */ + /** Tajikistani somoni. */ TJS, - /** - * Turkmenistani manat. - */ + /** Turkmenistani manat. */ TMT, - /** - * Tunisian dinar. - */ + /** Tunisian dinar. */ TND, - /** - * Tongan pa'anga. - */ + /** Tongan pa'anga. */ TOP, - /** - * Turkish lira. - */ + /** Turkish lira. */ TRY, - /** - * Trinidad and Tobago dollar. - */ + /** Trinidad and Tobago dollar. */ TTD, - /** - * New Taiwan dollar. - */ + /** New Taiwan dollar. */ TWD, - /** - * Tanzanian shilling. - */ + /** Tanzanian shilling. */ TZS, - /** - * Ukrainian hryvnia. - */ + /** Ukrainian hryvnia. */ UAH, - /** - * Ugandan shilling. - */ + /** Ugandan shilling. */ UGX, - /** - * United States dollar. - */ + /** United States dollar. */ USD, - /** - * Uruguayan peso. - */ + /** Uruguayan peso. */ UYU, - /** - * Uzbekistan som. - */ + /** Uzbekistan som. */ UZS, - /** - * Venezuelan bolívar fuerte. - */ + /** Venezuelan bolívar fuerte. */ VEF, - /** - * Vietnamese Dong. - */ + /** Vietnamese Dong. */ VND, - /** - * Vanuatu vatu. - */ + /** Vanuatu vatu. */ VUV, - /** - * Samoan tala. - */ + /** Samoan tala. */ WST, - /** - * CFA franc BEAC. - */ + /** CFA franc BEAC. */ XAF, - /** - * East Caribbean dollar. - */ + /** East Caribbean dollar. */ XCD, - /** - * CFA Franc BCEAO. - */ + /** CFA Franc BCEAO. */ XOF, - /** - * CFP franc. - */ + /** CFP franc. */ XPF, - /** - * Yemeni rial. - */ + /** Yemeni rial. */ YER, - /** - * South African rand. - */ + /** South African rand. */ ZAR, - /** - * Zambian kwacha. - */ + /** Zambian kwacha. */ ZMK, - /** - * Zimbabwe dollar. - */ + /** Zimbabwe dollar. */ ZWL, }; diff --git a/CGMES_3.0.0/CurrentFlow.hpp b/CGMES_3.0.0/CurrentFlow.hpp index 0f38f0f07..a606a845c 100644 --- a/CGMES_3.0.0/CurrentFlow.hpp +++ b/CGMES_3.0.0/CurrentFlow.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Electrical current with sign convention: positive flow is out of the conducting equipment into the connectivity node. Can be both AC and DC. - */ + /** \brief Electrical current with sign convention: positive flow is out of the conducting equipment into the connectivity node. Can be both AC and DC. */ class CurrentFlow { public: diff --git a/CGMES_3.0.0/CurrentLimit.cpp b/CGMES_3.0.0/CurrentLimit.cpp index 2d844808e..b9838046f 100644 --- a/CGMES_3.0.0/CurrentLimit.cpp +++ b/CGMES_3.0.0/CurrentLimit.cpp @@ -8,13 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "CurrentFlow.hpp" -#include "CurrentFlow.hpp" using namespace CIMPP; -CurrentLimit::CurrentLimit() {}; -CurrentLimit::~CurrentLimit() {}; +CurrentLimit::CurrentLimit() {} +CurrentLimit::~CurrentLimit() {} static const std::list PossibleProfilesForClass = { @@ -43,38 +41,38 @@ CurrentLimit::getPossibleProfilesForAttributes() const return map; } - -bool assign_CurrentLimit_normalValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CurrentLimit_normalValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CurrentLimit* element = dynamic_cast(BaseClass_ptr1)) + CurrentLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->normalValue; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CurrentLimit_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CurrentLimit_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CurrentLimit* element = dynamic_cast(BaseClass_ptr1)) + CurrentLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->value; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_CurrentLimit_normalValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CurrentLimit* element = dynamic_cast(BaseClass_ptr1)) + const CurrentLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->normalValue; if (!buffer.str().empty()) @@ -88,7 +86,8 @@ bool get_CurrentLimit_normalValue(const BaseClass* BaseClass_ptr1, std::stringst bool get_CurrentLimit_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CurrentLimit* element = dynamic_cast(BaseClass_ptr1)) + const CurrentLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value; if (!buffer.str().empty()) @@ -100,8 +99,6 @@ bool get_CurrentLimit_value(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char CurrentLimit::debugName[] = "CurrentLimit"; const char* CurrentLimit::debugString() const { @@ -110,13 +107,13 @@ const char* CurrentLimit::debugString() const void CurrentLimit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:CurrentLimit"), &CurrentLimit_factory)); + factory_map.emplace("cim:CurrentLimit", &CurrentLimit_factory); } void CurrentLimit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:CurrentLimit.normalValue"), &assign_CurrentLimit_normalValue)); - assign_map.insert(std::make_pair(std::string("cim:CurrentLimit.value"), &assign_CurrentLimit_value)); + assign_map.emplace("cim:CurrentLimit.normalValue", &assign_CurrentLimit_normalValue); + assign_map.emplace("cim:CurrentLimit.value", &assign_CurrentLimit_value); } void CurrentLimit::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/CurrentLimit.hpp b/CGMES_3.0.0/CurrentLimit.hpp index 477f66c28..d8e5333a3 100644 --- a/CGMES_3.0.0/CurrentLimit.hpp +++ b/CGMES_3.0.0/CurrentLimit.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Operational limit on current. - */ + /** \brief Operational limit on current. */ class CurrentLimit : public OperationalLimit { public: @@ -27,8 +25,11 @@ namespace CIMPP CurrentLimit(); ~CurrentLimit() override; - CIMPP::CurrentFlow normalValue; /* The normal value for limit on current flow. The attribute shall be a positive value or zero. Default: nullptr */ - CIMPP::CurrentFlow value; /* Limit on current flow. The attribute shall be a positive value or zero. Default: nullptr */ + /** \brief The normal value for limit on current flow. The attribute shall be a positive value or zero. Default: nullptr */ + CIMPP::CurrentFlow normalValue; + + /** \brief Limit on current flow. The attribute shall be a positive value or zero. Default: nullptr */ + CIMPP::CurrentFlow value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/CurrentTransformer.cpp b/CGMES_3.0.0/CurrentTransformer.cpp index dd96a1c6b..da06c74aa 100644 --- a/CGMES_3.0.0/CurrentTransformer.cpp +++ b/CGMES_3.0.0/CurrentTransformer.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -CurrentTransformer::CurrentTransformer() {}; -CurrentTransformer::~CurrentTransformer() {}; +CurrentTransformer::CurrentTransformer() {} +CurrentTransformer::~CurrentTransformer() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ CurrentTransformer::getPossibleProfilesForAttributes() const return map; } - - - - - const char CurrentTransformer::debugName[] = "CurrentTransformer"; const char* CurrentTransformer::debugString() const { @@ -51,7 +46,7 @@ const char* CurrentTransformer::debugString() const void CurrentTransformer::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:CurrentTransformer"), &CurrentTransformer_factory)); + factory_map.emplace("cim:CurrentTransformer", &CurrentTransformer_factory); } void CurrentTransformer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/CurrentTransformer.hpp b/CGMES_3.0.0/CurrentTransformer.hpp index 7ebe64814..e6be0b776 100644 --- a/CGMES_3.0.0/CurrentTransformer.hpp +++ b/CGMES_3.0.0/CurrentTransformer.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Instrument transformer used to measure electrical qualities of the circuit that is being protected and/or monitored. Typically used as current transducer for the purpose of metering or protection. A typical secondary current rating would be 5A. - */ + /** \brief Instrument transformer used to measure electrical qualities of the circuit that is being protected and/or monitored. Typically used as current transducer for the purpose of metering or protection. A typical secondary current rating would be 5A. */ class CurrentTransformer : public Sensor { public: @@ -26,7 +24,6 @@ namespace CIMPP CurrentTransformer(); ~CurrentTransformer() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Curve.cpp b/CGMES_3.0.0/Curve.cpp index 61495d0fa..776e5c46d 100644 --- a/CGMES_3.0.0/Curve.cpp +++ b/CGMES_3.0.0/Curve.cpp @@ -9,15 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "CurveData.hpp" -#include "CurveStyle.hpp" -#include "UnitSymbol.hpp" -#include "UnitSymbol.hpp" -#include "UnitSymbol.hpp" using namespace CIMPP; -Curve::Curve() {}; -Curve::~Curve() {}; +Curve::Curve() {} +Curve::~Curve() {} static const std::list PossibleProfilesForClass = { @@ -48,82 +44,84 @@ Curve::getPossibleProfilesForAttributes() const return map; } - -bool assign_Curve_curveStyle(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CurveData_Curve(BaseClass*, BaseClass*); +bool assign_Curve_CurveDatas(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (Curve* element = dynamic_cast(BaseClass_ptr1)) + Curve* element = dynamic_cast(BaseClass_ptr1); + CurveData* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->curveStyle; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->CurveDatas.begin(), element->CurveDatas.end(), element2) == element->CurveDatas.end()) + { + element->CurveDatas.push_back(element2); + return assign_CurveData_Curve(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_Curve_xUnit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Curve_curveStyle(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Curve* element = dynamic_cast(BaseClass_ptr1)) + Curve* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->xUnit; - if (buffer.fail()) - return false; - else + buffer >> element->curveStyle; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Curve_y1Unit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Curve_xUnit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Curve* element = dynamic_cast(BaseClass_ptr1)) + Curve* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->y1Unit; - if (buffer.fail()) - return false; - else + buffer >> element->xUnit; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Curve_y2Unit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Curve_y1Unit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Curve* element = dynamic_cast(BaseClass_ptr1)) + Curve* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->y2Unit; - if (buffer.fail()) - return false; - else + buffer >> element->y1Unit; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_CurveData_Curve(BaseClass*, BaseClass*); -bool assign_Curve_CurveDatas(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_Curve_y2Unit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { Curve* element = dynamic_cast(BaseClass_ptr1); - CurveData* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->CurveDatas.begin(), element->CurveDatas.end(), element2) == element->CurveDatas.end()) + buffer >> element->y2Unit; + if (!buffer.fail()) { - element->CurveDatas.push_back(element2); - return assign_CurveData_Curve(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } - bool get_Curve_curveStyle(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Curve* element = dynamic_cast(BaseClass_ptr1)) + const Curve* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->curveStyle; if (!buffer.str().empty()) @@ -137,7 +135,8 @@ bool get_Curve_curveStyle(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_Curve_xUnit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Curve* element = dynamic_cast(BaseClass_ptr1)) + const Curve* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xUnit; if (!buffer.str().empty()) @@ -151,7 +150,8 @@ bool get_Curve_xUnit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Curve_y1Unit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Curve* element = dynamic_cast(BaseClass_ptr1)) + const Curve* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->y1Unit; if (!buffer.str().empty()) @@ -165,7 +165,8 @@ bool get_Curve_y1Unit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_Curve_y2Unit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Curve* element = dynamic_cast(BaseClass_ptr1)) + const Curve* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->y2Unit; if (!buffer.str().empty()) @@ -185,20 +186,20 @@ const char* Curve::debugString() const void Curve::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Curve"), &Curve_factory)); + factory_map.emplace("cim:Curve", &Curve_factory); } void Curve::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Curve.curveStyle"), &assign_Curve_curveStyle)); - assign_map.insert(std::make_pair(std::string("cim:Curve.xUnit"), &assign_Curve_xUnit)); - assign_map.insert(std::make_pair(std::string("cim:Curve.y1Unit"), &assign_Curve_y1Unit)); - assign_map.insert(std::make_pair(std::string("cim:Curve.y2Unit"), &assign_Curve_y2Unit)); + assign_map.emplace("cim:Curve.curveStyle", &assign_Curve_curveStyle); + assign_map.emplace("cim:Curve.xUnit", &assign_Curve_xUnit); + assign_map.emplace("cim:Curve.y1Unit", &assign_Curve_y1Unit); + assign_map.emplace("cim:Curve.y2Unit", &assign_Curve_y2Unit); } void Curve::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Curve.CurveDatas"), &assign_Curve_CurveDatas)); + assign_map.emplace("cim:Curve.CurveDatas", &assign_Curve_CurveDatas); } void Curve::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/Curve.hpp b/CGMES_3.0.0/Curve.hpp index 53747b7e0..e0b0926e3 100644 --- a/CGMES_3.0.0/Curve.hpp +++ b/CGMES_3.0.0/Curve.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class CurveData; - /* - A multi-purpose curve or functional relationship between an independent variable (X-axis) and dependent (Y-axis) variables. - */ + /** \brief A multi-purpose curve or functional relationship between an independent variable (X-axis) and dependent (Y-axis) variables. */ class Curve : public IdentifiedObject { public: @@ -29,11 +27,20 @@ namespace CIMPP Curve(); ~Curve() override; - std::list CurveDatas; /* The point data values that define this curve. Default: 0 */ - CIMPP::CurveStyle curveStyle; /* The style or shape of the curve. Default: 0 */ - CIMPP::UnitSymbol xUnit; /* The X-axis units of measure. Default: 0 */ - CIMPP::UnitSymbol y1Unit; /* The Y1-axis units of measure. Default: 0 */ - CIMPP::UnitSymbol y2Unit; /* The Y2-axis units of measure. Default: 0 */ + /** \brief The point data values that define this curve. Default: 0 */ + std::list CurveDatas; + + /** \brief The style or shape of the curve. Default: 0 */ + CIMPP::CurveStyle curveStyle; + + /** \brief The X-axis units of measure. Default: 0 */ + CIMPP::UnitSymbol xUnit; + + /** \brief The Y1-axis units of measure. Default: 0 */ + CIMPP::UnitSymbol y1Unit; + + /** \brief The Y2-axis units of measure. Default: 0 */ + CIMPP::UnitSymbol y2Unit; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/CurveData.cpp b/CGMES_3.0.0/CurveData.cpp index 4d33f15cf..f2d46bf44 100644 --- a/CGMES_3.0.0/CurveData.cpp +++ b/CGMES_3.0.0/CurveData.cpp @@ -9,14 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "Curve.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" using namespace CIMPP; -CurveData::CurveData() : Curve(nullptr) {}; -CurveData::~CurveData() {}; +CurveData::CurveData() : Curve(nullptr) {} +CurveData::~CurveData() {} static const std::list PossibleProfilesForClass = { @@ -46,67 +43,83 @@ CurveData::getPossibleProfilesForAttributes() const return map; } +bool assign_Curve_CurveDatas(BaseClass*, BaseClass*); +bool assign_CurveData_Curve(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + CurveData* element = dynamic_cast(BaseClass_ptr1); + Curve* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Curve != element2) + { + element->Curve = element2; + return assign_Curve_CurveDatas(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_CurveData_xvalue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CurveData_xvalue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CurveData* element = dynamic_cast(BaseClass_ptr1)) + CurveData* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xvalue; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CurveData_y1value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CurveData_y1value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CurveData* element = dynamic_cast(BaseClass_ptr1)) + CurveData* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->y1value; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_CurveData_y2value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_CurveData_y2value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (CurveData* element = dynamic_cast(BaseClass_ptr1)) + CurveData* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->y2value; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_Curve_CurveDatas(BaseClass*, BaseClass*); -bool assign_CurveData_Curve(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_CurveData_Curve(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - CurveData* element = dynamic_cast(BaseClass_ptr1); - Curve* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const CurveData* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->Curve != element2) + if (element->Curve != 0) { - element->Curve = element2; - return assign_Curve_CurveDatas(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->Curve); + return true; } - return true; } return false; } bool get_CurveData_xvalue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CurveData* element = dynamic_cast(BaseClass_ptr1)) + const CurveData* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xvalue; if (!buffer.str().empty()) @@ -120,7 +133,8 @@ bool get_CurveData_xvalue(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_CurveData_y1value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CurveData* element = dynamic_cast(BaseClass_ptr1)) + const CurveData* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->y1value; if (!buffer.str().empty()) @@ -134,7 +148,8 @@ bool get_CurveData_y1value(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_CurveData_y2value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const CurveData* element = dynamic_cast(BaseClass_ptr1)) + const CurveData* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->y2value; if (!buffer.str().empty()) @@ -146,21 +161,6 @@ bool get_CurveData_y2value(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - -bool get_CurveData_Curve(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const CurveData* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->Curve != 0) - { - BaseClass_list.push_back(element->Curve); - return true; - } - } - return false; -} - - const char CurveData::debugName[] = "CurveData"; const char* CurveData::debugString() const { @@ -169,19 +169,19 @@ const char* CurveData::debugString() const void CurveData::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:CurveData"), &CurveData_factory)); + factory_map.emplace("cim:CurveData", &CurveData_factory); } void CurveData::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:CurveData.xvalue"), &assign_CurveData_xvalue)); - assign_map.insert(std::make_pair(std::string("cim:CurveData.y1value"), &assign_CurveData_y1value)); - assign_map.insert(std::make_pair(std::string("cim:CurveData.y2value"), &assign_CurveData_y2value)); + assign_map.emplace("cim:CurveData.xvalue", &assign_CurveData_xvalue); + assign_map.emplace("cim:CurveData.y1value", &assign_CurveData_y1value); + assign_map.emplace("cim:CurveData.y2value", &assign_CurveData_y2value); } void CurveData::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:CurveData.Curve"), &assign_CurveData_Curve)); + assign_map.emplace("cim:CurveData.Curve", &assign_CurveData_Curve); } void CurveData::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/CurveData.hpp b/CGMES_3.0.0/CurveData.hpp index 1e46eb3c7..1bc77b921 100644 --- a/CGMES_3.0.0/CurveData.hpp +++ b/CGMES_3.0.0/CurveData.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class Curve; - /* - Multi-purpose data points for defining a curve. The use of this generic class is discouraged if a more specific class can be used to specify the X and Y axis values along with their specific data types. - */ + /** \brief Multi-purpose data points for defining a curve. The use of this generic class is discouraged if a more specific class can be used to specify the X and Y axis values along with their specific data types. */ class CurveData : public BaseClass { public: @@ -28,10 +26,17 @@ namespace CIMPP CurveData(); ~CurveData() override; - CIMPP::Curve* Curve; /* The curve of this curve data point. Default: 0 */ - CIMPP::Float xvalue; /* The data value of the X-axis variable, depending on the X-axis units. Default: 0.0 */ - CIMPP::Float y1value; /* The data value of the first Y-axis variable, depending on the Y-axis units. Default: 0.0 */ - CIMPP::Float y2value; /* The data value of the second Y-axis variable (if present), depending on the Y-axis units. Default: 0.0 */ + /** \brief The curve of this curve data point. Default: 0 */ + CIMPP::Curve* Curve; + + /** \brief The data value of the X-axis variable, depending on the X-axis units. Default: 0.0 */ + CIMPP::Float xvalue; + + /** \brief The data value of the first Y-axis variable, depending on the Y-axis units. Default: 0.0 */ + CIMPP::Float y1value; + + /** \brief The data value of the second Y-axis variable (if present), depending on the Y-axis units. Default: 0.0 */ + CIMPP::Float y2value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/CurveStyle.cpp b/CGMES_3.0.0/CurveStyle.cpp index d28696151..bf78aeb7f 100644 --- a/CGMES_3.0.0/CurveStyle.cpp +++ b/CGMES_3.0.0/CurveStyle.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "CurveStyle") + if (EnumSymbol.substr(0, pos) != "CurveStyle") { lop.setstate(std::ios::failbit); return lop; @@ -50,12 +50,12 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "constantYValue") + if (EnumSymbol == "constantYValue") { rop = CurveStyle::constantYValue; return lop; } - if(EnumSymbol == "straightLineYValues") + if (EnumSymbol == "straightLineYValues") { rop = CurveStyle::straightLineYValues; return lop; diff --git a/CGMES_3.0.0/CurveStyle.hpp b/CGMES_3.0.0/CurveStyle.hpp index 72f95568c..0f72591f4 100644 --- a/CGMES_3.0.0/CurveStyle.hpp +++ b/CGMES_3.0.0/CurveStyle.hpp @@ -9,21 +9,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Style or shape of curve. - */ + /** \brief Style or shape of curve. */ class CurveStyle { public: enum CurveStyle_ENUM { - /** - * The Y-axis values are assumed constant until the next curve point and prior to the first curve point. - */ + /** The Y-axis values are assumed constant until the next curve point and prior to the first curve point. */ constantYValue, - /** - * The Y-axis values are assumed to be a straight line between values. Also known as linear interpolation. - */ + /** The Y-axis values are assumed to be a straight line between values. Also known as linear interpolation. */ straightLineYValues, }; diff --git a/CGMES_3.0.0/Cut.cpp b/CGMES_3.0.0/Cut.cpp index 21f33fa6e..a000f40b8 100644 --- a/CGMES_3.0.0/Cut.cpp +++ b/CGMES_3.0.0/Cut.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ACLineSegment.hpp" -#include "Length.hpp" using namespace CIMPP; -Cut::Cut() : ACLineSegment(nullptr) {}; -Cut::~Cut() {}; +Cut::Cut() : ACLineSegment(nullptr) {} +Cut::~Cut() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ Cut::getPossibleProfilesForAttributes() const return map; } - -bool assign_Cut_lengthFromTerminal1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (Cut* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->lengthFromTerminal1; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ACLineSegment_Cut(BaseClass*, BaseClass*); bool assign_Cut_ACLineSegment(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_Cut_ACLineSegment(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_pt return false; } -bool get_Cut_lengthFromTerminal1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_Cut_lengthFromTerminal1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const Cut* element = dynamic_cast(BaseClass_ptr1)) + Cut* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->lengthFromTerminal1; - if (!buffer.str().empty()) + buffer >> element->lengthFromTerminal1; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_Cut_ACLineSegment(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Cut* element = dynamic_cast(BaseClass_ptr1)) + const Cut* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ACLineSegment != 0) { @@ -102,6 +86,20 @@ bool get_Cut_ACLineSegment(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->lengthFromTerminal1; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char Cut::debugName[] = "Cut"; const char* Cut::debugString() const @@ -111,17 +109,17 @@ const char* Cut::debugString() const void Cut::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Cut"), &Cut_factory)); + factory_map.emplace("cim:Cut", &Cut_factory); } void Cut::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Cut.lengthFromTerminal1"), &assign_Cut_lengthFromTerminal1)); + assign_map.emplace("cim:Cut.lengthFromTerminal1", &assign_Cut_lengthFromTerminal1); } void Cut::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Cut.ACLineSegment"), &assign_Cut_ACLineSegment)); + assign_map.emplace("cim:Cut.ACLineSegment", &assign_Cut_ACLineSegment); } void Cut::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/Cut.hpp b/CGMES_3.0.0/Cut.hpp index 5e06e8e6f..50e79218d 100644 --- a/CGMES_3.0.0/Cut.hpp +++ b/CGMES_3.0.0/Cut.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ACLineSegment; - /* - A cut separates a line segment into two parts. The cut appears as a switch inserted between these two parts and connects them together. As the cut is normally open there is no galvanic connection between the two line segment parts. But it is possible to close the cut to get galvanic connection. The cut terminals are oriented towards the line segment terminals with the same sequence number. Hence the cut terminal with sequence number equal to 1 is oriented to the line segment's terminal with sequence number equal to 1. The cut terminals also act as connection points for jumpers and other equipment, e.g. a mobile generator. To enable this, connectivity nodes are placed at the cut terminals. Once the connectivity nodes are in place any conducting equipment can be connected at them. - */ + /** \brief A cut separates a line segment into two parts. The cut appears as a switch inserted between these two parts and connects them together. As the cut is normally open there is no galvanic connection between the two line segment parts. But it is possible to close the cut to get galvanic connection. The cut terminals are oriented towards the line segment terminals with the same sequence number. Hence the cut terminal with sequence number equal to 1 is oriented to the line segment's terminal with sequence number equal to 1. The cut terminals also act as connection points for jumpers and other equipment, e.g. a mobile generator. To enable this, connectivity nodes are placed at the cut terminals. Once the connectivity nodes are in place any conducting equipment can be connected at them. */ class Cut : public Switch { public: @@ -28,8 +26,11 @@ namespace CIMPP Cut(); ~Cut() override; - CIMPP::ACLineSegment* ACLineSegment; /* The line segment to which the cut is applied. Default: 0 */ - CIMPP::Length lengthFromTerminal1; /* The length to the place where the cut is located starting from side one of the cut line segment, i.e. the line segment Terminal with sequenceNumber equal to 1. Default: nullptr */ + /** \brief The line segment to which the cut is applied. Default: 0 */ + CIMPP::ACLineSegment* ACLineSegment; + + /** \brief The length to the place where the cut is located starting from side one of the cut line segment, i.e. the line segment Terminal with sequenceNumber equal to 1. Default: nullptr */ + CIMPP::Length lengthFromTerminal1; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/DCBaseTerminal.cpp b/CGMES_3.0.0/DCBaseTerminal.cpp index e423a7004..e7814b878 100644 --- a/CGMES_3.0.0/DCBaseTerminal.cpp +++ b/CGMES_3.0.0/DCBaseTerminal.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCBaseTerminal::DCBaseTerminal() : DCNode(nullptr), DCTopologicalNode(nullptr) {}; -DCBaseTerminal::~DCBaseTerminal() {}; +DCBaseTerminal::DCBaseTerminal() : DCNode(nullptr), DCTopologicalNode(nullptr) {} +DCBaseTerminal::~DCBaseTerminal() {} static const std::list PossibleProfilesForClass = { @@ -44,8 +44,6 @@ DCBaseTerminal::getPossibleProfilesForAttributes() const return map; } - - bool assign_DCNode_DCTerminals(BaseClass*, BaseClass*); bool assign_DCBaseTerminal_DCNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -62,6 +60,7 @@ bool assign_DCBaseTerminal_DCNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClas } return false; } + bool assign_DCTopologicalNode_DCTerminals(BaseClass*, BaseClass*); bool assign_DCBaseTerminal_DCTopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -79,10 +78,10 @@ bool assign_DCBaseTerminal_DCTopologicalNode(BaseClass* BaseClass_ptr1, BaseClas return false; } - bool get_DCBaseTerminal_DCNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DCBaseTerminal* element = dynamic_cast(BaseClass_ptr1)) + const DCBaseTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DCNode != 0) { @@ -95,7 +94,8 @@ bool get_DCBaseTerminal_DCNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DCBaseTerminal* element = dynamic_cast(BaseClass_ptr1)) + const DCBaseTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DCTopologicalNode != 0) { @@ -106,7 +106,6 @@ bool get_DCBaseTerminal_DCTopologicalNode(const BaseClass* BaseClass_ptr1, std:: return false; } - const char DCBaseTerminal::debugName[] = "DCBaseTerminal"; const char* DCBaseTerminal::debugString() const { @@ -115,7 +114,7 @@ const char* DCBaseTerminal::debugString() const void DCBaseTerminal::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCBaseTerminal"), &DCBaseTerminal_factory)); + factory_map.emplace("cim:DCBaseTerminal", &DCBaseTerminal_factory); } void DCBaseTerminal::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -124,8 +123,8 @@ void DCBaseTerminal::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCBaseTerminal.DCNode"), &assign_DCBaseTerminal_DCNode)); - assign_map.insert(std::make_pair(std::string("cim:DCBaseTerminal.DCTopologicalNode"), &assign_DCBaseTerminal_DCTopologicalNode)); + assign_map.emplace("cim:DCBaseTerminal.DCNode", &assign_DCBaseTerminal_DCNode); + assign_map.emplace("cim:DCBaseTerminal.DCTopologicalNode", &assign_DCBaseTerminal_DCTopologicalNode); } void DCBaseTerminal::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/DCBaseTerminal.hpp b/CGMES_3.0.0/DCBaseTerminal.hpp index 567a30333..52a78304c 100644 --- a/CGMES_3.0.0/DCBaseTerminal.hpp +++ b/CGMES_3.0.0/DCBaseTerminal.hpp @@ -18,9 +18,7 @@ namespace CIMPP class DCNode; class DCTopologicalNode; - /* - An electrical connection point at a piece of DC conducting equipment. DC terminals are connected at one physical DC node that may have multiple DC terminals connected. A DC node is similar to an AC connectivity node. The model requires that DC connections are distinct from AC connections. - */ + /** \brief An electrical connection point at a piece of DC conducting equipment. DC terminals are connected at one physical DC node that may have multiple DC terminals connected. A DC node is similar to an AC connectivity node. The model requires that DC connections are distinct from AC connections. */ class DCBaseTerminal : public ACDCTerminal { public: @@ -28,8 +26,11 @@ namespace CIMPP DCBaseTerminal(); ~DCBaseTerminal() override; - CIMPP::DCNode* DCNode; /* The DC connectivity node to which this DC base terminal connects with zero impedance. Default: 0 */ - CIMPP::DCTopologicalNode* DCTopologicalNode; /* See association end Terminal.TopologicalNode. Default: 0 */ + /** \brief The DC connectivity node to which this DC base terminal connects with zero impedance. Default: 0 */ + CIMPP::DCNode* DCNode; + + /** \brief See association end Terminal.TopologicalNode. Default: 0 */ + CIMPP::DCTopologicalNode* DCTopologicalNode; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/DCBreaker.cpp b/CGMES_3.0.0/DCBreaker.cpp index b00cbaa77..721524d6e 100644 --- a/CGMES_3.0.0/DCBreaker.cpp +++ b/CGMES_3.0.0/DCBreaker.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCBreaker::DCBreaker() {}; -DCBreaker::~DCBreaker() {}; +DCBreaker::DCBreaker() {} +DCBreaker::~DCBreaker() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ DCBreaker::getPossibleProfilesForAttributes() const return map; } - - - - - const char DCBreaker::debugName[] = "DCBreaker"; const char* DCBreaker::debugString() const { @@ -51,7 +46,7 @@ const char* DCBreaker::debugString() const void DCBreaker::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCBreaker"), &DCBreaker_factory)); + factory_map.emplace("cim:DCBreaker", &DCBreaker_factory); } void DCBreaker::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/DCBreaker.hpp b/CGMES_3.0.0/DCBreaker.hpp index cfecf1c9c..51ebd5f70 100644 --- a/CGMES_3.0.0/DCBreaker.hpp +++ b/CGMES_3.0.0/DCBreaker.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A breaker within a DC system. - */ + /** \brief A breaker within a DC system. */ class DCBreaker : public DCSwitch { public: @@ -26,7 +24,6 @@ namespace CIMPP DCBreaker(); ~DCBreaker() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/DCBusbar.cpp b/CGMES_3.0.0/DCBusbar.cpp index 99e4dbdbd..1ecf0f6fa 100644 --- a/CGMES_3.0.0/DCBusbar.cpp +++ b/CGMES_3.0.0/DCBusbar.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCBusbar::DCBusbar() {}; -DCBusbar::~DCBusbar() {}; +DCBusbar::DCBusbar() {} +DCBusbar::~DCBusbar() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ DCBusbar::getPossibleProfilesForAttributes() const return map; } - - - - - const char DCBusbar::debugName[] = "DCBusbar"; const char* DCBusbar::debugString() const { @@ -51,7 +46,7 @@ const char* DCBusbar::debugString() const void DCBusbar::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCBusbar"), &DCBusbar_factory)); + factory_map.emplace("cim:DCBusbar", &DCBusbar_factory); } void DCBusbar::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/DCBusbar.hpp b/CGMES_3.0.0/DCBusbar.hpp index ac483b4bb..443ea1142 100644 --- a/CGMES_3.0.0/DCBusbar.hpp +++ b/CGMES_3.0.0/DCBusbar.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A busbar within a DC system. - */ + /** \brief A busbar within a DC system. */ class DCBusbar : public DCConductingEquipment { public: @@ -26,7 +24,6 @@ namespace CIMPP DCBusbar(); ~DCBusbar() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/DCChopper.cpp b/CGMES_3.0.0/DCChopper.cpp index d0ae9bb6f..74dd30f11 100644 --- a/CGMES_3.0.0/DCChopper.cpp +++ b/CGMES_3.0.0/DCChopper.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCChopper::DCChopper() {}; -DCChopper::~DCChopper() {}; +DCChopper::DCChopper() {} +DCChopper::~DCChopper() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ DCChopper::getPossibleProfilesForAttributes() const return map; } - - - - - const char DCChopper::debugName[] = "DCChopper"; const char* DCChopper::debugString() const { @@ -51,7 +46,7 @@ const char* DCChopper::debugString() const void DCChopper::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCChopper"), &DCChopper_factory)); + factory_map.emplace("cim:DCChopper", &DCChopper_factory); } void DCChopper::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/DCChopper.hpp b/CGMES_3.0.0/DCChopper.hpp index 2c1ae6e0b..69669fe03 100644 --- a/CGMES_3.0.0/DCChopper.hpp +++ b/CGMES_3.0.0/DCChopper.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Low resistance equipment used in the internal DC circuit to balance voltages. It has typically positive and negative pole terminals and a ground. - */ + /** \brief Low resistance equipment used in the internal DC circuit to balance voltages. It has typically positive and negative pole terminals and a ground. */ class DCChopper : public DCConductingEquipment { public: @@ -26,7 +24,6 @@ namespace CIMPP DCChopper(); ~DCChopper() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/DCConductingEquipment.cpp b/CGMES_3.0.0/DCConductingEquipment.cpp index 2e4384d45..36ac2cbf9 100644 --- a/CGMES_3.0.0/DCConductingEquipment.cpp +++ b/CGMES_3.0.0/DCConductingEquipment.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "DCTerminal.hpp" -#include "Voltage.hpp" using namespace CIMPP; -DCConductingEquipment::DCConductingEquipment() {}; -DCConductingEquipment::~DCConductingEquipment() {}; +DCConductingEquipment::DCConductingEquipment() {} +DCConductingEquipment::~DCConductingEquipment() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ DCConductingEquipment::getPossibleProfilesForAttributes() const return map; } - -bool assign_DCConductingEquipment_ratedUdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (DCConductingEquipment* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->ratedUdc; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_DCTerminal_DCConductingEquipment(BaseClass*, BaseClass*); bool assign_DCConductingEquipment_DCTerminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_DCConductingEquipment_DCTerminals(BaseClass* BaseClass_ptr1, BaseCla return false; } +bool assign_DCConductingEquipment_ratedUdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + DCConductingEquipment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->ratedUdc; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_DCConductingEquipment_ratedUdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCConductingEquipment* element = dynamic_cast(BaseClass_ptr1)) + const DCConductingEquipment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedUdc; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_DCConductingEquipment_ratedUdc(const BaseClass* BaseClass_ptr1, std::st return false; } - - const char DCConductingEquipment::debugName[] = "DCConductingEquipment"; const char* DCConductingEquipment::debugString() const { @@ -98,17 +96,17 @@ const char* DCConductingEquipment::debugString() const void DCConductingEquipment::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCConductingEquipment"), &DCConductingEquipment_factory)); + factory_map.emplace("cim:DCConductingEquipment", &DCConductingEquipment_factory); } void DCConductingEquipment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCConductingEquipment.ratedUdc"), &assign_DCConductingEquipment_ratedUdc)); + assign_map.emplace("cim:DCConductingEquipment.ratedUdc", &assign_DCConductingEquipment_ratedUdc); } void DCConductingEquipment::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCConductingEquipment.DCTerminals"), &assign_DCConductingEquipment_DCTerminals)); + assign_map.emplace("cim:DCConductingEquipment.DCTerminals", &assign_DCConductingEquipment_DCTerminals); } void DCConductingEquipment::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/DCConductingEquipment.hpp b/CGMES_3.0.0/DCConductingEquipment.hpp index 0c7b379a2..bfe047814 100644 --- a/CGMES_3.0.0/DCConductingEquipment.hpp +++ b/CGMES_3.0.0/DCConductingEquipment.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class DCTerminal; - /* - The parts of the DC power system that are designed to carry current or that are conductively connected through DC terminals. - */ + /** \brief The parts of the DC power system that are designed to carry current or that are conductively connected through DC terminals. */ class DCConductingEquipment : public Equipment { public: @@ -28,8 +26,11 @@ namespace CIMPP DCConductingEquipment(); ~DCConductingEquipment() override; - std::list DCTerminals; /* A DC conducting equipment has DC terminals. Default: 0 */ - CIMPP::Voltage ratedUdc; /* Rated DC device voltage. The attribute shall be a positive value. It is configuration data used in power flow. Default: nullptr */ + /** \brief A DC conducting equipment has DC terminals. Default: 0 */ + std::list DCTerminals; + + /** \brief Rated DC device voltage. The attribute shall be a positive value. It is configuration data used in power flow. Default: nullptr */ + CIMPP::Voltage ratedUdc; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/DCConverterOperatingModeKind.cpp b/CGMES_3.0.0/DCConverterOperatingModeKind.cpp index 723e4594e..5119f9ba2 100644 --- a/CGMES_3.0.0/DCConverterOperatingModeKind.cpp +++ b/CGMES_3.0.0/DCConverterOperatingModeKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "DCConverterOperatingModeKind") + if (EnumSymbol.substr(0, pos) != "DCConverterOperatingModeKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "bipolar") + if (EnumSymbol == "bipolar") { rop = DCConverterOperatingModeKind::bipolar; return lop; } - if(EnumSymbol == "monopolarMetallicReturn") + if (EnumSymbol == "monopolarMetallicReturn") { rop = DCConverterOperatingModeKind::monopolarMetallicReturn; return lop; } - if(EnumSymbol == "monopolarGroundReturn") + if (EnumSymbol == "monopolarGroundReturn") { rop = DCConverterOperatingModeKind::monopolarGroundReturn; return lop; diff --git a/CGMES_3.0.0/DCConverterOperatingModeKind.hpp b/CGMES_3.0.0/DCConverterOperatingModeKind.hpp index 575f4a5e2..e80c0a2ba 100644 --- a/CGMES_3.0.0/DCConverterOperatingModeKind.hpp +++ b/CGMES_3.0.0/DCConverterOperatingModeKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The operating mode of an HVDC bipole. - */ + /** \brief The operating mode of an HVDC bipole. */ class DCConverterOperatingModeKind { public: enum DCConverterOperatingModeKind_ENUM { - /** - * Bipolar operation. - */ + /** Bipolar operation. */ bipolar, - /** - * Monopolar operation with metallic return. - */ + /** Monopolar operation with metallic return. */ monopolarMetallicReturn, - /** - * Monopolar operation with ground return. - */ + /** Monopolar operation with ground return. */ monopolarGroundReturn, }; diff --git a/CGMES_3.0.0/DCConverterUnit.cpp b/CGMES_3.0.0/DCConverterUnit.cpp index f66280df5..2d1090ab2 100644 --- a/CGMES_3.0.0/DCConverterUnit.cpp +++ b/CGMES_3.0.0/DCConverterUnit.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "Substation.hpp" -#include "DCConverterOperatingModeKind.hpp" using namespace CIMPP; -DCConverterUnit::DCConverterUnit() : Substation(nullptr) {}; -DCConverterUnit::~DCConverterUnit() {}; +DCConverterUnit::DCConverterUnit() : Substation(nullptr) {} +DCConverterUnit::~DCConverterUnit() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ DCConverterUnit::getPossibleProfilesForAttributes() const return map; } - -bool assign_DCConverterUnit_operationMode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (DCConverterUnit* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->operationMode; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_Substation_DCConverterUnit(BaseClass*, BaseClass*); bool assign_DCConverterUnit_Substation(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,10 +58,24 @@ bool assign_DCConverterUnit_Substation(BaseClass* BaseClass_ptr1, BaseClass* Bas return false; } +bool assign_DCConverterUnit_operationMode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + DCConverterUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->operationMode; + if (!buffer.fail()) + { + return true; + } + } + return false; +} bool get_DCConverterUnit_Substation(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DCConverterUnit* element = dynamic_cast(BaseClass_ptr1)) + const DCConverterUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Substation != 0) { @@ -88,10 +86,10 @@ bool get_DCConverterUnit_Substation(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1)) + const DCConverterUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->operationMode; if (!buffer.str().empty()) @@ -111,17 +109,17 @@ const char* DCConverterUnit::debugString() const void DCConverterUnit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCConverterUnit"), &DCConverterUnit_factory)); + factory_map.emplace("cim:DCConverterUnit", &DCConverterUnit_factory); } void DCConverterUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCConverterUnit.operationMode"), &assign_DCConverterUnit_operationMode)); + assign_map.emplace("cim:DCConverterUnit.operationMode", &assign_DCConverterUnit_operationMode); } void DCConverterUnit::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCConverterUnit.Substation"), &assign_DCConverterUnit_Substation)); + assign_map.emplace("cim:DCConverterUnit.Substation", &assign_DCConverterUnit_Substation); } void DCConverterUnit::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/DCConverterUnit.hpp b/CGMES_3.0.0/DCConverterUnit.hpp index a3b2ca3d5..1ec039db0 100644 --- a/CGMES_3.0.0/DCConverterUnit.hpp +++ b/CGMES_3.0.0/DCConverterUnit.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class Substation; - /* - Indivisible operative unit comprising all equipment between the point of common coupling on the AC side and the point of common coupling - DC side, essentially one or more converters, together with one or more converter transformers, converter control equipment, essential protective and switching devices and auxiliaries, if any, used for conversion. - */ + /** \brief Indivisible operative unit comprising all equipment between the point of common coupling on the AC side and the point of common coupling - DC side, essentially one or more converters, together with one or more converter transformers, converter control equipment, essential protective and switching devices and auxiliaries, if any, used for conversion. */ class DCConverterUnit : public DCEquipmentContainer { public: @@ -28,8 +26,11 @@ namespace CIMPP DCConverterUnit(); ~DCConverterUnit() override; - CIMPP::Substation* Substation; /* The containing substation of the DC converter unit. Default: 0 */ - CIMPP::DCConverterOperatingModeKind operationMode; /* The operating mode of an HVDC bipole (bipolar, monopolar metallic return, etc). Default: 0 */ + /** \brief The containing substation of the DC converter unit. Default: 0 */ + CIMPP::Substation* Substation; + + /** \brief The operating mode of an HVDC bipole (bipolar, monopolar metallic return, etc). Default: 0 */ + CIMPP::DCConverterOperatingModeKind operationMode; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/DCDisconnector.cpp b/CGMES_3.0.0/DCDisconnector.cpp index 861bbeb7c..fe93c5903 100644 --- a/CGMES_3.0.0/DCDisconnector.cpp +++ b/CGMES_3.0.0/DCDisconnector.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCDisconnector::DCDisconnector() {}; -DCDisconnector::~DCDisconnector() {}; +DCDisconnector::DCDisconnector() {} +DCDisconnector::~DCDisconnector() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ DCDisconnector::getPossibleProfilesForAttributes() const return map; } - - - - - const char DCDisconnector::debugName[] = "DCDisconnector"; const char* DCDisconnector::debugString() const { @@ -51,7 +46,7 @@ const char* DCDisconnector::debugString() const void DCDisconnector::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCDisconnector"), &DCDisconnector_factory)); + factory_map.emplace("cim:DCDisconnector", &DCDisconnector_factory); } void DCDisconnector::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/DCDisconnector.hpp b/CGMES_3.0.0/DCDisconnector.hpp index 3cc09932a..9000b268e 100644 --- a/CGMES_3.0.0/DCDisconnector.hpp +++ b/CGMES_3.0.0/DCDisconnector.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A disconnector within a DC system. - */ + /** \brief A disconnector within a DC system. */ class DCDisconnector : public DCSwitch { public: @@ -26,7 +24,6 @@ namespace CIMPP DCDisconnector(); ~DCDisconnector() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/DCEquipmentContainer.cpp b/CGMES_3.0.0/DCEquipmentContainer.cpp index 46467353c..63f808f42 100644 --- a/CGMES_3.0.0/DCEquipmentContainer.cpp +++ b/CGMES_3.0.0/DCEquipmentContainer.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCEquipmentContainer::DCEquipmentContainer() {}; -DCEquipmentContainer::~DCEquipmentContainer() {}; +DCEquipmentContainer::DCEquipmentContainer() {} +DCEquipmentContainer::~DCEquipmentContainer() {} static const std::list PossibleProfilesForClass = { @@ -43,8 +43,6 @@ DCEquipmentContainer::getPossibleProfilesForAttributes() const return map; } - - bool assign_DCNode_DCEquipmentContainer(BaseClass*, BaseClass*); bool assign_DCEquipmentContainer_DCNodes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,6 +59,7 @@ bool assign_DCEquipmentContainer_DCNodes(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_DCTopologicalNode_DCEquipmentContainer(BaseClass*, BaseClass*); bool assign_DCEquipmentContainer_DCTopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -88,7 +87,7 @@ const char* DCEquipmentContainer::debugString() const void DCEquipmentContainer::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCEquipmentContainer"), &DCEquipmentContainer_factory)); + factory_map.emplace("cim:DCEquipmentContainer", &DCEquipmentContainer_factory); } void DCEquipmentContainer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -97,8 +96,8 @@ void DCEquipmentContainer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCEquipmentContainer.DCNodes"), &assign_DCEquipmentContainer_DCNodes)); - assign_map.insert(std::make_pair(std::string("cim:DCEquipmentContainer.DCTopologicalNode"), &assign_DCEquipmentContainer_DCTopologicalNode)); + assign_map.emplace("cim:DCEquipmentContainer.DCNodes", &assign_DCEquipmentContainer_DCNodes); + assign_map.emplace("cim:DCEquipmentContainer.DCTopologicalNode", &assign_DCEquipmentContainer_DCTopologicalNode); } void DCEquipmentContainer::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/DCEquipmentContainer.hpp b/CGMES_3.0.0/DCEquipmentContainer.hpp index 977e3ee2f..aadaf2b48 100644 --- a/CGMES_3.0.0/DCEquipmentContainer.hpp +++ b/CGMES_3.0.0/DCEquipmentContainer.hpp @@ -18,9 +18,7 @@ namespace CIMPP class DCNode; class DCTopologicalNode; - /* - A modelling construct to provide a root class for containment of DC as well as AC equipment. The class differ from the EquipmentContaner for AC in that it may also contain DCNode-s. Hence it can contain both AC and DC equipment. - */ + /** \brief A modelling construct to provide a root class for containment of DC as well as AC equipment. The class differ from the EquipmentContaner for AC in that it may also contain DCNode-s. Hence it can contain both AC and DC equipment. */ class DCEquipmentContainer : public EquipmentContainer { public: @@ -28,8 +26,11 @@ namespace CIMPP DCEquipmentContainer(); ~DCEquipmentContainer() override; - std::list DCNodes; /* The DC nodes contained in the DC equipment container. Default: 0 */ - std::list DCTopologicalNode; /* The topological nodes which belong to this connectivity node container. Default: 0 */ + /** \brief The DC nodes contained in the DC equipment container. Default: 0 */ + std::list DCNodes; + + /** \brief The topological nodes which belong to this connectivity node container. Default: 0 */ + std::list DCTopologicalNode; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/DCGround.cpp b/CGMES_3.0.0/DCGround.cpp index 22f7382fa..07d7f35f7 100644 --- a/CGMES_3.0.0/DCGround.cpp +++ b/CGMES_3.0.0/DCGround.cpp @@ -8,13 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Inductance.hpp" -#include "Resistance.hpp" using namespace CIMPP; -DCGround::DCGround() {}; -DCGround::~DCGround() {}; +DCGround::DCGround() {} +DCGround::~DCGround() {} static const std::list PossibleProfilesForClass = { @@ -42,38 +40,38 @@ DCGround::getPossibleProfilesForAttributes() const return map; } - -bool assign_DCGround_inductance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCGround_inductance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCGround* element = dynamic_cast(BaseClass_ptr1)) + DCGround* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inductance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DCGround_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCGround_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCGround* element = dynamic_cast(BaseClass_ptr1)) + DCGround* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_DCGround_inductance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCGround* element = dynamic_cast(BaseClass_ptr1)) + const DCGround* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inductance; if (!buffer.str().empty()) @@ -87,7 +85,8 @@ bool get_DCGround_inductance(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_DCGround_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCGround* element = dynamic_cast(BaseClass_ptr1)) + const DCGround* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -99,8 +98,6 @@ bool get_DCGround_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char DCGround::debugName[] = "DCGround"; const char* DCGround::debugString() const { @@ -109,13 +106,13 @@ const char* DCGround::debugString() const void DCGround::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCGround"), &DCGround_factory)); + factory_map.emplace("cim:DCGround", &DCGround_factory); } void DCGround::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCGround.inductance"), &assign_DCGround_inductance)); - assign_map.insert(std::make_pair(std::string("cim:DCGround.r"), &assign_DCGround_r)); + assign_map.emplace("cim:DCGround.inductance", &assign_DCGround_inductance); + assign_map.emplace("cim:DCGround.r", &assign_DCGround_r); } void DCGround::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/DCGround.hpp b/CGMES_3.0.0/DCGround.hpp index 182760c0b..5321d8f49 100644 --- a/CGMES_3.0.0/DCGround.hpp +++ b/CGMES_3.0.0/DCGround.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A ground within a DC system. - */ + /** \brief A ground within a DC system. */ class DCGround : public DCConductingEquipment { public: @@ -28,8 +26,11 @@ namespace CIMPP DCGround(); ~DCGround() override; - CIMPP::Inductance inductance; /* Inductance to ground. Default: nullptr */ - CIMPP::Resistance r; /* Resistance to ground. Default: nullptr */ + /** \brief Inductance to ground. Default: nullptr */ + CIMPP::Inductance inductance; + + /** \brief Resistance to ground. Default: nullptr */ + CIMPP::Resistance r; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/DCLine.cpp b/CGMES_3.0.0/DCLine.cpp index cb4fb87ef..15f9c9331 100644 --- a/CGMES_3.0.0/DCLine.cpp +++ b/CGMES_3.0.0/DCLine.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCLine::DCLine() : Region(nullptr) {}; -DCLine::~DCLine() {}; +DCLine::DCLine() : Region(nullptr) {} +DCLine::~DCLine() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ DCLine::getPossibleProfilesForAttributes() const return map; } - - bool assign_SubGeographicalRegion_DCLines(BaseClass*, BaseClass*); bool assign_DCLine_Region(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_DCLine_Region(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) return false; } - bool get_DCLine_Region(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DCLine* element = dynamic_cast(BaseClass_ptr1)) + const DCLine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Region != 0) { @@ -73,7 +71,6 @@ bool get_DCLine_Region(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCLine"), &DCLine_factory)); + factory_map.emplace("cim:DCLine", &DCLine_factory); } void DCLine::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void DCLine::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCLine.Region"), &assign_DCLine_Region)); + assign_map.emplace("cim:DCLine.Region", &assign_DCLine_Region); } void DCLine::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/DCLine.hpp b/CGMES_3.0.0/DCLine.hpp index a074795be..60c9bf510 100644 --- a/CGMES_3.0.0/DCLine.hpp +++ b/CGMES_3.0.0/DCLine.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class SubGeographicalRegion; - /* - Overhead lines and/or cables connecting two or more HVDC substations. - */ + /** \brief Overhead lines and/or cables connecting two or more HVDC substations. */ class DCLine : public DCEquipmentContainer { public: @@ -27,7 +25,8 @@ namespace CIMPP DCLine(); ~DCLine() override; - CIMPP::SubGeographicalRegion* Region; /* The SubGeographicalRegion containing the DC line. Default: 0 */ + /** \brief The SubGeographicalRegion containing the DC line. Default: 0 */ + CIMPP::SubGeographicalRegion* Region; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/DCLineSegment.cpp b/CGMES_3.0.0/DCLineSegment.cpp index 4b544cf43..d4118b718 100644 --- a/CGMES_3.0.0/DCLineSegment.cpp +++ b/CGMES_3.0.0/DCLineSegment.cpp @@ -8,15 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Capacitance.hpp" -#include "Inductance.hpp" -#include "Length.hpp" -#include "Resistance.hpp" using namespace CIMPP; -DCLineSegment::DCLineSegment() {}; -DCLineSegment::~DCLineSegment() {}; +DCLineSegment::DCLineSegment() {} +DCLineSegment::~DCLineSegment() {} static const std::list PossibleProfilesForClass = { @@ -46,64 +42,66 @@ DCLineSegment::getPossibleProfilesForAttributes() const return map; } - -bool assign_DCLineSegment_capacitance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCLineSegment_capacitance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->capacitance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DCLineSegment_inductance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCLineSegment_inductance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inductance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DCLineSegment_length(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCLineSegment_length(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->length; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DCLineSegment_resistance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCLineSegment_resistance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->resistance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_DCLineSegment_capacitance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->capacitance; if (!buffer.str().empty()) @@ -117,7 +115,8 @@ bool get_DCLineSegment_capacitance(const BaseClass* BaseClass_ptr1, std::strings bool get_DCLineSegment_inductance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inductance; if (!buffer.str().empty()) @@ -131,7 +130,8 @@ bool get_DCLineSegment_inductance(const BaseClass* BaseClass_ptr1, std::stringst bool get_DCLineSegment_length(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->length; if (!buffer.str().empty()) @@ -145,7 +145,8 @@ bool get_DCLineSegment_length(const BaseClass* BaseClass_ptr1, std::stringstream bool get_DCLineSegment_resistance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCLineSegment* element = dynamic_cast(BaseClass_ptr1)) + const DCLineSegment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->resistance; if (!buffer.str().empty()) @@ -157,8 +158,6 @@ bool get_DCLineSegment_resistance(const BaseClass* BaseClass_ptr1, std::stringst return false; } - - const char DCLineSegment::debugName[] = "DCLineSegment"; const char* DCLineSegment::debugString() const { @@ -167,15 +166,15 @@ const char* DCLineSegment::debugString() const void DCLineSegment::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCLineSegment"), &DCLineSegment_factory)); + factory_map.emplace("cim:DCLineSegment", &DCLineSegment_factory); } void DCLineSegment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCLineSegment.capacitance"), &assign_DCLineSegment_capacitance)); - assign_map.insert(std::make_pair(std::string("cim:DCLineSegment.inductance"), &assign_DCLineSegment_inductance)); - assign_map.insert(std::make_pair(std::string("cim:DCLineSegment.length"), &assign_DCLineSegment_length)); - assign_map.insert(std::make_pair(std::string("cim:DCLineSegment.resistance"), &assign_DCLineSegment_resistance)); + assign_map.emplace("cim:DCLineSegment.capacitance", &assign_DCLineSegment_capacitance); + assign_map.emplace("cim:DCLineSegment.inductance", &assign_DCLineSegment_inductance); + assign_map.emplace("cim:DCLineSegment.length", &assign_DCLineSegment_length); + assign_map.emplace("cim:DCLineSegment.resistance", &assign_DCLineSegment_resistance); } void DCLineSegment::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/DCLineSegment.hpp b/CGMES_3.0.0/DCLineSegment.hpp index ba951ecaf..4f8354064 100644 --- a/CGMES_3.0.0/DCLineSegment.hpp +++ b/CGMES_3.0.0/DCLineSegment.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A wire or combination of wires not insulated from one another, with consistent electrical characteristics, used to carry direct current between points in the DC region of the power system. - */ + /** \brief A wire or combination of wires not insulated from one another, with consistent electrical characteristics, used to carry direct current between points in the DC region of the power system. */ class DCLineSegment : public DCConductingEquipment { public: @@ -30,10 +28,17 @@ namespace CIMPP DCLineSegment(); ~DCLineSegment() override; - CIMPP::Capacitance capacitance; /* Capacitance of the DC line segment. Significant for cables only. Default: nullptr */ - CIMPP::Inductance inductance; /* Inductance of the DC line segment. Negligible compared with DCSeriesDevice used for smoothing. Default: nullptr */ - CIMPP::Length length; /* Segment length for calculating line section capabilities. Default: nullptr */ - CIMPP::Resistance resistance; /* Resistance of the DC line segment. Default: nullptr */ + /** \brief Capacitance of the DC line segment. Significant for cables only. Default: nullptr */ + CIMPP::Capacitance capacitance; + + /** \brief Inductance of the DC line segment. Negligible compared with DCSeriesDevice used for smoothing. Default: nullptr */ + CIMPP::Inductance inductance; + + /** \brief Segment length for calculating line section capabilities. Default: nullptr */ + CIMPP::Length length; + + /** \brief Resistance of the DC line segment. Default: nullptr */ + CIMPP::Resistance resistance; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/DCNode.cpp b/CGMES_3.0.0/DCNode.cpp index 38bacaf43..8fd69d983 100644 --- a/CGMES_3.0.0/DCNode.cpp +++ b/CGMES_3.0.0/DCNode.cpp @@ -8,14 +8,14 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "DCEquipmentContainer.hpp" #include "DCBaseTerminal.hpp" +#include "DCEquipmentContainer.hpp" #include "DCTopologicalNode.hpp" using namespace CIMPP; -DCNode::DCNode() : DCEquipmentContainer(nullptr), DCTopologicalNode(nullptr) {}; -DCNode::~DCNode() {}; +DCNode::DCNode() : DCEquipmentContainer(nullptr), DCTopologicalNode(nullptr) {} +DCNode::~DCNode() {} static const std::list PossibleProfilesForClass = { @@ -45,8 +45,6 @@ DCNode::getPossibleProfilesForAttributes() const return map; } - - bool assign_DCEquipmentContainer_DCNodes(BaseClass*, BaseClass*); bool assign_DCNode_DCEquipmentContainer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -63,6 +61,7 @@ bool assign_DCNode_DCEquipmentContainer(BaseClass* BaseClass_ptr1, BaseClass* Ba } return false; } + bool assign_DCBaseTerminal_DCNode(BaseClass*, BaseClass*); bool assign_DCNode_DCTerminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -79,6 +78,7 @@ bool assign_DCNode_DCTerminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_p } return false; } + bool assign_DCTopologicalNode_DCNodes(BaseClass*, BaseClass*); bool assign_DCNode_DCTopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -96,10 +96,10 @@ bool assign_DCNode_DCTopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseC return false; } - bool get_DCNode_DCEquipmentContainer(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DCNode* element = dynamic_cast(BaseClass_ptr1)) + const DCNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DCEquipmentContainer != 0) { @@ -110,9 +110,11 @@ bool get_DCNode_DCEquipmentContainer(const BaseClass* BaseClass_ptr1, std::list< return false; } + bool get_DCNode_DCTopologicalNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DCNode* element = dynamic_cast(BaseClass_ptr1)) + const DCNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DCTopologicalNode != 0) { @@ -123,7 +125,6 @@ bool get_DCNode_DCTopologicalNode(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCNode"), &DCNode_factory)); + factory_map.emplace("cim:DCNode", &DCNode_factory); } void DCNode::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -141,9 +142,9 @@ void DCNode::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCNode.DCEquipmentContainer"), &assign_DCNode_DCEquipmentContainer)); - assign_map.insert(std::make_pair(std::string("cim:DCNode.DCTerminals"), &assign_DCNode_DCTerminals)); - assign_map.insert(std::make_pair(std::string("cim:DCNode.DCTopologicalNode"), &assign_DCNode_DCTopologicalNode)); + assign_map.emplace("cim:DCNode.DCEquipmentContainer", &assign_DCNode_DCEquipmentContainer); + assign_map.emplace("cim:DCNode.DCTerminals", &assign_DCNode_DCTerminals); + assign_map.emplace("cim:DCNode.DCTopologicalNode", &assign_DCNode_DCTopologicalNode); } void DCNode::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/DCNode.hpp b/CGMES_3.0.0/DCNode.hpp index 453e965d4..35565047a 100644 --- a/CGMES_3.0.0/DCNode.hpp +++ b/CGMES_3.0.0/DCNode.hpp @@ -19,9 +19,7 @@ namespace CIMPP class DCEquipmentContainer; class DCTopologicalNode; - /* - DC nodes are points where terminals of DC conducting equipment are connected together with zero impedance. - */ + /** \brief DC nodes are points where terminals of DC conducting equipment are connected together with zero impedance. */ class DCNode : public IdentifiedObject { public: @@ -29,9 +27,14 @@ namespace CIMPP DCNode(); ~DCNode() override; - CIMPP::DCEquipmentContainer* DCEquipmentContainer; /* The DC container for the DC nodes. Default: 0 */ - std::list DCTerminals; /* DC base terminals interconnected with zero impedance at a this DC connectivity node. Default: 0 */ - CIMPP::DCTopologicalNode* DCTopologicalNode; /* The DC topological node to which this DC connectivity node is assigned. May depend on the current state of switches in the network. Default: 0 */ + /** \brief The DC container for the DC nodes. Default: 0 */ + CIMPP::DCEquipmentContainer* DCEquipmentContainer; + + /** \brief DC base terminals interconnected with zero impedance at a this DC connectivity node. Default: 0 */ + std::list DCTerminals; + + /** \brief The DC topological node to which this DC connectivity node is assigned. May depend on the current state of switches in the network. Default: 0 */ + CIMPP::DCTopologicalNode* DCTopologicalNode; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/DCPolarityKind.cpp b/CGMES_3.0.0/DCPolarityKind.cpp index a1a646248..5c159224e 100644 --- a/CGMES_3.0.0/DCPolarityKind.cpp +++ b/CGMES_3.0.0/DCPolarityKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "DCPolarityKind") + if (EnumSymbol.substr(0, pos) != "DCPolarityKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "positive") + if (EnumSymbol == "positive") { rop = DCPolarityKind::positive; return lop; } - if(EnumSymbol == "middle") + if (EnumSymbol == "middle") { rop = DCPolarityKind::middle; return lop; } - if(EnumSymbol == "negative") + if (EnumSymbol == "negative") { rop = DCPolarityKind::negative; return lop; diff --git a/CGMES_3.0.0/DCPolarityKind.hpp b/CGMES_3.0.0/DCPolarityKind.hpp index 2307b002b..444a69d27 100644 --- a/CGMES_3.0.0/DCPolarityKind.hpp +++ b/CGMES_3.0.0/DCPolarityKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Polarity for DC circuits. - */ + /** \brief Polarity for DC circuits. */ class DCPolarityKind { public: enum DCPolarityKind_ENUM { - /** - * Positive pole. The converter terminal is intended to operate at a positive voltage relative the midpoint or negative terminal. - */ + /** Positive pole. The converter terminal is intended to operate at a positive voltage relative the midpoint or negative terminal. */ positive, - /** - * Middle pole. The converter terminal is the midpoint in a bipolar or symmetric monopole configuration. The midpoint can be grounded and/or have a metallic return. - */ + /** Middle pole. The converter terminal is the midpoint in a bipolar or symmetric monopole configuration. The midpoint can be grounded and/or have a metallic return. */ middle, - /** - * Negative pole. The converter terminal is intended to operate at a negative voltage relative the midpoint or positive terminal. - */ + /** Negative pole. The converter terminal is intended to operate at a negative voltage relative the midpoint or positive terminal. */ negative, }; diff --git a/CGMES_3.0.0/DCSeriesDevice.cpp b/CGMES_3.0.0/DCSeriesDevice.cpp index d44788bbb..f008336db 100644 --- a/CGMES_3.0.0/DCSeriesDevice.cpp +++ b/CGMES_3.0.0/DCSeriesDevice.cpp @@ -8,13 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Inductance.hpp" -#include "Resistance.hpp" using namespace CIMPP; -DCSeriesDevice::DCSeriesDevice() {}; -DCSeriesDevice::~DCSeriesDevice() {}; +DCSeriesDevice::DCSeriesDevice() {} +DCSeriesDevice::~DCSeriesDevice() {} static const std::list PossibleProfilesForClass = { @@ -42,38 +40,38 @@ DCSeriesDevice::getPossibleProfilesForAttributes() const return map; } - -bool assign_DCSeriesDevice_inductance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCSeriesDevice_inductance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1)) + DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inductance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DCSeriesDevice_resistance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCSeriesDevice_resistance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1)) + DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->resistance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_DCSeriesDevice_inductance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1)) + const DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inductance; if (!buffer.str().empty()) @@ -87,7 +85,8 @@ bool get_DCSeriesDevice_inductance(const BaseClass* BaseClass_ptr1, std::strings bool get_DCSeriesDevice_resistance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1)) + const DCSeriesDevice* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->resistance; if (!buffer.str().empty()) @@ -99,8 +98,6 @@ bool get_DCSeriesDevice_resistance(const BaseClass* BaseClass_ptr1, std::strings return false; } - - const char DCSeriesDevice::debugName[] = "DCSeriesDevice"; const char* DCSeriesDevice::debugString() const { @@ -109,13 +106,13 @@ const char* DCSeriesDevice::debugString() const void DCSeriesDevice::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCSeriesDevice"), &DCSeriesDevice_factory)); + factory_map.emplace("cim:DCSeriesDevice", &DCSeriesDevice_factory); } void DCSeriesDevice::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCSeriesDevice.inductance"), &assign_DCSeriesDevice_inductance)); - assign_map.insert(std::make_pair(std::string("cim:DCSeriesDevice.resistance"), &assign_DCSeriesDevice_resistance)); + assign_map.emplace("cim:DCSeriesDevice.inductance", &assign_DCSeriesDevice_inductance); + assign_map.emplace("cim:DCSeriesDevice.resistance", &assign_DCSeriesDevice_resistance); } void DCSeriesDevice::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/DCSeriesDevice.hpp b/CGMES_3.0.0/DCSeriesDevice.hpp index d1e544ecf..72cc951ae 100644 --- a/CGMES_3.0.0/DCSeriesDevice.hpp +++ b/CGMES_3.0.0/DCSeriesDevice.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A series device within the DC system, typically a reactor used for filtering or smoothing. Needed for transient and short circuit studies. - */ + /** \brief A series device within the DC system, typically a reactor used for filtering or smoothing. Needed for transient and short circuit studies. */ class DCSeriesDevice : public DCConductingEquipment { public: @@ -28,8 +26,11 @@ namespace CIMPP DCSeriesDevice(); ~DCSeriesDevice() override; - CIMPP::Inductance inductance; /* Inductance of the device. Default: nullptr */ - CIMPP::Resistance resistance; /* Resistance of the DC device. Default: nullptr */ + /** \brief Inductance of the device. Default: nullptr */ + CIMPP::Inductance inductance; + + /** \brief Resistance of the DC device. Default: nullptr */ + CIMPP::Resistance resistance; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/DCShunt.cpp b/CGMES_3.0.0/DCShunt.cpp index a43346a33..c37df6f78 100644 --- a/CGMES_3.0.0/DCShunt.cpp +++ b/CGMES_3.0.0/DCShunt.cpp @@ -8,13 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Capacitance.hpp" -#include "Resistance.hpp" using namespace CIMPP; -DCShunt::DCShunt() {}; -DCShunt::~DCShunt() {}; +DCShunt::DCShunt() {} +DCShunt::~DCShunt() {} static const std::list PossibleProfilesForClass = { @@ -42,38 +40,38 @@ DCShunt::getPossibleProfilesForAttributes() const return map; } - -bool assign_DCShunt_capacitance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCShunt_capacitance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCShunt* element = dynamic_cast(BaseClass_ptr1)) + DCShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->capacitance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DCShunt_resistance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DCShunt_resistance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DCShunt* element = dynamic_cast(BaseClass_ptr1)) + DCShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->resistance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_DCShunt_capacitance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCShunt* element = dynamic_cast(BaseClass_ptr1)) + const DCShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->capacitance; if (!buffer.str().empty()) @@ -87,7 +85,8 @@ bool get_DCShunt_capacitance(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_DCShunt_resistance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DCShunt* element = dynamic_cast(BaseClass_ptr1)) + const DCShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->resistance; if (!buffer.str().empty()) @@ -99,8 +98,6 @@ bool get_DCShunt_resistance(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char DCShunt::debugName[] = "DCShunt"; const char* DCShunt::debugString() const { @@ -109,13 +106,13 @@ const char* DCShunt::debugString() const void DCShunt::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCShunt"), &DCShunt_factory)); + factory_map.emplace("cim:DCShunt", &DCShunt_factory); } void DCShunt::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCShunt.capacitance"), &assign_DCShunt_capacitance)); - assign_map.insert(std::make_pair(std::string("cim:DCShunt.resistance"), &assign_DCShunt_resistance)); + assign_map.emplace("cim:DCShunt.capacitance", &assign_DCShunt_capacitance); + assign_map.emplace("cim:DCShunt.resistance", &assign_DCShunt_resistance); } void DCShunt::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/DCShunt.hpp b/CGMES_3.0.0/DCShunt.hpp index 565ee75b4..77a9973be 100644 --- a/CGMES_3.0.0/DCShunt.hpp +++ b/CGMES_3.0.0/DCShunt.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A shunt device within the DC system, typically used for filtering. Needed for transient and short circuit studies. - */ + /** \brief A shunt device within the DC system, typically used for filtering. Needed for transient and short circuit studies. */ class DCShunt : public DCConductingEquipment { public: @@ -28,8 +26,11 @@ namespace CIMPP DCShunt(); ~DCShunt() override; - CIMPP::Capacitance capacitance; /* Capacitance of the DC shunt. Default: nullptr */ - CIMPP::Resistance resistance; /* Resistance of the DC device. Default: nullptr */ + /** \brief Capacitance of the DC shunt. Default: nullptr */ + CIMPP::Capacitance capacitance; + + /** \brief Resistance of the DC device. Default: nullptr */ + CIMPP::Resistance resistance; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/DCSwitch.cpp b/CGMES_3.0.0/DCSwitch.cpp index b5fbfc7a0..2183c59a5 100644 --- a/CGMES_3.0.0/DCSwitch.cpp +++ b/CGMES_3.0.0/DCSwitch.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCSwitch::DCSwitch() {}; -DCSwitch::~DCSwitch() {}; +DCSwitch::DCSwitch() {} +DCSwitch::~DCSwitch() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ DCSwitch::getPossibleProfilesForAttributes() const return map; } - - - - - const char DCSwitch::debugName[] = "DCSwitch"; const char* DCSwitch::debugString() const { @@ -51,7 +46,7 @@ const char* DCSwitch::debugString() const void DCSwitch::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCSwitch"), &DCSwitch_factory)); + factory_map.emplace("cim:DCSwitch", &DCSwitch_factory); } void DCSwitch::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/DCSwitch.hpp b/CGMES_3.0.0/DCSwitch.hpp index c24dfb18c..2512b3a78 100644 --- a/CGMES_3.0.0/DCSwitch.hpp +++ b/CGMES_3.0.0/DCSwitch.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A switch within the DC system. - */ + /** \brief A switch within the DC system. */ class DCSwitch : public DCConductingEquipment { public: @@ -26,7 +24,6 @@ namespace CIMPP DCSwitch(); ~DCSwitch() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/DCTerminal.cpp b/CGMES_3.0.0/DCTerminal.cpp index f71b265b9..b33606f5f 100644 --- a/CGMES_3.0.0/DCTerminal.cpp +++ b/CGMES_3.0.0/DCTerminal.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCTerminal::DCTerminal() : DCConductingEquipment(nullptr) {}; -DCTerminal::~DCTerminal() {}; +DCTerminal::DCTerminal() : DCConductingEquipment(nullptr) {} +DCTerminal::~DCTerminal() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ DCTerminal::getPossibleProfilesForAttributes() const return map; } - - bool assign_DCConductingEquipment_DCTerminals(BaseClass*, BaseClass*); bool assign_DCTerminal_DCConductingEquipment(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,10 +59,10 @@ bool assign_DCTerminal_DCConductingEquipment(BaseClass* BaseClass_ptr1, BaseClas return false; } - bool get_DCTerminal_DCConductingEquipment(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DCTerminal* element = dynamic_cast(BaseClass_ptr1)) + const DCTerminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DCConductingEquipment != 0) { @@ -75,7 +73,6 @@ bool get_DCTerminal_DCConductingEquipment(const BaseClass* BaseClass_ptr1, std:: return false; } - const char DCTerminal::debugName[] = "DCTerminal"; const char* DCTerminal::debugString() const { @@ -84,7 +81,7 @@ const char* DCTerminal::debugString() const void DCTerminal::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCTerminal"), &DCTerminal_factory)); + factory_map.emplace("cim:DCTerminal", &DCTerminal_factory); } void DCTerminal::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -93,7 +90,7 @@ void DCTerminal::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCTerminal.DCConductingEquipment"), &assign_DCTerminal_DCConductingEquipment)); + assign_map.emplace("cim:DCTerminal.DCConductingEquipment", &assign_DCTerminal_DCConductingEquipment); } void DCTerminal::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/DCTerminal.hpp b/CGMES_3.0.0/DCTerminal.hpp index 0ed30630b..8c8b07066 100644 --- a/CGMES_3.0.0/DCTerminal.hpp +++ b/CGMES_3.0.0/DCTerminal.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class DCConductingEquipment; - /* - An electrical connection point to generic DC conducting equipment. - */ + /** \brief An electrical connection point to generic DC conducting equipment. */ class DCTerminal : public DCBaseTerminal { public: @@ -27,7 +25,8 @@ namespace CIMPP DCTerminal(); ~DCTerminal() override; - CIMPP::DCConductingEquipment* DCConductingEquipment; /* An DC terminal belong to a DC conducting equipment. Default: 0 */ + /** \brief An DC terminal belong to a DC conducting equipment. Default: 0 */ + CIMPP::DCConductingEquipment* DCConductingEquipment; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/DCTopologicalIsland.cpp b/CGMES_3.0.0/DCTopologicalIsland.cpp index c75bdc26e..1e7a83ea2 100644 --- a/CGMES_3.0.0/DCTopologicalIsland.cpp +++ b/CGMES_3.0.0/DCTopologicalIsland.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DCTopologicalIsland::DCTopologicalIsland() {}; -DCTopologicalIsland::~DCTopologicalIsland() {}; +DCTopologicalIsland::DCTopologicalIsland() {} +DCTopologicalIsland::~DCTopologicalIsland() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ DCTopologicalIsland::getPossibleProfilesForAttributes() const return map; } - - bool assign_DCTopologicalNode_DCTopologicalIsland(BaseClass*, BaseClass*); bool assign_DCTopologicalIsland_DCTopologicalNodes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_DCTopologicalIsland_DCTopologicalNodes(BaseClass* BaseClass_ptr1, Ba return false; } - bool get_DCTopologicalIsland_DCTopologicalNodes(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DCTopologicalIsland* element = dynamic_cast(BaseClass_ptr1)) + const DCTopologicalIsland* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { std::copy(element->DCTopologicalNodes.begin(), element->DCTopologicalNodes.end(), std::back_inserter(BaseClass_list)); return !BaseClass_list.empty(); @@ -70,7 +68,6 @@ bool get_DCTopologicalIsland_DCTopologicalNodes(const BaseClass* BaseClass_ptr1, return false; } - const char DCTopologicalIsland::debugName[] = "DCTopologicalIsland"; const char* DCTopologicalIsland::debugString() const { @@ -79,7 +76,7 @@ const char* DCTopologicalIsland::debugString() const void DCTopologicalIsland::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCTopologicalIsland"), &DCTopologicalIsland_factory)); + factory_map.emplace("cim:DCTopologicalIsland", &DCTopologicalIsland_factory); } void DCTopologicalIsland::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -88,7 +85,7 @@ void DCTopologicalIsland::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCTopologicalIsland.DCTopologicalNodes"), &assign_DCTopologicalIsland_DCTopologicalNodes)); + assign_map.emplace("cim:DCTopologicalIsland.DCTopologicalNodes", &assign_DCTopologicalIsland_DCTopologicalNodes); } void DCTopologicalIsland::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/DCTopologicalIsland.hpp b/CGMES_3.0.0/DCTopologicalIsland.hpp index dc4542f2a..ba6001d9b 100644 --- a/CGMES_3.0.0/DCTopologicalIsland.hpp +++ b/CGMES_3.0.0/DCTopologicalIsland.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class DCTopologicalNode; - /* - An electrically connected subset of the network. DC topological islands can change as the current network state changes, e.g. due to: - disconnect switches or breakers changing state in a SCADA/EMS. - manual creation, change or deletion of topological nodes in a planning tool. Only energised TopologicalNode-s shall be part of the topological island. - */ + /** \brief An electrically connected subset of the network. DC topological islands can change as the current network state changes, e.g. due to: - disconnect switches or breakers changing state in a SCADA/EMS. - manual creation, change or deletion of topological nodes in a planning tool. Only energised TopologicalNode-s shall be part of the topological island. */ class DCTopologicalIsland : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP DCTopologicalIsland(); ~DCTopologicalIsland() override; - std::list DCTopologicalNodes; /* The DC topological nodes in a DC topological island. Default: 0 */ + /** \brief The DC topological nodes in a DC topological island. Default: 0 */ + std::list DCTopologicalNodes; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/DCTopologicalNode.cpp b/CGMES_3.0.0/DCTopologicalNode.cpp index 72a2e0655..86481b2ec 100644 --- a/CGMES_3.0.0/DCTopologicalNode.cpp +++ b/CGMES_3.0.0/DCTopologicalNode.cpp @@ -8,15 +8,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include +#include "DCBaseTerminal.hpp" #include "DCEquipmentContainer.hpp" #include "DCNode.hpp" -#include "DCBaseTerminal.hpp" #include "DCTopologicalIsland.hpp" using namespace CIMPP; -DCTopologicalNode::DCTopologicalNode() : DCEquipmentContainer(nullptr), DCTopologicalIsland(nullptr) {}; -DCTopologicalNode::~DCTopologicalNode() {}; +DCTopologicalNode::DCTopologicalNode() : DCEquipmentContainer(nullptr), DCTopologicalIsland(nullptr) {} +DCTopologicalNode::~DCTopologicalNode() {} static const std::list PossibleProfilesForClass = { @@ -47,8 +47,6 @@ DCTopologicalNode::getPossibleProfilesForAttributes() const return map; } - - bool assign_DCEquipmentContainer_DCTopologicalNode(BaseClass*, BaseClass*); bool assign_DCTopologicalNode_DCEquipmentContainer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -65,6 +63,7 @@ bool assign_DCTopologicalNode_DCEquipmentContainer(BaseClass* BaseClass_ptr1, Ba } return false; } + bool assign_DCNode_DCTopologicalNode(BaseClass*, BaseClass*); bool assign_DCTopologicalNode_DCNodes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -81,6 +80,7 @@ bool assign_DCTopologicalNode_DCNodes(BaseClass* BaseClass_ptr1, BaseClass* Base } return false; } + bool assign_DCBaseTerminal_DCTopologicalNode(BaseClass*, BaseClass*); bool assign_DCTopologicalNode_DCTerminals(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -97,6 +97,7 @@ bool assign_DCTopologicalNode_DCTerminals(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_DCTopologicalIsland_DCTopologicalNodes(BaseClass*, BaseClass*); bool assign_DCTopologicalNode_DCTopologicalIsland(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -114,10 +115,10 @@ bool assign_DCTopologicalNode_DCTopologicalIsland(BaseClass* BaseClass_ptr1, Bas return false; } - bool get_DCTopologicalNode_DCEquipmentContainer(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DCTopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + const DCTopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DCEquipmentContainer != 0) { @@ -129,6 +130,8 @@ bool get_DCTopologicalNode_DCEquipmentContainer(const BaseClass* BaseClass_ptr1, } + + const char DCTopologicalNode::debugName[] = "DCTopologicalNode"; const char* DCTopologicalNode::debugString() const { @@ -137,7 +140,7 @@ const char* DCTopologicalNode::debugString() const void DCTopologicalNode::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DCTopologicalNode"), &DCTopologicalNode_factory)); + factory_map.emplace("cim:DCTopologicalNode", &DCTopologicalNode_factory); } void DCTopologicalNode::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -146,10 +149,10 @@ void DCTopologicalNode::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DCTopologicalNode.DCEquipmentContainer"), &assign_DCTopologicalNode_DCEquipmentContainer)); - assign_map.insert(std::make_pair(std::string("cim:DCTopologicalNode.DCNodes"), &assign_DCTopologicalNode_DCNodes)); - assign_map.insert(std::make_pair(std::string("cim:DCTopologicalNode.DCTerminals"), &assign_DCTopologicalNode_DCTerminals)); - assign_map.insert(std::make_pair(std::string("cim:DCTopologicalNode.DCTopologicalIsland"), &assign_DCTopologicalNode_DCTopologicalIsland)); + assign_map.emplace("cim:DCTopologicalNode.DCEquipmentContainer", &assign_DCTopologicalNode_DCEquipmentContainer); + assign_map.emplace("cim:DCTopologicalNode.DCNodes", &assign_DCTopologicalNode_DCNodes); + assign_map.emplace("cim:DCTopologicalNode.DCTerminals", &assign_DCTopologicalNode_DCTerminals); + assign_map.emplace("cim:DCTopologicalNode.DCTopologicalIsland", &assign_DCTopologicalNode_DCTopologicalIsland); } void DCTopologicalNode::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/DCTopologicalNode.hpp b/CGMES_3.0.0/DCTopologicalNode.hpp index 924c6360a..250595287 100644 --- a/CGMES_3.0.0/DCTopologicalNode.hpp +++ b/CGMES_3.0.0/DCTopologicalNode.hpp @@ -20,9 +20,7 @@ namespace CIMPP class DCNode; class DCTopologicalIsland; - /* - DC bus. - */ + /** \brief DC bus. */ class DCTopologicalNode : public IdentifiedObject { public: @@ -30,10 +28,17 @@ namespace CIMPP DCTopologicalNode(); ~DCTopologicalNode() override; - CIMPP::DCEquipmentContainer* DCEquipmentContainer; /* The connectivity node container to which the topological node belongs. Default: 0 */ - std::list DCNodes; /* The DC connectivity nodes combined together to form this DC topological node. May depend on the current state of switches in the network. Default: 0 */ - std::list DCTerminals; /* See association end TopologicalNode.Terminal. Default: 0 */ - CIMPP::DCTopologicalIsland* DCTopologicalIsland; /* A DC topological node belongs to a DC topological island. Default: 0 */ + /** \brief The connectivity node container to which the topological node belongs. Default: 0 */ + CIMPP::DCEquipmentContainer* DCEquipmentContainer; + + /** \brief The DC connectivity nodes combined together to form this DC topological node. May depend on the current state of switches in the network. Default: 0 */ + std::list DCNodes; + + /** \brief See association end TopologicalNode.Terminal. Default: 0 */ + std::list DCTerminals; + + /** \brief A DC topological node belongs to a DC topological island. Default: 0 */ + CIMPP::DCTopologicalIsland* DCTopologicalIsland; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Date.hpp b/CGMES_3.0.0/Date.hpp index e2063f08d..2b1ac1788 100644 --- a/CGMES_3.0.0/Date.hpp +++ b/CGMES_3.0.0/Date.hpp @@ -4,22 +4,20 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen */ -#include #include #include +#include namespace CIMPP { - /* - Date as "yyyy-mm-dd", which conforms with ISO 8601. UTC time zone is specified as "yyyy-mm-ddZ". A local timezone relative UTC is specified as "yyyy-mm-dd(+/-)hh:mm". - */ + /** \brief Date as "yyyy-mm-dd", which conforms with ISO 8601. UTC time zone is specified as "yyyy-mm-ddZ". A local timezone relative UTC is specified as "yyyy-mm-dd(+/-)hh:mm". */ class Date { public: Date() : initialized(false) {} Date(const std::string& value) : value(value), initialized(true) {} - Date& operator=(const std::string &rop); + Date& operator=(const std::string& rop); operator std::string() const; std::string value; diff --git a/CGMES_3.0.0/DateTime.hpp b/CGMES_3.0.0/DateTime.hpp index 745e7583b..1e503d539 100644 --- a/CGMES_3.0.0/DateTime.hpp +++ b/CGMES_3.0.0/DateTime.hpp @@ -4,22 +4,20 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen */ -#include #include #include +#include namespace CIMPP { - /* - Date and time as "yyyy-mm-ddThh:mm:ss.sss", which conforms with ISO 8601. UTC time zone is specified as "yyyy-mm-ddThh:mm:ss.sssZ". A local timezone relative UTC is specified as "yyyy-mm-ddThh:mm:ss.sss-hh:mm". The second component (shown here as "ss.sss") could have any number of digits in its fractional part to allow any kind of precision beyond seconds. - */ + /** \brief Date and time as "yyyy-mm-ddThh:mm:ss.sss", which conforms with ISO 8601. UTC time zone is specified as "yyyy-mm-ddThh:mm:ss.sssZ". A local timezone relative UTC is specified as "yyyy-mm-ddThh:mm:ss.sss-hh:mm". The second component (shown here as "ss.sss") could have any number of digits in its fractional part to allow any kind of precision beyond seconds. */ class DateTime { public: DateTime() : initialized(false) {} DateTime(const std::string& value) : value(value), initialized(true) {} - DateTime& operator=(const std::string &rop); + DateTime& operator=(const std::string& rop); operator std::string() const; std::string value; diff --git a/CGMES_3.0.0/DayType.cpp b/CGMES_3.0.0/DayType.cpp index f97e62d1d..3783d542a 100644 --- a/CGMES_3.0.0/DayType.cpp +++ b/CGMES_3.0.0/DayType.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DayType::DayType() {}; -DayType::~DayType() {}; +DayType::DayType() {} +DayType::~DayType() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ DayType::getPossibleProfilesForAttributes() const return map; } - - bool assign_SeasonDayTypeSchedule_DayType(BaseClass*, BaseClass*); bool assign_DayType_SeasonDayTypeSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_DayType_SeasonDayTypeSchedules(BaseClass* BaseClass_ptr1, BaseClass* } - const char DayType::debugName[] = "DayType"; const char* DayType::debugString() const { @@ -69,7 +66,7 @@ const char* DayType::debugString() const void DayType::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DayType"), &DayType_factory)); + factory_map.emplace("cim:DayType", &DayType_factory); } void DayType::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void DayType::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DayType.SeasonDayTypeSchedules"), &assign_DayType_SeasonDayTypeSchedules)); + assign_map.emplace("cim:DayType.SeasonDayTypeSchedules", &assign_DayType_SeasonDayTypeSchedules); } void DayType::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/DayType.hpp b/CGMES_3.0.0/DayType.hpp index adf424a42..0d4ca15a9 100644 --- a/CGMES_3.0.0/DayType.hpp +++ b/CGMES_3.0.0/DayType.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class SeasonDayTypeSchedule; - /* - Group of similar days. For example it could be used to represent weekdays, weekend, or holidays. - */ + /** \brief Group of similar days. For example it could be used to represent weekdays, weekend, or holidays. */ class DayType : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP DayType(); ~DayType() override; - std::list SeasonDayTypeSchedules; /* Schedules that use this DayType. Default: 0 */ + /** \brief Schedules that use this DayType. Default: 0 */ + std::list SeasonDayTypeSchedules; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Decimal.hpp b/CGMES_3.0.0/Decimal.hpp index fa74e37f8..0c8633d79 100644 --- a/CGMES_3.0.0/Decimal.hpp +++ b/CGMES_3.0.0/Decimal.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Decimal is the base-10 notational system for representing real numbers. - */ + /** \brief Decimal is the base-10 notational system for representing real numbers. */ class Decimal { public: diff --git a/CGMES_3.0.0/Diagram.cpp b/CGMES_3.0.0/Diagram.cpp index 9b5bda55d..20da79106 100644 --- a/CGMES_3.0.0/Diagram.cpp +++ b/CGMES_3.0.0/Diagram.cpp @@ -10,16 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "DiagramObject.hpp" #include "DiagramStyle.hpp" -#include "OrientationKind.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" using namespace CIMPP; -Diagram::Diagram() : DiagramStyle(nullptr) {}; -Diagram::~Diagram() {}; +Diagram::Diagram() : DiagramStyle(nullptr) {} +Diagram::~Diagram() {} static const std::list PossibleProfilesForClass = { @@ -52,125 +47,131 @@ Diagram::getPossibleProfilesForAttributes() const return map; } - -bool assign_Diagram_orientation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramObject_Diagram(BaseClass*, BaseClass*); +bool assign_Diagram_DiagramElements(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (Diagram* element = dynamic_cast(BaseClass_ptr1)) + Diagram* element = dynamic_cast(BaseClass_ptr1); + DiagramObject* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->orientation; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->DiagramElements.begin(), element->DiagramElements.end(), element2) == element->DiagramElements.end()) + { + element->DiagramElements.push_back(element2); + return assign_DiagramObject_Diagram(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_Diagram_x1InitialView(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramStyle_Diagram(BaseClass*, BaseClass*); +bool assign_Diagram_DiagramStyle(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (Diagram* element = dynamic_cast(BaseClass_ptr1)) + Diagram* element = dynamic_cast(BaseClass_ptr1); + DiagramStyle* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->x1InitialView; - if (buffer.fail()) - return false; - else - return true; + if (element->DiagramStyle != element2) + { + element->DiagramStyle = element2; + return assign_DiagramStyle_Diagram(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_Diagram_x2InitialView(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Diagram_orientation(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Diagram* element = dynamic_cast(BaseClass_ptr1)) + Diagram* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->x2InitialView; - if (buffer.fail()) - return false; - else + buffer >> element->orientation; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Diagram_y1InitialView(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Diagram_x1InitialView(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Diagram* element = dynamic_cast(BaseClass_ptr1)) + Diagram* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->y1InitialView; - if (buffer.fail()) - return false; - else + buffer >> element->x1InitialView; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Diagram_y2InitialView(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Diagram_x2InitialView(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Diagram* element = dynamic_cast(BaseClass_ptr1)) + Diagram* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->y2InitialView; - if (buffer.fail()) - return false; - else + buffer >> element->x2InitialView; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_DiagramObject_Diagram(BaseClass*, BaseClass*); -bool assign_Diagram_DiagramElements(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_Diagram_y1InitialView(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { Diagram* element = dynamic_cast(BaseClass_ptr1); - DiagramObject* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->DiagramElements.begin(), element->DiagramElements.end(), element2) == element->DiagramElements.end()) + buffer >> element->y1InitialView; + if (!buffer.fail()) { - element->DiagramElements.push_back(element2); - return assign_DiagramObject_Diagram(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_DiagramStyle_Diagram(BaseClass*, BaseClass*); -bool assign_Diagram_DiagramStyle(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_Diagram_y2InitialView(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { Diagram* element = dynamic_cast(BaseClass_ptr1); - DiagramStyle* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->DiagramStyle != element2) + buffer >> element->y2InitialView; + if (!buffer.fail()) { - element->DiagramStyle = element2; - return assign_DiagramStyle_Diagram(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool get_Diagram_x1InitialView(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) + +bool get_Diagram_DiagramStyle(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Diagram* element = dynamic_cast(BaseClass_ptr1)) + const Diagram* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->x1InitialView; - if (!buffer.str().empty()) + if (element->DiagramStyle != 0) { + BaseClass_list.push_back(element->DiagramStyle); return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_Diagram_x2InitialView(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_Diagram_orientation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Diagram* element = dynamic_cast(BaseClass_ptr1)) + const Diagram* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->x2InitialView; + buffer << element->orientation; if (!buffer.str().empty()) { return true; @@ -180,11 +181,12 @@ bool get_Diagram_x2InitialView(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } -bool get_Diagram_y1InitialView(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_Diagram_x1InitialView(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Diagram* element = dynamic_cast(BaseClass_ptr1)) + const Diagram* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->y1InitialView; + buffer << element->x1InitialView; if (!buffer.str().empty()) { return true; @@ -194,11 +196,12 @@ bool get_Diagram_y1InitialView(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } -bool get_Diagram_y2InitialView(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_Diagram_x2InitialView(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Diagram* element = dynamic_cast(BaseClass_ptr1)) + const Diagram* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->y2InitialView; + buffer << element->x2InitialView; if (!buffer.str().empty()) { return true; @@ -208,26 +211,27 @@ bool get_Diagram_y2InitialView(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } - -bool get_Diagram_DiagramStyle(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) +bool get_Diagram_y1InitialView(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Diagram* element = dynamic_cast(BaseClass_ptr1)) + const Diagram* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->DiagramStyle != 0) + buffer << element->y1InitialView; + if (!buffer.str().empty()) { - BaseClass_list.push_back(element->DiagramStyle); return true; } } + buffer.setstate(std::ios::failbit); return false; } - -bool get_Diagram_orientation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_Diagram_y2InitialView(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Diagram* element = dynamic_cast(BaseClass_ptr1)) + const Diagram* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->orientation; + buffer << element->y2InitialView; if (!buffer.str().empty()) { return true; @@ -245,22 +249,22 @@ const char* Diagram::debugString() const void Diagram::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Diagram"), &Diagram_factory)); + factory_map.emplace("cim:Diagram", &Diagram_factory); } void Diagram::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Diagram.orientation"), &assign_Diagram_orientation)); - assign_map.insert(std::make_pair(std::string("cim:Diagram.x1InitialView"), &assign_Diagram_x1InitialView)); - assign_map.insert(std::make_pair(std::string("cim:Diagram.x2InitialView"), &assign_Diagram_x2InitialView)); - assign_map.insert(std::make_pair(std::string("cim:Diagram.y1InitialView"), &assign_Diagram_y1InitialView)); - assign_map.insert(std::make_pair(std::string("cim:Diagram.y2InitialView"), &assign_Diagram_y2InitialView)); + assign_map.emplace("cim:Diagram.orientation", &assign_Diagram_orientation); + assign_map.emplace("cim:Diagram.x1InitialView", &assign_Diagram_x1InitialView); + assign_map.emplace("cim:Diagram.x2InitialView", &assign_Diagram_x2InitialView); + assign_map.emplace("cim:Diagram.y1InitialView", &assign_Diagram_y1InitialView); + assign_map.emplace("cim:Diagram.y2InitialView", &assign_Diagram_y2InitialView); } void Diagram::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Diagram.DiagramElements"), &assign_Diagram_DiagramElements)); - assign_map.insert(std::make_pair(std::string("cim:Diagram.DiagramStyle"), &assign_Diagram_DiagramStyle)); + assign_map.emplace("cim:Diagram.DiagramElements", &assign_Diagram_DiagramElements); + assign_map.emplace("cim:Diagram.DiagramStyle", &assign_Diagram_DiagramStyle); } void Diagram::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/Diagram.hpp b/CGMES_3.0.0/Diagram.hpp index af5124d3d..140afd706 100644 --- a/CGMES_3.0.0/Diagram.hpp +++ b/CGMES_3.0.0/Diagram.hpp @@ -20,9 +20,7 @@ namespace CIMPP class DiagramObject; class DiagramStyle; - /* - The diagram being exchanged. The coordinate system is a standard Cartesian coordinate system and the orientation attribute defines the orientation. The initial view related attributes can be used to specify an initial view with the x,y coordinates of the diagonal points. - */ + /** \brief The diagram being exchanged. The coordinate system is a standard Cartesian coordinate system and the orientation attribute defines the orientation. The initial view related attributes can be used to specify an initial view with the x,y coordinates of the diagonal points. */ class Diagram : public IdentifiedObject { public: @@ -30,13 +28,26 @@ namespace CIMPP Diagram(); ~Diagram() override; - std::list DiagramElements; /* A diagram is made up of multiple diagram objects. Default: 0 */ - CIMPP::DiagramStyle* DiagramStyle; /* A Diagram may have a DiagramStyle. Default: 0 */ - CIMPP::OrientationKind orientation; /* Coordinate system orientation of the diagram. A positive orientation gives standard `right-hand` orientation, with negative orientation indicating a `left-hand` orientation. For 2D diagrams, a positive orientation will result in X values increasing from left to right and Y values increasing from bottom to top. A negative orientation gives the `left-hand` orientation (favoured by computer graphics displays) with X values increasing from left to right and Y values increasing from top to bottom. Default: 0 */ - CIMPP::Float x1InitialView; /* X coordinate of the first corner of the initial view. Default: 0.0 */ - CIMPP::Float x2InitialView; /* X coordinate of the second corner of the initial view. Default: 0.0 */ - CIMPP::Float y1InitialView; /* Y coordinate of the first corner of the initial view. Default: 0.0 */ - CIMPP::Float y2InitialView; /* Y coordinate of the second corner of the initial view. Default: 0.0 */ + /** \brief A diagram is made up of multiple diagram objects. Default: 0 */ + std::list DiagramElements; + + /** \brief A Diagram may have a DiagramStyle. Default: 0 */ + CIMPP::DiagramStyle* DiagramStyle; + + /** \brief Coordinate system orientation of the diagram. A positive orientation gives standard `right-hand` orientation, with negative orientation indicating a `left-hand` orientation. For 2D diagrams, a positive orientation will result in X values increasing from left to right and Y values increasing from bottom to top. A negative orientation gives the `left-hand` orientation (favoured by computer graphics displays) with X values increasing from left to right and Y values increasing from top to bottom. Default: 0 */ + CIMPP::OrientationKind orientation; + + /** \brief X coordinate of the first corner of the initial view. Default: 0.0 */ + CIMPP::Float x1InitialView; + + /** \brief X coordinate of the second corner of the initial view. Default: 0.0 */ + CIMPP::Float x2InitialView; + + /** \brief Y coordinate of the first corner of the initial view. Default: 0.0 */ + CIMPP::Float y1InitialView; + + /** \brief Y coordinate of the second corner of the initial view. Default: 0.0 */ + CIMPP::Float y2InitialView; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/DiagramObject.cpp b/CGMES_3.0.0/DiagramObject.cpp index e7744b392..b85c6e596 100644 --- a/CGMES_3.0.0/DiagramObject.cpp +++ b/CGMES_3.0.0/DiagramObject.cpp @@ -13,16 +13,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "DiagramObjectStyle.hpp" #include "IdentifiedObject.hpp" #include "VisibilityLayer.hpp" -#include "Integer.hpp" -#include "Boolean.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "AngleDegrees.hpp" using namespace CIMPP; -DiagramObject::DiagramObject() : Diagram(nullptr), DiagramObjectStyle(nullptr), IdentifiedObject(nullptr) {}; -DiagramObject::~DiagramObject() {}; +DiagramObject::DiagramObject() : Diagram(nullptr), DiagramObjectStyle(nullptr), IdentifiedObject(nullptr) {} +DiagramObject::~DiagramObject() {} static const std::list PossibleProfilesForClass = { @@ -58,73 +53,6 @@ DiagramObject::getPossibleProfilesForAttributes() const return map; } - -bool assign_DiagramObject_drawingOrder(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (DiagramObject* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->drawingOrder; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_DiagramObject_isPolygon(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (DiagramObject* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->isPolygon; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_DiagramObject_offsetX(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (DiagramObject* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->offsetX; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_DiagramObject_offsetY(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (DiagramObject* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->offsetY; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_DiagramObject_rotation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (DiagramObject* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->rotation; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_Diagram_DiagramElements(BaseClass*, BaseClass*); bool assign_DiagramObject_Diagram(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -141,6 +69,7 @@ bool assign_DiagramObject_Diagram(BaseClass* BaseClass_ptr1, BaseClass* BaseClas } return false; } + bool assign_DiagramObjectPoint_DiagramObject(BaseClass*, BaseClass*); bool assign_DiagramObject_DiagramObjectPoints(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -157,6 +86,7 @@ bool assign_DiagramObject_DiagramObjectPoints(BaseClass* BaseClass_ptr1, BaseCla } return false; } + bool assign_DiagramObjectStyle_StyledObjects(BaseClass*, BaseClass*); bool assign_DiagramObject_DiagramObjectStyle(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -173,6 +103,7 @@ bool assign_DiagramObject_DiagramObjectStyle(BaseClass* BaseClass_ptr1, BaseClas } return false; } + bool assign_IdentifiedObject_DiagramObjects(BaseClass*, BaseClass*); bool assign_DiagramObject_IdentifiedObject(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -189,6 +120,7 @@ bool assign_DiagramObject_IdentifiedObject(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_VisibilityLayer_VisibleObjects(BaseClass*, BaseClass*); bool assign_DiagramObject_VisibilityLayers(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -206,80 +138,80 @@ bool assign_DiagramObject_VisibilityLayers(BaseClass* BaseClass_ptr1, BaseClass* return false; } -bool get_DiagramObject_drawingOrder(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_DiagramObject_drawingOrder(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const DiagramObject* element = dynamic_cast(BaseClass_ptr1)) + DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->drawingOrder; - if (!buffer.str().empty()) + buffer >> element->drawingOrder; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_DiagramObject_isPolygon(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_DiagramObject_isPolygon(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const DiagramObject* element = dynamic_cast(BaseClass_ptr1)) + DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->isPolygon; - if (!buffer.str().empty()) + buffer >> element->isPolygon; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_DiagramObject_offsetX(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_DiagramObject_offsetX(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const DiagramObject* element = dynamic_cast(BaseClass_ptr1)) + DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->offsetX; - if (!buffer.str().empty()) + buffer >> element->offsetX; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_DiagramObject_offsetY(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_DiagramObject_offsetY(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const DiagramObject* element = dynamic_cast(BaseClass_ptr1)) + DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->offsetY; - if (!buffer.str().empty()) + buffer >> element->offsetY; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_DiagramObject_rotation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_DiagramObject_rotation(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const DiagramObject* element = dynamic_cast(BaseClass_ptr1)) + DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->rotation; - if (!buffer.str().empty()) + buffer >> element->rotation; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_DiagramObject_Diagram(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DiagramObject* element = dynamic_cast(BaseClass_ptr1)) + const DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Diagram != 0) { @@ -290,9 +222,11 @@ bool get_DiagramObject_Diagram(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DiagramObject* element = dynamic_cast(BaseClass_ptr1)) + const DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DiagramObjectStyle != 0) { @@ -305,7 +239,8 @@ bool get_DiagramObject_DiagramObjectStyle(const BaseClass* BaseClass_ptr1, std:: bool get_DiagramObject_IdentifiedObject(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DiagramObject* element = dynamic_cast(BaseClass_ptr1)) + const DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->IdentifiedObject != 0) { @@ -317,6 +252,81 @@ bool get_DiagramObject_IdentifiedObject(const BaseClass* BaseClass_ptr1, std::li } +bool get_DiagramObject_drawingOrder(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->drawingOrder; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_DiagramObject_isPolygon(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->isPolygon; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_DiagramObject_offsetX(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->offsetX; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_DiagramObject_offsetY(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->offsetY; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_DiagramObject_rotation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const DiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->rotation; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + const char DiagramObject::debugName[] = "DiagramObject"; const char* DiagramObject::debugString() const { @@ -325,25 +335,25 @@ const char* DiagramObject::debugString() const void DiagramObject::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiagramObject"), &DiagramObject_factory)); + factory_map.emplace("cim:DiagramObject", &DiagramObject_factory); } void DiagramObject::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.drawingOrder"), &assign_DiagramObject_drawingOrder)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.isPolygon"), &assign_DiagramObject_isPolygon)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.offsetX"), &assign_DiagramObject_offsetX)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.offsetY"), &assign_DiagramObject_offsetY)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.rotation"), &assign_DiagramObject_rotation)); + assign_map.emplace("cim:DiagramObject.drawingOrder", &assign_DiagramObject_drawingOrder); + assign_map.emplace("cim:DiagramObject.isPolygon", &assign_DiagramObject_isPolygon); + assign_map.emplace("cim:DiagramObject.offsetX", &assign_DiagramObject_offsetX); + assign_map.emplace("cim:DiagramObject.offsetY", &assign_DiagramObject_offsetY); + assign_map.emplace("cim:DiagramObject.rotation", &assign_DiagramObject_rotation); } void DiagramObject::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.Diagram"), &assign_DiagramObject_Diagram)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.DiagramObjectPoints"), &assign_DiagramObject_DiagramObjectPoints)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.DiagramObjectStyle"), &assign_DiagramObject_DiagramObjectStyle)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.IdentifiedObject"), &assign_DiagramObject_IdentifiedObject)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObject.VisibilityLayers"), &assign_DiagramObject_VisibilityLayers)); + assign_map.emplace("cim:DiagramObject.Diagram", &assign_DiagramObject_Diagram); + assign_map.emplace("cim:DiagramObject.DiagramObjectPoints", &assign_DiagramObject_DiagramObjectPoints); + assign_map.emplace("cim:DiagramObject.DiagramObjectStyle", &assign_DiagramObject_DiagramObjectStyle); + assign_map.emplace("cim:DiagramObject.IdentifiedObject", &assign_DiagramObject_IdentifiedObject); + assign_map.emplace("cim:DiagramObject.VisibilityLayers", &assign_DiagramObject_VisibilityLayers); } void DiagramObject::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/DiagramObject.hpp b/CGMES_3.0.0/DiagramObject.hpp index 0a0e2f561..d57c0d1ed 100644 --- a/CGMES_3.0.0/DiagramObject.hpp +++ b/CGMES_3.0.0/DiagramObject.hpp @@ -25,9 +25,7 @@ namespace CIMPP class IdentifiedObject; class VisibilityLayer; - /* - An object that defines one or more points in a given space. This object can be associated with anything that specializes IdentifiedObject. For single line diagrams such objects typically include such items as analog values, breakers, disconnectors, power transformers, and transmission lines. - */ + /** \brief An object that defines one or more points in a given space. This object can be associated with anything that specializes IdentifiedObject. For single line diagrams such objects typically include such items as analog values, breakers, disconnectors, power transformers, and transmission lines. */ class DiagramObject : public IdentifiedObject { public: @@ -35,16 +33,35 @@ namespace CIMPP DiagramObject(); ~DiagramObject() override; - CIMPP::Diagram* Diagram; /* A diagram object is part of a diagram. Default: 0 */ - std::list DiagramObjectPoints; /* A diagram object can have 0 or more points to reflect its layout position, routing (for polylines) or boundary (for polygons). Default: 0 */ - CIMPP::DiagramObjectStyle* DiagramObjectStyle; /* A diagram object has a style associated that provides a reference for the style used in the originating system. Default: 0 */ - CIMPP::IdentifiedObject* IdentifiedObject; /* The domain object to which this diagram object is associated. Default: 0 */ - std::list VisibilityLayers; /* A diagram object can be part of multiple visibility layers. Default: 0 */ - CIMPP::Integer drawingOrder; /* The drawing order of this element. The higher the number, the later the element is drawn in sequence. This is used to ensure that elements that overlap are rendered in the correct order. Default: 0 */ - CIMPP::Boolean isPolygon; /* Defines whether or not the diagram objects points define the boundaries of a polygon or the routing of a polyline. If this value is true then a receiving application should consider the first and last points to be connected. Default: false */ - CIMPP::Float offsetX; /* The offset in the X direction. This is used for defining the offset from centre for rendering an icon (the default is that a single point specifies the centre of the icon). The offset is in per-unit with 0 indicating there is no offset from the horizontal centre of the icon. -0.5 indicates it is offset by 50% to the left and 0.5 indicates an offset of 50% to the right. Default: 0.0 */ - CIMPP::Float offsetY; /* The offset in the Y direction. This is used for defining the offset from centre for rendering an icon (the default is that a single point specifies the centre of the icon). The offset is in per-unit with 0 indicating there is no offset from the vertical centre of the icon. The offset direction is dependent on the orientation of the diagram, with -0.5 and 0.5 indicating an offset of +/- 50% on the vertical axis. Default: 0.0 */ - CIMPP::AngleDegrees rotation; /* Sets the angle of rotation of the diagram object. Zero degrees is pointing to the top of the diagram. Rotation is clockwise. DiagramObject.rotation=0 has the following meaning: The connection point of an element which has one terminal is pointing to the top side of the diagram. The connection point `From side` of an element which has more than one terminal is pointing to the top side of the diagram. DiagramObject.rotation=90 has the following meaning: The connection point of an element which has one terminal is pointing to the right hand side of the diagram. The connection point `From side` of an element which has more than one terminal is pointing to the right hand side of the diagram. Default: nullptr */ + /** \brief A diagram object is part of a diagram. Default: 0 */ + CIMPP::Diagram* Diagram; + + /** \brief A diagram object can have 0 or more points to reflect its layout position, routing (for polylines) or boundary (for polygons). Default: 0 */ + std::list DiagramObjectPoints; + + /** \brief A diagram object has a style associated that provides a reference for the style used in the originating system. Default: 0 */ + CIMPP::DiagramObjectStyle* DiagramObjectStyle; + + /** \brief The domain object to which this diagram object is associated. Default: 0 */ + CIMPP::IdentifiedObject* IdentifiedObject; + + /** \brief A diagram object can be part of multiple visibility layers. Default: 0 */ + std::list VisibilityLayers; + + /** \brief The drawing order of this element. The higher the number, the later the element is drawn in sequence. This is used to ensure that elements that overlap are rendered in the correct order. Default: 0 */ + CIMPP::Integer drawingOrder; + + /** \brief Defines whether or not the diagram objects points define the boundaries of a polygon or the routing of a polyline. If this value is true then a receiving application should consider the first and last points to be connected. Default: false */ + CIMPP::Boolean isPolygon; + + /** \brief The offset in the X direction. This is used for defining the offset from centre for rendering an icon (the default is that a single point specifies the centre of the icon). The offset is in per-unit with 0 indicating there is no offset from the horizontal centre of the icon. -0.5 indicates it is offset by 50% to the left and 0.5 indicates an offset of 50% to the right. Default: 0.0 */ + CIMPP::Float offsetX; + + /** \brief The offset in the Y direction. This is used for defining the offset from centre for rendering an icon (the default is that a single point specifies the centre of the icon). The offset is in per-unit with 0 indicating there is no offset from the vertical centre of the icon. The offset direction is dependent on the orientation of the diagram, with -0.5 and 0.5 indicating an offset of +/- 50% on the vertical axis. Default: 0.0 */ + CIMPP::Float offsetY; + + /** \brief Sets the angle of rotation of the diagram object. Zero degrees is pointing to the top of the diagram. Rotation is clockwise. DiagramObject.rotation=0 has the following meaning: The connection point of an element which has one terminal is pointing to the top side of the diagram. The connection point `From side` of an element which has more than one terminal is pointing to the top side of the diagram. DiagramObject.rotation=90 has the following meaning: The connection point of an element which has one terminal is pointing to the right hand side of the diagram. The connection point `From side` of an element which has more than one terminal is pointing to the right hand side of the diagram. Default: nullptr */ + CIMPP::AngleDegrees rotation; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/DiagramObjectGluePoint.cpp b/CGMES_3.0.0/DiagramObjectGluePoint.cpp index 256d139b9..eea8918f9 100644 --- a/CGMES_3.0.0/DiagramObjectGluePoint.cpp +++ b/CGMES_3.0.0/DiagramObjectGluePoint.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DiagramObjectGluePoint::DiagramObjectGluePoint() {}; -DiagramObjectGluePoint::~DiagramObjectGluePoint() {}; +DiagramObjectGluePoint::DiagramObjectGluePoint() {} +DiagramObjectGluePoint::~DiagramObjectGluePoint() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ DiagramObjectGluePoint::getPossibleProfilesForAttributes() const return map; } - - bool assign_DiagramObjectPoint_DiagramObjectGluePoint(BaseClass*, BaseClass*); bool assign_DiagramObjectGluePoint_DiagramObjectPoints(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_DiagramObjectGluePoint_DiagramObjectPoints(BaseClass* BaseClass_ptr1 } - const char DiagramObjectGluePoint::debugName[] = "DiagramObjectGluePoint"; const char* DiagramObjectGluePoint::debugString() const { @@ -69,7 +66,7 @@ const char* DiagramObjectGluePoint::debugString() const void DiagramObjectGluePoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiagramObjectGluePoint"), &DiagramObjectGluePoint_factory)); + factory_map.emplace("cim:DiagramObjectGluePoint", &DiagramObjectGluePoint_factory); } void DiagramObjectGluePoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void DiagramObjectGluePoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiagramObjectGluePoint.DiagramObjectPoints"), &assign_DiagramObjectGluePoint_DiagramObjectPoints)); + assign_map.emplace("cim:DiagramObjectGluePoint.DiagramObjectPoints", &assign_DiagramObjectGluePoint_DiagramObjectPoints); } void DiagramObjectGluePoint::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/DiagramObjectGluePoint.hpp b/CGMES_3.0.0/DiagramObjectGluePoint.hpp index e9a548aaa..802b8f94e 100644 --- a/CGMES_3.0.0/DiagramObjectGluePoint.hpp +++ b/CGMES_3.0.0/DiagramObjectGluePoint.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class DiagramObjectPoint; - /* - This is used for grouping diagram object points from different diagram objects that are considered to be glued together in a diagram even if they are not at the exact same coordinates. - */ + /** \brief This is used for grouping diagram object points from different diagram objects that are considered to be glued together in a diagram even if they are not at the exact same coordinates. */ class DiagramObjectGluePoint : public BaseClass { public: @@ -27,7 +25,8 @@ namespace CIMPP DiagramObjectGluePoint(); ~DiagramObjectGluePoint() override; - std::list DiagramObjectPoints; /* A diagram object glue point is associated with 2 or more object points that are considered to be `glued` together. Default: 0 */ + /** \brief A diagram object glue point is associated with 2 or more object points that are considered to be `glued` together. Default: 0 */ + std::list DiagramObjectPoints; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/DiagramObjectPoint.cpp b/CGMES_3.0.0/DiagramObjectPoint.cpp index 4d78e5517..4afd45f45 100644 --- a/CGMES_3.0.0/DiagramObjectPoint.cpp +++ b/CGMES_3.0.0/DiagramObjectPoint.cpp @@ -10,15 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "DiagramObject.hpp" #include "DiagramObjectGluePoint.hpp" -#include "Integer.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" using namespace CIMPP; -DiagramObjectPoint::DiagramObjectPoint() : DiagramObject(nullptr), DiagramObjectGluePoint(nullptr) {}; -DiagramObjectPoint::~DiagramObjectPoint() {}; +DiagramObjectPoint::DiagramObjectPoint() : DiagramObject(nullptr), DiagramObjectGluePoint(nullptr) {} +DiagramObjectPoint::~DiagramObjectPoint() {} static const std::list PossibleProfilesForClass = { @@ -50,126 +46,130 @@ DiagramObjectPoint::getPossibleProfilesForAttributes() const return map; } - -bool assign_DiagramObjectPoint_sequenceNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramObject_DiagramObjectPoints(BaseClass*, BaseClass*); +bool assign_DiagramObjectPoint_DiagramObject(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + DiagramObject* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->sequenceNumber; - if (buffer.fail()) - return false; - else - return true; + if (element->DiagramObject != element2) + { + element->DiagramObject = element2; + return assign_DiagramObject_DiagramObjectPoints(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_DiagramObjectPoint_xPosition(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramObjectGluePoint_DiagramObjectPoints(BaseClass*, BaseClass*); +bool assign_DiagramObjectPoint_DiagramObjectGluePoint(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + DiagramObjectGluePoint* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->xPosition; - if (buffer.fail()) - return false; - else - return true; + if (element->DiagramObjectGluePoint != element2) + { + element->DiagramObjectGluePoint = element2; + return assign_DiagramObjectGluePoint_DiagramObjectPoints(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_DiagramObjectPoint_yPosition(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramObjectPoint_sequenceNumber(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->yPosition; - if (buffer.fail()) - return false; - else + buffer >> element->sequenceNumber; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiagramObjectPoint_zPosition(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramObjectPoint_xPosition(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->zPosition; - if (buffer.fail()) - return false; - else + buffer >> element->xPosition; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_DiagramObject_DiagramObjectPoints(BaseClass*, BaseClass*); -bool assign_DiagramObjectPoint_DiagramObject(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_DiagramObjectPoint_yPosition(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); - DiagramObject* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->DiagramObject != element2) + buffer >> element->yPosition; + if (!buffer.fail()) { - element->DiagramObject = element2; - return assign_DiagramObject_DiagramObjectPoints(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_DiagramObjectGluePoint_DiagramObjectPoints(BaseClass*, BaseClass*); -bool assign_DiagramObjectPoint_DiagramObjectGluePoint(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_DiagramObjectPoint_zPosition(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); - DiagramObjectGluePoint* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->DiagramObjectGluePoint != element2) + buffer >> element->zPosition; + if (!buffer.fail()) { - element->DiagramObjectGluePoint = element2; - return assign_DiagramObjectGluePoint_DiagramObjectPoints(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool get_DiagramObjectPoint_sequenceNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_DiagramObjectPoint_DiagramObject(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->sequenceNumber; - if (!buffer.str().empty()) + if (element->DiagramObject != 0) { + BaseClass_list.push_back(element->DiagramObject); return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_DiagramObjectPoint_xPosition(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_DiagramObjectPoint_DiagramObjectGluePoint(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xPosition; - if (!buffer.str().empty()) + if (element->DiagramObjectGluePoint != 0) { + BaseClass_list.push_back(element->DiagramObjectGluePoint); return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_DiagramObjectPoint_yPosition(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_DiagramObjectPoint_sequenceNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->yPosition; + buffer << element->sequenceNumber; if (!buffer.str().empty()) { return true; @@ -179,11 +179,12 @@ bool get_DiagramObjectPoint_yPosition(const BaseClass* BaseClass_ptr1, std::stri return false; } -bool get_DiagramObjectPoint_zPosition(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_DiagramObjectPoint_xPosition(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->zPosition; + buffer << element->xPosition; if (!buffer.str().empty()) { return true; @@ -193,34 +194,36 @@ bool get_DiagramObjectPoint_zPosition(const BaseClass* BaseClass_ptr1, std::stri return false; } - -bool get_DiagramObjectPoint_DiagramObject(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) +bool get_DiagramObjectPoint_yPosition(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->DiagramObject != 0) + buffer << element->yPosition; + if (!buffer.str().empty()) { - BaseClass_list.push_back(element->DiagramObject); return true; } } + buffer.setstate(std::ios::failbit); return false; } -bool get_DiagramObjectPoint_DiagramObjectGluePoint(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) +bool get_DiagramObjectPoint_zPosition(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1)) + const DiagramObjectPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->DiagramObjectGluePoint != 0) + buffer << element->zPosition; + if (!buffer.str().empty()) { - BaseClass_list.push_back(element->DiagramObjectGluePoint); return true; } } + buffer.setstate(std::ios::failbit); return false; } - const char DiagramObjectPoint::debugName[] = "DiagramObjectPoint"; const char* DiagramObjectPoint::debugString() const { @@ -229,21 +232,21 @@ const char* DiagramObjectPoint::debugString() const void DiagramObjectPoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiagramObjectPoint"), &DiagramObjectPoint_factory)); + factory_map.emplace("cim:DiagramObjectPoint", &DiagramObjectPoint_factory); } void DiagramObjectPoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiagramObjectPoint.sequenceNumber"), &assign_DiagramObjectPoint_sequenceNumber)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObjectPoint.xPosition"), &assign_DiagramObjectPoint_xPosition)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObjectPoint.yPosition"), &assign_DiagramObjectPoint_yPosition)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObjectPoint.zPosition"), &assign_DiagramObjectPoint_zPosition)); + assign_map.emplace("cim:DiagramObjectPoint.sequenceNumber", &assign_DiagramObjectPoint_sequenceNumber); + assign_map.emplace("cim:DiagramObjectPoint.xPosition", &assign_DiagramObjectPoint_xPosition); + assign_map.emplace("cim:DiagramObjectPoint.yPosition", &assign_DiagramObjectPoint_yPosition); + assign_map.emplace("cim:DiagramObjectPoint.zPosition", &assign_DiagramObjectPoint_zPosition); } void DiagramObjectPoint::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiagramObjectPoint.DiagramObject"), &assign_DiagramObjectPoint_DiagramObject)); - assign_map.insert(std::make_pair(std::string("cim:DiagramObjectPoint.DiagramObjectGluePoint"), &assign_DiagramObjectPoint_DiagramObjectGluePoint)); + assign_map.emplace("cim:DiagramObjectPoint.DiagramObject", &assign_DiagramObjectPoint_DiagramObject); + assign_map.emplace("cim:DiagramObjectPoint.DiagramObjectGluePoint", &assign_DiagramObjectPoint_DiagramObjectGluePoint); } void DiagramObjectPoint::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/DiagramObjectPoint.hpp b/CGMES_3.0.0/DiagramObjectPoint.hpp index ce317142d..07e022457 100644 --- a/CGMES_3.0.0/DiagramObjectPoint.hpp +++ b/CGMES_3.0.0/DiagramObjectPoint.hpp @@ -20,9 +20,7 @@ namespace CIMPP class DiagramObject; class DiagramObjectGluePoint; - /* - A point in a given space defined by 3 coordinates and associated to a diagram object. The coordinates may be positive or negative as the origin does not have to be in the corner of a diagram. - */ + /** \brief A point in a given space defined by 3 coordinates and associated to a diagram object. The coordinates may be positive or negative as the origin does not have to be in the corner of a diagram. */ class DiagramObjectPoint : public BaseClass { public: @@ -30,12 +28,23 @@ namespace CIMPP DiagramObjectPoint(); ~DiagramObjectPoint() override; - CIMPP::DiagramObject* DiagramObject; /* The diagram object with which the points are associated. Default: 0 */ - CIMPP::DiagramObjectGluePoint* DiagramObjectGluePoint; /* The `glue` point to which this point is associated. Default: 0 */ - CIMPP::Integer sequenceNumber; /* The sequence position of the point, used for defining the order of points for diagram objects acting as a polyline or polygon with more than one point. The attribute shall be a positive value. Default: 0 */ - CIMPP::Float xPosition; /* The X coordinate of this point. Default: 0.0 */ - CIMPP::Float yPosition; /* The Y coordinate of this point. Default: 0.0 */ - CIMPP::Float zPosition; /* The Z coordinate of this point. Default: 0.0 */ + /** \brief The diagram object with which the points are associated. Default: 0 */ + CIMPP::DiagramObject* DiagramObject; + + /** \brief The `glue` point to which this point is associated. Default: 0 */ + CIMPP::DiagramObjectGluePoint* DiagramObjectGluePoint; + + /** \brief The sequence position of the point, used for defining the order of points for diagram objects acting as a polyline or polygon with more than one point. The attribute shall be a positive value. Default: 0 */ + CIMPP::Integer sequenceNumber; + + /** \brief The X coordinate of this point. Default: 0.0 */ + CIMPP::Float xPosition; + + /** \brief The Y coordinate of this point. Default: 0.0 */ + CIMPP::Float yPosition; + + /** \brief The Z coordinate of this point. Default: 0.0 */ + CIMPP::Float zPosition; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/DiagramObjectStyle.cpp b/CGMES_3.0.0/DiagramObjectStyle.cpp index 938c67bf3..db870f870 100644 --- a/CGMES_3.0.0/DiagramObjectStyle.cpp +++ b/CGMES_3.0.0/DiagramObjectStyle.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DiagramObjectStyle::DiagramObjectStyle() {}; -DiagramObjectStyle::~DiagramObjectStyle() {}; +DiagramObjectStyle::DiagramObjectStyle() {} +DiagramObjectStyle::~DiagramObjectStyle() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ DiagramObjectStyle::getPossibleProfilesForAttributes() const return map; } - - bool assign_DiagramObject_DiagramObjectStyle(BaseClass*, BaseClass*); bool assign_DiagramObjectStyle_StyledObjects(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_DiagramObjectStyle_StyledObjects(BaseClass* BaseClass_ptr1, BaseClas } - const char DiagramObjectStyle::debugName[] = "DiagramObjectStyle"; const char* DiagramObjectStyle::debugString() const { @@ -69,7 +66,7 @@ const char* DiagramObjectStyle::debugString() const void DiagramObjectStyle::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiagramObjectStyle"), &DiagramObjectStyle_factory)); + factory_map.emplace("cim:DiagramObjectStyle", &DiagramObjectStyle_factory); } void DiagramObjectStyle::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void DiagramObjectStyle::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiagramObjectStyle.StyledObjects"), &assign_DiagramObjectStyle_StyledObjects)); + assign_map.emplace("cim:DiagramObjectStyle.StyledObjects", &assign_DiagramObjectStyle_StyledObjects); } void DiagramObjectStyle::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/DiagramObjectStyle.hpp b/CGMES_3.0.0/DiagramObjectStyle.hpp index 6f337ab2b..f1e09054a 100644 --- a/CGMES_3.0.0/DiagramObjectStyle.hpp +++ b/CGMES_3.0.0/DiagramObjectStyle.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class DiagramObject; - /* - A reference to a style used by the originating system for a diagram object. A diagram object style describes information such as line thickness, shape such as circle or rectangle etc, and colour. - */ + /** \brief A reference to a style used by the originating system for a diagram object. A diagram object style describes information such as line thickness, shape such as circle or rectangle etc, and colour. */ class DiagramObjectStyle : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP DiagramObjectStyle(); ~DiagramObjectStyle() override; - std::list StyledObjects; /* A style can be assigned to multiple diagram objects. Default: 0 */ + /** \brief A style can be assigned to multiple diagram objects. Default: 0 */ + std::list StyledObjects; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/DiagramStyle.cpp b/CGMES_3.0.0/DiagramStyle.cpp index 3e3994231..dd98ebef0 100644 --- a/CGMES_3.0.0/DiagramStyle.cpp +++ b/CGMES_3.0.0/DiagramStyle.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DiagramStyle::DiagramStyle() {}; -DiagramStyle::~DiagramStyle() {}; +DiagramStyle::DiagramStyle() {} +DiagramStyle::~DiagramStyle() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ DiagramStyle::getPossibleProfilesForAttributes() const return map; } - - bool assign_Diagram_DiagramStyle(BaseClass*, BaseClass*); bool assign_DiagramStyle_Diagram(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_DiagramStyle_Diagram(BaseClass* BaseClass_ptr1, BaseClass* BaseClass } - const char DiagramStyle::debugName[] = "DiagramStyle"; const char* DiagramStyle::debugString() const { @@ -69,7 +66,7 @@ const char* DiagramStyle::debugString() const void DiagramStyle::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiagramStyle"), &DiagramStyle_factory)); + factory_map.emplace("cim:DiagramStyle", &DiagramStyle_factory); } void DiagramStyle::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void DiagramStyle::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiagramStyle.Diagram"), &assign_DiagramStyle_Diagram)); + assign_map.emplace("cim:DiagramStyle.Diagram", &assign_DiagramStyle_Diagram); } void DiagramStyle::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/DiagramStyle.hpp b/CGMES_3.0.0/DiagramStyle.hpp index 0207eb735..9461c5097 100644 --- a/CGMES_3.0.0/DiagramStyle.hpp +++ b/CGMES_3.0.0/DiagramStyle.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class Diagram; - /* - The diagram style refers to a style used by the originating system for a diagram. A diagram style describes information such as schematic, geographic, etc. - */ + /** \brief The diagram style refers to a style used by the originating system for a diagram. A diagram style describes information such as schematic, geographic, etc. */ class DiagramStyle : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP DiagramStyle(); ~DiagramStyle() override; - std::list Diagram; /* A DiagramStyle can be used by many Diagrams. Default: 0 */ + /** \brief A DiagramStyle can be used by many Diagrams. Default: 0 */ + std::list Diagram; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/DiscExcContIEEEDEC1A.cpp b/CGMES_3.0.0/DiscExcContIEEEDEC1A.cpp index e139fd0d6..590aabc67 100644 --- a/CGMES_3.0.0/DiscExcContIEEEDEC1A.cpp +++ b/CGMES_3.0.0/DiscExcContIEEEDEC1A.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -DiscExcContIEEEDEC1A::DiscExcContIEEEDEC1A() {}; -DiscExcContIEEEDEC1A::~DiscExcContIEEEDEC1A() {}; +DiscExcContIEEEDEC1A::DiscExcContIEEEDEC1A() {} +DiscExcContIEEEDEC1A::~DiscExcContIEEEDEC1A() {} static const std::list PossibleProfilesForClass = { @@ -74,246 +56,262 @@ DiscExcContIEEEDEC1A::getPossibleProfilesForAttributes() const return map; } - -bool assign_DiscExcContIEEEDEC1A_esc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_esc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->esc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_kan(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_kan(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kan; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_ketl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_ketl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ketl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_tan(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_tan(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tan; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_tl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_tl1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_tl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_tl2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_tw5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_tw5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_val(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_val(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->val; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_vanmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_vanmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vanmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_vomax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_vomax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vomax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_vomin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_vomin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vomin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_vsmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_vsmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_vsmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_vsmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_vtc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_vtc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vtc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_vtlmt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_vtlmt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vtlmt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_vtm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_vtm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vtm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC1A_vtn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC1A_vtn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vtn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_DiscExcContIEEEDEC1A_esc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->esc; if (!buffer.str().empty()) @@ -327,7 +325,8 @@ bool get_DiscExcContIEEEDEC1A_esc(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC1A_kan(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kan; if (!buffer.str().empty()) @@ -341,7 +340,8 @@ bool get_DiscExcContIEEEDEC1A_kan(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC1A_ketl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ketl; if (!buffer.str().empty()) @@ -355,7 +355,8 @@ bool get_DiscExcContIEEEDEC1A_ketl(const BaseClass* BaseClass_ptr1, std::strings bool get_DiscExcContIEEEDEC1A_tan(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tan; if (!buffer.str().empty()) @@ -369,7 +370,8 @@ bool get_DiscExcContIEEEDEC1A_tan(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC1A_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -383,7 +385,8 @@ bool get_DiscExcContIEEEDEC1A_td(const BaseClass* BaseClass_ptr1, std::stringstr bool get_DiscExcContIEEEDEC1A_tl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl1; if (!buffer.str().empty()) @@ -397,7 +400,8 @@ bool get_DiscExcContIEEEDEC1A_tl1(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC1A_tl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl2; if (!buffer.str().empty()) @@ -411,7 +415,8 @@ bool get_DiscExcContIEEEDEC1A_tl2(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC1A_tw5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw5; if (!buffer.str().empty()) @@ -425,7 +430,8 @@ bool get_DiscExcContIEEEDEC1A_tw5(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC1A_val(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->val; if (!buffer.str().empty()) @@ -439,7 +445,8 @@ bool get_DiscExcContIEEEDEC1A_val(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC1A_vanmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vanmax; if (!buffer.str().empty()) @@ -453,7 +460,8 @@ bool get_DiscExcContIEEEDEC1A_vanmax(const BaseClass* BaseClass_ptr1, std::strin bool get_DiscExcContIEEEDEC1A_vomax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vomax; if (!buffer.str().empty()) @@ -467,7 +475,8 @@ bool get_DiscExcContIEEEDEC1A_vomax(const BaseClass* BaseClass_ptr1, std::string bool get_DiscExcContIEEEDEC1A_vomin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vomin; if (!buffer.str().empty()) @@ -481,7 +490,8 @@ bool get_DiscExcContIEEEDEC1A_vomin(const BaseClass* BaseClass_ptr1, std::string bool get_DiscExcContIEEEDEC1A_vsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmax; if (!buffer.str().empty()) @@ -495,7 +505,8 @@ bool get_DiscExcContIEEEDEC1A_vsmax(const BaseClass* BaseClass_ptr1, std::string bool get_DiscExcContIEEEDEC1A_vsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmin; if (!buffer.str().empty()) @@ -509,7 +520,8 @@ bool get_DiscExcContIEEEDEC1A_vsmin(const BaseClass* BaseClass_ptr1, std::string bool get_DiscExcContIEEEDEC1A_vtc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vtc; if (!buffer.str().empty()) @@ -523,7 +535,8 @@ bool get_DiscExcContIEEEDEC1A_vtc(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC1A_vtlmt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vtlmt; if (!buffer.str().empty()) @@ -537,7 +550,8 @@ bool get_DiscExcContIEEEDEC1A_vtlmt(const BaseClass* BaseClass_ptr1, std::string bool get_DiscExcContIEEEDEC1A_vtm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vtm; if (!buffer.str().empty()) @@ -551,7 +565,8 @@ bool get_DiscExcContIEEEDEC1A_vtm(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC1A_vtn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vtn; if (!buffer.str().empty()) @@ -563,8 +578,6 @@ bool get_DiscExcContIEEEDEC1A_vtn(const BaseClass* BaseClass_ptr1, std::stringst return false; } - - const char DiscExcContIEEEDEC1A::debugName[] = "DiscExcContIEEEDEC1A"; const char* DiscExcContIEEEDEC1A::debugString() const { @@ -573,29 +586,29 @@ const char* DiscExcContIEEEDEC1A::debugString() const void DiscExcContIEEEDEC1A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A"), &DiscExcContIEEEDEC1A_factory)); + factory_map.emplace("cim:DiscExcContIEEEDEC1A", &DiscExcContIEEEDEC1A_factory); } void DiscExcContIEEEDEC1A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.esc"), &assign_DiscExcContIEEEDEC1A_esc)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.kan"), &assign_DiscExcContIEEEDEC1A_kan)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.ketl"), &assign_DiscExcContIEEEDEC1A_ketl)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.tan"), &assign_DiscExcContIEEEDEC1A_tan)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.td"), &assign_DiscExcContIEEEDEC1A_td)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.tl1"), &assign_DiscExcContIEEEDEC1A_tl1)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.tl2"), &assign_DiscExcContIEEEDEC1A_tl2)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.tw5"), &assign_DiscExcContIEEEDEC1A_tw5)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.val"), &assign_DiscExcContIEEEDEC1A_val)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.vanmax"), &assign_DiscExcContIEEEDEC1A_vanmax)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.vomax"), &assign_DiscExcContIEEEDEC1A_vomax)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.vomin"), &assign_DiscExcContIEEEDEC1A_vomin)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.vsmax"), &assign_DiscExcContIEEEDEC1A_vsmax)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.vsmin"), &assign_DiscExcContIEEEDEC1A_vsmin)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.vtc"), &assign_DiscExcContIEEEDEC1A_vtc)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.vtlmt"), &assign_DiscExcContIEEEDEC1A_vtlmt)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.vtm"), &assign_DiscExcContIEEEDEC1A_vtm)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC1A.vtn"), &assign_DiscExcContIEEEDEC1A_vtn)); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.esc", &assign_DiscExcContIEEEDEC1A_esc); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.kan", &assign_DiscExcContIEEEDEC1A_kan); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.ketl", &assign_DiscExcContIEEEDEC1A_ketl); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.tan", &assign_DiscExcContIEEEDEC1A_tan); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.td", &assign_DiscExcContIEEEDEC1A_td); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.tl1", &assign_DiscExcContIEEEDEC1A_tl1); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.tl2", &assign_DiscExcContIEEEDEC1A_tl2); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.tw5", &assign_DiscExcContIEEEDEC1A_tw5); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.val", &assign_DiscExcContIEEEDEC1A_val); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.vanmax", &assign_DiscExcContIEEEDEC1A_vanmax); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.vomax", &assign_DiscExcContIEEEDEC1A_vomax); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.vomin", &assign_DiscExcContIEEEDEC1A_vomin); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.vsmax", &assign_DiscExcContIEEEDEC1A_vsmax); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.vsmin", &assign_DiscExcContIEEEDEC1A_vsmin); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.vtc", &assign_DiscExcContIEEEDEC1A_vtc); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.vtlmt", &assign_DiscExcContIEEEDEC1A_vtlmt); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.vtm", &assign_DiscExcContIEEEDEC1A_vtm); + assign_map.emplace("cim:DiscExcContIEEEDEC1A.vtn", &assign_DiscExcContIEEEDEC1A_vtn); } void DiscExcContIEEEDEC1A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/DiscExcContIEEEDEC1A.hpp b/CGMES_3.0.0/DiscExcContIEEEDEC1A.hpp index 494f77743..724fd319c 100644 --- a/CGMES_3.0.0/DiscExcContIEEEDEC1A.hpp +++ b/CGMES_3.0.0/DiscExcContIEEEDEC1A.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE type DEC1A discontinuous excitation control model that boosts generator excitation to a level higher than that demanded by the voltage regulator and stabilizer immediately following a system fault. Reference: IEEE 421.5-2005, 12.2. - */ + /** \brief IEEE type DEC1A discontinuous excitation control model that boosts generator excitation to a level higher than that demanded by the voltage regulator and stabilizer immediately following a system fault. Reference: IEEE 421.5-2005, 12.2. */ class DiscExcContIEEEDEC1A : public DiscontinuousExcitationControlDynamics { public: @@ -28,24 +26,59 @@ namespace CIMPP DiscExcContIEEEDEC1A(); ~DiscExcContIEEEDEC1A() override; - CIMPP::PU esc; /* Speed change reference (<i>E</i><i><sub>SC</sub></i>). Typical value = 0,0015. Default: nullptr */ - CIMPP::PU kan; /* Discontinuous controller gain (<i>K</i><i><sub>AN</sub></i>). Typical value = 400. Default: nullptr */ - CIMPP::PU ketl; /* Terminal voltage limiter gain (<i>K</i><i><sub>ETL</sub></i>). Typical value = 47. Default: nullptr */ - CIMPP::Seconds tan; /* Discontinuous controller time constant (<i>T</i><i><sub>AN</sub></i>) (&gt;= 0). Typical value = 0,08. Default: nullptr */ - CIMPP::Seconds td; /* Time constant (<i>T</i><i><sub>D</sub></i>) (&gt;= 0). Typical value = 0,03. Default: nullptr */ - CIMPP::Seconds tl1; /* Time constant (<i>T</i><i><sub>L</sub></i><sub>1</sub>) (&gt;= 0). Typical value = 0,025. Default: nullptr */ - CIMPP::Seconds tl2; /* Time constant (<i>T</i><i><sub>L</sub></i><sub>2</sub>) (&gt;= 0). Typical value = 1,25. Default: nullptr */ - CIMPP::Seconds tw5; /* DEC washout time constant (<i>T</i><i><sub>W</sub></i><sub>5</sub>) (&gt;= 0). Typical value = 5. Default: nullptr */ - CIMPP::PU val; /* Regulator voltage reference (<i>V</i><i><sub>AL</sub></i>). Typical value = 5,5. Default: nullptr */ - CIMPP::PU vanmax; /* Limiter for Van (<i>V</i><i><sub>ANMAX</sub></i>). Default: nullptr */ - CIMPP::PU vomax; /* Limiter (<i>V</i><i><sub>OMAX</sub></i>) (&gt; DiscExcContIEEEDEC1A.vomin). Typical value = 0,3. Default: nullptr */ - CIMPP::PU vomin; /* Limiter (<i>V</i><i><sub>OMIN</sub></i>) (&lt; DiscExcContIEEEDEC1A.vomax). Typical value = 0,1. Default: nullptr */ - CIMPP::PU vsmax; /* Limiter (<i>V</i><i><sub>SMAX</sub></i>)(&gt; DiscExcContIEEEDEC1A.vsmin). Typical value = 0,2. Default: nullptr */ - CIMPP::PU vsmin; /* Limiter (<i>V</i><i><sub>SMIN</sub></i>) (&lt; DiscExcContIEEEDEC1A.vsmax). Typical value = -0,066. Default: nullptr */ - CIMPP::PU vtc; /* Terminal voltage level reference (<i>V</i><i><sub>TC</sub></i>). Typical value = 0,95. Default: nullptr */ - CIMPP::PU vtlmt; /* Voltage reference (<i>V</i><i><sub>TLMT</sub></i>). Typical value = 1,1. Default: nullptr */ - CIMPP::PU vtm; /* Voltage limits (<i>V</i><i><sub>TM</sub></i>). Typical value = 1,13. Default: nullptr */ - CIMPP::PU vtn; /* Voltage limits (<i>V</i><i><sub>TN</sub></i>). Typical value = 1,12. Default: nullptr */ + /** \brief Speed change reference (<i>E</i><i><sub>SC</sub></i>). Typical value = 0,0015. Default: nullptr */ + CIMPP::PU esc; + + /** \brief Discontinuous controller gain (<i>K</i><i><sub>AN</sub></i>). Typical value = 400. Default: nullptr */ + CIMPP::PU kan; + + /** \brief Terminal voltage limiter gain (<i>K</i><i><sub>ETL</sub></i>). Typical value = 47. Default: nullptr */ + CIMPP::PU ketl; + + /** \brief Discontinuous controller time constant (<i>T</i><i><sub>AN</sub></i>) (&gt;= 0). Typical value = 0,08. Default: nullptr */ + CIMPP::Seconds tan; + + /** \brief Time constant (<i>T</i><i><sub>D</sub></i>) (&gt;= 0). Typical value = 0,03. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Time constant (<i>T</i><i><sub>L</sub></i><sub>1</sub>) (&gt;= 0). Typical value = 0,025. Default: nullptr */ + CIMPP::Seconds tl1; + + /** \brief Time constant (<i>T</i><i><sub>L</sub></i><sub>2</sub>) (&gt;= 0). Typical value = 1,25. Default: nullptr */ + CIMPP::Seconds tl2; + + /** \brief DEC washout time constant (<i>T</i><i><sub>W</sub></i><sub>5</sub>) (&gt;= 0). Typical value = 5. Default: nullptr */ + CIMPP::Seconds tw5; + + /** \brief Regulator voltage reference (<i>V</i><i><sub>AL</sub></i>). Typical value = 5,5. Default: nullptr */ + CIMPP::PU val; + + /** \brief Limiter for Van (<i>V</i><i><sub>ANMAX</sub></i>). Default: nullptr */ + CIMPP::PU vanmax; + + /** \brief Limiter (<i>V</i><i><sub>OMAX</sub></i>) (&gt; DiscExcContIEEEDEC1A.vomin). Typical value = 0,3. Default: nullptr */ + CIMPP::PU vomax; + + /** \brief Limiter (<i>V</i><i><sub>OMIN</sub></i>) (&lt; DiscExcContIEEEDEC1A.vomax). Typical value = 0,1. Default: nullptr */ + CIMPP::PU vomin; + + /** \brief Limiter (<i>V</i><i><sub>SMAX</sub></i>)(&gt; DiscExcContIEEEDEC1A.vsmin). Typical value = 0,2. Default: nullptr */ + CIMPP::PU vsmax; + + /** \brief Limiter (<i>V</i><i><sub>SMIN</sub></i>) (&lt; DiscExcContIEEEDEC1A.vsmax). Typical value = -0,066. Default: nullptr */ + CIMPP::PU vsmin; + + /** \brief Terminal voltage level reference (<i>V</i><i><sub>TC</sub></i>). Typical value = 0,95. Default: nullptr */ + CIMPP::PU vtc; + + /** \brief Voltage reference (<i>V</i><i><sub>TLMT</sub></i>). Typical value = 1,1. Default: nullptr */ + CIMPP::PU vtlmt; + + /** \brief Voltage limits (<i>V</i><i><sub>TM</sub></i>). Typical value = 1,13. Default: nullptr */ + CIMPP::PU vtm; + + /** \brief Voltage limits (<i>V</i><i><sub>TN</sub></i>). Typical value = 1,12. Default: nullptr */ + CIMPP::PU vtn; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/DiscExcContIEEEDEC2A.cpp b/CGMES_3.0.0/DiscExcContIEEEDEC2A.cpp index 55b638498..dc94e52c0 100644 --- a/CGMES_3.0.0/DiscExcContIEEEDEC2A.cpp +++ b/CGMES_3.0.0/DiscExcContIEEEDEC2A.cpp @@ -8,16 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -DiscExcContIEEEDEC2A::DiscExcContIEEEDEC2A() {}; -DiscExcContIEEEDEC2A::~DiscExcContIEEEDEC2A() {}; +DiscExcContIEEEDEC2A::DiscExcContIEEEDEC2A() {} +DiscExcContIEEEDEC2A::~DiscExcContIEEEDEC2A() {} static const std::list PossibleProfilesForClass = { @@ -48,77 +43,80 @@ DiscExcContIEEEDEC2A::getPossibleProfilesForAttributes() const return map; } - -bool assign_DiscExcContIEEEDEC2A_td1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC2A_td1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC2A_td2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC2A_td2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC2A_vdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC2A_vdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC2A_vdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC2A_vdmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vdmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC2A_vk(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC2A_vk(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vk; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_DiscExcContIEEEDEC2A_td1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td1; if (!buffer.str().empty()) @@ -132,7 +130,8 @@ bool get_DiscExcContIEEEDEC2A_td1(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC2A_td2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td2; if (!buffer.str().empty()) @@ -146,7 +145,8 @@ bool get_DiscExcContIEEEDEC2A_td2(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC2A_vdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vdmax; if (!buffer.str().empty()) @@ -160,7 +160,8 @@ bool get_DiscExcContIEEEDEC2A_vdmax(const BaseClass* BaseClass_ptr1, std::string bool get_DiscExcContIEEEDEC2A_vdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vdmin; if (!buffer.str().empty()) @@ -174,7 +175,8 @@ bool get_DiscExcContIEEEDEC2A_vdmin(const BaseClass* BaseClass_ptr1, std::string bool get_DiscExcContIEEEDEC2A_vk(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vk; if (!buffer.str().empty()) @@ -186,8 +188,6 @@ bool get_DiscExcContIEEEDEC2A_vk(const BaseClass* BaseClass_ptr1, std::stringstr return false; } - - const char DiscExcContIEEEDEC2A::debugName[] = "DiscExcContIEEEDEC2A"; const char* DiscExcContIEEEDEC2A::debugString() const { @@ -196,16 +196,16 @@ const char* DiscExcContIEEEDEC2A::debugString() const void DiscExcContIEEEDEC2A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC2A"), &DiscExcContIEEEDEC2A_factory)); + factory_map.emplace("cim:DiscExcContIEEEDEC2A", &DiscExcContIEEEDEC2A_factory); } void DiscExcContIEEEDEC2A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC2A.td1"), &assign_DiscExcContIEEEDEC2A_td1)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC2A.td2"), &assign_DiscExcContIEEEDEC2A_td2)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC2A.vdmax"), &assign_DiscExcContIEEEDEC2A_vdmax)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC2A.vdmin"), &assign_DiscExcContIEEEDEC2A_vdmin)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC2A.vk"), &assign_DiscExcContIEEEDEC2A_vk)); + assign_map.emplace("cim:DiscExcContIEEEDEC2A.td1", &assign_DiscExcContIEEEDEC2A_td1); + assign_map.emplace("cim:DiscExcContIEEEDEC2A.td2", &assign_DiscExcContIEEEDEC2A_td2); + assign_map.emplace("cim:DiscExcContIEEEDEC2A.vdmax", &assign_DiscExcContIEEEDEC2A_vdmax); + assign_map.emplace("cim:DiscExcContIEEEDEC2A.vdmin", &assign_DiscExcContIEEEDEC2A_vdmin); + assign_map.emplace("cim:DiscExcContIEEEDEC2A.vk", &assign_DiscExcContIEEEDEC2A_vk); } void DiscExcContIEEEDEC2A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/DiscExcContIEEEDEC2A.hpp b/CGMES_3.0.0/DiscExcContIEEEDEC2A.hpp index a4542ea12..3e72fe01b 100644 --- a/CGMES_3.0.0/DiscExcContIEEEDEC2A.hpp +++ b/CGMES_3.0.0/DiscExcContIEEEDEC2A.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE type DEC2A model for discontinuous excitation control. This system provides transient excitation boosting via an open-loop control as initiated by a trigger signal generated remotely. Reference: IEEE 421.5-2005 12.3. - */ + /** \brief IEEE type DEC2A model for discontinuous excitation control. This system provides transient excitation boosting via an open-loop control as initiated by a trigger signal generated remotely. Reference: IEEE 421.5-2005 12.3. */ class DiscExcContIEEEDEC2A : public DiscontinuousExcitationControlDynamics { public: @@ -28,11 +26,20 @@ namespace CIMPP DiscExcContIEEEDEC2A(); ~DiscExcContIEEEDEC2A() override; - CIMPP::Seconds td1; /* Discontinuous controller time constant (<i>T</i><i><sub>D1</sub></i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds td2; /* Discontinuous controller washout time constant (<i>T</i><i><sub>D2</sub></i>) (&gt;= 0). Default: nullptr */ - CIMPP::PU vdmax; /* Limiter (<i>V</i><i><sub>DMAX</sub></i>) (&gt; DiscExcContIEEEDEC2A.vdmin). Default: nullptr */ - CIMPP::PU vdmin; /* Limiter (<i>V</i><i><sub>DMIN</sub></i>) (&lt; DiscExcContIEEEDEC2A.vdmax). Default: nullptr */ - CIMPP::PU vk; /* Discontinuous controller input reference (<i>V</i><i><sub>K</sub></i>). Default: nullptr */ + /** \brief Discontinuous controller time constant (<i>T</i><i><sub>D1</sub></i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds td1; + + /** \brief Discontinuous controller washout time constant (<i>T</i><i><sub>D2</sub></i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds td2; + + /** \brief Limiter (<i>V</i><i><sub>DMAX</sub></i>) (&gt; DiscExcContIEEEDEC2A.vdmin). Default: nullptr */ + CIMPP::PU vdmax; + + /** \brief Limiter (<i>V</i><i><sub>DMIN</sub></i>) (&lt; DiscExcContIEEEDEC2A.vdmax). Default: nullptr */ + CIMPP::PU vdmin; + + /** \brief Discontinuous controller input reference (<i>V</i><i><sub>K</sub></i>). Default: nullptr */ + CIMPP::PU vk; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/DiscExcContIEEEDEC3A.cpp b/CGMES_3.0.0/DiscExcContIEEEDEC3A.cpp index 194881795..67dd91242 100644 --- a/CGMES_3.0.0/DiscExcContIEEEDEC3A.cpp +++ b/CGMES_3.0.0/DiscExcContIEEEDEC3A.cpp @@ -8,13 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Seconds.hpp" -#include "PU.hpp" using namespace CIMPP; -DiscExcContIEEEDEC3A::DiscExcContIEEEDEC3A() {}; -DiscExcContIEEEDEC3A::~DiscExcContIEEEDEC3A() {}; +DiscExcContIEEEDEC3A::DiscExcContIEEEDEC3A() {} +DiscExcContIEEEDEC3A::~DiscExcContIEEEDEC3A() {} static const std::list PossibleProfilesForClass = { @@ -42,38 +40,38 @@ DiscExcContIEEEDEC3A::getPossibleProfilesForAttributes() const return map; } - -bool assign_DiscExcContIEEEDEC3A_tdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC3A_tdr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC3A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_DiscExcContIEEEDEC3A_vtmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiscExcContIEEEDEC3A_vtmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DiscExcContIEEEDEC3A* element = dynamic_cast(BaseClass_ptr1)) + DiscExcContIEEEDEC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vtmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_DiscExcContIEEEDEC3A_tdr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC3A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdr; if (!buffer.str().empty()) @@ -87,7 +85,8 @@ bool get_DiscExcContIEEEDEC3A_tdr(const BaseClass* BaseClass_ptr1, std::stringst bool get_DiscExcContIEEEDEC3A_vtmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscExcContIEEEDEC3A* element = dynamic_cast(BaseClass_ptr1)) + const DiscExcContIEEEDEC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vtmin; if (!buffer.str().empty()) @@ -99,8 +98,6 @@ bool get_DiscExcContIEEEDEC3A_vtmin(const BaseClass* BaseClass_ptr1, std::string return false; } - - const char DiscExcContIEEEDEC3A::debugName[] = "DiscExcContIEEEDEC3A"; const char* DiscExcContIEEEDEC3A::debugString() const { @@ -109,13 +106,13 @@ const char* DiscExcContIEEEDEC3A::debugString() const void DiscExcContIEEEDEC3A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC3A"), &DiscExcContIEEEDEC3A_factory)); + factory_map.emplace("cim:DiscExcContIEEEDEC3A", &DiscExcContIEEEDEC3A_factory); } void DiscExcContIEEEDEC3A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC3A.tdr"), &assign_DiscExcContIEEEDEC3A_tdr)); - assign_map.insert(std::make_pair(std::string("cim:DiscExcContIEEEDEC3A.vtmin"), &assign_DiscExcContIEEEDEC3A_vtmin)); + assign_map.emplace("cim:DiscExcContIEEEDEC3A.tdr", &assign_DiscExcContIEEEDEC3A_tdr); + assign_map.emplace("cim:DiscExcContIEEEDEC3A.vtmin", &assign_DiscExcContIEEEDEC3A_vtmin); } void DiscExcContIEEEDEC3A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/DiscExcContIEEEDEC3A.hpp b/CGMES_3.0.0/DiscExcContIEEEDEC3A.hpp index a18af539d..f845e43c9 100644 --- a/CGMES_3.0.0/DiscExcContIEEEDEC3A.hpp +++ b/CGMES_3.0.0/DiscExcContIEEEDEC3A.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE type DEC3A model. In some systems, the stabilizer output is disconnected from the regulator immediately following a severe fault to prevent the stabilizer from competing with action of voltage regulator during the first swing. Reference: IEEE 421.5-2005 12.4. - */ + /** \brief IEEE type DEC3A model. In some systems, the stabilizer output is disconnected from the regulator immediately following a severe fault to prevent the stabilizer from competing with action of voltage regulator during the first swing. Reference: IEEE 421.5-2005 12.4. */ class DiscExcContIEEEDEC3A : public DiscontinuousExcitationControlDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP DiscExcContIEEEDEC3A(); ~DiscExcContIEEEDEC3A() override; - CIMPP::Seconds tdr; /* Reset time delay (<i>T</i><i><sub>DR</sub></i>) (&gt;= 0). Default: nullptr */ - CIMPP::PU vtmin; /* Terminal undervoltage comparison level (<i>V</i><i><sub>TMIN</sub></i>). Default: nullptr */ + /** \brief Reset time delay (<i>T</i><i><sub>DR</sub></i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds tdr; + + /** \brief Terminal undervoltage comparison level (<i>V</i><i><sub>TMIN</sub></i>). Default: nullptr */ + CIMPP::PU vtmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/DisconnectingCircuitBreaker.cpp b/CGMES_3.0.0/DisconnectingCircuitBreaker.cpp index ba32c4b58..e47f814fc 100644 --- a/CGMES_3.0.0/DisconnectingCircuitBreaker.cpp +++ b/CGMES_3.0.0/DisconnectingCircuitBreaker.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DisconnectingCircuitBreaker::DisconnectingCircuitBreaker() {}; -DisconnectingCircuitBreaker::~DisconnectingCircuitBreaker() {}; +DisconnectingCircuitBreaker::DisconnectingCircuitBreaker() {} +DisconnectingCircuitBreaker::~DisconnectingCircuitBreaker() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ DisconnectingCircuitBreaker::getPossibleProfilesForAttributes() const return map; } - - - - - const char DisconnectingCircuitBreaker::debugName[] = "DisconnectingCircuitBreaker"; const char* DisconnectingCircuitBreaker::debugString() const { @@ -52,7 +47,7 @@ const char* DisconnectingCircuitBreaker::debugString() const void DisconnectingCircuitBreaker::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DisconnectingCircuitBreaker"), &DisconnectingCircuitBreaker_factory)); + factory_map.emplace("cim:DisconnectingCircuitBreaker", &DisconnectingCircuitBreaker_factory); } void DisconnectingCircuitBreaker::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/DisconnectingCircuitBreaker.hpp b/CGMES_3.0.0/DisconnectingCircuitBreaker.hpp index b5e711b14..e74e4dcc2 100644 --- a/CGMES_3.0.0/DisconnectingCircuitBreaker.hpp +++ b/CGMES_3.0.0/DisconnectingCircuitBreaker.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A circuit breaking device including disconnecting function, eliminating the need for separate disconnectors. - */ + /** \brief A circuit breaking device including disconnecting function, eliminating the need for separate disconnectors. */ class DisconnectingCircuitBreaker : public Breaker { public: @@ -26,7 +24,6 @@ namespace CIMPP DisconnectingCircuitBreaker(); ~DisconnectingCircuitBreaker() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Disconnector.cpp b/CGMES_3.0.0/Disconnector.cpp index c8dfe906e..e64c24d80 100644 --- a/CGMES_3.0.0/Disconnector.cpp +++ b/CGMES_3.0.0/Disconnector.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Disconnector::Disconnector() {}; -Disconnector::~Disconnector() {}; +Disconnector::Disconnector() {} +Disconnector::~Disconnector() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ Disconnector::getPossibleProfilesForAttributes() const return map; } - - - - - const char Disconnector::debugName[] = "Disconnector"; const char* Disconnector::debugString() const { @@ -52,7 +47,7 @@ const char* Disconnector::debugString() const void Disconnector::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Disconnector"), &Disconnector_factory)); + factory_map.emplace("cim:Disconnector", &Disconnector_factory); } void Disconnector::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/Disconnector.hpp b/CGMES_3.0.0/Disconnector.hpp index ba606c776..844173634 100644 --- a/CGMES_3.0.0/Disconnector.hpp +++ b/CGMES_3.0.0/Disconnector.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A manually operated or motor operated mechanical switching device used for changing the connections in a circuit, or for isolating a circuit or equipment from a source of power. It is required to open or close circuits when negligible current is broken or made. - */ + /** \brief A manually operated or motor operated mechanical switching device used for changing the connections in a circuit, or for isolating a circuit or equipment from a source of power. It is required to open or close circuits when negligible current is broken or made. */ class Disconnector : public Switch { public: @@ -26,7 +24,6 @@ namespace CIMPP Disconnector(); ~Disconnector() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/DiscontinuousExcitationControlDynamics.cpp b/CGMES_3.0.0/DiscontinuousExcitationControlDynamics.cpp index 351408515..1e6569ea1 100644 --- a/CGMES_3.0.0/DiscontinuousExcitationControlDynamics.cpp +++ b/CGMES_3.0.0/DiscontinuousExcitationControlDynamics.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DiscontinuousExcitationControlDynamics::DiscontinuousExcitationControlDynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr) {}; -DiscontinuousExcitationControlDynamics::~DiscontinuousExcitationControlDynamics() {}; +DiscontinuousExcitationControlDynamics::DiscontinuousExcitationControlDynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr) {} +DiscontinuousExcitationControlDynamics::~DiscontinuousExcitationControlDynamics() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ DiscontinuousExcitationControlDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_ExcitationSystemDynamics_DiscontinuousExcitationControlDynamics(BaseClass*, BaseClass*); bool assign_DiscontinuousExcitationControlDynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_DiscontinuousExcitationControlDynamics_ExcitationSystemDynamics(Base } return false; } + bool assign_RemoteInputSignal_DiscontinuousExcitationControlDynamics(BaseClass*, BaseClass*); bool assign_DiscontinuousExcitationControlDynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_DiscontinuousExcitationControlDynamics_RemoteInputSignal(BaseClass* return false; } - bool get_DiscontinuousExcitationControlDynamics_ExcitationSystemDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DiscontinuousExcitationControlDynamics* element = dynamic_cast(BaseClass_ptr1)) + const DiscontinuousExcitationControlDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ExcitationSystemDynamics != 0) { @@ -100,7 +99,7 @@ const char* DiscontinuousExcitationControlDynamics::debugString() const void DiscontinuousExcitationControlDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiscontinuousExcitationControlDynamics"), &DiscontinuousExcitationControlDynamics_factory)); + factory_map.emplace("cim:DiscontinuousExcitationControlDynamics", &DiscontinuousExcitationControlDynamics_factory); } void DiscontinuousExcitationControlDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -109,8 +108,8 @@ void DiscontinuousExcitationControlDynamics::addPrimitiveAssignFnsToMap(std::uno void DiscontinuousExcitationControlDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiscontinuousExcitationControlDynamics.ExcitationSystemDynamics"), &assign_DiscontinuousExcitationControlDynamics_ExcitationSystemDynamics)); - assign_map.insert(std::make_pair(std::string("cim:DiscontinuousExcitationControlDynamics.RemoteInputSignal"), &assign_DiscontinuousExcitationControlDynamics_RemoteInputSignal)); + assign_map.emplace("cim:DiscontinuousExcitationControlDynamics.ExcitationSystemDynamics", &assign_DiscontinuousExcitationControlDynamics_ExcitationSystemDynamics); + assign_map.emplace("cim:DiscontinuousExcitationControlDynamics.RemoteInputSignal", &assign_DiscontinuousExcitationControlDynamics_RemoteInputSignal); } void DiscontinuousExcitationControlDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/DiscontinuousExcitationControlDynamics.hpp b/CGMES_3.0.0/DiscontinuousExcitationControlDynamics.hpp index 78e0e7ef4..0bee19b3b 100644 --- a/CGMES_3.0.0/DiscontinuousExcitationControlDynamics.hpp +++ b/CGMES_3.0.0/DiscontinuousExcitationControlDynamics.hpp @@ -18,9 +18,7 @@ namespace CIMPP class ExcitationSystemDynamics; class RemoteInputSignal; - /* - Discontinuous excitation control function block whose behaviour is described by reference to a standard model or by definition of a user-defined model. - */ + /** \brief Discontinuous excitation control function block whose behaviour is described by reference to a standard model or by definition of a user-defined model. */ class DiscontinuousExcitationControlDynamics : public DynamicsFunctionBlock { public: @@ -28,8 +26,11 @@ namespace CIMPP DiscontinuousExcitationControlDynamics(); ~DiscontinuousExcitationControlDynamics() override; - CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; /* Excitation system model with which this discontinuous excitation control model is associated. Default: 0 */ - CIMPP::RemoteInputSignal* RemoteInputSignal; /* Remote input signal used by this discontinuous excitation control system model. Default: 0 */ + /** \brief Excitation system model with which this discontinuous excitation control model is associated. Default: 0 */ + CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; + + /** \brief Remote input signal used by this discontinuous excitation control system model. Default: 0 */ + CIMPP::RemoteInputSignal* RemoteInputSignal; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/DiscontinuousExcitationControlUserDefined.cpp b/CGMES_3.0.0/DiscontinuousExcitationControlUserDefined.cpp index 9ff03969b..f2154bd03 100644 --- a/CGMES_3.0.0/DiscontinuousExcitationControlUserDefined.cpp +++ b/CGMES_3.0.0/DiscontinuousExcitationControlUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -DiscontinuousExcitationControlUserDefined::DiscontinuousExcitationControlUserDefined() {}; -DiscontinuousExcitationControlUserDefined::~DiscontinuousExcitationControlUserDefined() {}; +DiscontinuousExcitationControlUserDefined::DiscontinuousExcitationControlUserDefined() {} +DiscontinuousExcitationControlUserDefined::~DiscontinuousExcitationControlUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ DiscontinuousExcitationControlUserDefined::getPossibleProfilesForAttributes() co return map; } - -bool assign_DiscontinuousExcitationControlUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (DiscontinuousExcitationControlUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_DiscontinuousExcitationControlUserDefined(BaseClass*, BaseClass*); bool assign_DiscontinuousExcitationControlUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_DiscontinuousExcitationControlUserDefined_ProprietaryParameterDynami return false; } +bool assign_DiscontinuousExcitationControlUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + DiscontinuousExcitationControlUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_DiscontinuousExcitationControlUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DiscontinuousExcitationControlUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const DiscontinuousExcitationControlUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_DiscontinuousExcitationControlUserDefined_proprietary(const BaseClass* return false; } - - const char DiscontinuousExcitationControlUserDefined::debugName[] = "DiscontinuousExcitationControlUserDefined"; const char* DiscontinuousExcitationControlUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* DiscontinuousExcitationControlUserDefined::debugString() const void DiscontinuousExcitationControlUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiscontinuousExcitationControlUserDefined"), &DiscontinuousExcitationControlUserDefined_factory)); + factory_map.emplace("cim:DiscontinuousExcitationControlUserDefined", &DiscontinuousExcitationControlUserDefined_factory); } void DiscontinuousExcitationControlUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiscontinuousExcitationControlUserDefined.proprietary"), &assign_DiscontinuousExcitationControlUserDefined_proprietary)); + assign_map.emplace("cim:DiscontinuousExcitationControlUserDefined.proprietary", &assign_DiscontinuousExcitationControlUserDefined_proprietary); } void DiscontinuousExcitationControlUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiscontinuousExcitationControlUserDefined.ProprietaryParameterDynamics"), &assign_DiscontinuousExcitationControlUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:DiscontinuousExcitationControlUserDefined.ProprietaryParameterDynamics", &assign_DiscontinuousExcitationControlUserDefined_ProprietaryParameterDynamics); } void DiscontinuousExcitationControlUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/DiscontinuousExcitationControlUserDefined.hpp b/CGMES_3.0.0/DiscontinuousExcitationControlUserDefined.hpp index a8b394eb4..b744eac59 100644 --- a/CGMES_3.0.0/DiscontinuousExcitationControlUserDefined.hpp +++ b/CGMES_3.0.0/DiscontinuousExcitationControlUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Discontinuous excitation control function block whose dynamic behaviour is described by a user-defined model. - */ + /** \brief Discontinuous excitation control function block whose dynamic behaviour is described by a user-defined model. */ class DiscontinuousExcitationControlUserDefined : public DiscontinuousExcitationControlDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP DiscontinuousExcitationControlUserDefined(); ~DiscontinuousExcitationControlUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Discrete.cpp b/CGMES_3.0.0/Discrete.cpp index 7781234b1..c73563a40 100644 --- a/CGMES_3.0.0/Discrete.cpp +++ b/CGMES_3.0.0/Discrete.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Discrete::Discrete() : ValueAliasSet(nullptr) {}; -Discrete::~Discrete() {}; +Discrete::Discrete() : ValueAliasSet(nullptr) {} +Discrete::~Discrete() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ Discrete::getPossibleProfilesForAttributes() const return map; } - - bool assign_DiscreteValue_Discrete(BaseClass*, BaseClass*); bool assign_Discrete_DiscreteValues(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_Discrete_DiscreteValues(BaseClass* BaseClass_ptr1, BaseClass* BaseCl } return false; } + bool assign_ValueAliasSet_Discretes(BaseClass*, BaseClass*); bool assign_Discrete_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -80,7 +79,8 @@ bool assign_Discrete_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass* BaseCla bool get_Discrete_ValueAliasSet(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Discrete* element = dynamic_cast(BaseClass_ptr1)) + const Discrete* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ValueAliasSet != 0) { @@ -91,7 +91,6 @@ bool get_Discrete_ValueAliasSet(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Discrete"), &Discrete_factory)); + factory_map.emplace("cim:Discrete", &Discrete_factory); } void Discrete::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -109,8 +108,8 @@ void Discrete::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Discrete.DiscreteValues"), &assign_Discrete_DiscreteValues)); - assign_map.insert(std::make_pair(std::string("cim:Discrete.ValueAliasSet"), &assign_Discrete_ValueAliasSet)); + assign_map.emplace("cim:Discrete.DiscreteValues", &assign_Discrete_DiscreteValues); + assign_map.emplace("cim:Discrete.ValueAliasSet", &assign_Discrete_ValueAliasSet); } void Discrete::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/Discrete.hpp b/CGMES_3.0.0/Discrete.hpp index 430e1dca8..5ac4ba89e 100644 --- a/CGMES_3.0.0/Discrete.hpp +++ b/CGMES_3.0.0/Discrete.hpp @@ -18,9 +18,7 @@ namespace CIMPP class DiscreteValue; class ValueAliasSet; - /* - Discrete represents a discrete Measurement, i.e. a Measurement representing discrete values, e.g. a Breaker position. - */ + /** \brief Discrete represents a discrete Measurement, i.e. a Measurement representing discrete values, e.g. a Breaker position. */ class Discrete : public Measurement { public: @@ -28,8 +26,11 @@ namespace CIMPP Discrete(); ~Discrete() override; - std::list DiscreteValues; /* The values connected to this measurement. Default: 0 */ - CIMPP::ValueAliasSet* ValueAliasSet; /* The ValueAliasSet used for translation of a MeasurementValue.value to a name. Default: 0 */ + /** \brief The values connected to this measurement. Default: 0 */ + std::list DiscreteValues; + + /** \brief The ValueAliasSet used for translation of a MeasurementValue.value to a name. Default: 0 */ + CIMPP::ValueAliasSet* ValueAliasSet; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/DiscreteValue.cpp b/CGMES_3.0.0/DiscreteValue.cpp index 9209f858b..a96602f36 100644 --- a/CGMES_3.0.0/DiscreteValue.cpp +++ b/CGMES_3.0.0/DiscreteValue.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -DiscreteValue::DiscreteValue() : Command(nullptr), Discrete(nullptr) {}; -DiscreteValue::~DiscreteValue() {}; +DiscreteValue::DiscreteValue() : Command(nullptr), Discrete(nullptr) {} +DiscreteValue::~DiscreteValue() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ DiscreteValue::getPossibleProfilesForAttributes() const return map; } - - bool assign_Command_DiscreteValue(BaseClass*, BaseClass*); bool assign_DiscreteValue_Command(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_DiscreteValue_Command(BaseClass* BaseClass_ptr1, BaseClass* BaseClas } return false; } + bool assign_Discrete_DiscreteValues(BaseClass*, BaseClass*); bool assign_DiscreteValue_Discrete(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -80,7 +79,8 @@ bool assign_DiscreteValue_Discrete(BaseClass* BaseClass_ptr1, BaseClass* BaseCla bool get_DiscreteValue_Discrete(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const DiscreteValue* element = dynamic_cast(BaseClass_ptr1)) + const DiscreteValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Discrete != 0) { @@ -91,7 +91,6 @@ bool get_DiscreteValue_Discrete(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DiscreteValue"), &DiscreteValue_factory)); + factory_map.emplace("cim:DiscreteValue", &DiscreteValue_factory); } void DiscreteValue::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -109,8 +108,8 @@ void DiscreteValue::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DiscreteValue.Command"), &assign_DiscreteValue_Command)); - assign_map.insert(std::make_pair(std::string("cim:DiscreteValue.Discrete"), &assign_DiscreteValue_Discrete)); + assign_map.emplace("cim:DiscreteValue.Command", &assign_DiscreteValue_Command); + assign_map.emplace("cim:DiscreteValue.Discrete", &assign_DiscreteValue_Discrete); } void DiscreteValue::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/DiscreteValue.hpp b/CGMES_3.0.0/DiscreteValue.hpp index feff3ee5b..596163379 100644 --- a/CGMES_3.0.0/DiscreteValue.hpp +++ b/CGMES_3.0.0/DiscreteValue.hpp @@ -18,9 +18,7 @@ namespace CIMPP class Command; class Discrete; - /* - DiscreteValue represents a discrete MeasurementValue. - */ + /** \brief DiscreteValue represents a discrete MeasurementValue. */ class DiscreteValue : public MeasurementValue { public: @@ -28,8 +26,11 @@ namespace CIMPP DiscreteValue(); ~DiscreteValue() override; - CIMPP::Command* Command; /* The Control variable associated with the MeasurementValue. Default: 0 */ - CIMPP::Discrete* Discrete; /* Measurement to which this value is connected. Default: 0 */ + /** \brief The Control variable associated with the MeasurementValue. Default: 0 */ + CIMPP::Command* Command; + + /** \brief Measurement to which this value is connected. Default: 0 */ + CIMPP::Discrete* Discrete; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/DroopSignalFeedbackKind.cpp b/CGMES_3.0.0/DroopSignalFeedbackKind.cpp index ca339f115..0f68d1992 100644 --- a/CGMES_3.0.0/DroopSignalFeedbackKind.cpp +++ b/CGMES_3.0.0/DroopSignalFeedbackKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "DroopSignalFeedbackKind") + if (EnumSymbol.substr(0, pos) != "DroopSignalFeedbackKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,22 +50,22 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "electricalPower") + if (EnumSymbol == "electricalPower") { rop = DroopSignalFeedbackKind::electricalPower; return lop; } - if(EnumSymbol == "none") + if (EnumSymbol == "none") { rop = DroopSignalFeedbackKind::none; return lop; } - if(EnumSymbol == "fuelValveStroke") + if (EnumSymbol == "fuelValveStroke") { rop = DroopSignalFeedbackKind::fuelValveStroke; return lop; } - if(EnumSymbol == "governorOutput") + if (EnumSymbol == "governorOutput") { rop = DroopSignalFeedbackKind::governorOutput; return lop; diff --git a/CGMES_3.0.0/DroopSignalFeedbackKind.hpp b/CGMES_3.0.0/DroopSignalFeedbackKind.hpp index de948a1bc..d68428bda 100644 --- a/CGMES_3.0.0/DroopSignalFeedbackKind.hpp +++ b/CGMES_3.0.0/DroopSignalFeedbackKind.hpp @@ -9,29 +9,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Governor droop signal feedback source. - */ + /** \brief Governor droop signal feedback source. */ class DroopSignalFeedbackKind { public: enum DroopSignalFeedbackKind_ENUM { - /** - * Electrical power feedback (connection indicated as 1 in the block diagrams of models, e.g. GovCT1, GovCT2). - */ + /** Electrical power feedback (connection indicated as 1 in the block diagrams of models, e.g. GovCT1, GovCT2). */ electricalPower, - /** - * No droop signal feedback, is isochronous governor. - */ + /** No droop signal feedback, is isochronous governor. */ none, - /** - * Fuel valve stroke feedback (true stroke) (connection indicated as 2 in the block diagrams of model, e.g. GovCT1, GovCT2). - */ + /** Fuel valve stroke feedback (true stroke) (connection indicated as 2 in the block diagrams of model, e.g. GovCT1, GovCT2). */ fuelValveStroke, - /** - * Governor output feedback (requested stroke) (connection indicated as 3 in the block diagrams of models, e.g. GovCT1, GovCT2). - */ + /** Governor output feedback (requested stroke) (connection indicated as 3 in the block diagrams of models, e.g. GovCT1, GovCT2). */ governorOutput, }; diff --git a/CGMES_3.0.0/DynamicsFunctionBlock.cpp b/CGMES_3.0.0/DynamicsFunctionBlock.cpp index 63b269772..3ed474991 100644 --- a/CGMES_3.0.0/DynamicsFunctionBlock.cpp +++ b/CGMES_3.0.0/DynamicsFunctionBlock.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" using namespace CIMPP; -DynamicsFunctionBlock::DynamicsFunctionBlock() {}; -DynamicsFunctionBlock::~DynamicsFunctionBlock() {}; +DynamicsFunctionBlock::DynamicsFunctionBlock() {} +DynamicsFunctionBlock::~DynamicsFunctionBlock() {} static const std::list PossibleProfilesForClass = { @@ -40,25 +39,24 @@ DynamicsFunctionBlock::getPossibleProfilesForAttributes() const return map; } - -bool assign_DynamicsFunctionBlock_enabled(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DynamicsFunctionBlock_enabled(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (DynamicsFunctionBlock* element = dynamic_cast(BaseClass_ptr1)) + DynamicsFunctionBlock* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->enabled; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_DynamicsFunctionBlock_enabled(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const DynamicsFunctionBlock* element = dynamic_cast(BaseClass_ptr1)) + const DynamicsFunctionBlock* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->enabled; if (!buffer.str().empty()) @@ -70,8 +68,6 @@ bool get_DynamicsFunctionBlock_enabled(const BaseClass* BaseClass_ptr1, std::str return false; } - - const char DynamicsFunctionBlock::debugName[] = "DynamicsFunctionBlock"; const char* DynamicsFunctionBlock::debugString() const { @@ -80,12 +76,12 @@ const char* DynamicsFunctionBlock::debugString() const void DynamicsFunctionBlock::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:DynamicsFunctionBlock"), &DynamicsFunctionBlock_factory)); + factory_map.emplace("cim:DynamicsFunctionBlock", &DynamicsFunctionBlock_factory); } void DynamicsFunctionBlock::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:DynamicsFunctionBlock.enabled"), &assign_DynamicsFunctionBlock_enabled)); + assign_map.emplace("cim:DynamicsFunctionBlock.enabled", &assign_DynamicsFunctionBlock_enabled); } void DynamicsFunctionBlock::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/DynamicsFunctionBlock.hpp b/CGMES_3.0.0/DynamicsFunctionBlock.hpp index 4e9d7b9c9..cfce2f68e 100644 --- a/CGMES_3.0.0/DynamicsFunctionBlock.hpp +++ b/CGMES_3.0.0/DynamicsFunctionBlock.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Abstract parent class for all Dynamics function blocks. - */ + /** \brief Abstract parent class for all Dynamics function blocks. */ class DynamicsFunctionBlock : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP DynamicsFunctionBlock(); ~DynamicsFunctionBlock() override; - CIMPP::Boolean enabled; /* Function block used indicator. true = use of function block is enabled false = use of function block is disabled. Default: false */ + /** \brief Function block used indicator. true = use of function block is enabled false = use of function block is disabled. Default: false */ + CIMPP::Boolean enabled; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/EarthFaultCompensator.cpp b/CGMES_3.0.0/EarthFaultCompensator.cpp index 6d8c03a4d..dcb5b765d 100644 --- a/CGMES_3.0.0/EarthFaultCompensator.cpp +++ b/CGMES_3.0.0/EarthFaultCompensator.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Resistance.hpp" using namespace CIMPP; -EarthFaultCompensator::EarthFaultCompensator() {}; -EarthFaultCompensator::~EarthFaultCompensator() {}; +EarthFaultCompensator::EarthFaultCompensator() {} +EarthFaultCompensator::~EarthFaultCompensator() {} static const std::list PossibleProfilesForClass = { @@ -41,25 +40,24 @@ EarthFaultCompensator::getPossibleProfilesForAttributes() const return map; } - -bool assign_EarthFaultCompensator_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EarthFaultCompensator_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EarthFaultCompensator* element = dynamic_cast(BaseClass_ptr1)) + EarthFaultCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_EarthFaultCompensator_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EarthFaultCompensator* element = dynamic_cast(BaseClass_ptr1)) + const EarthFaultCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -71,8 +69,6 @@ bool get_EarthFaultCompensator_r(const BaseClass* BaseClass_ptr1, std::stringstr return false; } - - const char EarthFaultCompensator::debugName[] = "EarthFaultCompensator"; const char* EarthFaultCompensator::debugString() const { @@ -81,12 +77,12 @@ const char* EarthFaultCompensator::debugString() const void EarthFaultCompensator::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EarthFaultCompensator"), &EarthFaultCompensator_factory)); + factory_map.emplace("cim:EarthFaultCompensator", &EarthFaultCompensator_factory); } void EarthFaultCompensator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EarthFaultCompensator.r"), &assign_EarthFaultCompensator_r)); + assign_map.emplace("cim:EarthFaultCompensator.r", &assign_EarthFaultCompensator_r); } void EarthFaultCompensator::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/EarthFaultCompensator.hpp b/CGMES_3.0.0/EarthFaultCompensator.hpp index ca0eeb319..cdacfb22e 100644 --- a/CGMES_3.0.0/EarthFaultCompensator.hpp +++ b/CGMES_3.0.0/EarthFaultCompensator.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A conducting equipment used to represent a connection to ground which is typically used to compensate earth faults. An earth fault compensator device modelled with a single terminal implies a second terminal solidly connected to ground. If two terminals are modelled, the ground is not assumed and normal connection rules apply. - */ + /** \brief A conducting equipment used to represent a connection to ground which is typically used to compensate earth faults. An earth fault compensator device modelled with a single terminal implies a second terminal solidly connected to ground. If two terminals are modelled, the ground is not assumed and normal connection rules apply. */ class EarthFaultCompensator : public ConductingEquipment { public: @@ -27,7 +25,8 @@ namespace CIMPP EarthFaultCompensator(); ~EarthFaultCompensator() override; - CIMPP::Resistance r; /* Nominal resistance of device. Default: nullptr */ + /** \brief Nominal resistance of device. Default: nullptr */ + CIMPP::Resistance r; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/EnergyArea.cpp b/CGMES_3.0.0/EnergyArea.cpp index 74d42606b..0df0b19c1 100644 --- a/CGMES_3.0.0/EnergyArea.cpp +++ b/CGMES_3.0.0/EnergyArea.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -EnergyArea::EnergyArea() : ControlArea(nullptr) {}; -EnergyArea::~EnergyArea() {}; +EnergyArea::EnergyArea() : ControlArea(nullptr) {} +EnergyArea::~EnergyArea() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ EnergyArea::getPossibleProfilesForAttributes() const return map; } - - bool assign_ControlArea_EnergyArea(BaseClass*, BaseClass*); bool assign_EnergyArea_ControlArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_EnergyArea_ControlArea(BaseClass* BaseClass_ptr1, BaseClass* BaseCla } - const char EnergyArea::debugName[] = "EnergyArea"; const char* EnergyArea::debugString() const { @@ -69,7 +66,7 @@ const char* EnergyArea::debugString() const void EnergyArea::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EnergyArea"), &EnergyArea_factory)); + factory_map.emplace("cim:EnergyArea", &EnergyArea_factory); } void EnergyArea::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void EnergyArea::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EnergyArea.ControlArea"), &assign_EnergyArea_ControlArea)); + assign_map.emplace("cim:EnergyArea.ControlArea", &assign_EnergyArea_ControlArea); } void EnergyArea::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/EnergyArea.hpp b/CGMES_3.0.0/EnergyArea.hpp index 2958fc787..7d58dfca7 100644 --- a/CGMES_3.0.0/EnergyArea.hpp +++ b/CGMES_3.0.0/EnergyArea.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class ControlArea; - /* - Describes an area having energy production or consumption. Specializations are intended to support the load allocation function as typically required in energy management systems or planning studies to allocate hypothesized load levels to individual load points for power flow analysis. Often the energy area can be linked to both measured and forecast load levels. - */ + /** \brief Describes an area having energy production or consumption. Specializations are intended to support the load allocation function as typically required in energy management systems or planning studies to allocate hypothesized load levels to individual load points for power flow analysis. Often the energy area can be linked to both measured and forecast load levels. */ class EnergyArea : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP EnergyArea(); ~EnergyArea() override; - CIMPP::ControlArea* ControlArea; /* The control area specification that is used for the load forecast. Default: 0 */ + /** \brief The control area specification that is used for the load forecast. Default: 0 */ + CIMPP::ControlArea* ControlArea; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/EnergyConnection.cpp b/CGMES_3.0.0/EnergyConnection.cpp index 420e410ee..bb8db0159 100644 --- a/CGMES_3.0.0/EnergyConnection.cpp +++ b/CGMES_3.0.0/EnergyConnection.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -EnergyConnection::EnergyConnection() {}; -EnergyConnection::~EnergyConnection() {}; +EnergyConnection::EnergyConnection() {} +EnergyConnection::~EnergyConnection() {} static const std::list PossibleProfilesForClass = { @@ -41,11 +41,6 @@ EnergyConnection::getPossibleProfilesForAttributes() const return map; } - - - - - const char EnergyConnection::debugName[] = "EnergyConnection"; const char* EnergyConnection::debugString() const { @@ -54,7 +49,7 @@ const char* EnergyConnection::debugString() const void EnergyConnection::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EnergyConnection"), &EnergyConnection_factory)); + factory_map.emplace("cim:EnergyConnection", &EnergyConnection_factory); } void EnergyConnection::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/EnergyConnection.hpp b/CGMES_3.0.0/EnergyConnection.hpp index 905fdb00e..2684715fb 100644 --- a/CGMES_3.0.0/EnergyConnection.hpp +++ b/CGMES_3.0.0/EnergyConnection.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A connection of energy generation or consumption on the power system model. - */ + /** \brief A connection of energy generation or consumption on the power system model. */ class EnergyConnection : public ConductingEquipment { public: @@ -26,7 +24,6 @@ namespace CIMPP EnergyConnection(); ~EnergyConnection() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/EnergyConsumer.cpp b/CGMES_3.0.0/EnergyConsumer.cpp index ea14a5d38..2b70a5c88 100644 --- a/CGMES_3.0.0/EnergyConsumer.cpp +++ b/CGMES_3.0.0/EnergyConsumer.cpp @@ -10,17 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "LoadDynamics.hpp" #include "LoadResponseCharacteristic.hpp" -#include "ActivePower.hpp" -#include "ActivePower.hpp" -#include "PerCent.hpp" -#include "ReactivePower.hpp" -#include "ReactivePower.hpp" -#include "PerCent.hpp" using namespace CIMPP; -EnergyConsumer::EnergyConsumer() : LoadDynamics(nullptr), LoadResponse(nullptr) {}; -EnergyConsumer::~EnergyConsumer() {}; +EnergyConsumer::EnergyConsumer() : LoadDynamics(nullptr), LoadResponse(nullptr) {} +EnergyConsumer::~EnergyConsumer() {} static const std::list PossibleProfilesForClass = { @@ -56,122 +50,156 @@ EnergyConsumer::getPossibleProfilesForAttributes() const return map; } +bool assign_LoadDynamics_EnergyConsumer(BaseClass*, BaseClass*); +bool assign_EnergyConsumer_LoadDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + LoadDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->LoadDynamics != element2) + { + element->LoadDynamics = element2; + return assign_LoadDynamics_EnergyConsumer(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_EnergyConsumer_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_EnergyConsumer(BaseClass*, BaseClass*); +bool assign_EnergyConsumer_LoadResponse(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + LoadResponseCharacteristic* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->LoadResponse != element2) + { + element->LoadResponse = element2; + return assign_LoadResponseCharacteristic_EnergyConsumer(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_EnergyConsumer_p(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergyConsumer_pfixed(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergyConsumer_pfixed(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pfixed; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergyConsumer_pfixedPct(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergyConsumer_pfixedPct(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pfixedPct; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergyConsumer_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergyConsumer_q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergyConsumer_qfixed(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergyConsumer_qfixed(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qfixed; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergyConsumer_qfixedPct(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergyConsumer_qfixedPct(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qfixedPct; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_LoadDynamics_EnergyConsumer(BaseClass*, BaseClass*); -bool assign_EnergyConsumer_LoadDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_EnergyConsumer_LoadDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); - LoadDynamics* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->LoadDynamics != element2) + if (element->LoadDynamics != 0) { - element->LoadDynamics = element2; - return assign_LoadDynamics_EnergyConsumer(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->LoadDynamics); + return true; } - return true; } return false; } -bool assign_LoadResponseCharacteristic_EnergyConsumer(BaseClass*, BaseClass*); -bool assign_EnergyConsumer_LoadResponse(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool get_EnergyConsumer_LoadResponse(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); - LoadResponseCharacteristic* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->LoadResponse != element2) + if (element->LoadResponse != 0) { - element->LoadResponse = element2; - return assign_LoadResponseCharacteristic_EnergyConsumer(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->LoadResponse); + return true; } - return true; } return false; } bool get_EnergyConsumer_p(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p; if (!buffer.str().empty()) @@ -185,7 +213,8 @@ bool get_EnergyConsumer_p(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_EnergyConsumer_pfixed(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pfixed; if (!buffer.str().empty()) @@ -199,7 +228,8 @@ bool get_EnergyConsumer_pfixed(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_EnergyConsumer_pfixedPct(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pfixedPct; if (!buffer.str().empty()) @@ -213,7 +243,8 @@ bool get_EnergyConsumer_pfixedPct(const BaseClass* BaseClass_ptr1, std::stringst bool get_EnergyConsumer_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q; if (!buffer.str().empty()) @@ -227,7 +258,8 @@ bool get_EnergyConsumer_q(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_EnergyConsumer_qfixed(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qfixed; if (!buffer.str().empty()) @@ -241,7 +273,8 @@ bool get_EnergyConsumer_qfixed(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_EnergyConsumer_qfixedPct(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) + const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qfixedPct; if (!buffer.str().empty()) @@ -253,34 +286,6 @@ bool get_EnergyConsumer_qfixedPct(const BaseClass* BaseClass_ptr1, std::stringst return false; } - -bool get_EnergyConsumer_LoadDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->LoadDynamics != 0) - { - BaseClass_list.push_back(element->LoadDynamics); - return true; - } - } - return false; -} - -bool get_EnergyConsumer_LoadResponse(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const EnergyConsumer* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->LoadResponse != 0) - { - BaseClass_list.push_back(element->LoadResponse); - return true; - } - } - return false; -} - - const char EnergyConsumer::debugName[] = "EnergyConsumer"; const char* EnergyConsumer::debugString() const { @@ -289,23 +294,23 @@ const char* EnergyConsumer::debugString() const void EnergyConsumer::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EnergyConsumer"), &EnergyConsumer_factory)); + factory_map.emplace("cim:EnergyConsumer", &EnergyConsumer_factory); } void EnergyConsumer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EnergyConsumer.p"), &assign_EnergyConsumer_p)); - assign_map.insert(std::make_pair(std::string("cim:EnergyConsumer.pfixed"), &assign_EnergyConsumer_pfixed)); - assign_map.insert(std::make_pair(std::string("cim:EnergyConsumer.pfixedPct"), &assign_EnergyConsumer_pfixedPct)); - assign_map.insert(std::make_pair(std::string("cim:EnergyConsumer.q"), &assign_EnergyConsumer_q)); - assign_map.insert(std::make_pair(std::string("cim:EnergyConsumer.qfixed"), &assign_EnergyConsumer_qfixed)); - assign_map.insert(std::make_pair(std::string("cim:EnergyConsumer.qfixedPct"), &assign_EnergyConsumer_qfixedPct)); + assign_map.emplace("cim:EnergyConsumer.p", &assign_EnergyConsumer_p); + assign_map.emplace("cim:EnergyConsumer.pfixed", &assign_EnergyConsumer_pfixed); + assign_map.emplace("cim:EnergyConsumer.pfixedPct", &assign_EnergyConsumer_pfixedPct); + assign_map.emplace("cim:EnergyConsumer.q", &assign_EnergyConsumer_q); + assign_map.emplace("cim:EnergyConsumer.qfixed", &assign_EnergyConsumer_qfixed); + assign_map.emplace("cim:EnergyConsumer.qfixedPct", &assign_EnergyConsumer_qfixedPct); } void EnergyConsumer::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EnergyConsumer.LoadDynamics"), &assign_EnergyConsumer_LoadDynamics)); - assign_map.insert(std::make_pair(std::string("cim:EnergyConsumer.LoadResponse"), &assign_EnergyConsumer_LoadResponse)); + assign_map.emplace("cim:EnergyConsumer.LoadDynamics", &assign_EnergyConsumer_LoadDynamics); + assign_map.emplace("cim:EnergyConsumer.LoadResponse", &assign_EnergyConsumer_LoadResponse); } void EnergyConsumer::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/EnergyConsumer.hpp b/CGMES_3.0.0/EnergyConsumer.hpp index 89e6921d6..b3c3e7f2d 100644 --- a/CGMES_3.0.0/EnergyConsumer.hpp +++ b/CGMES_3.0.0/EnergyConsumer.hpp @@ -21,9 +21,7 @@ namespace CIMPP class LoadDynamics; class LoadResponseCharacteristic; - /* - Generic user of energy - a point of consumption on the power system model. EnergyConsumer.pfixed, .qfixed, .pfixedPct and .qfixedPct have meaning only if there is no LoadResponseCharacteristic associated with EnergyConsumer or if LoadResponseCharacteristic.exponentModel is set to False. - */ + /** \brief Generic user of energy - a point of consumption on the power system model. EnergyConsumer.pfixed, .qfixed, .pfixedPct and .qfixedPct have meaning only if there is no LoadResponseCharacteristic associated with EnergyConsumer or if LoadResponseCharacteristic.exponentModel is set to False. */ class EnergyConsumer : public EnergyConnection { public: @@ -31,14 +29,29 @@ namespace CIMPP EnergyConsumer(); ~EnergyConsumer() override; - CIMPP::LoadDynamics* LoadDynamics; /* Load dynamics model used to describe dynamic behaviour of this energy consumer. Default: 0 */ - CIMPP::LoadResponseCharacteristic* LoadResponse; /* The load response characteristic of this load. If missing, this load is assumed to be constant power. Default: 0 */ - CIMPP::ActivePower p; /* Active power of the load. Load sign convention is used, i.e. positive sign means flow out from a node. For voltage dependent loads the value is at rated voltage. Starting value for a steady state solution. Default: nullptr */ - CIMPP::ActivePower pfixed; /* Active power of the load that is a fixed quantity and does not vary as load group value varies. Load sign convention is used, i.e. positive sign means flow out from a node. Default: nullptr */ - CIMPP::PerCent pfixedPct; /* Fixed active power as a percentage of load group fixed active power. Used to represent the time-varying components. Load sign convention is used, i.e. positive sign means flow out from a node. Default: nullptr */ - CIMPP::ReactivePower q; /* Reactive power of the load. Load sign convention is used, i.e. positive sign means flow out from a node. For voltage dependent loads the value is at rated voltage. Starting value for a steady state solution. Default: nullptr */ - CIMPP::ReactivePower qfixed; /* Reactive power of the load that is a fixed quantity and does not vary as load group value varies. Load sign convention is used, i.e. positive sign means flow out from a node. Default: nullptr */ - CIMPP::PerCent qfixedPct; /* Fixed reactive power as a percentage of load group fixed reactive power. Used to represent the time-varying components. Load sign convention is used, i.e. positive sign means flow out from a node. Default: nullptr */ + /** \brief Load dynamics model used to describe dynamic behaviour of this energy consumer. Default: 0 */ + CIMPP::LoadDynamics* LoadDynamics; + + /** \brief The load response characteristic of this load. If missing, this load is assumed to be constant power. Default: 0 */ + CIMPP::LoadResponseCharacteristic* LoadResponse; + + /** \brief Active power of the load. Load sign convention is used, i.e. positive sign means flow out from a node. For voltage dependent loads the value is at rated voltage. Starting value for a steady state solution. Default: nullptr */ + CIMPP::ActivePower p; + + /** \brief Active power of the load that is a fixed quantity and does not vary as load group value varies. Load sign convention is used, i.e. positive sign means flow out from a node. Default: nullptr */ + CIMPP::ActivePower pfixed; + + /** \brief Fixed active power as a percentage of load group fixed active power. Used to represent the time-varying components. Load sign convention is used, i.e. positive sign means flow out from a node. Default: nullptr */ + CIMPP::PerCent pfixedPct; + + /** \brief Reactive power of the load. Load sign convention is used, i.e. positive sign means flow out from a node. For voltage dependent loads the value is at rated voltage. Starting value for a steady state solution. Default: nullptr */ + CIMPP::ReactivePower q; + + /** \brief Reactive power of the load that is a fixed quantity and does not vary as load group value varies. Load sign convention is used, i.e. positive sign means flow out from a node. Default: nullptr */ + CIMPP::ReactivePower qfixed; + + /** \brief Fixed reactive power as a percentage of load group fixed reactive power. Used to represent the time-varying components. Load sign convention is used, i.e. positive sign means flow out from a node. Default: nullptr */ + CIMPP::PerCent qfixedPct; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/EnergySchedulingType.cpp b/CGMES_3.0.0/EnergySchedulingType.cpp index 395cb4c0d..7ab3e49a3 100644 --- a/CGMES_3.0.0/EnergySchedulingType.cpp +++ b/CGMES_3.0.0/EnergySchedulingType.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -EnergySchedulingType::EnergySchedulingType() {}; -EnergySchedulingType::~EnergySchedulingType() {}; +EnergySchedulingType::EnergySchedulingType() {} +EnergySchedulingType::~EnergySchedulingType() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ EnergySchedulingType::getPossibleProfilesForAttributes() const return map; } - - bool assign_EnergySource_EnergySchedulingType(BaseClass*, BaseClass*); bool assign_EnergySchedulingType_EnergySource(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,7 +59,6 @@ bool assign_EnergySchedulingType_EnergySource(BaseClass* BaseClass_ptr1, BaseCla } - const char EnergySchedulingType::debugName[] = "EnergySchedulingType"; const char* EnergySchedulingType::debugString() const { @@ -70,7 +67,7 @@ const char* EnergySchedulingType::debugString() const void EnergySchedulingType::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EnergySchedulingType"), &EnergySchedulingType_factory)); + factory_map.emplace("cim:EnergySchedulingType", &EnergySchedulingType_factory); } void EnergySchedulingType::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -79,7 +76,7 @@ void EnergySchedulingType::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EnergySchedulingType.EnergySource"), &assign_EnergySchedulingType_EnergySource)); + assign_map.emplace("cim:EnergySchedulingType.EnergySource", &assign_EnergySchedulingType_EnergySource); } void EnergySchedulingType::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/EnergySchedulingType.hpp b/CGMES_3.0.0/EnergySchedulingType.hpp index ebe329576..b7de2eaa5 100644 --- a/CGMES_3.0.0/EnergySchedulingType.hpp +++ b/CGMES_3.0.0/EnergySchedulingType.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class EnergySource; - /* - Used to define the type of generation for scheduling purposes. - */ + /** \brief Used to define the type of generation for scheduling purposes. */ class EnergySchedulingType : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP EnergySchedulingType(); ~EnergySchedulingType() override; - std::list EnergySource; /* Energy Source of a particular Energy Scheduling Type. Default: 0 */ + /** \brief Energy Source of a particular Energy Scheduling Type. Default: 0 */ + std::list EnergySource; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/EnergySource.cpp b/CGMES_3.0.0/EnergySource.cpp index c39a6f6d1..57c4dcde3 100644 --- a/CGMES_3.0.0/EnergySource.cpp +++ b/CGMES_3.0.0/EnergySource.cpp @@ -9,24 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "EnergySchedulingType.hpp" -#include "ActivePower.hpp" -#include "Voltage.hpp" -#include "ActivePower.hpp" -#include "ActivePower.hpp" -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "ReactivePower.hpp" -#include "Resistance.hpp" -#include "AngleRadians.hpp" -#include "Voltage.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -EnergySource::EnergySource() : EnergySchedulingType(nullptr) {}; -EnergySource::~EnergySource() {}; +EnergySource::EnergySource() : EnergySchedulingType(nullptr) {} +EnergySource::~EnergySource() {} static const std::list PossibleProfilesForClass = { @@ -68,197 +55,223 @@ EnergySource::getPossibleProfilesForAttributes() const return map; } +bool assign_EnergySchedulingType_EnergySource(BaseClass*, BaseClass*); +bool assign_EnergySource_EnergySchedulingType(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + EnergySource* element = dynamic_cast(BaseClass_ptr1); + EnergySchedulingType* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->EnergySchedulingType != element2) + { + element->EnergySchedulingType = element2; + return assign_EnergySchedulingType_EnergySource(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_EnergySource_activePower(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_activePower(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->activePower; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_nominalVoltage(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_nominalVoltage(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nominalVoltage; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_pMax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_pMax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pMax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_pMin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_pMin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pMin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_r0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_reactivePower(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_reactivePower(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->reactivePower; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_rn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_rn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_voltageAngle(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_voltageAngle(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->voltageAngle; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_voltageMagnitude(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_voltageMagnitude(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->voltageMagnitude; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_x(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_x0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EnergySource_xn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EnergySource_xn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EnergySource* element = dynamic_cast(BaseClass_ptr1)) + EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_EnergySchedulingType_EnergySource(BaseClass*, BaseClass*); -bool assign_EnergySource_EnergySchedulingType(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_EnergySource_EnergySchedulingType(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - EnergySource* element = dynamic_cast(BaseClass_ptr1); - EnergySchedulingType* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->EnergySchedulingType != element2) + if (element->EnergySchedulingType != 0) { - element->EnergySchedulingType = element2; - return assign_EnergySchedulingType_EnergySource(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->EnergySchedulingType); + return true; } - return true; } return false; } bool get_EnergySource_activePower(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->activePower; if (!buffer.str().empty()) @@ -272,7 +285,8 @@ bool get_EnergySource_activePower(const BaseClass* BaseClass_ptr1, std::stringst bool get_EnergySource_nominalVoltage(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nominalVoltage; if (!buffer.str().empty()) @@ -286,7 +300,8 @@ bool get_EnergySource_nominalVoltage(const BaseClass* BaseClass_ptr1, std::strin bool get_EnergySource_pMax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pMax; if (!buffer.str().empty()) @@ -300,7 +315,8 @@ bool get_EnergySource_pMax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_EnergySource_pMin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pMin; if (!buffer.str().empty()) @@ -314,7 +330,8 @@ bool get_EnergySource_pMin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_EnergySource_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -328,7 +345,8 @@ bool get_EnergySource_r(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_EnergySource_r0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r0; if (!buffer.str().empty()) @@ -342,7 +360,8 @@ bool get_EnergySource_r0(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_EnergySource_reactivePower(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->reactivePower; if (!buffer.str().empty()) @@ -356,7 +375,8 @@ bool get_EnergySource_reactivePower(const BaseClass* BaseClass_ptr1, std::string bool get_EnergySource_rn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rn; if (!buffer.str().empty()) @@ -370,7 +390,8 @@ bool get_EnergySource_rn(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_EnergySource_voltageAngle(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->voltageAngle; if (!buffer.str().empty()) @@ -384,7 +405,8 @@ bool get_EnergySource_voltageAngle(const BaseClass* BaseClass_ptr1, std::strings bool get_EnergySource_voltageMagnitude(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->voltageMagnitude; if (!buffer.str().empty()) @@ -398,7 +420,8 @@ bool get_EnergySource_voltageMagnitude(const BaseClass* BaseClass_ptr1, std::str bool get_EnergySource_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x; if (!buffer.str().empty()) @@ -412,7 +435,8 @@ bool get_EnergySource_x(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_EnergySource_x0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x0; if (!buffer.str().empty()) @@ -426,7 +450,8 @@ bool get_EnergySource_x0(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_EnergySource_xn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) + const EnergySource* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xn; if (!buffer.str().empty()) @@ -438,21 +463,6 @@ bool get_EnergySource_xn(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } - -bool get_EnergySource_EnergySchedulingType(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const EnergySource* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->EnergySchedulingType != 0) - { - BaseClass_list.push_back(element->EnergySchedulingType); - return true; - } - } - return false; -} - - const char EnergySource::debugName[] = "EnergySource"; const char* EnergySource::debugString() const { @@ -461,29 +471,29 @@ const char* EnergySource::debugString() const void EnergySource::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EnergySource"), &EnergySource_factory)); + factory_map.emplace("cim:EnergySource", &EnergySource_factory); } void EnergySource::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EnergySource.activePower"), &assign_EnergySource_activePower)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.nominalVoltage"), &assign_EnergySource_nominalVoltage)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.pMax"), &assign_EnergySource_pMax)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.pMin"), &assign_EnergySource_pMin)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.r"), &assign_EnergySource_r)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.r0"), &assign_EnergySource_r0)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.reactivePower"), &assign_EnergySource_reactivePower)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.rn"), &assign_EnergySource_rn)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.voltageAngle"), &assign_EnergySource_voltageAngle)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.voltageMagnitude"), &assign_EnergySource_voltageMagnitude)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.x"), &assign_EnergySource_x)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.x0"), &assign_EnergySource_x0)); - assign_map.insert(std::make_pair(std::string("cim:EnergySource.xn"), &assign_EnergySource_xn)); + assign_map.emplace("cim:EnergySource.activePower", &assign_EnergySource_activePower); + assign_map.emplace("cim:EnergySource.nominalVoltage", &assign_EnergySource_nominalVoltage); + assign_map.emplace("cim:EnergySource.pMax", &assign_EnergySource_pMax); + assign_map.emplace("cim:EnergySource.pMin", &assign_EnergySource_pMin); + assign_map.emplace("cim:EnergySource.r", &assign_EnergySource_r); + assign_map.emplace("cim:EnergySource.r0", &assign_EnergySource_r0); + assign_map.emplace("cim:EnergySource.reactivePower", &assign_EnergySource_reactivePower); + assign_map.emplace("cim:EnergySource.rn", &assign_EnergySource_rn); + assign_map.emplace("cim:EnergySource.voltageAngle", &assign_EnergySource_voltageAngle); + assign_map.emplace("cim:EnergySource.voltageMagnitude", &assign_EnergySource_voltageMagnitude); + assign_map.emplace("cim:EnergySource.x", &assign_EnergySource_x); + assign_map.emplace("cim:EnergySource.x0", &assign_EnergySource_x0); + assign_map.emplace("cim:EnergySource.xn", &assign_EnergySource_xn); } void EnergySource::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EnergySource.EnergySchedulingType"), &assign_EnergySource_EnergySchedulingType)); + assign_map.emplace("cim:EnergySource.EnergySchedulingType", &assign_EnergySource_EnergySchedulingType); } void EnergySource::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/EnergySource.hpp b/CGMES_3.0.0/EnergySource.hpp index 3ce6cbb0c..5d6879b10 100644 --- a/CGMES_3.0.0/EnergySource.hpp +++ b/CGMES_3.0.0/EnergySource.hpp @@ -23,9 +23,7 @@ namespace CIMPP { class EnergySchedulingType; - /* - A generic equivalent for an energy supplier on a transmission or distribution voltage level. - */ + /** \brief A generic equivalent for an energy supplier on a transmission or distribution voltage level. */ class EnergySource : public EnergyConnection { public: @@ -33,20 +31,47 @@ namespace CIMPP EnergySource(); ~EnergySource() override; - CIMPP::EnergySchedulingType* EnergySchedulingType; /* Energy Scheduling Type of an Energy Source. Default: 0 */ - CIMPP::ActivePower activePower; /* High voltage source active injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ - CIMPP::Voltage nominalVoltage; /* Phase-to-phase nominal voltage. Default: nullptr */ - CIMPP::ActivePower pMax; /* This is the maximum active power that can be produced by the source. Load sign convention is used, i.e. positive sign means flow out from a TopologicalNode (bus) into the conducting equipment. Default: nullptr */ - CIMPP::ActivePower pMin; /* This is the minimum active power that can be produced by the source. Load sign convention is used, i.e. positive sign means flow out from a TopologicalNode (bus) into the conducting equipment. Default: nullptr */ - CIMPP::Resistance r; /* Positive sequence Thevenin resistance. Default: nullptr */ - CIMPP::Resistance r0; /* Zero sequence Thevenin resistance. Default: nullptr */ - CIMPP::ReactivePower reactivePower; /* High voltage source reactive injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ - CIMPP::Resistance rn; /* Negative sequence Thevenin resistance. Default: nullptr */ - CIMPP::AngleRadians voltageAngle; /* Phase angle of a-phase open circuit used when voltage characteristics need to be imposed at the node associated with the terminal of the energy source, such as when voltages and angles from the transmission level are used as input to the distribution network. The attribute shall be a positive value or zero. Default: nullptr */ - CIMPP::Voltage voltageMagnitude; /* Phase-to-phase open circuit voltage magnitude used when voltage characteristics need to be imposed at the node associated with the terminal of the energy source, such as when voltages and angles from the transmission level are used as input to the distribution network. The attribute shall be a positive value or zero. Default: nullptr */ - CIMPP::Reactance x; /* Positive sequence Thevenin reactance. Default: nullptr */ - CIMPP::Reactance x0; /* Zero sequence Thevenin reactance. Default: nullptr */ - CIMPP::Reactance xn; /* Negative sequence Thevenin reactance. Default: nullptr */ + /** \brief Energy Scheduling Type of an Energy Source. Default: 0 */ + CIMPP::EnergySchedulingType* EnergySchedulingType; + + /** \brief High voltage source active injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ + CIMPP::ActivePower activePower; + + /** \brief Phase-to-phase nominal voltage. Default: nullptr */ + CIMPP::Voltage nominalVoltage; + + /** \brief This is the maximum active power that can be produced by the source. Load sign convention is used, i.e. positive sign means flow out from a TopologicalNode (bus) into the conducting equipment. Default: nullptr */ + CIMPP::ActivePower pMax; + + /** \brief This is the minimum active power that can be produced by the source. Load sign convention is used, i.e. positive sign means flow out from a TopologicalNode (bus) into the conducting equipment. Default: nullptr */ + CIMPP::ActivePower pMin; + + /** \brief Positive sequence Thevenin resistance. Default: nullptr */ + CIMPP::Resistance r; + + /** \brief Zero sequence Thevenin resistance. Default: nullptr */ + CIMPP::Resistance r0; + + /** \brief High voltage source reactive injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ + CIMPP::ReactivePower reactivePower; + + /** \brief Negative sequence Thevenin resistance. Default: nullptr */ + CIMPP::Resistance rn; + + /** \brief Phase angle of a-phase open circuit used when voltage characteristics need to be imposed at the node associated with the terminal of the energy source, such as when voltages and angles from the transmission level are used as input to the distribution network. The attribute shall be a positive value or zero. Default: nullptr */ + CIMPP::AngleRadians voltageAngle; + + /** \brief Phase-to-phase open circuit voltage magnitude used when voltage characteristics need to be imposed at the node associated with the terminal of the energy source, such as when voltages and angles from the transmission level are used as input to the distribution network. The attribute shall be a positive value or zero. Default: nullptr */ + CIMPP::Voltage voltageMagnitude; + + /** \brief Positive sequence Thevenin reactance. Default: nullptr */ + CIMPP::Reactance x; + + /** \brief Zero sequence Thevenin reactance. Default: nullptr */ + CIMPP::Reactance x0; + + /** \brief Negative sequence Thevenin reactance. Default: nullptr */ + CIMPP::Reactance xn; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Equipment.cpp b/CGMES_3.0.0/Equipment.cpp index 451238058..b07a3ffb8 100644 --- a/CGMES_3.0.0/Equipment.cpp +++ b/CGMES_3.0.0/Equipment.cpp @@ -10,14 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "EquipmentContainer.hpp" #include "OperationalLimitSet.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" using namespace CIMPP; -Equipment::Equipment() : EquipmentContainer(nullptr) {}; -Equipment::~Equipment() {}; +Equipment::Equipment() : EquipmentContainer(nullptr) {} +Equipment::~Equipment() {} static const std::list PossibleProfilesForClass = { @@ -52,99 +49,103 @@ Equipment::getPossibleProfilesForAttributes() const return map; } - -bool assign_Equipment_aggregate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquipmentContainer_Equipments(BaseClass*, BaseClass*); +bool assign_Equipment_EquipmentContainer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (Equipment* element = dynamic_cast(BaseClass_ptr1)) + Equipment* element = dynamic_cast(BaseClass_ptr1); + EquipmentContainer* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->aggregate; - if (buffer.fail()) - return false; - else - return true; + if (element->EquipmentContainer != element2) + { + element->EquipmentContainer = element2; + return assign_EquipmentContainer_Equipments(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_Equipment_inService(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OperationalLimitSet_Equipment(BaseClass*, BaseClass*); +bool assign_Equipment_OperationalLimitSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (Equipment* element = dynamic_cast(BaseClass_ptr1)) + Equipment* element = dynamic_cast(BaseClass_ptr1); + OperationalLimitSet* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->inService; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->OperationalLimitSet.begin(), element->OperationalLimitSet.end(), element2) == element->OperationalLimitSet.end()) + { + element->OperationalLimitSet.push_back(element2); + return assign_OperationalLimitSet_Equipment(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_Equipment_normallyInService(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Equipment_aggregate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Equipment* element = dynamic_cast(BaseClass_ptr1)) + Equipment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->normallyInService; - if (buffer.fail()) - return false; - else + buffer >> element->aggregate; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_EquipmentContainer_Equipments(BaseClass*, BaseClass*); -bool assign_Equipment_EquipmentContainer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_Equipment_inService(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { Equipment* element = dynamic_cast(BaseClass_ptr1); - EquipmentContainer* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->EquipmentContainer != element2) + buffer >> element->inService; + if (!buffer.fail()) { - element->EquipmentContainer = element2; - return assign_EquipmentContainer_Equipments(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_OperationalLimitSet_Equipment(BaseClass*, BaseClass*); -bool assign_Equipment_OperationalLimitSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_Equipment_normallyInService(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { Equipment* element = dynamic_cast(BaseClass_ptr1); - OperationalLimitSet* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->OperationalLimitSet.begin(), element->OperationalLimitSet.end(), element2) == element->OperationalLimitSet.end()) + buffer >> element->normallyInService; + if (!buffer.fail()) { - element->OperationalLimitSet.push_back(element2); - return assign_OperationalLimitSet_Equipment(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool get_Equipment_aggregate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_Equipment_EquipmentContainer(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Equipment* element = dynamic_cast(BaseClass_ptr1)) + const Equipment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->aggregate; - if (!buffer.str().empty()) + if (element->EquipmentContainer != 0) { + BaseClass_list.push_back(element->EquipmentContainer); return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_Equipment_inService(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) + +bool get_Equipment_aggregate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Equipment* element = dynamic_cast(BaseClass_ptr1)) + const Equipment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->inService; + buffer << element->aggregate; if (!buffer.str().empty()) { return true; @@ -154,11 +155,12 @@ bool get_Equipment_inService(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } -bool get_Equipment_normallyInService(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_Equipment_inService(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Equipment* element = dynamic_cast(BaseClass_ptr1)) + const Equipment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->normallyInService; + buffer << element->inService; if (!buffer.str().empty()) { return true; @@ -168,21 +170,21 @@ bool get_Equipment_normallyInService(const BaseClass* BaseClass_ptr1, std::strin return false; } - -bool get_Equipment_EquipmentContainer(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) +bool get_Equipment_normallyInService(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Equipment* element = dynamic_cast(BaseClass_ptr1)) + const Equipment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->EquipmentContainer != 0) + buffer << element->normallyInService; + if (!buffer.str().empty()) { - BaseClass_list.push_back(element->EquipmentContainer); return true; } } + buffer.setstate(std::ios::failbit); return false; } - const char Equipment::debugName[] = "Equipment"; const char* Equipment::debugString() const { @@ -191,20 +193,20 @@ const char* Equipment::debugString() const void Equipment::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Equipment"), &Equipment_factory)); + factory_map.emplace("cim:Equipment", &Equipment_factory); } void Equipment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Equipment.aggregate"), &assign_Equipment_aggregate)); - assign_map.insert(std::make_pair(std::string("cim:Equipment.inService"), &assign_Equipment_inService)); - assign_map.insert(std::make_pair(std::string("cim:Equipment.normallyInService"), &assign_Equipment_normallyInService)); + assign_map.emplace("cim:Equipment.aggregate", &assign_Equipment_aggregate); + assign_map.emplace("cim:Equipment.inService", &assign_Equipment_inService); + assign_map.emplace("cim:Equipment.normallyInService", &assign_Equipment_normallyInService); } void Equipment::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Equipment.EquipmentContainer"), &assign_Equipment_EquipmentContainer)); - assign_map.insert(std::make_pair(std::string("cim:Equipment.OperationalLimitSet"), &assign_Equipment_OperationalLimitSet)); + assign_map.emplace("cim:Equipment.EquipmentContainer", &assign_Equipment_EquipmentContainer); + assign_map.emplace("cim:Equipment.OperationalLimitSet", &assign_Equipment_OperationalLimitSet); } void Equipment::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/Equipment.hpp b/CGMES_3.0.0/Equipment.hpp index d775275b9..e1066bc6d 100644 --- a/CGMES_3.0.0/Equipment.hpp +++ b/CGMES_3.0.0/Equipment.hpp @@ -19,9 +19,7 @@ namespace CIMPP class EquipmentContainer; class OperationalLimitSet; - /* - The parts of a power system that are physical devices, electronic or mechanical. - */ + /** \brief The parts of a power system that are physical devices, electronic or mechanical. */ class Equipment : public PowerSystemResource { public: @@ -29,11 +27,20 @@ namespace CIMPP Equipment(); ~Equipment() override; - CIMPP::EquipmentContainer* EquipmentContainer; /* Container of this equipment. Default: 0 */ - std::list OperationalLimitSet; /* The operational limit sets associated with this equipment. Default: 0 */ - CIMPP::Boolean aggregate; /* The aggregate flag provides an alternative way of representing an aggregated (equivalent) element. It is applicable in cases when the dedicated classes for equivalent equipment do not have all of the attributes necessary to represent the required level of detail. In case the flag is set to `true` the single instance of equipment represents multiple pieces of equipment that have been modelled together as an aggregate equivalent obtained by a network reduction procedure. Examples would be power transformers or synchronous machines operating in parallel modelled as a single aggregate power transformer or aggregate synchronous machine. The attribute is not used for EquivalentBranch, EquivalentShunt and EquivalentInjection. Default: false */ - CIMPP::Boolean inService; /* Specifies the availability of the equipment. True means the equipment is available for topology processing, which determines if the equipment is energized or not. False means that the equipment is treated by network applications as if it is not in the model. Default: false */ - CIMPP::Boolean normallyInService; /* Specifies the availability of the equipment under normal operating conditions. True means the equipment is available for topology processing, which determines if the equipment is energized or not. False means that the equipment is treated by network applications as if it is not in the model. Default: false */ + /** \brief Container of this equipment. Default: 0 */ + CIMPP::EquipmentContainer* EquipmentContainer; + + /** \brief The operational limit sets associated with this equipment. Default: 0 */ + std::list OperationalLimitSet; + + /** \brief The aggregate flag provides an alternative way of representing an aggregated (equivalent) element. It is applicable in cases when the dedicated classes for equivalent equipment do not have all of the attributes necessary to represent the required level of detail. In case the flag is set to `true` the single instance of equipment represents multiple pieces of equipment that have been modelled together as an aggregate equivalent obtained by a network reduction procedure. Examples would be power transformers or synchronous machines operating in parallel modelled as a single aggregate power transformer or aggregate synchronous machine. The attribute is not used for EquivalentBranch, EquivalentShunt and EquivalentInjection. Default: false */ + CIMPP::Boolean aggregate; + + /** \brief Specifies the availability of the equipment. True means the equipment is available for topology processing, which determines if the equipment is energized or not. False means that the equipment is treated by network applications as if it is not in the model. Default: false */ + CIMPP::Boolean inService; + + /** \brief Specifies the availability of the equipment under normal operating conditions. True means the equipment is available for topology processing, which determines if the equipment is energized or not. False means that the equipment is treated by network applications as if it is not in the model. Default: false */ + CIMPP::Boolean normallyInService; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/EquipmentContainer.cpp b/CGMES_3.0.0/EquipmentContainer.cpp index f4a2489d6..7bf065286 100644 --- a/CGMES_3.0.0/EquipmentContainer.cpp +++ b/CGMES_3.0.0/EquipmentContainer.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -EquipmentContainer::EquipmentContainer() {}; -EquipmentContainer::~EquipmentContainer() {}; +EquipmentContainer::EquipmentContainer() {} +EquipmentContainer::~EquipmentContainer() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ EquipmentContainer::getPossibleProfilesForAttributes() const return map; } - - bool assign_Equipment_EquipmentContainer(BaseClass*, BaseClass*); bool assign_EquipmentContainer_Equipments(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,7 +59,6 @@ bool assign_EquipmentContainer_Equipments(BaseClass* BaseClass_ptr1, BaseClass* } - const char EquipmentContainer::debugName[] = "EquipmentContainer"; const char* EquipmentContainer::debugString() const { @@ -70,7 +67,7 @@ const char* EquipmentContainer::debugString() const void EquipmentContainer::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EquipmentContainer"), &EquipmentContainer_factory)); + factory_map.emplace("cim:EquipmentContainer", &EquipmentContainer_factory); } void EquipmentContainer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -79,7 +76,7 @@ void EquipmentContainer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EquipmentContainer.Equipments"), &assign_EquipmentContainer_Equipments)); + assign_map.emplace("cim:EquipmentContainer.Equipments", &assign_EquipmentContainer_Equipments); } void EquipmentContainer::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/EquipmentContainer.hpp b/CGMES_3.0.0/EquipmentContainer.hpp index d2325592f..1820a9293 100644 --- a/CGMES_3.0.0/EquipmentContainer.hpp +++ b/CGMES_3.0.0/EquipmentContainer.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class Equipment; - /* - A modelling construct to provide a root class for containing equipment. - */ + /** \brief A modelling construct to provide a root class for containing equipment. */ class EquipmentContainer : public ConnectivityNodeContainer { public: @@ -27,7 +25,8 @@ namespace CIMPP EquipmentContainer(); ~EquipmentContainer() override; - std::list Equipments; /* Contained equipment. Default: 0 */ + /** \brief Contained equipment. Default: 0 */ + std::list Equipments; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/EquivalentBranch.cpp b/CGMES_3.0.0/EquivalentBranch.cpp index 419156620..02cbb86c6 100644 --- a/CGMES_3.0.0/EquivalentBranch.cpp +++ b/CGMES_3.0.0/EquivalentBranch.cpp @@ -8,27 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -EquivalentBranch::EquivalentBranch() {}; -EquivalentBranch::~EquivalentBranch() {}; +EquivalentBranch::EquivalentBranch() {} +EquivalentBranch::~EquivalentBranch() {} static const std::list PossibleProfilesForClass = { @@ -71,220 +55,234 @@ EquivalentBranch::getPossibleProfilesForAttributes() const return map; } - -bool assign_EquivalentBranch_negativeR12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_negativeR12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->negativeR12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_negativeR21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_negativeR21(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->negativeR21; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_negativeX12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_negativeX12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->negativeX12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_negativeX21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_negativeX21(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->negativeX21; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_positiveR12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_positiveR12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->positiveR12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_positiveR21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_positiveR21(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->positiveR21; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_positiveX12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_positiveX12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->positiveX12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_positiveX21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_positiveX21(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->positiveX21; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_r21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_r21(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r21; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_x(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_x21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_x21(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x21; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_zeroR12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_zeroR12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->zeroR12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_zeroR21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_zeroR21(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->zeroR21; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_zeroX12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_zeroX12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->zeroX12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentBranch_zeroX21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentBranch_zeroX21(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->zeroX21; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_EquivalentBranch_negativeR12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->negativeR12; if (!buffer.str().empty()) @@ -298,7 +296,8 @@ bool get_EquivalentBranch_negativeR12(const BaseClass* BaseClass_ptr1, std::stri bool get_EquivalentBranch_negativeR21(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->negativeR21; if (!buffer.str().empty()) @@ -312,7 +311,8 @@ bool get_EquivalentBranch_negativeR21(const BaseClass* BaseClass_ptr1, std::stri bool get_EquivalentBranch_negativeX12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->negativeX12; if (!buffer.str().empty()) @@ -326,7 +326,8 @@ bool get_EquivalentBranch_negativeX12(const BaseClass* BaseClass_ptr1, std::stri bool get_EquivalentBranch_negativeX21(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->negativeX21; if (!buffer.str().empty()) @@ -340,7 +341,8 @@ bool get_EquivalentBranch_negativeX21(const BaseClass* BaseClass_ptr1, std::stri bool get_EquivalentBranch_positiveR12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->positiveR12; if (!buffer.str().empty()) @@ -354,7 +356,8 @@ bool get_EquivalentBranch_positiveR12(const BaseClass* BaseClass_ptr1, std::stri bool get_EquivalentBranch_positiveR21(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->positiveR21; if (!buffer.str().empty()) @@ -368,7 +371,8 @@ bool get_EquivalentBranch_positiveR21(const BaseClass* BaseClass_ptr1, std::stri bool get_EquivalentBranch_positiveX12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->positiveX12; if (!buffer.str().empty()) @@ -382,7 +386,8 @@ bool get_EquivalentBranch_positiveX12(const BaseClass* BaseClass_ptr1, std::stri bool get_EquivalentBranch_positiveX21(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->positiveX21; if (!buffer.str().empty()) @@ -396,7 +401,8 @@ bool get_EquivalentBranch_positiveX21(const BaseClass* BaseClass_ptr1, std::stri bool get_EquivalentBranch_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -410,7 +416,8 @@ bool get_EquivalentBranch_r(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_EquivalentBranch_r21(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r21; if (!buffer.str().empty()) @@ -424,7 +431,8 @@ bool get_EquivalentBranch_r21(const BaseClass* BaseClass_ptr1, std::stringstream bool get_EquivalentBranch_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x; if (!buffer.str().empty()) @@ -438,7 +446,8 @@ bool get_EquivalentBranch_x(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_EquivalentBranch_x21(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x21; if (!buffer.str().empty()) @@ -452,7 +461,8 @@ bool get_EquivalentBranch_x21(const BaseClass* BaseClass_ptr1, std::stringstream bool get_EquivalentBranch_zeroR12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->zeroR12; if (!buffer.str().empty()) @@ -466,7 +476,8 @@ bool get_EquivalentBranch_zeroR12(const BaseClass* BaseClass_ptr1, std::stringst bool get_EquivalentBranch_zeroR21(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->zeroR21; if (!buffer.str().empty()) @@ -480,7 +491,8 @@ bool get_EquivalentBranch_zeroR21(const BaseClass* BaseClass_ptr1, std::stringst bool get_EquivalentBranch_zeroX12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->zeroX12; if (!buffer.str().empty()) @@ -494,7 +506,8 @@ bool get_EquivalentBranch_zeroX12(const BaseClass* BaseClass_ptr1, std::stringst bool get_EquivalentBranch_zeroX21(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentBranch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->zeroX21; if (!buffer.str().empty()) @@ -506,8 +519,6 @@ bool get_EquivalentBranch_zeroX21(const BaseClass* BaseClass_ptr1, std::stringst return false; } - - const char EquivalentBranch::debugName[] = "EquivalentBranch"; const char* EquivalentBranch::debugString() const { @@ -516,27 +527,27 @@ const char* EquivalentBranch::debugString() const void EquivalentBranch::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EquivalentBranch"), &EquivalentBranch_factory)); + factory_map.emplace("cim:EquivalentBranch", &EquivalentBranch_factory); } void EquivalentBranch::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.negativeR12"), &assign_EquivalentBranch_negativeR12)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.negativeR21"), &assign_EquivalentBranch_negativeR21)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.negativeX12"), &assign_EquivalentBranch_negativeX12)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.negativeX21"), &assign_EquivalentBranch_negativeX21)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.positiveR12"), &assign_EquivalentBranch_positiveR12)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.positiveR21"), &assign_EquivalentBranch_positiveR21)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.positiveX12"), &assign_EquivalentBranch_positiveX12)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.positiveX21"), &assign_EquivalentBranch_positiveX21)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.r"), &assign_EquivalentBranch_r)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.r21"), &assign_EquivalentBranch_r21)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.x"), &assign_EquivalentBranch_x)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.x21"), &assign_EquivalentBranch_x21)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.zeroR12"), &assign_EquivalentBranch_zeroR12)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.zeroR21"), &assign_EquivalentBranch_zeroR21)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.zeroX12"), &assign_EquivalentBranch_zeroX12)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentBranch.zeroX21"), &assign_EquivalentBranch_zeroX21)); + assign_map.emplace("cim:EquivalentBranch.negativeR12", &assign_EquivalentBranch_negativeR12); + assign_map.emplace("cim:EquivalentBranch.negativeR21", &assign_EquivalentBranch_negativeR21); + assign_map.emplace("cim:EquivalentBranch.negativeX12", &assign_EquivalentBranch_negativeX12); + assign_map.emplace("cim:EquivalentBranch.negativeX21", &assign_EquivalentBranch_negativeX21); + assign_map.emplace("cim:EquivalentBranch.positiveR12", &assign_EquivalentBranch_positiveR12); + assign_map.emplace("cim:EquivalentBranch.positiveR21", &assign_EquivalentBranch_positiveR21); + assign_map.emplace("cim:EquivalentBranch.positiveX12", &assign_EquivalentBranch_positiveX12); + assign_map.emplace("cim:EquivalentBranch.positiveX21", &assign_EquivalentBranch_positiveX21); + assign_map.emplace("cim:EquivalentBranch.r", &assign_EquivalentBranch_r); + assign_map.emplace("cim:EquivalentBranch.r21", &assign_EquivalentBranch_r21); + assign_map.emplace("cim:EquivalentBranch.x", &assign_EquivalentBranch_x); + assign_map.emplace("cim:EquivalentBranch.x21", &assign_EquivalentBranch_x21); + assign_map.emplace("cim:EquivalentBranch.zeroR12", &assign_EquivalentBranch_zeroR12); + assign_map.emplace("cim:EquivalentBranch.zeroR21", &assign_EquivalentBranch_zeroR21); + assign_map.emplace("cim:EquivalentBranch.zeroX12", &assign_EquivalentBranch_zeroX12); + assign_map.emplace("cim:EquivalentBranch.zeroX21", &assign_EquivalentBranch_zeroX21); } void EquivalentBranch::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/EquivalentBranch.hpp b/CGMES_3.0.0/EquivalentBranch.hpp index d7bda15c1..a3d744ee6 100644 --- a/CGMES_3.0.0/EquivalentBranch.hpp +++ b/CGMES_3.0.0/EquivalentBranch.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents equivalent branches. In cases where a transformer phase shift is modelled and the EquivalentBranch is spanning the same nodes, the impedance quantities for the EquivalentBranch shall consider the needed phase shift. - */ + /** \brief The class represents equivalent branches. In cases where a transformer phase shift is modelled and the EquivalentBranch is spanning the same nodes, the impedance quantities for the EquivalentBranch shall consider the needed phase shift. */ class EquivalentBranch : public EquivalentEquipment { public: @@ -28,22 +26,53 @@ namespace CIMPP EquivalentBranch(); ~EquivalentBranch() override; - CIMPP::Resistance negativeR12; /* Negative sequence series resistance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909. EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Resistance negativeR21; /* Negative sequence series resistance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909. EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Reactance negativeX12; /* Negative sequence series reactance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909. Usage : EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Reactance negativeX21; /* Negative sequence series reactance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909. Usage: EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Resistance positiveR12; /* Positive sequence series resistance from terminal sequence 1 to terminal sequence 2 . Used for short circuit data exchange according to IEC 60909. EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Resistance positiveR21; /* Positive sequence series resistance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909. EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Reactance positiveX12; /* Positive sequence series reactance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909. Usage : EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Reactance positiveX21; /* Positive sequence series reactance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909. Usage : EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Resistance r; /* Positive sequence series resistance of the reduced branch. Default: nullptr */ - CIMPP::Resistance r21; /* Resistance from terminal sequence 2 to terminal sequence 1 .Used for steady state power flow. This attribute is optional and represent unbalanced network such as off-nominal phase shifter. If only EquivalentBranch.r is given, then EquivalentBranch.r21 is assumed equal to EquivalentBranch.r. Usage rule : EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Reactance x; /* Positive sequence series reactance of the reduced branch. Default: nullptr */ - CIMPP::Reactance x21; /* Reactance from terminal sequence 2 to terminal sequence 1. Used for steady state power flow. This attribute is optional and represents an unbalanced network such as off-nominal phase shifter. If only EquivalentBranch.x is given, then EquivalentBranch.x21 is assumed equal to EquivalentBranch.x. Usage rule: EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Resistance zeroR12; /* Zero sequence series resistance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909. EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Resistance zeroR21; /* Zero sequence series resistance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909. Usage : EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Reactance zeroX12; /* Zero sequence series reactance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909. Usage : EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Reactance zeroX21; /* Zero sequence series reactance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909. Usage : EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ + /** \brief Negative sequence series resistance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909. EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Resistance negativeR12; + + /** \brief Negative sequence series resistance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909. EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Resistance negativeR21; + + /** \brief Negative sequence series reactance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909. Usage : EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Reactance negativeX12; + + /** \brief Negative sequence series reactance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909. Usage: EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Reactance negativeX21; + + /** \brief Positive sequence series resistance from terminal sequence 1 to terminal sequence 2 . Used for short circuit data exchange according to IEC 60909. EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Resistance positiveR12; + + /** \brief Positive sequence series resistance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909. EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Resistance positiveR21; + + /** \brief Positive sequence series reactance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909. Usage : EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Reactance positiveX12; + + /** \brief Positive sequence series reactance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909. Usage : EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Reactance positiveX21; + + /** \brief Positive sequence series resistance of the reduced branch. Default: nullptr */ + CIMPP::Resistance r; + + /** \brief Resistance from terminal sequence 2 to terminal sequence 1 .Used for steady state power flow. This attribute is optional and represent unbalanced network such as off-nominal phase shifter. If only EquivalentBranch.r is given, then EquivalentBranch.r21 is assumed equal to EquivalentBranch.r. Usage rule : EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Resistance r21; + + /** \brief Positive sequence series reactance of the reduced branch. Default: nullptr */ + CIMPP::Reactance x; + + /** \brief Reactance from terminal sequence 2 to terminal sequence 1. Used for steady state power flow. This attribute is optional and represents an unbalanced network such as off-nominal phase shifter. If only EquivalentBranch.x is given, then EquivalentBranch.x21 is assumed equal to EquivalentBranch.x. Usage rule: EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Reactance x21; + + /** \brief Zero sequence series resistance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909. EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Resistance zeroR12; + + /** \brief Zero sequence series resistance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909. Usage : EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Resistance zeroR21; + + /** \brief Zero sequence series reactance from terminal sequence 1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909. Usage : EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Reactance zeroX12; + + /** \brief Zero sequence series reactance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909. Usage : EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Reactance zeroX21; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/EquivalentEquipment.cpp b/CGMES_3.0.0/EquivalentEquipment.cpp index 5c1a4db7e..c5e8233cb 100644 --- a/CGMES_3.0.0/EquivalentEquipment.cpp +++ b/CGMES_3.0.0/EquivalentEquipment.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -EquivalentEquipment::EquivalentEquipment() : EquivalentNetwork(nullptr) {}; -EquivalentEquipment::~EquivalentEquipment() {}; +EquivalentEquipment::EquivalentEquipment() : EquivalentNetwork(nullptr) {} +EquivalentEquipment::~EquivalentEquipment() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ EquivalentEquipment::getPossibleProfilesForAttributes() const return map; } - - bool assign_EquivalentNetwork_EquivalentEquipments(BaseClass*, BaseClass*); bool assign_EquivalentEquipment_EquivalentNetwork(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,10 +59,10 @@ bool assign_EquivalentEquipment_EquivalentNetwork(BaseClass* BaseClass_ptr1, Bas return false; } - bool get_EquivalentEquipment_EquivalentNetwork(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const EquivalentEquipment* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentEquipment* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->EquivalentNetwork != 0) { @@ -75,7 +73,6 @@ bool get_EquivalentEquipment_EquivalentNetwork(const BaseClass* BaseClass_ptr1, return false; } - const char EquivalentEquipment::debugName[] = "EquivalentEquipment"; const char* EquivalentEquipment::debugString() const { @@ -84,7 +81,7 @@ const char* EquivalentEquipment::debugString() const void EquivalentEquipment::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EquivalentEquipment"), &EquivalentEquipment_factory)); + factory_map.emplace("cim:EquivalentEquipment", &EquivalentEquipment_factory); } void EquivalentEquipment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -93,7 +90,7 @@ void EquivalentEquipment::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EquivalentEquipment.EquivalentNetwork"), &assign_EquivalentEquipment_EquivalentNetwork)); + assign_map.emplace("cim:EquivalentEquipment.EquivalentNetwork", &assign_EquivalentEquipment_EquivalentNetwork); } void EquivalentEquipment::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/EquivalentEquipment.hpp b/CGMES_3.0.0/EquivalentEquipment.hpp index 1d7ab365a..976202e08 100644 --- a/CGMES_3.0.0/EquivalentEquipment.hpp +++ b/CGMES_3.0.0/EquivalentEquipment.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class EquivalentNetwork; - /* - The class represents equivalent objects that are the result of a network reduction. The class is the base for equivalent objects of different types. - */ + /** \brief The class represents equivalent objects that are the result of a network reduction. The class is the base for equivalent objects of different types. */ class EquivalentEquipment : public ConductingEquipment { public: @@ -27,7 +25,8 @@ namespace CIMPP EquivalentEquipment(); ~EquivalentEquipment() override; - CIMPP::EquivalentNetwork* EquivalentNetwork; /* The equivalent where the reduced model belongs. Default: 0 */ + /** \brief The equivalent where the reduced model belongs. Default: 0 */ + CIMPP::EquivalentNetwork* EquivalentNetwork; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/EquivalentInjection.cpp b/CGMES_3.0.0/EquivalentInjection.cpp index 95d23a116..9cd417f42 100644 --- a/CGMES_3.0.0/EquivalentInjection.cpp +++ b/CGMES_3.0.0/EquivalentInjection.cpp @@ -9,26 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ReactiveCapabilityCurve.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Voltage.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -EquivalentInjection::EquivalentInjection() : ReactiveCapabilityCurve(nullptr) {}; -EquivalentInjection::~EquivalentInjection() {}; +EquivalentInjection::EquivalentInjection() : ReactiveCapabilityCurve(nullptr) {} +EquivalentInjection::~EquivalentInjection() {} static const std::list PossibleProfilesForClass = { @@ -72,223 +57,251 @@ EquivalentInjection::getPossibleProfilesForAttributes() const return map; } +bool assign_ReactiveCapabilityCurve_EquivalentInjection(BaseClass*, BaseClass*); +bool assign_EquivalentInjection_ReactiveCapabilityCurve(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + ReactiveCapabilityCurve* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->ReactiveCapabilityCurve != element2) + { + element->ReactiveCapabilityCurve = element2; + return assign_ReactiveCapabilityCurve_EquivalentInjection(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_EquivalentInjection_maxP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_maxP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_maxQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_maxQ(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxQ; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_minP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_minP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_minQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_minQ(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minQ; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_p(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_r0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_r2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_r2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_regulationCapability(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_regulationCapability(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->regulationCapability; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_regulationStatus(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_regulationStatus(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->regulationStatus; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_regulationTarget(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_regulationTarget(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->regulationTarget; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_x(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_x0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentInjection_x2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentInjection_x2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_ReactiveCapabilityCurve_EquivalentInjection(BaseClass*, BaseClass*); -bool assign_EquivalentInjection_ReactiveCapabilityCurve(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_EquivalentInjection_ReactiveCapabilityCurve(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); - ReactiveCapabilityCurve* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->ReactiveCapabilityCurve != element2) + if (element->ReactiveCapabilityCurve != 0) { - element->ReactiveCapabilityCurve = element2; - return assign_ReactiveCapabilityCurve_EquivalentInjection(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->ReactiveCapabilityCurve); + return true; } - return true; } return false; } bool get_EquivalentInjection_maxP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxP; if (!buffer.str().empty()) @@ -302,7 +315,8 @@ bool get_EquivalentInjection_maxP(const BaseClass* BaseClass_ptr1, std::stringst bool get_EquivalentInjection_maxQ(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxQ; if (!buffer.str().empty()) @@ -316,7 +330,8 @@ bool get_EquivalentInjection_maxQ(const BaseClass* BaseClass_ptr1, std::stringst bool get_EquivalentInjection_minP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minP; if (!buffer.str().empty()) @@ -330,7 +345,8 @@ bool get_EquivalentInjection_minP(const BaseClass* BaseClass_ptr1, std::stringst bool get_EquivalentInjection_minQ(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minQ; if (!buffer.str().empty()) @@ -344,7 +360,8 @@ bool get_EquivalentInjection_minQ(const BaseClass* BaseClass_ptr1, std::stringst bool get_EquivalentInjection_p(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p; if (!buffer.str().empty()) @@ -358,7 +375,8 @@ bool get_EquivalentInjection_p(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_EquivalentInjection_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q; if (!buffer.str().empty()) @@ -372,7 +390,8 @@ bool get_EquivalentInjection_q(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_EquivalentInjection_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -386,7 +405,8 @@ bool get_EquivalentInjection_r(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_EquivalentInjection_r0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r0; if (!buffer.str().empty()) @@ -400,7 +420,8 @@ bool get_EquivalentInjection_r0(const BaseClass* BaseClass_ptr1, std::stringstre bool get_EquivalentInjection_r2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r2; if (!buffer.str().empty()) @@ -414,7 +435,8 @@ bool get_EquivalentInjection_r2(const BaseClass* BaseClass_ptr1, std::stringstre bool get_EquivalentInjection_regulationCapability(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->regulationCapability; if (!buffer.str().empty()) @@ -428,7 +450,8 @@ bool get_EquivalentInjection_regulationCapability(const BaseClass* BaseClass_ptr bool get_EquivalentInjection_regulationStatus(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->regulationStatus; if (!buffer.str().empty()) @@ -442,7 +465,8 @@ bool get_EquivalentInjection_regulationStatus(const BaseClass* BaseClass_ptr1, s bool get_EquivalentInjection_regulationTarget(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->regulationTarget; if (!buffer.str().empty()) @@ -456,7 +480,8 @@ bool get_EquivalentInjection_regulationTarget(const BaseClass* BaseClass_ptr1, s bool get_EquivalentInjection_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x; if (!buffer.str().empty()) @@ -470,7 +495,8 @@ bool get_EquivalentInjection_x(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_EquivalentInjection_x0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x0; if (!buffer.str().empty()) @@ -484,7 +510,8 @@ bool get_EquivalentInjection_x0(const BaseClass* BaseClass_ptr1, std::stringstre bool get_EquivalentInjection_x2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x2; if (!buffer.str().empty()) @@ -496,21 +523,6 @@ bool get_EquivalentInjection_x2(const BaseClass* BaseClass_ptr1, std::stringstre return false; } - -bool get_EquivalentInjection_ReactiveCapabilityCurve(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const EquivalentInjection* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->ReactiveCapabilityCurve != 0) - { - BaseClass_list.push_back(element->ReactiveCapabilityCurve); - return true; - } - } - return false; -} - - const char EquivalentInjection::debugName[] = "EquivalentInjection"; const char* EquivalentInjection::debugString() const { @@ -519,31 +531,31 @@ const char* EquivalentInjection::debugString() const void EquivalentInjection::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EquivalentInjection"), &EquivalentInjection_factory)); + factory_map.emplace("cim:EquivalentInjection", &EquivalentInjection_factory); } void EquivalentInjection::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.maxP"), &assign_EquivalentInjection_maxP)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.maxQ"), &assign_EquivalentInjection_maxQ)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.minP"), &assign_EquivalentInjection_minP)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.minQ"), &assign_EquivalentInjection_minQ)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.p"), &assign_EquivalentInjection_p)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.q"), &assign_EquivalentInjection_q)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.r"), &assign_EquivalentInjection_r)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.r0"), &assign_EquivalentInjection_r0)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.r2"), &assign_EquivalentInjection_r2)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.regulationCapability"), &assign_EquivalentInjection_regulationCapability)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.regulationStatus"), &assign_EquivalentInjection_regulationStatus)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.regulationTarget"), &assign_EquivalentInjection_regulationTarget)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.x"), &assign_EquivalentInjection_x)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.x0"), &assign_EquivalentInjection_x0)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.x2"), &assign_EquivalentInjection_x2)); + assign_map.emplace("cim:EquivalentInjection.maxP", &assign_EquivalentInjection_maxP); + assign_map.emplace("cim:EquivalentInjection.maxQ", &assign_EquivalentInjection_maxQ); + assign_map.emplace("cim:EquivalentInjection.minP", &assign_EquivalentInjection_minP); + assign_map.emplace("cim:EquivalentInjection.minQ", &assign_EquivalentInjection_minQ); + assign_map.emplace("cim:EquivalentInjection.p", &assign_EquivalentInjection_p); + assign_map.emplace("cim:EquivalentInjection.q", &assign_EquivalentInjection_q); + assign_map.emplace("cim:EquivalentInjection.r", &assign_EquivalentInjection_r); + assign_map.emplace("cim:EquivalentInjection.r0", &assign_EquivalentInjection_r0); + assign_map.emplace("cim:EquivalentInjection.r2", &assign_EquivalentInjection_r2); + assign_map.emplace("cim:EquivalentInjection.regulationCapability", &assign_EquivalentInjection_regulationCapability); + assign_map.emplace("cim:EquivalentInjection.regulationStatus", &assign_EquivalentInjection_regulationStatus); + assign_map.emplace("cim:EquivalentInjection.regulationTarget", &assign_EquivalentInjection_regulationTarget); + assign_map.emplace("cim:EquivalentInjection.x", &assign_EquivalentInjection_x); + assign_map.emplace("cim:EquivalentInjection.x0", &assign_EquivalentInjection_x0); + assign_map.emplace("cim:EquivalentInjection.x2", &assign_EquivalentInjection_x2); } void EquivalentInjection::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EquivalentInjection.ReactiveCapabilityCurve"), &assign_EquivalentInjection_ReactiveCapabilityCurve)); + assign_map.emplace("cim:EquivalentInjection.ReactiveCapabilityCurve", &assign_EquivalentInjection_ReactiveCapabilityCurve); } void EquivalentInjection::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/EquivalentInjection.hpp b/CGMES_3.0.0/EquivalentInjection.hpp index f27a02596..b10e2980a 100644 --- a/CGMES_3.0.0/EquivalentInjection.hpp +++ b/CGMES_3.0.0/EquivalentInjection.hpp @@ -23,9 +23,7 @@ namespace CIMPP { class ReactiveCapabilityCurve; - /* - This class represents equivalent injections (generation or load). Voltage regulation is allowed only at the point of connection. - */ + /** \brief This class represents equivalent injections (generation or load). Voltage regulation is allowed only at the point of connection. */ class EquivalentInjection : public EquivalentEquipment { public: @@ -33,22 +31,53 @@ namespace CIMPP EquivalentInjection(); ~EquivalentInjection() override; - CIMPP::ReactiveCapabilityCurve* ReactiveCapabilityCurve; /* The reactive capability curve used by this equivalent injection. Default: 0 */ - CIMPP::ActivePower maxP; /* Maximum active power of the injection. Default: nullptr */ - CIMPP::ReactivePower maxQ; /* Maximum reactive power of the injection. Used for modelling of infeed for load flow exchange. Not used for short circuit modelling. If maxQ and minQ are not used ReactiveCapabilityCurve can be used. Default: nullptr */ - CIMPP::ActivePower minP; /* Minimum active power of the injection. Default: nullptr */ - CIMPP::ReactivePower minQ; /* Minimum reactive power of the injection. Used for modelling of infeed for load flow exchange. Not used for short circuit modelling. If maxQ and minQ are not used ReactiveCapabilityCurve can be used. Default: nullptr */ - CIMPP::ActivePower p; /* Equivalent active power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ - CIMPP::ReactivePower q; /* Equivalent reactive power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ - CIMPP::Resistance r; /* Positive sequence resistance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Resistance r0; /* Zero sequence resistance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Resistance r2; /* Negative sequence resistance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Boolean regulationCapability; /* Specifies whether or not the EquivalentInjection has the capability to regulate the local voltage. If true the EquivalentInjection can regulate. If false the EquivalentInjection cannot regulate. ReactiveCapabilityCurve can only be associated with EquivalentInjection if the flag is true. Default: false */ - CIMPP::Boolean regulationStatus; /* Specifies the regulation status of the EquivalentInjection. True is regulating. False is not regulating. Default: false */ - CIMPP::Voltage regulationTarget; /* The target voltage for voltage regulation. The attribute shall be a positive value. Default: nullptr */ - CIMPP::Reactance x; /* Positive sequence reactance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Reactance x0; /* Zero sequence reactance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ - CIMPP::Reactance x2; /* Negative sequence reactance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ + /** \brief The reactive capability curve used by this equivalent injection. Default: 0 */ + CIMPP::ReactiveCapabilityCurve* ReactiveCapabilityCurve; + + /** \brief Maximum active power of the injection. Default: nullptr */ + CIMPP::ActivePower maxP; + + /** \brief Maximum reactive power of the injection. Used for modelling of infeed for load flow exchange. Not used for short circuit modelling. If maxQ and minQ are not used ReactiveCapabilityCurve can be used. Default: nullptr */ + CIMPP::ReactivePower maxQ; + + /** \brief Minimum active power of the injection. Default: nullptr */ + CIMPP::ActivePower minP; + + /** \brief Minimum reactive power of the injection. Used for modelling of infeed for load flow exchange. Not used for short circuit modelling. If maxQ and minQ are not used ReactiveCapabilityCurve can be used. Default: nullptr */ + CIMPP::ReactivePower minQ; + + /** \brief Equivalent active power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ + CIMPP::ActivePower p; + + /** \brief Equivalent reactive power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ + CIMPP::ReactivePower q; + + /** \brief Positive sequence resistance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Resistance r; + + /** \brief Zero sequence resistance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Resistance r0; + + /** \brief Negative sequence resistance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Resistance r2; + + /** \brief Specifies whether or not the EquivalentInjection has the capability to regulate the local voltage. If true the EquivalentInjection can regulate. If false the EquivalentInjection cannot regulate. ReactiveCapabilityCurve can only be associated with EquivalentInjection if the flag is true. Default: false */ + CIMPP::Boolean regulationCapability; + + /** \brief Specifies the regulation status of the EquivalentInjection. True is regulating. False is not regulating. Default: false */ + CIMPP::Boolean regulationStatus; + + /** \brief The target voltage for voltage regulation. The attribute shall be a positive value. Default: nullptr */ + CIMPP::Voltage regulationTarget; + + /** \brief Positive sequence reactance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Reactance x; + + /** \brief Zero sequence reactance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Reactance x0; + + /** \brief Negative sequence reactance. Used to represent Extended-Ward (IEC 60909). Usage : Extended-Ward is a result of network reduction prior to the data exchange. Default: nullptr */ + CIMPP::Reactance x2; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/EquivalentNetwork.cpp b/CGMES_3.0.0/EquivalentNetwork.cpp index f08fd6d02..81b5286cd 100644 --- a/CGMES_3.0.0/EquivalentNetwork.cpp +++ b/CGMES_3.0.0/EquivalentNetwork.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -EquivalentNetwork::EquivalentNetwork() {}; -EquivalentNetwork::~EquivalentNetwork() {}; +EquivalentNetwork::EquivalentNetwork() {} +EquivalentNetwork::~EquivalentNetwork() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ EquivalentNetwork::getPossibleProfilesForAttributes() const return map; } - - bool assign_EquivalentEquipment_EquivalentNetwork(BaseClass*, BaseClass*); bool assign_EquivalentNetwork_EquivalentEquipments(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_EquivalentNetwork_EquivalentEquipments(BaseClass* BaseClass_ptr1, Ba } - const char EquivalentNetwork::debugName[] = "EquivalentNetwork"; const char* EquivalentNetwork::debugString() const { @@ -69,7 +66,7 @@ const char* EquivalentNetwork::debugString() const void EquivalentNetwork::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EquivalentNetwork"), &EquivalentNetwork_factory)); + factory_map.emplace("cim:EquivalentNetwork", &EquivalentNetwork_factory); } void EquivalentNetwork::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void EquivalentNetwork::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EquivalentNetwork.EquivalentEquipments"), &assign_EquivalentNetwork_EquivalentEquipments)); + assign_map.emplace("cim:EquivalentNetwork.EquivalentEquipments", &assign_EquivalentNetwork_EquivalentEquipments); } void EquivalentNetwork::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/EquivalentNetwork.hpp b/CGMES_3.0.0/EquivalentNetwork.hpp index 3c71bd8fc..0fef7c8a7 100644 --- a/CGMES_3.0.0/EquivalentNetwork.hpp +++ b/CGMES_3.0.0/EquivalentNetwork.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class EquivalentEquipment; - /* - A class that groups electrical equivalents, including internal nodes, of a network that has been reduced. The ConnectivityNodes contained in the equivalent are intended to reflect internal nodes of the equivalent. The boundary Connectivity nodes where the equivalent connects outside itself are not contained by the equivalent. - */ + /** \brief A class that groups electrical equivalents, including internal nodes, of a network that has been reduced. The ConnectivityNodes contained in the equivalent are intended to reflect internal nodes of the equivalent. The boundary Connectivity nodes where the equivalent connects outside itself are not contained by the equivalent. */ class EquivalentNetwork : public ConnectivityNodeContainer { public: @@ -27,7 +25,8 @@ namespace CIMPP EquivalentNetwork(); ~EquivalentNetwork() override; - std::list EquivalentEquipments; /* The associated reduced equivalents. Default: 0 */ + /** \brief The associated reduced equivalents. Default: 0 */ + std::list EquivalentEquipments; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/EquivalentShunt.cpp b/CGMES_3.0.0/EquivalentShunt.cpp index 62dafdf33..3bee41ffb 100644 --- a/CGMES_3.0.0/EquivalentShunt.cpp +++ b/CGMES_3.0.0/EquivalentShunt.cpp @@ -8,13 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Susceptance.hpp" -#include "Conductance.hpp" using namespace CIMPP; -EquivalentShunt::EquivalentShunt() {}; -EquivalentShunt::~EquivalentShunt() {}; +EquivalentShunt::EquivalentShunt() {} +EquivalentShunt::~EquivalentShunt() {} static const std::list PossibleProfilesForClass = { @@ -42,38 +40,38 @@ EquivalentShunt::getPossibleProfilesForAttributes() const return map; } - -bool assign_EquivalentShunt_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentShunt_b(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentShunt* element = dynamic_cast(BaseClass_ptr1)) + EquivalentShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_EquivalentShunt_g(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_EquivalentShunt_g(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (EquivalentShunt* element = dynamic_cast(BaseClass_ptr1)) + EquivalentShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_EquivalentShunt_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentShunt* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b; if (!buffer.str().empty()) @@ -87,7 +85,8 @@ bool get_EquivalentShunt_b(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_EquivalentShunt_g(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const EquivalentShunt* element = dynamic_cast(BaseClass_ptr1)) + const EquivalentShunt* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g; if (!buffer.str().empty()) @@ -99,8 +98,6 @@ bool get_EquivalentShunt_g(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char EquivalentShunt::debugName[] = "EquivalentShunt"; const char* EquivalentShunt::debugString() const { @@ -109,13 +106,13 @@ const char* EquivalentShunt::debugString() const void EquivalentShunt::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:EquivalentShunt"), &EquivalentShunt_factory)); + factory_map.emplace("cim:EquivalentShunt", &EquivalentShunt_factory); } void EquivalentShunt::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:EquivalentShunt.b"), &assign_EquivalentShunt_b)); - assign_map.insert(std::make_pair(std::string("cim:EquivalentShunt.g"), &assign_EquivalentShunt_g)); + assign_map.emplace("cim:EquivalentShunt.b", &assign_EquivalentShunt_b); + assign_map.emplace("cim:EquivalentShunt.g", &assign_EquivalentShunt_g); } void EquivalentShunt::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/EquivalentShunt.hpp b/CGMES_3.0.0/EquivalentShunt.hpp index 4a5204e86..4cd995dcf 100644 --- a/CGMES_3.0.0/EquivalentShunt.hpp +++ b/CGMES_3.0.0/EquivalentShunt.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class represents equivalent shunts. - */ + /** \brief The class represents equivalent shunts. */ class EquivalentShunt : public EquivalentEquipment { public: @@ -28,8 +26,11 @@ namespace CIMPP EquivalentShunt(); ~EquivalentShunt() override; - CIMPP::Susceptance b; /* Positive sequence shunt susceptance. Default: nullptr */ - CIMPP::Conductance g; /* Positive sequence shunt conductance. Default: nullptr */ + /** \brief Positive sequence shunt susceptance. Default: nullptr */ + CIMPP::Susceptance b; + + /** \brief Positive sequence shunt conductance. Default: nullptr */ + CIMPP::Conductance g; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcAC1A.cpp b/CGMES_3.0.0/ExcAC1A.cpp index 2127106bd..d5bbdc7a5 100644 --- a/CGMES_3.0.0/ExcAC1A.cpp +++ b/CGMES_3.0.0/ExcAC1A.cpp @@ -8,33 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAC1A::ExcAC1A() {}; -ExcAC1A::~ExcAC1A() {}; +ExcAC1A::ExcAC1A() {} +ExcAC1A::~ExcAC1A() {} static const std::list PossibleProfilesForClass = { @@ -82,298 +60,318 @@ ExcAC1A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAC1A_hvlvgates(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_hvlvgates(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->hvlvgates; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_kf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_kf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_kf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_kf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC1A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAC1A_hvlvgates(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hvlvgates; if (!buffer.str().empty()) @@ -387,7 +385,8 @@ bool get_ExcAC1A_hvlvgates(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcAC1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -401,7 +400,8 @@ bool get_ExcAC1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -415,7 +415,8 @@ bool get_ExcAC1A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -429,7 +430,8 @@ bool get_ExcAC1A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -443,7 +445,8 @@ bool get_ExcAC1A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -457,7 +460,8 @@ bool get_ExcAC1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_kf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf1; if (!buffer.str().empty()) @@ -471,7 +475,8 @@ bool get_ExcAC1A_kf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf2; if (!buffer.str().empty()) @@ -485,7 +490,8 @@ bool get_ExcAC1A_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -499,7 +505,8 @@ bool get_ExcAC1A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -513,7 +520,8 @@ bool get_ExcAC1A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC1A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -527,7 +535,8 @@ bool get_ExcAC1A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -541,7 +550,8 @@ bool get_ExcAC1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -555,7 +565,8 @@ bool get_ExcAC1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -569,7 +580,8 @@ bool get_ExcAC1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -583,7 +595,8 @@ bool get_ExcAC1A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -597,7 +610,8 @@ bool get_ExcAC1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -611,7 +625,8 @@ bool get_ExcAC1A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC1A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -625,7 +640,8 @@ bool get_ExcAC1A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC1A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -639,7 +655,8 @@ bool get_ExcAC1A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -653,7 +670,8 @@ bool get_ExcAC1A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -667,7 +685,8 @@ bool get_ExcAC1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -679,8 +698,6 @@ bool get_ExcAC1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcAC1A::debugName[] = "ExcAC1A"; const char* ExcAC1A::debugString() const { @@ -689,33 +706,33 @@ const char* ExcAC1A::debugString() const void ExcAC1A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAC1A"), &ExcAC1A_factory)); + factory_map.emplace("cim:ExcAC1A", &ExcAC1A_factory); } void ExcAC1A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.hvlvgates"), &assign_ExcAC1A_hvlvgates)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.ka"), &assign_ExcAC1A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.kc"), &assign_ExcAC1A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.kd"), &assign_ExcAC1A_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.ke"), &assign_ExcAC1A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.kf"), &assign_ExcAC1A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.kf1"), &assign_ExcAC1A_kf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.kf2"), &assign_ExcAC1A_kf2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.ks"), &assign_ExcAC1A_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.seve1"), &assign_ExcAC1A_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.seve2"), &assign_ExcAC1A_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.ta"), &assign_ExcAC1A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.tb"), &assign_ExcAC1A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.tc"), &assign_ExcAC1A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.te"), &assign_ExcAC1A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.tf"), &assign_ExcAC1A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.vamax"), &assign_ExcAC1A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.vamin"), &assign_ExcAC1A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.ve1"), &assign_ExcAC1A_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.ve2"), &assign_ExcAC1A_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.vrmax"), &assign_ExcAC1A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC1A.vrmin"), &assign_ExcAC1A_vrmin)); + assign_map.emplace("cim:ExcAC1A.hvlvgates", &assign_ExcAC1A_hvlvgates); + assign_map.emplace("cim:ExcAC1A.ka", &assign_ExcAC1A_ka); + assign_map.emplace("cim:ExcAC1A.kc", &assign_ExcAC1A_kc); + assign_map.emplace("cim:ExcAC1A.kd", &assign_ExcAC1A_kd); + assign_map.emplace("cim:ExcAC1A.ke", &assign_ExcAC1A_ke); + assign_map.emplace("cim:ExcAC1A.kf", &assign_ExcAC1A_kf); + assign_map.emplace("cim:ExcAC1A.kf1", &assign_ExcAC1A_kf1); + assign_map.emplace("cim:ExcAC1A.kf2", &assign_ExcAC1A_kf2); + assign_map.emplace("cim:ExcAC1A.ks", &assign_ExcAC1A_ks); + assign_map.emplace("cim:ExcAC1A.seve1", &assign_ExcAC1A_seve1); + assign_map.emplace("cim:ExcAC1A.seve2", &assign_ExcAC1A_seve2); + assign_map.emplace("cim:ExcAC1A.ta", &assign_ExcAC1A_ta); + assign_map.emplace("cim:ExcAC1A.tb", &assign_ExcAC1A_tb); + assign_map.emplace("cim:ExcAC1A.tc", &assign_ExcAC1A_tc); + assign_map.emplace("cim:ExcAC1A.te", &assign_ExcAC1A_te); + assign_map.emplace("cim:ExcAC1A.tf", &assign_ExcAC1A_tf); + assign_map.emplace("cim:ExcAC1A.vamax", &assign_ExcAC1A_vamax); + assign_map.emplace("cim:ExcAC1A.vamin", &assign_ExcAC1A_vamin); + assign_map.emplace("cim:ExcAC1A.ve1", &assign_ExcAC1A_ve1); + assign_map.emplace("cim:ExcAC1A.ve2", &assign_ExcAC1A_ve2); + assign_map.emplace("cim:ExcAC1A.vrmax", &assign_ExcAC1A_vrmax); + assign_map.emplace("cim:ExcAC1A.vrmin", &assign_ExcAC1A_vrmin); } void ExcAC1A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcAC1A.hpp b/CGMES_3.0.0/ExcAC1A.hpp index d23533009..37fe168ea 100644 --- a/CGMES_3.0.0/ExcAC1A.hpp +++ b/CGMES_3.0.0/ExcAC1A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE AC1A alternator-supplied rectifier excitation system with different rate feedback source. - */ + /** \brief Modified IEEE AC1A alternator-supplied rectifier excitation system with different rate feedback source. */ class ExcAC1A : public ExcitationSystemDynamics { public: @@ -30,28 +28,71 @@ namespace CIMPP ExcAC1A(); ~ExcAC1A() override; - CIMPP::Boolean hvlvgates; /* Indicates if both HV gate and LV gate are active (<i>HVLVgates</i>). true = gates are used false = gates are not used. Typical value = true. Default: false */ - CIMPP::PU ka; /* Voltage regulator gain (<i>Ka</i>) (&gt; 0). Typical value = 400. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (<i>Kc</i>) (&gt;= 0). Typical value = 0,2. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (<i>Kd</i>) (&gt;= 0). Typical value = 0,38. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (<i>Ke</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (<i>Kf</i>) (&gt;= 0). Typical value = 0,03. Default: nullptr */ - CIMPP::PU kf1; /* Coefficient to allow different usage of the model (<i>Kf1</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::PU kf2; /* Coefficient to allow different usage of the model (<i>Kf2</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (<i>Ks</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, <i>Ve</i><i><sub>1</sub></i>, back of commutating reactance (<i>Se[Ve</i><i><sub>1</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,1. Default: 0.0 */ - CIMPP::Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, <i>Ve</i><i><sub>2</sub></i>, back of commutating reactance (<i>Se[Ve</i><i><sub>2</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,03. Default: 0.0 */ - CIMPP::Seconds ta; /* Voltage regulator time constant (<i>Ta</i>) (&gt; 0). Typical value = 0,02. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (<i>Tb</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (<i>T</i><i><sub>c</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (<i>Te</i>) (&gt; 0). Typical value = 0,8. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (<i>Tf</i>) (&gt; 0). Typical value = 1. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (<i>V</i><i><sub>amax</sub></i>) (&gt; 0). Typical value = 14,5. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (<i>V</i><i><sub>amin</sub></i>) (&lt; 0). Typical value = -14,5. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>Ve1</i>) (&gt; 0). Typical value = 4,18. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>Ve2</i>) (&gt; 0). Typical value = 3,14. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator outputs (<i>Vrmax</i>) (&gt; 0). Typical value = 6,03. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator outputs (<i>Vrmin</i>) (&lt; 0). Typical value = -5,43. Default: nullptr */ + /** \brief Indicates if both HV gate and LV gate are active (<i>HVLVgates</i>). true = gates are used false = gates are not used. Typical value = true. Default: false */ + CIMPP::Boolean hvlvgates; + + /** \brief Voltage regulator gain (<i>Ka</i>) (&gt; 0). Typical value = 400. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (<i>Kc</i>) (&gt;= 0). Typical value = 0,2. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (<i>Kd</i>) (&gt;= 0). Typical value = 0,38. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter constant related to self-excited field (<i>Ke</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (<i>Kf</i>) (&gt;= 0). Typical value = 0,03. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Coefficient to allow different usage of the model (<i>Kf1</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::PU kf1; + + /** \brief Coefficient to allow different usage of the model (<i>Kf2</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::PU kf2; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (<i>Ks</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>Ve</i><i><sub>1</sub></i>, back of commutating reactance (<i>Se[Ve</i><i><sub>1</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,1. Default: 0.0 */ + CIMPP::Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>Ve</i><i><sub>2</sub></i>, back of commutating reactance (<i>Se[Ve</i><i><sub>2</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,03. Default: 0.0 */ + CIMPP::Float seve2; + + /** \brief Voltage regulator time constant (<i>Ta</i>) (&gt; 0). Typical value = 0,02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (<i>Tb</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>c</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (<i>Te</i>) (&gt; 0). Typical value = 0,8. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (<i>Tf</i>) (&gt; 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage regulator output (<i>V</i><i><sub>amax</sub></i>) (&gt; 0). Typical value = 14,5. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (<i>V</i><i><sub>amin</sub></i>) (&lt; 0). Typical value = -14,5. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>Ve1</i>) (&gt; 0). Typical value = 4,18. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>Ve2</i>) (&gt; 0). Typical value = 3,14. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Maximum voltage regulator outputs (<i>Vrmax</i>) (&gt; 0). Typical value = 6,03. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator outputs (<i>Vrmin</i>) (&lt; 0). Typical value = -5,43. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcAC2A.cpp b/CGMES_3.0.0/ExcAC2A.cpp index abacf5f03..733be71b2 100644 --- a/CGMES_3.0.0/ExcAC2A.cpp +++ b/CGMES_3.0.0/ExcAC2A.cpp @@ -8,39 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAC2A::ExcAC2A() {}; -ExcAC2A::~ExcAC2A() {}; +ExcAC2A::ExcAC2A() {} +ExcAC2A::~ExcAC2A() {} static const std::list PossibleProfilesForClass = { @@ -94,376 +66,402 @@ ExcAC2A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAC2A_hvgate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_hvgate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->hvgate; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_kb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_kb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_kb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_kb1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kb1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_kh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_kl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_kl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_kl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_kl1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_lvgate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_lvgate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lvgate; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_vfemax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfemax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_vlr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_vlr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vlr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC2A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC2A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAC2A_hvgate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hvgate; if (!buffer.str().empty()) @@ -477,7 +475,8 @@ bool get_ExcAC2A_hvgate(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcAC2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -491,7 +490,8 @@ bool get_ExcAC2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_kb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kb; if (!buffer.str().empty()) @@ -505,7 +505,8 @@ bool get_ExcAC2A_kb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_kb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kb1; if (!buffer.str().empty()) @@ -519,7 +520,8 @@ bool get_ExcAC2A_kb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -533,7 +535,8 @@ bool get_ExcAC2A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -547,7 +550,8 @@ bool get_ExcAC2A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -561,7 +565,8 @@ bool get_ExcAC2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -575,7 +580,8 @@ bool get_ExcAC2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh; if (!buffer.str().empty()) @@ -589,7 +595,8 @@ bool get_ExcAC2A_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl; if (!buffer.str().empty()) @@ -603,7 +610,8 @@ bool get_ExcAC2A_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_kl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl1; if (!buffer.str().empty()) @@ -617,7 +625,8 @@ bool get_ExcAC2A_kl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -631,7 +640,8 @@ bool get_ExcAC2A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_lvgate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lvgate; if (!buffer.str().empty()) @@ -645,7 +655,8 @@ bool get_ExcAC2A_lvgate(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcAC2A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -659,7 +670,8 @@ bool get_ExcAC2A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC2A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -673,7 +685,8 @@ bool get_ExcAC2A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -687,7 +700,8 @@ bool get_ExcAC2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -701,7 +715,8 @@ bool get_ExcAC2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -715,7 +730,8 @@ bool get_ExcAC2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -729,7 +745,8 @@ bool get_ExcAC2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -743,7 +760,8 @@ bool get_ExcAC2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -757,7 +775,8 @@ bool get_ExcAC2A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC2A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -771,7 +790,8 @@ bool get_ExcAC2A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC2A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -785,7 +805,8 @@ bool get_ExcAC2A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -799,7 +820,8 @@ bool get_ExcAC2A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfemax; if (!buffer.str().empty()) @@ -813,7 +835,8 @@ bool get_ExcAC2A_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcAC2A_vlr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vlr; if (!buffer.str().empty()) @@ -827,7 +850,8 @@ bool get_ExcAC2A_vlr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -841,7 +865,8 @@ bool get_ExcAC2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -853,8 +878,6 @@ bool get_ExcAC2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcAC2A::debugName[] = "ExcAC2A"; const char* ExcAC2A::debugString() const { @@ -863,39 +886,39 @@ const char* ExcAC2A::debugString() const void ExcAC2A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAC2A"), &ExcAC2A_factory)); + factory_map.emplace("cim:ExcAC2A", &ExcAC2A_factory); } void ExcAC2A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.hvgate"), &assign_ExcAC2A_hvgate)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.ka"), &assign_ExcAC2A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.kb"), &assign_ExcAC2A_kb)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.kb1"), &assign_ExcAC2A_kb1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.kc"), &assign_ExcAC2A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.kd"), &assign_ExcAC2A_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.ke"), &assign_ExcAC2A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.kf"), &assign_ExcAC2A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.kh"), &assign_ExcAC2A_kh)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.kl"), &assign_ExcAC2A_kl)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.kl1"), &assign_ExcAC2A_kl1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.ks"), &assign_ExcAC2A_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.lvgate"), &assign_ExcAC2A_lvgate)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.seve1"), &assign_ExcAC2A_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.seve2"), &assign_ExcAC2A_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.ta"), &assign_ExcAC2A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.tb"), &assign_ExcAC2A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.tc"), &assign_ExcAC2A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.te"), &assign_ExcAC2A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.tf"), &assign_ExcAC2A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.vamax"), &assign_ExcAC2A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.vamin"), &assign_ExcAC2A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.ve1"), &assign_ExcAC2A_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.ve2"), &assign_ExcAC2A_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.vfemax"), &assign_ExcAC2A_vfemax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.vlr"), &assign_ExcAC2A_vlr)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.vrmax"), &assign_ExcAC2A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC2A.vrmin"), &assign_ExcAC2A_vrmin)); + assign_map.emplace("cim:ExcAC2A.hvgate", &assign_ExcAC2A_hvgate); + assign_map.emplace("cim:ExcAC2A.ka", &assign_ExcAC2A_ka); + assign_map.emplace("cim:ExcAC2A.kb", &assign_ExcAC2A_kb); + assign_map.emplace("cim:ExcAC2A.kb1", &assign_ExcAC2A_kb1); + assign_map.emplace("cim:ExcAC2A.kc", &assign_ExcAC2A_kc); + assign_map.emplace("cim:ExcAC2A.kd", &assign_ExcAC2A_kd); + assign_map.emplace("cim:ExcAC2A.ke", &assign_ExcAC2A_ke); + assign_map.emplace("cim:ExcAC2A.kf", &assign_ExcAC2A_kf); + assign_map.emplace("cim:ExcAC2A.kh", &assign_ExcAC2A_kh); + assign_map.emplace("cim:ExcAC2A.kl", &assign_ExcAC2A_kl); + assign_map.emplace("cim:ExcAC2A.kl1", &assign_ExcAC2A_kl1); + assign_map.emplace("cim:ExcAC2A.ks", &assign_ExcAC2A_ks); + assign_map.emplace("cim:ExcAC2A.lvgate", &assign_ExcAC2A_lvgate); + assign_map.emplace("cim:ExcAC2A.seve1", &assign_ExcAC2A_seve1); + assign_map.emplace("cim:ExcAC2A.seve2", &assign_ExcAC2A_seve2); + assign_map.emplace("cim:ExcAC2A.ta", &assign_ExcAC2A_ta); + assign_map.emplace("cim:ExcAC2A.tb", &assign_ExcAC2A_tb); + assign_map.emplace("cim:ExcAC2A.tc", &assign_ExcAC2A_tc); + assign_map.emplace("cim:ExcAC2A.te", &assign_ExcAC2A_te); + assign_map.emplace("cim:ExcAC2A.tf", &assign_ExcAC2A_tf); + assign_map.emplace("cim:ExcAC2A.vamax", &assign_ExcAC2A_vamax); + assign_map.emplace("cim:ExcAC2A.vamin", &assign_ExcAC2A_vamin); + assign_map.emplace("cim:ExcAC2A.ve1", &assign_ExcAC2A_ve1); + assign_map.emplace("cim:ExcAC2A.ve2", &assign_ExcAC2A_ve2); + assign_map.emplace("cim:ExcAC2A.vfemax", &assign_ExcAC2A_vfemax); + assign_map.emplace("cim:ExcAC2A.vlr", &assign_ExcAC2A_vlr); + assign_map.emplace("cim:ExcAC2A.vrmax", &assign_ExcAC2A_vrmax); + assign_map.emplace("cim:ExcAC2A.vrmin", &assign_ExcAC2A_vrmin); } void ExcAC2A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcAC2A.hpp b/CGMES_3.0.0/ExcAC2A.hpp index 7eef0f608..103b197c3 100644 --- a/CGMES_3.0.0/ExcAC2A.hpp +++ b/CGMES_3.0.0/ExcAC2A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE AC2A alternator-supplied rectifier excitation system with different field current limit. - */ + /** \brief Modified IEEE AC2A alternator-supplied rectifier excitation system with different field current limit. */ class ExcAC2A : public ExcitationSystemDynamics { public: @@ -30,34 +28,89 @@ namespace CIMPP ExcAC2A(); ~ExcAC2A() override; - CIMPP::Boolean hvgate; /* Indicates if HV gate is active (<i>HVgate</i>). true = gate is used false = gate is not used. Typical value = true. Default: false */ - CIMPP::PU ka; /* Voltage regulator gain (<i>Ka</i>) (&gt; 0). Typical value = 400. Default: nullptr */ - CIMPP::PU kb; /* Second stage regulator gain (<i>Kb</i>) (&gt; 0). Exciter field current controller gain. Typical value = 25. Default: nullptr */ - CIMPP::PU kb1; /* Second stage regulator gain (<i>Kb1</i>). It is exciter field current controller gain used as alternative to <i>Kb</i> to represent a variant of the ExcAC2A model. Typical value = 25. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (<i>Kc</i>) (&gt;= 0). Typical value = 0,28. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (<i>Kd</i>) (&gt;= 0). Typical value = 0,35. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (<i>Ke</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (<i>Kf</i>) (&gt;= 0). Typical value = 0,03. Default: nullptr */ - CIMPP::PU kh; /* Exciter field current feedback gain (<i>Kh</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::PU kl; /* Exciter field current limiter gain (<i>Kl</i>). Typical value = 10. Default: nullptr */ - CIMPP::PU kl1; /* Coefficient to allow different usage of the model (<i>Kl1</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (<i>Ks</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Boolean lvgate; /* Indicates if LV gate is active (<i>LVgate</i>). true = gate is used false = gate is not used. Typical value = true. Default: false */ - CIMPP::Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, <i>Ve</i><i><sub>1</sub></i>, back of commutating reactance (<i>Se[Ve</i><i><sub>1</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,037. Default: 0.0 */ - CIMPP::Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, <i>Ve</i><i><sub>2</sub></i>, back of commutating reactance (<i>Se[Ve</i><i><sub>2</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,012. Default: 0.0 */ - CIMPP::Seconds ta; /* Voltage regulator time constant (<i>Ta</i>) (&gt; 0). Typical value = 0,02. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (<i>Tb</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (<i>Tc</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (<i>Te</i>) (&gt; 0). Typical value = 0,6. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (<i>Tf</i>) (&gt; 0). Typical value = 1. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (<i>Vamax</i>) (&gt; 0). Typical value = 8. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (<i>Vamin</i>) (&lt; 0). Typical value = -8. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>Ve</i><i><sub>1</sub></i>) (&gt; 0). Typical value = 4,4. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>Ve</i><i><sub>2</sub></i>) (&gt; 0). Typical value = 3,3. Default: nullptr */ - CIMPP::PU vfemax; /* Exciter field current limit reference (<i>Vfemax</i>) (&gt;= 0). Typical value = 4,4. Default: nullptr */ - CIMPP::PU vlr; /* Maximum exciter field current (<i>Vlr</i>) (&gt; 0). Typical value = 4,4. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator outputs (<i>Vrmax</i>) (&gt; 0). Typical value = 105. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator outputs (<i>Vrmin</i>) (&lt; 0). Typical value = -95. Default: nullptr */ + /** \brief Indicates if HV gate is active (<i>HVgate</i>). true = gate is used false = gate is not used. Typical value = true. Default: false */ + CIMPP::Boolean hvgate; + + /** \brief Voltage regulator gain (<i>Ka</i>) (&gt; 0). Typical value = 400. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Second stage regulator gain (<i>Kb</i>) (&gt; 0). Exciter field current controller gain. Typical value = 25. Default: nullptr */ + CIMPP::PU kb; + + /** \brief Second stage regulator gain (<i>Kb1</i>). It is exciter field current controller gain used as alternative to <i>Kb</i> to represent a variant of the ExcAC2A model. Typical value = 25. Default: nullptr */ + CIMPP::PU kb1; + + /** \brief Rectifier loading factor proportional to commutating reactance (<i>Kc</i>) (&gt;= 0). Typical value = 0,28. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (<i>Kd</i>) (&gt;= 0). Typical value = 0,35. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter constant related to self-excited field (<i>Ke</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (<i>Kf</i>) (&gt;= 0). Typical value = 0,03. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Exciter field current feedback gain (<i>Kh</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::PU kh; + + /** \brief Exciter field current limiter gain (<i>Kl</i>). Typical value = 10. Default: nullptr */ + CIMPP::PU kl; + + /** \brief Coefficient to allow different usage of the model (<i>Kl1</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU kl1; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (<i>Ks</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Indicates if LV gate is active (<i>LVgate</i>). true = gate is used false = gate is not used. Typical value = true. Default: false */ + CIMPP::Boolean lvgate; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>Ve</i><i><sub>1</sub></i>, back of commutating reactance (<i>Se[Ve</i><i><sub>1</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,037. Default: 0.0 */ + CIMPP::Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>Ve</i><i><sub>2</sub></i>, back of commutating reactance (<i>Se[Ve</i><i><sub>2</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,012. Default: 0.0 */ + CIMPP::Float seve2; + + /** \brief Voltage regulator time constant (<i>Ta</i>) (&gt; 0). Typical value = 0,02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (<i>Tb</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (<i>Tc</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (<i>Te</i>) (&gt; 0). Typical value = 0,6. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (<i>Tf</i>) (&gt; 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage regulator output (<i>Vamax</i>) (&gt; 0). Typical value = 8. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (<i>Vamin</i>) (&lt; 0). Typical value = -8. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>Ve</i><i><sub>1</sub></i>) (&gt; 0). Typical value = 4,4. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>Ve</i><i><sub>2</sub></i>) (&gt; 0). Typical value = 3,3. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Exciter field current limit reference (<i>Vfemax</i>) (&gt;= 0). Typical value = 4,4. Default: nullptr */ + CIMPP::PU vfemax; + + /** \brief Maximum exciter field current (<i>Vlr</i>) (&gt; 0). Typical value = 4,4. Default: nullptr */ + CIMPP::PU vlr; + + /** \brief Maximum voltage regulator outputs (<i>Vrmax</i>) (&gt; 0). Typical value = 105. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator outputs (<i>Vrmin</i>) (&lt; 0). Typical value = -95. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcAC3A.cpp b/CGMES_3.0.0/ExcAC3A.cpp index 8fdad80b4..254577cfa 100644 --- a/CGMES_3.0.0/ExcAC3A.cpp +++ b/CGMES_3.0.0/ExcAC3A.cpp @@ -8,37 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAC3A::ExcAC3A() {}; -ExcAC3A::~ExcAC3A() {}; +ExcAC3A::ExcAC3A() {} +ExcAC3A::~ExcAC3A() {} static const std::list PossibleProfilesForClass = { @@ -90,350 +64,374 @@ ExcAC3A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAC3A_efdn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_efdn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_kf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_kf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_kf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_kf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_klv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_klv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->klv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_kn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_kn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_kr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_kr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_vemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_vemin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vemin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_vfemax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfemax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC3A_vlv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC3A_vlv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vlv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAC3A_efdn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdn; if (!buffer.str().empty()) @@ -447,7 +445,8 @@ bool get_ExcAC3A_efdn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAC3A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -461,7 +460,8 @@ bool get_ExcAC3A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -475,7 +475,8 @@ bool get_ExcAC3A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -489,7 +490,8 @@ bool get_ExcAC3A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -503,7 +505,8 @@ bool get_ExcAC3A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -517,7 +520,8 @@ bool get_ExcAC3A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_kf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf1; if (!buffer.str().empty()) @@ -531,7 +535,8 @@ bool get_ExcAC3A_kf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf2; if (!buffer.str().empty()) @@ -545,7 +550,8 @@ bool get_ExcAC3A_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_klv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->klv; if (!buffer.str().empty()) @@ -559,7 +565,8 @@ bool get_ExcAC3A_klv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_kn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kn; if (!buffer.str().empty()) @@ -573,7 +580,8 @@ bool get_ExcAC3A_kn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_kr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kr; if (!buffer.str().empty()) @@ -587,7 +595,8 @@ bool get_ExcAC3A_kr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -601,7 +610,8 @@ bool get_ExcAC3A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -615,7 +625,8 @@ bool get_ExcAC3A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC3A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -629,7 +640,8 @@ bool get_ExcAC3A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC3A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -643,7 +655,8 @@ bool get_ExcAC3A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -657,7 +670,8 @@ bool get_ExcAC3A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -671,7 +685,8 @@ bool get_ExcAC3A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -685,7 +700,8 @@ bool get_ExcAC3A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -699,7 +715,8 @@ bool get_ExcAC3A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -713,7 +730,8 @@ bool get_ExcAC3A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC3A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -727,7 +745,8 @@ bool get_ExcAC3A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC3A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -741,7 +760,8 @@ bool get_ExcAC3A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -755,7 +775,8 @@ bool get_ExcAC3A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC3A_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vemin; if (!buffer.str().empty()) @@ -769,7 +790,8 @@ bool get_ExcAC3A_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC3A_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfemax; if (!buffer.str().empty()) @@ -783,7 +805,8 @@ bool get_ExcAC3A_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcAC3A_vlv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vlv; if (!buffer.str().empty()) @@ -795,8 +818,6 @@ bool get_ExcAC3A_vlv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcAC3A::debugName[] = "ExcAC3A"; const char* ExcAC3A::debugString() const { @@ -805,37 +826,37 @@ const char* ExcAC3A::debugString() const void ExcAC3A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAC3A"), &ExcAC3A_factory)); + factory_map.emplace("cim:ExcAC3A", &ExcAC3A_factory); } void ExcAC3A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.efdn"), &assign_ExcAC3A_efdn)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.ka"), &assign_ExcAC3A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.kc"), &assign_ExcAC3A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.kd"), &assign_ExcAC3A_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.ke"), &assign_ExcAC3A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.kf"), &assign_ExcAC3A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.kf1"), &assign_ExcAC3A_kf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.kf2"), &assign_ExcAC3A_kf2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.klv"), &assign_ExcAC3A_klv)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.kn"), &assign_ExcAC3A_kn)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.kr"), &assign_ExcAC3A_kr)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.ks"), &assign_ExcAC3A_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.seve1"), &assign_ExcAC3A_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.seve2"), &assign_ExcAC3A_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.ta"), &assign_ExcAC3A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.tb"), &assign_ExcAC3A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.tc"), &assign_ExcAC3A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.te"), &assign_ExcAC3A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.tf"), &assign_ExcAC3A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.vamax"), &assign_ExcAC3A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.vamin"), &assign_ExcAC3A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.ve1"), &assign_ExcAC3A_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.ve2"), &assign_ExcAC3A_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.vemin"), &assign_ExcAC3A_vemin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.vfemax"), &assign_ExcAC3A_vfemax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC3A.vlv"), &assign_ExcAC3A_vlv)); + assign_map.emplace("cim:ExcAC3A.efdn", &assign_ExcAC3A_efdn); + assign_map.emplace("cim:ExcAC3A.ka", &assign_ExcAC3A_ka); + assign_map.emplace("cim:ExcAC3A.kc", &assign_ExcAC3A_kc); + assign_map.emplace("cim:ExcAC3A.kd", &assign_ExcAC3A_kd); + assign_map.emplace("cim:ExcAC3A.ke", &assign_ExcAC3A_ke); + assign_map.emplace("cim:ExcAC3A.kf", &assign_ExcAC3A_kf); + assign_map.emplace("cim:ExcAC3A.kf1", &assign_ExcAC3A_kf1); + assign_map.emplace("cim:ExcAC3A.kf2", &assign_ExcAC3A_kf2); + assign_map.emplace("cim:ExcAC3A.klv", &assign_ExcAC3A_klv); + assign_map.emplace("cim:ExcAC3A.kn", &assign_ExcAC3A_kn); + assign_map.emplace("cim:ExcAC3A.kr", &assign_ExcAC3A_kr); + assign_map.emplace("cim:ExcAC3A.ks", &assign_ExcAC3A_ks); + assign_map.emplace("cim:ExcAC3A.seve1", &assign_ExcAC3A_seve1); + assign_map.emplace("cim:ExcAC3A.seve2", &assign_ExcAC3A_seve2); + assign_map.emplace("cim:ExcAC3A.ta", &assign_ExcAC3A_ta); + assign_map.emplace("cim:ExcAC3A.tb", &assign_ExcAC3A_tb); + assign_map.emplace("cim:ExcAC3A.tc", &assign_ExcAC3A_tc); + assign_map.emplace("cim:ExcAC3A.te", &assign_ExcAC3A_te); + assign_map.emplace("cim:ExcAC3A.tf", &assign_ExcAC3A_tf); + assign_map.emplace("cim:ExcAC3A.vamax", &assign_ExcAC3A_vamax); + assign_map.emplace("cim:ExcAC3A.vamin", &assign_ExcAC3A_vamin); + assign_map.emplace("cim:ExcAC3A.ve1", &assign_ExcAC3A_ve1); + assign_map.emplace("cim:ExcAC3A.ve2", &assign_ExcAC3A_ve2); + assign_map.emplace("cim:ExcAC3A.vemin", &assign_ExcAC3A_vemin); + assign_map.emplace("cim:ExcAC3A.vfemax", &assign_ExcAC3A_vfemax); + assign_map.emplace("cim:ExcAC3A.vlv", &assign_ExcAC3A_vlv); } void ExcAC3A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcAC3A.hpp b/CGMES_3.0.0/ExcAC3A.hpp index eb5701307..f78564695 100644 --- a/CGMES_3.0.0/ExcAC3A.hpp +++ b/CGMES_3.0.0/ExcAC3A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE AC3A alternator-supplied rectifier excitation system with different field current limit. - */ + /** \brief Modified IEEE AC3A alternator-supplied rectifier excitation system with different field current limit. */ class ExcAC3A : public ExcitationSystemDynamics { public: @@ -29,32 +27,83 @@ namespace CIMPP ExcAC3A(); ~ExcAC3A() override; - CIMPP::PU efdn; /* Value of <i>Efd </i>at which feedback gain changes (<i>Efdn</i>) (&gt; 0). Typical value = 2,36. Default: nullptr */ - CIMPP::Seconds ka; /* Voltage regulator gain (<i>Ka</i>) (&gt; 0). Typical value = 45,62. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (<i>Kc</i>) (&gt;= 0). Typical value = 0,104. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (<i>Kd</i>) (&gt;= 0). Typical value = 0,499. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (<i>Ke</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (<i>Kf</i>) (&gt;= 0). Typical value = 0,143. Default: nullptr */ - CIMPP::PU kf1; /* Coefficient to allow different usage of the model (<i>Kf1</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU kf2; /* Coefficient to allow different usage of the model (<i>Kf2</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU klv; /* Gain used in the minimum field voltage limiter loop (<i>Klv</i>). Typical value = 0,194. Default: nullptr */ - CIMPP::PU kn; /* Excitation control system stabilizer gain (<i>Kn</i>) (&gt;= 0). Typical value =0,05. Default: nullptr */ - CIMPP::PU kr; /* Constant associated with regulator and alternator field power supply (<i>Kr</i>) (&gt; 0). Typical value =3,77. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (<i>Ks</i>). Typical value = 0. Default: nullptr */ - CIMPP::Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, <i>Ve</i><i><sub>1</sub></i>, back of commutating reactance (<i>Se[Ve</i><i><sub>1</sub></i><i>]</i>) (&gt;= 0). Typical value = 1,143. Default: 0.0 */ - CIMPP::Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, <i>Ve</i><i><sub>2</sub></i>, back of commutating reactance (<i>Se[Ve</i><i><sub>2</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,1. Default: 0.0 */ - CIMPP::PU ta; /* Voltage regulator time constant (<i>Ta</i>) (&gt; 0). Typical value = 0,013. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (<i>Tb</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (<i>Tc</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (<i>Te</i>) (&gt; 0). Typical value = 1,17. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (<i>Tf</i>) (&gt; 0). Typical value = 1. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (<i>Vamax</i>) (&gt; 0). Typical value = 1. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (<i>Vamin</i>) (&lt; 0). Typical value = -0,95. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>Ve</i><i><sub>1</sub></i>) (&gt; 0). Typical value = 6.24. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>Ve</i><i><sub>2</sub></i>) (&gt; 0). Typical value = 4,68. Default: nullptr */ - CIMPP::PU vemin; /* Minimum exciter voltage output (<i>Vemin</i>) (&lt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::PU vfemax; /* Exciter field current limit reference (<i>Vfemax</i>) (&gt;= 0). Typical value = 16. Default: nullptr */ - CIMPP::PU vlv; /* Field voltage used in the minimum field voltage limiter loop (<i>Vlv</i>). Typical value = 0,79. Default: nullptr */ + /** \brief Value of <i>Efd </i>at which feedback gain changes (<i>Efdn</i>) (&gt; 0). Typical value = 2,36. Default: nullptr */ + CIMPP::PU efdn; + + /** \brief Voltage regulator gain (<i>Ka</i>) (&gt; 0). Typical value = 45,62. Default: nullptr */ + CIMPP::Seconds ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (<i>Kc</i>) (&gt;= 0). Typical value = 0,104. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (<i>Kd</i>) (&gt;= 0). Typical value = 0,499. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter constant related to self-excited field (<i>Ke</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (<i>Kf</i>) (&gt;= 0). Typical value = 0,143. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Coefficient to allow different usage of the model (<i>Kf1</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU kf1; + + /** \brief Coefficient to allow different usage of the model (<i>Kf2</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU kf2; + + /** \brief Gain used in the minimum field voltage limiter loop (<i>Klv</i>). Typical value = 0,194. Default: nullptr */ + CIMPP::PU klv; + + /** \brief Excitation control system stabilizer gain (<i>Kn</i>) (&gt;= 0). Typical value =0,05. Default: nullptr */ + CIMPP::PU kn; + + /** \brief Constant associated with regulator and alternator field power supply (<i>Kr</i>) (&gt; 0). Typical value =3,77. Default: nullptr */ + CIMPP::PU kr; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (<i>Ks</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>Ve</i><i><sub>1</sub></i>, back of commutating reactance (<i>Se[Ve</i><i><sub>1</sub></i><i>]</i>) (&gt;= 0). Typical value = 1,143. Default: 0.0 */ + CIMPP::Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>Ve</i><i><sub>2</sub></i>, back of commutating reactance (<i>Se[Ve</i><i><sub>2</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,1. Default: 0.0 */ + CIMPP::Float seve2; + + /** \brief Voltage regulator time constant (<i>Ta</i>) (&gt; 0). Typical value = 0,013. Default: nullptr */ + CIMPP::PU ta; + + /** \brief Voltage regulator time constant (<i>Tb</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (<i>Tc</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (<i>Te</i>) (&gt; 0). Typical value = 1,17. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (<i>Tf</i>) (&gt; 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage regulator output (<i>Vamax</i>) (&gt; 0). Typical value = 1. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (<i>Vamin</i>) (&lt; 0). Typical value = -0,95. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>Ve</i><i><sub>1</sub></i>) (&gt; 0). Typical value = 6.24. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>Ve</i><i><sub>2</sub></i>) (&gt; 0). Typical value = 4,68. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Minimum exciter voltage output (<i>Vemin</i>) (&lt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::PU vemin; + + /** \brief Exciter field current limit reference (<i>Vfemax</i>) (&gt;= 0). Typical value = 16. Default: nullptr */ + CIMPP::PU vfemax; + + /** \brief Field voltage used in the minimum field voltage limiter loop (<i>Vlv</i>). Typical value = 0,79. Default: nullptr */ + CIMPP::PU vlv; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcAC4A.cpp b/CGMES_3.0.0/ExcAC4A.cpp index f949b4ef8..ee9a03733 100644 --- a/CGMES_3.0.0/ExcAC4A.cpp +++ b/CGMES_3.0.0/ExcAC4A.cpp @@ -8,20 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAC4A::ExcAC4A() {}; -ExcAC4A::~ExcAC4A() {}; +ExcAC4A::ExcAC4A() {} +ExcAC4A::~ExcAC4A() {} static const std::list PossibleProfilesForClass = { @@ -56,129 +47,136 @@ ExcAC4A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAC4A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC4A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC4A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC4A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC4A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC4A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC4A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC4A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC4A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC4A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC4A_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC4A_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC4A_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC4A_vimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC4A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC4A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC4A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC4A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAC4A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -192,7 +190,8 @@ bool get_ExcAC4A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC4A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -206,7 +205,8 @@ bool get_ExcAC4A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC4A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -220,7 +220,8 @@ bool get_ExcAC4A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC4A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -234,7 +235,8 @@ bool get_ExcAC4A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC4A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -248,7 +250,8 @@ bool get_ExcAC4A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC4A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -262,7 +265,8 @@ bool get_ExcAC4A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC4A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimin; if (!buffer.str().empty()) @@ -276,7 +280,8 @@ bool get_ExcAC4A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC4A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -290,7 +295,8 @@ bool get_ExcAC4A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC4A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -302,8 +308,6 @@ bool get_ExcAC4A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcAC4A::debugName[] = "ExcAC4A"; const char* ExcAC4A::debugString() const { @@ -312,20 +316,20 @@ const char* ExcAC4A::debugString() const void ExcAC4A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAC4A"), &ExcAC4A_factory)); + factory_map.emplace("cim:ExcAC4A", &ExcAC4A_factory); } void ExcAC4A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAC4A.ka"), &assign_ExcAC4A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC4A.kc"), &assign_ExcAC4A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC4A.ta"), &assign_ExcAC4A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC4A.tb"), &assign_ExcAC4A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC4A.tc"), &assign_ExcAC4A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC4A.vimax"), &assign_ExcAC4A_vimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC4A.vimin"), &assign_ExcAC4A_vimin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC4A.vrmax"), &assign_ExcAC4A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC4A.vrmin"), &assign_ExcAC4A_vrmin)); + assign_map.emplace("cim:ExcAC4A.ka", &assign_ExcAC4A_ka); + assign_map.emplace("cim:ExcAC4A.kc", &assign_ExcAC4A_kc); + assign_map.emplace("cim:ExcAC4A.ta", &assign_ExcAC4A_ta); + assign_map.emplace("cim:ExcAC4A.tb", &assign_ExcAC4A_tb); + assign_map.emplace("cim:ExcAC4A.tc", &assign_ExcAC4A_tc); + assign_map.emplace("cim:ExcAC4A.vimax", &assign_ExcAC4A_vimax); + assign_map.emplace("cim:ExcAC4A.vimin", &assign_ExcAC4A_vimin); + assign_map.emplace("cim:ExcAC4A.vrmax", &assign_ExcAC4A_vrmax); + assign_map.emplace("cim:ExcAC4A.vrmin", &assign_ExcAC4A_vrmin); } void ExcAC4A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcAC4A.hpp b/CGMES_3.0.0/ExcAC4A.hpp index 4bbacec7b..0b650ee0a 100644 --- a/CGMES_3.0.0/ExcAC4A.hpp +++ b/CGMES_3.0.0/ExcAC4A.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE AC4A alternator-supplied rectifier excitation system with different minimum controller output. - */ + /** \brief Modified IEEE AC4A alternator-supplied rectifier excitation system with different minimum controller output. */ class ExcAC4A : public ExcitationSystemDynamics { public: @@ -28,15 +26,32 @@ namespace CIMPP ExcAC4A(); ~ExcAC4A() override; - CIMPP::PU ka; /* Voltage regulator gain (<i>Ka</i>) (&gt; 0). Typical value = 200. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (<i>Kc</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (<i>Ta</i>) (&gt; 0). Typical value = 0,015. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (<i>Tb</i>) (&gt;= 0). Typical value = 10. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (<i>Tc</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::PU vimax; /* Maximum voltage regulator input limit (<i>Vimax</i>) (&gt; 0). Typical value = 10. Default: nullptr */ - CIMPP::PU vimin; /* Minimum voltage regulator input limit (<i>Vimin</i>) (&lt; 0). Typical value = -10. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (<i>Vrmax</i>) (&gt; 0). Typical value = 5,64. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (<i>Vrmin</i>) (&lt; 0). Typical value = -4,53. Default: nullptr */ + /** \brief Voltage regulator gain (<i>Ka</i>) (&gt; 0). Typical value = 200. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (<i>Kc</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Voltage regulator time constant (<i>Ta</i>) (&gt; 0). Typical value = 0,015. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (<i>Tb</i>) (&gt;= 0). Typical value = 10. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (<i>Tc</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Maximum voltage regulator input limit (<i>Vimax</i>) (&gt; 0). Typical value = 10. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Minimum voltage regulator input limit (<i>Vimin</i>) (&lt; 0). Typical value = -10. Default: nullptr */ + CIMPP::PU vimin; + + /** \brief Maximum voltage regulator output (<i>Vrmax</i>) (&gt; 0). Typical value = 5,64. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (<i>Vrmin</i>) (&lt; 0). Typical value = -4,53. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcAC5A.cpp b/CGMES_3.0.0/ExcAC5A.cpp index 88fa3d83a..c0836badb 100644 --- a/CGMES_3.0.0/ExcAC5A.cpp +++ b/CGMES_3.0.0/ExcAC5A.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAC5A::ExcAC5A() {}; -ExcAC5A::~ExcAC5A() {}; +ExcAC5A::ExcAC5A() {} +ExcAC5A::~ExcAC5A() {} static const std::list PossibleProfilesForClass = { @@ -74,246 +56,262 @@ ExcAC5A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAC5A_a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_a(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_seefd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_seefd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_tf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_tf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_tf3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_tf3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC5A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC5A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAC5A_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a; if (!buffer.str().empty()) @@ -327,7 +325,8 @@ bool get_ExcAC5A_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -341,7 +340,8 @@ bool get_ExcAC5A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAC5A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -355,7 +355,8 @@ bool get_ExcAC5A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAC5A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -369,7 +370,8 @@ bool get_ExcAC5A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -383,7 +385,8 @@ bool get_ExcAC5A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -397,7 +400,8 @@ bool get_ExcAC5A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -411,7 +415,8 @@ bool get_ExcAC5A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd1; if (!buffer.str().empty()) @@ -425,7 +430,8 @@ bool get_ExcAC5A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcAC5A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd2; if (!buffer.str().empty()) @@ -439,7 +445,8 @@ bool get_ExcAC5A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcAC5A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -453,7 +460,8 @@ bool get_ExcAC5A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -467,7 +475,8 @@ bool get_ExcAC5A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -481,7 +490,8 @@ bool get_ExcAC5A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -495,7 +505,8 @@ bool get_ExcAC5A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf1; if (!buffer.str().empty()) @@ -509,7 +520,8 @@ bool get_ExcAC5A_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf2; if (!buffer.str().empty()) @@ -523,7 +535,8 @@ bool get_ExcAC5A_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_tf3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf3; if (!buffer.str().empty()) @@ -537,7 +550,8 @@ bool get_ExcAC5A_tf3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC5A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -551,7 +565,8 @@ bool get_ExcAC5A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC5A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -563,8 +578,6 @@ bool get_ExcAC5A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcAC5A::debugName[] = "ExcAC5A"; const char* ExcAC5A::debugString() const { @@ -573,29 +586,29 @@ const char* ExcAC5A::debugString() const void ExcAC5A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAC5A"), &ExcAC5A_factory)); + factory_map.emplace("cim:ExcAC5A", &ExcAC5A_factory); } void ExcAC5A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.a"), &assign_ExcAC5A_a)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.efd1"), &assign_ExcAC5A_efd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.efd2"), &assign_ExcAC5A_efd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.ka"), &assign_ExcAC5A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.ke"), &assign_ExcAC5A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.kf"), &assign_ExcAC5A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.ks"), &assign_ExcAC5A_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.seefd1"), &assign_ExcAC5A_seefd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.seefd2"), &assign_ExcAC5A_seefd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.ta"), &assign_ExcAC5A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.tb"), &assign_ExcAC5A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.tc"), &assign_ExcAC5A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.te"), &assign_ExcAC5A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.tf1"), &assign_ExcAC5A_tf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.tf2"), &assign_ExcAC5A_tf2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.tf3"), &assign_ExcAC5A_tf3)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.vrmax"), &assign_ExcAC5A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC5A.vrmin"), &assign_ExcAC5A_vrmin)); + assign_map.emplace("cim:ExcAC5A.a", &assign_ExcAC5A_a); + assign_map.emplace("cim:ExcAC5A.efd1", &assign_ExcAC5A_efd1); + assign_map.emplace("cim:ExcAC5A.efd2", &assign_ExcAC5A_efd2); + assign_map.emplace("cim:ExcAC5A.ka", &assign_ExcAC5A_ka); + assign_map.emplace("cim:ExcAC5A.ke", &assign_ExcAC5A_ke); + assign_map.emplace("cim:ExcAC5A.kf", &assign_ExcAC5A_kf); + assign_map.emplace("cim:ExcAC5A.ks", &assign_ExcAC5A_ks); + assign_map.emplace("cim:ExcAC5A.seefd1", &assign_ExcAC5A_seefd1); + assign_map.emplace("cim:ExcAC5A.seefd2", &assign_ExcAC5A_seefd2); + assign_map.emplace("cim:ExcAC5A.ta", &assign_ExcAC5A_ta); + assign_map.emplace("cim:ExcAC5A.tb", &assign_ExcAC5A_tb); + assign_map.emplace("cim:ExcAC5A.tc", &assign_ExcAC5A_tc); + assign_map.emplace("cim:ExcAC5A.te", &assign_ExcAC5A_te); + assign_map.emplace("cim:ExcAC5A.tf1", &assign_ExcAC5A_tf1); + assign_map.emplace("cim:ExcAC5A.tf2", &assign_ExcAC5A_tf2); + assign_map.emplace("cim:ExcAC5A.tf3", &assign_ExcAC5A_tf3); + assign_map.emplace("cim:ExcAC5A.vrmax", &assign_ExcAC5A_vrmax); + assign_map.emplace("cim:ExcAC5A.vrmin", &assign_ExcAC5A_vrmin); } void ExcAC5A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcAC5A.hpp b/CGMES_3.0.0/ExcAC5A.hpp index 57b8f612a..a29ed2d90 100644 --- a/CGMES_3.0.0/ExcAC5A.hpp +++ b/CGMES_3.0.0/ExcAC5A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE AC5A alternator-supplied rectifier excitation system with different minimum controller output. - */ + /** \brief Modified IEEE AC5A alternator-supplied rectifier excitation system with different minimum controller output. */ class ExcAC5A : public ExcitationSystemDynamics { public: @@ -29,24 +27,59 @@ namespace CIMPP ExcAC5A(); ~ExcAC5A() override; - CIMPP::Float a; /* Coefficient to allow different usage of the model (<i>a</i>). Typical value = 1. Default: 0.0 */ - CIMPP::PU efd1; /* Exciter voltage at which exciter saturation is defined (<i>Efd1</i>) (&gt; 0). Typical value = 5,6. Default: nullptr */ - CIMPP::PU efd2; /* Exciter voltage at which exciter saturation is defined (<i>Efd2</i>) (&gt; 0). Typical value = 4,2. Default: nullptr */ - CIMPP::PU ka; /* Voltage regulator gain (<i>Ka</i>) (&gt; 0). Typical value = 400. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (<i>Ke</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (<i>Kf</i>) (&gt;= 0). Typical value = 0,03. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (<i>Ks</i>). Typical value = 0. Default: nullptr */ - CIMPP::Float seefd1; /* Exciter saturation function value at the corresponding exciter voltage, <i>Efd</i><i><sub>1</sub></i> (<i>Se[Efd</i><i><sub>1</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,86. Default: 0.0 */ - CIMPP::Float seefd2; /* Exciter saturation function value at the corresponding exciter voltage, <i>Efd</i><i><sub>2</sub></i> (<i>Se[Efd</i><i><sub>2</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,5. Default: 0.0 */ - CIMPP::Seconds ta; /* Voltage regulator time constant (<i>Ta</i>) (&gt; 0). Typical value = 0,02. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (<i>Tb</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (<i>Tc</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (<i>Te</i>) (&gt; 0). Typical value = 0,8. Default: nullptr */ - CIMPP::Seconds tf1; /* Excitation control system stabilizer time constant (<i>Tf1</i>) (&gt; 0). Typical value = 1. Default: nullptr */ - CIMPP::Seconds tf2; /* Excitation control system stabilizer time constant (<i>Tf2</i>) (&gt;= 0). Typical value = 0,8. Default: nullptr */ - CIMPP::Seconds tf3; /* Excitation control system stabilizer time constant (<i>Tf3</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (<i>Vrmax</i>) (&gt; 0). Typical value = 7,3. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (<i>Vrmin</i>) (&lt; 0). Typical value =-7,3. Default: nullptr */ + /** \brief Coefficient to allow different usage of the model (<i>a</i>). Typical value = 1. Default: 0.0 */ + CIMPP::Float a; + + /** \brief Exciter voltage at which exciter saturation is defined (<i>Efd1</i>) (&gt; 0). Typical value = 5,6. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Exciter voltage at which exciter saturation is defined (<i>Efd2</i>) (&gt; 0). Typical value = 4,2. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief Voltage regulator gain (<i>Ka</i>) (&gt; 0). Typical value = 400. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Exciter constant related to self-excited field (<i>Ke</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (<i>Kf</i>) (&gt;= 0). Typical value = 0,03. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (<i>Ks</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>Efd</i><i><sub>1</sub></i> (<i>Se[Efd</i><i><sub>1</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,86. Default: 0.0 */ + CIMPP::Float seefd1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>Efd</i><i><sub>2</sub></i> (<i>Se[Efd</i><i><sub>2</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,5. Default: 0.0 */ + CIMPP::Float seefd2; + + /** \brief Voltage regulator time constant (<i>Ta</i>) (&gt; 0). Typical value = 0,02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (<i>Tb</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (<i>Tc</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (<i>Te</i>) (&gt; 0). Typical value = 0,8. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (<i>Tf1</i>) (&gt; 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tf1; + + /** \brief Excitation control system stabilizer time constant (<i>Tf2</i>) (&gt;= 0). Typical value = 0,8. Default: nullptr */ + CIMPP::Seconds tf2; + + /** \brief Excitation control system stabilizer time constant (<i>Tf3</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tf3; + + /** \brief Maximum voltage regulator output (<i>Vrmax</i>) (&gt; 0). Typical value = 7,3. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (<i>Vrmin</i>) (&lt; 0). Typical value =-7,3. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcAC6A.cpp b/CGMES_3.0.0/ExcAC6A.cpp index 03e807891..bcdd5fdcd 100644 --- a/CGMES_3.0.0/ExcAC6A.cpp +++ b/CGMES_3.0.0/ExcAC6A.cpp @@ -8,34 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAC6A::ExcAC6A() {}; -ExcAC6A::~ExcAC6A() {}; +ExcAC6A::ExcAC6A() {} +ExcAC6A::~ExcAC6A() {} static const std::list PossibleProfilesForClass = { @@ -84,311 +61,332 @@ ExcAC6A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAC6A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_kh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_th(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_th(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_tj(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_tj(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tj; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_tk(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_tk(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tk; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_vfelim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_vfelim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfelim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_vhmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_vhmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vhmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC6A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC6A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAC6A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -402,7 +400,8 @@ bool get_ExcAC6A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -416,7 +415,8 @@ bool get_ExcAC6A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -430,7 +430,8 @@ bool get_ExcAC6A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -444,7 +445,8 @@ bool get_ExcAC6A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh; if (!buffer.str().empty()) @@ -458,7 +460,8 @@ bool get_ExcAC6A_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -472,7 +475,8 @@ bool get_ExcAC6A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -486,7 +490,8 @@ bool get_ExcAC6A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC6A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -500,7 +505,8 @@ bool get_ExcAC6A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC6A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -514,7 +520,8 @@ bool get_ExcAC6A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -528,7 +535,8 @@ bool get_ExcAC6A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -542,7 +550,8 @@ bool get_ExcAC6A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -556,7 +565,8 @@ bool get_ExcAC6A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_th(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th; if (!buffer.str().empty()) @@ -570,7 +580,8 @@ bool get_ExcAC6A_th(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_tj(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tj; if (!buffer.str().empty()) @@ -584,7 +595,8 @@ bool get_ExcAC6A_tj(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_tk(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tk; if (!buffer.str().empty()) @@ -598,7 +610,8 @@ bool get_ExcAC6A_tk(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -612,7 +625,8 @@ bool get_ExcAC6A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC6A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -626,7 +640,8 @@ bool get_ExcAC6A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC6A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -640,7 +655,8 @@ bool get_ExcAC6A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -654,7 +670,8 @@ bool get_ExcAC6A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC6A_vfelim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfelim; if (!buffer.str().empty()) @@ -668,7 +685,8 @@ bool get_ExcAC6A_vfelim(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcAC6A_vhmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vhmax; if (!buffer.str().empty()) @@ -682,7 +700,8 @@ bool get_ExcAC6A_vhmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC6A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -696,7 +715,8 @@ bool get_ExcAC6A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC6A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -708,8 +728,6 @@ bool get_ExcAC6A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcAC6A::debugName[] = "ExcAC6A"; const char* ExcAC6A::debugString() const { @@ -718,34 +736,34 @@ const char* ExcAC6A::debugString() const void ExcAC6A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAC6A"), &ExcAC6A_factory)); + factory_map.emplace("cim:ExcAC6A", &ExcAC6A_factory); } void ExcAC6A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.ka"), &assign_ExcAC6A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.kc"), &assign_ExcAC6A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.kd"), &assign_ExcAC6A_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.ke"), &assign_ExcAC6A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.kh"), &assign_ExcAC6A_kh)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.ks"), &assign_ExcAC6A_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.seve1"), &assign_ExcAC6A_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.seve2"), &assign_ExcAC6A_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.ta"), &assign_ExcAC6A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.tb"), &assign_ExcAC6A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.tc"), &assign_ExcAC6A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.te"), &assign_ExcAC6A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.th"), &assign_ExcAC6A_th)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.tj"), &assign_ExcAC6A_tj)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.tk"), &assign_ExcAC6A_tk)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.vamax"), &assign_ExcAC6A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.vamin"), &assign_ExcAC6A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.ve1"), &assign_ExcAC6A_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.ve2"), &assign_ExcAC6A_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.vfelim"), &assign_ExcAC6A_vfelim)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.vhmax"), &assign_ExcAC6A_vhmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.vrmax"), &assign_ExcAC6A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC6A.vrmin"), &assign_ExcAC6A_vrmin)); + assign_map.emplace("cim:ExcAC6A.ka", &assign_ExcAC6A_ka); + assign_map.emplace("cim:ExcAC6A.kc", &assign_ExcAC6A_kc); + assign_map.emplace("cim:ExcAC6A.kd", &assign_ExcAC6A_kd); + assign_map.emplace("cim:ExcAC6A.ke", &assign_ExcAC6A_ke); + assign_map.emplace("cim:ExcAC6A.kh", &assign_ExcAC6A_kh); + assign_map.emplace("cim:ExcAC6A.ks", &assign_ExcAC6A_ks); + assign_map.emplace("cim:ExcAC6A.seve1", &assign_ExcAC6A_seve1); + assign_map.emplace("cim:ExcAC6A.seve2", &assign_ExcAC6A_seve2); + assign_map.emplace("cim:ExcAC6A.ta", &assign_ExcAC6A_ta); + assign_map.emplace("cim:ExcAC6A.tb", &assign_ExcAC6A_tb); + assign_map.emplace("cim:ExcAC6A.tc", &assign_ExcAC6A_tc); + assign_map.emplace("cim:ExcAC6A.te", &assign_ExcAC6A_te); + assign_map.emplace("cim:ExcAC6A.th", &assign_ExcAC6A_th); + assign_map.emplace("cim:ExcAC6A.tj", &assign_ExcAC6A_tj); + assign_map.emplace("cim:ExcAC6A.tk", &assign_ExcAC6A_tk); + assign_map.emplace("cim:ExcAC6A.vamax", &assign_ExcAC6A_vamax); + assign_map.emplace("cim:ExcAC6A.vamin", &assign_ExcAC6A_vamin); + assign_map.emplace("cim:ExcAC6A.ve1", &assign_ExcAC6A_ve1); + assign_map.emplace("cim:ExcAC6A.ve2", &assign_ExcAC6A_ve2); + assign_map.emplace("cim:ExcAC6A.vfelim", &assign_ExcAC6A_vfelim); + assign_map.emplace("cim:ExcAC6A.vhmax", &assign_ExcAC6A_vhmax); + assign_map.emplace("cim:ExcAC6A.vrmax", &assign_ExcAC6A_vrmax); + assign_map.emplace("cim:ExcAC6A.vrmin", &assign_ExcAC6A_vrmin); } void ExcAC6A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcAC6A.hpp b/CGMES_3.0.0/ExcAC6A.hpp index 70944d669..df0f3a93b 100644 --- a/CGMES_3.0.0/ExcAC6A.hpp +++ b/CGMES_3.0.0/ExcAC6A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE AC6A alternator-supplied rectifier excitation system with speed input. - */ + /** \brief Modified IEEE AC6A alternator-supplied rectifier excitation system with speed input. */ class ExcAC6A : public ExcitationSystemDynamics { public: @@ -29,29 +27,74 @@ namespace CIMPP ExcAC6A(); ~ExcAC6A() override; - CIMPP::PU ka; /* Voltage regulator gain (<i>Ka</i>) (&gt; 0). Typical value = 536. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (<i>Kc</i>) (&gt;= 0). Typical value = 0,173. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (<i>Kd</i>) (&gt;= 0). Typical value = 1,91. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (<i>Ke</i>). Typical value = 1,6. Default: nullptr */ - CIMPP::PU kh; /* Exciter field current limiter gain (<i>Kh</i>) (&gt;= 0). Typical value = 92. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (<i>Ks</i>). Typical value = 0. Default: nullptr */ - CIMPP::Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, <i>Ve</i><i><sub>1</sub></i>, back of commutating reactance (<i>Se[Ve</i><i><sub>1</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,214. Default: 0.0 */ - CIMPP::Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, <i>Ve</i><i><sub>2</sub></i>, back of commutating reactance (<i>Se[Ve</i><i><sub>2</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,044. Default: 0.0 */ - CIMPP::Seconds ta; /* Voltage regulator time constant (<i>Ta</i>) (&gt;= 0). Typical value = 0,086. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (<i>Tb</i>) (&gt;= 0). Typical value = 9. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (<i>Tc</i>) (&gt;= 0). Typical value = 3. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (<i>Te</i>) (&gt; 0). Typical value = 1. Default: nullptr */ - CIMPP::Seconds th; /* Exciter field current limiter time constant (<i>Th</i>) (&gt; 0). Typical value = 0,08. Default: nullptr */ - CIMPP::Seconds tj; /* Exciter field current limiter time constant (<i>Tj</i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ - CIMPP::Seconds tk; /* Voltage regulator time constant (<i>Tk</i>) (&gt;= 0). Typical value = 0,18. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (<i>Vamax</i>) (&gt; 0). Typical value = 75. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (<i>Vamin</i>) (&lt; 0). Typical value = -75. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>Ve</i><i><sub>1</sub></i>) (&gt; 0). Typical value = 7,4. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>Ve</i><i><sub>2</sub></i>) (&gt; 0). Typical value = 5,55. Default: nullptr */ - CIMPP::PU vfelim; /* Exciter field current limit reference (<i>Vfelim</i>) (&gt; 0). Typical value = 19. Default: nullptr */ - CIMPP::PU vhmax; /* Maximum field current limiter signal reference (<i>Vhmax</i>) (&gt; 0). Typical value = 75. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (<i>Vrmax</i>) (&gt; 0). Typical value = 44. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (<i>Vrmin</i>) (&lt; 0). Typical value = -36. Default: nullptr */ + /** \brief Voltage regulator gain (<i>Ka</i>) (&gt; 0). Typical value = 536. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (<i>Kc</i>) (&gt;= 0). Typical value = 0,173. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (<i>Kd</i>) (&gt;= 0). Typical value = 1,91. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter constant related to self-excited field (<i>Ke</i>). Typical value = 1,6. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Exciter field current limiter gain (<i>Kh</i>) (&gt;= 0). Typical value = 92. Default: nullptr */ + CIMPP::PU kh; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (<i>Ks</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>Ve</i><i><sub>1</sub></i>, back of commutating reactance (<i>Se[Ve</i><i><sub>1</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,214. Default: 0.0 */ + CIMPP::Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>Ve</i><i><sub>2</sub></i>, back of commutating reactance (<i>Se[Ve</i><i><sub>2</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,044. Default: 0.0 */ + CIMPP::Float seve2; + + /** \brief Voltage regulator time constant (<i>Ta</i>) (&gt;= 0). Typical value = 0,086. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (<i>Tb</i>) (&gt;= 0). Typical value = 9. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (<i>Tc</i>) (&gt;= 0). Typical value = 3. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (<i>Te</i>) (&gt; 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Exciter field current limiter time constant (<i>Th</i>) (&gt; 0). Typical value = 0,08. Default: nullptr */ + CIMPP::Seconds th; + + /** \brief Exciter field current limiter time constant (<i>Tj</i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ + CIMPP::Seconds tj; + + /** \brief Voltage regulator time constant (<i>Tk</i>) (&gt;= 0). Typical value = 0,18. Default: nullptr */ + CIMPP::Seconds tk; + + /** \brief Maximum voltage regulator output (<i>Vamax</i>) (&gt; 0). Typical value = 75. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (<i>Vamin</i>) (&lt; 0). Typical value = -75. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>Ve</i><i><sub>1</sub></i>) (&gt; 0). Typical value = 7,4. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>Ve</i><i><sub>2</sub></i>) (&gt; 0). Typical value = 5,55. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Exciter field current limit reference (<i>Vfelim</i>) (&gt; 0). Typical value = 19. Default: nullptr */ + CIMPP::PU vfelim; + + /** \brief Maximum field current limiter signal reference (<i>Vhmax</i>) (&gt; 0). Typical value = 75. Default: nullptr */ + CIMPP::PU vhmax; + + /** \brief Maximum voltage regulator output (<i>Vrmax</i>) (&gt; 0). Typical value = 44. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (<i>Vrmin</i>) (&lt; 0). Typical value = -36. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcAC8B.cpp b/CGMES_3.0.0/ExcAC8B.cpp index f6de9a302..d43497172 100644 --- a/CGMES_3.0.0/ExcAC8B.cpp +++ b/CGMES_3.0.0/ExcAC8B.cpp @@ -8,38 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" using namespace CIMPP; -ExcAC8B::ExcAC8B() {}; -ExcAC8B::~ExcAC8B() {}; +ExcAC8B::ExcAC8B() {} +ExcAC8B::~ExcAC8B() {} static const std::list PossibleProfilesForClass = { @@ -92,363 +65,388 @@ ExcAC8B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAC8B_inlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_inlim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inlim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_kdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_kdr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kdr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_kir(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_kir(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kir; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_kpr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_kpr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_pidlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_pidlim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pidlim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_tdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_tdr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_telim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_telim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->telim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_vemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_vemin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vemin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_vfemax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfemax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_vimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_vpidmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_vpidmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vpidmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_vpidmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_vpidmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vpidmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAC8B_vtmult(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAC8B_vtmult(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vtmult; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAC8B_inlim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inlim; if (!buffer.str().empty()) @@ -462,7 +460,8 @@ bool get_ExcAC8B_inlim(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC8B_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -476,7 +475,8 @@ bool get_ExcAC8B_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -490,7 +490,8 @@ bool get_ExcAC8B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -504,7 +505,8 @@ bool get_ExcAC8B_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_kdr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdr; if (!buffer.str().empty()) @@ -518,7 +520,8 @@ bool get_ExcAC8B_kdr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -532,7 +535,8 @@ bool get_ExcAC8B_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kir; if (!buffer.str().empty()) @@ -546,7 +550,8 @@ bool get_ExcAC8B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpr; if (!buffer.str().empty()) @@ -560,7 +565,8 @@ bool get_ExcAC8B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -574,7 +580,8 @@ bool get_ExcAC8B_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_pidlim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pidlim; if (!buffer.str().empty()) @@ -588,7 +595,8 @@ bool get_ExcAC8B_pidlim(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcAC8B_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -602,7 +610,8 @@ bool get_ExcAC8B_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC8B_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -616,7 +625,8 @@ bool get_ExcAC8B_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC8B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -630,7 +640,8 @@ bool get_ExcAC8B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_tdr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdr; if (!buffer.str().empty()) @@ -644,7 +655,8 @@ bool get_ExcAC8B_tdr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -658,7 +670,8 @@ bool get_ExcAC8B_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_telim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->telim; if (!buffer.str().empty()) @@ -672,7 +685,8 @@ bool get_ExcAC8B_telim(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC8B_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -686,7 +700,8 @@ bool get_ExcAC8B_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -700,7 +715,8 @@ bool get_ExcAC8B_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAC8B_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vemin; if (!buffer.str().empty()) @@ -714,7 +730,8 @@ bool get_ExcAC8B_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC8B_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfemax; if (!buffer.str().empty()) @@ -728,7 +745,8 @@ bool get_ExcAC8B_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcAC8B_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -742,7 +760,8 @@ bool get_ExcAC8B_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC8B_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimin; if (!buffer.str().empty()) @@ -756,7 +775,8 @@ bool get_ExcAC8B_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC8B_vpidmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vpidmax; if (!buffer.str().empty()) @@ -770,7 +790,8 @@ bool get_ExcAC8B_vpidmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcAC8B_vpidmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vpidmin; if (!buffer.str().empty()) @@ -784,7 +805,8 @@ bool get_ExcAC8B_vpidmin(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcAC8B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -798,7 +820,8 @@ bool get_ExcAC8B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC8B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -812,7 +835,8 @@ bool get_ExcAC8B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAC8B_vtmult(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vtmult; if (!buffer.str().empty()) @@ -824,8 +848,6 @@ bool get_ExcAC8B_vtmult(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char ExcAC8B::debugName[] = "ExcAC8B"; const char* ExcAC8B::debugString() const { @@ -834,38 +856,38 @@ const char* ExcAC8B::debugString() const void ExcAC8B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAC8B"), &ExcAC8B_factory)); + factory_map.emplace("cim:ExcAC8B", &ExcAC8B_factory); } void ExcAC8B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.inlim"), &assign_ExcAC8B_inlim)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.ka"), &assign_ExcAC8B_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.kc"), &assign_ExcAC8B_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.kd"), &assign_ExcAC8B_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.kdr"), &assign_ExcAC8B_kdr)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.ke"), &assign_ExcAC8B_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.kir"), &assign_ExcAC8B_kir)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.kpr"), &assign_ExcAC8B_kpr)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.ks"), &assign_ExcAC8B_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.pidlim"), &assign_ExcAC8B_pidlim)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.seve1"), &assign_ExcAC8B_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.seve2"), &assign_ExcAC8B_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.ta"), &assign_ExcAC8B_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.tdr"), &assign_ExcAC8B_tdr)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.te"), &assign_ExcAC8B_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.telim"), &assign_ExcAC8B_telim)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.ve1"), &assign_ExcAC8B_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.ve2"), &assign_ExcAC8B_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.vemin"), &assign_ExcAC8B_vemin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.vfemax"), &assign_ExcAC8B_vfemax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.vimax"), &assign_ExcAC8B_vimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.vimin"), &assign_ExcAC8B_vimin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.vpidmax"), &assign_ExcAC8B_vpidmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.vpidmin"), &assign_ExcAC8B_vpidmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.vrmax"), &assign_ExcAC8B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.vrmin"), &assign_ExcAC8B_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcAC8B.vtmult"), &assign_ExcAC8B_vtmult)); + assign_map.emplace("cim:ExcAC8B.inlim", &assign_ExcAC8B_inlim); + assign_map.emplace("cim:ExcAC8B.ka", &assign_ExcAC8B_ka); + assign_map.emplace("cim:ExcAC8B.kc", &assign_ExcAC8B_kc); + assign_map.emplace("cim:ExcAC8B.kd", &assign_ExcAC8B_kd); + assign_map.emplace("cim:ExcAC8B.kdr", &assign_ExcAC8B_kdr); + assign_map.emplace("cim:ExcAC8B.ke", &assign_ExcAC8B_ke); + assign_map.emplace("cim:ExcAC8B.kir", &assign_ExcAC8B_kir); + assign_map.emplace("cim:ExcAC8B.kpr", &assign_ExcAC8B_kpr); + assign_map.emplace("cim:ExcAC8B.ks", &assign_ExcAC8B_ks); + assign_map.emplace("cim:ExcAC8B.pidlim", &assign_ExcAC8B_pidlim); + assign_map.emplace("cim:ExcAC8B.seve1", &assign_ExcAC8B_seve1); + assign_map.emplace("cim:ExcAC8B.seve2", &assign_ExcAC8B_seve2); + assign_map.emplace("cim:ExcAC8B.ta", &assign_ExcAC8B_ta); + assign_map.emplace("cim:ExcAC8B.tdr", &assign_ExcAC8B_tdr); + assign_map.emplace("cim:ExcAC8B.te", &assign_ExcAC8B_te); + assign_map.emplace("cim:ExcAC8B.telim", &assign_ExcAC8B_telim); + assign_map.emplace("cim:ExcAC8B.ve1", &assign_ExcAC8B_ve1); + assign_map.emplace("cim:ExcAC8B.ve2", &assign_ExcAC8B_ve2); + assign_map.emplace("cim:ExcAC8B.vemin", &assign_ExcAC8B_vemin); + assign_map.emplace("cim:ExcAC8B.vfemax", &assign_ExcAC8B_vfemax); + assign_map.emplace("cim:ExcAC8B.vimax", &assign_ExcAC8B_vimax); + assign_map.emplace("cim:ExcAC8B.vimin", &assign_ExcAC8B_vimin); + assign_map.emplace("cim:ExcAC8B.vpidmax", &assign_ExcAC8B_vpidmax); + assign_map.emplace("cim:ExcAC8B.vpidmin", &assign_ExcAC8B_vpidmin); + assign_map.emplace("cim:ExcAC8B.vrmax", &assign_ExcAC8B_vrmax); + assign_map.emplace("cim:ExcAC8B.vrmin", &assign_ExcAC8B_vrmin); + assign_map.emplace("cim:ExcAC8B.vtmult", &assign_ExcAC8B_vtmult); } void ExcAC8B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcAC8B.hpp b/CGMES_3.0.0/ExcAC8B.hpp index ef77b6089..18b2f618a 100644 --- a/CGMES_3.0.0/ExcAC8B.hpp +++ b/CGMES_3.0.0/ExcAC8B.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE AC8B alternator-supplied rectifier excitation system with speed input and input limiter. - */ + /** \brief Modified IEEE AC8B alternator-supplied rectifier excitation system with speed input and input limiter. */ class ExcAC8B : public ExcitationSystemDynamics { public: @@ -30,33 +28,86 @@ namespace CIMPP ExcAC8B(); ~ExcAC8B() override; - CIMPP::Boolean inlim; /* Input limiter indicator. true = input limiter <i>Vimax</i> and <i>Vimin</i> is considered false = input limiter <i>Vimax </i>and <i>Vimin</i> is not considered. Typical value = true. Default: false */ - CIMPP::PU ka; /* Voltage regulator gain (<i>Ka</i>) (&gt; 0). Typical value = 1. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (<i>Kc</i>) (&gt;= 0). Typical value = 0,55. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (<i>Kd</i>) (&gt;= 0). Typical value = 1,1. Default: nullptr */ - CIMPP::PU kdr; /* Voltage regulator derivative gain (<i>Kdr</i>) (&gt;= 0). Typical value = 10. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (<i>Ke</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU kir; /* Voltage regulator integral gain (<i>Kir</i>) (&gt;= 0). Typical value = 5. Default: nullptr */ - CIMPP::PU kpr; /* Voltage regulator proportional gain (<i>Kpr</i>) (&gt; 0 if ExcAC8B.kir = 0). Typical value = 80. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (<i>Ks</i>). Typical value = 0. Default: nullptr */ - CIMPP::Boolean pidlim; /* PID limiter indicator. true = input limiter <i>Vpidmax</i> and <i>Vpidmin</i> is considered false = input limiter <i>Vpidmax</i> and <i>Vpidmin</i> is not considered. Typical value = true. Default: false */ - CIMPP::Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, <i>Ve</i><i><sub>1</sub></i>, back of commutating reactance (<i>Se[Ve</i><i><sub>1</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,3. Default: 0.0 */ - CIMPP::Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, <i>Ve</i><i><sub>2</sub></i>, back of commutating reactance (<i>Se[Ve</i><i><sub>2</sub></i><i>]</i>) (&gt;= 0). Typical value = 3. Default: 0.0 */ - CIMPP::Seconds ta; /* Voltage regulator time constant (<i>Ta</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tdr; /* Lag time constant (<i>Tdr</i>) (&gt; 0 if ExcAC8B.kdr &gt; 0). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (<i>Te</i>) (&gt; 0). Typical value = 1,2. Default: nullptr */ - CIMPP::Boolean telim; /* Selector for the limiter on the block (<i>1/sTe</i>). See diagram for meaning of true and false. Typical value = false. Default: false */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>Ve</i><i><sub>1</sub></i>) (&gt; 0). Typical value = 6,5. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>Ve</i><i><sub>2</sub></i>) (&gt; 0). Typical value = 9. Default: nullptr */ - CIMPP::PU vemin; /* Minimum exciter voltage output (<i>Vemin</i>) (&lt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::PU vfemax; /* Exciter field current limit reference (<i>Vfemax</i>). Typical value = 6. Default: nullptr */ - CIMPP::PU vimax; /* Input signal maximum (<i>Vimax</i>) (&gt; ExcAC8B.vimin). Typical value = 35. Default: nullptr */ - CIMPP::PU vimin; /* Input signal minimum (<i>Vimin</i>) (&lt; ExcAC8B.vimax). Typical value = -10. Default: nullptr */ - CIMPP::PU vpidmax; /* PID maximum controller output (<i>Vpidmax</i>) (&gt; ExcAC8B.vpidmin). Typical value = 35. Default: nullptr */ - CIMPP::PU vpidmin; /* PID minimum controller output (<i>Vpidmin</i>) (&lt; ExcAC8B.vpidmax). Typical value = -10. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (<i>Vrmax</i>) (&gt; 0). Typical value = 35. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (<i>Vrmin</i>) (&lt; 0). Typical value = 0. Default: nullptr */ - CIMPP::Boolean vtmult; /* Multiply by generator`s terminal voltage indicator. true =the limits <i>Vrmax</i> and <i>Vrmin</i> are multiplied by the generator`s terminal voltage to represent a thyristor power stage fed from the generator terminals false = limits are not multiplied by generator`s terminal voltage. Typical value = false. Default: false */ + /** \brief Input limiter indicator. true = input limiter <i>Vimax</i> and <i>Vimin</i> is considered false = input limiter <i>Vimax </i>and <i>Vimin</i> is not considered. Typical value = true. Default: false */ + CIMPP::Boolean inlim; + + /** \brief Voltage regulator gain (<i>Ka</i>) (&gt; 0). Typical value = 1. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (<i>Kc</i>) (&gt;= 0). Typical value = 0,55. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (<i>Kd</i>) (&gt;= 0). Typical value = 1,1. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Voltage regulator derivative gain (<i>Kdr</i>) (&gt;= 0). Typical value = 10. Default: nullptr */ + CIMPP::PU kdr; + + /** \brief Exciter constant related to self-excited field (<i>Ke</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Voltage regulator integral gain (<i>Kir</i>) (&gt;= 0). Typical value = 5. Default: nullptr */ + CIMPP::PU kir; + + /** \brief Voltage regulator proportional gain (<i>Kpr</i>) (&gt; 0 if ExcAC8B.kir = 0). Typical value = 80. Default: nullptr */ + CIMPP::PU kpr; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (<i>Ks</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief PID limiter indicator. true = input limiter <i>Vpidmax</i> and <i>Vpidmin</i> is considered false = input limiter <i>Vpidmax</i> and <i>Vpidmin</i> is not considered. Typical value = true. Default: false */ + CIMPP::Boolean pidlim; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>Ve</i><i><sub>1</sub></i>, back of commutating reactance (<i>Se[Ve</i><i><sub>1</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,3. Default: 0.0 */ + CIMPP::Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>Ve</i><i><sub>2</sub></i>, back of commutating reactance (<i>Se[Ve</i><i><sub>2</sub></i><i>]</i>) (&gt;= 0). Typical value = 3. Default: 0.0 */ + CIMPP::Float seve2; + + /** \brief Voltage regulator time constant (<i>Ta</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Lag time constant (<i>Tdr</i>) (&gt; 0 if ExcAC8B.kdr &gt; 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds tdr; + + /** \brief Exciter time constant, integration rate associated with exciter control (<i>Te</i>) (&gt; 0). Typical value = 1,2. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Selector for the limiter on the block (<i>1/sTe</i>). See diagram for meaning of true and false. Typical value = false. Default: false */ + CIMPP::Boolean telim; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>Ve</i><i><sub>1</sub></i>) (&gt; 0). Typical value = 6,5. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>Ve</i><i><sub>2</sub></i>) (&gt; 0). Typical value = 9. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Minimum exciter voltage output (<i>Vemin</i>) (&lt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::PU vemin; + + /** \brief Exciter field current limit reference (<i>Vfemax</i>). Typical value = 6. Default: nullptr */ + CIMPP::PU vfemax; + + /** \brief Input signal maximum (<i>Vimax</i>) (&gt; ExcAC8B.vimin). Typical value = 35. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Input signal minimum (<i>Vimin</i>) (&lt; ExcAC8B.vimax). Typical value = -10. Default: nullptr */ + CIMPP::PU vimin; + + /** \brief PID maximum controller output (<i>Vpidmax</i>) (&gt; ExcAC8B.vpidmin). Typical value = 35. Default: nullptr */ + CIMPP::PU vpidmax; + + /** \brief PID minimum controller output (<i>Vpidmin</i>) (&lt; ExcAC8B.vpidmax). Typical value = -10. Default: nullptr */ + CIMPP::PU vpidmin; + + /** \brief Maximum voltage regulator output (<i>Vrmax</i>) (&gt; 0). Typical value = 35. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (<i>Vrmin</i>) (&lt; 0). Typical value = 0. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief Multiply by generator`s terminal voltage indicator. true =the limits <i>Vrmax</i> and <i>Vrmin</i> are multiplied by the generator`s terminal voltage to represent a thyristor power stage fed from the generator terminals false = limits are not multiplied by generator`s terminal voltage. Typical value = false. Default: false */ + CIMPP::Boolean vtmult; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcANS.cpp b/CGMES_3.0.0/ExcANS.cpp index ac0271d8b..afc2cb7d6 100644 --- a/CGMES_3.0.0/ExcANS.cpp +++ b/CGMES_3.0.0/ExcANS.cpp @@ -8,25 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Integer.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Integer.hpp" -#include "Integer.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcANS::ExcANS() {}; -ExcANS::~ExcANS() {}; +ExcANS::ExcANS() {} +ExcANS::~ExcANS() {} static const std::list PossibleProfilesForClass = { @@ -66,194 +52,206 @@ ExcANS::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcANS_blint(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_blint(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->blint; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_ifmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_ifmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ifmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_ifmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_ifmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ifmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_kce(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_kce(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kce; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_krvecc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_krvecc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->krvecc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_kvfif(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_kvfif(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kvfif; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_vrmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_vrmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcANS_vrmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcANS_vrmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcANS* element = dynamic_cast(BaseClass_ptr1)) + ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcANS_blint(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->blint; if (!buffer.str().empty()) @@ -267,7 +265,8 @@ bool get_ExcANS_blint(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcANS_ifmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ifmn; if (!buffer.str().empty()) @@ -281,7 +280,8 @@ bool get_ExcANS_ifmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_ifmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ifmx; if (!buffer.str().empty()) @@ -295,7 +295,8 @@ bool get_ExcANS_ifmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -309,7 +310,8 @@ bool get_ExcANS_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -323,7 +325,8 @@ bool get_ExcANS_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_kce(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kce; if (!buffer.str().empty()) @@ -337,7 +340,8 @@ bool get_ExcANS_kce(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_krvecc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->krvecc; if (!buffer.str().empty()) @@ -351,7 +355,8 @@ bool get_ExcANS_krvecc(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcANS_kvfif(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kvfif; if (!buffer.str().empty()) @@ -365,7 +370,8 @@ bool get_ExcANS_kvfif(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcANS_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -379,7 +385,8 @@ bool get_ExcANS_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -393,7 +400,8 @@ bool get_ExcANS_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -407,7 +415,8 @@ bool get_ExcANS_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -421,7 +430,8 @@ bool get_ExcANS_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmn; if (!buffer.str().empty()) @@ -435,7 +445,8 @@ bool get_ExcANS_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcANS_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcANS* element = dynamic_cast(BaseClass_ptr1)) + const ExcANS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmx; if (!buffer.str().empty()) @@ -447,8 +458,6 @@ bool get_ExcANS_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcANS::debugName[] = "ExcANS"; const char* ExcANS::debugString() const { @@ -457,25 +466,25 @@ const char* ExcANS::debugString() const void ExcANS::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcANS"), &ExcANS_factory)); + factory_map.emplace("cim:ExcANS", &ExcANS_factory); } void ExcANS::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcANS.blint"), &assign_ExcANS_blint)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.ifmn"), &assign_ExcANS_ifmn)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.ifmx"), &assign_ExcANS_ifmx)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.k2"), &assign_ExcANS_k2)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.k3"), &assign_ExcANS_k3)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.kce"), &assign_ExcANS_kce)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.krvecc"), &assign_ExcANS_krvecc)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.kvfif"), &assign_ExcANS_kvfif)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.t1"), &assign_ExcANS_t1)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.t2"), &assign_ExcANS_t2)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.t3"), &assign_ExcANS_t3)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.tb"), &assign_ExcANS_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.vrmn"), &assign_ExcANS_vrmn)); - assign_map.insert(std::make_pair(std::string("cim:ExcANS.vrmx"), &assign_ExcANS_vrmx)); + assign_map.emplace("cim:ExcANS.blint", &assign_ExcANS_blint); + assign_map.emplace("cim:ExcANS.ifmn", &assign_ExcANS_ifmn); + assign_map.emplace("cim:ExcANS.ifmx", &assign_ExcANS_ifmx); + assign_map.emplace("cim:ExcANS.k2", &assign_ExcANS_k2); + assign_map.emplace("cim:ExcANS.k3", &assign_ExcANS_k3); + assign_map.emplace("cim:ExcANS.kce", &assign_ExcANS_kce); + assign_map.emplace("cim:ExcANS.krvecc", &assign_ExcANS_krvecc); + assign_map.emplace("cim:ExcANS.kvfif", &assign_ExcANS_kvfif); + assign_map.emplace("cim:ExcANS.t1", &assign_ExcANS_t1); + assign_map.emplace("cim:ExcANS.t2", &assign_ExcANS_t2); + assign_map.emplace("cim:ExcANS.t3", &assign_ExcANS_t3); + assign_map.emplace("cim:ExcANS.tb", &assign_ExcANS_tb); + assign_map.emplace("cim:ExcANS.vrmn", &assign_ExcANS_vrmn); + assign_map.emplace("cim:ExcANS.vrmx", &assign_ExcANS_vrmx); } void ExcANS::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcANS.hpp b/CGMES_3.0.0/ExcANS.hpp index 627193488..3688e29b2 100644 --- a/CGMES_3.0.0/ExcANS.hpp +++ b/CGMES_3.0.0/ExcANS.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Italian excitation system. It represents static field voltage or excitation current feedback excitation system. - */ + /** \brief Italian excitation system. It represents static field voltage or excitation current feedback excitation system. */ class ExcANS : public ExcitationSystemDynamics { public: @@ -30,20 +28,47 @@ namespace CIMPP ExcANS(); ~ExcANS() override; - CIMPP::Integer blint; /* Governor control flag (<i>BLINT</i>). 0 = lead-lag regulator 1 = proportional integral regulator. Typical value = 0. Default: 0 */ - CIMPP::PU ifmn; /* Minimum exciter current (<i>I</i><i><sub>FMN</sub></i>). Typical value = -5,2. Default: nullptr */ - CIMPP::PU ifmx; /* Maximum exciter current (<i>I</i><i><sub>FMX</sub></i>). Typical value = 6,5. Default: nullptr */ - CIMPP::Float k2; /* Exciter gain (<i>K</i><i><sub>2</sub></i>). Typical value = 20. Default: 0.0 */ - CIMPP::Float k3; /* AVR gain (<i>K</i><i><sub>3</sub></i>). Typical value = 1000. Default: 0.0 */ - CIMPP::Float kce; /* Ceiling factor (<i>K</i><i><sub>CE</sub></i>). Typical value = 1. Default: 0.0 */ - CIMPP::Integer krvecc; /* Feedback enabling (<i>K</i><i><sub>RVECC</sub></i>). 0 = open loop control 1 = closed loop control. Typical value = 1. Default: 0 */ - CIMPP::Integer kvfif; /* Rate feedback signal flag (<i>K</i><i><sub>VFIF</sub></i>). 0 = output voltage of the exciter 1 = exciter field current. Typical value = 0. Default: 0 */ - CIMPP::Seconds t1; /* Time constant (<i>T</i><i><sub>1</sub></i>) (&gt;= 0). Typical value = 20. Default: nullptr */ - CIMPP::Seconds t2; /* Time constant (<i>T</i><i><sub>2</sub></i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ - CIMPP::Seconds t3; /* Time constant (<i>T</i><i><sub>3</sub></i>) (&gt;= 0). Typical value = 1,6. Default: nullptr */ - CIMPP::Seconds tb; /* Exciter time constant (<i>T</i><i><sub>B</sub></i>) (&gt;= 0). Typical value = 0,04. Default: nullptr */ - CIMPP::PU vrmn; /* Minimum AVR output (<i>V</i><i><sub>RMN</sub></i>). Typical value = -5,2. Default: nullptr */ - CIMPP::PU vrmx; /* Maximum AVR output (<i>V</i><i><sub>RMX</sub></i>). Typical value = 6,5. Default: nullptr */ + /** \brief Governor control flag (<i>BLINT</i>). 0 = lead-lag regulator 1 = proportional integral regulator. Typical value = 0. Default: 0 */ + CIMPP::Integer blint; + + /** \brief Minimum exciter current (<i>I</i><i><sub>FMN</sub></i>). Typical value = -5,2. Default: nullptr */ + CIMPP::PU ifmn; + + /** \brief Maximum exciter current (<i>I</i><i><sub>FMX</sub></i>). Typical value = 6,5. Default: nullptr */ + CIMPP::PU ifmx; + + /** \brief Exciter gain (<i>K</i><i><sub>2</sub></i>). Typical value = 20. Default: 0.0 */ + CIMPP::Float k2; + + /** \brief AVR gain (<i>K</i><i><sub>3</sub></i>). Typical value = 1000. Default: 0.0 */ + CIMPP::Float k3; + + /** \brief Ceiling factor (<i>K</i><i><sub>CE</sub></i>). Typical value = 1. Default: 0.0 */ + CIMPP::Float kce; + + /** \brief Feedback enabling (<i>K</i><i><sub>RVECC</sub></i>). 0 = open loop control 1 = closed loop control. Typical value = 1. Default: 0 */ + CIMPP::Integer krvecc; + + /** \brief Rate feedback signal flag (<i>K</i><i><sub>VFIF</sub></i>). 0 = output voltage of the exciter 1 = exciter field current. Typical value = 0. Default: 0 */ + CIMPP::Integer kvfif; + + /** \brief Time constant (<i>T</i><i><sub>1</sub></i>) (&gt;= 0). Typical value = 20. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Time constant (<i>T</i><i><sub>2</sub></i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Time constant (<i>T</i><i><sub>3</sub></i>) (&gt;= 0). Typical value = 1,6. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Exciter time constant (<i>T</i><i><sub>B</sub></i>) (&gt;= 0). Typical value = 0,04. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Minimum AVR output (<i>V</i><i><sub>RMN</sub></i>). Typical value = -5,2. Default: nullptr */ + CIMPP::PU vrmn; + + /** \brief Maximum AVR output (<i>V</i><i><sub>RMX</sub></i>). Typical value = 6,5. Default: nullptr */ + CIMPP::PU vrmx; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcAVR1.cpp b/CGMES_3.0.0/ExcAVR1.cpp index 428f707a4..3daf41454 100644 --- a/CGMES_3.0.0/ExcAVR1.cpp +++ b/CGMES_3.0.0/ExcAVR1.cpp @@ -8,23 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAVR1::ExcAVR1() {}; -ExcAVR1::~ExcAVR1() {}; +ExcAVR1::ExcAVR1() {} +ExcAVR1::~ExcAVR1() {} static const std::list PossibleProfilesForClass = { @@ -62,168 +50,178 @@ ExcAVR1::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAVR1_e1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_e1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_e2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_e2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_se1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_se1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_se2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_se2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_vrmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_vrmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR1_vrmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR1_vrmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAVR1_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e1; if (!buffer.str().empty()) @@ -237,7 +235,8 @@ bool get_ExcAVR1_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e2; if (!buffer.str().empty()) @@ -251,7 +250,8 @@ bool get_ExcAVR1_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -265,7 +265,8 @@ bool get_ExcAVR1_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -279,7 +280,8 @@ bool get_ExcAVR1_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se1; if (!buffer.str().empty()) @@ -293,7 +295,8 @@ bool get_ExcAVR1_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se2; if (!buffer.str().empty()) @@ -307,7 +310,8 @@ bool get_ExcAVR1_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -321,7 +325,8 @@ bool get_ExcAVR1_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -335,7 +340,8 @@ bool get_ExcAVR1_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -349,7 +355,8 @@ bool get_ExcAVR1_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -363,7 +370,8 @@ bool get_ExcAVR1_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR1_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmn; if (!buffer.str().empty()) @@ -377,7 +385,8 @@ bool get_ExcAVR1_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAVR1_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR1* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmx; if (!buffer.str().empty()) @@ -389,8 +398,6 @@ bool get_ExcAVR1_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char ExcAVR1::debugName[] = "ExcAVR1"; const char* ExcAVR1::debugString() const { @@ -399,23 +406,23 @@ const char* ExcAVR1::debugString() const void ExcAVR1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAVR1"), &ExcAVR1_factory)); + factory_map.emplace("cim:ExcAVR1", &ExcAVR1_factory); } void ExcAVR1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.e1"), &assign_ExcAVR1_e1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.e2"), &assign_ExcAVR1_e2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.ka"), &assign_ExcAVR1_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.kf"), &assign_ExcAVR1_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.se1"), &assign_ExcAVR1_se1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.se2"), &assign_ExcAVR1_se2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.ta"), &assign_ExcAVR1_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.tb"), &assign_ExcAVR1_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.te"), &assign_ExcAVR1_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.tf"), &assign_ExcAVR1_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.vrmn"), &assign_ExcAVR1_vrmn)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR1.vrmx"), &assign_ExcAVR1_vrmx)); + assign_map.emplace("cim:ExcAVR1.e1", &assign_ExcAVR1_e1); + assign_map.emplace("cim:ExcAVR1.e2", &assign_ExcAVR1_e2); + assign_map.emplace("cim:ExcAVR1.ka", &assign_ExcAVR1_ka); + assign_map.emplace("cim:ExcAVR1.kf", &assign_ExcAVR1_kf); + assign_map.emplace("cim:ExcAVR1.se1", &assign_ExcAVR1_se1); + assign_map.emplace("cim:ExcAVR1.se2", &assign_ExcAVR1_se2); + assign_map.emplace("cim:ExcAVR1.ta", &assign_ExcAVR1_ta); + assign_map.emplace("cim:ExcAVR1.tb", &assign_ExcAVR1_tb); + assign_map.emplace("cim:ExcAVR1.te", &assign_ExcAVR1_te); + assign_map.emplace("cim:ExcAVR1.tf", &assign_ExcAVR1_tf); + assign_map.emplace("cim:ExcAVR1.vrmn", &assign_ExcAVR1_vrmn); + assign_map.emplace("cim:ExcAVR1.vrmx", &assign_ExcAVR1_vrmx); } void ExcAVR1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcAVR1.hpp b/CGMES_3.0.0/ExcAVR1.hpp index e7b826dbf..e993c382d 100644 --- a/CGMES_3.0.0/ExcAVR1.hpp +++ b/CGMES_3.0.0/ExcAVR1.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Italian excitation system corresponding to IEEE (1968) type 1 model. It represents an exciter dynamo and electromechanical regulator. - */ + /** \brief Italian excitation system corresponding to IEEE (1968) type 1 model. It represents an exciter dynamo and electromechanical regulator. */ class ExcAVR1 : public ExcitationSystemDynamics { public: @@ -29,18 +27,41 @@ namespace CIMPP ExcAVR1(); ~ExcAVR1() override; - CIMPP::PU e1; /* Field voltage value 1 (<i>E</i><i><sub>1</sub></i>). Typical value = 4.18. Default: nullptr */ - CIMPP::PU e2; /* Field voltage value 2 (<i>E</i><i><sub>2</sub></i>). Typical value = 3,14. Default: nullptr */ - CIMPP::Float ka; /* AVR gain (<i>K</i><i><sub>A</sub></i>). Typical value = 500. Default: 0.0 */ - CIMPP::Float kf; /* Rate feedback gain (<i>K</i><i><sub>F</sub></i>). Typical value = 0,12. Default: 0.0 */ - CIMPP::Float se1; /* Saturation factor at <i>E</i><i><sub>1</sub></i> (<i>S[E</i><i><sub>1</sub></i><i>]</i>). Typical value = 0,1. Default: 0.0 */ - CIMPP::Float se2; /* Saturation factor at <i>E</i><i><sub>2</sub></i> (<i>S[E</i><i><sub>2</sub></i><i>]</i>). Typical value = 0,03. Default: 0.0 */ - CIMPP::Seconds ta; /* AVR time constant (<i>T</i><i><sub>A</sub></i>) (&gt;= 0). Typical value = 0,2. Default: nullptr */ - CIMPP::Seconds tb; /* AVR time constant (<i>T</i><i><sub>B</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant (<i>T</i><i><sub>E</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::Seconds tf; /* Rate feedback time constant (<i>T</i><i><sub>F</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::PU vrmn; /* Minimum AVR output (<i>V</i><i><sub>RMN</sub></i>). Typical value = -6. Default: nullptr */ - CIMPP::PU vrmx; /* Maximum AVR output (<i>V</i><i><sub>RMX</sub></i>). Typical value = 7. Default: nullptr */ + /** \brief Field voltage value 1 (<i>E</i><i><sub>1</sub></i>). Typical value = 4.18. Default: nullptr */ + CIMPP::PU e1; + + /** \brief Field voltage value 2 (<i>E</i><i><sub>2</sub></i>). Typical value = 3,14. Default: nullptr */ + CIMPP::PU e2; + + /** \brief AVR gain (<i>K</i><i><sub>A</sub></i>). Typical value = 500. Default: 0.0 */ + CIMPP::Float ka; + + /** \brief Rate feedback gain (<i>K</i><i><sub>F</sub></i>). Typical value = 0,12. Default: 0.0 */ + CIMPP::Float kf; + + /** \brief Saturation factor at <i>E</i><i><sub>1</sub></i> (<i>S[E</i><i><sub>1</sub></i><i>]</i>). Typical value = 0,1. Default: 0.0 */ + CIMPP::Float se1; + + /** \brief Saturation factor at <i>E</i><i><sub>2</sub></i> (<i>S[E</i><i><sub>2</sub></i><i>]</i>). Typical value = 0,03. Default: 0.0 */ + CIMPP::Float se2; + + /** \brief AVR time constant (<i>T</i><i><sub>A</sub></i>) (&gt;= 0). Typical value = 0,2. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief AVR time constant (<i>T</i><i><sub>B</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Exciter time constant (<i>T</i><i><sub>E</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Rate feedback time constant (<i>T</i><i><sub>F</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Minimum AVR output (<i>V</i><i><sub>RMN</sub></i>). Typical value = -6. Default: nullptr */ + CIMPP::PU vrmn; + + /** \brief Maximum AVR output (<i>V</i><i><sub>RMX</sub></i>). Typical value = 7. Default: nullptr */ + CIMPP::PU vrmx; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcAVR2.cpp b/CGMES_3.0.0/ExcAVR2.cpp index 253b115b5..c9f8d13de 100644 --- a/CGMES_3.0.0/ExcAVR2.cpp +++ b/CGMES_3.0.0/ExcAVR2.cpp @@ -8,24 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAVR2::ExcAVR2() {}; -ExcAVR2::~ExcAVR2() {}; +ExcAVR2::ExcAVR2() {} +ExcAVR2::~ExcAVR2() {} static const std::list PossibleProfilesForClass = { @@ -64,181 +51,192 @@ ExcAVR2::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAVR2_e1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_e1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_e2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_e2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_se1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_se1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_se2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_se2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_tf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_tf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_vrmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_vrmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR2_vrmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR2_vrmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAVR2_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e1; if (!buffer.str().empty()) @@ -252,7 +250,8 @@ bool get_ExcAVR2_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e2; if (!buffer.str().empty()) @@ -266,7 +265,8 @@ bool get_ExcAVR2_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -280,7 +280,8 @@ bool get_ExcAVR2_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -294,7 +295,8 @@ bool get_ExcAVR2_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se1; if (!buffer.str().empty()) @@ -308,7 +310,8 @@ bool get_ExcAVR2_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se2; if (!buffer.str().empty()) @@ -322,7 +325,8 @@ bool get_ExcAVR2_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -336,7 +340,8 @@ bool get_ExcAVR2_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -350,7 +355,8 @@ bool get_ExcAVR2_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -364,7 +370,8 @@ bool get_ExcAVR2_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf1; if (!buffer.str().empty()) @@ -378,7 +385,8 @@ bool get_ExcAVR2_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf2; if (!buffer.str().empty()) @@ -392,7 +400,8 @@ bool get_ExcAVR2_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR2_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmn; if (!buffer.str().empty()) @@ -406,7 +415,8 @@ bool get_ExcAVR2_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAVR2_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR2* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmx; if (!buffer.str().empty()) @@ -418,8 +428,6 @@ bool get_ExcAVR2_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char ExcAVR2::debugName[] = "ExcAVR2"; const char* ExcAVR2::debugString() const { @@ -428,24 +436,24 @@ const char* ExcAVR2::debugString() const void ExcAVR2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAVR2"), &ExcAVR2_factory)); + factory_map.emplace("cim:ExcAVR2", &ExcAVR2_factory); } void ExcAVR2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.e1"), &assign_ExcAVR2_e1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.e2"), &assign_ExcAVR2_e2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.ka"), &assign_ExcAVR2_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.kf"), &assign_ExcAVR2_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.se1"), &assign_ExcAVR2_se1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.se2"), &assign_ExcAVR2_se2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.ta"), &assign_ExcAVR2_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.tb"), &assign_ExcAVR2_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.te"), &assign_ExcAVR2_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.tf1"), &assign_ExcAVR2_tf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.tf2"), &assign_ExcAVR2_tf2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.vrmn"), &assign_ExcAVR2_vrmn)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR2.vrmx"), &assign_ExcAVR2_vrmx)); + assign_map.emplace("cim:ExcAVR2.e1", &assign_ExcAVR2_e1); + assign_map.emplace("cim:ExcAVR2.e2", &assign_ExcAVR2_e2); + assign_map.emplace("cim:ExcAVR2.ka", &assign_ExcAVR2_ka); + assign_map.emplace("cim:ExcAVR2.kf", &assign_ExcAVR2_kf); + assign_map.emplace("cim:ExcAVR2.se1", &assign_ExcAVR2_se1); + assign_map.emplace("cim:ExcAVR2.se2", &assign_ExcAVR2_se2); + assign_map.emplace("cim:ExcAVR2.ta", &assign_ExcAVR2_ta); + assign_map.emplace("cim:ExcAVR2.tb", &assign_ExcAVR2_tb); + assign_map.emplace("cim:ExcAVR2.te", &assign_ExcAVR2_te); + assign_map.emplace("cim:ExcAVR2.tf1", &assign_ExcAVR2_tf1); + assign_map.emplace("cim:ExcAVR2.tf2", &assign_ExcAVR2_tf2); + assign_map.emplace("cim:ExcAVR2.vrmn", &assign_ExcAVR2_vrmn); + assign_map.emplace("cim:ExcAVR2.vrmx", &assign_ExcAVR2_vrmx); } void ExcAVR2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcAVR2.hpp b/CGMES_3.0.0/ExcAVR2.hpp index 7e997dfa6..aa50e7c74 100644 --- a/CGMES_3.0.0/ExcAVR2.hpp +++ b/CGMES_3.0.0/ExcAVR2.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Italian excitation system corresponding to IEEE (1968) type 2 model. It represents an alternator and rotating diodes and electromechanic voltage regulators. - */ + /** \brief Italian excitation system corresponding to IEEE (1968) type 2 model. It represents an alternator and rotating diodes and electromechanic voltage regulators. */ class ExcAVR2 : public ExcitationSystemDynamics { public: @@ -29,19 +27,44 @@ namespace CIMPP ExcAVR2(); ~ExcAVR2() override; - CIMPP::PU e1; /* Field voltage value 1 (<i>E</i><i><sub>1</sub></i>). Typical value = 4,18. Default: nullptr */ - CIMPP::PU e2; /* Field voltage value 2 (<i>E</i><i><sub>2</sub></i>). Typical value = 3,14. Default: nullptr */ - CIMPP::Float ka; /* AVR gain (<i>K</i><i><sub>A</sub></i>). Typical value = 500. Default: 0.0 */ - CIMPP::Float kf; /* Rate feedback gain (<i>K</i><i><sub>F</sub></i>). Typical value = 0,12. Default: 0.0 */ - CIMPP::Float se1; /* Saturation factor at <i>E</i><i><sub>1</sub></i> (<i>S[E</i><i><sub>1</sub></i><i>]</i>). Typical value = 0.1. Default: 0.0 */ - CIMPP::Float se2; /* Saturation factor at <i>E</i><i><sub>2</sub></i> (<i>S[E</i><i><sub>2</sub></i><i>]</i>). Typical value = 0,03. Default: 0.0 */ - CIMPP::Seconds ta; /* AVR time constant (<i>T</i><i><sub>A</sub></i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ - CIMPP::Seconds tb; /* AVR time constant (<i>T</i><i><sub>B</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant (<i>T</i><i><sub>E</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::Seconds tf1; /* Rate feedback time constant (<i>T</i><i><sub>F1</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::Seconds tf2; /* Rate feedback time constant (<i>T</i><i><sub>F2</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::PU vrmn; /* Minimum AVR output (<i>V</i><i><sub>RMN</sub></i>). Typical value = -6. Default: nullptr */ - CIMPP::PU vrmx; /* Maximum AVR output (<i>V</i><i><sub>RMX</sub></i>). Typical value = 7. Default: nullptr */ + /** \brief Field voltage value 1 (<i>E</i><i><sub>1</sub></i>). Typical value = 4,18. Default: nullptr */ + CIMPP::PU e1; + + /** \brief Field voltage value 2 (<i>E</i><i><sub>2</sub></i>). Typical value = 3,14. Default: nullptr */ + CIMPP::PU e2; + + /** \brief AVR gain (<i>K</i><i><sub>A</sub></i>). Typical value = 500. Default: 0.0 */ + CIMPP::Float ka; + + /** \brief Rate feedback gain (<i>K</i><i><sub>F</sub></i>). Typical value = 0,12. Default: 0.0 */ + CIMPP::Float kf; + + /** \brief Saturation factor at <i>E</i><i><sub>1</sub></i> (<i>S[E</i><i><sub>1</sub></i><i>]</i>). Typical value = 0.1. Default: 0.0 */ + CIMPP::Float se1; + + /** \brief Saturation factor at <i>E</i><i><sub>2</sub></i> (<i>S[E</i><i><sub>2</sub></i><i>]</i>). Typical value = 0,03. Default: 0.0 */ + CIMPP::Float se2; + + /** \brief AVR time constant (<i>T</i><i><sub>A</sub></i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief AVR time constant (<i>T</i><i><sub>B</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Exciter time constant (<i>T</i><i><sub>E</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Rate feedback time constant (<i>T</i><i><sub>F1</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tf1; + + /** \brief Rate feedback time constant (<i>T</i><i><sub>F2</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tf2; + + /** \brief Minimum AVR output (<i>V</i><i><sub>RMN</sub></i>). Typical value = -6. Default: nullptr */ + CIMPP::PU vrmn; + + /** \brief Maximum AVR output (<i>V</i><i><sub>RMX</sub></i>). Typical value = 7. Default: nullptr */ + CIMPP::PU vrmx; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcAVR3.cpp b/CGMES_3.0.0/ExcAVR3.cpp index 511cce93b..a58bdda7d 100644 --- a/CGMES_3.0.0/ExcAVR3.cpp +++ b/CGMES_3.0.0/ExcAVR3.cpp @@ -8,23 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAVR3::ExcAVR3() {}; -ExcAVR3::~ExcAVR3() {}; +ExcAVR3::ExcAVR3() {} +ExcAVR3::~ExcAVR3() {} static const std::list PossibleProfilesForClass = { @@ -62,168 +50,178 @@ ExcAVR3::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAVR3_e1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_e1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_e2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_e2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_se1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_se1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_se2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_se2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_vrmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_vrmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR3_vrmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR3_vrmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAVR3_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e1; if (!buffer.str().empty()) @@ -237,7 +235,8 @@ bool get_ExcAVR3_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e2; if (!buffer.str().empty()) @@ -251,7 +250,8 @@ bool get_ExcAVR3_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -265,7 +265,8 @@ bool get_ExcAVR3_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se1; if (!buffer.str().empty()) @@ -279,7 +280,8 @@ bool get_ExcAVR3_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se2; if (!buffer.str().empty()) @@ -293,7 +295,8 @@ bool get_ExcAVR3_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -307,7 +310,8 @@ bool get_ExcAVR3_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -321,7 +325,8 @@ bool get_ExcAVR3_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -335,7 +340,8 @@ bool get_ExcAVR3_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -349,7 +355,8 @@ bool get_ExcAVR3_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -363,7 +370,8 @@ bool get_ExcAVR3_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR3_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmn; if (!buffer.str().empty()) @@ -377,7 +385,8 @@ bool get_ExcAVR3_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAVR3_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR3* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmx; if (!buffer.str().empty()) @@ -389,8 +398,6 @@ bool get_ExcAVR3_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char ExcAVR3::debugName[] = "ExcAVR3"; const char* ExcAVR3::debugString() const { @@ -399,23 +406,23 @@ const char* ExcAVR3::debugString() const void ExcAVR3::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAVR3"), &ExcAVR3_factory)); + factory_map.emplace("cim:ExcAVR3", &ExcAVR3_factory); } void ExcAVR3::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.e1"), &assign_ExcAVR3_e1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.e2"), &assign_ExcAVR3_e2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.ka"), &assign_ExcAVR3_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.se1"), &assign_ExcAVR3_se1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.se2"), &assign_ExcAVR3_se2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.t1"), &assign_ExcAVR3_t1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.t2"), &assign_ExcAVR3_t2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.t3"), &assign_ExcAVR3_t3)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.t4"), &assign_ExcAVR3_t4)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.te"), &assign_ExcAVR3_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.vrmn"), &assign_ExcAVR3_vrmn)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR3.vrmx"), &assign_ExcAVR3_vrmx)); + assign_map.emplace("cim:ExcAVR3.e1", &assign_ExcAVR3_e1); + assign_map.emplace("cim:ExcAVR3.e2", &assign_ExcAVR3_e2); + assign_map.emplace("cim:ExcAVR3.ka", &assign_ExcAVR3_ka); + assign_map.emplace("cim:ExcAVR3.se1", &assign_ExcAVR3_se1); + assign_map.emplace("cim:ExcAVR3.se2", &assign_ExcAVR3_se2); + assign_map.emplace("cim:ExcAVR3.t1", &assign_ExcAVR3_t1); + assign_map.emplace("cim:ExcAVR3.t2", &assign_ExcAVR3_t2); + assign_map.emplace("cim:ExcAVR3.t3", &assign_ExcAVR3_t3); + assign_map.emplace("cim:ExcAVR3.t4", &assign_ExcAVR3_t4); + assign_map.emplace("cim:ExcAVR3.te", &assign_ExcAVR3_te); + assign_map.emplace("cim:ExcAVR3.vrmn", &assign_ExcAVR3_vrmn); + assign_map.emplace("cim:ExcAVR3.vrmx", &assign_ExcAVR3_vrmx); } void ExcAVR3::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcAVR3.hpp b/CGMES_3.0.0/ExcAVR3.hpp index e06a4a367..003d0bdb1 100644 --- a/CGMES_3.0.0/ExcAVR3.hpp +++ b/CGMES_3.0.0/ExcAVR3.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Italian excitation system. It represents an exciter dynamo and electric regulator. - */ + /** \brief Italian excitation system. It represents an exciter dynamo and electric regulator. */ class ExcAVR3 : public ExcitationSystemDynamics { public: @@ -29,18 +27,41 @@ namespace CIMPP ExcAVR3(); ~ExcAVR3() override; - CIMPP::PU e1; /* Field voltage value 1 (<i>E</i><i><sub>1</sub></i>). Typical value = 4,18. Default: nullptr */ - CIMPP::PU e2; /* Field voltage value 2 (<i>E</i><i><sub>2</sub></i>). Typical value = 3,14. Default: nullptr */ - CIMPP::Float ka; /* AVR gain (<i>K</i><i><sub>A</sub></i>). Typical value = 100. Default: 0.0 */ - CIMPP::Float se1; /* Saturation factor at <i>E</i><i><sub>1</sub></i><i> </i>(<i>S[E</i><i><sub>1</sub></i><i>]</i>). Typical value = 0,1. Default: 0.0 */ - CIMPP::Float se2; /* Saturation factor at <i>E</i><i><sub>2</sub></i><i> </i>(<i>S[E</i><i><sub>2</sub></i><i>]</i>). Typical value = 0,03. Default: 0.0 */ - CIMPP::Seconds t1; /* AVR time constant (<i>T</i><i><sub>1</sub></i>) (&gt;= 0). Typical value = 20. Default: nullptr */ - CIMPP::Seconds t2; /* AVR time constant (<i>T</i><i><sub>2</sub></i>) (&gt;= 0). Typical value = 1,6. Default: nullptr */ - CIMPP::Seconds t3; /* AVR time constant (<i>T</i><i><sub>3</sub></i>) (&gt;= 0). Typical value = 0,66. Default: nullptr */ - CIMPP::Seconds t4; /* AVR time constant (<i>T</i><i><sub>4</sub></i>) (&gt;= 0). Typical value = 0,07. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant (<i>T</i><i><sub>E</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::PU vrmn; /* Minimum AVR output (<i>V</i><i><sub>RMN</sub></i>). Typical value = -7,5. Default: nullptr */ - CIMPP::PU vrmx; /* Maximum AVR output (<i>V</i><i><sub>RMX</sub></i>). Typical value = 7,5. Default: nullptr */ + /** \brief Field voltage value 1 (<i>E</i><i><sub>1</sub></i>). Typical value = 4,18. Default: nullptr */ + CIMPP::PU e1; + + /** \brief Field voltage value 2 (<i>E</i><i><sub>2</sub></i>). Typical value = 3,14. Default: nullptr */ + CIMPP::PU e2; + + /** \brief AVR gain (<i>K</i><i><sub>A</sub></i>). Typical value = 100. Default: 0.0 */ + CIMPP::Float ka; + + /** \brief Saturation factor at <i>E</i><i><sub>1</sub></i><i> </i>(<i>S[E</i><i><sub>1</sub></i><i>]</i>). Typical value = 0,1. Default: 0.0 */ + CIMPP::Float se1; + + /** \brief Saturation factor at <i>E</i><i><sub>2</sub></i><i> </i>(<i>S[E</i><i><sub>2</sub></i><i>]</i>). Typical value = 0,03. Default: 0.0 */ + CIMPP::Float se2; + + /** \brief AVR time constant (<i>T</i><i><sub>1</sub></i>) (&gt;= 0). Typical value = 20. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief AVR time constant (<i>T</i><i><sub>2</sub></i>) (&gt;= 0). Typical value = 1,6. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief AVR time constant (<i>T</i><i><sub>3</sub></i>) (&gt;= 0). Typical value = 0,66. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief AVR time constant (<i>T</i><i><sub>4</sub></i>) (&gt;= 0). Typical value = 0,07. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Exciter time constant (<i>T</i><i><sub>E</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Minimum AVR output (<i>V</i><i><sub>RMN</sub></i>). Typical value = -7,5. Default: nullptr */ + CIMPP::PU vrmn; + + /** \brief Maximum AVR output (<i>V</i><i><sub>RMX</sub></i>). Typical value = 7,5. Default: nullptr */ + CIMPP::PU vrmx; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcAVR4.cpp b/CGMES_3.0.0/ExcAVR4.cpp index 1bed23925..52fd9e5cd 100644 --- a/CGMES_3.0.0/ExcAVR4.cpp +++ b/CGMES_3.0.0/ExcAVR4.cpp @@ -8,25 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAVR4::ExcAVR4() {}; -ExcAVR4::~ExcAVR4() {}; +ExcAVR4::ExcAVR4() {} +ExcAVR4::~ExcAVR4() {} static const std::list PossibleProfilesForClass = { @@ -66,194 +52,206 @@ ExcAVR4::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAVR4_imul(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_imul(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->imul; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_kif(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_kif(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kif; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_t1if(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_t1if(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1if; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_tif(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_tif(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tif; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_vfmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_vfmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_vfmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_vfmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_vrmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_vrmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR4_vrmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR4_vrmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAVR4_imul(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->imul; if (!buffer.str().empty()) @@ -267,7 +265,8 @@ bool get_ExcAVR4_imul(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAVR4_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -281,7 +280,8 @@ bool get_ExcAVR4_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR4_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -295,7 +295,8 @@ bool get_ExcAVR4_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR4_kif(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kif; if (!buffer.str().empty()) @@ -309,7 +310,8 @@ bool get_ExcAVR4_kif(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR4_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -323,7 +325,8 @@ bool get_ExcAVR4_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR4_t1if(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1if; if (!buffer.str().empty()) @@ -337,7 +340,8 @@ bool get_ExcAVR4_t1if(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAVR4_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -351,7 +355,8 @@ bool get_ExcAVR4_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR4_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -365,7 +370,8 @@ bool get_ExcAVR4_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR4_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -379,7 +385,8 @@ bool get_ExcAVR4_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR4_tif(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tif; if (!buffer.str().empty()) @@ -393,7 +400,8 @@ bool get_ExcAVR4_tif(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR4_vfmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfmn; if (!buffer.str().empty()) @@ -407,7 +415,8 @@ bool get_ExcAVR4_vfmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAVR4_vfmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfmx; if (!buffer.str().empty()) @@ -421,7 +430,8 @@ bool get_ExcAVR4_vfmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAVR4_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmn; if (!buffer.str().empty()) @@ -435,7 +445,8 @@ bool get_ExcAVR4_vrmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcAVR4_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR4* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmx; if (!buffer.str().empty()) @@ -447,8 +458,6 @@ bool get_ExcAVR4_vrmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char ExcAVR4::debugName[] = "ExcAVR4"; const char* ExcAVR4::debugString() const { @@ -457,25 +466,25 @@ const char* ExcAVR4::debugString() const void ExcAVR4::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAVR4"), &ExcAVR4_factory)); + factory_map.emplace("cim:ExcAVR4", &ExcAVR4_factory); } void ExcAVR4::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.imul"), &assign_ExcAVR4_imul)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.ka"), &assign_ExcAVR4_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.ke"), &assign_ExcAVR4_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.kif"), &assign_ExcAVR4_kif)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.t1"), &assign_ExcAVR4_t1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.t1if"), &assign_ExcAVR4_t1if)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.t2"), &assign_ExcAVR4_t2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.t3"), &assign_ExcAVR4_t3)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.t4"), &assign_ExcAVR4_t4)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.tif"), &assign_ExcAVR4_tif)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.vfmn"), &assign_ExcAVR4_vfmn)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.vfmx"), &assign_ExcAVR4_vfmx)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.vrmn"), &assign_ExcAVR4_vrmn)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR4.vrmx"), &assign_ExcAVR4_vrmx)); + assign_map.emplace("cim:ExcAVR4.imul", &assign_ExcAVR4_imul); + assign_map.emplace("cim:ExcAVR4.ka", &assign_ExcAVR4_ka); + assign_map.emplace("cim:ExcAVR4.ke", &assign_ExcAVR4_ke); + assign_map.emplace("cim:ExcAVR4.kif", &assign_ExcAVR4_kif); + assign_map.emplace("cim:ExcAVR4.t1", &assign_ExcAVR4_t1); + assign_map.emplace("cim:ExcAVR4.t1if", &assign_ExcAVR4_t1if); + assign_map.emplace("cim:ExcAVR4.t2", &assign_ExcAVR4_t2); + assign_map.emplace("cim:ExcAVR4.t3", &assign_ExcAVR4_t3); + assign_map.emplace("cim:ExcAVR4.t4", &assign_ExcAVR4_t4); + assign_map.emplace("cim:ExcAVR4.tif", &assign_ExcAVR4_tif); + assign_map.emplace("cim:ExcAVR4.vfmn", &assign_ExcAVR4_vfmn); + assign_map.emplace("cim:ExcAVR4.vfmx", &assign_ExcAVR4_vfmx); + assign_map.emplace("cim:ExcAVR4.vrmn", &assign_ExcAVR4_vrmn); + assign_map.emplace("cim:ExcAVR4.vrmx", &assign_ExcAVR4_vrmx); } void ExcAVR4::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcAVR4.hpp b/CGMES_3.0.0/ExcAVR4.hpp index 86802d2ea..99c48da97 100644 --- a/CGMES_3.0.0/ExcAVR4.hpp +++ b/CGMES_3.0.0/ExcAVR4.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Italian excitation system. It represents a static exciter and electric voltage regulator. - */ + /** \brief Italian excitation system. It represents a static exciter and electric voltage regulator. */ class ExcAVR4 : public ExcitationSystemDynamics { public: @@ -30,20 +28,47 @@ namespace CIMPP ExcAVR4(); ~ExcAVR4() override; - CIMPP::Boolean imul; /* AVR output voltage dependency selector (<i>I</i><i><sub>MUL</sub></i>). true = selector is connected false = selector is not connected. Typical value = true. Default: false */ - CIMPP::Float ka; /* AVR gain (<i>K</i><i><sub>A</sub></i>). Typical value = 300. Default: 0.0 */ - CIMPP::Float ke; /* Exciter gain (<i>K</i><i><sub>E</sub></i><i>)</i>. Typical value = 1. Default: 0.0 */ - CIMPP::Float kif; /* Exciter internal reactance (<i>K</i><i><sub>IF</sub></i>). Typical value = 0. Default: 0.0 */ - CIMPP::Seconds t1; /* AVR time constant (<i>T</i><i><sub>1</sub></i>) (&gt;= 0). Typical value = 4,8. Default: nullptr */ - CIMPP::Seconds t1if; /* Exciter current feedback time constant (<i>T</i><i><sub>1IF</sub></i>) (&gt;= 0). Typical value = 60. Default: nullptr */ - CIMPP::Seconds t2; /* AVR time constant (<i>T</i><i><sub>2</sub></i>) (&gt;= 0). Typical value = 1,5. Default: nullptr */ - CIMPP::Seconds t3; /* AVR time constant (<i>T</i><i><sub>3</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds t4; /* AVR time constant (<i>T</i><i><sub>4</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tif; /* Exciter current feedback time constant (<i>T</i><i><sub>IF</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::PU vfmn; /* Minimum exciter output (<i>V</i><i><sub>FMN</sub></i>). Typical value = 0. Default: nullptr */ - CIMPP::PU vfmx; /* Maximum exciter output (<i>V</i><i><sub>FMX</sub></i>). Typical value = 5. Default: nullptr */ - CIMPP::PU vrmn; /* Minimum AVR output (<i>V</i><i><sub>RMN</sub></i>). Typical value = 0. Default: nullptr */ - CIMPP::PU vrmx; /* Maximum AVR output (<i>V</i><i><sub>RMX</sub></i>). Typical value = 5. Default: nullptr */ + /** \brief AVR output voltage dependency selector (<i>I</i><i><sub>MUL</sub></i>). true = selector is connected false = selector is not connected. Typical value = true. Default: false */ + CIMPP::Boolean imul; + + /** \brief AVR gain (<i>K</i><i><sub>A</sub></i>). Typical value = 300. Default: 0.0 */ + CIMPP::Float ka; + + /** \brief Exciter gain (<i>K</i><i><sub>E</sub></i><i>)</i>. Typical value = 1. Default: 0.0 */ + CIMPP::Float ke; + + /** \brief Exciter internal reactance (<i>K</i><i><sub>IF</sub></i>). Typical value = 0. Default: 0.0 */ + CIMPP::Float kif; + + /** \brief AVR time constant (<i>T</i><i><sub>1</sub></i>) (&gt;= 0). Typical value = 4,8. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Exciter current feedback time constant (<i>T</i><i><sub>1IF</sub></i>) (&gt;= 0). Typical value = 60. Default: nullptr */ + CIMPP::Seconds t1if; + + /** \brief AVR time constant (<i>T</i><i><sub>2</sub></i>) (&gt;= 0). Typical value = 1,5. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief AVR time constant (<i>T</i><i><sub>3</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief AVR time constant (<i>T</i><i><sub>4</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Exciter current feedback time constant (<i>T</i><i><sub>IF</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tif; + + /** \brief Minimum exciter output (<i>V</i><i><sub>FMN</sub></i>). Typical value = 0. Default: nullptr */ + CIMPP::PU vfmn; + + /** \brief Maximum exciter output (<i>V</i><i><sub>FMX</sub></i>). Typical value = 5. Default: nullptr */ + CIMPP::PU vfmx; + + /** \brief Minimum AVR output (<i>V</i><i><sub>RMN</sub></i>). Typical value = 0. Default: nullptr */ + CIMPP::PU vrmn; + + /** \brief Maximum AVR output (<i>V</i><i><sub>RMX</sub></i>). Typical value = 5. Default: nullptr */ + CIMPP::PU vrmx; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcAVR5.cpp b/CGMES_3.0.0/ExcAVR5.cpp index 5cca6e163..3f6eb23fe 100644 --- a/CGMES_3.0.0/ExcAVR5.cpp +++ b/CGMES_3.0.0/ExcAVR5.cpp @@ -8,14 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" using namespace CIMPP; -ExcAVR5::ExcAVR5() {}; -ExcAVR5::~ExcAVR5() {}; +ExcAVR5::ExcAVR5() {} +ExcAVR5::~ExcAVR5() {} static const std::list PossibleProfilesForClass = { @@ -44,51 +41,52 @@ ExcAVR5::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAVR5_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR5_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR5* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR5_rex(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR5_rex(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR5* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rex; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR5_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR5_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR5* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAVR5_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR5* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -102,7 +100,8 @@ bool get_ExcAVR5_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR5_rex(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR5* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rex; if (!buffer.str().empty()) @@ -116,7 +115,8 @@ bool get_ExcAVR5_rex(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR5_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR5* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -128,8 +128,6 @@ bool get_ExcAVR5_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcAVR5::debugName[] = "ExcAVR5"; const char* ExcAVR5::debugString() const { @@ -138,14 +136,14 @@ const char* ExcAVR5::debugString() const void ExcAVR5::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAVR5"), &ExcAVR5_factory)); + factory_map.emplace("cim:ExcAVR5", &ExcAVR5_factory); } void ExcAVR5::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAVR5.ka"), &assign_ExcAVR5_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR5.rex"), &assign_ExcAVR5_rex)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR5.ta"), &assign_ExcAVR5_ta)); + assign_map.emplace("cim:ExcAVR5.ka", &assign_ExcAVR5_ka); + assign_map.emplace("cim:ExcAVR5.rex", &assign_ExcAVR5_rex); + assign_map.emplace("cim:ExcAVR5.ta", &assign_ExcAVR5_ta); } void ExcAVR5::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcAVR5.hpp b/CGMES_3.0.0/ExcAVR5.hpp index ac5dc4506..c5d1d29e0 100644 --- a/CGMES_3.0.0/ExcAVR5.hpp +++ b/CGMES_3.0.0/ExcAVR5.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Manual excitation control with field circuit resistance. This model can be used as a very simple representation of manual voltage control. - */ + /** \brief Manual excitation control with field circuit resistance. This model can be used as a very simple representation of manual voltage control. */ class ExcAVR5 : public ExcitationSystemDynamics { public: @@ -28,9 +26,14 @@ namespace CIMPP ExcAVR5(); ~ExcAVR5() override; - CIMPP::PU ka; /* Gain (<i>Ka</i>). Default: nullptr */ - CIMPP::PU rex; /* Effective output resistance (<i>Rex</i>). <i>Rex</i> represents the effective output resistance seen by the excitation system. Default: nullptr */ - CIMPP::Seconds ta; /* Time constant (<i>Ta</i>) (&gt;= 0). Default: nullptr */ + /** \brief Gain (<i>Ka</i>). Default: nullptr */ + CIMPP::PU ka; + + /** \brief Effective output resistance (<i>Rex</i>). <i>Rex</i> represents the effective output resistance seen by the excitation system. Default: nullptr */ + CIMPP::PU rex; + + /** \brief Time constant (<i>Ta</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds ta; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcAVR7.cpp b/CGMES_3.0.0/ExcAVR7.cpp index 0ce874327..3568b24b1 100644 --- a/CGMES_3.0.0/ExcAVR7.cpp +++ b/CGMES_3.0.0/ExcAVR7.cpp @@ -8,32 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcAVR7::ExcAVR7() {}; -ExcAVR7::~ExcAVR7() {}; +ExcAVR7::ExcAVR7() {} +ExcAVR7::~ExcAVR7() {} static const std::list PossibleProfilesForClass = { @@ -80,285 +59,304 @@ ExcAVR7::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcAVR7_a1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_a1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_a2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_a2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_a3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_a3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_a4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_a4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_a5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_a5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_a6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_a6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_k5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_k5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_vmax1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_vmax1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_vmax3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_vmax3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_vmax5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_vmax5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_vmin1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_vmin1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_vmin3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_vmin3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcAVR7_vmin5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcAVR7_vmin5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcAVR7_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a1; if (!buffer.str().empty()) @@ -372,7 +370,8 @@ bool get_ExcAVR7_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a2; if (!buffer.str().empty()) @@ -386,7 +385,8 @@ bool get_ExcAVR7_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_a3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a3; if (!buffer.str().empty()) @@ -400,7 +400,8 @@ bool get_ExcAVR7_a3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_a4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a4; if (!buffer.str().empty()) @@ -414,7 +415,8 @@ bool get_ExcAVR7_a4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_a5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a5; if (!buffer.str().empty()) @@ -428,7 +430,8 @@ bool get_ExcAVR7_a5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_a6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a6; if (!buffer.str().empty()) @@ -442,7 +445,8 @@ bool get_ExcAVR7_a6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -456,7 +460,8 @@ bool get_ExcAVR7_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -470,7 +475,8 @@ bool get_ExcAVR7_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k5; if (!buffer.str().empty()) @@ -484,7 +490,8 @@ bool get_ExcAVR7_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -498,7 +505,8 @@ bool get_ExcAVR7_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -512,7 +520,8 @@ bool get_ExcAVR7_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -526,7 +535,8 @@ bool get_ExcAVR7_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -540,7 +550,8 @@ bool get_ExcAVR7_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -554,7 +565,8 @@ bool get_ExcAVR7_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -568,7 +580,8 @@ bool get_ExcAVR7_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcAVR7_vmax1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmax1; if (!buffer.str().empty()) @@ -582,7 +595,8 @@ bool get_ExcAVR7_vmax1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAVR7_vmax3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmax3; if (!buffer.str().empty()) @@ -596,7 +610,8 @@ bool get_ExcAVR7_vmax3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAVR7_vmax5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmax5; if (!buffer.str().empty()) @@ -610,7 +625,8 @@ bool get_ExcAVR7_vmax5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAVR7_vmin1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmin1; if (!buffer.str().empty()) @@ -624,7 +640,8 @@ bool get_ExcAVR7_vmin1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAVR7_vmin3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmin3; if (!buffer.str().empty()) @@ -638,7 +655,8 @@ bool get_ExcAVR7_vmin3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcAVR7_vmin5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcAVR7* element = dynamic_cast(BaseClass_ptr1)) + const ExcAVR7* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmin5; if (!buffer.str().empty()) @@ -650,8 +668,6 @@ bool get_ExcAVR7_vmin5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcAVR7::debugName[] = "ExcAVR7"; const char* ExcAVR7::debugString() const { @@ -660,32 +676,32 @@ const char* ExcAVR7::debugString() const void ExcAVR7::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcAVR7"), &ExcAVR7_factory)); + factory_map.emplace("cim:ExcAVR7", &ExcAVR7_factory); } void ExcAVR7::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.a1"), &assign_ExcAVR7_a1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.a2"), &assign_ExcAVR7_a2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.a3"), &assign_ExcAVR7_a3)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.a4"), &assign_ExcAVR7_a4)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.a5"), &assign_ExcAVR7_a5)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.a6"), &assign_ExcAVR7_a6)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.k1"), &assign_ExcAVR7_k1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.k3"), &assign_ExcAVR7_k3)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.k5"), &assign_ExcAVR7_k5)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.t1"), &assign_ExcAVR7_t1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.t2"), &assign_ExcAVR7_t2)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.t3"), &assign_ExcAVR7_t3)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.t4"), &assign_ExcAVR7_t4)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.t5"), &assign_ExcAVR7_t5)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.t6"), &assign_ExcAVR7_t6)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.vmax1"), &assign_ExcAVR7_vmax1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.vmax3"), &assign_ExcAVR7_vmax3)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.vmax5"), &assign_ExcAVR7_vmax5)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.vmin1"), &assign_ExcAVR7_vmin1)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.vmin3"), &assign_ExcAVR7_vmin3)); - assign_map.insert(std::make_pair(std::string("cim:ExcAVR7.vmin5"), &assign_ExcAVR7_vmin5)); + assign_map.emplace("cim:ExcAVR7.a1", &assign_ExcAVR7_a1); + assign_map.emplace("cim:ExcAVR7.a2", &assign_ExcAVR7_a2); + assign_map.emplace("cim:ExcAVR7.a3", &assign_ExcAVR7_a3); + assign_map.emplace("cim:ExcAVR7.a4", &assign_ExcAVR7_a4); + assign_map.emplace("cim:ExcAVR7.a5", &assign_ExcAVR7_a5); + assign_map.emplace("cim:ExcAVR7.a6", &assign_ExcAVR7_a6); + assign_map.emplace("cim:ExcAVR7.k1", &assign_ExcAVR7_k1); + assign_map.emplace("cim:ExcAVR7.k3", &assign_ExcAVR7_k3); + assign_map.emplace("cim:ExcAVR7.k5", &assign_ExcAVR7_k5); + assign_map.emplace("cim:ExcAVR7.t1", &assign_ExcAVR7_t1); + assign_map.emplace("cim:ExcAVR7.t2", &assign_ExcAVR7_t2); + assign_map.emplace("cim:ExcAVR7.t3", &assign_ExcAVR7_t3); + assign_map.emplace("cim:ExcAVR7.t4", &assign_ExcAVR7_t4); + assign_map.emplace("cim:ExcAVR7.t5", &assign_ExcAVR7_t5); + assign_map.emplace("cim:ExcAVR7.t6", &assign_ExcAVR7_t6); + assign_map.emplace("cim:ExcAVR7.vmax1", &assign_ExcAVR7_vmax1); + assign_map.emplace("cim:ExcAVR7.vmax3", &assign_ExcAVR7_vmax3); + assign_map.emplace("cim:ExcAVR7.vmax5", &assign_ExcAVR7_vmax5); + assign_map.emplace("cim:ExcAVR7.vmin1", &assign_ExcAVR7_vmin1); + assign_map.emplace("cim:ExcAVR7.vmin3", &assign_ExcAVR7_vmin3); + assign_map.emplace("cim:ExcAVR7.vmin5", &assign_ExcAVR7_vmin5); } void ExcAVR7::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcAVR7.hpp b/CGMES_3.0.0/ExcAVR7.hpp index b63b2e4e2..e32d9698f 100644 --- a/CGMES_3.0.0/ExcAVR7.hpp +++ b/CGMES_3.0.0/ExcAVR7.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IVO excitation system. - */ + /** \brief IVO excitation system. */ class ExcAVR7 : public ExcitationSystemDynamics { public: @@ -28,27 +26,68 @@ namespace CIMPP ExcAVR7(); ~ExcAVR7() override; - CIMPP::PU a1; /* Lead coefficient (<i>A</i><i><sub>1</sub></i>). Typical value = 0,5. Default: nullptr */ - CIMPP::PU a2; /* Lag coefficient (<i>A</i><i><sub>2</sub></i>). Typical value = 0,5. Default: nullptr */ - CIMPP::PU a3; /* Lead coefficient (<i>A</i><i><sub>3</sub></i>). Typical value = 0,5. Default: nullptr */ - CIMPP::PU a4; /* Lag coefficient (<i>A</i><i><sub>4</sub></i>). Typical value = 0,5. Default: nullptr */ - CIMPP::PU a5; /* Lead coefficient (<i>A</i><i><sub>5</sub></i>). Typical value = 0,5. Default: nullptr */ - CIMPP::PU a6; /* Lag coefficient (<i>A</i><i><sub>6</sub></i>). Typical value = 0,5. Default: nullptr */ - CIMPP::PU k1; /* Gain (<i>K</i><i><sub>1</sub></i>). Typical value = 1. Default: nullptr */ - CIMPP::PU k3; /* Gain (<i>K</i><i><sub>3</sub></i>). Typical value = 3. Default: nullptr */ - CIMPP::PU k5; /* Gain (<i>K</i><i><sub>5</sub></i>). Typical value = 1. Default: nullptr */ - CIMPP::Seconds t1; /* Lead time constant (<i>T</i><i><sub>1</sub></i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ - CIMPP::Seconds t2; /* Lag time constant (<i>T</i><i><sub>2</sub></i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds t3; /* Lead time constant (<i>T</i><i><sub>3</sub></i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds t4; /* Lag time constant (<i>T</i><i><sub>4</sub></i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds t5; /* Lead time constant (<i>T</i><i><sub>5</sub></i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds t6; /* Lag time constant (<i>T</i><i><sub>6</sub></i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::PU vmax1; /* Lead-lag maximum limit (<i>Vmax1</i>) (&gt; ExcAVR7.vmin1). Typical value = 5. Default: nullptr */ - CIMPP::PU vmax3; /* Lead-lag maximum limit (<i>Vmax3</i>) (&gt; ExcAVR7.vmin3). Typical value = 5. Default: nullptr */ - CIMPP::PU vmax5; /* Lead-lag maximum limit (<i>Vmax5</i>) (&gt; ExcAVR7.vmin5). Typical value = 5. Default: nullptr */ - CIMPP::PU vmin1; /* Lead-lag minimum limit (<i>Vmin1</i>) (&lt; ExcAVR7.vmax1). Typical value = -5. Default: nullptr */ - CIMPP::PU vmin3; /* Lead-lag minimum limit (<i>Vmin3</i>) (&lt; ExcAVR7.vmax3). Typical value = -5. Default: nullptr */ - CIMPP::PU vmin5; /* Lead-lag minimum limit (<i>Vmin5</i>) (&lt; ExcAVR7.vmax5). Typical value = -2. Default: nullptr */ + /** \brief Lead coefficient (<i>A</i><i><sub>1</sub></i>). Typical value = 0,5. Default: nullptr */ + CIMPP::PU a1; + + /** \brief Lag coefficient (<i>A</i><i><sub>2</sub></i>). Typical value = 0,5. Default: nullptr */ + CIMPP::PU a2; + + /** \brief Lead coefficient (<i>A</i><i><sub>3</sub></i>). Typical value = 0,5. Default: nullptr */ + CIMPP::PU a3; + + /** \brief Lag coefficient (<i>A</i><i><sub>4</sub></i>). Typical value = 0,5. Default: nullptr */ + CIMPP::PU a4; + + /** \brief Lead coefficient (<i>A</i><i><sub>5</sub></i>). Typical value = 0,5. Default: nullptr */ + CIMPP::PU a5; + + /** \brief Lag coefficient (<i>A</i><i><sub>6</sub></i>). Typical value = 0,5. Default: nullptr */ + CIMPP::PU a6; + + /** \brief Gain (<i>K</i><i><sub>1</sub></i>). Typical value = 1. Default: nullptr */ + CIMPP::PU k1; + + /** \brief Gain (<i>K</i><i><sub>3</sub></i>). Typical value = 3. Default: nullptr */ + CIMPP::PU k3; + + /** \brief Gain (<i>K</i><i><sub>5</sub></i>). Typical value = 1. Default: nullptr */ + CIMPP::PU k5; + + /** \brief Lead time constant (<i>T</i><i><sub>1</sub></i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Lag time constant (<i>T</i><i><sub>2</sub></i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Lead time constant (<i>T</i><i><sub>3</sub></i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Lag time constant (<i>T</i><i><sub>4</sub></i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Lead time constant (<i>T</i><i><sub>5</sub></i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Lag time constant (<i>T</i><i><sub>6</sub></i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Lead-lag maximum limit (<i>Vmax1</i>) (&gt; ExcAVR7.vmin1). Typical value = 5. Default: nullptr */ + CIMPP::PU vmax1; + + /** \brief Lead-lag maximum limit (<i>Vmax3</i>) (&gt; ExcAVR7.vmin3). Typical value = 5. Default: nullptr */ + CIMPP::PU vmax3; + + /** \brief Lead-lag maximum limit (<i>Vmax5</i>) (&gt; ExcAVR7.vmin5). Typical value = 5. Default: nullptr */ + CIMPP::PU vmax5; + + /** \brief Lead-lag minimum limit (<i>Vmin1</i>) (&lt; ExcAVR7.vmax1). Typical value = -5. Default: nullptr */ + CIMPP::PU vmin1; + + /** \brief Lead-lag minimum limit (<i>Vmin3</i>) (&lt; ExcAVR7.vmax3). Typical value = -5. Default: nullptr */ + CIMPP::PU vmin3; + + /** \brief Lead-lag minimum limit (<i>Vmin5</i>) (&lt; ExcAVR7.vmax5). Typical value = -2. Default: nullptr */ + CIMPP::PU vmin5; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcBBC.cpp b/CGMES_3.0.0/ExcBBC.cpp index fd155fba0..5ed4908bf 100644 --- a/CGMES_3.0.0/ExcBBC.cpp +++ b/CGMES_3.0.0/ExcBBC.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcBBC::ExcBBC() {}; -ExcBBC::~ExcBBC() {}; +ExcBBC::ExcBBC() {} +ExcBBC::~ExcBBC() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ ExcBBC::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcBBC_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_efdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_efdmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_switch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_switch(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->_switch; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcBBC_xe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcBBC_xe(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xe; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcBBC_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmax; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_ExcBBC_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcBBC_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmin; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_ExcBBC_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcBBC_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_ExcBBC_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcBBC_switch(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->_switch; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_ExcBBC_switch(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcBBC_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_ExcBBC_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcBBC_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_ExcBBC_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcBBC_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_ExcBBC_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcBBC_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_ExcBBC_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcBBC_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_ExcBBC_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcBBC_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_ExcBBC_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcBBC_xe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcBBC* element = dynamic_cast(BaseClass_ptr1)) + const ExcBBC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xe; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_ExcBBC_xe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcBBC::debugName[] = "ExcBBC"; const char* ExcBBC::debugString() const { @@ -370,22 +376,22 @@ const char* ExcBBC::debugString() const void ExcBBC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcBBC"), &ExcBBC_factory)); + factory_map.emplace("cim:ExcBBC", &ExcBBC_factory); } void ExcBBC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.efdmax"), &assign_ExcBBC_efdmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.efdmin"), &assign_ExcBBC_efdmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.k"), &assign_ExcBBC_k)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.switch"), &assign_ExcBBC_switch)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.t1"), &assign_ExcBBC_t1)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.t2"), &assign_ExcBBC_t2)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.t3"), &assign_ExcBBC_t3)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.t4"), &assign_ExcBBC_t4)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.vrmax"), &assign_ExcBBC_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.vrmin"), &assign_ExcBBC_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcBBC.xe"), &assign_ExcBBC_xe)); + assign_map.emplace("cim:ExcBBC.efdmax", &assign_ExcBBC_efdmax); + assign_map.emplace("cim:ExcBBC.efdmin", &assign_ExcBBC_efdmin); + assign_map.emplace("cim:ExcBBC.k", &assign_ExcBBC_k); + assign_map.emplace("cim:ExcBBC.switch", &assign_ExcBBC_switch); + assign_map.emplace("cim:ExcBBC.t1", &assign_ExcBBC_t1); + assign_map.emplace("cim:ExcBBC.t2", &assign_ExcBBC_t2); + assign_map.emplace("cim:ExcBBC.t3", &assign_ExcBBC_t3); + assign_map.emplace("cim:ExcBBC.t4", &assign_ExcBBC_t4); + assign_map.emplace("cim:ExcBBC.vrmax", &assign_ExcBBC_vrmax); + assign_map.emplace("cim:ExcBBC.vrmin", &assign_ExcBBC_vrmin); + assign_map.emplace("cim:ExcBBC.xe", &assign_ExcBBC_xe); } void ExcBBC::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcBBC.hpp b/CGMES_3.0.0/ExcBBC.hpp index bb123315a..5e45d6876 100644 --- a/CGMES_3.0.0/ExcBBC.hpp +++ b/CGMES_3.0.0/ExcBBC.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Transformer fed static excitation system (static with ABB regulator). This model represents a static excitation system in which a gated thyristor bridge fed by a transformer at the main generator terminals feeds the main generator directly. - */ + /** \brief Transformer fed static excitation system (static with ABB regulator). This model represents a static excitation system in which a gated thyristor bridge fed by a transformer at the main generator terminals feeds the main generator directly. */ class ExcBBC : public ExcitationSystemDynamics { public: @@ -29,17 +27,38 @@ namespace CIMPP ExcBBC(); ~ExcBBC() override; - CIMPP::PU efdmax; /* Maximum open circuit exciter voltage (<i>Efdmax</i>) (&gt; ExcBBC.efdmin). Typical value = 5. Default: nullptr */ - CIMPP::PU efdmin; /* Minimum open circuit exciter voltage (<i>Efdmin</i>) (&lt; ExcBBC.efdmax). Typical value = -5. Default: nullptr */ - CIMPP::PU k; /* Steady state gain (<i>K</i>) (not = 0). Typical value = 300. Default: nullptr */ - CIMPP::Boolean _switch; /* Supplementary signal routing selector (<i>switch</i>). true = <i>Vs</i> connected to 3rd summing point false = <i>Vs</i> connected to 1st summing point (see diagram). Typical value = false. Default: false */ - CIMPP::Seconds t1; /* Controller time constant (<i>T1</i>) (&gt;= 0). Typical value = 6. Default: nullptr */ - CIMPP::Seconds t2; /* Controller time constant (<i>T2</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::Seconds t3; /* Lead/lag time constant (<i>T3</i>) (&gt;= 0). If = 0, block is bypassed. Typical value = 0,05. Default: nullptr */ - CIMPP::Seconds t4; /* Lead/lag time constant (<i>T4</i>) (&gt;= 0). If = 0, block is bypassed. Typical value = 0,01. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum control element output (<i>Vrmax</i>) (&gt; ExcBBC.vrmin). Typical value = 5. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum control element output (<i>Vrmin</i>) (&lt; ExcBBC.vrmax). Typical value = -5. Default: nullptr */ - CIMPP::PU xe; /* Effective excitation transformer reactance (<i>Xe</i>) (&gt;= 0). <i>Xe</i> models the regulation of the transformer/rectifier unit. Typical value = 0,05. Default: nullptr */ + /** \brief Maximum open circuit exciter voltage (<i>Efdmax</i>) (&gt; ExcBBC.efdmin). Typical value = 5. Default: nullptr */ + CIMPP::PU efdmax; + + /** \brief Minimum open circuit exciter voltage (<i>Efdmin</i>) (&lt; ExcBBC.efdmax). Typical value = -5. Default: nullptr */ + CIMPP::PU efdmin; + + /** \brief Steady state gain (<i>K</i>) (not = 0). Typical value = 300. Default: nullptr */ + CIMPP::PU k; + + /** \brief Supplementary signal routing selector (<i>switch</i>). true = <i>Vs</i> connected to 3rd summing point false = <i>Vs</i> connected to 1st summing point (see diagram). Typical value = false. Default: false */ + CIMPP::Boolean _switch; + + /** \brief Controller time constant (<i>T1</i>) (&gt;= 0). Typical value = 6. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Controller time constant (<i>T2</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Lead/lag time constant (<i>T3</i>) (&gt;= 0). If = 0, block is bypassed. Typical value = 0,05. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Lead/lag time constant (<i>T4</i>) (&gt;= 0). If = 0, block is bypassed. Typical value = 0,01. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Maximum control element output (<i>Vrmax</i>) (&gt; ExcBBC.vrmin). Typical value = 5. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum control element output (<i>Vrmin</i>) (&lt; ExcBBC.vrmax). Typical value = -5. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief Effective excitation transformer reactance (<i>Xe</i>) (&gt;= 0). <i>Xe</i> models the regulation of the transformer/rectifier unit. Typical value = 0,05. Default: nullptr */ + CIMPP::PU xe; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcCZ.cpp b/CGMES_3.0.0/ExcCZ.cpp index 89b839416..836b963d1 100644 --- a/CGMES_3.0.0/ExcCZ.cpp +++ b/CGMES_3.0.0/ExcCZ.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcCZ::ExcCZ() {}; -ExcCZ::~ExcCZ() {}; +ExcCZ::ExcCZ() {} +ExcCZ::~ExcCZ() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ ExcCZ::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcCZ_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_efdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcCZ_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_efdmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcCZ_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcCZ_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcCZ_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcCZ_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcCZ_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcCZ_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcCZ_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcCZ_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcCZ_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcCZ_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmax; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_ExcCZ_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcCZ_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmin; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_ExcCZ_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcCZ_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_ExcCZ_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcCZ_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_ExcCZ_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcCZ_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_ExcCZ_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcCZ_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_ExcCZ_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcCZ_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_ExcCZ_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcCZ_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_ExcCZ_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcCZ_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_ExcCZ_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcCZ_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcCZ* element = dynamic_cast(BaseClass_ptr1)) + const ExcCZ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_ExcCZ_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcCZ::debugName[] = "ExcCZ"; const char* ExcCZ::debugString() const { @@ -341,21 +346,21 @@ const char* ExcCZ::debugString() const void ExcCZ::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcCZ"), &ExcCZ_factory)); + factory_map.emplace("cim:ExcCZ", &ExcCZ_factory); } void ExcCZ::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.efdmax"), &assign_ExcCZ_efdmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.efdmin"), &assign_ExcCZ_efdmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.ka"), &assign_ExcCZ_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.ke"), &assign_ExcCZ_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.kp"), &assign_ExcCZ_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.ta"), &assign_ExcCZ_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.tc"), &assign_ExcCZ_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.te"), &assign_ExcCZ_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.vrmax"), &assign_ExcCZ_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcCZ.vrmin"), &assign_ExcCZ_vrmin)); + assign_map.emplace("cim:ExcCZ.efdmax", &assign_ExcCZ_efdmax); + assign_map.emplace("cim:ExcCZ.efdmin", &assign_ExcCZ_efdmin); + assign_map.emplace("cim:ExcCZ.ka", &assign_ExcCZ_ka); + assign_map.emplace("cim:ExcCZ.ke", &assign_ExcCZ_ke); + assign_map.emplace("cim:ExcCZ.kp", &assign_ExcCZ_kp); + assign_map.emplace("cim:ExcCZ.ta", &assign_ExcCZ_ta); + assign_map.emplace("cim:ExcCZ.tc", &assign_ExcCZ_tc); + assign_map.emplace("cim:ExcCZ.te", &assign_ExcCZ_te); + assign_map.emplace("cim:ExcCZ.vrmax", &assign_ExcCZ_vrmax); + assign_map.emplace("cim:ExcCZ.vrmin", &assign_ExcCZ_vrmin); } void ExcCZ::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcCZ.hpp b/CGMES_3.0.0/ExcCZ.hpp index 66648eb73..a469d4fd5 100644 --- a/CGMES_3.0.0/ExcCZ.hpp +++ b/CGMES_3.0.0/ExcCZ.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Czech proportion/integral exciter. - */ + /** \brief Czech proportion/integral exciter. */ class ExcCZ : public ExcitationSystemDynamics { public: @@ -28,16 +26,35 @@ namespace CIMPP ExcCZ(); ~ExcCZ() override; - CIMPP::PU efdmax; /* Exciter output maximum limit (<i>Efdmax</i>) (&gt; ExcCZ.efdmin). Default: nullptr */ - CIMPP::PU efdmin; /* Exciter output minimum limit (<i>Efdmin</i>) (&lt; ExcCZ.efdmax). Default: nullptr */ - CIMPP::PU ka; /* Regulator gain (<i>Ka</i>). Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (<i>Ke</i>). Default: nullptr */ - CIMPP::PU kp; /* Regulator proportional gain (<i>Kp</i>). Default: nullptr */ - CIMPP::Seconds ta; /* Regulator time constant (<i>Ta</i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds tc; /* Regulator integral time constant (<i>Tc</i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (<i>Te</i>) (&gt;= 0). Default: nullptr */ - CIMPP::PU vrmax; /* Voltage regulator maximum limit (<i>Vrmax</i>) (&gt; ExcCZ.vrmin). Default: nullptr */ - CIMPP::PU vrmin; /* Voltage regulator minimum limit (<i>Vrmin</i>) (&lt; ExcCZ.vrmax). Default: nullptr */ + /** \brief Exciter output maximum limit (<i>Efdmax</i>) (&gt; ExcCZ.efdmin). Default: nullptr */ + CIMPP::PU efdmax; + + /** \brief Exciter output minimum limit (<i>Efdmin</i>) (&lt; ExcCZ.efdmax). Default: nullptr */ + CIMPP::PU efdmin; + + /** \brief Regulator gain (<i>Ka</i>). Default: nullptr */ + CIMPP::PU ka; + + /** \brief Exciter constant related to self-excited field (<i>Ke</i>). Default: nullptr */ + CIMPP::PU ke; + + /** \brief Regulator proportional gain (<i>Kp</i>). Default: nullptr */ + CIMPP::PU kp; + + /** \brief Regulator time constant (<i>Ta</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Regulator integral time constant (<i>Tc</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (<i>Te</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Voltage regulator maximum limit (<i>Vrmax</i>) (&gt; ExcCZ.vrmin). Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Voltage regulator minimum limit (<i>Vrmin</i>) (&lt; ExcCZ.vrmax). Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcDC1A.cpp b/CGMES_3.0.0/ExcDC1A.cpp index f8bd7fabe..747299b8e 100644 --- a/CGMES_3.0.0/ExcDC1A.cpp +++ b/CGMES_3.0.0/ExcDC1A.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcDC1A::ExcDC1A() {}; -ExcDC1A::~ExcDC1A() {}; +ExcDC1A::ExcDC1A() {} +ExcDC1A::~ExcDC1A() {} static const std::list PossibleProfilesForClass = { @@ -74,246 +56,262 @@ ExcDC1A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcDC1A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_efdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_efdmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_exclim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exclim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_seefd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_seefd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC1A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcDC1A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -327,7 +325,8 @@ bool get_ExcDC1A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcDC1A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -341,7 +340,8 @@ bool get_ExcDC1A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcDC1A_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmax; if (!buffer.str().empty()) @@ -355,7 +355,8 @@ bool get_ExcDC1A_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC1A_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmin; if (!buffer.str().empty()) @@ -369,7 +370,8 @@ bool get_ExcDC1A_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC1A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exclim; if (!buffer.str().empty()) @@ -383,7 +385,8 @@ bool get_ExcDC1A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -397,7 +400,8 @@ bool get_ExcDC1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC1A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -411,7 +415,8 @@ bool get_ExcDC1A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -425,7 +430,8 @@ bool get_ExcDC1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC1A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -439,7 +445,8 @@ bool get_ExcDC1A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC1A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd1; if (!buffer.str().empty()) @@ -453,7 +460,8 @@ bool get_ExcDC1A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC1A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd2; if (!buffer.str().empty()) @@ -467,7 +475,8 @@ bool get_ExcDC1A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -481,7 +490,8 @@ bool get_ExcDC1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -495,7 +505,8 @@ bool get_ExcDC1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -509,7 +520,8 @@ bool get_ExcDC1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC1A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -523,7 +535,8 @@ bool get_ExcDC1A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -537,7 +550,8 @@ bool get_ExcDC1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -551,7 +565,8 @@ bool get_ExcDC1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcDC1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -563,8 +578,6 @@ bool get_ExcDC1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcDC1A::debugName[] = "ExcDC1A"; const char* ExcDC1A::debugString() const { @@ -573,29 +586,29 @@ const char* ExcDC1A::debugString() const void ExcDC1A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcDC1A"), &ExcDC1A_factory)); + factory_map.emplace("cim:ExcDC1A", &ExcDC1A_factory); } void ExcDC1A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.efd1"), &assign_ExcDC1A_efd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.efd2"), &assign_ExcDC1A_efd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.efdmax"), &assign_ExcDC1A_efdmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.efdmin"), &assign_ExcDC1A_efdmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.exclim"), &assign_ExcDC1A_exclim)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.ka"), &assign_ExcDC1A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.ke"), &assign_ExcDC1A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.kf"), &assign_ExcDC1A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.ks"), &assign_ExcDC1A_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.seefd1"), &assign_ExcDC1A_seefd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.seefd2"), &assign_ExcDC1A_seefd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.ta"), &assign_ExcDC1A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.tb"), &assign_ExcDC1A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.tc"), &assign_ExcDC1A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.te"), &assign_ExcDC1A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.tf"), &assign_ExcDC1A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.vrmax"), &assign_ExcDC1A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC1A.vrmin"), &assign_ExcDC1A_vrmin)); + assign_map.emplace("cim:ExcDC1A.efd1", &assign_ExcDC1A_efd1); + assign_map.emplace("cim:ExcDC1A.efd2", &assign_ExcDC1A_efd2); + assign_map.emplace("cim:ExcDC1A.efdmax", &assign_ExcDC1A_efdmax); + assign_map.emplace("cim:ExcDC1A.efdmin", &assign_ExcDC1A_efdmin); + assign_map.emplace("cim:ExcDC1A.exclim", &assign_ExcDC1A_exclim); + assign_map.emplace("cim:ExcDC1A.ka", &assign_ExcDC1A_ka); + assign_map.emplace("cim:ExcDC1A.ke", &assign_ExcDC1A_ke); + assign_map.emplace("cim:ExcDC1A.kf", &assign_ExcDC1A_kf); + assign_map.emplace("cim:ExcDC1A.ks", &assign_ExcDC1A_ks); + assign_map.emplace("cim:ExcDC1A.seefd1", &assign_ExcDC1A_seefd1); + assign_map.emplace("cim:ExcDC1A.seefd2", &assign_ExcDC1A_seefd2); + assign_map.emplace("cim:ExcDC1A.ta", &assign_ExcDC1A_ta); + assign_map.emplace("cim:ExcDC1A.tb", &assign_ExcDC1A_tb); + assign_map.emplace("cim:ExcDC1A.tc", &assign_ExcDC1A_tc); + assign_map.emplace("cim:ExcDC1A.te", &assign_ExcDC1A_te); + assign_map.emplace("cim:ExcDC1A.tf", &assign_ExcDC1A_tf); + assign_map.emplace("cim:ExcDC1A.vrmax", &assign_ExcDC1A_vrmax); + assign_map.emplace("cim:ExcDC1A.vrmin", &assign_ExcDC1A_vrmin); } void ExcDC1A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcDC1A.hpp b/CGMES_3.0.0/ExcDC1A.hpp index 9b54ff5fc..da27e8d22 100644 --- a/CGMES_3.0.0/ExcDC1A.hpp +++ b/CGMES_3.0.0/ExcDC1A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE DC1A direct current commutator exciter with speed input and without underexcitation limiters (UEL) inputs. - */ + /** \brief Modified IEEE DC1A direct current commutator exciter with speed input and without underexcitation limiters (UEL) inputs. */ class ExcDC1A : public ExcitationSystemDynamics { public: @@ -30,24 +28,59 @@ namespace CIMPP ExcDC1A(); ~ExcDC1A() override; - CIMPP::PU efd1; /* Exciter voltage at which exciter saturation is defined (<i>Efd</i><i><sub>1</sub></i>) (&gt; 0). Typical value = 3,1. Default: nullptr */ - CIMPP::PU efd2; /* Exciter voltage at which exciter saturation is defined (<i>Efd</i><i><sub>2</sub></i>) (&gt; 0). Typical value = 2,3. Default: nullptr */ - CIMPP::PU efdmax; /* Maximum voltage exciter output limiter (<i>Efdmax</i>) (&gt; ExcDC1A.efdmin). Typical value = 99. Default: nullptr */ - CIMPP::PU efdmin; /* Minimum voltage exciter output limiter (<i>Efdmin</i>) (&lt; ExcDC1A.edfmax). Typical value = -99. Default: nullptr */ - CIMPP::Boolean exclim; /* (<i>exclim</i>). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero is not applied to integrator output. Typical value = true. Default: false */ - CIMPP::PU ka; /* Voltage regulator gain (<i>Ka</i>) (&gt; 0). Typical value = 46. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (<i>Ke</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gain (<i>Kf</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (<i>Ks</i>). Typical value = 0. Default: nullptr */ - CIMPP::Float seefd1; /* Exciter saturation function value at the corresponding exciter voltage, <i>Efd</i><i><sub>1</sub></i> (<i>Se[Eefd</i><i><sub>1</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,33. Default: 0.0 */ - CIMPP::Float seefd2; /* Exciter saturation function value at the corresponding exciter voltage, <i>Efd</i><i><sub>2</sub></i> (<i>Se[Eefd</i><i><sub>2</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,1. Default: 0.0 */ - CIMPP::Seconds ta; /* Voltage regulator time constant (<i>Ta</i>) (&gt; 0). Typical value = 0,06. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (<i>Tb</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (<i>Tc</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (<i>Te</i>) (&gt; 0). Typical value = 0,46. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (<i>Tf</i>) (&gt; 0). Typical value = 1. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (<i>Vrmax</i>) (&gt; ExcDC1A.vrmin). Typical value = 1. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (<i>Vrmin</i>) (&lt; 0 and &lt; ExcDC1A.vrmax). Typical value = -0,9. Default: nullptr */ + /** \brief Exciter voltage at which exciter saturation is defined (<i>Efd</i><i><sub>1</sub></i>) (&gt; 0). Typical value = 3,1. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Exciter voltage at which exciter saturation is defined (<i>Efd</i><i><sub>2</sub></i>) (&gt; 0). Typical value = 2,3. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief Maximum voltage exciter output limiter (<i>Efdmax</i>) (&gt; ExcDC1A.efdmin). Typical value = 99. Default: nullptr */ + CIMPP::PU efdmax; + + /** \brief Minimum voltage exciter output limiter (<i>Efdmin</i>) (&lt; ExcDC1A.edfmax). Typical value = -99. Default: nullptr */ + CIMPP::PU efdmin; + + /** \brief (<i>exclim</i>). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero is not applied to integrator output. Typical value = true. Default: false */ + CIMPP::Boolean exclim; + + /** \brief Voltage regulator gain (<i>Ka</i>) (&gt; 0). Typical value = 46. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Exciter constant related to self-excited field (<i>Ke</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gain (<i>Kf</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (<i>Ks</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>Efd</i><i><sub>1</sub></i> (<i>Se[Eefd</i><i><sub>1</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,33. Default: 0.0 */ + CIMPP::Float seefd1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>Efd</i><i><sub>2</sub></i> (<i>Se[Eefd</i><i><sub>2</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,1. Default: 0.0 */ + CIMPP::Float seefd2; + + /** \brief Voltage regulator time constant (<i>Ta</i>) (&gt; 0). Typical value = 0,06. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (<i>Tb</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (<i>Tc</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (<i>Te</i>) (&gt; 0). Typical value = 0,46. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (<i>Tf</i>) (&gt; 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage regulator output (<i>Vrmax</i>) (&gt; ExcDC1A.vrmin). Typical value = 1. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (<i>Vrmin</i>) (&lt; 0 and &lt; ExcDC1A.vrmax). Typical value = -0,9. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcDC2A.cpp b/CGMES_3.0.0/ExcDC2A.cpp index 7c6688253..79a98e618 100644 --- a/CGMES_3.0.0/ExcDC2A.cpp +++ b/CGMES_3.0.0/ExcDC2A.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" using namespace CIMPP; -ExcDC2A::ExcDC2A() {}; -ExcDC2A::~ExcDC2A() {}; +ExcDC2A::ExcDC2A() {} +ExcDC2A::~ExcDC2A() {} static const std::list PossibleProfilesForClass = { @@ -74,246 +56,262 @@ ExcDC2A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcDC2A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_exclim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exclim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_seefd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_seefd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_tf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC2A_vtlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC2A_vtlim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vtlim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcDC2A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -327,7 +325,8 @@ bool get_ExcDC2A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcDC2A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -341,7 +340,8 @@ bool get_ExcDC2A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcDC2A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exclim; if (!buffer.str().empty()) @@ -355,7 +355,8 @@ bool get_ExcDC2A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -369,7 +370,8 @@ bool get_ExcDC2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -383,7 +385,8 @@ bool get_ExcDC2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -397,7 +400,8 @@ bool get_ExcDC2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -411,7 +415,8 @@ bool get_ExcDC2A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd1; if (!buffer.str().empty()) @@ -425,7 +430,8 @@ bool get_ExcDC2A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC2A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd2; if (!buffer.str().empty()) @@ -439,7 +445,8 @@ bool get_ExcDC2A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -453,7 +460,8 @@ bool get_ExcDC2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -467,7 +475,8 @@ bool get_ExcDC2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -481,7 +490,8 @@ bool get_ExcDC2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -495,7 +505,8 @@ bool get_ExcDC2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -509,7 +520,8 @@ bool get_ExcDC2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf1; if (!buffer.str().empty()) @@ -523,7 +535,8 @@ bool get_ExcDC2A_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -537,7 +550,8 @@ bool get_ExcDC2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcDC2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -551,7 +565,8 @@ bool get_ExcDC2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcDC2A_vtlim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vtlim; if (!buffer.str().empty()) @@ -563,8 +578,6 @@ bool get_ExcDC2A_vtlim(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcDC2A::debugName[] = "ExcDC2A"; const char* ExcDC2A::debugString() const { @@ -573,29 +586,29 @@ const char* ExcDC2A::debugString() const void ExcDC2A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcDC2A"), &ExcDC2A_factory)); + factory_map.emplace("cim:ExcDC2A", &ExcDC2A_factory); } void ExcDC2A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.efd1"), &assign_ExcDC2A_efd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.efd2"), &assign_ExcDC2A_efd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.exclim"), &assign_ExcDC2A_exclim)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.ka"), &assign_ExcDC2A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.ke"), &assign_ExcDC2A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.kf"), &assign_ExcDC2A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.ks"), &assign_ExcDC2A_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.seefd1"), &assign_ExcDC2A_seefd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.seefd2"), &assign_ExcDC2A_seefd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.ta"), &assign_ExcDC2A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.tb"), &assign_ExcDC2A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.tc"), &assign_ExcDC2A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.te"), &assign_ExcDC2A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.tf"), &assign_ExcDC2A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.tf1"), &assign_ExcDC2A_tf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.vrmax"), &assign_ExcDC2A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.vrmin"), &assign_ExcDC2A_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC2A.vtlim"), &assign_ExcDC2A_vtlim)); + assign_map.emplace("cim:ExcDC2A.efd1", &assign_ExcDC2A_efd1); + assign_map.emplace("cim:ExcDC2A.efd2", &assign_ExcDC2A_efd2); + assign_map.emplace("cim:ExcDC2A.exclim", &assign_ExcDC2A_exclim); + assign_map.emplace("cim:ExcDC2A.ka", &assign_ExcDC2A_ka); + assign_map.emplace("cim:ExcDC2A.ke", &assign_ExcDC2A_ke); + assign_map.emplace("cim:ExcDC2A.kf", &assign_ExcDC2A_kf); + assign_map.emplace("cim:ExcDC2A.ks", &assign_ExcDC2A_ks); + assign_map.emplace("cim:ExcDC2A.seefd1", &assign_ExcDC2A_seefd1); + assign_map.emplace("cim:ExcDC2A.seefd2", &assign_ExcDC2A_seefd2); + assign_map.emplace("cim:ExcDC2A.ta", &assign_ExcDC2A_ta); + assign_map.emplace("cim:ExcDC2A.tb", &assign_ExcDC2A_tb); + assign_map.emplace("cim:ExcDC2A.tc", &assign_ExcDC2A_tc); + assign_map.emplace("cim:ExcDC2A.te", &assign_ExcDC2A_te); + assign_map.emplace("cim:ExcDC2A.tf", &assign_ExcDC2A_tf); + assign_map.emplace("cim:ExcDC2A.tf1", &assign_ExcDC2A_tf1); + assign_map.emplace("cim:ExcDC2A.vrmax", &assign_ExcDC2A_vrmax); + assign_map.emplace("cim:ExcDC2A.vrmin", &assign_ExcDC2A_vrmin); + assign_map.emplace("cim:ExcDC2A.vtlim", &assign_ExcDC2A_vtlim); } void ExcDC2A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcDC2A.hpp b/CGMES_3.0.0/ExcDC2A.hpp index cf4fa6960..81dbb033e 100644 --- a/CGMES_3.0.0/ExcDC2A.hpp +++ b/CGMES_3.0.0/ExcDC2A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE DC2A direct current commutator exciter with speed input, one more leg block in feedback loop and without underexcitation limiters (UEL) inputs. DC type 2 excitation system model with added speed multiplier, added lead-lag, and voltage-dependent limits. - */ + /** \brief Modified IEEE DC2A direct current commutator exciter with speed input, one more leg block in feedback loop and without underexcitation limiters (UEL) inputs. DC type 2 excitation system model with added speed multiplier, added lead-lag, and voltage-dependent limits. */ class ExcDC2A : public ExcitationSystemDynamics { public: @@ -30,24 +28,59 @@ namespace CIMPP ExcDC2A(); ~ExcDC2A() override; - CIMPP::PU efd1; /* Exciter voltage at which exciter saturation is defined (<i>Efd</i><i><sub>1</sub></i>) (&gt; 0). Typical value = 3,05. Default: nullptr */ - CIMPP::PU efd2; /* Exciter voltage at which exciter saturation is defined (<i>Efd</i><i><sub>2</sub></i>) (&gt; 0). Typical value = 2,29. Default: nullptr */ - CIMPP::Boolean exclim; /* (<i>exclim</i>). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero is not applied to integrator output. Typical value = true. Default: false */ - CIMPP::PU ka; /* Voltage regulator gain (<i>Ka</i>) (&gt; 0). Typical value = 300. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (<i>Ke</i>). If <i>Ke</i> is entered as zero, the model calculates an effective value of <i>Ke</i> such that the initial condition value of <i>Vr</i> is zero. The zero value of <i>Ke</i> is not changed. If <i>Ke</i> is entered as non-zero, its value is used directly, without change. Typical value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gain (<i>Kf</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (<i>Ks</i>). Typical value = 0. Default: nullptr */ - CIMPP::Float seefd1; /* Exciter saturation function value at the corresponding exciter voltage, <i>Efd</i><i><sub>1</sub></i> (<i>Se[Efd</i><i><sub>1</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,279. Default: 0.0 */ - CIMPP::Float seefd2; /* Exciter saturation function value at the corresponding exciter voltage, <i>Efd</i><i><sub>2</sub></i> (<i>Se[Efd</i><i><sub>2</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,117. Default: 0.0 */ - CIMPP::Seconds ta; /* Voltage regulator time constant (<i>Ta</i>) (&gt; 0). Typical value = 0,01. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (<i>Tb</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (<i>Tc</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (<i>Te</i>) (&gt; 0). Typical value = 1,33. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (<i>Tf</i>) (&gt; 0). Typical value = 0,675. Default: nullptr */ - CIMPP::Seconds tf1; /* Excitation control system stabilizer time constant (<i>Tf1</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (<i>Vrmax</i>) (&gt; ExcDC2A.vrmin). Typical value = 4,95. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (<i>Vrmin</i>) (&lt; 0 and &lt; ExcDC2A.vrmax). Typical value = -4,9. Default: nullptr */ - CIMPP::Boolean vtlim; /* (<i>Vtlim</i>). true = limiter at the block (<i>Ka / [1 + sTa]</i>) is dependent on <i>Vt </i> false = limiter at the block is not dependent on <i>Vt</i>. Typical value = true. Default: false */ + /** \brief Exciter voltage at which exciter saturation is defined (<i>Efd</i><i><sub>1</sub></i>) (&gt; 0). Typical value = 3,05. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Exciter voltage at which exciter saturation is defined (<i>Efd</i><i><sub>2</sub></i>) (&gt; 0). Typical value = 2,29. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief (<i>exclim</i>). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero is not applied to integrator output. Typical value = true. Default: false */ + CIMPP::Boolean exclim; + + /** \brief Voltage regulator gain (<i>Ka</i>) (&gt; 0). Typical value = 300. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Exciter constant related to self-excited field (<i>Ke</i>). If <i>Ke</i> is entered as zero, the model calculates an effective value of <i>Ke</i> such that the initial condition value of <i>Vr</i> is zero. The zero value of <i>Ke</i> is not changed. If <i>Ke</i> is entered as non-zero, its value is used directly, without change. Typical value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gain (<i>Kf</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (<i>Ks</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>Efd</i><i><sub>1</sub></i> (<i>Se[Efd</i><i><sub>1</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,279. Default: 0.0 */ + CIMPP::Float seefd1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>Efd</i><i><sub>2</sub></i> (<i>Se[Efd</i><i><sub>2</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,117. Default: 0.0 */ + CIMPP::Float seefd2; + + /** \brief Voltage regulator time constant (<i>Ta</i>) (&gt; 0). Typical value = 0,01. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (<i>Tb</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (<i>Tc</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (<i>Te</i>) (&gt; 0). Typical value = 1,33. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (<i>Tf</i>) (&gt; 0). Typical value = 0,675. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Excitation control system stabilizer time constant (<i>Tf1</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tf1; + + /** \brief Maximum voltage regulator output (<i>Vrmax</i>) (&gt; ExcDC2A.vrmin). Typical value = 4,95. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (<i>Vrmin</i>) (&lt; 0 and &lt; ExcDC2A.vrmax). Typical value = -4,9. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief (<i>Vtlim</i>). true = limiter at the block (<i>Ka / [1 + sTa]</i>) is dependent on <i>Vt </i> false = limiter at the block is not dependent on <i>Vt</i>. Typical value = true. Default: false */ + CIMPP::Boolean vtlim; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcDC3A.cpp b/CGMES_3.0.0/ExcDC3A.cpp index 6c68afc5c..777f5a332 100644 --- a/CGMES_3.0.0/ExcDC3A.cpp +++ b/CGMES_3.0.0/ExcDC3A.cpp @@ -8,27 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcDC3A::ExcDC3A() {}; -ExcDC3A::~ExcDC3A() {}; +ExcDC3A::ExcDC3A() {} +ExcDC3A::~ExcDC3A() {} static const std::list PossibleProfilesForClass = { @@ -70,220 +54,234 @@ ExcDC3A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcDC3A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_efdlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_efdlim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdlim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_efdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_efdmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_exclim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exclim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_kr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_kr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_kv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_kv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_seefd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_seefd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_trh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_trh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->trh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcDC3A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -297,7 +295,8 @@ bool get_ExcDC3A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcDC3A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -311,7 +310,8 @@ bool get_ExcDC3A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcDC3A_efdlim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdlim; if (!buffer.str().empty()) @@ -325,7 +325,8 @@ bool get_ExcDC3A_efdlim(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC3A_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmax; if (!buffer.str().empty()) @@ -339,7 +340,8 @@ bool get_ExcDC3A_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC3A_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmin; if (!buffer.str().empty()) @@ -353,7 +355,8 @@ bool get_ExcDC3A_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC3A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exclim; if (!buffer.str().empty()) @@ -367,7 +370,8 @@ bool get_ExcDC3A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC3A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -381,7 +385,8 @@ bool get_ExcDC3A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A_kr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kr; if (!buffer.str().empty()) @@ -395,7 +400,8 @@ bool get_ExcDC3A_kr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -409,7 +415,8 @@ bool get_ExcDC3A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A_kv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kv; if (!buffer.str().empty()) @@ -423,7 +430,8 @@ bool get_ExcDC3A_kv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd1; if (!buffer.str().empty()) @@ -437,7 +445,8 @@ bool get_ExcDC3A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC3A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd2; if (!buffer.str().empty()) @@ -451,7 +460,8 @@ bool get_ExcDC3A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC3A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -465,7 +475,8 @@ bool get_ExcDC3A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A_trh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->trh; if (!buffer.str().empty()) @@ -479,7 +490,8 @@ bool get_ExcDC3A_trh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -493,7 +505,8 @@ bool get_ExcDC3A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcDC3A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -505,8 +518,6 @@ bool get_ExcDC3A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcDC3A::debugName[] = "ExcDC3A"; const char* ExcDC3A::debugString() const { @@ -515,27 +526,27 @@ const char* ExcDC3A::debugString() const void ExcDC3A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcDC3A"), &ExcDC3A_factory)); + factory_map.emplace("cim:ExcDC3A", &ExcDC3A_factory); } void ExcDC3A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.efd1"), &assign_ExcDC3A_efd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.efd2"), &assign_ExcDC3A_efd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.efdlim"), &assign_ExcDC3A_efdlim)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.efdmax"), &assign_ExcDC3A_efdmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.efdmin"), &assign_ExcDC3A_efdmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.exclim"), &assign_ExcDC3A_exclim)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.ke"), &assign_ExcDC3A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.kr"), &assign_ExcDC3A_kr)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.ks"), &assign_ExcDC3A_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.kv"), &assign_ExcDC3A_kv)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.seefd1"), &assign_ExcDC3A_seefd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.seefd2"), &assign_ExcDC3A_seefd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.te"), &assign_ExcDC3A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.trh"), &assign_ExcDC3A_trh)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.vrmax"), &assign_ExcDC3A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A.vrmin"), &assign_ExcDC3A_vrmin)); + assign_map.emplace("cim:ExcDC3A.efd1", &assign_ExcDC3A_efd1); + assign_map.emplace("cim:ExcDC3A.efd2", &assign_ExcDC3A_efd2); + assign_map.emplace("cim:ExcDC3A.efdlim", &assign_ExcDC3A_efdlim); + assign_map.emplace("cim:ExcDC3A.efdmax", &assign_ExcDC3A_efdmax); + assign_map.emplace("cim:ExcDC3A.efdmin", &assign_ExcDC3A_efdmin); + assign_map.emplace("cim:ExcDC3A.exclim", &assign_ExcDC3A_exclim); + assign_map.emplace("cim:ExcDC3A.ke", &assign_ExcDC3A_ke); + assign_map.emplace("cim:ExcDC3A.kr", &assign_ExcDC3A_kr); + assign_map.emplace("cim:ExcDC3A.ks", &assign_ExcDC3A_ks); + assign_map.emplace("cim:ExcDC3A.kv", &assign_ExcDC3A_kv); + assign_map.emplace("cim:ExcDC3A.seefd1", &assign_ExcDC3A_seefd1); + assign_map.emplace("cim:ExcDC3A.seefd2", &assign_ExcDC3A_seefd2); + assign_map.emplace("cim:ExcDC3A.te", &assign_ExcDC3A_te); + assign_map.emplace("cim:ExcDC3A.trh", &assign_ExcDC3A_trh); + assign_map.emplace("cim:ExcDC3A.vrmax", &assign_ExcDC3A_vrmax); + assign_map.emplace("cim:ExcDC3A.vrmin", &assign_ExcDC3A_vrmin); } void ExcDC3A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcDC3A.hpp b/CGMES_3.0.0/ExcDC3A.hpp index 829d9e5f8..8587096e9 100644 --- a/CGMES_3.0.0/ExcDC3A.hpp +++ b/CGMES_3.0.0/ExcDC3A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE DC3A direct current commutator exciter with speed input, and deadband. DC old type 4. - */ + /** \brief Modified IEEE DC3A direct current commutator exciter with speed input, and deadband. DC old type 4. */ class ExcDC3A : public ExcitationSystemDynamics { public: @@ -30,22 +28,53 @@ namespace CIMPP ExcDC3A(); ~ExcDC3A() override; - CIMPP::PU efd1; /* Exciter voltage at which exciter saturation is defined (<i>Efd</i><i><sub>1</sub></i>) (&gt; 0). Typical value = 2,6. Default: nullptr */ - CIMPP::PU efd2; /* Exciter voltage at which exciter saturation is defined (<i>Efd</i><i><sub>2</sub></i>) (&gt; 0). Typical value = 3,45. Default: nullptr */ - CIMPP::Boolean efdlim; /* (<i>Efdlim</i>). true = exciter output limiter is active false = exciter output limiter not active. Typical value = true. Default: false */ - CIMPP::PU efdmax; /* Maximum voltage exciter output limiter (<i>Efdmax</i>) (&gt; ExcDC3A.efdmin). Typical value = 99. Default: nullptr */ - CIMPP::PU efdmin; /* Minimum voltage exciter output limiter (<i>Efdmin</i>) (&lt; ExcDC3A.efdmax). Typical value = -99. Default: nullptr */ - CIMPP::Boolean exclim; /* (<i>exclim</i>). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero not applied to integrator output. Typical value = true. Default: false */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (<i>Ke</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU kr; /* Deadband (<i>Kr</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (<i>Ks</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU kv; /* Fast raise/lower contact setting (<i>Kv</i>) (&gt; 0). Typical value = 0,05. Default: nullptr */ - CIMPP::Float seefd1; /* Exciter saturation function value at the corresponding exciter voltage, <i>Efd</i><i><sub>1</sub></i> (<i>Se[Efd</i><i><sub>1</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,1. Default: 0.0 */ - CIMPP::Float seefd2; /* Exciter saturation function value at the corresponding exciter voltage, <i>Efd</i><i><sub>2</sub></i> (<i>Se[Efd</i><i><sub>2</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,35. Default: 0.0 */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (<i>Te</i>) (&gt; 0). Typical value = 1,83. Default: nullptr */ - CIMPP::Seconds trh; /* Rheostat travel time (<i>Trh</i>) (&gt; 0). Typical value = 20. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (<i>Vrmax</i>) (&gt; 0). Typical value = 5. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (<i>Vrmin</i>) (&lt;= 0). Typical value = 0. Default: nullptr */ + /** \brief Exciter voltage at which exciter saturation is defined (<i>Efd</i><i><sub>1</sub></i>) (&gt; 0). Typical value = 2,6. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Exciter voltage at which exciter saturation is defined (<i>Efd</i><i><sub>2</sub></i>) (&gt; 0). Typical value = 3,45. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief (<i>Efdlim</i>). true = exciter output limiter is active false = exciter output limiter not active. Typical value = true. Default: false */ + CIMPP::Boolean efdlim; + + /** \brief Maximum voltage exciter output limiter (<i>Efdmax</i>) (&gt; ExcDC3A.efdmin). Typical value = 99. Default: nullptr */ + CIMPP::PU efdmax; + + /** \brief Minimum voltage exciter output limiter (<i>Efdmin</i>) (&lt; ExcDC3A.efdmax). Typical value = -99. Default: nullptr */ + CIMPP::PU efdmin; + + /** \brief (<i>exclim</i>). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero not applied to integrator output. Typical value = true. Default: false */ + CIMPP::Boolean exclim; + + /** \brief Exciter constant related to self-excited field (<i>Ke</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Deadband (<i>Kr</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU kr; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (<i>Ks</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Fast raise/lower contact setting (<i>Kv</i>) (&gt; 0). Typical value = 0,05. Default: nullptr */ + CIMPP::PU kv; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>Efd</i><i><sub>1</sub></i> (<i>Se[Efd</i><i><sub>1</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,1. Default: 0.0 */ + CIMPP::Float seefd1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>Efd</i><i><sub>2</sub></i> (<i>Se[Efd</i><i><sub>2</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,35. Default: 0.0 */ + CIMPP::Float seefd2; + + /** \brief Exciter time constant, integration rate associated with exciter control (<i>Te</i>) (&gt; 0). Typical value = 1,83. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Rheostat travel time (<i>Trh</i>) (&gt; 0). Typical value = 20. Default: nullptr */ + CIMPP::Seconds trh; + + /** \brief Maximum voltage regulator output (<i>Vrmax</i>) (&gt; 0). Typical value = 5. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (<i>Vrmin</i>) (&lt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcDC3A1.cpp b/CGMES_3.0.0/ExcDC3A1.cpp index e8b7caeb6..4d46a92b7 100644 --- a/CGMES_3.0.0/ExcDC3A1.cpp +++ b/CGMES_3.0.0/ExcDC3A1.cpp @@ -8,25 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcDC3A1::ExcDC3A1() {}; -ExcDC3A1::~ExcDC3A1() {}; +ExcDC3A1::ExcDC3A1() {} +ExcDC3A1::~ExcDC3A1() {} static const std::list PossibleProfilesForClass = { @@ -66,194 +52,206 @@ ExcDC3A1::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcDC3A1_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_exclim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exclim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_vb1max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_vb1max(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vb1max; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_vblim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_vblim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vblim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_vbmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_vbmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vbmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcDC3A1_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcDC3A1_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcDC3A1_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exclim; if (!buffer.str().empty()) @@ -267,7 +265,8 @@ bool get_ExcDC3A1_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcDC3A1_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -281,7 +280,8 @@ bool get_ExcDC3A1_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A1_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -295,7 +295,8 @@ bool get_ExcDC3A1_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A1_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -309,7 +310,8 @@ bool get_ExcDC3A1_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A1_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -323,7 +325,8 @@ bool get_ExcDC3A1_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A1_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -337,7 +340,8 @@ bool get_ExcDC3A1_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A1_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -351,7 +355,8 @@ bool get_ExcDC3A1_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A1_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -365,7 +370,8 @@ bool get_ExcDC3A1_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A1_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -379,7 +385,8 @@ bool get_ExcDC3A1_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcDC3A1_vb1max(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vb1max; if (!buffer.str().empty()) @@ -393,7 +400,8 @@ bool get_ExcDC3A1_vb1max(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcDC3A1_vblim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vblim; if (!buffer.str().empty()) @@ -407,7 +415,8 @@ bool get_ExcDC3A1_vblim(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC3A1_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vbmax; if (!buffer.str().empty()) @@ -421,7 +430,8 @@ bool get_ExcDC3A1_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC3A1_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -435,7 +445,8 @@ bool get_ExcDC3A1_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcDC3A1_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1)) + const ExcDC3A1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -447,8 +458,6 @@ bool get_ExcDC3A1_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char ExcDC3A1::debugName[] = "ExcDC3A1"; const char* ExcDC3A1::debugString() const { @@ -457,25 +466,25 @@ const char* ExcDC3A1::debugString() const void ExcDC3A1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcDC3A1"), &ExcDC3A1_factory)); + factory_map.emplace("cim:ExcDC3A1", &ExcDC3A1_factory); } void ExcDC3A1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.exclim"), &assign_ExcDC3A1_exclim)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.ka"), &assign_ExcDC3A1_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.ke"), &assign_ExcDC3A1_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.kf"), &assign_ExcDC3A1_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.ki"), &assign_ExcDC3A1_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.kp"), &assign_ExcDC3A1_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.ta"), &assign_ExcDC3A1_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.te"), &assign_ExcDC3A1_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.tf"), &assign_ExcDC3A1_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.vb1max"), &assign_ExcDC3A1_vb1max)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.vblim"), &assign_ExcDC3A1_vblim)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.vbmax"), &assign_ExcDC3A1_vbmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.vrmax"), &assign_ExcDC3A1_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcDC3A1.vrmin"), &assign_ExcDC3A1_vrmin)); + assign_map.emplace("cim:ExcDC3A1.exclim", &assign_ExcDC3A1_exclim); + assign_map.emplace("cim:ExcDC3A1.ka", &assign_ExcDC3A1_ka); + assign_map.emplace("cim:ExcDC3A1.ke", &assign_ExcDC3A1_ke); + assign_map.emplace("cim:ExcDC3A1.kf", &assign_ExcDC3A1_kf); + assign_map.emplace("cim:ExcDC3A1.ki", &assign_ExcDC3A1_ki); + assign_map.emplace("cim:ExcDC3A1.kp", &assign_ExcDC3A1_kp); + assign_map.emplace("cim:ExcDC3A1.ta", &assign_ExcDC3A1_ta); + assign_map.emplace("cim:ExcDC3A1.te", &assign_ExcDC3A1_te); + assign_map.emplace("cim:ExcDC3A1.tf", &assign_ExcDC3A1_tf); + assign_map.emplace("cim:ExcDC3A1.vb1max", &assign_ExcDC3A1_vb1max); + assign_map.emplace("cim:ExcDC3A1.vblim", &assign_ExcDC3A1_vblim); + assign_map.emplace("cim:ExcDC3A1.vbmax", &assign_ExcDC3A1_vbmax); + assign_map.emplace("cim:ExcDC3A1.vrmax", &assign_ExcDC3A1_vrmax); + assign_map.emplace("cim:ExcDC3A1.vrmin", &assign_ExcDC3A1_vrmin); } void ExcDC3A1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcDC3A1.hpp b/CGMES_3.0.0/ExcDC3A1.hpp index d78afd97c..c9c6daded 100644 --- a/CGMES_3.0.0/ExcDC3A1.hpp +++ b/CGMES_3.0.0/ExcDC3A1.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified old IEEE type 3 excitation system. - */ + /** \brief Modified old IEEE type 3 excitation system. */ class ExcDC3A1 : public ExcitationSystemDynamics { public: @@ -29,20 +27,47 @@ namespace CIMPP ExcDC3A1(); ~ExcDC3A1() override; - CIMPP::Boolean exclim; /* (<i>exclim</i>). true = lower limit of zero is applied to integrator output false = lower limit of zero not applied to integrator output. Typical value = true. Default: false */ - CIMPP::PU ka; /* Voltage regulator gain (<i>Ka</i>) (&gt; 0). Typical value = 300. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (<i>Ke</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gain (<i>Kf</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::PU ki; /* Potential circuit gain coefficient (<i>Ki</i>) (&gt;= 0). Typical value = 4,83. Default: nullptr */ - CIMPP::PU kp; /* Potential circuit gain coefficient (<i>Kp</i>) (&gt;= 0). Typical value = 4,37. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (<i>Ta</i>) (&gt; 0). Typical value = 0,01. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (<i>Te</i>) (&gt; 0). Typical value = 1,83. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (<i>Tf</i>) (&gt;= 0). Typical value = 0,675. Default: nullptr */ - CIMPP::PU vb1max; /* Available exciter voltage limiter (<i>Vb1max</i>) (&gt; 0). Typical value = 11,63. Default: nullptr */ - CIMPP::Boolean vblim; /* Vb limiter indicator. true = exciter <i>Vbmax</i> limiter is active false = <i>Vb1max</i> is active. Typical value = true. Default: false */ - CIMPP::PU vbmax; /* Available exciter voltage limiter (<i>Vbmax</i>) (&gt; 0). Typical value = 11,63. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (<i>Vrmax</i>) (&gt; ExcDC3A1.vrmin). Typical value = 5. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (<i>Vrmin</i>) (&lt; 0 and &lt; ExcDC3A1.vrmax). Typical value = 0. Default: nullptr */ + /** \brief (<i>exclim</i>). true = lower limit of zero is applied to integrator output false = lower limit of zero not applied to integrator output. Typical value = true. Default: false */ + CIMPP::Boolean exclim; + + /** \brief Voltage regulator gain (<i>Ka</i>) (&gt; 0). Typical value = 300. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Exciter constant related to self-excited field (<i>Ke</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gain (<i>Kf</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Potential circuit gain coefficient (<i>Ki</i>) (&gt;= 0). Typical value = 4,83. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Potential circuit gain coefficient (<i>Kp</i>) (&gt;= 0). Typical value = 4,37. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Voltage regulator time constant (<i>Ta</i>) (&gt; 0). Typical value = 0,01. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Exciter time constant, integration rate associated with exciter control (<i>Te</i>) (&gt; 0). Typical value = 1,83. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (<i>Tf</i>) (&gt;= 0). Typical value = 0,675. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Available exciter voltage limiter (<i>Vb1max</i>) (&gt; 0). Typical value = 11,63. Default: nullptr */ + CIMPP::PU vb1max; + + /** \brief Vb limiter indicator. true = exciter <i>Vbmax</i> limiter is active false = <i>Vb1max</i> is active. Typical value = true. Default: false */ + CIMPP::Boolean vblim; + + /** \brief Available exciter voltage limiter (<i>Vbmax</i>) (&gt; 0). Typical value = 11,63. Default: nullptr */ + CIMPP::PU vbmax; + + /** \brief Maximum voltage regulator output (<i>Vrmax</i>) (&gt; ExcDC3A1.vrmin). Typical value = 5. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (<i>Vrmin</i>) (&lt; 0 and &lt; ExcDC3A1.vrmax). Typical value = 0. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcELIN1.cpp b/CGMES_3.0.0/ExcELIN1.cpp index 38b5a12c4..449d03fd8 100644 --- a/CGMES_3.0.0/ExcELIN1.cpp +++ b/CGMES_3.0.0/ExcELIN1.cpp @@ -8,26 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcELIN1::ExcELIN1() {}; -ExcELIN1::~ExcELIN1() {}; +ExcELIN1::ExcELIN1() {} +ExcELIN1::~ExcELIN1() {} static const std::list PossibleProfilesForClass = { @@ -68,207 +53,220 @@ ExcELIN1::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcELIN1_dpnf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_dpnf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dpnf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_efmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_efmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_efmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_efmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_ks1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_ks1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_ks2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_ks2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_smax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_smax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->smax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_tfi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_tfi(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tfi; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_tnu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_tnu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tnu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_ts1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_ts1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_ts2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_ts2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_tsw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_tsw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tsw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_vpi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_vpi(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vpi; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_vpnf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_vpnf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vpnf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_vpu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_vpu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vpu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN1_xe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN1_xe(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xe; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcELIN1_dpnf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dpnf; if (!buffer.str().empty()) @@ -282,7 +280,8 @@ bool get_ExcELIN1_dpnf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcELIN1_efmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efmax; if (!buffer.str().empty()) @@ -296,7 +295,8 @@ bool get_ExcELIN1_efmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcELIN1_efmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efmin; if (!buffer.str().empty()) @@ -310,7 +310,8 @@ bool get_ExcELIN1_efmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcELIN1_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks1; if (!buffer.str().empty()) @@ -324,7 +325,8 @@ bool get_ExcELIN1_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN1_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks2; if (!buffer.str().empty()) @@ -338,7 +340,8 @@ bool get_ExcELIN1_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN1_smax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->smax; if (!buffer.str().empty()) @@ -352,7 +355,8 @@ bool get_ExcELIN1_smax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcELIN1_tfi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tfi; if (!buffer.str().empty()) @@ -366,7 +370,8 @@ bool get_ExcELIN1_tfi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN1_tnu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tnu; if (!buffer.str().empty()) @@ -380,7 +385,8 @@ bool get_ExcELIN1_tnu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN1_ts1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts1; if (!buffer.str().empty()) @@ -394,7 +400,8 @@ bool get_ExcELIN1_ts1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN1_ts2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts2; if (!buffer.str().empty()) @@ -408,7 +415,8 @@ bool get_ExcELIN1_ts2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN1_tsw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tsw; if (!buffer.str().empty()) @@ -422,7 +430,8 @@ bool get_ExcELIN1_tsw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN1_vpi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vpi; if (!buffer.str().empty()) @@ -436,7 +445,8 @@ bool get_ExcELIN1_vpi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN1_vpnf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vpnf; if (!buffer.str().empty()) @@ -450,7 +460,8 @@ bool get_ExcELIN1_vpnf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcELIN1_vpu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vpu; if (!buffer.str().empty()) @@ -464,7 +475,8 @@ bool get_ExcELIN1_vpu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN1_xe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN1* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xe; if (!buffer.str().empty()) @@ -476,8 +488,6 @@ bool get_ExcELIN1_xe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcELIN1::debugName[] = "ExcELIN1"; const char* ExcELIN1::debugString() const { @@ -486,26 +496,26 @@ const char* ExcELIN1::debugString() const void ExcELIN1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcELIN1"), &ExcELIN1_factory)); + factory_map.emplace("cim:ExcELIN1", &ExcELIN1_factory); } void ExcELIN1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.dpnf"), &assign_ExcELIN1_dpnf)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.efmax"), &assign_ExcELIN1_efmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.efmin"), &assign_ExcELIN1_efmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.ks1"), &assign_ExcELIN1_ks1)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.ks2"), &assign_ExcELIN1_ks2)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.smax"), &assign_ExcELIN1_smax)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.tfi"), &assign_ExcELIN1_tfi)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.tnu"), &assign_ExcELIN1_tnu)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.ts1"), &assign_ExcELIN1_ts1)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.ts2"), &assign_ExcELIN1_ts2)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.tsw"), &assign_ExcELIN1_tsw)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.vpi"), &assign_ExcELIN1_vpi)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.vpnf"), &assign_ExcELIN1_vpnf)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.vpu"), &assign_ExcELIN1_vpu)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN1.xe"), &assign_ExcELIN1_xe)); + assign_map.emplace("cim:ExcELIN1.dpnf", &assign_ExcELIN1_dpnf); + assign_map.emplace("cim:ExcELIN1.efmax", &assign_ExcELIN1_efmax); + assign_map.emplace("cim:ExcELIN1.efmin", &assign_ExcELIN1_efmin); + assign_map.emplace("cim:ExcELIN1.ks1", &assign_ExcELIN1_ks1); + assign_map.emplace("cim:ExcELIN1.ks2", &assign_ExcELIN1_ks2); + assign_map.emplace("cim:ExcELIN1.smax", &assign_ExcELIN1_smax); + assign_map.emplace("cim:ExcELIN1.tfi", &assign_ExcELIN1_tfi); + assign_map.emplace("cim:ExcELIN1.tnu", &assign_ExcELIN1_tnu); + assign_map.emplace("cim:ExcELIN1.ts1", &assign_ExcELIN1_ts1); + assign_map.emplace("cim:ExcELIN1.ts2", &assign_ExcELIN1_ts2); + assign_map.emplace("cim:ExcELIN1.tsw", &assign_ExcELIN1_tsw); + assign_map.emplace("cim:ExcELIN1.vpi", &assign_ExcELIN1_vpi); + assign_map.emplace("cim:ExcELIN1.vpnf", &assign_ExcELIN1_vpnf); + assign_map.emplace("cim:ExcELIN1.vpu", &assign_ExcELIN1_vpu); + assign_map.emplace("cim:ExcELIN1.xe", &assign_ExcELIN1_xe); } void ExcELIN1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcELIN1.hpp b/CGMES_3.0.0/ExcELIN1.hpp index dbe93eb53..0774128f3 100644 --- a/CGMES_3.0.0/ExcELIN1.hpp +++ b/CGMES_3.0.0/ExcELIN1.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Static PI transformer fed excitation system ELIN (VATECH) - simplified model. This model represents an all-static excitation system. A PI voltage controller establishes a desired field current set point for a proportional current controller. The integrator of the PI controller has a follow-up input to match its signal to the present field current. A power system stabilizer with power input is included in the model. - */ + /** \brief Static PI transformer fed excitation system ELIN (VATECH) - simplified model. This model represents an all-static excitation system. A PI voltage controller establishes a desired field current set point for a proportional current controller. The integrator of the PI controller has a follow-up input to match its signal to the present field current. A power system stabilizer with power input is included in the model. */ class ExcELIN1 : public ExcitationSystemDynamics { public: @@ -28,21 +26,50 @@ namespace CIMPP ExcELIN1(); ~ExcELIN1() override; - CIMPP::PU dpnf; /* Controller follow up deadband (<i>Dpnf</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU efmax; /* Maximum open circuit excitation voltage (<i>Efmax</i>) (&gt; ExcELIN1.efmin). Typical value = 5. Default: nullptr */ - CIMPP::PU efmin; /* Minimum open circuit excitation voltage (<i>Efmin</i>) (&lt; ExcELIN1.efmax). Typical value = -5. Default: nullptr */ - CIMPP::PU ks1; /* Stabilizer gain 1 (<i>Ks1</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU ks2; /* Stabilizer gain 2 (<i>Ks2</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU smax; /* Stabilizer limit output (<i>smax</i>). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds tfi; /* Current transducer time constant (<i>Tfi</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tnu; /* Controller reset time constant (<i>Tnu</i>) (&gt;= 0). Typical value = 2. Default: nullptr */ - CIMPP::Seconds ts1; /* Stabilizer phase lag time constant (<i>Ts1</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::Seconds ts2; /* Stabilizer filter time constant (<i>Ts2</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::Seconds tsw; /* Stabilizer parameters (<i>Tsw</i>) (&gt;= 0). Typical value = 3. Default: nullptr */ - CIMPP::PU vpi; /* Current controller gain (<i>Vpi</i>). Typical value = 12,45. Default: nullptr */ - CIMPP::PU vpnf; /* Controller follow up gain (<i>Vpnf</i>). Typical value = 2. Default: nullptr */ - CIMPP::PU vpu; /* Voltage controller proportional gain (<i>Vpu</i>). Typical value = 34,5. Default: nullptr */ - CIMPP::PU xe; /* Excitation transformer effective reactance (<i>Xe</i>) (&gt;= 0). <i>Xe</i> represents the regulation of the transformer/rectifier unit. Typical value = 0,06. Default: nullptr */ + /** \brief Controller follow up deadband (<i>Dpnf</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU dpnf; + + /** \brief Maximum open circuit excitation voltage (<i>Efmax</i>) (&gt; ExcELIN1.efmin). Typical value = 5. Default: nullptr */ + CIMPP::PU efmax; + + /** \brief Minimum open circuit excitation voltage (<i>Efmin</i>) (&lt; ExcELIN1.efmax). Typical value = -5. Default: nullptr */ + CIMPP::PU efmin; + + /** \brief Stabilizer gain 1 (<i>Ks1</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU ks1; + + /** \brief Stabilizer gain 2 (<i>Ks2</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU ks2; + + /** \brief Stabilizer limit output (<i>smax</i>). Typical value = 0,1. Default: nullptr */ + CIMPP::PU smax; + + /** \brief Current transducer time constant (<i>Tfi</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tfi; + + /** \brief Controller reset time constant (<i>Tnu</i>) (&gt;= 0). Typical value = 2. Default: nullptr */ + CIMPP::Seconds tnu; + + /** \brief Stabilizer phase lag time constant (<i>Ts1</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds ts1; + + /** \brief Stabilizer filter time constant (<i>Ts2</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds ts2; + + /** \brief Stabilizer parameters (<i>Tsw</i>) (&gt;= 0). Typical value = 3. Default: nullptr */ + CIMPP::Seconds tsw; + + /** \brief Current controller gain (<i>Vpi</i>). Typical value = 12,45. Default: nullptr */ + CIMPP::PU vpi; + + /** \brief Controller follow up gain (<i>Vpnf</i>). Typical value = 2. Default: nullptr */ + CIMPP::PU vpnf; + + /** \brief Voltage controller proportional gain (<i>Vpu</i>). Typical value = 34,5. Default: nullptr */ + CIMPP::PU vpu; + + /** \brief Excitation transformer effective reactance (<i>Xe</i>) (&gt;= 0). <i>Xe</i> represents the regulation of the transformer/rectifier unit. Typical value = 0,06. Default: nullptr */ + CIMPP::PU xe; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcELIN2.cpp b/CGMES_3.0.0/ExcELIN2.cpp index c61563e77..afd309820 100644 --- a/CGMES_3.0.0/ExcELIN2.cpp +++ b/CGMES_3.0.0/ExcELIN2.cpp @@ -8,38 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcELIN2::ExcELIN2() {}; -ExcELIN2::~ExcELIN2() {}; +ExcELIN2::ExcELIN2() {} +ExcELIN2::~ExcELIN2() {} static const std::list PossibleProfilesForClass = { @@ -92,363 +65,388 @@ ExcELIN2::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcELIN2_efdbas(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_efdbas(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdbas; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_iefmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_iefmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->iefmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_iefmax2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_iefmax2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->iefmax2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_iefmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_iefmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->iefmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_k1ec(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_k1ec(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1ec; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_k4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_kd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_kd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_ke2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_ke2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_ketb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_ketb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ketb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_pid1max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_pid1max(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pid1max; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_tb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_tb1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_te2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_te2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_ti1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_ti1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_ti3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_ti3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_ti4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_ti4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_tr4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_tr4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_upmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_upmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->upmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_upmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_upmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->upmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcELIN2_xp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcELIN2_xp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcELIN2_efdbas(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdbas; if (!buffer.str().empty()) @@ -462,7 +460,8 @@ bool get_ExcELIN2_efdbas(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcELIN2_iefmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->iefmax; if (!buffer.str().empty()) @@ -476,7 +475,8 @@ bool get_ExcELIN2_iefmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcELIN2_iefmax2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->iefmax2; if (!buffer.str().empty()) @@ -490,7 +490,8 @@ bool get_ExcELIN2_iefmax2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcELIN2_iefmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->iefmin; if (!buffer.str().empty()) @@ -504,7 +505,8 @@ bool get_ExcELIN2_iefmin(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcELIN2_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -518,7 +520,8 @@ bool get_ExcELIN2_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcELIN2_k1ec(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1ec; if (!buffer.str().empty()) @@ -532,7 +535,8 @@ bool get_ExcELIN2_k1ec(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcELIN2_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -546,7 +550,8 @@ bool get_ExcELIN2_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcELIN2_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -560,7 +565,8 @@ bool get_ExcELIN2_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcELIN2_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k4; if (!buffer.str().empty()) @@ -574,7 +580,8 @@ bool get_ExcELIN2_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcELIN2_kd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd1; if (!buffer.str().empty()) @@ -588,7 +595,8 @@ bool get_ExcELIN2_kd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_ke2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke2; if (!buffer.str().empty()) @@ -602,7 +610,8 @@ bool get_ExcELIN2_ke2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_ketb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ketb; if (!buffer.str().empty()) @@ -616,7 +625,8 @@ bool get_ExcELIN2_ketb(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcELIN2_pid1max(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pid1max; if (!buffer.str().empty()) @@ -630,7 +640,8 @@ bool get_ExcELIN2_pid1max(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcELIN2_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -644,7 +655,8 @@ bool get_ExcELIN2_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcELIN2_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -658,7 +670,8 @@ bool get_ExcELIN2_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcELIN2_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb1; if (!buffer.str().empty()) @@ -672,7 +685,8 @@ bool get_ExcELIN2_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -686,7 +700,8 @@ bool get_ExcELIN2_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcELIN2_te2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te2; if (!buffer.str().empty()) @@ -700,7 +715,8 @@ bool get_ExcELIN2_te2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_ti1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti1; if (!buffer.str().empty()) @@ -714,7 +730,8 @@ bool get_ExcELIN2_ti1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_ti3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti3; if (!buffer.str().empty()) @@ -728,7 +745,8 @@ bool get_ExcELIN2_ti3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_ti4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti4; if (!buffer.str().empty()) @@ -742,7 +760,8 @@ bool get_ExcELIN2_ti4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_tr4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr4; if (!buffer.str().empty()) @@ -756,7 +775,8 @@ bool get_ExcELIN2_tr4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_upmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->upmax; if (!buffer.str().empty()) @@ -770,7 +790,8 @@ bool get_ExcELIN2_upmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcELIN2_upmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->upmin; if (!buffer.str().empty()) @@ -784,7 +805,8 @@ bool get_ExcELIN2_upmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcELIN2_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -798,7 +820,8 @@ bool get_ExcELIN2_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -812,7 +835,8 @@ bool get_ExcELIN2_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcELIN2_xp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcELIN2* element = dynamic_cast(BaseClass_ptr1)) + const ExcELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xp; if (!buffer.str().empty()) @@ -824,8 +848,6 @@ bool get_ExcELIN2_xp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcELIN2::debugName[] = "ExcELIN2"; const char* ExcELIN2::debugString() const { @@ -834,38 +856,38 @@ const char* ExcELIN2::debugString() const void ExcELIN2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcELIN2"), &ExcELIN2_factory)); + factory_map.emplace("cim:ExcELIN2", &ExcELIN2_factory); } void ExcELIN2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.efdbas"), &assign_ExcELIN2_efdbas)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.iefmax"), &assign_ExcELIN2_iefmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.iefmax2"), &assign_ExcELIN2_iefmax2)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.iefmin"), &assign_ExcELIN2_iefmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.k1"), &assign_ExcELIN2_k1)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.k1ec"), &assign_ExcELIN2_k1ec)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.k2"), &assign_ExcELIN2_k2)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.k3"), &assign_ExcELIN2_k3)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.k4"), &assign_ExcELIN2_k4)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.kd1"), &assign_ExcELIN2_kd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.ke2"), &assign_ExcELIN2_ke2)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.ketb"), &assign_ExcELIN2_ketb)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.pid1max"), &assign_ExcELIN2_pid1max)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.seve1"), &assign_ExcELIN2_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.seve2"), &assign_ExcELIN2_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.tb1"), &assign_ExcELIN2_tb1)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.te"), &assign_ExcELIN2_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.te2"), &assign_ExcELIN2_te2)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.ti1"), &assign_ExcELIN2_ti1)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.ti3"), &assign_ExcELIN2_ti3)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.ti4"), &assign_ExcELIN2_ti4)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.tr4"), &assign_ExcELIN2_tr4)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.upmax"), &assign_ExcELIN2_upmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.upmin"), &assign_ExcELIN2_upmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.ve1"), &assign_ExcELIN2_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.ve2"), &assign_ExcELIN2_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcELIN2.xp"), &assign_ExcELIN2_xp)); + assign_map.emplace("cim:ExcELIN2.efdbas", &assign_ExcELIN2_efdbas); + assign_map.emplace("cim:ExcELIN2.iefmax", &assign_ExcELIN2_iefmax); + assign_map.emplace("cim:ExcELIN2.iefmax2", &assign_ExcELIN2_iefmax2); + assign_map.emplace("cim:ExcELIN2.iefmin", &assign_ExcELIN2_iefmin); + assign_map.emplace("cim:ExcELIN2.k1", &assign_ExcELIN2_k1); + assign_map.emplace("cim:ExcELIN2.k1ec", &assign_ExcELIN2_k1ec); + assign_map.emplace("cim:ExcELIN2.k2", &assign_ExcELIN2_k2); + assign_map.emplace("cim:ExcELIN2.k3", &assign_ExcELIN2_k3); + assign_map.emplace("cim:ExcELIN2.k4", &assign_ExcELIN2_k4); + assign_map.emplace("cim:ExcELIN2.kd1", &assign_ExcELIN2_kd1); + assign_map.emplace("cim:ExcELIN2.ke2", &assign_ExcELIN2_ke2); + assign_map.emplace("cim:ExcELIN2.ketb", &assign_ExcELIN2_ketb); + assign_map.emplace("cim:ExcELIN2.pid1max", &assign_ExcELIN2_pid1max); + assign_map.emplace("cim:ExcELIN2.seve1", &assign_ExcELIN2_seve1); + assign_map.emplace("cim:ExcELIN2.seve2", &assign_ExcELIN2_seve2); + assign_map.emplace("cim:ExcELIN2.tb1", &assign_ExcELIN2_tb1); + assign_map.emplace("cim:ExcELIN2.te", &assign_ExcELIN2_te); + assign_map.emplace("cim:ExcELIN2.te2", &assign_ExcELIN2_te2); + assign_map.emplace("cim:ExcELIN2.ti1", &assign_ExcELIN2_ti1); + assign_map.emplace("cim:ExcELIN2.ti3", &assign_ExcELIN2_ti3); + assign_map.emplace("cim:ExcELIN2.ti4", &assign_ExcELIN2_ti4); + assign_map.emplace("cim:ExcELIN2.tr4", &assign_ExcELIN2_tr4); + assign_map.emplace("cim:ExcELIN2.upmax", &assign_ExcELIN2_upmax); + assign_map.emplace("cim:ExcELIN2.upmin", &assign_ExcELIN2_upmin); + assign_map.emplace("cim:ExcELIN2.ve1", &assign_ExcELIN2_ve1); + assign_map.emplace("cim:ExcELIN2.ve2", &assign_ExcELIN2_ve2); + assign_map.emplace("cim:ExcELIN2.xp", &assign_ExcELIN2_xp); } void ExcELIN2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcELIN2.hpp b/CGMES_3.0.0/ExcELIN2.hpp index e3a07482d..e9741911a 100644 --- a/CGMES_3.0.0/ExcELIN2.hpp +++ b/CGMES_3.0.0/ExcELIN2.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Detailed excitation system ELIN (VATECH). This model represents an all-static excitation system. A PI voltage controller establishes a desired field current set point for a proportional current controller. The integrator of the PI controller has a follow-up input to match its signal to the present field current. Power system stabilizer models used in conjunction with this excitation system model: PssELIN2, PssIEEE2B, Pss2B. - */ + /** \brief Detailed excitation system ELIN (VATECH). This model represents an all-static excitation system. A PI voltage controller establishes a desired field current set point for a proportional current controller. The integrator of the PI controller has a follow-up input to match its signal to the present field current. Power system stabilizer models used in conjunction with this excitation system model: PssELIN2, PssIEEE2B, Pss2B. */ class ExcELIN2 : public ExcitationSystemDynamics { public: @@ -28,33 +26,86 @@ namespace CIMPP ExcELIN2(); ~ExcELIN2() override; - CIMPP::PU efdbas; /* Gain (<i>Efdbas</i>). Typical value = 0,1. Default: nullptr */ - CIMPP::PU iefmax; /* Limiter (<i>I</i><i><sub>efmax</sub></i>) (&gt; ExcELIN2.iefmin). Typical value = 1. Default: nullptr */ - CIMPP::PU iefmax2; /* Minimum open circuit excitation voltage (<i>I</i><i><sub>efmax2</sub></i>). Typical value = -5. Default: nullptr */ - CIMPP::PU iefmin; /* Limiter (<i>I</i><i><sub>efmin</sub></i>) (&lt; ExcELIN2.iefmax). Typical value = 1. Default: nullptr */ - CIMPP::PU k1; /* Voltage regulator input gain (<i>K1</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU k1ec; /* Voltage regulator input limit (<i>K1ec</i>). Typical value = 2. Default: nullptr */ - CIMPP::PU k2; /* Gain (<i>K2</i>). Typical value = 5. Default: nullptr */ - CIMPP::PU k3; /* Gain (<i>K3</i>). Typical value = 0,1. Default: nullptr */ - CIMPP::PU k4; /* Gain (<i>K4</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU kd1; /* Voltage controller derivative gain (<i>Kd1</i>). Typical value = 34,5. Default: nullptr */ - CIMPP::PU ke2; /* Gain (<i>Ke2</i>). Typical value = 0,1. Default: nullptr */ - CIMPP::PU ketb; /* Gain (<i>Ketb</i>). Typical value = 0,06. Default: nullptr */ - CIMPP::PU pid1max; /* Controller follow up gain (<i>PID1max</i>). Typical value = 2. Default: nullptr */ - CIMPP::PU seve1; /* Exciter saturation function value at the corresponding exciter voltage, <i>Ve</i><i><sub>1</sub></i>, back of commutating reactance (<i>Se[Ve</i><i><sub>1</sub></i><i>]</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::PU seve2; /* Exciter saturation function value at the corresponding exciter voltage, <i>Ve</i><i><sub>2</sub></i>, back of commutating reactance (<i>Se[Ve</i><i><sub>2</sub></i><i>]</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::Seconds tb1; /* Voltage controller derivative washout time constant (<i>Tb1</i>) (&gt;= 0). Typical value = 12,45. Default: nullptr */ - CIMPP::Seconds te; /* Time constant (<i>Te</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds te2; /* Time Constant (<i>T</i><i><sub>e2</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::PU ti1; /* Controller follow up deadband (<i>Ti1</i>). Typical value = 0. Default: nullptr */ - CIMPP::Seconds ti3; /* Time constant (<i>T</i><i><sub>i3</sub></i>) (&gt;= 0). Typical value = 3. Default: nullptr */ - CIMPP::Seconds ti4; /* Time constant (<i>T</i><i><sub>i4</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tr4; /* Time constant (<i>T</i><i><sub>r4</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::PU upmax; /* Limiter (<i>Upmax</i>) (&gt; ExcELIN2.upmin). Typical value = 3. Default: nullptr */ - CIMPP::PU upmin; /* Limiter (<i>Upmin</i>) (&lt; ExcELIN2.upmax). Typical value = 0. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>Ve</i><i><sub>1</sub></i>) (&gt; 0). Typical value = 3. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>Ve</i><i><sub>2</sub></i>) (&gt; 0). Typical value = 0. Default: nullptr */ - CIMPP::PU xp; /* Excitation transformer effective reactance (<i>Xp</i>). Typical value = 1. Default: nullptr */ + /** \brief Gain (<i>Efdbas</i>). Typical value = 0,1. Default: nullptr */ + CIMPP::PU efdbas; + + /** \brief Limiter (<i>I</i><i><sub>efmax</sub></i>) (&gt; ExcELIN2.iefmin). Typical value = 1. Default: nullptr */ + CIMPP::PU iefmax; + + /** \brief Minimum open circuit excitation voltage (<i>I</i><i><sub>efmax2</sub></i>). Typical value = -5. Default: nullptr */ + CIMPP::PU iefmax2; + + /** \brief Limiter (<i>I</i><i><sub>efmin</sub></i>) (&lt; ExcELIN2.iefmax). Typical value = 1. Default: nullptr */ + CIMPP::PU iefmin; + + /** \brief Voltage regulator input gain (<i>K1</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU k1; + + /** \brief Voltage regulator input limit (<i>K1ec</i>). Typical value = 2. Default: nullptr */ + CIMPP::PU k1ec; + + /** \brief Gain (<i>K2</i>). Typical value = 5. Default: nullptr */ + CIMPP::PU k2; + + /** \brief Gain (<i>K3</i>). Typical value = 0,1. Default: nullptr */ + CIMPP::PU k3; + + /** \brief Gain (<i>K4</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU k4; + + /** \brief Voltage controller derivative gain (<i>Kd1</i>). Typical value = 34,5. Default: nullptr */ + CIMPP::PU kd1; + + /** \brief Gain (<i>Ke2</i>). Typical value = 0,1. Default: nullptr */ + CIMPP::PU ke2; + + /** \brief Gain (<i>Ketb</i>). Typical value = 0,06. Default: nullptr */ + CIMPP::PU ketb; + + /** \brief Controller follow up gain (<i>PID1max</i>). Typical value = 2. Default: nullptr */ + CIMPP::PU pid1max; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>Ve</i><i><sub>1</sub></i>, back of commutating reactance (<i>Se[Ve</i><i><sub>1</sub></i><i>]</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::PU seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>Ve</i><i><sub>2</sub></i>, back of commutating reactance (<i>Se[Ve</i><i><sub>2</sub></i><i>]</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::PU seve2; + + /** \brief Voltage controller derivative washout time constant (<i>Tb1</i>) (&gt;= 0). Typical value = 12,45. Default: nullptr */ + CIMPP::Seconds tb1; + + /** \brief Time constant (<i>Te</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Time Constant (<i>T</i><i><sub>e2</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds te2; + + /** \brief Controller follow up deadband (<i>Ti1</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU ti1; + + /** \brief Time constant (<i>T</i><i><sub>i3</sub></i>) (&gt;= 0). Typical value = 3. Default: nullptr */ + CIMPP::Seconds ti3; + + /** \brief Time constant (<i>T</i><i><sub>i4</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds ti4; + + /** \brief Time constant (<i>T</i><i><sub>r4</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tr4; + + /** \brief Limiter (<i>Upmax</i>) (&gt; ExcELIN2.upmin). Typical value = 3. Default: nullptr */ + CIMPP::PU upmax; + + /** \brief Limiter (<i>Upmin</i>) (&lt; ExcELIN2.upmax). Typical value = 0. Default: nullptr */ + CIMPP::PU upmin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>Ve</i><i><sub>1</sub></i>) (&gt; 0). Typical value = 3. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>Ve</i><i><sub>2</sub></i>) (&gt; 0). Typical value = 0. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Excitation transformer effective reactance (<i>Xp</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU xp; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcHU.cpp b/CGMES_3.0.0/ExcHU.cpp index bdb67cdfb..d00bf89d8 100644 --- a/CGMES_3.0.0/ExcHU.cpp +++ b/CGMES_3.0.0/ExcHU.cpp @@ -8,23 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -ExcHU::ExcHU() {}; -ExcHU::~ExcHU() {}; +ExcHU::ExcHU() {} +ExcHU::~ExcHU() {} static const std::list PossibleProfilesForClass = { @@ -62,168 +50,178 @@ ExcHU::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcHU_ae(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_ae(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ae; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_ai(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_ai(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ai; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_atr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_atr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->atr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_emax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_emax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->emax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_emin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_emin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->emin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_imax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_imax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->imax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_imin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_imin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->imin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_ti(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_ti(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcHU_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcHU_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcHU* element = dynamic_cast(BaseClass_ptr1)) + ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcHU_ae(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ae; if (!buffer.str().empty()) @@ -237,7 +235,8 @@ bool get_ExcHU_ae(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_ai(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ai; if (!buffer.str().empty()) @@ -251,7 +250,8 @@ bool get_ExcHU_ai(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_atr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->atr; if (!buffer.str().empty()) @@ -265,7 +265,8 @@ bool get_ExcHU_atr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->emax; if (!buffer.str().empty()) @@ -279,7 +280,8 @@ bool get_ExcHU_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_emin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->emin; if (!buffer.str().empty()) @@ -293,7 +295,8 @@ bool get_ExcHU_emin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_imax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->imax; if (!buffer.str().empty()) @@ -307,7 +310,8 @@ bool get_ExcHU_imax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_imin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->imin; if (!buffer.str().empty()) @@ -321,7 +325,8 @@ bool get_ExcHU_imin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -335,7 +340,8 @@ bool get_ExcHU_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -349,7 +355,8 @@ bool get_ExcHU_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -363,7 +370,8 @@ bool get_ExcHU_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_ti(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti; if (!buffer.str().empty()) @@ -377,7 +385,8 @@ bool get_ExcHU_ti(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcHU_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcHU* element = dynamic_cast(BaseClass_ptr1)) + const ExcHU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -389,8 +398,6 @@ bool get_ExcHU_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcHU::debugName[] = "ExcHU"; const char* ExcHU::debugString() const { @@ -399,23 +406,23 @@ const char* ExcHU::debugString() const void ExcHU::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcHU"), &ExcHU_factory)); + factory_map.emplace("cim:ExcHU", &ExcHU_factory); } void ExcHU::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcHU.ae"), &assign_ExcHU_ae)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.ai"), &assign_ExcHU_ai)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.atr"), &assign_ExcHU_atr)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.emax"), &assign_ExcHU_emax)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.emin"), &assign_ExcHU_emin)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.imax"), &assign_ExcHU_imax)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.imin"), &assign_ExcHU_imin)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.ke"), &assign_ExcHU_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.ki"), &assign_ExcHU_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.te"), &assign_ExcHU_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.ti"), &assign_ExcHU_ti)); - assign_map.insert(std::make_pair(std::string("cim:ExcHU.tr"), &assign_ExcHU_tr)); + assign_map.emplace("cim:ExcHU.ae", &assign_ExcHU_ae); + assign_map.emplace("cim:ExcHU.ai", &assign_ExcHU_ai); + assign_map.emplace("cim:ExcHU.atr", &assign_ExcHU_atr); + assign_map.emplace("cim:ExcHU.emax", &assign_ExcHU_emax); + assign_map.emplace("cim:ExcHU.emin", &assign_ExcHU_emin); + assign_map.emplace("cim:ExcHU.imax", &assign_ExcHU_imax); + assign_map.emplace("cim:ExcHU.imin", &assign_ExcHU_imin); + assign_map.emplace("cim:ExcHU.ke", &assign_ExcHU_ke); + assign_map.emplace("cim:ExcHU.ki", &assign_ExcHU_ki); + assign_map.emplace("cim:ExcHU.te", &assign_ExcHU_te); + assign_map.emplace("cim:ExcHU.ti", &assign_ExcHU_ti); + assign_map.emplace("cim:ExcHU.tr", &assign_ExcHU_tr); } void ExcHU::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcHU.hpp b/CGMES_3.0.0/ExcHU.hpp index 97c15c32a..36c7273fb 100644 --- a/CGMES_3.0.0/ExcHU.hpp +++ b/CGMES_3.0.0/ExcHU.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Hungarian excitation system, with built-in voltage transducer. - */ + /** \brief Hungarian excitation system, with built-in voltage transducer. */ class ExcHU : public ExcitationSystemDynamics { public: @@ -29,18 +27,41 @@ namespace CIMPP ExcHU(); ~ExcHU() override; - CIMPP::PU ae; /* Major loop PI tag gain factor (<i>Ae</i>). Typical value = 3. Default: nullptr */ - CIMPP::PU ai; /* Minor loop PI tag gain factor (<i>Ai</i>). Typical value = 22. Default: nullptr */ - CIMPP::PU atr; /* AVR constant (<i>Atr</i>). Typical value = 2,19. Default: nullptr */ - CIMPP::PU emax; /* Field voltage control signal upper limit on AVR base (<i>Emax</i>) (&gt; ExcHU.emin). Typical value = 0,996. Default: nullptr */ - CIMPP::PU emin; /* Field voltage control signal lower limit on AVR base (<i>Emin</i>) (&lt; ExcHU.emax). Typical value = -0,866. Default: nullptr */ - CIMPP::PU imax; /* Major loop PI tag output signal upper limit (<i>Imax</i>) (&gt; ExcHU.imin). Typical value = 2,19. Default: nullptr */ - CIMPP::PU imin; /* Major loop PI tag output signal lower limit (<i>Imin</i>) (&lt; ExcHU.imax). Typical value = 0,1. Default: nullptr */ - CIMPP::Float ke; /* Voltage base conversion constant (<i>Ke</i>). Typical value = 4,666. Default: 0.0 */ - CIMPP::Float ki; /* Current base conversion constant (<i>Ki</i>). Typical value = 0,21428. Default: 0.0 */ - CIMPP::Seconds te; /* Major loop PI tag integration time constant (<i>Te</i>) (&gt;= 0). Typical value = 0,154. Default: nullptr */ - CIMPP::Seconds ti; /* Minor loop PI control tag integration time constant (<i>Ti</i>) (&gt;= 0). Typical value = 0,01333. Default: nullptr */ - CIMPP::Seconds tr; /* Filter time constant (<i>Tr</i>) (&gt;= 0). If a voltage compensator is used in conjunction with this excitation system model, <i>Tr </i>should be set to 0. Typical value = 0,01. Default: nullptr */ + /** \brief Major loop PI tag gain factor (<i>Ae</i>). Typical value = 3. Default: nullptr */ + CIMPP::PU ae; + + /** \brief Minor loop PI tag gain factor (<i>Ai</i>). Typical value = 22. Default: nullptr */ + CIMPP::PU ai; + + /** \brief AVR constant (<i>Atr</i>). Typical value = 2,19. Default: nullptr */ + CIMPP::PU atr; + + /** \brief Field voltage control signal upper limit on AVR base (<i>Emax</i>) (&gt; ExcHU.emin). Typical value = 0,996. Default: nullptr */ + CIMPP::PU emax; + + /** \brief Field voltage control signal lower limit on AVR base (<i>Emin</i>) (&lt; ExcHU.emax). Typical value = -0,866. Default: nullptr */ + CIMPP::PU emin; + + /** \brief Major loop PI tag output signal upper limit (<i>Imax</i>) (&gt; ExcHU.imin). Typical value = 2,19. Default: nullptr */ + CIMPP::PU imax; + + /** \brief Major loop PI tag output signal lower limit (<i>Imin</i>) (&lt; ExcHU.imax). Typical value = 0,1. Default: nullptr */ + CIMPP::PU imin; + + /** \brief Voltage base conversion constant (<i>Ke</i>). Typical value = 4,666. Default: 0.0 */ + CIMPP::Float ke; + + /** \brief Current base conversion constant (<i>Ki</i>). Typical value = 0,21428. Default: 0.0 */ + CIMPP::Float ki; + + /** \brief Major loop PI tag integration time constant (<i>Te</i>) (&gt;= 0). Typical value = 0,154. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Minor loop PI control tag integration time constant (<i>Ti</i>) (&gt;= 0). Typical value = 0,01333. Default: nullptr */ + CIMPP::Seconds ti; + + /** \brief Filter time constant (<i>Tr</i>) (&gt;= 0). If a voltage compensator is used in conjunction with this excitation system model, <i>Tr </i>should be set to 0. Typical value = 0,01. Default: nullptr */ + CIMPP::Seconds tr; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcIEEEAC1A.cpp b/CGMES_3.0.0/ExcIEEEAC1A.cpp index 5a14428fc..9b4889e3d 100644 --- a/CGMES_3.0.0/ExcIEEEAC1A.cpp +++ b/CGMES_3.0.0/ExcIEEEAC1A.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEAC1A::ExcIEEEAC1A() {}; -ExcIEEEAC1A::~ExcIEEEAC1A() {}; +ExcIEEEAC1A::ExcIEEEAC1A() {} +ExcIEEEAC1A::~ExcIEEEAC1A() {} static const std::list PossibleProfilesForClass = { @@ -74,246 +56,262 @@ ExcIEEEAC1A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEAC1A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC1A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEAC1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -327,7 +325,8 @@ bool get_ExcIEEEAC1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -341,7 +340,8 @@ bool get_ExcIEEEAC1A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -355,7 +355,8 @@ bool get_ExcIEEEAC1A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -369,7 +370,8 @@ bool get_ExcIEEEAC1A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -383,7 +385,8 @@ bool get_ExcIEEEAC1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -397,7 +400,8 @@ bool get_ExcIEEEAC1A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC1A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -411,7 +415,8 @@ bool get_ExcIEEEAC1A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -425,7 +430,8 @@ bool get_ExcIEEEAC1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -439,7 +445,8 @@ bool get_ExcIEEEAC1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -453,7 +460,8 @@ bool get_ExcIEEEAC1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -467,7 +475,8 @@ bool get_ExcIEEEAC1A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -481,7 +490,8 @@ bool get_ExcIEEEAC1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC1A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -495,7 +505,8 @@ bool get_ExcIEEEAC1A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC1A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -509,7 +520,8 @@ bool get_ExcIEEEAC1A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC1A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -523,7 +535,8 @@ bool get_ExcIEEEAC1A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC1A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -537,7 +550,8 @@ bool get_ExcIEEEAC1A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -551,7 +565,8 @@ bool get_ExcIEEEAC1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -563,8 +578,6 @@ bool get_ExcIEEEAC1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEAC1A::debugName[] = "ExcIEEEAC1A"; const char* ExcIEEEAC1A::debugString() const { @@ -573,29 +586,29 @@ const char* ExcIEEEAC1A::debugString() const void ExcIEEEAC1A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A"), &ExcIEEEAC1A_factory)); + factory_map.emplace("cim:ExcIEEEAC1A", &ExcIEEEAC1A_factory); } void ExcIEEEAC1A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.ka"), &assign_ExcIEEEAC1A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.kc"), &assign_ExcIEEEAC1A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.kd"), &assign_ExcIEEEAC1A_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.ke"), &assign_ExcIEEEAC1A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.kf"), &assign_ExcIEEEAC1A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.seve1"), &assign_ExcIEEEAC1A_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.seve2"), &assign_ExcIEEEAC1A_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.ta"), &assign_ExcIEEEAC1A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.tb"), &assign_ExcIEEEAC1A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.tc"), &assign_ExcIEEEAC1A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.te"), &assign_ExcIEEEAC1A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.tf"), &assign_ExcIEEEAC1A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.vamax"), &assign_ExcIEEEAC1A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.vamin"), &assign_ExcIEEEAC1A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.ve1"), &assign_ExcIEEEAC1A_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.ve2"), &assign_ExcIEEEAC1A_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.vrmax"), &assign_ExcIEEEAC1A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC1A.vrmin"), &assign_ExcIEEEAC1A_vrmin)); + assign_map.emplace("cim:ExcIEEEAC1A.ka", &assign_ExcIEEEAC1A_ka); + assign_map.emplace("cim:ExcIEEEAC1A.kc", &assign_ExcIEEEAC1A_kc); + assign_map.emplace("cim:ExcIEEEAC1A.kd", &assign_ExcIEEEAC1A_kd); + assign_map.emplace("cim:ExcIEEEAC1A.ke", &assign_ExcIEEEAC1A_ke); + assign_map.emplace("cim:ExcIEEEAC1A.kf", &assign_ExcIEEEAC1A_kf); + assign_map.emplace("cim:ExcIEEEAC1A.seve1", &assign_ExcIEEEAC1A_seve1); + assign_map.emplace("cim:ExcIEEEAC1A.seve2", &assign_ExcIEEEAC1A_seve2); + assign_map.emplace("cim:ExcIEEEAC1A.ta", &assign_ExcIEEEAC1A_ta); + assign_map.emplace("cim:ExcIEEEAC1A.tb", &assign_ExcIEEEAC1A_tb); + assign_map.emplace("cim:ExcIEEEAC1A.tc", &assign_ExcIEEEAC1A_tc); + assign_map.emplace("cim:ExcIEEEAC1A.te", &assign_ExcIEEEAC1A_te); + assign_map.emplace("cim:ExcIEEEAC1A.tf", &assign_ExcIEEEAC1A_tf); + assign_map.emplace("cim:ExcIEEEAC1A.vamax", &assign_ExcIEEEAC1A_vamax); + assign_map.emplace("cim:ExcIEEEAC1A.vamin", &assign_ExcIEEEAC1A_vamin); + assign_map.emplace("cim:ExcIEEEAC1A.ve1", &assign_ExcIEEEAC1A_ve1); + assign_map.emplace("cim:ExcIEEEAC1A.ve2", &assign_ExcIEEEAC1A_ve2); + assign_map.emplace("cim:ExcIEEEAC1A.vrmax", &assign_ExcIEEEAC1A_vrmax); + assign_map.emplace("cim:ExcIEEEAC1A.vrmin", &assign_ExcIEEEAC1A_vrmin); } void ExcIEEEAC1A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcIEEEAC1A.hpp b/CGMES_3.0.0/ExcIEEEAC1A.hpp index 6cf53705b..44a856746 100644 --- a/CGMES_3.0.0/ExcIEEEAC1A.hpp +++ b/CGMES_3.0.0/ExcIEEEAC1A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE 421.5-2005 type AC1A model. The model represents the field-controlled alternator-rectifier excitation systems designated type AC1A. These excitation systems consist of an alternator main exciter with non-controlled rectifiers. Reference: IEEE 421.5-2005, 6.1. - */ + /** \brief IEEE 421.5-2005 type AC1A model. The model represents the field-controlled alternator-rectifier excitation systems designated type AC1A. These excitation systems consist of an alternator main exciter with non-controlled rectifiers. Reference: IEEE 421.5-2005, 6.1. */ class ExcIEEEAC1A : public ExcitationSystemDynamics { public: @@ -29,24 +27,59 @@ namespace CIMPP ExcIEEEAC1A(); ~ExcIEEEAC1A() override; - CIMPP::PU ka; /* Voltage regulator gain (<i>K</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 400. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (<i>K</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 0,2. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (<i>K</i><i><sub>D</sub></i>) (&gt;= 0). Typical value = 0,38. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (<i>K</i><i><sub>E</sub></i>). Typical value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (<i>K</i><i><sub>F</sub></i>) (&gt;= 0). Typical value = 0,03. Default: nullptr */ - CIMPP::Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, <i>V</i><i><sub>E1</sub></i>, back of commutating reactance (<i>S</i><i><sub>E</sub></i><i>[V</i><i><sub>E1</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,1. Default: 0.0 */ - CIMPP::Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, <i>V</i><i><sub>E2</sub></i>, back of commutating reactance (<i>S</i><i><sub>E</sub></i><i>[V</i><i><sub>E2</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,03. Default: 0.0 */ - CIMPP::Seconds ta; /* Voltage regulator time constant (<i>T</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 0,02. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (<i>T</i><i><sub>B</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (<i>T</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (<i>T</i><i><sub>E</sub></i>) (&gt; 0). Typical value = 0,8. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (<i>T</i><i><sub>F</sub></i>) (&gt; 0). Typical value = 1. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (<i>V</i><i><sub>AMAX</sub></i>) (&gt; 0). Typical value = 14,5. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (<i>V</i><i><sub>AMIN</sub></i>) (&lt; 0). Typical value = -14,5. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>V</i><i><sub>E1</sub></i>) (&gt; 0). Typical value = 4,18. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>V</i><i><sub>E2</sub></i>) (&gt; 0). Typical value = 3,14. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator outputs (<i>V</i><i><sub>RMAX</sub></i>) (&gt; 0). Typical value = 6,03. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator outputs (<i>V</i><i><sub>RMIN</sub></i>) (&lt; 0). Typical value = -5,43. Default: nullptr */ + /** \brief Voltage regulator gain (<i>K</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 400. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (<i>K</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 0,2. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (<i>K</i><i><sub>D</sub></i>) (&gt;= 0). Typical value = 0,38. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter constant related to self-excited field (<i>K</i><i><sub>E</sub></i>). Typical value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (<i>K</i><i><sub>F</sub></i>) (&gt;= 0). Typical value = 0,03. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>V</i><i><sub>E1</sub></i>, back of commutating reactance (<i>S</i><i><sub>E</sub></i><i>[V</i><i><sub>E1</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,1. Default: 0.0 */ + CIMPP::Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>V</i><i><sub>E2</sub></i>, back of commutating reactance (<i>S</i><i><sub>E</sub></i><i>[V</i><i><sub>E2</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,03. Default: 0.0 */ + CIMPP::Float seve2; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 0,02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>B</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (<i>T</i><i><sub>E</sub></i>) (&gt; 0). Typical value = 0,8. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (<i>T</i><i><sub>F</sub></i>) (&gt; 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage regulator output (<i>V</i><i><sub>AMAX</sub></i>) (&gt; 0). Typical value = 14,5. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (<i>V</i><i><sub>AMIN</sub></i>) (&lt; 0). Typical value = -14,5. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>V</i><i><sub>E1</sub></i>) (&gt; 0). Typical value = 4,18. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>V</i><i><sub>E2</sub></i>) (&gt; 0). Typical value = 3,14. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Maximum voltage regulator outputs (<i>V</i><i><sub>RMAX</sub></i>) (&gt; 0). Typical value = 6,03. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator outputs (<i>V</i><i><sub>RMIN</sub></i>) (&lt; 0). Typical value = -5,43. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcIEEEAC2A.cpp b/CGMES_3.0.0/ExcIEEEAC2A.cpp index abd415adf..a6f4da576 100644 --- a/CGMES_3.0.0/ExcIEEEAC2A.cpp +++ b/CGMES_3.0.0/ExcIEEEAC2A.cpp @@ -8,32 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEAC2A::ExcIEEEAC2A() {}; -ExcIEEEAC2A::~ExcIEEEAC2A() {}; +ExcIEEEAC2A::ExcIEEEAC2A() {} +ExcIEEEAC2A::~ExcIEEEAC2A() {} static const std::list PossibleProfilesForClass = { @@ -80,285 +59,304 @@ ExcIEEEAC2A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEAC2A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_kb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_kb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_kh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_vfemax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfemax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC2A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC2A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEAC2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -372,7 +370,8 @@ bool get_ExcIEEEAC2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_kb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kb; if (!buffer.str().empty()) @@ -386,7 +385,8 @@ bool get_ExcIEEEAC2A_kb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -400,7 +400,8 @@ bool get_ExcIEEEAC2A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -414,7 +415,8 @@ bool get_ExcIEEEAC2A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -428,7 +430,8 @@ bool get_ExcIEEEAC2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -442,7 +445,8 @@ bool get_ExcIEEEAC2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh; if (!buffer.str().empty()) @@ -456,7 +460,8 @@ bool get_ExcIEEEAC2A_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -470,7 +475,8 @@ bool get_ExcIEEEAC2A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC2A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -484,7 +490,8 @@ bool get_ExcIEEEAC2A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -498,7 +505,8 @@ bool get_ExcIEEEAC2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -512,7 +520,8 @@ bool get_ExcIEEEAC2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -526,7 +535,8 @@ bool get_ExcIEEEAC2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -540,7 +550,8 @@ bool get_ExcIEEEAC2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -554,7 +565,8 @@ bool get_ExcIEEEAC2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC2A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -568,7 +580,8 @@ bool get_ExcIEEEAC2A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC2A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -582,7 +595,8 @@ bool get_ExcIEEEAC2A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC2A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -596,7 +610,8 @@ bool get_ExcIEEEAC2A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC2A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -610,7 +625,8 @@ bool get_ExcIEEEAC2A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC2A_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfemax; if (!buffer.str().empty()) @@ -624,7 +640,8 @@ bool get_ExcIEEEAC2A_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEAC2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -638,7 +655,8 @@ bool get_ExcIEEEAC2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -650,8 +668,6 @@ bool get_ExcIEEEAC2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEAC2A::debugName[] = "ExcIEEEAC2A"; const char* ExcIEEEAC2A::debugString() const { @@ -660,32 +676,32 @@ const char* ExcIEEEAC2A::debugString() const void ExcIEEEAC2A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A"), &ExcIEEEAC2A_factory)); + factory_map.emplace("cim:ExcIEEEAC2A", &ExcIEEEAC2A_factory); } void ExcIEEEAC2A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.ka"), &assign_ExcIEEEAC2A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.kb"), &assign_ExcIEEEAC2A_kb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.kc"), &assign_ExcIEEEAC2A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.kd"), &assign_ExcIEEEAC2A_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.ke"), &assign_ExcIEEEAC2A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.kf"), &assign_ExcIEEEAC2A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.kh"), &assign_ExcIEEEAC2A_kh)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.seve1"), &assign_ExcIEEEAC2A_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.seve2"), &assign_ExcIEEEAC2A_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.ta"), &assign_ExcIEEEAC2A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.tb"), &assign_ExcIEEEAC2A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.tc"), &assign_ExcIEEEAC2A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.te"), &assign_ExcIEEEAC2A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.tf"), &assign_ExcIEEEAC2A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.vamax"), &assign_ExcIEEEAC2A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.vamin"), &assign_ExcIEEEAC2A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.ve1"), &assign_ExcIEEEAC2A_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.ve2"), &assign_ExcIEEEAC2A_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.vfemax"), &assign_ExcIEEEAC2A_vfemax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.vrmax"), &assign_ExcIEEEAC2A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC2A.vrmin"), &assign_ExcIEEEAC2A_vrmin)); + assign_map.emplace("cim:ExcIEEEAC2A.ka", &assign_ExcIEEEAC2A_ka); + assign_map.emplace("cim:ExcIEEEAC2A.kb", &assign_ExcIEEEAC2A_kb); + assign_map.emplace("cim:ExcIEEEAC2A.kc", &assign_ExcIEEEAC2A_kc); + assign_map.emplace("cim:ExcIEEEAC2A.kd", &assign_ExcIEEEAC2A_kd); + assign_map.emplace("cim:ExcIEEEAC2A.ke", &assign_ExcIEEEAC2A_ke); + assign_map.emplace("cim:ExcIEEEAC2A.kf", &assign_ExcIEEEAC2A_kf); + assign_map.emplace("cim:ExcIEEEAC2A.kh", &assign_ExcIEEEAC2A_kh); + assign_map.emplace("cim:ExcIEEEAC2A.seve1", &assign_ExcIEEEAC2A_seve1); + assign_map.emplace("cim:ExcIEEEAC2A.seve2", &assign_ExcIEEEAC2A_seve2); + assign_map.emplace("cim:ExcIEEEAC2A.ta", &assign_ExcIEEEAC2A_ta); + assign_map.emplace("cim:ExcIEEEAC2A.tb", &assign_ExcIEEEAC2A_tb); + assign_map.emplace("cim:ExcIEEEAC2A.tc", &assign_ExcIEEEAC2A_tc); + assign_map.emplace("cim:ExcIEEEAC2A.te", &assign_ExcIEEEAC2A_te); + assign_map.emplace("cim:ExcIEEEAC2A.tf", &assign_ExcIEEEAC2A_tf); + assign_map.emplace("cim:ExcIEEEAC2A.vamax", &assign_ExcIEEEAC2A_vamax); + assign_map.emplace("cim:ExcIEEEAC2A.vamin", &assign_ExcIEEEAC2A_vamin); + assign_map.emplace("cim:ExcIEEEAC2A.ve1", &assign_ExcIEEEAC2A_ve1); + assign_map.emplace("cim:ExcIEEEAC2A.ve2", &assign_ExcIEEEAC2A_ve2); + assign_map.emplace("cim:ExcIEEEAC2A.vfemax", &assign_ExcIEEEAC2A_vfemax); + assign_map.emplace("cim:ExcIEEEAC2A.vrmax", &assign_ExcIEEEAC2A_vrmax); + assign_map.emplace("cim:ExcIEEEAC2A.vrmin", &assign_ExcIEEEAC2A_vrmin); } void ExcIEEEAC2A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcIEEEAC2A.hpp b/CGMES_3.0.0/ExcIEEEAC2A.hpp index f72df60c6..73733adcc 100644 --- a/CGMES_3.0.0/ExcIEEEAC2A.hpp +++ b/CGMES_3.0.0/ExcIEEEAC2A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE 421.5-2005 type AC2A model. The model represents a high initial response field-controlled alternator-rectifier excitation system. The alternator main exciter is used with non-controlled rectifiers. The type AC2A model is similar to that of type AC1A except for the inclusion of exciter time constant compensation and exciter field current limiting elements. Reference: IEEE 421.5-2005, 6.2. - */ + /** \brief IEEE 421.5-2005 type AC2A model. The model represents a high initial response field-controlled alternator-rectifier excitation system. The alternator main exciter is used with non-controlled rectifiers. The type AC2A model is similar to that of type AC1A except for the inclusion of exciter time constant compensation and exciter field current limiting elements. Reference: IEEE 421.5-2005, 6.2. */ class ExcIEEEAC2A : public ExcitationSystemDynamics { public: @@ -29,27 +27,68 @@ namespace CIMPP ExcIEEEAC2A(); ~ExcIEEEAC2A() override; - CIMPP::PU ka; /* Voltage regulator gain (<i>K</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 400. Default: nullptr */ - CIMPP::PU kb; /* Second stage regulator gain (<i>K</i><i><sub>B</sub></i>) (&gt; 0). Typical value = 25. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (<i>K</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 0,28. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (<i>K</i><i><sub>D</sub></i>) (&gt;= 0). Typical value = 0,35. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (<i>K</i><i><sub>E</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (<i>K</i><i><sub>F</sub></i>) (&gt;= 0). Typical value = 0,03. Default: nullptr */ - CIMPP::PU kh; /* Exciter field current feedback gain (<i>K</i><i><sub>H</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, <i>V</i><i><sub>E1</sub></i>, back of commutating reactance (<i>S</i><i><sub>E</sub></i><i>[V</i><i><sub>E1</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,037. Default: 0.0 */ - CIMPP::Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, <i>V</i><i><sub>E2</sub></i>, back of commutating reactance (<i>S</i><i><sub>E</sub></i><i>[V</i><i><sub>E2</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,012. Default: 0.0 */ - CIMPP::Seconds ta; /* Voltage regulator time constant (<i>T</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 0,02. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (<i>T</i><i><sub>B</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (<i>T</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (<i>T</i><i><sub>E</sub></i>) (&gt; 0). Typical value = 0,6. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (<i>T</i><i><sub>F</sub></i>) (&gt; 0). Typical value = 1. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (<i>V</i><i><sub>AMAX</sub></i>) (&gt; 0). Typical value = 8. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (<i>V</i><i><sub>AMIN</sub></i>) (&lt; 0). Typical value = -8. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>V</i><i><sub>E1</sub></i>) (&gt; 0). Typical value = 4,4. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>V</i><i><sub>E2</sub></i>) (&gt; 0). Typical value = 3,3. Default: nullptr */ - CIMPP::PU vfemax; /* Exciter field current limit reference (<i>V</i><i><sub>FEMAX</sub></i>) (&gt; 0). Typical value = 4,4. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator outputs (<i>V</i><i><sub>RMAX</sub></i>) (&gt; 0). Typical value = 105. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator outputs (<i>V</i><i><sub>RMIN</sub></i>) (&lt; 0). Typical value = -95. Default: nullptr */ + /** \brief Voltage regulator gain (<i>K</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 400. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Second stage regulator gain (<i>K</i><i><sub>B</sub></i>) (&gt; 0). Typical value = 25. Default: nullptr */ + CIMPP::PU kb; + + /** \brief Rectifier loading factor proportional to commutating reactance (<i>K</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 0,28. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (<i>K</i><i><sub>D</sub></i>) (&gt;= 0). Typical value = 0,35. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter constant related to self-excited field (<i>K</i><i><sub>E</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (<i>K</i><i><sub>F</sub></i>) (&gt;= 0). Typical value = 0,03. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Exciter field current feedback gain (<i>K</i><i><sub>H</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::PU kh; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>V</i><i><sub>E1</sub></i>, back of commutating reactance (<i>S</i><i><sub>E</sub></i><i>[V</i><i><sub>E1</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,037. Default: 0.0 */ + CIMPP::Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>V</i><i><sub>E2</sub></i>, back of commutating reactance (<i>S</i><i><sub>E</sub></i><i>[V</i><i><sub>E2</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,012. Default: 0.0 */ + CIMPP::Float seve2; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 0,02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>B</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (<i>T</i><i><sub>E</sub></i>) (&gt; 0). Typical value = 0,6. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (<i>T</i><i><sub>F</sub></i>) (&gt; 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage regulator output (<i>V</i><i><sub>AMAX</sub></i>) (&gt; 0). Typical value = 8. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (<i>V</i><i><sub>AMIN</sub></i>) (&lt; 0). Typical value = -8. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>V</i><i><sub>E1</sub></i>) (&gt; 0). Typical value = 4,4. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>V</i><i><sub>E2</sub></i>) (&gt; 0). Typical value = 3,3. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Exciter field current limit reference (<i>V</i><i><sub>FEMAX</sub></i>) (&gt; 0). Typical value = 4,4. Default: nullptr */ + CIMPP::PU vfemax; + + /** \brief Maximum voltage regulator outputs (<i>V</i><i><sub>RMAX</sub></i>) (&gt; 0). Typical value = 105. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator outputs (<i>V</i><i><sub>RMIN</sub></i>) (&lt; 0). Typical value = -95. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcIEEEAC3A.cpp b/CGMES_3.0.0/ExcIEEEAC3A.cpp index a9d04073b..a75fa053b 100644 --- a/CGMES_3.0.0/ExcIEEEAC3A.cpp +++ b/CGMES_3.0.0/ExcIEEEAC3A.cpp @@ -8,32 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEAC3A::ExcIEEEAC3A() {}; -ExcIEEEAC3A::~ExcIEEEAC3A() {}; +ExcIEEEAC3A::ExcIEEEAC3A() {} +ExcIEEEAC3A::~ExcIEEEAC3A() {} static const std::list PossibleProfilesForClass = { @@ -80,285 +59,304 @@ ExcIEEEAC3A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEAC3A_efdn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_efdn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_kn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_kn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_kr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_kr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_vemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_vemin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vemin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC3A_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC3A_vfemax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfemax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEAC3A_efdn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdn; if (!buffer.str().empty()) @@ -372,7 +370,8 @@ bool get_ExcIEEEAC3A_efdn(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEAC3A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -386,7 +385,8 @@ bool get_ExcIEEEAC3A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -400,7 +400,8 @@ bool get_ExcIEEEAC3A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -414,7 +415,8 @@ bool get_ExcIEEEAC3A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -428,7 +430,8 @@ bool get_ExcIEEEAC3A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -442,7 +445,8 @@ bool get_ExcIEEEAC3A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_kn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kn; if (!buffer.str().empty()) @@ -456,7 +460,8 @@ bool get_ExcIEEEAC3A_kn(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_kr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kr; if (!buffer.str().empty()) @@ -470,7 +475,8 @@ bool get_ExcIEEEAC3A_kr(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -484,7 +490,8 @@ bool get_ExcIEEEAC3A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC3A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -498,7 +505,8 @@ bool get_ExcIEEEAC3A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC3A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -512,7 +520,8 @@ bool get_ExcIEEEAC3A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -526,7 +535,8 @@ bool get_ExcIEEEAC3A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -540,7 +550,8 @@ bool get_ExcIEEEAC3A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -554,7 +565,8 @@ bool get_ExcIEEEAC3A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -568,7 +580,8 @@ bool get_ExcIEEEAC3A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC3A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -582,7 +595,8 @@ bool get_ExcIEEEAC3A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC3A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -596,7 +610,8 @@ bool get_ExcIEEEAC3A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC3A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -610,7 +625,8 @@ bool get_ExcIEEEAC3A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC3A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -624,7 +640,8 @@ bool get_ExcIEEEAC3A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC3A_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vemin; if (!buffer.str().empty()) @@ -638,7 +655,8 @@ bool get_ExcIEEEAC3A_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC3A_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfemax; if (!buffer.str().empty()) @@ -650,8 +668,6 @@ bool get_ExcIEEEAC3A_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char ExcIEEEAC3A::debugName[] = "ExcIEEEAC3A"; const char* ExcIEEEAC3A::debugString() const { @@ -660,32 +676,32 @@ const char* ExcIEEEAC3A::debugString() const void ExcIEEEAC3A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A"), &ExcIEEEAC3A_factory)); + factory_map.emplace("cim:ExcIEEEAC3A", &ExcIEEEAC3A_factory); } void ExcIEEEAC3A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.efdn"), &assign_ExcIEEEAC3A_efdn)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.ka"), &assign_ExcIEEEAC3A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.kc"), &assign_ExcIEEEAC3A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.kd"), &assign_ExcIEEEAC3A_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.ke"), &assign_ExcIEEEAC3A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.kf"), &assign_ExcIEEEAC3A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.kn"), &assign_ExcIEEEAC3A_kn)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.kr"), &assign_ExcIEEEAC3A_kr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.seve1"), &assign_ExcIEEEAC3A_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.seve2"), &assign_ExcIEEEAC3A_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.ta"), &assign_ExcIEEEAC3A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.tb"), &assign_ExcIEEEAC3A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.tc"), &assign_ExcIEEEAC3A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.te"), &assign_ExcIEEEAC3A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.tf"), &assign_ExcIEEEAC3A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.vamax"), &assign_ExcIEEEAC3A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.vamin"), &assign_ExcIEEEAC3A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.ve1"), &assign_ExcIEEEAC3A_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.ve2"), &assign_ExcIEEEAC3A_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.vemin"), &assign_ExcIEEEAC3A_vemin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC3A.vfemax"), &assign_ExcIEEEAC3A_vfemax)); + assign_map.emplace("cim:ExcIEEEAC3A.efdn", &assign_ExcIEEEAC3A_efdn); + assign_map.emplace("cim:ExcIEEEAC3A.ka", &assign_ExcIEEEAC3A_ka); + assign_map.emplace("cim:ExcIEEEAC3A.kc", &assign_ExcIEEEAC3A_kc); + assign_map.emplace("cim:ExcIEEEAC3A.kd", &assign_ExcIEEEAC3A_kd); + assign_map.emplace("cim:ExcIEEEAC3A.ke", &assign_ExcIEEEAC3A_ke); + assign_map.emplace("cim:ExcIEEEAC3A.kf", &assign_ExcIEEEAC3A_kf); + assign_map.emplace("cim:ExcIEEEAC3A.kn", &assign_ExcIEEEAC3A_kn); + assign_map.emplace("cim:ExcIEEEAC3A.kr", &assign_ExcIEEEAC3A_kr); + assign_map.emplace("cim:ExcIEEEAC3A.seve1", &assign_ExcIEEEAC3A_seve1); + assign_map.emplace("cim:ExcIEEEAC3A.seve2", &assign_ExcIEEEAC3A_seve2); + assign_map.emplace("cim:ExcIEEEAC3A.ta", &assign_ExcIEEEAC3A_ta); + assign_map.emplace("cim:ExcIEEEAC3A.tb", &assign_ExcIEEEAC3A_tb); + assign_map.emplace("cim:ExcIEEEAC3A.tc", &assign_ExcIEEEAC3A_tc); + assign_map.emplace("cim:ExcIEEEAC3A.te", &assign_ExcIEEEAC3A_te); + assign_map.emplace("cim:ExcIEEEAC3A.tf", &assign_ExcIEEEAC3A_tf); + assign_map.emplace("cim:ExcIEEEAC3A.vamax", &assign_ExcIEEEAC3A_vamax); + assign_map.emplace("cim:ExcIEEEAC3A.vamin", &assign_ExcIEEEAC3A_vamin); + assign_map.emplace("cim:ExcIEEEAC3A.ve1", &assign_ExcIEEEAC3A_ve1); + assign_map.emplace("cim:ExcIEEEAC3A.ve2", &assign_ExcIEEEAC3A_ve2); + assign_map.emplace("cim:ExcIEEEAC3A.vemin", &assign_ExcIEEEAC3A_vemin); + assign_map.emplace("cim:ExcIEEEAC3A.vfemax", &assign_ExcIEEEAC3A_vfemax); } void ExcIEEEAC3A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcIEEEAC3A.hpp b/CGMES_3.0.0/ExcIEEEAC3A.hpp index 180718684..352281bbf 100644 --- a/CGMES_3.0.0/ExcIEEEAC3A.hpp +++ b/CGMES_3.0.0/ExcIEEEAC3A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE 421.5-2005 type AC3A model. The model represents the field-controlled alternator-rectifier excitation systems designated type AC3A. These excitation systems include an alternator main exciter with non-controlled rectifiers. The exciter employs self-excitation, and the voltage regulator power is derived from the exciter output voltage. Therefore, this system has an additional nonlinearity, simulated by the use of a multiplier whose inputs are the voltage regulator command signal, Va, and the exciter output voltage, Efd, times KR. This model is applicable to excitation systems employing static voltage regulators. Reference: IEEE 421.5-2005, 6.3. - */ + /** \brief IEEE 421.5-2005 type AC3A model. The model represents the field-controlled alternator-rectifier excitation systems designated type AC3A. These excitation systems include an alternator main exciter with non-controlled rectifiers. The exciter employs self-excitation, and the voltage regulator power is derived from the exciter output voltage. Therefore, this system has an additional nonlinearity, simulated by the use of a multiplier whose inputs are the voltage regulator command signal, Va, and the exciter output voltage, Efd, times KR. This model is applicable to excitation systems employing static voltage regulators. Reference: IEEE 421.5-2005, 6.3. */ class ExcIEEEAC3A : public ExcitationSystemDynamics { public: @@ -29,27 +27,68 @@ namespace CIMPP ExcIEEEAC3A(); ~ExcIEEEAC3A() override; - CIMPP::PU efdn; /* Value of <i>Efd </i>at which feedback gain changes (<i>E</i><i><sub>FDN</sub></i>) (&gt; 0). Typical value = 2,36. Default: nullptr */ - CIMPP::PU ka; /* Voltage regulator gain (<i>K</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 45,62. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (<i>K</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 0,104. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (<i>K</i><i><sub>D</sub></i>) (&gt;= 0). Typical value = 0,499. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (<i>K</i><i><sub>E</sub></i>). Typical value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (<i>K</i><i><sub>F</sub></i>) (&gt;= 0). Typical value = 0,143. Default: nullptr */ - CIMPP::PU kn; /* Excitation control system stabilizer gain (<i>K</i><i><sub>N</sub></i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ - CIMPP::PU kr; /* Constant associated with regulator and alternator field power supply (<i>K</i><i><sub>R</sub></i>) (&gt; 0). Typical value = 3,77. Default: nullptr */ - CIMPP::Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, <i>V</i><i><sub>E1</sub></i>, back of commutating reactance (<i>S</i><i><sub>E</sub></i><i>[V</i><i><sub>E1</sub></i><i>]</i>) (&gt;= 0). Typical value = 1,143. Default: 0.0 */ - CIMPP::Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, <i>V</i><i><sub>E2</sub></i>, back of commutating reactance (<i>S</i><i><sub>E</sub></i><i>[V</i><i><sub>E2</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,1. Default: 0.0 */ - CIMPP::Seconds ta; /* Voltage regulator time constant (<i>T</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 0,013. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (<i>T</i><i><sub>B</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (<i>T</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (<i>T</i><i><sub>E</sub></i>) (&gt; 0). Typical value = 1,17. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (<i>T</i><i><sub>F</sub></i>) (&gt; 0). Typical value = 1. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (<i>V</i><i><sub>AMAX</sub></i>) (&gt; 0). Typical value = 1. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (<i>V</i><i><sub>AMIN</sub></i>) (&lt; 0). Typical value = -0,95. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>V</i><i><sub>E1</sub></i>) (&gt; 0). Typical value = 6,24. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>V</i><i><sub>E2</sub></i>) (&gt; 0). Typical value = 4,68. Default: nullptr */ - CIMPP::PU vemin; /* Minimum exciter voltage output (<i>V</i><i><sub>EMIN</sub></i>) (&lt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::PU vfemax; /* Exciter field current limit reference (<i>V</i><i><sub>FEMAX</sub></i>) (&gt;= 0). Typical value = 16. Default: nullptr */ + /** \brief Value of <i>Efd </i>at which feedback gain changes (<i>E</i><i><sub>FDN</sub></i>) (&gt; 0). Typical value = 2,36. Default: nullptr */ + CIMPP::PU efdn; + + /** \brief Voltage regulator gain (<i>K</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 45,62. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (<i>K</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 0,104. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (<i>K</i><i><sub>D</sub></i>) (&gt;= 0). Typical value = 0,499. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter constant related to self-excited field (<i>K</i><i><sub>E</sub></i>). Typical value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (<i>K</i><i><sub>F</sub></i>) (&gt;= 0). Typical value = 0,143. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Excitation control system stabilizer gain (<i>K</i><i><sub>N</sub></i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ + CIMPP::PU kn; + + /** \brief Constant associated with regulator and alternator field power supply (<i>K</i><i><sub>R</sub></i>) (&gt; 0). Typical value = 3,77. Default: nullptr */ + CIMPP::PU kr; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>V</i><i><sub>E1</sub></i>, back of commutating reactance (<i>S</i><i><sub>E</sub></i><i>[V</i><i><sub>E1</sub></i><i>]</i>) (&gt;= 0). Typical value = 1,143. Default: 0.0 */ + CIMPP::Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>V</i><i><sub>E2</sub></i>, back of commutating reactance (<i>S</i><i><sub>E</sub></i><i>[V</i><i><sub>E2</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,1. Default: 0.0 */ + CIMPP::Float seve2; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 0,013. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>B</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (<i>T</i><i><sub>E</sub></i>) (&gt; 0). Typical value = 1,17. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (<i>T</i><i><sub>F</sub></i>) (&gt; 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage regulator output (<i>V</i><i><sub>AMAX</sub></i>) (&gt; 0). Typical value = 1. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (<i>V</i><i><sub>AMIN</sub></i>) (&lt; 0). Typical value = -0,95. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>V</i><i><sub>E1</sub></i>) (&gt; 0). Typical value = 6,24. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>V</i><i><sub>E2</sub></i>) (&gt; 0). Typical value = 4,68. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Minimum exciter voltage output (<i>V</i><i><sub>EMIN</sub></i>) (&lt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::PU vemin; + + /** \brief Exciter field current limit reference (<i>V</i><i><sub>FEMAX</sub></i>) (&gt;= 0). Typical value = 16. Default: nullptr */ + CIMPP::PU vfemax; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcIEEEAC4A.cpp b/CGMES_3.0.0/ExcIEEEAC4A.cpp index 59eeb54d8..e1510a699 100644 --- a/CGMES_3.0.0/ExcIEEEAC4A.cpp +++ b/CGMES_3.0.0/ExcIEEEAC4A.cpp @@ -8,20 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEAC4A::ExcIEEEAC4A() {}; -ExcIEEEAC4A::~ExcIEEEAC4A() {}; +ExcIEEEAC4A::ExcIEEEAC4A() {} +ExcIEEEAC4A::~ExcIEEEAC4A() {} static const std::list PossibleProfilesForClass = { @@ -56,129 +47,136 @@ ExcIEEEAC4A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEAC4A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC4A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC4A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC4A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC4A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC4A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC4A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC4A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC4A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC4A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC4A_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC4A_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC4A_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC4A_vimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC4A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC4A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC4A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC4A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEAC4A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -192,7 +190,8 @@ bool get_ExcIEEEAC4A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC4A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -206,7 +205,8 @@ bool get_ExcIEEEAC4A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC4A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -220,7 +220,8 @@ bool get_ExcIEEEAC4A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC4A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -234,7 +235,8 @@ bool get_ExcIEEEAC4A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC4A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -248,7 +250,8 @@ bool get_ExcIEEEAC4A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC4A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -262,7 +265,8 @@ bool get_ExcIEEEAC4A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC4A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimin; if (!buffer.str().empty()) @@ -276,7 +280,8 @@ bool get_ExcIEEEAC4A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC4A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -290,7 +295,8 @@ bool get_ExcIEEEAC4A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC4A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC4A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -302,8 +308,6 @@ bool get_ExcIEEEAC4A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEAC4A::debugName[] = "ExcIEEEAC4A"; const char* ExcIEEEAC4A::debugString() const { @@ -312,20 +316,20 @@ const char* ExcIEEEAC4A::debugString() const void ExcIEEEAC4A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A"), &ExcIEEEAC4A_factory)); + factory_map.emplace("cim:ExcIEEEAC4A", &ExcIEEEAC4A_factory); } void ExcIEEEAC4A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A.ka"), &assign_ExcIEEEAC4A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A.kc"), &assign_ExcIEEEAC4A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A.ta"), &assign_ExcIEEEAC4A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A.tb"), &assign_ExcIEEEAC4A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A.tc"), &assign_ExcIEEEAC4A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A.vimax"), &assign_ExcIEEEAC4A_vimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A.vimin"), &assign_ExcIEEEAC4A_vimin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A.vrmax"), &assign_ExcIEEEAC4A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC4A.vrmin"), &assign_ExcIEEEAC4A_vrmin)); + assign_map.emplace("cim:ExcIEEEAC4A.ka", &assign_ExcIEEEAC4A_ka); + assign_map.emplace("cim:ExcIEEEAC4A.kc", &assign_ExcIEEEAC4A_kc); + assign_map.emplace("cim:ExcIEEEAC4A.ta", &assign_ExcIEEEAC4A_ta); + assign_map.emplace("cim:ExcIEEEAC4A.tb", &assign_ExcIEEEAC4A_tb); + assign_map.emplace("cim:ExcIEEEAC4A.tc", &assign_ExcIEEEAC4A_tc); + assign_map.emplace("cim:ExcIEEEAC4A.vimax", &assign_ExcIEEEAC4A_vimax); + assign_map.emplace("cim:ExcIEEEAC4A.vimin", &assign_ExcIEEEAC4A_vimin); + assign_map.emplace("cim:ExcIEEEAC4A.vrmax", &assign_ExcIEEEAC4A_vrmax); + assign_map.emplace("cim:ExcIEEEAC4A.vrmin", &assign_ExcIEEEAC4A_vrmin); } void ExcIEEEAC4A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcIEEEAC4A.hpp b/CGMES_3.0.0/ExcIEEEAC4A.hpp index 5f1db0881..0c876a092 100644 --- a/CGMES_3.0.0/ExcIEEEAC4A.hpp +++ b/CGMES_3.0.0/ExcIEEEAC4A.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE 421.5-2005 type AC4A model. The model represents type AC4A alternator-supplied controlled-rectifier excitation system which is quite different from the other types of AC systems. This high initial response excitation system utilizes a full thyristor bridge in the exciter output circuit. The voltage regulator controls the firing of the thyristor bridges. The exciter alternator uses an independent voltage regulator to control its output voltage to a constant value. These effects are not modelled; however, transient loading effects on the exciter alternator are included. Reference: IEEE 421.5-2005, 6.4. - */ + /** \brief IEEE 421.5-2005 type AC4A model. The model represents type AC4A alternator-supplied controlled-rectifier excitation system which is quite different from the other types of AC systems. This high initial response excitation system utilizes a full thyristor bridge in the exciter output circuit. The voltage regulator controls the firing of the thyristor bridges. The exciter alternator uses an independent voltage regulator to control its output voltage to a constant value. These effects are not modelled; however, transient loading effects on the exciter alternator are included. Reference: IEEE 421.5-2005, 6.4. */ class ExcIEEEAC4A : public ExcitationSystemDynamics { public: @@ -28,15 +26,32 @@ namespace CIMPP ExcIEEEAC4A(); ~ExcIEEEAC4A() override; - CIMPP::PU ka; /* Voltage regulator gain (<i>K</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 200. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (<i>K</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (<i>T</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 0,015. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (<i>T</i><i><sub>B</sub></i>) (&gt;= 0). Typical value = 10. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (<i>T</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::PU vimax; /* Maximum voltage regulator input limit (<i>V</i><i><sub>IMAX</sub></i>) (&gt; 0). Typical value = 10. Default: nullptr */ - CIMPP::PU vimin; /* Minimum voltage regulator input limit (<i>V</i><i><sub>IMIN</sub></i>) (&lt; 0). Typical value = -10. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (<i>V</i><i><sub>RMAX</sub></i>) (&gt; 0). Typical value = 5,64. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (<i>V</i><i><sub>RMIN</sub></i>) (&lt; 0). Typical value = -4,53. Default: nullptr */ + /** \brief Voltage regulator gain (<i>K</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 200. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (<i>K</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 0,015. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>B</sub></i>) (&gt;= 0). Typical value = 10. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Maximum voltage regulator input limit (<i>V</i><i><sub>IMAX</sub></i>) (&gt; 0). Typical value = 10. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Minimum voltage regulator input limit (<i>V</i><i><sub>IMIN</sub></i>) (&lt; 0). Typical value = -10. Default: nullptr */ + CIMPP::PU vimin; + + /** \brief Maximum voltage regulator output (<i>V</i><i><sub>RMAX</sub></i>) (&gt; 0). Typical value = 5,64. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (<i>V</i><i><sub>RMIN</sub></i>) (&lt; 0). Typical value = -4,53. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcIEEEAC5A.cpp b/CGMES_3.0.0/ExcIEEEAC5A.cpp index decf95ede..8187407bd 100644 --- a/CGMES_3.0.0/ExcIEEEAC5A.cpp +++ b/CGMES_3.0.0/ExcIEEEAC5A.cpp @@ -8,25 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEAC5A::ExcIEEEAC5A() {}; -ExcIEEEAC5A::~ExcIEEEAC5A() {}; +ExcIEEEAC5A::ExcIEEEAC5A() {} +ExcIEEEAC5A::~ExcIEEEAC5A() {} static const std::list PossibleProfilesForClass = { @@ -66,194 +52,206 @@ ExcIEEEAC5A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEAC5A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_seefd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_seefd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_tf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_tf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_tf3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_tf3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC5A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC5A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEAC5A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -267,7 +265,8 @@ bool get_ExcIEEEAC5A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEAC5A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -281,7 +280,8 @@ bool get_ExcIEEEAC5A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEAC5A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -295,7 +295,8 @@ bool get_ExcIEEEAC5A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC5A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -309,7 +310,8 @@ bool get_ExcIEEEAC5A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC5A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -323,7 +325,8 @@ bool get_ExcIEEEAC5A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC5A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd1; if (!buffer.str().empty()) @@ -337,7 +340,8 @@ bool get_ExcIEEEAC5A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEAC5A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd2; if (!buffer.str().empty()) @@ -351,7 +355,8 @@ bool get_ExcIEEEAC5A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEAC5A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -365,7 +370,8 @@ bool get_ExcIEEEAC5A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC5A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -379,7 +385,8 @@ bool get_ExcIEEEAC5A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC5A_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf1; if (!buffer.str().empty()) @@ -393,7 +400,8 @@ bool get_ExcIEEEAC5A_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC5A_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf2; if (!buffer.str().empty()) @@ -407,7 +415,8 @@ bool get_ExcIEEEAC5A_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC5A_tf3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf3; if (!buffer.str().empty()) @@ -421,7 +430,8 @@ bool get_ExcIEEEAC5A_tf3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC5A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -435,7 +445,8 @@ bool get_ExcIEEEAC5A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC5A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC5A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -447,8 +458,6 @@ bool get_ExcIEEEAC5A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEAC5A::debugName[] = "ExcIEEEAC5A"; const char* ExcIEEEAC5A::debugString() const { @@ -457,25 +466,25 @@ const char* ExcIEEEAC5A::debugString() const void ExcIEEEAC5A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A"), &ExcIEEEAC5A_factory)); + factory_map.emplace("cim:ExcIEEEAC5A", &ExcIEEEAC5A_factory); } void ExcIEEEAC5A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.efd1"), &assign_ExcIEEEAC5A_efd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.efd2"), &assign_ExcIEEEAC5A_efd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.ka"), &assign_ExcIEEEAC5A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.ke"), &assign_ExcIEEEAC5A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.kf"), &assign_ExcIEEEAC5A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.seefd1"), &assign_ExcIEEEAC5A_seefd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.seefd2"), &assign_ExcIEEEAC5A_seefd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.ta"), &assign_ExcIEEEAC5A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.te"), &assign_ExcIEEEAC5A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.tf1"), &assign_ExcIEEEAC5A_tf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.tf2"), &assign_ExcIEEEAC5A_tf2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.tf3"), &assign_ExcIEEEAC5A_tf3)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.vrmax"), &assign_ExcIEEEAC5A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC5A.vrmin"), &assign_ExcIEEEAC5A_vrmin)); + assign_map.emplace("cim:ExcIEEEAC5A.efd1", &assign_ExcIEEEAC5A_efd1); + assign_map.emplace("cim:ExcIEEEAC5A.efd2", &assign_ExcIEEEAC5A_efd2); + assign_map.emplace("cim:ExcIEEEAC5A.ka", &assign_ExcIEEEAC5A_ka); + assign_map.emplace("cim:ExcIEEEAC5A.ke", &assign_ExcIEEEAC5A_ke); + assign_map.emplace("cim:ExcIEEEAC5A.kf", &assign_ExcIEEEAC5A_kf); + assign_map.emplace("cim:ExcIEEEAC5A.seefd1", &assign_ExcIEEEAC5A_seefd1); + assign_map.emplace("cim:ExcIEEEAC5A.seefd2", &assign_ExcIEEEAC5A_seefd2); + assign_map.emplace("cim:ExcIEEEAC5A.ta", &assign_ExcIEEEAC5A_ta); + assign_map.emplace("cim:ExcIEEEAC5A.te", &assign_ExcIEEEAC5A_te); + assign_map.emplace("cim:ExcIEEEAC5A.tf1", &assign_ExcIEEEAC5A_tf1); + assign_map.emplace("cim:ExcIEEEAC5A.tf2", &assign_ExcIEEEAC5A_tf2); + assign_map.emplace("cim:ExcIEEEAC5A.tf3", &assign_ExcIEEEAC5A_tf3); + assign_map.emplace("cim:ExcIEEEAC5A.vrmax", &assign_ExcIEEEAC5A_vrmax); + assign_map.emplace("cim:ExcIEEEAC5A.vrmin", &assign_ExcIEEEAC5A_vrmin); } void ExcIEEEAC5A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcIEEEAC5A.hpp b/CGMES_3.0.0/ExcIEEEAC5A.hpp index be7cd9b24..27575efa8 100644 --- a/CGMES_3.0.0/ExcIEEEAC5A.hpp +++ b/CGMES_3.0.0/ExcIEEEAC5A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE 421.5-2005 type AC5A model. The model represents a simplified model for brushless excitation systems. The regulator is supplied from a source, such as a permanent magnet generator, which is not affected by system disturbances. Unlike other AC models, this model uses loaded rather than open circuit exciter saturation data in the same way as it is used for the DC models. Because the model has been widely implemented by the industry, it is sometimes used to represent other types of systems when either detailed data for them are not available or simplified models are required. Reference: IEEE 421.5-2005, 6.5. - */ + /** \brief IEEE 421.5-2005 type AC5A model. The model represents a simplified model for brushless excitation systems. The regulator is supplied from a source, such as a permanent magnet generator, which is not affected by system disturbances. Unlike other AC models, this model uses loaded rather than open circuit exciter saturation data in the same way as it is used for the DC models. Because the model has been widely implemented by the industry, it is sometimes used to represent other types of systems when either detailed data for them are not available or simplified models are required. Reference: IEEE 421.5-2005, 6.5. */ class ExcIEEEAC5A : public ExcitationSystemDynamics { public: @@ -29,20 +27,47 @@ namespace CIMPP ExcIEEEAC5A(); ~ExcIEEEAC5A() override; - CIMPP::PU efd1; /* Exciter voltage at which exciter saturation is defined (<i>E</i><i><sub>FD1</sub></i>) (&gt; 0). Typical value = 5,6. Default: nullptr */ - CIMPP::PU efd2; /* Exciter voltage at which exciter saturation is defined (<i>E</i><i><sub>FD2</sub></i>) (&gt; 0). Typical value = 4,2. Default: nullptr */ - CIMPP::PU ka; /* Voltage regulator gain (<i>K</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 400. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (<i>K</i><i><sub>E</sub></i>). Typical value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (<i>K</i><i><sub>F</sub></i>) (&gt;= 0). Typical value = 0,03. Default: nullptr */ - CIMPP::Float seefd1; /* Exciter saturation function value at the corresponding exciter voltage, <i>E</i><i><sub>FD1</sub></i> (<i>S</i><i><sub>E</sub></i><i>[E</i><i><sub>FD1</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,86. Default: 0.0 */ - CIMPP::Float seefd2; /* Exciter saturation function value at the corresponding exciter voltage, <i>E</i><i><sub>FD2</sub></i> (<i>S</i><i><sub>E</sub></i><i>[E</i><i><sub>FD2</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,5. Default: 0.0 */ - CIMPP::Seconds ta; /* Voltage regulator time constant (<i>T</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 0,02. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (<i>T</i><i><sub>E</sub></i>) (&gt; 0). Typical value = 0,8. Default: nullptr */ - CIMPP::Seconds tf1; /* Excitation control system stabilizer time constant (<i>T</i><i><sub>F1</sub></i>) (&gt; 0). Typical value = 1. Default: nullptr */ - CIMPP::Seconds tf2; /* Excitation control system stabilizer time constant (<i>T</i><i><sub>F2</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::Seconds tf3; /* Excitation control system stabilizer time constant (<i>T</i><i><sub>F3</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (<i>V</i><i><sub>RMAX</sub></i>) (&gt; 0). Typical value = 7,3. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (<i>V</i><i><sub>RMIN</sub></i>) (&lt; 0). Typical value = -7,3. Default: nullptr */ + /** \brief Exciter voltage at which exciter saturation is defined (<i>E</i><i><sub>FD1</sub></i>) (&gt; 0). Typical value = 5,6. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Exciter voltage at which exciter saturation is defined (<i>E</i><i><sub>FD2</sub></i>) (&gt; 0). Typical value = 4,2. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief Voltage regulator gain (<i>K</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 400. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Exciter constant related to self-excited field (<i>K</i><i><sub>E</sub></i>). Typical value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (<i>K</i><i><sub>F</sub></i>) (&gt;= 0). Typical value = 0,03. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>E</i><i><sub>FD1</sub></i> (<i>S</i><i><sub>E</sub></i><i>[E</i><i><sub>FD1</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,86. Default: 0.0 */ + CIMPP::Float seefd1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>E</i><i><sub>FD2</sub></i> (<i>S</i><i><sub>E</sub></i><i>[E</i><i><sub>FD2</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,5. Default: 0.0 */ + CIMPP::Float seefd2; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 0,02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Exciter time constant, integration rate associated with exciter control (<i>T</i><i><sub>E</sub></i>) (&gt; 0). Typical value = 0,8. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (<i>T</i><i><sub>F1</sub></i>) (&gt; 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tf1; + + /** \brief Excitation control system stabilizer time constant (<i>T</i><i><sub>F2</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tf2; + + /** \brief Excitation control system stabilizer time constant (<i>T</i><i><sub>F3</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tf3; + + /** \brief Maximum voltage regulator output (<i>V</i><i><sub>RMAX</sub></i>) (&gt; 0). Typical value = 7,3. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (<i>V</i><i><sub>RMIN</sub></i>) (&lt; 0). Typical value = -7,3. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcIEEEAC6A.cpp b/CGMES_3.0.0/ExcIEEEAC6A.cpp index 8297d5d7d..cf956daff 100644 --- a/CGMES_3.0.0/ExcIEEEAC6A.cpp +++ b/CGMES_3.0.0/ExcIEEEAC6A.cpp @@ -8,33 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEAC6A::ExcIEEEAC6A() {}; -ExcIEEEAC6A::~ExcIEEEAC6A() {}; +ExcIEEEAC6A::ExcIEEEAC6A() {} +ExcIEEEAC6A::~ExcIEEEAC6A() {} static const std::list PossibleProfilesForClass = { @@ -82,298 +60,318 @@ ExcIEEEAC6A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEAC6A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_kh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_th(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_th(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_tj(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_tj(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tj; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_tk(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_tk(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tk; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_vfelim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_vfelim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfelim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_vhmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_vhmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vhmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC6A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC6A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEAC6A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -387,7 +385,8 @@ bool get_ExcIEEEAC6A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -401,7 +400,8 @@ bool get_ExcIEEEAC6A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -415,7 +415,8 @@ bool get_ExcIEEEAC6A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -429,7 +430,8 @@ bool get_ExcIEEEAC6A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh; if (!buffer.str().empty()) @@ -443,7 +445,8 @@ bool get_ExcIEEEAC6A_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -457,7 +460,8 @@ bool get_ExcIEEEAC6A_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC6A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -471,7 +475,8 @@ bool get_ExcIEEEAC6A_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC6A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -485,7 +490,8 @@ bool get_ExcIEEEAC6A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -499,7 +505,8 @@ bool get_ExcIEEEAC6A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -513,7 +520,8 @@ bool get_ExcIEEEAC6A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -527,7 +535,8 @@ bool get_ExcIEEEAC6A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_th(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th; if (!buffer.str().empty()) @@ -541,7 +550,8 @@ bool get_ExcIEEEAC6A_th(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_tj(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tj; if (!buffer.str().empty()) @@ -555,7 +565,8 @@ bool get_ExcIEEEAC6A_tj(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_tk(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tk; if (!buffer.str().empty()) @@ -569,7 +580,8 @@ bool get_ExcIEEEAC6A_tk(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC6A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -583,7 +595,8 @@ bool get_ExcIEEEAC6A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC6A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -597,7 +610,8 @@ bool get_ExcIEEEAC6A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC6A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -611,7 +625,8 @@ bool get_ExcIEEEAC6A_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC6A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -625,7 +640,8 @@ bool get_ExcIEEEAC6A_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC6A_vfelim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfelim; if (!buffer.str().empty()) @@ -639,7 +655,8 @@ bool get_ExcIEEEAC6A_vfelim(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEAC6A_vhmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vhmax; if (!buffer.str().empty()) @@ -653,7 +670,8 @@ bool get_ExcIEEEAC6A_vhmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC6A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -667,7 +685,8 @@ bool get_ExcIEEEAC6A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC6A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC6A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -679,8 +698,6 @@ bool get_ExcIEEEAC6A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEAC6A::debugName[] = "ExcIEEEAC6A"; const char* ExcIEEEAC6A::debugString() const { @@ -689,33 +706,33 @@ const char* ExcIEEEAC6A::debugString() const void ExcIEEEAC6A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A"), &ExcIEEEAC6A_factory)); + factory_map.emplace("cim:ExcIEEEAC6A", &ExcIEEEAC6A_factory); } void ExcIEEEAC6A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.ka"), &assign_ExcIEEEAC6A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.kc"), &assign_ExcIEEEAC6A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.kd"), &assign_ExcIEEEAC6A_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.ke"), &assign_ExcIEEEAC6A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.kh"), &assign_ExcIEEEAC6A_kh)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.seve1"), &assign_ExcIEEEAC6A_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.seve2"), &assign_ExcIEEEAC6A_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.ta"), &assign_ExcIEEEAC6A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.tb"), &assign_ExcIEEEAC6A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.tc"), &assign_ExcIEEEAC6A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.te"), &assign_ExcIEEEAC6A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.th"), &assign_ExcIEEEAC6A_th)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.tj"), &assign_ExcIEEEAC6A_tj)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.tk"), &assign_ExcIEEEAC6A_tk)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.vamax"), &assign_ExcIEEEAC6A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.vamin"), &assign_ExcIEEEAC6A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.ve1"), &assign_ExcIEEEAC6A_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.ve2"), &assign_ExcIEEEAC6A_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.vfelim"), &assign_ExcIEEEAC6A_vfelim)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.vhmax"), &assign_ExcIEEEAC6A_vhmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.vrmax"), &assign_ExcIEEEAC6A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC6A.vrmin"), &assign_ExcIEEEAC6A_vrmin)); + assign_map.emplace("cim:ExcIEEEAC6A.ka", &assign_ExcIEEEAC6A_ka); + assign_map.emplace("cim:ExcIEEEAC6A.kc", &assign_ExcIEEEAC6A_kc); + assign_map.emplace("cim:ExcIEEEAC6A.kd", &assign_ExcIEEEAC6A_kd); + assign_map.emplace("cim:ExcIEEEAC6A.ke", &assign_ExcIEEEAC6A_ke); + assign_map.emplace("cim:ExcIEEEAC6A.kh", &assign_ExcIEEEAC6A_kh); + assign_map.emplace("cim:ExcIEEEAC6A.seve1", &assign_ExcIEEEAC6A_seve1); + assign_map.emplace("cim:ExcIEEEAC6A.seve2", &assign_ExcIEEEAC6A_seve2); + assign_map.emplace("cim:ExcIEEEAC6A.ta", &assign_ExcIEEEAC6A_ta); + assign_map.emplace("cim:ExcIEEEAC6A.tb", &assign_ExcIEEEAC6A_tb); + assign_map.emplace("cim:ExcIEEEAC6A.tc", &assign_ExcIEEEAC6A_tc); + assign_map.emplace("cim:ExcIEEEAC6A.te", &assign_ExcIEEEAC6A_te); + assign_map.emplace("cim:ExcIEEEAC6A.th", &assign_ExcIEEEAC6A_th); + assign_map.emplace("cim:ExcIEEEAC6A.tj", &assign_ExcIEEEAC6A_tj); + assign_map.emplace("cim:ExcIEEEAC6A.tk", &assign_ExcIEEEAC6A_tk); + assign_map.emplace("cim:ExcIEEEAC6A.vamax", &assign_ExcIEEEAC6A_vamax); + assign_map.emplace("cim:ExcIEEEAC6A.vamin", &assign_ExcIEEEAC6A_vamin); + assign_map.emplace("cim:ExcIEEEAC6A.ve1", &assign_ExcIEEEAC6A_ve1); + assign_map.emplace("cim:ExcIEEEAC6A.ve2", &assign_ExcIEEEAC6A_ve2); + assign_map.emplace("cim:ExcIEEEAC6A.vfelim", &assign_ExcIEEEAC6A_vfelim); + assign_map.emplace("cim:ExcIEEEAC6A.vhmax", &assign_ExcIEEEAC6A_vhmax); + assign_map.emplace("cim:ExcIEEEAC6A.vrmax", &assign_ExcIEEEAC6A_vrmax); + assign_map.emplace("cim:ExcIEEEAC6A.vrmin", &assign_ExcIEEEAC6A_vrmin); } void ExcIEEEAC6A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcIEEEAC6A.hpp b/CGMES_3.0.0/ExcIEEEAC6A.hpp index 71f53ba1f..9ccffbd7b 100644 --- a/CGMES_3.0.0/ExcIEEEAC6A.hpp +++ b/CGMES_3.0.0/ExcIEEEAC6A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE 421.5-2005 type AC6A model. The model represents field-controlled alternator-rectifier excitation systems with system-supplied electronic voltage regulators. The maximum output of the regulator, VR, is a function of terminal voltage, VT. The field current limiter included in the original model AC6A remains in the 2005 update. Reference: IEEE 421.5-2005, 6.6. - */ + /** \brief IEEE 421.5-2005 type AC6A model. The model represents field-controlled alternator-rectifier excitation systems with system-supplied electronic voltage regulators. The maximum output of the regulator, VR, is a function of terminal voltage, VT. The field current limiter included in the original model AC6A remains in the 2005 update. Reference: IEEE 421.5-2005, 6.6. */ class ExcIEEEAC6A : public ExcitationSystemDynamics { public: @@ -29,28 +27,71 @@ namespace CIMPP ExcIEEEAC6A(); ~ExcIEEEAC6A() override; - CIMPP::PU ka; /* Voltage regulator gain (<i>K</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 536. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (<i>K</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 0,173. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (<i>K</i><i><sub>D</sub></i>) (&gt;= 0). Typical value = 1,91. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (<i>K</i><i><sub>E</sub></i>). Typical value = 1,6. Default: nullptr */ - CIMPP::PU kh; /* Exciter field current limiter gain (<i>K</i><i><sub>H</sub></i>) (&gt;= 0). Typical value = 92. Default: nullptr */ - CIMPP::Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, <i>V</i><i><sub>E1</sub></i>, back of commutating reactance (<i>S</i><i><sub>E</sub></i><i>[V</i><i><sub>E1</sub></i><i>])</i> (&gt;= 0). Typical value = 0,214. Default: 0.0 */ - CIMPP::Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, <i>V</i><i><sub>E2</sub></i>, back of commutating reactance (<i>S</i><i><sub>E</sub></i><i>[V</i><i><sub>E2</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,044. Default: 0.0 */ - CIMPP::Seconds ta; /* Voltage regulator time constant (<i>T</i><i><sub>A</sub></i>) (&gt;= 0). Typical value = 0,086. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (<i>T</i><i><sub>B</sub></i>) (&gt;= 0). Typical value = 9. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (<i>T</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 3. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (<i>T</i><i><sub>E</sub></i>) (&gt; 0). Typical value = 1. Default: nullptr */ - CIMPP::Seconds th; /* Exciter field current limiter time constant (<i>T</i><i><sub>H</sub></i>) (&gt; 0). Typical value = 0,08. Default: nullptr */ - CIMPP::Seconds tj; /* Exciter field current limiter time constant (<i>T</i><i><sub>J</sub></i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ - CIMPP::Seconds tk; /* Voltage regulator time constant (<i>T</i><i><sub>K</sub></i>) (&gt;= 0). Typical value = 0,18. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (<i>V</i><i><sub>AMAX</sub></i>) (&gt; 0). Typical value = 75. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (V<sub>AMIN</sub>) (&lt; 0). Typical value = -75. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>V</i><i><sub>E1</sub></i>) (&gt; 0). Typical value = 7,4. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>V</i><i><sub>E2</sub></i>) (&gt; 0). Typical value = 5,55. Default: nullptr */ - CIMPP::PU vfelim; /* Exciter field current limit reference (<i>V</i><i><sub>FELIM</sub></i>) (&gt; 0). Typical value = 19. Default: nullptr */ - CIMPP::PU vhmax; /* Maximum field current limiter signal reference (<i>V</i><i><sub>HMAX</sub></i>) (&gt; 0). Typical value = 75. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (<i>V</i><i><sub>RMAX</sub></i>) (&gt; 0). Typical value = 44. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (<i>V</i><i><sub>RMIN</sub></i>) (&lt; 0). Typical value = -36. Default: nullptr */ + /** \brief Voltage regulator gain (<i>K</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 536. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (<i>K</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 0,173. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (<i>K</i><i><sub>D</sub></i>) (&gt;= 0). Typical value = 1,91. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter constant related to self-excited field (<i>K</i><i><sub>E</sub></i>). Typical value = 1,6. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Exciter field current limiter gain (<i>K</i><i><sub>H</sub></i>) (&gt;= 0). Typical value = 92. Default: nullptr */ + CIMPP::PU kh; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>V</i><i><sub>E1</sub></i>, back of commutating reactance (<i>S</i><i><sub>E</sub></i><i>[V</i><i><sub>E1</sub></i><i>])</i> (&gt;= 0). Typical value = 0,214. Default: 0.0 */ + CIMPP::Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>V</i><i><sub>E2</sub></i>, back of commutating reactance (<i>S</i><i><sub>E</sub></i><i>[V</i><i><sub>E2</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,044. Default: 0.0 */ + CIMPP::Float seve2; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>A</sub></i>) (&gt;= 0). Typical value = 0,086. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>B</sub></i>) (&gt;= 0). Typical value = 9. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 3. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (<i>T</i><i><sub>E</sub></i>) (&gt; 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Exciter field current limiter time constant (<i>T</i><i><sub>H</sub></i>) (&gt; 0). Typical value = 0,08. Default: nullptr */ + CIMPP::Seconds th; + + /** \brief Exciter field current limiter time constant (<i>T</i><i><sub>J</sub></i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ + CIMPP::Seconds tj; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>K</sub></i>) (&gt;= 0). Typical value = 0,18. Default: nullptr */ + CIMPP::Seconds tk; + + /** \brief Maximum voltage regulator output (<i>V</i><i><sub>AMAX</sub></i>) (&gt; 0). Typical value = 75. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (V<sub>AMIN</sub>) (&lt; 0). Typical value = -75. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>V</i><i><sub>E1</sub></i>) (&gt; 0). Typical value = 7,4. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>V</i><i><sub>E2</sub></i>) (&gt; 0). Typical value = 5,55. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Exciter field current limit reference (<i>V</i><i><sub>FELIM</sub></i>) (&gt; 0). Typical value = 19. Default: nullptr */ + CIMPP::PU vfelim; + + /** \brief Maximum field current limiter signal reference (<i>V</i><i><sub>HMAX</sub></i>) (&gt; 0). Typical value = 75. Default: nullptr */ + CIMPP::PU vhmax; + + /** \brief Maximum voltage regulator output (<i>V</i><i><sub>RMAX</sub></i>) (&gt; 0). Typical value = 44. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (<i>V</i><i><sub>RMIN</sub></i>) (&lt; 0). Typical value = -36. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcIEEEAC7B.cpp b/CGMES_3.0.0/ExcIEEEAC7B.cpp index e97ae8eda..92658ed8f 100644 --- a/CGMES_3.0.0/ExcIEEEAC7B.cpp +++ b/CGMES_3.0.0/ExcIEEEAC7B.cpp @@ -8,37 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEAC7B::ExcIEEEAC7B() {}; -ExcIEEEAC7B::~ExcIEEEAC7B() {}; +ExcIEEEAC7B::ExcIEEEAC7B() {} +ExcIEEEAC7B::~ExcIEEEAC7B() {} static const std::list PossibleProfilesForClass = { @@ -90,350 +64,374 @@ ExcIEEEAC7B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEAC7B_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kdr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kdr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kf3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kf3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kia(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kia; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kir(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kir(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kir; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kpa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kpa(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpa; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_kpr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_kpr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_tdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_tdr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_vemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_vemin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vemin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_vfemax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfemax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC7B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC7B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEAC7B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -447,7 +445,8 @@ bool get_ExcIEEEAC7B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC7B_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -461,7 +460,8 @@ bool get_ExcIEEEAC7B_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC7B_kdr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdr; if (!buffer.str().empty()) @@ -475,7 +475,8 @@ bool get_ExcIEEEAC7B_kdr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -489,7 +490,8 @@ bool get_ExcIEEEAC7B_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC7B_kf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf1; if (!buffer.str().empty()) @@ -503,7 +505,8 @@ bool get_ExcIEEEAC7B_kf1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf2; if (!buffer.str().empty()) @@ -517,7 +520,8 @@ bool get_ExcIEEEAC7B_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_kf3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf3; if (!buffer.str().empty()) @@ -531,7 +535,8 @@ bool get_ExcIEEEAC7B_kf3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kia; if (!buffer.str().empty()) @@ -545,7 +550,8 @@ bool get_ExcIEEEAC7B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kir; if (!buffer.str().empty()) @@ -559,7 +565,8 @@ bool get_ExcIEEEAC7B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl; if (!buffer.str().empty()) @@ -573,7 +580,8 @@ bool get_ExcIEEEAC7B_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC7B_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -587,7 +595,8 @@ bool get_ExcIEEEAC7B_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC7B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpa; if (!buffer.str().empty()) @@ -601,7 +610,8 @@ bool get_ExcIEEEAC7B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpr; if (!buffer.str().empty()) @@ -615,7 +625,8 @@ bool get_ExcIEEEAC7B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -629,7 +640,8 @@ bool get_ExcIEEEAC7B_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC7B_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -643,7 +655,8 @@ bool get_ExcIEEEAC7B_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC7B_tdr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdr; if (!buffer.str().empty()) @@ -657,7 +670,8 @@ bool get_ExcIEEEAC7B_tdr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -671,7 +685,8 @@ bool get_ExcIEEEAC7B_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC7B_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -685,7 +700,8 @@ bool get_ExcIEEEAC7B_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC7B_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -699,7 +715,8 @@ bool get_ExcIEEEAC7B_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC7B_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -713,7 +730,8 @@ bool get_ExcIEEEAC7B_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC7B_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -727,7 +745,8 @@ bool get_ExcIEEEAC7B_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -741,7 +760,8 @@ bool get_ExcIEEEAC7B_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC7B_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vemin; if (!buffer.str().empty()) @@ -755,7 +775,8 @@ bool get_ExcIEEEAC7B_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC7B_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfemax; if (!buffer.str().empty()) @@ -769,7 +790,8 @@ bool get_ExcIEEEAC7B_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEAC7B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -783,7 +805,8 @@ bool get_ExcIEEEAC7B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC7B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -795,8 +818,6 @@ bool get_ExcIEEEAC7B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEAC7B::debugName[] = "ExcIEEEAC7B"; const char* ExcIEEEAC7B::debugString() const { @@ -805,37 +826,37 @@ const char* ExcIEEEAC7B::debugString() const void ExcIEEEAC7B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B"), &ExcIEEEAC7B_factory)); + factory_map.emplace("cim:ExcIEEEAC7B", &ExcIEEEAC7B_factory); } void ExcIEEEAC7B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kc"), &assign_ExcIEEEAC7B_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kd"), &assign_ExcIEEEAC7B_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kdr"), &assign_ExcIEEEAC7B_kdr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.ke"), &assign_ExcIEEEAC7B_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kf1"), &assign_ExcIEEEAC7B_kf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kf2"), &assign_ExcIEEEAC7B_kf2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kf3"), &assign_ExcIEEEAC7B_kf3)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kia"), &assign_ExcIEEEAC7B_kia)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kir"), &assign_ExcIEEEAC7B_kir)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kl"), &assign_ExcIEEEAC7B_kl)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kp"), &assign_ExcIEEEAC7B_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kpa"), &assign_ExcIEEEAC7B_kpa)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.kpr"), &assign_ExcIEEEAC7B_kpr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.seve1"), &assign_ExcIEEEAC7B_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.seve2"), &assign_ExcIEEEAC7B_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.tdr"), &assign_ExcIEEEAC7B_tdr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.te"), &assign_ExcIEEEAC7B_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.tf"), &assign_ExcIEEEAC7B_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.vamax"), &assign_ExcIEEEAC7B_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.vamin"), &assign_ExcIEEEAC7B_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.ve1"), &assign_ExcIEEEAC7B_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.ve2"), &assign_ExcIEEEAC7B_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.vemin"), &assign_ExcIEEEAC7B_vemin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.vfemax"), &assign_ExcIEEEAC7B_vfemax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.vrmax"), &assign_ExcIEEEAC7B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC7B.vrmin"), &assign_ExcIEEEAC7B_vrmin)); + assign_map.emplace("cim:ExcIEEEAC7B.kc", &assign_ExcIEEEAC7B_kc); + assign_map.emplace("cim:ExcIEEEAC7B.kd", &assign_ExcIEEEAC7B_kd); + assign_map.emplace("cim:ExcIEEEAC7B.kdr", &assign_ExcIEEEAC7B_kdr); + assign_map.emplace("cim:ExcIEEEAC7B.ke", &assign_ExcIEEEAC7B_ke); + assign_map.emplace("cim:ExcIEEEAC7B.kf1", &assign_ExcIEEEAC7B_kf1); + assign_map.emplace("cim:ExcIEEEAC7B.kf2", &assign_ExcIEEEAC7B_kf2); + assign_map.emplace("cim:ExcIEEEAC7B.kf3", &assign_ExcIEEEAC7B_kf3); + assign_map.emplace("cim:ExcIEEEAC7B.kia", &assign_ExcIEEEAC7B_kia); + assign_map.emplace("cim:ExcIEEEAC7B.kir", &assign_ExcIEEEAC7B_kir); + assign_map.emplace("cim:ExcIEEEAC7B.kl", &assign_ExcIEEEAC7B_kl); + assign_map.emplace("cim:ExcIEEEAC7B.kp", &assign_ExcIEEEAC7B_kp); + assign_map.emplace("cim:ExcIEEEAC7B.kpa", &assign_ExcIEEEAC7B_kpa); + assign_map.emplace("cim:ExcIEEEAC7B.kpr", &assign_ExcIEEEAC7B_kpr); + assign_map.emplace("cim:ExcIEEEAC7B.seve1", &assign_ExcIEEEAC7B_seve1); + assign_map.emplace("cim:ExcIEEEAC7B.seve2", &assign_ExcIEEEAC7B_seve2); + assign_map.emplace("cim:ExcIEEEAC7B.tdr", &assign_ExcIEEEAC7B_tdr); + assign_map.emplace("cim:ExcIEEEAC7B.te", &assign_ExcIEEEAC7B_te); + assign_map.emplace("cim:ExcIEEEAC7B.tf", &assign_ExcIEEEAC7B_tf); + assign_map.emplace("cim:ExcIEEEAC7B.vamax", &assign_ExcIEEEAC7B_vamax); + assign_map.emplace("cim:ExcIEEEAC7B.vamin", &assign_ExcIEEEAC7B_vamin); + assign_map.emplace("cim:ExcIEEEAC7B.ve1", &assign_ExcIEEEAC7B_ve1); + assign_map.emplace("cim:ExcIEEEAC7B.ve2", &assign_ExcIEEEAC7B_ve2); + assign_map.emplace("cim:ExcIEEEAC7B.vemin", &assign_ExcIEEEAC7B_vemin); + assign_map.emplace("cim:ExcIEEEAC7B.vfemax", &assign_ExcIEEEAC7B_vfemax); + assign_map.emplace("cim:ExcIEEEAC7B.vrmax", &assign_ExcIEEEAC7B_vrmax); + assign_map.emplace("cim:ExcIEEEAC7B.vrmin", &assign_ExcIEEEAC7B_vrmin); } void ExcIEEEAC7B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcIEEEAC7B.hpp b/CGMES_3.0.0/ExcIEEEAC7B.hpp index 83bcc2779..297573e66 100644 --- a/CGMES_3.0.0/ExcIEEEAC7B.hpp +++ b/CGMES_3.0.0/ExcIEEEAC7B.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE 421.5-2005 type AC7B model. The model represents excitation systems which consist of an AC alternator with either stationary or rotating rectifiers to produce the DC field requirements. It is an upgrade to earlier AC excitation systems, which replace only the controls but retain the AC alternator and diode rectifier bridge. Reference: IEEE 421.5-2005, 6.7. Note, however, that in IEEE 421.5-2005, the [1 / sTE] block is shown as [1 / (1 + sTE)], which is incorrect. - */ + /** \brief IEEE 421.5-2005 type AC7B model. The model represents excitation systems which consist of an AC alternator with either stationary or rotating rectifiers to produce the DC field requirements. It is an upgrade to earlier AC excitation systems, which replace only the controls but retain the AC alternator and diode rectifier bridge. Reference: IEEE 421.5-2005, 6.7. Note, however, that in IEEE 421.5-2005, the [1 / sTE] block is shown as [1 / (1 + sTE)], which is incorrect. */ class ExcIEEEAC7B : public ExcitationSystemDynamics { public: @@ -29,32 +27,83 @@ namespace CIMPP ExcIEEEAC7B(); ~ExcIEEEAC7B() override; - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (<i>K</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 0,18. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (<i>K</i><i><sub>D</sub></i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ - CIMPP::PU kdr; /* Voltage regulator derivative gain (<i>K</i><i><sub>DR</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (<i>K</i><i><sub>E</sub></i>). Typical value = 1. Default: nullptr */ - CIMPP::PU kf1; /* Excitation control system stabilizer gain (<i>K</i><i><sub>F1</sub></i>) (&gt;= 0). Typical value = 0,212. Default: nullptr */ - CIMPP::PU kf2; /* Excitation control system stabilizer gain (<i>K</i><i><sub>F2</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::PU kf3; /* Excitation control system stabilizer gain (<i>K</i><i><sub>F3</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::PU kia; /* Voltage regulator integral gain (<i>K</i><i><sub>IA</sub></i>) (&gt;= 0). Typical value = 59,69. Default: nullptr */ - CIMPP::PU kir; /* Voltage regulator integral gain (<i>K</i><i><sub>IR</sub></i>) (&gt;= 0). Typical value = 4,24. Default: nullptr */ - CIMPP::PU kl; /* Exciter field voltage lower limit parameter (<i>K</i><i><sub>L</sub></i>). Typical value = 10. Default: nullptr */ - CIMPP::PU kp; /* Potential circuit gain coefficient (<i>K</i><i><sub>P</sub></i>) (&gt; 0). Typical value = 4,96. Default: nullptr */ - CIMPP::PU kpa; /* Voltage regulator proportional gain (<i>K</i><i><sub>PA</sub></i>) (&gt; 0 if ExcIEEEAC7B.kia = 0). Typical value = 65,36. Default: nullptr */ - CIMPP::PU kpr; /* Voltage regulator proportional gain (<i>K</i><i><sub>PR</sub></i>) (&gt; 0 if ExcIEEEAC7B.kir = 0). Typical value = 4,24. Default: nullptr */ - CIMPP::Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, <i>V</i><i><sub>E1</sub></i>, back of commutating reactance (<i>S</i><i><sub>E</sub></i><i>[V</i><i><sub>E1</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,44. Default: 0.0 */ - CIMPP::Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, <i>V</i><i><sub>E2</sub></i>, back of commutating reactance (<i>S</i><i><sub>E</sub></i><i>[V</i><i><sub>E2</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,075. Default: 0.0 */ - CIMPP::Seconds tdr; /* Lag time constant (<i>T</i><i><sub>DR</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (<i>T</i><i><sub>E</sub></i>) (&gt; 0). Typical value = 1,1. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (<i>T</i><i><sub>F</sub></i>) (&gt; 0). Typical value = 1. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (<i>V</i><i><sub>AMAX</sub></i>) (&gt; 0). Typical value = 1. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (<i>V</i><i><sub>AMIN</sub></i>) (&lt; 0). Typical value = -0,95. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>V</i><i><sub>E1</sub></i>) (&gt; 0). Typical value = 6,3. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>V</i><i><sub>E2</sub></i>) (&gt; 0). Typical value = 3,02. Default: nullptr */ - CIMPP::PU vemin; /* Minimum exciter voltage output (<i>V</i><i><sub>EMIN</sub></i>) (&lt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::PU vfemax; /* Exciter field current limit reference (<i>V</i><i><sub>FEMAX</sub></i>). Typical value = 6,9. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (<i>V</i><i><sub>RMAX</sub></i>) (&gt; 0). Typical value = 5,79. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (<i>V</i><i><sub>RMIN</sub></i>) (&lt; 0). Typical value = -5,79. Default: nullptr */ + /** \brief Rectifier loading factor proportional to commutating reactance (<i>K</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 0,18. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (<i>K</i><i><sub>D</sub></i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Voltage regulator derivative gain (<i>K</i><i><sub>DR</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::PU kdr; + + /** \brief Exciter constant related to self-excited field (<i>K</i><i><sub>E</sub></i>). Typical value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gain (<i>K</i><i><sub>F1</sub></i>) (&gt;= 0). Typical value = 0,212. Default: nullptr */ + CIMPP::PU kf1; + + /** \brief Excitation control system stabilizer gain (<i>K</i><i><sub>F2</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::PU kf2; + + /** \brief Excitation control system stabilizer gain (<i>K</i><i><sub>F3</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::PU kf3; + + /** \brief Voltage regulator integral gain (<i>K</i><i><sub>IA</sub></i>) (&gt;= 0). Typical value = 59,69. Default: nullptr */ + CIMPP::PU kia; + + /** \brief Voltage regulator integral gain (<i>K</i><i><sub>IR</sub></i>) (&gt;= 0). Typical value = 4,24. Default: nullptr */ + CIMPP::PU kir; + + /** \brief Exciter field voltage lower limit parameter (<i>K</i><i><sub>L</sub></i>). Typical value = 10. Default: nullptr */ + CIMPP::PU kl; + + /** \brief Potential circuit gain coefficient (<i>K</i><i><sub>P</sub></i>) (&gt; 0). Typical value = 4,96. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Voltage regulator proportional gain (<i>K</i><i><sub>PA</sub></i>) (&gt; 0 if ExcIEEEAC7B.kia = 0). Typical value = 65,36. Default: nullptr */ + CIMPP::PU kpa; + + /** \brief Voltage regulator proportional gain (<i>K</i><i><sub>PR</sub></i>) (&gt; 0 if ExcIEEEAC7B.kir = 0). Typical value = 4,24. Default: nullptr */ + CIMPP::PU kpr; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>V</i><i><sub>E1</sub></i>, back of commutating reactance (<i>S</i><i><sub>E</sub></i><i>[V</i><i><sub>E1</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,44. Default: 0.0 */ + CIMPP::Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>V</i><i><sub>E2</sub></i>, back of commutating reactance (<i>S</i><i><sub>E</sub></i><i>[V</i><i><sub>E2</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,075. Default: 0.0 */ + CIMPP::Float seve2; + + /** \brief Lag time constant (<i>T</i><i><sub>DR</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tdr; + + /** \brief Exciter time constant, integration rate associated with exciter control (<i>T</i><i><sub>E</sub></i>) (&gt; 0). Typical value = 1,1. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (<i>T</i><i><sub>F</sub></i>) (&gt; 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage regulator output (<i>V</i><i><sub>AMAX</sub></i>) (&gt; 0). Typical value = 1. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (<i>V</i><i><sub>AMIN</sub></i>) (&lt; 0). Typical value = -0,95. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>V</i><i><sub>E1</sub></i>) (&gt; 0). Typical value = 6,3. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>V</i><i><sub>E2</sub></i>) (&gt; 0). Typical value = 3,02. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Minimum exciter voltage output (<i>V</i><i><sub>EMIN</sub></i>) (&lt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::PU vemin; + + /** \brief Exciter field current limit reference (<i>V</i><i><sub>FEMAX</sub></i>). Typical value = 6,9. Default: nullptr */ + CIMPP::PU vfemax; + + /** \brief Maximum voltage regulator output (<i>V</i><i><sub>RMAX</sub></i>) (&gt; 0). Typical value = 5,79. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (<i>V</i><i><sub>RMIN</sub></i>) (&lt; 0). Typical value = -5,79. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcIEEEAC8B.cpp b/CGMES_3.0.0/ExcIEEEAC8B.cpp index f631652a5..ebf326092 100644 --- a/CGMES_3.0.0/ExcIEEEAC8B.cpp +++ b/CGMES_3.0.0/ExcIEEEAC8B.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEAC8B::ExcIEEEAC8B() {}; -ExcIEEEAC8B::~ExcIEEEAC8B() {}; +ExcIEEEAC8B::ExcIEEEAC8B() {} +ExcIEEEAC8B::~ExcIEEEAC8B() {} static const std::list PossibleProfilesForClass = { @@ -74,246 +56,262 @@ ExcIEEEAC8B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEAC8B_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_kdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_kdr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kdr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_kir(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_kir(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kir; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_kpr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_kpr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_seve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_seve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_seve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_seve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_tdr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_tdr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_ve1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_ve1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_ve2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_ve2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ve2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_vemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_vemin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vemin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_vfemax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_vfemax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfemax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEAC8B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEAC8B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEAC8B_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -327,7 +325,8 @@ bool get_ExcIEEEAC8B_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC8B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -341,7 +340,8 @@ bool get_ExcIEEEAC8B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC8B_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -355,7 +355,8 @@ bool get_ExcIEEEAC8B_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC8B_kdr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdr; if (!buffer.str().empty()) @@ -369,7 +370,8 @@ bool get_ExcIEEEAC8B_kdr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC8B_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -383,7 +385,8 @@ bool get_ExcIEEEAC8B_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC8B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kir; if (!buffer.str().empty()) @@ -397,7 +400,8 @@ bool get_ExcIEEEAC8B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC8B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpr; if (!buffer.str().empty()) @@ -411,7 +415,8 @@ bool get_ExcIEEEAC8B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC8B_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve1; if (!buffer.str().empty()) @@ -425,7 +430,8 @@ bool get_ExcIEEEAC8B_seve1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC8B_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seve2; if (!buffer.str().empty()) @@ -439,7 +445,8 @@ bool get_ExcIEEEAC8B_seve2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC8B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -453,7 +460,8 @@ bool get_ExcIEEEAC8B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC8B_tdr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdr; if (!buffer.str().empty()) @@ -467,7 +475,8 @@ bool get_ExcIEEEAC8B_tdr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC8B_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -481,7 +490,8 @@ bool get_ExcIEEEAC8B_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEAC8B_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve1; if (!buffer.str().empty()) @@ -495,7 +505,8 @@ bool get_ExcIEEEAC8B_ve1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC8B_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ve2; if (!buffer.str().empty()) @@ -509,7 +520,8 @@ bool get_ExcIEEEAC8B_ve2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEAC8B_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vemin; if (!buffer.str().empty()) @@ -523,7 +535,8 @@ bool get_ExcIEEEAC8B_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC8B_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfemax; if (!buffer.str().empty()) @@ -537,7 +550,8 @@ bool get_ExcIEEEAC8B_vfemax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEAC8B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -551,7 +565,8 @@ bool get_ExcIEEEAC8B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEAC8B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEAC8B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -563,8 +578,6 @@ bool get_ExcIEEEAC8B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEAC8B::debugName[] = "ExcIEEEAC8B"; const char* ExcIEEEAC8B::debugString() const { @@ -573,29 +586,29 @@ const char* ExcIEEEAC8B::debugString() const void ExcIEEEAC8B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B"), &ExcIEEEAC8B_factory)); + factory_map.emplace("cim:ExcIEEEAC8B", &ExcIEEEAC8B_factory); } void ExcIEEEAC8B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.ka"), &assign_ExcIEEEAC8B_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.kc"), &assign_ExcIEEEAC8B_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.kd"), &assign_ExcIEEEAC8B_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.kdr"), &assign_ExcIEEEAC8B_kdr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.ke"), &assign_ExcIEEEAC8B_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.kir"), &assign_ExcIEEEAC8B_kir)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.kpr"), &assign_ExcIEEEAC8B_kpr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.seve1"), &assign_ExcIEEEAC8B_seve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.seve2"), &assign_ExcIEEEAC8B_seve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.ta"), &assign_ExcIEEEAC8B_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.tdr"), &assign_ExcIEEEAC8B_tdr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.te"), &assign_ExcIEEEAC8B_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.ve1"), &assign_ExcIEEEAC8B_ve1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.ve2"), &assign_ExcIEEEAC8B_ve2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.vemin"), &assign_ExcIEEEAC8B_vemin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.vfemax"), &assign_ExcIEEEAC8B_vfemax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.vrmax"), &assign_ExcIEEEAC8B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEAC8B.vrmin"), &assign_ExcIEEEAC8B_vrmin)); + assign_map.emplace("cim:ExcIEEEAC8B.ka", &assign_ExcIEEEAC8B_ka); + assign_map.emplace("cim:ExcIEEEAC8B.kc", &assign_ExcIEEEAC8B_kc); + assign_map.emplace("cim:ExcIEEEAC8B.kd", &assign_ExcIEEEAC8B_kd); + assign_map.emplace("cim:ExcIEEEAC8B.kdr", &assign_ExcIEEEAC8B_kdr); + assign_map.emplace("cim:ExcIEEEAC8B.ke", &assign_ExcIEEEAC8B_ke); + assign_map.emplace("cim:ExcIEEEAC8B.kir", &assign_ExcIEEEAC8B_kir); + assign_map.emplace("cim:ExcIEEEAC8B.kpr", &assign_ExcIEEEAC8B_kpr); + assign_map.emplace("cim:ExcIEEEAC8B.seve1", &assign_ExcIEEEAC8B_seve1); + assign_map.emplace("cim:ExcIEEEAC8B.seve2", &assign_ExcIEEEAC8B_seve2); + assign_map.emplace("cim:ExcIEEEAC8B.ta", &assign_ExcIEEEAC8B_ta); + assign_map.emplace("cim:ExcIEEEAC8B.tdr", &assign_ExcIEEEAC8B_tdr); + assign_map.emplace("cim:ExcIEEEAC8B.te", &assign_ExcIEEEAC8B_te); + assign_map.emplace("cim:ExcIEEEAC8B.ve1", &assign_ExcIEEEAC8B_ve1); + assign_map.emplace("cim:ExcIEEEAC8B.ve2", &assign_ExcIEEEAC8B_ve2); + assign_map.emplace("cim:ExcIEEEAC8B.vemin", &assign_ExcIEEEAC8B_vemin); + assign_map.emplace("cim:ExcIEEEAC8B.vfemax", &assign_ExcIEEEAC8B_vfemax); + assign_map.emplace("cim:ExcIEEEAC8B.vrmax", &assign_ExcIEEEAC8B_vrmax); + assign_map.emplace("cim:ExcIEEEAC8B.vrmin", &assign_ExcIEEEAC8B_vrmin); } void ExcIEEEAC8B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcIEEEAC8B.hpp b/CGMES_3.0.0/ExcIEEEAC8B.hpp index fea2ec3ed..943ff78c7 100644 --- a/CGMES_3.0.0/ExcIEEEAC8B.hpp +++ b/CGMES_3.0.0/ExcIEEEAC8B.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE 421.5-2005 type AC8B model. This model represents a PID voltage regulator with either a brushless exciter or DC exciter. The AVR in this model consists of PID control, with separate constants for the proportional (KPR), integral (KIR), and derivative (KDR) gains. The representation of the brushless exciter (TE, KE, SE, KC, KD) is similar to the model type AC2A. The type AC8B model can be used to represent static voltage regulators applied to brushless excitation systems. Digitally based voltage regulators feeding DC rotating main exciters can be represented with the AC type AC8B model with the parameters KC and KD set to 0. For thyristor power stages fed from the generator terminals, the limits VRMAX and VRMIN should be a function of terminal voltage: VT x VRMAX and VT x VRMIN. Reference: IEEE 421.5-2005, 6.8. - */ + /** \brief IEEE 421.5-2005 type AC8B model. This model represents a PID voltage regulator with either a brushless exciter or DC exciter. The AVR in this model consists of PID control, with separate constants for the proportional (KPR), integral (KIR), and derivative (KDR) gains. The representation of the brushless exciter (TE, KE, SE, KC, KD) is similar to the model type AC2A. The type AC8B model can be used to represent static voltage regulators applied to brushless excitation systems. Digitally based voltage regulators feeding DC rotating main exciters can be represented with the AC type AC8B model with the parameters KC and KD set to 0. For thyristor power stages fed from the generator terminals, the limits VRMAX and VRMIN should be a function of terminal voltage: VT x VRMAX and VT x VRMIN. Reference: IEEE 421.5-2005, 6.8. */ class ExcIEEEAC8B : public ExcitationSystemDynamics { public: @@ -29,24 +27,59 @@ namespace CIMPP ExcIEEEAC8B(); ~ExcIEEEAC8B() override; - CIMPP::PU ka; /* Voltage regulator gain (<i>K</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 1. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (<i>K</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 0,55. Default: nullptr */ - CIMPP::PU kd; /* Demagnetizing factor, a function of exciter alternator reactances (<i>K</i><i><sub>D</sub></i>) (&gt;= 0). Typical value = 1,1. Default: nullptr */ - CIMPP::PU kdr; /* Voltage regulator derivative gain (<i>K</i><i><sub>DR</sub></i>) (&gt;= 0). Typical value = 10. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (<i>K</i><i><sub>E</sub></i>). Typical value = 1. Default: nullptr */ - CIMPP::PU kir; /* Voltage regulator integral gain (<i>K</i><i><sub>IR</sub></i>) (&gt;= 0). Typical value = 5. Default: nullptr */ - CIMPP::PU kpr; /* Voltage regulator proportional gain (<i>K</i><i><sub>PR</sub></i>) (&gt; 0 if ExcIEEEAC8B.kir = 0). Typical value = 80. Default: nullptr */ - CIMPP::Float seve1; /* Exciter saturation function value at the corresponding exciter voltage, <i>V</i><i><sub>E1</sub></i>, back of commutating reactance (<i>S</i><i><sub>E</sub></i><i>[V</i><i><sub>E1</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,3. Default: 0.0 */ - CIMPP::Float seve2; /* Exciter saturation function value at the corresponding exciter voltage, <i>V</i><i><sub>E2</sub></i>, back of commutating reactance (<i>S</i><i><sub>E</sub></i><i>[V</i><i><sub>E2</sub></i><i>]</i>) (&gt;= 0). Typical value = 3. Default: 0.0 */ - CIMPP::Seconds ta; /* Voltage regulator time constant (<i>T</i><i><sub>A</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tdr; /* Lag time constant (<i>T</i><i><sub>DR</sub></i>) (&gt; 0). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (<i>T</i><i><sub>E</sub></i>) (&gt; 0). Typical value = 1,2. Default: nullptr */ - CIMPP::PU ve1; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>V</i><i><sub>E1</sub></i>) (&gt; 0). Typical value = 6,5. Default: nullptr */ - CIMPP::PU ve2; /* Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>V</i><i><sub>E2</sub></i>) (&gt; 0). Typical value = 9. Default: nullptr */ - CIMPP::PU vemin; /* Minimum exciter voltage output (<i>V</i><i><sub>EMIN</sub></i>) (&lt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::PU vfemax; /* Exciter field current limit reference (<i>V</i><i><sub>FEMAX</sub></i>). Typical value = 6. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (<i>V</i><i><sub>RMAX</sub></i>) (&gt; 0). Typical value = 35. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (<i>V</i><i><sub>RMIN</sub></i>) (&lt;= 0). Typical value = 0. Default: nullptr */ + /** \brief Voltage regulator gain (<i>K</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 1. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (<i>K</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 0,55. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Demagnetizing factor, a function of exciter alternator reactances (<i>K</i><i><sub>D</sub></i>) (&gt;= 0). Typical value = 1,1. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Voltage regulator derivative gain (<i>K</i><i><sub>DR</sub></i>) (&gt;= 0). Typical value = 10. Default: nullptr */ + CIMPP::PU kdr; + + /** \brief Exciter constant related to self-excited field (<i>K</i><i><sub>E</sub></i>). Typical value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Voltage regulator integral gain (<i>K</i><i><sub>IR</sub></i>) (&gt;= 0). Typical value = 5. Default: nullptr */ + CIMPP::PU kir; + + /** \brief Voltage regulator proportional gain (<i>K</i><i><sub>PR</sub></i>) (&gt; 0 if ExcIEEEAC8B.kir = 0). Typical value = 80. Default: nullptr */ + CIMPP::PU kpr; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>V</i><i><sub>E1</sub></i>, back of commutating reactance (<i>S</i><i><sub>E</sub></i><i>[V</i><i><sub>E1</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,3. Default: 0.0 */ + CIMPP::Float seve1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>V</i><i><sub>E2</sub></i>, back of commutating reactance (<i>S</i><i><sub>E</sub></i><i>[V</i><i><sub>E2</sub></i><i>]</i>) (&gt;= 0). Typical value = 3. Default: 0.0 */ + CIMPP::Float seve2; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>A</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Lag time constant (<i>T</i><i><sub>DR</sub></i>) (&gt; 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds tdr; + + /** \brief Exciter time constant, integration rate associated with exciter control (<i>T</i><i><sub>E</sub></i>) (&gt; 0). Typical value = 1,2. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>V</i><i><sub>E1</sub></i>) (&gt; 0). Typical value = 6,5. Default: nullptr */ + CIMPP::PU ve1; + + /** \brief Exciter alternator output voltages back of commutating reactance at which saturation is defined (<i>V</i><i><sub>E2</sub></i>) (&gt; 0). Typical value = 9. Default: nullptr */ + CIMPP::PU ve2; + + /** \brief Minimum exciter voltage output (<i>V</i><i><sub>EMIN</sub></i>) (&lt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::PU vemin; + + /** \brief Exciter field current limit reference (<i>V</i><i><sub>FEMAX</sub></i>). Typical value = 6. Default: nullptr */ + CIMPP::PU vfemax; + + /** \brief Maximum voltage regulator output (<i>V</i><i><sub>RMAX</sub></i>) (&gt; 0). Typical value = 35. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (<i>V</i><i><sub>RMIN</sub></i>) (&lt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcIEEEDC1A.cpp b/CGMES_3.0.0/ExcIEEEDC1A.cpp index 33a13fde3..51102e7b5 100644 --- a/CGMES_3.0.0/ExcIEEEDC1A.cpp +++ b/CGMES_3.0.0/ExcIEEEDC1A.cpp @@ -8,27 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEDC1A::ExcIEEEDC1A() {}; -ExcIEEEDC1A::~ExcIEEEDC1A() {}; +ExcIEEEDC1A::ExcIEEEDC1A() {} +ExcIEEEDC1A::~ExcIEEEDC1A() {} static const std::list PossibleProfilesForClass = { @@ -70,220 +54,234 @@ ExcIEEEDC1A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEDC1A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_exclim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exclim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_seefd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_seefd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_uelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC1A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEDC1A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -297,7 +295,8 @@ bool get_ExcIEEEDC1A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEDC1A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -311,7 +310,8 @@ bool get_ExcIEEEDC1A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEDC1A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exclim; if (!buffer.str().empty()) @@ -325,7 +325,8 @@ bool get_ExcIEEEDC1A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -339,7 +340,8 @@ bool get_ExcIEEEDC1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC1A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -353,7 +355,8 @@ bool get_ExcIEEEDC1A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -367,7 +370,8 @@ bool get_ExcIEEEDC1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC1A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd1; if (!buffer.str().empty()) @@ -381,7 +385,8 @@ bool get_ExcIEEEDC1A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC1A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd2; if (!buffer.str().empty()) @@ -395,7 +400,8 @@ bool get_ExcIEEEDC1A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -409,7 +415,8 @@ bool get_ExcIEEEDC1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -423,7 +430,8 @@ bool get_ExcIEEEDC1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -437,7 +445,8 @@ bool get_ExcIEEEDC1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC1A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -451,7 +460,8 @@ bool get_ExcIEEEDC1A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -465,7 +475,8 @@ bool get_ExcIEEEDC1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC1A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uelin; if (!buffer.str().empty()) @@ -479,7 +490,8 @@ bool get_ExcIEEEDC1A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEDC1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -493,7 +505,8 @@ bool get_ExcIEEEDC1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEDC1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -505,8 +518,6 @@ bool get_ExcIEEEDC1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEDC1A::debugName[] = "ExcIEEEDC1A"; const char* ExcIEEEDC1A::debugString() const { @@ -515,27 +526,27 @@ const char* ExcIEEEDC1A::debugString() const void ExcIEEEDC1A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A"), &ExcIEEEDC1A_factory)); + factory_map.emplace("cim:ExcIEEEDC1A", &ExcIEEEDC1A_factory); } void ExcIEEEDC1A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.efd1"), &assign_ExcIEEEDC1A_efd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.efd2"), &assign_ExcIEEEDC1A_efd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.exclim"), &assign_ExcIEEEDC1A_exclim)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.ka"), &assign_ExcIEEEDC1A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.ke"), &assign_ExcIEEEDC1A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.kf"), &assign_ExcIEEEDC1A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.seefd1"), &assign_ExcIEEEDC1A_seefd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.seefd2"), &assign_ExcIEEEDC1A_seefd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.ta"), &assign_ExcIEEEDC1A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.tb"), &assign_ExcIEEEDC1A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.tc"), &assign_ExcIEEEDC1A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.te"), &assign_ExcIEEEDC1A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.tf"), &assign_ExcIEEEDC1A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.uelin"), &assign_ExcIEEEDC1A_uelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.vrmax"), &assign_ExcIEEEDC1A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC1A.vrmin"), &assign_ExcIEEEDC1A_vrmin)); + assign_map.emplace("cim:ExcIEEEDC1A.efd1", &assign_ExcIEEEDC1A_efd1); + assign_map.emplace("cim:ExcIEEEDC1A.efd2", &assign_ExcIEEEDC1A_efd2); + assign_map.emplace("cim:ExcIEEEDC1A.exclim", &assign_ExcIEEEDC1A_exclim); + assign_map.emplace("cim:ExcIEEEDC1A.ka", &assign_ExcIEEEDC1A_ka); + assign_map.emplace("cim:ExcIEEEDC1A.ke", &assign_ExcIEEEDC1A_ke); + assign_map.emplace("cim:ExcIEEEDC1A.kf", &assign_ExcIEEEDC1A_kf); + assign_map.emplace("cim:ExcIEEEDC1A.seefd1", &assign_ExcIEEEDC1A_seefd1); + assign_map.emplace("cim:ExcIEEEDC1A.seefd2", &assign_ExcIEEEDC1A_seefd2); + assign_map.emplace("cim:ExcIEEEDC1A.ta", &assign_ExcIEEEDC1A_ta); + assign_map.emplace("cim:ExcIEEEDC1A.tb", &assign_ExcIEEEDC1A_tb); + assign_map.emplace("cim:ExcIEEEDC1A.tc", &assign_ExcIEEEDC1A_tc); + assign_map.emplace("cim:ExcIEEEDC1A.te", &assign_ExcIEEEDC1A_te); + assign_map.emplace("cim:ExcIEEEDC1A.tf", &assign_ExcIEEEDC1A_tf); + assign_map.emplace("cim:ExcIEEEDC1A.uelin", &assign_ExcIEEEDC1A_uelin); + assign_map.emplace("cim:ExcIEEEDC1A.vrmax", &assign_ExcIEEEDC1A_vrmax); + assign_map.emplace("cim:ExcIEEEDC1A.vrmin", &assign_ExcIEEEDC1A_vrmin); } void ExcIEEEDC1A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcIEEEDC1A.hpp b/CGMES_3.0.0/ExcIEEEDC1A.hpp index 2a6c0b2b6..1932d492a 100644 --- a/CGMES_3.0.0/ExcIEEEDC1A.hpp +++ b/CGMES_3.0.0/ExcIEEEDC1A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE 421.5-2005 type DC1A model. This model represents field-controlled DC commutator exciters with continuously acting voltage regulators (especially the direct-acting rheostatic, rotating amplifier, and magnetic amplifier types). Because this model has been widely implemented by the industry, it is sometimes used to represent other types of systems when detailed data for them are not available or when a simplified model is required. Reference: IEEE 421.5-2005, 5.1. - */ + /** \brief IEEE 421.5-2005 type DC1A model. This model represents field-controlled DC commutator exciters with continuously acting voltage regulators (especially the direct-acting rheostatic, rotating amplifier, and magnetic amplifier types). Because this model has been widely implemented by the industry, it is sometimes used to represent other types of systems when detailed data for them are not available or when a simplified model is required. Reference: IEEE 421.5-2005, 5.1. */ class ExcIEEEDC1A : public ExcitationSystemDynamics { public: @@ -30,22 +28,53 @@ namespace CIMPP ExcIEEEDC1A(); ~ExcIEEEDC1A() override; - CIMPP::PU efd1; /* Exciter voltage at which exciter saturation is defined (<i>E</i><i><sub>FD1</sub></i>) (&gt; 0). Typical value = 3,1. Default: nullptr */ - CIMPP::PU efd2; /* Exciter voltage at which exciter saturation is defined (<i>E</i><i><sub>FD2</sub></i>) (&gt; 0). Typical value = 2,3. Default: nullptr */ - CIMPP::Boolean exclim; /* (<i>exclim</i>). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero is not applied to integrator output. Typical value = true. Default: false */ - CIMPP::PU ka; /* Voltage regulator gain (<i>K</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 46. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (<i>K</i><i><sub>E</sub></i>). Typical value = 0. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gain (<i>K</i><i><sub>F</sub></i>) (&gt;= 0). Typical value = 0.1. Default: nullptr */ - CIMPP::Float seefd1; /* Exciter saturation function value at the corresponding exciter voltage, <i>E</i><i><sub>FD1</sub></i> (<i>S</i><i><sub>E</sub></i><i>[E</i><i><sub>FD1</sub></i><i>]</i>) (&gt;= 0). Typical value = 0.33. Default: 0.0 */ - CIMPP::Float seefd2; /* Exciter saturation function value at the corresponding exciter voltage, <i>E</i><i><sub>FD2</sub></i> (<i>S</i><i><sub>E</sub></i><i>[E</i><i><sub>FD2</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,1. Default: 0.0 */ - CIMPP::Seconds ta; /* Voltage regulator time constant (<i>T</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 0,06. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (<i>T</i><i><sub>B</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (<i>T</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (<i>T</i><i><sub>E</sub></i>) (&gt; 0). Typical value = 0,46. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (<i>T</i><i><sub>F</sub></i>) (&gt; 0). Typical value = 1. Default: nullptr */ - CIMPP::Boolean uelin; /* UEL input (<i>uelin</i>). true = input is connected to the HV gate false = input connects to the error signal. Typical value = true. Default: false */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (<i>V</i><i><sub>RMAX</sub></i>) (&gt; ExcIEEEDC1A.vrmin). Typical value = 1. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (<i>V</i><i><sub>RMIN</sub></i>) (&lt; 0 and &lt; ExcIEEEDC1A.vrmax). Typical value = -0,9. Default: nullptr */ + /** \brief Exciter voltage at which exciter saturation is defined (<i>E</i><i><sub>FD1</sub></i>) (&gt; 0). Typical value = 3,1. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Exciter voltage at which exciter saturation is defined (<i>E</i><i><sub>FD2</sub></i>) (&gt; 0). Typical value = 2,3. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief (<i>exclim</i>). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero is not applied to integrator output. Typical value = true. Default: false */ + CIMPP::Boolean exclim; + + /** \brief Voltage regulator gain (<i>K</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 46. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Exciter constant related to self-excited field (<i>K</i><i><sub>E</sub></i>). Typical value = 0. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gain (<i>K</i><i><sub>F</sub></i>) (&gt;= 0). Typical value = 0.1. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>E</i><i><sub>FD1</sub></i> (<i>S</i><i><sub>E</sub></i><i>[E</i><i><sub>FD1</sub></i><i>]</i>) (&gt;= 0). Typical value = 0.33. Default: 0.0 */ + CIMPP::Float seefd1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>E</i><i><sub>FD2</sub></i> (<i>S</i><i><sub>E</sub></i><i>[E</i><i><sub>FD2</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,1. Default: 0.0 */ + CIMPP::Float seefd2; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 0,06. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>B</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (<i>T</i><i><sub>E</sub></i>) (&gt; 0). Typical value = 0,46. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (<i>T</i><i><sub>F</sub></i>) (&gt; 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief UEL input (<i>uelin</i>). true = input is connected to the HV gate false = input connects to the error signal. Typical value = true. Default: false */ + CIMPP::Boolean uelin; + + /** \brief Maximum voltage regulator output (<i>V</i><i><sub>RMAX</sub></i>) (&gt; ExcIEEEDC1A.vrmin). Typical value = 1. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (<i>V</i><i><sub>RMIN</sub></i>) (&lt; 0 and &lt; ExcIEEEDC1A.vrmax). Typical value = -0,9. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcIEEEDC2A.cpp b/CGMES_3.0.0/ExcIEEEDC2A.cpp index 2a4083476..da3ebc726 100644 --- a/CGMES_3.0.0/ExcIEEEDC2A.cpp +++ b/CGMES_3.0.0/ExcIEEEDC2A.cpp @@ -8,27 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEDC2A::ExcIEEEDC2A() {}; -ExcIEEEDC2A::~ExcIEEEDC2A() {}; +ExcIEEEDC2A::ExcIEEEDC2A() {} +ExcIEEEDC2A::~ExcIEEEDC2A() {} static const std::list PossibleProfilesForClass = { @@ -70,220 +54,234 @@ ExcIEEEDC2A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEDC2A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_exclim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exclim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_seefd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_seefd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_uelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC2A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC2A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEDC2A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -297,7 +295,8 @@ bool get_ExcIEEEDC2A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEDC2A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -311,7 +310,8 @@ bool get_ExcIEEEDC2A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEDC2A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exclim; if (!buffer.str().empty()) @@ -325,7 +325,8 @@ bool get_ExcIEEEDC2A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -339,7 +340,8 @@ bool get_ExcIEEEDC2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -353,7 +355,8 @@ bool get_ExcIEEEDC2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -367,7 +370,8 @@ bool get_ExcIEEEDC2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC2A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd1; if (!buffer.str().empty()) @@ -381,7 +385,8 @@ bool get_ExcIEEEDC2A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC2A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd2; if (!buffer.str().empty()) @@ -395,7 +400,8 @@ bool get_ExcIEEEDC2A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -409,7 +415,8 @@ bool get_ExcIEEEDC2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -423,7 +430,8 @@ bool get_ExcIEEEDC2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -437,7 +445,8 @@ bool get_ExcIEEEDC2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -451,7 +460,8 @@ bool get_ExcIEEEDC2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -465,7 +475,8 @@ bool get_ExcIEEEDC2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC2A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uelin; if (!buffer.str().empty()) @@ -479,7 +490,8 @@ bool get_ExcIEEEDC2A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEDC2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -493,7 +505,8 @@ bool get_ExcIEEEDC2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEDC2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -505,8 +518,6 @@ bool get_ExcIEEEDC2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEDC2A::debugName[] = "ExcIEEEDC2A"; const char* ExcIEEEDC2A::debugString() const { @@ -515,27 +526,27 @@ const char* ExcIEEEDC2A::debugString() const void ExcIEEEDC2A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A"), &ExcIEEEDC2A_factory)); + factory_map.emplace("cim:ExcIEEEDC2A", &ExcIEEEDC2A_factory); } void ExcIEEEDC2A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.efd1"), &assign_ExcIEEEDC2A_efd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.efd2"), &assign_ExcIEEEDC2A_efd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.exclim"), &assign_ExcIEEEDC2A_exclim)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.ka"), &assign_ExcIEEEDC2A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.ke"), &assign_ExcIEEEDC2A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.kf"), &assign_ExcIEEEDC2A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.seefd1"), &assign_ExcIEEEDC2A_seefd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.seefd2"), &assign_ExcIEEEDC2A_seefd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.ta"), &assign_ExcIEEEDC2A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.tb"), &assign_ExcIEEEDC2A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.tc"), &assign_ExcIEEEDC2A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.te"), &assign_ExcIEEEDC2A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.tf"), &assign_ExcIEEEDC2A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.uelin"), &assign_ExcIEEEDC2A_uelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.vrmax"), &assign_ExcIEEEDC2A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC2A.vrmin"), &assign_ExcIEEEDC2A_vrmin)); + assign_map.emplace("cim:ExcIEEEDC2A.efd1", &assign_ExcIEEEDC2A_efd1); + assign_map.emplace("cim:ExcIEEEDC2A.efd2", &assign_ExcIEEEDC2A_efd2); + assign_map.emplace("cim:ExcIEEEDC2A.exclim", &assign_ExcIEEEDC2A_exclim); + assign_map.emplace("cim:ExcIEEEDC2A.ka", &assign_ExcIEEEDC2A_ka); + assign_map.emplace("cim:ExcIEEEDC2A.ke", &assign_ExcIEEEDC2A_ke); + assign_map.emplace("cim:ExcIEEEDC2A.kf", &assign_ExcIEEEDC2A_kf); + assign_map.emplace("cim:ExcIEEEDC2A.seefd1", &assign_ExcIEEEDC2A_seefd1); + assign_map.emplace("cim:ExcIEEEDC2A.seefd2", &assign_ExcIEEEDC2A_seefd2); + assign_map.emplace("cim:ExcIEEEDC2A.ta", &assign_ExcIEEEDC2A_ta); + assign_map.emplace("cim:ExcIEEEDC2A.tb", &assign_ExcIEEEDC2A_tb); + assign_map.emplace("cim:ExcIEEEDC2A.tc", &assign_ExcIEEEDC2A_tc); + assign_map.emplace("cim:ExcIEEEDC2A.te", &assign_ExcIEEEDC2A_te); + assign_map.emplace("cim:ExcIEEEDC2A.tf", &assign_ExcIEEEDC2A_tf); + assign_map.emplace("cim:ExcIEEEDC2A.uelin", &assign_ExcIEEEDC2A_uelin); + assign_map.emplace("cim:ExcIEEEDC2A.vrmax", &assign_ExcIEEEDC2A_vrmax); + assign_map.emplace("cim:ExcIEEEDC2A.vrmin", &assign_ExcIEEEDC2A_vrmin); } void ExcIEEEDC2A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcIEEEDC2A.hpp b/CGMES_3.0.0/ExcIEEEDC2A.hpp index 07bd4647a..f70554732 100644 --- a/CGMES_3.0.0/ExcIEEEDC2A.hpp +++ b/CGMES_3.0.0/ExcIEEEDC2A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE 421.5-2005 type DC2A model. This model represents field-controlled DC commutator exciters with continuously acting voltage regulators having supplies obtained from the generator or auxiliary bus. It differs from the type DC1A model only in the voltage regulator output limits, which are now proportional to terminal voltage VT. It is representative of solid-state replacements for various forms of older mechanical and rotating amplifier regulating equipment connected to DC commutator exciters. Reference: IEEE 421.5-2005, 5.2. - */ + /** \brief IEEE 421.5-2005 type DC2A model. This model represents field-controlled DC commutator exciters with continuously acting voltage regulators having supplies obtained from the generator or auxiliary bus. It differs from the type DC1A model only in the voltage regulator output limits, which are now proportional to terminal voltage VT. It is representative of solid-state replacements for various forms of older mechanical and rotating amplifier regulating equipment connected to DC commutator exciters. Reference: IEEE 421.5-2005, 5.2. */ class ExcIEEEDC2A : public ExcitationSystemDynamics { public: @@ -30,22 +28,53 @@ namespace CIMPP ExcIEEEDC2A(); ~ExcIEEEDC2A() override; - CIMPP::PU efd1; /* Exciter voltage at which exciter saturation is defined (<i>E</i><i><sub>FD1</sub></i>) (&gt; 0). Typical value = 3,05. Default: nullptr */ - CIMPP::PU efd2; /* Exciter voltage at which exciter saturation is defined (<i>E</i><i><sub>FD2</sub></i>) (&gt; 0). Typical value = 2,29. Default: nullptr */ - CIMPP::PU exclim; /* (<i>exclim</i>). IEEE standard is ambiguous about lower limit on exciter output. Typical value = - 999 which means that there is no limit applied. Default: nullptr */ - CIMPP::PU ka; /* Voltage regulator gain (<i>K</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 300. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (<i>K</i><i><sub>E</sub></i>). Typical value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gain (<i>K</i><i><sub>F</sub></i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::Float seefd1; /* Exciter saturation function value at the corresponding exciter voltage, <i>E</i><i><sub>FD1</sub></i> (<i>S</i><i><sub>E</sub></i><i>[E</i><i><sub>FD1</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,279. Default: 0.0 */ - CIMPP::Float seefd2; /* Exciter saturation function value at the corresponding exciter voltage, <i>E</i><i><sub>FD2</sub></i> (<i>S</i><i><sub>E</sub></i><i>[E</i><i><sub>FD2</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,117. Default: 0.0 */ - CIMPP::Seconds ta; /* Voltage regulator time constant (<i>T</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 0,01. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (<i>T</i><i><sub>B</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (<i>T</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (<i>T</i><i><sub>E</sub></i>) (&gt; 0). Typical value = 1,33. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (<i>T</i><i><sub>F</sub></i>) (&gt; 0). Typical value = 0,675. Default: nullptr */ - CIMPP::Boolean uelin; /* UEL input (<i>uelin</i>). true = input is connected to the HV gate false = input connects to the error signal. Typical value = true. Default: false */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (<i>V</i><i><sub>RMAX</sub></i>)(&gt; ExcIEEEDC2A.vrmin). Typical value = 4,95. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (<i>V</i><i><sub>RMIN</sub></i>) (&lt; 0 and &lt; ExcIEEEDC2A.vrmax). Typical value = -4,9. Default: nullptr */ + /** \brief Exciter voltage at which exciter saturation is defined (<i>E</i><i><sub>FD1</sub></i>) (&gt; 0). Typical value = 3,05. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Exciter voltage at which exciter saturation is defined (<i>E</i><i><sub>FD2</sub></i>) (&gt; 0). Typical value = 2,29. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief (<i>exclim</i>). IEEE standard is ambiguous about lower limit on exciter output. Typical value = - 999 which means that there is no limit applied. Default: nullptr */ + CIMPP::PU exclim; + + /** \brief Voltage regulator gain (<i>K</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 300. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Exciter constant related to self-excited field (<i>K</i><i><sub>E</sub></i>). Typical value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gain (<i>K</i><i><sub>F</sub></i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>E</i><i><sub>FD1</sub></i> (<i>S</i><i><sub>E</sub></i><i>[E</i><i><sub>FD1</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,279. Default: 0.0 */ + CIMPP::Float seefd1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>E</i><i><sub>FD2</sub></i> (<i>S</i><i><sub>E</sub></i><i>[E</i><i><sub>FD2</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,117. Default: 0.0 */ + CIMPP::Float seefd2; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 0,01. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>B</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (<i>T</i><i><sub>E</sub></i>) (&gt; 0). Typical value = 1,33. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (<i>T</i><i><sub>F</sub></i>) (&gt; 0). Typical value = 0,675. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief UEL input (<i>uelin</i>). true = input is connected to the HV gate false = input connects to the error signal. Typical value = true. Default: false */ + CIMPP::Boolean uelin; + + /** \brief Maximum voltage regulator output (<i>V</i><i><sub>RMAX</sub></i>)(&gt; ExcIEEEDC2A.vrmin). Typical value = 4,95. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (<i>V</i><i><sub>RMIN</sub></i>) (&lt; 0 and &lt; ExcIEEEDC2A.vrmax). Typical value = -4,9. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcIEEEDC3A.cpp b/CGMES_3.0.0/ExcIEEEDC3A.cpp index 7da165bea..0a3177ee8 100644 --- a/CGMES_3.0.0/ExcIEEEDC3A.cpp +++ b/CGMES_3.0.0/ExcIEEEDC3A.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEDC3A::ExcIEEEDC3A() {}; -ExcIEEEDC3A::~ExcIEEEDC3A() {}; +ExcIEEEDC3A::ExcIEEEDC3A() {} +ExcIEEEDC3A::~ExcIEEEDC3A() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ ExcIEEEDC3A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEDC3A_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_exclim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_exclim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exclim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_kv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_kv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_seefd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_seefd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_trh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_trh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->trh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC3A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC3A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEDC3A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_ExcIEEEDC3A_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEDC3A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_ExcIEEEDC3A_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEDC3A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exclim; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_ExcIEEEDC3A_exclim(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC3A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_ExcIEEEDC3A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC3A_kv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kv; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_ExcIEEEDC3A_kv(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC3A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd1; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_ExcIEEEDC3A_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC3A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd2; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_ExcIEEEDC3A_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC3A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_ExcIEEEDC3A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC3A_trh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->trh; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_ExcIEEEDC3A_trh(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEDC3A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_ExcIEEEDC3A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEDC3A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_ExcIEEEDC3A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEDC3A::debugName[] = "ExcIEEEDC3A"; const char* ExcIEEEDC3A::debugString() const { @@ -370,22 +376,22 @@ const char* ExcIEEEDC3A::debugString() const void ExcIEEEDC3A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A"), &ExcIEEEDC3A_factory)); + factory_map.emplace("cim:ExcIEEEDC3A", &ExcIEEEDC3A_factory); } void ExcIEEEDC3A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.efd1"), &assign_ExcIEEEDC3A_efd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.efd2"), &assign_ExcIEEEDC3A_efd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.exclim"), &assign_ExcIEEEDC3A_exclim)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.ke"), &assign_ExcIEEEDC3A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.kv"), &assign_ExcIEEEDC3A_kv)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.seefd1"), &assign_ExcIEEEDC3A_seefd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.seefd2"), &assign_ExcIEEEDC3A_seefd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.te"), &assign_ExcIEEEDC3A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.trh"), &assign_ExcIEEEDC3A_trh)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.vrmax"), &assign_ExcIEEEDC3A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC3A.vrmin"), &assign_ExcIEEEDC3A_vrmin)); + assign_map.emplace("cim:ExcIEEEDC3A.efd1", &assign_ExcIEEEDC3A_efd1); + assign_map.emplace("cim:ExcIEEEDC3A.efd2", &assign_ExcIEEEDC3A_efd2); + assign_map.emplace("cim:ExcIEEEDC3A.exclim", &assign_ExcIEEEDC3A_exclim); + assign_map.emplace("cim:ExcIEEEDC3A.ke", &assign_ExcIEEEDC3A_ke); + assign_map.emplace("cim:ExcIEEEDC3A.kv", &assign_ExcIEEEDC3A_kv); + assign_map.emplace("cim:ExcIEEEDC3A.seefd1", &assign_ExcIEEEDC3A_seefd1); + assign_map.emplace("cim:ExcIEEEDC3A.seefd2", &assign_ExcIEEEDC3A_seefd2); + assign_map.emplace("cim:ExcIEEEDC3A.te", &assign_ExcIEEEDC3A_te); + assign_map.emplace("cim:ExcIEEEDC3A.trh", &assign_ExcIEEEDC3A_trh); + assign_map.emplace("cim:ExcIEEEDC3A.vrmax", &assign_ExcIEEEDC3A_vrmax); + assign_map.emplace("cim:ExcIEEEDC3A.vrmin", &assign_ExcIEEEDC3A_vrmin); } void ExcIEEEDC3A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcIEEEDC3A.hpp b/CGMES_3.0.0/ExcIEEEDC3A.hpp index e7b37533e..5e9dd35de 100644 --- a/CGMES_3.0.0/ExcIEEEDC3A.hpp +++ b/CGMES_3.0.0/ExcIEEEDC3A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE 421.5-2005 type DC3A model. This model represents older systems, in particular those DC commutator exciters with non-continuously acting regulators that were commonly used before the development of the continuously acting varieties. These systems respond at basically two different rates, depending upon the magnitude of voltage error. For small errors, adjustment is made periodically with a signal to a motor-operated rheostat. Larger errors cause resistors to be quickly shorted or inserted and a strong forcing signal applied to the exciter. Continuous motion of the motor-operated rheostat occurs for these larger error signals, even though it is bypassed by contactor action. Reference: IEEE 421.5-2005, 5.3. - */ + /** \brief IEEE 421.5-2005 type DC3A model. This model represents older systems, in particular those DC commutator exciters with non-continuously acting regulators that were commonly used before the development of the continuously acting varieties. These systems respond at basically two different rates, depending upon the magnitude of voltage error. For small errors, adjustment is made periodically with a signal to a motor-operated rheostat. Larger errors cause resistors to be quickly shorted or inserted and a strong forcing signal applied to the exciter. Continuous motion of the motor-operated rheostat occurs for these larger error signals, even though it is bypassed by contactor action. Reference: IEEE 421.5-2005, 5.3. */ class ExcIEEEDC3A : public ExcitationSystemDynamics { public: @@ -30,17 +28,38 @@ namespace CIMPP ExcIEEEDC3A(); ~ExcIEEEDC3A() override; - CIMPP::PU efd1; /* Exciter voltage at which exciter saturation is defined (<i>E</i><i><sub>FD1</sub></i>) (&gt; 0). Typical value = 3,375. Default: nullptr */ - CIMPP::PU efd2; /* Exciter voltage at which exciter saturation is defined (<i>E</i><i><sub>FD2</sub></i>) (&gt; 0). Typical value = 3,15. Default: nullptr */ - CIMPP::Boolean exclim; /* (<i>exclim</i>). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero is not applied to integrator output. Typical value = true. Default: false */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (<i>K</i><i><sub>E</sub></i>). Typical value = 0,05. Default: nullptr */ - CIMPP::PU kv; /* Fast raise/lower contact setting (<i>K</i><i><sub>V</sub></i>) (&gt; 0). Typical value = 0,05. Default: nullptr */ - CIMPP::Float seefd1; /* Exciter saturation function value at the corresponding exciter voltage, <i>E</i><i><sub>FD1</sub></i> (<i>S</i><i><sub>E</sub></i><i>[E</i><i><sub>FD1</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,267. Default: 0.0 */ - CIMPP::Float seefd2; /* Exciter saturation function value at the corresponding exciter voltage, <i>E</i><i><sub>FD2</sub></i> (<i>S</i><i><sub>E</sub></i><i>[E</i><i><sub>FD2</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,068. Default: 0.0 */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (<i>T</i><i><sub>E</sub></i>) (&gt; 0). Typical value = 0,5. Default: nullptr */ - CIMPP::Seconds trh; /* Rheostat travel time (<i>T</i><i><sub>RH</sub></i>) (&gt; 0). Typical value = 20. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (<i>V</i><i><sub>RMAX</sub></i>) (&gt; 0). Typical value = 1. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (<i>V</i><i><sub>RMIN</sub></i>) (&lt;= 0). Typical value = 0. Default: nullptr */ + /** \brief Exciter voltage at which exciter saturation is defined (<i>E</i><i><sub>FD1</sub></i>) (&gt; 0). Typical value = 3,375. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Exciter voltage at which exciter saturation is defined (<i>E</i><i><sub>FD2</sub></i>) (&gt; 0). Typical value = 3,15. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief (<i>exclim</i>). IEEE standard is ambiguous about lower limit on exciter output. true = a lower limit of zero is applied to integrator output false = a lower limit of zero is not applied to integrator output. Typical value = true. Default: false */ + CIMPP::Boolean exclim; + + /** \brief Exciter constant related to self-excited field (<i>K</i><i><sub>E</sub></i>). Typical value = 0,05. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Fast raise/lower contact setting (<i>K</i><i><sub>V</sub></i>) (&gt; 0). Typical value = 0,05. Default: nullptr */ + CIMPP::PU kv; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>E</i><i><sub>FD1</sub></i> (<i>S</i><i><sub>E</sub></i><i>[E</i><i><sub>FD1</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,267. Default: 0.0 */ + CIMPP::Float seefd1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>E</i><i><sub>FD2</sub></i> (<i>S</i><i><sub>E</sub></i><i>[E</i><i><sub>FD2</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,068. Default: 0.0 */ + CIMPP::Float seefd2; + + /** \brief Exciter time constant, integration rate associated with exciter control (<i>T</i><i><sub>E</sub></i>) (&gt; 0). Typical value = 0,5. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Rheostat travel time (<i>T</i><i><sub>RH</sub></i>) (&gt; 0). Typical value = 20. Default: nullptr */ + CIMPP::Seconds trh; + + /** \brief Maximum voltage regulator output (<i>V</i><i><sub>RMAX</sub></i>) (&gt; 0). Typical value = 1. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (<i>V</i><i><sub>RMIN</sub></i>) (&lt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcIEEEDC4B.cpp b/CGMES_3.0.0/ExcIEEEDC4B.cpp index 00bdc3be4..7f3838589 100644 --- a/CGMES_3.0.0/ExcIEEEDC4B.cpp +++ b/CGMES_3.0.0/ExcIEEEDC4B.cpp @@ -8,30 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEDC4B::ExcIEEEDC4B() {}; -ExcIEEEDC4B::~ExcIEEEDC4B() {}; +ExcIEEEDC4B::ExcIEEEDC4B() {} +ExcIEEEDC4B::~ExcIEEEDC4B() {} static const std::list PossibleProfilesForClass = { @@ -76,259 +57,276 @@ ExcIEEEDC4B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEDC4B_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_oelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_oelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->oelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_seefd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_seefd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_seefd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_seefd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->seefd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_uelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_vemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_vemin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vemin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEDC4B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEDC4B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEDC4B_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -342,7 +340,8 @@ bool get_ExcIEEEDC4B_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEDC4B_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -356,7 +355,8 @@ bool get_ExcIEEEDC4B_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEDC4B_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -370,7 +370,8 @@ bool get_ExcIEEEDC4B_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -384,7 +385,8 @@ bool get_ExcIEEEDC4B_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -398,7 +400,8 @@ bool get_ExcIEEEDC4B_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -412,7 +415,8 @@ bool get_ExcIEEEDC4B_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -426,7 +430,8 @@ bool get_ExcIEEEDC4B_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -440,7 +445,8 @@ bool get_ExcIEEEDC4B_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->oelin; if (!buffer.str().empty()) @@ -454,7 +460,8 @@ bool get_ExcIEEEDC4B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEDC4B_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd1; if (!buffer.str().empty()) @@ -468,7 +475,8 @@ bool get_ExcIEEEDC4B_seefd1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC4B_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->seefd2; if (!buffer.str().empty()) @@ -482,7 +490,8 @@ bool get_ExcIEEEDC4B_seefd2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEDC4B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -496,7 +505,8 @@ bool get_ExcIEEEDC4B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -510,7 +520,8 @@ bool get_ExcIEEEDC4B_td(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -524,7 +535,8 @@ bool get_ExcIEEEDC4B_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -538,7 +550,8 @@ bool get_ExcIEEEDC4B_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEDC4B_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uelin; if (!buffer.str().empty()) @@ -552,7 +565,8 @@ bool get_ExcIEEEDC4B_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEDC4B_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vemin; if (!buffer.str().empty()) @@ -566,7 +580,8 @@ bool get_ExcIEEEDC4B_vemin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEDC4B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -580,7 +595,8 @@ bool get_ExcIEEEDC4B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEDC4B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEDC4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -592,8 +608,6 @@ bool get_ExcIEEEDC4B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEDC4B::debugName[] = "ExcIEEEDC4B"; const char* ExcIEEEDC4B::debugString() const { @@ -602,30 +616,30 @@ const char* ExcIEEEDC4B::debugString() const void ExcIEEEDC4B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B"), &ExcIEEEDC4B_factory)); + factory_map.emplace("cim:ExcIEEEDC4B", &ExcIEEEDC4B_factory); } void ExcIEEEDC4B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.efd1"), &assign_ExcIEEEDC4B_efd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.efd2"), &assign_ExcIEEEDC4B_efd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.ka"), &assign_ExcIEEEDC4B_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.kd"), &assign_ExcIEEEDC4B_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.ke"), &assign_ExcIEEEDC4B_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.kf"), &assign_ExcIEEEDC4B_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.ki"), &assign_ExcIEEEDC4B_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.kp"), &assign_ExcIEEEDC4B_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.oelin"), &assign_ExcIEEEDC4B_oelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.seefd1"), &assign_ExcIEEEDC4B_seefd1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.seefd2"), &assign_ExcIEEEDC4B_seefd2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.ta"), &assign_ExcIEEEDC4B_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.td"), &assign_ExcIEEEDC4B_td)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.te"), &assign_ExcIEEEDC4B_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.tf"), &assign_ExcIEEEDC4B_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.uelin"), &assign_ExcIEEEDC4B_uelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.vemin"), &assign_ExcIEEEDC4B_vemin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.vrmax"), &assign_ExcIEEEDC4B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEDC4B.vrmin"), &assign_ExcIEEEDC4B_vrmin)); + assign_map.emplace("cim:ExcIEEEDC4B.efd1", &assign_ExcIEEEDC4B_efd1); + assign_map.emplace("cim:ExcIEEEDC4B.efd2", &assign_ExcIEEEDC4B_efd2); + assign_map.emplace("cim:ExcIEEEDC4B.ka", &assign_ExcIEEEDC4B_ka); + assign_map.emplace("cim:ExcIEEEDC4B.kd", &assign_ExcIEEEDC4B_kd); + assign_map.emplace("cim:ExcIEEEDC4B.ke", &assign_ExcIEEEDC4B_ke); + assign_map.emplace("cim:ExcIEEEDC4B.kf", &assign_ExcIEEEDC4B_kf); + assign_map.emplace("cim:ExcIEEEDC4B.ki", &assign_ExcIEEEDC4B_ki); + assign_map.emplace("cim:ExcIEEEDC4B.kp", &assign_ExcIEEEDC4B_kp); + assign_map.emplace("cim:ExcIEEEDC4B.oelin", &assign_ExcIEEEDC4B_oelin); + assign_map.emplace("cim:ExcIEEEDC4B.seefd1", &assign_ExcIEEEDC4B_seefd1); + assign_map.emplace("cim:ExcIEEEDC4B.seefd2", &assign_ExcIEEEDC4B_seefd2); + assign_map.emplace("cim:ExcIEEEDC4B.ta", &assign_ExcIEEEDC4B_ta); + assign_map.emplace("cim:ExcIEEEDC4B.td", &assign_ExcIEEEDC4B_td); + assign_map.emplace("cim:ExcIEEEDC4B.te", &assign_ExcIEEEDC4B_te); + assign_map.emplace("cim:ExcIEEEDC4B.tf", &assign_ExcIEEEDC4B_tf); + assign_map.emplace("cim:ExcIEEEDC4B.uelin", &assign_ExcIEEEDC4B_uelin); + assign_map.emplace("cim:ExcIEEEDC4B.vemin", &assign_ExcIEEEDC4B_vemin); + assign_map.emplace("cim:ExcIEEEDC4B.vrmax", &assign_ExcIEEEDC4B_vrmax); + assign_map.emplace("cim:ExcIEEEDC4B.vrmin", &assign_ExcIEEEDC4B_vrmin); } void ExcIEEEDC4B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcIEEEDC4B.hpp b/CGMES_3.0.0/ExcIEEEDC4B.hpp index bd758145d..13b019c99 100644 --- a/CGMES_3.0.0/ExcIEEEDC4B.hpp +++ b/CGMES_3.0.0/ExcIEEEDC4B.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE 421.5-2005 type DC4B model. These excitation systems utilize a field-controlled DC commutator exciter with a continuously acting voltage regulator having supplies obtained from the generator or auxiliary bus. Reference: IEEE 421.5-2005, 5.4. - */ + /** \brief IEEE 421.5-2005 type DC4B model. These excitation systems utilize a field-controlled DC commutator exciter with a continuously acting voltage regulator having supplies obtained from the generator or auxiliary bus. Reference: IEEE 421.5-2005, 5.4. */ class ExcIEEEDC4B : public ExcitationSystemDynamics { public: @@ -30,25 +28,62 @@ namespace CIMPP ExcIEEEDC4B(); ~ExcIEEEDC4B() override; - CIMPP::PU efd1; /* Exciter voltage at which exciter saturation is defined (<i>E</i><i><sub>FD1</sub></i>) (&gt; 0). Typical value = 1,75. Default: nullptr */ - CIMPP::PU efd2; /* Exciter voltage at which exciter saturation is defined (<i>E</i><i><sub>FD2</sub></i>) (&gt; 0). Typical value = 2,33. Default: nullptr */ - CIMPP::PU ka; /* Voltage regulator gain (<i>K</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 1. Default: nullptr */ - CIMPP::PU kd; /* Regulator derivative gain (<i>K</i><i><sub>D</sub></i>) (&gt;= 0). Typical value = 20. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (<i>K</i><i><sub>E</sub></i>). Typical value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gain (<i>K</i><i><sub>F</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::PU ki; /* Regulator integral gain (<i>K</i><i><sub>I</sub></i>) (&gt;= 0). Typical value = 20. Default: nullptr */ - CIMPP::PU kp; /* Regulator proportional gain (<i>K</i><i><sub>P</sub></i>) (&gt;= 0). Typical value = 20. Default: nullptr */ - CIMPP::Boolean oelin; /* OEL input (<i>OELin</i>). true = LV gate false = subtract from error signal. Typical value = true. Default: false */ - CIMPP::Float seefd1; /* Exciter saturation function value at the corresponding exciter voltage, <i>E</i><i><sub>FD1</sub></i> (<i>S</i><i><sub>E</sub></i><i>[E</i><i><sub>FD1</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,08. Default: 0.0 */ - CIMPP::Float seefd2; /* Exciter saturation function value at the corresponding exciter voltage, <i>E</i><i><sub>FD2</sub></i> (<i>S</i><i><sub>E</sub></i><i>[E</i><i><sub>FD2</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,27. Default: 0.0 */ - CIMPP::Seconds ta; /* Voltage regulator time constant (<i>T</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 0,2. Default: nullptr */ - CIMPP::Seconds td; /* Regulator derivative filter time constant (<i>T</i><i><sub>D</sub></i>) (&gt; 0 if ExcIEEEDC4B.kd &gt; 0). Typical value = 0,01. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (<i>T</i><i><sub>E</sub></i>) (&gt; 0). Typical value = 0,8. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (<i>T</i><i><sub>F</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::Boolean uelin; /* UEL input (<i>UELin</i>). true = HV gate false = add to error signal. Typical value = true. Default: false */ - CIMPP::PU vemin; /* Minimum exciter voltage output (<i>V</i><i><sub>EMIN</sub></i>) (&lt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (<i>V</i><i><sub>RMAX</sub></i>) (&gt; ExcIEEEDC4B.vrmin). Typical value = 2,7. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (<i>V</i><i><sub>RMIN</sub></i>) (&lt;= 0 and &lt; ExcIEEEDC4B.vrmax). Typical value = -0,9. Default: nullptr */ + /** \brief Exciter voltage at which exciter saturation is defined (<i>E</i><i><sub>FD1</sub></i>) (&gt; 0). Typical value = 1,75. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Exciter voltage at which exciter saturation is defined (<i>E</i><i><sub>FD2</sub></i>) (&gt; 0). Typical value = 2,33. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief Voltage regulator gain (<i>K</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 1. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Regulator derivative gain (<i>K</i><i><sub>D</sub></i>) (&gt;= 0). Typical value = 20. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter constant related to self-excited field (<i>K</i><i><sub>E</sub></i>). Typical value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gain (<i>K</i><i><sub>F</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Regulator integral gain (<i>K</i><i><sub>I</sub></i>) (&gt;= 0). Typical value = 20. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Regulator proportional gain (<i>K</i><i><sub>P</sub></i>) (&gt;= 0). Typical value = 20. Default: nullptr */ + CIMPP::PU kp; + + /** \brief OEL input (<i>OELin</i>). true = LV gate false = subtract from error signal. Typical value = true. Default: false */ + CIMPP::Boolean oelin; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>E</i><i><sub>FD1</sub></i> (<i>S</i><i><sub>E</sub></i><i>[E</i><i><sub>FD1</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,08. Default: 0.0 */ + CIMPP::Float seefd1; + + /** \brief Exciter saturation function value at the corresponding exciter voltage, <i>E</i><i><sub>FD2</sub></i> (<i>S</i><i><sub>E</sub></i><i>[E</i><i><sub>FD2</sub></i><i>]</i>) (&gt;= 0). Typical value = 0,27. Default: 0.0 */ + CIMPP::Float seefd2; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 0,2. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Regulator derivative filter time constant (<i>T</i><i><sub>D</sub></i>) (&gt; 0 if ExcIEEEDC4B.kd &gt; 0). Typical value = 0,01. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Exciter time constant, integration rate associated with exciter control (<i>T</i><i><sub>E</sub></i>) (&gt; 0). Typical value = 0,8. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (<i>T</i><i><sub>F</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief UEL input (<i>UELin</i>). true = HV gate false = add to error signal. Typical value = true. Default: false */ + CIMPP::Boolean uelin; + + /** \brief Minimum exciter voltage output (<i>V</i><i><sub>EMIN</sub></i>) (&lt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::PU vemin; + + /** \brief Maximum voltage regulator output (<i>V</i><i><sub>RMAX</sub></i>) (&gt; ExcIEEEDC4B.vrmin). Typical value = 2,7. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (<i>V</i><i><sub>RMIN</sub></i>) (&lt;= 0 and &lt; ExcIEEEDC4B.vrmax). Typical value = -0,9. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcIEEEST1A.cpp b/CGMES_3.0.0/ExcIEEEST1A.cpp index 2b5f7af83..17ef6c50f 100644 --- a/CGMES_3.0.0/ExcIEEEST1A.cpp +++ b/CGMES_3.0.0/ExcIEEEST1A.cpp @@ -8,30 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "ExcIEEEST1AUELselectorKind.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEST1A::ExcIEEEST1A() {}; -ExcIEEEST1A::~ExcIEEEST1A() {}; +ExcIEEEST1A::ExcIEEEST1A() {} +ExcIEEEST1A::~ExcIEEEST1A() {} static const std::list PossibleProfilesForClass = { @@ -76,259 +57,276 @@ ExcIEEEST1A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEST1A_ilr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_ilr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ilr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_klr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_klr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->klr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_pssin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_pssin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pssin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_tb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_tb1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_tc1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_tc1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_uelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_vimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST1A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEST1A_ilr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ilr; if (!buffer.str().empty()) @@ -342,7 +340,8 @@ bool get_ExcIEEEST1A_ilr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -356,7 +355,8 @@ bool get_ExcIEEEST1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST1A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -370,7 +370,8 @@ bool get_ExcIEEEST1A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -384,7 +385,8 @@ bool get_ExcIEEEST1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST1A_klr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->klr; if (!buffer.str().empty()) @@ -398,7 +400,8 @@ bool get_ExcIEEEST1A_klr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST1A_pssin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pssin; if (!buffer.str().empty()) @@ -412,7 +415,8 @@ bool get_ExcIEEEST1A_pssin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -426,7 +430,8 @@ bool get_ExcIEEEST1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -440,7 +445,8 @@ bool get_ExcIEEEST1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST1A_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb1; if (!buffer.str().empty()) @@ -454,7 +460,8 @@ bool get_ExcIEEEST1A_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -468,7 +475,8 @@ bool get_ExcIEEEST1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST1A_tc1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc1; if (!buffer.str().empty()) @@ -482,7 +490,8 @@ bool get_ExcIEEEST1A_tc1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -494,9 +503,25 @@ bool get_ExcIEEEST1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } +bool get_ExcIEEEST1A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->uelin; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_ExcIEEEST1A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -510,7 +535,8 @@ bool get_ExcIEEEST1A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST1A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -524,7 +550,8 @@ bool get_ExcIEEEST1A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST1A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -538,7 +565,8 @@ bool get_ExcIEEEST1A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST1A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimin; if (!buffer.str().empty()) @@ -552,7 +580,8 @@ bool get_ExcIEEEST1A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -566,7 +595,8 @@ bool get_ExcIEEEST1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -578,22 +608,6 @@ bool get_ExcIEEEST1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - -bool get_ExcIEEEST1A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const ExcIEEEST1A* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->uelin; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char ExcIEEEST1A::debugName[] = "ExcIEEEST1A"; const char* ExcIEEEST1A::debugString() const { @@ -602,30 +616,30 @@ const char* ExcIEEEST1A::debugString() const void ExcIEEEST1A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A"), &ExcIEEEST1A_factory)); + factory_map.emplace("cim:ExcIEEEST1A", &ExcIEEEST1A_factory); } void ExcIEEEST1A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.ilr"), &assign_ExcIEEEST1A_ilr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.ka"), &assign_ExcIEEEST1A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.kc"), &assign_ExcIEEEST1A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.kf"), &assign_ExcIEEEST1A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.klr"), &assign_ExcIEEEST1A_klr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.pssin"), &assign_ExcIEEEST1A_pssin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.ta"), &assign_ExcIEEEST1A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.tb"), &assign_ExcIEEEST1A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.tb1"), &assign_ExcIEEEST1A_tb1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.tc"), &assign_ExcIEEEST1A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.tc1"), &assign_ExcIEEEST1A_tc1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.tf"), &assign_ExcIEEEST1A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.uelin"), &assign_ExcIEEEST1A_uelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.vamax"), &assign_ExcIEEEST1A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.vamin"), &assign_ExcIEEEST1A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.vimax"), &assign_ExcIEEEST1A_vimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.vimin"), &assign_ExcIEEEST1A_vimin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.vrmax"), &assign_ExcIEEEST1A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST1A.vrmin"), &assign_ExcIEEEST1A_vrmin)); + assign_map.emplace("cim:ExcIEEEST1A.ilr", &assign_ExcIEEEST1A_ilr); + assign_map.emplace("cim:ExcIEEEST1A.ka", &assign_ExcIEEEST1A_ka); + assign_map.emplace("cim:ExcIEEEST1A.kc", &assign_ExcIEEEST1A_kc); + assign_map.emplace("cim:ExcIEEEST1A.kf", &assign_ExcIEEEST1A_kf); + assign_map.emplace("cim:ExcIEEEST1A.klr", &assign_ExcIEEEST1A_klr); + assign_map.emplace("cim:ExcIEEEST1A.pssin", &assign_ExcIEEEST1A_pssin); + assign_map.emplace("cim:ExcIEEEST1A.ta", &assign_ExcIEEEST1A_ta); + assign_map.emplace("cim:ExcIEEEST1A.tb", &assign_ExcIEEEST1A_tb); + assign_map.emplace("cim:ExcIEEEST1A.tb1", &assign_ExcIEEEST1A_tb1); + assign_map.emplace("cim:ExcIEEEST1A.tc", &assign_ExcIEEEST1A_tc); + assign_map.emplace("cim:ExcIEEEST1A.tc1", &assign_ExcIEEEST1A_tc1); + assign_map.emplace("cim:ExcIEEEST1A.tf", &assign_ExcIEEEST1A_tf); + assign_map.emplace("cim:ExcIEEEST1A.uelin", &assign_ExcIEEEST1A_uelin); + assign_map.emplace("cim:ExcIEEEST1A.vamax", &assign_ExcIEEEST1A_vamax); + assign_map.emplace("cim:ExcIEEEST1A.vamin", &assign_ExcIEEEST1A_vamin); + assign_map.emplace("cim:ExcIEEEST1A.vimax", &assign_ExcIEEEST1A_vimax); + assign_map.emplace("cim:ExcIEEEST1A.vimin", &assign_ExcIEEEST1A_vimin); + assign_map.emplace("cim:ExcIEEEST1A.vrmax", &assign_ExcIEEEST1A_vrmax); + assign_map.emplace("cim:ExcIEEEST1A.vrmin", &assign_ExcIEEEST1A_vrmin); } void ExcIEEEST1A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcIEEEST1A.hpp b/CGMES_3.0.0/ExcIEEEST1A.hpp index 5ee7dabeb..04096d444 100644 --- a/CGMES_3.0.0/ExcIEEEST1A.hpp +++ b/CGMES_3.0.0/ExcIEEEST1A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE 421.5-2005 type ST1A model. This model represents systems in which excitation power is supplied through a transformer from the generator terminals (or the unit's auxiliary bus) and is regulated by a controlled rectifier. The maximum exciter voltage available from such systems is directly related to the generator terminal voltage. Reference: IEEE 421.5-2005, 7.1. - */ + /** \brief IEEE 421.5-2005 type ST1A model. This model represents systems in which excitation power is supplied through a transformer from the generator terminals (or the unit's auxiliary bus) and is regulated by a controlled rectifier. The maximum exciter voltage available from such systems is directly related to the generator terminal voltage. Reference: IEEE 421.5-2005, 7.1. */ class ExcIEEEST1A : public ExcitationSystemDynamics { public: @@ -30,25 +28,62 @@ namespace CIMPP ExcIEEEST1A(); ~ExcIEEEST1A() override; - CIMPP::PU ilr; /* Exciter output current limit reference (<i>I</i><i><sub>LR</sub></i><i>)</i>. Typical value = 0. Default: nullptr */ - CIMPP::PU ka; /* Voltage regulator gain (<i>K</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 190. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (<i>K</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 0,08. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (<i>K</i><i><sub>F</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::PU klr; /* Exciter output current limiter gain (<i>K</i><i><sub>LR</sub></i>). Typical value = 0. Default: nullptr */ - CIMPP::Boolean pssin; /* Selector of the Power System Stabilizer (PSS) input (<i>PSSin</i>). true = PSS input (<i>Vs</i>) added to error signal false = PSS input (<i>Vs</i>) added to voltage regulator output. Typical value = true. Default: false */ - CIMPP::Seconds ta; /* Voltage regulator time constant (<i>T</i><i><sub>A</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (<i>T</i><i><sub>B</sub></i>) (&gt;= 0). Typical value = 10. Default: nullptr */ - CIMPP::Seconds tb1; /* Voltage regulator time constant (<i>T</i><i><sub>B1</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (<i>T</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::Seconds tc1; /* Voltage regulator time constant (<i>T</i><i><sub>C1</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (<i>T</i><i><sub>F</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::ExcIEEEST1AUELselectorKind uelin; /* Selector of the connection of the UEL input (<i>UELin</i>). Typical value = ignoreUELsignal. Default: 0 */ - CIMPP::PU vamax; /* Maximum voltage regulator output (<i>V</i><i><sub>AMAX</sub></i>) (&gt; 0). Typical value = 14,5. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (<i>V</i><i><sub>AMIN</sub></i>) (&lt; 0). Typical value = -14,5. Default: nullptr */ - CIMPP::PU vimax; /* Maximum voltage regulator input limit (<i>V</i><i><sub>IMAX</sub></i>) (&gt; 0). Typical value = 999. Default: nullptr */ - CIMPP::PU vimin; /* Minimum voltage regulator input limit (<i>V</i><i><sub>IMIN</sub></i>) (&lt; 0). Typical value = -999. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator outputs (<i>V</i><i><sub>RMAX</sub></i>) (&gt; 0). Typical value = 7,8. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator outputs (<i>V</i><i><sub>RMIN</sub></i>) (&lt; 0). Typical value = -6,7. Default: nullptr */ + /** \brief Exciter output current limit reference (<i>I</i><i><sub>LR</sub></i><i>)</i>. Typical value = 0. Default: nullptr */ + CIMPP::PU ilr; + + /** \brief Voltage regulator gain (<i>K</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 190. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (<i>K</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 0,08. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Excitation control system stabilizer gains (<i>K</i><i><sub>F</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Exciter output current limiter gain (<i>K</i><i><sub>LR</sub></i>). Typical value = 0. Default: nullptr */ + CIMPP::PU klr; + + /** \brief Selector of the Power System Stabilizer (PSS) input (<i>PSSin</i>). true = PSS input (<i>Vs</i>) added to error signal false = PSS input (<i>Vs</i>) added to voltage regulator output. Typical value = true. Default: false */ + CIMPP::Boolean pssin; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>A</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>B</sub></i>) (&gt;= 0). Typical value = 10. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>B1</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tb1; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>C1</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tc1; + + /** \brief Excitation control system stabilizer time constant (<i>T</i><i><sub>F</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Selector of the connection of the UEL input (<i>UELin</i>). Typical value = ignoreUELsignal. Default: 0 */ + CIMPP::ExcIEEEST1AUELselectorKind uelin; + + /** \brief Maximum voltage regulator output (<i>V</i><i><sub>AMAX</sub></i>) (&gt; 0). Typical value = 14,5. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (<i>V</i><i><sub>AMIN</sub></i>) (&lt; 0). Typical value = -14,5. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Maximum voltage regulator input limit (<i>V</i><i><sub>IMAX</sub></i>) (&gt; 0). Typical value = 999. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Minimum voltage regulator input limit (<i>V</i><i><sub>IMIN</sub></i>) (&lt; 0). Typical value = -999. Default: nullptr */ + CIMPP::PU vimin; + + /** \brief Maximum voltage regulator outputs (<i>V</i><i><sub>RMAX</sub></i>) (&gt; 0). Typical value = 7,8. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator outputs (<i>V</i><i><sub>RMIN</sub></i>) (&lt; 0). Typical value = -6,7. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcIEEEST1AUELselectorKind.cpp b/CGMES_3.0.0/ExcIEEEST1AUELselectorKind.cpp index cac712136..bdc148294 100644 --- a/CGMES_3.0.0/ExcIEEEST1AUELselectorKind.cpp +++ b/CGMES_3.0.0/ExcIEEEST1AUELselectorKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "ExcIEEEST1AUELselectorKind") + if (EnumSymbol.substr(0, pos) != "ExcIEEEST1AUELselectorKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,22 +50,22 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "ignoreUELsignal") + if (EnumSymbol == "ignoreUELsignal") { rop = ExcIEEEST1AUELselectorKind::ignoreUELsignal; return lop; } - if(EnumSymbol == "inputHVgateVoltageOutput") + if (EnumSymbol == "inputHVgateVoltageOutput") { rop = ExcIEEEST1AUELselectorKind::inputHVgateVoltageOutput; return lop; } - if(EnumSymbol == "inputHVgateErrorSignal") + if (EnumSymbol == "inputHVgateErrorSignal") { rop = ExcIEEEST1AUELselectorKind::inputHVgateErrorSignal; return lop; } - if(EnumSymbol == "inputAddedToErrorSignal") + if (EnumSymbol == "inputAddedToErrorSignal") { rop = ExcIEEEST1AUELselectorKind::inputAddedToErrorSignal; return lop; diff --git a/CGMES_3.0.0/ExcIEEEST1AUELselectorKind.hpp b/CGMES_3.0.0/ExcIEEEST1AUELselectorKind.hpp index 8c7912b47..0b7f26659 100644 --- a/CGMES_3.0.0/ExcIEEEST1AUELselectorKind.hpp +++ b/CGMES_3.0.0/ExcIEEEST1AUELselectorKind.hpp @@ -9,29 +9,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Types of connections for the UEL input used in ExcIEEEST1A. - */ + /** \brief Types of connections for the UEL input used in ExcIEEEST1A. */ class ExcIEEEST1AUELselectorKind { public: enum ExcIEEEST1AUELselectorKind_ENUM { - /** - * Ignore UEL signal. - */ + /** Ignore UEL signal. */ ignoreUELsignal, - /** - * UEL input HV gate with voltage regulator output. - */ + /** UEL input HV gate with voltage regulator output. */ inputHVgateVoltageOutput, - /** - * UEL input HV gate with error signal. - */ + /** UEL input HV gate with error signal. */ inputHVgateErrorSignal, - /** - * UEL input added to error signal. - */ + /** UEL input added to error signal. */ inputAddedToErrorSignal, }; diff --git a/CGMES_3.0.0/ExcIEEEST2A.cpp b/CGMES_3.0.0/ExcIEEEST2A.cpp index aed479c9d..0d80e5ac3 100644 --- a/CGMES_3.0.0/ExcIEEEST2A.cpp +++ b/CGMES_3.0.0/ExcIEEEST2A.cpp @@ -8,24 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEST2A::ExcIEEEST2A() {}; -ExcIEEEST2A::~ExcIEEEST2A() {}; +ExcIEEEST2A::ExcIEEEST2A() {} +ExcIEEEST2A::~ExcIEEEST2A() {} static const std::list PossibleProfilesForClass = { @@ -64,181 +51,192 @@ ExcIEEEST2A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEST2A_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_efdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_uelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST2A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST2A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEST2A_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmax; if (!buffer.str().empty()) @@ -252,7 +250,8 @@ bool get_ExcIEEEST2A_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEST2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -266,7 +265,8 @@ bool get_ExcIEEEST2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST2A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -280,7 +280,8 @@ bool get_ExcIEEEST2A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -294,7 +295,8 @@ bool get_ExcIEEEST2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -308,7 +310,8 @@ bool get_ExcIEEEST2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST2A_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -322,7 +325,8 @@ bool get_ExcIEEEST2A_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST2A_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -336,7 +340,8 @@ bool get_ExcIEEEST2A_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -350,7 +355,8 @@ bool get_ExcIEEEST2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -364,7 +370,8 @@ bool get_ExcIEEEST2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -378,7 +385,8 @@ bool get_ExcIEEEST2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST2A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uelin; if (!buffer.str().empty()) @@ -392,7 +400,8 @@ bool get_ExcIEEEST2A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -406,7 +415,8 @@ bool get_ExcIEEEST2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -418,8 +428,6 @@ bool get_ExcIEEEST2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEST2A::debugName[] = "ExcIEEEST2A"; const char* ExcIEEEST2A::debugString() const { @@ -428,24 +436,24 @@ const char* ExcIEEEST2A::debugString() const void ExcIEEEST2A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A"), &ExcIEEEST2A_factory)); + factory_map.emplace("cim:ExcIEEEST2A", &ExcIEEEST2A_factory); } void ExcIEEEST2A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.efdmax"), &assign_ExcIEEEST2A_efdmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.ka"), &assign_ExcIEEEST2A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.kc"), &assign_ExcIEEEST2A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.ke"), &assign_ExcIEEEST2A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.kf"), &assign_ExcIEEEST2A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.ki"), &assign_ExcIEEEST2A_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.kp"), &assign_ExcIEEEST2A_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.ta"), &assign_ExcIEEEST2A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.te"), &assign_ExcIEEEST2A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.tf"), &assign_ExcIEEEST2A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.uelin"), &assign_ExcIEEEST2A_uelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.vrmax"), &assign_ExcIEEEST2A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST2A.vrmin"), &assign_ExcIEEEST2A_vrmin)); + assign_map.emplace("cim:ExcIEEEST2A.efdmax", &assign_ExcIEEEST2A_efdmax); + assign_map.emplace("cim:ExcIEEEST2A.ka", &assign_ExcIEEEST2A_ka); + assign_map.emplace("cim:ExcIEEEST2A.kc", &assign_ExcIEEEST2A_kc); + assign_map.emplace("cim:ExcIEEEST2A.ke", &assign_ExcIEEEST2A_ke); + assign_map.emplace("cim:ExcIEEEST2A.kf", &assign_ExcIEEEST2A_kf); + assign_map.emplace("cim:ExcIEEEST2A.ki", &assign_ExcIEEEST2A_ki); + assign_map.emplace("cim:ExcIEEEST2A.kp", &assign_ExcIEEEST2A_kp); + assign_map.emplace("cim:ExcIEEEST2A.ta", &assign_ExcIEEEST2A_ta); + assign_map.emplace("cim:ExcIEEEST2A.te", &assign_ExcIEEEST2A_te); + assign_map.emplace("cim:ExcIEEEST2A.tf", &assign_ExcIEEEST2A_tf); + assign_map.emplace("cim:ExcIEEEST2A.uelin", &assign_ExcIEEEST2A_uelin); + assign_map.emplace("cim:ExcIEEEST2A.vrmax", &assign_ExcIEEEST2A_vrmax); + assign_map.emplace("cim:ExcIEEEST2A.vrmin", &assign_ExcIEEEST2A_vrmin); } void ExcIEEEST2A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcIEEEST2A.hpp b/CGMES_3.0.0/ExcIEEEST2A.hpp index f8ad3d138..3e3d13f21 100644 --- a/CGMES_3.0.0/ExcIEEEST2A.hpp +++ b/CGMES_3.0.0/ExcIEEEST2A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE 421.5-2005 type ST2A model. Some static systems use both current and voltage sources (generator terminal quantities) to comprise the power source. The regulator controls the exciter output through controlled saturation of the power transformer components. These compound-source rectifier excitation systems are designated type ST2A and are represented by ExcIEEEST2A. Reference: IEEE 421.5-2005, 7.2. - */ + /** \brief IEEE 421.5-2005 type ST2A model. Some static systems use both current and voltage sources (generator terminal quantities) to comprise the power source. The regulator controls the exciter output through controlled saturation of the power transformer components. These compound-source rectifier excitation systems are designated type ST2A and are represented by ExcIEEEST2A. Reference: IEEE 421.5-2005, 7.2. */ class ExcIEEEST2A : public ExcitationSystemDynamics { public: @@ -29,19 +27,44 @@ namespace CIMPP ExcIEEEST2A(); ~ExcIEEEST2A() override; - CIMPP::PU efdmax; /* Maximum field voltage (<i>E</i><i><sub>FDMax</sub></i>) (&gt;= 0). Typical value = 99. Default: nullptr */ - CIMPP::PU ka; /* Voltage regulator gain (<i>K</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 120. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (<i>K</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 1,82. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (<i>K</i><i><sub>E</sub></i>). Typical value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (<i>K</i><i><sub>F</sub></i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ - CIMPP::PU ki; /* Potential circuit gain coefficient (<i>K</i><i><sub>I</sub></i>) (&gt;= 0). Typical value = 8. Default: nullptr */ - CIMPP::PU kp; /* Potential circuit gain coefficient (<i>K</i><i><sub>P</sub></i>) (&gt;= 0). Typical value = 4,88. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (<i>T</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 0,15. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (<i>T</i><i><sub>E</sub></i>) (&gt; 0). Typical value = 0,5. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (<i>T</i><i><sub>F</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::Boolean uelin; /* UEL input (<i>UELin</i>). true = HV gate false = add to error signal. Typical value = true. Default: false */ - CIMPP::PU vrmax; /* Maximum voltage regulator outputs (<i>V</i><i><sub>RMAX</sub></i>) (&gt; 0). Typical value = 1. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator outputs (<i>V</i><i><sub>RMIN</sub></i>) (&lt;= 0). Typical value = 0. Default: nullptr */ + /** \brief Maximum field voltage (<i>E</i><i><sub>FDMax</sub></i>) (&gt;= 0). Typical value = 99. Default: nullptr */ + CIMPP::PU efdmax; + + /** \brief Voltage regulator gain (<i>K</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 120. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (<i>K</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 1,82. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Exciter constant related to self-excited field (<i>K</i><i><sub>E</sub></i>). Typical value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (<i>K</i><i><sub>F</sub></i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Potential circuit gain coefficient (<i>K</i><i><sub>I</sub></i>) (&gt;= 0). Typical value = 8. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Potential circuit gain coefficient (<i>K</i><i><sub>P</sub></i>) (&gt;= 0). Typical value = 4,88. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>A</sub></i>) (&gt; 0). Typical value = 0,15. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Exciter time constant, integration rate associated with exciter control (<i>T</i><i><sub>E</sub></i>) (&gt; 0). Typical value = 0,5. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (<i>T</i><i><sub>F</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief UEL input (<i>UELin</i>). true = HV gate false = add to error signal. Typical value = true. Default: false */ + CIMPP::Boolean uelin; + + /** \brief Maximum voltage regulator outputs (<i>V</i><i><sub>RMAX</sub></i>) (&gt; 0). Typical value = 1. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator outputs (<i>V</i><i><sub>RMIN</sub></i>) (&lt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcIEEEST3A.cpp b/CGMES_3.0.0/ExcIEEEST3A.cpp index 46dcb0087..143a70444 100644 --- a/CGMES_3.0.0/ExcIEEEST3A.cpp +++ b/CGMES_3.0.0/ExcIEEEST3A.cpp @@ -8,31 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "AngleDegrees.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEST3A::ExcIEEEST3A() {}; -ExcIEEEST3A::~ExcIEEEST3A() {}; +ExcIEEEST3A::ExcIEEEST3A() {} +ExcIEEEST3A::~ExcIEEEST3A() {} static const std::list PossibleProfilesForClass = { @@ -78,272 +58,290 @@ ExcIEEEST3A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEST3A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_km(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_km(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->km; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_thetap(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_thetap(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->thetap; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_tm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_tm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_vbmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_vbmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vbmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_vgmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_vgmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vgmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_vimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_vmmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_vmmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_vmmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_vmmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST3A_xl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST3A_xl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEST3A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -357,7 +355,8 @@ bool get_ExcIEEEST3A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -371,7 +370,8 @@ bool get_ExcIEEEST3A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -385,7 +385,8 @@ bool get_ExcIEEEST3A_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -399,7 +400,8 @@ bool get_ExcIEEEST3A_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_km(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->km; if (!buffer.str().empty()) @@ -413,7 +415,8 @@ bool get_ExcIEEEST3A_km(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -427,7 +430,8 @@ bool get_ExcIEEEST3A_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -441,7 +445,8 @@ bool get_ExcIEEEST3A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -455,7 +460,8 @@ bool get_ExcIEEEST3A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -469,7 +475,8 @@ bool get_ExcIEEEST3A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_thetap(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thetap; if (!buffer.str().empty()) @@ -483,7 +490,8 @@ bool get_ExcIEEEST3A_thetap(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEST3A_tm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tm; if (!buffer.str().empty()) @@ -497,7 +505,8 @@ bool get_ExcIEEEST3A_tm(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST3A_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vbmax; if (!buffer.str().empty()) @@ -511,7 +520,8 @@ bool get_ExcIEEEST3A_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST3A_vgmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vgmax; if (!buffer.str().empty()) @@ -525,7 +535,8 @@ bool get_ExcIEEEST3A_vgmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST3A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -539,7 +550,8 @@ bool get_ExcIEEEST3A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST3A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimin; if (!buffer.str().empty()) @@ -553,7 +565,8 @@ bool get_ExcIEEEST3A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST3A_vmmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmmax; if (!buffer.str().empty()) @@ -567,7 +580,8 @@ bool get_ExcIEEEST3A_vmmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST3A_vmmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmmin; if (!buffer.str().empty()) @@ -581,7 +595,8 @@ bool get_ExcIEEEST3A_vmmin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST3A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -595,7 +610,8 @@ bool get_ExcIEEEST3A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST3A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -609,7 +625,8 @@ bool get_ExcIEEEST3A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST3A_xl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xl; if (!buffer.str().empty()) @@ -621,8 +638,6 @@ bool get_ExcIEEEST3A_xl(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char ExcIEEEST3A::debugName[] = "ExcIEEEST3A"; const char* ExcIEEEST3A::debugString() const { @@ -631,31 +646,31 @@ const char* ExcIEEEST3A::debugString() const void ExcIEEEST3A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A"), &ExcIEEEST3A_factory)); + factory_map.emplace("cim:ExcIEEEST3A", &ExcIEEEST3A_factory); } void ExcIEEEST3A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.ka"), &assign_ExcIEEEST3A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.kc"), &assign_ExcIEEEST3A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.kg"), &assign_ExcIEEEST3A_kg)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.ki"), &assign_ExcIEEEST3A_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.km"), &assign_ExcIEEEST3A_km)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.kp"), &assign_ExcIEEEST3A_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.ta"), &assign_ExcIEEEST3A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.tb"), &assign_ExcIEEEST3A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.tc"), &assign_ExcIEEEST3A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.thetap"), &assign_ExcIEEEST3A_thetap)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.tm"), &assign_ExcIEEEST3A_tm)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.vbmax"), &assign_ExcIEEEST3A_vbmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.vgmax"), &assign_ExcIEEEST3A_vgmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.vimax"), &assign_ExcIEEEST3A_vimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.vimin"), &assign_ExcIEEEST3A_vimin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.vmmax"), &assign_ExcIEEEST3A_vmmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.vmmin"), &assign_ExcIEEEST3A_vmmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.vrmax"), &assign_ExcIEEEST3A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.vrmin"), &assign_ExcIEEEST3A_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST3A.xl"), &assign_ExcIEEEST3A_xl)); + assign_map.emplace("cim:ExcIEEEST3A.ka", &assign_ExcIEEEST3A_ka); + assign_map.emplace("cim:ExcIEEEST3A.kc", &assign_ExcIEEEST3A_kc); + assign_map.emplace("cim:ExcIEEEST3A.kg", &assign_ExcIEEEST3A_kg); + assign_map.emplace("cim:ExcIEEEST3A.ki", &assign_ExcIEEEST3A_ki); + assign_map.emplace("cim:ExcIEEEST3A.km", &assign_ExcIEEEST3A_km); + assign_map.emplace("cim:ExcIEEEST3A.kp", &assign_ExcIEEEST3A_kp); + assign_map.emplace("cim:ExcIEEEST3A.ta", &assign_ExcIEEEST3A_ta); + assign_map.emplace("cim:ExcIEEEST3A.tb", &assign_ExcIEEEST3A_tb); + assign_map.emplace("cim:ExcIEEEST3A.tc", &assign_ExcIEEEST3A_tc); + assign_map.emplace("cim:ExcIEEEST3A.thetap", &assign_ExcIEEEST3A_thetap); + assign_map.emplace("cim:ExcIEEEST3A.tm", &assign_ExcIEEEST3A_tm); + assign_map.emplace("cim:ExcIEEEST3A.vbmax", &assign_ExcIEEEST3A_vbmax); + assign_map.emplace("cim:ExcIEEEST3A.vgmax", &assign_ExcIEEEST3A_vgmax); + assign_map.emplace("cim:ExcIEEEST3A.vimax", &assign_ExcIEEEST3A_vimax); + assign_map.emplace("cim:ExcIEEEST3A.vimin", &assign_ExcIEEEST3A_vimin); + assign_map.emplace("cim:ExcIEEEST3A.vmmax", &assign_ExcIEEEST3A_vmmax); + assign_map.emplace("cim:ExcIEEEST3A.vmmin", &assign_ExcIEEEST3A_vmmin); + assign_map.emplace("cim:ExcIEEEST3A.vrmax", &assign_ExcIEEEST3A_vrmax); + assign_map.emplace("cim:ExcIEEEST3A.vrmin", &assign_ExcIEEEST3A_vrmin); + assign_map.emplace("cim:ExcIEEEST3A.xl", &assign_ExcIEEEST3A_xl); } void ExcIEEEST3A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcIEEEST3A.hpp b/CGMES_3.0.0/ExcIEEEST3A.hpp index 0ccf51dd1..5b08fff1b 100644 --- a/CGMES_3.0.0/ExcIEEEST3A.hpp +++ b/CGMES_3.0.0/ExcIEEEST3A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE 421.5-2005 type ST3A model. Some static systems utilize a field voltage control loop to linearize the exciter control characteristic. This also makes the output independent of supply source variations until supply limitations are reached. These systems utilize a variety of controlled-rectifier designs: full thyristor complements or hybrid bridges in either series or shunt configurations. The power source can consist of only a potential source, either fed from the machine terminals or from internal windings. Some designs can have compound power sources utilizing both machine potential and current. These power sources are represented as phasor combinations of machine terminal current and voltage and are accommodated by suitable parameters in model type ST3A which is represented by ExcIEEEST3A. Reference: IEEE 421.5-2005, 7.3. - */ + /** \brief IEEE 421.5-2005 type ST3A model. Some static systems utilize a field voltage control loop to linearize the exciter control characteristic. This also makes the output independent of supply source variations until supply limitations are reached. These systems utilize a variety of controlled-rectifier designs: full thyristor complements or hybrid bridges in either series or shunt configurations. The power source can consist of only a potential source, either fed from the machine terminals or from internal windings. Some designs can have compound power sources utilizing both machine potential and current. These power sources are represented as phasor combinations of machine terminal current and voltage and are accommodated by suitable parameters in model type ST3A which is represented by ExcIEEEST3A. Reference: IEEE 421.5-2005, 7.3. */ class ExcIEEEST3A : public ExcitationSystemDynamics { public: @@ -29,26 +27,65 @@ namespace CIMPP ExcIEEEST3A(); ~ExcIEEEST3A() override; - CIMPP::PU ka; /* Voltage regulator gain (<i>K</i><i><sub>A</sub></i>) (&gt; 0). This is parameter <i>K</i> in the IEEE standard. Typical value = 200. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (<i>K</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 0,2. Default: nullptr */ - CIMPP::PU kg; /* Feedback gain constant of the inner loop field regulator (<i>K</i><i><sub>G</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::PU ki; /* Potential circuit gain coefficient (<i>K</i><i><sub>I</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::PU km; /* Forward gain constant of the inner loop field regulator (<i>K</i><i><sub>M</sub></i>) (&gt; 0). Typical value = 7,93. Default: nullptr */ - CIMPP::PU kp; /* Potential circuit gain coefficient (<i>K</i><i><sub>P</sub></i>) (&gt; 0). Typical value = 6,15. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (<i>T</i><i><sub>A</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (<i>T</i><i><sub>B</sub></i>) (&gt;= 0). Typical value = 10. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (<i>T</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::AngleDegrees thetap; /* Potential circuit phase angle (<i>thetap</i>). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tm; /* Forward time constant of inner loop field regulator (<i>T</i><i><sub>M</sub></i>) (&gt; 0). Typical value = 0,4. Default: nullptr */ - CIMPP::PU vbmax; /* Maximum excitation voltage (<i>V</i><i><sub>BMax</sub></i>) (&gt; 0). Typical value = 6,9. Default: nullptr */ - CIMPP::PU vgmax; /* Maximum inner loop feedback voltage (<i>V</i><i><sub>GMax</sub></i>) (&gt;= 0). Typical value = 5,8. Default: nullptr */ - CIMPP::PU vimax; /* Maximum voltage regulator input limit (<i>V</i><i><sub>IMAX</sub></i>) (&gt; 0). Typical value = 0,2. Default: nullptr */ - CIMPP::PU vimin; /* Minimum voltage regulator input limit (<i>V</i><i><sub>IMIN</sub></i>) (&lt; 0). Typical value = -0,2. Default: nullptr */ - CIMPP::PU vmmax; /* Maximum inner loop output (<i>V</i><i><sub>MMax</sub></i>) (&gt; 0). Typical value = 1. Default: nullptr */ - CIMPP::PU vmmin; /* Minimum inner loop output (<i>V</i><i><sub>MMin</sub></i>) (&lt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (<i>V</i><i><sub>RMAX</sub></i>) (&gt; 0). Typical value = 10. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (<i>V</i><i><sub>RMIN</sub></i>) (&lt; 0). Typical value = -10. Default: nullptr */ - CIMPP::PU xl; /* Reactance associated with potential source (<i>X</i><i><sub>L</sub></i>) (&gt;= 0). Typical value = 0,081. Default: nullptr */ + /** \brief Voltage regulator gain (<i>K</i><i><sub>A</sub></i>) (&gt; 0). This is parameter <i>K</i> in the IEEE standard. Typical value = 200. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (<i>K</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 0,2. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Feedback gain constant of the inner loop field regulator (<i>K</i><i><sub>G</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Potential circuit gain coefficient (<i>K</i><i><sub>I</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Forward gain constant of the inner loop field regulator (<i>K</i><i><sub>M</sub></i>) (&gt; 0). Typical value = 7,93. Default: nullptr */ + CIMPP::PU km; + + /** \brief Potential circuit gain coefficient (<i>K</i><i><sub>P</sub></i>) (&gt; 0). Typical value = 6,15. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>A</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>B</sub></i>) (&gt;= 0). Typical value = 10. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Potential circuit phase angle (<i>thetap</i>). Typical value = 0. Default: nullptr */ + CIMPP::AngleDegrees thetap; + + /** \brief Forward time constant of inner loop field regulator (<i>T</i><i><sub>M</sub></i>) (&gt; 0). Typical value = 0,4. Default: nullptr */ + CIMPP::Seconds tm; + + /** \brief Maximum excitation voltage (<i>V</i><i><sub>BMax</sub></i>) (&gt; 0). Typical value = 6,9. Default: nullptr */ + CIMPP::PU vbmax; + + /** \brief Maximum inner loop feedback voltage (<i>V</i><i><sub>GMax</sub></i>) (&gt;= 0). Typical value = 5,8. Default: nullptr */ + CIMPP::PU vgmax; + + /** \brief Maximum voltage regulator input limit (<i>V</i><i><sub>IMAX</sub></i>) (&gt; 0). Typical value = 0,2. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Minimum voltage regulator input limit (<i>V</i><i><sub>IMIN</sub></i>) (&lt; 0). Typical value = -0,2. Default: nullptr */ + CIMPP::PU vimin; + + /** \brief Maximum inner loop output (<i>V</i><i><sub>MMax</sub></i>) (&gt; 0). Typical value = 1. Default: nullptr */ + CIMPP::PU vmmax; + + /** \brief Minimum inner loop output (<i>V</i><i><sub>MMin</sub></i>) (&lt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::PU vmmin; + + /** \brief Maximum voltage regulator output (<i>V</i><i><sub>RMAX</sub></i>) (&gt; 0). Typical value = 10. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (<i>V</i><i><sub>RMIN</sub></i>) (&lt; 0). Typical value = -10. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief Reactance associated with potential source (<i>X</i><i><sub>L</sub></i>) (&gt;= 0). Typical value = 0,081. Default: nullptr */ + CIMPP::PU xl; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcIEEEST4B.cpp b/CGMES_3.0.0/ExcIEEEST4B.cpp index 007525a0f..9912a54a6 100644 --- a/CGMES_3.0.0/ExcIEEEST4B.cpp +++ b/CGMES_3.0.0/ExcIEEEST4B.cpp @@ -8,27 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "AngleDegrees.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEST4B::ExcIEEEST4B() {}; -ExcIEEEST4B::~ExcIEEEST4B() {}; +ExcIEEEST4B::ExcIEEEST4B() {} +ExcIEEEST4B::~ExcIEEEST4B() {} static const std::list PossibleProfilesForClass = { @@ -70,220 +54,234 @@ ExcIEEEST4B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEST4B_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_kim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_kim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_kir(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_kir(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kir; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_kpm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_kpm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_kpr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_kpr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_thetap(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_thetap(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->thetap; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_vbmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_vbmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vbmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_vmmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_vmmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_vmmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_vmmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST4B_xl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST4B_xl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEST4B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -297,7 +295,8 @@ bool get_ExcIEEEST4B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST4B_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -311,7 +310,8 @@ bool get_ExcIEEEST4B_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST4B_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -325,7 +325,8 @@ bool get_ExcIEEEST4B_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST4B_kim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kim; if (!buffer.str().empty()) @@ -339,7 +340,8 @@ bool get_ExcIEEEST4B_kim(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST4B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kir; if (!buffer.str().empty()) @@ -353,7 +355,8 @@ bool get_ExcIEEEST4B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST4B_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -367,7 +370,8 @@ bool get_ExcIEEEST4B_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST4B_kpm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpm; if (!buffer.str().empty()) @@ -381,7 +385,8 @@ bool get_ExcIEEEST4B_kpm(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST4B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpr; if (!buffer.str().empty()) @@ -395,7 +400,8 @@ bool get_ExcIEEEST4B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST4B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -409,7 +415,8 @@ bool get_ExcIEEEST4B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST4B_thetap(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thetap; if (!buffer.str().empty()) @@ -423,7 +430,8 @@ bool get_ExcIEEEST4B_thetap(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_ExcIEEEST4B_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vbmax; if (!buffer.str().empty()) @@ -437,7 +445,8 @@ bool get_ExcIEEEST4B_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST4B_vmmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmmax; if (!buffer.str().empty()) @@ -451,7 +460,8 @@ bool get_ExcIEEEST4B_vmmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST4B_vmmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmmin; if (!buffer.str().empty()) @@ -465,7 +475,8 @@ bool get_ExcIEEEST4B_vmmin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST4B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -479,7 +490,8 @@ bool get_ExcIEEEST4B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST4B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -493,7 +505,8 @@ bool get_ExcIEEEST4B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST4B_xl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xl; if (!buffer.str().empty()) @@ -505,8 +518,6 @@ bool get_ExcIEEEST4B_xl(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char ExcIEEEST4B::debugName[] = "ExcIEEEST4B"; const char* ExcIEEEST4B::debugString() const { @@ -515,27 +526,27 @@ const char* ExcIEEEST4B::debugString() const void ExcIEEEST4B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B"), &ExcIEEEST4B_factory)); + factory_map.emplace("cim:ExcIEEEST4B", &ExcIEEEST4B_factory); } void ExcIEEEST4B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.kc"), &assign_ExcIEEEST4B_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.kg"), &assign_ExcIEEEST4B_kg)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.ki"), &assign_ExcIEEEST4B_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.kim"), &assign_ExcIEEEST4B_kim)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.kir"), &assign_ExcIEEEST4B_kir)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.kp"), &assign_ExcIEEEST4B_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.kpm"), &assign_ExcIEEEST4B_kpm)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.kpr"), &assign_ExcIEEEST4B_kpr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.ta"), &assign_ExcIEEEST4B_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.thetap"), &assign_ExcIEEEST4B_thetap)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.vbmax"), &assign_ExcIEEEST4B_vbmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.vmmax"), &assign_ExcIEEEST4B_vmmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.vmmin"), &assign_ExcIEEEST4B_vmmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.vrmax"), &assign_ExcIEEEST4B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.vrmin"), &assign_ExcIEEEST4B_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST4B.xl"), &assign_ExcIEEEST4B_xl)); + assign_map.emplace("cim:ExcIEEEST4B.kc", &assign_ExcIEEEST4B_kc); + assign_map.emplace("cim:ExcIEEEST4B.kg", &assign_ExcIEEEST4B_kg); + assign_map.emplace("cim:ExcIEEEST4B.ki", &assign_ExcIEEEST4B_ki); + assign_map.emplace("cim:ExcIEEEST4B.kim", &assign_ExcIEEEST4B_kim); + assign_map.emplace("cim:ExcIEEEST4B.kir", &assign_ExcIEEEST4B_kir); + assign_map.emplace("cim:ExcIEEEST4B.kp", &assign_ExcIEEEST4B_kp); + assign_map.emplace("cim:ExcIEEEST4B.kpm", &assign_ExcIEEEST4B_kpm); + assign_map.emplace("cim:ExcIEEEST4B.kpr", &assign_ExcIEEEST4B_kpr); + assign_map.emplace("cim:ExcIEEEST4B.ta", &assign_ExcIEEEST4B_ta); + assign_map.emplace("cim:ExcIEEEST4B.thetap", &assign_ExcIEEEST4B_thetap); + assign_map.emplace("cim:ExcIEEEST4B.vbmax", &assign_ExcIEEEST4B_vbmax); + assign_map.emplace("cim:ExcIEEEST4B.vmmax", &assign_ExcIEEEST4B_vmmax); + assign_map.emplace("cim:ExcIEEEST4B.vmmin", &assign_ExcIEEEST4B_vmmin); + assign_map.emplace("cim:ExcIEEEST4B.vrmax", &assign_ExcIEEEST4B_vrmax); + assign_map.emplace("cim:ExcIEEEST4B.vrmin", &assign_ExcIEEEST4B_vrmin); + assign_map.emplace("cim:ExcIEEEST4B.xl", &assign_ExcIEEEST4B_xl); } void ExcIEEEST4B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcIEEEST4B.hpp b/CGMES_3.0.0/ExcIEEEST4B.hpp index 5ce70552f..ff3687ba7 100644 --- a/CGMES_3.0.0/ExcIEEEST4B.hpp +++ b/CGMES_3.0.0/ExcIEEEST4B.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE 421.5-2005 type ST4B model. This model is a variation of the type ST3A model, with a proportional plus integral (PI) regulator block replacing the lag-lead regulator characteristic that is in the ST3A model. Both potential and compound source rectifier excitation systems are modelled. The PI regulator blocks have non-windup limits that are represented. The voltage regulator of this model is typically implemented digitally. Reference: IEEE 421.5-2005, 7.4. - */ + /** \brief IEEE 421.5-2005 type ST4B model. This model is a variation of the type ST3A model, with a proportional plus integral (PI) regulator block replacing the lag-lead regulator characteristic that is in the ST3A model. Both potential and compound source rectifier excitation systems are modelled. The PI regulator blocks have non-windup limits that are represented. The voltage regulator of this model is typically implemented digitally. Reference: IEEE 421.5-2005, 7.4. */ class ExcIEEEST4B : public ExcitationSystemDynamics { public: @@ -29,22 +27,53 @@ namespace CIMPP ExcIEEEST4B(); ~ExcIEEEST4B() override; - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (<i>K</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 0,113. Default: nullptr */ - CIMPP::PU kg; /* Feedback gain constant of the inner loop field regulator (<i>K</i><i><sub>G</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::PU ki; /* Potential circuit gain coefficient (<i>K</i><i><sub>I</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::PU kim; /* Voltage regulator integral gain output (<i>K</i><i><sub>IM</sub></i>). Typical value = 0. Default: nullptr */ - CIMPP::PU kir; /* Voltage regulator integral gain (<i>K</i><i><sub>IR</sub></i>). Typical value = 10,75. Default: nullptr */ - CIMPP::PU kp; /* Potential circuit gain coefficient (<i>K</i><i><sub>P</sub></i>) (&gt; 0). Typical value = 9,3. Default: nullptr */ - CIMPP::PU kpm; /* Voltage regulator proportional gain output (<i>K</i><i><sub>PM</sub></i>). Typical value = 1. Default: nullptr */ - CIMPP::PU kpr; /* Voltage regulator proportional gain (<i>K</i><i><sub>PR</sub></i>). Typical value = 10,75. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (<i>T</i><i><sub>A</sub></i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ - CIMPP::AngleDegrees thetap; /* Potential circuit phase angle (<i>thetap</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU vbmax; /* Maximum excitation voltage (<i>V</i><i><sub>BMax</sub></i>) (&gt; 0). Typical value = 11,63. Default: nullptr */ - CIMPP::PU vmmax; /* Maximum inner loop output (<i>V</i><i><sub>MMax</sub></i>) (&gt; ExcIEEEST4B.vmmin). Typical value = 99. Default: nullptr */ - CIMPP::PU vmmin; /* Minimum inner loop output (<i>V</i><i><sub>MMin</sub></i>) (&lt; ExcIEEEST4B.vmmax). Typical value = -99. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (<i>V</i><i><sub>RMAX</sub></i>) (&gt; 0). Typical value = 1. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (<i>V</i><i><sub>RMIN</sub></i>) (&lt; 0). Typical value = -0,87. Default: nullptr */ - CIMPP::PU xl; /* Reactance associated with potential source (<i>X</i><i><sub>L</sub></i>) (&gt;= 0). Typical value = 0,124. Default: nullptr */ + /** \brief Rectifier loading factor proportional to commutating reactance (<i>K</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 0,113. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Feedback gain constant of the inner loop field regulator (<i>K</i><i><sub>G</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Potential circuit gain coefficient (<i>K</i><i><sub>I</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Voltage regulator integral gain output (<i>K</i><i><sub>IM</sub></i>). Typical value = 0. Default: nullptr */ + CIMPP::PU kim; + + /** \brief Voltage regulator integral gain (<i>K</i><i><sub>IR</sub></i>). Typical value = 10,75. Default: nullptr */ + CIMPP::PU kir; + + /** \brief Potential circuit gain coefficient (<i>K</i><i><sub>P</sub></i>) (&gt; 0). Typical value = 9,3. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Voltage regulator proportional gain output (<i>K</i><i><sub>PM</sub></i>). Typical value = 1. Default: nullptr */ + CIMPP::PU kpm; + + /** \brief Voltage regulator proportional gain (<i>K</i><i><sub>PR</sub></i>). Typical value = 10,75. Default: nullptr */ + CIMPP::PU kpr; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>A</sub></i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Potential circuit phase angle (<i>thetap</i>). Typical value = 0. Default: nullptr */ + CIMPP::AngleDegrees thetap; + + /** \brief Maximum excitation voltage (<i>V</i><i><sub>BMax</sub></i>) (&gt; 0). Typical value = 11,63. Default: nullptr */ + CIMPP::PU vbmax; + + /** \brief Maximum inner loop output (<i>V</i><i><sub>MMax</sub></i>) (&gt; ExcIEEEST4B.vmmin). Typical value = 99. Default: nullptr */ + CIMPP::PU vmmax; + + /** \brief Minimum inner loop output (<i>V</i><i><sub>MMin</sub></i>) (&lt; ExcIEEEST4B.vmmax). Typical value = -99. Default: nullptr */ + CIMPP::PU vmmin; + + /** \brief Maximum voltage regulator output (<i>V</i><i><sub>RMAX</sub></i>) (&gt; 0). Typical value = 1. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (<i>V</i><i><sub>RMIN</sub></i>) (&lt; 0). Typical value = -0,87. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief Reactance associated with potential source (<i>X</i><i><sub>L</sub></i>) (&gt;= 0). Typical value = 0,124. Default: nullptr */ + CIMPP::PU xl; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcIEEEST5B.cpp b/CGMES_3.0.0/ExcIEEEST5B.cpp index 4312484ee..49f99553d 100644 --- a/CGMES_3.0.0/ExcIEEEST5B.cpp +++ b/CGMES_3.0.0/ExcIEEEST5B.cpp @@ -8,28 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEST5B::ExcIEEEST5B() {}; -ExcIEEEST5B::~ExcIEEEST5B() {}; +ExcIEEEST5B::ExcIEEEST5B() {} +ExcIEEEST5B::~ExcIEEEST5B() {} static const std::list PossibleProfilesForClass = { @@ -72,233 +55,248 @@ ExcIEEEST5B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEST5B_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_kr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_kr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tb1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tb2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tb2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tc1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tc1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tc2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tc2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tob1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tob1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tob1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tob2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tob2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tob2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_toc1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_toc1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->toc1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_toc2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_toc2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->toc2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tub1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tub1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tub1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tub2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tub2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tub2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tuc1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tuc1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tuc1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_tuc2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_tuc2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tuc2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST5B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST5B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEST5B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -312,7 +310,8 @@ bool get_ExcIEEEST5B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST5B_kr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kr; if (!buffer.str().empty()) @@ -326,7 +325,8 @@ bool get_ExcIEEEST5B_kr(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST5B_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -340,7 +340,8 @@ bool get_ExcIEEEST5B_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST5B_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb1; if (!buffer.str().empty()) @@ -354,7 +355,8 @@ bool get_ExcIEEEST5B_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST5B_tb2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb2; if (!buffer.str().empty()) @@ -368,7 +370,8 @@ bool get_ExcIEEEST5B_tb2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST5B_tc1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc1; if (!buffer.str().empty()) @@ -382,7 +385,8 @@ bool get_ExcIEEEST5B_tc1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST5B_tc2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc2; if (!buffer.str().empty()) @@ -396,7 +400,8 @@ bool get_ExcIEEEST5B_tc2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST5B_tob1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tob1; if (!buffer.str().empty()) @@ -410,7 +415,8 @@ bool get_ExcIEEEST5B_tob1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEST5B_tob2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tob2; if (!buffer.str().empty()) @@ -424,7 +430,8 @@ bool get_ExcIEEEST5B_tob2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEST5B_toc1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->toc1; if (!buffer.str().empty()) @@ -438,7 +445,8 @@ bool get_ExcIEEEST5B_toc1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEST5B_toc2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->toc2; if (!buffer.str().empty()) @@ -452,7 +460,8 @@ bool get_ExcIEEEST5B_toc2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEST5B_tub1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tub1; if (!buffer.str().empty()) @@ -466,7 +475,8 @@ bool get_ExcIEEEST5B_tub1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEST5B_tub2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tub2; if (!buffer.str().empty()) @@ -480,7 +490,8 @@ bool get_ExcIEEEST5B_tub2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEST5B_tuc1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tuc1; if (!buffer.str().empty()) @@ -494,7 +505,8 @@ bool get_ExcIEEEST5B_tuc1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEST5B_tuc2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tuc2; if (!buffer.str().empty()) @@ -508,7 +520,8 @@ bool get_ExcIEEEST5B_tuc2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_ExcIEEEST5B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -522,7 +535,8 @@ bool get_ExcIEEEST5B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_ExcIEEEST5B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST5B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -534,8 +548,6 @@ bool get_ExcIEEEST5B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char ExcIEEEST5B::debugName[] = "ExcIEEEST5B"; const char* ExcIEEEST5B::debugString() const { @@ -544,28 +556,28 @@ const char* ExcIEEEST5B::debugString() const void ExcIEEEST5B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B"), &ExcIEEEST5B_factory)); + factory_map.emplace("cim:ExcIEEEST5B", &ExcIEEEST5B_factory); } void ExcIEEEST5B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.kc"), &assign_ExcIEEEST5B_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.kr"), &assign_ExcIEEEST5B_kr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.t1"), &assign_ExcIEEEST5B_t1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tb1"), &assign_ExcIEEEST5B_tb1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tb2"), &assign_ExcIEEEST5B_tb2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tc1"), &assign_ExcIEEEST5B_tc1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tc2"), &assign_ExcIEEEST5B_tc2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tob1"), &assign_ExcIEEEST5B_tob1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tob2"), &assign_ExcIEEEST5B_tob2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.toc1"), &assign_ExcIEEEST5B_toc1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.toc2"), &assign_ExcIEEEST5B_toc2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tub1"), &assign_ExcIEEEST5B_tub1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tub2"), &assign_ExcIEEEST5B_tub2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tuc1"), &assign_ExcIEEEST5B_tuc1)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.tuc2"), &assign_ExcIEEEST5B_tuc2)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.vrmax"), &assign_ExcIEEEST5B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST5B.vrmin"), &assign_ExcIEEEST5B_vrmin)); + assign_map.emplace("cim:ExcIEEEST5B.kc", &assign_ExcIEEEST5B_kc); + assign_map.emplace("cim:ExcIEEEST5B.kr", &assign_ExcIEEEST5B_kr); + assign_map.emplace("cim:ExcIEEEST5B.t1", &assign_ExcIEEEST5B_t1); + assign_map.emplace("cim:ExcIEEEST5B.tb1", &assign_ExcIEEEST5B_tb1); + assign_map.emplace("cim:ExcIEEEST5B.tb2", &assign_ExcIEEEST5B_tb2); + assign_map.emplace("cim:ExcIEEEST5B.tc1", &assign_ExcIEEEST5B_tc1); + assign_map.emplace("cim:ExcIEEEST5B.tc2", &assign_ExcIEEEST5B_tc2); + assign_map.emplace("cim:ExcIEEEST5B.tob1", &assign_ExcIEEEST5B_tob1); + assign_map.emplace("cim:ExcIEEEST5B.tob2", &assign_ExcIEEEST5B_tob2); + assign_map.emplace("cim:ExcIEEEST5B.toc1", &assign_ExcIEEEST5B_toc1); + assign_map.emplace("cim:ExcIEEEST5B.toc2", &assign_ExcIEEEST5B_toc2); + assign_map.emplace("cim:ExcIEEEST5B.tub1", &assign_ExcIEEEST5B_tub1); + assign_map.emplace("cim:ExcIEEEST5B.tub2", &assign_ExcIEEEST5B_tub2); + assign_map.emplace("cim:ExcIEEEST5B.tuc1", &assign_ExcIEEEST5B_tuc1); + assign_map.emplace("cim:ExcIEEEST5B.tuc2", &assign_ExcIEEEST5B_tuc2); + assign_map.emplace("cim:ExcIEEEST5B.vrmax", &assign_ExcIEEEST5B_vrmax); + assign_map.emplace("cim:ExcIEEEST5B.vrmin", &assign_ExcIEEEST5B_vrmin); } void ExcIEEEST5B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcIEEEST5B.hpp b/CGMES_3.0.0/ExcIEEEST5B.hpp index 08ae45e17..80f98ae9b 100644 --- a/CGMES_3.0.0/ExcIEEEST5B.hpp +++ b/CGMES_3.0.0/ExcIEEEST5B.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE 421.5-2005 type ST5B model. The type ST5B excitation system is a variation of the type ST1A model, with alternative overexcitation and underexcitation inputs and additional limits. The block diagram in the IEEE 421.5 standard has input signal Vc and does not indicate the summation point with Vref. The implementation of the ExcIEEEST5B shall consider summation point with Vref. Reference: IEEE 421.5-2005, 7.5. - */ + /** \brief IEEE 421.5-2005 type ST5B model. The type ST5B excitation system is a variation of the type ST1A model, with alternative overexcitation and underexcitation inputs and additional limits. The block diagram in the IEEE 421.5 standard has input signal Vc and does not indicate the summation point with Vref. The implementation of the ExcIEEEST5B shall consider summation point with Vref. Reference: IEEE 421.5-2005, 7.5. */ class ExcIEEEST5B : public ExcitationSystemDynamics { public: @@ -28,23 +26,56 @@ namespace CIMPP ExcIEEEST5B(); ~ExcIEEEST5B() override; - CIMPP::PU kc; /* Rectifier regulation factor (<i>K</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 0,004. Default: nullptr */ - CIMPP::PU kr; /* Regulator gain (<i>K</i><i><sub>R</sub></i>) (&gt; 0). Typical value = 200. Default: nullptr */ - CIMPP::Seconds t1; /* Firing circuit time constant (<i>T1</i>) (&gt;= 0). Typical value = 0,004. Default: nullptr */ - CIMPP::Seconds tb1; /* Regulator lag time constant (<i>T</i><i><sub>B1</sub></i>) (&gt;= 0). Typical value = 6. Default: nullptr */ - CIMPP::Seconds tb2; /* Regulator lag time constant (<i>T</i><i><sub>B2</sub></i>) (&gt;= 0). Typical value = 0,01. Default: nullptr */ - CIMPP::Seconds tc1; /* Regulator lead time constant (<i>T</i><i><sub>C1</sub></i>) (&gt;= 0). Typical value = 0,8. Default: nullptr */ - CIMPP::Seconds tc2; /* Regulator lead time constant (<i>T</i><i><sub>C2</sub></i>) (&gt;= 0). Typical value = 0,08. Default: nullptr */ - CIMPP::Seconds tob1; /* OEL lag time constant (<i>T</i><i><sub>OB1</sub></i>) (&gt;= 0). Typical value = 2. Default: nullptr */ - CIMPP::Seconds tob2; /* OEL lag time constant (<i>T</i><i><sub>OB2</sub></i>) (&gt;= 0). Typical value = 0,08. Default: nullptr */ - CIMPP::Seconds toc1; /* OEL lead time constant (<i>T</i><i><sub>OC1</sub></i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds toc2; /* OEL lead time constant (<i>T</i><i><sub>OC2</sub></i>) (&gt;= 0). Typical value = 0,08. Default: nullptr */ - CIMPP::Seconds tub1; /* UEL lag time constant (<i>T</i><i><sub>UB1</sub></i>) (&gt;= 0). Typical value = 10. Default: nullptr */ - CIMPP::Seconds tub2; /* UEL lag time constant (<i>T</i><i><sub>UB2</sub></i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ - CIMPP::Seconds tuc1; /* UEL lead time constant (<i>T</i><i><sub>UC1</sub></i>) (&gt;= 0). Typical value = 2. Default: nullptr */ - CIMPP::Seconds tuc2; /* UEL lead time constant (<i>T</i><i><sub>UC2</sub></i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (<i>V</i><i><sub>RMAX</sub></i>) (&gt; 0). Typical value = 5. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (<i>V</i><i><sub>RMIN</sub></i>) (&lt; 0). Typical value = -4. Default: nullptr */ + /** \brief Rectifier regulation factor (<i>K</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 0,004. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Regulator gain (<i>K</i><i><sub>R</sub></i>) (&gt; 0). Typical value = 200. Default: nullptr */ + CIMPP::PU kr; + + /** \brief Firing circuit time constant (<i>T1</i>) (&gt;= 0). Typical value = 0,004. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Regulator lag time constant (<i>T</i><i><sub>B1</sub></i>) (&gt;= 0). Typical value = 6. Default: nullptr */ + CIMPP::Seconds tb1; + + /** \brief Regulator lag time constant (<i>T</i><i><sub>B2</sub></i>) (&gt;= 0). Typical value = 0,01. Default: nullptr */ + CIMPP::Seconds tb2; + + /** \brief Regulator lead time constant (<i>T</i><i><sub>C1</sub></i>) (&gt;= 0). Typical value = 0,8. Default: nullptr */ + CIMPP::Seconds tc1; + + /** \brief Regulator lead time constant (<i>T</i><i><sub>C2</sub></i>) (&gt;= 0). Typical value = 0,08. Default: nullptr */ + CIMPP::Seconds tc2; + + /** \brief OEL lag time constant (<i>T</i><i><sub>OB1</sub></i>) (&gt;= 0). Typical value = 2. Default: nullptr */ + CIMPP::Seconds tob1; + + /** \brief OEL lag time constant (<i>T</i><i><sub>OB2</sub></i>) (&gt;= 0). Typical value = 0,08. Default: nullptr */ + CIMPP::Seconds tob2; + + /** \brief OEL lead time constant (<i>T</i><i><sub>OC1</sub></i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds toc1; + + /** \brief OEL lead time constant (<i>T</i><i><sub>OC2</sub></i>) (&gt;= 0). Typical value = 0,08. Default: nullptr */ + CIMPP::Seconds toc2; + + /** \brief UEL lag time constant (<i>T</i><i><sub>UB1</sub></i>) (&gt;= 0). Typical value = 10. Default: nullptr */ + CIMPP::Seconds tub1; + + /** \brief UEL lag time constant (<i>T</i><i><sub>UB2</sub></i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ + CIMPP::Seconds tub2; + + /** \brief UEL lead time constant (<i>T</i><i><sub>UC1</sub></i>) (&gt;= 0). Typical value = 2. Default: nullptr */ + CIMPP::Seconds tuc1; + + /** \brief UEL lead time constant (<i>T</i><i><sub>UC2</sub></i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds tuc2; + + /** \brief Maximum voltage regulator output (<i>V</i><i><sub>RMAX</sub></i>) (&gt; 0). Typical value = 5. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (<i>V</i><i><sub>RMIN</sub></i>) (&lt; 0). Typical value = -4. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcIEEEST6B.cpp b/CGMES_3.0.0/ExcIEEEST6B.cpp index f14ebf34b..46aac194f 100644 --- a/CGMES_3.0.0/ExcIEEEST6B.cpp +++ b/CGMES_3.0.0/ExcIEEEST6B.cpp @@ -8,25 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ExcST6BOELselectorKind.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEST6B::ExcIEEEST6B() {}; -ExcIEEEST6B::~ExcIEEEST6B() {}; +ExcIEEEST6B::ExcIEEEST6B() {} +ExcIEEEST6B::~ExcIEEEST6B() {} static const std::list PossibleProfilesForClass = { @@ -66,194 +52,206 @@ ExcIEEEST6B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEST6B_ilr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_ilr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ilr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_kci(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_kci(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kci; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_kff(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_kff(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kff; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_kia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_kia(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kia; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_klr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_klr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->klr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_km(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_km(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->km; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_kpa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_kpa(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpa; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_oelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_oelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->oelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST6B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST6B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEST6B_ilr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ilr; if (!buffer.str().empty()) @@ -267,7 +265,8 @@ bool get_ExcIEEEST6B_ilr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST6B_kci(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kci; if (!buffer.str().empty()) @@ -281,7 +280,8 @@ bool get_ExcIEEEST6B_kci(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST6B_kff(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kff; if (!buffer.str().empty()) @@ -295,7 +295,8 @@ bool get_ExcIEEEST6B_kff(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST6B_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -309,7 +310,8 @@ bool get_ExcIEEEST6B_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST6B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kia; if (!buffer.str().empty()) @@ -323,7 +325,8 @@ bool get_ExcIEEEST6B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST6B_klr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->klr; if (!buffer.str().empty()) @@ -337,7 +340,8 @@ bool get_ExcIEEEST6B_klr(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST6B_km(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->km; if (!buffer.str().empty()) @@ -351,7 +355,8 @@ bool get_ExcIEEEST6B_km(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST6B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpa; if (!buffer.str().empty()) @@ -363,11 +368,12 @@ bool get_ExcIEEEST6B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } -bool get_ExcIEEEST6B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST6B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tg; + buffer << element->oelin; if (!buffer.str().empty()) { return true; @@ -377,11 +383,12 @@ bool get_ExcIEEEST6B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } -bool get_ExcIEEEST6B_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST6B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vamax; + buffer << element->tg; if (!buffer.str().empty()) { return true; @@ -391,11 +398,12 @@ bool get_ExcIEEEST6B_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } -bool get_ExcIEEEST6B_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST6B_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vamin; + buffer << element->vamax; if (!buffer.str().empty()) { return true; @@ -405,11 +413,12 @@ bool get_ExcIEEEST6B_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } -bool get_ExcIEEEST6B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST6B_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vrmax; + buffer << element->vamin; if (!buffer.str().empty()) { return true; @@ -419,11 +428,12 @@ bool get_ExcIEEEST6B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } -bool get_ExcIEEEST6B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST6B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vrmin; + buffer << element->vrmax; if (!buffer.str().empty()) { return true; @@ -433,13 +443,12 @@ bool get_ExcIEEEST6B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - -bool get_ExcIEEEST6B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST6B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->oelin; + buffer << element->vrmin; if (!buffer.str().empty()) { return true; @@ -457,25 +466,25 @@ const char* ExcIEEEST6B::debugString() const void ExcIEEEST6B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B"), &ExcIEEEST6B_factory)); + factory_map.emplace("cim:ExcIEEEST6B", &ExcIEEEST6B_factory); } void ExcIEEEST6B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.ilr"), &assign_ExcIEEEST6B_ilr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.kci"), &assign_ExcIEEEST6B_kci)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.kff"), &assign_ExcIEEEST6B_kff)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.kg"), &assign_ExcIEEEST6B_kg)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.kia"), &assign_ExcIEEEST6B_kia)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.klr"), &assign_ExcIEEEST6B_klr)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.km"), &assign_ExcIEEEST6B_km)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.kpa"), &assign_ExcIEEEST6B_kpa)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.oelin"), &assign_ExcIEEEST6B_oelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.tg"), &assign_ExcIEEEST6B_tg)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.vamax"), &assign_ExcIEEEST6B_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.vamin"), &assign_ExcIEEEST6B_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.vrmax"), &assign_ExcIEEEST6B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST6B.vrmin"), &assign_ExcIEEEST6B_vrmin)); + assign_map.emplace("cim:ExcIEEEST6B.ilr", &assign_ExcIEEEST6B_ilr); + assign_map.emplace("cim:ExcIEEEST6B.kci", &assign_ExcIEEEST6B_kci); + assign_map.emplace("cim:ExcIEEEST6B.kff", &assign_ExcIEEEST6B_kff); + assign_map.emplace("cim:ExcIEEEST6B.kg", &assign_ExcIEEEST6B_kg); + assign_map.emplace("cim:ExcIEEEST6B.kia", &assign_ExcIEEEST6B_kia); + assign_map.emplace("cim:ExcIEEEST6B.klr", &assign_ExcIEEEST6B_klr); + assign_map.emplace("cim:ExcIEEEST6B.km", &assign_ExcIEEEST6B_km); + assign_map.emplace("cim:ExcIEEEST6B.kpa", &assign_ExcIEEEST6B_kpa); + assign_map.emplace("cim:ExcIEEEST6B.oelin", &assign_ExcIEEEST6B_oelin); + assign_map.emplace("cim:ExcIEEEST6B.tg", &assign_ExcIEEEST6B_tg); + assign_map.emplace("cim:ExcIEEEST6B.vamax", &assign_ExcIEEEST6B_vamax); + assign_map.emplace("cim:ExcIEEEST6B.vamin", &assign_ExcIEEEST6B_vamin); + assign_map.emplace("cim:ExcIEEEST6B.vrmax", &assign_ExcIEEEST6B_vrmax); + assign_map.emplace("cim:ExcIEEEST6B.vrmin", &assign_ExcIEEEST6B_vrmin); } void ExcIEEEST6B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcIEEEST6B.hpp b/CGMES_3.0.0/ExcIEEEST6B.hpp index add78ea3d..2627fb13c 100644 --- a/CGMES_3.0.0/ExcIEEEST6B.hpp +++ b/CGMES_3.0.0/ExcIEEEST6B.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE 421.5-2005 type ST6B model. This model consists of a PI voltage regulator with an inner loop field voltage regulator and pre-control. The field voltage regulator implements a proportional control. The pre-control and the delay in the feedback circuit increase the dynamic response. Reference: IEEE 421.5-2005, 7.6. - */ + /** \brief IEEE 421.5-2005 type ST6B model. This model consists of a PI voltage regulator with an inner loop field voltage regulator and pre-control. The field voltage regulator implements a proportional control. The pre-control and the delay in the feedback circuit increase the dynamic response. Reference: IEEE 421.5-2005, 7.6. */ class ExcIEEEST6B : public ExcitationSystemDynamics { public: @@ -29,20 +27,47 @@ namespace CIMPP ExcIEEEST6B(); ~ExcIEEEST6B() override; - CIMPP::PU ilr; /* Exciter output current limit reference (<i>I</i><i><sub>LR</sub></i>) (&gt; 0). Typical value = 4,164. Default: nullptr */ - CIMPP::PU kci; /* Exciter output current limit adjustment (<i>K</i><i><sub>CI</sub></i>) (&gt; 0). Typical value = 1,0577. Default: nullptr */ - CIMPP::PU kff; /* Pre-control gain constant of the inner loop field regulator (<i>K</i><i><sub>FF</sub></i>). Typical value = 1. Default: nullptr */ - CIMPP::PU kg; /* Feedback gain constant of the inner loop field regulator (<i>K</i><i><sub>G</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::PU kia; /* Voltage regulator integral gain (<i>K</i><i><sub>IA</sub></i>) (&gt; 0). Typical value = 45,094. Default: nullptr */ - CIMPP::PU klr; /* Exciter output current limiter gain (<i>K</i><i><sub>LR</sub></i>) (&gt; 0). Typical value = 17,33. Default: nullptr */ - CIMPP::PU km; /* Forward gain constant of the inner loop field regulator (<i>K</i><i><sub>M</sub></i>). Typical value = 1. Default: nullptr */ - CIMPP::PU kpa; /* Voltage regulator proportional gain (<u>K</u><u><sub>PA</sub></u>) (&gt; 0). Typical value = 18,038. Default: nullptr */ - CIMPP::ExcST6BOELselectorKind oelin; /* OEL input selector (<i>OELin</i>). Typical value = noOELinput. Default: 0 */ - CIMPP::Seconds tg; /* Feedback time constant of inner loop field voltage regulator (<i>T</i><i><sub>G</sub></i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (V<i><sub>AMAX</sub></i>) (&gt; 0). Typical value = 4,81. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (<i>V</i><i><sub>AMIN</sub></i>) (&lt; 0). Typical value = -3,85. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (<i>V</i><i><sub>RMAX</sub></i>) (&gt; 0). Typical value = 4,81. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (<i>V</i><i><sub>RMIN</sub></i>) (&lt; 0). Typical value = -3,85. Default: nullptr */ + /** \brief Exciter output current limit reference (<i>I</i><i><sub>LR</sub></i>) (&gt; 0). Typical value = 4,164. Default: nullptr */ + CIMPP::PU ilr; + + /** \brief Exciter output current limit adjustment (<i>K</i><i><sub>CI</sub></i>) (&gt; 0). Typical value = 1,0577. Default: nullptr */ + CIMPP::PU kci; + + /** \brief Pre-control gain constant of the inner loop field regulator (<i>K</i><i><sub>FF</sub></i>). Typical value = 1. Default: nullptr */ + CIMPP::PU kff; + + /** \brief Feedback gain constant of the inner loop field regulator (<i>K</i><i><sub>G</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Voltage regulator integral gain (<i>K</i><i><sub>IA</sub></i>) (&gt; 0). Typical value = 45,094. Default: nullptr */ + CIMPP::PU kia; + + /** \brief Exciter output current limiter gain (<i>K</i><i><sub>LR</sub></i>) (&gt; 0). Typical value = 17,33. Default: nullptr */ + CIMPP::PU klr; + + /** \brief Forward gain constant of the inner loop field regulator (<i>K</i><i><sub>M</sub></i>). Typical value = 1. Default: nullptr */ + CIMPP::PU km; + + /** \brief Voltage regulator proportional gain (<u>K</u><u><sub>PA</sub></u>) (&gt; 0). Typical value = 18,038. Default: nullptr */ + CIMPP::PU kpa; + + /** \brief OEL input selector (<i>OELin</i>). Typical value = noOELinput. Default: 0 */ + CIMPP::ExcST6BOELselectorKind oelin; + + /** \brief Feedback time constant of inner loop field voltage regulator (<i>T</i><i><sub>G</sub></i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Maximum voltage regulator output (V<i><sub>AMAX</sub></i>) (&gt; 0). Typical value = 4,81. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (<i>V</i><i><sub>AMIN</sub></i>) (&lt; 0). Typical value = -3,85. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Maximum voltage regulator output (<i>V</i><i><sub>RMAX</sub></i>) (&gt; 0). Typical value = 4,81. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (<i>V</i><i><sub>RMIN</sub></i>) (&lt; 0). Typical value = -3,85. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcIEEEST7B.cpp b/CGMES_3.0.0/ExcIEEEST7B.cpp index aad96d91b..20513a7f9 100644 --- a/CGMES_3.0.0/ExcIEEEST7B.cpp +++ b/CGMES_3.0.0/ExcIEEEST7B.cpp @@ -8,26 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ExcST7BOELselectorKind.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "ExcST7BUELselectorKind.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcIEEEST7B::ExcIEEEST7B() {}; -ExcIEEEST7B::~ExcIEEEST7B() {}; +ExcIEEEST7B::ExcIEEEST7B() {} +ExcIEEEST7B::~ExcIEEEST7B() {} static const std::list PossibleProfilesForClass = { @@ -68,207 +53,220 @@ ExcIEEEST7B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcIEEEST7B_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_kh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_kia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_kia(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kia; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_kl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_kl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_kpa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_kpa(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpa; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_oelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_oelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->oelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_tia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_tia(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tia; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_uelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_vmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_vmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcIEEEST7B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcIEEEST7B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcIEEEST7B_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh; if (!buffer.str().empty()) @@ -282,7 +280,8 @@ bool get_ExcIEEEST7B_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST7B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kia; if (!buffer.str().empty()) @@ -296,7 +295,8 @@ bool get_ExcIEEEST7B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcIEEEST7B_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl; if (!buffer.str().empty()) @@ -310,7 +310,8 @@ bool get_ExcIEEEST7B_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcIEEEST7B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpa; if (!buffer.str().empty()) @@ -322,11 +323,12 @@ bool get_ExcIEEEST7B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } -bool get_ExcIEEEST7B_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tb; + buffer << element->oelin; if (!buffer.str().empty()) { return true; @@ -336,11 +338,12 @@ bool get_ExcIEEEST7B_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } -bool get_ExcIEEEST7B_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tc; + buffer << element->tb; if (!buffer.str().empty()) { return true; @@ -350,11 +353,12 @@ bool get_ExcIEEEST7B_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } -bool get_ExcIEEEST7B_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tf; + buffer << element->tc; if (!buffer.str().empty()) { return true; @@ -364,11 +368,12 @@ bool get_ExcIEEEST7B_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } -bool get_ExcIEEEST7B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tg; + buffer << element->tf; if (!buffer.str().empty()) { return true; @@ -378,11 +383,12 @@ bool get_ExcIEEEST7B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } -bool get_ExcIEEEST7B_tia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tia; + buffer << element->tg; if (!buffer.str().empty()) { return true; @@ -392,11 +398,12 @@ bool get_ExcIEEEST7B_tia(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } -bool get_ExcIEEEST7B_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_tia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vmax; + buffer << element->tia; if (!buffer.str().empty()) { return true; @@ -406,11 +413,12 @@ bool get_ExcIEEEST7B_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } -bool get_ExcIEEEST7B_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vmin; + buffer << element->uelin; if (!buffer.str().empty()) { return true; @@ -420,11 +428,12 @@ bool get_ExcIEEEST7B_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } -bool get_ExcIEEEST7B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vrmax; + buffer << element->vmax; if (!buffer.str().empty()) { return true; @@ -434,11 +443,12 @@ bool get_ExcIEEEST7B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } -bool get_ExcIEEEST7B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vrmin; + buffer << element->vmin; if (!buffer.str().empty()) { return true; @@ -448,13 +458,12 @@ bool get_ExcIEEEST7B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - -bool get_ExcIEEEST7B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->oelin; + buffer << element->vrmax; if (!buffer.str().empty()) { return true; @@ -464,11 +473,12 @@ bool get_ExcIEEEST7B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } -bool get_ExcIEEEST7B_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcIEEEST7B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcIEEEST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->uelin; + buffer << element->vrmin; if (!buffer.str().empty()) { return true; @@ -486,26 +496,26 @@ const char* ExcIEEEST7B::debugString() const void ExcIEEEST7B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B"), &ExcIEEEST7B_factory)); + factory_map.emplace("cim:ExcIEEEST7B", &ExcIEEEST7B_factory); } void ExcIEEEST7B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.kh"), &assign_ExcIEEEST7B_kh)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.kia"), &assign_ExcIEEEST7B_kia)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.kl"), &assign_ExcIEEEST7B_kl)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.kpa"), &assign_ExcIEEEST7B_kpa)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.oelin"), &assign_ExcIEEEST7B_oelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.tb"), &assign_ExcIEEEST7B_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.tc"), &assign_ExcIEEEST7B_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.tf"), &assign_ExcIEEEST7B_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.tg"), &assign_ExcIEEEST7B_tg)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.tia"), &assign_ExcIEEEST7B_tia)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.uelin"), &assign_ExcIEEEST7B_uelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.vmax"), &assign_ExcIEEEST7B_vmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.vmin"), &assign_ExcIEEEST7B_vmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.vrmax"), &assign_ExcIEEEST7B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcIEEEST7B.vrmin"), &assign_ExcIEEEST7B_vrmin)); + assign_map.emplace("cim:ExcIEEEST7B.kh", &assign_ExcIEEEST7B_kh); + assign_map.emplace("cim:ExcIEEEST7B.kia", &assign_ExcIEEEST7B_kia); + assign_map.emplace("cim:ExcIEEEST7B.kl", &assign_ExcIEEEST7B_kl); + assign_map.emplace("cim:ExcIEEEST7B.kpa", &assign_ExcIEEEST7B_kpa); + assign_map.emplace("cim:ExcIEEEST7B.oelin", &assign_ExcIEEEST7B_oelin); + assign_map.emplace("cim:ExcIEEEST7B.tb", &assign_ExcIEEEST7B_tb); + assign_map.emplace("cim:ExcIEEEST7B.tc", &assign_ExcIEEEST7B_tc); + assign_map.emplace("cim:ExcIEEEST7B.tf", &assign_ExcIEEEST7B_tf); + assign_map.emplace("cim:ExcIEEEST7B.tg", &assign_ExcIEEEST7B_tg); + assign_map.emplace("cim:ExcIEEEST7B.tia", &assign_ExcIEEEST7B_tia); + assign_map.emplace("cim:ExcIEEEST7B.uelin", &assign_ExcIEEEST7B_uelin); + assign_map.emplace("cim:ExcIEEEST7B.vmax", &assign_ExcIEEEST7B_vmax); + assign_map.emplace("cim:ExcIEEEST7B.vmin", &assign_ExcIEEEST7B_vmin); + assign_map.emplace("cim:ExcIEEEST7B.vrmax", &assign_ExcIEEEST7B_vrmax); + assign_map.emplace("cim:ExcIEEEST7B.vrmin", &assign_ExcIEEEST7B_vrmin); } void ExcIEEEST7B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcIEEEST7B.hpp b/CGMES_3.0.0/ExcIEEEST7B.hpp index 7ac9c28be..6085a2524 100644 --- a/CGMES_3.0.0/ExcIEEEST7B.hpp +++ b/CGMES_3.0.0/ExcIEEEST7B.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE 421.5-2005 type ST7B model. This model is representative of static potential-source excitation systems. In this system, the AVR consists of a PI voltage regulator. A phase lead-lag filter in series allows the introduction of a derivative function, typically used with brushless excitation systems. In that case, the regulator is of the PID type. In addition, the terminal voltage channel includes a phase lead-lag filter. The AVR includes the appropriate inputs on its reference for overexcitation limiter (OEL1), underexcitation limiter (UEL), stator current limiter (SCL), and current compensator (DROOP). All these limitations, when they work at voltage reference level, keep the PSS (VS signal from PSS) in operation. However, the UEL limitation can also be transferred to the high value (HV) gate acting on the output signal. In addition, the output signal passes through a low value (LV) gate for a ceiling overexcitation limiter (OEL2). Reference: IEEE 421.5-2005, 7.7. - */ + /** \brief IEEE 421.5-2005 type ST7B model. This model is representative of static potential-source excitation systems. In this system, the AVR consists of a PI voltage regulator. A phase lead-lag filter in series allows the introduction of a derivative function, typically used with brushless excitation systems. In that case, the regulator is of the PID type. In addition, the terminal voltage channel includes a phase lead-lag filter. The AVR includes the appropriate inputs on its reference for overexcitation limiter (OEL1), underexcitation limiter (UEL), stator current limiter (SCL), and current compensator (DROOP). All these limitations, when they work at voltage reference level, keep the PSS (VS signal from PSS) in operation. However, the UEL limitation can also be transferred to the high value (HV) gate acting on the output signal. In addition, the output signal passes through a low value (LV) gate for a ceiling overexcitation limiter (OEL2). Reference: IEEE 421.5-2005, 7.7. */ class ExcIEEEST7B : public ExcitationSystemDynamics { public: @@ -30,21 +28,50 @@ namespace CIMPP ExcIEEEST7B(); ~ExcIEEEST7B() override; - CIMPP::PU kh; /* High-value gate feedback gain (<i>K</i><i><sub>H</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::PU kia; /* Voltage regulator integral gain (<i>K</i><i><sub>IA</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::PU kl; /* Low-value gate feedback gain (<i>K</i><i><sub>L</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::PU kpa; /* Voltage regulator proportional gain (<i>K</i><i><sub>PA</sub></i>) (&gt; 0). Typical value = 40. Default: nullptr */ - CIMPP::ExcST7BOELselectorKind oelin; /* OEL input selector (<i>OELin</i>). Typical value = noOELinput. Default: 0 */ - CIMPP::Seconds tb; /* Regulator lag time constant (<i>T</i><i><sub>B</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::Seconds tc; /* Regulator lead time constant (<i>T</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (<i>T</i><i><sub>F</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::Seconds tg; /* Feedback time constant of inner loop field voltage regulator (<i>T</i><i><sub>G</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::Seconds tia; /* Feedback time constant (<i>T</i><i><sub>IA</sub></i>) (&gt;= 0). Typical value = 3. Default: nullptr */ - CIMPP::ExcST7BUELselectorKind uelin; /* UEL input selector (<i>UELin</i>). Typical value = noUELinput. Default: 0 */ - CIMPP::PU vmax; /* Maximum voltage reference signal (<i>V</i><i><sub>MAX</sub></i>) (&gt; 0 and &gt; ExcIEEEST7B.vmin). Typical value = 1,1. Default: nullptr */ - CIMPP::PU vmin; /* Minimum voltage reference signal (<i>V</i><i><sub>MIN</sub></i>) (&gt; 0 and &lt; ExcIEEEST7B.vmax). Typical value = 0,9. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (<i>V</i><i><sub>RMAX</sub></i>) (&gt; 0). Typical value = 5. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (<i>V</i><i><sub>RMIN</sub></i>) (&lt; 0). Typical value = -4,5. Default: nullptr */ + /** \brief High-value gate feedback gain (<i>K</i><i><sub>H</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::PU kh; + + /** \brief Voltage regulator integral gain (<i>K</i><i><sub>IA</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::PU kia; + + /** \brief Low-value gate feedback gain (<i>K</i><i><sub>L</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::PU kl; + + /** \brief Voltage regulator proportional gain (<i>K</i><i><sub>PA</sub></i>) (&gt; 0). Typical value = 40. Default: nullptr */ + CIMPP::PU kpa; + + /** \brief OEL input selector (<i>OELin</i>). Typical value = noOELinput. Default: 0 */ + CIMPP::ExcST7BOELselectorKind oelin; + + /** \brief Regulator lag time constant (<i>T</i><i><sub>B</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Regulator lead time constant (<i>T</i><i><sub>C</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Excitation control system stabilizer time constant (<i>T</i><i><sub>F</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Feedback time constant of inner loop field voltage regulator (<i>T</i><i><sub>G</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Feedback time constant (<i>T</i><i><sub>IA</sub></i>) (&gt;= 0). Typical value = 3. Default: nullptr */ + CIMPP::Seconds tia; + + /** \brief UEL input selector (<i>UELin</i>). Typical value = noUELinput. Default: 0 */ + CIMPP::ExcST7BUELselectorKind uelin; + + /** \brief Maximum voltage reference signal (<i>V</i><i><sub>MAX</sub></i>) (&gt; 0 and &gt; ExcIEEEST7B.vmin). Typical value = 1,1. Default: nullptr */ + CIMPP::PU vmax; + + /** \brief Minimum voltage reference signal (<i>V</i><i><sub>MIN</sub></i>) (&gt; 0 and &lt; ExcIEEEST7B.vmax). Typical value = 0,9. Default: nullptr */ + CIMPP::PU vmin; + + /** \brief Maximum voltage regulator output (<i>V</i><i><sub>RMAX</sub></i>) (&gt; 0). Typical value = 5. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (<i>V</i><i><sub>RMIN</sub></i>) (&lt; 0). Typical value = -4,5. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcNI.cpp b/CGMES_3.0.0/ExcNI.cpp index 69d851d99..f5887cfa0 100644 --- a/CGMES_3.0.0/ExcNI.cpp +++ b/CGMES_3.0.0/ExcNI.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcNI::ExcNI() {}; -ExcNI::~ExcNI() {}; +ExcNI::ExcNI() {} +ExcNI::~ExcNI() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ ExcNI::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcNI_busFedSelector(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcNI_busFedSelector(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcNI* element = dynamic_cast(BaseClass_ptr1)) + ExcNI* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->busFedSelector; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcNI_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcNI_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcNI* element = dynamic_cast(BaseClass_ptr1)) + ExcNI* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcNI_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcNI_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcNI* element = dynamic_cast(BaseClass_ptr1)) + ExcNI* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcNI_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcNI_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcNI* element = dynamic_cast(BaseClass_ptr1)) + ExcNI* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcNI_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcNI_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcNI* element = dynamic_cast(BaseClass_ptr1)) + ExcNI* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcNI_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcNI_tf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcNI* element = dynamic_cast(BaseClass_ptr1)) + ExcNI* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcNI_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcNI_tf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcNI* element = dynamic_cast(BaseClass_ptr1)) + ExcNI* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcNI_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcNI_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcNI* element = dynamic_cast(BaseClass_ptr1)) + ExcNI* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcNI_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcNI_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcNI* element = dynamic_cast(BaseClass_ptr1)) + ExcNI* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcNI_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcNI_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcNI* element = dynamic_cast(BaseClass_ptr1)) + ExcNI* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcNI_busFedSelector(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcNI* element = dynamic_cast(BaseClass_ptr1)) + const ExcNI* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->busFedSelector; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_ExcNI_busFedSelector(const BaseClass* BaseClass_ptr1, std::stringstream bool get_ExcNI_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcNI* element = dynamic_cast(BaseClass_ptr1)) + const ExcNI* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_ExcNI_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcNI_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcNI* element = dynamic_cast(BaseClass_ptr1)) + const ExcNI* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_ExcNI_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcNI_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcNI* element = dynamic_cast(BaseClass_ptr1)) + const ExcNI* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_ExcNI_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcNI_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcNI* element = dynamic_cast(BaseClass_ptr1)) + const ExcNI* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_ExcNI_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcNI_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcNI* element = dynamic_cast(BaseClass_ptr1)) + const ExcNI* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf1; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_ExcNI_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcNI_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcNI* element = dynamic_cast(BaseClass_ptr1)) + const ExcNI* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf2; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_ExcNI_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcNI_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcNI* element = dynamic_cast(BaseClass_ptr1)) + const ExcNI* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_ExcNI_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcNI_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcNI* element = dynamic_cast(BaseClass_ptr1)) + const ExcNI* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_ExcNI_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcNI_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcNI* element = dynamic_cast(BaseClass_ptr1)) + const ExcNI* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_ExcNI_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcNI::debugName[] = "ExcNI"; const char* ExcNI::debugString() const { @@ -341,21 +346,21 @@ const char* ExcNI::debugString() const void ExcNI::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcNI"), &ExcNI_factory)); + factory_map.emplace("cim:ExcNI", &ExcNI_factory); } void ExcNI::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcNI.busFedSelector"), &assign_ExcNI_busFedSelector)); - assign_map.insert(std::make_pair(std::string("cim:ExcNI.ka"), &assign_ExcNI_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcNI.kf"), &assign_ExcNI_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcNI.r"), &assign_ExcNI_r)); - assign_map.insert(std::make_pair(std::string("cim:ExcNI.ta"), &assign_ExcNI_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcNI.tf1"), &assign_ExcNI_tf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcNI.tf2"), &assign_ExcNI_tf2)); - assign_map.insert(std::make_pair(std::string("cim:ExcNI.tr"), &assign_ExcNI_tr)); - assign_map.insert(std::make_pair(std::string("cim:ExcNI.vrmax"), &assign_ExcNI_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcNI.vrmin"), &assign_ExcNI_vrmin)); + assign_map.emplace("cim:ExcNI.busFedSelector", &assign_ExcNI_busFedSelector); + assign_map.emplace("cim:ExcNI.ka", &assign_ExcNI_ka); + assign_map.emplace("cim:ExcNI.kf", &assign_ExcNI_kf); + assign_map.emplace("cim:ExcNI.r", &assign_ExcNI_r); + assign_map.emplace("cim:ExcNI.ta", &assign_ExcNI_ta); + assign_map.emplace("cim:ExcNI.tf1", &assign_ExcNI_tf1); + assign_map.emplace("cim:ExcNI.tf2", &assign_ExcNI_tf2); + assign_map.emplace("cim:ExcNI.tr", &assign_ExcNI_tr); + assign_map.emplace("cim:ExcNI.vrmax", &assign_ExcNI_vrmax); + assign_map.emplace("cim:ExcNI.vrmin", &assign_ExcNI_vrmin); } void ExcNI::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcNI.hpp b/CGMES_3.0.0/ExcNI.hpp index fab17360c..8b4c15f3a 100644 --- a/CGMES_3.0.0/ExcNI.hpp +++ b/CGMES_3.0.0/ExcNI.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Bus or solid fed SCR (silicon-controlled rectifier) bridge excitation system model type NI (NVE). - */ + /** \brief Bus or solid fed SCR (silicon-controlled rectifier) bridge excitation system model type NI (NVE). */ class ExcNI : public ExcitationSystemDynamics { public: @@ -29,16 +27,35 @@ namespace CIMPP ExcNI(); ~ExcNI() override; - CIMPP::Boolean busFedSelector; /* Fed by selector (<i>BusFedSelector</i>). true = bus fed (switch is closed) false = solid fed (switch is open). Typical value = true. Default: false */ - CIMPP::PU ka; /* Voltage regulator gain (<i>Ka</i>) (&gt; 0). Typical value = 210. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gain (<i>Kf</i>) (&gt; 0). Typical value 0,01. Default: nullptr */ - CIMPP::PU r; /* <i>rc</i> / <i>rfd</i> (<i>R</i>) (&gt;= 0). 0 means exciter has negative current capability &gt; 0 means exciter does not have negative current capability. Typical value = 5. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (<i>Ta</i>) (&gt; 0). Typical value = 0,02. Default: nullptr */ - CIMPP::Seconds tf1; /* Excitation control system stabilizer time constant (<i>Tf1</i>) (&gt; 0). Typical value = 1,0. Default: nullptr */ - CIMPP::Seconds tf2; /* Excitation control system stabilizer time constant (<i>Tf2</i>) (&gt; 0). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds tr; /* Time constant (<i>Tr</i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator ouput (<i>Vrmax</i>) (&gt; ExcNI.vrmin). Typical value = 5,0. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator ouput (<i>Vrmin</i>) (&lt; ExcNI.vrmax). Typical value = -2,0. Default: nullptr */ + /** \brief Fed by selector (<i>BusFedSelector</i>). true = bus fed (switch is closed) false = solid fed (switch is open). Typical value = true. Default: false */ + CIMPP::Boolean busFedSelector; + + /** \brief Voltage regulator gain (<i>Ka</i>) (&gt; 0). Typical value = 210. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Excitation control system stabilizer gain (<i>Kf</i>) (&gt; 0). Typical value 0,01. Default: nullptr */ + CIMPP::PU kf; + + /** \brief <i>rc</i> / <i>rfd</i> (<i>R</i>) (&gt;= 0). 0 means exciter has negative current capability &gt; 0 means exciter does not have negative current capability. Typical value = 5. Default: nullptr */ + CIMPP::PU r; + + /** \brief Voltage regulator time constant (<i>Ta</i>) (&gt; 0). Typical value = 0,02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Excitation control system stabilizer time constant (<i>Tf1</i>) (&gt; 0). Typical value = 1,0. Default: nullptr */ + CIMPP::Seconds tf1; + + /** \brief Excitation control system stabilizer time constant (<i>Tf2</i>) (&gt; 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds tf2; + + /** \brief Time constant (<i>Tr</i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ + CIMPP::Seconds tr; + + /** \brief Maximum voltage regulator ouput (<i>Vrmax</i>) (&gt; ExcNI.vrmin). Typical value = 5,0. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator ouput (<i>Vrmin</i>) (&lt; ExcNI.vrmax). Typical value = -2,0. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcOEX3T.cpp b/CGMES_3.0.0/ExcOEX3T.cpp index a3bfdb7a7..3fc422d40 100644 --- a/CGMES_3.0.0/ExcOEX3T.cpp +++ b/CGMES_3.0.0/ExcOEX3T.cpp @@ -8,30 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcOEX3T::ExcOEX3T() {}; -ExcOEX3T::~ExcOEX3T() {}; +ExcOEX3T::ExcOEX3T() {} +ExcOEX3T::~ExcOEX3T() {} static const std::list PossibleProfilesForClass = { @@ -76,259 +57,276 @@ ExcOEX3T::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcOEX3T_e1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_e1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_e2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_e2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_see1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_see1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->see1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_see2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_see2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->see2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcOEX3T_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcOEX3T_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcOEX3T_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e1; if (!buffer.str().empty()) @@ -342,7 +340,8 @@ bool get_ExcOEX3T_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e2; if (!buffer.str().empty()) @@ -356,7 +355,8 @@ bool get_ExcOEX3T_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -370,7 +370,8 @@ bool get_ExcOEX3T_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -384,7 +385,8 @@ bool get_ExcOEX3T_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -398,7 +400,8 @@ bool get_ExcOEX3T_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -412,7 +415,8 @@ bool get_ExcOEX3T_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -426,7 +430,8 @@ bool get_ExcOEX3T_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_see1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->see1; if (!buffer.str().empty()) @@ -440,7 +445,8 @@ bool get_ExcOEX3T_see1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcOEX3T_see2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->see2; if (!buffer.str().empty()) @@ -454,7 +460,8 @@ bool get_ExcOEX3T_see2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcOEX3T_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -468,7 +475,8 @@ bool get_ExcOEX3T_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -482,7 +490,8 @@ bool get_ExcOEX3T_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -496,7 +505,8 @@ bool get_ExcOEX3T_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -510,7 +520,8 @@ bool get_ExcOEX3T_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -524,7 +535,8 @@ bool get_ExcOEX3T_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -538,7 +550,8 @@ bool get_ExcOEX3T_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -552,7 +565,8 @@ bool get_ExcOEX3T_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -566,7 +580,8 @@ bool get_ExcOEX3T_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcOEX3T_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -580,7 +595,8 @@ bool get_ExcOEX3T_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcOEX3T_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1)) + const ExcOEX3T* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -592,8 +608,6 @@ bool get_ExcOEX3T_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char ExcOEX3T::debugName[] = "ExcOEX3T"; const char* ExcOEX3T::debugString() const { @@ -602,30 +616,30 @@ const char* ExcOEX3T::debugString() const void ExcOEX3T::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcOEX3T"), &ExcOEX3T_factory)); + factory_map.emplace("cim:ExcOEX3T", &ExcOEX3T_factory); } void ExcOEX3T::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.e1"), &assign_ExcOEX3T_e1)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.e2"), &assign_ExcOEX3T_e2)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.ka"), &assign_ExcOEX3T_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.kc"), &assign_ExcOEX3T_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.kd"), &assign_ExcOEX3T_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.ke"), &assign_ExcOEX3T_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.kf"), &assign_ExcOEX3T_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.see1"), &assign_ExcOEX3T_see1)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.see2"), &assign_ExcOEX3T_see2)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.t1"), &assign_ExcOEX3T_t1)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.t2"), &assign_ExcOEX3T_t2)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.t3"), &assign_ExcOEX3T_t3)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.t4"), &assign_ExcOEX3T_t4)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.t5"), &assign_ExcOEX3T_t5)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.t6"), &assign_ExcOEX3T_t6)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.te"), &assign_ExcOEX3T_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.tf"), &assign_ExcOEX3T_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.vrmax"), &assign_ExcOEX3T_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcOEX3T.vrmin"), &assign_ExcOEX3T_vrmin)); + assign_map.emplace("cim:ExcOEX3T.e1", &assign_ExcOEX3T_e1); + assign_map.emplace("cim:ExcOEX3T.e2", &assign_ExcOEX3T_e2); + assign_map.emplace("cim:ExcOEX3T.ka", &assign_ExcOEX3T_ka); + assign_map.emplace("cim:ExcOEX3T.kc", &assign_ExcOEX3T_kc); + assign_map.emplace("cim:ExcOEX3T.kd", &assign_ExcOEX3T_kd); + assign_map.emplace("cim:ExcOEX3T.ke", &assign_ExcOEX3T_ke); + assign_map.emplace("cim:ExcOEX3T.kf", &assign_ExcOEX3T_kf); + assign_map.emplace("cim:ExcOEX3T.see1", &assign_ExcOEX3T_see1); + assign_map.emplace("cim:ExcOEX3T.see2", &assign_ExcOEX3T_see2); + assign_map.emplace("cim:ExcOEX3T.t1", &assign_ExcOEX3T_t1); + assign_map.emplace("cim:ExcOEX3T.t2", &assign_ExcOEX3T_t2); + assign_map.emplace("cim:ExcOEX3T.t3", &assign_ExcOEX3T_t3); + assign_map.emplace("cim:ExcOEX3T.t4", &assign_ExcOEX3T_t4); + assign_map.emplace("cim:ExcOEX3T.t5", &assign_ExcOEX3T_t5); + assign_map.emplace("cim:ExcOEX3T.t6", &assign_ExcOEX3T_t6); + assign_map.emplace("cim:ExcOEX3T.te", &assign_ExcOEX3T_te); + assign_map.emplace("cim:ExcOEX3T.tf", &assign_ExcOEX3T_tf); + assign_map.emplace("cim:ExcOEX3T.vrmax", &assign_ExcOEX3T_vrmax); + assign_map.emplace("cim:ExcOEX3T.vrmin", &assign_ExcOEX3T_vrmin); } void ExcOEX3T::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcOEX3T.hpp b/CGMES_3.0.0/ExcOEX3T.hpp index 7c07ecf5a..7d17a2fe1 100644 --- a/CGMES_3.0.0/ExcOEX3T.hpp +++ b/CGMES_3.0.0/ExcOEX3T.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE type ST1 excitation system with semi-continuous and acting terminal voltage limiter. - */ + /** \brief Modified IEEE type ST1 excitation system with semi-continuous and acting terminal voltage limiter. */ class ExcOEX3T : public ExcitationSystemDynamics { public: @@ -28,25 +26,62 @@ namespace CIMPP ExcOEX3T(); ~ExcOEX3T() override; - CIMPP::PU e1; /* Saturation parameter (<i>E</i><i><sub>1</sub></i>). Default: nullptr */ - CIMPP::PU e2; /* Saturation parameter (<i>E</i><i><sub>2</sub></i>). Default: nullptr */ - CIMPP::PU ka; /* Gain (<i>K</i><i><sub>A</sub></i>). Default: nullptr */ - CIMPP::PU kc; /* Gain (<i>K</i><i><sub>C</sub></i>). Default: nullptr */ - CIMPP::PU kd; /* Gain (<i>K</i><i><sub>D</sub></i>). Default: nullptr */ - CIMPP::PU ke; /* Gain (<i>K</i><i><sub>E</sub></i>). Default: nullptr */ - CIMPP::PU kf; /* Gain (<i>K</i><i><sub>F</sub></i>). Default: nullptr */ - CIMPP::PU see1; /* Saturation parameter (<i>S</i><i><sub>E</sub></i><i>[E</i><i><sub>1</sub></i><i>]</i>). Default: nullptr */ - CIMPP::PU see2; /* Saturation parameter (<i>S</i><i><sub>E</sub></i><i>[E</i><i><sub>2</sub></i><i>]</i>). Default: nullptr */ - CIMPP::Seconds t1; /* Time constant (<i>T</i><i><sub>1</sub></i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds t2; /* Time constant (<i>T</i><i><sub>2</sub></i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds t3; /* Time constant (<i>T</i><i><sub>3</sub></i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds t4; /* Time constant (<i>T</i><i><sub>4</sub></i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds t5; /* Time constant (<i>T</i><i><sub>5</sub></i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds t6; /* Time constant (<i>T</i><i><sub>6</sub></i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds te; /* Time constant (<i>T</i><i><sub>E</sub></i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds tf; /* Time constant (<i>T</i><i><sub>F</sub></i>) (&gt;= 0). Default: nullptr */ - CIMPP::PU vrmax; /* Limiter (<i>V</i><i><sub>RMAX</sub></i>) (&gt; ExcOEX3T.vrmin). Default: nullptr */ - CIMPP::PU vrmin; /* Limiter (<i>V</i><i><sub>RMIN</sub></i>) (&lt; ExcOEX3T.vrmax). Default: nullptr */ + /** \brief Saturation parameter (<i>E</i><i><sub>1</sub></i>). Default: nullptr */ + CIMPP::PU e1; + + /** \brief Saturation parameter (<i>E</i><i><sub>2</sub></i>). Default: nullptr */ + CIMPP::PU e2; + + /** \brief Gain (<i>K</i><i><sub>A</sub></i>). Default: nullptr */ + CIMPP::PU ka; + + /** \brief Gain (<i>K</i><i><sub>C</sub></i>). Default: nullptr */ + CIMPP::PU kc; + + /** \brief Gain (<i>K</i><i><sub>D</sub></i>). Default: nullptr */ + CIMPP::PU kd; + + /** \brief Gain (<i>K</i><i><sub>E</sub></i>). Default: nullptr */ + CIMPP::PU ke; + + /** \brief Gain (<i>K</i><i><sub>F</sub></i>). Default: nullptr */ + CIMPP::PU kf; + + /** \brief Saturation parameter (<i>S</i><i><sub>E</sub></i><i>[E</i><i><sub>1</sub></i><i>]</i>). Default: nullptr */ + CIMPP::PU see1; + + /** \brief Saturation parameter (<i>S</i><i><sub>E</sub></i><i>[E</i><i><sub>2</sub></i><i>]</i>). Default: nullptr */ + CIMPP::PU see2; + + /** \brief Time constant (<i>T</i><i><sub>1</sub></i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Time constant (<i>T</i><i><sub>2</sub></i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Time constant (<i>T</i><i><sub>3</sub></i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Time constant (<i>T</i><i><sub>4</sub></i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant (<i>T</i><i><sub>5</sub></i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Time constant (<i>T</i><i><sub>6</sub></i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time constant (<i>T</i><i><sub>E</sub></i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Time constant (<i>T</i><i><sub>F</sub></i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Limiter (<i>V</i><i><sub>RMAX</sub></i>) (&gt; ExcOEX3T.vrmin). Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Limiter (<i>V</i><i><sub>RMIN</sub></i>) (&lt; ExcOEX3T.vrmax). Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcPIC.cpp b/CGMES_3.0.0/ExcPIC.cpp index e4c81265d..dbace3479 100644 --- a/CGMES_3.0.0/ExcPIC.cpp +++ b/CGMES_3.0.0/ExcPIC.cpp @@ -8,34 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcPIC::ExcPIC() {}; -ExcPIC::~ExcPIC() {}; +ExcPIC::ExcPIC() {} +ExcPIC::~ExcPIC() {} static const std::list PossibleProfilesForClass = { @@ -84,311 +61,332 @@ ExcPIC::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcPIC_e1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_e1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_e2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_e2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_efdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_efdmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_se1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_se1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_se2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_se2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_ta1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_ta1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_ta2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_ta2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_ta3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_ta3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_ta4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_ta4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_tf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_tf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_vr1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_vr1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vr1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_vr2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_vr2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vr2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcPIC_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcPIC_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcPIC_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e1; if (!buffer.str().empty()) @@ -402,7 +400,8 @@ bool get_ExcPIC_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e2; if (!buffer.str().empty()) @@ -416,7 +415,8 @@ bool get_ExcPIC_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmax; if (!buffer.str().empty()) @@ -430,7 +430,8 @@ bool get_ExcPIC_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcPIC_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmin; if (!buffer.str().empty()) @@ -444,7 +445,8 @@ bool get_ExcPIC_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcPIC_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -458,7 +460,8 @@ bool get_ExcPIC_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -472,7 +475,8 @@ bool get_ExcPIC_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -486,7 +490,8 @@ bool get_ExcPIC_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -500,7 +505,8 @@ bool get_ExcPIC_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -514,7 +520,8 @@ bool get_ExcPIC_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -528,7 +535,8 @@ bool get_ExcPIC_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se1; if (!buffer.str().empty()) @@ -542,7 +550,8 @@ bool get_ExcPIC_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se2; if (!buffer.str().empty()) @@ -556,7 +565,8 @@ bool get_ExcPIC_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_ta1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta1; if (!buffer.str().empty()) @@ -570,7 +580,8 @@ bool get_ExcPIC_ta1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_ta2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta2; if (!buffer.str().empty()) @@ -584,7 +595,8 @@ bool get_ExcPIC_ta2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_ta3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta3; if (!buffer.str().empty()) @@ -598,7 +610,8 @@ bool get_ExcPIC_ta3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_ta4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta4; if (!buffer.str().empty()) @@ -612,7 +625,8 @@ bool get_ExcPIC_ta4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -626,7 +640,8 @@ bool get_ExcPIC_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf1; if (!buffer.str().empty()) @@ -640,7 +655,8 @@ bool get_ExcPIC_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf2; if (!buffer.str().empty()) @@ -654,7 +670,8 @@ bool get_ExcPIC_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_vr1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vr1; if (!buffer.str().empty()) @@ -668,7 +685,8 @@ bool get_ExcPIC_vr1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_vr2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vr2; if (!buffer.str().empty()) @@ -682,7 +700,8 @@ bool get_ExcPIC_vr2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcPIC_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -696,7 +715,8 @@ bool get_ExcPIC_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcPIC_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcPIC* element = dynamic_cast(BaseClass_ptr1)) + const ExcPIC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -708,8 +728,6 @@ bool get_ExcPIC_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char ExcPIC::debugName[] = "ExcPIC"; const char* ExcPIC::debugString() const { @@ -718,34 +736,34 @@ const char* ExcPIC::debugString() const void ExcPIC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcPIC"), &ExcPIC_factory)); + factory_map.emplace("cim:ExcPIC", &ExcPIC_factory); } void ExcPIC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.e1"), &assign_ExcPIC_e1)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.e2"), &assign_ExcPIC_e2)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.efdmax"), &assign_ExcPIC_efdmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.efdmin"), &assign_ExcPIC_efdmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.ka"), &assign_ExcPIC_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.kc"), &assign_ExcPIC_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.ke"), &assign_ExcPIC_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.kf"), &assign_ExcPIC_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.ki"), &assign_ExcPIC_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.kp"), &assign_ExcPIC_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.se1"), &assign_ExcPIC_se1)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.se2"), &assign_ExcPIC_se2)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.ta1"), &assign_ExcPIC_ta1)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.ta2"), &assign_ExcPIC_ta2)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.ta3"), &assign_ExcPIC_ta3)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.ta4"), &assign_ExcPIC_ta4)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.te"), &assign_ExcPIC_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.tf1"), &assign_ExcPIC_tf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.tf2"), &assign_ExcPIC_tf2)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.vr1"), &assign_ExcPIC_vr1)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.vr2"), &assign_ExcPIC_vr2)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.vrmax"), &assign_ExcPIC_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcPIC.vrmin"), &assign_ExcPIC_vrmin)); + assign_map.emplace("cim:ExcPIC.e1", &assign_ExcPIC_e1); + assign_map.emplace("cim:ExcPIC.e2", &assign_ExcPIC_e2); + assign_map.emplace("cim:ExcPIC.efdmax", &assign_ExcPIC_efdmax); + assign_map.emplace("cim:ExcPIC.efdmin", &assign_ExcPIC_efdmin); + assign_map.emplace("cim:ExcPIC.ka", &assign_ExcPIC_ka); + assign_map.emplace("cim:ExcPIC.kc", &assign_ExcPIC_kc); + assign_map.emplace("cim:ExcPIC.ke", &assign_ExcPIC_ke); + assign_map.emplace("cim:ExcPIC.kf", &assign_ExcPIC_kf); + assign_map.emplace("cim:ExcPIC.ki", &assign_ExcPIC_ki); + assign_map.emplace("cim:ExcPIC.kp", &assign_ExcPIC_kp); + assign_map.emplace("cim:ExcPIC.se1", &assign_ExcPIC_se1); + assign_map.emplace("cim:ExcPIC.se2", &assign_ExcPIC_se2); + assign_map.emplace("cim:ExcPIC.ta1", &assign_ExcPIC_ta1); + assign_map.emplace("cim:ExcPIC.ta2", &assign_ExcPIC_ta2); + assign_map.emplace("cim:ExcPIC.ta3", &assign_ExcPIC_ta3); + assign_map.emplace("cim:ExcPIC.ta4", &assign_ExcPIC_ta4); + assign_map.emplace("cim:ExcPIC.te", &assign_ExcPIC_te); + assign_map.emplace("cim:ExcPIC.tf1", &assign_ExcPIC_tf1); + assign_map.emplace("cim:ExcPIC.tf2", &assign_ExcPIC_tf2); + assign_map.emplace("cim:ExcPIC.vr1", &assign_ExcPIC_vr1); + assign_map.emplace("cim:ExcPIC.vr2", &assign_ExcPIC_vr2); + assign_map.emplace("cim:ExcPIC.vrmax", &assign_ExcPIC_vrmax); + assign_map.emplace("cim:ExcPIC.vrmin", &assign_ExcPIC_vrmin); } void ExcPIC::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcPIC.hpp b/CGMES_3.0.0/ExcPIC.hpp index 0d3d7dad9..fe46c1fba 100644 --- a/CGMES_3.0.0/ExcPIC.hpp +++ b/CGMES_3.0.0/ExcPIC.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Proportional/integral regulator excitation system. This model can be used to represent excitation systems with a proportional-integral (PI) voltage regulator controller. - */ + /** \brief Proportional/integral regulator excitation system. This model can be used to represent excitation systems with a proportional-integral (PI) voltage regulator controller. */ class ExcPIC : public ExcitationSystemDynamics { public: @@ -28,29 +26,74 @@ namespace CIMPP ExcPIC(); ~ExcPIC() override; - CIMPP::PU e1; /* Field voltage value 1 (<i>E</i><i><sub>1</sub></i>). Typical value = 0. Default: nullptr */ - CIMPP::PU e2; /* Field voltage value 2 (<i>E</i><i><sub>2</sub></i>). Typical value = 0. Default: nullptr */ - CIMPP::PU efdmax; /* Exciter maximum limit (<i>E</i><i><sub>fdmax</sub></i>) (&gt; ExcPIC.efdmin). Typical value = 8. Default: nullptr */ - CIMPP::PU efdmin; /* Exciter minimum limit (<i>E</i><i><sub>fdmin</sub></i>) (&lt; ExcPIC.efdmax). Typical value = -0,87. Default: nullptr */ - CIMPP::PU ka; /* PI controller gain (<i>K</i><i><sub>a</sub></i>). Typical value = 3,15. Default: nullptr */ - CIMPP::PU kc; /* Exciter regulation factor (<i>K</i><i><sub>c</sub></i>). Typical value = 0,08. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant (<i>K</i><i><sub>e</sub></i>). Typical value = 0. Default: nullptr */ - CIMPP::PU kf; /* Rate feedback gain (<i>K</i><i><sub>f</sub></i>). Typical value = 0. Default: nullptr */ - CIMPP::PU ki; /* Current source gain (<i>K</i><i><sub>i</sub></i>). Typical value = 0. Default: nullptr */ - CIMPP::PU kp; /* Potential source gain (<i>K</i><i><sub>p</sub></i>). Typical value = 6,5. Default: nullptr */ - CIMPP::PU se1; /* Saturation factor at <i>E</i><i><sub>1</sub></i> (<i>Se</i><i><sub>1</sub></i>). Typical value = 0. Default: nullptr */ - CIMPP::PU se2; /* Saturation factor at <i>E</i><i><sub>2</sub></i> (<i>Se</i><i><sub>2</sub></i>). Typical value = 0. Default: nullptr */ - CIMPP::Seconds ta1; /* PI controller time constant (<i>T</i><i><sub>a1</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::Seconds ta2; /* Voltage regulator time constant (<i>T</i><i><sub>a2</sub></i>) (&gt;= 0). Typical value = 0,01. Default: nullptr */ - CIMPP::Seconds ta3; /* Lead time constant (<i>T</i><i><sub>a3</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds ta4; /* Lag time constant (<i>T</i><i><sub>a4</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant (<i>T</i><i><sub>e</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tf1; /* Rate feedback time constant (<i>T</i><i><sub>f1</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tf2; /* Rate feedback lag time constant (<i>T</i><i><sub>f2</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::PU vr1; /* PI maximum limit (<i>V</i><i><sub>r1</sub></i>). Typical value = 1. Default: nullptr */ - CIMPP::PU vr2; /* PI minimum limit (<i>V</i><i><sub>r2</sub></i>). Typical value = -0,87. Default: nullptr */ - CIMPP::PU vrmax; /* Voltage regulator maximum limit (<i>V</i><i><sub>rmax</sub></i>) (&gt; ExcPIC.vrmin). Typical value = 1. Default: nullptr */ - CIMPP::PU vrmin; /* Voltage regulator minimum limit (<i>V</i><i><sub>rmin</sub></i>) (&lt; ExcPIC.vrmax). Typical value = -0,87. Default: nullptr */ + /** \brief Field voltage value 1 (<i>E</i><i><sub>1</sub></i>). Typical value = 0. Default: nullptr */ + CIMPP::PU e1; + + /** \brief Field voltage value 2 (<i>E</i><i><sub>2</sub></i>). Typical value = 0. Default: nullptr */ + CIMPP::PU e2; + + /** \brief Exciter maximum limit (<i>E</i><i><sub>fdmax</sub></i>) (&gt; ExcPIC.efdmin). Typical value = 8. Default: nullptr */ + CIMPP::PU efdmax; + + /** \brief Exciter minimum limit (<i>E</i><i><sub>fdmin</sub></i>) (&lt; ExcPIC.efdmax). Typical value = -0,87. Default: nullptr */ + CIMPP::PU efdmin; + + /** \brief PI controller gain (<i>K</i><i><sub>a</sub></i>). Typical value = 3,15. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Exciter regulation factor (<i>K</i><i><sub>c</sub></i>). Typical value = 0,08. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Exciter constant (<i>K</i><i><sub>e</sub></i>). Typical value = 0. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Rate feedback gain (<i>K</i><i><sub>f</sub></i>). Typical value = 0. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Current source gain (<i>K</i><i><sub>i</sub></i>). Typical value = 0. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Potential source gain (<i>K</i><i><sub>p</sub></i>). Typical value = 6,5. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Saturation factor at <i>E</i><i><sub>1</sub></i> (<i>Se</i><i><sub>1</sub></i>). Typical value = 0. Default: nullptr */ + CIMPP::PU se1; + + /** \brief Saturation factor at <i>E</i><i><sub>2</sub></i> (<i>Se</i><i><sub>2</sub></i>). Typical value = 0. Default: nullptr */ + CIMPP::PU se2; + + /** \brief PI controller time constant (<i>T</i><i><sub>a1</sub></i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds ta1; + + /** \brief Voltage regulator time constant (<i>T</i><i><sub>a2</sub></i>) (&gt;= 0). Typical value = 0,01. Default: nullptr */ + CIMPP::Seconds ta2; + + /** \brief Lead time constant (<i>T</i><i><sub>a3</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds ta3; + + /** \brief Lag time constant (<i>T</i><i><sub>a4</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds ta4; + + /** \brief Exciter time constant (<i>T</i><i><sub>e</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Rate feedback time constant (<i>T</i><i><sub>f1</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tf1; + + /** \brief Rate feedback lag time constant (<i>T</i><i><sub>f2</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tf2; + + /** \brief PI maximum limit (<i>V</i><i><sub>r1</sub></i>). Typical value = 1. Default: nullptr */ + CIMPP::PU vr1; + + /** \brief PI minimum limit (<i>V</i><i><sub>r2</sub></i>). Typical value = -0,87. Default: nullptr */ + CIMPP::PU vr2; + + /** \brief Voltage regulator maximum limit (<i>V</i><i><sub>rmax</sub></i>) (&gt; ExcPIC.vrmin). Typical value = 1. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Voltage regulator minimum limit (<i>V</i><i><sub>rmin</sub></i>) (&lt; ExcPIC.vrmax). Typical value = -0,87. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcREXS.cpp b/CGMES_3.0.0/ExcREXS.cpp index 8e0575509..7c198209c 100644 --- a/CGMES_3.0.0/ExcREXS.cpp +++ b/CGMES_3.0.0/ExcREXS.cpp @@ -8,47 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "ExcREXSFeedbackSignalKind.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcREXS::ExcREXS() {}; -ExcREXS::~ExcREXS() {}; +ExcREXS::ExcREXS() {} +ExcREXS::~ExcREXS() {} static const std::list PossibleProfilesForClass = { @@ -110,480 +74,514 @@ ExcREXS::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcREXS_e1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_e1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_e2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_e2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_fbf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_fbf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fbf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_flimf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_flimf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flimf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kefd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kefd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kefd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kii(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kii(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kii; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kip(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kip; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kvi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kvi(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kvi; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kvp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kvp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kvp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_kvphz(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_kvphz(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kvphz; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_nvphz(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_nvphz(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nvphz; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_se1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_se1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_se2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_se2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->se2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_tb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_tb1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_tb2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_tb2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_tc1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_tc1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_tc2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_tc2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_tf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_tf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_vcmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_vcmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vcmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_vfmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_vfmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_vfmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_vfmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vfmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcREXS_xc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcREXS_xc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcREXS_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e1; if (!buffer.str().empty()) @@ -597,7 +595,8 @@ bool get_ExcREXS_e1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e2; if (!buffer.str().empty()) @@ -609,9 +608,25 @@ bool get_ExcREXS_e2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } +bool get_ExcREXS_fbf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->fbf; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_ExcREXS_flimf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flimf; if (!buffer.str().empty()) @@ -625,7 +640,8 @@ bool get_ExcREXS_flimf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcREXS_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -639,7 +655,8 @@ bool get_ExcREXS_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -653,7 +670,8 @@ bool get_ExcREXS_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -667,7 +685,8 @@ bool get_ExcREXS_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_kefd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kefd; if (!buffer.str().empty()) @@ -681,7 +700,8 @@ bool get_ExcREXS_kefd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcREXS_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -695,7 +715,8 @@ bool get_ExcREXS_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh; if (!buffer.str().empty()) @@ -709,7 +730,8 @@ bool get_ExcREXS_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_kii(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kii; if (!buffer.str().empty()) @@ -723,7 +745,8 @@ bool get_ExcREXS_kii(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_kip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kip; if (!buffer.str().empty()) @@ -737,7 +760,8 @@ bool get_ExcREXS_kip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -751,7 +775,8 @@ bool get_ExcREXS_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_kvi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kvi; if (!buffer.str().empty()) @@ -765,7 +790,8 @@ bool get_ExcREXS_kvi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_kvp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kvp; if (!buffer.str().empty()) @@ -779,7 +805,8 @@ bool get_ExcREXS_kvp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_kvphz(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kvphz; if (!buffer.str().empty()) @@ -793,7 +820,8 @@ bool get_ExcREXS_kvphz(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcREXS_nvphz(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nvphz; if (!buffer.str().empty()) @@ -807,7 +835,8 @@ bool get_ExcREXS_nvphz(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcREXS_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se1; if (!buffer.str().empty()) @@ -821,7 +850,8 @@ bool get_ExcREXS_se1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->se2; if (!buffer.str().empty()) @@ -835,7 +865,8 @@ bool get_ExcREXS_se2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -849,7 +880,8 @@ bool get_ExcREXS_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb1; if (!buffer.str().empty()) @@ -863,7 +895,8 @@ bool get_ExcREXS_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_tb2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb2; if (!buffer.str().empty()) @@ -877,7 +910,8 @@ bool get_ExcREXS_tb2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_tc1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc1; if (!buffer.str().empty()) @@ -891,7 +925,8 @@ bool get_ExcREXS_tc1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_tc2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc2; if (!buffer.str().empty()) @@ -905,7 +940,8 @@ bool get_ExcREXS_tc2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -919,7 +955,8 @@ bool get_ExcREXS_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -933,7 +970,8 @@ bool get_ExcREXS_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf1; if (!buffer.str().empty()) @@ -947,7 +985,8 @@ bool get_ExcREXS_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf2; if (!buffer.str().empty()) @@ -961,7 +1000,8 @@ bool get_ExcREXS_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -975,7 +1015,8 @@ bool get_ExcREXS_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcREXS_vcmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vcmax; if (!buffer.str().empty()) @@ -989,7 +1030,8 @@ bool get_ExcREXS_vcmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcREXS_vfmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfmax; if (!buffer.str().empty()) @@ -1003,7 +1045,8 @@ bool get_ExcREXS_vfmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcREXS_vfmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vfmin; if (!buffer.str().empty()) @@ -1017,7 +1060,8 @@ bool get_ExcREXS_vfmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcREXS_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -1031,7 +1075,8 @@ bool get_ExcREXS_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcREXS_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -1045,7 +1090,8 @@ bool get_ExcREXS_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcREXS_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -1059,7 +1105,8 @@ bool get_ExcREXS_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcREXS_xc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcREXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xc; if (!buffer.str().empty()) @@ -1071,22 +1118,6 @@ bool get_ExcREXS_xc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - -bool get_ExcREXS_fbf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const ExcREXS* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->fbf; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char ExcREXS::debugName[] = "ExcREXS"; const char* ExcREXS::debugString() const { @@ -1095,47 +1126,47 @@ const char* ExcREXS::debugString() const void ExcREXS::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcREXS"), &ExcREXS_factory)); + factory_map.emplace("cim:ExcREXS", &ExcREXS_factory); } void ExcREXS::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.e1"), &assign_ExcREXS_e1)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.e2"), &assign_ExcREXS_e2)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.fbf"), &assign_ExcREXS_fbf)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.flimf"), &assign_ExcREXS_flimf)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kc"), &assign_ExcREXS_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kd"), &assign_ExcREXS_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.ke"), &assign_ExcREXS_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kefd"), &assign_ExcREXS_kefd)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kf"), &assign_ExcREXS_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kh"), &assign_ExcREXS_kh)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kii"), &assign_ExcREXS_kii)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kip"), &assign_ExcREXS_kip)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.ks"), &assign_ExcREXS_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kvi"), &assign_ExcREXS_kvi)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kvp"), &assign_ExcREXS_kvp)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.kvphz"), &assign_ExcREXS_kvphz)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.nvphz"), &assign_ExcREXS_nvphz)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.se1"), &assign_ExcREXS_se1)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.se2"), &assign_ExcREXS_se2)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.ta"), &assign_ExcREXS_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.tb1"), &assign_ExcREXS_tb1)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.tb2"), &assign_ExcREXS_tb2)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.tc1"), &assign_ExcREXS_tc1)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.tc2"), &assign_ExcREXS_tc2)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.te"), &assign_ExcREXS_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.tf"), &assign_ExcREXS_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.tf1"), &assign_ExcREXS_tf1)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.tf2"), &assign_ExcREXS_tf2)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.tp"), &assign_ExcREXS_tp)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.vcmax"), &assign_ExcREXS_vcmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.vfmax"), &assign_ExcREXS_vfmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.vfmin"), &assign_ExcREXS_vfmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.vimax"), &assign_ExcREXS_vimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.vrmax"), &assign_ExcREXS_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.vrmin"), &assign_ExcREXS_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcREXS.xc"), &assign_ExcREXS_xc)); + assign_map.emplace("cim:ExcREXS.e1", &assign_ExcREXS_e1); + assign_map.emplace("cim:ExcREXS.e2", &assign_ExcREXS_e2); + assign_map.emplace("cim:ExcREXS.fbf", &assign_ExcREXS_fbf); + assign_map.emplace("cim:ExcREXS.flimf", &assign_ExcREXS_flimf); + assign_map.emplace("cim:ExcREXS.kc", &assign_ExcREXS_kc); + assign_map.emplace("cim:ExcREXS.kd", &assign_ExcREXS_kd); + assign_map.emplace("cim:ExcREXS.ke", &assign_ExcREXS_ke); + assign_map.emplace("cim:ExcREXS.kefd", &assign_ExcREXS_kefd); + assign_map.emplace("cim:ExcREXS.kf", &assign_ExcREXS_kf); + assign_map.emplace("cim:ExcREXS.kh", &assign_ExcREXS_kh); + assign_map.emplace("cim:ExcREXS.kii", &assign_ExcREXS_kii); + assign_map.emplace("cim:ExcREXS.kip", &assign_ExcREXS_kip); + assign_map.emplace("cim:ExcREXS.ks", &assign_ExcREXS_ks); + assign_map.emplace("cim:ExcREXS.kvi", &assign_ExcREXS_kvi); + assign_map.emplace("cim:ExcREXS.kvp", &assign_ExcREXS_kvp); + assign_map.emplace("cim:ExcREXS.kvphz", &assign_ExcREXS_kvphz); + assign_map.emplace("cim:ExcREXS.nvphz", &assign_ExcREXS_nvphz); + assign_map.emplace("cim:ExcREXS.se1", &assign_ExcREXS_se1); + assign_map.emplace("cim:ExcREXS.se2", &assign_ExcREXS_se2); + assign_map.emplace("cim:ExcREXS.ta", &assign_ExcREXS_ta); + assign_map.emplace("cim:ExcREXS.tb1", &assign_ExcREXS_tb1); + assign_map.emplace("cim:ExcREXS.tb2", &assign_ExcREXS_tb2); + assign_map.emplace("cim:ExcREXS.tc1", &assign_ExcREXS_tc1); + assign_map.emplace("cim:ExcREXS.tc2", &assign_ExcREXS_tc2); + assign_map.emplace("cim:ExcREXS.te", &assign_ExcREXS_te); + assign_map.emplace("cim:ExcREXS.tf", &assign_ExcREXS_tf); + assign_map.emplace("cim:ExcREXS.tf1", &assign_ExcREXS_tf1); + assign_map.emplace("cim:ExcREXS.tf2", &assign_ExcREXS_tf2); + assign_map.emplace("cim:ExcREXS.tp", &assign_ExcREXS_tp); + assign_map.emplace("cim:ExcREXS.vcmax", &assign_ExcREXS_vcmax); + assign_map.emplace("cim:ExcREXS.vfmax", &assign_ExcREXS_vfmax); + assign_map.emplace("cim:ExcREXS.vfmin", &assign_ExcREXS_vfmin); + assign_map.emplace("cim:ExcREXS.vimax", &assign_ExcREXS_vimax); + assign_map.emplace("cim:ExcREXS.vrmax", &assign_ExcREXS_vrmax); + assign_map.emplace("cim:ExcREXS.vrmin", &assign_ExcREXS_vrmin); + assign_map.emplace("cim:ExcREXS.xc", &assign_ExcREXS_xc); } void ExcREXS::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcREXS.hpp b/CGMES_3.0.0/ExcREXS.hpp index b1a6e2538..16a8268bc 100644 --- a/CGMES_3.0.0/ExcREXS.hpp +++ b/CGMES_3.0.0/ExcREXS.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - General purpose rotating excitation system. This model can be used to represent a wide range of excitation systems whose DC power source is an AC or DC generator. It encompasses IEEE type AC1, AC2, DC1, and DC2 excitation system models. - */ + /** \brief General purpose rotating excitation system. This model can be used to represent a wide range of excitation systems whose DC power source is an AC or DC generator. It encompasses IEEE type AC1, AC2, DC1, and DC2 excitation system models. */ class ExcREXS : public ExcitationSystemDynamics { public: @@ -29,42 +27,113 @@ namespace CIMPP ExcREXS(); ~ExcREXS() override; - CIMPP::PU e1; /* Field voltage value 1 (<i>E</i><i><sub>1</sub></i>). Typical value = 3. Default: nullptr */ - CIMPP::PU e2; /* Field voltage value 2 (<i>E</i><i><sub>2</sub></i>). Typical value = 4. Default: nullptr */ - CIMPP::ExcREXSFeedbackSignalKind fbf; /* Rate feedback signal flag (<i>fbf</i>). Typical value = fieldCurrent. Default: 0 */ - CIMPP::PU flimf; /* Limit type flag (<i>Flimf</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU kc; /* Rectifier regulation factor (<i>Kc</i>). Typical value = 0,05. Default: nullptr */ - CIMPP::PU kd; /* Exciter regulation factor (<i>Kd</i>). Typical value = 2. Default: nullptr */ - CIMPP::PU ke; /* Exciter field proportional constant (<i>Ke</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU kefd; /* Field voltage feedback gain (<i>Kefd</i>). Typical value = 0. Default: nullptr */ - CIMPP::Seconds kf; /* Rate feedback gain (<i>Kf</i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ - CIMPP::PU kh; /* Field voltage controller feedback gain (<i>Kh</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU kii; /* Field current regulator integral gain (<i>Kii</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU kip; /* Field current regulator proportional gain (<i>Kip</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (<i>Ks</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU kvi; /* Voltage regulator integral gain (<i>Kvi</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU kvp; /* Voltage regulator proportional gain (<i>Kvp</i>). Typical value = 2800. Default: nullptr */ - CIMPP::PU kvphz; /* V/Hz limiter gain (<i>Kvphz</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU nvphz; /* Pickup speed of V/Hz limiter (<i>Nvphz</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU se1; /* Saturation factor at <i>E</i><i><sub>1</sub></i><i> </i>(<i>Se</i><i><sub>1</sub></i>). Typical value = 0,0001. Default: nullptr */ - CIMPP::PU se2; /* Saturation factor at <i>E</i><i><sub>2</sub></i> (<i>Se</i><i><sub>2</sub></i>). Typical value = 0,001. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (<i>Ta</i>) (&gt;= 0). If = 0, block is bypassed. Typical value = 0,01. Default: nullptr */ - CIMPP::Seconds tb1; /* Lag time constant (<i>Tb1</i>) (&gt;= 0). If = 0, block is bypassed. Typical value = 0. Default: nullptr */ - CIMPP::Seconds tb2; /* Lag time constant (<i>Tb2</i>) (&gt;= 0). If = 0, block is bypassed. Typical value = 0. Default: nullptr */ - CIMPP::Seconds tc1; /* Lead time constant (<i>Tc1</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tc2; /* Lead time constant (<i>Tc2</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter field time constant (<i>Te</i>) (&gt; 0). Typical value = 1,2. Default: nullptr */ - CIMPP::Seconds tf; /* Rate feedback time constant (<i>Tf</i>) (&gt;= 0). If = 0, the feedback path is not used. Typical value = 1. Default: nullptr */ - CIMPP::Seconds tf1; /* Feedback lead time constant (<i>Tf1</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tf2; /* Feedback lag time constant (<i>Tf2</i>) (&gt;= 0). If = 0, block is bypassed. Typical value = 0. Default: nullptr */ - CIMPP::Seconds tp; /* Field current bridge time constant (<i>Tp</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::PU vcmax; /* Maximum compounding voltage (<i>Vcmax</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU vfmax; /* Maximum exciter field current (<i>Vfmax</i>) (&gt; ExcREXS.vfmin). Typical value = 47. Default: nullptr */ - CIMPP::PU vfmin; /* Minimum exciter field current (<i>Vfmin</i>) (&lt; ExcREXS.vfmax). Typical value = -20. Default: nullptr */ - CIMPP::PU vimax; /* Voltage regulator input limit (<i>Vimax</i>). Typical value = 0,1. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum controller output (V<i>rmax</i>) (&gt; ExcREXS.vrmin). Typical value = 47. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum controller output (<i>Vrmin</i>) (&lt; ExcREXS.vrmax). Typical value = -20. Default: nullptr */ - CIMPP::PU xc; /* Exciter compounding reactance (<i>Xc</i>). Typical value = 0. Default: nullptr */ + /** \brief Field voltage value 1 (<i>E</i><i><sub>1</sub></i>). Typical value = 3. Default: nullptr */ + CIMPP::PU e1; + + /** \brief Field voltage value 2 (<i>E</i><i><sub>2</sub></i>). Typical value = 4. Default: nullptr */ + CIMPP::PU e2; + + /** \brief Rate feedback signal flag (<i>fbf</i>). Typical value = fieldCurrent. Default: 0 */ + CIMPP::ExcREXSFeedbackSignalKind fbf; + + /** \brief Limit type flag (<i>Flimf</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU flimf; + + /** \brief Rectifier regulation factor (<i>Kc</i>). Typical value = 0,05. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Exciter regulation factor (<i>Kd</i>). Typical value = 2. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Exciter field proportional constant (<i>Ke</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Field voltage feedback gain (<i>Kefd</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU kefd; + + /** \brief Rate feedback gain (<i>Kf</i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ + CIMPP::Seconds kf; + + /** \brief Field voltage controller feedback gain (<i>Kh</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU kh; + + /** \brief Field current regulator integral gain (<i>Kii</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU kii; + + /** \brief Field current regulator proportional gain (<i>Kip</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU kip; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (<i>Ks</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Voltage regulator integral gain (<i>Kvi</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU kvi; + + /** \brief Voltage regulator proportional gain (<i>Kvp</i>). Typical value = 2800. Default: nullptr */ + CIMPP::PU kvp; + + /** \brief V/Hz limiter gain (<i>Kvphz</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU kvphz; + + /** \brief Pickup speed of V/Hz limiter (<i>Nvphz</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU nvphz; + + /** \brief Saturation factor at <i>E</i><i><sub>1</sub></i><i> </i>(<i>Se</i><i><sub>1</sub></i>). Typical value = 0,0001. Default: nullptr */ + CIMPP::PU se1; + + /** \brief Saturation factor at <i>E</i><i><sub>2</sub></i> (<i>Se</i><i><sub>2</sub></i>). Typical value = 0,001. Default: nullptr */ + CIMPP::PU se2; + + /** \brief Voltage regulator time constant (<i>Ta</i>) (&gt;= 0). If = 0, block is bypassed. Typical value = 0,01. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Lag time constant (<i>Tb1</i>) (&gt;= 0). If = 0, block is bypassed. Typical value = 0. Default: nullptr */ + CIMPP::Seconds tb1; + + /** \brief Lag time constant (<i>Tb2</i>) (&gt;= 0). If = 0, block is bypassed. Typical value = 0. Default: nullptr */ + CIMPP::Seconds tb2; + + /** \brief Lead time constant (<i>Tc1</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tc1; + + /** \brief Lead time constant (<i>Tc2</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tc2; + + /** \brief Exciter field time constant (<i>Te</i>) (&gt; 0). Typical value = 1,2. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Rate feedback time constant (<i>Tf</i>) (&gt;= 0). If = 0, the feedback path is not used. Typical value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Feedback lead time constant (<i>Tf1</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tf1; + + /** \brief Feedback lag time constant (<i>Tf2</i>) (&gt;= 0). If = 0, block is bypassed. Typical value = 0. Default: nullptr */ + CIMPP::Seconds tf2; + + /** \brief Field current bridge time constant (<i>Tp</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Maximum compounding voltage (<i>Vcmax</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU vcmax; + + /** \brief Maximum exciter field current (<i>Vfmax</i>) (&gt; ExcREXS.vfmin). Typical value = 47. Default: nullptr */ + CIMPP::PU vfmax; + + /** \brief Minimum exciter field current (<i>Vfmin</i>) (&lt; ExcREXS.vfmax). Typical value = -20. Default: nullptr */ + CIMPP::PU vfmin; + + /** \brief Voltage regulator input limit (<i>Vimax</i>). Typical value = 0,1. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Maximum controller output (V<i>rmax</i>) (&gt; ExcREXS.vrmin). Typical value = 47. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum controller output (<i>Vrmin</i>) (&lt; ExcREXS.vrmax). Typical value = -20. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief Exciter compounding reactance (<i>Xc</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU xc; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcREXSFeedbackSignalKind.cpp b/CGMES_3.0.0/ExcREXSFeedbackSignalKind.cpp index de55c6691..e05a1487d 100644 --- a/CGMES_3.0.0/ExcREXSFeedbackSignalKind.cpp +++ b/CGMES_3.0.0/ExcREXSFeedbackSignalKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "ExcREXSFeedbackSignalKind") + if (EnumSymbol.substr(0, pos) != "ExcREXSFeedbackSignalKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "fieldVoltage") + if (EnumSymbol == "fieldVoltage") { rop = ExcREXSFeedbackSignalKind::fieldVoltage; return lop; } - if(EnumSymbol == "fieldCurrent") + if (EnumSymbol == "fieldCurrent") { rop = ExcREXSFeedbackSignalKind::fieldCurrent; return lop; } - if(EnumSymbol == "outputVoltage") + if (EnumSymbol == "outputVoltage") { rop = ExcREXSFeedbackSignalKind::outputVoltage; return lop; diff --git a/CGMES_3.0.0/ExcREXSFeedbackSignalKind.hpp b/CGMES_3.0.0/ExcREXSFeedbackSignalKind.hpp index f2c3bbbf9..1044e5eaa 100644 --- a/CGMES_3.0.0/ExcREXSFeedbackSignalKind.hpp +++ b/CGMES_3.0.0/ExcREXSFeedbackSignalKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Types of rate feedback signals. - */ + /** \brief Types of rate feedback signals. */ class ExcREXSFeedbackSignalKind { public: enum ExcREXSFeedbackSignalKind_ENUM { - /** - * The voltage regulator output voltage is used. It is the same as exciter field voltage. - */ + /** The voltage regulator output voltage is used. It is the same as exciter field voltage. */ fieldVoltage, - /** - * The exciter field current is used. - */ + /** The exciter field current is used. */ fieldCurrent, - /** - * The output voltage of the exciter is used. - */ + /** The output voltage of the exciter is used. */ outputVoltage, }; diff --git a/CGMES_3.0.0/ExcRQB.cpp b/CGMES_3.0.0/ExcRQB.cpp index c986ead63..122934d7b 100644 --- a/CGMES_3.0.0/ExcRQB.cpp +++ b/CGMES_3.0.0/ExcRQB.cpp @@ -8,24 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcRQB::ExcRQB() {}; -ExcRQB::~ExcRQB() {}; +ExcRQB::ExcRQB() {} +ExcRQB::~ExcRQB() {} static const std::list PossibleProfilesForClass = { @@ -64,181 +51,192 @@ ExcRQB::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcRQB_ki0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcRQB_ki0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + ExcRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcRQB_ki1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcRQB_ki1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + ExcRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcRQB_klir(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcRQB_klir(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + ExcRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->klir; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcRQB_klus(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcRQB_klus(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + ExcRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->klus; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcRQB_lsat(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcRQB_lsat(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + ExcRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lsat; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcRQB_lus(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcRQB_lus(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + ExcRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lus; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcRQB_mesu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcRQB_mesu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + ExcRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mesu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcRQB_t4m(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcRQB_t4m(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + ExcRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4m; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcRQB_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcRQB_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + ExcRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcRQB_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcRQB_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + ExcRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcRQB_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcRQB_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + ExcRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcRQB_ucmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcRQB_ucmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + ExcRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ucmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcRQB_ucmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcRQB_ucmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + ExcRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ucmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcRQB_ki0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + const ExcRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki0; if (!buffer.str().empty()) @@ -252,7 +250,8 @@ bool get_ExcRQB_ki0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcRQB_ki1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + const ExcRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki1; if (!buffer.str().empty()) @@ -266,7 +265,8 @@ bool get_ExcRQB_ki1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcRQB_klir(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + const ExcRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->klir; if (!buffer.str().empty()) @@ -280,7 +280,8 @@ bool get_ExcRQB_klir(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcRQB_klus(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + const ExcRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->klus; if (!buffer.str().empty()) @@ -294,7 +295,8 @@ bool get_ExcRQB_klus(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcRQB_lsat(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + const ExcRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lsat; if (!buffer.str().empty()) @@ -308,7 +310,8 @@ bool get_ExcRQB_lsat(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcRQB_lus(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + const ExcRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lus; if (!buffer.str().empty()) @@ -322,7 +325,8 @@ bool get_ExcRQB_lus(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcRQB_mesu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + const ExcRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mesu; if (!buffer.str().empty()) @@ -336,7 +340,8 @@ bool get_ExcRQB_mesu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcRQB_t4m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + const ExcRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4m; if (!buffer.str().empty()) @@ -350,7 +355,8 @@ bool get_ExcRQB_t4m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcRQB_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + const ExcRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -364,7 +370,8 @@ bool get_ExcRQB_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcRQB_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + const ExcRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -378,7 +385,8 @@ bool get_ExcRQB_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcRQB_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + const ExcRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -392,7 +400,8 @@ bool get_ExcRQB_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcRQB_ucmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + const ExcRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ucmax; if (!buffer.str().empty()) @@ -406,7 +415,8 @@ bool get_ExcRQB_ucmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcRQB_ucmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcRQB* element = dynamic_cast(BaseClass_ptr1)) + const ExcRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ucmin; if (!buffer.str().empty()) @@ -418,8 +428,6 @@ bool get_ExcRQB_ucmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char ExcRQB::debugName[] = "ExcRQB"; const char* ExcRQB::debugString() const { @@ -428,24 +436,24 @@ const char* ExcRQB::debugString() const void ExcRQB::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcRQB"), &ExcRQB_factory)); + factory_map.emplace("cim:ExcRQB", &ExcRQB_factory); } void ExcRQB::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcRQB.ki0"), &assign_ExcRQB_ki0)); - assign_map.insert(std::make_pair(std::string("cim:ExcRQB.ki1"), &assign_ExcRQB_ki1)); - assign_map.insert(std::make_pair(std::string("cim:ExcRQB.klir"), &assign_ExcRQB_klir)); - assign_map.insert(std::make_pair(std::string("cim:ExcRQB.klus"), &assign_ExcRQB_klus)); - assign_map.insert(std::make_pair(std::string("cim:ExcRQB.lsat"), &assign_ExcRQB_lsat)); - assign_map.insert(std::make_pair(std::string("cim:ExcRQB.lus"), &assign_ExcRQB_lus)); - assign_map.insert(std::make_pair(std::string("cim:ExcRQB.mesu"), &assign_ExcRQB_mesu)); - assign_map.insert(std::make_pair(std::string("cim:ExcRQB.t4m"), &assign_ExcRQB_t4m)); - assign_map.insert(std::make_pair(std::string("cim:ExcRQB.tc"), &assign_ExcRQB_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcRQB.te"), &assign_ExcRQB_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcRQB.tf"), &assign_ExcRQB_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcRQB.ucmax"), &assign_ExcRQB_ucmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcRQB.ucmin"), &assign_ExcRQB_ucmin)); + assign_map.emplace("cim:ExcRQB.ki0", &assign_ExcRQB_ki0); + assign_map.emplace("cim:ExcRQB.ki1", &assign_ExcRQB_ki1); + assign_map.emplace("cim:ExcRQB.klir", &assign_ExcRQB_klir); + assign_map.emplace("cim:ExcRQB.klus", &assign_ExcRQB_klus); + assign_map.emplace("cim:ExcRQB.lsat", &assign_ExcRQB_lsat); + assign_map.emplace("cim:ExcRQB.lus", &assign_ExcRQB_lus); + assign_map.emplace("cim:ExcRQB.mesu", &assign_ExcRQB_mesu); + assign_map.emplace("cim:ExcRQB.t4m", &assign_ExcRQB_t4m); + assign_map.emplace("cim:ExcRQB.tc", &assign_ExcRQB_tc); + assign_map.emplace("cim:ExcRQB.te", &assign_ExcRQB_te); + assign_map.emplace("cim:ExcRQB.tf", &assign_ExcRQB_tf); + assign_map.emplace("cim:ExcRQB.ucmax", &assign_ExcRQB_ucmax); + assign_map.emplace("cim:ExcRQB.ucmin", &assign_ExcRQB_ucmin); } void ExcRQB::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcRQB.hpp b/CGMES_3.0.0/ExcRQB.hpp index 37c444d2f..c0dd6a40e 100644 --- a/CGMES_3.0.0/ExcRQB.hpp +++ b/CGMES_3.0.0/ExcRQB.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Excitation system type RQB (four-loop regulator, r?gulateur quatre boucles, developed in France) primarily used in nuclear or thermal generating units. This excitation system shall be always used together with power system stabilizer type PssRQB. - */ + /** \brief Excitation system type RQB (four-loop regulator, r?gulateur quatre boucles, developed in France) primarily used in nuclear or thermal generating units. This excitation system shall be always used together with power system stabilizer type PssRQB. */ class ExcRQB : public ExcitationSystemDynamics { public: @@ -29,19 +27,44 @@ namespace CIMPP ExcRQB(); ~ExcRQB() override; - CIMPP::Float ki0; /* Voltage reference input gain (<i>Ki0</i>). Typical value = 12,7. Default: 0.0 */ - CIMPP::Float ki1; /* Voltage input gain (<i>Ki1</i>). Typical value = -16,8. Default: 0.0 */ - CIMPP::Float klir; /* OEL input gain (<i>KLIR</i>). Typical value = 12,13. Default: 0.0 */ - CIMPP::Float klus; /* Limiter gain (<i>KLUS</i>). Typical value = 50. Default: 0.0 */ - CIMPP::PU lsat; /* Integrator limiter (<i>LSAT</i>). Typical value = 5,73. Default: nullptr */ - CIMPP::PU lus; /* Setpoint (<i>LUS</i>). Typical value = 0,12. Default: nullptr */ - CIMPP::Seconds mesu; /* Voltage input time constant (<i>MESU</i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ - CIMPP::Seconds t4m; /* Input time constant (<i>T4M</i>) (&gt;= 0). Typical value = 5. Default: nullptr */ - CIMPP::Seconds tc; /* Lead lag time constant (<i>TC</i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ - CIMPP::Seconds te; /* Lead lag time constant (<i>TE</i>) (&gt;= 0). Typical value = 0,22. Default: nullptr */ - CIMPP::Seconds tf; /* Exciter time constant (<i>TF</i>) (&gt;= 0). Typical value = 0,01. Default: nullptr */ - CIMPP::PU ucmax; /* Maximum voltage reference limit (<i>UCMAX</i>) (&gt; ExcRQB.ucmin). Typical value = 1,1. Default: nullptr */ - CIMPP::PU ucmin; /* Minimum voltage reference limit (<i>UCMIN</i>) (&lt; ExcRQB.ucmax). Typical value = 0,9. Default: nullptr */ + /** \brief Voltage reference input gain (<i>Ki0</i>). Typical value = 12,7. Default: 0.0 */ + CIMPP::Float ki0; + + /** \brief Voltage input gain (<i>Ki1</i>). Typical value = -16,8. Default: 0.0 */ + CIMPP::Float ki1; + + /** \brief OEL input gain (<i>KLIR</i>). Typical value = 12,13. Default: 0.0 */ + CIMPP::Float klir; + + /** \brief Limiter gain (<i>KLUS</i>). Typical value = 50. Default: 0.0 */ + CIMPP::Float klus; + + /** \brief Integrator limiter (<i>LSAT</i>). Typical value = 5,73. Default: nullptr */ + CIMPP::PU lsat; + + /** \brief Setpoint (<i>LUS</i>). Typical value = 0,12. Default: nullptr */ + CIMPP::PU lus; + + /** \brief Voltage input time constant (<i>MESU</i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ + CIMPP::Seconds mesu; + + /** \brief Input time constant (<i>T4M</i>) (&gt;= 0). Typical value = 5. Default: nullptr */ + CIMPP::Seconds t4m; + + /** \brief Lead lag time constant (<i>TC</i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Lead lag time constant (<i>TE</i>) (&gt;= 0). Typical value = 0,22. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Exciter time constant (<i>TF</i>) (&gt;= 0). Typical value = 0,01. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage reference limit (<i>UCMAX</i>) (&gt; ExcRQB.ucmin). Typical value = 1,1. Default: nullptr */ + CIMPP::PU ucmax; + + /** \brief Minimum voltage reference limit (<i>UCMIN</i>) (&lt; ExcRQB.ucmax). Typical value = 0,9. Default: nullptr */ + CIMPP::PU ucmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcSCRX.cpp b/CGMES_3.0.0/ExcSCRX.cpp index dd778cecc..be7b304c3 100644 --- a/CGMES_3.0.0/ExcSCRX.cpp +++ b/CGMES_3.0.0/ExcSCRX.cpp @@ -8,19 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -ExcSCRX::ExcSCRX() {}; -ExcSCRX::~ExcSCRX() {}; +ExcSCRX::ExcSCRX() {} +ExcSCRX::~ExcSCRX() {} static const std::list PossibleProfilesForClass = { @@ -54,116 +46,122 @@ ExcSCRX::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcSCRX_cswitch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSCRX_cswitch(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->cswitch; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSCRX_emax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSCRX_emax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->emax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSCRX_emin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSCRX_emin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->emin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSCRX_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSCRX_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSCRX_rcrfd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSCRX_rcrfd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rcrfd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSCRX_tatb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSCRX_tatb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tatb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSCRX_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSCRX_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSCRX_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSCRX_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcSCRX_cswitch(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + const ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->cswitch; if (!buffer.str().empty()) @@ -177,7 +175,8 @@ bool get_ExcSCRX_cswitch(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_ExcSCRX_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + const ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->emax; if (!buffer.str().empty()) @@ -191,7 +190,8 @@ bool get_ExcSCRX_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcSCRX_emin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + const ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->emin; if (!buffer.str().empty()) @@ -205,7 +205,8 @@ bool get_ExcSCRX_emin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcSCRX_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + const ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -219,7 +220,8 @@ bool get_ExcSCRX_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSCRX_rcrfd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + const ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rcrfd; if (!buffer.str().empty()) @@ -233,7 +235,8 @@ bool get_ExcSCRX_rcrfd(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcSCRX_tatb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + const ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tatb; if (!buffer.str().empty()) @@ -247,7 +250,8 @@ bool get_ExcSCRX_tatb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcSCRX_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + const ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -261,7 +265,8 @@ bool get_ExcSCRX_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSCRX_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSCRX* element = dynamic_cast(BaseClass_ptr1)) + const ExcSCRX* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -273,8 +278,6 @@ bool get_ExcSCRX_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcSCRX::debugName[] = "ExcSCRX"; const char* ExcSCRX::debugString() const { @@ -283,19 +286,19 @@ const char* ExcSCRX::debugString() const void ExcSCRX::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcSCRX"), &ExcSCRX_factory)); + factory_map.emplace("cim:ExcSCRX", &ExcSCRX_factory); } void ExcSCRX::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcSCRX.cswitch"), &assign_ExcSCRX_cswitch)); - assign_map.insert(std::make_pair(std::string("cim:ExcSCRX.emax"), &assign_ExcSCRX_emax)); - assign_map.insert(std::make_pair(std::string("cim:ExcSCRX.emin"), &assign_ExcSCRX_emin)); - assign_map.insert(std::make_pair(std::string("cim:ExcSCRX.k"), &assign_ExcSCRX_k)); - assign_map.insert(std::make_pair(std::string("cim:ExcSCRX.rcrfd"), &assign_ExcSCRX_rcrfd)); - assign_map.insert(std::make_pair(std::string("cim:ExcSCRX.tatb"), &assign_ExcSCRX_tatb)); - assign_map.insert(std::make_pair(std::string("cim:ExcSCRX.tb"), &assign_ExcSCRX_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcSCRX.te"), &assign_ExcSCRX_te)); + assign_map.emplace("cim:ExcSCRX.cswitch", &assign_ExcSCRX_cswitch); + assign_map.emplace("cim:ExcSCRX.emax", &assign_ExcSCRX_emax); + assign_map.emplace("cim:ExcSCRX.emin", &assign_ExcSCRX_emin); + assign_map.emplace("cim:ExcSCRX.k", &assign_ExcSCRX_k); + assign_map.emplace("cim:ExcSCRX.rcrfd", &assign_ExcSCRX_rcrfd); + assign_map.emplace("cim:ExcSCRX.tatb", &assign_ExcSCRX_tatb); + assign_map.emplace("cim:ExcSCRX.tb", &assign_ExcSCRX_tb); + assign_map.emplace("cim:ExcSCRX.te", &assign_ExcSCRX_te); } void ExcSCRX::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcSCRX.hpp b/CGMES_3.0.0/ExcSCRX.hpp index 3f6a73820..dbfb6ec28 100644 --- a/CGMES_3.0.0/ExcSCRX.hpp +++ b/CGMES_3.0.0/ExcSCRX.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Simple excitation system with generic characteristics typical of many excitation systems; intended for use where negative field current could be a problem. - */ + /** \brief Simple excitation system with generic characteristics typical of many excitation systems; intended for use where negative field current could be a problem. */ class ExcSCRX : public ExcitationSystemDynamics { public: @@ -30,14 +28,29 @@ namespace CIMPP ExcSCRX(); ~ExcSCRX() override; - CIMPP::Boolean cswitch; /* Power source switch (<i>Cswitch</i>). true = fixed voltage of 1.0 PU false = generator terminal voltage. Default: false */ - CIMPP::PU emax; /* Maximum field voltage output (<i>Emax</i>) (&gt; ExcSCRX.emin). Typical value = 5. Default: nullptr */ - CIMPP::PU emin; /* Minimum field voltage output (<i>Emin</i>) (&lt; ExcSCRX.emax). Typical value = 0. Default: nullptr */ - CIMPP::PU k; /* Gain (<i>K</i>) (&gt; 0). Typical value = 200. Default: nullptr */ - CIMPP::Float rcrfd; /* Ratio of field discharge resistance to field winding resistance ([<i>rc / rfd]</i>). Typical value = 0. Default: 0.0 */ - CIMPP::Float tatb; /* Gain reduction ratio of lag-lead element ([<i>Ta</i> / <i>Tb</i>]). The parameter <i>Ta</i> is not defined explicitly. Typical value = 0.1. Default: 0.0 */ - CIMPP::Seconds tb; /* Denominator time constant of lag-lead block (<i>Tb</i>) (&gt;= 0). Typical value = 10. Default: nullptr */ - CIMPP::Seconds te; /* Time constant of gain block (<i>Te</i>) (&gt; 0). Typical value = 0,02. Default: nullptr */ + /** \brief Power source switch (<i>Cswitch</i>). true = fixed voltage of 1.0 PU false = generator terminal voltage. Default: false */ + CIMPP::Boolean cswitch; + + /** \brief Maximum field voltage output (<i>Emax</i>) (&gt; ExcSCRX.emin). Typical value = 5. Default: nullptr */ + CIMPP::PU emax; + + /** \brief Minimum field voltage output (<i>Emin</i>) (&lt; ExcSCRX.emax). Typical value = 0. Default: nullptr */ + CIMPP::PU emin; + + /** \brief Gain (<i>K</i>) (&gt; 0). Typical value = 200. Default: nullptr */ + CIMPP::PU k; + + /** \brief Ratio of field discharge resistance to field winding resistance ([<i>rc / rfd]</i>). Typical value = 0. Default: 0.0 */ + CIMPP::Float rcrfd; + + /** \brief Gain reduction ratio of lag-lead element ([<i>Ta</i> / <i>Tb</i>]). The parameter <i>Ta</i> is not defined explicitly. Typical value = 0.1. Default: 0.0 */ + CIMPP::Float tatb; + + /** \brief Denominator time constant of lag-lead block (<i>Tb</i>) (&gt;= 0). Typical value = 10. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Time constant of gain block (<i>Te</i>) (&gt; 0). Typical value = 0,02. Default: nullptr */ + CIMPP::Seconds te; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcSEXS.cpp b/CGMES_3.0.0/ExcSEXS.cpp index f84c0fe59..e78222ab6 100644 --- a/CGMES_3.0.0/ExcSEXS.cpp +++ b/CGMES_3.0.0/ExcSEXS.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -ExcSEXS::ExcSEXS() {}; -ExcSEXS::~ExcSEXS() {}; +ExcSEXS::ExcSEXS() {} +ExcSEXS::~ExcSEXS() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ ExcSEXS::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcSEXS_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_efdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSEXS_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_efdmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSEXS_emax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_emax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->emax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSEXS_emin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_emin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->emin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSEXS_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSEXS_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSEXS_tatb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_tatb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tatb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSEXS_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSEXS_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSEXS_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSEXS_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcSEXS_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmax; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_ExcSEXS_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcSEXS_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmin; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_ExcSEXS_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcSEXS_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->emax; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_ExcSEXS_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcSEXS_emin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->emin; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_ExcSEXS_emin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcSEXS_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_ExcSEXS_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSEXS_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_ExcSEXS_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSEXS_tatb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tatb; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_ExcSEXS_tatb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcSEXS_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_ExcSEXS_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSEXS_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_ExcSEXS_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSEXS_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSEXS* element = dynamic_cast(BaseClass_ptr1)) + const ExcSEXS* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_ExcSEXS_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcSEXS::debugName[] = "ExcSEXS"; const char* ExcSEXS::debugString() const { @@ -341,21 +346,21 @@ const char* ExcSEXS::debugString() const void ExcSEXS::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcSEXS"), &ExcSEXS_factory)); + factory_map.emplace("cim:ExcSEXS", &ExcSEXS_factory); } void ExcSEXS::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.efdmax"), &assign_ExcSEXS_efdmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.efdmin"), &assign_ExcSEXS_efdmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.emax"), &assign_ExcSEXS_emax)); - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.emin"), &assign_ExcSEXS_emin)); - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.k"), &assign_ExcSEXS_k)); - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.kc"), &assign_ExcSEXS_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.tatb"), &assign_ExcSEXS_tatb)); - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.tb"), &assign_ExcSEXS_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.tc"), &assign_ExcSEXS_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcSEXS.te"), &assign_ExcSEXS_te)); + assign_map.emplace("cim:ExcSEXS.efdmax", &assign_ExcSEXS_efdmax); + assign_map.emplace("cim:ExcSEXS.efdmin", &assign_ExcSEXS_efdmin); + assign_map.emplace("cim:ExcSEXS.emax", &assign_ExcSEXS_emax); + assign_map.emplace("cim:ExcSEXS.emin", &assign_ExcSEXS_emin); + assign_map.emplace("cim:ExcSEXS.k", &assign_ExcSEXS_k); + assign_map.emplace("cim:ExcSEXS.kc", &assign_ExcSEXS_kc); + assign_map.emplace("cim:ExcSEXS.tatb", &assign_ExcSEXS_tatb); + assign_map.emplace("cim:ExcSEXS.tb", &assign_ExcSEXS_tb); + assign_map.emplace("cim:ExcSEXS.tc", &assign_ExcSEXS_tc); + assign_map.emplace("cim:ExcSEXS.te", &assign_ExcSEXS_te); } void ExcSEXS::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcSEXS.hpp b/CGMES_3.0.0/ExcSEXS.hpp index d812dff4f..08ecbf452 100644 --- a/CGMES_3.0.0/ExcSEXS.hpp +++ b/CGMES_3.0.0/ExcSEXS.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Simplified excitation system. - */ + /** \brief Simplified excitation system. */ class ExcSEXS : public ExcitationSystemDynamics { public: @@ -29,16 +27,35 @@ namespace CIMPP ExcSEXS(); ~ExcSEXS() override; - CIMPP::PU efdmax; /* Field voltage clipping maximum limit (<i>Efdmax</i>) (&gt; ExcSEXS.efdmin). Typical value = 5. Default: nullptr */ - CIMPP::PU efdmin; /* Field voltage clipping minimum limit (<i>Efdmin</i>) (&lt; ExcSEXS.efdmax). Typical value = -5. Default: nullptr */ - CIMPP::PU emax; /* Maximum field voltage output (<i>Emax</i>) (&gt; ExcSEXS.emin). Typical value = 5. Default: nullptr */ - CIMPP::PU emin; /* Minimum field voltage output (<i>Emin</i>) (&lt; ExcSEXS.emax). Typical value = -5. Default: nullptr */ - CIMPP::PU k; /* Gain (<i>K</i>) (&gt; 0). Typical value = 100. Default: nullptr */ - CIMPP::PU kc; /* PI controller gain (<i>Kc</i>) (&gt; 0 if ExcSEXS.tc &gt; 0). Typical value = 0,08. Default: nullptr */ - CIMPP::Float tatb; /* Gain reduction ratio of lag-lead element (<i>[Ta / Tb]</i>). Typical value = 0,1. Default: 0.0 */ - CIMPP::Seconds tb; /* Denominator time constant of lag-lead block (<i>Tb</i>) (&gt;= 0). Typical value = 10. Default: nullptr */ - CIMPP::Seconds tc; /* PI controller phase lead time constant (<i>Tc</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Time constant of gain block (<i>Te</i>) (&gt; 0). Typical value = 0,05. Default: nullptr */ + /** \brief Field voltage clipping maximum limit (<i>Efdmax</i>) (&gt; ExcSEXS.efdmin). Typical value = 5. Default: nullptr */ + CIMPP::PU efdmax; + + /** \brief Field voltage clipping minimum limit (<i>Efdmin</i>) (&lt; ExcSEXS.efdmax). Typical value = -5. Default: nullptr */ + CIMPP::PU efdmin; + + /** \brief Maximum field voltage output (<i>Emax</i>) (&gt; ExcSEXS.emin). Typical value = 5. Default: nullptr */ + CIMPP::PU emax; + + /** \brief Minimum field voltage output (<i>Emin</i>) (&lt; ExcSEXS.emax). Typical value = -5. Default: nullptr */ + CIMPP::PU emin; + + /** \brief Gain (<i>K</i>) (&gt; 0). Typical value = 100. Default: nullptr */ + CIMPP::PU k; + + /** \brief PI controller gain (<i>Kc</i>) (&gt; 0 if ExcSEXS.tc &gt; 0). Typical value = 0,08. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Gain reduction ratio of lag-lead element (<i>[Ta / Tb]</i>). Typical value = 0,1. Default: 0.0 */ + CIMPP::Float tatb; + + /** \brief Denominator time constant of lag-lead block (<i>Tb</i>) (&gt;= 0). Typical value = 10. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief PI controller phase lead time constant (<i>Tc</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Time constant of gain block (<i>Te</i>) (&gt; 0). Typical value = 0,05. Default: nullptr */ + CIMPP::Seconds te; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcSK.cpp b/CGMES_3.0.0/ExcSK.cpp index cb3427545..0c8d97812 100644 --- a/CGMES_3.0.0/ExcSK.cpp +++ b/CGMES_3.0.0/ExcSK.cpp @@ -8,43 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "ApparentPower.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcSK::ExcSK() {}; -ExcSK::~ExcSK() {}; +ExcSK::ExcSK() {} +ExcSK::~ExcSK() {} static const std::list PossibleProfilesForClass = { @@ -102,428 +70,458 @@ ExcSK::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcSK_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_efdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_efdmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_efdmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_emax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_emax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->emax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_emin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_emin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->emin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_kce(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_kce(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kce; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_kgob(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_kgob(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kgob; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_kqi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_kqi(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kqi; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_kqob(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_kqob(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kqob; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_kqp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_kqp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kqp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_nq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_nq(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nq; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_qconoff(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_qconoff(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qconoff; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_qz(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_qz(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qz; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_remote(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_remote(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->remote; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_sbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_sbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->sbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_ti(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_ti(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_uimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_uimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_uimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_uimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_urmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_urmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->urmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_urmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_urmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->urmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_vtmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_vtmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vtmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_vtmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_vtmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vtmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcSK_yp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcSK_yp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcSK* element = dynamic_cast(BaseClass_ptr1)) + ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->yp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcSK_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmax; if (!buffer.str().empty()) @@ -537,7 +535,8 @@ bool get_ExcSK_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcSK_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmin; if (!buffer.str().empty()) @@ -551,7 +550,8 @@ bool get_ExcSK_efdmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcSK_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->emax; if (!buffer.str().empty()) @@ -565,7 +565,8 @@ bool get_ExcSK_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_emin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->emin; if (!buffer.str().empty()) @@ -579,7 +580,8 @@ bool get_ExcSK_emin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -593,7 +595,8 @@ bool get_ExcSK_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -607,7 +610,8 @@ bool get_ExcSK_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -621,7 +625,8 @@ bool get_ExcSK_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -635,7 +640,8 @@ bool get_ExcSK_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_kce(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kce; if (!buffer.str().empty()) @@ -649,7 +655,8 @@ bool get_ExcSK_kce(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -663,7 +670,8 @@ bool get_ExcSK_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_kgob(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kgob; if (!buffer.str().empty()) @@ -677,7 +685,8 @@ bool get_ExcSK_kgob(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -691,7 +700,8 @@ bool get_ExcSK_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_kqi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kqi; if (!buffer.str().empty()) @@ -705,7 +715,8 @@ bool get_ExcSK_kqi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_kqob(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kqob; if (!buffer.str().empty()) @@ -719,7 +730,8 @@ bool get_ExcSK_kqob(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_kqp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kqp; if (!buffer.str().empty()) @@ -733,7 +745,8 @@ bool get_ExcSK_kqp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_nq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nq; if (!buffer.str().empty()) @@ -747,7 +760,8 @@ bool get_ExcSK_nq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_qconoff(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qconoff; if (!buffer.str().empty()) @@ -761,7 +775,8 @@ bool get_ExcSK_qconoff(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcSK_qz(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qz; if (!buffer.str().empty()) @@ -775,7 +790,8 @@ bool get_ExcSK_qz(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_remote(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->remote; if (!buffer.str().empty()) @@ -789,7 +805,8 @@ bool get_ExcSK_remote(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_ExcSK_sbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->sbase; if (!buffer.str().empty()) @@ -803,7 +820,8 @@ bool get_ExcSK_sbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -817,7 +835,8 @@ bool get_ExcSK_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -831,7 +850,8 @@ bool get_ExcSK_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_ti(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti; if (!buffer.str().empty()) @@ -845,7 +865,8 @@ bool get_ExcSK_ti(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -859,7 +880,8 @@ bool get_ExcSK_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -873,7 +895,8 @@ bool get_ExcSK_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_uimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uimax; if (!buffer.str().empty()) @@ -887,7 +910,8 @@ bool get_ExcSK_uimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_uimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uimin; if (!buffer.str().empty()) @@ -901,7 +925,8 @@ bool get_ExcSK_uimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_urmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->urmax; if (!buffer.str().empty()) @@ -915,7 +940,8 @@ bool get_ExcSK_urmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_urmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->urmin; if (!buffer.str().empty()) @@ -929,7 +955,8 @@ bool get_ExcSK_urmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_vtmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vtmax; if (!buffer.str().empty()) @@ -943,7 +970,8 @@ bool get_ExcSK_vtmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_vtmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vtmin; if (!buffer.str().empty()) @@ -957,7 +985,8 @@ bool get_ExcSK_vtmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcSK_yp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcSK* element = dynamic_cast(BaseClass_ptr1)) + const ExcSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->yp; if (!buffer.str().empty()) @@ -969,8 +998,6 @@ bool get_ExcSK_yp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcSK::debugName[] = "ExcSK"; const char* ExcSK::debugString() const { @@ -979,43 +1006,43 @@ const char* ExcSK::debugString() const void ExcSK::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcSK"), &ExcSK_factory)); + factory_map.emplace("cim:ExcSK", &ExcSK_factory); } void ExcSK::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcSK.efdmax"), &assign_ExcSK_efdmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.efdmin"), &assign_ExcSK_efdmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.emax"), &assign_ExcSK_emax)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.emin"), &assign_ExcSK_emin)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.k"), &assign_ExcSK_k)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.k1"), &assign_ExcSK_k1)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.k2"), &assign_ExcSK_k2)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.kc"), &assign_ExcSK_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.kce"), &assign_ExcSK_kce)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.kd"), &assign_ExcSK_kd)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.kgob"), &assign_ExcSK_kgob)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.kp"), &assign_ExcSK_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.kqi"), &assign_ExcSK_kqi)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.kqob"), &assign_ExcSK_kqob)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.kqp"), &assign_ExcSK_kqp)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.nq"), &assign_ExcSK_nq)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.qconoff"), &assign_ExcSK_qconoff)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.qz"), &assign_ExcSK_qz)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.remote"), &assign_ExcSK_remote)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.sbase"), &assign_ExcSK_sbase)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.tc"), &assign_ExcSK_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.te"), &assign_ExcSK_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.ti"), &assign_ExcSK_ti)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.tp"), &assign_ExcSK_tp)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.tr"), &assign_ExcSK_tr)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.uimax"), &assign_ExcSK_uimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.uimin"), &assign_ExcSK_uimin)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.urmax"), &assign_ExcSK_urmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.urmin"), &assign_ExcSK_urmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.vtmax"), &assign_ExcSK_vtmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.vtmin"), &assign_ExcSK_vtmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcSK.yp"), &assign_ExcSK_yp)); + assign_map.emplace("cim:ExcSK.efdmax", &assign_ExcSK_efdmax); + assign_map.emplace("cim:ExcSK.efdmin", &assign_ExcSK_efdmin); + assign_map.emplace("cim:ExcSK.emax", &assign_ExcSK_emax); + assign_map.emplace("cim:ExcSK.emin", &assign_ExcSK_emin); + assign_map.emplace("cim:ExcSK.k", &assign_ExcSK_k); + assign_map.emplace("cim:ExcSK.k1", &assign_ExcSK_k1); + assign_map.emplace("cim:ExcSK.k2", &assign_ExcSK_k2); + assign_map.emplace("cim:ExcSK.kc", &assign_ExcSK_kc); + assign_map.emplace("cim:ExcSK.kce", &assign_ExcSK_kce); + assign_map.emplace("cim:ExcSK.kd", &assign_ExcSK_kd); + assign_map.emplace("cim:ExcSK.kgob", &assign_ExcSK_kgob); + assign_map.emplace("cim:ExcSK.kp", &assign_ExcSK_kp); + assign_map.emplace("cim:ExcSK.kqi", &assign_ExcSK_kqi); + assign_map.emplace("cim:ExcSK.kqob", &assign_ExcSK_kqob); + assign_map.emplace("cim:ExcSK.kqp", &assign_ExcSK_kqp); + assign_map.emplace("cim:ExcSK.nq", &assign_ExcSK_nq); + assign_map.emplace("cim:ExcSK.qconoff", &assign_ExcSK_qconoff); + assign_map.emplace("cim:ExcSK.qz", &assign_ExcSK_qz); + assign_map.emplace("cim:ExcSK.remote", &assign_ExcSK_remote); + assign_map.emplace("cim:ExcSK.sbase", &assign_ExcSK_sbase); + assign_map.emplace("cim:ExcSK.tc", &assign_ExcSK_tc); + assign_map.emplace("cim:ExcSK.te", &assign_ExcSK_te); + assign_map.emplace("cim:ExcSK.ti", &assign_ExcSK_ti); + assign_map.emplace("cim:ExcSK.tp", &assign_ExcSK_tp); + assign_map.emplace("cim:ExcSK.tr", &assign_ExcSK_tr); + assign_map.emplace("cim:ExcSK.uimax", &assign_ExcSK_uimax); + assign_map.emplace("cim:ExcSK.uimin", &assign_ExcSK_uimin); + assign_map.emplace("cim:ExcSK.urmax", &assign_ExcSK_urmax); + assign_map.emplace("cim:ExcSK.urmin", &assign_ExcSK_urmin); + assign_map.emplace("cim:ExcSK.vtmax", &assign_ExcSK_vtmax); + assign_map.emplace("cim:ExcSK.vtmin", &assign_ExcSK_vtmin); + assign_map.emplace("cim:ExcSK.yp", &assign_ExcSK_yp); } void ExcSK::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcSK.hpp b/CGMES_3.0.0/ExcSK.hpp index e0464733f..4a6b853d5 100644 --- a/CGMES_3.0.0/ExcSK.hpp +++ b/CGMES_3.0.0/ExcSK.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Slovakian excitation system. UEL and secondary voltage control are included in this model. When this model is used, there cannot be a separate underexcitation limiter or VAr controller model. - */ + /** \brief Slovakian excitation system. UEL and secondary voltage control are included in this model. When this model is used, there cannot be a separate underexcitation limiter or VAr controller model. */ class ExcSK : public ExcitationSystemDynamics { public: @@ -30,38 +28,101 @@ namespace CIMPP ExcSK(); ~ExcSK() override; - CIMPP::PU efdmax; /* Field voltage clipping upper level limit (<i>Efdmax</i>) (&gt; ExcSK.efdmin). Default: nullptr */ - CIMPP::PU efdmin; /* Field voltage clipping lower level limit (<i>Efdmin</i>) (&lt; ExcSK.efdmax). Default: nullptr */ - CIMPP::PU emax; /* Maximum field voltage output (<i>Emax</i>) (&gt; ExcSK.emin). Typical value = 20. Default: nullptr */ - CIMPP::PU emin; /* Minimum field voltage output (<i>Emin</i>) (&lt; ExcSK.emax). Typical value = -20. Default: nullptr */ - CIMPP::PU k; /* Gain (<i>K</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU k1; /* Parameter of underexcitation limit (<i>K1</i>). Typical value = 0,1364. Default: nullptr */ - CIMPP::PU k2; /* Parameter of underexcitation limit (<i>K2</i>). Typical value = -0,3861. Default: nullptr */ - CIMPP::PU kc; /* PI controller gain (<i>Kc</i>). Typical value = 70. Default: nullptr */ - CIMPP::PU kce; /* Rectifier regulation factor (<i>Kce</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU kd; /* Exciter internal reactance (<i>Kd</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU kgob; /* P controller gain (<i>Kgob</i>). Typical value = 10. Default: nullptr */ - CIMPP::PU kp; /* PI controller gain (<i>Kp</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU kqi; /* PI controller gain of integral component (<i>Kqi</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU kqob; /* Rate of rise of the reactive power (<i>Kqob</i>). Default: nullptr */ - CIMPP::PU kqp; /* PI controller gain (<i>Kqp</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU nq; /* Deadband of reactive power (<i>nq</i>). Determines the range of sensitivity. Typical value = 0,001. Default: nullptr */ - CIMPP::Boolean qconoff; /* Secondary voltage control state (<i>Qc_on_off</i>). true = secondary voltage control is on false = secondary voltage control is off. Typical value = false. Default: false */ - CIMPP::PU qz; /* Desired value (setpoint) of reactive power, manual setting (<i>Qz</i>). Default: nullptr */ - CIMPP::Boolean remote; /* Selector to apply automatic calculation in secondary controller model (<i>remote</i>). true = automatic calculation is activated false = manual set is active; the use of desired value of reactive power (<i>Qz</i>) is required. Typical value = true. Default: false */ - CIMPP::ApparentPower sbase; /* Apparent power of the unit (<i>Sbase</i>) (&gt; 0). Unit = MVA. Typical value = 259. Default: nullptr */ - CIMPP::Seconds tc; /* PI controller phase lead time constant (<i>Tc</i>) (&gt;= 0). Typical value = 8. Default: nullptr */ - CIMPP::Seconds te; /* Time constant of gain block (<i>Te</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds ti; /* PI controller phase lead time constant (<i>Ti</i>) (&gt;= 0). Typical value = 2. Default: nullptr */ - CIMPP::Seconds tp; /* Time constant (<i>Tp</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds tr; /* Voltage transducer time constant (<i>Tr</i>) (&gt;= 0). Typical value = 0,01. Default: nullptr */ - CIMPP::PU uimax; /* Maximum error (<i>UImax</i>) (&gt; ExcSK.uimin). Typical value = 10. Default: nullptr */ - CIMPP::PU uimin; /* Minimum error (<i>UImin</i>) (&lt; ExcSK.uimax). Typical value = -10. Default: nullptr */ - CIMPP::PU urmax; /* Maximum controller output (<i>URmax</i>) (&gt; ExcSK.urmin). Typical value = 10. Default: nullptr */ - CIMPP::PU urmin; /* Minimum controller output (<i>URmin</i>) (&lt; ExcSK.urmax). Typical value = -10. Default: nullptr */ - CIMPP::PU vtmax; /* Maximum terminal voltage input (<i>Vtmax</i>) (&gt; ExcSK.vtmin). Determines the range of voltage deadband. Typical value = 1,05. Default: nullptr */ - CIMPP::PU vtmin; /* Minimum terminal voltage input (<i>Vtmin</i>) (&lt; ExcSK.vtmax). Determines the range of voltage deadband. Typical value = 0,95. Default: nullptr */ - CIMPP::PU yp; /* Maximum output (<i>Yp</i>). Typical value = 1. Default: nullptr */ + /** \brief Field voltage clipping upper level limit (<i>Efdmax</i>) (&gt; ExcSK.efdmin). Default: nullptr */ + CIMPP::PU efdmax; + + /** \brief Field voltage clipping lower level limit (<i>Efdmin</i>) (&lt; ExcSK.efdmax). Default: nullptr */ + CIMPP::PU efdmin; + + /** \brief Maximum field voltage output (<i>Emax</i>) (&gt; ExcSK.emin). Typical value = 20. Default: nullptr */ + CIMPP::PU emax; + + /** \brief Minimum field voltage output (<i>Emin</i>) (&lt; ExcSK.emax). Typical value = -20. Default: nullptr */ + CIMPP::PU emin; + + /** \brief Gain (<i>K</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU k; + + /** \brief Parameter of underexcitation limit (<i>K1</i>). Typical value = 0,1364. Default: nullptr */ + CIMPP::PU k1; + + /** \brief Parameter of underexcitation limit (<i>K2</i>). Typical value = -0,3861. Default: nullptr */ + CIMPP::PU k2; + + /** \brief PI controller gain (<i>Kc</i>). Typical value = 70. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Rectifier regulation factor (<i>Kce</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU kce; + + /** \brief Exciter internal reactance (<i>Kd</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU kd; + + /** \brief P controller gain (<i>Kgob</i>). Typical value = 10. Default: nullptr */ + CIMPP::PU kgob; + + /** \brief PI controller gain (<i>Kp</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU kp; + + /** \brief PI controller gain of integral component (<i>Kqi</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU kqi; + + /** \brief Rate of rise of the reactive power (<i>Kqob</i>). Default: nullptr */ + CIMPP::PU kqob; + + /** \brief PI controller gain (<i>Kqp</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU kqp; + + /** \brief Deadband of reactive power (<i>nq</i>). Determines the range of sensitivity. Typical value = 0,001. Default: nullptr */ + CIMPP::PU nq; + + /** \brief Secondary voltage control state (<i>Qc_on_off</i>). true = secondary voltage control is on false = secondary voltage control is off. Typical value = false. Default: false */ + CIMPP::Boolean qconoff; + + /** \brief Desired value (setpoint) of reactive power, manual setting (<i>Qz</i>). Default: nullptr */ + CIMPP::PU qz; + + /** \brief Selector to apply automatic calculation in secondary controller model (<i>remote</i>). true = automatic calculation is activated false = manual set is active; the use of desired value of reactive power (<i>Qz</i>) is required. Typical value = true. Default: false */ + CIMPP::Boolean remote; + + /** \brief Apparent power of the unit (<i>Sbase</i>) (&gt; 0). Unit = MVA. Typical value = 259. Default: nullptr */ + CIMPP::ApparentPower sbase; + + /** \brief PI controller phase lead time constant (<i>Tc</i>) (&gt;= 0). Typical value = 8. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Time constant of gain block (<i>Te</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief PI controller phase lead time constant (<i>Ti</i>) (&gt;= 0). Typical value = 2. Default: nullptr */ + CIMPP::Seconds ti; + + /** \brief Time constant (<i>Tp</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Voltage transducer time constant (<i>Tr</i>) (&gt;= 0). Typical value = 0,01. Default: nullptr */ + CIMPP::Seconds tr; + + /** \brief Maximum error (<i>UImax</i>) (&gt; ExcSK.uimin). Typical value = 10. Default: nullptr */ + CIMPP::PU uimax; + + /** \brief Minimum error (<i>UImin</i>) (&lt; ExcSK.uimax). Typical value = -10. Default: nullptr */ + CIMPP::PU uimin; + + /** \brief Maximum controller output (<i>URmax</i>) (&gt; ExcSK.urmin). Typical value = 10. Default: nullptr */ + CIMPP::PU urmax; + + /** \brief Minimum controller output (<i>URmin</i>) (&lt; ExcSK.urmax). Typical value = -10. Default: nullptr */ + CIMPP::PU urmin; + + /** \brief Maximum terminal voltage input (<i>Vtmax</i>) (&gt; ExcSK.vtmin). Determines the range of voltage deadband. Typical value = 1,05. Default: nullptr */ + CIMPP::PU vtmax; + + /** \brief Minimum terminal voltage input (<i>Vtmin</i>) (&lt; ExcSK.vtmax). Determines the range of voltage deadband. Typical value = 0,95. Default: nullptr */ + CIMPP::PU vtmin; + + /** \brief Maximum output (<i>Yp</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU yp; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcST1A.cpp b/CGMES_3.0.0/ExcST1A.cpp index 882df3069..f96434060 100644 --- a/CGMES_3.0.0/ExcST1A.cpp +++ b/CGMES_3.0.0/ExcST1A.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcST1A::ExcST1A() {}; -ExcST1A::~ExcST1A() {}; +ExcST1A::ExcST1A() {} +ExcST1A::~ExcST1A() {} static const std::list PossibleProfilesForClass = { @@ -74,246 +56,262 @@ ExcST1A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcST1A_ilr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_ilr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ilr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_klr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_klr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->klr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_tb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_tb1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_tc1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_tc1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_vimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST1A_xe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST1A_xe(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xe; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcST1A_ilr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ilr; if (!buffer.str().empty()) @@ -327,7 +325,8 @@ bool get_ExcST1A_ilr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -341,7 +340,8 @@ bool get_ExcST1A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -355,7 +355,8 @@ bool get_ExcST1A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -369,7 +370,8 @@ bool get_ExcST1A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_klr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->klr; if (!buffer.str().empty()) @@ -383,7 +385,8 @@ bool get_ExcST1A_klr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -397,7 +400,8 @@ bool get_ExcST1A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -411,7 +415,8 @@ bool get_ExcST1A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb1; if (!buffer.str().empty()) @@ -425,7 +430,8 @@ bool get_ExcST1A_tb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -439,7 +445,8 @@ bool get_ExcST1A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_tc1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc1; if (!buffer.str().empty()) @@ -453,7 +460,8 @@ bool get_ExcST1A_tc1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -467,7 +475,8 @@ bool get_ExcST1A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST1A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -481,7 +490,8 @@ bool get_ExcST1A_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST1A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -495,7 +505,8 @@ bool get_ExcST1A_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST1A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -509,7 +520,8 @@ bool get_ExcST1A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST1A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimin; if (!buffer.str().empty()) @@ -523,7 +535,8 @@ bool get_ExcST1A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -537,7 +550,8 @@ bool get_ExcST1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -551,7 +565,8 @@ bool get_ExcST1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST1A_xe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST1A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xe; if (!buffer.str().empty()) @@ -563,8 +578,6 @@ bool get_ExcST1A_xe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcST1A::debugName[] = "ExcST1A"; const char* ExcST1A::debugString() const { @@ -573,29 +586,29 @@ const char* ExcST1A::debugString() const void ExcST1A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcST1A"), &ExcST1A_factory)); + factory_map.emplace("cim:ExcST1A", &ExcST1A_factory); } void ExcST1A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.ilr"), &assign_ExcST1A_ilr)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.ka"), &assign_ExcST1A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.kc"), &assign_ExcST1A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.kf"), &assign_ExcST1A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.klr"), &assign_ExcST1A_klr)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.ta"), &assign_ExcST1A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.tb"), &assign_ExcST1A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.tb1"), &assign_ExcST1A_tb1)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.tc"), &assign_ExcST1A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.tc1"), &assign_ExcST1A_tc1)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.tf"), &assign_ExcST1A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.vamax"), &assign_ExcST1A_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.vamin"), &assign_ExcST1A_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.vimax"), &assign_ExcST1A_vimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.vimin"), &assign_ExcST1A_vimin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.vrmax"), &assign_ExcST1A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.vrmin"), &assign_ExcST1A_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST1A.xe"), &assign_ExcST1A_xe)); + assign_map.emplace("cim:ExcST1A.ilr", &assign_ExcST1A_ilr); + assign_map.emplace("cim:ExcST1A.ka", &assign_ExcST1A_ka); + assign_map.emplace("cim:ExcST1A.kc", &assign_ExcST1A_kc); + assign_map.emplace("cim:ExcST1A.kf", &assign_ExcST1A_kf); + assign_map.emplace("cim:ExcST1A.klr", &assign_ExcST1A_klr); + assign_map.emplace("cim:ExcST1A.ta", &assign_ExcST1A_ta); + assign_map.emplace("cim:ExcST1A.tb", &assign_ExcST1A_tb); + assign_map.emplace("cim:ExcST1A.tb1", &assign_ExcST1A_tb1); + assign_map.emplace("cim:ExcST1A.tc", &assign_ExcST1A_tc); + assign_map.emplace("cim:ExcST1A.tc1", &assign_ExcST1A_tc1); + assign_map.emplace("cim:ExcST1A.tf", &assign_ExcST1A_tf); + assign_map.emplace("cim:ExcST1A.vamax", &assign_ExcST1A_vamax); + assign_map.emplace("cim:ExcST1A.vamin", &assign_ExcST1A_vamin); + assign_map.emplace("cim:ExcST1A.vimax", &assign_ExcST1A_vimax); + assign_map.emplace("cim:ExcST1A.vimin", &assign_ExcST1A_vimin); + assign_map.emplace("cim:ExcST1A.vrmax", &assign_ExcST1A_vrmax); + assign_map.emplace("cim:ExcST1A.vrmin", &assign_ExcST1A_vrmin); + assign_map.emplace("cim:ExcST1A.xe", &assign_ExcST1A_xe); } void ExcST1A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcST1A.hpp b/CGMES_3.0.0/ExcST1A.hpp index 3483ce401..32b198e28 100644 --- a/CGMES_3.0.0/ExcST1A.hpp +++ b/CGMES_3.0.0/ExcST1A.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modification of an old IEEE ST1A static excitation system without overexcitation limiter (OEL) and underexcitation limiter (UEL). - */ + /** \brief Modification of an old IEEE ST1A static excitation system without overexcitation limiter (OEL) and underexcitation limiter (UEL). */ class ExcST1A : public ExcitationSystemDynamics { public: @@ -28,24 +26,59 @@ namespace CIMPP ExcST1A(); ~ExcST1A() override; - CIMPP::PU ilr; /* Exciter output current limit reference (<i>Ilr</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU ka; /* Voltage regulator gain (<i>Ka</i>) (&gt; 0). Typical value = 190. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (<i>Kc</i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (<i>Kf</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::PU klr; /* Exciter output current limiter gain (<i>Klr</i>). Typical value = 0. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (<i>Ta</i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (<i>Tb</i>) (&gt;= 0). Typical value = 10. Default: nullptr */ - CIMPP::Seconds tb1; /* Voltage regulator time constant (<i>Tb1</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (<i>Tc</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::Seconds tc1; /* Voltage regulator time constant (<i>Tc1</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (<i>Tf</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (<i>Vamax</i>) (&gt; 0). Typical value = 999. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (<i>Vamin</i>) (&lt; 0). Typical value = -999. Default: nullptr */ - CIMPP::PU vimax; /* Maximum voltage regulator input limit (<i>Vimax</i>) (&gt; 0). Typical value = 999. Default: nullptr */ - CIMPP::PU vimin; /* Minimum voltage regulator input limit (<i>Vimin</i>) (&lt; 0). Typical value = -999. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator outputs (<i>Vrmax</i>) (&gt; 0) . Typical value = 7,8. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator outputs (<i>Vrmin</i>) (&lt; 0). Typical value = -6,7. Default: nullptr */ - CIMPP::PU xe; /* Excitation xfmr effective reactance (<i>Xe</i>). Typical value = 0,04. Default: nullptr */ + /** \brief Exciter output current limit reference (<i>Ilr</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU ilr; + + /** \brief Voltage regulator gain (<i>Ka</i>) (&gt; 0). Typical value = 190. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (<i>Kc</i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Excitation control system stabilizer gains (<i>Kf</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Exciter output current limiter gain (<i>Klr</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU klr; + + /** \brief Voltage regulator time constant (<i>Ta</i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (<i>Tb</i>) (&gt;= 0). Typical value = 10. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (<i>Tb1</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tb1; + + /** \brief Voltage regulator time constant (<i>Tc</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Voltage regulator time constant (<i>Tc1</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tc1; + + /** \brief Excitation control system stabilizer time constant (<i>Tf</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum voltage regulator output (<i>Vamax</i>) (&gt; 0). Typical value = 999. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (<i>Vamin</i>) (&lt; 0). Typical value = -999. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Maximum voltage regulator input limit (<i>Vimax</i>) (&gt; 0). Typical value = 999. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Minimum voltage regulator input limit (<i>Vimin</i>) (&lt; 0). Typical value = -999. Default: nullptr */ + CIMPP::PU vimin; + + /** \brief Maximum voltage regulator outputs (<i>Vrmax</i>) (&gt; 0) . Typical value = 7,8. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator outputs (<i>Vrmin</i>) (&lt; 0). Typical value = -6,7. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief Excitation xfmr effective reactance (<i>Xe</i>). Typical value = 0,04. Default: nullptr */ + CIMPP::PU xe; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcST2A.cpp b/CGMES_3.0.0/ExcST2A.cpp index c9808278a..afa9e20ff 100644 --- a/CGMES_3.0.0/ExcST2A.cpp +++ b/CGMES_3.0.0/ExcST2A.cpp @@ -8,26 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcST2A::ExcST2A() {}; -ExcST2A::~ExcST2A() {}; +ExcST2A::ExcST2A() {} +ExcST2A::~ExcST2A() {} static const std::list PossibleProfilesForClass = { @@ -68,207 +53,220 @@ ExcST2A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcST2A_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_efdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_uelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST2A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST2A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcST2A_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmax; if (!buffer.str().empty()) @@ -282,7 +280,8 @@ bool get_ExcST2A_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcST2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -296,7 +295,8 @@ bool get_ExcST2A_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -310,7 +310,8 @@ bool get_ExcST2A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -324,7 +325,8 @@ bool get_ExcST2A_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -338,7 +340,8 @@ bool get_ExcST2A_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -352,7 +355,8 @@ bool get_ExcST2A_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -366,7 +370,8 @@ bool get_ExcST2A_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -380,7 +385,8 @@ bool get_ExcST2A_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -394,7 +400,8 @@ bool get_ExcST2A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -408,7 +415,8 @@ bool get_ExcST2A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -422,7 +430,8 @@ bool get_ExcST2A_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -436,7 +445,8 @@ bool get_ExcST2A_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST2A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uelin; if (!buffer.str().empty()) @@ -450,7 +460,8 @@ bool get_ExcST2A_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -464,7 +475,8 @@ bool get_ExcST2A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST2A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -476,8 +488,6 @@ bool get_ExcST2A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char ExcST2A::debugName[] = "ExcST2A"; const char* ExcST2A::debugString() const { @@ -486,26 +496,26 @@ const char* ExcST2A::debugString() const void ExcST2A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcST2A"), &ExcST2A_factory)); + factory_map.emplace("cim:ExcST2A", &ExcST2A_factory); } void ExcST2A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.efdmax"), &assign_ExcST2A_efdmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.ka"), &assign_ExcST2A_ka)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.kc"), &assign_ExcST2A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.ke"), &assign_ExcST2A_ke)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.kf"), &assign_ExcST2A_kf)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.ki"), &assign_ExcST2A_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.kp"), &assign_ExcST2A_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.ta"), &assign_ExcST2A_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.tb"), &assign_ExcST2A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.tc"), &assign_ExcST2A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.te"), &assign_ExcST2A_te)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.tf"), &assign_ExcST2A_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.uelin"), &assign_ExcST2A_uelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.vrmax"), &assign_ExcST2A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST2A.vrmin"), &assign_ExcST2A_vrmin)); + assign_map.emplace("cim:ExcST2A.efdmax", &assign_ExcST2A_efdmax); + assign_map.emplace("cim:ExcST2A.ka", &assign_ExcST2A_ka); + assign_map.emplace("cim:ExcST2A.kc", &assign_ExcST2A_kc); + assign_map.emplace("cim:ExcST2A.ke", &assign_ExcST2A_ke); + assign_map.emplace("cim:ExcST2A.kf", &assign_ExcST2A_kf); + assign_map.emplace("cim:ExcST2A.ki", &assign_ExcST2A_ki); + assign_map.emplace("cim:ExcST2A.kp", &assign_ExcST2A_kp); + assign_map.emplace("cim:ExcST2A.ta", &assign_ExcST2A_ta); + assign_map.emplace("cim:ExcST2A.tb", &assign_ExcST2A_tb); + assign_map.emplace("cim:ExcST2A.tc", &assign_ExcST2A_tc); + assign_map.emplace("cim:ExcST2A.te", &assign_ExcST2A_te); + assign_map.emplace("cim:ExcST2A.tf", &assign_ExcST2A_tf); + assign_map.emplace("cim:ExcST2A.uelin", &assign_ExcST2A_uelin); + assign_map.emplace("cim:ExcST2A.vrmax", &assign_ExcST2A_vrmax); + assign_map.emplace("cim:ExcST2A.vrmin", &assign_ExcST2A_vrmin); } void ExcST2A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcST2A.hpp b/CGMES_3.0.0/ExcST2A.hpp index 89e1eff64..7492b5d9d 100644 --- a/CGMES_3.0.0/ExcST2A.hpp +++ b/CGMES_3.0.0/ExcST2A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE ST2A static excitation system with another lead-lag block added to match the model defined by WECC. - */ + /** \brief Modified IEEE ST2A static excitation system with another lead-lag block added to match the model defined by WECC. */ class ExcST2A : public ExcitationSystemDynamics { public: @@ -29,21 +27,50 @@ namespace CIMPP ExcST2A(); ~ExcST2A() override; - CIMPP::PU efdmax; /* Maximum field voltage (<i>Efdmax</i>) (&gt;= 0). Typical value = 99. Default: nullptr */ - CIMPP::PU ka; /* Voltage regulator gain (<i>Ka</i>) (&gt; 0). Typical value = 120. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (<i>Kc</i>) (&gt;= 0). Typical value = 1,82. Default: nullptr */ - CIMPP::PU ke; /* Exciter constant related to self-excited field (<i>Ke</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU kf; /* Excitation control system stabilizer gains (<i>kf</i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ - CIMPP::PU ki; /* Potential circuit gain coefficient (<i>K</i><i><sub>i</sub></i>) (&gt;= 0). Typical value = 8. Default: nullptr */ - CIMPP::PU kp; /* Potential circuit gain coefficient (<i>K</i><i><sub>p</sub></i>) (&gt;= 0). Typical value = 4,88. Default: nullptr */ - CIMPP::Seconds ta; /* Voltage regulator time constant (<i>Ta</i>) (&gt; 0). Typical value = 0,15. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (<i>Tb</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (<i>Tc</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds te; /* Exciter time constant, integration rate associated with exciter control (<i>Te</i>) (&gt; 0). Typical value = 0,5. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (<i>Tf</i>) (&gt;= 0). Typical value = 0,7. Default: nullptr */ - CIMPP::Boolean uelin; /* UEL input (<i>UELin</i>). true = HV gate false = add to error signal. Typical value = false. Default: false */ - CIMPP::PU vrmax; /* Maximum voltage regulator outputs (<i>Vrmax</i>) (&gt; 0). Typical value = 1. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator outputs (<i>Vrmin</i>) (&lt; 0). Typical value = -1. Default: nullptr */ + /** \brief Maximum field voltage (<i>Efdmax</i>) (&gt;= 0). Typical value = 99. Default: nullptr */ + CIMPP::PU efdmax; + + /** \brief Voltage regulator gain (<i>Ka</i>) (&gt; 0). Typical value = 120. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Rectifier loading factor proportional to commutating reactance (<i>Kc</i>) (&gt;= 0). Typical value = 1,82. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Exciter constant related to self-excited field (<i>Ke</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Excitation control system stabilizer gains (<i>kf</i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ + CIMPP::PU kf; + + /** \brief Potential circuit gain coefficient (<i>K</i><i><sub>i</sub></i>) (&gt;= 0). Typical value = 8. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Potential circuit gain coefficient (<i>K</i><i><sub>p</sub></i>) (&gt;= 0). Typical value = 4,88. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Voltage regulator time constant (<i>Ta</i>) (&gt; 0). Typical value = 0,15. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Voltage regulator time constant (<i>Tb</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (<i>Tc</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Exciter time constant, integration rate associated with exciter control (<i>Te</i>) (&gt; 0). Typical value = 0,5. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Excitation control system stabilizer time constant (<i>Tf</i>) (&gt;= 0). Typical value = 0,7. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief UEL input (<i>UELin</i>). true = HV gate false = add to error signal. Typical value = false. Default: false */ + CIMPP::Boolean uelin; + + /** \brief Maximum voltage regulator outputs (<i>Vrmax</i>) (&gt; 0). Typical value = 1. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator outputs (<i>Vrmin</i>) (&lt; 0). Typical value = -1. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcST3A.cpp b/CGMES_3.0.0/ExcST3A.cpp index 1ecf6df79..e31c2b37c 100644 --- a/CGMES_3.0.0/ExcST3A.cpp +++ b/CGMES_3.0.0/ExcST3A.cpp @@ -8,31 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "AngleDegrees.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcST3A::ExcST3A() {}; -ExcST3A::~ExcST3A() {}; +ExcST3A::ExcST3A() {} +ExcST3A::~ExcST3A() {} static const std::list PossibleProfilesForClass = { @@ -78,272 +58,290 @@ ExcST3A::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcST3A_efdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_efdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_kj(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_kj(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kj; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_km(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_km(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->km; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_ks1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_ks1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_thetap(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_thetap(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->thetap; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_tm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_tm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_vbmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_vbmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vbmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_vgmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_vgmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vgmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_vimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST3A_xl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST3A_xl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcST3A_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdmax; if (!buffer.str().empty()) @@ -357,7 +355,8 @@ bool get_ExcST3A_efdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcST3A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -371,7 +370,8 @@ bool get_ExcST3A_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -385,7 +385,8 @@ bool get_ExcST3A_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -399,7 +400,8 @@ bool get_ExcST3A_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_kj(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kj; if (!buffer.str().empty()) @@ -413,7 +415,8 @@ bool get_ExcST3A_kj(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_km(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->km; if (!buffer.str().empty()) @@ -427,7 +430,8 @@ bool get_ExcST3A_km(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -441,7 +445,8 @@ bool get_ExcST3A_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -455,7 +460,8 @@ bool get_ExcST3A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks1; if (!buffer.str().empty()) @@ -469,7 +475,8 @@ bool get_ExcST3A_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -483,7 +490,8 @@ bool get_ExcST3A_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -497,7 +505,8 @@ bool get_ExcST3A_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_thetap(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thetap; if (!buffer.str().empty()) @@ -511,7 +520,8 @@ bool get_ExcST3A_thetap(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcST3A_tm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tm; if (!buffer.str().empty()) @@ -525,7 +535,8 @@ bool get_ExcST3A_tm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST3A_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vbmax; if (!buffer.str().empty()) @@ -539,7 +550,8 @@ bool get_ExcST3A_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST3A_vgmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vgmax; if (!buffer.str().empty()) @@ -553,7 +565,8 @@ bool get_ExcST3A_vgmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST3A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -567,7 +580,8 @@ bool get_ExcST3A_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST3A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimin; if (!buffer.str().empty()) @@ -581,7 +595,8 @@ bool get_ExcST3A_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST3A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -595,7 +610,8 @@ bool get_ExcST3A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST3A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -609,7 +625,8 @@ bool get_ExcST3A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST3A_xl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST3A* element = dynamic_cast(BaseClass_ptr1)) + const ExcST3A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xl; if (!buffer.str().empty()) @@ -621,8 +638,6 @@ bool get_ExcST3A_xl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcST3A::debugName[] = "ExcST3A"; const char* ExcST3A::debugString() const { @@ -631,31 +646,31 @@ const char* ExcST3A::debugString() const void ExcST3A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcST3A"), &ExcST3A_factory)); + factory_map.emplace("cim:ExcST3A", &ExcST3A_factory); } void ExcST3A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.efdmax"), &assign_ExcST3A_efdmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.kc"), &assign_ExcST3A_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.kg"), &assign_ExcST3A_kg)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.ki"), &assign_ExcST3A_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.kj"), &assign_ExcST3A_kj)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.km"), &assign_ExcST3A_km)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.kp"), &assign_ExcST3A_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.ks"), &assign_ExcST3A_ks)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.ks1"), &assign_ExcST3A_ks1)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.tb"), &assign_ExcST3A_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.tc"), &assign_ExcST3A_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.thetap"), &assign_ExcST3A_thetap)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.tm"), &assign_ExcST3A_tm)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.vbmax"), &assign_ExcST3A_vbmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.vgmax"), &assign_ExcST3A_vgmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.vimax"), &assign_ExcST3A_vimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.vimin"), &assign_ExcST3A_vimin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.vrmax"), &assign_ExcST3A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.vrmin"), &assign_ExcST3A_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST3A.xl"), &assign_ExcST3A_xl)); + assign_map.emplace("cim:ExcST3A.efdmax", &assign_ExcST3A_efdmax); + assign_map.emplace("cim:ExcST3A.kc", &assign_ExcST3A_kc); + assign_map.emplace("cim:ExcST3A.kg", &assign_ExcST3A_kg); + assign_map.emplace("cim:ExcST3A.ki", &assign_ExcST3A_ki); + assign_map.emplace("cim:ExcST3A.kj", &assign_ExcST3A_kj); + assign_map.emplace("cim:ExcST3A.km", &assign_ExcST3A_km); + assign_map.emplace("cim:ExcST3A.kp", &assign_ExcST3A_kp); + assign_map.emplace("cim:ExcST3A.ks", &assign_ExcST3A_ks); + assign_map.emplace("cim:ExcST3A.ks1", &assign_ExcST3A_ks1); + assign_map.emplace("cim:ExcST3A.tb", &assign_ExcST3A_tb); + assign_map.emplace("cim:ExcST3A.tc", &assign_ExcST3A_tc); + assign_map.emplace("cim:ExcST3A.thetap", &assign_ExcST3A_thetap); + assign_map.emplace("cim:ExcST3A.tm", &assign_ExcST3A_tm); + assign_map.emplace("cim:ExcST3A.vbmax", &assign_ExcST3A_vbmax); + assign_map.emplace("cim:ExcST3A.vgmax", &assign_ExcST3A_vgmax); + assign_map.emplace("cim:ExcST3A.vimax", &assign_ExcST3A_vimax); + assign_map.emplace("cim:ExcST3A.vimin", &assign_ExcST3A_vimin); + assign_map.emplace("cim:ExcST3A.vrmax", &assign_ExcST3A_vrmax); + assign_map.emplace("cim:ExcST3A.vrmin", &assign_ExcST3A_vrmin); + assign_map.emplace("cim:ExcST3A.xl", &assign_ExcST3A_xl); } void ExcST3A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcST3A.hpp b/CGMES_3.0.0/ExcST3A.hpp index 4df71672c..85f5055f1 100644 --- a/CGMES_3.0.0/ExcST3A.hpp +++ b/CGMES_3.0.0/ExcST3A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE ST3A static excitation system with added speed multiplier. - */ + /** \brief Modified IEEE ST3A static excitation system with added speed multiplier. */ class ExcST3A : public ExcitationSystemDynamics { public: @@ -29,26 +27,65 @@ namespace CIMPP ExcST3A(); ~ExcST3A() override; - CIMPP::PU efdmax; /* Maximum AVR output (<i>Efdmax</i>) (&gt;= 0). Typical value = 6,9. Default: nullptr */ - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (<i>Kc</i>) (&gt;= 0). Typical value = 1,1. Default: nullptr */ - CIMPP::PU kg; /* Feedback gain constant of the inner loop field regulator (<i>Kg</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::PU ki; /* Potential circuit gain coefficient (<i>K</i><i><sub>i</sub></i>) (&gt;= 0). Typical value = 4,83. Default: nullptr */ - CIMPP::PU kj; /* AVR gain (<i>Kj</i>) (&gt; 0). Typical value = 200. Default: nullptr */ - CIMPP::PU km; /* Forward gain constant of the inner loop field regulator (<i>Km</i>) (&gt; 0). Typical value = 7,04. Default: nullptr */ - CIMPP::PU kp; /* Potential source gain (<i>K</i><i><sub>p</sub></i>) (&gt; 0). Typical value = 4,37. Default: nullptr */ - CIMPP::PU ks; /* Coefficient to allow different usage of the model-speed coefficient (<i>Ks</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU ks1; /* Coefficient to allow different usage of the model-speed coefficient (<i>Ks1</i>). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tb; /* Voltage regulator time constant (<i>Tb</i>) (&gt;= 0). Typical value = 6,67. Default: nullptr */ - CIMPP::Seconds tc; /* Voltage regulator time constant (<i>Tc</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::AngleDegrees thetap; /* Potential circuit phase angle (<i>theta</i><i><sub>p</sub></i>). Typical value = 20. Default: nullptr */ - CIMPP::Seconds tm; /* Forward time constant of inner loop field regulator (<i>Tm</i>) (&gt; 0). Typical value = 1. Default: nullptr */ - CIMPP::PU vbmax; /* Maximum excitation voltage (<i>Vbmax</i>) (&gt; 0). Typical value = 8,63. Default: nullptr */ - CIMPP::PU vgmax; /* Maximum inner loop feedback voltage (<i>Vgmax</i>) (&gt;= 0). Typical value = 6,53. Default: nullptr */ - CIMPP::PU vimax; /* Maximum voltage regulator input limit (<i>Vimax</i>) (&gt; 0). Typical value = 0,2. Default: nullptr */ - CIMPP::PU vimin; /* Minimum voltage regulator input limit (<i>Vimin</i>) (&lt; 0). Typical value = -0,2. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (<i>Vrmax</i>) (&gt; 0). Typical value = 1. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (<i>Vrmin</i>) (&lt; 0). Typical value = -1. Default: nullptr */ - CIMPP::PU xl; /* Reactance associated with potential source (<i>Xl</i>) (&gt;= 0). Typical value = 0,09. Default: nullptr */ + /** \brief Maximum AVR output (<i>Efdmax</i>) (&gt;= 0). Typical value = 6,9. Default: nullptr */ + CIMPP::PU efdmax; + + /** \brief Rectifier loading factor proportional to commutating reactance (<i>Kc</i>) (&gt;= 0). Typical value = 1,1. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Feedback gain constant of the inner loop field regulator (<i>Kg</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Potential circuit gain coefficient (<i>K</i><i><sub>i</sub></i>) (&gt;= 0). Typical value = 4,83. Default: nullptr */ + CIMPP::PU ki; + + /** \brief AVR gain (<i>Kj</i>) (&gt; 0). Typical value = 200. Default: nullptr */ + CIMPP::PU kj; + + /** \brief Forward gain constant of the inner loop field regulator (<i>Km</i>) (&gt; 0). Typical value = 7,04. Default: nullptr */ + CIMPP::PU km; + + /** \brief Potential source gain (<i>K</i><i><sub>p</sub></i>) (&gt; 0). Typical value = 4,37. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (<i>Ks</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Coefficient to allow different usage of the model-speed coefficient (<i>Ks1</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU ks1; + + /** \brief Voltage regulator time constant (<i>Tb</i>) (&gt;= 0). Typical value = 6,67. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Voltage regulator time constant (<i>Tc</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Potential circuit phase angle (<i>theta</i><i><sub>p</sub></i>). Typical value = 20. Default: nullptr */ + CIMPP::AngleDegrees thetap; + + /** \brief Forward time constant of inner loop field regulator (<i>Tm</i>) (&gt; 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tm; + + /** \brief Maximum excitation voltage (<i>Vbmax</i>) (&gt; 0). Typical value = 8,63. Default: nullptr */ + CIMPP::PU vbmax; + + /** \brief Maximum inner loop feedback voltage (<i>Vgmax</i>) (&gt;= 0). Typical value = 6,53. Default: nullptr */ + CIMPP::PU vgmax; + + /** \brief Maximum voltage regulator input limit (<i>Vimax</i>) (&gt; 0). Typical value = 0,2. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Minimum voltage regulator input limit (<i>Vimin</i>) (&lt; 0). Typical value = -0,2. Default: nullptr */ + CIMPP::PU vimin; + + /** \brief Maximum voltage regulator output (<i>Vrmax</i>) (&gt; 0). Typical value = 1. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (<i>Vrmin</i>) (&lt; 0). Typical value = -1. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief Reactance associated with potential source (<i>Xl</i>) (&gt;= 0). Typical value = 0,09. Default: nullptr */ + CIMPP::PU xl; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcST4B.cpp b/CGMES_3.0.0/ExcST4B.cpp index ecb63b6d4..b09570552 100644 --- a/CGMES_3.0.0/ExcST4B.cpp +++ b/CGMES_3.0.0/ExcST4B.cpp @@ -8,30 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "AngleDegrees.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcST4B::ExcST4B() {}; -ExcST4B::~ExcST4B() {}; +ExcST4B::ExcST4B() {} +ExcST4B::~ExcST4B() {} static const std::list PossibleProfilesForClass = { @@ -76,259 +57,276 @@ ExcST4B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcST4B_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_kim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_kim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_kir(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_kir(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kir; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_kpm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_kpm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_kpr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_kpr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_lvgate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_lvgate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lvgate; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_thetap(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_thetap(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->thetap; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_uel(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_uel(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uel; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_vbmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_vbmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vbmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_vgmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_vgmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vgmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_vmmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_vmmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_vmmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_vmmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST4B_xl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST4B_xl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcST4B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -342,7 +340,8 @@ bool get_ExcST4B_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -356,7 +355,8 @@ bool get_ExcST4B_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -370,7 +370,8 @@ bool get_ExcST4B_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_kim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kim; if (!buffer.str().empty()) @@ -384,7 +385,8 @@ bool get_ExcST4B_kim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kir; if (!buffer.str().empty()) @@ -398,7 +400,8 @@ bool get_ExcST4B_kir(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -412,7 +415,8 @@ bool get_ExcST4B_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_kpm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpm; if (!buffer.str().empty()) @@ -426,7 +430,8 @@ bool get_ExcST4B_kpm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpr; if (!buffer.str().empty()) @@ -440,7 +445,8 @@ bool get_ExcST4B_kpr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_lvgate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lvgate; if (!buffer.str().empty()) @@ -454,7 +460,8 @@ bool get_ExcST4B_lvgate(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcST4B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -468,7 +475,8 @@ bool get_ExcST4B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_thetap(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thetap; if (!buffer.str().empty()) @@ -482,7 +490,8 @@ bool get_ExcST4B_thetap(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_ExcST4B_uel(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uel; if (!buffer.str().empty()) @@ -496,7 +505,8 @@ bool get_ExcST4B_uel(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST4B_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vbmax; if (!buffer.str().empty()) @@ -510,7 +520,8 @@ bool get_ExcST4B_vbmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST4B_vgmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vgmax; if (!buffer.str().empty()) @@ -524,7 +535,8 @@ bool get_ExcST4B_vgmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST4B_vmmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmmax; if (!buffer.str().empty()) @@ -538,7 +550,8 @@ bool get_ExcST4B_vmmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST4B_vmmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmmin; if (!buffer.str().empty()) @@ -552,7 +565,8 @@ bool get_ExcST4B_vmmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST4B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -566,7 +580,8 @@ bool get_ExcST4B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST4B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -580,7 +595,8 @@ bool get_ExcST4B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST4B_xl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST4B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xl; if (!buffer.str().empty()) @@ -592,8 +608,6 @@ bool get_ExcST4B_xl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char ExcST4B::debugName[] = "ExcST4B"; const char* ExcST4B::debugString() const { @@ -602,30 +616,30 @@ const char* ExcST4B::debugString() const void ExcST4B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcST4B"), &ExcST4B_factory)); + factory_map.emplace("cim:ExcST4B", &ExcST4B_factory); } void ExcST4B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.kc"), &assign_ExcST4B_kc)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.kg"), &assign_ExcST4B_kg)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.ki"), &assign_ExcST4B_ki)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.kim"), &assign_ExcST4B_kim)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.kir"), &assign_ExcST4B_kir)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.kp"), &assign_ExcST4B_kp)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.kpm"), &assign_ExcST4B_kpm)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.kpr"), &assign_ExcST4B_kpr)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.lvgate"), &assign_ExcST4B_lvgate)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.ta"), &assign_ExcST4B_ta)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.thetap"), &assign_ExcST4B_thetap)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.uel"), &assign_ExcST4B_uel)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.vbmax"), &assign_ExcST4B_vbmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.vgmax"), &assign_ExcST4B_vgmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.vmmax"), &assign_ExcST4B_vmmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.vmmin"), &assign_ExcST4B_vmmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.vrmax"), &assign_ExcST4B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.vrmin"), &assign_ExcST4B_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST4B.xl"), &assign_ExcST4B_xl)); + assign_map.emplace("cim:ExcST4B.kc", &assign_ExcST4B_kc); + assign_map.emplace("cim:ExcST4B.kg", &assign_ExcST4B_kg); + assign_map.emplace("cim:ExcST4B.ki", &assign_ExcST4B_ki); + assign_map.emplace("cim:ExcST4B.kim", &assign_ExcST4B_kim); + assign_map.emplace("cim:ExcST4B.kir", &assign_ExcST4B_kir); + assign_map.emplace("cim:ExcST4B.kp", &assign_ExcST4B_kp); + assign_map.emplace("cim:ExcST4B.kpm", &assign_ExcST4B_kpm); + assign_map.emplace("cim:ExcST4B.kpr", &assign_ExcST4B_kpr); + assign_map.emplace("cim:ExcST4B.lvgate", &assign_ExcST4B_lvgate); + assign_map.emplace("cim:ExcST4B.ta", &assign_ExcST4B_ta); + assign_map.emplace("cim:ExcST4B.thetap", &assign_ExcST4B_thetap); + assign_map.emplace("cim:ExcST4B.uel", &assign_ExcST4B_uel); + assign_map.emplace("cim:ExcST4B.vbmax", &assign_ExcST4B_vbmax); + assign_map.emplace("cim:ExcST4B.vgmax", &assign_ExcST4B_vgmax); + assign_map.emplace("cim:ExcST4B.vmmax", &assign_ExcST4B_vmmax); + assign_map.emplace("cim:ExcST4B.vmmin", &assign_ExcST4B_vmmin); + assign_map.emplace("cim:ExcST4B.vrmax", &assign_ExcST4B_vrmax); + assign_map.emplace("cim:ExcST4B.vrmin", &assign_ExcST4B_vrmin); + assign_map.emplace("cim:ExcST4B.xl", &assign_ExcST4B_xl); } void ExcST4B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcST4B.hpp b/CGMES_3.0.0/ExcST4B.hpp index b63997477..4fd051543 100644 --- a/CGMES_3.0.0/ExcST4B.hpp +++ b/CGMES_3.0.0/ExcST4B.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE ST4B static excitation system with maximum inner loop feedback gain Vgmax. - */ + /** \brief Modified IEEE ST4B static excitation system with maximum inner loop feedback gain Vgmax. */ class ExcST4B : public ExcitationSystemDynamics { public: @@ -30,25 +28,62 @@ namespace CIMPP ExcST4B(); ~ExcST4B() override; - CIMPP::PU kc; /* Rectifier loading factor proportional to commutating reactance (<i>Kc</i>) (&gt;= 0). Typical value = 0,113. Default: nullptr */ - CIMPP::PU kg; /* Feedback gain constant of the inner loop field regulator (<i>Kg</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::PU ki; /* Potential circuit gain coefficient (<i>Ki</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::PU kim; /* Voltage regulator integral gain output (<i>Kim</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU kir; /* Voltage regulator integral gain (<i>Kir</i>). Typical value = 10,75. Default: nullptr */ - CIMPP::PU kp; /* Potential circuit gain coefficient (<i>Kp</i>) (&gt; 0). Typical value = 9,3. Default: nullptr */ - CIMPP::PU kpm; /* Voltage regulator proportional gain output (<i>Kpm</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU kpr; /* Voltage regulator proportional gain (<i>Kpr</i>). Typical value = 10,75. Default: nullptr */ - CIMPP::Boolean lvgate; /* Selector (<i>LVGate</i>). true = <i>LVGate</i> is part of the block diagram false = <i>LVGate</i> is not part of the block diagram. Typical value = false. Default: false */ - CIMPP::Seconds ta; /* Voltage regulator time constant (<i>Ta</i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ - CIMPP::AngleDegrees thetap; /* Potential circuit phase angle (<i>theta</i><i><sub>p</sub></i>). Typical value = 0. Default: nullptr */ - CIMPP::Boolean uel; /* Selector (<i>UEL</i>). true = <i>UEL</i> is part of block diagram false = <i>UEL</i> is not part of block diagram. Typical value = false. Default: false */ - CIMPP::PU vbmax; /* Maximum excitation voltage (<i>Vbmax</i>) (&gt; 0). Typical value = 11,63. Default: nullptr */ - CIMPP::PU vgmax; /* Maximum inner loop feedback voltage (<i>Vgmax</i>) (&gt;= 0). Typical value = 5,8. Default: nullptr */ - CIMPP::PU vmmax; /* Maximum inner loop output (<i>Vmmax</i>) (&gt; ExcST4B.vmmin). Typical value = 99. Default: nullptr */ - CIMPP::PU vmmin; /* Minimum inner loop output (<i>Vmmin</i>) (&lt; ExcST4B.vmmax). Typical value = -99. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (<i>Vrmax</i>) (&gt; 0). Typical value = 1. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (<i>Vrmin</i>) (&lt; 0). Typical value = -0,87. Default: nullptr */ - CIMPP::PU xl; /* Reactance associated with potential source (<i>Xl</i>) (&gt;= 0). Typical value = 0,124. Default: nullptr */ + /** \brief Rectifier loading factor proportional to commutating reactance (<i>Kc</i>) (&gt;= 0). Typical value = 0,113. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Feedback gain constant of the inner loop field regulator (<i>Kg</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Potential circuit gain coefficient (<i>Ki</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Voltage regulator integral gain output (<i>Kim</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU kim; + + /** \brief Voltage regulator integral gain (<i>Kir</i>). Typical value = 10,75. Default: nullptr */ + CIMPP::PU kir; + + /** \brief Potential circuit gain coefficient (<i>Kp</i>) (&gt; 0). Typical value = 9,3. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Voltage regulator proportional gain output (<i>Kpm</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU kpm; + + /** \brief Voltage regulator proportional gain (<i>Kpr</i>). Typical value = 10,75. Default: nullptr */ + CIMPP::PU kpr; + + /** \brief Selector (<i>LVGate</i>). true = <i>LVGate</i> is part of the block diagram false = <i>LVGate</i> is not part of the block diagram. Typical value = false. Default: false */ + CIMPP::Boolean lvgate; + + /** \brief Voltage regulator time constant (<i>Ta</i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Potential circuit phase angle (<i>theta</i><i><sub>p</sub></i>). Typical value = 0. Default: nullptr */ + CIMPP::AngleDegrees thetap; + + /** \brief Selector (<i>UEL</i>). true = <i>UEL</i> is part of block diagram false = <i>UEL</i> is not part of block diagram. Typical value = false. Default: false */ + CIMPP::Boolean uel; + + /** \brief Maximum excitation voltage (<i>Vbmax</i>) (&gt; 0). Typical value = 11,63. Default: nullptr */ + CIMPP::PU vbmax; + + /** \brief Maximum inner loop feedback voltage (<i>Vgmax</i>) (&gt;= 0). Typical value = 5,8. Default: nullptr */ + CIMPP::PU vgmax; + + /** \brief Maximum inner loop output (<i>Vmmax</i>) (&gt; ExcST4B.vmmin). Typical value = 99. Default: nullptr */ + CIMPP::PU vmmax; + + /** \brief Minimum inner loop output (<i>Vmmin</i>) (&lt; ExcST4B.vmmax). Typical value = -99. Default: nullptr */ + CIMPP::PU vmmin; + + /** \brief Maximum voltage regulator output (<i>Vrmax</i>) (&gt; 0). Typical value = 1. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (<i>Vrmin</i>) (&lt; 0). Typical value = -0,87. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief Reactance associated with potential source (<i>Xl</i>) (&gt;= 0). Typical value = 0,124. Default: nullptr */ + CIMPP::PU xl; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcST6B.cpp b/CGMES_3.0.0/ExcST6B.cpp index afee55093..9942e0b7a 100644 --- a/CGMES_3.0.0/ExcST6B.cpp +++ b/CGMES_3.0.0/ExcST6B.cpp @@ -8,34 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ExcST6BOELselectorKind.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcST6B::ExcST6B() {}; -ExcST6B::~ExcST6B() {}; +ExcST6B::ExcST6B() {} +ExcST6B::~ExcST6B() {} static const std::list PossibleProfilesForClass = { @@ -84,311 +61,332 @@ ExcST6B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcST6B_ilr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_ilr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ilr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_kcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_kcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kcl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_kff(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_kff(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kff; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_kia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_kia(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kia; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_klr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_klr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->klr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_km(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_km(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->km; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_kpa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_kpa(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpa; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_kvd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_kvd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kvd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_oelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_oelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->oelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_ts(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_ts(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_tvd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_tvd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tvd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_vamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_vamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_vamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_vamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_vilim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_vilim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vilim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_vimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_vmult(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_vmult(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmult; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST6B_xc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST6B_xc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcST6B_ilr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ilr; if (!buffer.str().empty()) @@ -402,7 +400,8 @@ bool get_ExcST6B_ilr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -416,7 +415,8 @@ bool get_ExcST6B_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_kcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kcl; if (!buffer.str().empty()) @@ -430,7 +430,8 @@ bool get_ExcST6B_kcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_kff(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kff; if (!buffer.str().empty()) @@ -444,7 +445,8 @@ bool get_ExcST6B_kff(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -458,7 +460,8 @@ bool get_ExcST6B_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kia; if (!buffer.str().empty()) @@ -472,7 +475,8 @@ bool get_ExcST6B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_klr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->klr; if (!buffer.str().empty()) @@ -486,7 +490,8 @@ bool get_ExcST6B_klr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_km(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->km; if (!buffer.str().empty()) @@ -500,7 +505,8 @@ bool get_ExcST6B_km(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpa; if (!buffer.str().empty()) @@ -514,7 +520,8 @@ bool get_ExcST6B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_kvd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kvd; if (!buffer.str().empty()) @@ -526,9 +533,25 @@ bool get_ExcST6B_kvd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } +bool get_ExcST6B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->oelin; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_ExcST6B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -542,7 +565,8 @@ bool get_ExcST6B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_ts(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts; if (!buffer.str().empty()) @@ -556,7 +580,8 @@ bool get_ExcST6B_ts(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_tvd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tvd; if (!buffer.str().empty()) @@ -570,7 +595,8 @@ bool get_ExcST6B_tvd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST6B_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamax; if (!buffer.str().empty()) @@ -584,7 +610,8 @@ bool get_ExcST6B_vamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST6B_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vamin; if (!buffer.str().empty()) @@ -598,7 +625,8 @@ bool get_ExcST6B_vamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST6B_vilim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vilim; if (!buffer.str().empty()) @@ -612,7 +640,8 @@ bool get_ExcST6B_vilim(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST6B_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -626,7 +655,8 @@ bool get_ExcST6B_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST6B_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimin; if (!buffer.str().empty()) @@ -640,7 +670,8 @@ bool get_ExcST6B_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST6B_vmult(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmult; if (!buffer.str().empty()) @@ -654,7 +685,8 @@ bool get_ExcST6B_vmult(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST6B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -668,7 +700,8 @@ bool get_ExcST6B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST6B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -682,7 +715,8 @@ bool get_ExcST6B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_ExcST6B_xc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST6B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xc; if (!buffer.str().empty()) @@ -694,22 +728,6 @@ bool get_ExcST6B_xc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - -bool get_ExcST6B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const ExcST6B* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->oelin; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char ExcST6B::debugName[] = "ExcST6B"; const char* ExcST6B::debugString() const { @@ -718,34 +736,34 @@ const char* ExcST6B::debugString() const void ExcST6B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcST6B"), &ExcST6B_factory)); + factory_map.emplace("cim:ExcST6B", &ExcST6B_factory); } void ExcST6B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.ilr"), &assign_ExcST6B_ilr)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.k1"), &assign_ExcST6B_k1)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.kcl"), &assign_ExcST6B_kcl)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.kff"), &assign_ExcST6B_kff)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.kg"), &assign_ExcST6B_kg)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.kia"), &assign_ExcST6B_kia)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.klr"), &assign_ExcST6B_klr)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.km"), &assign_ExcST6B_km)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.kpa"), &assign_ExcST6B_kpa)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.kvd"), &assign_ExcST6B_kvd)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.oelin"), &assign_ExcST6B_oelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.tg"), &assign_ExcST6B_tg)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.ts"), &assign_ExcST6B_ts)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.tvd"), &assign_ExcST6B_tvd)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.vamax"), &assign_ExcST6B_vamax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.vamin"), &assign_ExcST6B_vamin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.vilim"), &assign_ExcST6B_vilim)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.vimax"), &assign_ExcST6B_vimax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.vimin"), &assign_ExcST6B_vimin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.vmult"), &assign_ExcST6B_vmult)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.vrmax"), &assign_ExcST6B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.vrmin"), &assign_ExcST6B_vrmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST6B.xc"), &assign_ExcST6B_xc)); + assign_map.emplace("cim:ExcST6B.ilr", &assign_ExcST6B_ilr); + assign_map.emplace("cim:ExcST6B.k1", &assign_ExcST6B_k1); + assign_map.emplace("cim:ExcST6B.kcl", &assign_ExcST6B_kcl); + assign_map.emplace("cim:ExcST6B.kff", &assign_ExcST6B_kff); + assign_map.emplace("cim:ExcST6B.kg", &assign_ExcST6B_kg); + assign_map.emplace("cim:ExcST6B.kia", &assign_ExcST6B_kia); + assign_map.emplace("cim:ExcST6B.klr", &assign_ExcST6B_klr); + assign_map.emplace("cim:ExcST6B.km", &assign_ExcST6B_km); + assign_map.emplace("cim:ExcST6B.kpa", &assign_ExcST6B_kpa); + assign_map.emplace("cim:ExcST6B.kvd", &assign_ExcST6B_kvd); + assign_map.emplace("cim:ExcST6B.oelin", &assign_ExcST6B_oelin); + assign_map.emplace("cim:ExcST6B.tg", &assign_ExcST6B_tg); + assign_map.emplace("cim:ExcST6B.ts", &assign_ExcST6B_ts); + assign_map.emplace("cim:ExcST6B.tvd", &assign_ExcST6B_tvd); + assign_map.emplace("cim:ExcST6B.vamax", &assign_ExcST6B_vamax); + assign_map.emplace("cim:ExcST6B.vamin", &assign_ExcST6B_vamin); + assign_map.emplace("cim:ExcST6B.vilim", &assign_ExcST6B_vilim); + assign_map.emplace("cim:ExcST6B.vimax", &assign_ExcST6B_vimax); + assign_map.emplace("cim:ExcST6B.vimin", &assign_ExcST6B_vimin); + assign_map.emplace("cim:ExcST6B.vmult", &assign_ExcST6B_vmult); + assign_map.emplace("cim:ExcST6B.vrmax", &assign_ExcST6B_vrmax); + assign_map.emplace("cim:ExcST6B.vrmin", &assign_ExcST6B_vrmin); + assign_map.emplace("cim:ExcST6B.xc", &assign_ExcST6B_xc); } void ExcST6B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcST6B.hpp b/CGMES_3.0.0/ExcST6B.hpp index 5d102437a..e86c4a0cf 100644 --- a/CGMES_3.0.0/ExcST6B.hpp +++ b/CGMES_3.0.0/ExcST6B.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE ST6B static excitation system with PID controller and optional inner feedback loop. - */ + /** \brief Modified IEEE ST6B static excitation system with PID controller and optional inner feedback loop. */ class ExcST6B : public ExcitationSystemDynamics { public: @@ -30,29 +28,74 @@ namespace CIMPP ExcST6B(); ~ExcST6B() override; - CIMPP::PU ilr; /* Exciter output current limit reference (<i>Ilr</i>) (&gt; 0). Typical value = 4,164. Default: nullptr */ - CIMPP::Boolean k1; /* Selector (<i>K1</i>). true = feedback is from <i>Ifd</i> false = feedback is not from <i>Ifd</i>. Typical value = true. Default: false */ - CIMPP::PU kcl; /* Exciter output current limit adjustment (<i>Kcl</i>) (&gt; 0). Typical value = 1,0577. Default: nullptr */ - CIMPP::PU kff; /* Pre-control gain constant of the inner loop field regulator (<i>Kff</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU kg; /* Feedback gain constant of the inner loop field regulator (<i>Kg</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::PU kia; /* Voltage regulator integral gain (<i>Kia</i>) (&gt; 0). Typical value = 45,094. Default: nullptr */ - CIMPP::PU klr; /* Exciter output current limit adjustment (<i>Kcl</i>) (&gt; 0). Typical value = 17,33. Default: nullptr */ - CIMPP::PU km; /* Forward gain constant of the inner loop field regulator (<i>Km</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU kpa; /* Voltage regulator proportional gain (<i>Kpa</i>) (&gt; 0). Typical value = 18,038. Default: nullptr */ - CIMPP::PU kvd; /* Voltage regulator derivative gain (<i>Kvd</i>). Typical value = 0. Default: nullptr */ - CIMPP::ExcST6BOELselectorKind oelin; /* OEL input selector (<i>OELin</i>). Typical value = noOELinput (corresponds to <i>OELin</i> = 0 on diagram). Default: 0 */ - CIMPP::Seconds tg; /* Feedback time constant of inner loop field voltage regulator (<i>Tg</i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ - CIMPP::Seconds ts; /* Rectifier firing time constant (<i>Ts</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tvd; /* Voltage regulator derivative gain (<i>Tvd</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::PU vamax; /* Maximum voltage regulator output (<i>Vamax</i>) (&gt; 0). Typical value = 4,81. Default: nullptr */ - CIMPP::PU vamin; /* Minimum voltage regulator output (<i>Vamin</i>) (&lt; 0). Typical value = -3,85. Default: nullptr */ - CIMPP::Boolean vilim; /* Selector (<i>Vilim</i>). true = <i>Vimin</i>-<i>Vimax</i> limiter is active false = <i>Vimin</i>-<i>Vimax</i> limiter is not active. Typical value = true. Default: false */ - CIMPP::PU vimax; /* Maximum voltage regulator input limit (<i>Vimax</i>) (&gt; ExcST6B.vimin). Typical value = 10. Default: nullptr */ - CIMPP::PU vimin; /* Minimum voltage regulator input limit (<i>Vimin</i>) (&lt; ExcST6B.vimax). Typical value = -10. Default: nullptr */ - CIMPP::Boolean vmult; /* Selector (<i>vmult</i>). true = multiply regulator output by terminal voltage false = do not multiply regulator output by terminal voltage. Typical value = true. Default: false */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (<i>Vrmax</i>) (&gt; 0). Typical value = 4,81. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (<i>Vrmin</i>) (&lt; 0). Typical value = -3,85. Default: nullptr */ - CIMPP::PU xc; /* Excitation source reactance (<i>Xc</i>). Typical value = 0,05. Default: nullptr */ + /** \brief Exciter output current limit reference (<i>Ilr</i>) (&gt; 0). Typical value = 4,164. Default: nullptr */ + CIMPP::PU ilr; + + /** \brief Selector (<i>K1</i>). true = feedback is from <i>Ifd</i> false = feedback is not from <i>Ifd</i>. Typical value = true. Default: false */ + CIMPP::Boolean k1; + + /** \brief Exciter output current limit adjustment (<i>Kcl</i>) (&gt; 0). Typical value = 1,0577. Default: nullptr */ + CIMPP::PU kcl; + + /** \brief Pre-control gain constant of the inner loop field regulator (<i>Kff</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU kff; + + /** \brief Feedback gain constant of the inner loop field regulator (<i>Kg</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Voltage regulator integral gain (<i>Kia</i>) (&gt; 0). Typical value = 45,094. Default: nullptr */ + CIMPP::PU kia; + + /** \brief Exciter output current limit adjustment (<i>Kcl</i>) (&gt; 0). Typical value = 17,33. Default: nullptr */ + CIMPP::PU klr; + + /** \brief Forward gain constant of the inner loop field regulator (<i>Km</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU km; + + /** \brief Voltage regulator proportional gain (<i>Kpa</i>) (&gt; 0). Typical value = 18,038. Default: nullptr */ + CIMPP::PU kpa; + + /** \brief Voltage regulator derivative gain (<i>Kvd</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU kvd; + + /** \brief OEL input selector (<i>OELin</i>). Typical value = noOELinput (corresponds to <i>OELin</i> = 0 on diagram). Default: 0 */ + CIMPP::ExcST6BOELselectorKind oelin; + + /** \brief Feedback time constant of inner loop field voltage regulator (<i>Tg</i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Rectifier firing time constant (<i>Ts</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds ts; + + /** \brief Voltage regulator derivative gain (<i>Tvd</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tvd; + + /** \brief Maximum voltage regulator output (<i>Vamax</i>) (&gt; 0). Typical value = 4,81. Default: nullptr */ + CIMPP::PU vamax; + + /** \brief Minimum voltage regulator output (<i>Vamin</i>) (&lt; 0). Typical value = -3,85. Default: nullptr */ + CIMPP::PU vamin; + + /** \brief Selector (<i>Vilim</i>). true = <i>Vimin</i>-<i>Vimax</i> limiter is active false = <i>Vimin</i>-<i>Vimax</i> limiter is not active. Typical value = true. Default: false */ + CIMPP::Boolean vilim; + + /** \brief Maximum voltage regulator input limit (<i>Vimax</i>) (&gt; ExcST6B.vimin). Typical value = 10. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Minimum voltage regulator input limit (<i>Vimin</i>) (&lt; ExcST6B.vimax). Typical value = -10. Default: nullptr */ + CIMPP::PU vimin; + + /** \brief Selector (<i>vmult</i>). true = multiply regulator output by terminal voltage false = do not multiply regulator output by terminal voltage. Typical value = true. Default: false */ + CIMPP::Boolean vmult; + + /** \brief Maximum voltage regulator output (<i>Vrmax</i>) (&gt; 0). Typical value = 4,81. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (<i>Vrmin</i>) (&lt; 0). Typical value = -3,85. Default: nullptr */ + CIMPP::PU vrmin; + + /** \brief Excitation source reactance (<i>Xc</i>). Typical value = 0,05. Default: nullptr */ + CIMPP::PU xc; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcST6BOELselectorKind.cpp b/CGMES_3.0.0/ExcST6BOELselectorKind.cpp index 4a1e0d921..51950ed6b 100644 --- a/CGMES_3.0.0/ExcST6BOELselectorKind.cpp +++ b/CGMES_3.0.0/ExcST6BOELselectorKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "ExcST6BOELselectorKind") + if (EnumSymbol.substr(0, pos) != "ExcST6BOELselectorKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "noOELinput") + if (EnumSymbol == "noOELinput") { rop = ExcST6BOELselectorKind::noOELinput; return lop; } - if(EnumSymbol == "beforeUEL") + if (EnumSymbol == "beforeUEL") { rop = ExcST6BOELselectorKind::beforeUEL; return lop; } - if(EnumSymbol == "afterUEL") + if (EnumSymbol == "afterUEL") { rop = ExcST6BOELselectorKind::afterUEL; return lop; diff --git a/CGMES_3.0.0/ExcST6BOELselectorKind.hpp b/CGMES_3.0.0/ExcST6BOELselectorKind.hpp index 4f8060ade..ee9da6594 100644 --- a/CGMES_3.0.0/ExcST6BOELselectorKind.hpp +++ b/CGMES_3.0.0/ExcST6BOELselectorKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Types of connections for the OEL input used for static excitation systems type 6B. - */ + /** \brief Types of connections for the OEL input used for static excitation systems type 6B. */ class ExcST6BOELselectorKind { public: enum ExcST6BOELselectorKind_ENUM { - /** - * No OEL input is used. Corresponds to <i>OELin</i> not = 1 and not = 2 on the ExcST6B diagram. Original ExcST6B model would have called this <i>OELin</i> = 0. - */ + /** No OEL input is used. Corresponds to <i>OELin</i> not = 1 and not = 2 on the ExcST6B diagram. Original ExcST6B model would have called this <i>OELin</i> = 0. */ noOELinput, - /** - * The connection is before UEL. Corresponds to <i>OELin</i> = 1 on the ExcST6B diagram. - */ + /** The connection is before UEL. Corresponds to <i>OELin</i> = 1 on the ExcST6B diagram. */ beforeUEL, - /** - * The connection is after UEL. Corresponds to <i>OELin</i> = 2 on the ExcST6B diagram. - */ + /** The connection is after UEL. Corresponds to <i>OELin</i> = 2 on the ExcST6B diagram. */ afterUEL, }; diff --git a/CGMES_3.0.0/ExcST7B.cpp b/CGMES_3.0.0/ExcST7B.cpp index 1107dc70a..b353d3afa 100644 --- a/CGMES_3.0.0/ExcST7B.cpp +++ b/CGMES_3.0.0/ExcST7B.cpp @@ -8,27 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ExcST7BOELselectorKind.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "ExcST7BUELselectorKind.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -ExcST7B::ExcST7B() {}; -ExcST7B::~ExcST7B() {}; +ExcST7B::ExcST7B() {} +ExcST7B::~ExcST7B() {} static const std::list PossibleProfilesForClass = { @@ -70,220 +54,234 @@ ExcST7B::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcST7B_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_kh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_kia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_kia(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kia; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_kl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_kl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_kpa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_kpa(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpa; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_oelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_oelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->oelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_tia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_tia(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tia; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_ts(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_ts(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_uelin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_uelin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uelin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_vmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_vmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExcST7B_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExcST7B_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExcST7B_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh; if (!buffer.str().empty()) @@ -297,7 +295,8 @@ bool get_ExcST7B_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST7B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kia; if (!buffer.str().empty()) @@ -311,7 +310,8 @@ bool get_ExcST7B_kia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST7B_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl; if (!buffer.str().empty()) @@ -325,7 +325,8 @@ bool get_ExcST7B_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST7B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpa; if (!buffer.str().empty()) @@ -337,9 +338,25 @@ bool get_ExcST7B_kpa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } +bool get_ExcST7B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->oelin; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_ExcST7B_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -353,7 +370,8 @@ bool get_ExcST7B_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST7B_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -367,7 +385,8 @@ bool get_ExcST7B_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST7B_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -381,7 +400,8 @@ bool get_ExcST7B_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST7B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -395,7 +415,8 @@ bool get_ExcST7B_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST7B_tia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tia; if (!buffer.str().empty()) @@ -409,7 +430,8 @@ bool get_ExcST7B_tia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_ExcST7B_ts(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts; if (!buffer.str().empty()) @@ -421,25 +443,12 @@ bool get_ExcST7B_ts(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } -bool get_ExcST7B_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->vmax; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - -bool get_ExcST7B_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcST7B_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vmin; + buffer << element->uelin; if (!buffer.str().empty()) { return true; @@ -449,11 +458,12 @@ bool get_ExcST7B_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } -bool get_ExcST7B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcST7B_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vrmax; + buffer << element->vmax; if (!buffer.str().empty()) { return true; @@ -463,11 +473,12 @@ bool get_ExcST7B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } -bool get_ExcST7B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcST7B_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->vrmin; + buffer << element->vmin; if (!buffer.str().empty()) { return true; @@ -477,13 +488,12 @@ bool get_ExcST7B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - -bool get_ExcST7B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcST7B_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->oelin; + buffer << element->vrmax; if (!buffer.str().empty()) { return true; @@ -493,11 +503,12 @@ bool get_ExcST7B_oelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } -bool get_ExcST7B_uelin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_ExcST7B_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcST7B* element = dynamic_cast(BaseClass_ptr1)) + const ExcST7B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->uelin; + buffer << element->vrmin; if (!buffer.str().empty()) { return true; @@ -515,27 +526,27 @@ const char* ExcST7B::debugString() const void ExcST7B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcST7B"), &ExcST7B_factory)); + factory_map.emplace("cim:ExcST7B", &ExcST7B_factory); } void ExcST7B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.kh"), &assign_ExcST7B_kh)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.kia"), &assign_ExcST7B_kia)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.kl"), &assign_ExcST7B_kl)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.kpa"), &assign_ExcST7B_kpa)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.oelin"), &assign_ExcST7B_oelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.tb"), &assign_ExcST7B_tb)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.tc"), &assign_ExcST7B_tc)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.tf"), &assign_ExcST7B_tf)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.tg"), &assign_ExcST7B_tg)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.tia"), &assign_ExcST7B_tia)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.ts"), &assign_ExcST7B_ts)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.uelin"), &assign_ExcST7B_uelin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.vmax"), &assign_ExcST7B_vmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.vmin"), &assign_ExcST7B_vmin)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.vrmax"), &assign_ExcST7B_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:ExcST7B.vrmin"), &assign_ExcST7B_vrmin)); + assign_map.emplace("cim:ExcST7B.kh", &assign_ExcST7B_kh); + assign_map.emplace("cim:ExcST7B.kia", &assign_ExcST7B_kia); + assign_map.emplace("cim:ExcST7B.kl", &assign_ExcST7B_kl); + assign_map.emplace("cim:ExcST7B.kpa", &assign_ExcST7B_kpa); + assign_map.emplace("cim:ExcST7B.oelin", &assign_ExcST7B_oelin); + assign_map.emplace("cim:ExcST7B.tb", &assign_ExcST7B_tb); + assign_map.emplace("cim:ExcST7B.tc", &assign_ExcST7B_tc); + assign_map.emplace("cim:ExcST7B.tf", &assign_ExcST7B_tf); + assign_map.emplace("cim:ExcST7B.tg", &assign_ExcST7B_tg); + assign_map.emplace("cim:ExcST7B.tia", &assign_ExcST7B_tia); + assign_map.emplace("cim:ExcST7B.ts", &assign_ExcST7B_ts); + assign_map.emplace("cim:ExcST7B.uelin", &assign_ExcST7B_uelin); + assign_map.emplace("cim:ExcST7B.vmax", &assign_ExcST7B_vmax); + assign_map.emplace("cim:ExcST7B.vmin", &assign_ExcST7B_vmin); + assign_map.emplace("cim:ExcST7B.vrmax", &assign_ExcST7B_vrmax); + assign_map.emplace("cim:ExcST7B.vrmin", &assign_ExcST7B_vrmin); } void ExcST7B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExcST7B.hpp b/CGMES_3.0.0/ExcST7B.hpp index d599e811e..f42235bd5 100644 --- a/CGMES_3.0.0/ExcST7B.hpp +++ b/CGMES_3.0.0/ExcST7B.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE ST7B static excitation system without stator current limiter (SCL) and current compensator (DROOP) inputs. - */ + /** \brief Modified IEEE ST7B static excitation system without stator current limiter (SCL) and current compensator (DROOP) inputs. */ class ExcST7B : public ExcitationSystemDynamics { public: @@ -30,22 +28,53 @@ namespace CIMPP ExcST7B(); ~ExcST7B() override; - CIMPP::PU kh; /* High-value gate feedback gain (<i>Kh</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::PU kia; /* Voltage regulator integral gain (<i>Kia</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::PU kl; /* Low-value gate feedback gain (<i>Kl</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::PU kpa; /* Voltage regulator proportional gain (<i>Kpa</i>) (&gt; 0). Typical value = 40. Default: nullptr */ - CIMPP::ExcST7BOELselectorKind oelin; /* OEL input selector (<i>OELin</i>). Typical value = noOELinput. Default: 0 */ - CIMPP::Seconds tb; /* Regulator lag time constant (<i>Tb</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::Seconds tc; /* Regulator lead time constant (<i>Tc</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::Seconds tf; /* Excitation control system stabilizer time constant (<i>Tf</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::Seconds tg; /* Feedback time constant of inner loop field voltage regulator (<i>Tg</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::Seconds tia; /* Feedback time constant (<i>Tia</i>) (&gt;= 0). Typical value = 3. Default: nullptr */ - CIMPP::Seconds ts; /* Rectifier firing time constant (<i>Ts</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::ExcST7BUELselectorKind uelin; /* UEL input selector (<i>UELin</i>). Typical value = noUELinput. Default: 0 */ - CIMPP::PU vmax; /* Maximum voltage reference signal (<i>Vmax</i>) (&gt; 0 and &gt; ExcST7B.vmin)). Typical value = 1,1. Default: nullptr */ - CIMPP::PU vmin; /* Minimum voltage reference signal (<i>Vmin</i>) (&gt; 0 and &lt; ExcST7B.vmax). Typical value = 0,9. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum voltage regulator output (<i>Vrmax</i>) (&gt; 0). Typical value = 5. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum voltage regulator output (<i>Vrmin</i>) (&lt; 0). Typical value = -4,5. Default: nullptr */ + /** \brief High-value gate feedback gain (<i>Kh</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::PU kh; + + /** \brief Voltage regulator integral gain (<i>Kia</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::PU kia; + + /** \brief Low-value gate feedback gain (<i>Kl</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::PU kl; + + /** \brief Voltage regulator proportional gain (<i>Kpa</i>) (&gt; 0). Typical value = 40. Default: nullptr */ + CIMPP::PU kpa; + + /** \brief OEL input selector (<i>OELin</i>). Typical value = noOELinput. Default: 0 */ + CIMPP::ExcST7BOELselectorKind oelin; + + /** \brief Regulator lag time constant (<i>Tb</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Regulator lead time constant (<i>Tc</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Excitation control system stabilizer time constant (<i>Tf</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Feedback time constant of inner loop field voltage regulator (<i>Tg</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Feedback time constant (<i>Tia</i>) (&gt;= 0). Typical value = 3. Default: nullptr */ + CIMPP::Seconds tia; + + /** \brief Rectifier firing time constant (<i>Ts</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds ts; + + /** \brief UEL input selector (<i>UELin</i>). Typical value = noUELinput. Default: 0 */ + CIMPP::ExcST7BUELselectorKind uelin; + + /** \brief Maximum voltage reference signal (<i>Vmax</i>) (&gt; 0 and &gt; ExcST7B.vmin)). Typical value = 1,1. Default: nullptr */ + CIMPP::PU vmax; + + /** \brief Minimum voltage reference signal (<i>Vmin</i>) (&gt; 0 and &lt; ExcST7B.vmax). Typical value = 0,9. Default: nullptr */ + CIMPP::PU vmin; + + /** \brief Maximum voltage regulator output (<i>Vrmax</i>) (&gt; 0). Typical value = 5. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum voltage regulator output (<i>Vrmin</i>) (&lt; 0). Typical value = -4,5. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcST7BOELselectorKind.cpp b/CGMES_3.0.0/ExcST7BOELselectorKind.cpp index d400a7859..dada552c0 100644 --- a/CGMES_3.0.0/ExcST7BOELselectorKind.cpp +++ b/CGMES_3.0.0/ExcST7BOELselectorKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "ExcST7BOELselectorKind") + if (EnumSymbol.substr(0, pos) != "ExcST7BOELselectorKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,22 +50,22 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "noOELinput") + if (EnumSymbol == "noOELinput") { rop = ExcST7BOELselectorKind::noOELinput; return lop; } - if(EnumSymbol == "addVref") + if (EnumSymbol == "addVref") { rop = ExcST7BOELselectorKind::addVref; return lop; } - if(EnumSymbol == "inputLVgate") + if (EnumSymbol == "inputLVgate") { rop = ExcST7BOELselectorKind::inputLVgate; return lop; } - if(EnumSymbol == "outputLVgate") + if (EnumSymbol == "outputLVgate") { rop = ExcST7BOELselectorKind::outputLVgate; return lop; diff --git a/CGMES_3.0.0/ExcST7BOELselectorKind.hpp b/CGMES_3.0.0/ExcST7BOELselectorKind.hpp index 63678ad84..b80371e1f 100644 --- a/CGMES_3.0.0/ExcST7BOELselectorKind.hpp +++ b/CGMES_3.0.0/ExcST7BOELselectorKind.hpp @@ -9,29 +9,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Types of connections for the OEL input used for static excitation systems type 7B. - */ + /** \brief Types of connections for the OEL input used for static excitation systems type 7B. */ class ExcST7BOELselectorKind { public: enum ExcST7BOELselectorKind_ENUM { - /** - * No OEL input is used. Corresponds to <i>OELin</i> not = 1 and not = 2 and not = 3 on the ExcST7B diagram. Original ExcST7B model would have called this <i>OELin</i> = 0. - */ + /** No OEL input is used. Corresponds to <i>OELin</i> not = 1 and not = 2 and not = 3 on the ExcST7B diagram. Original ExcST7B model would have called this <i>OELin</i> = 0. */ noOELinput, - /** - * The signal is added to <i>Vref</i>. Corresponds to <i>OELin</i> = 1 on the ExcST7B diagram. - */ + /** The signal is added to <i>Vref</i>. Corresponds to <i>OELin</i> = 1 on the ExcST7B diagram. */ addVref, - /** - * The signal is connected into the input <i>LVGate</i>. Corresponds to <i>OELin</i> = 2 on the ExcST7B diagram. - */ + /** The signal is connected into the input <i>LVGate</i>. Corresponds to <i>OELin</i> = 2 on the ExcST7B diagram. */ inputLVgate, - /** - * The signal is connected into the output <i>LVGate</i>. Corresponds to <i>OELin</i> = 3 on the ExcST7B diagram. - */ + /** The signal is connected into the output <i>LVGate</i>. Corresponds to <i>OELin</i> = 3 on the ExcST7B diagram. */ outputLVgate, }; diff --git a/CGMES_3.0.0/ExcST7BUELselectorKind.cpp b/CGMES_3.0.0/ExcST7BUELselectorKind.cpp index 2260a4e4d..b1e5d769d 100644 --- a/CGMES_3.0.0/ExcST7BUELselectorKind.cpp +++ b/CGMES_3.0.0/ExcST7BUELselectorKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "ExcST7BUELselectorKind") + if (EnumSymbol.substr(0, pos) != "ExcST7BUELselectorKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,22 +50,22 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "noUELinput") + if (EnumSymbol == "noUELinput") { rop = ExcST7BUELselectorKind::noUELinput; return lop; } - if(EnumSymbol == "addVref") + if (EnumSymbol == "addVref") { rop = ExcST7BUELselectorKind::addVref; return lop; } - if(EnumSymbol == "inputHVgate") + if (EnumSymbol == "inputHVgate") { rop = ExcST7BUELselectorKind::inputHVgate; return lop; } - if(EnumSymbol == "outputHVgate") + if (EnumSymbol == "outputHVgate") { rop = ExcST7BUELselectorKind::outputHVgate; return lop; diff --git a/CGMES_3.0.0/ExcST7BUELselectorKind.hpp b/CGMES_3.0.0/ExcST7BUELselectorKind.hpp index e9f1ed8eb..9706662af 100644 --- a/CGMES_3.0.0/ExcST7BUELselectorKind.hpp +++ b/CGMES_3.0.0/ExcST7BUELselectorKind.hpp @@ -9,29 +9,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Types of connections for the UEL input used for static excitation systems type 7B. - */ + /** \brief Types of connections for the UEL input used for static excitation systems type 7B. */ class ExcST7BUELselectorKind { public: enum ExcST7BUELselectorKind_ENUM { - /** - * No UEL input is used. Corresponds to <i>UELin</i> not = 1 and not = 2 and not = 3 on the ExcST7B diagram. Original ExcST7B model would have called this <i>UELin</i> = 0. - */ + /** No UEL input is used. Corresponds to <i>UELin</i> not = 1 and not = 2 and not = 3 on the ExcST7B diagram. Original ExcST7B model would have called this <i>UELin</i> = 0. */ noUELinput, - /** - * The signal is added to <i>Vref</i>. Corresponds to <i>UELin</i> = 1 on the ExcST7B diagram. - */ + /** The signal is added to <i>Vref</i>. Corresponds to <i>UELin</i> = 1 on the ExcST7B diagram. */ addVref, - /** - * The signal is connected into the input <i>HVGate</i>. Corresponds to <i>UELin</i> = 2 on the ExcST7B diagram. - */ + /** The signal is connected into the input <i>HVGate</i>. Corresponds to <i>UELin</i> = 2 on the ExcST7B diagram. */ inputHVgate, - /** - * The signal is connected into the output <i>HVGate</i>. Corresponds to <i>UELin</i> = 3 on the ExcST7B diagram. - */ + /** The signal is connected into the output <i>HVGate</i>. Corresponds to <i>UELin</i> = 3 on the ExcST7B diagram. */ outputHVgate, }; diff --git a/CGMES_3.0.0/ExcitationSystemDynamics.cpp b/CGMES_3.0.0/ExcitationSystemDynamics.cpp index dcd25126a..540af8c6a 100644 --- a/CGMES_3.0.0/ExcitationSystemDynamics.cpp +++ b/CGMES_3.0.0/ExcitationSystemDynamics.cpp @@ -19,8 +19,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ExcitationSystemDynamics::ExcitationSystemDynamics() : DiscontinuousExcitationControlDynamics(nullptr), OverexcitationLimiterDynamics(nullptr), PFVArControllerType1Dynamics(nullptr), PFVArControllerType2Dynamics(nullptr), PowerSystemStabilizerDynamics(nullptr), SynchronousMachineDynamics(nullptr), UnderexcitationLimiterDynamics(nullptr), VoltageCompensatorDynamics(nullptr) {}; -ExcitationSystemDynamics::~ExcitationSystemDynamics() {}; +ExcitationSystemDynamics::ExcitationSystemDynamics() : DiscontinuousExcitationControlDynamics(nullptr), OverexcitationLimiterDynamics(nullptr), PFVArControllerType1Dynamics(nullptr), PFVArControllerType2Dynamics(nullptr), PowerSystemStabilizerDynamics(nullptr), SynchronousMachineDynamics(nullptr), UnderexcitationLimiterDynamics(nullptr), VoltageCompensatorDynamics(nullptr) {} +ExcitationSystemDynamics::~ExcitationSystemDynamics() {} static const std::list PossibleProfilesForClass = { @@ -54,8 +54,6 @@ ExcitationSystemDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_DiscontinuousExcitationControlDynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); bool assign_ExcitationSystemDynamics_DiscontinuousExcitationControlDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -72,6 +70,7 @@ bool assign_ExcitationSystemDynamics_DiscontinuousExcitationControlDynamics(Base } return false; } + bool assign_OverexcitationLimiterDynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); bool assign_ExcitationSystemDynamics_OverexcitationLimiterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -88,6 +87,7 @@ bool assign_ExcitationSystemDynamics_OverexcitationLimiterDynamics(BaseClass* Ba } return false; } + bool assign_PFVArControllerType1Dynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); bool assign_ExcitationSystemDynamics_PFVArControllerType1Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -104,6 +104,7 @@ bool assign_ExcitationSystemDynamics_PFVArControllerType1Dynamics(BaseClass* Bas } return false; } + bool assign_PFVArControllerType2Dynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); bool assign_ExcitationSystemDynamics_PFVArControllerType2Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -120,6 +121,7 @@ bool assign_ExcitationSystemDynamics_PFVArControllerType2Dynamics(BaseClass* Bas } return false; } + bool assign_PowerSystemStabilizerDynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); bool assign_ExcitationSystemDynamics_PowerSystemStabilizerDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -136,6 +138,7 @@ bool assign_ExcitationSystemDynamics_PowerSystemStabilizerDynamics(BaseClass* Ba } return false; } + bool assign_SynchronousMachineDynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); bool assign_ExcitationSystemDynamics_SynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -152,6 +155,7 @@ bool assign_ExcitationSystemDynamics_SynchronousMachineDynamics(BaseClass* BaseC } return false; } + bool assign_UnderexcitationLimiterDynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); bool assign_ExcitationSystemDynamics_UnderexcitationLimiterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -168,6 +172,7 @@ bool assign_ExcitationSystemDynamics_UnderexcitationLimiterDynamics(BaseClass* B } return false; } + bool assign_VoltageCompensatorDynamics_ExcitationSystemDynamics(BaseClass*, BaseClass*); bool assign_ExcitationSystemDynamics_VoltageCompensatorDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -186,9 +191,14 @@ bool assign_ExcitationSystemDynamics_VoltageCompensatorDynamics(BaseClass* BaseC } + + + + bool get_ExcitationSystemDynamics_SynchronousMachineDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ExcitationSystemDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ExcitationSystemDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->SynchronousMachineDynamics != 0) { @@ -200,6 +210,7 @@ bool get_ExcitationSystemDynamics_SynchronousMachineDynamics(const BaseClass* Ba } + const char ExcitationSystemDynamics::debugName[] = "ExcitationSystemDynamics"; const char* ExcitationSystemDynamics::debugString() const { @@ -208,7 +219,7 @@ const char* ExcitationSystemDynamics::debugString() const void ExcitationSystemDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics"), &ExcitationSystemDynamics_factory)); + factory_map.emplace("cim:ExcitationSystemDynamics", &ExcitationSystemDynamics_factory); } void ExcitationSystemDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -217,14 +228,14 @@ void ExcitationSystemDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics.DiscontinuousExcitationControlDynamics"), &assign_ExcitationSystemDynamics_DiscontinuousExcitationControlDynamics)); - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics.OverexcitationLimiterDynamics"), &assign_ExcitationSystemDynamics_OverexcitationLimiterDynamics)); - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics.PFVArControllerType1Dynamics"), &assign_ExcitationSystemDynamics_PFVArControllerType1Dynamics)); - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics.PFVArControllerType2Dynamics"), &assign_ExcitationSystemDynamics_PFVArControllerType2Dynamics)); - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics.PowerSystemStabilizerDynamics"), &assign_ExcitationSystemDynamics_PowerSystemStabilizerDynamics)); - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics.SynchronousMachineDynamics"), &assign_ExcitationSystemDynamics_SynchronousMachineDynamics)); - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics.UnderexcitationLimiterDynamics"), &assign_ExcitationSystemDynamics_UnderexcitationLimiterDynamics)); - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemDynamics.VoltageCompensatorDynamics"), &assign_ExcitationSystemDynamics_VoltageCompensatorDynamics)); + assign_map.emplace("cim:ExcitationSystemDynamics.DiscontinuousExcitationControlDynamics", &assign_ExcitationSystemDynamics_DiscontinuousExcitationControlDynamics); + assign_map.emplace("cim:ExcitationSystemDynamics.OverexcitationLimiterDynamics", &assign_ExcitationSystemDynamics_OverexcitationLimiterDynamics); + assign_map.emplace("cim:ExcitationSystemDynamics.PFVArControllerType1Dynamics", &assign_ExcitationSystemDynamics_PFVArControllerType1Dynamics); + assign_map.emplace("cim:ExcitationSystemDynamics.PFVArControllerType2Dynamics", &assign_ExcitationSystemDynamics_PFVArControllerType2Dynamics); + assign_map.emplace("cim:ExcitationSystemDynamics.PowerSystemStabilizerDynamics", &assign_ExcitationSystemDynamics_PowerSystemStabilizerDynamics); + assign_map.emplace("cim:ExcitationSystemDynamics.SynchronousMachineDynamics", &assign_ExcitationSystemDynamics_SynchronousMachineDynamics); + assign_map.emplace("cim:ExcitationSystemDynamics.UnderexcitationLimiterDynamics", &assign_ExcitationSystemDynamics_UnderexcitationLimiterDynamics); + assign_map.emplace("cim:ExcitationSystemDynamics.VoltageCompensatorDynamics", &assign_ExcitationSystemDynamics_VoltageCompensatorDynamics); } void ExcitationSystemDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/ExcitationSystemDynamics.hpp b/CGMES_3.0.0/ExcitationSystemDynamics.hpp index 59a2291e3..ef6309966 100644 --- a/CGMES_3.0.0/ExcitationSystemDynamics.hpp +++ b/CGMES_3.0.0/ExcitationSystemDynamics.hpp @@ -24,9 +24,7 @@ namespace CIMPP class UnderexcitationLimiterDynamics; class VoltageCompensatorDynamics; - /* - Excitation system function block whose behaviour is described by reference to a standard model or by definition of a user-defined model. - */ + /** \brief Excitation system function block whose behaviour is described by reference to a standard model or by definition of a user-defined model. */ class ExcitationSystemDynamics : public DynamicsFunctionBlock { public: @@ -34,14 +32,29 @@ namespace CIMPP ExcitationSystemDynamics(); ~ExcitationSystemDynamics() override; - CIMPP::DiscontinuousExcitationControlDynamics* DiscontinuousExcitationControlDynamics; /* Discontinuous excitation control model associated with this excitation system model. Default: 0 */ - CIMPP::OverexcitationLimiterDynamics* OverexcitationLimiterDynamics; /* Overexcitation limiter model associated with this excitation system model. Default: 0 */ - CIMPP::PFVArControllerType1Dynamics* PFVArControllerType1Dynamics; /* Power factor or VAr controller type 1 model associated with this excitation system model. Default: 0 */ - CIMPP::PFVArControllerType2Dynamics* PFVArControllerType2Dynamics; /* Power factor or VAr controller type 2 model associated with this excitation system model. Default: 0 */ - CIMPP::PowerSystemStabilizerDynamics* PowerSystemStabilizerDynamics; /* Power system stabilizer model associated with this excitation system model. Default: 0 */ - CIMPP::SynchronousMachineDynamics* SynchronousMachineDynamics; /* Synchronous machine model with which this excitation system model is associated. Default: 0 */ - CIMPP::UnderexcitationLimiterDynamics* UnderexcitationLimiterDynamics; /* Undrexcitation limiter model associated with this excitation system model. Default: 0 */ - CIMPP::VoltageCompensatorDynamics* VoltageCompensatorDynamics; /* Voltage compensator model associated with this excitation system model. Default: 0 */ + /** \brief Discontinuous excitation control model associated with this excitation system model. Default: 0 */ + CIMPP::DiscontinuousExcitationControlDynamics* DiscontinuousExcitationControlDynamics; + + /** \brief Overexcitation limiter model associated with this excitation system model. Default: 0 */ + CIMPP::OverexcitationLimiterDynamics* OverexcitationLimiterDynamics; + + /** \brief Power factor or VAr controller type 1 model associated with this excitation system model. Default: 0 */ + CIMPP::PFVArControllerType1Dynamics* PFVArControllerType1Dynamics; + + /** \brief Power factor or VAr controller type 2 model associated with this excitation system model. Default: 0 */ + CIMPP::PFVArControllerType2Dynamics* PFVArControllerType2Dynamics; + + /** \brief Power system stabilizer model associated with this excitation system model. Default: 0 */ + CIMPP::PowerSystemStabilizerDynamics* PowerSystemStabilizerDynamics; + + /** \brief Synchronous machine model with which this excitation system model is associated. Default: 0 */ + CIMPP::SynchronousMachineDynamics* SynchronousMachineDynamics; + + /** \brief Undrexcitation limiter model associated with this excitation system model. Default: 0 */ + CIMPP::UnderexcitationLimiterDynamics* UnderexcitationLimiterDynamics; + + /** \brief Voltage compensator model associated with this excitation system model. Default: 0 */ + CIMPP::VoltageCompensatorDynamics* VoltageCompensatorDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExcitationSystemUserDefined.cpp b/CGMES_3.0.0/ExcitationSystemUserDefined.cpp index 15f84f6b0..362ef357e 100644 --- a/CGMES_3.0.0/ExcitationSystemUserDefined.cpp +++ b/CGMES_3.0.0/ExcitationSystemUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -ExcitationSystemUserDefined::ExcitationSystemUserDefined() {}; -ExcitationSystemUserDefined::~ExcitationSystemUserDefined() {}; +ExcitationSystemUserDefined::ExcitationSystemUserDefined() {} +ExcitationSystemUserDefined::~ExcitationSystemUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ ExcitationSystemUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExcitationSystemUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ExcitationSystemUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_ExcitationSystemUserDefined(BaseClass*, BaseClass*); bool assign_ExcitationSystemUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_ExcitationSystemUserDefined_ProprietaryParameterDynamics(BaseClass* return false; } +bool assign_ExcitationSystemUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + ExcitationSystemUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_ExcitationSystemUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExcitationSystemUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const ExcitationSystemUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_ExcitationSystemUserDefined_proprietary(const BaseClass* BaseClass_ptr1 return false; } - - const char ExcitationSystemUserDefined::debugName[] = "ExcitationSystemUserDefined"; const char* ExcitationSystemUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* ExcitationSystemUserDefined::debugString() const void ExcitationSystemUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExcitationSystemUserDefined"), &ExcitationSystemUserDefined_factory)); + factory_map.emplace("cim:ExcitationSystemUserDefined", &ExcitationSystemUserDefined_factory); } void ExcitationSystemUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemUserDefined.proprietary"), &assign_ExcitationSystemUserDefined_proprietary)); + assign_map.emplace("cim:ExcitationSystemUserDefined.proprietary", &assign_ExcitationSystemUserDefined_proprietary); } void ExcitationSystemUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExcitationSystemUserDefined.ProprietaryParameterDynamics"), &assign_ExcitationSystemUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:ExcitationSystemUserDefined.ProprietaryParameterDynamics", &assign_ExcitationSystemUserDefined_ProprietaryParameterDynamics); } void ExcitationSystemUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/ExcitationSystemUserDefined.hpp b/CGMES_3.0.0/ExcitationSystemUserDefined.hpp index 4473986dd..a6b363dc7 100644 --- a/CGMES_3.0.0/ExcitationSystemUserDefined.hpp +++ b/CGMES_3.0.0/ExcitationSystemUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Excitation system function block whose dynamic behaviour is described by a user-defined model. - */ + /** \brief Excitation system function block whose dynamic behaviour is described by a user-defined model. */ class ExcitationSystemUserDefined : public ExcitationSystemDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP ExcitationSystemUserDefined(); ~ExcitationSystemUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ExternalNetworkInjection.cpp b/CGMES_3.0.0/ExternalNetworkInjection.cpp index 461a900e6..cdb858881 100644 --- a/CGMES_3.0.0/ExternalNetworkInjection.cpp +++ b/CGMES_3.0.0/ExternalNetworkInjection.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "ActivePowerPerFrequency.hpp" -#include "Boolean.hpp" -#include "CurrentFlow.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "CurrentFlow.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" -#include "Integer.hpp" -#include "PU.hpp" using namespace CIMPP; -ExternalNetworkInjection::ExternalNetworkInjection() {}; -ExternalNetworkInjection::~ExternalNetworkInjection() {}; +ExternalNetworkInjection::ExternalNetworkInjection() {} +ExternalNetworkInjection::~ExternalNetworkInjection() {} static const std::list PossibleProfilesForClass = { @@ -76,246 +58,262 @@ ExternalNetworkInjection::getPossibleProfilesForAttributes() const return map; } - -bool assign_ExternalNetworkInjection_governorSCD(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_governorSCD(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->governorSCD; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_ikSecond(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_ikSecond(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ikSecond; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_maxInitialSymShCCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_maxInitialSymShCCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxInitialSymShCCurrent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_maxP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_maxP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_maxQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_maxQ(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxQ; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_maxR0ToX0Ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_maxR0ToX0Ratio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxR0ToX0Ratio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_maxR1ToX1Ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_maxR1ToX1Ratio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxR1ToX1Ratio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_maxZ0ToZ1Ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_maxZ0ToZ1Ratio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxZ0ToZ1Ratio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_minInitialSymShCCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_minInitialSymShCCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minInitialSymShCCurrent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_minP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_minP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_minQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_minQ(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minQ; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_minR0ToX0Ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_minR0ToX0Ratio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minR0ToX0Ratio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_minR1ToX1Ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_minR1ToX1Ratio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minR1ToX1Ratio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_minZ0ToZ1Ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_minZ0ToZ1Ratio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minZ0ToZ1Ratio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_p(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_referencePriority(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_referencePriority(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->referencePriority; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ExternalNetworkInjection_voltageFactor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ExternalNetworkInjection_voltageFactor(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->voltageFactor; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_ExternalNetworkInjection_governorSCD(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->governorSCD; if (!buffer.str().empty()) @@ -329,7 +327,8 @@ bool get_ExternalNetworkInjection_governorSCD(const BaseClass* BaseClass_ptr1, s bool get_ExternalNetworkInjection_ikSecond(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ikSecond; if (!buffer.str().empty()) @@ -343,7 +342,8 @@ bool get_ExternalNetworkInjection_ikSecond(const BaseClass* BaseClass_ptr1, std: bool get_ExternalNetworkInjection_maxInitialSymShCCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxInitialSymShCCurrent; if (!buffer.str().empty()) @@ -357,7 +357,8 @@ bool get_ExternalNetworkInjection_maxInitialSymShCCurrent(const BaseClass* BaseC bool get_ExternalNetworkInjection_maxP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxP; if (!buffer.str().empty()) @@ -371,7 +372,8 @@ bool get_ExternalNetworkInjection_maxP(const BaseClass* BaseClass_ptr1, std::str bool get_ExternalNetworkInjection_maxQ(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxQ; if (!buffer.str().empty()) @@ -385,7 +387,8 @@ bool get_ExternalNetworkInjection_maxQ(const BaseClass* BaseClass_ptr1, std::str bool get_ExternalNetworkInjection_maxR0ToX0Ratio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxR0ToX0Ratio; if (!buffer.str().empty()) @@ -399,7 +402,8 @@ bool get_ExternalNetworkInjection_maxR0ToX0Ratio(const BaseClass* BaseClass_ptr1 bool get_ExternalNetworkInjection_maxR1ToX1Ratio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxR1ToX1Ratio; if (!buffer.str().empty()) @@ -413,7 +417,8 @@ bool get_ExternalNetworkInjection_maxR1ToX1Ratio(const BaseClass* BaseClass_ptr1 bool get_ExternalNetworkInjection_maxZ0ToZ1Ratio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxZ0ToZ1Ratio; if (!buffer.str().empty()) @@ -427,7 +432,8 @@ bool get_ExternalNetworkInjection_maxZ0ToZ1Ratio(const BaseClass* BaseClass_ptr1 bool get_ExternalNetworkInjection_minInitialSymShCCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minInitialSymShCCurrent; if (!buffer.str().empty()) @@ -441,7 +447,8 @@ bool get_ExternalNetworkInjection_minInitialSymShCCurrent(const BaseClass* BaseC bool get_ExternalNetworkInjection_minP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minP; if (!buffer.str().empty()) @@ -455,7 +462,8 @@ bool get_ExternalNetworkInjection_minP(const BaseClass* BaseClass_ptr1, std::str bool get_ExternalNetworkInjection_minQ(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minQ; if (!buffer.str().empty()) @@ -469,7 +477,8 @@ bool get_ExternalNetworkInjection_minQ(const BaseClass* BaseClass_ptr1, std::str bool get_ExternalNetworkInjection_minR0ToX0Ratio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minR0ToX0Ratio; if (!buffer.str().empty()) @@ -483,7 +492,8 @@ bool get_ExternalNetworkInjection_minR0ToX0Ratio(const BaseClass* BaseClass_ptr1 bool get_ExternalNetworkInjection_minR1ToX1Ratio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minR1ToX1Ratio; if (!buffer.str().empty()) @@ -497,7 +507,8 @@ bool get_ExternalNetworkInjection_minR1ToX1Ratio(const BaseClass* BaseClass_ptr1 bool get_ExternalNetworkInjection_minZ0ToZ1Ratio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minZ0ToZ1Ratio; if (!buffer.str().empty()) @@ -511,7 +522,8 @@ bool get_ExternalNetworkInjection_minZ0ToZ1Ratio(const BaseClass* BaseClass_ptr1 bool get_ExternalNetworkInjection_p(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p; if (!buffer.str().empty()) @@ -525,7 +537,8 @@ bool get_ExternalNetworkInjection_p(const BaseClass* BaseClass_ptr1, std::string bool get_ExternalNetworkInjection_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q; if (!buffer.str().empty()) @@ -539,7 +552,8 @@ bool get_ExternalNetworkInjection_q(const BaseClass* BaseClass_ptr1, std::string bool get_ExternalNetworkInjection_referencePriority(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->referencePriority; if (!buffer.str().empty()) @@ -553,7 +567,8 @@ bool get_ExternalNetworkInjection_referencePriority(const BaseClass* BaseClass_p bool get_ExternalNetworkInjection_voltageFactor(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1)) + const ExternalNetworkInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->voltageFactor; if (!buffer.str().empty()) @@ -565,8 +580,6 @@ bool get_ExternalNetworkInjection_voltageFactor(const BaseClass* BaseClass_ptr1, return false; } - - const char ExternalNetworkInjection::debugName[] = "ExternalNetworkInjection"; const char* ExternalNetworkInjection::debugString() const { @@ -575,29 +588,29 @@ const char* ExternalNetworkInjection::debugString() const void ExternalNetworkInjection::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection"), &ExternalNetworkInjection_factory)); + factory_map.emplace("cim:ExternalNetworkInjection", &ExternalNetworkInjection_factory); } void ExternalNetworkInjection::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.governorSCD"), &assign_ExternalNetworkInjection_governorSCD)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.ikSecond"), &assign_ExternalNetworkInjection_ikSecond)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.maxInitialSymShCCurrent"), &assign_ExternalNetworkInjection_maxInitialSymShCCurrent)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.maxP"), &assign_ExternalNetworkInjection_maxP)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.maxQ"), &assign_ExternalNetworkInjection_maxQ)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.maxR0ToX0Ratio"), &assign_ExternalNetworkInjection_maxR0ToX0Ratio)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.maxR1ToX1Ratio"), &assign_ExternalNetworkInjection_maxR1ToX1Ratio)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.maxZ0ToZ1Ratio"), &assign_ExternalNetworkInjection_maxZ0ToZ1Ratio)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.minInitialSymShCCurrent"), &assign_ExternalNetworkInjection_minInitialSymShCCurrent)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.minP"), &assign_ExternalNetworkInjection_minP)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.minQ"), &assign_ExternalNetworkInjection_minQ)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.minR0ToX0Ratio"), &assign_ExternalNetworkInjection_minR0ToX0Ratio)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.minR1ToX1Ratio"), &assign_ExternalNetworkInjection_minR1ToX1Ratio)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.minZ0ToZ1Ratio"), &assign_ExternalNetworkInjection_minZ0ToZ1Ratio)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.p"), &assign_ExternalNetworkInjection_p)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.q"), &assign_ExternalNetworkInjection_q)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.referencePriority"), &assign_ExternalNetworkInjection_referencePriority)); - assign_map.insert(std::make_pair(std::string("cim:ExternalNetworkInjection.voltageFactor"), &assign_ExternalNetworkInjection_voltageFactor)); + assign_map.emplace("cim:ExternalNetworkInjection.governorSCD", &assign_ExternalNetworkInjection_governorSCD); + assign_map.emplace("cim:ExternalNetworkInjection.ikSecond", &assign_ExternalNetworkInjection_ikSecond); + assign_map.emplace("cim:ExternalNetworkInjection.maxInitialSymShCCurrent", &assign_ExternalNetworkInjection_maxInitialSymShCCurrent); + assign_map.emplace("cim:ExternalNetworkInjection.maxP", &assign_ExternalNetworkInjection_maxP); + assign_map.emplace("cim:ExternalNetworkInjection.maxQ", &assign_ExternalNetworkInjection_maxQ); + assign_map.emplace("cim:ExternalNetworkInjection.maxR0ToX0Ratio", &assign_ExternalNetworkInjection_maxR0ToX0Ratio); + assign_map.emplace("cim:ExternalNetworkInjection.maxR1ToX1Ratio", &assign_ExternalNetworkInjection_maxR1ToX1Ratio); + assign_map.emplace("cim:ExternalNetworkInjection.maxZ0ToZ1Ratio", &assign_ExternalNetworkInjection_maxZ0ToZ1Ratio); + assign_map.emplace("cim:ExternalNetworkInjection.minInitialSymShCCurrent", &assign_ExternalNetworkInjection_minInitialSymShCCurrent); + assign_map.emplace("cim:ExternalNetworkInjection.minP", &assign_ExternalNetworkInjection_minP); + assign_map.emplace("cim:ExternalNetworkInjection.minQ", &assign_ExternalNetworkInjection_minQ); + assign_map.emplace("cim:ExternalNetworkInjection.minR0ToX0Ratio", &assign_ExternalNetworkInjection_minR0ToX0Ratio); + assign_map.emplace("cim:ExternalNetworkInjection.minR1ToX1Ratio", &assign_ExternalNetworkInjection_minR1ToX1Ratio); + assign_map.emplace("cim:ExternalNetworkInjection.minZ0ToZ1Ratio", &assign_ExternalNetworkInjection_minZ0ToZ1Ratio); + assign_map.emplace("cim:ExternalNetworkInjection.p", &assign_ExternalNetworkInjection_p); + assign_map.emplace("cim:ExternalNetworkInjection.q", &assign_ExternalNetworkInjection_q); + assign_map.emplace("cim:ExternalNetworkInjection.referencePriority", &assign_ExternalNetworkInjection_referencePriority); + assign_map.emplace("cim:ExternalNetworkInjection.voltageFactor", &assign_ExternalNetworkInjection_voltageFactor); } void ExternalNetworkInjection::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ExternalNetworkInjection.hpp b/CGMES_3.0.0/ExternalNetworkInjection.hpp index 66a9ed021..62b6ee0e5 100644 --- a/CGMES_3.0.0/ExternalNetworkInjection.hpp +++ b/CGMES_3.0.0/ExternalNetworkInjection.hpp @@ -24,9 +24,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - This class represents the external network and it is used for IEC 60909 calculations. - */ + /** \brief This class represents the external network and it is used for IEC 60909 calculations. */ class ExternalNetworkInjection : public RegulatingCondEq { public: @@ -34,24 +32,59 @@ namespace CIMPP ExternalNetworkInjection(); ~ExternalNetworkInjection() override; - CIMPP::ActivePowerPerFrequency governorSCD; /* Power Frequency Bias. This is the change in power injection divided by the change in frequency and negated. A positive value of the power frequency bias provides additional power injection upon a drop in frequency. Default: nullptr */ - CIMPP::Boolean ikSecond; /* Indicates whether initial symmetrical short-circuit current and power have been calculated according to IEC (Ik`). Used only if short circuit calculations are done according to superposition method. Default: false */ - CIMPP::CurrentFlow maxInitialSymShCCurrent; /* Maximum initial symmetrical short-circuit currents (Ik` max) in A (Ik` = Sk`/(SQRT(3) Un)). Used for short circuit data exchange according to IEC 60909. Default: nullptr */ - CIMPP::ActivePower maxP; /* Maximum active power of the injection. Default: nullptr */ - CIMPP::ReactivePower maxQ; /* Maximum reactive power limit. It is used for modelling of infeed for load flow exchange and not for short circuit modelling. Default: nullptr */ - CIMPP::Float maxR0ToX0Ratio; /* Maximum ratio of zero sequence resistance of Network Feeder to its zero sequence reactance (R(0)/X(0) max). Used for short circuit data exchange according to IEC 60909. Default: 0.0 */ - CIMPP::Float maxR1ToX1Ratio; /* Maximum ratio of positive sequence resistance of Network Feeder to its positive sequence reactance (R(1)/X(1) max). Used for short circuit data exchange according to IEC 60909. Default: 0.0 */ - CIMPP::Float maxZ0ToZ1Ratio; /* Maximum ratio of zero sequence impedance to its positive sequence impedance (Z(0)/Z(1) max). Used for short circuit data exchange according to IEC 60909. Default: 0.0 */ - CIMPP::CurrentFlow minInitialSymShCCurrent; /* Minimum initial symmetrical short-circuit currents (Ik` min) in A (Ik` = Sk`/(SQRT(3) Un)). Used for short circuit data exchange according to IEC 60909. Default: nullptr */ - CIMPP::ActivePower minP; /* Minimum active power of the injection. Default: nullptr */ - CIMPP::ReactivePower minQ; /* Minimum reactive power limit. It is used for modelling of infeed for load flow exchange and not for short circuit modelling. Default: nullptr */ - CIMPP::Float minR0ToX0Ratio; /* Indicates whether initial symmetrical short-circuit current and power have been calculated according to IEC (Ik`). Used for short circuit data exchange according to IEC 6090. Default: 0.0 */ - CIMPP::Float minR1ToX1Ratio; /* Minimum ratio of positive sequence resistance of Network Feeder to its positive sequence reactance (R(1)/X(1) min). Used for short circuit data exchange according to IEC 60909. Default: 0.0 */ - CIMPP::Float minZ0ToZ1Ratio; /* Minimum ratio of zero sequence impedance to its positive sequence impedance (Z(0)/Z(1) min). Used for short circuit data exchange according to IEC 60909. Default: 0.0 */ - CIMPP::ActivePower p; /* Active power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ - CIMPP::ReactivePower q; /* Reactive power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ - CIMPP::Integer referencePriority; /* Priority of unit for use as powerflow voltage phase angle reference bus selection. 0 = don t care (default) 1 = highest priority. 2 is less than 1 and so on. Default: 0 */ - CIMPP::PU voltageFactor; /* Voltage factor in pu, which was used to calculate short-circuit current Ik` and power Sk`. Used only if short circuit calculations are done according to superposition method. Default: nullptr */ + /** \brief Power Frequency Bias. This is the change in power injection divided by the change in frequency and negated. A positive value of the power frequency bias provides additional power injection upon a drop in frequency. Default: nullptr */ + CIMPP::ActivePowerPerFrequency governorSCD; + + /** \brief Indicates whether initial symmetrical short-circuit current and power have been calculated according to IEC (Ik`). Used only if short circuit calculations are done according to superposition method. Default: false */ + CIMPP::Boolean ikSecond; + + /** \brief Maximum initial symmetrical short-circuit currents (Ik` max) in A (Ik` = Sk`/(SQRT(3) Un)). Used for short circuit data exchange according to IEC 60909. Default: nullptr */ + CIMPP::CurrentFlow maxInitialSymShCCurrent; + + /** \brief Maximum active power of the injection. Default: nullptr */ + CIMPP::ActivePower maxP; + + /** \brief Maximum reactive power limit. It is used for modelling of infeed for load flow exchange and not for short circuit modelling. Default: nullptr */ + CIMPP::ReactivePower maxQ; + + /** \brief Maximum ratio of zero sequence resistance of Network Feeder to its zero sequence reactance (R(0)/X(0) max). Used for short circuit data exchange according to IEC 60909. Default: 0.0 */ + CIMPP::Float maxR0ToX0Ratio; + + /** \brief Maximum ratio of positive sequence resistance of Network Feeder to its positive sequence reactance (R(1)/X(1) max). Used for short circuit data exchange according to IEC 60909. Default: 0.0 */ + CIMPP::Float maxR1ToX1Ratio; + + /** \brief Maximum ratio of zero sequence impedance to its positive sequence impedance (Z(0)/Z(1) max). Used for short circuit data exchange according to IEC 60909. Default: 0.0 */ + CIMPP::Float maxZ0ToZ1Ratio; + + /** \brief Minimum initial symmetrical short-circuit currents (Ik` min) in A (Ik` = Sk`/(SQRT(3) Un)). Used for short circuit data exchange according to IEC 60909. Default: nullptr */ + CIMPP::CurrentFlow minInitialSymShCCurrent; + + /** \brief Minimum active power of the injection. Default: nullptr */ + CIMPP::ActivePower minP; + + /** \brief Minimum reactive power limit. It is used for modelling of infeed for load flow exchange and not for short circuit modelling. Default: nullptr */ + CIMPP::ReactivePower minQ; + + /** \brief Indicates whether initial symmetrical short-circuit current and power have been calculated according to IEC (Ik`). Used for short circuit data exchange according to IEC 6090. Default: 0.0 */ + CIMPP::Float minR0ToX0Ratio; + + /** \brief Minimum ratio of positive sequence resistance of Network Feeder to its positive sequence reactance (R(1)/X(1) min). Used for short circuit data exchange according to IEC 60909. Default: 0.0 */ + CIMPP::Float minR1ToX1Ratio; + + /** \brief Minimum ratio of zero sequence impedance to its positive sequence impedance (Z(0)/Z(1) min). Used for short circuit data exchange according to IEC 60909. Default: 0.0 */ + CIMPP::Float minZ0ToZ1Ratio; + + /** \brief Active power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ + CIMPP::ActivePower p; + + /** \brief Reactive power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for steady state solutions. Default: nullptr */ + CIMPP::ReactivePower q; + + /** \brief Priority of unit for use as powerflow voltage phase angle reference bus selection. 0 = don t care (default) 1 = highest priority. 2 is less than 1 and so on. Default: 0 */ + CIMPP::Integer referencePriority; + + /** \brief Voltage factor in pu, which was used to calculate short-circuit current Ik` and power Sk`. Used only if short circuit calculations are done according to superposition method. Default: nullptr */ + CIMPP::PU voltageFactor; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/FaultIndicator.cpp b/CGMES_3.0.0/FaultIndicator.cpp index f17c22049..5873b6827 100644 --- a/CGMES_3.0.0/FaultIndicator.cpp +++ b/CGMES_3.0.0/FaultIndicator.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -FaultIndicator::FaultIndicator() {}; -FaultIndicator::~FaultIndicator() {}; +FaultIndicator::FaultIndicator() {} +FaultIndicator::~FaultIndicator() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ FaultIndicator::getPossibleProfilesForAttributes() const return map; } - - - - - const char FaultIndicator::debugName[] = "FaultIndicator"; const char* FaultIndicator::debugString() const { @@ -51,7 +46,7 @@ const char* FaultIndicator::debugString() const void FaultIndicator::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:FaultIndicator"), &FaultIndicator_factory)); + factory_map.emplace("cim:FaultIndicator", &FaultIndicator_factory); } void FaultIndicator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/FaultIndicator.hpp b/CGMES_3.0.0/FaultIndicator.hpp index c6aba6430..0a8a68e60 100644 --- a/CGMES_3.0.0/FaultIndicator.hpp +++ b/CGMES_3.0.0/FaultIndicator.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A FaultIndicator is typically only an indicator (which may or may not be remotely monitored), and not a piece of equipment that actually initiates a protection event. It is used for FLISR (Fault Location, Isolation and Restoration) purposes, assisting with the dispatch of crews to "most likely" part of the network (i.e. assists with determining circuit section where the fault most likely happened). - */ + /** \brief A FaultIndicator is typically only an indicator (which may or may not be remotely monitored), and not a piece of equipment that actually initiates a protection event. It is used for FLISR (Fault Location, Isolation and Restoration) purposes, assisting with the dispatch of crews to "most likely" part of the network (i.e. assists with determining circuit section where the fault most likely happened). */ class FaultIndicator : public AuxiliaryEquipment { public: @@ -26,7 +24,6 @@ namespace CIMPP FaultIndicator(); ~FaultIndicator() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Float.hpp b/CGMES_3.0.0/Float.hpp index ede68d395..71ceca0e4 100644 --- a/CGMES_3.0.0/Float.hpp +++ b/CGMES_3.0.0/Float.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A floating point number. The range is unspecified and not limited. - */ + /** \brief A floating point number. The range is unspecified and not limited. */ class Float { public: diff --git a/CGMES_3.0.0/FossilFuel.cpp b/CGMES_3.0.0/FossilFuel.cpp index ae681b131..d8564bf4d 100644 --- a/CGMES_3.0.0/FossilFuel.cpp +++ b/CGMES_3.0.0/FossilFuel.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ThermalGeneratingUnit.hpp" -#include "FuelType.hpp" using namespace CIMPP; -FossilFuel::FossilFuel() : ThermalGeneratingUnit(nullptr) {}; -FossilFuel::~FossilFuel() {}; +FossilFuel::FossilFuel() : ThermalGeneratingUnit(nullptr) {} +FossilFuel::~FossilFuel() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ FossilFuel::getPossibleProfilesForAttributes() const return map; } - -bool assign_FossilFuel_fossilFuelType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (FossilFuel* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->fossilFuelType; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ThermalGeneratingUnit_FossilFuels(BaseClass*, BaseClass*); bool assign_FossilFuel_ThermalGeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,10 +58,24 @@ bool assign_FossilFuel_ThermalGeneratingUnit(BaseClass* BaseClass_ptr1, BaseClas return false; } +bool assign_FossilFuel_fossilFuelType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + FossilFuel* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->fossilFuelType; + if (!buffer.fail()) + { + return true; + } + } + return false; +} bool get_FossilFuel_ThermalGeneratingUnit(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const FossilFuel* element = dynamic_cast(BaseClass_ptr1)) + const FossilFuel* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ThermalGeneratingUnit != 0) { @@ -88,10 +86,10 @@ bool get_FossilFuel_ThermalGeneratingUnit(const BaseClass* BaseClass_ptr1, std:: return false; } - bool get_FossilFuel_fossilFuelType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const FossilFuel* element = dynamic_cast(BaseClass_ptr1)) + const FossilFuel* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fossilFuelType; if (!buffer.str().empty()) @@ -111,17 +109,17 @@ const char* FossilFuel::debugString() const void FossilFuel::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:FossilFuel"), &FossilFuel_factory)); + factory_map.emplace("cim:FossilFuel", &FossilFuel_factory); } void FossilFuel::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:FossilFuel.fossilFuelType"), &assign_FossilFuel_fossilFuelType)); + assign_map.emplace("cim:FossilFuel.fossilFuelType", &assign_FossilFuel_fossilFuelType); } void FossilFuel::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:FossilFuel.ThermalGeneratingUnit"), &assign_FossilFuel_ThermalGeneratingUnit)); + assign_map.emplace("cim:FossilFuel.ThermalGeneratingUnit", &assign_FossilFuel_ThermalGeneratingUnit); } void FossilFuel::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/FossilFuel.hpp b/CGMES_3.0.0/FossilFuel.hpp index c96ed8e7b..2d975c704 100644 --- a/CGMES_3.0.0/FossilFuel.hpp +++ b/CGMES_3.0.0/FossilFuel.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ThermalGeneratingUnit; - /* - The fossil fuel consumed by the non-nuclear thermal generating unit. For example, coal, oil, gas, etc. These are the specific fuels that the generating unit can consume. - */ + /** \brief The fossil fuel consumed by the non-nuclear thermal generating unit. For example, coal, oil, gas, etc. These are the specific fuels that the generating unit can consume. */ class FossilFuel : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP FossilFuel(); ~FossilFuel() override; - CIMPP::ThermalGeneratingUnit* ThermalGeneratingUnit; /* A thermal generating unit may have one or more fossil fuels. Default: 0 */ - CIMPP::FuelType fossilFuelType; /* The type of fossil fuel, such as coal, oil, or gas. Default: 0 */ + /** \brief A thermal generating unit may have one or more fossil fuels. Default: 0 */ + CIMPP::ThermalGeneratingUnit* ThermalGeneratingUnit; + + /** \brief The type of fossil fuel, such as coal, oil, or gas. Default: 0 */ + CIMPP::FuelType fossilFuelType; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/FrancisGovernorControlKind.cpp b/CGMES_3.0.0/FrancisGovernorControlKind.cpp index dd419372c..45933271f 100644 --- a/CGMES_3.0.0/FrancisGovernorControlKind.cpp +++ b/CGMES_3.0.0/FrancisGovernorControlKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "FrancisGovernorControlKind") + if (EnumSymbol.substr(0, pos) != "FrancisGovernorControlKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "mechanicHydrolicTachoAccelerator") + if (EnumSymbol == "mechanicHydrolicTachoAccelerator") { rop = FrancisGovernorControlKind::mechanicHydrolicTachoAccelerator; return lop; } - if(EnumSymbol == "mechanicHydraulicTransientFeedback") + if (EnumSymbol == "mechanicHydraulicTransientFeedback") { rop = FrancisGovernorControlKind::mechanicHydraulicTransientFeedback; return lop; } - if(EnumSymbol == "electromechanicalElectrohydraulic") + if (EnumSymbol == "electromechanicalElectrohydraulic") { rop = FrancisGovernorControlKind::electromechanicalElectrohydraulic; return lop; diff --git a/CGMES_3.0.0/FrancisGovernorControlKind.hpp b/CGMES_3.0.0/FrancisGovernorControlKind.hpp index a694f5429..703dda54c 100644 --- a/CGMES_3.0.0/FrancisGovernorControlKind.hpp +++ b/CGMES_3.0.0/FrancisGovernorControlKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Governor control flag for Francis hydro model. - */ + /** \brief Governor control flag for Francis hydro model. */ class FrancisGovernorControlKind { public: enum FrancisGovernorControlKind_ENUM { - /** - * Mechanic-hydraulic regulator with tacho-accelerometer (Cflag = 1). - */ + /** Mechanic-hydraulic regulator with tacho-accelerometer (Cflag = 1). */ mechanicHydrolicTachoAccelerator, - /** - * Mechanic-hydraulic regulator with transient feedback (Cflag=2). - */ + /** Mechanic-hydraulic regulator with transient feedback (Cflag=2). */ mechanicHydraulicTransientFeedback, - /** - * Electromechanical and electrohydraulic regulator (Cflag=3). - */ + /** Electromechanical and electrohydraulic regulator (Cflag=3). */ electromechanicalElectrohydraulic, }; diff --git a/CGMES_3.0.0/Frequency.hpp b/CGMES_3.0.0/Frequency.hpp index 28f5a1022..cca9a1dc8 100644 --- a/CGMES_3.0.0/Frequency.hpp +++ b/CGMES_3.0.0/Frequency.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Cycles per second. - */ + /** \brief Cycles per second. */ class Frequency { public: diff --git a/CGMES_3.0.0/FuelType.cpp b/CGMES_3.0.0/FuelType.cpp index 30e1d2aba..f4782ace7 100644 --- a/CGMES_3.0.0/FuelType.cpp +++ b/CGMES_3.0.0/FuelType.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "FuelType") + if (EnumSymbol.substr(0, pos) != "FuelType") { lop.setstate(std::ios::failbit); return lop; @@ -50,52 +50,52 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "coal") + if (EnumSymbol == "coal") { rop = FuelType::coal; return lop; } - if(EnumSymbol == "oil") + if (EnumSymbol == "oil") { rop = FuelType::oil; return lop; } - if(EnumSymbol == "gas") + if (EnumSymbol == "gas") { rop = FuelType::gas; return lop; } - if(EnumSymbol == "lignite") + if (EnumSymbol == "lignite") { rop = FuelType::lignite; return lop; } - if(EnumSymbol == "hardCoal") + if (EnumSymbol == "hardCoal") { rop = FuelType::hardCoal; return lop; } - if(EnumSymbol == "oilShale") + if (EnumSymbol == "oilShale") { rop = FuelType::oilShale; return lop; } - if(EnumSymbol == "brownCoalLignite") + if (EnumSymbol == "brownCoalLignite") { rop = FuelType::brownCoalLignite; return lop; } - if(EnumSymbol == "coalDerivedGas") + if (EnumSymbol == "coalDerivedGas") { rop = FuelType::coalDerivedGas; return lop; } - if(EnumSymbol == "peat") + if (EnumSymbol == "peat") { rop = FuelType::peat; return lop; } - if(EnumSymbol == "other") + if (EnumSymbol == "other") { rop = FuelType::other; return lop; diff --git a/CGMES_3.0.0/FuelType.hpp b/CGMES_3.0.0/FuelType.hpp index 95a62fa65..a957ad7c7 100644 --- a/CGMES_3.0.0/FuelType.hpp +++ b/CGMES_3.0.0/FuelType.hpp @@ -9,53 +9,31 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of fuel. - */ + /** \brief Type of fuel. */ class FuelType { public: enum FuelType_ENUM { - /** - * Generic coal, not including lignite type. - */ + /** Generic coal, not including lignite type. */ coal, - /** - * Oil. - */ + /** Oil. */ oil, - /** - * Natural gas. - */ + /** Natural gas. */ gas, - /** - * The fuel is lignite coal. Note that this is a special type of coal, so the other enum of coal is reserved for hard coal types or if the exact type of coal is not known. - */ + /** The fuel is lignite coal. Note that this is a special type of coal, so the other enum of coal is reserved for hard coal types or if the exact type of coal is not known. */ lignite, - /** - * Hard coal. - */ + /** Hard coal. */ hardCoal, - /** - * Oil Shale. - */ + /** Oil Shale. */ oilShale, - /** - * Brown coal lignite. - */ + /** Brown coal lignite. */ brownCoalLignite, - /** - * Coal derived gas. - */ + /** Coal derived gas. */ coalDerivedGas, - /** - * Peat. - */ + /** Peat. */ peat, - /** - * Any fuel type not included in the rest of the enumerated value. - */ + /** Any fuel type not included in the rest of the enumerated value. */ other, }; diff --git a/CGMES_3.0.0/Fuse.cpp b/CGMES_3.0.0/Fuse.cpp index f77ef3e0b..98d806252 100644 --- a/CGMES_3.0.0/Fuse.cpp +++ b/CGMES_3.0.0/Fuse.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Fuse::Fuse() {}; -Fuse::~Fuse() {}; +Fuse::Fuse() {} +Fuse::~Fuse() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ Fuse::getPossibleProfilesForAttributes() const return map; } - - - - - const char Fuse::debugName[] = "Fuse"; const char* Fuse::debugString() const { @@ -52,7 +47,7 @@ const char* Fuse::debugString() const void Fuse::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Fuse"), &Fuse_factory)); + factory_map.emplace("cim:Fuse", &Fuse_factory); } void Fuse::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/Fuse.hpp b/CGMES_3.0.0/Fuse.hpp index 739891ee2..afd86f629 100644 --- a/CGMES_3.0.0/Fuse.hpp +++ b/CGMES_3.0.0/Fuse.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - An overcurrent protective device with a circuit opening fusible part that is heated and severed by the passage of overcurrent through it. A fuse is considered a switching device because it breaks current. - */ + /** \brief An overcurrent protective device with a circuit opening fusible part that is heated and severed by the passage of overcurrent through it. A fuse is considered a switching device because it breaks current. */ class Fuse : public Switch { public: @@ -26,7 +24,6 @@ namespace CIMPP Fuse(); ~Fuse() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GenICompensationForGenJ.cpp b/CGMES_3.0.0/GenICompensationForGenJ.cpp index a378b1488..ade258b3c 100644 --- a/CGMES_3.0.0/GenICompensationForGenJ.cpp +++ b/CGMES_3.0.0/GenICompensationForGenJ.cpp @@ -10,13 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "SynchronousMachineDynamics.hpp" #include "VCompIEEEType2.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -GenICompensationForGenJ::GenICompensationForGenJ() : SynchronousMachineDynamics(nullptr), VcompIEEEType2(nullptr) {}; -GenICompensationForGenJ::~GenICompensationForGenJ() {}; +GenICompensationForGenJ::GenICompensationForGenJ() : SynchronousMachineDynamics(nullptr), VcompIEEEType2(nullptr) {} +GenICompensationForGenJ::~GenICompensationForGenJ() {} static const std::list PossibleProfilesForClass = { @@ -46,34 +44,6 @@ GenICompensationForGenJ::getPossibleProfilesForAttributes() const return map; } - -bool assign_GenICompensationForGenJ_rcij(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->rcij; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_GenICompensationForGenJ_xcij(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->xcij; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_SynchronousMachineDynamics_GenICompensationForGenJ(BaseClass*, BaseClass*); bool assign_GenICompensationForGenJ_SynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -90,6 +60,7 @@ bool assign_GenICompensationForGenJ_SynchronousMachineDynamics(BaseClass* BaseCl } return false; } + bool assign_VCompIEEEType2_GenICompensationForGenJ(BaseClass*, BaseClass*); bool assign_GenICompensationForGenJ_VcompIEEEType2(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -107,38 +78,38 @@ bool assign_GenICompensationForGenJ_VcompIEEEType2(BaseClass* BaseClass_ptr1, Ba return false; } -bool get_GenICompensationForGenJ_rcij(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_GenICompensationForGenJ_rcij(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1)) + GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->rcij; - if (!buffer.str().empty()) + buffer >> element->rcij; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_GenICompensationForGenJ_xcij(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_GenICompensationForGenJ_xcij(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1)) + GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xcij; - if (!buffer.str().empty()) + buffer >> element->xcij; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_GenICompensationForGenJ_SynchronousMachineDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1)) + const GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->SynchronousMachineDynamics != 0) { @@ -151,7 +122,8 @@ bool get_GenICompensationForGenJ_SynchronousMachineDynamics(const BaseClass* Bas bool get_GenICompensationForGenJ_VcompIEEEType2(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1)) + const GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->VcompIEEEType2 != 0) { @@ -162,6 +134,35 @@ bool get_GenICompensationForGenJ_VcompIEEEType2(const BaseClass* BaseClass_ptr1, return false; } +bool get_GenICompensationForGenJ_rcij(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->rcij; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_GenICompensationForGenJ_xcij(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const GenICompensationForGenJ* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->xcij; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char GenICompensationForGenJ::debugName[] = "GenICompensationForGenJ"; const char* GenICompensationForGenJ::debugString() const @@ -171,19 +172,19 @@ const char* GenICompensationForGenJ::debugString() const void GenICompensationForGenJ::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GenICompensationForGenJ"), &GenICompensationForGenJ_factory)); + factory_map.emplace("cim:GenICompensationForGenJ", &GenICompensationForGenJ_factory); } void GenICompensationForGenJ::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GenICompensationForGenJ.rcij"), &assign_GenICompensationForGenJ_rcij)); - assign_map.insert(std::make_pair(std::string("cim:GenICompensationForGenJ.xcij"), &assign_GenICompensationForGenJ_xcij)); + assign_map.emplace("cim:GenICompensationForGenJ.rcij", &assign_GenICompensationForGenJ_rcij); + assign_map.emplace("cim:GenICompensationForGenJ.xcij", &assign_GenICompensationForGenJ_xcij); } void GenICompensationForGenJ::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GenICompensationForGenJ.SynchronousMachineDynamics"), &assign_GenICompensationForGenJ_SynchronousMachineDynamics)); - assign_map.insert(std::make_pair(std::string("cim:GenICompensationForGenJ.VcompIEEEType2"), &assign_GenICompensationForGenJ_VcompIEEEType2)); + assign_map.emplace("cim:GenICompensationForGenJ.SynchronousMachineDynamics", &assign_GenICompensationForGenJ_SynchronousMachineDynamics); + assign_map.emplace("cim:GenICompensationForGenJ.VcompIEEEType2", &assign_GenICompensationForGenJ_VcompIEEEType2); } void GenICompensationForGenJ::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/GenICompensationForGenJ.hpp b/CGMES_3.0.0/GenICompensationForGenJ.hpp index a67b144b3..71559d56e 100644 --- a/CGMES_3.0.0/GenICompensationForGenJ.hpp +++ b/CGMES_3.0.0/GenICompensationForGenJ.hpp @@ -19,9 +19,7 @@ namespace CIMPP class SynchronousMachineDynamics; class VCompIEEEType2; - /* - Resistive and reactive components of compensation for generator associated with IEEE type 2 voltage compensator for current flow out of another generator in the interconnection. - */ + /** \brief Resistive and reactive components of compensation for generator associated with IEEE type 2 voltage compensator for current flow out of another generator in the interconnection. */ class GenICompensationForGenJ : public IdentifiedObject { public: @@ -29,10 +27,17 @@ namespace CIMPP GenICompensationForGenJ(); ~GenICompensationForGenJ() override; - CIMPP::SynchronousMachineDynamics* SynchronousMachineDynamics; /* Standard synchronous machine out of which current flow is being compensated for. Default: 0 */ - CIMPP::VCompIEEEType2* VcompIEEEType2; /* The standard IEEE type 2 voltage compensator of this compensation. Default: 0 */ - CIMPP::PU rcij; /* <font color=`#0f0f0f`>Resistive component of compensation of generator associated with this IEEE type 2 voltage compensator for current flow out of another generator (<i>Rcij</i>).</font> Default: nullptr */ - CIMPP::PU xcij; /* <font color=`#0f0f0f`>Reactive component of compensation of generator associated with this IEEE type 2 voltage compensator for current flow out of another generator (<i>Xcij</i>).</font> Default: nullptr */ + /** \brief Standard synchronous machine out of which current flow is being compensated for. Default: 0 */ + CIMPP::SynchronousMachineDynamics* SynchronousMachineDynamics; + + /** \brief The standard IEEE type 2 voltage compensator of this compensation. Default: 0 */ + CIMPP::VCompIEEEType2* VcompIEEEType2; + + /** \brief <font color=`#0f0f0f`>Resistive component of compensation of generator associated with this IEEE type 2 voltage compensator for current flow out of another generator (<i>Rcij</i>).</font> Default: nullptr */ + CIMPP::PU rcij; + + /** \brief <font color=`#0f0f0f`>Reactive component of compensation of generator associated with this IEEE type 2 voltage compensator for current flow out of another generator (<i>Xcij</i>).</font> Default: nullptr */ + CIMPP::PU xcij; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GeneratingUnit.cpp b/CGMES_3.0.0/GeneratingUnit.cpp index a5ede1cfb..294646e3a 100644 --- a/CGMES_3.0.0/GeneratingUnit.cpp +++ b/CGMES_3.0.0/GeneratingUnit.cpp @@ -11,27 +11,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "ControlAreaGeneratingUnit.hpp" #include "GrossToNetActivePowerCurve.hpp" #include "RotatingMachine.hpp" -#include "GeneratorControlSource.hpp" -#include "PerCent.hpp" -#include "Float.hpp" -#include "ActivePower.hpp" -#include "ActivePower.hpp" -#include "ActivePower.hpp" -#include "ActivePower.hpp" -#include "Float.hpp" -#include "ActivePower.hpp" -#include "ActivePower.hpp" -#include "ActivePower.hpp" -#include "Float.hpp" -#include "Money.hpp" -#include "Seconds.hpp" -#include "PerCent.hpp" -#include "Money.hpp" using namespace CIMPP; -GeneratingUnit::GeneratingUnit() {}; -GeneratingUnit::~GeneratingUnit() {}; +GeneratingUnit::GeneratingUnit() {} +GeneratingUnit::~GeneratingUnit() {} static const std::list PossibleProfilesForClass = { @@ -77,268 +61,303 @@ GeneratingUnit::getPossibleProfilesForAttributes() const return map; } +bool assign_ControlAreaGeneratingUnit_GeneratingUnit(BaseClass*, BaseClass*); +bool assign_GeneratingUnit_ControlAreaGeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + ControlAreaGeneratingUnit* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->ControlAreaGeneratingUnit.begin(), element->ControlAreaGeneratingUnit.end(), element2) == element->ControlAreaGeneratingUnit.end()) + { + element->ControlAreaGeneratingUnit.push_back(element2); + return assign_ControlAreaGeneratingUnit_GeneratingUnit(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_GeneratingUnit_genControlSource(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GrossToNetActivePowerCurve_GeneratingUnit(BaseClass*, BaseClass*); +bool assign_GeneratingUnit_GrossToNetActivePowerCurves(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + GrossToNetActivePowerCurve* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->GrossToNetActivePowerCurves.begin(), element->GrossToNetActivePowerCurves.end(), element2) == element->GrossToNetActivePowerCurves.end()) + { + element->GrossToNetActivePowerCurves.push_back(element2); + return assign_GrossToNetActivePowerCurve_GeneratingUnit(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_RotatingMachine_GeneratingUnit(BaseClass*, BaseClass*); +bool assign_GeneratingUnit_RotatingMachine(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + RotatingMachine* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->RotatingMachine.begin(), element->RotatingMachine.end(), element2) == element->RotatingMachine.end()) + { + element->RotatingMachine.push_back(element2); + return assign_RotatingMachine_GeneratingUnit(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_GeneratingUnit_genControlSource(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->genControlSource; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_governorSCD(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_governorSCD(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->governorSCD; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_longPF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_longPF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->longPF; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_maxOperatingP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_maxOperatingP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxOperatingP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_maximumAllowableSpinningReserve(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_maximumAllowableSpinningReserve(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maximumAllowableSpinningReserve; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_minOperatingP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_minOperatingP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minOperatingP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_nominalP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_nominalP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nominalP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_normalPF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_normalPF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->normalPF; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_ratedGrossMaxP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_ratedGrossMaxP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedGrossMaxP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_ratedGrossMinP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_ratedGrossMinP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedGrossMinP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_ratedNetMaxP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_ratedNetMaxP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedNetMaxP; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_shortPF(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_shortPF(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->shortPF; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_startupCost(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_startupCost(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->startupCost; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_startupTime(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_startupTime(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->startupTime; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_totalEfficiency(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_totalEfficiency(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->totalEfficiency; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GeneratingUnit_variableCost(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GeneratingUnit_variableCost(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->variableCost; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ControlAreaGeneratingUnit_GeneratingUnit(BaseClass*, BaseClass*); -bool assign_GeneratingUnit_ControlAreaGeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) -{ - GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); - ControlAreaGeneratingUnit* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) - { - if (std::find(element->ControlAreaGeneratingUnit.begin(), element->ControlAreaGeneratingUnit.end(), element2) == element->ControlAreaGeneratingUnit.end()) - { - element->ControlAreaGeneratingUnit.push_back(element2); - return assign_ControlAreaGeneratingUnit_GeneratingUnit(BaseClass_ptr2, BaseClass_ptr1); - } - return true; - } - return false; -} -bool assign_GrossToNetActivePowerCurve_GeneratingUnit(BaseClass*, BaseClass*); -bool assign_GeneratingUnit_GrossToNetActivePowerCurves(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) -{ - GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); - GrossToNetActivePowerCurve* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) - { - if (std::find(element->GrossToNetActivePowerCurves.begin(), element->GrossToNetActivePowerCurves.end(), element2) == element->GrossToNetActivePowerCurves.end()) - { - element->GrossToNetActivePowerCurves.push_back(element2); - return assign_GrossToNetActivePowerCurve_GeneratingUnit(BaseClass_ptr2, BaseClass_ptr1); - } - return true; - } - return false; -} -bool assign_RotatingMachine_GeneratingUnit(BaseClass*, BaseClass*); -bool assign_GeneratingUnit_RotatingMachine(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + + +bool get_GeneratingUnit_genControlSource(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); - RotatingMachine* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (std::find(element->RotatingMachine.begin(), element->RotatingMachine.end(), element2) == element->RotatingMachine.end()) + buffer << element->genControlSource; + if (!buffer.str().empty()) { - element->RotatingMachine.push_back(element2); - return assign_RotatingMachine_GeneratingUnit(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } + buffer.setstate(std::ios::failbit); return false; } bool get_GeneratingUnit_governorSCD(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->governorSCD; if (!buffer.str().empty()) @@ -352,7 +371,8 @@ bool get_GeneratingUnit_governorSCD(const BaseClass* BaseClass_ptr1, std::string bool get_GeneratingUnit_longPF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->longPF; if (!buffer.str().empty()) @@ -366,7 +386,8 @@ bool get_GeneratingUnit_longPF(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_GeneratingUnit_maxOperatingP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxOperatingP; if (!buffer.str().empty()) @@ -380,7 +401,8 @@ bool get_GeneratingUnit_maxOperatingP(const BaseClass* BaseClass_ptr1, std::stri bool get_GeneratingUnit_maximumAllowableSpinningReserve(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maximumAllowableSpinningReserve; if (!buffer.str().empty()) @@ -394,7 +416,8 @@ bool get_GeneratingUnit_maximumAllowableSpinningReserve(const BaseClass* BaseCla bool get_GeneratingUnit_minOperatingP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minOperatingP; if (!buffer.str().empty()) @@ -408,7 +431,8 @@ bool get_GeneratingUnit_minOperatingP(const BaseClass* BaseClass_ptr1, std::stri bool get_GeneratingUnit_nominalP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nominalP; if (!buffer.str().empty()) @@ -422,7 +446,8 @@ bool get_GeneratingUnit_nominalP(const BaseClass* BaseClass_ptr1, std::stringstr bool get_GeneratingUnit_normalPF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->normalPF; if (!buffer.str().empty()) @@ -436,7 +461,8 @@ bool get_GeneratingUnit_normalPF(const BaseClass* BaseClass_ptr1, std::stringstr bool get_GeneratingUnit_ratedGrossMaxP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedGrossMaxP; if (!buffer.str().empty()) @@ -450,7 +476,8 @@ bool get_GeneratingUnit_ratedGrossMaxP(const BaseClass* BaseClass_ptr1, std::str bool get_GeneratingUnit_ratedGrossMinP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedGrossMinP; if (!buffer.str().empty()) @@ -464,7 +491,8 @@ bool get_GeneratingUnit_ratedGrossMinP(const BaseClass* BaseClass_ptr1, std::str bool get_GeneratingUnit_ratedNetMaxP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedNetMaxP; if (!buffer.str().empty()) @@ -478,7 +506,8 @@ bool get_GeneratingUnit_ratedNetMaxP(const BaseClass* BaseClass_ptr1, std::strin bool get_GeneratingUnit_shortPF(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortPF; if (!buffer.str().empty()) @@ -492,7 +521,8 @@ bool get_GeneratingUnit_shortPF(const BaseClass* BaseClass_ptr1, std::stringstre bool get_GeneratingUnit_startupCost(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->startupCost; if (!buffer.str().empty()) @@ -506,7 +536,8 @@ bool get_GeneratingUnit_startupCost(const BaseClass* BaseClass_ptr1, std::string bool get_GeneratingUnit_startupTime(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->startupTime; if (!buffer.str().empty()) @@ -520,7 +551,8 @@ bool get_GeneratingUnit_startupTime(const BaseClass* BaseClass_ptr1, std::string bool get_GeneratingUnit_totalEfficiency(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->totalEfficiency; if (!buffer.str().empty()) @@ -534,7 +566,8 @@ bool get_GeneratingUnit_totalEfficiency(const BaseClass* BaseClass_ptr1, std::st bool get_GeneratingUnit_variableCost(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->variableCost; if (!buffer.str().empty()) @@ -546,22 +579,6 @@ bool get_GeneratingUnit_variableCost(const BaseClass* BaseClass_ptr1, std::strin return false; } - - -bool get_GeneratingUnit_genControlSource(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const GeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->genControlSource; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char GeneratingUnit::debugName[] = "GeneratingUnit"; const char* GeneratingUnit::debugString() const { @@ -570,34 +587,34 @@ const char* GeneratingUnit::debugString() const void GeneratingUnit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GeneratingUnit"), &GeneratingUnit_factory)); + factory_map.emplace("cim:GeneratingUnit", &GeneratingUnit_factory); } void GeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.genControlSource"), &assign_GeneratingUnit_genControlSource)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.governorSCD"), &assign_GeneratingUnit_governorSCD)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.longPF"), &assign_GeneratingUnit_longPF)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.maxOperatingP"), &assign_GeneratingUnit_maxOperatingP)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.maximumAllowableSpinningReserve"), &assign_GeneratingUnit_maximumAllowableSpinningReserve)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.minOperatingP"), &assign_GeneratingUnit_minOperatingP)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.nominalP"), &assign_GeneratingUnit_nominalP)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.normalPF"), &assign_GeneratingUnit_normalPF)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.ratedGrossMaxP"), &assign_GeneratingUnit_ratedGrossMaxP)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.ratedGrossMinP"), &assign_GeneratingUnit_ratedGrossMinP)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.ratedNetMaxP"), &assign_GeneratingUnit_ratedNetMaxP)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.shortPF"), &assign_GeneratingUnit_shortPF)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.startupCost"), &assign_GeneratingUnit_startupCost)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.startupTime"), &assign_GeneratingUnit_startupTime)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.totalEfficiency"), &assign_GeneratingUnit_totalEfficiency)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.variableCost"), &assign_GeneratingUnit_variableCost)); + assign_map.emplace("cim:GeneratingUnit.genControlSource", &assign_GeneratingUnit_genControlSource); + assign_map.emplace("cim:GeneratingUnit.governorSCD", &assign_GeneratingUnit_governorSCD); + assign_map.emplace("cim:GeneratingUnit.longPF", &assign_GeneratingUnit_longPF); + assign_map.emplace("cim:GeneratingUnit.maxOperatingP", &assign_GeneratingUnit_maxOperatingP); + assign_map.emplace("cim:GeneratingUnit.maximumAllowableSpinningReserve", &assign_GeneratingUnit_maximumAllowableSpinningReserve); + assign_map.emplace("cim:GeneratingUnit.minOperatingP", &assign_GeneratingUnit_minOperatingP); + assign_map.emplace("cim:GeneratingUnit.nominalP", &assign_GeneratingUnit_nominalP); + assign_map.emplace("cim:GeneratingUnit.normalPF", &assign_GeneratingUnit_normalPF); + assign_map.emplace("cim:GeneratingUnit.ratedGrossMaxP", &assign_GeneratingUnit_ratedGrossMaxP); + assign_map.emplace("cim:GeneratingUnit.ratedGrossMinP", &assign_GeneratingUnit_ratedGrossMinP); + assign_map.emplace("cim:GeneratingUnit.ratedNetMaxP", &assign_GeneratingUnit_ratedNetMaxP); + assign_map.emplace("cim:GeneratingUnit.shortPF", &assign_GeneratingUnit_shortPF); + assign_map.emplace("cim:GeneratingUnit.startupCost", &assign_GeneratingUnit_startupCost); + assign_map.emplace("cim:GeneratingUnit.startupTime", &assign_GeneratingUnit_startupTime); + assign_map.emplace("cim:GeneratingUnit.totalEfficiency", &assign_GeneratingUnit_totalEfficiency); + assign_map.emplace("cim:GeneratingUnit.variableCost", &assign_GeneratingUnit_variableCost); } void GeneratingUnit::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.ControlAreaGeneratingUnit"), &assign_GeneratingUnit_ControlAreaGeneratingUnit)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.GrossToNetActivePowerCurves"), &assign_GeneratingUnit_GrossToNetActivePowerCurves)); - assign_map.insert(std::make_pair(std::string("cim:GeneratingUnit.RotatingMachine"), &assign_GeneratingUnit_RotatingMachine)); + assign_map.emplace("cim:GeneratingUnit.ControlAreaGeneratingUnit", &assign_GeneratingUnit_ControlAreaGeneratingUnit); + assign_map.emplace("cim:GeneratingUnit.GrossToNetActivePowerCurves", &assign_GeneratingUnit_GrossToNetActivePowerCurves); + assign_map.emplace("cim:GeneratingUnit.RotatingMachine", &assign_GeneratingUnit_RotatingMachine); } void GeneratingUnit::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/GeneratingUnit.hpp b/CGMES_3.0.0/GeneratingUnit.hpp index 97c91d0cb..6581cdd92 100644 --- a/CGMES_3.0.0/GeneratingUnit.hpp +++ b/CGMES_3.0.0/GeneratingUnit.hpp @@ -25,9 +25,7 @@ namespace CIMPP class GrossToNetActivePowerCurve; class RotatingMachine; - /* - A single or set of synchronous machines for converting mechanical power into alternating-current power. For example, individual machines within a set may be defined for scheduling purposes while a single control signal is derived for the set. In this case there would be a GeneratingUnit for each member of the set and an additional GeneratingUnit corresponding to the set. - */ + /** \brief A single or set of synchronous machines for converting mechanical power into alternating-current power. For example, individual machines within a set may be defined for scheduling purposes while a single control signal is derived for the set. In this case there would be a GeneratingUnit for each member of the set and an additional GeneratingUnit corresponding to the set. */ class GeneratingUnit : public Equipment { public: @@ -35,25 +33,62 @@ namespace CIMPP GeneratingUnit(); ~GeneratingUnit() override; - std::list ControlAreaGeneratingUnit; /* ControlArea specifications for this generating unit. Default: 0 */ - std::list GrossToNetActivePowerCurves; /* A generating unit may have a gross active power to net active power curve, describing the losses and auxiliary power requirements of the unit. Default: 0 */ - std::list RotatingMachine; /* A synchronous machine may operate as a generator and as such becomes a member of a generating unit. Default: 0 */ - CIMPP::GeneratorControlSource genControlSource; /* The source of controls for a generating unit. Defines the control status of the generating unit. Default: 0 */ - CIMPP::PerCent governorSCD; /* Governor Speed Changer Droop. This is the change in generator power output divided by the change in frequency normalized by the nominal power of the generator and the nominal frequency and expressed in percent and negated. A positive value of speed change droop provides additional generator output upon a drop in frequency. Default: nullptr */ - CIMPP::Float longPF; /* Generating unit long term economic participation factor. Default: 0.0 */ - CIMPP::ActivePower maxOperatingP; /* This is the maximum operating active power limit the dispatcher can enter for this unit. Default: nullptr */ - CIMPP::ActivePower maximumAllowableSpinningReserve; /* Maximum allowable spinning reserve. Spinning reserve will never be considered greater than this value regardless of the current operating point. Default: nullptr */ - CIMPP::ActivePower minOperatingP; /* This is the minimum operating active power limit the dispatcher can enter for this unit. Default: nullptr */ - CIMPP::ActivePower nominalP; /* The nominal power of the generating unit. Used to give precise meaning to percentage based attributes such as the governor speed change droop (governorSCD attribute). The attribute shall be a positive value equal to or less than RotatingMachine.ratedS. Default: nullptr */ - CIMPP::Float normalPF; /* Generating unit economic participation factor. The sum of the participation factors across generating units does not have to sum to one. It is used for representing distributed slack participation factor. The attribute shall be a positive value or zero. Default: 0.0 */ - CIMPP::ActivePower ratedGrossMaxP; /* The unit`s gross rated maximum capacity (book value). The attribute shall be a positive value. Default: nullptr */ - CIMPP::ActivePower ratedGrossMinP; /* The gross rated minimum generation level which the unit can safely operate at while delivering power to the transmission grid. The attribute shall be a positive value. Default: nullptr */ - CIMPP::ActivePower ratedNetMaxP; /* The net rated maximum capacity determined by subtracting the auxiliary power used to operate the internal plant machinery from the rated gross maximum capacity. The attribute shall be a positive value. Default: nullptr */ - CIMPP::Float shortPF; /* Generating unit short term economic participation factor. Default: 0.0 */ - CIMPP::Money startupCost; /* The initial startup cost incurred for each start of the GeneratingUnit. Default: nullptr */ - CIMPP::Seconds startupTime; /* Time it takes to get the unit on-line, from the time that the prime mover mechanical power is applied. Default: nullptr */ - CIMPP::PerCent totalEfficiency; /* The efficiency of the unit in converting the fuel into electrical energy. Default: nullptr */ - CIMPP::Money variableCost; /* The variable cost component of production per unit of ActivePower. Default: nullptr */ + /** \brief ControlArea specifications for this generating unit. Default: 0 */ + std::list ControlAreaGeneratingUnit; + + /** \brief A generating unit may have a gross active power to net active power curve, describing the losses and auxiliary power requirements of the unit. Default: 0 */ + std::list GrossToNetActivePowerCurves; + + /** \brief A synchronous machine may operate as a generator and as such becomes a member of a generating unit. Default: 0 */ + std::list RotatingMachine; + + /** \brief The source of controls for a generating unit. Defines the control status of the generating unit. Default: 0 */ + CIMPP::GeneratorControlSource genControlSource; + + /** \brief Governor Speed Changer Droop. This is the change in generator power output divided by the change in frequency normalized by the nominal power of the generator and the nominal frequency and expressed in percent and negated. A positive value of speed change droop provides additional generator output upon a drop in frequency. Default: nullptr */ + CIMPP::PerCent governorSCD; + + /** \brief Generating unit long term economic participation factor. Default: 0.0 */ + CIMPP::Float longPF; + + /** \brief This is the maximum operating active power limit the dispatcher can enter for this unit. Default: nullptr */ + CIMPP::ActivePower maxOperatingP; + + /** \brief Maximum allowable spinning reserve. Spinning reserve will never be considered greater than this value regardless of the current operating point. Default: nullptr */ + CIMPP::ActivePower maximumAllowableSpinningReserve; + + /** \brief This is the minimum operating active power limit the dispatcher can enter for this unit. Default: nullptr */ + CIMPP::ActivePower minOperatingP; + + /** \brief The nominal power of the generating unit. Used to give precise meaning to percentage based attributes such as the governor speed change droop (governorSCD attribute). The attribute shall be a positive value equal to or less than RotatingMachine.ratedS. Default: nullptr */ + CIMPP::ActivePower nominalP; + + /** \brief Generating unit economic participation factor. The sum of the participation factors across generating units does not have to sum to one. It is used for representing distributed slack participation factor. The attribute shall be a positive value or zero. Default: 0.0 */ + CIMPP::Float normalPF; + + /** \brief The unit`s gross rated maximum capacity (book value). The attribute shall be a positive value. Default: nullptr */ + CIMPP::ActivePower ratedGrossMaxP; + + /** \brief The gross rated minimum generation level which the unit can safely operate at while delivering power to the transmission grid. The attribute shall be a positive value. Default: nullptr */ + CIMPP::ActivePower ratedGrossMinP; + + /** \brief The net rated maximum capacity determined by subtracting the auxiliary power used to operate the internal plant machinery from the rated gross maximum capacity. The attribute shall be a positive value. Default: nullptr */ + CIMPP::ActivePower ratedNetMaxP; + + /** \brief Generating unit short term economic participation factor. Default: 0.0 */ + CIMPP::Float shortPF; + + /** \brief The initial startup cost incurred for each start of the GeneratingUnit. Default: nullptr */ + CIMPP::Money startupCost; + + /** \brief Time it takes to get the unit on-line, from the time that the prime mover mechanical power is applied. Default: nullptr */ + CIMPP::Seconds startupTime; + + /** \brief The efficiency of the unit in converting the fuel into electrical energy. Default: nullptr */ + CIMPP::PerCent totalEfficiency; + + /** \brief The variable cost component of production per unit of ActivePower. Default: nullptr */ + CIMPP::Money variableCost; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GeneratorControlSource.cpp b/CGMES_3.0.0/GeneratorControlSource.cpp index 1850d2514..dade3b6eb 100644 --- a/CGMES_3.0.0/GeneratorControlSource.cpp +++ b/CGMES_3.0.0/GeneratorControlSource.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "GeneratorControlSource") + if (EnumSymbol.substr(0, pos) != "GeneratorControlSource") { lop.setstate(std::ios::failbit); return lop; @@ -50,22 +50,22 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "unavailable") + if (EnumSymbol == "unavailable") { rop = GeneratorControlSource::unavailable; return lop; } - if(EnumSymbol == "offAGC") + if (EnumSymbol == "offAGC") { rop = GeneratorControlSource::offAGC; return lop; } - if(EnumSymbol == "onAGC") + if (EnumSymbol == "onAGC") { rop = GeneratorControlSource::onAGC; return lop; } - if(EnumSymbol == "plantControl") + if (EnumSymbol == "plantControl") { rop = GeneratorControlSource::plantControl; return lop; diff --git a/CGMES_3.0.0/GeneratorControlSource.hpp b/CGMES_3.0.0/GeneratorControlSource.hpp index 463a53ab3..28b3b722f 100644 --- a/CGMES_3.0.0/GeneratorControlSource.hpp +++ b/CGMES_3.0.0/GeneratorControlSource.hpp @@ -9,29 +9,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The source of controls for a generating unit. - */ + /** \brief The source of controls for a generating unit. */ class GeneratorControlSource { public: enum GeneratorControlSource_ENUM { - /** - * Not available. - */ + /** Not available. */ unavailable, - /** - * Off of automatic generation control (AGC). - */ + /** Off of automatic generation control (AGC). */ offAGC, - /** - * On automatic generation control (AGC). - */ + /** On automatic generation control (AGC). */ onAGC, - /** - * Plant is controlling. - */ + /** Plant is controlling. */ plantControl, }; diff --git a/CGMES_3.0.0/GenericNonLinearLoadModelKind.cpp b/CGMES_3.0.0/GenericNonLinearLoadModelKind.cpp index 2d1052ed1..037223a57 100644 --- a/CGMES_3.0.0/GenericNonLinearLoadModelKind.cpp +++ b/CGMES_3.0.0/GenericNonLinearLoadModelKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "GenericNonLinearLoadModelKind") + if (EnumSymbol.substr(0, pos) != "GenericNonLinearLoadModelKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,12 +50,12 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "exponentialRecovery") + if (EnumSymbol == "exponentialRecovery") { rop = GenericNonLinearLoadModelKind::exponentialRecovery; return lop; } - if(EnumSymbol == "loadAdaptive") + if (EnumSymbol == "loadAdaptive") { rop = GenericNonLinearLoadModelKind::loadAdaptive; return lop; diff --git a/CGMES_3.0.0/GenericNonLinearLoadModelKind.hpp b/CGMES_3.0.0/GenericNonLinearLoadModelKind.hpp index 7b6aa0c38..48f94578a 100644 --- a/CGMES_3.0.0/GenericNonLinearLoadModelKind.hpp +++ b/CGMES_3.0.0/GenericNonLinearLoadModelKind.hpp @@ -9,21 +9,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of generic non-linear load model. - */ + /** \brief Type of generic non-linear load model. */ class GenericNonLinearLoadModelKind { public: enum GenericNonLinearLoadModelKind_ENUM { - /** - * Exponential recovery model. - */ + /** Exponential recovery model. */ exponentialRecovery, - /** - * Load adaptive model. - */ + /** Load adaptive model. */ loadAdaptive, }; diff --git a/CGMES_3.0.0/GeographicalRegion.cpp b/CGMES_3.0.0/GeographicalRegion.cpp index d5bdd78d5..f86e655ef 100644 --- a/CGMES_3.0.0/GeographicalRegion.cpp +++ b/CGMES_3.0.0/GeographicalRegion.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -GeographicalRegion::GeographicalRegion() {}; -GeographicalRegion::~GeographicalRegion() {}; +GeographicalRegion::GeographicalRegion() {} +GeographicalRegion::~GeographicalRegion() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ GeographicalRegion::getPossibleProfilesForAttributes() const return map; } - - bool assign_SubGeographicalRegion_Region(BaseClass*, BaseClass*); bool assign_GeographicalRegion_Regions(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,7 +59,6 @@ bool assign_GeographicalRegion_Regions(BaseClass* BaseClass_ptr1, BaseClass* Bas } - const char GeographicalRegion::debugName[] = "GeographicalRegion"; const char* GeographicalRegion::debugString() const { @@ -70,7 +67,7 @@ const char* GeographicalRegion::debugString() const void GeographicalRegion::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GeographicalRegion"), &GeographicalRegion_factory)); + factory_map.emplace("cim:GeographicalRegion", &GeographicalRegion_factory); } void GeographicalRegion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -79,7 +76,7 @@ void GeographicalRegion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GeographicalRegion.Regions"), &assign_GeographicalRegion_Regions)); + assign_map.emplace("cim:GeographicalRegion.Regions", &assign_GeographicalRegion_Regions); } void GeographicalRegion::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/GeographicalRegion.hpp b/CGMES_3.0.0/GeographicalRegion.hpp index 2e76ec7af..64b543181 100644 --- a/CGMES_3.0.0/GeographicalRegion.hpp +++ b/CGMES_3.0.0/GeographicalRegion.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class SubGeographicalRegion; - /* - A geographical region of a power system network model. - */ + /** \brief A geographical region of a power system network model. */ class GeographicalRegion : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP GeographicalRegion(); ~GeographicalRegion() override; - std::list Regions; /* All sub-geographical regions within this geographical region. Default: 0 */ + /** \brief All sub-geographical regions within this geographical region. Default: 0 */ + std::list Regions; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GovCT1.cpp b/CGMES_3.0.0/GovCT1.cpp index 6355b7ed1..c8ede5eab 100644 --- a/CGMES_3.0.0/GovCT1.cpp +++ b/CGMES_3.0.0/GovCT1.cpp @@ -8,46 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "DroopSignalFeedbackKind.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" using namespace CIMPP; -GovCT1::GovCT1() {}; -GovCT1::~GovCT1() {}; +GovCT1::GovCT1() {} +GovCT1::~GovCT1() {} static const std::list PossibleProfilesForClass = { @@ -108,467 +73,500 @@ GovCT1::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovCT1_aset(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_aset(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->aset; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_db(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_db(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_dm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_dm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_kdgov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_kdgov(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kdgov; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_kigov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_kigov(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kigov; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_kiload(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_kiload(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kiload; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_kimw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_kimw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kimw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_kpgov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_kpgov(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpgov; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_kpload(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_kpload(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpload; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_kturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_kturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_ldref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_ldref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ldref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_maxerr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_maxerr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxerr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_minerr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_minerr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minerr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_rclose(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_rclose(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rclose; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_rdown(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_rdown(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rdown; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_ropen(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_ropen(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ropen; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_rselect(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_rselect(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rselect; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_rup(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_rup(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rup; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_tact(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_tact(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tact; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_tdgov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_tdgov(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdgov; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_teng(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_teng(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->teng; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_tfload(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_tfload(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tfload; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_tpelec(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_tpelec(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpelec; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_tsa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_tsa(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tsa; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_tsb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_tsb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tsb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_vmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_vmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_wfnl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_wfnl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wfnl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT1_wfspd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT1_wfspd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT1* element = dynamic_cast(BaseClass_ptr1)) + GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wfspd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovCT1_aset(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->aset; if (!buffer.str().empty()) @@ -582,7 +580,8 @@ bool get_GovCT1_aset(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_db(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db; if (!buffer.str().empty()) @@ -596,7 +595,8 @@ bool get_GovCT1_db(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_dm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dm; if (!buffer.str().empty()) @@ -610,7 +610,8 @@ bool get_GovCT1_dm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -624,7 +625,8 @@ bool get_GovCT1_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_kdgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdgov; if (!buffer.str().empty()) @@ -638,7 +640,8 @@ bool get_GovCT1_kdgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT1_kigov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kigov; if (!buffer.str().empty()) @@ -652,7 +655,8 @@ bool get_GovCT1_kigov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT1_kiload(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kiload; if (!buffer.str().empty()) @@ -666,7 +670,8 @@ bool get_GovCT1_kiload(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT1_kimw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kimw; if (!buffer.str().empty()) @@ -680,7 +685,8 @@ bool get_GovCT1_kimw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_kpgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpgov; if (!buffer.str().empty()) @@ -694,7 +700,8 @@ bool get_GovCT1_kpgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT1_kpload(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpload; if (!buffer.str().empty()) @@ -708,7 +715,8 @@ bool get_GovCT1_kpload(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT1_kturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kturb; if (!buffer.str().empty()) @@ -722,7 +730,8 @@ bool get_GovCT1_kturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT1_ldref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ldref; if (!buffer.str().empty()) @@ -736,7 +745,8 @@ bool get_GovCT1_ldref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT1_maxerr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxerr; if (!buffer.str().empty()) @@ -750,7 +760,8 @@ bool get_GovCT1_maxerr(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT1_minerr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minerr; if (!buffer.str().empty()) @@ -764,7 +775,8 @@ bool get_GovCT1_minerr(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -778,7 +790,8 @@ bool get_GovCT1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT1_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -792,7 +805,8 @@ bool get_GovCT1_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_rclose(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rclose; if (!buffer.str().empty()) @@ -806,7 +820,8 @@ bool get_GovCT1_rclose(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT1_rdown(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rdown; if (!buffer.str().empty()) @@ -820,7 +835,8 @@ bool get_GovCT1_rdown(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT1_ropen(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ropen; if (!buffer.str().empty()) @@ -832,9 +848,25 @@ bool get_GovCT1_ropen(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } +bool get_GovCT1_rselect(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->rselect; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_GovCT1_rup(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rup; if (!buffer.str().empty()) @@ -848,7 +880,8 @@ bool get_GovCT1_rup(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -862,7 +895,8 @@ bool get_GovCT1_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_tact(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tact; if (!buffer.str().empty()) @@ -876,7 +910,8 @@ bool get_GovCT1_tact(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -890,7 +925,8 @@ bool get_GovCT1_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -904,7 +940,8 @@ bool get_GovCT1_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_tdgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdgov; if (!buffer.str().empty()) @@ -918,7 +955,8 @@ bool get_GovCT1_tdgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT1_teng(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->teng; if (!buffer.str().empty()) @@ -932,7 +970,8 @@ bool get_GovCT1_teng(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_tfload(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tfload; if (!buffer.str().empty()) @@ -946,7 +985,8 @@ bool get_GovCT1_tfload(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT1_tpelec(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpelec; if (!buffer.str().empty()) @@ -960,7 +1000,8 @@ bool get_GovCT1_tpelec(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT1_tsa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tsa; if (!buffer.str().empty()) @@ -974,7 +1015,8 @@ bool get_GovCT1_tsa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_tsb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tsb; if (!buffer.str().empty()) @@ -988,7 +1030,8 @@ bool get_GovCT1_tsb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmax; if (!buffer.str().empty()) @@ -1002,7 +1045,8 @@ bool get_GovCT1_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmin; if (!buffer.str().empty()) @@ -1016,7 +1060,8 @@ bool get_GovCT1_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_wfnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wfnl; if (!buffer.str().empty()) @@ -1030,7 +1075,8 @@ bool get_GovCT1_wfnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT1_wfspd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) + const GovCT1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wfspd; if (!buffer.str().empty()) @@ -1042,22 +1088,6 @@ bool get_GovCT1_wfspd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - -bool get_GovCT1_rselect(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const GovCT1* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->rselect; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char GovCT1::debugName[] = "GovCT1"; const char* GovCT1::debugString() const { @@ -1066,46 +1096,46 @@ const char* GovCT1::debugString() const void GovCT1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovCT1"), &GovCT1_factory)); + factory_map.emplace("cim:GovCT1", &GovCT1_factory); } void GovCT1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovCT1.aset"), &assign_GovCT1_aset)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.db"), &assign_GovCT1_db)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.dm"), &assign_GovCT1_dm)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.ka"), &assign_GovCT1_ka)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.kdgov"), &assign_GovCT1_kdgov)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.kigov"), &assign_GovCT1_kigov)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.kiload"), &assign_GovCT1_kiload)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.kimw"), &assign_GovCT1_kimw)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.kpgov"), &assign_GovCT1_kpgov)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.kpload"), &assign_GovCT1_kpload)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.kturb"), &assign_GovCT1_kturb)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.ldref"), &assign_GovCT1_ldref)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.maxerr"), &assign_GovCT1_maxerr)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.minerr"), &assign_GovCT1_minerr)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.mwbase"), &assign_GovCT1_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.r"), &assign_GovCT1_r)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.rclose"), &assign_GovCT1_rclose)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.rdown"), &assign_GovCT1_rdown)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.ropen"), &assign_GovCT1_ropen)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.rselect"), &assign_GovCT1_rselect)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.rup"), &assign_GovCT1_rup)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.ta"), &assign_GovCT1_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.tact"), &assign_GovCT1_tact)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.tb"), &assign_GovCT1_tb)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.tc"), &assign_GovCT1_tc)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.tdgov"), &assign_GovCT1_tdgov)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.teng"), &assign_GovCT1_teng)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.tfload"), &assign_GovCT1_tfload)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.tpelec"), &assign_GovCT1_tpelec)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.tsa"), &assign_GovCT1_tsa)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.tsb"), &assign_GovCT1_tsb)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.vmax"), &assign_GovCT1_vmax)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.vmin"), &assign_GovCT1_vmin)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.wfnl"), &assign_GovCT1_wfnl)); - assign_map.insert(std::make_pair(std::string("cim:GovCT1.wfspd"), &assign_GovCT1_wfspd)); + assign_map.emplace("cim:GovCT1.aset", &assign_GovCT1_aset); + assign_map.emplace("cim:GovCT1.db", &assign_GovCT1_db); + assign_map.emplace("cim:GovCT1.dm", &assign_GovCT1_dm); + assign_map.emplace("cim:GovCT1.ka", &assign_GovCT1_ka); + assign_map.emplace("cim:GovCT1.kdgov", &assign_GovCT1_kdgov); + assign_map.emplace("cim:GovCT1.kigov", &assign_GovCT1_kigov); + assign_map.emplace("cim:GovCT1.kiload", &assign_GovCT1_kiload); + assign_map.emplace("cim:GovCT1.kimw", &assign_GovCT1_kimw); + assign_map.emplace("cim:GovCT1.kpgov", &assign_GovCT1_kpgov); + assign_map.emplace("cim:GovCT1.kpload", &assign_GovCT1_kpload); + assign_map.emplace("cim:GovCT1.kturb", &assign_GovCT1_kturb); + assign_map.emplace("cim:GovCT1.ldref", &assign_GovCT1_ldref); + assign_map.emplace("cim:GovCT1.maxerr", &assign_GovCT1_maxerr); + assign_map.emplace("cim:GovCT1.minerr", &assign_GovCT1_minerr); + assign_map.emplace("cim:GovCT1.mwbase", &assign_GovCT1_mwbase); + assign_map.emplace("cim:GovCT1.r", &assign_GovCT1_r); + assign_map.emplace("cim:GovCT1.rclose", &assign_GovCT1_rclose); + assign_map.emplace("cim:GovCT1.rdown", &assign_GovCT1_rdown); + assign_map.emplace("cim:GovCT1.ropen", &assign_GovCT1_ropen); + assign_map.emplace("cim:GovCT1.rselect", &assign_GovCT1_rselect); + assign_map.emplace("cim:GovCT1.rup", &assign_GovCT1_rup); + assign_map.emplace("cim:GovCT1.ta", &assign_GovCT1_ta); + assign_map.emplace("cim:GovCT1.tact", &assign_GovCT1_tact); + assign_map.emplace("cim:GovCT1.tb", &assign_GovCT1_tb); + assign_map.emplace("cim:GovCT1.tc", &assign_GovCT1_tc); + assign_map.emplace("cim:GovCT1.tdgov", &assign_GovCT1_tdgov); + assign_map.emplace("cim:GovCT1.teng", &assign_GovCT1_teng); + assign_map.emplace("cim:GovCT1.tfload", &assign_GovCT1_tfload); + assign_map.emplace("cim:GovCT1.tpelec", &assign_GovCT1_tpelec); + assign_map.emplace("cim:GovCT1.tsa", &assign_GovCT1_tsa); + assign_map.emplace("cim:GovCT1.tsb", &assign_GovCT1_tsb); + assign_map.emplace("cim:GovCT1.vmax", &assign_GovCT1_vmax); + assign_map.emplace("cim:GovCT1.vmin", &assign_GovCT1_vmin); + assign_map.emplace("cim:GovCT1.wfnl", &assign_GovCT1_wfnl); + assign_map.emplace("cim:GovCT1.wfspd", &assign_GovCT1_wfspd); } void GovCT1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/GovCT1.hpp b/CGMES_3.0.0/GovCT1.hpp index a2d4b630c..4967c3f4a 100644 --- a/CGMES_3.0.0/GovCT1.hpp +++ b/CGMES_3.0.0/GovCT1.hpp @@ -22,9 +22,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - General model for any prime mover with a PID governor, used primarily for combustion turbine and combined cycle units. This model can be used to represent a variety of prime movers controlled by PID governors. It is suitable, for example, for the representation of:
  • gas turbine and single shaft combined cycle turbines
  • diesel engines with modern electronic or digital governors
  • steam turbines where steam is supplied from a large boiler drum or a large header whose pressure is substantially constant over the period under study
  • simple hydro turbines in dam configurations where the water column length is short and water inertia effects are minimal.
Additional information on this model is available in the 2012 IEEE report, Dynamic Models for Turbine-Governors in Power System Studies, 3.1.2.3 pages 3-4 (GGOV1). - */ + /** \brief General model for any prime mover with a PID governor, used primarily for combustion turbine and combined cycle units. This model can be used to represent a variety of prime movers controlled by PID governors. It is suitable, for example, for the representation of:
  • gas turbine and single shaft combined cycle turbines
  • diesel engines with modern electronic or digital governors
  • steam turbines where steam is supplied from a large boiler drum or a large header whose pressure is substantially constant over the period under study
  • simple hydro turbines in dam configurations where the water column length is short and water inertia effects are minimal.
Additional information on this model is available in the 2012 IEEE report, Dynamic Models for Turbine-Governors in Power System Studies, 3.1.2.3 pages 3-4 (GGOV1). */ class GovCT1 : public TurbineGovernorDynamics { public: @@ -32,41 +30,110 @@ namespace CIMPP GovCT1(); ~GovCT1() override; - CIMPP::Float aset; /* Acceleration limiter setpoint (<i>Aset</i>). Unit = PU / s. Typical value = 0,01. Default: 0.0 */ - CIMPP::PU db; /* Speed governor deadband in PU speed (<i>db</i>). In the majority of applications, it is recommended that this value be set to zero. Typical value = 0. Default: nullptr */ - CIMPP::PU dm; /* Speed sensitivity coefficient (<i>Dm</i>). <i>Dm</i> can represent either the variation of the engine power with the shaft speed or the variation of maximum power capability with shaft speed. If it is positive it describes the falling slope of the engine speed verses power characteristic as speed increases. A slightly falling characteristic is typical for reciprocating engines and some aero-derivative turbines. If it is negative the engine power is assumed to be unaffected by the shaft speed, but the maximum permissible fuel flow is taken to fall with falling shaft speed. This is characteristic of single-shaft industrial turbines due to exhaust temperature limits. Typical value = 0. Default: nullptr */ - CIMPP::PU ka; /* Acceleration limiter gain (<i>Ka</i>). Typical value = 10. Default: nullptr */ - CIMPP::PU kdgov; /* Governor derivative gain (<i>Kdgov</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU kigov; /* Governor integral gain (<i>Kigov</i>). Typical value = 2. Default: nullptr */ - CIMPP::PU kiload; /* Load limiter integral gain for PI controller (<i>Kiload</i>). Typical value = 0,67. Default: nullptr */ - CIMPP::PU kimw; /* Power controller (reset) gain (<i>Kimw</i>). The default value of 0,01 corresponds to a reset time of 100 s. A value of 0,001 corresponds to a relatively slow-acting load controller. Typical value = 0,01. Default: nullptr */ - CIMPP::PU kpgov; /* Governor proportional gain (<i>Kpgov</i>). Typical value = 10. Default: nullptr */ - CIMPP::PU kpload; /* Load limiter proportional gain for PI controller (<i>Kpload</i>). Typical value = 2. Default: nullptr */ - CIMPP::PU kturb; /* Turbine gain (<i>Kturb</i>) (&gt; 0). Typical value = 1,5. Default: nullptr */ - CIMPP::PU ldref; /* Load limiter reference value (<i>Ldref</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU maxerr; /* Maximum value for speed error signal (<i>maxerr</i>) (&gt; GovCT1.minerr). Typical value = 0,05. Default: nullptr */ - CIMPP::PU minerr; /* Minimum value for speed error signal (<i>minerr</i>) (&lt; GovCT1.maxerr). Typical value = -0,05. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ - CIMPP::PU r; /* Permanent droop (<i>R</i>). Typical value = 0,04. Default: nullptr */ - CIMPP::Float rclose; /* Minimum valve closing rate (<i>Rclose</i>). Unit = PU / s. Typical value = -0,1. Default: 0.0 */ - CIMPP::PU rdown; /* Maximum rate of load limit decrease (<i>Rdown</i>). Typical value = -99. Default: nullptr */ - CIMPP::Float ropen; /* Maximum valve opening rate (<i>Ropen</i>). Unit = PU / s. Typical value = 0.10. Default: 0.0 */ - CIMPP::DroopSignalFeedbackKind rselect; /* Feedback signal for droop (<i>Rselect</i>). Typical value = electricalPower. Default: 0 */ - CIMPP::PU rup; /* Maximum rate of load limit increase (<i>Rup</i>). Typical value = 99. Default: nullptr */ - CIMPP::Seconds ta; /* Acceleration limiter time constant (<i>Ta</i>) (&gt; 0). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds tact; /* Actuator time constant (<i>Tact</i>) (&gt;= 0). Typical value = 0,5. Default: nullptr */ - CIMPP::Seconds tb; /* Turbine lag time constant (<i>Tb</i>) (&gt; 0). Typical value = 0,5. Default: nullptr */ - CIMPP::Seconds tc; /* Turbine lead time constant (<i>Tc</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tdgov; /* Governor derivative controller time constant (<i>Tdgov</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::Seconds teng; /* Transport time delay for diesel engine used in representing diesel engines where there is a small but measurable transport delay between a change in fuel flow setting and the development of torque (<i>Teng</i>) (&gt;= 0). <i>Teng</i> should be zero in all but special cases where this transport delay is of particular concern. Typical value = 0. Default: nullptr */ - CIMPP::Seconds tfload; /* Load-limiter time constant (<i>Tfload</i>) (&gt; 0). Typical value = 3. Default: nullptr */ - CIMPP::Seconds tpelec; /* Electrical power transducer time constant (<i>Tpelec</i>) (&gt; 0). Typical value = 1. Default: nullptr */ - CIMPP::Seconds tsa; /* Temperature detection lead time constant (<i>Tsa</i>) (&gt;= 0). Typical value = 4. Default: nullptr */ - CIMPP::Seconds tsb; /* Temperature detection lag time constant (<i>Tsb</i>) (&gt;= 0). Typical value = 5. Default: nullptr */ - CIMPP::PU vmax; /* Maximum valve position limit (<i>Vmax</i>) (&gt; GovCT1.vmin). Typical value = 1. Default: nullptr */ - CIMPP::PU vmin; /* Minimum valve position limit (<i>Vmin</i>) (&lt; GovCT1.vmax). Typical value = 0,15. Default: nullptr */ - CIMPP::PU wfnl; /* No load fuel flow (<i>Wfnl</i>). Typical value = 0,2. Default: nullptr */ - CIMPP::Boolean wfspd; /* Switch for fuel source characteristic to recognize that fuel flow, for a given fuel valve stroke, can be proportional to engine speed (<i>Wfspd</i>). true = fuel flow proportional to speed (for some gas turbines and diesel engines with positive displacement fuel injectors) false = fuel control system keeps fuel flow independent of engine speed. Typical value = true. Default: false */ + /** \brief Acceleration limiter setpoint (<i>Aset</i>). Unit = PU / s. Typical value = 0,01. Default: 0.0 */ + CIMPP::Float aset; + + /** \brief Speed governor deadband in PU speed (<i>db</i>). In the majority of applications, it is recommended that this value be set to zero. Typical value = 0. Default: nullptr */ + CIMPP::PU db; + + /** \brief Speed sensitivity coefficient (<i>Dm</i>). <i>Dm</i> can represent either the variation of the engine power with the shaft speed or the variation of maximum power capability with shaft speed. If it is positive it describes the falling slope of the engine speed verses power characteristic as speed increases. A slightly falling characteristic is typical for reciprocating engines and some aero-derivative turbines. If it is negative the engine power is assumed to be unaffected by the shaft speed, but the maximum permissible fuel flow is taken to fall with falling shaft speed. This is characteristic of single-shaft industrial turbines due to exhaust temperature limits. Typical value = 0. Default: nullptr */ + CIMPP::PU dm; + + /** \brief Acceleration limiter gain (<i>Ka</i>). Typical value = 10. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Governor derivative gain (<i>Kdgov</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU kdgov; + + /** \brief Governor integral gain (<i>Kigov</i>). Typical value = 2. Default: nullptr */ + CIMPP::PU kigov; + + /** \brief Load limiter integral gain for PI controller (<i>Kiload</i>). Typical value = 0,67. Default: nullptr */ + CIMPP::PU kiload; + + /** \brief Power controller (reset) gain (<i>Kimw</i>). The default value of 0,01 corresponds to a reset time of 100 s. A value of 0,001 corresponds to a relatively slow-acting load controller. Typical value = 0,01. Default: nullptr */ + CIMPP::PU kimw; + + /** \brief Governor proportional gain (<i>Kpgov</i>). Typical value = 10. Default: nullptr */ + CIMPP::PU kpgov; + + /** \brief Load limiter proportional gain for PI controller (<i>Kpload</i>). Typical value = 2. Default: nullptr */ + CIMPP::PU kpload; + + /** \brief Turbine gain (<i>Kturb</i>) (&gt; 0). Typical value = 1,5. Default: nullptr */ + CIMPP::PU kturb; + + /** \brief Load limiter reference value (<i>Ldref</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU ldref; + + /** \brief Maximum value for speed error signal (<i>maxerr</i>) (&gt; GovCT1.minerr). Typical value = 0,05. Default: nullptr */ + CIMPP::PU maxerr; + + /** \brief Minimum value for speed error signal (<i>minerr</i>) (&lt; GovCT1.maxerr). Typical value = -0,05. Default: nullptr */ + CIMPP::PU minerr; + + /** \brief Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Permanent droop (<i>R</i>). Typical value = 0,04. Default: nullptr */ + CIMPP::PU r; + + /** \brief Minimum valve closing rate (<i>Rclose</i>). Unit = PU / s. Typical value = -0,1. Default: 0.0 */ + CIMPP::Float rclose; + + /** \brief Maximum rate of load limit decrease (<i>Rdown</i>). Typical value = -99. Default: nullptr */ + CIMPP::PU rdown; + + /** \brief Maximum valve opening rate (<i>Ropen</i>). Unit = PU / s. Typical value = 0.10. Default: 0.0 */ + CIMPP::Float ropen; + + /** \brief Feedback signal for droop (<i>Rselect</i>). Typical value = electricalPower. Default: 0 */ + CIMPP::DroopSignalFeedbackKind rselect; + + /** \brief Maximum rate of load limit increase (<i>Rup</i>). Typical value = 99. Default: nullptr */ + CIMPP::PU rup; + + /** \brief Acceleration limiter time constant (<i>Ta</i>) (&gt; 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Actuator time constant (<i>Tact</i>) (&gt;= 0). Typical value = 0,5. Default: nullptr */ + CIMPP::Seconds tact; + + /** \brief Turbine lag time constant (<i>Tb</i>) (&gt; 0). Typical value = 0,5. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Turbine lead time constant (<i>Tc</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Governor derivative controller time constant (<i>Tdgov</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tdgov; + + /** \brief Transport time delay for diesel engine used in representing diesel engines where there is a small but measurable transport delay between a change in fuel flow setting and the development of torque (<i>Teng</i>) (&gt;= 0). <i>Teng</i> should be zero in all but special cases where this transport delay is of particular concern. Typical value = 0. Default: nullptr */ + CIMPP::Seconds teng; + + /** \brief Load-limiter time constant (<i>Tfload</i>) (&gt; 0). Typical value = 3. Default: nullptr */ + CIMPP::Seconds tfload; + + /** \brief Electrical power transducer time constant (<i>Tpelec</i>) (&gt; 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tpelec; + + /** \brief Temperature detection lead time constant (<i>Tsa</i>) (&gt;= 0). Typical value = 4. Default: nullptr */ + CIMPP::Seconds tsa; + + /** \brief Temperature detection lag time constant (<i>Tsb</i>) (&gt;= 0). Typical value = 5. Default: nullptr */ + CIMPP::Seconds tsb; + + /** \brief Maximum valve position limit (<i>Vmax</i>) (&gt; GovCT1.vmin). Typical value = 1. Default: nullptr */ + CIMPP::PU vmax; + + /** \brief Minimum valve position limit (<i>Vmin</i>) (&lt; GovCT1.vmax). Typical value = 0,15. Default: nullptr */ + CIMPP::PU vmin; + + /** \brief No load fuel flow (<i>Wfnl</i>). Typical value = 0,2. Default: nullptr */ + CIMPP::PU wfnl; + + /** \brief Switch for fuel source characteristic to recognize that fuel flow, for a given fuel valve stroke, can be proportional to engine speed (<i>Wfspd</i>). true = fuel flow proportional to speed (for some gas turbines and diesel engines with positive displacement fuel injectors) false = fuel control system keeps fuel flow independent of engine speed. Typical value = true. Default: false */ + CIMPP::Boolean wfspd; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GovCT2.cpp b/CGMES_3.0.0/GovCT2.cpp index 6f26f1b19..482a2691f 100644 --- a/CGMES_3.0.0/GovCT2.cpp +++ b/CGMES_3.0.0/GovCT2.cpp @@ -8,67 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "DroopSignalFeedbackKind.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" using namespace CIMPP; -GovCT2::GovCT2() {}; -GovCT2::~GovCT2() {}; +GovCT2::GovCT2() {} +GovCT2::~GovCT2() {} static const std::list PossibleProfilesForClass = { @@ -150,740 +94,794 @@ GovCT2::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovCT2_aset(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_aset(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->aset; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_db(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_db(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_dm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_dm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_flim9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_flim9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flim9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_kdgov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_kdgov(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kdgov; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_kigov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_kigov(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kigov; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_kiload(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_kiload(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kiload; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_kimw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_kimw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kimw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_kpgov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_kpgov(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpgov; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_kpload(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_kpload(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpload; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_kturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_kturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_ldref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_ldref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ldref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_maxerr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_maxerr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxerr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_minerr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_minerr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minerr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_plim9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_plim9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->plim9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_prate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_prate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->prate; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_rclose(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_rclose(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rclose; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_rdown(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_rdown(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rdown; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_ropen(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_ropen(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ropen; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_rselect(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_rselect(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rselect; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_rup(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_rup(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rup; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_tact(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_tact(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tact; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_tdgov(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_tdgov(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdgov; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_teng(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_teng(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->teng; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_tfload(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_tfload(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tfload; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_tpelec(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_tpelec(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpelec; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_tsa(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_tsa(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tsa; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_tsb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_tsb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tsb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_vmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_vmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_wfnl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_wfnl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wfnl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovCT2_wfspd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovCT2_wfspd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovCT2* element = dynamic_cast(BaseClass_ptr1)) + GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wfspd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovCT2_aset(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->aset; if (!buffer.str().empty()) @@ -897,7 +895,8 @@ bool get_GovCT2_aset(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_db(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db; if (!buffer.str().empty()) @@ -911,7 +910,8 @@ bool get_GovCT2_db(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_dm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dm; if (!buffer.str().empty()) @@ -925,7 +925,8 @@ bool get_GovCT2_dm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_flim1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim1; if (!buffer.str().empty()) @@ -939,7 +940,8 @@ bool get_GovCT2_flim1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_flim10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim10; if (!buffer.str().empty()) @@ -953,7 +955,8 @@ bool get_GovCT2_flim10(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_flim2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim2; if (!buffer.str().empty()) @@ -967,7 +970,8 @@ bool get_GovCT2_flim2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_flim3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim3; if (!buffer.str().empty()) @@ -981,7 +985,8 @@ bool get_GovCT2_flim3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_flim4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim4; if (!buffer.str().empty()) @@ -995,7 +1000,8 @@ bool get_GovCT2_flim4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_flim5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim5; if (!buffer.str().empty()) @@ -1009,7 +1015,8 @@ bool get_GovCT2_flim5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_flim6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim6; if (!buffer.str().empty()) @@ -1023,7 +1030,8 @@ bool get_GovCT2_flim6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_flim7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim7; if (!buffer.str().empty()) @@ -1037,7 +1045,8 @@ bool get_GovCT2_flim7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_flim8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim8; if (!buffer.str().empty()) @@ -1051,7 +1060,8 @@ bool get_GovCT2_flim8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_flim9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flim9; if (!buffer.str().empty()) @@ -1065,7 +1075,8 @@ bool get_GovCT2_flim9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -1079,7 +1090,8 @@ bool get_GovCT2_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_kdgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdgov; if (!buffer.str().empty()) @@ -1093,7 +1105,8 @@ bool get_GovCT2_kdgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_kigov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kigov; if (!buffer.str().empty()) @@ -1107,7 +1120,8 @@ bool get_GovCT2_kigov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_kiload(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kiload; if (!buffer.str().empty()) @@ -1121,7 +1135,8 @@ bool get_GovCT2_kiload(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_kimw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kimw; if (!buffer.str().empty()) @@ -1135,7 +1150,8 @@ bool get_GovCT2_kimw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_kpgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpgov; if (!buffer.str().empty()) @@ -1149,7 +1165,8 @@ bool get_GovCT2_kpgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_kpload(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpload; if (!buffer.str().empty()) @@ -1163,7 +1180,8 @@ bool get_GovCT2_kpload(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_kturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kturb; if (!buffer.str().empty()) @@ -1177,7 +1195,8 @@ bool get_GovCT2_kturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_ldref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ldref; if (!buffer.str().empty()) @@ -1191,7 +1210,8 @@ bool get_GovCT2_ldref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_maxerr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxerr; if (!buffer.str().empty()) @@ -1205,7 +1225,8 @@ bool get_GovCT2_maxerr(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_minerr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minerr; if (!buffer.str().empty()) @@ -1219,7 +1240,8 @@ bool get_GovCT2_minerr(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -1233,7 +1255,8 @@ bool get_GovCT2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_plim1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim1; if (!buffer.str().empty()) @@ -1247,7 +1270,8 @@ bool get_GovCT2_plim1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_plim10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim10; if (!buffer.str().empty()) @@ -1261,7 +1285,8 @@ bool get_GovCT2_plim10(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_plim2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim2; if (!buffer.str().empty()) @@ -1275,7 +1300,8 @@ bool get_GovCT2_plim2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_plim3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim3; if (!buffer.str().empty()) @@ -1289,7 +1315,8 @@ bool get_GovCT2_plim3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_plim4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim4; if (!buffer.str().empty()) @@ -1303,7 +1330,8 @@ bool get_GovCT2_plim4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_plim5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim5; if (!buffer.str().empty()) @@ -1317,7 +1345,8 @@ bool get_GovCT2_plim5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_plim6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim6; if (!buffer.str().empty()) @@ -1331,7 +1360,8 @@ bool get_GovCT2_plim6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_plim7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim7; if (!buffer.str().empty()) @@ -1345,7 +1375,8 @@ bool get_GovCT2_plim7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_plim8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim8; if (!buffer.str().empty()) @@ -1359,7 +1390,8 @@ bool get_GovCT2_plim8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_plim9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->plim9; if (!buffer.str().empty()) @@ -1373,7 +1405,8 @@ bool get_GovCT2_plim9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_prate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->prate; if (!buffer.str().empty()) @@ -1387,7 +1420,8 @@ bool get_GovCT2_prate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -1401,7 +1435,8 @@ bool get_GovCT2_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_rclose(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rclose; if (!buffer.str().empty()) @@ -1415,7 +1450,8 @@ bool get_GovCT2_rclose(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_rdown(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rdown; if (!buffer.str().empty()) @@ -1429,7 +1465,8 @@ bool get_GovCT2_rdown(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_ropen(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ropen; if (!buffer.str().empty()) @@ -1441,9 +1478,25 @@ bool get_GovCT2_ropen(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } +bool get_GovCT2_rselect(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->rselect; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_GovCT2_rup(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rup; if (!buffer.str().empty()) @@ -1457,7 +1510,8 @@ bool get_GovCT2_rup(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -1471,7 +1525,8 @@ bool get_GovCT2_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_tact(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tact; if (!buffer.str().empty()) @@ -1485,7 +1540,8 @@ bool get_GovCT2_tact(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -1499,7 +1555,8 @@ bool get_GovCT2_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -1513,7 +1570,8 @@ bool get_GovCT2_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_tdgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdgov; if (!buffer.str().empty()) @@ -1527,7 +1585,8 @@ bool get_GovCT2_tdgov(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovCT2_teng(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->teng; if (!buffer.str().empty()) @@ -1541,7 +1600,8 @@ bool get_GovCT2_teng(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_tfload(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tfload; if (!buffer.str().empty()) @@ -1555,7 +1615,8 @@ bool get_GovCT2_tfload(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_tpelec(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpelec; if (!buffer.str().empty()) @@ -1569,7 +1630,8 @@ bool get_GovCT2_tpelec(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovCT2_tsa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tsa; if (!buffer.str().empty()) @@ -1583,7 +1645,8 @@ bool get_GovCT2_tsa(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_tsb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tsb; if (!buffer.str().empty()) @@ -1597,7 +1660,8 @@ bool get_GovCT2_tsb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmax; if (!buffer.str().empty()) @@ -1611,7 +1675,8 @@ bool get_GovCT2_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmin; if (!buffer.str().empty()) @@ -1625,7 +1690,8 @@ bool get_GovCT2_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_wfnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wfnl; if (!buffer.str().empty()) @@ -1639,7 +1705,8 @@ bool get_GovCT2_wfnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovCT2_wfspd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) + const GovCT2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wfspd; if (!buffer.str().empty()) @@ -1651,22 +1718,6 @@ bool get_GovCT2_wfspd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - -bool get_GovCT2_rselect(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const GovCT2* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->rselect; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char GovCT2::debugName[] = "GovCT2"; const char* GovCT2::debugString() const { @@ -1675,67 +1726,67 @@ const char* GovCT2::debugString() const void GovCT2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovCT2"), &GovCT2_factory)); + factory_map.emplace("cim:GovCT2", &GovCT2_factory); } void GovCT2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovCT2.aset"), &assign_GovCT2_aset)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.db"), &assign_GovCT2_db)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.dm"), &assign_GovCT2_dm)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim1"), &assign_GovCT2_flim1)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim10"), &assign_GovCT2_flim10)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim2"), &assign_GovCT2_flim2)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim3"), &assign_GovCT2_flim3)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim4"), &assign_GovCT2_flim4)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim5"), &assign_GovCT2_flim5)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim6"), &assign_GovCT2_flim6)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim7"), &assign_GovCT2_flim7)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim8"), &assign_GovCT2_flim8)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.flim9"), &assign_GovCT2_flim9)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.ka"), &assign_GovCT2_ka)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.kdgov"), &assign_GovCT2_kdgov)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.kigov"), &assign_GovCT2_kigov)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.kiload"), &assign_GovCT2_kiload)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.kimw"), &assign_GovCT2_kimw)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.kpgov"), &assign_GovCT2_kpgov)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.kpload"), &assign_GovCT2_kpload)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.kturb"), &assign_GovCT2_kturb)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.ldref"), &assign_GovCT2_ldref)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.maxerr"), &assign_GovCT2_maxerr)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.minerr"), &assign_GovCT2_minerr)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.mwbase"), &assign_GovCT2_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim1"), &assign_GovCT2_plim1)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim10"), &assign_GovCT2_plim10)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim2"), &assign_GovCT2_plim2)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim3"), &assign_GovCT2_plim3)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim4"), &assign_GovCT2_plim4)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim5"), &assign_GovCT2_plim5)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim6"), &assign_GovCT2_plim6)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim7"), &assign_GovCT2_plim7)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim8"), &assign_GovCT2_plim8)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.plim9"), &assign_GovCT2_plim9)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.prate"), &assign_GovCT2_prate)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.r"), &assign_GovCT2_r)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.rclose"), &assign_GovCT2_rclose)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.rdown"), &assign_GovCT2_rdown)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.ropen"), &assign_GovCT2_ropen)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.rselect"), &assign_GovCT2_rselect)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.rup"), &assign_GovCT2_rup)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.ta"), &assign_GovCT2_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.tact"), &assign_GovCT2_tact)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.tb"), &assign_GovCT2_tb)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.tc"), &assign_GovCT2_tc)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.tdgov"), &assign_GovCT2_tdgov)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.teng"), &assign_GovCT2_teng)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.tfload"), &assign_GovCT2_tfload)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.tpelec"), &assign_GovCT2_tpelec)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.tsa"), &assign_GovCT2_tsa)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.tsb"), &assign_GovCT2_tsb)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.vmax"), &assign_GovCT2_vmax)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.vmin"), &assign_GovCT2_vmin)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.wfnl"), &assign_GovCT2_wfnl)); - assign_map.insert(std::make_pair(std::string("cim:GovCT2.wfspd"), &assign_GovCT2_wfspd)); + assign_map.emplace("cim:GovCT2.aset", &assign_GovCT2_aset); + assign_map.emplace("cim:GovCT2.db", &assign_GovCT2_db); + assign_map.emplace("cim:GovCT2.dm", &assign_GovCT2_dm); + assign_map.emplace("cim:GovCT2.flim1", &assign_GovCT2_flim1); + assign_map.emplace("cim:GovCT2.flim10", &assign_GovCT2_flim10); + assign_map.emplace("cim:GovCT2.flim2", &assign_GovCT2_flim2); + assign_map.emplace("cim:GovCT2.flim3", &assign_GovCT2_flim3); + assign_map.emplace("cim:GovCT2.flim4", &assign_GovCT2_flim4); + assign_map.emplace("cim:GovCT2.flim5", &assign_GovCT2_flim5); + assign_map.emplace("cim:GovCT2.flim6", &assign_GovCT2_flim6); + assign_map.emplace("cim:GovCT2.flim7", &assign_GovCT2_flim7); + assign_map.emplace("cim:GovCT2.flim8", &assign_GovCT2_flim8); + assign_map.emplace("cim:GovCT2.flim9", &assign_GovCT2_flim9); + assign_map.emplace("cim:GovCT2.ka", &assign_GovCT2_ka); + assign_map.emplace("cim:GovCT2.kdgov", &assign_GovCT2_kdgov); + assign_map.emplace("cim:GovCT2.kigov", &assign_GovCT2_kigov); + assign_map.emplace("cim:GovCT2.kiload", &assign_GovCT2_kiload); + assign_map.emplace("cim:GovCT2.kimw", &assign_GovCT2_kimw); + assign_map.emplace("cim:GovCT2.kpgov", &assign_GovCT2_kpgov); + assign_map.emplace("cim:GovCT2.kpload", &assign_GovCT2_kpload); + assign_map.emplace("cim:GovCT2.kturb", &assign_GovCT2_kturb); + assign_map.emplace("cim:GovCT2.ldref", &assign_GovCT2_ldref); + assign_map.emplace("cim:GovCT2.maxerr", &assign_GovCT2_maxerr); + assign_map.emplace("cim:GovCT2.minerr", &assign_GovCT2_minerr); + assign_map.emplace("cim:GovCT2.mwbase", &assign_GovCT2_mwbase); + assign_map.emplace("cim:GovCT2.plim1", &assign_GovCT2_plim1); + assign_map.emplace("cim:GovCT2.plim10", &assign_GovCT2_plim10); + assign_map.emplace("cim:GovCT2.plim2", &assign_GovCT2_plim2); + assign_map.emplace("cim:GovCT2.plim3", &assign_GovCT2_plim3); + assign_map.emplace("cim:GovCT2.plim4", &assign_GovCT2_plim4); + assign_map.emplace("cim:GovCT2.plim5", &assign_GovCT2_plim5); + assign_map.emplace("cim:GovCT2.plim6", &assign_GovCT2_plim6); + assign_map.emplace("cim:GovCT2.plim7", &assign_GovCT2_plim7); + assign_map.emplace("cim:GovCT2.plim8", &assign_GovCT2_plim8); + assign_map.emplace("cim:GovCT2.plim9", &assign_GovCT2_plim9); + assign_map.emplace("cim:GovCT2.prate", &assign_GovCT2_prate); + assign_map.emplace("cim:GovCT2.r", &assign_GovCT2_r); + assign_map.emplace("cim:GovCT2.rclose", &assign_GovCT2_rclose); + assign_map.emplace("cim:GovCT2.rdown", &assign_GovCT2_rdown); + assign_map.emplace("cim:GovCT2.ropen", &assign_GovCT2_ropen); + assign_map.emplace("cim:GovCT2.rselect", &assign_GovCT2_rselect); + assign_map.emplace("cim:GovCT2.rup", &assign_GovCT2_rup); + assign_map.emplace("cim:GovCT2.ta", &assign_GovCT2_ta); + assign_map.emplace("cim:GovCT2.tact", &assign_GovCT2_tact); + assign_map.emplace("cim:GovCT2.tb", &assign_GovCT2_tb); + assign_map.emplace("cim:GovCT2.tc", &assign_GovCT2_tc); + assign_map.emplace("cim:GovCT2.tdgov", &assign_GovCT2_tdgov); + assign_map.emplace("cim:GovCT2.teng", &assign_GovCT2_teng); + assign_map.emplace("cim:GovCT2.tfload", &assign_GovCT2_tfload); + assign_map.emplace("cim:GovCT2.tpelec", &assign_GovCT2_tpelec); + assign_map.emplace("cim:GovCT2.tsa", &assign_GovCT2_tsa); + assign_map.emplace("cim:GovCT2.tsb", &assign_GovCT2_tsb); + assign_map.emplace("cim:GovCT2.vmax", &assign_GovCT2_vmax); + assign_map.emplace("cim:GovCT2.vmin", &assign_GovCT2_vmin); + assign_map.emplace("cim:GovCT2.wfnl", &assign_GovCT2_wfnl); + assign_map.emplace("cim:GovCT2.wfspd", &assign_GovCT2_wfspd); } void GovCT2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/GovCT2.hpp b/CGMES_3.0.0/GovCT2.hpp index 47d180b29..dc8542c83 100644 --- a/CGMES_3.0.0/GovCT2.hpp +++ b/CGMES_3.0.0/GovCT2.hpp @@ -23,9 +23,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - General governor with frequency-dependent fuel flow limit. This model is a modification of the GovCT1 model in order to represent the frequency-dependent fuel flow limit of a specific gas turbine manufacturer. - */ + /** \brief General governor with frequency-dependent fuel flow limit. This model is a modification of the GovCT1 model in order to represent the frequency-dependent fuel flow limit of a specific gas turbine manufacturer. */ class GovCT2 : public TurbineGovernorDynamics { public: @@ -33,62 +31,173 @@ namespace CIMPP GovCT2(); ~GovCT2() override; - CIMPP::Float aset; /* Acceleration limiter setpoint (<i>Aset</i>). Unit = PU / s. Typical value = 10. Default: 0.0 */ - CIMPP::PU db; /* Speed governor deadband in PU speed (<i>db</i>). In the majority of applications, it is recommended that this value be set to zero. Typical value = 0. Default: nullptr */ - CIMPP::PU dm; /* Speed sensitivity coefficient (<i>Dm</i>). <i>Dm</i> can represent either the variation of the engine power with the shaft speed or the variation of maximum power capability with shaft speed. If it is positive it describes the falling slope of the engine speed verses power characteristic as speed increases. A slightly falling characteristic is typical for reciprocating engines and some aero-derivative turbines. If it is negative the engine power is assumed to be unaffected by the shaft speed, but the maximum permissible fuel flow is taken to fall with falling shaft speed. This is characteristic of single-shaft industrial turbines due to exhaust temperature limits. Typical value = 0. Default: nullptr */ - CIMPP::Frequency flim1; /* Frequency threshold 1 (<i>Flim1</i>). Unit = Hz. Typical value = 59. Default: nullptr */ - CIMPP::Frequency flim10; /* Frequency threshold 10 (<i>Flim10</i>). Unit = Hz. Typical value = 0. Default: nullptr */ - CIMPP::Frequency flim2; /* Frequency threshold 2 (<i>Flim2</i>). Unit = Hz. Typical value = 0. Default: nullptr */ - CIMPP::Frequency flim3; /* Frequency threshold 3 (<i>Flim3</i>). Unit = Hz. Typical value = 0. Default: nullptr */ - CIMPP::Frequency flim4; /* Frequency threshold 4 (<i>Flim4</i>). Unit = Hz. Typical value = 0. Default: nullptr */ - CIMPP::Frequency flim5; /* Frequency threshold 5 (<i>Flim5</i>). Unit = Hz. Typical value = 0. Default: nullptr */ - CIMPP::Frequency flim6; /* Frequency threshold 6 (<i>Flim6</i>). Unit = Hz. Typical value = 0. Default: nullptr */ - CIMPP::Frequency flim7; /* Frequency threshold 7 (<i>Flim7</i>). Unit = Hz. Typical value = 0. Default: nullptr */ - CIMPP::Frequency flim8; /* Frequency threshold 8 (<i>Flim8</i>). Unit = Hz. Typical value = 0. Default: nullptr */ - CIMPP::Frequency flim9; /* Frequency threshold 9 (<i>Flim9</i>). Unit = Hz. Typical value = 0. Default: nullptr */ - CIMPP::PU ka; /* Acceleration limiter gain (<i>Ka</i>). Typical value = 10. Default: nullptr */ - CIMPP::PU kdgov; /* Governor derivative gain (<i>Kdgov</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU kigov; /* Governor integral gain (<i>Kigov</i>). Typical value = 0,45. Default: nullptr */ - CIMPP::PU kiload; /* Load limiter integral gain for PI controller (<i>Kiload</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU kimw; /* Power controller (reset) gain (<i>Kimw</i>). The default value of 0,01 corresponds to a reset time of 100 seconds. A value of 0,001 corresponds to a relatively slow-acting load controller. Typical value = 0. Default: nullptr */ - CIMPP::PU kpgov; /* Governor proportional gain (<i>Kpgov</i>). Typical value = 4. Default: nullptr */ - CIMPP::PU kpload; /* Load limiter proportional gain for PI controller (<i>Kpload</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU kturb; /* Turbine gain (<i>Kturb</i>). Typical value = 1,9168. Default: nullptr */ - CIMPP::PU ldref; /* Load limiter reference value (<i>Ldref</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU maxerr; /* Maximum value for speed error signal (<i>Maxerr</i>) (&gt; GovCT2.minerr). Typical value = 1. Default: nullptr */ - CIMPP::PU minerr; /* Minimum value for speed error signal (<i>Minerr</i>) (&lt; GovCT2.maxerr). Typical value = -1. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ - CIMPP::PU plim1; /* Power limit 1 (<i>Plim1</i>). Typical value = 0,8325. Default: nullptr */ - CIMPP::PU plim10; /* Power limit 10 (<i>Plim10</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU plim2; /* Power limit 2 (Plim2). Typical value = 0. Default: nullptr */ - CIMPP::PU plim3; /* Power limit 3 (<i>Plim3</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU plim4; /* Power limit 4 (<i>Plim4</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU plim5; /* Power limit 5 (<i>Plim5</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU plim6; /* Power limit 6 (<i>Plim6</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU plim7; /* Power limit 7 (<i>Plim7</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU plim8; /* Power limit 8 (<i>Plim8</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU plim9; /* Power Limit 9 (<i>Plim9</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU prate; /* Ramp rate for frequency-dependent power limit (<i>Prate</i>). Typical value = 0,017. Default: nullptr */ - CIMPP::PU r; /* Permanent droop (<i>R</i>). Typical value = 0,05. Default: nullptr */ - CIMPP::Float rclose; /* Minimum valve closing rate (<i>Rclose</i>). Unit = PU / s. Typical value = -99. Default: 0.0 */ - CIMPP::PU rdown; /* Maximum rate of load limit decrease (<i>Rdown</i>). Typical value = -99. Default: nullptr */ - CIMPP::Float ropen; /* Maximum valve opening rate (<i>Ropen</i>). Unit = PU / s. Typical value = 99. Default: 0.0 */ - CIMPP::DroopSignalFeedbackKind rselect; /* Feedback signal for droop (<i>Rselect</i>). Typical value = electricalPower. Default: 0 */ - CIMPP::PU rup; /* Maximum rate of load limit increase (<i>Rup</i>). Typical value = 99. Default: nullptr */ - CIMPP::Seconds ta; /* Acceleration limiter time constant (<i>Ta</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::Seconds tact; /* Actuator time constant (<i>Tact</i>) (&gt;= 0). Typical value = 0,4. Default: nullptr */ - CIMPP::Seconds tb; /* Turbine lag time constant (<i>Tb</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds tc; /* Turbine lead time constant (<i>Tc</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tdgov; /* Governor derivative controller time constant (<i>Tdgov</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::Seconds teng; /* Transport time delay for diesel engine used in representing diesel engines where there is a small but measurable transport delay between a change in fuel flow setting and the development of torque (<i>Teng</i>) (&gt;= 0). <i>Teng</i> should be zero in all but special cases where this transport delay is of particular concern. Typical value = 0. Default: nullptr */ - CIMPP::Seconds tfload; /* Load limiter time constant (<i>Tfload</i>) (&gt;= 0). Typical value = 3. Default: nullptr */ - CIMPP::Seconds tpelec; /* Electrical power transducer time constant (<i>Tpelec</i>) (&gt;= 0). Typical value = 2,5. Default: nullptr */ - CIMPP::Seconds tsa; /* Temperature detection lead time constant (<i>Tsa</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tsb; /* Temperature detection lag time constant (<i>Tsb</i>) (&gt;= 0). Typical value = 50. Default: nullptr */ - CIMPP::PU vmax; /* Maximum valve position limit (<i>Vmax</i>) (&gt; GovCT2.vmin). Typical value = 1. Default: nullptr */ - CIMPP::PU vmin; /* Minimum valve position limit (<i>Vmin</i>) (&lt; GovCT2.vmax). Typical value = 0,175. Default: nullptr */ - CIMPP::PU wfnl; /* No load fuel flow (<i>Wfnl</i>). Typical value = 0,187. Default: nullptr */ - CIMPP::Boolean wfspd; /* Switch for fuel source characteristic to recognize that fuel flow, for a given fuel valve stroke, can be proportional to engine speed (<i>Wfspd</i>). true = fuel flow proportional to speed (for some gas turbines and diesel engines with positive displacement fuel injectors) false = fuel control system keeps fuel flow independent of engine speed. Typical value = false. Default: false */ + /** \brief Acceleration limiter setpoint (<i>Aset</i>). Unit = PU / s. Typical value = 10. Default: 0.0 */ + CIMPP::Float aset; + + /** \brief Speed governor deadband in PU speed (<i>db</i>). In the majority of applications, it is recommended that this value be set to zero. Typical value = 0. Default: nullptr */ + CIMPP::PU db; + + /** \brief Speed sensitivity coefficient (<i>Dm</i>). <i>Dm</i> can represent either the variation of the engine power with the shaft speed or the variation of maximum power capability with shaft speed. If it is positive it describes the falling slope of the engine speed verses power characteristic as speed increases. A slightly falling characteristic is typical for reciprocating engines and some aero-derivative turbines. If it is negative the engine power is assumed to be unaffected by the shaft speed, but the maximum permissible fuel flow is taken to fall with falling shaft speed. This is characteristic of single-shaft industrial turbines due to exhaust temperature limits. Typical value = 0. Default: nullptr */ + CIMPP::PU dm; + + /** \brief Frequency threshold 1 (<i>Flim1</i>). Unit = Hz. Typical value = 59. Default: nullptr */ + CIMPP::Frequency flim1; + + /** \brief Frequency threshold 10 (<i>Flim10</i>). Unit = Hz. Typical value = 0. Default: nullptr */ + CIMPP::Frequency flim10; + + /** \brief Frequency threshold 2 (<i>Flim2</i>). Unit = Hz. Typical value = 0. Default: nullptr */ + CIMPP::Frequency flim2; + + /** \brief Frequency threshold 3 (<i>Flim3</i>). Unit = Hz. Typical value = 0. Default: nullptr */ + CIMPP::Frequency flim3; + + /** \brief Frequency threshold 4 (<i>Flim4</i>). Unit = Hz. Typical value = 0. Default: nullptr */ + CIMPP::Frequency flim4; + + /** \brief Frequency threshold 5 (<i>Flim5</i>). Unit = Hz. Typical value = 0. Default: nullptr */ + CIMPP::Frequency flim5; + + /** \brief Frequency threshold 6 (<i>Flim6</i>). Unit = Hz. Typical value = 0. Default: nullptr */ + CIMPP::Frequency flim6; + + /** \brief Frequency threshold 7 (<i>Flim7</i>). Unit = Hz. Typical value = 0. Default: nullptr */ + CIMPP::Frequency flim7; + + /** \brief Frequency threshold 8 (<i>Flim8</i>). Unit = Hz. Typical value = 0. Default: nullptr */ + CIMPP::Frequency flim8; + + /** \brief Frequency threshold 9 (<i>Flim9</i>). Unit = Hz. Typical value = 0. Default: nullptr */ + CIMPP::Frequency flim9; + + /** \brief Acceleration limiter gain (<i>Ka</i>). Typical value = 10. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Governor derivative gain (<i>Kdgov</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU kdgov; + + /** \brief Governor integral gain (<i>Kigov</i>). Typical value = 0,45. Default: nullptr */ + CIMPP::PU kigov; + + /** \brief Load limiter integral gain for PI controller (<i>Kiload</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU kiload; + + /** \brief Power controller (reset) gain (<i>Kimw</i>). The default value of 0,01 corresponds to a reset time of 100 seconds. A value of 0,001 corresponds to a relatively slow-acting load controller. Typical value = 0. Default: nullptr */ + CIMPP::PU kimw; + + /** \brief Governor proportional gain (<i>Kpgov</i>). Typical value = 4. Default: nullptr */ + CIMPP::PU kpgov; + + /** \brief Load limiter proportional gain for PI controller (<i>Kpload</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU kpload; + + /** \brief Turbine gain (<i>Kturb</i>). Typical value = 1,9168. Default: nullptr */ + CIMPP::PU kturb; + + /** \brief Load limiter reference value (<i>Ldref</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU ldref; + + /** \brief Maximum value for speed error signal (<i>Maxerr</i>) (&gt; GovCT2.minerr). Typical value = 1. Default: nullptr */ + CIMPP::PU maxerr; + + /** \brief Minimum value for speed error signal (<i>Minerr</i>) (&lt; GovCT2.maxerr). Typical value = -1. Default: nullptr */ + CIMPP::PU minerr; + + /** \brief Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Power limit 1 (<i>Plim1</i>). Typical value = 0,8325. Default: nullptr */ + CIMPP::PU plim1; + + /** \brief Power limit 10 (<i>Plim10</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU plim10; + + /** \brief Power limit 2 (Plim2). Typical value = 0. Default: nullptr */ + CIMPP::PU plim2; + + /** \brief Power limit 3 (<i>Plim3</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU plim3; + + /** \brief Power limit 4 (<i>Plim4</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU plim4; + + /** \brief Power limit 5 (<i>Plim5</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU plim5; + + /** \brief Power limit 6 (<i>Plim6</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU plim6; + + /** \brief Power limit 7 (<i>Plim7</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU plim7; + + /** \brief Power limit 8 (<i>Plim8</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU plim8; + + /** \brief Power Limit 9 (<i>Plim9</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU plim9; + + /** \brief Ramp rate for frequency-dependent power limit (<i>Prate</i>). Typical value = 0,017. Default: nullptr */ + CIMPP::PU prate; + + /** \brief Permanent droop (<i>R</i>). Typical value = 0,05. Default: nullptr */ + CIMPP::PU r; + + /** \brief Minimum valve closing rate (<i>Rclose</i>). Unit = PU / s. Typical value = -99. Default: 0.0 */ + CIMPP::Float rclose; + + /** \brief Maximum rate of load limit decrease (<i>Rdown</i>). Typical value = -99. Default: nullptr */ + CIMPP::PU rdown; + + /** \brief Maximum valve opening rate (<i>Ropen</i>). Unit = PU / s. Typical value = 99. Default: 0.0 */ + CIMPP::Float ropen; + + /** \brief Feedback signal for droop (<i>Rselect</i>). Typical value = electricalPower. Default: 0 */ + CIMPP::DroopSignalFeedbackKind rselect; + + /** \brief Maximum rate of load limit increase (<i>Rup</i>). Typical value = 99. Default: nullptr */ + CIMPP::PU rup; + + /** \brief Acceleration limiter time constant (<i>Ta</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Actuator time constant (<i>Tact</i>) (&gt;= 0). Typical value = 0,4. Default: nullptr */ + CIMPP::Seconds tact; + + /** \brief Turbine lag time constant (<i>Tb</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Turbine lead time constant (<i>Tc</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Governor derivative controller time constant (<i>Tdgov</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tdgov; + + /** \brief Transport time delay for diesel engine used in representing diesel engines where there is a small but measurable transport delay between a change in fuel flow setting and the development of torque (<i>Teng</i>) (&gt;= 0). <i>Teng</i> should be zero in all but special cases where this transport delay is of particular concern. Typical value = 0. Default: nullptr */ + CIMPP::Seconds teng; + + /** \brief Load limiter time constant (<i>Tfload</i>) (&gt;= 0). Typical value = 3. Default: nullptr */ + CIMPP::Seconds tfload; + + /** \brief Electrical power transducer time constant (<i>Tpelec</i>) (&gt;= 0). Typical value = 2,5. Default: nullptr */ + CIMPP::Seconds tpelec; + + /** \brief Temperature detection lead time constant (<i>Tsa</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tsa; + + /** \brief Temperature detection lag time constant (<i>Tsb</i>) (&gt;= 0). Typical value = 50. Default: nullptr */ + CIMPP::Seconds tsb; + + /** \brief Maximum valve position limit (<i>Vmax</i>) (&gt; GovCT2.vmin). Typical value = 1. Default: nullptr */ + CIMPP::PU vmax; + + /** \brief Minimum valve position limit (<i>Vmin</i>) (&lt; GovCT2.vmax). Typical value = 0,175. Default: nullptr */ + CIMPP::PU vmin; + + /** \brief No load fuel flow (<i>Wfnl</i>). Typical value = 0,187. Default: nullptr */ + CIMPP::PU wfnl; + + /** \brief Switch for fuel source characteristic to recognize that fuel flow, for a given fuel valve stroke, can be proportional to engine speed (<i>Wfspd</i>). true = fuel flow proportional to speed (for some gas turbines and diesel engines with positive displacement fuel injectors) false = fuel control system keeps fuel flow independent of engine speed. Typical value = false. Default: false */ + CIMPP::Boolean wfspd; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GovGAST.cpp b/CGMES_3.0.0/GovGAST.cpp index d91027d02..cc94e78ad 100644 --- a/CGMES_3.0.0/GovGAST.cpp +++ b/CGMES_3.0.0/GovGAST.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -GovGAST::GovGAST() {}; -GovGAST::~GovGAST() {}; +GovGAST::GovGAST() {} +GovGAST::~GovGAST() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ GovGAST::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovGAST_at(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_at(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->at; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST_dturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_dturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST_kt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_kt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_vmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST_vmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST* element = dynamic_cast(BaseClass_ptr1)) + GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovGAST_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->at; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_GovGAST_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dturb; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_GovGAST_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST_kt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kt; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_GovGAST_kt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_GovGAST_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovGAST_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_GovGAST_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_GovGAST_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_GovGAST_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_GovGAST_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmax; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_GovGAST_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmin; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_GovGAST_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char GovGAST::debugName[] = "GovGAST"; const char* GovGAST::debugString() const { @@ -341,21 +346,21 @@ const char* GovGAST::debugString() const void GovGAST::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovGAST"), &GovGAST_factory)); + factory_map.emplace("cim:GovGAST", &GovGAST_factory); } void GovGAST::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovGAST.at"), &assign_GovGAST_at)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST.dturb"), &assign_GovGAST_dturb)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST.kt"), &assign_GovGAST_kt)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST.mwbase"), &assign_GovGAST_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST.r"), &assign_GovGAST_r)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST.t1"), &assign_GovGAST_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST.t2"), &assign_GovGAST_t2)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST.t3"), &assign_GovGAST_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST.vmax"), &assign_GovGAST_vmax)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST.vmin"), &assign_GovGAST_vmin)); + assign_map.emplace("cim:GovGAST.at", &assign_GovGAST_at); + assign_map.emplace("cim:GovGAST.dturb", &assign_GovGAST_dturb); + assign_map.emplace("cim:GovGAST.kt", &assign_GovGAST_kt); + assign_map.emplace("cim:GovGAST.mwbase", &assign_GovGAST_mwbase); + assign_map.emplace("cim:GovGAST.r", &assign_GovGAST_r); + assign_map.emplace("cim:GovGAST.t1", &assign_GovGAST_t1); + assign_map.emplace("cim:GovGAST.t2", &assign_GovGAST_t2); + assign_map.emplace("cim:GovGAST.t3", &assign_GovGAST_t3); + assign_map.emplace("cim:GovGAST.vmax", &assign_GovGAST_vmax); + assign_map.emplace("cim:GovGAST.vmin", &assign_GovGAST_vmin); } void GovGAST::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/GovGAST.hpp b/CGMES_3.0.0/GovGAST.hpp index dcc31db3e..9978c730e 100644 --- a/CGMES_3.0.0/GovGAST.hpp +++ b/CGMES_3.0.0/GovGAST.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Single shaft gas turbine. - */ + /** \brief Single shaft gas turbine. */ class GovGAST : public TurbineGovernorDynamics { public: @@ -29,16 +27,35 @@ namespace CIMPP GovGAST(); ~GovGAST() override; - CIMPP::PU at; /* Ambient temperature load limit (<i>Load Limit</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU dturb; /* Turbine damping factor (<i>Dturb</i>). Typical value = 0,18. Default: nullptr */ - CIMPP::PU kt; /* Temperature limiter gain (<i>Kt</i>). Typical value = 3. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ - CIMPP::PU r; /* Permanent droop (<i>R</i>) (&gt;0). Typical value = 0,04. Default: nullptr */ - CIMPP::Seconds t1; /* Governor mechanism time constant (<i>T1</i>) (&gt;= 0). <i>T1</i> represents the natural valve positioning time constant of the governor for small disturbances, as seen when rate limiting is not in effect. Typical value = 0,5. Default: nullptr */ - CIMPP::Seconds t2; /* Turbine power time constant (<i>T2</i>) (&gt;= 0). <i>T2</i> represents delay due to internal energy storage of the gas turbine engine. <i>T2</i> can be used to give a rough approximation to the delay associated with acceleration of the compressor spool of a multi-shaft engine, or with the compressibility of gas in the plenum of a free power turbine of an aero-derivative unit, for example. Typical value = 0,5. Default: nullptr */ - CIMPP::Seconds t3; /* Turbine exhaust temperature time constant (<i>T3</i>) (&gt;= 0). Typical value = 3. Default: nullptr */ - CIMPP::PU vmax; /* Maximum turbine power, PU of MWbase (<i>Vmax</i>) (&gt; GovGAST.vmin). Typical value = 1. Default: nullptr */ - CIMPP::PU vmin; /* Minimum turbine power, PU of MWbase (<i>Vmin</i>) (&lt; GovGAST.vmax). Typical value = 0. Default: nullptr */ + /** \brief Ambient temperature load limit (<i>Load Limit</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU at; + + /** \brief Turbine damping factor (<i>Dturb</i>). Typical value = 0,18. Default: nullptr */ + CIMPP::PU dturb; + + /** \brief Temperature limiter gain (<i>Kt</i>). Typical value = 3. Default: nullptr */ + CIMPP::PU kt; + + /** \brief Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Permanent droop (<i>R</i>) (&gt;0). Typical value = 0,04. Default: nullptr */ + CIMPP::PU r; + + /** \brief Governor mechanism time constant (<i>T1</i>) (&gt;= 0). <i>T1</i> represents the natural valve positioning time constant of the governor for small disturbances, as seen when rate limiting is not in effect. Typical value = 0,5. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Turbine power time constant (<i>T2</i>) (&gt;= 0). <i>T2</i> represents delay due to internal energy storage of the gas turbine engine. <i>T2</i> can be used to give a rough approximation to the delay associated with acceleration of the compressor spool of a multi-shaft engine, or with the compressibility of gas in the plenum of a free power turbine of an aero-derivative unit, for example. Typical value = 0,5. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Turbine exhaust temperature time constant (<i>T3</i>) (&gt;= 0). Typical value = 3. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Maximum turbine power, PU of MWbase (<i>Vmax</i>) (&gt; GovGAST.vmin). Typical value = 1. Default: nullptr */ + CIMPP::PU vmax; + + /** \brief Minimum turbine power, PU of MWbase (<i>Vmin</i>) (&lt; GovGAST.vmax). Typical value = 0. Default: nullptr */ + CIMPP::PU vmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GovGAST1.cpp b/CGMES_3.0.0/GovGAST1.cpp index 4bb0e5db9..4acaed7db 100644 --- a/CGMES_3.0.0/GovGAST1.cpp +++ b/CGMES_3.0.0/GovGAST1.cpp @@ -8,45 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Float.hpp" -#include "Float.hpp" -#include "Frequency.hpp" -#include "ActivePower.hpp" -#include "Frequency.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -GovGAST1::GovGAST1() {}; -GovGAST1::~GovGAST1() {}; +GovGAST1::GovGAST1() {} +GovGAST1::~GovGAST1() {} static const std::list PossibleProfilesForClass = { @@ -106,454 +72,486 @@ GovGAST1::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovGAST1_a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_a(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_b(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_eps(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eps; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_fidle(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_fidle(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fidle; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_gv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_kt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_kt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_lmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_lmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_loadinc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_loadinc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->loadinc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_ltrate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_ltrate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ltrate; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_pgv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_rmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_rmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_tltr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_tltr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tltr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_vmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST1_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST1_vmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovGAST1_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a; if (!buffer.str().empty()) @@ -567,7 +565,8 @@ bool get_GovGAST1_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b; if (!buffer.str().empty()) @@ -581,7 +580,8 @@ bool get_GovGAST1_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -595,7 +595,8 @@ bool get_GovGAST1_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST1_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -609,7 +610,8 @@ bool get_GovGAST1_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST1_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eps; if (!buffer.str().empty()) @@ -623,7 +625,8 @@ bool get_GovGAST1_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST1_fidle(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fidle; if (!buffer.str().empty()) @@ -637,7 +640,8 @@ bool get_GovGAST1_fidle(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovGAST1_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -651,7 +655,8 @@ bool get_GovGAST1_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST1_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -665,7 +670,8 @@ bool get_GovGAST1_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST1_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -679,7 +685,8 @@ bool get_GovGAST1_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST1_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -693,7 +700,8 @@ bool get_GovGAST1_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST1_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -707,7 +715,8 @@ bool get_GovGAST1_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST1_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv6; if (!buffer.str().empty()) @@ -721,7 +730,8 @@ bool get_GovGAST1_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST1_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -735,7 +745,8 @@ bool get_GovGAST1_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_kt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kt; if (!buffer.str().empty()) @@ -749,7 +760,8 @@ bool get_GovGAST1_kt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_lmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lmax; if (!buffer.str().empty()) @@ -763,7 +775,8 @@ bool get_GovGAST1_lmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_loadinc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->loadinc; if (!buffer.str().empty()) @@ -777,7 +790,8 @@ bool get_GovGAST1_loadinc(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovGAST1_ltrate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ltrate; if (!buffer.str().empty()) @@ -791,7 +805,8 @@ bool get_GovGAST1_ltrate(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovGAST1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -805,7 +820,8 @@ bool get_GovGAST1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovGAST1_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -819,7 +835,8 @@ bool get_GovGAST1_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -833,7 +850,8 @@ bool get_GovGAST1_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -847,7 +865,8 @@ bool get_GovGAST1_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -861,7 +880,8 @@ bool get_GovGAST1_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -875,7 +895,8 @@ bool get_GovGAST1_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv6; if (!buffer.str().empty()) @@ -889,7 +910,8 @@ bool get_GovGAST1_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -903,7 +925,8 @@ bool get_GovGAST1_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_rmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rmax; if (!buffer.str().empty()) @@ -917,7 +940,8 @@ bool get_GovGAST1_rmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -931,7 +955,8 @@ bool get_GovGAST1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -945,7 +970,8 @@ bool get_GovGAST1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -959,7 +985,8 @@ bool get_GovGAST1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -973,7 +1000,8 @@ bool get_GovGAST1_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -987,7 +1015,8 @@ bool get_GovGAST1_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST1_tltr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tltr; if (!buffer.str().empty()) @@ -1001,7 +1030,8 @@ bool get_GovGAST1_tltr(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmax; if (!buffer.str().empty()) @@ -1015,7 +1045,8 @@ bool get_GovGAST1_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST1_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST1* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmin; if (!buffer.str().empty()) @@ -1027,8 +1058,6 @@ bool get_GovGAST1_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char GovGAST1::debugName[] = "GovGAST1"; const char* GovGAST1::debugString() const { @@ -1037,45 +1066,45 @@ const char* GovGAST1::debugString() const void GovGAST1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovGAST1"), &GovGAST1_factory)); + factory_map.emplace("cim:GovGAST1", &GovGAST1_factory); } void GovGAST1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.a"), &assign_GovGAST1_a)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.b"), &assign_GovGAST1_b)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.db1"), &assign_GovGAST1_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.db2"), &assign_GovGAST1_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.eps"), &assign_GovGAST1_eps)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.fidle"), &assign_GovGAST1_fidle)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.gv1"), &assign_GovGAST1_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.gv2"), &assign_GovGAST1_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.gv3"), &assign_GovGAST1_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.gv4"), &assign_GovGAST1_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.gv5"), &assign_GovGAST1_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.gv6"), &assign_GovGAST1_gv6)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.ka"), &assign_GovGAST1_ka)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.kt"), &assign_GovGAST1_kt)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.lmax"), &assign_GovGAST1_lmax)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.loadinc"), &assign_GovGAST1_loadinc)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.ltrate"), &assign_GovGAST1_ltrate)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.mwbase"), &assign_GovGAST1_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.pgv1"), &assign_GovGAST1_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.pgv2"), &assign_GovGAST1_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.pgv3"), &assign_GovGAST1_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.pgv4"), &assign_GovGAST1_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.pgv5"), &assign_GovGAST1_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.pgv6"), &assign_GovGAST1_pgv6)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.r"), &assign_GovGAST1_r)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.rmax"), &assign_GovGAST1_rmax)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.t1"), &assign_GovGAST1_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.t2"), &assign_GovGAST1_t2)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.t3"), &assign_GovGAST1_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.t4"), &assign_GovGAST1_t4)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.t5"), &assign_GovGAST1_t5)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.tltr"), &assign_GovGAST1_tltr)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.vmax"), &assign_GovGAST1_vmax)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST1.vmin"), &assign_GovGAST1_vmin)); + assign_map.emplace("cim:GovGAST1.a", &assign_GovGAST1_a); + assign_map.emplace("cim:GovGAST1.b", &assign_GovGAST1_b); + assign_map.emplace("cim:GovGAST1.db1", &assign_GovGAST1_db1); + assign_map.emplace("cim:GovGAST1.db2", &assign_GovGAST1_db2); + assign_map.emplace("cim:GovGAST1.eps", &assign_GovGAST1_eps); + assign_map.emplace("cim:GovGAST1.fidle", &assign_GovGAST1_fidle); + assign_map.emplace("cim:GovGAST1.gv1", &assign_GovGAST1_gv1); + assign_map.emplace("cim:GovGAST1.gv2", &assign_GovGAST1_gv2); + assign_map.emplace("cim:GovGAST1.gv3", &assign_GovGAST1_gv3); + assign_map.emplace("cim:GovGAST1.gv4", &assign_GovGAST1_gv4); + assign_map.emplace("cim:GovGAST1.gv5", &assign_GovGAST1_gv5); + assign_map.emplace("cim:GovGAST1.gv6", &assign_GovGAST1_gv6); + assign_map.emplace("cim:GovGAST1.ka", &assign_GovGAST1_ka); + assign_map.emplace("cim:GovGAST1.kt", &assign_GovGAST1_kt); + assign_map.emplace("cim:GovGAST1.lmax", &assign_GovGAST1_lmax); + assign_map.emplace("cim:GovGAST1.loadinc", &assign_GovGAST1_loadinc); + assign_map.emplace("cim:GovGAST1.ltrate", &assign_GovGAST1_ltrate); + assign_map.emplace("cim:GovGAST1.mwbase", &assign_GovGAST1_mwbase); + assign_map.emplace("cim:GovGAST1.pgv1", &assign_GovGAST1_pgv1); + assign_map.emplace("cim:GovGAST1.pgv2", &assign_GovGAST1_pgv2); + assign_map.emplace("cim:GovGAST1.pgv3", &assign_GovGAST1_pgv3); + assign_map.emplace("cim:GovGAST1.pgv4", &assign_GovGAST1_pgv4); + assign_map.emplace("cim:GovGAST1.pgv5", &assign_GovGAST1_pgv5); + assign_map.emplace("cim:GovGAST1.pgv6", &assign_GovGAST1_pgv6); + assign_map.emplace("cim:GovGAST1.r", &assign_GovGAST1_r); + assign_map.emplace("cim:GovGAST1.rmax", &assign_GovGAST1_rmax); + assign_map.emplace("cim:GovGAST1.t1", &assign_GovGAST1_t1); + assign_map.emplace("cim:GovGAST1.t2", &assign_GovGAST1_t2); + assign_map.emplace("cim:GovGAST1.t3", &assign_GovGAST1_t3); + assign_map.emplace("cim:GovGAST1.t4", &assign_GovGAST1_t4); + assign_map.emplace("cim:GovGAST1.t5", &assign_GovGAST1_t5); + assign_map.emplace("cim:GovGAST1.tltr", &assign_GovGAST1_tltr); + assign_map.emplace("cim:GovGAST1.vmax", &assign_GovGAST1_vmax); + assign_map.emplace("cim:GovGAST1.vmin", &assign_GovGAST1_vmin); } void GovGAST1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/GovGAST1.hpp b/CGMES_3.0.0/GovGAST1.hpp index cb0c06456..c5dbdbfdc 100644 --- a/CGMES_3.0.0/GovGAST1.hpp +++ b/CGMES_3.0.0/GovGAST1.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified single shaft gas turbine. - */ + /** \brief Modified single shaft gas turbine. */ class GovGAST1 : public TurbineGovernorDynamics { public: @@ -31,40 +29,107 @@ namespace CIMPP GovGAST1(); ~GovGAST1() override; - CIMPP::Float a; /* Turbine power time constant numerator scale factor (<i>a</i>). Typical value = 0,8. Default: 0.0 */ - CIMPP::Float b; /* Turbine power time constant denominator scale factor (<i>b</i>) (&gt;0). Typical value = 1. Default: 0.0 */ - CIMPP::Frequency db1; /* Intentional dead-band width (<i>db1</i>). Unit = Hz. Typical value = 0. Default: nullptr */ - CIMPP::ActivePower db2; /* Unintentional dead-band (<i>db2</i>). Unit = MW. Typical value = 0. Default: nullptr */ - CIMPP::Frequency eps; /* Intentional db hysteresis (<i>eps</i>). Unit = Hz. Typical value = 0. Default: nullptr */ - CIMPP::PU fidle; /* Fuel flow at zero power output (<i>Fidle</i>). Typical value = 0,18. Default: nullptr */ - CIMPP::PU gv1; /* Nonlinear gain point 1, PU gv (<i>Gv1</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain point 2,PU gv (<i>Gv2</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain point 3, PU gv (<i>Gv3</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain point 4, PU gv (<i>Gv4</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain point 5, PU gv (<i>Gv5</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv6; /* Nonlinear gain point 6, PU gv (<i>Gv6</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU ka; /* Governor gain (<i>Ka</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU kt; /* Temperature limiter gain (<i>Kt</i>). Typical value = 3. Default: nullptr */ - CIMPP::PU lmax; /* Ambient temperature load limit (<i>Lmax</i>). <i>Lmax</i> is the turbine power output corresponding to the limiting exhaust gas temperature. Typical value = 1. Default: nullptr */ - CIMPP::PU loadinc; /* Valve position change allowed at fast rate (<i>Loadinc</i>). Typical value = 0,05. Default: nullptr */ - CIMPP::Float ltrate; /* Maximum long term fuel valve opening rate (<i>Ltrate</i>). Typical value = 0,02. Default: 0.0 */ - CIMPP::ActivePower mwbase; /* Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain point 1, PU power (<i>Pgv1</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain point 2, PU power (<i>Pgv2</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain point 3, PU power (<i>Pgv3</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain point 4, PU power (<i>Pgv4</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain point 5, PU power (<i>Pgv5</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv6; /* Nonlinear gain point 6, PU power (<i>Pgv6</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU r; /* Permanent droop (<i>R</i>) (&gt;0). Typical value = 0,04. Default: nullptr */ - CIMPP::Float rmax; /* Maximum fuel valve opening rate (<i>Rmax</i>). Unit = PU / s. Typical value = 1. Default: 0.0 */ - CIMPP::Seconds t1; /* Governor mechanism time constant (<i>T1</i>) (&gt;= 0). <i>T1</i> represents the natural valve positioning time constant of the governor for small disturbances, as seen when rate limiting is not in effect. Typical value = 0,5. Default: nullptr */ - CIMPP::Seconds t2; /* Turbine power time constant (<i>T2</i>) (&gt;= 0). <i>T2</i> represents delay due to internal energy storage of the gas turbine engine. <i>T2</i> can be used to give a rough approximation to the delay associated with acceleration of the compressor spool of a multi-shaft engine, or with the compressibility of gas in the plenum of the free power turbine of an aero-derivative unit, for example. Typical value = 0,5. Default: nullptr */ - CIMPP::Seconds t3; /* Turbine exhaust temperature time constant (<i>T3</i>) (&gt;= 0). <i>T3</i> represents delay in the exhaust temperature and load limiting system. Typical value = 3. Default: nullptr */ - CIMPP::Seconds t4; /* Governor lead time constant (<i>T4</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds t5; /* Governor lag time constant (<i>T5</i>) (&gt;= 0). If = 0, entire gain and lead-lag block is bypassed. Typical value = 0. Default: nullptr */ - CIMPP::Seconds tltr; /* Valve position averaging time constant (<i>Tltr</i>) (&gt;= 0). Typical value = 10. Default: nullptr */ - CIMPP::PU vmax; /* Maximum turbine power, PU of MWbase (<i>Vmax</i>) (&gt; GovGAST1.vmin). Typical value = 1. Default: nullptr */ - CIMPP::PU vmin; /* Minimum turbine power, PU of MWbase (<i>Vmin</i>) (&lt; GovGAST1.vmax). Typical value = 0. Default: nullptr */ + /** \brief Turbine power time constant numerator scale factor (<i>a</i>). Typical value = 0,8. Default: 0.0 */ + CIMPP::Float a; + + /** \brief Turbine power time constant denominator scale factor (<i>b</i>) (&gt;0). Typical value = 1. Default: 0.0 */ + CIMPP::Float b; + + /** \brief Intentional dead-band width (<i>db1</i>). Unit = Hz. Typical value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Unintentional dead-band (<i>db2</i>). Unit = MW. Typical value = 0. Default: nullptr */ + CIMPP::ActivePower db2; + + /** \brief Intentional db hysteresis (<i>eps</i>). Unit = Hz. Typical value = 0. Default: nullptr */ + CIMPP::Frequency eps; + + /** \brief Fuel flow at zero power output (<i>Fidle</i>). Typical value = 0,18. Default: nullptr */ + CIMPP::PU fidle; + + /** \brief Nonlinear gain point 1, PU gv (<i>Gv1</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain point 2,PU gv (<i>Gv2</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain point 3, PU gv (<i>Gv3</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain point 4, PU gv (<i>Gv4</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain point 5, PU gv (<i>Gv5</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Nonlinear gain point 6, PU gv (<i>Gv6</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv6; + + /** \brief Governor gain (<i>Ka</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Temperature limiter gain (<i>Kt</i>). Typical value = 3. Default: nullptr */ + CIMPP::PU kt; + + /** \brief Ambient temperature load limit (<i>Lmax</i>). <i>Lmax</i> is the turbine power output corresponding to the limiting exhaust gas temperature. Typical value = 1. Default: nullptr */ + CIMPP::PU lmax; + + /** \brief Valve position change allowed at fast rate (<i>Loadinc</i>). Typical value = 0,05. Default: nullptr */ + CIMPP::PU loadinc; + + /** \brief Maximum long term fuel valve opening rate (<i>Ltrate</i>). Typical value = 0,02. Default: 0.0 */ + CIMPP::Float ltrate; + + /** \brief Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain point 1, PU power (<i>Pgv1</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain point 2, PU power (<i>Pgv2</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain point 3, PU power (<i>Pgv3</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain point 4, PU power (<i>Pgv4</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain point 5, PU power (<i>Pgv5</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief Nonlinear gain point 6, PU power (<i>Pgv6</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv6; + + /** \brief Permanent droop (<i>R</i>) (&gt;0). Typical value = 0,04. Default: nullptr */ + CIMPP::PU r; + + /** \brief Maximum fuel valve opening rate (<i>Rmax</i>). Unit = PU / s. Typical value = 1. Default: 0.0 */ + CIMPP::Float rmax; + + /** \brief Governor mechanism time constant (<i>T1</i>) (&gt;= 0). <i>T1</i> represents the natural valve positioning time constant of the governor for small disturbances, as seen when rate limiting is not in effect. Typical value = 0,5. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Turbine power time constant (<i>T2</i>) (&gt;= 0). <i>T2</i> represents delay due to internal energy storage of the gas turbine engine. <i>T2</i> can be used to give a rough approximation to the delay associated with acceleration of the compressor spool of a multi-shaft engine, or with the compressibility of gas in the plenum of the free power turbine of an aero-derivative unit, for example. Typical value = 0,5. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Turbine exhaust temperature time constant (<i>T3</i>) (&gt;= 0). <i>T3</i> represents delay in the exhaust temperature and load limiting system. Typical value = 3. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Governor lead time constant (<i>T4</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Governor lag time constant (<i>T5</i>) (&gt;= 0). If = 0, entire gain and lead-lag block is bypassed. Typical value = 0. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Valve position averaging time constant (<i>Tltr</i>) (&gt;= 0). Typical value = 10. Default: nullptr */ + CIMPP::Seconds tltr; + + /** \brief Maximum turbine power, PU of MWbase (<i>Vmax</i>) (&gt; GovGAST1.vmin). Typical value = 1. Default: nullptr */ + CIMPP::PU vmax; + + /** \brief Minimum turbine power, PU of MWbase (<i>Vmin</i>) (&lt; GovGAST1.vmax). Typical value = 0. Default: nullptr */ + CIMPP::PU vmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GovGAST2.cpp b/CGMES_3.0.0/GovGAST2.cpp index 6264112f9..c78ffe45c 100644 --- a/CGMES_3.0.0/GovGAST2.cpp +++ b/CGMES_3.0.0/GovGAST2.cpp @@ -8,43 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Temperature.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Temperature.hpp" -#include "ActivePower.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Integer.hpp" using namespace CIMPP; -GovGAST2::GovGAST2() {}; -GovGAST2::~GovGAST2() {}; +GovGAST2::GovGAST2() {} +GovGAST2::~GovGAST2() {} static const std::list PossibleProfilesForClass = { @@ -102,428 +70,458 @@ GovGAST2::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovGAST2_a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_a(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_af1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_af1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->af1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_af2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_af2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->af2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_b(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_bf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_bf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_bf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_bf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_c(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_c(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->c; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_cf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_cf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->cf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_ecr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_ecr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ecr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_etd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_etd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->etd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_k4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_k5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_k5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_k6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_k6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_t(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_t(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_tcd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_tcd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tcd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_tmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_tmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_tmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_tmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_trate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_trate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->trate; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_tt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_w(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_w(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->w; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_x(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_y(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_y(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->y; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST2_z(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST2_z(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->z; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovGAST2_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a; if (!buffer.str().empty()) @@ -537,7 +535,8 @@ bool get_GovGAST2_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_af1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->af1; if (!buffer.str().empty()) @@ -551,7 +550,8 @@ bool get_GovGAST2_af1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST2_af2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->af2; if (!buffer.str().empty()) @@ -565,7 +565,8 @@ bool get_GovGAST2_af2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST2_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b; if (!buffer.str().empty()) @@ -579,7 +580,8 @@ bool get_GovGAST2_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_bf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bf1; if (!buffer.str().empty()) @@ -593,7 +595,8 @@ bool get_GovGAST2_bf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST2_bf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bf2; if (!buffer.str().empty()) @@ -607,7 +610,8 @@ bool get_GovGAST2_bf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST2_c(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->c; if (!buffer.str().empty()) @@ -621,7 +625,8 @@ bool get_GovGAST2_c(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_cf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->cf2; if (!buffer.str().empty()) @@ -635,7 +640,8 @@ bool get_GovGAST2_cf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST2_ecr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ecr; if (!buffer.str().empty()) @@ -649,7 +655,8 @@ bool get_GovGAST2_ecr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST2_etd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->etd; if (!buffer.str().empty()) @@ -663,7 +670,8 @@ bool get_GovGAST2_etd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST2_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -677,7 +685,8 @@ bool get_GovGAST2_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k4; if (!buffer.str().empty()) @@ -691,7 +700,8 @@ bool get_GovGAST2_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k5; if (!buffer.str().empty()) @@ -705,7 +715,8 @@ bool get_GovGAST2_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_k6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k6; if (!buffer.str().empty()) @@ -719,7 +730,8 @@ bool get_GovGAST2_k6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -733,7 +745,8 @@ bool get_GovGAST2_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -747,7 +760,8 @@ bool get_GovGAST2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovGAST2_t(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t; if (!buffer.str().empty()) @@ -761,7 +775,8 @@ bool get_GovGAST2_t(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -775,7 +790,8 @@ bool get_GovGAST2_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -789,7 +805,8 @@ bool get_GovGAST2_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -803,7 +820,8 @@ bool get_GovGAST2_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -817,7 +835,8 @@ bool get_GovGAST2_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_tcd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tcd; if (!buffer.str().empty()) @@ -831,7 +850,8 @@ bool get_GovGAST2_tcd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST2_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -845,7 +865,8 @@ bool get_GovGAST2_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_tmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tmax; if (!buffer.str().empty()) @@ -859,7 +880,8 @@ bool get_GovGAST2_tmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST2_tmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tmin; if (!buffer.str().empty()) @@ -873,7 +895,8 @@ bool get_GovGAST2_tmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST2_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -887,7 +910,8 @@ bool get_GovGAST2_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_trate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->trate; if (!buffer.str().empty()) @@ -901,7 +925,8 @@ bool get_GovGAST2_trate(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovGAST2_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tt; if (!buffer.str().empty()) @@ -915,7 +940,8 @@ bool get_GovGAST2_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_w(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->w; if (!buffer.str().empty()) @@ -929,7 +955,8 @@ bool get_GovGAST2_w(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x; if (!buffer.str().empty()) @@ -943,7 +970,8 @@ bool get_GovGAST2_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_y(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->y; if (!buffer.str().empty()) @@ -957,7 +985,8 @@ bool get_GovGAST2_y(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST2_z(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST2* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->z; if (!buffer.str().empty()) @@ -969,8 +998,6 @@ bool get_GovGAST2_z(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char GovGAST2::debugName[] = "GovGAST2"; const char* GovGAST2::debugString() const { @@ -979,43 +1006,43 @@ const char* GovGAST2::debugString() const void GovGAST2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovGAST2"), &GovGAST2_factory)); + factory_map.emplace("cim:GovGAST2", &GovGAST2_factory); } void GovGAST2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.a"), &assign_GovGAST2_a)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.af1"), &assign_GovGAST2_af1)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.af2"), &assign_GovGAST2_af2)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.b"), &assign_GovGAST2_b)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.bf1"), &assign_GovGAST2_bf1)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.bf2"), &assign_GovGAST2_bf2)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.c"), &assign_GovGAST2_c)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.cf2"), &assign_GovGAST2_cf2)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.ecr"), &assign_GovGAST2_ecr)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.etd"), &assign_GovGAST2_etd)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.k3"), &assign_GovGAST2_k3)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.k4"), &assign_GovGAST2_k4)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.k5"), &assign_GovGAST2_k5)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.k6"), &assign_GovGAST2_k6)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.kf"), &assign_GovGAST2_kf)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.mwbase"), &assign_GovGAST2_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.t"), &assign_GovGAST2_t)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.t3"), &assign_GovGAST2_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.t4"), &assign_GovGAST2_t4)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.t5"), &assign_GovGAST2_t5)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.tc"), &assign_GovGAST2_tc)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.tcd"), &assign_GovGAST2_tcd)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.tf"), &assign_GovGAST2_tf)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.tmax"), &assign_GovGAST2_tmax)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.tmin"), &assign_GovGAST2_tmin)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.tr"), &assign_GovGAST2_tr)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.trate"), &assign_GovGAST2_trate)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.tt"), &assign_GovGAST2_tt)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.w"), &assign_GovGAST2_w)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.x"), &assign_GovGAST2_x)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.y"), &assign_GovGAST2_y)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST2.z"), &assign_GovGAST2_z)); + assign_map.emplace("cim:GovGAST2.a", &assign_GovGAST2_a); + assign_map.emplace("cim:GovGAST2.af1", &assign_GovGAST2_af1); + assign_map.emplace("cim:GovGAST2.af2", &assign_GovGAST2_af2); + assign_map.emplace("cim:GovGAST2.b", &assign_GovGAST2_b); + assign_map.emplace("cim:GovGAST2.bf1", &assign_GovGAST2_bf1); + assign_map.emplace("cim:GovGAST2.bf2", &assign_GovGAST2_bf2); + assign_map.emplace("cim:GovGAST2.c", &assign_GovGAST2_c); + assign_map.emplace("cim:GovGAST2.cf2", &assign_GovGAST2_cf2); + assign_map.emplace("cim:GovGAST2.ecr", &assign_GovGAST2_ecr); + assign_map.emplace("cim:GovGAST2.etd", &assign_GovGAST2_etd); + assign_map.emplace("cim:GovGAST2.k3", &assign_GovGAST2_k3); + assign_map.emplace("cim:GovGAST2.k4", &assign_GovGAST2_k4); + assign_map.emplace("cim:GovGAST2.k5", &assign_GovGAST2_k5); + assign_map.emplace("cim:GovGAST2.k6", &assign_GovGAST2_k6); + assign_map.emplace("cim:GovGAST2.kf", &assign_GovGAST2_kf); + assign_map.emplace("cim:GovGAST2.mwbase", &assign_GovGAST2_mwbase); + assign_map.emplace("cim:GovGAST2.t", &assign_GovGAST2_t); + assign_map.emplace("cim:GovGAST2.t3", &assign_GovGAST2_t3); + assign_map.emplace("cim:GovGAST2.t4", &assign_GovGAST2_t4); + assign_map.emplace("cim:GovGAST2.t5", &assign_GovGAST2_t5); + assign_map.emplace("cim:GovGAST2.tc", &assign_GovGAST2_tc); + assign_map.emplace("cim:GovGAST2.tcd", &assign_GovGAST2_tcd); + assign_map.emplace("cim:GovGAST2.tf", &assign_GovGAST2_tf); + assign_map.emplace("cim:GovGAST2.tmax", &assign_GovGAST2_tmax); + assign_map.emplace("cim:GovGAST2.tmin", &assign_GovGAST2_tmin); + assign_map.emplace("cim:GovGAST2.tr", &assign_GovGAST2_tr); + assign_map.emplace("cim:GovGAST2.trate", &assign_GovGAST2_trate); + assign_map.emplace("cim:GovGAST2.tt", &assign_GovGAST2_tt); + assign_map.emplace("cim:GovGAST2.w", &assign_GovGAST2_w); + assign_map.emplace("cim:GovGAST2.x", &assign_GovGAST2_x); + assign_map.emplace("cim:GovGAST2.y", &assign_GovGAST2_y); + assign_map.emplace("cim:GovGAST2.z", &assign_GovGAST2_z); } void GovGAST2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/GovGAST2.hpp b/CGMES_3.0.0/GovGAST2.hpp index be4240a28..4ba04e730 100644 --- a/CGMES_3.0.0/GovGAST2.hpp +++ b/CGMES_3.0.0/GovGAST2.hpp @@ -22,9 +22,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Gas turbine. - */ + /** \brief Gas turbine. */ class GovGAST2 : public TurbineGovernorDynamics { public: @@ -32,38 +30,101 @@ namespace CIMPP GovGAST2(); ~GovGAST2() override; - CIMPP::Float a; /* Valve positioner (<i>A</i>). Default: 0.0 */ - CIMPP::PU af1; /* Exhaust temperature parameter (<i>Af1</i>). Unit = PU temperature. Based on temperature in degrees C. Default: nullptr */ - CIMPP::PU af2; /* Coefficient equal to 0,5(1-speed) (<i>Af2</i>). Default: nullptr */ - CIMPP::Float b; /* Valve positioner (<i>B</i>). Default: 0.0 */ - CIMPP::PU bf1; /* (<i>Bf1</i>). <i>Bf1</i> = <i>E</i>(1 - <i>W</i>) where <i>E</i> (speed sensitivity coefficient) is 0,55 to 0,65 x <i>Tr</i>. Unit = PU temperature. Based on temperature in degrees C. Default: nullptr */ - CIMPP::PU bf2; /* Turbine torque coefficient K<sub>hhv</sub> (depends on heating value of fuel stream in combustion chamber) (<i>Bf2</i>). Default: nullptr */ - CIMPP::Float c; /* Valve positioner (<i>C</i>). Default: 0.0 */ - CIMPP::PU cf2; /* Coefficient defining fuel flow where power output is 0% (<i>Cf2</i>). Synchronous but no output. Typically 0,23 x K<sub>hhv</sub> (23% fuel flow). Default: nullptr */ - CIMPP::Seconds ecr; /* Combustion reaction time delay (<i>Ecr</i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds etd; /* Turbine and exhaust delay (<i>Etd</i>) (&gt;= 0). Default: nullptr */ - CIMPP::PU k3; /* Ratio of fuel adjustment (<i>K3</i>). Default: nullptr */ - CIMPP::PU k4; /* Gain of radiation shield (<i>K4</i>). Default: nullptr */ - CIMPP::PU k5; /* Gain of radiation shield (<i>K5</i>). Default: nullptr */ - CIMPP::PU k6; /* Minimum fuel flow (<i>K6</i>). Default: nullptr */ - CIMPP::PU kf; /* Fuel system feedback (<i>Kf</i>). Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ - CIMPP::Seconds t; /* Fuel control time constant (<i>T</i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds t3; /* Radiation shield time constant (<i>T3</i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds t4; /* Thermocouple time constant (<i>T4</i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds t5; /* Temperature control time constant (<i>T5</i>) (&gt;= 0). Default: nullptr */ - CIMPP::Temperature tc; /* Temperature control (<i>Tc</i>). Unit = [SYMBOL REMOVED]F or [SYMBOL REMOVED]C depending on parameters <i>Af1</i> and <i>Bf1</i>. Default: nullptr */ - CIMPP::Seconds tcd; /* Compressor discharge time constant (<i>Tcd</i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds tf; /* Fuel system time constant (<i>Tf</i>) (&gt;= 0). Default: nullptr */ - CIMPP::PU tmax; /* Maximum turbine limit (<i>Tmax</i>) (&gt; GovGAST2.tmin). Default: nullptr */ - CIMPP::PU tmin; /* Minimum turbine limit (<i>Tmin</i>) (&lt; GovGAST2.tmax). Default: nullptr */ - CIMPP::Temperature tr; /* Rated temperature (<i>Tr</i>). Unit = [SYMBOL REMOVED]C depending on parameters<i> Af1 </i>and <i>Bf1</i>. Default: nullptr */ - CIMPP::ActivePower trate; /* Turbine rating (<i>Trate</i>). Unit = MW. Default: nullptr */ - CIMPP::Seconds tt; /* Temperature controller integration rate (<i>Tt</i>) (&gt;= 0). Default: nullptr */ - CIMPP::PU w; /* Governor gain (1/droop) on turbine rating (<i>W</i>). Default: nullptr */ - CIMPP::Seconds x; /* Governor lead time constant (<i>X</i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds y; /* Governor lag time constant (<i>Y</i>) (&gt; 0). Default: nullptr */ - CIMPP::Integer z; /* Governor mode (<i>Z</i>). 1 = droop 0 = isochronous. Default: 0 */ + /** \brief Valve positioner (<i>A</i>). Default: 0.0 */ + CIMPP::Float a; + + /** \brief Exhaust temperature parameter (<i>Af1</i>). Unit = PU temperature. Based on temperature in degrees C. Default: nullptr */ + CIMPP::PU af1; + + /** \brief Coefficient equal to 0,5(1-speed) (<i>Af2</i>). Default: nullptr */ + CIMPP::PU af2; + + /** \brief Valve positioner (<i>B</i>). Default: 0.0 */ + CIMPP::Float b; + + /** \brief (<i>Bf1</i>). <i>Bf1</i> = <i>E</i>(1 - <i>W</i>) where <i>E</i> (speed sensitivity coefficient) is 0,55 to 0,65 x <i>Tr</i>. Unit = PU temperature. Based on temperature in degrees C. Default: nullptr */ + CIMPP::PU bf1; + + /** \brief Turbine torque coefficient K<sub>hhv</sub> (depends on heating value of fuel stream in combustion chamber) (<i>Bf2</i>). Default: nullptr */ + CIMPP::PU bf2; + + /** \brief Valve positioner (<i>C</i>). Default: 0.0 */ + CIMPP::Float c; + + /** \brief Coefficient defining fuel flow where power output is 0% (<i>Cf2</i>). Synchronous but no output. Typically 0,23 x K<sub>hhv</sub> (23% fuel flow). Default: nullptr */ + CIMPP::PU cf2; + + /** \brief Combustion reaction time delay (<i>Ecr</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds ecr; + + /** \brief Turbine and exhaust delay (<i>Etd</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds etd; + + /** \brief Ratio of fuel adjustment (<i>K3</i>). Default: nullptr */ + CIMPP::PU k3; + + /** \brief Gain of radiation shield (<i>K4</i>). Default: nullptr */ + CIMPP::PU k4; + + /** \brief Gain of radiation shield (<i>K5</i>). Default: nullptr */ + CIMPP::PU k5; + + /** \brief Minimum fuel flow (<i>K6</i>). Default: nullptr */ + CIMPP::PU k6; + + /** \brief Fuel system feedback (<i>Kf</i>). Default: nullptr */ + CIMPP::PU kf; + + /** \brief Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Fuel control time constant (<i>T</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t; + + /** \brief Radiation shield time constant (<i>T3</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Thermocouple time constant (<i>T4</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Temperature control time constant (<i>T5</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Temperature control (<i>Tc</i>). Unit = [SYMBOL REMOVED]F or [SYMBOL REMOVED]C depending on parameters <i>Af1</i> and <i>Bf1</i>. Default: nullptr */ + CIMPP::Temperature tc; + + /** \brief Compressor discharge time constant (<i>Tcd</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds tcd; + + /** \brief Fuel system time constant (<i>Tf</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum turbine limit (<i>Tmax</i>) (&gt; GovGAST2.tmin). Default: nullptr */ + CIMPP::PU tmax; + + /** \brief Minimum turbine limit (<i>Tmin</i>) (&lt; GovGAST2.tmax). Default: nullptr */ + CIMPP::PU tmin; + + /** \brief Rated temperature (<i>Tr</i>). Unit = [SYMBOL REMOVED]C depending on parameters<i> Af1 </i>and <i>Bf1</i>. Default: nullptr */ + CIMPP::Temperature tr; + + /** \brief Turbine rating (<i>Trate</i>). Unit = MW. Default: nullptr */ + CIMPP::ActivePower trate; + + /** \brief Temperature controller integration rate (<i>Tt</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds tt; + + /** \brief Governor gain (1/droop) on turbine rating (<i>W</i>). Default: nullptr */ + CIMPP::PU w; + + /** \brief Governor lead time constant (<i>X</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds x; + + /** \brief Governor lag time constant (<i>Y</i>) (&gt; 0). Default: nullptr */ + CIMPP::Seconds y; + + /** \brief Governor mode (<i>Z</i>). 1 = droop 0 = isochronous. Default: 0 */ + CIMPP::Integer z; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GovGAST3.cpp b/CGMES_3.0.0/GovGAST3.cpp index ea8e700d4..d80998b75 100644 --- a/CGMES_3.0.0/GovGAST3.cpp +++ b/CGMES_3.0.0/GovGAST3.cpp @@ -8,32 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Float.hpp" -#include "PU.hpp" -#include "Temperature.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Temperature.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Temperature.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -GovGAST3::GovGAST3() {}; -GovGAST3::~GovGAST3() {}; +GovGAST3::GovGAST3() {} +GovGAST3::~GovGAST3() {} static const std::list PossibleProfilesForClass = { @@ -80,285 +59,304 @@ GovGAST3::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovGAST3_bca(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_bca(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bca; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_bp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_bp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_dtc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_dtc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dtc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ka; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_kac(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_kac(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kac; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_kca(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_kca(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kca; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_ksi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_ksi(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ksi; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_ky(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_ky(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ky; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_mnef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_mnef(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mnef; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_mxef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_mxef(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mxef; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_rcmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_rcmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rcmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_rcmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_rcmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rcmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_tac(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_tac(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tac; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_tfen(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_tfen(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tfen; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_tsi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_tsi(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tsi; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_tt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_ttc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_ttc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ttc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST3_ty(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST3_ty(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ty; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovGAST3_bca(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bca; if (!buffer.str().empty()) @@ -372,7 +370,8 @@ bool get_GovGAST3_bca(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST3_bp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bp; if (!buffer.str().empty()) @@ -386,7 +385,8 @@ bool get_GovGAST3_bp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST3_dtc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dtc; if (!buffer.str().empty()) @@ -400,7 +400,8 @@ bool get_GovGAST3_dtc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST3_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -414,7 +415,8 @@ bool get_GovGAST3_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST3_kac(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kac; if (!buffer.str().empty()) @@ -428,7 +430,8 @@ bool get_GovGAST3_kac(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST3_kca(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kca; if (!buffer.str().empty()) @@ -442,7 +445,8 @@ bool get_GovGAST3_kca(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST3_ksi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ksi; if (!buffer.str().empty()) @@ -456,7 +460,8 @@ bool get_GovGAST3_ksi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST3_ky(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ky; if (!buffer.str().empty()) @@ -470,7 +475,8 @@ bool get_GovGAST3_ky(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST3_mnef(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mnef; if (!buffer.str().empty()) @@ -484,7 +490,8 @@ bool get_GovGAST3_mnef(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST3_mxef(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mxef; if (!buffer.str().empty()) @@ -498,7 +505,8 @@ bool get_GovGAST3_mxef(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST3_rcmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rcmn; if (!buffer.str().empty()) @@ -512,7 +520,8 @@ bool get_GovGAST3_rcmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST3_rcmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rcmx; if (!buffer.str().empty()) @@ -526,7 +535,8 @@ bool get_GovGAST3_rcmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST3_tac(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tac; if (!buffer.str().empty()) @@ -540,7 +550,8 @@ bool get_GovGAST3_tac(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST3_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -554,7 +565,8 @@ bool get_GovGAST3_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST3_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -568,7 +580,8 @@ bool get_GovGAST3_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST3_tfen(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tfen; if (!buffer.str().empty()) @@ -582,7 +595,8 @@ bool get_GovGAST3_tfen(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST3_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -596,7 +610,8 @@ bool get_GovGAST3_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST3_tsi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tsi; if (!buffer.str().empty()) @@ -610,7 +625,8 @@ bool get_GovGAST3_tsi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST3_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tt; if (!buffer.str().empty()) @@ -624,7 +640,8 @@ bool get_GovGAST3_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST3_ttc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ttc; if (!buffer.str().empty()) @@ -638,7 +655,8 @@ bool get_GovGAST3_ttc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST3_ty(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST3* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ty; if (!buffer.str().empty()) @@ -650,8 +668,6 @@ bool get_GovGAST3_ty(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char GovGAST3::debugName[] = "GovGAST3"; const char* GovGAST3::debugString() const { @@ -660,32 +676,32 @@ const char* GovGAST3::debugString() const void GovGAST3::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovGAST3"), &GovGAST3_factory)); + factory_map.emplace("cim:GovGAST3", &GovGAST3_factory); } void GovGAST3::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.bca"), &assign_GovGAST3_bca)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.bp"), &assign_GovGAST3_bp)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.dtc"), &assign_GovGAST3_dtc)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.ka"), &assign_GovGAST3_ka)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.kac"), &assign_GovGAST3_kac)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.kca"), &assign_GovGAST3_kca)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.ksi"), &assign_GovGAST3_ksi)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.ky"), &assign_GovGAST3_ky)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.mnef"), &assign_GovGAST3_mnef)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.mxef"), &assign_GovGAST3_mxef)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.rcmn"), &assign_GovGAST3_rcmn)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.rcmx"), &assign_GovGAST3_rcmx)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.tac"), &assign_GovGAST3_tac)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.tc"), &assign_GovGAST3_tc)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.td"), &assign_GovGAST3_td)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.tfen"), &assign_GovGAST3_tfen)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.tg"), &assign_GovGAST3_tg)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.tsi"), &assign_GovGAST3_tsi)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.tt"), &assign_GovGAST3_tt)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.ttc"), &assign_GovGAST3_ttc)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST3.ty"), &assign_GovGAST3_ty)); + assign_map.emplace("cim:GovGAST3.bca", &assign_GovGAST3_bca); + assign_map.emplace("cim:GovGAST3.bp", &assign_GovGAST3_bp); + assign_map.emplace("cim:GovGAST3.dtc", &assign_GovGAST3_dtc); + assign_map.emplace("cim:GovGAST3.ka", &assign_GovGAST3_ka); + assign_map.emplace("cim:GovGAST3.kac", &assign_GovGAST3_kac); + assign_map.emplace("cim:GovGAST3.kca", &assign_GovGAST3_kca); + assign_map.emplace("cim:GovGAST3.ksi", &assign_GovGAST3_ksi); + assign_map.emplace("cim:GovGAST3.ky", &assign_GovGAST3_ky); + assign_map.emplace("cim:GovGAST3.mnef", &assign_GovGAST3_mnef); + assign_map.emplace("cim:GovGAST3.mxef", &assign_GovGAST3_mxef); + assign_map.emplace("cim:GovGAST3.rcmn", &assign_GovGAST3_rcmn); + assign_map.emplace("cim:GovGAST3.rcmx", &assign_GovGAST3_rcmx); + assign_map.emplace("cim:GovGAST3.tac", &assign_GovGAST3_tac); + assign_map.emplace("cim:GovGAST3.tc", &assign_GovGAST3_tc); + assign_map.emplace("cim:GovGAST3.td", &assign_GovGAST3_td); + assign_map.emplace("cim:GovGAST3.tfen", &assign_GovGAST3_tfen); + assign_map.emplace("cim:GovGAST3.tg", &assign_GovGAST3_tg); + assign_map.emplace("cim:GovGAST3.tsi", &assign_GovGAST3_tsi); + assign_map.emplace("cim:GovGAST3.tt", &assign_GovGAST3_tt); + assign_map.emplace("cim:GovGAST3.ttc", &assign_GovGAST3_ttc); + assign_map.emplace("cim:GovGAST3.ty", &assign_GovGAST3_ty); } void GovGAST3::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/GovGAST3.hpp b/CGMES_3.0.0/GovGAST3.hpp index 6b17309a3..a1da83703 100644 --- a/CGMES_3.0.0/GovGAST3.hpp +++ b/CGMES_3.0.0/GovGAST3.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Generic turbogas with acceleration and temperature controller. - */ + /** \brief Generic turbogas with acceleration and temperature controller. */ class GovGAST3 : public TurbineGovernorDynamics { public: @@ -30,27 +28,68 @@ namespace CIMPP GovGAST3(); ~GovGAST3() override; - CIMPP::Float bca; /* Acceleration limit set-point (<i>Bca</i>). Unit = 1/s. Typical value = 0,01. Default: 0.0 */ - CIMPP::PU bp; /* Droop (<i>bp</i>). Typical value = 0,05. Default: nullptr */ - CIMPP::Temperature dtc; /* Exhaust temperature variation due to fuel flow increasing from 0 to 1 PU (<i>deltaTc</i>). Typical value = 390. Default: nullptr */ - CIMPP::PU ka; /* Minimum fuel flow (<i>Ka</i>). Typical value = 0,23. Default: nullptr */ - CIMPP::Float kac; /* Fuel system feedback (<i>K</i><i><sub>AC</sub></i>). Typical value = 0. Default: 0.0 */ - CIMPP::Float kca; /* Acceleration control integral gain (<i>Kca</i>). Unit = 1/s. Typical value = 100. Default: 0.0 */ - CIMPP::Float ksi; /* Gain of radiation shield (<i>Ksi</i>). Typical value = 0,8. Default: 0.0 */ - CIMPP::Float ky; /* Coefficient of transfer function of fuel valve positioner (<i>Ky</i>). Typical value = 1. Default: 0.0 */ - CIMPP::PU mnef; /* Fuel flow maximum negative error value (<i>MNef</i>). Typical value = -0,05. Default: nullptr */ - CIMPP::PU mxef; /* Fuel flow maximum positive error value (<i>MXef</i>). Typical value = 0,05. Default: nullptr */ - CIMPP::PU rcmn; /* Minimum fuel flow (<i>RCMN</i>). Typical value = -0,1. Default: nullptr */ - CIMPP::PU rcmx; /* Maximum fuel flow (<i>RCMX</i>). Typical value = 1. Default: nullptr */ - CIMPP::Seconds tac; /* Fuel control time constant (<i>Tac</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds tc; /* Compressor discharge volume time constant (<i>Tc</i>) (&gt;= 0). Typical value = 0,2. Default: nullptr */ - CIMPP::Seconds td; /* Temperature controller derivative gain (<i>Td</i>) (&gt;= 0). Typical value = 3,3. Default: nullptr */ - CIMPP::Temperature tfen; /* Turbine rated exhaust temperature correspondent to Pm=1 PU (<i>Tfen</i>). Typical value = 540. Default: nullptr */ - CIMPP::Seconds tg; /* Time constant of speed governor (<i>Tg</i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ - CIMPP::Seconds tsi; /* Time constant of radiation shield (<i>Tsi</i>) (&gt;= 0). Typical value = 15. Default: nullptr */ - CIMPP::Temperature tt; /* Temperature controller integration rate (<i>Tt</i>). Typical value = 250. Default: nullptr */ - CIMPP::Seconds ttc; /* Time constant of thermocouple (<i>Ttc</i>) (&gt;= 0). Typical value = 2,5. Default: nullptr */ - CIMPP::Seconds ty; /* Time constant of fuel valve positioner (<i>Ty</i>) (&gt;= 0). Typical value = 0,2. Default: nullptr */ + /** \brief Acceleration limit set-point (<i>Bca</i>). Unit = 1/s. Typical value = 0,01. Default: 0.0 */ + CIMPP::Float bca; + + /** \brief Droop (<i>bp</i>). Typical value = 0,05. Default: nullptr */ + CIMPP::PU bp; + + /** \brief Exhaust temperature variation due to fuel flow increasing from 0 to 1 PU (<i>deltaTc</i>). Typical value = 390. Default: nullptr */ + CIMPP::Temperature dtc; + + /** \brief Minimum fuel flow (<i>Ka</i>). Typical value = 0,23. Default: nullptr */ + CIMPP::PU ka; + + /** \brief Fuel system feedback (<i>K</i><i><sub>AC</sub></i>). Typical value = 0. Default: 0.0 */ + CIMPP::Float kac; + + /** \brief Acceleration control integral gain (<i>Kca</i>). Unit = 1/s. Typical value = 100. Default: 0.0 */ + CIMPP::Float kca; + + /** \brief Gain of radiation shield (<i>Ksi</i>). Typical value = 0,8. Default: 0.0 */ + CIMPP::Float ksi; + + /** \brief Coefficient of transfer function of fuel valve positioner (<i>Ky</i>). Typical value = 1. Default: 0.0 */ + CIMPP::Float ky; + + /** \brief Fuel flow maximum negative error value (<i>MNef</i>). Typical value = -0,05. Default: nullptr */ + CIMPP::PU mnef; + + /** \brief Fuel flow maximum positive error value (<i>MXef</i>). Typical value = 0,05. Default: nullptr */ + CIMPP::PU mxef; + + /** \brief Minimum fuel flow (<i>RCMN</i>). Typical value = -0,1. Default: nullptr */ + CIMPP::PU rcmn; + + /** \brief Maximum fuel flow (<i>RCMX</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU rcmx; + + /** \brief Fuel control time constant (<i>Tac</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds tac; + + /** \brief Compressor discharge volume time constant (<i>Tc</i>) (&gt;= 0). Typical value = 0,2. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Temperature controller derivative gain (<i>Td</i>) (&gt;= 0). Typical value = 3,3. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Turbine rated exhaust temperature correspondent to Pm=1 PU (<i>Tfen</i>). Typical value = 540. Default: nullptr */ + CIMPP::Temperature tfen; + + /** \brief Time constant of speed governor (<i>Tg</i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Time constant of radiation shield (<i>Tsi</i>) (&gt;= 0). Typical value = 15. Default: nullptr */ + CIMPP::Seconds tsi; + + /** \brief Temperature controller integration rate (<i>Tt</i>). Typical value = 250. Default: nullptr */ + CIMPP::Temperature tt; + + /** \brief Time constant of thermocouple (<i>Ttc</i>) (&gt;= 0). Typical value = 2,5. Default: nullptr */ + CIMPP::Seconds ttc; + + /** \brief Time constant of fuel valve positioner (<i>Ty</i>) (&gt;= 0). Typical value = 0,2. Default: nullptr */ + CIMPP::Seconds ty; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GovGAST4.cpp b/CGMES_3.0.0/GovGAST4.cpp index bb67c3a76..4886e4cdf 100644 --- a/CGMES_3.0.0/GovGAST4.cpp +++ b/CGMES_3.0.0/GovGAST4.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -GovGAST4::GovGAST4() {}; -GovGAST4::~GovGAST4() {}; +GovGAST4::GovGAST4() {} +GovGAST4::~GovGAST4() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ GovGAST4::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovGAST4_bp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_bp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_ktm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_ktm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ktm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_mnef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_mnef(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mnef; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_mxef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_mxef(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mxef; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_rymn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_rymn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rymn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_rymx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_rymx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rymx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_tcm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_tcm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tcm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_tm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_tm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGAST4_ty(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGAST4_ty(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ty; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovGAST4_bp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bp; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_GovGAST4_bp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST4_ktm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ktm; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_GovGAST4_ktm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST4_mnef(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mnef; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_GovGAST4_mnef(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST4_mxef(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mxef; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_GovGAST4_mxef(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST4_rymn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rymn; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_GovGAST4_rymn(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST4_rymx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rymx; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_GovGAST4_rymx(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGAST4_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_GovGAST4_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST4_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_GovGAST4_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST4_tcm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tcm; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_GovGAST4_tcm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGAST4_tm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tm; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_GovGAST4_tm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGAST4_ty(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGAST4* element = dynamic_cast(BaseClass_ptr1)) + const GovGAST4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ty; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_GovGAST4_ty(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char GovGAST4::debugName[] = "GovGAST4"; const char* GovGAST4::debugString() const { @@ -370,22 +376,22 @@ const char* GovGAST4::debugString() const void GovGAST4::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovGAST4"), &GovGAST4_factory)); + factory_map.emplace("cim:GovGAST4", &GovGAST4_factory); } void GovGAST4::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.bp"), &assign_GovGAST4_bp)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.ktm"), &assign_GovGAST4_ktm)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.mnef"), &assign_GovGAST4_mnef)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.mxef"), &assign_GovGAST4_mxef)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.rymn"), &assign_GovGAST4_rymn)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.rymx"), &assign_GovGAST4_rymx)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.ta"), &assign_GovGAST4_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.tc"), &assign_GovGAST4_tc)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.tcm"), &assign_GovGAST4_tcm)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.tm"), &assign_GovGAST4_tm)); - assign_map.insert(std::make_pair(std::string("cim:GovGAST4.ty"), &assign_GovGAST4_ty)); + assign_map.emplace("cim:GovGAST4.bp", &assign_GovGAST4_bp); + assign_map.emplace("cim:GovGAST4.ktm", &assign_GovGAST4_ktm); + assign_map.emplace("cim:GovGAST4.mnef", &assign_GovGAST4_mnef); + assign_map.emplace("cim:GovGAST4.mxef", &assign_GovGAST4_mxef); + assign_map.emplace("cim:GovGAST4.rymn", &assign_GovGAST4_rymn); + assign_map.emplace("cim:GovGAST4.rymx", &assign_GovGAST4_rymx); + assign_map.emplace("cim:GovGAST4.ta", &assign_GovGAST4_ta); + assign_map.emplace("cim:GovGAST4.tc", &assign_GovGAST4_tc); + assign_map.emplace("cim:GovGAST4.tcm", &assign_GovGAST4_tcm); + assign_map.emplace("cim:GovGAST4.tm", &assign_GovGAST4_tm); + assign_map.emplace("cim:GovGAST4.ty", &assign_GovGAST4_ty); } void GovGAST4::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/GovGAST4.hpp b/CGMES_3.0.0/GovGAST4.hpp index 240b0a045..9aa9605ab 100644 --- a/CGMES_3.0.0/GovGAST4.hpp +++ b/CGMES_3.0.0/GovGAST4.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Generic turbogas. - */ + /** \brief Generic turbogas. */ class GovGAST4 : public TurbineGovernorDynamics { public: @@ -28,17 +26,38 @@ namespace CIMPP GovGAST4(); ~GovGAST4() override; - CIMPP::PU bp; /* Droop (<i>b</i><i><sub>p</sub></i>). Typical value = 0,05. Default: nullptr */ - CIMPP::PU ktm; /* Compressor gain (<i>Ktm</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU mnef; /* Fuel flow maximum negative error value (<i>MNef</i>). Typical value = -0,05. Default: nullptr */ - CIMPP::PU mxef; /* Fuel flow maximum positive error value (<i>MXef</i>). Typical value = 0,05. Default: nullptr */ - CIMPP::PU rymn; /* Minimum valve opening (<i>RYMN</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU rymx; /* Maximum valve opening (<i>RYMX</i>). Typical value = 1,1. Default: nullptr */ - CIMPP::Seconds ta; /* Maximum gate opening velocity (<i>TA</i>) (&gt;= 0). Typical value = 3. Default: nullptr */ - CIMPP::Seconds tc; /* Maximum gate closing velocity (<i>TC</i>) (&gt;= 0). Typical value = 0,5. Default: nullptr */ - CIMPP::Seconds tcm; /* Fuel control time constant (<i>Tcm</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds tm; /* Compressor discharge volume time constant (<i>Tm</i>) (&gt;= 0). Typical value = 0,2. Default: nullptr */ - CIMPP::Seconds ty; /* Time constant of fuel valve positioner (<i>Ty</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + /** \brief Droop (<i>b</i><i><sub>p</sub></i>). Typical value = 0,05. Default: nullptr */ + CIMPP::PU bp; + + /** \brief Compressor gain (<i>Ktm</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU ktm; + + /** \brief Fuel flow maximum negative error value (<i>MNef</i>). Typical value = -0,05. Default: nullptr */ + CIMPP::PU mnef; + + /** \brief Fuel flow maximum positive error value (<i>MXef</i>). Typical value = 0,05. Default: nullptr */ + CIMPP::PU mxef; + + /** \brief Minimum valve opening (<i>RYMN</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU rymn; + + /** \brief Maximum valve opening (<i>RYMX</i>). Typical value = 1,1. Default: nullptr */ + CIMPP::PU rymx; + + /** \brief Maximum gate opening velocity (<i>TA</i>) (&gt;= 0). Typical value = 3. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Maximum gate closing velocity (<i>TC</i>) (&gt;= 0). Typical value = 0,5. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Fuel control time constant (<i>Tcm</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds tcm; + + /** \brief Compressor discharge volume time constant (<i>Tm</i>) (&gt;= 0). Typical value = 0,2. Default: nullptr */ + CIMPP::Seconds tm; + + /** \brief Time constant of fuel valve positioner (<i>Ty</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds ty; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GovGASTWD.cpp b/CGMES_3.0.0/GovGASTWD.cpp index d9fb523b8..06560d02d 100644 --- a/CGMES_3.0.0/GovGASTWD.cpp +++ b/CGMES_3.0.0/GovGASTWD.cpp @@ -8,44 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Temperature.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Temperature.hpp" -#include "ActivePower.hpp" -#include "Seconds.hpp" using namespace CIMPP; -GovGASTWD::GovGASTWD() {}; -GovGASTWD::~GovGASTWD() {}; +GovGASTWD::GovGASTWD() {} +GovGASTWD::~GovGASTWD() {} static const std::list PossibleProfilesForClass = { @@ -104,441 +71,472 @@ GovGASTWD::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovGASTWD_a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_a(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_af1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_af1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->af1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_af2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_af2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->af2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_b(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_bf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_bf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_bf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_bf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_c(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_c(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->c; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_cf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_cf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->cf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_ecr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_ecr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ecr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_etd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_etd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->etd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_k4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_k5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_k5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_k6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_k6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_kdroop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_kdroop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kdroop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_t(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_t(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_tcd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_tcd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tcd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_tmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_tmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_tmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_tmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_trate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_trate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->trate; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovGASTWD_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovGASTWD_tt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovGASTWD_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a; if (!buffer.str().empty()) @@ -552,7 +550,8 @@ bool get_GovGASTWD_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGASTWD_af1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->af1; if (!buffer.str().empty()) @@ -566,7 +565,8 @@ bool get_GovGASTWD_af1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGASTWD_af2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->af2; if (!buffer.str().empty()) @@ -580,7 +580,8 @@ bool get_GovGASTWD_af2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGASTWD_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b; if (!buffer.str().empty()) @@ -594,7 +595,8 @@ bool get_GovGASTWD_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGASTWD_bf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bf1; if (!buffer.str().empty()) @@ -608,7 +610,8 @@ bool get_GovGASTWD_bf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGASTWD_bf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bf2; if (!buffer.str().empty()) @@ -622,7 +625,8 @@ bool get_GovGASTWD_bf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGASTWD_c(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->c; if (!buffer.str().empty()) @@ -636,7 +640,8 @@ bool get_GovGASTWD_c(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGASTWD_cf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->cf2; if (!buffer.str().empty()) @@ -650,7 +655,8 @@ bool get_GovGASTWD_cf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGASTWD_ecr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ecr; if (!buffer.str().empty()) @@ -664,7 +670,8 @@ bool get_GovGASTWD_ecr(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGASTWD_etd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->etd; if (!buffer.str().empty()) @@ -678,7 +685,8 @@ bool get_GovGASTWD_etd(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGASTWD_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -692,7 +700,8 @@ bool get_GovGASTWD_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k4; if (!buffer.str().empty()) @@ -706,7 +715,8 @@ bool get_GovGASTWD_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k5; if (!buffer.str().empty()) @@ -720,7 +730,8 @@ bool get_GovGASTWD_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_k6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k6; if (!buffer.str().empty()) @@ -734,7 +745,8 @@ bool get_GovGASTWD_k6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -748,7 +760,8 @@ bool get_GovGASTWD_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_kdroop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdroop; if (!buffer.str().empty()) @@ -762,7 +775,8 @@ bool get_GovGASTWD_kdroop(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovGASTWD_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -776,7 +790,8 @@ bool get_GovGASTWD_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -790,7 +805,8 @@ bool get_GovGASTWD_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -804,7 +820,8 @@ bool get_GovGASTWD_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -818,7 +835,8 @@ bool get_GovGASTWD_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovGASTWD_t(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t; if (!buffer.str().empty()) @@ -832,7 +850,8 @@ bool get_GovGASTWD_t(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovGASTWD_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -846,7 +865,8 @@ bool get_GovGASTWD_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -860,7 +880,8 @@ bool get_GovGASTWD_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -874,7 +895,8 @@ bool get_GovGASTWD_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -888,7 +910,8 @@ bool get_GovGASTWD_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_tcd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tcd; if (!buffer.str().empty()) @@ -902,7 +925,8 @@ bool get_GovGASTWD_tcd(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovGASTWD_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -916,7 +940,8 @@ bool get_GovGASTWD_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -930,7 +955,8 @@ bool get_GovGASTWD_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_tmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tmax; if (!buffer.str().empty()) @@ -944,7 +970,8 @@ bool get_GovGASTWD_tmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovGASTWD_tmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tmin; if (!buffer.str().empty()) @@ -958,7 +985,8 @@ bool get_GovGASTWD_tmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovGASTWD_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -972,7 +1000,8 @@ bool get_GovGASTWD_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovGASTWD_trate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->trate; if (!buffer.str().empty()) @@ -986,7 +1015,8 @@ bool get_GovGASTWD_trate(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovGASTWD_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovGASTWD* element = dynamic_cast(BaseClass_ptr1)) + const GovGASTWD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tt; if (!buffer.str().empty()) @@ -998,8 +1028,6 @@ bool get_GovGASTWD_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char GovGASTWD::debugName[] = "GovGASTWD"; const char* GovGASTWD::debugString() const { @@ -1008,44 +1036,44 @@ const char* GovGASTWD::debugString() const void GovGASTWD::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovGASTWD"), &GovGASTWD_factory)); + factory_map.emplace("cim:GovGASTWD", &GovGASTWD_factory); } void GovGASTWD::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.a"), &assign_GovGASTWD_a)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.af1"), &assign_GovGASTWD_af1)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.af2"), &assign_GovGASTWD_af2)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.b"), &assign_GovGASTWD_b)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.bf1"), &assign_GovGASTWD_bf1)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.bf2"), &assign_GovGASTWD_bf2)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.c"), &assign_GovGASTWD_c)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.cf2"), &assign_GovGASTWD_cf2)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.ecr"), &assign_GovGASTWD_ecr)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.etd"), &assign_GovGASTWD_etd)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.k3"), &assign_GovGASTWD_k3)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.k4"), &assign_GovGASTWD_k4)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.k5"), &assign_GovGASTWD_k5)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.k6"), &assign_GovGASTWD_k6)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.kd"), &assign_GovGASTWD_kd)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.kdroop"), &assign_GovGASTWD_kdroop)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.kf"), &assign_GovGASTWD_kf)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.ki"), &assign_GovGASTWD_ki)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.kp"), &assign_GovGASTWD_kp)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.mwbase"), &assign_GovGASTWD_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.t"), &assign_GovGASTWD_t)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.t3"), &assign_GovGASTWD_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.t4"), &assign_GovGASTWD_t4)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.t5"), &assign_GovGASTWD_t5)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.tc"), &assign_GovGASTWD_tc)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.tcd"), &assign_GovGASTWD_tcd)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.td"), &assign_GovGASTWD_td)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.tf"), &assign_GovGASTWD_tf)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.tmax"), &assign_GovGASTWD_tmax)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.tmin"), &assign_GovGASTWD_tmin)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.tr"), &assign_GovGASTWD_tr)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.trate"), &assign_GovGASTWD_trate)); - assign_map.insert(std::make_pair(std::string("cim:GovGASTWD.tt"), &assign_GovGASTWD_tt)); + assign_map.emplace("cim:GovGASTWD.a", &assign_GovGASTWD_a); + assign_map.emplace("cim:GovGASTWD.af1", &assign_GovGASTWD_af1); + assign_map.emplace("cim:GovGASTWD.af2", &assign_GovGASTWD_af2); + assign_map.emplace("cim:GovGASTWD.b", &assign_GovGASTWD_b); + assign_map.emplace("cim:GovGASTWD.bf1", &assign_GovGASTWD_bf1); + assign_map.emplace("cim:GovGASTWD.bf2", &assign_GovGASTWD_bf2); + assign_map.emplace("cim:GovGASTWD.c", &assign_GovGASTWD_c); + assign_map.emplace("cim:GovGASTWD.cf2", &assign_GovGASTWD_cf2); + assign_map.emplace("cim:GovGASTWD.ecr", &assign_GovGASTWD_ecr); + assign_map.emplace("cim:GovGASTWD.etd", &assign_GovGASTWD_etd); + assign_map.emplace("cim:GovGASTWD.k3", &assign_GovGASTWD_k3); + assign_map.emplace("cim:GovGASTWD.k4", &assign_GovGASTWD_k4); + assign_map.emplace("cim:GovGASTWD.k5", &assign_GovGASTWD_k5); + assign_map.emplace("cim:GovGASTWD.k6", &assign_GovGASTWD_k6); + assign_map.emplace("cim:GovGASTWD.kd", &assign_GovGASTWD_kd); + assign_map.emplace("cim:GovGASTWD.kdroop", &assign_GovGASTWD_kdroop); + assign_map.emplace("cim:GovGASTWD.kf", &assign_GovGASTWD_kf); + assign_map.emplace("cim:GovGASTWD.ki", &assign_GovGASTWD_ki); + assign_map.emplace("cim:GovGASTWD.kp", &assign_GovGASTWD_kp); + assign_map.emplace("cim:GovGASTWD.mwbase", &assign_GovGASTWD_mwbase); + assign_map.emplace("cim:GovGASTWD.t", &assign_GovGASTWD_t); + assign_map.emplace("cim:GovGASTWD.t3", &assign_GovGASTWD_t3); + assign_map.emplace("cim:GovGASTWD.t4", &assign_GovGASTWD_t4); + assign_map.emplace("cim:GovGASTWD.t5", &assign_GovGASTWD_t5); + assign_map.emplace("cim:GovGASTWD.tc", &assign_GovGASTWD_tc); + assign_map.emplace("cim:GovGASTWD.tcd", &assign_GovGASTWD_tcd); + assign_map.emplace("cim:GovGASTWD.td", &assign_GovGASTWD_td); + assign_map.emplace("cim:GovGASTWD.tf", &assign_GovGASTWD_tf); + assign_map.emplace("cim:GovGASTWD.tmax", &assign_GovGASTWD_tmax); + assign_map.emplace("cim:GovGASTWD.tmin", &assign_GovGASTWD_tmin); + assign_map.emplace("cim:GovGASTWD.tr", &assign_GovGASTWD_tr); + assign_map.emplace("cim:GovGASTWD.trate", &assign_GovGASTWD_trate); + assign_map.emplace("cim:GovGASTWD.tt", &assign_GovGASTWD_tt); } void GovGASTWD::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/GovGASTWD.hpp b/CGMES_3.0.0/GovGASTWD.hpp index 8f379c43d..c7e31a27b 100644 --- a/CGMES_3.0.0/GovGASTWD.hpp +++ b/CGMES_3.0.0/GovGASTWD.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Woodwardâ„¢ gas turbine governor. [Footnote: Woodward gas turbines are an example of suitable products available commercially. This information is given for the convenience of users of this document and does not constitute an endorsement by IEC of these products.] - */ + /** \brief Woodwardâ„¢ gas turbine governor. [Footnote: Woodward gas turbines are an example of suitable products available commercially. This information is given for the convenience of users of this document and does not constitute an endorsement by IEC of these products.] */ class GovGASTWD : public TurbineGovernorDynamics { public: @@ -31,39 +29,104 @@ namespace CIMPP GovGASTWD(); ~GovGASTWD() override; - CIMPP::Float a; /* Valve positioner (<i>A</i>). Default: 0.0 */ - CIMPP::PU af1; /* Exhaust temperature parameter (<i>Af1</i>). Default: nullptr */ - CIMPP::PU af2; /* Coefficient equal to 0,5(1-speed) (<i>Af2</i>). Default: nullptr */ - CIMPP::Float b; /* Valve positioner (<i>B</i>). Default: 0.0 */ - CIMPP::PU bf1; /* (<i>Bf1</i>). <i>Bf1</i> = <i>E</i>(1-<i>w</i>) where <i>E</i> (speed sensitivity coefficient) is 0,55 to 0,65 x <i>Tr</i>. Default: nullptr */ - CIMPP::PU bf2; /* Turbine torque coefficient K<sub>hhv</sub> (depends on heating value of fuel stream in combustion chamber) (<i>Bf2</i>). Default: nullptr */ - CIMPP::Float c; /* Valve positioner (<i>C</i>). Default: 0.0 */ - CIMPP::PU cf2; /* Coefficient defining fuel flow where power output is 0 % (<i>Cf2</i>). Synchronous but no output. Typically 0,23 x K<sub>hhv </sub>(23 % fuel flow). Default: nullptr */ - CIMPP::Seconds ecr; /* Combustion reaction time delay (<i>Ecr</i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds etd; /* Turbine and exhaust delay (<i>Etd</i>) (&gt;= 0). Default: nullptr */ - CIMPP::PU k3; /* Ratio of fuel adjustment (<i>K3</i>). Default: nullptr */ - CIMPP::PU k4; /* Gain of radiation shield (<i>K4</i>). Default: nullptr */ - CIMPP::PU k5; /* Gain of radiation shield (<i>K5</i>). Default: nullptr */ - CIMPP::PU k6; /* Minimum fuel flow (<i>K6</i>). Default: nullptr */ - CIMPP::PU kd; /* Drop governor gain (<i>Kd</i>). Default: nullptr */ - CIMPP::PU kdroop; /* (<i>Kdroop</i>) (&gt;= 0). Default: nullptr */ - CIMPP::PU kf; /* Fuel system feedback (<i>Kf</i>). Default: nullptr */ - CIMPP::PU ki; /* Isochronous Governor Gain (<i>Ki</i>). Default: nullptr */ - CIMPP::PU kp; /* PID proportional gain (<i>Kp</i>). Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ - CIMPP::Seconds t; /* Fuel control time constant (<i>T</i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds t3; /* Radiation shield time constant (<i>T3</i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds t4; /* Thermocouple time constant (<i>T4</i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds t5; /* Temperature control time constant (<i>T5</i>) (&gt;= 0). Default: nullptr */ - CIMPP::Temperature tc; /* Temperature control (<i>Tc</i>). Default: nullptr */ - CIMPP::Seconds tcd; /* Compressor discharge time constant (<i>Tcd</i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds td; /* Power transducer time constant (<i>Td</i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds tf; /* Fuel system time constant (<i>Tf</i>) (&gt;= 0). Default: nullptr */ - CIMPP::PU tmax; /* Maximum Turbine limit (<i>Tmax</i>) (&gt; GovGASTWD.tmin). Default: nullptr */ - CIMPP::PU tmin; /* Minimum turbine limit (<i>Tmin</i>) (&lt; GovGASTWD.tmax). Default: nullptr */ - CIMPP::Temperature tr; /* Rated temperature (<i>Tr</i>). Default: nullptr */ - CIMPP::ActivePower trate; /* Turbine rating (<i>Trate</i>). Unit = MW. Default: nullptr */ - CIMPP::Seconds tt; /* Temperature controller integration rate (<i>Tt</i>) (&gt;= 0). Default: nullptr */ + /** \brief Valve positioner (<i>A</i>). Default: 0.0 */ + CIMPP::Float a; + + /** \brief Exhaust temperature parameter (<i>Af1</i>). Default: nullptr */ + CIMPP::PU af1; + + /** \brief Coefficient equal to 0,5(1-speed) (<i>Af2</i>). Default: nullptr */ + CIMPP::PU af2; + + /** \brief Valve positioner (<i>B</i>). Default: 0.0 */ + CIMPP::Float b; + + /** \brief (<i>Bf1</i>). <i>Bf1</i> = <i>E</i>(1-<i>w</i>) where <i>E</i> (speed sensitivity coefficient) is 0,55 to 0,65 x <i>Tr</i>. Default: nullptr */ + CIMPP::PU bf1; + + /** \brief Turbine torque coefficient K<sub>hhv</sub> (depends on heating value of fuel stream in combustion chamber) (<i>Bf2</i>). Default: nullptr */ + CIMPP::PU bf2; + + /** \brief Valve positioner (<i>C</i>). Default: 0.0 */ + CIMPP::Float c; + + /** \brief Coefficient defining fuel flow where power output is 0 % (<i>Cf2</i>). Synchronous but no output. Typically 0,23 x K<sub>hhv </sub>(23 % fuel flow). Default: nullptr */ + CIMPP::PU cf2; + + /** \brief Combustion reaction time delay (<i>Ecr</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds ecr; + + /** \brief Turbine and exhaust delay (<i>Etd</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds etd; + + /** \brief Ratio of fuel adjustment (<i>K3</i>). Default: nullptr */ + CIMPP::PU k3; + + /** \brief Gain of radiation shield (<i>K4</i>). Default: nullptr */ + CIMPP::PU k4; + + /** \brief Gain of radiation shield (<i>K5</i>). Default: nullptr */ + CIMPP::PU k5; + + /** \brief Minimum fuel flow (<i>K6</i>). Default: nullptr */ + CIMPP::PU k6; + + /** \brief Drop governor gain (<i>Kd</i>). Default: nullptr */ + CIMPP::PU kd; + + /** \brief (<i>Kdroop</i>) (&gt;= 0). Default: nullptr */ + CIMPP::PU kdroop; + + /** \brief Fuel system feedback (<i>Kf</i>). Default: nullptr */ + CIMPP::PU kf; + + /** \brief Isochronous Governor Gain (<i>Ki</i>). Default: nullptr */ + CIMPP::PU ki; + + /** \brief PID proportional gain (<i>Kp</i>). Default: nullptr */ + CIMPP::PU kp; + + /** \brief Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Fuel control time constant (<i>T</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t; + + /** \brief Radiation shield time constant (<i>T3</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Thermocouple time constant (<i>T4</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Temperature control time constant (<i>T5</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Temperature control (<i>Tc</i>). Default: nullptr */ + CIMPP::Temperature tc; + + /** \brief Compressor discharge time constant (<i>Tcd</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds tcd; + + /** \brief Power transducer time constant (<i>Td</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Fuel system time constant (<i>Tf</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Maximum Turbine limit (<i>Tmax</i>) (&gt; GovGASTWD.tmin). Default: nullptr */ + CIMPP::PU tmax; + + /** \brief Minimum turbine limit (<i>Tmin</i>) (&lt; GovGASTWD.tmax). Default: nullptr */ + CIMPP::PU tmin; + + /** \brief Rated temperature (<i>Tr</i>). Default: nullptr */ + CIMPP::Temperature tr; + + /** \brief Turbine rating (<i>Trate</i>). Unit = MW. Default: nullptr */ + CIMPP::ActivePower trate; + + /** \brief Temperature controller integration rate (<i>Tt</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds tt; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GovHydro1.cpp b/CGMES_3.0.0/GovHydro1.cpp index 0a740553f..ba0d33f7d 100644 --- a/CGMES_3.0.0/GovHydro1.cpp +++ b/CGMES_3.0.0/GovHydro1.cpp @@ -8,25 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Float.hpp" using namespace CIMPP; -GovHydro1::GovHydro1() {}; -GovHydro1::~GovHydro1() {}; +GovHydro1::GovHydro1() {} +GovHydro1::~GovHydro1() {} static const std::list PossibleProfilesForClass = { @@ -66,194 +52,206 @@ GovHydro1::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydro1_at(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_at(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->at; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_dturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_dturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_gmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_gmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_gmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_gmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_hdam(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_hdam(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->hdam; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_qnl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_qnl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qnl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_rperm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_rperm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rperm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_rtemp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_rtemp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rtemp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro1_velm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro1_velm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydro1_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->at; if (!buffer.str().empty()) @@ -267,7 +265,8 @@ bool get_GovHydro1_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro1_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dturb; if (!buffer.str().empty()) @@ -281,7 +280,8 @@ bool get_GovHydro1_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro1_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmax; if (!buffer.str().empty()) @@ -295,7 +295,8 @@ bool get_GovHydro1_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro1_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmin; if (!buffer.str().empty()) @@ -309,7 +310,8 @@ bool get_GovHydro1_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro1_hdam(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hdam; if (!buffer.str().empty()) @@ -323,7 +325,8 @@ bool get_GovHydro1_hdam(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -337,7 +340,8 @@ bool get_GovHydro1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydro1_qnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qnl; if (!buffer.str().empty()) @@ -351,7 +355,8 @@ bool get_GovHydro1_qnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro1_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rperm; if (!buffer.str().empty()) @@ -365,7 +370,8 @@ bool get_GovHydro1_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro1_rtemp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rtemp; if (!buffer.str().empty()) @@ -379,7 +385,8 @@ bool get_GovHydro1_rtemp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro1_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -393,7 +400,8 @@ bool get_GovHydro1_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro1_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -407,7 +415,8 @@ bool get_GovHydro1_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro1_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -421,7 +430,8 @@ bool get_GovHydro1_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro1_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -435,7 +445,8 @@ bool get_GovHydro1_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro1_velm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro1* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velm; if (!buffer.str().empty()) @@ -447,8 +458,6 @@ bool get_GovHydro1_velm(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char GovHydro1::debugName[] = "GovHydro1"; const char* GovHydro1::debugString() const { @@ -457,25 +466,25 @@ const char* GovHydro1::debugString() const void GovHydro1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydro1"), &GovHydro1_factory)); + factory_map.emplace("cim:GovHydro1", &GovHydro1_factory); } void GovHydro1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.at"), &assign_GovHydro1_at)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.dturb"), &assign_GovHydro1_dturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.gmax"), &assign_GovHydro1_gmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.gmin"), &assign_GovHydro1_gmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.hdam"), &assign_GovHydro1_hdam)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.mwbase"), &assign_GovHydro1_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.qnl"), &assign_GovHydro1_qnl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.rperm"), &assign_GovHydro1_rperm)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.rtemp"), &assign_GovHydro1_rtemp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.tf"), &assign_GovHydro1_tf)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.tg"), &assign_GovHydro1_tg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.tr"), &assign_GovHydro1_tr)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.tw"), &assign_GovHydro1_tw)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro1.velm"), &assign_GovHydro1_velm)); + assign_map.emplace("cim:GovHydro1.at", &assign_GovHydro1_at); + assign_map.emplace("cim:GovHydro1.dturb", &assign_GovHydro1_dturb); + assign_map.emplace("cim:GovHydro1.gmax", &assign_GovHydro1_gmax); + assign_map.emplace("cim:GovHydro1.gmin", &assign_GovHydro1_gmin); + assign_map.emplace("cim:GovHydro1.hdam", &assign_GovHydro1_hdam); + assign_map.emplace("cim:GovHydro1.mwbase", &assign_GovHydro1_mwbase); + assign_map.emplace("cim:GovHydro1.qnl", &assign_GovHydro1_qnl); + assign_map.emplace("cim:GovHydro1.rperm", &assign_GovHydro1_rperm); + assign_map.emplace("cim:GovHydro1.rtemp", &assign_GovHydro1_rtemp); + assign_map.emplace("cim:GovHydro1.tf", &assign_GovHydro1_tf); + assign_map.emplace("cim:GovHydro1.tg", &assign_GovHydro1_tg); + assign_map.emplace("cim:GovHydro1.tr", &assign_GovHydro1_tr); + assign_map.emplace("cim:GovHydro1.tw", &assign_GovHydro1_tw); + assign_map.emplace("cim:GovHydro1.velm", &assign_GovHydro1_velm); } void GovHydro1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/GovHydro1.hpp b/CGMES_3.0.0/GovHydro1.hpp index 7ad2d925a..2639fa8d6 100644 --- a/CGMES_3.0.0/GovHydro1.hpp +++ b/CGMES_3.0.0/GovHydro1.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Basic hydro turbine governor. - */ + /** \brief Basic hydro turbine governor. */ class GovHydro1 : public TurbineGovernorDynamics { public: @@ -30,20 +28,47 @@ namespace CIMPP GovHydro1(); ~GovHydro1() override; - CIMPP::PU at; /* Turbine gain (<i>At</i>) (&gt; 0). Typical value = 1,2. Default: nullptr */ - CIMPP::PU dturb; /* Turbine damping factor (<i>Dturb</i>) (&gt;= 0). Typical value = 0,5. Default: nullptr */ - CIMPP::PU gmax; /* Maximum gate opening (<i>Gmax</i>) (&gt; 0 and &gt; GovHydro.gmin). Typical value = 1. Default: nullptr */ - CIMPP::PU gmin; /* Minimum gate opening (<i>Gmin</i>) (&gt;= 0 and &lt; GovHydro1.gmax). Typical value = 0. Default: nullptr */ - CIMPP::PU hdam; /* Turbine nominal head (<i>hdam</i>). Typical value = 1. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ - CIMPP::PU qnl; /* No-load flow at nominal head (<i>qnl</i>) (&gt;= 0). Typical value = 0,08. Default: nullptr */ - CIMPP::PU rperm; /* Permanent droop (<i>R</i>) (&gt; 0). Typical value = 0,04. Default: nullptr */ - CIMPP::PU rtemp; /* Temporary droop (<i>r</i>) (&gt; GovHydro1.rperm). Typical value = 0,3. Default: nullptr */ - CIMPP::Seconds tf; /* Filter time constant (<i>Tf</i>) (&gt; 0). Typical value = 0,05. Default: nullptr */ - CIMPP::Seconds tg; /* Gate servo time constant (<i>Tg</i>) (&gt; 0). Typical value = 0,5. Default: nullptr */ - CIMPP::Seconds tr; /* Washout time constant (<i>Tr</i>) (&gt; 0). Typical value = 5. Default: nullptr */ - CIMPP::Seconds tw; /* Water inertia time constant (<i>Tw</i>) (&gt; 0). Typical value = 1. Default: nullptr */ - CIMPP::Float velm; /* Maximum gate velocity (<i>Vlem</i>) (&gt; 0). Typical value = 0,2. Default: 0.0 */ + /** \brief Turbine gain (<i>At</i>) (&gt; 0). Typical value = 1,2. Default: nullptr */ + CIMPP::PU at; + + /** \brief Turbine damping factor (<i>Dturb</i>) (&gt;= 0). Typical value = 0,5. Default: nullptr */ + CIMPP::PU dturb; + + /** \brief Maximum gate opening (<i>Gmax</i>) (&gt; 0 and &gt; GovHydro.gmin). Typical value = 1. Default: nullptr */ + CIMPP::PU gmax; + + /** \brief Minimum gate opening (<i>Gmin</i>) (&gt;= 0 and &lt; GovHydro1.gmax). Typical value = 0. Default: nullptr */ + CIMPP::PU gmin; + + /** \brief Turbine nominal head (<i>hdam</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU hdam; + + /** \brief Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief No-load flow at nominal head (<i>qnl</i>) (&gt;= 0). Typical value = 0,08. Default: nullptr */ + CIMPP::PU qnl; + + /** \brief Permanent droop (<i>R</i>) (&gt; 0). Typical value = 0,04. Default: nullptr */ + CIMPP::PU rperm; + + /** \brief Temporary droop (<i>r</i>) (&gt; GovHydro1.rperm). Typical value = 0,3. Default: nullptr */ + CIMPP::PU rtemp; + + /** \brief Filter time constant (<i>Tf</i>) (&gt; 0). Typical value = 0,05. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Gate servo time constant (<i>Tg</i>) (&gt; 0). Typical value = 0,5. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Washout time constant (<i>Tr</i>) (&gt; 0). Typical value = 5. Default: nullptr */ + CIMPP::Seconds tr; + + /** \brief Water inertia time constant (<i>Tw</i>) (&gt; 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tw; + + /** \brief Maximum gate velocity (<i>Vlem</i>) (&gt; 0). Typical value = 0,2. Default: 0.0 */ + CIMPP::Float velm; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GovHydro2.cpp b/CGMES_3.0.0/GovHydro2.cpp index 33d07e621..83cb2dbf7 100644 --- a/CGMES_3.0.0/GovHydro2.cpp +++ b/CGMES_3.0.0/GovHydro2.cpp @@ -8,40 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Frequency.hpp" -#include "ActivePower.hpp" -#include "Frequency.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Float.hpp" -#include "Float.hpp" using namespace CIMPP; -GovHydro2::GovHydro2() {}; -GovHydro2::~GovHydro2() {}; +GovHydro2::GovHydro2() {} +GovHydro2::~GovHydro2() {} static const std::list PossibleProfilesForClass = { @@ -96,389 +67,416 @@ GovHydro2::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydro2_aturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_aturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->aturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_bturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_bturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_eps(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eps; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_gv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_kturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_kturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_pgv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_rperm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_rperm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rperm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_rtemp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_rtemp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rtemp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_uc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro2_uo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro2_uo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydro2_aturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->aturb; if (!buffer.str().empty()) @@ -492,7 +490,8 @@ bool get_GovHydro2_aturb(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro2_bturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bturb; if (!buffer.str().empty()) @@ -506,7 +505,8 @@ bool get_GovHydro2_bturb(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro2_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -520,7 +520,8 @@ bool get_GovHydro2_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro2_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -534,7 +535,8 @@ bool get_GovHydro2_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro2_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eps; if (!buffer.str().empty()) @@ -548,7 +550,8 @@ bool get_GovHydro2_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro2_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -562,7 +565,8 @@ bool get_GovHydro2_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro2_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -576,7 +580,8 @@ bool get_GovHydro2_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro2_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -590,7 +595,8 @@ bool get_GovHydro2_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro2_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -604,7 +610,8 @@ bool get_GovHydro2_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro2_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -618,7 +625,8 @@ bool get_GovHydro2_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro2_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv6; if (!buffer.str().empty()) @@ -632,7 +640,8 @@ bool get_GovHydro2_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro2_kturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kturb; if (!buffer.str().empty()) @@ -646,7 +655,8 @@ bool get_GovHydro2_kturb(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -660,7 +670,8 @@ bool get_GovHydro2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydro2_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -674,7 +685,8 @@ bool get_GovHydro2_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro2_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -688,7 +700,8 @@ bool get_GovHydro2_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro2_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -702,7 +715,8 @@ bool get_GovHydro2_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro2_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -716,7 +730,8 @@ bool get_GovHydro2_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro2_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -730,7 +745,8 @@ bool get_GovHydro2_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro2_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv6; if (!buffer.str().empty()) @@ -744,7 +760,8 @@ bool get_GovHydro2_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro2_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -758,7 +775,8 @@ bool get_GovHydro2_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro2_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -772,7 +790,8 @@ bool get_GovHydro2_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro2_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rperm; if (!buffer.str().empty()) @@ -786,7 +805,8 @@ bool get_GovHydro2_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro2_rtemp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rtemp; if (!buffer.str().empty()) @@ -800,7 +820,8 @@ bool get_GovHydro2_rtemp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro2_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -814,7 +835,8 @@ bool get_GovHydro2_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro2_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -828,7 +850,8 @@ bool get_GovHydro2_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro2_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -842,7 +865,8 @@ bool get_GovHydro2_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro2_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -856,7 +880,8 @@ bool get_GovHydro2_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro2_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uc; if (!buffer.str().empty()) @@ -870,7 +895,8 @@ bool get_GovHydro2_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro2_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uo; if (!buffer.str().empty()) @@ -882,8 +908,6 @@ bool get_GovHydro2_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char GovHydro2::debugName[] = "GovHydro2"; const char* GovHydro2::debugString() const { @@ -892,40 +916,40 @@ const char* GovHydro2::debugString() const void GovHydro2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydro2"), &GovHydro2_factory)); + factory_map.emplace("cim:GovHydro2", &GovHydro2_factory); } void GovHydro2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.aturb"), &assign_GovHydro2_aturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.bturb"), &assign_GovHydro2_bturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.db1"), &assign_GovHydro2_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.db2"), &assign_GovHydro2_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.eps"), &assign_GovHydro2_eps)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.gv1"), &assign_GovHydro2_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.gv2"), &assign_GovHydro2_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.gv3"), &assign_GovHydro2_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.gv4"), &assign_GovHydro2_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.gv5"), &assign_GovHydro2_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.gv6"), &assign_GovHydro2_gv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.kturb"), &assign_GovHydro2_kturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.mwbase"), &assign_GovHydro2_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.pgv1"), &assign_GovHydro2_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.pgv2"), &assign_GovHydro2_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.pgv3"), &assign_GovHydro2_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.pgv4"), &assign_GovHydro2_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.pgv5"), &assign_GovHydro2_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.pgv6"), &assign_GovHydro2_pgv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.pmax"), &assign_GovHydro2_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.pmin"), &assign_GovHydro2_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.rperm"), &assign_GovHydro2_rperm)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.rtemp"), &assign_GovHydro2_rtemp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.tg"), &assign_GovHydro2_tg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.tp"), &assign_GovHydro2_tp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.tr"), &assign_GovHydro2_tr)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.tw"), &assign_GovHydro2_tw)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.uc"), &assign_GovHydro2_uc)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro2.uo"), &assign_GovHydro2_uo)); + assign_map.emplace("cim:GovHydro2.aturb", &assign_GovHydro2_aturb); + assign_map.emplace("cim:GovHydro2.bturb", &assign_GovHydro2_bturb); + assign_map.emplace("cim:GovHydro2.db1", &assign_GovHydro2_db1); + assign_map.emplace("cim:GovHydro2.db2", &assign_GovHydro2_db2); + assign_map.emplace("cim:GovHydro2.eps", &assign_GovHydro2_eps); + assign_map.emplace("cim:GovHydro2.gv1", &assign_GovHydro2_gv1); + assign_map.emplace("cim:GovHydro2.gv2", &assign_GovHydro2_gv2); + assign_map.emplace("cim:GovHydro2.gv3", &assign_GovHydro2_gv3); + assign_map.emplace("cim:GovHydro2.gv4", &assign_GovHydro2_gv4); + assign_map.emplace("cim:GovHydro2.gv5", &assign_GovHydro2_gv5); + assign_map.emplace("cim:GovHydro2.gv6", &assign_GovHydro2_gv6); + assign_map.emplace("cim:GovHydro2.kturb", &assign_GovHydro2_kturb); + assign_map.emplace("cim:GovHydro2.mwbase", &assign_GovHydro2_mwbase); + assign_map.emplace("cim:GovHydro2.pgv1", &assign_GovHydro2_pgv1); + assign_map.emplace("cim:GovHydro2.pgv2", &assign_GovHydro2_pgv2); + assign_map.emplace("cim:GovHydro2.pgv3", &assign_GovHydro2_pgv3); + assign_map.emplace("cim:GovHydro2.pgv4", &assign_GovHydro2_pgv4); + assign_map.emplace("cim:GovHydro2.pgv5", &assign_GovHydro2_pgv5); + assign_map.emplace("cim:GovHydro2.pgv6", &assign_GovHydro2_pgv6); + assign_map.emplace("cim:GovHydro2.pmax", &assign_GovHydro2_pmax); + assign_map.emplace("cim:GovHydro2.pmin", &assign_GovHydro2_pmin); + assign_map.emplace("cim:GovHydro2.rperm", &assign_GovHydro2_rperm); + assign_map.emplace("cim:GovHydro2.rtemp", &assign_GovHydro2_rtemp); + assign_map.emplace("cim:GovHydro2.tg", &assign_GovHydro2_tg); + assign_map.emplace("cim:GovHydro2.tp", &assign_GovHydro2_tp); + assign_map.emplace("cim:GovHydro2.tr", &assign_GovHydro2_tr); + assign_map.emplace("cim:GovHydro2.tw", &assign_GovHydro2_tw); + assign_map.emplace("cim:GovHydro2.uc", &assign_GovHydro2_uc); + assign_map.emplace("cim:GovHydro2.uo", &assign_GovHydro2_uo); } void GovHydro2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/GovHydro2.hpp b/CGMES_3.0.0/GovHydro2.hpp index b5dc9b649..ea8e08229 100644 --- a/CGMES_3.0.0/GovHydro2.hpp +++ b/CGMES_3.0.0/GovHydro2.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE hydro turbine governor with straightforward penstock configuration and hydraulic-dashpot governor. - */ + /** \brief IEEE hydro turbine governor with straightforward penstock configuration and hydraulic-dashpot governor. */ class GovHydro2 : public TurbineGovernorDynamics { public: @@ -31,35 +29,92 @@ namespace CIMPP GovHydro2(); ~GovHydro2() override; - CIMPP::PU aturb; /* Turbine numerator multiplier (<i>Aturb</i>). Typical value = -1. Default: nullptr */ - CIMPP::PU bturb; /* Turbine denominator multiplier (<i>Bturb</i>) (&gt; 0). Typical value = 0,5. Default: nullptr */ - CIMPP::Frequency db1; /* Intentional deadband width (<i>db1</i>). Unit = Hz. Typical value = 0. Default: nullptr */ - CIMPP::ActivePower db2; /* Unintentional deadband (<i>db2</i>). Unit = MW. Typical value = 0. Default: nullptr */ - CIMPP::Frequency eps; /* Intentional db hysteresis (<i>eps</i>). Unit = Hz. Typical value = 0. Default: nullptr */ - CIMPP::PU gv1; /* Nonlinear gain point 1, PU gv (<i>Gv1</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain point 2, PU gv (<i>Gv2</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain point 3, PU gv (<i>Gv3</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain point 4, PU gv (<i>Gv4</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain point 5, PU gv (<i>Gv5</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv6; /* Nonlinear gain point 6, PU gv (<i>Gv6</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU kturb; /* Turbine gain (<i>Kturb</i>). Typical value = 1. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain point 1, PU power (<i>Pgv1</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain point 2, PU power (<i>Pgv2</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain point 3, PU power (<i>Pgv3</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain point 4, PU power (P<i>gv4</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain point 5, PU power (<i>Pgv5</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv6; /* Nonlinear gain point 6, PU power (<i>Pgv6</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pmax; /* Maximum gate opening (<i>Pmax</i>) (&gt; GovHydro2.pmin). Typical value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum gate opening (<i>Pmin</i>) (&lt; GovHydro2.pmax). Typical value = 0. Default: nullptr */ - CIMPP::PU rperm; /* Permanent droop (<i>Rperm</i>). Typical value = 0,05. Default: nullptr */ - CIMPP::PU rtemp; /* Temporary droop (<i>Rtemp</i>). Typical value = 0,5. Default: nullptr */ - CIMPP::Seconds tg; /* Gate servo time constant (<i>Tg</i>) (&gt; 0). Typical value = 0,5. Default: nullptr */ - CIMPP::Seconds tp; /* Pilot servo valve time constant (<i>Tp</i>) (&gt;= 0). Typical value = 0,03. Default: nullptr */ - CIMPP::Seconds tr; /* Dashpot time constant (<i>Tr</i>) (&gt;= 0). Typical value = 12. Default: nullptr */ - CIMPP::Seconds tw; /* Water inertia time constant (<i>Tw</i>) (&gt;= 0). Typical value = 2. Default: nullptr */ - CIMPP::Float uc; /* Maximum gate closing velocity (<i>Uc</i>) (&lt; 0). Unit = PU / s. Typical value = -0,1. Default: 0.0 */ - CIMPP::Float uo; /* Maximum gate opening velocity (<i>Uo</i>). Unit = PU / s. Typical value = 0,1. Default: 0.0 */ + /** \brief Turbine numerator multiplier (<i>Aturb</i>). Typical value = -1. Default: nullptr */ + CIMPP::PU aturb; + + /** \brief Turbine denominator multiplier (<i>Bturb</i>) (&gt; 0). Typical value = 0,5. Default: nullptr */ + CIMPP::PU bturb; + + /** \brief Intentional deadband width (<i>db1</i>). Unit = Hz. Typical value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Unintentional deadband (<i>db2</i>). Unit = MW. Typical value = 0. Default: nullptr */ + CIMPP::ActivePower db2; + + /** \brief Intentional db hysteresis (<i>eps</i>). Unit = Hz. Typical value = 0. Default: nullptr */ + CIMPP::Frequency eps; + + /** \brief Nonlinear gain point 1, PU gv (<i>Gv1</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain point 2, PU gv (<i>Gv2</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain point 3, PU gv (<i>Gv3</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain point 4, PU gv (<i>Gv4</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain point 5, PU gv (<i>Gv5</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Nonlinear gain point 6, PU gv (<i>Gv6</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv6; + + /** \brief Turbine gain (<i>Kturb</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU kturb; + + /** \brief Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain point 1, PU power (<i>Pgv1</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain point 2, PU power (<i>Pgv2</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain point 3, PU power (<i>Pgv3</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain point 4, PU power (P<i>gv4</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain point 5, PU power (<i>Pgv5</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief Nonlinear gain point 6, PU power (<i>Pgv6</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv6; + + /** \brief Maximum gate opening (<i>Pmax</i>) (&gt; GovHydro2.pmin). Typical value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum gate opening (<i>Pmin</i>) (&lt; GovHydro2.pmax). Typical value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Permanent droop (<i>Rperm</i>). Typical value = 0,05. Default: nullptr */ + CIMPP::PU rperm; + + /** \brief Temporary droop (<i>Rtemp</i>). Typical value = 0,5. Default: nullptr */ + CIMPP::PU rtemp; + + /** \brief Gate servo time constant (<i>Tg</i>) (&gt; 0). Typical value = 0,5. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Pilot servo valve time constant (<i>Tp</i>) (&gt;= 0). Typical value = 0,03. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Dashpot time constant (<i>Tr</i>) (&gt;= 0). Typical value = 12. Default: nullptr */ + CIMPP::Seconds tr; + + /** \brief Water inertia time constant (<i>Tw</i>) (&gt;= 0). Typical value = 2. Default: nullptr */ + CIMPP::Seconds tw; + + /** \brief Maximum gate closing velocity (<i>Uc</i>) (&lt; 0). Unit = PU / s. Typical value = -0,1. Default: 0.0 */ + CIMPP::Float uc; + + /** \brief Maximum gate opening velocity (<i>Uo</i>). Unit = PU / s. Typical value = 0,1. Default: 0.0 */ + CIMPP::Float uo; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GovHydro3.cpp b/CGMES_3.0.0/GovHydro3.cpp index e1bfa1441..e942b6ea1 100644 --- a/CGMES_3.0.0/GovHydro3.cpp +++ b/CGMES_3.0.0/GovHydro3.cpp @@ -8,47 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "Frequency.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "Frequency.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Float.hpp" -#include "Float.hpp" using namespace CIMPP; -GovHydro3::GovHydro3() {}; -GovHydro3::~GovHydro3() {}; +GovHydro3::GovHydro3() {} +GovHydro3::~GovHydro3() {} static const std::list PossibleProfilesForClass = { @@ -110,480 +74,514 @@ GovHydro3::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydro3_at(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_at(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->at; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_dturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_dturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_eps(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eps; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_governorControl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_governorControl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->governorControl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_gv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_h0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_h0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->h0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_pgv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_qnl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_qnl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qnl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_relec(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_relec(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->relec; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_rgate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_rgate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rgate; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_tt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_velcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_velcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velcl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro3_velop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro3_velop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydro3_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->at; if (!buffer.str().empty()) @@ -597,7 +595,8 @@ bool get_GovHydro3_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -611,7 +610,8 @@ bool get_GovHydro3_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -625,7 +625,8 @@ bool get_GovHydro3_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dturb; if (!buffer.str().empty()) @@ -639,7 +640,8 @@ bool get_GovHydro3_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro3_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eps; if (!buffer.str().empty()) @@ -653,7 +655,8 @@ bool get_GovHydro3_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_governorControl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->governorControl; if (!buffer.str().empty()) @@ -667,7 +670,8 @@ bool get_GovHydro3_governorControl(const BaseClass* BaseClass_ptr1, std::strings bool get_GovHydro3_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -681,7 +685,8 @@ bool get_GovHydro3_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -695,7 +700,8 @@ bool get_GovHydro3_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -709,7 +715,8 @@ bool get_GovHydro3_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -723,7 +730,8 @@ bool get_GovHydro3_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -737,7 +745,8 @@ bool get_GovHydro3_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv6; if (!buffer.str().empty()) @@ -751,7 +760,8 @@ bool get_GovHydro3_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_h0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->h0; if (!buffer.str().empty()) @@ -765,7 +775,8 @@ bool get_GovHydro3_h0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -779,7 +790,8 @@ bool get_GovHydro3_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -793,7 +805,8 @@ bool get_GovHydro3_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -807,7 +820,8 @@ bool get_GovHydro3_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -821,7 +835,8 @@ bool get_GovHydro3_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -835,7 +850,8 @@ bool get_GovHydro3_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydro3_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -849,7 +865,8 @@ bool get_GovHydro3_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro3_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -863,7 +880,8 @@ bool get_GovHydro3_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro3_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -877,7 +895,8 @@ bool get_GovHydro3_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro3_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -891,7 +910,8 @@ bool get_GovHydro3_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro3_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -905,7 +925,8 @@ bool get_GovHydro3_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro3_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv6; if (!buffer.str().empty()) @@ -919,7 +940,8 @@ bool get_GovHydro3_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro3_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -933,7 +955,8 @@ bool get_GovHydro3_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro3_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -947,7 +970,8 @@ bool get_GovHydro3_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro3_qnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qnl; if (!buffer.str().empty()) @@ -961,7 +985,8 @@ bool get_GovHydro3_qnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro3_relec(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->relec; if (!buffer.str().empty()) @@ -975,7 +1000,8 @@ bool get_GovHydro3_relec(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro3_rgate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rgate; if (!buffer.str().empty()) @@ -989,7 +1015,8 @@ bool get_GovHydro3_rgate(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro3_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -1003,7 +1030,8 @@ bool get_GovHydro3_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -1017,7 +1045,8 @@ bool get_GovHydro3_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -1031,7 +1060,8 @@ bool get_GovHydro3_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tt; if (!buffer.str().empty()) @@ -1045,7 +1075,8 @@ bool get_GovHydro3_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -1059,7 +1090,8 @@ bool get_GovHydro3_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro3_velcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velcl; if (!buffer.str().empty()) @@ -1073,7 +1105,8 @@ bool get_GovHydro3_velcl(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro3_velop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro3* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velop; if (!buffer.str().empty()) @@ -1085,8 +1118,6 @@ bool get_GovHydro3_velop(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } - - const char GovHydro3::debugName[] = "GovHydro3"; const char* GovHydro3::debugString() const { @@ -1095,47 +1126,47 @@ const char* GovHydro3::debugString() const void GovHydro3::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydro3"), &GovHydro3_factory)); + factory_map.emplace("cim:GovHydro3", &GovHydro3_factory); } void GovHydro3::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.at"), &assign_GovHydro3_at)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.db1"), &assign_GovHydro3_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.db2"), &assign_GovHydro3_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.dturb"), &assign_GovHydro3_dturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.eps"), &assign_GovHydro3_eps)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.governorControl"), &assign_GovHydro3_governorControl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.gv1"), &assign_GovHydro3_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.gv2"), &assign_GovHydro3_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.gv3"), &assign_GovHydro3_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.gv4"), &assign_GovHydro3_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.gv5"), &assign_GovHydro3_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.gv6"), &assign_GovHydro3_gv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.h0"), &assign_GovHydro3_h0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.k1"), &assign_GovHydro3_k1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.k2"), &assign_GovHydro3_k2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.kg"), &assign_GovHydro3_kg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.ki"), &assign_GovHydro3_ki)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.mwbase"), &assign_GovHydro3_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.pgv1"), &assign_GovHydro3_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.pgv2"), &assign_GovHydro3_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.pgv3"), &assign_GovHydro3_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.pgv4"), &assign_GovHydro3_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.pgv5"), &assign_GovHydro3_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.pgv6"), &assign_GovHydro3_pgv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.pmax"), &assign_GovHydro3_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.pmin"), &assign_GovHydro3_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.qnl"), &assign_GovHydro3_qnl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.relec"), &assign_GovHydro3_relec)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.rgate"), &assign_GovHydro3_rgate)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.td"), &assign_GovHydro3_td)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.tf"), &assign_GovHydro3_tf)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.tp"), &assign_GovHydro3_tp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.tt"), &assign_GovHydro3_tt)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.tw"), &assign_GovHydro3_tw)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.velcl"), &assign_GovHydro3_velcl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro3.velop"), &assign_GovHydro3_velop)); + assign_map.emplace("cim:GovHydro3.at", &assign_GovHydro3_at); + assign_map.emplace("cim:GovHydro3.db1", &assign_GovHydro3_db1); + assign_map.emplace("cim:GovHydro3.db2", &assign_GovHydro3_db2); + assign_map.emplace("cim:GovHydro3.dturb", &assign_GovHydro3_dturb); + assign_map.emplace("cim:GovHydro3.eps", &assign_GovHydro3_eps); + assign_map.emplace("cim:GovHydro3.governorControl", &assign_GovHydro3_governorControl); + assign_map.emplace("cim:GovHydro3.gv1", &assign_GovHydro3_gv1); + assign_map.emplace("cim:GovHydro3.gv2", &assign_GovHydro3_gv2); + assign_map.emplace("cim:GovHydro3.gv3", &assign_GovHydro3_gv3); + assign_map.emplace("cim:GovHydro3.gv4", &assign_GovHydro3_gv4); + assign_map.emplace("cim:GovHydro3.gv5", &assign_GovHydro3_gv5); + assign_map.emplace("cim:GovHydro3.gv6", &assign_GovHydro3_gv6); + assign_map.emplace("cim:GovHydro3.h0", &assign_GovHydro3_h0); + assign_map.emplace("cim:GovHydro3.k1", &assign_GovHydro3_k1); + assign_map.emplace("cim:GovHydro3.k2", &assign_GovHydro3_k2); + assign_map.emplace("cim:GovHydro3.kg", &assign_GovHydro3_kg); + assign_map.emplace("cim:GovHydro3.ki", &assign_GovHydro3_ki); + assign_map.emplace("cim:GovHydro3.mwbase", &assign_GovHydro3_mwbase); + assign_map.emplace("cim:GovHydro3.pgv1", &assign_GovHydro3_pgv1); + assign_map.emplace("cim:GovHydro3.pgv2", &assign_GovHydro3_pgv2); + assign_map.emplace("cim:GovHydro3.pgv3", &assign_GovHydro3_pgv3); + assign_map.emplace("cim:GovHydro3.pgv4", &assign_GovHydro3_pgv4); + assign_map.emplace("cim:GovHydro3.pgv5", &assign_GovHydro3_pgv5); + assign_map.emplace("cim:GovHydro3.pgv6", &assign_GovHydro3_pgv6); + assign_map.emplace("cim:GovHydro3.pmax", &assign_GovHydro3_pmax); + assign_map.emplace("cim:GovHydro3.pmin", &assign_GovHydro3_pmin); + assign_map.emplace("cim:GovHydro3.qnl", &assign_GovHydro3_qnl); + assign_map.emplace("cim:GovHydro3.relec", &assign_GovHydro3_relec); + assign_map.emplace("cim:GovHydro3.rgate", &assign_GovHydro3_rgate); + assign_map.emplace("cim:GovHydro3.td", &assign_GovHydro3_td); + assign_map.emplace("cim:GovHydro3.tf", &assign_GovHydro3_tf); + assign_map.emplace("cim:GovHydro3.tp", &assign_GovHydro3_tp); + assign_map.emplace("cim:GovHydro3.tt", &assign_GovHydro3_tt); + assign_map.emplace("cim:GovHydro3.tw", &assign_GovHydro3_tw); + assign_map.emplace("cim:GovHydro3.velcl", &assign_GovHydro3_velcl); + assign_map.emplace("cim:GovHydro3.velop", &assign_GovHydro3_velop); } void GovHydro3::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/GovHydro3.hpp b/CGMES_3.0.0/GovHydro3.hpp index 74858ad74..f463d19a5 100644 --- a/CGMES_3.0.0/GovHydro3.hpp +++ b/CGMES_3.0.0/GovHydro3.hpp @@ -22,9 +22,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE hydro governor-turbine. This model differs from that defined in the IEEE modelling guideline paper in that the limits on gate position and velocity do not permit "wind up" of the upstream signals. - */ + /** \brief Modified IEEE hydro governor-turbine. This model differs from that defined in the IEEE modelling guideline paper in that the limits on gate position and velocity do not permit "wind up" of the upstream signals. */ class GovHydro3 : public TurbineGovernorDynamics { public: @@ -32,42 +30,113 @@ namespace CIMPP GovHydro3(); ~GovHydro3() override; - CIMPP::PU at; /* Turbine gain (<i>At</i>) (&gt;0). Typical value = 1,2. Default: nullptr */ - CIMPP::Frequency db1; /* Intentional dead-band width (<i>db1</i>). Unit = Hz. Typical value = 0. Default: nullptr */ - CIMPP::ActivePower db2; /* Unintentional dead-band (<i>db2</i>). Unit = MW. Typical value = 0. Default: nullptr */ - CIMPP::PU dturb; /* Turbine damping factor (<i>Dturb</i>). Typical value = 0,2. Default: nullptr */ - CIMPP::Frequency eps; /* Intentional db hysteresis (<i>eps</i>). Unit = Hz. Typical value = 0. Default: nullptr */ - CIMPP::Boolean governorControl; /* Governor control flag (<i>Cflag</i>). true = PID control is active false = double derivative control is active. Typical value = true. Default: false */ - CIMPP::PU gv1; /* Nonlinear gain point 1, PU gv (<i>Gv1</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain point 2, PU gv (<i>Gv2</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain point 3, PU gv (<i>Gv3</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain point 4, PU gv (<i>Gv4</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain point 5, PU gv (<i>Gv5</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv6; /* Nonlinear gain point 6, PU gv (<i>Gv6</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU h0; /* Turbine nominal head (<i>H0</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU k1; /* Derivative gain (<i>K1</i>). Typical value = 0,01. Default: nullptr */ - CIMPP::PU k2; /* Double derivative gain, if <i>Cflag</i> = -1 (<i>K2</i>). Typical value = 2,5. Default: nullptr */ - CIMPP::PU kg; /* Gate servo gain (<i>Kg</i>). Typical value = 2. Default: nullptr */ - CIMPP::PU ki; /* Integral gain (<i>Ki</i>). Typical value = 0,5. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain point 1, PU power (<i>Pgv1</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain point 2, PU power (<i>Pgv2</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain point 3, PU power (<i>Pgv3</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain point 4, PU power (<i>Pgv4</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain point 5, PU power (<i>Pgv5</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv6; /* Nonlinear gain point 6, PU power (<i>Pgv6</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pmax; /* Maximum gate opening, PU of MWbase (<i>Pmax</i>) (&gt; GovHydro3.pmin). Typical value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum gate opening, PU of <i>MWbase</i> (<i>Pmin</i>) (&lt; GovHydro3.pmax). Typical value = 0. Default: nullptr */ - CIMPP::PU qnl; /* No-load turbine flow at nominal head (<i>Qnl</i>). Typical value = 0,08. Default: nullptr */ - CIMPP::PU relec; /* Steady-state droop, PU, for electrical power feedback (<i>Relec</i>). Typical value = 0,05. Default: nullptr */ - CIMPP::PU rgate; /* Steady-state droop, PU, for governor output feedback (<i>Rgate</i>). Typical value = 0. Default: nullptr */ - CIMPP::Seconds td; /* Input filter time constant (<i>Td</i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ - CIMPP::Seconds tf; /* Washout time constant (<i>Tf</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds tp; /* Gate servo time constant (<i>Tp</i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ - CIMPP::Seconds tt; /* Power feedback time constant (<i>Tt</i>) (&gt;= 0). Typical value = 0,2. Default: nullptr */ - CIMPP::Seconds tw; /* Water inertia time constant (<i>Tw</i>) (&gt;= 0). If = 0, block is bypassed. Typical value = 1. Default: nullptr */ - CIMPP::Float velcl; /* Maximum gate closing velocity (<i>Velcl</i>). Unit = PU / s. Typical value = -0,2. Default: 0.0 */ - CIMPP::Float velop; /* Maximum gate opening velocity (<i>Velop</i>). Unit = PU / s. Typical value = 0,2. Default: 0.0 */ + /** \brief Turbine gain (<i>At</i>) (&gt;0). Typical value = 1,2. Default: nullptr */ + CIMPP::PU at; + + /** \brief Intentional dead-band width (<i>db1</i>). Unit = Hz. Typical value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Unintentional dead-band (<i>db2</i>). Unit = MW. Typical value = 0. Default: nullptr */ + CIMPP::ActivePower db2; + + /** \brief Turbine damping factor (<i>Dturb</i>). Typical value = 0,2. Default: nullptr */ + CIMPP::PU dturb; + + /** \brief Intentional db hysteresis (<i>eps</i>). Unit = Hz. Typical value = 0. Default: nullptr */ + CIMPP::Frequency eps; + + /** \brief Governor control flag (<i>Cflag</i>). true = PID control is active false = double derivative control is active. Typical value = true. Default: false */ + CIMPP::Boolean governorControl; + + /** \brief Nonlinear gain point 1, PU gv (<i>Gv1</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain point 2, PU gv (<i>Gv2</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain point 3, PU gv (<i>Gv3</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain point 4, PU gv (<i>Gv4</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain point 5, PU gv (<i>Gv5</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Nonlinear gain point 6, PU gv (<i>Gv6</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv6; + + /** \brief Turbine nominal head (<i>H0</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU h0; + + /** \brief Derivative gain (<i>K1</i>). Typical value = 0,01. Default: nullptr */ + CIMPP::PU k1; + + /** \brief Double derivative gain, if <i>Cflag</i> = -1 (<i>K2</i>). Typical value = 2,5. Default: nullptr */ + CIMPP::PU k2; + + /** \brief Gate servo gain (<i>Kg</i>). Typical value = 2. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Integral gain (<i>Ki</i>). Typical value = 0,5. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain point 1, PU power (<i>Pgv1</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain point 2, PU power (<i>Pgv2</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain point 3, PU power (<i>Pgv3</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain point 4, PU power (<i>Pgv4</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain point 5, PU power (<i>Pgv5</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief Nonlinear gain point 6, PU power (<i>Pgv6</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv6; + + /** \brief Maximum gate opening, PU of MWbase (<i>Pmax</i>) (&gt; GovHydro3.pmin). Typical value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum gate opening, PU of <i>MWbase</i> (<i>Pmin</i>) (&lt; GovHydro3.pmax). Typical value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief No-load turbine flow at nominal head (<i>Qnl</i>). Typical value = 0,08. Default: nullptr */ + CIMPP::PU qnl; + + /** \brief Steady-state droop, PU, for electrical power feedback (<i>Relec</i>). Typical value = 0,05. Default: nullptr */ + CIMPP::PU relec; + + /** \brief Steady-state droop, PU, for governor output feedback (<i>Rgate</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU rgate; + + /** \brief Input filter time constant (<i>Td</i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Washout time constant (<i>Tf</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Gate servo time constant (<i>Tp</i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Power feedback time constant (<i>Tt</i>) (&gt;= 0). Typical value = 0,2. Default: nullptr */ + CIMPP::Seconds tt; + + /** \brief Water inertia time constant (<i>Tw</i>) (&gt;= 0). If = 0, block is bypassed. Typical value = 1. Default: nullptr */ + CIMPP::Seconds tw; + + /** \brief Maximum gate closing velocity (<i>Velcl</i>). Unit = PU / s. Typical value = -0,2. Default: 0.0 */ + CIMPP::Float velcl; + + /** \brief Maximum gate opening velocity (<i>Velop</i>). Unit = PU / s. Typical value = 0,2. Default: 0.0 */ + CIMPP::Float velop; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GovHydro4.cpp b/CGMES_3.0.0/GovHydro4.cpp index 427e69b3a..eba1aec28 100644 --- a/CGMES_3.0.0/GovHydro4.cpp +++ b/CGMES_3.0.0/GovHydro4.cpp @@ -8,50 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "Frequency.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "Frequency.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "GovHydro4ModelKind.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Float.hpp" -#include "Float.hpp" using namespace CIMPP; -GovHydro4::GovHydro4() {}; -GovHydro4::~GovHydro4() {}; +GovHydro4::GovHydro4() {} +GovHydro4::~GovHydro4() {} static const std::list PossibleProfilesForClass = { @@ -116,519 +77,556 @@ GovHydro4::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydro4_at(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_at(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->at; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_bgv0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_bgv0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bgv0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_bgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_bgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_bgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_bgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_bgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_bgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_bgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_bgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_bgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_bgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_bmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_bmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_dturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_dturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_eps(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eps; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_gmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_gmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_gmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_gmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_gv0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_gv0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_hdam(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_hdam(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->hdam; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_model(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_model(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->model; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_pgv0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_pgv0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_qnl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_qnl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qnl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_rperm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_rperm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rperm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_rtemp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_rtemp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rtemp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_tblade(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_tblade(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tblade; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_uc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydro4_uo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydro4_uo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydro4_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->at; if (!buffer.str().empty()) @@ -642,7 +640,8 @@ bool get_GovHydro4_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro4_bgv0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bgv0; if (!buffer.str().empty()) @@ -656,7 +655,8 @@ bool get_GovHydro4_bgv0(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_bgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bgv1; if (!buffer.str().empty()) @@ -670,7 +670,8 @@ bool get_GovHydro4_bgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_bgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bgv2; if (!buffer.str().empty()) @@ -684,7 +685,8 @@ bool get_GovHydro4_bgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_bgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bgv3; if (!buffer.str().empty()) @@ -698,7 +700,8 @@ bool get_GovHydro4_bgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_bgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bgv4; if (!buffer.str().empty()) @@ -712,7 +715,8 @@ bool get_GovHydro4_bgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_bgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bgv5; if (!buffer.str().empty()) @@ -726,7 +730,8 @@ bool get_GovHydro4_bgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_bmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bmax; if (!buffer.str().empty()) @@ -740,7 +745,8 @@ bool get_GovHydro4_bmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -754,7 +760,8 @@ bool get_GovHydro4_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -768,7 +775,8 @@ bool get_GovHydro4_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dturb; if (!buffer.str().empty()) @@ -782,7 +790,8 @@ bool get_GovHydro4_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro4_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eps; if (!buffer.str().empty()) @@ -796,7 +805,8 @@ bool get_GovHydro4_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmax; if (!buffer.str().empty()) @@ -810,7 +820,8 @@ bool get_GovHydro4_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmin; if (!buffer.str().empty()) @@ -824,7 +835,8 @@ bool get_GovHydro4_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_gv0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv0; if (!buffer.str().empty()) @@ -838,7 +850,8 @@ bool get_GovHydro4_gv0(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -852,7 +865,8 @@ bool get_GovHydro4_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -866,7 +880,8 @@ bool get_GovHydro4_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -880,7 +895,8 @@ bool get_GovHydro4_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -894,7 +910,8 @@ bool get_GovHydro4_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -908,7 +925,8 @@ bool get_GovHydro4_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_hdam(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hdam; if (!buffer.str().empty()) @@ -920,9 +938,25 @@ bool get_GovHydro4_hdam(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } +bool get_GovHydro4_model(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->model; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_GovHydro4_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -936,7 +970,8 @@ bool get_GovHydro4_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydro4_pgv0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv0; if (!buffer.str().empty()) @@ -950,7 +985,8 @@ bool get_GovHydro4_pgv0(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -964,7 +1000,8 @@ bool get_GovHydro4_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -978,7 +1015,8 @@ bool get_GovHydro4_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -992,7 +1030,8 @@ bool get_GovHydro4_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -1006,7 +1045,8 @@ bool get_GovHydro4_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -1020,7 +1060,8 @@ bool get_GovHydro4_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydro4_qnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qnl; if (!buffer.str().empty()) @@ -1034,7 +1075,8 @@ bool get_GovHydro4_qnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydro4_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rperm; if (!buffer.str().empty()) @@ -1048,7 +1090,8 @@ bool get_GovHydro4_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro4_rtemp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rtemp; if (!buffer.str().empty()) @@ -1062,7 +1105,8 @@ bool get_GovHydro4_rtemp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydro4_tblade(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tblade; if (!buffer.str().empty()) @@ -1076,7 +1120,8 @@ bool get_GovHydro4_tblade(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydro4_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -1090,7 +1135,8 @@ bool get_GovHydro4_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro4_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -1104,7 +1150,8 @@ bool get_GovHydro4_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro4_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -1118,7 +1165,8 @@ bool get_GovHydro4_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro4_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -1132,7 +1180,8 @@ bool get_GovHydro4_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro4_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uc; if (!buffer.str().empty()) @@ -1146,7 +1195,8 @@ bool get_GovHydro4_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydro4_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) + const GovHydro4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uo; if (!buffer.str().empty()) @@ -1158,22 +1208,6 @@ bool get_GovHydro4_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - -bool get_GovHydro4_model(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const GovHydro4* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->model; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char GovHydro4::debugName[] = "GovHydro4"; const char* GovHydro4::debugString() const { @@ -1182,50 +1216,50 @@ const char* GovHydro4::debugString() const void GovHydro4::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydro4"), &GovHydro4_factory)); + factory_map.emplace("cim:GovHydro4", &GovHydro4_factory); } void GovHydro4::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.at"), &assign_GovHydro4_at)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.bgv0"), &assign_GovHydro4_bgv0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.bgv1"), &assign_GovHydro4_bgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.bgv2"), &assign_GovHydro4_bgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.bgv3"), &assign_GovHydro4_bgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.bgv4"), &assign_GovHydro4_bgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.bgv5"), &assign_GovHydro4_bgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.bmax"), &assign_GovHydro4_bmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.db1"), &assign_GovHydro4_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.db2"), &assign_GovHydro4_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.dturb"), &assign_GovHydro4_dturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.eps"), &assign_GovHydro4_eps)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.gmax"), &assign_GovHydro4_gmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.gmin"), &assign_GovHydro4_gmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.gv0"), &assign_GovHydro4_gv0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.gv1"), &assign_GovHydro4_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.gv2"), &assign_GovHydro4_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.gv3"), &assign_GovHydro4_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.gv4"), &assign_GovHydro4_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.gv5"), &assign_GovHydro4_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.hdam"), &assign_GovHydro4_hdam)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.model"), &assign_GovHydro4_model)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.mwbase"), &assign_GovHydro4_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.pgv0"), &assign_GovHydro4_pgv0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.pgv1"), &assign_GovHydro4_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.pgv2"), &assign_GovHydro4_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.pgv3"), &assign_GovHydro4_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.pgv4"), &assign_GovHydro4_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.pgv5"), &assign_GovHydro4_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.qnl"), &assign_GovHydro4_qnl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.rperm"), &assign_GovHydro4_rperm)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.rtemp"), &assign_GovHydro4_rtemp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.tblade"), &assign_GovHydro4_tblade)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.tg"), &assign_GovHydro4_tg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.tp"), &assign_GovHydro4_tp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.tr"), &assign_GovHydro4_tr)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.tw"), &assign_GovHydro4_tw)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.uc"), &assign_GovHydro4_uc)); - assign_map.insert(std::make_pair(std::string("cim:GovHydro4.uo"), &assign_GovHydro4_uo)); + assign_map.emplace("cim:GovHydro4.at", &assign_GovHydro4_at); + assign_map.emplace("cim:GovHydro4.bgv0", &assign_GovHydro4_bgv0); + assign_map.emplace("cim:GovHydro4.bgv1", &assign_GovHydro4_bgv1); + assign_map.emplace("cim:GovHydro4.bgv2", &assign_GovHydro4_bgv2); + assign_map.emplace("cim:GovHydro4.bgv3", &assign_GovHydro4_bgv3); + assign_map.emplace("cim:GovHydro4.bgv4", &assign_GovHydro4_bgv4); + assign_map.emplace("cim:GovHydro4.bgv5", &assign_GovHydro4_bgv5); + assign_map.emplace("cim:GovHydro4.bmax", &assign_GovHydro4_bmax); + assign_map.emplace("cim:GovHydro4.db1", &assign_GovHydro4_db1); + assign_map.emplace("cim:GovHydro4.db2", &assign_GovHydro4_db2); + assign_map.emplace("cim:GovHydro4.dturb", &assign_GovHydro4_dturb); + assign_map.emplace("cim:GovHydro4.eps", &assign_GovHydro4_eps); + assign_map.emplace("cim:GovHydro4.gmax", &assign_GovHydro4_gmax); + assign_map.emplace("cim:GovHydro4.gmin", &assign_GovHydro4_gmin); + assign_map.emplace("cim:GovHydro4.gv0", &assign_GovHydro4_gv0); + assign_map.emplace("cim:GovHydro4.gv1", &assign_GovHydro4_gv1); + assign_map.emplace("cim:GovHydro4.gv2", &assign_GovHydro4_gv2); + assign_map.emplace("cim:GovHydro4.gv3", &assign_GovHydro4_gv3); + assign_map.emplace("cim:GovHydro4.gv4", &assign_GovHydro4_gv4); + assign_map.emplace("cim:GovHydro4.gv5", &assign_GovHydro4_gv5); + assign_map.emplace("cim:GovHydro4.hdam", &assign_GovHydro4_hdam); + assign_map.emplace("cim:GovHydro4.model", &assign_GovHydro4_model); + assign_map.emplace("cim:GovHydro4.mwbase", &assign_GovHydro4_mwbase); + assign_map.emplace("cim:GovHydro4.pgv0", &assign_GovHydro4_pgv0); + assign_map.emplace("cim:GovHydro4.pgv1", &assign_GovHydro4_pgv1); + assign_map.emplace("cim:GovHydro4.pgv2", &assign_GovHydro4_pgv2); + assign_map.emplace("cim:GovHydro4.pgv3", &assign_GovHydro4_pgv3); + assign_map.emplace("cim:GovHydro4.pgv4", &assign_GovHydro4_pgv4); + assign_map.emplace("cim:GovHydro4.pgv5", &assign_GovHydro4_pgv5); + assign_map.emplace("cim:GovHydro4.qnl", &assign_GovHydro4_qnl); + assign_map.emplace("cim:GovHydro4.rperm", &assign_GovHydro4_rperm); + assign_map.emplace("cim:GovHydro4.rtemp", &assign_GovHydro4_rtemp); + assign_map.emplace("cim:GovHydro4.tblade", &assign_GovHydro4_tblade); + assign_map.emplace("cim:GovHydro4.tg", &assign_GovHydro4_tg); + assign_map.emplace("cim:GovHydro4.tp", &assign_GovHydro4_tp); + assign_map.emplace("cim:GovHydro4.tr", &assign_GovHydro4_tr); + assign_map.emplace("cim:GovHydro4.tw", &assign_GovHydro4_tw); + assign_map.emplace("cim:GovHydro4.uc", &assign_GovHydro4_uc); + assign_map.emplace("cim:GovHydro4.uo", &assign_GovHydro4_uo); } void GovHydro4::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/GovHydro4.hpp b/CGMES_3.0.0/GovHydro4.hpp index 077d4ad17..da768fe38 100644 --- a/CGMES_3.0.0/GovHydro4.hpp +++ b/CGMES_3.0.0/GovHydro4.hpp @@ -22,9 +22,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Hydro turbine and governor. Represents plants with straight-forward penstock configurations and hydraulic governors of the traditional 'dashpot' type. This model can be used to represent simple, Francis/Pelton or Kaplan turbines. - */ + /** \brief Hydro turbine and governor. Represents plants with straight-forward penstock configurations and hydraulic governors of the traditional 'dashpot' type. This model can be used to represent simple, Francis/Pelton or Kaplan turbines. */ class GovHydro4 : public TurbineGovernorDynamics { public: @@ -32,45 +30,122 @@ namespace CIMPP GovHydro4(); ~GovHydro4() override; - CIMPP::PU at; /* Turbine gain (<i>At</i>). Typical value = 1,2. Default: nullptr */ - CIMPP::PU bgv0; /* Kaplan blade servo point 0 (<i>Bgv0</i>) (= 0 for simple, = 0 for Francis/Pelton). Typical value for Kaplan = 0. Default: nullptr */ - CIMPP::PU bgv1; /* Kaplan blade servo point 1 (<i>Bgv1</i>) (= 0 for simple, = 0 for Francis/Pelton). Typical value for Kaplan = 0. Default: nullptr */ - CIMPP::PU bgv2; /* Kaplan blade servo point 2 (<i>Bgv2</i>) (= 0 for simple, = 0 for Francis/Pelton). Typical value for Kaplan = 0,1. Default: nullptr */ - CIMPP::PU bgv3; /* Kaplan blade servo point 3 (<i>Bgv3</i>) (= 0 for simple, = 0 for Francis/Pelton). Typical value for Kaplan = 0,667. Default: nullptr */ - CIMPP::PU bgv4; /* Kaplan blade servo point 4 (<i>Bgv4</i>) (= 0 for simple, = 0 for Francis/Pelton). Typical value for Kaplan = 0,9. Default: nullptr */ - CIMPP::PU bgv5; /* Kaplan blade servo point 5 (<i>Bgv5</i>) (= 0 for simple, = 0 for Francis/Pelton). Typical value for Kaplan = 1. Default: nullptr */ - CIMPP::Float bmax; /* Maximum blade adjustment factor (<i>Bmax</i>) (= 0 for simple, = 0 for Francis/Pelton). Typical value for Kaplan = 1,1276. Default: 0.0 */ - CIMPP::Frequency db1; /* Intentional deadband width (<i>db1</i>). Unit = Hz. Typical value = 0. Default: nullptr */ - CIMPP::ActivePower db2; /* Unintentional dead-band (<i>db2</i>). Unit = MW. Typical value = 0. Default: nullptr */ - CIMPP::PU dturb; /* Turbine damping factor (<i>Dturb</i>). Unit = delta P (PU of <i>MWbase</i>) / delta speed (PU). Typical value for simple = 0,5, Francis/Pelton = 1,1, Kaplan = 1,1. Default: nullptr */ - CIMPP::Frequency eps; /* Intentional db hysteresis (<i>eps</i>). Unit = Hz. Typical value = 0. Default: nullptr */ - CIMPP::PU gmax; /* Maximum gate opening, PU of <i>MWbase</i> (<i>Gmax</i>) (&gt; GovHydro4.gmin). Typical value = 1. Default: nullptr */ - CIMPP::PU gmin; /* Minimum gate opening, PU of <i>MWbase</i> (<i>Gmin</i>) (&lt; GovHydro4.gmax). Typical value = 0. Default: nullptr */ - CIMPP::PU gv0; /* Nonlinear gain point 0, PU gv (<i>Gv0</i>) (= 0 for simple). Typical for Francis/Pelton = 0,1, Kaplan = 0,1. Default: nullptr */ - CIMPP::PU gv1; /* Nonlinear gain point 1, PU gv (<i>Gv1</i>) (= 0 for simple, &gt; GovHydro4.gv0 for Francis/Pelton and Kaplan). Typical value for Francis/Pelton = 0,4, Kaplan = 0,4. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain point 2, PU gv (<i>Gv2</i>) (= 0 for simple, &gt; GovHydro4.gv1 for Francis/Pelton and Kaplan). Typical value for Francis/Pelton = 0,5, Kaplan = 0,5. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain point 3, PU gv (<i>Gv3</i>) (= 0 for simple, &gt; GovHydro4.gv2 for Francis/Pelton and Kaplan). Typical value for Francis/Pelton = 0,7, Kaplan = 0,7. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain point 4, PU gv (<i>Gv4</i>) (= 0 for simple, &gt; GovHydro4.gv3 for Francis/Pelton and Kaplan). Typical value for Francis/Pelton = 0,8, Kaplan = 0,8. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain point 5, PU gv (<i>Gv5</i>) (= 0 for simple, &lt; 1 and &gt; GovHydro4.gv4 for Francis/Pelton and Kaplan). Typical value for Francis/Pelton = 0,9, Kaplan = 0,9. Default: nullptr */ - CIMPP::PU hdam; /* Head available at dam (<i>hdam</i>). Typical value = 1. Default: nullptr */ - CIMPP::GovHydro4ModelKind model; /* The kind of model being represented (simple, Francis/Pelton or Kaplan). Default: 0 */ - CIMPP::ActivePower mwbase; /* Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv0; /* Nonlinear gain point 0, PU power (<i>Pgv0</i>) (= 0 for simple). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain point 1, PU power (<i>Pgv1</i>) (= 0 for simple). Typical value for Francis/Pelton = 0,42, Kaplan = 0,35. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain point 2, PU power (<i>Pgv2</i>) (= 0 for simple). Typical value for Francis/Pelton = 0,56, Kaplan = 0,468. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain point 3, PU power (<i>Pgv3</i>) (= 0 for simple). Typical value for Francis/Pelton = 0,8, Kaplan = 0,796. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain point 4, PU power (<i>Pgv4</i>) (= 0 for simple). Typical value for Francis/Pelton = 0,9, Kaplan = 0,917. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain point 5, PU power (<i>Pgv5</i>) (= 0 for simple). Typical value for Francis/Pelton = 0,97, Kaplan = 0,99. Default: nullptr */ - CIMPP::PU qnl; /* No-load flow at nominal head (<i>Qnl</i>). Typical value for simple = 0,08, Francis/Pelton = 0, Kaplan = 0. Default: nullptr */ - CIMPP::Seconds rperm; /* Permanent droop (<i>Rperm</i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ - CIMPP::Seconds rtemp; /* Temporary droop (<i>Rtemp</i>) (&gt;= 0). Typical value = 0,3. Default: nullptr */ - CIMPP::Seconds tblade; /* Blade servo time constant (<i>Tblade</i>) (&gt;= 0). Typical value = 100. Default: nullptr */ - CIMPP::Seconds tg; /* Gate servo time constant (<i>Tg</i>) (&gt; 0). Typical value = 0,5. Default: nullptr */ - CIMPP::Seconds tp; /* Pilot servo time constant (<i>Tp</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds tr; /* Dashpot time constant (<i>Tr</i>) (&gt;= 0). Typical value = 5. Default: nullptr */ - CIMPP::Seconds tw; /* Water inertia time constant (<i>Tw</i>) (&gt; 0). Typical value = 1. Default: nullptr */ - CIMPP::Float uc; /* Max gate closing velocity (<i>Uc</i>). Typical value = 0,2. Default: 0.0 */ - CIMPP::Float uo; /* Max gate opening velocity (<i>Uo</i>). Typical value = 0,2. Default: 0.0 */ + /** \brief Turbine gain (<i>At</i>). Typical value = 1,2. Default: nullptr */ + CIMPP::PU at; + + /** \brief Kaplan blade servo point 0 (<i>Bgv0</i>) (= 0 for simple, = 0 for Francis/Pelton). Typical value for Kaplan = 0. Default: nullptr */ + CIMPP::PU bgv0; + + /** \brief Kaplan blade servo point 1 (<i>Bgv1</i>) (= 0 for simple, = 0 for Francis/Pelton). Typical value for Kaplan = 0. Default: nullptr */ + CIMPP::PU bgv1; + + /** \brief Kaplan blade servo point 2 (<i>Bgv2</i>) (= 0 for simple, = 0 for Francis/Pelton). Typical value for Kaplan = 0,1. Default: nullptr */ + CIMPP::PU bgv2; + + /** \brief Kaplan blade servo point 3 (<i>Bgv3</i>) (= 0 for simple, = 0 for Francis/Pelton). Typical value for Kaplan = 0,667. Default: nullptr */ + CIMPP::PU bgv3; + + /** \brief Kaplan blade servo point 4 (<i>Bgv4</i>) (= 0 for simple, = 0 for Francis/Pelton). Typical value for Kaplan = 0,9. Default: nullptr */ + CIMPP::PU bgv4; + + /** \brief Kaplan blade servo point 5 (<i>Bgv5</i>) (= 0 for simple, = 0 for Francis/Pelton). Typical value for Kaplan = 1. Default: nullptr */ + CIMPP::PU bgv5; + + /** \brief Maximum blade adjustment factor (<i>Bmax</i>) (= 0 for simple, = 0 for Francis/Pelton). Typical value for Kaplan = 1,1276. Default: 0.0 */ + CIMPP::Float bmax; + + /** \brief Intentional deadband width (<i>db1</i>). Unit = Hz. Typical value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Unintentional dead-band (<i>db2</i>). Unit = MW. Typical value = 0. Default: nullptr */ + CIMPP::ActivePower db2; + + /** \brief Turbine damping factor (<i>Dturb</i>). Unit = delta P (PU of <i>MWbase</i>) / delta speed (PU). Typical value for simple = 0,5, Francis/Pelton = 1,1, Kaplan = 1,1. Default: nullptr */ + CIMPP::PU dturb; + + /** \brief Intentional db hysteresis (<i>eps</i>). Unit = Hz. Typical value = 0. Default: nullptr */ + CIMPP::Frequency eps; + + /** \brief Maximum gate opening, PU of <i>MWbase</i> (<i>Gmax</i>) (&gt; GovHydro4.gmin). Typical value = 1. Default: nullptr */ + CIMPP::PU gmax; + + /** \brief Minimum gate opening, PU of <i>MWbase</i> (<i>Gmin</i>) (&lt; GovHydro4.gmax). Typical value = 0. Default: nullptr */ + CIMPP::PU gmin; + + /** \brief Nonlinear gain point 0, PU gv (<i>Gv0</i>) (= 0 for simple). Typical for Francis/Pelton = 0,1, Kaplan = 0,1. Default: nullptr */ + CIMPP::PU gv0; + + /** \brief Nonlinear gain point 1, PU gv (<i>Gv1</i>) (= 0 for simple, &gt; GovHydro4.gv0 for Francis/Pelton and Kaplan). Typical value for Francis/Pelton = 0,4, Kaplan = 0,4. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain point 2, PU gv (<i>Gv2</i>) (= 0 for simple, &gt; GovHydro4.gv1 for Francis/Pelton and Kaplan). Typical value for Francis/Pelton = 0,5, Kaplan = 0,5. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain point 3, PU gv (<i>Gv3</i>) (= 0 for simple, &gt; GovHydro4.gv2 for Francis/Pelton and Kaplan). Typical value for Francis/Pelton = 0,7, Kaplan = 0,7. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain point 4, PU gv (<i>Gv4</i>) (= 0 for simple, &gt; GovHydro4.gv3 for Francis/Pelton and Kaplan). Typical value for Francis/Pelton = 0,8, Kaplan = 0,8. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain point 5, PU gv (<i>Gv5</i>) (= 0 for simple, &lt; 1 and &gt; GovHydro4.gv4 for Francis/Pelton and Kaplan). Typical value for Francis/Pelton = 0,9, Kaplan = 0,9. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Head available at dam (<i>hdam</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU hdam; + + /** \brief The kind of model being represented (simple, Francis/Pelton or Kaplan). Default: 0 */ + CIMPP::GovHydro4ModelKind model; + + /** \brief Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain point 0, PU power (<i>Pgv0</i>) (= 0 for simple). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv0; + + /** \brief Nonlinear gain point 1, PU power (<i>Pgv1</i>) (= 0 for simple). Typical value for Francis/Pelton = 0,42, Kaplan = 0,35. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain point 2, PU power (<i>Pgv2</i>) (= 0 for simple). Typical value for Francis/Pelton = 0,56, Kaplan = 0,468. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain point 3, PU power (<i>Pgv3</i>) (= 0 for simple). Typical value for Francis/Pelton = 0,8, Kaplan = 0,796. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain point 4, PU power (<i>Pgv4</i>) (= 0 for simple). Typical value for Francis/Pelton = 0,9, Kaplan = 0,917. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain point 5, PU power (<i>Pgv5</i>) (= 0 for simple). Typical value for Francis/Pelton = 0,97, Kaplan = 0,99. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief No-load flow at nominal head (<i>Qnl</i>). Typical value for simple = 0,08, Francis/Pelton = 0, Kaplan = 0. Default: nullptr */ + CIMPP::PU qnl; + + /** \brief Permanent droop (<i>Rperm</i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ + CIMPP::Seconds rperm; + + /** \brief Temporary droop (<i>Rtemp</i>) (&gt;= 0). Typical value = 0,3. Default: nullptr */ + CIMPP::Seconds rtemp; + + /** \brief Blade servo time constant (<i>Tblade</i>) (&gt;= 0). Typical value = 100. Default: nullptr */ + CIMPP::Seconds tblade; + + /** \brief Gate servo time constant (<i>Tg</i>) (&gt; 0). Typical value = 0,5. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Pilot servo time constant (<i>Tp</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Dashpot time constant (<i>Tr</i>) (&gt;= 0). Typical value = 5. Default: nullptr */ + CIMPP::Seconds tr; + + /** \brief Water inertia time constant (<i>Tw</i>) (&gt; 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tw; + + /** \brief Max gate closing velocity (<i>Uc</i>). Typical value = 0,2. Default: 0.0 */ + CIMPP::Float uc; + + /** \brief Max gate opening velocity (<i>Uo</i>). Typical value = 0,2. Default: 0.0 */ + CIMPP::Float uo; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GovHydro4ModelKind.cpp b/CGMES_3.0.0/GovHydro4ModelKind.cpp index 28d73ac8e..40b0e5748 100644 --- a/CGMES_3.0.0/GovHydro4ModelKind.cpp +++ b/CGMES_3.0.0/GovHydro4ModelKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "GovHydro4ModelKind") + if (EnumSymbol.substr(0, pos) != "GovHydro4ModelKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "simple") + if (EnumSymbol == "simple") { rop = GovHydro4ModelKind::simple; return lop; } - if(EnumSymbol == "francisPelton") + if (EnumSymbol == "francisPelton") { rop = GovHydro4ModelKind::francisPelton; return lop; } - if(EnumSymbol == "kaplan") + if (EnumSymbol == "kaplan") { rop = GovHydro4ModelKind::kaplan; return lop; diff --git a/CGMES_3.0.0/GovHydro4ModelKind.hpp b/CGMES_3.0.0/GovHydro4ModelKind.hpp index 29a585c47..11d92f1ea 100644 --- a/CGMES_3.0.0/GovHydro4ModelKind.hpp +++ b/CGMES_3.0.0/GovHydro4ModelKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Possible types of GovHydro4 models. - */ + /** \brief Possible types of GovHydro4 models. */ class GovHydro4ModelKind { public: enum GovHydro4ModelKind_ENUM { - /** - * Simple model. - */ + /** Simple model. */ simple, - /** - * Francis or Pelton model. - */ + /** Francis or Pelton model. */ francisPelton, - /** - * Kaplan model. - */ + /** Kaplan model. */ kaplan, }; diff --git a/CGMES_3.0.0/GovHydroDD.cpp b/CGMES_3.0.0/GovHydroDD.cpp index c69373507..c7efe476c 100644 --- a/CGMES_3.0.0/GovHydroDD.cpp +++ b/CGMES_3.0.0/GovHydroDD.cpp @@ -8,46 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Frequency.hpp" -#include "ActivePower.hpp" -#include "Frequency.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Float.hpp" -#include "Float.hpp" using namespace CIMPP; -GovHydroDD::GovHydroDD() {}; -GovHydroDD::~GovHydroDD() {}; +GovHydroDD::GovHydroDD() {} +GovHydroDD::~GovHydroDD() {} static const std::list PossibleProfilesForClass = { @@ -108,467 +73,500 @@ GovHydroDD::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroDD_aturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_aturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->aturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_bturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_bturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_eps(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eps; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_gmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_gmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_gmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_gmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_gv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_inputSignal(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_inputSignal(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_pgv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_tt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_tturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_tturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_velcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_velcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velcl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroDD_velop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroDD_velop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroDD_aturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->aturb; if (!buffer.str().empty()) @@ -582,7 +580,8 @@ bool get_GovHydroDD_aturb(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroDD_bturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bturb; if (!buffer.str().empty()) @@ -596,7 +595,8 @@ bool get_GovHydroDD_bturb(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroDD_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -610,7 +610,8 @@ bool get_GovHydroDD_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroDD_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -624,7 +625,8 @@ bool get_GovHydroDD_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroDD_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eps; if (!buffer.str().empty()) @@ -638,7 +640,8 @@ bool get_GovHydroDD_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroDD_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmax; if (!buffer.str().empty()) @@ -652,7 +655,8 @@ bool get_GovHydroDD_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmin; if (!buffer.str().empty()) @@ -666,7 +670,8 @@ bool get_GovHydroDD_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -680,7 +685,8 @@ bool get_GovHydroDD_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroDD_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -694,7 +700,8 @@ bool get_GovHydroDD_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroDD_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -708,7 +715,8 @@ bool get_GovHydroDD_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroDD_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -722,7 +730,8 @@ bool get_GovHydroDD_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroDD_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -736,7 +745,8 @@ bool get_GovHydroDD_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroDD_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv6; if (!buffer.str().empty()) @@ -750,7 +760,8 @@ bool get_GovHydroDD_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroDD_inputSignal(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inputSignal; if (!buffer.str().empty()) @@ -764,7 +775,8 @@ bool get_GovHydroDD_inputSignal(const BaseClass* BaseClass_ptr1, std::stringstre bool get_GovHydroDD_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -778,7 +790,8 @@ bool get_GovHydroDD_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroDD_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -792,7 +805,8 @@ bool get_GovHydroDD_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroDD_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -806,7 +820,8 @@ bool get_GovHydroDD_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroDD_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -820,7 +835,8 @@ bool get_GovHydroDD_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroDD_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -834,7 +850,8 @@ bool get_GovHydroDD_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroDD_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -848,7 +865,8 @@ bool get_GovHydroDD_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -862,7 +880,8 @@ bool get_GovHydroDD_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -876,7 +895,8 @@ bool get_GovHydroDD_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -890,7 +910,8 @@ bool get_GovHydroDD_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -904,7 +925,8 @@ bool get_GovHydroDD_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv6; if (!buffer.str().empty()) @@ -918,7 +940,8 @@ bool get_GovHydroDD_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -932,7 +955,8 @@ bool get_GovHydroDD_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -946,7 +970,8 @@ bool get_GovHydroDD_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroDD_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -960,7 +985,8 @@ bool get_GovHydroDD_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroDD_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -974,7 +1000,8 @@ bool get_GovHydroDD_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroDD_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -988,7 +1015,8 @@ bool get_GovHydroDD_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroDD_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -1002,7 +1030,8 @@ bool get_GovHydroDD_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroDD_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tt; if (!buffer.str().empty()) @@ -1016,7 +1045,8 @@ bool get_GovHydroDD_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroDD_tturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tturb; if (!buffer.str().empty()) @@ -1030,7 +1060,8 @@ bool get_GovHydroDD_tturb(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroDD_velcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velcl; if (!buffer.str().empty()) @@ -1044,7 +1075,8 @@ bool get_GovHydroDD_velcl(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroDD_velop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroDD* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroDD* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velop; if (!buffer.str().empty()) @@ -1056,8 +1088,6 @@ bool get_GovHydroDD_velop(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char GovHydroDD::debugName[] = "GovHydroDD"; const char* GovHydroDD::debugString() const { @@ -1066,46 +1096,46 @@ const char* GovHydroDD::debugString() const void GovHydroDD::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroDD"), &GovHydroDD_factory)); + factory_map.emplace("cim:GovHydroDD", &GovHydroDD_factory); } void GovHydroDD::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.aturb"), &assign_GovHydroDD_aturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.bturb"), &assign_GovHydroDD_bturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.db1"), &assign_GovHydroDD_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.db2"), &assign_GovHydroDD_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.eps"), &assign_GovHydroDD_eps)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.gmax"), &assign_GovHydroDD_gmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.gmin"), &assign_GovHydroDD_gmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.gv1"), &assign_GovHydroDD_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.gv2"), &assign_GovHydroDD_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.gv3"), &assign_GovHydroDD_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.gv4"), &assign_GovHydroDD_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.gv5"), &assign_GovHydroDD_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.gv6"), &assign_GovHydroDD_gv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.inputSignal"), &assign_GovHydroDD_inputSignal)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.k1"), &assign_GovHydroDD_k1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.k2"), &assign_GovHydroDD_k2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.kg"), &assign_GovHydroDD_kg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.ki"), &assign_GovHydroDD_ki)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.mwbase"), &assign_GovHydroDD_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.pgv1"), &assign_GovHydroDD_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.pgv2"), &assign_GovHydroDD_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.pgv3"), &assign_GovHydroDD_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.pgv4"), &assign_GovHydroDD_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.pgv5"), &assign_GovHydroDD_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.pgv6"), &assign_GovHydroDD_pgv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.pmax"), &assign_GovHydroDD_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.pmin"), &assign_GovHydroDD_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.r"), &assign_GovHydroDD_r)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.td"), &assign_GovHydroDD_td)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.tf"), &assign_GovHydroDD_tf)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.tp"), &assign_GovHydroDD_tp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.tt"), &assign_GovHydroDD_tt)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.tturb"), &assign_GovHydroDD_tturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.velcl"), &assign_GovHydroDD_velcl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroDD.velop"), &assign_GovHydroDD_velop)); + assign_map.emplace("cim:GovHydroDD.aturb", &assign_GovHydroDD_aturb); + assign_map.emplace("cim:GovHydroDD.bturb", &assign_GovHydroDD_bturb); + assign_map.emplace("cim:GovHydroDD.db1", &assign_GovHydroDD_db1); + assign_map.emplace("cim:GovHydroDD.db2", &assign_GovHydroDD_db2); + assign_map.emplace("cim:GovHydroDD.eps", &assign_GovHydroDD_eps); + assign_map.emplace("cim:GovHydroDD.gmax", &assign_GovHydroDD_gmax); + assign_map.emplace("cim:GovHydroDD.gmin", &assign_GovHydroDD_gmin); + assign_map.emplace("cim:GovHydroDD.gv1", &assign_GovHydroDD_gv1); + assign_map.emplace("cim:GovHydroDD.gv2", &assign_GovHydroDD_gv2); + assign_map.emplace("cim:GovHydroDD.gv3", &assign_GovHydroDD_gv3); + assign_map.emplace("cim:GovHydroDD.gv4", &assign_GovHydroDD_gv4); + assign_map.emplace("cim:GovHydroDD.gv5", &assign_GovHydroDD_gv5); + assign_map.emplace("cim:GovHydroDD.gv6", &assign_GovHydroDD_gv6); + assign_map.emplace("cim:GovHydroDD.inputSignal", &assign_GovHydroDD_inputSignal); + assign_map.emplace("cim:GovHydroDD.k1", &assign_GovHydroDD_k1); + assign_map.emplace("cim:GovHydroDD.k2", &assign_GovHydroDD_k2); + assign_map.emplace("cim:GovHydroDD.kg", &assign_GovHydroDD_kg); + assign_map.emplace("cim:GovHydroDD.ki", &assign_GovHydroDD_ki); + assign_map.emplace("cim:GovHydroDD.mwbase", &assign_GovHydroDD_mwbase); + assign_map.emplace("cim:GovHydroDD.pgv1", &assign_GovHydroDD_pgv1); + assign_map.emplace("cim:GovHydroDD.pgv2", &assign_GovHydroDD_pgv2); + assign_map.emplace("cim:GovHydroDD.pgv3", &assign_GovHydroDD_pgv3); + assign_map.emplace("cim:GovHydroDD.pgv4", &assign_GovHydroDD_pgv4); + assign_map.emplace("cim:GovHydroDD.pgv5", &assign_GovHydroDD_pgv5); + assign_map.emplace("cim:GovHydroDD.pgv6", &assign_GovHydroDD_pgv6); + assign_map.emplace("cim:GovHydroDD.pmax", &assign_GovHydroDD_pmax); + assign_map.emplace("cim:GovHydroDD.pmin", &assign_GovHydroDD_pmin); + assign_map.emplace("cim:GovHydroDD.r", &assign_GovHydroDD_r); + assign_map.emplace("cim:GovHydroDD.td", &assign_GovHydroDD_td); + assign_map.emplace("cim:GovHydroDD.tf", &assign_GovHydroDD_tf); + assign_map.emplace("cim:GovHydroDD.tp", &assign_GovHydroDD_tp); + assign_map.emplace("cim:GovHydroDD.tt", &assign_GovHydroDD_tt); + assign_map.emplace("cim:GovHydroDD.tturb", &assign_GovHydroDD_tturb); + assign_map.emplace("cim:GovHydroDD.velcl", &assign_GovHydroDD_velcl); + assign_map.emplace("cim:GovHydroDD.velop", &assign_GovHydroDD_velop); } void GovHydroDD::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/GovHydroDD.hpp b/CGMES_3.0.0/GovHydroDD.hpp index 234106822..80f75edc3 100644 --- a/CGMES_3.0.0/GovHydroDD.hpp +++ b/CGMES_3.0.0/GovHydroDD.hpp @@ -22,9 +22,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Double derivative hydro governor and turbine. - */ + /** \brief Double derivative hydro governor and turbine. */ class GovHydroDD : public TurbineGovernorDynamics { public: @@ -32,41 +30,110 @@ namespace CIMPP GovHydroDD(); ~GovHydroDD() override; - CIMPP::PU aturb; /* Turbine numerator multiplier (<i>Aturb</i>) (see parameter detail 3). Typical value = -1. Default: nullptr */ - CIMPP::PU bturb; /* Turbine denominator multiplier (<i>Bturb</i>) (see parameter detail 3). Typical value = 0,5. Default: nullptr */ - CIMPP::Frequency db1; /* Intentional dead-band width (<i>db1</i>). Unit = Hz. Typical value = 0. Default: nullptr */ - CIMPP::ActivePower db2; /* Unintentional dead-band (<i>db2</i>). Unit = MW. Typical value = 0. Default: nullptr */ - CIMPP::Frequency eps; /* Intentional db hysteresis (<i>eps</i>). Unit = Hz. Typical value = 0. Default: nullptr */ - CIMPP::PU gmax; /* Maximum gate opening (<i>Gmax</i>) (&gt; GovHydroDD.gmin). Typical value = 0. Default: nullptr */ - CIMPP::PU gmin; /* Minimum gate opening (<i>Gmin</i>) (&lt; GovHydroDD.gmax). Typical value = 0. Default: nullptr */ - CIMPP::PU gv1; /* Nonlinear gain point 1, PU gv (<i>Gv1</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain point 2, PU gv (<i>Gv2</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain point 3, PU gv (<i>Gv3</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain point 4, PU gv (<i>Gv4</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain point 5, PU gv (<i>Gv5</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv6; /* Nonlinear gain point 6, PU gv (<i>Gv6</i>). Typical value = 0. Default: nullptr */ - CIMPP::Boolean inputSignal; /* Input signal switch (<i>Flag</i>). true = <i>Pe</i> input is used false = feedback is received from <i>CV</i>. <i>Flag</i> is normally dependent on <i>Tt</i>. If <i>Tt</i> is zero, <i>Flag</i> is set to false. If <i>Tt</i> is not zero, <i>Flag</i> is set to true. Typical value = true. Default: false */ - CIMPP::PU k1; /* Single derivative gain (<i>K1</i>). Typical value = 3,6. Default: nullptr */ - CIMPP::PU k2; /* Double derivative gain (<i>K2</i>). Typical value = 0,2. Default: nullptr */ - CIMPP::PU kg; /* Gate servo gain (<i>Kg</i>). Typical value = 3. Default: nullptr */ - CIMPP::PU ki; /* Integral gain (<i>Ki</i>). Typical value = 1. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (<i>MWbase</i>) (&gt;0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain point 1, PU power (<i>Pgv1</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain point 2, PU power (<i>Pgv2</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain point 3, PU power (<i>Pgv3</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain point 4, PU power (<i>Pgv4</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain point 5, PU power (<i>Pgv5</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv6; /* Nonlinear gain point 6, PU power (<i>Pgv6</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pmax; /* Maximum gate opening, PU of <i>MWbase</i> (<i>Pmax</i>) (&gt; GovHydroDD.pmin). Typical value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum gate opening, PU of <i>MWbase</i> (<i>Pmin</i>) (&gt; GovHydroDD.pmax). Typical value = 0. Default: nullptr */ - CIMPP::PU r; /* Steady state droop (<i>R</i>). Typical value = 0,05. Default: nullptr */ - CIMPP::Seconds td; /* Input filter time constant (<i>Td</i>) (&gt;= 0). If = 0, block is bypassed. Typical value = 0. Default: nullptr */ - CIMPP::Seconds tf; /* Washout time constant (<i>Tf</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds tp; /* Gate servo time constant (<i>Tp</i>) (&gt;= 0). If = 0, block is bypassed. Typical value = 0,35. Default: nullptr */ - CIMPP::Seconds tt; /* Power feedback time constant (<i>Tt</i>) (&gt;= 0). If = 0, block is bypassed. Typical value = 0,02. Default: nullptr */ - CIMPP::Seconds tturb; /* Turbine time constant (<i>Tturb</i>) (&gt;= 0). See parameter detail 3. Typical value = 0,8. Default: nullptr */ - CIMPP::Float velcl; /* Maximum gate closing velocity (<i>Velcl</i>). Unit = PU / s. Typical value = -0,14. Default: 0.0 */ - CIMPP::Float velop; /* Maximum gate opening velocity (<i>Velop</i>). Unit = PU / s. Typical value = 0,09. Default: 0.0 */ + /** \brief Turbine numerator multiplier (<i>Aturb</i>) (see parameter detail 3). Typical value = -1. Default: nullptr */ + CIMPP::PU aturb; + + /** \brief Turbine denominator multiplier (<i>Bturb</i>) (see parameter detail 3). Typical value = 0,5. Default: nullptr */ + CIMPP::PU bturb; + + /** \brief Intentional dead-band width (<i>db1</i>). Unit = Hz. Typical value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Unintentional dead-band (<i>db2</i>). Unit = MW. Typical value = 0. Default: nullptr */ + CIMPP::ActivePower db2; + + /** \brief Intentional db hysteresis (<i>eps</i>). Unit = Hz. Typical value = 0. Default: nullptr */ + CIMPP::Frequency eps; + + /** \brief Maximum gate opening (<i>Gmax</i>) (&gt; GovHydroDD.gmin). Typical value = 0. Default: nullptr */ + CIMPP::PU gmax; + + /** \brief Minimum gate opening (<i>Gmin</i>) (&lt; GovHydroDD.gmax). Typical value = 0. Default: nullptr */ + CIMPP::PU gmin; + + /** \brief Nonlinear gain point 1, PU gv (<i>Gv1</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain point 2, PU gv (<i>Gv2</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain point 3, PU gv (<i>Gv3</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain point 4, PU gv (<i>Gv4</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain point 5, PU gv (<i>Gv5</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Nonlinear gain point 6, PU gv (<i>Gv6</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv6; + + /** \brief Input signal switch (<i>Flag</i>). true = <i>Pe</i> input is used false = feedback is received from <i>CV</i>. <i>Flag</i> is normally dependent on <i>Tt</i>. If <i>Tt</i> is zero, <i>Flag</i> is set to false. If <i>Tt</i> is not zero, <i>Flag</i> is set to true. Typical value = true. Default: false */ + CIMPP::Boolean inputSignal; + + /** \brief Single derivative gain (<i>K1</i>). Typical value = 3,6. Default: nullptr */ + CIMPP::PU k1; + + /** \brief Double derivative gain (<i>K2</i>). Typical value = 0,2. Default: nullptr */ + CIMPP::PU k2; + + /** \brief Gate servo gain (<i>Kg</i>). Typical value = 3. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Integral gain (<i>Ki</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Base for power values (<i>MWbase</i>) (&gt;0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain point 1, PU power (<i>Pgv1</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain point 2, PU power (<i>Pgv2</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain point 3, PU power (<i>Pgv3</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain point 4, PU power (<i>Pgv4</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain point 5, PU power (<i>Pgv5</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief Nonlinear gain point 6, PU power (<i>Pgv6</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv6; + + /** \brief Maximum gate opening, PU of <i>MWbase</i> (<i>Pmax</i>) (&gt; GovHydroDD.pmin). Typical value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum gate opening, PU of <i>MWbase</i> (<i>Pmin</i>) (&gt; GovHydroDD.pmax). Typical value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Steady state droop (<i>R</i>). Typical value = 0,05. Default: nullptr */ + CIMPP::PU r; + + /** \brief Input filter time constant (<i>Td</i>) (&gt;= 0). If = 0, block is bypassed. Typical value = 0. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Washout time constant (<i>Tf</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Gate servo time constant (<i>Tp</i>) (&gt;= 0). If = 0, block is bypassed. Typical value = 0,35. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Power feedback time constant (<i>Tt</i>) (&gt;= 0). If = 0, block is bypassed. Typical value = 0,02. Default: nullptr */ + CIMPP::Seconds tt; + + /** \brief Turbine time constant (<i>Tturb</i>) (&gt;= 0). See parameter detail 3. Typical value = 0,8. Default: nullptr */ + CIMPP::Seconds tturb; + + /** \brief Maximum gate closing velocity (<i>Velcl</i>). Unit = PU / s. Typical value = -0,14. Default: 0.0 */ + CIMPP::Float velcl; + + /** \brief Maximum gate opening velocity (<i>Velop</i>). Unit = PU / s. Typical value = 0,09. Default: 0.0 */ + CIMPP::Float velop; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GovHydroFrancis.cpp b/CGMES_3.0.0/GovHydroFrancis.cpp index 629149401..92cca504b 100644 --- a/CGMES_3.0.0/GovHydroFrancis.cpp +++ b/CGMES_3.0.0/GovHydroFrancis.cpp @@ -8,38 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "Area.hpp" -#include "Area.hpp" -#include "PU.hpp" -#include "Frequency.hpp" -#include "PU.hpp" -#include "FrancisGovernorControlKind.hpp" -#include "Length.hpp" -#include "Length.hpp" -#include "Length.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "VolumeFlowRate.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "Boolean.hpp" -#include "Length.hpp" using namespace CIMPP; -GovHydroFrancis::GovHydroFrancis() {}; -GovHydroFrancis::~GovHydroFrancis() {}; +GovHydroFrancis::GovHydroFrancis() {} +GovHydroFrancis::~GovHydroFrancis() {} static const std::list PossibleProfilesForClass = { @@ -92,363 +65,388 @@ GovHydroFrancis::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroFrancis_am(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_am(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->am; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_av0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_av0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->av0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_av1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_av1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->av1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_bp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_bp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_etamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_etamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->etamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_governorControl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_governorControl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->governorControl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_h1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_h1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->h1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_h2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_h2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->h2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_hn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_hn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->hn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_kt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_kt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_qc0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_qc0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qc0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_qn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_qn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_ts(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_ts(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_twnc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_twnc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->twnc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_twng(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_twng(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->twng; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_tx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_tx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_va(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_va(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->va; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_valvmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_valvmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->valvmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_valvmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_valvmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->valvmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_vc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_vc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_waterTunnelSurgeChamberSimulation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_waterTunnelSurgeChamberSimulation(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->waterTunnelSurgeChamberSimulation; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroFrancis_zsfc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroFrancis_zsfc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->zsfc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroFrancis_am(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->am; if (!buffer.str().empty()) @@ -462,7 +460,8 @@ bool get_GovHydroFrancis_am(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_av0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->av0; if (!buffer.str().empty()) @@ -476,7 +475,8 @@ bool get_GovHydroFrancis_av0(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_av1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->av1; if (!buffer.str().empty()) @@ -490,7 +490,8 @@ bool get_GovHydroFrancis_av1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_bp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bp; if (!buffer.str().empty()) @@ -504,7 +505,8 @@ bool get_GovHydroFrancis_bp(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -518,7 +520,8 @@ bool get_GovHydroFrancis_db1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_etamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->etamax; if (!buffer.str().empty()) @@ -530,9 +533,25 @@ bool get_GovHydroFrancis_etamax(const BaseClass* BaseClass_ptr1, std::stringstre return false; } +bool get_GovHydroFrancis_governorControl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->governorControl; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_GovHydroFrancis_h1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->h1; if (!buffer.str().empty()) @@ -546,7 +565,8 @@ bool get_GovHydroFrancis_h1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_h2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->h2; if (!buffer.str().empty()) @@ -560,7 +580,8 @@ bool get_GovHydroFrancis_h2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_hn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hn; if (!buffer.str().empty()) @@ -574,7 +595,8 @@ bool get_GovHydroFrancis_hn(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -588,7 +610,8 @@ bool get_GovHydroFrancis_kc(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -602,7 +625,8 @@ bool get_GovHydroFrancis_kg(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_kt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kt; if (!buffer.str().empty()) @@ -616,7 +640,8 @@ bool get_GovHydroFrancis_kt(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_qc0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qc0; if (!buffer.str().empty()) @@ -630,7 +655,8 @@ bool get_GovHydroFrancis_qc0(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_qn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qn; if (!buffer.str().empty()) @@ -644,7 +670,8 @@ bool get_GovHydroFrancis_qn(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -658,7 +685,8 @@ bool get_GovHydroFrancis_ta(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -672,7 +700,8 @@ bool get_GovHydroFrancis_td(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_ts(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts; if (!buffer.str().empty()) @@ -686,7 +715,8 @@ bool get_GovHydroFrancis_ts(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_twnc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twnc; if (!buffer.str().empty()) @@ -700,7 +730,8 @@ bool get_GovHydroFrancis_twnc(const BaseClass* BaseClass_ptr1, std::stringstream bool get_GovHydroFrancis_twng(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twng; if (!buffer.str().empty()) @@ -714,7 +745,8 @@ bool get_GovHydroFrancis_twng(const BaseClass* BaseClass_ptr1, std::stringstream bool get_GovHydroFrancis_tx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tx; if (!buffer.str().empty()) @@ -728,7 +760,8 @@ bool get_GovHydroFrancis_tx(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_va(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->va; if (!buffer.str().empty()) @@ -742,7 +775,8 @@ bool get_GovHydroFrancis_va(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_valvmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->valvmax; if (!buffer.str().empty()) @@ -756,7 +790,8 @@ bool get_GovHydroFrancis_valvmax(const BaseClass* BaseClass_ptr1, std::stringstr bool get_GovHydroFrancis_valvmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->valvmin; if (!buffer.str().empty()) @@ -770,7 +805,8 @@ bool get_GovHydroFrancis_valvmin(const BaseClass* BaseClass_ptr1, std::stringstr bool get_GovHydroFrancis_vc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vc; if (!buffer.str().empty()) @@ -784,7 +820,8 @@ bool get_GovHydroFrancis_vc(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroFrancis_waterTunnelSurgeChamberSimulation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->waterTunnelSurgeChamberSimulation; if (!buffer.str().empty()) @@ -798,7 +835,8 @@ bool get_GovHydroFrancis_waterTunnelSurgeChamberSimulation(const BaseClass* Base bool get_GovHydroFrancis_zsfc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->zsfc; if (!buffer.str().empty()) @@ -810,22 +848,6 @@ bool get_GovHydroFrancis_zsfc(const BaseClass* BaseClass_ptr1, std::stringstream return false; } - - -bool get_GovHydroFrancis_governorControl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const GovHydroFrancis* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->governorControl; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char GovHydroFrancis::debugName[] = "GovHydroFrancis"; const char* GovHydroFrancis::debugString() const { @@ -834,38 +856,38 @@ const char* GovHydroFrancis::debugString() const void GovHydroFrancis::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroFrancis"), &GovHydroFrancis_factory)); + factory_map.emplace("cim:GovHydroFrancis", &GovHydroFrancis_factory); } void GovHydroFrancis::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.am"), &assign_GovHydroFrancis_am)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.av0"), &assign_GovHydroFrancis_av0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.av1"), &assign_GovHydroFrancis_av1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.bp"), &assign_GovHydroFrancis_bp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.db1"), &assign_GovHydroFrancis_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.etamax"), &assign_GovHydroFrancis_etamax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.governorControl"), &assign_GovHydroFrancis_governorControl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.h1"), &assign_GovHydroFrancis_h1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.h2"), &assign_GovHydroFrancis_h2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.hn"), &assign_GovHydroFrancis_hn)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.kc"), &assign_GovHydroFrancis_kc)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.kg"), &assign_GovHydroFrancis_kg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.kt"), &assign_GovHydroFrancis_kt)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.qc0"), &assign_GovHydroFrancis_qc0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.qn"), &assign_GovHydroFrancis_qn)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.ta"), &assign_GovHydroFrancis_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.td"), &assign_GovHydroFrancis_td)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.ts"), &assign_GovHydroFrancis_ts)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.twnc"), &assign_GovHydroFrancis_twnc)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.twng"), &assign_GovHydroFrancis_twng)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.tx"), &assign_GovHydroFrancis_tx)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.va"), &assign_GovHydroFrancis_va)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.valvmax"), &assign_GovHydroFrancis_valvmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.valvmin"), &assign_GovHydroFrancis_valvmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.vc"), &assign_GovHydroFrancis_vc)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.waterTunnelSurgeChamberSimulation"), &assign_GovHydroFrancis_waterTunnelSurgeChamberSimulation)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroFrancis.zsfc"), &assign_GovHydroFrancis_zsfc)); + assign_map.emplace("cim:GovHydroFrancis.am", &assign_GovHydroFrancis_am); + assign_map.emplace("cim:GovHydroFrancis.av0", &assign_GovHydroFrancis_av0); + assign_map.emplace("cim:GovHydroFrancis.av1", &assign_GovHydroFrancis_av1); + assign_map.emplace("cim:GovHydroFrancis.bp", &assign_GovHydroFrancis_bp); + assign_map.emplace("cim:GovHydroFrancis.db1", &assign_GovHydroFrancis_db1); + assign_map.emplace("cim:GovHydroFrancis.etamax", &assign_GovHydroFrancis_etamax); + assign_map.emplace("cim:GovHydroFrancis.governorControl", &assign_GovHydroFrancis_governorControl); + assign_map.emplace("cim:GovHydroFrancis.h1", &assign_GovHydroFrancis_h1); + assign_map.emplace("cim:GovHydroFrancis.h2", &assign_GovHydroFrancis_h2); + assign_map.emplace("cim:GovHydroFrancis.hn", &assign_GovHydroFrancis_hn); + assign_map.emplace("cim:GovHydroFrancis.kc", &assign_GovHydroFrancis_kc); + assign_map.emplace("cim:GovHydroFrancis.kg", &assign_GovHydroFrancis_kg); + assign_map.emplace("cim:GovHydroFrancis.kt", &assign_GovHydroFrancis_kt); + assign_map.emplace("cim:GovHydroFrancis.qc0", &assign_GovHydroFrancis_qc0); + assign_map.emplace("cim:GovHydroFrancis.qn", &assign_GovHydroFrancis_qn); + assign_map.emplace("cim:GovHydroFrancis.ta", &assign_GovHydroFrancis_ta); + assign_map.emplace("cim:GovHydroFrancis.td", &assign_GovHydroFrancis_td); + assign_map.emplace("cim:GovHydroFrancis.ts", &assign_GovHydroFrancis_ts); + assign_map.emplace("cim:GovHydroFrancis.twnc", &assign_GovHydroFrancis_twnc); + assign_map.emplace("cim:GovHydroFrancis.twng", &assign_GovHydroFrancis_twng); + assign_map.emplace("cim:GovHydroFrancis.tx", &assign_GovHydroFrancis_tx); + assign_map.emplace("cim:GovHydroFrancis.va", &assign_GovHydroFrancis_va); + assign_map.emplace("cim:GovHydroFrancis.valvmax", &assign_GovHydroFrancis_valvmax); + assign_map.emplace("cim:GovHydroFrancis.valvmin", &assign_GovHydroFrancis_valvmin); + assign_map.emplace("cim:GovHydroFrancis.vc", &assign_GovHydroFrancis_vc); + assign_map.emplace("cim:GovHydroFrancis.waterTunnelSurgeChamberSimulation", &assign_GovHydroFrancis_waterTunnelSurgeChamberSimulation); + assign_map.emplace("cim:GovHydroFrancis.zsfc", &assign_GovHydroFrancis_zsfc); } void GovHydroFrancis::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/GovHydroFrancis.hpp b/CGMES_3.0.0/GovHydroFrancis.hpp index 42f858a4b..3c3cfa1c9 100644 --- a/CGMES_3.0.0/GovHydroFrancis.hpp +++ b/CGMES_3.0.0/GovHydroFrancis.hpp @@ -25,9 +25,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Detailed hydro unit - Francis model. This model can be used to represent three types of governors. A schematic of the hydraulic system of detailed hydro unit models, such as Francis and Pelton, is provided in the DetailedHydroModelHydraulicSystem diagram. - */ + /** \brief Detailed hydro unit - Francis model. This model can be used to represent three types of governors. A schematic of the hydraulic system of detailed hydro unit models, such as Francis and Pelton, is provided in the DetailedHydroModelHydraulicSystem diagram. */ class GovHydroFrancis : public TurbineGovernorDynamics { public: @@ -35,33 +33,86 @@ namespace CIMPP GovHydroFrancis(); ~GovHydroFrancis() override; - CIMPP::PU am; /* Opening section <i>S</i><i><sub>EFF</sub></i> at the maximum efficiency (<i>Am</i>). Typical value = 0,7. Default: nullptr */ - CIMPP::Area av0; /* Area of the surge tank (<i>A</i><i><sub>V0</sub></i>). Unit = m<sup>2</sup>. Typical value = 30. Default: nullptr */ - CIMPP::Area av1; /* Area of the compensation tank (<i>A</i><i><sub>V1</sub></i>). Unit = m<sup>2</sup>. Typical value = 700. Default: nullptr */ - CIMPP::PU bp; /* Droop (<i>Bp</i>). Typical value = 0,05. Default: nullptr */ - CIMPP::Frequency db1; /* Intentional dead-band width (<i>DB1</i>). Unit = Hz. Typical value = 0. Default: nullptr */ - CIMPP::PU etamax; /* Maximum efficiency (<i>EtaMax</i>). Typical value = 1,05. Default: nullptr */ - CIMPP::FrancisGovernorControlKind governorControl; /* Governor control flag (<i>Cflag</i>). Typical value = mechanicHydrolicTachoAccelerator. Default: 0 */ - CIMPP::Length h1; /* Head of compensation chamber water level with respect to the level of penstock (<i>H</i><i><sub>1</sub></i>). Unit = km. Typical value = 0,004. Default: nullptr */ - CIMPP::Length h2; /* Head of surge tank water level with respect to the level of penstock (<i>H</i><i><sub>2</sub></i>). Unit = km. Typical value = 0,040. Default: nullptr */ - CIMPP::Length hn; /* Rated hydraulic head (<i>H</i><i><sub>n</sub></i>). Unit = km. Typical value = 0,250. Default: nullptr */ - CIMPP::PU kc; /* Penstock loss coefficient (due to friction) (<i>Kc</i>). Typical value = 0,025. Default: nullptr */ - CIMPP::PU kg; /* Water tunnel and surge chamber loss coefficient (due to friction) (<i>Kg</i>). Typical value = 0,025. Default: nullptr */ - CIMPP::PU kt; /* Washout gain (<i>Kt</i>). Typical value = 0,25. Default: nullptr */ - CIMPP::PU qc0; /* No-load turbine flow at nominal head (<i>Qc0</i>). Typical value = 0,1. Default: nullptr */ - CIMPP::VolumeFlowRate qn; /* Rated flow (<i>Q</i><i><sub>n</sub></i>). Unit = m<sup>3</sup>/s. Typical value = 250. Default: nullptr */ - CIMPP::Seconds ta; /* Derivative gain (<i>Ta</i>) (&gt;= 0). Typical value = 3. Default: nullptr */ - CIMPP::Seconds td; /* Washout time constant (<i>Td</i>) (&gt;= 0). Typical value = 6. Default: nullptr */ - CIMPP::Seconds ts; /* Gate servo time constant (<i>Ts</i>) (&gt;= 0). Typical value = 0,5. Default: nullptr */ - CIMPP::Seconds twnc; /* Water inertia time constant (<i>Twnc</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::Seconds twng; /* Water tunnel and surge chamber inertia time constant (<i>Twng</i>) (&gt;= 0). Typical value = 3. Default: nullptr */ - CIMPP::Seconds tx; /* Derivative feedback gain (<i>Tx</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::Float va; /* Maximum gate opening velocity (<i>Va</i>). Unit = PU / s. Typical value = 0,06. Default: 0.0 */ - CIMPP::PU valvmax; /* Maximum gate opening (<i>ValvMax</i>) (&gt; GovHydroFrancis.valvmin). Typical value = 1,1. Default: nullptr */ - CIMPP::PU valvmin; /* Minimum gate opening (<i>ValvMin</i>) (&lt; GovHydroFrancis.valvmax). Typical value = 0. Default: nullptr */ - CIMPP::Float vc; /* Maximum gate closing velocity (<i>Vc</i>). Unit = PU / s. Typical value = -0,06. Default: 0.0 */ - CIMPP::Boolean waterTunnelSurgeChamberSimulation; /* Water tunnel and surge chamber simulation (<i>Tflag</i>). true = enable of water tunnel and surge chamber simulation false = inhibit of water tunnel and surge chamber simulation. Typical value = false. Default: false */ - CIMPP::Length zsfc; /* Head of upper water level with respect to the level of penstock (<i>Zsfc</i>). Unit = km. Typical value = 0,025. Default: nullptr */ + /** \brief Opening section <i>S</i><i><sub>EFF</sub></i> at the maximum efficiency (<i>Am</i>). Typical value = 0,7. Default: nullptr */ + CIMPP::PU am; + + /** \brief Area of the surge tank (<i>A</i><i><sub>V0</sub></i>). Unit = m<sup>2</sup>. Typical value = 30. Default: nullptr */ + CIMPP::Area av0; + + /** \brief Area of the compensation tank (<i>A</i><i><sub>V1</sub></i>). Unit = m<sup>2</sup>. Typical value = 700. Default: nullptr */ + CIMPP::Area av1; + + /** \brief Droop (<i>Bp</i>). Typical value = 0,05. Default: nullptr */ + CIMPP::PU bp; + + /** \brief Intentional dead-band width (<i>DB1</i>). Unit = Hz. Typical value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Maximum efficiency (<i>EtaMax</i>). Typical value = 1,05. Default: nullptr */ + CIMPP::PU etamax; + + /** \brief Governor control flag (<i>Cflag</i>). Typical value = mechanicHydrolicTachoAccelerator. Default: 0 */ + CIMPP::FrancisGovernorControlKind governorControl; + + /** \brief Head of compensation chamber water level with respect to the level of penstock (<i>H</i><i><sub>1</sub></i>). Unit = km. Typical value = 0,004. Default: nullptr */ + CIMPP::Length h1; + + /** \brief Head of surge tank water level with respect to the level of penstock (<i>H</i><i><sub>2</sub></i>). Unit = km. Typical value = 0,040. Default: nullptr */ + CIMPP::Length h2; + + /** \brief Rated hydraulic head (<i>H</i><i><sub>n</sub></i>). Unit = km. Typical value = 0,250. Default: nullptr */ + CIMPP::Length hn; + + /** \brief Penstock loss coefficient (due to friction) (<i>Kc</i>). Typical value = 0,025. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Water tunnel and surge chamber loss coefficient (due to friction) (<i>Kg</i>). Typical value = 0,025. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Washout gain (<i>Kt</i>). Typical value = 0,25. Default: nullptr */ + CIMPP::PU kt; + + /** \brief No-load turbine flow at nominal head (<i>Qc0</i>). Typical value = 0,1. Default: nullptr */ + CIMPP::PU qc0; + + /** \brief Rated flow (<i>Q</i><i><sub>n</sub></i>). Unit = m<sup>3</sup>/s. Typical value = 250. Default: nullptr */ + CIMPP::VolumeFlowRate qn; + + /** \brief Derivative gain (<i>Ta</i>) (&gt;= 0). Typical value = 3. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Washout time constant (<i>Td</i>) (&gt;= 0). Typical value = 6. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Gate servo time constant (<i>Ts</i>) (&gt;= 0). Typical value = 0,5. Default: nullptr */ + CIMPP::Seconds ts; + + /** \brief Water inertia time constant (<i>Twnc</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds twnc; + + /** \brief Water tunnel and surge chamber inertia time constant (<i>Twng</i>) (&gt;= 0). Typical value = 3. Default: nullptr */ + CIMPP::Seconds twng; + + /** \brief Derivative feedback gain (<i>Tx</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tx; + + /** \brief Maximum gate opening velocity (<i>Va</i>). Unit = PU / s. Typical value = 0,06. Default: 0.0 */ + CIMPP::Float va; + + /** \brief Maximum gate opening (<i>ValvMax</i>) (&gt; GovHydroFrancis.valvmin). Typical value = 1,1. Default: nullptr */ + CIMPP::PU valvmax; + + /** \brief Minimum gate opening (<i>ValvMin</i>) (&lt; GovHydroFrancis.valvmax). Typical value = 0. Default: nullptr */ + CIMPP::PU valvmin; + + /** \brief Maximum gate closing velocity (<i>Vc</i>). Unit = PU / s. Typical value = -0,06. Default: 0.0 */ + CIMPP::Float vc; + + /** \brief Water tunnel and surge chamber simulation (<i>Tflag</i>). true = enable of water tunnel and surge chamber simulation false = inhibit of water tunnel and surge chamber simulation. Typical value = false. Default: false */ + CIMPP::Boolean waterTunnelSurgeChamberSimulation; + + /** \brief Head of upper water level with respect to the level of penstock (<i>Zsfc</i>). Unit = km. Typical value = 0,025. Default: nullptr */ + CIMPP::Length zsfc; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GovHydroIEEE0.cpp b/CGMES_3.0.0/GovHydroIEEE0.cpp index 1d00646d8..7038d0233 100644 --- a/CGMES_3.0.0/GovHydroIEEE0.cpp +++ b/CGMES_3.0.0/GovHydroIEEE0.cpp @@ -8,19 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -GovHydroIEEE0::GovHydroIEEE0() {}; -GovHydroIEEE0::~GovHydroIEEE0() {}; +GovHydroIEEE0::GovHydroIEEE0() {} +GovHydroIEEE0::~GovHydroIEEE0() {} static const std::list PossibleProfilesForClass = { @@ -54,116 +46,122 @@ GovHydroIEEE0::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroIEEE0_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE0_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE0_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE0_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE0_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE0_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE0_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE0_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE0_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE0_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE0_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE0_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE0_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE0_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE0_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE0_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroIEEE0_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -177,7 +175,8 @@ bool get_GovHydroIEEE0_k(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroIEEE0_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -191,7 +190,8 @@ bool get_GovHydroIEEE0_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream bool get_GovHydroIEEE0_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -205,7 +205,8 @@ bool get_GovHydroIEEE0_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE0_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -219,7 +220,8 @@ bool get_GovHydroIEEE0_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE0_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -233,7 +235,8 @@ bool get_GovHydroIEEE0_t1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroIEEE0_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -247,7 +250,8 @@ bool get_GovHydroIEEE0_t2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroIEEE0_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -261,7 +265,8 @@ bool get_GovHydroIEEE0_t3(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroIEEE0_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -273,8 +278,6 @@ bool get_GovHydroIEEE0_t4(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char GovHydroIEEE0::debugName[] = "GovHydroIEEE0"; const char* GovHydroIEEE0::debugString() const { @@ -283,19 +286,19 @@ const char* GovHydroIEEE0::debugString() const void GovHydroIEEE0::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroIEEE0"), &GovHydroIEEE0_factory)); + factory_map.emplace("cim:GovHydroIEEE0", &GovHydroIEEE0_factory); } void GovHydroIEEE0::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE0.k"), &assign_GovHydroIEEE0_k)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE0.mwbase"), &assign_GovHydroIEEE0_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE0.pmax"), &assign_GovHydroIEEE0_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE0.pmin"), &assign_GovHydroIEEE0_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE0.t1"), &assign_GovHydroIEEE0_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE0.t2"), &assign_GovHydroIEEE0_t2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE0.t3"), &assign_GovHydroIEEE0_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE0.t4"), &assign_GovHydroIEEE0_t4)); + assign_map.emplace("cim:GovHydroIEEE0.k", &assign_GovHydroIEEE0_k); + assign_map.emplace("cim:GovHydroIEEE0.mwbase", &assign_GovHydroIEEE0_mwbase); + assign_map.emplace("cim:GovHydroIEEE0.pmax", &assign_GovHydroIEEE0_pmax); + assign_map.emplace("cim:GovHydroIEEE0.pmin", &assign_GovHydroIEEE0_pmin); + assign_map.emplace("cim:GovHydroIEEE0.t1", &assign_GovHydroIEEE0_t1); + assign_map.emplace("cim:GovHydroIEEE0.t2", &assign_GovHydroIEEE0_t2); + assign_map.emplace("cim:GovHydroIEEE0.t3", &assign_GovHydroIEEE0_t3); + assign_map.emplace("cim:GovHydroIEEE0.t4", &assign_GovHydroIEEE0_t4); } void GovHydroIEEE0::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/GovHydroIEEE0.hpp b/CGMES_3.0.0/GovHydroIEEE0.hpp index fe29106f2..8e9421990 100644 --- a/CGMES_3.0.0/GovHydroIEEE0.hpp +++ b/CGMES_3.0.0/GovHydroIEEE0.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE simplified hydro governor-turbine model. Used for mechanical-hydraulic and electro-hydraulic turbine governors, with or without steam feedback. Typical values given are for mechanical-hydraulic turbine-governor. Reference: IEEE Transactions on Power Apparatus and Systems, November/December 1973, Volume PAS-92, Number 6, Dynamic Models for Steam and Hydro Turbines in Power System Studies, page 1904. - */ + /** \brief IEEE simplified hydro governor-turbine model. Used for mechanical-hydraulic and electro-hydraulic turbine governors, with or without steam feedback. Typical values given are for mechanical-hydraulic turbine-governor. Reference: IEEE Transactions on Power Apparatus and Systems, November/December 1973, Volume PAS-92, Number 6, Dynamic Models for Steam and Hydro Turbines in Power System Studies, page 1904. */ class GovHydroIEEE0 : public TurbineGovernorDynamics { public: @@ -29,14 +27,29 @@ namespace CIMPP GovHydroIEEE0(); ~GovHydroIEEE0() override; - CIMPP::PU k; /* Governor gain (<i>K)</i>. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ - CIMPP::PU pmax; /* Gate maximum (<i>Pmax</i>) (&gt; GovHydroIEEE0.pmin). Default: nullptr */ - CIMPP::PU pmin; /* Gate minimum (<i>Pmin</i>) (&lt; GovHydroIEEE.pmax). Default: nullptr */ - CIMPP::Seconds t1; /* Governor lag time constant (<i>T1</i>) (&gt;= 0). Typical value = 0,25. Default: nullptr */ - CIMPP::Seconds t2; /* Governor lead time constant (<i>T2)</i> (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds t3; /* Gate actuator time constant (<i>T3</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds t4; /* Water starting time (<i>T4</i>) (&gt;= 0). Default: nullptr */ + /** \brief Governor gain (<i>K)</i>. Default: nullptr */ + CIMPP::PU k; + + /** \brief Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Gate maximum (<i>Pmax</i>) (&gt; GovHydroIEEE0.pmin). Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Gate minimum (<i>Pmin</i>) (&lt; GovHydroIEEE.pmax). Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Governor lag time constant (<i>T1</i>) (&gt;= 0). Typical value = 0,25. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Governor lead time constant (<i>T2)</i> (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Gate actuator time constant (<i>T3</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Water starting time (<i>T4</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t4; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GovHydroIEEE2.cpp b/CGMES_3.0.0/GovHydroIEEE2.cpp index c5c482c99..abbf5cf5e 100644 --- a/CGMES_3.0.0/GovHydroIEEE2.cpp +++ b/CGMES_3.0.0/GovHydroIEEE2.cpp @@ -8,37 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Float.hpp" -#include "Float.hpp" using namespace CIMPP; -GovHydroIEEE2::GovHydroIEEE2() {}; -GovHydroIEEE2::~GovHydroIEEE2() {}; +GovHydroIEEE2::GovHydroIEEE2() {} +GovHydroIEEE2::~GovHydroIEEE2() {} static const std::list PossibleProfilesForClass = { @@ -90,350 +64,374 @@ GovHydroIEEE2::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroIEEE2_aturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_aturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->aturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_bturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_bturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_gv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_kturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_kturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_pgv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_rperm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_rperm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rperm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_rtemp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_rtemp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rtemp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_uc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroIEEE2_uo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroIEEE2_uo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroIEEE2_aturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->aturb; if (!buffer.str().empty()) @@ -447,7 +445,8 @@ bool get_GovHydroIEEE2_aturb(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_bturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bturb; if (!buffer.str().empty()) @@ -461,7 +460,8 @@ bool get_GovHydroIEEE2_bturb(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -475,7 +475,8 @@ bool get_GovHydroIEEE2_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroIEEE2_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -489,7 +490,8 @@ bool get_GovHydroIEEE2_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroIEEE2_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -503,7 +505,8 @@ bool get_GovHydroIEEE2_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroIEEE2_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -517,7 +520,8 @@ bool get_GovHydroIEEE2_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroIEEE2_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -531,7 +535,8 @@ bool get_GovHydroIEEE2_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroIEEE2_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv6; if (!buffer.str().empty()) @@ -545,7 +550,8 @@ bool get_GovHydroIEEE2_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroIEEE2_kturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kturb; if (!buffer.str().empty()) @@ -559,7 +565,8 @@ bool get_GovHydroIEEE2_kturb(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -573,7 +580,8 @@ bool get_GovHydroIEEE2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream bool get_GovHydroIEEE2_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -587,7 +595,8 @@ bool get_GovHydroIEEE2_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -601,7 +610,8 @@ bool get_GovHydroIEEE2_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -615,7 +625,8 @@ bool get_GovHydroIEEE2_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -629,7 +640,8 @@ bool get_GovHydroIEEE2_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -643,7 +655,8 @@ bool get_GovHydroIEEE2_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv6; if (!buffer.str().empty()) @@ -657,7 +670,8 @@ bool get_GovHydroIEEE2_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -671,7 +685,8 @@ bool get_GovHydroIEEE2_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -685,7 +700,8 @@ bool get_GovHydroIEEE2_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rperm; if (!buffer.str().empty()) @@ -699,7 +715,8 @@ bool get_GovHydroIEEE2_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_rtemp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rtemp; if (!buffer.str().empty()) @@ -713,7 +730,8 @@ bool get_GovHydroIEEE2_rtemp(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroIEEE2_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -727,7 +745,8 @@ bool get_GovHydroIEEE2_tg(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroIEEE2_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -741,7 +760,8 @@ bool get_GovHydroIEEE2_tp(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroIEEE2_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -755,7 +775,8 @@ bool get_GovHydroIEEE2_tr(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroIEEE2_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -769,7 +790,8 @@ bool get_GovHydroIEEE2_tw(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroIEEE2_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uc; if (!buffer.str().empty()) @@ -783,7 +805,8 @@ bool get_GovHydroIEEE2_uc(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroIEEE2_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uo; if (!buffer.str().empty()) @@ -795,8 +818,6 @@ bool get_GovHydroIEEE2_uo(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char GovHydroIEEE2::debugName[] = "GovHydroIEEE2"; const char* GovHydroIEEE2::debugString() const { @@ -805,37 +826,37 @@ const char* GovHydroIEEE2::debugString() const void GovHydroIEEE2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2"), &GovHydroIEEE2_factory)); + factory_map.emplace("cim:GovHydroIEEE2", &GovHydroIEEE2_factory); } void GovHydroIEEE2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.aturb"), &assign_GovHydroIEEE2_aturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.bturb"), &assign_GovHydroIEEE2_bturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.gv1"), &assign_GovHydroIEEE2_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.gv2"), &assign_GovHydroIEEE2_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.gv3"), &assign_GovHydroIEEE2_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.gv4"), &assign_GovHydroIEEE2_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.gv5"), &assign_GovHydroIEEE2_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.gv6"), &assign_GovHydroIEEE2_gv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.kturb"), &assign_GovHydroIEEE2_kturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.mwbase"), &assign_GovHydroIEEE2_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.pgv1"), &assign_GovHydroIEEE2_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.pgv2"), &assign_GovHydroIEEE2_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.pgv3"), &assign_GovHydroIEEE2_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.pgv4"), &assign_GovHydroIEEE2_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.pgv5"), &assign_GovHydroIEEE2_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.pgv6"), &assign_GovHydroIEEE2_pgv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.pmax"), &assign_GovHydroIEEE2_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.pmin"), &assign_GovHydroIEEE2_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.rperm"), &assign_GovHydroIEEE2_rperm)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.rtemp"), &assign_GovHydroIEEE2_rtemp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.tg"), &assign_GovHydroIEEE2_tg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.tp"), &assign_GovHydroIEEE2_tp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.tr"), &assign_GovHydroIEEE2_tr)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.tw"), &assign_GovHydroIEEE2_tw)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.uc"), &assign_GovHydroIEEE2_uc)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroIEEE2.uo"), &assign_GovHydroIEEE2_uo)); + assign_map.emplace("cim:GovHydroIEEE2.aturb", &assign_GovHydroIEEE2_aturb); + assign_map.emplace("cim:GovHydroIEEE2.bturb", &assign_GovHydroIEEE2_bturb); + assign_map.emplace("cim:GovHydroIEEE2.gv1", &assign_GovHydroIEEE2_gv1); + assign_map.emplace("cim:GovHydroIEEE2.gv2", &assign_GovHydroIEEE2_gv2); + assign_map.emplace("cim:GovHydroIEEE2.gv3", &assign_GovHydroIEEE2_gv3); + assign_map.emplace("cim:GovHydroIEEE2.gv4", &assign_GovHydroIEEE2_gv4); + assign_map.emplace("cim:GovHydroIEEE2.gv5", &assign_GovHydroIEEE2_gv5); + assign_map.emplace("cim:GovHydroIEEE2.gv6", &assign_GovHydroIEEE2_gv6); + assign_map.emplace("cim:GovHydroIEEE2.kturb", &assign_GovHydroIEEE2_kturb); + assign_map.emplace("cim:GovHydroIEEE2.mwbase", &assign_GovHydroIEEE2_mwbase); + assign_map.emplace("cim:GovHydroIEEE2.pgv1", &assign_GovHydroIEEE2_pgv1); + assign_map.emplace("cim:GovHydroIEEE2.pgv2", &assign_GovHydroIEEE2_pgv2); + assign_map.emplace("cim:GovHydroIEEE2.pgv3", &assign_GovHydroIEEE2_pgv3); + assign_map.emplace("cim:GovHydroIEEE2.pgv4", &assign_GovHydroIEEE2_pgv4); + assign_map.emplace("cim:GovHydroIEEE2.pgv5", &assign_GovHydroIEEE2_pgv5); + assign_map.emplace("cim:GovHydroIEEE2.pgv6", &assign_GovHydroIEEE2_pgv6); + assign_map.emplace("cim:GovHydroIEEE2.pmax", &assign_GovHydroIEEE2_pmax); + assign_map.emplace("cim:GovHydroIEEE2.pmin", &assign_GovHydroIEEE2_pmin); + assign_map.emplace("cim:GovHydroIEEE2.rperm", &assign_GovHydroIEEE2_rperm); + assign_map.emplace("cim:GovHydroIEEE2.rtemp", &assign_GovHydroIEEE2_rtemp); + assign_map.emplace("cim:GovHydroIEEE2.tg", &assign_GovHydroIEEE2_tg); + assign_map.emplace("cim:GovHydroIEEE2.tp", &assign_GovHydroIEEE2_tp); + assign_map.emplace("cim:GovHydroIEEE2.tr", &assign_GovHydroIEEE2_tr); + assign_map.emplace("cim:GovHydroIEEE2.tw", &assign_GovHydroIEEE2_tw); + assign_map.emplace("cim:GovHydroIEEE2.uc", &assign_GovHydroIEEE2_uc); + assign_map.emplace("cim:GovHydroIEEE2.uo", &assign_GovHydroIEEE2_uo); } void GovHydroIEEE2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/GovHydroIEEE2.hpp b/CGMES_3.0.0/GovHydroIEEE2.hpp index 8a1a27442..d0ecc37f5 100644 --- a/CGMES_3.0.0/GovHydroIEEE2.hpp +++ b/CGMES_3.0.0/GovHydroIEEE2.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE hydro turbine governor model represents plants with straightforward penstock configurations and hydraulic-dashpot governors. Reference: IEEE Transactions on Power Apparatus and Systems, November/December 1973, Volume PAS-92, Number 6, Dynamic Models for Steam and Hydro Turbines in Power System Studies, page 1904. - */ + /** \brief IEEE hydro turbine governor model represents plants with straightforward penstock configurations and hydraulic-dashpot governors. Reference: IEEE Transactions on Power Apparatus and Systems, November/December 1973, Volume PAS-92, Number 6, Dynamic Models for Steam and Hydro Turbines in Power System Studies, page 1904. */ class GovHydroIEEE2 : public TurbineGovernorDynamics { public: @@ -30,32 +28,83 @@ namespace CIMPP GovHydroIEEE2(); ~GovHydroIEEE2() override; - CIMPP::PU aturb; /* Turbine numerator multiplier (<i>Aturb</i>). Typical value = -1. Default: nullptr */ - CIMPP::PU bturb; /* Turbine denominator multiplier (<i>Bturb</i>) (&gt; 0). Typical value = 0,5. Default: nullptr */ - CIMPP::PU gv1; /* Nonlinear gain point 1, PU gv (<i>Gv1</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain point 2, PU gv (<i>Gv2</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain point 3, PU gv (<i>Gv3</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain point 4, PU gv (<i>Gv4</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain point 5, PU gv (<i>Gv5</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv6; /* Nonlinear gain point 6, PU gv (<i>Gv6</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU kturb; /* Turbine gain (<i>Kturb</i>). Typical value = 1. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain point 1, PU power (<i>Pgv1</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain point 2, PU power (<i>Pgv2</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain point 3, PU power (<i>Pgv3</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain point 4, PU power (<i>Pgv4</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain point 5, PU power (<i>Pgv5</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv6; /* Nonlinear gain point 6, PU power (<i>Pgv6</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pmax; /* Maximum gate opening (<i>Pmax</i>) (&gt; GovHydroIEEE2.pmin). Typical value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum gate opening (<i>Pmin</i>) (&lt;GovHydroIEEE2.pmax). Typical value = 0. Default: nullptr */ - CIMPP::PU rperm; /* Permanent droop (<i>Rperm</i>). Typical value = 0,05. Default: nullptr */ - CIMPP::PU rtemp; /* Temporary droop (<i>Rtemp</i>). Typical value = 0,5. Default: nullptr */ - CIMPP::Seconds tg; /* Gate servo time constant (<i>Tg</i>) (&gt;= 0). Typical value = 0,5. Default: nullptr */ - CIMPP::Seconds tp; /* Pilot servo valve time constant (<i>Tp</i>) (&gt;= 0). Typical value = 0,03. Default: nullptr */ - CIMPP::Seconds tr; /* Dashpot time constant (<i>Tr</i>) (&gt;= 0). Typical value = 12. Default: nullptr */ - CIMPP::Seconds tw; /* Water inertia time constant (<i>Tw</i>) (&gt;= 0). Typical value = 2. Default: nullptr */ - CIMPP::Float uc; /* Maximum gate closing velocity (<i>Uc</i>) (&lt;0). Typical value = -0,1. Default: 0.0 */ - CIMPP::Float uo; /* Maximum gate opening velocity (<i>Uo</i>). Unit = PU / s. Typical value = 0,1. Default: 0.0 */ + /** \brief Turbine numerator multiplier (<i>Aturb</i>). Typical value = -1. Default: nullptr */ + CIMPP::PU aturb; + + /** \brief Turbine denominator multiplier (<i>Bturb</i>) (&gt; 0). Typical value = 0,5. Default: nullptr */ + CIMPP::PU bturb; + + /** \brief Nonlinear gain point 1, PU gv (<i>Gv1</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain point 2, PU gv (<i>Gv2</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain point 3, PU gv (<i>Gv3</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain point 4, PU gv (<i>Gv4</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain point 5, PU gv (<i>Gv5</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Nonlinear gain point 6, PU gv (<i>Gv6</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv6; + + /** \brief Turbine gain (<i>Kturb</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU kturb; + + /** \brief Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain point 1, PU power (<i>Pgv1</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain point 2, PU power (<i>Pgv2</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain point 3, PU power (<i>Pgv3</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain point 4, PU power (<i>Pgv4</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain point 5, PU power (<i>Pgv5</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief Nonlinear gain point 6, PU power (<i>Pgv6</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv6; + + /** \brief Maximum gate opening (<i>Pmax</i>) (&gt; GovHydroIEEE2.pmin). Typical value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum gate opening (<i>Pmin</i>) (&lt;GovHydroIEEE2.pmax). Typical value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Permanent droop (<i>Rperm</i>). Typical value = 0,05. Default: nullptr */ + CIMPP::PU rperm; + + /** \brief Temporary droop (<i>Rtemp</i>). Typical value = 0,5. Default: nullptr */ + CIMPP::PU rtemp; + + /** \brief Gate servo time constant (<i>Tg</i>) (&gt;= 0). Typical value = 0,5. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Pilot servo valve time constant (<i>Tp</i>) (&gt;= 0). Typical value = 0,03. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Dashpot time constant (<i>Tr</i>) (&gt;= 0). Typical value = 12. Default: nullptr */ + CIMPP::Seconds tr; + + /** \brief Water inertia time constant (<i>Tw</i>) (&gt;= 0). Typical value = 2. Default: nullptr */ + CIMPP::Seconds tw; + + /** \brief Maximum gate closing velocity (<i>Uc</i>) (&lt;0). Typical value = -0,1. Default: 0.0 */ + CIMPP::Float uc; + + /** \brief Maximum gate opening velocity (<i>Uo</i>). Unit = PU / s. Typical value = 0,1. Default: 0.0 */ + CIMPP::Float uo; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GovHydroPID.cpp b/CGMES_3.0.0/GovHydroPID.cpp index d74ba28c4..45136a44f 100644 --- a/CGMES_3.0.0/GovHydroPID.cpp +++ b/CGMES_3.0.0/GovHydroPID.cpp @@ -8,44 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Frequency.hpp" -#include "ActivePower.hpp" -#include "Frequency.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Float.hpp" -#include "Float.hpp" using namespace CIMPP; -GovHydroPID::GovHydroPID() {}; -GovHydroPID::~GovHydroPID() {}; +GovHydroPID::GovHydroPID() {} +GovHydroPID::~GovHydroPID() {} static const std::list PossibleProfilesForClass = { @@ -104,441 +71,472 @@ GovHydroPID::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroPID_aturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_aturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->aturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_bturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_bturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_eps(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eps; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_gv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_inputSignal(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_inputSignal(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_pgv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_tt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_tturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_tturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_velcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_velcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velcl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID_velop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID_velop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroPID_aturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->aturb; if (!buffer.str().empty()) @@ -552,7 +550,8 @@ bool get_GovHydroPID_aturb(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPID_bturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bturb; if (!buffer.str().empty()) @@ -566,7 +565,8 @@ bool get_GovHydroPID_bturb(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPID_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -580,7 +580,8 @@ bool get_GovHydroPID_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -594,7 +595,8 @@ bool get_GovHydroPID_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eps; if (!buffer.str().empty()) @@ -608,7 +610,8 @@ bool get_GovHydroPID_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -622,7 +625,8 @@ bool get_GovHydroPID_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -636,7 +640,8 @@ bool get_GovHydroPID_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -650,7 +655,8 @@ bool get_GovHydroPID_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -664,7 +670,8 @@ bool get_GovHydroPID_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -678,7 +685,8 @@ bool get_GovHydroPID_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv6; if (!buffer.str().empty()) @@ -692,7 +700,8 @@ bool get_GovHydroPID_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID_inputSignal(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inputSignal; if (!buffer.str().empty()) @@ -706,7 +715,8 @@ bool get_GovHydroPID_inputSignal(const BaseClass* BaseClass_ptr1, std::stringstr bool get_GovHydroPID_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -720,7 +730,8 @@ bool get_GovHydroPID_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroPID_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -734,7 +745,8 @@ bool get_GovHydroPID_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroPID_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -748,7 +760,8 @@ bool get_GovHydroPID_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroPID_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -762,7 +775,8 @@ bool get_GovHydroPID_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroPID_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -776,7 +790,8 @@ bool get_GovHydroPID_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPID_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -790,7 +805,8 @@ bool get_GovHydroPID_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroPID_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -804,7 +820,8 @@ bool get_GovHydroPID_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroPID_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -818,7 +835,8 @@ bool get_GovHydroPID_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroPID_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -832,7 +850,8 @@ bool get_GovHydroPID_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroPID_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -846,7 +865,8 @@ bool get_GovHydroPID_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroPID_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv6; if (!buffer.str().empty()) @@ -860,7 +880,8 @@ bool get_GovHydroPID_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroPID_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -874,7 +895,8 @@ bool get_GovHydroPID_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroPID_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -888,7 +910,8 @@ bool get_GovHydroPID_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroPID_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -902,7 +925,8 @@ bool get_GovHydroPID_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroPID_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -916,7 +940,8 @@ bool get_GovHydroPID_td(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroPID_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -930,7 +955,8 @@ bool get_GovHydroPID_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroPID_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -944,7 +970,8 @@ bool get_GovHydroPID_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroPID_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tt; if (!buffer.str().empty()) @@ -958,7 +985,8 @@ bool get_GovHydroPID_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroPID_tturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tturb; if (!buffer.str().empty()) @@ -972,7 +1000,8 @@ bool get_GovHydroPID_tturb(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPID_velcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velcl; if (!buffer.str().empty()) @@ -986,7 +1015,8 @@ bool get_GovHydroPID_velcl(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPID_velop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velop; if (!buffer.str().empty()) @@ -998,8 +1028,6 @@ bool get_GovHydroPID_velop(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char GovHydroPID::debugName[] = "GovHydroPID"; const char* GovHydroPID::debugString() const { @@ -1008,44 +1036,44 @@ const char* GovHydroPID::debugString() const void GovHydroPID::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroPID"), &GovHydroPID_factory)); + factory_map.emplace("cim:GovHydroPID", &GovHydroPID_factory); } void GovHydroPID::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.aturb"), &assign_GovHydroPID_aturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.bturb"), &assign_GovHydroPID_bturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.db1"), &assign_GovHydroPID_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.db2"), &assign_GovHydroPID_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.eps"), &assign_GovHydroPID_eps)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.gv1"), &assign_GovHydroPID_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.gv2"), &assign_GovHydroPID_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.gv3"), &assign_GovHydroPID_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.gv4"), &assign_GovHydroPID_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.gv5"), &assign_GovHydroPID_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.gv6"), &assign_GovHydroPID_gv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.inputSignal"), &assign_GovHydroPID_inputSignal)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.kd"), &assign_GovHydroPID_kd)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.kg"), &assign_GovHydroPID_kg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.ki"), &assign_GovHydroPID_ki)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.kp"), &assign_GovHydroPID_kp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.mwbase"), &assign_GovHydroPID_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.pgv1"), &assign_GovHydroPID_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.pgv2"), &assign_GovHydroPID_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.pgv3"), &assign_GovHydroPID_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.pgv4"), &assign_GovHydroPID_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.pgv5"), &assign_GovHydroPID_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.pgv6"), &assign_GovHydroPID_pgv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.pmax"), &assign_GovHydroPID_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.pmin"), &assign_GovHydroPID_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.r"), &assign_GovHydroPID_r)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.td"), &assign_GovHydroPID_td)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.tf"), &assign_GovHydroPID_tf)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.tp"), &assign_GovHydroPID_tp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.tt"), &assign_GovHydroPID_tt)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.tturb"), &assign_GovHydroPID_tturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.velcl"), &assign_GovHydroPID_velcl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID.velop"), &assign_GovHydroPID_velop)); + assign_map.emplace("cim:GovHydroPID.aturb", &assign_GovHydroPID_aturb); + assign_map.emplace("cim:GovHydroPID.bturb", &assign_GovHydroPID_bturb); + assign_map.emplace("cim:GovHydroPID.db1", &assign_GovHydroPID_db1); + assign_map.emplace("cim:GovHydroPID.db2", &assign_GovHydroPID_db2); + assign_map.emplace("cim:GovHydroPID.eps", &assign_GovHydroPID_eps); + assign_map.emplace("cim:GovHydroPID.gv1", &assign_GovHydroPID_gv1); + assign_map.emplace("cim:GovHydroPID.gv2", &assign_GovHydroPID_gv2); + assign_map.emplace("cim:GovHydroPID.gv3", &assign_GovHydroPID_gv3); + assign_map.emplace("cim:GovHydroPID.gv4", &assign_GovHydroPID_gv4); + assign_map.emplace("cim:GovHydroPID.gv5", &assign_GovHydroPID_gv5); + assign_map.emplace("cim:GovHydroPID.gv6", &assign_GovHydroPID_gv6); + assign_map.emplace("cim:GovHydroPID.inputSignal", &assign_GovHydroPID_inputSignal); + assign_map.emplace("cim:GovHydroPID.kd", &assign_GovHydroPID_kd); + assign_map.emplace("cim:GovHydroPID.kg", &assign_GovHydroPID_kg); + assign_map.emplace("cim:GovHydroPID.ki", &assign_GovHydroPID_ki); + assign_map.emplace("cim:GovHydroPID.kp", &assign_GovHydroPID_kp); + assign_map.emplace("cim:GovHydroPID.mwbase", &assign_GovHydroPID_mwbase); + assign_map.emplace("cim:GovHydroPID.pgv1", &assign_GovHydroPID_pgv1); + assign_map.emplace("cim:GovHydroPID.pgv2", &assign_GovHydroPID_pgv2); + assign_map.emplace("cim:GovHydroPID.pgv3", &assign_GovHydroPID_pgv3); + assign_map.emplace("cim:GovHydroPID.pgv4", &assign_GovHydroPID_pgv4); + assign_map.emplace("cim:GovHydroPID.pgv5", &assign_GovHydroPID_pgv5); + assign_map.emplace("cim:GovHydroPID.pgv6", &assign_GovHydroPID_pgv6); + assign_map.emplace("cim:GovHydroPID.pmax", &assign_GovHydroPID_pmax); + assign_map.emplace("cim:GovHydroPID.pmin", &assign_GovHydroPID_pmin); + assign_map.emplace("cim:GovHydroPID.r", &assign_GovHydroPID_r); + assign_map.emplace("cim:GovHydroPID.td", &assign_GovHydroPID_td); + assign_map.emplace("cim:GovHydroPID.tf", &assign_GovHydroPID_tf); + assign_map.emplace("cim:GovHydroPID.tp", &assign_GovHydroPID_tp); + assign_map.emplace("cim:GovHydroPID.tt", &assign_GovHydroPID_tt); + assign_map.emplace("cim:GovHydroPID.tturb", &assign_GovHydroPID_tturb); + assign_map.emplace("cim:GovHydroPID.velcl", &assign_GovHydroPID_velcl); + assign_map.emplace("cim:GovHydroPID.velop", &assign_GovHydroPID_velop); } void GovHydroPID::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/GovHydroPID.hpp b/CGMES_3.0.0/GovHydroPID.hpp index 1673687d8..8a9d9445b 100644 --- a/CGMES_3.0.0/GovHydroPID.hpp +++ b/CGMES_3.0.0/GovHydroPID.hpp @@ -22,9 +22,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - PID governor and turbine. - */ + /** \brief PID governor and turbine. */ class GovHydroPID : public TurbineGovernorDynamics { public: @@ -32,39 +30,104 @@ namespace CIMPP GovHydroPID(); ~GovHydroPID() override; - CIMPP::PU aturb; /* Turbine numerator multiplier (<i>Aturb</i>) (see parameter detail 3). Typical value -1. Default: nullptr */ - CIMPP::PU bturb; /* Turbine denominator multiplier (<i>Bturb</i>) (see parameter detail 3). Typical value = 0,5. Default: nullptr */ - CIMPP::Frequency db1; /* Intentional dead-band width (<i>db1</i>). Unit = Hz. Typical value = 0. Default: nullptr */ - CIMPP::ActivePower db2; /* Unintentional dead-band (<i>db2</i>). Unit = MW. Typical value = 0. Default: nullptr */ - CIMPP::Frequency eps; /* Intentional db hysteresis (<i>eps</i>). Unit = Hz. Typical value = 0. Default: nullptr */ - CIMPP::PU gv1; /* Nonlinear gain point 1, PU gv (<i>Gv1</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain point 2, PU gv (<i>Gv2</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain point 3, PU gv (<i>Gv3</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain point 4, PU gv (<i>Gv4</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain point 5, PU gv (<i>Gv5</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv6; /* Nonlinear gain point 6, PU gv (<i>Gv6</i>). Typical value = 0. Default: nullptr */ - CIMPP::Boolean inputSignal; /* Input signal switch (<i>Flag</i>). true = <i>Pe</i> input is used false = feedback is received from <i>CV</i>. <i>Flag</i> is normally dependent on <i>Tt</i>. If <i>Tt </i>is zero, <i>Flag</i> is set to false. If <i>Tt</i> is not zero, <i>Flag</i> is set to true. Typical value = true. Default: false */ - CIMPP::PU kd; /* Derivative gain (<i>Kd</i>). Typical value = 1,11. Default: nullptr */ - CIMPP::PU kg; /* Gate servo gain (<i>Kg</i>). Typical value = 2,5. Default: nullptr */ - CIMPP::PU ki; /* Integral gain (<i>Ki</i>). Typical value = 0,36. Default: nullptr */ - CIMPP::PU kp; /* Proportional gain (<i>Kp</i>). Typical value = 0,1. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain point 1, PU power (<i>Pgv1</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain point 2, PU power (<i>Pgv2</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain point 3, PU power (<i>Pgv3</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain point 4, PU power (<i>Pgv4</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain point 5, PU power (<i>Pgv5</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv6; /* Nonlinear gain point 6, PU power (<i>Pgv6</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pmax; /* Maximum gate opening, PU of MWbase (<i>Pmax</i>) (&gt; GovHydroPID.pmin). Typical value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum gate opening, PU of MWbase (<i>Pmin</i>) (&lt; GovHydroPID.pmax). Typical value = 0. Default: nullptr */ - CIMPP::PU r; /* Steady state droop (<i>R</i>). Typical value = 0,05. Default: nullptr */ - CIMPP::Seconds td; /* Input filter time constant (<i>Td</i>) (&gt;= 0). If = 0, block is bypassed. Typical value = 0. Default: nullptr */ - CIMPP::Seconds tf; /* Washout time constant (<i>Tf</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds tp; /* Gate servo time constant (<i>Tp</i>) (&gt;= 0). If = 0, block is bypassed. Typical value = 0,35. Default: nullptr */ - CIMPP::Seconds tt; /* Power feedback time constant (<i>Tt</i>) (&gt;= 0). If = 0, block is bypassed. Typical value = 0,02. Default: nullptr */ - CIMPP::Seconds tturb; /* Turbine time constant (<i>Tturb</i>) (&gt;= 0). See Parameter detail 3. Typical value = 0,8. Default: nullptr */ - CIMPP::Float velcl; /* Maximum gate closing velocity (<i>Velcl</i>). Unit = PU / s. Typical value = -0,14. Default: 0.0 */ - CIMPP::Float velop; /* Maximum gate opening velocity (<i>Velop</i>). Unit = PU / s. Typical value = 0,09. Default: 0.0 */ + /** \brief Turbine numerator multiplier (<i>Aturb</i>) (see parameter detail 3). Typical value -1. Default: nullptr */ + CIMPP::PU aturb; + + /** \brief Turbine denominator multiplier (<i>Bturb</i>) (see parameter detail 3). Typical value = 0,5. Default: nullptr */ + CIMPP::PU bturb; + + /** \brief Intentional dead-band width (<i>db1</i>). Unit = Hz. Typical value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Unintentional dead-band (<i>db2</i>). Unit = MW. Typical value = 0. Default: nullptr */ + CIMPP::ActivePower db2; + + /** \brief Intentional db hysteresis (<i>eps</i>). Unit = Hz. Typical value = 0. Default: nullptr */ + CIMPP::Frequency eps; + + /** \brief Nonlinear gain point 1, PU gv (<i>Gv1</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain point 2, PU gv (<i>Gv2</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain point 3, PU gv (<i>Gv3</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain point 4, PU gv (<i>Gv4</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain point 5, PU gv (<i>Gv5</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Nonlinear gain point 6, PU gv (<i>Gv6</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv6; + + /** \brief Input signal switch (<i>Flag</i>). true = <i>Pe</i> input is used false = feedback is received from <i>CV</i>. <i>Flag</i> is normally dependent on <i>Tt</i>. If <i>Tt </i>is zero, <i>Flag</i> is set to false. If <i>Tt</i> is not zero, <i>Flag</i> is set to true. Typical value = true. Default: false */ + CIMPP::Boolean inputSignal; + + /** \brief Derivative gain (<i>Kd</i>). Typical value = 1,11. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Gate servo gain (<i>Kg</i>). Typical value = 2,5. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Integral gain (<i>Ki</i>). Typical value = 0,36. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Proportional gain (<i>Kp</i>). Typical value = 0,1. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain point 1, PU power (<i>Pgv1</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain point 2, PU power (<i>Pgv2</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain point 3, PU power (<i>Pgv3</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain point 4, PU power (<i>Pgv4</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain point 5, PU power (<i>Pgv5</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief Nonlinear gain point 6, PU power (<i>Pgv6</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv6; + + /** \brief Maximum gate opening, PU of MWbase (<i>Pmax</i>) (&gt; GovHydroPID.pmin). Typical value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum gate opening, PU of MWbase (<i>Pmin</i>) (&lt; GovHydroPID.pmax). Typical value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Steady state droop (<i>R</i>). Typical value = 0,05. Default: nullptr */ + CIMPP::PU r; + + /** \brief Input filter time constant (<i>Td</i>) (&gt;= 0). If = 0, block is bypassed. Typical value = 0. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Washout time constant (<i>Tf</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Gate servo time constant (<i>Tp</i>) (&gt;= 0). If = 0, block is bypassed. Typical value = 0,35. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Power feedback time constant (<i>Tt</i>) (&gt;= 0). If = 0, block is bypassed. Typical value = 0,02. Default: nullptr */ + CIMPP::Seconds tt; + + /** \brief Turbine time constant (<i>Tturb</i>) (&gt;= 0). See Parameter detail 3. Typical value = 0,8. Default: nullptr */ + CIMPP::Seconds tturb; + + /** \brief Maximum gate closing velocity (<i>Velcl</i>). Unit = PU / s. Typical value = -0,14. Default: 0.0 */ + CIMPP::Float velcl; + + /** \brief Maximum gate opening velocity (<i>Velop</i>). Unit = PU / s. Typical value = 0,09. Default: 0.0 */ + CIMPP::Float velop; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GovHydroPID2.cpp b/CGMES_3.0.0/GovHydroPID2.cpp index c145e9f0c..59654db7b 100644 --- a/CGMES_3.0.0/GovHydroPID2.cpp +++ b/CGMES_3.0.0/GovHydroPID2.cpp @@ -8,33 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Float.hpp" -#include "Float.hpp" using namespace CIMPP; -GovHydroPID2::GovHydroPID2() {}; -GovHydroPID2::~GovHydroPID2() {}; +GovHydroPID2::GovHydroPID2() {} +GovHydroPID2::~GovHydroPID2() {} static const std::list PossibleProfilesForClass = { @@ -82,298 +60,318 @@ GovHydroPID2::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroPID2_atw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_atw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->atw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_d(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->d; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_feedbackSignal(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_feedbackSignal(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->feedbackSignal; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_g0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_g0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_g1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_g1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_g2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_g2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_gmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_gmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_gmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_gmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_p1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_p1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_p2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_p2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_p3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_p3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_rperm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_rperm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rperm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_treg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_treg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->treg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_velmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_velmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPID2_velmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPID2_velmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroPID2_atw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->atw; if (!buffer.str().empty()) @@ -387,7 +385,8 @@ bool get_GovHydroPID2_atw(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroPID2_d(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->d; if (!buffer.str().empty()) @@ -401,7 +400,8 @@ bool get_GovHydroPID2_d(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroPID2_feedbackSignal(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->feedbackSignal; if (!buffer.str().empty()) @@ -415,7 +415,8 @@ bool get_GovHydroPID2_feedbackSignal(const BaseClass* BaseClass_ptr1, std::strin bool get_GovHydroPID2_g0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g0; if (!buffer.str().empty()) @@ -429,7 +430,8 @@ bool get_GovHydroPID2_g0(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_g1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g1; if (!buffer.str().empty()) @@ -443,7 +445,8 @@ bool get_GovHydroPID2_g1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_g2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g2; if (!buffer.str().empty()) @@ -457,7 +460,8 @@ bool get_GovHydroPID2_g2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmax; if (!buffer.str().empty()) @@ -471,7 +475,8 @@ bool get_GovHydroPID2_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPID2_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmin; if (!buffer.str().empty()) @@ -485,7 +490,8 @@ bool get_GovHydroPID2_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPID2_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -499,7 +505,8 @@ bool get_GovHydroPID2_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -513,7 +520,8 @@ bool get_GovHydroPID2_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -527,7 +535,8 @@ bool get_GovHydroPID2_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -541,7 +550,8 @@ bool get_GovHydroPID2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPID2_p1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p1; if (!buffer.str().empty()) @@ -555,7 +565,8 @@ bool get_GovHydroPID2_p1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_p2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p2; if (!buffer.str().empty()) @@ -569,7 +580,8 @@ bool get_GovHydroPID2_p2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_p3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p3; if (!buffer.str().empty()) @@ -583,7 +595,8 @@ bool get_GovHydroPID2_p3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rperm; if (!buffer.str().empty()) @@ -597,7 +610,8 @@ bool get_GovHydroPID2_rperm(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPID2_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -611,7 +625,8 @@ bool get_GovHydroPID2_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -625,7 +640,8 @@ bool get_GovHydroPID2_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_treg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->treg; if (!buffer.str().empty()) @@ -639,7 +655,8 @@ bool get_GovHydroPID2_treg(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPID2_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -653,7 +670,8 @@ bool get_GovHydroPID2_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroPID2_velmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velmax; if (!buffer.str().empty()) @@ -667,7 +685,8 @@ bool get_GovHydroPID2_velmax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPID2_velmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPID2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velmin; if (!buffer.str().empty()) @@ -679,8 +698,6 @@ bool get_GovHydroPID2_velmin(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char GovHydroPID2::debugName[] = "GovHydroPID2"; const char* GovHydroPID2::debugString() const { @@ -689,33 +706,33 @@ const char* GovHydroPID2::debugString() const void GovHydroPID2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroPID2"), &GovHydroPID2_factory)); + factory_map.emplace("cim:GovHydroPID2", &GovHydroPID2_factory); } void GovHydroPID2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.atw"), &assign_GovHydroPID2_atw)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.d"), &assign_GovHydroPID2_d)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.feedbackSignal"), &assign_GovHydroPID2_feedbackSignal)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.g0"), &assign_GovHydroPID2_g0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.g1"), &assign_GovHydroPID2_g1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.g2"), &assign_GovHydroPID2_g2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.gmax"), &assign_GovHydroPID2_gmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.gmin"), &assign_GovHydroPID2_gmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.kd"), &assign_GovHydroPID2_kd)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.ki"), &assign_GovHydroPID2_ki)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.kp"), &assign_GovHydroPID2_kp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.mwbase"), &assign_GovHydroPID2_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.p1"), &assign_GovHydroPID2_p1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.p2"), &assign_GovHydroPID2_p2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.p3"), &assign_GovHydroPID2_p3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.rperm"), &assign_GovHydroPID2_rperm)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.ta"), &assign_GovHydroPID2_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.tb"), &assign_GovHydroPID2_tb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.treg"), &assign_GovHydroPID2_treg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.tw"), &assign_GovHydroPID2_tw)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.velmax"), &assign_GovHydroPID2_velmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPID2.velmin"), &assign_GovHydroPID2_velmin)); + assign_map.emplace("cim:GovHydroPID2.atw", &assign_GovHydroPID2_atw); + assign_map.emplace("cim:GovHydroPID2.d", &assign_GovHydroPID2_d); + assign_map.emplace("cim:GovHydroPID2.feedbackSignal", &assign_GovHydroPID2_feedbackSignal); + assign_map.emplace("cim:GovHydroPID2.g0", &assign_GovHydroPID2_g0); + assign_map.emplace("cim:GovHydroPID2.g1", &assign_GovHydroPID2_g1); + assign_map.emplace("cim:GovHydroPID2.g2", &assign_GovHydroPID2_g2); + assign_map.emplace("cim:GovHydroPID2.gmax", &assign_GovHydroPID2_gmax); + assign_map.emplace("cim:GovHydroPID2.gmin", &assign_GovHydroPID2_gmin); + assign_map.emplace("cim:GovHydroPID2.kd", &assign_GovHydroPID2_kd); + assign_map.emplace("cim:GovHydroPID2.ki", &assign_GovHydroPID2_ki); + assign_map.emplace("cim:GovHydroPID2.kp", &assign_GovHydroPID2_kp); + assign_map.emplace("cim:GovHydroPID2.mwbase", &assign_GovHydroPID2_mwbase); + assign_map.emplace("cim:GovHydroPID2.p1", &assign_GovHydroPID2_p1); + assign_map.emplace("cim:GovHydroPID2.p2", &assign_GovHydroPID2_p2); + assign_map.emplace("cim:GovHydroPID2.p3", &assign_GovHydroPID2_p3); + assign_map.emplace("cim:GovHydroPID2.rperm", &assign_GovHydroPID2_rperm); + assign_map.emplace("cim:GovHydroPID2.ta", &assign_GovHydroPID2_ta); + assign_map.emplace("cim:GovHydroPID2.tb", &assign_GovHydroPID2_tb); + assign_map.emplace("cim:GovHydroPID2.treg", &assign_GovHydroPID2_treg); + assign_map.emplace("cim:GovHydroPID2.tw", &assign_GovHydroPID2_tw); + assign_map.emplace("cim:GovHydroPID2.velmax", &assign_GovHydroPID2_velmax); + assign_map.emplace("cim:GovHydroPID2.velmin", &assign_GovHydroPID2_velmin); } void GovHydroPID2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/GovHydroPID2.hpp b/CGMES_3.0.0/GovHydroPID2.hpp index 9d06097a0..5ab3afa06 100644 --- a/CGMES_3.0.0/GovHydroPID2.hpp +++ b/CGMES_3.0.0/GovHydroPID2.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Hydro turbine and governor. Represents plants with straightforward penstock configurations and "three term" electro-hydraulic governors (i.e. WoodwardTM electronic). [Footnote: Woodward electronic governors are an example of suitable products available commercially. This information is given for the convenience of users of this document and does not constitute an endorsement by IEC of these products.] - */ + /** \brief Hydro turbine and governor. Represents plants with straightforward penstock configurations and "three term" electro-hydraulic governors (i.e. WoodwardTM electronic). [Footnote: Woodward electronic governors are an example of suitable products available commercially. This information is given for the convenience of users of this document and does not constitute an endorsement by IEC of these products.] */ class GovHydroPID2 : public TurbineGovernorDynamics { public: @@ -31,28 +29,71 @@ namespace CIMPP GovHydroPID2(); ~GovHydroPID2() override; - CIMPP::PU atw; /* Factor multiplying <i>Tw</i> (<i>Atw</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU d; /* Turbine damping factor (<i>D</i>). Unit = delta P / delta speed. Typical value = 0. Default: nullptr */ - CIMPP::Boolean feedbackSignal; /* Feedback signal type flag (<i>Flag</i>). true = use gate position feedback signal false = use Pe. Default: false */ - CIMPP::PU g0; /* Gate opening at speed no load (<i>G0</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU g1; /* Intermediate gate opening (<i>G1</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU g2; /* Intermediate gate opening (<i>G2</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gmax; /* Maximum gate opening (<i>Gmax</i>) (&gt; GovHydroPID2.gmin). Typical value = 0. Default: nullptr */ - CIMPP::PU gmin; /* Minimum gate opening (<i>Gmin</i>) (&gt; GovHydroPID2.gmax). Typical value = 0. Default: nullptr */ - CIMPP::PU kd; /* Derivative gain (<i>Kd</i>). Typical value = 0. Default: nullptr */ - CIMPP::Float ki; /* Reset gain (<i>Ki</i>). Unit = PU/s. Typical value = 0. Default: 0.0 */ - CIMPP::PU kp; /* Proportional gain (<i>Kp</i>). Typical value = 0. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (<i>MWbase</i>) (&gt;0). Unit = MW. Default: nullptr */ - CIMPP::PU p1; /* Power at gate opening <i>G1</i> (<i>P1</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU p2; /* Power at gate opening G2 (<i>P2</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU p3; /* Power at full opened gate (<i>P3</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU rperm; /* Permanent drop (<i>Rperm</i>). Typical value = 0. Default: nullptr */ - CIMPP::Seconds ta; /* Controller time constant (<i>Ta</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tb; /* Gate servo time constant (<i>Tb</i>) (&gt; 0). Default: nullptr */ - CIMPP::Seconds treg; /* Speed detector time constant (<i>Treg</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tw; /* Water inertia time constant (<i>Tw</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Float velmax; /* Maximum gate opening velocity (<i>Velmax</i>) (&lt; GovHydroPID2.velmin). Unit = PU / s. Typical value = 0. Default: 0.0 */ - CIMPP::Float velmin; /* Maximum gate closing velocity (<i>Velmin</i>) (&gt; GovHydroPID2.velmax). Unit = PU / s. Typical value = 0. Default: 0.0 */ + /** \brief Factor multiplying <i>Tw</i> (<i>Atw</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU atw; + + /** \brief Turbine damping factor (<i>D</i>). Unit = delta P / delta speed. Typical value = 0. Default: nullptr */ + CIMPP::PU d; + + /** \brief Feedback signal type flag (<i>Flag</i>). true = use gate position feedback signal false = use Pe. Default: false */ + CIMPP::Boolean feedbackSignal; + + /** \brief Gate opening at speed no load (<i>G0</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU g0; + + /** \brief Intermediate gate opening (<i>G1</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU g1; + + /** \brief Intermediate gate opening (<i>G2</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU g2; + + /** \brief Maximum gate opening (<i>Gmax</i>) (&gt; GovHydroPID2.gmin). Typical value = 0. Default: nullptr */ + CIMPP::PU gmax; + + /** \brief Minimum gate opening (<i>Gmin</i>) (&gt; GovHydroPID2.gmax). Typical value = 0. Default: nullptr */ + CIMPP::PU gmin; + + /** \brief Derivative gain (<i>Kd</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Reset gain (<i>Ki</i>). Unit = PU/s. Typical value = 0. Default: 0.0 */ + CIMPP::Float ki; + + /** \brief Proportional gain (<i>Kp</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Base for power values (<i>MWbase</i>) (&gt;0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Power at gate opening <i>G1</i> (<i>P1</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU p1; + + /** \brief Power at gate opening G2 (<i>P2</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU p2; + + /** \brief Power at full opened gate (<i>P3</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU p3; + + /** \brief Permanent drop (<i>Rperm</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU rperm; + + /** \brief Controller time constant (<i>Ta</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Gate servo time constant (<i>Tb</i>) (&gt; 0). Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Speed detector time constant (<i>Treg</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds treg; + + /** \brief Water inertia time constant (<i>Tw</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tw; + + /** \brief Maximum gate opening velocity (<i>Velmax</i>) (&lt; GovHydroPID2.velmin). Unit = PU / s. Typical value = 0. Default: 0.0 */ + CIMPP::Float velmax; + + /** \brief Maximum gate closing velocity (<i>Velmin</i>) (&gt; GovHydroPID2.velmax). Unit = PU / s. Typical value = 0. Default: 0.0 */ + CIMPP::Float velmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GovHydroPelton.cpp b/CGMES_3.0.0/GovHydroPelton.cpp index 88c838d89..1f8f2bbfe 100644 --- a/CGMES_3.0.0/GovHydroPelton.cpp +++ b/CGMES_3.0.0/GovHydroPelton.cpp @@ -8,39 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Area.hpp" -#include "Area.hpp" -#include "PU.hpp" -#include "Frequency.hpp" -#include "Frequency.hpp" -#include "Length.hpp" -#include "Length.hpp" -#include "Length.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "VolumeFlowRate.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Length.hpp" using namespace CIMPP; -GovHydroPelton::GovHydroPelton() {}; -GovHydroPelton::~GovHydroPelton() {}; +GovHydroPelton::GovHydroPelton() {} +GovHydroPelton::~GovHydroPelton() {} static const std::list PossibleProfilesForClass = { @@ -94,376 +66,402 @@ GovHydroPelton::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroPelton_av0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_av0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->av0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_av1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_av1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->av1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_bp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_bp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_h1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_h1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->h1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_h2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_h2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->h2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_hn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_hn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->hn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_kc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_kc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_qc0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_qc0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qc0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_qn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_qn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_simplifiedPelton(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_simplifiedPelton(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->simplifiedPelton; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_staticCompensating(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_staticCompensating(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->staticCompensating; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_ts(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_ts(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_tv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_tv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_twnc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_twnc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->twnc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_twng(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_twng(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->twng; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_tx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_tx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_va(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_va(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->va; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_valvmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_valvmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->valvmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_valvmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_valvmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->valvmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_vav(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_vav(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vav; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_vc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_vc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_vcv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_vcv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vcv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_waterTunnelSurgeChamberSimulation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_waterTunnelSurgeChamberSimulation(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->waterTunnelSurgeChamberSimulation; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroPelton_zsfc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroPelton_zsfc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->zsfc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroPelton_av0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->av0; if (!buffer.str().empty()) @@ -477,7 +475,8 @@ bool get_GovHydroPelton_av0(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPelton_av1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->av1; if (!buffer.str().empty()) @@ -491,7 +490,8 @@ bool get_GovHydroPelton_av1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPelton_bp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bp; if (!buffer.str().empty()) @@ -505,7 +505,8 @@ bool get_GovHydroPelton_bp(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -519,7 +520,8 @@ bool get_GovHydroPelton_db1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPelton_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -533,7 +535,8 @@ bool get_GovHydroPelton_db2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPelton_h1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->h1; if (!buffer.str().empty()) @@ -547,7 +550,8 @@ bool get_GovHydroPelton_h1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_h2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->h2; if (!buffer.str().empty()) @@ -561,7 +565,8 @@ bool get_GovHydroPelton_h2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_hn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hn; if (!buffer.str().empty()) @@ -575,7 +580,8 @@ bool get_GovHydroPelton_hn(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_kc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kc; if (!buffer.str().empty()) @@ -589,7 +595,8 @@ bool get_GovHydroPelton_kc(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -603,7 +610,8 @@ bool get_GovHydroPelton_kg(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_qc0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qc0; if (!buffer.str().empty()) @@ -617,7 +625,8 @@ bool get_GovHydroPelton_qc0(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPelton_qn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qn; if (!buffer.str().empty()) @@ -631,7 +640,8 @@ bool get_GovHydroPelton_qn(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_simplifiedPelton(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->simplifiedPelton; if (!buffer.str().empty()) @@ -645,7 +655,8 @@ bool get_GovHydroPelton_simplifiedPelton(const BaseClass* BaseClass_ptr1, std::s bool get_GovHydroPelton_staticCompensating(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->staticCompensating; if (!buffer.str().empty()) @@ -659,7 +670,8 @@ bool get_GovHydroPelton_staticCompensating(const BaseClass* BaseClass_ptr1, std: bool get_GovHydroPelton_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -673,7 +685,8 @@ bool get_GovHydroPelton_ta(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_ts(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts; if (!buffer.str().empty()) @@ -687,7 +700,8 @@ bool get_GovHydroPelton_ts(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_tv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tv; if (!buffer.str().empty()) @@ -701,7 +715,8 @@ bool get_GovHydroPelton_tv(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_twnc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twnc; if (!buffer.str().empty()) @@ -715,7 +730,8 @@ bool get_GovHydroPelton_twnc(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPelton_twng(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twng; if (!buffer.str().empty()) @@ -729,7 +745,8 @@ bool get_GovHydroPelton_twng(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPelton_tx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tx; if (!buffer.str().empty()) @@ -743,7 +760,8 @@ bool get_GovHydroPelton_tx(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_va(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->va; if (!buffer.str().empty()) @@ -757,7 +775,8 @@ bool get_GovHydroPelton_va(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_valvmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->valvmax; if (!buffer.str().empty()) @@ -771,7 +790,8 @@ bool get_GovHydroPelton_valvmax(const BaseClass* BaseClass_ptr1, std::stringstre bool get_GovHydroPelton_valvmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->valvmin; if (!buffer.str().empty()) @@ -785,7 +805,8 @@ bool get_GovHydroPelton_valvmin(const BaseClass* BaseClass_ptr1, std::stringstre bool get_GovHydroPelton_vav(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vav; if (!buffer.str().empty()) @@ -799,7 +820,8 @@ bool get_GovHydroPelton_vav(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPelton_vc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vc; if (!buffer.str().empty()) @@ -813,7 +835,8 @@ bool get_GovHydroPelton_vc(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroPelton_vcv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vcv; if (!buffer.str().empty()) @@ -827,7 +850,8 @@ bool get_GovHydroPelton_vcv(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroPelton_waterTunnelSurgeChamberSimulation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->waterTunnelSurgeChamberSimulation; if (!buffer.str().empty()) @@ -841,7 +865,8 @@ bool get_GovHydroPelton_waterTunnelSurgeChamberSimulation(const BaseClass* BaseC bool get_GovHydroPelton_zsfc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroPelton* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->zsfc; if (!buffer.str().empty()) @@ -853,8 +878,6 @@ bool get_GovHydroPelton_zsfc(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char GovHydroPelton::debugName[] = "GovHydroPelton"; const char* GovHydroPelton::debugString() const { @@ -863,39 +886,39 @@ const char* GovHydroPelton::debugString() const void GovHydroPelton::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroPelton"), &GovHydroPelton_factory)); + factory_map.emplace("cim:GovHydroPelton", &GovHydroPelton_factory); } void GovHydroPelton::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.av0"), &assign_GovHydroPelton_av0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.av1"), &assign_GovHydroPelton_av1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.bp"), &assign_GovHydroPelton_bp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.db1"), &assign_GovHydroPelton_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.db2"), &assign_GovHydroPelton_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.h1"), &assign_GovHydroPelton_h1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.h2"), &assign_GovHydroPelton_h2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.hn"), &assign_GovHydroPelton_hn)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.kc"), &assign_GovHydroPelton_kc)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.kg"), &assign_GovHydroPelton_kg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.qc0"), &assign_GovHydroPelton_qc0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.qn"), &assign_GovHydroPelton_qn)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.simplifiedPelton"), &assign_GovHydroPelton_simplifiedPelton)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.staticCompensating"), &assign_GovHydroPelton_staticCompensating)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.ta"), &assign_GovHydroPelton_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.ts"), &assign_GovHydroPelton_ts)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.tv"), &assign_GovHydroPelton_tv)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.twnc"), &assign_GovHydroPelton_twnc)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.twng"), &assign_GovHydroPelton_twng)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.tx"), &assign_GovHydroPelton_tx)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.va"), &assign_GovHydroPelton_va)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.valvmax"), &assign_GovHydroPelton_valvmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.valvmin"), &assign_GovHydroPelton_valvmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.vav"), &assign_GovHydroPelton_vav)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.vc"), &assign_GovHydroPelton_vc)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.vcv"), &assign_GovHydroPelton_vcv)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.waterTunnelSurgeChamberSimulation"), &assign_GovHydroPelton_waterTunnelSurgeChamberSimulation)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroPelton.zsfc"), &assign_GovHydroPelton_zsfc)); + assign_map.emplace("cim:GovHydroPelton.av0", &assign_GovHydroPelton_av0); + assign_map.emplace("cim:GovHydroPelton.av1", &assign_GovHydroPelton_av1); + assign_map.emplace("cim:GovHydroPelton.bp", &assign_GovHydroPelton_bp); + assign_map.emplace("cim:GovHydroPelton.db1", &assign_GovHydroPelton_db1); + assign_map.emplace("cim:GovHydroPelton.db2", &assign_GovHydroPelton_db2); + assign_map.emplace("cim:GovHydroPelton.h1", &assign_GovHydroPelton_h1); + assign_map.emplace("cim:GovHydroPelton.h2", &assign_GovHydroPelton_h2); + assign_map.emplace("cim:GovHydroPelton.hn", &assign_GovHydroPelton_hn); + assign_map.emplace("cim:GovHydroPelton.kc", &assign_GovHydroPelton_kc); + assign_map.emplace("cim:GovHydroPelton.kg", &assign_GovHydroPelton_kg); + assign_map.emplace("cim:GovHydroPelton.qc0", &assign_GovHydroPelton_qc0); + assign_map.emplace("cim:GovHydroPelton.qn", &assign_GovHydroPelton_qn); + assign_map.emplace("cim:GovHydroPelton.simplifiedPelton", &assign_GovHydroPelton_simplifiedPelton); + assign_map.emplace("cim:GovHydroPelton.staticCompensating", &assign_GovHydroPelton_staticCompensating); + assign_map.emplace("cim:GovHydroPelton.ta", &assign_GovHydroPelton_ta); + assign_map.emplace("cim:GovHydroPelton.ts", &assign_GovHydroPelton_ts); + assign_map.emplace("cim:GovHydroPelton.tv", &assign_GovHydroPelton_tv); + assign_map.emplace("cim:GovHydroPelton.twnc", &assign_GovHydroPelton_twnc); + assign_map.emplace("cim:GovHydroPelton.twng", &assign_GovHydroPelton_twng); + assign_map.emplace("cim:GovHydroPelton.tx", &assign_GovHydroPelton_tx); + assign_map.emplace("cim:GovHydroPelton.va", &assign_GovHydroPelton_va); + assign_map.emplace("cim:GovHydroPelton.valvmax", &assign_GovHydroPelton_valvmax); + assign_map.emplace("cim:GovHydroPelton.valvmin", &assign_GovHydroPelton_valvmin); + assign_map.emplace("cim:GovHydroPelton.vav", &assign_GovHydroPelton_vav); + assign_map.emplace("cim:GovHydroPelton.vc", &assign_GovHydroPelton_vc); + assign_map.emplace("cim:GovHydroPelton.vcv", &assign_GovHydroPelton_vcv); + assign_map.emplace("cim:GovHydroPelton.waterTunnelSurgeChamberSimulation", &assign_GovHydroPelton_waterTunnelSurgeChamberSimulation); + assign_map.emplace("cim:GovHydroPelton.zsfc", &assign_GovHydroPelton_zsfc); } void GovHydroPelton::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/GovHydroPelton.hpp b/CGMES_3.0.0/GovHydroPelton.hpp index 0fad48a99..55f39b805 100644 --- a/CGMES_3.0.0/GovHydroPelton.hpp +++ b/CGMES_3.0.0/GovHydroPelton.hpp @@ -24,9 +24,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Detailed hydro unit - Pelton model. This model can be used to represent the dynamic related to water tunnel and surge chamber. The DetailedHydroModelHydraulicSystem diagram, located under the GovHydroFrancis class, provides a schematic of the hydraulic system of detailed hydro unit models, such as Francis and Pelton. - */ + /** \brief Detailed hydro unit - Pelton model. This model can be used to represent the dynamic related to water tunnel and surge chamber. The DetailedHydroModelHydraulicSystem diagram, located under the GovHydroFrancis class, provides a schematic of the hydraulic system of detailed hydro unit models, such as Francis and Pelton. */ class GovHydroPelton : public TurbineGovernorDynamics { public: @@ -34,34 +32,89 @@ namespace CIMPP GovHydroPelton(); ~GovHydroPelton() override; - CIMPP::Area av0; /* Area of the surge tank (<i>A</i><i><sub>V0</sub></i>). Unit = m<sup>2</sup>. Typical value = 30. Default: nullptr */ - CIMPP::Area av1; /* Area of the compensation tank (<i>A</i><i><sub>V1</sub></i>). Unit = m<sup>2</sup>. Typical value = 700. Default: nullptr */ - CIMPP::PU bp; /* Droop (<i>bp</i>). Typical value = 0,05. Default: nullptr */ - CIMPP::Frequency db1; /* Intentional dead-band width (<i>DB1</i>). Unit = Hz. Typical value = 0. Default: nullptr */ - CIMPP::Frequency db2; /* Intentional dead-band width of valve opening error (<i>DB2</i>). Unit = Hz. Typical value = 0,01. Default: nullptr */ - CIMPP::Length h1; /* Head of compensation chamber water level with respect to the level of penstock (<i>H</i><i><sub>1</sub></i>). Unit = km. Typical value = 0,004. Default: nullptr */ - CIMPP::Length h2; /* Head of surge tank water level with respect to the level of penstock (<i>H</i><i><sub>2</sub></i>). Unit = km. Typical value = 0,040. Default: nullptr */ - CIMPP::Length hn; /* Rated hydraulic head (<i>H</i><i><sub>n</sub></i>). Unit = km. Typical value = 0,250. Default: nullptr */ - CIMPP::PU kc; /* Penstock loss coefficient (due to friction) (<i>Kc</i>). Typical value = 0,025. Default: nullptr */ - CIMPP::PU kg; /* Water tunnel and surge chamber loss coefficient (due to friction) (<i>Kg</i>). Typical value = 0,025. Default: nullptr */ - CIMPP::PU qc0; /* No-load turbine flow at nominal head (<i>Qc0</i>). Typical value = 0,05. Default: nullptr */ - CIMPP::VolumeFlowRate qn; /* Rated flow (<i>Q</i><i><sub>n</sub></i>). Unit = m<sup>3</sup>/s. Typical value = 250. Default: nullptr */ - CIMPP::Boolean simplifiedPelton; /* Simplified Pelton model simulation (<i>Sflag</i>). true = enable of simplified Pelton model simulation false = enable of complete Pelton model simulation (non-linear gain). Typical value = true. Default: false */ - CIMPP::Boolean staticCompensating; /* Static compensating characteristic (<i>Cflag</i>). It should be true if simplifiedPelton = false. true = enable of static compensating characteristic false = inhibit of static compensating characteristic. Typical value = false. Default: false */ - CIMPP::Seconds ta; /* Derivative gain (accelerometer time constant) (<i>Ta</i>) (&gt;= 0). Typical value = 3. Default: nullptr */ - CIMPP::Seconds ts; /* Gate servo time constant (<i>Ts</i>) (&gt;= 0). Typical value = 0,15. Default: nullptr */ - CIMPP::Seconds tv; /* Servomotor integrator time constant (<i>Tv</i>) (&gt;= 0). Typical value = 0,3. Default: nullptr */ - CIMPP::Seconds twnc; /* Water inertia time constant (<i>Twnc</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::Seconds twng; /* Water tunnel and surge chamber inertia time constant (<i>Twng</i>) (&gt;= 0). Typical value = 3. Default: nullptr */ - CIMPP::Seconds tx; /* Electronic integrator time constant (<i>Tx</i>) (&gt;= 0). Typical value = 0,5. Default: nullptr */ - CIMPP::Float va; /* Maximum gate opening velocity (<i>Va</i>). Unit = PU / s. Typical value = 0,06. Default: 0.0 */ - CIMPP::PU valvmax; /* Maximum gate opening (<i>ValvMax</i>) (&gt; GovHydroPelton.valvmin). Typical value = 1,1. Default: nullptr */ - CIMPP::PU valvmin; /* Minimum gate opening (<i>ValvMin</i>) (&lt; GovHydroPelton.valvmax). Typical value = 0. Default: nullptr */ - CIMPP::PU vav; /* Maximum servomotor valve opening velocity (<i>Vav</i>). Typical value = 0,1. Default: nullptr */ - CIMPP::Float vc; /* Maximum gate closing velocity (<i>Vc</i>). Unit = PU / s. Typical value = -0,06. Default: 0.0 */ - CIMPP::PU vcv; /* Maximum servomotor valve closing velocity (<i>Vcv</i>). Typical value = -0,1. Default: nullptr */ - CIMPP::Boolean waterTunnelSurgeChamberSimulation; /* Water tunnel and surge chamber simulation (<i>Tflag</i>). true = enable of water tunnel and surge chamber simulation false = inhibit of water tunnel and surge chamber simulation. Typical value = false. Default: false */ - CIMPP::Length zsfc; /* Head of upper water level with respect to the level of penstock (<i>Zsfc</i>). Unit = km. Typical value = 0,025. Default: nullptr */ + /** \brief Area of the surge tank (<i>A</i><i><sub>V0</sub></i>). Unit = m<sup>2</sup>. Typical value = 30. Default: nullptr */ + CIMPP::Area av0; + + /** \brief Area of the compensation tank (<i>A</i><i><sub>V1</sub></i>). Unit = m<sup>2</sup>. Typical value = 700. Default: nullptr */ + CIMPP::Area av1; + + /** \brief Droop (<i>bp</i>). Typical value = 0,05. Default: nullptr */ + CIMPP::PU bp; + + /** \brief Intentional dead-band width (<i>DB1</i>). Unit = Hz. Typical value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Intentional dead-band width of valve opening error (<i>DB2</i>). Unit = Hz. Typical value = 0,01. Default: nullptr */ + CIMPP::Frequency db2; + + /** \brief Head of compensation chamber water level with respect to the level of penstock (<i>H</i><i><sub>1</sub></i>). Unit = km. Typical value = 0,004. Default: nullptr */ + CIMPP::Length h1; + + /** \brief Head of surge tank water level with respect to the level of penstock (<i>H</i><i><sub>2</sub></i>). Unit = km. Typical value = 0,040. Default: nullptr */ + CIMPP::Length h2; + + /** \brief Rated hydraulic head (<i>H</i><i><sub>n</sub></i>). Unit = km. Typical value = 0,250. Default: nullptr */ + CIMPP::Length hn; + + /** \brief Penstock loss coefficient (due to friction) (<i>Kc</i>). Typical value = 0,025. Default: nullptr */ + CIMPP::PU kc; + + /** \brief Water tunnel and surge chamber loss coefficient (due to friction) (<i>Kg</i>). Typical value = 0,025. Default: nullptr */ + CIMPP::PU kg; + + /** \brief No-load turbine flow at nominal head (<i>Qc0</i>). Typical value = 0,05. Default: nullptr */ + CIMPP::PU qc0; + + /** \brief Rated flow (<i>Q</i><i><sub>n</sub></i>). Unit = m<sup>3</sup>/s. Typical value = 250. Default: nullptr */ + CIMPP::VolumeFlowRate qn; + + /** \brief Simplified Pelton model simulation (<i>Sflag</i>). true = enable of simplified Pelton model simulation false = enable of complete Pelton model simulation (non-linear gain). Typical value = true. Default: false */ + CIMPP::Boolean simplifiedPelton; + + /** \brief Static compensating characteristic (<i>Cflag</i>). It should be true if simplifiedPelton = false. true = enable of static compensating characteristic false = inhibit of static compensating characteristic. Typical value = false. Default: false */ + CIMPP::Boolean staticCompensating; + + /** \brief Derivative gain (accelerometer time constant) (<i>Ta</i>) (&gt;= 0). Typical value = 3. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Gate servo time constant (<i>Ts</i>) (&gt;= 0). Typical value = 0,15. Default: nullptr */ + CIMPP::Seconds ts; + + /** \brief Servomotor integrator time constant (<i>Tv</i>) (&gt;= 0). Typical value = 0,3. Default: nullptr */ + CIMPP::Seconds tv; + + /** \brief Water inertia time constant (<i>Twnc</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds twnc; + + /** \brief Water tunnel and surge chamber inertia time constant (<i>Twng</i>) (&gt;= 0). Typical value = 3. Default: nullptr */ + CIMPP::Seconds twng; + + /** \brief Electronic integrator time constant (<i>Tx</i>) (&gt;= 0). Typical value = 0,5. Default: nullptr */ + CIMPP::Seconds tx; + + /** \brief Maximum gate opening velocity (<i>Va</i>). Unit = PU / s. Typical value = 0,06. Default: 0.0 */ + CIMPP::Float va; + + /** \brief Maximum gate opening (<i>ValvMax</i>) (&gt; GovHydroPelton.valvmin). Typical value = 1,1. Default: nullptr */ + CIMPP::PU valvmax; + + /** \brief Minimum gate opening (<i>ValvMin</i>) (&lt; GovHydroPelton.valvmax). Typical value = 0. Default: nullptr */ + CIMPP::PU valvmin; + + /** \brief Maximum servomotor valve opening velocity (<i>Vav</i>). Typical value = 0,1. Default: nullptr */ + CIMPP::PU vav; + + /** \brief Maximum gate closing velocity (<i>Vc</i>). Unit = PU / s. Typical value = -0,06. Default: 0.0 */ + CIMPP::Float vc; + + /** \brief Maximum servomotor valve closing velocity (<i>Vcv</i>). Typical value = -0,1. Default: nullptr */ + CIMPP::PU vcv; + + /** \brief Water tunnel and surge chamber simulation (<i>Tflag</i>). true = enable of water tunnel and surge chamber simulation false = inhibit of water tunnel and surge chamber simulation. Typical value = false. Default: false */ + CIMPP::Boolean waterTunnelSurgeChamberSimulation; + + /** \brief Head of upper water level with respect to the level of penstock (<i>Zsfc</i>). Unit = km. Typical value = 0,025. Default: nullptr */ + CIMPP::Length zsfc; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GovHydroR.cpp b/CGMES_3.0.0/GovHydroR.cpp index 49e8d0ad2..b98e8cfc6 100644 --- a/CGMES_3.0.0/GovHydroR.cpp +++ b/CGMES_3.0.0/GovHydroR.cpp @@ -8,53 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "Frequency.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "Frequency.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Float.hpp" -#include "Float.hpp" using namespace CIMPP; -GovHydroR::GovHydroR() {}; -GovHydroR::~GovHydroR() {}; +GovHydroR::GovHydroR() {} +GovHydroR::~GovHydroR() {} static const std::list PossibleProfilesForClass = { @@ -122,558 +80,598 @@ GovHydroR::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroR_at(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_at(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->at; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_dturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_dturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_eps(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eps; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_gmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_gmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_gmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_gmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_gv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_h0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_h0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->h0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_inputSignal(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_inputSignal(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_pgv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_qnl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_qnl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qnl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_t7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_t8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_t8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_tt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_velcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_velcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velcl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroR_velop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroR_velop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroR_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->at; if (!buffer.str().empty()) @@ -687,7 +685,8 @@ bool get_GovHydroR_at(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -701,7 +700,8 @@ bool get_GovHydroR_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -715,7 +715,8 @@ bool get_GovHydroR_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dturb; if (!buffer.str().empty()) @@ -729,7 +730,8 @@ bool get_GovHydroR_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroR_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eps; if (!buffer.str().empty()) @@ -743,7 +745,8 @@ bool get_GovHydroR_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmax; if (!buffer.str().empty()) @@ -757,7 +760,8 @@ bool get_GovHydroR_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmin; if (!buffer.str().empty()) @@ -771,7 +775,8 @@ bool get_GovHydroR_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -785,7 +790,8 @@ bool get_GovHydroR_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -799,7 +805,8 @@ bool get_GovHydroR_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -813,7 +820,8 @@ bool get_GovHydroR_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -827,7 +835,8 @@ bool get_GovHydroR_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -841,7 +850,8 @@ bool get_GovHydroR_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv6; if (!buffer.str().empty()) @@ -855,7 +865,8 @@ bool get_GovHydroR_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_h0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->h0; if (!buffer.str().empty()) @@ -869,7 +880,8 @@ bool get_GovHydroR_h0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_inputSignal(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inputSignal; if (!buffer.str().empty()) @@ -883,7 +895,8 @@ bool get_GovHydroR_inputSignal(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_GovHydroR_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -897,7 +910,8 @@ bool get_GovHydroR_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -911,7 +925,8 @@ bool get_GovHydroR_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -925,7 +940,8 @@ bool get_GovHydroR_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroR_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -939,7 +955,8 @@ bool get_GovHydroR_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -953,7 +970,8 @@ bool get_GovHydroR_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -967,7 +985,8 @@ bool get_GovHydroR_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -981,7 +1000,8 @@ bool get_GovHydroR_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -995,7 +1015,8 @@ bool get_GovHydroR_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv6; if (!buffer.str().empty()) @@ -1009,7 +1030,8 @@ bool get_GovHydroR_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -1023,7 +1045,8 @@ bool get_GovHydroR_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -1037,7 +1060,8 @@ bool get_GovHydroR_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroR_qnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qnl; if (!buffer.str().empty()) @@ -1051,7 +1075,8 @@ bool get_GovHydroR_qnl(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovHydroR_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -1065,7 +1090,8 @@ bool get_GovHydroR_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovHydroR_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -1079,7 +1105,8 @@ bool get_GovHydroR_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -1093,7 +1120,8 @@ bool get_GovHydroR_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -1107,7 +1135,8 @@ bool get_GovHydroR_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -1121,7 +1150,8 @@ bool get_GovHydroR_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -1135,7 +1165,8 @@ bool get_GovHydroR_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -1149,7 +1180,8 @@ bool get_GovHydroR_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t7; if (!buffer.str().empty()) @@ -1163,7 +1195,8 @@ bool get_GovHydroR_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t8; if (!buffer.str().empty()) @@ -1177,7 +1210,8 @@ bool get_GovHydroR_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -1191,7 +1225,8 @@ bool get_GovHydroR_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -1205,7 +1240,8 @@ bool get_GovHydroR_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tt; if (!buffer.str().empty()) @@ -1219,7 +1255,8 @@ bool get_GovHydroR_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -1233,7 +1270,8 @@ bool get_GovHydroR_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovHydroR_velcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velcl; if (!buffer.str().empty()) @@ -1247,7 +1285,8 @@ bool get_GovHydroR_velcl(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroR_velop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroR* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroR* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velop; if (!buffer.str().empty()) @@ -1259,8 +1298,6 @@ bool get_GovHydroR_velop(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } - - const char GovHydroR::debugName[] = "GovHydroR"; const char* GovHydroR::debugString() const { @@ -1269,53 +1306,53 @@ const char* GovHydroR::debugString() const void GovHydroR::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroR"), &GovHydroR_factory)); + factory_map.emplace("cim:GovHydroR", &GovHydroR_factory); } void GovHydroR::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.at"), &assign_GovHydroR_at)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.db1"), &assign_GovHydroR_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.db2"), &assign_GovHydroR_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.dturb"), &assign_GovHydroR_dturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.eps"), &assign_GovHydroR_eps)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.gmax"), &assign_GovHydroR_gmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.gmin"), &assign_GovHydroR_gmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.gv1"), &assign_GovHydroR_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.gv2"), &assign_GovHydroR_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.gv3"), &assign_GovHydroR_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.gv4"), &assign_GovHydroR_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.gv5"), &assign_GovHydroR_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.gv6"), &assign_GovHydroR_gv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.h0"), &assign_GovHydroR_h0)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.inputSignal"), &assign_GovHydroR_inputSignal)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.kg"), &assign_GovHydroR_kg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.ki"), &assign_GovHydroR_ki)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.mwbase"), &assign_GovHydroR_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.pgv1"), &assign_GovHydroR_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.pgv2"), &assign_GovHydroR_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.pgv3"), &assign_GovHydroR_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.pgv4"), &assign_GovHydroR_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.pgv5"), &assign_GovHydroR_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.pgv6"), &assign_GovHydroR_pgv6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.pmax"), &assign_GovHydroR_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.pmin"), &assign_GovHydroR_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.qnl"), &assign_GovHydroR_qnl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.r"), &assign_GovHydroR_r)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.t1"), &assign_GovHydroR_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.t2"), &assign_GovHydroR_t2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.t3"), &assign_GovHydroR_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.t4"), &assign_GovHydroR_t4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.t5"), &assign_GovHydroR_t5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.t6"), &assign_GovHydroR_t6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.t7"), &assign_GovHydroR_t7)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.t8"), &assign_GovHydroR_t8)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.td"), &assign_GovHydroR_td)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.tp"), &assign_GovHydroR_tp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.tt"), &assign_GovHydroR_tt)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.tw"), &assign_GovHydroR_tw)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.velcl"), &assign_GovHydroR_velcl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroR.velop"), &assign_GovHydroR_velop)); + assign_map.emplace("cim:GovHydroR.at", &assign_GovHydroR_at); + assign_map.emplace("cim:GovHydroR.db1", &assign_GovHydroR_db1); + assign_map.emplace("cim:GovHydroR.db2", &assign_GovHydroR_db2); + assign_map.emplace("cim:GovHydroR.dturb", &assign_GovHydroR_dturb); + assign_map.emplace("cim:GovHydroR.eps", &assign_GovHydroR_eps); + assign_map.emplace("cim:GovHydroR.gmax", &assign_GovHydroR_gmax); + assign_map.emplace("cim:GovHydroR.gmin", &assign_GovHydroR_gmin); + assign_map.emplace("cim:GovHydroR.gv1", &assign_GovHydroR_gv1); + assign_map.emplace("cim:GovHydroR.gv2", &assign_GovHydroR_gv2); + assign_map.emplace("cim:GovHydroR.gv3", &assign_GovHydroR_gv3); + assign_map.emplace("cim:GovHydroR.gv4", &assign_GovHydroR_gv4); + assign_map.emplace("cim:GovHydroR.gv5", &assign_GovHydroR_gv5); + assign_map.emplace("cim:GovHydroR.gv6", &assign_GovHydroR_gv6); + assign_map.emplace("cim:GovHydroR.h0", &assign_GovHydroR_h0); + assign_map.emplace("cim:GovHydroR.inputSignal", &assign_GovHydroR_inputSignal); + assign_map.emplace("cim:GovHydroR.kg", &assign_GovHydroR_kg); + assign_map.emplace("cim:GovHydroR.ki", &assign_GovHydroR_ki); + assign_map.emplace("cim:GovHydroR.mwbase", &assign_GovHydroR_mwbase); + assign_map.emplace("cim:GovHydroR.pgv1", &assign_GovHydroR_pgv1); + assign_map.emplace("cim:GovHydroR.pgv2", &assign_GovHydroR_pgv2); + assign_map.emplace("cim:GovHydroR.pgv3", &assign_GovHydroR_pgv3); + assign_map.emplace("cim:GovHydroR.pgv4", &assign_GovHydroR_pgv4); + assign_map.emplace("cim:GovHydroR.pgv5", &assign_GovHydroR_pgv5); + assign_map.emplace("cim:GovHydroR.pgv6", &assign_GovHydroR_pgv6); + assign_map.emplace("cim:GovHydroR.pmax", &assign_GovHydroR_pmax); + assign_map.emplace("cim:GovHydroR.pmin", &assign_GovHydroR_pmin); + assign_map.emplace("cim:GovHydroR.qnl", &assign_GovHydroR_qnl); + assign_map.emplace("cim:GovHydroR.r", &assign_GovHydroR_r); + assign_map.emplace("cim:GovHydroR.t1", &assign_GovHydroR_t1); + assign_map.emplace("cim:GovHydroR.t2", &assign_GovHydroR_t2); + assign_map.emplace("cim:GovHydroR.t3", &assign_GovHydroR_t3); + assign_map.emplace("cim:GovHydroR.t4", &assign_GovHydroR_t4); + assign_map.emplace("cim:GovHydroR.t5", &assign_GovHydroR_t5); + assign_map.emplace("cim:GovHydroR.t6", &assign_GovHydroR_t6); + assign_map.emplace("cim:GovHydroR.t7", &assign_GovHydroR_t7); + assign_map.emplace("cim:GovHydroR.t8", &assign_GovHydroR_t8); + assign_map.emplace("cim:GovHydroR.td", &assign_GovHydroR_td); + assign_map.emplace("cim:GovHydroR.tp", &assign_GovHydroR_tp); + assign_map.emplace("cim:GovHydroR.tt", &assign_GovHydroR_tt); + assign_map.emplace("cim:GovHydroR.tw", &assign_GovHydroR_tw); + assign_map.emplace("cim:GovHydroR.velcl", &assign_GovHydroR_velcl); + assign_map.emplace("cim:GovHydroR.velop", &assign_GovHydroR_velop); } void GovHydroR::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/GovHydroR.hpp b/CGMES_3.0.0/GovHydroR.hpp index 663a98c03..3ea0ef036 100644 --- a/CGMES_3.0.0/GovHydroR.hpp +++ b/CGMES_3.0.0/GovHydroR.hpp @@ -22,9 +22,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Fourth order lead-lag governor and hydro turbine. - */ + /** \brief Fourth order lead-lag governor and hydro turbine. */ class GovHydroR : public TurbineGovernorDynamics { public: @@ -32,48 +30,131 @@ namespace CIMPP GovHydroR(); ~GovHydroR() override; - CIMPP::PU at; /* Turbine gain (<i>At</i>). Typical value = 1,2. Default: nullptr */ - CIMPP::Frequency db1; /* Intentional dead-band width (<i>db1</i>). Unit = Hz. Typical value = 0. Default: nullptr */ - CIMPP::ActivePower db2; /* Unintentional dead-band (<i>db2</i>). Unit = MW. Typical value = 0. Default: nullptr */ - CIMPP::PU dturb; /* Turbine damping factor (<i>Dturb</i>). Typical value = 0,2. Default: nullptr */ - CIMPP::Frequency eps; /* Intentional db hysteresis (<i>eps</i>). Unit = Hz. Typical value = 0. Default: nullptr */ - CIMPP::PU gmax; /* Maximum governor output (<i>Gmax</i>) (&gt; GovHydroR.gmin). Typical value = 1,05. Default: nullptr */ - CIMPP::PU gmin; /* Minimum governor output (<i>Gmin</i>) (&lt; GovHydroR.gmax). Typical value = -0,05. Default: nullptr */ - CIMPP::PU gv1; /* Nonlinear gain point 1, PU gv (<i>Gv1</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain point 2, PU gv (<i>Gv2</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain point 3, PU gv (<i>Gv3</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain point 4, PU gv (<i>Gv4</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain point 5, PU gv (<i>Gv5</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv6; /* Nonlinear gain point 6, PU gv (<i>Gv6</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU h0; /* Turbine nominal head (<i>H0</i>). Typical value = 1. Default: nullptr */ - CIMPP::Boolean inputSignal; /* Input signal switch (<i>Flag</i>). true = <i>Pe</i> input is used false = feedback is received from <i>CV</i>. <i>Flag</i> is normally dependent on <i>Tt</i>. If <i>Tt </i>is zero, <i>Flag</i> is set to false. If <i>Tt</i> is not zero, <i>Flag</i> is set to true. Typical value = true. Default: false */ - CIMPP::PU kg; /* Gate servo gain (<i>Kg</i>). Typical value = 2. Default: nullptr */ - CIMPP::PU ki; /* Integral gain (<i>Ki</i>). Typical value = 0,5. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain point 1, PU power (<i>Pgv1</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain point 2, PU power (<i>Pgv2</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain point 3, PU power (<i>Pgv3</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain point 4, PU power (<i>Pgv4</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain point 5, PU power (<i>Pgv5</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv6; /* Nonlinear gain point 6, PU power (<i>Pgv6</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pmax; /* Maximum gate opening, PU of <i>MWbase</i> (<i>Pmax</i>) (&gt; GovHydroR.pmin). Typical value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum gate opening, PU of <i>MWbase</i> (<i>Pmin</i>) (&lt; GovHydroR.pmax). Typical value = 0. Default: nullptr */ - CIMPP::PU qnl; /* No-load turbine flow at nominal head (<i>Qnl</i>). Typical value = 0,08. Default: nullptr */ - CIMPP::PU r; /* Steady-state droop (<i>R</i>). Typical value = 0,05. Default: nullptr */ - CIMPP::Seconds t1; /* Lead time constant 1 (<i>T1</i>) (&gt;= 0). Typical value = 1,5. Default: nullptr */ - CIMPP::Seconds t2; /* Lag time constant 1 (<i>T2</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds t3; /* Lead time constant 2 (<i>T3</i>) (&gt;= 0). Typical value = 1,5. Default: nullptr */ - CIMPP::Seconds t4; /* Lag time constant 2 (<i>T4</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds t5; /* Lead time constant 3 (<i>T5</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds t6; /* Lag time constant 3 (<i>T6</i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ - CIMPP::Seconds t7; /* Lead time constant 4 (<i>T7</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds t8; /* Lag time constant 4 (<i>T8</i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ - CIMPP::Seconds td; /* Input filter time constant (<i>Td</i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ - CIMPP::Seconds tp; /* Gate servo time constant (<i>Tp</i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ - CIMPP::Seconds tt; /* Power feedback time constant (<i>Tt</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tw; /* Water inertia time constant (<i>Tw</i>) (&gt; 0). Typical value = 1. Default: nullptr */ - CIMPP::Float velcl; /* Maximum gate closing velocity (<i>Velcl</i>). Unit = PU / s. Typical value = -0,2. Default: 0.0 */ - CIMPP::Float velop; /* Maximum gate opening velocity (<i>Velop</i>). Unit = PU / s. Typical value = 0,2. Default: 0.0 */ + /** \brief Turbine gain (<i>At</i>). Typical value = 1,2. Default: nullptr */ + CIMPP::PU at; + + /** \brief Intentional dead-band width (<i>db1</i>). Unit = Hz. Typical value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Unintentional dead-band (<i>db2</i>). Unit = MW. Typical value = 0. Default: nullptr */ + CIMPP::ActivePower db2; + + /** \brief Turbine damping factor (<i>Dturb</i>). Typical value = 0,2. Default: nullptr */ + CIMPP::PU dturb; + + /** \brief Intentional db hysteresis (<i>eps</i>). Unit = Hz. Typical value = 0. Default: nullptr */ + CIMPP::Frequency eps; + + /** \brief Maximum governor output (<i>Gmax</i>) (&gt; GovHydroR.gmin). Typical value = 1,05. Default: nullptr */ + CIMPP::PU gmax; + + /** \brief Minimum governor output (<i>Gmin</i>) (&lt; GovHydroR.gmax). Typical value = -0,05. Default: nullptr */ + CIMPP::PU gmin; + + /** \brief Nonlinear gain point 1, PU gv (<i>Gv1</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain point 2, PU gv (<i>Gv2</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain point 3, PU gv (<i>Gv3</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain point 4, PU gv (<i>Gv4</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain point 5, PU gv (<i>Gv5</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Nonlinear gain point 6, PU gv (<i>Gv6</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv6; + + /** \brief Turbine nominal head (<i>H0</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU h0; + + /** \brief Input signal switch (<i>Flag</i>). true = <i>Pe</i> input is used false = feedback is received from <i>CV</i>. <i>Flag</i> is normally dependent on <i>Tt</i>. If <i>Tt </i>is zero, <i>Flag</i> is set to false. If <i>Tt</i> is not zero, <i>Flag</i> is set to true. Typical value = true. Default: false */ + CIMPP::Boolean inputSignal; + + /** \brief Gate servo gain (<i>Kg</i>). Typical value = 2. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Integral gain (<i>Ki</i>). Typical value = 0,5. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain point 1, PU power (<i>Pgv1</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain point 2, PU power (<i>Pgv2</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain point 3, PU power (<i>Pgv3</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain point 4, PU power (<i>Pgv4</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain point 5, PU power (<i>Pgv5</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief Nonlinear gain point 6, PU power (<i>Pgv6</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv6; + + /** \brief Maximum gate opening, PU of <i>MWbase</i> (<i>Pmax</i>) (&gt; GovHydroR.pmin). Typical value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum gate opening, PU of <i>MWbase</i> (<i>Pmin</i>) (&lt; GovHydroR.pmax). Typical value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief No-load turbine flow at nominal head (<i>Qnl</i>). Typical value = 0,08. Default: nullptr */ + CIMPP::PU qnl; + + /** \brief Steady-state droop (<i>R</i>). Typical value = 0,05. Default: nullptr */ + CIMPP::PU r; + + /** \brief Lead time constant 1 (<i>T1</i>) (&gt;= 0). Typical value = 1,5. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Lag time constant 1 (<i>T2</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Lead time constant 2 (<i>T3</i>) (&gt;= 0). Typical value = 1,5. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Lag time constant 2 (<i>T4</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Lead time constant 3 (<i>T5</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Lag time constant 3 (<i>T6</i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Lead time constant 4 (<i>T7</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds t7; + + /** \brief Lag time constant 4 (<i>T8</i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ + CIMPP::Seconds t8; + + /** \brief Input filter time constant (<i>Td</i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Gate servo time constant (<i>Tp</i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Power feedback time constant (<i>Tt</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tt; + + /** \brief Water inertia time constant (<i>Tw</i>) (&gt; 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tw; + + /** \brief Maximum gate closing velocity (<i>Velcl</i>). Unit = PU / s. Typical value = -0,2. Default: 0.0 */ + CIMPP::Float velcl; + + /** \brief Maximum gate opening velocity (<i>Velop</i>). Unit = PU / s. Typical value = 0,2. Default: 0.0 */ + CIMPP::Float velop; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GovHydroWEH.cpp b/CGMES_3.0.0/GovHydroWEH.cpp index e6063a35a..a59096688 100644 --- a/CGMES_3.0.0/GovHydroWEH.cpp +++ b/CGMES_3.0.0/GovHydroWEH.cpp @@ -8,62 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -GovHydroWEH::GovHydroWEH() {}; -GovHydroWEH::~GovHydroWEH() {}; +GovHydroWEH::GovHydroWEH() {} +GovHydroWEH::~GovHydroWEH() {} static const std::list PossibleProfilesForClass = { @@ -140,675 +89,724 @@ GovHydroWEH::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroWEH_db(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_db(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_dicn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_dicn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dicn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_dpv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_dpv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dpv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_dturb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_dturb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dturb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_feedbackSignal(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_feedbackSignal(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->feedbackSignal; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fl1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fl1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fl2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fl2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fl3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fl3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fl3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fl4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fl4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fl4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fl5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fl5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fl5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_fp9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_fp9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fp9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_gmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_gmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_gmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_gmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_gtmxcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_gtmxcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gtmxcl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_gtmxop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_gtmxop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gtmxop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_pmss9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_pmss9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmss9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_rpg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_rpg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rpg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_rpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_rpp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rpp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_tdv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_tdv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_tpe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_tpe(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpe; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWEH_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWEH_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroWEH_db(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db; if (!buffer.str().empty()) @@ -822,7 +820,8 @@ bool get_GovHydroWEH_db(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroWEH_dicn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dicn; if (!buffer.str().empty()) @@ -836,7 +835,8 @@ bool get_GovHydroWEH_dicn(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroWEH_dpv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dpv; if (!buffer.str().empty()) @@ -850,7 +850,8 @@ bool get_GovHydroWEH_dpv(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dturb; if (!buffer.str().empty()) @@ -864,7 +865,8 @@ bool get_GovHydroWEH_dturb(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_feedbackSignal(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->feedbackSignal; if (!buffer.str().empty()) @@ -878,7 +880,8 @@ bool get_GovHydroWEH_feedbackSignal(const BaseClass* BaseClass_ptr1, std::string bool get_GovHydroWEH_fl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fl1; if (!buffer.str().empty()) @@ -892,7 +895,8 @@ bool get_GovHydroWEH_fl1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fl2; if (!buffer.str().empty()) @@ -906,7 +910,8 @@ bool get_GovHydroWEH_fl2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fl3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fl3; if (!buffer.str().empty()) @@ -920,7 +925,8 @@ bool get_GovHydroWEH_fl3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fl4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fl4; if (!buffer.str().empty()) @@ -934,7 +940,8 @@ bool get_GovHydroWEH_fl4(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fl5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fl5; if (!buffer.str().empty()) @@ -948,7 +955,8 @@ bool get_GovHydroWEH_fl5(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fp1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp1; if (!buffer.str().empty()) @@ -962,7 +970,8 @@ bool get_GovHydroWEH_fp1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fp10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp10; if (!buffer.str().empty()) @@ -976,7 +985,8 @@ bool get_GovHydroWEH_fp10(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroWEH_fp2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp2; if (!buffer.str().empty()) @@ -990,7 +1000,8 @@ bool get_GovHydroWEH_fp2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fp3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp3; if (!buffer.str().empty()) @@ -1004,7 +1015,8 @@ bool get_GovHydroWEH_fp3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fp4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp4; if (!buffer.str().empty()) @@ -1018,7 +1030,8 @@ bool get_GovHydroWEH_fp4(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fp5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp5; if (!buffer.str().empty()) @@ -1032,7 +1045,8 @@ bool get_GovHydroWEH_fp5(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fp6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp6; if (!buffer.str().empty()) @@ -1046,7 +1060,8 @@ bool get_GovHydroWEH_fp6(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fp7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp7; if (!buffer.str().empty()) @@ -1060,7 +1075,8 @@ bool get_GovHydroWEH_fp7(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fp8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp8; if (!buffer.str().empty()) @@ -1074,7 +1090,8 @@ bool get_GovHydroWEH_fp8(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_fp9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fp9; if (!buffer.str().empty()) @@ -1088,7 +1105,8 @@ bool get_GovHydroWEH_fp9(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmax; if (!buffer.str().empty()) @@ -1102,7 +1120,8 @@ bool get_GovHydroWEH_gmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroWEH_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gmin; if (!buffer.str().empty()) @@ -1116,7 +1135,8 @@ bool get_GovHydroWEH_gmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroWEH_gtmxcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gtmxcl; if (!buffer.str().empty()) @@ -1130,7 +1150,8 @@ bool get_GovHydroWEH_gtmxcl(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroWEH_gtmxop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gtmxop; if (!buffer.str().empty()) @@ -1144,7 +1165,8 @@ bool get_GovHydroWEH_gtmxop(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroWEH_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -1158,7 +1180,8 @@ bool get_GovHydroWEH_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -1172,7 +1195,8 @@ bool get_GovHydroWEH_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -1186,7 +1210,8 @@ bool get_GovHydroWEH_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -1200,7 +1225,8 @@ bool get_GovHydroWEH_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -1214,7 +1240,8 @@ bool get_GovHydroWEH_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -1228,7 +1255,8 @@ bool get_GovHydroWEH_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroWEH_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -1242,7 +1270,8 @@ bool get_GovHydroWEH_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroWEH_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -1256,7 +1285,8 @@ bool get_GovHydroWEH_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroWEH_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -1270,7 +1300,8 @@ bool get_GovHydroWEH_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroWEH_pmss1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss1; if (!buffer.str().empty()) @@ -1284,7 +1315,8 @@ bool get_GovHydroWEH_pmss1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_pmss10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss10; if (!buffer.str().empty()) @@ -1298,7 +1330,8 @@ bool get_GovHydroWEH_pmss10(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroWEH_pmss2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss2; if (!buffer.str().empty()) @@ -1312,7 +1345,8 @@ bool get_GovHydroWEH_pmss2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_pmss3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss3; if (!buffer.str().empty()) @@ -1326,7 +1360,8 @@ bool get_GovHydroWEH_pmss3(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_pmss4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss4; if (!buffer.str().empty()) @@ -1340,7 +1375,8 @@ bool get_GovHydroWEH_pmss4(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_pmss5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss5; if (!buffer.str().empty()) @@ -1354,7 +1390,8 @@ bool get_GovHydroWEH_pmss5(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_pmss6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss6; if (!buffer.str().empty()) @@ -1368,7 +1405,8 @@ bool get_GovHydroWEH_pmss6(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_pmss7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss7; if (!buffer.str().empty()) @@ -1382,7 +1420,8 @@ bool get_GovHydroWEH_pmss7(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_pmss8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss8; if (!buffer.str().empty()) @@ -1396,7 +1435,8 @@ bool get_GovHydroWEH_pmss8(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_pmss9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmss9; if (!buffer.str().empty()) @@ -1410,7 +1450,8 @@ bool get_GovHydroWEH_pmss9(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWEH_rpg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rpg; if (!buffer.str().empty()) @@ -1424,7 +1465,8 @@ bool get_GovHydroWEH_rpg(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_rpp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rpp; if (!buffer.str().empty()) @@ -1438,7 +1480,8 @@ bool get_GovHydroWEH_rpp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -1452,7 +1495,8 @@ bool get_GovHydroWEH_td(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroWEH_tdv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdv; if (!buffer.str().empty()) @@ -1466,7 +1510,8 @@ bool get_GovHydroWEH_tdv(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -1480,7 +1525,8 @@ bool get_GovHydroWEH_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroWEH_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -1494,7 +1540,8 @@ bool get_GovHydroWEH_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroWEH_tpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpe; if (!buffer.str().empty()) @@ -1508,7 +1555,8 @@ bool get_GovHydroWEH_tpe(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWEH_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWEH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -1520,8 +1568,6 @@ bool get_GovHydroWEH_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char GovHydroWEH::debugName[] = "GovHydroWEH"; const char* GovHydroWEH::debugString() const { @@ -1530,62 +1576,62 @@ const char* GovHydroWEH::debugString() const void GovHydroWEH::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroWEH"), &GovHydroWEH_factory)); + factory_map.emplace("cim:GovHydroWEH", &GovHydroWEH_factory); } void GovHydroWEH::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.db"), &assign_GovHydroWEH_db)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.dicn"), &assign_GovHydroWEH_dicn)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.dpv"), &assign_GovHydroWEH_dpv)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.dturb"), &assign_GovHydroWEH_dturb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.feedbackSignal"), &assign_GovHydroWEH_feedbackSignal)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fl1"), &assign_GovHydroWEH_fl1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fl2"), &assign_GovHydroWEH_fl2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fl3"), &assign_GovHydroWEH_fl3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fl4"), &assign_GovHydroWEH_fl4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fl5"), &assign_GovHydroWEH_fl5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp1"), &assign_GovHydroWEH_fp1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp10"), &assign_GovHydroWEH_fp10)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp2"), &assign_GovHydroWEH_fp2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp3"), &assign_GovHydroWEH_fp3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp4"), &assign_GovHydroWEH_fp4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp5"), &assign_GovHydroWEH_fp5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp6"), &assign_GovHydroWEH_fp6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp7"), &assign_GovHydroWEH_fp7)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp8"), &assign_GovHydroWEH_fp8)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.fp9"), &assign_GovHydroWEH_fp9)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.gmax"), &assign_GovHydroWEH_gmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.gmin"), &assign_GovHydroWEH_gmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.gtmxcl"), &assign_GovHydroWEH_gtmxcl)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.gtmxop"), &assign_GovHydroWEH_gtmxop)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.gv1"), &assign_GovHydroWEH_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.gv2"), &assign_GovHydroWEH_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.gv3"), &assign_GovHydroWEH_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.gv4"), &assign_GovHydroWEH_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.gv5"), &assign_GovHydroWEH_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.kd"), &assign_GovHydroWEH_kd)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.ki"), &assign_GovHydroWEH_ki)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.kp"), &assign_GovHydroWEH_kp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.mwbase"), &assign_GovHydroWEH_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss1"), &assign_GovHydroWEH_pmss1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss10"), &assign_GovHydroWEH_pmss10)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss2"), &assign_GovHydroWEH_pmss2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss3"), &assign_GovHydroWEH_pmss3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss4"), &assign_GovHydroWEH_pmss4)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss5"), &assign_GovHydroWEH_pmss5)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss6"), &assign_GovHydroWEH_pmss6)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss7"), &assign_GovHydroWEH_pmss7)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss8"), &assign_GovHydroWEH_pmss8)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.pmss9"), &assign_GovHydroWEH_pmss9)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.rpg"), &assign_GovHydroWEH_rpg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.rpp"), &assign_GovHydroWEH_rpp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.td"), &assign_GovHydroWEH_td)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.tdv"), &assign_GovHydroWEH_tdv)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.tg"), &assign_GovHydroWEH_tg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.tp"), &assign_GovHydroWEH_tp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.tpe"), &assign_GovHydroWEH_tpe)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWEH.tw"), &assign_GovHydroWEH_tw)); + assign_map.emplace("cim:GovHydroWEH.db", &assign_GovHydroWEH_db); + assign_map.emplace("cim:GovHydroWEH.dicn", &assign_GovHydroWEH_dicn); + assign_map.emplace("cim:GovHydroWEH.dpv", &assign_GovHydroWEH_dpv); + assign_map.emplace("cim:GovHydroWEH.dturb", &assign_GovHydroWEH_dturb); + assign_map.emplace("cim:GovHydroWEH.feedbackSignal", &assign_GovHydroWEH_feedbackSignal); + assign_map.emplace("cim:GovHydroWEH.fl1", &assign_GovHydroWEH_fl1); + assign_map.emplace("cim:GovHydroWEH.fl2", &assign_GovHydroWEH_fl2); + assign_map.emplace("cim:GovHydroWEH.fl3", &assign_GovHydroWEH_fl3); + assign_map.emplace("cim:GovHydroWEH.fl4", &assign_GovHydroWEH_fl4); + assign_map.emplace("cim:GovHydroWEH.fl5", &assign_GovHydroWEH_fl5); + assign_map.emplace("cim:GovHydroWEH.fp1", &assign_GovHydroWEH_fp1); + assign_map.emplace("cim:GovHydroWEH.fp10", &assign_GovHydroWEH_fp10); + assign_map.emplace("cim:GovHydroWEH.fp2", &assign_GovHydroWEH_fp2); + assign_map.emplace("cim:GovHydroWEH.fp3", &assign_GovHydroWEH_fp3); + assign_map.emplace("cim:GovHydroWEH.fp4", &assign_GovHydroWEH_fp4); + assign_map.emplace("cim:GovHydroWEH.fp5", &assign_GovHydroWEH_fp5); + assign_map.emplace("cim:GovHydroWEH.fp6", &assign_GovHydroWEH_fp6); + assign_map.emplace("cim:GovHydroWEH.fp7", &assign_GovHydroWEH_fp7); + assign_map.emplace("cim:GovHydroWEH.fp8", &assign_GovHydroWEH_fp8); + assign_map.emplace("cim:GovHydroWEH.fp9", &assign_GovHydroWEH_fp9); + assign_map.emplace("cim:GovHydroWEH.gmax", &assign_GovHydroWEH_gmax); + assign_map.emplace("cim:GovHydroWEH.gmin", &assign_GovHydroWEH_gmin); + assign_map.emplace("cim:GovHydroWEH.gtmxcl", &assign_GovHydroWEH_gtmxcl); + assign_map.emplace("cim:GovHydroWEH.gtmxop", &assign_GovHydroWEH_gtmxop); + assign_map.emplace("cim:GovHydroWEH.gv1", &assign_GovHydroWEH_gv1); + assign_map.emplace("cim:GovHydroWEH.gv2", &assign_GovHydroWEH_gv2); + assign_map.emplace("cim:GovHydroWEH.gv3", &assign_GovHydroWEH_gv3); + assign_map.emplace("cim:GovHydroWEH.gv4", &assign_GovHydroWEH_gv4); + assign_map.emplace("cim:GovHydroWEH.gv5", &assign_GovHydroWEH_gv5); + assign_map.emplace("cim:GovHydroWEH.kd", &assign_GovHydroWEH_kd); + assign_map.emplace("cim:GovHydroWEH.ki", &assign_GovHydroWEH_ki); + assign_map.emplace("cim:GovHydroWEH.kp", &assign_GovHydroWEH_kp); + assign_map.emplace("cim:GovHydroWEH.mwbase", &assign_GovHydroWEH_mwbase); + assign_map.emplace("cim:GovHydroWEH.pmss1", &assign_GovHydroWEH_pmss1); + assign_map.emplace("cim:GovHydroWEH.pmss10", &assign_GovHydroWEH_pmss10); + assign_map.emplace("cim:GovHydroWEH.pmss2", &assign_GovHydroWEH_pmss2); + assign_map.emplace("cim:GovHydroWEH.pmss3", &assign_GovHydroWEH_pmss3); + assign_map.emplace("cim:GovHydroWEH.pmss4", &assign_GovHydroWEH_pmss4); + assign_map.emplace("cim:GovHydroWEH.pmss5", &assign_GovHydroWEH_pmss5); + assign_map.emplace("cim:GovHydroWEH.pmss6", &assign_GovHydroWEH_pmss6); + assign_map.emplace("cim:GovHydroWEH.pmss7", &assign_GovHydroWEH_pmss7); + assign_map.emplace("cim:GovHydroWEH.pmss8", &assign_GovHydroWEH_pmss8); + assign_map.emplace("cim:GovHydroWEH.pmss9", &assign_GovHydroWEH_pmss9); + assign_map.emplace("cim:GovHydroWEH.rpg", &assign_GovHydroWEH_rpg); + assign_map.emplace("cim:GovHydroWEH.rpp", &assign_GovHydroWEH_rpp); + assign_map.emplace("cim:GovHydroWEH.td", &assign_GovHydroWEH_td); + assign_map.emplace("cim:GovHydroWEH.tdv", &assign_GovHydroWEH_tdv); + assign_map.emplace("cim:GovHydroWEH.tg", &assign_GovHydroWEH_tg); + assign_map.emplace("cim:GovHydroWEH.tp", &assign_GovHydroWEH_tp); + assign_map.emplace("cim:GovHydroWEH.tpe", &assign_GovHydroWEH_tpe); + assign_map.emplace("cim:GovHydroWEH.tw", &assign_GovHydroWEH_tw); } void GovHydroWEH::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/GovHydroWEH.hpp b/CGMES_3.0.0/GovHydroWEH.hpp index ff2702f51..e28dfe0c0 100644 --- a/CGMES_3.0.0/GovHydroWEH.hpp +++ b/CGMES_3.0.0/GovHydroWEH.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - WoodwardTM electric hydro governor. [Footnote: Woodward electric hydro governors are an example of suitable products available commercially. This information is given for the convenience of users of this document and does not constitute an endorsement by IEC of these products.] - */ + /** \brief WoodwardTM electric hydro governor. [Footnote: Woodward electric hydro governors are an example of suitable products available commercially. This information is given for the convenience of users of this document and does not constitute an endorsement by IEC of these products.] */ class GovHydroWEH : public TurbineGovernorDynamics { public: @@ -31,57 +29,158 @@ namespace CIMPP GovHydroWEH(); ~GovHydroWEH() override; - CIMPP::PU db; /* Speed deadband (<i>db</i>). Default: nullptr */ - CIMPP::PU dicn; /* Value to allow the integral controller to advance beyond the gate limits (<i>Dicn</i>). Default: nullptr */ - CIMPP::PU dpv; /* Value to allow the pilot valve controller to advance beyond the gate limits (<i>Dpv</i>). Default: nullptr */ - CIMPP::PU dturb; /* Turbine damping factor (<i>Dturb</i>). Unit = delta P (PU of <i>MWbase</i>) / delta speed (PU). Default: nullptr */ - CIMPP::Boolean feedbackSignal; /* Feedback signal selection (<i>Sw</i>). true = PID output (if <i>R-Perm-Gate </i>= droop and <i>R-Perm-Pe </i>= 0) false = electrical power (if <i>R-Perm-Gate </i>= 0 and <i>R-Perm-Pe </i>= droop) or false = gate position (if R<i>-Perm-Gate </i>= droop and <i>R-Perm-Pe </i>= 0). Typical value = false. Default: false */ - CIMPP::PU fl1; /* Flowgate 1 (<i>Fl1</i>). Flow value for gate position point 1 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU fl2; /* Flowgate 2 (<i>Fl2</i>). Flow value for gate position point 2 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU fl3; /* Flowgate 3 (<i>Fl3</i>). Flow value for gate position point 3 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU fl4; /* Flowgate 4 (<i>Fl4</i>). Flow value for gate position point 4 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU fl5; /* Flowgate 5 (<i>Fl5</i>). Flow value for gate position point 5 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU fp1; /* Flow P1 (<i>Fp1</i>). Turbine flow value for point 1 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU fp10; /* Flow P10 (<i>Fp10</i>). Turbine flow value for point 10 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU fp2; /* Flow P2 (<i>Fp2</i>). Turbine flow value for point 2 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU fp3; /* Flow P3 (<i>Fp3</i>). Turbine flow value for point 3 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU fp4; /* Flow P4 (<i>Fp4</i>). Turbine flow value for point 4 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU fp5; /* Flow P5 (<i>Fp5</i>). Turbine flow value for point 5 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU fp6; /* Flow P6 (<i>Fp6</i>). Turbine flow value for point 6 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU fp7; /* Flow P7 (<i>Fp7</i>). Turbine flow value for point 7 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU fp8; /* Flow P8 (<i>Fp8</i>). Turbine flow value for point 8 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU fp9; /* Flow P9 (<i>Fp9</i>). Turbine flow value for point 9 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU gmax; /* Maximum gate position (<i>Gmax</i>) (&gt; GovHydroWEH.gmin). Default: nullptr */ - CIMPP::PU gmin; /* Minimum gate position (<i>Gmin</i>) (&lt; GovHydroWEH.gmax). Default: nullptr */ - CIMPP::PU gtmxcl; /* Maximum gate closing rate (<i>Gtmxcl</i>). Default: nullptr */ - CIMPP::PU gtmxop; /* Maximum gate opening rate (<i>Gtmxop</i>). Default: nullptr */ - CIMPP::PU gv1; /* Gate 1 (<i>Gv1</i>). Gate Position value for point 1 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU gv2; /* Gate 2 (<i>Gv2</i>). Gate Position value for point 2 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU gv3; /* Gate 3 (<i>Gv3</i>). Gate Position value for point 3 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU gv4; /* Gate 4 (<i>Gv4</i>). Gate Position value for point 4 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU gv5; /* Gate 5 (<i>Gv5</i>). Gate Position value for point 5 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ - CIMPP::PU kd; /* Derivative controller derivative gain (<i>Kd</i>). Default: nullptr */ - CIMPP::PU ki; /* Derivative controller Integral gain (<i>Ki</i>). Default: nullptr */ - CIMPP::PU kp; /* Derivative control gain (<i>Kp</i>). Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ - CIMPP::PU pmss1; /* Pmss flow P1 (<i>Pmss1</i>). Mechanical power output for turbine flow point 1 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU pmss10; /* Pmss flow P10 (<i>Pmss10</i>). Mechanical power output for turbine flow point 10 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU pmss2; /* Pmss flow P2 (<i>Pmss2</i>). Mechanical power output for turbine flow point 2 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU pmss3; /* Pmss flow P3 (<i>Pmss3</i>). Mechanical power output for turbine flow point 3 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU pmss4; /* Pmss flow P4 (<i>Pmss4</i>). Mechanical power output for turbine flow point 4 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU pmss5; /* Pmss flow P5 (<i>Pmss5</i>). Mechanical power output for turbine flow point 5 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU pmss6; /* Pmss flow P6 (<i>Pmss6</i>). Mechanical power output for turbine flow point 6 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU pmss7; /* Pmss flow P7 (<i>Pmss7</i>). Mechanical power output for turbine flow point 7 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU pmss8; /* Pmss flow P8 (<i>Pmss8</i>). Mechanical power output for turbine flow point 8 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::PU pmss9; /* Pmss flow P9 (<i>Pmss9</i>). Mechanical power output for turbine flow point 9 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ - CIMPP::Float rpg; /* Permanent droop for governor output feedback (<i>R-Perm-Gate</i>). Default: 0.0 */ - CIMPP::Float rpp; /* Permanent droop for electrical power feedback (<i>R-Perm-Pe</i>). Default: 0.0 */ - CIMPP::Seconds td; /* Derivative controller time constant (<i>Td</i>) (&gt;= 0). Limits the derivative characteristic beyond a breakdown frequency to avoid amplification of high-frequency noise. Default: nullptr */ - CIMPP::Seconds tdv; /* Distributive valve time lag time constant (<i>Tdv</i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds tg; /* Value to allow the distribution valve controller to advance beyond the gate movement rate limit (<i>Tg</i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds tp; /* Pilot valve time lag time constant (<i>Tp</i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds tpe; /* Electrical power droop time constant (<i>Tpe</i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds tw; /* Water inertia time constant (<i>Tw</i>) (&gt; 0). Default: nullptr */ + /** \brief Speed deadband (<i>db</i>). Default: nullptr */ + CIMPP::PU db; + + /** \brief Value to allow the integral controller to advance beyond the gate limits (<i>Dicn</i>). Default: nullptr */ + CIMPP::PU dicn; + + /** \brief Value to allow the pilot valve controller to advance beyond the gate limits (<i>Dpv</i>). Default: nullptr */ + CIMPP::PU dpv; + + /** \brief Turbine damping factor (<i>Dturb</i>). Unit = delta P (PU of <i>MWbase</i>) / delta speed (PU). Default: nullptr */ + CIMPP::PU dturb; + + /** \brief Feedback signal selection (<i>Sw</i>). true = PID output (if <i>R-Perm-Gate </i>= droop and <i>R-Perm-Pe </i>= 0) false = electrical power (if <i>R-Perm-Gate </i>= 0 and <i>R-Perm-Pe </i>= droop) or false = gate position (if R<i>-Perm-Gate </i>= droop and <i>R-Perm-Pe </i>= 0). Typical value = false. Default: false */ + CIMPP::Boolean feedbackSignal; + + /** \brief Flowgate 1 (<i>Fl1</i>). Flow value for gate position point 1 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU fl1; + + /** \brief Flowgate 2 (<i>Fl2</i>). Flow value for gate position point 2 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU fl2; + + /** \brief Flowgate 3 (<i>Fl3</i>). Flow value for gate position point 3 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU fl3; + + /** \brief Flowgate 4 (<i>Fl4</i>). Flow value for gate position point 4 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU fl4; + + /** \brief Flowgate 5 (<i>Fl5</i>). Flow value for gate position point 5 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU fl5; + + /** \brief Flow P1 (<i>Fp1</i>). Turbine flow value for point 1 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp1; + + /** \brief Flow P10 (<i>Fp10</i>). Turbine flow value for point 10 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp10; + + /** \brief Flow P2 (<i>Fp2</i>). Turbine flow value for point 2 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp2; + + /** \brief Flow P3 (<i>Fp3</i>). Turbine flow value for point 3 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp3; + + /** \brief Flow P4 (<i>Fp4</i>). Turbine flow value for point 4 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp4; + + /** \brief Flow P5 (<i>Fp5</i>). Turbine flow value for point 5 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp5; + + /** \brief Flow P6 (<i>Fp6</i>). Turbine flow value for point 6 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp6; + + /** \brief Flow P7 (<i>Fp7</i>). Turbine flow value for point 7 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp7; + + /** \brief Flow P8 (<i>Fp8</i>). Turbine flow value for point 8 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp8; + + /** \brief Flow P9 (<i>Fp9</i>). Turbine flow value for point 9 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU fp9; + + /** \brief Maximum gate position (<i>Gmax</i>) (&gt; GovHydroWEH.gmin). Default: nullptr */ + CIMPP::PU gmax; + + /** \brief Minimum gate position (<i>Gmin</i>) (&lt; GovHydroWEH.gmax). Default: nullptr */ + CIMPP::PU gmin; + + /** \brief Maximum gate closing rate (<i>Gtmxcl</i>). Default: nullptr */ + CIMPP::PU gtmxcl; + + /** \brief Maximum gate opening rate (<i>Gtmxop</i>). Default: nullptr */ + CIMPP::PU gtmxop; + + /** \brief Gate 1 (<i>Gv1</i>). Gate Position value for point 1 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Gate 2 (<i>Gv2</i>). Gate Position value for point 2 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Gate 3 (<i>Gv3</i>). Gate Position value for point 3 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Gate 4 (<i>Gv4</i>). Gate Position value for point 4 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Gate 5 (<i>Gv5</i>). Gate Position value for point 5 for lookup table representing water flow through the turbine as a function of gate position to produce steady state flow. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Derivative controller derivative gain (<i>Kd</i>). Default: nullptr */ + CIMPP::PU kd; + + /** \brief Derivative controller Integral gain (<i>Ki</i>). Default: nullptr */ + CIMPP::PU ki; + + /** \brief Derivative control gain (<i>Kp</i>). Default: nullptr */ + CIMPP::PU kp; + + /** \brief Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Pmss flow P1 (<i>Pmss1</i>). Mechanical power output for turbine flow point 1 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss1; + + /** \brief Pmss flow P10 (<i>Pmss10</i>). Mechanical power output for turbine flow point 10 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss10; + + /** \brief Pmss flow P2 (<i>Pmss2</i>). Mechanical power output for turbine flow point 2 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss2; + + /** \brief Pmss flow P3 (<i>Pmss3</i>). Mechanical power output for turbine flow point 3 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss3; + + /** \brief Pmss flow P4 (<i>Pmss4</i>). Mechanical power output for turbine flow point 4 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss4; + + /** \brief Pmss flow P5 (<i>Pmss5</i>). Mechanical power output for turbine flow point 5 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss5; + + /** \brief Pmss flow P6 (<i>Pmss6</i>). Mechanical power output for turbine flow point 6 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss6; + + /** \brief Pmss flow P7 (<i>Pmss7</i>). Mechanical power output for turbine flow point 7 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss7; + + /** \brief Pmss flow P8 (<i>Pmss8</i>). Mechanical power output for turbine flow point 8 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss8; + + /** \brief Pmss flow P9 (<i>Pmss9</i>). Mechanical power output for turbine flow point 9 for lookup table representing PU mechanical power on machine MVA rating as a function of turbine flow. Default: nullptr */ + CIMPP::PU pmss9; + + /** \brief Permanent droop for governor output feedback (<i>R-Perm-Gate</i>). Default: 0.0 */ + CIMPP::Float rpg; + + /** \brief Permanent droop for electrical power feedback (<i>R-Perm-Pe</i>). Default: 0.0 */ + CIMPP::Float rpp; + + /** \brief Derivative controller time constant (<i>Td</i>) (&gt;= 0). Limits the derivative characteristic beyond a breakdown frequency to avoid amplification of high-frequency noise. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Distributive valve time lag time constant (<i>Tdv</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds tdv; + + /** \brief Value to allow the distribution valve controller to advance beyond the gate movement rate limit (<i>Tg</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Pilot valve time lag time constant (<i>Tp</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Electrical power droop time constant (<i>Tpe</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds tpe; + + /** \brief Water inertia time constant (<i>Tw</i>) (&gt; 0). Default: nullptr */ + CIMPP::Seconds tw; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GovHydroWPID.cpp b/CGMES_3.0.0/GovHydroWPID.cpp index 4a392e676..52c605514 100644 --- a/CGMES_3.0.0/GovHydroWPID.cpp +++ b/CGMES_3.0.0/GovHydroWPID.cpp @@ -8,33 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -GovHydroWPID::GovHydroWPID() {}; -GovHydroWPID::~GovHydroWPID() {}; +GovHydroWPID::GovHydroWPID() {} +GovHydroWPID::~GovHydroWPID() {} static const std::list PossibleProfilesForClass = { @@ -82,298 +60,318 @@ GovHydroWPID::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovHydroWPID_d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_d(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->d; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_gatmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_gatmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gatmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_gatmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_gatmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gatmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_reg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_reg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->reg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_treg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_treg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->treg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_velmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_velmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovHydroWPID_velmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovHydroWPID_velmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->velmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovHydroWPID_d(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->d; if (!buffer.str().empty()) @@ -387,7 +385,8 @@ bool get_GovHydroWPID_d(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovHydroWPID_gatmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gatmax; if (!buffer.str().empty()) @@ -401,7 +400,8 @@ bool get_GovHydroWPID_gatmax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroWPID_gatmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gatmin; if (!buffer.str().empty()) @@ -415,7 +415,8 @@ bool get_GovHydroWPID_gatmin(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroWPID_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -429,7 +430,8 @@ bool get_GovHydroWPID_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroWPID_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -443,7 +445,8 @@ bool get_GovHydroWPID_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroWPID_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -457,7 +460,8 @@ bool get_GovHydroWPID_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroWPID_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -471,7 +475,8 @@ bool get_GovHydroWPID_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWPID_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -485,7 +490,8 @@ bool get_GovHydroWPID_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWPID_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -499,7 +505,8 @@ bool get_GovHydroWPID_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWPID_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -513,7 +520,8 @@ bool get_GovHydroWPID_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroWPID_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -527,7 +535,8 @@ bool get_GovHydroWPID_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWPID_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -541,7 +550,8 @@ bool get_GovHydroWPID_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWPID_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -555,7 +565,8 @@ bool get_GovHydroWPID_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWPID_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -569,7 +580,8 @@ bool get_GovHydroWPID_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWPID_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -583,7 +595,8 @@ bool get_GovHydroWPID_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWPID_reg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->reg; if (!buffer.str().empty()) @@ -597,7 +610,8 @@ bool get_GovHydroWPID_reg(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovHydroWPID_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -611,7 +625,8 @@ bool get_GovHydroWPID_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWPID_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -625,7 +640,8 @@ bool get_GovHydroWPID_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWPID_treg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->treg; if (!buffer.str().empty()) @@ -639,7 +655,8 @@ bool get_GovHydroWPID_treg(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovHydroWPID_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -653,7 +670,8 @@ bool get_GovHydroWPID_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovHydroWPID_velmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velmax; if (!buffer.str().empty()) @@ -667,7 +685,8 @@ bool get_GovHydroWPID_velmax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovHydroWPID_velmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1)) + const GovHydroWPID* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->velmin; if (!buffer.str().empty()) @@ -679,8 +698,6 @@ bool get_GovHydroWPID_velmin(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char GovHydroWPID::debugName[] = "GovHydroWPID"; const char* GovHydroWPID::debugString() const { @@ -689,33 +706,33 @@ const char* GovHydroWPID::debugString() const void GovHydroWPID::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovHydroWPID"), &GovHydroWPID_factory)); + factory_map.emplace("cim:GovHydroWPID", &GovHydroWPID_factory); } void GovHydroWPID::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.d"), &assign_GovHydroWPID_d)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.gatmax"), &assign_GovHydroWPID_gatmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.gatmin"), &assign_GovHydroWPID_gatmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.gv1"), &assign_GovHydroWPID_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.gv2"), &assign_GovHydroWPID_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.gv3"), &assign_GovHydroWPID_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.kd"), &assign_GovHydroWPID_kd)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.ki"), &assign_GovHydroWPID_ki)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.kp"), &assign_GovHydroWPID_kp)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.mwbase"), &assign_GovHydroWPID_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.pgv1"), &assign_GovHydroWPID_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.pgv2"), &assign_GovHydroWPID_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.pgv3"), &assign_GovHydroWPID_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.pmax"), &assign_GovHydroWPID_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.pmin"), &assign_GovHydroWPID_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.reg"), &assign_GovHydroWPID_reg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.ta"), &assign_GovHydroWPID_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.tb"), &assign_GovHydroWPID_tb)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.treg"), &assign_GovHydroWPID_treg)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.tw"), &assign_GovHydroWPID_tw)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.velmax"), &assign_GovHydroWPID_velmax)); - assign_map.insert(std::make_pair(std::string("cim:GovHydroWPID.velmin"), &assign_GovHydroWPID_velmin)); + assign_map.emplace("cim:GovHydroWPID.d", &assign_GovHydroWPID_d); + assign_map.emplace("cim:GovHydroWPID.gatmax", &assign_GovHydroWPID_gatmax); + assign_map.emplace("cim:GovHydroWPID.gatmin", &assign_GovHydroWPID_gatmin); + assign_map.emplace("cim:GovHydroWPID.gv1", &assign_GovHydroWPID_gv1); + assign_map.emplace("cim:GovHydroWPID.gv2", &assign_GovHydroWPID_gv2); + assign_map.emplace("cim:GovHydroWPID.gv3", &assign_GovHydroWPID_gv3); + assign_map.emplace("cim:GovHydroWPID.kd", &assign_GovHydroWPID_kd); + assign_map.emplace("cim:GovHydroWPID.ki", &assign_GovHydroWPID_ki); + assign_map.emplace("cim:GovHydroWPID.kp", &assign_GovHydroWPID_kp); + assign_map.emplace("cim:GovHydroWPID.mwbase", &assign_GovHydroWPID_mwbase); + assign_map.emplace("cim:GovHydroWPID.pgv1", &assign_GovHydroWPID_pgv1); + assign_map.emplace("cim:GovHydroWPID.pgv2", &assign_GovHydroWPID_pgv2); + assign_map.emplace("cim:GovHydroWPID.pgv3", &assign_GovHydroWPID_pgv3); + assign_map.emplace("cim:GovHydroWPID.pmax", &assign_GovHydroWPID_pmax); + assign_map.emplace("cim:GovHydroWPID.pmin", &assign_GovHydroWPID_pmin); + assign_map.emplace("cim:GovHydroWPID.reg", &assign_GovHydroWPID_reg); + assign_map.emplace("cim:GovHydroWPID.ta", &assign_GovHydroWPID_ta); + assign_map.emplace("cim:GovHydroWPID.tb", &assign_GovHydroWPID_tb); + assign_map.emplace("cim:GovHydroWPID.treg", &assign_GovHydroWPID_treg); + assign_map.emplace("cim:GovHydroWPID.tw", &assign_GovHydroWPID_tw); + assign_map.emplace("cim:GovHydroWPID.velmax", &assign_GovHydroWPID_velmax); + assign_map.emplace("cim:GovHydroWPID.velmin", &assign_GovHydroWPID_velmin); } void GovHydroWPID::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/GovHydroWPID.hpp b/CGMES_3.0.0/GovHydroWPID.hpp index a47140189..acbf6a553 100644 --- a/CGMES_3.0.0/GovHydroWPID.hpp +++ b/CGMES_3.0.0/GovHydroWPID.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - WoodwardTM PID hydro governor. [Footnote: Woodward PID hydro governors are an example of suitable products available commercially. This information is given for the convenience of users of this document and does not constitute an endorsement by IEC of these products.] - */ + /** \brief WoodwardTM PID hydro governor. [Footnote: Woodward PID hydro governors are an example of suitable products available commercially. This information is given for the convenience of users of this document and does not constitute an endorsement by IEC of these products.] */ class GovHydroWPID : public TurbineGovernorDynamics { public: @@ -29,28 +27,71 @@ namespace CIMPP GovHydroWPID(); ~GovHydroWPID() override; - CIMPP::PU d; /* Turbine damping factor (<i>D</i>). Unit = delta P / delta speed. Default: nullptr */ - CIMPP::PU gatmax; /* Gate opening limit maximum (<i>Gatmax</i>) (&gt; GovHydroWPID.gatmin). Default: nullptr */ - CIMPP::PU gatmin; /* Gate opening limit minimum (<i>Gatmin</i>) (&lt; GovHydroWPID.gatmax). Default: nullptr */ - CIMPP::PU gv1; /* Gate position 1 (<i>Gv1</i>). Default: nullptr */ - CIMPP::PU gv2; /* Gate position 2 (<i>Gv2</i>). Default: nullptr */ - CIMPP::PU gv3; /* Gate position 3 (<i>Gv3</i>) (= 1,0). Default: nullptr */ - CIMPP::PU kd; /* Derivative gain (<i>Kd</i>). Typical value = 1,11. Default: nullptr */ - CIMPP::PU ki; /* Reset gain (<i>Ki</i>). Typical value = 0,36. Default: nullptr */ - CIMPP::PU kp; /* Proportional gain (<i>Kp</i>). Typical value = 0,1. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Output at <i>Gv1</i> PU of <i>MWbase</i> (<i>Pgv1</i>). Default: nullptr */ - CIMPP::PU pgv2; /* Output at <i>Gv2</i> PU of <i>MWbase</i> (<i>Pgv2</i>). Default: nullptr */ - CIMPP::PU pgv3; /* Output at <i>Gv3</i> PU of <i>MWbase</i> (<i>Pgv3</i>). Default: nullptr */ - CIMPP::PU pmax; /* Maximum power output (<i>Pmax</i>) (&gt; GovHydroWPID.pmin). Default: nullptr */ - CIMPP::PU pmin; /* Minimum power output (<i>Pmin</i>) (&lt; GovHydroWPID.pmax). Default: nullptr */ - CIMPP::PU reg; /* Permanent drop (<i>Reg</i>). Default: nullptr */ - CIMPP::Seconds ta; /* Controller time constant (<i>Ta</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tb; /* Gate servo time constant (<i>Tb</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds treg; /* Speed detector time constant (<i>Treg</i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds tw; /* Water inertia time constant (<i>Tw</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::PU velmax; /* Maximum gate opening velocity (<i>Velmax</i>) (&gt; GovHydroWPID.velmin). Unit = PU / s. Typical value = 0. Default: nullptr */ - CIMPP::PU velmin; /* Maximum gate closing velocity (<i>Velmin</i>) (&lt; GovHydroWPID.velmax). Unit = PU / s. Typical value = 0. Default: nullptr */ + /** \brief Turbine damping factor (<i>D</i>). Unit = delta P / delta speed. Default: nullptr */ + CIMPP::PU d; + + /** \brief Gate opening limit maximum (<i>Gatmax</i>) (&gt; GovHydroWPID.gatmin). Default: nullptr */ + CIMPP::PU gatmax; + + /** \brief Gate opening limit minimum (<i>Gatmin</i>) (&lt; GovHydroWPID.gatmax). Default: nullptr */ + CIMPP::PU gatmin; + + /** \brief Gate position 1 (<i>Gv1</i>). Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Gate position 2 (<i>Gv2</i>). Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Gate position 3 (<i>Gv3</i>) (= 1,0). Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Derivative gain (<i>Kd</i>). Typical value = 1,11. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Reset gain (<i>Ki</i>). Typical value = 0,36. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Proportional gain (<i>Kp</i>). Typical value = 0,1. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Output at <i>Gv1</i> PU of <i>MWbase</i> (<i>Pgv1</i>). Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Output at <i>Gv2</i> PU of <i>MWbase</i> (<i>Pgv2</i>). Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Output at <i>Gv3</i> PU of <i>MWbase</i> (<i>Pgv3</i>). Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Maximum power output (<i>Pmax</i>) (&gt; GovHydroWPID.pmin). Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum power output (<i>Pmin</i>) (&lt; GovHydroWPID.pmax). Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Permanent drop (<i>Reg</i>). Default: nullptr */ + CIMPP::PU reg; + + /** \brief Controller time constant (<i>Ta</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Gate servo time constant (<i>Tb</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Speed detector time constant (<i>Treg</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds treg; + + /** \brief Water inertia time constant (<i>Tw</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tw; + + /** \brief Maximum gate opening velocity (<i>Velmax</i>) (&gt; GovHydroWPID.velmin). Unit = PU / s. Typical value = 0. Default: nullptr */ + CIMPP::PU velmax; + + /** \brief Maximum gate closing velocity (<i>Velmin</i>) (&lt; GovHydroWPID.velmax). Unit = PU / s. Typical value = 0. Default: nullptr */ + CIMPP::PU velmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GovSteam0.cpp b/CGMES_3.0.0/GovSteam0.cpp index 936ef9f65..cc1c74f62 100644 --- a/CGMES_3.0.0/GovSteam0.cpp +++ b/CGMES_3.0.0/GovSteam0.cpp @@ -8,19 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -GovSteam0::GovSteam0() {}; -GovSteam0::~GovSteam0() {}; +GovSteam0::GovSteam0() {} +GovSteam0::~GovSteam0() {} static const std::list PossibleProfilesForClass = { @@ -54,116 +46,122 @@ GovSteam0::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteam0_dt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam0_dt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam0_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam0_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam0_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam0_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam0_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam0_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam0_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam0_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam0_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam0_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam0_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam0_vmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam0_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam0_vmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteam0_dt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dt; if (!buffer.str().empty()) @@ -177,7 +175,8 @@ bool get_GovSteam0_dt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam0_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -191,7 +190,8 @@ bool get_GovSteam0_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteam0_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -205,7 +205,8 @@ bool get_GovSteam0_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovSteam0_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -219,7 +220,8 @@ bool get_GovSteam0_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam0_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -233,7 +235,8 @@ bool get_GovSteam0_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam0_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -247,7 +250,8 @@ bool get_GovSteam0_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam0_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmax; if (!buffer.str().empty()) @@ -261,7 +265,8 @@ bool get_GovSteam0_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam0_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam0* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam0* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmin; if (!buffer.str().empty()) @@ -273,8 +278,6 @@ bool get_GovSteam0_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char GovSteam0::debugName[] = "GovSteam0"; const char* GovSteam0::debugString() const { @@ -283,19 +286,19 @@ const char* GovSteam0::debugString() const void GovSteam0::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteam0"), &GovSteam0_factory)); + factory_map.emplace("cim:GovSteam0", &GovSteam0_factory); } void GovSteam0::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteam0.dt"), &assign_GovSteam0_dt)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam0.mwbase"), &assign_GovSteam0_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam0.r"), &assign_GovSteam0_r)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam0.t1"), &assign_GovSteam0_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam0.t2"), &assign_GovSteam0_t2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam0.t3"), &assign_GovSteam0_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam0.vmax"), &assign_GovSteam0_vmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam0.vmin"), &assign_GovSteam0_vmin)); + assign_map.emplace("cim:GovSteam0.dt", &assign_GovSteam0_dt); + assign_map.emplace("cim:GovSteam0.mwbase", &assign_GovSteam0_mwbase); + assign_map.emplace("cim:GovSteam0.r", &assign_GovSteam0_r); + assign_map.emplace("cim:GovSteam0.t1", &assign_GovSteam0_t1); + assign_map.emplace("cim:GovSteam0.t2", &assign_GovSteam0_t2); + assign_map.emplace("cim:GovSteam0.t3", &assign_GovSteam0_t3); + assign_map.emplace("cim:GovSteam0.vmax", &assign_GovSteam0_vmax); + assign_map.emplace("cim:GovSteam0.vmin", &assign_GovSteam0_vmin); } void GovSteam0::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/GovSteam0.hpp b/CGMES_3.0.0/GovSteam0.hpp index f8d3d9acc..2aa80be8c 100644 --- a/CGMES_3.0.0/GovSteam0.hpp +++ b/CGMES_3.0.0/GovSteam0.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A simplified steam turbine governor. - */ + /** \brief A simplified steam turbine governor. */ class GovSteam0 : public TurbineGovernorDynamics { public: @@ -29,14 +27,29 @@ namespace CIMPP GovSteam0(); ~GovSteam0() override; - CIMPP::PU dt; /* Turbine damping coefficient (<i>Dt</i>). Unit = delta P / delta speed. Typical value = 0. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ - CIMPP::PU r; /* Permanent droop (<i>R</i>). Typical value = 0,05. Default: nullptr */ - CIMPP::Seconds t1; /* Steam bowl time constant (<i>T1</i>) (&gt; 0). Typical value = 0,5. Default: nullptr */ - CIMPP::Seconds t2; /* Numerator time constant of <i>T2</i>/<i>T3</i> block (<i>T2</i>) (&gt;= 0). Typical value = 3. Default: nullptr */ - CIMPP::Seconds t3; /* Reheater time constant (<i>T3</i>) (&gt; 0). Typical value = 10. Default: nullptr */ - CIMPP::PU vmax; /* Maximum valve position, PU of <i>mwcap</i> (<i>Vmax</i>) (&gt; GovSteam0.vmin). Typical value = 1. Default: nullptr */ - CIMPP::PU vmin; /* Minimum valve position, PU of <i>mwcap</i> (<i>Vmin</i>) (&lt; GovSteam0.vmax). Typical value = 0. Default: nullptr */ + /** \brief Turbine damping coefficient (<i>Dt</i>). Unit = delta P / delta speed. Typical value = 0. Default: nullptr */ + CIMPP::PU dt; + + /** \brief Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Permanent droop (<i>R</i>). Typical value = 0,05. Default: nullptr */ + CIMPP::PU r; + + /** \brief Steam bowl time constant (<i>T1</i>) (&gt; 0). Typical value = 0,5. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Numerator time constant of <i>T2</i>/<i>T3</i> block (<i>T2</i>) (&gt;= 0). Typical value = 3. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Reheater time constant (<i>T3</i>) (&gt; 0). Typical value = 10. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Maximum valve position, PU of <i>mwcap</i> (<i>Vmax</i>) (&gt; GovSteam0.vmin). Typical value = 1. Default: nullptr */ + CIMPP::PU vmax; + + /** \brief Minimum valve position, PU of <i>mwcap</i> (<i>Vmin</i>) (&lt; GovSteam0.vmax). Typical value = 0. Default: nullptr */ + CIMPP::PU vmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GovSteam1.cpp b/CGMES_3.0.0/GovSteam1.cpp index 1c6aefe34..9f3c107a5 100644 --- a/CGMES_3.0.0/GovSteam1.cpp +++ b/CGMES_3.0.0/GovSteam1.cpp @@ -8,50 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Frequency.hpp" -#include "ActivePower.hpp" -#include "Frequency.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Boolean.hpp" using namespace CIMPP; -GovSteam1::GovSteam1() {}; -GovSteam1::~GovSteam1() {}; +GovSteam1::GovSteam1() {} +GovSteam1::~GovSteam1() {} static const std::list PossibleProfilesForClass = { @@ -116,519 +77,556 @@ GovSteam1::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteam1_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_eps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_eps(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eps; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_gv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_k4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_k5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_k5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_k6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_k6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_k7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_k7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_k8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_k8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_pgv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_sdb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_sdb1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->sdb1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_sdb2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_sdb2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->sdb2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_t7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_uc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_uo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_uo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam1_valve(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam1_valve(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->valve; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteam1_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -642,7 +640,8 @@ bool get_GovSteam1_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam1_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -656,7 +655,8 @@ bool get_GovSteam1_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam1_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eps; if (!buffer.str().empty()) @@ -670,7 +670,8 @@ bool get_GovSteam1_eps(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam1_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -684,7 +685,8 @@ bool get_GovSteam1_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam1_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -698,7 +700,8 @@ bool get_GovSteam1_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam1_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -712,7 +715,8 @@ bool get_GovSteam1_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam1_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -726,7 +730,8 @@ bool get_GovSteam1_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam1_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -740,7 +745,8 @@ bool get_GovSteam1_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam1_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv6; if (!buffer.str().empty()) @@ -754,7 +760,8 @@ bool get_GovSteam1_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam1_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -768,7 +775,8 @@ bool get_GovSteam1_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovSteam1_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -782,7 +790,8 @@ bool get_GovSteam1_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -796,7 +805,8 @@ bool get_GovSteam1_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -810,7 +820,8 @@ bool get_GovSteam1_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k4; if (!buffer.str().empty()) @@ -824,7 +835,8 @@ bool get_GovSteam1_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k5; if (!buffer.str().empty()) @@ -838,7 +850,8 @@ bool get_GovSteam1_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_k6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k6; if (!buffer.str().empty()) @@ -852,7 +865,8 @@ bool get_GovSteam1_k6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_k7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k7; if (!buffer.str().empty()) @@ -866,7 +880,8 @@ bool get_GovSteam1_k7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_k8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k8; if (!buffer.str().empty()) @@ -880,7 +895,8 @@ bool get_GovSteam1_k8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -894,7 +910,8 @@ bool get_GovSteam1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteam1_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -908,7 +925,8 @@ bool get_GovSteam1_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -922,7 +940,8 @@ bool get_GovSteam1_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -936,7 +955,8 @@ bool get_GovSteam1_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -950,7 +970,8 @@ bool get_GovSteam1_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -964,7 +985,8 @@ bool get_GovSteam1_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv6; if (!buffer.str().empty()) @@ -978,7 +1000,8 @@ bool get_GovSteam1_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -992,7 +1015,8 @@ bool get_GovSteam1_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -1006,7 +1030,8 @@ bool get_GovSteam1_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_sdb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->sdb1; if (!buffer.str().empty()) @@ -1020,7 +1045,8 @@ bool get_GovSteam1_sdb1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_sdb2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->sdb2; if (!buffer.str().empty()) @@ -1034,7 +1060,8 @@ bool get_GovSteam1_sdb2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -1048,7 +1075,8 @@ bool get_GovSteam1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -1062,7 +1090,8 @@ bool get_GovSteam1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -1076,7 +1105,8 @@ bool get_GovSteam1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -1090,7 +1120,8 @@ bool get_GovSteam1_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -1104,7 +1135,8 @@ bool get_GovSteam1_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -1118,7 +1150,8 @@ bool get_GovSteam1_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t7; if (!buffer.str().empty()) @@ -1132,7 +1165,8 @@ bool get_GovSteam1_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uc; if (!buffer.str().empty()) @@ -1146,7 +1180,8 @@ bool get_GovSteam1_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uo; if (!buffer.str().empty()) @@ -1160,7 +1195,8 @@ bool get_GovSteam1_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam1_valve(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->valve; if (!buffer.str().empty()) @@ -1172,8 +1208,6 @@ bool get_GovSteam1_valve(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } - - const char GovSteam1::debugName[] = "GovSteam1"; const char* GovSteam1::debugString() const { @@ -1182,50 +1216,50 @@ const char* GovSteam1::debugString() const void GovSteam1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteam1"), &GovSteam1_factory)); + factory_map.emplace("cim:GovSteam1", &GovSteam1_factory); } void GovSteam1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.db1"), &assign_GovSteam1_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.db2"), &assign_GovSteam1_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.eps"), &assign_GovSteam1_eps)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.gv1"), &assign_GovSteam1_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.gv2"), &assign_GovSteam1_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.gv3"), &assign_GovSteam1_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.gv4"), &assign_GovSteam1_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.gv5"), &assign_GovSteam1_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.gv6"), &assign_GovSteam1_gv6)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.k"), &assign_GovSteam1_k)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.k1"), &assign_GovSteam1_k1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.k2"), &assign_GovSteam1_k2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.k3"), &assign_GovSteam1_k3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.k4"), &assign_GovSteam1_k4)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.k5"), &assign_GovSteam1_k5)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.k6"), &assign_GovSteam1_k6)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.k7"), &assign_GovSteam1_k7)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.k8"), &assign_GovSteam1_k8)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.mwbase"), &assign_GovSteam1_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.pgv1"), &assign_GovSteam1_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.pgv2"), &assign_GovSteam1_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.pgv3"), &assign_GovSteam1_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.pgv4"), &assign_GovSteam1_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.pgv5"), &assign_GovSteam1_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.pgv6"), &assign_GovSteam1_pgv6)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.pmax"), &assign_GovSteam1_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.pmin"), &assign_GovSteam1_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.sdb1"), &assign_GovSteam1_sdb1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.sdb2"), &assign_GovSteam1_sdb2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.t1"), &assign_GovSteam1_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.t2"), &assign_GovSteam1_t2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.t3"), &assign_GovSteam1_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.t4"), &assign_GovSteam1_t4)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.t5"), &assign_GovSteam1_t5)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.t6"), &assign_GovSteam1_t6)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.t7"), &assign_GovSteam1_t7)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.uc"), &assign_GovSteam1_uc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.uo"), &assign_GovSteam1_uo)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam1.valve"), &assign_GovSteam1_valve)); + assign_map.emplace("cim:GovSteam1.db1", &assign_GovSteam1_db1); + assign_map.emplace("cim:GovSteam1.db2", &assign_GovSteam1_db2); + assign_map.emplace("cim:GovSteam1.eps", &assign_GovSteam1_eps); + assign_map.emplace("cim:GovSteam1.gv1", &assign_GovSteam1_gv1); + assign_map.emplace("cim:GovSteam1.gv2", &assign_GovSteam1_gv2); + assign_map.emplace("cim:GovSteam1.gv3", &assign_GovSteam1_gv3); + assign_map.emplace("cim:GovSteam1.gv4", &assign_GovSteam1_gv4); + assign_map.emplace("cim:GovSteam1.gv5", &assign_GovSteam1_gv5); + assign_map.emplace("cim:GovSteam1.gv6", &assign_GovSteam1_gv6); + assign_map.emplace("cim:GovSteam1.k", &assign_GovSteam1_k); + assign_map.emplace("cim:GovSteam1.k1", &assign_GovSteam1_k1); + assign_map.emplace("cim:GovSteam1.k2", &assign_GovSteam1_k2); + assign_map.emplace("cim:GovSteam1.k3", &assign_GovSteam1_k3); + assign_map.emplace("cim:GovSteam1.k4", &assign_GovSteam1_k4); + assign_map.emplace("cim:GovSteam1.k5", &assign_GovSteam1_k5); + assign_map.emplace("cim:GovSteam1.k6", &assign_GovSteam1_k6); + assign_map.emplace("cim:GovSteam1.k7", &assign_GovSteam1_k7); + assign_map.emplace("cim:GovSteam1.k8", &assign_GovSteam1_k8); + assign_map.emplace("cim:GovSteam1.mwbase", &assign_GovSteam1_mwbase); + assign_map.emplace("cim:GovSteam1.pgv1", &assign_GovSteam1_pgv1); + assign_map.emplace("cim:GovSteam1.pgv2", &assign_GovSteam1_pgv2); + assign_map.emplace("cim:GovSteam1.pgv3", &assign_GovSteam1_pgv3); + assign_map.emplace("cim:GovSteam1.pgv4", &assign_GovSteam1_pgv4); + assign_map.emplace("cim:GovSteam1.pgv5", &assign_GovSteam1_pgv5); + assign_map.emplace("cim:GovSteam1.pgv6", &assign_GovSteam1_pgv6); + assign_map.emplace("cim:GovSteam1.pmax", &assign_GovSteam1_pmax); + assign_map.emplace("cim:GovSteam1.pmin", &assign_GovSteam1_pmin); + assign_map.emplace("cim:GovSteam1.sdb1", &assign_GovSteam1_sdb1); + assign_map.emplace("cim:GovSteam1.sdb2", &assign_GovSteam1_sdb2); + assign_map.emplace("cim:GovSteam1.t1", &assign_GovSteam1_t1); + assign_map.emplace("cim:GovSteam1.t2", &assign_GovSteam1_t2); + assign_map.emplace("cim:GovSteam1.t3", &assign_GovSteam1_t3); + assign_map.emplace("cim:GovSteam1.t4", &assign_GovSteam1_t4); + assign_map.emplace("cim:GovSteam1.t5", &assign_GovSteam1_t5); + assign_map.emplace("cim:GovSteam1.t6", &assign_GovSteam1_t6); + assign_map.emplace("cim:GovSteam1.t7", &assign_GovSteam1_t7); + assign_map.emplace("cim:GovSteam1.uc", &assign_GovSteam1_uc); + assign_map.emplace("cim:GovSteam1.uo", &assign_GovSteam1_uo); + assign_map.emplace("cim:GovSteam1.valve", &assign_GovSteam1_valve); } void GovSteam1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/GovSteam1.hpp b/CGMES_3.0.0/GovSteam1.hpp index d5bab0fc7..50adfb3ea 100644 --- a/CGMES_3.0.0/GovSteam1.hpp +++ b/CGMES_3.0.0/GovSteam1.hpp @@ -22,9 +22,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Steam turbine governor, based on the GovSteamIEEE1 (with optional deadband and nonlinear valve gain added). - */ + /** \brief Steam turbine governor, based on the GovSteamIEEE1 (with optional deadband and nonlinear valve gain added). */ class GovSteam1 : public TurbineGovernorDynamics { public: @@ -32,45 +30,122 @@ namespace CIMPP GovSteam1(); ~GovSteam1() override; - CIMPP::Frequency db1; /* Intentional deadband width (<i>db1</i>). Unit = Hz. Typical value = 0. Default: nullptr */ - CIMPP::ActivePower db2; /* Unintentional deadband (<i>db2</i>). Unit = MW. Typical value = 0. Default: nullptr */ - CIMPP::Frequency eps; /* Intentional db hysteresis (<i>eps</i>). Unit = Hz. Typical value = 0. Default: nullptr */ - CIMPP::PU gv1; /* Nonlinear gain valve position point 1 (<i>GV1</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain valve position point 2 (<i>GV2</i>). Typical value = 0,4. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain valve position point 3 (<i>GV3</i>). Typical value = 0,5. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain valve position point 4 (<i>GV4</i>). Typical value = 0,6. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain valve position point 5 (<i>GV5</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU gv6; /* Nonlinear gain valve position point 6 (<i>GV6</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU k; /* Governor gain (reciprocal of droop) (<i>K</i>) (&gt; 0). Typical value = 25. Default: nullptr */ - CIMPP::Float k1; /* Fraction of HP shaft power after first boiler pass (<i>K1</i>). Typical value = 0,2. Default: 0.0 */ - CIMPP::Float k2; /* Fraction of LP shaft power after first boiler pass (<i>K2</i>). Typical value = 0. Default: 0.0 */ - CIMPP::Float k3; /* Fraction of HP shaft power after second boiler pass (<i>K3</i>). Typical value = 0,3. Default: 0.0 */ - CIMPP::Float k4; /* Fraction of LP shaft power after second boiler pass (<i>K4</i>). Typical value = 0. Default: 0.0 */ - CIMPP::Float k5; /* Fraction of HP shaft power after third boiler pass (<i>K5</i>). Typical value = 0,5. Default: 0.0 */ - CIMPP::Float k6; /* Fraction of LP shaft power after third boiler pass (<i>K6</i>). Typical value = 0. Default: 0.0 */ - CIMPP::Float k7; /* Fraction of HP shaft power after fourth boiler pass (<i>K7</i>). Typical value = 0. Default: 0.0 */ - CIMPP::Float k8; /* Fraction of LP shaft power after fourth boiler pass (<i>K8</i>). Typical value = 0. Default: 0.0 */ - CIMPP::ActivePower mwbase; /* Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain power value point 1 (<i>Pgv1</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain power value point 2 (<i>Pgv2</i>). Typical value = 0,75. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain power value point 3 (<i>Pgv3</i>). Typical value = 0,91. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain power value point 4 (<i>Pgv4</i>). Typical value = 0,98. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain power value point 5 (<i>Pgv5</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU pgv6; /* Nonlinear gain power value point 6 (<i>Pgv6</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pmax; /* Maximum valve opening (<i>Pmax</i>) (&gt; GovSteam1.pmin). Typical value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum valve opening (<i>Pmin</i>) (&gt;= 0 and &lt; GovSteam1.pmax). Typical value = 0. Default: nullptr */ - CIMPP::Boolean sdb1; /* Intentional deadband indicator. true = intentional deadband is applied false = intentional deadband is not applied. Typical value = true. Default: false */ - CIMPP::Boolean sdb2; /* Unintentional deadband location. true = intentional deadband is applied before point `A` false = intentional deadband is applied after point `A`. Typical value = true. Default: false */ - CIMPP::Seconds t1; /* Governor lag time constant (<i>T1</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds t2; /* Governor lead time constant (<i>T2</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds t3; /* Valve positioner time constant (<i>T3) </i>(&gt; 0). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds t4; /* Inlet piping/steam bowl time constant (<i>T4</i>) (&gt;= 0). Typical value = 0,3. Default: nullptr */ - CIMPP::Seconds t5; /* Time constant of second boiler pass (<i>T5</i>) (&gt;= 0). Typical value = 5. Default: nullptr */ - CIMPP::Seconds t6; /* Time constant of third boiler pass (<i>T6</i>) (&gt;= 0). Typical value = 0,5. Default: nullptr */ - CIMPP::Seconds t7; /* Time constant of fourth boiler pass (<i>T7</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Float uc; /* Maximum valve closing velocity (<i>Uc</i>) (&lt; 0). Unit = PU / s. Typical value = -10. Default: 0.0 */ - CIMPP::Float uo; /* Maximum valve opening velocity (<i>Uo</i>) (&gt; 0). Unit = PU / s. Typical value = 1. Default: 0.0 */ - CIMPP::Boolean valve; /* Nonlinear valve characteristic. true = nonlinear valve characteristic is used false = nonlinear valve characteristic is not used. Typical value = true. Default: false */ + /** \brief Intentional deadband width (<i>db1</i>). Unit = Hz. Typical value = 0. Default: nullptr */ + CIMPP::Frequency db1; + + /** \brief Unintentional deadband (<i>db2</i>). Unit = MW. Typical value = 0. Default: nullptr */ + CIMPP::ActivePower db2; + + /** \brief Intentional db hysteresis (<i>eps</i>). Unit = Hz. Typical value = 0. Default: nullptr */ + CIMPP::Frequency eps; + + /** \brief Nonlinear gain valve position point 1 (<i>GV1</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain valve position point 2 (<i>GV2</i>). Typical value = 0,4. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain valve position point 3 (<i>GV3</i>). Typical value = 0,5. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain valve position point 4 (<i>GV4</i>). Typical value = 0,6. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain valve position point 5 (<i>GV5</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Nonlinear gain valve position point 6 (<i>GV6</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv6; + + /** \brief Governor gain (reciprocal of droop) (<i>K</i>) (&gt; 0). Typical value = 25. Default: nullptr */ + CIMPP::PU k; + + /** \brief Fraction of HP shaft power after first boiler pass (<i>K1</i>). Typical value = 0,2. Default: 0.0 */ + CIMPP::Float k1; + + /** \brief Fraction of LP shaft power after first boiler pass (<i>K2</i>). Typical value = 0. Default: 0.0 */ + CIMPP::Float k2; + + /** \brief Fraction of HP shaft power after second boiler pass (<i>K3</i>). Typical value = 0,3. Default: 0.0 */ + CIMPP::Float k3; + + /** \brief Fraction of LP shaft power after second boiler pass (<i>K4</i>). Typical value = 0. Default: 0.0 */ + CIMPP::Float k4; + + /** \brief Fraction of HP shaft power after third boiler pass (<i>K5</i>). Typical value = 0,5. Default: 0.0 */ + CIMPP::Float k5; + + /** \brief Fraction of LP shaft power after third boiler pass (<i>K6</i>). Typical value = 0. Default: 0.0 */ + CIMPP::Float k6; + + /** \brief Fraction of HP shaft power after fourth boiler pass (<i>K7</i>). Typical value = 0. Default: 0.0 */ + CIMPP::Float k7; + + /** \brief Fraction of LP shaft power after fourth boiler pass (<i>K8</i>). Typical value = 0. Default: 0.0 */ + CIMPP::Float k8; + + /** \brief Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain power value point 1 (<i>Pgv1</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain power value point 2 (<i>Pgv2</i>). Typical value = 0,75. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain power value point 3 (<i>Pgv3</i>). Typical value = 0,91. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain power value point 4 (<i>Pgv4</i>). Typical value = 0,98. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain power value point 5 (<i>Pgv5</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief Nonlinear gain power value point 6 (<i>Pgv6</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv6; + + /** \brief Maximum valve opening (<i>Pmax</i>) (&gt; GovSteam1.pmin). Typical value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum valve opening (<i>Pmin</i>) (&gt;= 0 and &lt; GovSteam1.pmax). Typical value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Intentional deadband indicator. true = intentional deadband is applied false = intentional deadband is not applied. Typical value = true. Default: false */ + CIMPP::Boolean sdb1; + + /** \brief Unintentional deadband location. true = intentional deadband is applied before point `A` false = intentional deadband is applied after point `A`. Typical value = true. Default: false */ + CIMPP::Boolean sdb2; + + /** \brief Governor lag time constant (<i>T1</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Governor lead time constant (<i>T2</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Valve positioner time constant (<i>T3) </i>(&gt; 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Inlet piping/steam bowl time constant (<i>T4</i>) (&gt;= 0). Typical value = 0,3. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant of second boiler pass (<i>T5</i>) (&gt;= 0). Typical value = 5. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Time constant of third boiler pass (<i>T6</i>) (&gt;= 0). Typical value = 0,5. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time constant of fourth boiler pass (<i>T7</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds t7; + + /** \brief Maximum valve closing velocity (<i>Uc</i>) (&lt; 0). Unit = PU / s. Typical value = -10. Default: 0.0 */ + CIMPP::Float uc; + + /** \brief Maximum valve opening velocity (<i>Uo</i>) (&gt; 0). Unit = PU / s. Typical value = 1. Default: 0.0 */ + CIMPP::Float uo; + + /** \brief Nonlinear valve characteristic. true = nonlinear valve characteristic is used false = nonlinear valve characteristic is not used. Typical value = true. Default: false */ + CIMPP::Boolean valve; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GovSteam2.cpp b/CGMES_3.0.0/GovSteam2.cpp index c2f89cf08..8696d39ab 100644 --- a/CGMES_3.0.0/GovSteam2.cpp +++ b/CGMES_3.0.0/GovSteam2.cpp @@ -8,19 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -GovSteam2::GovSteam2() {}; -GovSteam2::~GovSteam2() {}; +GovSteam2::GovSteam2() {} +GovSteam2::~GovSteam2() {} static const std::list PossibleProfilesForClass = { @@ -54,116 +46,122 @@ GovSteam2::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteam2_dbf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam2_dbf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dbf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam2_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam2_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam2_mnef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam2_mnef(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mnef; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam2_mxef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam2_mxef(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mxef; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam2_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam2_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam2_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam2_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam2_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam2_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteam2_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteam2_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteam2_dbf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dbf; if (!buffer.str().empty()) @@ -177,7 +175,8 @@ bool get_GovSteam2_dbf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteam2_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -191,7 +190,8 @@ bool get_GovSteam2_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_GovSteam2_mnef(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mnef; if (!buffer.str().empty()) @@ -205,7 +205,8 @@ bool get_GovSteam2_mnef(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam2_mxef(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mxef; if (!buffer.str().empty()) @@ -219,7 +220,8 @@ bool get_GovSteam2_mxef(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam2_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -233,7 +235,8 @@ bool get_GovSteam2_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam2_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -247,7 +250,8 @@ bool get_GovSteam2_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteam2_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -261,7 +265,8 @@ bool get_GovSteam2_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_GovSteam2_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteam2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteam2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -273,8 +278,6 @@ bool get_GovSteam2_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char GovSteam2::debugName[] = "GovSteam2"; const char* GovSteam2::debugString() const { @@ -283,19 +286,19 @@ const char* GovSteam2::debugString() const void GovSteam2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteam2"), &GovSteam2_factory)); + factory_map.emplace("cim:GovSteam2", &GovSteam2_factory); } void GovSteam2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteam2.dbf"), &assign_GovSteam2_dbf)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam2.k"), &assign_GovSteam2_k)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam2.mnef"), &assign_GovSteam2_mnef)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam2.mxef"), &assign_GovSteam2_mxef)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam2.pmax"), &assign_GovSteam2_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam2.pmin"), &assign_GovSteam2_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam2.t1"), &assign_GovSteam2_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteam2.t2"), &assign_GovSteam2_t2)); + assign_map.emplace("cim:GovSteam2.dbf", &assign_GovSteam2_dbf); + assign_map.emplace("cim:GovSteam2.k", &assign_GovSteam2_k); + assign_map.emplace("cim:GovSteam2.mnef", &assign_GovSteam2_mnef); + assign_map.emplace("cim:GovSteam2.mxef", &assign_GovSteam2_mxef); + assign_map.emplace("cim:GovSteam2.pmax", &assign_GovSteam2_pmax); + assign_map.emplace("cim:GovSteam2.pmin", &assign_GovSteam2_pmin); + assign_map.emplace("cim:GovSteam2.t1", &assign_GovSteam2_t1); + assign_map.emplace("cim:GovSteam2.t2", &assign_GovSteam2_t2); } void GovSteam2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/GovSteam2.hpp b/CGMES_3.0.0/GovSteam2.hpp index a50620176..618b66331 100644 --- a/CGMES_3.0.0/GovSteam2.hpp +++ b/CGMES_3.0.0/GovSteam2.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Simplified governor. - */ + /** \brief Simplified governor. */ class GovSteam2 : public TurbineGovernorDynamics { public: @@ -29,14 +27,29 @@ namespace CIMPP GovSteam2(); ~GovSteam2() override; - CIMPP::PU dbf; /* Frequency deadband (<i>DBF</i>). Typical value = 0. Default: nullptr */ - CIMPP::Float k; /* Governor gain (reciprocal of droop) (<i>K</i>). Typical value = 20. Default: 0.0 */ - CIMPP::PU mnef; /* Fuel flow maximum negative error value (<i>MN</i><i><sub>EF</sub></i>). Typical value = -1. Default: nullptr */ - CIMPP::PU mxef; /* Fuel flow maximum positive error value (<i>MX</i><i><sub>EF</sub></i>). Typical value = 1. Default: nullptr */ - CIMPP::PU pmax; /* Maximum fuel flow (<i>P</i><i><sub>MAX</sub></i>) (&gt; GovSteam2.pmin). Typical value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum fuel flow (<i>P</i><i><sub>MIN</sub></i>) (&lt; GovSteam2.pmax). Typical value = 0. Default: nullptr */ - CIMPP::Seconds t1; /* Governor lag time constant (<i>T</i><i><sub>1</sub></i>) (&gt; 0). Typical value = 0,45. Default: nullptr */ - CIMPP::Seconds t2; /* Governor lead time constant (<i>T</i><i><sub>2</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + /** \brief Frequency deadband (<i>DBF</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU dbf; + + /** \brief Governor gain (reciprocal of droop) (<i>K</i>). Typical value = 20. Default: 0.0 */ + CIMPP::Float k; + + /** \brief Fuel flow maximum negative error value (<i>MN</i><i><sub>EF</sub></i>). Typical value = -1. Default: nullptr */ + CIMPP::PU mnef; + + /** \brief Fuel flow maximum positive error value (<i>MX</i><i><sub>EF</sub></i>). Typical value = 1. Default: nullptr */ + CIMPP::PU mxef; + + /** \brief Maximum fuel flow (<i>P</i><i><sub>MAX</sub></i>) (&gt; GovSteam2.pmin). Typical value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum fuel flow (<i>P</i><i><sub>MIN</sub></i>) (&lt; GovSteam2.pmax). Typical value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Governor lag time constant (<i>T</i><i><sub>1</sub></i>) (&gt; 0). Typical value = 0,45. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Governor lead time constant (<i>T</i><i><sub>2</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds t2; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GovSteamBB.cpp b/CGMES_3.0.0/GovSteamBB.cpp index 531d47fca..49a1baa65 100644 --- a/CGMES_3.0.0/GovSteamBB.cpp +++ b/CGMES_3.0.0/GovSteamBB.cpp @@ -8,28 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -GovSteamBB::GovSteamBB() {}; -GovSteamBB::~GovSteamBB() {}; +GovSteamBB::GovSteamBB() {} +GovSteamBB::~GovSteamBB() {} static const std::list PossibleProfilesForClass = { @@ -72,233 +55,248 @@ GovSteamBB::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteamBB_fcut(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamBB_fcut(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + GovSteamBB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fcut; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamBB_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamBB_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + GovSteamBB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamBB_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamBB_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + GovSteamBB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamBB_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamBB_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + GovSteamBB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamBB_kg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamBB_kg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + GovSteamBB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kg; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamBB_kls(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamBB_kls(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + GovSteamBB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kls; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamBB_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamBB_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + GovSteamBB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamBB_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamBB_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + GovSteamBB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamBB_peflag(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamBB_peflag(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + GovSteamBB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->peflag; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamBB_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamBB_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + GovSteamBB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamBB_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamBB_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + GovSteamBB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamBB_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamBB_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + GovSteamBB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamBB_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamBB_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + GovSteamBB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamBB_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamBB_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + GovSteamBB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamBB_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamBB_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + GovSteamBB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamBB_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamBB_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + GovSteamBB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamBB_tn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamBB_tn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + GovSteamBB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteamBB_fcut(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamBB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fcut; if (!buffer.str().empty()) @@ -312,7 +310,8 @@ bool get_GovSteamBB_fcut(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamBB_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamBB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -326,7 +325,8 @@ bool get_GovSteamBB_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamBB_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamBB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -340,7 +340,8 @@ bool get_GovSteamBB_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamBB_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamBB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -354,7 +355,8 @@ bool get_GovSteamBB_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamBB_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamBB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kg; if (!buffer.str().empty()) @@ -368,7 +370,8 @@ bool get_GovSteamBB_kg(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamBB_kls(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamBB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kls; if (!buffer.str().empty()) @@ -382,7 +385,8 @@ bool get_GovSteamBB_kls(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamBB_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamBB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -396,7 +400,8 @@ bool get_GovSteamBB_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamBB_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamBB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -410,7 +415,8 @@ bool get_GovSteamBB_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamBB_peflag(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamBB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->peflag; if (!buffer.str().empty()) @@ -424,7 +430,8 @@ bool get_GovSteamBB_peflag(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamBB_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamBB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -438,7 +445,8 @@ bool get_GovSteamBB_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamBB_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamBB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -452,7 +460,8 @@ bool get_GovSteamBB_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamBB_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamBB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -466,7 +475,8 @@ bool get_GovSteamBB_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamBB_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamBB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -480,7 +490,8 @@ bool get_GovSteamBB_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamBB_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamBB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -494,7 +505,8 @@ bool get_GovSteamBB_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamBB_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamBB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -508,7 +520,8 @@ bool get_GovSteamBB_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamBB_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamBB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -522,7 +535,8 @@ bool get_GovSteamBB_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamBB_tn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamBB* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamBB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tn; if (!buffer.str().empty()) @@ -534,8 +548,6 @@ bool get_GovSteamBB_tn(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - const char GovSteamBB::debugName[] = "GovSteamBB"; const char* GovSteamBB::debugString() const { @@ -544,28 +556,28 @@ const char* GovSteamBB::debugString() const void GovSteamBB::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteamBB"), &GovSteamBB_factory)); + factory_map.emplace("cim:GovSteamBB", &GovSteamBB_factory); } void GovSteamBB::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteamBB.fcut"), &assign_GovSteamBB_fcut)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamBB.k2"), &assign_GovSteamBB_k2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamBB.k3"), &assign_GovSteamBB_k3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamBB.kd"), &assign_GovSteamBB_kd)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamBB.kg"), &assign_GovSteamBB_kg)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamBB.kls"), &assign_GovSteamBB_kls)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamBB.kp"), &assign_GovSteamBB_kp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamBB.ks"), &assign_GovSteamBB_ks)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamBB.peflag"), &assign_GovSteamBB_peflag)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamBB.pmax"), &assign_GovSteamBB_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamBB.pmin"), &assign_GovSteamBB_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamBB.t1"), &assign_GovSteamBB_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamBB.t4"), &assign_GovSteamBB_t4)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamBB.t5"), &assign_GovSteamBB_t5)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamBB.t6"), &assign_GovSteamBB_t6)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamBB.td"), &assign_GovSteamBB_td)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamBB.tn"), &assign_GovSteamBB_tn)); + assign_map.emplace("cim:GovSteamBB.fcut", &assign_GovSteamBB_fcut); + assign_map.emplace("cim:GovSteamBB.k2", &assign_GovSteamBB_k2); + assign_map.emplace("cim:GovSteamBB.k3", &assign_GovSteamBB_k3); + assign_map.emplace("cim:GovSteamBB.kd", &assign_GovSteamBB_kd); + assign_map.emplace("cim:GovSteamBB.kg", &assign_GovSteamBB_kg); + assign_map.emplace("cim:GovSteamBB.kls", &assign_GovSteamBB_kls); + assign_map.emplace("cim:GovSteamBB.kp", &assign_GovSteamBB_kp); + assign_map.emplace("cim:GovSteamBB.ks", &assign_GovSteamBB_ks); + assign_map.emplace("cim:GovSteamBB.peflag", &assign_GovSteamBB_peflag); + assign_map.emplace("cim:GovSteamBB.pmax", &assign_GovSteamBB_pmax); + assign_map.emplace("cim:GovSteamBB.pmin", &assign_GovSteamBB_pmin); + assign_map.emplace("cim:GovSteamBB.t1", &assign_GovSteamBB_t1); + assign_map.emplace("cim:GovSteamBB.t4", &assign_GovSteamBB_t4); + assign_map.emplace("cim:GovSteamBB.t5", &assign_GovSteamBB_t5); + assign_map.emplace("cim:GovSteamBB.t6", &assign_GovSteamBB_t6); + assign_map.emplace("cim:GovSteamBB.td", &assign_GovSteamBB_td); + assign_map.emplace("cim:GovSteamBB.tn", &assign_GovSteamBB_tn); } void GovSteamBB::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/GovSteamBB.hpp b/CGMES_3.0.0/GovSteamBB.hpp index cea4e26fc..f1c55f8a0 100644 --- a/CGMES_3.0.0/GovSteamBB.hpp +++ b/CGMES_3.0.0/GovSteamBB.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - European governor model. - */ + /** \brief European governor model. */ class GovSteamBB : public TurbineGovernorDynamics { public: @@ -29,23 +27,56 @@ namespace CIMPP GovSteamBB(); ~GovSteamBB() override; - CIMPP::PU fcut; /* Frequency deadband (<i>f</i><i><sub>cut</sub></i>) (&gt;= 0). Typical value = 0,002. Default: nullptr */ - CIMPP::PU k2; /* Gain (<i>K2</i>). Typical value = 0,75. Default: nullptr */ - CIMPP::PU k3; /* Gain (<i>K3</i>). Typical value = 0,5. Default: nullptr */ - CIMPP::PU kd; /* Gain (<i>Kd</i>). Typical value = 1,0. Default: nullptr */ - CIMPP::PU kg; /* Gain (<i>Kg</i>). Typical value = 1,0. Default: nullptr */ - CIMPP::PU kls; /* Gain (<i>Kls</i>) (&gt; 0). Typical value = 0,1. Default: nullptr */ - CIMPP::PU kp; /* Gain (<i>Kp</i>). Typical value = 1,0. Default: nullptr */ - CIMPP::PU ks; /* Gain (<i>Ks</i>). Typical value = 21,0. Default: nullptr */ - CIMPP::Boolean peflag; /* Electric power input selection (Peflag). true = electric power input false = feedback signal. Typical value = false. Default: false */ - CIMPP::PU pmax; /* High power limit (<i>Pmax</i>) (&gt; GovSteamBB.pmin). Typical value = 1,0. Default: nullptr */ - CIMPP::PU pmin; /* Low power limit (<i>Pmin</i>) (&lt; GovSteamBB.pmax). Typical value = 0. Default: nullptr */ - CIMPP::Seconds t1; /* Time constant (<i>T1</i>). Typical value = 0,05. Default: nullptr */ - CIMPP::Seconds t4; /* Time constant (<i>T4</i>). Typical value = 0,15. Default: nullptr */ - CIMPP::Seconds t5; /* Time constant (<i>T5</i>). Typical value = 12,0. Default: nullptr */ - CIMPP::Seconds t6; /* Time constant (<i>T6</i>). Typical value = 0,75. Default: nullptr */ - CIMPP::Seconds td; /* Time constant (<i>Td</i>) (&gt; 0). Typical value = 1,0. Default: nullptr */ - CIMPP::Seconds tn; /* Time constant (<i>Tn</i>) (&gt; 0). Typical value = 1,0. Default: nullptr */ + /** \brief Frequency deadband (<i>f</i><i><sub>cut</sub></i>) (&gt;= 0). Typical value = 0,002. Default: nullptr */ + CIMPP::PU fcut; + + /** \brief Gain (<i>K2</i>). Typical value = 0,75. Default: nullptr */ + CIMPP::PU k2; + + /** \brief Gain (<i>K3</i>). Typical value = 0,5. Default: nullptr */ + CIMPP::PU k3; + + /** \brief Gain (<i>Kd</i>). Typical value = 1,0. Default: nullptr */ + CIMPP::PU kd; + + /** \brief Gain (<i>Kg</i>). Typical value = 1,0. Default: nullptr */ + CIMPP::PU kg; + + /** \brief Gain (<i>Kls</i>) (&gt; 0). Typical value = 0,1. Default: nullptr */ + CIMPP::PU kls; + + /** \brief Gain (<i>Kp</i>). Typical value = 1,0. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Gain (<i>Ks</i>). Typical value = 21,0. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Electric power input selection (Peflag). true = electric power input false = feedback signal. Typical value = false. Default: false */ + CIMPP::Boolean peflag; + + /** \brief High power limit (<i>Pmax</i>) (&gt; GovSteamBB.pmin). Typical value = 1,0. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Low power limit (<i>Pmin</i>) (&lt; GovSteamBB.pmax). Typical value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Time constant (<i>T1</i>). Typical value = 0,05. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Time constant (<i>T4</i>). Typical value = 0,15. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant (<i>T5</i>). Typical value = 12,0. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Time constant (<i>T6</i>). Typical value = 0,75. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time constant (<i>Td</i>) (&gt; 0). Typical value = 1,0. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Time constant (<i>Tn</i>) (&gt; 0). Typical value = 1,0. Default: nullptr */ + CIMPP::Seconds tn; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GovSteamCC.cpp b/CGMES_3.0.0/GovSteamCC.cpp index c5d919075..94a27f8f8 100644 --- a/CGMES_3.0.0/GovSteamCC.cpp +++ b/CGMES_3.0.0/GovSteamCC.cpp @@ -8,28 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -GovSteamCC::GovSteamCC() {}; -GovSteamCC::~GovSteamCC() {}; +GovSteamCC::GovSteamCC() {} +GovSteamCC::~GovSteamCC() {} static const std::list PossibleProfilesForClass = { @@ -72,233 +55,248 @@ GovSteamCC::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteamCC_dhp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_dhp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dhp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_dlp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_dlp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dlp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_fhp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_fhp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fhp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_flp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_flp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->flp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_pmaxhp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_pmaxhp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmaxhp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_pmaxlp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_pmaxlp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmaxlp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_rhp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_rhp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rhp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_rlp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_rlp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rlp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_t1hp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_t1hp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1hp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_t1lp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_t1lp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1lp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_t3hp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_t3hp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3hp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_t3lp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_t3lp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3lp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_t4hp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_t4hp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4hp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_t4lp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_t4lp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4lp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_t5hp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_t5hp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5hp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamCC_t5lp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamCC_t5lp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5lp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteamCC_dhp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dhp; if (!buffer.str().empty()) @@ -312,7 +310,8 @@ bool get_GovSteamCC_dhp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamCC_dlp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dlp; if (!buffer.str().empty()) @@ -326,7 +325,8 @@ bool get_GovSteamCC_dlp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamCC_fhp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fhp; if (!buffer.str().empty()) @@ -340,7 +340,8 @@ bool get_GovSteamCC_fhp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamCC_flp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->flp; if (!buffer.str().empty()) @@ -354,7 +355,8 @@ bool get_GovSteamCC_flp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamCC_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -368,7 +370,8 @@ bool get_GovSteamCC_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamCC_pmaxhp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmaxhp; if (!buffer.str().empty()) @@ -382,7 +385,8 @@ bool get_GovSteamCC_pmaxhp(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamCC_pmaxlp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmaxlp; if (!buffer.str().empty()) @@ -396,7 +400,8 @@ bool get_GovSteamCC_pmaxlp(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamCC_rhp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rhp; if (!buffer.str().empty()) @@ -410,7 +415,8 @@ bool get_GovSteamCC_rhp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamCC_rlp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rlp; if (!buffer.str().empty()) @@ -424,7 +430,8 @@ bool get_GovSteamCC_rlp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamCC_t1hp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1hp; if (!buffer.str().empty()) @@ -438,7 +445,8 @@ bool get_GovSteamCC_t1hp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamCC_t1lp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1lp; if (!buffer.str().empty()) @@ -452,7 +460,8 @@ bool get_GovSteamCC_t1lp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamCC_t3hp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3hp; if (!buffer.str().empty()) @@ -466,7 +475,8 @@ bool get_GovSteamCC_t3hp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamCC_t3lp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3lp; if (!buffer.str().empty()) @@ -480,7 +490,8 @@ bool get_GovSteamCC_t3lp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamCC_t4hp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4hp; if (!buffer.str().empty()) @@ -494,7 +505,8 @@ bool get_GovSteamCC_t4hp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamCC_t4lp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4lp; if (!buffer.str().empty()) @@ -508,7 +520,8 @@ bool get_GovSteamCC_t4lp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamCC_t5hp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5hp; if (!buffer.str().empty()) @@ -522,7 +535,8 @@ bool get_GovSteamCC_t5hp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamCC_t5lp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamCC* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamCC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5lp; if (!buffer.str().empty()) @@ -534,8 +548,6 @@ bool get_GovSteamCC_t5lp(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } - - const char GovSteamCC::debugName[] = "GovSteamCC"; const char* GovSteamCC::debugString() const { @@ -544,28 +556,28 @@ const char* GovSteamCC::debugString() const void GovSteamCC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteamCC"), &GovSteamCC_factory)); + factory_map.emplace("cim:GovSteamCC", &GovSteamCC_factory); } void GovSteamCC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.dhp"), &assign_GovSteamCC_dhp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.dlp"), &assign_GovSteamCC_dlp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.fhp"), &assign_GovSteamCC_fhp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.flp"), &assign_GovSteamCC_flp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.mwbase"), &assign_GovSteamCC_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.pmaxhp"), &assign_GovSteamCC_pmaxhp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.pmaxlp"), &assign_GovSteamCC_pmaxlp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.rhp"), &assign_GovSteamCC_rhp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.rlp"), &assign_GovSteamCC_rlp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.t1hp"), &assign_GovSteamCC_t1hp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.t1lp"), &assign_GovSteamCC_t1lp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.t3hp"), &assign_GovSteamCC_t3hp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.t3lp"), &assign_GovSteamCC_t3lp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.t4hp"), &assign_GovSteamCC_t4hp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.t4lp"), &assign_GovSteamCC_t4lp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.t5hp"), &assign_GovSteamCC_t5hp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamCC.t5lp"), &assign_GovSteamCC_t5lp)); + assign_map.emplace("cim:GovSteamCC.dhp", &assign_GovSteamCC_dhp); + assign_map.emplace("cim:GovSteamCC.dlp", &assign_GovSteamCC_dlp); + assign_map.emplace("cim:GovSteamCC.fhp", &assign_GovSteamCC_fhp); + assign_map.emplace("cim:GovSteamCC.flp", &assign_GovSteamCC_flp); + assign_map.emplace("cim:GovSteamCC.mwbase", &assign_GovSteamCC_mwbase); + assign_map.emplace("cim:GovSteamCC.pmaxhp", &assign_GovSteamCC_pmaxhp); + assign_map.emplace("cim:GovSteamCC.pmaxlp", &assign_GovSteamCC_pmaxlp); + assign_map.emplace("cim:GovSteamCC.rhp", &assign_GovSteamCC_rhp); + assign_map.emplace("cim:GovSteamCC.rlp", &assign_GovSteamCC_rlp); + assign_map.emplace("cim:GovSteamCC.t1hp", &assign_GovSteamCC_t1hp); + assign_map.emplace("cim:GovSteamCC.t1lp", &assign_GovSteamCC_t1lp); + assign_map.emplace("cim:GovSteamCC.t3hp", &assign_GovSteamCC_t3hp); + assign_map.emplace("cim:GovSteamCC.t3lp", &assign_GovSteamCC_t3lp); + assign_map.emplace("cim:GovSteamCC.t4hp", &assign_GovSteamCC_t4hp); + assign_map.emplace("cim:GovSteamCC.t4lp", &assign_GovSteamCC_t4lp); + assign_map.emplace("cim:GovSteamCC.t5hp", &assign_GovSteamCC_t5hp); + assign_map.emplace("cim:GovSteamCC.t5lp", &assign_GovSteamCC_t5lp); } void GovSteamCC::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/GovSteamCC.hpp b/CGMES_3.0.0/GovSteamCC.hpp index 02042bb9d..0cfd33fc6 100644 --- a/CGMES_3.0.0/GovSteamCC.hpp +++ b/CGMES_3.0.0/GovSteamCC.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Cross compound turbine governor. Unlike tandem compound units, cross compound units are not on the same shaft. - */ + /** \brief Cross compound turbine governor. Unlike tandem compound units, cross compound units are not on the same shaft. */ class GovSteamCC : public CrossCompoundTurbineGovernorDynamics { public: @@ -29,23 +27,56 @@ namespace CIMPP GovSteamCC(); ~GovSteamCC() override; - CIMPP::PU dhp; /* HP damping factor (<i>Dhp</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU dlp; /* LP damping factor (<i>Dlp</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU fhp; /* Fraction of HP power ahead of reheater (<i>Fhp</i>). Typical value = 0,3. Default: nullptr */ - CIMPP::PU flp; /* Fraction of LP power ahead of reheater (<i>Flp</i>). Typical value = 0,7. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ - CIMPP::PU pmaxhp; /* Maximum HP value position (<i>Pmaxhp</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU pmaxlp; /* Maximum LP value position (<i>Pmaxlp</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU rhp; /* HP governor droop (<i>Rhp</i>) (&gt; 0). Typical value = 0,05. Default: nullptr */ - CIMPP::PU rlp; /* LP governor droop (<i>Rlp</i>) (&gt; 0). Typical value = 0,05. Default: nullptr */ - CIMPP::Seconds t1hp; /* HP governor time constant (<i>T1hp</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds t1lp; /* LP governor time constant (<i>T1lp</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds t3hp; /* HP turbine time constant (<i>T3hp</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds t3lp; /* LP turbine time constant (<i>T3lp</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds t4hp; /* HP turbine time constant (<i>T4hp</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds t4lp; /* LP turbine time constant (<i>T4lp</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds t5hp; /* HP reheater time constant (<i>T5hp</i>) (&gt;= 0). Typical value = 10. Default: nullptr */ - CIMPP::Seconds t5lp; /* LP reheater time constant (<i>T5lp</i>) (&gt;= 0). Typical value = 10. Default: nullptr */ + /** \brief HP damping factor (<i>Dhp</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU dhp; + + /** \brief LP damping factor (<i>Dlp</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU dlp; + + /** \brief Fraction of HP power ahead of reheater (<i>Fhp</i>). Typical value = 0,3. Default: nullptr */ + CIMPP::PU fhp; + + /** \brief Fraction of LP power ahead of reheater (<i>Flp</i>). Typical value = 0,7. Default: nullptr */ + CIMPP::PU flp; + + /** \brief Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Maximum HP value position (<i>Pmaxhp</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU pmaxhp; + + /** \brief Maximum LP value position (<i>Pmaxlp</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU pmaxlp; + + /** \brief HP governor droop (<i>Rhp</i>) (&gt; 0). Typical value = 0,05. Default: nullptr */ + CIMPP::PU rhp; + + /** \brief LP governor droop (<i>Rlp</i>) (&gt; 0). Typical value = 0,05. Default: nullptr */ + CIMPP::PU rlp; + + /** \brief HP governor time constant (<i>T1hp</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds t1hp; + + /** \brief LP governor time constant (<i>T1lp</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds t1lp; + + /** \brief HP turbine time constant (<i>T3hp</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds t3hp; + + /** \brief LP turbine time constant (<i>T3lp</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds t3lp; + + /** \brief HP turbine time constant (<i>T4hp</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds t4hp; + + /** \brief LP turbine time constant (<i>T4lp</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds t4lp; + + /** \brief HP reheater time constant (<i>T5hp</i>) (&gt;= 0). Typical value = 10. Default: nullptr */ + CIMPP::Seconds t5hp; + + /** \brief LP reheater time constant (<i>T5lp</i>) (&gt;= 0). Typical value = 10. Default: nullptr */ + CIMPP::Seconds t5lp; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GovSteamEU.cpp b/CGMES_3.0.0/GovSteamEU.cpp index 238e5779b..24af398e3 100644 --- a/CGMES_3.0.0/GovSteamEU.cpp +++ b/CGMES_3.0.0/GovSteamEU.cpp @@ -8,46 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Float.hpp" -#include "Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -GovSteamEU::GovSteamEU() {}; -GovSteamEU::~GovSteamEU() {}; +GovSteamEU::GovSteamEU() {} +GovSteamEU::~GovSteamEU() {} static const std::list PossibleProfilesForClass = { @@ -108,467 +73,500 @@ GovSteamEU::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteamEU_chc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_chc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->chc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_cho(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_cho(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->cho; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_cic(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_cic(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->cic; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_cio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_cio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->cio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_db1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_db1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_db2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_db2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_hhpmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_hhpmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->hhpmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_ke(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_ke(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ke; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_kfcor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_kfcor(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kfcor; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_khp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_khp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->khp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_klp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_klp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->klp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_komegacor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_komegacor(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->komegacor; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_prhmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_prhmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->prhmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_simx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_simx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->simx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tdp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tdp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_ten(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_ten(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ten; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tfp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tfp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tfp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_thp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_thp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->thp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tip(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tip; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tlp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tlp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tlp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_trh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_trh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->trh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tvhp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tvhp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tvhp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tvip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tvip(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tvip; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_tw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_tw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_wfmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_wfmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wfmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_wfmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_wfmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wfmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_wmax1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_wmax1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wmax1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_wmax2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_wmax2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wmax2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_wwmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_wwmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wwmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamEU_wwmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamEU_wwmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->wwmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteamEU_chc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->chc; if (!buffer.str().empty()) @@ -582,7 +580,8 @@ bool get_GovSteamEU_chc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_cho(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->cho; if (!buffer.str().empty()) @@ -596,7 +595,8 @@ bool get_GovSteamEU_cho(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_cic(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->cic; if (!buffer.str().empty()) @@ -610,7 +610,8 @@ bool get_GovSteamEU_cic(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_cio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->cio; if (!buffer.str().empty()) @@ -624,7 +625,8 @@ bool get_GovSteamEU_cio(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db1; if (!buffer.str().empty()) @@ -638,7 +640,8 @@ bool get_GovSteamEU_db1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db2; if (!buffer.str().empty()) @@ -652,7 +655,8 @@ bool get_GovSteamEU_db2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_hhpmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hhpmax; if (!buffer.str().empty()) @@ -666,7 +670,8 @@ bool get_GovSteamEU_hhpmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamEU_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ke; if (!buffer.str().empty()) @@ -680,7 +685,8 @@ bool get_GovSteamEU_ke(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamEU_kfcor(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kfcor; if (!buffer.str().empty()) @@ -694,7 +700,8 @@ bool get_GovSteamEU_kfcor(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamEU_khp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->khp; if (!buffer.str().empty()) @@ -708,7 +715,8 @@ bool get_GovSteamEU_khp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_klp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->klp; if (!buffer.str().empty()) @@ -722,7 +730,8 @@ bool get_GovSteamEU_klp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_komegacor(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->komegacor; if (!buffer.str().empty()) @@ -736,7 +745,8 @@ bool get_GovSteamEU_komegacor(const BaseClass* BaseClass_ptr1, std::stringstream bool get_GovSteamEU_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -750,7 +760,8 @@ bool get_GovSteamEU_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamEU_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -764,7 +775,8 @@ bool get_GovSteamEU_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamEU_prhmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->prhmax; if (!buffer.str().empty()) @@ -778,7 +790,8 @@ bool get_GovSteamEU_prhmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamEU_simx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->simx; if (!buffer.str().empty()) @@ -792,7 +805,8 @@ bool get_GovSteamEU_simx(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamEU_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -806,7 +820,8 @@ bool get_GovSteamEU_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamEU_tdp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdp; if (!buffer.str().empty()) @@ -820,7 +835,8 @@ bool get_GovSteamEU_tdp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_ten(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ten; if (!buffer.str().empty()) @@ -834,7 +850,8 @@ bool get_GovSteamEU_ten(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -848,7 +865,8 @@ bool get_GovSteamEU_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamEU_tfp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tfp; if (!buffer.str().empty()) @@ -862,7 +880,8 @@ bool get_GovSteamEU_tfp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_thp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thp; if (!buffer.str().empty()) @@ -876,7 +895,8 @@ bool get_GovSteamEU_thp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_tip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tip; if (!buffer.str().empty()) @@ -890,7 +910,8 @@ bool get_GovSteamEU_tip(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_tlp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tlp; if (!buffer.str().empty()) @@ -904,7 +925,8 @@ bool get_GovSteamEU_tlp(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -918,7 +940,8 @@ bool get_GovSteamEU_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamEU_trh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->trh; if (!buffer.str().empty()) @@ -932,7 +955,8 @@ bool get_GovSteamEU_trh(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamEU_tvhp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tvhp; if (!buffer.str().empty()) @@ -946,7 +970,8 @@ bool get_GovSteamEU_tvhp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamEU_tvip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tvip; if (!buffer.str().empty()) @@ -960,7 +985,8 @@ bool get_GovSteamEU_tvip(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamEU_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw; if (!buffer.str().empty()) @@ -974,7 +1000,8 @@ bool get_GovSteamEU_tw(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamEU_wfmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wfmax; if (!buffer.str().empty()) @@ -988,7 +1015,8 @@ bool get_GovSteamEU_wfmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamEU_wfmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wfmin; if (!buffer.str().empty()) @@ -1002,7 +1030,8 @@ bool get_GovSteamEU_wfmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamEU_wmax1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wmax1; if (!buffer.str().empty()) @@ -1016,7 +1045,8 @@ bool get_GovSteamEU_wmax1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamEU_wmax2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wmax2; if (!buffer.str().empty()) @@ -1030,7 +1060,8 @@ bool get_GovSteamEU_wmax2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamEU_wwmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wwmax; if (!buffer.str().empty()) @@ -1044,7 +1075,8 @@ bool get_GovSteamEU_wwmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamEU_wwmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamEU* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamEU* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->wwmin; if (!buffer.str().empty()) @@ -1056,8 +1088,6 @@ bool get_GovSteamEU_wwmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char GovSteamEU::debugName[] = "GovSteamEU"; const char* GovSteamEU::debugString() const { @@ -1066,46 +1096,46 @@ const char* GovSteamEU::debugString() const void GovSteamEU::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteamEU"), &GovSteamEU_factory)); + factory_map.emplace("cim:GovSteamEU", &GovSteamEU_factory); } void GovSteamEU::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.chc"), &assign_GovSteamEU_chc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.cho"), &assign_GovSteamEU_cho)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.cic"), &assign_GovSteamEU_cic)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.cio"), &assign_GovSteamEU_cio)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.db1"), &assign_GovSteamEU_db1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.db2"), &assign_GovSteamEU_db2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.hhpmax"), &assign_GovSteamEU_hhpmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.ke"), &assign_GovSteamEU_ke)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.kfcor"), &assign_GovSteamEU_kfcor)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.khp"), &assign_GovSteamEU_khp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.klp"), &assign_GovSteamEU_klp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.komegacor"), &assign_GovSteamEU_komegacor)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.mwbase"), &assign_GovSteamEU_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.pmax"), &assign_GovSteamEU_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.prhmax"), &assign_GovSteamEU_prhmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.simx"), &assign_GovSteamEU_simx)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tb"), &assign_GovSteamEU_tb)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tdp"), &assign_GovSteamEU_tdp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.ten"), &assign_GovSteamEU_ten)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tf"), &assign_GovSteamEU_tf)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tfp"), &assign_GovSteamEU_tfp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.thp"), &assign_GovSteamEU_thp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tip"), &assign_GovSteamEU_tip)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tlp"), &assign_GovSteamEU_tlp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tp"), &assign_GovSteamEU_tp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.trh"), &assign_GovSteamEU_trh)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tvhp"), &assign_GovSteamEU_tvhp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tvip"), &assign_GovSteamEU_tvip)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.tw"), &assign_GovSteamEU_tw)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.wfmax"), &assign_GovSteamEU_wfmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.wfmin"), &assign_GovSteamEU_wfmin)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.wmax1"), &assign_GovSteamEU_wmax1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.wmax2"), &assign_GovSteamEU_wmax2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.wwmax"), &assign_GovSteamEU_wwmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamEU.wwmin"), &assign_GovSteamEU_wwmin)); + assign_map.emplace("cim:GovSteamEU.chc", &assign_GovSteamEU_chc); + assign_map.emplace("cim:GovSteamEU.cho", &assign_GovSteamEU_cho); + assign_map.emplace("cim:GovSteamEU.cic", &assign_GovSteamEU_cic); + assign_map.emplace("cim:GovSteamEU.cio", &assign_GovSteamEU_cio); + assign_map.emplace("cim:GovSteamEU.db1", &assign_GovSteamEU_db1); + assign_map.emplace("cim:GovSteamEU.db2", &assign_GovSteamEU_db2); + assign_map.emplace("cim:GovSteamEU.hhpmax", &assign_GovSteamEU_hhpmax); + assign_map.emplace("cim:GovSteamEU.ke", &assign_GovSteamEU_ke); + assign_map.emplace("cim:GovSteamEU.kfcor", &assign_GovSteamEU_kfcor); + assign_map.emplace("cim:GovSteamEU.khp", &assign_GovSteamEU_khp); + assign_map.emplace("cim:GovSteamEU.klp", &assign_GovSteamEU_klp); + assign_map.emplace("cim:GovSteamEU.komegacor", &assign_GovSteamEU_komegacor); + assign_map.emplace("cim:GovSteamEU.mwbase", &assign_GovSteamEU_mwbase); + assign_map.emplace("cim:GovSteamEU.pmax", &assign_GovSteamEU_pmax); + assign_map.emplace("cim:GovSteamEU.prhmax", &assign_GovSteamEU_prhmax); + assign_map.emplace("cim:GovSteamEU.simx", &assign_GovSteamEU_simx); + assign_map.emplace("cim:GovSteamEU.tb", &assign_GovSteamEU_tb); + assign_map.emplace("cim:GovSteamEU.tdp", &assign_GovSteamEU_tdp); + assign_map.emplace("cim:GovSteamEU.ten", &assign_GovSteamEU_ten); + assign_map.emplace("cim:GovSteamEU.tf", &assign_GovSteamEU_tf); + assign_map.emplace("cim:GovSteamEU.tfp", &assign_GovSteamEU_tfp); + assign_map.emplace("cim:GovSteamEU.thp", &assign_GovSteamEU_thp); + assign_map.emplace("cim:GovSteamEU.tip", &assign_GovSteamEU_tip); + assign_map.emplace("cim:GovSteamEU.tlp", &assign_GovSteamEU_tlp); + assign_map.emplace("cim:GovSteamEU.tp", &assign_GovSteamEU_tp); + assign_map.emplace("cim:GovSteamEU.trh", &assign_GovSteamEU_trh); + assign_map.emplace("cim:GovSteamEU.tvhp", &assign_GovSteamEU_tvhp); + assign_map.emplace("cim:GovSteamEU.tvip", &assign_GovSteamEU_tvip); + assign_map.emplace("cim:GovSteamEU.tw", &assign_GovSteamEU_tw); + assign_map.emplace("cim:GovSteamEU.wfmax", &assign_GovSteamEU_wfmax); + assign_map.emplace("cim:GovSteamEU.wfmin", &assign_GovSteamEU_wfmin); + assign_map.emplace("cim:GovSteamEU.wmax1", &assign_GovSteamEU_wmax1); + assign_map.emplace("cim:GovSteamEU.wmax2", &assign_GovSteamEU_wmax2); + assign_map.emplace("cim:GovSteamEU.wwmax", &assign_GovSteamEU_wwmax); + assign_map.emplace("cim:GovSteamEU.wwmin", &assign_GovSteamEU_wwmin); } void GovSteamEU::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/GovSteamEU.hpp b/CGMES_3.0.0/GovSteamEU.hpp index b6cd3a5a5..aa5f7121b 100644 --- a/CGMES_3.0.0/GovSteamEU.hpp +++ b/CGMES_3.0.0/GovSteamEU.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Simplified boiler and steam turbine with PID governor. - */ + /** \brief Simplified boiler and steam turbine with PID governor. */ class GovSteamEU : public TurbineGovernorDynamics { public: @@ -30,41 +28,110 @@ namespace CIMPP GovSteamEU(); ~GovSteamEU() override; - CIMPP::Float chc; /* Control valves rate closing limit (<i>Chc</i>). Unit = PU / s. Typical value = -3,3. Default: 0.0 */ - CIMPP::Float cho; /* Control valves rate opening limit (<i>Cho</i>). Unit = PU / s. Typical value = 0,17. Default: 0.0 */ - CIMPP::PU cic; /* Intercept valves rate closing limit (<i>Cic</i>). Typical value = -2,2. Default: nullptr */ - CIMPP::PU cio; /* Intercept valves rate opening limit (<i>Cio</i>). Typical value = 0,123. Default: nullptr */ - CIMPP::PU db1; /* Deadband of the frequency corrector (<i>db1</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU db2; /* Deadband of the speed governor (<i>db2</i>). Typical value = 0,0004. Default: nullptr */ - CIMPP::PU hhpmax; /* Maximum control valve position (<i>Hhpmax</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU ke; /* Gain of the power controller (<i>Ke</i>). Typical value = 0,65. Default: nullptr */ - CIMPP::PU kfcor; /* Gain of the frequency corrector (<i>Kfcor</i>). Typical value = 20. Default: nullptr */ - CIMPP::PU khp; /* Fraction of total turbine output generated by HP part (<i>Khp</i>). Typical value = 0,277. Default: nullptr */ - CIMPP::PU klp; /* Fraction of total turbine output generated by HP part (<i>Klp</i>). Typical value = 0,723. Default: nullptr */ - CIMPP::PU komegacor; /* Gain of the speed governor (<i>Kwcor</i>). Typical value = 20. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ - CIMPP::PU pmax; /* Maximal active power of the turbine (<i>Pmax</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU prhmax; /* Maximum low pressure limit (<i>Prhmax</i>). Typical value = 1,4. Default: nullptr */ - CIMPP::PU simx; /* Intercept valves transfer limit (<i>Simx</i>). Typical value = 0,425. Default: nullptr */ - CIMPP::Seconds tb; /* Boiler time constant (<i>Tb</i>) (&gt;= 0). Typical value = 100. Default: nullptr */ - CIMPP::Seconds tdp; /* Derivative time constant of the power controller (<i>Tdp</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds ten; /* Electro hydraulic transducer (<i>Ten</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds tf; /* Frequency transducer time constant (<i>Tf</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tfp; /* Time constant of the power controller (<i>Tfp</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds thp; /* High pressure (HP) time constant of the turbine (<i>Thp</i>) (&gt;= 0). Typical value = 0,31. Default: nullptr */ - CIMPP::Seconds tip; /* Integral time constant of the power controller (<i>Tip</i>) (&gt;= 0). Typical value = 2. Default: nullptr */ - CIMPP::Seconds tlp; /* Low pressure (LP) time constant of the turbine (<i>Tlp</i>) (&gt;= 0). Typical value = 0,45. Default: nullptr */ - CIMPP::Seconds tp; /* Power transducer time constant (<i>Tp</i>) (&gt;= 0). Typical value = 0,07. Default: nullptr */ - CIMPP::Seconds trh; /* Reheater time constant of the turbine (<i>Trh</i>) (&gt;= 0). Typical value = 8. Default: nullptr */ - CIMPP::Seconds tvhp; /* Control valves servo time constant (<i>Tvhp</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds tvip; /* Intercept valves servo time constant (<i>Tvip</i>) (&gt;= 0). Typical value = 0,15. Default: nullptr */ - CIMPP::Seconds tw; /* Speed transducer time constant (<i>Tw</i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ - CIMPP::PU wfmax; /* Upper limit for frequency correction (<i>Wfmax</i>) (&gt; GovSteamEU.wfmin). Typical value = 0,05. Default: nullptr */ - CIMPP::PU wfmin; /* Lower limit for frequency correction (<i>Wfmin</i>) (&lt; GovSteamEU.wfmax). Typical value = -0,05. Default: nullptr */ - CIMPP::PU wmax1; /* Emergency speed control lower limit (<i>wmax1</i>). Typical value = 1,025. Default: nullptr */ - CIMPP::PU wmax2; /* Emergency speed control upper limit (<i>wmax2</i>). Typical value = 1,05. Default: nullptr */ - CIMPP::PU wwmax; /* Upper limit for the speed governor (<i>Wwmax</i>) (&gt; GovSteamEU.wwmin). Typical value = 0,1. Default: nullptr */ - CIMPP::PU wwmin; /* Lower limit for the speed governor frequency correction (<i>Wwmin</i>) (&lt; GovSteamEU.wwmax). Typical value = -1. Default: nullptr */ + /** \brief Control valves rate closing limit (<i>Chc</i>). Unit = PU / s. Typical value = -3,3. Default: 0.0 */ + CIMPP::Float chc; + + /** \brief Control valves rate opening limit (<i>Cho</i>). Unit = PU / s. Typical value = 0,17. Default: 0.0 */ + CIMPP::Float cho; + + /** \brief Intercept valves rate closing limit (<i>Cic</i>). Typical value = -2,2. Default: nullptr */ + CIMPP::PU cic; + + /** \brief Intercept valves rate opening limit (<i>Cio</i>). Typical value = 0,123. Default: nullptr */ + CIMPP::PU cio; + + /** \brief Deadband of the frequency corrector (<i>db1</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU db1; + + /** \brief Deadband of the speed governor (<i>db2</i>). Typical value = 0,0004. Default: nullptr */ + CIMPP::PU db2; + + /** \brief Maximum control valve position (<i>Hhpmax</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU hhpmax; + + /** \brief Gain of the power controller (<i>Ke</i>). Typical value = 0,65. Default: nullptr */ + CIMPP::PU ke; + + /** \brief Gain of the frequency corrector (<i>Kfcor</i>). Typical value = 20. Default: nullptr */ + CIMPP::PU kfcor; + + /** \brief Fraction of total turbine output generated by HP part (<i>Khp</i>). Typical value = 0,277. Default: nullptr */ + CIMPP::PU khp; + + /** \brief Fraction of total turbine output generated by HP part (<i>Klp</i>). Typical value = 0,723. Default: nullptr */ + CIMPP::PU klp; + + /** \brief Gain of the speed governor (<i>Kwcor</i>). Typical value = 20. Default: nullptr */ + CIMPP::PU komegacor; + + /** \brief Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Maximal active power of the turbine (<i>Pmax</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Maximum low pressure limit (<i>Prhmax</i>). Typical value = 1,4. Default: nullptr */ + CIMPP::PU prhmax; + + /** \brief Intercept valves transfer limit (<i>Simx</i>). Typical value = 0,425. Default: nullptr */ + CIMPP::PU simx; + + /** \brief Boiler time constant (<i>Tb</i>) (&gt;= 0). Typical value = 100. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Derivative time constant of the power controller (<i>Tdp</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tdp; + + /** \brief Electro hydraulic transducer (<i>Ten</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds ten; + + /** \brief Frequency transducer time constant (<i>Tf</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Time constant of the power controller (<i>Tfp</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tfp; + + /** \brief High pressure (HP) time constant of the turbine (<i>Thp</i>) (&gt;= 0). Typical value = 0,31. Default: nullptr */ + CIMPP::Seconds thp; + + /** \brief Integral time constant of the power controller (<i>Tip</i>) (&gt;= 0). Typical value = 2. Default: nullptr */ + CIMPP::Seconds tip; + + /** \brief Low pressure (LP) time constant of the turbine (<i>Tlp</i>) (&gt;= 0). Typical value = 0,45. Default: nullptr */ + CIMPP::Seconds tlp; + + /** \brief Power transducer time constant (<i>Tp</i>) (&gt;= 0). Typical value = 0,07. Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Reheater time constant of the turbine (<i>Trh</i>) (&gt;= 0). Typical value = 8. Default: nullptr */ + CIMPP::Seconds trh; + + /** \brief Control valves servo time constant (<i>Tvhp</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds tvhp; + + /** \brief Intercept valves servo time constant (<i>Tvip</i>) (&gt;= 0). Typical value = 0,15. Default: nullptr */ + CIMPP::Seconds tvip; + + /** \brief Speed transducer time constant (<i>Tw</i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ + CIMPP::Seconds tw; + + /** \brief Upper limit for frequency correction (<i>Wfmax</i>) (&gt; GovSteamEU.wfmin). Typical value = 0,05. Default: nullptr */ + CIMPP::PU wfmax; + + /** \brief Lower limit for frequency correction (<i>Wfmin</i>) (&lt; GovSteamEU.wfmax). Typical value = -0,05. Default: nullptr */ + CIMPP::PU wfmin; + + /** \brief Emergency speed control lower limit (<i>wmax1</i>). Typical value = 1,025. Default: nullptr */ + CIMPP::PU wmax1; + + /** \brief Emergency speed control upper limit (<i>wmax2</i>). Typical value = 1,05. Default: nullptr */ + CIMPP::PU wmax2; + + /** \brief Upper limit for the speed governor (<i>Wwmax</i>) (&gt; GovSteamEU.wwmin). Typical value = 0,1. Default: nullptr */ + CIMPP::PU wwmax; + + /** \brief Lower limit for the speed governor frequency correction (<i>Wwmin</i>) (&lt; GovSteamEU.wwmax). Typical value = -1. Default: nullptr */ + CIMPP::PU wwmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GovSteamFV2.cpp b/CGMES_3.0.0/GovSteamFV2.cpp index 8f6373166..aaf661e3a 100644 --- a/CGMES_3.0.0/GovSteamFV2.cpp +++ b/CGMES_3.0.0/GovSteamFV2.cpp @@ -8,23 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -GovSteamFV2::GovSteamFV2() {}; -GovSteamFV2::~GovSteamFV2() {}; +GovSteamFV2::GovSteamFV2() {} +GovSteamFV2::~GovSteamFV2() {} static const std::list PossibleProfilesForClass = { @@ -62,168 +50,178 @@ GovSteamFV2::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteamFV2_dt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_dt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_tt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_vmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_vmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV2_vmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV2_vmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteamFV2_dt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dt; if (!buffer.str().empty()) @@ -237,7 +235,8 @@ bool get_GovSteamFV2_dt(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV2_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -251,7 +250,8 @@ bool get_GovSteamFV2_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamFV2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -265,7 +265,8 @@ bool get_GovSteamFV2_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovSteamFV2_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -279,7 +280,8 @@ bool get_GovSteamFV2_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamFV2_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -293,7 +295,8 @@ bool get_GovSteamFV2_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV2_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -307,7 +310,8 @@ bool get_GovSteamFV2_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV2_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -321,7 +325,8 @@ bool get_GovSteamFV2_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV2_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -335,7 +340,8 @@ bool get_GovSteamFV2_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV2_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -349,7 +355,8 @@ bool get_GovSteamFV2_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV2_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tt; if (!buffer.str().empty()) @@ -363,7 +370,8 @@ bool get_GovSteamFV2_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV2_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmax; if (!buffer.str().empty()) @@ -377,7 +385,8 @@ bool get_GovSteamFV2_vmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV2_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vmin; if (!buffer.str().empty()) @@ -389,8 +398,6 @@ bool get_GovSteamFV2_vmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char GovSteamFV2::debugName[] = "GovSteamFV2"; const char* GovSteamFV2::debugString() const { @@ -399,23 +406,23 @@ const char* GovSteamFV2::debugString() const void GovSteamFV2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteamFV2"), &GovSteamFV2_factory)); + factory_map.emplace("cim:GovSteamFV2", &GovSteamFV2_factory); } void GovSteamFV2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.dt"), &assign_GovSteamFV2_dt)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.k"), &assign_GovSteamFV2_k)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.mwbase"), &assign_GovSteamFV2_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.r"), &assign_GovSteamFV2_r)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.t1"), &assign_GovSteamFV2_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.t3"), &assign_GovSteamFV2_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.ta"), &assign_GovSteamFV2_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.tb"), &assign_GovSteamFV2_tb)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.tc"), &assign_GovSteamFV2_tc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.tt"), &assign_GovSteamFV2_tt)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.vmax"), &assign_GovSteamFV2_vmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV2.vmin"), &assign_GovSteamFV2_vmin)); + assign_map.emplace("cim:GovSteamFV2.dt", &assign_GovSteamFV2_dt); + assign_map.emplace("cim:GovSteamFV2.k", &assign_GovSteamFV2_k); + assign_map.emplace("cim:GovSteamFV2.mwbase", &assign_GovSteamFV2_mwbase); + assign_map.emplace("cim:GovSteamFV2.r", &assign_GovSteamFV2_r); + assign_map.emplace("cim:GovSteamFV2.t1", &assign_GovSteamFV2_t1); + assign_map.emplace("cim:GovSteamFV2.t3", &assign_GovSteamFV2_t3); + assign_map.emplace("cim:GovSteamFV2.ta", &assign_GovSteamFV2_ta); + assign_map.emplace("cim:GovSteamFV2.tb", &assign_GovSteamFV2_tb); + assign_map.emplace("cim:GovSteamFV2.tc", &assign_GovSteamFV2_tc); + assign_map.emplace("cim:GovSteamFV2.tt", &assign_GovSteamFV2_tt); + assign_map.emplace("cim:GovSteamFV2.vmax", &assign_GovSteamFV2_vmax); + assign_map.emplace("cim:GovSteamFV2.vmin", &assign_GovSteamFV2_vmin); } void GovSteamFV2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/GovSteamFV2.hpp b/CGMES_3.0.0/GovSteamFV2.hpp index 3e9e45306..bea8ec8d1 100644 --- a/CGMES_3.0.0/GovSteamFV2.hpp +++ b/CGMES_3.0.0/GovSteamFV2.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Steam turbine governor with reheat time constants and modelling of the effects of fast valve closing to reduce mechanical power. - */ + /** \brief Steam turbine governor with reheat time constants and modelling of the effects of fast valve closing to reduce mechanical power. */ class GovSteamFV2 : public TurbineGovernorDynamics { public: @@ -29,18 +27,41 @@ namespace CIMPP GovSteamFV2(); ~GovSteamFV2() override; - CIMPP::PU dt; /* (<i>Dt</i>). Default: nullptr */ - CIMPP::PU k; /* Fraction of the turbine power developed by turbine sections not involved in fast valving (<i>K</i>). Default: nullptr */ - CIMPP::ActivePower mwbase; /* Alternate base used instead of machine base in equipment model if necessary (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ - CIMPP::PU r; /* (<i>R</i>). Default: nullptr */ - CIMPP::Seconds t1; /* Governor time constant (<i>T1</i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds t3; /* Reheater time constant (<i>T3</i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds ta; /* Time after initial time for valve to close (<i>Ta</i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds tb; /* Time after initial time for valve to begin opening (<i>Tb</i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds tc; /* Time after initial time for valve to become fully open (<i>Tc</i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds tt; /* Time constant with which power falls off after intercept valve closure (<i>Tt</i>) (&gt;= 0). Default: nullptr */ - CIMPP::PU vmax; /* (<i>Vmax</i>) (&gt; GovSteamFV2.vmin). Default: nullptr */ - CIMPP::PU vmin; /* (<i>Vmin</i>) (&lt; GovSteamFV2.vmax). Default: nullptr */ + /** \brief (<i>Dt</i>). Default: nullptr */ + CIMPP::PU dt; + + /** \brief Fraction of the turbine power developed by turbine sections not involved in fast valving (<i>K</i>). Default: nullptr */ + CIMPP::PU k; + + /** \brief Alternate base used instead of machine base in equipment model if necessary (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief (<i>R</i>). Default: nullptr */ + CIMPP::PU r; + + /** \brief Governor time constant (<i>T1</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Reheater time constant (<i>T3</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Time after initial time for valve to close (<i>Ta</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Time after initial time for valve to begin opening (<i>Tb</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Time after initial time for valve to become fully open (<i>Tc</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Time constant with which power falls off after intercept valve closure (<i>Tt</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds tt; + + /** \brief (<i>Vmax</i>) (&gt; GovSteamFV2.vmin). Default: nullptr */ + CIMPP::PU vmax; + + /** \brief (<i>Vmin</i>) (&lt; GovSteamFV2.vmax). Default: nullptr */ + CIMPP::PU vmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GovSteamFV3.cpp b/CGMES_3.0.0/GovSteamFV3.cpp index 30bedaf5d..d3d30e2b3 100644 --- a/CGMES_3.0.0/GovSteamFV3.cpp +++ b/CGMES_3.0.0/GovSteamFV3.cpp @@ -8,42 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Float.hpp" -#include "Float.hpp" using namespace CIMPP; -GovSteamFV3::GovSteamFV3() {}; -GovSteamFV3::~GovSteamFV3() {}; +GovSteamFV3::GovSteamFV3() {} +GovSteamFV3::~GovSteamFV3() {} static const std::list PossibleProfilesForClass = { @@ -100,415 +69,444 @@ GovSteamFV3::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteamFV3_gv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_gv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_gv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_gv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_gv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_gv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_gv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_gv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_gv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_gv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_gv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_gv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_pgv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_pgv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_pgv2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_pgv2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_pgv3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_pgv3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_pgv4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_pgv4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_pgv5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_pgv5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_pgv6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_pgv6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pgv6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_prmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_prmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->prmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_uc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV3_uo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV3_uo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteamFV3_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv1; if (!buffer.str().empty()) @@ -522,7 +520,8 @@ bool get_GovSteamFV3_gv1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV3_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv2; if (!buffer.str().empty()) @@ -536,7 +535,8 @@ bool get_GovSteamFV3_gv2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV3_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv3; if (!buffer.str().empty()) @@ -550,7 +550,8 @@ bool get_GovSteamFV3_gv3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV3_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv4; if (!buffer.str().empty()) @@ -564,7 +565,8 @@ bool get_GovSteamFV3_gv4(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV3_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv5; if (!buffer.str().empty()) @@ -578,7 +580,8 @@ bool get_GovSteamFV3_gv5(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV3_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gv6; if (!buffer.str().empty()) @@ -592,7 +595,8 @@ bool get_GovSteamFV3_gv6(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV3_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -606,7 +610,8 @@ bool get_GovSteamFV3_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamFV3_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -620,7 +625,8 @@ bool get_GovSteamFV3_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -634,7 +640,8 @@ bool get_GovSteamFV3_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -648,7 +655,8 @@ bool get_GovSteamFV3_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -662,7 +670,8 @@ bool get_GovSteamFV3_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovSteamFV3_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv1; if (!buffer.str().empty()) @@ -676,7 +685,8 @@ bool get_GovSteamFV3_pgv1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV3_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv2; if (!buffer.str().empty()) @@ -690,7 +700,8 @@ bool get_GovSteamFV3_pgv2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV3_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv3; if (!buffer.str().empty()) @@ -704,7 +715,8 @@ bool get_GovSteamFV3_pgv3(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV3_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv4; if (!buffer.str().empty()) @@ -718,7 +730,8 @@ bool get_GovSteamFV3_pgv4(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV3_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv5; if (!buffer.str().empty()) @@ -732,7 +745,8 @@ bool get_GovSteamFV3_pgv5(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV3_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pgv6; if (!buffer.str().empty()) @@ -746,7 +760,8 @@ bool get_GovSteamFV3_pgv6(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV3_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -760,7 +775,8 @@ bool get_GovSteamFV3_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV3_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -774,7 +790,8 @@ bool get_GovSteamFV3_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV3_prmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->prmax; if (!buffer.str().empty()) @@ -788,7 +805,8 @@ bool get_GovSteamFV3_prmax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamFV3_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -802,7 +820,8 @@ bool get_GovSteamFV3_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -816,7 +835,8 @@ bool get_GovSteamFV3_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -830,7 +850,8 @@ bool get_GovSteamFV3_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -844,7 +865,8 @@ bool get_GovSteamFV3_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -858,7 +880,8 @@ bool get_GovSteamFV3_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -872,7 +895,8 @@ bool get_GovSteamFV3_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -886,7 +910,8 @@ bool get_GovSteamFV3_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -900,7 +925,8 @@ bool get_GovSteamFV3_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -914,7 +940,8 @@ bool get_GovSteamFV3_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uc; if (!buffer.str().empty()) @@ -928,7 +955,8 @@ bool get_GovSteamFV3_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV3_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uo; if (!buffer.str().empty()) @@ -940,8 +968,6 @@ bool get_GovSteamFV3_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char GovSteamFV3::debugName[] = "GovSteamFV3"; const char* GovSteamFV3::debugString() const { @@ -950,42 +976,42 @@ const char* GovSteamFV3::debugString() const void GovSteamFV3::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteamFV3"), &GovSteamFV3_factory)); + factory_map.emplace("cim:GovSteamFV3", &GovSteamFV3_factory); } void GovSteamFV3::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.gv1"), &assign_GovSteamFV3_gv1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.gv2"), &assign_GovSteamFV3_gv2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.gv3"), &assign_GovSteamFV3_gv3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.gv4"), &assign_GovSteamFV3_gv4)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.gv5"), &assign_GovSteamFV3_gv5)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.gv6"), &assign_GovSteamFV3_gv6)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.k"), &assign_GovSteamFV3_k)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.k1"), &assign_GovSteamFV3_k1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.k2"), &assign_GovSteamFV3_k2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.k3"), &assign_GovSteamFV3_k3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.mwbase"), &assign_GovSteamFV3_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.pgv1"), &assign_GovSteamFV3_pgv1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.pgv2"), &assign_GovSteamFV3_pgv2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.pgv3"), &assign_GovSteamFV3_pgv3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.pgv4"), &assign_GovSteamFV3_pgv4)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.pgv5"), &assign_GovSteamFV3_pgv5)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.pgv6"), &assign_GovSteamFV3_pgv6)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.pmax"), &assign_GovSteamFV3_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.pmin"), &assign_GovSteamFV3_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.prmax"), &assign_GovSteamFV3_prmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.t1"), &assign_GovSteamFV3_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.t2"), &assign_GovSteamFV3_t2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.t3"), &assign_GovSteamFV3_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.t4"), &assign_GovSteamFV3_t4)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.t5"), &assign_GovSteamFV3_t5)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.t6"), &assign_GovSteamFV3_t6)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.ta"), &assign_GovSteamFV3_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.tb"), &assign_GovSteamFV3_tb)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.tc"), &assign_GovSteamFV3_tc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.uc"), &assign_GovSteamFV3_uc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV3.uo"), &assign_GovSteamFV3_uo)); + assign_map.emplace("cim:GovSteamFV3.gv1", &assign_GovSteamFV3_gv1); + assign_map.emplace("cim:GovSteamFV3.gv2", &assign_GovSteamFV3_gv2); + assign_map.emplace("cim:GovSteamFV3.gv3", &assign_GovSteamFV3_gv3); + assign_map.emplace("cim:GovSteamFV3.gv4", &assign_GovSteamFV3_gv4); + assign_map.emplace("cim:GovSteamFV3.gv5", &assign_GovSteamFV3_gv5); + assign_map.emplace("cim:GovSteamFV3.gv6", &assign_GovSteamFV3_gv6); + assign_map.emplace("cim:GovSteamFV3.k", &assign_GovSteamFV3_k); + assign_map.emplace("cim:GovSteamFV3.k1", &assign_GovSteamFV3_k1); + assign_map.emplace("cim:GovSteamFV3.k2", &assign_GovSteamFV3_k2); + assign_map.emplace("cim:GovSteamFV3.k3", &assign_GovSteamFV3_k3); + assign_map.emplace("cim:GovSteamFV3.mwbase", &assign_GovSteamFV3_mwbase); + assign_map.emplace("cim:GovSteamFV3.pgv1", &assign_GovSteamFV3_pgv1); + assign_map.emplace("cim:GovSteamFV3.pgv2", &assign_GovSteamFV3_pgv2); + assign_map.emplace("cim:GovSteamFV3.pgv3", &assign_GovSteamFV3_pgv3); + assign_map.emplace("cim:GovSteamFV3.pgv4", &assign_GovSteamFV3_pgv4); + assign_map.emplace("cim:GovSteamFV3.pgv5", &assign_GovSteamFV3_pgv5); + assign_map.emplace("cim:GovSteamFV3.pgv6", &assign_GovSteamFV3_pgv6); + assign_map.emplace("cim:GovSteamFV3.pmax", &assign_GovSteamFV3_pmax); + assign_map.emplace("cim:GovSteamFV3.pmin", &assign_GovSteamFV3_pmin); + assign_map.emplace("cim:GovSteamFV3.prmax", &assign_GovSteamFV3_prmax); + assign_map.emplace("cim:GovSteamFV3.t1", &assign_GovSteamFV3_t1); + assign_map.emplace("cim:GovSteamFV3.t2", &assign_GovSteamFV3_t2); + assign_map.emplace("cim:GovSteamFV3.t3", &assign_GovSteamFV3_t3); + assign_map.emplace("cim:GovSteamFV3.t4", &assign_GovSteamFV3_t4); + assign_map.emplace("cim:GovSteamFV3.t5", &assign_GovSteamFV3_t5); + assign_map.emplace("cim:GovSteamFV3.t6", &assign_GovSteamFV3_t6); + assign_map.emplace("cim:GovSteamFV3.ta", &assign_GovSteamFV3_ta); + assign_map.emplace("cim:GovSteamFV3.tb", &assign_GovSteamFV3_tb); + assign_map.emplace("cim:GovSteamFV3.tc", &assign_GovSteamFV3_tc); + assign_map.emplace("cim:GovSteamFV3.uc", &assign_GovSteamFV3_uc); + assign_map.emplace("cim:GovSteamFV3.uo", &assign_GovSteamFV3_uo); } void GovSteamFV3::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/GovSteamFV3.hpp b/CGMES_3.0.0/GovSteamFV3.hpp index 8052bb31c..5cdcdd065 100644 --- a/CGMES_3.0.0/GovSteamFV3.hpp +++ b/CGMES_3.0.0/GovSteamFV3.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Simplified GovSteamIEEE1 steam turbine governor with Prmax limit and fast valving. - */ + /** \brief Simplified GovSteamIEEE1 steam turbine governor with Prmax limit and fast valving. */ class GovSteamFV3 : public TurbineGovernorDynamics { public: @@ -30,37 +28,98 @@ namespace CIMPP GovSteamFV3(); ~GovSteamFV3() override; - CIMPP::PU gv1; /* Nonlinear gain valve position point 1 (<i>GV1</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU gv2; /* Nonlinear gain valve position point 2 (<i>GV2</i>). Typical value = 0,4. Default: nullptr */ - CIMPP::PU gv3; /* Nonlinear gain valve position point 3 (<i>GV3</i>). Typical value = 0,5. Default: nullptr */ - CIMPP::PU gv4; /* Nonlinear gain valve position point 4 (<i>GV4</i>). Typical value = 0,6. Default: nullptr */ - CIMPP::PU gv5; /* Nonlinear gain valve position point 5 (<i>GV5</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU gv6; /* Nonlinear gain valve position point 6 (<i>GV6</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU k; /* Governor gain, (reciprocal of droop) (<i>K</i>). Typical value = 20. Default: nullptr */ - CIMPP::PU k1; /* Fraction of turbine power developed after first boiler pass (<i>K1</i>). Typical value = 0,2. Default: nullptr */ - CIMPP::PU k2; /* Fraction of turbine power developed after second boiler pass (<i>K2</i>). Typical value = 0,2. Default: nullptr */ - CIMPP::PU k3; /* Fraction of hp turbine power developed after crossover or third boiler pass (<i>K3</i>). Typical value = 0,6. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ - CIMPP::PU pgv1; /* Nonlinear gain power value point 1 (<i>Pgv1</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pgv2; /* Nonlinear gain power value point 2 (<i>Pgv2</i>). Typical value = 0,75. Default: nullptr */ - CIMPP::PU pgv3; /* Nonlinear gain power value point 3 (<i>Pgv3</i>). Typical value = 0,91. Default: nullptr */ - CIMPP::PU pgv4; /* Nonlinear gain power value point 4 (<i>Pgv4</i>). Typical value = 0,98. Default: nullptr */ - CIMPP::PU pgv5; /* Nonlinear gain power value point 5 (<i>Pgv5</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU pgv6; /* Nonlinear gain power value point 6 (<i>Pgv6</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU pmax; /* Maximum valve opening, PU of <i>MWbase</i> (<i>Pmax</i>) (&gt; GovSteamFV3.pmin). Typical value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum valve opening, PU of <i>MWbase</i> (<i>Pmin</i>) (&lt; GovSteamFV3.pmax). Typical value = 0. Default: nullptr */ - CIMPP::PU prmax; /* Max. pressure in reheater (<i>Prmax</i>). Typical value = 1. Default: nullptr */ - CIMPP::Seconds t1; /* Governor lead time constant (<i>T1</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds t2; /* Governor lag time constant (<i>T2</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds t3; /* Valve positioner time constant (<i>T3</i>) (&gt; 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds t4; /* Inlet piping/steam bowl time constant (<i>T4</i>) (&gt;= 0). Typical value = 0,2. Default: nullptr */ - CIMPP::Seconds t5; /* Time constant of second boiler pass (i.e. reheater) (<i>T5</i>) (&gt; 0 if fast valving is used, otherwise &gt;= 0). Typical value = 0,5. Default: nullptr */ - CIMPP::Seconds t6; /* Time constant of crossover or third boiler pass (<i>T6</i>) (&gt;= 0). Typical value = 10. Default: nullptr */ - CIMPP::Seconds ta; /* Time to close intercept valve (IV) (<i>Ta</i>) (&gt;= 0). Typical value = 0,97. Default: nullptr */ - CIMPP::Seconds tb; /* Time until IV starts to reopen (<i>Tb</i>) (&gt;= 0). Typical value = 0,98. Default: nullptr */ - CIMPP::Seconds tc; /* Time until IV is fully open (<i>Tc</i>) (&gt;= 0). Typical value = 0,99. Default: nullptr */ - CIMPP::Float uc; /* Maximum valve closing velocity (<i>Uc</i>). Unit = PU / s. Typical value = -1. Default: 0.0 */ - CIMPP::Float uo; /* Maximum valve opening velocity (<i>Uo</i>). Unit = PU / s. Typical value = 0,1. Default: 0.0 */ + /** \brief Nonlinear gain valve position point 1 (<i>GV1</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv1; + + /** \brief Nonlinear gain valve position point 2 (<i>GV2</i>). Typical value = 0,4. Default: nullptr */ + CIMPP::PU gv2; + + /** \brief Nonlinear gain valve position point 3 (<i>GV3</i>). Typical value = 0,5. Default: nullptr */ + CIMPP::PU gv3; + + /** \brief Nonlinear gain valve position point 4 (<i>GV4</i>). Typical value = 0,6. Default: nullptr */ + CIMPP::PU gv4; + + /** \brief Nonlinear gain valve position point 5 (<i>GV5</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU gv5; + + /** \brief Nonlinear gain valve position point 6 (<i>GV6</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU gv6; + + /** \brief Governor gain, (reciprocal of droop) (<i>K</i>). Typical value = 20. Default: nullptr */ + CIMPP::PU k; + + /** \brief Fraction of turbine power developed after first boiler pass (<i>K1</i>). Typical value = 0,2. Default: nullptr */ + CIMPP::PU k1; + + /** \brief Fraction of turbine power developed after second boiler pass (<i>K2</i>). Typical value = 0,2. Default: nullptr */ + CIMPP::PU k2; + + /** \brief Fraction of hp turbine power developed after crossover or third boiler pass (<i>K3</i>). Typical value = 0,6. Default: nullptr */ + CIMPP::PU k3; + + /** \brief Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Nonlinear gain power value point 1 (<i>Pgv1</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv1; + + /** \brief Nonlinear gain power value point 2 (<i>Pgv2</i>). Typical value = 0,75. Default: nullptr */ + CIMPP::PU pgv2; + + /** \brief Nonlinear gain power value point 3 (<i>Pgv3</i>). Typical value = 0,91. Default: nullptr */ + CIMPP::PU pgv3; + + /** \brief Nonlinear gain power value point 4 (<i>Pgv4</i>). Typical value = 0,98. Default: nullptr */ + CIMPP::PU pgv4; + + /** \brief Nonlinear gain power value point 5 (<i>Pgv5</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU pgv5; + + /** \brief Nonlinear gain power value point 6 (<i>Pgv6</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU pgv6; + + /** \brief Maximum valve opening, PU of <i>MWbase</i> (<i>Pmax</i>) (&gt; GovSteamFV3.pmin). Typical value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum valve opening, PU of <i>MWbase</i> (<i>Pmin</i>) (&lt; GovSteamFV3.pmax). Typical value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Max. pressure in reheater (<i>Prmax</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU prmax; + + /** \brief Governor lead time constant (<i>T1</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Governor lag time constant (<i>T2</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Valve positioner time constant (<i>T3</i>) (&gt; 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Inlet piping/steam bowl time constant (<i>T4</i>) (&gt;= 0). Typical value = 0,2. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant of second boiler pass (i.e. reheater) (<i>T5</i>) (&gt; 0 if fast valving is used, otherwise &gt;= 0). Typical value = 0,5. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Time constant of crossover or third boiler pass (<i>T6</i>) (&gt;= 0). Typical value = 10. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time to close intercept valve (IV) (<i>Ta</i>) (&gt;= 0). Typical value = 0,97. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Time until IV starts to reopen (<i>Tb</i>) (&gt;= 0). Typical value = 0,98. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Time until IV is fully open (<i>Tc</i>) (&gt;= 0). Typical value = 0,99. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Maximum valve closing velocity (<i>Uc</i>). Unit = PU / s. Typical value = -1. Default: 0.0 */ + CIMPP::Float uc; + + /** \brief Maximum valve opening velocity (<i>Uo</i>). Unit = PU / s. Typical value = 0,1. Default: 0.0 */ + CIMPP::Float uo; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GovSteamFV4.cpp b/CGMES_3.0.0/GovSteamFV4.cpp index d2f03fdd4..18cb0f39c 100644 --- a/CGMES_3.0.0/GovSteamFV4.cpp +++ b/CGMES_3.0.0/GovSteamFV4.cpp @@ -8,62 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -GovSteamFV4::GovSteamFV4() {}; -GovSteamFV4::~GovSteamFV4() {}; +GovSteamFV4::GovSteamFV4() {} +GovSteamFV4::~GovSteamFV4() {} static const std::list PossibleProfilesForClass = { @@ -140,675 +89,724 @@ GovSteamFV4::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteamFV4_cpsmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_cpsmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->cpsmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_cpsmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_cpsmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->cpsmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_crmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_crmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->crmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_crmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_crmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->crmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kf3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kf3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_khp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_khp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->khp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kic(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kic(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kic; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kip(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kip; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kit; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kmp1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kmp1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kmp1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kmp2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kmp2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kmp2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kpc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kpc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kpp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_kpt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_kpt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_krc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_krc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->krc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_ksh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_ksh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ksh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_lpi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_lpi(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lpi; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_lps(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_lps(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lps; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_mnef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_mnef(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mnef; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_mxef(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_mxef(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mxef; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_pr1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_pr1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pr1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_pr2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_pr2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pr2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_psmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_psmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->psmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_rsmimn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_rsmimn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rsmimn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_rsmimx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_rsmimx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rsmimx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_rvgmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_rvgmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rvgmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_rvgmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_rvgmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rvgmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_srmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_srmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->srmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_srmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_srmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->srmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_srsmp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_srsmp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->srsmp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_svmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_svmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->svmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_svmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_svmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->svmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_tam(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_tam(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tam; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_tcm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_tcm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tcm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_tdc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_tdc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_tf1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_tf1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_tf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_thp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_thp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->thp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_tmp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_tmp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tmp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_trh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_trh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->trh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_tv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_tv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_ty(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_ty(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ty; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_y(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_y(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->y; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_yhpmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_yhpmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->yhpmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_yhpmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_yhpmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->yhpmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_ympmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_ympmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ympmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamFV4_ympmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamFV4_ympmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ympmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteamFV4_cpsmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->cpsmn; if (!buffer.str().empty()) @@ -822,7 +820,8 @@ bool get_GovSteamFV4_cpsmn(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamFV4_cpsmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->cpsmx; if (!buffer.str().empty()) @@ -836,7 +835,8 @@ bool get_GovSteamFV4_cpsmx(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamFV4_crmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->crmn; if (!buffer.str().empty()) @@ -850,7 +850,8 @@ bool get_GovSteamFV4_crmn(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_crmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->crmx; if (!buffer.str().empty()) @@ -864,7 +865,8 @@ bool get_GovSteamFV4_crmx(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_kdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdc; if (!buffer.str().empty()) @@ -878,7 +880,8 @@ bool get_GovSteamFV4_kdc(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_kf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf1; if (!buffer.str().empty()) @@ -892,7 +895,8 @@ bool get_GovSteamFV4_kf1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_kf3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf3; if (!buffer.str().empty()) @@ -906,7 +910,8 @@ bool get_GovSteamFV4_kf3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_khp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->khp; if (!buffer.str().empty()) @@ -920,7 +925,8 @@ bool get_GovSteamFV4_khp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_kic(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kic; if (!buffer.str().empty()) @@ -934,7 +940,8 @@ bool get_GovSteamFV4_kic(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_kip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kip; if (!buffer.str().empty()) @@ -948,7 +955,8 @@ bool get_GovSteamFV4_kip(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_kit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kit; if (!buffer.str().empty()) @@ -962,7 +970,8 @@ bool get_GovSteamFV4_kit(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_kmp1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kmp1; if (!buffer.str().empty()) @@ -976,7 +985,8 @@ bool get_GovSteamFV4_kmp1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_kmp2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kmp2; if (!buffer.str().empty()) @@ -990,7 +1000,8 @@ bool get_GovSteamFV4_kmp2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_kpc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpc; if (!buffer.str().empty()) @@ -1004,7 +1015,8 @@ bool get_GovSteamFV4_kpc(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_kpp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpp; if (!buffer.str().empty()) @@ -1018,7 +1030,8 @@ bool get_GovSteamFV4_kpp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_kpt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpt; if (!buffer.str().empty()) @@ -1032,7 +1045,8 @@ bool get_GovSteamFV4_kpt(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_krc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->krc; if (!buffer.str().empty()) @@ -1046,7 +1060,8 @@ bool get_GovSteamFV4_krc(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_ksh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ksh; if (!buffer.str().empty()) @@ -1060,7 +1075,8 @@ bool get_GovSteamFV4_ksh(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_lpi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lpi; if (!buffer.str().empty()) @@ -1074,7 +1090,8 @@ bool get_GovSteamFV4_lpi(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_lps(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lps; if (!buffer.str().empty()) @@ -1088,7 +1105,8 @@ bool get_GovSteamFV4_lps(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_mnef(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mnef; if (!buffer.str().empty()) @@ -1102,7 +1120,8 @@ bool get_GovSteamFV4_mnef(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_mxef(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mxef; if (!buffer.str().empty()) @@ -1116,7 +1135,8 @@ bool get_GovSteamFV4_mxef(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_pr1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pr1; if (!buffer.str().empty()) @@ -1130,7 +1150,8 @@ bool get_GovSteamFV4_pr1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_pr2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pr2; if (!buffer.str().empty()) @@ -1144,7 +1165,8 @@ bool get_GovSteamFV4_pr2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_psmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->psmn; if (!buffer.str().empty()) @@ -1158,7 +1180,8 @@ bool get_GovSteamFV4_psmn(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_rsmimn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rsmimn; if (!buffer.str().empty()) @@ -1172,7 +1195,8 @@ bool get_GovSteamFV4_rsmimn(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovSteamFV4_rsmimx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rsmimx; if (!buffer.str().empty()) @@ -1186,7 +1210,8 @@ bool get_GovSteamFV4_rsmimx(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovSteamFV4_rvgmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rvgmn; if (!buffer.str().empty()) @@ -1200,7 +1225,8 @@ bool get_GovSteamFV4_rvgmn(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamFV4_rvgmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rvgmx; if (!buffer.str().empty()) @@ -1214,7 +1240,8 @@ bool get_GovSteamFV4_rvgmx(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamFV4_srmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->srmn; if (!buffer.str().empty()) @@ -1228,7 +1255,8 @@ bool get_GovSteamFV4_srmn(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_srmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->srmx; if (!buffer.str().empty()) @@ -1242,7 +1270,8 @@ bool get_GovSteamFV4_srmx(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_srsmp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->srsmp; if (!buffer.str().empty()) @@ -1256,7 +1285,8 @@ bool get_GovSteamFV4_srsmp(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamFV4_svmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->svmn; if (!buffer.str().empty()) @@ -1270,7 +1300,8 @@ bool get_GovSteamFV4_svmn(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_svmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->svmx; if (!buffer.str().empty()) @@ -1284,7 +1315,8 @@ bool get_GovSteamFV4_svmx(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamFV4_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -1298,7 +1330,8 @@ bool get_GovSteamFV4_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV4_tam(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tam; if (!buffer.str().empty()) @@ -1312,7 +1345,8 @@ bool get_GovSteamFV4_tam(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -1326,7 +1360,8 @@ bool get_GovSteamFV4_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV4_tcm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tcm; if (!buffer.str().empty()) @@ -1340,7 +1375,8 @@ bool get_GovSteamFV4_tcm(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_tdc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdc; if (!buffer.str().empty()) @@ -1354,7 +1390,8 @@ bool get_GovSteamFV4_tdc(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf1; if (!buffer.str().empty()) @@ -1368,7 +1405,8 @@ bool get_GovSteamFV4_tf1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf2; if (!buffer.str().empty()) @@ -1382,7 +1420,8 @@ bool get_GovSteamFV4_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_thp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thp; if (!buffer.str().empty()) @@ -1396,7 +1435,8 @@ bool get_GovSteamFV4_thp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_tmp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tmp; if (!buffer.str().empty()) @@ -1410,7 +1450,8 @@ bool get_GovSteamFV4_tmp(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_trh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->trh; if (!buffer.str().empty()) @@ -1424,7 +1465,8 @@ bool get_GovSteamFV4_trh(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamFV4_tv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tv; if (!buffer.str().empty()) @@ -1438,7 +1480,8 @@ bool get_GovSteamFV4_tv(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV4_ty(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ty; if (!buffer.str().empty()) @@ -1452,7 +1495,8 @@ bool get_GovSteamFV4_ty(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamFV4_y(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->y; if (!buffer.str().empty()) @@ -1466,7 +1510,8 @@ bool get_GovSteamFV4_y(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_GovSteamFV4_yhpmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->yhpmn; if (!buffer.str().empty()) @@ -1480,7 +1525,8 @@ bool get_GovSteamFV4_yhpmn(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamFV4_yhpmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->yhpmx; if (!buffer.str().empty()) @@ -1494,7 +1540,8 @@ bool get_GovSteamFV4_yhpmx(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamFV4_ympmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ympmn; if (!buffer.str().empty()) @@ -1508,7 +1555,8 @@ bool get_GovSteamFV4_ympmn(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_GovSteamFV4_ympmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamFV4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ympmx; if (!buffer.str().empty()) @@ -1520,8 +1568,6 @@ bool get_GovSteamFV4_ympmx(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char GovSteamFV4::debugName[] = "GovSteamFV4"; const char* GovSteamFV4::debugString() const { @@ -1530,62 +1576,62 @@ const char* GovSteamFV4::debugString() const void GovSteamFV4::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteamFV4"), &GovSteamFV4_factory)); + factory_map.emplace("cim:GovSteamFV4", &GovSteamFV4_factory); } void GovSteamFV4::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.cpsmn"), &assign_GovSteamFV4_cpsmn)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.cpsmx"), &assign_GovSteamFV4_cpsmx)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.crmn"), &assign_GovSteamFV4_crmn)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.crmx"), &assign_GovSteamFV4_crmx)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kdc"), &assign_GovSteamFV4_kdc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kf1"), &assign_GovSteamFV4_kf1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kf3"), &assign_GovSteamFV4_kf3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.khp"), &assign_GovSteamFV4_khp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kic"), &assign_GovSteamFV4_kic)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kip"), &assign_GovSteamFV4_kip)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kit"), &assign_GovSteamFV4_kit)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kmp1"), &assign_GovSteamFV4_kmp1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kmp2"), &assign_GovSteamFV4_kmp2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kpc"), &assign_GovSteamFV4_kpc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kpp"), &assign_GovSteamFV4_kpp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.kpt"), &assign_GovSteamFV4_kpt)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.krc"), &assign_GovSteamFV4_krc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.ksh"), &assign_GovSteamFV4_ksh)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.lpi"), &assign_GovSteamFV4_lpi)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.lps"), &assign_GovSteamFV4_lps)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.mnef"), &assign_GovSteamFV4_mnef)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.mxef"), &assign_GovSteamFV4_mxef)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.pr1"), &assign_GovSteamFV4_pr1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.pr2"), &assign_GovSteamFV4_pr2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.psmn"), &assign_GovSteamFV4_psmn)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.rsmimn"), &assign_GovSteamFV4_rsmimn)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.rsmimx"), &assign_GovSteamFV4_rsmimx)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.rvgmn"), &assign_GovSteamFV4_rvgmn)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.rvgmx"), &assign_GovSteamFV4_rvgmx)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.srmn"), &assign_GovSteamFV4_srmn)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.srmx"), &assign_GovSteamFV4_srmx)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.srsmp"), &assign_GovSteamFV4_srsmp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.svmn"), &assign_GovSteamFV4_svmn)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.svmx"), &assign_GovSteamFV4_svmx)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.ta"), &assign_GovSteamFV4_ta)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.tam"), &assign_GovSteamFV4_tam)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.tc"), &assign_GovSteamFV4_tc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.tcm"), &assign_GovSteamFV4_tcm)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.tdc"), &assign_GovSteamFV4_tdc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.tf1"), &assign_GovSteamFV4_tf1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.tf2"), &assign_GovSteamFV4_tf2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.thp"), &assign_GovSteamFV4_thp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.tmp"), &assign_GovSteamFV4_tmp)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.trh"), &assign_GovSteamFV4_trh)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.tv"), &assign_GovSteamFV4_tv)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.ty"), &assign_GovSteamFV4_ty)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.y"), &assign_GovSteamFV4_y)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.yhpmn"), &assign_GovSteamFV4_yhpmn)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.yhpmx"), &assign_GovSteamFV4_yhpmx)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.ympmn"), &assign_GovSteamFV4_ympmn)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamFV4.ympmx"), &assign_GovSteamFV4_ympmx)); + assign_map.emplace("cim:GovSteamFV4.cpsmn", &assign_GovSteamFV4_cpsmn); + assign_map.emplace("cim:GovSteamFV4.cpsmx", &assign_GovSteamFV4_cpsmx); + assign_map.emplace("cim:GovSteamFV4.crmn", &assign_GovSteamFV4_crmn); + assign_map.emplace("cim:GovSteamFV4.crmx", &assign_GovSteamFV4_crmx); + assign_map.emplace("cim:GovSteamFV4.kdc", &assign_GovSteamFV4_kdc); + assign_map.emplace("cim:GovSteamFV4.kf1", &assign_GovSteamFV4_kf1); + assign_map.emplace("cim:GovSteamFV4.kf3", &assign_GovSteamFV4_kf3); + assign_map.emplace("cim:GovSteamFV4.khp", &assign_GovSteamFV4_khp); + assign_map.emplace("cim:GovSteamFV4.kic", &assign_GovSteamFV4_kic); + assign_map.emplace("cim:GovSteamFV4.kip", &assign_GovSteamFV4_kip); + assign_map.emplace("cim:GovSteamFV4.kit", &assign_GovSteamFV4_kit); + assign_map.emplace("cim:GovSteamFV4.kmp1", &assign_GovSteamFV4_kmp1); + assign_map.emplace("cim:GovSteamFV4.kmp2", &assign_GovSteamFV4_kmp2); + assign_map.emplace("cim:GovSteamFV4.kpc", &assign_GovSteamFV4_kpc); + assign_map.emplace("cim:GovSteamFV4.kpp", &assign_GovSteamFV4_kpp); + assign_map.emplace("cim:GovSteamFV4.kpt", &assign_GovSteamFV4_kpt); + assign_map.emplace("cim:GovSteamFV4.krc", &assign_GovSteamFV4_krc); + assign_map.emplace("cim:GovSteamFV4.ksh", &assign_GovSteamFV4_ksh); + assign_map.emplace("cim:GovSteamFV4.lpi", &assign_GovSteamFV4_lpi); + assign_map.emplace("cim:GovSteamFV4.lps", &assign_GovSteamFV4_lps); + assign_map.emplace("cim:GovSteamFV4.mnef", &assign_GovSteamFV4_mnef); + assign_map.emplace("cim:GovSteamFV4.mxef", &assign_GovSteamFV4_mxef); + assign_map.emplace("cim:GovSteamFV4.pr1", &assign_GovSteamFV4_pr1); + assign_map.emplace("cim:GovSteamFV4.pr2", &assign_GovSteamFV4_pr2); + assign_map.emplace("cim:GovSteamFV4.psmn", &assign_GovSteamFV4_psmn); + assign_map.emplace("cim:GovSteamFV4.rsmimn", &assign_GovSteamFV4_rsmimn); + assign_map.emplace("cim:GovSteamFV4.rsmimx", &assign_GovSteamFV4_rsmimx); + assign_map.emplace("cim:GovSteamFV4.rvgmn", &assign_GovSteamFV4_rvgmn); + assign_map.emplace("cim:GovSteamFV4.rvgmx", &assign_GovSteamFV4_rvgmx); + assign_map.emplace("cim:GovSteamFV4.srmn", &assign_GovSteamFV4_srmn); + assign_map.emplace("cim:GovSteamFV4.srmx", &assign_GovSteamFV4_srmx); + assign_map.emplace("cim:GovSteamFV4.srsmp", &assign_GovSteamFV4_srsmp); + assign_map.emplace("cim:GovSteamFV4.svmn", &assign_GovSteamFV4_svmn); + assign_map.emplace("cim:GovSteamFV4.svmx", &assign_GovSteamFV4_svmx); + assign_map.emplace("cim:GovSteamFV4.ta", &assign_GovSteamFV4_ta); + assign_map.emplace("cim:GovSteamFV4.tam", &assign_GovSteamFV4_tam); + assign_map.emplace("cim:GovSteamFV4.tc", &assign_GovSteamFV4_tc); + assign_map.emplace("cim:GovSteamFV4.tcm", &assign_GovSteamFV4_tcm); + assign_map.emplace("cim:GovSteamFV4.tdc", &assign_GovSteamFV4_tdc); + assign_map.emplace("cim:GovSteamFV4.tf1", &assign_GovSteamFV4_tf1); + assign_map.emplace("cim:GovSteamFV4.tf2", &assign_GovSteamFV4_tf2); + assign_map.emplace("cim:GovSteamFV4.thp", &assign_GovSteamFV4_thp); + assign_map.emplace("cim:GovSteamFV4.tmp", &assign_GovSteamFV4_tmp); + assign_map.emplace("cim:GovSteamFV4.trh", &assign_GovSteamFV4_trh); + assign_map.emplace("cim:GovSteamFV4.tv", &assign_GovSteamFV4_tv); + assign_map.emplace("cim:GovSteamFV4.ty", &assign_GovSteamFV4_ty); + assign_map.emplace("cim:GovSteamFV4.y", &assign_GovSteamFV4_y); + assign_map.emplace("cim:GovSteamFV4.yhpmn", &assign_GovSteamFV4_yhpmn); + assign_map.emplace("cim:GovSteamFV4.yhpmx", &assign_GovSteamFV4_yhpmx); + assign_map.emplace("cim:GovSteamFV4.ympmn", &assign_GovSteamFV4_ympmn); + assign_map.emplace("cim:GovSteamFV4.ympmx", &assign_GovSteamFV4_ympmx); } void GovSteamFV4::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/GovSteamFV4.hpp b/CGMES_3.0.0/GovSteamFV4.hpp index 7a52b525a..027bae0ab 100644 --- a/CGMES_3.0.0/GovSteamFV4.hpp +++ b/CGMES_3.0.0/GovSteamFV4.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Detailed electro-hydraulic governor for steam unit. - */ + /** \brief Detailed electro-hydraulic governor for steam unit. */ class GovSteamFV4 : public TurbineGovernorDynamics { public: @@ -29,57 +27,158 @@ namespace CIMPP GovSteamFV4(); ~GovSteamFV4() override; - CIMPP::PU cpsmn; /* Minimum value of pressure regulator output (<i>Cpsmn</i>). Typical value = -1. Default: nullptr */ - CIMPP::PU cpsmx; /* Maximum value of pressure regulator output (<i>Cpsmx</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU crmn; /* Minimum value of regulator set-point (<i>Crmn</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU crmx; /* Maximum value of regulator set-point (<i>Crmx</i>). Typical value = 1,2. Default: nullptr */ - CIMPP::PU kdc; /* Derivative gain of pressure regulator (<i>Kdc</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU kf1; /* Frequency bias (reciprocal of droop) (<i>Kf1</i>). Typical value = 20. Default: nullptr */ - CIMPP::PU kf3; /* Frequency control (reciprocal of droop) (<i>Kf3</i>). Typical value = 20. Default: nullptr */ - CIMPP::PU khp; /* Fraction of total turbine output generated by HP part (<i>Khp</i>). Typical value = 0,35. Default: nullptr */ - CIMPP::PU kic; /* Integral gain of pressure regulator (<i>Kic</i>). Typical value = 0,0033. Default: nullptr */ - CIMPP::PU kip; /* Integral gain of pressure feedback regulator (<i>Kip</i>). Typical value = 0,5. Default: nullptr */ - CIMPP::PU kit; /* Integral gain of electro-hydraulic regulator (<i>Kit</i>). Typical value = 0,04. Default: nullptr */ - CIMPP::PU kmp1; /* First gain coefficient of intercept valves characteristic (<i>Kmp1</i>). Typical value = 0,5. Default: nullptr */ - CIMPP::PU kmp2; /* Second gain coefficient of intercept valves characteristic (<i>Kmp2</i>). Typical value = 3,5. Default: nullptr */ - CIMPP::PU kpc; /* Proportional gain of pressure regulator (<i>Kpc</i>). Typical value = 0,5. Default: nullptr */ - CIMPP::PU kpp; /* Proportional gain of pressure feedback regulator (<i>Kpp</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU kpt; /* Proportional gain of electro-hydraulic regulator (<i>Kpt</i>). Typical value = 0,3. Default: nullptr */ - CIMPP::PU krc; /* Maximum variation of fuel flow (<i>Krc</i>). Typical value = 0,05. Default: nullptr */ - CIMPP::PU ksh; /* Pressure loss due to flow friction in the boiler tubes (<i>Ksh</i>). Typical value = 0,08. Default: nullptr */ - CIMPP::PU lpi; /* Maximum negative power error (<i>Lpi</i>). Typical value = -0,15. Default: nullptr */ - CIMPP::PU lps; /* Maximum positive power error (<i>Lps</i>). Typical value = 0,03. Default: nullptr */ - CIMPP::PU mnef; /* Lower limit for frequency correction (<i>MN</i><i><sub>EF</sub></i>). Typical value = -0,05. Default: nullptr */ - CIMPP::PU mxef; /* Upper limit for frequency correction (<i>MX</i><i><sub>EF</sub></i>). Typical value = 0,05. Default: nullptr */ - CIMPP::PU pr1; /* First value of pressure set point static characteristic (<i>Pr1</i>). Typical value = 0,2. Default: nullptr */ - CIMPP::PU pr2; /* Second value of pressure set point static characteristic, corresponding to <i>Ps0</i> = 1,0 PU (<i>Pr2</i>). Typical value = 0,75. Default: nullptr */ - CIMPP::PU psmn; /* Minimum value of pressure set point static characteristic (<i>Psmn</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU rsmimn; /* Minimum value of integral regulator (<i>Rsmimn</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU rsmimx; /* Maximum value of integral regulator (<i>Rsmimx</i>). Typical value = 1,1. Default: nullptr */ - CIMPP::PU rvgmn; /* Minimum value of integral regulator (<i>Rvgmn</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU rvgmx; /* Maximum value of integral regulator (<i>Rvgmx</i>). Typical value = 1,2. Default: nullptr */ - CIMPP::PU srmn; /* Minimum valve opening (<i>Srmn</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU srmx; /* Maximum valve opening (<i>Srmx</i>). Typical value = 1,1. Default: nullptr */ - CIMPP::PU srsmp; /* Intercept valves characteristic discontinuity point (<i>Srsmp</i>). Typical value = 0,43. Default: nullptr */ - CIMPP::Float svmn; /* Maximum regulator gate closing velocity (<i>Svmn</i>). Typical value = -0,0333. Default: 0.0 */ - CIMPP::Float svmx; /* Maximum regulator gate opening velocity (<i>Svmx</i>). Typical value = 0,0333. Default: 0.0 */ - CIMPP::Seconds ta; /* Control valves rate opening time (<i>Ta</i>) (&gt;= 0). Typical value = 0,8. Default: nullptr */ - CIMPP::Seconds tam; /* Intercept valves rate opening time (<i>Tam</i>) (&gt;= 0). Typical value = 0,8. Default: nullptr */ - CIMPP::Seconds tc; /* Control valves rate closing time (<i>Tc</i>) (&gt;= 0). Typical value = 0,5. Default: nullptr */ - CIMPP::Seconds tcm; /* Intercept valves rate closing time (<i>Tcm</i>) (&gt;= 0). Typical value = 0,5. Default: nullptr */ - CIMPP::Seconds tdc; /* Derivative time constant of pressure regulator (<i>Tdc</i>) (&gt;= 0). Typical value = 90. Default: nullptr */ - CIMPP::Seconds tf1; /* Time constant of fuel regulation (<i>Tf1</i>) (&gt;= 0). Typical value = 10. Default: nullptr */ - CIMPP::Seconds tf2; /* Time constant of steam chest (<i>Tf2</i>) (&gt;= 0). Typical value = 10. Default: nullptr */ - CIMPP::Seconds thp; /* High pressure (HP) time constant of the turbine (<i>Thp</i>) (&gt;= 0). Typical value = 0,15. Default: nullptr */ - CIMPP::Seconds tmp; /* Low pressure (LP) time constant of the turbine (<i>Tmp</i>) (&gt;= 0). Typical value = 0,4. Default: nullptr */ - CIMPP::Seconds trh; /* Reheater time constant of the turbine (<i>Trh</i>) (&gt;= 0). Typical value = 10. Default: nullptr */ - CIMPP::Seconds tv; /* Boiler time constant (<i>Tv</i>) (&gt;= 0). Typical value = 60. Default: nullptr */ - CIMPP::Seconds ty; /* Control valves servo time constant (<i>Ty</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::PU y; /* Coefficient of linearized equations of turbine (Stodola formulation) (<i>Y</i>). Typical value = 0,13. Default: nullptr */ - CIMPP::PU yhpmn; /* Minimum control valve position (<i>Yhpmn</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU yhpmx; /* Maximum control valve position (<i>Yhpmx</i>). Typical value = 1,1. Default: nullptr */ - CIMPP::PU ympmn; /* Minimum intercept valve position (<i>Ympmn</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU ympmx; /* Maximum intercept valve position (<i>Ympmx</i>). Typical value = 1,1. Default: nullptr */ + /** \brief Minimum value of pressure regulator output (<i>Cpsmn</i>). Typical value = -1. Default: nullptr */ + CIMPP::PU cpsmn; + + /** \brief Maximum value of pressure regulator output (<i>Cpsmx</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU cpsmx; + + /** \brief Minimum value of regulator set-point (<i>Crmn</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU crmn; + + /** \brief Maximum value of regulator set-point (<i>Crmx</i>). Typical value = 1,2. Default: nullptr */ + CIMPP::PU crmx; + + /** \brief Derivative gain of pressure regulator (<i>Kdc</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU kdc; + + /** \brief Frequency bias (reciprocal of droop) (<i>Kf1</i>). Typical value = 20. Default: nullptr */ + CIMPP::PU kf1; + + /** \brief Frequency control (reciprocal of droop) (<i>Kf3</i>). Typical value = 20. Default: nullptr */ + CIMPP::PU kf3; + + /** \brief Fraction of total turbine output generated by HP part (<i>Khp</i>). Typical value = 0,35. Default: nullptr */ + CIMPP::PU khp; + + /** \brief Integral gain of pressure regulator (<i>Kic</i>). Typical value = 0,0033. Default: nullptr */ + CIMPP::PU kic; + + /** \brief Integral gain of pressure feedback regulator (<i>Kip</i>). Typical value = 0,5. Default: nullptr */ + CIMPP::PU kip; + + /** \brief Integral gain of electro-hydraulic regulator (<i>Kit</i>). Typical value = 0,04. Default: nullptr */ + CIMPP::PU kit; + + /** \brief First gain coefficient of intercept valves characteristic (<i>Kmp1</i>). Typical value = 0,5. Default: nullptr */ + CIMPP::PU kmp1; + + /** \brief Second gain coefficient of intercept valves characteristic (<i>Kmp2</i>). Typical value = 3,5. Default: nullptr */ + CIMPP::PU kmp2; + + /** \brief Proportional gain of pressure regulator (<i>Kpc</i>). Typical value = 0,5. Default: nullptr */ + CIMPP::PU kpc; + + /** \brief Proportional gain of pressure feedback regulator (<i>Kpp</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU kpp; + + /** \brief Proportional gain of electro-hydraulic regulator (<i>Kpt</i>). Typical value = 0,3. Default: nullptr */ + CIMPP::PU kpt; + + /** \brief Maximum variation of fuel flow (<i>Krc</i>). Typical value = 0,05. Default: nullptr */ + CIMPP::PU krc; + + /** \brief Pressure loss due to flow friction in the boiler tubes (<i>Ksh</i>). Typical value = 0,08. Default: nullptr */ + CIMPP::PU ksh; + + /** \brief Maximum negative power error (<i>Lpi</i>). Typical value = -0,15. Default: nullptr */ + CIMPP::PU lpi; + + /** \brief Maximum positive power error (<i>Lps</i>). Typical value = 0,03. Default: nullptr */ + CIMPP::PU lps; + + /** \brief Lower limit for frequency correction (<i>MN</i><i><sub>EF</sub></i>). Typical value = -0,05. Default: nullptr */ + CIMPP::PU mnef; + + /** \brief Upper limit for frequency correction (<i>MX</i><i><sub>EF</sub></i>). Typical value = 0,05. Default: nullptr */ + CIMPP::PU mxef; + + /** \brief First value of pressure set point static characteristic (<i>Pr1</i>). Typical value = 0,2. Default: nullptr */ + CIMPP::PU pr1; + + /** \brief Second value of pressure set point static characteristic, corresponding to <i>Ps0</i> = 1,0 PU (<i>Pr2</i>). Typical value = 0,75. Default: nullptr */ + CIMPP::PU pr2; + + /** \brief Minimum value of pressure set point static characteristic (<i>Psmn</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU psmn; + + /** \brief Minimum value of integral regulator (<i>Rsmimn</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU rsmimn; + + /** \brief Maximum value of integral regulator (<i>Rsmimx</i>). Typical value = 1,1. Default: nullptr */ + CIMPP::PU rsmimx; + + /** \brief Minimum value of integral regulator (<i>Rvgmn</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU rvgmn; + + /** \brief Maximum value of integral regulator (<i>Rvgmx</i>). Typical value = 1,2. Default: nullptr */ + CIMPP::PU rvgmx; + + /** \brief Minimum valve opening (<i>Srmn</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU srmn; + + /** \brief Maximum valve opening (<i>Srmx</i>). Typical value = 1,1. Default: nullptr */ + CIMPP::PU srmx; + + /** \brief Intercept valves characteristic discontinuity point (<i>Srsmp</i>). Typical value = 0,43. Default: nullptr */ + CIMPP::PU srsmp; + + /** \brief Maximum regulator gate closing velocity (<i>Svmn</i>). Typical value = -0,0333. Default: 0.0 */ + CIMPP::Float svmn; + + /** \brief Maximum regulator gate opening velocity (<i>Svmx</i>). Typical value = 0,0333. Default: 0.0 */ + CIMPP::Float svmx; + + /** \brief Control valves rate opening time (<i>Ta</i>) (&gt;= 0). Typical value = 0,8. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Intercept valves rate opening time (<i>Tam</i>) (&gt;= 0). Typical value = 0,8. Default: nullptr */ + CIMPP::Seconds tam; + + /** \brief Control valves rate closing time (<i>Tc</i>) (&gt;= 0). Typical value = 0,5. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Intercept valves rate closing time (<i>Tcm</i>) (&gt;= 0). Typical value = 0,5. Default: nullptr */ + CIMPP::Seconds tcm; + + /** \brief Derivative time constant of pressure regulator (<i>Tdc</i>) (&gt;= 0). Typical value = 90. Default: nullptr */ + CIMPP::Seconds tdc; + + /** \brief Time constant of fuel regulation (<i>Tf1</i>) (&gt;= 0). Typical value = 10. Default: nullptr */ + CIMPP::Seconds tf1; + + /** \brief Time constant of steam chest (<i>Tf2</i>) (&gt;= 0). Typical value = 10. Default: nullptr */ + CIMPP::Seconds tf2; + + /** \brief High pressure (HP) time constant of the turbine (<i>Thp</i>) (&gt;= 0). Typical value = 0,15. Default: nullptr */ + CIMPP::Seconds thp; + + /** \brief Low pressure (LP) time constant of the turbine (<i>Tmp</i>) (&gt;= 0). Typical value = 0,4. Default: nullptr */ + CIMPP::Seconds tmp; + + /** \brief Reheater time constant of the turbine (<i>Trh</i>) (&gt;= 0). Typical value = 10. Default: nullptr */ + CIMPP::Seconds trh; + + /** \brief Boiler time constant (<i>Tv</i>) (&gt;= 0). Typical value = 60. Default: nullptr */ + CIMPP::Seconds tv; + + /** \brief Control valves servo time constant (<i>Ty</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds ty; + + /** \brief Coefficient of linearized equations of turbine (Stodola formulation) (<i>Y</i>). Typical value = 0,13. Default: nullptr */ + CIMPP::PU y; + + /** \brief Minimum control valve position (<i>Yhpmn</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU yhpmn; + + /** \brief Maximum control valve position (<i>Yhpmx</i>). Typical value = 1,1. Default: nullptr */ + CIMPP::PU yhpmx; + + /** \brief Minimum intercept valve position (<i>Ympmn</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU ympmn; + + /** \brief Maximum intercept valve position (<i>Ympmx</i>). Typical value = 1,1. Default: nullptr */ + CIMPP::PU ympmx; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GovSteamIEEE1.cpp b/CGMES_3.0.0/GovSteamIEEE1.cpp index 5e2498e87..8dafb5bc6 100644 --- a/CGMES_3.0.0/GovSteamIEEE1.cpp +++ b/CGMES_3.0.0/GovSteamIEEE1.cpp @@ -8,32 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Float.hpp" -#include "Float.hpp" using namespace CIMPP; -GovSteamIEEE1::GovSteamIEEE1() {}; -GovSteamIEEE1::~GovSteamIEEE1() {}; +GovSteamIEEE1::GovSteamIEEE1() {} +GovSteamIEEE1::~GovSteamIEEE1() {} static const std::list PossibleProfilesForClass = { @@ -80,285 +59,304 @@ GovSteamIEEE1::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteamIEEE1_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_k4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_k5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_k5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_k6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_k6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_k7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_k7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_k8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_k8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_t7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_uc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_uc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamIEEE1_uo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamIEEE1_uo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteamIEEE1_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -372,7 +370,8 @@ bool get_GovSteamIEEE1_k(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_GovSteamIEEE1_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -386,7 +385,8 @@ bool get_GovSteamIEEE1_k1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -400,7 +400,8 @@ bool get_GovSteamIEEE1_k2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -414,7 +415,8 @@ bool get_GovSteamIEEE1_k3(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k4; if (!buffer.str().empty()) @@ -428,7 +430,8 @@ bool get_GovSteamIEEE1_k4(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k5; if (!buffer.str().empty()) @@ -442,7 +445,8 @@ bool get_GovSteamIEEE1_k5(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_k6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k6; if (!buffer.str().empty()) @@ -456,7 +460,8 @@ bool get_GovSteamIEEE1_k6(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_k7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k7; if (!buffer.str().empty()) @@ -470,7 +475,8 @@ bool get_GovSteamIEEE1_k7(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_k8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k8; if (!buffer.str().empty()) @@ -484,7 +490,8 @@ bool get_GovSteamIEEE1_k8(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -498,7 +505,8 @@ bool get_GovSteamIEEE1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream bool get_GovSteamIEEE1_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -512,7 +520,8 @@ bool get_GovSteamIEEE1_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovSteamIEEE1_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -526,7 +535,8 @@ bool get_GovSteamIEEE1_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovSteamIEEE1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -540,7 +550,8 @@ bool get_GovSteamIEEE1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -554,7 +565,8 @@ bool get_GovSteamIEEE1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -568,7 +580,8 @@ bool get_GovSteamIEEE1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -582,7 +595,8 @@ bool get_GovSteamIEEE1_t4(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -596,7 +610,8 @@ bool get_GovSteamIEEE1_t5(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -610,7 +625,8 @@ bool get_GovSteamIEEE1_t6(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t7; if (!buffer.str().empty()) @@ -624,7 +640,8 @@ bool get_GovSteamIEEE1_t7(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_uc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uc; if (!buffer.str().empty()) @@ -638,7 +655,8 @@ bool get_GovSteamIEEE1_uc(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamIEEE1_uo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uo; if (!buffer.str().empty()) @@ -650,8 +668,6 @@ bool get_GovSteamIEEE1_uo(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char GovSteamIEEE1::debugName[] = "GovSteamIEEE1"; const char* GovSteamIEEE1::debugString() const { @@ -660,32 +676,32 @@ const char* GovSteamIEEE1::debugString() const void GovSteamIEEE1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1"), &GovSteamIEEE1_factory)); + factory_map.emplace("cim:GovSteamIEEE1", &GovSteamIEEE1_factory); } void GovSteamIEEE1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.k"), &assign_GovSteamIEEE1_k)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.k1"), &assign_GovSteamIEEE1_k1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.k2"), &assign_GovSteamIEEE1_k2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.k3"), &assign_GovSteamIEEE1_k3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.k4"), &assign_GovSteamIEEE1_k4)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.k5"), &assign_GovSteamIEEE1_k5)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.k6"), &assign_GovSteamIEEE1_k6)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.k7"), &assign_GovSteamIEEE1_k7)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.k8"), &assign_GovSteamIEEE1_k8)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.mwbase"), &assign_GovSteamIEEE1_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.pmax"), &assign_GovSteamIEEE1_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.pmin"), &assign_GovSteamIEEE1_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.t1"), &assign_GovSteamIEEE1_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.t2"), &assign_GovSteamIEEE1_t2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.t3"), &assign_GovSteamIEEE1_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.t4"), &assign_GovSteamIEEE1_t4)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.t5"), &assign_GovSteamIEEE1_t5)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.t6"), &assign_GovSteamIEEE1_t6)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.t7"), &assign_GovSteamIEEE1_t7)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.uc"), &assign_GovSteamIEEE1_uc)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamIEEE1.uo"), &assign_GovSteamIEEE1_uo)); + assign_map.emplace("cim:GovSteamIEEE1.k", &assign_GovSteamIEEE1_k); + assign_map.emplace("cim:GovSteamIEEE1.k1", &assign_GovSteamIEEE1_k1); + assign_map.emplace("cim:GovSteamIEEE1.k2", &assign_GovSteamIEEE1_k2); + assign_map.emplace("cim:GovSteamIEEE1.k3", &assign_GovSteamIEEE1_k3); + assign_map.emplace("cim:GovSteamIEEE1.k4", &assign_GovSteamIEEE1_k4); + assign_map.emplace("cim:GovSteamIEEE1.k5", &assign_GovSteamIEEE1_k5); + assign_map.emplace("cim:GovSteamIEEE1.k6", &assign_GovSteamIEEE1_k6); + assign_map.emplace("cim:GovSteamIEEE1.k7", &assign_GovSteamIEEE1_k7); + assign_map.emplace("cim:GovSteamIEEE1.k8", &assign_GovSteamIEEE1_k8); + assign_map.emplace("cim:GovSteamIEEE1.mwbase", &assign_GovSteamIEEE1_mwbase); + assign_map.emplace("cim:GovSteamIEEE1.pmax", &assign_GovSteamIEEE1_pmax); + assign_map.emplace("cim:GovSteamIEEE1.pmin", &assign_GovSteamIEEE1_pmin); + assign_map.emplace("cim:GovSteamIEEE1.t1", &assign_GovSteamIEEE1_t1); + assign_map.emplace("cim:GovSteamIEEE1.t2", &assign_GovSteamIEEE1_t2); + assign_map.emplace("cim:GovSteamIEEE1.t3", &assign_GovSteamIEEE1_t3); + assign_map.emplace("cim:GovSteamIEEE1.t4", &assign_GovSteamIEEE1_t4); + assign_map.emplace("cim:GovSteamIEEE1.t5", &assign_GovSteamIEEE1_t5); + assign_map.emplace("cim:GovSteamIEEE1.t6", &assign_GovSteamIEEE1_t6); + assign_map.emplace("cim:GovSteamIEEE1.t7", &assign_GovSteamIEEE1_t7); + assign_map.emplace("cim:GovSteamIEEE1.uc", &assign_GovSteamIEEE1_uc); + assign_map.emplace("cim:GovSteamIEEE1.uo", &assign_GovSteamIEEE1_uo); } void GovSteamIEEE1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/GovSteamIEEE1.hpp b/CGMES_3.0.0/GovSteamIEEE1.hpp index 00be9bcdf..f84469038 100644 --- a/CGMES_3.0.0/GovSteamIEEE1.hpp +++ b/CGMES_3.0.0/GovSteamIEEE1.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE steam turbine governor model. Reference: IEEE Transactions on Power Apparatus and Systems, November/December 1973, Volume PAS-92, Number 6, Dynamic Models for Steam and Hydro Turbines in Power System Studies, page 1904. - */ + /** \brief IEEE steam turbine governor model. Reference: IEEE Transactions on Power Apparatus and Systems, November/December 1973, Volume PAS-92, Number 6, Dynamic Models for Steam and Hydro Turbines in Power System Studies, page 1904. */ class GovSteamIEEE1 : public TurbineGovernorDynamics { public: @@ -30,27 +28,68 @@ namespace CIMPP GovSteamIEEE1(); ~GovSteamIEEE1() override; - CIMPP::PU k; /* Governor gain (reciprocal of droop) (<i>K</i>) (&gt; 0). Typical value = 25. Default: nullptr */ - CIMPP::Float k1; /* Fraction of HP shaft power after first boiler pass (<i>K1</i>). Typical value = 0,2. Default: 0.0 */ - CIMPP::Float k2; /* Fraction of LP shaft power after first boiler pass (<i>K2</i>). Typical value = 0. Default: 0.0 */ - CIMPP::Float k3; /* Fraction of HP shaft power after second boiler pass (<i>K3</i>). Typical value = 0,3. Default: 0.0 */ - CIMPP::Float k4; /* Fraction of LP shaft power after second boiler pass (<i>K4</i>). Typical value = 0. Default: 0.0 */ - CIMPP::Float k5; /* Fraction of HP shaft power after third boiler pass (<i>K5</i>). Typical value = 0,5. Default: 0.0 */ - CIMPP::Float k6; /* Fraction of LP shaft power after third boiler pass (<i>K6</i>). Typical value = 0. Default: 0.0 */ - CIMPP::Float k7; /* Fraction of HP shaft power after fourth boiler pass (<i>K7</i>). Typical value = 0. Default: 0.0 */ - CIMPP::Float k8; /* Fraction of LP shaft power after fourth boiler pass (<i>K8</i>). Typical value = 0. Default: 0.0 */ - CIMPP::ActivePower mwbase; /* Base for power values (<i>MWbase</i>) (&gt; 0)<i>. </i>Unit = MW. Default: nullptr */ - CIMPP::PU pmax; /* Maximum valve opening (<i>Pmax</i>) (&gt; GovSteamIEEE1.pmin). Typical value = 1. Default: nullptr */ - CIMPP::PU pmin; /* Minimum valve opening (<i>Pmin</i>) (&gt;= 0 and &lt; GovSteamIEEE1.pmax). Typical value = 0. Default: nullptr */ - CIMPP::Seconds t1; /* Governor lag time constant (<i>T1</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds t2; /* Governor lead time constant (<i>T2</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds t3; /* Valve positioner time constant (<i>T3</i>) (&gt; 0). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds t4; /* Inlet piping/steam bowl time constant (<i>T4</i>) (&gt;= 0). Typical value = 0,3. Default: nullptr */ - CIMPP::Seconds t5; /* Time constant of second boiler pass (<i>T5</i>) (&gt;= 0). Typical value = 5. Default: nullptr */ - CIMPP::Seconds t6; /* Time constant of third boiler pass (<i>T6</i>) (&gt;= 0). Typical value = 0,5. Default: nullptr */ - CIMPP::Seconds t7; /* Time constant of fourth boiler pass (<i>T7</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Float uc; /* Maximum valve closing velocity (<i>Uc</i>) (&lt; 0). Unit = PU / s. Typical value = -10. Default: 0.0 */ - CIMPP::Float uo; /* Maximum valve opening velocity (<i>Uo</i>) (&gt; 0). Unit = PU / s. Typical value = 1. Default: 0.0 */ + /** \brief Governor gain (reciprocal of droop) (<i>K</i>) (&gt; 0). Typical value = 25. Default: nullptr */ + CIMPP::PU k; + + /** \brief Fraction of HP shaft power after first boiler pass (<i>K1</i>). Typical value = 0,2. Default: 0.0 */ + CIMPP::Float k1; + + /** \brief Fraction of LP shaft power after first boiler pass (<i>K2</i>). Typical value = 0. Default: 0.0 */ + CIMPP::Float k2; + + /** \brief Fraction of HP shaft power after second boiler pass (<i>K3</i>). Typical value = 0,3. Default: 0.0 */ + CIMPP::Float k3; + + /** \brief Fraction of LP shaft power after second boiler pass (<i>K4</i>). Typical value = 0. Default: 0.0 */ + CIMPP::Float k4; + + /** \brief Fraction of HP shaft power after third boiler pass (<i>K5</i>). Typical value = 0,5. Default: 0.0 */ + CIMPP::Float k5; + + /** \brief Fraction of LP shaft power after third boiler pass (<i>K6</i>). Typical value = 0. Default: 0.0 */ + CIMPP::Float k6; + + /** \brief Fraction of HP shaft power after fourth boiler pass (<i>K7</i>). Typical value = 0. Default: 0.0 */ + CIMPP::Float k7; + + /** \brief Fraction of LP shaft power after fourth boiler pass (<i>K8</i>). Typical value = 0. Default: 0.0 */ + CIMPP::Float k8; + + /** \brief Base for power values (<i>MWbase</i>) (&gt; 0)<i>. </i>Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Maximum valve opening (<i>Pmax</i>) (&gt; GovSteamIEEE1.pmin). Typical value = 1. Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Minimum valve opening (<i>Pmin</i>) (&gt;= 0 and &lt; GovSteamIEEE1.pmax). Typical value = 0. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Governor lag time constant (<i>T1</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Governor lead time constant (<i>T2</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Valve positioner time constant (<i>T3</i>) (&gt; 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Inlet piping/steam bowl time constant (<i>T4</i>) (&gt;= 0). Typical value = 0,3. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant of second boiler pass (<i>T5</i>) (&gt;= 0). Typical value = 5. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Time constant of third boiler pass (<i>T6</i>) (&gt;= 0). Typical value = 0,5. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time constant of fourth boiler pass (<i>T7</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds t7; + + /** \brief Maximum valve closing velocity (<i>Uc</i>) (&lt; 0). Unit = PU / s. Typical value = -10. Default: 0.0 */ + CIMPP::Float uc; + + /** \brief Maximum valve opening velocity (<i>Uo</i>) (&gt; 0). Unit = PU / s. Typical value = 1. Default: 0.0 */ + CIMPP::Float uo; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GovSteamSGO.cpp b/CGMES_3.0.0/GovSteamSGO.cpp index dbe420a31..8b1ecdec7 100644 --- a/CGMES_3.0.0/GovSteamSGO.cpp +++ b/CGMES_3.0.0/GovSteamSGO.cpp @@ -8,23 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -GovSteamSGO::GovSteamSGO() {}; -GovSteamSGO::~GovSteamSGO() {}; +GovSteamSGO::GovSteamSGO() {} +GovSteamSGO::~GovSteamSGO() {} static const std::list PossibleProfilesForClass = { @@ -62,168 +50,178 @@ GovSteamSGO::getPossibleProfilesForAttributes() const return map; } - -bool assign_GovSteamSGO_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_pmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_pmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_GovSteamSGO_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GovSteamSGO_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GovSteamSGO_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -237,7 +235,8 @@ bool get_GovSteamSGO_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamSGO_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -251,7 +250,8 @@ bool get_GovSteamSGO_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamSGO_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -265,7 +265,8 @@ bool get_GovSteamSGO_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamSGO_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -279,7 +280,8 @@ bool get_GovSteamSGO_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_GovSteamSGO_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmax; if (!buffer.str().empty()) @@ -293,7 +295,8 @@ bool get_GovSteamSGO_pmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamSGO_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -307,7 +310,8 @@ bool get_GovSteamSGO_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_GovSteamSGO_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -321,7 +325,8 @@ bool get_GovSteamSGO_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamSGO_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -335,7 +340,8 @@ bool get_GovSteamSGO_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamSGO_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -349,7 +355,8 @@ bool get_GovSteamSGO_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamSGO_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -363,7 +370,8 @@ bool get_GovSteamSGO_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamSGO_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -377,7 +385,8 @@ bool get_GovSteamSGO_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_GovSteamSGO_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1)) + const GovSteamSGO* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -389,8 +398,6 @@ bool get_GovSteamSGO_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char GovSteamSGO::debugName[] = "GovSteamSGO"; const char* GovSteamSGO::debugString() const { @@ -399,23 +406,23 @@ const char* GovSteamSGO::debugString() const void GovSteamSGO::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GovSteamSGO"), &GovSteamSGO_factory)); + factory_map.emplace("cim:GovSteamSGO", &GovSteamSGO_factory); } void GovSteamSGO::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.k1"), &assign_GovSteamSGO_k1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.k2"), &assign_GovSteamSGO_k2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.k3"), &assign_GovSteamSGO_k3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.mwbase"), &assign_GovSteamSGO_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.pmax"), &assign_GovSteamSGO_pmax)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.pmin"), &assign_GovSteamSGO_pmin)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.t1"), &assign_GovSteamSGO_t1)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.t2"), &assign_GovSteamSGO_t2)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.t3"), &assign_GovSteamSGO_t3)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.t4"), &assign_GovSteamSGO_t4)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.t5"), &assign_GovSteamSGO_t5)); - assign_map.insert(std::make_pair(std::string("cim:GovSteamSGO.t6"), &assign_GovSteamSGO_t6)); + assign_map.emplace("cim:GovSteamSGO.k1", &assign_GovSteamSGO_k1); + assign_map.emplace("cim:GovSteamSGO.k2", &assign_GovSteamSGO_k2); + assign_map.emplace("cim:GovSteamSGO.k3", &assign_GovSteamSGO_k3); + assign_map.emplace("cim:GovSteamSGO.mwbase", &assign_GovSteamSGO_mwbase); + assign_map.emplace("cim:GovSteamSGO.pmax", &assign_GovSteamSGO_pmax); + assign_map.emplace("cim:GovSteamSGO.pmin", &assign_GovSteamSGO_pmin); + assign_map.emplace("cim:GovSteamSGO.t1", &assign_GovSteamSGO_t1); + assign_map.emplace("cim:GovSteamSGO.t2", &assign_GovSteamSGO_t2); + assign_map.emplace("cim:GovSteamSGO.t3", &assign_GovSteamSGO_t3); + assign_map.emplace("cim:GovSteamSGO.t4", &assign_GovSteamSGO_t4); + assign_map.emplace("cim:GovSteamSGO.t5", &assign_GovSteamSGO_t5); + assign_map.emplace("cim:GovSteamSGO.t6", &assign_GovSteamSGO_t6); } void GovSteamSGO::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/GovSteamSGO.hpp b/CGMES_3.0.0/GovSteamSGO.hpp index 94999116d..c3b47a50f 100644 --- a/CGMES_3.0.0/GovSteamSGO.hpp +++ b/CGMES_3.0.0/GovSteamSGO.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Simplified steam turbine governor. - */ + /** \brief Simplified steam turbine governor. */ class GovSteamSGO : public TurbineGovernorDynamics { public: @@ -29,18 +27,41 @@ namespace CIMPP GovSteamSGO(); ~GovSteamSGO() override; - CIMPP::PU k1; /* One / PU regulation (<i>K1</i>). Default: nullptr */ - CIMPP::PU k2; /* Fraction (<i>K2</i>). Default: nullptr */ - CIMPP::PU k3; /* Fraction (<i>K3</i>). Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ - CIMPP::PU pmax; /* Upper power limit (<i>Pmax</i>) (&gt; GovSteamSGO.pmin). Default: nullptr */ - CIMPP::Seconds pmin; /* Lower power limit (<i>Pmin</i>) (&gt;= 0 and &lt; GovSteamSGO.pmax). Default: nullptr */ - CIMPP::Seconds t1; /* Controller lag (<i>T1</i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds t2; /* Controller lead compensation (<i>T2</i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds t3; /* Governor lag (<i>T3</i>) (&gt; 0). Default: nullptr */ - CIMPP::Seconds t4; /* Delay due to steam inlet volumes associated with steam chest and inlet piping (<i>T4</i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds t5; /* Reheater delay including hot and cold leads (<i>T5</i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds t6; /* Delay due to IP-LP turbine, crossover pipes and LP end hoods (<i>T6</i>) (&gt;= 0). Default: nullptr */ + /** \brief One / PU regulation (<i>K1</i>). Default: nullptr */ + CIMPP::PU k1; + + /** \brief Fraction (<i>K2</i>). Default: nullptr */ + CIMPP::PU k2; + + /** \brief Fraction (<i>K3</i>). Default: nullptr */ + CIMPP::PU k3; + + /** \brief Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Upper power limit (<i>Pmax</i>) (&gt; GovSteamSGO.pmin). Default: nullptr */ + CIMPP::PU pmax; + + /** \brief Lower power limit (<i>Pmin</i>) (&gt;= 0 and &lt; GovSteamSGO.pmax). Default: nullptr */ + CIMPP::Seconds pmin; + + /** \brief Controller lag (<i>T1</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Controller lead compensation (<i>T2</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Governor lag (<i>T3</i>) (&gt; 0). Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Delay due to steam inlet volumes associated with steam chest and inlet piping (<i>T4</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Reheater delay including hot and cold leads (<i>T5</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Delay due to IP-LP turbine, crossover pipes and LP end hoods (<i>T6</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t6; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GrossToNetActivePowerCurve.cpp b/CGMES_3.0.0/GrossToNetActivePowerCurve.cpp index 2e70aaac8..8e293b959 100644 --- a/CGMES_3.0.0/GrossToNetActivePowerCurve.cpp +++ b/CGMES_3.0.0/GrossToNetActivePowerCurve.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -GrossToNetActivePowerCurve::GrossToNetActivePowerCurve() : GeneratingUnit(nullptr) {}; -GrossToNetActivePowerCurve::~GrossToNetActivePowerCurve() {}; +GrossToNetActivePowerCurve::GrossToNetActivePowerCurve() : GeneratingUnit(nullptr) {} +GrossToNetActivePowerCurve::~GrossToNetActivePowerCurve() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ GrossToNetActivePowerCurve::getPossibleProfilesForAttributes() const return map; } - - bool assign_GeneratingUnit_GrossToNetActivePowerCurves(BaseClass*, BaseClass*); bool assign_GrossToNetActivePowerCurve_GeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_GrossToNetActivePowerCurve_GeneratingUnit(BaseClass* BaseClass_ptr1, return false; } - bool get_GrossToNetActivePowerCurve_GeneratingUnit(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const GrossToNetActivePowerCurve* element = dynamic_cast(BaseClass_ptr1)) + const GrossToNetActivePowerCurve* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->GeneratingUnit != 0) { @@ -73,7 +71,6 @@ bool get_GrossToNetActivePowerCurve_GeneratingUnit(const BaseClass* BaseClass_pt return false; } - const char GrossToNetActivePowerCurve::debugName[] = "GrossToNetActivePowerCurve"; const char* GrossToNetActivePowerCurve::debugString() const { @@ -82,7 +79,7 @@ const char* GrossToNetActivePowerCurve::debugString() const void GrossToNetActivePowerCurve::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GrossToNetActivePowerCurve"), &GrossToNetActivePowerCurve_factory)); + factory_map.emplace("cim:GrossToNetActivePowerCurve", &GrossToNetActivePowerCurve_factory); } void GrossToNetActivePowerCurve::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void GrossToNetActivePowerCurve::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GrossToNetActivePowerCurve.GeneratingUnit"), &assign_GrossToNetActivePowerCurve_GeneratingUnit)); + assign_map.emplace("cim:GrossToNetActivePowerCurve.GeneratingUnit", &assign_GrossToNetActivePowerCurve_GeneratingUnit); } void GrossToNetActivePowerCurve::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/GrossToNetActivePowerCurve.hpp b/CGMES_3.0.0/GrossToNetActivePowerCurve.hpp index 94f6e2cee..90721eb58 100644 --- a/CGMES_3.0.0/GrossToNetActivePowerCurve.hpp +++ b/CGMES_3.0.0/GrossToNetActivePowerCurve.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class GeneratingUnit; - /* - Relationship between the generating unit's gross active power output on the X-axis (measured at the terminals of the machine(s)) and the generating unit's net active power output on the Y-axis (based on utility-defined measurements at the power station). Station service loads, when modelled, should be treated as non-conforming bus loads. There may be more than one curve, depending on the auxiliary equipment that is in service. - */ + /** \brief Relationship between the generating unit's gross active power output on the X-axis (measured at the terminals of the machine(s)) and the generating unit's net active power output on the Y-axis (based on utility-defined measurements at the power station). Station service loads, when modelled, should be treated as non-conforming bus loads. There may be more than one curve, depending on the auxiliary equipment that is in service. */ class GrossToNetActivePowerCurve : public Curve { public: @@ -27,7 +25,8 @@ namespace CIMPP GrossToNetActivePowerCurve(); ~GrossToNetActivePowerCurve() override; - CIMPP::GeneratingUnit* GeneratingUnit; /* A generating unit may have a gross active power to net active power curve, describing the losses and auxiliary power requirements of the unit. Default: 0 */ + /** \brief A generating unit may have a gross active power to net active power curve, describing the losses and auxiliary power requirements of the unit. Default: 0 */ + CIMPP::GeneratingUnit* GeneratingUnit; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Ground.cpp b/CGMES_3.0.0/Ground.cpp index fa0b071bc..e2e2a0868 100644 --- a/CGMES_3.0.0/Ground.cpp +++ b/CGMES_3.0.0/Ground.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Ground::Ground() {}; -Ground::~Ground() {}; +Ground::Ground() {} +Ground::~Ground() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ Ground::getPossibleProfilesForAttributes() const return map; } - - - - - const char Ground::debugName[] = "Ground"; const char* Ground::debugString() const { @@ -51,7 +46,7 @@ const char* Ground::debugString() const void Ground::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Ground"), &Ground_factory)); + factory_map.emplace("cim:Ground", &Ground_factory); } void Ground::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/Ground.hpp b/CGMES_3.0.0/Ground.hpp index 8ff5cf74f..56bd33323 100644 --- a/CGMES_3.0.0/Ground.hpp +++ b/CGMES_3.0.0/Ground.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A point where the system is grounded used for connecting conducting equipment to ground. The power system model can have any number of grounds. - */ + /** \brief A point where the system is grounded used for connecting conducting equipment to ground. The power system model can have any number of grounds. */ class Ground : public ConductingEquipment { public: @@ -26,7 +24,6 @@ namespace CIMPP Ground(); ~Ground() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GroundDisconnector.cpp b/CGMES_3.0.0/GroundDisconnector.cpp index ebe1006e0..1926b56f9 100644 --- a/CGMES_3.0.0/GroundDisconnector.cpp +++ b/CGMES_3.0.0/GroundDisconnector.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -GroundDisconnector::GroundDisconnector() {}; -GroundDisconnector::~GroundDisconnector() {}; +GroundDisconnector::GroundDisconnector() {} +GroundDisconnector::~GroundDisconnector() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ GroundDisconnector::getPossibleProfilesForAttributes() const return map; } - - - - - const char GroundDisconnector::debugName[] = "GroundDisconnector"; const char* GroundDisconnector::debugString() const { @@ -52,7 +47,7 @@ const char* GroundDisconnector::debugString() const void GroundDisconnector::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GroundDisconnector"), &GroundDisconnector_factory)); + factory_map.emplace("cim:GroundDisconnector", &GroundDisconnector_factory); } void GroundDisconnector::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/GroundDisconnector.hpp b/CGMES_3.0.0/GroundDisconnector.hpp index 0e06b381a..ccf2b2c27 100644 --- a/CGMES_3.0.0/GroundDisconnector.hpp +++ b/CGMES_3.0.0/GroundDisconnector.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A manually operated or motor operated mechanical switching device used for isolating a circuit or equipment from ground. - */ + /** \brief A manually operated or motor operated mechanical switching device used for isolating a circuit or equipment from ground. */ class GroundDisconnector : public Switch { public: @@ -26,7 +24,6 @@ namespace CIMPP GroundDisconnector(); ~GroundDisconnector() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/GroundingImpedance.cpp b/CGMES_3.0.0/GroundingImpedance.cpp index f3e9c6237..2063f9402 100644 --- a/CGMES_3.0.0/GroundingImpedance.cpp +++ b/CGMES_3.0.0/GroundingImpedance.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Reactance.hpp" using namespace CIMPP; -GroundingImpedance::GroundingImpedance() {}; -GroundingImpedance::~GroundingImpedance() {}; +GroundingImpedance::GroundingImpedance() {} +GroundingImpedance::~GroundingImpedance() {} static const std::list PossibleProfilesForClass = { @@ -41,25 +40,24 @@ GroundingImpedance::getPossibleProfilesForAttributes() const return map; } - -bool assign_GroundingImpedance_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_GroundingImpedance_x(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (GroundingImpedance* element = dynamic_cast(BaseClass_ptr1)) + GroundingImpedance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_GroundingImpedance_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const GroundingImpedance* element = dynamic_cast(BaseClass_ptr1)) + const GroundingImpedance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x; if (!buffer.str().empty()) @@ -71,8 +69,6 @@ bool get_GroundingImpedance_x(const BaseClass* BaseClass_ptr1, std::stringstream return false; } - - const char GroundingImpedance::debugName[] = "GroundingImpedance"; const char* GroundingImpedance::debugString() const { @@ -81,12 +77,12 @@ const char* GroundingImpedance::debugString() const void GroundingImpedance::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:GroundingImpedance"), &GroundingImpedance_factory)); + factory_map.emplace("cim:GroundingImpedance", &GroundingImpedance_factory); } void GroundingImpedance::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:GroundingImpedance.x"), &assign_GroundingImpedance_x)); + assign_map.emplace("cim:GroundingImpedance.x", &assign_GroundingImpedance_x); } void GroundingImpedance::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/GroundingImpedance.hpp b/CGMES_3.0.0/GroundingImpedance.hpp index f821443f8..ad05b5aaa 100644 --- a/CGMES_3.0.0/GroundingImpedance.hpp +++ b/CGMES_3.0.0/GroundingImpedance.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A fixed impedance device used for grounding. - */ + /** \brief A fixed impedance device used for grounding. */ class GroundingImpedance : public EarthFaultCompensator { public: @@ -27,7 +25,8 @@ namespace CIMPP GroundingImpedance(); ~GroundingImpedance() override; - CIMPP::Reactance x; /* Reactance of device. Default: nullptr */ + /** \brief Reactance of device. Default: nullptr */ + CIMPP::Reactance x; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/HVDCDynamics.cpp b/CGMES_3.0.0/HVDCDynamics.cpp index b74566208..6d323a3e9 100644 --- a/CGMES_3.0.0/HVDCDynamics.cpp +++ b/CGMES_3.0.0/HVDCDynamics.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -HVDCDynamics::HVDCDynamics() {}; -HVDCDynamics::~HVDCDynamics() {}; +HVDCDynamics::HVDCDynamics() {} +HVDCDynamics::~HVDCDynamics() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ HVDCDynamics::getPossibleProfilesForAttributes() const return map; } - - - - - const char HVDCDynamics::debugName[] = "HVDCDynamics"; const char* HVDCDynamics::debugString() const { @@ -51,7 +46,7 @@ const char* HVDCDynamics::debugString() const void HVDCDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:HVDCDynamics"), &HVDCDynamics_factory)); + factory_map.emplace("cim:HVDCDynamics", &HVDCDynamics_factory); } void HVDCDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/HVDCDynamics.hpp b/CGMES_3.0.0/HVDCDynamics.hpp index 0a3cabdb3..de36667a8 100644 --- a/CGMES_3.0.0/HVDCDynamics.hpp +++ b/CGMES_3.0.0/HVDCDynamics.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - HVDC whose behaviour is described by reference to a standard model or by definition of a user-defined model. - */ + /** \brief HVDC whose behaviour is described by reference to a standard model or by definition of a user-defined model. */ class HVDCDynamics : public DynamicsFunctionBlock { public: @@ -26,7 +24,6 @@ namespace CIMPP HVDCDynamics(); ~HVDCDynamics() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/HydroEnergyConversionKind.cpp b/CGMES_3.0.0/HydroEnergyConversionKind.cpp index 1bc81701f..aeddc62cb 100644 --- a/CGMES_3.0.0/HydroEnergyConversionKind.cpp +++ b/CGMES_3.0.0/HydroEnergyConversionKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "HydroEnergyConversionKind") + if (EnumSymbol.substr(0, pos) != "HydroEnergyConversionKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,12 +50,12 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "generator") + if (EnumSymbol == "generator") { rop = HydroEnergyConversionKind::generator; return lop; } - if(EnumSymbol == "pumpAndGenerator") + if (EnumSymbol == "pumpAndGenerator") { rop = HydroEnergyConversionKind::pumpAndGenerator; return lop; diff --git a/CGMES_3.0.0/HydroEnergyConversionKind.hpp b/CGMES_3.0.0/HydroEnergyConversionKind.hpp index fb666b097..968163466 100644 --- a/CGMES_3.0.0/HydroEnergyConversionKind.hpp +++ b/CGMES_3.0.0/HydroEnergyConversionKind.hpp @@ -9,21 +9,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Specifies the capability of the hydro generating unit to convert energy as a generator or pump. - */ + /** \brief Specifies the capability of the hydro generating unit to convert energy as a generator or pump. */ class HydroEnergyConversionKind { public: enum HydroEnergyConversionKind_ENUM { - /** - * Able to generate power, but not able to pump water for energy storage. - */ + /** Able to generate power, but not able to pump water for energy storage. */ generator, - /** - * Able to both generate power and pump water for energy storage. - */ + /** Able to both generate power and pump water for energy storage. */ pumpAndGenerator, }; diff --git a/CGMES_3.0.0/HydroGeneratingUnit.cpp b/CGMES_3.0.0/HydroGeneratingUnit.cpp index 5a50f9c33..89229b9db 100644 --- a/CGMES_3.0.0/HydroGeneratingUnit.cpp +++ b/CGMES_3.0.0/HydroGeneratingUnit.cpp @@ -9,14 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "HydroPowerPlant.hpp" -#include "Length.hpp" -#include "HydroEnergyConversionKind.hpp" -#include "HydroTurbineKind.hpp" using namespace CIMPP; -HydroGeneratingUnit::HydroGeneratingUnit() : HydroPowerPlant(nullptr) {}; -HydroGeneratingUnit::~HydroGeneratingUnit() {}; +HydroGeneratingUnit::HydroGeneratingUnit() : HydroPowerPlant(nullptr) {} +HydroGeneratingUnit::~HydroGeneratingUnit() {} static const std::list PossibleProfilesForClass = { @@ -47,96 +44,98 @@ HydroGeneratingUnit::getPossibleProfilesForAttributes() const return map; } - -bool assign_HydroGeneratingUnit_dropHeight(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_HydroPowerPlant_HydroGeneratingUnits(BaseClass*, BaseClass*); +bool assign_HydroGeneratingUnit_HydroPowerPlant(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + HydroPowerPlant* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->dropHeight; - if (buffer.fail()) - return false; - else - return true; + if (element->HydroPowerPlant != element2) + { + element->HydroPowerPlant = element2; + return assign_HydroPowerPlant_HydroGeneratingUnits(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_HydroGeneratingUnit_energyConversionCapability(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_HydroGeneratingUnit_dropHeight(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->energyConversionCapability; - if (buffer.fail()) - return false; - else + buffer >> element->dropHeight; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_HydroGeneratingUnit_turbineType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_HydroGeneratingUnit_energyConversionCapability(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->turbineType; - if (buffer.fail()) - return false; - else + buffer >> element->energyConversionCapability; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_HydroPowerPlant_HydroGeneratingUnits(BaseClass*, BaseClass*); -bool assign_HydroGeneratingUnit_HydroPowerPlant(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_HydroGeneratingUnit_turbineType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); - HydroPowerPlant* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->HydroPowerPlant != element2) + buffer >> element->turbineType; + if (!buffer.fail()) { - element->HydroPowerPlant = element2; - return assign_HydroPowerPlant_HydroGeneratingUnits(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool get_HydroGeneratingUnit_dropHeight(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_HydroGeneratingUnit_HydroPowerPlant(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->dropHeight; - if (!buffer.str().empty()) + if (element->HydroPowerPlant != 0) { + BaseClass_list.push_back(element->HydroPowerPlant); return true; } } - buffer.setstate(std::ios::failbit); return false; } - -bool get_HydroGeneratingUnit_HydroPowerPlant(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) +bool get_HydroGeneratingUnit_dropHeight(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->HydroPowerPlant != 0) + buffer << element->dropHeight; + if (!buffer.str().empty()) { - BaseClass_list.push_back(element->HydroPowerPlant); return true; } } + buffer.setstate(std::ios::failbit); return false; } - bool get_HydroGeneratingUnit_energyConversionCapability(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->energyConversionCapability; if (!buffer.str().empty()) @@ -150,7 +149,8 @@ bool get_HydroGeneratingUnit_energyConversionCapability(const BaseClass* BaseCla bool get_HydroGeneratingUnit_turbineType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const HydroGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->turbineType; if (!buffer.str().empty()) @@ -170,19 +170,19 @@ const char* HydroGeneratingUnit::debugString() const void HydroGeneratingUnit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:HydroGeneratingUnit"), &HydroGeneratingUnit_factory)); + factory_map.emplace("cim:HydroGeneratingUnit", &HydroGeneratingUnit_factory); } void HydroGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:HydroGeneratingUnit.dropHeight"), &assign_HydroGeneratingUnit_dropHeight)); - assign_map.insert(std::make_pair(std::string("cim:HydroGeneratingUnit.energyConversionCapability"), &assign_HydroGeneratingUnit_energyConversionCapability)); - assign_map.insert(std::make_pair(std::string("cim:HydroGeneratingUnit.turbineType"), &assign_HydroGeneratingUnit_turbineType)); + assign_map.emplace("cim:HydroGeneratingUnit.dropHeight", &assign_HydroGeneratingUnit_dropHeight); + assign_map.emplace("cim:HydroGeneratingUnit.energyConversionCapability", &assign_HydroGeneratingUnit_energyConversionCapability); + assign_map.emplace("cim:HydroGeneratingUnit.turbineType", &assign_HydroGeneratingUnit_turbineType); } void HydroGeneratingUnit::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:HydroGeneratingUnit.HydroPowerPlant"), &assign_HydroGeneratingUnit_HydroPowerPlant)); + assign_map.emplace("cim:HydroGeneratingUnit.HydroPowerPlant", &assign_HydroGeneratingUnit_HydroPowerPlant); } void HydroGeneratingUnit::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/HydroGeneratingUnit.hpp b/CGMES_3.0.0/HydroGeneratingUnit.hpp index b181150a6..b96a3dfcf 100644 --- a/CGMES_3.0.0/HydroGeneratingUnit.hpp +++ b/CGMES_3.0.0/HydroGeneratingUnit.hpp @@ -20,9 +20,7 @@ namespace CIMPP { class HydroPowerPlant; - /* - A generating unit whose prime mover is a hydraulic turbine (e.g., Francis, Pelton, Kaplan). - */ + /** \brief A generating unit whose prime mover is a hydraulic turbine (e.g., Francis, Pelton, Kaplan). */ class HydroGeneratingUnit : public GeneratingUnit { public: @@ -30,10 +28,17 @@ namespace CIMPP HydroGeneratingUnit(); ~HydroGeneratingUnit() override; - CIMPP::HydroPowerPlant* HydroPowerPlant; /* The hydro generating unit belongs to a hydro power plant. Default: 0 */ - CIMPP::Length dropHeight; /* The height water drops from the reservoir mid-point to the turbine. Default: nullptr */ - CIMPP::HydroEnergyConversionKind energyConversionCapability; /* Energy conversion capability for generating. Default: 0 */ - CIMPP::HydroTurbineKind turbineType; /* Type of turbine. Default: 0 */ + /** \brief The hydro generating unit belongs to a hydro power plant. Default: 0 */ + CIMPP::HydroPowerPlant* HydroPowerPlant; + + /** \brief The height water drops from the reservoir mid-point to the turbine. Default: nullptr */ + CIMPP::Length dropHeight; + + /** \brief Energy conversion capability for generating. Default: 0 */ + CIMPP::HydroEnergyConversionKind energyConversionCapability; + + /** \brief Type of turbine. Default: 0 */ + CIMPP::HydroTurbineKind turbineType; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/HydroPlantStorageKind.cpp b/CGMES_3.0.0/HydroPlantStorageKind.cpp index 4930efb66..61d7d942b 100644 --- a/CGMES_3.0.0/HydroPlantStorageKind.cpp +++ b/CGMES_3.0.0/HydroPlantStorageKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "HydroPlantStorageKind") + if (EnumSymbol.substr(0, pos) != "HydroPlantStorageKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "runOfRiver") + if (EnumSymbol == "runOfRiver") { rop = HydroPlantStorageKind::runOfRiver; return lop; } - if(EnumSymbol == "pumpedStorage") + if (EnumSymbol == "pumpedStorage") { rop = HydroPlantStorageKind::pumpedStorage; return lop; } - if(EnumSymbol == "storage") + if (EnumSymbol == "storage") { rop = HydroPlantStorageKind::storage; return lop; diff --git a/CGMES_3.0.0/HydroPlantStorageKind.hpp b/CGMES_3.0.0/HydroPlantStorageKind.hpp index ddd375110..c5894a490 100644 --- a/CGMES_3.0.0/HydroPlantStorageKind.hpp +++ b/CGMES_3.0.0/HydroPlantStorageKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The type of hydro power plant. - */ + /** \brief The type of hydro power plant. */ class HydroPlantStorageKind { public: enum HydroPlantStorageKind_ENUM { - /** - * Run of river. - */ + /** Run of river. */ runOfRiver, - /** - * Pumped storage. - */ + /** Pumped storage. */ pumpedStorage, - /** - * Storage. - */ + /** Storage. */ storage, }; diff --git a/CGMES_3.0.0/HydroPowerPlant.cpp b/CGMES_3.0.0/HydroPowerPlant.cpp index 9d0c8c562..ad177ac88 100644 --- a/CGMES_3.0.0/HydroPowerPlant.cpp +++ b/CGMES_3.0.0/HydroPowerPlant.cpp @@ -10,12 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "HydroGeneratingUnit.hpp" #include "HydroPump.hpp" -#include "HydroPlantStorageKind.hpp" using namespace CIMPP; -HydroPowerPlant::HydroPowerPlant() {}; -HydroPowerPlant::~HydroPowerPlant() {}; +HydroPowerPlant::HydroPowerPlant() {} +HydroPowerPlant::~HydroPowerPlant() {} static const std::list PossibleProfilesForClass = { @@ -44,21 +43,6 @@ HydroPowerPlant::getPossibleProfilesForAttributes() const return map; } - -bool assign_HydroPowerPlant_hydroPlantStorageType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (HydroPowerPlant* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->hydroPlantStorageType; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_HydroGeneratingUnit_HydroPowerPlant(BaseClass*, BaseClass*); bool assign_HydroPowerPlant_HydroGeneratingUnits(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -75,6 +59,7 @@ bool assign_HydroPowerPlant_HydroGeneratingUnits(BaseClass* BaseClass_ptr1, Base } return false; } + bool assign_HydroPump_HydroPowerPlant(BaseClass*, BaseClass*); bool assign_HydroPowerPlant_HydroPumps(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -92,11 +77,26 @@ bool assign_HydroPowerPlant_HydroPumps(BaseClass* BaseClass_ptr1, BaseClass* Bas return false; } +bool assign_HydroPowerPlant_hydroPlantStorageType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + HydroPowerPlant* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->hydroPlantStorageType; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + bool get_HydroPowerPlant_hydroPlantStorageType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const HydroPowerPlant* element = dynamic_cast(BaseClass_ptr1)) + const HydroPowerPlant* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hydroPlantStorageType; if (!buffer.str().empty()) @@ -116,18 +116,18 @@ const char* HydroPowerPlant::debugString() const void HydroPowerPlant::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:HydroPowerPlant"), &HydroPowerPlant_factory)); + factory_map.emplace("cim:HydroPowerPlant", &HydroPowerPlant_factory); } void HydroPowerPlant::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:HydroPowerPlant.hydroPlantStorageType"), &assign_HydroPowerPlant_hydroPlantStorageType)); + assign_map.emplace("cim:HydroPowerPlant.hydroPlantStorageType", &assign_HydroPowerPlant_hydroPlantStorageType); } void HydroPowerPlant::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:HydroPowerPlant.HydroGeneratingUnits"), &assign_HydroPowerPlant_HydroGeneratingUnits)); - assign_map.insert(std::make_pair(std::string("cim:HydroPowerPlant.HydroPumps"), &assign_HydroPowerPlant_HydroPumps)); + assign_map.emplace("cim:HydroPowerPlant.HydroGeneratingUnits", &assign_HydroPowerPlant_HydroGeneratingUnits); + assign_map.emplace("cim:HydroPowerPlant.HydroPumps", &assign_HydroPowerPlant_HydroPumps); } void HydroPowerPlant::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/HydroPowerPlant.hpp b/CGMES_3.0.0/HydroPowerPlant.hpp index 71bb379b4..ab7712608 100644 --- a/CGMES_3.0.0/HydroPowerPlant.hpp +++ b/CGMES_3.0.0/HydroPowerPlant.hpp @@ -19,9 +19,7 @@ namespace CIMPP class HydroGeneratingUnit; class HydroPump; - /* - A hydro power station which can generate or pump. When generating, the generator turbines receive water from an upper reservoir. When pumping, the pumps receive their water from a lower reservoir. - */ + /** \brief A hydro power station which can generate or pump. When generating, the generator turbines receive water from an upper reservoir. When pumping, the pumps receive their water from a lower reservoir. */ class HydroPowerPlant : public PowerSystemResource { public: @@ -29,9 +27,14 @@ namespace CIMPP HydroPowerPlant(); ~HydroPowerPlant() override; - std::list HydroGeneratingUnits; /* The hydro generating unit belongs to a hydro power plant. Default: 0 */ - std::list HydroPumps; /* The hydro pump may be a member of a pumped storage plant or a pump for distributing water. Default: 0 */ - CIMPP::HydroPlantStorageKind hydroPlantStorageType; /* The type of hydro power plant water storage. Default: 0 */ + /** \brief The hydro generating unit belongs to a hydro power plant. Default: 0 */ + std::list HydroGeneratingUnits; + + /** \brief The hydro pump may be a member of a pumped storage plant or a pump for distributing water. Default: 0 */ + std::list HydroPumps; + + /** \brief The type of hydro power plant water storage. Default: 0 */ + CIMPP::HydroPlantStorageKind hydroPlantStorageType; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/HydroPump.cpp b/CGMES_3.0.0/HydroPump.cpp index 698253b53..8d0613e79 100644 --- a/CGMES_3.0.0/HydroPump.cpp +++ b/CGMES_3.0.0/HydroPump.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -HydroPump::HydroPump() : HydroPowerPlant(nullptr), RotatingMachine(nullptr) {}; -HydroPump::~HydroPump() {}; +HydroPump::HydroPump() : HydroPowerPlant(nullptr), RotatingMachine(nullptr) {} +HydroPump::~HydroPump() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ HydroPump::getPossibleProfilesForAttributes() const return map; } - - bool assign_HydroPowerPlant_HydroPumps(BaseClass*, BaseClass*); bool assign_HydroPump_HydroPowerPlant(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_HydroPump_HydroPowerPlant(BaseClass* BaseClass_ptr1, BaseClass* Base } return false; } + bool assign_RotatingMachine_HydroPump(BaseClass*, BaseClass*); bool assign_HydroPump_RotatingMachine(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_HydroPump_RotatingMachine(BaseClass* BaseClass_ptr1, BaseClass* Base return false; } - bool get_HydroPump_HydroPowerPlant(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const HydroPump* element = dynamic_cast(BaseClass_ptr1)) + const HydroPump* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->HydroPowerPlant != 0) { @@ -93,7 +92,8 @@ bool get_HydroPump_HydroPowerPlant(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const HydroPump* element = dynamic_cast(BaseClass_ptr1)) + const HydroPump* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->RotatingMachine != 0) { @@ -104,7 +104,6 @@ bool get_HydroPump_RotatingMachine(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:HydroPump"), &HydroPump_factory)); + factory_map.emplace("cim:HydroPump", &HydroPump_factory); } void HydroPump::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void HydroPump::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:HydroPump.HydroPowerPlant"), &assign_HydroPump_HydroPowerPlant)); - assign_map.insert(std::make_pair(std::string("cim:HydroPump.RotatingMachine"), &assign_HydroPump_RotatingMachine)); + assign_map.emplace("cim:HydroPump.HydroPowerPlant", &assign_HydroPump_HydroPowerPlant); + assign_map.emplace("cim:HydroPump.RotatingMachine", &assign_HydroPump_RotatingMachine); } void HydroPump::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/HydroPump.hpp b/CGMES_3.0.0/HydroPump.hpp index d744a3728..9830eee7a 100644 --- a/CGMES_3.0.0/HydroPump.hpp +++ b/CGMES_3.0.0/HydroPump.hpp @@ -18,9 +18,7 @@ namespace CIMPP class HydroPowerPlant; class RotatingMachine; - /* - A synchronous motor-driven pump, typically associated with a pumped storage plant. - */ + /** \brief A synchronous motor-driven pump, typically associated with a pumped storage plant. */ class HydroPump : public Equipment { public: @@ -28,8 +26,11 @@ namespace CIMPP HydroPump(); ~HydroPump() override; - CIMPP::HydroPowerPlant* HydroPowerPlant; /* The hydro pump may be a member of a pumped storage plant or a pump for distributing water. Default: 0 */ - CIMPP::RotatingMachine* RotatingMachine; /* The synchronous machine drives the turbine which moves the water from a low elevation to a higher elevation. The direction of machine rotation for pumping may or may not be the same as for generating. Default: 0 */ + /** \brief The hydro pump may be a member of a pumped storage plant or a pump for distributing water. Default: 0 */ + CIMPP::HydroPowerPlant* HydroPowerPlant; + + /** \brief The synchronous machine drives the turbine which moves the water from a low elevation to a higher elevation. The direction of machine rotation for pumping may or may not be the same as for generating. Default: 0 */ + CIMPP::RotatingMachine* RotatingMachine; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/HydroTurbineKind.cpp b/CGMES_3.0.0/HydroTurbineKind.cpp index 017c0a686..ec8d6acbc 100644 --- a/CGMES_3.0.0/HydroTurbineKind.cpp +++ b/CGMES_3.0.0/HydroTurbineKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "HydroTurbineKind") + if (EnumSymbol.substr(0, pos) != "HydroTurbineKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "francis") + if (EnumSymbol == "francis") { rop = HydroTurbineKind::francis; return lop; } - if(EnumSymbol == "pelton") + if (EnumSymbol == "pelton") { rop = HydroTurbineKind::pelton; return lop; } - if(EnumSymbol == "kaplan") + if (EnumSymbol == "kaplan") { rop = HydroTurbineKind::kaplan; return lop; diff --git a/CGMES_3.0.0/HydroTurbineKind.hpp b/CGMES_3.0.0/HydroTurbineKind.hpp index e5037e37b..d895e4051 100644 --- a/CGMES_3.0.0/HydroTurbineKind.hpp +++ b/CGMES_3.0.0/HydroTurbineKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of turbine. - */ + /** \brief Type of turbine. */ class HydroTurbineKind { public: enum HydroTurbineKind_ENUM { - /** - * Francis. - */ + /** Francis. */ francis, - /** - * Pelton. - */ + /** Pelton. */ pelton, - /** - * Kaplan. - */ + /** Kaplan. */ kaplan, }; diff --git a/CGMES_3.0.0/IEC61970.hpp b/CGMES_3.0.0/IEC61970.hpp index 94fae3954..5d7380296 100644 --- a/CGMES_3.0.0/IEC61970.hpp +++ b/CGMES_3.0.0/IEC61970.hpp @@ -444,4 +444,5 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindType3or4UserDefined.hpp" #include "WorkLocation.hpp" #include "UnknownType.hpp" -#endif \ No newline at end of file + +#endif diff --git a/CGMES_3.0.0/IOPoint.cpp b/CGMES_3.0.0/IOPoint.cpp index bba2b5efd..aac62ef6a 100644 --- a/CGMES_3.0.0/IOPoint.cpp +++ b/CGMES_3.0.0/IOPoint.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -IOPoint::IOPoint() {}; -IOPoint::~IOPoint() {}; +IOPoint::IOPoint() {} +IOPoint::~IOPoint() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ IOPoint::getPossibleProfilesForAttributes() const return map; } - - - - - const char IOPoint::debugName[] = "IOPoint"; const char* IOPoint::debugString() const { @@ -51,7 +46,7 @@ const char* IOPoint::debugString() const void IOPoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:IOPoint"), &IOPoint_factory)); + factory_map.emplace("cim:IOPoint", &IOPoint_factory); } void IOPoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/IOPoint.hpp b/CGMES_3.0.0/IOPoint.hpp index 02c25aff9..0d08d0c27 100644 --- a/CGMES_3.0.0/IOPoint.hpp +++ b/CGMES_3.0.0/IOPoint.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The class describe a measurement or control value. The purpose is to enable having attributes and associations common for measurement and control. - */ + /** \brief The class describe a measurement or control value. The purpose is to enable having attributes and associations common for measurement and control. */ class IOPoint : public IdentifiedObject { public: @@ -26,7 +24,6 @@ namespace CIMPP IOPoint(); ~IOPoint() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/IdentifiedObject.cpp b/CGMES_3.0.0/IdentifiedObject.cpp index f860861a7..0dd4e5e22 100644 --- a/CGMES_3.0.0/IdentifiedObject.cpp +++ b/CGMES_3.0.0/IdentifiedObject.cpp @@ -9,16 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "DiagramObject.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -IdentifiedObject::IdentifiedObject() {}; -IdentifiedObject::~IdentifiedObject() {}; +IdentifiedObject::IdentifiedObject() {} +IdentifiedObject::~IdentifiedObject() {} static const std::list PossibleProfilesForClass = { @@ -59,93 +54,98 @@ IdentifiedObject::getPossibleProfilesForAttributes() const return map; } - -bool assign_IdentifiedObject_description(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_DiagramObject_IdentifiedObject(BaseClass*, BaseClass*); +bool assign_IdentifiedObject_DiagramObjects(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + DiagramObject* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - element->description = buffer.str(); - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->DiagramObjects.begin(), element->DiagramObjects.end(), element2) == element->DiagramObjects.end()) + { + element->DiagramObjects.push_back(element2); + return assign_DiagramObject_IdentifiedObject(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_IdentifiedObject_energyIdentCodeEic(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_IdentifiedObject_description(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - element->energyIdentCodeEic = buffer.str(); - if (buffer.fail()) - return false; - else + element->description = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_IdentifiedObject_mRID(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_IdentifiedObject_energyIdentCodeEic(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - element->mRID = buffer.str(); - if (buffer.fail()) - return false; - else + element->energyIdentCodeEic = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_IdentifiedObject_name(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_IdentifiedObject_mRID(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - element->name = buffer.str(); - if (buffer.fail()) - return false; - else + element->mRID = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_IdentifiedObject_shortName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_IdentifiedObject_name(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - element->shortName = buffer.str(); - if (buffer.fail()) - return false; - else + element->name = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_DiagramObject_IdentifiedObject(BaseClass*, BaseClass*); -bool assign_IdentifiedObject_DiagramObjects(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_IdentifiedObject_shortName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); - DiagramObject* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->DiagramObjects.begin(), element->DiagramObjects.end(), element2) == element->DiagramObjects.end()) + element->shortName = buffer.str(); + if (!buffer.fail()) { - element->DiagramObjects.push_back(element2); - return assign_DiagramObject_IdentifiedObject(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_IdentifiedObject_description(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->description; if (!buffer.str().empty()) @@ -159,7 +159,8 @@ bool get_IdentifiedObject_description(const BaseClass* BaseClass_ptr1, std::stri bool get_IdentifiedObject_energyIdentCodeEic(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->energyIdentCodeEic; if (!buffer.str().empty()) @@ -173,7 +174,8 @@ bool get_IdentifiedObject_energyIdentCodeEic(const BaseClass* BaseClass_ptr1, st bool get_IdentifiedObject_mRID(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mRID; if (!buffer.str().empty()) @@ -187,7 +189,8 @@ bool get_IdentifiedObject_mRID(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_IdentifiedObject_name(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->name; if (!buffer.str().empty()) @@ -201,7 +204,8 @@ bool get_IdentifiedObject_name(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_IdentifiedObject_shortName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1)) + const IdentifiedObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->shortName; if (!buffer.str().empty()) @@ -213,8 +217,6 @@ bool get_IdentifiedObject_shortName(const BaseClass* BaseClass_ptr1, std::string return false; } - - const char IdentifiedObject::debugName[] = "IdentifiedObject"; const char* IdentifiedObject::debugString() const { @@ -223,21 +225,21 @@ const char* IdentifiedObject::debugString() const void IdentifiedObject::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:IdentifiedObject"), &IdentifiedObject_factory)); + factory_map.emplace("cim:IdentifiedObject", &IdentifiedObject_factory); } void IdentifiedObject::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:IdentifiedObject.description"), &assign_IdentifiedObject_description)); - assign_map.insert(std::make_pair(std::string("cim:IdentifiedObject.energyIdentCodeEic"), &assign_IdentifiedObject_energyIdentCodeEic)); - assign_map.insert(std::make_pair(std::string("cim:IdentifiedObject.mRID"), &assign_IdentifiedObject_mRID)); - assign_map.insert(std::make_pair(std::string("cim:IdentifiedObject.name"), &assign_IdentifiedObject_name)); - assign_map.insert(std::make_pair(std::string("cim:IdentifiedObject.shortName"), &assign_IdentifiedObject_shortName)); + assign_map.emplace("cim:IdentifiedObject.description", &assign_IdentifiedObject_description); + assign_map.emplace("cim:IdentifiedObject.energyIdentCodeEic", &assign_IdentifiedObject_energyIdentCodeEic); + assign_map.emplace("cim:IdentifiedObject.mRID", &assign_IdentifiedObject_mRID); + assign_map.emplace("cim:IdentifiedObject.name", &assign_IdentifiedObject_name); + assign_map.emplace("cim:IdentifiedObject.shortName", &assign_IdentifiedObject_shortName); } void IdentifiedObject::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:IdentifiedObject.DiagramObjects"), &assign_IdentifiedObject_DiagramObjects)); + assign_map.emplace("cim:IdentifiedObject.DiagramObjects", &assign_IdentifiedObject_DiagramObjects); } void IdentifiedObject::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/IdentifiedObject.hpp b/CGMES_3.0.0/IdentifiedObject.hpp index 4e8b05a2b..f1ec3230b 100644 --- a/CGMES_3.0.0/IdentifiedObject.hpp +++ b/CGMES_3.0.0/IdentifiedObject.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class DiagramObject; - /* - This is a root class to provide common identification for all classes needing identification and naming attributes. - */ + /** \brief This is a root class to provide common identification for all classes needing identification and naming attributes. */ class IdentifiedObject : public BaseClass { public: @@ -28,12 +26,23 @@ namespace CIMPP IdentifiedObject(); ~IdentifiedObject() override; - std::list DiagramObjects; /* The diagram objects that are associated with the domain object. Default: 0 */ - CIMPP::String description; /* The description is a free human readable text describing or naming the object. It may be non unique and may not correlate to a naming hierarchy. Default: '' */ - CIMPP::String energyIdentCodeEic; /* The attribute is used for an exchange of the EIC code (Energy identification Code). The length of the string is 16 characters as defined by the EIC code. For details on EIC scheme please refer to ENTSO-E web site. Default: '' */ - CIMPP::String mRID; /* Master resource identifier issued by a model authority. The mRID is unique within an exchange context. Global uniqueness is easily achieved by using a UUID, as specified in RFC 4122, for the mRID. The use of UUID is strongly recommended. For CIMXML data files in RDF syntax conforming to IEC 61970-552, the mRID is mapped to rdf:ID or rdf:about attributes that identify CIM object elements. Default: '' */ - CIMPP::String name; /* The name is any free human readable and possibly non unique text naming the object. Default: '' */ - CIMPP::String shortName; /* The attribute is used for an exchange of a human readable short name with length of the string 12 characters maximum. Default: '' */ + /** \brief The diagram objects that are associated with the domain object. Default: 0 */ + std::list DiagramObjects; + + /** \brief The description is a free human readable text describing or naming the object. It may be non unique and may not correlate to a naming hierarchy. Default: '' */ + CIMPP::String description; + + /** \brief The attribute is used for an exchange of the EIC code (Energy identification Code). The length of the string is 16 characters as defined by the EIC code. For details on EIC scheme please refer to ENTSO-E web site. Default: '' */ + CIMPP::String energyIdentCodeEic; + + /** \brief Master resource identifier issued by a model authority. The mRID is unique within an exchange context. Global uniqueness is easily achieved by using a UUID, as specified in RFC 4122, for the mRID. The use of UUID is strongly recommended. For CIMXML data files in RDF syntax conforming to IEC 61970-552, the mRID is mapped to rdf:ID or rdf:about attributes that identify CIM object elements. Default: '' */ + CIMPP::String mRID; + + /** \brief The name is any free human readable and possibly non unique text naming the object. Default: '' */ + CIMPP::String name; + + /** \brief The attribute is used for an exchange of a human readable short name with length of the string 12 characters maximum. Default: '' */ + CIMPP::String shortName; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/IfdBaseKind.cpp b/CGMES_3.0.0/IfdBaseKind.cpp index bc4a474a5..fcc2b8809 100644 --- a/CGMES_3.0.0/IfdBaseKind.cpp +++ b/CGMES_3.0.0/IfdBaseKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "IfdBaseKind") + if (EnumSymbol.substr(0, pos) != "IfdBaseKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "ifag") + if (EnumSymbol == "ifag") { rop = IfdBaseKind::ifag; return lop; } - if(EnumSymbol == "ifnl") + if (EnumSymbol == "ifnl") { rop = IfdBaseKind::ifnl; return lop; } - if(EnumSymbol == "iffl") + if (EnumSymbol == "iffl") { rop = IfdBaseKind::iffl; return lop; diff --git a/CGMES_3.0.0/IfdBaseKind.hpp b/CGMES_3.0.0/IfdBaseKind.hpp index 0c3b4052c..f6b8cceff 100644 --- a/CGMES_3.0.0/IfdBaseKind.hpp +++ b/CGMES_3.0.0/IfdBaseKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Excitation base system mode. - */ + /** \brief Excitation base system mode. */ class IfdBaseKind { public: enum IfdBaseKind_ENUM { - /** - * Air gap line mode. - */ + /** Air gap line mode. */ ifag, - /** - * No load system with saturation mode. - */ + /** No load system with saturation mode. */ ifnl, - /** - * Full load system mode. - */ + /** Full load system mode. */ iffl, }; diff --git a/CGMES_3.0.0/Inductance.hpp b/CGMES_3.0.0/Inductance.hpp index 9d5005915..f9b404e47 100644 --- a/CGMES_3.0.0/Inductance.hpp +++ b/CGMES_3.0.0/Inductance.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Inductive part of reactance (imaginary part of impedance), at rated frequency. - */ + /** \brief Inductive part of reactance (imaginary part of impedance), at rated frequency. */ class Inductance { public: diff --git a/CGMES_3.0.0/InputSignalKind.cpp b/CGMES_3.0.0/InputSignalKind.cpp index 2c91ecef8..162927a73 100644 --- a/CGMES_3.0.0/InputSignalKind.cpp +++ b/CGMES_3.0.0/InputSignalKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "InputSignalKind") + if (EnumSymbol.substr(0, pos) != "InputSignalKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,57 +50,57 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "rotorSpeed") + if (EnumSymbol == "rotorSpeed") { rop = InputSignalKind::rotorSpeed; return lop; } - if(EnumSymbol == "rotorAngularFrequencyDeviation") + if (EnumSymbol == "rotorAngularFrequencyDeviation") { rop = InputSignalKind::rotorAngularFrequencyDeviation; return lop; } - if(EnumSymbol == "busFrequency") + if (EnumSymbol == "busFrequency") { rop = InputSignalKind::busFrequency; return lop; } - if(EnumSymbol == "busFrequencyDeviation") + if (EnumSymbol == "busFrequencyDeviation") { rop = InputSignalKind::busFrequencyDeviation; return lop; } - if(EnumSymbol == "generatorElectricalPower") + if (EnumSymbol == "generatorElectricalPower") { rop = InputSignalKind::generatorElectricalPower; return lop; } - if(EnumSymbol == "generatorAcceleratingPower") + if (EnumSymbol == "generatorAcceleratingPower") { rop = InputSignalKind::generatorAcceleratingPower; return lop; } - if(EnumSymbol == "busVoltage") + if (EnumSymbol == "busVoltage") { rop = InputSignalKind::busVoltage; return lop; } - if(EnumSymbol == "busVoltageDerivative") + if (EnumSymbol == "busVoltageDerivative") { rop = InputSignalKind::busVoltageDerivative; return lop; } - if(EnumSymbol == "branchCurrent") + if (EnumSymbol == "branchCurrent") { rop = InputSignalKind::branchCurrent; return lop; } - if(EnumSymbol == "fieldCurrent") + if (EnumSymbol == "fieldCurrent") { rop = InputSignalKind::fieldCurrent; return lop; } - if(EnumSymbol == "generatorMechanicalPower") + if (EnumSymbol == "generatorMechanicalPower") { rop = InputSignalKind::generatorMechanicalPower; return lop; diff --git a/CGMES_3.0.0/InputSignalKind.hpp b/CGMES_3.0.0/InputSignalKind.hpp index f1dbacfc2..521628928 100644 --- a/CGMES_3.0.0/InputSignalKind.hpp +++ b/CGMES_3.0.0/InputSignalKind.hpp @@ -9,57 +9,33 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Types of input signals. In dynamics modelling, commonly represented by the j parameter. - */ + /** \brief Types of input signals. In dynamics modelling, commonly represented by the j parameter. */ class InputSignalKind { public: enum InputSignalKind_ENUM { - /** - * Input signal is rotor or shaft speed (angular frequency). - */ + /** Input signal is rotor or shaft speed (angular frequency). */ rotorSpeed, - /** - * Input signal is rotor or shaft angular frequency deviation. - */ + /** Input signal is rotor or shaft angular frequency deviation. */ rotorAngularFrequencyDeviation, - /** - * Input signal is bus voltage fr<font color="#0f0f0f">equency. This could be a terminal frequency or remote frequency.</font> - */ + /** Input signal is bus voltage fr<font color="#0f0f0f">equency. This could be a terminal frequency or remote frequency.</font> */ busFrequency, - /** - * Input signal is deviation of bus voltage frequ<font color="#0f0f0f">ency. This could be a terminal frequency deviation or remote frequency deviation.</font> - */ + /** Input signal is deviation of bus voltage frequ<font color="#0f0f0f">ency. This could be a terminal frequency deviation or remote frequency deviation.</font> */ busFrequencyDeviation, - /** - * Input signal is generator electrical power on rated <i>S</i>. - */ + /** Input signal is generator electrical power on rated <i>S</i>. */ generatorElectricalPower, - /** - * Input signal is generator accelerating power. - */ + /** Input signal is generator accelerating power. */ generatorAcceleratingPower, - /** - * Input signal <font color="#0f0f0f">is bus voltage. This could be a terminal voltage or remote voltage.</font> - */ + /** Input signal <font color="#0f0f0f">is bus voltage. This could be a terminal voltage or remote voltage.</font> */ busVoltage, - /** - * Input signal is derivative of bus voltag<font color="#0f0f0f">e. This could be a terminal voltage derivative or remote voltage derivative.</font> - */ + /** Input signal is derivative of bus voltag<font color="#0f0f0f">e. This could be a terminal voltage derivative or remote voltage derivative.</font> */ busVoltageDerivative, - /** - * Input signal is amplitude of remote branch current. - */ + /** Input signal is amplitude of remote branch current. */ branchCurrent, - /** - * Input signal is generator field current. - */ + /** Input signal is generator field current. */ fieldCurrent, - /** - * Input signal is generator mechanical power. - */ + /** Input signal is generator mechanical power. */ generatorMechanicalPower, }; diff --git a/CGMES_3.0.0/Jumper.cpp b/CGMES_3.0.0/Jumper.cpp index 84f76965a..0fa288287 100644 --- a/CGMES_3.0.0/Jumper.cpp +++ b/CGMES_3.0.0/Jumper.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Jumper::Jumper() {}; -Jumper::~Jumper() {}; +Jumper::Jumper() {} +Jumper::~Jumper() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ Jumper::getPossibleProfilesForAttributes() const return map; } - - - - - const char Jumper::debugName[] = "Jumper"; const char* Jumper::debugString() const { @@ -52,7 +47,7 @@ const char* Jumper::debugString() const void Jumper::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Jumper"), &Jumper_factory)); + factory_map.emplace("cim:Jumper", &Jumper_factory); } void Jumper::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/Jumper.hpp b/CGMES_3.0.0/Jumper.hpp index a85025ea4..687030d15 100644 --- a/CGMES_3.0.0/Jumper.hpp +++ b/CGMES_3.0.0/Jumper.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A short section of conductor with negligible impedance which can be manually removed and replaced if the circuit is de-energized. Note that zero-impedance branches can potentially be modelled by other equipment types. - */ + /** \brief A short section of conductor with negligible impedance which can be manually removed and replaced if the circuit is de-energized. Note that zero-impedance branches can potentially be modelled by other equipment types. */ class Jumper : public Switch { public: @@ -26,7 +24,6 @@ namespace CIMPP Jumper(); ~Jumper() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Junction.cpp b/CGMES_3.0.0/Junction.cpp index 7578c49b2..2b8c345c2 100644 --- a/CGMES_3.0.0/Junction.cpp +++ b/CGMES_3.0.0/Junction.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Junction::Junction() {}; -Junction::~Junction() {}; +Junction::Junction() {} +Junction::~Junction() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ Junction::getPossibleProfilesForAttributes() const return map; } - - - - - const char Junction::debugName[] = "Junction"; const char* Junction::debugString() const { @@ -52,7 +47,7 @@ const char* Junction::debugString() const void Junction::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Junction"), &Junction_factory)); + factory_map.emplace("cim:Junction", &Junction_factory); } void Junction::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/Junction.hpp b/CGMES_3.0.0/Junction.hpp index 656b24ae0..4f48dfc33 100644 --- a/CGMES_3.0.0/Junction.hpp +++ b/CGMES_3.0.0/Junction.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A point where one or more conducting equipments are connected with zero resistance. - */ + /** \brief A point where one or more conducting equipments are connected with zero resistance. */ class Junction : public Connector { public: @@ -26,7 +24,6 @@ namespace CIMPP Junction(); ~Junction() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Length.hpp b/CGMES_3.0.0/Length.hpp index 6d56bd794..8a7a5656b 100644 --- a/CGMES_3.0.0/Length.hpp +++ b/CGMES_3.0.0/Length.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Unit of length. It shall be a positive value or zero. - */ + /** \brief Unit of length. It shall be a positive value or zero. */ class Length { public: diff --git a/CGMES_3.0.0/Limit.cpp b/CGMES_3.0.0/Limit.cpp index daec9247e..42f8671c4 100644 --- a/CGMES_3.0.0/Limit.cpp +++ b/CGMES_3.0.0/Limit.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Limit::Limit() {}; -Limit::~Limit() {}; +Limit::Limit() {} +Limit::~Limit() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ Limit::getPossibleProfilesForAttributes() const return map; } - - - - - const char Limit::debugName[] = "Limit"; const char* Limit::debugString() const { @@ -51,7 +46,7 @@ const char* Limit::debugString() const void Limit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Limit"), &Limit_factory)); + factory_map.emplace("cim:Limit", &Limit_factory); } void Limit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/Limit.hpp b/CGMES_3.0.0/Limit.hpp index 1ea9636e1..76b2b4799 100644 --- a/CGMES_3.0.0/Limit.hpp +++ b/CGMES_3.0.0/Limit.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Specifies one limit value for a Measurement. A Measurement typically has several limits that are kept together by the LimitSet class. The actual meaning and use of a Limit instance (i.e., if it is an alarm or warning limit or if it is a high or low limit) is not captured in the Limit class. However the name of a Limit instance may indicate both meaning and use. - */ + /** \brief Specifies one limit value for a Measurement. A Measurement typically has several limits that are kept together by the LimitSet class. The actual meaning and use of a Limit instance (i.e., if it is an alarm or warning limit or if it is a high or low limit) is not captured in the Limit class. However the name of a Limit instance may indicate both meaning and use. */ class Limit : public IdentifiedObject { public: @@ -26,7 +24,6 @@ namespace CIMPP Limit(); ~Limit() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/LimitKind.cpp b/CGMES_3.0.0/LimitKind.cpp index 664a55374..215a0bc81 100644 --- a/CGMES_3.0.0/LimitKind.cpp +++ b/CGMES_3.0.0/LimitKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "LimitKind") + if (EnumSymbol.substr(0, pos) != "LimitKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,57 +50,57 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "patl") + if (EnumSymbol == "patl") { rop = LimitKind::patl; return lop; } - if(EnumSymbol == "patlt") + if (EnumSymbol == "patlt") { rop = LimitKind::patlt; return lop; } - if(EnumSymbol == "tatl") + if (EnumSymbol == "tatl") { rop = LimitKind::tatl; return lop; } - if(EnumSymbol == "tc") + if (EnumSymbol == "tc") { rop = LimitKind::tc; return lop; } - if(EnumSymbol == "tct") + if (EnumSymbol == "tct") { rop = LimitKind::tct; return lop; } - if(EnumSymbol == "highVoltage") + if (EnumSymbol == "highVoltage") { rop = LimitKind::highVoltage; return lop; } - if(EnumSymbol == "lowVoltage") + if (EnumSymbol == "lowVoltage") { rop = LimitKind::lowVoltage; return lop; } - if(EnumSymbol == "operationalVoltageLimit") + if (EnumSymbol == "operationalVoltageLimit") { rop = LimitKind::operationalVoltageLimit; return lop; } - if(EnumSymbol == "alarmVoltage") + if (EnumSymbol == "alarmVoltage") { rop = LimitKind::alarmVoltage; return lop; } - if(EnumSymbol == "warningVoltage") + if (EnumSymbol == "warningVoltage") { rop = LimitKind::warningVoltage; return lop; } - if(EnumSymbol == "stability") + if (EnumSymbol == "stability") { rop = LimitKind::stability; return lop; diff --git a/CGMES_3.0.0/LimitKind.hpp b/CGMES_3.0.0/LimitKind.hpp index 9f88bab7e..02df41cda 100644 --- a/CGMES_3.0.0/LimitKind.hpp +++ b/CGMES_3.0.0/LimitKind.hpp @@ -9,57 +9,33 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Limit kinds. - */ + /** \brief Limit kinds. */ class LimitKind { public: enum LimitKind_ENUM { - /** - * The Permanent Admissible Transmission Loading (PATL) is the loading in amperes, MVA or MW that can be accepted by a network branch for an unlimited duration without any risk for the material. The OperationnalLimitType.isInfiniteDuration is set to true. There shall be only one OperationalLimitType of kind PATL per OperationalLimitSet if the PATL is ApparentPowerLimit, ActivePowerLimit, or CurrentLimit for a given Terminal or Equipment. - */ + /** The Permanent Admissible Transmission Loading (PATL) is the loading in amperes, MVA or MW that can be accepted by a network branch for an unlimited duration without any risk for the material. The OperationnalLimitType.isInfiniteDuration is set to true. There shall be only one OperationalLimitType of kind PATL per OperationalLimitSet if the PATL is ApparentPowerLimit, ActivePowerLimit, or CurrentLimit for a given Terminal or Equipment. */ patl, - /** - * Permanent Admissible Transmission Loading Threshold (PATLT) is a value in engineering units defined for PATL and calculated using a percentage less than 100 % of the PATL type intended to alert operators of an arising condition. The percentage should be given in the name of the OperationalLimitSet. The aceptableDuration is another way to express the severity of the limit. - */ + /** Permanent Admissible Transmission Loading Threshold (PATLT) is a value in engineering units defined for PATL and calculated using a percentage less than 100 % of the PATL type intended to alert operators of an arising condition. The percentage should be given in the name of the OperationalLimitSet. The aceptableDuration is another way to express the severity of the limit. */ patlt, - /** - * Temporarily Admissible Transmission Loading (TATL) which is the loading in amperes, MVA or MW that can be accepted by a branch for a certain limited duration. The TATL can be defined in different ways: <ul> <li>as a fixed percentage of the PATL for a given time (for example, 115% of the PATL that can be accepted during 15 minutes),</li> </ul> <ul> <li>pairs of TATL type and Duration calculated for each line taking into account its particular configuration and conditions of functioning (for example, it can define a TATL acceptable during 20 minutes and another one acceptable during 10 minutes).</li> </ul> Such a definition of TATL can depend on the initial operating conditions of the network element (sag situation of a line). The duration attribute can be used to define several TATL limit types. Hence multiple TATL limit values may exist having different durations. - */ + /** Temporarily Admissible Transmission Loading (TATL) which is the loading in amperes, MVA or MW that can be accepted by a branch for a certain limited duration. The TATL can be defined in different ways: <ul> <li>as a fixed percentage of the PATL for a given time (for example, 115% of the PATL that can be accepted during 15 minutes),</li> </ul> <ul> <li>pairs of TATL type and Duration calculated for each line taking into account its particular configuration and conditions of functioning (for example, it can define a TATL acceptable during 20 minutes and another one acceptable during 10 minutes).</li> </ul> Such a definition of TATL can depend on the initial operating conditions of the network element (sag situation of a line). The duration attribute can be used to define several TATL limit types. Hence multiple TATL limit values may exist having different durations. */ tatl, - /** - * Tripping Current (TC) is the ultimate intensity without any delay. It is defined as the threshold the line will trip without any possible remedial actions. The tripping of the network element is ordered by protections against short circuits or by overload protections, but in any case, the activation delay of these protections is not compatible with the reaction delay of an operator (less than one minute). The duration is always zero if the OperationalLimitType.acceptableDuration is exchanged. Only one limit value exists for the TC type. - */ + /** Tripping Current (TC) is the ultimate intensity without any delay. It is defined as the threshold the line will trip without any possible remedial actions. The tripping of the network element is ordered by protections against short circuits or by overload protections, but in any case, the activation delay of these protections is not compatible with the reaction delay of an operator (less than one minute). The duration is always zero if the OperationalLimitType.acceptableDuration is exchanged. Only one limit value exists for the TC type. */ tc, - /** - * Tripping Current Threshold (TCT) is a value in engineering units defined for TC and calculated using a percentage less than 100 % of the TC type intended to alert operators of an arising condition. The percentage should be given in the name of the OperationalLimitSet. The aceptableDuration is another way to express the severity of the limit. - */ + /** Tripping Current Threshold (TCT) is a value in engineering units defined for TC and calculated using a percentage less than 100 % of the TC type intended to alert operators of an arising condition. The percentage should be given in the name of the OperationalLimitSet. The aceptableDuration is another way to express the severity of the limit. */ tct, - /** - * Referring to the rating of the equipments, a voltage too high can lead to accelerated ageing or the destruction of the equipment. This limit type may or may not have duration. - */ + /** Referring to the rating of the equipments, a voltage too high can lead to accelerated ageing or the destruction of the equipment. This limit type may or may not have duration. */ highVoltage, - /** - * A too low voltage can disturb the normal operation of some protections and transformer equipped with on-load tap changers, electronic power devices or can affect the behaviour of the auxiliaries of generation units. This limit type may or may not have duration. - */ + /** A too low voltage can disturb the normal operation of some protections and transformer equipped with on-load tap changers, electronic power devices or can affect the behaviour of the auxiliaries of generation units. This limit type may or may not have duration. */ lowVoltage, - /** - * Operational voltage limit. - */ + /** Operational voltage limit. */ operationalVoltageLimit, - /** - * Voltage alarm. - */ + /** Voltage alarm. */ alarmVoltage, - /** - * Voltage warning. - */ + /** Voltage warning. */ warningVoltage, - /** - * Stability. - */ + /** Stability. */ stability, }; diff --git a/CGMES_3.0.0/LimitSet.cpp b/CGMES_3.0.0/LimitSet.cpp index a4ae44964..b21ecaa5d 100644 --- a/CGMES_3.0.0/LimitSet.cpp +++ b/CGMES_3.0.0/LimitSet.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" using namespace CIMPP; -LimitSet::LimitSet() {}; -LimitSet::~LimitSet() {}; +LimitSet::LimitSet() {} +LimitSet::~LimitSet() {} static const std::list PossibleProfilesForClass = { @@ -40,25 +39,24 @@ LimitSet::getPossibleProfilesForAttributes() const return map; } - -bool assign_LimitSet_isPercentageLimits(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LimitSet_isPercentageLimits(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LimitSet* element = dynamic_cast(BaseClass_ptr1)) + LimitSet* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->isPercentageLimits; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_LimitSet_isPercentageLimits(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LimitSet* element = dynamic_cast(BaseClass_ptr1)) + const LimitSet* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->isPercentageLimits; if (!buffer.str().empty()) @@ -70,8 +68,6 @@ bool get_LimitSet_isPercentageLimits(const BaseClass* BaseClass_ptr1, std::strin return false; } - - const char LimitSet::debugName[] = "LimitSet"; const char* LimitSet::debugString() const { @@ -80,12 +76,12 @@ const char* LimitSet::debugString() const void LimitSet::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LimitSet"), &LimitSet_factory)); + factory_map.emplace("cim:LimitSet", &LimitSet_factory); } void LimitSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LimitSet.isPercentageLimits"), &assign_LimitSet_isPercentageLimits)); + assign_map.emplace("cim:LimitSet.isPercentageLimits", &assign_LimitSet_isPercentageLimits); } void LimitSet::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/LimitSet.hpp b/CGMES_3.0.0/LimitSet.hpp index b2363aef2..ee31c5731 100644 --- a/CGMES_3.0.0/LimitSet.hpp +++ b/CGMES_3.0.0/LimitSet.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Specifies a set of Limits that are associated with a Measurement. A Measurement may have several LimitSets corresponding to seasonal or other changing conditions. The condition is captured in the name and description attributes. The same LimitSet may be used for several Measurements. In particular percentage limits are used this way. - */ + /** \brief Specifies a set of Limits that are associated with a Measurement. A Measurement may have several LimitSets corresponding to seasonal or other changing conditions. The condition is captured in the name and description attributes. The same LimitSet may be used for several Measurements. In particular percentage limits are used this way. */ class LimitSet : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP LimitSet(); ~LimitSet() override; - CIMPP::Boolean isPercentageLimits; /* Tells if the limit values are in percentage of normalValue or the specified Unit for Measurements and Controls. Default: false */ + /** \brief Tells if the limit values are in percentage of normalValue or the specified Unit for Measurements and Controls. Default: false */ + CIMPP::Boolean isPercentageLimits; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Line.cpp b/CGMES_3.0.0/Line.cpp index 3db73b638..5702fc5b8 100644 --- a/CGMES_3.0.0/Line.cpp +++ b/CGMES_3.0.0/Line.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Line::Line() : Region(nullptr) {}; -Line::~Line() {}; +Line::Line() : Region(nullptr) {} +Line::~Line() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ Line::getPossibleProfilesForAttributes() const return map; } - - bool assign_SubGeographicalRegion_Lines(BaseClass*, BaseClass*); bool assign_Line_Region(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,10 +58,10 @@ bool assign_Line_Region(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) return false; } - bool get_Line_Region(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Line* element = dynamic_cast(BaseClass_ptr1)) + const Line* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Region != 0) { @@ -74,7 +72,6 @@ bool get_Line_Region(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Line"), &Line_factory)); + factory_map.emplace("cim:Line", &Line_factory); } void Line::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -92,7 +89,7 @@ void Line::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Line.Region"), &assign_Line_Region)); + assign_map.emplace("cim:Line.Region", &assign_Line_Region); } void Line::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/Line.hpp b/CGMES_3.0.0/Line.hpp index e38ed8d72..56bc5e34e 100644 --- a/CGMES_3.0.0/Line.hpp +++ b/CGMES_3.0.0/Line.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class SubGeographicalRegion; - /* - Contains equipment beyond a substation belonging to a power transmission line. - */ + /** \brief Contains equipment beyond a substation belonging to a power transmission line. */ class Line : public EquipmentContainer { public: @@ -27,7 +25,8 @@ namespace CIMPP Line(); ~Line() override; - CIMPP::SubGeographicalRegion* Region; /* The sub-geographical region of the line. Default: 0 */ + /** \brief The sub-geographical region of the line. Default: 0 */ + CIMPP::SubGeographicalRegion* Region; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/LinearShuntCompensator.cpp b/CGMES_3.0.0/LinearShuntCompensator.cpp index c7829ea7e..080f13e13 100644 --- a/CGMES_3.0.0/LinearShuntCompensator.cpp +++ b/CGMES_3.0.0/LinearShuntCompensator.cpp @@ -8,15 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Susceptance.hpp" -#include "Susceptance.hpp" -#include "Conductance.hpp" -#include "Conductance.hpp" using namespace CIMPP; -LinearShuntCompensator::LinearShuntCompensator() {}; -LinearShuntCompensator::~LinearShuntCompensator() {}; +LinearShuntCompensator::LinearShuntCompensator() {} +LinearShuntCompensator::~LinearShuntCompensator() {} static const std::list PossibleProfilesForClass = { @@ -48,64 +44,66 @@ LinearShuntCompensator::getPossibleProfilesForAttributes() const return map; } - -bool assign_LinearShuntCompensator_b0PerSection(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LinearShuntCompensator_b0PerSection(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b0PerSection; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LinearShuntCompensator_bPerSection(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LinearShuntCompensator_bPerSection(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bPerSection; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LinearShuntCompensator_g0PerSection(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LinearShuntCompensator_g0PerSection(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g0PerSection; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LinearShuntCompensator_gPerSection(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LinearShuntCompensator_gPerSection(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->gPerSection; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_LinearShuntCompensator_b0PerSection(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b0PerSection; if (!buffer.str().empty()) @@ -119,7 +117,8 @@ bool get_LinearShuntCompensator_b0PerSection(const BaseClass* BaseClass_ptr1, st bool get_LinearShuntCompensator_bPerSection(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bPerSection; if (!buffer.str().empty()) @@ -133,7 +132,8 @@ bool get_LinearShuntCompensator_bPerSection(const BaseClass* BaseClass_ptr1, std bool get_LinearShuntCompensator_g0PerSection(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g0PerSection; if (!buffer.str().empty()) @@ -147,7 +147,8 @@ bool get_LinearShuntCompensator_g0PerSection(const BaseClass* BaseClass_ptr1, st bool get_LinearShuntCompensator_gPerSection(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const LinearShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->gPerSection; if (!buffer.str().empty()) @@ -159,8 +160,6 @@ bool get_LinearShuntCompensator_gPerSection(const BaseClass* BaseClass_ptr1, std return false; } - - const char LinearShuntCompensator::debugName[] = "LinearShuntCompensator"; const char* LinearShuntCompensator::debugString() const { @@ -169,15 +168,15 @@ const char* LinearShuntCompensator::debugString() const void LinearShuntCompensator::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LinearShuntCompensator"), &LinearShuntCompensator_factory)); + factory_map.emplace("cim:LinearShuntCompensator", &LinearShuntCompensator_factory); } void LinearShuntCompensator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LinearShuntCompensator.b0PerSection"), &assign_LinearShuntCompensator_b0PerSection)); - assign_map.insert(std::make_pair(std::string("cim:LinearShuntCompensator.bPerSection"), &assign_LinearShuntCompensator_bPerSection)); - assign_map.insert(std::make_pair(std::string("cim:LinearShuntCompensator.g0PerSection"), &assign_LinearShuntCompensator_g0PerSection)); - assign_map.insert(std::make_pair(std::string("cim:LinearShuntCompensator.gPerSection"), &assign_LinearShuntCompensator_gPerSection)); + assign_map.emplace("cim:LinearShuntCompensator.b0PerSection", &assign_LinearShuntCompensator_b0PerSection); + assign_map.emplace("cim:LinearShuntCompensator.bPerSection", &assign_LinearShuntCompensator_bPerSection); + assign_map.emplace("cim:LinearShuntCompensator.g0PerSection", &assign_LinearShuntCompensator_g0PerSection); + assign_map.emplace("cim:LinearShuntCompensator.gPerSection", &assign_LinearShuntCompensator_gPerSection); } void LinearShuntCompensator::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/LinearShuntCompensator.hpp b/CGMES_3.0.0/LinearShuntCompensator.hpp index 937be863a..a955c3e9c 100644 --- a/CGMES_3.0.0/LinearShuntCompensator.hpp +++ b/CGMES_3.0.0/LinearShuntCompensator.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A linear shunt compensator has banks or sections with equal admittance values. - */ + /** \brief A linear shunt compensator has banks or sections with equal admittance values. */ class LinearShuntCompensator : public ShuntCompensator { public: @@ -28,10 +26,17 @@ namespace CIMPP LinearShuntCompensator(); ~LinearShuntCompensator() override; - CIMPP::Susceptance b0PerSection; /* Zero sequence shunt (charging) susceptance per section. Default: nullptr */ - CIMPP::Susceptance bPerSection; /* Positive sequence shunt (charging) susceptance per section. Default: nullptr */ - CIMPP::Conductance g0PerSection; /* Zero sequence shunt (charging) conductance per section. Default: nullptr */ - CIMPP::Conductance gPerSection; /* Positive sequence shunt (charging) conductance per section. Default: nullptr */ + /** \brief Zero sequence shunt (charging) susceptance per section. Default: nullptr */ + CIMPP::Susceptance b0PerSection; + + /** \brief Positive sequence shunt (charging) susceptance per section. Default: nullptr */ + CIMPP::Susceptance bPerSection; + + /** \brief Zero sequence shunt (charging) conductance per section. Default: nullptr */ + CIMPP::Conductance g0PerSection; + + /** \brief Positive sequence shunt (charging) conductance per section. Default: nullptr */ + CIMPP::Conductance gPerSection; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/LoadAggregate.cpp b/CGMES_3.0.0/LoadAggregate.cpp index 1af1aac26..56bc69716 100644 --- a/CGMES_3.0.0/LoadAggregate.cpp +++ b/CGMES_3.0.0/LoadAggregate.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -LoadAggregate::LoadAggregate() : LoadMotor(nullptr), LoadStatic(nullptr) {}; -LoadAggregate::~LoadAggregate() {}; +LoadAggregate::LoadAggregate() : LoadMotor(nullptr), LoadStatic(nullptr) {} +LoadAggregate::~LoadAggregate() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ LoadAggregate::getPossibleProfilesForAttributes() const return map; } - - bool assign_LoadMotor_LoadAggregate(BaseClass*, BaseClass*); bool assign_LoadAggregate_LoadMotor(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_LoadAggregate_LoadMotor(BaseClass* BaseClass_ptr1, BaseClass* BaseCl } return false; } + bool assign_LoadStatic_LoadAggregate(BaseClass*, BaseClass*); bool assign_LoadAggregate_LoadStatic(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -87,7 +86,7 @@ const char* LoadAggregate::debugString() const void LoadAggregate::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadAggregate"), &LoadAggregate_factory)); + factory_map.emplace("cim:LoadAggregate", &LoadAggregate_factory); } void LoadAggregate::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -96,8 +95,8 @@ void LoadAggregate::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadAggregate.LoadMotor"), &assign_LoadAggregate_LoadMotor)); - assign_map.insert(std::make_pair(std::string("cim:LoadAggregate.LoadStatic"), &assign_LoadAggregate_LoadStatic)); + assign_map.emplace("cim:LoadAggregate.LoadMotor", &assign_LoadAggregate_LoadMotor); + assign_map.emplace("cim:LoadAggregate.LoadStatic", &assign_LoadAggregate_LoadStatic); } void LoadAggregate::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/LoadAggregate.hpp b/CGMES_3.0.0/LoadAggregate.hpp index f2a8ccabf..4caec6b22 100644 --- a/CGMES_3.0.0/LoadAggregate.hpp +++ b/CGMES_3.0.0/LoadAggregate.hpp @@ -18,9 +18,7 @@ namespace CIMPP class LoadMotor; class LoadStatic; - /* - Aggregate loads are used to represent all or part of the real and reactive load from one or more loads in the static (power flow) data. This load is usually the aggregation of many individual load devices and the load model is an approximate representation of the aggregate response of the load devices to system disturbances. Standard aggregate load model comprised of static and/or dynamic components. A static load model represents the sensitivity of the real and reactive power consumed by the load to the amplitude and frequency of the bus voltage. A dynamic load model can be used to represent the aggregate response of the motor components of the load. - */ + /** \brief Aggregate loads are used to represent all or part of the real and reactive load from one or more loads in the static (power flow) data. This load is usually the aggregation of many individual load devices and the load model is an approximate representation of the aggregate response of the load devices to system disturbances. Standard aggregate load model comprised of static and/or dynamic components. A static load model represents the sensitivity of the real and reactive power consumed by the load to the amplitude and frequency of the bus voltage. A dynamic load model can be used to represent the aggregate response of the motor components of the load. */ class LoadAggregate : public LoadDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP LoadAggregate(); ~LoadAggregate() override; - CIMPP::LoadMotor* LoadMotor; /* Aggregate motor (dynamic) load associated with this aggregate load. Default: 0 */ - CIMPP::LoadStatic* LoadStatic; /* Aggregate static load associated with this aggregate load. Default: 0 */ + /** \brief Aggregate motor (dynamic) load associated with this aggregate load. Default: 0 */ + CIMPP::LoadMotor* LoadMotor; + + /** \brief Aggregate static load associated with this aggregate load. Default: 0 */ + CIMPP::LoadStatic* LoadStatic; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/LoadArea.cpp b/CGMES_3.0.0/LoadArea.cpp index 1e019fe74..8154b9035 100644 --- a/CGMES_3.0.0/LoadArea.cpp +++ b/CGMES_3.0.0/LoadArea.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -LoadArea::LoadArea() {}; -LoadArea::~LoadArea() {}; +LoadArea::LoadArea() {} +LoadArea::~LoadArea() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ LoadArea::getPossibleProfilesForAttributes() const return map; } - - bool assign_SubLoadArea_LoadArea(BaseClass*, BaseClass*); bool assign_LoadArea_SubLoadAreas(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_LoadArea_SubLoadAreas(BaseClass* BaseClass_ptr1, BaseClass* BaseClas } - const char LoadArea::debugName[] = "LoadArea"; const char* LoadArea::debugString() const { @@ -69,7 +66,7 @@ const char* LoadArea::debugString() const void LoadArea::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadArea"), &LoadArea_factory)); + factory_map.emplace("cim:LoadArea", &LoadArea_factory); } void LoadArea::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void LoadArea::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadArea.SubLoadAreas"), &assign_LoadArea_SubLoadAreas)); + assign_map.emplace("cim:LoadArea.SubLoadAreas", &assign_LoadArea_SubLoadAreas); } void LoadArea::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/LoadArea.hpp b/CGMES_3.0.0/LoadArea.hpp index 90ea4d907..9142620cd 100644 --- a/CGMES_3.0.0/LoadArea.hpp +++ b/CGMES_3.0.0/LoadArea.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class SubLoadArea; - /* - The class is the root or first level in a hierarchical structure for grouping of loads for the purpose of load flow load scaling. - */ + /** \brief The class is the root or first level in a hierarchical structure for grouping of loads for the purpose of load flow load scaling. */ class LoadArea : public EnergyArea { public: @@ -27,7 +25,8 @@ namespace CIMPP LoadArea(); ~LoadArea() override; - std::list SubLoadAreas; /* The SubLoadAreas in the LoadArea. Default: 0 */ + /** \brief The SubLoadAreas in the LoadArea. Default: 0 */ + std::list SubLoadAreas; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/LoadBreakSwitch.cpp b/CGMES_3.0.0/LoadBreakSwitch.cpp index 2562f5898..881f3cd8a 100644 --- a/CGMES_3.0.0/LoadBreakSwitch.cpp +++ b/CGMES_3.0.0/LoadBreakSwitch.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -LoadBreakSwitch::LoadBreakSwitch() {}; -LoadBreakSwitch::~LoadBreakSwitch() {}; +LoadBreakSwitch::LoadBreakSwitch() {} +LoadBreakSwitch::~LoadBreakSwitch() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ LoadBreakSwitch::getPossibleProfilesForAttributes() const return map; } - - - - - const char LoadBreakSwitch::debugName[] = "LoadBreakSwitch"; const char* LoadBreakSwitch::debugString() const { @@ -52,7 +47,7 @@ const char* LoadBreakSwitch::debugString() const void LoadBreakSwitch::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadBreakSwitch"), &LoadBreakSwitch_factory)); + factory_map.emplace("cim:LoadBreakSwitch", &LoadBreakSwitch_factory); } void LoadBreakSwitch::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/LoadBreakSwitch.hpp b/CGMES_3.0.0/LoadBreakSwitch.hpp index 4af01750e..e6c20cc50 100644 --- a/CGMES_3.0.0/LoadBreakSwitch.hpp +++ b/CGMES_3.0.0/LoadBreakSwitch.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A mechanical switching device capable of making, carrying, and breaking currents under normal operating conditions. - */ + /** \brief A mechanical switching device capable of making, carrying, and breaking currents under normal operating conditions. */ class LoadBreakSwitch : public ProtectedSwitch { public: @@ -26,7 +24,6 @@ namespace CIMPP LoadBreakSwitch(); ~LoadBreakSwitch() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/LoadComposite.cpp b/CGMES_3.0.0/LoadComposite.cpp index 6b5713b75..b1cdac822 100644 --- a/CGMES_3.0.0/LoadComposite.cpp +++ b/CGMES_3.0.0/LoadComposite.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Seconds.hpp" -#include "Float.hpp" -#include "Float.hpp" using namespace CIMPP; -LoadComposite::LoadComposite() {}; -LoadComposite::~LoadComposite() {}; +LoadComposite::LoadComposite() {} +LoadComposite::~LoadComposite() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ LoadComposite::getPossibleProfilesForAttributes() const return map; } - -bool assign_LoadComposite_epfd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_epfd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->epfd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_epfs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_epfs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->epfs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_epvd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_epvd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->epvd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_epvs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_epvs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->epvs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_eqfd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_eqfd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eqfd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_eqfs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_eqfs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eqfs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_eqvd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_eqvd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eqvd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_eqvs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_eqvs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eqvs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_h(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_h(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->h; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_lfac(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_lfac(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lfac; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadComposite_pfrac(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadComposite_pfrac(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pfrac; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_LoadComposite_epfd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->epfd; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_LoadComposite_epfd(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_LoadComposite_epfs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->epfs; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_LoadComposite_epfs(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_LoadComposite_epvd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->epvd; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_LoadComposite_epvd(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_LoadComposite_epvs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->epvs; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_LoadComposite_epvs(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_LoadComposite_eqfd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eqfd; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_LoadComposite_eqfd(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_LoadComposite_eqfs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eqfs; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_LoadComposite_eqfs(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_LoadComposite_eqvd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eqvd; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_LoadComposite_eqvd(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_LoadComposite_eqvs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eqvs; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_LoadComposite_eqvs(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_LoadComposite_h(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->h; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_LoadComposite_h(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_LoadComposite_lfac(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lfac; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_LoadComposite_lfac(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_LoadComposite_pfrac(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadComposite* element = dynamic_cast(BaseClass_ptr1)) + const LoadComposite* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pfrac; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_LoadComposite_pfrac(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char LoadComposite::debugName[] = "LoadComposite"; const char* LoadComposite::debugString() const { @@ -370,22 +376,22 @@ const char* LoadComposite::debugString() const void LoadComposite::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadComposite"), &LoadComposite_factory)); + factory_map.emplace("cim:LoadComposite", &LoadComposite_factory); } void LoadComposite::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.epfd"), &assign_LoadComposite_epfd)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.epfs"), &assign_LoadComposite_epfs)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.epvd"), &assign_LoadComposite_epvd)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.epvs"), &assign_LoadComposite_epvs)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.eqfd"), &assign_LoadComposite_eqfd)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.eqfs"), &assign_LoadComposite_eqfs)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.eqvd"), &assign_LoadComposite_eqvd)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.eqvs"), &assign_LoadComposite_eqvs)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.h"), &assign_LoadComposite_h)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.lfac"), &assign_LoadComposite_lfac)); - assign_map.insert(std::make_pair(std::string("cim:LoadComposite.pfrac"), &assign_LoadComposite_pfrac)); + assign_map.emplace("cim:LoadComposite.epfd", &assign_LoadComposite_epfd); + assign_map.emplace("cim:LoadComposite.epfs", &assign_LoadComposite_epfs); + assign_map.emplace("cim:LoadComposite.epvd", &assign_LoadComposite_epvd); + assign_map.emplace("cim:LoadComposite.epvs", &assign_LoadComposite_epvs); + assign_map.emplace("cim:LoadComposite.eqfd", &assign_LoadComposite_eqfd); + assign_map.emplace("cim:LoadComposite.eqfs", &assign_LoadComposite_eqfs); + assign_map.emplace("cim:LoadComposite.eqvd", &assign_LoadComposite_eqvd); + assign_map.emplace("cim:LoadComposite.eqvs", &assign_LoadComposite_eqvs); + assign_map.emplace("cim:LoadComposite.h", &assign_LoadComposite_h); + assign_map.emplace("cim:LoadComposite.lfac", &assign_LoadComposite_lfac); + assign_map.emplace("cim:LoadComposite.pfrac", &assign_LoadComposite_pfrac); } void LoadComposite::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/LoadComposite.hpp b/CGMES_3.0.0/LoadComposite.hpp index e7d597cef..a02ff7d3a 100644 --- a/CGMES_3.0.0/LoadComposite.hpp +++ b/CGMES_3.0.0/LoadComposite.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Combined static load and induction motor load effects. The dynamics of the motor are simplified by linearizing the induction machine equations. - */ + /** \brief Combined static load and induction motor load effects. The dynamics of the motor are simplified by linearizing the induction machine equations. */ class LoadComposite : public LoadDynamics { public: @@ -28,17 +26,38 @@ namespace CIMPP LoadComposite(); ~LoadComposite() override; - CIMPP::Float epfd; /* Active load-frequency dependence index (dynamic) (<i>Epfd</i>). Typical value = 1,5. Default: 0.0 */ - CIMPP::Float epfs; /* Active load-frequency dependence index (static) (<i>Epfs</i>). Typical value = 1,5. Default: 0.0 */ - CIMPP::Float epvd; /* Active load-voltage dependence index (dynamic) (<i>Epvd</i>). Typical value = 0,7. Default: 0.0 */ - CIMPP::Float epvs; /* Active load-voltage dependence index (static) (<i>Epvs</i>). Typical value = 0,7. Default: 0.0 */ - CIMPP::Float eqfd; /* Reactive load-frequency dependence index (dynamic) (<i>Eqfd</i>). Typical value = 0. Default: 0.0 */ - CIMPP::Float eqfs; /* Reactive load-frequency dependence index (static) (<i>Eqfs</i>). Typical value = 0. Default: 0.0 */ - CIMPP::Float eqvd; /* Reactive load-voltage dependence index (dynamic) (<i>Eqvd</i>). Typical value = 2. Default: 0.0 */ - CIMPP::Float eqvs; /* Reactive load-voltage dependence index (static) (<i>Eqvs</i>). Typical value = 2. Default: 0.0 */ - CIMPP::Seconds h; /* Inertia constant (<i>H</i>) (&gt;= 0). Typical value = 2,5. Default: nullptr */ - CIMPP::Float lfac; /* Loading factor (<i>L</i><i><sub>fac</sub></i>). The ratio of initial <i>P</i> to motor MVA base. Typical value = 0,8. Default: 0.0 */ - CIMPP::Float pfrac; /* Fraction of constant-power load to be represented by this motor model (<i>P</i><i><sub>FRAC</sub></i>) (&gt;= 0,0 and &lt;= 1,0). Typical value = 0,5. Default: 0.0 */ + /** \brief Active load-frequency dependence index (dynamic) (<i>Epfd</i>). Typical value = 1,5. Default: 0.0 */ + CIMPP::Float epfd; + + /** \brief Active load-frequency dependence index (static) (<i>Epfs</i>). Typical value = 1,5. Default: 0.0 */ + CIMPP::Float epfs; + + /** \brief Active load-voltage dependence index (dynamic) (<i>Epvd</i>). Typical value = 0,7. Default: 0.0 */ + CIMPP::Float epvd; + + /** \brief Active load-voltage dependence index (static) (<i>Epvs</i>). Typical value = 0,7. Default: 0.0 */ + CIMPP::Float epvs; + + /** \brief Reactive load-frequency dependence index (dynamic) (<i>Eqfd</i>). Typical value = 0. Default: 0.0 */ + CIMPP::Float eqfd; + + /** \brief Reactive load-frequency dependence index (static) (<i>Eqfs</i>). Typical value = 0. Default: 0.0 */ + CIMPP::Float eqfs; + + /** \brief Reactive load-voltage dependence index (dynamic) (<i>Eqvd</i>). Typical value = 2. Default: 0.0 */ + CIMPP::Float eqvd; + + /** \brief Reactive load-voltage dependence index (static) (<i>Eqvs</i>). Typical value = 2. Default: 0.0 */ + CIMPP::Float eqvs; + + /** \brief Inertia constant (<i>H</i>) (&gt;= 0). Typical value = 2,5. Default: nullptr */ + CIMPP::Seconds h; + + /** \brief Loading factor (<i>L</i><i><sub>fac</sub></i>). The ratio of initial <i>P</i> to motor MVA base. Typical value = 0,8. Default: 0.0 */ + CIMPP::Float lfac; + + /** \brief Fraction of constant-power load to be represented by this motor model (<i>P</i><i><sub>FRAC</sub></i>) (&gt;= 0,0 and &lt;= 1,0). Typical value = 0,5. Default: 0.0 */ + CIMPP::Float pfrac; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/LoadDynamics.cpp b/CGMES_3.0.0/LoadDynamics.cpp index 0907fb345..35cf6f647 100644 --- a/CGMES_3.0.0/LoadDynamics.cpp +++ b/CGMES_3.0.0/LoadDynamics.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -LoadDynamics::LoadDynamics() {}; -LoadDynamics::~LoadDynamics() {}; +LoadDynamics::LoadDynamics() {} +LoadDynamics::~LoadDynamics() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ LoadDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_EnergyConsumer_LoadDynamics(BaseClass*, BaseClass*); bool assign_LoadDynamics_EnergyConsumer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_LoadDynamics_EnergyConsumer(BaseClass* BaseClass_ptr1, BaseClass* Ba } - const char LoadDynamics::debugName[] = "LoadDynamics"; const char* LoadDynamics::debugString() const { @@ -69,7 +66,7 @@ const char* LoadDynamics::debugString() const void LoadDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadDynamics"), &LoadDynamics_factory)); + factory_map.emplace("cim:LoadDynamics", &LoadDynamics_factory); } void LoadDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void LoadDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadDynamics.EnergyConsumer"), &assign_LoadDynamics_EnergyConsumer)); + assign_map.emplace("cim:LoadDynamics.EnergyConsumer", &assign_LoadDynamics_EnergyConsumer); } void LoadDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/LoadDynamics.hpp b/CGMES_3.0.0/LoadDynamics.hpp index a29e93215..e1f75d9c9 100644 --- a/CGMES_3.0.0/LoadDynamics.hpp +++ b/CGMES_3.0.0/LoadDynamics.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class EnergyConsumer; - /* - Load whose behaviour is described by reference to a standard model or by definition of a user-defined model. A standard feature of dynamic load behaviour modelling is the ability to associate the same behaviour to multiple energy consumers by means of a single load definition. The load model is always applied to individual bus loads (energy consumers). - */ + /** \brief Load whose behaviour is described by reference to a standard model or by definition of a user-defined model. A standard feature of dynamic load behaviour modelling is the ability to associate the same behaviour to multiple energy consumers by means of a single load definition. The load model is always applied to individual bus loads (energy consumers). */ class LoadDynamics : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP LoadDynamics(); ~LoadDynamics() override; - std::list EnergyConsumer; /* Energy consumer to which this dynamics load model applies. Default: 0 */ + /** \brief Energy consumer to which this dynamics load model applies. Default: 0 */ + std::list EnergyConsumer; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/LoadGenericNonLinear.cpp b/CGMES_3.0.0/LoadGenericNonLinear.cpp index aa6ed632f..479f9b5d4 100644 --- a/CGMES_3.0.0/LoadGenericNonLinear.cpp +++ b/CGMES_3.0.0/LoadGenericNonLinear.cpp @@ -8,18 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Float.hpp" -#include "Float.hpp" -#include "GenericNonLinearLoadModelKind.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -LoadGenericNonLinear::LoadGenericNonLinear() {}; -LoadGenericNonLinear::~LoadGenericNonLinear() {}; +LoadGenericNonLinear::LoadGenericNonLinear() {} +LoadGenericNonLinear::~LoadGenericNonLinear() {} static const std::list PossibleProfilesForClass = { @@ -52,103 +45,108 @@ LoadGenericNonLinear::getPossibleProfilesForAttributes() const return map; } - -bool assign_LoadGenericNonLinear_bs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadGenericNonLinear_bs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadGenericNonLinear_bt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadGenericNonLinear_bt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadGenericNonLinear_genericNonLinearLoadModelType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadGenericNonLinear_genericNonLinearLoadModelType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->genericNonLinearLoadModelType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadGenericNonLinear_ls(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadGenericNonLinear_ls(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ls; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadGenericNonLinear_lt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadGenericNonLinear_lt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadGenericNonLinear_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadGenericNonLinear_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadGenericNonLinear_tq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadGenericNonLinear_tq(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tq; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_LoadGenericNonLinear_bs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bs; if (!buffer.str().empty()) @@ -162,7 +160,8 @@ bool get_LoadGenericNonLinear_bs(const BaseClass* BaseClass_ptr1, std::stringstr bool get_LoadGenericNonLinear_bt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bt; if (!buffer.str().empty()) @@ -174,11 +173,12 @@ bool get_LoadGenericNonLinear_bt(const BaseClass* BaseClass_ptr1, std::stringstr return false; } -bool get_LoadGenericNonLinear_ls(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_LoadGenericNonLinear_genericNonLinearLoadModelType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->ls; + buffer << element->genericNonLinearLoadModelType; if (!buffer.str().empty()) { return true; @@ -188,11 +188,12 @@ bool get_LoadGenericNonLinear_ls(const BaseClass* BaseClass_ptr1, std::stringstr return false; } -bool get_LoadGenericNonLinear_lt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_LoadGenericNonLinear_ls(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->lt; + buffer << element->ls; if (!buffer.str().empty()) { return true; @@ -202,11 +203,12 @@ bool get_LoadGenericNonLinear_lt(const BaseClass* BaseClass_ptr1, std::stringstr return false; } -bool get_LoadGenericNonLinear_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_LoadGenericNonLinear_lt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tp; + buffer << element->lt; if (!buffer.str().empty()) { return true; @@ -216,11 +218,12 @@ bool get_LoadGenericNonLinear_tp(const BaseClass* BaseClass_ptr1, std::stringstr return false; } -bool get_LoadGenericNonLinear_tq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_LoadGenericNonLinear_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tq; + buffer << element->tp; if (!buffer.str().empty()) { return true; @@ -230,13 +233,12 @@ bool get_LoadGenericNonLinear_tq(const BaseClass* BaseClass_ptr1, std::stringstr return false; } - - -bool get_LoadGenericNonLinear_genericNonLinearLoadModelType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_LoadGenericNonLinear_tq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const LoadGenericNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->genericNonLinearLoadModelType; + buffer << element->tq; if (!buffer.str().empty()) { return true; @@ -254,18 +256,18 @@ const char* LoadGenericNonLinear::debugString() const void LoadGenericNonLinear::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear"), &LoadGenericNonLinear_factory)); + factory_map.emplace("cim:LoadGenericNonLinear", &LoadGenericNonLinear_factory); } void LoadGenericNonLinear::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear.bs"), &assign_LoadGenericNonLinear_bs)); - assign_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear.bt"), &assign_LoadGenericNonLinear_bt)); - assign_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear.genericNonLinearLoadModelType"), &assign_LoadGenericNonLinear_genericNonLinearLoadModelType)); - assign_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear.ls"), &assign_LoadGenericNonLinear_ls)); - assign_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear.lt"), &assign_LoadGenericNonLinear_lt)); - assign_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear.tp"), &assign_LoadGenericNonLinear_tp)); - assign_map.insert(std::make_pair(std::string("cim:LoadGenericNonLinear.tq"), &assign_LoadGenericNonLinear_tq)); + assign_map.emplace("cim:LoadGenericNonLinear.bs", &assign_LoadGenericNonLinear_bs); + assign_map.emplace("cim:LoadGenericNonLinear.bt", &assign_LoadGenericNonLinear_bt); + assign_map.emplace("cim:LoadGenericNonLinear.genericNonLinearLoadModelType", &assign_LoadGenericNonLinear_genericNonLinearLoadModelType); + assign_map.emplace("cim:LoadGenericNonLinear.ls", &assign_LoadGenericNonLinear_ls); + assign_map.emplace("cim:LoadGenericNonLinear.lt", &assign_LoadGenericNonLinear_lt); + assign_map.emplace("cim:LoadGenericNonLinear.tp", &assign_LoadGenericNonLinear_tp); + assign_map.emplace("cim:LoadGenericNonLinear.tq", &assign_LoadGenericNonLinear_tq); } void LoadGenericNonLinear::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/LoadGenericNonLinear.hpp b/CGMES_3.0.0/LoadGenericNonLinear.hpp index 5002aca94..70ce38933 100644 --- a/CGMES_3.0.0/LoadGenericNonLinear.hpp +++ b/CGMES_3.0.0/LoadGenericNonLinear.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Generic non-linear dynamic (GNLD) load. This model can be used in mid-term and long-term voltage stability simulations (i.e., to study voltage collapse), as it can replace a more detailed representation of aggregate load, including induction motors, thermostatically controlled and static loads. - */ + /** \brief Generic non-linear dynamic (GNLD) load. This model can be used in mid-term and long-term voltage stability simulations (i.e., to study voltage collapse), as it can replace a more detailed representation of aggregate load, including induction motors, thermostatically controlled and static loads. */ class LoadGenericNonLinear : public LoadDynamics { public: @@ -29,13 +27,26 @@ namespace CIMPP LoadGenericNonLinear(); ~LoadGenericNonLinear() override; - CIMPP::Float bs; /* Steady state voltage index for reactive power (<i>BS</i>). Default: 0.0 */ - CIMPP::Float bt; /* Transient voltage index for reactive power (<i>BT</i>). Default: 0.0 */ - CIMPP::GenericNonLinearLoadModelKind genericNonLinearLoadModelType; /* Type of generic non-linear load model. Default: 0 */ - CIMPP::Float ls; /* Steady state voltage index for active power (<i>LS</i>). Default: 0.0 */ - CIMPP::Float lt; /* Transient voltage index for active power (<i>LT</i>). Default: 0.0 */ - CIMPP::Seconds tp; /* Time constant of lag function of active power (<i>T</i><i><sub>P</sub></i>) (&gt; 0). Default: nullptr */ - CIMPP::Seconds tq; /* Time constant of lag function of reactive power (<i>T</i><i><sub>Q</sub></i>) (&gt; 0). Default: nullptr */ + /** \brief Steady state voltage index for reactive power (<i>BS</i>). Default: 0.0 */ + CIMPP::Float bs; + + /** \brief Transient voltage index for reactive power (<i>BT</i>). Default: 0.0 */ + CIMPP::Float bt; + + /** \brief Type of generic non-linear load model. Default: 0 */ + CIMPP::GenericNonLinearLoadModelKind genericNonLinearLoadModelType; + + /** \brief Steady state voltage index for active power (<i>LS</i>). Default: 0.0 */ + CIMPP::Float ls; + + /** \brief Transient voltage index for active power (<i>LT</i>). Default: 0.0 */ + CIMPP::Float lt; + + /** \brief Time constant of lag function of active power (<i>T</i><i><sub>P</sub></i>) (&gt; 0). Default: nullptr */ + CIMPP::Seconds tp; + + /** \brief Time constant of lag function of reactive power (<i>T</i><i><sub>Q</sub></i>) (&gt; 0). Default: nullptr */ + CIMPP::Seconds tq; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/LoadGroup.cpp b/CGMES_3.0.0/LoadGroup.cpp index 7580cae1b..142619bf7 100644 --- a/CGMES_3.0.0/LoadGroup.cpp +++ b/CGMES_3.0.0/LoadGroup.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -LoadGroup::LoadGroup() : SubLoadArea(nullptr) {}; -LoadGroup::~LoadGroup() {}; +LoadGroup::LoadGroup() : SubLoadArea(nullptr) {} +LoadGroup::~LoadGroup() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ LoadGroup::getPossibleProfilesForAttributes() const return map; } - - bool assign_SubLoadArea_LoadGroups(BaseClass*, BaseClass*); bool assign_LoadGroup_SubLoadArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_LoadGroup_SubLoadArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClas return false; } - bool get_LoadGroup_SubLoadArea(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const LoadGroup* element = dynamic_cast(BaseClass_ptr1)) + const LoadGroup* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->SubLoadArea != 0) { @@ -73,7 +71,6 @@ bool get_LoadGroup_SubLoadArea(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadGroup"), &LoadGroup_factory)); + factory_map.emplace("cim:LoadGroup", &LoadGroup_factory); } void LoadGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void LoadGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadGroup.SubLoadArea"), &assign_LoadGroup_SubLoadArea)); + assign_map.emplace("cim:LoadGroup.SubLoadArea", &assign_LoadGroup_SubLoadArea); } void LoadGroup::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/LoadGroup.hpp b/CGMES_3.0.0/LoadGroup.hpp index 2e6a4a9b8..d0fa3dd27 100644 --- a/CGMES_3.0.0/LoadGroup.hpp +++ b/CGMES_3.0.0/LoadGroup.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class SubLoadArea; - /* - The class is the third level in a hierarchical structure for grouping of loads for the purpose of load flow load scaling. - */ + /** \brief The class is the third level in a hierarchical structure for grouping of loads for the purpose of load flow load scaling. */ class LoadGroup : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP LoadGroup(); ~LoadGroup() override; - CIMPP::SubLoadArea* SubLoadArea; /* The SubLoadArea where the Loadgroup belongs. Default: 0 */ + /** \brief The SubLoadArea where the Loadgroup belongs. Default: 0 */ + CIMPP::SubLoadArea* SubLoadArea; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/LoadMotor.cpp b/CGMES_3.0.0/LoadMotor.cpp index 56d0d46b6..b1eddcd2a 100644 --- a/CGMES_3.0.0/LoadMotor.cpp +++ b/CGMES_3.0.0/LoadMotor.cpp @@ -9,24 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "LoadAggregate.hpp" -#include "Float.hpp" -#include "Seconds.hpp" -#include "Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" using namespace CIMPP; -LoadMotor::LoadMotor() : LoadAggregate(nullptr) {}; -LoadMotor::~LoadMotor() {}; +LoadMotor::LoadMotor() : LoadAggregate(nullptr) {} +LoadMotor::~LoadMotor() {} static const std::list PossibleProfilesForClass = { @@ -66,197 +53,223 @@ LoadMotor::getPossibleProfilesForAttributes() const return map; } +bool assign_LoadAggregate_LoadMotor(BaseClass*, BaseClass*); +bool assign_LoadMotor_LoadAggregate(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + LoadAggregate* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->LoadAggregate != element2) + { + element->LoadAggregate = element2; + return assign_LoadAggregate_LoadMotor(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_LoadMotor_d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_d(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->d; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_h(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_h(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->h; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_lfac(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_lfac(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lfac; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_lp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_lp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_lpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_lpp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lpp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_ls(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_ls(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ls; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_pfrac(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_pfrac(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pfrac; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_ra(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_ra(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ra; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_tbkr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_tbkr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tbkr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_tpo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_tpo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_tppo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_tppo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tppo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_tv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_tv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadMotor_vt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadMotor_vt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_LoadAggregate_LoadMotor(BaseClass*, BaseClass*); -bool assign_LoadMotor_LoadAggregate(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_LoadMotor_LoadAggregate(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - LoadMotor* element = dynamic_cast(BaseClass_ptr1); - LoadAggregate* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->LoadAggregate != element2) + if (element->LoadAggregate != 0) { - element->LoadAggregate = element2; - return assign_LoadAggregate_LoadMotor(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->LoadAggregate); + return true; } - return true; } return false; } bool get_LoadMotor_d(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->d; if (!buffer.str().empty()) @@ -270,7 +283,8 @@ bool get_LoadMotor_d(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_LoadMotor_h(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->h; if (!buffer.str().empty()) @@ -284,7 +298,8 @@ bool get_LoadMotor_h(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_LoadMotor_lfac(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lfac; if (!buffer.str().empty()) @@ -298,7 +313,8 @@ bool get_LoadMotor_lfac(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadMotor_lp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lp; if (!buffer.str().empty()) @@ -312,7 +328,8 @@ bool get_LoadMotor_lp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_LoadMotor_lpp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lpp; if (!buffer.str().empty()) @@ -326,7 +343,8 @@ bool get_LoadMotor_lpp(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_LoadMotor_ls(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ls; if (!buffer.str().empty()) @@ -340,7 +358,8 @@ bool get_LoadMotor_ls(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_LoadMotor_pfrac(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pfrac; if (!buffer.str().empty()) @@ -354,7 +373,8 @@ bool get_LoadMotor_pfrac(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_LoadMotor_ra(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ra; if (!buffer.str().empty()) @@ -368,7 +388,8 @@ bool get_LoadMotor_ra(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_LoadMotor_tbkr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tbkr; if (!buffer.str().empty()) @@ -382,7 +403,8 @@ bool get_LoadMotor_tbkr(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadMotor_tpo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpo; if (!buffer.str().empty()) @@ -396,7 +418,8 @@ bool get_LoadMotor_tpo(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_LoadMotor_tppo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tppo; if (!buffer.str().empty()) @@ -410,7 +433,8 @@ bool get_LoadMotor_tppo(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadMotor_tv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tv; if (!buffer.str().empty()) @@ -424,7 +448,8 @@ bool get_LoadMotor_tv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_LoadMotor_vt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) + const LoadMotor* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vt; if (!buffer.str().empty()) @@ -436,21 +461,6 @@ bool get_LoadMotor_vt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - -bool get_LoadMotor_LoadAggregate(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const LoadMotor* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->LoadAggregate != 0) - { - BaseClass_list.push_back(element->LoadAggregate); - return true; - } - } - return false; -} - - const char LoadMotor::debugName[] = "LoadMotor"; const char* LoadMotor::debugString() const { @@ -459,29 +469,29 @@ const char* LoadMotor::debugString() const void LoadMotor::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadMotor"), &LoadMotor_factory)); + factory_map.emplace("cim:LoadMotor", &LoadMotor_factory); } void LoadMotor::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.d"), &assign_LoadMotor_d)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.h"), &assign_LoadMotor_h)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.lfac"), &assign_LoadMotor_lfac)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.lp"), &assign_LoadMotor_lp)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.lpp"), &assign_LoadMotor_lpp)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.ls"), &assign_LoadMotor_ls)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.pfrac"), &assign_LoadMotor_pfrac)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.ra"), &assign_LoadMotor_ra)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.tbkr"), &assign_LoadMotor_tbkr)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.tpo"), &assign_LoadMotor_tpo)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.tppo"), &assign_LoadMotor_tppo)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.tv"), &assign_LoadMotor_tv)); - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.vt"), &assign_LoadMotor_vt)); + assign_map.emplace("cim:LoadMotor.d", &assign_LoadMotor_d); + assign_map.emplace("cim:LoadMotor.h", &assign_LoadMotor_h); + assign_map.emplace("cim:LoadMotor.lfac", &assign_LoadMotor_lfac); + assign_map.emplace("cim:LoadMotor.lp", &assign_LoadMotor_lp); + assign_map.emplace("cim:LoadMotor.lpp", &assign_LoadMotor_lpp); + assign_map.emplace("cim:LoadMotor.ls", &assign_LoadMotor_ls); + assign_map.emplace("cim:LoadMotor.pfrac", &assign_LoadMotor_pfrac); + assign_map.emplace("cim:LoadMotor.ra", &assign_LoadMotor_ra); + assign_map.emplace("cim:LoadMotor.tbkr", &assign_LoadMotor_tbkr); + assign_map.emplace("cim:LoadMotor.tpo", &assign_LoadMotor_tpo); + assign_map.emplace("cim:LoadMotor.tppo", &assign_LoadMotor_tppo); + assign_map.emplace("cim:LoadMotor.tv", &assign_LoadMotor_tv); + assign_map.emplace("cim:LoadMotor.vt", &assign_LoadMotor_vt); } void LoadMotor::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadMotor.LoadAggregate"), &assign_LoadMotor_LoadAggregate)); + assign_map.emplace("cim:LoadMotor.LoadAggregate", &assign_LoadMotor_LoadAggregate); } void LoadMotor::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/LoadMotor.hpp b/CGMES_3.0.0/LoadMotor.hpp index 7a0cc24ef..49e5692c1 100644 --- a/CGMES_3.0.0/LoadMotor.hpp +++ b/CGMES_3.0.0/LoadMotor.hpp @@ -20,9 +20,7 @@ namespace CIMPP { class LoadAggregate; - /* - Aggregate induction motor load. This model is used to represent a fraction of an ordinary load as "induction motor load". It allows a load that is treated as an ordinary constant power in power flow analysis to be represented by an induction motor in dynamic simulation. This model is intended for representation of aggregations of many motors dispersed through a load represented at a high voltage bus but where there is no information on the characteristics of individual motors. Either a "one-cage" or "two-cage" model of the induction machine can be modelled. Magnetic saturation is not modelled. This model treats a fraction of the constant power part of a load as a motor. During initialisation, the initial power drawn by the motor is set equal to Pfrac times the constant P part of the static load. The remainder of the load is left as a static load. The reactive power demand of the motor is calculated during initialisation as a function of voltage at the load bus. This reactive power demand can be less than or greater than the constant Q component of the load. If the motor's reactive demand is greater than the constant Q component of the load, the model inserts a shunt capacitor at the terminal of the motor to bring its reactive demand down to equal the constant Q reactive load. If an induction motor load model and a static load model are both present for a load, the motor Pfrac is assumed to be subtracted from the power flow constant P load before the static load model is applied. The remainder of the load, if any, is then represented by the static load model. - */ + /** \brief Aggregate induction motor load. This model is used to represent a fraction of an ordinary load as "induction motor load". It allows a load that is treated as an ordinary constant power in power flow analysis to be represented by an induction motor in dynamic simulation. This model is intended for representation of aggregations of many motors dispersed through a load represented at a high voltage bus but where there is no information on the characteristics of individual motors. Either a "one-cage" or "two-cage" model of the induction machine can be modelled. Magnetic saturation is not modelled. This model treats a fraction of the constant power part of a load as a motor. During initialisation, the initial power drawn by the motor is set equal to Pfrac times the constant P part of the static load. The remainder of the load is left as a static load. The reactive power demand of the motor is calculated during initialisation as a function of voltage at the load bus. This reactive power demand can be less than or greater than the constant Q component of the load. If the motor's reactive demand is greater than the constant Q component of the load, the model inserts a shunt capacitor at the terminal of the motor to bring its reactive demand down to equal the constant Q reactive load. If an induction motor load model and a static load model are both present for a load, the motor Pfrac is assumed to be subtracted from the power flow constant P load before the static load model is applied. The remainder of the load, if any, is then represented by the static load model. */ class LoadMotor : public IdentifiedObject { public: @@ -30,20 +28,47 @@ namespace CIMPP LoadMotor(); ~LoadMotor() override; - CIMPP::LoadAggregate* LoadAggregate; /* Aggregate load to which this aggregate motor (dynamic) load belongs. Default: 0 */ - CIMPP::Float d; /* Damping factor (<i>D</i>). Unit = delta <i>P</i>/delta speed. Typical value = 2. Default: 0.0 */ - CIMPP::Seconds h; /* Inertia constant (<i>H</i>) (&gt;= 0). Typical value = 0,4. Default: nullptr */ - CIMPP::Float lfac; /* Loading factor (<i>Lfac</i>). The ratio of initial <i>P</i> to motor MVA base. Typical value = 0,8. Default: 0.0 */ - CIMPP::PU lp; /* Transient reactance (<i>Lp</i>). Typical value = 0,15. Default: nullptr */ - CIMPP::PU lpp; /* Subtransient reactance (<i>Lpp</i>). Typical value = 0,15. Default: nullptr */ - CIMPP::PU ls; /* Synchronous reactance (<i>Ls</i>). Typical value = 3,2. Default: nullptr */ - CIMPP::Float pfrac; /* Fraction of constant-power load to be represented by this motor model (<i>Pfrac</i>) (&gt;= 0,0 and &lt;= 1,0). Typical value = 0,3. Default: 0.0 */ - CIMPP::PU ra; /* Stator resistance (<i>Ra</i>). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tbkr; /* Circuit breaker operating time (<i>Tbkr</i>) (&gt;= 0). Typical value = 0,08. Default: nullptr */ - CIMPP::Seconds tpo; /* Transient rotor time constant (<i>Tpo</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::Seconds tppo; /* Subtransient rotor time constant (<i>Tppo</i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ - CIMPP::Seconds tv; /* Voltage trip pickup time (<i>Tv</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::PU vt; /* Voltage threshold for tripping (<i>Vt</i>). Typical value = 0,7. Default: nullptr */ + /** \brief Aggregate load to which this aggregate motor (dynamic) load belongs. Default: 0 */ + CIMPP::LoadAggregate* LoadAggregate; + + /** \brief Damping factor (<i>D</i>). Unit = delta <i>P</i>/delta speed. Typical value = 2. Default: 0.0 */ + CIMPP::Float d; + + /** \brief Inertia constant (<i>H</i>) (&gt;= 0). Typical value = 0,4. Default: nullptr */ + CIMPP::Seconds h; + + /** \brief Loading factor (<i>Lfac</i>). The ratio of initial <i>P</i> to motor MVA base. Typical value = 0,8. Default: 0.0 */ + CIMPP::Float lfac; + + /** \brief Transient reactance (<i>Lp</i>). Typical value = 0,15. Default: nullptr */ + CIMPP::PU lp; + + /** \brief Subtransient reactance (<i>Lpp</i>). Typical value = 0,15. Default: nullptr */ + CIMPP::PU lpp; + + /** \brief Synchronous reactance (<i>Ls</i>). Typical value = 3,2. Default: nullptr */ + CIMPP::PU ls; + + /** \brief Fraction of constant-power load to be represented by this motor model (<i>Pfrac</i>) (&gt;= 0,0 and &lt;= 1,0). Typical value = 0,3. Default: 0.0 */ + CIMPP::Float pfrac; + + /** \brief Stator resistance (<i>Ra</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU ra; + + /** \brief Circuit breaker operating time (<i>Tbkr</i>) (&gt;= 0). Typical value = 0,08. Default: nullptr */ + CIMPP::Seconds tbkr; + + /** \brief Transient rotor time constant (<i>Tpo</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds tpo; + + /** \brief Subtransient rotor time constant (<i>Tppo</i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ + CIMPP::Seconds tppo; + + /** \brief Voltage trip pickup time (<i>Tv</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds tv; + + /** \brief Voltage threshold for tripping (<i>Vt</i>). Typical value = 0,7. Default: nullptr */ + CIMPP::PU vt; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/LoadResponseCharacteristic.cpp b/CGMES_3.0.0/LoadResponseCharacteristic.cpp index 0ff29433c..f4c2368ce 100644 --- a/CGMES_3.0.0/LoadResponseCharacteristic.cpp +++ b/CGMES_3.0.0/LoadResponseCharacteristic.cpp @@ -9,22 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "EnergyConsumer.hpp" -#include "Boolean.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" using namespace CIMPP; -LoadResponseCharacteristic::LoadResponseCharacteristic() {}; -LoadResponseCharacteristic::~LoadResponseCharacteristic() {}; +LoadResponseCharacteristic::LoadResponseCharacteristic() {} +LoadResponseCharacteristic::~LoadResponseCharacteristic() {} static const std::list PossibleProfilesForClass = { @@ -62,171 +51,182 @@ LoadResponseCharacteristic::getPossibleProfilesForAttributes() const return map; } +bool assign_EnergyConsumer_LoadResponse(BaseClass*, BaseClass*); +bool assign_LoadResponseCharacteristic_EnergyConsumer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + EnergyConsumer* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->EnergyConsumer.begin(), element->EnergyConsumer.end(), element2) == element->EnergyConsumer.end()) + { + element->EnergyConsumer.push_back(element2); + return assign_EnergyConsumer_LoadResponse(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_LoadResponseCharacteristic_exponentModel(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_exponentModel(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exponentModel; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadResponseCharacteristic_pConstantCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_pConstantCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pConstantCurrent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadResponseCharacteristic_pConstantImpedance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_pConstantImpedance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pConstantImpedance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadResponseCharacteristic_pConstantPower(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_pConstantPower(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pConstantPower; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadResponseCharacteristic_pFrequencyExponent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_pFrequencyExponent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pFrequencyExponent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadResponseCharacteristic_pVoltageExponent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_pVoltageExponent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pVoltageExponent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadResponseCharacteristic_qConstantCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_qConstantCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qConstantCurrent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadResponseCharacteristic_qConstantImpedance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_qConstantImpedance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qConstantImpedance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadResponseCharacteristic_qConstantPower(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_qConstantPower(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qConstantPower; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadResponseCharacteristic_qFrequencyExponent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadResponseCharacteristic_qFrequencyExponent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qFrequencyExponent; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_LoadResponseCharacteristic_qVoltageExponent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->qVoltageExponent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_EnergyConsumer_LoadResponse(BaseClass*, BaseClass*); -bool assign_LoadResponseCharacteristic_EnergyConsumer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_LoadResponseCharacteristic_qVoltageExponent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); - EnergyConsumer* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->EnergyConsumer.begin(), element->EnergyConsumer.end(), element2) == element->EnergyConsumer.end()) + buffer >> element->qVoltageExponent; + if (!buffer.fail()) { - element->EnergyConsumer.push_back(element2); - return assign_EnergyConsumer_LoadResponse(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_LoadResponseCharacteristic_exponentModel(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exponentModel; if (!buffer.str().empty()) @@ -240,7 +240,8 @@ bool get_LoadResponseCharacteristic_exponentModel(const BaseClass* BaseClass_ptr bool get_LoadResponseCharacteristic_pConstantCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pConstantCurrent; if (!buffer.str().empty()) @@ -254,7 +255,8 @@ bool get_LoadResponseCharacteristic_pConstantCurrent(const BaseClass* BaseClass_ bool get_LoadResponseCharacteristic_pConstantImpedance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pConstantImpedance; if (!buffer.str().empty()) @@ -268,7 +270,8 @@ bool get_LoadResponseCharacteristic_pConstantImpedance(const BaseClass* BaseClas bool get_LoadResponseCharacteristic_pConstantPower(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pConstantPower; if (!buffer.str().empty()) @@ -282,7 +285,8 @@ bool get_LoadResponseCharacteristic_pConstantPower(const BaseClass* BaseClass_pt bool get_LoadResponseCharacteristic_pFrequencyExponent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pFrequencyExponent; if (!buffer.str().empty()) @@ -296,7 +300,8 @@ bool get_LoadResponseCharacteristic_pFrequencyExponent(const BaseClass* BaseClas bool get_LoadResponseCharacteristic_pVoltageExponent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pVoltageExponent; if (!buffer.str().empty()) @@ -310,7 +315,8 @@ bool get_LoadResponseCharacteristic_pVoltageExponent(const BaseClass* BaseClass_ bool get_LoadResponseCharacteristic_qConstantCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qConstantCurrent; if (!buffer.str().empty()) @@ -324,7 +330,8 @@ bool get_LoadResponseCharacteristic_qConstantCurrent(const BaseClass* BaseClass_ bool get_LoadResponseCharacteristic_qConstantImpedance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qConstantImpedance; if (!buffer.str().empty()) @@ -338,7 +345,8 @@ bool get_LoadResponseCharacteristic_qConstantImpedance(const BaseClass* BaseClas bool get_LoadResponseCharacteristic_qConstantPower(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qConstantPower; if (!buffer.str().empty()) @@ -352,7 +360,8 @@ bool get_LoadResponseCharacteristic_qConstantPower(const BaseClass* BaseClass_pt bool get_LoadResponseCharacteristic_qFrequencyExponent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qFrequencyExponent; if (!buffer.str().empty()) @@ -366,7 +375,8 @@ bool get_LoadResponseCharacteristic_qFrequencyExponent(const BaseClass* BaseClas bool get_LoadResponseCharacteristic_qVoltageExponent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1)) + const LoadResponseCharacteristic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qVoltageExponent; if (!buffer.str().empty()) @@ -378,8 +388,6 @@ bool get_LoadResponseCharacteristic_qVoltageExponent(const BaseClass* BaseClass_ return false; } - - const char LoadResponseCharacteristic::debugName[] = "LoadResponseCharacteristic"; const char* LoadResponseCharacteristic::debugString() const { @@ -388,27 +396,27 @@ const char* LoadResponseCharacteristic::debugString() const void LoadResponseCharacteristic::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic"), &LoadResponseCharacteristic_factory)); + factory_map.emplace("cim:LoadResponseCharacteristic", &LoadResponseCharacteristic_factory); } void LoadResponseCharacteristic::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.exponentModel"), &assign_LoadResponseCharacteristic_exponentModel)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.pConstantCurrent"), &assign_LoadResponseCharacteristic_pConstantCurrent)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.pConstantImpedance"), &assign_LoadResponseCharacteristic_pConstantImpedance)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.pConstantPower"), &assign_LoadResponseCharacteristic_pConstantPower)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.pFrequencyExponent"), &assign_LoadResponseCharacteristic_pFrequencyExponent)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.pVoltageExponent"), &assign_LoadResponseCharacteristic_pVoltageExponent)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.qConstantCurrent"), &assign_LoadResponseCharacteristic_qConstantCurrent)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.qConstantImpedance"), &assign_LoadResponseCharacteristic_qConstantImpedance)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.qConstantPower"), &assign_LoadResponseCharacteristic_qConstantPower)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.qFrequencyExponent"), &assign_LoadResponseCharacteristic_qFrequencyExponent)); - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.qVoltageExponent"), &assign_LoadResponseCharacteristic_qVoltageExponent)); + assign_map.emplace("cim:LoadResponseCharacteristic.exponentModel", &assign_LoadResponseCharacteristic_exponentModel); + assign_map.emplace("cim:LoadResponseCharacteristic.pConstantCurrent", &assign_LoadResponseCharacteristic_pConstantCurrent); + assign_map.emplace("cim:LoadResponseCharacteristic.pConstantImpedance", &assign_LoadResponseCharacteristic_pConstantImpedance); + assign_map.emplace("cim:LoadResponseCharacteristic.pConstantPower", &assign_LoadResponseCharacteristic_pConstantPower); + assign_map.emplace("cim:LoadResponseCharacteristic.pFrequencyExponent", &assign_LoadResponseCharacteristic_pFrequencyExponent); + assign_map.emplace("cim:LoadResponseCharacteristic.pVoltageExponent", &assign_LoadResponseCharacteristic_pVoltageExponent); + assign_map.emplace("cim:LoadResponseCharacteristic.qConstantCurrent", &assign_LoadResponseCharacteristic_qConstantCurrent); + assign_map.emplace("cim:LoadResponseCharacteristic.qConstantImpedance", &assign_LoadResponseCharacteristic_qConstantImpedance); + assign_map.emplace("cim:LoadResponseCharacteristic.qConstantPower", &assign_LoadResponseCharacteristic_qConstantPower); + assign_map.emplace("cim:LoadResponseCharacteristic.qFrequencyExponent", &assign_LoadResponseCharacteristic_qFrequencyExponent); + assign_map.emplace("cim:LoadResponseCharacteristic.qVoltageExponent", &assign_LoadResponseCharacteristic_qVoltageExponent); } void LoadResponseCharacteristic::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadResponseCharacteristic.EnergyConsumer"), &assign_LoadResponseCharacteristic_EnergyConsumer)); + assign_map.emplace("cim:LoadResponseCharacteristic.EnergyConsumer", &assign_LoadResponseCharacteristic_EnergyConsumer); } void LoadResponseCharacteristic::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/LoadResponseCharacteristic.hpp b/CGMES_3.0.0/LoadResponseCharacteristic.hpp index 67077804e..81530c76a 100644 --- a/CGMES_3.0.0/LoadResponseCharacteristic.hpp +++ b/CGMES_3.0.0/LoadResponseCharacteristic.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class EnergyConsumer; - /* - Models the characteristic response of the load demand due to changes in system conditions such as voltage and frequency. It is not related to demand response. If LoadResponseCharacteristic.exponentModel is True, the exponential voltage or frequency dependent models are specified and used as to calculate active and reactive power components of the load model. The equations to calculate active and reactive power components of the load model are internal to the power flow calculation, hence they use different quantities depending on the use case of the data exchange. The equations for exponential voltage dependent load model injected power are: pInjection= Pnominal* (Voltage/cim:BaseVoltage.nominalVoltage) ** cim:LoadResponseCharacteristic.pVoltageExponent qInjection= Qnominal* (Voltage/cim:BaseVoltage.nominalVoltage) ** cim:LoadResponseCharacteristic.qVoltageExponent Where: 1) * means "multiply" and ** is "raised to power of"; 2) Pnominal and Qnominal represent the active power and reactive power at nominal voltage as any load described by the voltage exponential model shall be given at nominal voltage. This means that EnergyConsumer.p and EnergyConsumer.q are at nominal voltage. 3) After power flow is solved: -pInjection and qInjection correspond to SvPowerflow.p and SvPowerflow.q respectively. - Voltage corresponds to SvVoltage.v at the TopologicalNode where the load is connected. - */ + /** \brief Models the characteristic response of the load demand due to changes in system conditions such as voltage and frequency. It is not related to demand response. If LoadResponseCharacteristic.exponentModel is True, the exponential voltage or frequency dependent models are specified and used as to calculate active and reactive power components of the load model. The equations to calculate active and reactive power components of the load model are internal to the power flow calculation, hence they use different quantities depending on the use case of the data exchange. The equations for exponential voltage dependent load model injected power are: pInjection= Pnominal* (Voltage/cim:BaseVoltage.nominalVoltage) ** cim:LoadResponseCharacteristic.pVoltageExponent qInjection= Qnominal* (Voltage/cim:BaseVoltage.nominalVoltage) ** cim:LoadResponseCharacteristic.qVoltageExponent Where: 1) * means "multiply" and ** is "raised to power of"; 2) Pnominal and Qnominal represent the active power and reactive power at nominal voltage as any load described by the voltage exponential model shall be given at nominal voltage. This means that EnergyConsumer.p and EnergyConsumer.q are at nominal voltage. 3) After power flow is solved: -pInjection and qInjection correspond to SvPowerflow.p and SvPowerflow.q respectively. - Voltage corresponds to SvVoltage.v at the TopologicalNode where the load is connected. */ class LoadResponseCharacteristic : public IdentifiedObject { public: @@ -29,18 +27,41 @@ namespace CIMPP LoadResponseCharacteristic(); ~LoadResponseCharacteristic() override; - std::list EnergyConsumer; /* The set of loads that have the response characteristics. Default: 0 */ - CIMPP::Boolean exponentModel; /* Indicates the exponential voltage dependency model is to be used. If false, the coefficient model is to be used. The exponential voltage dependency model consist of the attributes: - pVoltageExponent - qVoltageExponent - pFrequencyExponent - qFrequencyExponent. The coefficient model consist of the attributes: - pConstantImpedance - pConstantCurrent - pConstantPower - qConstantImpedance - qConstantCurrent - qConstantPower. The sum of pConstantImpedance, pConstantCurrent and pConstantPower shall equal 1. The sum of qConstantImpedance, qConstantCurrent and qConstantPower shall equal 1. Default: false */ - CIMPP::Float pConstantCurrent; /* Portion of active power load modelled as constant current. Default: 0.0 */ - CIMPP::Float pConstantImpedance; /* Portion of active power load modelled as constant impedance. Default: 0.0 */ - CIMPP::Float pConstantPower; /* Portion of active power load modelled as constant power. Default: 0.0 */ - CIMPP::Float pFrequencyExponent; /* Exponent of per unit frequency effecting active power. Default: 0.0 */ - CIMPP::Float pVoltageExponent; /* Exponent of per unit voltage effecting real power. Default: 0.0 */ - CIMPP::Float qConstantCurrent; /* Portion of reactive power load modelled as constant current. Default: 0.0 */ - CIMPP::Float qConstantImpedance; /* Portion of reactive power load modelled as constant impedance. Default: 0.0 */ - CIMPP::Float qConstantPower; /* Portion of reactive power load modelled as constant power. Default: 0.0 */ - CIMPP::Float qFrequencyExponent; /* Exponent of per unit frequency effecting reactive power. Default: 0.0 */ - CIMPP::Float qVoltageExponent; /* Exponent of per unit voltage effecting reactive power. Default: 0.0 */ + /** \brief The set of loads that have the response characteristics. Default: 0 */ + std::list EnergyConsumer; + + /** \brief Indicates the exponential voltage dependency model is to be used. If false, the coefficient model is to be used. The exponential voltage dependency model consist of the attributes: - pVoltageExponent - qVoltageExponent - pFrequencyExponent - qFrequencyExponent. The coefficient model consist of the attributes: - pConstantImpedance - pConstantCurrent - pConstantPower - qConstantImpedance - qConstantCurrent - qConstantPower. The sum of pConstantImpedance, pConstantCurrent and pConstantPower shall equal 1. The sum of qConstantImpedance, qConstantCurrent and qConstantPower shall equal 1. Default: false */ + CIMPP::Boolean exponentModel; + + /** \brief Portion of active power load modelled as constant current. Default: 0.0 */ + CIMPP::Float pConstantCurrent; + + /** \brief Portion of active power load modelled as constant impedance. Default: 0.0 */ + CIMPP::Float pConstantImpedance; + + /** \brief Portion of active power load modelled as constant power. Default: 0.0 */ + CIMPP::Float pConstantPower; + + /** \brief Exponent of per unit frequency effecting active power. Default: 0.0 */ + CIMPP::Float pFrequencyExponent; + + /** \brief Exponent of per unit voltage effecting real power. Default: 0.0 */ + CIMPP::Float pVoltageExponent; + + /** \brief Portion of reactive power load modelled as constant current. Default: 0.0 */ + CIMPP::Float qConstantCurrent; + + /** \brief Portion of reactive power load modelled as constant impedance. Default: 0.0 */ + CIMPP::Float qConstantImpedance; + + /** \brief Portion of reactive power load modelled as constant power. Default: 0.0 */ + CIMPP::Float qConstantPower; + + /** \brief Exponent of per unit frequency effecting reactive power. Default: 0.0 */ + CIMPP::Float qFrequencyExponent; + + /** \brief Exponent of per unit voltage effecting reactive power. Default: 0.0 */ + CIMPP::Float qVoltageExponent; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/LoadStatic.cpp b/CGMES_3.0.0/LoadStatic.cpp index d49871e1b..1ae8c3ffb 100644 --- a/CGMES_3.0.0/LoadStatic.cpp +++ b/CGMES_3.0.0/LoadStatic.cpp @@ -9,28 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "LoadAggregate.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "StaticLoadModelKind.hpp" using namespace CIMPP; -LoadStatic::LoadStatic() : LoadAggregate(nullptr) {}; -LoadStatic::~LoadStatic() {}; +LoadStatic::LoadStatic() : LoadAggregate(nullptr) {} +LoadStatic::~LoadStatic() {} static const std::list PossibleProfilesForClass = { @@ -74,249 +57,279 @@ LoadStatic::getPossibleProfilesForAttributes() const return map; } +bool assign_LoadAggregate_LoadStatic(BaseClass*, BaseClass*); +bool assign_LoadStatic_LoadAggregate(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + LoadAggregate* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->LoadAggregate != element2) + { + element->LoadAggregate = element2; + return assign_LoadAggregate_LoadStatic(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_LoadStatic_ep1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_ep1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ep1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_ep2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_ep2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ep2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_ep3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_ep3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ep3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_eq1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_eq1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eq1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_eq2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_eq2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eq2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_eq3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_eq3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->eq3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kp1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kp1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kp2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kp2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kp3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kp3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kp4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kp4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kpf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kpf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kq1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kq1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kq1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kq2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kq2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kq2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kq3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kq3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kq3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kq4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kq4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kq4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_kqf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_kqf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kqf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_LoadStatic_staticLoadModelType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_LoadStatic_staticLoadModelType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->staticLoadModelType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_LoadAggregate_LoadStatic(BaseClass*, BaseClass*); -bool assign_LoadStatic_LoadAggregate(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_LoadStatic_LoadAggregate(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - LoadStatic* element = dynamic_cast(BaseClass_ptr1); - LoadAggregate* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->LoadAggregate != element2) + if (element->LoadAggregate != 0) { - element->LoadAggregate = element2; - return assign_LoadAggregate_LoadStatic(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->LoadAggregate); + return true; } - return true; } return false; } bool get_LoadStatic_ep1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ep1; if (!buffer.str().empty()) @@ -330,7 +343,8 @@ bool get_LoadStatic_ep1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_ep2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ep2; if (!buffer.str().empty()) @@ -344,7 +358,8 @@ bool get_LoadStatic_ep2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_ep3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ep3; if (!buffer.str().empty()) @@ -358,7 +373,8 @@ bool get_LoadStatic_ep3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_eq1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eq1; if (!buffer.str().empty()) @@ -372,7 +388,8 @@ bool get_LoadStatic_eq1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_eq2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eq2; if (!buffer.str().empty()) @@ -386,7 +403,8 @@ bool get_LoadStatic_eq2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_eq3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->eq3; if (!buffer.str().empty()) @@ -400,7 +418,8 @@ bool get_LoadStatic_eq3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kp1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp1; if (!buffer.str().empty()) @@ -414,7 +433,8 @@ bool get_LoadStatic_kp1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kp2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp2; if (!buffer.str().empty()) @@ -428,7 +448,8 @@ bool get_LoadStatic_kp2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kp3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp3; if (!buffer.str().empty()) @@ -442,7 +463,8 @@ bool get_LoadStatic_kp3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kp4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp4; if (!buffer.str().empty()) @@ -456,7 +478,8 @@ bool get_LoadStatic_kp4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kpf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpf; if (!buffer.str().empty()) @@ -470,7 +493,8 @@ bool get_LoadStatic_kpf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kq1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kq1; if (!buffer.str().empty()) @@ -484,7 +508,8 @@ bool get_LoadStatic_kq1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kq2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kq2; if (!buffer.str().empty()) @@ -498,7 +523,8 @@ bool get_LoadStatic_kq2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kq3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kq3; if (!buffer.str().empty()) @@ -512,7 +538,8 @@ bool get_LoadStatic_kq3(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kq4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kq4; if (!buffer.str().empty()) @@ -526,7 +553,8 @@ bool get_LoadStatic_kq4(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_LoadStatic_kqf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kqf; if (!buffer.str().empty()) @@ -538,24 +566,10 @@ bool get_LoadStatic_kqf(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - -bool get_LoadStatic_LoadAggregate(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->LoadAggregate != 0) - { - BaseClass_list.push_back(element->LoadAggregate); - return true; - } - } - return false; -} - - bool get_LoadStatic_staticLoadModelType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadStatic* element = dynamic_cast(BaseClass_ptr1)) + const LoadStatic* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->staticLoadModelType; if (!buffer.str().empty()) @@ -575,33 +589,33 @@ const char* LoadStatic::debugString() const void LoadStatic::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadStatic"), &LoadStatic_factory)); + factory_map.emplace("cim:LoadStatic", &LoadStatic_factory); } void LoadStatic::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.ep1"), &assign_LoadStatic_ep1)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.ep2"), &assign_LoadStatic_ep2)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.ep3"), &assign_LoadStatic_ep3)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.eq1"), &assign_LoadStatic_eq1)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.eq2"), &assign_LoadStatic_eq2)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.eq3"), &assign_LoadStatic_eq3)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kp1"), &assign_LoadStatic_kp1)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kp2"), &assign_LoadStatic_kp2)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kp3"), &assign_LoadStatic_kp3)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kp4"), &assign_LoadStatic_kp4)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kpf"), &assign_LoadStatic_kpf)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kq1"), &assign_LoadStatic_kq1)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kq2"), &assign_LoadStatic_kq2)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kq3"), &assign_LoadStatic_kq3)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kq4"), &assign_LoadStatic_kq4)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.kqf"), &assign_LoadStatic_kqf)); - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.staticLoadModelType"), &assign_LoadStatic_staticLoadModelType)); + assign_map.emplace("cim:LoadStatic.ep1", &assign_LoadStatic_ep1); + assign_map.emplace("cim:LoadStatic.ep2", &assign_LoadStatic_ep2); + assign_map.emplace("cim:LoadStatic.ep3", &assign_LoadStatic_ep3); + assign_map.emplace("cim:LoadStatic.eq1", &assign_LoadStatic_eq1); + assign_map.emplace("cim:LoadStatic.eq2", &assign_LoadStatic_eq2); + assign_map.emplace("cim:LoadStatic.eq3", &assign_LoadStatic_eq3); + assign_map.emplace("cim:LoadStatic.kp1", &assign_LoadStatic_kp1); + assign_map.emplace("cim:LoadStatic.kp2", &assign_LoadStatic_kp2); + assign_map.emplace("cim:LoadStatic.kp3", &assign_LoadStatic_kp3); + assign_map.emplace("cim:LoadStatic.kp4", &assign_LoadStatic_kp4); + assign_map.emplace("cim:LoadStatic.kpf", &assign_LoadStatic_kpf); + assign_map.emplace("cim:LoadStatic.kq1", &assign_LoadStatic_kq1); + assign_map.emplace("cim:LoadStatic.kq2", &assign_LoadStatic_kq2); + assign_map.emplace("cim:LoadStatic.kq3", &assign_LoadStatic_kq3); + assign_map.emplace("cim:LoadStatic.kq4", &assign_LoadStatic_kq4); + assign_map.emplace("cim:LoadStatic.kqf", &assign_LoadStatic_kqf); + assign_map.emplace("cim:LoadStatic.staticLoadModelType", &assign_LoadStatic_staticLoadModelType); } void LoadStatic::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadStatic.LoadAggregate"), &assign_LoadStatic_LoadAggregate)); + assign_map.emplace("cim:LoadStatic.LoadAggregate", &assign_LoadStatic_LoadAggregate); } void LoadStatic::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/LoadStatic.hpp b/CGMES_3.0.0/LoadStatic.hpp index 3e9580d1d..95683fcbf 100644 --- a/CGMES_3.0.0/LoadStatic.hpp +++ b/CGMES_3.0.0/LoadStatic.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class LoadAggregate; - /* - General static load. This model represents the sensitivity of the real and reactive power consumed by the load to the amplitude and frequency of the bus voltage. - */ + /** \brief General static load. This model represents the sensitivity of the real and reactive power consumed by the load to the amplitude and frequency of the bus voltage. */ class LoadStatic : public IdentifiedObject { public: @@ -29,24 +27,59 @@ namespace CIMPP LoadStatic(); ~LoadStatic() override; - CIMPP::LoadAggregate* LoadAggregate; /* Aggregate load to which this aggregate static load belongs. Default: 0 */ - CIMPP::Float ep1; /* First term voltage exponent for active power (<i>Ep1</i>). Used only when .staticLoadModelType = exponential. Default: 0.0 */ - CIMPP::Float ep2; /* Second term voltage exponent for active power (<i>Ep2</i>). Used only when .staticLoadModelType = exponential. Default: 0.0 */ - CIMPP::Float ep3; /* Third term voltage exponent for active power (<i>Ep3</i>). Used only when .staticLoadModelType = exponential. Default: 0.0 */ - CIMPP::Float eq1; /* First term voltage exponent for reactive power (<i>Eq1</i>). Used only when .staticLoadModelType = exponential. Default: 0.0 */ - CIMPP::Float eq2; /* Second term voltage exponent for reactive power (<i>Eq2</i>). Used only when .staticLoadModelType = exponential. Default: 0.0 */ - CIMPP::Float eq3; /* Third term voltage exponent for reactive power (<i>Eq3</i>). Used only when .staticLoadModelType = exponential. Default: 0.0 */ - CIMPP::Float kp1; /* First term voltage coefficient for active power (<i>K</i><i><sub>p1</sub></i>). Not used when .staticLoadModelType = constantZ. Default: 0.0 */ - CIMPP::Float kp2; /* Second term voltage coefficient for active power (<i>K</i><i><sub>p2</sub></i>). Not used when .staticLoadModelType = constantZ. Default: 0.0 */ - CIMPP::Float kp3; /* Third term voltage coefficient for active power (<i>K</i><i><sub>p3</sub></i>). Not used when .staticLoadModelType = constantZ. Default: 0.0 */ - CIMPP::Float kp4; /* Frequency coefficient for active power (<i>K</i><i><sub>p4</sub></i>) (not = 0 if .staticLoadModelType = zIP2). Used only when .staticLoadModelType = zIP2. Default: 0.0 */ - CIMPP::Float kpf; /* Frequency deviation coefficient for active power (<i>K</i><i><sub>pf</sub></i>). Not used when .staticLoadModelType = constantZ. Default: 0.0 */ - CIMPP::Float kq1; /* First term voltage coefficient for reactive power (<i>K</i><i><sub>q1</sub></i>). Not used when .staticLoadModelType = constantZ. Default: 0.0 */ - CIMPP::Float kq2; /* Second term voltage coefficient for reactive power (<i>K</i><i><sub>q2</sub></i>). Not used when .staticLoadModelType = constantZ. Default: 0.0 */ - CIMPP::Float kq3; /* Third term voltage coefficient for reactive power (<i>K</i><i><sub>q3</sub></i>). Not used when .staticLoadModelType = constantZ. Default: 0.0 */ - CIMPP::Float kq4; /* Frequency coefficient for reactive power (<i>K</i><i><sub>q4</sub></i>) (not = 0 when .staticLoadModelType = zIP2). Used only when .staticLoadModelType - zIP2. Default: 0.0 */ - CIMPP::Float kqf; /* Frequency deviation coefficient for reactive power (<i>K</i><i><sub>qf</sub></i>). Not used when .staticLoadModelType = constantZ. Default: 0.0 */ - CIMPP::StaticLoadModelKind staticLoadModelType; /* Type of static load model. Typical value = constantZ. Default: 0 */ + /** \brief Aggregate load to which this aggregate static load belongs. Default: 0 */ + CIMPP::LoadAggregate* LoadAggregate; + + /** \brief First term voltage exponent for active power (<i>Ep1</i>). Used only when .staticLoadModelType = exponential. Default: 0.0 */ + CIMPP::Float ep1; + + /** \brief Second term voltage exponent for active power (<i>Ep2</i>). Used only when .staticLoadModelType = exponential. Default: 0.0 */ + CIMPP::Float ep2; + + /** \brief Third term voltage exponent for active power (<i>Ep3</i>). Used only when .staticLoadModelType = exponential. Default: 0.0 */ + CIMPP::Float ep3; + + /** \brief First term voltage exponent for reactive power (<i>Eq1</i>). Used only when .staticLoadModelType = exponential. Default: 0.0 */ + CIMPP::Float eq1; + + /** \brief Second term voltage exponent for reactive power (<i>Eq2</i>). Used only when .staticLoadModelType = exponential. Default: 0.0 */ + CIMPP::Float eq2; + + /** \brief Third term voltage exponent for reactive power (<i>Eq3</i>). Used only when .staticLoadModelType = exponential. Default: 0.0 */ + CIMPP::Float eq3; + + /** \brief First term voltage coefficient for active power (<i>K</i><i><sub>p1</sub></i>). Not used when .staticLoadModelType = constantZ. Default: 0.0 */ + CIMPP::Float kp1; + + /** \brief Second term voltage coefficient for active power (<i>K</i><i><sub>p2</sub></i>). Not used when .staticLoadModelType = constantZ. Default: 0.0 */ + CIMPP::Float kp2; + + /** \brief Third term voltage coefficient for active power (<i>K</i><i><sub>p3</sub></i>). Not used when .staticLoadModelType = constantZ. Default: 0.0 */ + CIMPP::Float kp3; + + /** \brief Frequency coefficient for active power (<i>K</i><i><sub>p4</sub></i>) (not = 0 if .staticLoadModelType = zIP2). Used only when .staticLoadModelType = zIP2. Default: 0.0 */ + CIMPP::Float kp4; + + /** \brief Frequency deviation coefficient for active power (<i>K</i><i><sub>pf</sub></i>). Not used when .staticLoadModelType = constantZ. Default: 0.0 */ + CIMPP::Float kpf; + + /** \brief First term voltage coefficient for reactive power (<i>K</i><i><sub>q1</sub></i>). Not used when .staticLoadModelType = constantZ. Default: 0.0 */ + CIMPP::Float kq1; + + /** \brief Second term voltage coefficient for reactive power (<i>K</i><i><sub>q2</sub></i>). Not used when .staticLoadModelType = constantZ. Default: 0.0 */ + CIMPP::Float kq2; + + /** \brief Third term voltage coefficient for reactive power (<i>K</i><i><sub>q3</sub></i>). Not used when .staticLoadModelType = constantZ. Default: 0.0 */ + CIMPP::Float kq3; + + /** \brief Frequency coefficient for reactive power (<i>K</i><i><sub>q4</sub></i>) (not = 0 when .staticLoadModelType = zIP2). Used only when .staticLoadModelType - zIP2. Default: 0.0 */ + CIMPP::Float kq4; + + /** \brief Frequency deviation coefficient for reactive power (<i>K</i><i><sub>qf</sub></i>). Not used when .staticLoadModelType = constantZ. Default: 0.0 */ + CIMPP::Float kqf; + + /** \brief Type of static load model. Typical value = constantZ. Default: 0 */ + CIMPP::StaticLoadModelKind staticLoadModelType; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/LoadUserDefined.cpp b/CGMES_3.0.0/LoadUserDefined.cpp index 976f5f8a4..ad0a491aa 100644 --- a/CGMES_3.0.0/LoadUserDefined.cpp +++ b/CGMES_3.0.0/LoadUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -LoadUserDefined::LoadUserDefined() {}; -LoadUserDefined::~LoadUserDefined() {}; +LoadUserDefined::LoadUserDefined() {} +LoadUserDefined::~LoadUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ LoadUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_LoadUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (LoadUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_LoadUserDefined(BaseClass*, BaseClass*); bool assign_LoadUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_LoadUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_pt return false; } +bool assign_LoadUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + LoadUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_LoadUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const LoadUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const LoadUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_LoadUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::strin return false; } - - const char LoadUserDefined::debugName[] = "LoadUserDefined"; const char* LoadUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* LoadUserDefined::debugString() const void LoadUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:LoadUserDefined"), &LoadUserDefined_factory)); + factory_map.emplace("cim:LoadUserDefined", &LoadUserDefined_factory); } void LoadUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadUserDefined.proprietary"), &assign_LoadUserDefined_proprietary)); + assign_map.emplace("cim:LoadUserDefined.proprietary", &assign_LoadUserDefined_proprietary); } void LoadUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:LoadUserDefined.ProprietaryParameterDynamics"), &assign_LoadUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:LoadUserDefined.ProprietaryParameterDynamics", &assign_LoadUserDefined_ProprietaryParameterDynamics); } void LoadUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/LoadUserDefined.hpp b/CGMES_3.0.0/LoadUserDefined.hpp index 80a0f61ec..d259d90ef 100644 --- a/CGMES_3.0.0/LoadUserDefined.hpp +++ b/CGMES_3.0.0/LoadUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Load whose dynamic behaviour is described by a user-defined model. - */ + /** \brief Load whose dynamic behaviour is described by a user-defined model. */ class LoadUserDefined : public LoadDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP LoadUserDefined(); ~LoadUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Location.cpp b/CGMES_3.0.0/Location.cpp index 10cd83304..75fa4b23b 100644 --- a/CGMES_3.0.0/Location.cpp +++ b/CGMES_3.0.0/Location.cpp @@ -15,8 +15,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Location::Location() : CoordinateSystem(nullptr), PowerSystemResources(nullptr), mainAddress(nullptr) {}; -Location::~Location() {}; +Location::Location() : CoordinateSystem(nullptr), PowerSystemResources(nullptr), mainAddress(nullptr) {} +Location::~Location() {} static const std::list PossibleProfilesForClass = { @@ -46,8 +46,6 @@ Location::getPossibleProfilesForAttributes() const return map; } - - bool assign_CoordinateSystem_Locations(BaseClass*, BaseClass*); bool assign_Location_CoordinateSystem(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -64,6 +62,7 @@ bool assign_Location_CoordinateSystem(BaseClass* BaseClass_ptr1, BaseClass* Base } return false; } + bool assign_PositionPoint_Location(BaseClass*, BaseClass*); bool assign_Location_PositionPoints(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -80,6 +79,7 @@ bool assign_Location_PositionPoints(BaseClass* BaseClass_ptr1, BaseClass* BaseCl } return false; } + bool assign_PowerSystemResource_Location(BaseClass*, BaseClass*); bool assign_Location_PowerSystemResources(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -96,9 +96,11 @@ bool assign_Location_PowerSystemResources(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_Location_mainAddress(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if(Location* element = dynamic_cast(BaseClass_ptr1)) + Location* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->mainAddress = dynamic_cast(BaseClass_ptr2); if (element->mainAddress != nullptr) @@ -109,10 +111,10 @@ bool assign_Location_mainAddress(BaseClass* BaseClass_ptr1, BaseClass* BaseClass return false; } - bool get_Location_CoordinateSystem(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Location* element = dynamic_cast(BaseClass_ptr1)) + const Location* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->CoordinateSystem != 0) { @@ -123,9 +125,11 @@ bool get_Location_CoordinateSystem(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Location* element = dynamic_cast(BaseClass_ptr1)) + const Location* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PowerSystemResources != 0) { @@ -138,7 +142,8 @@ bool get_Location_PowerSystemResources(const BaseClass* BaseClass_ptr1, std::lis bool get_Location_mainAddress(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Location* element = dynamic_cast(BaseClass_ptr1)) + const Location* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->mainAddress != 0) { @@ -149,7 +154,6 @@ bool get_Location_mainAddress(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Location"), &Location_factory)); + factory_map.emplace("cim:Location", &Location_factory); } void Location::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -167,10 +171,10 @@ void Location::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Location.CoordinateSystem"), &assign_Location_CoordinateSystem)); - assign_map.insert(std::make_pair(std::string("cim:Location.PositionPoints"), &assign_Location_PositionPoints)); - assign_map.insert(std::make_pair(std::string("cim:Location.PowerSystemResources"), &assign_Location_PowerSystemResources)); - assign_map.insert(std::make_pair(std::string("cim:Location.mainAddress"), &assign_Location_mainAddress)); + assign_map.emplace("cim:Location.CoordinateSystem", &assign_Location_CoordinateSystem); + assign_map.emplace("cim:Location.PositionPoints", &assign_Location_PositionPoints); + assign_map.emplace("cim:Location.PowerSystemResources", &assign_Location_PowerSystemResources); + assign_map.emplace("cim:Location.mainAddress", &assign_Location_mainAddress); } void Location::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/Location.hpp b/CGMES_3.0.0/Location.hpp index 8373c7afb..dfbbdc580 100644 --- a/CGMES_3.0.0/Location.hpp +++ b/CGMES_3.0.0/Location.hpp @@ -20,9 +20,7 @@ namespace CIMPP class PowerSystemResource; class StreetAddress; - /* - The place, scene, or point of something where someone or something has been, is, and/or will be at a given moment in time. It can be defined with one or more position points (coordinates) in a given coordinate system. - */ + /** \brief The place, scene, or point of something where someone or something has been, is, and/or will be at a given moment in time. It can be defined with one or more position points (coordinates) in a given coordinate system. */ class Location : public IdentifiedObject { public: @@ -30,10 +28,17 @@ namespace CIMPP Location(); ~Location() override; - CIMPP::CoordinateSystem* CoordinateSystem; /* Coordinate system used to describe position points of this location. Default: 0 */ - std::list PositionPoints; /* Sequence of position points describing this location, expressed in coordinate system `Location.CoordinateSystem`. Default: 0 */ - CIMPP::PowerSystemResource* PowerSystemResources; /* All power system resources at this location. Default: 0 */ - CIMPP::StreetAddress* mainAddress; /* Main address of the location. Default: nullptr */ + /** \brief Coordinate system used to describe position points of this location. Default: 0 */ + CIMPP::CoordinateSystem* CoordinateSystem; + + /** \brief Sequence of position points describing this location, expressed in coordinate system `Location.CoordinateSystem`. Default: 0 */ + std::list PositionPoints; + + /** \brief All power system resources at this location. Default: 0 */ + CIMPP::PowerSystemResource* PowerSystemResources; + + /** \brief Main address of the location. Default: nullptr */ + CIMPP::StreetAddress* mainAddress; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Measurement.cpp b/CGMES_3.0.0/Measurement.cpp index 92185d0cd..4cc0502af 100644 --- a/CGMES_3.0.0/Measurement.cpp +++ b/CGMES_3.0.0/Measurement.cpp @@ -8,17 +8,13 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PowerSystemResource.hpp" #include "ACDCTerminal.hpp" -#include "String.hpp" -#include "PhaseCode.hpp" -#include "UnitMultiplier.hpp" -#include "UnitSymbol.hpp" +#include "PowerSystemResource.hpp" using namespace CIMPP; -Measurement::Measurement() : PowerSystemResource(nullptr), Terminal(nullptr) {}; -Measurement::~Measurement() {}; +Measurement::Measurement() : PowerSystemResource(nullptr), Terminal(nullptr) {} +Measurement::~Measurement() {} static const std::list PossibleProfilesForClass = { @@ -50,111 +46,100 @@ Measurement::getPossibleProfilesForAttributes() const return map; } - -bool assign_Measurement_measurementType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerSystemResource_Measurements(BaseClass*, BaseClass*); +bool assign_Measurement_PowerSystemResource(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (Measurement* element = dynamic_cast(BaseClass_ptr1)) + Measurement* element = dynamic_cast(BaseClass_ptr1); + PowerSystemResource* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - element->measurementType = buffer.str(); - if (buffer.fail()) - return false; - else - return true; + if (element->PowerSystemResource != element2) + { + element->PowerSystemResource = element2; + return assign_PowerSystemResource_Measurements(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_Measurement_phases(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ACDCTerminal_Measurements(BaseClass*, BaseClass*); +bool assign_Measurement_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (Measurement* element = dynamic_cast(BaseClass_ptr1)) + Measurement* element = dynamic_cast(BaseClass_ptr1); + ACDCTerminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->phases; - if (buffer.fail()) - return false; - else - return true; + if (element->Terminal != element2) + { + element->Terminal = element2; + return assign_ACDCTerminal_Measurements(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_Measurement_unitMultiplier(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Measurement_measurementType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Measurement* element = dynamic_cast(BaseClass_ptr1)) + Measurement* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->unitMultiplier; - if (buffer.fail()) - return false; - else + element->measurementType = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Measurement_unitSymbol(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (Measurement* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->unitSymbol; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - -bool assign_PowerSystemResource_Measurements(BaseClass*, BaseClass*); -bool assign_Measurement_PowerSystemResource(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_Measurement_phases(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { Measurement* element = dynamic_cast(BaseClass_ptr1); - PowerSystemResource* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->PowerSystemResource != element2) + buffer >> element->phases; + if (!buffer.fail()) { - element->PowerSystemResource = element2; - return assign_PowerSystemResource_Measurements(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_ACDCTerminal_Measurements(BaseClass*, BaseClass*); -bool assign_Measurement_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_Measurement_unitMultiplier(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { Measurement* element = dynamic_cast(BaseClass_ptr1); - ACDCTerminal* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->Terminal != element2) + buffer >> element->unitMultiplier; + if (!buffer.fail()) { - element->Terminal = element2; - return assign_ACDCTerminal_Measurements(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool get_Measurement_measurementType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_Measurement_unitSymbol(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const Measurement* element = dynamic_cast(BaseClass_ptr1)) + Measurement* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->measurementType; - if (!buffer.str().empty()) + buffer >> element->unitSymbol; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_Measurement_PowerSystemResource(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Measurement* element = dynamic_cast(BaseClass_ptr1)) + const Measurement* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PowerSystemResource != 0) { @@ -167,7 +152,8 @@ bool get_Measurement_PowerSystemResource(const BaseClass* BaseClass_ptr1, std::l bool get_Measurement_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Measurement* element = dynamic_cast(BaseClass_ptr1)) + const Measurement* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Terminal != 0) { @@ -178,10 +164,25 @@ bool get_Measurement_Terminal(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->measurementType; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} bool get_Measurement_phases(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Measurement* element = dynamic_cast(BaseClass_ptr1)) + const Measurement* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->phases; if (!buffer.str().empty()) @@ -195,7 +196,8 @@ bool get_Measurement_phases(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_Measurement_unitMultiplier(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Measurement* element = dynamic_cast(BaseClass_ptr1)) + const Measurement* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->unitMultiplier; if (!buffer.str().empty()) @@ -209,7 +211,8 @@ bool get_Measurement_unitMultiplier(const BaseClass* BaseClass_ptr1, std::string bool get_Measurement_unitSymbol(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Measurement* element = dynamic_cast(BaseClass_ptr1)) + const Measurement* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->unitSymbol; if (!buffer.str().empty()) @@ -229,21 +232,21 @@ const char* Measurement::debugString() const void Measurement::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Measurement"), &Measurement_factory)); + factory_map.emplace("cim:Measurement", &Measurement_factory); } void Measurement::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Measurement.measurementType"), &assign_Measurement_measurementType)); - assign_map.insert(std::make_pair(std::string("cim:Measurement.phases"), &assign_Measurement_phases)); - assign_map.insert(std::make_pair(std::string("cim:Measurement.unitMultiplier"), &assign_Measurement_unitMultiplier)); - assign_map.insert(std::make_pair(std::string("cim:Measurement.unitSymbol"), &assign_Measurement_unitSymbol)); + assign_map.emplace("cim:Measurement.measurementType", &assign_Measurement_measurementType); + assign_map.emplace("cim:Measurement.phases", &assign_Measurement_phases); + assign_map.emplace("cim:Measurement.unitMultiplier", &assign_Measurement_unitMultiplier); + assign_map.emplace("cim:Measurement.unitSymbol", &assign_Measurement_unitSymbol); } void Measurement::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Measurement.PowerSystemResource"), &assign_Measurement_PowerSystemResource)); - assign_map.insert(std::make_pair(std::string("cim:Measurement.Terminal"), &assign_Measurement_Terminal)); + assign_map.emplace("cim:Measurement.PowerSystemResource", &assign_Measurement_PowerSystemResource); + assign_map.emplace("cim:Measurement.Terminal", &assign_Measurement_Terminal); } void Measurement::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/Measurement.hpp b/CGMES_3.0.0/Measurement.hpp index 8e930e7cd..e5da18773 100644 --- a/CGMES_3.0.0/Measurement.hpp +++ b/CGMES_3.0.0/Measurement.hpp @@ -22,9 +22,7 @@ namespace CIMPP class ACDCTerminal; class PowerSystemResource; - /* - A Measurement represents any measured, calculated or non-measured non-calculated quantity. Any piece of equipment may contain Measurements, e.g. a substation may have temperature measurements and door open indications, a transformer may have oil temperature and tank pressure measurements, a bay may contain a number of power flow measurements and a Breaker may contain a switch status measurement. The PSR - Measurement association is intended to capture this use of Measurement and is included in the naming hierarchy based on EquipmentContainer. The naming hierarchy typically has Measurements as leaves, e.g. Substation-VoltageLevel-Bay-Switch-Measurement. Some Measurements represent quantities related to a particular sensor location in the network, e.g. a voltage transformer (VT) or potential transformer (PT) at a busbar or a current transformer (CT) at the bar between a breaker and an isolator. The sensing position is not captured in the PSR - Measurement association. Instead it is captured by the Measurement - Terminal association that is used to define the sensing location in the network topology. The location is defined by the connection of the Terminal to ConductingEquipment. If both a Terminal and PSR are associated, and the PSR is of type ConductingEquipment, the associated Terminal should belong to that ConductingEquipment instance. When the sensor location is needed both Measurement-PSR and Measurement-Terminal are used. The Measurement-Terminal association is never used alone. - */ + /** \brief A Measurement represents any measured, calculated or non-measured non-calculated quantity. Any piece of equipment may contain Measurements, e.g. a substation may have temperature measurements and door open indications, a transformer may have oil temperature and tank pressure measurements, a bay may contain a number of power flow measurements and a Breaker may contain a switch status measurement. The PSR - Measurement association is intended to capture this use of Measurement and is included in the naming hierarchy based on EquipmentContainer. The naming hierarchy typically has Measurements as leaves, e.g. Substation-VoltageLevel-Bay-Switch-Measurement. Some Measurements represent quantities related to a particular sensor location in the network, e.g. a voltage transformer (VT) or potential transformer (PT) at a busbar or a current transformer (CT) at the bar between a breaker and an isolator. The sensing position is not captured in the PSR - Measurement association. Instead it is captured by the Measurement - Terminal association that is used to define the sensing location in the network topology. The location is defined by the connection of the Terminal to ConductingEquipment. If both a Terminal and PSR are associated, and the PSR is of type ConductingEquipment, the associated Terminal should belong to that ConductingEquipment instance. When the sensor location is needed both Measurement-PSR and Measurement-Terminal are used. The Measurement-Terminal association is never used alone. */ class Measurement : public IdentifiedObject { public: @@ -32,12 +30,23 @@ namespace CIMPP Measurement(); ~Measurement() override; - CIMPP::PowerSystemResource* PowerSystemResource; /* The power system resource that contains the measurement. Default: 0 */ - CIMPP::ACDCTerminal* Terminal; /* One or more measurements may be associated with a terminal in the network. Default: 0 */ - CIMPP::String measurementType; /* Specifies the type of measurement. For example, this specifies if the measurement represents an indoor temperature, outdoor temperature, bus voltage, line flow, etc. When the measurementType is set to `Specialization`, the type of Measurement is defined in more detail by the specialized class which inherits from Measurement. Default: '' */ - CIMPP::PhaseCode phases; /* Indicates to which phases the measurement applies and avoids the need to use `measurementType` to also encode phase information (which would explode the types). The phase information in Measurement, along with `measurementType` and `phases` uniquely defines a Measurement for a device, based on normal network phase. Their meaning will not change when the computed energizing phasing is changed due to jumpers or other reasons. If the attribute is missing three phases (ABC) shall be assumed. Default: 0 */ - CIMPP::UnitMultiplier unitMultiplier; /* The unit multiplier of the measured quantity. Default: 0 */ - CIMPP::UnitSymbol unitSymbol; /* The unit of measure of the measured quantity. Default: 0 */ + /** \brief The power system resource that contains the measurement. Default: 0 */ + CIMPP::PowerSystemResource* PowerSystemResource; + + /** \brief One or more measurements may be associated with a terminal in the network. Default: 0 */ + CIMPP::ACDCTerminal* Terminal; + + /** \brief Specifies the type of measurement. For example, this specifies if the measurement represents an indoor temperature, outdoor temperature, bus voltage, line flow, etc. When the measurementType is set to `Specialization`, the type of Measurement is defined in more detail by the specialized class which inherits from Measurement. Default: '' */ + CIMPP::String measurementType; + + /** \brief Indicates to which phases the measurement applies and avoids the need to use `measurementType` to also encode phase information (which would explode the types). The phase information in Measurement, along with `measurementType` and `phases` uniquely defines a Measurement for a device, based on normal network phase. Their meaning will not change when the computed energizing phasing is changed due to jumpers or other reasons. If the attribute is missing three phases (ABC) shall be assumed. Default: 0 */ + CIMPP::PhaseCode phases; + + /** \brief The unit multiplier of the measured quantity. Default: 0 */ + CIMPP::UnitMultiplier unitMultiplier; + + /** \brief The unit of measure of the measured quantity. Default: 0 */ + CIMPP::UnitSymbol unitSymbol; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/MeasurementValue.cpp b/CGMES_3.0.0/MeasurementValue.cpp index d2bad0f7b..e5676b5a2 100644 --- a/CGMES_3.0.0/MeasurementValue.cpp +++ b/CGMES_3.0.0/MeasurementValue.cpp @@ -10,13 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "MeasurementValueQuality.hpp" #include "MeasurementValueSource.hpp" -#include "PerCent.hpp" -#include "DateTime.hpp" using namespace CIMPP; -MeasurementValue::MeasurementValue() : MeasurementValueQuality(nullptr), MeasurementValueSource(nullptr) {}; -MeasurementValue::~MeasurementValue() {}; +MeasurementValue::MeasurementValue() : MeasurementValueQuality(nullptr), MeasurementValueSource(nullptr) {} +MeasurementValue::~MeasurementValue() {} static const std::list PossibleProfilesForClass = { @@ -46,34 +44,6 @@ MeasurementValue::getPossibleProfilesForAttributes() const return map; } - -bool assign_MeasurementValue_sensorAccuracy(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (MeasurementValue* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->sensorAccuracy; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_MeasurementValue_timeStamp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (MeasurementValue* element = dynamic_cast(BaseClass_ptr1)) - { - element->timeStamp = buffer.str(); - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_MeasurementValueQuality_MeasurementValue(BaseClass*, BaseClass*); bool assign_MeasurementValue_MeasurementValueQuality(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -90,6 +60,7 @@ bool assign_MeasurementValue_MeasurementValueQuality(BaseClass* BaseClass_ptr1, } return false; } + bool assign_MeasurementValueSource_MeasurementValues(BaseClass*, BaseClass*); bool assign_MeasurementValue_MeasurementValueSource(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -107,38 +78,39 @@ bool assign_MeasurementValue_MeasurementValueSource(BaseClass* BaseClass_ptr1, B return false; } -bool get_MeasurementValue_sensorAccuracy(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_MeasurementValue_sensorAccuracy(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const MeasurementValue* element = dynamic_cast(BaseClass_ptr1)) + MeasurementValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->sensorAccuracy; - if (!buffer.str().empty()) + buffer >> element->sensorAccuracy; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_MeasurementValue_timeStamp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_MeasurementValue_timeStamp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const MeasurementValue* element = dynamic_cast(BaseClass_ptr1)) + MeasurementValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->timeStamp; - if (!buffer.str().empty()) + element->timeStamp = buffer.str(); + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } bool get_MeasurementValue_MeasurementValueSource(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const MeasurementValue* element = dynamic_cast(BaseClass_ptr1)) + const MeasurementValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->MeasurementValueSource != 0) { @@ -149,6 +121,35 @@ bool get_MeasurementValue_MeasurementValueSource(const BaseClass* BaseClass_ptr1 return false; } +bool get_MeasurementValue_sensorAccuracy(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const MeasurementValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->sensorAccuracy; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_MeasurementValue_timeStamp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const MeasurementValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->timeStamp; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char MeasurementValue::debugName[] = "MeasurementValue"; const char* MeasurementValue::debugString() const @@ -158,19 +159,19 @@ const char* MeasurementValue::debugString() const void MeasurementValue::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:MeasurementValue"), &MeasurementValue_factory)); + factory_map.emplace("cim:MeasurementValue", &MeasurementValue_factory); } void MeasurementValue::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MeasurementValue.sensorAccuracy"), &assign_MeasurementValue_sensorAccuracy)); - assign_map.insert(std::make_pair(std::string("cim:MeasurementValue.timeStamp"), &assign_MeasurementValue_timeStamp)); + assign_map.emplace("cim:MeasurementValue.sensorAccuracy", &assign_MeasurementValue_sensorAccuracy); + assign_map.emplace("cim:MeasurementValue.timeStamp", &assign_MeasurementValue_timeStamp); } void MeasurementValue::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MeasurementValue.MeasurementValueQuality"), &assign_MeasurementValue_MeasurementValueQuality)); - assign_map.insert(std::make_pair(std::string("cim:MeasurementValue.MeasurementValueSource"), &assign_MeasurementValue_MeasurementValueSource)); + assign_map.emplace("cim:MeasurementValue.MeasurementValueQuality", &assign_MeasurementValue_MeasurementValueQuality); + assign_map.emplace("cim:MeasurementValue.MeasurementValueSource", &assign_MeasurementValue_MeasurementValueSource); } void MeasurementValue::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/MeasurementValue.hpp b/CGMES_3.0.0/MeasurementValue.hpp index 7cbc0cff2..bab8f4a5c 100644 --- a/CGMES_3.0.0/MeasurementValue.hpp +++ b/CGMES_3.0.0/MeasurementValue.hpp @@ -20,9 +20,7 @@ namespace CIMPP class MeasurementValueQuality; class MeasurementValueSource; - /* - The current state for a measurement. A state value is an instance of a measurement from a specific source. Measurements can be associated with many state values, each representing a different source for the measurement. - */ + /** \brief The current state for a measurement. A state value is an instance of a measurement from a specific source. Measurements can be associated with many state values, each representing a different source for the measurement. */ class MeasurementValue : public IOPoint { public: @@ -30,10 +28,17 @@ namespace CIMPP MeasurementValue(); ~MeasurementValue() override; - CIMPP::MeasurementValueQuality* MeasurementValueQuality; /* A MeasurementValue has a MeasurementValueQuality associated with it. Default: 0 */ - CIMPP::MeasurementValueSource* MeasurementValueSource; /* A reference to the type of source that updates the MeasurementValue, e.g. SCADA, CCLink, manual, etc. User conventions for the names of sources are contained in the introduction to IEC 61970-301. Default: 0 */ - CIMPP::PerCent sensorAccuracy; /* The limit, expressed as a percentage of the sensor maximum, that errors will not exceed when the sensor is used under reference conditions. Default: nullptr */ - CIMPP::DateTime timeStamp; /* The time when the value was last updated. Default: '' */ + /** \brief A MeasurementValue has a MeasurementValueQuality associated with it. Default: 0 */ + CIMPP::MeasurementValueQuality* MeasurementValueQuality; + + /** \brief A reference to the type of source that updates the MeasurementValue, e.g. SCADA, CCLink, manual, etc. User conventions for the names of sources are contained in the introduction to IEC 61970-301. Default: 0 */ + CIMPP::MeasurementValueSource* MeasurementValueSource; + + /** \brief The limit, expressed as a percentage of the sensor maximum, that errors will not exceed when the sensor is used under reference conditions. Default: nullptr */ + CIMPP::PerCent sensorAccuracy; + + /** \brief The time when the value was last updated. Default: '' */ + CIMPP::DateTime timeStamp; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/MeasurementValueQuality.cpp b/CGMES_3.0.0/MeasurementValueQuality.cpp index 2816742f1..39afb2eaf 100644 --- a/CGMES_3.0.0/MeasurementValueQuality.cpp +++ b/CGMES_3.0.0/MeasurementValueQuality.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -MeasurementValueQuality::MeasurementValueQuality() : MeasurementValue(nullptr) {}; -MeasurementValueQuality::~MeasurementValueQuality() {}; +MeasurementValueQuality::MeasurementValueQuality() : MeasurementValue(nullptr) {} +MeasurementValueQuality::~MeasurementValueQuality() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ MeasurementValueQuality::getPossibleProfilesForAttributes() const return map; } - - bool assign_MeasurementValue_MeasurementValueQuality(BaseClass*, BaseClass*); bool assign_MeasurementValueQuality_MeasurementValue(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_MeasurementValueQuality_MeasurementValue(BaseClass* BaseClass_ptr1, return false; } - bool get_MeasurementValueQuality_MeasurementValue(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const MeasurementValueQuality* element = dynamic_cast(BaseClass_ptr1)) + const MeasurementValueQuality* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->MeasurementValue != 0) { @@ -73,7 +71,6 @@ bool get_MeasurementValueQuality_MeasurementValue(const BaseClass* BaseClass_ptr return false; } - const char MeasurementValueQuality::debugName[] = "MeasurementValueQuality"; const char* MeasurementValueQuality::debugString() const { @@ -82,7 +79,7 @@ const char* MeasurementValueQuality::debugString() const void MeasurementValueQuality::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:MeasurementValueQuality"), &MeasurementValueQuality_factory)); + factory_map.emplace("cim:MeasurementValueQuality", &MeasurementValueQuality_factory); } void MeasurementValueQuality::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void MeasurementValueQuality::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MeasurementValueQuality.MeasurementValue"), &assign_MeasurementValueQuality_MeasurementValue)); + assign_map.emplace("cim:MeasurementValueQuality.MeasurementValue", &assign_MeasurementValueQuality_MeasurementValue); } void MeasurementValueQuality::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/MeasurementValueQuality.hpp b/CGMES_3.0.0/MeasurementValueQuality.hpp index acaeb5c9d..65501a9b1 100644 --- a/CGMES_3.0.0/MeasurementValueQuality.hpp +++ b/CGMES_3.0.0/MeasurementValueQuality.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class MeasurementValue; - /* - Measurement quality flags. Bits 0-10 are defined for substation automation in IEC 61850-7-3. Bits 11-15 are reserved for future expansion by that document. Bits 16-31 are reserved for EMS applications. - */ + /** \brief Measurement quality flags. Bits 0-10 are defined for substation automation in IEC 61850-7-3. Bits 11-15 are reserved for future expansion by that document. Bits 16-31 are reserved for EMS applications. */ class MeasurementValueQuality : public Quality61850 { public: @@ -27,7 +25,8 @@ namespace CIMPP MeasurementValueQuality(); ~MeasurementValueQuality() override; - CIMPP::MeasurementValue* MeasurementValue; /* A MeasurementValue has a MeasurementValueQuality associated with it. Default: 0 */ + /** \brief A MeasurementValue has a MeasurementValueQuality associated with it. Default: 0 */ + CIMPP::MeasurementValue* MeasurementValue; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/MeasurementValueSource.cpp b/CGMES_3.0.0/MeasurementValueSource.cpp index 556f26373..a5c2f92cf 100644 --- a/CGMES_3.0.0/MeasurementValueSource.cpp +++ b/CGMES_3.0.0/MeasurementValueSource.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -MeasurementValueSource::MeasurementValueSource() {}; -MeasurementValueSource::~MeasurementValueSource() {}; +MeasurementValueSource::MeasurementValueSource() {} +MeasurementValueSource::~MeasurementValueSource() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ MeasurementValueSource::getPossibleProfilesForAttributes() const return map; } - - bool assign_MeasurementValue_MeasurementValueSource(BaseClass*, BaseClass*); bool assign_MeasurementValueSource_MeasurementValues(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_MeasurementValueSource_MeasurementValues(BaseClass* BaseClass_ptr1, } - const char MeasurementValueSource::debugName[] = "MeasurementValueSource"; const char* MeasurementValueSource::debugString() const { @@ -69,7 +66,7 @@ const char* MeasurementValueSource::debugString() const void MeasurementValueSource::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:MeasurementValueSource"), &MeasurementValueSource_factory)); + factory_map.emplace("cim:MeasurementValueSource", &MeasurementValueSource_factory); } void MeasurementValueSource::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void MeasurementValueSource::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MeasurementValueSource.MeasurementValues"), &assign_MeasurementValueSource_MeasurementValues)); + assign_map.emplace("cim:MeasurementValueSource.MeasurementValues", &assign_MeasurementValueSource_MeasurementValues); } void MeasurementValueSource::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/MeasurementValueSource.hpp b/CGMES_3.0.0/MeasurementValueSource.hpp index 57fdc5f06..22c7fa690 100644 --- a/CGMES_3.0.0/MeasurementValueSource.hpp +++ b/CGMES_3.0.0/MeasurementValueSource.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class MeasurementValue; - /* - MeasurementValueSource describes the alternative sources updating a MeasurementValue. User conventions for how to use the MeasurementValueSource attributes are defined in IEC 61970-301. - */ + /** \brief MeasurementValueSource describes the alternative sources updating a MeasurementValue. User conventions for how to use the MeasurementValueSource attributes are defined in IEC 61970-301. */ class MeasurementValueSource : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP MeasurementValueSource(); ~MeasurementValueSource() override; - std::list MeasurementValues; /* The MeasurementValues updated by the source. Default: 0 */ + /** \brief The MeasurementValues updated by the source. Default: 0 */ + std::list MeasurementValues; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/MechLoad1.cpp b/CGMES_3.0.0/MechLoad1.cpp index cc135e94c..7016b3c19 100644 --- a/CGMES_3.0.0/MechLoad1.cpp +++ b/CGMES_3.0.0/MechLoad1.cpp @@ -8,15 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" using namespace CIMPP; -MechLoad1::MechLoad1() {}; -MechLoad1::~MechLoad1() {}; +MechLoad1::MechLoad1() {} +MechLoad1::~MechLoad1() {} static const std::list PossibleProfilesForClass = { @@ -46,64 +42,66 @@ MechLoad1::getPossibleProfilesForAttributes() const return map; } - -bool assign_MechLoad1_a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MechLoad1_a(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + MechLoad1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MechLoad1_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MechLoad1_b(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + MechLoad1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MechLoad1_d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MechLoad1_d(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + MechLoad1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->d; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MechLoad1_e(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MechLoad1_e(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + MechLoad1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->e; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_MechLoad1_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + const MechLoad1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a; if (!buffer.str().empty()) @@ -117,7 +115,8 @@ bool get_MechLoad1_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_MechLoad1_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + const MechLoad1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b; if (!buffer.str().empty()) @@ -131,7 +130,8 @@ bool get_MechLoad1_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_MechLoad1_d(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + const MechLoad1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->d; if (!buffer.str().empty()) @@ -145,7 +145,8 @@ bool get_MechLoad1_d(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_MechLoad1_e(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MechLoad1* element = dynamic_cast(BaseClass_ptr1)) + const MechLoad1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->e; if (!buffer.str().empty()) @@ -157,8 +158,6 @@ bool get_MechLoad1_e(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char MechLoad1::debugName[] = "MechLoad1"; const char* MechLoad1::debugString() const { @@ -167,15 +166,15 @@ const char* MechLoad1::debugString() const void MechLoad1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:MechLoad1"), &MechLoad1_factory)); + factory_map.emplace("cim:MechLoad1", &MechLoad1_factory); } void MechLoad1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MechLoad1.a"), &assign_MechLoad1_a)); - assign_map.insert(std::make_pair(std::string("cim:MechLoad1.b"), &assign_MechLoad1_b)); - assign_map.insert(std::make_pair(std::string("cim:MechLoad1.d"), &assign_MechLoad1_d)); - assign_map.insert(std::make_pair(std::string("cim:MechLoad1.e"), &assign_MechLoad1_e)); + assign_map.emplace("cim:MechLoad1.a", &assign_MechLoad1_a); + assign_map.emplace("cim:MechLoad1.b", &assign_MechLoad1_b); + assign_map.emplace("cim:MechLoad1.d", &assign_MechLoad1_d); + assign_map.emplace("cim:MechLoad1.e", &assign_MechLoad1_e); } void MechLoad1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/MechLoad1.hpp b/CGMES_3.0.0/MechLoad1.hpp index 95f7a15e2..ed9daaeeb 100644 --- a/CGMES_3.0.0/MechLoad1.hpp +++ b/CGMES_3.0.0/MechLoad1.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Mechanical load model type 1. - */ + /** \brief Mechanical load model type 1. */ class MechLoad1 : public MechanicalLoadDynamics { public: @@ -27,10 +25,17 @@ namespace CIMPP MechLoad1(); ~MechLoad1() override; - CIMPP::Float a; /* Speed squared coefficient (<i>a</i>). Default: 0.0 */ - CIMPP::Float b; /* Speed coefficient (<i>b</i>). Default: 0.0 */ - CIMPP::Float d; /* Speed to the exponent coefficient (<i>d</i>). Default: 0.0 */ - CIMPP::Float e; /* Exponent (<i>e</i>). Default: 0.0 */ + /** \brief Speed squared coefficient (<i>a</i>). Default: 0.0 */ + CIMPP::Float a; + + /** \brief Speed coefficient (<i>b</i>). Default: 0.0 */ + CIMPP::Float b; + + /** \brief Speed to the exponent coefficient (<i>d</i>). Default: 0.0 */ + CIMPP::Float d; + + /** \brief Exponent (<i>e</i>). Default: 0.0 */ + CIMPP::Float e; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/MechanicalLoadDynamics.cpp b/CGMES_3.0.0/MechanicalLoadDynamics.cpp index 2235d8b48..dc44cac2d 100644 --- a/CGMES_3.0.0/MechanicalLoadDynamics.cpp +++ b/CGMES_3.0.0/MechanicalLoadDynamics.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -MechanicalLoadDynamics::MechanicalLoadDynamics() : AsynchronousMachineDynamics(nullptr), SynchronousMachineDynamics(nullptr) {}; -MechanicalLoadDynamics::~MechanicalLoadDynamics() {}; +MechanicalLoadDynamics::MechanicalLoadDynamics() : AsynchronousMachineDynamics(nullptr), SynchronousMachineDynamics(nullptr) {} +MechanicalLoadDynamics::~MechanicalLoadDynamics() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ MechanicalLoadDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_AsynchronousMachineDynamics_MechanicalLoadDynamics(BaseClass*, BaseClass*); bool assign_MechanicalLoadDynamics_AsynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_MechanicalLoadDynamics_AsynchronousMachineDynamics(BaseClass* BaseCl } return false; } + bool assign_SynchronousMachineDynamics_MechanicalLoadDynamics(BaseClass*, BaseClass*); bool assign_MechanicalLoadDynamics_SynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_MechanicalLoadDynamics_SynchronousMachineDynamics(BaseClass* BaseCla return false; } - bool get_MechanicalLoadDynamics_AsynchronousMachineDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const MechanicalLoadDynamics* element = dynamic_cast(BaseClass_ptr1)) + const MechanicalLoadDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->AsynchronousMachineDynamics != 0) { @@ -93,7 +92,8 @@ bool get_MechanicalLoadDynamics_AsynchronousMachineDynamics(const BaseClass* Bas bool get_MechanicalLoadDynamics_SynchronousMachineDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const MechanicalLoadDynamics* element = dynamic_cast(BaseClass_ptr1)) + const MechanicalLoadDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->SynchronousMachineDynamics != 0) { @@ -104,7 +104,6 @@ bool get_MechanicalLoadDynamics_SynchronousMachineDynamics(const BaseClass* Base return false; } - const char MechanicalLoadDynamics::debugName[] = "MechanicalLoadDynamics"; const char* MechanicalLoadDynamics::debugString() const { @@ -113,7 +112,7 @@ const char* MechanicalLoadDynamics::debugString() const void MechanicalLoadDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:MechanicalLoadDynamics"), &MechanicalLoadDynamics_factory)); + factory_map.emplace("cim:MechanicalLoadDynamics", &MechanicalLoadDynamics_factory); } void MechanicalLoadDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void MechanicalLoadDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MechanicalLoadDynamics.AsynchronousMachineDynamics"), &assign_MechanicalLoadDynamics_AsynchronousMachineDynamics)); - assign_map.insert(std::make_pair(std::string("cim:MechanicalLoadDynamics.SynchronousMachineDynamics"), &assign_MechanicalLoadDynamics_SynchronousMachineDynamics)); + assign_map.emplace("cim:MechanicalLoadDynamics.AsynchronousMachineDynamics", &assign_MechanicalLoadDynamics_AsynchronousMachineDynamics); + assign_map.emplace("cim:MechanicalLoadDynamics.SynchronousMachineDynamics", &assign_MechanicalLoadDynamics_SynchronousMachineDynamics); } void MechanicalLoadDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/MechanicalLoadDynamics.hpp b/CGMES_3.0.0/MechanicalLoadDynamics.hpp index 68c4eb77c..a1de52cb1 100644 --- a/CGMES_3.0.0/MechanicalLoadDynamics.hpp +++ b/CGMES_3.0.0/MechanicalLoadDynamics.hpp @@ -18,9 +18,7 @@ namespace CIMPP class AsynchronousMachineDynamics; class SynchronousMachineDynamics; - /* - Mechanical load function block whose behaviour is described by reference to a standard model or by definition of a user-defined model. - */ + /** \brief Mechanical load function block whose behaviour is described by reference to a standard model or by definition of a user-defined model. */ class MechanicalLoadDynamics : public DynamicsFunctionBlock { public: @@ -28,8 +26,11 @@ namespace CIMPP MechanicalLoadDynamics(); ~MechanicalLoadDynamics() override; - CIMPP::AsynchronousMachineDynamics* AsynchronousMachineDynamics; /* Asynchronous machine model with which this mechanical load model is associated. MechanicalLoadDynamics shall have either an association to SynchronousMachineDynamics or to AsynchronousMachineDynamics. Default: 0 */ - CIMPP::SynchronousMachineDynamics* SynchronousMachineDynamics; /* Synchronous machine model with which this mechanical load model is associated. MechanicalLoadDynamics shall have either an association to SynchronousMachineDynamics or AsynchronousMachineDyanmics. Default: 0 */ + /** \brief Asynchronous machine model with which this mechanical load model is associated. MechanicalLoadDynamics shall have either an association to SynchronousMachineDynamics or to AsynchronousMachineDynamics. Default: 0 */ + CIMPP::AsynchronousMachineDynamics* AsynchronousMachineDynamics; + + /** \brief Synchronous machine model with which this mechanical load model is associated. MechanicalLoadDynamics shall have either an association to SynchronousMachineDynamics or AsynchronousMachineDyanmics. Default: 0 */ + CIMPP::SynchronousMachineDynamics* SynchronousMachineDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/MechanicalLoadUserDefined.cpp b/CGMES_3.0.0/MechanicalLoadUserDefined.cpp index e750697ad..0fcdb6dee 100644 --- a/CGMES_3.0.0/MechanicalLoadUserDefined.cpp +++ b/CGMES_3.0.0/MechanicalLoadUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -MechanicalLoadUserDefined::MechanicalLoadUserDefined() {}; -MechanicalLoadUserDefined::~MechanicalLoadUserDefined() {}; +MechanicalLoadUserDefined::MechanicalLoadUserDefined() {} +MechanicalLoadUserDefined::~MechanicalLoadUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ MechanicalLoadUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_MechanicalLoadUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (MechanicalLoadUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_MechanicalLoadUserDefined(BaseClass*, BaseClass*); bool assign_MechanicalLoadUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_MechanicalLoadUserDefined_ProprietaryParameterDynamics(BaseClass* Ba return false; } +bool assign_MechanicalLoadUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + MechanicalLoadUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_MechanicalLoadUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MechanicalLoadUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const MechanicalLoadUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_MechanicalLoadUserDefined_proprietary(const BaseClass* BaseClass_ptr1, return false; } - - const char MechanicalLoadUserDefined::debugName[] = "MechanicalLoadUserDefined"; const char* MechanicalLoadUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* MechanicalLoadUserDefined::debugString() const void MechanicalLoadUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:MechanicalLoadUserDefined"), &MechanicalLoadUserDefined_factory)); + factory_map.emplace("cim:MechanicalLoadUserDefined", &MechanicalLoadUserDefined_factory); } void MechanicalLoadUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MechanicalLoadUserDefined.proprietary"), &assign_MechanicalLoadUserDefined_proprietary)); + assign_map.emplace("cim:MechanicalLoadUserDefined.proprietary", &assign_MechanicalLoadUserDefined_proprietary); } void MechanicalLoadUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MechanicalLoadUserDefined.ProprietaryParameterDynamics"), &assign_MechanicalLoadUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:MechanicalLoadUserDefined.ProprietaryParameterDynamics", &assign_MechanicalLoadUserDefined_ProprietaryParameterDynamics); } void MechanicalLoadUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/MechanicalLoadUserDefined.hpp b/CGMES_3.0.0/MechanicalLoadUserDefined.hpp index aaed2e5a4..9bdf138c7 100644 --- a/CGMES_3.0.0/MechanicalLoadUserDefined.hpp +++ b/CGMES_3.0.0/MechanicalLoadUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Mechanical load function block whose dynamic behaviour is described by a user-defined model. - */ + /** \brief Mechanical load function block whose dynamic behaviour is described by a user-defined model. */ class MechanicalLoadUserDefined : public MechanicalLoadDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP MechanicalLoadUserDefined(); ~MechanicalLoadUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Money.hpp b/CGMES_3.0.0/Money.hpp index b6c47f743..5a75488fd 100644 --- a/CGMES_3.0.0/Money.hpp +++ b/CGMES_3.0.0/Money.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Amount of money. - */ + /** \brief Amount of money. */ class Money { public: diff --git a/CGMES_3.0.0/MonthDay.hpp b/CGMES_3.0.0/MonthDay.hpp index 1669168fe..ae83a209f 100644 --- a/CGMES_3.0.0/MonthDay.hpp +++ b/CGMES_3.0.0/MonthDay.hpp @@ -4,22 +4,20 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen */ -#include #include #include +#include namespace CIMPP { - /* - MonthDay format as "--mm-dd", which conforms with XSD data type gMonthDay. - */ + /** \brief MonthDay format as "--mm-dd", which conforms with XSD data type gMonthDay. */ class MonthDay { public: MonthDay() : initialized(false) {} MonthDay(const std::string& value) : value(value), initialized(true) {} - MonthDay& operator=(const std::string &rop); + MonthDay& operator=(const std::string& rop); operator std::string() const; std::string value; diff --git a/CGMES_3.0.0/MutualCoupling.cpp b/CGMES_3.0.0/MutualCoupling.cpp index 4ed5b9382..595f248cf 100644 --- a/CGMES_3.0.0/MutualCoupling.cpp +++ b/CGMES_3.0.0/MutualCoupling.cpp @@ -9,20 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "Terminal.hpp" -#include "Terminal.hpp" -#include "Susceptance.hpp" -#include "Length.hpp" -#include "Length.hpp" -#include "Length.hpp" -#include "Length.hpp" -#include "Conductance.hpp" -#include "Resistance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -MutualCoupling::MutualCoupling() : First_Terminal(nullptr), Second_Terminal(nullptr) {}; -MutualCoupling::~MutualCoupling() {}; +MutualCoupling::MutualCoupling() : First_Terminal(nullptr), Second_Terminal(nullptr) {} +MutualCoupling::~MutualCoupling() {} static const std::list PossibleProfilesForClass = { @@ -58,148 +49,184 @@ MutualCoupling::getPossibleProfilesForAttributes() const return map; } +bool assign_Terminal_HasFirstMutualCoupling(BaseClass*, BaseClass*); +bool assign_MutualCoupling_First_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->First_Terminal != element2) + { + element->First_Terminal = element2; + return assign_Terminal_HasFirstMutualCoupling(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_Terminal_HasSecondMutualCoupling(BaseClass*, BaseClass*); +bool assign_MutualCoupling_Second_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Second_Terminal != element2) + { + element->Second_Terminal = element2; + return assign_Terminal_HasSecondMutualCoupling(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_MutualCoupling_b0ch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MutualCoupling_b0ch(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b0ch; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MutualCoupling_distance11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MutualCoupling_distance11(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->distance11; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MutualCoupling_distance12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MutualCoupling_distance12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->distance12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MutualCoupling_distance21(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MutualCoupling_distance21(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->distance21; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MutualCoupling_distance22(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MutualCoupling_distance22(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->distance22; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MutualCoupling_g0ch(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MutualCoupling_g0ch(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g0ch; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MutualCoupling_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MutualCoupling_r0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_MutualCoupling_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_MutualCoupling_x0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_Terminal_HasFirstMutualCoupling(BaseClass*, BaseClass*); -bool assign_MutualCoupling_First_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_MutualCoupling_First_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - MutualCoupling* element = dynamic_cast(BaseClass_ptr1); - Terminal* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->First_Terminal != element2) + if (element->First_Terminal != 0) { - element->First_Terminal = element2; - return assign_Terminal_HasFirstMutualCoupling(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->First_Terminal); + return true; } - return true; } return false; } -bool assign_Terminal_HasSecondMutualCoupling(BaseClass*, BaseClass*); -bool assign_MutualCoupling_Second_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool get_MutualCoupling_Second_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - MutualCoupling* element = dynamic_cast(BaseClass_ptr1); - Terminal* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->Second_Terminal != element2) + if (element->Second_Terminal != 0) { - element->Second_Terminal = element2; - return assign_Terminal_HasSecondMutualCoupling(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->Second_Terminal); + return true; } - return true; } return false; } bool get_MutualCoupling_b0ch(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b0ch; if (!buffer.str().empty()) @@ -213,7 +240,8 @@ bool get_MutualCoupling_b0ch(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_MutualCoupling_distance11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->distance11; if (!buffer.str().empty()) @@ -227,7 +255,8 @@ bool get_MutualCoupling_distance11(const BaseClass* BaseClass_ptr1, std::strings bool get_MutualCoupling_distance12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->distance12; if (!buffer.str().empty()) @@ -241,7 +270,8 @@ bool get_MutualCoupling_distance12(const BaseClass* BaseClass_ptr1, std::strings bool get_MutualCoupling_distance21(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->distance21; if (!buffer.str().empty()) @@ -255,7 +285,8 @@ bool get_MutualCoupling_distance21(const BaseClass* BaseClass_ptr1, std::strings bool get_MutualCoupling_distance22(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->distance22; if (!buffer.str().empty()) @@ -269,7 +300,8 @@ bool get_MutualCoupling_distance22(const BaseClass* BaseClass_ptr1, std::strings bool get_MutualCoupling_g0ch(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g0ch; if (!buffer.str().empty()) @@ -283,7 +315,8 @@ bool get_MutualCoupling_g0ch(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_MutualCoupling_r0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r0; if (!buffer.str().empty()) @@ -297,7 +330,8 @@ bool get_MutualCoupling_r0(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_MutualCoupling_x0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) + const MutualCoupling* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x0; if (!buffer.str().empty()) @@ -309,34 +343,6 @@ bool get_MutualCoupling_x0(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - -bool get_MutualCoupling_First_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->First_Terminal != 0) - { - BaseClass_list.push_back(element->First_Terminal); - return true; - } - } - return false; -} - -bool get_MutualCoupling_Second_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const MutualCoupling* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->Second_Terminal != 0) - { - BaseClass_list.push_back(element->Second_Terminal); - return true; - } - } - return false; -} - - const char MutualCoupling::debugName[] = "MutualCoupling"; const char* MutualCoupling::debugString() const { @@ -345,25 +351,25 @@ const char* MutualCoupling::debugString() const void MutualCoupling::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:MutualCoupling"), &MutualCoupling_factory)); + factory_map.emplace("cim:MutualCoupling", &MutualCoupling_factory); } void MutualCoupling::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.b0ch"), &assign_MutualCoupling_b0ch)); - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.distance11"), &assign_MutualCoupling_distance11)); - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.distance12"), &assign_MutualCoupling_distance12)); - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.distance21"), &assign_MutualCoupling_distance21)); - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.distance22"), &assign_MutualCoupling_distance22)); - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.g0ch"), &assign_MutualCoupling_g0ch)); - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.r0"), &assign_MutualCoupling_r0)); - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.x0"), &assign_MutualCoupling_x0)); + assign_map.emplace("cim:MutualCoupling.b0ch", &assign_MutualCoupling_b0ch); + assign_map.emplace("cim:MutualCoupling.distance11", &assign_MutualCoupling_distance11); + assign_map.emplace("cim:MutualCoupling.distance12", &assign_MutualCoupling_distance12); + assign_map.emplace("cim:MutualCoupling.distance21", &assign_MutualCoupling_distance21); + assign_map.emplace("cim:MutualCoupling.distance22", &assign_MutualCoupling_distance22); + assign_map.emplace("cim:MutualCoupling.g0ch", &assign_MutualCoupling_g0ch); + assign_map.emplace("cim:MutualCoupling.r0", &assign_MutualCoupling_r0); + assign_map.emplace("cim:MutualCoupling.x0", &assign_MutualCoupling_x0); } void MutualCoupling::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.First_Terminal"), &assign_MutualCoupling_First_Terminal)); - assign_map.insert(std::make_pair(std::string("cim:MutualCoupling.Second_Terminal"), &assign_MutualCoupling_Second_Terminal)); + assign_map.emplace("cim:MutualCoupling.First_Terminal", &assign_MutualCoupling_First_Terminal); + assign_map.emplace("cim:MutualCoupling.Second_Terminal", &assign_MutualCoupling_Second_Terminal); } void MutualCoupling::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/MutualCoupling.hpp b/CGMES_3.0.0/MutualCoupling.hpp index a218d4c4a..00b130bed 100644 --- a/CGMES_3.0.0/MutualCoupling.hpp +++ b/CGMES_3.0.0/MutualCoupling.hpp @@ -22,9 +22,7 @@ namespace CIMPP { class Terminal; - /* - This class represents the zero sequence line mutual coupling. - */ + /** \brief This class represents the zero sequence line mutual coupling. */ class MutualCoupling : public IdentifiedObject { public: @@ -32,16 +30,35 @@ namespace CIMPP MutualCoupling(); ~MutualCoupling() override; - CIMPP::Terminal* First_Terminal; /* The starting terminal for the calculation of distances along the first branch of the mutual coupling. Normally MutualCoupling would only be used for terminals of AC line segments. The first and second terminals of a mutual coupling should point to different AC line segments. Default: 0 */ - CIMPP::Terminal* Second_Terminal; /* The starting terminal for the calculation of distances along the second branch of the mutual coupling. Default: 0 */ - CIMPP::Susceptance b0ch; /* Zero sequence mutual coupling shunt (charging) susceptance, uniformly distributed, of the entire line section. Default: nullptr */ - CIMPP::Length distance11; /* Distance to the start of the coupled region from the first line`s terminal having sequence number equal to 1. Default: nullptr */ - CIMPP::Length distance12; /* Distance to the end of the coupled region from the first line`s terminal with sequence number equal to 1. Default: nullptr */ - CIMPP::Length distance21; /* Distance to the start of coupled region from the second line`s terminal with sequence number equal to 1. Default: nullptr */ - CIMPP::Length distance22; /* Distance to the end of coupled region from the second line`s terminal with sequence number equal to 1. Default: nullptr */ - CIMPP::Conductance g0ch; /* Zero sequence mutual coupling shunt (charging) conductance, uniformly distributed, of the entire line section. Default: nullptr */ - CIMPP::Resistance r0; /* Zero sequence branch-to-branch mutual impedance coupling, resistance. Default: nullptr */ - CIMPP::Reactance x0; /* Zero sequence branch-to-branch mutual impedance coupling, reactance. Default: nullptr */ + /** \brief The starting terminal for the calculation of distances along the first branch of the mutual coupling. Normally MutualCoupling would only be used for terminals of AC line segments. The first and second terminals of a mutual coupling should point to different AC line segments. Default: 0 */ + CIMPP::Terminal* First_Terminal; + + /** \brief The starting terminal for the calculation of distances along the second branch of the mutual coupling. Default: 0 */ + CIMPP::Terminal* Second_Terminal; + + /** \brief Zero sequence mutual coupling shunt (charging) susceptance, uniformly distributed, of the entire line section. Default: nullptr */ + CIMPP::Susceptance b0ch; + + /** \brief Distance to the start of the coupled region from the first line`s terminal having sequence number equal to 1. Default: nullptr */ + CIMPP::Length distance11; + + /** \brief Distance to the end of the coupled region from the first line`s terminal with sequence number equal to 1. Default: nullptr */ + CIMPP::Length distance12; + + /** \brief Distance to the start of coupled region from the second line`s terminal with sequence number equal to 1. Default: nullptr */ + CIMPP::Length distance21; + + /** \brief Distance to the end of coupled region from the second line`s terminal with sequence number equal to 1. Default: nullptr */ + CIMPP::Length distance22; + + /** \brief Zero sequence mutual coupling shunt (charging) conductance, uniformly distributed, of the entire line section. Default: nullptr */ + CIMPP::Conductance g0ch; + + /** \brief Zero sequence branch-to-branch mutual impedance coupling, resistance. Default: nullptr */ + CIMPP::Resistance r0; + + /** \brief Zero sequence branch-to-branch mutual impedance coupling, reactance. Default: nullptr */ + CIMPP::Reactance x0; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/NonConformLoad.cpp b/CGMES_3.0.0/NonConformLoad.cpp index 23e687bdb..00d77b1ae 100644 --- a/CGMES_3.0.0/NonConformLoad.cpp +++ b/CGMES_3.0.0/NonConformLoad.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -NonConformLoad::NonConformLoad() : LoadGroup(nullptr) {}; -NonConformLoad::~NonConformLoad() {}; +NonConformLoad::NonConformLoad() : LoadGroup(nullptr) {} +NonConformLoad::~NonConformLoad() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ NonConformLoad::getPossibleProfilesForAttributes() const return map; } - - bool assign_NonConformLoadGroup_EnergyConsumers(BaseClass*, BaseClass*); bool assign_NonConformLoad_LoadGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,10 +58,10 @@ bool assign_NonConformLoad_LoadGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseC return false; } - bool get_NonConformLoad_LoadGroup(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const NonConformLoad* element = dynamic_cast(BaseClass_ptr1)) + const NonConformLoad* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->LoadGroup != 0) { @@ -74,7 +72,6 @@ bool get_NonConformLoad_LoadGroup(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:NonConformLoad"), &NonConformLoad_factory)); + factory_map.emplace("cim:NonConformLoad", &NonConformLoad_factory); } void NonConformLoad::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -92,7 +89,7 @@ void NonConformLoad::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:NonConformLoad.LoadGroup"), &assign_NonConformLoad_LoadGroup)); + assign_map.emplace("cim:NonConformLoad.LoadGroup", &assign_NonConformLoad_LoadGroup); } void NonConformLoad::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/NonConformLoad.hpp b/CGMES_3.0.0/NonConformLoad.hpp index c840c31ea..a24733afe 100644 --- a/CGMES_3.0.0/NonConformLoad.hpp +++ b/CGMES_3.0.0/NonConformLoad.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class NonConformLoadGroup; - /* - NonConformLoad represents loads that do not follow a daily load change pattern and whose changes are not correlated with the daily load change pattern. - */ + /** \brief NonConformLoad represents loads that do not follow a daily load change pattern and whose changes are not correlated with the daily load change pattern. */ class NonConformLoad : public EnergyConsumer { public: @@ -27,7 +25,8 @@ namespace CIMPP NonConformLoad(); ~NonConformLoad() override; - CIMPP::NonConformLoadGroup* LoadGroup; /* Group of this ConformLoad. Default: 0 */ + /** \brief Group of this ConformLoad. Default: 0 */ + CIMPP::NonConformLoadGroup* LoadGroup; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/NonConformLoadGroup.cpp b/CGMES_3.0.0/NonConformLoadGroup.cpp index 23646be3e..0ffa2111f 100644 --- a/CGMES_3.0.0/NonConformLoadGroup.cpp +++ b/CGMES_3.0.0/NonConformLoadGroup.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -NonConformLoadGroup::NonConformLoadGroup() {}; -NonConformLoadGroup::~NonConformLoadGroup() {}; +NonConformLoadGroup::NonConformLoadGroup() {} +NonConformLoadGroup::~NonConformLoadGroup() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ NonConformLoadGroup::getPossibleProfilesForAttributes() const return map; } - - bool assign_NonConformLoad_LoadGroup(BaseClass*, BaseClass*); bool assign_NonConformLoadGroup_EnergyConsumers(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_NonConformLoadGroup_EnergyConsumers(BaseClass* BaseClass_ptr1, BaseC } return false; } + bool assign_NonConformLoadSchedule_NonConformLoadGroup(BaseClass*, BaseClass*); bool assign_NonConformLoadGroup_NonConformLoadSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -87,7 +86,7 @@ const char* NonConformLoadGroup::debugString() const void NonConformLoadGroup::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:NonConformLoadGroup"), &NonConformLoadGroup_factory)); + factory_map.emplace("cim:NonConformLoadGroup", &NonConformLoadGroup_factory); } void NonConformLoadGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -96,8 +95,8 @@ void NonConformLoadGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:NonConformLoadGroup.EnergyConsumers"), &assign_NonConformLoadGroup_EnergyConsumers)); - assign_map.insert(std::make_pair(std::string("cim:NonConformLoadGroup.NonConformLoadSchedules"), &assign_NonConformLoadGroup_NonConformLoadSchedules)); + assign_map.emplace("cim:NonConformLoadGroup.EnergyConsumers", &assign_NonConformLoadGroup_EnergyConsumers); + assign_map.emplace("cim:NonConformLoadGroup.NonConformLoadSchedules", &assign_NonConformLoadGroup_NonConformLoadSchedules); } void NonConformLoadGroup::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/NonConformLoadGroup.hpp b/CGMES_3.0.0/NonConformLoadGroup.hpp index d8dd130f0..bf081b1bc 100644 --- a/CGMES_3.0.0/NonConformLoadGroup.hpp +++ b/CGMES_3.0.0/NonConformLoadGroup.hpp @@ -18,9 +18,7 @@ namespace CIMPP class NonConformLoad; class NonConformLoadSchedule; - /* - Loads that do not follow a daily and seasonal load variation pattern. - */ + /** \brief Loads that do not follow a daily and seasonal load variation pattern. */ class NonConformLoadGroup : public LoadGroup { public: @@ -28,8 +26,11 @@ namespace CIMPP NonConformLoadGroup(); ~NonConformLoadGroup() override; - std::list EnergyConsumers; /* Conform loads assigned to this ConformLoadGroup. Default: 0 */ - std::list NonConformLoadSchedules; /* The NonConformLoadSchedules in the NonConformLoadGroup. Default: 0 */ + /** \brief Conform loads assigned to this ConformLoadGroup. Default: 0 */ + std::list EnergyConsumers; + + /** \brief The NonConformLoadSchedules in the NonConformLoadGroup. Default: 0 */ + std::list NonConformLoadSchedules; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/NonConformLoadSchedule.cpp b/CGMES_3.0.0/NonConformLoadSchedule.cpp index c7ee3837c..f4a6a8203 100644 --- a/CGMES_3.0.0/NonConformLoadSchedule.cpp +++ b/CGMES_3.0.0/NonConformLoadSchedule.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -NonConformLoadSchedule::NonConformLoadSchedule() : NonConformLoadGroup(nullptr) {}; -NonConformLoadSchedule::~NonConformLoadSchedule() {}; +NonConformLoadSchedule::NonConformLoadSchedule() : NonConformLoadGroup(nullptr) {} +NonConformLoadSchedule::~NonConformLoadSchedule() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ NonConformLoadSchedule::getPossibleProfilesForAttributes() const return map; } - - bool assign_NonConformLoadGroup_NonConformLoadSchedules(BaseClass*, BaseClass*); bool assign_NonConformLoadSchedule_NonConformLoadGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_NonConformLoadSchedule_NonConformLoadGroup(BaseClass* BaseClass_ptr1 return false; } - bool get_NonConformLoadSchedule_NonConformLoadGroup(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const NonConformLoadSchedule* element = dynamic_cast(BaseClass_ptr1)) + const NonConformLoadSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->NonConformLoadGroup != 0) { @@ -73,7 +71,6 @@ bool get_NonConformLoadSchedule_NonConformLoadGroup(const BaseClass* BaseClass_p return false; } - const char NonConformLoadSchedule::debugName[] = "NonConformLoadSchedule"; const char* NonConformLoadSchedule::debugString() const { @@ -82,7 +79,7 @@ const char* NonConformLoadSchedule::debugString() const void NonConformLoadSchedule::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:NonConformLoadSchedule"), &NonConformLoadSchedule_factory)); + factory_map.emplace("cim:NonConformLoadSchedule", &NonConformLoadSchedule_factory); } void NonConformLoadSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void NonConformLoadSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:NonConformLoadSchedule.NonConformLoadGroup"), &assign_NonConformLoadSchedule_NonConformLoadGroup)); + assign_map.emplace("cim:NonConformLoadSchedule.NonConformLoadGroup", &assign_NonConformLoadSchedule_NonConformLoadGroup); } void NonConformLoadSchedule::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/NonConformLoadSchedule.hpp b/CGMES_3.0.0/NonConformLoadSchedule.hpp index d45288843..6863e9f88 100644 --- a/CGMES_3.0.0/NonConformLoadSchedule.hpp +++ b/CGMES_3.0.0/NonConformLoadSchedule.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class NonConformLoadGroup; - /* - An active power (Y1-axis) and reactive power (Y2-axis) schedule (curves) versus time (X-axis) for non-conforming loads, e.g., large industrial load or power station service (where modelled). - */ + /** \brief An active power (Y1-axis) and reactive power (Y2-axis) schedule (curves) versus time (X-axis) for non-conforming loads, e.g., large industrial load or power station service (where modelled). */ class NonConformLoadSchedule : public SeasonDayTypeSchedule { public: @@ -27,7 +25,8 @@ namespace CIMPP NonConformLoadSchedule(); ~NonConformLoadSchedule() override; - CIMPP::NonConformLoadGroup* NonConformLoadGroup; /* The NonConformLoadGroup where the NonConformLoadSchedule belongs. Default: 0 */ + /** \brief The NonConformLoadGroup where the NonConformLoadSchedule belongs. Default: 0 */ + CIMPP::NonConformLoadGroup* NonConformLoadGroup; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/NonlinearShuntCompensator.cpp b/CGMES_3.0.0/NonlinearShuntCompensator.cpp index 13f02ad2f..5fd272895 100644 --- a/CGMES_3.0.0/NonlinearShuntCompensator.cpp +++ b/CGMES_3.0.0/NonlinearShuntCompensator.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -NonlinearShuntCompensator::NonlinearShuntCompensator() {}; -NonlinearShuntCompensator::~NonlinearShuntCompensator() {}; +NonlinearShuntCompensator::NonlinearShuntCompensator() {} +NonlinearShuntCompensator::~NonlinearShuntCompensator() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ NonlinearShuntCompensator::getPossibleProfilesForAttributes() const return map; } - - bool assign_NonlinearShuntCompensatorPoint_NonlinearShuntCompensator(BaseClass*, BaseClass*); bool assign_NonlinearShuntCompensator_NonlinearShuntCompensatorPoints(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,7 +59,6 @@ bool assign_NonlinearShuntCompensator_NonlinearShuntCompensatorPoints(BaseClass* } - const char NonlinearShuntCompensator::debugName[] = "NonlinearShuntCompensator"; const char* NonlinearShuntCompensator::debugString() const { @@ -70,7 +67,7 @@ const char* NonlinearShuntCompensator::debugString() const void NonlinearShuntCompensator::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensator"), &NonlinearShuntCompensator_factory)); + factory_map.emplace("cim:NonlinearShuntCompensator", &NonlinearShuntCompensator_factory); } void NonlinearShuntCompensator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -79,7 +76,7 @@ void NonlinearShuntCompensator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensator.NonlinearShuntCompensatorPoints"), &assign_NonlinearShuntCompensator_NonlinearShuntCompensatorPoints)); + assign_map.emplace("cim:NonlinearShuntCompensator.NonlinearShuntCompensatorPoints", &assign_NonlinearShuntCompensator_NonlinearShuntCompensatorPoints); } void NonlinearShuntCompensator::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/NonlinearShuntCompensator.hpp b/CGMES_3.0.0/NonlinearShuntCompensator.hpp index 528dd2f2b..aca09e4c5 100644 --- a/CGMES_3.0.0/NonlinearShuntCompensator.hpp +++ b/CGMES_3.0.0/NonlinearShuntCompensator.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class NonlinearShuntCompensatorPoint; - /* - A non linear shunt compensator has bank or section admittance values that differ. The attributes g, b, g0 and b0 of the associated NonlinearShuntCompensatorPoint describe the total conductance and admittance of a NonlinearShuntCompensatorPoint at a section number specified by NonlinearShuntCompensatorPoint.sectionNumber. - */ + /** \brief A non linear shunt compensator has bank or section admittance values that differ. The attributes g, b, g0 and b0 of the associated NonlinearShuntCompensatorPoint describe the total conductance and admittance of a NonlinearShuntCompensatorPoint at a section number specified by NonlinearShuntCompensatorPoint.sectionNumber. */ class NonlinearShuntCompensator : public ShuntCompensator { public: @@ -27,7 +25,8 @@ namespace CIMPP NonlinearShuntCompensator(); ~NonlinearShuntCompensator() override; - std::list NonlinearShuntCompensatorPoints; /* All points of the non-linear shunt compensator. Default: 0 */ + /** \brief All points of the non-linear shunt compensator. Default: 0 */ + std::list NonlinearShuntCompensatorPoints; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/NonlinearShuntCompensatorPoint.cpp b/CGMES_3.0.0/NonlinearShuntCompensatorPoint.cpp index ca850bc08..429202f1e 100644 --- a/CGMES_3.0.0/NonlinearShuntCompensatorPoint.cpp +++ b/CGMES_3.0.0/NonlinearShuntCompensatorPoint.cpp @@ -9,16 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "NonlinearShuntCompensator.hpp" -#include "Susceptance.hpp" -#include "Susceptance.hpp" -#include "Conductance.hpp" -#include "Conductance.hpp" -#include "Integer.hpp" using namespace CIMPP; -NonlinearShuntCompensatorPoint::NonlinearShuntCompensatorPoint() : NonlinearShuntCompensator(nullptr) {}; -NonlinearShuntCompensatorPoint::~NonlinearShuntCompensatorPoint() {}; +NonlinearShuntCompensatorPoint::NonlinearShuntCompensatorPoint() : NonlinearShuntCompensator(nullptr) {} +NonlinearShuntCompensatorPoint::~NonlinearShuntCompensatorPoint() {} static const std::list PossibleProfilesForClass = { @@ -51,93 +46,111 @@ NonlinearShuntCompensatorPoint::getPossibleProfilesForAttributes() const return map; } +bool assign_NonlinearShuntCompensator_NonlinearShuntCompensatorPoints(BaseClass*, BaseClass*); +bool assign_NonlinearShuntCompensatorPoint_NonlinearShuntCompensator(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + NonlinearShuntCompensator* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->NonlinearShuntCompensator != element2) + { + element->NonlinearShuntCompensator = element2; + return assign_NonlinearShuntCompensator_NonlinearShuntCompensatorPoints(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_NonlinearShuntCompensatorPoint_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_NonlinearShuntCompensatorPoint_b(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_NonlinearShuntCompensatorPoint_b0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_NonlinearShuntCompensatorPoint_b0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_NonlinearShuntCompensatorPoint_g(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_NonlinearShuntCompensatorPoint_g(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_NonlinearShuntCompensatorPoint_g0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_NonlinearShuntCompensatorPoint_g0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_NonlinearShuntCompensatorPoint_sectionNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_NonlinearShuntCompensatorPoint_sectionNumber(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->sectionNumber; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_NonlinearShuntCompensator_NonlinearShuntCompensatorPoints(BaseClass*, BaseClass*); -bool assign_NonlinearShuntCompensatorPoint_NonlinearShuntCompensator(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_NonlinearShuntCompensatorPoint_NonlinearShuntCompensator(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); - NonlinearShuntCompensator* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->NonlinearShuntCompensator != element2) + if (element->NonlinearShuntCompensator != 0) { - element->NonlinearShuntCompensator = element2; - return assign_NonlinearShuntCompensator_NonlinearShuntCompensatorPoints(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->NonlinearShuntCompensator); + return true; } - return true; } return false; } bool get_NonlinearShuntCompensatorPoint_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b; if (!buffer.str().empty()) @@ -151,7 +164,8 @@ bool get_NonlinearShuntCompensatorPoint_b(const BaseClass* BaseClass_ptr1, std:: bool get_NonlinearShuntCompensatorPoint_b0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b0; if (!buffer.str().empty()) @@ -165,7 +179,8 @@ bool get_NonlinearShuntCompensatorPoint_b0(const BaseClass* BaseClass_ptr1, std: bool get_NonlinearShuntCompensatorPoint_g(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g; if (!buffer.str().empty()) @@ -179,7 +194,8 @@ bool get_NonlinearShuntCompensatorPoint_g(const BaseClass* BaseClass_ptr1, std:: bool get_NonlinearShuntCompensatorPoint_g0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g0; if (!buffer.str().empty()) @@ -193,7 +209,8 @@ bool get_NonlinearShuntCompensatorPoint_g0(const BaseClass* BaseClass_ptr1, std: bool get_NonlinearShuntCompensatorPoint_sectionNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) + const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->sectionNumber; if (!buffer.str().empty()) @@ -205,21 +222,6 @@ bool get_NonlinearShuntCompensatorPoint_sectionNumber(const BaseClass* BaseClass return false; } - -bool get_NonlinearShuntCompensatorPoint_NonlinearShuntCompensator(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const NonlinearShuntCompensatorPoint* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->NonlinearShuntCompensator != 0) - { - BaseClass_list.push_back(element->NonlinearShuntCompensator); - return true; - } - } - return false; -} - - const char NonlinearShuntCompensatorPoint::debugName[] = "NonlinearShuntCompensatorPoint"; const char* NonlinearShuntCompensatorPoint::debugString() const { @@ -228,21 +230,21 @@ const char* NonlinearShuntCompensatorPoint::debugString() const void NonlinearShuntCompensatorPoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensatorPoint"), &NonlinearShuntCompensatorPoint_factory)); + factory_map.emplace("cim:NonlinearShuntCompensatorPoint", &NonlinearShuntCompensatorPoint_factory); } void NonlinearShuntCompensatorPoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensatorPoint.b"), &assign_NonlinearShuntCompensatorPoint_b)); - assign_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensatorPoint.b0"), &assign_NonlinearShuntCompensatorPoint_b0)); - assign_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensatorPoint.g"), &assign_NonlinearShuntCompensatorPoint_g)); - assign_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensatorPoint.g0"), &assign_NonlinearShuntCompensatorPoint_g0)); - assign_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensatorPoint.sectionNumber"), &assign_NonlinearShuntCompensatorPoint_sectionNumber)); + assign_map.emplace("cim:NonlinearShuntCompensatorPoint.b", &assign_NonlinearShuntCompensatorPoint_b); + assign_map.emplace("cim:NonlinearShuntCompensatorPoint.b0", &assign_NonlinearShuntCompensatorPoint_b0); + assign_map.emplace("cim:NonlinearShuntCompensatorPoint.g", &assign_NonlinearShuntCompensatorPoint_g); + assign_map.emplace("cim:NonlinearShuntCompensatorPoint.g0", &assign_NonlinearShuntCompensatorPoint_g0); + assign_map.emplace("cim:NonlinearShuntCompensatorPoint.sectionNumber", &assign_NonlinearShuntCompensatorPoint_sectionNumber); } void NonlinearShuntCompensatorPoint::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:NonlinearShuntCompensatorPoint.NonlinearShuntCompensator"), &assign_NonlinearShuntCompensatorPoint_NonlinearShuntCompensator)); + assign_map.emplace("cim:NonlinearShuntCompensatorPoint.NonlinearShuntCompensator", &assign_NonlinearShuntCompensatorPoint_NonlinearShuntCompensator); } void NonlinearShuntCompensatorPoint::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/NonlinearShuntCompensatorPoint.hpp b/CGMES_3.0.0/NonlinearShuntCompensatorPoint.hpp index 24b52cb16..d03cc8d0b 100644 --- a/CGMES_3.0.0/NonlinearShuntCompensatorPoint.hpp +++ b/CGMES_3.0.0/NonlinearShuntCompensatorPoint.hpp @@ -20,9 +20,7 @@ namespace CIMPP { class NonlinearShuntCompensator; - /* - A non linear shunt compensator bank or section admittance value. The number of NonlinearShuntCompenstorPoint instances associated with a NonlinearShuntCompensator shall be equal to ShuntCompensator.maximumSections. ShuntCompensator.sections shall only be set to one of the NonlinearShuntCompenstorPoint.sectionNumber. There is no interpolation between NonlinearShuntCompenstorPoint-s. - */ + /** \brief A non linear shunt compensator bank or section admittance value. The number of NonlinearShuntCompenstorPoint instances associated with a NonlinearShuntCompensator shall be equal to ShuntCompensator.maximumSections. ShuntCompensator.sections shall only be set to one of the NonlinearShuntCompenstorPoint.sectionNumber. There is no interpolation between NonlinearShuntCompenstorPoint-s. */ class NonlinearShuntCompensatorPoint : public BaseClass { public: @@ -30,12 +28,23 @@ namespace CIMPP NonlinearShuntCompensatorPoint(); ~NonlinearShuntCompensatorPoint() override; - CIMPP::NonlinearShuntCompensator* NonlinearShuntCompensator; /* Non-linear shunt compensator owning this point. Default: 0 */ - CIMPP::Susceptance b; /* Positive sequence shunt (charging) susceptance per section. Default: nullptr */ - CIMPP::Susceptance b0; /* Zero sequence shunt (charging) susceptance per section. Default: nullptr */ - CIMPP::Conductance g; /* Positive sequence shunt (charging) conductance per section. Default: nullptr */ - CIMPP::Conductance g0; /* Zero sequence shunt (charging) conductance per section. Default: nullptr */ - CIMPP::Integer sectionNumber; /* The number of the section. Default: 0 */ + /** \brief Non-linear shunt compensator owning this point. Default: 0 */ + CIMPP::NonlinearShuntCompensator* NonlinearShuntCompensator; + + /** \brief Positive sequence shunt (charging) susceptance per section. Default: nullptr */ + CIMPP::Susceptance b; + + /** \brief Zero sequence shunt (charging) susceptance per section. Default: nullptr */ + CIMPP::Susceptance b0; + + /** \brief Positive sequence shunt (charging) conductance per section. Default: nullptr */ + CIMPP::Conductance g; + + /** \brief Zero sequence shunt (charging) conductance per section. Default: nullptr */ + CIMPP::Conductance g0; + + /** \brief The number of the section. Default: 0 */ + CIMPP::Integer sectionNumber; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/NuclearGeneratingUnit.cpp b/CGMES_3.0.0/NuclearGeneratingUnit.cpp index 9e3fcec38..3ce0ed75a 100644 --- a/CGMES_3.0.0/NuclearGeneratingUnit.cpp +++ b/CGMES_3.0.0/NuclearGeneratingUnit.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -NuclearGeneratingUnit::NuclearGeneratingUnit() {}; -NuclearGeneratingUnit::~NuclearGeneratingUnit() {}; +NuclearGeneratingUnit::NuclearGeneratingUnit() {} +NuclearGeneratingUnit::~NuclearGeneratingUnit() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ NuclearGeneratingUnit::getPossibleProfilesForAttributes() const return map; } - - - - - const char NuclearGeneratingUnit::debugName[] = "NuclearGeneratingUnit"; const char* NuclearGeneratingUnit::debugString() const { @@ -52,7 +47,7 @@ const char* NuclearGeneratingUnit::debugString() const void NuclearGeneratingUnit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:NuclearGeneratingUnit"), &NuclearGeneratingUnit_factory)); + factory_map.emplace("cim:NuclearGeneratingUnit", &NuclearGeneratingUnit_factory); } void NuclearGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/NuclearGeneratingUnit.hpp b/CGMES_3.0.0/NuclearGeneratingUnit.hpp index 4ee5186cd..81ab7cd3d 100644 --- a/CGMES_3.0.0/NuclearGeneratingUnit.hpp +++ b/CGMES_3.0.0/NuclearGeneratingUnit.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A nuclear generating unit. - */ + /** \brief A nuclear generating unit. */ class NuclearGeneratingUnit : public GeneratingUnit { public: @@ -26,7 +24,6 @@ namespace CIMPP NuclearGeneratingUnit(); ~NuclearGeneratingUnit() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/OperationalLimit.cpp b/CGMES_3.0.0/OperationalLimit.cpp index 36e3aef98..eb153f59f 100644 --- a/CGMES_3.0.0/OperationalLimit.cpp +++ b/CGMES_3.0.0/OperationalLimit.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -OperationalLimit::OperationalLimit() : OperationalLimitSet(nullptr), OperationalLimitType(nullptr) {}; -OperationalLimit::~OperationalLimit() {}; +OperationalLimit::OperationalLimit() : OperationalLimitSet(nullptr), OperationalLimitType(nullptr) {} +OperationalLimit::~OperationalLimit() {} static const std::list PossibleProfilesForClass = { @@ -43,8 +43,6 @@ OperationalLimit::getPossibleProfilesForAttributes() const return map; } - - bool assign_OperationalLimitSet_OperationalLimitValue(BaseClass*, BaseClass*); bool assign_OperationalLimit_OperationalLimitSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,6 +59,7 @@ bool assign_OperationalLimit_OperationalLimitSet(BaseClass* BaseClass_ptr1, Base } return false; } + bool assign_OperationalLimitType_OperationalLimit(BaseClass*, BaseClass*); bool assign_OperationalLimit_OperationalLimitType(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -78,10 +77,10 @@ bool assign_OperationalLimit_OperationalLimitType(BaseClass* BaseClass_ptr1, Bas return false; } - bool get_OperationalLimit_OperationalLimitSet(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const OperationalLimit* element = dynamic_cast(BaseClass_ptr1)) + const OperationalLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->OperationalLimitSet != 0) { @@ -94,7 +93,8 @@ bool get_OperationalLimit_OperationalLimitSet(const BaseClass* BaseClass_ptr1, s bool get_OperationalLimit_OperationalLimitType(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const OperationalLimit* element = dynamic_cast(BaseClass_ptr1)) + const OperationalLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->OperationalLimitType != 0) { @@ -105,7 +105,6 @@ bool get_OperationalLimit_OperationalLimitType(const BaseClass* BaseClass_ptr1, return false; } - const char OperationalLimit::debugName[] = "OperationalLimit"; const char* OperationalLimit::debugString() const { @@ -114,7 +113,7 @@ const char* OperationalLimit::debugString() const void OperationalLimit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:OperationalLimit"), &OperationalLimit_factory)); + factory_map.emplace("cim:OperationalLimit", &OperationalLimit_factory); } void OperationalLimit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -123,8 +122,8 @@ void OperationalLimit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OperationalLimit.OperationalLimitSet"), &assign_OperationalLimit_OperationalLimitSet)); - assign_map.insert(std::make_pair(std::string("cim:OperationalLimit.OperationalLimitType"), &assign_OperationalLimit_OperationalLimitType)); + assign_map.emplace("cim:OperationalLimit.OperationalLimitSet", &assign_OperationalLimit_OperationalLimitSet); + assign_map.emplace("cim:OperationalLimit.OperationalLimitType", &assign_OperationalLimit_OperationalLimitType); } void OperationalLimit::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/OperationalLimit.hpp b/CGMES_3.0.0/OperationalLimit.hpp index 406632738..c23bca2c9 100644 --- a/CGMES_3.0.0/OperationalLimit.hpp +++ b/CGMES_3.0.0/OperationalLimit.hpp @@ -18,9 +18,7 @@ namespace CIMPP class OperationalLimitSet; class OperationalLimitType; - /* - A value and normal value associated with a specific kind of limit. The sub class value and normalValue attributes vary inversely to the associated OperationalLimitType.acceptableDuration (acceptableDuration for short). If a particular piece of equipment has multiple operational limits of the same kind (apparent power, current, etc.), the limit with the greatest acceptableDuration shall have the smallest limit value and the limit with the smallest acceptableDuration shall have the largest limit value. Note: A large current can only be allowed to flow through a piece of equipment for a short duration without causing damage, but a lesser current can be allowed to flow for a longer duration. - */ + /** \brief A value and normal value associated with a specific kind of limit. The sub class value and normalValue attributes vary inversely to the associated OperationalLimitType.acceptableDuration (acceptableDuration for short). If a particular piece of equipment has multiple operational limits of the same kind (apparent power, current, etc.), the limit with the greatest acceptableDuration shall have the smallest limit value and the limit with the smallest acceptableDuration shall have the largest limit value. Note: A large current can only be allowed to flow through a piece of equipment for a short duration without causing damage, but a lesser current can be allowed to flow for a longer duration. */ class OperationalLimit : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP OperationalLimit(); ~OperationalLimit() override; - CIMPP::OperationalLimitSet* OperationalLimitSet; /* The limit set to which the limit values belong. Default: 0 */ - CIMPP::OperationalLimitType* OperationalLimitType; /* The limit type associated with this limit. Default: 0 */ + /** \brief The limit set to which the limit values belong. Default: 0 */ + CIMPP::OperationalLimitSet* OperationalLimitSet; + + /** \brief The limit type associated with this limit. Default: 0 */ + CIMPP::OperationalLimitType* OperationalLimitType; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/OperationalLimitDirectionKind.cpp b/CGMES_3.0.0/OperationalLimitDirectionKind.cpp index 4aeb56e6d..77fce153e 100644 --- a/CGMES_3.0.0/OperationalLimitDirectionKind.cpp +++ b/CGMES_3.0.0/OperationalLimitDirectionKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "OperationalLimitDirectionKind") + if (EnumSymbol.substr(0, pos) != "OperationalLimitDirectionKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "high") + if (EnumSymbol == "high") { rop = OperationalLimitDirectionKind::high; return lop; } - if(EnumSymbol == "low") + if (EnumSymbol == "low") { rop = OperationalLimitDirectionKind::low; return lop; } - if(EnumSymbol == "absoluteValue") + if (EnumSymbol == "absoluteValue") { rop = OperationalLimitDirectionKind::absoluteValue; return lop; diff --git a/CGMES_3.0.0/OperationalLimitDirectionKind.hpp b/CGMES_3.0.0/OperationalLimitDirectionKind.hpp index 33d23f39a..295417e17 100644 --- a/CGMES_3.0.0/OperationalLimitDirectionKind.hpp +++ b/CGMES_3.0.0/OperationalLimitDirectionKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The direction attribute describes the side of a limit that is a violation. - */ + /** \brief The direction attribute describes the side of a limit that is a violation. */ class OperationalLimitDirectionKind { public: enum OperationalLimitDirectionKind_ENUM { - /** - * High means that a monitored value above the limit value is a violation. If applied to a terminal flow, the positive direction is into the terminal. - */ + /** High means that a monitored value above the limit value is a violation. If applied to a terminal flow, the positive direction is into the terminal. */ high, - /** - * Low means a monitored value below the limit is a violation. If applied to a terminal flow, the positive direction is into the terminal. - */ + /** Low means a monitored value below the limit is a violation. If applied to a terminal flow, the positive direction is into the terminal. */ low, - /** - * An absoluteValue limit means that a monitored absolute value above the limit value is a violation. - */ + /** An absoluteValue limit means that a monitored absolute value above the limit value is a violation. */ absoluteValue, }; diff --git a/CGMES_3.0.0/OperationalLimitSet.cpp b/CGMES_3.0.0/OperationalLimitSet.cpp index 615a0edcd..b2d24e3d4 100644 --- a/CGMES_3.0.0/OperationalLimitSet.cpp +++ b/CGMES_3.0.0/OperationalLimitSet.cpp @@ -8,14 +8,14 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include +#include "ACDCTerminal.hpp" #include "Equipment.hpp" #include "OperationalLimit.hpp" -#include "ACDCTerminal.hpp" using namespace CIMPP; -OperationalLimitSet::OperationalLimitSet() : Equipment(nullptr), Terminal(nullptr) {}; -OperationalLimitSet::~OperationalLimitSet() {}; +OperationalLimitSet::OperationalLimitSet() : Equipment(nullptr), Terminal(nullptr) {} +OperationalLimitSet::~OperationalLimitSet() {} static const std::list PossibleProfilesForClass = { @@ -44,8 +44,6 @@ OperationalLimitSet::getPossibleProfilesForAttributes() const return map; } - - bool assign_Equipment_OperationalLimitSet(BaseClass*, BaseClass*); bool assign_OperationalLimitSet_Equipment(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -62,6 +60,7 @@ bool assign_OperationalLimitSet_Equipment(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_OperationalLimit_OperationalLimitSet(BaseClass*, BaseClass*); bool assign_OperationalLimitSet_OperationalLimitValue(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -78,6 +77,7 @@ bool assign_OperationalLimitSet_OperationalLimitValue(BaseClass* BaseClass_ptr1, } return false; } + bool assign_ACDCTerminal_OperationalLimitSet(BaseClass*, BaseClass*); bool assign_OperationalLimitSet_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -95,10 +95,10 @@ bool assign_OperationalLimitSet_Terminal(BaseClass* BaseClass_ptr1, BaseClass* B return false; } - bool get_OperationalLimitSet_Equipment(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const OperationalLimitSet* element = dynamic_cast(BaseClass_ptr1)) + const OperationalLimitSet* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Equipment != 0) { @@ -109,9 +109,11 @@ bool get_OperationalLimitSet_Equipment(const BaseClass* BaseClass_ptr1, std::lis return false; } + bool get_OperationalLimitSet_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const OperationalLimitSet* element = dynamic_cast(BaseClass_ptr1)) + const OperationalLimitSet* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Terminal != 0) { @@ -122,7 +124,6 @@ bool get_OperationalLimitSet_Terminal(const BaseClass* BaseClass_ptr1, std::list return false; } - const char OperationalLimitSet::debugName[] = "OperationalLimitSet"; const char* OperationalLimitSet::debugString() const { @@ -131,7 +132,7 @@ const char* OperationalLimitSet::debugString() const void OperationalLimitSet::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:OperationalLimitSet"), &OperationalLimitSet_factory)); + factory_map.emplace("cim:OperationalLimitSet", &OperationalLimitSet_factory); } void OperationalLimitSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -140,9 +141,9 @@ void OperationalLimitSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OperationalLimitSet.Equipment"), &assign_OperationalLimitSet_Equipment)); - assign_map.insert(std::make_pair(std::string("cim:OperationalLimitSet.OperationalLimitValue"), &assign_OperationalLimitSet_OperationalLimitValue)); - assign_map.insert(std::make_pair(std::string("cim:OperationalLimitSet.Terminal"), &assign_OperationalLimitSet_Terminal)); + assign_map.emplace("cim:OperationalLimitSet.Equipment", &assign_OperationalLimitSet_Equipment); + assign_map.emplace("cim:OperationalLimitSet.OperationalLimitValue", &assign_OperationalLimitSet_OperationalLimitValue); + assign_map.emplace("cim:OperationalLimitSet.Terminal", &assign_OperationalLimitSet_Terminal); } void OperationalLimitSet::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/OperationalLimitSet.hpp b/CGMES_3.0.0/OperationalLimitSet.hpp index c82b79bd6..19df3399f 100644 --- a/CGMES_3.0.0/OperationalLimitSet.hpp +++ b/CGMES_3.0.0/OperationalLimitSet.hpp @@ -19,9 +19,7 @@ namespace CIMPP class Equipment; class OperationalLimit; - /* - A set of limits associated with equipment. Sets of limits might apply to a specific temperature, or season for example. A set of limits may contain different severities of limit levels that would apply to the same equipment. The set may contain limits of different types such as apparent power and current limits or high and low voltage limits that are logically applied together as a set. - */ + /** \brief A set of limits associated with equipment. Sets of limits might apply to a specific temperature, or season for example. A set of limits may contain different severities of limit levels that would apply to the same equipment. The set may contain limits of different types such as apparent power and current limits or high and low voltage limits that are logically applied together as a set. */ class OperationalLimitSet : public IdentifiedObject { public: @@ -29,9 +27,14 @@ namespace CIMPP OperationalLimitSet(); ~OperationalLimitSet() override; - CIMPP::Equipment* Equipment; /* The equipment to which the limit set applies. Default: 0 */ - std::list OperationalLimitValue; /* Values of equipment limits. Default: 0 */ - CIMPP::ACDCTerminal* Terminal; /* The terminal where the operational limit set apply. Default: 0 */ + /** \brief The equipment to which the limit set applies. Default: 0 */ + CIMPP::Equipment* Equipment; + + /** \brief Values of equipment limits. Default: 0 */ + std::list OperationalLimitValue; + + /** \brief The terminal where the operational limit set apply. Default: 0 */ + CIMPP::ACDCTerminal* Terminal; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/OperationalLimitType.cpp b/CGMES_3.0.0/OperationalLimitType.cpp index 4ee373abb..1cfa623ac 100644 --- a/CGMES_3.0.0/OperationalLimitType.cpp +++ b/CGMES_3.0.0/OperationalLimitType.cpp @@ -9,15 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "OperationalLimit.hpp" -#include "Seconds.hpp" -#include "OperationalLimitDirectionKind.hpp" -#include "Boolean.hpp" -#include "LimitKind.hpp" using namespace CIMPP; -OperationalLimitType::OperationalLimitType() {}; -OperationalLimitType::~OperationalLimitType() {}; +OperationalLimitType::OperationalLimitType() {} +OperationalLimitType::~OperationalLimitType() {} static const std::list PossibleProfilesForClass = { @@ -48,80 +44,84 @@ OperationalLimitType::getPossibleProfilesForAttributes() const return map; } - -bool assign_OperationalLimitType_acceptableDuration(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OperationalLimit_OperationalLimitType(BaseClass*, BaseClass*); +bool assign_OperationalLimitType_OperationalLimit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (OperationalLimitType* element = dynamic_cast(BaseClass_ptr1)) + OperationalLimitType* element = dynamic_cast(BaseClass_ptr1); + OperationalLimit* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->acceptableDuration; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->OperationalLimit.begin(), element->OperationalLimit.end(), element2) == element->OperationalLimit.end()) + { + element->OperationalLimit.push_back(element2); + return assign_OperationalLimit_OperationalLimitType(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_OperationalLimitType_direction(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OperationalLimitType_acceptableDuration(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OperationalLimitType* element = dynamic_cast(BaseClass_ptr1)) + OperationalLimitType* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->direction; - if (buffer.fail()) - return false; - else + buffer >> element->acceptableDuration; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OperationalLimitType_isInfiniteDuration(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OperationalLimitType_direction(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OperationalLimitType* element = dynamic_cast(BaseClass_ptr1)) + OperationalLimitType* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->isInfiniteDuration; - if (buffer.fail()) - return false; - else + buffer >> element->direction; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OperationalLimitType_kind(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OperationalLimitType_isInfiniteDuration(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OperationalLimitType* element = dynamic_cast(BaseClass_ptr1)) + OperationalLimitType* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->kind; - if (buffer.fail()) - return false; - else + buffer >> element->isInfiniteDuration; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_OperationalLimit_OperationalLimitType(BaseClass*, BaseClass*); -bool assign_OperationalLimitType_OperationalLimit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_OperationalLimitType_kind(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { OperationalLimitType* element = dynamic_cast(BaseClass_ptr1); - OperationalLimit* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->OperationalLimit.begin(), element->OperationalLimit.end(), element2) == element->OperationalLimit.end()) + buffer >> element->kind; + if (!buffer.fail()) { - element->OperationalLimit.push_back(element2); - return assign_OperationalLimit_OperationalLimitType(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_OperationalLimitType_acceptableDuration(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OperationalLimitType* element = dynamic_cast(BaseClass_ptr1)) + const OperationalLimitType* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->acceptableDuration; if (!buffer.str().empty()) @@ -133,11 +133,12 @@ bool get_OperationalLimitType_acceptableDuration(const BaseClass* BaseClass_ptr1 return false; } -bool get_OperationalLimitType_isInfiniteDuration(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_OperationalLimitType_direction(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OperationalLimitType* element = dynamic_cast(BaseClass_ptr1)) + const OperationalLimitType* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->isInfiniteDuration; + buffer << element->direction; if (!buffer.str().empty()) { return true; @@ -147,13 +148,12 @@ bool get_OperationalLimitType_isInfiniteDuration(const BaseClass* BaseClass_ptr1 return false; } - - -bool get_OperationalLimitType_direction(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_OperationalLimitType_isInfiniteDuration(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OperationalLimitType* element = dynamic_cast(BaseClass_ptr1)) + const OperationalLimitType* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->direction; + buffer << element->isInfiniteDuration; if (!buffer.str().empty()) { return true; @@ -165,7 +165,8 @@ bool get_OperationalLimitType_direction(const BaseClass* BaseClass_ptr1, std::st bool get_OperationalLimitType_kind(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OperationalLimitType* element = dynamic_cast(BaseClass_ptr1)) + const OperationalLimitType* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kind; if (!buffer.str().empty()) @@ -185,20 +186,20 @@ const char* OperationalLimitType::debugString() const void OperationalLimitType::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:OperationalLimitType"), &OperationalLimitType_factory)); + factory_map.emplace("cim:OperationalLimitType", &OperationalLimitType_factory); } void OperationalLimitType::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OperationalLimitType.acceptableDuration"), &assign_OperationalLimitType_acceptableDuration)); - assign_map.insert(std::make_pair(std::string("cim:OperationalLimitType.direction"), &assign_OperationalLimitType_direction)); - assign_map.insert(std::make_pair(std::string("cim:OperationalLimitType.isInfiniteDuration"), &assign_OperationalLimitType_isInfiniteDuration)); - assign_map.insert(std::make_pair(std::string("cim:OperationalLimitType.kind"), &assign_OperationalLimitType_kind)); + assign_map.emplace("cim:OperationalLimitType.acceptableDuration", &assign_OperationalLimitType_acceptableDuration); + assign_map.emplace("cim:OperationalLimitType.direction", &assign_OperationalLimitType_direction); + assign_map.emplace("cim:OperationalLimitType.isInfiniteDuration", &assign_OperationalLimitType_isInfiniteDuration); + assign_map.emplace("cim:OperationalLimitType.kind", &assign_OperationalLimitType_kind); } void OperationalLimitType::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OperationalLimitType.OperationalLimit"), &assign_OperationalLimitType_OperationalLimit)); + assign_map.emplace("cim:OperationalLimitType.OperationalLimit", &assign_OperationalLimitType_OperationalLimit); } void OperationalLimitType::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/OperationalLimitType.hpp b/CGMES_3.0.0/OperationalLimitType.hpp index df181c5a7..5ee7ee70c 100644 --- a/CGMES_3.0.0/OperationalLimitType.hpp +++ b/CGMES_3.0.0/OperationalLimitType.hpp @@ -21,9 +21,7 @@ namespace CIMPP { class OperationalLimit; - /* - The operational meaning of a category of limits. - */ + /** \brief The operational meaning of a category of limits. */ class OperationalLimitType : public IdentifiedObject { public: @@ -31,11 +29,20 @@ namespace CIMPP OperationalLimitType(); ~OperationalLimitType() override; - std::list OperationalLimit; /* The operational limits associated with this type of limit. Default: 0 */ - CIMPP::Seconds acceptableDuration; /* The nominal acceptable duration of the limit. Limits are commonly expressed in terms of the time limit for which the limit is normally acceptable. The actual acceptable duration of a specific limit may depend on other local factors such as temperature or wind speed. The attribute has meaning only if the flag isInfiniteDuration is set to false, hence it shall not be exchanged when isInfiniteDuration is set to true. Default: nullptr */ - CIMPP::OperationalLimitDirectionKind direction; /* The direction of the limit. Default: 0 */ - CIMPP::Boolean isInfiniteDuration; /* Defines if the operational limit type has infinite duration. If true, the limit has infinite duration. If false, the limit has definite duration which is defined by the attribute acceptableDuration. Default: false */ - CIMPP::LimitKind kind; /* Types of limits defined in the ENTSO-E Operational Handbook Policy 3. Default: 0 */ + /** \brief The operational limits associated with this type of limit. Default: 0 */ + std::list OperationalLimit; + + /** \brief The nominal acceptable duration of the limit. Limits are commonly expressed in terms of the time limit for which the limit is normally acceptable. The actual acceptable duration of a specific limit may depend on other local factors such as temperature or wind speed. The attribute has meaning only if the flag isInfiniteDuration is set to false, hence it shall not be exchanged when isInfiniteDuration is set to true. Default: nullptr */ + CIMPP::Seconds acceptableDuration; + + /** \brief The direction of the limit. Default: 0 */ + CIMPP::OperationalLimitDirectionKind direction; + + /** \brief Defines if the operational limit type has infinite duration. If true, the limit has infinite duration. If false, the limit has definite duration which is defined by the attribute acceptableDuration. Default: false */ + CIMPP::Boolean isInfiniteDuration; + + /** \brief Types of limits defined in the ENTSO-E Operational Handbook Policy 3. Default: 0 */ + CIMPP::LimitKind kind; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/OrientationKind.cpp b/CGMES_3.0.0/OrientationKind.cpp index d03a1fb25..991356c7a 100644 --- a/CGMES_3.0.0/OrientationKind.cpp +++ b/CGMES_3.0.0/OrientationKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "OrientationKind") + if (EnumSymbol.substr(0, pos) != "OrientationKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,12 +50,12 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "positive") + if (EnumSymbol == "positive") { rop = OrientationKind::positive; return lop; } - if(EnumSymbol == "negative") + if (EnumSymbol == "negative") { rop = OrientationKind::negative; return lop; diff --git a/CGMES_3.0.0/OrientationKind.hpp b/CGMES_3.0.0/OrientationKind.hpp index 72a413425..390b286a6 100644 --- a/CGMES_3.0.0/OrientationKind.hpp +++ b/CGMES_3.0.0/OrientationKind.hpp @@ -9,21 +9,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The orientation of the coordinate system with respect to top, left, and the coordinate number system. - */ + /** \brief The orientation of the coordinate system with respect to top, left, and the coordinate number system. */ class OrientationKind { public: enum OrientationKind_ENUM { - /** - * For 2D diagrams, a positive orientation will result in X values increasing from left to right and Y values increasing from bottom to top. This is also known as a right hand orientation. - */ + /** For 2D diagrams, a positive orientation will result in X values increasing from left to right and Y values increasing from bottom to top. This is also known as a right hand orientation. */ positive, - /** - * For 2D diagrams, a negative orientation gives the left-hand orientation (favoured by computer graphics displays) with X values increasing from left to right and Y values increasing from top to bottom. This is also known as a left hand orientation. - */ + /** For 2D diagrams, a negative orientation gives the left-hand orientation (favoured by computer graphics displays) with X values increasing from left to right and Y values increasing from top to bottom. This is also known as a left hand orientation. */ negative, }; diff --git a/CGMES_3.0.0/OverexcLim2.cpp b/CGMES_3.0.0/OverexcLim2.cpp index 72fdf8856..2e9009b9b 100644 --- a/CGMES_3.0.0/OverexcLim2.cpp +++ b/CGMES_3.0.0/OverexcLim2.cpp @@ -8,15 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -OverexcLim2::OverexcLim2() {}; -OverexcLim2::~OverexcLim2() {}; +OverexcLim2::OverexcLim2() {} +OverexcLim2::~OverexcLim2() {} static const std::list PossibleProfilesForClass = { @@ -46,64 +42,66 @@ OverexcLim2::getPossibleProfilesForAttributes() const return map; } - -bool assign_OverexcLim2_ifdlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLim2_ifdlim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLim2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ifdlim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLim2_koi(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLim2_koi(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLim2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->koi; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLim2_voimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLim2_voimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLim2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->voimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLim2_voimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLim2_voimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLim2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->voimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_OverexcLim2_ifdlim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLim2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ifdlim; if (!buffer.str().empty()) @@ -117,7 +115,8 @@ bool get_OverexcLim2_ifdlim(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_OverexcLim2_koi(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLim2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->koi; if (!buffer.str().empty()) @@ -131,7 +130,8 @@ bool get_OverexcLim2_koi(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_OverexcLim2_voimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLim2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->voimax; if (!buffer.str().empty()) @@ -145,7 +145,8 @@ bool get_OverexcLim2_voimax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_OverexcLim2_voimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLim2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLim2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->voimin; if (!buffer.str().empty()) @@ -157,8 +158,6 @@ bool get_OverexcLim2_voimin(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char OverexcLim2::debugName[] = "OverexcLim2"; const char* OverexcLim2::debugString() const { @@ -167,15 +166,15 @@ const char* OverexcLim2::debugString() const void OverexcLim2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:OverexcLim2"), &OverexcLim2_factory)); + factory_map.emplace("cim:OverexcLim2", &OverexcLim2_factory); } void OverexcLim2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OverexcLim2.ifdlim"), &assign_OverexcLim2_ifdlim)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLim2.koi"), &assign_OverexcLim2_koi)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLim2.voimax"), &assign_OverexcLim2_voimax)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLim2.voimin"), &assign_OverexcLim2_voimin)); + assign_map.emplace("cim:OverexcLim2.ifdlim", &assign_OverexcLim2_ifdlim); + assign_map.emplace("cim:OverexcLim2.koi", &assign_OverexcLim2_koi); + assign_map.emplace("cim:OverexcLim2.voimax", &assign_OverexcLim2_voimax); + assign_map.emplace("cim:OverexcLim2.voimin", &assign_OverexcLim2_voimin); } void OverexcLim2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/OverexcLim2.hpp b/CGMES_3.0.0/OverexcLim2.hpp index 868070612..925fd2675 100644 --- a/CGMES_3.0.0/OverexcLim2.hpp +++ b/CGMES_3.0.0/OverexcLim2.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Different from LimIEEEOEL, LimOEL2 has a fixed pickup threshold and reduces the excitation set-point by means of a non-windup integral regulator. Irated is the rated machine excitation current (calculated from nameplate conditions: Vnom, Pnom, CosPhinom). - */ + /** \brief Different from LimIEEEOEL, LimOEL2 has a fixed pickup threshold and reduces the excitation set-point by means of a non-windup integral regulator. Irated is the rated machine excitation current (calculated from nameplate conditions: Vnom, Pnom, CosPhinom). */ class OverexcLim2 : public OverexcitationLimiterDynamics { public: @@ -27,10 +25,17 @@ namespace CIMPP OverexcLim2(); ~OverexcLim2() override; - CIMPP::PU ifdlim; /* Limit value of rated field current (<i>I</i><i><sub>FDLIM</sub></i>). Typical value = 1,05. Default: nullptr */ - CIMPP::PU koi; /* Gain Over excitation limiter (<i>K</i><i><sub>OI</sub></i>). Typical value = 0,1. Default: nullptr */ - CIMPP::PU voimax; /* Maximum error signal (<i>V</i><i><sub>OIMAX</sub></i>) (&gt; OverexcLim2.voimin). Typical value = 0. Default: nullptr */ - CIMPP::PU voimin; /* Minimum error signal (<i>V</i><i><sub>OIMIN</sub></i>) (&lt; OverexcLim2.voimax). Typical value = -9999. Default: nullptr */ + /** \brief Limit value of rated field current (<i>I</i><i><sub>FDLIM</sub></i>). Typical value = 1,05. Default: nullptr */ + CIMPP::PU ifdlim; + + /** \brief Gain Over excitation limiter (<i>K</i><i><sub>OI</sub></i>). Typical value = 0,1. Default: nullptr */ + CIMPP::PU koi; + + /** \brief Maximum error signal (<i>V</i><i><sub>OIMAX</sub></i>) (&gt; OverexcLim2.voimin). Typical value = 0. Default: nullptr */ + CIMPP::PU voimax; + + /** \brief Minimum error signal (<i>V</i><i><sub>OIMIN</sub></i>) (&lt; OverexcLim2.voimax). Typical value = -9999. Default: nullptr */ + CIMPP::PU voimin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/OverexcLimIEEE.cpp b/CGMES_3.0.0/OverexcLimIEEE.cpp index 2061182e7..0fb3e9857 100644 --- a/CGMES_3.0.0/OverexcLimIEEE.cpp +++ b/CGMES_3.0.0/OverexcLimIEEE.cpp @@ -8,17 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" using namespace CIMPP; -OverexcLimIEEE::OverexcLimIEEE() {}; -OverexcLimIEEE::~OverexcLimIEEE() {}; +OverexcLimIEEE::OverexcLimIEEE() {} +OverexcLimIEEE::~OverexcLimIEEE() {} static const std::list PossibleProfilesForClass = { @@ -50,90 +44,94 @@ OverexcLimIEEE::getPossibleProfilesForAttributes() const return map; } - -bool assign_OverexcLimIEEE_hyst(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimIEEE_hyst(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->hyst; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimIEEE_ifdlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimIEEE_ifdlim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ifdlim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimIEEE_ifdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimIEEE_ifdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ifdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimIEEE_itfpu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimIEEE_itfpu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->itfpu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimIEEE_kcd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimIEEE_kcd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kcd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimIEEE_kramp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimIEEE_kramp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kramp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_OverexcLimIEEE_hyst(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hyst; if (!buffer.str().empty()) @@ -147,7 +145,8 @@ bool get_OverexcLimIEEE_hyst(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_OverexcLimIEEE_ifdlim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ifdlim; if (!buffer.str().empty()) @@ -161,7 +160,8 @@ bool get_OverexcLimIEEE_ifdlim(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_OverexcLimIEEE_ifdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ifdmax; if (!buffer.str().empty()) @@ -175,7 +175,8 @@ bool get_OverexcLimIEEE_ifdmax(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_OverexcLimIEEE_itfpu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->itfpu; if (!buffer.str().empty()) @@ -189,7 +190,8 @@ bool get_OverexcLimIEEE_itfpu(const BaseClass* BaseClass_ptr1, std::stringstream bool get_OverexcLimIEEE_kcd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kcd; if (!buffer.str().empty()) @@ -203,7 +205,8 @@ bool get_OverexcLimIEEE_kcd(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_OverexcLimIEEE_kramp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kramp; if (!buffer.str().empty()) @@ -215,8 +218,6 @@ bool get_OverexcLimIEEE_kramp(const BaseClass* BaseClass_ptr1, std::stringstream return false; } - - const char OverexcLimIEEE::debugName[] = "OverexcLimIEEE"; const char* OverexcLimIEEE::debugString() const { @@ -225,17 +226,17 @@ const char* OverexcLimIEEE::debugString() const void OverexcLimIEEE::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:OverexcLimIEEE"), &OverexcLimIEEE_factory)); + factory_map.emplace("cim:OverexcLimIEEE", &OverexcLimIEEE_factory); } void OverexcLimIEEE::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OverexcLimIEEE.hyst"), &assign_OverexcLimIEEE_hyst)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimIEEE.ifdlim"), &assign_OverexcLimIEEE_ifdlim)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimIEEE.ifdmax"), &assign_OverexcLimIEEE_ifdmax)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimIEEE.itfpu"), &assign_OverexcLimIEEE_itfpu)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimIEEE.kcd"), &assign_OverexcLimIEEE_kcd)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimIEEE.kramp"), &assign_OverexcLimIEEE_kramp)); + assign_map.emplace("cim:OverexcLimIEEE.hyst", &assign_OverexcLimIEEE_hyst); + assign_map.emplace("cim:OverexcLimIEEE.ifdlim", &assign_OverexcLimIEEE_ifdlim); + assign_map.emplace("cim:OverexcLimIEEE.ifdmax", &assign_OverexcLimIEEE_ifdmax); + assign_map.emplace("cim:OverexcLimIEEE.itfpu", &assign_OverexcLimIEEE_itfpu); + assign_map.emplace("cim:OverexcLimIEEE.kcd", &assign_OverexcLimIEEE_kcd); + assign_map.emplace("cim:OverexcLimIEEE.kramp", &assign_OverexcLimIEEE_kramp); } void OverexcLimIEEE::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/OverexcLimIEEE.hpp b/CGMES_3.0.0/OverexcLimIEEE.hpp index 84a53169d..88c5268fc 100644 --- a/CGMES_3.0.0/OverexcLimIEEE.hpp +++ b/CGMES_3.0.0/OverexcLimIEEE.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The over excitation limiter model is intended to represent the significant features of OELs necessary for some large-scale system studies. It is the result of a pragmatic approach to obtain a model that can be widely applied with attainable data from generator owners. An attempt to include all variations in the functionality of OELs and duplicate how they interact with the rest of the excitation systems would likely result in a level of application insufficient for the studies for which they are intended. Reference: IEEE OEL 421.5-2005, 9. - */ + /** \brief The over excitation limiter model is intended to represent the significant features of OELs necessary for some large-scale system studies. It is the result of a pragmatic approach to obtain a model that can be widely applied with attainable data from generator owners. An attempt to include all variations in the functionality of OELs and duplicate how they interact with the rest of the excitation systems would likely result in a level of application insufficient for the studies for which they are intended. Reference: IEEE OEL 421.5-2005, 9. */ class OverexcLimIEEE : public OverexcitationLimiterDynamics { public: @@ -28,12 +26,23 @@ namespace CIMPP OverexcLimIEEE(); ~OverexcLimIEEE() override; - CIMPP::PU hyst; /* OEL pickup/drop-out hysteresis (<i>HYST</i>). Typical value = 0,03. Default: nullptr */ - CIMPP::PU ifdlim; /* OEL timed field current limit (<i>I</i><i><sub>FDLIM</sub></i>). Typical value = 1,05. Default: nullptr */ - CIMPP::PU ifdmax; /* OEL instantaneous field current limit (<i>I</i><i><sub>FDMAX</sub></i>). Typical value = 1,5. Default: nullptr */ - CIMPP::PU itfpu; /* OEL timed field current limiter pickup level (<i>I</i><i><sub>TFPU</sub></i>). Typical value = 1,05. Default: nullptr */ - CIMPP::PU kcd; /* OEL cooldown gain (<i>K</i><i><sub>CD</sub></i>). Typical value = 1. Default: nullptr */ - CIMPP::Float kramp; /* OEL ramped limit rate (<i>K</i><i><sub>RAMP</sub></i>). Unit = PU / s. Typical value = 10. Default: 0.0 */ + /** \brief OEL pickup/drop-out hysteresis (<i>HYST</i>). Typical value = 0,03. Default: nullptr */ + CIMPP::PU hyst; + + /** \brief OEL timed field current limit (<i>I</i><i><sub>FDLIM</sub></i>). Typical value = 1,05. Default: nullptr */ + CIMPP::PU ifdlim; + + /** \brief OEL instantaneous field current limit (<i>I</i><i><sub>FDMAX</sub></i>). Typical value = 1,5. Default: nullptr */ + CIMPP::PU ifdmax; + + /** \brief OEL timed field current limiter pickup level (<i>I</i><i><sub>TFPU</sub></i>). Typical value = 1,05. Default: nullptr */ + CIMPP::PU itfpu; + + /** \brief OEL cooldown gain (<i>K</i><i><sub>CD</sub></i>). Typical value = 1. Default: nullptr */ + CIMPP::PU kcd; + + /** \brief OEL ramped limit rate (<i>K</i><i><sub>RAMP</sub></i>). Unit = PU / s. Typical value = 10. Default: 0.0 */ + CIMPP::Float kramp; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/OverexcLimX1.cpp b/CGMES_3.0.0/OverexcLimX1.cpp index 626fe56e4..c299b0d73 100644 --- a/CGMES_3.0.0/OverexcLimX1.cpp +++ b/CGMES_3.0.0/OverexcLimX1.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" using namespace CIMPP; -OverexcLimX1::OverexcLimX1() {}; -OverexcLimX1::~OverexcLimX1() {}; +OverexcLimX1::OverexcLimX1() {} +OverexcLimX1::~OverexcLimX1() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ OverexcLimX1::getPossibleProfilesForAttributes() const return map; } - -bool assign_OverexcLimX1_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX1_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX1_efd3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_efd3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX1_efddes(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_efddes(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efddes; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX1_efdrated(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_efdrated(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdrated; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX1_kmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_kmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX1_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX1_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX1_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX1_vlow(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX1_vlow(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vlow; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_OverexcLimX1_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_OverexcLimX1_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_OverexcLimX1_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_OverexcLimX1_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_OverexcLimX1_efd3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd3; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_OverexcLimX1_efd3(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_OverexcLimX1_efddes(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efddes; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_OverexcLimX1_efddes(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_OverexcLimX1_efdrated(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdrated; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_OverexcLimX1_efdrated(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_OverexcLimX1_kmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kmx; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_OverexcLimX1_kmx(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_OverexcLimX1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_OverexcLimX1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_OverexcLimX1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_OverexcLimX1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_OverexcLimX1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_OverexcLimX1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_OverexcLimX1_vlow(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vlow; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_OverexcLimX1_vlow(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char OverexcLimX1::debugName[] = "OverexcLimX1"; const char* OverexcLimX1::debugString() const { @@ -341,21 +346,21 @@ const char* OverexcLimX1::debugString() const void OverexcLimX1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:OverexcLimX1"), &OverexcLimX1_factory)); + factory_map.emplace("cim:OverexcLimX1", &OverexcLimX1_factory); } void OverexcLimX1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.efd1"), &assign_OverexcLimX1_efd1)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.efd2"), &assign_OverexcLimX1_efd2)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.efd3"), &assign_OverexcLimX1_efd3)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.efddes"), &assign_OverexcLimX1_efddes)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.efdrated"), &assign_OverexcLimX1_efdrated)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.kmx"), &assign_OverexcLimX1_kmx)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.t1"), &assign_OverexcLimX1_t1)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.t2"), &assign_OverexcLimX1_t2)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.t3"), &assign_OverexcLimX1_t3)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX1.vlow"), &assign_OverexcLimX1_vlow)); + assign_map.emplace("cim:OverexcLimX1.efd1", &assign_OverexcLimX1_efd1); + assign_map.emplace("cim:OverexcLimX1.efd2", &assign_OverexcLimX1_efd2); + assign_map.emplace("cim:OverexcLimX1.efd3", &assign_OverexcLimX1_efd3); + assign_map.emplace("cim:OverexcLimX1.efddes", &assign_OverexcLimX1_efddes); + assign_map.emplace("cim:OverexcLimX1.efdrated", &assign_OverexcLimX1_efdrated); + assign_map.emplace("cim:OverexcLimX1.kmx", &assign_OverexcLimX1_kmx); + assign_map.emplace("cim:OverexcLimX1.t1", &assign_OverexcLimX1_t1); + assign_map.emplace("cim:OverexcLimX1.t2", &assign_OverexcLimX1_t2); + assign_map.emplace("cim:OverexcLimX1.t3", &assign_OverexcLimX1_t3); + assign_map.emplace("cim:OverexcLimX1.vlow", &assign_OverexcLimX1_vlow); } void OverexcLimX1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/OverexcLimX1.hpp b/CGMES_3.0.0/OverexcLimX1.hpp index a2103594d..06ce2480b 100644 --- a/CGMES_3.0.0/OverexcLimX1.hpp +++ b/CGMES_3.0.0/OverexcLimX1.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Field voltage over excitation limiter. - */ + /** \brief Field voltage over excitation limiter. */ class OverexcLimX1 : public OverexcitationLimiterDynamics { public: @@ -28,16 +26,35 @@ namespace CIMPP OverexcLimX1(); ~OverexcLimX1() override; - CIMPP::PU efd1; /* Low voltage point on the inverse time characteristic (<i>EFD</i><i><sub>1</sub></i>). Typical value = 1,1. Default: nullptr */ - CIMPP::PU efd2; /* Mid voltage point on the inverse time characteristic (<i>EFD</i><i><sub>2</sub></i>). Typical value = 1,2. Default: nullptr */ - CIMPP::PU efd3; /* High voltage point on the inverse time characteristic (<i>EFD</i><i><sub>3</sub></i>). Typical value = 1,5. Default: nullptr */ - CIMPP::PU efddes; /* Desired field voltage (<i>EFD</i><i><sub>DES</sub></i>). Typical value = 0,9. Default: nullptr */ - CIMPP::PU efdrated; /* Rated field voltage (<i>EFD</i><i><sub>RATED</sub></i>). Typical value = 1,05. Default: nullptr */ - CIMPP::PU kmx; /* Gain (<i>K</i><i><sub>MX</sub></i>). Typical value = 0,01. Default: nullptr */ - CIMPP::Seconds t1; /* Time to trip the exciter at the low voltage point on the inverse time characteristic (<i>TIME</i><i><sub>1</sub></i>) (&gt;= 0). Typical value = 120. Default: nullptr */ - CIMPP::Seconds t2; /* Time to trip the exciter at the mid voltage point on the inverse time characteristic (<i>TIME</i><i><sub>2</sub></i>) (&gt;= 0). Typical value = 40. Default: nullptr */ - CIMPP::Seconds t3; /* Time to trip the exciter at the high voltage point on the inverse time characteristic (<i>TIME</i><i><sub>3</sub></i>) (&gt;= 0). Typical value = 15. Default: nullptr */ - CIMPP::PU vlow; /* Low voltage limit (<i>V</i><i><sub>LOW</sub></i>) (&gt; 0). Default: nullptr */ + /** \brief Low voltage point on the inverse time characteristic (<i>EFD</i><i><sub>1</sub></i>). Typical value = 1,1. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Mid voltage point on the inverse time characteristic (<i>EFD</i><i><sub>2</sub></i>). Typical value = 1,2. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief High voltage point on the inverse time characteristic (<i>EFD</i><i><sub>3</sub></i>). Typical value = 1,5. Default: nullptr */ + CIMPP::PU efd3; + + /** \brief Desired field voltage (<i>EFD</i><i><sub>DES</sub></i>). Typical value = 0,9. Default: nullptr */ + CIMPP::PU efddes; + + /** \brief Rated field voltage (<i>EFD</i><i><sub>RATED</sub></i>). Typical value = 1,05. Default: nullptr */ + CIMPP::PU efdrated; + + /** \brief Gain (<i>K</i><i><sub>MX</sub></i>). Typical value = 0,01. Default: nullptr */ + CIMPP::PU kmx; + + /** \brief Time to trip the exciter at the low voltage point on the inverse time characteristic (<i>TIME</i><i><sub>1</sub></i>) (&gt;= 0). Typical value = 120. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Time to trip the exciter at the mid voltage point on the inverse time characteristic (<i>TIME</i><i><sub>2</sub></i>) (&gt;= 0). Typical value = 40. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Time to trip the exciter at the high voltage point on the inverse time characteristic (<i>TIME</i><i><sub>3</sub></i>) (&gt;= 0). Typical value = 15. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Low voltage limit (<i>V</i><i><sub>LOW</sub></i>) (&gt; 0). Default: nullptr */ + CIMPP::PU vlow; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/OverexcLimX2.cpp b/CGMES_3.0.0/OverexcLimX2.cpp index 687643215..0a0443e80 100644 --- a/CGMES_3.0.0/OverexcLimX2.cpp +++ b/CGMES_3.0.0/OverexcLimX2.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" using namespace CIMPP; -OverexcLimX2::OverexcLimX2() {}; -OverexcLimX2::~OverexcLimX2() {}; +OverexcLimX2::OverexcLimX2() {} +OverexcLimX2::~OverexcLimX2() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ OverexcLimX2::getPossibleProfilesForAttributes() const return map; } - -bool assign_OverexcLimX2_efd1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_efd1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_efd2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_efd2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_efd3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_efd3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efd3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_efddes(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_efddes(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efddes; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_efdrated(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_efdrated(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdrated; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_kmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_kmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_m(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_m(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->m; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_OverexcLimX2_vlow(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_OverexcLimX2_vlow(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vlow; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_OverexcLimX2_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd1; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_OverexcLimX2_efd1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_OverexcLimX2_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd2; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_OverexcLimX2_efd2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_OverexcLimX2_efd3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efd3; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_OverexcLimX2_efd3(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_OverexcLimX2_efddes(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efddes; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_OverexcLimX2_efddes(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_OverexcLimX2_efdrated(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdrated; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_OverexcLimX2_efdrated(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_OverexcLimX2_kmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kmx; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_OverexcLimX2_kmx(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_OverexcLimX2_m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->m; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_OverexcLimX2_m(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_OverexcLimX2_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_OverexcLimX2_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_OverexcLimX2_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_OverexcLimX2_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_OverexcLimX2_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_OverexcLimX2_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_OverexcLimX2_vlow(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const OverexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vlow; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_OverexcLimX2_vlow(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char OverexcLimX2::debugName[] = "OverexcLimX2"; const char* OverexcLimX2::debugString() const { @@ -370,22 +376,22 @@ const char* OverexcLimX2::debugString() const void OverexcLimX2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:OverexcLimX2"), &OverexcLimX2_factory)); + factory_map.emplace("cim:OverexcLimX2", &OverexcLimX2_factory); } void OverexcLimX2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.efd1"), &assign_OverexcLimX2_efd1)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.efd2"), &assign_OverexcLimX2_efd2)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.efd3"), &assign_OverexcLimX2_efd3)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.efddes"), &assign_OverexcLimX2_efddes)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.efdrated"), &assign_OverexcLimX2_efdrated)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.kmx"), &assign_OverexcLimX2_kmx)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.m"), &assign_OverexcLimX2_m)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.t1"), &assign_OverexcLimX2_t1)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.t2"), &assign_OverexcLimX2_t2)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.t3"), &assign_OverexcLimX2_t3)); - assign_map.insert(std::make_pair(std::string("cim:OverexcLimX2.vlow"), &assign_OverexcLimX2_vlow)); + assign_map.emplace("cim:OverexcLimX2.efd1", &assign_OverexcLimX2_efd1); + assign_map.emplace("cim:OverexcLimX2.efd2", &assign_OverexcLimX2_efd2); + assign_map.emplace("cim:OverexcLimX2.efd3", &assign_OverexcLimX2_efd3); + assign_map.emplace("cim:OverexcLimX2.efddes", &assign_OverexcLimX2_efddes); + assign_map.emplace("cim:OverexcLimX2.efdrated", &assign_OverexcLimX2_efdrated); + assign_map.emplace("cim:OverexcLimX2.kmx", &assign_OverexcLimX2_kmx); + assign_map.emplace("cim:OverexcLimX2.m", &assign_OverexcLimX2_m); + assign_map.emplace("cim:OverexcLimX2.t1", &assign_OverexcLimX2_t1); + assign_map.emplace("cim:OverexcLimX2.t2", &assign_OverexcLimX2_t2); + assign_map.emplace("cim:OverexcLimX2.t3", &assign_OverexcLimX2_t3); + assign_map.emplace("cim:OverexcLimX2.vlow", &assign_OverexcLimX2_vlow); } void OverexcLimX2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/OverexcLimX2.hpp b/CGMES_3.0.0/OverexcLimX2.hpp index 99c6e7c47..5d70ef64f 100644 --- a/CGMES_3.0.0/OverexcLimX2.hpp +++ b/CGMES_3.0.0/OverexcLimX2.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Field voltage or current overexcitation limiter designed to protect the generator field of an AC machine with automatic excitation control from overheating due to prolonged overexcitation. - */ + /** \brief Field voltage or current overexcitation limiter designed to protect the generator field of an AC machine with automatic excitation control from overheating due to prolonged overexcitation. */ class OverexcLimX2 : public OverexcitationLimiterDynamics { public: @@ -29,17 +27,38 @@ namespace CIMPP OverexcLimX2(); ~OverexcLimX2() override; - CIMPP::PU efd1; /* Low voltage or current point on the inverse time characteristic (<i>EFD</i><i><sub>1</sub></i>). Typical value = 1,1. Default: nullptr */ - CIMPP::PU efd2; /* Mid voltage or current point on the inverse time characteristic (<i>EFD</i><i><sub>2</sub></i>). Typical value = 1,2. Default: nullptr */ - CIMPP::PU efd3; /* High voltage or current point on the inverse time characteristic (<i>EFD</i><i><sub>3</sub></i>). Typical value = 1,5. Default: nullptr */ - CIMPP::PU efddes; /* Desired field voltage if <i>m</i> = false or desired field current if <i>m </i>= true (<i>EFD</i><i><sub>DES</sub></i>). Typical value = 1. Default: nullptr */ - CIMPP::PU efdrated; /* Rated field voltage if m = false or rated field current if m = true (<i>EFD</i><i><sub>RATED</sub></i>). Typical value = 1,05. Default: nullptr */ - CIMPP::PU kmx; /* Gain (<i>K</i><i><sub>MX</sub></i>). Typical value = 0,002. Default: nullptr */ - CIMPP::Boolean m; /* (<i>m</i>). true = IFD limiting false = EFD limiting. Default: false */ - CIMPP::Seconds t1; /* Time to trip the exciter at the low voltage or current point on the inverse time characteristic (<i>TIME</i><i><sub>1</sub></i>) (&gt;= 0). Typical value = 120. Default: nullptr */ - CIMPP::Seconds t2; /* Time to trip the exciter at the mid voltage or current point on the inverse time characteristic (<i>TIME</i><i><sub>2</sub></i>) (&gt;= 0). Typical value = 40. Default: nullptr */ - CIMPP::Seconds t3; /* Time to trip the exciter at the high voltage or current point on the inverse time characteristic (<i>TIME</i><i><sub>3</sub></i>) (&gt;= 0). Typical value = 15. Default: nullptr */ - CIMPP::PU vlow; /* Low voltage limit (<i>V</i><i><sub>LOW</sub></i>) (&gt; 0). Default: nullptr */ + /** \brief Low voltage or current point on the inverse time characteristic (<i>EFD</i><i><sub>1</sub></i>). Typical value = 1,1. Default: nullptr */ + CIMPP::PU efd1; + + /** \brief Mid voltage or current point on the inverse time characteristic (<i>EFD</i><i><sub>2</sub></i>). Typical value = 1,2. Default: nullptr */ + CIMPP::PU efd2; + + /** \brief High voltage or current point on the inverse time characteristic (<i>EFD</i><i><sub>3</sub></i>). Typical value = 1,5. Default: nullptr */ + CIMPP::PU efd3; + + /** \brief Desired field voltage if <i>m</i> = false or desired field current if <i>m </i>= true (<i>EFD</i><i><sub>DES</sub></i>). Typical value = 1. Default: nullptr */ + CIMPP::PU efddes; + + /** \brief Rated field voltage if m = false or rated field current if m = true (<i>EFD</i><i><sub>RATED</sub></i>). Typical value = 1,05. Default: nullptr */ + CIMPP::PU efdrated; + + /** \brief Gain (<i>K</i><i><sub>MX</sub></i>). Typical value = 0,002. Default: nullptr */ + CIMPP::PU kmx; + + /** \brief (<i>m</i>). true = IFD limiting false = EFD limiting. Default: false */ + CIMPP::Boolean m; + + /** \brief Time to trip the exciter at the low voltage or current point on the inverse time characteristic (<i>TIME</i><i><sub>1</sub></i>) (&gt;= 0). Typical value = 120. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Time to trip the exciter at the mid voltage or current point on the inverse time characteristic (<i>TIME</i><i><sub>2</sub></i>) (&gt;= 0). Typical value = 40. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Time to trip the exciter at the high voltage or current point on the inverse time characteristic (<i>TIME</i><i><sub>3</sub></i>) (&gt;= 0). Typical value = 15. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Low voltage limit (<i>V</i><i><sub>LOW</sub></i>) (&gt; 0). Default: nullptr */ + CIMPP::PU vlow; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/OverexcitationLimiterDynamics.cpp b/CGMES_3.0.0/OverexcitationLimiterDynamics.cpp index d21fcf0aa..bab89ee82 100644 --- a/CGMES_3.0.0/OverexcitationLimiterDynamics.cpp +++ b/CGMES_3.0.0/OverexcitationLimiterDynamics.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -OverexcitationLimiterDynamics::OverexcitationLimiterDynamics() : ExcitationSystemDynamics(nullptr) {}; -OverexcitationLimiterDynamics::~OverexcitationLimiterDynamics() {}; +OverexcitationLimiterDynamics::OverexcitationLimiterDynamics() : ExcitationSystemDynamics(nullptr) {} +OverexcitationLimiterDynamics::~OverexcitationLimiterDynamics() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ OverexcitationLimiterDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_ExcitationSystemDynamics_OverexcitationLimiterDynamics(BaseClass*, BaseClass*); bool assign_OverexcitationLimiterDynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_OverexcitationLimiterDynamics_ExcitationSystemDynamics(BaseClass* Ba return false; } - bool get_OverexcitationLimiterDynamics_ExcitationSystemDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const OverexcitationLimiterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const OverexcitationLimiterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ExcitationSystemDynamics != 0) { @@ -73,7 +71,6 @@ bool get_OverexcitationLimiterDynamics_ExcitationSystemDynamics(const BaseClass* return false; } - const char OverexcitationLimiterDynamics::debugName[] = "OverexcitationLimiterDynamics"; const char* OverexcitationLimiterDynamics::debugString() const { @@ -82,7 +79,7 @@ const char* OverexcitationLimiterDynamics::debugString() const void OverexcitationLimiterDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:OverexcitationLimiterDynamics"), &OverexcitationLimiterDynamics_factory)); + factory_map.emplace("cim:OverexcitationLimiterDynamics", &OverexcitationLimiterDynamics_factory); } void OverexcitationLimiterDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void OverexcitationLimiterDynamics::addPrimitiveAssignFnsToMap(std::unordered_ma void OverexcitationLimiterDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OverexcitationLimiterDynamics.ExcitationSystemDynamics"), &assign_OverexcitationLimiterDynamics_ExcitationSystemDynamics)); + assign_map.emplace("cim:OverexcitationLimiterDynamics.ExcitationSystemDynamics", &assign_OverexcitationLimiterDynamics_ExcitationSystemDynamics); } void OverexcitationLimiterDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/OverexcitationLimiterDynamics.hpp b/CGMES_3.0.0/OverexcitationLimiterDynamics.hpp index 9e9219a93..a3a94b41f 100644 --- a/CGMES_3.0.0/OverexcitationLimiterDynamics.hpp +++ b/CGMES_3.0.0/OverexcitationLimiterDynamics.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class ExcitationSystemDynamics; - /* - Overexcitation limiter function block whose behaviour is described by reference to a standard model or by definition of a user-defined model. - */ + /** \brief Overexcitation limiter function block whose behaviour is described by reference to a standard model or by definition of a user-defined model. */ class OverexcitationLimiterDynamics : public DynamicsFunctionBlock { public: @@ -27,7 +25,8 @@ namespace CIMPP OverexcitationLimiterDynamics(); ~OverexcitationLimiterDynamics() override; - CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; /* Excitation system model with which this overexcitation limiter model is associated. Default: 0 */ + /** \brief Excitation system model with which this overexcitation limiter model is associated. Default: 0 */ + CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/OverexcitationLimiterUserDefined.cpp b/CGMES_3.0.0/OverexcitationLimiterUserDefined.cpp index d5969a0f7..18a97fc36 100644 --- a/CGMES_3.0.0/OverexcitationLimiterUserDefined.cpp +++ b/CGMES_3.0.0/OverexcitationLimiterUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -OverexcitationLimiterUserDefined::OverexcitationLimiterUserDefined() {}; -OverexcitationLimiterUserDefined::~OverexcitationLimiterUserDefined() {}; +OverexcitationLimiterUserDefined::OverexcitationLimiterUserDefined() {} +OverexcitationLimiterUserDefined::~OverexcitationLimiterUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ OverexcitationLimiterUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_OverexcitationLimiterUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (OverexcitationLimiterUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_OverexcitationLimiterUserDefined(BaseClass*, BaseClass*); bool assign_OverexcitationLimiterUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_OverexcitationLimiterUserDefined_ProprietaryParameterDynamics(BaseCl return false; } +bool assign_OverexcitationLimiterUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + OverexcitationLimiterUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_OverexcitationLimiterUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const OverexcitationLimiterUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const OverexcitationLimiterUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_OverexcitationLimiterUserDefined_proprietary(const BaseClass* BaseClass return false; } - - const char OverexcitationLimiterUserDefined::debugName[] = "OverexcitationLimiterUserDefined"; const char* OverexcitationLimiterUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* OverexcitationLimiterUserDefined::debugString() const void OverexcitationLimiterUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:OverexcitationLimiterUserDefined"), &OverexcitationLimiterUserDefined_factory)); + factory_map.emplace("cim:OverexcitationLimiterUserDefined", &OverexcitationLimiterUserDefined_factory); } void OverexcitationLimiterUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OverexcitationLimiterUserDefined.proprietary"), &assign_OverexcitationLimiterUserDefined_proprietary)); + assign_map.emplace("cim:OverexcitationLimiterUserDefined.proprietary", &assign_OverexcitationLimiterUserDefined_proprietary); } void OverexcitationLimiterUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:OverexcitationLimiterUserDefined.ProprietaryParameterDynamics"), &assign_OverexcitationLimiterUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:OverexcitationLimiterUserDefined.ProprietaryParameterDynamics", &assign_OverexcitationLimiterUserDefined_ProprietaryParameterDynamics); } void OverexcitationLimiterUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/OverexcitationLimiterUserDefined.hpp b/CGMES_3.0.0/OverexcitationLimiterUserDefined.hpp index 98032db48..d27d83405 100644 --- a/CGMES_3.0.0/OverexcitationLimiterUserDefined.hpp +++ b/CGMES_3.0.0/OverexcitationLimiterUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Overexcitation limiter system function block whose dynamic behaviour is described by a user-defined model. - */ + /** \brief Overexcitation limiter system function block whose dynamic behaviour is described by a user-defined model. */ class OverexcitationLimiterUserDefined : public OverexcitationLimiterDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP OverexcitationLimiterUserDefined(); ~OverexcitationLimiterUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PFVArControllerType1Dynamics.cpp b/CGMES_3.0.0/PFVArControllerType1Dynamics.cpp index 544174545..a9e1de1b5 100644 --- a/CGMES_3.0.0/PFVArControllerType1Dynamics.cpp +++ b/CGMES_3.0.0/PFVArControllerType1Dynamics.cpp @@ -14,8 +14,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -PFVArControllerType1Dynamics::PFVArControllerType1Dynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr), VoltageAdjusterDynamics(nullptr) {}; -PFVArControllerType1Dynamics::~PFVArControllerType1Dynamics() {}; +PFVArControllerType1Dynamics::PFVArControllerType1Dynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr), VoltageAdjusterDynamics(nullptr) {} +PFVArControllerType1Dynamics::~PFVArControllerType1Dynamics() {} static const std::list PossibleProfilesForClass = { @@ -44,8 +44,6 @@ PFVArControllerType1Dynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_ExcitationSystemDynamics_PFVArControllerType1Dynamics(BaseClass*, BaseClass*); bool assign_PFVArControllerType1Dynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -62,6 +60,7 @@ bool assign_PFVArControllerType1Dynamics_ExcitationSystemDynamics(BaseClass* Bas } return false; } + bool assign_RemoteInputSignal_PFVArControllerType1Dynamics(BaseClass*, BaseClass*); bool assign_PFVArControllerType1Dynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -78,6 +77,7 @@ bool assign_PFVArControllerType1Dynamics_RemoteInputSignal(BaseClass* BaseClass_ } return false; } + bool assign_VoltageAdjusterDynamics_PFVArControllerType1Dynamics(BaseClass*, BaseClass*); bool assign_PFVArControllerType1Dynamics_VoltageAdjusterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -95,10 +95,10 @@ bool assign_PFVArControllerType1Dynamics_VoltageAdjusterDynamics(BaseClass* Base return false; } - bool get_PFVArControllerType1Dynamics_ExcitationSystemDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const PFVArControllerType1Dynamics* element = dynamic_cast(BaseClass_ptr1)) + const PFVArControllerType1Dynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ExcitationSystemDynamics != 0) { @@ -110,6 +110,7 @@ bool get_PFVArControllerType1Dynamics_ExcitationSystemDynamics(const BaseClass* } + const char PFVArControllerType1Dynamics::debugName[] = "PFVArControllerType1Dynamics"; const char* PFVArControllerType1Dynamics::debugString() const { @@ -118,7 +119,7 @@ const char* PFVArControllerType1Dynamics::debugString() const void PFVArControllerType1Dynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PFVArControllerType1Dynamics"), &PFVArControllerType1Dynamics_factory)); + factory_map.emplace("cim:PFVArControllerType1Dynamics", &PFVArControllerType1Dynamics_factory); } void PFVArControllerType1Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -127,9 +128,9 @@ void PFVArControllerType1Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map void PFVArControllerType1Dynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType1Dynamics.ExcitationSystemDynamics"), &assign_PFVArControllerType1Dynamics_ExcitationSystemDynamics)); - assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType1Dynamics.RemoteInputSignal"), &assign_PFVArControllerType1Dynamics_RemoteInputSignal)); - assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType1Dynamics.VoltageAdjusterDynamics"), &assign_PFVArControllerType1Dynamics_VoltageAdjusterDynamics)); + assign_map.emplace("cim:PFVArControllerType1Dynamics.ExcitationSystemDynamics", &assign_PFVArControllerType1Dynamics_ExcitationSystemDynamics); + assign_map.emplace("cim:PFVArControllerType1Dynamics.RemoteInputSignal", &assign_PFVArControllerType1Dynamics_RemoteInputSignal); + assign_map.emplace("cim:PFVArControllerType1Dynamics.VoltageAdjusterDynamics", &assign_PFVArControllerType1Dynamics_VoltageAdjusterDynamics); } void PFVArControllerType1Dynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/PFVArControllerType1Dynamics.hpp b/CGMES_3.0.0/PFVArControllerType1Dynamics.hpp index e4616b053..8dded7991 100644 --- a/CGMES_3.0.0/PFVArControllerType1Dynamics.hpp +++ b/CGMES_3.0.0/PFVArControllerType1Dynamics.hpp @@ -19,9 +19,7 @@ namespace CIMPP class RemoteInputSignal; class VoltageAdjusterDynamics; - /* - Power factor or VAr controller type 1 function block whose behaviour is described by reference to a standard model or by definition of a user-defined model. - */ + /** \brief Power factor or VAr controller type 1 function block whose behaviour is described by reference to a standard model or by definition of a user-defined model. */ class PFVArControllerType1Dynamics : public DynamicsFunctionBlock { public: @@ -29,9 +27,14 @@ namespace CIMPP PFVArControllerType1Dynamics(); ~PFVArControllerType1Dynamics() override; - CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; /* Excitation system model with which this power actor or VAr controller type 1 model is associated. Default: 0 */ - CIMPP::RemoteInputSignal* RemoteInputSignal; /* Remote input signal used by this power factor or VAr controller type 1 model. Default: 0 */ - CIMPP::VoltageAdjusterDynamics* VoltageAdjusterDynamics; /* Voltage adjuster model associated with this power factor or VAr controller type 1 model. Default: 0 */ + /** \brief Excitation system model with which this power actor or VAr controller type 1 model is associated. Default: 0 */ + CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; + + /** \brief Remote input signal used by this power factor or VAr controller type 1 model. Default: 0 */ + CIMPP::RemoteInputSignal* RemoteInputSignal; + + /** \brief Voltage adjuster model associated with this power factor or VAr controller type 1 model. Default: 0 */ + CIMPP::VoltageAdjusterDynamics* VoltageAdjusterDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PFVArControllerType1UserDefined.cpp b/CGMES_3.0.0/PFVArControllerType1UserDefined.cpp index e539e26f4..10b773647 100644 --- a/CGMES_3.0.0/PFVArControllerType1UserDefined.cpp +++ b/CGMES_3.0.0/PFVArControllerType1UserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -PFVArControllerType1UserDefined::PFVArControllerType1UserDefined() {}; -PFVArControllerType1UserDefined::~PFVArControllerType1UserDefined() {}; +PFVArControllerType1UserDefined::PFVArControllerType1UserDefined() {} +PFVArControllerType1UserDefined::~PFVArControllerType1UserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ PFVArControllerType1UserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_PFVArControllerType1UserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (PFVArControllerType1UserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_PFVArControllerType1UserDefined(BaseClass*, BaseClass*); bool assign_PFVArControllerType1UserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_PFVArControllerType1UserDefined_ProprietaryParameterDynamics(BaseCla return false; } +bool assign_PFVArControllerType1UserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + PFVArControllerType1UserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_PFVArControllerType1UserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArControllerType1UserDefined* element = dynamic_cast(BaseClass_ptr1)) + const PFVArControllerType1UserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_PFVArControllerType1UserDefined_proprietary(const BaseClass* BaseClass_ return false; } - - const char PFVArControllerType1UserDefined::debugName[] = "PFVArControllerType1UserDefined"; const char* PFVArControllerType1UserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* PFVArControllerType1UserDefined::debugString() const void PFVArControllerType1UserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PFVArControllerType1UserDefined"), &PFVArControllerType1UserDefined_factory)); + factory_map.emplace("cim:PFVArControllerType1UserDefined", &PFVArControllerType1UserDefined_factory); } void PFVArControllerType1UserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType1UserDefined.proprietary"), &assign_PFVArControllerType1UserDefined_proprietary)); + assign_map.emplace("cim:PFVArControllerType1UserDefined.proprietary", &assign_PFVArControllerType1UserDefined_proprietary); } void PFVArControllerType1UserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType1UserDefined.ProprietaryParameterDynamics"), &assign_PFVArControllerType1UserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:PFVArControllerType1UserDefined.ProprietaryParameterDynamics", &assign_PFVArControllerType1UserDefined_ProprietaryParameterDynamics); } void PFVArControllerType1UserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/PFVArControllerType1UserDefined.hpp b/CGMES_3.0.0/PFVArControllerType1UserDefined.hpp index 98171da86..ac64de6f1 100644 --- a/CGMES_3.0.0/PFVArControllerType1UserDefined.hpp +++ b/CGMES_3.0.0/PFVArControllerType1UserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Power factor or VAr controller type 1 function block whose dynamic behaviour is described by a user-defined model. - */ + /** \brief Power factor or VAr controller type 1 function block whose dynamic behaviour is described by a user-defined model. */ class PFVArControllerType1UserDefined : public PFVArControllerType1Dynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP PFVArControllerType1UserDefined(); ~PFVArControllerType1UserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PFVArControllerType2Dynamics.cpp b/CGMES_3.0.0/PFVArControllerType2Dynamics.cpp index c595f575a..e6c875b3a 100644 --- a/CGMES_3.0.0/PFVArControllerType2Dynamics.cpp +++ b/CGMES_3.0.0/PFVArControllerType2Dynamics.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -PFVArControllerType2Dynamics::PFVArControllerType2Dynamics() : ExcitationSystemDynamics(nullptr) {}; -PFVArControllerType2Dynamics::~PFVArControllerType2Dynamics() {}; +PFVArControllerType2Dynamics::PFVArControllerType2Dynamics() : ExcitationSystemDynamics(nullptr) {} +PFVArControllerType2Dynamics::~PFVArControllerType2Dynamics() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ PFVArControllerType2Dynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_ExcitationSystemDynamics_PFVArControllerType2Dynamics(BaseClass*, BaseClass*); bool assign_PFVArControllerType2Dynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_PFVArControllerType2Dynamics_ExcitationSystemDynamics(BaseClass* Bas return false; } - bool get_PFVArControllerType2Dynamics_ExcitationSystemDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const PFVArControllerType2Dynamics* element = dynamic_cast(BaseClass_ptr1)) + const PFVArControllerType2Dynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ExcitationSystemDynamics != 0) { @@ -73,7 +71,6 @@ bool get_PFVArControllerType2Dynamics_ExcitationSystemDynamics(const BaseClass* return false; } - const char PFVArControllerType2Dynamics::debugName[] = "PFVArControllerType2Dynamics"; const char* PFVArControllerType2Dynamics::debugString() const { @@ -82,7 +79,7 @@ const char* PFVArControllerType2Dynamics::debugString() const void PFVArControllerType2Dynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PFVArControllerType2Dynamics"), &PFVArControllerType2Dynamics_factory)); + factory_map.emplace("cim:PFVArControllerType2Dynamics", &PFVArControllerType2Dynamics_factory); } void PFVArControllerType2Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void PFVArControllerType2Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map void PFVArControllerType2Dynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType2Dynamics.ExcitationSystemDynamics"), &assign_PFVArControllerType2Dynamics_ExcitationSystemDynamics)); + assign_map.emplace("cim:PFVArControllerType2Dynamics.ExcitationSystemDynamics", &assign_PFVArControllerType2Dynamics_ExcitationSystemDynamics); } void PFVArControllerType2Dynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/PFVArControllerType2Dynamics.hpp b/CGMES_3.0.0/PFVArControllerType2Dynamics.hpp index 5537d346e..5d6176f4c 100644 --- a/CGMES_3.0.0/PFVArControllerType2Dynamics.hpp +++ b/CGMES_3.0.0/PFVArControllerType2Dynamics.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class ExcitationSystemDynamics; - /* - Power factor or VAr controller type 2 function block whose behaviour is described by reference to a standard model or by definition of a user-defined model. - */ + /** \brief Power factor or VAr controller type 2 function block whose behaviour is described by reference to a standard model or by definition of a user-defined model. */ class PFVArControllerType2Dynamics : public DynamicsFunctionBlock { public: @@ -27,7 +25,8 @@ namespace CIMPP PFVArControllerType2Dynamics(); ~PFVArControllerType2Dynamics() override; - CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; /* Excitation system model with which this power factor or VAr controller type 2 is associated. Default: 0 */ + /** \brief Excitation system model with which this power factor or VAr controller type 2 is associated. Default: 0 */ + CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PFVArControllerType2UserDefined.cpp b/CGMES_3.0.0/PFVArControllerType2UserDefined.cpp index 4862d275e..166ceecea 100644 --- a/CGMES_3.0.0/PFVArControllerType2UserDefined.cpp +++ b/CGMES_3.0.0/PFVArControllerType2UserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -PFVArControllerType2UserDefined::PFVArControllerType2UserDefined() {}; -PFVArControllerType2UserDefined::~PFVArControllerType2UserDefined() {}; +PFVArControllerType2UserDefined::PFVArControllerType2UserDefined() {} +PFVArControllerType2UserDefined::~PFVArControllerType2UserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ PFVArControllerType2UserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_PFVArControllerType2UserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (PFVArControllerType2UserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_PFVArControllerType2UserDefined(BaseClass*, BaseClass*); bool assign_PFVArControllerType2UserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_PFVArControllerType2UserDefined_ProprietaryParameterDynamics(BaseCla return false; } +bool assign_PFVArControllerType2UserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + PFVArControllerType2UserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_PFVArControllerType2UserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArControllerType2UserDefined* element = dynamic_cast(BaseClass_ptr1)) + const PFVArControllerType2UserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_PFVArControllerType2UserDefined_proprietary(const BaseClass* BaseClass_ return false; } - - const char PFVArControllerType2UserDefined::debugName[] = "PFVArControllerType2UserDefined"; const char* PFVArControllerType2UserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* PFVArControllerType2UserDefined::debugString() const void PFVArControllerType2UserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PFVArControllerType2UserDefined"), &PFVArControllerType2UserDefined_factory)); + factory_map.emplace("cim:PFVArControllerType2UserDefined", &PFVArControllerType2UserDefined_factory); } void PFVArControllerType2UserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType2UserDefined.proprietary"), &assign_PFVArControllerType2UserDefined_proprietary)); + assign_map.emplace("cim:PFVArControllerType2UserDefined.proprietary", &assign_PFVArControllerType2UserDefined_proprietary); } void PFVArControllerType2UserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArControllerType2UserDefined.ProprietaryParameterDynamics"), &assign_PFVArControllerType2UserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:PFVArControllerType2UserDefined.ProprietaryParameterDynamics", &assign_PFVArControllerType2UserDefined_ProprietaryParameterDynamics); } void PFVArControllerType2UserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/PFVArControllerType2UserDefined.hpp b/CGMES_3.0.0/PFVArControllerType2UserDefined.hpp index f168fb265..4204b194f 100644 --- a/CGMES_3.0.0/PFVArControllerType2UserDefined.hpp +++ b/CGMES_3.0.0/PFVArControllerType2UserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Power factor or VAr controller type 2 function block whose dynamic behaviour is described by a user-defined model. - */ + /** \brief Power factor or VAr controller type 2 function block whose dynamic behaviour is described by a user-defined model. */ class PFVArControllerType2UserDefined : public PFVArControllerType2Dynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP PFVArControllerType2UserDefined(); ~PFVArControllerType2UserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PFVArType1IEEEPFController.cpp b/CGMES_3.0.0/PFVArType1IEEEPFController.cpp index b9d47b24a..0bce66721 100644 --- a/CGMES_3.0.0/PFVArType1IEEEPFController.cpp +++ b/CGMES_3.0.0/PFVArType1IEEEPFController.cpp @@ -8,19 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PFVArType1IEEEPFController::PFVArType1IEEEPFController() {}; -PFVArType1IEEEPFController::~PFVArType1IEEEPFController() {}; +PFVArType1IEEEPFController::PFVArType1IEEEPFController() {} +PFVArType1IEEEPFController::~PFVArType1IEEEPFController() {} static const std::list PossibleProfilesForClass = { @@ -54,116 +46,122 @@ PFVArType1IEEEPFController::getPossibleProfilesForAttributes() const return map; } - -bool assign_PFVArType1IEEEPFController_ovex(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEPFController_ovex(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ovex; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEPFController_tpfc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEPFController_tpfc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpfc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEPFController_vitmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEPFController_vitmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vitmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEPFController_vpf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEPFController_vpf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vpf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEPFController_vpfcbw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEPFController_vpfcbw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vpfcbw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEPFController_vpfref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEPFController_vpfref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vpfref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEPFController_vvtmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEPFController_vvtmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vvtmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEPFController_vvtmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEPFController_vvtmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vvtmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PFVArType1IEEEPFController_ovex(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ovex; if (!buffer.str().empty()) @@ -177,7 +175,8 @@ bool get_PFVArType1IEEEPFController_ovex(const BaseClass* BaseClass_ptr1, std::s bool get_PFVArType1IEEEPFController_tpfc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpfc; if (!buffer.str().empty()) @@ -191,7 +190,8 @@ bool get_PFVArType1IEEEPFController_tpfc(const BaseClass* BaseClass_ptr1, std::s bool get_PFVArType1IEEEPFController_vitmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vitmin; if (!buffer.str().empty()) @@ -205,7 +205,8 @@ bool get_PFVArType1IEEEPFController_vitmin(const BaseClass* BaseClass_ptr1, std: bool get_PFVArType1IEEEPFController_vpf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vpf; if (!buffer.str().empty()) @@ -219,7 +220,8 @@ bool get_PFVArType1IEEEPFController_vpf(const BaseClass* BaseClass_ptr1, std::st bool get_PFVArType1IEEEPFController_vpfcbw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vpfcbw; if (!buffer.str().empty()) @@ -233,7 +235,8 @@ bool get_PFVArType1IEEEPFController_vpfcbw(const BaseClass* BaseClass_ptr1, std: bool get_PFVArType1IEEEPFController_vpfref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vpfref; if (!buffer.str().empty()) @@ -247,7 +250,8 @@ bool get_PFVArType1IEEEPFController_vpfref(const BaseClass* BaseClass_ptr1, std: bool get_PFVArType1IEEEPFController_vvtmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vvtmax; if (!buffer.str().empty()) @@ -261,7 +265,8 @@ bool get_PFVArType1IEEEPFController_vvtmax(const BaseClass* BaseClass_ptr1, std: bool get_PFVArType1IEEEPFController_vvtmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vvtmin; if (!buffer.str().empty()) @@ -273,8 +278,6 @@ bool get_PFVArType1IEEEPFController_vvtmin(const BaseClass* BaseClass_ptr1, std: return false; } - - const char PFVArType1IEEEPFController::debugName[] = "PFVArType1IEEEPFController"; const char* PFVArType1IEEEPFController::debugString() const { @@ -283,19 +286,19 @@ const char* PFVArType1IEEEPFController::debugString() const void PFVArType1IEEEPFController::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEPFController"), &PFVArType1IEEEPFController_factory)); + factory_map.emplace("cim:PFVArType1IEEEPFController", &PFVArType1IEEEPFController_factory); } void PFVArType1IEEEPFController::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEPFController.ovex"), &assign_PFVArType1IEEEPFController_ovex)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEPFController.tpfc"), &assign_PFVArType1IEEEPFController_tpfc)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEPFController.vitmin"), &assign_PFVArType1IEEEPFController_vitmin)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEPFController.vpf"), &assign_PFVArType1IEEEPFController_vpf)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEPFController.vpfcbw"), &assign_PFVArType1IEEEPFController_vpfcbw)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEPFController.vpfref"), &assign_PFVArType1IEEEPFController_vpfref)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEPFController.vvtmax"), &assign_PFVArType1IEEEPFController_vvtmax)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEPFController.vvtmin"), &assign_PFVArType1IEEEPFController_vvtmin)); + assign_map.emplace("cim:PFVArType1IEEEPFController.ovex", &assign_PFVArType1IEEEPFController_ovex); + assign_map.emplace("cim:PFVArType1IEEEPFController.tpfc", &assign_PFVArType1IEEEPFController_tpfc); + assign_map.emplace("cim:PFVArType1IEEEPFController.vitmin", &assign_PFVArType1IEEEPFController_vitmin); + assign_map.emplace("cim:PFVArType1IEEEPFController.vpf", &assign_PFVArType1IEEEPFController_vpf); + assign_map.emplace("cim:PFVArType1IEEEPFController.vpfcbw", &assign_PFVArType1IEEEPFController_vpfcbw); + assign_map.emplace("cim:PFVArType1IEEEPFController.vpfref", &assign_PFVArType1IEEEPFController_vpfref); + assign_map.emplace("cim:PFVArType1IEEEPFController.vvtmax", &assign_PFVArType1IEEEPFController_vvtmax); + assign_map.emplace("cim:PFVArType1IEEEPFController.vvtmin", &assign_PFVArType1IEEEPFController_vvtmin); } void PFVArType1IEEEPFController::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/PFVArType1IEEEPFController.hpp b/CGMES_3.0.0/PFVArType1IEEEPFController.hpp index 377789fa9..adba985cf 100644 --- a/CGMES_3.0.0/PFVArType1IEEEPFController.hpp +++ b/CGMES_3.0.0/PFVArType1IEEEPFController.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE PF controller type 1 which operates by moving the voltage reference directly. Reference: IEEE 421.5-2005, 11.2. - */ + /** \brief IEEE PF controller type 1 which operates by moving the voltage reference directly. Reference: IEEE 421.5-2005, 11.2. */ class PFVArType1IEEEPFController : public PFVArControllerType1Dynamics { public: @@ -30,14 +28,29 @@ namespace CIMPP PFVArType1IEEEPFController(); ~PFVArType1IEEEPFController() override; - CIMPP::Boolean ovex; /* Overexcitation Flag (<i>OVEX</i>) true = overexcited false = underexcited. Default: false */ - CIMPP::Seconds tpfc; /* PF controller time delay (<i>T</i><i><sub>PFC</sub></i>) (&gt;= 0). Typical value = 5. Default: nullptr */ - CIMPP::PU vitmin; /* Minimum machine terminal current needed to enable pf/var controller (<i>V</i><i><sub>ITMIN</sub></i>). Default: nullptr */ - CIMPP::PU vpf; /* Synchronous machine power factor (<i>V</i><i><sub>PF</sub></i>). Default: nullptr */ - CIMPP::Float vpfcbw; /* PF controller deadband (<i>V</i><i><sub>PFC_BW</sub></i>). Typical value = 0,05. Default: 0.0 */ - CIMPP::PU vpfref; /* PF controller reference (<i>V</i><i><sub>PFREF</sub></i>). Default: nullptr */ - CIMPP::PU vvtmax; /* Maximum machine terminal voltage needed for pf/var controller to be enabled (<i>V</i><i><sub>VTMAX</sub></i>) (&gt; PFVArType1IEEEPFController.vvtmin). Default: nullptr */ - CIMPP::PU vvtmin; /* Minimum machine terminal voltage needed to enable pf/var controller (<i>V</i><i><sub>VTMIN</sub></i>) (&lt; PFVArType1IEEEPFController.vvtmax). Default: nullptr */ + /** \brief Overexcitation Flag (<i>OVEX</i>) true = overexcited false = underexcited. Default: false */ + CIMPP::Boolean ovex; + + /** \brief PF controller time delay (<i>T</i><i><sub>PFC</sub></i>) (&gt;= 0). Typical value = 5. Default: nullptr */ + CIMPP::Seconds tpfc; + + /** \brief Minimum machine terminal current needed to enable pf/var controller (<i>V</i><i><sub>ITMIN</sub></i>). Default: nullptr */ + CIMPP::PU vitmin; + + /** \brief Synchronous machine power factor (<i>V</i><i><sub>PF</sub></i>). Default: nullptr */ + CIMPP::PU vpf; + + /** \brief PF controller deadband (<i>V</i><i><sub>PFC_BW</sub></i>). Typical value = 0,05. Default: 0.0 */ + CIMPP::Float vpfcbw; + + /** \brief PF controller reference (<i>V</i><i><sub>PFREF</sub></i>). Default: nullptr */ + CIMPP::PU vpfref; + + /** \brief Maximum machine terminal voltage needed for pf/var controller to be enabled (<i>V</i><i><sub>VTMAX</sub></i>) (&gt; PFVArType1IEEEPFController.vvtmin). Default: nullptr */ + CIMPP::PU vvtmax; + + /** \brief Minimum machine terminal voltage needed to enable pf/var controller (<i>V</i><i><sub>VTMIN</sub></i>) (&lt; PFVArType1IEEEPFController.vvtmax). Default: nullptr */ + CIMPP::PU vvtmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PFVArType1IEEEVArController.cpp b/CGMES_3.0.0/PFVArType1IEEEVArController.cpp index 078557ea0..589dd60a6 100644 --- a/CGMES_3.0.0/PFVArType1IEEEVArController.cpp +++ b/CGMES_3.0.0/PFVArType1IEEEVArController.cpp @@ -8,17 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Seconds.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PFVArType1IEEEVArController::PFVArType1IEEEVArController() {}; -PFVArType1IEEEVArController::~PFVArType1IEEEVArController() {}; +PFVArType1IEEEVArController::PFVArType1IEEEVArController() {} +PFVArType1IEEEVArController::~PFVArType1IEEEVArController() {} static const std::list PossibleProfilesForClass = { @@ -50,90 +44,94 @@ PFVArType1IEEEVArController::getPossibleProfilesForAttributes() const return map; } - -bool assign_PFVArType1IEEEVArController_tvarc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEVArController_tvarc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tvarc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEVArController_vvar(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEVArController_vvar(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vvar; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEVArController_vvarcbw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEVArController_vvarcbw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vvarcbw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEVArController_vvarref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEVArController_vvarref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vvarref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEVArController_vvtmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEVArController_vvtmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vvtmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType1IEEEVArController_vvtmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType1IEEEVArController_vvtmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vvtmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PFVArType1IEEEVArController_tvarc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tvarc; if (!buffer.str().empty()) @@ -147,7 +145,8 @@ bool get_PFVArType1IEEEVArController_tvarc(const BaseClass* BaseClass_ptr1, std: bool get_PFVArType1IEEEVArController_vvar(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vvar; if (!buffer.str().empty()) @@ -161,7 +160,8 @@ bool get_PFVArType1IEEEVArController_vvar(const BaseClass* BaseClass_ptr1, std:: bool get_PFVArType1IEEEVArController_vvarcbw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vvarcbw; if (!buffer.str().empty()) @@ -175,7 +175,8 @@ bool get_PFVArType1IEEEVArController_vvarcbw(const BaseClass* BaseClass_ptr1, st bool get_PFVArType1IEEEVArController_vvarref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vvarref; if (!buffer.str().empty()) @@ -189,7 +190,8 @@ bool get_PFVArType1IEEEVArController_vvarref(const BaseClass* BaseClass_ptr1, st bool get_PFVArType1IEEEVArController_vvtmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vvtmax; if (!buffer.str().empty()) @@ -203,7 +205,8 @@ bool get_PFVArType1IEEEVArController_vvtmax(const BaseClass* BaseClass_ptr1, std bool get_PFVArType1IEEEVArController_vvtmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType1IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vvtmin; if (!buffer.str().empty()) @@ -215,8 +218,6 @@ bool get_PFVArType1IEEEVArController_vvtmin(const BaseClass* BaseClass_ptr1, std return false; } - - const char PFVArType1IEEEVArController::debugName[] = "PFVArType1IEEEVArController"; const char* PFVArType1IEEEVArController::debugString() const { @@ -225,17 +226,17 @@ const char* PFVArType1IEEEVArController::debugString() const void PFVArType1IEEEVArController::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEVArController"), &PFVArType1IEEEVArController_factory)); + factory_map.emplace("cim:PFVArType1IEEEVArController", &PFVArType1IEEEVArController_factory); } void PFVArType1IEEEVArController::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEVArController.tvarc"), &assign_PFVArType1IEEEVArController_tvarc)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEVArController.vvar"), &assign_PFVArType1IEEEVArController_vvar)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEVArController.vvarcbw"), &assign_PFVArType1IEEEVArController_vvarcbw)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEVArController.vvarref"), &assign_PFVArType1IEEEVArController_vvarref)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEVArController.vvtmax"), &assign_PFVArType1IEEEVArController_vvtmax)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType1IEEEVArController.vvtmin"), &assign_PFVArType1IEEEVArController_vvtmin)); + assign_map.emplace("cim:PFVArType1IEEEVArController.tvarc", &assign_PFVArType1IEEEVArController_tvarc); + assign_map.emplace("cim:PFVArType1IEEEVArController.vvar", &assign_PFVArType1IEEEVArController_vvar); + assign_map.emplace("cim:PFVArType1IEEEVArController.vvarcbw", &assign_PFVArType1IEEEVArController_vvarcbw); + assign_map.emplace("cim:PFVArType1IEEEVArController.vvarref", &assign_PFVArType1IEEEVArController_vvarref); + assign_map.emplace("cim:PFVArType1IEEEVArController.vvtmax", &assign_PFVArType1IEEEVArController_vvtmax); + assign_map.emplace("cim:PFVArType1IEEEVArController.vvtmin", &assign_PFVArType1IEEEVArController_vvtmin); } void PFVArType1IEEEVArController::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/PFVArType1IEEEVArController.hpp b/CGMES_3.0.0/PFVArType1IEEEVArController.hpp index 3a80c2146..59cb9ce59 100644 --- a/CGMES_3.0.0/PFVArType1IEEEVArController.hpp +++ b/CGMES_3.0.0/PFVArType1IEEEVArController.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE VAR controller type 1 which operates by moving the voltage reference directly. Reference: IEEE 421.5-2005, 11.3. - */ + /** \brief IEEE VAR controller type 1 which operates by moving the voltage reference directly. Reference: IEEE 421.5-2005, 11.3. */ class PFVArType1IEEEVArController : public PFVArControllerType1Dynamics { public: @@ -29,12 +27,23 @@ namespace CIMPP PFVArType1IEEEVArController(); ~PFVArType1IEEEVArController() override; - CIMPP::Seconds tvarc; /* Var controller time delay (<i>T</i><i><sub>VARC</sub></i>) (&gt;= 0). Typical value = 5. Default: nullptr */ - CIMPP::PU vvar; /* Synchronous machine power factor (<i>V</i><i><sub>VAR</sub></i>). Default: nullptr */ - CIMPP::Float vvarcbw; /* Var controller deadband (<i>V</i><i><sub>VARC_BW</sub></i>). Typical value = 0,02. Default: 0.0 */ - CIMPP::PU vvarref; /* Var controller reference (<i>V</i><i><sub>VARREF</sub></i>). Default: nullptr */ - CIMPP::PU vvtmax; /* Maximum machine terminal voltage needed for pf/VAr controller to be enabled (<i>V</i><i><sub>VTMAX</sub></i>) (&gt; PVFArType1IEEEVArController.vvtmin). Default: nullptr */ - CIMPP::PU vvtmin; /* Minimum machine terminal voltage needed to enable pf/var controller (<i>V</i><i><sub>VTMIN</sub></i>) (&lt; PVFArType1IEEEVArController.vvtmax). Default: nullptr */ + /** \brief Var controller time delay (<i>T</i><i><sub>VARC</sub></i>) (&gt;= 0). Typical value = 5. Default: nullptr */ + CIMPP::Seconds tvarc; + + /** \brief Synchronous machine power factor (<i>V</i><i><sub>VAR</sub></i>). Default: nullptr */ + CIMPP::PU vvar; + + /** \brief Var controller deadband (<i>V</i><i><sub>VARC_BW</sub></i>). Typical value = 0,02. Default: 0.0 */ + CIMPP::Float vvarcbw; + + /** \brief Var controller reference (<i>V</i><i><sub>VARREF</sub></i>). Default: nullptr */ + CIMPP::PU vvarref; + + /** \brief Maximum machine terminal voltage needed for pf/VAr controller to be enabled (<i>V</i><i><sub>VTMAX</sub></i>) (&gt; PVFArType1IEEEVArController.vvtmin). Default: nullptr */ + CIMPP::PU vvtmax; + + /** \brief Minimum machine terminal voltage needed to enable pf/var controller (<i>V</i><i><sub>VTMIN</sub></i>) (&lt; PVFArType1IEEEVArController.vvtmax). Default: nullptr */ + CIMPP::PU vvtmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PFVArType2Common1.cpp b/CGMES_3.0.0/PFVArType2Common1.cpp index 90a818731..8bd6aecd5 100644 --- a/CGMES_3.0.0/PFVArType2Common1.cpp +++ b/CGMES_3.0.0/PFVArType2Common1.cpp @@ -8,16 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PFVArType2Common1::PFVArType2Common1() {}; -PFVArType2Common1::~PFVArType2Common1() {}; +PFVArType2Common1::PFVArType2Common1() {} +PFVArType2Common1::~PFVArType2Common1() {} static const std::list PossibleProfilesForClass = { @@ -48,77 +43,80 @@ PFVArType2Common1::getPossibleProfilesForAttributes() const return map; } - -bool assign_PFVArType2Common1_j(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2Common1_j(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->j; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2Common1_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2Common1_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2Common1_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2Common1_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2Common1_max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2Common1_max(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->max; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2Common1_ref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2Common1_ref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PFVArType2Common1_j(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->j; if (!buffer.str().empty()) @@ -132,7 +130,8 @@ bool get_PFVArType2Common1_j(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_PFVArType2Common1_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -146,7 +145,8 @@ bool get_PFVArType2Common1_ki(const BaseClass* BaseClass_ptr1, std::stringstream bool get_PFVArType2Common1_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -160,7 +160,8 @@ bool get_PFVArType2Common1_kp(const BaseClass* BaseClass_ptr1, std::stringstream bool get_PFVArType2Common1_max(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->max; if (!buffer.str().empty()) @@ -174,7 +175,8 @@ bool get_PFVArType2Common1_max(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_PFVArType2Common1_ref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2Common1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ref; if (!buffer.str().empty()) @@ -186,8 +188,6 @@ bool get_PFVArType2Common1_ref(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } - - const char PFVArType2Common1::debugName[] = "PFVArType2Common1"; const char* PFVArType2Common1::debugString() const { @@ -196,16 +196,16 @@ const char* PFVArType2Common1::debugString() const void PFVArType2Common1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PFVArType2Common1"), &PFVArType2Common1_factory)); + factory_map.emplace("cim:PFVArType2Common1", &PFVArType2Common1_factory); } void PFVArType2Common1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArType2Common1.j"), &assign_PFVArType2Common1_j)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2Common1.ki"), &assign_PFVArType2Common1_ki)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2Common1.kp"), &assign_PFVArType2Common1_kp)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2Common1.max"), &assign_PFVArType2Common1_max)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2Common1.ref"), &assign_PFVArType2Common1_ref)); + assign_map.emplace("cim:PFVArType2Common1.j", &assign_PFVArType2Common1_j); + assign_map.emplace("cim:PFVArType2Common1.ki", &assign_PFVArType2Common1_ki); + assign_map.emplace("cim:PFVArType2Common1.kp", &assign_PFVArType2Common1_kp); + assign_map.emplace("cim:PFVArType2Common1.max", &assign_PFVArType2Common1_max); + assign_map.emplace("cim:PFVArType2Common1.ref", &assign_PFVArType2Common1_ref); } void PFVArType2Common1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/PFVArType2Common1.hpp b/CGMES_3.0.0/PFVArType2Common1.hpp index 310be5f49..3769c40f7 100644 --- a/CGMES_3.0.0/PFVArType2Common1.hpp +++ b/CGMES_3.0.0/PFVArType2Common1.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Power factor / reactive power regulator. This model represents the power factor or reactive power controller such as the Basler SCP-250. The controller measures power factor or reactive power (PU on generator rated power) and compares it with the operator's set point. [Footnote: Basler SCP-250 is an example of a suitable product available commercially. This information is given for the convenience of users of this document and does not constitute an endorsement by IEC of this product.] - */ + /** \brief Power factor / reactive power regulator. This model represents the power factor or reactive power controller such as the Basler SCP-250. The controller measures power factor or reactive power (PU on generator rated power) and compares it with the operator's set point. [Footnote: Basler SCP-250 is an example of a suitable product available commercially. This information is given for the convenience of users of this document and does not constitute an endorsement by IEC of this product.] */ class PFVArType2Common1 : public PFVArControllerType2Dynamics { public: @@ -28,11 +26,20 @@ namespace CIMPP PFVArType2Common1(); ~PFVArType2Common1() override; - CIMPP::Boolean j; /* Selector (<i>J</i>). true = control mode for reactive power false = control mode for power factor. Default: false */ - CIMPP::PU ki; /* Reset gain (<i>Ki</i>). Default: nullptr */ - CIMPP::PU kp; /* Proportional gain (<i>Kp</i>). Default: nullptr */ - CIMPP::PU max; /* Output limit (<i>max</i>). Default: nullptr */ - CIMPP::PU ref; /* Reference value of reactive power or power factor (<i>Ref</i>). The reference value is initialised by this model. This initialisation can override the value exchanged by this attribute to represent a plant operator`s change of the reference setting. Default: nullptr */ + /** \brief Selector (<i>J</i>). true = control mode for reactive power false = control mode for power factor. Default: false */ + CIMPP::Boolean j; + + /** \brief Reset gain (<i>Ki</i>). Default: nullptr */ + CIMPP::PU ki; + + /** \brief Proportional gain (<i>Kp</i>). Default: nullptr */ + CIMPP::PU kp; + + /** \brief Output limit (<i>max</i>). Default: nullptr */ + CIMPP::PU max; + + /** \brief Reference value of reactive power or power factor (<i>Ref</i>). The reference value is initialised by this model. This initialisation can override the value exchanged by this attribute to represent a plant operator`s change of the reference setting. Default: nullptr */ + CIMPP::PU ref; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PFVArType2IEEEPFController.cpp b/CGMES_3.0.0/PFVArType2IEEEPFController.cpp index e6a75af6b..bdf95df85 100644 --- a/CGMES_3.0.0/PFVArType2IEEEPFController.cpp +++ b/CGMES_3.0.0/PFVArType2IEEEPFController.cpp @@ -8,18 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" using namespace CIMPP; -PFVArType2IEEEPFController::PFVArType2IEEEPFController() {}; -PFVArType2IEEEPFController::~PFVArType2IEEEPFController() {}; +PFVArType2IEEEPFController::PFVArType2IEEEPFController() {} +PFVArType2IEEEPFController::~PFVArType2IEEEPFController() {} static const std::list PossibleProfilesForClass = { @@ -52,103 +45,108 @@ PFVArType2IEEEPFController::getPossibleProfilesForAttributes() const return map; } - -bool assign_PFVArType2IEEEPFController_exlon(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEPFController_exlon(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exlon; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEPFController_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEPFController_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEPFController_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEPFController_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEPFController_pfref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEPFController_pfref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pfref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEPFController_vclmt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEPFController_vclmt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vclmt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEPFController_vref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEPFController_vref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEPFController_vs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEPFController_vs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PFVArType2IEEEPFController_exlon(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exlon; if (!buffer.str().empty()) @@ -162,7 +160,8 @@ bool get_PFVArType2IEEEPFController_exlon(const BaseClass* BaseClass_ptr1, std:: bool get_PFVArType2IEEEPFController_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -176,7 +175,8 @@ bool get_PFVArType2IEEEPFController_ki(const BaseClass* BaseClass_ptr1, std::str bool get_PFVArType2IEEEPFController_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -190,7 +190,8 @@ bool get_PFVArType2IEEEPFController_kp(const BaseClass* BaseClass_ptr1, std::str bool get_PFVArType2IEEEPFController_pfref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pfref; if (!buffer.str().empty()) @@ -204,7 +205,8 @@ bool get_PFVArType2IEEEPFController_pfref(const BaseClass* BaseClass_ptr1, std:: bool get_PFVArType2IEEEPFController_vclmt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vclmt; if (!buffer.str().empty()) @@ -218,7 +220,8 @@ bool get_PFVArType2IEEEPFController_vclmt(const BaseClass* BaseClass_ptr1, std:: bool get_PFVArType2IEEEPFController_vref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vref; if (!buffer.str().empty()) @@ -232,7 +235,8 @@ bool get_PFVArType2IEEEPFController_vref(const BaseClass* BaseClass_ptr1, std::s bool get_PFVArType2IEEEPFController_vs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEPFController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vs; if (!buffer.str().empty()) @@ -244,8 +248,6 @@ bool get_PFVArType2IEEEPFController_vs(const BaseClass* BaseClass_ptr1, std::str return false; } - - const char PFVArType2IEEEPFController::debugName[] = "PFVArType2IEEEPFController"; const char* PFVArType2IEEEPFController::debugString() const { @@ -254,18 +256,18 @@ const char* PFVArType2IEEEPFController::debugString() const void PFVArType2IEEEPFController::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEPFController"), &PFVArType2IEEEPFController_factory)); + factory_map.emplace("cim:PFVArType2IEEEPFController", &PFVArType2IEEEPFController_factory); } void PFVArType2IEEEPFController::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEPFController.exlon"), &assign_PFVArType2IEEEPFController_exlon)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEPFController.ki"), &assign_PFVArType2IEEEPFController_ki)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEPFController.kp"), &assign_PFVArType2IEEEPFController_kp)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEPFController.pfref"), &assign_PFVArType2IEEEPFController_pfref)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEPFController.vclmt"), &assign_PFVArType2IEEEPFController_vclmt)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEPFController.vref"), &assign_PFVArType2IEEEPFController_vref)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEPFController.vs"), &assign_PFVArType2IEEEPFController_vs)); + assign_map.emplace("cim:PFVArType2IEEEPFController.exlon", &assign_PFVArType2IEEEPFController_exlon); + assign_map.emplace("cim:PFVArType2IEEEPFController.ki", &assign_PFVArType2IEEEPFController_ki); + assign_map.emplace("cim:PFVArType2IEEEPFController.kp", &assign_PFVArType2IEEEPFController_kp); + assign_map.emplace("cim:PFVArType2IEEEPFController.pfref", &assign_PFVArType2IEEEPFController_pfref); + assign_map.emplace("cim:PFVArType2IEEEPFController.vclmt", &assign_PFVArType2IEEEPFController_vclmt); + assign_map.emplace("cim:PFVArType2IEEEPFController.vref", &assign_PFVArType2IEEEPFController_vref); + assign_map.emplace("cim:PFVArType2IEEEPFController.vs", &assign_PFVArType2IEEEPFController_vs); } void PFVArType2IEEEPFController::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/PFVArType2IEEEPFController.hpp b/CGMES_3.0.0/PFVArType2IEEEPFController.hpp index 4e4a1ef35..5ef58f32c 100644 --- a/CGMES_3.0.0/PFVArType2IEEEPFController.hpp +++ b/CGMES_3.0.0/PFVArType2IEEEPFController.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE PF controller type 2 which is a summing point type controller making up the outside loop of a two-loop system. This controller is implemented as a slow PI type controller. The voltage regulator forms the inner loop and is implemented as a fast controller. Reference: IEEE 421.5-2005, 11.4. - */ + /** \brief IEEE PF controller type 2 which is a summing point type controller making up the outside loop of a two-loop system. This controller is implemented as a slow PI type controller. The voltage regulator forms the inner loop and is implemented as a fast controller. Reference: IEEE 421.5-2005, 11.4. */ class PFVArType2IEEEPFController : public PFVArControllerType2Dynamics { public: @@ -29,13 +27,26 @@ namespace CIMPP PFVArType2IEEEPFController(); ~PFVArType2IEEEPFController() override; - CIMPP::Boolean exlon; /* Overexcitation or under excitation flag (<i>EXLON</i>) true = 1 (not in the overexcitation or underexcitation state, integral action is active) false = 0 (in the overexcitation or underexcitation state, so integral action is disabled to allow the limiter to play its role). Default: false */ - CIMPP::PU ki; /* Integral gain of the pf controller (<i>K</i><i><sub>I</sub></i>). Typical value = 1. Default: nullptr */ - CIMPP::PU kp; /* Proportional gain of the pf controller (<i>K</i><i><sub>P</sub></i>). Typical value = 1. Default: nullptr */ - CIMPP::PU pfref; /* Power factor reference (<i>P</i><i><sub>FREF</sub></i>). Default: nullptr */ - CIMPP::PU vclmt; /* Maximum output of the pf controller (<i>V</i><i><sub>CLMT</sub></i>). Typical value = 0,1. Default: nullptr */ - CIMPP::PU vref; /* Voltage regulator reference (<i>V</i><i><sub>REF</sub></i>). Default: nullptr */ - CIMPP::Float vs; /* Generator sensing voltage (<i>V</i><i><sub>S</sub></i>). Default: 0.0 */ + /** \brief Overexcitation or under excitation flag (<i>EXLON</i>) true = 1 (not in the overexcitation or underexcitation state, integral action is active) false = 0 (in the overexcitation or underexcitation state, so integral action is disabled to allow the limiter to play its role). Default: false */ + CIMPP::Boolean exlon; + + /** \brief Integral gain of the pf controller (<i>K</i><i><sub>I</sub></i>). Typical value = 1. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Proportional gain of the pf controller (<i>K</i><i><sub>P</sub></i>). Typical value = 1. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Power factor reference (<i>P</i><i><sub>FREF</sub></i>). Default: nullptr */ + CIMPP::PU pfref; + + /** \brief Maximum output of the pf controller (<i>V</i><i><sub>CLMT</sub></i>). Typical value = 0,1. Default: nullptr */ + CIMPP::PU vclmt; + + /** \brief Voltage regulator reference (<i>V</i><i><sub>REF</sub></i>). Default: nullptr */ + CIMPP::PU vref; + + /** \brief Generator sensing voltage (<i>V</i><i><sub>S</sub></i>). Default: 0.0 */ + CIMPP::Float vs; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PFVArType2IEEEVArController.cpp b/CGMES_3.0.0/PFVArType2IEEEVArController.cpp index 1501a3485..56e3c29b0 100644 --- a/CGMES_3.0.0/PFVArType2IEEEVArController.cpp +++ b/CGMES_3.0.0/PFVArType2IEEEVArController.cpp @@ -8,18 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" using namespace CIMPP; -PFVArType2IEEEVArController::PFVArType2IEEEVArController() {}; -PFVArType2IEEEVArController::~PFVArType2IEEEVArController() {}; +PFVArType2IEEEVArController::PFVArType2IEEEVArController() {} +PFVArType2IEEEVArController::~PFVArType2IEEEVArController() {} static const std::list PossibleProfilesForClass = { @@ -52,103 +45,108 @@ PFVArType2IEEEVArController::getPossibleProfilesForAttributes() const return map; } - -bool assign_PFVArType2IEEEVArController_exlon(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEVArController_exlon(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->exlon; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEVArController_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEVArController_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEVArController_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEVArController_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEVArController_qref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEVArController_qref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEVArController_vclmt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEVArController_vclmt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vclmt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEVArController_vref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEVArController_vref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PFVArType2IEEEVArController_vs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PFVArType2IEEEVArController_vs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PFVArType2IEEEVArController_exlon(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->exlon; if (!buffer.str().empty()) @@ -162,7 +160,8 @@ bool get_PFVArType2IEEEVArController_exlon(const BaseClass* BaseClass_ptr1, std: bool get_PFVArType2IEEEVArController_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -176,7 +175,8 @@ bool get_PFVArType2IEEEVArController_ki(const BaseClass* BaseClass_ptr1, std::st bool get_PFVArType2IEEEVArController_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -190,7 +190,8 @@ bool get_PFVArType2IEEEVArController_kp(const BaseClass* BaseClass_ptr1, std::st bool get_PFVArType2IEEEVArController_qref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qref; if (!buffer.str().empty()) @@ -204,7 +205,8 @@ bool get_PFVArType2IEEEVArController_qref(const BaseClass* BaseClass_ptr1, std:: bool get_PFVArType2IEEEVArController_vclmt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vclmt; if (!buffer.str().empty()) @@ -218,7 +220,8 @@ bool get_PFVArType2IEEEVArController_vclmt(const BaseClass* BaseClass_ptr1, std: bool get_PFVArType2IEEEVArController_vref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vref; if (!buffer.str().empty()) @@ -232,7 +235,8 @@ bool get_PFVArType2IEEEVArController_vref(const BaseClass* BaseClass_ptr1, std:: bool get_PFVArType2IEEEVArController_vs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1)) + const PFVArType2IEEEVArController* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vs; if (!buffer.str().empty()) @@ -244,8 +248,6 @@ bool get_PFVArType2IEEEVArController_vs(const BaseClass* BaseClass_ptr1, std::st return false; } - - const char PFVArType2IEEEVArController::debugName[] = "PFVArType2IEEEVArController"; const char* PFVArType2IEEEVArController::debugString() const { @@ -254,18 +256,18 @@ const char* PFVArType2IEEEVArController::debugString() const void PFVArType2IEEEVArController::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEVArController"), &PFVArType2IEEEVArController_factory)); + factory_map.emplace("cim:PFVArType2IEEEVArController", &PFVArType2IEEEVArController_factory); } void PFVArType2IEEEVArController::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEVArController.exlon"), &assign_PFVArType2IEEEVArController_exlon)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEVArController.ki"), &assign_PFVArType2IEEEVArController_ki)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEVArController.kp"), &assign_PFVArType2IEEEVArController_kp)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEVArController.qref"), &assign_PFVArType2IEEEVArController_qref)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEVArController.vclmt"), &assign_PFVArType2IEEEVArController_vclmt)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEVArController.vref"), &assign_PFVArType2IEEEVArController_vref)); - assign_map.insert(std::make_pair(std::string("cim:PFVArType2IEEEVArController.vs"), &assign_PFVArType2IEEEVArController_vs)); + assign_map.emplace("cim:PFVArType2IEEEVArController.exlon", &assign_PFVArType2IEEEVArController_exlon); + assign_map.emplace("cim:PFVArType2IEEEVArController.ki", &assign_PFVArType2IEEEVArController_ki); + assign_map.emplace("cim:PFVArType2IEEEVArController.kp", &assign_PFVArType2IEEEVArController_kp); + assign_map.emplace("cim:PFVArType2IEEEVArController.qref", &assign_PFVArType2IEEEVArController_qref); + assign_map.emplace("cim:PFVArType2IEEEVArController.vclmt", &assign_PFVArType2IEEEVArController_vclmt); + assign_map.emplace("cim:PFVArType2IEEEVArController.vref", &assign_PFVArType2IEEEVArController_vref); + assign_map.emplace("cim:PFVArType2IEEEVArController.vs", &assign_PFVArType2IEEEVArController_vs); } void PFVArType2IEEEVArController::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/PFVArType2IEEEVArController.hpp b/CGMES_3.0.0/PFVArType2IEEEVArController.hpp index 30aefa485..2237d3c73 100644 --- a/CGMES_3.0.0/PFVArType2IEEEVArController.hpp +++ b/CGMES_3.0.0/PFVArType2IEEEVArController.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE VAR controller type 2 which is a summing point type controller. It makes up the outside loop of a two-loop system. This controller is implemented as a slow PI type controller, and the voltage regulator forms the inner loop and is implemented as a fast controller. Reference: IEEE 421.5-2005, 11.5. - */ + /** \brief IEEE VAR controller type 2 which is a summing point type controller. It makes up the outside loop of a two-loop system. This controller is implemented as a slow PI type controller, and the voltage regulator forms the inner loop and is implemented as a fast controller. Reference: IEEE 421.5-2005, 11.5. */ class PFVArType2IEEEVArController : public PFVArControllerType2Dynamics { public: @@ -29,13 +27,26 @@ namespace CIMPP PFVArType2IEEEVArController(); ~PFVArType2IEEEVArController() override; - CIMPP::Boolean exlon; /* Overexcitation or under excitation flag (<i>EXLON</i>) true = 1 (not in the overexcitation or underexcitation state, integral action is active) false = 0 (in the overexcitation or underexcitation state, so integral action is disabled to allow the limiter to play its role). Default: false */ - CIMPP::PU ki; /* Integral gain of the pf controller (<i>K</i><i><sub>I</sub></i>). Default: nullptr */ - CIMPP::PU kp; /* Proportional gain of the pf controller (<i>K</i><i><sub>P</sub></i>). Default: nullptr */ - CIMPP::PU qref; /* Reactive power reference (<i>Q</i><i><sub>REF</sub></i>). Default: nullptr */ - CIMPP::PU vclmt; /* Maximum output of the pf controller (<i>V</i><i><sub>CLMT</sub></i>). Default: nullptr */ - CIMPP::PU vref; /* Voltage regulator reference (<i>V</i><i><sub>REF</sub></i>). Default: nullptr */ - CIMPP::Float vs; /* Generator sensing voltage (<i>V</i><i><sub>S</sub></i>). Default: 0.0 */ + /** \brief Overexcitation or under excitation flag (<i>EXLON</i>) true = 1 (not in the overexcitation or underexcitation state, integral action is active) false = 0 (in the overexcitation or underexcitation state, so integral action is disabled to allow the limiter to play its role). Default: false */ + CIMPP::Boolean exlon; + + /** \brief Integral gain of the pf controller (<i>K</i><i><sub>I</sub></i>). Default: nullptr */ + CIMPP::PU ki; + + /** \brief Proportional gain of the pf controller (<i>K</i><i><sub>P</sub></i>). Default: nullptr */ + CIMPP::PU kp; + + /** \brief Reactive power reference (<i>Q</i><i><sub>REF</sub></i>). Default: nullptr */ + CIMPP::PU qref; + + /** \brief Maximum output of the pf controller (<i>V</i><i><sub>CLMT</sub></i>). Default: nullptr */ + CIMPP::PU vclmt; + + /** \brief Voltage regulator reference (<i>V</i><i><sub>REF</sub></i>). Default: nullptr */ + CIMPP::PU vref; + + /** \brief Generator sensing voltage (<i>V</i><i><sub>S</sub></i>). Default: 0.0 */ + CIMPP::Float vs; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PU.hpp b/CGMES_3.0.0/PU.hpp index 51a1d1117..623ad9e3b 100644 --- a/CGMES_3.0.0/PU.hpp +++ b/CGMES_3.0.0/PU.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Per Unit - a positive or negative value referred to a defined base. Values typically range from -10 to +10. - */ + /** \brief Per Unit - a positive or negative value referred to a defined base. Values typically range from -10 to +10. */ class PU { public: diff --git a/CGMES_3.0.0/PerCent.hpp b/CGMES_3.0.0/PerCent.hpp index 67bb36e78..d395c6119 100644 --- a/CGMES_3.0.0/PerCent.hpp +++ b/CGMES_3.0.0/PerCent.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Percentage on a defined base. For example, specify as 100 to indicate at the defined base. - */ + /** \brief Percentage on a defined base. For example, specify as 100 to indicate at the defined base. */ class PerCent { public: diff --git a/CGMES_3.0.0/PetersenCoil.cpp b/CGMES_3.0.0/PetersenCoil.cpp index 4e7840de2..937095c1b 100644 --- a/CGMES_3.0.0/PetersenCoil.cpp +++ b/CGMES_3.0.0/PetersenCoil.cpp @@ -8,18 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PetersenCoilModeKind.hpp" -#include "Voltage.hpp" -#include "CurrentFlow.hpp" -#include "CurrentFlow.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -PetersenCoil::PetersenCoil() {}; -PetersenCoil::~PetersenCoil() {}; +PetersenCoil::PetersenCoil() {} +PetersenCoil::~PetersenCoil() {} static const std::list PossibleProfilesForClass = { @@ -53,103 +46,123 @@ PetersenCoil::getPossibleProfilesForAttributes() const return map; } - -bool assign_PetersenCoil_mode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PetersenCoil_mode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mode; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PetersenCoil_nominalU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PetersenCoil_nominalU(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nominalU; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PetersenCoil_offsetCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PetersenCoil_offsetCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->offsetCurrent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PetersenCoil_positionCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PetersenCoil_positionCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->positionCurrent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PetersenCoil_xGroundMax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PetersenCoil_xGroundMax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xGroundMax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PetersenCoil_xGroundMin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PetersenCoil_xGroundMin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xGroundMin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PetersenCoil_xGroundNominal(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PetersenCoil_xGroundNominal(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xGroundNominal; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - +bool get_PetersenCoil_mode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->mode; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} bool get_PetersenCoil_nominalU(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + const PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nominalU; if (!buffer.str().empty()) @@ -163,7 +176,8 @@ bool get_PetersenCoil_nominalU(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_PetersenCoil_offsetCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + const PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->offsetCurrent; if (!buffer.str().empty()) @@ -177,7 +191,8 @@ bool get_PetersenCoil_offsetCurrent(const BaseClass* BaseClass_ptr1, std::string bool get_PetersenCoil_positionCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + const PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->positionCurrent; if (!buffer.str().empty()) @@ -191,7 +206,8 @@ bool get_PetersenCoil_positionCurrent(const BaseClass* BaseClass_ptr1, std::stri bool get_PetersenCoil_xGroundMax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + const PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xGroundMax; if (!buffer.str().empty()) @@ -205,7 +221,8 @@ bool get_PetersenCoil_xGroundMax(const BaseClass* BaseClass_ptr1, std::stringstr bool get_PetersenCoil_xGroundMin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + const PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xGroundMin; if (!buffer.str().empty()) @@ -219,7 +236,8 @@ bool get_PetersenCoil_xGroundMin(const BaseClass* BaseClass_ptr1, std::stringstr bool get_PetersenCoil_xGroundNominal(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) + const PetersenCoil* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xGroundNominal; if (!buffer.str().empty()) @@ -231,22 +249,6 @@ bool get_PetersenCoil_xGroundNominal(const BaseClass* BaseClass_ptr1, std::strin return false; } - - -bool get_PetersenCoil_mode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const PetersenCoil* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->mode; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char PetersenCoil::debugName[] = "PetersenCoil"; const char* PetersenCoil::debugString() const { @@ -255,18 +257,18 @@ const char* PetersenCoil::debugString() const void PetersenCoil::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PetersenCoil"), &PetersenCoil_factory)); + factory_map.emplace("cim:PetersenCoil", &PetersenCoil_factory); } void PetersenCoil::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PetersenCoil.mode"), &assign_PetersenCoil_mode)); - assign_map.insert(std::make_pair(std::string("cim:PetersenCoil.nominalU"), &assign_PetersenCoil_nominalU)); - assign_map.insert(std::make_pair(std::string("cim:PetersenCoil.offsetCurrent"), &assign_PetersenCoil_offsetCurrent)); - assign_map.insert(std::make_pair(std::string("cim:PetersenCoil.positionCurrent"), &assign_PetersenCoil_positionCurrent)); - assign_map.insert(std::make_pair(std::string("cim:PetersenCoil.xGroundMax"), &assign_PetersenCoil_xGroundMax)); - assign_map.insert(std::make_pair(std::string("cim:PetersenCoil.xGroundMin"), &assign_PetersenCoil_xGroundMin)); - assign_map.insert(std::make_pair(std::string("cim:PetersenCoil.xGroundNominal"), &assign_PetersenCoil_xGroundNominal)); + assign_map.emplace("cim:PetersenCoil.mode", &assign_PetersenCoil_mode); + assign_map.emplace("cim:PetersenCoil.nominalU", &assign_PetersenCoil_nominalU); + assign_map.emplace("cim:PetersenCoil.offsetCurrent", &assign_PetersenCoil_offsetCurrent); + assign_map.emplace("cim:PetersenCoil.positionCurrent", &assign_PetersenCoil_positionCurrent); + assign_map.emplace("cim:PetersenCoil.xGroundMax", &assign_PetersenCoil_xGroundMax); + assign_map.emplace("cim:PetersenCoil.xGroundMin", &assign_PetersenCoil_xGroundMin); + assign_map.emplace("cim:PetersenCoil.xGroundNominal", &assign_PetersenCoil_xGroundNominal); } void PetersenCoil::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/PetersenCoil.hpp b/CGMES_3.0.0/PetersenCoil.hpp index 12e2c1e2d..9fe6fb57f 100644 --- a/CGMES_3.0.0/PetersenCoil.hpp +++ b/CGMES_3.0.0/PetersenCoil.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A variable impedance device normally used to offset line charging during single line faults in an ungrounded section of network. - */ + /** \brief A variable impedance device normally used to offset line charging during single line faults in an ungrounded section of network. */ class PetersenCoil : public EarthFaultCompensator { public: @@ -30,13 +28,26 @@ namespace CIMPP PetersenCoil(); ~PetersenCoil() override; - CIMPP::PetersenCoilModeKind mode; /* The mode of operation of the Petersen coil. Default: 0 */ - CIMPP::Voltage nominalU; /* The nominal voltage for which the coil is designed. Default: nullptr */ - CIMPP::CurrentFlow offsetCurrent; /* The offset current that the Petersen coil controller is operating from the resonant point. This is normally a fixed amount for which the controller is configured and could be positive or negative. Typically 0 to 60 A depending on voltage and resonance conditions. Default: nullptr */ - CIMPP::CurrentFlow positionCurrent; /* The control current used to control the Petersen coil also known as the position current. Typically in the range of 20 mA to 200 mA. Default: nullptr */ - CIMPP::Reactance xGroundMax; /* The maximum reactance. Default: nullptr */ - CIMPP::Reactance xGroundMin; /* The minimum reactance. Default: nullptr */ - CIMPP::Reactance xGroundNominal; /* The nominal reactance. This is the operating point (normally over compensation) that is defined based on the resonance point in the healthy network condition. The impedance is calculated based on nominal voltage divided by position current. Default: nullptr */ + /** \brief The mode of operation of the Petersen coil. Default: 0 */ + CIMPP::PetersenCoilModeKind mode; + + /** \brief The nominal voltage for which the coil is designed. Default: nullptr */ + CIMPP::Voltage nominalU; + + /** \brief The offset current that the Petersen coil controller is operating from the resonant point. This is normally a fixed amount for which the controller is configured and could be positive or negative. Typically 0 to 60 A depending on voltage and resonance conditions. Default: nullptr */ + CIMPP::CurrentFlow offsetCurrent; + + /** \brief The control current used to control the Petersen coil also known as the position current. Typically in the range of 20 mA to 200 mA. Default: nullptr */ + CIMPP::CurrentFlow positionCurrent; + + /** \brief The maximum reactance. Default: nullptr */ + CIMPP::Reactance xGroundMax; + + /** \brief The minimum reactance. Default: nullptr */ + CIMPP::Reactance xGroundMin; + + /** \brief The nominal reactance. This is the operating point (normally over compensation) that is defined based on the resonance point in the healthy network condition. The impedance is calculated based on nominal voltage divided by position current. Default: nullptr */ + CIMPP::Reactance xGroundNominal; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PetersenCoilModeKind.cpp b/CGMES_3.0.0/PetersenCoilModeKind.cpp index a2e6dcbf7..441a95595 100644 --- a/CGMES_3.0.0/PetersenCoilModeKind.cpp +++ b/CGMES_3.0.0/PetersenCoilModeKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "PetersenCoilModeKind") + if (EnumSymbol.substr(0, pos) != "PetersenCoilModeKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "fixed") + if (EnumSymbol == "fixed") { rop = PetersenCoilModeKind::fixed; return lop; } - if(EnumSymbol == "manual") + if (EnumSymbol == "manual") { rop = PetersenCoilModeKind::manual; return lop; } - if(EnumSymbol == "automaticPositioning") + if (EnumSymbol == "automaticPositioning") { rop = PetersenCoilModeKind::automaticPositioning; return lop; diff --git a/CGMES_3.0.0/PetersenCoilModeKind.hpp b/CGMES_3.0.0/PetersenCoilModeKind.hpp index 6bfff0ea0..07e6e819e 100644 --- a/CGMES_3.0.0/PetersenCoilModeKind.hpp +++ b/CGMES_3.0.0/PetersenCoilModeKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The mode of operation for a Petersen coil. - */ + /** \brief The mode of operation for a Petersen coil. */ class PetersenCoilModeKind { public: enum PetersenCoilModeKind_ENUM { - /** - * Fixed position. - */ + /** Fixed position. */ fixed, - /** - * Manual positioning. - */ + /** Manual positioning. */ manual, - /** - * Automatic positioning. - */ + /** Automatic positioning. */ automaticPositioning, }; diff --git a/CGMES_3.0.0/PhaseCode.cpp b/CGMES_3.0.0/PhaseCode.cpp index 856caa7ea..ba2a00c94 100644 --- a/CGMES_3.0.0/PhaseCode.cpp +++ b/CGMES_3.0.0/PhaseCode.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "PhaseCode") + if (EnumSymbol.substr(0, pos) != "PhaseCode") { lop.setstate(std::ios::failbit); return lop; @@ -50,132 +50,132 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "ABCN") + if (EnumSymbol == "ABCN") { rop = PhaseCode::ABCN; return lop; } - if(EnumSymbol == "ABC") + if (EnumSymbol == "ABC") { rop = PhaseCode::ABC; return lop; } - if(EnumSymbol == "ABN") + if (EnumSymbol == "ABN") { rop = PhaseCode::ABN; return lop; } - if(EnumSymbol == "ACN") + if (EnumSymbol == "ACN") { rop = PhaseCode::ACN; return lop; } - if(EnumSymbol == "BCN") + if (EnumSymbol == "BCN") { rop = PhaseCode::BCN; return lop; } - if(EnumSymbol == "AB") + if (EnumSymbol == "AB") { rop = PhaseCode::AB; return lop; } - if(EnumSymbol == "AC") + if (EnumSymbol == "AC") { rop = PhaseCode::AC; return lop; } - if(EnumSymbol == "BC") + if (EnumSymbol == "BC") { rop = PhaseCode::BC; return lop; } - if(EnumSymbol == "AN") + if (EnumSymbol == "AN") { rop = PhaseCode::AN; return lop; } - if(EnumSymbol == "BN") + if (EnumSymbol == "BN") { rop = PhaseCode::BN; return lop; } - if(EnumSymbol == "CN") + if (EnumSymbol == "CN") { rop = PhaseCode::CN; return lop; } - if(EnumSymbol == "A") + if (EnumSymbol == "A") { rop = PhaseCode::A; return lop; } - if(EnumSymbol == "B") + if (EnumSymbol == "B") { rop = PhaseCode::B; return lop; } - if(EnumSymbol == "C") + if (EnumSymbol == "C") { rop = PhaseCode::C; return lop; } - if(EnumSymbol == "N") + if (EnumSymbol == "N") { rop = PhaseCode::N; return lop; } - if(EnumSymbol == "s1N") + if (EnumSymbol == "s1N") { rop = PhaseCode::s1N; return lop; } - if(EnumSymbol == "s2N") + if (EnumSymbol == "s2N") { rop = PhaseCode::s2N; return lop; } - if(EnumSymbol == "s12N") + if (EnumSymbol == "s12N") { rop = PhaseCode::s12N; return lop; } - if(EnumSymbol == "s1") + if (EnumSymbol == "s1") { rop = PhaseCode::s1; return lop; } - if(EnumSymbol == "s2") + if (EnumSymbol == "s2") { rop = PhaseCode::s2; return lop; } - if(EnumSymbol == "s12") + if (EnumSymbol == "s12") { rop = PhaseCode::s12; return lop; } - if(EnumSymbol == "none") + if (EnumSymbol == "none") { rop = PhaseCode::none; return lop; } - if(EnumSymbol == "X") + if (EnumSymbol == "X") { rop = PhaseCode::X; return lop; } - if(EnumSymbol == "XY") + if (EnumSymbol == "XY") { rop = PhaseCode::XY; return lop; } - if(EnumSymbol == "XN") + if (EnumSymbol == "XN") { rop = PhaseCode::XN; return lop; } - if(EnumSymbol == "XYN") + if (EnumSymbol == "XYN") { rop = PhaseCode::XYN; return lop; diff --git a/CGMES_3.0.0/PhaseCode.hpp b/CGMES_3.0.0/PhaseCode.hpp index 2f5373cac..3824559e4 100644 --- a/CGMES_3.0.0/PhaseCode.hpp +++ b/CGMES_3.0.0/PhaseCode.hpp @@ -9,117 +9,63 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - An unordered enumeration of phase identifiers. Allows designation of phases for both transmission and distribution equipment, circuits and loads. The enumeration, by itself, does not describe how the phases are connected together or connected to ground. Ground is not explicitly denoted as a phase. Residential and small commercial loads are often served from single-phase, or split-phase, secondary circuits. For the example of s12N, phases 1 and 2 refer to hot wires that are 180 degrees out of phase, while N refers to the neutral wire. Through single-phase transformer connections, these secondary circuits may be served from one or two of the primary phases A, B, and C. For three-phase loads, use the A, B, C phase codes instead of s12N. The integer values are from IEC 61968-9 to support revenue metering applications. - */ + /** \brief An unordered enumeration of phase identifiers. Allows designation of phases for both transmission and distribution equipment, circuits and loads. The enumeration, by itself, does not describe how the phases are connected together or connected to ground. Ground is not explicitly denoted as a phase. Residential and small commercial loads are often served from single-phase, or split-phase, secondary circuits. For the example of s12N, phases 1 and 2 refer to hot wires that are 180 degrees out of phase, while N refers to the neutral wire. Through single-phase transformer connections, these secondary circuits may be served from one or two of the primary phases A, B, and C. For three-phase loads, use the A, B, C phase codes instead of s12N. The integer values are from IEC 61968-9 to support revenue metering applications. */ class PhaseCode { public: enum PhaseCode_ENUM { - /** - * Phases A, B, C, and N. - */ + /** Phases A, B, C, and N. */ ABCN, - /** - * Phases A, B, and C. - */ + /** Phases A, B, and C. */ ABC, - /** - * Phases A, B, and neutral. - */ + /** Phases A, B, and neutral. */ ABN, - /** - * Phases A, C and neutral. - */ + /** Phases A, C and neutral. */ ACN, - /** - * Phases B, C, and neutral. - */ + /** Phases B, C, and neutral. */ BCN, - /** - * Phases A and B. - */ + /** Phases A and B. */ AB, - /** - * Phases A and C. - */ + /** Phases A and C. */ AC, - /** - * Phases B and C. - */ + /** Phases B and C. */ BC, - /** - * Phases A and neutral. - */ + /** Phases A and neutral. */ AN, - /** - * Phases B and neutral. - */ + /** Phases B and neutral. */ BN, - /** - * Phases C and neutral. - */ + /** Phases C and neutral. */ CN, - /** - * Phase A. - */ + /** Phase A. */ A, - /** - * Phase B. - */ + /** Phase B. */ B, - /** - * Phase C. - */ + /** Phase C. */ C, - /** - * Neutral phase. - */ + /** Neutral phase. */ N, - /** - * Secondary phase 1 and neutral. - */ + /** Secondary phase 1 and neutral. */ s1N, - /** - * Secondary phase 2 and neutral. - */ + /** Secondary phase 2 and neutral. */ s2N, - /** - * Secondary phases 1, 2, and neutral. - */ + /** Secondary phases 1, 2, and neutral. */ s12N, - /** - * Secondary phase 1. - */ + /** Secondary phase 1. */ s1, - /** - * Secondary phase 2. - */ + /** Secondary phase 2. */ s2, - /** - * Secondary phase 1 and 2. - */ + /** Secondary phase 1 and 2. */ s12, - /** - * No phases specified. - */ + /** No phases specified. */ none, - /** - * Unknown non-neutral phase. - */ + /** Unknown non-neutral phase. */ X, - /** - * Two unknown non-neutral phases. - */ + /** Two unknown non-neutral phases. */ XY, - /** - * Unknown non-neutral phase plus neutral. - */ + /** Unknown non-neutral phase plus neutral. */ XN, - /** - * Two unknown non-neutral phases plus neutral. - */ + /** Two unknown non-neutral phases plus neutral. */ XYN, }; diff --git a/CGMES_3.0.0/PhaseTapChanger.cpp b/CGMES_3.0.0/PhaseTapChanger.cpp index 0454241af..7e542043f 100644 --- a/CGMES_3.0.0/PhaseTapChanger.cpp +++ b/CGMES_3.0.0/PhaseTapChanger.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -PhaseTapChanger::PhaseTapChanger() : TransformerEnd(nullptr) {}; -PhaseTapChanger::~PhaseTapChanger() {}; +PhaseTapChanger::PhaseTapChanger() : TransformerEnd(nullptr) {} +PhaseTapChanger::~PhaseTapChanger() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ PhaseTapChanger::getPossibleProfilesForAttributes() const return map; } - - bool assign_TransformerEnd_PhaseTapChanger(BaseClass*, BaseClass*); bool assign_PhaseTapChanger_TransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,10 +58,10 @@ bool assign_PhaseTapChanger_TransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* return false; } - bool get_PhaseTapChanger_TransformerEnd(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const PhaseTapChanger* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->TransformerEnd != 0) { @@ -74,7 +72,6 @@ bool get_PhaseTapChanger_TransformerEnd(const BaseClass* BaseClass_ptr1, std::li return false; } - const char PhaseTapChanger::debugName[] = "PhaseTapChanger"; const char* PhaseTapChanger::debugString() const { @@ -83,7 +80,7 @@ const char* PhaseTapChanger::debugString() const void PhaseTapChanger::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PhaseTapChanger"), &PhaseTapChanger_factory)); + factory_map.emplace("cim:PhaseTapChanger", &PhaseTapChanger_factory); } void PhaseTapChanger::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -92,7 +89,7 @@ void PhaseTapChanger::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChanger.TransformerEnd"), &assign_PhaseTapChanger_TransformerEnd)); + assign_map.emplace("cim:PhaseTapChanger.TransformerEnd", &assign_PhaseTapChanger_TransformerEnd); } void PhaseTapChanger::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/PhaseTapChanger.hpp b/CGMES_3.0.0/PhaseTapChanger.hpp index c99cce895..19d5f17eb 100644 --- a/CGMES_3.0.0/PhaseTapChanger.hpp +++ b/CGMES_3.0.0/PhaseTapChanger.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class TransformerEnd; - /* - A transformer phase shifting tap model that controls the phase angle difference across the power transformer and potentially the active power flow through the power transformer. This phase tap model may also impact the voltage magnitude. - */ + /** \brief A transformer phase shifting tap model that controls the phase angle difference across the power transformer and potentially the active power flow through the power transformer. This phase tap model may also impact the voltage magnitude. */ class PhaseTapChanger : public TapChanger { public: @@ -27,7 +25,8 @@ namespace CIMPP PhaseTapChanger(); ~PhaseTapChanger() override; - CIMPP::TransformerEnd* TransformerEnd; /* Transformer end to which this phase tap changer belongs. Default: 0 */ + /** \brief Transformer end to which this phase tap changer belongs. Default: 0 */ + CIMPP::TransformerEnd* TransformerEnd; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PhaseTapChangerAsymmetrical.cpp b/CGMES_3.0.0/PhaseTapChangerAsymmetrical.cpp index d7575eea8..c8b178100 100644 --- a/CGMES_3.0.0/PhaseTapChangerAsymmetrical.cpp +++ b/CGMES_3.0.0/PhaseTapChangerAsymmetrical.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "AngleDegrees.hpp" using namespace CIMPP; -PhaseTapChangerAsymmetrical::PhaseTapChangerAsymmetrical() {}; -PhaseTapChangerAsymmetrical::~PhaseTapChangerAsymmetrical() {}; +PhaseTapChangerAsymmetrical::PhaseTapChangerAsymmetrical() {} +PhaseTapChangerAsymmetrical::~PhaseTapChangerAsymmetrical() {} static const std::list PossibleProfilesForClass = { @@ -41,25 +40,24 @@ PhaseTapChangerAsymmetrical::getPossibleProfilesForAttributes() const return map; } - -bool assign_PhaseTapChangerAsymmetrical_windingConnectionAngle(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PhaseTapChangerAsymmetrical_windingConnectionAngle(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PhaseTapChangerAsymmetrical* element = dynamic_cast(BaseClass_ptr1)) + PhaseTapChangerAsymmetrical* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->windingConnectionAngle; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PhaseTapChangerAsymmetrical_windingConnectionAngle(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PhaseTapChangerAsymmetrical* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChangerAsymmetrical* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->windingConnectionAngle; if (!buffer.str().empty()) @@ -71,8 +69,6 @@ bool get_PhaseTapChangerAsymmetrical_windingConnectionAngle(const BaseClass* Bas return false; } - - const char PhaseTapChangerAsymmetrical::debugName[] = "PhaseTapChangerAsymmetrical"; const char* PhaseTapChangerAsymmetrical::debugString() const { @@ -81,12 +77,12 @@ const char* PhaseTapChangerAsymmetrical::debugString() const void PhaseTapChangerAsymmetrical::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PhaseTapChangerAsymmetrical"), &PhaseTapChangerAsymmetrical_factory)); + factory_map.emplace("cim:PhaseTapChangerAsymmetrical", &PhaseTapChangerAsymmetrical_factory); } void PhaseTapChangerAsymmetrical::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerAsymmetrical.windingConnectionAngle"), &assign_PhaseTapChangerAsymmetrical_windingConnectionAngle)); + assign_map.emplace("cim:PhaseTapChangerAsymmetrical.windingConnectionAngle", &assign_PhaseTapChangerAsymmetrical_windingConnectionAngle); } void PhaseTapChangerAsymmetrical::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/PhaseTapChangerAsymmetrical.hpp b/CGMES_3.0.0/PhaseTapChangerAsymmetrical.hpp index 64a9217e8..1514588a7 100644 --- a/CGMES_3.0.0/PhaseTapChangerAsymmetrical.hpp +++ b/CGMES_3.0.0/PhaseTapChangerAsymmetrical.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Describes the tap model for an asymmetrical phase shifting transformer in which the difference voltage vector adds to the in-phase winding. The out-of-phase winding is the transformer end where the tap changer is located. The angle between the in-phase and out-of-phase windings is named the winding connection angle. The phase shift depends on both the difference voltage magnitude and the winding connection angle. - */ + /** \brief Describes the tap model for an asymmetrical phase shifting transformer in which the difference voltage vector adds to the in-phase winding. The out-of-phase winding is the transformer end where the tap changer is located. The angle between the in-phase and out-of-phase windings is named the winding connection angle. The phase shift depends on both the difference voltage magnitude and the winding connection angle. */ class PhaseTapChangerAsymmetrical : public PhaseTapChangerNonLinear { public: @@ -27,7 +25,8 @@ namespace CIMPP PhaseTapChangerAsymmetrical(); ~PhaseTapChangerAsymmetrical() override; - CIMPP::AngleDegrees windingConnectionAngle; /* The phase angle between the in-phase winding and the out-of -phase winding used for creating phase shift. The out-of-phase winding produces what is known as the difference voltage. Setting this angle to 90 degrees is not the same as a symmetrical transformer. The attribute can only be multiples of 30 degrees. The allowed range is -150 degrees to 150 degrees excluding 0. Default: nullptr */ + /** \brief The phase angle between the in-phase winding and the out-of -phase winding used for creating phase shift. The out-of-phase winding produces what is known as the difference voltage. Setting this angle to 90 degrees is not the same as a symmetrical transformer. The attribute can only be multiples of 30 degrees. The allowed range is -150 degrees to 150 degrees excluding 0. Default: nullptr */ + CIMPP::AngleDegrees windingConnectionAngle; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PhaseTapChangerLinear.cpp b/CGMES_3.0.0/PhaseTapChangerLinear.cpp index 3adf2a61c..a54861567 100644 --- a/CGMES_3.0.0/PhaseTapChangerLinear.cpp +++ b/CGMES_3.0.0/PhaseTapChangerLinear.cpp @@ -8,14 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "AngleDegrees.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -PhaseTapChangerLinear::PhaseTapChangerLinear() {}; -PhaseTapChangerLinear::~PhaseTapChangerLinear() {}; +PhaseTapChangerLinear::PhaseTapChangerLinear() {} +PhaseTapChangerLinear::~PhaseTapChangerLinear() {} static const std::list PossibleProfilesForClass = { @@ -45,51 +42,52 @@ PhaseTapChangerLinear::getPossibleProfilesForAttributes() const return map; } - -bool assign_PhaseTapChangerLinear_stepPhaseShiftIncrement(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PhaseTapChangerLinear_stepPhaseShiftIncrement(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1)) + PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->stepPhaseShiftIncrement; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PhaseTapChangerLinear_xMax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PhaseTapChangerLinear_xMax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1)) + PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xMax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PhaseTapChangerLinear_xMin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PhaseTapChangerLinear_xMin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1)) + PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xMin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PhaseTapChangerLinear_stepPhaseShiftIncrement(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->stepPhaseShiftIncrement; if (!buffer.str().empty()) @@ -103,7 +101,8 @@ bool get_PhaseTapChangerLinear_stepPhaseShiftIncrement(const BaseClass* BaseClas bool get_PhaseTapChangerLinear_xMax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xMax; if (!buffer.str().empty()) @@ -117,7 +116,8 @@ bool get_PhaseTapChangerLinear_xMax(const BaseClass* BaseClass_ptr1, std::string bool get_PhaseTapChangerLinear_xMin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChangerLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xMin; if (!buffer.str().empty()) @@ -129,8 +129,6 @@ bool get_PhaseTapChangerLinear_xMin(const BaseClass* BaseClass_ptr1, std::string return false; } - - const char PhaseTapChangerLinear::debugName[] = "PhaseTapChangerLinear"; const char* PhaseTapChangerLinear::debugString() const { @@ -139,14 +137,14 @@ const char* PhaseTapChangerLinear::debugString() const void PhaseTapChangerLinear::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PhaseTapChangerLinear"), &PhaseTapChangerLinear_factory)); + factory_map.emplace("cim:PhaseTapChangerLinear", &PhaseTapChangerLinear_factory); } void PhaseTapChangerLinear::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerLinear.stepPhaseShiftIncrement"), &assign_PhaseTapChangerLinear_stepPhaseShiftIncrement)); - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerLinear.xMax"), &assign_PhaseTapChangerLinear_xMax)); - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerLinear.xMin"), &assign_PhaseTapChangerLinear_xMin)); + assign_map.emplace("cim:PhaseTapChangerLinear.stepPhaseShiftIncrement", &assign_PhaseTapChangerLinear_stepPhaseShiftIncrement); + assign_map.emplace("cim:PhaseTapChangerLinear.xMax", &assign_PhaseTapChangerLinear_xMax); + assign_map.emplace("cim:PhaseTapChangerLinear.xMin", &assign_PhaseTapChangerLinear_xMin); } void PhaseTapChangerLinear::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/PhaseTapChangerLinear.hpp b/CGMES_3.0.0/PhaseTapChangerLinear.hpp index c2bdd7414..e58cb053e 100644 --- a/CGMES_3.0.0/PhaseTapChangerLinear.hpp +++ b/CGMES_3.0.0/PhaseTapChangerLinear.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Describes a tap changer with a linear relation between the tap step and the phase angle difference across the transformer. This is a mathematical model that is an approximation of a real phase tap changer. The phase angle is computed as stepPhaseShiftIncrement times the tap position. The voltage magnitude of both sides is the same. - */ + /** \brief Describes a tap changer with a linear relation between the tap step and the phase angle difference across the transformer. This is a mathematical model that is an approximation of a real phase tap changer. The phase angle is computed as stepPhaseShiftIncrement times the tap position. The voltage magnitude of both sides is the same. */ class PhaseTapChangerLinear : public PhaseTapChanger { public: @@ -28,9 +26,14 @@ namespace CIMPP PhaseTapChangerLinear(); ~PhaseTapChangerLinear() override; - CIMPP::AngleDegrees stepPhaseShiftIncrement; /* Phase shift per step position. A positive value indicates a positive angle variation from the Terminal at the PowerTransformerEnd, where the TapChanger is located, into the transformer. The actual phase shift increment might be more accurately computed from the symmetrical or asymmetrical models or a tap step table lookup if those are available. Default: nullptr */ - CIMPP::Reactance xMax; /* The reactance depends on the tap position according to a `u` shaped curve. The maximum reactance (xMax) appears at the low and high tap positions. Depending on the `u` curve the attribute can be either higher or lower than PowerTransformerEnd.x. Default: nullptr */ - CIMPP::Reactance xMin; /* The reactance depends on the tap position according to a `u` shaped curve. The minimum reactance (xMin) appears at the mid tap position. PowerTransformerEnd.x shall be consistent with PhaseTapChangerLinear.xMin and PhaseTapChangerNonLinear.xMin. In case of inconsistency, PowerTransformerEnd.x shall be used. Default: nullptr */ + /** \brief Phase shift per step position. A positive value indicates a positive angle variation from the Terminal at the PowerTransformerEnd, where the TapChanger is located, into the transformer. The actual phase shift increment might be more accurately computed from the symmetrical or asymmetrical models or a tap step table lookup if those are available. Default: nullptr */ + CIMPP::AngleDegrees stepPhaseShiftIncrement; + + /** \brief The reactance depends on the tap position according to a `u` shaped curve. The maximum reactance (xMax) appears at the low and high tap positions. Depending on the `u` curve the attribute can be either higher or lower than PowerTransformerEnd.x. Default: nullptr */ + CIMPP::Reactance xMax; + + /** \brief The reactance depends on the tap position according to a `u` shaped curve. The minimum reactance (xMin) appears at the mid tap position. PowerTransformerEnd.x shall be consistent with PhaseTapChangerLinear.xMin and PhaseTapChangerNonLinear.xMin. In case of inconsistency, PowerTransformerEnd.x shall be used. Default: nullptr */ + CIMPP::Reactance xMin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PhaseTapChangerNonLinear.cpp b/CGMES_3.0.0/PhaseTapChangerNonLinear.cpp index 3dc961ecb..349dad6b6 100644 --- a/CGMES_3.0.0/PhaseTapChangerNonLinear.cpp +++ b/CGMES_3.0.0/PhaseTapChangerNonLinear.cpp @@ -8,14 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PerCent.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -PhaseTapChangerNonLinear::PhaseTapChangerNonLinear() {}; -PhaseTapChangerNonLinear::~PhaseTapChangerNonLinear() {}; +PhaseTapChangerNonLinear::PhaseTapChangerNonLinear() {} +PhaseTapChangerNonLinear::~PhaseTapChangerNonLinear() {} static const std::list PossibleProfilesForClass = { @@ -45,51 +42,52 @@ PhaseTapChangerNonLinear::getPossibleProfilesForAttributes() const return map; } - -bool assign_PhaseTapChangerNonLinear_voltageStepIncrement(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PhaseTapChangerNonLinear_voltageStepIncrement(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1)) + PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->voltageStepIncrement; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PhaseTapChangerNonLinear_xMax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PhaseTapChangerNonLinear_xMax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1)) + PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xMax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PhaseTapChangerNonLinear_xMin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PhaseTapChangerNonLinear_xMin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1)) + PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xMin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PhaseTapChangerNonLinear_voltageStepIncrement(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->voltageStepIncrement; if (!buffer.str().empty()) @@ -103,7 +101,8 @@ bool get_PhaseTapChangerNonLinear_voltageStepIncrement(const BaseClass* BaseClas bool get_PhaseTapChangerNonLinear_xMax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xMax; if (!buffer.str().empty()) @@ -117,7 +116,8 @@ bool get_PhaseTapChangerNonLinear_xMax(const BaseClass* BaseClass_ptr1, std::str bool get_PhaseTapChangerNonLinear_xMin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChangerNonLinear* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xMin; if (!buffer.str().empty()) @@ -129,8 +129,6 @@ bool get_PhaseTapChangerNonLinear_xMin(const BaseClass* BaseClass_ptr1, std::str return false; } - - const char PhaseTapChangerNonLinear::debugName[] = "PhaseTapChangerNonLinear"; const char* PhaseTapChangerNonLinear::debugString() const { @@ -139,14 +137,14 @@ const char* PhaseTapChangerNonLinear::debugString() const void PhaseTapChangerNonLinear::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PhaseTapChangerNonLinear"), &PhaseTapChangerNonLinear_factory)); + factory_map.emplace("cim:PhaseTapChangerNonLinear", &PhaseTapChangerNonLinear_factory); } void PhaseTapChangerNonLinear::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerNonLinear.voltageStepIncrement"), &assign_PhaseTapChangerNonLinear_voltageStepIncrement)); - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerNonLinear.xMax"), &assign_PhaseTapChangerNonLinear_xMax)); - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerNonLinear.xMin"), &assign_PhaseTapChangerNonLinear_xMin)); + assign_map.emplace("cim:PhaseTapChangerNonLinear.voltageStepIncrement", &assign_PhaseTapChangerNonLinear_voltageStepIncrement); + assign_map.emplace("cim:PhaseTapChangerNonLinear.xMax", &assign_PhaseTapChangerNonLinear_xMax); + assign_map.emplace("cim:PhaseTapChangerNonLinear.xMin", &assign_PhaseTapChangerNonLinear_xMin); } void PhaseTapChangerNonLinear::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/PhaseTapChangerNonLinear.hpp b/CGMES_3.0.0/PhaseTapChangerNonLinear.hpp index 1d50afa82..2f318be49 100644 --- a/CGMES_3.0.0/PhaseTapChangerNonLinear.hpp +++ b/CGMES_3.0.0/PhaseTapChangerNonLinear.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The non-linear phase tap changer describes the non-linear behaviour of a phase tap changer. This is a base class for the symmetrical and asymmetrical phase tap changer models. The details of these models can be found in IEC 61970-301. - */ + /** \brief The non-linear phase tap changer describes the non-linear behaviour of a phase tap changer. This is a base class for the symmetrical and asymmetrical phase tap changer models. The details of these models can be found in IEC 61970-301. */ class PhaseTapChangerNonLinear : public PhaseTapChanger { public: @@ -28,9 +26,14 @@ namespace CIMPP PhaseTapChangerNonLinear(); ~PhaseTapChangerNonLinear() override; - CIMPP::PerCent voltageStepIncrement; /* The voltage step increment on the out of phase winding (the PowerTransformerEnd where the TapChanger is located) specified in percent of rated voltage of the PowerTransformerEnd. A positive value means a positive voltage variation from the Terminal at the PowerTransformerEnd, where the TapChanger is located, into the transformer. When the increment is negative, the voltage decreases when the tap step increases. Default: nullptr */ - CIMPP::Reactance xMax; /* The reactance depends on the tap position according to a `u` shaped curve. The maximum reactance (xMax) appears at the low and high tap positions. Depending on the `u` curve the attribute can be either higher or lower than PowerTransformerEnd.x. Default: nullptr */ - CIMPP::Reactance xMin; /* The reactance depend on the tap position according to a `u` shaped curve. The minimum reactance (xMin) appear at the mid tap position. PowerTransformerEnd.x shall be consistent with PhaseTapChangerLinear.xMin and PhaseTapChangerNonLinear.xMin. In case of inconsistency, PowerTransformerEnd.x shall be used. Default: nullptr */ + /** \brief The voltage step increment on the out of phase winding (the PowerTransformerEnd where the TapChanger is located) specified in percent of rated voltage of the PowerTransformerEnd. A positive value means a positive voltage variation from the Terminal at the PowerTransformerEnd, where the TapChanger is located, into the transformer. When the increment is negative, the voltage decreases when the tap step increases. Default: nullptr */ + CIMPP::PerCent voltageStepIncrement; + + /** \brief The reactance depends on the tap position according to a `u` shaped curve. The maximum reactance (xMax) appears at the low and high tap positions. Depending on the `u` curve the attribute can be either higher or lower than PowerTransformerEnd.x. Default: nullptr */ + CIMPP::Reactance xMax; + + /** \brief The reactance depend on the tap position according to a `u` shaped curve. The minimum reactance (xMin) appear at the mid tap position. PowerTransformerEnd.x shall be consistent with PhaseTapChangerLinear.xMin and PhaseTapChangerNonLinear.xMin. In case of inconsistency, PowerTransformerEnd.x shall be used. Default: nullptr */ + CIMPP::Reactance xMin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PhaseTapChangerSymmetrical.cpp b/CGMES_3.0.0/PhaseTapChangerSymmetrical.cpp index 5abde9dad..11987b7ee 100644 --- a/CGMES_3.0.0/PhaseTapChangerSymmetrical.cpp +++ b/CGMES_3.0.0/PhaseTapChangerSymmetrical.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -PhaseTapChangerSymmetrical::PhaseTapChangerSymmetrical() {}; -PhaseTapChangerSymmetrical::~PhaseTapChangerSymmetrical() {}; +PhaseTapChangerSymmetrical::PhaseTapChangerSymmetrical() {} +PhaseTapChangerSymmetrical::~PhaseTapChangerSymmetrical() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ PhaseTapChangerSymmetrical::getPossibleProfilesForAttributes() const return map; } - - - - - const char PhaseTapChangerSymmetrical::debugName[] = "PhaseTapChangerSymmetrical"; const char* PhaseTapChangerSymmetrical::debugString() const { @@ -52,7 +47,7 @@ const char* PhaseTapChangerSymmetrical::debugString() const void PhaseTapChangerSymmetrical::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PhaseTapChangerSymmetrical"), &PhaseTapChangerSymmetrical_factory)); + factory_map.emplace("cim:PhaseTapChangerSymmetrical", &PhaseTapChangerSymmetrical_factory); } void PhaseTapChangerSymmetrical::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/PhaseTapChangerSymmetrical.hpp b/CGMES_3.0.0/PhaseTapChangerSymmetrical.hpp index b4727ed27..0dbdbf43a 100644 --- a/CGMES_3.0.0/PhaseTapChangerSymmetrical.hpp +++ b/CGMES_3.0.0/PhaseTapChangerSymmetrical.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Describes a symmetrical phase shifting transformer tap model in which the voltage magnitude of both sides is the same. The difference voltage magnitude is the base in an equal-sided triangle where the sides corresponds to the primary and secondary voltages. The phase angle difference corresponds to the top angle and can be expressed as twice the arctangent of half the total difference voltage. - */ + /** \brief Describes a symmetrical phase shifting transformer tap model in which the voltage magnitude of both sides is the same. The difference voltage magnitude is the base in an equal-sided triangle where the sides corresponds to the primary and secondary voltages. The phase angle difference corresponds to the top angle and can be expressed as twice the arctangent of half the total difference voltage. */ class PhaseTapChangerSymmetrical : public PhaseTapChangerNonLinear { public: @@ -26,7 +24,6 @@ namespace CIMPP PhaseTapChangerSymmetrical(); ~PhaseTapChangerSymmetrical() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PhaseTapChangerTable.cpp b/CGMES_3.0.0/PhaseTapChangerTable.cpp index b9d353812..81e747699 100644 --- a/CGMES_3.0.0/PhaseTapChangerTable.cpp +++ b/CGMES_3.0.0/PhaseTapChangerTable.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -PhaseTapChangerTable::PhaseTapChangerTable() {}; -PhaseTapChangerTable::~PhaseTapChangerTable() {}; +PhaseTapChangerTable::PhaseTapChangerTable() {} +PhaseTapChangerTable::~PhaseTapChangerTable() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ PhaseTapChangerTable::getPossibleProfilesForAttributes() const return map; } - - bool assign_PhaseTapChangerTablePoint_PhaseTapChangerTable(BaseClass*, BaseClass*); bool assign_PhaseTapChangerTable_PhaseTapChangerTablePoint(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_PhaseTapChangerTable_PhaseTapChangerTablePoint(BaseClass* BaseClass_ } return false; } + bool assign_PhaseTapChangerTabular_PhaseTapChangerTable(BaseClass*, BaseClass*); bool assign_PhaseTapChangerTable_PhaseTapChangerTabular(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -87,7 +86,7 @@ const char* PhaseTapChangerTable::debugString() const void PhaseTapChangerTable::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTable"), &PhaseTapChangerTable_factory)); + factory_map.emplace("cim:PhaseTapChangerTable", &PhaseTapChangerTable_factory); } void PhaseTapChangerTable::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -96,8 +95,8 @@ void PhaseTapChangerTable::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTable.PhaseTapChangerTablePoint"), &assign_PhaseTapChangerTable_PhaseTapChangerTablePoint)); - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTable.PhaseTapChangerTabular"), &assign_PhaseTapChangerTable_PhaseTapChangerTabular)); + assign_map.emplace("cim:PhaseTapChangerTable.PhaseTapChangerTablePoint", &assign_PhaseTapChangerTable_PhaseTapChangerTablePoint); + assign_map.emplace("cim:PhaseTapChangerTable.PhaseTapChangerTabular", &assign_PhaseTapChangerTable_PhaseTapChangerTabular); } void PhaseTapChangerTable::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/PhaseTapChangerTable.hpp b/CGMES_3.0.0/PhaseTapChangerTable.hpp index 6291c316c..9b76ee650 100644 --- a/CGMES_3.0.0/PhaseTapChangerTable.hpp +++ b/CGMES_3.0.0/PhaseTapChangerTable.hpp @@ -18,9 +18,7 @@ namespace CIMPP class PhaseTapChangerTablePoint; class PhaseTapChangerTabular; - /* - Describes a tabular curve for how the phase angle difference and impedance varies with the tap step. - */ + /** \brief Describes a tabular curve for how the phase angle difference and impedance varies with the tap step. */ class PhaseTapChangerTable : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP PhaseTapChangerTable(); ~PhaseTapChangerTable() override; - std::list PhaseTapChangerTablePoint; /* The points of this table. Default: 0 */ - std::list PhaseTapChangerTabular; /* The phase tap changers to which this phase tap table applies. Default: 0 */ + /** \brief The points of this table. Default: 0 */ + std::list PhaseTapChangerTablePoint; + + /** \brief The phase tap changers to which this phase tap table applies. Default: 0 */ + std::list PhaseTapChangerTabular; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PhaseTapChangerTablePoint.cpp b/CGMES_3.0.0/PhaseTapChangerTablePoint.cpp index 156dcecab..e4c877019 100644 --- a/CGMES_3.0.0/PhaseTapChangerTablePoint.cpp +++ b/CGMES_3.0.0/PhaseTapChangerTablePoint.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "PhaseTapChangerTable.hpp" -#include "AngleDegrees.hpp" using namespace CIMPP; -PhaseTapChangerTablePoint::PhaseTapChangerTablePoint() : PhaseTapChangerTable(nullptr) {}; -PhaseTapChangerTablePoint::~PhaseTapChangerTablePoint() {}; +PhaseTapChangerTablePoint::PhaseTapChangerTablePoint() : PhaseTapChangerTable(nullptr) {} +PhaseTapChangerTablePoint::~PhaseTapChangerTablePoint() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ PhaseTapChangerTablePoint::getPossibleProfilesForAttributes() const return map; } - -bool assign_PhaseTapChangerTablePoint_angle(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (PhaseTapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->angle; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_PhaseTapChangerTable_PhaseTapChangerTablePoint(BaseClass*, BaseClass*); bool assign_PhaseTapChangerTablePoint_PhaseTapChangerTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_PhaseTapChangerTablePoint_PhaseTapChangerTable(BaseClass* BaseClass_ return false; } -bool get_PhaseTapChangerTablePoint_angle(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_PhaseTapChangerTablePoint_angle(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const PhaseTapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + PhaseTapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->angle; - if (!buffer.str().empty()) + buffer >> element->angle; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_PhaseTapChangerTablePoint_PhaseTapChangerTable(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const PhaseTapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PhaseTapChangerTable != 0) { @@ -102,6 +86,20 @@ bool get_PhaseTapChangerTablePoint_PhaseTapChangerTable(const BaseClass* BaseCla return false; } +bool get_PhaseTapChangerTablePoint_angle(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const PhaseTapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->angle; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char PhaseTapChangerTablePoint::debugName[] = "PhaseTapChangerTablePoint"; const char* PhaseTapChangerTablePoint::debugString() const @@ -111,17 +109,17 @@ const char* PhaseTapChangerTablePoint::debugString() const void PhaseTapChangerTablePoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTablePoint"), &PhaseTapChangerTablePoint_factory)); + factory_map.emplace("cim:PhaseTapChangerTablePoint", &PhaseTapChangerTablePoint_factory); } void PhaseTapChangerTablePoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTablePoint.angle"), &assign_PhaseTapChangerTablePoint_angle)); + assign_map.emplace("cim:PhaseTapChangerTablePoint.angle", &assign_PhaseTapChangerTablePoint_angle); } void PhaseTapChangerTablePoint::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTablePoint.PhaseTapChangerTable"), &assign_PhaseTapChangerTablePoint_PhaseTapChangerTable)); + assign_map.emplace("cim:PhaseTapChangerTablePoint.PhaseTapChangerTable", &assign_PhaseTapChangerTablePoint_PhaseTapChangerTable); } void PhaseTapChangerTablePoint::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/PhaseTapChangerTablePoint.hpp b/CGMES_3.0.0/PhaseTapChangerTablePoint.hpp index 7a2e8d49b..92590a79a 100644 --- a/CGMES_3.0.0/PhaseTapChangerTablePoint.hpp +++ b/CGMES_3.0.0/PhaseTapChangerTablePoint.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class PhaseTapChangerTable; - /* - Describes each tap step in the phase tap changer tabular curve. - */ + /** \brief Describes each tap step in the phase tap changer tabular curve. */ class PhaseTapChangerTablePoint : public TapChangerTablePoint { public: @@ -28,8 +26,11 @@ namespace CIMPP PhaseTapChangerTablePoint(); ~PhaseTapChangerTablePoint() override; - CIMPP::PhaseTapChangerTable* PhaseTapChangerTable; /* The table of this point. Default: 0 */ - CIMPP::AngleDegrees angle; /* The angle difference in degrees. A positive value indicates a positive angle variation from the Terminal at the PowerTransformerEnd, where the TapChanger is located, into the transformer. Default: nullptr */ + /** \brief The table of this point. Default: 0 */ + CIMPP::PhaseTapChangerTable* PhaseTapChangerTable; + + /** \brief The angle difference in degrees. A positive value indicates a positive angle variation from the Terminal at the PowerTransformerEnd, where the TapChanger is located, into the transformer. Default: nullptr */ + CIMPP::AngleDegrees angle; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PhaseTapChangerTabular.cpp b/CGMES_3.0.0/PhaseTapChangerTabular.cpp index b5cec68a7..34a8103ba 100644 --- a/CGMES_3.0.0/PhaseTapChangerTabular.cpp +++ b/CGMES_3.0.0/PhaseTapChangerTabular.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -PhaseTapChangerTabular::PhaseTapChangerTabular() : PhaseTapChangerTable(nullptr) {}; -PhaseTapChangerTabular::~PhaseTapChangerTabular() {}; +PhaseTapChangerTabular::PhaseTapChangerTabular() : PhaseTapChangerTable(nullptr) {} +PhaseTapChangerTabular::~PhaseTapChangerTabular() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ PhaseTapChangerTabular::getPossibleProfilesForAttributes() const return map; } - - bool assign_PhaseTapChangerTable_PhaseTapChangerTabular(BaseClass*, BaseClass*); bool assign_PhaseTapChangerTabular_PhaseTapChangerTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,10 +58,10 @@ bool assign_PhaseTapChangerTabular_PhaseTapChangerTable(BaseClass* BaseClass_ptr return false; } - bool get_PhaseTapChangerTabular_PhaseTapChangerTable(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const PhaseTapChangerTabular* element = dynamic_cast(BaseClass_ptr1)) + const PhaseTapChangerTabular* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PhaseTapChangerTable != 0) { @@ -74,7 +72,6 @@ bool get_PhaseTapChangerTabular_PhaseTapChangerTable(const BaseClass* BaseClass_ return false; } - const char PhaseTapChangerTabular::debugName[] = "PhaseTapChangerTabular"; const char* PhaseTapChangerTabular::debugString() const { @@ -83,7 +80,7 @@ const char* PhaseTapChangerTabular::debugString() const void PhaseTapChangerTabular::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTabular"), &PhaseTapChangerTabular_factory)); + factory_map.emplace("cim:PhaseTapChangerTabular", &PhaseTapChangerTabular_factory); } void PhaseTapChangerTabular::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -92,7 +89,7 @@ void PhaseTapChangerTabular::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PhaseTapChangerTabular.PhaseTapChangerTable"), &assign_PhaseTapChangerTabular_PhaseTapChangerTable)); + assign_map.emplace("cim:PhaseTapChangerTabular.PhaseTapChangerTable", &assign_PhaseTapChangerTabular_PhaseTapChangerTable); } void PhaseTapChangerTabular::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/PhaseTapChangerTabular.hpp b/CGMES_3.0.0/PhaseTapChangerTabular.hpp index 39d32a5b9..9c0c15085 100644 --- a/CGMES_3.0.0/PhaseTapChangerTabular.hpp +++ b/CGMES_3.0.0/PhaseTapChangerTabular.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class PhaseTapChangerTable; - /* - Describes a tap changer with a table defining the relation between the tap step and the phase angle difference across the transformer. - */ + /** \brief Describes a tap changer with a table defining the relation between the tap step and the phase angle difference across the transformer. */ class PhaseTapChangerTabular : public PhaseTapChanger { public: @@ -27,7 +25,8 @@ namespace CIMPP PhaseTapChangerTabular(); ~PhaseTapChangerTabular() override; - CIMPP::PhaseTapChangerTable* PhaseTapChangerTable; /* The phase tap changer table for this phase tap changer. Default: 0 */ + /** \brief The phase tap changer table for this phase tap changer. Default: 0 */ + CIMPP::PhaseTapChangerTable* PhaseTapChangerTable; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PhotoVoltaicUnit.cpp b/CGMES_3.0.0/PhotoVoltaicUnit.cpp index 9b0c5b808..0574fc94b 100644 --- a/CGMES_3.0.0/PhotoVoltaicUnit.cpp +++ b/CGMES_3.0.0/PhotoVoltaicUnit.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -PhotoVoltaicUnit::PhotoVoltaicUnit() {}; -PhotoVoltaicUnit::~PhotoVoltaicUnit() {}; +PhotoVoltaicUnit::PhotoVoltaicUnit() {} +PhotoVoltaicUnit::~PhotoVoltaicUnit() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ PhotoVoltaicUnit::getPossibleProfilesForAttributes() const return map; } - - - - - const char PhotoVoltaicUnit::debugName[] = "PhotoVoltaicUnit"; const char* PhotoVoltaicUnit::debugString() const { @@ -51,7 +46,7 @@ const char* PhotoVoltaicUnit::debugString() const void PhotoVoltaicUnit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PhotoVoltaicUnit"), &PhotoVoltaicUnit_factory)); + factory_map.emplace("cim:PhotoVoltaicUnit", &PhotoVoltaicUnit_factory); } void PhotoVoltaicUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/PhotoVoltaicUnit.hpp b/CGMES_3.0.0/PhotoVoltaicUnit.hpp index 0adb3ddbe..f80e12b8e 100644 --- a/CGMES_3.0.0/PhotoVoltaicUnit.hpp +++ b/CGMES_3.0.0/PhotoVoltaicUnit.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A photovoltaic device or an aggregation of such devices. - */ + /** \brief A photovoltaic device or an aggregation of such devices. */ class PhotoVoltaicUnit : public PowerElectronicsUnit { public: @@ -26,7 +24,6 @@ namespace CIMPP PhotoVoltaicUnit(); ~PhotoVoltaicUnit() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PositionPoint.cpp b/CGMES_3.0.0/PositionPoint.cpp index 2944edacc..9fbc902cc 100644 --- a/CGMES_3.0.0/PositionPoint.cpp +++ b/CGMES_3.0.0/PositionPoint.cpp @@ -9,15 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "Location.hpp" -#include "Integer.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -PositionPoint::PositionPoint() : Location(nullptr) {}; -PositionPoint::~PositionPoint() {}; +PositionPoint::PositionPoint() : Location(nullptr) {} +PositionPoint::~PositionPoint() {} static const std::list PossibleProfilesForClass = { @@ -48,80 +44,97 @@ PositionPoint::getPossibleProfilesForAttributes() const return map; } +bool assign_Location_PositionPoints(BaseClass*, BaseClass*); +bool assign_PositionPoint_Location(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PositionPoint* element = dynamic_cast(BaseClass_ptr1); + Location* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->Location != element2) + { + element->Location = element2; + return assign_Location_PositionPoints(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_PositionPoint_sequenceNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PositionPoint_sequenceNumber(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + PositionPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->sequenceNumber; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PositionPoint_xPosition(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PositionPoint_xPosition(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + PositionPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->xPosition = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PositionPoint_yPosition(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PositionPoint_yPosition(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + PositionPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->yPosition = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PositionPoint_zPosition(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PositionPoint_zPosition(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + PositionPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->zPosition = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_Location_PositionPoints(BaseClass*, BaseClass*); -bool assign_PositionPoint_Location(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_PositionPoint_Location(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - PositionPoint* element = dynamic_cast(BaseClass_ptr1); - Location* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const PositionPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->Location != element2) + if (element->Location != 0) { - element->Location = element2; - return assign_Location_PositionPoints(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->Location); + return true; } - return true; } return false; } bool get_PositionPoint_sequenceNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + const PositionPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->sequenceNumber; if (!buffer.str().empty()) @@ -135,7 +148,8 @@ bool get_PositionPoint_sequenceNumber(const BaseClass* BaseClass_ptr1, std::stri bool get_PositionPoint_xPosition(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + const PositionPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xPosition; if (!buffer.str().empty()) @@ -149,7 +163,8 @@ bool get_PositionPoint_xPosition(const BaseClass* BaseClass_ptr1, std::stringstr bool get_PositionPoint_yPosition(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + const PositionPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->yPosition; if (!buffer.str().empty()) @@ -163,7 +178,8 @@ bool get_PositionPoint_yPosition(const BaseClass* BaseClass_ptr1, std::stringstr bool get_PositionPoint_zPosition(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PositionPoint* element = dynamic_cast(BaseClass_ptr1)) + const PositionPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->zPosition; if (!buffer.str().empty()) @@ -175,21 +191,6 @@ bool get_PositionPoint_zPosition(const BaseClass* BaseClass_ptr1, std::stringstr return false; } - -bool get_PositionPoint_Location(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const PositionPoint* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->Location != 0) - { - BaseClass_list.push_back(element->Location); - return true; - } - } - return false; -} - - const char PositionPoint::debugName[] = "PositionPoint"; const char* PositionPoint::debugString() const { @@ -198,20 +199,20 @@ const char* PositionPoint::debugString() const void PositionPoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PositionPoint"), &PositionPoint_factory)); + factory_map.emplace("cim:PositionPoint", &PositionPoint_factory); } void PositionPoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PositionPoint.sequenceNumber"), &assign_PositionPoint_sequenceNumber)); - assign_map.insert(std::make_pair(std::string("cim:PositionPoint.xPosition"), &assign_PositionPoint_xPosition)); - assign_map.insert(std::make_pair(std::string("cim:PositionPoint.yPosition"), &assign_PositionPoint_yPosition)); - assign_map.insert(std::make_pair(std::string("cim:PositionPoint.zPosition"), &assign_PositionPoint_zPosition)); + assign_map.emplace("cim:PositionPoint.sequenceNumber", &assign_PositionPoint_sequenceNumber); + assign_map.emplace("cim:PositionPoint.xPosition", &assign_PositionPoint_xPosition); + assign_map.emplace("cim:PositionPoint.yPosition", &assign_PositionPoint_yPosition); + assign_map.emplace("cim:PositionPoint.zPosition", &assign_PositionPoint_zPosition); } void PositionPoint::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PositionPoint.Location"), &assign_PositionPoint_Location)); + assign_map.emplace("cim:PositionPoint.Location", &assign_PositionPoint_Location); } void PositionPoint::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/PositionPoint.hpp b/CGMES_3.0.0/PositionPoint.hpp index 6e10ebfaf..d3a325753 100644 --- a/CGMES_3.0.0/PositionPoint.hpp +++ b/CGMES_3.0.0/PositionPoint.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class Location; - /* - Set of spatial coordinates that determine a point, defined in the coordinate system specified in 'Location.CoordinateSystem'. Use a single position point instance to describe a point-oriented location. Use a sequence of position points to describe a line-oriented object (physical location of non-point oriented objects like cables or lines), or area of an object (like a substation or a geographical zone - in this case, have first and last position point with the same values). - */ + /** \brief Set of spatial coordinates that determine a point, defined in the coordinate system specified in 'Location.CoordinateSystem'. Use a single position point instance to describe a point-oriented location. Use a sequence of position points to describe a line-oriented object (physical location of non-point oriented objects like cables or lines), or area of an object (like a substation or a geographical zone - in this case, have first and last position point with the same values). */ class PositionPoint : public BaseClass { public: @@ -29,11 +27,20 @@ namespace CIMPP PositionPoint(); ~PositionPoint() override; - CIMPP::Location* Location; /* Location described by this position point. Default: 0 */ - CIMPP::Integer sequenceNumber; /* Zero-relative sequence number of this point within a series of points. Default: 0 */ - CIMPP::String xPosition; /* X axis position. Default: '' */ - CIMPP::String yPosition; /* Y axis position. Default: '' */ - CIMPP::String zPosition; /* (if applicable) Z axis position. Default: '' */ + /** \brief Location described by this position point. Default: 0 */ + CIMPP::Location* Location; + + /** \brief Zero-relative sequence number of this point within a series of points. Default: 0 */ + CIMPP::Integer sequenceNumber; + + /** \brief X axis position. Default: '' */ + CIMPP::String xPosition; + + /** \brief Y axis position. Default: '' */ + CIMPP::String yPosition; + + /** \brief (if applicable) Z axis position. Default: '' */ + CIMPP::String zPosition; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PostLineSensor.cpp b/CGMES_3.0.0/PostLineSensor.cpp index fdccc2f7c..b97b27f82 100644 --- a/CGMES_3.0.0/PostLineSensor.cpp +++ b/CGMES_3.0.0/PostLineSensor.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -PostLineSensor::PostLineSensor() {}; -PostLineSensor::~PostLineSensor() {}; +PostLineSensor::PostLineSensor() {} +PostLineSensor::~PostLineSensor() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ PostLineSensor::getPossibleProfilesForAttributes() const return map; } - - - - - const char PostLineSensor::debugName[] = "PostLineSensor"; const char* PostLineSensor::debugString() const { @@ -51,7 +46,7 @@ const char* PostLineSensor::debugString() const void PostLineSensor::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PostLineSensor"), &PostLineSensor_factory)); + factory_map.emplace("cim:PostLineSensor", &PostLineSensor_factory); } void PostLineSensor::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/PostLineSensor.hpp b/CGMES_3.0.0/PostLineSensor.hpp index 331ed4891..9aa74b677 100644 --- a/CGMES_3.0.0/PostLineSensor.hpp +++ b/CGMES_3.0.0/PostLineSensor.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A sensor used mainly in overhead distribution networks as the source of both current and voltage measurements. - */ + /** \brief A sensor used mainly in overhead distribution networks as the source of both current and voltage measurements. */ class PostLineSensor : public Sensor { public: @@ -26,7 +24,6 @@ namespace CIMPP PostLineSensor(); ~PostLineSensor() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PotentialTransformer.cpp b/CGMES_3.0.0/PotentialTransformer.cpp index b6e361dfc..f6d85ac4c 100644 --- a/CGMES_3.0.0/PotentialTransformer.cpp +++ b/CGMES_3.0.0/PotentialTransformer.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -PotentialTransformer::PotentialTransformer() {}; -PotentialTransformer::~PotentialTransformer() {}; +PotentialTransformer::PotentialTransformer() {} +PotentialTransformer::~PotentialTransformer() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ PotentialTransformer::getPossibleProfilesForAttributes() const return map; } - - - - - const char PotentialTransformer::debugName[] = "PotentialTransformer"; const char* PotentialTransformer::debugString() const { @@ -51,7 +46,7 @@ const char* PotentialTransformer::debugString() const void PotentialTransformer::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PotentialTransformer"), &PotentialTransformer_factory)); + factory_map.emplace("cim:PotentialTransformer", &PotentialTransformer_factory); } void PotentialTransformer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/PotentialTransformer.hpp b/CGMES_3.0.0/PotentialTransformer.hpp index ebabce0b8..020c93f0b 100644 --- a/CGMES_3.0.0/PotentialTransformer.hpp +++ b/CGMES_3.0.0/PotentialTransformer.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Instrument transformer (also known as Voltage Transformer) used to measure electrical qualities of the circuit that is being protected and/or monitored. Typically used as voltage transducer for the purpose of metering, protection, or sometimes auxiliary substation supply. A typical secondary voltage rating would be 120V. - */ + /** \brief Instrument transformer (also known as Voltage Transformer) used to measure electrical qualities of the circuit that is being protected and/or monitored. Typically used as voltage transducer for the purpose of metering, protection, or sometimes auxiliary substation supply. A typical secondary voltage rating would be 120V. */ class PotentialTransformer : public Sensor { public: @@ -26,7 +24,6 @@ namespace CIMPP PotentialTransformer(); ~PotentialTransformer() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PowerElectronicsConnection.cpp b/CGMES_3.0.0/PowerElectronicsConnection.cpp index 0c08cbf80..f378cad59 100644 --- a/CGMES_3.0.0/PowerElectronicsConnection.cpp +++ b/CGMES_3.0.0/PowerElectronicsConnection.cpp @@ -10,17 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "PowerElectronicsUnit.hpp" #include "WindTurbineType3or4Dynamics.hpp" -#include "ReactivePower.hpp" -#include "ReactivePower.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" -#include "ApparentPower.hpp" -#include "Voltage.hpp" using namespace CIMPP; -PowerElectronicsConnection::PowerElectronicsConnection() : PowerElectronicsUnit(nullptr), WindTurbineType3or4Dynamics(nullptr) {}; -PowerElectronicsConnection::~PowerElectronicsConnection() {}; +PowerElectronicsConnection::PowerElectronicsConnection() : PowerElectronicsUnit(nullptr), WindTurbineType3or4Dynamics(nullptr) {} +PowerElectronicsConnection::~PowerElectronicsConnection() {} static const std::list PossibleProfilesForClass = { @@ -56,122 +50,143 @@ PowerElectronicsConnection::getPossibleProfilesForAttributes() const return map; } +bool assign_PowerElectronicsUnit_PowerElectronicsConnection(BaseClass*, BaseClass*); +bool assign_PowerElectronicsConnection_PowerElectronicsUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PowerElectronicsConnection* element = dynamic_cast(BaseClass_ptr1); + PowerElectronicsUnit* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PowerElectronicsUnit != element2) + { + element->PowerElectronicsUnit = element2; + return assign_PowerElectronicsUnit_PowerElectronicsConnection(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_PowerElectronicsConnection_maxQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType3or4Dynamics_PowerElectronicsConnection(BaseClass*, BaseClass*); +bool assign_PowerElectronicsConnection_WindTurbineType3or4Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (PowerElectronicsConnection* element = dynamic_cast(BaseClass_ptr1)) + PowerElectronicsConnection* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType3or4Dynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->maxQ; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType3or4Dynamics != element2) + { + element->WindTurbineType3or4Dynamics = element2; + return assign_WindTurbineType3or4Dynamics_PowerElectronicsConnection(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_PowerElectronicsConnection_minQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerElectronicsConnection_maxQ(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerElectronicsConnection* element = dynamic_cast(BaseClass_ptr1)) + PowerElectronicsConnection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->minQ; - if (buffer.fail()) - return false; - else + buffer >> element->maxQ; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerElectronicsConnection_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerElectronicsConnection_minQ(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerElectronicsConnection* element = dynamic_cast(BaseClass_ptr1)) + PowerElectronicsConnection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->p; - if (buffer.fail()) - return false; - else + buffer >> element->minQ; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerElectronicsConnection_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerElectronicsConnection_p(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerElectronicsConnection* element = dynamic_cast(BaseClass_ptr1)) + PowerElectronicsConnection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->q; - if (buffer.fail()) - return false; - else + buffer >> element->p; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerElectronicsConnection_ratedS(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerElectronicsConnection_q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerElectronicsConnection* element = dynamic_cast(BaseClass_ptr1)) + PowerElectronicsConnection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->ratedS; - if (buffer.fail()) - return false; - else + buffer >> element->q; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerElectronicsConnection_ratedU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerElectronicsConnection_ratedS(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerElectronicsConnection* element = dynamic_cast(BaseClass_ptr1)) + PowerElectronicsConnection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->ratedU; - if (buffer.fail()) - return false; - else + buffer >> element->ratedS; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_PowerElectronicsUnit_PowerElectronicsConnection(BaseClass*, BaseClass*); -bool assign_PowerElectronicsConnection_PowerElectronicsUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_PowerElectronicsConnection_ratedU(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { PowerElectronicsConnection* element = dynamic_cast(BaseClass_ptr1); - PowerElectronicsUnit* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->PowerElectronicsUnit != element2) + buffer >> element->ratedU; + if (!buffer.fail()) { - element->PowerElectronicsUnit = element2; - return assign_PowerElectronicsUnit_PowerElectronicsConnection(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_WindTurbineType3or4Dynamics_PowerElectronicsConnection(BaseClass*, BaseClass*); -bool assign_PowerElectronicsConnection_WindTurbineType3or4Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool get_PowerElectronicsConnection_PowerElectronicsUnit(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - PowerElectronicsConnection* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType3or4Dynamics* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const PowerElectronicsConnection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->WindTurbineType3or4Dynamics != element2) + if (element->PowerElectronicsUnit != 0) { - element->WindTurbineType3or4Dynamics = element2; - return assign_WindTurbineType3or4Dynamics_PowerElectronicsConnection(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->PowerElectronicsUnit); + return true; } - return true; } return false; } + bool get_PowerElectronicsConnection_maxQ(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerElectronicsConnection* element = dynamic_cast(BaseClass_ptr1)) + const PowerElectronicsConnection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxQ; if (!buffer.str().empty()) @@ -185,7 +200,8 @@ bool get_PowerElectronicsConnection_maxQ(const BaseClass* BaseClass_ptr1, std::s bool get_PowerElectronicsConnection_minQ(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerElectronicsConnection* element = dynamic_cast(BaseClass_ptr1)) + const PowerElectronicsConnection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minQ; if (!buffer.str().empty()) @@ -199,7 +215,8 @@ bool get_PowerElectronicsConnection_minQ(const BaseClass* BaseClass_ptr1, std::s bool get_PowerElectronicsConnection_p(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerElectronicsConnection* element = dynamic_cast(BaseClass_ptr1)) + const PowerElectronicsConnection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p; if (!buffer.str().empty()) @@ -213,7 +230,8 @@ bool get_PowerElectronicsConnection_p(const BaseClass* BaseClass_ptr1, std::stri bool get_PowerElectronicsConnection_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerElectronicsConnection* element = dynamic_cast(BaseClass_ptr1)) + const PowerElectronicsConnection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q; if (!buffer.str().empty()) @@ -227,7 +245,8 @@ bool get_PowerElectronicsConnection_q(const BaseClass* BaseClass_ptr1, std::stri bool get_PowerElectronicsConnection_ratedS(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerElectronicsConnection* element = dynamic_cast(BaseClass_ptr1)) + const PowerElectronicsConnection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedS; if (!buffer.str().empty()) @@ -241,7 +260,8 @@ bool get_PowerElectronicsConnection_ratedS(const BaseClass* BaseClass_ptr1, std: bool get_PowerElectronicsConnection_ratedU(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerElectronicsConnection* element = dynamic_cast(BaseClass_ptr1)) + const PowerElectronicsConnection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedU; if (!buffer.str().empty()) @@ -253,21 +273,6 @@ bool get_PowerElectronicsConnection_ratedU(const BaseClass* BaseClass_ptr1, std: return false; } - -bool get_PowerElectronicsConnection_PowerElectronicsUnit(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const PowerElectronicsConnection* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->PowerElectronicsUnit != 0) - { - BaseClass_list.push_back(element->PowerElectronicsUnit); - return true; - } - } - return false; -} - - const char PowerElectronicsConnection::debugName[] = "PowerElectronicsConnection"; const char* PowerElectronicsConnection::debugString() const { @@ -276,23 +281,23 @@ const char* PowerElectronicsConnection::debugString() const void PowerElectronicsConnection::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PowerElectronicsConnection"), &PowerElectronicsConnection_factory)); + factory_map.emplace("cim:PowerElectronicsConnection", &PowerElectronicsConnection_factory); } void PowerElectronicsConnection::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PowerElectronicsConnection.maxQ"), &assign_PowerElectronicsConnection_maxQ)); - assign_map.insert(std::make_pair(std::string("cim:PowerElectronicsConnection.minQ"), &assign_PowerElectronicsConnection_minQ)); - assign_map.insert(std::make_pair(std::string("cim:PowerElectronicsConnection.p"), &assign_PowerElectronicsConnection_p)); - assign_map.insert(std::make_pair(std::string("cim:PowerElectronicsConnection.q"), &assign_PowerElectronicsConnection_q)); - assign_map.insert(std::make_pair(std::string("cim:PowerElectronicsConnection.ratedS"), &assign_PowerElectronicsConnection_ratedS)); - assign_map.insert(std::make_pair(std::string("cim:PowerElectronicsConnection.ratedU"), &assign_PowerElectronicsConnection_ratedU)); + assign_map.emplace("cim:PowerElectronicsConnection.maxQ", &assign_PowerElectronicsConnection_maxQ); + assign_map.emplace("cim:PowerElectronicsConnection.minQ", &assign_PowerElectronicsConnection_minQ); + assign_map.emplace("cim:PowerElectronicsConnection.p", &assign_PowerElectronicsConnection_p); + assign_map.emplace("cim:PowerElectronicsConnection.q", &assign_PowerElectronicsConnection_q); + assign_map.emplace("cim:PowerElectronicsConnection.ratedS", &assign_PowerElectronicsConnection_ratedS); + assign_map.emplace("cim:PowerElectronicsConnection.ratedU", &assign_PowerElectronicsConnection_ratedU); } void PowerElectronicsConnection::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PowerElectronicsConnection.PowerElectronicsUnit"), &assign_PowerElectronicsConnection_PowerElectronicsUnit)); - assign_map.insert(std::make_pair(std::string("cim:PowerElectronicsConnection.WindTurbineType3or4Dynamics"), &assign_PowerElectronicsConnection_WindTurbineType3or4Dynamics)); + assign_map.emplace("cim:PowerElectronicsConnection.PowerElectronicsUnit", &assign_PowerElectronicsConnection_PowerElectronicsUnit); + assign_map.emplace("cim:PowerElectronicsConnection.WindTurbineType3or4Dynamics", &assign_PowerElectronicsConnection_WindTurbineType3or4Dynamics); } void PowerElectronicsConnection::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/PowerElectronicsConnection.hpp b/CGMES_3.0.0/PowerElectronicsConnection.hpp index db10b6bad..a8a8adc2a 100644 --- a/CGMES_3.0.0/PowerElectronicsConnection.hpp +++ b/CGMES_3.0.0/PowerElectronicsConnection.hpp @@ -22,9 +22,7 @@ namespace CIMPP class PowerElectronicsUnit; class WindTurbineType3or4Dynamics; - /* - A connection to the AC network for energy production or consumption that uses power electronics rather than rotating machines. - */ + /** \brief A connection to the AC network for energy production or consumption that uses power electronics rather than rotating machines. */ class PowerElectronicsConnection : public RegulatingCondEq { public: @@ -32,14 +30,29 @@ namespace CIMPP PowerElectronicsConnection(); ~PowerElectronicsConnection() override; - CIMPP::PowerElectronicsUnit* PowerElectronicsUnit; /* An AC network connection may have several power electronics units connecting through it. Default: 0 */ - CIMPP::WindTurbineType3or4Dynamics* WindTurbineType3or4Dynamics; /* The wind turbine type 3 or type 4 dynamics model associated with this power electronics connection. Default: 0 */ - CIMPP::ReactivePower maxQ; /* Maximum reactive power limit. This is the maximum (nameplate) limit for the unit. Default: nullptr */ - CIMPP::ReactivePower minQ; /* Minimum reactive power limit for the unit. This is the minimum (nameplate) limit for the unit. Default: nullptr */ - CIMPP::ActivePower p; /* Active power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution. Default: nullptr */ - CIMPP::ReactivePower q; /* Reactive power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution. Default: nullptr */ - CIMPP::ApparentPower ratedS; /* Nameplate apparent power rating for the unit. The attribute shall have a positive value. Default: nullptr */ - CIMPP::Voltage ratedU; /* Rated voltage (nameplate data, Ur in IEC 60909-0). It is primarily used for short circuit data exchange according to IEC 60909. The attribute shall be a positive value. Default: nullptr */ + /** \brief An AC network connection may have several power electronics units connecting through it. Default: 0 */ + CIMPP::PowerElectronicsUnit* PowerElectronicsUnit; + + /** \brief The wind turbine type 3 or type 4 dynamics model associated with this power electronics connection. Default: 0 */ + CIMPP::WindTurbineType3or4Dynamics* WindTurbineType3or4Dynamics; + + /** \brief Maximum reactive power limit. This is the maximum (nameplate) limit for the unit. Default: nullptr */ + CIMPP::ReactivePower maxQ; + + /** \brief Minimum reactive power limit for the unit. This is the minimum (nameplate) limit for the unit. Default: nullptr */ + CIMPP::ReactivePower minQ; + + /** \brief Active power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution. Default: nullptr */ + CIMPP::ActivePower p; + + /** \brief Reactive power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution. Default: nullptr */ + CIMPP::ReactivePower q; + + /** \brief Nameplate apparent power rating for the unit. The attribute shall have a positive value. Default: nullptr */ + CIMPP::ApparentPower ratedS; + + /** \brief Rated voltage (nameplate data, Ur in IEC 60909-0). It is primarily used for short circuit data exchange according to IEC 60909. The attribute shall be a positive value. Default: nullptr */ + CIMPP::Voltage ratedU; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PowerElectronicsUnit.cpp b/CGMES_3.0.0/PowerElectronicsUnit.cpp index 80657c49e..d47a1df28 100644 --- a/CGMES_3.0.0/PowerElectronicsUnit.cpp +++ b/CGMES_3.0.0/PowerElectronicsUnit.cpp @@ -9,13 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "PowerElectronicsConnection.hpp" -#include "ActivePower.hpp" -#include "ActivePower.hpp" using namespace CIMPP; -PowerElectronicsUnit::PowerElectronicsUnit() : PowerElectronicsConnection(nullptr) {}; -PowerElectronicsUnit::~PowerElectronicsUnit() {}; +PowerElectronicsUnit::PowerElectronicsUnit() : PowerElectronicsConnection(nullptr) {} +PowerElectronicsUnit::~PowerElectronicsUnit() {} static const std::list PossibleProfilesForClass = { @@ -45,54 +43,56 @@ PowerElectronicsUnit::getPossibleProfilesForAttributes() const return map; } - -bool assign_PowerElectronicsUnit_maxP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerElectronicsConnection_PowerElectronicsUnit(BaseClass*, BaseClass*); +bool assign_PowerElectronicsUnit_PowerElectronicsConnection(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (PowerElectronicsUnit* element = dynamic_cast(BaseClass_ptr1)) + PowerElectronicsUnit* element = dynamic_cast(BaseClass_ptr1); + PowerElectronicsConnection* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->maxP; - if (buffer.fail()) - return false; - else - return true; + if (element->PowerElectronicsConnection != element2) + { + element->PowerElectronicsConnection = element2; + return assign_PowerElectronicsConnection_PowerElectronicsUnit(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_PowerElectronicsUnit_minP(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerElectronicsUnit_maxP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerElectronicsUnit* element = dynamic_cast(BaseClass_ptr1)) + PowerElectronicsUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->minP; - if (buffer.fail()) - return false; - else + buffer >> element->maxP; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_PowerElectronicsConnection_PowerElectronicsUnit(BaseClass*, BaseClass*); -bool assign_PowerElectronicsUnit_PowerElectronicsConnection(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_PowerElectronicsUnit_minP(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { PowerElectronicsUnit* element = dynamic_cast(BaseClass_ptr1); - PowerElectronicsConnection* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->PowerElectronicsConnection != element2) + buffer >> element->minP; + if (!buffer.fail()) { - element->PowerElectronicsConnection = element2; - return assign_PowerElectronicsConnection_PowerElectronicsUnit(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_PowerElectronicsUnit_maxP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerElectronicsUnit* element = dynamic_cast(BaseClass_ptr1)) + const PowerElectronicsUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxP; if (!buffer.str().empty()) @@ -106,7 +106,8 @@ bool get_PowerElectronicsUnit_maxP(const BaseClass* BaseClass_ptr1, std::strings bool get_PowerElectronicsUnit_minP(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerElectronicsUnit* element = dynamic_cast(BaseClass_ptr1)) + const PowerElectronicsUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minP; if (!buffer.str().empty()) @@ -118,8 +119,6 @@ bool get_PowerElectronicsUnit_minP(const BaseClass* BaseClass_ptr1, std::strings return false; } - - const char PowerElectronicsUnit::debugName[] = "PowerElectronicsUnit"; const char* PowerElectronicsUnit::debugString() const { @@ -128,18 +127,18 @@ const char* PowerElectronicsUnit::debugString() const void PowerElectronicsUnit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PowerElectronicsUnit"), &PowerElectronicsUnit_factory)); + factory_map.emplace("cim:PowerElectronicsUnit", &PowerElectronicsUnit_factory); } void PowerElectronicsUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PowerElectronicsUnit.maxP"), &assign_PowerElectronicsUnit_maxP)); - assign_map.insert(std::make_pair(std::string("cim:PowerElectronicsUnit.minP"), &assign_PowerElectronicsUnit_minP)); + assign_map.emplace("cim:PowerElectronicsUnit.maxP", &assign_PowerElectronicsUnit_maxP); + assign_map.emplace("cim:PowerElectronicsUnit.minP", &assign_PowerElectronicsUnit_minP); } void PowerElectronicsUnit::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PowerElectronicsUnit.PowerElectronicsConnection"), &assign_PowerElectronicsUnit_PowerElectronicsConnection)); + assign_map.emplace("cim:PowerElectronicsUnit.PowerElectronicsConnection", &assign_PowerElectronicsUnit_PowerElectronicsConnection); } void PowerElectronicsUnit::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/PowerElectronicsUnit.hpp b/CGMES_3.0.0/PowerElectronicsUnit.hpp index 9b5918fb1..06571c149 100644 --- a/CGMES_3.0.0/PowerElectronicsUnit.hpp +++ b/CGMES_3.0.0/PowerElectronicsUnit.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class PowerElectronicsConnection; - /* - A generating unit or battery or aggregation that connects to the AC network using power electronics rather than rotating machines. - */ + /** \brief A generating unit or battery or aggregation that connects to the AC network using power electronics rather than rotating machines. */ class PowerElectronicsUnit : public Equipment { public: @@ -28,9 +26,14 @@ namespace CIMPP PowerElectronicsUnit(); ~PowerElectronicsUnit() override; - CIMPP::PowerElectronicsConnection* PowerElectronicsConnection; /* A power electronics unit has a connection to the AC network. Default: 0 */ - CIMPP::ActivePower maxP; /* Maximum active power limit. This is the maximum (nameplate) limit for the unit. Default: nullptr */ - CIMPP::ActivePower minP; /* Minimum active power limit. This is the minimum (nameplate) limit for the unit. Default: nullptr */ + /** \brief A power electronics unit has a connection to the AC network. Default: 0 */ + CIMPP::PowerElectronicsConnection* PowerElectronicsConnection; + + /** \brief Maximum active power limit. This is the maximum (nameplate) limit for the unit. Default: nullptr */ + CIMPP::ActivePower maxP; + + /** \brief Minimum active power limit. This is the minimum (nameplate) limit for the unit. Default: nullptr */ + CIMPP::ActivePower minP; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PowerElectronicsWindUnit.cpp b/CGMES_3.0.0/PowerElectronicsWindUnit.cpp index 1e0fddf9d..2985979e9 100644 --- a/CGMES_3.0.0/PowerElectronicsWindUnit.cpp +++ b/CGMES_3.0.0/PowerElectronicsWindUnit.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -PowerElectronicsWindUnit::PowerElectronicsWindUnit() {}; -PowerElectronicsWindUnit::~PowerElectronicsWindUnit() {}; +PowerElectronicsWindUnit::PowerElectronicsWindUnit() {} +PowerElectronicsWindUnit::~PowerElectronicsWindUnit() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ PowerElectronicsWindUnit::getPossibleProfilesForAttributes() const return map; } - - - - - const char PowerElectronicsWindUnit::debugName[] = "PowerElectronicsWindUnit"; const char* PowerElectronicsWindUnit::debugString() const { @@ -51,7 +46,7 @@ const char* PowerElectronicsWindUnit::debugString() const void PowerElectronicsWindUnit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PowerElectronicsWindUnit"), &PowerElectronicsWindUnit_factory)); + factory_map.emplace("cim:PowerElectronicsWindUnit", &PowerElectronicsWindUnit_factory); } void PowerElectronicsWindUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/PowerElectronicsWindUnit.hpp b/CGMES_3.0.0/PowerElectronicsWindUnit.hpp index 5fafbef49..ef8295ba5 100644 --- a/CGMES_3.0.0/PowerElectronicsWindUnit.hpp +++ b/CGMES_3.0.0/PowerElectronicsWindUnit.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A wind generating unit that connects to the AC network with power electronics rather than rotating machines or an aggregation of such units. - */ + /** \brief A wind generating unit that connects to the AC network with power electronics rather than rotating machines or an aggregation of such units. */ class PowerElectronicsWindUnit : public PowerElectronicsUnit { public: @@ -26,7 +24,6 @@ namespace CIMPP PowerElectronicsWindUnit(); ~PowerElectronicsWindUnit() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PowerSystemResource.cpp b/CGMES_3.0.0/PowerSystemResource.cpp index 275fe347f..9d127705c 100644 --- a/CGMES_3.0.0/PowerSystemResource.cpp +++ b/CGMES_3.0.0/PowerSystemResource.cpp @@ -14,8 +14,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -PowerSystemResource::PowerSystemResource() : Location(nullptr) {}; -PowerSystemResource::~PowerSystemResource() {}; +PowerSystemResource::PowerSystemResource() : Location(nullptr) {} +PowerSystemResource::~PowerSystemResource() {} static const std::list PossibleProfilesForClass = { @@ -50,8 +50,6 @@ PowerSystemResource::getPossibleProfilesForAttributes() const return map; } - - bool assign_Control_PowerSystemResource(BaseClass*, BaseClass*); bool assign_PowerSystemResource_Controls(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -68,6 +66,7 @@ bool assign_PowerSystemResource_Controls(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_Location_PowerSystemResources(BaseClass*, BaseClass*); bool assign_PowerSystemResource_Location(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -84,6 +83,7 @@ bool assign_PowerSystemResource_Location(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_Measurement_PowerSystemResource(BaseClass*, BaseClass*); bool assign_PowerSystemResource_Measurements(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -103,6 +103,7 @@ bool assign_PowerSystemResource_Measurements(BaseClass* BaseClass_ptr1, BaseClas + const char PowerSystemResource::debugName[] = "PowerSystemResource"; const char* PowerSystemResource::debugString() const { @@ -111,7 +112,7 @@ const char* PowerSystemResource::debugString() const void PowerSystemResource::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PowerSystemResource"), &PowerSystemResource_factory)); + factory_map.emplace("cim:PowerSystemResource", &PowerSystemResource_factory); } void PowerSystemResource::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -120,9 +121,9 @@ void PowerSystemResource::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PowerSystemResource.Controls"), &assign_PowerSystemResource_Controls)); - assign_map.insert(std::make_pair(std::string("cim:PowerSystemResource.Location"), &assign_PowerSystemResource_Location)); - assign_map.insert(std::make_pair(std::string("cim:PowerSystemResource.Measurements"), &assign_PowerSystemResource_Measurements)); + assign_map.emplace("cim:PowerSystemResource.Controls", &assign_PowerSystemResource_Controls); + assign_map.emplace("cim:PowerSystemResource.Location", &assign_PowerSystemResource_Location); + assign_map.emplace("cim:PowerSystemResource.Measurements", &assign_PowerSystemResource_Measurements); } void PowerSystemResource::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/PowerSystemResource.hpp b/CGMES_3.0.0/PowerSystemResource.hpp index 783650dac..1758c38ac 100644 --- a/CGMES_3.0.0/PowerSystemResource.hpp +++ b/CGMES_3.0.0/PowerSystemResource.hpp @@ -19,9 +19,7 @@ namespace CIMPP class Location; class Measurement; - /* - A power system resource (PSR) can be an item of equipment such as a switch, an equipment container containing many individual items of equipment such as a substation, or an organisational entity such as sub-control area. Power system resources can have measurements associated. - */ + /** \brief A power system resource (PSR) can be an item of equipment such as a switch, an equipment container containing many individual items of equipment such as a substation, or an organisational entity such as sub-control area. Power system resources can have measurements associated. */ class PowerSystemResource : public IdentifiedObject { public: @@ -29,9 +27,14 @@ namespace CIMPP PowerSystemResource(); ~PowerSystemResource() override; - std::list Controls; /* The controller outputs used to actually govern a regulating device, e.g. the magnetization of a synchronous machine or capacitor bank breaker actuator. Default: 0 */ - CIMPP::Location* Location; /* Location of this power system resource. Default: 0 */ - std::list Measurements; /* The measurements associated with this power system resource. Default: 0 */ + /** \brief The controller outputs used to actually govern a regulating device, e.g. the magnetization of a synchronous machine or capacitor bank breaker actuator. Default: 0 */ + std::list Controls; + + /** \brief Location of this power system resource. Default: 0 */ + CIMPP::Location* Location; + + /** \brief The measurements associated with this power system resource. Default: 0 */ + std::list Measurements; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PowerSystemStabilizerDynamics.cpp b/CGMES_3.0.0/PowerSystemStabilizerDynamics.cpp index a961e08aa..fb50d8a2e 100644 --- a/CGMES_3.0.0/PowerSystemStabilizerDynamics.cpp +++ b/CGMES_3.0.0/PowerSystemStabilizerDynamics.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -PowerSystemStabilizerDynamics::PowerSystemStabilizerDynamics() : ExcitationSystemDynamics(nullptr) {}; -PowerSystemStabilizerDynamics::~PowerSystemStabilizerDynamics() {}; +PowerSystemStabilizerDynamics::PowerSystemStabilizerDynamics() : ExcitationSystemDynamics(nullptr) {} +PowerSystemStabilizerDynamics::~PowerSystemStabilizerDynamics() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ PowerSystemStabilizerDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_ExcitationSystemDynamics_PowerSystemStabilizerDynamics(BaseClass*, BaseClass*); bool assign_PowerSystemStabilizerDynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_PowerSystemStabilizerDynamics_ExcitationSystemDynamics(BaseClass* Ba } return false; } + bool assign_RemoteInputSignal_PowerSystemStabilizerDynamics(BaseClass*, BaseClass*); bool assign_PowerSystemStabilizerDynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_PowerSystemStabilizerDynamics_RemoteInputSignal(BaseClass* BaseClass return false; } - bool get_PowerSystemStabilizerDynamics_ExcitationSystemDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const PowerSystemStabilizerDynamics* element = dynamic_cast(BaseClass_ptr1)) + const PowerSystemStabilizerDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ExcitationSystemDynamics != 0) { @@ -100,7 +99,7 @@ const char* PowerSystemStabilizerDynamics::debugString() const void PowerSystemStabilizerDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PowerSystemStabilizerDynamics"), &PowerSystemStabilizerDynamics_factory)); + factory_map.emplace("cim:PowerSystemStabilizerDynamics", &PowerSystemStabilizerDynamics_factory); } void PowerSystemStabilizerDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -109,8 +108,8 @@ void PowerSystemStabilizerDynamics::addPrimitiveAssignFnsToMap(std::unordered_ma void PowerSystemStabilizerDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PowerSystemStabilizerDynamics.ExcitationSystemDynamics"), &assign_PowerSystemStabilizerDynamics_ExcitationSystemDynamics)); - assign_map.insert(std::make_pair(std::string("cim:PowerSystemStabilizerDynamics.RemoteInputSignal"), &assign_PowerSystemStabilizerDynamics_RemoteInputSignal)); + assign_map.emplace("cim:PowerSystemStabilizerDynamics.ExcitationSystemDynamics", &assign_PowerSystemStabilizerDynamics_ExcitationSystemDynamics); + assign_map.emplace("cim:PowerSystemStabilizerDynamics.RemoteInputSignal", &assign_PowerSystemStabilizerDynamics_RemoteInputSignal); } void PowerSystemStabilizerDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/PowerSystemStabilizerDynamics.hpp b/CGMES_3.0.0/PowerSystemStabilizerDynamics.hpp index 04892c1c3..4b5837a2e 100644 --- a/CGMES_3.0.0/PowerSystemStabilizerDynamics.hpp +++ b/CGMES_3.0.0/PowerSystemStabilizerDynamics.hpp @@ -18,9 +18,7 @@ namespace CIMPP class ExcitationSystemDynamics; class RemoteInputSignal; - /* - Power system stabilizer function block whose behaviour is described by reference to a standard model or by definition of a user-defined model. - */ + /** \brief Power system stabilizer function block whose behaviour is described by reference to a standard model or by definition of a user-defined model. */ class PowerSystemStabilizerDynamics : public DynamicsFunctionBlock { public: @@ -28,8 +26,11 @@ namespace CIMPP PowerSystemStabilizerDynamics(); ~PowerSystemStabilizerDynamics() override; - CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; /* Excitation system model with which this power system stabilizer model is associated. Default: 0 */ - std::list RemoteInputSignal; /* Remote input signal used by this power system stabilizer model. Default: 0 */ + /** \brief Excitation system model with which this power system stabilizer model is associated. Default: 0 */ + CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; + + /** \brief Remote input signal used by this power system stabilizer model. Default: 0 */ + std::list RemoteInputSignal; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PowerSystemStabilizerUserDefined.cpp b/CGMES_3.0.0/PowerSystemStabilizerUserDefined.cpp index 03243c2a0..a444c0d8b 100644 --- a/CGMES_3.0.0/PowerSystemStabilizerUserDefined.cpp +++ b/CGMES_3.0.0/PowerSystemStabilizerUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -PowerSystemStabilizerUserDefined::PowerSystemStabilizerUserDefined() {}; -PowerSystemStabilizerUserDefined::~PowerSystemStabilizerUserDefined() {}; +PowerSystemStabilizerUserDefined::PowerSystemStabilizerUserDefined() {} +PowerSystemStabilizerUserDefined::~PowerSystemStabilizerUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ PowerSystemStabilizerUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_PowerSystemStabilizerUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (PowerSystemStabilizerUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_PowerSystemStabilizerUserDefined(BaseClass*, BaseClass*); bool assign_PowerSystemStabilizerUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_PowerSystemStabilizerUserDefined_ProprietaryParameterDynamics(BaseCl return false; } +bool assign_PowerSystemStabilizerUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + PowerSystemStabilizerUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_PowerSystemStabilizerUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerSystemStabilizerUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const PowerSystemStabilizerUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_PowerSystemStabilizerUserDefined_proprietary(const BaseClass* BaseClass return false; } - - const char PowerSystemStabilizerUserDefined::debugName[] = "PowerSystemStabilizerUserDefined"; const char* PowerSystemStabilizerUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* PowerSystemStabilizerUserDefined::debugString() const void PowerSystemStabilizerUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PowerSystemStabilizerUserDefined"), &PowerSystemStabilizerUserDefined_factory)); + factory_map.emplace("cim:PowerSystemStabilizerUserDefined", &PowerSystemStabilizerUserDefined_factory); } void PowerSystemStabilizerUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PowerSystemStabilizerUserDefined.proprietary"), &assign_PowerSystemStabilizerUserDefined_proprietary)); + assign_map.emplace("cim:PowerSystemStabilizerUserDefined.proprietary", &assign_PowerSystemStabilizerUserDefined_proprietary); } void PowerSystemStabilizerUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PowerSystemStabilizerUserDefined.ProprietaryParameterDynamics"), &assign_PowerSystemStabilizerUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:PowerSystemStabilizerUserDefined.ProprietaryParameterDynamics", &assign_PowerSystemStabilizerUserDefined_ProprietaryParameterDynamics); } void PowerSystemStabilizerUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/PowerSystemStabilizerUserDefined.hpp b/CGMES_3.0.0/PowerSystemStabilizerUserDefined.hpp index 6eaf6f07a..2c8814d1e 100644 --- a/CGMES_3.0.0/PowerSystemStabilizerUserDefined.hpp +++ b/CGMES_3.0.0/PowerSystemStabilizerUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Power system stabilizer function block whose dynamic behaviour is described by a user-defined model. - */ + /** \brief Power system stabilizer function block whose dynamic behaviour is described by a user-defined model. */ class PowerSystemStabilizerUserDefined : public PowerSystemStabilizerDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP PowerSystemStabilizerUserDefined(); ~PowerSystemStabilizerUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PowerTransformer.cpp b/CGMES_3.0.0/PowerTransformer.cpp index b660212ca..1210c9daf 100644 --- a/CGMES_3.0.0/PowerTransformer.cpp +++ b/CGMES_3.0.0/PowerTransformer.cpp @@ -9,17 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "PowerTransformerEnd.hpp" -#include "CurrentFlow.hpp" -#include "Voltage.hpp" -#include "AngleDegrees.hpp" -#include "Voltage.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" using namespace CIMPP; -PowerTransformer::PowerTransformer() {}; -PowerTransformer::~PowerTransformer() {}; +PowerTransformer::PowerTransformer() {} +PowerTransformer::~PowerTransformer() {} static const std::list PossibleProfilesForClass = { @@ -53,106 +47,112 @@ PowerTransformer::getPossibleProfilesForAttributes() const return map; } - -bool assign_PowerTransformer_beforeShCircuitHighestOperatingCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_PowerTransformer(BaseClass*, BaseClass*); +bool assign_PowerTransformer_PowerTransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + PowerTransformerEnd* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->beforeShCircuitHighestOperatingCurrent; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->PowerTransformerEnd.begin(), element->PowerTransformerEnd.end(), element2) == element->PowerTransformerEnd.end()) + { + element->PowerTransformerEnd.push_back(element2); + return assign_PowerTransformerEnd_PowerTransformer(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_PowerTransformer_beforeShCircuitHighestOperatingVoltage(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformer_beforeShCircuitHighestOperatingCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->beforeShCircuitHighestOperatingVoltage; - if (buffer.fail()) - return false; - else + buffer >> element->beforeShCircuitHighestOperatingCurrent; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformer_beforeShortCircuitAnglePf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformer_beforeShCircuitHighestOperatingVoltage(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->beforeShortCircuitAnglePf; - if (buffer.fail()) - return false; - else + buffer >> element->beforeShCircuitHighestOperatingVoltage; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformer_highSideMinOperatingU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformer_beforeShortCircuitAnglePf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->highSideMinOperatingU; - if (buffer.fail()) - return false; - else + buffer >> element->beforeShortCircuitAnglePf; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformer_isPartOfGeneratorUnit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformer_highSideMinOperatingU(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->isPartOfGeneratorUnit; - if (buffer.fail()) - return false; - else + buffer >> element->highSideMinOperatingU; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformer_operationalValuesConsidered(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformer_isPartOfGeneratorUnit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->operationalValuesConsidered; - if (buffer.fail()) - return false; - else + buffer >> element->isPartOfGeneratorUnit; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_PowerTransformerEnd_PowerTransformer(BaseClass*, BaseClass*); -bool assign_PowerTransformer_PowerTransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_PowerTransformer_operationalValuesConsidered(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { PowerTransformer* element = dynamic_cast(BaseClass_ptr1); - PowerTransformerEnd* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->PowerTransformerEnd.begin(), element->PowerTransformerEnd.end(), element2) == element->PowerTransformerEnd.end()) + buffer >> element->operationalValuesConsidered; + if (!buffer.fail()) { - element->PowerTransformerEnd.push_back(element2); - return assign_PowerTransformerEnd_PowerTransformer(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_PowerTransformer_beforeShCircuitHighestOperatingCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->beforeShCircuitHighestOperatingCurrent; if (!buffer.str().empty()) @@ -166,7 +166,8 @@ bool get_PowerTransformer_beforeShCircuitHighestOperatingCurrent(const BaseClass bool get_PowerTransformer_beforeShCircuitHighestOperatingVoltage(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->beforeShCircuitHighestOperatingVoltage; if (!buffer.str().empty()) @@ -180,7 +181,8 @@ bool get_PowerTransformer_beforeShCircuitHighestOperatingVoltage(const BaseClass bool get_PowerTransformer_beforeShortCircuitAnglePf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->beforeShortCircuitAnglePf; if (!buffer.str().empty()) @@ -194,7 +196,8 @@ bool get_PowerTransformer_beforeShortCircuitAnglePf(const BaseClass* BaseClass_p bool get_PowerTransformer_highSideMinOperatingU(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->highSideMinOperatingU; if (!buffer.str().empty()) @@ -208,7 +211,8 @@ bool get_PowerTransformer_highSideMinOperatingU(const BaseClass* BaseClass_ptr1, bool get_PowerTransformer_isPartOfGeneratorUnit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->isPartOfGeneratorUnit; if (!buffer.str().empty()) @@ -222,7 +226,8 @@ bool get_PowerTransformer_isPartOfGeneratorUnit(const BaseClass* BaseClass_ptr1, bool get_PowerTransformer_operationalValuesConsidered(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformer* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->operationalValuesConsidered; if (!buffer.str().empty()) @@ -234,8 +239,6 @@ bool get_PowerTransformer_operationalValuesConsidered(const BaseClass* BaseClass return false; } - - const char PowerTransformer::debugName[] = "PowerTransformer"; const char* PowerTransformer::debugString() const { @@ -244,22 +247,22 @@ const char* PowerTransformer::debugString() const void PowerTransformer::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PowerTransformer"), &PowerTransformer_factory)); + factory_map.emplace("cim:PowerTransformer", &PowerTransformer_factory); } void PowerTransformer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PowerTransformer.beforeShCircuitHighestOperatingCurrent"), &assign_PowerTransformer_beforeShCircuitHighestOperatingCurrent)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformer.beforeShCircuitHighestOperatingVoltage"), &assign_PowerTransformer_beforeShCircuitHighestOperatingVoltage)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformer.beforeShortCircuitAnglePf"), &assign_PowerTransformer_beforeShortCircuitAnglePf)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformer.highSideMinOperatingU"), &assign_PowerTransformer_highSideMinOperatingU)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformer.isPartOfGeneratorUnit"), &assign_PowerTransformer_isPartOfGeneratorUnit)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformer.operationalValuesConsidered"), &assign_PowerTransformer_operationalValuesConsidered)); + assign_map.emplace("cim:PowerTransformer.beforeShCircuitHighestOperatingCurrent", &assign_PowerTransformer_beforeShCircuitHighestOperatingCurrent); + assign_map.emplace("cim:PowerTransformer.beforeShCircuitHighestOperatingVoltage", &assign_PowerTransformer_beforeShCircuitHighestOperatingVoltage); + assign_map.emplace("cim:PowerTransformer.beforeShortCircuitAnglePf", &assign_PowerTransformer_beforeShortCircuitAnglePf); + assign_map.emplace("cim:PowerTransformer.highSideMinOperatingU", &assign_PowerTransformer_highSideMinOperatingU); + assign_map.emplace("cim:PowerTransformer.isPartOfGeneratorUnit", &assign_PowerTransformer_isPartOfGeneratorUnit); + assign_map.emplace("cim:PowerTransformer.operationalValuesConsidered", &assign_PowerTransformer_operationalValuesConsidered); } void PowerTransformer::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PowerTransformer.PowerTransformerEnd"), &assign_PowerTransformer_PowerTransformerEnd)); + assign_map.emplace("cim:PowerTransformer.PowerTransformerEnd", &assign_PowerTransformer_PowerTransformerEnd); } void PowerTransformer::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/PowerTransformer.hpp b/CGMES_3.0.0/PowerTransformer.hpp index 40cebe8e8..77239b7b5 100644 --- a/CGMES_3.0.0/PowerTransformer.hpp +++ b/CGMES_3.0.0/PowerTransformer.hpp @@ -21,9 +21,7 @@ namespace CIMPP { class PowerTransformerEnd; - /* - An electrical device consisting of two or more coupled windings, with or without a magnetic core, for introducing mutual coupling between electric circuits. Transformers can be used to control voltage and phase shift (active power flow). A power transformer may be composed of separate transformer tanks that need not be identical. A power transformer can be modelled with or without tanks and is intended for use in both balanced and unbalanced representations. A power transformer typically has two terminals, but may have one (grounding), three or more terminals. The inherited association ConductingEquipment.BaseVoltage should not be used. The association from TransformerEnd to BaseVoltage should be used instead. - */ + /** \brief An electrical device consisting of two or more coupled windings, with or without a magnetic core, for introducing mutual coupling between electric circuits. Transformers can be used to control voltage and phase shift (active power flow). A power transformer may be composed of separate transformer tanks that need not be identical. A power transformer can be modelled with or without tanks and is intended for use in both balanced and unbalanced representations. A power transformer typically has two terminals, but may have one (grounding), three or more terminals. The inherited association ConductingEquipment.BaseVoltage should not be used. The association from TransformerEnd to BaseVoltage should be used instead. */ class PowerTransformer : public ConductingEquipment { public: @@ -31,13 +29,26 @@ namespace CIMPP PowerTransformer(); ~PowerTransformer() override; - std::list PowerTransformerEnd; /* The ends of this power transformer. Default: 0 */ - CIMPP::CurrentFlow beforeShCircuitHighestOperatingCurrent; /* The highest operating current (Ib in IEC 60909-0) before short circuit (depends on network configuration and relevant reliability philosophy). It is used for calculation of the impedance correction factor KT defined in IEC 60909-0. Default: nullptr */ - CIMPP::Voltage beforeShCircuitHighestOperatingVoltage; /* The highest operating voltage (Ub in IEC 60909-0) before short circuit. It is used for calculation of the impedance correction factor KT defined in IEC 60909-0. This is worst case voltage on the low side winding (3.7.1 of IEC 60909:2001). Used to define operating conditions. Default: nullptr */ - CIMPP::AngleDegrees beforeShortCircuitAnglePf; /* The angle of power factor before short circuit (phib in IEC 60909-0). It is used for calculation of the impedance correction factor KT defined in IEC 60909-0. This is the worst case power factor. Used to define operating conditions. Default: nullptr */ - CIMPP::Voltage highSideMinOperatingU; /* The minimum operating voltage (uQmin in IEC 60909-0) at the high voltage side (Q side) of the unit transformer of the power station unit. A value well established from long-term operating experience of the system. It is used for calculation of the impedance correction factor KG defined in IEC 60909-0. Default: nullptr */ - CIMPP::Boolean isPartOfGeneratorUnit; /* Indicates whether the machine is part of a power station unit. Used for short circuit data exchange according to IEC 60909. It has an impact on how the correction factors are calculated for transformers, since the transformer is not necessarily part of a synchronous machine and generating unit. It is not always possible to derive this information from the model. This is why the attribute is necessary. Default: false */ - CIMPP::Boolean operationalValuesConsidered; /* It is used to define if the data (other attributes related to short circuit data exchange) defines long term operational conditions or not. Used for short circuit data exchange according to IEC 60909. Default: false */ + /** \brief The ends of this power transformer. Default: 0 */ + std::list PowerTransformerEnd; + + /** \brief The highest operating current (Ib in IEC 60909-0) before short circuit (depends on network configuration and relevant reliability philosophy). It is used for calculation of the impedance correction factor KT defined in IEC 60909-0. Default: nullptr */ + CIMPP::CurrentFlow beforeShCircuitHighestOperatingCurrent; + + /** \brief The highest operating voltage (Ub in IEC 60909-0) before short circuit. It is used for calculation of the impedance correction factor KT defined in IEC 60909-0. This is worst case voltage on the low side winding (3.7.1 of IEC 60909:2001). Used to define operating conditions. Default: nullptr */ + CIMPP::Voltage beforeShCircuitHighestOperatingVoltage; + + /** \brief The angle of power factor before short circuit (phib in IEC 60909-0). It is used for calculation of the impedance correction factor KT defined in IEC 60909-0. This is the worst case power factor. Used to define operating conditions. Default: nullptr */ + CIMPP::AngleDegrees beforeShortCircuitAnglePf; + + /** \brief The minimum operating voltage (uQmin in IEC 60909-0) at the high voltage side (Q side) of the unit transformer of the power station unit. A value well established from long-term operating experience of the system. It is used for calculation of the impedance correction factor KG defined in IEC 60909-0. Default: nullptr */ + CIMPP::Voltage highSideMinOperatingU; + + /** \brief Indicates whether the machine is part of a power station unit. Used for short circuit data exchange according to IEC 60909. It has an impact on how the correction factors are calculated for transformers, since the transformer is not necessarily part of a synchronous machine and generating unit. It is not always possible to derive this information from the model. This is why the attribute is necessary. Default: false */ + CIMPP::Boolean isPartOfGeneratorUnit; + + /** \brief It is used to define if the data (other attributes related to short circuit data exchange) defines long term operational conditions or not. Used for short circuit data exchange according to IEC 60909. Default: false */ + CIMPP::Boolean operationalValuesConsidered; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PowerTransformerEnd.cpp b/CGMES_3.0.0/PowerTransformerEnd.cpp index b46678857..e50fb5365 100644 --- a/CGMES_3.0.0/PowerTransformerEnd.cpp +++ b/CGMES_3.0.0/PowerTransformerEnd.cpp @@ -9,23 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "PowerTransformer.hpp" -#include "Susceptance.hpp" -#include "Susceptance.hpp" -#include "WindingConnection.hpp" -#include "Conductance.hpp" -#include "Conductance.hpp" -#include "Integer.hpp" -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "ApparentPower.hpp" -#include "Voltage.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -PowerTransformerEnd::PowerTransformerEnd() : PowerTransformer(nullptr) {}; -PowerTransformerEnd::~PowerTransformerEnd() {}; +PowerTransformerEnd::PowerTransformerEnd() : PowerTransformer(nullptr) {} +PowerTransformerEnd::~PowerTransformerEnd() {} static const std::list PossibleProfilesForClass = { @@ -65,184 +53,209 @@ PowerTransformerEnd::getPossibleProfilesForAttributes() const return map; } +bool assign_PowerTransformer_PowerTransformerEnd(BaseClass*, BaseClass*); +bool assign_PowerTransformerEnd_PowerTransformer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + PowerTransformer* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->PowerTransformer != element2) + { + element->PowerTransformer = element2; + return assign_PowerTransformer_PowerTransformerEnd(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_PowerTransformerEnd_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_b(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_b0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_b0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_connectionKind(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_connectionKind(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->connectionKind; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_g(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_g(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_g0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_g0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_phaseAngleClock(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_phaseAngleClock(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->phaseAngleClock; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_r0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_ratedS(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_ratedS(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedS; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_ratedU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_ratedU(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratedU; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_x(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PowerTransformerEnd_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PowerTransformerEnd_x0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_PowerTransformer_PowerTransformerEnd(BaseClass*, BaseClass*); -bool assign_PowerTransformerEnd_PowerTransformer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_PowerTransformerEnd_PowerTransformer(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); - PowerTransformer* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->PowerTransformer != element2) + if (element->PowerTransformer != 0) { - element->PowerTransformer = element2; - return assign_PowerTransformer_PowerTransformerEnd(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->PowerTransformer); + return true; } - return true; } return false; } bool get_PowerTransformerEnd_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b; if (!buffer.str().empty()) @@ -256,7 +269,8 @@ bool get_PowerTransformerEnd_b(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_PowerTransformerEnd_b0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b0; if (!buffer.str().empty()) @@ -268,9 +282,25 @@ bool get_PowerTransformerEnd_b0(const BaseClass* BaseClass_ptr1, std::stringstre return false; } +bool get_PowerTransformerEnd_connectionKind(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->connectionKind; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_PowerTransformerEnd_g(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g; if (!buffer.str().empty()) @@ -284,7 +314,8 @@ bool get_PowerTransformerEnd_g(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_PowerTransformerEnd_g0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g0; if (!buffer.str().empty()) @@ -298,7 +329,8 @@ bool get_PowerTransformerEnd_g0(const BaseClass* BaseClass_ptr1, std::stringstre bool get_PowerTransformerEnd_phaseAngleClock(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->phaseAngleClock; if (!buffer.str().empty()) @@ -312,7 +344,8 @@ bool get_PowerTransformerEnd_phaseAngleClock(const BaseClass* BaseClass_ptr1, st bool get_PowerTransformerEnd_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -326,7 +359,8 @@ bool get_PowerTransformerEnd_r(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_PowerTransformerEnd_r0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r0; if (!buffer.str().empty()) @@ -340,7 +374,8 @@ bool get_PowerTransformerEnd_r0(const BaseClass* BaseClass_ptr1, std::stringstre bool get_PowerTransformerEnd_ratedS(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedS; if (!buffer.str().empty()) @@ -354,7 +389,8 @@ bool get_PowerTransformerEnd_ratedS(const BaseClass* BaseClass_ptr1, std::string bool get_PowerTransformerEnd_ratedU(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedU; if (!buffer.str().empty()) @@ -368,7 +404,8 @@ bool get_PowerTransformerEnd_ratedU(const BaseClass* BaseClass_ptr1, std::string bool get_PowerTransformerEnd_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x; if (!buffer.str().empty()) @@ -382,7 +419,8 @@ bool get_PowerTransformerEnd_x(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_PowerTransformerEnd_x0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x0; if (!buffer.str().empty()) @@ -394,35 +432,6 @@ bool get_PowerTransformerEnd_x0(const BaseClass* BaseClass_ptr1, std::stringstre return false; } - -bool get_PowerTransformerEnd_PowerTransformer(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->PowerTransformer != 0) - { - BaseClass_list.push_back(element->PowerTransformer); - return true; - } - } - return false; -} - - -bool get_PowerTransformerEnd_connectionKind(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const PowerTransformerEnd* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->connectionKind; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char PowerTransformerEnd::debugName[] = "PowerTransformerEnd"; const char* PowerTransformerEnd::debugString() const { @@ -431,28 +440,28 @@ const char* PowerTransformerEnd::debugString() const void PowerTransformerEnd::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd"), &PowerTransformerEnd_factory)); + factory_map.emplace("cim:PowerTransformerEnd", &PowerTransformerEnd_factory); } void PowerTransformerEnd::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.b"), &assign_PowerTransformerEnd_b)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.b0"), &assign_PowerTransformerEnd_b0)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.connectionKind"), &assign_PowerTransformerEnd_connectionKind)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.g"), &assign_PowerTransformerEnd_g)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.g0"), &assign_PowerTransformerEnd_g0)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.phaseAngleClock"), &assign_PowerTransformerEnd_phaseAngleClock)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.r"), &assign_PowerTransformerEnd_r)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.r0"), &assign_PowerTransformerEnd_r0)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.ratedS"), &assign_PowerTransformerEnd_ratedS)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.ratedU"), &assign_PowerTransformerEnd_ratedU)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.x"), &assign_PowerTransformerEnd_x)); - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.x0"), &assign_PowerTransformerEnd_x0)); + assign_map.emplace("cim:PowerTransformerEnd.b", &assign_PowerTransformerEnd_b); + assign_map.emplace("cim:PowerTransformerEnd.b0", &assign_PowerTransformerEnd_b0); + assign_map.emplace("cim:PowerTransformerEnd.connectionKind", &assign_PowerTransformerEnd_connectionKind); + assign_map.emplace("cim:PowerTransformerEnd.g", &assign_PowerTransformerEnd_g); + assign_map.emplace("cim:PowerTransformerEnd.g0", &assign_PowerTransformerEnd_g0); + assign_map.emplace("cim:PowerTransformerEnd.phaseAngleClock", &assign_PowerTransformerEnd_phaseAngleClock); + assign_map.emplace("cim:PowerTransformerEnd.r", &assign_PowerTransformerEnd_r); + assign_map.emplace("cim:PowerTransformerEnd.r0", &assign_PowerTransformerEnd_r0); + assign_map.emplace("cim:PowerTransformerEnd.ratedS", &assign_PowerTransformerEnd_ratedS); + assign_map.emplace("cim:PowerTransformerEnd.ratedU", &assign_PowerTransformerEnd_ratedU); + assign_map.emplace("cim:PowerTransformerEnd.x", &assign_PowerTransformerEnd_x); + assign_map.emplace("cim:PowerTransformerEnd.x0", &assign_PowerTransformerEnd_x0); } void PowerTransformerEnd::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PowerTransformerEnd.PowerTransformer"), &assign_PowerTransformerEnd_PowerTransformer)); + assign_map.emplace("cim:PowerTransformerEnd.PowerTransformer", &assign_PowerTransformerEnd_PowerTransformer); } void PowerTransformerEnd::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/PowerTransformerEnd.hpp b/CGMES_3.0.0/PowerTransformerEnd.hpp index 4f631047d..f42dd7283 100644 --- a/CGMES_3.0.0/PowerTransformerEnd.hpp +++ b/CGMES_3.0.0/PowerTransformerEnd.hpp @@ -25,9 +25,7 @@ namespace CIMPP { class PowerTransformer; - /* - A PowerTransformerEnd is associated with each Terminal of a PowerTransformer. The impedance values r, r0, x, and x0 of a PowerTransformerEnd represents a star equivalent as follows. 1) for a two Terminal PowerTransformer the high voltage (TransformerEnd.endNumber=1) PowerTransformerEnd has non zero values on r, r0, x, and x0 while the low voltage (TransformerEnd.endNumber=2) PowerTransformerEnd has zero values for r, r0, x, and x0. Parameters are always provided, even if the PowerTransformerEnds have the same rated voltage. In this case, the parameters are provided at the PowerTransformerEnd which has TransformerEnd.endNumber equal to 1. 2) for a three Terminal PowerTransformer the three PowerTransformerEnds represent a star equivalent with each leg in the star represented by r, r0, x, and x0 values. 3) For a three Terminal transformer each PowerTransformerEnd shall have g, g0, b and b0 values corresponding to the no load losses distributed on the three PowerTransformerEnds. The total no load loss shunt impedances may also be placed at one of the PowerTransformerEnds, preferably the end numbered 1, having the shunt values on end 1. This is the preferred way. 4) for a PowerTransformer with more than three Terminals the PowerTransformerEnd impedance values cannot be used. Instead use the TransformerMeshImpedance or split the transformer into multiple PowerTransformers. Each PowerTransformerEnd must be contained by a PowerTransformer. Because a PowerTransformerEnd (or any other object) can not be contained by more than one parent, a PowerTransformerEnd can not have an association to an EquipmentContainer (Substation, VoltageLevel, etc). - */ + /** \brief A PowerTransformerEnd is associated with each Terminal of a PowerTransformer. The impedance values r, r0, x, and x0 of a PowerTransformerEnd represents a star equivalent as follows. 1) for a two Terminal PowerTransformer the high voltage (TransformerEnd.endNumber=1) PowerTransformerEnd has non zero values on r, r0, x, and x0 while the low voltage (TransformerEnd.endNumber=2) PowerTransformerEnd has zero values for r, r0, x, and x0. Parameters are always provided, even if the PowerTransformerEnds have the same rated voltage. In this case, the parameters are provided at the PowerTransformerEnd which has TransformerEnd.endNumber equal to 1. 2) for a three Terminal PowerTransformer the three PowerTransformerEnds represent a star equivalent with each leg in the star represented by r, r0, x, and x0 values. 3) For a three Terminal transformer each PowerTransformerEnd shall have g, g0, b and b0 values corresponding to the no load losses distributed on the three PowerTransformerEnds. The total no load loss shunt impedances may also be placed at one of the PowerTransformerEnds, preferably the end numbered 1, having the shunt values on end 1. This is the preferred way. 4) for a PowerTransformer with more than three Terminals the PowerTransformerEnd impedance values cannot be used. Instead use the TransformerMeshImpedance or split the transformer into multiple PowerTransformers. Each PowerTransformerEnd must be contained by a PowerTransformer. Because a PowerTransformerEnd (or any other object) can not be contained by more than one parent, a PowerTransformerEnd can not have an association to an EquipmentContainer (Substation, VoltageLevel, etc). */ class PowerTransformerEnd : public TransformerEnd { public: @@ -35,19 +33,44 @@ namespace CIMPP PowerTransformerEnd(); ~PowerTransformerEnd() override; - CIMPP::PowerTransformer* PowerTransformer; /* The power transformer of this power transformer end. Default: 0 */ - CIMPP::Susceptance b; /* Magnetizing branch susceptance (B mag). The value can be positive or negative. Default: nullptr */ - CIMPP::Susceptance b0; /* Zero sequence magnetizing branch susceptance. Default: nullptr */ - CIMPP::WindingConnection connectionKind; /* Kind of connection. Default: 0 */ - CIMPP::Conductance g; /* Magnetizing branch conductance. Default: nullptr */ - CIMPP::Conductance g0; /* Zero sequence magnetizing branch conductance (star-model). Default: nullptr */ - CIMPP::Integer phaseAngleClock; /* Terminal voltage phase angle displacement where 360 degrees are represented with clock hours. The valid values are 0 to 11. For example, for the secondary side end of a transformer with vector group code of `Dyn11`, specify the connection kind as wye with neutral and specify the phase angle of the clock as 11. The clock value of the transformer end number specified as 1, is assumed to be zero. Note the transformer end number is not assumed to be the same as the terminal sequence number. Default: 0 */ - CIMPP::Resistance r; /* Resistance (star-model) of the transformer end. The attribute shall be equal to or greater than zero for non-equivalent transformers. Default: nullptr */ - CIMPP::Resistance r0; /* Zero sequence series resistance (star-model) of the transformer end. Default: nullptr */ - CIMPP::ApparentPower ratedS; /* Normal apparent power rating. The attribute shall be a positive value. For a two-winding transformer the values for the high and low voltage sides shall be identical. Default: nullptr */ - CIMPP::Voltage ratedU; /* Rated voltage: phase-phase for three-phase windings, and either phase-phase or phase-neutral for single-phase windings. A high voltage side, as given by TransformerEnd.endNumber, shall have a ratedU that is greater than or equal to ratedU for the lower voltage sides. The attribute shall be a positive value. Default: nullptr */ - CIMPP::Reactance x; /* Positive sequence series reactance (star-model) of the transformer end. Default: nullptr */ - CIMPP::Reactance x0; /* Zero sequence series reactance of the transformer end. Default: nullptr */ + /** \brief The power transformer of this power transformer end. Default: 0 */ + CIMPP::PowerTransformer* PowerTransformer; + + /** \brief Magnetizing branch susceptance (B mag). The value can be positive or negative. Default: nullptr */ + CIMPP::Susceptance b; + + /** \brief Zero sequence magnetizing branch susceptance. Default: nullptr */ + CIMPP::Susceptance b0; + + /** \brief Kind of connection. Default: 0 */ + CIMPP::WindingConnection connectionKind; + + /** \brief Magnetizing branch conductance. Default: nullptr */ + CIMPP::Conductance g; + + /** \brief Zero sequence magnetizing branch conductance (star-model). Default: nullptr */ + CIMPP::Conductance g0; + + /** \brief Terminal voltage phase angle displacement where 360 degrees are represented with clock hours. The valid values are 0 to 11. For example, for the secondary side end of a transformer with vector group code of `Dyn11`, specify the connection kind as wye with neutral and specify the phase angle of the clock as 11. The clock value of the transformer end number specified as 1, is assumed to be zero. Note the transformer end number is not assumed to be the same as the terminal sequence number. Default: 0 */ + CIMPP::Integer phaseAngleClock; + + /** \brief Resistance (star-model) of the transformer end. The attribute shall be equal to or greater than zero for non-equivalent transformers. Default: nullptr */ + CIMPP::Resistance r; + + /** \brief Zero sequence series resistance (star-model) of the transformer end. Default: nullptr */ + CIMPP::Resistance r0; + + /** \brief Normal apparent power rating. The attribute shall be a positive value. For a two-winding transformer the values for the high and low voltage sides shall be identical. Default: nullptr */ + CIMPP::ApparentPower ratedS; + + /** \brief Rated voltage: phase-phase for three-phase windings, and either phase-phase or phase-neutral for single-phase windings. A high voltage side, as given by TransformerEnd.endNumber, shall have a ratedU that is greater than or equal to ratedU for the lower voltage sides. The attribute shall be a positive value. Default: nullptr */ + CIMPP::Voltage ratedU; + + /** \brief Positive sequence series reactance (star-model) of the transformer end. Default: nullptr */ + CIMPP::Reactance x; + + /** \brief Zero sequence series reactance of the transformer end. Default: nullptr */ + CIMPP::Reactance x0; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ProprietaryParameterDynamics.cpp b/CGMES_3.0.0/ProprietaryParameterDynamics.cpp index e01cb2fe3..ea8664dd7 100644 --- a/CGMES_3.0.0/ProprietaryParameterDynamics.cpp +++ b/CGMES_3.0.0/ProprietaryParameterDynamics.cpp @@ -29,15 +29,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindPlantUserDefined.hpp" #include "WindType1or2UserDefined.hpp" #include "WindType3or4UserDefined.hpp" -#include "Boolean.hpp" -#include "Float.hpp" -#include "Integer.hpp" -#include "Integer.hpp" using namespace CIMPP; -ProprietaryParameterDynamics::ProprietaryParameterDynamics() : AsynchronousMachineUserDefined(nullptr), CSCUserDefined(nullptr), DiscontinuousExcitationControlUserDefined(nullptr), ExcitationSystemUserDefined(nullptr), LoadUserDefined(nullptr), MechanicalLoadUserDefined(nullptr), OverexcitationLimiterUserDefined(nullptr), PFVArControllerType1UserDefined(nullptr), PFVArControllerType2UserDefined(nullptr), PowerSystemStabilizerUserDefined(nullptr), SVCUserDefined(nullptr), SynchronousMachineUserDefined(nullptr), TurbineGovernorUserDefined(nullptr), TurbineLoadControllerUserDefined(nullptr), UnderexcitationLimiterUserDefined(nullptr), VSCUserDefined(nullptr), VoltageAdjusterUserDefined(nullptr), VoltageCompensatorUserDefined(nullptr), WindPlantUserDefined(nullptr), WindType1or2UserDefined(nullptr), WindType3or4UserDefined(nullptr) {}; -ProprietaryParameterDynamics::~ProprietaryParameterDynamics() {}; +ProprietaryParameterDynamics::ProprietaryParameterDynamics() : AsynchronousMachineUserDefined(nullptr), CSCUserDefined(nullptr), DiscontinuousExcitationControlUserDefined(nullptr), ExcitationSystemUserDefined(nullptr), LoadUserDefined(nullptr), MechanicalLoadUserDefined(nullptr), OverexcitationLimiterUserDefined(nullptr), PFVArControllerType1UserDefined(nullptr), PFVArControllerType2UserDefined(nullptr), PowerSystemStabilizerUserDefined(nullptr), SVCUserDefined(nullptr), SynchronousMachineUserDefined(nullptr), TurbineGovernorUserDefined(nullptr), TurbineLoadControllerUserDefined(nullptr), UnderexcitationLimiterUserDefined(nullptr), VSCUserDefined(nullptr), VoltageAdjusterUserDefined(nullptr), VoltageCompensatorUserDefined(nullptr), WindPlantUserDefined(nullptr), WindType1or2UserDefined(nullptr), WindType3or4UserDefined(nullptr) {} +ProprietaryParameterDynamics::~ProprietaryParameterDynamics() {} static const std::list PossibleProfilesForClass = { @@ -88,60 +84,6 @@ ProprietaryParameterDynamics::getPossibleProfilesForAttributes() const return map; } - -bool assign_ProprietaryParameterDynamics_booleanParameterValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->booleanParameterValue; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_ProprietaryParameterDynamics_floatParameterValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->floatParameterValue; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_ProprietaryParameterDynamics_integerParameterValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->integerParameterValue; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_ProprietaryParameterDynamics_parameterNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->parameterNumber; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_AsynchronousMachineUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_AsynchronousMachineUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -158,6 +100,7 @@ bool assign_ProprietaryParameterDynamics_AsynchronousMachineUserDefined(BaseClas } return false; } + bool assign_CSCUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_CSCUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -174,6 +117,7 @@ bool assign_ProprietaryParameterDynamics_CSCUserDefined(BaseClass* BaseClass_ptr } return false; } + bool assign_DiscontinuousExcitationControlUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_DiscontinuousExcitationControlUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -190,6 +134,7 @@ bool assign_ProprietaryParameterDynamics_DiscontinuousExcitationControlUserDefin } return false; } + bool assign_ExcitationSystemUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_ExcitationSystemUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -206,6 +151,7 @@ bool assign_ProprietaryParameterDynamics_ExcitationSystemUserDefined(BaseClass* } return false; } + bool assign_LoadUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_LoadUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -222,6 +168,7 @@ bool assign_ProprietaryParameterDynamics_LoadUserDefined(BaseClass* BaseClass_pt } return false; } + bool assign_MechanicalLoadUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_MechanicalLoadUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -238,6 +185,7 @@ bool assign_ProprietaryParameterDynamics_MechanicalLoadUserDefined(BaseClass* Ba } return false; } + bool assign_OverexcitationLimiterUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_OverexcitationLimiterUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -254,6 +202,7 @@ bool assign_ProprietaryParameterDynamics_OverexcitationLimiterUserDefined(BaseCl } return false; } + bool assign_PFVArControllerType1UserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_PFVArControllerType1UserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -270,6 +219,7 @@ bool assign_ProprietaryParameterDynamics_PFVArControllerType1UserDefined(BaseCla } return false; } + bool assign_PFVArControllerType2UserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_PFVArControllerType2UserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -286,6 +236,7 @@ bool assign_ProprietaryParameterDynamics_PFVArControllerType2UserDefined(BaseCla } return false; } + bool assign_PowerSystemStabilizerUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_PowerSystemStabilizerUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -302,6 +253,7 @@ bool assign_ProprietaryParameterDynamics_PowerSystemStabilizerUserDefined(BaseCl } return false; } + bool assign_SVCUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_SVCUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -318,6 +270,7 @@ bool assign_ProprietaryParameterDynamics_SVCUserDefined(BaseClass* BaseClass_ptr } return false; } + bool assign_SynchronousMachineUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_SynchronousMachineUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -334,6 +287,7 @@ bool assign_ProprietaryParameterDynamics_SynchronousMachineUserDefined(BaseClass } return false; } + bool assign_TurbineGovernorUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_TurbineGovernorUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -350,6 +304,7 @@ bool assign_ProprietaryParameterDynamics_TurbineGovernorUserDefined(BaseClass* B } return false; } + bool assign_TurbineLoadControllerUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_TurbineLoadControllerUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -366,6 +321,7 @@ bool assign_ProprietaryParameterDynamics_TurbineLoadControllerUserDefined(BaseCl } return false; } + bool assign_UnderexcitationLimiterUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_UnderexcitationLimiterUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -382,6 +338,7 @@ bool assign_ProprietaryParameterDynamics_UnderexcitationLimiterUserDefined(BaseC } return false; } + bool assign_VSCUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_VSCUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -398,6 +355,7 @@ bool assign_ProprietaryParameterDynamics_VSCUserDefined(BaseClass* BaseClass_ptr } return false; } + bool assign_VoltageAdjusterUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_VoltageAdjusterUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -414,6 +372,7 @@ bool assign_ProprietaryParameterDynamics_VoltageAdjusterUserDefined(BaseClass* B } return false; } + bool assign_VoltageCompensatorUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_VoltageCompensatorUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -430,6 +389,7 @@ bool assign_ProprietaryParameterDynamics_VoltageCompensatorUserDefined(BaseClass } return false; } + bool assign_WindPlantUserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_WindPlantUserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -446,6 +406,7 @@ bool assign_ProprietaryParameterDynamics_WindPlantUserDefined(BaseClass* BaseCla } return false; } + bool assign_WindType1or2UserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_WindType1or2UserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -462,6 +423,7 @@ bool assign_ProprietaryParameterDynamics_WindType1or2UserDefined(BaseClass* Base } return false; } + bool assign_WindType3or4UserDefined_ProprietaryParameterDynamics(BaseClass*, BaseClass*); bool assign_ProprietaryParameterDynamics_WindType3or4UserDefined(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -479,66 +441,66 @@ bool assign_ProprietaryParameterDynamics_WindType3or4UserDefined(BaseClass* Base return false; } -bool get_ProprietaryParameterDynamics_booleanParameterValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_ProprietaryParameterDynamics_booleanParameterValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->booleanParameterValue; - if (!buffer.str().empty()) + buffer >> element->booleanParameterValue; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_ProprietaryParameterDynamics_floatParameterValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_ProprietaryParameterDynamics_floatParameterValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->floatParameterValue; - if (!buffer.str().empty()) + buffer >> element->floatParameterValue; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_ProprietaryParameterDynamics_integerParameterValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_ProprietaryParameterDynamics_integerParameterValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->integerParameterValue; - if (!buffer.str().empty()) + buffer >> element->integerParameterValue; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_ProprietaryParameterDynamics_parameterNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_ProprietaryParameterDynamics_parameterNumber(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->parameterNumber; - if (!buffer.str().empty()) + buffer >> element->parameterNumber; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_ProprietaryParameterDynamics_AsynchronousMachineUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->AsynchronousMachineUserDefined != 0) { @@ -551,7 +513,8 @@ bool get_ProprietaryParameterDynamics_AsynchronousMachineUserDefined(const BaseC bool get_ProprietaryParameterDynamics_CSCUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->CSCUserDefined != 0) { @@ -564,7 +527,8 @@ bool get_ProprietaryParameterDynamics_CSCUserDefined(const BaseClass* BaseClass_ bool get_ProprietaryParameterDynamics_DiscontinuousExcitationControlUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DiscontinuousExcitationControlUserDefined != 0) { @@ -577,7 +541,8 @@ bool get_ProprietaryParameterDynamics_DiscontinuousExcitationControlUserDefined( bool get_ProprietaryParameterDynamics_ExcitationSystemUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ExcitationSystemUserDefined != 0) { @@ -590,7 +555,8 @@ bool get_ProprietaryParameterDynamics_ExcitationSystemUserDefined(const BaseClas bool get_ProprietaryParameterDynamics_LoadUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->LoadUserDefined != 0) { @@ -603,7 +569,8 @@ bool get_ProprietaryParameterDynamics_LoadUserDefined(const BaseClass* BaseClass bool get_ProprietaryParameterDynamics_MechanicalLoadUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->MechanicalLoadUserDefined != 0) { @@ -616,7 +583,8 @@ bool get_ProprietaryParameterDynamics_MechanicalLoadUserDefined(const BaseClass* bool get_ProprietaryParameterDynamics_OverexcitationLimiterUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->OverexcitationLimiterUserDefined != 0) { @@ -629,7 +597,8 @@ bool get_ProprietaryParameterDynamics_OverexcitationLimiterUserDefined(const Bas bool get_ProprietaryParameterDynamics_PFVArControllerType1UserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PFVArControllerType1UserDefined != 0) { @@ -642,7 +611,8 @@ bool get_ProprietaryParameterDynamics_PFVArControllerType1UserDefined(const Base bool get_ProprietaryParameterDynamics_PFVArControllerType2UserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PFVArControllerType2UserDefined != 0) { @@ -655,7 +625,8 @@ bool get_ProprietaryParameterDynamics_PFVArControllerType2UserDefined(const Base bool get_ProprietaryParameterDynamics_PowerSystemStabilizerUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PowerSystemStabilizerUserDefined != 0) { @@ -668,7 +639,8 @@ bool get_ProprietaryParameterDynamics_PowerSystemStabilizerUserDefined(const Bas bool get_ProprietaryParameterDynamics_SVCUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->SVCUserDefined != 0) { @@ -681,7 +653,8 @@ bool get_ProprietaryParameterDynamics_SVCUserDefined(const BaseClass* BaseClass_ bool get_ProprietaryParameterDynamics_SynchronousMachineUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->SynchronousMachineUserDefined != 0) { @@ -694,7 +667,8 @@ bool get_ProprietaryParameterDynamics_SynchronousMachineUserDefined(const BaseCl bool get_ProprietaryParameterDynamics_TurbineGovernorUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->TurbineGovernorUserDefined != 0) { @@ -707,7 +681,8 @@ bool get_ProprietaryParameterDynamics_TurbineGovernorUserDefined(const BaseClass bool get_ProprietaryParameterDynamics_TurbineLoadControllerUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->TurbineLoadControllerUserDefined != 0) { @@ -720,7 +695,8 @@ bool get_ProprietaryParameterDynamics_TurbineLoadControllerUserDefined(const Bas bool get_ProprietaryParameterDynamics_UnderexcitationLimiterUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->UnderexcitationLimiterUserDefined != 0) { @@ -733,7 +709,8 @@ bool get_ProprietaryParameterDynamics_UnderexcitationLimiterUserDefined(const Ba bool get_ProprietaryParameterDynamics_VSCUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->VSCUserDefined != 0) { @@ -746,7 +723,8 @@ bool get_ProprietaryParameterDynamics_VSCUserDefined(const BaseClass* BaseClass_ bool get_ProprietaryParameterDynamics_VoltageAdjusterUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->VoltageAdjusterUserDefined != 0) { @@ -759,7 +737,8 @@ bool get_ProprietaryParameterDynamics_VoltageAdjusterUserDefined(const BaseClass bool get_ProprietaryParameterDynamics_VoltageCompensatorUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->VoltageCompensatorUserDefined != 0) { @@ -772,7 +751,8 @@ bool get_ProprietaryParameterDynamics_VoltageCompensatorUserDefined(const BaseCl bool get_ProprietaryParameterDynamics_WindPlantUserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindPlantUserDefined != 0) { @@ -785,7 +765,8 @@ bool get_ProprietaryParameterDynamics_WindPlantUserDefined(const BaseClass* Base bool get_ProprietaryParameterDynamics_WindType1or2UserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindType1or2UserDefined != 0) { @@ -798,7 +779,8 @@ bool get_ProprietaryParameterDynamics_WindType1or2UserDefined(const BaseClass* B bool get_ProprietaryParameterDynamics_WindType3or4UserDefined(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindType3or4UserDefined != 0) { @@ -809,6 +791,65 @@ bool get_ProprietaryParameterDynamics_WindType3or4UserDefined(const BaseClass* B return false; } +bool get_ProprietaryParameterDynamics_booleanParameterValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->booleanParameterValue; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_ProprietaryParameterDynamics_floatParameterValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->floatParameterValue; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_ProprietaryParameterDynamics_integerParameterValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->integerParameterValue; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_ProprietaryParameterDynamics_parameterNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const ProprietaryParameterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->parameterNumber; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char ProprietaryParameterDynamics::debugName[] = "ProprietaryParameterDynamics"; const char* ProprietaryParameterDynamics::debugString() const @@ -818,40 +859,40 @@ const char* ProprietaryParameterDynamics::debugString() const void ProprietaryParameterDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics"), &ProprietaryParameterDynamics_factory)); + factory_map.emplace("cim:ProprietaryParameterDynamics", &ProprietaryParameterDynamics_factory); } void ProprietaryParameterDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.booleanParameterValue"), &assign_ProprietaryParameterDynamics_booleanParameterValue)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.floatParameterValue"), &assign_ProprietaryParameterDynamics_floatParameterValue)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.integerParameterValue"), &assign_ProprietaryParameterDynamics_integerParameterValue)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.parameterNumber"), &assign_ProprietaryParameterDynamics_parameterNumber)); + assign_map.emplace("cim:ProprietaryParameterDynamics.booleanParameterValue", &assign_ProprietaryParameterDynamics_booleanParameterValue); + assign_map.emplace("cim:ProprietaryParameterDynamics.floatParameterValue", &assign_ProprietaryParameterDynamics_floatParameterValue); + assign_map.emplace("cim:ProprietaryParameterDynamics.integerParameterValue", &assign_ProprietaryParameterDynamics_integerParameterValue); + assign_map.emplace("cim:ProprietaryParameterDynamics.parameterNumber", &assign_ProprietaryParameterDynamics_parameterNumber); } void ProprietaryParameterDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.AsynchronousMachineUserDefined"), &assign_ProprietaryParameterDynamics_AsynchronousMachineUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.CSCUserDefined"), &assign_ProprietaryParameterDynamics_CSCUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.DiscontinuousExcitationControlUserDefined"), &assign_ProprietaryParameterDynamics_DiscontinuousExcitationControlUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.ExcitationSystemUserDefined"), &assign_ProprietaryParameterDynamics_ExcitationSystemUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.LoadUserDefined"), &assign_ProprietaryParameterDynamics_LoadUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.MechanicalLoadUserDefined"), &assign_ProprietaryParameterDynamics_MechanicalLoadUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.OverexcitationLimiterUserDefined"), &assign_ProprietaryParameterDynamics_OverexcitationLimiterUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.PFVArControllerType1UserDefined"), &assign_ProprietaryParameterDynamics_PFVArControllerType1UserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.PFVArControllerType2UserDefined"), &assign_ProprietaryParameterDynamics_PFVArControllerType2UserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.PowerSystemStabilizerUserDefined"), &assign_ProprietaryParameterDynamics_PowerSystemStabilizerUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.SVCUserDefined"), &assign_ProprietaryParameterDynamics_SVCUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.SynchronousMachineUserDefined"), &assign_ProprietaryParameterDynamics_SynchronousMachineUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.TurbineGovernorUserDefined"), &assign_ProprietaryParameterDynamics_TurbineGovernorUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.TurbineLoadControllerUserDefined"), &assign_ProprietaryParameterDynamics_TurbineLoadControllerUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.UnderexcitationLimiterUserDefined"), &assign_ProprietaryParameterDynamics_UnderexcitationLimiterUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.VSCUserDefined"), &assign_ProprietaryParameterDynamics_VSCUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.VoltageAdjusterUserDefined"), &assign_ProprietaryParameterDynamics_VoltageAdjusterUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.VoltageCompensatorUserDefined"), &assign_ProprietaryParameterDynamics_VoltageCompensatorUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.WindPlantUserDefined"), &assign_ProprietaryParameterDynamics_WindPlantUserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.WindType1or2UserDefined"), &assign_ProprietaryParameterDynamics_WindType1or2UserDefined)); - assign_map.insert(std::make_pair(std::string("cim:ProprietaryParameterDynamics.WindType3or4UserDefined"), &assign_ProprietaryParameterDynamics_WindType3or4UserDefined)); + assign_map.emplace("cim:ProprietaryParameterDynamics.AsynchronousMachineUserDefined", &assign_ProprietaryParameterDynamics_AsynchronousMachineUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.CSCUserDefined", &assign_ProprietaryParameterDynamics_CSCUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.DiscontinuousExcitationControlUserDefined", &assign_ProprietaryParameterDynamics_DiscontinuousExcitationControlUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.ExcitationSystemUserDefined", &assign_ProprietaryParameterDynamics_ExcitationSystemUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.LoadUserDefined", &assign_ProprietaryParameterDynamics_LoadUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.MechanicalLoadUserDefined", &assign_ProprietaryParameterDynamics_MechanicalLoadUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.OverexcitationLimiterUserDefined", &assign_ProprietaryParameterDynamics_OverexcitationLimiterUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.PFVArControllerType1UserDefined", &assign_ProprietaryParameterDynamics_PFVArControllerType1UserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.PFVArControllerType2UserDefined", &assign_ProprietaryParameterDynamics_PFVArControllerType2UserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.PowerSystemStabilizerUserDefined", &assign_ProprietaryParameterDynamics_PowerSystemStabilizerUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.SVCUserDefined", &assign_ProprietaryParameterDynamics_SVCUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.SynchronousMachineUserDefined", &assign_ProprietaryParameterDynamics_SynchronousMachineUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.TurbineGovernorUserDefined", &assign_ProprietaryParameterDynamics_TurbineGovernorUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.TurbineLoadControllerUserDefined", &assign_ProprietaryParameterDynamics_TurbineLoadControllerUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.UnderexcitationLimiterUserDefined", &assign_ProprietaryParameterDynamics_UnderexcitationLimiterUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.VSCUserDefined", &assign_ProprietaryParameterDynamics_VSCUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.VoltageAdjusterUserDefined", &assign_ProprietaryParameterDynamics_VoltageAdjusterUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.VoltageCompensatorUserDefined", &assign_ProprietaryParameterDynamics_VoltageCompensatorUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.WindPlantUserDefined", &assign_ProprietaryParameterDynamics_WindPlantUserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.WindType1or2UserDefined", &assign_ProprietaryParameterDynamics_WindType1or2UserDefined); + assign_map.emplace("cim:ProprietaryParameterDynamics.WindType3or4UserDefined", &assign_ProprietaryParameterDynamics_WindType3or4UserDefined); } void ProprietaryParameterDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/ProprietaryParameterDynamics.hpp b/CGMES_3.0.0/ProprietaryParameterDynamics.hpp index 47cfef62d..0c3362018 100644 --- a/CGMES_3.0.0/ProprietaryParameterDynamics.hpp +++ b/CGMES_3.0.0/ProprietaryParameterDynamics.hpp @@ -40,9 +40,7 @@ namespace CIMPP class WindType1or2UserDefined; class WindType3or4UserDefined; - /* - Supports definition of one or more parameters of several different datatypes for use by proprietary user-defined models. This class does not inherit from IdentifiedObject since it is not intended that a single instance of it be referenced by more than one proprietary user-defined model instance. - */ + /** \brief Supports definition of one or more parameters of several different datatypes for use by proprietary user-defined models. This class does not inherit from IdentifiedObject since it is not intended that a single instance of it be referenced by more than one proprietary user-defined model instance. */ class ProprietaryParameterDynamics : public BaseClass { public: @@ -50,31 +48,80 @@ namespace CIMPP ProprietaryParameterDynamics(); ~ProprietaryParameterDynamics() override; - CIMPP::AsynchronousMachineUserDefined* AsynchronousMachineUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::CSCUserDefined* CSCUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::DiscontinuousExcitationControlUserDefined* DiscontinuousExcitationControlUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::ExcitationSystemUserDefined* ExcitationSystemUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::LoadUserDefined* LoadUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::MechanicalLoadUserDefined* MechanicalLoadUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::OverexcitationLimiterUserDefined* OverexcitationLimiterUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::PFVArControllerType1UserDefined* PFVArControllerType1UserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::PFVArControllerType2UserDefined* PFVArControllerType2UserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::PowerSystemStabilizerUserDefined* PowerSystemStabilizerUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::SVCUserDefined* SVCUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::SynchronousMachineUserDefined* SynchronousMachineUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::TurbineGovernorUserDefined* TurbineGovernorUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::TurbineLoadControllerUserDefined* TurbineLoadControllerUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::UnderexcitationLimiterUserDefined* UnderexcitationLimiterUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::VSCUserDefined* VSCUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::VoltageAdjusterUserDefined* VoltageAdjusterUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::VoltageCompensatorUserDefined* VoltageCompensatorUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::WindPlantUserDefined* WindPlantUserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::WindType1or2UserDefined* WindType1or2UserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::WindType3or4UserDefined* WindType3or4UserDefined; /* Proprietary user-defined model with which this parameter is associated. Default: 0 */ - CIMPP::Boolean booleanParameterValue; /* Boolean parameter value. If this attribute is populated, integerParameterValue and floatParameterValue will not be. Default: false */ - CIMPP::Float floatParameterValue; /* Floating point parameter value. If this attribute is populated, booleanParameterValue and integerParameterValue will not be. Default: 0.0 */ - CIMPP::Integer integerParameterValue; /* Integer parameter value. If this attribute is populated, booleanParameterValue and floatParameterValue will not be. Default: 0 */ - CIMPP::Integer parameterNumber; /* Sequence number of the parameter among the set of parameters associated with the related proprietary user-defined model. Default: 0 */ + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::AsynchronousMachineUserDefined* AsynchronousMachineUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::CSCUserDefined* CSCUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::DiscontinuousExcitationControlUserDefined* DiscontinuousExcitationControlUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::ExcitationSystemUserDefined* ExcitationSystemUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::LoadUserDefined* LoadUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::MechanicalLoadUserDefined* MechanicalLoadUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::OverexcitationLimiterUserDefined* OverexcitationLimiterUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::PFVArControllerType1UserDefined* PFVArControllerType1UserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::PFVArControllerType2UserDefined* PFVArControllerType2UserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::PowerSystemStabilizerUserDefined* PowerSystemStabilizerUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::SVCUserDefined* SVCUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::SynchronousMachineUserDefined* SynchronousMachineUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::TurbineGovernorUserDefined* TurbineGovernorUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::TurbineLoadControllerUserDefined* TurbineLoadControllerUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::UnderexcitationLimiterUserDefined* UnderexcitationLimiterUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::VSCUserDefined* VSCUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::VoltageAdjusterUserDefined* VoltageAdjusterUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::VoltageCompensatorUserDefined* VoltageCompensatorUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::WindPlantUserDefined* WindPlantUserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::WindType1or2UserDefined* WindType1or2UserDefined; + + /** \brief Proprietary user-defined model with which this parameter is associated. Default: 0 */ + CIMPP::WindType3or4UserDefined* WindType3or4UserDefined; + + /** \brief Boolean parameter value. If this attribute is populated, integerParameterValue and floatParameterValue will not be. Default: false */ + CIMPP::Boolean booleanParameterValue; + + /** \brief Floating point parameter value. If this attribute is populated, booleanParameterValue and integerParameterValue will not be. Default: 0.0 */ + CIMPP::Float floatParameterValue; + + /** \brief Integer parameter value. If this attribute is populated, booleanParameterValue and floatParameterValue will not be. Default: 0 */ + CIMPP::Integer integerParameterValue; + + /** \brief Sequence number of the parameter among the set of parameters associated with the related proprietary user-defined model. Default: 0 */ + CIMPP::Integer parameterNumber; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ProtectedSwitch.cpp b/CGMES_3.0.0/ProtectedSwitch.cpp index f80191fcf..2b6f24097 100644 --- a/CGMES_3.0.0/ProtectedSwitch.cpp +++ b/CGMES_3.0.0/ProtectedSwitch.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ProtectedSwitch::ProtectedSwitch() {}; -ProtectedSwitch::~ProtectedSwitch() {}; +ProtectedSwitch::ProtectedSwitch() {} +ProtectedSwitch::~ProtectedSwitch() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ ProtectedSwitch::getPossibleProfilesForAttributes() const return map; } - - - - - const char ProtectedSwitch::debugName[] = "ProtectedSwitch"; const char* ProtectedSwitch::debugString() const { @@ -52,7 +47,7 @@ const char* ProtectedSwitch::debugString() const void ProtectedSwitch::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ProtectedSwitch"), &ProtectedSwitch_factory)); + factory_map.emplace("cim:ProtectedSwitch", &ProtectedSwitch_factory); } void ProtectedSwitch::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ProtectedSwitch.hpp b/CGMES_3.0.0/ProtectedSwitch.hpp index 188feccca..e7161aa71 100644 --- a/CGMES_3.0.0/ProtectedSwitch.hpp +++ b/CGMES_3.0.0/ProtectedSwitch.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A ProtectedSwitch is a switching device that can be operated by ProtectionEquipment. - */ + /** \brief A ProtectedSwitch is a switching device that can be operated by ProtectionEquipment. */ class ProtectedSwitch : public Switch { public: @@ -26,7 +24,6 @@ namespace CIMPP ProtectedSwitch(); ~ProtectedSwitch() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Pss1.cpp b/CGMES_3.0.0/Pss1.cpp index 325570587..1bc7f3ae6 100644 --- a/CGMES_3.0.0/Pss1.cpp +++ b/CGMES_3.0.0/Pss1.cpp @@ -8,26 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -Pss1::Pss1() {}; -Pss1::~Pss1() {}; +Pss1::Pss1() {} +Pss1::~Pss1() {} static const std::list PossibleProfilesForClass = { @@ -68,207 +53,220 @@ Pss1::getPossibleProfilesForAttributes() const return map; } - -bool assign_Pss1_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_komega(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_komega(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->komega; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_kpe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_kpe(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpe; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_t10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_t10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_t7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_t8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_t8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_t9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_t9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_tpe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_tpe(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpe; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_vadat(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_vadat(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vadat; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_vsmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_vsmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1_vsmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1_vsmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1* element = dynamic_cast(BaseClass_ptr1)) + Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_Pss1_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -282,7 +280,8 @@ bool get_Pss1_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_komega(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->komega; if (!buffer.str().empty()) @@ -296,7 +295,8 @@ bool get_Pss1_komega(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_kpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpe; if (!buffer.str().empty()) @@ -310,7 +310,8 @@ bool get_Pss1_kpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -324,7 +325,8 @@ bool get_Pss1_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -338,7 +340,8 @@ bool get_Pss1_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t10; if (!buffer.str().empty()) @@ -352,7 +355,8 @@ bool get_Pss1_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -366,7 +370,8 @@ bool get_Pss1_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -380,7 +385,8 @@ bool get_Pss1_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t7; if (!buffer.str().empty()) @@ -394,7 +400,8 @@ bool get_Pss1_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t8; if (!buffer.str().empty()) @@ -408,7 +415,8 @@ bool get_Pss1_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t9; if (!buffer.str().empty()) @@ -422,7 +430,8 @@ bool get_Pss1_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_tpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpe; if (!buffer.str().empty()) @@ -436,7 +445,8 @@ bool get_Pss1_tpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_vadat(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vadat; if (!buffer.str().empty()) @@ -450,7 +460,8 @@ bool get_Pss1_vadat(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_vsmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmn; if (!buffer.str().empty()) @@ -464,7 +475,8 @@ bool get_Pss1_vsmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1_vsmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1* element = dynamic_cast(BaseClass_ptr1)) + const Pss1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmx; if (!buffer.str().empty()) @@ -476,8 +488,6 @@ bool get_Pss1_vsmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char Pss1::debugName[] = "Pss1"; const char* Pss1::debugString() const { @@ -486,26 +496,26 @@ const char* Pss1::debugString() const void Pss1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Pss1"), &Pss1_factory)); + factory_map.emplace("cim:Pss1", &Pss1_factory); } void Pss1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Pss1.kf"), &assign_Pss1_kf)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.komega"), &assign_Pss1_komega)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.kpe"), &assign_Pss1_kpe)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.ks"), &assign_Pss1_ks)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.pmin"), &assign_Pss1_pmin)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.t10"), &assign_Pss1_t10)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.t5"), &assign_Pss1_t5)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.t6"), &assign_Pss1_t6)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.t7"), &assign_Pss1_t7)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.t8"), &assign_Pss1_t8)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.t9"), &assign_Pss1_t9)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.tpe"), &assign_Pss1_tpe)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.vadat"), &assign_Pss1_vadat)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.vsmn"), &assign_Pss1_vsmn)); - assign_map.insert(std::make_pair(std::string("cim:Pss1.vsmx"), &assign_Pss1_vsmx)); + assign_map.emplace("cim:Pss1.kf", &assign_Pss1_kf); + assign_map.emplace("cim:Pss1.komega", &assign_Pss1_komega); + assign_map.emplace("cim:Pss1.kpe", &assign_Pss1_kpe); + assign_map.emplace("cim:Pss1.ks", &assign_Pss1_ks); + assign_map.emplace("cim:Pss1.pmin", &assign_Pss1_pmin); + assign_map.emplace("cim:Pss1.t10", &assign_Pss1_t10); + assign_map.emplace("cim:Pss1.t5", &assign_Pss1_t5); + assign_map.emplace("cim:Pss1.t6", &assign_Pss1_t6); + assign_map.emplace("cim:Pss1.t7", &assign_Pss1_t7); + assign_map.emplace("cim:Pss1.t8", &assign_Pss1_t8); + assign_map.emplace("cim:Pss1.t9", &assign_Pss1_t9); + assign_map.emplace("cim:Pss1.tpe", &assign_Pss1_tpe); + assign_map.emplace("cim:Pss1.vadat", &assign_Pss1_vadat); + assign_map.emplace("cim:Pss1.vsmn", &assign_Pss1_vsmn); + assign_map.emplace("cim:Pss1.vsmx", &assign_Pss1_vsmx); } void Pss1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/Pss1.hpp b/CGMES_3.0.0/Pss1.hpp index 5e58bc7ec..329abfc10 100644 --- a/CGMES_3.0.0/Pss1.hpp +++ b/CGMES_3.0.0/Pss1.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Italian PSS with three inputs (speed, frequency, power). - */ + /** \brief Italian PSS with three inputs (speed, frequency, power). */ class Pss1 : public PowerSystemStabilizerDynamics { public: @@ -30,21 +28,50 @@ namespace CIMPP Pss1(); ~Pss1() override; - CIMPP::Float kf; /* Frequency power input gain (<i>K</i><i><sub>F</sub></i>). Typical value = 5. Default: 0.0 */ - CIMPP::Float komega; /* Shaft speed power input gain (<i>K</i><i><sub>omega</sub></i>). Typical value = 0. Default: 0.0 */ - CIMPP::Float kpe; /* Electric power input gain (<i>K</i><i><sub>PE</sub></i>). Typical value = 0,3. Default: 0.0 */ - CIMPP::Float ks; /* PSS gain (<i>Ks</i>). Typical value = 1. Default: 0.0 */ - CIMPP::PU pmin; /* Minimum power PSS enabling (<i>Pmin</i>). Typical value = 0,25. Default: nullptr */ - CIMPP::Seconds t10; /* Lead/lag time constant (<i>T</i><i><sub>10</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds t5; /* Washout (<i>T</i><i><sub>5</sub></i>) (&gt;= 0). Typical value = 3,5. Default: nullptr */ - CIMPP::Seconds t6; /* Filter time constant (<i>T</i><i><sub>6</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds t7; /* Lead/lag time constant (<i>T</i><i><sub>7</sub></i>) (&gt;= 0). If = 0, both blocks are bypassed. Typical value = 0. Default: nullptr */ - CIMPP::Seconds t8; /* Lead/lag time constant (<i>T</i><i><sub>8</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds t9; /* Lead/lag time constant (<i>T</i><i><sub>9</sub></i>) (&gt;= 0). If = 0, both blocks are bypassed. Typical value = 0. Default: nullptr */ - CIMPP::Seconds tpe; /* Electric power filter time constant (<i>T</i><i><sub>PE</sub></i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ - CIMPP::Boolean vadat; /* <font color=`#0f0f0f`>Signal selector (<i>V</i><i><sub>ADAT</sub></i>).</font> <font color=`#0f0f0f`>true = closed (generator power is greater than <i>Pmin</i>)</font> <font color=`#0f0f0f`>false = open (<i>Pe</i> is smaller than <i>Pmin</i>).</font> <font color=`#0f0f0f`>Typical value = true.</font> Default: false */ - CIMPP::PU vsmn; /* Stabilizer output maximum limit (<i>V</i><i><sub>SMN</sub></i>). Typical value = -0,06. Default: nullptr */ - CIMPP::PU vsmx; /* Stabilizer output minimum limit (<i>V</i><i><sub>SMX</sub></i>). Typical value = 0,06. Default: nullptr */ + /** \brief Frequency power input gain (<i>K</i><i><sub>F</sub></i>). Typical value = 5. Default: 0.0 */ + CIMPP::Float kf; + + /** \brief Shaft speed power input gain (<i>K</i><i><sub>omega</sub></i>). Typical value = 0. Default: 0.0 */ + CIMPP::Float komega; + + /** \brief Electric power input gain (<i>K</i><i><sub>PE</sub></i>). Typical value = 0,3. Default: 0.0 */ + CIMPP::Float kpe; + + /** \brief PSS gain (<i>Ks</i>). Typical value = 1. Default: 0.0 */ + CIMPP::Float ks; + + /** \brief Minimum power PSS enabling (<i>Pmin</i>). Typical value = 0,25. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Lead/lag time constant (<i>T</i><i><sub>10</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds t10; + + /** \brief Washout (<i>T</i><i><sub>5</sub></i>) (&gt;= 0). Typical value = 3,5. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Filter time constant (<i>T</i><i><sub>6</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Lead/lag time constant (<i>T</i><i><sub>7</sub></i>) (&gt;= 0). If = 0, both blocks are bypassed. Typical value = 0. Default: nullptr */ + CIMPP::Seconds t7; + + /** \brief Lead/lag time constant (<i>T</i><i><sub>8</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds t8; + + /** \brief Lead/lag time constant (<i>T</i><i><sub>9</sub></i>) (&gt;= 0). If = 0, both blocks are bypassed. Typical value = 0. Default: nullptr */ + CIMPP::Seconds t9; + + /** \brief Electric power filter time constant (<i>T</i><i><sub>PE</sub></i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ + CIMPP::Seconds tpe; + + /** \brief <font color=`#0f0f0f`>Signal selector (<i>V</i><i><sub>ADAT</sub></i>).</font> <font color=`#0f0f0f`>true = closed (generator power is greater than <i>Pmin</i>)</font> <font color=`#0f0f0f`>false = open (<i>Pe</i> is smaller than <i>Pmin</i>).</font> <font color=`#0f0f0f`>Typical value = true.</font> Default: false */ + CIMPP::Boolean vadat; + + /** \brief Stabilizer output maximum limit (<i>V</i><i><sub>SMN</sub></i>). Typical value = -0,06. Default: nullptr */ + CIMPP::PU vsmn; + + /** \brief Stabilizer output minimum limit (<i>V</i><i><sub>SMX</sub></i>). Typical value = 0,06. Default: nullptr */ + CIMPP::PU vsmx; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Pss1A.cpp b/CGMES_3.0.0/Pss1A.cpp index 9f69780d8..219c3f935 100644 --- a/CGMES_3.0.0/Pss1A.cpp +++ b/CGMES_3.0.0/Pss1A.cpp @@ -8,33 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "InputSignalKind.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -Pss1A::Pss1A() {}; -Pss1A::~Pss1A() {}; +Pss1A::Pss1A() {} +Pss1A::~Pss1A() {} static const std::list PossibleProfilesForClass = { @@ -82,298 +60,318 @@ Pss1A::getPossibleProfilesForAttributes() const return map; } - -bool assign_Pss1A_a1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_a1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_a2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_a2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_a3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_a3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_a4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_a4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_a5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_a5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_a6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_a6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_a7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_a7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_a8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_a8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_inputSignalType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_inputSignalType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignalType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_kd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_kd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_tdelay(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_tdelay(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdelay; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_vcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_vcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vcl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_vcu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_vcu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vcu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss1A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss1A* element = dynamic_cast(BaseClass_ptr1)) + Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_Pss1A_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a1; if (!buffer.str().empty()) @@ -387,7 +385,8 @@ bool get_Pss1A_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a2; if (!buffer.str().empty()) @@ -401,7 +400,8 @@ bool get_Pss1A_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_a3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a3; if (!buffer.str().empty()) @@ -415,7 +415,8 @@ bool get_Pss1A_a3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_a4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a4; if (!buffer.str().empty()) @@ -429,7 +430,8 @@ bool get_Pss1A_a4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_a5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a5; if (!buffer.str().empty()) @@ -443,7 +445,8 @@ bool get_Pss1A_a5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_a6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a6; if (!buffer.str().empty()) @@ -457,7 +460,8 @@ bool get_Pss1A_a6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_a7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a7; if (!buffer.str().empty()) @@ -471,7 +475,8 @@ bool get_Pss1A_a7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_a8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a8; if (!buffer.str().empty()) @@ -483,9 +488,25 @@ bool get_Pss1A_a8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } +bool get_Pss1A_inputSignalType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignalType; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_Pss1A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kd; if (!buffer.str().empty()) @@ -499,7 +520,8 @@ bool get_Pss1A_kd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -513,7 +535,8 @@ bool get_Pss1A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -527,7 +550,8 @@ bool get_Pss1A_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -541,7 +565,8 @@ bool get_Pss1A_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -555,7 +580,8 @@ bool get_Pss1A_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -569,7 +595,8 @@ bool get_Pss1A_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -583,7 +610,8 @@ bool get_Pss1A_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -597,7 +625,8 @@ bool get_Pss1A_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_tdelay(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdelay; if (!buffer.str().empty()) @@ -611,7 +640,8 @@ bool get_Pss1A_tdelay(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_Pss1A_vcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vcl; if (!buffer.str().empty()) @@ -625,7 +655,8 @@ bool get_Pss1A_vcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_vcu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vcu; if (!buffer.str().empty()) @@ -639,7 +670,8 @@ bool get_Pss1A_vcu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -653,7 +685,8 @@ bool get_Pss1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) + const Pss1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -665,22 +698,6 @@ bool get_Pss1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - -bool get_Pss1A_inputSignalType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const Pss1A* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignalType; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char Pss1A::debugName[] = "Pss1A"; const char* Pss1A::debugString() const { @@ -689,33 +706,33 @@ const char* Pss1A::debugString() const void Pss1A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Pss1A"), &Pss1A_factory)); + factory_map.emplace("cim:Pss1A", &Pss1A_factory); } void Pss1A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Pss1A.a1"), &assign_Pss1A_a1)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.a2"), &assign_Pss1A_a2)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.a3"), &assign_Pss1A_a3)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.a4"), &assign_Pss1A_a4)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.a5"), &assign_Pss1A_a5)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.a6"), &assign_Pss1A_a6)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.a7"), &assign_Pss1A_a7)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.a8"), &assign_Pss1A_a8)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.inputSignalType"), &assign_Pss1A_inputSignalType)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.kd"), &assign_Pss1A_kd)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.ks"), &assign_Pss1A_ks)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.t1"), &assign_Pss1A_t1)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.t2"), &assign_Pss1A_t2)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.t3"), &assign_Pss1A_t3)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.t4"), &assign_Pss1A_t4)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.t5"), &assign_Pss1A_t5)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.t6"), &assign_Pss1A_t6)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.tdelay"), &assign_Pss1A_tdelay)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.vcl"), &assign_Pss1A_vcl)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.vcu"), &assign_Pss1A_vcu)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.vrmax"), &assign_Pss1A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:Pss1A.vrmin"), &assign_Pss1A_vrmin)); + assign_map.emplace("cim:Pss1A.a1", &assign_Pss1A_a1); + assign_map.emplace("cim:Pss1A.a2", &assign_Pss1A_a2); + assign_map.emplace("cim:Pss1A.a3", &assign_Pss1A_a3); + assign_map.emplace("cim:Pss1A.a4", &assign_Pss1A_a4); + assign_map.emplace("cim:Pss1A.a5", &assign_Pss1A_a5); + assign_map.emplace("cim:Pss1A.a6", &assign_Pss1A_a6); + assign_map.emplace("cim:Pss1A.a7", &assign_Pss1A_a7); + assign_map.emplace("cim:Pss1A.a8", &assign_Pss1A_a8); + assign_map.emplace("cim:Pss1A.inputSignalType", &assign_Pss1A_inputSignalType); + assign_map.emplace("cim:Pss1A.kd", &assign_Pss1A_kd); + assign_map.emplace("cim:Pss1A.ks", &assign_Pss1A_ks); + assign_map.emplace("cim:Pss1A.t1", &assign_Pss1A_t1); + assign_map.emplace("cim:Pss1A.t2", &assign_Pss1A_t2); + assign_map.emplace("cim:Pss1A.t3", &assign_Pss1A_t3); + assign_map.emplace("cim:Pss1A.t4", &assign_Pss1A_t4); + assign_map.emplace("cim:Pss1A.t5", &assign_Pss1A_t5); + assign_map.emplace("cim:Pss1A.t6", &assign_Pss1A_t6); + assign_map.emplace("cim:Pss1A.tdelay", &assign_Pss1A_tdelay); + assign_map.emplace("cim:Pss1A.vcl", &assign_Pss1A_vcl); + assign_map.emplace("cim:Pss1A.vcu", &assign_Pss1A_vcu); + assign_map.emplace("cim:Pss1A.vrmax", &assign_Pss1A_vrmax); + assign_map.emplace("cim:Pss1A.vrmin", &assign_Pss1A_vrmin); } void Pss1A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/Pss1A.hpp b/CGMES_3.0.0/Pss1A.hpp index 93c358229..32ac35793 100644 --- a/CGMES_3.0.0/Pss1A.hpp +++ b/CGMES_3.0.0/Pss1A.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Single input power system stabilizer. It is a modified version in order to allow representation of various vendors' implementations on PSS type 1A. - */ + /** \brief Single input power system stabilizer. It is a modified version in order to allow representation of various vendors' implementations on PSS type 1A. */ class Pss1A : public PowerSystemStabilizerDynamics { public: @@ -30,28 +28,71 @@ namespace CIMPP Pss1A(); ~Pss1A() override; - CIMPP::PU a1; /* Notch filter parameter (<i>A</i><i><sub>1</sub></i>). Default: nullptr */ - CIMPP::PU a2; /* Notch filter parameter (<i>A</i><i><sub>2</sub></i>). Default: nullptr */ - CIMPP::PU a3; /* Notch filter parameter (<i>A</i><i><sub>3</sub></i>). Default: nullptr */ - CIMPP::PU a4; /* Notch filter parameter (<i>A</i><i><sub>4</sub></i>). Default: nullptr */ - CIMPP::PU a5; /* Notch filter parameter (<i>A</i><i><sub>5</sub></i>). Default: nullptr */ - CIMPP::PU a6; /* Notch filter parameter (<i>A</i><i><sub>6</sub></i>). Default: nullptr */ - CIMPP::PU a7; /* Notch filter parameter (<i>A</i><i><sub>7</sub></i>). Default: nullptr */ - CIMPP::PU a8; /* Notch filter parameter (<i>A</i><i><sub>8</sub></i>). Default: nullptr */ - CIMPP::InputSignalKind inputSignalType; /* Type of input signal (rotorAngularFrequencyDeviation, busFrequencyDeviation, generatorElectricalPower, generatorAcceleratingPower, busVoltage, or busVoltageDerivative). Default: 0 */ - CIMPP::Boolean kd; /* Selector (<i>Kd</i>). true = e<sup>-sTdelay</sup> used false = e<sup>-sTdelay</sup> not used. Default: false */ - CIMPP::PU ks; /* Stabilizer gain (<i>K</i><i><sub>s</sub></i>). Default: nullptr */ - CIMPP::Seconds t1; /* Lead/lag time constant (<i>T</i><i><sub>1</sub></i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds t2; /* Lead/lag time constant (<i>T</i><i><sub>2</sub></i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds t3; /* Lead/lag time constant (<i>T</i><i><sub>3</sub></i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds t4; /* Lead/lag time constant (<i>T</i><i><sub>4</sub></i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds t5; /* Washout time constant (<i>T</i><i><sub>5</sub></i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds t6; /* Transducer time constant (<i>T</i><i><sub>6</sub></i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds tdelay; /* Time constant (<i>Tdelay</i>) (&gt;= 0). Default: nullptr */ - CIMPP::PU vcl; /* Stabilizer input cutoff threshold (<i>Vcl</i>). Default: nullptr */ - CIMPP::PU vcu; /* Stabilizer input cutoff threshold (<i>Vcu</i>). Default: nullptr */ - CIMPP::PU vrmax; /* Maximum stabilizer output (<i>Vrmax</i>) (&gt; Pss1A.vrmin). Default: nullptr */ - CIMPP::PU vrmin; /* Minimum stabilizer output (<i>Vrmin</i>) (&lt; Pss1A.vrmax). Default: nullptr */ + /** \brief Notch filter parameter (<i>A</i><i><sub>1</sub></i>). Default: nullptr */ + CIMPP::PU a1; + + /** \brief Notch filter parameter (<i>A</i><i><sub>2</sub></i>). Default: nullptr */ + CIMPP::PU a2; + + /** \brief Notch filter parameter (<i>A</i><i><sub>3</sub></i>). Default: nullptr */ + CIMPP::PU a3; + + /** \brief Notch filter parameter (<i>A</i><i><sub>4</sub></i>). Default: nullptr */ + CIMPP::PU a4; + + /** \brief Notch filter parameter (<i>A</i><i><sub>5</sub></i>). Default: nullptr */ + CIMPP::PU a5; + + /** \brief Notch filter parameter (<i>A</i><i><sub>6</sub></i>). Default: nullptr */ + CIMPP::PU a6; + + /** \brief Notch filter parameter (<i>A</i><i><sub>7</sub></i>). Default: nullptr */ + CIMPP::PU a7; + + /** \brief Notch filter parameter (<i>A</i><i><sub>8</sub></i>). Default: nullptr */ + CIMPP::PU a8; + + /** \brief Type of input signal (rotorAngularFrequencyDeviation, busFrequencyDeviation, generatorElectricalPower, generatorAcceleratingPower, busVoltage, or busVoltageDerivative). Default: 0 */ + CIMPP::InputSignalKind inputSignalType; + + /** \brief Selector (<i>Kd</i>). true = e<sup>-sTdelay</sup> used false = e<sup>-sTdelay</sup> not used. Default: false */ + CIMPP::Boolean kd; + + /** \brief Stabilizer gain (<i>K</i><i><sub>s</sub></i>). Default: nullptr */ + CIMPP::PU ks; + + /** \brief Lead/lag time constant (<i>T</i><i><sub>1</sub></i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Lead/lag time constant (<i>T</i><i><sub>2</sub></i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Lead/lag time constant (<i>T</i><i><sub>3</sub></i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Lead/lag time constant (<i>T</i><i><sub>4</sub></i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Washout time constant (<i>T</i><i><sub>5</sub></i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Transducer time constant (<i>T</i><i><sub>6</sub></i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time constant (<i>Tdelay</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds tdelay; + + /** \brief Stabilizer input cutoff threshold (<i>Vcl</i>). Default: nullptr */ + CIMPP::PU vcl; + + /** \brief Stabilizer input cutoff threshold (<i>Vcu</i>). Default: nullptr */ + CIMPP::PU vcu; + + /** \brief Maximum stabilizer output (<i>Vrmax</i>) (&gt; Pss1A.vrmin). Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum stabilizer output (<i>Vrmin</i>) (&lt; Pss1A.vrmax). Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Pss2B.cpp b/CGMES_3.0.0/Pss2B.cpp index e1603d49c..a89fc5c92 100644 --- a/CGMES_3.0.0/Pss2B.cpp +++ b/CGMES_3.0.0/Pss2B.cpp @@ -8,40 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Integer.hpp" -#include "Integer.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -Pss2B::Pss2B() {}; -Pss2B::~Pss2B() {}; +Pss2B::Pss2B() {} +Pss2B::~Pss2B() {} static const std::list PossibleProfilesForClass = { @@ -96,389 +67,416 @@ Pss2B::getPossibleProfilesForAttributes() const return map; } - -bool assign_Pss2B_a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_a(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_ks1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_ks1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_ks2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_ks2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_ks3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_ks3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_ks4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_ks4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_m(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_m(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->m; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_n(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_n(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->n; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t11(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t11; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_t9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_t9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_tw1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_tw1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_tw2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_tw2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_tw3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_tw3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_tw4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_tw4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_vsi1max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_vsi1max(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsi1max; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_vsi1min(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_vsi1min(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsi1min; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_vsi2max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_vsi2max(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsi2max; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_vsi2min(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_vsi2min(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsi2min; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_vstmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_vstmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vstmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2B_vstmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2B_vstmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2B* element = dynamic_cast(BaseClass_ptr1)) + Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vstmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_Pss2B_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a; if (!buffer.str().empty()) @@ -492,7 +490,8 @@ bool get_Pss2B_a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks1; if (!buffer.str().empty()) @@ -506,7 +505,8 @@ bool get_Pss2B_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks2; if (!buffer.str().empty()) @@ -520,7 +520,8 @@ bool get_Pss2B_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_ks3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks3; if (!buffer.str().empty()) @@ -534,7 +535,8 @@ bool get_Pss2B_ks3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_ks4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks4; if (!buffer.str().empty()) @@ -548,7 +550,8 @@ bool get_Pss2B_ks4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->m; if (!buffer.str().empty()) @@ -562,7 +565,8 @@ bool get_Pss2B_m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_n(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->n; if (!buffer.str().empty()) @@ -576,7 +580,8 @@ bool get_Pss2B_n(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -590,7 +595,8 @@ bool get_Pss2B_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t10; if (!buffer.str().empty()) @@ -604,7 +610,8 @@ bool get_Pss2B_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t11; if (!buffer.str().empty()) @@ -618,7 +625,8 @@ bool get_Pss2B_t11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -632,7 +640,8 @@ bool get_Pss2B_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -646,7 +655,8 @@ bool get_Pss2B_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -660,7 +670,8 @@ bool get_Pss2B_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -674,7 +685,8 @@ bool get_Pss2B_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t7; if (!buffer.str().empty()) @@ -688,7 +700,8 @@ bool get_Pss2B_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t8; if (!buffer.str().empty()) @@ -702,7 +715,8 @@ bool get_Pss2B_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t9; if (!buffer.str().empty()) @@ -716,7 +730,8 @@ bool get_Pss2B_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -730,7 +745,8 @@ bool get_Pss2B_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -744,7 +760,8 @@ bool get_Pss2B_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_tw1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw1; if (!buffer.str().empty()) @@ -758,7 +775,8 @@ bool get_Pss2B_tw1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_tw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw2; if (!buffer.str().empty()) @@ -772,7 +790,8 @@ bool get_Pss2B_tw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_tw3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw3; if (!buffer.str().empty()) @@ -786,7 +805,8 @@ bool get_Pss2B_tw3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_tw4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw4; if (!buffer.str().empty()) @@ -800,7 +820,8 @@ bool get_Pss2B_tw4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2B_vsi1max(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsi1max; if (!buffer.str().empty()) @@ -814,7 +835,8 @@ bool get_Pss2B_vsi1max(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_Pss2B_vsi1min(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsi1min; if (!buffer.str().empty()) @@ -828,7 +850,8 @@ bool get_Pss2B_vsi1min(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_Pss2B_vsi2max(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsi2max; if (!buffer.str().empty()) @@ -842,7 +865,8 @@ bool get_Pss2B_vsi2max(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_Pss2B_vsi2min(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsi2min; if (!buffer.str().empty()) @@ -856,7 +880,8 @@ bool get_Pss2B_vsi2min(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_Pss2B_vstmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vstmax; if (!buffer.str().empty()) @@ -870,7 +895,8 @@ bool get_Pss2B_vstmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_Pss2B_vstmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2B* element = dynamic_cast(BaseClass_ptr1)) + const Pss2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vstmin; if (!buffer.str().empty()) @@ -882,8 +908,6 @@ bool get_Pss2B_vstmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char Pss2B::debugName[] = "Pss2B"; const char* Pss2B::debugString() const { @@ -892,40 +916,40 @@ const char* Pss2B::debugString() const void Pss2B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Pss2B"), &Pss2B_factory)); + factory_map.emplace("cim:Pss2B", &Pss2B_factory); } void Pss2B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Pss2B.a"), &assign_Pss2B_a)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.ks1"), &assign_Pss2B_ks1)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.ks2"), &assign_Pss2B_ks2)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.ks3"), &assign_Pss2B_ks3)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.ks4"), &assign_Pss2B_ks4)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.m"), &assign_Pss2B_m)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.n"), &assign_Pss2B_n)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t1"), &assign_Pss2B_t1)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t10"), &assign_Pss2B_t10)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t11"), &assign_Pss2B_t11)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t2"), &assign_Pss2B_t2)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t3"), &assign_Pss2B_t3)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t4"), &assign_Pss2B_t4)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t6"), &assign_Pss2B_t6)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t7"), &assign_Pss2B_t7)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t8"), &assign_Pss2B_t8)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.t9"), &assign_Pss2B_t9)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.ta"), &assign_Pss2B_ta)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.tb"), &assign_Pss2B_tb)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.tw1"), &assign_Pss2B_tw1)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.tw2"), &assign_Pss2B_tw2)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.tw3"), &assign_Pss2B_tw3)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.tw4"), &assign_Pss2B_tw4)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.vsi1max"), &assign_Pss2B_vsi1max)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.vsi1min"), &assign_Pss2B_vsi1min)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.vsi2max"), &assign_Pss2B_vsi2max)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.vsi2min"), &assign_Pss2B_vsi2min)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.vstmax"), &assign_Pss2B_vstmax)); - assign_map.insert(std::make_pair(std::string("cim:Pss2B.vstmin"), &assign_Pss2B_vstmin)); + assign_map.emplace("cim:Pss2B.a", &assign_Pss2B_a); + assign_map.emplace("cim:Pss2B.ks1", &assign_Pss2B_ks1); + assign_map.emplace("cim:Pss2B.ks2", &assign_Pss2B_ks2); + assign_map.emplace("cim:Pss2B.ks3", &assign_Pss2B_ks3); + assign_map.emplace("cim:Pss2B.ks4", &assign_Pss2B_ks4); + assign_map.emplace("cim:Pss2B.m", &assign_Pss2B_m); + assign_map.emplace("cim:Pss2B.n", &assign_Pss2B_n); + assign_map.emplace("cim:Pss2B.t1", &assign_Pss2B_t1); + assign_map.emplace("cim:Pss2B.t10", &assign_Pss2B_t10); + assign_map.emplace("cim:Pss2B.t11", &assign_Pss2B_t11); + assign_map.emplace("cim:Pss2B.t2", &assign_Pss2B_t2); + assign_map.emplace("cim:Pss2B.t3", &assign_Pss2B_t3); + assign_map.emplace("cim:Pss2B.t4", &assign_Pss2B_t4); + assign_map.emplace("cim:Pss2B.t6", &assign_Pss2B_t6); + assign_map.emplace("cim:Pss2B.t7", &assign_Pss2B_t7); + assign_map.emplace("cim:Pss2B.t8", &assign_Pss2B_t8); + assign_map.emplace("cim:Pss2B.t9", &assign_Pss2B_t9); + assign_map.emplace("cim:Pss2B.ta", &assign_Pss2B_ta); + assign_map.emplace("cim:Pss2B.tb", &assign_Pss2B_tb); + assign_map.emplace("cim:Pss2B.tw1", &assign_Pss2B_tw1); + assign_map.emplace("cim:Pss2B.tw2", &assign_Pss2B_tw2); + assign_map.emplace("cim:Pss2B.tw3", &assign_Pss2B_tw3); + assign_map.emplace("cim:Pss2B.tw4", &assign_Pss2B_tw4); + assign_map.emplace("cim:Pss2B.vsi1max", &assign_Pss2B_vsi1max); + assign_map.emplace("cim:Pss2B.vsi1min", &assign_Pss2B_vsi1min); + assign_map.emplace("cim:Pss2B.vsi2max", &assign_Pss2B_vsi2max); + assign_map.emplace("cim:Pss2B.vsi2min", &assign_Pss2B_vsi2min); + assign_map.emplace("cim:Pss2B.vstmax", &assign_Pss2B_vstmax); + assign_map.emplace("cim:Pss2B.vstmin", &assign_Pss2B_vstmin); } void Pss2B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/Pss2B.hpp b/CGMES_3.0.0/Pss2B.hpp index f62bb62f4..8e0d82c45 100644 --- a/CGMES_3.0.0/Pss2B.hpp +++ b/CGMES_3.0.0/Pss2B.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Modified IEEE PSS2B. Extra lead/lag (or rate) block added at end (up to 4 lead/lags total). - */ + /** \brief Modified IEEE PSS2B. Extra lead/lag (or rate) block added at end (up to 4 lead/lags total). */ class Pss2B : public PowerSystemStabilizerDynamics { public: @@ -30,35 +28,92 @@ namespace CIMPP Pss2B(); ~Pss2B() override; - CIMPP::Float a; /* Numerator constant (<i>a</i>). Typical value = 1. Default: 0.0 */ - CIMPP::PU ks1; /* Stabilizer gain (<i>Ks1</i>). Typical value = 12. Default: nullptr */ - CIMPP::PU ks2; /* Gain on signal #2 (<i>Ks2</i>). Typical value = 0,2. Default: nullptr */ - CIMPP::PU ks3; /* Gain on signal #2 input before ramp-tracking filter (<i>Ks3</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU ks4; /* Gain on signal #2 input after ramp-tracking filter (<i>Ks4</i>). Typical value = 1. Default: nullptr */ - CIMPP::Integer m; /* Denominator order of ramp tracking filter (<i>m</i>). Typical value = 5. Default: 0 */ - CIMPP::Integer n; /* Order of ramp tracking filter (<i>n</i>). Typical value = 1. Default: 0 */ - CIMPP::Seconds t1; /* Lead/lag time constant (<i>T</i><i><sub>1</sub></i>) (&gt;= 0). Typical value = 0,12. Default: nullptr */ - CIMPP::Seconds t10; /* Lead/lag time constant (<i>T</i><i><sub>10</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds t11; /* Lead/lag time constant (<i>T</i><i><sub>11</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds t2; /* Lead/lag time constant (<i>T</i><i><sub>2</sub></i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ - CIMPP::Seconds t3; /* Lead/lag time constant (<i>T</i><i><sub>3</sub></i>) (&gt;= 0). Typical value = 0,3. Default: nullptr */ - CIMPP::Seconds t4; /* Lead/lag time constant (<i>T</i><i><sub>4</sub></i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ - CIMPP::Seconds t6; /* Time constant on signal #1 (<i>T</i><i><sub>6</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds t7; /* Time constant on signal #2 (<i>T</i><i><sub>7</sub></i>) (&gt;= 0). Typical value = 2. Default: nullptr */ - CIMPP::Seconds t8; /* Lead of ramp tracking filter (<i>T</i><i><sub>8</sub></i>) (&gt;= 0). Typical value = 0,2. Default: nullptr */ - CIMPP::Seconds t9; /* Lag of ramp tracking filter (<i>T</i><i><sub>9</sub></i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds ta; /* Lead constant (<i>T</i><i><sub>a</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tb; /* Lag time constant (<i>T</i><i><sub>b</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tw1; /* First washout on signal #1 (<i>T</i><i><sub>w1</sub></i>) (&gt;= 0). Typical value = 2. Default: nullptr */ - CIMPP::Seconds tw2; /* Second washout on signal #1 (<i>T</i><i><sub>w2</sub></i>) (&gt;= 0). Typical value = 2. Default: nullptr */ - CIMPP::Seconds tw3; /* First washout on signal #2 (<i>T</i><i><sub>w3</sub></i>) (&gt;= 0). Typical value = 2. Default: nullptr */ - CIMPP::Seconds tw4; /* Second washout on signal #2 (<i>T</i><i><sub>w4</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::PU vsi1max; /* Input signal #1 maximum limit (<i>Vsi1max</i>) (&gt; Pss2B.vsi1min). Typical value = 2. Default: nullptr */ - CIMPP::PU vsi1min; /* Input signal #1 minimum limit (<i>Vsi1min</i>) (&lt; Pss2B.vsi1max). Typical value = -2. Default: nullptr */ - CIMPP::PU vsi2max; /* Input signal #2 maximum limit (<i>Vsi2max</i>) (&gt; Pss2B.vsi2min). Typical value = 2. Default: nullptr */ - CIMPP::PU vsi2min; /* Input signal #2 minimum limit (<i>Vsi2min</i>) (&lt; Pss2B.vsi2max). Typical value = -2. Default: nullptr */ - CIMPP::PU vstmax; /* Stabilizer output maximum limit (<i>Vstmax</i>) (&gt; Pss2B.vstmin). Typical value = 0,1. Default: nullptr */ - CIMPP::PU vstmin; /* Stabilizer output minimum limit (<i>Vstmin</i>) (&lt; Pss2B.vstmax). Typical value = -0,1. Default: nullptr */ + /** \brief Numerator constant (<i>a</i>). Typical value = 1. Default: 0.0 */ + CIMPP::Float a; + + /** \brief Stabilizer gain (<i>Ks1</i>). Typical value = 12. Default: nullptr */ + CIMPP::PU ks1; + + /** \brief Gain on signal #2 (<i>Ks2</i>). Typical value = 0,2. Default: nullptr */ + CIMPP::PU ks2; + + /** \brief Gain on signal #2 input before ramp-tracking filter (<i>Ks3</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU ks3; + + /** \brief Gain on signal #2 input after ramp-tracking filter (<i>Ks4</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU ks4; + + /** \brief Denominator order of ramp tracking filter (<i>m</i>). Typical value = 5. Default: 0 */ + CIMPP::Integer m; + + /** \brief Order of ramp tracking filter (<i>n</i>). Typical value = 1. Default: 0 */ + CIMPP::Integer n; + + /** \brief Lead/lag time constant (<i>T</i><i><sub>1</sub></i>) (&gt;= 0). Typical value = 0,12. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Lead/lag time constant (<i>T</i><i><sub>10</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds t10; + + /** \brief Lead/lag time constant (<i>T</i><i><sub>11</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds t11; + + /** \brief Lead/lag time constant (<i>T</i><i><sub>2</sub></i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Lead/lag time constant (<i>T</i><i><sub>3</sub></i>) (&gt;= 0). Typical value = 0,3. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Lead/lag time constant (<i>T</i><i><sub>4</sub></i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant on signal #1 (<i>T</i><i><sub>6</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time constant on signal #2 (<i>T</i><i><sub>7</sub></i>) (&gt;= 0). Typical value = 2. Default: nullptr */ + CIMPP::Seconds t7; + + /** \brief Lead of ramp tracking filter (<i>T</i><i><sub>8</sub></i>) (&gt;= 0). Typical value = 0,2. Default: nullptr */ + CIMPP::Seconds t8; + + /** \brief Lag of ramp tracking filter (<i>T</i><i><sub>9</sub></i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds t9; + + /** \brief Lead constant (<i>T</i><i><sub>a</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Lag time constant (<i>T</i><i><sub>b</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief First washout on signal #1 (<i>T</i><i><sub>w1</sub></i>) (&gt;= 0). Typical value = 2. Default: nullptr */ + CIMPP::Seconds tw1; + + /** \brief Second washout on signal #1 (<i>T</i><i><sub>w2</sub></i>) (&gt;= 0). Typical value = 2. Default: nullptr */ + CIMPP::Seconds tw2; + + /** \brief First washout on signal #2 (<i>T</i><i><sub>w3</sub></i>) (&gt;= 0). Typical value = 2. Default: nullptr */ + CIMPP::Seconds tw3; + + /** \brief Second washout on signal #2 (<i>T</i><i><sub>w4</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tw4; + + /** \brief Input signal #1 maximum limit (<i>Vsi1max</i>) (&gt; Pss2B.vsi1min). Typical value = 2. Default: nullptr */ + CIMPP::PU vsi1max; + + /** \brief Input signal #1 minimum limit (<i>Vsi1min</i>) (&lt; Pss2B.vsi1max). Typical value = -2. Default: nullptr */ + CIMPP::PU vsi1min; + + /** \brief Input signal #2 maximum limit (<i>Vsi2max</i>) (&gt; Pss2B.vsi2min). Typical value = 2. Default: nullptr */ + CIMPP::PU vsi2max; + + /** \brief Input signal #2 minimum limit (<i>Vsi2min</i>) (&lt; Pss2B.vsi2max). Typical value = -2. Default: nullptr */ + CIMPP::PU vsi2min; + + /** \brief Stabilizer output maximum limit (<i>Vstmax</i>) (&gt; Pss2B.vstmin). Typical value = 0,1. Default: nullptr */ + CIMPP::PU vstmax; + + /** \brief Stabilizer output minimum limit (<i>Vstmin</i>) (&lt; Pss2B.vstmax). Typical value = -0,1. Default: nullptr */ + CIMPP::PU vstmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Pss2ST.cpp b/CGMES_3.0.0/Pss2ST.cpp index d66a34602..9a42e067c 100644 --- a/CGMES_3.0.0/Pss2ST.cpp +++ b/CGMES_3.0.0/Pss2ST.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "InputSignalKind.hpp" -#include "InputSignalKind.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -Pss2ST::Pss2ST() {}; -Pss2ST::~Pss2ST() {}; +Pss2ST::Pss2ST() {} +Pss2ST::~Pss2ST() {} static const std::list PossibleProfilesForClass = { @@ -74,246 +56,292 @@ Pss2ST::getPossibleProfilesForAttributes() const return map; } - -bool assign_Pss2ST_inputSignal1Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_inputSignal1Type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal1Type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_inputSignal2Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_inputSignal2Type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal2Type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_lsmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_lsmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lsmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_lsmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_lsmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lsmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_t9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_t9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_vcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_vcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vcl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss2ST_vcu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss2ST_vcu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vcu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } +bool get_Pss2ST_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignal1Type; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} +bool get_Pss2ST_inputSignal2Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignal2Type; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} bool get_Pss2ST_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -327,7 +355,8 @@ bool get_Pss2ST_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -341,7 +370,8 @@ bool get_Pss2ST_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_lsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lsmax; if (!buffer.str().empty()) @@ -355,7 +385,8 @@ bool get_Pss2ST_lsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_Pss2ST_lsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lsmin; if (!buffer.str().empty()) @@ -369,7 +400,8 @@ bool get_Pss2ST_lsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_Pss2ST_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -383,7 +415,8 @@ bool get_Pss2ST_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t10; if (!buffer.str().empty()) @@ -397,7 +430,8 @@ bool get_Pss2ST_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -411,7 +445,8 @@ bool get_Pss2ST_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -425,7 +460,8 @@ bool get_Pss2ST_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -439,7 +475,8 @@ bool get_Pss2ST_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -453,7 +490,8 @@ bool get_Pss2ST_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -467,7 +505,8 @@ bool get_Pss2ST_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t7; if (!buffer.str().empty()) @@ -481,7 +520,8 @@ bool get_Pss2ST_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t8; if (!buffer.str().empty()) @@ -495,7 +535,8 @@ bool get_Pss2ST_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t9; if (!buffer.str().empty()) @@ -509,7 +550,8 @@ bool get_Pss2ST_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_vcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vcl; if (!buffer.str().empty()) @@ -523,7 +565,8 @@ bool get_Pss2ST_vcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss2ST_vcu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) + const Pss2ST* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vcu; if (!buffer.str().empty()) @@ -535,36 +578,6 @@ bool get_Pss2ST_vcu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - -bool get_Pss2ST_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignal1Type; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - -bool get_Pss2ST_inputSignal2Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const Pss2ST* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignal2Type; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char Pss2ST::debugName[] = "Pss2ST"; const char* Pss2ST::debugString() const { @@ -573,29 +586,29 @@ const char* Pss2ST::debugString() const void Pss2ST::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Pss2ST"), &Pss2ST_factory)); + factory_map.emplace("cim:Pss2ST", &Pss2ST_factory); } void Pss2ST::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.inputSignal1Type"), &assign_Pss2ST_inputSignal1Type)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.inputSignal2Type"), &assign_Pss2ST_inputSignal2Type)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.k1"), &assign_Pss2ST_k1)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.k2"), &assign_Pss2ST_k2)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.lsmax"), &assign_Pss2ST_lsmax)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.lsmin"), &assign_Pss2ST_lsmin)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t1"), &assign_Pss2ST_t1)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t10"), &assign_Pss2ST_t10)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t2"), &assign_Pss2ST_t2)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t3"), &assign_Pss2ST_t3)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t4"), &assign_Pss2ST_t4)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t5"), &assign_Pss2ST_t5)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t6"), &assign_Pss2ST_t6)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t7"), &assign_Pss2ST_t7)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t8"), &assign_Pss2ST_t8)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.t9"), &assign_Pss2ST_t9)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.vcl"), &assign_Pss2ST_vcl)); - assign_map.insert(std::make_pair(std::string("cim:Pss2ST.vcu"), &assign_Pss2ST_vcu)); + assign_map.emplace("cim:Pss2ST.inputSignal1Type", &assign_Pss2ST_inputSignal1Type); + assign_map.emplace("cim:Pss2ST.inputSignal2Type", &assign_Pss2ST_inputSignal2Type); + assign_map.emplace("cim:Pss2ST.k1", &assign_Pss2ST_k1); + assign_map.emplace("cim:Pss2ST.k2", &assign_Pss2ST_k2); + assign_map.emplace("cim:Pss2ST.lsmax", &assign_Pss2ST_lsmax); + assign_map.emplace("cim:Pss2ST.lsmin", &assign_Pss2ST_lsmin); + assign_map.emplace("cim:Pss2ST.t1", &assign_Pss2ST_t1); + assign_map.emplace("cim:Pss2ST.t10", &assign_Pss2ST_t10); + assign_map.emplace("cim:Pss2ST.t2", &assign_Pss2ST_t2); + assign_map.emplace("cim:Pss2ST.t3", &assign_Pss2ST_t3); + assign_map.emplace("cim:Pss2ST.t4", &assign_Pss2ST_t4); + assign_map.emplace("cim:Pss2ST.t5", &assign_Pss2ST_t5); + assign_map.emplace("cim:Pss2ST.t6", &assign_Pss2ST_t6); + assign_map.emplace("cim:Pss2ST.t7", &assign_Pss2ST_t7); + assign_map.emplace("cim:Pss2ST.t8", &assign_Pss2ST_t8); + assign_map.emplace("cim:Pss2ST.t9", &assign_Pss2ST_t9); + assign_map.emplace("cim:Pss2ST.vcl", &assign_Pss2ST_vcl); + assign_map.emplace("cim:Pss2ST.vcu", &assign_Pss2ST_vcu); } void Pss2ST::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/Pss2ST.hpp b/CGMES_3.0.0/Pss2ST.hpp index 3c9b84ecc..ac9658852 100644 --- a/CGMES_3.0.0/Pss2ST.hpp +++ b/CGMES_3.0.0/Pss2ST.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - PTI microprocessor-based stabilizer type 1. - */ + /** \brief PTI microprocessor-based stabilizer type 1. */ class Pss2ST : public PowerSystemStabilizerDynamics { public: @@ -29,24 +27,59 @@ namespace CIMPP Pss2ST(); ~Pss2ST() override; - CIMPP::InputSignalKind inputSignal1Type; /* Type of input signal #1 (rotorAngularFrequencyDeviation, busFrequencyDeviation, generatorElectricalPower, generatorAcceleratingPower, busVoltage, or busVoltageDerivative - shall be different than Pss2ST.inputSignal2Type). Typical value = rotorAngularFrequencyDeviation. Default: 0 */ - CIMPP::InputSignalKind inputSignal2Type; /* Type of input signal #2 (rotorAngularFrequencyDeviation, busFrequencyDeviation, generatorElectricalPower, generatorAcceleratingPower, busVoltage, or busVoltageDerivative - shall be different than Pss2ST.inputSignal1Type). Typical value = busVoltageDerivative. Default: 0 */ - CIMPP::PU k1; /* Gain (<i>K</i><i><sub>1</sub></i>). Default: nullptr */ - CIMPP::PU k2; /* Gain (<i>K</i><i><sub>2</sub></i>). Default: nullptr */ - CIMPP::PU lsmax; /* Limiter (<i>L</i><i><sub>SMAX</sub></i>) (&gt; Pss2ST.lsmin). Default: nullptr */ - CIMPP::PU lsmin; /* Limiter (<i>L</i><i><sub>SMIN</sub></i>) (&lt; Pss2ST.lsmax). Default: nullptr */ - CIMPP::Seconds t1; /* Time constant (<i>T</i><i><sub>1</sub></i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds t10; /* Time constant (<i>T</i><i><sub>10</sub></i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds t2; /* Time constant (<i>T</i><i><sub>2</sub></i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds t3; /* Time constant (<i>T</i><i><sub>3</sub></i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds t4; /* Time constant (<i>T</i><i><sub>4</sub></i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds t5; /* Time constant (<i>T</i><i><sub>5</sub></i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds t6; /* Time constant (<i>T</i><i><sub>6</sub></i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds t7; /* Time constant (<i>T</i><i><sub>7</sub></i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds t8; /* Time constant (<i>T</i><i><sub>8</sub></i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds t9; /* Time constant (<i>T</i><i><sub>9</sub></i>) (&gt;= 0). Default: nullptr */ - CIMPP::PU vcl; /* Cutoff limiter (<i>V</i><i><sub>CL</sub></i>). Default: nullptr */ - CIMPP::PU vcu; /* Cutoff limiter (<i>V</i><i><sub>CU</sub></i>). Default: nullptr */ + /** \brief Type of input signal #1 (rotorAngularFrequencyDeviation, busFrequencyDeviation, generatorElectricalPower, generatorAcceleratingPower, busVoltage, or busVoltageDerivative - shall be different than Pss2ST.inputSignal2Type). Typical value = rotorAngularFrequencyDeviation. Default: 0 */ + CIMPP::InputSignalKind inputSignal1Type; + + /** \brief Type of input signal #2 (rotorAngularFrequencyDeviation, busFrequencyDeviation, generatorElectricalPower, generatorAcceleratingPower, busVoltage, or busVoltageDerivative - shall be different than Pss2ST.inputSignal1Type). Typical value = busVoltageDerivative. Default: 0 */ + CIMPP::InputSignalKind inputSignal2Type; + + /** \brief Gain (<i>K</i><i><sub>1</sub></i>). Default: nullptr */ + CIMPP::PU k1; + + /** \brief Gain (<i>K</i><i><sub>2</sub></i>). Default: nullptr */ + CIMPP::PU k2; + + /** \brief Limiter (<i>L</i><i><sub>SMAX</sub></i>) (&gt; Pss2ST.lsmin). Default: nullptr */ + CIMPP::PU lsmax; + + /** \brief Limiter (<i>L</i><i><sub>SMIN</sub></i>) (&lt; Pss2ST.lsmax). Default: nullptr */ + CIMPP::PU lsmin; + + /** \brief Time constant (<i>T</i><i><sub>1</sub></i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Time constant (<i>T</i><i><sub>10</sub></i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t10; + + /** \brief Time constant (<i>T</i><i><sub>2</sub></i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Time constant (<i>T</i><i><sub>3</sub></i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Time constant (<i>T</i><i><sub>4</sub></i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant (<i>T</i><i><sub>5</sub></i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Time constant (<i>T</i><i><sub>6</sub></i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time constant (<i>T</i><i><sub>7</sub></i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t7; + + /** \brief Time constant (<i>T</i><i><sub>8</sub></i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t8; + + /** \brief Time constant (<i>T</i><i><sub>9</sub></i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t9; + + /** \brief Cutoff limiter (<i>V</i><i><sub>CL</sub></i>). Default: nullptr */ + CIMPP::PU vcl; + + /** \brief Cutoff limiter (<i>V</i><i><sub>CU</sub></i>). Default: nullptr */ + CIMPP::PU vcu; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Pss5.cpp b/CGMES_3.0.0/Pss5.cpp index ef5c9baef..32b9336ef 100644 --- a/CGMES_3.0.0/Pss5.cpp +++ b/CGMES_3.0.0/Pss5.cpp @@ -8,28 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -Pss5::Pss5() {}; -Pss5::~Pss5() {}; +Pss5::Pss5() {} +Pss5::~Pss5() {} static const std::list PossibleProfilesForClass = { @@ -72,233 +55,248 @@ Pss5::getPossibleProfilesForAttributes() const return map; } - -bool assign_Pss5_ctw2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_ctw2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ctw2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_deadband(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_deadband(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->deadband; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_isfreq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_isfreq(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->isfreq; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_kf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_kf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_kpe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_kpe(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpe; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_kpss(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_kpss(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpss; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_tl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_tl1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_tl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_tl2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_tl3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_tl3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_tl4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_tl4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_tpe(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_tpe(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpe; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_tw1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_tw1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_tw2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_tw2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_vadat(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_vadat(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vadat; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_vsmn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_vsmn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmn; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Pss5_vsmx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Pss5_vsmx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Pss5* element = dynamic_cast(BaseClass_ptr1)) + Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_Pss5_ctw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ctw2; if (!buffer.str().empty()) @@ -312,7 +310,8 @@ bool get_Pss5_ctw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_deadband(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->deadband; if (!buffer.str().empty()) @@ -326,7 +325,8 @@ bool get_Pss5_deadband(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_Pss5_isfreq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->isfreq; if (!buffer.str().empty()) @@ -340,7 +340,8 @@ bool get_Pss5_isfreq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf; if (!buffer.str().empty()) @@ -354,7 +355,8 @@ bool get_Pss5_kf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_kpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpe; if (!buffer.str().empty()) @@ -368,7 +370,8 @@ bool get_Pss5_kpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_kpss(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpss; if (!buffer.str().empty()) @@ -382,7 +385,8 @@ bool get_Pss5_kpss(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -396,7 +400,8 @@ bool get_Pss5_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_tl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl1; if (!buffer.str().empty()) @@ -410,7 +415,8 @@ bool get_Pss5_tl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_tl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl2; if (!buffer.str().empty()) @@ -424,7 +430,8 @@ bool get_Pss5_tl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_tl3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl3; if (!buffer.str().empty()) @@ -438,7 +445,8 @@ bool get_Pss5_tl3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_tl4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl4; if (!buffer.str().empty()) @@ -452,7 +460,8 @@ bool get_Pss5_tl4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_tpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpe; if (!buffer.str().empty()) @@ -466,7 +475,8 @@ bool get_Pss5_tpe(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_tw1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw1; if (!buffer.str().empty()) @@ -480,7 +490,8 @@ bool get_Pss5_tw1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_tw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw2; if (!buffer.str().empty()) @@ -494,7 +505,8 @@ bool get_Pss5_tw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_vadat(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vadat; if (!buffer.str().empty()) @@ -508,7 +520,8 @@ bool get_Pss5_vadat(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_vsmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmn; if (!buffer.str().empty()) @@ -522,7 +535,8 @@ bool get_Pss5_vsmn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Pss5_vsmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Pss5* element = dynamic_cast(BaseClass_ptr1)) + const Pss5* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmx; if (!buffer.str().empty()) @@ -534,8 +548,6 @@ bool get_Pss5_vsmx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char Pss5::debugName[] = "Pss5"; const char* Pss5::debugString() const { @@ -544,28 +556,28 @@ const char* Pss5::debugString() const void Pss5::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Pss5"), &Pss5_factory)); + factory_map.emplace("cim:Pss5", &Pss5_factory); } void Pss5::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Pss5.ctw2"), &assign_Pss5_ctw2)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.deadband"), &assign_Pss5_deadband)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.isfreq"), &assign_Pss5_isfreq)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.kf"), &assign_Pss5_kf)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.kpe"), &assign_Pss5_kpe)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.kpss"), &assign_Pss5_kpss)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.pmin"), &assign_Pss5_pmin)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.tl1"), &assign_Pss5_tl1)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.tl2"), &assign_Pss5_tl2)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.tl3"), &assign_Pss5_tl3)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.tl4"), &assign_Pss5_tl4)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.tpe"), &assign_Pss5_tpe)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.tw1"), &assign_Pss5_tw1)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.tw2"), &assign_Pss5_tw2)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.vadat"), &assign_Pss5_vadat)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.vsmn"), &assign_Pss5_vsmn)); - assign_map.insert(std::make_pair(std::string("cim:Pss5.vsmx"), &assign_Pss5_vsmx)); + assign_map.emplace("cim:Pss5.ctw2", &assign_Pss5_ctw2); + assign_map.emplace("cim:Pss5.deadband", &assign_Pss5_deadband); + assign_map.emplace("cim:Pss5.isfreq", &assign_Pss5_isfreq); + assign_map.emplace("cim:Pss5.kf", &assign_Pss5_kf); + assign_map.emplace("cim:Pss5.kpe", &assign_Pss5_kpe); + assign_map.emplace("cim:Pss5.kpss", &assign_Pss5_kpss); + assign_map.emplace("cim:Pss5.pmin", &assign_Pss5_pmin); + assign_map.emplace("cim:Pss5.tl1", &assign_Pss5_tl1); + assign_map.emplace("cim:Pss5.tl2", &assign_Pss5_tl2); + assign_map.emplace("cim:Pss5.tl3", &assign_Pss5_tl3); + assign_map.emplace("cim:Pss5.tl4", &assign_Pss5_tl4); + assign_map.emplace("cim:Pss5.tpe", &assign_Pss5_tpe); + assign_map.emplace("cim:Pss5.tw1", &assign_Pss5_tw1); + assign_map.emplace("cim:Pss5.tw2", &assign_Pss5_tw2); + assign_map.emplace("cim:Pss5.vadat", &assign_Pss5_vadat); + assign_map.emplace("cim:Pss5.vsmn", &assign_Pss5_vsmn); + assign_map.emplace("cim:Pss5.vsmx", &assign_Pss5_vsmx); } void Pss5::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/Pss5.hpp b/CGMES_3.0.0/Pss5.hpp index 55edfc7fc..1018a9eb8 100644 --- a/CGMES_3.0.0/Pss5.hpp +++ b/CGMES_3.0.0/Pss5.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Detailed Italian PSS. - */ + /** \brief Detailed Italian PSS. */ class Pss5 : public PowerSystemStabilizerDynamics { public: @@ -30,23 +28,56 @@ namespace CIMPP Pss5(); ~Pss5() override; - CIMPP::Boolean ctw2; /* Selector for second washout enabling (<i>C</i><i><sub>TW2</sub></i>). true = second washout filter is bypassed false = second washout filter in use. Typical value = true. Default: false */ - CIMPP::PU deadband; /* Stabilizer output deadband (<i>DEADBAND</i>). Typical value = 0. Default: nullptr */ - CIMPP::Boolean isfreq; /* Selector for frequency/shaft speed input (<i>isFreq</i>). true = speed (same meaning as InputSignaKind.rotorSpeed) false = frequency (same meaning as InputSignalKind.busFrequency). Typical value = true (same meaning as InputSignalKind.rotorSpeed). Default: false */ - CIMPP::Float kf; /* Frequency/shaft speed input gain (<i>K</i><i><sub>F</sub></i>). Typical value = 5. Default: 0.0 */ - CIMPP::Float kpe; /* Electric power input gain (<i>K</i><i><sub>PE</sub></i>). Typical value = 0,3. Default: 0.0 */ - CIMPP::Float kpss; /* PSS gain (<i>K</i><i><sub>PSS</sub></i>). Typical value = 1. Default: 0.0 */ - CIMPP::PU pmin; /* Minimum power PSS enabling (<i>Pmin</i>). Typical value = 0,25. Default: nullptr */ - CIMPP::Seconds tl1; /* Lead/lag time constant (<i>T</i><i><sub>L1</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tl2; /* Lead/lag time constant (<i>T</i><i><sub>L2</sub></i>) (&gt;= 0). If = 0, both blocks are bypassed. Typical value = 0. Default: nullptr */ - CIMPP::Seconds tl3; /* Lead/lag time constant (<i>T</i><i><sub>L3</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tl4; /* Lead/lag time constant (T<sub>L4</sub>) (&gt;= 0). If = 0, both blocks are bypassed. Typical value = 0. Default: nullptr */ - CIMPP::Seconds tpe; /* Electric power filter time constant (<i>T</i><i><sub>PE</sub></i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ - CIMPP::Seconds tw1; /* First washout (<i>T</i><i><sub>W1</sub></i>) (&gt;= 0). Typical value = 3,5. Default: nullptr */ - CIMPP::Seconds tw2; /* Second washout (<i>T</i><i><sub>W2</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Boolean vadat; /* <font color=`#0f0f0f`>Signal selector (<i>V</i><i><sub>adAtt</sub></i>).</font> <font color=`#0f0f0f`>true = closed (generator power is greater than <i>Pmin</i>)</font> <font color=`#0f0f0f`>false = open (<i>Pe</i> is smaller than <i>Pmin</i>).</font> <font color=`#0f0f0f`>Typical value = true.</font> Default: false */ - CIMPP::PU vsmn; /* Stabilizer output maximum limit (<i>V</i><i><sub>SMN</sub></i>). Typical value = -0,1. Default: nullptr */ - CIMPP::PU vsmx; /* Stabilizer output minimum limit (<i>V</i><i><sub>SMX</sub></i>). Typical value = 0,1. Default: nullptr */ + /** \brief Selector for second washout enabling (<i>C</i><i><sub>TW2</sub></i>). true = second washout filter is bypassed false = second washout filter in use. Typical value = true. Default: false */ + CIMPP::Boolean ctw2; + + /** \brief Stabilizer output deadband (<i>DEADBAND</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU deadband; + + /** \brief Selector for frequency/shaft speed input (<i>isFreq</i>). true = speed (same meaning as InputSignaKind.rotorSpeed) false = frequency (same meaning as InputSignalKind.busFrequency). Typical value = true (same meaning as InputSignalKind.rotorSpeed). Default: false */ + CIMPP::Boolean isfreq; + + /** \brief Frequency/shaft speed input gain (<i>K</i><i><sub>F</sub></i>). Typical value = 5. Default: 0.0 */ + CIMPP::Float kf; + + /** \brief Electric power input gain (<i>K</i><i><sub>PE</sub></i>). Typical value = 0,3. Default: 0.0 */ + CIMPP::Float kpe; + + /** \brief PSS gain (<i>K</i><i><sub>PSS</sub></i>). Typical value = 1. Default: 0.0 */ + CIMPP::Float kpss; + + /** \brief Minimum power PSS enabling (<i>Pmin</i>). Typical value = 0,25. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Lead/lag time constant (<i>T</i><i><sub>L1</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tl1; + + /** \brief Lead/lag time constant (<i>T</i><i><sub>L2</sub></i>) (&gt;= 0). If = 0, both blocks are bypassed. Typical value = 0. Default: nullptr */ + CIMPP::Seconds tl2; + + /** \brief Lead/lag time constant (<i>T</i><i><sub>L3</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tl3; + + /** \brief Lead/lag time constant (T<sub>L4</sub>) (&gt;= 0). If = 0, both blocks are bypassed. Typical value = 0. Default: nullptr */ + CIMPP::Seconds tl4; + + /** \brief Electric power filter time constant (<i>T</i><i><sub>PE</sub></i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ + CIMPP::Seconds tpe; + + /** \brief First washout (<i>T</i><i><sub>W1</sub></i>) (&gt;= 0). Typical value = 3,5. Default: nullptr */ + CIMPP::Seconds tw1; + + /** \brief Second washout (<i>T</i><i><sub>W2</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tw2; + + /** \brief <font color=`#0f0f0f`>Signal selector (<i>V</i><i><sub>adAtt</sub></i>).</font> <font color=`#0f0f0f`>true = closed (generator power is greater than <i>Pmin</i>)</font> <font color=`#0f0f0f`>false = open (<i>Pe</i> is smaller than <i>Pmin</i>).</font> <font color=`#0f0f0f`>Typical value = true.</font> Default: false */ + CIMPP::Boolean vadat; + + /** \brief Stabilizer output maximum limit (<i>V</i><i><sub>SMN</sub></i>). Typical value = -0,1. Default: nullptr */ + CIMPP::PU vsmn; + + /** \brief Stabilizer output minimum limit (<i>V</i><i><sub>SMX</sub></i>). Typical value = 0,1. Default: nullptr */ + CIMPP::PU vsmx; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PssELIN2.cpp b/CGMES_3.0.0/PssELIN2.cpp index d7e853587..394cf185f 100644 --- a/CGMES_3.0.0/PssELIN2.cpp +++ b/CGMES_3.0.0/PssELIN2.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -PssELIN2::PssELIN2() {}; -PssELIN2::~PssELIN2() {}; +PssELIN2::PssELIN2() {} +PssELIN2::~PssELIN2() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ PssELIN2::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssELIN2_apss(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_apss(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->apss; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_ks1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_ks1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_ks2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_ks2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_ppss(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_ppss(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ppss; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_psslim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_psslim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->psslim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_ts1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_ts1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_ts2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_ts2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_ts3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_ts3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_ts4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_ts4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_ts5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_ts5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssELIN2_ts6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssELIN2_ts6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ts6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssELIN2_apss(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->apss; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_PssELIN2_apss(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssELIN2_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks1; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_PssELIN2_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssELIN2_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks2; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_PssELIN2_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssELIN2_ppss(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ppss; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_PssELIN2_ppss(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssELIN2_psslim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->psslim; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_PssELIN2_psslim(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_PssELIN2_ts1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts1; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_PssELIN2_ts1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssELIN2_ts2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts2; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_PssELIN2_ts2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssELIN2_ts3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts3; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_PssELIN2_ts3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssELIN2_ts4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts4; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_PssELIN2_ts4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssELIN2_ts5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts5; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_PssELIN2_ts5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssELIN2_ts6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssELIN2* element = dynamic_cast(BaseClass_ptr1)) + const PssELIN2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ts6; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_PssELIN2_ts6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char PssELIN2::debugName[] = "PssELIN2"; const char* PssELIN2::debugString() const { @@ -370,22 +376,22 @@ const char* PssELIN2::debugString() const void PssELIN2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssELIN2"), &PssELIN2_factory)); + factory_map.emplace("cim:PssELIN2", &PssELIN2_factory); } void PssELIN2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.apss"), &assign_PssELIN2_apss)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.ks1"), &assign_PssELIN2_ks1)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.ks2"), &assign_PssELIN2_ks2)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.ppss"), &assign_PssELIN2_ppss)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.psslim"), &assign_PssELIN2_psslim)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.ts1"), &assign_PssELIN2_ts1)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.ts2"), &assign_PssELIN2_ts2)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.ts3"), &assign_PssELIN2_ts3)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.ts4"), &assign_PssELIN2_ts4)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.ts5"), &assign_PssELIN2_ts5)); - assign_map.insert(std::make_pair(std::string("cim:PssELIN2.ts6"), &assign_PssELIN2_ts6)); + assign_map.emplace("cim:PssELIN2.apss", &assign_PssELIN2_apss); + assign_map.emplace("cim:PssELIN2.ks1", &assign_PssELIN2_ks1); + assign_map.emplace("cim:PssELIN2.ks2", &assign_PssELIN2_ks2); + assign_map.emplace("cim:PssELIN2.ppss", &assign_PssELIN2_ppss); + assign_map.emplace("cim:PssELIN2.psslim", &assign_PssELIN2_psslim); + assign_map.emplace("cim:PssELIN2.ts1", &assign_PssELIN2_ts1); + assign_map.emplace("cim:PssELIN2.ts2", &assign_PssELIN2_ts2); + assign_map.emplace("cim:PssELIN2.ts3", &assign_PssELIN2_ts3); + assign_map.emplace("cim:PssELIN2.ts4", &assign_PssELIN2_ts4); + assign_map.emplace("cim:PssELIN2.ts5", &assign_PssELIN2_ts5); + assign_map.emplace("cim:PssELIN2.ts6", &assign_PssELIN2_ts6); } void PssELIN2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/PssELIN2.hpp b/CGMES_3.0.0/PssELIN2.hpp index f59866988..cbba1806e 100644 --- a/CGMES_3.0.0/PssELIN2.hpp +++ b/CGMES_3.0.0/PssELIN2.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Power system stabilizer typically associated with ExcELIN2 (though PssIEEE2B or Pss2B can also be used). - */ + /** \brief Power system stabilizer typically associated with ExcELIN2 (though PssIEEE2B or Pss2B can also be used). */ class PssELIN2 : public PowerSystemStabilizerDynamics { public: @@ -28,17 +26,38 @@ namespace CIMPP PssELIN2(); ~PssELIN2() override; - CIMPP::PU apss; /* Coefficient (<i>a_PSS</i>). Typical value = 0,1. Default: nullptr */ - CIMPP::PU ks1; /* Gain (<i>Ks1</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU ks2; /* Gain (<i>Ks2</i>). Typical value = 0,1. Default: nullptr */ - CIMPP::PU ppss; /* Coefficient (<i>p_PSS</i>) (&gt;= 0 and &lt;= 4). Typical value = 0,1. Default: nullptr */ - CIMPP::PU psslim; /* PSS limiter (<i>psslim</i>). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds ts1; /* Time constant (<i>Ts1</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds ts2; /* Time constant (<i>Ts2</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::Seconds ts3; /* Time constant (<i>Ts3</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::Seconds ts4; /* Time constant (<i>Ts4</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds ts5; /* Time constant (<i>Ts5</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds ts6; /* Time constant (<i>Ts6</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + /** \brief Coefficient (<i>a_PSS</i>). Typical value = 0,1. Default: nullptr */ + CIMPP::PU apss; + + /** \brief Gain (<i>Ks1</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU ks1; + + /** \brief Gain (<i>Ks2</i>). Typical value = 0,1. Default: nullptr */ + CIMPP::PU ks2; + + /** \brief Coefficient (<i>p_PSS</i>) (&gt;= 0 and &lt;= 4). Typical value = 0,1. Default: nullptr */ + CIMPP::PU ppss; + + /** \brief PSS limiter (<i>psslim</i>). Typical value = 0,1. Default: nullptr */ + CIMPP::PU psslim; + + /** \brief Time constant (<i>Ts1</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds ts1; + + /** \brief Time constant (<i>Ts2</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds ts2; + + /** \brief Time constant (<i>Ts3</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds ts3; + + /** \brief Time constant (<i>Ts4</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds ts4; + + /** \brief Time constant (<i>Ts5</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds ts5; + + /** \brief Time constant (<i>Ts6</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds ts6; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PssIEEE1A.cpp b/CGMES_3.0.0/PssIEEE1A.cpp index c6de783ee..7387ba08e 100644 --- a/CGMES_3.0.0/PssIEEE1A.cpp +++ b/CGMES_3.0.0/PssIEEE1A.cpp @@ -8,23 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "InputSignalKind.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PssIEEE1A::PssIEEE1A() {}; -PssIEEE1A::~PssIEEE1A() {}; +PssIEEE1A::PssIEEE1A() {} +PssIEEE1A::~PssIEEE1A() {} static const std::list PossibleProfilesForClass = { @@ -62,168 +50,178 @@ PssIEEE1A::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssIEEE1A_a1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_a1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_a2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_a2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_inputSignalType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_inputSignalType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignalType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_vrmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_vrmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE1A_vrmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE1A_vrmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vrmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssIEEE1A_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a1; if (!buffer.str().empty()) @@ -237,7 +235,8 @@ bool get_PssIEEE1A_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE1A_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a2; if (!buffer.str().empty()) @@ -249,9 +248,25 @@ bool get_PssIEEE1A_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } +bool get_PssIEEE1A_inputSignalType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignalType; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_PssIEEE1A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -265,7 +280,8 @@ bool get_PssIEEE1A_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE1A_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -279,7 +295,8 @@ bool get_PssIEEE1A_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE1A_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -293,7 +310,8 @@ bool get_PssIEEE1A_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE1A_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -307,7 +325,8 @@ bool get_PssIEEE1A_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE1A_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -321,7 +340,8 @@ bool get_PssIEEE1A_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE1A_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -335,7 +355,8 @@ bool get_PssIEEE1A_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE1A_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -349,7 +370,8 @@ bool get_PssIEEE1A_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmax; if (!buffer.str().empty()) @@ -363,7 +385,8 @@ bool get_PssIEEE1A_vrmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_PssIEEE1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vrmin; if (!buffer.str().empty()) @@ -375,22 +398,6 @@ bool get_PssIEEE1A_vrmin(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } - - -bool get_PssIEEE1A_inputSignalType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const PssIEEE1A* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignalType; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char PssIEEE1A::debugName[] = "PssIEEE1A"; const char* PssIEEE1A::debugString() const { @@ -399,23 +406,23 @@ const char* PssIEEE1A::debugString() const void PssIEEE1A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssIEEE1A"), &PssIEEE1A_factory)); + factory_map.emplace("cim:PssIEEE1A", &PssIEEE1A_factory); } void PssIEEE1A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.a1"), &assign_PssIEEE1A_a1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.a2"), &assign_PssIEEE1A_a2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.inputSignalType"), &assign_PssIEEE1A_inputSignalType)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.ks"), &assign_PssIEEE1A_ks)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.t1"), &assign_PssIEEE1A_t1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.t2"), &assign_PssIEEE1A_t2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.t3"), &assign_PssIEEE1A_t3)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.t4"), &assign_PssIEEE1A_t4)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.t5"), &assign_PssIEEE1A_t5)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.t6"), &assign_PssIEEE1A_t6)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.vrmax"), &assign_PssIEEE1A_vrmax)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE1A.vrmin"), &assign_PssIEEE1A_vrmin)); + assign_map.emplace("cim:PssIEEE1A.a1", &assign_PssIEEE1A_a1); + assign_map.emplace("cim:PssIEEE1A.a2", &assign_PssIEEE1A_a2); + assign_map.emplace("cim:PssIEEE1A.inputSignalType", &assign_PssIEEE1A_inputSignalType); + assign_map.emplace("cim:PssIEEE1A.ks", &assign_PssIEEE1A_ks); + assign_map.emplace("cim:PssIEEE1A.t1", &assign_PssIEEE1A_t1); + assign_map.emplace("cim:PssIEEE1A.t2", &assign_PssIEEE1A_t2); + assign_map.emplace("cim:PssIEEE1A.t3", &assign_PssIEEE1A_t3); + assign_map.emplace("cim:PssIEEE1A.t4", &assign_PssIEEE1A_t4); + assign_map.emplace("cim:PssIEEE1A.t5", &assign_PssIEEE1A_t5); + assign_map.emplace("cim:PssIEEE1A.t6", &assign_PssIEEE1A_t6); + assign_map.emplace("cim:PssIEEE1A.vrmax", &assign_PssIEEE1A_vrmax); + assign_map.emplace("cim:PssIEEE1A.vrmin", &assign_PssIEEE1A_vrmin); } void PssIEEE1A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/PssIEEE1A.hpp b/CGMES_3.0.0/PssIEEE1A.hpp index f8ae62201..9313e89f5 100644 --- a/CGMES_3.0.0/PssIEEE1A.hpp +++ b/CGMES_3.0.0/PssIEEE1A.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE 421.5-2005 type PSS1A power system stabilizer model. PSS1A is the generalized form of a PSS with a single input signal. Reference: IEEE 1A 421.5-2005, 8.1. - */ + /** \brief IEEE 421.5-2005 type PSS1A power system stabilizer model. PSS1A is the generalized form of a PSS with a single input signal. Reference: IEEE 1A 421.5-2005, 8.1. */ class PssIEEE1A : public PowerSystemStabilizerDynamics { public: @@ -29,18 +27,41 @@ namespace CIMPP PssIEEE1A(); ~PssIEEE1A() override; - CIMPP::PU a1; /* PSS signal conditioning frequency filter constant (<i>A1</i>). Typical value = 0,061. Default: nullptr */ - CIMPP::PU a2; /* PSS signal conditioning frequency filter constant (<i>A2</i>). Typical value = 0,0017. Default: nullptr */ - CIMPP::InputSignalKind inputSignalType; /* Type of input signal (rotorAngularFrequencyDeviation, generatorElectricalPower, or busFrequencyDeviation). Typical value = rotorAngularFrequencyDeviation. Default: 0 */ - CIMPP::PU ks; /* Stabilizer gain (<i>Ks</i>). Typical value = 5. Default: nullptr */ - CIMPP::Seconds t1; /* Lead/lag time constant (<i>T1</i>) (&gt;= 0). Typical value = 0,3. Default: nullptr */ - CIMPP::Seconds t2; /* Lead/lag time constant (<i>T2</i>) (&gt;= 0). Typical value = 0,03. Default: nullptr */ - CIMPP::Seconds t3; /* Lead/lag time constant (<i>T3</i>) (&gt;= 0). Typical value = 0,3. Default: nullptr */ - CIMPP::Seconds t4; /* Lead/lag time constant (<i>T4</i>) (&gt;= 0). Typical value = 0,03. Default: nullptr */ - CIMPP::Seconds t5; /* Washout time constant (<i>T5</i>) (&gt;= 0). Typical value = 10. Default: nullptr */ - CIMPP::Seconds t6; /* Transducer time constant (<i>T6</i>) (&gt;= 0). Typical value = 0,01. Default: nullptr */ - CIMPP::PU vrmax; /* Maximum stabilizer output (<i>Vrmax</i>) (&gt; PssIEEE1A.vrmin). Typical value = 0,05. Default: nullptr */ - CIMPP::PU vrmin; /* Minimum stabilizer output (<i>Vrmin</i>) (&lt; PssIEEE1A.vrmax). Typical value = -0,05. Default: nullptr */ + /** \brief PSS signal conditioning frequency filter constant (<i>A1</i>). Typical value = 0,061. Default: nullptr */ + CIMPP::PU a1; + + /** \brief PSS signal conditioning frequency filter constant (<i>A2</i>). Typical value = 0,0017. Default: nullptr */ + CIMPP::PU a2; + + /** \brief Type of input signal (rotorAngularFrequencyDeviation, generatorElectricalPower, or busFrequencyDeviation). Typical value = rotorAngularFrequencyDeviation. Default: 0 */ + CIMPP::InputSignalKind inputSignalType; + + /** \brief Stabilizer gain (<i>Ks</i>). Typical value = 5. Default: nullptr */ + CIMPP::PU ks; + + /** \brief Lead/lag time constant (<i>T1</i>) (&gt;= 0). Typical value = 0,3. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Lead/lag time constant (<i>T2</i>) (&gt;= 0). Typical value = 0,03. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Lead/lag time constant (<i>T3</i>) (&gt;= 0). Typical value = 0,3. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Lead/lag time constant (<i>T4</i>) (&gt;= 0). Typical value = 0,03. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Washout time constant (<i>T5</i>) (&gt;= 0). Typical value = 10. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Transducer time constant (<i>T6</i>) (&gt;= 0). Typical value = 0,01. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Maximum stabilizer output (<i>Vrmax</i>) (&gt; PssIEEE1A.vrmin). Typical value = 0,05. Default: nullptr */ + CIMPP::PU vrmax; + + /** \brief Minimum stabilizer output (<i>Vrmin</i>) (&lt; PssIEEE1A.vrmax). Typical value = -0,05. Default: nullptr */ + CIMPP::PU vrmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PssIEEE2B.cpp b/CGMES_3.0.0/PssIEEE2B.cpp index 39ac7e801..7b46362be 100644 --- a/CGMES_3.0.0/PssIEEE2B.cpp +++ b/CGMES_3.0.0/PssIEEE2B.cpp @@ -8,38 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "InputSignalKind.hpp" -#include "InputSignalKind.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Integer.hpp" -#include "Integer.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PssIEEE2B::PssIEEE2B() {}; -PssIEEE2B::~PssIEEE2B() {}; +PssIEEE2B::PssIEEE2B() {} +PssIEEE2B::~PssIEEE2B() {} static const std::list PossibleProfilesForClass = { @@ -92,363 +65,418 @@ PssIEEE2B::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssIEEE2B_inputSignal1Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_inputSignal1Type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal1Type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_inputSignal2Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_inputSignal2Type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal2Type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_ks1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_ks1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_ks2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_ks2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_ks3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_ks3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_m(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_m(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->m; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_n(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_n(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->n; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t11(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t11; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_t9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_t9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_tw1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_tw1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_tw2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_tw2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_tw3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_tw3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_tw4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_tw4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_vsi1max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_vsi1max(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsi1max; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_vsi1min(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_vsi1min(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsi1min; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_vsi2max(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_vsi2max(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsi2max; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_vsi2min(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_vsi2min(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsi2min; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_vstmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_vstmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vstmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE2B_vstmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE2B_vstmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vstmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } +bool get_PssIEEE2B_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignal1Type; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} +bool get_PssIEEE2B_inputSignal2Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignal2Type; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} bool get_PssIEEE2B_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks1; if (!buffer.str().empty()) @@ -462,7 +490,8 @@ bool get_PssIEEE2B_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE2B_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks2; if (!buffer.str().empty()) @@ -476,7 +505,8 @@ bool get_PssIEEE2B_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE2B_ks3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks3; if (!buffer.str().empty()) @@ -490,7 +520,8 @@ bool get_PssIEEE2B_ks3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE2B_m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->m; if (!buffer.str().empty()) @@ -504,7 +535,8 @@ bool get_PssIEEE2B_m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssIEEE2B_n(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->n; if (!buffer.str().empty()) @@ -518,7 +550,8 @@ bool get_PssIEEE2B_n(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssIEEE2B_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -532,7 +565,8 @@ bool get_PssIEEE2B_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE2B_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t10; if (!buffer.str().empty()) @@ -546,7 +580,8 @@ bool get_PssIEEE2B_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE2B_t11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t11; if (!buffer.str().empty()) @@ -560,7 +595,8 @@ bool get_PssIEEE2B_t11(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE2B_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -574,7 +610,8 @@ bool get_PssIEEE2B_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE2B_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -588,7 +625,8 @@ bool get_PssIEEE2B_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE2B_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -602,7 +640,8 @@ bool get_PssIEEE2B_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE2B_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -616,7 +655,8 @@ bool get_PssIEEE2B_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE2B_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t7; if (!buffer.str().empty()) @@ -630,7 +670,8 @@ bool get_PssIEEE2B_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE2B_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t8; if (!buffer.str().empty()) @@ -644,7 +685,8 @@ bool get_PssIEEE2B_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE2B_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t9; if (!buffer.str().empty()) @@ -658,7 +700,8 @@ bool get_PssIEEE2B_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE2B_tw1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw1; if (!buffer.str().empty()) @@ -672,7 +715,8 @@ bool get_PssIEEE2B_tw1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE2B_tw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw2; if (!buffer.str().empty()) @@ -686,7 +730,8 @@ bool get_PssIEEE2B_tw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE2B_tw3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw3; if (!buffer.str().empty()) @@ -700,7 +745,8 @@ bool get_PssIEEE2B_tw3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE2B_tw4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw4; if (!buffer.str().empty()) @@ -714,7 +760,8 @@ bool get_PssIEEE2B_tw4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE2B_vsi1max(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsi1max; if (!buffer.str().empty()) @@ -728,7 +775,8 @@ bool get_PssIEEE2B_vsi1max(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_PssIEEE2B_vsi1min(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsi1min; if (!buffer.str().empty()) @@ -742,7 +790,8 @@ bool get_PssIEEE2B_vsi1min(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_PssIEEE2B_vsi2max(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsi2max; if (!buffer.str().empty()) @@ -756,7 +805,8 @@ bool get_PssIEEE2B_vsi2max(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_PssIEEE2B_vsi2min(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsi2min; if (!buffer.str().empty()) @@ -770,7 +820,8 @@ bool get_PssIEEE2B_vsi2min(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_PssIEEE2B_vstmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vstmax; if (!buffer.str().empty()) @@ -784,7 +835,8 @@ bool get_PssIEEE2B_vstmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_PssIEEE2B_vstmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vstmin; if (!buffer.str().empty()) @@ -796,36 +848,6 @@ bool get_PssIEEE2B_vstmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - -bool get_PssIEEE2B_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignal1Type; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - -bool get_PssIEEE2B_inputSignal2Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const PssIEEE2B* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignal2Type; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char PssIEEE2B::debugName[] = "PssIEEE2B"; const char* PssIEEE2B::debugString() const { @@ -834,38 +856,38 @@ const char* PssIEEE2B::debugString() const void PssIEEE2B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssIEEE2B"), &PssIEEE2B_factory)); + factory_map.emplace("cim:PssIEEE2B", &PssIEEE2B_factory); } void PssIEEE2B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.inputSignal1Type"), &assign_PssIEEE2B_inputSignal1Type)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.inputSignal2Type"), &assign_PssIEEE2B_inputSignal2Type)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.ks1"), &assign_PssIEEE2B_ks1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.ks2"), &assign_PssIEEE2B_ks2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.ks3"), &assign_PssIEEE2B_ks3)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.m"), &assign_PssIEEE2B_m)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.n"), &assign_PssIEEE2B_n)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t1"), &assign_PssIEEE2B_t1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t10"), &assign_PssIEEE2B_t10)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t11"), &assign_PssIEEE2B_t11)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t2"), &assign_PssIEEE2B_t2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t3"), &assign_PssIEEE2B_t3)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t4"), &assign_PssIEEE2B_t4)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t6"), &assign_PssIEEE2B_t6)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t7"), &assign_PssIEEE2B_t7)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t8"), &assign_PssIEEE2B_t8)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.t9"), &assign_PssIEEE2B_t9)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.tw1"), &assign_PssIEEE2B_tw1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.tw2"), &assign_PssIEEE2B_tw2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.tw3"), &assign_PssIEEE2B_tw3)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.tw4"), &assign_PssIEEE2B_tw4)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.vsi1max"), &assign_PssIEEE2B_vsi1max)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.vsi1min"), &assign_PssIEEE2B_vsi1min)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.vsi2max"), &assign_PssIEEE2B_vsi2max)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.vsi2min"), &assign_PssIEEE2B_vsi2min)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.vstmax"), &assign_PssIEEE2B_vstmax)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE2B.vstmin"), &assign_PssIEEE2B_vstmin)); + assign_map.emplace("cim:PssIEEE2B.inputSignal1Type", &assign_PssIEEE2B_inputSignal1Type); + assign_map.emplace("cim:PssIEEE2B.inputSignal2Type", &assign_PssIEEE2B_inputSignal2Type); + assign_map.emplace("cim:PssIEEE2B.ks1", &assign_PssIEEE2B_ks1); + assign_map.emplace("cim:PssIEEE2B.ks2", &assign_PssIEEE2B_ks2); + assign_map.emplace("cim:PssIEEE2B.ks3", &assign_PssIEEE2B_ks3); + assign_map.emplace("cim:PssIEEE2B.m", &assign_PssIEEE2B_m); + assign_map.emplace("cim:PssIEEE2B.n", &assign_PssIEEE2B_n); + assign_map.emplace("cim:PssIEEE2B.t1", &assign_PssIEEE2B_t1); + assign_map.emplace("cim:PssIEEE2B.t10", &assign_PssIEEE2B_t10); + assign_map.emplace("cim:PssIEEE2B.t11", &assign_PssIEEE2B_t11); + assign_map.emplace("cim:PssIEEE2B.t2", &assign_PssIEEE2B_t2); + assign_map.emplace("cim:PssIEEE2B.t3", &assign_PssIEEE2B_t3); + assign_map.emplace("cim:PssIEEE2B.t4", &assign_PssIEEE2B_t4); + assign_map.emplace("cim:PssIEEE2B.t6", &assign_PssIEEE2B_t6); + assign_map.emplace("cim:PssIEEE2B.t7", &assign_PssIEEE2B_t7); + assign_map.emplace("cim:PssIEEE2B.t8", &assign_PssIEEE2B_t8); + assign_map.emplace("cim:PssIEEE2B.t9", &assign_PssIEEE2B_t9); + assign_map.emplace("cim:PssIEEE2B.tw1", &assign_PssIEEE2B_tw1); + assign_map.emplace("cim:PssIEEE2B.tw2", &assign_PssIEEE2B_tw2); + assign_map.emplace("cim:PssIEEE2B.tw3", &assign_PssIEEE2B_tw3); + assign_map.emplace("cim:PssIEEE2B.tw4", &assign_PssIEEE2B_tw4); + assign_map.emplace("cim:PssIEEE2B.vsi1max", &assign_PssIEEE2B_vsi1max); + assign_map.emplace("cim:PssIEEE2B.vsi1min", &assign_PssIEEE2B_vsi1min); + assign_map.emplace("cim:PssIEEE2B.vsi2max", &assign_PssIEEE2B_vsi2max); + assign_map.emplace("cim:PssIEEE2B.vsi2min", &assign_PssIEEE2B_vsi2min); + assign_map.emplace("cim:PssIEEE2B.vstmax", &assign_PssIEEE2B_vstmax); + assign_map.emplace("cim:PssIEEE2B.vstmin", &assign_PssIEEE2B_vstmin); } void PssIEEE2B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/PssIEEE2B.hpp b/CGMES_3.0.0/PssIEEE2B.hpp index 83ade65ef..a2aeab873 100644 --- a/CGMES_3.0.0/PssIEEE2B.hpp +++ b/CGMES_3.0.0/PssIEEE2B.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE 421.5-2005 type PSS2B power system stabilizer model. This stabilizer model is designed to represent a variety of dual-input stabilizers, which normally use combinations of power and speed or frequency to derive the stabilizing signal. Reference: IEEE 2B 421.5-2005, 8.2. - */ + /** \brief IEEE 421.5-2005 type PSS2B power system stabilizer model. This stabilizer model is designed to represent a variety of dual-input stabilizers, which normally use combinations of power and speed or frequency to derive the stabilizing signal. Reference: IEEE 2B 421.5-2005, 8.2. */ class PssIEEE2B : public PowerSystemStabilizerDynamics { public: @@ -30,33 +28,86 @@ namespace CIMPP PssIEEE2B(); ~PssIEEE2B() override; - CIMPP::InputSignalKind inputSignal1Type; /* Type of input signal #1 (rotorAngularFrequencyDeviation, busFrequencyDeviation). Typical value = rotorAngularFrequencyDeviation. Default: 0 */ - CIMPP::InputSignalKind inputSignal2Type; /* Type of input signal #2 (generatorElectricalPower). Typical value = generatorElectricalPower. Default: 0 */ - CIMPP::PU ks1; /* Stabilizer gain (<i>Ks1</i>). Typical value = 12. Default: nullptr */ - CIMPP::PU ks2; /* Gain on signal #2 (<i>Ks2</i>). Typical value = 0,2. Default: nullptr */ - CIMPP::PU ks3; /* Gain on signal #2 input before ramp-tracking filter (<i>Ks3</i>). Typical value = 1. Default: nullptr */ - CIMPP::Integer m; /* Denominator order of ramp tracking filter (<i>M</i>). Typical value = 5. Default: 0 */ - CIMPP::Integer n; /* Order of ramp tracking filter (<i>N</i>). Typical value = 1. Default: 0 */ - CIMPP::Seconds t1; /* Lead/lag time constant (<i>T1</i>) (&gt;= 0). Typical value = 0,12. Default: nullptr */ - CIMPP::Seconds t10; /* Lead/lag time constant (<i>T10</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds t11; /* Lead/lag time constant (<i>T11</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds t2; /* Lead/lag time constant (<i>T2</i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ - CIMPP::Seconds t3; /* Lead/lag time constant (<i>T3</i>) (&gt;= 0). Typical value = 0,3. Default: nullptr */ - CIMPP::Seconds t4; /* Lead/lag time constant (<i>T4</i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ - CIMPP::Seconds t6; /* Time constant on signal #1 (<i>T6</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds t7; /* Time constant on signal #2 (<i>T7</i>) (&gt;= 0). Typical value = 2. Default: nullptr */ - CIMPP::Seconds t8; /* Lead of ramp tracking filter (<i>T8</i>) (&gt;= 0). Typical value = 0,2. Default: nullptr */ - CIMPP::Seconds t9; /* Lag of ramp tracking filter (<i>T9</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds tw1; /* First washout on signal #1 (<i>Tw1</i>) (&gt;= 0). Typical value = 2. Default: nullptr */ - CIMPP::Seconds tw2; /* Second washout on signal #1 (<i>Tw2</i>) (&gt;= 0). Typical value = 2. Default: nullptr */ - CIMPP::Seconds tw3; /* First washout on signal #2 (<i>Tw3</i>) (&gt;= 0). Typical value = 2. Default: nullptr */ - CIMPP::Seconds tw4; /* Second washout on signal #2 (<i>Tw4</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::PU vsi1max; /* Input signal #1 maximum limit (<i>Vsi1max</i>) (&gt; PssIEEE2B.vsi1min). Typical value = 2. Default: nullptr */ - CIMPP::PU vsi1min; /* Input signal #1 minimum limit (<i>Vsi1min</i>) (&lt; PssIEEE2B.vsi1max). Typical value = -2. Default: nullptr */ - CIMPP::PU vsi2max; /* Input signal #2 maximum limit (<i>Vsi2max</i>) (&gt; PssIEEE2B.vsi2min). Typical value = 2. Default: nullptr */ - CIMPP::PU vsi2min; /* Input signal #2 minimum limit (<i>Vsi2min</i>) (&lt; PssIEEE2B.vsi2max). Typical value = -2. Default: nullptr */ - CIMPP::PU vstmax; /* Stabilizer output maximum limit (<i>Vstmax</i>) (&gt; PssIEEE2B.vstmin). Typical value = 0,1. Default: nullptr */ - CIMPP::PU vstmin; /* Stabilizer output minimum limit (<i>Vstmin</i>) (&lt; PssIEEE2B.vstmax). Typical value = -0,1. Default: nullptr */ + /** \brief Type of input signal #1 (rotorAngularFrequencyDeviation, busFrequencyDeviation). Typical value = rotorAngularFrequencyDeviation. Default: 0 */ + CIMPP::InputSignalKind inputSignal1Type; + + /** \brief Type of input signal #2 (generatorElectricalPower). Typical value = generatorElectricalPower. Default: 0 */ + CIMPP::InputSignalKind inputSignal2Type; + + /** \brief Stabilizer gain (<i>Ks1</i>). Typical value = 12. Default: nullptr */ + CIMPP::PU ks1; + + /** \brief Gain on signal #2 (<i>Ks2</i>). Typical value = 0,2. Default: nullptr */ + CIMPP::PU ks2; + + /** \brief Gain on signal #2 input before ramp-tracking filter (<i>Ks3</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU ks3; + + /** \brief Denominator order of ramp tracking filter (<i>M</i>). Typical value = 5. Default: 0 */ + CIMPP::Integer m; + + /** \brief Order of ramp tracking filter (<i>N</i>). Typical value = 1. Default: 0 */ + CIMPP::Integer n; + + /** \brief Lead/lag time constant (<i>T1</i>) (&gt;= 0). Typical value = 0,12. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Lead/lag time constant (<i>T10</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds t10; + + /** \brief Lead/lag time constant (<i>T11</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds t11; + + /** \brief Lead/lag time constant (<i>T2</i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Lead/lag time constant (<i>T3</i>) (&gt;= 0). Typical value = 0,3. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Lead/lag time constant (<i>T4</i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant on signal #1 (<i>T6</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time constant on signal #2 (<i>T7</i>) (&gt;= 0). Typical value = 2. Default: nullptr */ + CIMPP::Seconds t7; + + /** \brief Lead of ramp tracking filter (<i>T8</i>) (&gt;= 0). Typical value = 0,2. Default: nullptr */ + CIMPP::Seconds t8; + + /** \brief Lag of ramp tracking filter (<i>T9</i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds t9; + + /** \brief First washout on signal #1 (<i>Tw1</i>) (&gt;= 0). Typical value = 2. Default: nullptr */ + CIMPP::Seconds tw1; + + /** \brief Second washout on signal #1 (<i>Tw2</i>) (&gt;= 0). Typical value = 2. Default: nullptr */ + CIMPP::Seconds tw2; + + /** \brief First washout on signal #2 (<i>Tw3</i>) (&gt;= 0). Typical value = 2. Default: nullptr */ + CIMPP::Seconds tw3; + + /** \brief Second washout on signal #2 (<i>Tw4</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tw4; + + /** \brief Input signal #1 maximum limit (<i>Vsi1max</i>) (&gt; PssIEEE2B.vsi1min). Typical value = 2. Default: nullptr */ + CIMPP::PU vsi1max; + + /** \brief Input signal #1 minimum limit (<i>Vsi1min</i>) (&lt; PssIEEE2B.vsi1max). Typical value = -2. Default: nullptr */ + CIMPP::PU vsi1min; + + /** \brief Input signal #2 maximum limit (<i>Vsi2max</i>) (&gt; PssIEEE2B.vsi2min). Typical value = 2. Default: nullptr */ + CIMPP::PU vsi2max; + + /** \brief Input signal #2 minimum limit (<i>Vsi2min</i>) (&lt; PssIEEE2B.vsi2max). Typical value = -2. Default: nullptr */ + CIMPP::PU vsi2min; + + /** \brief Stabilizer output maximum limit (<i>Vstmax</i>) (&gt; PssIEEE2B.vstmin). Typical value = 0,1. Default: nullptr */ + CIMPP::PU vstmax; + + /** \brief Stabilizer output minimum limit (<i>Vstmin</i>) (&lt; PssIEEE2B.vstmax). Typical value = -0,1. Default: nullptr */ + CIMPP::PU vstmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PssIEEE3B.cpp b/CGMES_3.0.0/PssIEEE3B.cpp index 5578b4721..2b308028c 100644 --- a/CGMES_3.0.0/PssIEEE3B.cpp +++ b/CGMES_3.0.0/PssIEEE3B.cpp @@ -8,28 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PssIEEE3B::PssIEEE3B() {}; -PssIEEE3B::~PssIEEE3B() {}; +PssIEEE3B::PssIEEE3B() {} +PssIEEE3B::~PssIEEE3B() {} static const std::list PossibleProfilesForClass = { @@ -72,233 +55,248 @@ PssIEEE3B::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssIEEE3B_a1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_a1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_a2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_a2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_a3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_a3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_a4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_a4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_a5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_a5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_a6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_a6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_a7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_a7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_a8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_a8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_ks1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_ks1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_ks2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_ks2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_tw1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_tw1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_tw2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_tw2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_tw3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_tw3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tw3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_vstmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_vstmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vstmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE3B_vstmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE3B_vstmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vstmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssIEEE3B_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a1; if (!buffer.str().empty()) @@ -312,7 +310,8 @@ bool get_PssIEEE3B_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE3B_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a2; if (!buffer.str().empty()) @@ -326,7 +325,8 @@ bool get_PssIEEE3B_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE3B_a3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a3; if (!buffer.str().empty()) @@ -340,7 +340,8 @@ bool get_PssIEEE3B_a3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE3B_a4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a4; if (!buffer.str().empty()) @@ -354,7 +355,8 @@ bool get_PssIEEE3B_a4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE3B_a5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a5; if (!buffer.str().empty()) @@ -368,7 +370,8 @@ bool get_PssIEEE3B_a5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE3B_a6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a6; if (!buffer.str().empty()) @@ -382,7 +385,8 @@ bool get_PssIEEE3B_a6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE3B_a7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a7; if (!buffer.str().empty()) @@ -396,7 +400,8 @@ bool get_PssIEEE3B_a7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE3B_a8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a8; if (!buffer.str().empty()) @@ -410,7 +415,8 @@ bool get_PssIEEE3B_a8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE3B_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks1; if (!buffer.str().empty()) @@ -424,7 +430,8 @@ bool get_PssIEEE3B_ks1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE3B_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks2; if (!buffer.str().empty()) @@ -438,7 +445,8 @@ bool get_PssIEEE3B_ks2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE3B_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -452,7 +460,8 @@ bool get_PssIEEE3B_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE3B_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -466,7 +475,8 @@ bool get_PssIEEE3B_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE3B_tw1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw1; if (!buffer.str().empty()) @@ -480,7 +490,8 @@ bool get_PssIEEE3B_tw1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE3B_tw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw2; if (!buffer.str().empty()) @@ -494,7 +505,8 @@ bool get_PssIEEE3B_tw2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE3B_tw3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tw3; if (!buffer.str().empty()) @@ -508,7 +520,8 @@ bool get_PssIEEE3B_tw3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE3B_vstmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vstmax; if (!buffer.str().empty()) @@ -522,7 +535,8 @@ bool get_PssIEEE3B_vstmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_PssIEEE3B_vstmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE3B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vstmin; if (!buffer.str().empty()) @@ -534,8 +548,6 @@ bool get_PssIEEE3B_vstmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char PssIEEE3B::debugName[] = "PssIEEE3B"; const char* PssIEEE3B::debugString() const { @@ -544,28 +556,28 @@ const char* PssIEEE3B::debugString() const void PssIEEE3B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssIEEE3B"), &PssIEEE3B_factory)); + factory_map.emplace("cim:PssIEEE3B", &PssIEEE3B_factory); } void PssIEEE3B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.a1"), &assign_PssIEEE3B_a1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.a2"), &assign_PssIEEE3B_a2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.a3"), &assign_PssIEEE3B_a3)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.a4"), &assign_PssIEEE3B_a4)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.a5"), &assign_PssIEEE3B_a5)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.a6"), &assign_PssIEEE3B_a6)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.a7"), &assign_PssIEEE3B_a7)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.a8"), &assign_PssIEEE3B_a8)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.ks1"), &assign_PssIEEE3B_ks1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.ks2"), &assign_PssIEEE3B_ks2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.t1"), &assign_PssIEEE3B_t1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.t2"), &assign_PssIEEE3B_t2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.tw1"), &assign_PssIEEE3B_tw1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.tw2"), &assign_PssIEEE3B_tw2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.tw3"), &assign_PssIEEE3B_tw3)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.vstmax"), &assign_PssIEEE3B_vstmax)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE3B.vstmin"), &assign_PssIEEE3B_vstmin)); + assign_map.emplace("cim:PssIEEE3B.a1", &assign_PssIEEE3B_a1); + assign_map.emplace("cim:PssIEEE3B.a2", &assign_PssIEEE3B_a2); + assign_map.emplace("cim:PssIEEE3B.a3", &assign_PssIEEE3B_a3); + assign_map.emplace("cim:PssIEEE3B.a4", &assign_PssIEEE3B_a4); + assign_map.emplace("cim:PssIEEE3B.a5", &assign_PssIEEE3B_a5); + assign_map.emplace("cim:PssIEEE3B.a6", &assign_PssIEEE3B_a6); + assign_map.emplace("cim:PssIEEE3B.a7", &assign_PssIEEE3B_a7); + assign_map.emplace("cim:PssIEEE3B.a8", &assign_PssIEEE3B_a8); + assign_map.emplace("cim:PssIEEE3B.ks1", &assign_PssIEEE3B_ks1); + assign_map.emplace("cim:PssIEEE3B.ks2", &assign_PssIEEE3B_ks2); + assign_map.emplace("cim:PssIEEE3B.t1", &assign_PssIEEE3B_t1); + assign_map.emplace("cim:PssIEEE3B.t2", &assign_PssIEEE3B_t2); + assign_map.emplace("cim:PssIEEE3B.tw1", &assign_PssIEEE3B_tw1); + assign_map.emplace("cim:PssIEEE3B.tw2", &assign_PssIEEE3B_tw2); + assign_map.emplace("cim:PssIEEE3B.tw3", &assign_PssIEEE3B_tw3); + assign_map.emplace("cim:PssIEEE3B.vstmax", &assign_PssIEEE3B_vstmax); + assign_map.emplace("cim:PssIEEE3B.vstmin", &assign_PssIEEE3B_vstmin); } void PssIEEE3B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/PssIEEE3B.hpp b/CGMES_3.0.0/PssIEEE3B.hpp index aa931b835..baf73f767 100644 --- a/CGMES_3.0.0/PssIEEE3B.hpp +++ b/CGMES_3.0.0/PssIEEE3B.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE 421.5-2005 type PSS3B power system stabilizer model. The PSS model PSS3B has dual inputs of electrical power and rotor angular frequency deviation. The signals are used to derive an equivalent mechanical power signal. This model has 2 input signals. They have the following fixed types (expressed in terms of InputSignalKind values): the first one is of rotorAngleFrequencyDeviation type and the second one is of generatorElectricalPower type. Reference: IEEE 3B 421.5-2005, 8.3. - */ + /** \brief IEEE 421.5-2005 type PSS3B power system stabilizer model. The PSS model PSS3B has dual inputs of electrical power and rotor angular frequency deviation. The signals are used to derive an equivalent mechanical power signal. This model has 2 input signals. They have the following fixed types (expressed in terms of InputSignalKind values): the first one is of rotorAngleFrequencyDeviation type and the second one is of generatorElectricalPower type. Reference: IEEE 3B 421.5-2005, 8.3. */ class PssIEEE3B : public PowerSystemStabilizerDynamics { public: @@ -28,23 +26,56 @@ namespace CIMPP PssIEEE3B(); ~PssIEEE3B() override; - CIMPP::PU a1; /* Notch filter parameter (<i>A1</i>). Typical value = 0,359. Default: nullptr */ - CIMPP::PU a2; /* Notch filter parameter (<i>A2</i>). Typical value = 0,586. Default: nullptr */ - CIMPP::PU a3; /* Notch filter parameter (<i>A3</i>). Typical value = 0,429. Default: nullptr */ - CIMPP::PU a4; /* Notch filter parameter (<i>A4</i>). Typical value = 0,564. Default: nullptr */ - CIMPP::PU a5; /* Notch filter parameter (<i>A5</i>). Typical value = 0,001. Default: nullptr */ - CIMPP::PU a6; /* Notch filter parameter (<i>A6</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU a7; /* Notch filter parameter (<i>A7</i>). Typical value = 0,031. Default: nullptr */ - CIMPP::PU a8; /* Notch filter parameter (<i>A8</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU ks1; /* Gain on signal # 1 (<i>Ks1</i>). Typical value = -0,602. Default: nullptr */ - CIMPP::PU ks2; /* Gain on signal # 2 (<i>Ks2</i>). Typical value = 30,12. Default: nullptr */ - CIMPP::Seconds t1; /* Transducer time constant (<i>T1</i>) (&gt;= 0). Typical value = 0,012. Default: nullptr */ - CIMPP::Seconds t2; /* Transducer time constant (<i>T2</i>) (&gt;= 0). Typical value = 0,012. Default: nullptr */ - CIMPP::Seconds tw1; /* Washout time constant (<i>Tw1</i>) (&gt;= 0). Typical value = 0,3. Default: nullptr */ - CIMPP::Seconds tw2; /* Washout time constant (<i>Tw2</i>) (&gt;= 0). Typical value = 0,3. Default: nullptr */ - CIMPP::Seconds tw3; /* Washout time constant (<i>Tw3</i>) (&gt;= 0). Typical value = 0,6. Default: nullptr */ - CIMPP::PU vstmax; /* Stabilizer output maximum limit (<i>Vstmax</i>) (&gt; PssIEEE3B.vstmin). Typical value = 0,1. Default: nullptr */ - CIMPP::PU vstmin; /* Stabilizer output minimum limit (<i>Vstmin</i>) (&lt; PssIEEE3B.vstmax). Typical value = -0,1. Default: nullptr */ + /** \brief Notch filter parameter (<i>A1</i>). Typical value = 0,359. Default: nullptr */ + CIMPP::PU a1; + + /** \brief Notch filter parameter (<i>A2</i>). Typical value = 0,586. Default: nullptr */ + CIMPP::PU a2; + + /** \brief Notch filter parameter (<i>A3</i>). Typical value = 0,429. Default: nullptr */ + CIMPP::PU a3; + + /** \brief Notch filter parameter (<i>A4</i>). Typical value = 0,564. Default: nullptr */ + CIMPP::PU a4; + + /** \brief Notch filter parameter (<i>A5</i>). Typical value = 0,001. Default: nullptr */ + CIMPP::PU a5; + + /** \brief Notch filter parameter (<i>A6</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU a6; + + /** \brief Notch filter parameter (<i>A7</i>). Typical value = 0,031. Default: nullptr */ + CIMPP::PU a7; + + /** \brief Notch filter parameter (<i>A8</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU a8; + + /** \brief Gain on signal # 1 (<i>Ks1</i>). Typical value = -0,602. Default: nullptr */ + CIMPP::PU ks1; + + /** \brief Gain on signal # 2 (<i>Ks2</i>). Typical value = 30,12. Default: nullptr */ + CIMPP::PU ks2; + + /** \brief Transducer time constant (<i>T1</i>) (&gt;= 0). Typical value = 0,012. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Transducer time constant (<i>T2</i>) (&gt;= 0). Typical value = 0,012. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Washout time constant (<i>Tw1</i>) (&gt;= 0). Typical value = 0,3. Default: nullptr */ + CIMPP::Seconds tw1; + + /** \brief Washout time constant (<i>Tw2</i>) (&gt;= 0). Typical value = 0,3. Default: nullptr */ + CIMPP::Seconds tw2; + + /** \brief Washout time constant (<i>Tw3</i>) (&gt;= 0). Typical value = 0,6. Default: nullptr */ + CIMPP::Seconds tw3; + + /** \brief Stabilizer output maximum limit (<i>Vstmax</i>) (&gt; PssIEEE3B.vstmin). Typical value = 0,1. Default: nullptr */ + CIMPP::PU vstmax; + + /** \brief Stabilizer output minimum limit (<i>Vstmin</i>) (&lt; PssIEEE3B.vstmax). Typical value = -0,1. Default: nullptr */ + CIMPP::PU vstmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PssIEEE4B.cpp b/CGMES_3.0.0/PssIEEE4B.cpp index e6cb27516..6eb537c95 100644 --- a/CGMES_3.0.0/PssIEEE4B.cpp +++ b/CGMES_3.0.0/PssIEEE4B.cpp @@ -8,78 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PssIEEE4B::PssIEEE4B() {}; -PssIEEE4B::~PssIEEE4B() {}; +PssIEEE4B::PssIEEE4B() {} +PssIEEE4B::~PssIEEE4B() {} static const std::list PossibleProfilesForClass = { @@ -172,883 +105,948 @@ PssIEEE4B::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssIEEE4B_bwh1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_bwh1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bwh1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_bwh2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_bwh2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bwh2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_bwl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_bwl1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bwl1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_bwl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_bwl2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->bwl2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kh(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kh(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kh1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kh1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kh11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kh11(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh11; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kh17(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kh17(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh17; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kh2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kh2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kh2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ki1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ki1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ki11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ki11(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki11; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ki17(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ki17(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki17; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ki2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ki2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kl1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kl11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kl11(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl11; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kl17(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kl17(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl17; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_kl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_kl2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kl2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_omeganh1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_omeganh1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->omeganh1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_omeganh2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_omeganh2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->omeganh2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_omeganl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_omeganl1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->omeganl1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_omeganl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_omeganl2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->omeganl2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th11(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th11; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_th9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_th9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->th9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti11(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti11; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_ti9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_ti9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ti9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl11(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl11(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl11; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl12(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl12(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl12; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_tl9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_tl9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tl9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_vhmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_vhmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vhmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_vhmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_vhmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vhmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_vimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_vimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_vimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_vimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_vlmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_vlmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vlmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_vlmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_vlmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vlmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_vstmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_vstmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vstmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssIEEE4B_vstmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssIEEE4B_vstmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vstmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssIEEE4B_bwh1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bwh1; if (!buffer.str().empty()) @@ -1062,7 +1060,8 @@ bool get_PssIEEE4B_bwh1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_bwh2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bwh2; if (!buffer.str().empty()) @@ -1076,7 +1075,8 @@ bool get_PssIEEE4B_bwh2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_bwl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bwl1; if (!buffer.str().empty()) @@ -1090,7 +1090,8 @@ bool get_PssIEEE4B_bwl1(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_bwl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->bwl2; if (!buffer.str().empty()) @@ -1104,7 +1105,8 @@ bool get_PssIEEE4B_bwl2(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh; if (!buffer.str().empty()) @@ -1118,7 +1120,8 @@ bool get_PssIEEE4B_kh(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE4B_kh1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh1; if (!buffer.str().empty()) @@ -1132,7 +1135,8 @@ bool get_PssIEEE4B_kh1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_kh11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh11; if (!buffer.str().empty()) @@ -1146,7 +1150,8 @@ bool get_PssIEEE4B_kh11(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_kh17(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh17; if (!buffer.str().empty()) @@ -1160,7 +1165,8 @@ bool get_PssIEEE4B_kh17(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_kh2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kh2; if (!buffer.str().empty()) @@ -1174,7 +1180,8 @@ bool get_PssIEEE4B_kh2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -1188,7 +1195,8 @@ bool get_PssIEEE4B_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE4B_ki1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki1; if (!buffer.str().empty()) @@ -1202,7 +1210,8 @@ bool get_PssIEEE4B_ki1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ki11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki11; if (!buffer.str().empty()) @@ -1216,7 +1225,8 @@ bool get_PssIEEE4B_ki11(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_ki17(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki17; if (!buffer.str().empty()) @@ -1230,7 +1240,8 @@ bool get_PssIEEE4B_ki17(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_ki2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki2; if (!buffer.str().empty()) @@ -1244,7 +1255,8 @@ bool get_PssIEEE4B_ki2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl; if (!buffer.str().empty()) @@ -1258,7 +1270,8 @@ bool get_PssIEEE4B_kl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssIEEE4B_kl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl1; if (!buffer.str().empty()) @@ -1272,7 +1285,8 @@ bool get_PssIEEE4B_kl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_kl11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl11; if (!buffer.str().empty()) @@ -1286,7 +1300,8 @@ bool get_PssIEEE4B_kl11(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_kl17(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl17; if (!buffer.str().empty()) @@ -1300,7 +1315,8 @@ bool get_PssIEEE4B_kl17(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_kl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kl2; if (!buffer.str().empty()) @@ -1314,7 +1330,8 @@ bool get_PssIEEE4B_kl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_omeganh1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->omeganh1; if (!buffer.str().empty()) @@ -1328,7 +1345,8 @@ bool get_PssIEEE4B_omeganh1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_PssIEEE4B_omeganh2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->omeganh2; if (!buffer.str().empty()) @@ -1342,7 +1360,8 @@ bool get_PssIEEE4B_omeganh2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_PssIEEE4B_omeganl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->omeganl1; if (!buffer.str().empty()) @@ -1356,7 +1375,8 @@ bool get_PssIEEE4B_omeganl1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_PssIEEE4B_omeganl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->omeganl2; if (!buffer.str().empty()) @@ -1370,7 +1390,8 @@ bool get_PssIEEE4B_omeganl2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_PssIEEE4B_th1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th1; if (!buffer.str().empty()) @@ -1384,7 +1405,8 @@ bool get_PssIEEE4B_th1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_th10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th10; if (!buffer.str().empty()) @@ -1398,7 +1420,8 @@ bool get_PssIEEE4B_th10(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_th11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th11; if (!buffer.str().empty()) @@ -1412,7 +1435,8 @@ bool get_PssIEEE4B_th11(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_th12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th12; if (!buffer.str().empty()) @@ -1426,7 +1450,8 @@ bool get_PssIEEE4B_th12(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_th2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th2; if (!buffer.str().empty()) @@ -1440,7 +1465,8 @@ bool get_PssIEEE4B_th2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_th3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th3; if (!buffer.str().empty()) @@ -1454,7 +1480,8 @@ bool get_PssIEEE4B_th3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_th4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th4; if (!buffer.str().empty()) @@ -1468,7 +1495,8 @@ bool get_PssIEEE4B_th4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_th5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th5; if (!buffer.str().empty()) @@ -1482,7 +1510,8 @@ bool get_PssIEEE4B_th5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_th6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th6; if (!buffer.str().empty()) @@ -1496,7 +1525,8 @@ bool get_PssIEEE4B_th6(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_th7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th7; if (!buffer.str().empty()) @@ -1510,7 +1540,8 @@ bool get_PssIEEE4B_th7(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_th8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th8; if (!buffer.str().empty()) @@ -1524,7 +1555,8 @@ bool get_PssIEEE4B_th8(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_th9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->th9; if (!buffer.str().empty()) @@ -1538,7 +1570,8 @@ bool get_PssIEEE4B_th9(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ti1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti1; if (!buffer.str().empty()) @@ -1552,7 +1585,8 @@ bool get_PssIEEE4B_ti1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ti10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti10; if (!buffer.str().empty()) @@ -1566,7 +1600,8 @@ bool get_PssIEEE4B_ti10(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_ti11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti11; if (!buffer.str().empty()) @@ -1580,7 +1615,8 @@ bool get_PssIEEE4B_ti11(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_ti12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti12; if (!buffer.str().empty()) @@ -1594,7 +1630,8 @@ bool get_PssIEEE4B_ti12(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_ti2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti2; if (!buffer.str().empty()) @@ -1608,7 +1645,8 @@ bool get_PssIEEE4B_ti2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ti3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti3; if (!buffer.str().empty()) @@ -1622,7 +1660,8 @@ bool get_PssIEEE4B_ti3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ti4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti4; if (!buffer.str().empty()) @@ -1636,7 +1675,8 @@ bool get_PssIEEE4B_ti4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ti5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti5; if (!buffer.str().empty()) @@ -1650,7 +1690,8 @@ bool get_PssIEEE4B_ti5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ti6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti6; if (!buffer.str().empty()) @@ -1664,7 +1705,8 @@ bool get_PssIEEE4B_ti6(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ti7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti7; if (!buffer.str().empty()) @@ -1678,7 +1720,8 @@ bool get_PssIEEE4B_ti7(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ti8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti8; if (!buffer.str().empty()) @@ -1692,7 +1735,8 @@ bool get_PssIEEE4B_ti8(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_ti9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ti9; if (!buffer.str().empty()) @@ -1706,7 +1750,8 @@ bool get_PssIEEE4B_ti9(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_tl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl1; if (!buffer.str().empty()) @@ -1720,7 +1765,8 @@ bool get_PssIEEE4B_tl1(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_tl10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl10; if (!buffer.str().empty()) @@ -1734,7 +1780,8 @@ bool get_PssIEEE4B_tl10(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_tl11(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl11; if (!buffer.str().empty()) @@ -1748,7 +1795,8 @@ bool get_PssIEEE4B_tl11(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_tl12(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl12; if (!buffer.str().empty()) @@ -1762,7 +1810,8 @@ bool get_PssIEEE4B_tl12(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssIEEE4B_tl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl2; if (!buffer.str().empty()) @@ -1776,7 +1825,8 @@ bool get_PssIEEE4B_tl2(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_tl3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl3; if (!buffer.str().empty()) @@ -1790,7 +1840,8 @@ bool get_PssIEEE4B_tl3(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_tl4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl4; if (!buffer.str().empty()) @@ -1804,7 +1855,8 @@ bool get_PssIEEE4B_tl4(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_tl5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl5; if (!buffer.str().empty()) @@ -1818,7 +1870,8 @@ bool get_PssIEEE4B_tl5(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_tl6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl6; if (!buffer.str().empty()) @@ -1832,7 +1885,8 @@ bool get_PssIEEE4B_tl6(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_tl7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl7; if (!buffer.str().empty()) @@ -1846,7 +1900,8 @@ bool get_PssIEEE4B_tl7(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_tl8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl8; if (!buffer.str().empty()) @@ -1860,7 +1915,8 @@ bool get_PssIEEE4B_tl8(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_tl9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tl9; if (!buffer.str().empty()) @@ -1874,7 +1930,8 @@ bool get_PssIEEE4B_tl9(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssIEEE4B_vhmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vhmax; if (!buffer.str().empty()) @@ -1888,7 +1945,8 @@ bool get_PssIEEE4B_vhmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_PssIEEE4B_vhmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vhmin; if (!buffer.str().empty()) @@ -1902,7 +1960,8 @@ bool get_PssIEEE4B_vhmin(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_PssIEEE4B_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimax; if (!buffer.str().empty()) @@ -1916,7 +1975,8 @@ bool get_PssIEEE4B_vimax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_PssIEEE4B_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vimin; if (!buffer.str().empty()) @@ -1930,7 +1990,8 @@ bool get_PssIEEE4B_vimin(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_PssIEEE4B_vlmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vlmax; if (!buffer.str().empty()) @@ -1944,7 +2005,8 @@ bool get_PssIEEE4B_vlmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_PssIEEE4B_vlmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vlmin; if (!buffer.str().empty()) @@ -1958,7 +2020,8 @@ bool get_PssIEEE4B_vlmin(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_PssIEEE4B_vstmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vstmax; if (!buffer.str().empty()) @@ -1972,7 +2035,8 @@ bool get_PssIEEE4B_vstmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_PssIEEE4B_vstmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1)) + const PssIEEE4B* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vstmin; if (!buffer.str().empty()) @@ -1984,8 +2048,6 @@ bool get_PssIEEE4B_vstmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char PssIEEE4B::debugName[] = "PssIEEE4B"; const char* PssIEEE4B::debugString() const { @@ -1994,78 +2056,78 @@ const char* PssIEEE4B::debugString() const void PssIEEE4B::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssIEEE4B"), &PssIEEE4B_factory)); + factory_map.emplace("cim:PssIEEE4B", &PssIEEE4B_factory); } void PssIEEE4B::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.bwh1"), &assign_PssIEEE4B_bwh1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.bwh2"), &assign_PssIEEE4B_bwh2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.bwl1"), &assign_PssIEEE4B_bwl1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.bwl2"), &assign_PssIEEE4B_bwl2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kh"), &assign_PssIEEE4B_kh)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kh1"), &assign_PssIEEE4B_kh1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kh11"), &assign_PssIEEE4B_kh11)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kh17"), &assign_PssIEEE4B_kh17)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kh2"), &assign_PssIEEE4B_kh2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ki"), &assign_PssIEEE4B_ki)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ki1"), &assign_PssIEEE4B_ki1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ki11"), &assign_PssIEEE4B_ki11)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ki17"), &assign_PssIEEE4B_ki17)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ki2"), &assign_PssIEEE4B_ki2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kl"), &assign_PssIEEE4B_kl)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kl1"), &assign_PssIEEE4B_kl1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kl11"), &assign_PssIEEE4B_kl11)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kl17"), &assign_PssIEEE4B_kl17)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.kl2"), &assign_PssIEEE4B_kl2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.omeganh1"), &assign_PssIEEE4B_omeganh1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.omeganh2"), &assign_PssIEEE4B_omeganh2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.omeganl1"), &assign_PssIEEE4B_omeganl1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.omeganl2"), &assign_PssIEEE4B_omeganl2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th1"), &assign_PssIEEE4B_th1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th10"), &assign_PssIEEE4B_th10)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th11"), &assign_PssIEEE4B_th11)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th12"), &assign_PssIEEE4B_th12)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th2"), &assign_PssIEEE4B_th2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th3"), &assign_PssIEEE4B_th3)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th4"), &assign_PssIEEE4B_th4)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th5"), &assign_PssIEEE4B_th5)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th6"), &assign_PssIEEE4B_th6)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th7"), &assign_PssIEEE4B_th7)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th8"), &assign_PssIEEE4B_th8)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.th9"), &assign_PssIEEE4B_th9)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti1"), &assign_PssIEEE4B_ti1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti10"), &assign_PssIEEE4B_ti10)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti11"), &assign_PssIEEE4B_ti11)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti12"), &assign_PssIEEE4B_ti12)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti2"), &assign_PssIEEE4B_ti2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti3"), &assign_PssIEEE4B_ti3)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti4"), &assign_PssIEEE4B_ti4)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti5"), &assign_PssIEEE4B_ti5)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti6"), &assign_PssIEEE4B_ti6)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti7"), &assign_PssIEEE4B_ti7)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti8"), &assign_PssIEEE4B_ti8)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.ti9"), &assign_PssIEEE4B_ti9)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl1"), &assign_PssIEEE4B_tl1)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl10"), &assign_PssIEEE4B_tl10)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl11"), &assign_PssIEEE4B_tl11)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl12"), &assign_PssIEEE4B_tl12)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl2"), &assign_PssIEEE4B_tl2)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl3"), &assign_PssIEEE4B_tl3)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl4"), &assign_PssIEEE4B_tl4)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl5"), &assign_PssIEEE4B_tl5)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl6"), &assign_PssIEEE4B_tl6)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl7"), &assign_PssIEEE4B_tl7)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl8"), &assign_PssIEEE4B_tl8)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.tl9"), &assign_PssIEEE4B_tl9)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.vhmax"), &assign_PssIEEE4B_vhmax)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.vhmin"), &assign_PssIEEE4B_vhmin)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.vimax"), &assign_PssIEEE4B_vimax)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.vimin"), &assign_PssIEEE4B_vimin)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.vlmax"), &assign_PssIEEE4B_vlmax)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.vlmin"), &assign_PssIEEE4B_vlmin)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.vstmax"), &assign_PssIEEE4B_vstmax)); - assign_map.insert(std::make_pair(std::string("cim:PssIEEE4B.vstmin"), &assign_PssIEEE4B_vstmin)); + assign_map.emplace("cim:PssIEEE4B.bwh1", &assign_PssIEEE4B_bwh1); + assign_map.emplace("cim:PssIEEE4B.bwh2", &assign_PssIEEE4B_bwh2); + assign_map.emplace("cim:PssIEEE4B.bwl1", &assign_PssIEEE4B_bwl1); + assign_map.emplace("cim:PssIEEE4B.bwl2", &assign_PssIEEE4B_bwl2); + assign_map.emplace("cim:PssIEEE4B.kh", &assign_PssIEEE4B_kh); + assign_map.emplace("cim:PssIEEE4B.kh1", &assign_PssIEEE4B_kh1); + assign_map.emplace("cim:PssIEEE4B.kh11", &assign_PssIEEE4B_kh11); + assign_map.emplace("cim:PssIEEE4B.kh17", &assign_PssIEEE4B_kh17); + assign_map.emplace("cim:PssIEEE4B.kh2", &assign_PssIEEE4B_kh2); + assign_map.emplace("cim:PssIEEE4B.ki", &assign_PssIEEE4B_ki); + assign_map.emplace("cim:PssIEEE4B.ki1", &assign_PssIEEE4B_ki1); + assign_map.emplace("cim:PssIEEE4B.ki11", &assign_PssIEEE4B_ki11); + assign_map.emplace("cim:PssIEEE4B.ki17", &assign_PssIEEE4B_ki17); + assign_map.emplace("cim:PssIEEE4B.ki2", &assign_PssIEEE4B_ki2); + assign_map.emplace("cim:PssIEEE4B.kl", &assign_PssIEEE4B_kl); + assign_map.emplace("cim:PssIEEE4B.kl1", &assign_PssIEEE4B_kl1); + assign_map.emplace("cim:PssIEEE4B.kl11", &assign_PssIEEE4B_kl11); + assign_map.emplace("cim:PssIEEE4B.kl17", &assign_PssIEEE4B_kl17); + assign_map.emplace("cim:PssIEEE4B.kl2", &assign_PssIEEE4B_kl2); + assign_map.emplace("cim:PssIEEE4B.omeganh1", &assign_PssIEEE4B_omeganh1); + assign_map.emplace("cim:PssIEEE4B.omeganh2", &assign_PssIEEE4B_omeganh2); + assign_map.emplace("cim:PssIEEE4B.omeganl1", &assign_PssIEEE4B_omeganl1); + assign_map.emplace("cim:PssIEEE4B.omeganl2", &assign_PssIEEE4B_omeganl2); + assign_map.emplace("cim:PssIEEE4B.th1", &assign_PssIEEE4B_th1); + assign_map.emplace("cim:PssIEEE4B.th10", &assign_PssIEEE4B_th10); + assign_map.emplace("cim:PssIEEE4B.th11", &assign_PssIEEE4B_th11); + assign_map.emplace("cim:PssIEEE4B.th12", &assign_PssIEEE4B_th12); + assign_map.emplace("cim:PssIEEE4B.th2", &assign_PssIEEE4B_th2); + assign_map.emplace("cim:PssIEEE4B.th3", &assign_PssIEEE4B_th3); + assign_map.emplace("cim:PssIEEE4B.th4", &assign_PssIEEE4B_th4); + assign_map.emplace("cim:PssIEEE4B.th5", &assign_PssIEEE4B_th5); + assign_map.emplace("cim:PssIEEE4B.th6", &assign_PssIEEE4B_th6); + assign_map.emplace("cim:PssIEEE4B.th7", &assign_PssIEEE4B_th7); + assign_map.emplace("cim:PssIEEE4B.th8", &assign_PssIEEE4B_th8); + assign_map.emplace("cim:PssIEEE4B.th9", &assign_PssIEEE4B_th9); + assign_map.emplace("cim:PssIEEE4B.ti1", &assign_PssIEEE4B_ti1); + assign_map.emplace("cim:PssIEEE4B.ti10", &assign_PssIEEE4B_ti10); + assign_map.emplace("cim:PssIEEE4B.ti11", &assign_PssIEEE4B_ti11); + assign_map.emplace("cim:PssIEEE4B.ti12", &assign_PssIEEE4B_ti12); + assign_map.emplace("cim:PssIEEE4B.ti2", &assign_PssIEEE4B_ti2); + assign_map.emplace("cim:PssIEEE4B.ti3", &assign_PssIEEE4B_ti3); + assign_map.emplace("cim:PssIEEE4B.ti4", &assign_PssIEEE4B_ti4); + assign_map.emplace("cim:PssIEEE4B.ti5", &assign_PssIEEE4B_ti5); + assign_map.emplace("cim:PssIEEE4B.ti6", &assign_PssIEEE4B_ti6); + assign_map.emplace("cim:PssIEEE4B.ti7", &assign_PssIEEE4B_ti7); + assign_map.emplace("cim:PssIEEE4B.ti8", &assign_PssIEEE4B_ti8); + assign_map.emplace("cim:PssIEEE4B.ti9", &assign_PssIEEE4B_ti9); + assign_map.emplace("cim:PssIEEE4B.tl1", &assign_PssIEEE4B_tl1); + assign_map.emplace("cim:PssIEEE4B.tl10", &assign_PssIEEE4B_tl10); + assign_map.emplace("cim:PssIEEE4B.tl11", &assign_PssIEEE4B_tl11); + assign_map.emplace("cim:PssIEEE4B.tl12", &assign_PssIEEE4B_tl12); + assign_map.emplace("cim:PssIEEE4B.tl2", &assign_PssIEEE4B_tl2); + assign_map.emplace("cim:PssIEEE4B.tl3", &assign_PssIEEE4B_tl3); + assign_map.emplace("cim:PssIEEE4B.tl4", &assign_PssIEEE4B_tl4); + assign_map.emplace("cim:PssIEEE4B.tl5", &assign_PssIEEE4B_tl5); + assign_map.emplace("cim:PssIEEE4B.tl6", &assign_PssIEEE4B_tl6); + assign_map.emplace("cim:PssIEEE4B.tl7", &assign_PssIEEE4B_tl7); + assign_map.emplace("cim:PssIEEE4B.tl8", &assign_PssIEEE4B_tl8); + assign_map.emplace("cim:PssIEEE4B.tl9", &assign_PssIEEE4B_tl9); + assign_map.emplace("cim:PssIEEE4B.vhmax", &assign_PssIEEE4B_vhmax); + assign_map.emplace("cim:PssIEEE4B.vhmin", &assign_PssIEEE4B_vhmin); + assign_map.emplace("cim:PssIEEE4B.vimax", &assign_PssIEEE4B_vimax); + assign_map.emplace("cim:PssIEEE4B.vimin", &assign_PssIEEE4B_vimin); + assign_map.emplace("cim:PssIEEE4B.vlmax", &assign_PssIEEE4B_vlmax); + assign_map.emplace("cim:PssIEEE4B.vlmin", &assign_PssIEEE4B_vlmin); + assign_map.emplace("cim:PssIEEE4B.vstmax", &assign_PssIEEE4B_vstmax); + assign_map.emplace("cim:PssIEEE4B.vstmin", &assign_PssIEEE4B_vstmin); } void PssIEEE4B::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/PssIEEE4B.hpp b/CGMES_3.0.0/PssIEEE4B.hpp index 7ed866ba1..d62b34c1f 100644 --- a/CGMES_3.0.0/PssIEEE4B.hpp +++ b/CGMES_3.0.0/PssIEEE4B.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE 421.5-2005 type PSS4B power system stabilizer. The PSS4B model represents a structure based on multiple working frequency bands. Three separate bands, respectively dedicated to the low-, intermediate- and high-frequency modes of oscillations, are used in this delta omega (speed input) PSS. There is an error in the in IEEE 421.5-2005 PSS4B model: the Pe input should read -Pe. This implies that the input Pe needs to be multiplied by -1. Reference: IEEE 4B 421.5-2005, 8.4. Parameter details: This model has 2 input signals. They have the following fixed types (expressed in terms of InputSignalKind values): the first one is of rotorAngleFrequencyDeviation type and the second one is of generatorElectricalPower type. - */ + /** \brief IEEE 421.5-2005 type PSS4B power system stabilizer. The PSS4B model represents a structure based on multiple working frequency bands. Three separate bands, respectively dedicated to the low-, intermediate- and high-frequency modes of oscillations, are used in this delta omega (speed input) PSS. There is an error in the in IEEE 421.5-2005 PSS4B model: the Pe input should read -Pe. This implies that the input Pe needs to be multiplied by -1. Reference: IEEE 4B 421.5-2005, 8.4. Parameter details: This model has 2 input signals. They have the following fixed types (expressed in terms of InputSignalKind values): the first one is of rotorAngleFrequencyDeviation type and the second one is of generatorElectricalPower type. */ class PssIEEE4B : public PowerSystemStabilizerDynamics { public: @@ -29,73 +27,206 @@ namespace CIMPP PssIEEE4B(); ~PssIEEE4B() override; - CIMPP::Float bwh1; /* Notch filter 1 (high-frequency band): three dB bandwidth (<i>B</i><i><sub>wi</sub></i>). Default: 0.0 */ - CIMPP::Float bwh2; /* Notch filter 2 (high-frequency band): three dB bandwidth (<i>B</i><i><sub>wi</sub></i>). Default: 0.0 */ - CIMPP::Float bwl1; /* Notch filter 1 (low-frequency band): three dB bandwidth (<i>B</i><i><sub>wi</sub></i>). Default: 0.0 */ - CIMPP::Float bwl2; /* Notch filter 2 (low-frequency band): three dB bandwidth (<i>B</i><i><sub>wi</sub></i>). Default: 0.0 */ - CIMPP::PU kh; /* High band gain (<i>K</i><i><sub>H</sub></i>). Typical value = 120. Default: nullptr */ - CIMPP::PU kh1; /* High band differential filter gain (<i>K</i><i><sub>H1</sub></i>). Typical value = 66. Default: nullptr */ - CIMPP::PU kh11; /* High band first lead-lag blocks coefficient (<i>K</i><i><sub>H11</sub></i>). Typical value = 1. Default: nullptr */ - CIMPP::PU kh17; /* High band first lead-lag blocks coefficient (<i>K</i><i><sub>H17</sub></i>). Typical value = 1. Default: nullptr */ - CIMPP::PU kh2; /* High band differential filter gain (<i>K</i><i><sub>H2</sub></i>). Typical value = 66. Default: nullptr */ - CIMPP::PU ki; /* Intermediate band gain (<i>K</i><i><sub>I</sub></i>). Typical value = 30. Default: nullptr */ - CIMPP::PU ki1; /* Intermediate band differential filter gain (<i>K</i><i><sub>I1</sub></i>). Typical value = 66. Default: nullptr */ - CIMPP::PU ki11; /* Intermediate band first lead-lag blocks coefficient (<i>K</i><i><sub>I11</sub></i>). Typical value = 1. Default: nullptr */ - CIMPP::PU ki17; /* Intermediate band first lead-lag blocks coefficient (<i>K</i><i><sub>I17</sub></i>). Typical value = 1. Default: nullptr */ - CIMPP::PU ki2; /* Intermediate band differential filter gain (<i>K</i><i><sub>I2</sub></i>). Typical value = 66. Default: nullptr */ - CIMPP::PU kl; /* Low band gain (<i>K</i><i><sub>L</sub></i>). Typical value = 7.5. Default: nullptr */ - CIMPP::PU kl1; /* Low band differential filter gain (<i>K</i><i><sub>L1</sub></i>). Typical value = 66. Default: nullptr */ - CIMPP::PU kl11; /* Low band first lead-lag blocks coefficient (<i>K</i><i><sub>L11</sub></i>). Typical value = 1. Default: nullptr */ - CIMPP::PU kl17; /* Low band first lead-lag blocks coefficient (<i>K</i><i><sub>L17</sub></i>). Typical value = 1. Default: nullptr */ - CIMPP::PU kl2; /* Low band differential filter gain (<i>K</i><i><sub>L2</sub></i>). Typical value = 66. Default: nullptr */ - CIMPP::Float omeganh1; /* Notch filter 1 (high-frequency band): filter frequency (<i>omega</i><i><sub>ni</sub></i>). Default: 0.0 */ - CIMPP::Float omeganh2; /* Notch filter 2 (high-frequency band): filter frequency (<i>omega</i><i><sub>ni</sub></i>). Default: 0.0 */ - CIMPP::Float omeganl1; /* Notch filter 1 (low-frequency band): filter frequency (<i>omega</i><i><sub>ni</sub></i>). Default: 0.0 */ - CIMPP::Float omeganl2; /* Notch filter 2 (low-frequency band): filter frequency (<i>omega</i><i><sub>ni</sub></i>). Default: 0.0 */ - CIMPP::Seconds th1; /* High band time constant (<i>T</i><i><sub>H1</sub></i>) (&gt;= 0). Typical value = 0,01513. Default: nullptr */ - CIMPP::Seconds th10; /* High band time constant (<i>T</i><i><sub>H10</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds th11; /* High band time constant (<i>T</i><i><sub>H11</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds th12; /* High band time constant (<i>T</i><i><sub>H12</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds th2; /* High band time constant (<i>T</i><i><sub>H2</sub></i>) (&gt;= 0). Typical value = 0,01816. Default: nullptr */ - CIMPP::Seconds th3; /* High band time constant (<i>T</i><i><sub>H3</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds th4; /* High band time constant (<i>T</i><i><sub>H4</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds th5; /* High band time constant (<i>T</i><i><sub>H5</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds th6; /* High band time constant (<i>T</i><i><sub>H6</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds th7; /* High band time constant (<i>T</i><i><sub>H7</sub></i>) (&gt;= 0). Typical value = 0,01816. Default: nullptr */ - CIMPP::Seconds th8; /* High band time constant (<i>T</i><i><sub>H8</sub></i>) (&gt;= 0). Typical value = 0,02179. Default: nullptr */ - CIMPP::Seconds th9; /* High band time constant (<i>T</i><i><sub>H9</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds ti1; /* Intermediate band time constant (<i>T</i><i><sub>I1</sub></i>) (&gt;= 0). Typical value = 0,173. Default: nullptr */ - CIMPP::Seconds ti10; /* Intermediate band time constant (<i>T</i><i><sub>I10</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds ti11; /* Intermediate band time constant (<i>T</i><i><sub>I11</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds ti12; /* Intermediate band time constant (<i>T</i><i><sub>I12</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds ti2; /* Intermediate band time constant (<i>T</i><i><sub>I2</sub></i>) (&gt;= 0). Typical value = 0,2075. Default: nullptr */ - CIMPP::Seconds ti3; /* Intermediate band time constant (<i>T</i><i><sub>I3</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds ti4; /* Intermediate band time constant (<i>T</i><i><sub>I4</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds ti5; /* Intermediate band time constant (<i>T</i><i><sub>I5</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds ti6; /* Intermediate band time constant (<i>T</i><i><sub>I6</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds ti7; /* Intermediate band time constant (<i>T</i><i><sub>I7</sub></i>) (&gt;= 0). Typical value = 0,2075. Default: nullptr */ - CIMPP::Seconds ti8; /* Intermediate band time constant (<i>T</i><i><sub>I8</sub></i>) (&gt;= 0). Typical value = 0,2491. Default: nullptr */ - CIMPP::Seconds ti9; /* Intermediate band time constant (<i>T</i><i><sub>I9</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tl1; /* Low band time constant (<i>T</i><i><sub>L1</sub></i>) (&gt;= 0). Typical value = 1,73. Default: nullptr */ - CIMPP::Seconds tl10; /* Low band time constant (<i>T</i><i><sub>L10</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tl11; /* Low band time constant (<i>T</i><i><sub>L11</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tl12; /* Low band time constant (<i>T</i><i><sub>L12</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tl2; /* Low band time constant (<i>T</i><i><sub>L2</sub></i>) (&gt;= 0). Typical value = 2,075. Default: nullptr */ - CIMPP::Seconds tl3; /* Low band time constant (<i>T</i><i><sub>L3</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tl4; /* Low band time constant (<i>T</i><i><sub>L4</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tl5; /* Low band time constant (<i>T</i><i><sub>L5</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tl6; /* Low band time constant (<i>T</i><i><sub>L6</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tl7; /* Low band time constant (<i>T</i><i><sub>L7</sub></i>) (&gt;= 0). Typical value = 2,075. Default: nullptr */ - CIMPP::Seconds tl8; /* Low band time constant (<i>T</i><i><sub>L8</sub></i>) (&gt;= 0). Typical value = 2,491. Default: nullptr */ - CIMPP::Seconds tl9; /* Low band time constant (<i>T</i><i><sub>L9</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::PU vhmax; /* High band output maximum limit (<i>V</i><i><sub>Hmax</sub></i>) (&gt; PssIEEE4B.vhmin). Typical value = 0,6. Default: nullptr */ - CIMPP::PU vhmin; /* High band output minimum limit (<i>V</i><i><sub>Hmin</sub></i>) (&lt; PssIEEE4V.vhmax). Typical value = -0,6. Default: nullptr */ - CIMPP::PU vimax; /* Intermediate band output maximum limit (<i>V</i><i><sub>Imax</sub></i>) (&gt; PssIEEE4B.vimin). Typical value = 0,6. Default: nullptr */ - CIMPP::PU vimin; /* Intermediate band output minimum limit (<i>V</i><i><sub>Imin</sub></i>) (&lt; PssIEEE4B.vimax). Typical value = -0,6. Default: nullptr */ - CIMPP::PU vlmax; /* Low band output maximum limit (<i>V</i><i><sub>Lmax</sub></i>) (&gt; PssIEEE4B.vlmin). Typical value = 0,075. Default: nullptr */ - CIMPP::PU vlmin; /* Low band output minimum limit (<i>V</i><i><sub>Lmin</sub></i>) (&lt; PssIEEE4B.vlmax). Typical value = -0,075. Default: nullptr */ - CIMPP::PU vstmax; /* PSS output maximum limit (<i>V</i><i><sub>STmax</sub></i>) (&gt; PssIEEE4B.vstmin). Typical value = 0,15. Default: nullptr */ - CIMPP::PU vstmin; /* PSS output minimum limit (<i>V</i><i><sub>STmin</sub></i>) (&lt; PssIEEE4B.vstmax). Typical value = -0,15. Default: nullptr */ + /** \brief Notch filter 1 (high-frequency band): three dB bandwidth (<i>B</i><i><sub>wi</sub></i>). Default: 0.0 */ + CIMPP::Float bwh1; + + /** \brief Notch filter 2 (high-frequency band): three dB bandwidth (<i>B</i><i><sub>wi</sub></i>). Default: 0.0 */ + CIMPP::Float bwh2; + + /** \brief Notch filter 1 (low-frequency band): three dB bandwidth (<i>B</i><i><sub>wi</sub></i>). Default: 0.0 */ + CIMPP::Float bwl1; + + /** \brief Notch filter 2 (low-frequency band): three dB bandwidth (<i>B</i><i><sub>wi</sub></i>). Default: 0.0 */ + CIMPP::Float bwl2; + + /** \brief High band gain (<i>K</i><i><sub>H</sub></i>). Typical value = 120. Default: nullptr */ + CIMPP::PU kh; + + /** \brief High band differential filter gain (<i>K</i><i><sub>H1</sub></i>). Typical value = 66. Default: nullptr */ + CIMPP::PU kh1; + + /** \brief High band first lead-lag blocks coefficient (<i>K</i><i><sub>H11</sub></i>). Typical value = 1. Default: nullptr */ + CIMPP::PU kh11; + + /** \brief High band first lead-lag blocks coefficient (<i>K</i><i><sub>H17</sub></i>). Typical value = 1. Default: nullptr */ + CIMPP::PU kh17; + + /** \brief High band differential filter gain (<i>K</i><i><sub>H2</sub></i>). Typical value = 66. Default: nullptr */ + CIMPP::PU kh2; + + /** \brief Intermediate band gain (<i>K</i><i><sub>I</sub></i>). Typical value = 30. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Intermediate band differential filter gain (<i>K</i><i><sub>I1</sub></i>). Typical value = 66. Default: nullptr */ + CIMPP::PU ki1; + + /** \brief Intermediate band first lead-lag blocks coefficient (<i>K</i><i><sub>I11</sub></i>). Typical value = 1. Default: nullptr */ + CIMPP::PU ki11; + + /** \brief Intermediate band first lead-lag blocks coefficient (<i>K</i><i><sub>I17</sub></i>). Typical value = 1. Default: nullptr */ + CIMPP::PU ki17; + + /** \brief Intermediate band differential filter gain (<i>K</i><i><sub>I2</sub></i>). Typical value = 66. Default: nullptr */ + CIMPP::PU ki2; + + /** \brief Low band gain (<i>K</i><i><sub>L</sub></i>). Typical value = 7.5. Default: nullptr */ + CIMPP::PU kl; + + /** \brief Low band differential filter gain (<i>K</i><i><sub>L1</sub></i>). Typical value = 66. Default: nullptr */ + CIMPP::PU kl1; + + /** \brief Low band first lead-lag blocks coefficient (<i>K</i><i><sub>L11</sub></i>). Typical value = 1. Default: nullptr */ + CIMPP::PU kl11; + + /** \brief Low band first lead-lag blocks coefficient (<i>K</i><i><sub>L17</sub></i>). Typical value = 1. Default: nullptr */ + CIMPP::PU kl17; + + /** \brief Low band differential filter gain (<i>K</i><i><sub>L2</sub></i>). Typical value = 66. Default: nullptr */ + CIMPP::PU kl2; + + /** \brief Notch filter 1 (high-frequency band): filter frequency (<i>omega</i><i><sub>ni</sub></i>). Default: 0.0 */ + CIMPP::Float omeganh1; + + /** \brief Notch filter 2 (high-frequency band): filter frequency (<i>omega</i><i><sub>ni</sub></i>). Default: 0.0 */ + CIMPP::Float omeganh2; + + /** \brief Notch filter 1 (low-frequency band): filter frequency (<i>omega</i><i><sub>ni</sub></i>). Default: 0.0 */ + CIMPP::Float omeganl1; + + /** \brief Notch filter 2 (low-frequency band): filter frequency (<i>omega</i><i><sub>ni</sub></i>). Default: 0.0 */ + CIMPP::Float omeganl2; + + /** \brief High band time constant (<i>T</i><i><sub>H1</sub></i>) (&gt;= 0). Typical value = 0,01513. Default: nullptr */ + CIMPP::Seconds th1; + + /** \brief High band time constant (<i>T</i><i><sub>H10</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds th10; + + /** \brief High band time constant (<i>T</i><i><sub>H11</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds th11; + + /** \brief High band time constant (<i>T</i><i><sub>H12</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds th12; + + /** \brief High band time constant (<i>T</i><i><sub>H2</sub></i>) (&gt;= 0). Typical value = 0,01816. Default: nullptr */ + CIMPP::Seconds th2; + + /** \brief High band time constant (<i>T</i><i><sub>H3</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds th3; + + /** \brief High band time constant (<i>T</i><i><sub>H4</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds th4; + + /** \brief High band time constant (<i>T</i><i><sub>H5</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds th5; + + /** \brief High band time constant (<i>T</i><i><sub>H6</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds th6; + + /** \brief High band time constant (<i>T</i><i><sub>H7</sub></i>) (&gt;= 0). Typical value = 0,01816. Default: nullptr */ + CIMPP::Seconds th7; + + /** \brief High band time constant (<i>T</i><i><sub>H8</sub></i>) (&gt;= 0). Typical value = 0,02179. Default: nullptr */ + CIMPP::Seconds th8; + + /** \brief High band time constant (<i>T</i><i><sub>H9</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds th9; + + /** \brief Intermediate band time constant (<i>T</i><i><sub>I1</sub></i>) (&gt;= 0). Typical value = 0,173. Default: nullptr */ + CIMPP::Seconds ti1; + + /** \brief Intermediate band time constant (<i>T</i><i><sub>I10</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds ti10; + + /** \brief Intermediate band time constant (<i>T</i><i><sub>I11</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds ti11; + + /** \brief Intermediate band time constant (<i>T</i><i><sub>I12</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds ti12; + + /** \brief Intermediate band time constant (<i>T</i><i><sub>I2</sub></i>) (&gt;= 0). Typical value = 0,2075. Default: nullptr */ + CIMPP::Seconds ti2; + + /** \brief Intermediate band time constant (<i>T</i><i><sub>I3</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds ti3; + + /** \brief Intermediate band time constant (<i>T</i><i><sub>I4</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds ti4; + + /** \brief Intermediate band time constant (<i>T</i><i><sub>I5</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds ti5; + + /** \brief Intermediate band time constant (<i>T</i><i><sub>I6</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds ti6; + + /** \brief Intermediate band time constant (<i>T</i><i><sub>I7</sub></i>) (&gt;= 0). Typical value = 0,2075. Default: nullptr */ + CIMPP::Seconds ti7; + + /** \brief Intermediate band time constant (<i>T</i><i><sub>I8</sub></i>) (&gt;= 0). Typical value = 0,2491. Default: nullptr */ + CIMPP::Seconds ti8; + + /** \brief Intermediate band time constant (<i>T</i><i><sub>I9</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds ti9; + + /** \brief Low band time constant (<i>T</i><i><sub>L1</sub></i>) (&gt;= 0). Typical value = 1,73. Default: nullptr */ + CIMPP::Seconds tl1; + + /** \brief Low band time constant (<i>T</i><i><sub>L10</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tl10; + + /** \brief Low band time constant (<i>T</i><i><sub>L11</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tl11; + + /** \brief Low band time constant (<i>T</i><i><sub>L12</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tl12; + + /** \brief Low band time constant (<i>T</i><i><sub>L2</sub></i>) (&gt;= 0). Typical value = 2,075. Default: nullptr */ + CIMPP::Seconds tl2; + + /** \brief Low band time constant (<i>T</i><i><sub>L3</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tl3; + + /** \brief Low band time constant (<i>T</i><i><sub>L4</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tl4; + + /** \brief Low band time constant (<i>T</i><i><sub>L5</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tl5; + + /** \brief Low band time constant (<i>T</i><i><sub>L6</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tl6; + + /** \brief Low band time constant (<i>T</i><i><sub>L7</sub></i>) (&gt;= 0). Typical value = 2,075. Default: nullptr */ + CIMPP::Seconds tl7; + + /** \brief Low band time constant (<i>T</i><i><sub>L8</sub></i>) (&gt;= 0). Typical value = 2,491. Default: nullptr */ + CIMPP::Seconds tl8; + + /** \brief Low band time constant (<i>T</i><i><sub>L9</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tl9; + + /** \brief High band output maximum limit (<i>V</i><i><sub>Hmax</sub></i>) (&gt; PssIEEE4B.vhmin). Typical value = 0,6. Default: nullptr */ + CIMPP::PU vhmax; + + /** \brief High band output minimum limit (<i>V</i><i><sub>Hmin</sub></i>) (&lt; PssIEEE4V.vhmax). Typical value = -0,6. Default: nullptr */ + CIMPP::PU vhmin; + + /** \brief Intermediate band output maximum limit (<i>V</i><i><sub>Imax</sub></i>) (&gt; PssIEEE4B.vimin). Typical value = 0,6. Default: nullptr */ + CIMPP::PU vimax; + + /** \brief Intermediate band output minimum limit (<i>V</i><i><sub>Imin</sub></i>) (&lt; PssIEEE4B.vimax). Typical value = -0,6. Default: nullptr */ + CIMPP::PU vimin; + + /** \brief Low band output maximum limit (<i>V</i><i><sub>Lmax</sub></i>) (&gt; PssIEEE4B.vlmin). Typical value = 0,075. Default: nullptr */ + CIMPP::PU vlmax; + + /** \brief Low band output minimum limit (<i>V</i><i><sub>Lmin</sub></i>) (&lt; PssIEEE4B.vlmax). Typical value = -0,075. Default: nullptr */ + CIMPP::PU vlmin; + + /** \brief PSS output maximum limit (<i>V</i><i><sub>STmax</sub></i>) (&gt; PssIEEE4B.vstmin). Typical value = 0,15. Default: nullptr */ + CIMPP::PU vstmax; + + /** \brief PSS output minimum limit (<i>V</i><i><sub>STmin</sub></i>) (&lt; PssIEEE4B.vstmax). Typical value = -0,15. Default: nullptr */ + CIMPP::PU vstmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PssPTIST1.cpp b/CGMES_3.0.0/PssPTIST1.cpp index c3f386e9f..beea82b09 100644 --- a/CGMES_3.0.0/PssPTIST1.cpp +++ b/CGMES_3.0.0/PssPTIST1.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -PssPTIST1::PssPTIST1() {}; -PssPTIST1::~PssPTIST1() {}; +PssPTIST1::PssPTIST1() {} +PssPTIST1::~PssPTIST1() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ PssPTIST1::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssPTIST1_dtc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_dtc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dtc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_dtf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_dtf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dtf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_dtp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_dtp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dtp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_m(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_m(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->m; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST1_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST1_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssPTIST1_dtc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dtc; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_PssPTIST1_dtc(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST1_dtf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dtf; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_PssPTIST1_dtf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST1_dtp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dtp; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_PssPTIST1_dtp(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST1_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_PssPTIST1_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssPTIST1_m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->m; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_PssPTIST1_m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssPTIST1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_PssPTIST1_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_PssPTIST1_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_PssPTIST1_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST1_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_PssPTIST1_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST1_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_PssPTIST1_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST1_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST1* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_PssPTIST1_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char PssPTIST1::debugName[] = "PssPTIST1"; const char* PssPTIST1::debugString() const { @@ -370,22 +376,22 @@ const char* PssPTIST1::debugString() const void PssPTIST1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssPTIST1"), &PssPTIST1_factory)); + factory_map.emplace("cim:PssPTIST1", &PssPTIST1_factory); } void PssPTIST1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.dtc"), &assign_PssPTIST1_dtc)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.dtf"), &assign_PssPTIST1_dtf)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.dtp"), &assign_PssPTIST1_dtp)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.k"), &assign_PssPTIST1_k)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.m"), &assign_PssPTIST1_m)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.t1"), &assign_PssPTIST1_t1)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.t2"), &assign_PssPTIST1_t2)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.t3"), &assign_PssPTIST1_t3)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.t4"), &assign_PssPTIST1_t4)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.tf"), &assign_PssPTIST1_tf)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST1.tp"), &assign_PssPTIST1_tp)); + assign_map.emplace("cim:PssPTIST1.dtc", &assign_PssPTIST1_dtc); + assign_map.emplace("cim:PssPTIST1.dtf", &assign_PssPTIST1_dtf); + assign_map.emplace("cim:PssPTIST1.dtp", &assign_PssPTIST1_dtp); + assign_map.emplace("cim:PssPTIST1.k", &assign_PssPTIST1_k); + assign_map.emplace("cim:PssPTIST1.m", &assign_PssPTIST1_m); + assign_map.emplace("cim:PssPTIST1.t1", &assign_PssPTIST1_t1); + assign_map.emplace("cim:PssPTIST1.t2", &assign_PssPTIST1_t2); + assign_map.emplace("cim:PssPTIST1.t3", &assign_PssPTIST1_t3); + assign_map.emplace("cim:PssPTIST1.t4", &assign_PssPTIST1_t4); + assign_map.emplace("cim:PssPTIST1.tf", &assign_PssPTIST1_tf); + assign_map.emplace("cim:PssPTIST1.tp", &assign_PssPTIST1_tp); } void PssPTIST1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/PssPTIST1.hpp b/CGMES_3.0.0/PssPTIST1.hpp index b2a3e7ae9..f65e1dc6e 100644 --- a/CGMES_3.0.0/PssPTIST1.hpp +++ b/CGMES_3.0.0/PssPTIST1.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - PTI microprocessor-based stabilizer type 1. - */ + /** \brief PTI microprocessor-based stabilizer type 1. */ class PssPTIST1 : public PowerSystemStabilizerDynamics { public: @@ -28,17 +26,38 @@ namespace CIMPP PssPTIST1(); ~PssPTIST1() override; - CIMPP::Seconds dtc; /* Time step related to activation of controls (<i>deltatc</i>) (&gt;= 0). Typical value = 0,025. Default: nullptr */ - CIMPP::Seconds dtf; /* Time step frequency calculation (<i>deltatf</i>) (&gt;= 0). Typical value = 0,025. Default: nullptr */ - CIMPP::Seconds dtp; /* Time step active power calculation (<i>deltatp</i>) (&gt;= 0). Typical value = 0,0125. Default: nullptr */ - CIMPP::PU k; /* Gain (<i>K</i>). Typical value = 9. Default: nullptr */ - CIMPP::PU m; /* (<i>M</i>). <i>M </i>= 2 x <i>H</i>. Typical value = 5. Default: nullptr */ - CIMPP::Seconds t1; /* Time constant (<i>T1</i>) (&gt;= 0). Typical value = 0,3. Default: nullptr */ - CIMPP::Seconds t2; /* Time constant (<i>T2</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::Seconds t3; /* Time constant (<i>T3</i>) (&gt;= 0). Typical value = 0,2. Default: nullptr */ - CIMPP::Seconds t4; /* Time constant (<i>T4</i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ - CIMPP::Seconds tf; /* Time constant (<i>Tf</i>) (&gt;= 0). Typical value = 0,2. Default: nullptr */ - CIMPP::Seconds tp; /* Time constant (<i>Tp</i>) (&gt;= 0). Typical value = 0,2. Default: nullptr */ + /** \brief Time step related to activation of controls (<i>deltatc</i>) (&gt;= 0). Typical value = 0,025. Default: nullptr */ + CIMPP::Seconds dtc; + + /** \brief Time step frequency calculation (<i>deltatf</i>) (&gt;= 0). Typical value = 0,025. Default: nullptr */ + CIMPP::Seconds dtf; + + /** \brief Time step active power calculation (<i>deltatp</i>) (&gt;= 0). Typical value = 0,0125. Default: nullptr */ + CIMPP::Seconds dtp; + + /** \brief Gain (<i>K</i>). Typical value = 9. Default: nullptr */ + CIMPP::PU k; + + /** \brief (<i>M</i>). <i>M </i>= 2 x <i>H</i>. Typical value = 5. Default: nullptr */ + CIMPP::PU m; + + /** \brief Time constant (<i>T1</i>) (&gt;= 0). Typical value = 0,3. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Time constant (<i>T2</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Time constant (<i>T3</i>) (&gt;= 0). Typical value = 0,2. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Time constant (<i>T4</i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant (<i>Tf</i>) (&gt;= 0). Typical value = 0,2. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Time constant (<i>Tp</i>) (&gt;= 0). Typical value = 0,2. Default: nullptr */ + CIMPP::Seconds tp; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PssPTIST3.cpp b/CGMES_3.0.0/PssPTIST3.cpp index 9323849d0..42a3072e3 100644 --- a/CGMES_3.0.0/PssPTIST3.cpp +++ b/CGMES_3.0.0/PssPTIST3.cpp @@ -8,45 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -PssPTIST3::PssPTIST3() {}; -PssPTIST3::~PssPTIST3() {}; +PssPTIST3::PssPTIST3() {} +PssPTIST3::~PssPTIST3() {} static const std::list PossibleProfilesForClass = { @@ -106,454 +72,486 @@ PssPTIST3::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssPTIST3_a0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_a0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_a1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_a1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_a2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_a2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_a3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_a3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_a4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_a4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_a5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_a5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->a5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_al(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_al(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->al; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_athres(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_athres(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->athres; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_b0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_b0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_b1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_b1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_b2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_b2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_b3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_b3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_b4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_b4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_b5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_b5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_dl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_dl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_dtc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_dtc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dtc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_dtf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_dtf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dtf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_dtp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_dtp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dtp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_isw(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_isw(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->isw; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_lthres(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_lthres(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->lthres; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_m(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_m(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->m; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_nav(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_nav(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nav; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_ncl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_ncl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ncl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_ncr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_ncr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ncr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_tf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_tf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssPTIST3_tp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssPTIST3_tp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssPTIST3_a0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a0; if (!buffer.str().empty()) @@ -567,7 +565,8 @@ bool get_PssPTIST3_a0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a1; if (!buffer.str().empty()) @@ -581,7 +580,8 @@ bool get_PssPTIST3_a1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a2; if (!buffer.str().empty()) @@ -595,7 +595,8 @@ bool get_PssPTIST3_a2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_a3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a3; if (!buffer.str().empty()) @@ -609,7 +610,8 @@ bool get_PssPTIST3_a3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_a4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a4; if (!buffer.str().empty()) @@ -623,7 +625,8 @@ bool get_PssPTIST3_a4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_a5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->a5; if (!buffer.str().empty()) @@ -637,7 +640,8 @@ bool get_PssPTIST3_a5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_al(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->al; if (!buffer.str().empty()) @@ -651,7 +655,8 @@ bool get_PssPTIST3_al(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_athres(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->athres; if (!buffer.str().empty()) @@ -665,7 +670,8 @@ bool get_PssPTIST3_athres(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_PssPTIST3_b0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b0; if (!buffer.str().empty()) @@ -679,7 +685,8 @@ bool get_PssPTIST3_b0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_b1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b1; if (!buffer.str().empty()) @@ -693,7 +700,8 @@ bool get_PssPTIST3_b1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_b2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b2; if (!buffer.str().empty()) @@ -707,7 +715,8 @@ bool get_PssPTIST3_b2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_b3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b3; if (!buffer.str().empty()) @@ -721,7 +730,8 @@ bool get_PssPTIST3_b3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_b4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b4; if (!buffer.str().empty()) @@ -735,7 +745,8 @@ bool get_PssPTIST3_b4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_b5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b5; if (!buffer.str().empty()) @@ -749,7 +760,8 @@ bool get_PssPTIST3_b5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_dl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dl; if (!buffer.str().empty()) @@ -763,7 +775,8 @@ bool get_PssPTIST3_dl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_dtc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dtc; if (!buffer.str().empty()) @@ -777,7 +790,8 @@ bool get_PssPTIST3_dtc(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST3_dtf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dtf; if (!buffer.str().empty()) @@ -791,7 +805,8 @@ bool get_PssPTIST3_dtf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST3_dtp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dtp; if (!buffer.str().empty()) @@ -805,7 +820,8 @@ bool get_PssPTIST3_dtp(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST3_isw(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->isw; if (!buffer.str().empty()) @@ -819,7 +835,8 @@ bool get_PssPTIST3_isw(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST3_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -833,7 +850,8 @@ bool get_PssPTIST3_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssPTIST3_lthres(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lthres; if (!buffer.str().empty()) @@ -847,7 +865,8 @@ bool get_PssPTIST3_lthres(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_PssPTIST3_m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->m; if (!buffer.str().empty()) @@ -861,7 +880,8 @@ bool get_PssPTIST3_m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssPTIST3_nav(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nav; if (!buffer.str().empty()) @@ -875,7 +895,8 @@ bool get_PssPTIST3_nav(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST3_ncl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ncl; if (!buffer.str().empty()) @@ -889,7 +910,8 @@ bool get_PssPTIST3_ncl(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST3_ncr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ncr; if (!buffer.str().empty()) @@ -903,7 +925,8 @@ bool get_PssPTIST3_ncr(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssPTIST3_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -917,7 +940,8 @@ bool get_PssPTIST3_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssPTIST3_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -931,7 +955,8 @@ bool get_PssPTIST3_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -945,7 +970,8 @@ bool get_PssPTIST3_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -959,7 +985,8 @@ bool get_PssPTIST3_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -973,7 +1000,8 @@ bool get_PssPTIST3_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -987,7 +1015,8 @@ bool get_PssPTIST3_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -1001,7 +1030,8 @@ bool get_PssPTIST3_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf; if (!buffer.str().empty()) @@ -1015,7 +1045,8 @@ bool get_PssPTIST3_tf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssPTIST3_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssPTIST3* element = dynamic_cast(BaseClass_ptr1)) + const PssPTIST3* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tp; if (!buffer.str().empty()) @@ -1027,8 +1058,6 @@ bool get_PssPTIST3_tp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char PssPTIST3::debugName[] = "PssPTIST3"; const char* PssPTIST3::debugString() const { @@ -1037,45 +1066,45 @@ const char* PssPTIST3::debugString() const void PssPTIST3::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssPTIST3"), &PssPTIST3_factory)); + factory_map.emplace("cim:PssPTIST3", &PssPTIST3_factory); } void PssPTIST3::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.a0"), &assign_PssPTIST3_a0)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.a1"), &assign_PssPTIST3_a1)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.a2"), &assign_PssPTIST3_a2)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.a3"), &assign_PssPTIST3_a3)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.a4"), &assign_PssPTIST3_a4)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.a5"), &assign_PssPTIST3_a5)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.al"), &assign_PssPTIST3_al)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.athres"), &assign_PssPTIST3_athres)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.b0"), &assign_PssPTIST3_b0)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.b1"), &assign_PssPTIST3_b1)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.b2"), &assign_PssPTIST3_b2)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.b3"), &assign_PssPTIST3_b3)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.b4"), &assign_PssPTIST3_b4)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.b5"), &assign_PssPTIST3_b5)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.dl"), &assign_PssPTIST3_dl)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.dtc"), &assign_PssPTIST3_dtc)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.dtf"), &assign_PssPTIST3_dtf)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.dtp"), &assign_PssPTIST3_dtp)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.isw"), &assign_PssPTIST3_isw)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.k"), &assign_PssPTIST3_k)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.lthres"), &assign_PssPTIST3_lthres)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.m"), &assign_PssPTIST3_m)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.nav"), &assign_PssPTIST3_nav)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.ncl"), &assign_PssPTIST3_ncl)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.ncr"), &assign_PssPTIST3_ncr)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.pmin"), &assign_PssPTIST3_pmin)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.t1"), &assign_PssPTIST3_t1)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.t2"), &assign_PssPTIST3_t2)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.t3"), &assign_PssPTIST3_t3)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.t4"), &assign_PssPTIST3_t4)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.t5"), &assign_PssPTIST3_t5)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.t6"), &assign_PssPTIST3_t6)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.tf"), &assign_PssPTIST3_tf)); - assign_map.insert(std::make_pair(std::string("cim:PssPTIST3.tp"), &assign_PssPTIST3_tp)); + assign_map.emplace("cim:PssPTIST3.a0", &assign_PssPTIST3_a0); + assign_map.emplace("cim:PssPTIST3.a1", &assign_PssPTIST3_a1); + assign_map.emplace("cim:PssPTIST3.a2", &assign_PssPTIST3_a2); + assign_map.emplace("cim:PssPTIST3.a3", &assign_PssPTIST3_a3); + assign_map.emplace("cim:PssPTIST3.a4", &assign_PssPTIST3_a4); + assign_map.emplace("cim:PssPTIST3.a5", &assign_PssPTIST3_a5); + assign_map.emplace("cim:PssPTIST3.al", &assign_PssPTIST3_al); + assign_map.emplace("cim:PssPTIST3.athres", &assign_PssPTIST3_athres); + assign_map.emplace("cim:PssPTIST3.b0", &assign_PssPTIST3_b0); + assign_map.emplace("cim:PssPTIST3.b1", &assign_PssPTIST3_b1); + assign_map.emplace("cim:PssPTIST3.b2", &assign_PssPTIST3_b2); + assign_map.emplace("cim:PssPTIST3.b3", &assign_PssPTIST3_b3); + assign_map.emplace("cim:PssPTIST3.b4", &assign_PssPTIST3_b4); + assign_map.emplace("cim:PssPTIST3.b5", &assign_PssPTIST3_b5); + assign_map.emplace("cim:PssPTIST3.dl", &assign_PssPTIST3_dl); + assign_map.emplace("cim:PssPTIST3.dtc", &assign_PssPTIST3_dtc); + assign_map.emplace("cim:PssPTIST3.dtf", &assign_PssPTIST3_dtf); + assign_map.emplace("cim:PssPTIST3.dtp", &assign_PssPTIST3_dtp); + assign_map.emplace("cim:PssPTIST3.isw", &assign_PssPTIST3_isw); + assign_map.emplace("cim:PssPTIST3.k", &assign_PssPTIST3_k); + assign_map.emplace("cim:PssPTIST3.lthres", &assign_PssPTIST3_lthres); + assign_map.emplace("cim:PssPTIST3.m", &assign_PssPTIST3_m); + assign_map.emplace("cim:PssPTIST3.nav", &assign_PssPTIST3_nav); + assign_map.emplace("cim:PssPTIST3.ncl", &assign_PssPTIST3_ncl); + assign_map.emplace("cim:PssPTIST3.ncr", &assign_PssPTIST3_ncr); + assign_map.emplace("cim:PssPTIST3.pmin", &assign_PssPTIST3_pmin); + assign_map.emplace("cim:PssPTIST3.t1", &assign_PssPTIST3_t1); + assign_map.emplace("cim:PssPTIST3.t2", &assign_PssPTIST3_t2); + assign_map.emplace("cim:PssPTIST3.t3", &assign_PssPTIST3_t3); + assign_map.emplace("cim:PssPTIST3.t4", &assign_PssPTIST3_t4); + assign_map.emplace("cim:PssPTIST3.t5", &assign_PssPTIST3_t5); + assign_map.emplace("cim:PssPTIST3.t6", &assign_PssPTIST3_t6); + assign_map.emplace("cim:PssPTIST3.tf", &assign_PssPTIST3_tf); + assign_map.emplace("cim:PssPTIST3.tp", &assign_PssPTIST3_tp); } void PssPTIST3::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/PssPTIST3.hpp b/CGMES_3.0.0/PssPTIST3.hpp index cfcfac92e..1bcfc4dff 100644 --- a/CGMES_3.0.0/PssPTIST3.hpp +++ b/CGMES_3.0.0/PssPTIST3.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - PTI microprocessor-based stabilizer type 3. - */ + /** \brief PTI microprocessor-based stabilizer type 3. */ class PssPTIST3 : public PowerSystemStabilizerDynamics { public: @@ -30,40 +28,107 @@ namespace CIMPP PssPTIST3(); ~PssPTIST3() override; - CIMPP::PU a0; /* Filter coefficient (<i>A0</i>). Default: nullptr */ - CIMPP::PU a1; /* Limiter (<i>Al</i>). Default: nullptr */ - CIMPP::PU a2; /* Filter coefficient (<i>A2</i>). Default: nullptr */ - CIMPP::PU a3; /* Filter coefficient (<i>A3</i>). Default: nullptr */ - CIMPP::PU a4; /* Filter coefficient (<i>A4</i>). Default: nullptr */ - CIMPP::PU a5; /* Filter coefficient (<i>A5</i>). Default: nullptr */ - CIMPP::PU al; /* Limiter (<i>Al</i>). Default: nullptr */ - CIMPP::PU athres; /* Threshold value above which output averaging will be bypassed (<i>Athres</i>). Typical value = 0,005. Default: nullptr */ - CIMPP::PU b0; /* Filter coefficient (<i>B0</i>). Default: nullptr */ - CIMPP::PU b1; /* Filter coefficient (<i>B1</i>). Default: nullptr */ - CIMPP::PU b2; /* Filter coefficient (<i>B2</i>). Default: nullptr */ - CIMPP::PU b3; /* Filter coefficient (<i>B3</i>). Default: nullptr */ - CIMPP::PU b4; /* Filter coefficient (<i>B4</i>). Default: nullptr */ - CIMPP::PU b5; /* Filter coefficient (<i>B5</i>). Default: nullptr */ - CIMPP::PU dl; /* Limiter (<i>Dl</i>). Default: nullptr */ - CIMPP::Seconds dtc; /* Time step related to activation of controls (<i>deltatc</i>) (&gt;= 0). Typical value = 0,025 (0,03 for 50 Hz). Default: nullptr */ - CIMPP::Seconds dtf; /* Time step frequency calculation (<i>deltatf</i>) (&gt;= 0). Typical value = 0,025 (0,03 for 50 Hz). Default: nullptr */ - CIMPP::Seconds dtp; /* Time step active power calculation (<i>deltatp</i>) (&gt;= 0). Typical value = 0,0125 (0,015 for 50 Hz). Default: nullptr */ - CIMPP::Boolean isw; /* Digital/analogue output switch (<i>Isw</i>). true = produce analogue output false = convert to digital output, using tap selection table. Default: false */ - CIMPP::PU k; /* Gain (<i>K</i>). Typical value = 9. Default: nullptr */ - CIMPP::PU lthres; /* Threshold value (<i>Lthres</i>). Default: nullptr */ - CIMPP::PU m; /* (<i>M</i>). <i>M</i> = 2 x <i>H</i>. Typical value = 5. Default: nullptr */ - CIMPP::Float nav; /* Number of control outputs to average (<i>NAV</i>) (1 &lt;= <i>NAV</i> &lt;= 16). Typical value = 4. Default: 0.0 */ - CIMPP::Float ncl; /* Number of counts at limit to active limit function (<i>NCL</i>) (&gt; 0). Default: 0.0 */ - CIMPP::Float ncr; /* Number of counts until reset after limit function is triggered (<i>NCR</i>). Default: 0.0 */ - CIMPP::PU pmin; /* (<i>Pmin</i>). Default: nullptr */ - CIMPP::Seconds t1; /* Time constant (<i>T1</i>) (&gt;= 0). Typical value = 0,3. Default: nullptr */ - CIMPP::Seconds t2; /* Time constant (<i>T2</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ - CIMPP::Seconds t3; /* Time constant (<i>T3</i>) (&gt;= 0). Typical value = 0,2. Default: nullptr */ - CIMPP::Seconds t4; /* Time constant (<i>T4</i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ - CIMPP::Seconds t5; /* Time constant (<i>T5</i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds t6; /* Time constant (<i>T6</i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds tf; /* Time constant (<i>Tf</i>) (&gt;= 0). Typical value = 0,2. Default: nullptr */ - CIMPP::Seconds tp; /* Time constant (<i>Tp</i>) (&gt;= 0). Typical value = 0,2. Default: nullptr */ + /** \brief Filter coefficient (<i>A0</i>). Default: nullptr */ + CIMPP::PU a0; + + /** \brief Limiter (<i>Al</i>). Default: nullptr */ + CIMPP::PU a1; + + /** \brief Filter coefficient (<i>A2</i>). Default: nullptr */ + CIMPP::PU a2; + + /** \brief Filter coefficient (<i>A3</i>). Default: nullptr */ + CIMPP::PU a3; + + /** \brief Filter coefficient (<i>A4</i>). Default: nullptr */ + CIMPP::PU a4; + + /** \brief Filter coefficient (<i>A5</i>). Default: nullptr */ + CIMPP::PU a5; + + /** \brief Limiter (<i>Al</i>). Default: nullptr */ + CIMPP::PU al; + + /** \brief Threshold value above which output averaging will be bypassed (<i>Athres</i>). Typical value = 0,005. Default: nullptr */ + CIMPP::PU athres; + + /** \brief Filter coefficient (<i>B0</i>). Default: nullptr */ + CIMPP::PU b0; + + /** \brief Filter coefficient (<i>B1</i>). Default: nullptr */ + CIMPP::PU b1; + + /** \brief Filter coefficient (<i>B2</i>). Default: nullptr */ + CIMPP::PU b2; + + /** \brief Filter coefficient (<i>B3</i>). Default: nullptr */ + CIMPP::PU b3; + + /** \brief Filter coefficient (<i>B4</i>). Default: nullptr */ + CIMPP::PU b4; + + /** \brief Filter coefficient (<i>B5</i>). Default: nullptr */ + CIMPP::PU b5; + + /** \brief Limiter (<i>Dl</i>). Default: nullptr */ + CIMPP::PU dl; + + /** \brief Time step related to activation of controls (<i>deltatc</i>) (&gt;= 0). Typical value = 0,025 (0,03 for 50 Hz). Default: nullptr */ + CIMPP::Seconds dtc; + + /** \brief Time step frequency calculation (<i>deltatf</i>) (&gt;= 0). Typical value = 0,025 (0,03 for 50 Hz). Default: nullptr */ + CIMPP::Seconds dtf; + + /** \brief Time step active power calculation (<i>deltatp</i>) (&gt;= 0). Typical value = 0,0125 (0,015 for 50 Hz). Default: nullptr */ + CIMPP::Seconds dtp; + + /** \brief Digital/analogue output switch (<i>Isw</i>). true = produce analogue output false = convert to digital output, using tap selection table. Default: false */ + CIMPP::Boolean isw; + + /** \brief Gain (<i>K</i>). Typical value = 9. Default: nullptr */ + CIMPP::PU k; + + /** \brief Threshold value (<i>Lthres</i>). Default: nullptr */ + CIMPP::PU lthres; + + /** \brief (<i>M</i>). <i>M</i> = 2 x <i>H</i>. Typical value = 5. Default: nullptr */ + CIMPP::PU m; + + /** \brief Number of control outputs to average (<i>NAV</i>) (1 &lt;= <i>NAV</i> &lt;= 16). Typical value = 4. Default: 0.0 */ + CIMPP::Float nav; + + /** \brief Number of counts at limit to active limit function (<i>NCL</i>) (&gt; 0). Default: 0.0 */ + CIMPP::Float ncl; + + /** \brief Number of counts until reset after limit function is triggered (<i>NCR</i>). Default: 0.0 */ + CIMPP::Float ncr; + + /** \brief (<i>Pmin</i>). Default: nullptr */ + CIMPP::PU pmin; + + /** \brief Time constant (<i>T1</i>) (&gt;= 0). Typical value = 0,3. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Time constant (<i>T2</i>) (&gt;= 0). Typical value = 1. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Time constant (<i>T3</i>) (&gt;= 0). Typical value = 0,2. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Time constant (<i>T4</i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Time constant (<i>T5</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Time constant (<i>T6</i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Time constant (<i>Tf</i>) (&gt;= 0). Typical value = 0,2. Default: nullptr */ + CIMPP::Seconds tf; + + /** \brief Time constant (<i>Tp</i>) (&gt;= 0). Typical value = 0,2. Default: nullptr */ + CIMPP::Seconds tp; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PssRQB.cpp b/CGMES_3.0.0/PssRQB.cpp index 430a24996..db675faa2 100644 --- a/CGMES_3.0.0/PssRQB.cpp +++ b/CGMES_3.0.0/PssRQB.cpp @@ -8,21 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -PssRQB::PssRQB() {}; -PssRQB::~PssRQB() {}; +PssRQB::PssRQB() {} +PssRQB::~PssRQB() {} static const std::list PossibleProfilesForClass = { @@ -58,142 +48,150 @@ PssRQB::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssRQB_kdpm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssRQB_kdpm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssRQB* element = dynamic_cast(BaseClass_ptr1)) + PssRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kdpm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssRQB_ki2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssRQB_ki2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssRQB* element = dynamic_cast(BaseClass_ptr1)) + PssRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssRQB_ki3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssRQB_ki3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssRQB* element = dynamic_cast(BaseClass_ptr1)) + PssRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssRQB_ki4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssRQB_ki4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssRQB* element = dynamic_cast(BaseClass_ptr1)) + PssRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssRQB_sibv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssRQB_sibv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssRQB* element = dynamic_cast(BaseClass_ptr1)) + PssRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->sibv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssRQB_t4f(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssRQB_t4f(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssRQB* element = dynamic_cast(BaseClass_ptr1)) + PssRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4f; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssRQB_t4m(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssRQB_t4m(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssRQB* element = dynamic_cast(BaseClass_ptr1)) + PssRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4m; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssRQB_t4mom(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssRQB_t4mom(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssRQB* element = dynamic_cast(BaseClass_ptr1)) + PssRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4mom; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssRQB_tomd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssRQB_tomd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssRQB* element = dynamic_cast(BaseClass_ptr1)) + PssRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tomd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssRQB_tomsl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssRQB_tomsl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssRQB* element = dynamic_cast(BaseClass_ptr1)) + PssRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tomsl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssRQB_kdpm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssRQB* element = dynamic_cast(BaseClass_ptr1)) + const PssRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdpm; if (!buffer.str().empty()) @@ -207,7 +205,8 @@ bool get_PssRQB_kdpm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssRQB_ki2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssRQB* element = dynamic_cast(BaseClass_ptr1)) + const PssRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki2; if (!buffer.str().empty()) @@ -221,7 +220,8 @@ bool get_PssRQB_ki2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssRQB_ki3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssRQB* element = dynamic_cast(BaseClass_ptr1)) + const PssRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki3; if (!buffer.str().empty()) @@ -235,7 +235,8 @@ bool get_PssRQB_ki3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssRQB_ki4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssRQB* element = dynamic_cast(BaseClass_ptr1)) + const PssRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki4; if (!buffer.str().empty()) @@ -249,7 +250,8 @@ bool get_PssRQB_ki4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssRQB_sibv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssRQB* element = dynamic_cast(BaseClass_ptr1)) + const PssRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->sibv; if (!buffer.str().empty()) @@ -263,7 +265,8 @@ bool get_PssRQB_sibv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssRQB_t4f(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssRQB* element = dynamic_cast(BaseClass_ptr1)) + const PssRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4f; if (!buffer.str().empty()) @@ -277,7 +280,8 @@ bool get_PssRQB_t4f(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssRQB_t4m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssRQB* element = dynamic_cast(BaseClass_ptr1)) + const PssRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4m; if (!buffer.str().empty()) @@ -291,7 +295,8 @@ bool get_PssRQB_t4m(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssRQB_t4mom(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssRQB* element = dynamic_cast(BaseClass_ptr1)) + const PssRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4mom; if (!buffer.str().empty()) @@ -305,7 +310,8 @@ bool get_PssRQB_t4mom(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssRQB_tomd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssRQB* element = dynamic_cast(BaseClass_ptr1)) + const PssRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tomd; if (!buffer.str().empty()) @@ -319,7 +325,8 @@ bool get_PssRQB_tomd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssRQB_tomsl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssRQB* element = dynamic_cast(BaseClass_ptr1)) + const PssRQB* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tomsl; if (!buffer.str().empty()) @@ -331,8 +338,6 @@ bool get_PssRQB_tomsl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char PssRQB::debugName[] = "PssRQB"; const char* PssRQB::debugString() const { @@ -341,21 +346,21 @@ const char* PssRQB::debugString() const void PssRQB::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssRQB"), &PssRQB_factory)); + factory_map.emplace("cim:PssRQB", &PssRQB_factory); } void PssRQB::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssRQB.kdpm"), &assign_PssRQB_kdpm)); - assign_map.insert(std::make_pair(std::string("cim:PssRQB.ki2"), &assign_PssRQB_ki2)); - assign_map.insert(std::make_pair(std::string("cim:PssRQB.ki3"), &assign_PssRQB_ki3)); - assign_map.insert(std::make_pair(std::string("cim:PssRQB.ki4"), &assign_PssRQB_ki4)); - assign_map.insert(std::make_pair(std::string("cim:PssRQB.sibv"), &assign_PssRQB_sibv)); - assign_map.insert(std::make_pair(std::string("cim:PssRQB.t4f"), &assign_PssRQB_t4f)); - assign_map.insert(std::make_pair(std::string("cim:PssRQB.t4m"), &assign_PssRQB_t4m)); - assign_map.insert(std::make_pair(std::string("cim:PssRQB.t4mom"), &assign_PssRQB_t4mom)); - assign_map.insert(std::make_pair(std::string("cim:PssRQB.tomd"), &assign_PssRQB_tomd)); - assign_map.insert(std::make_pair(std::string("cim:PssRQB.tomsl"), &assign_PssRQB_tomsl)); + assign_map.emplace("cim:PssRQB.kdpm", &assign_PssRQB_kdpm); + assign_map.emplace("cim:PssRQB.ki2", &assign_PssRQB_ki2); + assign_map.emplace("cim:PssRQB.ki3", &assign_PssRQB_ki3); + assign_map.emplace("cim:PssRQB.ki4", &assign_PssRQB_ki4); + assign_map.emplace("cim:PssRQB.sibv", &assign_PssRQB_sibv); + assign_map.emplace("cim:PssRQB.t4f", &assign_PssRQB_t4f); + assign_map.emplace("cim:PssRQB.t4m", &assign_PssRQB_t4m); + assign_map.emplace("cim:PssRQB.t4mom", &assign_PssRQB_t4mom); + assign_map.emplace("cim:PssRQB.tomd", &assign_PssRQB_tomd); + assign_map.emplace("cim:PssRQB.tomsl", &assign_PssRQB_tomsl); } void PssRQB::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/PssRQB.hpp b/CGMES_3.0.0/PssRQB.hpp index 3519948e4..7a962ad5a 100644 --- a/CGMES_3.0.0/PssRQB.hpp +++ b/CGMES_3.0.0/PssRQB.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Power system stabilizer type RQB. This power system stabilizer is intended to be used together with excitation system type ExcRQB, which is primarily used in nuclear or thermal generating units. - */ + /** \brief Power system stabilizer type RQB. This power system stabilizer is intended to be used together with excitation system type ExcRQB, which is primarily used in nuclear or thermal generating units. */ class PssRQB : public PowerSystemStabilizerDynamics { public: @@ -29,16 +27,35 @@ namespace CIMPP PssRQB(); ~PssRQB() override; - CIMPP::Float kdpm; /* Lead lag gain (<i>KDPM</i>). Typical value = 0,185. Default: 0.0 */ - CIMPP::Float ki2; /* Speed input gain (<i>Ki2</i>). Typical value = 3,43. Default: 0.0 */ - CIMPP::Float ki3; /* Electrical power input gain (<i>Ki3</i>). Typical value = -11,45. Default: 0.0 */ - CIMPP::Float ki4; /* Mechanical power input gain (<i>Ki4</i>). Typical value = 11,86. Default: 0.0 */ - CIMPP::PU sibv; /* Speed deadband (<i>SIBV</i>). Typical value = 0,006. Default: nullptr */ - CIMPP::Seconds t4f; /* Lead lag time constant (<i>T4F</i>) (&gt;= 0). Typical value = 0,045. Default: nullptr */ - CIMPP::Seconds t4m; /* Input time constant (<i>T4M</i>) (&gt;= 0). Typical value = 5. Default: nullptr */ - CIMPP::Seconds t4mom; /* Speed time constant (<i>T4MOM</i>) (&gt;= 0). Typical value = 1,27. Default: nullptr */ - CIMPP::Seconds tomd; /* Speed delay (<i>TOMD</i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ - CIMPP::Seconds tomsl; /* Speed time constant (<i>TOMSL</i>) (&gt;= 0). Typical value = 0,04. Default: nullptr */ + /** \brief Lead lag gain (<i>KDPM</i>). Typical value = 0,185. Default: 0.0 */ + CIMPP::Float kdpm; + + /** \brief Speed input gain (<i>Ki2</i>). Typical value = 3,43. Default: 0.0 */ + CIMPP::Float ki2; + + /** \brief Electrical power input gain (<i>Ki3</i>). Typical value = -11,45. Default: 0.0 */ + CIMPP::Float ki3; + + /** \brief Mechanical power input gain (<i>Ki4</i>). Typical value = 11,86. Default: 0.0 */ + CIMPP::Float ki4; + + /** \brief Speed deadband (<i>SIBV</i>). Typical value = 0,006. Default: nullptr */ + CIMPP::PU sibv; + + /** \brief Lead lag time constant (<i>T4F</i>) (&gt;= 0). Typical value = 0,045. Default: nullptr */ + CIMPP::Seconds t4f; + + /** \brief Input time constant (<i>T4M</i>) (&gt;= 0). Typical value = 5. Default: nullptr */ + CIMPP::Seconds t4m; + + /** \brief Speed time constant (<i>T4MOM</i>) (&gt;= 0). Typical value = 1,27. Default: nullptr */ + CIMPP::Seconds t4mom; + + /** \brief Speed delay (<i>TOMD</i>) (&gt;= 0). Typical value = 0,02. Default: nullptr */ + CIMPP::Seconds tomd; + + /** \brief Speed time constant (<i>TOMSL</i>) (&gt;= 0). Typical value = 0,04. Default: nullptr */ + CIMPP::Seconds tomsl; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PssSB4.cpp b/CGMES_3.0.0/PssSB4.cpp index 886022e1c..ff54c429f 100644 --- a/CGMES_3.0.0/PssSB4.cpp +++ b/CGMES_3.0.0/PssSB4.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PssSB4::PssSB4() {}; -PssSB4::~PssSB4() {}; +PssSB4::PssSB4() {} +PssSB4::~PssSB4() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ PssSB4::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssSB4_kx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_kx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_ta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_ta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_tb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_tb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_te(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_te(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->te; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_tt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_tt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_tx1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_tx1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tx1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_tx2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_tx2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tx2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_vsmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_vsmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSB4_vsmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSB4_vsmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSB4* element = dynamic_cast(BaseClass_ptr1)) + PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssSB4_kx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kx; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_PssSB4_kx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSB4_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ta; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_PssSB4_ta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSB4_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tb; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_PssSB4_tb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSB4_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tc; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_PssSB4_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSB4_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_PssSB4_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSB4_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->te; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_PssSB4_te(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSB4_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tt; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_PssSB4_tt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSB4_tx1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tx1; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_PssSB4_tx1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSB4_tx2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tx2; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_PssSB4_tx2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSB4_vsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmax; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_PssSB4_vsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssSB4_vsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSB4* element = dynamic_cast(BaseClass_ptr1)) + const PssSB4* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmin; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_PssSB4_vsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char PssSB4::debugName[] = "PssSB4"; const char* PssSB4::debugString() const { @@ -370,22 +376,22 @@ const char* PssSB4::debugString() const void PssSB4::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssSB4"), &PssSB4_factory)); + factory_map.emplace("cim:PssSB4", &PssSB4_factory); } void PssSB4::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssSB4.kx"), &assign_PssSB4_kx)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.ta"), &assign_PssSB4_ta)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.tb"), &assign_PssSB4_tb)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.tc"), &assign_PssSB4_tc)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.td"), &assign_PssSB4_td)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.te"), &assign_PssSB4_te)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.tt"), &assign_PssSB4_tt)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.tx1"), &assign_PssSB4_tx1)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.tx2"), &assign_PssSB4_tx2)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.vsmax"), &assign_PssSB4_vsmax)); - assign_map.insert(std::make_pair(std::string("cim:PssSB4.vsmin"), &assign_PssSB4_vsmin)); + assign_map.emplace("cim:PssSB4.kx", &assign_PssSB4_kx); + assign_map.emplace("cim:PssSB4.ta", &assign_PssSB4_ta); + assign_map.emplace("cim:PssSB4.tb", &assign_PssSB4_tb); + assign_map.emplace("cim:PssSB4.tc", &assign_PssSB4_tc); + assign_map.emplace("cim:PssSB4.td", &assign_PssSB4_td); + assign_map.emplace("cim:PssSB4.te", &assign_PssSB4_te); + assign_map.emplace("cim:PssSB4.tt", &assign_PssSB4_tt); + assign_map.emplace("cim:PssSB4.tx1", &assign_PssSB4_tx1); + assign_map.emplace("cim:PssSB4.tx2", &assign_PssSB4_tx2); + assign_map.emplace("cim:PssSB4.vsmax", &assign_PssSB4_vsmax); + assign_map.emplace("cim:PssSB4.vsmin", &assign_PssSB4_vsmin); } void PssSB4::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/PssSB4.hpp b/CGMES_3.0.0/PssSB4.hpp index d660f2927..e9c4b603d 100644 --- a/CGMES_3.0.0/PssSB4.hpp +++ b/CGMES_3.0.0/PssSB4.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Power sensitive stabilizer model. - */ + /** \brief Power sensitive stabilizer model. */ class PssSB4 : public PowerSystemStabilizerDynamics { public: @@ -28,17 +26,38 @@ namespace CIMPP PssSB4(); ~PssSB4() override; - CIMPP::PU kx; /* Gain (<i>Kx</i>). Typical value = 2,7. Default: nullptr */ - CIMPP::Seconds ta; /* Time constant (<i>Ta</i>) (&gt;= 0). Typical value = 0,37. Default: nullptr */ - CIMPP::Seconds tb; /* Time constant (<i>Tb</i>) (&gt;= 0). Typical value = 0,37. Default: nullptr */ - CIMPP::Seconds tc; /* Time constant (<i>Tc</i>) (&gt;= 0). Typical value = 0,035. Default: nullptr */ - CIMPP::Seconds td; /* Time constant (<i>Td</i>) (&gt;= 0). Typical value = 0,0. Default: nullptr */ - CIMPP::Seconds te; /* Time constant (<i>Te</i>) (&gt;= 0). Typical value = 0,0169. Default: nullptr */ - CIMPP::Seconds tt; /* Time constant (<i>Tt</i>) (&gt;= 0). Typical value = 0,18. Default: nullptr */ - CIMPP::Seconds tx1; /* Reset time constant (<i>Tx1</i>) (&gt;= 0). Typical value = 0,035. Default: nullptr */ - CIMPP::Seconds tx2; /* Time constant (<i>Tx2</i>) (&gt;= 0). Typical value = 5,0. Default: nullptr */ - CIMPP::PU vsmax; /* Limiter (<i>Vsmax</i>) (&gt; PssSB4.vsmin). Typical value = 0,062. Default: nullptr */ - CIMPP::PU vsmin; /* Limiter (<i>Vsmin</i>) (&lt; PssSB4.vsmax). Typical value = -0,062. Default: nullptr */ + /** \brief Gain (<i>Kx</i>). Typical value = 2,7. Default: nullptr */ + CIMPP::PU kx; + + /** \brief Time constant (<i>Ta</i>) (&gt;= 0). Typical value = 0,37. Default: nullptr */ + CIMPP::Seconds ta; + + /** \brief Time constant (<i>Tb</i>) (&gt;= 0). Typical value = 0,37. Default: nullptr */ + CIMPP::Seconds tb; + + /** \brief Time constant (<i>Tc</i>) (&gt;= 0). Typical value = 0,035. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Time constant (<i>Td</i>) (&gt;= 0). Typical value = 0,0. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Time constant (<i>Te</i>) (&gt;= 0). Typical value = 0,0169. Default: nullptr */ + CIMPP::Seconds te; + + /** \brief Time constant (<i>Tt</i>) (&gt;= 0). Typical value = 0,18. Default: nullptr */ + CIMPP::Seconds tt; + + /** \brief Reset time constant (<i>Tx1</i>) (&gt;= 0). Typical value = 0,035. Default: nullptr */ + CIMPP::Seconds tx1; + + /** \brief Time constant (<i>Tx2</i>) (&gt;= 0). Typical value = 5,0. Default: nullptr */ + CIMPP::Seconds tx2; + + /** \brief Limiter (<i>Vsmax</i>) (&gt; PssSB4.vsmin). Typical value = 0,062. Default: nullptr */ + CIMPP::PU vsmax; + + /** \brief Limiter (<i>Vsmin</i>) (&lt; PssSB4.vsmax). Typical value = -0,062. Default: nullptr */ + CIMPP::PU vsmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PssSH.cpp b/CGMES_3.0.0/PssSH.cpp index eb34d8442..5e06369a1 100644 --- a/CGMES_3.0.0/PssSH.cpp +++ b/CGMES_3.0.0/PssSH.cpp @@ -8,24 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PssSH::PssSH() {}; -PssSH::~PssSH() {}; +PssSH::PssSH() {} +PssSH::~PssSH() {} static const std::list PossibleProfilesForClass = { @@ -64,181 +51,192 @@ PssSH::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssSH_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_k0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_k0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_k4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_td(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_td(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->td; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_vsmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_vsmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSH_vsmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSH_vsmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSH* element = dynamic_cast(BaseClass_ptr1)) + PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssSH_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -252,7 +250,8 @@ bool get_PssSH_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_k0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k0; if (!buffer.str().empty()) @@ -266,7 +265,8 @@ bool get_PssSH_k0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -280,7 +280,8 @@ bool get_PssSH_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -294,7 +295,8 @@ bool get_PssSH_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -308,7 +310,8 @@ bool get_PssSH_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k4; if (!buffer.str().empty()) @@ -322,7 +325,8 @@ bool get_PssSH_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -336,7 +340,8 @@ bool get_PssSH_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -350,7 +355,8 @@ bool get_PssSH_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -364,7 +370,8 @@ bool get_PssSH_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -378,7 +385,8 @@ bool get_PssSH_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->td; if (!buffer.str().empty()) @@ -392,7 +400,8 @@ bool get_PssSH_td(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_vsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmax; if (!buffer.str().empty()) @@ -406,7 +415,8 @@ bool get_PssSH_vsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSH_vsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSH* element = dynamic_cast(BaseClass_ptr1)) + const PssSH* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmin; if (!buffer.str().empty()) @@ -418,8 +428,6 @@ bool get_PssSH_vsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char PssSH::debugName[] = "PssSH"; const char* PssSH::debugString() const { @@ -428,24 +436,24 @@ const char* PssSH::debugString() const void PssSH::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssSH"), &PssSH_factory)); + factory_map.emplace("cim:PssSH", &PssSH_factory); } void PssSH::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssSH.k"), &assign_PssSH_k)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.k0"), &assign_PssSH_k0)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.k1"), &assign_PssSH_k1)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.k2"), &assign_PssSH_k2)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.k3"), &assign_PssSH_k3)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.k4"), &assign_PssSH_k4)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.t1"), &assign_PssSH_t1)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.t2"), &assign_PssSH_t2)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.t3"), &assign_PssSH_t3)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.t4"), &assign_PssSH_t4)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.td"), &assign_PssSH_td)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.vsmax"), &assign_PssSH_vsmax)); - assign_map.insert(std::make_pair(std::string("cim:PssSH.vsmin"), &assign_PssSH_vsmin)); + assign_map.emplace("cim:PssSH.k", &assign_PssSH_k); + assign_map.emplace("cim:PssSH.k0", &assign_PssSH_k0); + assign_map.emplace("cim:PssSH.k1", &assign_PssSH_k1); + assign_map.emplace("cim:PssSH.k2", &assign_PssSH_k2); + assign_map.emplace("cim:PssSH.k3", &assign_PssSH_k3); + assign_map.emplace("cim:PssSH.k4", &assign_PssSH_k4); + assign_map.emplace("cim:PssSH.t1", &assign_PssSH_t1); + assign_map.emplace("cim:PssSH.t2", &assign_PssSH_t2); + assign_map.emplace("cim:PssSH.t3", &assign_PssSH_t3); + assign_map.emplace("cim:PssSH.t4", &assign_PssSH_t4); + assign_map.emplace("cim:PssSH.td", &assign_PssSH_td); + assign_map.emplace("cim:PssSH.vsmax", &assign_PssSH_vsmax); + assign_map.emplace("cim:PssSH.vsmin", &assign_PssSH_vsmin); } void PssSH::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/PssSH.hpp b/CGMES_3.0.0/PssSH.hpp index f30ac8653..1bbf26971 100644 --- a/CGMES_3.0.0/PssSH.hpp +++ b/CGMES_3.0.0/PssSH.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - SiemensTM "H infinity" power system stabilizer with generator electrical power input. [Footnote: Siemens "H infinity" power system stabilizers are an example of suitable products available commercially. This information is given for the convenience of users of this document and does not constitute an endorsement by IEC of these products.] - */ + /** \brief SiemensTM "H infinity" power system stabilizer with generator electrical power input. [Footnote: Siemens "H infinity" power system stabilizers are an example of suitable products available commercially. This information is given for the convenience of users of this document and does not constitute an endorsement by IEC of these products.] */ class PssSH : public PowerSystemStabilizerDynamics { public: @@ -28,19 +26,44 @@ namespace CIMPP PssSH(); ~PssSH() override; - CIMPP::PU k; /* Main gain (<i>K</i>). Typical value = 1. Default: nullptr */ - CIMPP::PU k0; /* Gain 0 (<i>K0</i>). Typical value = 0,012. Default: nullptr */ - CIMPP::PU k1; /* Gain 1 (<i>K1</i>). Typical value = 0,488. Default: nullptr */ - CIMPP::PU k2; /* Gain 2 (<i>K2</i>). Typical value = 0,064. Default: nullptr */ - CIMPP::PU k3; /* Gain 3 (<i>K3</i>). Typical value = 0,224. Default: nullptr */ - CIMPP::PU k4; /* Gain 4 (<i>K4</i>). Typical value = 0,1. Default: nullptr */ - CIMPP::Seconds t1; /* Time constant 1 (<i>T1</i>) (&gt; 0). Typical value = 0,076. Default: nullptr */ - CIMPP::Seconds t2; /* Time constant 2 (<i>T2</i>) (&gt; 0). Typical value = 0,086. Default: nullptr */ - CIMPP::Seconds t3; /* Time constant 3 (<i>T3</i>) (&gt; 0). Typical value = 1,068. Default: nullptr */ - CIMPP::Seconds t4; /* Time constant 4 (<i>T4</i>) (&gt; 0). Typical value = 1,913. Default: nullptr */ - CIMPP::Seconds td; /* Input time constant (<i>T</i><i><sub>d</sub></i>) (&gt;= 0). Typical value = 10. Default: nullptr */ - CIMPP::PU vsmax; /* Output maximum limit (<i>Vsmax</i>) (&gt; PssSH.vsmin). Typical value = 0,1. Default: nullptr */ - CIMPP::PU vsmin; /* Output minimum limit (<i>Vsmin</i>) (&lt; PssSH.vsmax). Typical value = -0,1. Default: nullptr */ + /** \brief Main gain (<i>K</i>). Typical value = 1. Default: nullptr */ + CIMPP::PU k; + + /** \brief Gain 0 (<i>K0</i>). Typical value = 0,012. Default: nullptr */ + CIMPP::PU k0; + + /** \brief Gain 1 (<i>K1</i>). Typical value = 0,488. Default: nullptr */ + CIMPP::PU k1; + + /** \brief Gain 2 (<i>K2</i>). Typical value = 0,064. Default: nullptr */ + CIMPP::PU k2; + + /** \brief Gain 3 (<i>K3</i>). Typical value = 0,224. Default: nullptr */ + CIMPP::PU k3; + + /** \brief Gain 4 (<i>K4</i>). Typical value = 0,1. Default: nullptr */ + CIMPP::PU k4; + + /** \brief Time constant 1 (<i>T1</i>) (&gt; 0). Typical value = 0,076. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Time constant 2 (<i>T2</i>) (&gt; 0). Typical value = 0,086. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Time constant 3 (<i>T3</i>) (&gt; 0). Typical value = 1,068. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Time constant 4 (<i>T4</i>) (&gt; 0). Typical value = 1,913. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Input time constant (<i>T</i><i><sub>d</sub></i>) (&gt;= 0). Typical value = 10. Default: nullptr */ + CIMPP::Seconds td; + + /** \brief Output maximum limit (<i>Vsmax</i>) (&gt; PssSH.vsmin). Typical value = 0,1. Default: nullptr */ + CIMPP::PU vsmax; + + /** \brief Output minimum limit (<i>Vsmin</i>) (&lt; PssSH.vsmax). Typical value = -0,1. Default: nullptr */ + CIMPP::PU vsmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PssSK.cpp b/CGMES_3.0.0/PssSK.cpp index 21e59004b..1c23f5dbd 100644 --- a/CGMES_3.0.0/PssSK.cpp +++ b/CGMES_3.0.0/PssSK.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PssSK::PssSK() {}; -PssSK::~PssSK() {}; +PssSK::PssSK() {} +PssSK::~PssSK() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ PssSK::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssSK_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_vsmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_vsmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSK_vsmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSK_vsmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSK* element = dynamic_cast(BaseClass_ptr1)) + PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssSK_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_PssSK_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_PssSK_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_PssSK_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_PssSK_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_PssSK_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_PssSK_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_PssSK_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_PssSK_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_PssSK_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_vsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmax; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_PssSK_vsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssSK_vsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSK* element = dynamic_cast(BaseClass_ptr1)) + const PssSK* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmin; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_PssSK_vsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - - const char PssSK::debugName[] = "PssSK"; const char* PssSK::debugString() const { @@ -370,22 +376,22 @@ const char* PssSK::debugString() const void PssSK::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssSK"), &PssSK_factory)); + factory_map.emplace("cim:PssSK", &PssSK_factory); } void PssSK::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssSK.k1"), &assign_PssSK_k1)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.k2"), &assign_PssSK_k2)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.k3"), &assign_PssSK_k3)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.t1"), &assign_PssSK_t1)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.t2"), &assign_PssSK_t2)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.t3"), &assign_PssSK_t3)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.t4"), &assign_PssSK_t4)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.t5"), &assign_PssSK_t5)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.t6"), &assign_PssSK_t6)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.vsmax"), &assign_PssSK_vsmax)); - assign_map.insert(std::make_pair(std::string("cim:PssSK.vsmin"), &assign_PssSK_vsmin)); + assign_map.emplace("cim:PssSK.k1", &assign_PssSK_k1); + assign_map.emplace("cim:PssSK.k2", &assign_PssSK_k2); + assign_map.emplace("cim:PssSK.k3", &assign_PssSK_k3); + assign_map.emplace("cim:PssSK.t1", &assign_PssSK_t1); + assign_map.emplace("cim:PssSK.t2", &assign_PssSK_t2); + assign_map.emplace("cim:PssSK.t3", &assign_PssSK_t3); + assign_map.emplace("cim:PssSK.t4", &assign_PssSK_t4); + assign_map.emplace("cim:PssSK.t5", &assign_PssSK_t5); + assign_map.emplace("cim:PssSK.t6", &assign_PssSK_t6); + assign_map.emplace("cim:PssSK.vsmax", &assign_PssSK_vsmax); + assign_map.emplace("cim:PssSK.vsmin", &assign_PssSK_vsmin); } void PssSK::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/PssSK.hpp b/CGMES_3.0.0/PssSK.hpp index 620e659c9..156751a58 100644 --- a/CGMES_3.0.0/PssSK.hpp +++ b/CGMES_3.0.0/PssSK.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Slovakian PSS with three inputs. - */ + /** \brief Slovakian PSS with three inputs. */ class PssSK : public PowerSystemStabilizerDynamics { public: @@ -28,17 +26,38 @@ namespace CIMPP PssSK(); ~PssSK() override; - CIMPP::PU k1; /* Gain <i>P</i> (<i>K</i><i><sub>1</sub></i>). Typical value = -0,3. Default: nullptr */ - CIMPP::PU k2; /* Gain <i>f</i><i><sub>E</sub></i><i> </i>(<i>K</i><i><sub>2</sub></i>). Typical value = -0,15. Default: nullptr */ - CIMPP::PU k3; /* Gain <i>I</i><i><sub>f</sub></i><i> </i>(<i>K</i><i><sub>3</sub></i>). Typical value = 10. Default: nullptr */ - CIMPP::Seconds t1; /* Denominator time constant (<i>T</i><i><sub>1</sub></i>) (&gt; 0,005). Typical value = 0,3. Default: nullptr */ - CIMPP::Seconds t2; /* Filter time constant (<i>T</i><i><sub>2</sub></i>) (&gt; 0,005). Typical value = 0,35. Default: nullptr */ - CIMPP::Seconds t3; /* Denominator time constant (<i>T</i><i><sub>3</sub></i>) (&gt; 0,005). Typical value = 0,22. Default: nullptr */ - CIMPP::Seconds t4; /* Filter time constant (<i>T</i><i><sub>4</sub></i>) (&gt; 0,005). Typical value = 0,02. Default: nullptr */ - CIMPP::Seconds t5; /* Denominator time constant (<i>T</i><i><sub>5</sub></i>) (&gt; 0,005). Typical value = 0,02. Default: nullptr */ - CIMPP::Seconds t6; /* Filter time constant (<i>T</i><i><sub>6</sub></i>) (&gt; 0,005). Typical value = 0,02. Default: nullptr */ - CIMPP::PU vsmax; /* Stabilizer output maximum limit (<i>V</i><i><sub>SMAX</sub></i>) (&gt; PssSK.vsmin). Typical value = 0,4. Default: nullptr */ - CIMPP::PU vsmin; /* Stabilizer output minimum limit (<i>V</i><i><sub>SMIN</sub></i>) (&lt; PssSK.vsmax). Typical value = -0.4. Default: nullptr */ + /** \brief Gain <i>P</i> (<i>K</i><i><sub>1</sub></i>). Typical value = -0,3. Default: nullptr */ + CIMPP::PU k1; + + /** \brief Gain <i>f</i><i><sub>E</sub></i><i> </i>(<i>K</i><i><sub>2</sub></i>). Typical value = -0,15. Default: nullptr */ + CIMPP::PU k2; + + /** \brief Gain <i>I</i><i><sub>f</sub></i><i> </i>(<i>K</i><i><sub>3</sub></i>). Typical value = 10. Default: nullptr */ + CIMPP::PU k3; + + /** \brief Denominator time constant (<i>T</i><i><sub>1</sub></i>) (&gt; 0,005). Typical value = 0,3. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Filter time constant (<i>T</i><i><sub>2</sub></i>) (&gt; 0,005). Typical value = 0,35. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Denominator time constant (<i>T</i><i><sub>3</sub></i>) (&gt; 0,005). Typical value = 0,22. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Filter time constant (<i>T</i><i><sub>4</sub></i>) (&gt; 0,005). Typical value = 0,02. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Denominator time constant (<i>T</i><i><sub>5</sub></i>) (&gt; 0,005). Typical value = 0,02. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Filter time constant (<i>T</i><i><sub>6</sub></i>) (&gt; 0,005). Typical value = 0,02. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Stabilizer output maximum limit (<i>V</i><i><sub>SMAX</sub></i>) (&gt; PssSK.vsmin). Typical value = 0,4. Default: nullptr */ + CIMPP::PU vsmax; + + /** \brief Stabilizer output minimum limit (<i>V</i><i><sub>SMIN</sub></i>) (&lt; PssSK.vsmax). Typical value = -0.4. Default: nullptr */ + CIMPP::PU vsmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PssSTAB2A.cpp b/CGMES_3.0.0/PssSTAB2A.cpp index ae5475469..79cadc5a2 100644 --- a/CGMES_3.0.0/PssSTAB2A.cpp +++ b/CGMES_3.0.0/PssSTAB2A.cpp @@ -8,19 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -PssSTAB2A::PssSTAB2A() {}; -PssSTAB2A::~PssSTAB2A() {}; +PssSTAB2A::PssSTAB2A() {} +PssSTAB2A::~PssSTAB2A() {} static const std::list PossibleProfilesForClass = { @@ -54,116 +46,122 @@ PssSTAB2A::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssSTAB2A_hlim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSTAB2A_hlim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSTAB2A* element = dynamic_cast(BaseClass_ptr1)) + PssSTAB2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->hlim; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSTAB2A_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSTAB2A_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSTAB2A* element = dynamic_cast(BaseClass_ptr1)) + PssSTAB2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSTAB2A_k3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSTAB2A_k3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSTAB2A* element = dynamic_cast(BaseClass_ptr1)) + PssSTAB2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSTAB2A_k4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSTAB2A_k4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSTAB2A* element = dynamic_cast(BaseClass_ptr1)) + PssSTAB2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSTAB2A_k5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSTAB2A_k5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSTAB2A* element = dynamic_cast(BaseClass_ptr1)) + PssSTAB2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSTAB2A_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSTAB2A_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSTAB2A* element = dynamic_cast(BaseClass_ptr1)) + PssSTAB2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSTAB2A_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSTAB2A_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSTAB2A* element = dynamic_cast(BaseClass_ptr1)) + PssSTAB2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssSTAB2A_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssSTAB2A_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssSTAB2A* element = dynamic_cast(BaseClass_ptr1)) + PssSTAB2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_PssSTAB2A_hlim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSTAB2A* element = dynamic_cast(BaseClass_ptr1)) + const PssSTAB2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hlim; if (!buffer.str().empty()) @@ -177,7 +175,8 @@ bool get_PssSTAB2A_hlim(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_PssSTAB2A_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSTAB2A* element = dynamic_cast(BaseClass_ptr1)) + const PssSTAB2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -191,7 +190,8 @@ bool get_PssSTAB2A_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssSTAB2A_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSTAB2A* element = dynamic_cast(BaseClass_ptr1)) + const PssSTAB2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k3; if (!buffer.str().empty()) @@ -205,7 +205,8 @@ bool get_PssSTAB2A_k3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssSTAB2A_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSTAB2A* element = dynamic_cast(BaseClass_ptr1)) + const PssSTAB2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k4; if (!buffer.str().empty()) @@ -219,7 +220,8 @@ bool get_PssSTAB2A_k4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssSTAB2A_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSTAB2A* element = dynamic_cast(BaseClass_ptr1)) + const PssSTAB2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k5; if (!buffer.str().empty()) @@ -233,7 +235,8 @@ bool get_PssSTAB2A_k5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssSTAB2A_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSTAB2A* element = dynamic_cast(BaseClass_ptr1)) + const PssSTAB2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -247,7 +250,8 @@ bool get_PssSTAB2A_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssSTAB2A_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSTAB2A* element = dynamic_cast(BaseClass_ptr1)) + const PssSTAB2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -261,7 +265,8 @@ bool get_PssSTAB2A_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_PssSTAB2A_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssSTAB2A* element = dynamic_cast(BaseClass_ptr1)) + const PssSTAB2A* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -273,8 +278,6 @@ bool get_PssSTAB2A_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char PssSTAB2A::debugName[] = "PssSTAB2A"; const char* PssSTAB2A::debugString() const { @@ -283,19 +286,19 @@ const char* PssSTAB2A::debugString() const void PssSTAB2A::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssSTAB2A"), &PssSTAB2A_factory)); + factory_map.emplace("cim:PssSTAB2A", &PssSTAB2A_factory); } void PssSTAB2A::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssSTAB2A.hlim"), &assign_PssSTAB2A_hlim)); - assign_map.insert(std::make_pair(std::string("cim:PssSTAB2A.k2"), &assign_PssSTAB2A_k2)); - assign_map.insert(std::make_pair(std::string("cim:PssSTAB2A.k3"), &assign_PssSTAB2A_k3)); - assign_map.insert(std::make_pair(std::string("cim:PssSTAB2A.k4"), &assign_PssSTAB2A_k4)); - assign_map.insert(std::make_pair(std::string("cim:PssSTAB2A.k5"), &assign_PssSTAB2A_k5)); - assign_map.insert(std::make_pair(std::string("cim:PssSTAB2A.t2"), &assign_PssSTAB2A_t2)); - assign_map.insert(std::make_pair(std::string("cim:PssSTAB2A.t3"), &assign_PssSTAB2A_t3)); - assign_map.insert(std::make_pair(std::string("cim:PssSTAB2A.t5"), &assign_PssSTAB2A_t5)); + assign_map.emplace("cim:PssSTAB2A.hlim", &assign_PssSTAB2A_hlim); + assign_map.emplace("cim:PssSTAB2A.k2", &assign_PssSTAB2A_k2); + assign_map.emplace("cim:PssSTAB2A.k3", &assign_PssSTAB2A_k3); + assign_map.emplace("cim:PssSTAB2A.k4", &assign_PssSTAB2A_k4); + assign_map.emplace("cim:PssSTAB2A.k5", &assign_PssSTAB2A_k5); + assign_map.emplace("cim:PssSTAB2A.t2", &assign_PssSTAB2A_t2); + assign_map.emplace("cim:PssSTAB2A.t3", &assign_PssSTAB2A_t3); + assign_map.emplace("cim:PssSTAB2A.t5", &assign_PssSTAB2A_t5); } void PssSTAB2A::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/PssSTAB2A.hpp b/CGMES_3.0.0/PssSTAB2A.hpp index f6ad16179..8bf644cc1 100644 --- a/CGMES_3.0.0/PssSTAB2A.hpp +++ b/CGMES_3.0.0/PssSTAB2A.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Power system stabilizer part of an ABB excitation system. [Footnote: ABB excitation systems are an example of suitable products available commercially. This information is given for the convenience of users of this document and does not constitute an endorsement by IEC of these products.] - */ + /** \brief Power system stabilizer part of an ABB excitation system. [Footnote: ABB excitation systems are an example of suitable products available commercially. This information is given for the convenience of users of this document and does not constitute an endorsement by IEC of these products.] */ class PssSTAB2A : public PowerSystemStabilizerDynamics { public: @@ -28,14 +26,29 @@ namespace CIMPP PssSTAB2A(); ~PssSTAB2A() override; - CIMPP::PU hlim; /* Stabilizer output limiter (<i>H</i><i><sub>LIM</sub></i>). Typical value = 0,5. Default: nullptr */ - CIMPP::PU k2; /* Gain (<i>K2</i>). Typical value = 1,0. Default: nullptr */ - CIMPP::PU k3; /* Gain (<i>K3</i>). Typical value = 0,25. Default: nullptr */ - CIMPP::PU k4; /* Gain (<i>K4</i>). Typical value = 0,075. Default: nullptr */ - CIMPP::PU k5; /* Gain (<i>K5</i>). Typical value = 2,5. Default: nullptr */ - CIMPP::Seconds t2; /* Time constant (<i>T2</i>). Typical value = 4,0. Default: nullptr */ - CIMPP::Seconds t3; /* Time constant (<i>T3</i>). Typical value = 2,0. Default: nullptr */ - CIMPP::Seconds t5; /* Time constant (<i>T5</i>). Typical value = 4,5. Default: nullptr */ + /** \brief Stabilizer output limiter (<i>H</i><i><sub>LIM</sub></i>). Typical value = 0,5. Default: nullptr */ + CIMPP::PU hlim; + + /** \brief Gain (<i>K2</i>). Typical value = 1,0. Default: nullptr */ + CIMPP::PU k2; + + /** \brief Gain (<i>K3</i>). Typical value = 0,25. Default: nullptr */ + CIMPP::PU k3; + + /** \brief Gain (<i>K4</i>). Typical value = 0,075. Default: nullptr */ + CIMPP::PU k4; + + /** \brief Gain (<i>K5</i>). Typical value = 2,5. Default: nullptr */ + CIMPP::PU k5; + + /** \brief Time constant (<i>T2</i>). Typical value = 4,0. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Time constant (<i>T3</i>). Typical value = 2,0. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Time constant (<i>T5</i>). Typical value = 4,5. Default: nullptr */ + CIMPP::Seconds t5; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/PssWECC.cpp b/CGMES_3.0.0/PssWECC.cpp index 40f8e2a16..e3044b133 100644 --- a/CGMES_3.0.0/PssWECC.cpp +++ b/CGMES_3.0.0/PssWECC.cpp @@ -8,29 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "InputSignalKind.hpp" -#include "InputSignalKind.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -PssWECC::PssWECC() {}; -PssWECC::~PssWECC() {}; +PssWECC::PssWECC() {} +PssWECC::~PssWECC() {} static const std::list PossibleProfilesForClass = { @@ -74,246 +56,292 @@ PssWECC::getPossibleProfilesForAttributes() const return map; } - -bool assign_PssWECC_inputSignal1Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_inputSignal1Type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal1Type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_inputSignal2Type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_inputSignal2Type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inputSignal2Type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_t9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_t9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->t9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_vcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_vcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vcl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_vcu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_vcu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vcu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_vsmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_vsmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_PssWECC_vsmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_PssWECC_vsmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (PssWECC* element = dynamic_cast(BaseClass_ptr1)) + PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vsmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } +bool get_PssWECC_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignal1Type; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} +bool get_PssWECC_inputSignal2Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inputSignal2Type; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} bool get_PssWECC_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -327,7 +355,8 @@ bool get_PssWECC_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -341,7 +370,8 @@ bool get_PssWECC_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -355,7 +385,8 @@ bool get_PssWECC_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t10; if (!buffer.str().empty()) @@ -369,7 +400,8 @@ bool get_PssWECC_t10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t2; if (!buffer.str().empty()) @@ -383,7 +415,8 @@ bool get_PssWECC_t2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t3; if (!buffer.str().empty()) @@ -397,7 +430,8 @@ bool get_PssWECC_t3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t4; if (!buffer.str().empty()) @@ -411,7 +445,8 @@ bool get_PssWECC_t4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t5; if (!buffer.str().empty()) @@ -425,7 +460,8 @@ bool get_PssWECC_t5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t6; if (!buffer.str().empty()) @@ -439,7 +475,8 @@ bool get_PssWECC_t6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t7; if (!buffer.str().empty()) @@ -453,7 +490,8 @@ bool get_PssWECC_t7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t8; if (!buffer.str().empty()) @@ -467,7 +505,8 @@ bool get_PssWECC_t8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t9; if (!buffer.str().empty()) @@ -481,7 +520,8 @@ bool get_PssWECC_t9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_vcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vcl; if (!buffer.str().empty()) @@ -495,7 +535,8 @@ bool get_PssWECC_vcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_vcu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vcu; if (!buffer.str().empty()) @@ -509,7 +550,8 @@ bool get_PssWECC_vcu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_PssWECC_vsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmax; if (!buffer.str().empty()) @@ -523,7 +565,8 @@ bool get_PssWECC_vsmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_PssWECC_vsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) + const PssWECC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vsmin; if (!buffer.str().empty()) @@ -535,36 +578,6 @@ bool get_PssWECC_vsmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - - -bool get_PssWECC_inputSignal1Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignal1Type; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - -bool get_PssWECC_inputSignal2Type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const PssWECC* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->inputSignal2Type; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - const char PssWECC::debugName[] = "PssWECC"; const char* PssWECC::debugString() const { @@ -573,29 +586,29 @@ const char* PssWECC::debugString() const void PssWECC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:PssWECC"), &PssWECC_factory)); + factory_map.emplace("cim:PssWECC", &PssWECC_factory); } void PssWECC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:PssWECC.inputSignal1Type"), &assign_PssWECC_inputSignal1Type)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.inputSignal2Type"), &assign_PssWECC_inputSignal2Type)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.k1"), &assign_PssWECC_k1)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.k2"), &assign_PssWECC_k2)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t1"), &assign_PssWECC_t1)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t10"), &assign_PssWECC_t10)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t2"), &assign_PssWECC_t2)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t3"), &assign_PssWECC_t3)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t4"), &assign_PssWECC_t4)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t5"), &assign_PssWECC_t5)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t6"), &assign_PssWECC_t6)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t7"), &assign_PssWECC_t7)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t8"), &assign_PssWECC_t8)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.t9"), &assign_PssWECC_t9)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.vcl"), &assign_PssWECC_vcl)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.vcu"), &assign_PssWECC_vcu)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.vsmax"), &assign_PssWECC_vsmax)); - assign_map.insert(std::make_pair(std::string("cim:PssWECC.vsmin"), &assign_PssWECC_vsmin)); + assign_map.emplace("cim:PssWECC.inputSignal1Type", &assign_PssWECC_inputSignal1Type); + assign_map.emplace("cim:PssWECC.inputSignal2Type", &assign_PssWECC_inputSignal2Type); + assign_map.emplace("cim:PssWECC.k1", &assign_PssWECC_k1); + assign_map.emplace("cim:PssWECC.k2", &assign_PssWECC_k2); + assign_map.emplace("cim:PssWECC.t1", &assign_PssWECC_t1); + assign_map.emplace("cim:PssWECC.t10", &assign_PssWECC_t10); + assign_map.emplace("cim:PssWECC.t2", &assign_PssWECC_t2); + assign_map.emplace("cim:PssWECC.t3", &assign_PssWECC_t3); + assign_map.emplace("cim:PssWECC.t4", &assign_PssWECC_t4); + assign_map.emplace("cim:PssWECC.t5", &assign_PssWECC_t5); + assign_map.emplace("cim:PssWECC.t6", &assign_PssWECC_t6); + assign_map.emplace("cim:PssWECC.t7", &assign_PssWECC_t7); + assign_map.emplace("cim:PssWECC.t8", &assign_PssWECC_t8); + assign_map.emplace("cim:PssWECC.t9", &assign_PssWECC_t9); + assign_map.emplace("cim:PssWECC.vcl", &assign_PssWECC_vcl); + assign_map.emplace("cim:PssWECC.vcu", &assign_PssWECC_vcu); + assign_map.emplace("cim:PssWECC.vsmax", &assign_PssWECC_vsmax); + assign_map.emplace("cim:PssWECC.vsmin", &assign_PssWECC_vsmin); } void PssWECC::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/PssWECC.hpp b/CGMES_3.0.0/PssWECC.hpp index 1ccfa136a..9faf4e673 100644 --- a/CGMES_3.0.0/PssWECC.hpp +++ b/CGMES_3.0.0/PssWECC.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Dual input power system stabilizer, based on IEEE type 2, with modified output limiter defined by WECC (Western Electricity Coordinating Council, USA). - */ + /** \brief Dual input power system stabilizer, based on IEEE type 2, with modified output limiter defined by WECC (Western Electricity Coordinating Council, USA). */ class PssWECC : public PowerSystemStabilizerDynamics { public: @@ -29,24 +27,59 @@ namespace CIMPP PssWECC(); ~PssWECC() override; - CIMPP::InputSignalKind inputSignal1Type; /* Type of input signal #1 (rotorAngularFrequencyDeviation, busFrequencyDeviation, generatorElectricalPower, generatorAcceleratingPower, busVoltage, or busVoltageDerivative - shall be different than PssWECC.inputSignal2Type). Typical value = rotorAngularFrequencyDeviation. Default: 0 */ - CIMPP::InputSignalKind inputSignal2Type; /* Type of input signal #2 (rotorAngularFrequencyDeviation, busFrequencyDeviation, generatorElectricalPower, generatorAcceleratingPower, busVoltage, busVoltageDerivative - shall be different than PssWECC.inputSignal1Type). Typical value = busVoltageDerivative. Default: 0 */ - CIMPP::PU k1; /* Input signal 1 gain (<i>K</i><i><sub>1</sub></i>). Typical value = 1,13. Default: nullptr */ - CIMPP::PU k2; /* Input signal 2 gain (<i>K</i><i><sub>2</sub></i>). Typical value = 0,0. Default: nullptr */ - CIMPP::Seconds t1; /* Input signal 1 transducer time constant (<i>T</i><i><sub>1</sub></i>) (&gt;= 0). Typical value = 0,037. Default: nullptr */ - CIMPP::Seconds t10; /* Lag time constant (<i>T</i><i><sub>10</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds t2; /* Input signal 2 transducer time constant (<i>T</i><i><sub>2</sub></i>) (&gt;= 0). Typical value = 0,0. Default: nullptr */ - CIMPP::Seconds t3; /* Stabilizer washout time constant (<i>T</i><i><sub>3</sub></i>) (&gt;= 0). Typical value = 9,5. Default: nullptr */ - CIMPP::Seconds t4; /* Stabilizer washout time lag constant (<i>T</i><i><sub>4</sub></i>) (&gt;= 0). Typical value = 9,5. Default: nullptr */ - CIMPP::Seconds t5; /* Lead time constant (<i>T</i><i><sub>5</sub></i>) (&gt;= 0). Typical value = 1,7. Default: nullptr */ - CIMPP::Seconds t6; /* Lag time constant (<i>T</i><i><sub>6</sub></i>) (&gt;= 0). Typical value = 1,5. Default: nullptr */ - CIMPP::Seconds t7; /* Lead time constant (<i>T</i><i><sub>7</sub></i>) (&gt;= 0). Typical value = 1,7. Default: nullptr */ - CIMPP::Seconds t8; /* Lag time constant (<i>T</i><i><sub>8</sub></i>) (&gt;= 0). Typical value = 1,5. Default: nullptr */ - CIMPP::Seconds t9; /* Lead time constant (<i>T</i><i><sub>9</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::PU vcl; /* Minimum value for voltage compensator output (<i>V</i><i><sub>CL</sub></i>). Typical value = 0. Default: nullptr */ - CIMPP::PU vcu; /* Maximum value for voltage compensator output (<i>V</i><i><sub>CU</sub></i>). Typical value = 0. Default: nullptr */ - CIMPP::PU vsmax; /* Maximum output signal (<i>Vsmax</i>) (&gt; PssWECC.vsmin). Typical value = 0,05. Default: nullptr */ - CIMPP::PU vsmin; /* Minimum output signal (<i>Vsmin</i>) (&lt; PssWECC.vsmax). Typical value = -0,05. Default: nullptr */ + /** \brief Type of input signal #1 (rotorAngularFrequencyDeviation, busFrequencyDeviation, generatorElectricalPower, generatorAcceleratingPower, busVoltage, or busVoltageDerivative - shall be different than PssWECC.inputSignal2Type). Typical value = rotorAngularFrequencyDeviation. Default: 0 */ + CIMPP::InputSignalKind inputSignal1Type; + + /** \brief Type of input signal #2 (rotorAngularFrequencyDeviation, busFrequencyDeviation, generatorElectricalPower, generatorAcceleratingPower, busVoltage, busVoltageDerivative - shall be different than PssWECC.inputSignal1Type). Typical value = busVoltageDerivative. Default: 0 */ + CIMPP::InputSignalKind inputSignal2Type; + + /** \brief Input signal 1 gain (<i>K</i><i><sub>1</sub></i>). Typical value = 1,13. Default: nullptr */ + CIMPP::PU k1; + + /** \brief Input signal 2 gain (<i>K</i><i><sub>2</sub></i>). Typical value = 0,0. Default: nullptr */ + CIMPP::PU k2; + + /** \brief Input signal 1 transducer time constant (<i>T</i><i><sub>1</sub></i>) (&gt;= 0). Typical value = 0,037. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Lag time constant (<i>T</i><i><sub>10</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds t10; + + /** \brief Input signal 2 transducer time constant (<i>T</i><i><sub>2</sub></i>) (&gt;= 0). Typical value = 0,0. Default: nullptr */ + CIMPP::Seconds t2; + + /** \brief Stabilizer washout time constant (<i>T</i><i><sub>3</sub></i>) (&gt;= 0). Typical value = 9,5. Default: nullptr */ + CIMPP::Seconds t3; + + /** \brief Stabilizer washout time lag constant (<i>T</i><i><sub>4</sub></i>) (&gt;= 0). Typical value = 9,5. Default: nullptr */ + CIMPP::Seconds t4; + + /** \brief Lead time constant (<i>T</i><i><sub>5</sub></i>) (&gt;= 0). Typical value = 1,7. Default: nullptr */ + CIMPP::Seconds t5; + + /** \brief Lag time constant (<i>T</i><i><sub>6</sub></i>) (&gt;= 0). Typical value = 1,5. Default: nullptr */ + CIMPP::Seconds t6; + + /** \brief Lead time constant (<i>T</i><i><sub>7</sub></i>) (&gt;= 0). Typical value = 1,7. Default: nullptr */ + CIMPP::Seconds t7; + + /** \brief Lag time constant (<i>T</i><i><sub>8</sub></i>) (&gt;= 0). Typical value = 1,5. Default: nullptr */ + CIMPP::Seconds t8; + + /** \brief Lead time constant (<i>T</i><i><sub>9</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds t9; + + /** \brief Minimum value for voltage compensator output (<i>V</i><i><sub>CL</sub></i>). Typical value = 0. Default: nullptr */ + CIMPP::PU vcl; + + /** \brief Maximum value for voltage compensator output (<i>V</i><i><sub>CU</sub></i>). Typical value = 0. Default: nullptr */ + CIMPP::PU vcu; + + /** \brief Maximum output signal (<i>Vsmax</i>) (&gt; PssWECC.vsmin). Typical value = 0,05. Default: nullptr */ + CIMPP::PU vsmax; + + /** \brief Minimum output signal (<i>Vsmin</i>) (&lt; PssWECC.vsmax). Typical value = -0,05. Default: nullptr */ + CIMPP::PU vsmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Quality61850.cpp b/CGMES_3.0.0/Quality61850.cpp index 207e223d6..139b16672 100644 --- a/CGMES_3.0.0/Quality61850.cpp +++ b/CGMES_3.0.0/Quality61850.cpp @@ -8,23 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Source.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Validity.hpp" using namespace CIMPP; -Quality61850::Quality61850() {}; -Quality61850::~Quality61850() {}; +Quality61850::Quality61850() {} +Quality61850::~Quality61850() {} static const std::list PossibleProfilesForClass = { @@ -62,168 +50,178 @@ Quality61850::getPossibleProfilesForAttributes() const return map; } - -bool assign_Quality61850_badReference(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_badReference(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->badReference; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_estimatorReplaced(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_estimatorReplaced(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->estimatorReplaced; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_failure(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_failure(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->failure; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_oldData(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_oldData(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->oldData; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_operatorBlocked(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_operatorBlocked(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->operatorBlocked; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_oscillatory(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_oscillatory(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->oscillatory; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_outOfRange(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_outOfRange(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->outOfRange; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_overFlow(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_overFlow(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->overFlow; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_source(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_source(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->source; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_suspect(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_suspect(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->suspect; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_test(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_test(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->test; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Quality61850_validity(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Quality61850_validity(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Quality61850* element = dynamic_cast(BaseClass_ptr1)) + Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->validity; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_Quality61850_badReference(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->badReference; if (!buffer.str().empty()) @@ -237,7 +235,8 @@ bool get_Quality61850_badReference(const BaseClass* BaseClass_ptr1, std::strings bool get_Quality61850_estimatorReplaced(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->estimatorReplaced; if (!buffer.str().empty()) @@ -251,7 +250,8 @@ bool get_Quality61850_estimatorReplaced(const BaseClass* BaseClass_ptr1, std::st bool get_Quality61850_failure(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->failure; if (!buffer.str().empty()) @@ -265,7 +265,8 @@ bool get_Quality61850_failure(const BaseClass* BaseClass_ptr1, std::stringstream bool get_Quality61850_oldData(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->oldData; if (!buffer.str().empty()) @@ -279,7 +280,8 @@ bool get_Quality61850_oldData(const BaseClass* BaseClass_ptr1, std::stringstream bool get_Quality61850_operatorBlocked(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->operatorBlocked; if (!buffer.str().empty()) @@ -293,7 +295,8 @@ bool get_Quality61850_operatorBlocked(const BaseClass* BaseClass_ptr1, std::stri bool get_Quality61850_oscillatory(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->oscillatory; if (!buffer.str().empty()) @@ -307,7 +310,8 @@ bool get_Quality61850_oscillatory(const BaseClass* BaseClass_ptr1, std::stringst bool get_Quality61850_outOfRange(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->outOfRange; if (!buffer.str().empty()) @@ -321,7 +325,8 @@ bool get_Quality61850_outOfRange(const BaseClass* BaseClass_ptr1, std::stringstr bool get_Quality61850_overFlow(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->overFlow; if (!buffer.str().empty()) @@ -333,11 +338,12 @@ bool get_Quality61850_overFlow(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } -bool get_Quality61850_suspect(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_Quality61850_source(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->suspect; + buffer << element->source; if (!buffer.str().empty()) { return true; @@ -347,11 +353,12 @@ bool get_Quality61850_suspect(const BaseClass* BaseClass_ptr1, std::stringstream return false; } -bool get_Quality61850_test(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_Quality61850_suspect(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->test; + buffer << element->suspect; if (!buffer.str().empty()) { return true; @@ -361,13 +368,12 @@ bool get_Quality61850_test(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - -bool get_Quality61850_source(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_Quality61850_test(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->source; + buffer << element->test; if (!buffer.str().empty()) { return true; @@ -379,7 +385,8 @@ bool get_Quality61850_source(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_Quality61850_validity(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Quality61850* element = dynamic_cast(BaseClass_ptr1)) + const Quality61850* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->validity; if (!buffer.str().empty()) @@ -399,23 +406,23 @@ const char* Quality61850::debugString() const void Quality61850::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Quality61850"), &Quality61850_factory)); + factory_map.emplace("cim:Quality61850", &Quality61850_factory); } void Quality61850::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Quality61850.badReference"), &assign_Quality61850_badReference)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.estimatorReplaced"), &assign_Quality61850_estimatorReplaced)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.failure"), &assign_Quality61850_failure)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.oldData"), &assign_Quality61850_oldData)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.operatorBlocked"), &assign_Quality61850_operatorBlocked)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.oscillatory"), &assign_Quality61850_oscillatory)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.outOfRange"), &assign_Quality61850_outOfRange)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.overFlow"), &assign_Quality61850_overFlow)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.source"), &assign_Quality61850_source)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.suspect"), &assign_Quality61850_suspect)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.test"), &assign_Quality61850_test)); - assign_map.insert(std::make_pair(std::string("cim:Quality61850.validity"), &assign_Quality61850_validity)); + assign_map.emplace("cim:Quality61850.badReference", &assign_Quality61850_badReference); + assign_map.emplace("cim:Quality61850.estimatorReplaced", &assign_Quality61850_estimatorReplaced); + assign_map.emplace("cim:Quality61850.failure", &assign_Quality61850_failure); + assign_map.emplace("cim:Quality61850.oldData", &assign_Quality61850_oldData); + assign_map.emplace("cim:Quality61850.operatorBlocked", &assign_Quality61850_operatorBlocked); + assign_map.emplace("cim:Quality61850.oscillatory", &assign_Quality61850_oscillatory); + assign_map.emplace("cim:Quality61850.outOfRange", &assign_Quality61850_outOfRange); + assign_map.emplace("cim:Quality61850.overFlow", &assign_Quality61850_overFlow); + assign_map.emplace("cim:Quality61850.source", &assign_Quality61850_source); + assign_map.emplace("cim:Quality61850.suspect", &assign_Quality61850_suspect); + assign_map.emplace("cim:Quality61850.test", &assign_Quality61850_test); + assign_map.emplace("cim:Quality61850.validity", &assign_Quality61850_validity); } void Quality61850::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/Quality61850.hpp b/CGMES_3.0.0/Quality61850.hpp index 444cb1743..8d1ca1990 100644 --- a/CGMES_3.0.0/Quality61850.hpp +++ b/CGMES_3.0.0/Quality61850.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Quality flags in this class are as defined in IEC 61850, except for estimatorReplaced, which has been included in this class for convenience. - */ + /** \brief Quality flags in this class are as defined in IEC 61850, except for estimatorReplaced, which has been included in this class for convenience. */ class Quality61850 : public BaseClass { public: @@ -29,18 +27,41 @@ namespace CIMPP Quality61850(); ~Quality61850() override; - CIMPP::Boolean badReference; /* Measurement value may be incorrect due to a reference being out of calibration. Default: false */ - CIMPP::Boolean estimatorReplaced; /* Value has been replaced by State Estimator. estimatorReplaced is not an IEC61850 quality bit but has been put in this class for convenience. Default: false */ - CIMPP::Boolean failure; /* This identifier indicates that a supervision function has detected an internal or external failure, e.g. communication failure. Default: false */ - CIMPP::Boolean oldData; /* Measurement value is old and possibly invalid, as it has not been successfully updated during a specified time interval. Default: false */ - CIMPP::Boolean operatorBlocked; /* Measurement value is blocked and hence unavailable for transmission. Default: false */ - CIMPP::Boolean oscillatory; /* To prevent some overload of the communication it is sensible to detect and suppress oscillating (fast changing) binary inputs. If a signal changes in a defined time twice in the same direction (from 0 to 1 or from 1 to 0) then oscillation is detected and the detail quality identifier `oscillatory` is set. If it is detected a configured numbers of transient changes could be passed by. In this time the validity status `questionable` is set. If after this defined numbers of changes the signal is still in the oscillating state the value shall be set either to the opposite state of the previous stable value or to a defined default value. In this case the validity status `questionable` is reset and `invalid` is set as long as the signal is oscillating. If it is configured such that no transient changes should be passed by then the validity status `invalid` is set immediately in addition to the detail quality identifier `oscillatory` (used for status information only). Default: false */ - CIMPP::Boolean outOfRange; /* Measurement value is beyond a predefined range of value. Default: false */ - CIMPP::Boolean overFlow; /* Measurement value is beyond the capability of being represented properly. For example, a counter value overflows from maximum count back to a value of zero. Default: false */ - CIMPP::Source source; /* Source gives information related to the origin of a value. The value may be acquired from the process, defaulted or substituted. Default: 0 */ - CIMPP::Boolean suspect; /* A correlation function has detected that the value is not consistent with other values. Typically set by a network State Estimator. Default: false */ - CIMPP::Boolean test; /* Measurement value is transmitted for test purposes. Default: false */ - CIMPP::Validity validity; /* Validity of the measurement value. Default: 0 */ + /** \brief Measurement value may be incorrect due to a reference being out of calibration. Default: false */ + CIMPP::Boolean badReference; + + /** \brief Value has been replaced by State Estimator. estimatorReplaced is not an IEC61850 quality bit but has been put in this class for convenience. Default: false */ + CIMPP::Boolean estimatorReplaced; + + /** \brief This identifier indicates that a supervision function has detected an internal or external failure, e.g. communication failure. Default: false */ + CIMPP::Boolean failure; + + /** \brief Measurement value is old and possibly invalid, as it has not been successfully updated during a specified time interval. Default: false */ + CIMPP::Boolean oldData; + + /** \brief Measurement value is blocked and hence unavailable for transmission. Default: false */ + CIMPP::Boolean operatorBlocked; + + /** \brief To prevent some overload of the communication it is sensible to detect and suppress oscillating (fast changing) binary inputs. If a signal changes in a defined time twice in the same direction (from 0 to 1 or from 1 to 0) then oscillation is detected and the detail quality identifier `oscillatory` is set. If it is detected a configured numbers of transient changes could be passed by. In this time the validity status `questionable` is set. If after this defined numbers of changes the signal is still in the oscillating state the value shall be set either to the opposite state of the previous stable value or to a defined default value. In this case the validity status `questionable` is reset and `invalid` is set as long as the signal is oscillating. If it is configured such that no transient changes should be passed by then the validity status `invalid` is set immediately in addition to the detail quality identifier `oscillatory` (used for status information only). Default: false */ + CIMPP::Boolean oscillatory; + + /** \brief Measurement value is beyond a predefined range of value. Default: false */ + CIMPP::Boolean outOfRange; + + /** \brief Measurement value is beyond the capability of being represented properly. For example, a counter value overflows from maximum count back to a value of zero. Default: false */ + CIMPP::Boolean overFlow; + + /** \brief Source gives information related to the origin of a value. The value may be acquired from the process, defaulted or substituted. Default: 0 */ + CIMPP::Source source; + + /** \brief A correlation function has detected that the value is not consistent with other values. Typically set by a network State Estimator. Default: false */ + CIMPP::Boolean suspect; + + /** \brief Measurement value is transmitted for test purposes. Default: false */ + CIMPP::Boolean test; + + /** \brief Validity of the measurement value. Default: 0 */ + CIMPP::Validity validity; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/RaiseLowerCommand.cpp b/CGMES_3.0.0/RaiseLowerCommand.cpp index 31e8ab490..6716cd86a 100644 --- a/CGMES_3.0.0/RaiseLowerCommand.cpp +++ b/CGMES_3.0.0/RaiseLowerCommand.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -RaiseLowerCommand::RaiseLowerCommand() : ValueAliasSet(nullptr) {}; -RaiseLowerCommand::~RaiseLowerCommand() {}; +RaiseLowerCommand::RaiseLowerCommand() : ValueAliasSet(nullptr) {} +RaiseLowerCommand::~RaiseLowerCommand() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ RaiseLowerCommand::getPossibleProfilesForAttributes() const return map; } - - bool assign_ValueAliasSet_RaiseLowerCommands(BaseClass*, BaseClass*); bool assign_RaiseLowerCommand_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_RaiseLowerCommand_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass return false; } - bool get_RaiseLowerCommand_ValueAliasSet(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RaiseLowerCommand* element = dynamic_cast(BaseClass_ptr1)) + const RaiseLowerCommand* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ValueAliasSet != 0) { @@ -73,7 +71,6 @@ bool get_RaiseLowerCommand_ValueAliasSet(const BaseClass* BaseClass_ptr1, std::l return false; } - const char RaiseLowerCommand::debugName[] = "RaiseLowerCommand"; const char* RaiseLowerCommand::debugString() const { @@ -82,7 +79,7 @@ const char* RaiseLowerCommand::debugString() const void RaiseLowerCommand::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RaiseLowerCommand"), &RaiseLowerCommand_factory)); + factory_map.emplace("cim:RaiseLowerCommand", &RaiseLowerCommand_factory); } void RaiseLowerCommand::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void RaiseLowerCommand::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RaiseLowerCommand.ValueAliasSet"), &assign_RaiseLowerCommand_ValueAliasSet)); + assign_map.emplace("cim:RaiseLowerCommand.ValueAliasSet", &assign_RaiseLowerCommand_ValueAliasSet); } void RaiseLowerCommand::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/RaiseLowerCommand.hpp b/CGMES_3.0.0/RaiseLowerCommand.hpp index 7625ad817..263360c88 100644 --- a/CGMES_3.0.0/RaiseLowerCommand.hpp +++ b/CGMES_3.0.0/RaiseLowerCommand.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class ValueAliasSet; - /* - An analog control that increases or decreases a set point value with pulses. Unless otherwise specified, one pulse moves the set point by one. - */ + /** \brief An analog control that increases or decreases a set point value with pulses. Unless otherwise specified, one pulse moves the set point by one. */ class RaiseLowerCommand : public AnalogControl { public: @@ -27,7 +25,8 @@ namespace CIMPP RaiseLowerCommand(); ~RaiseLowerCommand() override; - CIMPP::ValueAliasSet* ValueAliasSet; /* The ValueAliasSet used for translation of a Control value to a name. Default: 0 */ + /** \brief The ValueAliasSet used for translation of a Control value to a name. Default: 0 */ + CIMPP::ValueAliasSet* ValueAliasSet; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/RatioTapChanger.cpp b/CGMES_3.0.0/RatioTapChanger.cpp index 75b817f29..612d61daf 100644 --- a/CGMES_3.0.0/RatioTapChanger.cpp +++ b/CGMES_3.0.0/RatioTapChanger.cpp @@ -10,12 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "RatioTapChangerTable.hpp" #include "TransformerEnd.hpp" -#include "PerCent.hpp" using namespace CIMPP; -RatioTapChanger::RatioTapChanger() : RatioTapChangerTable(nullptr), TransformerEnd(nullptr) {}; -RatioTapChanger::~RatioTapChanger() {}; +RatioTapChanger::RatioTapChanger() : RatioTapChangerTable(nullptr), TransformerEnd(nullptr) {} +RatioTapChanger::~RatioTapChanger() {} static const std::list PossibleProfilesForClass = { @@ -45,21 +44,6 @@ RatioTapChanger::getPossibleProfilesForAttributes() const return map; } - -bool assign_RatioTapChanger_stepVoltageIncrement(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (RatioTapChanger* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->stepVoltageIncrement; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_RatioTapChangerTable_RatioTapChanger(BaseClass*, BaseClass*); bool assign_RatioTapChanger_RatioTapChangerTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -76,6 +60,7 @@ bool assign_RatioTapChanger_RatioTapChangerTable(BaseClass* BaseClass_ptr1, Base } return false; } + bool assign_TransformerEnd_RatioTapChanger(BaseClass*, BaseClass*); bool assign_RatioTapChanger_TransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -93,24 +78,24 @@ bool assign_RatioTapChanger_TransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* return false; } -bool get_RatioTapChanger_stepVoltageIncrement(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_RatioTapChanger_stepVoltageIncrement(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const RatioTapChanger* element = dynamic_cast(BaseClass_ptr1)) + RatioTapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->stepVoltageIncrement; - if (!buffer.str().empty()) + buffer >> element->stepVoltageIncrement; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_RatioTapChanger_RatioTapChangerTable(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RatioTapChanger* element = dynamic_cast(BaseClass_ptr1)) + const RatioTapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->RatioTapChangerTable != 0) { @@ -123,7 +108,8 @@ bool get_RatioTapChanger_RatioTapChangerTable(const BaseClass* BaseClass_ptr1, s bool get_RatioTapChanger_TransformerEnd(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RatioTapChanger* element = dynamic_cast(BaseClass_ptr1)) + const RatioTapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->TransformerEnd != 0) { @@ -134,6 +120,20 @@ bool get_RatioTapChanger_TransformerEnd(const BaseClass* BaseClass_ptr1, std::li return false; } +bool get_RatioTapChanger_stepVoltageIncrement(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const RatioTapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->stepVoltageIncrement; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char RatioTapChanger::debugName[] = "RatioTapChanger"; const char* RatioTapChanger::debugString() const @@ -143,18 +143,18 @@ const char* RatioTapChanger::debugString() const void RatioTapChanger::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RatioTapChanger"), &RatioTapChanger_factory)); + factory_map.emplace("cim:RatioTapChanger", &RatioTapChanger_factory); } void RatioTapChanger::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RatioTapChanger.stepVoltageIncrement"), &assign_RatioTapChanger_stepVoltageIncrement)); + assign_map.emplace("cim:RatioTapChanger.stepVoltageIncrement", &assign_RatioTapChanger_stepVoltageIncrement); } void RatioTapChanger::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RatioTapChanger.RatioTapChangerTable"), &assign_RatioTapChanger_RatioTapChangerTable)); - assign_map.insert(std::make_pair(std::string("cim:RatioTapChanger.TransformerEnd"), &assign_RatioTapChanger_TransformerEnd)); + assign_map.emplace("cim:RatioTapChanger.RatioTapChangerTable", &assign_RatioTapChanger_RatioTapChangerTable); + assign_map.emplace("cim:RatioTapChanger.TransformerEnd", &assign_RatioTapChanger_TransformerEnd); } void RatioTapChanger::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/RatioTapChanger.hpp b/CGMES_3.0.0/RatioTapChanger.hpp index a6cbff0a9..a1df82c1f 100644 --- a/CGMES_3.0.0/RatioTapChanger.hpp +++ b/CGMES_3.0.0/RatioTapChanger.hpp @@ -19,9 +19,7 @@ namespace CIMPP class RatioTapChangerTable; class TransformerEnd; - /* - A tap changer that changes the voltage ratio impacting the voltage magnitude but not the phase angle across the transformer. Angle sign convention (general): Positive value indicates a positive phase shift from the winding where the tap is located to the other winding (for a two-winding transformer). - */ + /** \brief A tap changer that changes the voltage ratio impacting the voltage magnitude but not the phase angle across the transformer. Angle sign convention (general): Positive value indicates a positive phase shift from the winding where the tap is located to the other winding (for a two-winding transformer). */ class RatioTapChanger : public TapChanger { public: @@ -29,9 +27,14 @@ namespace CIMPP RatioTapChanger(); ~RatioTapChanger() override; - CIMPP::RatioTapChangerTable* RatioTapChangerTable; /* The tap ratio table for this ratio tap changer. Default: 0 */ - CIMPP::TransformerEnd* TransformerEnd; /* Transformer end to which this ratio tap changer belongs. Default: 0 */ - CIMPP::PerCent stepVoltageIncrement; /* Tap step increment, in per cent of rated voltage of the power transformer end, per step position. When the increment is negative, the voltage decreases when the tap step increases. Default: nullptr */ + /** \brief The tap ratio table for this ratio tap changer. Default: 0 */ + CIMPP::RatioTapChangerTable* RatioTapChangerTable; + + /** \brief Transformer end to which this ratio tap changer belongs. Default: 0 */ + CIMPP::TransformerEnd* TransformerEnd; + + /** \brief Tap step increment, in per cent of rated voltage of the power transformer end, per step position. When the increment is negative, the voltage decreases when the tap step increases. Default: nullptr */ + CIMPP::PerCent stepVoltageIncrement; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/RatioTapChangerTable.cpp b/CGMES_3.0.0/RatioTapChangerTable.cpp index 3088057a7..1c743986f 100644 --- a/CGMES_3.0.0/RatioTapChangerTable.cpp +++ b/CGMES_3.0.0/RatioTapChangerTable.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -RatioTapChangerTable::RatioTapChangerTable() {}; -RatioTapChangerTable::~RatioTapChangerTable() {}; +RatioTapChangerTable::RatioTapChangerTable() {} +RatioTapChangerTable::~RatioTapChangerTable() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ RatioTapChangerTable::getPossibleProfilesForAttributes() const return map; } - - bool assign_RatioTapChanger_RatioTapChangerTable(BaseClass*, BaseClass*); bool assign_RatioTapChangerTable_RatioTapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_RatioTapChangerTable_RatioTapChanger(BaseClass* BaseClass_ptr1, Base } return false; } + bool assign_RatioTapChangerTablePoint_RatioTapChangerTable(BaseClass*, BaseClass*); bool assign_RatioTapChangerTable_RatioTapChangerTablePoint(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -87,7 +86,7 @@ const char* RatioTapChangerTable::debugString() const void RatioTapChangerTable::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RatioTapChangerTable"), &RatioTapChangerTable_factory)); + factory_map.emplace("cim:RatioTapChangerTable", &RatioTapChangerTable_factory); } void RatioTapChangerTable::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -96,8 +95,8 @@ void RatioTapChangerTable::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RatioTapChangerTable.RatioTapChanger"), &assign_RatioTapChangerTable_RatioTapChanger)); - assign_map.insert(std::make_pair(std::string("cim:RatioTapChangerTable.RatioTapChangerTablePoint"), &assign_RatioTapChangerTable_RatioTapChangerTablePoint)); + assign_map.emplace("cim:RatioTapChangerTable.RatioTapChanger", &assign_RatioTapChangerTable_RatioTapChanger); + assign_map.emplace("cim:RatioTapChangerTable.RatioTapChangerTablePoint", &assign_RatioTapChangerTable_RatioTapChangerTablePoint); } void RatioTapChangerTable::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/RatioTapChangerTable.hpp b/CGMES_3.0.0/RatioTapChangerTable.hpp index 30312e469..8b98ea718 100644 --- a/CGMES_3.0.0/RatioTapChangerTable.hpp +++ b/CGMES_3.0.0/RatioTapChangerTable.hpp @@ -18,9 +18,7 @@ namespace CIMPP class RatioTapChanger; class RatioTapChangerTablePoint; - /* - Describes a curve for how the voltage magnitude and impedance varies with the tap step. - */ + /** \brief Describes a curve for how the voltage magnitude and impedance varies with the tap step. */ class RatioTapChangerTable : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP RatioTapChangerTable(); ~RatioTapChangerTable() override; - std::list RatioTapChanger; /* The ratio tap changer of this tap ratio table. Default: 0 */ - std::list RatioTapChangerTablePoint; /* Points of this table. Default: 0 */ + /** \brief The ratio tap changer of this tap ratio table. Default: 0 */ + std::list RatioTapChanger; + + /** \brief Points of this table. Default: 0 */ + std::list RatioTapChangerTablePoint; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/RatioTapChangerTablePoint.cpp b/CGMES_3.0.0/RatioTapChangerTablePoint.cpp index 358496d9f..fb837e687 100644 --- a/CGMES_3.0.0/RatioTapChangerTablePoint.cpp +++ b/CGMES_3.0.0/RatioTapChangerTablePoint.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -RatioTapChangerTablePoint::RatioTapChangerTablePoint() : RatioTapChangerTable(nullptr) {}; -RatioTapChangerTablePoint::~RatioTapChangerTablePoint() {}; +RatioTapChangerTablePoint::RatioTapChangerTablePoint() : RatioTapChangerTable(nullptr) {} +RatioTapChangerTablePoint::~RatioTapChangerTablePoint() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ RatioTapChangerTablePoint::getPossibleProfilesForAttributes() const return map; } - - bool assign_RatioTapChangerTable_RatioTapChangerTablePoint(BaseClass*, BaseClass*); bool assign_RatioTapChangerTablePoint_RatioTapChangerTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_RatioTapChangerTablePoint_RatioTapChangerTable(BaseClass* BaseClass_ return false; } - bool get_RatioTapChangerTablePoint_RatioTapChangerTable(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RatioTapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + const RatioTapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->RatioTapChangerTable != 0) { @@ -73,7 +71,6 @@ bool get_RatioTapChangerTablePoint_RatioTapChangerTable(const BaseClass* BaseCla return false; } - const char RatioTapChangerTablePoint::debugName[] = "RatioTapChangerTablePoint"; const char* RatioTapChangerTablePoint::debugString() const { @@ -82,7 +79,7 @@ const char* RatioTapChangerTablePoint::debugString() const void RatioTapChangerTablePoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RatioTapChangerTablePoint"), &RatioTapChangerTablePoint_factory)); + factory_map.emplace("cim:RatioTapChangerTablePoint", &RatioTapChangerTablePoint_factory); } void RatioTapChangerTablePoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void RatioTapChangerTablePoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RatioTapChangerTablePoint.RatioTapChangerTable"), &assign_RatioTapChangerTablePoint_RatioTapChangerTable)); + assign_map.emplace("cim:RatioTapChangerTablePoint.RatioTapChangerTable", &assign_RatioTapChangerTablePoint_RatioTapChangerTable); } void RatioTapChangerTablePoint::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/RatioTapChangerTablePoint.hpp b/CGMES_3.0.0/RatioTapChangerTablePoint.hpp index f50d7ed26..5718acb68 100644 --- a/CGMES_3.0.0/RatioTapChangerTablePoint.hpp +++ b/CGMES_3.0.0/RatioTapChangerTablePoint.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class RatioTapChangerTable; - /* - Describes each tap step in the ratio tap changer tabular curve. - */ + /** \brief Describes each tap step in the ratio tap changer tabular curve. */ class RatioTapChangerTablePoint : public TapChangerTablePoint { public: @@ -27,7 +25,8 @@ namespace CIMPP RatioTapChangerTablePoint(); ~RatioTapChangerTablePoint() override; - CIMPP::RatioTapChangerTable* RatioTapChangerTable; /* Table of this point. Default: 0 */ + /** \brief Table of this point. Default: 0 */ + CIMPP::RatioTapChangerTable* RatioTapChangerTable; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Reactance.hpp b/CGMES_3.0.0/Reactance.hpp index a811d499a..e49646947 100644 --- a/CGMES_3.0.0/Reactance.hpp +++ b/CGMES_3.0.0/Reactance.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Reactance (imaginary part of impedance), at rated frequency. - */ + /** \brief Reactance (imaginary part of impedance), at rated frequency. */ class Reactance { public: diff --git a/CGMES_3.0.0/ReactiveCapabilityCurve.cpp b/CGMES_3.0.0/ReactiveCapabilityCurve.cpp index e82001919..5d3fe1f54 100644 --- a/CGMES_3.0.0/ReactiveCapabilityCurve.cpp +++ b/CGMES_3.0.0/ReactiveCapabilityCurve.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ReactiveCapabilityCurve::ReactiveCapabilityCurve() {}; -ReactiveCapabilityCurve::~ReactiveCapabilityCurve() {}; +ReactiveCapabilityCurve::ReactiveCapabilityCurve() {} +ReactiveCapabilityCurve::~ReactiveCapabilityCurve() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ ReactiveCapabilityCurve::getPossibleProfilesForAttributes() const return map; } - - bool assign_EquivalentInjection_ReactiveCapabilityCurve(BaseClass*, BaseClass*); bool assign_ReactiveCapabilityCurve_EquivalentInjection(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_ReactiveCapabilityCurve_EquivalentInjection(BaseClass* BaseClass_ptr } return false; } + bool assign_SynchronousMachine_InitialReactiveCapabilityCurve(BaseClass*, BaseClass*); bool assign_ReactiveCapabilityCurve_InitiallyUsedBySynchronousMachines(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -87,7 +86,7 @@ const char* ReactiveCapabilityCurve::debugString() const void ReactiveCapabilityCurve::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ReactiveCapabilityCurve"), &ReactiveCapabilityCurve_factory)); + factory_map.emplace("cim:ReactiveCapabilityCurve", &ReactiveCapabilityCurve_factory); } void ReactiveCapabilityCurve::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -96,8 +95,8 @@ void ReactiveCapabilityCurve::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ReactiveCapabilityCurve.EquivalentInjection"), &assign_ReactiveCapabilityCurve_EquivalentInjection)); - assign_map.insert(std::make_pair(std::string("cim:ReactiveCapabilityCurve.InitiallyUsedBySynchronousMachines"), &assign_ReactiveCapabilityCurve_InitiallyUsedBySynchronousMachines)); + assign_map.emplace("cim:ReactiveCapabilityCurve.EquivalentInjection", &assign_ReactiveCapabilityCurve_EquivalentInjection); + assign_map.emplace("cim:ReactiveCapabilityCurve.InitiallyUsedBySynchronousMachines", &assign_ReactiveCapabilityCurve_InitiallyUsedBySynchronousMachines); } void ReactiveCapabilityCurve::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/ReactiveCapabilityCurve.hpp b/CGMES_3.0.0/ReactiveCapabilityCurve.hpp index 03ef160e7..6ee75dccc 100644 --- a/CGMES_3.0.0/ReactiveCapabilityCurve.hpp +++ b/CGMES_3.0.0/ReactiveCapabilityCurve.hpp @@ -18,9 +18,7 @@ namespace CIMPP class EquivalentInjection; class SynchronousMachine; - /* - Reactive power rating envelope versus the synchronous machine's active power, in both the generating and motoring modes. For each active power value there is a corresponding high and low reactive power limit value. Typically there will be a separate curve for each coolant condition, such as hydrogen pressure. The Y1 axis values represent reactive minimum and the Y2 axis values represent reactive maximum. - */ + /** \brief Reactive power rating envelope versus the synchronous machine's active power, in both the generating and motoring modes. For each active power value there is a corresponding high and low reactive power limit value. Typically there will be a separate curve for each coolant condition, such as hydrogen pressure. The Y1 axis values represent reactive minimum and the Y2 axis values represent reactive maximum. */ class ReactiveCapabilityCurve : public Curve { public: @@ -28,8 +26,11 @@ namespace CIMPP ReactiveCapabilityCurve(); ~ReactiveCapabilityCurve() override; - std::list EquivalentInjection; /* The equivalent injection using this reactive capability curve. Default: 0 */ - std::list InitiallyUsedBySynchronousMachines; /* Synchronous machines using this curve as default. Default: 0 */ + /** \brief The equivalent injection using this reactive capability curve. Default: 0 */ + std::list EquivalentInjection; + + /** \brief Synchronous machines using this curve as default. Default: 0 */ + std::list InitiallyUsedBySynchronousMachines; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ReactivePower.hpp b/CGMES_3.0.0/ReactivePower.hpp index e80659b92..28e434b24 100644 --- a/CGMES_3.0.0/ReactivePower.hpp +++ b/CGMES_3.0.0/ReactivePower.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Product of RMS value of the voltage and the RMS value of the quadrature component of the current. - */ + /** \brief Product of RMS value of the voltage and the RMS value of the quadrature component of the current. */ class ReactivePower { public: diff --git a/CGMES_3.0.0/RealEnergy.hpp b/CGMES_3.0.0/RealEnergy.hpp index 032e38a62..35730b229 100644 --- a/CGMES_3.0.0/RealEnergy.hpp +++ b/CGMES_3.0.0/RealEnergy.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Real electrical energy. - */ + /** \brief Real electrical energy. */ class RealEnergy { public: diff --git a/CGMES_3.0.0/RegularIntervalSchedule.cpp b/CGMES_3.0.0/RegularIntervalSchedule.cpp index 28f390358..604197cd4 100644 --- a/CGMES_3.0.0/RegularIntervalSchedule.cpp +++ b/CGMES_3.0.0/RegularIntervalSchedule.cpp @@ -9,13 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "RegularTimePoint.hpp" -#include "DateTime.hpp" -#include "Seconds.hpp" using namespace CIMPP; -RegularIntervalSchedule::RegularIntervalSchedule() {}; -RegularIntervalSchedule::~RegularIntervalSchedule() {}; +RegularIntervalSchedule::RegularIntervalSchedule() {} +RegularIntervalSchedule::~RegularIntervalSchedule() {} static const std::list PossibleProfilesForClass = { @@ -44,54 +42,56 @@ RegularIntervalSchedule::getPossibleProfilesForAttributes() const return map; } - -bool assign_RegularIntervalSchedule_endTime(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegularTimePoint_IntervalSchedule(BaseClass*, BaseClass*); +bool assign_RegularIntervalSchedule_TimePoints(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + RegularTimePoint* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - element->endTime = buffer.str(); - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->TimePoints.begin(), element->TimePoints.end(), element2) == element->TimePoints.end()) + { + element->TimePoints.push_back(element2); + return assign_RegularTimePoint_IntervalSchedule(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_RegularIntervalSchedule_timeStep(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegularIntervalSchedule_endTime(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->timeStep; - if (buffer.fail()) - return false; - else + element->endTime = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_RegularTimePoint_IntervalSchedule(BaseClass*, BaseClass*); -bool assign_RegularIntervalSchedule_TimePoints(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_RegularIntervalSchedule_timeStep(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); - RegularTimePoint* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->TimePoints.begin(), element->TimePoints.end(), element2) == element->TimePoints.end()) + buffer >> element->timeStep; + if (!buffer.fail()) { - element->TimePoints.push_back(element2); - return assign_RegularTimePoint_IntervalSchedule(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_RegularIntervalSchedule_endTime(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + const RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->endTime; if (!buffer.str().empty()) @@ -105,7 +105,8 @@ bool get_RegularIntervalSchedule_endTime(const BaseClass* BaseClass_ptr1, std::s bool get_RegularIntervalSchedule_timeStep(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1)) + const RegularIntervalSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->timeStep; if (!buffer.str().empty()) @@ -117,8 +118,6 @@ bool get_RegularIntervalSchedule_timeStep(const BaseClass* BaseClass_ptr1, std:: return false; } - - const char RegularIntervalSchedule::debugName[] = "RegularIntervalSchedule"; const char* RegularIntervalSchedule::debugString() const { @@ -127,18 +126,18 @@ const char* RegularIntervalSchedule::debugString() const void RegularIntervalSchedule::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RegularIntervalSchedule"), &RegularIntervalSchedule_factory)); + factory_map.emplace("cim:RegularIntervalSchedule", &RegularIntervalSchedule_factory); } void RegularIntervalSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RegularIntervalSchedule.endTime"), &assign_RegularIntervalSchedule_endTime)); - assign_map.insert(std::make_pair(std::string("cim:RegularIntervalSchedule.timeStep"), &assign_RegularIntervalSchedule_timeStep)); + assign_map.emplace("cim:RegularIntervalSchedule.endTime", &assign_RegularIntervalSchedule_endTime); + assign_map.emplace("cim:RegularIntervalSchedule.timeStep", &assign_RegularIntervalSchedule_timeStep); } void RegularIntervalSchedule::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RegularIntervalSchedule.TimePoints"), &assign_RegularIntervalSchedule_TimePoints)); + assign_map.emplace("cim:RegularIntervalSchedule.TimePoints", &assign_RegularIntervalSchedule_TimePoints); } void RegularIntervalSchedule::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/RegularIntervalSchedule.hpp b/CGMES_3.0.0/RegularIntervalSchedule.hpp index 8d3e4b8a6..f3d3ef64b 100644 --- a/CGMES_3.0.0/RegularIntervalSchedule.hpp +++ b/CGMES_3.0.0/RegularIntervalSchedule.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class RegularTimePoint; - /* - The schedule has time points where the time between them is constant. - */ + /** \brief The schedule has time points where the time between them is constant. */ class RegularIntervalSchedule : public BasicIntervalSchedule { public: @@ -29,9 +27,14 @@ namespace CIMPP RegularIntervalSchedule(); ~RegularIntervalSchedule() override; - std::list TimePoints; /* The regular interval time point data values that define this schedule. Default: 0 */ - CIMPP::DateTime endTime; /* The time for the last time point. The value can be a time of day, not a specific date. Default: '' */ - CIMPP::Seconds timeStep; /* The time between each pair of subsequent regular time points in sequence order. Default: nullptr */ + /** \brief The regular interval time point data values that define this schedule. Default: 0 */ + std::list TimePoints; + + /** \brief The time for the last time point. The value can be a time of day, not a specific date. Default: '' */ + CIMPP::DateTime endTime; + + /** \brief The time between each pair of subsequent regular time points in sequence order. Default: nullptr */ + CIMPP::Seconds timeStep; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/RegularTimePoint.cpp b/CGMES_3.0.0/RegularTimePoint.cpp index 106b1d3fe..5903ad467 100644 --- a/CGMES_3.0.0/RegularTimePoint.cpp +++ b/CGMES_3.0.0/RegularTimePoint.cpp @@ -9,14 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "RegularIntervalSchedule.hpp" -#include "Integer.hpp" -#include "Float.hpp" -#include "Float.hpp" using namespace CIMPP; -RegularTimePoint::RegularTimePoint() : IntervalSchedule(nullptr) {}; -RegularTimePoint::~RegularTimePoint() {}; +RegularTimePoint::RegularTimePoint() : IntervalSchedule(nullptr) {} +RegularTimePoint::~RegularTimePoint() {} static const std::list PossibleProfilesForClass = { @@ -46,67 +43,83 @@ RegularTimePoint::getPossibleProfilesForAttributes() const return map; } +bool assign_RegularIntervalSchedule_TimePoints(BaseClass*, BaseClass*); +bool assign_RegularTimePoint_IntervalSchedule(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RegularTimePoint* element = dynamic_cast(BaseClass_ptr1); + RegularIntervalSchedule* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->IntervalSchedule != element2) + { + element->IntervalSchedule = element2; + return assign_RegularIntervalSchedule_TimePoints(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_RegularTimePoint_sequenceNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegularTimePoint_sequenceNumber(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RegularTimePoint* element = dynamic_cast(BaseClass_ptr1)) + RegularTimePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->sequenceNumber; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RegularTimePoint_value1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegularTimePoint_value1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RegularTimePoint* element = dynamic_cast(BaseClass_ptr1)) + RegularTimePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->value1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RegularTimePoint_value2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegularTimePoint_value2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RegularTimePoint* element = dynamic_cast(BaseClass_ptr1)) + RegularTimePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->value2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_RegularIntervalSchedule_TimePoints(BaseClass*, BaseClass*); -bool assign_RegularTimePoint_IntervalSchedule(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool get_RegularTimePoint_IntervalSchedule(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - RegularTimePoint* element = dynamic_cast(BaseClass_ptr1); - RegularIntervalSchedule* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const RegularTimePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->IntervalSchedule != element2) + if (element->IntervalSchedule != 0) { - element->IntervalSchedule = element2; - return assign_RegularIntervalSchedule_TimePoints(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->IntervalSchedule); + return true; } - return true; } return false; } bool get_RegularTimePoint_sequenceNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegularTimePoint* element = dynamic_cast(BaseClass_ptr1)) + const RegularTimePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->sequenceNumber; if (!buffer.str().empty()) @@ -120,7 +133,8 @@ bool get_RegularTimePoint_sequenceNumber(const BaseClass* BaseClass_ptr1, std::s bool get_RegularTimePoint_value1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegularTimePoint* element = dynamic_cast(BaseClass_ptr1)) + const RegularTimePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value1; if (!buffer.str().empty()) @@ -134,7 +148,8 @@ bool get_RegularTimePoint_value1(const BaseClass* BaseClass_ptr1, std::stringstr bool get_RegularTimePoint_value2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegularTimePoint* element = dynamic_cast(BaseClass_ptr1)) + const RegularTimePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value2; if (!buffer.str().empty()) @@ -146,21 +161,6 @@ bool get_RegularTimePoint_value2(const BaseClass* BaseClass_ptr1, std::stringstr return false; } - -bool get_RegularTimePoint_IntervalSchedule(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const RegularTimePoint* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->IntervalSchedule != 0) - { - BaseClass_list.push_back(element->IntervalSchedule); - return true; - } - } - return false; -} - - const char RegularTimePoint::debugName[] = "RegularTimePoint"; const char* RegularTimePoint::debugString() const { @@ -169,19 +169,19 @@ const char* RegularTimePoint::debugString() const void RegularTimePoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RegularTimePoint"), &RegularTimePoint_factory)); + factory_map.emplace("cim:RegularTimePoint", &RegularTimePoint_factory); } void RegularTimePoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RegularTimePoint.sequenceNumber"), &assign_RegularTimePoint_sequenceNumber)); - assign_map.insert(std::make_pair(std::string("cim:RegularTimePoint.value1"), &assign_RegularTimePoint_value1)); - assign_map.insert(std::make_pair(std::string("cim:RegularTimePoint.value2"), &assign_RegularTimePoint_value2)); + assign_map.emplace("cim:RegularTimePoint.sequenceNumber", &assign_RegularTimePoint_sequenceNumber); + assign_map.emplace("cim:RegularTimePoint.value1", &assign_RegularTimePoint_value1); + assign_map.emplace("cim:RegularTimePoint.value2", &assign_RegularTimePoint_value2); } void RegularTimePoint::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RegularTimePoint.IntervalSchedule"), &assign_RegularTimePoint_IntervalSchedule)); + assign_map.emplace("cim:RegularTimePoint.IntervalSchedule", &assign_RegularTimePoint_IntervalSchedule); } void RegularTimePoint::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/RegularTimePoint.hpp b/CGMES_3.0.0/RegularTimePoint.hpp index f214863b5..e4b126f5c 100644 --- a/CGMES_3.0.0/RegularTimePoint.hpp +++ b/CGMES_3.0.0/RegularTimePoint.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class RegularIntervalSchedule; - /* - Time point for a schedule where the time between the consecutive points is constant. - */ + /** \brief Time point for a schedule where the time between the consecutive points is constant. */ class RegularTimePoint : public BaseClass { public: @@ -29,10 +27,17 @@ namespace CIMPP RegularTimePoint(); ~RegularTimePoint() override; - CIMPP::RegularIntervalSchedule* IntervalSchedule; /* Regular interval schedule containing this time point. Default: 0 */ - CIMPP::Integer sequenceNumber; /* The position of the regular time point in the sequence. Note that time points don`t have to be sequential, i.e. time points may be omitted. The actual time for a RegularTimePoint is computed by multiplying the associated regular interval schedule`s time step with the regular time point sequence number and adding the associated schedules start time. To specify values for the start time, use sequence number 0. The sequence number cannot be negative. Default: 0 */ - CIMPP::Float value1; /* The first value at the time. The meaning of the value is defined by the derived type of the associated schedule. Default: 0.0 */ - CIMPP::Float value2; /* The second value at the time. The meaning of the value is defined by the derived type of the associated schedule. Default: 0.0 */ + /** \brief Regular interval schedule containing this time point. Default: 0 */ + CIMPP::RegularIntervalSchedule* IntervalSchedule; + + /** \brief The position of the regular time point in the sequence. Note that time points don`t have to be sequential, i.e. time points may be omitted. The actual time for a RegularTimePoint is computed by multiplying the associated regular interval schedule`s time step with the regular time point sequence number and adding the associated schedules start time. To specify values for the start time, use sequence number 0. The sequence number cannot be negative. Default: 0 */ + CIMPP::Integer sequenceNumber; + + /** \brief The first value at the time. The meaning of the value is defined by the derived type of the associated schedule. Default: 0.0 */ + CIMPP::Float value1; + + /** \brief The second value at the time. The meaning of the value is defined by the derived type of the associated schedule. Default: 0.0 */ + CIMPP::Float value2; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/RegulatingCondEq.cpp b/CGMES_3.0.0/RegulatingCondEq.cpp index 3a59d5839..fceacea10 100644 --- a/CGMES_3.0.0/RegulatingCondEq.cpp +++ b/CGMES_3.0.0/RegulatingCondEq.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "RegulatingControl.hpp" -#include "Boolean.hpp" using namespace CIMPP; -RegulatingCondEq::RegulatingCondEq() : RegulatingControl(nullptr) {}; -RegulatingCondEq::~RegulatingCondEq() {}; +RegulatingCondEq::RegulatingCondEq() : RegulatingControl(nullptr) {} +RegulatingCondEq::~RegulatingCondEq() {} static const std::list PossibleProfilesForClass = { @@ -45,21 +44,6 @@ RegulatingCondEq::getPossibleProfilesForAttributes() const return map; } - -bool assign_RegulatingCondEq_controlEnabled(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (RegulatingCondEq* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->controlEnabled; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_RegulatingControl_RegulatingCondEq(BaseClass*, BaseClass*); bool assign_RegulatingCondEq_RegulatingControl(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,24 +61,24 @@ bool assign_RegulatingCondEq_RegulatingControl(BaseClass* BaseClass_ptr1, BaseCl return false; } -bool get_RegulatingCondEq_controlEnabled(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_RegulatingCondEq_controlEnabled(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const RegulatingCondEq* element = dynamic_cast(BaseClass_ptr1)) + RegulatingCondEq* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->controlEnabled; - if (!buffer.str().empty()) + buffer >> element->controlEnabled; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_RegulatingCondEq_RegulatingControl(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RegulatingCondEq* element = dynamic_cast(BaseClass_ptr1)) + const RegulatingCondEq* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->RegulatingControl != 0) { @@ -105,6 +89,20 @@ bool get_RegulatingCondEq_RegulatingControl(const BaseClass* BaseClass_ptr1, std return false; } +bool get_RegulatingCondEq_controlEnabled(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const RegulatingCondEq* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->controlEnabled; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char RegulatingCondEq::debugName[] = "RegulatingCondEq"; const char* RegulatingCondEq::debugString() const @@ -114,17 +112,17 @@ const char* RegulatingCondEq::debugString() const void RegulatingCondEq::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RegulatingCondEq"), &RegulatingCondEq_factory)); + factory_map.emplace("cim:RegulatingCondEq", &RegulatingCondEq_factory); } void RegulatingCondEq::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RegulatingCondEq.controlEnabled"), &assign_RegulatingCondEq_controlEnabled)); + assign_map.emplace("cim:RegulatingCondEq.controlEnabled", &assign_RegulatingCondEq_controlEnabled); } void RegulatingCondEq::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RegulatingCondEq.RegulatingControl"), &assign_RegulatingCondEq_RegulatingControl)); + assign_map.emplace("cim:RegulatingCondEq.RegulatingControl", &assign_RegulatingCondEq_RegulatingControl); } void RegulatingCondEq::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/RegulatingCondEq.hpp b/CGMES_3.0.0/RegulatingCondEq.hpp index 69b135bed..8eafcbd8e 100644 --- a/CGMES_3.0.0/RegulatingCondEq.hpp +++ b/CGMES_3.0.0/RegulatingCondEq.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class RegulatingControl; - /* - A type of conducting equipment that can regulate a quantity (i.e. voltage or flow) at a specific point in the network. - */ + /** \brief A type of conducting equipment that can regulate a quantity (i.e. voltage or flow) at a specific point in the network. */ class RegulatingCondEq : public EnergyConnection { public: @@ -28,8 +26,11 @@ namespace CIMPP RegulatingCondEq(); ~RegulatingCondEq() override; - CIMPP::RegulatingControl* RegulatingControl; /* The regulating control scheme in which this equipment participates. Default: 0 */ - CIMPP::Boolean controlEnabled; /* Specifies the regulation status of the equipment. True is regulating, false is not regulating. Default: false */ + /** \brief The regulating control scheme in which this equipment participates. Default: 0 */ + CIMPP::RegulatingControl* RegulatingControl; + + /** \brief Specifies the regulation status of the equipment. True is regulating, false is not regulating. Default: false */ + CIMPP::Boolean controlEnabled; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/RegulatingControl.cpp b/CGMES_3.0.0/RegulatingControl.cpp index d69df4d1a..68fd360fa 100644 --- a/CGMES_3.0.0/RegulatingControl.cpp +++ b/CGMES_3.0.0/RegulatingControl.cpp @@ -11,19 +11,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "RegulatingCondEq.hpp" #include "RegulationSchedule.hpp" #include "Terminal.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "RegulatingControlModeKind.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "UnitMultiplier.hpp" using namespace CIMPP; -RegulatingControl::RegulatingControl() : Terminal(nullptr) {}; -RegulatingControl::~RegulatingControl() {}; +RegulatingControl::RegulatingControl() : Terminal(nullptr) {} +RegulatingControl::~RegulatingControl() {} static const std::list PossibleProfilesForClass = { @@ -61,164 +53,189 @@ RegulatingControl::getPossibleProfilesForAttributes() const return map; } +bool assign_RegulatingCondEq_RegulatingControl(BaseClass*, BaseClass*); +bool assign_RegulatingControl_RegulatingCondEq(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + RegulatingCondEq* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->RegulatingCondEq.begin(), element->RegulatingCondEq.end(), element2) == element->RegulatingCondEq.end()) + { + element->RegulatingCondEq.push_back(element2); + return assign_RegulatingCondEq_RegulatingControl(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_RegulatingControl_discrete(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegulationSchedule_RegulatingControl(BaseClass*, BaseClass*); +bool assign_RegulatingControl_RegulationSchedule(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + RegulationSchedule* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->discrete; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->RegulationSchedule.begin(), element->RegulationSchedule.end(), element2) == element->RegulationSchedule.end()) + { + element->RegulationSchedule.push_back(element2); + return assign_RegulationSchedule_RegulatingControl(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_RegulatingControl_enabled(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Terminal_RegulatingControl(BaseClass*, BaseClass*); +bool assign_RegulatingControl_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->enabled; - if (buffer.fail()) - return false; - else - return true; + if (element->Terminal != element2) + { + element->Terminal = element2; + return assign_Terminal_RegulatingControl(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_RegulatingControl_maxAllowedTargetValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegulatingControl_discrete(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->maxAllowedTargetValue; - if (buffer.fail()) - return false; - else + buffer >> element->discrete; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RegulatingControl_minAllowedTargetValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegulatingControl_enabled(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->minAllowedTargetValue; - if (buffer.fail()) - return false; - else + buffer >> element->enabled; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RegulatingControl_mode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegulatingControl_maxAllowedTargetValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->mode; - if (buffer.fail()) - return false; - else + buffer >> element->maxAllowedTargetValue; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RegulatingControl_targetDeadband(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegulatingControl_minAllowedTargetValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->targetDeadband; - if (buffer.fail()) - return false; - else + buffer >> element->minAllowedTargetValue; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RegulatingControl_targetValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegulatingControl_mode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->targetValue; - if (buffer.fail()) - return false; - else + buffer >> element->mode; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RegulatingControl_targetValueUnitMultiplier(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RegulatingControl_targetDeadband(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->targetValueUnitMultiplier; - if (buffer.fail()) - return false; - else + buffer >> element->targetDeadband; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_RegulatingCondEq_RegulatingControl(BaseClass*, BaseClass*); -bool assign_RegulatingControl_RegulatingCondEq(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_RegulatingControl_targetValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { RegulatingControl* element = dynamic_cast(BaseClass_ptr1); - RegulatingCondEq* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->RegulatingCondEq.begin(), element->RegulatingCondEq.end(), element2) == element->RegulatingCondEq.end()) + buffer >> element->targetValue; + if (!buffer.fail()) { - element->RegulatingCondEq.push_back(element2); - return assign_RegulatingCondEq_RegulatingControl(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_RegulationSchedule_RegulatingControl(BaseClass*, BaseClass*); -bool assign_RegulatingControl_RegulationSchedule(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_RegulatingControl_targetValueUnitMultiplier(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { RegulatingControl* element = dynamic_cast(BaseClass_ptr1); - RegulationSchedule* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->RegulationSchedule.begin(), element->RegulationSchedule.end(), element2) == element->RegulationSchedule.end()) + buffer >> element->targetValueUnitMultiplier; + if (!buffer.fail()) { - element->RegulationSchedule.push_back(element2); - return assign_RegulationSchedule_RegulatingControl(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_Terminal_RegulatingControl(BaseClass*, BaseClass*); -bool assign_RegulatingControl_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + + + +bool get_RegulatingControl_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - RegulatingControl* element = dynamic_cast(BaseClass_ptr1); - Terminal* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->Terminal != element2) + if (element->Terminal != 0) { - element->Terminal = element2; - return assign_Terminal_RegulatingControl(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->Terminal); + return true; } - return true; } return false; } bool get_RegulatingControl_discrete(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + const RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->discrete; if (!buffer.str().empty()) @@ -232,7 +249,8 @@ bool get_RegulatingControl_discrete(const BaseClass* BaseClass_ptr1, std::string bool get_RegulatingControl_enabled(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + const RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->enabled; if (!buffer.str().empty()) @@ -246,7 +264,8 @@ bool get_RegulatingControl_enabled(const BaseClass* BaseClass_ptr1, std::strings bool get_RegulatingControl_maxAllowedTargetValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + const RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxAllowedTargetValue; if (!buffer.str().empty()) @@ -260,7 +279,8 @@ bool get_RegulatingControl_maxAllowedTargetValue(const BaseClass* BaseClass_ptr1 bool get_RegulatingControl_minAllowedTargetValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + const RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minAllowedTargetValue; if (!buffer.str().empty()) @@ -272,11 +292,12 @@ bool get_RegulatingControl_minAllowedTargetValue(const BaseClass* BaseClass_ptr1 return false; } -bool get_RegulatingControl_targetDeadband(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_RegulatingControl_mode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + const RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->targetDeadband; + buffer << element->mode; if (!buffer.str().empty()) { return true; @@ -286,11 +307,12 @@ bool get_RegulatingControl_targetDeadband(const BaseClass* BaseClass_ptr1, std:: return false; } -bool get_RegulatingControl_targetValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_RegulatingControl_targetDeadband(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + const RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->targetValue; + buffer << element->targetDeadband; if (!buffer.str().empty()) { return true; @@ -300,26 +322,12 @@ bool get_RegulatingControl_targetValue(const BaseClass* BaseClass_ptr1, std::str return false; } - -bool get_RegulatingControl_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->Terminal != 0) - { - BaseClass_list.push_back(element->Terminal); - return true; - } - } - return false; -} - - -bool get_RegulatingControl_mode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_RegulatingControl_targetValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + const RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->mode; + buffer << element->targetValue; if (!buffer.str().empty()) { return true; @@ -331,7 +339,8 @@ bool get_RegulatingControl_mode(const BaseClass* BaseClass_ptr1, std::stringstre bool get_RegulatingControl_targetValueUnitMultiplier(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RegulatingControl* element = dynamic_cast(BaseClass_ptr1)) + const RegulatingControl* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->targetValueUnitMultiplier; if (!buffer.str().empty()) @@ -351,26 +360,26 @@ const char* RegulatingControl::debugString() const void RegulatingControl::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RegulatingControl"), &RegulatingControl_factory)); + factory_map.emplace("cim:RegulatingControl", &RegulatingControl_factory); } void RegulatingControl::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.discrete"), &assign_RegulatingControl_discrete)); - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.enabled"), &assign_RegulatingControl_enabled)); - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.maxAllowedTargetValue"), &assign_RegulatingControl_maxAllowedTargetValue)); - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.minAllowedTargetValue"), &assign_RegulatingControl_minAllowedTargetValue)); - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.mode"), &assign_RegulatingControl_mode)); - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.targetDeadband"), &assign_RegulatingControl_targetDeadband)); - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.targetValue"), &assign_RegulatingControl_targetValue)); - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.targetValueUnitMultiplier"), &assign_RegulatingControl_targetValueUnitMultiplier)); + assign_map.emplace("cim:RegulatingControl.discrete", &assign_RegulatingControl_discrete); + assign_map.emplace("cim:RegulatingControl.enabled", &assign_RegulatingControl_enabled); + assign_map.emplace("cim:RegulatingControl.maxAllowedTargetValue", &assign_RegulatingControl_maxAllowedTargetValue); + assign_map.emplace("cim:RegulatingControl.minAllowedTargetValue", &assign_RegulatingControl_minAllowedTargetValue); + assign_map.emplace("cim:RegulatingControl.mode", &assign_RegulatingControl_mode); + assign_map.emplace("cim:RegulatingControl.targetDeadband", &assign_RegulatingControl_targetDeadband); + assign_map.emplace("cim:RegulatingControl.targetValue", &assign_RegulatingControl_targetValue); + assign_map.emplace("cim:RegulatingControl.targetValueUnitMultiplier", &assign_RegulatingControl_targetValueUnitMultiplier); } void RegulatingControl::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.RegulatingCondEq"), &assign_RegulatingControl_RegulatingCondEq)); - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.RegulationSchedule"), &assign_RegulatingControl_RegulationSchedule)); - assign_map.insert(std::make_pair(std::string("cim:RegulatingControl.Terminal"), &assign_RegulatingControl_Terminal)); + assign_map.emplace("cim:RegulatingControl.RegulatingCondEq", &assign_RegulatingControl_RegulatingCondEq); + assign_map.emplace("cim:RegulatingControl.RegulationSchedule", &assign_RegulatingControl_RegulationSchedule); + assign_map.emplace("cim:RegulatingControl.Terminal", &assign_RegulatingControl_Terminal); } void RegulatingControl::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/RegulatingControl.hpp b/CGMES_3.0.0/RegulatingControl.hpp index af03f2bd2..5c324bf7f 100644 --- a/CGMES_3.0.0/RegulatingControl.hpp +++ b/CGMES_3.0.0/RegulatingControl.hpp @@ -23,9 +23,7 @@ namespace CIMPP class RegulationSchedule; class Terminal; - /* - Specifies a set of equipment that works together to control a power system quantity such as voltage or flow. Remote bus voltage control is possible by specifying the controlled terminal located at some place remote from the controlling equipment. The specified terminal shall be associated with the connectivity node of the controlled point. The most specific subtype of RegulatingControl shall be used in case such equipment participate in the control, e.g. TapChangerControl for tap changers. For flow control, load sign convention is used, i.e. positive sign means flow out from a TopologicalNode (bus) into the conducting equipment. The attribute minAllowedTargetValue and maxAllowedTargetValue are required in the following cases: - For a power generating module operated in power factor control mode to specify maximum and minimum power factor values; - Whenever it is necessary to have an off center target voltage for the tap changer regulator. For instance, due to long cables to off shore wind farms and the need to have a simpler setup at the off shore transformer platform, the voltage is controlled from the land at the connection point for the off shore wind farm. Since there usually is a voltage rise along the cable, there is typical and overvoltage of up 3-4 kV compared to the on shore station. Thus in normal operation the tap changer on the on shore station is operated with a target set point, which is in the lower parts of the dead band. The attributes minAllowedTargetValue and maxAllowedTargetValue are not related to the attribute targetDeadband and thus they are not treated as an alternative of the targetDeadband. They are needed due to limitations in the local substation controller. The attribute targetDeadband is used to prevent the power flow from move the tap position in circles (hunting) that is to be used regardless of the attributes minAllowedTargetValue and maxAllowedTargetValue. - */ + /** \brief Specifies a set of equipment that works together to control a power system quantity such as voltage or flow. Remote bus voltage control is possible by specifying the controlled terminal located at some place remote from the controlling equipment. The specified terminal shall be associated with the connectivity node of the controlled point. The most specific subtype of RegulatingControl shall be used in case such equipment participate in the control, e.g. TapChangerControl for tap changers. For flow control, load sign convention is used, i.e. positive sign means flow out from a TopologicalNode (bus) into the conducting equipment. The attribute minAllowedTargetValue and maxAllowedTargetValue are required in the following cases: - For a power generating module operated in power factor control mode to specify maximum and minimum power factor values; - Whenever it is necessary to have an off center target voltage for the tap changer regulator. For instance, due to long cables to off shore wind farms and the need to have a simpler setup at the off shore transformer platform, the voltage is controlled from the land at the connection point for the off shore wind farm. Since there usually is a voltage rise along the cable, there is typical and overvoltage of up 3-4 kV compared to the on shore station. Thus in normal operation the tap changer on the on shore station is operated with a target set point, which is in the lower parts of the dead band. The attributes minAllowedTargetValue and maxAllowedTargetValue are not related to the attribute targetDeadband and thus they are not treated as an alternative of the targetDeadband. They are needed due to limitations in the local substation controller. The attribute targetDeadband is used to prevent the power flow from move the tap position in circles (hunting) that is to be used regardless of the attributes minAllowedTargetValue and maxAllowedTargetValue. */ class RegulatingControl : public PowerSystemResource { public: @@ -33,17 +31,38 @@ namespace CIMPP RegulatingControl(); ~RegulatingControl() override; - std::list RegulatingCondEq; /* The equipment that participates in this regulating control scheme. Default: 0 */ - std::list RegulationSchedule; /* Schedule for this regulating control. Default: 0 */ - CIMPP::Terminal* Terminal; /* The terminal associated with this regulating control. The terminal is associated instead of a node, since the terminal could connect into either a topological node or a connectivity node. Sometimes it is useful to model regulation at a terminal of a bus bar object. Default: 0 */ - CIMPP::Boolean discrete; /* The regulation is performed in a discrete mode. This applies to equipment with discrete controls, e.g. tap changers and shunt compensators. Default: false */ - CIMPP::Boolean enabled; /* The flag tells if regulation is enabled. Default: false */ - CIMPP::Float maxAllowedTargetValue; /* Maximum allowed target value (RegulatingControl.targetValue). Default: 0.0 */ - CIMPP::Float minAllowedTargetValue; /* Minimum allowed target value (RegulatingControl.targetValue). Default: 0.0 */ - CIMPP::RegulatingControlModeKind mode; /* The regulating control mode presently available. This specification allows for determining the kind of regulation without need for obtaining the units from a schedule. Default: 0 */ - CIMPP::Float targetDeadband; /* This is a deadband used with discrete control to avoid excessive update of controls like tap changers and shunt compensator banks while regulating. The units of those appropriate for the mode. The attribute shall be a positive value or zero. If RegulatingControl.discrete is set to `false`, the RegulatingControl.targetDeadband is to be ignored. Note that for instance, if the targetValue is 100 kV and the targetDeadband is 2 kV the range is from 99 to 101 kV. Default: 0.0 */ - CIMPP::Float targetValue; /* The target value specified for case input. This value can be used for the target value without the use of schedules. The value has the units appropriate to the mode attribute. Default: 0.0 */ - CIMPP::UnitMultiplier targetValueUnitMultiplier; /* Specify the multiplier for used for the targetValue. Default: 0 */ + /** \brief The equipment that participates in this regulating control scheme. Default: 0 */ + std::list RegulatingCondEq; + + /** \brief Schedule for this regulating control. Default: 0 */ + std::list RegulationSchedule; + + /** \brief The terminal associated with this regulating control. The terminal is associated instead of a node, since the terminal could connect into either a topological node or a connectivity node. Sometimes it is useful to model regulation at a terminal of a bus bar object. Default: 0 */ + CIMPP::Terminal* Terminal; + + /** \brief The regulation is performed in a discrete mode. This applies to equipment with discrete controls, e.g. tap changers and shunt compensators. Default: false */ + CIMPP::Boolean discrete; + + /** \brief The flag tells if regulation is enabled. Default: false */ + CIMPP::Boolean enabled; + + /** \brief Maximum allowed target value (RegulatingControl.targetValue). Default: 0.0 */ + CIMPP::Float maxAllowedTargetValue; + + /** \brief Minimum allowed target value (RegulatingControl.targetValue). Default: 0.0 */ + CIMPP::Float minAllowedTargetValue; + + /** \brief The regulating control mode presently available. This specification allows for determining the kind of regulation without need for obtaining the units from a schedule. Default: 0 */ + CIMPP::RegulatingControlModeKind mode; + + /** \brief This is a deadband used with discrete control to avoid excessive update of controls like tap changers and shunt compensator banks while regulating. The units of those appropriate for the mode. The attribute shall be a positive value or zero. If RegulatingControl.discrete is set to `false`, the RegulatingControl.targetDeadband is to be ignored. Note that for instance, if the targetValue is 100 kV and the targetDeadband is 2 kV the range is from 99 to 101 kV. Default: 0.0 */ + CIMPP::Float targetDeadband; + + /** \brief The target value specified for case input. This value can be used for the target value without the use of schedules. The value has the units appropriate to the mode attribute. Default: 0.0 */ + CIMPP::Float targetValue; + + /** \brief Specify the multiplier for used for the targetValue. Default: 0 */ + CIMPP::UnitMultiplier targetValueUnitMultiplier; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/RegulatingControlModeKind.cpp b/CGMES_3.0.0/RegulatingControlModeKind.cpp index 7ac923d24..e30b5adcc 100644 --- a/CGMES_3.0.0/RegulatingControlModeKind.cpp +++ b/CGMES_3.0.0/RegulatingControlModeKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "RegulatingControlModeKind") + if (EnumSymbol.substr(0, pos) != "RegulatingControlModeKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,42 +50,42 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "voltage") + if (EnumSymbol == "voltage") { rop = RegulatingControlModeKind::voltage; return lop; } - if(EnumSymbol == "activePower") + if (EnumSymbol == "activePower") { rop = RegulatingControlModeKind::activePower; return lop; } - if(EnumSymbol == "reactivePower") + if (EnumSymbol == "reactivePower") { rop = RegulatingControlModeKind::reactivePower; return lop; } - if(EnumSymbol == "currentFlow") + if (EnumSymbol == "currentFlow") { rop = RegulatingControlModeKind::currentFlow; return lop; } - if(EnumSymbol == "admittance") + if (EnumSymbol == "admittance") { rop = RegulatingControlModeKind::admittance; return lop; } - if(EnumSymbol == "timeScheduled") + if (EnumSymbol == "timeScheduled") { rop = RegulatingControlModeKind::timeScheduled; return lop; } - if(EnumSymbol == "temperature") + if (EnumSymbol == "temperature") { rop = RegulatingControlModeKind::temperature; return lop; } - if(EnumSymbol == "powerFactor") + if (EnumSymbol == "powerFactor") { rop = RegulatingControlModeKind::powerFactor; return lop; diff --git a/CGMES_3.0.0/RegulatingControlModeKind.hpp b/CGMES_3.0.0/RegulatingControlModeKind.hpp index ed5351e3e..d47d046cd 100644 --- a/CGMES_3.0.0/RegulatingControlModeKind.hpp +++ b/CGMES_3.0.0/RegulatingControlModeKind.hpp @@ -9,45 +9,27 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The kind of regulation model. For example regulating voltage, reactive power, active power, etc. - */ + /** \brief The kind of regulation model. For example regulating voltage, reactive power, active power, etc. */ class RegulatingControlModeKind { public: enum RegulatingControlModeKind_ENUM { - /** - * Voltage is specified. - */ + /** Voltage is specified. */ voltage, - /** - * Active power is specified. - */ + /** Active power is specified. */ activePower, - /** - * Reactive power is specified. - */ + /** Reactive power is specified. */ reactivePower, - /** - * Current flow is specified. - */ + /** Current flow is specified. */ currentFlow, - /** - * Admittance is specified. - */ + /** Admittance is specified. */ admittance, - /** - * Control switches on/off by time of day. The times may change on the weekend, or in different seasons. - */ + /** Control switches on/off by time of day. The times may change on the weekend, or in different seasons. */ timeScheduled, - /** - * Control switches on/off based on the local temperature (i.e., a thermostat). - */ + /** Control switches on/off based on the local temperature (i.e., a thermostat). */ temperature, - /** - * Power factor is specified. - */ + /** Power factor is specified. */ powerFactor, }; diff --git a/CGMES_3.0.0/RegulationSchedule.cpp b/CGMES_3.0.0/RegulationSchedule.cpp index 521188f5f..8750abb1a 100644 --- a/CGMES_3.0.0/RegulationSchedule.cpp +++ b/CGMES_3.0.0/RegulationSchedule.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -RegulationSchedule::RegulationSchedule() : RegulatingControl(nullptr) {}; -RegulationSchedule::~RegulationSchedule() {}; +RegulationSchedule::RegulationSchedule() : RegulatingControl(nullptr) {} +RegulationSchedule::~RegulationSchedule() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ RegulationSchedule::getPossibleProfilesForAttributes() const return map; } - - bool assign_RegulatingControl_RegulationSchedule(BaseClass*, BaseClass*); bool assign_RegulationSchedule_RegulatingControl(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_RegulationSchedule_RegulatingControl(BaseClass* BaseClass_ptr1, Base return false; } - bool get_RegulationSchedule_RegulatingControl(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RegulationSchedule* element = dynamic_cast(BaseClass_ptr1)) + const RegulationSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->RegulatingControl != 0) { @@ -73,7 +71,6 @@ bool get_RegulationSchedule_RegulatingControl(const BaseClass* BaseClass_ptr1, s return false; } - const char RegulationSchedule::debugName[] = "RegulationSchedule"; const char* RegulationSchedule::debugString() const { @@ -82,7 +79,7 @@ const char* RegulationSchedule::debugString() const void RegulationSchedule::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RegulationSchedule"), &RegulationSchedule_factory)); + factory_map.emplace("cim:RegulationSchedule", &RegulationSchedule_factory); } void RegulationSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void RegulationSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RegulationSchedule.RegulatingControl"), &assign_RegulationSchedule_RegulatingControl)); + assign_map.emplace("cim:RegulationSchedule.RegulatingControl", &assign_RegulationSchedule_RegulatingControl); } void RegulationSchedule::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/RegulationSchedule.hpp b/CGMES_3.0.0/RegulationSchedule.hpp index 2ec2827f3..b6c06cd57 100644 --- a/CGMES_3.0.0/RegulationSchedule.hpp +++ b/CGMES_3.0.0/RegulationSchedule.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class RegulatingControl; - /* - A pre-established pattern over time for a controlled variable, e.g., busbar voltage. - */ + /** \brief A pre-established pattern over time for a controlled variable, e.g., busbar voltage. */ class RegulationSchedule : public SeasonDayTypeSchedule { public: @@ -27,7 +25,8 @@ namespace CIMPP RegulationSchedule(); ~RegulationSchedule() override; - CIMPP::RegulatingControl* RegulatingControl; /* Regulating controls that have this schedule. Default: 0 */ + /** \brief Regulating controls that have this schedule. Default: 0 */ + CIMPP::RegulatingControl* RegulatingControl; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/RemoteInputSignal.cpp b/CGMES_3.0.0/RemoteInputSignal.cpp index f5926461c..f187b941e 100644 --- a/CGMES_3.0.0/RemoteInputSignal.cpp +++ b/CGMES_3.0.0/RemoteInputSignal.cpp @@ -17,12 +17,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindPlantDynamics.hpp" #include "WindTurbineType1or2Dynamics.hpp" #include "WindTurbineType3or4Dynamics.hpp" -#include "RemoteSignalKind.hpp" using namespace CIMPP; -RemoteInputSignal::RemoteInputSignal() : DiscontinuousExcitationControlDynamics(nullptr), PFVArControllerType1Dynamics(nullptr), PowerSystemStabilizerDynamics(nullptr), Terminal(nullptr), UnderexcitationLimiterDynamics(nullptr), VoltageCompensatorDynamics(nullptr), WindPlantDynamics(nullptr), WindTurbineType1or2Dynamics(nullptr), WindTurbineType3or4Dynamics(nullptr) {}; -RemoteInputSignal::~RemoteInputSignal() {}; +RemoteInputSignal::RemoteInputSignal() : DiscontinuousExcitationControlDynamics(nullptr), PFVArControllerType1Dynamics(nullptr), PowerSystemStabilizerDynamics(nullptr), Terminal(nullptr), UnderexcitationLimiterDynamics(nullptr), VoltageCompensatorDynamics(nullptr), WindPlantDynamics(nullptr), WindTurbineType1or2Dynamics(nullptr), WindTurbineType3or4Dynamics(nullptr) {} +RemoteInputSignal::~RemoteInputSignal() {} static const std::list PossibleProfilesForClass = { @@ -58,21 +57,6 @@ RemoteInputSignal::getPossibleProfilesForAttributes() const return map; } - -bool assign_RemoteInputSignal_remoteSignalType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->remoteSignalType; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_DiscontinuousExcitationControlDynamics_RemoteInputSignal(BaseClass*, BaseClass*); bool assign_RemoteInputSignal_DiscontinuousExcitationControlDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -89,6 +73,7 @@ bool assign_RemoteInputSignal_DiscontinuousExcitationControlDynamics(BaseClass* } return false; } + bool assign_PFVArControllerType1Dynamics_RemoteInputSignal(BaseClass*, BaseClass*); bool assign_RemoteInputSignal_PFVArControllerType1Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -105,6 +90,7 @@ bool assign_RemoteInputSignal_PFVArControllerType1Dynamics(BaseClass* BaseClass_ } return false; } + bool assign_PowerSystemStabilizerDynamics_RemoteInputSignal(BaseClass*, BaseClass*); bool assign_RemoteInputSignal_PowerSystemStabilizerDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -121,6 +107,7 @@ bool assign_RemoteInputSignal_PowerSystemStabilizerDynamics(BaseClass* BaseClass } return false; } + bool assign_Terminal_RemoteInputSignal(BaseClass*, BaseClass*); bool assign_RemoteInputSignal_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -137,6 +124,7 @@ bool assign_RemoteInputSignal_Terminal(BaseClass* BaseClass_ptr1, BaseClass* Bas } return false; } + bool assign_UnderexcitationLimiterDynamics_RemoteInputSignal(BaseClass*, BaseClass*); bool assign_RemoteInputSignal_UnderexcitationLimiterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -153,6 +141,7 @@ bool assign_RemoteInputSignal_UnderexcitationLimiterDynamics(BaseClass* BaseClas } return false; } + bool assign_VoltageCompensatorDynamics_RemoteInputSignal(BaseClass*, BaseClass*); bool assign_RemoteInputSignal_VoltageCompensatorDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -169,6 +158,7 @@ bool assign_RemoteInputSignal_VoltageCompensatorDynamics(BaseClass* BaseClass_pt } return false; } + bool assign_WindPlantDynamics_RemoteInputSignal(BaseClass*, BaseClass*); bool assign_RemoteInputSignal_WindPlantDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -185,6 +175,7 @@ bool assign_RemoteInputSignal_WindPlantDynamics(BaseClass* BaseClass_ptr1, BaseC } return false; } + bool assign_WindTurbineType1or2Dynamics_RemoteInputSignal(BaseClass*, BaseClass*); bool assign_RemoteInputSignal_WindTurbineType1or2Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -201,6 +192,7 @@ bool assign_RemoteInputSignal_WindTurbineType1or2Dynamics(BaseClass* BaseClass_p } return false; } + bool assign_WindTurbineType3or4Dynamics_RemoteInputSignal(BaseClass*, BaseClass*); bool assign_RemoteInputSignal_WindTurbineType3or4Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -218,10 +210,24 @@ bool assign_RemoteInputSignal_WindTurbineType3or4Dynamics(BaseClass* BaseClass_p return false; } +bool assign_RemoteInputSignal_remoteSignalType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->remoteSignalType; + if (!buffer.fail()) + { + return true; + } + } + return false; +} bool get_RemoteInputSignal_DiscontinuousExcitationControlDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1)) + const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DiscontinuousExcitationControlDynamics != 0) { @@ -234,7 +240,8 @@ bool get_RemoteInputSignal_DiscontinuousExcitationControlDynamics(const BaseClas bool get_RemoteInputSignal_PFVArControllerType1Dynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1)) + const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PFVArControllerType1Dynamics != 0) { @@ -247,7 +254,8 @@ bool get_RemoteInputSignal_PFVArControllerType1Dynamics(const BaseClass* BaseCla bool get_RemoteInputSignal_PowerSystemStabilizerDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1)) + const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PowerSystemStabilizerDynamics != 0) { @@ -260,7 +268,8 @@ bool get_RemoteInputSignal_PowerSystemStabilizerDynamics(const BaseClass* BaseCl bool get_RemoteInputSignal_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1)) + const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Terminal != 0) { @@ -273,7 +282,8 @@ bool get_RemoteInputSignal_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1)) + const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->UnderexcitationLimiterDynamics != 0) { @@ -286,7 +296,8 @@ bool get_RemoteInputSignal_UnderexcitationLimiterDynamics(const BaseClass* BaseC bool get_RemoteInputSignal_VoltageCompensatorDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1)) + const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->VoltageCompensatorDynamics != 0) { @@ -298,9 +309,12 @@ bool get_RemoteInputSignal_VoltageCompensatorDynamics(const BaseClass* BaseClass } + + bool get_RemoteInputSignal_remoteSignalType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1)) + const RemoteInputSignal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->remoteSignalType; if (!buffer.str().empty()) @@ -320,25 +334,25 @@ const char* RemoteInputSignal::debugString() const void RemoteInputSignal::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RemoteInputSignal"), &RemoteInputSignal_factory)); + factory_map.emplace("cim:RemoteInputSignal", &RemoteInputSignal_factory); } void RemoteInputSignal::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.remoteSignalType"), &assign_RemoteInputSignal_remoteSignalType)); + assign_map.emplace("cim:RemoteInputSignal.remoteSignalType", &assign_RemoteInputSignal_remoteSignalType); } void RemoteInputSignal::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.DiscontinuousExcitationControlDynamics"), &assign_RemoteInputSignal_DiscontinuousExcitationControlDynamics)); - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.PFVArControllerType1Dynamics"), &assign_RemoteInputSignal_PFVArControllerType1Dynamics)); - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.PowerSystemStabilizerDynamics"), &assign_RemoteInputSignal_PowerSystemStabilizerDynamics)); - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.Terminal"), &assign_RemoteInputSignal_Terminal)); - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.UnderexcitationLimiterDynamics"), &assign_RemoteInputSignal_UnderexcitationLimiterDynamics)); - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.VoltageCompensatorDynamics"), &assign_RemoteInputSignal_VoltageCompensatorDynamics)); - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.WindPlantDynamics"), &assign_RemoteInputSignal_WindPlantDynamics)); - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.WindTurbineType1or2Dynamics"), &assign_RemoteInputSignal_WindTurbineType1or2Dynamics)); - assign_map.insert(std::make_pair(std::string("cim:RemoteInputSignal.WindTurbineType3or4Dynamics"), &assign_RemoteInputSignal_WindTurbineType3or4Dynamics)); + assign_map.emplace("cim:RemoteInputSignal.DiscontinuousExcitationControlDynamics", &assign_RemoteInputSignal_DiscontinuousExcitationControlDynamics); + assign_map.emplace("cim:RemoteInputSignal.PFVArControllerType1Dynamics", &assign_RemoteInputSignal_PFVArControllerType1Dynamics); + assign_map.emplace("cim:RemoteInputSignal.PowerSystemStabilizerDynamics", &assign_RemoteInputSignal_PowerSystemStabilizerDynamics); + assign_map.emplace("cim:RemoteInputSignal.Terminal", &assign_RemoteInputSignal_Terminal); + assign_map.emplace("cim:RemoteInputSignal.UnderexcitationLimiterDynamics", &assign_RemoteInputSignal_UnderexcitationLimiterDynamics); + assign_map.emplace("cim:RemoteInputSignal.VoltageCompensatorDynamics", &assign_RemoteInputSignal_VoltageCompensatorDynamics); + assign_map.emplace("cim:RemoteInputSignal.WindPlantDynamics", &assign_RemoteInputSignal_WindPlantDynamics); + assign_map.emplace("cim:RemoteInputSignal.WindTurbineType1or2Dynamics", &assign_RemoteInputSignal_WindTurbineType1or2Dynamics); + assign_map.emplace("cim:RemoteInputSignal.WindTurbineType3or4Dynamics", &assign_RemoteInputSignal_WindTurbineType3or4Dynamics); } void RemoteInputSignal::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/RemoteInputSignal.hpp b/CGMES_3.0.0/RemoteInputSignal.hpp index 69f7a12f2..b9acbcd98 100644 --- a/CGMES_3.0.0/RemoteInputSignal.hpp +++ b/CGMES_3.0.0/RemoteInputSignal.hpp @@ -26,9 +26,7 @@ namespace CIMPP class WindTurbineType1or2Dynamics; class WindTurbineType3or4Dynamics; - /* - Supports connection to a terminal associated with a remote bus from which an input signal of a specific type is coming. - */ + /** \brief Supports connection to a terminal associated with a remote bus from which an input signal of a specific type is coming. */ class RemoteInputSignal : public IdentifiedObject { public: @@ -36,16 +34,35 @@ namespace CIMPP RemoteInputSignal(); ~RemoteInputSignal() override; - CIMPP::DiscontinuousExcitationControlDynamics* DiscontinuousExcitationControlDynamics; /* Discontinuous excitation control model using this remote input signal. Default: 0 */ - CIMPP::PFVArControllerType1Dynamics* PFVArControllerType1Dynamics; /* Power factor or VAr controller type 1 model using this remote input signal. Default: 0 */ - CIMPP::PowerSystemStabilizerDynamics* PowerSystemStabilizerDynamics; /* Power system stabilizer model using this remote input signal. Default: 0 */ - CIMPP::Terminal* Terminal; /* Remote terminal with which this input signal is associated. Default: 0 */ - CIMPP::UnderexcitationLimiterDynamics* UnderexcitationLimiterDynamics; /* Underexcitation limiter model using this remote input signal. Default: 0 */ - CIMPP::VoltageCompensatorDynamics* VoltageCompensatorDynamics; /* Voltage compensator model using this remote input signal. Default: 0 */ - CIMPP::WindPlantDynamics* WindPlantDynamics; /* The wind plant using the remote signal. Default: 0 */ - CIMPP::WindTurbineType1or2Dynamics* WindTurbineType1or2Dynamics; /* Wind generator type 1 or type 2 model using this remote input signal. Default: 0 */ - CIMPP::WindTurbineType3or4Dynamics* WindTurbineType3or4Dynamics; /* Wind turbine type 3 or type 4 models using this remote input signal. Default: 0 */ - CIMPP::RemoteSignalKind remoteSignalType; /* Type of input signal. Default: 0 */ + /** \brief Discontinuous excitation control model using this remote input signal. Default: 0 */ + CIMPP::DiscontinuousExcitationControlDynamics* DiscontinuousExcitationControlDynamics; + + /** \brief Power factor or VAr controller type 1 model using this remote input signal. Default: 0 */ + CIMPP::PFVArControllerType1Dynamics* PFVArControllerType1Dynamics; + + /** \brief Power system stabilizer model using this remote input signal. Default: 0 */ + CIMPP::PowerSystemStabilizerDynamics* PowerSystemStabilizerDynamics; + + /** \brief Remote terminal with which this input signal is associated. Default: 0 */ + CIMPP::Terminal* Terminal; + + /** \brief Underexcitation limiter model using this remote input signal. Default: 0 */ + CIMPP::UnderexcitationLimiterDynamics* UnderexcitationLimiterDynamics; + + /** \brief Voltage compensator model using this remote input signal. Default: 0 */ + CIMPP::VoltageCompensatorDynamics* VoltageCompensatorDynamics; + + /** \brief The wind plant using the remote signal. Default: 0 */ + CIMPP::WindPlantDynamics* WindPlantDynamics; + + /** \brief Wind generator type 1 or type 2 model using this remote input signal. Default: 0 */ + CIMPP::WindTurbineType1or2Dynamics* WindTurbineType1or2Dynamics; + + /** \brief Wind turbine type 3 or type 4 models using this remote input signal. Default: 0 */ + CIMPP::WindTurbineType3or4Dynamics* WindTurbineType3or4Dynamics; + + /** \brief Type of input signal. Default: 0 */ + CIMPP::RemoteSignalKind remoteSignalType; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/RemoteSignalKind.cpp b/CGMES_3.0.0/RemoteSignalKind.cpp index e1cd4d2e7..a5b95bd01 100644 --- a/CGMES_3.0.0/RemoteSignalKind.cpp +++ b/CGMES_3.0.0/RemoteSignalKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "RemoteSignalKind") + if (EnumSymbol.substr(0, pos) != "RemoteSignalKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,47 +50,47 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "remoteBusVoltageFrequency") + if (EnumSymbol == "remoteBusVoltageFrequency") { rop = RemoteSignalKind::remoteBusVoltageFrequency; return lop; } - if(EnumSymbol == "remoteBusVoltageFrequencyDeviation") + if (EnumSymbol == "remoteBusVoltageFrequencyDeviation") { rop = RemoteSignalKind::remoteBusVoltageFrequencyDeviation; return lop; } - if(EnumSymbol == "remoteBusFrequency") + if (EnumSymbol == "remoteBusFrequency") { rop = RemoteSignalKind::remoteBusFrequency; return lop; } - if(EnumSymbol == "remoteBusFrequencyDeviation") + if (EnumSymbol == "remoteBusFrequencyDeviation") { rop = RemoteSignalKind::remoteBusFrequencyDeviation; return lop; } - if(EnumSymbol == "remoteBusVoltageAmplitude") + if (EnumSymbol == "remoteBusVoltageAmplitude") { rop = RemoteSignalKind::remoteBusVoltageAmplitude; return lop; } - if(EnumSymbol == "remoteBusVoltage") + if (EnumSymbol == "remoteBusVoltage") { rop = RemoteSignalKind::remoteBusVoltage; return lop; } - if(EnumSymbol == "remoteBranchCurrentAmplitude") + if (EnumSymbol == "remoteBranchCurrentAmplitude") { rop = RemoteSignalKind::remoteBranchCurrentAmplitude; return lop; } - if(EnumSymbol == "remoteBusVoltageAmplitudeDerivative") + if (EnumSymbol == "remoteBusVoltageAmplitudeDerivative") { rop = RemoteSignalKind::remoteBusVoltageAmplitudeDerivative; return lop; } - if(EnumSymbol == "remotePuBusVoltageDerivative") + if (EnumSymbol == "remotePuBusVoltageDerivative") { rop = RemoteSignalKind::remotePuBusVoltageDerivative; return lop; diff --git a/CGMES_3.0.0/RemoteSignalKind.hpp b/CGMES_3.0.0/RemoteSignalKind.hpp index 17a1358d3..ebdf3d268 100644 --- a/CGMES_3.0.0/RemoteSignalKind.hpp +++ b/CGMES_3.0.0/RemoteSignalKind.hpp @@ -9,49 +9,29 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of input signal coming from remote bus. - */ + /** \brief Type of input signal coming from remote bus. */ class RemoteSignalKind { public: enum RemoteSignalKind_ENUM { - /** - * Input is voltage frequency from remote terminal bus. - */ + /** Input is voltage frequency from remote terminal bus. */ remoteBusVoltageFrequency, - /** - * Input is voltage frequency deviation from remote terminal bus. - */ + /** Input is voltage frequency deviation from remote terminal bus. */ remoteBusVoltageFrequencyDeviation, - /** - * Input is frequency from remote terminal bus. - */ + /** Input is frequency from remote terminal bus. */ remoteBusFrequency, - /** - * Input is frequency deviation from remote terminal bus. - */ + /** Input is frequency deviation from remote terminal bus. */ remoteBusFrequencyDeviation, - /** - * Input is voltage amplitude from remote terminal bus. - */ + /** Input is voltage amplitude from remote terminal bus. */ remoteBusVoltageAmplitude, - /** - * Input is voltage from remote terminal bus. - */ + /** Input is voltage from remote terminal bus. */ remoteBusVoltage, - /** - * Input is branch current amplitude from remote terminal bus. - */ + /** Input is branch current amplitude from remote terminal bus. */ remoteBranchCurrentAmplitude, - /** - * Input is branch current amplitude derivative from remote terminal bus. - */ + /** Input is branch current amplitude derivative from remote terminal bus. */ remoteBusVoltageAmplitudeDerivative, - /** - * Input is PU voltage derivative from remote terminal bus. - */ + /** Input is PU voltage derivative from remote terminal bus. */ remotePuBusVoltageDerivative, }; diff --git a/CGMES_3.0.0/ReportingGroup.cpp b/CGMES_3.0.0/ReportingGroup.cpp index bb65d3090..5a8463cce 100644 --- a/CGMES_3.0.0/ReportingGroup.cpp +++ b/CGMES_3.0.0/ReportingGroup.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ReportingGroup::ReportingGroup() {}; -ReportingGroup::~ReportingGroup() {}; +ReportingGroup::ReportingGroup() {} +ReportingGroup::~ReportingGroup() {} static const std::list PossibleProfilesForClass = { @@ -43,8 +43,6 @@ ReportingGroup::getPossibleProfilesForAttributes() const return map; } - - bool assign_BusNameMarker_ReportingGroup(BaseClass*, BaseClass*); bool assign_ReportingGroup_BusNameMarker(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,6 +59,7 @@ bool assign_ReportingGroup_BusNameMarker(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_TopologicalNode_ReportingGroup(BaseClass*, BaseClass*); bool assign_ReportingGroup_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -88,7 +87,7 @@ const char* ReportingGroup::debugString() const void ReportingGroup::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ReportingGroup"), &ReportingGroup_factory)); + factory_map.emplace("cim:ReportingGroup", &ReportingGroup_factory); } void ReportingGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -97,8 +96,8 @@ void ReportingGroup::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ReportingGroup.BusNameMarker"), &assign_ReportingGroup_BusNameMarker)); - assign_map.insert(std::make_pair(std::string("cim:ReportingGroup.TopologicalNode"), &assign_ReportingGroup_TopologicalNode)); + assign_map.emplace("cim:ReportingGroup.BusNameMarker", &assign_ReportingGroup_BusNameMarker); + assign_map.emplace("cim:ReportingGroup.TopologicalNode", &assign_ReportingGroup_TopologicalNode); } void ReportingGroup::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/ReportingGroup.hpp b/CGMES_3.0.0/ReportingGroup.hpp index 848a6032c..4bd9583a2 100644 --- a/CGMES_3.0.0/ReportingGroup.hpp +++ b/CGMES_3.0.0/ReportingGroup.hpp @@ -18,9 +18,7 @@ namespace CIMPP class BusNameMarker; class TopologicalNode; - /* - A reporting group is used for various ad-hoc groupings used for reporting. - */ + /** \brief A reporting group is used for various ad-hoc groupings used for reporting. */ class ReportingGroup : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP ReportingGroup(); ~ReportingGroup() override; - std::list BusNameMarker; /* The bus name markers that belong to this reporting group. Default: 0 */ - std::list TopologicalNode; /* The topological nodes that belong to the reporting group. Default: 0 */ + /** \brief The bus name markers that belong to this reporting group. Default: 0 */ + std::list BusNameMarker; + + /** \brief The topological nodes that belong to the reporting group. Default: 0 */ + std::list TopologicalNode; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Resistance.hpp b/CGMES_3.0.0/Resistance.hpp index cd68a214f..ebb467d82 100644 --- a/CGMES_3.0.0/Resistance.hpp +++ b/CGMES_3.0.0/Resistance.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Resistance (real part of impedance). - */ + /** \brief Resistance (real part of impedance). */ class Resistance { public: diff --git a/CGMES_3.0.0/RotatingMachine.cpp b/CGMES_3.0.0/RotatingMachine.cpp index e59ac165c..099ddc33e 100644 --- a/CGMES_3.0.0/RotatingMachine.cpp +++ b/CGMES_3.0.0/RotatingMachine.cpp @@ -10,16 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "GeneratingUnit.hpp" #include "HydroPump.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" -#include "Float.hpp" -#include "ApparentPower.hpp" -#include "Voltage.hpp" using namespace CIMPP; -RotatingMachine::RotatingMachine() : GeneratingUnit(nullptr), HydroPump(nullptr) {}; -RotatingMachine::~RotatingMachine() {}; +RotatingMachine::RotatingMachine() : GeneratingUnit(nullptr), HydroPump(nullptr) {} +RotatingMachine::~RotatingMachine() {} static const std::list PossibleProfilesForClass = { @@ -55,109 +50,129 @@ RotatingMachine::getPossibleProfilesForAttributes() const return map; } +bool assign_GeneratingUnit_RotatingMachine(BaseClass*, BaseClass*); +bool assign_RotatingMachine_GeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + GeneratingUnit* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->GeneratingUnit != element2) + { + element->GeneratingUnit = element2; + return assign_GeneratingUnit_RotatingMachine(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_RotatingMachine_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_HydroPump_RotatingMachine(BaseClass*, BaseClass*); +bool assign_RotatingMachine_HydroPump(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + HydroPump* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->p; - if (buffer.fail()) - return false; - else - return true; + if (element->HydroPump != element2) + { + element->HydroPump = element2; + return assign_HydroPump_RotatingMachine(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_RotatingMachine_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachine_p(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->q; - if (buffer.fail()) - return false; - else + buffer >> element->p; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RotatingMachine_ratedPowerFactor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachine_q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->ratedPowerFactor; - if (buffer.fail()) - return false; - else + buffer >> element->q; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RotatingMachine_ratedS(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachine_ratedPowerFactor(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->ratedS; - if (buffer.fail()) - return false; - else + buffer >> element->ratedPowerFactor; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RotatingMachine_ratedU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachine_ratedS(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->ratedU; - if (buffer.fail()) - return false; - else + buffer >> element->ratedS; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_GeneratingUnit_RotatingMachine(BaseClass*, BaseClass*); -bool assign_RotatingMachine_GeneratingUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_RotatingMachine_ratedU(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { RotatingMachine* element = dynamic_cast(BaseClass_ptr1); - GeneratingUnit* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->GeneratingUnit != element2) + buffer >> element->ratedU; + if (!buffer.fail()) { - element->GeneratingUnit = element2; - return assign_GeneratingUnit_RotatingMachine(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_HydroPump_RotatingMachine(BaseClass*, BaseClass*); -bool assign_RotatingMachine_HydroPump(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool get_RotatingMachine_GeneratingUnit(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - RotatingMachine* element = dynamic_cast(BaseClass_ptr1); - HydroPump* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->HydroPump != element2) + if (element->GeneratingUnit != 0) { - element->HydroPump = element2; - return assign_HydroPump_RotatingMachine(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->GeneratingUnit); + return true; } - return true; } return false; } + bool get_RotatingMachine_p(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p; if (!buffer.str().empty()) @@ -171,7 +186,8 @@ bool get_RotatingMachine_p(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_RotatingMachine_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q; if (!buffer.str().empty()) @@ -185,7 +201,8 @@ bool get_RotatingMachine_q(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_RotatingMachine_ratedPowerFactor(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedPowerFactor; if (!buffer.str().empty()) @@ -199,7 +216,8 @@ bool get_RotatingMachine_ratedPowerFactor(const BaseClass* BaseClass_ptr1, std:: bool get_RotatingMachine_ratedS(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedS; if (!buffer.str().empty()) @@ -213,7 +231,8 @@ bool get_RotatingMachine_ratedS(const BaseClass* BaseClass_ptr1, std::stringstre bool get_RotatingMachine_ratedU(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedU; if (!buffer.str().empty()) @@ -225,21 +244,6 @@ bool get_RotatingMachine_ratedU(const BaseClass* BaseClass_ptr1, std::stringstre return false; } - -bool get_RotatingMachine_GeneratingUnit(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const RotatingMachine* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->GeneratingUnit != 0) - { - BaseClass_list.push_back(element->GeneratingUnit); - return true; - } - } - return false; -} - - const char RotatingMachine::debugName[] = "RotatingMachine"; const char* RotatingMachine::debugString() const { @@ -248,22 +252,22 @@ const char* RotatingMachine::debugString() const void RotatingMachine::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RotatingMachine"), &RotatingMachine_factory)); + factory_map.emplace("cim:RotatingMachine", &RotatingMachine_factory); } void RotatingMachine::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RotatingMachine.p"), &assign_RotatingMachine_p)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachine.q"), &assign_RotatingMachine_q)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachine.ratedPowerFactor"), &assign_RotatingMachine_ratedPowerFactor)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachine.ratedS"), &assign_RotatingMachine_ratedS)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachine.ratedU"), &assign_RotatingMachine_ratedU)); + assign_map.emplace("cim:RotatingMachine.p", &assign_RotatingMachine_p); + assign_map.emplace("cim:RotatingMachine.q", &assign_RotatingMachine_q); + assign_map.emplace("cim:RotatingMachine.ratedPowerFactor", &assign_RotatingMachine_ratedPowerFactor); + assign_map.emplace("cim:RotatingMachine.ratedS", &assign_RotatingMachine_ratedS); + assign_map.emplace("cim:RotatingMachine.ratedU", &assign_RotatingMachine_ratedU); } void RotatingMachine::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RotatingMachine.GeneratingUnit"), &assign_RotatingMachine_GeneratingUnit)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachine.HydroPump"), &assign_RotatingMachine_HydroPump)); + assign_map.emplace("cim:RotatingMachine.GeneratingUnit", &assign_RotatingMachine_GeneratingUnit); + assign_map.emplace("cim:RotatingMachine.HydroPump", &assign_RotatingMachine_HydroPump); } void RotatingMachine::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/RotatingMachine.hpp b/CGMES_3.0.0/RotatingMachine.hpp index 65989c5ca..80d8688d4 100644 --- a/CGMES_3.0.0/RotatingMachine.hpp +++ b/CGMES_3.0.0/RotatingMachine.hpp @@ -23,9 +23,7 @@ namespace CIMPP class GeneratingUnit; class HydroPump; - /* - A rotating machine which may be used as a generator or motor. - */ + /** \brief A rotating machine which may be used as a generator or motor. */ class RotatingMachine : public RegulatingCondEq { public: @@ -33,13 +31,26 @@ namespace CIMPP RotatingMachine(); ~RotatingMachine() override; - CIMPP::GeneratingUnit* GeneratingUnit; /* A synchronous machine may operate as a generator and as such becomes a member of a generating unit. Default: 0 */ - CIMPP::HydroPump* HydroPump; /* The synchronous machine drives the turbine which moves the water from a low elevation to a higher elevation. The direction of machine rotation for pumping may or may not be the same as for generating. Default: 0 */ - CIMPP::ActivePower p; /* Active power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution. Default: nullptr */ - CIMPP::ReactivePower q; /* Reactive power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution. Default: nullptr */ - CIMPP::Float ratedPowerFactor; /* Power factor (nameplate data). It is primarily used for short circuit data exchange according to IEC 60909. The attribute cannot be a negative value. Default: 0.0 */ - CIMPP::ApparentPower ratedS; /* Nameplate apparent power rating for the unit. The attribute shall have a positive value. Default: nullptr */ - CIMPP::Voltage ratedU; /* Rated voltage (nameplate data, Ur in IEC 60909-0). It is primarily used for short circuit data exchange according to IEC 60909. The attribute shall be a positive value. Default: nullptr */ + /** \brief A synchronous machine may operate as a generator and as such becomes a member of a generating unit. Default: 0 */ + CIMPP::GeneratingUnit* GeneratingUnit; + + /** \brief The synchronous machine drives the turbine which moves the water from a low elevation to a higher elevation. The direction of machine rotation for pumping may or may not be the same as for generating. Default: 0 */ + CIMPP::HydroPump* HydroPump; + + /** \brief Active power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution. Default: nullptr */ + CIMPP::ActivePower p; + + /** \brief Reactive power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution. Default: nullptr */ + CIMPP::ReactivePower q; + + /** \brief Power factor (nameplate data). It is primarily used for short circuit data exchange according to IEC 60909. The attribute cannot be a negative value. Default: 0.0 */ + CIMPP::Float ratedPowerFactor; + + /** \brief Nameplate apparent power rating for the unit. The attribute shall have a positive value. Default: nullptr */ + CIMPP::ApparentPower ratedS; + + /** \brief Rated voltage (nameplate data, Ur in IEC 60909-0). It is primarily used for short circuit data exchange according to IEC 60909. The attribute shall be a positive value. Default: nullptr */ + CIMPP::Voltage ratedU; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/RotatingMachineDynamics.cpp b/CGMES_3.0.0/RotatingMachineDynamics.cpp index a5080dfa7..57dd9d608 100644 --- a/CGMES_3.0.0/RotatingMachineDynamics.cpp +++ b/CGMES_3.0.0/RotatingMachineDynamics.cpp @@ -8,17 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Float.hpp" -#include "Seconds.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -RotatingMachineDynamics::RotatingMachineDynamics() {}; -RotatingMachineDynamics::~RotatingMachineDynamics() {}; +RotatingMachineDynamics::RotatingMachineDynamics() {} +RotatingMachineDynamics::~RotatingMachineDynamics() {} static const std::list PossibleProfilesForClass = { @@ -50,90 +44,94 @@ RotatingMachineDynamics::getPossibleProfilesForAttributes() const return map; } - -bool assign_RotatingMachineDynamics_damping(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachineDynamics_damping(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->damping; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RotatingMachineDynamics_inertia(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachineDynamics_inertia(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->inertia; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RotatingMachineDynamics_saturationFactor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachineDynamics_saturationFactor(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->saturationFactor; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RotatingMachineDynamics_saturationFactor120(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachineDynamics_saturationFactor120(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->saturationFactor120; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RotatingMachineDynamics_statorLeakageReactance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachineDynamics_statorLeakageReactance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->statorLeakageReactance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_RotatingMachineDynamics_statorResistance(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_RotatingMachineDynamics_statorResistance(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->statorResistance; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_RotatingMachineDynamics_damping(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->damping; if (!buffer.str().empty()) @@ -147,7 +145,8 @@ bool get_RotatingMachineDynamics_damping(const BaseClass* BaseClass_ptr1, std::s bool get_RotatingMachineDynamics_inertia(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inertia; if (!buffer.str().empty()) @@ -161,7 +160,8 @@ bool get_RotatingMachineDynamics_inertia(const BaseClass* BaseClass_ptr1, std::s bool get_RotatingMachineDynamics_saturationFactor(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->saturationFactor; if (!buffer.str().empty()) @@ -175,7 +175,8 @@ bool get_RotatingMachineDynamics_saturationFactor(const BaseClass* BaseClass_ptr bool get_RotatingMachineDynamics_saturationFactor120(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->saturationFactor120; if (!buffer.str().empty()) @@ -189,7 +190,8 @@ bool get_RotatingMachineDynamics_saturationFactor120(const BaseClass* BaseClass_ bool get_RotatingMachineDynamics_statorLeakageReactance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->statorLeakageReactance; if (!buffer.str().empty()) @@ -203,7 +205,8 @@ bool get_RotatingMachineDynamics_statorLeakageReactance(const BaseClass* BaseCla bool get_RotatingMachineDynamics_statorResistance(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + const RotatingMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->statorResistance; if (!buffer.str().empty()) @@ -215,8 +218,6 @@ bool get_RotatingMachineDynamics_statorResistance(const BaseClass* BaseClass_ptr return false; } - - const char RotatingMachineDynamics::debugName[] = "RotatingMachineDynamics"; const char* RotatingMachineDynamics::debugString() const { @@ -225,17 +226,17 @@ const char* RotatingMachineDynamics::debugString() const void RotatingMachineDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:RotatingMachineDynamics"), &RotatingMachineDynamics_factory)); + factory_map.emplace("cim:RotatingMachineDynamics", &RotatingMachineDynamics_factory); } void RotatingMachineDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:RotatingMachineDynamics.damping"), &assign_RotatingMachineDynamics_damping)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachineDynamics.inertia"), &assign_RotatingMachineDynamics_inertia)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachineDynamics.saturationFactor"), &assign_RotatingMachineDynamics_saturationFactor)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachineDynamics.saturationFactor120"), &assign_RotatingMachineDynamics_saturationFactor120)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachineDynamics.statorLeakageReactance"), &assign_RotatingMachineDynamics_statorLeakageReactance)); - assign_map.insert(std::make_pair(std::string("cim:RotatingMachineDynamics.statorResistance"), &assign_RotatingMachineDynamics_statorResistance)); + assign_map.emplace("cim:RotatingMachineDynamics.damping", &assign_RotatingMachineDynamics_damping); + assign_map.emplace("cim:RotatingMachineDynamics.inertia", &assign_RotatingMachineDynamics_inertia); + assign_map.emplace("cim:RotatingMachineDynamics.saturationFactor", &assign_RotatingMachineDynamics_saturationFactor); + assign_map.emplace("cim:RotatingMachineDynamics.saturationFactor120", &assign_RotatingMachineDynamics_saturationFactor120); + assign_map.emplace("cim:RotatingMachineDynamics.statorLeakageReactance", &assign_RotatingMachineDynamics_statorLeakageReactance); + assign_map.emplace("cim:RotatingMachineDynamics.statorResistance", &assign_RotatingMachineDynamics_statorResistance); } void RotatingMachineDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/RotatingMachineDynamics.hpp b/CGMES_3.0.0/RotatingMachineDynamics.hpp index b7d3eaec8..d78eb6d95 100644 --- a/CGMES_3.0.0/RotatingMachineDynamics.hpp +++ b/CGMES_3.0.0/RotatingMachineDynamics.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Abstract parent class for all synchronous and asynchronous machine standard models. - */ + /** \brief Abstract parent class for all synchronous and asynchronous machine standard models. */ class RotatingMachineDynamics : public DynamicsFunctionBlock { public: @@ -29,12 +27,23 @@ namespace CIMPP RotatingMachineDynamics(); ~RotatingMachineDynamics() override; - CIMPP::Float damping; /* Damping torque coefficient (<i>D</i>) (&gt;= 0). A proportionality constant that, when multiplied by the angular velocity of the rotor poles with respect to the magnetic field (frequency), results in the damping torque. This value is often zero when the sources of damping torques (generator damper windings, load damping effects, etc.) are modelled in detail. Typical value = 0. Default: 0.0 */ - CIMPP::Seconds inertia; /* Inertia constant of generator or motor and mechanical load (<i>H</i>) (&gt; 0). This is the specification for the stored energy in the rotating mass when operating at rated speed. For a generator, this includes the generator plus all other elements (turbine, exciter) on the same shaft and has units of MW x s. For a motor, it includes the motor plus its mechanical load. Conventional units are PU on the generator MVA base, usually expressed as MW x s / MVA or just s. This value is used in the accelerating power reference frame for operator training simulator solutions. Typical value = 3. Default: nullptr */ - CIMPP::Float saturationFactor; /* Saturation factor at rated terminal voltage (<i>S1</i>) (&gt;= 0). Not used by simplified model. Defined by defined by <i>S</i>(<i>E1</i>) in the SynchronousMachineSaturationParameters diagram. Typical value = 0,02. Default: 0.0 */ - CIMPP::Float saturationFactor120; /* Saturation factor at 120% of rated terminal voltage (<i>S12</i>) (&gt;= RotatingMachineDynamics.saturationFactor). Not used by the simplified model, defined by <i>S</i>(<i>E2</i>) in the SynchronousMachineSaturationParameters diagram. Typical value = 0,12. Default: 0.0 */ - CIMPP::PU statorLeakageReactance; /* Stator leakage reactance (<i>Xl</i>) (&gt;= 0). Typical value = 0,15. Default: nullptr */ - CIMPP::PU statorResistance; /* Stator (armature) resistance (<i>Rs</i>) (&gt;= 0). Typical value = 0,005. Default: nullptr */ + /** \brief Damping torque coefficient (<i>D</i>) (&gt;= 0). A proportionality constant that, when multiplied by the angular velocity of the rotor poles with respect to the magnetic field (frequency), results in the damping torque. This value is often zero when the sources of damping torques (generator damper windings, load damping effects, etc.) are modelled in detail. Typical value = 0. Default: 0.0 */ + CIMPP::Float damping; + + /** \brief Inertia constant of generator or motor and mechanical load (<i>H</i>) (&gt; 0). This is the specification for the stored energy in the rotating mass when operating at rated speed. For a generator, this includes the generator plus all other elements (turbine, exciter) on the same shaft and has units of MW x s. For a motor, it includes the motor plus its mechanical load. Conventional units are PU on the generator MVA base, usually expressed as MW x s / MVA or just s. This value is used in the accelerating power reference frame for operator training simulator solutions. Typical value = 3. Default: nullptr */ + CIMPP::Seconds inertia; + + /** \brief Saturation factor at rated terminal voltage (<i>S1</i>) (&gt;= 0). Not used by simplified model. Defined by defined by <i>S</i>(<i>E1</i>) in the SynchronousMachineSaturationParameters diagram. Typical value = 0,02. Default: 0.0 */ + CIMPP::Float saturationFactor; + + /** \brief Saturation factor at 120% of rated terminal voltage (<i>S12</i>) (&gt;= RotatingMachineDynamics.saturationFactor). Not used by the simplified model, defined by <i>S</i>(<i>E2</i>) in the SynchronousMachineSaturationParameters diagram. Typical value = 0,12. Default: 0.0 */ + CIMPP::Float saturationFactor120; + + /** \brief Stator leakage reactance (<i>Xl</i>) (&gt;= 0). Typical value = 0,15. Default: nullptr */ + CIMPP::PU statorLeakageReactance; + + /** \brief Stator (armature) resistance (<i>Rs</i>) (&gt;= 0). Typical value = 0,005. Default: nullptr */ + CIMPP::PU statorResistance; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/RotationSpeed.hpp b/CGMES_3.0.0/RotationSpeed.hpp index 20dae4027..3ffdcb396 100644 --- a/CGMES_3.0.0/RotationSpeed.hpp +++ b/CGMES_3.0.0/RotationSpeed.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Number of revolutions per second. - */ + /** \brief Number of revolutions per second. */ class RotationSpeed { public: diff --git a/CGMES_3.0.0/RotorKind.cpp b/CGMES_3.0.0/RotorKind.cpp index 155faceec..5474d65a5 100644 --- a/CGMES_3.0.0/RotorKind.cpp +++ b/CGMES_3.0.0/RotorKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "RotorKind") + if (EnumSymbol.substr(0, pos) != "RotorKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,12 +50,12 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "roundRotor") + if (EnumSymbol == "roundRotor") { rop = RotorKind::roundRotor; return lop; } - if(EnumSymbol == "salientPole") + if (EnumSymbol == "salientPole") { rop = RotorKind::salientPole; return lop; diff --git a/CGMES_3.0.0/RotorKind.hpp b/CGMES_3.0.0/RotorKind.hpp index d86eccaa1..1208e8979 100644 --- a/CGMES_3.0.0/RotorKind.hpp +++ b/CGMES_3.0.0/RotorKind.hpp @@ -9,21 +9,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of rotor on physical machine. - */ + /** \brief Type of rotor on physical machine. */ class RotorKind { public: enum RotorKind_ENUM { - /** - * Round rotor type of synchronous machine. - */ + /** Round rotor type of synchronous machine. */ roundRotor, - /** - * Salient pole type of synchronous machine. - */ + /** Salient pole type of synchronous machine. */ salientPole, }; diff --git a/CGMES_3.0.0/SVCControlMode.cpp b/CGMES_3.0.0/SVCControlMode.cpp index 4ccad37d6..d065e0216 100644 --- a/CGMES_3.0.0/SVCControlMode.cpp +++ b/CGMES_3.0.0/SVCControlMode.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "SVCControlMode") + if (EnumSymbol.substr(0, pos) != "SVCControlMode") { lop.setstate(std::ios::failbit); return lop; @@ -50,12 +50,12 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "reactivePower") + if (EnumSymbol == "reactivePower") { rop = SVCControlMode::reactivePower; return lop; } - if(EnumSymbol == "voltage") + if (EnumSymbol == "voltage") { rop = SVCControlMode::voltage; return lop; diff --git a/CGMES_3.0.0/SVCControlMode.hpp b/CGMES_3.0.0/SVCControlMode.hpp index dfd0e532e..686fd0c92 100644 --- a/CGMES_3.0.0/SVCControlMode.hpp +++ b/CGMES_3.0.0/SVCControlMode.hpp @@ -9,21 +9,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Static VAr Compensator control mode. - */ + /** \brief Static VAr Compensator control mode. */ class SVCControlMode { public: enum SVCControlMode_ENUM { - /** - * Reactive power control. - */ + /** Reactive power control. */ reactivePower, - /** - * Voltage control. - */ + /** Voltage control. */ voltage, }; diff --git a/CGMES_3.0.0/SVCUserDefined.cpp b/CGMES_3.0.0/SVCUserDefined.cpp index 62362c524..099246085 100644 --- a/CGMES_3.0.0/SVCUserDefined.cpp +++ b/CGMES_3.0.0/SVCUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -SVCUserDefined::SVCUserDefined() {}; -SVCUserDefined::~SVCUserDefined() {}; +SVCUserDefined::SVCUserDefined() {} +SVCUserDefined::~SVCUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ SVCUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_SVCUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (SVCUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_SVCUserDefined(BaseClass*, BaseClass*); bool assign_SVCUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_SVCUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr return false; } +bool assign_SVCUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + SVCUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_SVCUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SVCUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const SVCUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_SVCUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::string return false; } - - const char SVCUserDefined::debugName[] = "SVCUserDefined"; const char* SVCUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* SVCUserDefined::debugString() const void SVCUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SVCUserDefined"), &SVCUserDefined_factory)); + factory_map.emplace("cim:SVCUserDefined", &SVCUserDefined_factory); } void SVCUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SVCUserDefined.proprietary"), &assign_SVCUserDefined_proprietary)); + assign_map.emplace("cim:SVCUserDefined.proprietary", &assign_SVCUserDefined_proprietary); } void SVCUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SVCUserDefined.ProprietaryParameterDynamics"), &assign_SVCUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:SVCUserDefined.ProprietaryParameterDynamics", &assign_SVCUserDefined_ProprietaryParameterDynamics); } void SVCUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/SVCUserDefined.hpp b/CGMES_3.0.0/SVCUserDefined.hpp index 51623a544..581304e97 100644 --- a/CGMES_3.0.0/SVCUserDefined.hpp +++ b/CGMES_3.0.0/SVCUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Static var compensator (SVC) function block whose dynamic behaviour is described by a user-defined model. - */ + /** \brief Static var compensator (SVC) function block whose dynamic behaviour is described by a user-defined model. */ class SVCUserDefined : public StaticVarCompensatorDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP SVCUserDefined(); ~SVCUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Season.cpp b/CGMES_3.0.0/Season.cpp index 02f2e0db6..bd79ad860 100644 --- a/CGMES_3.0.0/Season.cpp +++ b/CGMES_3.0.0/Season.cpp @@ -9,13 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "SeasonDayTypeSchedule.hpp" -#include "MonthDay.hpp" -#include "MonthDay.hpp" using namespace CIMPP; -Season::Season() {}; -Season::~Season() {}; +Season::Season() {} +Season::~Season() {} static const std::list PossibleProfilesForClass = { @@ -44,54 +42,56 @@ Season::getPossibleProfilesForAttributes() const return map; } - -bool assign_Season_endDate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SeasonDayTypeSchedule_Season(BaseClass*, BaseClass*); +bool assign_Season_SeasonDayTypeSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (Season* element = dynamic_cast(BaseClass_ptr1)) + Season* element = dynamic_cast(BaseClass_ptr1); + SeasonDayTypeSchedule* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - element->endDate = buffer.str(); - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->SeasonDayTypeSchedules.begin(), element->SeasonDayTypeSchedules.end(), element2) == element->SeasonDayTypeSchedules.end()) + { + element->SeasonDayTypeSchedules.push_back(element2); + return assign_SeasonDayTypeSchedule_Season(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_Season_startDate(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Season_endDate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Season* element = dynamic_cast(BaseClass_ptr1)) + Season* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - element->startDate = buffer.str(); - if (buffer.fail()) - return false; - else + element->endDate = buffer.str(); + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_SeasonDayTypeSchedule_Season(BaseClass*, BaseClass*); -bool assign_Season_SeasonDayTypeSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_Season_startDate(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { Season* element = dynamic_cast(BaseClass_ptr1); - SeasonDayTypeSchedule* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->SeasonDayTypeSchedules.begin(), element->SeasonDayTypeSchedules.end(), element2) == element->SeasonDayTypeSchedules.end()) + element->startDate = buffer.str(); + if (!buffer.fail()) { - element->SeasonDayTypeSchedules.push_back(element2); - return assign_SeasonDayTypeSchedule_Season(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_Season_endDate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Season* element = dynamic_cast(BaseClass_ptr1)) + const Season* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->endDate; if (!buffer.str().empty()) @@ -105,7 +105,8 @@ bool get_Season_endDate(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_Season_startDate(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Season* element = dynamic_cast(BaseClass_ptr1)) + const Season* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->startDate; if (!buffer.str().empty()) @@ -117,8 +118,6 @@ bool get_Season_startDate(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char Season::debugName[] = "Season"; const char* Season::debugString() const { @@ -127,18 +126,18 @@ const char* Season::debugString() const void Season::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Season"), &Season_factory)); + factory_map.emplace("cim:Season", &Season_factory); } void Season::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Season.endDate"), &assign_Season_endDate)); - assign_map.insert(std::make_pair(std::string("cim:Season.startDate"), &assign_Season_startDate)); + assign_map.emplace("cim:Season.endDate", &assign_Season_endDate); + assign_map.emplace("cim:Season.startDate", &assign_Season_startDate); } void Season::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Season.SeasonDayTypeSchedules"), &assign_Season_SeasonDayTypeSchedules)); + assign_map.emplace("cim:Season.SeasonDayTypeSchedules", &assign_Season_SeasonDayTypeSchedules); } void Season::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/Season.hpp b/CGMES_3.0.0/Season.hpp index 07d514984..a7a5ad137 100644 --- a/CGMES_3.0.0/Season.hpp +++ b/CGMES_3.0.0/Season.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class SeasonDayTypeSchedule; - /* - A specified time period of the year. - */ + /** \brief A specified time period of the year. */ class Season : public IdentifiedObject { public: @@ -28,9 +26,14 @@ namespace CIMPP Season(); ~Season() override; - std::list SeasonDayTypeSchedules; /* Schedules that use this Season. Default: 0 */ - CIMPP::MonthDay endDate; /* Date season ends. Default: nullptr */ - CIMPP::MonthDay startDate; /* Date season starts. Default: nullptr */ + /** \brief Schedules that use this Season. Default: 0 */ + std::list SeasonDayTypeSchedules; + + /** \brief Date season ends. Default: nullptr */ + CIMPP::MonthDay endDate; + + /** \brief Date season starts. Default: nullptr */ + CIMPP::MonthDay startDate; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/SeasonDayTypeSchedule.cpp b/CGMES_3.0.0/SeasonDayTypeSchedule.cpp index 284c63264..dcc36cca0 100644 --- a/CGMES_3.0.0/SeasonDayTypeSchedule.cpp +++ b/CGMES_3.0.0/SeasonDayTypeSchedule.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -SeasonDayTypeSchedule::SeasonDayTypeSchedule() : DayType(nullptr), Season(nullptr) {}; -SeasonDayTypeSchedule::~SeasonDayTypeSchedule() {}; +SeasonDayTypeSchedule::SeasonDayTypeSchedule() : DayType(nullptr), Season(nullptr) {} +SeasonDayTypeSchedule::~SeasonDayTypeSchedule() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ SeasonDayTypeSchedule::getPossibleProfilesForAttributes() const return map; } - - bool assign_DayType_SeasonDayTypeSchedules(BaseClass*, BaseClass*); bool assign_SeasonDayTypeSchedule_DayType(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_SeasonDayTypeSchedule_DayType(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_Season_SeasonDayTypeSchedules(BaseClass*, BaseClass*); bool assign_SeasonDayTypeSchedule_Season(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_SeasonDayTypeSchedule_Season(BaseClass* BaseClass_ptr1, BaseClass* B return false; } - bool get_SeasonDayTypeSchedule_DayType(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SeasonDayTypeSchedule* element = dynamic_cast(BaseClass_ptr1)) + const SeasonDayTypeSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->DayType != 0) { @@ -93,7 +92,8 @@ bool get_SeasonDayTypeSchedule_DayType(const BaseClass* BaseClass_ptr1, std::lis bool get_SeasonDayTypeSchedule_Season(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SeasonDayTypeSchedule* element = dynamic_cast(BaseClass_ptr1)) + const SeasonDayTypeSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Season != 0) { @@ -104,7 +104,6 @@ bool get_SeasonDayTypeSchedule_Season(const BaseClass* BaseClass_ptr1, std::list return false; } - const char SeasonDayTypeSchedule::debugName[] = "SeasonDayTypeSchedule"; const char* SeasonDayTypeSchedule::debugString() const { @@ -113,7 +112,7 @@ const char* SeasonDayTypeSchedule::debugString() const void SeasonDayTypeSchedule::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SeasonDayTypeSchedule"), &SeasonDayTypeSchedule_factory)); + factory_map.emplace("cim:SeasonDayTypeSchedule", &SeasonDayTypeSchedule_factory); } void SeasonDayTypeSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void SeasonDayTypeSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SeasonDayTypeSchedule.DayType"), &assign_SeasonDayTypeSchedule_DayType)); - assign_map.insert(std::make_pair(std::string("cim:SeasonDayTypeSchedule.Season"), &assign_SeasonDayTypeSchedule_Season)); + assign_map.emplace("cim:SeasonDayTypeSchedule.DayType", &assign_SeasonDayTypeSchedule_DayType); + assign_map.emplace("cim:SeasonDayTypeSchedule.Season", &assign_SeasonDayTypeSchedule_Season); } void SeasonDayTypeSchedule::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/SeasonDayTypeSchedule.hpp b/CGMES_3.0.0/SeasonDayTypeSchedule.hpp index 4731feeba..4b29b20d4 100644 --- a/CGMES_3.0.0/SeasonDayTypeSchedule.hpp +++ b/CGMES_3.0.0/SeasonDayTypeSchedule.hpp @@ -18,9 +18,7 @@ namespace CIMPP class DayType; class Season; - /* - A time schedule covering a 24 hour period, with curve data for a specific type of season and day. - */ + /** \brief A time schedule covering a 24 hour period, with curve data for a specific type of season and day. */ class SeasonDayTypeSchedule : public RegularIntervalSchedule { public: @@ -28,8 +26,11 @@ namespace CIMPP SeasonDayTypeSchedule(); ~SeasonDayTypeSchedule() override; - CIMPP::DayType* DayType; /* DayType for the Schedule. Default: 0 */ - CIMPP::Season* Season; /* Season for the Schedule. Default: 0 */ + /** \brief DayType for the Schedule. Default: 0 */ + CIMPP::DayType* DayType; + + /** \brief Season for the Schedule. Default: 0 */ + CIMPP::Season* Season; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Seconds.hpp b/CGMES_3.0.0/Seconds.hpp index 60e9a668b..9284aa059 100644 --- a/CGMES_3.0.0/Seconds.hpp +++ b/CGMES_3.0.0/Seconds.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Time, in seconds. - */ + /** \brief Time, in seconds. */ class Seconds { public: diff --git a/CGMES_3.0.0/Sensor.cpp b/CGMES_3.0.0/Sensor.cpp index 0ea01b23b..c9d6e6233 100644 --- a/CGMES_3.0.0/Sensor.cpp +++ b/CGMES_3.0.0/Sensor.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Sensor::Sensor() {}; -Sensor::~Sensor() {}; +Sensor::Sensor() {} +Sensor::~Sensor() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ Sensor::getPossibleProfilesForAttributes() const return map; } - - - - - const char Sensor::debugName[] = "Sensor"; const char* Sensor::debugString() const { @@ -51,7 +46,7 @@ const char* Sensor::debugString() const void Sensor::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Sensor"), &Sensor_factory)); + factory_map.emplace("cim:Sensor", &Sensor_factory); } void Sensor::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/Sensor.hpp b/CGMES_3.0.0/Sensor.hpp index 329a14602..5f4130be0 100644 --- a/CGMES_3.0.0/Sensor.hpp +++ b/CGMES_3.0.0/Sensor.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - This class describe devices that transform a measured quantity into signals that can be presented at displays, used in control or be recorded. - */ + /** \brief This class describe devices that transform a measured quantity into signals that can be presented at displays, used in control or be recorded. */ class Sensor : public AuxiliaryEquipment { public: @@ -26,7 +24,6 @@ namespace CIMPP Sensor(); ~Sensor() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/SeriesCompensator.cpp b/CGMES_3.0.0/SeriesCompensator.cpp index 9f8da07b2..3471d840d 100644 --- a/CGMES_3.0.0/SeriesCompensator.cpp +++ b/CGMES_3.0.0/SeriesCompensator.cpp @@ -8,18 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "Boolean.hpp" -#include "CurrentFlow.hpp" -#include "Voltage.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -SeriesCompensator::SeriesCompensator() {}; -SeriesCompensator::~SeriesCompensator() {}; +SeriesCompensator::SeriesCompensator() {} +SeriesCompensator::~SeriesCompensator() {} static const std::list PossibleProfilesForClass = { @@ -53,103 +46,108 @@ SeriesCompensator::getPossibleProfilesForAttributes() const return map; } - -bool assign_SeriesCompensator_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SeriesCompensator_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SeriesCompensator_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SeriesCompensator_r0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SeriesCompensator_varistorPresent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SeriesCompensator_varistorPresent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->varistorPresent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SeriesCompensator_varistorRatedCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SeriesCompensator_varistorRatedCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->varistorRatedCurrent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SeriesCompensator_varistorVoltageThreshold(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SeriesCompensator_varistorVoltageThreshold(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->varistorVoltageThreshold; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SeriesCompensator_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SeriesCompensator_x(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SeriesCompensator_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SeriesCompensator_x0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_SeriesCompensator_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -163,7 +161,8 @@ bool get_SeriesCompensator_r(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_SeriesCompensator_r0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r0; if (!buffer.str().empty()) @@ -177,7 +176,8 @@ bool get_SeriesCompensator_r0(const BaseClass* BaseClass_ptr1, std::stringstream bool get_SeriesCompensator_varistorPresent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->varistorPresent; if (!buffer.str().empty()) @@ -191,7 +191,8 @@ bool get_SeriesCompensator_varistorPresent(const BaseClass* BaseClass_ptr1, std: bool get_SeriesCompensator_varistorRatedCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->varistorRatedCurrent; if (!buffer.str().empty()) @@ -205,7 +206,8 @@ bool get_SeriesCompensator_varistorRatedCurrent(const BaseClass* BaseClass_ptr1, bool get_SeriesCompensator_varistorVoltageThreshold(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->varistorVoltageThreshold; if (!buffer.str().empty()) @@ -219,7 +221,8 @@ bool get_SeriesCompensator_varistorVoltageThreshold(const BaseClass* BaseClass_p bool get_SeriesCompensator_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x; if (!buffer.str().empty()) @@ -233,7 +236,8 @@ bool get_SeriesCompensator_x(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_SeriesCompensator_x0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1)) + const SeriesCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x0; if (!buffer.str().empty()) @@ -245,8 +249,6 @@ bool get_SeriesCompensator_x0(const BaseClass* BaseClass_ptr1, std::stringstream return false; } - - const char SeriesCompensator::debugName[] = "SeriesCompensator"; const char* SeriesCompensator::debugString() const { @@ -255,18 +257,18 @@ const char* SeriesCompensator::debugString() const void SeriesCompensator::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SeriesCompensator"), &SeriesCompensator_factory)); + factory_map.emplace("cim:SeriesCompensator", &SeriesCompensator_factory); } void SeriesCompensator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SeriesCompensator.r"), &assign_SeriesCompensator_r)); - assign_map.insert(std::make_pair(std::string("cim:SeriesCompensator.r0"), &assign_SeriesCompensator_r0)); - assign_map.insert(std::make_pair(std::string("cim:SeriesCompensator.varistorPresent"), &assign_SeriesCompensator_varistorPresent)); - assign_map.insert(std::make_pair(std::string("cim:SeriesCompensator.varistorRatedCurrent"), &assign_SeriesCompensator_varistorRatedCurrent)); - assign_map.insert(std::make_pair(std::string("cim:SeriesCompensator.varistorVoltageThreshold"), &assign_SeriesCompensator_varistorVoltageThreshold)); - assign_map.insert(std::make_pair(std::string("cim:SeriesCompensator.x"), &assign_SeriesCompensator_x)); - assign_map.insert(std::make_pair(std::string("cim:SeriesCompensator.x0"), &assign_SeriesCompensator_x0)); + assign_map.emplace("cim:SeriesCompensator.r", &assign_SeriesCompensator_r); + assign_map.emplace("cim:SeriesCompensator.r0", &assign_SeriesCompensator_r0); + assign_map.emplace("cim:SeriesCompensator.varistorPresent", &assign_SeriesCompensator_varistorPresent); + assign_map.emplace("cim:SeriesCompensator.varistorRatedCurrent", &assign_SeriesCompensator_varistorRatedCurrent); + assign_map.emplace("cim:SeriesCompensator.varistorVoltageThreshold", &assign_SeriesCompensator_varistorVoltageThreshold); + assign_map.emplace("cim:SeriesCompensator.x", &assign_SeriesCompensator_x); + assign_map.emplace("cim:SeriesCompensator.x0", &assign_SeriesCompensator_x0); } void SeriesCompensator::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/SeriesCompensator.hpp b/CGMES_3.0.0/SeriesCompensator.hpp index 21e5071e8..3b19cda77 100644 --- a/CGMES_3.0.0/SeriesCompensator.hpp +++ b/CGMES_3.0.0/SeriesCompensator.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A Series Compensator is a series capacitor or reactor or an AC transmission line without charging susceptance. It is a two terminal device. - */ + /** \brief A Series Compensator is a series capacitor or reactor or an AC transmission line without charging susceptance. It is a two terminal device. */ class SeriesCompensator : public ConductingEquipment { public: @@ -31,13 +29,26 @@ namespace CIMPP SeriesCompensator(); ~SeriesCompensator() override; - CIMPP::Resistance r; /* Positive sequence resistance. Default: nullptr */ - CIMPP::Resistance r0; /* Zero sequence resistance. Default: nullptr */ - CIMPP::Boolean varistorPresent; /* Describe if a metal oxide varistor (mov) for over voltage protection is configured in parallel with the series compensator. It is used for short circuit calculations. Default: false */ - CIMPP::CurrentFlow varistorRatedCurrent; /* The maximum current the varistor is designed to handle at specified duration. It is used for short circuit calculations and exchanged only if SeriesCompensator.varistorPresent is true. The attribute shall be a positive value. Default: nullptr */ - CIMPP::Voltage varistorVoltageThreshold; /* The dc voltage at which the varistor starts conducting. It is used for short circuit calculations and exchanged only if SeriesCompensator.varistorPresent is true. Default: nullptr */ - CIMPP::Reactance x; /* Positive sequence reactance. Default: nullptr */ - CIMPP::Reactance x0; /* Zero sequence reactance. Default: nullptr */ + /** \brief Positive sequence resistance. Default: nullptr */ + CIMPP::Resistance r; + + /** \brief Zero sequence resistance. Default: nullptr */ + CIMPP::Resistance r0; + + /** \brief Describe if a metal oxide varistor (mov) for over voltage protection is configured in parallel with the series compensator. It is used for short circuit calculations. Default: false */ + CIMPP::Boolean varistorPresent; + + /** \brief The maximum current the varistor is designed to handle at specified duration. It is used for short circuit calculations and exchanged only if SeriesCompensator.varistorPresent is true. The attribute shall be a positive value. Default: nullptr */ + CIMPP::CurrentFlow varistorRatedCurrent; + + /** \brief The dc voltage at which the varistor starts conducting. It is used for short circuit calculations and exchanged only if SeriesCompensator.varistorPresent is true. Default: nullptr */ + CIMPP::Voltage varistorVoltageThreshold; + + /** \brief Positive sequence reactance. Default: nullptr */ + CIMPP::Reactance x; + + /** \brief Zero sequence reactance. Default: nullptr */ + CIMPP::Reactance x0; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ServiceLocation.cpp b/CGMES_3.0.0/ServiceLocation.cpp index 8c07a995b..c98138b85 100644 --- a/CGMES_3.0.0/ServiceLocation.cpp +++ b/CGMES_3.0.0/ServiceLocation.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ServiceLocation::ServiceLocation() {}; -ServiceLocation::~ServiceLocation() {}; +ServiceLocation::ServiceLocation() {} +ServiceLocation::~ServiceLocation() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ ServiceLocation::getPossibleProfilesForAttributes() const return map; } - - - - - const char ServiceLocation::debugName[] = "ServiceLocation"; const char* ServiceLocation::debugString() const { @@ -51,7 +46,7 @@ const char* ServiceLocation::debugString() const void ServiceLocation::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ServiceLocation"), &ServiceLocation_factory)); + factory_map.emplace("cim:ServiceLocation", &ServiceLocation_factory); } void ServiceLocation::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/ServiceLocation.hpp b/CGMES_3.0.0/ServiceLocation.hpp index afc95e095..d5653525b 100644 --- a/CGMES_3.0.0/ServiceLocation.hpp +++ b/CGMES_3.0.0/ServiceLocation.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A real estate location, commonly referred to as premises. - */ + /** \brief A real estate location, commonly referred to as premises. */ class ServiceLocation : public WorkLocation { public: @@ -26,7 +24,6 @@ namespace CIMPP ServiceLocation(); ~ServiceLocation() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/SetPoint.cpp b/CGMES_3.0.0/SetPoint.cpp index 88f32d0da..06768b963 100644 --- a/CGMES_3.0.0/SetPoint.cpp +++ b/CGMES_3.0.0/SetPoint.cpp @@ -8,13 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Float.hpp" -#include "Float.hpp" using namespace CIMPP; -SetPoint::SetPoint() {}; -SetPoint::~SetPoint() {}; +SetPoint::SetPoint() {} +SetPoint::~SetPoint() {} static const std::list PossibleProfilesForClass = { @@ -42,38 +40,38 @@ SetPoint::getPossibleProfilesForAttributes() const return map; } - -bool assign_SetPoint_normalValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SetPoint_normalValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SetPoint* element = dynamic_cast(BaseClass_ptr1)) + SetPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->normalValue; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SetPoint_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SetPoint_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SetPoint* element = dynamic_cast(BaseClass_ptr1)) + SetPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->value; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_SetPoint_normalValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SetPoint* element = dynamic_cast(BaseClass_ptr1)) + const SetPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->normalValue; if (!buffer.str().empty()) @@ -87,7 +85,8 @@ bool get_SetPoint_normalValue(const BaseClass* BaseClass_ptr1, std::stringstream bool get_SetPoint_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SetPoint* element = dynamic_cast(BaseClass_ptr1)) + const SetPoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value; if (!buffer.str().empty()) @@ -99,8 +98,6 @@ bool get_SetPoint_value(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - - const char SetPoint::debugName[] = "SetPoint"; const char* SetPoint::debugString() const { @@ -109,13 +106,13 @@ const char* SetPoint::debugString() const void SetPoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SetPoint"), &SetPoint_factory)); + factory_map.emplace("cim:SetPoint", &SetPoint_factory); } void SetPoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SetPoint.normalValue"), &assign_SetPoint_normalValue)); - assign_map.insert(std::make_pair(std::string("cim:SetPoint.value"), &assign_SetPoint_value)); + assign_map.emplace("cim:SetPoint.normalValue", &assign_SetPoint_normalValue); + assign_map.emplace("cim:SetPoint.value", &assign_SetPoint_value); } void SetPoint::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/SetPoint.hpp b/CGMES_3.0.0/SetPoint.hpp index 2a669a566..075542151 100644 --- a/CGMES_3.0.0/SetPoint.hpp +++ b/CGMES_3.0.0/SetPoint.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - An analog control that issues a set point value. - */ + /** \brief An analog control that issues a set point value. */ class SetPoint : public AnalogControl { public: @@ -27,8 +25,11 @@ namespace CIMPP SetPoint(); ~SetPoint() override; - CIMPP::Float normalValue; /* Normal value for Control.value e.g. used for percentage scaling. Default: 0.0 */ - CIMPP::Float value; /* The value representing the actuator output. Default: 0.0 */ + /** \brief Normal value for Control.value e.g. used for percentage scaling. Default: 0.0 */ + CIMPP::Float normalValue; + + /** \brief The value representing the actuator output. Default: 0.0 */ + CIMPP::Float value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ShortCircuitRotorKind.cpp b/CGMES_3.0.0/ShortCircuitRotorKind.cpp index 9e7ea1852..8c6e07eb8 100644 --- a/CGMES_3.0.0/ShortCircuitRotorKind.cpp +++ b/CGMES_3.0.0/ShortCircuitRotorKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "ShortCircuitRotorKind") + if (EnumSymbol.substr(0, pos) != "ShortCircuitRotorKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,22 +50,22 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "salientPole1") + if (EnumSymbol == "salientPole1") { rop = ShortCircuitRotorKind::salientPole1; return lop; } - if(EnumSymbol == "salientPole2") + if (EnumSymbol == "salientPole2") { rop = ShortCircuitRotorKind::salientPole2; return lop; } - if(EnumSymbol == "turboSeries1") + if (EnumSymbol == "turboSeries1") { rop = ShortCircuitRotorKind::turboSeries1; return lop; } - if(EnumSymbol == "turboSeries2") + if (EnumSymbol == "turboSeries2") { rop = ShortCircuitRotorKind::turboSeries2; return lop; diff --git a/CGMES_3.0.0/ShortCircuitRotorKind.hpp b/CGMES_3.0.0/ShortCircuitRotorKind.hpp index f40d90799..3c8323a0d 100644 --- a/CGMES_3.0.0/ShortCircuitRotorKind.hpp +++ b/CGMES_3.0.0/ShortCircuitRotorKind.hpp @@ -9,29 +9,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of rotor, used by short circuit applications. - */ + /** \brief Type of rotor, used by short circuit applications. */ class ShortCircuitRotorKind { public: enum ShortCircuitRotorKind_ENUM { - /** - * Salient pole 1 in IEC 60909. - */ + /** Salient pole 1 in IEC 60909. */ salientPole1, - /** - * Salient pole 2 in IEC 60909. - */ + /** Salient pole 2 in IEC 60909. */ salientPole2, - /** - * Turbo Series 1 in IEC 60909. - */ + /** Turbo Series 1 in IEC 60909. */ turboSeries1, - /** - * Turbo series 2 in IEC 60909. - */ + /** Turbo series 2 in IEC 60909. */ turboSeries2, }; diff --git a/CGMES_3.0.0/ShuntCompensator.cpp b/CGMES_3.0.0/ShuntCompensator.cpp index 6357c1ee9..d95dba4e5 100644 --- a/CGMES_3.0.0/ShuntCompensator.cpp +++ b/CGMES_3.0.0/ShuntCompensator.cpp @@ -9,18 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "SvShuntCompensatorSections.hpp" -#include "Seconds.hpp" -#include "Boolean.hpp" -#include "Integer.hpp" -#include "Voltage.hpp" -#include "Integer.hpp" -#include "Float.hpp" -#include "VoltagePerReactivePower.hpp" using namespace CIMPP; -ShuntCompensator::ShuntCompensator() : SvShuntCompensatorSections(nullptr) {}; -ShuntCompensator::~ShuntCompensator() {}; +ShuntCompensator::ShuntCompensator() : SvShuntCompensatorSections(nullptr) {} +ShuntCompensator::~ShuntCompensator() {} static const std::list PossibleProfilesForClass = { @@ -57,119 +50,126 @@ ShuntCompensator::getPossibleProfilesForAttributes() const return map; } +bool assign_SvShuntCompensatorSections_ShuntCompensator(BaseClass*, BaseClass*); +bool assign_ShuntCompensator_SvShuntCompensatorSections(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + SvShuntCompensatorSections* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->SvShuntCompensatorSections != element2) + { + element->SvShuntCompensatorSections = element2; + return assign_SvShuntCompensatorSections_ShuntCompensator(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_ShuntCompensator_aVRDelay(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ShuntCompensator_aVRDelay(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->aVRDelay; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ShuntCompensator_grounded(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ShuntCompensator_grounded(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->grounded; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ShuntCompensator_maximumSections(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ShuntCompensator_maximumSections(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maximumSections; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ShuntCompensator_nomU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ShuntCompensator_nomU(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->nomU; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ShuntCompensator_normalSections(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ShuntCompensator_normalSections(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->normalSections; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_ShuntCompensator_sections(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_ShuntCompensator_sections(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->sections; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_ShuntCompensator_voltageSensitivity(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->voltageSensitivity; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_SvShuntCompensatorSections_ShuntCompensator(BaseClass*, BaseClass*); -bool assign_ShuntCompensator_SvShuntCompensatorSections(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_ShuntCompensator_voltageSensitivity(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); - SvShuntCompensatorSections* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->SvShuntCompensatorSections != element2) + buffer >> element->voltageSensitivity; + if (!buffer.fail()) { - element->SvShuntCompensatorSections = element2; - return assign_SvShuntCompensatorSections_ShuntCompensator(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_ShuntCompensator_aVRDelay(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->aVRDelay; if (!buffer.str().empty()) @@ -183,7 +183,8 @@ bool get_ShuntCompensator_aVRDelay(const BaseClass* BaseClass_ptr1, std::strings bool get_ShuntCompensator_grounded(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->grounded; if (!buffer.str().empty()) @@ -197,7 +198,8 @@ bool get_ShuntCompensator_grounded(const BaseClass* BaseClass_ptr1, std::strings bool get_ShuntCompensator_maximumSections(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maximumSections; if (!buffer.str().empty()) @@ -211,7 +213,8 @@ bool get_ShuntCompensator_maximumSections(const BaseClass* BaseClass_ptr1, std:: bool get_ShuntCompensator_nomU(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->nomU; if (!buffer.str().empty()) @@ -225,7 +228,8 @@ bool get_ShuntCompensator_nomU(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_ShuntCompensator_normalSections(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->normalSections; if (!buffer.str().empty()) @@ -239,7 +243,8 @@ bool get_ShuntCompensator_normalSections(const BaseClass* BaseClass_ptr1, std::s bool get_ShuntCompensator_sections(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->sections; if (!buffer.str().empty()) @@ -253,7 +258,8 @@ bool get_ShuntCompensator_sections(const BaseClass* BaseClass_ptr1, std::strings bool get_ShuntCompensator_voltageSensitivity(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1)) + const ShuntCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->voltageSensitivity; if (!buffer.str().empty()) @@ -265,8 +271,6 @@ bool get_ShuntCompensator_voltageSensitivity(const BaseClass* BaseClass_ptr1, st return false; } - - const char ShuntCompensator::debugName[] = "ShuntCompensator"; const char* ShuntCompensator::debugString() const { @@ -275,23 +279,23 @@ const char* ShuntCompensator::debugString() const void ShuntCompensator::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ShuntCompensator"), &ShuntCompensator_factory)); + factory_map.emplace("cim:ShuntCompensator", &ShuntCompensator_factory); } void ShuntCompensator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.aVRDelay"), &assign_ShuntCompensator_aVRDelay)); - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.grounded"), &assign_ShuntCompensator_grounded)); - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.maximumSections"), &assign_ShuntCompensator_maximumSections)); - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.nomU"), &assign_ShuntCompensator_nomU)); - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.normalSections"), &assign_ShuntCompensator_normalSections)); - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.sections"), &assign_ShuntCompensator_sections)); - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.voltageSensitivity"), &assign_ShuntCompensator_voltageSensitivity)); + assign_map.emplace("cim:ShuntCompensator.aVRDelay", &assign_ShuntCompensator_aVRDelay); + assign_map.emplace("cim:ShuntCompensator.grounded", &assign_ShuntCompensator_grounded); + assign_map.emplace("cim:ShuntCompensator.maximumSections", &assign_ShuntCompensator_maximumSections); + assign_map.emplace("cim:ShuntCompensator.nomU", &assign_ShuntCompensator_nomU); + assign_map.emplace("cim:ShuntCompensator.normalSections", &assign_ShuntCompensator_normalSections); + assign_map.emplace("cim:ShuntCompensator.sections", &assign_ShuntCompensator_sections); + assign_map.emplace("cim:ShuntCompensator.voltageSensitivity", &assign_ShuntCompensator_voltageSensitivity); } void ShuntCompensator::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ShuntCompensator.SvShuntCompensatorSections"), &assign_ShuntCompensator_SvShuntCompensatorSections)); + assign_map.emplace("cim:ShuntCompensator.SvShuntCompensatorSections", &assign_ShuntCompensator_SvShuntCompensatorSections); } void ShuntCompensator::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/ShuntCompensator.hpp b/CGMES_3.0.0/ShuntCompensator.hpp index fa22cb40b..4bedb1c32 100644 --- a/CGMES_3.0.0/ShuntCompensator.hpp +++ b/CGMES_3.0.0/ShuntCompensator.hpp @@ -23,9 +23,7 @@ namespace CIMPP { class SvShuntCompensatorSections; - /* - A shunt capacitor or reactor or switchable bank of shunt capacitors or reactors. A section of a shunt compensator is an individual capacitor or reactor. A negative value for bPerSection indicates that the compensator is a reactor. ShuntCompensator is a single terminal device. Ground is implied. - */ + /** \brief A shunt capacitor or reactor or switchable bank of shunt capacitors or reactors. A section of a shunt compensator is an individual capacitor or reactor. A negative value for bPerSection indicates that the compensator is a reactor. ShuntCompensator is a single terminal device. Ground is implied. */ class ShuntCompensator : public RegulatingCondEq { public: @@ -33,14 +31,29 @@ namespace CIMPP ShuntCompensator(); ~ShuntCompensator() override; - CIMPP::SvShuntCompensatorSections* SvShuntCompensatorSections; /* The state for the number of shunt compensator sections in service. Default: 0 */ - CIMPP::Seconds aVRDelay; /* An automatic voltage regulation delay (AVRDelay) which is the time delay from a change in voltage to when the capacitor is allowed to change state. This filters out temporary changes in voltage. Default: nullptr */ - CIMPP::Boolean grounded; /* Used for Yn and Zn connections. True if the neutral is solidly grounded. Default: false */ - CIMPP::Integer maximumSections; /* The maximum number of sections that may be switched in. Default: 0 */ - CIMPP::Voltage nomU; /* The voltage at which the nominal reactive power may be calculated. This should normally be within 10% of the voltage at which the capacitor is connected to the network. Default: nullptr */ - CIMPP::Integer normalSections; /* The normal number of sections switched in. The value shall be between zero and ShuntCompensator.maximumSections. Default: 0 */ - CIMPP::Float sections; /* Shunt compensator sections in use. Starting value for steady state solution. The attribute shall be a positive value or zero. Non integer values are allowed to support continuous variables. The reasons for continuous value are to support study cases where no discrete shunt compensators has yet been designed, a solutions where a narrow voltage band force the sections to oscillate or accommodate for a continuous solution as input. For LinearShuntConpensator the value shall be between zero and ShuntCompensator.maximumSections. At value zero the shunt compensator conductance and admittance is zero. Linear interpolation of conductance and admittance between the previous and next integer section is applied in case of non-integer values. For NonlinearShuntCompensator-s shall only be set to one of the NonlinearShuntCompenstorPoint.sectionNumber. There is no interpolation between NonlinearShuntCompenstorPoint-s. Default: 0.0 */ - CIMPP::VoltagePerReactivePower voltageSensitivity; /* Voltage sensitivity required for the device to regulate the bus voltage, in voltage/reactive power. Default: nullptr */ + /** \brief The state for the number of shunt compensator sections in service. Default: 0 */ + CIMPP::SvShuntCompensatorSections* SvShuntCompensatorSections; + + /** \brief An automatic voltage regulation delay (AVRDelay) which is the time delay from a change in voltage to when the capacitor is allowed to change state. This filters out temporary changes in voltage. Default: nullptr */ + CIMPP::Seconds aVRDelay; + + /** \brief Used for Yn and Zn connections. True if the neutral is solidly grounded. Default: false */ + CIMPP::Boolean grounded; + + /** \brief The maximum number of sections that may be switched in. Default: 0 */ + CIMPP::Integer maximumSections; + + /** \brief The voltage at which the nominal reactive power may be calculated. This should normally be within 10% of the voltage at which the capacitor is connected to the network. Default: nullptr */ + CIMPP::Voltage nomU; + + /** \brief The normal number of sections switched in. The value shall be between zero and ShuntCompensator.maximumSections. Default: 0 */ + CIMPP::Integer normalSections; + + /** \brief Shunt compensator sections in use. Starting value for steady state solution. The attribute shall be a positive value or zero. Non integer values are allowed to support continuous variables. The reasons for continuous value are to support study cases where no discrete shunt compensators has yet been designed, a solutions where a narrow voltage band force the sections to oscillate or accommodate for a continuous solution as input. For LinearShuntConpensator the value shall be between zero and ShuntCompensator.maximumSections. At value zero the shunt compensator conductance and admittance is zero. Linear interpolation of conductance and admittance between the previous and next integer section is applied in case of non-integer values. For NonlinearShuntCompensator-s shall only be set to one of the NonlinearShuntCompenstorPoint.sectionNumber. There is no interpolation between NonlinearShuntCompenstorPoint-s. Default: 0.0 */ + CIMPP::Float sections; + + /** \brief Voltage sensitivity required for the device to regulate the bus voltage, in voltage/reactive power. Default: nullptr */ + CIMPP::VoltagePerReactivePower voltageSensitivity; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/SolarGeneratingUnit.cpp b/CGMES_3.0.0/SolarGeneratingUnit.cpp index 62e05d5ef..c50a96bc3 100644 --- a/CGMES_3.0.0/SolarGeneratingUnit.cpp +++ b/CGMES_3.0.0/SolarGeneratingUnit.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -SolarGeneratingUnit::SolarGeneratingUnit() : SolarPowerPlant(nullptr) {}; -SolarGeneratingUnit::~SolarGeneratingUnit() {}; +SolarGeneratingUnit::SolarGeneratingUnit() : SolarPowerPlant(nullptr) {} +SolarGeneratingUnit::~SolarGeneratingUnit() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ SolarGeneratingUnit::getPossibleProfilesForAttributes() const return map; } - - bool assign_SolarPowerPlant_SolarGeneratingUnits(BaseClass*, BaseClass*); bool assign_SolarGeneratingUnit_SolarPowerPlant(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,10 +58,10 @@ bool assign_SolarGeneratingUnit_SolarPowerPlant(BaseClass* BaseClass_ptr1, BaseC return false; } - bool get_SolarGeneratingUnit_SolarPowerPlant(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SolarGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const SolarGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->SolarPowerPlant != 0) { @@ -74,7 +72,6 @@ bool get_SolarGeneratingUnit_SolarPowerPlant(const BaseClass* BaseClass_ptr1, st return false; } - const char SolarGeneratingUnit::debugName[] = "SolarGeneratingUnit"; const char* SolarGeneratingUnit::debugString() const { @@ -83,7 +80,7 @@ const char* SolarGeneratingUnit::debugString() const void SolarGeneratingUnit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SolarGeneratingUnit"), &SolarGeneratingUnit_factory)); + factory_map.emplace("cim:SolarGeneratingUnit", &SolarGeneratingUnit_factory); } void SolarGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -92,7 +89,7 @@ void SolarGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SolarGeneratingUnit.SolarPowerPlant"), &assign_SolarGeneratingUnit_SolarPowerPlant)); + assign_map.emplace("cim:SolarGeneratingUnit.SolarPowerPlant", &assign_SolarGeneratingUnit_SolarPowerPlant); } void SolarGeneratingUnit::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/SolarGeneratingUnit.hpp b/CGMES_3.0.0/SolarGeneratingUnit.hpp index c9cace069..464396213 100644 --- a/CGMES_3.0.0/SolarGeneratingUnit.hpp +++ b/CGMES_3.0.0/SolarGeneratingUnit.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class SolarPowerPlant; - /* - A solar thermal generating unit, connected to the grid by means of a rotating machine. This class does not represent photovoltaic (PV) generation. - */ + /** \brief A solar thermal generating unit, connected to the grid by means of a rotating machine. This class does not represent photovoltaic (PV) generation. */ class SolarGeneratingUnit : public GeneratingUnit { public: @@ -27,7 +25,8 @@ namespace CIMPP SolarGeneratingUnit(); ~SolarGeneratingUnit() override; - CIMPP::SolarPowerPlant* SolarPowerPlant; /* A solar power plant may have solar generating units. Default: 0 */ + /** \brief A solar power plant may have solar generating units. Default: 0 */ + CIMPP::SolarPowerPlant* SolarPowerPlant; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/SolarPowerPlant.cpp b/CGMES_3.0.0/SolarPowerPlant.cpp index af7a45b0e..d7a317331 100644 --- a/CGMES_3.0.0/SolarPowerPlant.cpp +++ b/CGMES_3.0.0/SolarPowerPlant.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -SolarPowerPlant::SolarPowerPlant() {}; -SolarPowerPlant::~SolarPowerPlant() {}; +SolarPowerPlant::SolarPowerPlant() {} +SolarPowerPlant::~SolarPowerPlant() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ SolarPowerPlant::getPossibleProfilesForAttributes() const return map; } - - bool assign_SolarGeneratingUnit_SolarPowerPlant(BaseClass*, BaseClass*); bool assign_SolarPowerPlant_SolarGeneratingUnits(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_SolarPowerPlant_SolarGeneratingUnits(BaseClass* BaseClass_ptr1, Base } - const char SolarPowerPlant::debugName[] = "SolarPowerPlant"; const char* SolarPowerPlant::debugString() const { @@ -69,7 +66,7 @@ const char* SolarPowerPlant::debugString() const void SolarPowerPlant::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SolarPowerPlant"), &SolarPowerPlant_factory)); + factory_map.emplace("cim:SolarPowerPlant", &SolarPowerPlant_factory); } void SolarPowerPlant::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void SolarPowerPlant::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SolarPowerPlant.SolarGeneratingUnits"), &assign_SolarPowerPlant_SolarGeneratingUnits)); + assign_map.emplace("cim:SolarPowerPlant.SolarGeneratingUnits", &assign_SolarPowerPlant_SolarGeneratingUnits); } void SolarPowerPlant::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/SolarPowerPlant.hpp b/CGMES_3.0.0/SolarPowerPlant.hpp index 6bd51b0f9..e1884c3c2 100644 --- a/CGMES_3.0.0/SolarPowerPlant.hpp +++ b/CGMES_3.0.0/SolarPowerPlant.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class SolarGeneratingUnit; - /* - Solar power plant. - */ + /** \brief Solar power plant. */ class SolarPowerPlant : public PowerSystemResource { public: @@ -27,7 +25,8 @@ namespace CIMPP SolarPowerPlant(); ~SolarPowerPlant() override; - std::list SolarGeneratingUnits; /* A solar generating unit or units may be a member of a solar power plant. Default: 0 */ + /** \brief A solar generating unit or units may be a member of a solar power plant. Default: 0 */ + std::list SolarGeneratingUnits; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Source.cpp b/CGMES_3.0.0/Source.cpp index 54f9266b5..c3fcca81b 100644 --- a/CGMES_3.0.0/Source.cpp +++ b/CGMES_3.0.0/Source.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "Source") + if (EnumSymbol.substr(0, pos) != "Source") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "PROCESS") + if (EnumSymbol == "PROCESS") { rop = Source::PROCESS; return lop; } - if(EnumSymbol == "DEFAULTED") + if (EnumSymbol == "DEFAULTED") { rop = Source::DEFAULTED; return lop; } - if(EnumSymbol == "SUBSTITUTED") + if (EnumSymbol == "SUBSTITUTED") { rop = Source::SUBSTITUTED; return lop; diff --git a/CGMES_3.0.0/Source.hpp b/CGMES_3.0.0/Source.hpp index 0cbf17fb0..a4c8dd465 100644 --- a/CGMES_3.0.0/Source.hpp +++ b/CGMES_3.0.0/Source.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Source gives information related to the origin of a value. - */ + /** \brief Source gives information related to the origin of a value. */ class Source { public: enum Source_ENUM { - /** - * The value is provided by input from the process I/O or being calculated from some function. - */ + /** The value is provided by input from the process I/O or being calculated from some function. */ PROCESS, - /** - * The value contains a default value. - */ + /** The value contains a default value. */ DEFAULTED, - /** - * The value is provided by input of an operator or by an automatic source. - */ + /** The value is provided by input of an operator or by an automatic source. */ SUBSTITUTED, }; diff --git a/CGMES_3.0.0/StaticLoadModelKind.cpp b/CGMES_3.0.0/StaticLoadModelKind.cpp index e3d149299..20695a176 100644 --- a/CGMES_3.0.0/StaticLoadModelKind.cpp +++ b/CGMES_3.0.0/StaticLoadModelKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "StaticLoadModelKind") + if (EnumSymbol.substr(0, pos) != "StaticLoadModelKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,22 +50,22 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "exponential") + if (EnumSymbol == "exponential") { rop = StaticLoadModelKind::exponential; return lop; } - if(EnumSymbol == "zIP1") + if (EnumSymbol == "zIP1") { rop = StaticLoadModelKind::zIP1; return lop; } - if(EnumSymbol == "zIP2") + if (EnumSymbol == "zIP2") { rop = StaticLoadModelKind::zIP2; return lop; } - if(EnumSymbol == "constantZ") + if (EnumSymbol == "constantZ") { rop = StaticLoadModelKind::constantZ; return lop; diff --git a/CGMES_3.0.0/StaticLoadModelKind.hpp b/CGMES_3.0.0/StaticLoadModelKind.hpp index ace949842..7c0bf74fa 100644 --- a/CGMES_3.0.0/StaticLoadModelKind.hpp +++ b/CGMES_3.0.0/StaticLoadModelKind.hpp @@ -9,29 +9,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of static load model. - */ + /** \brief Type of static load model. */ class StaticLoadModelKind { public: enum StaticLoadModelKind_ENUM { - /** - * This model is an exponential representation of the load. Exponential equations for active and reactive power are used and the following attributes are required: kp1, kp2, kp3, kpf, ep1, ep2, ep3 kq1, kq2, kq3, kqf, eq1, eq2, eq3. - */ + /** This model is an exponential representation of the load. Exponential equations for active and reactive power are used and the following attributes are required: kp1, kp2, kp3, kpf, ep1, ep2, ep3 kq1, kq2, kq3, kqf, eq1, eq2, eq3. */ exponential, - /** - * This model integrates the frequency-dependent load (primarily motors). ZIP1 equations for active and reactive power are used and the following attributes are required: kp1, kp2, kp3, kpf kq1, kq2, kq3, kqf. - */ + /** This model integrates the frequency-dependent load (primarily motors). ZIP1 equations for active and reactive power are used and the following attributes are required: kp1, kp2, kp3, kpf kq1, kq2, kq3, kqf. */ zIP1, - /** - * This model separates the frequency-dependent load (primarily motors) from other load. ZIP2 equations for active and reactive power are used and the following attributes are required: kp1, kp2, kp3, kq4, kpf kq1, kq2, kq3, kq4, kqf. - */ + /** This model separates the frequency-dependent load (primarily motors) from other load. ZIP2 equations for active and reactive power are used and the following attributes are required: kp1, kp2, kp3, kq4, kpf kq1, kq2, kq3, kq4, kqf. */ zIP2, - /** - * The load is represented as a constant impedance. ConstantZ equations are used for active and reactive power and no attributes are required. - */ + /** The load is represented as a constant impedance. ConstantZ equations are used for active and reactive power and no attributes are required. */ constantZ, }; diff --git a/CGMES_3.0.0/StaticVarCompensator.cpp b/CGMES_3.0.0/StaticVarCompensator.cpp index cc56f9da7..175ac3abc 100644 --- a/CGMES_3.0.0/StaticVarCompensator.cpp +++ b/CGMES_3.0.0/StaticVarCompensator.cpp @@ -9,17 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "StaticVarCompensatorDynamics.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" -#include "ReactivePower.hpp" -#include "SVCControlMode.hpp" -#include "VoltagePerReactivePower.hpp" -#include "Voltage.hpp" using namespace CIMPP; -StaticVarCompensator::StaticVarCompensator() : StaticVarCompensatorDynamics(nullptr) {}; -StaticVarCompensator::~StaticVarCompensator() {}; +StaticVarCompensator::StaticVarCompensator() : StaticVarCompensatorDynamics(nullptr) {} +StaticVarCompensator::~StaticVarCompensator() {} static const std::list PossibleProfilesForClass = { @@ -54,106 +48,112 @@ StaticVarCompensator::getPossibleProfilesForAttributes() const return map; } - -bool assign_StaticVarCompensator_capacitiveRating(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StaticVarCompensatorDynamics_StaticVarCompensator(BaseClass*, BaseClass*); +bool assign_StaticVarCompensator_StaticVarCompensatorDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + StaticVarCompensatorDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->capacitiveRating; - if (buffer.fail()) - return false; - else - return true; + if (element->StaticVarCompensatorDynamics != element2) + { + element->StaticVarCompensatorDynamics = element2; + return assign_StaticVarCompensatorDynamics_StaticVarCompensator(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_StaticVarCompensator_inductiveRating(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StaticVarCompensator_capacitiveRating(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->inductiveRating; - if (buffer.fail()) - return false; - else + buffer >> element->capacitiveRating; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StaticVarCompensator_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StaticVarCompensator_inductiveRating(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->q; - if (buffer.fail()) - return false; - else + buffer >> element->inductiveRating; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StaticVarCompensator_sVCControlMode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StaticVarCompensator_q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->sVCControlMode; - if (buffer.fail()) - return false; - else + buffer >> element->q; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StaticVarCompensator_slope(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StaticVarCompensator_sVCControlMode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->slope; - if (buffer.fail()) - return false; - else + buffer >> element->sVCControlMode; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StaticVarCompensator_voltageSetPoint(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StaticVarCompensator_slope(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->voltageSetPoint; - if (buffer.fail()) - return false; - else + buffer >> element->slope; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_StaticVarCompensatorDynamics_StaticVarCompensator(BaseClass*, BaseClass*); -bool assign_StaticVarCompensator_StaticVarCompensatorDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_StaticVarCompensator_voltageSetPoint(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); - StaticVarCompensatorDynamics* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->StaticVarCompensatorDynamics != element2) + buffer >> element->voltageSetPoint; + if (!buffer.fail()) { - element->StaticVarCompensatorDynamics = element2; - return assign_StaticVarCompensatorDynamics_StaticVarCompensator(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_StaticVarCompensator_capacitiveRating(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->capacitiveRating; if (!buffer.str().empty()) @@ -167,7 +167,8 @@ bool get_StaticVarCompensator_capacitiveRating(const BaseClass* BaseClass_ptr1, bool get_StaticVarCompensator_inductiveRating(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->inductiveRating; if (!buffer.str().empty()) @@ -181,7 +182,8 @@ bool get_StaticVarCompensator_inductiveRating(const BaseClass* BaseClass_ptr1, s bool get_StaticVarCompensator_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q; if (!buffer.str().empty()) @@ -193,11 +195,12 @@ bool get_StaticVarCompensator_q(const BaseClass* BaseClass_ptr1, std::stringstre return false; } -bool get_StaticVarCompensator_slope(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_StaticVarCompensator_sVCControlMode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->slope; + buffer << element->sVCControlMode; if (!buffer.str().empty()) { return true; @@ -207,11 +210,12 @@ bool get_StaticVarCompensator_slope(const BaseClass* BaseClass_ptr1, std::string return false; } -bool get_StaticVarCompensator_voltageSetPoint(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_StaticVarCompensator_slope(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->voltageSetPoint; + buffer << element->slope; if (!buffer.str().empty()) { return true; @@ -221,13 +225,12 @@ bool get_StaticVarCompensator_voltageSetPoint(const BaseClass* BaseClass_ptr1, s return false; } - - -bool get_StaticVarCompensator_sVCControlMode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_StaticVarCompensator_voltageSetPoint(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1)) + const StaticVarCompensator* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->sVCControlMode; + buffer << element->voltageSetPoint; if (!buffer.str().empty()) { return true; @@ -245,22 +248,22 @@ const char* StaticVarCompensator::debugString() const void StaticVarCompensator::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:StaticVarCompensator"), &StaticVarCompensator_factory)); + factory_map.emplace("cim:StaticVarCompensator", &StaticVarCompensator_factory); } void StaticVarCompensator::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:StaticVarCompensator.capacitiveRating"), &assign_StaticVarCompensator_capacitiveRating)); - assign_map.insert(std::make_pair(std::string("cim:StaticVarCompensator.inductiveRating"), &assign_StaticVarCompensator_inductiveRating)); - assign_map.insert(std::make_pair(std::string("cim:StaticVarCompensator.q"), &assign_StaticVarCompensator_q)); - assign_map.insert(std::make_pair(std::string("cim:StaticVarCompensator.sVCControlMode"), &assign_StaticVarCompensator_sVCControlMode)); - assign_map.insert(std::make_pair(std::string("cim:StaticVarCompensator.slope"), &assign_StaticVarCompensator_slope)); - assign_map.insert(std::make_pair(std::string("cim:StaticVarCompensator.voltageSetPoint"), &assign_StaticVarCompensator_voltageSetPoint)); + assign_map.emplace("cim:StaticVarCompensator.capacitiveRating", &assign_StaticVarCompensator_capacitiveRating); + assign_map.emplace("cim:StaticVarCompensator.inductiveRating", &assign_StaticVarCompensator_inductiveRating); + assign_map.emplace("cim:StaticVarCompensator.q", &assign_StaticVarCompensator_q); + assign_map.emplace("cim:StaticVarCompensator.sVCControlMode", &assign_StaticVarCompensator_sVCControlMode); + assign_map.emplace("cim:StaticVarCompensator.slope", &assign_StaticVarCompensator_slope); + assign_map.emplace("cim:StaticVarCompensator.voltageSetPoint", &assign_StaticVarCompensator_voltageSetPoint); } void StaticVarCompensator::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:StaticVarCompensator.StaticVarCompensatorDynamics"), &assign_StaticVarCompensator_StaticVarCompensatorDynamics)); + assign_map.emplace("cim:StaticVarCompensator.StaticVarCompensatorDynamics", &assign_StaticVarCompensator_StaticVarCompensatorDynamics); } void StaticVarCompensator::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/StaticVarCompensator.hpp b/CGMES_3.0.0/StaticVarCompensator.hpp index 5b4475f82..ac6a98cb4 100644 --- a/CGMES_3.0.0/StaticVarCompensator.hpp +++ b/CGMES_3.0.0/StaticVarCompensator.hpp @@ -22,9 +22,7 @@ namespace CIMPP { class StaticVarCompensatorDynamics; - /* - A facility for providing variable and controllable shunt reactive power. The SVC typically consists of a stepdown transformer, filter, thyristor-controlled reactor, and thyristor-switched capacitor arms. The SVC may operate in fixed MVar output mode or in voltage control mode. When in voltage control mode, the output of the SVC will be proportional to the deviation of voltage at the controlled bus from the voltage setpoint. The SVC characteristic slope defines the proportion. If the voltage at the controlled bus is equal to the voltage setpoint, the SVC MVar output is zero. - */ + /** \brief A facility for providing variable and controllable shunt reactive power. The SVC typically consists of a stepdown transformer, filter, thyristor-controlled reactor, and thyristor-switched capacitor arms. The SVC may operate in fixed MVar output mode or in voltage control mode. When in voltage control mode, the output of the SVC will be proportional to the deviation of voltage at the controlled bus from the voltage setpoint. The SVC characteristic slope defines the proportion. If the voltage at the controlled bus is equal to the voltage setpoint, the SVC MVar output is zero. */ class StaticVarCompensator : public RegulatingCondEq { public: @@ -32,13 +30,26 @@ namespace CIMPP StaticVarCompensator(); ~StaticVarCompensator() override; - CIMPP::StaticVarCompensatorDynamics* StaticVarCompensatorDynamics; /* Static Var Compensator dynamics model used to describe dynamic behaviour of this Static Var Compensator. Default: 0 */ - CIMPP::Reactance capacitiveRating; /* Capacitive reactance at maximum capacitive reactive power. Shall always be positive. Default: nullptr */ - CIMPP::Reactance inductiveRating; /* Inductive reactance at maximum inductive reactive power. Shall always be negative. Default: nullptr */ - CIMPP::ReactivePower q; /* Reactive power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution. Default: nullptr */ - CIMPP::SVCControlMode sVCControlMode; /* SVC control mode. Default: 0 */ - CIMPP::VoltagePerReactivePower slope; /* The characteristics slope of an SVC defines how the reactive power output changes in proportion to the difference between the regulated bus voltage and the voltage setpoint. The attribute shall be a positive value or zero. Default: nullptr */ - CIMPP::Voltage voltageSetPoint; /* The reactive power output of the SVC is proportional to the difference between the voltage at the regulated bus and the voltage setpoint. When the regulated bus voltage is equal to the voltage setpoint, the reactive power output is zero. Default: nullptr */ + /** \brief Static Var Compensator dynamics model used to describe dynamic behaviour of this Static Var Compensator. Default: 0 */ + CIMPP::StaticVarCompensatorDynamics* StaticVarCompensatorDynamics; + + /** \brief Capacitive reactance at maximum capacitive reactive power. Shall always be positive. Default: nullptr */ + CIMPP::Reactance capacitiveRating; + + /** \brief Inductive reactance at maximum inductive reactive power. Shall always be negative. Default: nullptr */ + CIMPP::Reactance inductiveRating; + + /** \brief Reactive power injection. Load sign convention is used, i.e. positive sign means flow out from a node. Starting value for a steady state solution. Default: nullptr */ + CIMPP::ReactivePower q; + + /** \brief SVC control mode. Default: 0 */ + CIMPP::SVCControlMode sVCControlMode; + + /** \brief The characteristics slope of an SVC defines how the reactive power output changes in proportion to the difference between the regulated bus voltage and the voltage setpoint. The attribute shall be a positive value or zero. Default: nullptr */ + CIMPP::VoltagePerReactivePower slope; + + /** \brief The reactive power output of the SVC is proportional to the difference between the voltage at the regulated bus and the voltage setpoint. When the regulated bus voltage is equal to the voltage setpoint, the reactive power output is zero. Default: nullptr */ + CIMPP::Voltage voltageSetPoint; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/StaticVarCompensatorDynamics.cpp b/CGMES_3.0.0/StaticVarCompensatorDynamics.cpp index feb28723a..106764a27 100644 --- a/CGMES_3.0.0/StaticVarCompensatorDynamics.cpp +++ b/CGMES_3.0.0/StaticVarCompensatorDynamics.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -StaticVarCompensatorDynamics::StaticVarCompensatorDynamics() : StaticVarCompensator(nullptr) {}; -StaticVarCompensatorDynamics::~StaticVarCompensatorDynamics() {}; +StaticVarCompensatorDynamics::StaticVarCompensatorDynamics() : StaticVarCompensator(nullptr) {} +StaticVarCompensatorDynamics::~StaticVarCompensatorDynamics() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ StaticVarCompensatorDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_StaticVarCompensator_StaticVarCompensatorDynamics(BaseClass*, BaseClass*); bool assign_StaticVarCompensatorDynamics_StaticVarCompensator(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_StaticVarCompensatorDynamics_StaticVarCompensator(BaseClass* BaseCla return false; } - bool get_StaticVarCompensatorDynamics_StaticVarCompensator(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const StaticVarCompensatorDynamics* element = dynamic_cast(BaseClass_ptr1)) + const StaticVarCompensatorDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->StaticVarCompensator != 0) { @@ -73,7 +71,6 @@ bool get_StaticVarCompensatorDynamics_StaticVarCompensator(const BaseClass* Base return false; } - const char StaticVarCompensatorDynamics::debugName[] = "StaticVarCompensatorDynamics"; const char* StaticVarCompensatorDynamics::debugString() const { @@ -82,7 +79,7 @@ const char* StaticVarCompensatorDynamics::debugString() const void StaticVarCompensatorDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:StaticVarCompensatorDynamics"), &StaticVarCompensatorDynamics_factory)); + factory_map.emplace("cim:StaticVarCompensatorDynamics", &StaticVarCompensatorDynamics_factory); } void StaticVarCompensatorDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void StaticVarCompensatorDynamics::addPrimitiveAssignFnsToMap(std::unordered_map void StaticVarCompensatorDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:StaticVarCompensatorDynamics.StaticVarCompensator"), &assign_StaticVarCompensatorDynamics_StaticVarCompensator)); + assign_map.emplace("cim:StaticVarCompensatorDynamics.StaticVarCompensator", &assign_StaticVarCompensatorDynamics_StaticVarCompensator); } void StaticVarCompensatorDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/StaticVarCompensatorDynamics.hpp b/CGMES_3.0.0/StaticVarCompensatorDynamics.hpp index 73ec6acf3..025c6774c 100644 --- a/CGMES_3.0.0/StaticVarCompensatorDynamics.hpp +++ b/CGMES_3.0.0/StaticVarCompensatorDynamics.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class StaticVarCompensator; - /* - Static var compensator whose behaviour is described by reference to a standard model or by definition of a user-defined model. - */ + /** \brief Static var compensator whose behaviour is described by reference to a standard model or by definition of a user-defined model. */ class StaticVarCompensatorDynamics : public DynamicsFunctionBlock { public: @@ -27,7 +25,8 @@ namespace CIMPP StaticVarCompensatorDynamics(); ~StaticVarCompensatorDynamics() override; - CIMPP::StaticVarCompensator* StaticVarCompensator; /* Static Var Compensator to which Static Var Compensator dynamics model applies. Default: 0 */ + /** \brief Static Var Compensator to which Static Var Compensator dynamics model applies. Default: 0 */ + CIMPP::StaticVarCompensator* StaticVarCompensator; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/StationSupply.cpp b/CGMES_3.0.0/StationSupply.cpp index 86990151b..71ca77084 100644 --- a/CGMES_3.0.0/StationSupply.cpp +++ b/CGMES_3.0.0/StationSupply.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -StationSupply::StationSupply() {}; -StationSupply::~StationSupply() {}; +StationSupply::StationSupply() {} +StationSupply::~StationSupply() {} static const std::list PossibleProfilesForClass = { @@ -39,11 +39,6 @@ StationSupply::getPossibleProfilesForAttributes() const return map; } - - - - - const char StationSupply::debugName[] = "StationSupply"; const char* StationSupply::debugString() const { @@ -52,7 +47,7 @@ const char* StationSupply::debugString() const void StationSupply::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:StationSupply"), &StationSupply_factory)); + factory_map.emplace("cim:StationSupply", &StationSupply_factory); } void StationSupply::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/StationSupply.hpp b/CGMES_3.0.0/StationSupply.hpp index 728fd30bb..f95e7ce94 100644 --- a/CGMES_3.0.0/StationSupply.hpp +++ b/CGMES_3.0.0/StationSupply.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Station supply with load derived from the station output. - */ + /** \brief Station supply with load derived from the station output. */ class StationSupply : public EnergyConsumer { public: @@ -26,7 +24,6 @@ namespace CIMPP StationSupply(); ~StationSupply() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Status.cpp b/CGMES_3.0.0/Status.cpp index 4c8ad11de..10ff1931f 100644 --- a/CGMES_3.0.0/Status.cpp +++ b/CGMES_3.0.0/Status.cpp @@ -8,15 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "DateTime.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -Status::Status() {}; -Status::~Status() {}; +Status::Status() {} +Status::~Status() {} static const std::list PossibleProfilesForClass = { @@ -46,64 +42,66 @@ Status::getPossibleProfilesForAttributes() const return map; } - -bool assign_Status_dateTime(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Status_dateTime(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Status* element = dynamic_cast(BaseClass_ptr1)) + Status* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->dateTime = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Status_reason(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Status_reason(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Status* element = dynamic_cast(BaseClass_ptr1)) + Status* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->reason = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Status_remark(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Status_remark(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Status* element = dynamic_cast(BaseClass_ptr1)) + Status* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->remark = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Status_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Status_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Status* element = dynamic_cast(BaseClass_ptr1)) + Status* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->value = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_Status_dateTime(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Status* element = dynamic_cast(BaseClass_ptr1)) + const Status* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dateTime; if (!buffer.str().empty()) @@ -117,7 +115,8 @@ bool get_Status_dateTime(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_Status_reason(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Status* element = dynamic_cast(BaseClass_ptr1)) + const Status* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->reason; if (!buffer.str().empty()) @@ -131,7 +130,8 @@ bool get_Status_reason(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_Status_remark(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Status* element = dynamic_cast(BaseClass_ptr1)) + const Status* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->remark; if (!buffer.str().empty()) @@ -145,7 +145,8 @@ bool get_Status_remark(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_Status_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Status* element = dynamic_cast(BaseClass_ptr1)) + const Status* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value; if (!buffer.str().empty()) @@ -157,8 +158,6 @@ bool get_Status_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer return false; } - - const char Status::debugName[] = "Status"; const char* Status::debugString() const { @@ -167,15 +166,15 @@ const char* Status::debugString() const void Status::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Status"), &Status_factory)); + factory_map.emplace("cim:Status", &Status_factory); } void Status::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Status.dateTime"), &assign_Status_dateTime)); - assign_map.insert(std::make_pair(std::string("cim:Status.reason"), &assign_Status_reason)); - assign_map.insert(std::make_pair(std::string("cim:Status.remark"), &assign_Status_remark)); - assign_map.insert(std::make_pair(std::string("cim:Status.value"), &assign_Status_value)); + assign_map.emplace("cim:Status.dateTime", &assign_Status_dateTime); + assign_map.emplace("cim:Status.reason", &assign_Status_reason); + assign_map.emplace("cim:Status.remark", &assign_Status_remark); + assign_map.emplace("cim:Status.value", &assign_Status_value); } void Status::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/Status.hpp b/CGMES_3.0.0/Status.hpp index 915e7ff39..a915cd996 100644 --- a/CGMES_3.0.0/Status.hpp +++ b/CGMES_3.0.0/Status.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Current status information relevant to an entity. - */ + /** \brief Current status information relevant to an entity. */ class Status : public BaseClass { public: @@ -28,10 +26,17 @@ namespace CIMPP Status(); ~Status() override; - CIMPP::DateTime dateTime; /* Date and time for which status `value` applies. Default: '' */ - CIMPP::String reason; /* Reason code or explanation for why an object went to the current status `value`. Default: '' */ - CIMPP::String remark; /* Pertinent information regarding the current `value`, as free form text. Default: '' */ - CIMPP::String value; /* Status value at `dateTime`; prior status changes may have been kept in instances of activity records associated with the object to which this status applies. Default: '' */ + /** \brief Date and time for which status `value` applies. Default: '' */ + CIMPP::DateTime dateTime; + + /** \brief Reason code or explanation for why an object went to the current status `value`. Default: '' */ + CIMPP::String reason; + + /** \brief Pertinent information regarding the current `value`, as free form text. Default: '' */ + CIMPP::String remark; + + /** \brief Status value at `dateTime`; prior status changes may have been kept in instances of activity records associated with the object to which this status applies. Default: '' */ + CIMPP::String value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/StreetAddress.cpp b/CGMES_3.0.0/StreetAddress.cpp index ac5e43690..c31633d0a 100644 --- a/CGMES_3.0.0/StreetAddress.cpp +++ b/CGMES_3.0.0/StreetAddress.cpp @@ -8,17 +8,14 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" #include "Status.hpp" #include "StreetDetail.hpp" #include "TownDetail.hpp" using namespace CIMPP; -StreetAddress::StreetAddress() : status(nullptr), streetDetail(nullptr), townDetail(nullptr) {}; -StreetAddress::~StreetAddress() {}; +StreetAddress::StreetAddress() : status(nullptr), streetDetail(nullptr), townDetail(nullptr) {} +StreetAddress::~StreetAddress() {} static const std::list PossibleProfilesForClass = { @@ -50,50 +47,52 @@ StreetAddress::getPossibleProfilesForAttributes() const return map; } - -bool assign_StreetAddress_language(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StreetAddress_language(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StreetAddress* element = dynamic_cast(BaseClass_ptr1)) + StreetAddress* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->language = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StreetAddress_poBox(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StreetAddress_poBox(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StreetAddress* element = dynamic_cast(BaseClass_ptr1)) + StreetAddress* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->poBox = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StreetAddress_postalCode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StreetAddress_postalCode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StreetAddress* element = dynamic_cast(BaseClass_ptr1)) + StreetAddress* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->postalCode = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - bool assign_StreetAddress_status(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if(StreetAddress* element = dynamic_cast(BaseClass_ptr1)) + StreetAddress* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->status = dynamic_cast(BaseClass_ptr2); if (element->status != nullptr) @@ -103,9 +102,11 @@ bool assign_StreetAddress_status(BaseClass* BaseClass_ptr1, BaseClass* BaseClass } return false; } + bool assign_StreetAddress_streetDetail(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if(StreetAddress* element = dynamic_cast(BaseClass_ptr1)) + StreetAddress* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->streetDetail = dynamic_cast(BaseClass_ptr2); if (element->streetDetail != nullptr) @@ -115,9 +116,11 @@ bool assign_StreetAddress_streetDetail(BaseClass* BaseClass_ptr1, BaseClass* Bas } return false; } + bool assign_StreetAddress_townDetail(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if(StreetAddress* element = dynamic_cast(BaseClass_ptr1)) + StreetAddress* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->townDetail = dynamic_cast(BaseClass_ptr2); if (element->townDetail != nullptr) @@ -130,7 +133,8 @@ bool assign_StreetAddress_townDetail(BaseClass* BaseClass_ptr1, BaseClass* BaseC bool get_StreetAddress_language(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StreetAddress* element = dynamic_cast(BaseClass_ptr1)) + const StreetAddress* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->language; if (!buffer.str().empty()) @@ -144,7 +148,8 @@ bool get_StreetAddress_language(const BaseClass* BaseClass_ptr1, std::stringstre bool get_StreetAddress_poBox(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StreetAddress* element = dynamic_cast(BaseClass_ptr1)) + const StreetAddress* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->poBox; if (!buffer.str().empty()) @@ -158,7 +163,8 @@ bool get_StreetAddress_poBox(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_StreetAddress_postalCode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StreetAddress* element = dynamic_cast(BaseClass_ptr1)) + const StreetAddress* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->postalCode; if (!buffer.str().empty()) @@ -170,10 +176,10 @@ bool get_StreetAddress_postalCode(const BaseClass* BaseClass_ptr1, std::stringst return false; } - bool get_StreetAddress_status(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const StreetAddress* element = dynamic_cast(BaseClass_ptr1)) + const StreetAddress* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->status != 0) { @@ -186,7 +192,8 @@ bool get_StreetAddress_status(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const StreetAddress* element = dynamic_cast(BaseClass_ptr1)) + const StreetAddress* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->streetDetail != 0) { @@ -199,7 +206,8 @@ bool get_StreetAddress_streetDetail(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const StreetAddress* element = dynamic_cast(BaseClass_ptr1)) + const StreetAddress* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->townDetail != 0) { @@ -210,7 +218,6 @@ bool get_StreetAddress_townDetail(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:StreetAddress"), &StreetAddress_factory)); + factory_map.emplace("cim:StreetAddress", &StreetAddress_factory); } void StreetAddress::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:StreetAddress.language"), &assign_StreetAddress_language)); - assign_map.insert(std::make_pair(std::string("cim:StreetAddress.poBox"), &assign_StreetAddress_poBox)); - assign_map.insert(std::make_pair(std::string("cim:StreetAddress.postalCode"), &assign_StreetAddress_postalCode)); + assign_map.emplace("cim:StreetAddress.language", &assign_StreetAddress_language); + assign_map.emplace("cim:StreetAddress.poBox", &assign_StreetAddress_poBox); + assign_map.emplace("cim:StreetAddress.postalCode", &assign_StreetAddress_postalCode); } void StreetAddress::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:StreetAddress.status"), &assign_StreetAddress_status)); - assign_map.insert(std::make_pair(std::string("cim:StreetAddress.streetDetail"), &assign_StreetAddress_streetDetail)); - assign_map.insert(std::make_pair(std::string("cim:StreetAddress.townDetail"), &assign_StreetAddress_townDetail)); + assign_map.emplace("cim:StreetAddress.status", &assign_StreetAddress_status); + assign_map.emplace("cim:StreetAddress.streetDetail", &assign_StreetAddress_streetDetail); + assign_map.emplace("cim:StreetAddress.townDetail", &assign_StreetAddress_townDetail); } void StreetAddress::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/StreetAddress.hpp b/CGMES_3.0.0/StreetAddress.hpp index f064b8cd0..a2e3c0388 100644 --- a/CGMES_3.0.0/StreetAddress.hpp +++ b/CGMES_3.0.0/StreetAddress.hpp @@ -20,9 +20,7 @@ namespace CIMPP class StreetDetail; class TownDetail; - /* - General purpose street and postal address information. - */ + /** \brief General purpose street and postal address information. */ class StreetAddress : public BaseClass { public: @@ -30,12 +28,23 @@ namespace CIMPP StreetAddress(); ~StreetAddress() override; - CIMPP::String language; /* The language in which the address is specified, using ISO 639-1 two digit language code. Default: '' */ - CIMPP::String poBox; /* Post office box. Default: '' */ - CIMPP::String postalCode; /* Postal code for the address. Default: '' */ - CIMPP::Status* status; /* Status of this address. Default: nullptr */ - CIMPP::StreetDetail* streetDetail; /* Street detail. Default: nullptr */ - CIMPP::TownDetail* townDetail; /* Town detail. Default: nullptr */ + /** \brief The language in which the address is specified, using ISO 639-1 two digit language code. Default: '' */ + CIMPP::String language; + + /** \brief Post office box. Default: '' */ + CIMPP::String poBox; + + /** \brief Postal code for the address. Default: '' */ + CIMPP::String postalCode; + + /** \brief Status of this address. Default: nullptr */ + CIMPP::Status* status; + + /** \brief Street detail. Default: nullptr */ + CIMPP::StreetDetail* streetDetail; + + /** \brief Town detail. Default: nullptr */ + CIMPP::TownDetail* townDetail; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/StreetDetail.cpp b/CGMES_3.0.0/StreetDetail.cpp index 4e49a6745..3338d23bb 100644 --- a/CGMES_3.0.0/StreetDetail.cpp +++ b/CGMES_3.0.0/StreetDetail.cpp @@ -8,24 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "Boolean.hpp" using namespace CIMPP; -StreetDetail::StreetDetail() {}; -StreetDetail::~StreetDetail() {}; +StreetDetail::StreetDetail() {} +StreetDetail::~StreetDetail() {} static const std::list PossibleProfilesForClass = { @@ -64,181 +51,192 @@ StreetDetail::getPossibleProfilesForAttributes() const return map; } - -bool assign_StreetDetail_addressGeneral(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StreetDetail_addressGeneral(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + StreetDetail* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->addressGeneral = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StreetDetail_addressGeneral2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StreetDetail_addressGeneral2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + StreetDetail* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->addressGeneral2 = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StreetDetail_addressGeneral3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StreetDetail_addressGeneral3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + StreetDetail* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->addressGeneral3 = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StreetDetail_buildingName(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StreetDetail_buildingName(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + StreetDetail* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->buildingName = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StreetDetail_code(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StreetDetail_code(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + StreetDetail* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->code = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StreetDetail_floorIdentification(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StreetDetail_floorIdentification(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + StreetDetail* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->floorIdentification = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StreetDetail_name(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StreetDetail_name(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + StreetDetail* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->name = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StreetDetail_number(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StreetDetail_number(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + StreetDetail* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->number = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StreetDetail_prefix(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StreetDetail_prefix(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + StreetDetail* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->prefix = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StreetDetail_suffix(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StreetDetail_suffix(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + StreetDetail* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->suffix = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StreetDetail_suiteNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StreetDetail_suiteNumber(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + StreetDetail* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->suiteNumber = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StreetDetail_type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StreetDetail_type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + StreetDetail* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->type = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_StreetDetail_withinTownLimits(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_StreetDetail_withinTownLimits(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + StreetDetail* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->withinTownLimits; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_StreetDetail_addressGeneral(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + const StreetDetail* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->addressGeneral; if (!buffer.str().empty()) @@ -252,7 +250,8 @@ bool get_StreetDetail_addressGeneral(const BaseClass* BaseClass_ptr1, std::strin bool get_StreetDetail_addressGeneral2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + const StreetDetail* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->addressGeneral2; if (!buffer.str().empty()) @@ -266,7 +265,8 @@ bool get_StreetDetail_addressGeneral2(const BaseClass* BaseClass_ptr1, std::stri bool get_StreetDetail_addressGeneral3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + const StreetDetail* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->addressGeneral3; if (!buffer.str().empty()) @@ -280,7 +280,8 @@ bool get_StreetDetail_addressGeneral3(const BaseClass* BaseClass_ptr1, std::stri bool get_StreetDetail_buildingName(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + const StreetDetail* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->buildingName; if (!buffer.str().empty()) @@ -294,7 +295,8 @@ bool get_StreetDetail_buildingName(const BaseClass* BaseClass_ptr1, std::strings bool get_StreetDetail_code(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + const StreetDetail* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->code; if (!buffer.str().empty()) @@ -308,7 +310,8 @@ bool get_StreetDetail_code(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_StreetDetail_floorIdentification(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + const StreetDetail* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->floorIdentification; if (!buffer.str().empty()) @@ -322,7 +325,8 @@ bool get_StreetDetail_floorIdentification(const BaseClass* BaseClass_ptr1, std:: bool get_StreetDetail_name(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + const StreetDetail* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->name; if (!buffer.str().empty()) @@ -336,7 +340,8 @@ bool get_StreetDetail_name(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_StreetDetail_number(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + const StreetDetail* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->number; if (!buffer.str().empty()) @@ -350,7 +355,8 @@ bool get_StreetDetail_number(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_StreetDetail_prefix(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + const StreetDetail* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->prefix; if (!buffer.str().empty()) @@ -364,7 +370,8 @@ bool get_StreetDetail_prefix(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_StreetDetail_suffix(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + const StreetDetail* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->suffix; if (!buffer.str().empty()) @@ -378,7 +385,8 @@ bool get_StreetDetail_suffix(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_StreetDetail_suiteNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + const StreetDetail* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->suiteNumber; if (!buffer.str().empty()) @@ -392,7 +400,8 @@ bool get_StreetDetail_suiteNumber(const BaseClass* BaseClass_ptr1, std::stringst bool get_StreetDetail_type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + const StreetDetail* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->type; if (!buffer.str().empty()) @@ -406,7 +415,8 @@ bool get_StreetDetail_type(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_StreetDetail_withinTownLimits(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const StreetDetail* element = dynamic_cast(BaseClass_ptr1)) + const StreetDetail* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->withinTownLimits; if (!buffer.str().empty()) @@ -418,8 +428,6 @@ bool get_StreetDetail_withinTownLimits(const BaseClass* BaseClass_ptr1, std::str return false; } - - const char StreetDetail::debugName[] = "StreetDetail"; const char* StreetDetail::debugString() const { @@ -428,24 +436,24 @@ const char* StreetDetail::debugString() const void StreetDetail::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:StreetDetail"), &StreetDetail_factory)); + factory_map.emplace("cim:StreetDetail", &StreetDetail_factory); } void StreetDetail::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:StreetDetail.addressGeneral"), &assign_StreetDetail_addressGeneral)); - assign_map.insert(std::make_pair(std::string("cim:StreetDetail.addressGeneral2"), &assign_StreetDetail_addressGeneral2)); - assign_map.insert(std::make_pair(std::string("cim:StreetDetail.addressGeneral3"), &assign_StreetDetail_addressGeneral3)); - assign_map.insert(std::make_pair(std::string("cim:StreetDetail.buildingName"), &assign_StreetDetail_buildingName)); - assign_map.insert(std::make_pair(std::string("cim:StreetDetail.code"), &assign_StreetDetail_code)); - assign_map.insert(std::make_pair(std::string("cim:StreetDetail.floorIdentification"), &assign_StreetDetail_floorIdentification)); - assign_map.insert(std::make_pair(std::string("cim:StreetDetail.name"), &assign_StreetDetail_name)); - assign_map.insert(std::make_pair(std::string("cim:StreetDetail.number"), &assign_StreetDetail_number)); - assign_map.insert(std::make_pair(std::string("cim:StreetDetail.prefix"), &assign_StreetDetail_prefix)); - assign_map.insert(std::make_pair(std::string("cim:StreetDetail.suffix"), &assign_StreetDetail_suffix)); - assign_map.insert(std::make_pair(std::string("cim:StreetDetail.suiteNumber"), &assign_StreetDetail_suiteNumber)); - assign_map.insert(std::make_pair(std::string("cim:StreetDetail.type"), &assign_StreetDetail_type)); - assign_map.insert(std::make_pair(std::string("cim:StreetDetail.withinTownLimits"), &assign_StreetDetail_withinTownLimits)); + assign_map.emplace("cim:StreetDetail.addressGeneral", &assign_StreetDetail_addressGeneral); + assign_map.emplace("cim:StreetDetail.addressGeneral2", &assign_StreetDetail_addressGeneral2); + assign_map.emplace("cim:StreetDetail.addressGeneral3", &assign_StreetDetail_addressGeneral3); + assign_map.emplace("cim:StreetDetail.buildingName", &assign_StreetDetail_buildingName); + assign_map.emplace("cim:StreetDetail.code", &assign_StreetDetail_code); + assign_map.emplace("cim:StreetDetail.floorIdentification", &assign_StreetDetail_floorIdentification); + assign_map.emplace("cim:StreetDetail.name", &assign_StreetDetail_name); + assign_map.emplace("cim:StreetDetail.number", &assign_StreetDetail_number); + assign_map.emplace("cim:StreetDetail.prefix", &assign_StreetDetail_prefix); + assign_map.emplace("cim:StreetDetail.suffix", &assign_StreetDetail_suffix); + assign_map.emplace("cim:StreetDetail.suiteNumber", &assign_StreetDetail_suiteNumber); + assign_map.emplace("cim:StreetDetail.type", &assign_StreetDetail_type); + assign_map.emplace("cim:StreetDetail.withinTownLimits", &assign_StreetDetail_withinTownLimits); } void StreetDetail::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/StreetDetail.hpp b/CGMES_3.0.0/StreetDetail.hpp index 34f4fefbe..819a7e651 100644 --- a/CGMES_3.0.0/StreetDetail.hpp +++ b/CGMES_3.0.0/StreetDetail.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Street details, in the context of address. - */ + /** \brief Street details, in the context of address. */ class StreetDetail : public BaseClass { public: @@ -28,19 +26,44 @@ namespace CIMPP StreetDetail(); ~StreetDetail() override; - CIMPP::String addressGeneral; /* First line of a free form address or some additional address information (for example a mail stop). Default: '' */ - CIMPP::String addressGeneral2; /* (if applicable) Second line of a free form address. Default: '' */ - CIMPP::String addressGeneral3; /* (if applicable) Third line of a free form address. Default: '' */ - CIMPP::String buildingName; /* (if applicable) In certain cases the physical location of the place of interest does not have a direct point of entry from the street, but may be located inside a larger structure such as a building, complex, office block, apartment, etc. Default: '' */ - CIMPP::String code; /* (if applicable) Utilities often make use of external reference systems, such as those of the town-planner`s department or surveyor general`s mapping system, that allocate global reference codes to streets. Default: '' */ - CIMPP::String floorIdentification; /* The identification by name or number, expressed as text, of the floor in the building as part of this address. Default: '' */ - CIMPP::String name; /* Name of the street. Default: '' */ - CIMPP::String number; /* Designator of the specific location on the street. Default: '' */ - CIMPP::String prefix; /* Prefix to the street name. For example: North, South, East, West. Default: '' */ - CIMPP::String suffix; /* Suffix to the street name. For example: North, South, East, West. Default: '' */ - CIMPP::String suiteNumber; /* Number of the apartment or suite. Default: '' */ - CIMPP::String type; /* Type of street. Examples include: street, circle, boulevard, avenue, road, drive, etc. Default: '' */ - CIMPP::Boolean withinTownLimits; /* True if this street is within the legal geographical boundaries of the specified town (default). Default: false */ + /** \brief First line of a free form address or some additional address information (for example a mail stop). Default: '' */ + CIMPP::String addressGeneral; + + /** \brief (if applicable) Second line of a free form address. Default: '' */ + CIMPP::String addressGeneral2; + + /** \brief (if applicable) Third line of a free form address. Default: '' */ + CIMPP::String addressGeneral3; + + /** \brief (if applicable) In certain cases the physical location of the place of interest does not have a direct point of entry from the street, but may be located inside a larger structure such as a building, complex, office block, apartment, etc. Default: '' */ + CIMPP::String buildingName; + + /** \brief (if applicable) Utilities often make use of external reference systems, such as those of the town-planner`s department or surveyor general`s mapping system, that allocate global reference codes to streets. Default: '' */ + CIMPP::String code; + + /** \brief The identification by name or number, expressed as text, of the floor in the building as part of this address. Default: '' */ + CIMPP::String floorIdentification; + + /** \brief Name of the street. Default: '' */ + CIMPP::String name; + + /** \brief Designator of the specific location on the street. Default: '' */ + CIMPP::String number; + + /** \brief Prefix to the street name. For example: North, South, East, West. Default: '' */ + CIMPP::String prefix; + + /** \brief Suffix to the street name. For example: North, South, East, West. Default: '' */ + CIMPP::String suffix; + + /** \brief Number of the apartment or suite. Default: '' */ + CIMPP::String suiteNumber; + + /** \brief Type of street. Examples include: street, circle, boulevard, avenue, road, drive, etc. Default: '' */ + CIMPP::String type; + + /** \brief True if this street is within the legal geographical boundaries of the specified town (default). Default: false */ + CIMPP::Boolean withinTownLimits; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/String.hpp b/CGMES_3.0.0/String.hpp index 60fcbbbc0..8c3dbedcf 100644 --- a/CGMES_3.0.0/String.hpp +++ b/CGMES_3.0.0/String.hpp @@ -4,22 +4,20 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cimgen */ -#include #include #include +#include namespace CIMPP { - /* - A string consisting of a sequence of characters. The character encoding is UTF-8. The string length is unspecified and unlimited. - */ + /** \brief A string consisting of a sequence of characters. The character encoding is UTF-8. The string length is unspecified and unlimited. */ class String { public: String() : initialized(false) {} String(const std::string& value) : value(value), initialized(true) {} - String& operator=(const std::string &rop); + String& operator=(const std::string& rop); operator std::string() const; std::string value; diff --git a/CGMES_3.0.0/StringMeasurement.cpp b/CGMES_3.0.0/StringMeasurement.cpp index 1d25fc9cf..3bf493102 100644 --- a/CGMES_3.0.0/StringMeasurement.cpp +++ b/CGMES_3.0.0/StringMeasurement.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -StringMeasurement::StringMeasurement() {}; -StringMeasurement::~StringMeasurement() {}; +StringMeasurement::StringMeasurement() {} +StringMeasurement::~StringMeasurement() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ StringMeasurement::getPossibleProfilesForAttributes() const return map; } - - bool assign_StringMeasurementValue_StringMeasurement(BaseClass*, BaseClass*); bool assign_StringMeasurement_StringMeasurementValues(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_StringMeasurement_StringMeasurementValues(BaseClass* BaseClass_ptr1, } - const char StringMeasurement::debugName[] = "StringMeasurement"; const char* StringMeasurement::debugString() const { @@ -69,7 +66,7 @@ const char* StringMeasurement::debugString() const void StringMeasurement::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:StringMeasurement"), &StringMeasurement_factory)); + factory_map.emplace("cim:StringMeasurement", &StringMeasurement_factory); } void StringMeasurement::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void StringMeasurement::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:StringMeasurement.StringMeasurementValues"), &assign_StringMeasurement_StringMeasurementValues)); + assign_map.emplace("cim:StringMeasurement.StringMeasurementValues", &assign_StringMeasurement_StringMeasurementValues); } void StringMeasurement::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/StringMeasurement.hpp b/CGMES_3.0.0/StringMeasurement.hpp index a4e95edb8..21841ff08 100644 --- a/CGMES_3.0.0/StringMeasurement.hpp +++ b/CGMES_3.0.0/StringMeasurement.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class StringMeasurementValue; - /* - StringMeasurement represents a measurement with values of type string. - */ + /** \brief StringMeasurement represents a measurement with values of type string. */ class StringMeasurement : public Measurement { public: @@ -27,7 +25,8 @@ namespace CIMPP StringMeasurement(); ~StringMeasurement() override; - std::list StringMeasurementValues; /* The values connected to this measurement. Default: 0 */ + /** \brief The values connected to this measurement. Default: 0 */ + std::list StringMeasurementValues; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/StringMeasurementValue.cpp b/CGMES_3.0.0/StringMeasurementValue.cpp index 4f979ecf6..22ffc1115 100644 --- a/CGMES_3.0.0/StringMeasurementValue.cpp +++ b/CGMES_3.0.0/StringMeasurementValue.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -StringMeasurementValue::StringMeasurementValue() : StringMeasurement(nullptr) {}; -StringMeasurementValue::~StringMeasurementValue() {}; +StringMeasurementValue::StringMeasurementValue() : StringMeasurement(nullptr) {} +StringMeasurementValue::~StringMeasurementValue() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ StringMeasurementValue::getPossibleProfilesForAttributes() const return map; } - - bool assign_StringMeasurement_StringMeasurementValues(BaseClass*, BaseClass*); bool assign_StringMeasurementValue_StringMeasurement(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_StringMeasurementValue_StringMeasurement(BaseClass* BaseClass_ptr1, return false; } - bool get_StringMeasurementValue_StringMeasurement(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const StringMeasurementValue* element = dynamic_cast(BaseClass_ptr1)) + const StringMeasurementValue* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->StringMeasurement != 0) { @@ -73,7 +71,6 @@ bool get_StringMeasurementValue_StringMeasurement(const BaseClass* BaseClass_ptr return false; } - const char StringMeasurementValue::debugName[] = "StringMeasurementValue"; const char* StringMeasurementValue::debugString() const { @@ -82,7 +79,7 @@ const char* StringMeasurementValue::debugString() const void StringMeasurementValue::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:StringMeasurementValue"), &StringMeasurementValue_factory)); + factory_map.emplace("cim:StringMeasurementValue", &StringMeasurementValue_factory); } void StringMeasurementValue::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void StringMeasurementValue::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:StringMeasurementValue.StringMeasurement"), &assign_StringMeasurementValue_StringMeasurement)); + assign_map.emplace("cim:StringMeasurementValue.StringMeasurement", &assign_StringMeasurementValue_StringMeasurement); } void StringMeasurementValue::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/StringMeasurementValue.hpp b/CGMES_3.0.0/StringMeasurementValue.hpp index 4b143e5ba..aeb6c8ce7 100644 --- a/CGMES_3.0.0/StringMeasurementValue.hpp +++ b/CGMES_3.0.0/StringMeasurementValue.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class StringMeasurement; - /* - StringMeasurementValue represents a measurement value of type string. - */ + /** \brief StringMeasurementValue represents a measurement value of type string. */ class StringMeasurementValue : public MeasurementValue { public: @@ -27,7 +25,8 @@ namespace CIMPP StringMeasurementValue(); ~StringMeasurementValue() override; - CIMPP::StringMeasurement* StringMeasurement; /* Measurement to which this value is connected. Default: 0 */ + /** \brief Measurement to which this value is connected. Default: 0 */ + CIMPP::StringMeasurement* StringMeasurement; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/SubGeographicalRegion.cpp b/CGMES_3.0.0/SubGeographicalRegion.cpp index baea7758c..ca3ce89ad 100644 --- a/CGMES_3.0.0/SubGeographicalRegion.cpp +++ b/CGMES_3.0.0/SubGeographicalRegion.cpp @@ -9,14 +9,14 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "DCLine.hpp" -#include "Line.hpp" #include "GeographicalRegion.hpp" +#include "Line.hpp" #include "Substation.hpp" using namespace CIMPP; -SubGeographicalRegion::SubGeographicalRegion() : Region(nullptr) {}; -SubGeographicalRegion::~SubGeographicalRegion() {}; +SubGeographicalRegion::SubGeographicalRegion() : Region(nullptr) {} +SubGeographicalRegion::~SubGeographicalRegion() {} static const std::list PossibleProfilesForClass = { @@ -47,8 +47,6 @@ SubGeographicalRegion::getPossibleProfilesForAttributes() const return map; } - - bool assign_DCLine_Region(BaseClass*, BaseClass*); bool assign_SubGeographicalRegion_DCLines(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -65,6 +63,7 @@ bool assign_SubGeographicalRegion_DCLines(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_Line_Region(BaseClass*, BaseClass*); bool assign_SubGeographicalRegion_Lines(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -81,6 +80,7 @@ bool assign_SubGeographicalRegion_Lines(BaseClass* BaseClass_ptr1, BaseClass* Ba } return false; } + bool assign_GeographicalRegion_Regions(BaseClass*, BaseClass*); bool assign_SubGeographicalRegion_Region(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -97,6 +97,7 @@ bool assign_SubGeographicalRegion_Region(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_Substation_Region(BaseClass*, BaseClass*); bool assign_SubGeographicalRegion_Substations(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -115,9 +116,11 @@ bool assign_SubGeographicalRegion_Substations(BaseClass* BaseClass_ptr1, BaseCla } + bool get_SubGeographicalRegion_Region(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SubGeographicalRegion* element = dynamic_cast(BaseClass_ptr1)) + const SubGeographicalRegion* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Region != 0) { @@ -137,7 +140,7 @@ const char* SubGeographicalRegion::debugString() const void SubGeographicalRegion::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SubGeographicalRegion"), &SubGeographicalRegion_factory)); + factory_map.emplace("cim:SubGeographicalRegion", &SubGeographicalRegion_factory); } void SubGeographicalRegion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -146,10 +149,10 @@ void SubGeographicalRegion::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SubGeographicalRegion.DCLines"), &assign_SubGeographicalRegion_DCLines)); - assign_map.insert(std::make_pair(std::string("cim:SubGeographicalRegion.Lines"), &assign_SubGeographicalRegion_Lines)); - assign_map.insert(std::make_pair(std::string("cim:SubGeographicalRegion.Region"), &assign_SubGeographicalRegion_Region)); - assign_map.insert(std::make_pair(std::string("cim:SubGeographicalRegion.Substations"), &assign_SubGeographicalRegion_Substations)); + assign_map.emplace("cim:SubGeographicalRegion.DCLines", &assign_SubGeographicalRegion_DCLines); + assign_map.emplace("cim:SubGeographicalRegion.Lines", &assign_SubGeographicalRegion_Lines); + assign_map.emplace("cim:SubGeographicalRegion.Region", &assign_SubGeographicalRegion_Region); + assign_map.emplace("cim:SubGeographicalRegion.Substations", &assign_SubGeographicalRegion_Substations); } void SubGeographicalRegion::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/SubGeographicalRegion.hpp b/CGMES_3.0.0/SubGeographicalRegion.hpp index 76cf9566c..7cb925cbb 100644 --- a/CGMES_3.0.0/SubGeographicalRegion.hpp +++ b/CGMES_3.0.0/SubGeographicalRegion.hpp @@ -20,9 +20,7 @@ namespace CIMPP class Line; class Substation; - /* - A subset of a geographical region of a power system network model. - */ + /** \brief A subset of a geographical region of a power system network model. */ class SubGeographicalRegion : public IdentifiedObject { public: @@ -30,10 +28,17 @@ namespace CIMPP SubGeographicalRegion(); ~SubGeographicalRegion() override; - std::list DCLines; /* The DC lines in this sub-geographical region. Default: 0 */ - std::list Lines; /* The lines within the sub-geographical region. Default: 0 */ - CIMPP::GeographicalRegion* Region; /* The geographical region which this sub-geographical region is within. Default: 0 */ - std::list Substations; /* The substations in this sub-geographical region. Default: 0 */ + /** \brief The DC lines in this sub-geographical region. Default: 0 */ + std::list DCLines; + + /** \brief The lines within the sub-geographical region. Default: 0 */ + std::list Lines; + + /** \brief The geographical region which this sub-geographical region is within. Default: 0 */ + CIMPP::GeographicalRegion* Region; + + /** \brief The substations in this sub-geographical region. Default: 0 */ + std::list Substations; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/SubLoadArea.cpp b/CGMES_3.0.0/SubLoadArea.cpp index 6cf7e03f8..b14f7db79 100644 --- a/CGMES_3.0.0/SubLoadArea.cpp +++ b/CGMES_3.0.0/SubLoadArea.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -SubLoadArea::SubLoadArea() : LoadArea(nullptr) {}; -SubLoadArea::~SubLoadArea() {}; +SubLoadArea::SubLoadArea() : LoadArea(nullptr) {} +SubLoadArea::~SubLoadArea() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ SubLoadArea::getPossibleProfilesForAttributes() const return map; } - - bool assign_LoadArea_SubLoadAreas(BaseClass*, BaseClass*); bool assign_SubLoadArea_LoadArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_SubLoadArea_LoadArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass } return false; } + bool assign_LoadGroup_SubLoadArea(BaseClass*, BaseClass*); bool assign_SubLoadArea_LoadGroups(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_SubLoadArea_LoadGroups(BaseClass* BaseClass_ptr1, BaseClass* BaseCla return false; } - bool get_SubLoadArea_LoadArea(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SubLoadArea* element = dynamic_cast(BaseClass_ptr1)) + const SubLoadArea* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->LoadArea != 0) { @@ -100,7 +99,7 @@ const char* SubLoadArea::debugString() const void SubLoadArea::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SubLoadArea"), &SubLoadArea_factory)); + factory_map.emplace("cim:SubLoadArea", &SubLoadArea_factory); } void SubLoadArea::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -109,8 +108,8 @@ void SubLoadArea::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SubLoadArea.LoadArea"), &assign_SubLoadArea_LoadArea)); - assign_map.insert(std::make_pair(std::string("cim:SubLoadArea.LoadGroups"), &assign_SubLoadArea_LoadGroups)); + assign_map.emplace("cim:SubLoadArea.LoadArea", &assign_SubLoadArea_LoadArea); + assign_map.emplace("cim:SubLoadArea.LoadGroups", &assign_SubLoadArea_LoadGroups); } void SubLoadArea::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/SubLoadArea.hpp b/CGMES_3.0.0/SubLoadArea.hpp index 6d39dc9ee..eb2947510 100644 --- a/CGMES_3.0.0/SubLoadArea.hpp +++ b/CGMES_3.0.0/SubLoadArea.hpp @@ -18,9 +18,7 @@ namespace CIMPP class LoadArea; class LoadGroup; - /* - The class is the second level in a hierarchical structure for grouping of loads for the purpose of load flow load scaling. - */ + /** \brief The class is the second level in a hierarchical structure for grouping of loads for the purpose of load flow load scaling. */ class SubLoadArea : public EnergyArea { public: @@ -28,8 +26,11 @@ namespace CIMPP SubLoadArea(); ~SubLoadArea() override; - CIMPP::LoadArea* LoadArea; /* The LoadArea where the SubLoadArea belongs. Default: 0 */ - std::list LoadGroups; /* The Loadgroups in the SubLoadArea. Default: 0 */ + /** \brief The LoadArea where the SubLoadArea belongs. Default: 0 */ + CIMPP::LoadArea* LoadArea; + + /** \brief The Loadgroups in the SubLoadArea. Default: 0 */ + std::list LoadGroups; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Substation.cpp b/CGMES_3.0.0/Substation.cpp index c87260dc2..418a61adf 100644 --- a/CGMES_3.0.0/Substation.cpp +++ b/CGMES_3.0.0/Substation.cpp @@ -14,8 +14,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -Substation::Substation() : Region(nullptr) {}; -Substation::~Substation() {}; +Substation::Substation() : Region(nullptr) {} +Substation::~Substation() {} static const std::list PossibleProfilesForClass = { @@ -45,8 +45,6 @@ Substation::getPossibleProfilesForAttributes() const return map; } - - bool assign_DCConverterUnit_Substation(BaseClass*, BaseClass*); bool assign_Substation_DCConverterUnit(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -63,6 +61,7 @@ bool assign_Substation_DCConverterUnit(BaseClass* BaseClass_ptr1, BaseClass* Bas } return false; } + bool assign_SubGeographicalRegion_Substations(BaseClass*, BaseClass*); bool assign_Substation_Region(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -79,6 +78,7 @@ bool assign_Substation_Region(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_pt } return false; } + bool assign_VoltageLevel_Substation(BaseClass*, BaseClass*); bool assign_Substation_VoltageLevels(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -99,7 +99,8 @@ bool assign_Substation_VoltageLevels(BaseClass* BaseClass_ptr1, BaseClass* BaseC bool get_Substation_Region(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Substation* element = dynamic_cast(BaseClass_ptr1)) + const Substation* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Region != 0) { @@ -119,7 +120,7 @@ const char* Substation::debugString() const void Substation::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Substation"), &Substation_factory)); + factory_map.emplace("cim:Substation", &Substation_factory); } void Substation::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -128,9 +129,9 @@ void Substation::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Substation.DCConverterUnit"), &assign_Substation_DCConverterUnit)); - assign_map.insert(std::make_pair(std::string("cim:Substation.Region"), &assign_Substation_Region)); - assign_map.insert(std::make_pair(std::string("cim:Substation.VoltageLevels"), &assign_Substation_VoltageLevels)); + assign_map.emplace("cim:Substation.DCConverterUnit", &assign_Substation_DCConverterUnit); + assign_map.emplace("cim:Substation.Region", &assign_Substation_Region); + assign_map.emplace("cim:Substation.VoltageLevels", &assign_Substation_VoltageLevels); } void Substation::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/Substation.hpp b/CGMES_3.0.0/Substation.hpp index 109d9c265..24adc862e 100644 --- a/CGMES_3.0.0/Substation.hpp +++ b/CGMES_3.0.0/Substation.hpp @@ -19,9 +19,7 @@ namespace CIMPP class SubGeographicalRegion; class VoltageLevel; - /* - A collection of equipment for purposes other than generation or utilization, through which electric energy in bulk is passed for the purposes of switching or modifying its characteristics. - */ + /** \brief A collection of equipment for purposes other than generation or utilization, through which electric energy in bulk is passed for the purposes of switching or modifying its characteristics. */ class Substation : public EquipmentContainer { public: @@ -29,9 +27,14 @@ namespace CIMPP Substation(); ~Substation() override; - std::list DCConverterUnit; /* The DC converter unit belonging of the substation. Default: 0 */ - CIMPP::SubGeographicalRegion* Region; /* The SubGeographicalRegion containing the substation. Default: 0 */ - std::list VoltageLevels; /* The voltage levels within this substation. Default: 0 */ + /** \brief The DC converter unit belonging of the substation. Default: 0 */ + std::list DCConverterUnit; + + /** \brief The SubGeographicalRegion containing the substation. Default: 0 */ + CIMPP::SubGeographicalRegion* Region; + + /** \brief The voltage levels within this substation. Default: 0 */ + std::list VoltageLevels; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/SurgeArrester.cpp b/CGMES_3.0.0/SurgeArrester.cpp index 9a9a63573..21fbdfdf9 100644 --- a/CGMES_3.0.0/SurgeArrester.cpp +++ b/CGMES_3.0.0/SurgeArrester.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -SurgeArrester::SurgeArrester() {}; -SurgeArrester::~SurgeArrester() {}; +SurgeArrester::SurgeArrester() {} +SurgeArrester::~SurgeArrester() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ SurgeArrester::getPossibleProfilesForAttributes() const return map; } - - - - - const char SurgeArrester::debugName[] = "SurgeArrester"; const char* SurgeArrester::debugString() const { @@ -51,7 +46,7 @@ const char* SurgeArrester::debugString() const void SurgeArrester::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SurgeArrester"), &SurgeArrester_factory)); + factory_map.emplace("cim:SurgeArrester", &SurgeArrester_factory); } void SurgeArrester::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/SurgeArrester.hpp b/CGMES_3.0.0/SurgeArrester.hpp index 4b9d7e3fc..15491f8d4 100644 --- a/CGMES_3.0.0/SurgeArrester.hpp +++ b/CGMES_3.0.0/SurgeArrester.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Shunt device, installed on the network, usually in the proximity of electrical equipment in order to protect the said equipment against transient voltage transients caused by lightning or switching activity. - */ + /** \brief Shunt device, installed on the network, usually in the proximity of electrical equipment in order to protect the said equipment against transient voltage transients caused by lightning or switching activity. */ class SurgeArrester : public AuxiliaryEquipment { public: @@ -26,7 +24,6 @@ namespace CIMPP SurgeArrester(); ~SurgeArrester() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Susceptance.hpp b/CGMES_3.0.0/Susceptance.hpp index c213337b1..f98655834 100644 --- a/CGMES_3.0.0/Susceptance.hpp +++ b/CGMES_3.0.0/Susceptance.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Imaginary part of admittance. - */ + /** \brief Imaginary part of admittance. */ class Susceptance { public: diff --git a/CGMES_3.0.0/SvInjection.cpp b/CGMES_3.0.0/SvInjection.cpp index 568fdb45e..4b2198756 100644 --- a/CGMES_3.0.0/SvInjection.cpp +++ b/CGMES_3.0.0/SvInjection.cpp @@ -9,13 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "TopologicalNode.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" using namespace CIMPP; -SvInjection::SvInjection() : TopologicalNode(nullptr) {}; -SvInjection::~SvInjection() {}; +SvInjection::SvInjection() : TopologicalNode(nullptr) {} +SvInjection::~SvInjection() {} static const std::list PossibleProfilesForClass = { @@ -44,70 +42,71 @@ SvInjection::getPossibleProfilesForAttributes() const return map; } - -bool assign_SvInjection_pInjection(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologicalNode_SvInjection(BaseClass*, BaseClass*); +bool assign_SvInjection_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (SvInjection* element = dynamic_cast(BaseClass_ptr1)) + SvInjection* element = dynamic_cast(BaseClass_ptr1); + TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->pInjection; - if (buffer.fail()) - return false; - else - return true; + if (element->TopologicalNode != element2) + { + element->TopologicalNode = element2; + return assign_TopologicalNode_SvInjection(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_SvInjection_qInjection(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SvInjection_pInjection(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SvInjection* element = dynamic_cast(BaseClass_ptr1)) + SvInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->qInjection; - if (buffer.fail()) - return false; - else + buffer >> element->pInjection; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_TopologicalNode_SvInjection(BaseClass*, BaseClass*); -bool assign_SvInjection_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_SvInjection_qInjection(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { SvInjection* element = dynamic_cast(BaseClass_ptr1); - TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->TopologicalNode != element2) + buffer >> element->qInjection; + if (!buffer.fail()) { - element->TopologicalNode = element2; - return assign_TopologicalNode_SvInjection(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool get_SvInjection_pInjection(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SvInjection_TopologicalNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SvInjection* element = dynamic_cast(BaseClass_ptr1)) + const SvInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->pInjection; - if (!buffer.str().empty()) + if (element->TopologicalNode != 0) { + BaseClass_list.push_back(element->TopologicalNode); return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_SvInjection_qInjection(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SvInjection_pInjection(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SvInjection* element = dynamic_cast(BaseClass_ptr1)) + const SvInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->qInjection; + buffer << element->pInjection; if (!buffer.str().empty()) { return true; @@ -117,21 +116,21 @@ bool get_SvInjection_qInjection(const BaseClass* BaseClass_ptr1, std::stringstre return false; } - -bool get_SvInjection_TopologicalNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) +bool get_SvInjection_qInjection(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SvInjection* element = dynamic_cast(BaseClass_ptr1)) + const SvInjection* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->TopologicalNode != 0) + buffer << element->qInjection; + if (!buffer.str().empty()) { - BaseClass_list.push_back(element->TopologicalNode); return true; } } + buffer.setstate(std::ios::failbit); return false; } - const char SvInjection::debugName[] = "SvInjection"; const char* SvInjection::debugString() const { @@ -140,18 +139,18 @@ const char* SvInjection::debugString() const void SvInjection::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SvInjection"), &SvInjection_factory)); + factory_map.emplace("cim:SvInjection", &SvInjection_factory); } void SvInjection::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvInjection.pInjection"), &assign_SvInjection_pInjection)); - assign_map.insert(std::make_pair(std::string("cim:SvInjection.qInjection"), &assign_SvInjection_qInjection)); + assign_map.emplace("cim:SvInjection.pInjection", &assign_SvInjection_pInjection); + assign_map.emplace("cim:SvInjection.qInjection", &assign_SvInjection_qInjection); } void SvInjection::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvInjection.TopologicalNode"), &assign_SvInjection_TopologicalNode)); + assign_map.emplace("cim:SvInjection.TopologicalNode", &assign_SvInjection_TopologicalNode); } void SvInjection::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/SvInjection.hpp b/CGMES_3.0.0/SvInjection.hpp index 3efd35591..a5bcf625a 100644 --- a/CGMES_3.0.0/SvInjection.hpp +++ b/CGMES_3.0.0/SvInjection.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class TopologicalNode; - /* - The SvInjection reports the calculated bus injection minus the sum of the terminal flows. The terminal flow is positive out from the bus (load sign convention) and bus injection has positive flow into the bus. SvInjection may have the remainder after state estimation or slack after power flow calculation. - */ + /** \brief The SvInjection reports the calculated bus injection minus the sum of the terminal flows. The terminal flow is positive out from the bus (load sign convention) and bus injection has positive flow into the bus. SvInjection may have the remainder after state estimation or slack after power flow calculation. */ class SvInjection : public BaseClass { public: @@ -29,9 +27,14 @@ namespace CIMPP SvInjection(); ~SvInjection() override; - CIMPP::TopologicalNode* TopologicalNode; /* The topological node associated with the flow injection state variable. Default: 0 */ - CIMPP::ActivePower pInjection; /* The active power mismatch between calculated injection and initial injection. Positive sign means injection into the TopologicalNode (bus). Default: nullptr */ - CIMPP::ReactivePower qInjection; /* The reactive power mismatch between calculated injection and initial injection. Positive sign means injection into the TopologicalNode (bus). Default: nullptr */ + /** \brief The topological node associated with the flow injection state variable. Default: 0 */ + CIMPP::TopologicalNode* TopologicalNode; + + /** \brief The active power mismatch between calculated injection and initial injection. Positive sign means injection into the TopologicalNode (bus). Default: nullptr */ + CIMPP::ActivePower pInjection; + + /** \brief The reactive power mismatch between calculated injection and initial injection. Positive sign means injection into the TopologicalNode (bus). Default: nullptr */ + CIMPP::ReactivePower qInjection; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/SvPowerFlow.cpp b/CGMES_3.0.0/SvPowerFlow.cpp index c2d0e86a0..dfc4eab2e 100644 --- a/CGMES_3.0.0/SvPowerFlow.cpp +++ b/CGMES_3.0.0/SvPowerFlow.cpp @@ -9,13 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "Terminal.hpp" -#include "ActivePower.hpp" -#include "ReactivePower.hpp" using namespace CIMPP; -SvPowerFlow::SvPowerFlow() : Terminal(nullptr) {}; -SvPowerFlow::~SvPowerFlow() {}; +SvPowerFlow::SvPowerFlow() : Terminal(nullptr) {} +SvPowerFlow::~SvPowerFlow() {} static const std::list PossibleProfilesForClass = { @@ -44,70 +42,71 @@ SvPowerFlow::getPossibleProfilesForAttributes() const return map; } - -bool assign_SvPowerFlow_p(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Terminal_SvPowerFlow(BaseClass*, BaseClass*); +bool assign_SvPowerFlow_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (SvPowerFlow* element = dynamic_cast(BaseClass_ptr1)) + SvPowerFlow* element = dynamic_cast(BaseClass_ptr1); + Terminal* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->p; - if (buffer.fail()) - return false; - else - return true; + if (element->Terminal != element2) + { + element->Terminal = element2; + return assign_Terminal_SvPowerFlow(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_SvPowerFlow_q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SvPowerFlow_p(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SvPowerFlow* element = dynamic_cast(BaseClass_ptr1)) + SvPowerFlow* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->q; - if (buffer.fail()) - return false; - else + buffer >> element->p; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_Terminal_SvPowerFlow(BaseClass*, BaseClass*); -bool assign_SvPowerFlow_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_SvPowerFlow_q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { SvPowerFlow* element = dynamic_cast(BaseClass_ptr1); - Terminal* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->Terminal != element2) + buffer >> element->q; + if (!buffer.fail()) { - element->Terminal = element2; - return assign_Terminal_SvPowerFlow(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool get_SvPowerFlow_p(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SvPowerFlow_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SvPowerFlow* element = dynamic_cast(BaseClass_ptr1)) + const SvPowerFlow* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->p; - if (!buffer.str().empty()) + if (element->Terminal != 0) { + BaseClass_list.push_back(element->Terminal); return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_SvPowerFlow_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SvPowerFlow_p(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SvPowerFlow* element = dynamic_cast(BaseClass_ptr1)) + const SvPowerFlow* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->q; + buffer << element->p; if (!buffer.str().empty()) { return true; @@ -117,21 +116,21 @@ bool get_SvPowerFlow_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffe return false; } - -bool get_SvPowerFlow_Terminal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) +bool get_SvPowerFlow_q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SvPowerFlow* element = dynamic_cast(BaseClass_ptr1)) + const SvPowerFlow* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->Terminal != 0) + buffer << element->q; + if (!buffer.str().empty()) { - BaseClass_list.push_back(element->Terminal); return true; } } + buffer.setstate(std::ios::failbit); return false; } - const char SvPowerFlow::debugName[] = "SvPowerFlow"; const char* SvPowerFlow::debugString() const { @@ -140,18 +139,18 @@ const char* SvPowerFlow::debugString() const void SvPowerFlow::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SvPowerFlow"), &SvPowerFlow_factory)); + factory_map.emplace("cim:SvPowerFlow", &SvPowerFlow_factory); } void SvPowerFlow::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvPowerFlow.p"), &assign_SvPowerFlow_p)); - assign_map.insert(std::make_pair(std::string("cim:SvPowerFlow.q"), &assign_SvPowerFlow_q)); + assign_map.emplace("cim:SvPowerFlow.p", &assign_SvPowerFlow_p); + assign_map.emplace("cim:SvPowerFlow.q", &assign_SvPowerFlow_q); } void SvPowerFlow::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvPowerFlow.Terminal"), &assign_SvPowerFlow_Terminal)); + assign_map.emplace("cim:SvPowerFlow.Terminal", &assign_SvPowerFlow_Terminal); } void SvPowerFlow::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/SvPowerFlow.hpp b/CGMES_3.0.0/SvPowerFlow.hpp index b42f057c1..a27cce2a2 100644 --- a/CGMES_3.0.0/SvPowerFlow.hpp +++ b/CGMES_3.0.0/SvPowerFlow.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class Terminal; - /* - State variable for power flow. Load convention is used for flow direction. This means flow out from the TopologicalNode into the equipment is positive. - */ + /** \brief State variable for power flow. Load convention is used for flow direction. This means flow out from the TopologicalNode into the equipment is positive. */ class SvPowerFlow : public BaseClass { public: @@ -29,9 +27,14 @@ namespace CIMPP SvPowerFlow(); ~SvPowerFlow() override; - CIMPP::Terminal* Terminal; /* The terminal associated with the power flow state variable. Default: 0 */ - CIMPP::ActivePower p; /* The active power flow. Load sign convention is used, i.e. positive sign means flow out from a TopologicalNode (bus) into the conducting equipment. Default: nullptr */ - CIMPP::ReactivePower q; /* The reactive power flow. Load sign convention is used, i.e. positive sign means flow out from a TopologicalNode (bus) into the conducting equipment. Default: nullptr */ + /** \brief The terminal associated with the power flow state variable. Default: 0 */ + CIMPP::Terminal* Terminal; + + /** \brief The active power flow. Load sign convention is used, i.e. positive sign means flow out from a TopologicalNode (bus) into the conducting equipment. Default: nullptr */ + CIMPP::ActivePower p; + + /** \brief The reactive power flow. Load sign convention is used, i.e. positive sign means flow out from a TopologicalNode (bus) into the conducting equipment. Default: nullptr */ + CIMPP::ReactivePower q; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/SvShuntCompensatorSections.cpp b/CGMES_3.0.0/SvShuntCompensatorSections.cpp index f7fdb5b51..a14be0d1b 100644 --- a/CGMES_3.0.0/SvShuntCompensatorSections.cpp +++ b/CGMES_3.0.0/SvShuntCompensatorSections.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ShuntCompensator.hpp" -#include "Float.hpp" using namespace CIMPP; -SvShuntCompensatorSections::SvShuntCompensatorSections() : ShuntCompensator(nullptr) {}; -SvShuntCompensatorSections::~SvShuntCompensatorSections() {}; +SvShuntCompensatorSections::SvShuntCompensatorSections() : ShuntCompensator(nullptr) {} +SvShuntCompensatorSections::~SvShuntCompensatorSections() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ SvShuntCompensatorSections::getPossibleProfilesForAttributes() const return map; } - -bool assign_SvShuntCompensatorSections_sections(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (SvShuntCompensatorSections* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->sections; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ShuntCompensator_SvShuntCompensatorSections(BaseClass*, BaseClass*); bool assign_SvShuntCompensatorSections_ShuntCompensator(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_SvShuntCompensatorSections_ShuntCompensator(BaseClass* BaseClass_ptr return false; } -bool get_SvShuntCompensatorSections_sections(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_SvShuntCompensatorSections_sections(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const SvShuntCompensatorSections* element = dynamic_cast(BaseClass_ptr1)) + SvShuntCompensatorSections* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->sections; - if (!buffer.str().empty()) + buffer >> element->sections; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_SvShuntCompensatorSections_ShuntCompensator(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SvShuntCompensatorSections* element = dynamic_cast(BaseClass_ptr1)) + const SvShuntCompensatorSections* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ShuntCompensator != 0) { @@ -102,6 +86,20 @@ bool get_SvShuntCompensatorSections_ShuntCompensator(const BaseClass* BaseClass_ return false; } +bool get_SvShuntCompensatorSections_sections(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const SvShuntCompensatorSections* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->sections; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char SvShuntCompensatorSections::debugName[] = "SvShuntCompensatorSections"; const char* SvShuntCompensatorSections::debugString() const @@ -111,17 +109,17 @@ const char* SvShuntCompensatorSections::debugString() const void SvShuntCompensatorSections::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SvShuntCompensatorSections"), &SvShuntCompensatorSections_factory)); + factory_map.emplace("cim:SvShuntCompensatorSections", &SvShuntCompensatorSections_factory); } void SvShuntCompensatorSections::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvShuntCompensatorSections.sections"), &assign_SvShuntCompensatorSections_sections)); + assign_map.emplace("cim:SvShuntCompensatorSections.sections", &assign_SvShuntCompensatorSections_sections); } void SvShuntCompensatorSections::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvShuntCompensatorSections.ShuntCompensator"), &assign_SvShuntCompensatorSections_ShuntCompensator)); + assign_map.emplace("cim:SvShuntCompensatorSections.ShuntCompensator", &assign_SvShuntCompensatorSections_ShuntCompensator); } void SvShuntCompensatorSections::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/SvShuntCompensatorSections.hpp b/CGMES_3.0.0/SvShuntCompensatorSections.hpp index b8dc74a4a..6a7f03632 100644 --- a/CGMES_3.0.0/SvShuntCompensatorSections.hpp +++ b/CGMES_3.0.0/SvShuntCompensatorSections.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ShuntCompensator; - /* - State variable for the number of sections in service for a shunt compensator. - */ + /** \brief State variable for the number of sections in service for a shunt compensator. */ class SvShuntCompensatorSections : public BaseClass { public: @@ -28,8 +26,11 @@ namespace CIMPP SvShuntCompensatorSections(); ~SvShuntCompensatorSections() override; - CIMPP::ShuntCompensator* ShuntCompensator; /* The shunt compensator for which the state applies. Default: 0 */ - CIMPP::Float sections; /* The number of sections in service as a continuous variable. The attribute shall be a positive value or zero. To get integer value scale with ShuntCompensator.bPerSection. Default: 0.0 */ + /** \brief The shunt compensator for which the state applies. Default: 0 */ + CIMPP::ShuntCompensator* ShuntCompensator; + + /** \brief The number of sections in service as a continuous variable. The attribute shall be a positive value or zero. To get integer value scale with ShuntCompensator.bPerSection. Default: 0.0 */ + CIMPP::Float sections; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/SvStatus.cpp b/CGMES_3.0.0/SvStatus.cpp index 3ab5f6a66..17aca7359 100644 --- a/CGMES_3.0.0/SvStatus.cpp +++ b/CGMES_3.0.0/SvStatus.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ConductingEquipment.hpp" -#include "Boolean.hpp" using namespace CIMPP; -SvStatus::SvStatus() : ConductingEquipment(nullptr) {}; -SvStatus::~SvStatus() {}; +SvStatus::SvStatus() : ConductingEquipment(nullptr) {} +SvStatus::~SvStatus() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ SvStatus::getPossibleProfilesForAttributes() const return map; } - -bool assign_SvStatus_inService(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (SvStatus* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->inService; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ConductingEquipment_SvStatus(BaseClass*, BaseClass*); bool assign_SvStatus_ConductingEquipment(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_SvStatus_ConductingEquipment(BaseClass* BaseClass_ptr1, BaseClass* B return false; } -bool get_SvStatus_inService(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_SvStatus_inService(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const SvStatus* element = dynamic_cast(BaseClass_ptr1)) + SvStatus* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->inService; - if (!buffer.str().empty()) + buffer >> element->inService; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_SvStatus_ConductingEquipment(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SvStatus* element = dynamic_cast(BaseClass_ptr1)) + const SvStatus* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ConductingEquipment != 0) { @@ -102,6 +86,20 @@ bool get_SvStatus_ConductingEquipment(const BaseClass* BaseClass_ptr1, std::list return false; } +bool get_SvStatus_inService(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const SvStatus* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->inService; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char SvStatus::debugName[] = "SvStatus"; const char* SvStatus::debugString() const @@ -111,17 +109,17 @@ const char* SvStatus::debugString() const void SvStatus::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SvStatus"), &SvStatus_factory)); + factory_map.emplace("cim:SvStatus", &SvStatus_factory); } void SvStatus::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvStatus.inService"), &assign_SvStatus_inService)); + assign_map.emplace("cim:SvStatus.inService", &assign_SvStatus_inService); } void SvStatus::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvStatus.ConductingEquipment"), &assign_SvStatus_ConductingEquipment)); + assign_map.emplace("cim:SvStatus.ConductingEquipment", &assign_SvStatus_ConductingEquipment); } void SvStatus::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/SvStatus.hpp b/CGMES_3.0.0/SvStatus.hpp index 074ac3323..8848a652b 100644 --- a/CGMES_3.0.0/SvStatus.hpp +++ b/CGMES_3.0.0/SvStatus.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ConductingEquipment; - /* - State variable for status. - */ + /** \brief State variable for status. */ class SvStatus : public BaseClass { public: @@ -28,8 +26,11 @@ namespace CIMPP SvStatus(); ~SvStatus() override; - CIMPP::ConductingEquipment* ConductingEquipment; /* The conducting equipment associated with the status state variable. Default: 0 */ - CIMPP::Boolean inService; /* The in service status as a result of topology processing. It indicates if the equipment is considered as energized by the power flow. It reflects if the equipment is connected within a solvable island. It does not necessarily reflect whether or not the island was solved by the power flow. Default: false */ + /** \brief The conducting equipment associated with the status state variable. Default: 0 */ + CIMPP::ConductingEquipment* ConductingEquipment; + + /** \brief The in service status as a result of topology processing. It indicates if the equipment is considered as energized by the power flow. It reflects if the equipment is connected within a solvable island. It does not necessarily reflect whether or not the island was solved by the power flow. Default: false */ + CIMPP::Boolean inService; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/SvSwitch.cpp b/CGMES_3.0.0/SvSwitch.cpp index 16c7206ca..bf153b56c 100644 --- a/CGMES_3.0.0/SvSwitch.cpp +++ b/CGMES_3.0.0/SvSwitch.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "Switch.hpp" -#include "Boolean.hpp" using namespace CIMPP; -SvSwitch::SvSwitch() : Switch(nullptr) {}; -SvSwitch::~SvSwitch() {}; +SvSwitch::SvSwitch() : Switch(nullptr) {} +SvSwitch::~SvSwitch() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ SvSwitch::getPossibleProfilesForAttributes() const return map; } - -bool assign_SvSwitch_open(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (SvSwitch* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->open; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_Switch_SvSwitch(BaseClass*, BaseClass*); bool assign_SvSwitch_Switch(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_SvSwitch_Switch(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2 return false; } -bool get_SvSwitch_open(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_SvSwitch_open(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const SvSwitch* element = dynamic_cast(BaseClass_ptr1)) + SvSwitch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->open; - if (!buffer.str().empty()) + buffer >> element->open; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_SvSwitch_Switch(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SvSwitch* element = dynamic_cast(BaseClass_ptr1)) + const SvSwitch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Switch != 0) { @@ -102,6 +86,20 @@ bool get_SvSwitch_Switch(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->open; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char SvSwitch::debugName[] = "SvSwitch"; const char* SvSwitch::debugString() const @@ -111,17 +109,17 @@ const char* SvSwitch::debugString() const void SvSwitch::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SvSwitch"), &SvSwitch_factory)); + factory_map.emplace("cim:SvSwitch", &SvSwitch_factory); } void SvSwitch::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvSwitch.open"), &assign_SvSwitch_open)); + assign_map.emplace("cim:SvSwitch.open", &assign_SvSwitch_open); } void SvSwitch::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvSwitch.Switch"), &assign_SvSwitch_Switch)); + assign_map.emplace("cim:SvSwitch.Switch", &assign_SvSwitch_Switch); } void SvSwitch::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/SvSwitch.hpp b/CGMES_3.0.0/SvSwitch.hpp index 4737ebd5c..330076461 100644 --- a/CGMES_3.0.0/SvSwitch.hpp +++ b/CGMES_3.0.0/SvSwitch.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class Switch; - /* - State variable for switch. - */ + /** \brief State variable for switch. */ class SvSwitch : public BaseClass { public: @@ -28,8 +26,11 @@ namespace CIMPP SvSwitch(); ~SvSwitch() override; - CIMPP::Switch* Switch; /* The switch associated with the switch state. Default: 0 */ - CIMPP::Boolean open; /* The attribute tells if the computed state of the switch is considered open. Default: false */ + /** \brief The switch associated with the switch state. Default: 0 */ + CIMPP::Switch* Switch; + + /** \brief The attribute tells if the computed state of the switch is considered open. Default: false */ + CIMPP::Boolean open; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/SvTapStep.cpp b/CGMES_3.0.0/SvTapStep.cpp index 25081eaa5..717c92b1a 100644 --- a/CGMES_3.0.0/SvTapStep.cpp +++ b/CGMES_3.0.0/SvTapStep.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "TapChanger.hpp" -#include "Float.hpp" using namespace CIMPP; -SvTapStep::SvTapStep() : TapChanger(nullptr) {}; -SvTapStep::~SvTapStep() {}; +SvTapStep::SvTapStep() : TapChanger(nullptr) {} +SvTapStep::~SvTapStep() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ SvTapStep::getPossibleProfilesForAttributes() const return map; } - -bool assign_SvTapStep_position(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (SvTapStep* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->position; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_TapChanger_SvTapStep(BaseClass*, BaseClass*); bool assign_SvTapStep_TapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_SvTapStep_TapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass return false; } -bool get_SvTapStep_position(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_SvTapStep_position(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const SvTapStep* element = dynamic_cast(BaseClass_ptr1)) + SvTapStep* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->position; - if (!buffer.str().empty()) + buffer >> element->position; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_SvTapStep_TapChanger(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SvTapStep* element = dynamic_cast(BaseClass_ptr1)) + const SvTapStep* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->TapChanger != 0) { @@ -102,6 +86,20 @@ bool get_SvTapStep_TapChanger(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->position; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char SvTapStep::debugName[] = "SvTapStep"; const char* SvTapStep::debugString() const @@ -111,17 +109,17 @@ const char* SvTapStep::debugString() const void SvTapStep::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SvTapStep"), &SvTapStep_factory)); + factory_map.emplace("cim:SvTapStep", &SvTapStep_factory); } void SvTapStep::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvTapStep.position"), &assign_SvTapStep_position)); + assign_map.emplace("cim:SvTapStep.position", &assign_SvTapStep_position); } void SvTapStep::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvTapStep.TapChanger"), &assign_SvTapStep_TapChanger)); + assign_map.emplace("cim:SvTapStep.TapChanger", &assign_SvTapStep_TapChanger); } void SvTapStep::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/SvTapStep.hpp b/CGMES_3.0.0/SvTapStep.hpp index 9f12c99bc..25f83b9fa 100644 --- a/CGMES_3.0.0/SvTapStep.hpp +++ b/CGMES_3.0.0/SvTapStep.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class TapChanger; - /* - State variable for transformer tap step. - */ + /** \brief State variable for transformer tap step. */ class SvTapStep : public BaseClass { public: @@ -28,8 +26,11 @@ namespace CIMPP SvTapStep(); ~SvTapStep() override; - CIMPP::TapChanger* TapChanger; /* The tap changer associated with the tap step state. Default: 0 */ - CIMPP::Float position; /* The floating point tap position. This is not the tap ratio, but rather the tap step position as defined by the related tap changer model and normally is constrained to be within the range of minimum and maximum tap positions. Default: 0.0 */ + /** \brief The tap changer associated with the tap step state. Default: 0 */ + CIMPP::TapChanger* TapChanger; + + /** \brief The floating point tap position. This is not the tap ratio, but rather the tap step position as defined by the related tap changer model and normally is constrained to be within the range of minimum and maximum tap positions. Default: 0.0 */ + CIMPP::Float position; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/SvVoltage.cpp b/CGMES_3.0.0/SvVoltage.cpp index 9d4c2a6dd..697cd57c5 100644 --- a/CGMES_3.0.0/SvVoltage.cpp +++ b/CGMES_3.0.0/SvVoltage.cpp @@ -9,13 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "TopologicalNode.hpp" -#include "AngleDegrees.hpp" -#include "Voltage.hpp" using namespace CIMPP; -SvVoltage::SvVoltage() : TopologicalNode(nullptr) {}; -SvVoltage::~SvVoltage() {}; +SvVoltage::SvVoltage() : TopologicalNode(nullptr) {} +SvVoltage::~SvVoltage() {} static const std::list PossibleProfilesForClass = { @@ -44,70 +42,71 @@ SvVoltage::getPossibleProfilesForAttributes() const return map; } - -bool assign_SvVoltage_angle(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TopologicalNode_SvVoltage(BaseClass*, BaseClass*); +bool assign_SvVoltage_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (SvVoltage* element = dynamic_cast(BaseClass_ptr1)) + SvVoltage* element = dynamic_cast(BaseClass_ptr1); + TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->angle; - if (buffer.fail()) - return false; - else - return true; + if (element->TopologicalNode != element2) + { + element->TopologicalNode = element2; + return assign_TopologicalNode_SvVoltage(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_SvVoltage_v(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SvVoltage_angle(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SvVoltage* element = dynamic_cast(BaseClass_ptr1)) + SvVoltage* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->v; - if (buffer.fail()) - return false; - else + buffer >> element->angle; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_TopologicalNode_SvVoltage(BaseClass*, BaseClass*); -bool assign_SvVoltage_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_SvVoltage_v(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { SvVoltage* element = dynamic_cast(BaseClass_ptr1); - TopologicalNode* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->TopologicalNode != element2) + buffer >> element->v; + if (!buffer.fail()) { - element->TopologicalNode = element2; - return assign_TopologicalNode_SvVoltage(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool get_SvVoltage_angle(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SvVoltage_TopologicalNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SvVoltage* element = dynamic_cast(BaseClass_ptr1)) + const SvVoltage* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->angle; - if (!buffer.str().empty()) + if (element->TopologicalNode != 0) { + BaseClass_list.push_back(element->TopologicalNode); return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_SvVoltage_v(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SvVoltage_angle(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SvVoltage* element = dynamic_cast(BaseClass_ptr1)) + const SvVoltage* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->v; + buffer << element->angle; if (!buffer.str().empty()) { return true; @@ -117,21 +116,21 @@ bool get_SvVoltage_v(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) return false; } - -bool get_SvVoltage_TopologicalNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) +bool get_SvVoltage_v(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SvVoltage* element = dynamic_cast(BaseClass_ptr1)) + const SvVoltage* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->TopologicalNode != 0) + buffer << element->v; + if (!buffer.str().empty()) { - BaseClass_list.push_back(element->TopologicalNode); return true; } } + buffer.setstate(std::ios::failbit); return false; } - const char SvVoltage::debugName[] = "SvVoltage"; const char* SvVoltage::debugString() const { @@ -140,18 +139,18 @@ const char* SvVoltage::debugString() const void SvVoltage::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SvVoltage"), &SvVoltage_factory)); + factory_map.emplace("cim:SvVoltage", &SvVoltage_factory); } void SvVoltage::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvVoltage.angle"), &assign_SvVoltage_angle)); - assign_map.insert(std::make_pair(std::string("cim:SvVoltage.v"), &assign_SvVoltage_v)); + assign_map.emplace("cim:SvVoltage.angle", &assign_SvVoltage_angle); + assign_map.emplace("cim:SvVoltage.v", &assign_SvVoltage_v); } void SvVoltage::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SvVoltage.TopologicalNode"), &assign_SvVoltage_TopologicalNode)); + assign_map.emplace("cim:SvVoltage.TopologicalNode", &assign_SvVoltage_TopologicalNode); } void SvVoltage::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/SvVoltage.hpp b/CGMES_3.0.0/SvVoltage.hpp index 7fa0eb570..958a26086 100644 --- a/CGMES_3.0.0/SvVoltage.hpp +++ b/CGMES_3.0.0/SvVoltage.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class TopologicalNode; - /* - State variable for voltage. - */ + /** \brief State variable for voltage. */ class SvVoltage : public BaseClass { public: @@ -29,9 +27,14 @@ namespace CIMPP SvVoltage(); ~SvVoltage() override; - CIMPP::TopologicalNode* TopologicalNode; /* The topological node associated with the voltage state. Default: 0 */ - CIMPP::AngleDegrees angle; /* The voltage angle of the topological node complex voltage with respect to system reference. Default: nullptr */ - CIMPP::Voltage v; /* The voltage magnitude at the topological node. The attribute shall be a positive value. Default: nullptr */ + /** \brief The topological node associated with the voltage state. Default: 0 */ + CIMPP::TopologicalNode* TopologicalNode; + + /** \brief The voltage angle of the topological node complex voltage with respect to system reference. Default: nullptr */ + CIMPP::AngleDegrees angle; + + /** \brief The voltage magnitude at the topological node. The attribute shall be a positive value. Default: nullptr */ + CIMPP::Voltage v; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Switch.cpp b/CGMES_3.0.0/Switch.cpp index 577c31fee..28f2b683f 100644 --- a/CGMES_3.0.0/Switch.cpp +++ b/CGMES_3.0.0/Switch.cpp @@ -10,16 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "SvSwitch.hpp" #include "SwitchSchedule.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "CurrentFlow.hpp" -#include "Boolean.hpp" using namespace CIMPP; -Switch::Switch() {}; -Switch::~Switch() {}; +Switch::Switch() {} +Switch::~Switch() {} static const std::list PossibleProfilesForClass = { @@ -54,109 +49,116 @@ Switch::getPossibleProfilesForAttributes() const return map; } - -bool assign_Switch_locked(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SvSwitch_Switch(BaseClass*, BaseClass*); +bool assign_Switch_SvSwitch(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (Switch* element = dynamic_cast(BaseClass_ptr1)) + Switch* element = dynamic_cast(BaseClass_ptr1); + SvSwitch* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->locked; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->SvSwitch.begin(), element->SvSwitch.end(), element2) == element->SvSwitch.end()) + { + element->SvSwitch.push_back(element2); + return assign_SvSwitch_Switch(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_Switch_normalOpen(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SwitchSchedule_Switch(BaseClass*, BaseClass*); +bool assign_Switch_SwitchSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (Switch* element = dynamic_cast(BaseClass_ptr1)) + Switch* element = dynamic_cast(BaseClass_ptr1); + SwitchSchedule* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->normalOpen; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->SwitchSchedules.begin(), element->SwitchSchedules.end(), element2) == element->SwitchSchedules.end()) + { + element->SwitchSchedules.push_back(element2); + return assign_SwitchSchedule_Switch(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_Switch_open(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Switch_locked(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Switch* element = dynamic_cast(BaseClass_ptr1)) + Switch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->open; - if (buffer.fail()) - return false; - else + buffer >> element->locked; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Switch_ratedCurrent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Switch_normalOpen(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Switch* element = dynamic_cast(BaseClass_ptr1)) + Switch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->ratedCurrent; - if (buffer.fail()) - return false; - else + buffer >> element->normalOpen; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_Switch_retained(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_Switch_open(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (Switch* element = dynamic_cast(BaseClass_ptr1)) + Switch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->retained; - if (buffer.fail()) - return false; - else + buffer >> element->open; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_SvSwitch_Switch(BaseClass*, BaseClass*); -bool assign_Switch_SvSwitch(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_Switch_ratedCurrent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { Switch* element = dynamic_cast(BaseClass_ptr1); - SvSwitch* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->SvSwitch.begin(), element->SvSwitch.end(), element2) == element->SvSwitch.end()) + buffer >> element->ratedCurrent; + if (!buffer.fail()) { - element->SvSwitch.push_back(element2); - return assign_SvSwitch_Switch(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_SwitchSchedule_Switch(BaseClass*, BaseClass*); -bool assign_Switch_SwitchSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_Switch_retained(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { Switch* element = dynamic_cast(BaseClass_ptr1); - SwitchSchedule* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->SwitchSchedules.begin(), element->SwitchSchedules.end(), element2) == element->SwitchSchedules.end()) + buffer >> element->retained; + if (!buffer.fail()) { - element->SwitchSchedules.push_back(element2); - return assign_SwitchSchedule_Switch(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + + bool get_Switch_locked(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Switch* element = dynamic_cast(BaseClass_ptr1)) + const Switch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->locked; if (!buffer.str().empty()) @@ -170,7 +172,8 @@ bool get_Switch_locked(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_Switch_normalOpen(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Switch* element = dynamic_cast(BaseClass_ptr1)) + const Switch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->normalOpen; if (!buffer.str().empty()) @@ -184,7 +187,8 @@ bool get_Switch_normalOpen(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_Switch_open(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Switch* element = dynamic_cast(BaseClass_ptr1)) + const Switch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->open; if (!buffer.str().empty()) @@ -198,7 +202,8 @@ bool get_Switch_open(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) bool get_Switch_ratedCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Switch* element = dynamic_cast(BaseClass_ptr1)) + const Switch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratedCurrent; if (!buffer.str().empty()) @@ -212,7 +217,8 @@ bool get_Switch_ratedCurrent(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_Switch_retained(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const Switch* element = dynamic_cast(BaseClass_ptr1)) + const Switch* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->retained; if (!buffer.str().empty()) @@ -224,8 +230,6 @@ bool get_Switch_retained(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } - - const char Switch::debugName[] = "Switch"; const char* Switch::debugString() const { @@ -234,22 +238,22 @@ const char* Switch::debugString() const void Switch::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Switch"), &Switch_factory)); + factory_map.emplace("cim:Switch", &Switch_factory); } void Switch::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Switch.locked"), &assign_Switch_locked)); - assign_map.insert(std::make_pair(std::string("cim:Switch.normalOpen"), &assign_Switch_normalOpen)); - assign_map.insert(std::make_pair(std::string("cim:Switch.open"), &assign_Switch_open)); - assign_map.insert(std::make_pair(std::string("cim:Switch.ratedCurrent"), &assign_Switch_ratedCurrent)); - assign_map.insert(std::make_pair(std::string("cim:Switch.retained"), &assign_Switch_retained)); + assign_map.emplace("cim:Switch.locked", &assign_Switch_locked); + assign_map.emplace("cim:Switch.normalOpen", &assign_Switch_normalOpen); + assign_map.emplace("cim:Switch.open", &assign_Switch_open); + assign_map.emplace("cim:Switch.ratedCurrent", &assign_Switch_ratedCurrent); + assign_map.emplace("cim:Switch.retained", &assign_Switch_retained); } void Switch::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Switch.SvSwitch"), &assign_Switch_SvSwitch)); - assign_map.insert(std::make_pair(std::string("cim:Switch.SwitchSchedules"), &assign_Switch_SwitchSchedules)); + assign_map.emplace("cim:Switch.SvSwitch", &assign_Switch_SvSwitch); + assign_map.emplace("cim:Switch.SwitchSchedules", &assign_Switch_SwitchSchedules); } void Switch::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/Switch.hpp b/CGMES_3.0.0/Switch.hpp index 603668c8a..000b2cc72 100644 --- a/CGMES_3.0.0/Switch.hpp +++ b/CGMES_3.0.0/Switch.hpp @@ -20,9 +20,7 @@ namespace CIMPP class SvSwitch; class SwitchSchedule; - /* - A generic device designed to close, or open, or both, one or more electric circuits. All switches are two terminal devices including grounding switches. The ACDCTerminal.connected at the two sides of the switch shall not be considered for assessing switch connectivity, i.e. only Switch.open, .normalOpen and .locked are relevant. - */ + /** \brief A generic device designed to close, or open, or both, one or more electric circuits. All switches are two terminal devices including grounding switches. The ACDCTerminal.connected at the two sides of the switch shall not be considered for assessing switch connectivity, i.e. only Switch.open, .normalOpen and .locked are relevant. */ class Switch : public ConductingEquipment { public: @@ -30,13 +28,26 @@ namespace CIMPP Switch(); ~Switch() override; - std::list SvSwitch; /* The switch state associated with the switch. Default: 0 */ - std::list SwitchSchedules; /* A Switch can be associated with SwitchSchedules. Default: 0 */ - CIMPP::Boolean locked; /* If true, the switch is locked. The resulting switch state is a combination of locked and Switch.open attributes as follows: <ul> <li>locked=true and Switch.open=true. The resulting state is open and locked;</li> <li>locked=false and Switch.open=true. The resulting state is open;</li> <li>locked=false and Switch.open=false. The resulting state is closed.</li> </ul> Default: false */ - CIMPP::Boolean normalOpen; /* The attribute is used in cases when no Measurement for the status value is present. If the Switch has a status measurement the Discrete.normalValue is expected to match with the Switch.normalOpen. Default: false */ - CIMPP::Boolean open; /* The attribute tells if the switch is considered open when used as input to topology processing. Default: false */ - CIMPP::CurrentFlow ratedCurrent; /* The maximum continuous current carrying capacity in amps governed by the device material and construction. The attribute shall be a positive value. Default: nullptr */ - CIMPP::Boolean retained; /* Branch is retained in the topological solution. The flow through retained switches will normally be calculated in power flow. Default: false */ + /** \brief The switch state associated with the switch. Default: 0 */ + std::list SvSwitch; + + /** \brief A Switch can be associated with SwitchSchedules. Default: 0 */ + std::list SwitchSchedules; + + /** \brief If true, the switch is locked. The resulting switch state is a combination of locked and Switch.open attributes as follows: <ul> <li>locked=true and Switch.open=true. The resulting state is open and locked;</li> <li>locked=false and Switch.open=true. The resulting state is open;</li> <li>locked=false and Switch.open=false. The resulting state is closed.</li> </ul> Default: false */ + CIMPP::Boolean locked; + + /** \brief The attribute is used in cases when no Measurement for the status value is present. If the Switch has a status measurement the Discrete.normalValue is expected to match with the Switch.normalOpen. Default: false */ + CIMPP::Boolean normalOpen; + + /** \brief The attribute tells if the switch is considered open when used as input to topology processing. Default: false */ + CIMPP::Boolean open; + + /** \brief The maximum continuous current carrying capacity in amps governed by the device material and construction. The attribute shall be a positive value. Default: nullptr */ + CIMPP::CurrentFlow ratedCurrent; + + /** \brief Branch is retained in the topological solution. The flow through retained switches will normally be calculated in power flow. Default: false */ + CIMPP::Boolean retained; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/SwitchSchedule.cpp b/CGMES_3.0.0/SwitchSchedule.cpp index 01f9175cf..17357887b 100644 --- a/CGMES_3.0.0/SwitchSchedule.cpp +++ b/CGMES_3.0.0/SwitchSchedule.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -SwitchSchedule::SwitchSchedule() : Switch(nullptr) {}; -SwitchSchedule::~SwitchSchedule() {}; +SwitchSchedule::SwitchSchedule() : Switch(nullptr) {} +SwitchSchedule::~SwitchSchedule() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ SwitchSchedule::getPossibleProfilesForAttributes() const return map; } - - bool assign_Switch_SwitchSchedules(BaseClass*, BaseClass*); bool assign_SwitchSchedule_Switch(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_SwitchSchedule_Switch(BaseClass* BaseClass_ptr1, BaseClass* BaseClas return false; } - bool get_SwitchSchedule_Switch(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SwitchSchedule* element = dynamic_cast(BaseClass_ptr1)) + const SwitchSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Switch != 0) { @@ -73,7 +71,6 @@ bool get_SwitchSchedule_Switch(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SwitchSchedule"), &SwitchSchedule_factory)); + factory_map.emplace("cim:SwitchSchedule", &SwitchSchedule_factory); } void SwitchSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void SwitchSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SwitchSchedule.Switch"), &assign_SwitchSchedule_Switch)); + assign_map.emplace("cim:SwitchSchedule.Switch", &assign_SwitchSchedule_Switch); } void SwitchSchedule::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/SwitchSchedule.hpp b/CGMES_3.0.0/SwitchSchedule.hpp index d42ae0976..cca2821c4 100644 --- a/CGMES_3.0.0/SwitchSchedule.hpp +++ b/CGMES_3.0.0/SwitchSchedule.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class Switch; - /* - A schedule of switch positions. If RegularTimePoint.value1 is 0, the switch is open. If 1, the switch is closed. - */ + /** \brief A schedule of switch positions. If RegularTimePoint.value1 is 0, the switch is open. If 1, the switch is closed. */ class SwitchSchedule : public SeasonDayTypeSchedule { public: @@ -27,7 +25,8 @@ namespace CIMPP SwitchSchedule(); ~SwitchSchedule() override; - CIMPP::Switch* Switch; /* A SwitchSchedule is associated with a Switch. Default: 0 */ + /** \brief A SwitchSchedule is associated with a Switch. Default: 0 */ + CIMPP::Switch* Switch; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/SynchronousMachine.cpp b/CGMES_3.0.0/SynchronousMachine.cpp index 394df89c2..974d4b6a4 100644 --- a/CGMES_3.0.0/SynchronousMachine.cpp +++ b/CGMES_3.0.0/SynchronousMachine.cpp @@ -10,32 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "ReactiveCapabilityCurve.hpp" #include "SynchronousMachineDynamics.hpp" -#include "Boolean.hpp" -#include "Resistance.hpp" -#include "Reactance.hpp" -#include "CurrentFlow.hpp" -#include "ReactivePower.hpp" -#include "ReactivePower.hpp" -#include "Float.hpp" -#include "SynchronousMachineOperatingMode.hpp" -#include "PerCent.hpp" -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "Resistance.hpp" -#include "Integer.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ShortCircuitRotorKind.hpp" -#include "SynchronousMachineKind.hpp" -#include "PerCent.hpp" -#include "Reactance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -SynchronousMachine::SynchronousMachine() : InitialReactiveCapabilityCurve(nullptr), SynchronousMachineDynamics(nullptr) {}; -SynchronousMachine::~SynchronousMachine() {}; +SynchronousMachine::SynchronousMachine() : InitialReactiveCapabilityCurve(nullptr), SynchronousMachineDynamics(nullptr) {} +SynchronousMachine::~SynchronousMachine() {} static const std::list PossibleProfilesForClass = { @@ -87,317 +66,353 @@ SynchronousMachine::getPossibleProfilesForAttributes() const return map; } +bool assign_ReactiveCapabilityCurve_InitiallyUsedBySynchronousMachines(BaseClass*, BaseClass*); +bool assign_SynchronousMachine_InitialReactiveCapabilityCurve(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + ReactiveCapabilityCurve* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->InitialReactiveCapabilityCurve != element2) + { + element->InitialReactiveCapabilityCurve = element2; + return assign_ReactiveCapabilityCurve_InitiallyUsedBySynchronousMachines(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_SynchronousMachine_earthing(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineDynamics_SynchronousMachine(BaseClass*, BaseClass*); +bool assign_SynchronousMachine_SynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + SynchronousMachineDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->SynchronousMachineDynamics != element2) + { + element->SynchronousMachineDynamics = element2; + return assign_SynchronousMachineDynamics_SynchronousMachine(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_SynchronousMachine_earthing(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->earthing; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_earthingStarPointR(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_earthingStarPointR(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->earthingStarPointR; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_earthingStarPointX(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_earthingStarPointX(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->earthingStarPointX; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_ikk(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_ikk(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ikk; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_maxQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_maxQ(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxQ; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_minQ(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_minQ(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->minQ; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_mu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_mu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_operatingMode(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_operatingMode(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->operatingMode; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_qPercent(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_qPercent(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qPercent; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_r0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_r0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_r2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_r2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_referencePriority(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_referencePriority(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->referencePriority; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_satDirectSubtransX(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_satDirectSubtransX(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->satDirectSubtransX; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_satDirectSyncX(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_satDirectSyncX(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->satDirectSyncX; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_satDirectTransX(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_satDirectTransX(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->satDirectTransX; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_shortCircuitRotorType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_shortCircuitRotorType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->shortCircuitRotorType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_type(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_type(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->type; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_voltageRegulationRange(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_voltageRegulationRange(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->voltageRegulationRange; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachine_x0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachine_x0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x0; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_SynchronousMachine_x2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->x2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_ReactiveCapabilityCurve_InitiallyUsedBySynchronousMachines(BaseClass*, BaseClass*); -bool assign_SynchronousMachine_InitialReactiveCapabilityCurve(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_SynchronousMachine_x2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); - ReactiveCapabilityCurve* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->InitialReactiveCapabilityCurve != element2) + buffer >> element->x2; + if (!buffer.fail()) { - element->InitialReactiveCapabilityCurve = element2; - return assign_ReactiveCapabilityCurve_InitiallyUsedBySynchronousMachines(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_SynchronousMachineDynamics_SynchronousMachine(BaseClass*, BaseClass*); -bool assign_SynchronousMachine_SynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool get_SynchronousMachine_InitialReactiveCapabilityCurve(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); - SynchronousMachineDynamics* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->SynchronousMachineDynamics != element2) + if (element->InitialReactiveCapabilityCurve != 0) { - element->SynchronousMachineDynamics = element2; - return assign_SynchronousMachineDynamics_SynchronousMachine(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->InitialReactiveCapabilityCurve); + return true; } - return true; } return false; } + bool get_SynchronousMachine_earthing(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->earthing; if (!buffer.str().empty()) @@ -411,7 +426,8 @@ bool get_SynchronousMachine_earthing(const BaseClass* BaseClass_ptr1, std::strin bool get_SynchronousMachine_earthingStarPointR(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->earthingStarPointR; if (!buffer.str().empty()) @@ -425,7 +441,8 @@ bool get_SynchronousMachine_earthingStarPointR(const BaseClass* BaseClass_ptr1, bool get_SynchronousMachine_earthingStarPointX(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->earthingStarPointX; if (!buffer.str().empty()) @@ -439,7 +456,8 @@ bool get_SynchronousMachine_earthingStarPointX(const BaseClass* BaseClass_ptr1, bool get_SynchronousMachine_ikk(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ikk; if (!buffer.str().empty()) @@ -453,7 +471,8 @@ bool get_SynchronousMachine_ikk(const BaseClass* BaseClass_ptr1, std::stringstre bool get_SynchronousMachine_maxQ(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxQ; if (!buffer.str().empty()) @@ -467,7 +486,8 @@ bool get_SynchronousMachine_maxQ(const BaseClass* BaseClass_ptr1, std::stringstr bool get_SynchronousMachine_minQ(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->minQ; if (!buffer.str().empty()) @@ -481,7 +501,8 @@ bool get_SynchronousMachine_minQ(const BaseClass* BaseClass_ptr1, std::stringstr bool get_SynchronousMachine_mu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mu; if (!buffer.str().empty()) @@ -493,9 +514,25 @@ bool get_SynchronousMachine_mu(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } +bool get_SynchronousMachine_operatingMode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->operatingMode; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + bool get_SynchronousMachine_qPercent(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qPercent; if (!buffer.str().empty()) @@ -509,7 +546,8 @@ bool get_SynchronousMachine_qPercent(const BaseClass* BaseClass_ptr1, std::strin bool get_SynchronousMachine_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -523,7 +561,8 @@ bool get_SynchronousMachine_r(const BaseClass* BaseClass_ptr1, std::stringstream bool get_SynchronousMachine_r0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r0; if (!buffer.str().empty()) @@ -537,7 +576,8 @@ bool get_SynchronousMachine_r0(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_SynchronousMachine_r2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r2; if (!buffer.str().empty()) @@ -551,7 +591,8 @@ bool get_SynchronousMachine_r2(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_SynchronousMachine_referencePriority(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->referencePriority; if (!buffer.str().empty()) @@ -565,7 +606,8 @@ bool get_SynchronousMachine_referencePriority(const BaseClass* BaseClass_ptr1, s bool get_SynchronousMachine_satDirectSubtransX(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->satDirectSubtransX; if (!buffer.str().empty()) @@ -579,7 +621,8 @@ bool get_SynchronousMachine_satDirectSubtransX(const BaseClass* BaseClass_ptr1, bool get_SynchronousMachine_satDirectSyncX(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->satDirectSyncX; if (!buffer.str().empty()) @@ -593,7 +636,8 @@ bool get_SynchronousMachine_satDirectSyncX(const BaseClass* BaseClass_ptr1, std: bool get_SynchronousMachine_satDirectTransX(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->satDirectTransX; if (!buffer.str().empty()) @@ -605,25 +649,12 @@ bool get_SynchronousMachine_satDirectTransX(const BaseClass* BaseClass_ptr1, std return false; } -bool get_SynchronousMachine_voltageRegulationRange(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) -{ - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) - { - buffer << element->voltageRegulationRange; - if (!buffer.str().empty()) - { - return true; - } - } - buffer.setstate(std::ios::failbit); - return false; -} - -bool get_SynchronousMachine_x0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachine_shortCircuitRotorType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->x0; + buffer << element->shortCircuitRotorType; if (!buffer.str().empty()) { return true; @@ -633,11 +664,12 @@ bool get_SynchronousMachine_x0(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } -bool get_SynchronousMachine_x2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachine_type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->x2; + buffer << element->type; if (!buffer.str().empty()) { return true; @@ -647,26 +679,12 @@ bool get_SynchronousMachine_x2(const BaseClass* BaseClass_ptr1, std::stringstrea return false; } - -bool get_SynchronousMachine_InitialReactiveCapabilityCurve(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->InitialReactiveCapabilityCurve != 0) - { - BaseClass_list.push_back(element->InitialReactiveCapabilityCurve); - return true; - } - } - return false; -} - - -bool get_SynchronousMachine_operatingMode(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachine_voltageRegulationRange(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->operatingMode; + buffer << element->voltageRegulationRange; if (!buffer.str().empty()) { return true; @@ -676,11 +694,12 @@ bool get_SynchronousMachine_operatingMode(const BaseClass* BaseClass_ptr1, std:: return false; } -bool get_SynchronousMachine_shortCircuitRotorType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachine_x0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->shortCircuitRotorType; + buffer << element->x0; if (!buffer.str().empty()) { return true; @@ -690,11 +709,12 @@ bool get_SynchronousMachine_shortCircuitRotorType(const BaseClass* BaseClass_ptr return false; } -bool get_SynchronousMachine_type(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachine_x2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachine* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->type; + buffer << element->x2; if (!buffer.str().empty()) { return true; @@ -712,38 +732,38 @@ const char* SynchronousMachine::debugString() const void SynchronousMachine::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SynchronousMachine"), &SynchronousMachine_factory)); + factory_map.emplace("cim:SynchronousMachine", &SynchronousMachine_factory); } void SynchronousMachine::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.earthing"), &assign_SynchronousMachine_earthing)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.earthingStarPointR"), &assign_SynchronousMachine_earthingStarPointR)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.earthingStarPointX"), &assign_SynchronousMachine_earthingStarPointX)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.ikk"), &assign_SynchronousMachine_ikk)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.maxQ"), &assign_SynchronousMachine_maxQ)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.minQ"), &assign_SynchronousMachine_minQ)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.mu"), &assign_SynchronousMachine_mu)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.operatingMode"), &assign_SynchronousMachine_operatingMode)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.qPercent"), &assign_SynchronousMachine_qPercent)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.r"), &assign_SynchronousMachine_r)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.r0"), &assign_SynchronousMachine_r0)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.r2"), &assign_SynchronousMachine_r2)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.referencePriority"), &assign_SynchronousMachine_referencePriority)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.satDirectSubtransX"), &assign_SynchronousMachine_satDirectSubtransX)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.satDirectSyncX"), &assign_SynchronousMachine_satDirectSyncX)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.satDirectTransX"), &assign_SynchronousMachine_satDirectTransX)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.shortCircuitRotorType"), &assign_SynchronousMachine_shortCircuitRotorType)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.type"), &assign_SynchronousMachine_type)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.voltageRegulationRange"), &assign_SynchronousMachine_voltageRegulationRange)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.x0"), &assign_SynchronousMachine_x0)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.x2"), &assign_SynchronousMachine_x2)); + assign_map.emplace("cim:SynchronousMachine.earthing", &assign_SynchronousMachine_earthing); + assign_map.emplace("cim:SynchronousMachine.earthingStarPointR", &assign_SynchronousMachine_earthingStarPointR); + assign_map.emplace("cim:SynchronousMachine.earthingStarPointX", &assign_SynchronousMachine_earthingStarPointX); + assign_map.emplace("cim:SynchronousMachine.ikk", &assign_SynchronousMachine_ikk); + assign_map.emplace("cim:SynchronousMachine.maxQ", &assign_SynchronousMachine_maxQ); + assign_map.emplace("cim:SynchronousMachine.minQ", &assign_SynchronousMachine_minQ); + assign_map.emplace("cim:SynchronousMachine.mu", &assign_SynchronousMachine_mu); + assign_map.emplace("cim:SynchronousMachine.operatingMode", &assign_SynchronousMachine_operatingMode); + assign_map.emplace("cim:SynchronousMachine.qPercent", &assign_SynchronousMachine_qPercent); + assign_map.emplace("cim:SynchronousMachine.r", &assign_SynchronousMachine_r); + assign_map.emplace("cim:SynchronousMachine.r0", &assign_SynchronousMachine_r0); + assign_map.emplace("cim:SynchronousMachine.r2", &assign_SynchronousMachine_r2); + assign_map.emplace("cim:SynchronousMachine.referencePriority", &assign_SynchronousMachine_referencePriority); + assign_map.emplace("cim:SynchronousMachine.satDirectSubtransX", &assign_SynchronousMachine_satDirectSubtransX); + assign_map.emplace("cim:SynchronousMachine.satDirectSyncX", &assign_SynchronousMachine_satDirectSyncX); + assign_map.emplace("cim:SynchronousMachine.satDirectTransX", &assign_SynchronousMachine_satDirectTransX); + assign_map.emplace("cim:SynchronousMachine.shortCircuitRotorType", &assign_SynchronousMachine_shortCircuitRotorType); + assign_map.emplace("cim:SynchronousMachine.type", &assign_SynchronousMachine_type); + assign_map.emplace("cim:SynchronousMachine.voltageRegulationRange", &assign_SynchronousMachine_voltageRegulationRange); + assign_map.emplace("cim:SynchronousMachine.x0", &assign_SynchronousMachine_x0); + assign_map.emplace("cim:SynchronousMachine.x2", &assign_SynchronousMachine_x2); } void SynchronousMachine::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.InitialReactiveCapabilityCurve"), &assign_SynchronousMachine_InitialReactiveCapabilityCurve)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachine.SynchronousMachineDynamics"), &assign_SynchronousMachine_SynchronousMachineDynamics)); + assign_map.emplace("cim:SynchronousMachine.InitialReactiveCapabilityCurve", &assign_SynchronousMachine_InitialReactiveCapabilityCurve); + assign_map.emplace("cim:SynchronousMachine.SynchronousMachineDynamics", &assign_SynchronousMachine_SynchronousMachineDynamics); } void SynchronousMachine::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/SynchronousMachine.hpp b/CGMES_3.0.0/SynchronousMachine.hpp index 9c22c077d..c5a518ee0 100644 --- a/CGMES_3.0.0/SynchronousMachine.hpp +++ b/CGMES_3.0.0/SynchronousMachine.hpp @@ -30,9 +30,7 @@ namespace CIMPP class ReactiveCapabilityCurve; class SynchronousMachineDynamics; - /* - An electromechanical device that operates with shaft rotating synchronously with the network. It is a single machine operating either as a generator or synchronous condenser or pump. - */ + /** \brief An electromechanical device that operates with shaft rotating synchronously with the network. It is a single machine operating either as a generator or synchronous condenser or pump. */ class SynchronousMachine : public RotatingMachine { public: @@ -40,29 +38,74 @@ namespace CIMPP SynchronousMachine(); ~SynchronousMachine() override; - CIMPP::ReactiveCapabilityCurve* InitialReactiveCapabilityCurve; /* The default reactive capability curve for use by a synchronous machine. Default: 0 */ - CIMPP::SynchronousMachineDynamics* SynchronousMachineDynamics; /* Synchronous machine dynamics model used to describe dynamic behaviour of this synchronous machine. Default: 0 */ - CIMPP::Boolean earthing; /* Indicates whether or not the generator is earthed. Used for short circuit data exchange according to IEC 60909. Default: false */ - CIMPP::Resistance earthingStarPointR; /* Generator star point earthing resistance (Re). Used for short circuit data exchange according to IEC 60909. Default: nullptr */ - CIMPP::Reactance earthingStarPointX; /* Generator star point earthing reactance (Xe). Used for short circuit data exchange according to IEC 60909. Default: nullptr */ - CIMPP::CurrentFlow ikk; /* Steady-state short-circuit current (in A for the profile) of generator with compound excitation during 3-phase short circuit. - Ikk=0: Generator with no compound excitation. - Ikk&lt;&gt;0: Generator with compound excitation. Ikk is used to calculate the minimum steady-state short-circuit current for generators with compound excitation. (4.6.1.2 in IEC 60909-0:2001). Used only for single fed short circuit on a generator. (4.3.4.2. in IEC 60909-0:2001). Default: nullptr */ - CIMPP::ReactivePower maxQ; /* Maximum reactive power limit. This is the maximum (nameplate) limit for the unit. Default: nullptr */ - CIMPP::ReactivePower minQ; /* Minimum reactive power limit for the unit. Default: nullptr */ - CIMPP::Float mu; /* Factor to calculate the breaking current (Section 4.5.2.1 in IEC 60909-0). Used only for single fed short circuit on a generator (Section 4.3.4.2. in IEC 60909-0). Default: 0.0 */ - CIMPP::SynchronousMachineOperatingMode operatingMode; /* Current mode of operation. Default: 0 */ - CIMPP::PerCent qPercent; /* Part of the coordinated reactive control that comes from this machine. The attribute is used as a participation factor not necessarily summing up to 100% for the participating devices in the control. Default: nullptr */ - CIMPP::Resistance r; /* Equivalent resistance (RG) of generator. RG is considered for the calculation of all currents, except for the calculation of the peak current ip. Used for short circuit data exchange according to IEC 60909. Default: nullptr */ - CIMPP::Resistance r0; /* Zero sequence resistance of the synchronous machine. Default: nullptr */ - CIMPP::Resistance r2; /* Negative sequence resistance. Default: nullptr */ - CIMPP::Integer referencePriority; /* Priority of unit for use as powerflow voltage phase angle reference bus selection. 0 = don t care (default) 1 = highest priority. 2 is less than 1 and so on. Default: 0 */ - CIMPP::PU satDirectSubtransX; /* Direct-axis subtransient reactance saturated, also known as Xd`sat. Default: nullptr */ - CIMPP::PU satDirectSyncX; /* Direct-axes saturated synchronous reactance (xdsat); reciprocal of short-circuit ration. Used for short circuit data exchange, only for single fed short circuit on a generator. (4.3.4.2. in IEC 60909-0:2001). Default: nullptr */ - CIMPP::PU satDirectTransX; /* Saturated Direct-axis transient reactance. The attribute is primarily used for short circuit calculations according to ANSI. Default: nullptr */ - CIMPP::ShortCircuitRotorKind shortCircuitRotorType; /* Type of rotor, used by short circuit applications, only for single fed short circuit according to IEC 60909. Default: 0 */ - CIMPP::SynchronousMachineKind type; /* Modes that this synchronous machine can operate in. Default: 0 */ - CIMPP::PerCent voltageRegulationRange; /* Range of generator voltage regulation (PG in IEC 60909-0) used for calculation of the impedance correction factor KG defined in IEC 60909-0. This attribute is used to describe the operating voltage of the generating unit. Default: nullptr */ - CIMPP::Reactance x0; /* Zero sequence reactance of the synchronous machine. Default: nullptr */ - CIMPP::Reactance x2; /* Negative sequence reactance. Default: nullptr */ + /** \brief The default reactive capability curve for use by a synchronous machine. Default: 0 */ + CIMPP::ReactiveCapabilityCurve* InitialReactiveCapabilityCurve; + + /** \brief Synchronous machine dynamics model used to describe dynamic behaviour of this synchronous machine. Default: 0 */ + CIMPP::SynchronousMachineDynamics* SynchronousMachineDynamics; + + /** \brief Indicates whether or not the generator is earthed. Used for short circuit data exchange according to IEC 60909. Default: false */ + CIMPP::Boolean earthing; + + /** \brief Generator star point earthing resistance (Re). Used for short circuit data exchange according to IEC 60909. Default: nullptr */ + CIMPP::Resistance earthingStarPointR; + + /** \brief Generator star point earthing reactance (Xe). Used for short circuit data exchange according to IEC 60909. Default: nullptr */ + CIMPP::Reactance earthingStarPointX; + + /** \brief Steady-state short-circuit current (in A for the profile) of generator with compound excitation during 3-phase short circuit. - Ikk=0: Generator with no compound excitation. - Ikk&lt;&gt;0: Generator with compound excitation. Ikk is used to calculate the minimum steady-state short-circuit current for generators with compound excitation. (4.6.1.2 in IEC 60909-0:2001). Used only for single fed short circuit on a generator. (4.3.4.2. in IEC 60909-0:2001). Default: nullptr */ + CIMPP::CurrentFlow ikk; + + /** \brief Maximum reactive power limit. This is the maximum (nameplate) limit for the unit. Default: nullptr */ + CIMPP::ReactivePower maxQ; + + /** \brief Minimum reactive power limit for the unit. Default: nullptr */ + CIMPP::ReactivePower minQ; + + /** \brief Factor to calculate the breaking current (Section 4.5.2.1 in IEC 60909-0). Used only for single fed short circuit on a generator (Section 4.3.4.2. in IEC 60909-0). Default: 0.0 */ + CIMPP::Float mu; + + /** \brief Current mode of operation. Default: 0 */ + CIMPP::SynchronousMachineOperatingMode operatingMode; + + /** \brief Part of the coordinated reactive control that comes from this machine. The attribute is used as a participation factor not necessarily summing up to 100% for the participating devices in the control. Default: nullptr */ + CIMPP::PerCent qPercent; + + /** \brief Equivalent resistance (RG) of generator. RG is considered for the calculation of all currents, except for the calculation of the peak current ip. Used for short circuit data exchange according to IEC 60909. Default: nullptr */ + CIMPP::Resistance r; + + /** \brief Zero sequence resistance of the synchronous machine. Default: nullptr */ + CIMPP::Resistance r0; + + /** \brief Negative sequence resistance. Default: nullptr */ + CIMPP::Resistance r2; + + /** \brief Priority of unit for use as powerflow voltage phase angle reference bus selection. 0 = don t care (default) 1 = highest priority. 2 is less than 1 and so on. Default: 0 */ + CIMPP::Integer referencePriority; + + /** \brief Direct-axis subtransient reactance saturated, also known as Xd`sat. Default: nullptr */ + CIMPP::PU satDirectSubtransX; + + /** \brief Direct-axes saturated synchronous reactance (xdsat); reciprocal of short-circuit ration. Used for short circuit data exchange, only for single fed short circuit on a generator. (4.3.4.2. in IEC 60909-0:2001). Default: nullptr */ + CIMPP::PU satDirectSyncX; + + /** \brief Saturated Direct-axis transient reactance. The attribute is primarily used for short circuit calculations according to ANSI. Default: nullptr */ + CIMPP::PU satDirectTransX; + + /** \brief Type of rotor, used by short circuit applications, only for single fed short circuit according to IEC 60909. Default: 0 */ + CIMPP::ShortCircuitRotorKind shortCircuitRotorType; + + /** \brief Modes that this synchronous machine can operate in. Default: 0 */ + CIMPP::SynchronousMachineKind type; + + /** \brief Range of generator voltage regulation (PG in IEC 60909-0) used for calculation of the impedance correction factor KG defined in IEC 60909-0. This attribute is used to describe the operating voltage of the generating unit. Default: nullptr */ + CIMPP::PerCent voltageRegulationRange; + + /** \brief Zero sequence reactance of the synchronous machine. Default: nullptr */ + CIMPP::Reactance x0; + + /** \brief Negative sequence reactance. Default: nullptr */ + CIMPP::Reactance x2; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/SynchronousMachineDetailed.cpp b/CGMES_3.0.0/SynchronousMachineDetailed.cpp index f86cc13ed..17e8a82bc 100644 --- a/CGMES_3.0.0/SynchronousMachineDetailed.cpp +++ b/CGMES_3.0.0/SynchronousMachineDetailed.cpp @@ -8,15 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Float.hpp" -#include "IfdBaseKind.hpp" -#include "Float.hpp" -#include "Float.hpp" using namespace CIMPP; -SynchronousMachineDetailed::SynchronousMachineDetailed() {}; -SynchronousMachineDetailed::~SynchronousMachineDetailed() {}; +SynchronousMachineDetailed::SynchronousMachineDetailed() {} +SynchronousMachineDetailed::~SynchronousMachineDetailed() {} static const std::list PossibleProfilesForClass = { @@ -46,64 +42,66 @@ SynchronousMachineDetailed::getPossibleProfilesForAttributes() const return map; } - -bool assign_SynchronousMachineDetailed_efdBaseRatio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineDetailed_efdBaseRatio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->efdBaseRatio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineDetailed_ifdBaseType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineDetailed_ifdBaseType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ifdBaseType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineDetailed_saturationFactor120QAxis(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineDetailed_saturationFactor120QAxis(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->saturationFactor120QAxis; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineDetailed_saturationFactorQAxis(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineDetailed_saturationFactorQAxis(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->saturationFactorQAxis; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_SynchronousMachineDetailed_efdBaseRatio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->efdBaseRatio; if (!buffer.str().empty()) @@ -115,11 +113,12 @@ bool get_SynchronousMachineDetailed_efdBaseRatio(const BaseClass* BaseClass_ptr1 return false; } -bool get_SynchronousMachineDetailed_saturationFactor120QAxis(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineDetailed_ifdBaseType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->saturationFactor120QAxis; + buffer << element->ifdBaseType; if (!buffer.str().empty()) { return true; @@ -129,11 +128,12 @@ bool get_SynchronousMachineDetailed_saturationFactor120QAxis(const BaseClass* Ba return false; } -bool get_SynchronousMachineDetailed_saturationFactorQAxis(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineDetailed_saturationFactor120QAxis(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->saturationFactorQAxis; + buffer << element->saturationFactor120QAxis; if (!buffer.str().empty()) { return true; @@ -143,13 +143,12 @@ bool get_SynchronousMachineDetailed_saturationFactorQAxis(const BaseClass* BaseC return false; } - - -bool get_SynchronousMachineDetailed_ifdBaseType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineDetailed_saturationFactorQAxis(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineDetailed* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->ifdBaseType; + buffer << element->saturationFactorQAxis; if (!buffer.str().empty()) { return true; @@ -167,15 +166,15 @@ const char* SynchronousMachineDetailed::debugString() const void SynchronousMachineDetailed::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SynchronousMachineDetailed"), &SynchronousMachineDetailed_factory)); + factory_map.emplace("cim:SynchronousMachineDetailed", &SynchronousMachineDetailed_factory); } void SynchronousMachineDetailed::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDetailed.efdBaseRatio"), &assign_SynchronousMachineDetailed_efdBaseRatio)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDetailed.ifdBaseType"), &assign_SynchronousMachineDetailed_ifdBaseType)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDetailed.saturationFactor120QAxis"), &assign_SynchronousMachineDetailed_saturationFactor120QAxis)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDetailed.saturationFactorQAxis"), &assign_SynchronousMachineDetailed_saturationFactorQAxis)); + assign_map.emplace("cim:SynchronousMachineDetailed.efdBaseRatio", &assign_SynchronousMachineDetailed_efdBaseRatio); + assign_map.emplace("cim:SynchronousMachineDetailed.ifdBaseType", &assign_SynchronousMachineDetailed_ifdBaseType); + assign_map.emplace("cim:SynchronousMachineDetailed.saturationFactor120QAxis", &assign_SynchronousMachineDetailed_saturationFactor120QAxis); + assign_map.emplace("cim:SynchronousMachineDetailed.saturationFactorQAxis", &assign_SynchronousMachineDetailed_saturationFactorQAxis); } void SynchronousMachineDetailed::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/SynchronousMachineDetailed.hpp b/CGMES_3.0.0/SynchronousMachineDetailed.hpp index 6d7520d77..2e3a8549c 100644 --- a/CGMES_3.0.0/SynchronousMachineDetailed.hpp +++ b/CGMES_3.0.0/SynchronousMachineDetailed.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - All synchronous machine detailed types use a subset of the same data parameters and input/output variables. The several variations differ in the following ways: - the number of equivalent windings that are included; - the way in which saturation is incorporated into the model; - whether or not "subtransient saliency" (X''q not = X''d) is represented. It is not necessary for each simulation tool to have separate models for each of the model types. The same model can often be used for several types by alternative logic within the model. Also, differences in saturation representation might not result in significant model performance differences so model substitutions are often acceptable. - */ + /** \brief All synchronous machine detailed types use a subset of the same data parameters and input/output variables. The several variations differ in the following ways: - the number of equivalent windings that are included; - the way in which saturation is incorporated into the model; - whether or not "subtransient saliency" (X''q not = X''d) is represented. It is not necessary for each simulation tool to have separate models for each of the model types. The same model can often be used for several types by alternative logic within the model. Also, differences in saturation representation might not result in significant model performance differences so model substitutions are often acceptable. */ class SynchronousMachineDetailed : public SynchronousMachineDynamics { public: @@ -28,10 +26,17 @@ namespace CIMPP SynchronousMachineDetailed(); ~SynchronousMachineDetailed() override; - CIMPP::Float efdBaseRatio; /* Ratio (exciter voltage/generator voltage) of <i>Efd</i> bases of exciter and generator models (&gt; 0). Typical value = 1. Default: 0.0 */ - CIMPP::IfdBaseKind ifdBaseType; /* Excitation base system mode. It should be equal to the value of <i>WLMDV</i> given by the user. <i>WLMDV</i> is the PU ratio between the field voltage and the excitation current: <i>Efd</i> = <i>WLMDV</i> x <i>Ifd</i>. Typical value = ifag. Default: 0 */ - CIMPP::Float saturationFactor120QAxis; /* Quadrature-axis saturation factor at 120% of rated terminal voltage (<i>S12q</i>) (&gt;= SynchonousMachineDetailed.saturationFactorQAxis). Typical value = 0,12. Default: 0.0 */ - CIMPP::Float saturationFactorQAxis; /* Quadrature-axis saturation factor at rated terminal voltage (<i>S1q</i>) (&gt;= 0). Typical value = 0,02. Default: 0.0 */ + /** \brief Ratio (exciter voltage/generator voltage) of <i>Efd</i> bases of exciter and generator models (&gt; 0). Typical value = 1. Default: 0.0 */ + CIMPP::Float efdBaseRatio; + + /** \brief Excitation base system mode. It should be equal to the value of <i>WLMDV</i> given by the user. <i>WLMDV</i> is the PU ratio between the field voltage and the excitation current: <i>Efd</i> = <i>WLMDV</i> x <i>Ifd</i>. Typical value = ifag. Default: 0 */ + CIMPP::IfdBaseKind ifdBaseType; + + /** \brief Quadrature-axis saturation factor at 120% of rated terminal voltage (<i>S12q</i>) (&gt;= SynchonousMachineDetailed.saturationFactorQAxis). Typical value = 0,12. Default: 0.0 */ + CIMPP::Float saturationFactor120QAxis; + + /** \brief Quadrature-axis saturation factor at rated terminal voltage (<i>S1q</i>) (&gt;= 0). Typical value = 0,02. Default: 0.0 */ + CIMPP::Float saturationFactorQAxis; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/SynchronousMachineDynamics.cpp b/CGMES_3.0.0/SynchronousMachineDynamics.cpp index 498ef047c..9568cf4d4 100644 --- a/CGMES_3.0.0/SynchronousMachineDynamics.cpp +++ b/CGMES_3.0.0/SynchronousMachineDynamics.cpp @@ -8,7 +8,6 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "CrossCompoundTurbineGovernorDynamics.hpp" #include "CrossCompoundTurbineGovernorDynamics.hpp" #include "ExcitationSystemDynamics.hpp" #include "GenICompensationForGenJ.hpp" @@ -18,8 +17,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -SynchronousMachineDynamics::SynchronousMachineDynamics() : CrossCompoundTurbineGovernorDyanmics(nullptr), CrossCompoundTurbineGovernorDynamics(nullptr), ExcitationSystemDynamics(nullptr), MechanicalLoadDynamics(nullptr), SynchronousMachine(nullptr) {}; -SynchronousMachineDynamics::~SynchronousMachineDynamics() {}; +SynchronousMachineDynamics::SynchronousMachineDynamics() : CrossCompoundTurbineGovernorDyanmics(nullptr), CrossCompoundTurbineGovernorDynamics(nullptr), ExcitationSystemDynamics(nullptr), MechanicalLoadDynamics(nullptr), SynchronousMachine(nullptr) {} +SynchronousMachineDynamics::~SynchronousMachineDynamics() {} static const std::list PossibleProfilesForClass = { @@ -52,8 +51,6 @@ SynchronousMachineDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_CrossCompoundTurbineGovernorDynamics_HighPressureSynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_SynchronousMachineDynamics_CrossCompoundTurbineGovernorDyanmics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -70,6 +67,7 @@ bool assign_SynchronousMachineDynamics_CrossCompoundTurbineGovernorDyanmics(Base } return false; } + bool assign_CrossCompoundTurbineGovernorDynamics_LowPressureSynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_SynchronousMachineDynamics_CrossCompoundTurbineGovernorDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -86,6 +84,7 @@ bool assign_SynchronousMachineDynamics_CrossCompoundTurbineGovernorDynamics(Base } return false; } + bool assign_ExcitationSystemDynamics_SynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_SynchronousMachineDynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -102,6 +101,7 @@ bool assign_SynchronousMachineDynamics_ExcitationSystemDynamics(BaseClass* BaseC } return false; } + bool assign_GenICompensationForGenJ_SynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_SynchronousMachineDynamics_GenICompensationForGenJ(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -118,6 +118,7 @@ bool assign_SynchronousMachineDynamics_GenICompensationForGenJ(BaseClass* BaseCl } return false; } + bool assign_MechanicalLoadDynamics_SynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_SynchronousMachineDynamics_MechanicalLoadDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -134,6 +135,7 @@ bool assign_SynchronousMachineDynamics_MechanicalLoadDynamics(BaseClass* BaseCla } return false; } + bool assign_SynchronousMachine_SynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_SynchronousMachineDynamics_SynchronousMachine(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -150,6 +152,7 @@ bool assign_SynchronousMachineDynamics_SynchronousMachine(BaseClass* BaseClass_p } return false; } + bool assign_TurbineGovernorDynamics_SynchronousMachineDynamics(BaseClass*, BaseClass*); bool assign_SynchronousMachineDynamics_TurbineGovernorDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -168,9 +171,14 @@ bool assign_SynchronousMachineDynamics_TurbineGovernorDynamics(BaseClass* BaseCl } + + + + bool get_SynchronousMachineDynamics_SynchronousMachine(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const SynchronousMachineDynamics* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->SynchronousMachine != 0) { @@ -190,7 +198,7 @@ const char* SynchronousMachineDynamics::debugString() const void SynchronousMachineDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SynchronousMachineDynamics"), &SynchronousMachineDynamics_factory)); + factory_map.emplace("cim:SynchronousMachineDynamics", &SynchronousMachineDynamics_factory); } void SynchronousMachineDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -199,13 +207,13 @@ void SynchronousMachineDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDynamics.CrossCompoundTurbineGovernorDyanmics"), &assign_SynchronousMachineDynamics_CrossCompoundTurbineGovernorDyanmics)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDynamics.CrossCompoundTurbineGovernorDynamics"), &assign_SynchronousMachineDynamics_CrossCompoundTurbineGovernorDynamics)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDynamics.ExcitationSystemDynamics"), &assign_SynchronousMachineDynamics_ExcitationSystemDynamics)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDynamics.GenICompensationForGenJ"), &assign_SynchronousMachineDynamics_GenICompensationForGenJ)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDynamics.MechanicalLoadDynamics"), &assign_SynchronousMachineDynamics_MechanicalLoadDynamics)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDynamics.SynchronousMachine"), &assign_SynchronousMachineDynamics_SynchronousMachine)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineDynamics.TurbineGovernorDynamics"), &assign_SynchronousMachineDynamics_TurbineGovernorDynamics)); + assign_map.emplace("cim:SynchronousMachineDynamics.CrossCompoundTurbineGovernorDyanmics", &assign_SynchronousMachineDynamics_CrossCompoundTurbineGovernorDyanmics); + assign_map.emplace("cim:SynchronousMachineDynamics.CrossCompoundTurbineGovernorDynamics", &assign_SynchronousMachineDynamics_CrossCompoundTurbineGovernorDynamics); + assign_map.emplace("cim:SynchronousMachineDynamics.ExcitationSystemDynamics", &assign_SynchronousMachineDynamics_ExcitationSystemDynamics); + assign_map.emplace("cim:SynchronousMachineDynamics.GenICompensationForGenJ", &assign_SynchronousMachineDynamics_GenICompensationForGenJ); + assign_map.emplace("cim:SynchronousMachineDynamics.MechanicalLoadDynamics", &assign_SynchronousMachineDynamics_MechanicalLoadDynamics); + assign_map.emplace("cim:SynchronousMachineDynamics.SynchronousMachine", &assign_SynchronousMachineDynamics_SynchronousMachine); + assign_map.emplace("cim:SynchronousMachineDynamics.TurbineGovernorDynamics", &assign_SynchronousMachineDynamics_TurbineGovernorDynamics); } void SynchronousMachineDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/SynchronousMachineDynamics.hpp b/CGMES_3.0.0/SynchronousMachineDynamics.hpp index 069969f2c..5950701fb 100644 --- a/CGMES_3.0.0/SynchronousMachineDynamics.hpp +++ b/CGMES_3.0.0/SynchronousMachineDynamics.hpp @@ -22,9 +22,7 @@ namespace CIMPP class SynchronousMachine; class TurbineGovernorDynamics; - /* - Synchronous machine whose behaviour is described by reference to a standard model expressed in one of the following forms: - simplified (or classical), where a group of generators or motors is not modelled in detail; - detailed, in equivalent circuit form; - detailed, in time constant reactance form; or - by definition of a user-defined model. It is a common practice to represent small generators by a negative load rather than by a dynamic generator model when performing dynamics simulations. In this case, a SynchronousMachine in the static model is not represented by anything in the dynamics model, instead it is treated as an ordinary load. Parameter details:
  1. Synchronous machine parameters such as Xl, Xd, Xp etc. are actually used as inductances in the models, but are commonly referred to as reactances since, at nominal frequency, the PU values are the same. However, some references use the symbol L instead of X.
- */ + /** \brief Synchronous machine whose behaviour is described by reference to a standard model expressed in one of the following forms: - simplified (or classical), where a group of generators or motors is not modelled in detail; - detailed, in equivalent circuit form; - detailed, in time constant reactance form; or - by definition of a user-defined model. It is a common practice to represent small generators by a negative load rather than by a dynamic generator model when performing dynamics simulations. In this case, a SynchronousMachine in the static model is not represented by anything in the dynamics model, instead it is treated as an ordinary load. Parameter details:
  1. Synchronous machine parameters such as Xl, Xd, Xp etc. are actually used as inductances in the models, but are commonly referred to as reactances since, at nominal frequency, the PU values are the same. However, some references use the symbol L instead of X.
*/ class SynchronousMachineDynamics : public RotatingMachineDynamics { public: @@ -32,13 +30,26 @@ namespace CIMPP SynchronousMachineDynamics(); ~SynchronousMachineDynamics() override; - CIMPP::CrossCompoundTurbineGovernorDynamics* CrossCompoundTurbineGovernorDyanmics; /* The cross-compound turbine governor with which this high-pressure synchronous machine is associated. Default: 0 */ - CIMPP::CrossCompoundTurbineGovernorDynamics* CrossCompoundTurbineGovernorDynamics; /* The cross-compound turbine governor with which this low-pressure synchronous machine is associated. Default: 0 */ - CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; /* Excitation system model associated with this synchronous machine model. Default: 0 */ - std::list GenICompensationForGenJ; /* Compensation of voltage compensator`s generator for current flow out of this generator. Default: 0 */ - CIMPP::MechanicalLoadDynamics* MechanicalLoadDynamics; /* Mechanical load model associated with this synchronous machine model. Default: 0 */ - CIMPP::SynchronousMachine* SynchronousMachine; /* Synchronous machine to which synchronous machine dynamics model applies. Default: 0 */ - std::list TurbineGovernorDynamics; /* Turbine-governor model associated with this synchronous machine model. Multiplicity of greater than one is intended to support hydro units that have multiple turbines on one generator. Default: 0 */ + /** \brief The cross-compound turbine governor with which this high-pressure synchronous machine is associated. Default: 0 */ + CIMPP::CrossCompoundTurbineGovernorDynamics* CrossCompoundTurbineGovernorDyanmics; + + /** \brief The cross-compound turbine governor with which this low-pressure synchronous machine is associated. Default: 0 */ + CIMPP::CrossCompoundTurbineGovernorDynamics* CrossCompoundTurbineGovernorDynamics; + + /** \brief Excitation system model associated with this synchronous machine model. Default: 0 */ + CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; + + /** \brief Compensation of voltage compensator`s generator for current flow out of this generator. Default: 0 */ + std::list GenICompensationForGenJ; + + /** \brief Mechanical load model associated with this synchronous machine model. Default: 0 */ + CIMPP::MechanicalLoadDynamics* MechanicalLoadDynamics; + + /** \brief Synchronous machine to which synchronous machine dynamics model applies. Default: 0 */ + CIMPP::SynchronousMachine* SynchronousMachine; + + /** \brief Turbine-governor model associated with this synchronous machine model. Multiplicity of greater than one is intended to support hydro units that have multiple turbines on one generator. Default: 0 */ + std::list TurbineGovernorDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/SynchronousMachineEquivalentCircuit.cpp b/CGMES_3.0.0/SynchronousMachineEquivalentCircuit.cpp index b64fe290e..7ef58f9f7 100644 --- a/CGMES_3.0.0/SynchronousMachineEquivalentCircuit.cpp +++ b/CGMES_3.0.0/SynchronousMachineEquivalentCircuit.cpp @@ -8,22 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -SynchronousMachineEquivalentCircuit::SynchronousMachineEquivalentCircuit() {}; -SynchronousMachineEquivalentCircuit::~SynchronousMachineEquivalentCircuit() {}; +SynchronousMachineEquivalentCircuit::SynchronousMachineEquivalentCircuit() {} +SynchronousMachineEquivalentCircuit::~SynchronousMachineEquivalentCircuit() {} static const std::list PossibleProfilesForClass = { @@ -60,155 +49,164 @@ SynchronousMachineEquivalentCircuit::getPossibleProfilesForAttributes() const return map; } - -bool assign_SynchronousMachineEquivalentCircuit_r1d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_r1d(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r1d; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_r1q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_r1q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r1q; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_r2q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_r2q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r2q; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_rfd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_rfd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rfd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_x1d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_x1d(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x1d; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_x1q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_x1q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x1q; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_x2q(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_x2q(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x2q; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_xad(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_xad(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xad; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_xaq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_xaq(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xaq; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_xf1d(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_xf1d(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xf1d; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineEquivalentCircuit_xfd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineEquivalentCircuit_xfd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xfd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_SynchronousMachineEquivalentCircuit_r1d(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r1d; if (!buffer.str().empty()) @@ -222,7 +220,8 @@ bool get_SynchronousMachineEquivalentCircuit_r1d(const BaseClass* BaseClass_ptr1 bool get_SynchronousMachineEquivalentCircuit_r1q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r1q; if (!buffer.str().empty()) @@ -236,7 +235,8 @@ bool get_SynchronousMachineEquivalentCircuit_r1q(const BaseClass* BaseClass_ptr1 bool get_SynchronousMachineEquivalentCircuit_r2q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r2q; if (!buffer.str().empty()) @@ -250,7 +250,8 @@ bool get_SynchronousMachineEquivalentCircuit_r2q(const BaseClass* BaseClass_ptr1 bool get_SynchronousMachineEquivalentCircuit_rfd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rfd; if (!buffer.str().empty()) @@ -264,7 +265,8 @@ bool get_SynchronousMachineEquivalentCircuit_rfd(const BaseClass* BaseClass_ptr1 bool get_SynchronousMachineEquivalentCircuit_x1d(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x1d; if (!buffer.str().empty()) @@ -278,7 +280,8 @@ bool get_SynchronousMachineEquivalentCircuit_x1d(const BaseClass* BaseClass_ptr1 bool get_SynchronousMachineEquivalentCircuit_x1q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x1q; if (!buffer.str().empty()) @@ -292,7 +295,8 @@ bool get_SynchronousMachineEquivalentCircuit_x1q(const BaseClass* BaseClass_ptr1 bool get_SynchronousMachineEquivalentCircuit_x2q(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x2q; if (!buffer.str().empty()) @@ -306,7 +310,8 @@ bool get_SynchronousMachineEquivalentCircuit_x2q(const BaseClass* BaseClass_ptr1 bool get_SynchronousMachineEquivalentCircuit_xad(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xad; if (!buffer.str().empty()) @@ -320,7 +325,8 @@ bool get_SynchronousMachineEquivalentCircuit_xad(const BaseClass* BaseClass_ptr1 bool get_SynchronousMachineEquivalentCircuit_xaq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xaq; if (!buffer.str().empty()) @@ -334,7 +340,8 @@ bool get_SynchronousMachineEquivalentCircuit_xaq(const BaseClass* BaseClass_ptr1 bool get_SynchronousMachineEquivalentCircuit_xf1d(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xf1d; if (!buffer.str().empty()) @@ -348,7 +355,8 @@ bool get_SynchronousMachineEquivalentCircuit_xf1d(const BaseClass* BaseClass_ptr bool get_SynchronousMachineEquivalentCircuit_xfd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineEquivalentCircuit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xfd; if (!buffer.str().empty()) @@ -360,8 +368,6 @@ bool get_SynchronousMachineEquivalentCircuit_xfd(const BaseClass* BaseClass_ptr1 return false; } - - const char SynchronousMachineEquivalentCircuit::debugName[] = "SynchronousMachineEquivalentCircuit"; const char* SynchronousMachineEquivalentCircuit::debugString() const { @@ -370,22 +376,22 @@ const char* SynchronousMachineEquivalentCircuit::debugString() const void SynchronousMachineEquivalentCircuit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit"), &SynchronousMachineEquivalentCircuit_factory)); + factory_map.emplace("cim:SynchronousMachineEquivalentCircuit", &SynchronousMachineEquivalentCircuit_factory); } void SynchronousMachineEquivalentCircuit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.r1d"), &assign_SynchronousMachineEquivalentCircuit_r1d)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.r1q"), &assign_SynchronousMachineEquivalentCircuit_r1q)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.r2q"), &assign_SynchronousMachineEquivalentCircuit_r2q)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.rfd"), &assign_SynchronousMachineEquivalentCircuit_rfd)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.x1d"), &assign_SynchronousMachineEquivalentCircuit_x1d)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.x1q"), &assign_SynchronousMachineEquivalentCircuit_x1q)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.x2q"), &assign_SynchronousMachineEquivalentCircuit_x2q)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.xad"), &assign_SynchronousMachineEquivalentCircuit_xad)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.xaq"), &assign_SynchronousMachineEquivalentCircuit_xaq)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.xf1d"), &assign_SynchronousMachineEquivalentCircuit_xf1d)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineEquivalentCircuit.xfd"), &assign_SynchronousMachineEquivalentCircuit_xfd)); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.r1d", &assign_SynchronousMachineEquivalentCircuit_r1d); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.r1q", &assign_SynchronousMachineEquivalentCircuit_r1q); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.r2q", &assign_SynchronousMachineEquivalentCircuit_r2q); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.rfd", &assign_SynchronousMachineEquivalentCircuit_rfd); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.x1d", &assign_SynchronousMachineEquivalentCircuit_x1d); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.x1q", &assign_SynchronousMachineEquivalentCircuit_x1q); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.x2q", &assign_SynchronousMachineEquivalentCircuit_x2q); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.xad", &assign_SynchronousMachineEquivalentCircuit_xad); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.xaq", &assign_SynchronousMachineEquivalentCircuit_xaq); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.xf1d", &assign_SynchronousMachineEquivalentCircuit_xf1d); + assign_map.emplace("cim:SynchronousMachineEquivalentCircuit.xfd", &assign_SynchronousMachineEquivalentCircuit_xfd); } void SynchronousMachineEquivalentCircuit::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/SynchronousMachineEquivalentCircuit.hpp b/CGMES_3.0.0/SynchronousMachineEquivalentCircuit.hpp index 905cf7c2d..a6a4de217 100644 --- a/CGMES_3.0.0/SynchronousMachineEquivalentCircuit.hpp +++ b/CGMES_3.0.0/SynchronousMachineEquivalentCircuit.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The electrical equations for all variations of the synchronous models are based on the SynchronousEquivalentCircuit diagram for the direct- and quadrature- axes. Equations for conversion between equivalent circuit and time constant reactance forms: Xd = Xad + Xl X'd = Xl + Xad x Xfd / (Xad + Xfd) X"d = Xl + Xad x Xfd x X1d / (Xad x Xfd + Xad x X1d + Xfd x X1d) Xq = Xaq + Xl X'q = Xl + Xaq x X1q / (Xaq + X1q) X"q = Xl + Xaq x X1q x X2q / (Xaq x X1q + Xaq x X2q + X1q x X2q) T'do = (Xad + Xfd) / (omega0 x Rfd) T"do = (Xad x Xfd + Xad x X1d + Xfd x X1d) / (omega0 x R1d x (Xad + Xfd) T'qo = (Xaq + X1q) / (omega0 x R1q) T"qo = (Xaq x X1q + Xaq x X2q + X1q x X2q) / (omega0 x R2q x (Xaq + X1q) Same equations using CIM attributes from SynchronousMachineTimeConstantReactance class on left of "=" and SynchronousMachineEquivalentCircuit class on right (except as noted): xDirectSync = xad + RotatingMachineDynamics.statorLeakageReactance xDirectTrans = RotatingMachineDynamics.statorLeakageReactance + xad x xfd / (xad + xfd) xDirectSubtrans = RotatingMachineDynamics.statorLeakageReactance + xad x xfd x x1d / (xad x xfd + xad x x1d + xfd x x1d) xQuadSync = xaq + RotatingMachineDynamics.statorLeakageReactance xQuadTrans = RotatingMachineDynamics.statorLeakageReactance + xaq x x1q / (xaq+ x1q) xQuadSubtrans = RotatingMachineDynamics.statorLeakageReactance + xaq x x1q x x2q / (xaq x x1q + xaq x x2q + x1q x x2q) tpdo = (xad + xfd) / (2 x pi x nominal frequency x rfd) tppdo = (xad x xfd + xad x x1d + xfd x x1d) / (2 x pi x nominal frequency x r1d x (xad + xfd) tpqo = (xaq + x1q) / (2 x pi x nominal frequency x r1q) tppqo = (xaq x x1q + xaq x x2q + x1q x x2q) / (2 x pi x nominal frequency x r2q x (xaq + x1q) These are only valid for a simplified model where "Canay" reactance is zero. - */ + /** \brief The electrical equations for all variations of the synchronous models are based on the SynchronousEquivalentCircuit diagram for the direct- and quadrature- axes. Equations for conversion between equivalent circuit and time constant reactance forms: Xd = Xad + Xl X'd = Xl + Xad x Xfd / (Xad + Xfd) X"d = Xl + Xad x Xfd x X1d / (Xad x Xfd + Xad x X1d + Xfd x X1d) Xq = Xaq + Xl X'q = Xl + Xaq x X1q / (Xaq + X1q) X"q = Xl + Xaq x X1q x X2q / (Xaq x X1q + Xaq x X2q + X1q x X2q) T'do = (Xad + Xfd) / (omega0 x Rfd) T"do = (Xad x Xfd + Xad x X1d + Xfd x X1d) / (omega0 x R1d x (Xad + Xfd) T'qo = (Xaq + X1q) / (omega0 x R1q) T"qo = (Xaq x X1q + Xaq x X2q + X1q x X2q) / (omega0 x R2q x (Xaq + X1q) Same equations using CIM attributes from SynchronousMachineTimeConstantReactance class on left of "=" and SynchronousMachineEquivalentCircuit class on right (except as noted): xDirectSync = xad + RotatingMachineDynamics.statorLeakageReactance xDirectTrans = RotatingMachineDynamics.statorLeakageReactance + xad x xfd / (xad + xfd) xDirectSubtrans = RotatingMachineDynamics.statorLeakageReactance + xad x xfd x x1d / (xad x xfd + xad x x1d + xfd x x1d) xQuadSync = xaq + RotatingMachineDynamics.statorLeakageReactance xQuadTrans = RotatingMachineDynamics.statorLeakageReactance + xaq x x1q / (xaq+ x1q) xQuadSubtrans = RotatingMachineDynamics.statorLeakageReactance + xaq x x1q x x2q / (xaq x x1q + xaq x x2q + x1q x x2q) tpdo = (xad + xfd) / (2 x pi x nominal frequency x rfd) tppdo = (xad x xfd + xad x x1d + xfd x x1d) / (2 x pi x nominal frequency x r1d x (xad + xfd) tpqo = (xaq + x1q) / (2 x pi x nominal frequency x r1q) tppqo = (xaq x x1q + xaq x x2q + x1q x x2q) / (2 x pi x nominal frequency x r2q x (xaq + x1q) These are only valid for a simplified model where "Canay" reactance is zero. */ class SynchronousMachineEquivalentCircuit : public SynchronousMachineDetailed { public: @@ -27,17 +25,38 @@ namespace CIMPP SynchronousMachineEquivalentCircuit(); ~SynchronousMachineEquivalentCircuit() override; - CIMPP::PU r1d; /* Direct-axis damper 1 winding resistance. Default: nullptr */ - CIMPP::PU r1q; /* Quadrature-axis damper 1 winding resistance. Default: nullptr */ - CIMPP::PU r2q; /* Quadrature-axis damper 2 winding resistance. Default: nullptr */ - CIMPP::PU rfd; /* Field winding resistance. Default: nullptr */ - CIMPP::PU x1d; /* Direct-axis damper 1 winding leakage reactance. Default: nullptr */ - CIMPP::PU x1q; /* Quadrature-axis damper 1 winding leakage reactance. Default: nullptr */ - CIMPP::PU x2q; /* Quadrature-axis damper 2 winding leakage reactance. Default: nullptr */ - CIMPP::PU xad; /* Direct-axis mutual reactance. Default: nullptr */ - CIMPP::PU xaq; /* Quadrature-axis mutual reactance. Default: nullptr */ - CIMPP::PU xf1d; /* Differential mutual (`Canay`) reactance. Default: nullptr */ - CIMPP::PU xfd; /* Field winding leakage reactance. Default: nullptr */ + /** \brief Direct-axis damper 1 winding resistance. Default: nullptr */ + CIMPP::PU r1d; + + /** \brief Quadrature-axis damper 1 winding resistance. Default: nullptr */ + CIMPP::PU r1q; + + /** \brief Quadrature-axis damper 2 winding resistance. Default: nullptr */ + CIMPP::PU r2q; + + /** \brief Field winding resistance. Default: nullptr */ + CIMPP::PU rfd; + + /** \brief Direct-axis damper 1 winding leakage reactance. Default: nullptr */ + CIMPP::PU x1d; + + /** \brief Quadrature-axis damper 1 winding leakage reactance. Default: nullptr */ + CIMPP::PU x1q; + + /** \brief Quadrature-axis damper 2 winding leakage reactance. Default: nullptr */ + CIMPP::PU x2q; + + /** \brief Direct-axis mutual reactance. Default: nullptr */ + CIMPP::PU xad; + + /** \brief Quadrature-axis mutual reactance. Default: nullptr */ + CIMPP::PU xaq; + + /** \brief Differential mutual (`Canay`) reactance. Default: nullptr */ + CIMPP::PU xf1d; + + /** \brief Field winding leakage reactance. Default: nullptr */ + CIMPP::PU xfd; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/SynchronousMachineKind.cpp b/CGMES_3.0.0/SynchronousMachineKind.cpp index 55bd958b0..26781d9bd 100644 --- a/CGMES_3.0.0/SynchronousMachineKind.cpp +++ b/CGMES_3.0.0/SynchronousMachineKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "SynchronousMachineKind") + if (EnumSymbol.substr(0, pos) != "SynchronousMachineKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,37 +50,37 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "generator") + if (EnumSymbol == "generator") { rop = SynchronousMachineKind::generator; return lop; } - if(EnumSymbol == "condenser") + if (EnumSymbol == "condenser") { rop = SynchronousMachineKind::condenser; return lop; } - if(EnumSymbol == "generatorOrCondenser") + if (EnumSymbol == "generatorOrCondenser") { rop = SynchronousMachineKind::generatorOrCondenser; return lop; } - if(EnumSymbol == "motor") + if (EnumSymbol == "motor") { rop = SynchronousMachineKind::motor; return lop; } - if(EnumSymbol == "generatorOrMotor") + if (EnumSymbol == "generatorOrMotor") { rop = SynchronousMachineKind::generatorOrMotor; return lop; } - if(EnumSymbol == "motorOrCondenser") + if (EnumSymbol == "motorOrCondenser") { rop = SynchronousMachineKind::motorOrCondenser; return lop; } - if(EnumSymbol == "generatorOrCondenserOrMotor") + if (EnumSymbol == "generatorOrCondenserOrMotor") { rop = SynchronousMachineKind::generatorOrCondenserOrMotor; return lop; diff --git a/CGMES_3.0.0/SynchronousMachineKind.hpp b/CGMES_3.0.0/SynchronousMachineKind.hpp index 6cf0d71b2..6c94507e0 100644 --- a/CGMES_3.0.0/SynchronousMachineKind.hpp +++ b/CGMES_3.0.0/SynchronousMachineKind.hpp @@ -9,41 +9,25 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Synchronous machine type. - */ + /** \brief Synchronous machine type. */ class SynchronousMachineKind { public: enum SynchronousMachineKind_ENUM { - /** - * Indicates the synchronous machine can operate as a generator. - */ + /** Indicates the synchronous machine can operate as a generator. */ generator, - /** - * Indicates the synchronous machine can operate as a condenser. - */ + /** Indicates the synchronous machine can operate as a condenser. */ condenser, - /** - * Indicates the synchronous machine can operate as a generator or as a condenser. - */ + /** Indicates the synchronous machine can operate as a generator or as a condenser. */ generatorOrCondenser, - /** - * Indicates the synchronous machine can operate as a motor. - */ + /** Indicates the synchronous machine can operate as a motor. */ motor, - /** - * Indicates the synchronous machine can operate as a generator or as a motor. - */ + /** Indicates the synchronous machine can operate as a generator or as a motor. */ generatorOrMotor, - /** - * Indicates the synchronous machine can operate as a motor or as a condenser. - */ + /** Indicates the synchronous machine can operate as a motor or as a condenser. */ motorOrCondenser, - /** - * Indicates the synchronous machine can operate as a generator or as a condenser or as a motor. - */ + /** Indicates the synchronous machine can operate as a generator or as a condenser or as a motor. */ generatorOrCondenserOrMotor, }; diff --git a/CGMES_3.0.0/SynchronousMachineModelKind.cpp b/CGMES_3.0.0/SynchronousMachineModelKind.cpp index 10460ede1..761cee9cb 100644 --- a/CGMES_3.0.0/SynchronousMachineModelKind.cpp +++ b/CGMES_3.0.0/SynchronousMachineModelKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "SynchronousMachineModelKind") + if (EnumSymbol.substr(0, pos) != "SynchronousMachineModelKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,27 +50,27 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "subtransient") + if (EnumSymbol == "subtransient") { rop = SynchronousMachineModelKind::subtransient; return lop; } - if(EnumSymbol == "subtransientTypeF") + if (EnumSymbol == "subtransientTypeF") { rop = SynchronousMachineModelKind::subtransientTypeF; return lop; } - if(EnumSymbol == "subtransientTypeJ") + if (EnumSymbol == "subtransientTypeJ") { rop = SynchronousMachineModelKind::subtransientTypeJ; return lop; } - if(EnumSymbol == "subtransientSimplified") + if (EnumSymbol == "subtransientSimplified") { rop = SynchronousMachineModelKind::subtransientSimplified; return lop; } - if(EnumSymbol == "subtransientSimplifiedDirectAxis") + if (EnumSymbol == "subtransientSimplifiedDirectAxis") { rop = SynchronousMachineModelKind::subtransientSimplifiedDirectAxis; return lop; diff --git a/CGMES_3.0.0/SynchronousMachineModelKind.hpp b/CGMES_3.0.0/SynchronousMachineModelKind.hpp index a48d28848..9c419345f 100644 --- a/CGMES_3.0.0/SynchronousMachineModelKind.hpp +++ b/CGMES_3.0.0/SynchronousMachineModelKind.hpp @@ -9,33 +9,21 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type of synchronous machine model used in dynamic simulation applications. - */ + /** \brief Type of synchronous machine model used in dynamic simulation applications. */ class SynchronousMachineModelKind { public: enum SynchronousMachineModelKind_ENUM { - /** - * Subtransient synchronous machine model. - */ + /** Subtransient synchronous machine model. */ subtransient, - /** - * WECC type F variant of subtransient synchronous machine model. - */ + /** WECC type F variant of subtransient synchronous machine model. */ subtransientTypeF, - /** - * WECC type J variant of subtransient synchronous machine model. - */ + /** WECC type J variant of subtransient synchronous machine model. */ subtransientTypeJ, - /** - * Simplified version of subtransient synchronous machine model where magnetic coupling between the direct- and quadrature- axes is ignored. - */ + /** Simplified version of subtransient synchronous machine model where magnetic coupling between the direct- and quadrature- axes is ignored. */ subtransientSimplified, - /** - * Simplified version of a subtransient synchronous machine model with no damper circuit on the direct-axis. - */ + /** Simplified version of a subtransient synchronous machine model with no damper circuit on the direct-axis. */ subtransientSimplifiedDirectAxis, }; diff --git a/CGMES_3.0.0/SynchronousMachineOperatingMode.cpp b/CGMES_3.0.0/SynchronousMachineOperatingMode.cpp index 92b1e2cc3..bca6dbe66 100644 --- a/CGMES_3.0.0/SynchronousMachineOperatingMode.cpp +++ b/CGMES_3.0.0/SynchronousMachineOperatingMode.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "SynchronousMachineOperatingMode") + if (EnumSymbol.substr(0, pos) != "SynchronousMachineOperatingMode") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "generator") + if (EnumSymbol == "generator") { rop = SynchronousMachineOperatingMode::generator; return lop; } - if(EnumSymbol == "condenser") + if (EnumSymbol == "condenser") { rop = SynchronousMachineOperatingMode::condenser; return lop; } - if(EnumSymbol == "motor") + if (EnumSymbol == "motor") { rop = SynchronousMachineOperatingMode::motor; return lop; diff --git a/CGMES_3.0.0/SynchronousMachineOperatingMode.hpp b/CGMES_3.0.0/SynchronousMachineOperatingMode.hpp index 0be32e335..c2bac5852 100644 --- a/CGMES_3.0.0/SynchronousMachineOperatingMode.hpp +++ b/CGMES_3.0.0/SynchronousMachineOperatingMode.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Synchronous machine operating mode. - */ + /** \brief Synchronous machine operating mode. */ class SynchronousMachineOperatingMode { public: enum SynchronousMachineOperatingMode_ENUM { - /** - * Operating as generator. - */ + /** Operating as generator. */ generator, - /** - * Operating as condenser. - */ + /** Operating as condenser. */ condenser, - /** - * Operating as motor. - */ + /** Operating as motor. */ motor, }; diff --git a/CGMES_3.0.0/SynchronousMachineSimplified.cpp b/CGMES_3.0.0/SynchronousMachineSimplified.cpp index 78f5ae00d..565a93b19 100644 --- a/CGMES_3.0.0/SynchronousMachineSimplified.cpp +++ b/CGMES_3.0.0/SynchronousMachineSimplified.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -SynchronousMachineSimplified::SynchronousMachineSimplified() {}; -SynchronousMachineSimplified::~SynchronousMachineSimplified() {}; +SynchronousMachineSimplified::SynchronousMachineSimplified() {} +SynchronousMachineSimplified::~SynchronousMachineSimplified() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ SynchronousMachineSimplified::getPossibleProfilesForAttributes() const return map; } - - - - - const char SynchronousMachineSimplified::debugName[] = "SynchronousMachineSimplified"; const char* SynchronousMachineSimplified::debugString() const { @@ -51,7 +46,7 @@ const char* SynchronousMachineSimplified::debugString() const void SynchronousMachineSimplified::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SynchronousMachineSimplified"), &SynchronousMachineSimplified_factory)); + factory_map.emplace("cim:SynchronousMachineSimplified", &SynchronousMachineSimplified_factory); } void SynchronousMachineSimplified::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/SynchronousMachineSimplified.hpp b/CGMES_3.0.0/SynchronousMachineSimplified.hpp index aa21e64b7..9eed70833 100644 --- a/CGMES_3.0.0/SynchronousMachineSimplified.hpp +++ b/CGMES_3.0.0/SynchronousMachineSimplified.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The simplified model represents a synchronous generator as a constant internal voltage behind an impedance (Rs + jXp) as shown in the Simplified diagram. Since internal voltage is held constant, there is no Efd input and any excitation system model will be ignored. There is also no Ifd output. This model should not be used for representing a real generator except, perhaps, small generators whose response is insignificant. The parameters used for the simplified model include: - RotatingMachineDynamics.damping (D); - RotatingMachineDynamics.inertia (H); - RotatingMachineDynamics.statorLeakageReactance (used to exchange jXp for SynchronousMachineSimplified); - RotatingMachineDynamics.statorResistance (Rs). - */ + /** \brief The simplified model represents a synchronous generator as a constant internal voltage behind an impedance (Rs + jXp) as shown in the Simplified diagram. Since internal voltage is held constant, there is no Efd input and any excitation system model will be ignored. There is also no Ifd output. This model should not be used for representing a real generator except, perhaps, small generators whose response is insignificant. The parameters used for the simplified model include: - RotatingMachineDynamics.damping (D); - RotatingMachineDynamics.inertia (H); - RotatingMachineDynamics.statorLeakageReactance (used to exchange jXp for SynchronousMachineSimplified); - RotatingMachineDynamics.statorResistance (Rs). */ class SynchronousMachineSimplified : public SynchronousMachineDynamics { public: @@ -26,7 +24,6 @@ namespace CIMPP SynchronousMachineSimplified(); ~SynchronousMachineSimplified() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/SynchronousMachineTimeConstantReactance.cpp b/CGMES_3.0.0/SynchronousMachineTimeConstantReactance.cpp index 2972c9590..0abb79508 100644 --- a/CGMES_3.0.0/SynchronousMachineTimeConstantReactance.cpp +++ b/CGMES_3.0.0/SynchronousMachineTimeConstantReactance.cpp @@ -8,25 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Float.hpp" -#include "SynchronousMachineModelKind.hpp" -#include "RotorKind.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -SynchronousMachineTimeConstantReactance::SynchronousMachineTimeConstantReactance() {}; -SynchronousMachineTimeConstantReactance::~SynchronousMachineTimeConstantReactance() {}; +SynchronousMachineTimeConstantReactance::SynchronousMachineTimeConstantReactance() {} +SynchronousMachineTimeConstantReactance::~SynchronousMachineTimeConstantReactance() {} static const std::list PossibleProfilesForClass = { @@ -66,194 +52,206 @@ SynchronousMachineTimeConstantReactance::getPossibleProfilesForAttributes() cons return map; } - -bool assign_SynchronousMachineTimeConstantReactance_ks(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_ks(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ks; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_modelType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_modelType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->modelType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_rotorType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_rotorType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rotorType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_tc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_tc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_tpdo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_tpdo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpdo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_tppdo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_tppdo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tppdo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_tppqo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_tppqo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tppqo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_tpqo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_tpqo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpqo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_xDirectSubtrans(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_xDirectSubtrans(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xDirectSubtrans; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_xDirectSync(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_xDirectSync(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xDirectSync; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_xDirectTrans(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_xDirectTrans(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xDirectTrans; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_xQuadSubtrans(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_xQuadSubtrans(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xQuadSubtrans; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_xQuadSync(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_xQuadSync(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xQuadSync; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_SynchronousMachineTimeConstantReactance_xQuadTrans(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_SynchronousMachineTimeConstantReactance_xQuadTrans(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xQuadTrans; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_SynchronousMachineTimeConstantReactance_ks(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ks; if (!buffer.str().empty()) @@ -265,11 +263,12 @@ bool get_SynchronousMachineTimeConstantReactance_ks(const BaseClass* BaseClass_p return false; } -bool get_SynchronousMachineTimeConstantReactance_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_modelType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tc; + buffer << element->modelType; if (!buffer.str().empty()) { return true; @@ -279,11 +278,12 @@ bool get_SynchronousMachineTimeConstantReactance_tc(const BaseClass* BaseClass_p return false; } -bool get_SynchronousMachineTimeConstantReactance_tpdo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_rotorType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tpdo; + buffer << element->rotorType; if (!buffer.str().empty()) { return true; @@ -293,11 +293,12 @@ bool get_SynchronousMachineTimeConstantReactance_tpdo(const BaseClass* BaseClass return false; } -bool get_SynchronousMachineTimeConstantReactance_tppdo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_tc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tppdo; + buffer << element->tc; if (!buffer.str().empty()) { return true; @@ -307,11 +308,12 @@ bool get_SynchronousMachineTimeConstantReactance_tppdo(const BaseClass* BaseClas return false; } -bool get_SynchronousMachineTimeConstantReactance_tppqo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_tpdo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tppqo; + buffer << element->tpdo; if (!buffer.str().empty()) { return true; @@ -321,11 +323,12 @@ bool get_SynchronousMachineTimeConstantReactance_tppqo(const BaseClass* BaseClas return false; } -bool get_SynchronousMachineTimeConstantReactance_tpqo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_tppdo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->tpqo; + buffer << element->tppdo; if (!buffer.str().empty()) { return true; @@ -335,11 +338,12 @@ bool get_SynchronousMachineTimeConstantReactance_tpqo(const BaseClass* BaseClass return false; } -bool get_SynchronousMachineTimeConstantReactance_xDirectSubtrans(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_tppqo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xDirectSubtrans; + buffer << element->tppqo; if (!buffer.str().empty()) { return true; @@ -349,11 +353,12 @@ bool get_SynchronousMachineTimeConstantReactance_xDirectSubtrans(const BaseClass return false; } -bool get_SynchronousMachineTimeConstantReactance_xDirectSync(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_tpqo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xDirectSync; + buffer << element->tpqo; if (!buffer.str().empty()) { return true; @@ -363,11 +368,12 @@ bool get_SynchronousMachineTimeConstantReactance_xDirectSync(const BaseClass* Ba return false; } -bool get_SynchronousMachineTimeConstantReactance_xDirectTrans(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_xDirectSubtrans(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xDirectTrans; + buffer << element->xDirectSubtrans; if (!buffer.str().empty()) { return true; @@ -377,11 +383,12 @@ bool get_SynchronousMachineTimeConstantReactance_xDirectTrans(const BaseClass* B return false; } -bool get_SynchronousMachineTimeConstantReactance_xQuadSubtrans(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_xDirectSync(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xQuadSubtrans; + buffer << element->xDirectSync; if (!buffer.str().empty()) { return true; @@ -391,11 +398,12 @@ bool get_SynchronousMachineTimeConstantReactance_xQuadSubtrans(const BaseClass* return false; } -bool get_SynchronousMachineTimeConstantReactance_xQuadSync(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_xDirectTrans(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xQuadSync; + buffer << element->xDirectTrans; if (!buffer.str().empty()) { return true; @@ -405,11 +413,12 @@ bool get_SynchronousMachineTimeConstantReactance_xQuadSync(const BaseClass* Base return false; } -bool get_SynchronousMachineTimeConstantReactance_xQuadTrans(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_xQuadSubtrans(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xQuadTrans; + buffer << element->xQuadSubtrans; if (!buffer.str().empty()) { return true; @@ -419,13 +428,12 @@ bool get_SynchronousMachineTimeConstantReactance_xQuadTrans(const BaseClass* Bas return false; } - - -bool get_SynchronousMachineTimeConstantReactance_modelType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_xQuadSync(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->modelType; + buffer << element->xQuadSync; if (!buffer.str().empty()) { return true; @@ -435,11 +443,12 @@ bool get_SynchronousMachineTimeConstantReactance_modelType(const BaseClass* Base return false; } -bool get_SynchronousMachineTimeConstantReactance_rotorType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_SynchronousMachineTimeConstantReactance_xQuadTrans(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineTimeConstantReactance* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->rotorType; + buffer << element->xQuadTrans; if (!buffer.str().empty()) { return true; @@ -457,25 +466,25 @@ const char* SynchronousMachineTimeConstantReactance::debugString() const void SynchronousMachineTimeConstantReactance::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance"), &SynchronousMachineTimeConstantReactance_factory)); + factory_map.emplace("cim:SynchronousMachineTimeConstantReactance", &SynchronousMachineTimeConstantReactance_factory); } void SynchronousMachineTimeConstantReactance::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.ks"), &assign_SynchronousMachineTimeConstantReactance_ks)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.modelType"), &assign_SynchronousMachineTimeConstantReactance_modelType)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.rotorType"), &assign_SynchronousMachineTimeConstantReactance_rotorType)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.tc"), &assign_SynchronousMachineTimeConstantReactance_tc)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.tpdo"), &assign_SynchronousMachineTimeConstantReactance_tpdo)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.tppdo"), &assign_SynchronousMachineTimeConstantReactance_tppdo)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.tppqo"), &assign_SynchronousMachineTimeConstantReactance_tppqo)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.tpqo"), &assign_SynchronousMachineTimeConstantReactance_tpqo)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.xDirectSubtrans"), &assign_SynchronousMachineTimeConstantReactance_xDirectSubtrans)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.xDirectSync"), &assign_SynchronousMachineTimeConstantReactance_xDirectSync)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.xDirectTrans"), &assign_SynchronousMachineTimeConstantReactance_xDirectTrans)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.xQuadSubtrans"), &assign_SynchronousMachineTimeConstantReactance_xQuadSubtrans)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.xQuadSync"), &assign_SynchronousMachineTimeConstantReactance_xQuadSync)); - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineTimeConstantReactance.xQuadTrans"), &assign_SynchronousMachineTimeConstantReactance_xQuadTrans)); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.ks", &assign_SynchronousMachineTimeConstantReactance_ks); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.modelType", &assign_SynchronousMachineTimeConstantReactance_modelType); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.rotorType", &assign_SynchronousMachineTimeConstantReactance_rotorType); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.tc", &assign_SynchronousMachineTimeConstantReactance_tc); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.tpdo", &assign_SynchronousMachineTimeConstantReactance_tpdo); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.tppdo", &assign_SynchronousMachineTimeConstantReactance_tppdo); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.tppqo", &assign_SynchronousMachineTimeConstantReactance_tppqo); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.tpqo", &assign_SynchronousMachineTimeConstantReactance_tpqo); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.xDirectSubtrans", &assign_SynchronousMachineTimeConstantReactance_xDirectSubtrans); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.xDirectSync", &assign_SynchronousMachineTimeConstantReactance_xDirectSync); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.xDirectTrans", &assign_SynchronousMachineTimeConstantReactance_xDirectTrans); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.xQuadSubtrans", &assign_SynchronousMachineTimeConstantReactance_xQuadSubtrans); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.xQuadSync", &assign_SynchronousMachineTimeConstantReactance_xQuadSync); + assign_map.emplace("cim:SynchronousMachineTimeConstantReactance.xQuadTrans", &assign_SynchronousMachineTimeConstantReactance_xQuadTrans); } void SynchronousMachineTimeConstantReactance::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/SynchronousMachineTimeConstantReactance.hpp b/CGMES_3.0.0/SynchronousMachineTimeConstantReactance.hpp index 59b19e997..500d57bdd 100644 --- a/CGMES_3.0.0/SynchronousMachineTimeConstantReactance.hpp +++ b/CGMES_3.0.0/SynchronousMachineTimeConstantReactance.hpp @@ -21,9 +21,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Synchronous machine detailed modelling types are defined by the combination of the attributes SynchronousMachineTimeConstantReactance.modelType and SynchronousMachineTimeConstantReactance.rotorType. Parameter details:
  1. The "p" in the time-related attribute names is a substitution for a "prime" in the usual parameter notation, e.g. tpdo refers to T'do.
  2. The parameters used for models expressed in time constant reactance form include:
- RotatingMachine.ratedS (MVAbase); - RotatingMachineDynamics.damping (D); - RotatingMachineDynamics.inertia (H); - RotatingMachineDynamics.saturationFactor (S1); - RotatingMachineDynamics.saturationFactor120 (S12); - RotatingMachineDynamics.statorLeakageReactance (Xl); - RotatingMachineDynamics.statorResistance (Rs); - SynchronousMachineTimeConstantReactance.ks (Ks); - SynchronousMachineDetailed.saturationFactorQAxis (S1q); - SynchronousMachineDetailed.saturationFactor120QAxis (S12q); - SynchronousMachineDetailed.efdBaseRatio; - SynchronousMachineDetailed.ifdBaseType; - .xDirectSync (Xd); - .xDirectTrans (X'd); - .xDirectSubtrans (X''d); - .xQuadSync (Xq); - .xQuadTrans (X'q); - .xQuadSubtrans (X''q); - .tpdo (T'do); - .tppdo (T''do); - .tpqo (T'qo); - .tppqo (T''qo); - .tc. - */ + /** \brief Synchronous machine detailed modelling types are defined by the combination of the attributes SynchronousMachineTimeConstantReactance.modelType and SynchronousMachineTimeConstantReactance.rotorType. Parameter details:
  1. The "p" in the time-related attribute names is a substitution for a "prime" in the usual parameter notation, e.g. tpdo refers to T'do.
  2. The parameters used for models expressed in time constant reactance form include:
- RotatingMachine.ratedS (MVAbase); - RotatingMachineDynamics.damping (D); - RotatingMachineDynamics.inertia (H); - RotatingMachineDynamics.saturationFactor (S1); - RotatingMachineDynamics.saturationFactor120 (S12); - RotatingMachineDynamics.statorLeakageReactance (Xl); - RotatingMachineDynamics.statorResistance (Rs); - SynchronousMachineTimeConstantReactance.ks (Ks); - SynchronousMachineDetailed.saturationFactorQAxis (S1q); - SynchronousMachineDetailed.saturationFactor120QAxis (S12q); - SynchronousMachineDetailed.efdBaseRatio; - SynchronousMachineDetailed.ifdBaseType; - .xDirectSync (Xd); - .xDirectTrans (X'd); - .xDirectSubtrans (X''d); - .xQuadSync (Xq); - .xQuadTrans (X'q); - .xQuadSubtrans (X''q); - .tpdo (T'do); - .tppdo (T''do); - .tpqo (T'qo); - .tppqo (T''qo); - .tc. */ class SynchronousMachineTimeConstantReactance : public SynchronousMachineDetailed { public: @@ -31,20 +29,47 @@ namespace CIMPP SynchronousMachineTimeConstantReactance(); ~SynchronousMachineTimeConstantReactance() override; - CIMPP::Float ks; /* Saturation loading correction factor (<i>Ks</i>) (&gt;= 0). Used only by type J model. Typical value = 0. Default: 0.0 */ - CIMPP::SynchronousMachineModelKind modelType; /* Type of synchronous machine model used in dynamic simulation applications. Default: 0 */ - CIMPP::RotorKind rotorType; /* Type of rotor on physical machine. Default: 0 */ - CIMPP::Seconds tc; /* Damping time constant for `Canay` reactance (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tpdo; /* Direct-axis transient rotor time constant (<i>T`do</i>) (&gt; SynchronousMachineTimeConstantReactance.tppdo). Typical value = 5. Default: nullptr */ - CIMPP::Seconds tppdo; /* Direct-axis subtransient rotor time constant (<i>T``do</i>) (&gt; 0). Typical value = 0,03. Default: nullptr */ - CIMPP::Seconds tppqo; /* Quadrature-axis subtransient rotor time constant (<i>T``qo</i>) (&gt; 0). Typical value = 0,03. Default: nullptr */ - CIMPP::Seconds tpqo; /* Quadrature-axis transient rotor time constant (<i>T`qo</i>) (&gt; SynchronousMachineTimeConstantReactance.tppqo). Typical value = 0,5. Default: nullptr */ - CIMPP::PU xDirectSubtrans; /* Direct-axis subtransient reactance (unsaturated) (<i>X``d</i>) (&gt; RotatingMachineDynamics.statorLeakageReactance). Typical value = 0,2. Default: nullptr */ - CIMPP::PU xDirectSync; /* Direct-axis synchronous reactance (<i>Xd</i>) (&gt;= SynchronousMachineTimeConstantReactance.xDirectTrans). The quotient of a sustained value of that AC component of armature voltage that is produced by the total direct-axis flux due to direct-axis armature current and the value of the AC component of this current, the machine running at rated speed. Typical value = 1,8. Default: nullptr */ - CIMPP::PU xDirectTrans; /* Direct-axis transient reactance (unsaturated) (<i>X`d</i>) (&gt;= SynchronousMachineTimeConstantReactance.xDirectSubtrans). Typical value = 0,5. Default: nullptr */ - CIMPP::PU xQuadSubtrans; /* Quadrature-axis subtransient reactance (<i>X``q</i>) (&gt; RotatingMachineDynamics.statorLeakageReactance). Typical value = 0,2. Default: nullptr */ - CIMPP::PU xQuadSync; /* Quadrature-axis synchronous reactance (<i>Xq</i>) (&gt;= SynchronousMachineTimeConstantReactance.xQuadTrans). The ratio of the component of reactive armature voltage, due to the quadrature-axis component of armature current, to this component of current, under steady state conditions and at rated frequency. Typical value = 1,6. Default: nullptr */ - CIMPP::PU xQuadTrans; /* Quadrature-axis transient reactance (<i>X`q</i>) (&gt;= SynchronousMachineTimeConstantReactance.xQuadSubtrans). Typical value = 0,3. Default: nullptr */ + /** \brief Saturation loading correction factor (<i>Ks</i>) (&gt;= 0). Used only by type J model. Typical value = 0. Default: 0.0 */ + CIMPP::Float ks; + + /** \brief Type of synchronous machine model used in dynamic simulation applications. Default: 0 */ + CIMPP::SynchronousMachineModelKind modelType; + + /** \brief Type of rotor on physical machine. Default: 0 */ + CIMPP::RotorKind rotorType; + + /** \brief Damping time constant for `Canay` reactance (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tc; + + /** \brief Direct-axis transient rotor time constant (<i>T`do</i>) (&gt; SynchronousMachineTimeConstantReactance.tppdo). Typical value = 5. Default: nullptr */ + CIMPP::Seconds tpdo; + + /** \brief Direct-axis subtransient rotor time constant (<i>T``do</i>) (&gt; 0). Typical value = 0,03. Default: nullptr */ + CIMPP::Seconds tppdo; + + /** \brief Quadrature-axis subtransient rotor time constant (<i>T``qo</i>) (&gt; 0). Typical value = 0,03. Default: nullptr */ + CIMPP::Seconds tppqo; + + /** \brief Quadrature-axis transient rotor time constant (<i>T`qo</i>) (&gt; SynchronousMachineTimeConstantReactance.tppqo). Typical value = 0,5. Default: nullptr */ + CIMPP::Seconds tpqo; + + /** \brief Direct-axis subtransient reactance (unsaturated) (<i>X``d</i>) (&gt; RotatingMachineDynamics.statorLeakageReactance). Typical value = 0,2. Default: nullptr */ + CIMPP::PU xDirectSubtrans; + + /** \brief Direct-axis synchronous reactance (<i>Xd</i>) (&gt;= SynchronousMachineTimeConstantReactance.xDirectTrans). The quotient of a sustained value of that AC component of armature voltage that is produced by the total direct-axis flux due to direct-axis armature current and the value of the AC component of this current, the machine running at rated speed. Typical value = 1,8. Default: nullptr */ + CIMPP::PU xDirectSync; + + /** \brief Direct-axis transient reactance (unsaturated) (<i>X`d</i>) (&gt;= SynchronousMachineTimeConstantReactance.xDirectSubtrans). Typical value = 0,5. Default: nullptr */ + CIMPP::PU xDirectTrans; + + /** \brief Quadrature-axis subtransient reactance (<i>X``q</i>) (&gt; RotatingMachineDynamics.statorLeakageReactance). Typical value = 0,2. Default: nullptr */ + CIMPP::PU xQuadSubtrans; + + /** \brief Quadrature-axis synchronous reactance (<i>Xq</i>) (&gt;= SynchronousMachineTimeConstantReactance.xQuadTrans). The ratio of the component of reactive armature voltage, due to the quadrature-axis component of armature current, to this component of current, under steady state conditions and at rated frequency. Typical value = 1,6. Default: nullptr */ + CIMPP::PU xQuadSync; + + /** \brief Quadrature-axis transient reactance (<i>X`q</i>) (&gt;= SynchronousMachineTimeConstantReactance.xQuadSubtrans). Typical value = 0,3. Default: nullptr */ + CIMPP::PU xQuadTrans; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/SynchronousMachineUserDefined.cpp b/CGMES_3.0.0/SynchronousMachineUserDefined.cpp index 80f8bfed6..9bdfab19d 100644 --- a/CGMES_3.0.0/SynchronousMachineUserDefined.cpp +++ b/CGMES_3.0.0/SynchronousMachineUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -SynchronousMachineUserDefined::SynchronousMachineUserDefined() {}; -SynchronousMachineUserDefined::~SynchronousMachineUserDefined() {}; +SynchronousMachineUserDefined::SynchronousMachineUserDefined() {} +SynchronousMachineUserDefined::~SynchronousMachineUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ SynchronousMachineUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_SynchronousMachineUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (SynchronousMachineUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_SynchronousMachineUserDefined(BaseClass*, BaseClass*); bool assign_SynchronousMachineUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_SynchronousMachineUserDefined_ProprietaryParameterDynamics(BaseClass return false; } +bool assign_SynchronousMachineUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + SynchronousMachineUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_SynchronousMachineUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const SynchronousMachineUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const SynchronousMachineUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_SynchronousMachineUserDefined_proprietary(const BaseClass* BaseClass_pt return false; } - - const char SynchronousMachineUserDefined::debugName[] = "SynchronousMachineUserDefined"; const char* SynchronousMachineUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* SynchronousMachineUserDefined::debugString() const void SynchronousMachineUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:SynchronousMachineUserDefined"), &SynchronousMachineUserDefined_factory)); + factory_map.emplace("cim:SynchronousMachineUserDefined", &SynchronousMachineUserDefined_factory); } void SynchronousMachineUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineUserDefined.proprietary"), &assign_SynchronousMachineUserDefined_proprietary)); + assign_map.emplace("cim:SynchronousMachineUserDefined.proprietary", &assign_SynchronousMachineUserDefined_proprietary); } void SynchronousMachineUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:SynchronousMachineUserDefined.ProprietaryParameterDynamics"), &assign_SynchronousMachineUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:SynchronousMachineUserDefined.ProprietaryParameterDynamics", &assign_SynchronousMachineUserDefined_ProprietaryParameterDynamics); } void SynchronousMachineUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/SynchronousMachineUserDefined.hpp b/CGMES_3.0.0/SynchronousMachineUserDefined.hpp index 2319b692b..48cbec661 100644 --- a/CGMES_3.0.0/SynchronousMachineUserDefined.hpp +++ b/CGMES_3.0.0/SynchronousMachineUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Synchronous machine whose dynamic behaviour is described by a user-defined model. - */ + /** \brief Synchronous machine whose dynamic behaviour is described by a user-defined model. */ class SynchronousMachineUserDefined : public SynchronousMachineDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP SynchronousMachineUserDefined(); ~SynchronousMachineUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/TapChanger.cpp b/CGMES_3.0.0/TapChanger.cpp index 61361c96b..f5c8884ee 100644 --- a/CGMES_3.0.0/TapChanger.cpp +++ b/CGMES_3.0.0/TapChanger.cpp @@ -11,19 +11,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "SvTapStep.hpp" #include "TapChangerControl.hpp" #include "TapSchedule.hpp" -#include "Boolean.hpp" -#include "Integer.hpp" -#include "Integer.hpp" -#include "Boolean.hpp" -#include "Integer.hpp" -#include "Voltage.hpp" -#include "Integer.hpp" -#include "Float.hpp" using namespace CIMPP; -TapChanger::TapChanger() : SvTapStep(nullptr), TapChangerControl(nullptr) {}; -TapChanger::~TapChanger() {}; +TapChanger::TapChanger() : SvTapStep(nullptr), TapChangerControl(nullptr) {} +TapChanger::~TapChanger() {} static const std::list PossibleProfilesForClass = { @@ -62,164 +54,189 @@ TapChanger::getPossibleProfilesForAttributes() const return map; } +bool assign_SvTapStep_TapChanger(BaseClass*, BaseClass*); +bool assign_TapChanger_SvTapStep(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + TapChanger* element = dynamic_cast(BaseClass_ptr1); + SvTapStep* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->SvTapStep != element2) + { + element->SvTapStep = element2; + return assign_SvTapStep_TapChanger(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_TapChanger_controlEnabled(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChangerControl_TapChanger(BaseClass*, BaseClass*); +bool assign_TapChanger_TapChangerControl(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + TapChanger* element = dynamic_cast(BaseClass_ptr1); + TapChangerControl* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->controlEnabled; - if (buffer.fail()) - return false; - else - return true; + if (element->TapChangerControl != element2) + { + element->TapChangerControl = element2; + return assign_TapChangerControl_TapChanger(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_TapChanger_highStep(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapSchedule_TapChanger(BaseClass*, BaseClass*); +bool assign_TapChanger_TapSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + TapChanger* element = dynamic_cast(BaseClass_ptr1); + TapSchedule* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->highStep; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->TapSchedules.begin(), element->TapSchedules.end(), element2) == element->TapSchedules.end()) + { + element->TapSchedules.push_back(element2); + return assign_TapSchedule_TapChanger(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_TapChanger_lowStep(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChanger_controlEnabled(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->lowStep; - if (buffer.fail()) - return false; - else + buffer >> element->controlEnabled; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChanger_ltcFlag(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChanger_highStep(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->ltcFlag; - if (buffer.fail()) - return false; - else + buffer >> element->highStep; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChanger_neutralStep(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChanger_lowStep(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->neutralStep; - if (buffer.fail()) - return false; - else + buffer >> element->lowStep; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChanger_neutralU(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChanger_ltcFlag(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->neutralU; - if (buffer.fail()) - return false; - else + buffer >> element->ltcFlag; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChanger_normalStep(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChanger_neutralStep(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->normalStep; - if (buffer.fail()) - return false; - else + buffer >> element->neutralStep; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChanger_step(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChanger_neutralU(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChanger* element = dynamic_cast(BaseClass_ptr1)) + TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->step; - if (buffer.fail()) - return false; - else + buffer >> element->neutralU; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_SvTapStep_TapChanger(BaseClass*, BaseClass*); -bool assign_TapChanger_SvTapStep(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_TapChanger_normalStep(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { TapChanger* element = dynamic_cast(BaseClass_ptr1); - SvTapStep* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->SvTapStep != element2) + buffer >> element->normalStep; + if (!buffer.fail()) { - element->SvTapStep = element2; - return assign_SvTapStep_TapChanger(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_TapChangerControl_TapChanger(BaseClass*, BaseClass*); -bool assign_TapChanger_TapChangerControl(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_TapChanger_step(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { TapChanger* element = dynamic_cast(BaseClass_ptr1); - TapChangerControl* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->TapChangerControl != element2) + buffer >> element->step; + if (!buffer.fail()) { - element->TapChangerControl = element2; - return assign_TapChangerControl_TapChanger(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_TapSchedule_TapChanger(BaseClass*, BaseClass*); -bool assign_TapChanger_TapSchedules(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + + +bool get_TapChanger_TapChangerControl(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - TapChanger* element = dynamic_cast(BaseClass_ptr1); - TapSchedule* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (std::find(element->TapSchedules.begin(), element->TapSchedules.end(), element2) == element->TapSchedules.end()) + if (element->TapChangerControl != 0) { - element->TapSchedules.push_back(element2); - return assign_TapSchedule_TapChanger(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->TapChangerControl); + return true; } - return true; } return false; } + bool get_TapChanger_controlEnabled(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChanger* element = dynamic_cast(BaseClass_ptr1)) + const TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->controlEnabled; if (!buffer.str().empty()) @@ -233,7 +250,8 @@ bool get_TapChanger_controlEnabled(const BaseClass* BaseClass_ptr1, std::strings bool get_TapChanger_highStep(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChanger* element = dynamic_cast(BaseClass_ptr1)) + const TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->highStep; if (!buffer.str().empty()) @@ -247,7 +265,8 @@ bool get_TapChanger_highStep(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_TapChanger_lowStep(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChanger* element = dynamic_cast(BaseClass_ptr1)) + const TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lowStep; if (!buffer.str().empty()) @@ -261,7 +280,8 @@ bool get_TapChanger_lowStep(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_TapChanger_ltcFlag(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChanger* element = dynamic_cast(BaseClass_ptr1)) + const TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ltcFlag; if (!buffer.str().empty()) @@ -275,7 +295,8 @@ bool get_TapChanger_ltcFlag(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_TapChanger_neutralStep(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChanger* element = dynamic_cast(BaseClass_ptr1)) + const TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->neutralStep; if (!buffer.str().empty()) @@ -289,7 +310,8 @@ bool get_TapChanger_neutralStep(const BaseClass* BaseClass_ptr1, std::stringstre bool get_TapChanger_neutralU(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChanger* element = dynamic_cast(BaseClass_ptr1)) + const TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->neutralU; if (!buffer.str().empty()) @@ -303,7 +325,8 @@ bool get_TapChanger_neutralU(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_TapChanger_normalStep(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChanger* element = dynamic_cast(BaseClass_ptr1)) + const TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->normalStep; if (!buffer.str().empty()) @@ -317,7 +340,8 @@ bool get_TapChanger_normalStep(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_TapChanger_step(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChanger* element = dynamic_cast(BaseClass_ptr1)) + const TapChanger* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->step; if (!buffer.str().empty()) @@ -329,21 +353,6 @@ bool get_TapChanger_step(const BaseClass* BaseClass_ptr1, std::stringstream& buf return false; } - -bool get_TapChanger_TapChangerControl(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const TapChanger* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->TapChangerControl != 0) - { - BaseClass_list.push_back(element->TapChangerControl); - return true; - } - } - return false; -} - - const char TapChanger::debugName[] = "TapChanger"; const char* TapChanger::debugString() const { @@ -352,26 +361,26 @@ const char* TapChanger::debugString() const void TapChanger::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TapChanger"), &TapChanger_factory)); + factory_map.emplace("cim:TapChanger", &TapChanger_factory); } void TapChanger::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TapChanger.controlEnabled"), &assign_TapChanger_controlEnabled)); - assign_map.insert(std::make_pair(std::string("cim:TapChanger.highStep"), &assign_TapChanger_highStep)); - assign_map.insert(std::make_pair(std::string("cim:TapChanger.lowStep"), &assign_TapChanger_lowStep)); - assign_map.insert(std::make_pair(std::string("cim:TapChanger.ltcFlag"), &assign_TapChanger_ltcFlag)); - assign_map.insert(std::make_pair(std::string("cim:TapChanger.neutralStep"), &assign_TapChanger_neutralStep)); - assign_map.insert(std::make_pair(std::string("cim:TapChanger.neutralU"), &assign_TapChanger_neutralU)); - assign_map.insert(std::make_pair(std::string("cim:TapChanger.normalStep"), &assign_TapChanger_normalStep)); - assign_map.insert(std::make_pair(std::string("cim:TapChanger.step"), &assign_TapChanger_step)); + assign_map.emplace("cim:TapChanger.controlEnabled", &assign_TapChanger_controlEnabled); + assign_map.emplace("cim:TapChanger.highStep", &assign_TapChanger_highStep); + assign_map.emplace("cim:TapChanger.lowStep", &assign_TapChanger_lowStep); + assign_map.emplace("cim:TapChanger.ltcFlag", &assign_TapChanger_ltcFlag); + assign_map.emplace("cim:TapChanger.neutralStep", &assign_TapChanger_neutralStep); + assign_map.emplace("cim:TapChanger.neutralU", &assign_TapChanger_neutralU); + assign_map.emplace("cim:TapChanger.normalStep", &assign_TapChanger_normalStep); + assign_map.emplace("cim:TapChanger.step", &assign_TapChanger_step); } void TapChanger::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TapChanger.SvTapStep"), &assign_TapChanger_SvTapStep)); - assign_map.insert(std::make_pair(std::string("cim:TapChanger.TapChangerControl"), &assign_TapChanger_TapChangerControl)); - assign_map.insert(std::make_pair(std::string("cim:TapChanger.TapSchedules"), &assign_TapChanger_TapSchedules)); + assign_map.emplace("cim:TapChanger.SvTapStep", &assign_TapChanger_SvTapStep); + assign_map.emplace("cim:TapChanger.TapChangerControl", &assign_TapChanger_TapChangerControl); + assign_map.emplace("cim:TapChanger.TapSchedules", &assign_TapChanger_TapSchedules); } void TapChanger::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/TapChanger.hpp b/CGMES_3.0.0/TapChanger.hpp index af937c5a2..3af5135bf 100644 --- a/CGMES_3.0.0/TapChanger.hpp +++ b/CGMES_3.0.0/TapChanger.hpp @@ -23,9 +23,7 @@ namespace CIMPP class TapChangerControl; class TapSchedule; - /* - Mechanism for changing transformer winding tap positions. - */ + /** \brief Mechanism for changing transformer winding tap positions. */ class TapChanger : public PowerSystemResource { public: @@ -33,17 +31,38 @@ namespace CIMPP TapChanger(); ~TapChanger() override; - CIMPP::SvTapStep* SvTapStep; /* The tap step state associated with the tap changer. Default: 0 */ - CIMPP::TapChangerControl* TapChangerControl; /* The regulating control scheme in which this tap changer participates. Default: 0 */ - std::list TapSchedules; /* A TapChanger can have TapSchedules. Default: 0 */ - CIMPP::Boolean controlEnabled; /* Specifies the regulation status of the equipment. True is regulating, false is not regulating. Default: false */ - CIMPP::Integer highStep; /* Highest possible tap step position, advance from neutral. The attribute shall be greater than lowStep. Default: 0 */ - CIMPP::Integer lowStep; /* Lowest possible tap step position, retard from neutral. Default: 0 */ - CIMPP::Boolean ltcFlag; /* Specifies whether or not a TapChanger has load tap changing capabilities. Default: false */ - CIMPP::Integer neutralStep; /* The neutral tap step position for this winding. The attribute shall be equal to or greater than lowStep and equal or less than highStep. It is the step position where the voltage is neutralU when the other terminals of the transformer are at the ratedU. If there are other tap changers on the transformer those taps are kept constant at their neutralStep. Default: 0 */ - CIMPP::Voltage neutralU; /* Voltage at which the winding operates at the neutral tap setting. It is the voltage at the terminal of the PowerTransformerEnd associated with the tap changer when all tap changers on the transformer are at their neutralStep position. Normally neutralU of the tap changer is the same as ratedU of the PowerTransformerEnd, but it can differ in special cases such as when the tapping mechanism is separate from the winding more common on lower voltage transformers. This attribute is not relevant for PhaseTapChangerAsymmetrical, PhaseTapChangerSymmetrical and PhaseTapChangerLinear. Default: nullptr */ - CIMPP::Integer normalStep; /* The tap step position used in `normal` network operation for this winding. For a `Fixed` tap changer indicates the current physical tap setting. The attribute shall be equal to or greater than lowStep and equal to or less than highStep. Default: 0 */ - CIMPP::Float step; /* Tap changer position. Starting step for a steady state solution. Non integer values are allowed to support continuous tap variables. The reasons for continuous value are to support study cases where no discrete tap changer has yet been designed, a solution where a narrow voltage band forces the tap step to oscillate or to accommodate for a continuous solution as input. The attribute shall be equal to or greater than lowStep and equal to or less than highStep. Default: 0.0 */ + /** \brief The tap step state associated with the tap changer. Default: 0 */ + CIMPP::SvTapStep* SvTapStep; + + /** \brief The regulating control scheme in which this tap changer participates. Default: 0 */ + CIMPP::TapChangerControl* TapChangerControl; + + /** \brief A TapChanger can have TapSchedules. Default: 0 */ + std::list TapSchedules; + + /** \brief Specifies the regulation status of the equipment. True is regulating, false is not regulating. Default: false */ + CIMPP::Boolean controlEnabled; + + /** \brief Highest possible tap step position, advance from neutral. The attribute shall be greater than lowStep. Default: 0 */ + CIMPP::Integer highStep; + + /** \brief Lowest possible tap step position, retard from neutral. Default: 0 */ + CIMPP::Integer lowStep; + + /** \brief Specifies whether or not a TapChanger has load tap changing capabilities. Default: false */ + CIMPP::Boolean ltcFlag; + + /** \brief The neutral tap step position for this winding. The attribute shall be equal to or greater than lowStep and equal or less than highStep. It is the step position where the voltage is neutralU when the other terminals of the transformer are at the ratedU. If there are other tap changers on the transformer those taps are kept constant at their neutralStep. Default: 0 */ + CIMPP::Integer neutralStep; + + /** \brief Voltage at which the winding operates at the neutral tap setting. It is the voltage at the terminal of the PowerTransformerEnd associated with the tap changer when all tap changers on the transformer are at their neutralStep position. Normally neutralU of the tap changer is the same as ratedU of the PowerTransformerEnd, but it can differ in special cases such as when the tapping mechanism is separate from the winding more common on lower voltage transformers. This attribute is not relevant for PhaseTapChangerAsymmetrical, PhaseTapChangerSymmetrical and PhaseTapChangerLinear. Default: nullptr */ + CIMPP::Voltage neutralU; + + /** \brief The tap step position used in `normal` network operation for this winding. For a `Fixed` tap changer indicates the current physical tap setting. The attribute shall be equal to or greater than lowStep and equal to or less than highStep. Default: 0 */ + CIMPP::Integer normalStep; + + /** \brief Tap changer position. Starting step for a steady state solution. Non integer values are allowed to support continuous tap variables. The reasons for continuous value are to support study cases where no discrete tap changer has yet been designed, a solution where a narrow voltage band forces the tap step to oscillate or to accommodate for a continuous solution as input. The attribute shall be equal to or greater than lowStep and equal to or less than highStep. Default: 0.0 */ + CIMPP::Float step; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/TapChangerControl.cpp b/CGMES_3.0.0/TapChangerControl.cpp index 4b1f495eb..167b0d3a7 100644 --- a/CGMES_3.0.0/TapChangerControl.cpp +++ b/CGMES_3.0.0/TapChangerControl.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -TapChangerControl::TapChangerControl() {}; -TapChangerControl::~TapChangerControl() {}; +TapChangerControl::TapChangerControl() {} +TapChangerControl::~TapChangerControl() {} static const std::list PossibleProfilesForClass = { @@ -41,8 +41,6 @@ TapChangerControl::getPossibleProfilesForAttributes() const return map; } - - bool assign_TapChanger_TapChangerControl(BaseClass*, BaseClass*); bool assign_TapChangerControl_TapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -61,7 +59,6 @@ bool assign_TapChangerControl_TapChanger(BaseClass* BaseClass_ptr1, BaseClass* B } - const char TapChangerControl::debugName[] = "TapChangerControl"; const char* TapChangerControl::debugString() const { @@ -70,7 +67,7 @@ const char* TapChangerControl::debugString() const void TapChangerControl::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TapChangerControl"), &TapChangerControl_factory)); + factory_map.emplace("cim:TapChangerControl", &TapChangerControl_factory); } void TapChangerControl::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -79,7 +76,7 @@ void TapChangerControl::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TapChangerControl.TapChanger"), &assign_TapChangerControl_TapChanger)); + assign_map.emplace("cim:TapChangerControl.TapChanger", &assign_TapChangerControl_TapChanger); } void TapChangerControl::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/TapChangerControl.hpp b/CGMES_3.0.0/TapChangerControl.hpp index fcd1fbcf2..d28ab9d92 100644 --- a/CGMES_3.0.0/TapChangerControl.hpp +++ b/CGMES_3.0.0/TapChangerControl.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class TapChanger; - /* - Describes behaviour specific to tap changers, e.g. how the voltage at the end of a line varies with the load level and compensation of the voltage drop by tap adjustment. - */ + /** \brief Describes behaviour specific to tap changers, e.g. how the voltage at the end of a line varies with the load level and compensation of the voltage drop by tap adjustment. */ class TapChangerControl : public RegulatingControl { public: @@ -27,7 +25,8 @@ namespace CIMPP TapChangerControl(); ~TapChangerControl() override; - std::list TapChanger; /* The tap changers that participates in this regulating tap control scheme. Default: 0 */ + /** \brief The tap changers that participates in this regulating tap control scheme. Default: 0 */ + std::list TapChanger; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/TapChangerTablePoint.cpp b/CGMES_3.0.0/TapChangerTablePoint.cpp index c001d5a59..2044a9212 100644 --- a/CGMES_3.0.0/TapChangerTablePoint.cpp +++ b/CGMES_3.0.0/TapChangerTablePoint.cpp @@ -8,17 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PerCent.hpp" -#include "PerCent.hpp" -#include "PerCent.hpp" -#include "Float.hpp" -#include "Integer.hpp" -#include "PerCent.hpp" using namespace CIMPP; -TapChangerTablePoint::TapChangerTablePoint() {}; -TapChangerTablePoint::~TapChangerTablePoint() {}; +TapChangerTablePoint::TapChangerTablePoint() {} +TapChangerTablePoint::~TapChangerTablePoint() {} static const std::list PossibleProfilesForClass = { @@ -50,90 +44,94 @@ TapChangerTablePoint::getPossibleProfilesForAttributes() const return map; } - -bool assign_TapChangerTablePoint_b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChangerTablePoint_b(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->b; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChangerTablePoint_g(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChangerTablePoint_g(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->g; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChangerTablePoint_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChangerTablePoint_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChangerTablePoint_ratio(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChangerTablePoint_ratio(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ratio; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChangerTablePoint_step(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChangerTablePoint_step(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->step; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TapChangerTablePoint_x(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TapChangerTablePoint_x(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->x; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_TapChangerTablePoint_b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->b; if (!buffer.str().empty()) @@ -147,7 +145,8 @@ bool get_TapChangerTablePoint_b(const BaseClass* BaseClass_ptr1, std::stringstre bool get_TapChangerTablePoint_g(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->g; if (!buffer.str().empty()) @@ -161,7 +160,8 @@ bool get_TapChangerTablePoint_g(const BaseClass* BaseClass_ptr1, std::stringstre bool get_TapChangerTablePoint_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -175,7 +175,8 @@ bool get_TapChangerTablePoint_r(const BaseClass* BaseClass_ptr1, std::stringstre bool get_TapChangerTablePoint_ratio(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ratio; if (!buffer.str().empty()) @@ -189,7 +190,8 @@ bool get_TapChangerTablePoint_ratio(const BaseClass* BaseClass_ptr1, std::string bool get_TapChangerTablePoint_step(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->step; if (!buffer.str().empty()) @@ -203,7 +205,8 @@ bool get_TapChangerTablePoint_step(const BaseClass* BaseClass_ptr1, std::strings bool get_TapChangerTablePoint_x(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1)) + const TapChangerTablePoint* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->x; if (!buffer.str().empty()) @@ -215,8 +218,6 @@ bool get_TapChangerTablePoint_x(const BaseClass* BaseClass_ptr1, std::stringstre return false; } - - const char TapChangerTablePoint::debugName[] = "TapChangerTablePoint"; const char* TapChangerTablePoint::debugString() const { @@ -225,17 +226,17 @@ const char* TapChangerTablePoint::debugString() const void TapChangerTablePoint::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TapChangerTablePoint"), &TapChangerTablePoint_factory)); + factory_map.emplace("cim:TapChangerTablePoint", &TapChangerTablePoint_factory); } void TapChangerTablePoint::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TapChangerTablePoint.b"), &assign_TapChangerTablePoint_b)); - assign_map.insert(std::make_pair(std::string("cim:TapChangerTablePoint.g"), &assign_TapChangerTablePoint_g)); - assign_map.insert(std::make_pair(std::string("cim:TapChangerTablePoint.r"), &assign_TapChangerTablePoint_r)); - assign_map.insert(std::make_pair(std::string("cim:TapChangerTablePoint.ratio"), &assign_TapChangerTablePoint_ratio)); - assign_map.insert(std::make_pair(std::string("cim:TapChangerTablePoint.step"), &assign_TapChangerTablePoint_step)); - assign_map.insert(std::make_pair(std::string("cim:TapChangerTablePoint.x"), &assign_TapChangerTablePoint_x)); + assign_map.emplace("cim:TapChangerTablePoint.b", &assign_TapChangerTablePoint_b); + assign_map.emplace("cim:TapChangerTablePoint.g", &assign_TapChangerTablePoint_g); + assign_map.emplace("cim:TapChangerTablePoint.r", &assign_TapChangerTablePoint_r); + assign_map.emplace("cim:TapChangerTablePoint.ratio", &assign_TapChangerTablePoint_ratio); + assign_map.emplace("cim:TapChangerTablePoint.step", &assign_TapChangerTablePoint_step); + assign_map.emplace("cim:TapChangerTablePoint.x", &assign_TapChangerTablePoint_x); } void TapChangerTablePoint::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/TapChangerTablePoint.hpp b/CGMES_3.0.0/TapChangerTablePoint.hpp index f0a99a74c..e167ced70 100644 --- a/CGMES_3.0.0/TapChangerTablePoint.hpp +++ b/CGMES_3.0.0/TapChangerTablePoint.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Describes each tap step in the tabular curve. - */ + /** \brief Describes each tap step in the tabular curve. */ class TapChangerTablePoint : public BaseClass { public: @@ -29,12 +27,23 @@ namespace CIMPP TapChangerTablePoint(); ~TapChangerTablePoint() override; - CIMPP::PerCent b; /* The magnetizing branch susceptance deviation as a percentage of nominal value. The actual susceptance is calculated as follows: calculated magnetizing susceptance = b(nominal) * (1 + b(from this class)/100). The b(nominal) is defined as the static magnetizing susceptance on the associated power transformer end or ends. This model assumes the star impedance (pi model) form. Default: nullptr */ - CIMPP::PerCent g; /* The magnetizing branch conductance deviation as a percentage of nominal value. The actual conductance is calculated as follows: calculated magnetizing conductance = g(nominal) * (1 + g(from this class)/100). The g(nominal) is defined as the static magnetizing conductance on the associated power transformer end or ends. This model assumes the star impedance (pi model) form. Default: nullptr */ - CIMPP::PerCent r; /* The resistance deviation as a percentage of nominal value. The actual reactance is calculated as follows: calculated resistance = r(nominal) * (1 + r(from this class)/100). The r(nominal) is defined as the static resistance on the associated power transformer end or ends. This model assumes the star impedance (pi model) form. Default: nullptr */ - CIMPP::Float ratio; /* The voltage at the tap step divided by rated voltage of the transformer end having the tap changer. Hence this is a value close to one. For example, if the ratio at step 1 is 1.01, and the rated voltage of the transformer end is 110kV, then the voltage obtained by setting the tap changer to step 1 to is 111.1kV. Default: 0.0 */ - CIMPP::Integer step; /* The tap step. Default: 0 */ - CIMPP::PerCent x; /* The series reactance deviation as a percentage of nominal value. The actual reactance is calculated as follows: calculated reactance = x(nominal) * (1 + x(from this class)/100). The x(nominal) is defined as the static series reactance on the associated power transformer end or ends. This model assumes the star impedance (pi model) form. Default: nullptr */ + /** \brief The magnetizing branch susceptance deviation as a percentage of nominal value. The actual susceptance is calculated as follows: calculated magnetizing susceptance = b(nominal) * (1 + b(from this class)/100). The b(nominal) is defined as the static magnetizing susceptance on the associated power transformer end or ends. This model assumes the star impedance (pi model) form. Default: nullptr */ + CIMPP::PerCent b; + + /** \brief The magnetizing branch conductance deviation as a percentage of nominal value. The actual conductance is calculated as follows: calculated magnetizing conductance = g(nominal) * (1 + g(from this class)/100). The g(nominal) is defined as the static magnetizing conductance on the associated power transformer end or ends. This model assumes the star impedance (pi model) form. Default: nullptr */ + CIMPP::PerCent g; + + /** \brief The resistance deviation as a percentage of nominal value. The actual reactance is calculated as follows: calculated resistance = r(nominal) * (1 + r(from this class)/100). The r(nominal) is defined as the static resistance on the associated power transformer end or ends. This model assumes the star impedance (pi model) form. Default: nullptr */ + CIMPP::PerCent r; + + /** \brief The voltage at the tap step divided by rated voltage of the transformer end having the tap changer. Hence this is a value close to one. For example, if the ratio at step 1 is 1.01, and the rated voltage of the transformer end is 110kV, then the voltage obtained by setting the tap changer to step 1 to is 111.1kV. Default: 0.0 */ + CIMPP::Float ratio; + + /** \brief The tap step. Default: 0 */ + CIMPP::Integer step; + + /** \brief The series reactance deviation as a percentage of nominal value. The actual reactance is calculated as follows: calculated reactance = x(nominal) * (1 + x(from this class)/100). The x(nominal) is defined as the static series reactance on the associated power transformer end or ends. This model assumes the star impedance (pi model) form. Default: nullptr */ + CIMPP::PerCent x; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/TapSchedule.cpp b/CGMES_3.0.0/TapSchedule.cpp index d294bd984..039a79967 100644 --- a/CGMES_3.0.0/TapSchedule.cpp +++ b/CGMES_3.0.0/TapSchedule.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -TapSchedule::TapSchedule() : TapChanger(nullptr) {}; -TapSchedule::~TapSchedule() {}; +TapSchedule::TapSchedule() : TapChanger(nullptr) {} +TapSchedule::~TapSchedule() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ TapSchedule::getPossibleProfilesForAttributes() const return map; } - - bool assign_TapChanger_TapSchedules(BaseClass*, BaseClass*); bool assign_TapSchedule_TapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_TapSchedule_TapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseCla return false; } - bool get_TapSchedule_TapChanger(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TapSchedule* element = dynamic_cast(BaseClass_ptr1)) + const TapSchedule* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->TapChanger != 0) { @@ -73,7 +71,6 @@ bool get_TapSchedule_TapChanger(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TapSchedule"), &TapSchedule_factory)); + factory_map.emplace("cim:TapSchedule", &TapSchedule_factory); } void TapSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void TapSchedule::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TapSchedule.TapChanger"), &assign_TapSchedule_TapChanger)); + assign_map.emplace("cim:TapSchedule.TapChanger", &assign_TapSchedule_TapChanger); } void TapSchedule::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/TapSchedule.hpp b/CGMES_3.0.0/TapSchedule.hpp index cccd1c6a9..2e452fc41 100644 --- a/CGMES_3.0.0/TapSchedule.hpp +++ b/CGMES_3.0.0/TapSchedule.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class TapChanger; - /* - A pre-established pattern over time for a tap step. - */ + /** \brief A pre-established pattern over time for a tap step. */ class TapSchedule : public SeasonDayTypeSchedule { public: @@ -27,7 +25,8 @@ namespace CIMPP TapSchedule(); ~TapSchedule() override; - CIMPP::TapChanger* TapChanger; /* A TapSchedule is associated with a TapChanger. Default: 0 */ + /** \brief A TapSchedule is associated with a TapChanger. Default: 0 */ + CIMPP::TapChanger* TapChanger; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Temperature.hpp b/CGMES_3.0.0/Temperature.hpp index 33ba8ea2b..b7dfa3115 100644 --- a/CGMES_3.0.0/Temperature.hpp +++ b/CGMES_3.0.0/Temperature.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Value of temperature in degrees Celsius. - */ + /** \brief Value of temperature in degrees Celsius. */ class Temperature { public: diff --git a/CGMES_3.0.0/Terminal.cpp b/CGMES_3.0.0/Terminal.cpp index 7489deb46..d5ce4653c 100644 --- a/CGMES_3.0.0/Terminal.cpp +++ b/CGMES_3.0.0/Terminal.cpp @@ -8,11 +8,10 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include +#include "ACDCConverter.hpp" #include "AuxiliaryEquipment.hpp" #include "ConductingEquipment.hpp" #include "ConnectivityNode.hpp" -#include "ACDCConverter.hpp" -#include "MutualCoupling.hpp" #include "MutualCoupling.hpp" #include "RegulatingControl.hpp" #include "RemoteInputSignal.hpp" @@ -20,12 +19,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "TieFlow.hpp" #include "TopologicalNode.hpp" #include "TransformerEnd.hpp" -#include "PhaseCode.hpp" using namespace CIMPP; -Terminal::Terminal() : ConductingEquipment(nullptr), ConnectivityNode(nullptr), SvPowerFlow(nullptr), TopologicalNode(nullptr) {}; -Terminal::~Terminal() {}; +Terminal::Terminal() : ConductingEquipment(nullptr), ConnectivityNode(nullptr), SvPowerFlow(nullptr), TopologicalNode(nullptr) {} +Terminal::~Terminal() {} static const std::list PossibleProfilesForClass = { @@ -71,21 +69,6 @@ Terminal::getPossibleProfilesForAttributes() const return map; } - -bool assign_Terminal_phases(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (Terminal* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->phases; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_AuxiliaryEquipment_Terminal(BaseClass*, BaseClass*); bool assign_Terminal_AuxiliaryEquipment(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -102,6 +85,7 @@ bool assign_Terminal_AuxiliaryEquipment(BaseClass* BaseClass_ptr1, BaseClass* Ba } return false; } + bool assign_ConductingEquipment_Terminals(BaseClass*, BaseClass*); bool assign_Terminal_ConductingEquipment(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -118,6 +102,7 @@ bool assign_Terminal_ConductingEquipment(BaseClass* BaseClass_ptr1, BaseClass* B } return false; } + bool assign_ConnectivityNode_Terminals(BaseClass*, BaseClass*); bool assign_Terminal_ConnectivityNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -134,6 +119,7 @@ bool assign_Terminal_ConnectivityNode(BaseClass* BaseClass_ptr1, BaseClass* Base } return false; } + bool assign_ACDCConverter_PccTerminal(BaseClass*, BaseClass*); bool assign_Terminal_ConverterDCSides(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -150,6 +136,7 @@ bool assign_Terminal_ConverterDCSides(BaseClass* BaseClass_ptr1, BaseClass* Base } return false; } + bool assign_MutualCoupling_First_Terminal(BaseClass*, BaseClass*); bool assign_Terminal_HasFirstMutualCoupling(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -166,6 +153,7 @@ bool assign_Terminal_HasFirstMutualCoupling(BaseClass* BaseClass_ptr1, BaseClass } return false; } + bool assign_MutualCoupling_Second_Terminal(BaseClass*, BaseClass*); bool assign_Terminal_HasSecondMutualCoupling(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -182,6 +170,7 @@ bool assign_Terminal_HasSecondMutualCoupling(BaseClass* BaseClass_ptr1, BaseClas } return false; } + bool assign_RegulatingControl_Terminal(BaseClass*, BaseClass*); bool assign_Terminal_RegulatingControl(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -198,6 +187,7 @@ bool assign_Terminal_RegulatingControl(BaseClass* BaseClass_ptr1, BaseClass* Bas } return false; } + bool assign_RemoteInputSignal_Terminal(BaseClass*, BaseClass*); bool assign_Terminal_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -214,6 +204,7 @@ bool assign_Terminal_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* Bas } return false; } + bool assign_SvPowerFlow_Terminal(BaseClass*, BaseClass*); bool assign_Terminal_SvPowerFlow(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -230,6 +221,7 @@ bool assign_Terminal_SvPowerFlow(BaseClass* BaseClass_ptr1, BaseClass* BaseClass } return false; } + bool assign_TieFlow_Terminal(BaseClass*, BaseClass*); bool assign_Terminal_TieFlow(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -246,6 +238,7 @@ bool assign_Terminal_TieFlow(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr } return false; } + bool assign_TopologicalNode_Terminal(BaseClass*, BaseClass*); bool assign_Terminal_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -262,6 +255,7 @@ bool assign_Terminal_TopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseC } return false; } + bool assign_TransformerEnd_Terminal(BaseClass*, BaseClass*); bool assign_Terminal_TransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -279,10 +273,25 @@ bool assign_Terminal_TransformerEnd(BaseClass* BaseClass_ptr1, BaseClass* BaseCl return false; } +bool assign_Terminal_phases(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + Terminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->phases; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + bool get_Terminal_ConductingEquipment(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Terminal* element = dynamic_cast(BaseClass_ptr1)) + const Terminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ConductingEquipment != 0) { @@ -295,7 +304,8 @@ bool get_Terminal_ConductingEquipment(const BaseClass* BaseClass_ptr1, std::list bool get_Terminal_ConnectivityNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Terminal* element = dynamic_cast(BaseClass_ptr1)) + const Terminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ConnectivityNode != 0) { @@ -306,9 +316,17 @@ bool get_Terminal_ConnectivityNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const Terminal* element = dynamic_cast(BaseClass_ptr1)) + const Terminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->TopologicalNode != 0) { @@ -322,7 +340,8 @@ bool get_Terminal_TopologicalNode(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1)) + const Terminal* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->phases; if (!buffer.str().empty()) @@ -342,28 +361,28 @@ const char* Terminal::debugString() const void Terminal::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:Terminal"), &Terminal_factory)); + factory_map.emplace("cim:Terminal", &Terminal_factory); } void Terminal::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Terminal.phases"), &assign_Terminal_phases)); + assign_map.emplace("cim:Terminal.phases", &assign_Terminal_phases); } void Terminal::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:Terminal.AuxiliaryEquipment"), &assign_Terminal_AuxiliaryEquipment)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.ConductingEquipment"), &assign_Terminal_ConductingEquipment)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.ConnectivityNode"), &assign_Terminal_ConnectivityNode)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.ConverterDCSides"), &assign_Terminal_ConverterDCSides)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.HasFirstMutualCoupling"), &assign_Terminal_HasFirstMutualCoupling)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.HasSecondMutualCoupling"), &assign_Terminal_HasSecondMutualCoupling)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.RegulatingControl"), &assign_Terminal_RegulatingControl)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.RemoteInputSignal"), &assign_Terminal_RemoteInputSignal)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.SvPowerFlow"), &assign_Terminal_SvPowerFlow)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.TieFlow"), &assign_Terminal_TieFlow)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.TopologicalNode"), &assign_Terminal_TopologicalNode)); - assign_map.insert(std::make_pair(std::string("cim:Terminal.TransformerEnd"), &assign_Terminal_TransformerEnd)); + assign_map.emplace("cim:Terminal.AuxiliaryEquipment", &assign_Terminal_AuxiliaryEquipment); + assign_map.emplace("cim:Terminal.ConductingEquipment", &assign_Terminal_ConductingEquipment); + assign_map.emplace("cim:Terminal.ConnectivityNode", &assign_Terminal_ConnectivityNode); + assign_map.emplace("cim:Terminal.ConverterDCSides", &assign_Terminal_ConverterDCSides); + assign_map.emplace("cim:Terminal.HasFirstMutualCoupling", &assign_Terminal_HasFirstMutualCoupling); + assign_map.emplace("cim:Terminal.HasSecondMutualCoupling", &assign_Terminal_HasSecondMutualCoupling); + assign_map.emplace("cim:Terminal.RegulatingControl", &assign_Terminal_RegulatingControl); + assign_map.emplace("cim:Terminal.RemoteInputSignal", &assign_Terminal_RemoteInputSignal); + assign_map.emplace("cim:Terminal.SvPowerFlow", &assign_Terminal_SvPowerFlow); + assign_map.emplace("cim:Terminal.TieFlow", &assign_Terminal_TieFlow); + assign_map.emplace("cim:Terminal.TopologicalNode", &assign_Terminal_TopologicalNode); + assign_map.emplace("cim:Terminal.TransformerEnd", &assign_Terminal_TransformerEnd); } void Terminal::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/Terminal.hpp b/CGMES_3.0.0/Terminal.hpp index dd4a9f3a5..02e8c7096 100644 --- a/CGMES_3.0.0/Terminal.hpp +++ b/CGMES_3.0.0/Terminal.hpp @@ -28,9 +28,7 @@ namespace CIMPP class TopologicalNode; class TransformerEnd; - /* - An AC electrical connection point to a piece of conducting equipment. Terminals are connected at physical connection points called connectivity nodes. - */ + /** \brief An AC electrical connection point to a piece of conducting equipment. Terminals are connected at physical connection points called connectivity nodes. */ class Terminal : public ACDCTerminal { public: @@ -38,19 +36,44 @@ namespace CIMPP Terminal(); ~Terminal() override; - std::list AuxiliaryEquipment; /* The auxiliary equipment connected to the terminal. Default: 0 */ - CIMPP::ConductingEquipment* ConductingEquipment; /* The conducting equipment of the terminal. Conducting equipment have terminals that may be connected to other conducting equipment terminals via connectivity nodes or topological nodes. Default: 0 */ - CIMPP::ConnectivityNode* ConnectivityNode; /* The connectivity node to which this terminal connects with zero impedance. Default: 0 */ - std::list ConverterDCSides; /* All converters` DC sides linked to this point of common coupling terminal. Default: 0 */ - std::list HasFirstMutualCoupling; /* Mutual couplings associated with the branch as the first branch. Default: 0 */ - std::list HasSecondMutualCoupling; /* Mutual couplings with the branch associated as the first branch. Default: 0 */ - std::list RegulatingControl; /* The controls regulating this terminal. Default: 0 */ - std::list RemoteInputSignal; /* Input signal coming from this terminal. Default: 0 */ - CIMPP::SvPowerFlow* SvPowerFlow; /* The power flow state variable associated with the terminal. Default: 0 */ - std::list TieFlow; /* The control area tie flows to which this terminal associates. Default: 0 */ - CIMPP::TopologicalNode* TopologicalNode; /* The topological node associated with the terminal. This can be used as an alternative to the connectivity node path to topological node, thus making it unnecessary to model connectivity nodes in some cases. Note that the if connectivity nodes are in the model, this association would probably not be used as an input specification. Default: 0 */ - std::list TransformerEnd; /* All transformer ends connected at this terminal. Default: 0 */ - CIMPP::PhaseCode phases; /* Represents the normal network phasing condition. If the attribute is missing, three phases (ABC) shall be assumed, except for terminals of grounding classes (specializations of EarthFaultCompensator, GroundDisconnector, and Ground) which will be assumed to be N. Therefore, phase code ABCN is explicitly declared when needed, e.g. for star point grounding equipment. The phase code on terminals connecting same ConnectivityNode or same TopologicalNode as well as for equipment between two terminals shall be consistent. Default: 0 */ + /** \brief The auxiliary equipment connected to the terminal. Default: 0 */ + std::list AuxiliaryEquipment; + + /** \brief The conducting equipment of the terminal. Conducting equipment have terminals that may be connected to other conducting equipment terminals via connectivity nodes or topological nodes. Default: 0 */ + CIMPP::ConductingEquipment* ConductingEquipment; + + /** \brief The connectivity node to which this terminal connects with zero impedance. Default: 0 */ + CIMPP::ConnectivityNode* ConnectivityNode; + + /** \brief All converters` DC sides linked to this point of common coupling terminal. Default: 0 */ + std::list ConverterDCSides; + + /** \brief Mutual couplings associated with the branch as the first branch. Default: 0 */ + std::list HasFirstMutualCoupling; + + /** \brief Mutual couplings with the branch associated as the first branch. Default: 0 */ + std::list HasSecondMutualCoupling; + + /** \brief The controls regulating this terminal. Default: 0 */ + std::list RegulatingControl; + + /** \brief Input signal coming from this terminal. Default: 0 */ + std::list RemoteInputSignal; + + /** \brief The power flow state variable associated with the terminal. Default: 0 */ + CIMPP::SvPowerFlow* SvPowerFlow; + + /** \brief The control area tie flows to which this terminal associates. Default: 0 */ + std::list TieFlow; + + /** \brief The topological node associated with the terminal. This can be used as an alternative to the connectivity node path to topological node, thus making it unnecessary to model connectivity nodes in some cases. Note that the if connectivity nodes are in the model, this association would probably not be used as an input specification. Default: 0 */ + CIMPP::TopologicalNode* TopologicalNode; + + /** \brief All transformer ends connected at this terminal. Default: 0 */ + std::list TransformerEnd; + + /** \brief Represents the normal network phasing condition. If the attribute is missing, three phases (ABC) shall be assumed, except for terminals of grounding classes (specializations of EarthFaultCompensator, GroundDisconnector, and Ground) which will be assumed to be N. Therefore, phase code ABCN is explicitly declared when needed, e.g. for star point grounding equipment. The phase code on terminals connecting same ConnectivityNode or same TopologicalNode as well as for equipment between two terminals shall be consistent. Default: 0 */ + CIMPP::PhaseCode phases; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/TextDiagramObject.cpp b/CGMES_3.0.0/TextDiagramObject.cpp index d9738a22b..684542b39 100644 --- a/CGMES_3.0.0/TextDiagramObject.cpp +++ b/CGMES_3.0.0/TextDiagramObject.cpp @@ -8,12 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "String.hpp" using namespace CIMPP; -TextDiagramObject::TextDiagramObject() {}; -TextDiagramObject::~TextDiagramObject() {}; +TextDiagramObject::TextDiagramObject() {} +TextDiagramObject::~TextDiagramObject() {} static const std::list PossibleProfilesForClass = { @@ -40,25 +39,24 @@ TextDiagramObject::getPossibleProfilesForAttributes() const return map; } - -bool assign_TextDiagramObject_text(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TextDiagramObject_text(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TextDiagramObject* element = dynamic_cast(BaseClass_ptr1)) + TextDiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->text = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_TextDiagramObject_text(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TextDiagramObject* element = dynamic_cast(BaseClass_ptr1)) + const TextDiagramObject* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->text; if (!buffer.str().empty()) @@ -70,8 +68,6 @@ bool get_TextDiagramObject_text(const BaseClass* BaseClass_ptr1, std::stringstre return false; } - - const char TextDiagramObject::debugName[] = "TextDiagramObject"; const char* TextDiagramObject::debugString() const { @@ -80,12 +76,12 @@ const char* TextDiagramObject::debugString() const void TextDiagramObject::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TextDiagramObject"), &TextDiagramObject_factory)); + factory_map.emplace("cim:TextDiagramObject", &TextDiagramObject_factory); } void TextDiagramObject::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TextDiagramObject.text"), &assign_TextDiagramObject_text)); + assign_map.emplace("cim:TextDiagramObject.text", &assign_TextDiagramObject_text); } void TextDiagramObject::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/TextDiagramObject.hpp b/CGMES_3.0.0/TextDiagramObject.hpp index 3328c0922..188381ff3 100644 --- a/CGMES_3.0.0/TextDiagramObject.hpp +++ b/CGMES_3.0.0/TextDiagramObject.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - A diagram object for placing free-text or text derived from an associated domain object. - */ + /** \brief A diagram object for placing free-text or text derived from an associated domain object. */ class TextDiagramObject : public DiagramObject { public: @@ -27,7 +25,8 @@ namespace CIMPP TextDiagramObject(); ~TextDiagramObject() override; - CIMPP::String text; /* The text that is displayed by this text diagram object. Default: '' */ + /** \brief The text that is displayed by this text diagram object. Default: '' */ + CIMPP::String text; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ThermalGeneratingUnit.cpp b/CGMES_3.0.0/ThermalGeneratingUnit.cpp index da17d15bc..237cc3857 100644 --- a/CGMES_3.0.0/ThermalGeneratingUnit.cpp +++ b/CGMES_3.0.0/ThermalGeneratingUnit.cpp @@ -15,8 +15,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ThermalGeneratingUnit::ThermalGeneratingUnit() : CAESPlant(nullptr), CogenerationPlant(nullptr), CombinedCyclePlant(nullptr) {}; -ThermalGeneratingUnit::~ThermalGeneratingUnit() {}; +ThermalGeneratingUnit::ThermalGeneratingUnit() : CAESPlant(nullptr), CogenerationPlant(nullptr), CombinedCyclePlant(nullptr) {} +ThermalGeneratingUnit::~ThermalGeneratingUnit() {} static const std::list PossibleProfilesForClass = { @@ -47,8 +47,6 @@ ThermalGeneratingUnit::getPossibleProfilesForAttributes() const return map; } - - bool assign_CAESPlant_ThermalGeneratingUnit(BaseClass*, BaseClass*); bool assign_ThermalGeneratingUnit_CAESPlant(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -65,6 +63,7 @@ bool assign_ThermalGeneratingUnit_CAESPlant(BaseClass* BaseClass_ptr1, BaseClass } return false; } + bool assign_CogenerationPlant_ThermalGeneratingUnits(BaseClass*, BaseClass*); bool assign_ThermalGeneratingUnit_CogenerationPlant(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -81,6 +80,7 @@ bool assign_ThermalGeneratingUnit_CogenerationPlant(BaseClass* BaseClass_ptr1, B } return false; } + bool assign_CombinedCyclePlant_ThermalGeneratingUnits(BaseClass*, BaseClass*); bool assign_ThermalGeneratingUnit_CombinedCyclePlant(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -97,6 +97,7 @@ bool assign_ThermalGeneratingUnit_CombinedCyclePlant(BaseClass* BaseClass_ptr1, } return false; } + bool assign_FossilFuel_ThermalGeneratingUnit(BaseClass*, BaseClass*); bool assign_ThermalGeneratingUnit_FossilFuels(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -114,10 +115,10 @@ bool assign_ThermalGeneratingUnit_FossilFuels(BaseClass* BaseClass_ptr1, BaseCla return false; } - bool get_ThermalGeneratingUnit_CAESPlant(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ThermalGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const ThermalGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->CAESPlant != 0) { @@ -130,7 +131,8 @@ bool get_ThermalGeneratingUnit_CAESPlant(const BaseClass* BaseClass_ptr1, std::l bool get_ThermalGeneratingUnit_CogenerationPlant(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ThermalGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const ThermalGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->CogenerationPlant != 0) { @@ -143,7 +145,8 @@ bool get_ThermalGeneratingUnit_CogenerationPlant(const BaseClass* BaseClass_ptr1 bool get_ThermalGeneratingUnit_CombinedCyclePlant(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ThermalGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const ThermalGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->CombinedCyclePlant != 0) { @@ -163,7 +166,7 @@ const char* ThermalGeneratingUnit::debugString() const void ThermalGeneratingUnit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ThermalGeneratingUnit"), &ThermalGeneratingUnit_factory)); + factory_map.emplace("cim:ThermalGeneratingUnit", &ThermalGeneratingUnit_factory); } void ThermalGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -172,10 +175,10 @@ void ThermalGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ThermalGeneratingUnit.CAESPlant"), &assign_ThermalGeneratingUnit_CAESPlant)); - assign_map.insert(std::make_pair(std::string("cim:ThermalGeneratingUnit.CogenerationPlant"), &assign_ThermalGeneratingUnit_CogenerationPlant)); - assign_map.insert(std::make_pair(std::string("cim:ThermalGeneratingUnit.CombinedCyclePlant"), &assign_ThermalGeneratingUnit_CombinedCyclePlant)); - assign_map.insert(std::make_pair(std::string("cim:ThermalGeneratingUnit.FossilFuels"), &assign_ThermalGeneratingUnit_FossilFuels)); + assign_map.emplace("cim:ThermalGeneratingUnit.CAESPlant", &assign_ThermalGeneratingUnit_CAESPlant); + assign_map.emplace("cim:ThermalGeneratingUnit.CogenerationPlant", &assign_ThermalGeneratingUnit_CogenerationPlant); + assign_map.emplace("cim:ThermalGeneratingUnit.CombinedCyclePlant", &assign_ThermalGeneratingUnit_CombinedCyclePlant); + assign_map.emplace("cim:ThermalGeneratingUnit.FossilFuels", &assign_ThermalGeneratingUnit_FossilFuels); } void ThermalGeneratingUnit::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/ThermalGeneratingUnit.hpp b/CGMES_3.0.0/ThermalGeneratingUnit.hpp index d2bd306db..bf51015ee 100644 --- a/CGMES_3.0.0/ThermalGeneratingUnit.hpp +++ b/CGMES_3.0.0/ThermalGeneratingUnit.hpp @@ -20,9 +20,7 @@ namespace CIMPP class CombinedCyclePlant; class FossilFuel; - /* - A generating unit whose prime mover could be a steam turbine, combustion turbine, or diesel engine. - */ + /** \brief A generating unit whose prime mover could be a steam turbine, combustion turbine, or diesel engine. */ class ThermalGeneratingUnit : public GeneratingUnit { public: @@ -30,10 +28,17 @@ namespace CIMPP ThermalGeneratingUnit(); ~ThermalGeneratingUnit() override; - CIMPP::CAESPlant* CAESPlant; /* A thermal generating unit may be a member of a compressed air energy storage plant. Default: 0 */ - CIMPP::CogenerationPlant* CogenerationPlant; /* A thermal generating unit may be a member of a cogeneration plant. Default: 0 */ - CIMPP::CombinedCyclePlant* CombinedCyclePlant; /* A thermal generating unit may be a member of a combined cycle plant. Default: 0 */ - std::list FossilFuels; /* A thermal generating unit may have one or more fossil fuels. Default: 0 */ + /** \brief A thermal generating unit may be a member of a compressed air energy storage plant. Default: 0 */ + CIMPP::CAESPlant* CAESPlant; + + /** \brief A thermal generating unit may be a member of a cogeneration plant. Default: 0 */ + CIMPP::CogenerationPlant* CogenerationPlant; + + /** \brief A thermal generating unit may be a member of a combined cycle plant. Default: 0 */ + CIMPP::CombinedCyclePlant* CombinedCyclePlant; + + /** \brief A thermal generating unit may have one or more fossil fuels. Default: 0 */ + std::list FossilFuels; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/TieFlow.cpp b/CGMES_3.0.0/TieFlow.cpp index e7cb5efc5..bdae06ae5 100644 --- a/CGMES_3.0.0/TieFlow.cpp +++ b/CGMES_3.0.0/TieFlow.cpp @@ -10,12 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "ControlArea.hpp" #include "Terminal.hpp" -#include "Boolean.hpp" using namespace CIMPP; -TieFlow::TieFlow() : ControlArea(nullptr), Terminal(nullptr) {}; -TieFlow::~TieFlow() {}; +TieFlow::TieFlow() : ControlArea(nullptr), Terminal(nullptr) {} +TieFlow::~TieFlow() {} static const std::list PossibleProfilesForClass = { @@ -44,21 +43,6 @@ TieFlow::getPossibleProfilesForAttributes() const return map; } - -bool assign_TieFlow_positiveFlowIn(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TieFlow* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->positiveFlowIn; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ControlArea_TieFlow(BaseClass*, BaseClass*); bool assign_TieFlow_ControlArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -75,6 +59,7 @@ bool assign_TieFlow_ControlArea(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ } return false; } + bool assign_Terminal_TieFlow(BaseClass*, BaseClass*); bool assign_TieFlow_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -92,24 +77,24 @@ bool assign_TieFlow_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr return false; } -bool get_TieFlow_positiveFlowIn(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TieFlow_positiveFlowIn(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TieFlow* element = dynamic_cast(BaseClass_ptr1)) + TieFlow* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->positiveFlowIn; - if (!buffer.str().empty()) + buffer >> element->positiveFlowIn; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_TieFlow_ControlArea(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TieFlow* element = dynamic_cast(BaseClass_ptr1)) + const TieFlow* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ControlArea != 0) { @@ -122,7 +107,8 @@ bool get_TieFlow_ControlArea(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TieFlow* element = dynamic_cast(BaseClass_ptr1)) + const TieFlow* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Terminal != 0) { @@ -133,6 +119,20 @@ bool get_TieFlow_Terminal(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->positiveFlowIn; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char TieFlow::debugName[] = "TieFlow"; const char* TieFlow::debugString() const @@ -142,18 +142,18 @@ const char* TieFlow::debugString() const void TieFlow::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TieFlow"), &TieFlow_factory)); + factory_map.emplace("cim:TieFlow", &TieFlow_factory); } void TieFlow::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TieFlow.positiveFlowIn"), &assign_TieFlow_positiveFlowIn)); + assign_map.emplace("cim:TieFlow.positiveFlowIn", &assign_TieFlow_positiveFlowIn); } void TieFlow::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TieFlow.ControlArea"), &assign_TieFlow_ControlArea)); - assign_map.insert(std::make_pair(std::string("cim:TieFlow.Terminal"), &assign_TieFlow_Terminal)); + assign_map.emplace("cim:TieFlow.ControlArea", &assign_TieFlow_ControlArea); + assign_map.emplace("cim:TieFlow.Terminal", &assign_TieFlow_Terminal); } void TieFlow::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/TieFlow.hpp b/CGMES_3.0.0/TieFlow.hpp index 3da15765a..f8aefa4bc 100644 --- a/CGMES_3.0.0/TieFlow.hpp +++ b/CGMES_3.0.0/TieFlow.hpp @@ -19,9 +19,7 @@ namespace CIMPP class ControlArea; class Terminal; - /* - Defines the structure (in terms of location and direction) of the net interchange constraint for a control area. This constraint may be used by either AGC or power flow. - */ + /** \brief Defines the structure (in terms of location and direction) of the net interchange constraint for a control area. This constraint may be used by either AGC or power flow. */ class TieFlow : public IdentifiedObject { public: @@ -29,9 +27,14 @@ namespace CIMPP TieFlow(); ~TieFlow() override; - CIMPP::ControlArea* ControlArea; /* The control area of the tie flows. Default: 0 */ - CIMPP::Terminal* Terminal; /* The terminal to which this tie flow belongs. Default: 0 */ - CIMPP::Boolean positiveFlowIn; /* Specifies the sign of the tie flow associated with a control area. True if positive flow into the terminal (load convention) is also positive flow into the control area. See the description of ControlArea for further explanation of how TieFlow.positiveFlowIn is used. Default: false */ + /** \brief The control area of the tie flows. Default: 0 */ + CIMPP::ControlArea* ControlArea; + + /** \brief The terminal to which this tie flow belongs. Default: 0 */ + CIMPP::Terminal* Terminal; + + /** \brief Specifies the sign of the tie flow associated with a control area. True if positive flow into the terminal (load convention) is also positive flow into the control area. See the description of ControlArea for further explanation of how TieFlow.positiveFlowIn is used. Default: false */ + CIMPP::Boolean positiveFlowIn; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/TopologicalIsland.cpp b/CGMES_3.0.0/TopologicalIsland.cpp index 03db597fa..46b353666 100644 --- a/CGMES_3.0.0/TopologicalIsland.cpp +++ b/CGMES_3.0.0/TopologicalIsland.cpp @@ -8,13 +8,12 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "TopologicalNode.hpp" #include "TopologicalNode.hpp" using namespace CIMPP; -TopologicalIsland::TopologicalIsland() : AngleRefTopologicalNode(nullptr) {}; -TopologicalIsland::~TopologicalIsland() {}; +TopologicalIsland::TopologicalIsland() : AngleRefTopologicalNode(nullptr) {} +TopologicalIsland::~TopologicalIsland() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +41,6 @@ TopologicalIsland::getPossibleProfilesForAttributes() const return map; } - - bool assign_TopologicalNode_AngleRefTopologicalIsland(BaseClass*, BaseClass*); bool assign_TopologicalIsland_AngleRefTopologicalNode(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +57,7 @@ bool assign_TopologicalIsland_AngleRefTopologicalNode(BaseClass* BaseClass_ptr1, } return false; } + bool assign_TopologicalNode_TopologicalIsland(BaseClass*, BaseClass*); bool assign_TopologicalIsland_TopologicalNodes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +75,10 @@ bool assign_TopologicalIsland_TopologicalNodes(BaseClass* BaseClass_ptr1, BaseCl return false; } - bool get_TopologicalIsland_AngleRefTopologicalNode(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TopologicalIsland* element = dynamic_cast(BaseClass_ptr1)) + const TopologicalIsland* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->AngleRefTopologicalNode != 0) { @@ -93,7 +91,8 @@ bool get_TopologicalIsland_AngleRefTopologicalNode(const BaseClass* BaseClass_pt bool get_TopologicalIsland_TopologicalNodes(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TopologicalIsland* element = dynamic_cast(BaseClass_ptr1)) + const TopologicalIsland* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { std::copy(element->TopologicalNodes.begin(), element->TopologicalNodes.end(), std::back_inserter(BaseClass_list)); return !BaseClass_list.empty(); @@ -101,7 +100,6 @@ bool get_TopologicalIsland_TopologicalNodes(const BaseClass* BaseClass_ptr1, std return false; } - const char TopologicalIsland::debugName[] = "TopologicalIsland"; const char* TopologicalIsland::debugString() const { @@ -110,7 +108,7 @@ const char* TopologicalIsland::debugString() const void TopologicalIsland::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TopologicalIsland"), &TopologicalIsland_factory)); + factory_map.emplace("cim:TopologicalIsland", &TopologicalIsland_factory); } void TopologicalIsland::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -119,8 +117,8 @@ void TopologicalIsland::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TopologicalIsland.AngleRefTopologicalNode"), &assign_TopologicalIsland_AngleRefTopologicalNode)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalIsland.TopologicalNodes"), &assign_TopologicalIsland_TopologicalNodes)); + assign_map.emplace("cim:TopologicalIsland.AngleRefTopologicalNode", &assign_TopologicalIsland_AngleRefTopologicalNode); + assign_map.emplace("cim:TopologicalIsland.TopologicalNodes", &assign_TopologicalIsland_TopologicalNodes); } void TopologicalIsland::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/TopologicalIsland.hpp b/CGMES_3.0.0/TopologicalIsland.hpp index 117ccf9d2..e210c0025 100644 --- a/CGMES_3.0.0/TopologicalIsland.hpp +++ b/CGMES_3.0.0/TopologicalIsland.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class TopologicalNode; - /* - An electrically connected subset of the network. Topological islands can change as the current network state changes, e.g. due to: - disconnect switches or breakers changing state in a SCADA/EMS. - manual creation, change or deletion of topological nodes in a planning tool. Only energised TopologicalNode-s shall be part of the topological island. - */ + /** \brief An electrically connected subset of the network. Topological islands can change as the current network state changes, e.g. due to: - disconnect switches or breakers changing state in a SCADA/EMS. - manual creation, change or deletion of topological nodes in a planning tool. Only energised TopologicalNode-s shall be part of the topological island. */ class TopologicalIsland : public IdentifiedObject { public: @@ -27,8 +25,11 @@ namespace CIMPP TopologicalIsland(); ~TopologicalIsland() override; - CIMPP::TopologicalNode* AngleRefTopologicalNode; /* The angle reference for the island. Normally there is one TopologicalNode that is selected as the angle reference for each island. Other reference schemes exist, so the association is typically optional. Default: 0 */ - std::list TopologicalNodes; /* A topological node belongs to a topological island. Default: 0 */ + /** \brief The angle reference for the island. Normally there is one TopologicalNode that is selected as the angle reference for each island. Other reference schemes exist, so the association is typically optional. Default: 0 */ + CIMPP::TopologicalNode* AngleRefTopologicalNode; + + /** \brief A topological node belongs to a topological island. Default: 0 */ + std::list TopologicalNodes; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/TopologicalNode.cpp b/CGMES_3.0.0/TopologicalNode.cpp index c1f043389..ade00d469 100644 --- a/CGMES_3.0.0/TopologicalNode.cpp +++ b/CGMES_3.0.0/TopologicalNode.cpp @@ -8,10 +8,9 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "TopologicalIsland.hpp" #include "BaseVoltage.hpp" -#include "ConnectivityNodeContainer.hpp" #include "ConnectivityNode.hpp" +#include "ConnectivityNodeContainer.hpp" #include "ReportingGroup.hpp" #include "SvInjection.hpp" #include "SvVoltage.hpp" @@ -20,8 +19,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -TopologicalNode::TopologicalNode() : AngleRefTopologicalIsland(nullptr), BaseVoltage(nullptr), ConnectivityNodeContainer(nullptr), ReportingGroup(nullptr), SvInjection(nullptr), SvVoltage(nullptr), TopologicalIsland(nullptr) {}; -TopologicalNode::~TopologicalNode() {}; +TopologicalNode::TopologicalNode() : AngleRefTopologicalIsland(nullptr), BaseVoltage(nullptr), ConnectivityNodeContainer(nullptr), ReportingGroup(nullptr), SvInjection(nullptr), SvVoltage(nullptr), TopologicalIsland(nullptr) {} +TopologicalNode::~TopologicalNode() {} static const std::list PossibleProfilesForClass = { @@ -57,8 +56,6 @@ TopologicalNode::getPossibleProfilesForAttributes() const return map; } - - bool assign_TopologicalIsland_AngleRefTopologicalNode(BaseClass*, BaseClass*); bool assign_TopologicalNode_AngleRefTopologicalIsland(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -75,6 +72,7 @@ bool assign_TopologicalNode_AngleRefTopologicalIsland(BaseClass* BaseClass_ptr1, } return false; } + bool assign_BaseVoltage_TopologicalNode(BaseClass*, BaseClass*); bool assign_TopologicalNode_BaseVoltage(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -91,6 +89,7 @@ bool assign_TopologicalNode_BaseVoltage(BaseClass* BaseClass_ptr1, BaseClass* Ba } return false; } + bool assign_ConnectivityNodeContainer_TopologicalNode(BaseClass*, BaseClass*); bool assign_TopologicalNode_ConnectivityNodeContainer(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -107,6 +106,7 @@ bool assign_TopologicalNode_ConnectivityNodeContainer(BaseClass* BaseClass_ptr1, } return false; } + bool assign_ConnectivityNode_TopologicalNode(BaseClass*, BaseClass*); bool assign_TopologicalNode_ConnectivityNodes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -123,6 +123,7 @@ bool assign_TopologicalNode_ConnectivityNodes(BaseClass* BaseClass_ptr1, BaseCla } return false; } + bool assign_ReportingGroup_TopologicalNode(BaseClass*, BaseClass*); bool assign_TopologicalNode_ReportingGroup(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -139,6 +140,7 @@ bool assign_TopologicalNode_ReportingGroup(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_SvInjection_TopologicalNode(BaseClass*, BaseClass*); bool assign_TopologicalNode_SvInjection(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -155,6 +157,7 @@ bool assign_TopologicalNode_SvInjection(BaseClass* BaseClass_ptr1, BaseClass* Ba } return false; } + bool assign_SvVoltage_TopologicalNode(BaseClass*, BaseClass*); bool assign_TopologicalNode_SvVoltage(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -171,6 +174,7 @@ bool assign_TopologicalNode_SvVoltage(BaseClass* BaseClass_ptr1, BaseClass* Base } return false; } + bool assign_Terminal_TopologicalNode(BaseClass*, BaseClass*); bool assign_TopologicalNode_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -187,6 +191,7 @@ bool assign_TopologicalNode_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseC } return false; } + bool assign_TopologicalIsland_TopologicalNodes(BaseClass*, BaseClass*); bool assign_TopologicalNode_TopologicalIsland(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -207,7 +212,8 @@ bool assign_TopologicalNode_TopologicalIsland(BaseClass* BaseClass_ptr1, BaseCla bool get_TopologicalNode_BaseVoltage(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + const TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->BaseVoltage != 0) { @@ -220,7 +226,8 @@ bool get_TopologicalNode_BaseVoltage(const BaseClass* BaseClass_ptr1, std::list< bool get_TopologicalNode_ConnectivityNodeContainer(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + const TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ConnectivityNodeContainer != 0) { @@ -231,9 +238,11 @@ bool get_TopologicalNode_ConnectivityNodeContainer(const BaseClass* BaseClass_pt return false; } + bool get_TopologicalNode_ReportingGroup(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TopologicalNode* element = dynamic_cast(BaseClass_ptr1)) + const TopologicalNode* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ReportingGroup != 0) { @@ -245,6 +254,9 @@ bool get_TopologicalNode_ReportingGroup(const BaseClass* BaseClass_ptr1, std::li } + + + const char TopologicalNode::debugName[] = "TopologicalNode"; const char* TopologicalNode::debugString() const { @@ -253,7 +265,7 @@ const char* TopologicalNode::debugString() const void TopologicalNode::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TopologicalNode"), &TopologicalNode_factory)); + factory_map.emplace("cim:TopologicalNode", &TopologicalNode_factory); } void TopologicalNode::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -262,15 +274,15 @@ void TopologicalNode::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.AngleRefTopologicalIsland"), &assign_TopologicalNode_AngleRefTopologicalIsland)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.BaseVoltage"), &assign_TopologicalNode_BaseVoltage)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.ConnectivityNodeContainer"), &assign_TopologicalNode_ConnectivityNodeContainer)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.ConnectivityNodes"), &assign_TopologicalNode_ConnectivityNodes)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.ReportingGroup"), &assign_TopologicalNode_ReportingGroup)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.SvInjection"), &assign_TopologicalNode_SvInjection)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.SvVoltage"), &assign_TopologicalNode_SvVoltage)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.Terminal"), &assign_TopologicalNode_Terminal)); - assign_map.insert(std::make_pair(std::string("cim:TopologicalNode.TopologicalIsland"), &assign_TopologicalNode_TopologicalIsland)); + assign_map.emplace("cim:TopologicalNode.AngleRefTopologicalIsland", &assign_TopologicalNode_AngleRefTopologicalIsland); + assign_map.emplace("cim:TopologicalNode.BaseVoltage", &assign_TopologicalNode_BaseVoltage); + assign_map.emplace("cim:TopologicalNode.ConnectivityNodeContainer", &assign_TopologicalNode_ConnectivityNodeContainer); + assign_map.emplace("cim:TopologicalNode.ConnectivityNodes", &assign_TopologicalNode_ConnectivityNodes); + assign_map.emplace("cim:TopologicalNode.ReportingGroup", &assign_TopologicalNode_ReportingGroup); + assign_map.emplace("cim:TopologicalNode.SvInjection", &assign_TopologicalNode_SvInjection); + assign_map.emplace("cim:TopologicalNode.SvVoltage", &assign_TopologicalNode_SvVoltage); + assign_map.emplace("cim:TopologicalNode.Terminal", &assign_TopologicalNode_Terminal); + assign_map.emplace("cim:TopologicalNode.TopologicalIsland", &assign_TopologicalNode_TopologicalIsland); } void TopologicalNode::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/TopologicalNode.hpp b/CGMES_3.0.0/TopologicalNode.hpp index 0d4f1fd4b..b2424d138 100644 --- a/CGMES_3.0.0/TopologicalNode.hpp +++ b/CGMES_3.0.0/TopologicalNode.hpp @@ -24,9 +24,7 @@ namespace CIMPP class Terminal; class TopologicalIsland; - /* - For a detailed substation model a topological node is a set of connectivity nodes that, in the current network state, are connected together through any type of closed switches, including jumpers. Topological nodes change as the current network state changes (i.e., switches, breakers, etc. change state). For a planning model, switch statuses are not used to form topological nodes. Instead they are manually created or deleted in a model builder tool. Topological nodes maintained this way are also called "busses". - */ + /** \brief For a detailed substation model a topological node is a set of connectivity nodes that, in the current network state, are connected together through any type of closed switches, including jumpers. Topological nodes change as the current network state changes (i.e., switches, breakers, etc. change state). For a planning model, switch statuses are not used to form topological nodes. Instead they are manually created or deleted in a model builder tool. Topological nodes maintained this way are also called "busses". */ class TopologicalNode : public IdentifiedObject { public: @@ -34,15 +32,32 @@ namespace CIMPP TopologicalNode(); ~TopologicalNode() override; - CIMPP::TopologicalIsland* AngleRefTopologicalIsland; /* The island for which the node is an angle reference. Normally there is one angle reference node for each island. Default: 0 */ - CIMPP::BaseVoltage* BaseVoltage; /* The base voltage of the topological node. Default: 0 */ - CIMPP::ConnectivityNodeContainer* ConnectivityNodeContainer; /* The connectivity node container to which the topological node belongs. Default: 0 */ - std::list ConnectivityNodes; /* The connectivity nodes combine together to form this topological node. May depend on the current state of switches in the network. Default: 0 */ - CIMPP::ReportingGroup* ReportingGroup; /* The reporting group to which the topological node belongs. Default: 0 */ - CIMPP::SvInjection* SvInjection; /* The injection flows state variables associated with the topological node. Default: 0 */ - CIMPP::SvVoltage* SvVoltage; /* The state voltage associated with the topological node. Default: 0 */ - std::list Terminal; /* The terminals associated with the topological node. This can be used as an alternative to the connectivity node path to terminal, thus making it unnecessary to model connectivity nodes in some cases. Note that if connectivity nodes are in the model, this association would probably not be used as an input specification. Default: 0 */ - CIMPP::TopologicalIsland* TopologicalIsland; /* A topological node belongs to a topological island. Default: 0 */ + /** \brief The island for which the node is an angle reference. Normally there is one angle reference node for each island. Default: 0 */ + CIMPP::TopologicalIsland* AngleRefTopologicalIsland; + + /** \brief The base voltage of the topological node. Default: 0 */ + CIMPP::BaseVoltage* BaseVoltage; + + /** \brief The connectivity node container to which the topological node belongs. Default: 0 */ + CIMPP::ConnectivityNodeContainer* ConnectivityNodeContainer; + + /** \brief The connectivity nodes combine together to form this topological node. May depend on the current state of switches in the network. Default: 0 */ + std::list ConnectivityNodes; + + /** \brief The reporting group to which the topological node belongs. Default: 0 */ + CIMPP::ReportingGroup* ReportingGroup; + + /** \brief The injection flows state variables associated with the topological node. Default: 0 */ + CIMPP::SvInjection* SvInjection; + + /** \brief The state voltage associated with the topological node. Default: 0 */ + CIMPP::SvVoltage* SvVoltage; + + /** \brief The terminals associated with the topological node. This can be used as an alternative to the connectivity node path to terminal, thus making it unnecessary to model connectivity nodes in some cases. Note that if connectivity nodes are in the model, this association would probably not be used as an input specification. Default: 0 */ + std::list Terminal; + + /** \brief A topological node belongs to a topological island. Default: 0 */ + CIMPP::TopologicalIsland* TopologicalIsland; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/TownDetail.cpp b/CGMES_3.0.0/TownDetail.cpp index 3460beb19..fbc3720e3 100644 --- a/CGMES_3.0.0/TownDetail.cpp +++ b/CGMES_3.0.0/TownDetail.cpp @@ -8,16 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" -#include "String.hpp" using namespace CIMPP; -TownDetail::TownDetail() {}; -TownDetail::~TownDetail() {}; +TownDetail::TownDetail() {} +TownDetail::~TownDetail() {} static const std::list PossibleProfilesForClass = { @@ -48,77 +43,80 @@ TownDetail::getPossibleProfilesForAttributes() const return map; } - -bool assign_TownDetail_code(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TownDetail_code(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TownDetail* element = dynamic_cast(BaseClass_ptr1)) + TownDetail* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->code = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TownDetail_country(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TownDetail_country(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TownDetail* element = dynamic_cast(BaseClass_ptr1)) + TownDetail* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->country = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TownDetail_name(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TownDetail_name(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TownDetail* element = dynamic_cast(BaseClass_ptr1)) + TownDetail* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->name = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TownDetail_section(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TownDetail_section(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TownDetail* element = dynamic_cast(BaseClass_ptr1)) + TownDetail* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->section = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TownDetail_stateOrProvince(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TownDetail_stateOrProvince(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TownDetail* element = dynamic_cast(BaseClass_ptr1)) + TownDetail* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { element->stateOrProvince = buffer.str(); - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_TownDetail_code(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TownDetail* element = dynamic_cast(BaseClass_ptr1)) + const TownDetail* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->code; if (!buffer.str().empty()) @@ -132,7 +130,8 @@ bool get_TownDetail_code(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_TownDetail_country(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TownDetail* element = dynamic_cast(BaseClass_ptr1)) + const TownDetail* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->country; if (!buffer.str().empty()) @@ -146,7 +145,8 @@ bool get_TownDetail_country(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_TownDetail_name(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TownDetail* element = dynamic_cast(BaseClass_ptr1)) + const TownDetail* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->name; if (!buffer.str().empty()) @@ -160,7 +160,8 @@ bool get_TownDetail_name(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_TownDetail_section(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TownDetail* element = dynamic_cast(BaseClass_ptr1)) + const TownDetail* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->section; if (!buffer.str().empty()) @@ -174,7 +175,8 @@ bool get_TownDetail_section(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_TownDetail_stateOrProvince(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TownDetail* element = dynamic_cast(BaseClass_ptr1)) + const TownDetail* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->stateOrProvince; if (!buffer.str().empty()) @@ -186,8 +188,6 @@ bool get_TownDetail_stateOrProvince(const BaseClass* BaseClass_ptr1, std::string return false; } - - const char TownDetail::debugName[] = "TownDetail"; const char* TownDetail::debugString() const { @@ -196,16 +196,16 @@ const char* TownDetail::debugString() const void TownDetail::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TownDetail"), &TownDetail_factory)); + factory_map.emplace("cim:TownDetail", &TownDetail_factory); } void TownDetail::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TownDetail.code"), &assign_TownDetail_code)); - assign_map.insert(std::make_pair(std::string("cim:TownDetail.country"), &assign_TownDetail_country)); - assign_map.insert(std::make_pair(std::string("cim:TownDetail.name"), &assign_TownDetail_name)); - assign_map.insert(std::make_pair(std::string("cim:TownDetail.section"), &assign_TownDetail_section)); - assign_map.insert(std::make_pair(std::string("cim:TownDetail.stateOrProvince"), &assign_TownDetail_stateOrProvince)); + assign_map.emplace("cim:TownDetail.code", &assign_TownDetail_code); + assign_map.emplace("cim:TownDetail.country", &assign_TownDetail_country); + assign_map.emplace("cim:TownDetail.name", &assign_TownDetail_name); + assign_map.emplace("cim:TownDetail.section", &assign_TownDetail_section); + assign_map.emplace("cim:TownDetail.stateOrProvince", &assign_TownDetail_stateOrProvince); } void TownDetail::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/TownDetail.hpp b/CGMES_3.0.0/TownDetail.hpp index 2c80949aa..11f30e0e6 100644 --- a/CGMES_3.0.0/TownDetail.hpp +++ b/CGMES_3.0.0/TownDetail.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Town details, in the context of address. - */ + /** \brief Town details, in the context of address. */ class TownDetail : public BaseClass { public: @@ -27,11 +25,20 @@ namespace CIMPP TownDetail(); ~TownDetail() override; - CIMPP::String code; /* Town code. Default: '' */ - CIMPP::String country; /* Name of the country. Default: '' */ - CIMPP::String name; /* Town name. Default: '' */ - CIMPP::String section; /* Town section. For example, it is common for there to be 36 sections per township. Default: '' */ - CIMPP::String stateOrProvince; /* Name of the state or province. Default: '' */ + /** \brief Town code. Default: '' */ + CIMPP::String code; + + /** \brief Name of the country. Default: '' */ + CIMPP::String country; + + /** \brief Town name. Default: '' */ + CIMPP::String name; + + /** \brief Town section. For example, it is common for there to be 36 sections per township. Default: '' */ + CIMPP::String section; + + /** \brief Name of the state or province. Default: '' */ + CIMPP::String stateOrProvince; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/TransformerEnd.cpp b/CGMES_3.0.0/TransformerEnd.cpp index 3f9044f28..f15566b09 100644 --- a/CGMES_3.0.0/TransformerEnd.cpp +++ b/CGMES_3.0.0/TransformerEnd.cpp @@ -12,15 +12,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "PhaseTapChanger.hpp" #include "RatioTapChanger.hpp" #include "Terminal.hpp" -#include "Integer.hpp" -#include "Boolean.hpp" -#include "Resistance.hpp" -#include "Reactance.hpp" using namespace CIMPP; -TransformerEnd::TransformerEnd() : BaseVoltage(nullptr), PhaseTapChanger(nullptr), RatioTapChanger(nullptr), Terminal(nullptr) {}; -TransformerEnd::~TransformerEnd() {}; +TransformerEnd::TransformerEnd() : BaseVoltage(nullptr), PhaseTapChanger(nullptr), RatioTapChanger(nullptr), Terminal(nullptr) {} +TransformerEnd::~TransformerEnd() {} static const std::list PossibleProfilesForClass = { @@ -55,60 +51,6 @@ TransformerEnd::getPossibleProfilesForAttributes() const return map; } - -bool assign_TransformerEnd_endNumber(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->endNumber; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_TransformerEnd_grounded(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->grounded; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_TransformerEnd_rground(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->rground; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_TransformerEnd_xground(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->xground; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_BaseVoltage_TransformerEnds(BaseClass*, BaseClass*); bool assign_TransformerEnd_BaseVoltage(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -125,6 +67,7 @@ bool assign_TransformerEnd_BaseVoltage(BaseClass* BaseClass_ptr1, BaseClass* Bas } return false; } + bool assign_PhaseTapChanger_TransformerEnd(BaseClass*, BaseClass*); bool assign_TransformerEnd_PhaseTapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -141,6 +84,7 @@ bool assign_TransformerEnd_PhaseTapChanger(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_RatioTapChanger_TransformerEnd(BaseClass*, BaseClass*); bool assign_TransformerEnd_RatioTapChanger(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -157,6 +101,7 @@ bool assign_TransformerEnd_RatioTapChanger(BaseClass* BaseClass_ptr1, BaseClass* } return false; } + bool assign_Terminal_TransformerEnd(BaseClass*, BaseClass*); bool assign_TransformerEnd_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -174,66 +119,66 @@ bool assign_TransformerEnd_Terminal(BaseClass* BaseClass_ptr1, BaseClass* BaseCl return false; } -bool get_TransformerEnd_endNumber(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TransformerEnd_endNumber(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->endNumber; - if (!buffer.str().empty()) + buffer >> element->endNumber; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_TransformerEnd_grounded(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TransformerEnd_grounded(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->grounded; - if (!buffer.str().empty()) + buffer >> element->grounded; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_TransformerEnd_rground(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TransformerEnd_rground(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->rground; - if (!buffer.str().empty()) + buffer >> element->rground; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_TransformerEnd_xground(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_TransformerEnd_xground(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xground; - if (!buffer.str().empty()) + buffer >> element->xground; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_TransformerEnd_BaseVoltage(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->BaseVoltage != 0) { @@ -244,9 +189,12 @@ bool get_TransformerEnd_BaseVoltage(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TransformerEnd* element = dynamic_cast(BaseClass_ptr1)) + const TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Terminal != 0) { @@ -257,6 +205,65 @@ bool get_TransformerEnd_Terminal(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->endNumber; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_TransformerEnd_grounded(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->grounded; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_TransformerEnd_rground(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->rground; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_TransformerEnd_xground(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const TransformerEnd* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->xground; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char TransformerEnd::debugName[] = "TransformerEnd"; const char* TransformerEnd::debugString() const @@ -266,23 +273,23 @@ const char* TransformerEnd::debugString() const void TransformerEnd::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TransformerEnd"), &TransformerEnd_factory)); + factory_map.emplace("cim:TransformerEnd", &TransformerEnd_factory); } void TransformerEnd::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TransformerEnd.endNumber"), &assign_TransformerEnd_endNumber)); - assign_map.insert(std::make_pair(std::string("cim:TransformerEnd.grounded"), &assign_TransformerEnd_grounded)); - assign_map.insert(std::make_pair(std::string("cim:TransformerEnd.rground"), &assign_TransformerEnd_rground)); - assign_map.insert(std::make_pair(std::string("cim:TransformerEnd.xground"), &assign_TransformerEnd_xground)); + assign_map.emplace("cim:TransformerEnd.endNumber", &assign_TransformerEnd_endNumber); + assign_map.emplace("cim:TransformerEnd.grounded", &assign_TransformerEnd_grounded); + assign_map.emplace("cim:TransformerEnd.rground", &assign_TransformerEnd_rground); + assign_map.emplace("cim:TransformerEnd.xground", &assign_TransformerEnd_xground); } void TransformerEnd::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TransformerEnd.BaseVoltage"), &assign_TransformerEnd_BaseVoltage)); - assign_map.insert(std::make_pair(std::string("cim:TransformerEnd.PhaseTapChanger"), &assign_TransformerEnd_PhaseTapChanger)); - assign_map.insert(std::make_pair(std::string("cim:TransformerEnd.RatioTapChanger"), &assign_TransformerEnd_RatioTapChanger)); - assign_map.insert(std::make_pair(std::string("cim:TransformerEnd.Terminal"), &assign_TransformerEnd_Terminal)); + assign_map.emplace("cim:TransformerEnd.BaseVoltage", &assign_TransformerEnd_BaseVoltage); + assign_map.emplace("cim:TransformerEnd.PhaseTapChanger", &assign_TransformerEnd_PhaseTapChanger); + assign_map.emplace("cim:TransformerEnd.RatioTapChanger", &assign_TransformerEnd_RatioTapChanger); + assign_map.emplace("cim:TransformerEnd.Terminal", &assign_TransformerEnd_Terminal); } void TransformerEnd::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/TransformerEnd.hpp b/CGMES_3.0.0/TransformerEnd.hpp index 1b20f5643..f7e8fb87a 100644 --- a/CGMES_3.0.0/TransformerEnd.hpp +++ b/CGMES_3.0.0/TransformerEnd.hpp @@ -24,9 +24,7 @@ namespace CIMPP class RatioTapChanger; class Terminal; - /* - A conducting connection point of a power transformer. It corresponds to a physical transformer winding terminal. In earlier CIM versions, the TransformerWinding class served a similar purpose, but this class is more flexible because it associates to terminal but is not a specialization of ConductingEquipment. - */ + /** \brief A conducting connection point of a power transformer. It corresponds to a physical transformer winding terminal. In earlier CIM versions, the TransformerWinding class served a similar purpose, but this class is more flexible because it associates to terminal but is not a specialization of ConductingEquipment. */ class TransformerEnd : public IdentifiedObject { public: @@ -34,14 +32,29 @@ namespace CIMPP TransformerEnd(); ~TransformerEnd() override; - CIMPP::BaseVoltage* BaseVoltage; /* Base voltage of the transformer end. This is essential for PU calculation. Default: 0 */ - CIMPP::PhaseTapChanger* PhaseTapChanger; /* Phase tap changer associated with this transformer end. Default: 0 */ - CIMPP::RatioTapChanger* RatioTapChanger; /* Ratio tap changer associated with this transformer end. Default: 0 */ - CIMPP::Terminal* Terminal; /* Terminal of the power transformer to which this transformer end belongs. Default: 0 */ - CIMPP::Integer endNumber; /* Number for this transformer end, corresponding to the end`s order in the power transformer vector group or phase angle clock number. Highest voltage winding should be 1. Each end within a power transformer should have a unique subsequent end number. Note the transformer end number need not match the terminal sequence number. Default: 0 */ - CIMPP::Boolean grounded; /* (for Yn and Zn connections) True if the neutral is solidly grounded. Default: false */ - CIMPP::Resistance rground; /* (for Yn and Zn connections) Resistance part of neutral impedance where `grounded` is true. Default: nullptr */ - CIMPP::Reactance xground; /* (for Yn and Zn connections) Reactive part of neutral impedance where `grounded` is true. Default: nullptr */ + /** \brief Base voltage of the transformer end. This is essential for PU calculation. Default: 0 */ + CIMPP::BaseVoltage* BaseVoltage; + + /** \brief Phase tap changer associated with this transformer end. Default: 0 */ + CIMPP::PhaseTapChanger* PhaseTapChanger; + + /** \brief Ratio tap changer associated with this transformer end. Default: 0 */ + CIMPP::RatioTapChanger* RatioTapChanger; + + /** \brief Terminal of the power transformer to which this transformer end belongs. Default: 0 */ + CIMPP::Terminal* Terminal; + + /** \brief Number for this transformer end, corresponding to the end`s order in the power transformer vector group or phase angle clock number. Highest voltage winding should be 1. Each end within a power transformer should have a unique subsequent end number. Note the transformer end number need not match the terminal sequence number. Default: 0 */ + CIMPP::Integer endNumber; + + /** \brief (for Yn and Zn connections) True if the neutral is solidly grounded. Default: false */ + CIMPP::Boolean grounded; + + /** \brief (for Yn and Zn connections) Resistance part of neutral impedance where `grounded` is true. Default: nullptr */ + CIMPP::Resistance rground; + + /** \brief (for Yn and Zn connections) Reactive part of neutral impedance where `grounded` is true. Default: nullptr */ + CIMPP::Reactance xground; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/TurbLCFB1.cpp b/CGMES_3.0.0/TurbLCFB1.cpp index a193582c6..338c975ef 100644 --- a/CGMES_3.0.0/TurbLCFB1.cpp +++ b/CGMES_3.0.0/TurbLCFB1.cpp @@ -8,23 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "ActivePower.hpp" -#include "Boolean.hpp" -#include "ActivePower.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" using namespace CIMPP; -TurbLCFB1::TurbLCFB1() {}; -TurbLCFB1::~TurbLCFB1() {}; +TurbLCFB1::TurbLCFB1() {} +TurbLCFB1::~TurbLCFB1() {} static const std::list PossibleProfilesForClass = { @@ -62,168 +50,178 @@ TurbLCFB1::getPossibleProfilesForAttributes() const return map; } - -bool assign_TurbLCFB1_db(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_db(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->db; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_emax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_emax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->emax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_fb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_fb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_fbf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_fbf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->fbf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_irmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_irmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->irmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_ki(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_ki(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->ki; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_kp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_kp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_mwbase(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_mwbase(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mwbase; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_pbf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_pbf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pbf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_pmwset(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_pmwset(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pmwset; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_speedReferenceGovernor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_speedReferenceGovernor(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->speedReferenceGovernor; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_TurbLCFB1_tpelec(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_TurbLCFB1_tpelec(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpelec; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_TurbLCFB1_db(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->db; if (!buffer.str().empty()) @@ -237,7 +235,8 @@ bool get_TurbLCFB1_db(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_TurbLCFB1_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->emax; if (!buffer.str().empty()) @@ -251,7 +250,8 @@ bool get_TurbLCFB1_emax(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_TurbLCFB1_fb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fb; if (!buffer.str().empty()) @@ -265,7 +265,8 @@ bool get_TurbLCFB1_fb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_TurbLCFB1_fbf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fbf; if (!buffer.str().empty()) @@ -279,7 +280,8 @@ bool get_TurbLCFB1_fbf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_TurbLCFB1_irmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->irmax; if (!buffer.str().empty()) @@ -293,7 +295,8 @@ bool get_TurbLCFB1_irmax(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_TurbLCFB1_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ki; if (!buffer.str().empty()) @@ -307,7 +310,8 @@ bool get_TurbLCFB1_ki(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_TurbLCFB1_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kp; if (!buffer.str().empty()) @@ -321,7 +325,8 @@ bool get_TurbLCFB1_kp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer bool get_TurbLCFB1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwbase; if (!buffer.str().empty()) @@ -335,7 +340,8 @@ bool get_TurbLCFB1_mwbase(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_TurbLCFB1_pbf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pbf; if (!buffer.str().empty()) @@ -349,7 +355,8 @@ bool get_TurbLCFB1_pbf(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_TurbLCFB1_pmwset(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmwset; if (!buffer.str().empty()) @@ -363,7 +370,8 @@ bool get_TurbLCFB1_pmwset(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_TurbLCFB1_speedReferenceGovernor(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->speedReferenceGovernor; if (!buffer.str().empty()) @@ -377,7 +385,8 @@ bool get_TurbLCFB1_speedReferenceGovernor(const BaseClass* BaseClass_ptr1, std:: bool get_TurbLCFB1_tpelec(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1)) + const TurbLCFB1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpelec; if (!buffer.str().empty()) @@ -389,8 +398,6 @@ bool get_TurbLCFB1_tpelec(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char TurbLCFB1::debugName[] = "TurbLCFB1"; const char* TurbLCFB1::debugString() const { @@ -399,23 +406,23 @@ const char* TurbLCFB1::debugString() const void TurbLCFB1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TurbLCFB1"), &TurbLCFB1_factory)); + factory_map.emplace("cim:TurbLCFB1", &TurbLCFB1_factory); } void TurbLCFB1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.db"), &assign_TurbLCFB1_db)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.emax"), &assign_TurbLCFB1_emax)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.fb"), &assign_TurbLCFB1_fb)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.fbf"), &assign_TurbLCFB1_fbf)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.irmax"), &assign_TurbLCFB1_irmax)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.ki"), &assign_TurbLCFB1_ki)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.kp"), &assign_TurbLCFB1_kp)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.mwbase"), &assign_TurbLCFB1_mwbase)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.pbf"), &assign_TurbLCFB1_pbf)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.pmwset"), &assign_TurbLCFB1_pmwset)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.speedReferenceGovernor"), &assign_TurbLCFB1_speedReferenceGovernor)); - assign_map.insert(std::make_pair(std::string("cim:TurbLCFB1.tpelec"), &assign_TurbLCFB1_tpelec)); + assign_map.emplace("cim:TurbLCFB1.db", &assign_TurbLCFB1_db); + assign_map.emplace("cim:TurbLCFB1.emax", &assign_TurbLCFB1_emax); + assign_map.emplace("cim:TurbLCFB1.fb", &assign_TurbLCFB1_fb); + assign_map.emplace("cim:TurbLCFB1.fbf", &assign_TurbLCFB1_fbf); + assign_map.emplace("cim:TurbLCFB1.irmax", &assign_TurbLCFB1_irmax); + assign_map.emplace("cim:TurbLCFB1.ki", &assign_TurbLCFB1_ki); + assign_map.emplace("cim:TurbLCFB1.kp", &assign_TurbLCFB1_kp); + assign_map.emplace("cim:TurbLCFB1.mwbase", &assign_TurbLCFB1_mwbase); + assign_map.emplace("cim:TurbLCFB1.pbf", &assign_TurbLCFB1_pbf); + assign_map.emplace("cim:TurbLCFB1.pmwset", &assign_TurbLCFB1_pmwset); + assign_map.emplace("cim:TurbLCFB1.speedReferenceGovernor", &assign_TurbLCFB1_speedReferenceGovernor); + assign_map.emplace("cim:TurbLCFB1.tpelec", &assign_TurbLCFB1_tpelec); } void TurbLCFB1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/TurbLCFB1.hpp b/CGMES_3.0.0/TurbLCFB1.hpp index db3f10b10..779af8948 100644 --- a/CGMES_3.0.0/TurbLCFB1.hpp +++ b/CGMES_3.0.0/TurbLCFB1.hpp @@ -20,9 +20,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Turbine load controller model developed by WECC. This model represents a supervisory turbine load controller that acts to maintain turbine power at a set value by continuous adjustment of the turbine governor speed-load reference. This model is intended to represent slow reset 'outer loop' controllers managing the action of the turbine governor. - */ + /** \brief Turbine load controller model developed by WECC. This model represents a supervisory turbine load controller that acts to maintain turbine power at a set value by continuous adjustment of the turbine governor speed-load reference. This model is intended to represent slow reset 'outer loop' controllers managing the action of the turbine governor. */ class TurbLCFB1 : public TurbineLoadControllerDynamics { public: @@ -30,18 +28,41 @@ namespace CIMPP TurbLCFB1(); ~TurbLCFB1() override; - CIMPP::PU db; /* Controller deadband (<i>db</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU emax; /* Maximum control error (<i>Emax</i>) (see parameter detail 4). Typical value = 0,02. Default: nullptr */ - CIMPP::PU fb; /* Frequency bias gain (<i>Fb</i>). Typical value = 0. Default: nullptr */ - CIMPP::Boolean fbf; /* Frequency bias flag (<i>Fbf</i>). true = enable frequency bias false = disable frequency bias. Typical value = false. Default: false */ - CIMPP::PU irmax; /* Maximum turbine speed/load reference bias (<i>Irmax</i>) (see parameter detail 3). Typical value = 0. Default: nullptr */ - CIMPP::PU ki; /* Integral gain (<i>Ki</i>). Typical value = 0. Default: nullptr */ - CIMPP::PU kp; /* Proportional gain (<i>Kp</i>). Typical value = 0. Default: nullptr */ - CIMPP::ActivePower mwbase; /* Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ - CIMPP::Boolean pbf; /* Power controller flag (<i>Pbf</i>). true = enable load controller false = disable load controller. Typical value = false. Default: false */ - CIMPP::ActivePower pmwset; /* Power controller setpoint (<i>Pmwset</i>) (see parameter detail 1). Unit = MW. Typical value = 0. Default: nullptr */ - CIMPP::Boolean speedReferenceGovernor; /* Type of turbine governor reference (<i>Type</i>). true = speed reference governor false = load reference governor. Typical value = true. Default: false */ - CIMPP::Seconds tpelec; /* Power transducer time constant (<i>Tpelec</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + /** \brief Controller deadband (<i>db</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU db; + + /** \brief Maximum control error (<i>Emax</i>) (see parameter detail 4). Typical value = 0,02. Default: nullptr */ + CIMPP::PU emax; + + /** \brief Frequency bias gain (<i>Fb</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU fb; + + /** \brief Frequency bias flag (<i>Fbf</i>). true = enable frequency bias false = disable frequency bias. Typical value = false. Default: false */ + CIMPP::Boolean fbf; + + /** \brief Maximum turbine speed/load reference bias (<i>Irmax</i>) (see parameter detail 3). Typical value = 0. Default: nullptr */ + CIMPP::PU irmax; + + /** \brief Integral gain (<i>Ki</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU ki; + + /** \brief Proportional gain (<i>Kp</i>). Typical value = 0. Default: nullptr */ + CIMPP::PU kp; + + /** \brief Base for power values (<i>MWbase</i>) (&gt; 0). Unit = MW. Default: nullptr */ + CIMPP::ActivePower mwbase; + + /** \brief Power controller flag (<i>Pbf</i>). true = enable load controller false = disable load controller. Typical value = false. Default: false */ + CIMPP::Boolean pbf; + + /** \brief Power controller setpoint (<i>Pmwset</i>) (see parameter detail 1). Unit = MW. Typical value = 0. Default: nullptr */ + CIMPP::ActivePower pmwset; + + /** \brief Type of turbine governor reference (<i>Type</i>). true = speed reference governor false = load reference governor. Typical value = true. Default: false */ + CIMPP::Boolean speedReferenceGovernor; + + /** \brief Power transducer time constant (<i>Tpelec</i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tpelec; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/TurbineGovernorDynamics.cpp b/CGMES_3.0.0/TurbineGovernorDynamics.cpp index 5c33e80a1..dc2364832 100644 --- a/CGMES_3.0.0/TurbineGovernorDynamics.cpp +++ b/CGMES_3.0.0/TurbineGovernorDynamics.cpp @@ -14,8 +14,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -TurbineGovernorDynamics::TurbineGovernorDynamics() : AsynchronousMachineDynamics(nullptr), SynchronousMachineDynamics(nullptr), TurbineLoadControllerDynamics(nullptr) {}; -TurbineGovernorDynamics::~TurbineGovernorDynamics() {}; +TurbineGovernorDynamics::TurbineGovernorDynamics() : AsynchronousMachineDynamics(nullptr), SynchronousMachineDynamics(nullptr), TurbineLoadControllerDynamics(nullptr) {} +TurbineGovernorDynamics::~TurbineGovernorDynamics() {} static const std::list PossibleProfilesForClass = { @@ -44,8 +44,6 @@ TurbineGovernorDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_AsynchronousMachineDynamics_TurbineGovernorDynamics(BaseClass*, BaseClass*); bool assign_TurbineGovernorDynamics_AsynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -62,6 +60,7 @@ bool assign_TurbineGovernorDynamics_AsynchronousMachineDynamics(BaseClass* BaseC } return false; } + bool assign_SynchronousMachineDynamics_TurbineGovernorDynamics(BaseClass*, BaseClass*); bool assign_TurbineGovernorDynamics_SynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -78,6 +77,7 @@ bool assign_TurbineGovernorDynamics_SynchronousMachineDynamics(BaseClass* BaseCl } return false; } + bool assign_TurbineLoadControllerDynamics_TurbineGovernorDynamics(BaseClass*, BaseClass*); bool assign_TurbineGovernorDynamics_TurbineLoadControllerDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -95,10 +95,10 @@ bool assign_TurbineGovernorDynamics_TurbineLoadControllerDynamics(BaseClass* Bas return false; } - bool get_TurbineGovernorDynamics_AsynchronousMachineDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TurbineGovernorDynamics* element = dynamic_cast(BaseClass_ptr1)) + const TurbineGovernorDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->AsynchronousMachineDynamics != 0) { @@ -111,7 +111,8 @@ bool get_TurbineGovernorDynamics_AsynchronousMachineDynamics(const BaseClass* Ba bool get_TurbineGovernorDynamics_SynchronousMachineDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TurbineGovernorDynamics* element = dynamic_cast(BaseClass_ptr1)) + const TurbineGovernorDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->SynchronousMachineDynamics != 0) { @@ -131,7 +132,7 @@ const char* TurbineGovernorDynamics::debugString() const void TurbineGovernorDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TurbineGovernorDynamics"), &TurbineGovernorDynamics_factory)); + factory_map.emplace("cim:TurbineGovernorDynamics", &TurbineGovernorDynamics_factory); } void TurbineGovernorDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -140,9 +141,9 @@ void TurbineGovernorDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TurbineGovernorDynamics.AsynchronousMachineDynamics"), &assign_TurbineGovernorDynamics_AsynchronousMachineDynamics)); - assign_map.insert(std::make_pair(std::string("cim:TurbineGovernorDynamics.SynchronousMachineDynamics"), &assign_TurbineGovernorDynamics_SynchronousMachineDynamics)); - assign_map.insert(std::make_pair(std::string("cim:TurbineGovernorDynamics.TurbineLoadControllerDynamics"), &assign_TurbineGovernorDynamics_TurbineLoadControllerDynamics)); + assign_map.emplace("cim:TurbineGovernorDynamics.AsynchronousMachineDynamics", &assign_TurbineGovernorDynamics_AsynchronousMachineDynamics); + assign_map.emplace("cim:TurbineGovernorDynamics.SynchronousMachineDynamics", &assign_TurbineGovernorDynamics_SynchronousMachineDynamics); + assign_map.emplace("cim:TurbineGovernorDynamics.TurbineLoadControllerDynamics", &assign_TurbineGovernorDynamics_TurbineLoadControllerDynamics); } void TurbineGovernorDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/TurbineGovernorDynamics.hpp b/CGMES_3.0.0/TurbineGovernorDynamics.hpp index 3d8e85e8c..03803df30 100644 --- a/CGMES_3.0.0/TurbineGovernorDynamics.hpp +++ b/CGMES_3.0.0/TurbineGovernorDynamics.hpp @@ -19,9 +19,7 @@ namespace CIMPP class SynchronousMachineDynamics; class TurbineLoadControllerDynamics; - /* - Turbine-governor function block whose behaviour is described by reference to a standard model or by definition of a user-defined model. - */ + /** \brief Turbine-governor function block whose behaviour is described by reference to a standard model or by definition of a user-defined model. */ class TurbineGovernorDynamics : public DynamicsFunctionBlock { public: @@ -29,9 +27,14 @@ namespace CIMPP TurbineGovernorDynamics(); ~TurbineGovernorDynamics() override; - CIMPP::AsynchronousMachineDynamics* AsynchronousMachineDynamics; /* Asynchronous machine model with which this turbine-governor model is associated. TurbineGovernorDynamics shall have either an association to SynchronousMachineDynamics or to AsynchronousMachineDynamics. Default: 0 */ - CIMPP::SynchronousMachineDynamics* SynchronousMachineDynamics; /* Synchronous machine model with which this turbine-governor model is associated. TurbineGovernorDynamics shall have either an association to SynchronousMachineDynamics or to AsynchronousMachineDynamics. Default: 0 */ - CIMPP::TurbineLoadControllerDynamics* TurbineLoadControllerDynamics; /* Turbine load controller providing input to this turbine-governor. Default: 0 */ + /** \brief Asynchronous machine model with which this turbine-governor model is associated. TurbineGovernorDynamics shall have either an association to SynchronousMachineDynamics or to AsynchronousMachineDynamics. Default: 0 */ + CIMPP::AsynchronousMachineDynamics* AsynchronousMachineDynamics; + + /** \brief Synchronous machine model with which this turbine-governor model is associated. TurbineGovernorDynamics shall have either an association to SynchronousMachineDynamics or to AsynchronousMachineDynamics. Default: 0 */ + CIMPP::SynchronousMachineDynamics* SynchronousMachineDynamics; + + /** \brief Turbine load controller providing input to this turbine-governor. Default: 0 */ + CIMPP::TurbineLoadControllerDynamics* TurbineLoadControllerDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/TurbineGovernorUserDefined.cpp b/CGMES_3.0.0/TurbineGovernorUserDefined.cpp index cbaea87d3..ad7d7ef5f 100644 --- a/CGMES_3.0.0/TurbineGovernorUserDefined.cpp +++ b/CGMES_3.0.0/TurbineGovernorUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -TurbineGovernorUserDefined::TurbineGovernorUserDefined() {}; -TurbineGovernorUserDefined::~TurbineGovernorUserDefined() {}; +TurbineGovernorUserDefined::TurbineGovernorUserDefined() {} +TurbineGovernorUserDefined::~TurbineGovernorUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ TurbineGovernorUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_TurbineGovernorUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TurbineGovernorUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_TurbineGovernorUserDefined(BaseClass*, BaseClass*); bool assign_TurbineGovernorUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_TurbineGovernorUserDefined_ProprietaryParameterDynamics(BaseClass* B return false; } +bool assign_TurbineGovernorUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + TurbineGovernorUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_TurbineGovernorUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbineGovernorUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const TurbineGovernorUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_TurbineGovernorUserDefined_proprietary(const BaseClass* BaseClass_ptr1, return false; } - - const char TurbineGovernorUserDefined::debugName[] = "TurbineGovernorUserDefined"; const char* TurbineGovernorUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* TurbineGovernorUserDefined::debugString() const void TurbineGovernorUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TurbineGovernorUserDefined"), &TurbineGovernorUserDefined_factory)); + factory_map.emplace("cim:TurbineGovernorUserDefined", &TurbineGovernorUserDefined_factory); } void TurbineGovernorUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TurbineGovernorUserDefined.proprietary"), &assign_TurbineGovernorUserDefined_proprietary)); + assign_map.emplace("cim:TurbineGovernorUserDefined.proprietary", &assign_TurbineGovernorUserDefined_proprietary); } void TurbineGovernorUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TurbineGovernorUserDefined.ProprietaryParameterDynamics"), &assign_TurbineGovernorUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:TurbineGovernorUserDefined.ProprietaryParameterDynamics", &assign_TurbineGovernorUserDefined_ProprietaryParameterDynamics); } void TurbineGovernorUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/TurbineGovernorUserDefined.hpp b/CGMES_3.0.0/TurbineGovernorUserDefined.hpp index bcf7417ff..9f4c562f6 100644 --- a/CGMES_3.0.0/TurbineGovernorUserDefined.hpp +++ b/CGMES_3.0.0/TurbineGovernorUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Turbine-governor function block whose dynamic behaviour is described by a user-defined model. - */ + /** \brief Turbine-governor function block whose dynamic behaviour is described by a user-defined model. */ class TurbineGovernorUserDefined : public TurbineGovernorDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP TurbineGovernorUserDefined(); ~TurbineGovernorUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/TurbineLoadControllerDynamics.cpp b/CGMES_3.0.0/TurbineLoadControllerDynamics.cpp index fe5f1ad16..d9ae03d4f 100644 --- a/CGMES_3.0.0/TurbineLoadControllerDynamics.cpp +++ b/CGMES_3.0.0/TurbineLoadControllerDynamics.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -TurbineLoadControllerDynamics::TurbineLoadControllerDynamics() : TurbineGovernorDynamics(nullptr) {}; -TurbineLoadControllerDynamics::~TurbineLoadControllerDynamics() {}; +TurbineLoadControllerDynamics::TurbineLoadControllerDynamics() : TurbineGovernorDynamics(nullptr) {} +TurbineLoadControllerDynamics::~TurbineLoadControllerDynamics() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ TurbineLoadControllerDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_TurbineGovernorDynamics_TurbineLoadControllerDynamics(BaseClass*, BaseClass*); bool assign_TurbineLoadControllerDynamics_TurbineGovernorDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_TurbineLoadControllerDynamics_TurbineGovernorDynamics(BaseClass* Bas return false; } - bool get_TurbineLoadControllerDynamics_TurbineGovernorDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const TurbineLoadControllerDynamics* element = dynamic_cast(BaseClass_ptr1)) + const TurbineLoadControllerDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->TurbineGovernorDynamics != 0) { @@ -73,7 +71,6 @@ bool get_TurbineLoadControllerDynamics_TurbineGovernorDynamics(const BaseClass* return false; } - const char TurbineLoadControllerDynamics::debugName[] = "TurbineLoadControllerDynamics"; const char* TurbineLoadControllerDynamics::debugString() const { @@ -82,7 +79,7 @@ const char* TurbineLoadControllerDynamics::debugString() const void TurbineLoadControllerDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TurbineLoadControllerDynamics"), &TurbineLoadControllerDynamics_factory)); + factory_map.emplace("cim:TurbineLoadControllerDynamics", &TurbineLoadControllerDynamics_factory); } void TurbineLoadControllerDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void TurbineLoadControllerDynamics::addPrimitiveAssignFnsToMap(std::unordered_ma void TurbineLoadControllerDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TurbineLoadControllerDynamics.TurbineGovernorDynamics"), &assign_TurbineLoadControllerDynamics_TurbineGovernorDynamics)); + assign_map.emplace("cim:TurbineLoadControllerDynamics.TurbineGovernorDynamics", &assign_TurbineLoadControllerDynamics_TurbineGovernorDynamics); } void TurbineLoadControllerDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/TurbineLoadControllerDynamics.hpp b/CGMES_3.0.0/TurbineLoadControllerDynamics.hpp index a2373272d..3ad55b5cc 100644 --- a/CGMES_3.0.0/TurbineLoadControllerDynamics.hpp +++ b/CGMES_3.0.0/TurbineLoadControllerDynamics.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class TurbineGovernorDynamics; - /* - Turbine load controller function block whose behaviour is described by reference to a standard model or by definition of a user-defined model. - */ + /** \brief Turbine load controller function block whose behaviour is described by reference to a standard model or by definition of a user-defined model. */ class TurbineLoadControllerDynamics : public DynamicsFunctionBlock { public: @@ -27,7 +25,8 @@ namespace CIMPP TurbineLoadControllerDynamics(); ~TurbineLoadControllerDynamics() override; - CIMPP::TurbineGovernorDynamics* TurbineGovernorDynamics; /* Turbine-governor controlled by this turbine load controller. Default: 0 */ + /** \brief Turbine-governor controlled by this turbine load controller. Default: 0 */ + CIMPP::TurbineGovernorDynamics* TurbineGovernorDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/TurbineLoadControllerUserDefined.cpp b/CGMES_3.0.0/TurbineLoadControllerUserDefined.cpp index a46c191e9..842adf4c4 100644 --- a/CGMES_3.0.0/TurbineLoadControllerUserDefined.cpp +++ b/CGMES_3.0.0/TurbineLoadControllerUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -TurbineLoadControllerUserDefined::TurbineLoadControllerUserDefined() {}; -TurbineLoadControllerUserDefined::~TurbineLoadControllerUserDefined() {}; +TurbineLoadControllerUserDefined::TurbineLoadControllerUserDefined() {} +TurbineLoadControllerUserDefined::~TurbineLoadControllerUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ TurbineLoadControllerUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_TurbineLoadControllerUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (TurbineLoadControllerUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_TurbineLoadControllerUserDefined(BaseClass*, BaseClass*); bool assign_TurbineLoadControllerUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_TurbineLoadControllerUserDefined_ProprietaryParameterDynamics(BaseCl return false; } +bool assign_TurbineLoadControllerUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + TurbineLoadControllerUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_TurbineLoadControllerUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const TurbineLoadControllerUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const TurbineLoadControllerUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_TurbineLoadControllerUserDefined_proprietary(const BaseClass* BaseClass return false; } - - const char TurbineLoadControllerUserDefined::debugName[] = "TurbineLoadControllerUserDefined"; const char* TurbineLoadControllerUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* TurbineLoadControllerUserDefined::debugString() const void TurbineLoadControllerUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:TurbineLoadControllerUserDefined"), &TurbineLoadControllerUserDefined_factory)); + factory_map.emplace("cim:TurbineLoadControllerUserDefined", &TurbineLoadControllerUserDefined_factory); } void TurbineLoadControllerUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TurbineLoadControllerUserDefined.proprietary"), &assign_TurbineLoadControllerUserDefined_proprietary)); + assign_map.emplace("cim:TurbineLoadControllerUserDefined.proprietary", &assign_TurbineLoadControllerUserDefined_proprietary); } void TurbineLoadControllerUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:TurbineLoadControllerUserDefined.ProprietaryParameterDynamics"), &assign_TurbineLoadControllerUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:TurbineLoadControllerUserDefined.ProprietaryParameterDynamics", &assign_TurbineLoadControllerUserDefined_ProprietaryParameterDynamics); } void TurbineLoadControllerUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/TurbineLoadControllerUserDefined.hpp b/CGMES_3.0.0/TurbineLoadControllerUserDefined.hpp index 5fe6d418d..1acfa3ca9 100644 --- a/CGMES_3.0.0/TurbineLoadControllerUserDefined.hpp +++ b/CGMES_3.0.0/TurbineLoadControllerUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Turbine load controller function block whose dynamic behaviour is described by a user-defined model. - */ + /** \brief Turbine load controller function block whose dynamic behaviour is described by a user-defined model. */ class TurbineLoadControllerUserDefined : public TurbineLoadControllerDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP TurbineLoadControllerUserDefined(); ~TurbineLoadControllerUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/UnderexcLim2Simplified.cpp b/CGMES_3.0.0/UnderexcLim2Simplified.cpp index f26bd20ff..d3524b97d 100644 --- a/CGMES_3.0.0/UnderexcLim2Simplified.cpp +++ b/CGMES_3.0.0/UnderexcLim2Simplified.cpp @@ -8,18 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -UnderexcLim2Simplified::UnderexcLim2Simplified() {}; -UnderexcLim2Simplified::~UnderexcLim2Simplified() {}; +UnderexcLim2Simplified::UnderexcLim2Simplified() {} +UnderexcLim2Simplified::~UnderexcLim2Simplified() {} static const std::list PossibleProfilesForClass = { @@ -52,103 +45,108 @@ UnderexcLim2Simplified::getPossibleProfilesForAttributes() const return map; } - -bool assign_UnderexcLim2Simplified_kui(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLim2Simplified_kui(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kui; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLim2Simplified_p0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLim2Simplified_p0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLim2Simplified_p1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLim2Simplified_p1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLim2Simplified_q0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLim2Simplified_q0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLim2Simplified_q1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLim2Simplified_q1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLim2Simplified_vuimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLim2Simplified_vuimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vuimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLim2Simplified_vuimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLim2Simplified_vuimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vuimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_UnderexcLim2Simplified_kui(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kui; if (!buffer.str().empty()) @@ -162,7 +160,8 @@ bool get_UnderexcLim2Simplified_kui(const BaseClass* BaseClass_ptr1, std::string bool get_UnderexcLim2Simplified_p0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p0; if (!buffer.str().empty()) @@ -176,7 +175,8 @@ bool get_UnderexcLim2Simplified_p0(const BaseClass* BaseClass_ptr1, std::strings bool get_UnderexcLim2Simplified_p1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p1; if (!buffer.str().empty()) @@ -190,7 +190,8 @@ bool get_UnderexcLim2Simplified_p1(const BaseClass* BaseClass_ptr1, std::strings bool get_UnderexcLim2Simplified_q0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q0; if (!buffer.str().empty()) @@ -204,7 +205,8 @@ bool get_UnderexcLim2Simplified_q0(const BaseClass* BaseClass_ptr1, std::strings bool get_UnderexcLim2Simplified_q1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q1; if (!buffer.str().empty()) @@ -218,7 +220,8 @@ bool get_UnderexcLim2Simplified_q1(const BaseClass* BaseClass_ptr1, std::strings bool get_UnderexcLim2Simplified_vuimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vuimax; if (!buffer.str().empty()) @@ -232,7 +235,8 @@ bool get_UnderexcLim2Simplified_vuimax(const BaseClass* BaseClass_ptr1, std::str bool get_UnderexcLim2Simplified_vuimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLim2Simplified* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vuimin; if (!buffer.str().empty()) @@ -244,8 +248,6 @@ bool get_UnderexcLim2Simplified_vuimin(const BaseClass* BaseClass_ptr1, std::str return false; } - - const char UnderexcLim2Simplified::debugName[] = "UnderexcLim2Simplified"; const char* UnderexcLim2Simplified::debugString() const { @@ -254,18 +256,18 @@ const char* UnderexcLim2Simplified::debugString() const void UnderexcLim2Simplified::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:UnderexcLim2Simplified"), &UnderexcLim2Simplified_factory)); + factory_map.emplace("cim:UnderexcLim2Simplified", &UnderexcLim2Simplified_factory); } void UnderexcLim2Simplified::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:UnderexcLim2Simplified.kui"), &assign_UnderexcLim2Simplified_kui)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLim2Simplified.p0"), &assign_UnderexcLim2Simplified_p0)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLim2Simplified.p1"), &assign_UnderexcLim2Simplified_p1)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLim2Simplified.q0"), &assign_UnderexcLim2Simplified_q0)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLim2Simplified.q1"), &assign_UnderexcLim2Simplified_q1)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLim2Simplified.vuimax"), &assign_UnderexcLim2Simplified_vuimax)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLim2Simplified.vuimin"), &assign_UnderexcLim2Simplified_vuimin)); + assign_map.emplace("cim:UnderexcLim2Simplified.kui", &assign_UnderexcLim2Simplified_kui); + assign_map.emplace("cim:UnderexcLim2Simplified.p0", &assign_UnderexcLim2Simplified_p0); + assign_map.emplace("cim:UnderexcLim2Simplified.p1", &assign_UnderexcLim2Simplified_p1); + assign_map.emplace("cim:UnderexcLim2Simplified.q0", &assign_UnderexcLim2Simplified_q0); + assign_map.emplace("cim:UnderexcLim2Simplified.q1", &assign_UnderexcLim2Simplified_q1); + assign_map.emplace("cim:UnderexcLim2Simplified.vuimax", &assign_UnderexcLim2Simplified_vuimax); + assign_map.emplace("cim:UnderexcLim2Simplified.vuimin", &assign_UnderexcLim2Simplified_vuimin); } void UnderexcLim2Simplified::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/UnderexcLim2Simplified.hpp b/CGMES_3.0.0/UnderexcLim2Simplified.hpp index b7e3aa3a4..8a276e657 100644 --- a/CGMES_3.0.0/UnderexcLim2Simplified.hpp +++ b/CGMES_3.0.0/UnderexcLim2Simplified.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Simplified type UEL2 underexcitation limiter. This model can be derived from UnderexcLimIEEE2. The limit characteristic (look -up table) is a single straight-line, the same as UnderexcLimIEEE2 (see Figure 10.4 (p 32), IEEE 421.5-2005 Section 10.2). - */ + /** \brief Simplified type UEL2 underexcitation limiter. This model can be derived from UnderexcLimIEEE2. The limit characteristic (look -up table) is a single straight-line, the same as UnderexcLimIEEE2 (see Figure 10.4 (p 32), IEEE 421.5-2005 Section 10.2). */ class UnderexcLim2Simplified : public UnderexcitationLimiterDynamics { public: @@ -27,13 +25,26 @@ namespace CIMPP UnderexcLim2Simplified(); ~UnderexcLim2Simplified() override; - CIMPP::PU kui; /* Gain Under excitation limiter (<i>K</i><i><sub>UI</sub></i>). Typical value = 0,1. Default: nullptr */ - CIMPP::PU p0; /* Segment P initial point (<i>P</i><i><sub>0</sub></i>). Typical value = 0. Default: nullptr */ - CIMPP::PU p1; /* Segment P end point (<i>P</i><i><sub>1</sub></i>). Typical value = 1. Default: nullptr */ - CIMPP::PU q0; /* Segment Q initial point (<i>Q</i><i><sub>0</sub></i>). Typical value = -0,31. Default: nullptr */ - CIMPP::PU q1; /* Segment Q end point (<i>Q</i><i><sub>1</sub></i>). Typical value = -0,1. Default: nullptr */ - CIMPP::PU vuimax; /* Maximum error signal (<i>V</i><i><sub>UIMAX</sub></i>) (&gt; UnderexcLim2Simplified.vuimin). Typical value = 1. Default: nullptr */ - CIMPP::PU vuimin; /* Minimum error signal (<i>V</i><i><sub>UIMIN</sub></i>) (&lt; UnderexcLim2Simplified.vuimax). Typical value = 0. Default: nullptr */ + /** \brief Gain Under excitation limiter (<i>K</i><i><sub>UI</sub></i>). Typical value = 0,1. Default: nullptr */ + CIMPP::PU kui; + + /** \brief Segment P initial point (<i>P</i><i><sub>0</sub></i>). Typical value = 0. Default: nullptr */ + CIMPP::PU p0; + + /** \brief Segment P end point (<i>P</i><i><sub>1</sub></i>). Typical value = 1. Default: nullptr */ + CIMPP::PU p1; + + /** \brief Segment Q initial point (<i>Q</i><i><sub>0</sub></i>). Typical value = -0,31. Default: nullptr */ + CIMPP::PU q0; + + /** \brief Segment Q end point (<i>Q</i><i><sub>1</sub></i>). Typical value = -0,1. Default: nullptr */ + CIMPP::PU q1; + + /** \brief Maximum error signal (<i>V</i><i><sub>UIMAX</sub></i>) (&gt; UnderexcLim2Simplified.vuimin). Typical value = 1. Default: nullptr */ + CIMPP::PU vuimax; + + /** \brief Minimum error signal (<i>V</i><i><sub>UIMIN</sub></i>) (&lt; UnderexcLim2Simplified.vuimax). Typical value = 0. Default: nullptr */ + CIMPP::PU vuimin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/UnderexcLimIEEE1.cpp b/CGMES_3.0.0/UnderexcLimIEEE1.cpp index 56b0a574b..ed960945f 100644 --- a/CGMES_3.0.0/UnderexcLimIEEE1.cpp +++ b/CGMES_3.0.0/UnderexcLimIEEE1.cpp @@ -8,26 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -UnderexcLimIEEE1::UnderexcLimIEEE1() {}; -UnderexcLimIEEE1::~UnderexcLimIEEE1() {}; +UnderexcLimIEEE1::UnderexcLimIEEE1() {} +UnderexcLimIEEE1::~UnderexcLimIEEE1() {} static const std::list PossibleProfilesForClass = { @@ -68,207 +53,220 @@ UnderexcLimIEEE1::getPossibleProfilesForAttributes() const return map; } - -bool assign_UnderexcLimIEEE1_kuc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_kuc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kuc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_kuf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_kuf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kuf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_kui(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_kui(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kui; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_kul(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_kul(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kul; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_kur(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_kur(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kur; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_tu1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_tu1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tu1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_tu2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_tu2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tu2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_tu3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_tu3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tu3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_tu4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_tu4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tu4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_vucmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_vucmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vucmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_vuimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_vuimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vuimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_vuimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_vuimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vuimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_vulmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_vulmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vulmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_vulmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_vulmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vulmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE1_vurmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE1_vurmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vurmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_UnderexcLimIEEE1_kuc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kuc; if (!buffer.str().empty()) @@ -282,7 +280,8 @@ bool get_UnderexcLimIEEE1_kuc(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE1_kuf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kuf; if (!buffer.str().empty()) @@ -296,7 +295,8 @@ bool get_UnderexcLimIEEE1_kuf(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE1_kui(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kui; if (!buffer.str().empty()) @@ -310,7 +310,8 @@ bool get_UnderexcLimIEEE1_kui(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE1_kul(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kul; if (!buffer.str().empty()) @@ -324,7 +325,8 @@ bool get_UnderexcLimIEEE1_kul(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE1_kur(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kur; if (!buffer.str().empty()) @@ -338,7 +340,8 @@ bool get_UnderexcLimIEEE1_kur(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE1_tu1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tu1; if (!buffer.str().empty()) @@ -352,7 +355,8 @@ bool get_UnderexcLimIEEE1_tu1(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE1_tu2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tu2; if (!buffer.str().empty()) @@ -366,7 +370,8 @@ bool get_UnderexcLimIEEE1_tu2(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE1_tu3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tu3; if (!buffer.str().empty()) @@ -380,7 +385,8 @@ bool get_UnderexcLimIEEE1_tu3(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE1_tu4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tu4; if (!buffer.str().empty()) @@ -394,7 +400,8 @@ bool get_UnderexcLimIEEE1_tu4(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE1_vucmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vucmax; if (!buffer.str().empty()) @@ -408,7 +415,8 @@ bool get_UnderexcLimIEEE1_vucmax(const BaseClass* BaseClass_ptr1, std::stringstr bool get_UnderexcLimIEEE1_vuimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vuimax; if (!buffer.str().empty()) @@ -422,7 +430,8 @@ bool get_UnderexcLimIEEE1_vuimax(const BaseClass* BaseClass_ptr1, std::stringstr bool get_UnderexcLimIEEE1_vuimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vuimin; if (!buffer.str().empty()) @@ -436,7 +445,8 @@ bool get_UnderexcLimIEEE1_vuimin(const BaseClass* BaseClass_ptr1, std::stringstr bool get_UnderexcLimIEEE1_vulmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vulmax; if (!buffer.str().empty()) @@ -450,7 +460,8 @@ bool get_UnderexcLimIEEE1_vulmax(const BaseClass* BaseClass_ptr1, std::stringstr bool get_UnderexcLimIEEE1_vulmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vulmin; if (!buffer.str().empty()) @@ -464,7 +475,8 @@ bool get_UnderexcLimIEEE1_vulmin(const BaseClass* BaseClass_ptr1, std::stringstr bool get_UnderexcLimIEEE1_vurmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vurmax; if (!buffer.str().empty()) @@ -476,8 +488,6 @@ bool get_UnderexcLimIEEE1_vurmax(const BaseClass* BaseClass_ptr1, std::stringstr return false; } - - const char UnderexcLimIEEE1::debugName[] = "UnderexcLimIEEE1"; const char* UnderexcLimIEEE1::debugString() const { @@ -486,26 +496,26 @@ const char* UnderexcLimIEEE1::debugString() const void UnderexcLimIEEE1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1"), &UnderexcLimIEEE1_factory)); + factory_map.emplace("cim:UnderexcLimIEEE1", &UnderexcLimIEEE1_factory); } void UnderexcLimIEEE1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.kuc"), &assign_UnderexcLimIEEE1_kuc)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.kuf"), &assign_UnderexcLimIEEE1_kuf)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.kui"), &assign_UnderexcLimIEEE1_kui)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.kul"), &assign_UnderexcLimIEEE1_kul)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.kur"), &assign_UnderexcLimIEEE1_kur)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.tu1"), &assign_UnderexcLimIEEE1_tu1)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.tu2"), &assign_UnderexcLimIEEE1_tu2)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.tu3"), &assign_UnderexcLimIEEE1_tu3)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.tu4"), &assign_UnderexcLimIEEE1_tu4)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.vucmax"), &assign_UnderexcLimIEEE1_vucmax)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.vuimax"), &assign_UnderexcLimIEEE1_vuimax)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.vuimin"), &assign_UnderexcLimIEEE1_vuimin)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.vulmax"), &assign_UnderexcLimIEEE1_vulmax)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.vulmin"), &assign_UnderexcLimIEEE1_vulmin)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE1.vurmax"), &assign_UnderexcLimIEEE1_vurmax)); + assign_map.emplace("cim:UnderexcLimIEEE1.kuc", &assign_UnderexcLimIEEE1_kuc); + assign_map.emplace("cim:UnderexcLimIEEE1.kuf", &assign_UnderexcLimIEEE1_kuf); + assign_map.emplace("cim:UnderexcLimIEEE1.kui", &assign_UnderexcLimIEEE1_kui); + assign_map.emplace("cim:UnderexcLimIEEE1.kul", &assign_UnderexcLimIEEE1_kul); + assign_map.emplace("cim:UnderexcLimIEEE1.kur", &assign_UnderexcLimIEEE1_kur); + assign_map.emplace("cim:UnderexcLimIEEE1.tu1", &assign_UnderexcLimIEEE1_tu1); + assign_map.emplace("cim:UnderexcLimIEEE1.tu2", &assign_UnderexcLimIEEE1_tu2); + assign_map.emplace("cim:UnderexcLimIEEE1.tu3", &assign_UnderexcLimIEEE1_tu3); + assign_map.emplace("cim:UnderexcLimIEEE1.tu4", &assign_UnderexcLimIEEE1_tu4); + assign_map.emplace("cim:UnderexcLimIEEE1.vucmax", &assign_UnderexcLimIEEE1_vucmax); + assign_map.emplace("cim:UnderexcLimIEEE1.vuimax", &assign_UnderexcLimIEEE1_vuimax); + assign_map.emplace("cim:UnderexcLimIEEE1.vuimin", &assign_UnderexcLimIEEE1_vuimin); + assign_map.emplace("cim:UnderexcLimIEEE1.vulmax", &assign_UnderexcLimIEEE1_vulmax); + assign_map.emplace("cim:UnderexcLimIEEE1.vulmin", &assign_UnderexcLimIEEE1_vulmin); + assign_map.emplace("cim:UnderexcLimIEEE1.vurmax", &assign_UnderexcLimIEEE1_vurmax); } void UnderexcLimIEEE1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/UnderexcLimIEEE1.hpp b/CGMES_3.0.0/UnderexcLimIEEE1.hpp index b735a26af..49187e8b5 100644 --- a/CGMES_3.0.0/UnderexcLimIEEE1.hpp +++ b/CGMES_3.0.0/UnderexcLimIEEE1.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type UEL1 model which has a circular limit boundary when plotted in terms of machine reactive power vs. real power output. Reference: IEEE UEL1 421.5-2005, 10.1. - */ + /** \brief Type UEL1 model which has a circular limit boundary when plotted in terms of machine reactive power vs. real power output. Reference: IEEE UEL1 421.5-2005, 10.1. */ class UnderexcLimIEEE1 : public UnderexcitationLimiterDynamics { public: @@ -28,21 +26,50 @@ namespace CIMPP UnderexcLimIEEE1(); ~UnderexcLimIEEE1() override; - CIMPP::PU kuc; /* UEL centre setting (<i>K</i><i><sub>UC</sub></i>). Typical value = 1,38. Default: nullptr */ - CIMPP::PU kuf; /* UEL excitation system stabilizer gain (<i>K</i><i><sub>UF</sub></i>). Typical value = 3,3. Default: nullptr */ - CIMPP::PU kui; /* UEL integral gain (<i>K</i><i><sub>UI</sub></i>). Typical value = 0. Default: nullptr */ - CIMPP::PU kul; /* UEL proportional gain (<i>K</i><i><sub>UL</sub></i>). Typical value = 100. Default: nullptr */ - CIMPP::PU kur; /* UEL radius setting (<i>K</i><i><sub>UR</sub></i>). Typical value = 1,95. Default: nullptr */ - CIMPP::Seconds tu1; /* UEL lead time constant (<i>T</i><i><sub>U1</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tu2; /* UEL lag time constant (<i>T</i><i><sub>U2</sub></i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ - CIMPP::Seconds tu3; /* UEL lead time constant (<i>T</i><i><sub>U3</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tu4; /* UEL lag time constant (<i>T</i><i><sub>U4</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::PU vucmax; /* UEL maximum limit for operating point phasor magnitude (<i>V</i><i><sub>UCMAX</sub></i>). Typical value = 5,8. Default: nullptr */ - CIMPP::PU vuimax; /* UEL integrator output maximum limit (<i>V</i><i><sub>UIMAX</sub></i>) (&gt; UnderexcLimIEEE1.vuimin). Default: nullptr */ - CIMPP::PU vuimin; /* UEL integrator output minimum limit (<i>V</i><i><sub>UIMIN</sub></i>) (&lt; UnderexcLimIEEE1.vuimax). Default: nullptr */ - CIMPP::PU vulmax; /* UEL output maximum limit (<i>V</i><i><sub>ULMAX</sub></i>) (&gt; UnderexcLimIEEE1.vulmin). Typical value = 18. Default: nullptr */ - CIMPP::PU vulmin; /* UEL output minimum limit (<i>V</i><i><sub>ULMIN</sub></i>) (&lt; UnderexcLimIEEE1.vulmax). Typical value = -18. Default: nullptr */ - CIMPP::PU vurmax; /* UEL maximum limit for radius phasor magnitude (<i>V</i><i><sub>URMAX</sub></i>). Typical value = 5,8. Default: nullptr */ + /** \brief UEL centre setting (<i>K</i><i><sub>UC</sub></i>). Typical value = 1,38. Default: nullptr */ + CIMPP::PU kuc; + + /** \brief UEL excitation system stabilizer gain (<i>K</i><i><sub>UF</sub></i>). Typical value = 3,3. Default: nullptr */ + CIMPP::PU kuf; + + /** \brief UEL integral gain (<i>K</i><i><sub>UI</sub></i>). Typical value = 0. Default: nullptr */ + CIMPP::PU kui; + + /** \brief UEL proportional gain (<i>K</i><i><sub>UL</sub></i>). Typical value = 100. Default: nullptr */ + CIMPP::PU kul; + + /** \brief UEL radius setting (<i>K</i><i><sub>UR</sub></i>). Typical value = 1,95. Default: nullptr */ + CIMPP::PU kur; + + /** \brief UEL lead time constant (<i>T</i><i><sub>U1</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tu1; + + /** \brief UEL lag time constant (<i>T</i><i><sub>U2</sub></i>) (&gt;= 0). Typical value = 0,05. Default: nullptr */ + CIMPP::Seconds tu2; + + /** \brief UEL lead time constant (<i>T</i><i><sub>U3</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tu3; + + /** \brief UEL lag time constant (<i>T</i><i><sub>U4</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tu4; + + /** \brief UEL maximum limit for operating point phasor magnitude (<i>V</i><i><sub>UCMAX</sub></i>). Typical value = 5,8. Default: nullptr */ + CIMPP::PU vucmax; + + /** \brief UEL integrator output maximum limit (<i>V</i><i><sub>UIMAX</sub></i>) (&gt; UnderexcLimIEEE1.vuimin). Default: nullptr */ + CIMPP::PU vuimax; + + /** \brief UEL integrator output minimum limit (<i>V</i><i><sub>UIMIN</sub></i>) (&lt; UnderexcLimIEEE1.vuimax). Default: nullptr */ + CIMPP::PU vuimin; + + /** \brief UEL output maximum limit (<i>V</i><i><sub>ULMAX</sub></i>) (&gt; UnderexcLimIEEE1.vulmin). Typical value = 18. Default: nullptr */ + CIMPP::PU vulmax; + + /** \brief UEL output minimum limit (<i>V</i><i><sub>ULMIN</sub></i>) (&lt; UnderexcLimIEEE1.vulmax). Typical value = -18. Default: nullptr */ + CIMPP::PU vulmin; + + /** \brief UEL maximum limit for radius phasor magnitude (<i>V</i><i><sub>URMAX</sub></i>). Typical value = 5,8. Default: nullptr */ + CIMPP::PU vurmax; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/UnderexcLimIEEE2.cpp b/CGMES_3.0.0/UnderexcLimIEEE2.cpp index 81994b23b..da9274105 100644 --- a/CGMES_3.0.0/UnderexcLimIEEE2.cpp +++ b/CGMES_3.0.0/UnderexcLimIEEE2.cpp @@ -8,51 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Float.hpp" -#include "Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -UnderexcLimIEEE2::UnderexcLimIEEE2() {}; -UnderexcLimIEEE2::~UnderexcLimIEEE2() {}; +UnderexcLimIEEE2::UnderexcLimIEEE2() {} +UnderexcLimIEEE2::~UnderexcLimIEEE2() {} static const std::list PossibleProfilesForClass = { @@ -118,532 +78,570 @@ UnderexcLimIEEE2::getPossibleProfilesForAttributes() const return map; } - -bool assign_UnderexcLimIEEE2_k1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_k1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_k2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_k2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_kfb(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_kfb(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kfb; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_kuf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_kuf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kuf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_kui(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_kui(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kui; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_kul(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_kul(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kul; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_p9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_p9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->p9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q10(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q10(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q10; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q5(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q5(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q5; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q6(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q6(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q6; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q7(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q7(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q7; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q8(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q8(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q8; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_q9(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_q9(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->q9; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_tu1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_tu1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tu1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_tu2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_tu2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tu2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_tu3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_tu3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tu3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_tu4(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_tu4(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tu4; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_tul(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_tul(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tul; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_tup(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_tup(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tup; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_tuq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_tuq(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tuq; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_tuv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_tuv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tuv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_vuimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_vuimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vuimax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_vuimin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_vuimin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vuimin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_vulmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_vulmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vulmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimIEEE2_vulmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimIEEE2_vulmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vulmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_UnderexcLimIEEE2_k1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k1; if (!buffer.str().empty()) @@ -657,7 +655,8 @@ bool get_UnderexcLimIEEE2_k1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_k2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k2; if (!buffer.str().empty()) @@ -671,7 +670,8 @@ bool get_UnderexcLimIEEE2_k2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_kfb(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kfb; if (!buffer.str().empty()) @@ -685,7 +685,8 @@ bool get_UnderexcLimIEEE2_kfb(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_kuf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kuf; if (!buffer.str().empty()) @@ -699,7 +700,8 @@ bool get_UnderexcLimIEEE2_kuf(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_kui(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kui; if (!buffer.str().empty()) @@ -713,7 +715,8 @@ bool get_UnderexcLimIEEE2_kui(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_kul(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kul; if (!buffer.str().empty()) @@ -727,7 +730,8 @@ bool get_UnderexcLimIEEE2_kul(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_p0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p0; if (!buffer.str().empty()) @@ -741,7 +745,8 @@ bool get_UnderexcLimIEEE2_p0(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_p1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p1; if (!buffer.str().empty()) @@ -755,7 +760,8 @@ bool get_UnderexcLimIEEE2_p1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_p10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p10; if (!buffer.str().empty()) @@ -769,7 +775,8 @@ bool get_UnderexcLimIEEE2_p10(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_p2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p2; if (!buffer.str().empty()) @@ -783,7 +790,8 @@ bool get_UnderexcLimIEEE2_p2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_p3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p3; if (!buffer.str().empty()) @@ -797,7 +805,8 @@ bool get_UnderexcLimIEEE2_p3(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_p4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p4; if (!buffer.str().empty()) @@ -811,7 +820,8 @@ bool get_UnderexcLimIEEE2_p4(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_p5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p5; if (!buffer.str().empty()) @@ -825,7 +835,8 @@ bool get_UnderexcLimIEEE2_p5(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_p6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p6; if (!buffer.str().empty()) @@ -839,7 +850,8 @@ bool get_UnderexcLimIEEE2_p6(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_p7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p7; if (!buffer.str().empty()) @@ -853,7 +865,8 @@ bool get_UnderexcLimIEEE2_p7(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_p8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p8; if (!buffer.str().empty()) @@ -867,7 +880,8 @@ bool get_UnderexcLimIEEE2_p8(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_p9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->p9; if (!buffer.str().empty()) @@ -881,7 +895,8 @@ bool get_UnderexcLimIEEE2_p9(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q0; if (!buffer.str().empty()) @@ -895,7 +910,8 @@ bool get_UnderexcLimIEEE2_q0(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q1; if (!buffer.str().empty()) @@ -909,7 +925,8 @@ bool get_UnderexcLimIEEE2_q1(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q10(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q10; if (!buffer.str().empty()) @@ -923,7 +940,8 @@ bool get_UnderexcLimIEEE2_q10(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_q2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q2; if (!buffer.str().empty()) @@ -937,7 +955,8 @@ bool get_UnderexcLimIEEE2_q2(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q3; if (!buffer.str().empty()) @@ -951,7 +970,8 @@ bool get_UnderexcLimIEEE2_q3(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q4; if (!buffer.str().empty()) @@ -965,7 +985,8 @@ bool get_UnderexcLimIEEE2_q4(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q5(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q5; if (!buffer.str().empty()) @@ -979,7 +1000,8 @@ bool get_UnderexcLimIEEE2_q5(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q6(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q6; if (!buffer.str().empty()) @@ -993,7 +1015,8 @@ bool get_UnderexcLimIEEE2_q6(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q7(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q7; if (!buffer.str().empty()) @@ -1007,7 +1030,8 @@ bool get_UnderexcLimIEEE2_q7(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q8(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q8; if (!buffer.str().empty()) @@ -1021,7 +1045,8 @@ bool get_UnderexcLimIEEE2_q8(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_q9(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->q9; if (!buffer.str().empty()) @@ -1035,7 +1060,8 @@ bool get_UnderexcLimIEEE2_q9(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_UnderexcLimIEEE2_tu1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tu1; if (!buffer.str().empty()) @@ -1049,7 +1075,8 @@ bool get_UnderexcLimIEEE2_tu1(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_tu2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tu2; if (!buffer.str().empty()) @@ -1063,7 +1090,8 @@ bool get_UnderexcLimIEEE2_tu2(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_tu3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tu3; if (!buffer.str().empty()) @@ -1077,7 +1105,8 @@ bool get_UnderexcLimIEEE2_tu3(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_tu4(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tu4; if (!buffer.str().empty()) @@ -1091,7 +1120,8 @@ bool get_UnderexcLimIEEE2_tu4(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_tul(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tul; if (!buffer.str().empty()) @@ -1105,7 +1135,8 @@ bool get_UnderexcLimIEEE2_tul(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_tup(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tup; if (!buffer.str().empty()) @@ -1119,7 +1150,8 @@ bool get_UnderexcLimIEEE2_tup(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_tuq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tuq; if (!buffer.str().empty()) @@ -1133,7 +1165,8 @@ bool get_UnderexcLimIEEE2_tuq(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_tuv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tuv; if (!buffer.str().empty()) @@ -1147,7 +1180,8 @@ bool get_UnderexcLimIEEE2_tuv(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimIEEE2_vuimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vuimax; if (!buffer.str().empty()) @@ -1161,7 +1195,8 @@ bool get_UnderexcLimIEEE2_vuimax(const BaseClass* BaseClass_ptr1, std::stringstr bool get_UnderexcLimIEEE2_vuimin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vuimin; if (!buffer.str().empty()) @@ -1175,7 +1210,8 @@ bool get_UnderexcLimIEEE2_vuimin(const BaseClass* BaseClass_ptr1, std::stringstr bool get_UnderexcLimIEEE2_vulmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vulmax; if (!buffer.str().empty()) @@ -1189,7 +1225,8 @@ bool get_UnderexcLimIEEE2_vulmax(const BaseClass* BaseClass_ptr1, std::stringstr bool get_UnderexcLimIEEE2_vulmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimIEEE2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vulmin; if (!buffer.str().empty()) @@ -1201,8 +1238,6 @@ bool get_UnderexcLimIEEE2_vulmin(const BaseClass* BaseClass_ptr1, std::stringstr return false; } - - const char UnderexcLimIEEE2::debugName[] = "UnderexcLimIEEE2"; const char* UnderexcLimIEEE2::debugString() const { @@ -1211,51 +1246,51 @@ const char* UnderexcLimIEEE2::debugString() const void UnderexcLimIEEE2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2"), &UnderexcLimIEEE2_factory)); + factory_map.emplace("cim:UnderexcLimIEEE2", &UnderexcLimIEEE2_factory); } void UnderexcLimIEEE2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.k1"), &assign_UnderexcLimIEEE2_k1)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.k2"), &assign_UnderexcLimIEEE2_k2)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.kfb"), &assign_UnderexcLimIEEE2_kfb)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.kuf"), &assign_UnderexcLimIEEE2_kuf)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.kui"), &assign_UnderexcLimIEEE2_kui)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.kul"), &assign_UnderexcLimIEEE2_kul)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p0"), &assign_UnderexcLimIEEE2_p0)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p1"), &assign_UnderexcLimIEEE2_p1)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p10"), &assign_UnderexcLimIEEE2_p10)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p2"), &assign_UnderexcLimIEEE2_p2)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p3"), &assign_UnderexcLimIEEE2_p3)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p4"), &assign_UnderexcLimIEEE2_p4)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p5"), &assign_UnderexcLimIEEE2_p5)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p6"), &assign_UnderexcLimIEEE2_p6)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p7"), &assign_UnderexcLimIEEE2_p7)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p8"), &assign_UnderexcLimIEEE2_p8)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.p9"), &assign_UnderexcLimIEEE2_p9)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q0"), &assign_UnderexcLimIEEE2_q0)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q1"), &assign_UnderexcLimIEEE2_q1)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q10"), &assign_UnderexcLimIEEE2_q10)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q2"), &assign_UnderexcLimIEEE2_q2)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q3"), &assign_UnderexcLimIEEE2_q3)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q4"), &assign_UnderexcLimIEEE2_q4)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q5"), &assign_UnderexcLimIEEE2_q5)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q6"), &assign_UnderexcLimIEEE2_q6)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q7"), &assign_UnderexcLimIEEE2_q7)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q8"), &assign_UnderexcLimIEEE2_q8)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.q9"), &assign_UnderexcLimIEEE2_q9)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.tu1"), &assign_UnderexcLimIEEE2_tu1)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.tu2"), &assign_UnderexcLimIEEE2_tu2)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.tu3"), &assign_UnderexcLimIEEE2_tu3)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.tu4"), &assign_UnderexcLimIEEE2_tu4)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.tul"), &assign_UnderexcLimIEEE2_tul)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.tup"), &assign_UnderexcLimIEEE2_tup)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.tuq"), &assign_UnderexcLimIEEE2_tuq)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.tuv"), &assign_UnderexcLimIEEE2_tuv)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.vuimax"), &assign_UnderexcLimIEEE2_vuimax)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.vuimin"), &assign_UnderexcLimIEEE2_vuimin)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.vulmax"), &assign_UnderexcLimIEEE2_vulmax)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimIEEE2.vulmin"), &assign_UnderexcLimIEEE2_vulmin)); + assign_map.emplace("cim:UnderexcLimIEEE2.k1", &assign_UnderexcLimIEEE2_k1); + assign_map.emplace("cim:UnderexcLimIEEE2.k2", &assign_UnderexcLimIEEE2_k2); + assign_map.emplace("cim:UnderexcLimIEEE2.kfb", &assign_UnderexcLimIEEE2_kfb); + assign_map.emplace("cim:UnderexcLimIEEE2.kuf", &assign_UnderexcLimIEEE2_kuf); + assign_map.emplace("cim:UnderexcLimIEEE2.kui", &assign_UnderexcLimIEEE2_kui); + assign_map.emplace("cim:UnderexcLimIEEE2.kul", &assign_UnderexcLimIEEE2_kul); + assign_map.emplace("cim:UnderexcLimIEEE2.p0", &assign_UnderexcLimIEEE2_p0); + assign_map.emplace("cim:UnderexcLimIEEE2.p1", &assign_UnderexcLimIEEE2_p1); + assign_map.emplace("cim:UnderexcLimIEEE2.p10", &assign_UnderexcLimIEEE2_p10); + assign_map.emplace("cim:UnderexcLimIEEE2.p2", &assign_UnderexcLimIEEE2_p2); + assign_map.emplace("cim:UnderexcLimIEEE2.p3", &assign_UnderexcLimIEEE2_p3); + assign_map.emplace("cim:UnderexcLimIEEE2.p4", &assign_UnderexcLimIEEE2_p4); + assign_map.emplace("cim:UnderexcLimIEEE2.p5", &assign_UnderexcLimIEEE2_p5); + assign_map.emplace("cim:UnderexcLimIEEE2.p6", &assign_UnderexcLimIEEE2_p6); + assign_map.emplace("cim:UnderexcLimIEEE2.p7", &assign_UnderexcLimIEEE2_p7); + assign_map.emplace("cim:UnderexcLimIEEE2.p8", &assign_UnderexcLimIEEE2_p8); + assign_map.emplace("cim:UnderexcLimIEEE2.p9", &assign_UnderexcLimIEEE2_p9); + assign_map.emplace("cim:UnderexcLimIEEE2.q0", &assign_UnderexcLimIEEE2_q0); + assign_map.emplace("cim:UnderexcLimIEEE2.q1", &assign_UnderexcLimIEEE2_q1); + assign_map.emplace("cim:UnderexcLimIEEE2.q10", &assign_UnderexcLimIEEE2_q10); + assign_map.emplace("cim:UnderexcLimIEEE2.q2", &assign_UnderexcLimIEEE2_q2); + assign_map.emplace("cim:UnderexcLimIEEE2.q3", &assign_UnderexcLimIEEE2_q3); + assign_map.emplace("cim:UnderexcLimIEEE2.q4", &assign_UnderexcLimIEEE2_q4); + assign_map.emplace("cim:UnderexcLimIEEE2.q5", &assign_UnderexcLimIEEE2_q5); + assign_map.emplace("cim:UnderexcLimIEEE2.q6", &assign_UnderexcLimIEEE2_q6); + assign_map.emplace("cim:UnderexcLimIEEE2.q7", &assign_UnderexcLimIEEE2_q7); + assign_map.emplace("cim:UnderexcLimIEEE2.q8", &assign_UnderexcLimIEEE2_q8); + assign_map.emplace("cim:UnderexcLimIEEE2.q9", &assign_UnderexcLimIEEE2_q9); + assign_map.emplace("cim:UnderexcLimIEEE2.tu1", &assign_UnderexcLimIEEE2_tu1); + assign_map.emplace("cim:UnderexcLimIEEE2.tu2", &assign_UnderexcLimIEEE2_tu2); + assign_map.emplace("cim:UnderexcLimIEEE2.tu3", &assign_UnderexcLimIEEE2_tu3); + assign_map.emplace("cim:UnderexcLimIEEE2.tu4", &assign_UnderexcLimIEEE2_tu4); + assign_map.emplace("cim:UnderexcLimIEEE2.tul", &assign_UnderexcLimIEEE2_tul); + assign_map.emplace("cim:UnderexcLimIEEE2.tup", &assign_UnderexcLimIEEE2_tup); + assign_map.emplace("cim:UnderexcLimIEEE2.tuq", &assign_UnderexcLimIEEE2_tuq); + assign_map.emplace("cim:UnderexcLimIEEE2.tuv", &assign_UnderexcLimIEEE2_tuv); + assign_map.emplace("cim:UnderexcLimIEEE2.vuimax", &assign_UnderexcLimIEEE2_vuimax); + assign_map.emplace("cim:UnderexcLimIEEE2.vuimin", &assign_UnderexcLimIEEE2_vuimin); + assign_map.emplace("cim:UnderexcLimIEEE2.vulmax", &assign_UnderexcLimIEEE2_vulmax); + assign_map.emplace("cim:UnderexcLimIEEE2.vulmin", &assign_UnderexcLimIEEE2_vulmin); } void UnderexcLimIEEE2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/UnderexcLimIEEE2.hpp b/CGMES_3.0.0/UnderexcLimIEEE2.hpp index 06fa6e755..d09fa6a51 100644 --- a/CGMES_3.0.0/UnderexcLimIEEE2.hpp +++ b/CGMES_3.0.0/UnderexcLimIEEE2.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Type UEL2 underexcitation limiter which has either a straight-line or multi-segment characteristic when plotted in terms of machine reactive power output vs. real power output. Reference: IEEE UEL2 421.5-2005, 10.2 (limit characteristic lookup table shown in Figure 10.4 (p 32)). - */ + /** \brief Type UEL2 underexcitation limiter which has either a straight-line or multi-segment characteristic when plotted in terms of machine reactive power output vs. real power output. Reference: IEEE UEL2 421.5-2005, 10.2 (limit characteristic lookup table shown in Figure 10.4 (p 32)). */ class UnderexcLimIEEE2 : public UnderexcitationLimiterDynamics { public: @@ -29,46 +27,125 @@ namespace CIMPP UnderexcLimIEEE2(); ~UnderexcLimIEEE2() override; - CIMPP::Float k1; /* UEL terminal voltage exponent applied to real power input to UEL limit look-up table (<i>k1</i>). Typical value = 2. Default: 0.0 */ - CIMPP::Float k2; /* UEL terminal voltage exponent applied to reactive power output from UEL limit look-up table (<i>k2</i>). Typical value = 2. Default: 0.0 */ - CIMPP::PU kfb; /* Gain associated with optional integrator feedback input signal to UEL (<i>K</i><i><sub>FB</sub></i>). Typical value = 0. Default: nullptr */ - CIMPP::PU kuf; /* UEL excitation system stabilizer gain (<i>K</i><i><sub>UF</sub></i>). Typical value = 0. Default: nullptr */ - CIMPP::PU kui; /* UEL integral gain (<i>K</i><i><sub>UI</sub></i>). Typical value = 0,5. Default: nullptr */ - CIMPP::PU kul; /* UEL proportional gain (<i>K</i><i><sub>UL</sub></i>). Typical value = 0,8. Default: nullptr */ - CIMPP::PU p0; /* Real power values for endpoints (<i>P</i><i><sub>0</sub></i>). Typical value = 0. Default: nullptr */ - CIMPP::PU p1; /* Real power values for endpoints (<i>P</i><i><sub>1</sub></i>). Typical value = 0,3. Default: nullptr */ - CIMPP::PU p10; /* Real power values for endpoints (<i>P</i><i><sub>10</sub></i>). Default: nullptr */ - CIMPP::PU p2; /* Real power values for endpoints (<i>P</i><i><sub>2</sub></i>). Typical value = 0,6. Default: nullptr */ - CIMPP::PU p3; /* Real power values for endpoints (<i>P</i><i><sub>3</sub></i>). Typical value = 0,9. Default: nullptr */ - CIMPP::PU p4; /* Real power values for endpoints (<i>P</i><i><sub>4</sub></i>). Typical value = 1,02. Default: nullptr */ - CIMPP::PU p5; /* Real power values for endpoints (<i>P</i><i><sub>5</sub></i>). Default: nullptr */ - CIMPP::PU p6; /* Real power values for endpoints (<i>P</i><i><sub>6</sub></i>). Default: nullptr */ - CIMPP::PU p7; /* Real power values for endpoints (<i>P</i><i><sub>7</sub></i>). Default: nullptr */ - CIMPP::PU p8; /* Real power values for endpoints (<i>P</i><i><sub>8</sub></i>). Default: nullptr */ - CIMPP::PU p9; /* Real power values for endpoints (<i>P</i><i><sub>9</sub></i>). Default: nullptr */ - CIMPP::PU q0; /* Reactive power values for endpoints (<i>Q</i><i><sub>0</sub></i>). Typical value = -0,31. Default: nullptr */ - CIMPP::PU q1; /* Reactive power values for endpoints (<i>Q</i><i><sub>1</sub></i>). Typical value = -0,31. Default: nullptr */ - CIMPP::PU q10; /* Reactive power values for endpoints (<i>Q</i><i><sub>10</sub></i>). Default: nullptr */ - CIMPP::PU q2; /* Reactive power values for endpoints (<i>Q</i><i><sub>2</sub></i>). Typical value = -0,28. Default: nullptr */ - CIMPP::PU q3; /* Reactive power values for endpoints (<i>Q</i><i><sub>3</sub></i>). Typical value = -0,21. Default: nullptr */ - CIMPP::PU q4; /* Reactive power values for endpoints (<i>Q</i><i><sub>4</sub></i>). Typical value = 0. Default: nullptr */ - CIMPP::PU q5; /* Reactive power values for endpoints (<i>Q</i><i><sub>5</sub></i>). Default: nullptr */ - CIMPP::PU q6; /* Reactive power values for endpoints (<i>Q</i><i><sub>6</sub></i>). Default: nullptr */ - CIMPP::PU q7; /* Reactive power values for endpoints (<i>Q</i><i><sub>7</sub></i>). Default: nullptr */ - CIMPP::PU q8; /* Reactive power values for endpoints (<i>Q</i><i><sub>8</sub></i>). Default: nullptr */ - CIMPP::PU q9; /* Reactive power values for endpoints (<i>Q</i><i><sub>9</sub></i>). Default: nullptr */ - CIMPP::Seconds tu1; /* UEL lead time constant (<i>T</i><i><sub>U1</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tu2; /* UEL lag time constant (<i>T</i><i><sub>U2</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tu3; /* UEL lead time constant (<i>T</i><i><sub>U3</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tu4; /* UEL lag time constant (<i>T</i><i><sub>U4</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tul; /* Time constant associated with optional integrator feedback input signal to UEL (<i>T</i><i><sub>UL</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tup; /* Real power filter time constant (<i>T</i><i><sub>UP</sub></i>) (&gt;= 0). Typical value = 5. Default: nullptr */ - CIMPP::Seconds tuq; /* Reactive power filter time constant (<i>T</i><i><sub>UQ</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ - CIMPP::Seconds tuv; /* Voltage filter time constant (<i>T</i><i><sub>UV</sub></i>) (&gt;= 0). Typical value = 5. Default: nullptr */ - CIMPP::PU vuimax; /* UEL integrator output maximum limit (<i>V</i><i><sub>UIMAX</sub></i>) (&gt; UnderexcLimIEEE2.vuimin). Typical value = 0,25. Default: nullptr */ - CIMPP::PU vuimin; /* UEL integrator output minimum limit (<i>V</i><i><sub>UIMIN</sub></i>) (&lt; UnderexcLimIEEE2.vuimax). Typical value = 0. Default: nullptr */ - CIMPP::PU vulmax; /* UEL output maximum limit (<i>V</i><i><sub>ULMAX</sub></i>) (&gt; UnderexcLimIEEE2.vulmin). Typical value = 0,25. Default: nullptr */ - CIMPP::PU vulmin; /* UEL output minimum limit (<i>V</i><i><sub>ULMIN</sub></i>) (&lt; UnderexcLimIEEE2.vulmax). Typical value = 0. Default: nullptr */ + /** \brief UEL terminal voltage exponent applied to real power input to UEL limit look-up table (<i>k1</i>). Typical value = 2. Default: 0.0 */ + CIMPP::Float k1; + + /** \brief UEL terminal voltage exponent applied to reactive power output from UEL limit look-up table (<i>k2</i>). Typical value = 2. Default: 0.0 */ + CIMPP::Float k2; + + /** \brief Gain associated with optional integrator feedback input signal to UEL (<i>K</i><i><sub>FB</sub></i>). Typical value = 0. Default: nullptr */ + CIMPP::PU kfb; + + /** \brief UEL excitation system stabilizer gain (<i>K</i><i><sub>UF</sub></i>). Typical value = 0. Default: nullptr */ + CIMPP::PU kuf; + + /** \brief UEL integral gain (<i>K</i><i><sub>UI</sub></i>). Typical value = 0,5. Default: nullptr */ + CIMPP::PU kui; + + /** \brief UEL proportional gain (<i>K</i><i><sub>UL</sub></i>). Typical value = 0,8. Default: nullptr */ + CIMPP::PU kul; + + /** \brief Real power values for endpoints (<i>P</i><i><sub>0</sub></i>). Typical value = 0. Default: nullptr */ + CIMPP::PU p0; + + /** \brief Real power values for endpoints (<i>P</i><i><sub>1</sub></i>). Typical value = 0,3. Default: nullptr */ + CIMPP::PU p1; + + /** \brief Real power values for endpoints (<i>P</i><i><sub>10</sub></i>). Default: nullptr */ + CIMPP::PU p10; + + /** \brief Real power values for endpoints (<i>P</i><i><sub>2</sub></i>). Typical value = 0,6. Default: nullptr */ + CIMPP::PU p2; + + /** \brief Real power values for endpoints (<i>P</i><i><sub>3</sub></i>). Typical value = 0,9. Default: nullptr */ + CIMPP::PU p3; + + /** \brief Real power values for endpoints (<i>P</i><i><sub>4</sub></i>). Typical value = 1,02. Default: nullptr */ + CIMPP::PU p4; + + /** \brief Real power values for endpoints (<i>P</i><i><sub>5</sub></i>). Default: nullptr */ + CIMPP::PU p5; + + /** \brief Real power values for endpoints (<i>P</i><i><sub>6</sub></i>). Default: nullptr */ + CIMPP::PU p6; + + /** \brief Real power values for endpoints (<i>P</i><i><sub>7</sub></i>). Default: nullptr */ + CIMPP::PU p7; + + /** \brief Real power values for endpoints (<i>P</i><i><sub>8</sub></i>). Default: nullptr */ + CIMPP::PU p8; + + /** \brief Real power values for endpoints (<i>P</i><i><sub>9</sub></i>). Default: nullptr */ + CIMPP::PU p9; + + /** \brief Reactive power values for endpoints (<i>Q</i><i><sub>0</sub></i>). Typical value = -0,31. Default: nullptr */ + CIMPP::PU q0; + + /** \brief Reactive power values for endpoints (<i>Q</i><i><sub>1</sub></i>). Typical value = -0,31. Default: nullptr */ + CIMPP::PU q1; + + /** \brief Reactive power values for endpoints (<i>Q</i><i><sub>10</sub></i>). Default: nullptr */ + CIMPP::PU q10; + + /** \brief Reactive power values for endpoints (<i>Q</i><i><sub>2</sub></i>). Typical value = -0,28. Default: nullptr */ + CIMPP::PU q2; + + /** \brief Reactive power values for endpoints (<i>Q</i><i><sub>3</sub></i>). Typical value = -0,21. Default: nullptr */ + CIMPP::PU q3; + + /** \brief Reactive power values for endpoints (<i>Q</i><i><sub>4</sub></i>). Typical value = 0. Default: nullptr */ + CIMPP::PU q4; + + /** \brief Reactive power values for endpoints (<i>Q</i><i><sub>5</sub></i>). Default: nullptr */ + CIMPP::PU q5; + + /** \brief Reactive power values for endpoints (<i>Q</i><i><sub>6</sub></i>). Default: nullptr */ + CIMPP::PU q6; + + /** \brief Reactive power values for endpoints (<i>Q</i><i><sub>7</sub></i>). Default: nullptr */ + CIMPP::PU q7; + + /** \brief Reactive power values for endpoints (<i>Q</i><i><sub>8</sub></i>). Default: nullptr */ + CIMPP::PU q8; + + /** \brief Reactive power values for endpoints (<i>Q</i><i><sub>9</sub></i>). Default: nullptr */ + CIMPP::PU q9; + + /** \brief UEL lead time constant (<i>T</i><i><sub>U1</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tu1; + + /** \brief UEL lag time constant (<i>T</i><i><sub>U2</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tu2; + + /** \brief UEL lead time constant (<i>T</i><i><sub>U3</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tu3; + + /** \brief UEL lag time constant (<i>T</i><i><sub>U4</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tu4; + + /** \brief Time constant associated with optional integrator feedback input signal to UEL (<i>T</i><i><sub>UL</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tul; + + /** \brief Real power filter time constant (<i>T</i><i><sub>UP</sub></i>) (&gt;= 0). Typical value = 5. Default: nullptr */ + CIMPP::Seconds tup; + + /** \brief Reactive power filter time constant (<i>T</i><i><sub>UQ</sub></i>) (&gt;= 0). Typical value = 0. Default: nullptr */ + CIMPP::Seconds tuq; + + /** \brief Voltage filter time constant (<i>T</i><i><sub>UV</sub></i>) (&gt;= 0). Typical value = 5. Default: nullptr */ + CIMPP::Seconds tuv; + + /** \brief UEL integrator output maximum limit (<i>V</i><i><sub>UIMAX</sub></i>) (&gt; UnderexcLimIEEE2.vuimin). Typical value = 0,25. Default: nullptr */ + CIMPP::PU vuimax; + + /** \brief UEL integrator output minimum limit (<i>V</i><i><sub>UIMIN</sub></i>) (&lt; UnderexcLimIEEE2.vuimax). Typical value = 0. Default: nullptr */ + CIMPP::PU vuimin; + + /** \brief UEL output maximum limit (<i>V</i><i><sub>ULMAX</sub></i>) (&gt; UnderexcLimIEEE2.vulmin). Typical value = 0,25. Default: nullptr */ + CIMPP::PU vulmax; + + /** \brief UEL output minimum limit (<i>V</i><i><sub>ULMIN</sub></i>) (&lt; UnderexcLimIEEE2.vulmax). Typical value = 0. Default: nullptr */ + CIMPP::PU vulmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/UnderexcLimX1.cpp b/CGMES_3.0.0/UnderexcLimX1.cpp index cba09ede6..a14d1ce69 100644 --- a/CGMES_3.0.0/UnderexcLimX1.cpp +++ b/CGMES_3.0.0/UnderexcLimX1.cpp @@ -8,17 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -UnderexcLimX1::UnderexcLimX1() {}; -UnderexcLimX1::~UnderexcLimX1() {}; +UnderexcLimX1::UnderexcLimX1() {} +UnderexcLimX1::~UnderexcLimX1() {} static const std::list PossibleProfilesForClass = { @@ -50,90 +44,94 @@ UnderexcLimX1::getPossibleProfilesForAttributes() const return map; } - -bool assign_UnderexcLimX1_k(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX1_k(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->k; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX1_kf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX1_kf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX1_km(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX1_km(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->km; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX1_melmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX1_melmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->melmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX1_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX1_tf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX1_tm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX1_tm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_UnderexcLimX1_k(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->k; if (!buffer.str().empty()) @@ -147,7 +145,8 @@ bool get_UnderexcLimX1_k(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_UnderexcLimX1_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf2; if (!buffer.str().empty()) @@ -161,7 +160,8 @@ bool get_UnderexcLimX1_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_UnderexcLimX1_km(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->km; if (!buffer.str().empty()) @@ -175,7 +175,8 @@ bool get_UnderexcLimX1_km(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_UnderexcLimX1_melmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->melmax; if (!buffer.str().empty()) @@ -189,7 +190,8 @@ bool get_UnderexcLimX1_melmax(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimX1_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf2; if (!buffer.str().empty()) @@ -203,7 +205,8 @@ bool get_UnderexcLimX1_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_UnderexcLimX1_tm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tm; if (!buffer.str().empty()) @@ -215,8 +218,6 @@ bool get_UnderexcLimX1_tm(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char UnderexcLimX1::debugName[] = "UnderexcLimX1"; const char* UnderexcLimX1::debugString() const { @@ -225,17 +226,17 @@ const char* UnderexcLimX1::debugString() const void UnderexcLimX1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:UnderexcLimX1"), &UnderexcLimX1_factory)); + factory_map.emplace("cim:UnderexcLimX1", &UnderexcLimX1_factory); } void UnderexcLimX1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX1.k"), &assign_UnderexcLimX1_k)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX1.kf2"), &assign_UnderexcLimX1_kf2)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX1.km"), &assign_UnderexcLimX1_km)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX1.melmax"), &assign_UnderexcLimX1_melmax)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX1.tf2"), &assign_UnderexcLimX1_tf2)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX1.tm"), &assign_UnderexcLimX1_tm)); + assign_map.emplace("cim:UnderexcLimX1.k", &assign_UnderexcLimX1_k); + assign_map.emplace("cim:UnderexcLimX1.kf2", &assign_UnderexcLimX1_kf2); + assign_map.emplace("cim:UnderexcLimX1.km", &assign_UnderexcLimX1_km); + assign_map.emplace("cim:UnderexcLimX1.melmax", &assign_UnderexcLimX1_melmax); + assign_map.emplace("cim:UnderexcLimX1.tf2", &assign_UnderexcLimX1_tf2); + assign_map.emplace("cim:UnderexcLimX1.tm", &assign_UnderexcLimX1_tm); } void UnderexcLimX1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/UnderexcLimX1.hpp b/CGMES_3.0.0/UnderexcLimX1.hpp index ab68c4d0d..70ab402fd 100644 --- a/CGMES_3.0.0/UnderexcLimX1.hpp +++ b/CGMES_3.0.0/UnderexcLimX1.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Allis-Chalmers minimum excitation limiter. - */ + /** \brief Allis-Chalmers minimum excitation limiter. */ class UnderexcLimX1 : public UnderexcitationLimiterDynamics { public: @@ -28,12 +26,23 @@ namespace CIMPP UnderexcLimX1(); ~UnderexcLimX1() override; - CIMPP::PU k; /* Minimum excitation limit slope (<i>K</i>) (&gt; 0). Default: nullptr */ - CIMPP::PU kf2; /* Differential gain (<i>K</i><i><sub>F2</sub></i>). Default: nullptr */ - CIMPP::PU km; /* Minimum excitation limit gain (<i>K</i><i><sub>M</sub></i>). Default: nullptr */ - CIMPP::PU melmax; /* Minimum excitation limit value (<i>MELMAX</i>). Default: nullptr */ - CIMPP::Seconds tf2; /* Differential time constant (<i>T</i><i><sub>F2</sub></i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds tm; /* Minimum excitation limit time constant (<i>T</i><i><sub>M</sub></i>) (&gt;= 0). Default: nullptr */ + /** \brief Minimum excitation limit slope (<i>K</i>) (&gt; 0). Default: nullptr */ + CIMPP::PU k; + + /** \brief Differential gain (<i>K</i><i><sub>F2</sub></i>). Default: nullptr */ + CIMPP::PU kf2; + + /** \brief Minimum excitation limit gain (<i>K</i><i><sub>M</sub></i>). Default: nullptr */ + CIMPP::PU km; + + /** \brief Minimum excitation limit value (<i>MELMAX</i>). Default: nullptr */ + CIMPP::PU melmax; + + /** \brief Differential time constant (<i>T</i><i><sub>F2</sub></i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds tf2; + + /** \brief Minimum excitation limit time constant (<i>T</i><i><sub>M</sub></i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds tm; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/UnderexcLimX2.cpp b/CGMES_3.0.0/UnderexcLimX2.cpp index 31ded8424..64bf7f3c5 100644 --- a/CGMES_3.0.0/UnderexcLimX2.cpp +++ b/CGMES_3.0.0/UnderexcLimX2.cpp @@ -8,18 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -UnderexcLimX2::UnderexcLimX2() {}; -UnderexcLimX2::~UnderexcLimX2() {}; +UnderexcLimX2::UnderexcLimX2() {} +UnderexcLimX2::~UnderexcLimX2() {} static const std::list PossibleProfilesForClass = { @@ -52,103 +45,108 @@ UnderexcLimX2::getPossibleProfilesForAttributes() const return map; } - -bool assign_UnderexcLimX2_kf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX2_kf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX2_km(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX2_km(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->km; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX2_melmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX2_melmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->melmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX2_qo(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX2_qo(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qo; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX2_r(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX2_r(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->r; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX2_tf2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX2_tf2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tf2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_UnderexcLimX2_tm(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_UnderexcLimX2_tm(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tm; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_UnderexcLimX2_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kf2; if (!buffer.str().empty()) @@ -162,7 +160,8 @@ bool get_UnderexcLimX2_kf2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_UnderexcLimX2_km(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->km; if (!buffer.str().empty()) @@ -176,7 +175,8 @@ bool get_UnderexcLimX2_km(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_UnderexcLimX2_melmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->melmax; if (!buffer.str().empty()) @@ -190,7 +190,8 @@ bool get_UnderexcLimX2_melmax(const BaseClass* BaseClass_ptr1, std::stringstream bool get_UnderexcLimX2_qo(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qo; if (!buffer.str().empty()) @@ -204,7 +205,8 @@ bool get_UnderexcLimX2_qo(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_UnderexcLimX2_r(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->r; if (!buffer.str().empty()) @@ -218,7 +220,8 @@ bool get_UnderexcLimX2_r(const BaseClass* BaseClass_ptr1, std::stringstream& buf bool get_UnderexcLimX2_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tf2; if (!buffer.str().empty()) @@ -232,7 +235,8 @@ bool get_UnderexcLimX2_tf2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_UnderexcLimX2_tm(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcLimX2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tm; if (!buffer.str().empty()) @@ -244,8 +248,6 @@ bool get_UnderexcLimX2_tm(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char UnderexcLimX2::debugName[] = "UnderexcLimX2"; const char* UnderexcLimX2::debugString() const { @@ -254,18 +256,18 @@ const char* UnderexcLimX2::debugString() const void UnderexcLimX2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:UnderexcLimX2"), &UnderexcLimX2_factory)); + factory_map.emplace("cim:UnderexcLimX2", &UnderexcLimX2_factory); } void UnderexcLimX2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX2.kf2"), &assign_UnderexcLimX2_kf2)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX2.km"), &assign_UnderexcLimX2_km)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX2.melmax"), &assign_UnderexcLimX2_melmax)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX2.qo"), &assign_UnderexcLimX2_qo)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX2.r"), &assign_UnderexcLimX2_r)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX2.tf2"), &assign_UnderexcLimX2_tf2)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcLimX2.tm"), &assign_UnderexcLimX2_tm)); + assign_map.emplace("cim:UnderexcLimX2.kf2", &assign_UnderexcLimX2_kf2); + assign_map.emplace("cim:UnderexcLimX2.km", &assign_UnderexcLimX2_km); + assign_map.emplace("cim:UnderexcLimX2.melmax", &assign_UnderexcLimX2_melmax); + assign_map.emplace("cim:UnderexcLimX2.qo", &assign_UnderexcLimX2_qo); + assign_map.emplace("cim:UnderexcLimX2.r", &assign_UnderexcLimX2_r); + assign_map.emplace("cim:UnderexcLimX2.tf2", &assign_UnderexcLimX2_tf2); + assign_map.emplace("cim:UnderexcLimX2.tm", &assign_UnderexcLimX2_tm); } void UnderexcLimX2::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/UnderexcLimX2.hpp b/CGMES_3.0.0/UnderexcLimX2.hpp index e3538f2b8..9b9f68d26 100644 --- a/CGMES_3.0.0/UnderexcLimX2.hpp +++ b/CGMES_3.0.0/UnderexcLimX2.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Westinghouse minimum excitation limiter. - */ + /** \brief Westinghouse minimum excitation limiter. */ class UnderexcLimX2 : public UnderexcitationLimiterDynamics { public: @@ -28,13 +26,26 @@ namespace CIMPP UnderexcLimX2(); ~UnderexcLimX2() override; - CIMPP::PU kf2; /* Differential gain (<i>K</i><i><sub>F2</sub></i>). Default: nullptr */ - CIMPP::PU km; /* Minimum excitation limit gain (<i>K</i><i><sub>M</sub></i>). Default: nullptr */ - CIMPP::PU melmax; /* Minimum excitation limit value (<i>MELMAX</i>). Default: nullptr */ - CIMPP::PU qo; /* Excitation centre setting (<i>Q</i><i><sub>O</sub></i>). Default: nullptr */ - CIMPP::PU r; /* Excitation radius (<i>R</i>). Default: nullptr */ - CIMPP::Seconds tf2; /* Differential time constant (<i>T</i><i><sub>F2</sub></i>) (&gt;= 0). Default: nullptr */ - CIMPP::Seconds tm; /* Minimum excitation limit time constant (<i>T</i><i><sub>M</sub></i>) (&gt;= 0). Default: nullptr */ + /** \brief Differential gain (<i>K</i><i><sub>F2</sub></i>). Default: nullptr */ + CIMPP::PU kf2; + + /** \brief Minimum excitation limit gain (<i>K</i><i><sub>M</sub></i>). Default: nullptr */ + CIMPP::PU km; + + /** \brief Minimum excitation limit value (<i>MELMAX</i>). Default: nullptr */ + CIMPP::PU melmax; + + /** \brief Excitation centre setting (<i>Q</i><i><sub>O</sub></i>). Default: nullptr */ + CIMPP::PU qo; + + /** \brief Excitation radius (<i>R</i>). Default: nullptr */ + CIMPP::PU r; + + /** \brief Differential time constant (<i>T</i><i><sub>F2</sub></i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds tf2; + + /** \brief Minimum excitation limit time constant (<i>T</i><i><sub>M</sub></i>) (&gt;= 0). Default: nullptr */ + CIMPP::Seconds tm; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/UnderexcitationLimiterDynamics.cpp b/CGMES_3.0.0/UnderexcitationLimiterDynamics.cpp index 9d024e743..18ef7b3ec 100644 --- a/CGMES_3.0.0/UnderexcitationLimiterDynamics.cpp +++ b/CGMES_3.0.0/UnderexcitationLimiterDynamics.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -UnderexcitationLimiterDynamics::UnderexcitationLimiterDynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr) {}; -UnderexcitationLimiterDynamics::~UnderexcitationLimiterDynamics() {}; +UnderexcitationLimiterDynamics::UnderexcitationLimiterDynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr) {} +UnderexcitationLimiterDynamics::~UnderexcitationLimiterDynamics() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ UnderexcitationLimiterDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_ExcitationSystemDynamics_UnderexcitationLimiterDynamics(BaseClass*, BaseClass*); bool assign_UnderexcitationLimiterDynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_UnderexcitationLimiterDynamics_ExcitationSystemDynamics(BaseClass* B } return false; } + bool assign_RemoteInputSignal_UnderexcitationLimiterDynamics(BaseClass*, BaseClass*); bool assign_UnderexcitationLimiterDynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_UnderexcitationLimiterDynamics_RemoteInputSignal(BaseClass* BaseClas return false; } - bool get_UnderexcitationLimiterDynamics_ExcitationSystemDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const UnderexcitationLimiterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcitationLimiterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ExcitationSystemDynamics != 0) { @@ -100,7 +99,7 @@ const char* UnderexcitationLimiterDynamics::debugString() const void UnderexcitationLimiterDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:UnderexcitationLimiterDynamics"), &UnderexcitationLimiterDynamics_factory)); + factory_map.emplace("cim:UnderexcitationLimiterDynamics", &UnderexcitationLimiterDynamics_factory); } void UnderexcitationLimiterDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -109,8 +108,8 @@ void UnderexcitationLimiterDynamics::addPrimitiveAssignFnsToMap(std::unordered_m void UnderexcitationLimiterDynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:UnderexcitationLimiterDynamics.ExcitationSystemDynamics"), &assign_UnderexcitationLimiterDynamics_ExcitationSystemDynamics)); - assign_map.insert(std::make_pair(std::string("cim:UnderexcitationLimiterDynamics.RemoteInputSignal"), &assign_UnderexcitationLimiterDynamics_RemoteInputSignal)); + assign_map.emplace("cim:UnderexcitationLimiterDynamics.ExcitationSystemDynamics", &assign_UnderexcitationLimiterDynamics_ExcitationSystemDynamics); + assign_map.emplace("cim:UnderexcitationLimiterDynamics.RemoteInputSignal", &assign_UnderexcitationLimiterDynamics_RemoteInputSignal); } void UnderexcitationLimiterDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/UnderexcitationLimiterDynamics.hpp b/CGMES_3.0.0/UnderexcitationLimiterDynamics.hpp index 5c73c7c51..a1b0b5cc9 100644 --- a/CGMES_3.0.0/UnderexcitationLimiterDynamics.hpp +++ b/CGMES_3.0.0/UnderexcitationLimiterDynamics.hpp @@ -18,9 +18,7 @@ namespace CIMPP class ExcitationSystemDynamics; class RemoteInputSignal; - /* - Underexcitation limiter function block whose behaviour is described by reference to a standard model or by definition of a user-defined model. - */ + /** \brief Underexcitation limiter function block whose behaviour is described by reference to a standard model or by definition of a user-defined model. */ class UnderexcitationLimiterDynamics : public DynamicsFunctionBlock { public: @@ -28,8 +26,11 @@ namespace CIMPP UnderexcitationLimiterDynamics(); ~UnderexcitationLimiterDynamics() override; - CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; /* Excitation system model with which this underexcitation limiter model is associated. Default: 0 */ - CIMPP::RemoteInputSignal* RemoteInputSignal; /* Remote input signal used by this underexcitation limiter model. Default: 0 */ + /** \brief Excitation system model with which this underexcitation limiter model is associated. Default: 0 */ + CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; + + /** \brief Remote input signal used by this underexcitation limiter model. Default: 0 */ + CIMPP::RemoteInputSignal* RemoteInputSignal; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/UnderexcitationLimiterUserDefined.cpp b/CGMES_3.0.0/UnderexcitationLimiterUserDefined.cpp index 87727bcc9..fb5ad61c2 100644 --- a/CGMES_3.0.0/UnderexcitationLimiterUserDefined.cpp +++ b/CGMES_3.0.0/UnderexcitationLimiterUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -UnderexcitationLimiterUserDefined::UnderexcitationLimiterUserDefined() {}; -UnderexcitationLimiterUserDefined::~UnderexcitationLimiterUserDefined() {}; +UnderexcitationLimiterUserDefined::UnderexcitationLimiterUserDefined() {} +UnderexcitationLimiterUserDefined::~UnderexcitationLimiterUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ UnderexcitationLimiterUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_UnderexcitationLimiterUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (UnderexcitationLimiterUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_UnderexcitationLimiterUserDefined(BaseClass*, BaseClass*); bool assign_UnderexcitationLimiterUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_UnderexcitationLimiterUserDefined_ProprietaryParameterDynamics(BaseC return false; } +bool assign_UnderexcitationLimiterUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + UnderexcitationLimiterUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_UnderexcitationLimiterUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const UnderexcitationLimiterUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const UnderexcitationLimiterUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_UnderexcitationLimiterUserDefined_proprietary(const BaseClass* BaseClas return false; } - - const char UnderexcitationLimiterUserDefined::debugName[] = "UnderexcitationLimiterUserDefined"; const char* UnderexcitationLimiterUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* UnderexcitationLimiterUserDefined::debugString() const void UnderexcitationLimiterUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:UnderexcitationLimiterUserDefined"), &UnderexcitationLimiterUserDefined_factory)); + factory_map.emplace("cim:UnderexcitationLimiterUserDefined", &UnderexcitationLimiterUserDefined_factory); } void UnderexcitationLimiterUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:UnderexcitationLimiterUserDefined.proprietary"), &assign_UnderexcitationLimiterUserDefined_proprietary)); + assign_map.emplace("cim:UnderexcitationLimiterUserDefined.proprietary", &assign_UnderexcitationLimiterUserDefined_proprietary); } void UnderexcitationLimiterUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:UnderexcitationLimiterUserDefined.ProprietaryParameterDynamics"), &assign_UnderexcitationLimiterUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:UnderexcitationLimiterUserDefined.ProprietaryParameterDynamics", &assign_UnderexcitationLimiterUserDefined_ProprietaryParameterDynamics); } void UnderexcitationLimiterUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/UnderexcitationLimiterUserDefined.hpp b/CGMES_3.0.0/UnderexcitationLimiterUserDefined.hpp index bdb0b9ffe..8e312cde0 100644 --- a/CGMES_3.0.0/UnderexcitationLimiterUserDefined.hpp +++ b/CGMES_3.0.0/UnderexcitationLimiterUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Underexcitation limiter function block whose dynamic behaviour is described by a user-defined model. - */ + /** \brief Underexcitation limiter function block whose dynamic behaviour is described by a user-defined model. */ class UnderexcitationLimiterUserDefined : public UnderexcitationLimiterDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP UnderexcitationLimiterUserDefined(); ~UnderexcitationLimiterUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/UnitMultiplier.cpp b/CGMES_3.0.0/UnitMultiplier.cpp index 120e409af..39d097fa1 100644 --- a/CGMES_3.0.0/UnitMultiplier.cpp +++ b/CGMES_3.0.0/UnitMultiplier.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "UnitMultiplier") + if (EnumSymbol.substr(0, pos) != "UnitMultiplier") { lop.setstate(std::ios::failbit); return lop; @@ -50,107 +50,107 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "y") + if (EnumSymbol == "y") { rop = UnitMultiplier::y; return lop; } - if(EnumSymbol == "z") + if (EnumSymbol == "z") { rop = UnitMultiplier::z; return lop; } - if(EnumSymbol == "a") + if (EnumSymbol == "a") { rop = UnitMultiplier::a; return lop; } - if(EnumSymbol == "f") + if (EnumSymbol == "f") { rop = UnitMultiplier::f; return lop; } - if(EnumSymbol == "p") + if (EnumSymbol == "p") { rop = UnitMultiplier::p; return lop; } - if(EnumSymbol == "n") + if (EnumSymbol == "n") { rop = UnitMultiplier::n; return lop; } - if(EnumSymbol == "micro") + if (EnumSymbol == "micro") { rop = UnitMultiplier::micro; return lop; } - if(EnumSymbol == "m") + if (EnumSymbol == "m") { rop = UnitMultiplier::m; return lop; } - if(EnumSymbol == "c") + if (EnumSymbol == "c") { rop = UnitMultiplier::c; return lop; } - if(EnumSymbol == "d") + if (EnumSymbol == "d") { rop = UnitMultiplier::d; return lop; } - if(EnumSymbol == "none") + if (EnumSymbol == "none") { rop = UnitMultiplier::none; return lop; } - if(EnumSymbol == "da") + if (EnumSymbol == "da") { rop = UnitMultiplier::da; return lop; } - if(EnumSymbol == "h") + if (EnumSymbol == "h") { rop = UnitMultiplier::h; return lop; } - if(EnumSymbol == "k") + if (EnumSymbol == "k") { rop = UnitMultiplier::k; return lop; } - if(EnumSymbol == "M") + if (EnumSymbol == "M") { rop = UnitMultiplier::M; return lop; } - if(EnumSymbol == "G") + if (EnumSymbol == "G") { rop = UnitMultiplier::G; return lop; } - if(EnumSymbol == "T") + if (EnumSymbol == "T") { rop = UnitMultiplier::T; return lop; } - if(EnumSymbol == "P") + if (EnumSymbol == "P") { rop = UnitMultiplier::P; return lop; } - if(EnumSymbol == "E") + if (EnumSymbol == "E") { rop = UnitMultiplier::E; return lop; } - if(EnumSymbol == "Z") + if (EnumSymbol == "Z") { rop = UnitMultiplier::Z; return lop; } - if(EnumSymbol == "Y") + if (EnumSymbol == "Y") { rop = UnitMultiplier::Y; return lop; diff --git a/CGMES_3.0.0/UnitMultiplier.hpp b/CGMES_3.0.0/UnitMultiplier.hpp index 6ab6e5f4a..9df6e6505 100644 --- a/CGMES_3.0.0/UnitMultiplier.hpp +++ b/CGMES_3.0.0/UnitMultiplier.hpp @@ -9,97 +9,53 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The unit multipliers defined for the CIM. When applied to unit symbols, the unit symbol is treated as a derived unit. Regardless of the contents of the unit symbol text, the unit symbol shall be treated as if it were a single-character unit symbol. Unit symbols should not contain multipliers, and it should be left to the multiplier to define the multiple for an entire data type. For example, if a unit symbol is "m2Pers" and the multiplier is "k", then the value is k(m**2/s), and the multiplier applies to the entire final value, not to any individual part of the value. This can be conceptualized by substituting a derived unit symbol for the unit type. If one imagines that the symbol "Þ" represents the derived unit "m2Pers", then applying the multiplier "k" can be conceptualized simply as "kÞ". For example, the SI unit for mass is "kg" and not "g". If the unit symbol is defined as "kg", then the multiplier is applied to "kg" as a whole and does not replace the "k" in front of the "g". In this case, the multiplier of "m" would be used with the unit symbol of "kg" to represent one gram. As a text string, this violates the instructions in IEC 80000-1. However, because the unit symbol in CIM is treated as a derived unit instead of as an SI unit, it makes more sense to conceptualize the "kg" as if it were replaced by one of the proposed replacements for the SI mass symbol. If one imagines that the "kg" were replaced by a symbol "Þ", then it is easier to conceptualize the multiplier "m" as creating the proper unit "mÞ", and not the forbidden unit "mkg". - */ + /** \brief The unit multipliers defined for the CIM. When applied to unit symbols, the unit symbol is treated as a derived unit. Regardless of the contents of the unit symbol text, the unit symbol shall be treated as if it were a single-character unit symbol. Unit symbols should not contain multipliers, and it should be left to the multiplier to define the multiple for an entire data type. For example, if a unit symbol is "m2Pers" and the multiplier is "k", then the value is k(m**2/s), and the multiplier applies to the entire final value, not to any individual part of the value. This can be conceptualized by substituting a derived unit symbol for the unit type. If one imagines that the symbol "Þ" represents the derived unit "m2Pers", then applying the multiplier "k" can be conceptualized simply as "kÞ". For example, the SI unit for mass is "kg" and not "g". If the unit symbol is defined as "kg", then the multiplier is applied to "kg" as a whole and does not replace the "k" in front of the "g". In this case, the multiplier of "m" would be used with the unit symbol of "kg" to represent one gram. As a text string, this violates the instructions in IEC 80000-1. However, because the unit symbol in CIM is treated as a derived unit instead of as an SI unit, it makes more sense to conceptualize the "kg" as if it were replaced by one of the proposed replacements for the SI mass symbol. If one imagines that the "kg" were replaced by a symbol "Þ", then it is easier to conceptualize the multiplier "m" as creating the proper unit "mÞ", and not the forbidden unit "mkg". */ class UnitMultiplier { public: enum UnitMultiplier_ENUM { - /** - * Yocto 10**-24. - */ + /** Yocto 10**-24. */ y, - /** - * Zepto 10**-21. - */ + /** Zepto 10**-21. */ z, - /** - * Atto 10**-18. - */ + /** Atto 10**-18. */ a, - /** - * Femto 10**-15. - */ + /** Femto 10**-15. */ f, - /** - * Pico 10**-12. - */ + /** Pico 10**-12. */ p, - /** - * Nano 10**-9. - */ + /** Nano 10**-9. */ n, - /** - * Micro 10**-6. - */ + /** Micro 10**-6. */ micro, - /** - * Milli 10**-3. - */ + /** Milli 10**-3. */ m, - /** - * Centi 10**-2. - */ + /** Centi 10**-2. */ c, - /** - * Deci 10**-1. - */ + /** Deci 10**-1. */ d, - /** - * No multiplier or equivalently multiply by 1. - */ + /** No multiplier or equivalently multiply by 1. */ none, - /** - * Deca 10**1. - */ + /** Deca 10**1. */ da, - /** - * Hecto 10**2. - */ + /** Hecto 10**2. */ h, - /** - * Kilo 10**3. - */ + /** Kilo 10**3. */ k, - /** - * Mega 10**6. - */ + /** Mega 10**6. */ M, - /** - * Giga 10**9. - */ + /** Giga 10**9. */ G, - /** - * Tera 10**12. - */ + /** Tera 10**12. */ T, - /** - * Peta 10**15. - */ + /** Peta 10**15. */ P, - /** - * Exa 10**18. - */ + /** Exa 10**18. */ E, - /** - * Zetta 10**21. - */ + /** Zetta 10**21. */ Z, - /** - * Yotta 10**24. - */ + /** Yotta 10**24. */ Y, }; diff --git a/CGMES_3.0.0/UnitSymbol.cpp b/CGMES_3.0.0/UnitSymbol.cpp index f88c45b30..f8d1913a9 100644 --- a/CGMES_3.0.0/UnitSymbol.cpp +++ b/CGMES_3.0.0/UnitSymbol.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "UnitSymbol") + if (EnumSymbol.substr(0, pos) != "UnitSymbol") { lop.setstate(std::ios::failbit); return lop; @@ -50,707 +50,707 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "none") + if (EnumSymbol == "none") { rop = UnitSymbol::none; return lop; } - if(EnumSymbol == "m") + if (EnumSymbol == "m") { rop = UnitSymbol::m; return lop; } - if(EnumSymbol == "kg") + if (EnumSymbol == "kg") { rop = UnitSymbol::kg; return lop; } - if(EnumSymbol == "s") + if (EnumSymbol == "s") { rop = UnitSymbol::s; return lop; } - if(EnumSymbol == "A") + if (EnumSymbol == "A") { rop = UnitSymbol::A; return lop; } - if(EnumSymbol == "K") + if (EnumSymbol == "K") { rop = UnitSymbol::K; return lop; } - if(EnumSymbol == "mol") + if (EnumSymbol == "mol") { rop = UnitSymbol::mol; return lop; } - if(EnumSymbol == "cd") + if (EnumSymbol == "cd") { rop = UnitSymbol::cd; return lop; } - if(EnumSymbol == "deg") + if (EnumSymbol == "deg") { rop = UnitSymbol::deg; return lop; } - if(EnumSymbol == "rad") + if (EnumSymbol == "rad") { rop = UnitSymbol::rad; return lop; } - if(EnumSymbol == "sr") + if (EnumSymbol == "sr") { rop = UnitSymbol::sr; return lop; } - if(EnumSymbol == "Gy") + if (EnumSymbol == "Gy") { rop = UnitSymbol::Gy; return lop; } - if(EnumSymbol == "Bq") + if (EnumSymbol == "Bq") { rop = UnitSymbol::Bq; return lop; } - if(EnumSymbol == "degC") + if (EnumSymbol == "degC") { rop = UnitSymbol::degC; return lop; } - if(EnumSymbol == "Sv") + if (EnumSymbol == "Sv") { rop = UnitSymbol::Sv; return lop; } - if(EnumSymbol == "F") + if (EnumSymbol == "F") { rop = UnitSymbol::F; return lop; } - if(EnumSymbol == "C") + if (EnumSymbol == "C") { rop = UnitSymbol::C; return lop; } - if(EnumSymbol == "S") + if (EnumSymbol == "S") { rop = UnitSymbol::S; return lop; } - if(EnumSymbol == "H") + if (EnumSymbol == "H") { rop = UnitSymbol::H; return lop; } - if(EnumSymbol == "V") + if (EnumSymbol == "V") { rop = UnitSymbol::V; return lop; } - if(EnumSymbol == "ohm") + if (EnumSymbol == "ohm") { rop = UnitSymbol::ohm; return lop; } - if(EnumSymbol == "J") + if (EnumSymbol == "J") { rop = UnitSymbol::J; return lop; } - if(EnumSymbol == "N") + if (EnumSymbol == "N") { rop = UnitSymbol::N; return lop; } - if(EnumSymbol == "Hz") + if (EnumSymbol == "Hz") { rop = UnitSymbol::Hz; return lop; } - if(EnumSymbol == "lx") + if (EnumSymbol == "lx") { rop = UnitSymbol::lx; return lop; } - if(EnumSymbol == "lm") + if (EnumSymbol == "lm") { rop = UnitSymbol::lm; return lop; } - if(EnumSymbol == "Wb") + if (EnumSymbol == "Wb") { rop = UnitSymbol::Wb; return lop; } - if(EnumSymbol == "T") + if (EnumSymbol == "T") { rop = UnitSymbol::T; return lop; } - if(EnumSymbol == "W") + if (EnumSymbol == "W") { rop = UnitSymbol::W; return lop; } - if(EnumSymbol == "Pa") + if (EnumSymbol == "Pa") { rop = UnitSymbol::Pa; return lop; } - if(EnumSymbol == "m2") + if (EnumSymbol == "m2") { rop = UnitSymbol::m2; return lop; } - if(EnumSymbol == "m3") + if (EnumSymbol == "m3") { rop = UnitSymbol::m3; return lop; } - if(EnumSymbol == "mPers") + if (EnumSymbol == "mPers") { rop = UnitSymbol::mPers; return lop; } - if(EnumSymbol == "mPers2") + if (EnumSymbol == "mPers2") { rop = UnitSymbol::mPers2; return lop; } - if(EnumSymbol == "m3Pers") + if (EnumSymbol == "m3Pers") { rop = UnitSymbol::m3Pers; return lop; } - if(EnumSymbol == "mPerm3") + if (EnumSymbol == "mPerm3") { rop = UnitSymbol::mPerm3; return lop; } - if(EnumSymbol == "kgm") + if (EnumSymbol == "kgm") { rop = UnitSymbol::kgm; return lop; } - if(EnumSymbol == "kgPerm3") + if (EnumSymbol == "kgPerm3") { rop = UnitSymbol::kgPerm3; return lop; } - if(EnumSymbol == "m2Pers") + if (EnumSymbol == "m2Pers") { rop = UnitSymbol::m2Pers; return lop; } - if(EnumSymbol == "WPermK") + if (EnumSymbol == "WPermK") { rop = UnitSymbol::WPermK; return lop; } - if(EnumSymbol == "JPerK") + if (EnumSymbol == "JPerK") { rop = UnitSymbol::JPerK; return lop; } - if(EnumSymbol == "ppm") + if (EnumSymbol == "ppm") { rop = UnitSymbol::ppm; return lop; } - if(EnumSymbol == "rotPers") + if (EnumSymbol == "rotPers") { rop = UnitSymbol::rotPers; return lop; } - if(EnumSymbol == "radPers") + if (EnumSymbol == "radPers") { rop = UnitSymbol::radPers; return lop; } - if(EnumSymbol == "WPerm2") + if (EnumSymbol == "WPerm2") { rop = UnitSymbol::WPerm2; return lop; } - if(EnumSymbol == "JPerm2") + if (EnumSymbol == "JPerm2") { rop = UnitSymbol::JPerm2; return lop; } - if(EnumSymbol == "SPerm") + if (EnumSymbol == "SPerm") { rop = UnitSymbol::SPerm; return lop; } - if(EnumSymbol == "KPers") + if (EnumSymbol == "KPers") { rop = UnitSymbol::KPers; return lop; } - if(EnumSymbol == "PaPers") + if (EnumSymbol == "PaPers") { rop = UnitSymbol::PaPers; return lop; } - if(EnumSymbol == "JPerkgK") + if (EnumSymbol == "JPerkgK") { rop = UnitSymbol::JPerkgK; return lop; } - if(EnumSymbol == "VA") + if (EnumSymbol == "VA") { rop = UnitSymbol::VA; return lop; } - if(EnumSymbol == "VAr") + if (EnumSymbol == "VAr") { rop = UnitSymbol::VAr; return lop; } - if(EnumSymbol == "cosPhi") + if (EnumSymbol == "cosPhi") { rop = UnitSymbol::cosPhi; return lop; } - if(EnumSymbol == "Vs") + if (EnumSymbol == "Vs") { rop = UnitSymbol::Vs; return lop; } - if(EnumSymbol == "V2") + if (EnumSymbol == "V2") { rop = UnitSymbol::V2; return lop; } - if(EnumSymbol == "As") + if (EnumSymbol == "As") { rop = UnitSymbol::As; return lop; } - if(EnumSymbol == "A2") + if (EnumSymbol == "A2") { rop = UnitSymbol::A2; return lop; } - if(EnumSymbol == "A2s") + if (EnumSymbol == "A2s") { rop = UnitSymbol::A2s; return lop; } - if(EnumSymbol == "VAh") + if (EnumSymbol == "VAh") { rop = UnitSymbol::VAh; return lop; } - if(EnumSymbol == "Wh") + if (EnumSymbol == "Wh") { rop = UnitSymbol::Wh; return lop; } - if(EnumSymbol == "VArh") + if (EnumSymbol == "VArh") { rop = UnitSymbol::VArh; return lop; } - if(EnumSymbol == "VPerHz") + if (EnumSymbol == "VPerHz") { rop = UnitSymbol::VPerHz; return lop; } - if(EnumSymbol == "HzPers") + if (EnumSymbol == "HzPers") { rop = UnitSymbol::HzPers; return lop; } - if(EnumSymbol == "character") + if (EnumSymbol == "character") { rop = UnitSymbol::character; return lop; } - if(EnumSymbol == "charPers") + if (EnumSymbol == "charPers") { rop = UnitSymbol::charPers; return lop; } - if(EnumSymbol == "kgm2") + if (EnumSymbol == "kgm2") { rop = UnitSymbol::kgm2; return lop; } - if(EnumSymbol == "dB") + if (EnumSymbol == "dB") { rop = UnitSymbol::dB; return lop; } - if(EnumSymbol == "WPers") + if (EnumSymbol == "WPers") { rop = UnitSymbol::WPers; return lop; } - if(EnumSymbol == "lPers") + if (EnumSymbol == "lPers") { rop = UnitSymbol::lPers; return lop; } - if(EnumSymbol == "dBm") + if (EnumSymbol == "dBm") { rop = UnitSymbol::dBm; return lop; } - if(EnumSymbol == "h") + if (EnumSymbol == "h") { rop = UnitSymbol::h; return lop; } - if(EnumSymbol == "min") + if (EnumSymbol == "min") { rop = UnitSymbol::min; return lop; } - if(EnumSymbol == "Q") + if (EnumSymbol == "Q") { rop = UnitSymbol::Q; return lop; } - if(EnumSymbol == "Qh") + if (EnumSymbol == "Qh") { rop = UnitSymbol::Qh; return lop; } - if(EnumSymbol == "ohmm") + if (EnumSymbol == "ohmm") { rop = UnitSymbol::ohmm; return lop; } - if(EnumSymbol == "APerm") + if (EnumSymbol == "APerm") { rop = UnitSymbol::APerm; return lop; } - if(EnumSymbol == "V2h") + if (EnumSymbol == "V2h") { rop = UnitSymbol::V2h; return lop; } - if(EnumSymbol == "A2h") + if (EnumSymbol == "A2h") { rop = UnitSymbol::A2h; return lop; } - if(EnumSymbol == "Ah") + if (EnumSymbol == "Ah") { rop = UnitSymbol::Ah; return lop; } - if(EnumSymbol == "count") + if (EnumSymbol == "count") { rop = UnitSymbol::count; return lop; } - if(EnumSymbol == "ft3") + if (EnumSymbol == "ft3") { rop = UnitSymbol::ft3; return lop; } - if(EnumSymbol == "m3Perh") + if (EnumSymbol == "m3Perh") { rop = UnitSymbol::m3Perh; return lop; } - if(EnumSymbol == "gal") + if (EnumSymbol == "gal") { rop = UnitSymbol::gal; return lop; } - if(EnumSymbol == "Btu") + if (EnumSymbol == "Btu") { rop = UnitSymbol::Btu; return lop; } - if(EnumSymbol == "l") + if (EnumSymbol == "l") { rop = UnitSymbol::l; return lop; } - if(EnumSymbol == "lPerh") + if (EnumSymbol == "lPerh") { rop = UnitSymbol::lPerh; return lop; } - if(EnumSymbol == "lPerl") + if (EnumSymbol == "lPerl") { rop = UnitSymbol::lPerl; return lop; } - if(EnumSymbol == "gPerg") + if (EnumSymbol == "gPerg") { rop = UnitSymbol::gPerg; return lop; } - if(EnumSymbol == "molPerm3") + if (EnumSymbol == "molPerm3") { rop = UnitSymbol::molPerm3; return lop; } - if(EnumSymbol == "molPermol") + if (EnumSymbol == "molPermol") { rop = UnitSymbol::molPermol; return lop; } - if(EnumSymbol == "molPerkg") + if (EnumSymbol == "molPerkg") { rop = UnitSymbol::molPerkg; return lop; } - if(EnumSymbol == "sPers") + if (EnumSymbol == "sPers") { rop = UnitSymbol::sPers; return lop; } - if(EnumSymbol == "HzPerHz") + if (EnumSymbol == "HzPerHz") { rop = UnitSymbol::HzPerHz; return lop; } - if(EnumSymbol == "VPerV") + if (EnumSymbol == "VPerV") { rop = UnitSymbol::VPerV; return lop; } - if(EnumSymbol == "APerA") + if (EnumSymbol == "APerA") { rop = UnitSymbol::APerA; return lop; } - if(EnumSymbol == "VPerVA") + if (EnumSymbol == "VPerVA") { rop = UnitSymbol::VPerVA; return lop; } - if(EnumSymbol == "rev") + if (EnumSymbol == "rev") { rop = UnitSymbol::rev; return lop; } - if(EnumSymbol == "kat") + if (EnumSymbol == "kat") { rop = UnitSymbol::kat; return lop; } - if(EnumSymbol == "JPerkg") + if (EnumSymbol == "JPerkg") { rop = UnitSymbol::JPerkg; return lop; } - if(EnumSymbol == "m3Uncompensated") + if (EnumSymbol == "m3Uncompensated") { rop = UnitSymbol::m3Uncompensated; return lop; } - if(EnumSymbol == "m3Compensated") + if (EnumSymbol == "m3Compensated") { rop = UnitSymbol::m3Compensated; return lop; } - if(EnumSymbol == "WPerW") + if (EnumSymbol == "WPerW") { rop = UnitSymbol::WPerW; return lop; } - if(EnumSymbol == "therm") + if (EnumSymbol == "therm") { rop = UnitSymbol::therm; return lop; } - if(EnumSymbol == "onePerm") + if (EnumSymbol == "onePerm") { rop = UnitSymbol::onePerm; return lop; } - if(EnumSymbol == "m3Perkg") + if (EnumSymbol == "m3Perkg") { rop = UnitSymbol::m3Perkg; return lop; } - if(EnumSymbol == "Pas") + if (EnumSymbol == "Pas") { rop = UnitSymbol::Pas; return lop; } - if(EnumSymbol == "Nm") + if (EnumSymbol == "Nm") { rop = UnitSymbol::Nm; return lop; } - if(EnumSymbol == "NPerm") + if (EnumSymbol == "NPerm") { rop = UnitSymbol::NPerm; return lop; } - if(EnumSymbol == "radPers2") + if (EnumSymbol == "radPers2") { rop = UnitSymbol::radPers2; return lop; } - if(EnumSymbol == "JPerm3") + if (EnumSymbol == "JPerm3") { rop = UnitSymbol::JPerm3; return lop; } - if(EnumSymbol == "VPerm") + if (EnumSymbol == "VPerm") { rop = UnitSymbol::VPerm; return lop; } - if(EnumSymbol == "CPerm3") + if (EnumSymbol == "CPerm3") { rop = UnitSymbol::CPerm3; return lop; } - if(EnumSymbol == "CPerm2") + if (EnumSymbol == "CPerm2") { rop = UnitSymbol::CPerm2; return lop; } - if(EnumSymbol == "FPerm") + if (EnumSymbol == "FPerm") { rop = UnitSymbol::FPerm; return lop; } - if(EnumSymbol == "HPerm") + if (EnumSymbol == "HPerm") { rop = UnitSymbol::HPerm; return lop; } - if(EnumSymbol == "JPermol") + if (EnumSymbol == "JPermol") { rop = UnitSymbol::JPermol; return lop; } - if(EnumSymbol == "JPermolK") + if (EnumSymbol == "JPermolK") { rop = UnitSymbol::JPermolK; return lop; } - if(EnumSymbol == "CPerkg") + if (EnumSymbol == "CPerkg") { rop = UnitSymbol::CPerkg; return lop; } - if(EnumSymbol == "GyPers") + if (EnumSymbol == "GyPers") { rop = UnitSymbol::GyPers; return lop; } - if(EnumSymbol == "WPersr") + if (EnumSymbol == "WPersr") { rop = UnitSymbol::WPersr; return lop; } - if(EnumSymbol == "WPerm2sr") + if (EnumSymbol == "WPerm2sr") { rop = UnitSymbol::WPerm2sr; return lop; } - if(EnumSymbol == "katPerm3") + if (EnumSymbol == "katPerm3") { rop = UnitSymbol::katPerm3; return lop; } - if(EnumSymbol == "d") + if (EnumSymbol == "d") { rop = UnitSymbol::d; return lop; } - if(EnumSymbol == "anglemin") + if (EnumSymbol == "anglemin") { rop = UnitSymbol::anglemin; return lop; } - if(EnumSymbol == "anglesec") + if (EnumSymbol == "anglesec") { rop = UnitSymbol::anglesec; return lop; } - if(EnumSymbol == "ha") + if (EnumSymbol == "ha") { rop = UnitSymbol::ha; return lop; } - if(EnumSymbol == "tonne") + if (EnumSymbol == "tonne") { rop = UnitSymbol::tonne; return lop; } - if(EnumSymbol == "bar") + if (EnumSymbol == "bar") { rop = UnitSymbol::bar; return lop; } - if(EnumSymbol == "mmHg") + if (EnumSymbol == "mmHg") { rop = UnitSymbol::mmHg; return lop; } - if(EnumSymbol == "M") + if (EnumSymbol == "M") { rop = UnitSymbol::M; return lop; } - if(EnumSymbol == "kn") + if (EnumSymbol == "kn") { rop = UnitSymbol::kn; return lop; } - if(EnumSymbol == "Mx") + if (EnumSymbol == "Mx") { rop = UnitSymbol::Mx; return lop; } - if(EnumSymbol == "G") + if (EnumSymbol == "G") { rop = UnitSymbol::G; return lop; } - if(EnumSymbol == "Oe") + if (EnumSymbol == "Oe") { rop = UnitSymbol::Oe; return lop; } - if(EnumSymbol == "Vh") + if (EnumSymbol == "Vh") { rop = UnitSymbol::Vh; return lop; } - if(EnumSymbol == "WPerA") + if (EnumSymbol == "WPerA") { rop = UnitSymbol::WPerA; return lop; } - if(EnumSymbol == "onePerHz") + if (EnumSymbol == "onePerHz") { rop = UnitSymbol::onePerHz; return lop; } - if(EnumSymbol == "VPerVAr") + if (EnumSymbol == "VPerVAr") { rop = UnitSymbol::VPerVAr; return lop; } - if(EnumSymbol == "ohmPerm") + if (EnumSymbol == "ohmPerm") { rop = UnitSymbol::ohmPerm; return lop; } - if(EnumSymbol == "kgPerJ") + if (EnumSymbol == "kgPerJ") { rop = UnitSymbol::kgPerJ; return lop; } - if(EnumSymbol == "JPers") + if (EnumSymbol == "JPers") { rop = UnitSymbol::JPers; return lop; diff --git a/CGMES_3.0.0/UnitSymbol.hpp b/CGMES_3.0.0/UnitSymbol.hpp index e4c8d145d..808f7af79 100644 --- a/CGMES_3.0.0/UnitSymbol.hpp +++ b/CGMES_3.0.0/UnitSymbol.hpp @@ -9,577 +9,293 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - The derived units defined for usage in the CIM. In some cases, the derived unit is equal to an SI unit. Whenever possible, the standard derived symbol is used instead of the formula for the derived unit. For example, the unit symbol Farad is defined as "F" instead of "CPerV". In cases where a standard symbol does not exist for a derived unit, the formula for the unit is used as the unit symbol. For example, density does not have a standard symbol and so it is represented as "kgPerm3". With the exception of the "kg", which is an SI unit, the unit symbols do not contain multipliers and therefore represent the base derived unit to which a multiplier can be applied as a whole. Every unit symbol is treated as an unparseable text as if it were a single-letter symbol. The meaning of each unit symbol is defined by the accompanying descriptive text and not by the text contents of the unit symbol. To allow the widest possible range of serializations without requiring special character handling, several substitutions are made which deviate from the format described in IEC 80000-1. The division symbol "/" is replaced by the letters "Per". Exponents are written in plain text after the unit as "m3" instead of being formatted as "m" with a superscript of 3 or introducing a symbol as in "m^3". The degree symbol "[SYMBOL REMOVED]" is replaced with the letters "deg". Any clarification of the meaning for a substitution is included in the description for the unit symbol. Non-SI units are included in list of unit symbols to allow sources of data to be correctly labelled with their non-SI units (for example, a GPS sensor that is reporting numbers that represent feet instead of meters). This allows software to use the unit symbol information correctly convert and scale the raw data of those sources into SI-based units. The integer values are used for harmonization with IEC 61850. - */ + /** \brief The derived units defined for usage in the CIM. In some cases, the derived unit is equal to an SI unit. Whenever possible, the standard derived symbol is used instead of the formula for the derived unit. For example, the unit symbol Farad is defined as "F" instead of "CPerV". In cases where a standard symbol does not exist for a derived unit, the formula for the unit is used as the unit symbol. For example, density does not have a standard symbol and so it is represented as "kgPerm3". With the exception of the "kg", which is an SI unit, the unit symbols do not contain multipliers and therefore represent the base derived unit to which a multiplier can be applied as a whole. Every unit symbol is treated as an unparseable text as if it were a single-letter symbol. The meaning of each unit symbol is defined by the accompanying descriptive text and not by the text contents of the unit symbol. To allow the widest possible range of serializations without requiring special character handling, several substitutions are made which deviate from the format described in IEC 80000-1. The division symbol "/" is replaced by the letters "Per". Exponents are written in plain text after the unit as "m3" instead of being formatted as "m" with a superscript of 3 or introducing a symbol as in "m^3". The degree symbol "[SYMBOL REMOVED]" is replaced with the letters "deg". Any clarification of the meaning for a substitution is included in the description for the unit symbol. Non-SI units are included in list of unit symbols to allow sources of data to be correctly labelled with their non-SI units (for example, a GPS sensor that is reporting numbers that represent feet instead of meters). This allows software to use the unit symbol information correctly convert and scale the raw data of those sources into SI-based units. The integer values are used for harmonization with IEC 61850. */ class UnitSymbol { public: enum UnitSymbol_ENUM { - /** - * Dimension less quantity, e.g. count, per unit, etc. - */ + /** Dimension less quantity, e.g. count, per unit, etc. */ none, - /** - * Length in metres. - */ + /** Length in metres. */ m, - /** - * Mass in kilograms. Note: multiplier "k" is included in this unit symbol for compatibility with IEC 61850-7-3. - */ + /** Mass in kilograms. Note: multiplier "k" is included in this unit symbol for compatibility with IEC 61850-7-3. */ kg, - /** - * Time in seconds. - */ + /** Time in seconds. */ s, - /** - * Current in amperes. - */ + /** Current in amperes. */ A, - /** - * Temperature in kelvins. - */ + /** Temperature in kelvins. */ K, - /** - * Amount of substance in moles. - */ + /** Amount of substance in moles. */ mol, - /** - * Luminous intensity in candelas. - */ + /** Luminous intensity in candelas. */ cd, - /** - * Plane angle in degrees. - */ + /** Plane angle in degrees. */ deg, - /** - * Plane angle in radians (m/m). - */ + /** Plane angle in radians (m/m). */ rad, - /** - * Solid angle in steradians (m2/m2). - */ + /** Solid angle in steradians (m2/m2). */ sr, - /** - * Absorbed dose in grays (J/kg). - */ + /** Absorbed dose in grays (J/kg). */ Gy, - /** - * Radioactivity in becquerels (1/s). - */ + /** Radioactivity in becquerels (1/s). */ Bq, - /** - * Relative temperature in degrees Celsius. In the SI unit system the symbol is [SYMBOL REMOVED]C. Electric charge is measured in coulomb that has the unit symbol C. To distinguish degree Celsius from coulomb the symbol used in the UML is degC. The reason for not using [SYMBOL REMOVED]C is that the special character [SYMBOL REMOVED] is difficult to manage in software. - */ + /** Relative temperature in degrees Celsius. In the SI unit system the symbol is [SYMBOL REMOVED]C. Electric charge is measured in coulomb that has the unit symbol C. To distinguish degree Celsius from coulomb the symbol used in the UML is degC. The reason for not using [SYMBOL REMOVED]C is that the special character [SYMBOL REMOVED] is difficult to manage in software. */ degC, - /** - * Dose equivalent in sieverts (J/kg). - */ + /** Dose equivalent in sieverts (J/kg). */ Sv, - /** - * Electric capacitance in farads (C/V). - */ + /** Electric capacitance in farads (C/V). */ F, - /** - * Electric charge in coulombs (A·s). - */ + /** Electric charge in coulombs (A·s). */ C, - /** - * Conductance in siemens. - */ + /** Conductance in siemens. */ S, - /** - * Electric inductance in henrys (Wb/A). - */ + /** Electric inductance in henrys (Wb/A). */ H, - /** - * Electric potential in volts (W/A). - */ + /** Electric potential in volts (W/A). */ V, - /** - * Electric resistance in ohms (V/A). - */ + /** Electric resistance in ohms (V/A). */ ohm, - /** - * Energy in joules (N·m = C·V = W·s). - */ + /** Energy in joules (N·m = C·V = W·s). */ J, - /** - * Force in newtons (kg·m/s²). - */ + /** Force in newtons (kg·m/s²). */ N, - /** - * Frequency in hertz (1/s). - */ + /** Frequency in hertz (1/s). */ Hz, - /** - * Illuminance in lux (lm/m²). - */ + /** Illuminance in lux (lm/m²). */ lx, - /** - * Luminous flux in lumens (cd·sr). - */ + /** Luminous flux in lumens (cd·sr). */ lm, - /** - * Magnetic flux in webers (V·s). - */ + /** Magnetic flux in webers (V·s). */ Wb, - /** - * Magnetic flux density in teslas (Wb/m2). - */ + /** Magnetic flux density in teslas (Wb/m2). */ T, - /** - * Real power in watts (J/s). Electrical power may have real and reactive components. The real portion of electrical power (I&#178;R or VIcos(phi)), is expressed in Watts. See also apparent power and reactive power. - */ + /** Real power in watts (J/s). Electrical power may have real and reactive components. The real portion of electrical power (I&#178;R or VIcos(phi)), is expressed in Watts. See also apparent power and reactive power. */ W, - /** - * Pressure in pascals (N/m²). Note: the absolute or relative measurement of pressure is implied with this entry. See below for more explicit forms. - */ + /** Pressure in pascals (N/m²). Note: the absolute or relative measurement of pressure is implied with this entry. See below for more explicit forms. */ Pa, - /** - * Area in square metres (m²). - */ + /** Area in square metres (m²). */ m2, - /** - * Volume in cubic metres (m³). - */ + /** Volume in cubic metres (m³). */ m3, - /** - * Velocity in metres per second (m/s). - */ + /** Velocity in metres per second (m/s). */ mPers, - /** - * Acceleration in metres per second squared (m/s²). - */ + /** Acceleration in metres per second squared (m/s²). */ mPers2, - /** - * Volumetric flow rate in cubic metres per second (m³/s). - */ + /** Volumetric flow rate in cubic metres per second (m³/s). */ m3Pers, - /** - * Fuel efficiency in metres per cubic metres (m/m³). - */ + /** Fuel efficiency in metres per cubic metres (m/m³). */ mPerm3, - /** - * Moment of mass in kilogram metres (kg·m) (first moment of mass). Note: multiplier "k" is included in this unit symbol for compatibility with IEC 61850-7-3. - */ + /** Moment of mass in kilogram metres (kg·m) (first moment of mass). Note: multiplier "k" is included in this unit symbol for compatibility with IEC 61850-7-3. */ kgm, - /** - * Density in kilogram/cubic metres (kg/m³). Note: multiplier "k" is included in this unit symbol for compatibility with IEC 61850-7-3. - */ + /** Density in kilogram/cubic metres (kg/m³). Note: multiplier "k" is included in this unit symbol for compatibility with IEC 61850-7-3. */ kgPerm3, - /** - * Viscosity in square metres / second (m²/s). - */ + /** Viscosity in square metres / second (m²/s). */ m2Pers, - /** - * Thermal conductivity in watt/metres kelvin. - */ + /** Thermal conductivity in watt/metres kelvin. */ WPermK, - /** - * Heat capacity in joules/kelvin. - */ + /** Heat capacity in joules/kelvin. */ JPerK, - /** - * Concentration in parts per million. - */ + /** Concentration in parts per million. */ ppm, - /** - * Rotations per second (1/s). See also Hz (1/s). - */ + /** Rotations per second (1/s). See also Hz (1/s). */ rotPers, - /** - * Angular velocity in radians per second (rad/s). - */ + /** Angular velocity in radians per second (rad/s). */ radPers, - /** - * Heat flux density, irradiance, watts per square metre. - */ + /** Heat flux density, irradiance, watts per square metre. */ WPerm2, - /** - * Insulation energy density, joules per square metre or watt second per square metre. - */ + /** Insulation energy density, joules per square metre or watt second per square metre. */ JPerm2, - /** - * Conductance per length (F/m). - */ + /** Conductance per length (F/m). */ SPerm, - /** - * Temperature change rate in kelvins per second. - */ + /** Temperature change rate in kelvins per second. */ KPers, - /** - * Pressure change rate in pascals per second. - */ + /** Pressure change rate in pascals per second. */ PaPers, - /** - * Specific heat capacity, specific entropy, joules per kilogram Kelvin. - */ + /** Specific heat capacity, specific entropy, joules per kilogram Kelvin. */ JPerkgK, - /** - * Apparent power in volt amperes. See also real power and reactive power. - */ + /** Apparent power in volt amperes. See also real power and reactive power. */ VA, - /** - * Reactive power in volt amperes reactive. The "reactive" or "imaginary" component of electrical power (VIsin(phi)). (See also real power and apparent power). Note: Different meter designs use different methods to arrive at their results. Some meters may compute reactive power as an arithmetic value, while others compute the value vectorially. The data consumer should determine the method in use and the suitability of the measurement for the intended purpose. - */ + /** Reactive power in volt amperes reactive. The "reactive" or "imaginary" component of electrical power (VIsin(phi)). (See also real power and apparent power). Note: Different meter designs use different methods to arrive at their results. Some meters may compute reactive power as an arithmetic value, while others compute the value vectorially. The data consumer should determine the method in use and the suitability of the measurement for the intended purpose. */ VAr, - /** - * Power factor, dimensionless. Note 1: This definition of power factor only holds for balanced systems. See the alternative definition under code 153. Note 2 : Beware of differing sign conventions in use between the IEC and EEI. It is assumed that the data consumer understands the type of meter in use and the sign convention in use by the utility. - */ + /** Power factor, dimensionless. Note 1: This definition of power factor only holds for balanced systems. See the alternative definition under code 153. Note 2 : Beware of differing sign conventions in use between the IEC and EEI. It is assumed that the data consumer understands the type of meter in use and the sign convention in use by the utility. */ cosPhi, - /** - * Volt seconds (Ws/A). - */ + /** Volt seconds (Ws/A). */ Vs, - /** - * Volt squared (W²/A²). - */ + /** Volt squared (W²/A²). */ V2, - /** - * Ampere seconds (A·s). - */ + /** Ampere seconds (A·s). */ As, - /** - * Amperes squared (A²). - */ + /** Amperes squared (A²). */ A2, - /** - * Ampere squared time in square amperes (A²s). - */ + /** Ampere squared time in square amperes (A²s). */ A2s, - /** - * Apparent energy in volt ampere hours. - */ + /** Apparent energy in volt ampere hours. */ VAh, - /** - * Real energy in watt hours. - */ + /** Real energy in watt hours. */ Wh, - /** - * Reactive energy in volt ampere reactive hours. - */ + /** Reactive energy in volt ampere reactive hours. */ VArh, - /** - * Magnetic flux in volt per hertz. - */ + /** Magnetic flux in volt per hertz. */ VPerHz, - /** - * Rate of change of frequency in hertz per second. - */ + /** Rate of change of frequency in hertz per second. */ HzPers, - /** - * Number of characters. - */ + /** Number of characters. */ character, - /** - * Data rate (baud) in characters per second. - */ + /** Data rate (baud) in characters per second. */ charPers, - /** - * Moment of mass in kilogram square metres (kg·m²) (Second moment of mass, commonly called the moment of inertia). Note: multiplier "k" is included in this unit symbol for compatibility with IEC 61850-7-3. - */ + /** Moment of mass in kilogram square metres (kg·m²) (Second moment of mass, commonly called the moment of inertia). Note: multiplier "k" is included in this unit symbol for compatibility with IEC 61850-7-3. */ kgm2, - /** - * Sound pressure level in decibels. Note: multiplier "d" is included in this unit symbol for compatibility with IEC 61850-7-3. - */ + /** Sound pressure level in decibels. Note: multiplier "d" is included in this unit symbol for compatibility with IEC 61850-7-3. */ dB, - /** - * Ramp rate in watts per second. - */ + /** Ramp rate in watts per second. */ WPers, - /** - * Volumetric flow rate in litres per second. - */ + /** Volumetric flow rate in litres per second. */ lPers, - /** - * Power level (logarithmic ratio of signal strength , Bel-mW), normalized to 1mW. Note: multiplier "d" is included in this unit symbol for compatibility with IEC 61850-7-3. - */ + /** Power level (logarithmic ratio of signal strength , Bel-mW), normalized to 1mW. Note: multiplier "d" is included in this unit symbol for compatibility with IEC 61850-7-3. */ dBm, - /** - * Time in hours, hour = 60 min = 3600 s. - */ + /** Time in hours, hour = 60 min = 3600 s. */ h, - /** - * Time in minutes, minute = 60 s. - */ + /** Time in minutes, minute = 60 s. */ min, - /** - * Quantity power, Q. - */ + /** Quantity power, Q. */ Q, - /** - * Quantity energy, Qh. - */ + /** Quantity energy, Qh. */ Qh, - /** - * Resistivity, ohm metres, (rho). - */ + /** Resistivity, ohm metres, (rho). */ ohmm, - /** - * A/m, magnetic field strength, amperes per metre. - */ + /** A/m, magnetic field strength, amperes per metre. */ APerm, - /** - * Volt-squared hour, volt-squared-hours. - */ + /** Volt-squared hour, volt-squared-hours. */ V2h, - /** - * Ampere-squared hour, ampere-squared hour. - */ + /** Ampere-squared hour, ampere-squared hour. */ A2h, - /** - * Ampere-hours, ampere-hours. - */ + /** Ampere-hours, ampere-hours. */ Ah, - /** - * Amount of substance, Counter value. - */ + /** Amount of substance, Counter value. */ count, - /** - * Volume, cubic feet. - */ + /** Volume, cubic feet. */ ft3, - /** - * Volumetric flow rate, cubic metres per hour. - */ + /** Volumetric flow rate, cubic metres per hour. */ m3Perh, - /** - * Volume in gallons, US gallon (1 gal = 231 in3 = 128 fl ounce). - */ + /** Volume in gallons, US gallon (1 gal = 231 in3 = 128 fl ounce). */ gal, - /** - * Energy, British Thermal Units. - */ + /** Energy, British Thermal Units. */ Btu, - /** - * Volume in litres, litre = dm3 = m3/1000. - */ + /** Volume in litres, litre = dm3 = m3/1000. */ l, - /** - * Volumetric flow rate, litres per hour. - */ + /** Volumetric flow rate, litres per hour. */ lPerh, - /** - * Concentration, The ratio of the volume of a solute divided by the volume of the solution. Note: Users may need use a prefix such a ‘µ' to express a quantity such as ‘µL/L'. - */ + /** Concentration, The ratio of the volume of a solute divided by the volume of the solution. Note: Users may need use a prefix such a ‘µ' to express a quantity such as ‘µL/L'. */ lPerl, - /** - * Concentration, The ratio of the mass of a solute divided by the mass of the solution. Note: Users may need use a prefix such a ‘µ' to express a quantity such as ‘µg/g'. - */ + /** Concentration, The ratio of the mass of a solute divided by the mass of the solution. Note: Users may need use a prefix such a ‘µ' to express a quantity such as ‘µg/g'. */ gPerg, - /** - * Concentration, The amount of substance concentration, (c), the amount of solvent in moles divided by the volume of solution in m³. - */ + /** Concentration, The amount of substance concentration, (c), the amount of solvent in moles divided by the volume of solution in m³. */ molPerm3, - /** - * Concentration, Molar fraction, the ratio of the molar amount of a solute divided by the molar amount of the solution. - */ + /** Concentration, Molar fraction, the ratio of the molar amount of a solute divided by the molar amount of the solution. */ molPermol, - /** - * Concentration, Molality, the amount of solute in moles and the amount of solvent in kilograms. - */ + /** Concentration, Molality, the amount of solute in moles and the amount of solvent in kilograms. */ molPerkg, - /** - * Time, Ratio of time. Note: Users may need to supply a prefix such as ‘&#181;' to show rates such as ‘&#181;s/s'. - */ + /** Time, Ratio of time. Note: Users may need to supply a prefix such as ‘&#181;' to show rates such as ‘&#181;s/s'. */ sPers, - /** - * Frequency, rate of frequency change. Note: Users may need to supply a prefix such as ‘m' to show rates such as ‘mHz/Hz'. - */ + /** Frequency, rate of frequency change. Note: Users may need to supply a prefix such as ‘m' to show rates such as ‘mHz/Hz'. */ HzPerHz, - /** - * Voltage, ratio of voltages. Note: Users may need to supply a prefix such as ‘m' to show rates such as ‘mV/V'. - */ + /** Voltage, ratio of voltages. Note: Users may need to supply a prefix such as ‘m' to show rates such as ‘mV/V'. */ VPerV, - /** - * Current, ratio of amperages. Note: Users may need to supply a prefix such as ‘m' to show rates such as ‘mA/A'. - */ + /** Current, ratio of amperages. Note: Users may need to supply a prefix such as ‘m' to show rates such as ‘mA/A'. */ APerA, - /** - * Power factor, PF, the ratio of the active power to the apparent power. Note: The sign convention used for power factor will differ between IEC meters and EEI (ANSI) meters. It is assumed that the data consumers understand the type of meter being used and agree on the sign convention in use at any given utility. - */ + /** Power factor, PF, the ratio of the active power to the apparent power. Note: The sign convention used for power factor will differ between IEC meters and EEI (ANSI) meters. It is assumed that the data consumers understand the type of meter being used and agree on the sign convention in use at any given utility. */ VPerVA, - /** - * Amount of rotation, revolutions. - */ + /** Amount of rotation, revolutions. */ rev, - /** - * Catalytic activity, katal = mol / s. - */ + /** Catalytic activity, katal = mol / s. */ kat, - /** - * Specific energy, Joules / kg. - */ + /** Specific energy, Joules / kg. */ JPerkg, - /** - * Volume, cubic metres, with the value uncompensated for weather effects. - */ + /** Volume, cubic metres, with the value uncompensated for weather effects. */ m3Uncompensated, - /** - * Volume, cubic metres, with the value compensated for weather effects. - */ + /** Volume, cubic metres, with the value compensated for weather effects. */ m3Compensated, - /** - * Signal Strength, ratio of power. Note: Users may need to supply a prefix such as ‘m' to show rates such as ‘mW/W'. - */ + /** Signal Strength, ratio of power. Note: Users may need to supply a prefix such as ‘m' to show rates such as ‘mW/W'. */ WPerW, - /** - * Energy, therms. - */ + /** Energy, therms. */ therm, - /** - * Wavenumber, reciprocal metres, (1/m). - */ + /** Wavenumber, reciprocal metres, (1/m). */ onePerm, - /** - * Specific volume, cubic metres per kilogram, v. - */ + /** Specific volume, cubic metres per kilogram, v. */ m3Perkg, - /** - * Dynamic viscosity, pascal seconds. - */ + /** Dynamic viscosity, pascal seconds. */ Pas, - /** - * Moment of force, newton metres. - */ + /** Moment of force, newton metres. */ Nm, - /** - * Surface tension, newton per metre. - */ + /** Surface tension, newton per metre. */ NPerm, - /** - * Angular acceleration, radians per second squared. - */ + /** Angular acceleration, radians per second squared. */ radPers2, - /** - * Energy density, joules per cubic metre. - */ + /** Energy density, joules per cubic metre. */ JPerm3, - /** - * Electric field strength, volts per metre. - */ + /** Electric field strength, volts per metre. */ VPerm, - /** - * Electric charge density, coulombs per cubic metre. - */ + /** Electric charge density, coulombs per cubic metre. */ CPerm3, - /** - * Surface charge density, coulombs per square metre. - */ + /** Surface charge density, coulombs per square metre. */ CPerm2, - /** - * Permittivity, farads per metre. - */ + /** Permittivity, farads per metre. */ FPerm, - /** - * Permeability, henrys per metre. - */ + /** Permeability, henrys per metre. */ HPerm, - /** - * Molar energy, joules per mole. - */ + /** Molar energy, joules per mole. */ JPermol, - /** - * Molar entropy, molar heat capacity, joules per mole kelvin. - */ + /** Molar entropy, molar heat capacity, joules per mole kelvin. */ JPermolK, - /** - * Exposure (x rays), coulombs per kilogram. - */ + /** Exposure (x rays), coulombs per kilogram. */ CPerkg, - /** - * Absorbed dose rate, grays per second. - */ + /** Absorbed dose rate, grays per second. */ GyPers, - /** - * Radiant intensity, watts per steradian. - */ + /** Radiant intensity, watts per steradian. */ WPersr, - /** - * Radiance, watts per square metre steradian. - */ + /** Radiance, watts per square metre steradian. */ WPerm2sr, - /** - * Catalytic activity concentration, katals per cubic metre. - */ + /** Catalytic activity concentration, katals per cubic metre. */ katPerm3, - /** - * Time in days, day = 24 h = 86400 s. - */ + /** Time in days, day = 24 h = 86400 s. */ d, - /** - * Plane angle, minutes. - */ + /** Plane angle, minutes. */ anglemin, - /** - * Plane angle, seconds. - */ + /** Plane angle, seconds. */ anglesec, - /** - * Area, hectares. - */ + /** Area, hectares. */ ha, - /** - * Mass in tons, "tonne" or "metric ton" (1000 kg = 1 Mg). - */ + /** Mass in tons, "tonne" or "metric ton" (1000 kg = 1 Mg). */ tonne, - /** - * Pressure in bars, (1 bar = 100 kPa). - */ + /** Pressure in bars, (1 bar = 100 kPa). */ bar, - /** - * Pressure, millimetres of mercury (1 mmHg is approximately 133.3 Pa). - */ + /** Pressure, millimetres of mercury (1 mmHg is approximately 133.3 Pa). */ mmHg, - /** - * Length, nautical miles (1 M = 1852 m). - */ + /** Length, nautical miles (1 M = 1852 m). */ M, - /** - * Speed, knots (1 kn = 1852/3600) m/s. - */ + /** Speed, knots (1 kn = 1852/3600) m/s. */ kn, - /** - * Magnetic flux, maxwells (1 Mx = 10-8 Wb). - */ + /** Magnetic flux, maxwells (1 Mx = 10-8 Wb). */ Mx, - /** - * Magnetic flux density, gausses (1 G = 10-4 T). - */ + /** Magnetic flux density, gausses (1 G = 10-4 T). */ G, - /** - * Magnetic field in oersteds, (1 Oe = (103/4p) A/m). - */ + /** Magnetic field in oersteds, (1 Oe = (103/4p) A/m). */ Oe, - /** - * Volt-hour, Volt hours. - */ + /** Volt-hour, Volt hours. */ Vh, - /** - * Active power per current flow, watts per Ampere. - */ + /** Active power per current flow, watts per Ampere. */ WPerA, - /** - * Reciprocal of frequency (1/Hz). - */ + /** Reciprocal of frequency (1/Hz). */ onePerHz, - /** - * Power factor, PF, the ratio of the active power to the apparent power. Note: The sign convention used for power factor will differ between IEC meters and EEI (ANSI) meters. It is assumed that the data consumers understand the type of meter being used and agree on the sign convention in use at any given utility. - */ + /** Power factor, PF, the ratio of the active power to the apparent power. Note: The sign convention used for power factor will differ between IEC meters and EEI (ANSI) meters. It is assumed that the data consumers understand the type of meter being used and agree on the sign convention in use at any given utility. */ VPerVAr, - /** - * Electric resistance per length in ohms per metre ((V/A)/m). - */ + /** Electric resistance per length in ohms per metre ((V/A)/m). */ ohmPerm, - /** - * Weight per energy in kilograms per joule (kg/J). Note: multiplier "k" is included in this unit symbol for compatibility with IEC 61850-7-3. - */ + /** Weight per energy in kilograms per joule (kg/J). Note: multiplier "k" is included in this unit symbol for compatibility with IEC 61850-7-3. */ kgPerJ, - /** - * Energy rate in joules per second (J/s). - */ + /** Energy rate in joules per second (J/s). */ JPers, }; diff --git a/CGMES_3.0.0/VAdjIEEE.cpp b/CGMES_3.0.0/VAdjIEEE.cpp index 050a1c975..f62f88f4f 100644 --- a/CGMES_3.0.0/VAdjIEEE.cpp +++ b/CGMES_3.0.0/VAdjIEEE.cpp @@ -8,17 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Float.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Float.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -VAdjIEEE::VAdjIEEE() {}; -VAdjIEEE::~VAdjIEEE() {}; +VAdjIEEE::VAdjIEEE() {} +VAdjIEEE::~VAdjIEEE() {} static const std::list PossibleProfilesForClass = { @@ -50,90 +44,94 @@ VAdjIEEE::getPossibleProfilesForAttributes() const return map; } - -bool assign_VAdjIEEE_adjslew(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VAdjIEEE_adjslew(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->adjslew; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VAdjIEEE_taoff(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VAdjIEEE_taoff(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->taoff; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VAdjIEEE_taon(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VAdjIEEE_taon(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->taon; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VAdjIEEE_vadjf(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VAdjIEEE_vadjf(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vadjf; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VAdjIEEE_vadjmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VAdjIEEE_vadjmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vadjmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VAdjIEEE_vadjmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VAdjIEEE_vadjmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->vadjmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_VAdjIEEE_adjslew(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->adjslew; if (!buffer.str().empty()) @@ -147,7 +145,8 @@ bool get_VAdjIEEE_adjslew(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_VAdjIEEE_taoff(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->taoff; if (!buffer.str().empty()) @@ -161,7 +160,8 @@ bool get_VAdjIEEE_taoff(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_VAdjIEEE_taon(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->taon; if (!buffer.str().empty()) @@ -175,7 +175,8 @@ bool get_VAdjIEEE_taon(const BaseClass* BaseClass_ptr1, std::stringstream& buffe bool get_VAdjIEEE_vadjf(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vadjf; if (!buffer.str().empty()) @@ -189,7 +190,8 @@ bool get_VAdjIEEE_vadjf(const BaseClass* BaseClass_ptr1, std::stringstream& buff bool get_VAdjIEEE_vadjmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vadjmax; if (!buffer.str().empty()) @@ -203,7 +205,8 @@ bool get_VAdjIEEE_vadjmax(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_VAdjIEEE_vadjmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1)) + const VAdjIEEE* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->vadjmin; if (!buffer.str().empty()) @@ -215,8 +218,6 @@ bool get_VAdjIEEE_vadjmin(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char VAdjIEEE::debugName[] = "VAdjIEEE"; const char* VAdjIEEE::debugString() const { @@ -225,17 +226,17 @@ const char* VAdjIEEE::debugString() const void VAdjIEEE::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VAdjIEEE"), &VAdjIEEE_factory)); + factory_map.emplace("cim:VAdjIEEE", &VAdjIEEE_factory); } void VAdjIEEE::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VAdjIEEE.adjslew"), &assign_VAdjIEEE_adjslew)); - assign_map.insert(std::make_pair(std::string("cim:VAdjIEEE.taoff"), &assign_VAdjIEEE_taoff)); - assign_map.insert(std::make_pair(std::string("cim:VAdjIEEE.taon"), &assign_VAdjIEEE_taon)); - assign_map.insert(std::make_pair(std::string("cim:VAdjIEEE.vadjf"), &assign_VAdjIEEE_vadjf)); - assign_map.insert(std::make_pair(std::string("cim:VAdjIEEE.vadjmax"), &assign_VAdjIEEE_vadjmax)); - assign_map.insert(std::make_pair(std::string("cim:VAdjIEEE.vadjmin"), &assign_VAdjIEEE_vadjmin)); + assign_map.emplace("cim:VAdjIEEE.adjslew", &assign_VAdjIEEE_adjslew); + assign_map.emplace("cim:VAdjIEEE.taoff", &assign_VAdjIEEE_taoff); + assign_map.emplace("cim:VAdjIEEE.taon", &assign_VAdjIEEE_taon); + assign_map.emplace("cim:VAdjIEEE.vadjf", &assign_VAdjIEEE_vadjf); + assign_map.emplace("cim:VAdjIEEE.vadjmax", &assign_VAdjIEEE_vadjmax); + assign_map.emplace("cim:VAdjIEEE.vadjmin", &assign_VAdjIEEE_vadjmin); } void VAdjIEEE::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/VAdjIEEE.hpp b/CGMES_3.0.0/VAdjIEEE.hpp index ff970cdba..e6acf346a 100644 --- a/CGMES_3.0.0/VAdjIEEE.hpp +++ b/CGMES_3.0.0/VAdjIEEE.hpp @@ -19,9 +19,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - IEEE voltage adjuster which is used to represent the voltage adjuster in either a power factor or VAr control system. Reference: IEEE 421.5-2005, 11.1. - */ + /** \brief IEEE voltage adjuster which is used to represent the voltage adjuster in either a power factor or VAr control system. Reference: IEEE 421.5-2005, 11.1. */ class VAdjIEEE : public VoltageAdjusterDynamics { public: @@ -29,12 +27,23 @@ namespace CIMPP VAdjIEEE(); ~VAdjIEEE() override; - CIMPP::Float adjslew; /* Rate at which output of adjuster changes (<i>ADJ_SLEW</i>). Unit = s / PU. Typical value = 300. Default: 0.0 */ - CIMPP::Seconds taoff; /* Time that adjuster pulses are off (<i>T</i><i><sub>AOFF</sub></i>) (&gt;= 0). Typical value = 0,5. Default: nullptr */ - CIMPP::Seconds taon; /* Time that adjuster pulses are on (<i>T</i><i><sub>AON</sub></i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ - CIMPP::Float vadjf; /* Set high to provide a continuous raise or lower (<i>V</i><i><sub>ADJF</sub></i>). Default: 0.0 */ - CIMPP::PU vadjmax; /* Maximum output of the adjuster (<i>V</i><i><sub>ADJMAX</sub></i>) (&gt; VAdjIEEE.vadjmin). Typical value = 1,1. Default: nullptr */ - CIMPP::PU vadjmin; /* Minimum output of the adjuster (<i>V</i><i><sub>ADJMIN</sub></i>) (&lt; VAdjIEEE.vadjmax). Typical value = 0,9. Default: nullptr */ + /** \brief Rate at which output of adjuster changes (<i>ADJ_SLEW</i>). Unit = s / PU. Typical value = 300. Default: 0.0 */ + CIMPP::Float adjslew; + + /** \brief Time that adjuster pulses are off (<i>T</i><i><sub>AOFF</sub></i>) (&gt;= 0). Typical value = 0,5. Default: nullptr */ + CIMPP::Seconds taoff; + + /** \brief Time that adjuster pulses are on (<i>T</i><i><sub>AON</sub></i>) (&gt;= 0). Typical value = 0,1. Default: nullptr */ + CIMPP::Seconds taon; + + /** \brief Set high to provide a continuous raise or lower (<i>V</i><i><sub>ADJF</sub></i>). Default: 0.0 */ + CIMPP::Float vadjf; + + /** \brief Maximum output of the adjuster (<i>V</i><i><sub>ADJMAX</sub></i>) (&gt; VAdjIEEE.vadjmin). Typical value = 1,1. Default: nullptr */ + CIMPP::PU vadjmax; + + /** \brief Minimum output of the adjuster (<i>V</i><i><sub>ADJMIN</sub></i>) (&lt; VAdjIEEE.vadjmax). Typical value = 0,9. Default: nullptr */ + CIMPP::PU vadjmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/VCompIEEEType1.cpp b/CGMES_3.0.0/VCompIEEEType1.cpp index c229ab6cb..92cbabebb 100644 --- a/CGMES_3.0.0/VCompIEEEType1.cpp +++ b/CGMES_3.0.0/VCompIEEEType1.cpp @@ -8,14 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "PU.hpp" -#include "Seconds.hpp" -#include "PU.hpp" using namespace CIMPP; -VCompIEEEType1::VCompIEEEType1() {}; -VCompIEEEType1::~VCompIEEEType1() {}; +VCompIEEEType1::VCompIEEEType1() {} +VCompIEEEType1::~VCompIEEEType1() {} static const std::list PossibleProfilesForClass = { @@ -44,51 +41,52 @@ VCompIEEEType1::getPossibleProfilesForAttributes() const return map; } - -bool assign_VCompIEEEType1_rc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VCompIEEEType1_rc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1)) + VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VCompIEEEType1_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VCompIEEEType1_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1)) + VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tr; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VCompIEEEType1_xc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VCompIEEEType1_xc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1)) + VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_VCompIEEEType1_rc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1)) + const VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rc; if (!buffer.str().empty()) @@ -102,7 +100,8 @@ bool get_VCompIEEEType1_rc(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_VCompIEEEType1_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1)) + const VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -116,7 +115,8 @@ bool get_VCompIEEEType1_tr(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_VCompIEEEType1_xc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1)) + const VCompIEEEType1* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xc; if (!buffer.str().empty()) @@ -128,8 +128,6 @@ bool get_VCompIEEEType1_xc(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char VCompIEEEType1::debugName[] = "VCompIEEEType1"; const char* VCompIEEEType1::debugString() const { @@ -138,14 +136,14 @@ const char* VCompIEEEType1::debugString() const void VCompIEEEType1::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VCompIEEEType1"), &VCompIEEEType1_factory)); + factory_map.emplace("cim:VCompIEEEType1", &VCompIEEEType1_factory); } void VCompIEEEType1::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VCompIEEEType1.rc"), &assign_VCompIEEEType1_rc)); - assign_map.insert(std::make_pair(std::string("cim:VCompIEEEType1.tr"), &assign_VCompIEEEType1_tr)); - assign_map.insert(std::make_pair(std::string("cim:VCompIEEEType1.xc"), &assign_VCompIEEEType1_xc)); + assign_map.emplace("cim:VCompIEEEType1.rc", &assign_VCompIEEEType1_rc); + assign_map.emplace("cim:VCompIEEEType1.tr", &assign_VCompIEEEType1_tr); + assign_map.emplace("cim:VCompIEEEType1.xc", &assign_VCompIEEEType1_xc); } void VCompIEEEType1::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/VCompIEEEType1.hpp b/CGMES_3.0.0/VCompIEEEType1.hpp index 2164dafdd..bd2fe8205 100644 --- a/CGMES_3.0.0/VCompIEEEType1.hpp +++ b/CGMES_3.0.0/VCompIEEEType1.hpp @@ -18,9 +18,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Terminal voltage transducer and load compensator as defined in IEEE 421.5-2005, 4. This model is common to all excitation system models described in the IEEE Standard. Parameter details:
  1. If Rc and Xc are set to zero, the load compensation is not employed and the behaviour is as a simple sensing circuit.
  1. If all parameters (Rc, Xc and Tr) are set to zero, the standard model VCompIEEEType1 is bypassed.
Reference: IEEE 421.5-2005 4. - */ + /** \brief Terminal voltage transducer and load compensator as defined in IEEE 421.5-2005, 4. This model is common to all excitation system models described in the IEEE Standard. Parameter details:
  1. If Rc and Xc are set to zero, the load compensation is not employed and the behaviour is as a simple sensing circuit.
  1. If all parameters (Rc, Xc and Tr) are set to zero, the standard model VCompIEEEType1 is bypassed.
Reference: IEEE 421.5-2005 4. */ class VCompIEEEType1 : public VoltageCompensatorDynamics { public: @@ -28,9 +26,14 @@ namespace CIMPP VCompIEEEType1(); ~VCompIEEEType1() override; - CIMPP::PU rc; /* <font color=`#0f0f0f`>Resistive component of compensation of a generator (<i>Rc</i>) (&gt;= 0).</font> Default: nullptr */ - CIMPP::Seconds tr; /* <font color=`#0f0f0f`>Time constant which is used for the combined voltage sensing and compensation signal (<i>Tr</i>) (&gt;= 0).</font> Default: nullptr */ - CIMPP::PU xc; /* <font color=`#0f0f0f`>Reactive component of compensation of a generator (<i>Xc</i>) (&gt;= 0).</font> Default: nullptr */ + /** \brief <font color=`#0f0f0f`>Resistive component of compensation of a generator (<i>Rc</i>) (&gt;= 0).</font> Default: nullptr */ + CIMPP::PU rc; + + /** \brief <font color=`#0f0f0f`>Time constant which is used for the combined voltage sensing and compensation signal (<i>Tr</i>) (&gt;= 0).</font> Default: nullptr */ + CIMPP::Seconds tr; + + /** \brief <font color=`#0f0f0f`>Reactive component of compensation of a generator (<i>Xc</i>) (&gt;= 0).</font> Default: nullptr */ + CIMPP::PU xc; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/VCompIEEEType2.cpp b/CGMES_3.0.0/VCompIEEEType2.cpp index 9317fd9a8..1377d7b30 100644 --- a/CGMES_3.0.0/VCompIEEEType2.cpp +++ b/CGMES_3.0.0/VCompIEEEType2.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "GenICompensationForGenJ.hpp" -#include "Seconds.hpp" using namespace CIMPP; -VCompIEEEType2::VCompIEEEType2() {}; -VCompIEEEType2::~VCompIEEEType2() {}; +VCompIEEEType2::VCompIEEEType2() {} +VCompIEEEType2::~VCompIEEEType2() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ VCompIEEEType2::getPossibleProfilesForAttributes() const return map; } - -bool assign_VCompIEEEType2_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (VCompIEEEType2* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->tr; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_GenICompensationForGenJ_VcompIEEEType2(BaseClass*, BaseClass*); bool assign_VCompIEEEType2_GenICompensationForGenJ(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_VCompIEEEType2_GenICompensationForGenJ(BaseClass* BaseClass_ptr1, Ba return false; } +bool assign_VCompIEEEType2_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + VCompIEEEType2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->tr; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_VCompIEEEType2_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VCompIEEEType2* element = dynamic_cast(BaseClass_ptr1)) + const VCompIEEEType2* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_VCompIEEEType2_tr(const BaseClass* BaseClass_ptr1, std::stringstream& b return false; } - - const char VCompIEEEType2::debugName[] = "VCompIEEEType2"; const char* VCompIEEEType2::debugString() const { @@ -98,17 +96,17 @@ const char* VCompIEEEType2::debugString() const void VCompIEEEType2::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VCompIEEEType2"), &VCompIEEEType2_factory)); + factory_map.emplace("cim:VCompIEEEType2", &VCompIEEEType2_factory); } void VCompIEEEType2::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VCompIEEEType2.tr"), &assign_VCompIEEEType2_tr)); + assign_map.emplace("cim:VCompIEEEType2.tr", &assign_VCompIEEEType2_tr); } void VCompIEEEType2::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VCompIEEEType2.GenICompensationForGenJ"), &assign_VCompIEEEType2_GenICompensationForGenJ)); + assign_map.emplace("cim:VCompIEEEType2.GenICompensationForGenJ", &assign_VCompIEEEType2_GenICompensationForGenJ); } void VCompIEEEType2::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/VCompIEEEType2.hpp b/CGMES_3.0.0/VCompIEEEType2.hpp index 55d769ddb..6d02cf579 100644 --- a/CGMES_3.0.0/VCompIEEEType2.hpp +++ b/CGMES_3.0.0/VCompIEEEType2.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class GenICompensationForGenJ; - /* - Terminal voltage transducer and load compensator as defined in IEEE 421.5-2005, 4. This model is designed to cover the following types of compensation:
  • reactive droop;
  • transformer-drop or line-drop compensation;
  • reactive differential compensation known also as cross-current compensation.
Reference: IEEE 421.5-2005, 4. - */ + /** \brief Terminal voltage transducer and load compensator as defined in IEEE 421.5-2005, 4. This model is designed to cover the following types of compensation:
  • reactive droop;
  • transformer-drop or line-drop compensation;
  • reactive differential compensation known also as cross-current compensation.
Reference: IEEE 421.5-2005, 4. */ class VCompIEEEType2 : public VoltageCompensatorDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP VCompIEEEType2(); ~VCompIEEEType2() override; - std::list GenICompensationForGenJ; /* Compensation of this voltage compensator`s generator for current flow out of another generator. Default: 0 */ - CIMPP::Seconds tr; /* <font color=`#0f0f0f`>Time constant which is used for the combined voltage sensing and compensation signal (<i>Tr</i>) (&gt;= 0).</font> Default: nullptr */ + /** \brief Compensation of this voltage compensator`s generator for current flow out of another generator. Default: 0 */ + std::list GenICompensationForGenJ; + + /** \brief <font color=`#0f0f0f`>Time constant which is used for the combined voltage sensing and compensation signal (<i>Tr</i>) (&gt;= 0).</font> Default: nullptr */ + CIMPP::Seconds tr; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/VSCDynamics.cpp b/CGMES_3.0.0/VSCDynamics.cpp index a015c133e..1571a5379 100644 --- a/CGMES_3.0.0/VSCDynamics.cpp +++ b/CGMES_3.0.0/VSCDynamics.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -VSCDynamics::VSCDynamics() : VsConverter(nullptr) {}; -VSCDynamics::~VSCDynamics() {}; +VSCDynamics::VSCDynamics() : VsConverter(nullptr) {} +VSCDynamics::~VSCDynamics() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ VSCDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_VsConverter_VSCDynamics(BaseClass*, BaseClass*); bool assign_VSCDynamics_VsConverter(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_VSCDynamics_VsConverter(BaseClass* BaseClass_ptr1, BaseClass* BaseCl return false; } - bool get_VSCDynamics_VsConverter(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const VSCDynamics* element = dynamic_cast(BaseClass_ptr1)) + const VSCDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->VsConverter != 0) { @@ -73,7 +71,6 @@ bool get_VSCDynamics_VsConverter(const BaseClass* BaseClass_ptr1, std::list& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VSCDynamics"), &VSCDynamics_factory)); + factory_map.emplace("cim:VSCDynamics", &VSCDynamics_factory); } void VSCDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void VSCDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VSCDynamics.VsConverter"), &assign_VSCDynamics_VsConverter)); + assign_map.emplace("cim:VSCDynamics.VsConverter", &assign_VSCDynamics_VsConverter); } void VSCDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/VSCDynamics.hpp b/CGMES_3.0.0/VSCDynamics.hpp index d7cc07f36..3f0502493 100644 --- a/CGMES_3.0.0/VSCDynamics.hpp +++ b/CGMES_3.0.0/VSCDynamics.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class VsConverter; - /* - VSC function block whose behaviour is described by reference to a standard model or by definition of a user-defined model. - */ + /** \brief VSC function block whose behaviour is described by reference to a standard model or by definition of a user-defined model. */ class VSCDynamics : public HVDCDynamics { public: @@ -27,7 +25,8 @@ namespace CIMPP VSCDynamics(); ~VSCDynamics() override; - CIMPP::VsConverter* VsConverter; /* Voltage source converter to which voltage source converter dynamics model applies. Default: 0 */ + /** \brief Voltage source converter to which voltage source converter dynamics model applies. Default: 0 */ + CIMPP::VsConverter* VsConverter; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/VSCUserDefined.cpp b/CGMES_3.0.0/VSCUserDefined.cpp index 0e8a98c8e..c99302215 100644 --- a/CGMES_3.0.0/VSCUserDefined.cpp +++ b/CGMES_3.0.0/VSCUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -VSCUserDefined::VSCUserDefined() {}; -VSCUserDefined::~VSCUserDefined() {}; +VSCUserDefined::VSCUserDefined() {} +VSCUserDefined::~VSCUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ VSCUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_VSCUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (VSCUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_VSCUserDefined(BaseClass*, BaseClass*); bool assign_VSCUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_VSCUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr return false; } +bool assign_VSCUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + VSCUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_VSCUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VSCUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const VSCUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_VSCUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::string return false; } - - const char VSCUserDefined::debugName[] = "VSCUserDefined"; const char* VSCUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* VSCUserDefined::debugString() const void VSCUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VSCUserDefined"), &VSCUserDefined_factory)); + factory_map.emplace("cim:VSCUserDefined", &VSCUserDefined_factory); } void VSCUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VSCUserDefined.proprietary"), &assign_VSCUserDefined_proprietary)); + assign_map.emplace("cim:VSCUserDefined.proprietary", &assign_VSCUserDefined_proprietary); } void VSCUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VSCUserDefined.ProprietaryParameterDynamics"), &assign_VSCUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:VSCUserDefined.ProprietaryParameterDynamics", &assign_VSCUserDefined_ProprietaryParameterDynamics); } void VSCUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/VSCUserDefined.hpp b/CGMES_3.0.0/VSCUserDefined.hpp index 50fcd75b7..d63cf4179 100644 --- a/CGMES_3.0.0/VSCUserDefined.hpp +++ b/CGMES_3.0.0/VSCUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Voltage source converter (VSC) function block whose dynamic behaviour is described by a user-defined model. - */ + /** \brief Voltage source converter (VSC) function block whose dynamic behaviour is described by a user-defined model. */ class VSCUserDefined : public VSCDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP VSCUserDefined(); ~VSCUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Validity.cpp b/CGMES_3.0.0/Validity.cpp index 9796a2efa..02845a923 100644 --- a/CGMES_3.0.0/Validity.cpp +++ b/CGMES_3.0.0/Validity.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "Validity") + if (EnumSymbol.substr(0, pos) != "Validity") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "GOOD") + if (EnumSymbol == "GOOD") { rop = Validity::GOOD; return lop; } - if(EnumSymbol == "QUESTIONABLE") + if (EnumSymbol == "QUESTIONABLE") { rop = Validity::QUESTIONABLE; return lop; } - if(EnumSymbol == "INVALID") + if (EnumSymbol == "INVALID") { rop = Validity::INVALID; return lop; diff --git a/CGMES_3.0.0/Validity.hpp b/CGMES_3.0.0/Validity.hpp index fb4d8ce56..73e0f28c5 100644 --- a/CGMES_3.0.0/Validity.hpp +++ b/CGMES_3.0.0/Validity.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Validity for MeasurementValue. - */ + /** \brief Validity for MeasurementValue. */ class Validity { public: enum Validity_ENUM { - /** - * The value is marked good if no abnormal condition of the acquisition function or the information source is detected. - */ + /** The value is marked good if no abnormal condition of the acquisition function or the information source is detected. */ GOOD, - /** - * The value is marked questionable if a supervision function detects an abnormal behaviour, however the value could still be valid. The client is responsible for determining whether or not values marked "questionable" should be used. - */ + /** The value is marked questionable if a supervision function detects an abnormal behaviour, however the value could still be valid. The client is responsible for determining whether or not values marked "questionable" should be used. */ QUESTIONABLE, - /** - * The value is marked invalid when a supervision function recognises abnormal conditions of the acquisition function or the information source (missing or non-operating updating devices). The value is not defined under this condition. The mark invalid is used to indicate to the client that the value may be incorrect and shall not be used. - */ + /** The value is marked invalid when a supervision function recognises abnormal conditions of the acquisition function or the information source (missing or non-operating updating devices). The value is not defined under this condition. The mark invalid is used to indicate to the client that the value may be incorrect and shall not be used. */ INVALID, }; diff --git a/CGMES_3.0.0/ValueAliasSet.cpp b/CGMES_3.0.0/ValueAliasSet.cpp index a84bfa385..d770dee21 100644 --- a/CGMES_3.0.0/ValueAliasSet.cpp +++ b/CGMES_3.0.0/ValueAliasSet.cpp @@ -15,8 +15,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -ValueAliasSet::ValueAliasSet() {}; -ValueAliasSet::~ValueAliasSet() {}; +ValueAliasSet::ValueAliasSet() {} +ValueAliasSet::~ValueAliasSet() {} static const std::list PossibleProfilesForClass = { @@ -46,8 +46,6 @@ ValueAliasSet::getPossibleProfilesForAttributes() const return map; } - - bool assign_Command_ValueAliasSet(BaseClass*, BaseClass*); bool assign_ValueAliasSet_Commands(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -64,6 +62,7 @@ bool assign_ValueAliasSet_Commands(BaseClass* BaseClass_ptr1, BaseClass* BaseCla } return false; } + bool assign_Discrete_ValueAliasSet(BaseClass*, BaseClass*); bool assign_ValueAliasSet_Discretes(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -80,6 +79,7 @@ bool assign_ValueAliasSet_Discretes(BaseClass* BaseClass_ptr1, BaseClass* BaseCl } return false; } + bool assign_RaiseLowerCommand_ValueAliasSet(BaseClass*, BaseClass*); bool assign_ValueAliasSet_RaiseLowerCommands(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -96,6 +96,7 @@ bool assign_ValueAliasSet_RaiseLowerCommands(BaseClass* BaseClass_ptr1, BaseClas } return false; } + bool assign_ValueToAlias_ValueAliasSet(BaseClass*, BaseClass*); bool assign_ValueAliasSet_Values(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -115,6 +116,8 @@ bool assign_ValueAliasSet_Values(BaseClass* BaseClass_ptr1, BaseClass* BaseClass + + const char ValueAliasSet::debugName[] = "ValueAliasSet"; const char* ValueAliasSet::debugString() const { @@ -123,7 +126,7 @@ const char* ValueAliasSet::debugString() const void ValueAliasSet::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ValueAliasSet"), &ValueAliasSet_factory)); + factory_map.emplace("cim:ValueAliasSet", &ValueAliasSet_factory); } void ValueAliasSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -132,10 +135,10 @@ void ValueAliasSet::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ValueAliasSet.Commands"), &assign_ValueAliasSet_Commands)); - assign_map.insert(std::make_pair(std::string("cim:ValueAliasSet.Discretes"), &assign_ValueAliasSet_Discretes)); - assign_map.insert(std::make_pair(std::string("cim:ValueAliasSet.RaiseLowerCommands"), &assign_ValueAliasSet_RaiseLowerCommands)); - assign_map.insert(std::make_pair(std::string("cim:ValueAliasSet.Values"), &assign_ValueAliasSet_Values)); + assign_map.emplace("cim:ValueAliasSet.Commands", &assign_ValueAliasSet_Commands); + assign_map.emplace("cim:ValueAliasSet.Discretes", &assign_ValueAliasSet_Discretes); + assign_map.emplace("cim:ValueAliasSet.RaiseLowerCommands", &assign_ValueAliasSet_RaiseLowerCommands); + assign_map.emplace("cim:ValueAliasSet.Values", &assign_ValueAliasSet_Values); } void ValueAliasSet::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/ValueAliasSet.hpp b/CGMES_3.0.0/ValueAliasSet.hpp index 049707623..c73f4520a 100644 --- a/CGMES_3.0.0/ValueAliasSet.hpp +++ b/CGMES_3.0.0/ValueAliasSet.hpp @@ -20,9 +20,7 @@ namespace CIMPP class RaiseLowerCommand; class ValueToAlias; - /* - Describes the translation of a set of values into a name and is intendend to facilitate custom translations. Each ValueAliasSet has a name, description etc. A specific Measurement may represent a discrete state like Open, Closed, Intermediate etc. This requires a translation from the MeasurementValue.value number to a string, e.g. 0->"Invalid", 1->"Open", 2->"Closed", 3->"Intermediate". Each ValueToAlias member in ValueAliasSet.Value describe a mapping for one particular value to a name. - */ + /** \brief Describes the translation of a set of values into a name and is intendend to facilitate custom translations. Each ValueAliasSet has a name, description etc. A specific Measurement may represent a discrete state like Open, Closed, Intermediate etc. This requires a translation from the MeasurementValue.value number to a string, e.g. 0->"Invalid", 1->"Open", 2->"Closed", 3->"Intermediate". Each ValueToAlias member in ValueAliasSet.Value describe a mapping for one particular value to a name. */ class ValueAliasSet : public IdentifiedObject { public: @@ -30,10 +28,17 @@ namespace CIMPP ValueAliasSet(); ~ValueAliasSet() override; - std::list Commands; /* The Commands using the set for translation. Default: 0 */ - std::list Discretes; /* The Measurements using the set for translation. Default: 0 */ - std::list RaiseLowerCommands; /* The Commands using the set for translation. Default: 0 */ - std::list Values; /* The ValueToAlias mappings included in the set. Default: 0 */ + /** \brief The Commands using the set for translation. Default: 0 */ + std::list Commands; + + /** \brief The Measurements using the set for translation. Default: 0 */ + std::list Discretes; + + /** \brief The Commands using the set for translation. Default: 0 */ + std::list RaiseLowerCommands; + + /** \brief The ValueToAlias mappings included in the set. Default: 0 */ + std::list Values; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/ValueToAlias.cpp b/CGMES_3.0.0/ValueToAlias.cpp index 323f54dea..cee8dc95f 100644 --- a/CGMES_3.0.0/ValueToAlias.cpp +++ b/CGMES_3.0.0/ValueToAlias.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ValueAliasSet.hpp" -#include "Integer.hpp" using namespace CIMPP; -ValueToAlias::ValueToAlias() : ValueAliasSet(nullptr) {}; -ValueToAlias::~ValueToAlias() {}; +ValueToAlias::ValueToAlias() : ValueAliasSet(nullptr) {} +ValueToAlias::~ValueToAlias() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ ValueToAlias::getPossibleProfilesForAttributes() const return map; } - -bool assign_ValueToAlias_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (ValueToAlias* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->value; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ValueAliasSet_Values(BaseClass*, BaseClass*); bool assign_ValueToAlias_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_ValueToAlias_ValueAliasSet(BaseClass* BaseClass_ptr1, BaseClass* Bas return false; } -bool get_ValueToAlias_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_ValueToAlias_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const ValueToAlias* element = dynamic_cast(BaseClass_ptr1)) + ValueToAlias* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->value; - if (!buffer.str().empty()) + buffer >> element->value; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_ValueToAlias_ValueAliasSet(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const ValueToAlias* element = dynamic_cast(BaseClass_ptr1)) + const ValueToAlias* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ValueAliasSet != 0) { @@ -102,6 +86,20 @@ bool get_ValueToAlias_ValueAliasSet(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->value; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char ValueToAlias::debugName[] = "ValueToAlias"; const char* ValueToAlias::debugString() const @@ -111,17 +109,17 @@ const char* ValueToAlias::debugString() const void ValueToAlias::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:ValueToAlias"), &ValueToAlias_factory)); + factory_map.emplace("cim:ValueToAlias", &ValueToAlias_factory); } void ValueToAlias::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ValueToAlias.value"), &assign_ValueToAlias_value)); + assign_map.emplace("cim:ValueToAlias.value", &assign_ValueToAlias_value); } void ValueToAlias::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:ValueToAlias.ValueAliasSet"), &assign_ValueToAlias_ValueAliasSet)); + assign_map.emplace("cim:ValueToAlias.ValueAliasSet", &assign_ValueToAlias_ValueAliasSet); } void ValueToAlias::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/ValueToAlias.hpp b/CGMES_3.0.0/ValueToAlias.hpp index 4b63a08a5..4d39dd573 100644 --- a/CGMES_3.0.0/ValueToAlias.hpp +++ b/CGMES_3.0.0/ValueToAlias.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ValueAliasSet; - /* - Describes the translation of one particular value into a name, e.g. 1 as "Open". - */ + /** \brief Describes the translation of one particular value into a name, e.g. 1 as "Open". */ class ValueToAlias : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP ValueToAlias(); ~ValueToAlias() override; - CIMPP::ValueAliasSet* ValueAliasSet; /* The ValueAliasSet having the ValueToAlias mappings. Default: 0 */ - CIMPP::Integer value; /* The value that is mapped. Default: 0 */ + /** \brief The ValueAliasSet having the ValueToAlias mappings. Default: 0 */ + CIMPP::ValueAliasSet* ValueAliasSet; + + /** \brief The value that is mapped. Default: 0 */ + CIMPP::Integer value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/VisibilityLayer.cpp b/CGMES_3.0.0/VisibilityLayer.cpp index 763004423..342592e16 100644 --- a/CGMES_3.0.0/VisibilityLayer.cpp +++ b/CGMES_3.0.0/VisibilityLayer.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "DiagramObject.hpp" -#include "Integer.hpp" using namespace CIMPP; -VisibilityLayer::VisibilityLayer() {}; -VisibilityLayer::~VisibilityLayer() {}; +VisibilityLayer::VisibilityLayer() {} +VisibilityLayer::~VisibilityLayer() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ VisibilityLayer::getPossibleProfilesForAttributes() const return map; } - -bool assign_VisibilityLayer_drawingOrder(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (VisibilityLayer* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->drawingOrder; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_DiagramObject_VisibilityLayers(BaseClass*, BaseClass*); bool assign_VisibilityLayer_VisibleObjects(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,24 +58,24 @@ bool assign_VisibilityLayer_VisibleObjects(BaseClass* BaseClass_ptr1, BaseClass* return false; } -bool get_VisibilityLayer_drawingOrder(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_VisibilityLayer_drawingOrder(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const VisibilityLayer* element = dynamic_cast(BaseClass_ptr1)) + VisibilityLayer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->drawingOrder; - if (!buffer.str().empty()) + buffer >> element->drawingOrder; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_VisibilityLayer_VisibleObjects(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const VisibilityLayer* element = dynamic_cast(BaseClass_ptr1)) + const VisibilityLayer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { std::copy(element->VisibleObjects.begin(), element->VisibleObjects.end(), std::back_inserter(BaseClass_list)); return !BaseClass_list.empty(); @@ -99,6 +83,20 @@ bool get_VisibilityLayer_VisibleObjects(const BaseClass* BaseClass_ptr1, std::li return false; } +bool get_VisibilityLayer_drawingOrder(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const VisibilityLayer* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->drawingOrder; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char VisibilityLayer::debugName[] = "VisibilityLayer"; const char* VisibilityLayer::debugString() const @@ -108,17 +106,17 @@ const char* VisibilityLayer::debugString() const void VisibilityLayer::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VisibilityLayer"), &VisibilityLayer_factory)); + factory_map.emplace("cim:VisibilityLayer", &VisibilityLayer_factory); } void VisibilityLayer::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VisibilityLayer.drawingOrder"), &assign_VisibilityLayer_drawingOrder)); + assign_map.emplace("cim:VisibilityLayer.drawingOrder", &assign_VisibilityLayer_drawingOrder); } void VisibilityLayer::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VisibilityLayer.VisibleObjects"), &assign_VisibilityLayer_VisibleObjects)); + assign_map.emplace("cim:VisibilityLayer.VisibleObjects", &assign_VisibilityLayer_VisibleObjects); } void VisibilityLayer::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/VisibilityLayer.hpp b/CGMES_3.0.0/VisibilityLayer.hpp index 0a1d5af64..6b3232690 100644 --- a/CGMES_3.0.0/VisibilityLayer.hpp +++ b/CGMES_3.0.0/VisibilityLayer.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class DiagramObject; - /* - Layers are typically used for grouping diagram objects according to themes and scales. Themes are used to display or hide certain information (e.g., lakes, borders), while scales are used for hiding or displaying information depending on the current zoom level (hide text when it is too small to be read, or when it exceeds the screen size). This is also called de-cluttering. CIM based graphics exchange supports an m:n relationship between diagram objects and layers. The importing system shall convert an m:n case into an appropriate 1:n representation if the importing system does not support m:n. - */ + /** \brief Layers are typically used for grouping diagram objects according to themes and scales. Themes are used to display or hide certain information (e.g., lakes, borders), while scales are used for hiding or displaying information depending on the current zoom level (hide text when it is too small to be read, or when it exceeds the screen size). This is also called de-cluttering. CIM based graphics exchange supports an m:n relationship between diagram objects and layers. The importing system shall convert an m:n case into an appropriate 1:n representation if the importing system does not support m:n. */ class VisibilityLayer : public IdentifiedObject { public: @@ -28,8 +26,11 @@ namespace CIMPP VisibilityLayer(); ~VisibilityLayer() override; - std::list VisibleObjects; /* A visibility layer can contain one or more diagram objects. Default: 0 */ - CIMPP::Integer drawingOrder; /* The drawing order for this layer. The higher the number, the later the layer and the objects within it are rendered. Default: 0 */ + /** \brief A visibility layer can contain one or more diagram objects. Default: 0 */ + std::list VisibleObjects; + + /** \brief The drawing order for this layer. The higher the number, the later the layer and the objects within it are rendered. Default: 0 */ + CIMPP::Integer drawingOrder; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/Voltage.hpp b/CGMES_3.0.0/Voltage.hpp index 12eb87179..a0682e3d6 100644 --- a/CGMES_3.0.0/Voltage.hpp +++ b/CGMES_3.0.0/Voltage.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Electrical voltage, can be both AC and DC. - */ + /** \brief Electrical voltage, can be both AC and DC. */ class Voltage { public: diff --git a/CGMES_3.0.0/VoltageAdjusterDynamics.cpp b/CGMES_3.0.0/VoltageAdjusterDynamics.cpp index a3ef9d037..5ab8b68ac 100644 --- a/CGMES_3.0.0/VoltageAdjusterDynamics.cpp +++ b/CGMES_3.0.0/VoltageAdjusterDynamics.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -VoltageAdjusterDynamics::VoltageAdjusterDynamics() : PFVArControllerType1Dynamics(nullptr) {}; -VoltageAdjusterDynamics::~VoltageAdjusterDynamics() {}; +VoltageAdjusterDynamics::VoltageAdjusterDynamics() : PFVArControllerType1Dynamics(nullptr) {} +VoltageAdjusterDynamics::~VoltageAdjusterDynamics() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ VoltageAdjusterDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_PFVArControllerType1Dynamics_VoltageAdjusterDynamics(BaseClass*, BaseClass*); bool assign_VoltageAdjusterDynamics_PFVArControllerType1Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_VoltageAdjusterDynamics_PFVArControllerType1Dynamics(BaseClass* Base return false; } - bool get_VoltageAdjusterDynamics_PFVArControllerType1Dynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const VoltageAdjusterDynamics* element = dynamic_cast(BaseClass_ptr1)) + const VoltageAdjusterDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PFVArControllerType1Dynamics != 0) { @@ -73,7 +71,6 @@ bool get_VoltageAdjusterDynamics_PFVArControllerType1Dynamics(const BaseClass* B return false; } - const char VoltageAdjusterDynamics::debugName[] = "VoltageAdjusterDynamics"; const char* VoltageAdjusterDynamics::debugString() const { @@ -82,7 +79,7 @@ const char* VoltageAdjusterDynamics::debugString() const void VoltageAdjusterDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VoltageAdjusterDynamics"), &VoltageAdjusterDynamics_factory)); + factory_map.emplace("cim:VoltageAdjusterDynamics", &VoltageAdjusterDynamics_factory); } void VoltageAdjusterDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void VoltageAdjusterDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VoltageAdjusterDynamics.PFVArControllerType1Dynamics"), &assign_VoltageAdjusterDynamics_PFVArControllerType1Dynamics)); + assign_map.emplace("cim:VoltageAdjusterDynamics.PFVArControllerType1Dynamics", &assign_VoltageAdjusterDynamics_PFVArControllerType1Dynamics); } void VoltageAdjusterDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/VoltageAdjusterDynamics.hpp b/CGMES_3.0.0/VoltageAdjusterDynamics.hpp index 4173f35c8..f99528de8 100644 --- a/CGMES_3.0.0/VoltageAdjusterDynamics.hpp +++ b/CGMES_3.0.0/VoltageAdjusterDynamics.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class PFVArControllerType1Dynamics; - /* - Voltage adjuster function block whose behaviour is described by reference to a standard model or by definition of a user-defined model. - */ + /** \brief Voltage adjuster function block whose behaviour is described by reference to a standard model or by definition of a user-defined model. */ class VoltageAdjusterDynamics : public DynamicsFunctionBlock { public: @@ -27,7 +25,8 @@ namespace CIMPP VoltageAdjusterDynamics(); ~VoltageAdjusterDynamics() override; - CIMPP::PFVArControllerType1Dynamics* PFVArControllerType1Dynamics; /* Power factor or VAr controller type 1 model with which this voltage adjuster is associated. Default: 0 */ + /** \brief Power factor or VAr controller type 1 model with which this voltage adjuster is associated. Default: 0 */ + CIMPP::PFVArControllerType1Dynamics* PFVArControllerType1Dynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/VoltageAdjusterUserDefined.cpp b/CGMES_3.0.0/VoltageAdjusterUserDefined.cpp index 4a51799ed..c89e76a0e 100644 --- a/CGMES_3.0.0/VoltageAdjusterUserDefined.cpp +++ b/CGMES_3.0.0/VoltageAdjusterUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -VoltageAdjusterUserDefined::VoltageAdjusterUserDefined() {}; -VoltageAdjusterUserDefined::~VoltageAdjusterUserDefined() {}; +VoltageAdjusterUserDefined::VoltageAdjusterUserDefined() {} +VoltageAdjusterUserDefined::~VoltageAdjusterUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ VoltageAdjusterUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_VoltageAdjusterUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (VoltageAdjusterUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_VoltageAdjusterUserDefined(BaseClass*, BaseClass*); bool assign_VoltageAdjusterUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_VoltageAdjusterUserDefined_ProprietaryParameterDynamics(BaseClass* B return false; } +bool assign_VoltageAdjusterUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + VoltageAdjusterUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_VoltageAdjusterUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VoltageAdjusterUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const VoltageAdjusterUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_VoltageAdjusterUserDefined_proprietary(const BaseClass* BaseClass_ptr1, return false; } - - const char VoltageAdjusterUserDefined::debugName[] = "VoltageAdjusterUserDefined"; const char* VoltageAdjusterUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* VoltageAdjusterUserDefined::debugString() const void VoltageAdjusterUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VoltageAdjusterUserDefined"), &VoltageAdjusterUserDefined_factory)); + factory_map.emplace("cim:VoltageAdjusterUserDefined", &VoltageAdjusterUserDefined_factory); } void VoltageAdjusterUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VoltageAdjusterUserDefined.proprietary"), &assign_VoltageAdjusterUserDefined_proprietary)); + assign_map.emplace("cim:VoltageAdjusterUserDefined.proprietary", &assign_VoltageAdjusterUserDefined_proprietary); } void VoltageAdjusterUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VoltageAdjusterUserDefined.ProprietaryParameterDynamics"), &assign_VoltageAdjusterUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:VoltageAdjusterUserDefined.ProprietaryParameterDynamics", &assign_VoltageAdjusterUserDefined_ProprietaryParameterDynamics); } void VoltageAdjusterUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/VoltageAdjusterUserDefined.hpp b/CGMES_3.0.0/VoltageAdjusterUserDefined.hpp index 7d9b0ad8f..7c0945e02 100644 --- a/CGMES_3.0.0/VoltageAdjusterUserDefined.hpp +++ b/CGMES_3.0.0/VoltageAdjusterUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Voltage adjuster function block whose dynamic behaviour is described by a user-defined model. - */ + /** \brief Voltage adjuster function block whose dynamic behaviour is described by a user-defined model. */ class VoltageAdjusterUserDefined : public VoltageAdjusterDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP VoltageAdjusterUserDefined(); ~VoltageAdjusterUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/VoltageCompensatorDynamics.cpp b/CGMES_3.0.0/VoltageCompensatorDynamics.cpp index d255c5a7b..b1b3c20fd 100644 --- a/CGMES_3.0.0/VoltageCompensatorDynamics.cpp +++ b/CGMES_3.0.0/VoltageCompensatorDynamics.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -VoltageCompensatorDynamics::VoltageCompensatorDynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr) {}; -VoltageCompensatorDynamics::~VoltageCompensatorDynamics() {}; +VoltageCompensatorDynamics::VoltageCompensatorDynamics() : ExcitationSystemDynamics(nullptr), RemoteInputSignal(nullptr) {} +VoltageCompensatorDynamics::~VoltageCompensatorDynamics() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ VoltageCompensatorDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_ExcitationSystemDynamics_VoltageCompensatorDynamics(BaseClass*, BaseClass*); bool assign_VoltageCompensatorDynamics_ExcitationSystemDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_VoltageCompensatorDynamics_ExcitationSystemDynamics(BaseClass* BaseC } return false; } + bool assign_RemoteInputSignal_VoltageCompensatorDynamics(BaseClass*, BaseClass*); bool assign_VoltageCompensatorDynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_VoltageCompensatorDynamics_RemoteInputSignal(BaseClass* BaseClass_pt return false; } - bool get_VoltageCompensatorDynamics_ExcitationSystemDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const VoltageCompensatorDynamics* element = dynamic_cast(BaseClass_ptr1)) + const VoltageCompensatorDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->ExcitationSystemDynamics != 0) { @@ -100,7 +99,7 @@ const char* VoltageCompensatorDynamics::debugString() const void VoltageCompensatorDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VoltageCompensatorDynamics"), &VoltageCompensatorDynamics_factory)); + factory_map.emplace("cim:VoltageCompensatorDynamics", &VoltageCompensatorDynamics_factory); } void VoltageCompensatorDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -109,8 +108,8 @@ void VoltageCompensatorDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VoltageCompensatorDynamics.ExcitationSystemDynamics"), &assign_VoltageCompensatorDynamics_ExcitationSystemDynamics)); - assign_map.insert(std::make_pair(std::string("cim:VoltageCompensatorDynamics.RemoteInputSignal"), &assign_VoltageCompensatorDynamics_RemoteInputSignal)); + assign_map.emplace("cim:VoltageCompensatorDynamics.ExcitationSystemDynamics", &assign_VoltageCompensatorDynamics_ExcitationSystemDynamics); + assign_map.emplace("cim:VoltageCompensatorDynamics.RemoteInputSignal", &assign_VoltageCompensatorDynamics_RemoteInputSignal); } void VoltageCompensatorDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/VoltageCompensatorDynamics.hpp b/CGMES_3.0.0/VoltageCompensatorDynamics.hpp index 5f739298f..4eefbccdd 100644 --- a/CGMES_3.0.0/VoltageCompensatorDynamics.hpp +++ b/CGMES_3.0.0/VoltageCompensatorDynamics.hpp @@ -18,9 +18,7 @@ namespace CIMPP class ExcitationSystemDynamics; class RemoteInputSignal; - /* - Voltage compensator function block whose behaviour is described by reference to a standard model or by definition of a user-defined model. - */ + /** \brief Voltage compensator function block whose behaviour is described by reference to a standard model or by definition of a user-defined model. */ class VoltageCompensatorDynamics : public DynamicsFunctionBlock { public: @@ -28,8 +26,11 @@ namespace CIMPP VoltageCompensatorDynamics(); ~VoltageCompensatorDynamics() override; - CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; /* Excitation system model with which this voltage compensator is associated. Default: 0 */ - CIMPP::RemoteInputSignal* RemoteInputSignal; /* Remote input signal used by this voltage compensator model. Default: 0 */ + /** \brief Excitation system model with which this voltage compensator is associated. Default: 0 */ + CIMPP::ExcitationSystemDynamics* ExcitationSystemDynamics; + + /** \brief Remote input signal used by this voltage compensator model. Default: 0 */ + CIMPP::RemoteInputSignal* RemoteInputSignal; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/VoltageCompensatorUserDefined.cpp b/CGMES_3.0.0/VoltageCompensatorUserDefined.cpp index 54c2e492b..dc3b5ff50 100644 --- a/CGMES_3.0.0/VoltageCompensatorUserDefined.cpp +++ b/CGMES_3.0.0/VoltageCompensatorUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -VoltageCompensatorUserDefined::VoltageCompensatorUserDefined() {}; -VoltageCompensatorUserDefined::~VoltageCompensatorUserDefined() {}; +VoltageCompensatorUserDefined::VoltageCompensatorUserDefined() {} +VoltageCompensatorUserDefined::~VoltageCompensatorUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ VoltageCompensatorUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_VoltageCompensatorUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (VoltageCompensatorUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_VoltageCompensatorUserDefined(BaseClass*, BaseClass*); bool assign_VoltageCompensatorUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_VoltageCompensatorUserDefined_ProprietaryParameterDynamics(BaseClass return false; } +bool assign_VoltageCompensatorUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + VoltageCompensatorUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_VoltageCompensatorUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VoltageCompensatorUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const VoltageCompensatorUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_VoltageCompensatorUserDefined_proprietary(const BaseClass* BaseClass_pt return false; } - - const char VoltageCompensatorUserDefined::debugName[] = "VoltageCompensatorUserDefined"; const char* VoltageCompensatorUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* VoltageCompensatorUserDefined::debugString() const void VoltageCompensatorUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VoltageCompensatorUserDefined"), &VoltageCompensatorUserDefined_factory)); + factory_map.emplace("cim:VoltageCompensatorUserDefined", &VoltageCompensatorUserDefined_factory); } void VoltageCompensatorUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VoltageCompensatorUserDefined.proprietary"), &assign_VoltageCompensatorUserDefined_proprietary)); + assign_map.emplace("cim:VoltageCompensatorUserDefined.proprietary", &assign_VoltageCompensatorUserDefined_proprietary); } void VoltageCompensatorUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VoltageCompensatorUserDefined.ProprietaryParameterDynamics"), &assign_VoltageCompensatorUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:VoltageCompensatorUserDefined.ProprietaryParameterDynamics", &assign_VoltageCompensatorUserDefined_ProprietaryParameterDynamics); } void VoltageCompensatorUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/VoltageCompensatorUserDefined.hpp b/CGMES_3.0.0/VoltageCompensatorUserDefined.hpp index 05302ff00..6cd647c3d 100644 --- a/CGMES_3.0.0/VoltageCompensatorUserDefined.hpp +++ b/CGMES_3.0.0/VoltageCompensatorUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Voltage compensator function block whose dynamic behaviour is described by a user-defined model. - */ + /** \brief Voltage compensator function block whose dynamic behaviour is described by a user-defined model. */ class VoltageCompensatorUserDefined : public VoltageCompensatorDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP VoltageCompensatorUserDefined(); ~VoltageCompensatorUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/VoltageLevel.cpp b/CGMES_3.0.0/VoltageLevel.cpp index c08f8f1b0..f3dd3bd6d 100644 --- a/CGMES_3.0.0/VoltageLevel.cpp +++ b/CGMES_3.0.0/VoltageLevel.cpp @@ -11,13 +11,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "BaseVoltage.hpp" #include "Bay.hpp" #include "Substation.hpp" -#include "Voltage.hpp" -#include "Voltage.hpp" using namespace CIMPP; -VoltageLevel::VoltageLevel() : BaseVoltage(nullptr), Substation(nullptr) {}; -VoltageLevel::~VoltageLevel() {}; +VoltageLevel::VoltageLevel() : BaseVoltage(nullptr), Substation(nullptr) {} +VoltageLevel::~VoltageLevel() {} static const std::list PossibleProfilesForClass = { @@ -49,34 +47,6 @@ VoltageLevel::getPossibleProfilesForAttributes() const return map; } - -bool assign_VoltageLevel_highVoltageLimit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (VoltageLevel* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->highVoltageLimit; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_VoltageLevel_lowVoltageLimit(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (VoltageLevel* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->lowVoltageLimit; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_BaseVoltage_VoltageLevel(BaseClass*, BaseClass*); bool assign_VoltageLevel_BaseVoltage(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -93,6 +63,7 @@ bool assign_VoltageLevel_BaseVoltage(BaseClass* BaseClass_ptr1, BaseClass* BaseC } return false; } + bool assign_Bay_VoltageLevel(BaseClass*, BaseClass*); bool assign_VoltageLevel_Bays(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -109,6 +80,7 @@ bool assign_VoltageLevel_Bays(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_pt } return false; } + bool assign_Substation_VoltageLevels(BaseClass*, BaseClass*); bool assign_VoltageLevel_Substation(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -126,38 +98,38 @@ bool assign_VoltageLevel_Substation(BaseClass* BaseClass_ptr1, BaseClass* BaseCl return false; } -bool get_VoltageLevel_highVoltageLimit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_VoltageLevel_highVoltageLimit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const VoltageLevel* element = dynamic_cast(BaseClass_ptr1)) + VoltageLevel* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->highVoltageLimit; - if (!buffer.str().empty()) + buffer >> element->highVoltageLimit; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_VoltageLevel_lowVoltageLimit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_VoltageLevel_lowVoltageLimit(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const VoltageLevel* element = dynamic_cast(BaseClass_ptr1)) + VoltageLevel* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->lowVoltageLimit; - if (!buffer.str().empty()) + buffer >> element->lowVoltageLimit; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } - bool get_VoltageLevel_BaseVoltage(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const VoltageLevel* element = dynamic_cast(BaseClass_ptr1)) + const VoltageLevel* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->BaseVoltage != 0) { @@ -168,9 +140,11 @@ bool get_VoltageLevel_BaseVoltage(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const VoltageLevel* element = dynamic_cast(BaseClass_ptr1)) + const VoltageLevel* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->Substation != 0) { @@ -181,6 +155,35 @@ bool get_VoltageLevel_Substation(const BaseClass* BaseClass_ptr1, std::list(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->highVoltageLimit; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_VoltageLevel_lowVoltageLimit(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const VoltageLevel* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->lowVoltageLimit; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} const char VoltageLevel::debugName[] = "VoltageLevel"; const char* VoltageLevel::debugString() const @@ -190,20 +193,20 @@ const char* VoltageLevel::debugString() const void VoltageLevel::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VoltageLevel"), &VoltageLevel_factory)); + factory_map.emplace("cim:VoltageLevel", &VoltageLevel_factory); } void VoltageLevel::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VoltageLevel.highVoltageLimit"), &assign_VoltageLevel_highVoltageLimit)); - assign_map.insert(std::make_pair(std::string("cim:VoltageLevel.lowVoltageLimit"), &assign_VoltageLevel_lowVoltageLimit)); + assign_map.emplace("cim:VoltageLevel.highVoltageLimit", &assign_VoltageLevel_highVoltageLimit); + assign_map.emplace("cim:VoltageLevel.lowVoltageLimit", &assign_VoltageLevel_lowVoltageLimit); } void VoltageLevel::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VoltageLevel.BaseVoltage"), &assign_VoltageLevel_BaseVoltage)); - assign_map.insert(std::make_pair(std::string("cim:VoltageLevel.Bays"), &assign_VoltageLevel_Bays)); - assign_map.insert(std::make_pair(std::string("cim:VoltageLevel.Substation"), &assign_VoltageLevel_Substation)); + assign_map.emplace("cim:VoltageLevel.BaseVoltage", &assign_VoltageLevel_BaseVoltage); + assign_map.emplace("cim:VoltageLevel.Bays", &assign_VoltageLevel_Bays); + assign_map.emplace("cim:VoltageLevel.Substation", &assign_VoltageLevel_Substation); } void VoltageLevel::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/VoltageLevel.hpp b/CGMES_3.0.0/VoltageLevel.hpp index 8d1cf6e86..664cd9d21 100644 --- a/CGMES_3.0.0/VoltageLevel.hpp +++ b/CGMES_3.0.0/VoltageLevel.hpp @@ -20,9 +20,7 @@ namespace CIMPP class Bay; class Substation; - /* - A collection of equipment at one common system voltage forming a switchgear. The equipment typically consists of breakers, busbars, instrumentation, control, regulation and protection devices as well as assemblies of all these. - */ + /** \brief A collection of equipment at one common system voltage forming a switchgear. The equipment typically consists of breakers, busbars, instrumentation, control, regulation and protection devices as well as assemblies of all these. */ class VoltageLevel : public EquipmentContainer { public: @@ -30,11 +28,20 @@ namespace CIMPP VoltageLevel(); ~VoltageLevel() override; - CIMPP::BaseVoltage* BaseVoltage; /* The base voltage used for all equipment within the voltage level. Default: 0 */ - std::list Bays; /* The bays within this voltage level. Default: 0 */ - CIMPP::Substation* Substation; /* The substation of the voltage level. Default: 0 */ - CIMPP::Voltage highVoltageLimit; /* The bus bar`s high voltage limit. The limit applies to all equipment and nodes contained in a given VoltageLevel. It is not required that it is exchanged in pair with lowVoltageLimit. It is preferable to use operational VoltageLimit, which prevails, if present. Default: nullptr */ - CIMPP::Voltage lowVoltageLimit; /* The bus bar`s low voltage limit. The limit applies to all equipment and nodes contained in a given VoltageLevel. It is not required that it is exchanged in pair with highVoltageLimit. It is preferable to use operational VoltageLimit, which prevails, if present. Default: nullptr */ + /** \brief The base voltage used for all equipment within the voltage level. Default: 0 */ + CIMPP::BaseVoltage* BaseVoltage; + + /** \brief The bays within this voltage level. Default: 0 */ + std::list Bays; + + /** \brief The substation of the voltage level. Default: 0 */ + CIMPP::Substation* Substation; + + /** \brief The bus bar`s high voltage limit. The limit applies to all equipment and nodes contained in a given VoltageLevel. It is not required that it is exchanged in pair with lowVoltageLimit. It is preferable to use operational VoltageLimit, which prevails, if present. Default: nullptr */ + CIMPP::Voltage highVoltageLimit; + + /** \brief The bus bar`s low voltage limit. The limit applies to all equipment and nodes contained in a given VoltageLevel. It is not required that it is exchanged in pair with highVoltageLimit. It is preferable to use operational VoltageLimit, which prevails, if present. Default: nullptr */ + CIMPP::Voltage lowVoltageLimit; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/VoltageLimit.cpp b/CGMES_3.0.0/VoltageLimit.cpp index 1ba3870e1..aeb8307de 100644 --- a/CGMES_3.0.0/VoltageLimit.cpp +++ b/CGMES_3.0.0/VoltageLimit.cpp @@ -8,13 +8,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "Voltage.hpp" -#include "Voltage.hpp" using namespace CIMPP; -VoltageLimit::VoltageLimit() {}; -VoltageLimit::~VoltageLimit() {}; +VoltageLimit::VoltageLimit() {} +VoltageLimit::~VoltageLimit() {} static const std::list PossibleProfilesForClass = { @@ -43,38 +41,38 @@ VoltageLimit::getPossibleProfilesForAttributes() const return map; } - -bool assign_VoltageLimit_normalValue(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VoltageLimit_normalValue(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VoltageLimit* element = dynamic_cast(BaseClass_ptr1)) + VoltageLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->normalValue; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VoltageLimit_value(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VoltageLimit_value(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VoltageLimit* element = dynamic_cast(BaseClass_ptr1)) + VoltageLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->value; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - - bool get_VoltageLimit_normalValue(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VoltageLimit* element = dynamic_cast(BaseClass_ptr1)) + const VoltageLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->normalValue; if (!buffer.str().empty()) @@ -88,7 +86,8 @@ bool get_VoltageLimit_normalValue(const BaseClass* BaseClass_ptr1, std::stringst bool get_VoltageLimit_value(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VoltageLimit* element = dynamic_cast(BaseClass_ptr1)) + const VoltageLimit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->value; if (!buffer.str().empty()) @@ -100,8 +99,6 @@ bool get_VoltageLimit_value(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char VoltageLimit::debugName[] = "VoltageLimit"; const char* VoltageLimit::debugString() const { @@ -110,13 +107,13 @@ const char* VoltageLimit::debugString() const void VoltageLimit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VoltageLimit"), &VoltageLimit_factory)); + factory_map.emplace("cim:VoltageLimit", &VoltageLimit_factory); } void VoltageLimit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VoltageLimit.normalValue"), &assign_VoltageLimit_normalValue)); - assign_map.insert(std::make_pair(std::string("cim:VoltageLimit.value"), &assign_VoltageLimit_value)); + assign_map.emplace("cim:VoltageLimit.normalValue", &assign_VoltageLimit_normalValue); + assign_map.emplace("cim:VoltageLimit.value", &assign_VoltageLimit_value); } void VoltageLimit::addClassAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/VoltageLimit.hpp b/CGMES_3.0.0/VoltageLimit.hpp index 5fa74274c..5ae215076 100644 --- a/CGMES_3.0.0/VoltageLimit.hpp +++ b/CGMES_3.0.0/VoltageLimit.hpp @@ -17,9 +17,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Operational limit applied to voltage. The use of operational VoltageLimit is preferred instead of limits defined at VoltageLevel. The operational VoltageLimits are used, if present. - */ + /** \brief Operational limit applied to voltage. The use of operational VoltageLimit is preferred instead of limits defined at VoltageLevel. The operational VoltageLimits are used, if present. */ class VoltageLimit : public OperationalLimit { public: @@ -27,8 +25,11 @@ namespace CIMPP VoltageLimit(); ~VoltageLimit() override; - CIMPP::Voltage normalValue; /* The normal limit on voltage. High or low limit nature of the limit depends upon the properties of the operational limit type. The attribute shall be a positive value or zero. Default: nullptr */ - CIMPP::Voltage value; /* Limit on voltage. High or low limit nature of the limit depends upon the properties of the operational limit type. The attribute shall be a positive value or zero. Default: nullptr */ + /** \brief The normal limit on voltage. High or low limit nature of the limit depends upon the properties of the operational limit type. The attribute shall be a positive value or zero. Default: nullptr */ + CIMPP::Voltage normalValue; + + /** \brief Limit on voltage. High or low limit nature of the limit depends upon the properties of the operational limit type. The attribute shall be a positive value or zero. Default: nullptr */ + CIMPP::Voltage value; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/VoltagePerReactivePower.hpp b/CGMES_3.0.0/VoltagePerReactivePower.hpp index 51ef9b955..521c38a90 100644 --- a/CGMES_3.0.0/VoltagePerReactivePower.hpp +++ b/CGMES_3.0.0/VoltagePerReactivePower.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Voltage variation with reactive power. - */ + /** \brief Voltage variation with reactive power. */ class VoltagePerReactivePower { public: diff --git a/CGMES_3.0.0/VolumeFlowRate.hpp b/CGMES_3.0.0/VolumeFlowRate.hpp index 256cf7e18..4c78de832 100644 --- a/CGMES_3.0.0/VolumeFlowRate.hpp +++ b/CGMES_3.0.0/VolumeFlowRate.hpp @@ -9,9 +9,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Volume per time. - */ + /** \brief Volume per time. */ class VolumeFlowRate { public: diff --git a/CGMES_3.0.0/VsCapabilityCurve.cpp b/CGMES_3.0.0/VsCapabilityCurve.cpp index b1e03e9fd..5a75f1880 100644 --- a/CGMES_3.0.0/VsCapabilityCurve.cpp +++ b/CGMES_3.0.0/VsCapabilityCurve.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -VsCapabilityCurve::VsCapabilityCurve() {}; -VsCapabilityCurve::~VsCapabilityCurve() {}; +VsCapabilityCurve::VsCapabilityCurve() {} +VsCapabilityCurve::~VsCapabilityCurve() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ VsCapabilityCurve::getPossibleProfilesForAttributes() const return map; } - - bool assign_VsConverter_CapabilityCurve(BaseClass*, BaseClass*); bool assign_VsCapabilityCurve_VsConverterDCSides(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_VsCapabilityCurve_VsConverterDCSides(BaseClass* BaseClass_ptr1, Base } - const char VsCapabilityCurve::debugName[] = "VsCapabilityCurve"; const char* VsCapabilityCurve::debugString() const { @@ -69,7 +66,7 @@ const char* VsCapabilityCurve::debugString() const void VsCapabilityCurve::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VsCapabilityCurve"), &VsCapabilityCurve_factory)); + factory_map.emplace("cim:VsCapabilityCurve", &VsCapabilityCurve_factory); } void VsCapabilityCurve::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void VsCapabilityCurve::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VsCapabilityCurve.VsConverterDCSides"), &assign_VsCapabilityCurve_VsConverterDCSides)); + assign_map.emplace("cim:VsCapabilityCurve.VsConverterDCSides", &assign_VsCapabilityCurve_VsConverterDCSides); } void VsCapabilityCurve::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/VsCapabilityCurve.hpp b/CGMES_3.0.0/VsCapabilityCurve.hpp index f908e7e64..24fb5a54b 100644 --- a/CGMES_3.0.0/VsCapabilityCurve.hpp +++ b/CGMES_3.0.0/VsCapabilityCurve.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class VsConverter; - /* - The P-Q capability curve for a voltage source converter, with P on X-axis and Qmin and Qmax on Y1-axis and Y2-axis. - */ + /** \brief The P-Q capability curve for a voltage source converter, with P on X-axis and Qmin and Qmax on Y1-axis and Y2-axis. */ class VsCapabilityCurve : public Curve { public: @@ -27,7 +25,8 @@ namespace CIMPP VsCapabilityCurve(); ~VsCapabilityCurve() override; - std::list VsConverterDCSides; /* All converters with this capability curve. Default: 0 */ + /** \brief All converters with this capability curve. Default: 0 */ + std::list VsConverterDCSides; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/VsConverter.cpp b/CGMES_3.0.0/VsConverter.cpp index ed0a0b0cf..f804ed0fe 100644 --- a/CGMES_3.0.0/VsConverter.cpp +++ b/CGMES_3.0.0/VsConverter.cpp @@ -8,26 +8,13 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "VsCapabilityCurve.hpp" #include "VSCDynamics.hpp" -#include "AngleDegrees.hpp" -#include "PU.hpp" -#include "Resistance.hpp" -#include "Float.hpp" -#include "VsPpccControlKind.hpp" -#include "VsQpccControlKind.hpp" -#include "PerCent.hpp" -#include "Float.hpp" -#include "AngleDegrees.hpp" -#include "Float.hpp" -#include "ReactivePower.hpp" -#include "Voltage.hpp" -#include "Voltage.hpp" +#include "VsCapabilityCurve.hpp" using namespace CIMPP; -VsConverter::VsConverter() : CapabilityCurve(nullptr), VSCDynamics(nullptr) {}; -VsConverter::~VsConverter() {}; +VsConverter::VsConverter() : CapabilityCurve(nullptr), VSCDynamics(nullptr) {} +VsConverter::~VsConverter() {} static const std::list PossibleProfilesForClass = { @@ -71,213 +58,241 @@ VsConverter::getPossibleProfilesForAttributes() const return map; } +bool assign_VsCapabilityCurve_VsConverterDCSides(BaseClass*, BaseClass*); +bool assign_VsConverter_CapabilityCurve(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + VsConverter* element = dynamic_cast(BaseClass_ptr1); + VsCapabilityCurve* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->CapabilityCurve != element2) + { + element->CapabilityCurve = element2; + return assign_VsCapabilityCurve_VsConverterDCSides(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_VsConverter_delta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VSCDynamics_VsConverter(BaseClass*, BaseClass*); +bool assign_VsConverter_VSCDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + VSCDynamics* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->VSCDynamics != element2) + { + element->VSCDynamics = element2; + return assign_VSCDynamics_VsConverter(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_VsConverter_delta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->delta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_droop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_droop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->droop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_droopCompensation(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_droopCompensation(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->droopCompensation; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_maxModulationIndex(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_maxModulationIndex(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->maxModulationIndex; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_pPccControl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_pPccControl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pPccControl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_qPccControl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_qPccControl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qPccControl; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_qShare(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_qShare(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->qShare; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_targetPWMfactor(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_targetPWMfactor(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->targetPWMfactor; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_targetPhasePcc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_targetPhasePcc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->targetPhasePcc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_targetPowerFactorPcc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_targetPowerFactorPcc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->targetPowerFactorPcc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_targetQpcc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_targetQpcc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->targetQpcc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_VsConverter_targetUpcc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_VsConverter_targetUpcc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) + VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->targetUpcc; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_VsConverter_uv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (VsConverter* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->uv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_VsCapabilityCurve_VsConverterDCSides(BaseClass*, BaseClass*); -bool assign_VsConverter_CapabilityCurve(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_VsConverter_uv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { VsConverter* element = dynamic_cast(BaseClass_ptr1); - VsCapabilityCurve* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->CapabilityCurve != element2) + buffer >> element->uv; + if (!buffer.fail()) { - element->CapabilityCurve = element2; - return assign_VsCapabilityCurve_VsConverterDCSides(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_VSCDynamics_VsConverter(BaseClass*, BaseClass*); -bool assign_VsConverter_VSCDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool get_VsConverter_CapabilityCurve(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - VsConverter* element = dynamic_cast(BaseClass_ptr1); - VSCDynamics* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - if (element->VSCDynamics != element2) + if (element->CapabilityCurve != 0) { - element->VSCDynamics = element2; - return assign_VSCDynamics_VsConverter(BaseClass_ptr2, BaseClass_ptr1); + BaseClass_list.push_back(element->CapabilityCurve); + return true; } - return true; } return false; } + bool get_VsConverter_delta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->delta; if (!buffer.str().empty()) @@ -291,7 +306,8 @@ bool get_VsConverter_delta(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_VsConverter_droop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->droop; if (!buffer.str().empty()) @@ -305,7 +321,8 @@ bool get_VsConverter_droop(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_VsConverter_droopCompensation(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->droopCompensation; if (!buffer.str().empty()) @@ -319,7 +336,8 @@ bool get_VsConverter_droopCompensation(const BaseClass* BaseClass_ptr1, std::str bool get_VsConverter_maxModulationIndex(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->maxModulationIndex; if (!buffer.str().empty()) @@ -331,11 +349,12 @@ bool get_VsConverter_maxModulationIndex(const BaseClass* BaseClass_ptr1, std::st return false; } -bool get_VsConverter_qShare(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_VsConverter_pPccControl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->qShare; + buffer << element->pPccControl; if (!buffer.str().empty()) { return true; @@ -345,11 +364,12 @@ bool get_VsConverter_qShare(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } -bool get_VsConverter_targetPWMfactor(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_VsConverter_qPccControl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->targetPWMfactor; + buffer << element->qPccControl; if (!buffer.str().empty()) { return true; @@ -359,11 +379,12 @@ bool get_VsConverter_targetPWMfactor(const BaseClass* BaseClass_ptr1, std::strin return false; } -bool get_VsConverter_targetPhasePcc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_VsConverter_qShare(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->targetPhasePcc; + buffer << element->qShare; if (!buffer.str().empty()) { return true; @@ -373,11 +394,12 @@ bool get_VsConverter_targetPhasePcc(const BaseClass* BaseClass_ptr1, std::string return false; } -bool get_VsConverter_targetPowerFactorPcc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_VsConverter_targetPWMfactor(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->targetPowerFactorPcc; + buffer << element->targetPWMfactor; if (!buffer.str().empty()) { return true; @@ -387,11 +409,12 @@ bool get_VsConverter_targetPowerFactorPcc(const BaseClass* BaseClass_ptr1, std:: return false; } -bool get_VsConverter_targetQpcc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_VsConverter_targetPhasePcc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->targetQpcc; + buffer << element->targetPhasePcc; if (!buffer.str().empty()) { return true; @@ -401,11 +424,12 @@ bool get_VsConverter_targetQpcc(const BaseClass* BaseClass_ptr1, std::stringstre return false; } -bool get_VsConverter_targetUpcc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_VsConverter_targetPowerFactorPcc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->targetUpcc; + buffer << element->targetPowerFactorPcc; if (!buffer.str().empty()) { return true; @@ -415,11 +439,12 @@ bool get_VsConverter_targetUpcc(const BaseClass* BaseClass_ptr1, std::stringstre return false; } -bool get_VsConverter_uv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_VsConverter_targetQpcc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->uv; + buffer << element->targetQpcc; if (!buffer.str().empty()) { return true; @@ -429,26 +454,12 @@ bool get_VsConverter_uv(const BaseClass* BaseClass_ptr1, std::stringstream& buff return false; } - -bool get_VsConverter_CapabilityCurve(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) -{ - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) - { - if (element->CapabilityCurve != 0) - { - BaseClass_list.push_back(element->CapabilityCurve); - return true; - } - } - return false; -} - - -bool get_VsConverter_pPccControl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_VsConverter_targetUpcc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->pPccControl; + buffer << element->targetUpcc; if (!buffer.str().empty()) { return true; @@ -458,11 +469,12 @@ bool get_VsConverter_pPccControl(const BaseClass* BaseClass_ptr1, std::stringstr return false; } -bool get_VsConverter_qPccControl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_VsConverter_uv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const VsConverter* element = dynamic_cast(BaseClass_ptr1)) + const VsConverter* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->qPccControl; + buffer << element->uv; if (!buffer.str().empty()) { return true; @@ -480,30 +492,30 @@ const char* VsConverter::debugString() const void VsConverter::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:VsConverter"), &VsConverter_factory)); + factory_map.emplace("cim:VsConverter", &VsConverter_factory); } void VsConverter::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VsConverter.delta"), &assign_VsConverter_delta)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.droop"), &assign_VsConverter_droop)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.droopCompensation"), &assign_VsConverter_droopCompensation)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.maxModulationIndex"), &assign_VsConverter_maxModulationIndex)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.pPccControl"), &assign_VsConverter_pPccControl)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.qPccControl"), &assign_VsConverter_qPccControl)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.qShare"), &assign_VsConverter_qShare)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.targetPWMfactor"), &assign_VsConverter_targetPWMfactor)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.targetPhasePcc"), &assign_VsConverter_targetPhasePcc)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.targetPowerFactorPcc"), &assign_VsConverter_targetPowerFactorPcc)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.targetQpcc"), &assign_VsConverter_targetQpcc)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.targetUpcc"), &assign_VsConverter_targetUpcc)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.uv"), &assign_VsConverter_uv)); + assign_map.emplace("cim:VsConverter.delta", &assign_VsConverter_delta); + assign_map.emplace("cim:VsConverter.droop", &assign_VsConverter_droop); + assign_map.emplace("cim:VsConverter.droopCompensation", &assign_VsConverter_droopCompensation); + assign_map.emplace("cim:VsConverter.maxModulationIndex", &assign_VsConverter_maxModulationIndex); + assign_map.emplace("cim:VsConverter.pPccControl", &assign_VsConverter_pPccControl); + assign_map.emplace("cim:VsConverter.qPccControl", &assign_VsConverter_qPccControl); + assign_map.emplace("cim:VsConverter.qShare", &assign_VsConverter_qShare); + assign_map.emplace("cim:VsConverter.targetPWMfactor", &assign_VsConverter_targetPWMfactor); + assign_map.emplace("cim:VsConverter.targetPhasePcc", &assign_VsConverter_targetPhasePcc); + assign_map.emplace("cim:VsConverter.targetPowerFactorPcc", &assign_VsConverter_targetPowerFactorPcc); + assign_map.emplace("cim:VsConverter.targetQpcc", &assign_VsConverter_targetQpcc); + assign_map.emplace("cim:VsConverter.targetUpcc", &assign_VsConverter_targetUpcc); + assign_map.emplace("cim:VsConverter.uv", &assign_VsConverter_uv); } void VsConverter::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:VsConverter.CapabilityCurve"), &assign_VsConverter_CapabilityCurve)); - assign_map.insert(std::make_pair(std::string("cim:VsConverter.VSCDynamics"), &assign_VsConverter_VSCDynamics)); + assign_map.emplace("cim:VsConverter.CapabilityCurve", &assign_VsConverter_CapabilityCurve); + assign_map.emplace("cim:VsConverter.VSCDynamics", &assign_VsConverter_VSCDynamics); } void VsConverter::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/VsConverter.hpp b/CGMES_3.0.0/VsConverter.hpp index 9269e4dcb..870938fc0 100644 --- a/CGMES_3.0.0/VsConverter.hpp +++ b/CGMES_3.0.0/VsConverter.hpp @@ -27,9 +27,7 @@ namespace CIMPP class VSCDynamics; class VsCapabilityCurve; - /* - DC side of the voltage source converter (VSC). - */ + /** \brief DC side of the voltage source converter (VSC). */ class VsConverter : public ACDCConverter { public: @@ -37,21 +35,50 @@ namespace CIMPP VsConverter(); ~VsConverter() override; - CIMPP::VsCapabilityCurve* CapabilityCurve; /* Capability curve of this converter. Default: 0 */ - CIMPP::VSCDynamics* VSCDynamics; /* Voltage source converter dynamics model used to describe dynamic behaviour of this converter. Default: 0 */ - CIMPP::AngleDegrees delta; /* Angle between VsConverter.uv and ACDCConverter.uc. It is converter`s state variable used in power flow. The attribute shall be a positive value or zero. Default: nullptr */ - CIMPP::PU droop; /* Droop constant. The pu value is obtained as D [kV/MW] x Sb / Ubdc. The attribute shall be a positive value. Default: nullptr */ - CIMPP::Resistance droopCompensation; /* Compensation constant. Used to compensate for voltage drop when controlling voltage at a distant bus. The attribute shall be a positive value. Default: nullptr */ - CIMPP::Float maxModulationIndex; /* The maximum quotient between the AC converter voltage (Uc) and DC voltage (Ud). A factor typically less than 1. It is converter`s configuration data used in power flow. Default: 0.0 */ - CIMPP::VsPpccControlKind pPccControl; /* Kind of control of real power and/or DC voltage. Default: 0 */ - CIMPP::VsQpccControlKind qPccControl; /* Kind of reactive power control. Default: 0 */ - CIMPP::PerCent qShare; /* Reactive power sharing factor among parallel converters on Uac control. The attribute shall be a positive value or zero. Default: nullptr */ - CIMPP::Float targetPWMfactor; /* Magnitude of pulse-modulation factor. The attribute shall be a positive value. Default: 0.0 */ - CIMPP::AngleDegrees targetPhasePcc; /* Phase target at AC side, at point of common coupling. The attribute shall be a positive value. Default: nullptr */ - CIMPP::Float targetPowerFactorPcc; /* Power factor target at the AC side, at point of common coupling. The attribute shall be a positive value. Default: 0.0 */ - CIMPP::ReactivePower targetQpcc; /* Reactive power injection target in AC grid, at point of common coupling. Load sign convention is used, i.e. positive sign means flow out from a node. Default: nullptr */ - CIMPP::Voltage targetUpcc; /* Voltage target in AC grid, at point of common coupling. The attribute shall be a positive value. Default: nullptr */ - CIMPP::Voltage uv; /* Line-to-line voltage on the valve side of the converter transformer. It is converter`s state variable, result from power flow. The attribute shall be a positive value. Default: nullptr */ + /** \brief Capability curve of this converter. Default: 0 */ + CIMPP::VsCapabilityCurve* CapabilityCurve; + + /** \brief Voltage source converter dynamics model used to describe dynamic behaviour of this converter. Default: 0 */ + CIMPP::VSCDynamics* VSCDynamics; + + /** \brief Angle between VsConverter.uv and ACDCConverter.uc. It is converter`s state variable used in power flow. The attribute shall be a positive value or zero. Default: nullptr */ + CIMPP::AngleDegrees delta; + + /** \brief Droop constant. The pu value is obtained as D [kV/MW] x Sb / Ubdc. The attribute shall be a positive value. Default: nullptr */ + CIMPP::PU droop; + + /** \brief Compensation constant. Used to compensate for voltage drop when controlling voltage at a distant bus. The attribute shall be a positive value. Default: nullptr */ + CIMPP::Resistance droopCompensation; + + /** \brief The maximum quotient between the AC converter voltage (Uc) and DC voltage (Ud). A factor typically less than 1. It is converter`s configuration data used in power flow. Default: 0.0 */ + CIMPP::Float maxModulationIndex; + + /** \brief Kind of control of real power and/or DC voltage. Default: 0 */ + CIMPP::VsPpccControlKind pPccControl; + + /** \brief Kind of reactive power control. Default: 0 */ + CIMPP::VsQpccControlKind qPccControl; + + /** \brief Reactive power sharing factor among parallel converters on Uac control. The attribute shall be a positive value or zero. Default: nullptr */ + CIMPP::PerCent qShare; + + /** \brief Magnitude of pulse-modulation factor. The attribute shall be a positive value. Default: 0.0 */ + CIMPP::Float targetPWMfactor; + + /** \brief Phase target at AC side, at point of common coupling. The attribute shall be a positive value. Default: nullptr */ + CIMPP::AngleDegrees targetPhasePcc; + + /** \brief Power factor target at the AC side, at point of common coupling. The attribute shall be a positive value. Default: 0.0 */ + CIMPP::Float targetPowerFactorPcc; + + /** \brief Reactive power injection target in AC grid, at point of common coupling. Load sign convention is used, i.e. positive sign means flow out from a node. Default: nullptr */ + CIMPP::ReactivePower targetQpcc; + + /** \brief Voltage target in AC grid, at point of common coupling. The attribute shall be a positive value. Default: nullptr */ + CIMPP::Voltage targetUpcc; + + /** \brief Line-to-line voltage on the valve side of the converter transformer. It is converter`s state variable, result from power flow. The attribute shall be a positive value. Default: nullptr */ + CIMPP::Voltage uv; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/VsPpccControlKind.cpp b/CGMES_3.0.0/VsPpccControlKind.cpp index 9201e6ef9..1190a9537 100644 --- a/CGMES_3.0.0/VsPpccControlKind.cpp +++ b/CGMES_3.0.0/VsPpccControlKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "VsPpccControlKind") + if (EnumSymbol.substr(0, pos) != "VsPpccControlKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,32 +50,32 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "pPcc") + if (EnumSymbol == "pPcc") { rop = VsPpccControlKind::pPcc; return lop; } - if(EnumSymbol == "udc") + if (EnumSymbol == "udc") { rop = VsPpccControlKind::udc; return lop; } - if(EnumSymbol == "pPccAndUdcDroop") + if (EnumSymbol == "pPccAndUdcDroop") { rop = VsPpccControlKind::pPccAndUdcDroop; return lop; } - if(EnumSymbol == "pPccAndUdcDroopWithCompensation") + if (EnumSymbol == "pPccAndUdcDroopWithCompensation") { rop = VsPpccControlKind::pPccAndUdcDroopWithCompensation; return lop; } - if(EnumSymbol == "pPccAndUdcDroopPilot") + if (EnumSymbol == "pPccAndUdcDroopPilot") { rop = VsPpccControlKind::pPccAndUdcDroopPilot; return lop; } - if(EnumSymbol == "phasePcc") + if (EnumSymbol == "phasePcc") { rop = VsPpccControlKind::phasePcc; return lop; diff --git a/CGMES_3.0.0/VsPpccControlKind.hpp b/CGMES_3.0.0/VsPpccControlKind.hpp index 68d6714ac..714bee4a2 100644 --- a/CGMES_3.0.0/VsPpccControlKind.hpp +++ b/CGMES_3.0.0/VsPpccControlKind.hpp @@ -9,37 +9,23 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Types applicable to the control of real power and/or DC voltage by voltage source converter. - */ + /** \brief Types applicable to the control of real power and/or DC voltage by voltage source converter. */ class VsPpccControlKind { public: enum VsPpccControlKind_ENUM { - /** - * Control is real power at point of common coupling. The target value is provided by ACDCConverter.targetPpcc. - */ + /** Control is real power at point of common coupling. The target value is provided by ACDCConverter.targetPpcc. */ pPcc, - /** - * Control is DC voltage with target value provided by ACDCConverter.targetUdc. - */ + /** Control is DC voltage with target value provided by ACDCConverter.targetUdc. */ udc, - /** - * Control is active power at point of common coupling and local DC voltage, with the droop. Target values are provided by ACDCConverter.targetPpcc, ACDCConverter.targetUdc and VsConverter.droop. - */ + /** Control is active power at point of common coupling and local DC voltage, with the droop. Target values are provided by ACDCConverter.targetPpcc, ACDCConverter.targetUdc and VsConverter.droop. */ pPccAndUdcDroop, - /** - * Control is active power at point of common coupling and compensated DC voltage, with the droop. Compensation factor is the resistance, as an approximation of the DC voltage of a common (real or virtual) node in the DC network. Targets are provided by ACDCConverter.targetPpcc, ACDCConverter.targetUdc, VsConverter.droop and VsConverter.droopCompensation. - */ + /** Control is active power at point of common coupling and compensated DC voltage, with the droop. Compensation factor is the resistance, as an approximation of the DC voltage of a common (real or virtual) node in the DC network. Targets are provided by ACDCConverter.targetPpcc, ACDCConverter.targetUdc, VsConverter.droop and VsConverter.droopCompensation. */ pPccAndUdcDroopWithCompensation, - /** - * Control is active power at point of common coupling and the pilot DC voltage, with the droop. The mode is used for Multi Terminal High Voltage DC (MTDC) systems where multiple HVDC Substations are connected to the HVDC transmission lines. The pilot voltage is then used to coordinate the control the DC voltage across the HVDC substations. Targets are provided by ACDCConverter.targetPpcc, ACDCConverter.targetUdc and VsConverter.droop. - */ + /** Control is active power at point of common coupling and the pilot DC voltage, with the droop. The mode is used for Multi Terminal High Voltage DC (MTDC) systems where multiple HVDC Substations are connected to the HVDC transmission lines. The pilot voltage is then used to coordinate the control the DC voltage across the HVDC substations. Targets are provided by ACDCConverter.targetPpcc, ACDCConverter.targetUdc and VsConverter.droop. */ pPccAndUdcDroopPilot, - /** - * Control is phase at point of common coupling. Target is provided by VsConverter.targetPhasePcc. - */ + /** Control is phase at point of common coupling. Target is provided by VsConverter.targetPhasePcc. */ phasePcc, }; diff --git a/CGMES_3.0.0/VsQpccControlKind.cpp b/CGMES_3.0.0/VsQpccControlKind.cpp index 8410d2bc8..f1c12ce40 100644 --- a/CGMES_3.0.0/VsQpccControlKind.cpp +++ b/CGMES_3.0.0/VsQpccControlKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "VsQpccControlKind") + if (EnumSymbol.substr(0, pos) != "VsQpccControlKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,22 +50,22 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "reactivePcc") + if (EnumSymbol == "reactivePcc") { rop = VsQpccControlKind::reactivePcc; return lop; } - if(EnumSymbol == "voltagePcc") + if (EnumSymbol == "voltagePcc") { rop = VsQpccControlKind::voltagePcc; return lop; } - if(EnumSymbol == "powerFactorPcc") + if (EnumSymbol == "powerFactorPcc") { rop = VsQpccControlKind::powerFactorPcc; return lop; } - if(EnumSymbol == "pulseWidthModulation") + if (EnumSymbol == "pulseWidthModulation") { rop = VsQpccControlKind::pulseWidthModulation; return lop; diff --git a/CGMES_3.0.0/VsQpccControlKind.hpp b/CGMES_3.0.0/VsQpccControlKind.hpp index 01d27303d..3e1623e6e 100644 --- a/CGMES_3.0.0/VsQpccControlKind.hpp +++ b/CGMES_3.0.0/VsQpccControlKind.hpp @@ -9,29 +9,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Kind of reactive power control at point of common coupling for a voltage source converter. - */ + /** \brief Kind of reactive power control at point of common coupling for a voltage source converter. */ class VsQpccControlKind { public: enum VsQpccControlKind_ENUM { - /** - * Control is reactive power at point of common coupling. Target is provided by VsConverter.targetQpcc. - */ + /** Control is reactive power at point of common coupling. Target is provided by VsConverter.targetQpcc. */ reactivePcc, - /** - * Control is voltage at point of common coupling. Target is provided by VsConverter.targetUpcc. - */ + /** Control is voltage at point of common coupling. Target is provided by VsConverter.targetUpcc. */ voltagePcc, - /** - * Control is power factor at point of common coupling. Target is provided by VsConverter.targetPowerFactorPcc. - */ + /** Control is power factor at point of common coupling. Target is provided by VsConverter.targetPowerFactorPcc. */ powerFactorPcc, - /** - * No explicit control. Pulse-modulation factor is directly set in magnitude (VsConverter.targetPWMfactor) and phase (VsConverter.targetPhasePcc). - */ + /** No explicit control. Pulse-modulation factor is directly set in magnitude (VsConverter.targetPWMfactor) and phase (VsConverter.targetPhasePcc). */ pulseWidthModulation, }; diff --git a/CGMES_3.0.0/WaveTrap.cpp b/CGMES_3.0.0/WaveTrap.cpp index 1c0a1609e..8e7d85423 100644 --- a/CGMES_3.0.0/WaveTrap.cpp +++ b/CGMES_3.0.0/WaveTrap.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WaveTrap::WaveTrap() {}; -WaveTrap::~WaveTrap() {}; +WaveTrap::WaveTrap() {} +WaveTrap::~WaveTrap() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ WaveTrap::getPossibleProfilesForAttributes() const return map; } - - - - - const char WaveTrap::debugName[] = "WaveTrap"; const char* WaveTrap::debugString() const { @@ -51,7 +46,7 @@ const char* WaveTrap::debugString() const void WaveTrap::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WaveTrap"), &WaveTrap_factory)); + factory_map.emplace("cim:WaveTrap", &WaveTrap_factory); } void WaveTrap::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/WaveTrap.hpp b/CGMES_3.0.0/WaveTrap.hpp index a3c649da7..80ce0a065 100644 --- a/CGMES_3.0.0/WaveTrap.hpp +++ b/CGMES_3.0.0/WaveTrap.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Line traps are devices that impede high frequency power line carrier signals yet present a negligible impedance at the main power frequency. - */ + /** \brief Line traps are devices that impede high frequency power line carrier signals yet present a negligible impedance at the main power frequency. */ class WaveTrap : public AuxiliaryEquipment { public: @@ -26,7 +24,6 @@ namespace CIMPP WaveTrap(); ~WaveTrap() override; - static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindAeroConstIEC.cpp b/CGMES_3.0.0/WindAeroConstIEC.cpp index a66aa76e0..a0c75d9ea 100644 --- a/CGMES_3.0.0/WindAeroConstIEC.cpp +++ b/CGMES_3.0.0/WindAeroConstIEC.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindAeroConstIEC::WindAeroConstIEC() : WindGenTurbineType1aIEC(nullptr) {}; -WindAeroConstIEC::~WindAeroConstIEC() {}; +WindAeroConstIEC::WindAeroConstIEC() : WindGenTurbineType1aIEC(nullptr) {} +WindAeroConstIEC::~WindAeroConstIEC() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ WindAeroConstIEC::getPossibleProfilesForAttributes() const return map; } - - bool assign_WindGenTurbineType1aIEC_WindAeroConstIEC(BaseClass*, BaseClass*); bool assign_WindAeroConstIEC_WindGenTurbineType1aIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_WindAeroConstIEC_WindGenTurbineType1aIEC(BaseClass* BaseClass_ptr1, } - const char WindAeroConstIEC::debugName[] = "WindAeroConstIEC"; const char* WindAeroConstIEC::debugString() const { @@ -69,7 +66,7 @@ const char* WindAeroConstIEC::debugString() const void WindAeroConstIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindAeroConstIEC"), &WindAeroConstIEC_factory)); + factory_map.emplace("cim:WindAeroConstIEC", &WindAeroConstIEC_factory); } void WindAeroConstIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void WindAeroConstIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindAeroConstIEC.WindGenTurbineType1aIEC"), &assign_WindAeroConstIEC_WindGenTurbineType1aIEC)); + assign_map.emplace("cim:WindAeroConstIEC.WindGenTurbineType1aIEC", &assign_WindAeroConstIEC_WindGenTurbineType1aIEC); } void WindAeroConstIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindAeroConstIEC.hpp b/CGMES_3.0.0/WindAeroConstIEC.hpp index ef3dd08d4..116ed897c 100644 --- a/CGMES_3.0.0/WindAeroConstIEC.hpp +++ b/CGMES_3.0.0/WindAeroConstIEC.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class WindGenTurbineType1aIEC; - /* - Constant aerodynamic torque model which assumes that the aerodynamic torque is constant. Reference: IEC 61400-27-1:2015, 5.6.1.1. - */ + /** \brief Constant aerodynamic torque model which assumes that the aerodynamic torque is constant. Reference: IEC 61400-27-1:2015, 5.6.1.1. */ class WindAeroConstIEC : public IdentifiedObject { public: @@ -27,7 +25,8 @@ namespace CIMPP WindAeroConstIEC(); ~WindAeroConstIEC() override; - CIMPP::WindGenTurbineType1aIEC* WindGenTurbineType1aIEC; /* Wind turbine type 1A model with which this wind aerodynamic model is associated. Default: 0 */ + /** \brief Wind turbine type 1A model with which this wind aerodynamic model is associated. Default: 0 */ + CIMPP::WindGenTurbineType1aIEC* WindGenTurbineType1aIEC; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindAeroOneDimIEC.cpp b/CGMES_3.0.0/WindAeroOneDimIEC.cpp index 6794a63e0..3680cad3b 100644 --- a/CGMES_3.0.0/WindAeroOneDimIEC.cpp +++ b/CGMES_3.0.0/WindAeroOneDimIEC.cpp @@ -9,13 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "WindTurbineType3IEC.hpp" -#include "Float.hpp" -#include "AngleDegrees.hpp" using namespace CIMPP; -WindAeroOneDimIEC::WindAeroOneDimIEC() : WindTurbineType3IEC(nullptr) {}; -WindAeroOneDimIEC::~WindAeroOneDimIEC() {}; +WindAeroOneDimIEC::WindAeroOneDimIEC() : WindTurbineType3IEC(nullptr) {} +WindAeroOneDimIEC::~WindAeroOneDimIEC() {} static const std::list PossibleProfilesForClass = { @@ -44,54 +42,56 @@ WindAeroOneDimIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindAeroOneDimIEC_ka(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType3IEC_WindAeroOneDimIEC(BaseClass*, BaseClass*); +bool assign_WindAeroOneDimIEC_WindTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindAeroOneDimIEC* element = dynamic_cast(BaseClass_ptr1)) + WindAeroOneDimIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType3IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->ka; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType3IEC != element2) + { + element->WindTurbineType3IEC = element2; + return assign_WindTurbineType3IEC_WindAeroOneDimIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindAeroOneDimIEC_thetaomega(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindAeroOneDimIEC_ka(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindAeroOneDimIEC* element = dynamic_cast(BaseClass_ptr1)) + WindAeroOneDimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->thetaomega; - if (buffer.fail()) - return false; - else + buffer >> element->ka; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindTurbineType3IEC_WindAeroOneDimIEC(BaseClass*, BaseClass*); -bool assign_WindAeroOneDimIEC_WindTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindAeroOneDimIEC_thetaomega(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindAeroOneDimIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType3IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType3IEC != element2) + buffer >> element->thetaomega; + if (!buffer.fail()) { - element->WindTurbineType3IEC = element2; - return assign_WindTurbineType3IEC_WindAeroOneDimIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_WindAeroOneDimIEC_ka(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindAeroOneDimIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindAeroOneDimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ka; if (!buffer.str().empty()) @@ -105,7 +105,8 @@ bool get_WindAeroOneDimIEC_ka(const BaseClass* BaseClass_ptr1, std::stringstream bool get_WindAeroOneDimIEC_thetaomega(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindAeroOneDimIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindAeroOneDimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thetaomega; if (!buffer.str().empty()) @@ -117,8 +118,6 @@ bool get_WindAeroOneDimIEC_thetaomega(const BaseClass* BaseClass_ptr1, std::stri return false; } - - const char WindAeroOneDimIEC::debugName[] = "WindAeroOneDimIEC"; const char* WindAeroOneDimIEC::debugString() const { @@ -127,18 +126,18 @@ const char* WindAeroOneDimIEC::debugString() const void WindAeroOneDimIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindAeroOneDimIEC"), &WindAeroOneDimIEC_factory)); + factory_map.emplace("cim:WindAeroOneDimIEC", &WindAeroOneDimIEC_factory); } void WindAeroOneDimIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindAeroOneDimIEC.ka"), &assign_WindAeroOneDimIEC_ka)); - assign_map.insert(std::make_pair(std::string("cim:WindAeroOneDimIEC.thetaomega"), &assign_WindAeroOneDimIEC_thetaomega)); + assign_map.emplace("cim:WindAeroOneDimIEC.ka", &assign_WindAeroOneDimIEC_ka); + assign_map.emplace("cim:WindAeroOneDimIEC.thetaomega", &assign_WindAeroOneDimIEC_thetaomega); } void WindAeroOneDimIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindAeroOneDimIEC.WindTurbineType3IEC"), &assign_WindAeroOneDimIEC_WindTurbineType3IEC)); + assign_map.emplace("cim:WindAeroOneDimIEC.WindTurbineType3IEC", &assign_WindAeroOneDimIEC_WindTurbineType3IEC); } void WindAeroOneDimIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindAeroOneDimIEC.hpp b/CGMES_3.0.0/WindAeroOneDimIEC.hpp index c5a124a59..6fe2c6b33 100644 --- a/CGMES_3.0.0/WindAeroOneDimIEC.hpp +++ b/CGMES_3.0.0/WindAeroOneDimIEC.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class WindTurbineType3IEC; - /* - One-dimensional aerodynamic model. Reference: IEC 61400-27-1:2015, 5.6.1.2. - */ + /** \brief One-dimensional aerodynamic model. Reference: IEC 61400-27-1:2015, 5.6.1.2. */ class WindAeroOneDimIEC : public IdentifiedObject { public: @@ -29,9 +27,14 @@ namespace CIMPP WindAeroOneDimIEC(); ~WindAeroOneDimIEC() override; - CIMPP::WindTurbineType3IEC* WindTurbineType3IEC; /* Wind turbine type 3 model with which this wind aerodynamic model is associated. Default: 0 */ - CIMPP::Float ka; /* Aerodynamic gain (<i>k</i><i><sub>a</sub></i>). It is a type-dependent parameter. Default: 0.0 */ - CIMPP::AngleDegrees thetaomega; /* Initial pitch angle (<i>theta</i><i><sub>omega0</sub></i>). It is a case-dependent parameter. Default: nullptr */ + /** \brief Wind turbine type 3 model with which this wind aerodynamic model is associated. Default: 0 */ + CIMPP::WindTurbineType3IEC* WindTurbineType3IEC; + + /** \brief Aerodynamic gain (<i>k</i><i><sub>a</sub></i>). It is a type-dependent parameter. Default: 0.0 */ + CIMPP::Float ka; + + /** \brief Initial pitch angle (<i>theta</i><i><sub>omega0</sub></i>). It is a case-dependent parameter. Default: nullptr */ + CIMPP::AngleDegrees thetaomega; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindAeroTwoDimIEC.cpp b/CGMES_3.0.0/WindAeroTwoDimIEC.cpp index 77e94ca13..1a5a6e6f5 100644 --- a/CGMES_3.0.0/WindAeroTwoDimIEC.cpp +++ b/CGMES_3.0.0/WindAeroTwoDimIEC.cpp @@ -9,18 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "WindTurbineType3IEC.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "AngleDegrees.hpp" -#include "AngleDegrees.hpp" using namespace CIMPP; -WindAeroTwoDimIEC::WindAeroTwoDimIEC() : WindTurbineType3IEC(nullptr) {}; -WindAeroTwoDimIEC::~WindAeroTwoDimIEC() {}; +WindAeroTwoDimIEC::WindAeroTwoDimIEC() : WindTurbineType3IEC(nullptr) {} +WindAeroTwoDimIEC::~WindAeroTwoDimIEC() {} static const std::list PossibleProfilesForClass = { @@ -54,119 +47,126 @@ WindAeroTwoDimIEC::getPossibleProfilesForAttributes() const return map; } +bool assign_WindTurbineType3IEC_WindAeroTwoDimIEC(BaseClass*, BaseClass*); +bool assign_WindAeroTwoDimIEC_WindTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindAeroTwoDimIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType3IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindTurbineType3IEC != element2) + { + element->WindTurbineType3IEC = element2; + return assign_WindTurbineType3IEC_WindAeroTwoDimIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_WindAeroTwoDimIEC_dpomega(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindAeroTwoDimIEC_dpomega(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindAeroTwoDimIEC* element = dynamic_cast(BaseClass_ptr1)) + WindAeroTwoDimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dpomega; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindAeroTwoDimIEC_dptheta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindAeroTwoDimIEC_dptheta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindAeroTwoDimIEC* element = dynamic_cast(BaseClass_ptr1)) + WindAeroTwoDimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dptheta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindAeroTwoDimIEC_dpv1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindAeroTwoDimIEC_dpv1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindAeroTwoDimIEC* element = dynamic_cast(BaseClass_ptr1)) + WindAeroTwoDimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dpv1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindAeroTwoDimIEC_omegazero(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindAeroTwoDimIEC_omegazero(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindAeroTwoDimIEC* element = dynamic_cast(BaseClass_ptr1)) + WindAeroTwoDimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->omegazero; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindAeroTwoDimIEC_pavail(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindAeroTwoDimIEC_pavail(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindAeroTwoDimIEC* element = dynamic_cast(BaseClass_ptr1)) + WindAeroTwoDimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pavail; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindAeroTwoDimIEC_thetav2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindAeroTwoDimIEC_thetav2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindAeroTwoDimIEC* element = dynamic_cast(BaseClass_ptr1)) + WindAeroTwoDimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->thetav2; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_WindAeroTwoDimIEC_thetazero(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindAeroTwoDimIEC* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->thetazero; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindTurbineType3IEC_WindAeroTwoDimIEC(BaseClass*, BaseClass*); -bool assign_WindAeroTwoDimIEC_WindTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindAeroTwoDimIEC_thetazero(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindAeroTwoDimIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType3IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType3IEC != element2) + buffer >> element->thetazero; + if (!buffer.fail()) { - element->WindTurbineType3IEC = element2; - return assign_WindTurbineType3IEC_WindAeroTwoDimIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_WindAeroTwoDimIEC_dpomega(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindAeroTwoDimIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindAeroTwoDimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dpomega; if (!buffer.str().empty()) @@ -180,7 +180,8 @@ bool get_WindAeroTwoDimIEC_dpomega(const BaseClass* BaseClass_ptr1, std::strings bool get_WindAeroTwoDimIEC_dptheta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindAeroTwoDimIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindAeroTwoDimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dptheta; if (!buffer.str().empty()) @@ -194,7 +195,8 @@ bool get_WindAeroTwoDimIEC_dptheta(const BaseClass* BaseClass_ptr1, std::strings bool get_WindAeroTwoDimIEC_dpv1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindAeroTwoDimIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindAeroTwoDimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dpv1; if (!buffer.str().empty()) @@ -208,7 +210,8 @@ bool get_WindAeroTwoDimIEC_dpv1(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindAeroTwoDimIEC_omegazero(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindAeroTwoDimIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindAeroTwoDimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->omegazero; if (!buffer.str().empty()) @@ -222,7 +225,8 @@ bool get_WindAeroTwoDimIEC_omegazero(const BaseClass* BaseClass_ptr1, std::strin bool get_WindAeroTwoDimIEC_pavail(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindAeroTwoDimIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindAeroTwoDimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pavail; if (!buffer.str().empty()) @@ -236,7 +240,8 @@ bool get_WindAeroTwoDimIEC_pavail(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindAeroTwoDimIEC_thetav2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindAeroTwoDimIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindAeroTwoDimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thetav2; if (!buffer.str().empty()) @@ -250,7 +255,8 @@ bool get_WindAeroTwoDimIEC_thetav2(const BaseClass* BaseClass_ptr1, std::strings bool get_WindAeroTwoDimIEC_thetazero(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindAeroTwoDimIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindAeroTwoDimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thetazero; if (!buffer.str().empty()) @@ -262,8 +268,6 @@ bool get_WindAeroTwoDimIEC_thetazero(const BaseClass* BaseClass_ptr1, std::strin return false; } - - const char WindAeroTwoDimIEC::debugName[] = "WindAeroTwoDimIEC"; const char* WindAeroTwoDimIEC::debugString() const { @@ -272,23 +276,23 @@ const char* WindAeroTwoDimIEC::debugString() const void WindAeroTwoDimIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindAeroTwoDimIEC"), &WindAeroTwoDimIEC_factory)); + factory_map.emplace("cim:WindAeroTwoDimIEC", &WindAeroTwoDimIEC_factory); } void WindAeroTwoDimIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindAeroTwoDimIEC.dpomega"), &assign_WindAeroTwoDimIEC_dpomega)); - assign_map.insert(std::make_pair(std::string("cim:WindAeroTwoDimIEC.dptheta"), &assign_WindAeroTwoDimIEC_dptheta)); - assign_map.insert(std::make_pair(std::string("cim:WindAeroTwoDimIEC.dpv1"), &assign_WindAeroTwoDimIEC_dpv1)); - assign_map.insert(std::make_pair(std::string("cim:WindAeroTwoDimIEC.omegazero"), &assign_WindAeroTwoDimIEC_omegazero)); - assign_map.insert(std::make_pair(std::string("cim:WindAeroTwoDimIEC.pavail"), &assign_WindAeroTwoDimIEC_pavail)); - assign_map.insert(std::make_pair(std::string("cim:WindAeroTwoDimIEC.thetav2"), &assign_WindAeroTwoDimIEC_thetav2)); - assign_map.insert(std::make_pair(std::string("cim:WindAeroTwoDimIEC.thetazero"), &assign_WindAeroTwoDimIEC_thetazero)); + assign_map.emplace("cim:WindAeroTwoDimIEC.dpomega", &assign_WindAeroTwoDimIEC_dpomega); + assign_map.emplace("cim:WindAeroTwoDimIEC.dptheta", &assign_WindAeroTwoDimIEC_dptheta); + assign_map.emplace("cim:WindAeroTwoDimIEC.dpv1", &assign_WindAeroTwoDimIEC_dpv1); + assign_map.emplace("cim:WindAeroTwoDimIEC.omegazero", &assign_WindAeroTwoDimIEC_omegazero); + assign_map.emplace("cim:WindAeroTwoDimIEC.pavail", &assign_WindAeroTwoDimIEC_pavail); + assign_map.emplace("cim:WindAeroTwoDimIEC.thetav2", &assign_WindAeroTwoDimIEC_thetav2); + assign_map.emplace("cim:WindAeroTwoDimIEC.thetazero", &assign_WindAeroTwoDimIEC_thetazero); } void WindAeroTwoDimIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindAeroTwoDimIEC.WindTurbineType3IEC"), &assign_WindAeroTwoDimIEC_WindTurbineType3IEC)); + assign_map.emplace("cim:WindAeroTwoDimIEC.WindTurbineType3IEC", &assign_WindAeroTwoDimIEC_WindTurbineType3IEC); } void WindAeroTwoDimIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindAeroTwoDimIEC.hpp b/CGMES_3.0.0/WindAeroTwoDimIEC.hpp index e44c42758..b23ed12d9 100644 --- a/CGMES_3.0.0/WindAeroTwoDimIEC.hpp +++ b/CGMES_3.0.0/WindAeroTwoDimIEC.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class WindTurbineType3IEC; - /* - Two-dimensional aerodynamic model. Reference: IEC 61400-27-1:2015, 5.6.1.3. - */ + /** \brief Two-dimensional aerodynamic model. Reference: IEC 61400-27-1:2015, 5.6.1.3. */ class WindAeroTwoDimIEC : public IdentifiedObject { public: @@ -29,14 +27,29 @@ namespace CIMPP WindAeroTwoDimIEC(); ~WindAeroTwoDimIEC() override; - CIMPP::WindTurbineType3IEC* WindTurbineType3IEC; /* Wind turbine type 3 model with which this wind aerodynamic model is associated. Default: 0 */ - CIMPP::PU dpomega; /* Partial derivative of aerodynamic power with respect to changes in WTR speed (<i>dp</i><i><sub>omega</sub></i>). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU dptheta; /* Partial derivative of aerodynamic power with respect to changes in pitch angle (<i>dp</i><i><sub>theta</sub></i>). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU dpv1; /* Partial derivative (<i>dp</i><i><sub>v1</sub></i>). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU omegazero; /* Rotor speed if the wind turbine is not derated (<i>omega</i><i><sub>0</sub></i>). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU pavail; /* Available aerodynamic power (<i>p</i><i><sub>avail</sub></i><i>)</i>. It is a case-dependent parameter. Default: nullptr */ - CIMPP::AngleDegrees thetav2; /* Blade angle at twice rated wind speed (<i>theta</i><i><sub>v2</sub></i>). It is a type-dependent parameter. Default: nullptr */ - CIMPP::AngleDegrees thetazero; /* Pitch angle if the wind turbine is not derated (<i>theta</i><i><sub>0</sub></i>). It is a case-dependent parameter. Default: nullptr */ + /** \brief Wind turbine type 3 model with which this wind aerodynamic model is associated. Default: 0 */ + CIMPP::WindTurbineType3IEC* WindTurbineType3IEC; + + /** \brief Partial derivative of aerodynamic power with respect to changes in WTR speed (<i>dp</i><i><sub>omega</sub></i>). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU dpomega; + + /** \brief Partial derivative of aerodynamic power with respect to changes in pitch angle (<i>dp</i><i><sub>theta</sub></i>). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU dptheta; + + /** \brief Partial derivative (<i>dp</i><i><sub>v1</sub></i>). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU dpv1; + + /** \brief Rotor speed if the wind turbine is not derated (<i>omega</i><i><sub>0</sub></i>). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU omegazero; + + /** \brief Available aerodynamic power (<i>p</i><i><sub>avail</sub></i><i>)</i>. It is a case-dependent parameter. Default: nullptr */ + CIMPP::PU pavail; + + /** \brief Blade angle at twice rated wind speed (<i>theta</i><i><sub>v2</sub></i>). It is a type-dependent parameter. Default: nullptr */ + CIMPP::AngleDegrees thetav2; + + /** \brief Pitch angle if the wind turbine is not derated (<i>theta</i><i><sub>0</sub></i>). It is a case-dependent parameter. Default: nullptr */ + CIMPP::AngleDegrees thetazero; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindContCurrLimIEC.cpp b/CGMES_3.0.0/WindContCurrLimIEC.cpp index 2ceb02c91..87aaa938b 100644 --- a/CGMES_3.0.0/WindContCurrLimIEC.cpp +++ b/CGMES_3.0.0/WindContCurrLimIEC.cpp @@ -10,18 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindDynamicsLookupTable.hpp" #include "WindTurbineType3or4IEC.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "PU.hpp" using namespace CIMPP; -WindContCurrLimIEC::WindContCurrLimIEC() : WindTurbineType3or4IEC(nullptr) {}; -WindContCurrLimIEC::~WindContCurrLimIEC() {}; +WindContCurrLimIEC::WindContCurrLimIEC() : WindTurbineType3or4IEC(nullptr) {} +WindContCurrLimIEC::~WindContCurrLimIEC() {} static const std::list PossibleProfilesForClass = { @@ -56,135 +49,144 @@ WindContCurrLimIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindContCurrLimIEC_imax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindDynamicsLookupTable_WindContCurrLimIEC(BaseClass*, BaseClass*); +bool assign_WindContCurrLimIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->imax; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) + { + element->WindDynamicsLookupTable.push_back(element2); + return assign_WindDynamicsLookupTable_WindContCurrLimIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindContCurrLimIEC_imaxdip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType3or4IEC_WindContCurrLimIEC(BaseClass*, BaseClass*); +bool assign_WindContCurrLimIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType3or4IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->imaxdip; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType3or4IEC != element2) + { + element->WindTurbineType3or4IEC = element2; + return assign_WindTurbineType3or4IEC_WindContCurrLimIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindContCurrLimIEC_kpqu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContCurrLimIEC_imax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->kpqu; - if (buffer.fail()) - return false; - else + buffer >> element->imax; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContCurrLimIEC_mdfslim(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContCurrLimIEC_imaxdip(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->mdfslim; - if (buffer.fail()) - return false; - else + buffer >> element->imaxdip; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContCurrLimIEC_mqpri(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContCurrLimIEC_kpqu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->mqpri; - if (buffer.fail()) - return false; - else + buffer >> element->kpqu; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContCurrLimIEC_tufiltcl(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContCurrLimIEC_mdfslim(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tufiltcl; - if (buffer.fail()) - return false; - else + buffer >> element->mdfslim; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContCurrLimIEC_upqumax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContCurrLimIEC_mqpri(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->upqumax; - if (buffer.fail()) - return false; - else + buffer >> element->mqpri; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindDynamicsLookupTable_WindContCurrLimIEC(BaseClass*, BaseClass*); -bool assign_WindContCurrLimIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindContCurrLimIEC_tufiltcl(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); - WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) + buffer >> element->tufiltcl; + if (!buffer.fail()) { - element->WindDynamicsLookupTable.push_back(element2); - return assign_WindDynamicsLookupTable_WindContCurrLimIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_WindTurbineType3or4IEC_WindContCurrLimIEC(BaseClass*, BaseClass*); -bool assign_WindContCurrLimIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_WindContCurrLimIEC_upqumax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType3or4IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType3or4IEC != element2) + buffer >> element->upqumax; + if (!buffer.fail()) { - element->WindTurbineType3or4IEC = element2; - return assign_WindTurbineType3or4IEC_WindContCurrLimIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + + bool get_WindContCurrLimIEC_imax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->imax; if (!buffer.str().empty()) @@ -198,7 +200,8 @@ bool get_WindContCurrLimIEC_imax(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindContCurrLimIEC_imaxdip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->imaxdip; if (!buffer.str().empty()) @@ -212,7 +215,8 @@ bool get_WindContCurrLimIEC_imaxdip(const BaseClass* BaseClass_ptr1, std::string bool get_WindContCurrLimIEC_kpqu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpqu; if (!buffer.str().empty()) @@ -226,7 +230,8 @@ bool get_WindContCurrLimIEC_kpqu(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindContCurrLimIEC_mdfslim(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mdfslim; if (!buffer.str().empty()) @@ -240,7 +245,8 @@ bool get_WindContCurrLimIEC_mdfslim(const BaseClass* BaseClass_ptr1, std::string bool get_WindContCurrLimIEC_mqpri(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mqpri; if (!buffer.str().empty()) @@ -254,7 +260,8 @@ bool get_WindContCurrLimIEC_mqpri(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindContCurrLimIEC_tufiltcl(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tufiltcl; if (!buffer.str().empty()) @@ -268,7 +275,8 @@ bool get_WindContCurrLimIEC_tufiltcl(const BaseClass* BaseClass_ptr1, std::strin bool get_WindContCurrLimIEC_upqumax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContCurrLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->upqumax; if (!buffer.str().empty()) @@ -280,8 +288,6 @@ bool get_WindContCurrLimIEC_upqumax(const BaseClass* BaseClass_ptr1, std::string return false; } - - const char WindContCurrLimIEC::debugName[] = "WindContCurrLimIEC"; const char* WindContCurrLimIEC::debugString() const { @@ -290,24 +296,24 @@ const char* WindContCurrLimIEC::debugString() const void WindContCurrLimIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindContCurrLimIEC"), &WindContCurrLimIEC_factory)); + factory_map.emplace("cim:WindContCurrLimIEC", &WindContCurrLimIEC_factory); } void WindContCurrLimIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContCurrLimIEC.imax"), &assign_WindContCurrLimIEC_imax)); - assign_map.insert(std::make_pair(std::string("cim:WindContCurrLimIEC.imaxdip"), &assign_WindContCurrLimIEC_imaxdip)); - assign_map.insert(std::make_pair(std::string("cim:WindContCurrLimIEC.kpqu"), &assign_WindContCurrLimIEC_kpqu)); - assign_map.insert(std::make_pair(std::string("cim:WindContCurrLimIEC.mdfslim"), &assign_WindContCurrLimIEC_mdfslim)); - assign_map.insert(std::make_pair(std::string("cim:WindContCurrLimIEC.mqpri"), &assign_WindContCurrLimIEC_mqpri)); - assign_map.insert(std::make_pair(std::string("cim:WindContCurrLimIEC.tufiltcl"), &assign_WindContCurrLimIEC_tufiltcl)); - assign_map.insert(std::make_pair(std::string("cim:WindContCurrLimIEC.upqumax"), &assign_WindContCurrLimIEC_upqumax)); + assign_map.emplace("cim:WindContCurrLimIEC.imax", &assign_WindContCurrLimIEC_imax); + assign_map.emplace("cim:WindContCurrLimIEC.imaxdip", &assign_WindContCurrLimIEC_imaxdip); + assign_map.emplace("cim:WindContCurrLimIEC.kpqu", &assign_WindContCurrLimIEC_kpqu); + assign_map.emplace("cim:WindContCurrLimIEC.mdfslim", &assign_WindContCurrLimIEC_mdfslim); + assign_map.emplace("cim:WindContCurrLimIEC.mqpri", &assign_WindContCurrLimIEC_mqpri); + assign_map.emplace("cim:WindContCurrLimIEC.tufiltcl", &assign_WindContCurrLimIEC_tufiltcl); + assign_map.emplace("cim:WindContCurrLimIEC.upqumax", &assign_WindContCurrLimIEC_upqumax); } void WindContCurrLimIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContCurrLimIEC.WindDynamicsLookupTable"), &assign_WindContCurrLimIEC_WindDynamicsLookupTable)); - assign_map.insert(std::make_pair(std::string("cim:WindContCurrLimIEC.WindTurbineType3or4IEC"), &assign_WindContCurrLimIEC_WindTurbineType3or4IEC)); + assign_map.emplace("cim:WindContCurrLimIEC.WindDynamicsLookupTable", &assign_WindContCurrLimIEC_WindDynamicsLookupTable); + assign_map.emplace("cim:WindContCurrLimIEC.WindTurbineType3or4IEC", &assign_WindContCurrLimIEC_WindTurbineType3or4IEC); } void WindContCurrLimIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindContCurrLimIEC.hpp b/CGMES_3.0.0/WindContCurrLimIEC.hpp index 967af5b9d..7bb178368 100644 --- a/CGMES_3.0.0/WindContCurrLimIEC.hpp +++ b/CGMES_3.0.0/WindContCurrLimIEC.hpp @@ -21,9 +21,7 @@ namespace CIMPP class WindDynamicsLookupTable; class WindTurbineType3or4IEC; - /* - Current limitation model. The current limitation model combines the physical limits and the control limits. Reference: IEC 61400-27-1:2015, 5.6.5.8. - */ + /** \brief Current limitation model. The current limitation model combines the physical limits and the control limits. Reference: IEC 61400-27-1:2015, 5.6.5.8. */ class WindContCurrLimIEC : public IdentifiedObject { public: @@ -31,15 +29,32 @@ namespace CIMPP WindContCurrLimIEC(); ~WindContCurrLimIEC() override; - std::list WindDynamicsLookupTable; /* The wind dynamics lookup table associated with this current control limitation model. Default: 0 */ - CIMPP::WindTurbineType3or4IEC* WindTurbineType3or4IEC; /* Wind turbine type 3 or type 4 model with which this wind control current limitation model is associated. Default: 0 */ - CIMPP::PU imax; /* Maximum continuous current at the wind turbine terminals (<i>i</i><i><sub>max</sub></i>). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU imaxdip; /* Maximum current during voltage dip at the wind turbine terminals (<i>i</i><i><sub>maxdip</sub></i>). It is a project-dependent parameter. Default: nullptr */ - CIMPP::PU kpqu; /* Partial derivative of reactive current limit (<i>K</i><i><sub>pqu</sub></i>) versus voltage. It is a type-dependent parameter. Default: nullptr */ - CIMPP::Boolean mdfslim; /* Limitation of type 3 stator current (<i>M</i><i><sub>DFSLim</sub></i>). <i>M</i><i><sub>DFSLim</sub></i><sub> </sub>= 1 for wind turbines type 4. It is a type-dependent parameter. false= total current limitation (0 in the IEC model) true=stator current limitation (1 in the IEC model). Default: false */ - CIMPP::Boolean mqpri; /* Prioritisation of Q control during UVRT (<i>M</i><i><sub>qpri</sub></i>). It is a project-dependent parameter. true = reactive power priority (1 in the IEC model) false = active power priority (0 in the IEC model). Default: false */ - CIMPP::Seconds tufiltcl; /* Voltage measurement filter time constant (<i>T</i><i><sub>ufiltcl</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU upqumax; /* Wind turbine voltage in the operation point where zero reactive current can be delivered (<i>u</i><i><sub>pqumax</sub></i>). It is a type-dependent parameter. Default: nullptr */ + /** \brief The wind dynamics lookup table associated with this current control limitation model. Default: 0 */ + std::list WindDynamicsLookupTable; + + /** \brief Wind turbine type 3 or type 4 model with which this wind control current limitation model is associated. Default: 0 */ + CIMPP::WindTurbineType3or4IEC* WindTurbineType3or4IEC; + + /** \brief Maximum continuous current at the wind turbine terminals (<i>i</i><i><sub>max</sub></i>). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU imax; + + /** \brief Maximum current during voltage dip at the wind turbine terminals (<i>i</i><i><sub>maxdip</sub></i>). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU imaxdip; + + /** \brief Partial derivative of reactive current limit (<i>K</i><i><sub>pqu</sub></i>) versus voltage. It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU kpqu; + + /** \brief Limitation of type 3 stator current (<i>M</i><i><sub>DFSLim</sub></i>). <i>M</i><i><sub>DFSLim</sub></i><sub> </sub>= 1 for wind turbines type 4. It is a type-dependent parameter. false= total current limitation (0 in the IEC model) true=stator current limitation (1 in the IEC model). Default: false */ + CIMPP::Boolean mdfslim; + + /** \brief Prioritisation of Q control during UVRT (<i>M</i><i><sub>qpri</sub></i>). It is a project-dependent parameter. true = reactive power priority (1 in the IEC model) false = active power priority (0 in the IEC model). Default: false */ + CIMPP::Boolean mqpri; + + /** \brief Voltage measurement filter time constant (<i>T</i><i><sub>ufiltcl</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ + CIMPP::Seconds tufiltcl; + + /** \brief Wind turbine voltage in the operation point where zero reactive current can be delivered (<i>u</i><i><sub>pqumax</sub></i>). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU upqumax; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindContPType3IEC.cpp b/CGMES_3.0.0/WindContPType3IEC.cpp index fea366a02..204a66b37 100644 --- a/CGMES_3.0.0/WindContPType3IEC.cpp +++ b/CGMES_3.0.0/WindContPType3IEC.cpp @@ -10,34 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindDynamicsLookupTable.hpp" #include "WindTurbineType3IEC.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" using namespace CIMPP; -WindContPType3IEC::WindContPType3IEC() : WindTurbineType3IEC(nullptr) {}; -WindContPType3IEC::~WindContPType3IEC() {}; +WindContPType3IEC::WindContPType3IEC() : WindTurbineType3IEC(nullptr) {} +WindContPType3IEC::~WindContPType3IEC() {} static const std::list PossibleProfilesForClass = { @@ -88,343 +65,368 @@ WindContPType3IEC::getPossibleProfilesForAttributes() const return map; } +bool assign_WindDynamicsLookupTable_WindContPType3IEC(BaseClass*, BaseClass*); +bool assign_WindContPType3IEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) + { + element->WindDynamicsLookupTable.push_back(element2); + return assign_WindDynamicsLookupTable_WindContPType3IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindTurbineType3IEC_WindContPType3IEC(BaseClass*, BaseClass*); +bool assign_WindContPType3IEC_WindTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType3IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindTurbineType3IEC != element2) + { + element->WindTurbineType3IEC = element2; + return assign_WindTurbineType3IEC_WindContPType3IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_WindContPType3IEC_dpmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_dpmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dpmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_dprefmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_dprefmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dprefmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_dprefmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_dprefmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dprefmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_dthetamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_dthetamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dthetamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_dthetamaxuvrt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_dthetamaxuvrt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dthetamaxuvrt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_kdtd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_kdtd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kdtd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_kip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_kip(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kip; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_kpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_kpp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_mpuvrt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_mpuvrt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->mpuvrt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_omegadtd(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_omegadtd(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->omegadtd; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_omegaoffset(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_omegaoffset(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->omegaoffset; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_pdtdmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_pdtdmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->pdtdmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_tdvs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_tdvs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tdvs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_thetaemin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_thetaemin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->thetaemin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_thetauscale(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_thetauscale(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->thetauscale; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_tomegafiltp3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_tomegafiltp3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tomegafiltp3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_tomegaref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_tomegaref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tomegaref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_tpfiltp3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_tpfiltp3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpfiltp3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_tpord(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_tpord(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpord; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_tufiltp3(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_tufiltp3(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tufiltp3; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_udvs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_udvs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->udvs; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_updip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_updip(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->updip; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType3IEC_zeta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType3IEC_zeta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->zeta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindDynamicsLookupTable_WindContPType3IEC(BaseClass*, BaseClass*); -bool assign_WindContPType3IEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) -{ - WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); - WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) - { - if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) - { - element->WindDynamicsLookupTable.push_back(element2); - return assign_WindDynamicsLookupTable_WindContPType3IEC(BaseClass_ptr2, BaseClass_ptr1); - } - return true; - } - return false; -} -bool assign_WindTurbineType3IEC_WindContPType3IEC(BaseClass*, BaseClass*); -bool assign_WindContPType3IEC_WindTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) -{ - WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType3IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) - { - if (element->WindTurbineType3IEC != element2) - { - element->WindTurbineType3IEC = element2; - return assign_WindTurbineType3IEC_WindContPType3IEC(BaseClass_ptr2, BaseClass_ptr1); - } - return true; - } - return false; -} bool get_WindContPType3IEC_dpmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dpmax; if (!buffer.str().empty()) @@ -438,7 +440,8 @@ bool get_WindContPType3IEC_dpmax(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindContPType3IEC_dprefmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dprefmax; if (!buffer.str().empty()) @@ -452,7 +455,8 @@ bool get_WindContPType3IEC_dprefmax(const BaseClass* BaseClass_ptr1, std::string bool get_WindContPType3IEC_dprefmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dprefmin; if (!buffer.str().empty()) @@ -466,7 +470,8 @@ bool get_WindContPType3IEC_dprefmin(const BaseClass* BaseClass_ptr1, std::string bool get_WindContPType3IEC_dthetamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dthetamax; if (!buffer.str().empty()) @@ -480,7 +485,8 @@ bool get_WindContPType3IEC_dthetamax(const BaseClass* BaseClass_ptr1, std::strin bool get_WindContPType3IEC_dthetamaxuvrt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dthetamaxuvrt; if (!buffer.str().empty()) @@ -494,7 +500,8 @@ bool get_WindContPType3IEC_dthetamaxuvrt(const BaseClass* BaseClass_ptr1, std::s bool get_WindContPType3IEC_kdtd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdtd; if (!buffer.str().empty()) @@ -508,7 +515,8 @@ bool get_WindContPType3IEC_kdtd(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindContPType3IEC_kip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kip; if (!buffer.str().empty()) @@ -522,7 +530,8 @@ bool get_WindContPType3IEC_kip(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_WindContPType3IEC_kpp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpp; if (!buffer.str().empty()) @@ -536,7 +545,8 @@ bool get_WindContPType3IEC_kpp(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_WindContPType3IEC_mpuvrt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mpuvrt; if (!buffer.str().empty()) @@ -550,7 +560,8 @@ bool get_WindContPType3IEC_mpuvrt(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindContPType3IEC_omegadtd(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->omegadtd; if (!buffer.str().empty()) @@ -564,7 +575,8 @@ bool get_WindContPType3IEC_omegadtd(const BaseClass* BaseClass_ptr1, std::string bool get_WindContPType3IEC_omegaoffset(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->omegaoffset; if (!buffer.str().empty()) @@ -578,7 +590,8 @@ bool get_WindContPType3IEC_omegaoffset(const BaseClass* BaseClass_ptr1, std::str bool get_WindContPType3IEC_pdtdmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pdtdmax; if (!buffer.str().empty()) @@ -592,7 +605,8 @@ bool get_WindContPType3IEC_pdtdmax(const BaseClass* BaseClass_ptr1, std::strings bool get_WindContPType3IEC_tdvs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tdvs; if (!buffer.str().empty()) @@ -606,7 +620,8 @@ bool get_WindContPType3IEC_tdvs(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindContPType3IEC_thetaemin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thetaemin; if (!buffer.str().empty()) @@ -620,7 +635,8 @@ bool get_WindContPType3IEC_thetaemin(const BaseClass* BaseClass_ptr1, std::strin bool get_WindContPType3IEC_thetauscale(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thetauscale; if (!buffer.str().empty()) @@ -634,7 +650,8 @@ bool get_WindContPType3IEC_thetauscale(const BaseClass* BaseClass_ptr1, std::str bool get_WindContPType3IEC_tomegafiltp3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tomegafiltp3; if (!buffer.str().empty()) @@ -648,7 +665,8 @@ bool get_WindContPType3IEC_tomegafiltp3(const BaseClass* BaseClass_ptr1, std::st bool get_WindContPType3IEC_tomegaref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tomegaref; if (!buffer.str().empty()) @@ -662,7 +680,8 @@ bool get_WindContPType3IEC_tomegaref(const BaseClass* BaseClass_ptr1, std::strin bool get_WindContPType3IEC_tpfiltp3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpfiltp3; if (!buffer.str().empty()) @@ -676,7 +695,8 @@ bool get_WindContPType3IEC_tpfiltp3(const BaseClass* BaseClass_ptr1, std::string bool get_WindContPType3IEC_tpord(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpord; if (!buffer.str().empty()) @@ -690,7 +710,8 @@ bool get_WindContPType3IEC_tpord(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindContPType3IEC_tufiltp3(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tufiltp3; if (!buffer.str().empty()) @@ -704,7 +725,8 @@ bool get_WindContPType3IEC_tufiltp3(const BaseClass* BaseClass_ptr1, std::string bool get_WindContPType3IEC_udvs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->udvs; if (!buffer.str().empty()) @@ -718,7 +740,8 @@ bool get_WindContPType3IEC_udvs(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindContPType3IEC_updip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->updip; if (!buffer.str().empty()) @@ -732,7 +755,8 @@ bool get_WindContPType3IEC_updip(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindContPType3IEC_zeta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->zeta; if (!buffer.str().empty()) @@ -744,8 +768,6 @@ bool get_WindContPType3IEC_zeta(const BaseClass* BaseClass_ptr1, std::stringstre return false; } - - const char WindContPType3IEC::debugName[] = "WindContPType3IEC"; const char* WindContPType3IEC::debugString() const { @@ -754,40 +776,40 @@ const char* WindContPType3IEC::debugString() const void WindContPType3IEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindContPType3IEC"), &WindContPType3IEC_factory)); + factory_map.emplace("cim:WindContPType3IEC", &WindContPType3IEC_factory); } void WindContPType3IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.dpmax"), &assign_WindContPType3IEC_dpmax)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.dprefmax"), &assign_WindContPType3IEC_dprefmax)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.dprefmin"), &assign_WindContPType3IEC_dprefmin)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.dthetamax"), &assign_WindContPType3IEC_dthetamax)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.dthetamaxuvrt"), &assign_WindContPType3IEC_dthetamaxuvrt)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.kdtd"), &assign_WindContPType3IEC_kdtd)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.kip"), &assign_WindContPType3IEC_kip)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.kpp"), &assign_WindContPType3IEC_kpp)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.mpuvrt"), &assign_WindContPType3IEC_mpuvrt)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.omegadtd"), &assign_WindContPType3IEC_omegadtd)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.omegaoffset"), &assign_WindContPType3IEC_omegaoffset)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.pdtdmax"), &assign_WindContPType3IEC_pdtdmax)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.tdvs"), &assign_WindContPType3IEC_tdvs)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.thetaemin"), &assign_WindContPType3IEC_thetaemin)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.thetauscale"), &assign_WindContPType3IEC_thetauscale)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.tomegafiltp3"), &assign_WindContPType3IEC_tomegafiltp3)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.tomegaref"), &assign_WindContPType3IEC_tomegaref)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.tpfiltp3"), &assign_WindContPType3IEC_tpfiltp3)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.tpord"), &assign_WindContPType3IEC_tpord)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.tufiltp3"), &assign_WindContPType3IEC_tufiltp3)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.udvs"), &assign_WindContPType3IEC_udvs)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.updip"), &assign_WindContPType3IEC_updip)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.zeta"), &assign_WindContPType3IEC_zeta)); + assign_map.emplace("cim:WindContPType3IEC.dpmax", &assign_WindContPType3IEC_dpmax); + assign_map.emplace("cim:WindContPType3IEC.dprefmax", &assign_WindContPType3IEC_dprefmax); + assign_map.emplace("cim:WindContPType3IEC.dprefmin", &assign_WindContPType3IEC_dprefmin); + assign_map.emplace("cim:WindContPType3IEC.dthetamax", &assign_WindContPType3IEC_dthetamax); + assign_map.emplace("cim:WindContPType3IEC.dthetamaxuvrt", &assign_WindContPType3IEC_dthetamaxuvrt); + assign_map.emplace("cim:WindContPType3IEC.kdtd", &assign_WindContPType3IEC_kdtd); + assign_map.emplace("cim:WindContPType3IEC.kip", &assign_WindContPType3IEC_kip); + assign_map.emplace("cim:WindContPType3IEC.kpp", &assign_WindContPType3IEC_kpp); + assign_map.emplace("cim:WindContPType3IEC.mpuvrt", &assign_WindContPType3IEC_mpuvrt); + assign_map.emplace("cim:WindContPType3IEC.omegadtd", &assign_WindContPType3IEC_omegadtd); + assign_map.emplace("cim:WindContPType3IEC.omegaoffset", &assign_WindContPType3IEC_omegaoffset); + assign_map.emplace("cim:WindContPType3IEC.pdtdmax", &assign_WindContPType3IEC_pdtdmax); + assign_map.emplace("cim:WindContPType3IEC.tdvs", &assign_WindContPType3IEC_tdvs); + assign_map.emplace("cim:WindContPType3IEC.thetaemin", &assign_WindContPType3IEC_thetaemin); + assign_map.emplace("cim:WindContPType3IEC.thetauscale", &assign_WindContPType3IEC_thetauscale); + assign_map.emplace("cim:WindContPType3IEC.tomegafiltp3", &assign_WindContPType3IEC_tomegafiltp3); + assign_map.emplace("cim:WindContPType3IEC.tomegaref", &assign_WindContPType3IEC_tomegaref); + assign_map.emplace("cim:WindContPType3IEC.tpfiltp3", &assign_WindContPType3IEC_tpfiltp3); + assign_map.emplace("cim:WindContPType3IEC.tpord", &assign_WindContPType3IEC_tpord); + assign_map.emplace("cim:WindContPType3IEC.tufiltp3", &assign_WindContPType3IEC_tufiltp3); + assign_map.emplace("cim:WindContPType3IEC.udvs", &assign_WindContPType3IEC_udvs); + assign_map.emplace("cim:WindContPType3IEC.updip", &assign_WindContPType3IEC_updip); + assign_map.emplace("cim:WindContPType3IEC.zeta", &assign_WindContPType3IEC_zeta); } void WindContPType3IEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.WindDynamicsLookupTable"), &assign_WindContPType3IEC_WindDynamicsLookupTable)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType3IEC.WindTurbineType3IEC"), &assign_WindContPType3IEC_WindTurbineType3IEC)); + assign_map.emplace("cim:WindContPType3IEC.WindDynamicsLookupTable", &assign_WindContPType3IEC_WindDynamicsLookupTable); + assign_map.emplace("cim:WindContPType3IEC.WindTurbineType3IEC", &assign_WindContPType3IEC_WindTurbineType3IEC); } void WindContPType3IEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindContPType3IEC.hpp b/CGMES_3.0.0/WindContPType3IEC.hpp index aa91ce3f9..5c07c0bb7 100644 --- a/CGMES_3.0.0/WindContPType3IEC.hpp +++ b/CGMES_3.0.0/WindContPType3IEC.hpp @@ -22,9 +22,7 @@ namespace CIMPP class WindDynamicsLookupTable; class WindTurbineType3IEC; - /* - P control model type 3. Reference: IEC 61400-27-1:2015, 5.6.5.4. - */ + /** \brief P control model type 3. Reference: IEC 61400-27-1:2015, 5.6.5.4. */ class WindContPType3IEC : public IdentifiedObject { public: @@ -32,31 +30,80 @@ namespace CIMPP WindContPType3IEC(); ~WindContPType3IEC() override; - std::list WindDynamicsLookupTable; /* The wind dynamics lookup table associated with this P control type 3 model. Default: 0 */ - CIMPP::WindTurbineType3IEC* WindTurbineType3IEC; /* Wind turbine type 3 model with which this wind control P type 3 model is associated. Default: 0 */ - CIMPP::PU dpmax; /* Maximum wind turbine power ramp rate (<i>dp</i><i><sub>max</sub></i>). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU dprefmax; /* Maximum ramp rate of wind turbine reference power (<i>dp</i><i><sub>refmax</sub></i>). It is a project-dependent parameter. Default: nullptr */ - CIMPP::PU dprefmin; /* Minimum ramp rate of wind turbine reference power (<i>dp</i><i><sub>refmin</sub></i>). It is a project-dependent parameter. Default: nullptr */ - CIMPP::PU dthetamax; /* Ramp limitation of torque, required in some grid codes (<i>dt</i><i><sub>max</sub></i>). It is a project-dependent parameter. Default: nullptr */ - CIMPP::PU dthetamaxuvrt; /* Limitation of torque rise rate during UVRT (<i>dtheta</i><i><sub>maxUVRT</sub></i>). It is a project-dependent parameter. Default: nullptr */ - CIMPP::PU kdtd; /* Gain for active drive train damping (<i>K</i><i><sub>DTD</sub></i>). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU kip; /* PI controller integration parameter (<i>K</i><sub>Ip</sub>). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU kpp; /* PI controller proportional gain (<i>K</i><sub>Pp</sub>). It is a type-dependent parameter. Default: nullptr */ - CIMPP::Boolean mpuvrt; /* Enable UVRT power control mode (<i>M</i><i><sub>pUVRT</sub></i><sub>)</sub>. It is a project-dependent parameter. true = voltage control (1 in the IEC model) false = reactive power control (0 in the IEC model). Default: false */ - CIMPP::PU omegadtd; /* Active drive train damping frequency (<i>omega</i><i><sub>DTD</sub></i>). It can be calculated from two mass model parameters. It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU omegaoffset; /* Offset to reference value that limits controller action during rotor speed changes (<i>omega</i><i><sub>offset</sub></i>). It is a case-dependent parameter. Default: nullptr */ - CIMPP::PU pdtdmax; /* Maximum active drive train damping power (<i>p</i><sub>DTDmax</sub>). It is a type-dependent parameter. Default: nullptr */ - CIMPP::Seconds tdvs; /* Time<sub> </sub>delay after deep voltage sags (<i>T</i><i><sub>DVS</sub></i>) (&gt;= 0). It is a project-dependent parameter. Default: nullptr */ - CIMPP::PU thetaemin; /* Minimum electrical generator torque (<i>t</i><sub>emin</sub>). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU thetauscale; /* Voltage scaling factor of reset-torque (<i>t</i><sub>uscale</sub>). It is a project-dependent parameter. Default: nullptr */ - CIMPP::Seconds tomegafiltp3; /* Filter time constant for generator speed measurement (<i>T</i><sub>omegafiltp3</sub>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ - CIMPP::Seconds tomegaref; /* Time constant in speed reference filter (<i>T</i><sub>omega,ref</sub>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ - CIMPP::Seconds tpfiltp3; /* Filter time constant for power measurement (<i>T</i><sub>pfiltp3</sub>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU tpord; /* Time constant in power order lag (<i>T</i><sub>pord</sub>). It is a type-dependent parameter. Default: nullptr */ - CIMPP::Seconds tufiltp3; /* Filter time constant for voltage measurement (<i>T</i><sub>ufiltp3</sub>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU udvs; /* Voltage limit for hold UVRT status after deep voltage sags (<i>u</i><i><sub>DVS</sub></i>). It is a project-dependent parameter. Default: nullptr */ - CIMPP::PU updip; /* Voltage dip threshold for P-control (<i>u</i><sub>Pdip</sub>). Part of turbine control, often different (e.g 0.8) from converter thresholds. It is a project-dependent parameter. Default: nullptr */ - CIMPP::Float zeta; /* Coefficient for active drive train damping (<i>zeta</i>). It is a type-dependent parameter. Default: 0.0 */ + /** \brief The wind dynamics lookup table associated with this P control type 3 model. Default: 0 */ + std::list WindDynamicsLookupTable; + + /** \brief Wind turbine type 3 model with which this wind control P type 3 model is associated. Default: 0 */ + CIMPP::WindTurbineType3IEC* WindTurbineType3IEC; + + /** \brief Maximum wind turbine power ramp rate (<i>dp</i><i><sub>max</sub></i>). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU dpmax; + + /** \brief Maximum ramp rate of wind turbine reference power (<i>dp</i><i><sub>refmax</sub></i>). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU dprefmax; + + /** \brief Minimum ramp rate of wind turbine reference power (<i>dp</i><i><sub>refmin</sub></i>). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU dprefmin; + + /** \brief Ramp limitation of torque, required in some grid codes (<i>dt</i><i><sub>max</sub></i>). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU dthetamax; + + /** \brief Limitation of torque rise rate during UVRT (<i>dtheta</i><i><sub>maxUVRT</sub></i>). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU dthetamaxuvrt; + + /** \brief Gain for active drive train damping (<i>K</i><i><sub>DTD</sub></i>). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU kdtd; + + /** \brief PI controller integration parameter (<i>K</i><sub>Ip</sub>). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU kip; + + /** \brief PI controller proportional gain (<i>K</i><sub>Pp</sub>). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU kpp; + + /** \brief Enable UVRT power control mode (<i>M</i><i><sub>pUVRT</sub></i><sub>)</sub>. It is a project-dependent parameter. true = voltage control (1 in the IEC model) false = reactive power control (0 in the IEC model). Default: false */ + CIMPP::Boolean mpuvrt; + + /** \brief Active drive train damping frequency (<i>omega</i><i><sub>DTD</sub></i>). It can be calculated from two mass model parameters. It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU omegadtd; + + /** \brief Offset to reference value that limits controller action during rotor speed changes (<i>omega</i><i><sub>offset</sub></i>). It is a case-dependent parameter. Default: nullptr */ + CIMPP::PU omegaoffset; + + /** \brief Maximum active drive train damping power (<i>p</i><sub>DTDmax</sub>). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU pdtdmax; + + /** \brief Time<sub> </sub>delay after deep voltage sags (<i>T</i><i><sub>DVS</sub></i>) (&gt;= 0). It is a project-dependent parameter. Default: nullptr */ + CIMPP::Seconds tdvs; + + /** \brief Minimum electrical generator torque (<i>t</i><sub>emin</sub>). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU thetaemin; + + /** \brief Voltage scaling factor of reset-torque (<i>t</i><sub>uscale</sub>). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU thetauscale; + + /** \brief Filter time constant for generator speed measurement (<i>T</i><sub>omegafiltp3</sub>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ + CIMPP::Seconds tomegafiltp3; + + /** \brief Time constant in speed reference filter (<i>T</i><sub>omega,ref</sub>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ + CIMPP::Seconds tomegaref; + + /** \brief Filter time constant for power measurement (<i>T</i><sub>pfiltp3</sub>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ + CIMPP::Seconds tpfiltp3; + + /** \brief Time constant in power order lag (<i>T</i><sub>pord</sub>). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU tpord; + + /** \brief Filter time constant for voltage measurement (<i>T</i><sub>ufiltp3</sub>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ + CIMPP::Seconds tufiltp3; + + /** \brief Voltage limit for hold UVRT status after deep voltage sags (<i>u</i><i><sub>DVS</sub></i>). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU udvs; + + /** \brief Voltage dip threshold for P-control (<i>u</i><sub>Pdip</sub>). Part of turbine control, often different (e.g 0.8) from converter thresholds. It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU updip; + + /** \brief Coefficient for active drive train damping (<i>zeta</i>). It is a type-dependent parameter. Default: 0.0 */ + CIMPP::Float zeta; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindContPType4aIEC.cpp b/CGMES_3.0.0/WindContPType4aIEC.cpp index d14797710..217091a62 100644 --- a/CGMES_3.0.0/WindContPType4aIEC.cpp +++ b/CGMES_3.0.0/WindContPType4aIEC.cpp @@ -9,14 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "WindTurbineType4aIEC.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -WindContPType4aIEC::WindContPType4aIEC() : WindTurbineType4aIEC(nullptr) {}; -WindContPType4aIEC::~WindContPType4aIEC() {}; +WindContPType4aIEC::WindContPType4aIEC() : WindTurbineType4aIEC(nullptr) {} +WindContPType4aIEC::~WindContPType4aIEC() {} static const std::list PossibleProfilesForClass = { @@ -46,67 +43,70 @@ WindContPType4aIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindContPType4aIEC_dpmaxp4a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType4aIEC_WindContPType4aIEC(BaseClass*, BaseClass*); +bool assign_WindContPType4aIEC_WindTurbineType4aIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType4aIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->dpmaxp4a; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType4aIEC != element2) + { + element->WindTurbineType4aIEC = element2; + return assign_WindTurbineType4aIEC_WindContPType4aIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindContPType4aIEC_tpordp4a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType4aIEC_dpmaxp4a(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tpordp4a; - if (buffer.fail()) - return false; - else + buffer >> element->dpmaxp4a; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType4aIEC_tufiltp4a(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType4aIEC_tpordp4a(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tufiltp4a; - if (buffer.fail()) - return false; - else + buffer >> element->tpordp4a; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindTurbineType4aIEC_WindContPType4aIEC(BaseClass*, BaseClass*); -bool assign_WindContPType4aIEC_WindTurbineType4aIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindContPType4aIEC_tufiltp4a(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType4aIEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType4aIEC != element2) + buffer >> element->tufiltp4a; + if (!buffer.fail()) { - element->WindTurbineType4aIEC = element2; - return assign_WindTurbineType4aIEC_WindContPType4aIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_WindContPType4aIEC_dpmaxp4a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dpmaxp4a; if (!buffer.str().empty()) @@ -120,7 +120,8 @@ bool get_WindContPType4aIEC_dpmaxp4a(const BaseClass* BaseClass_ptr1, std::strin bool get_WindContPType4aIEC_tpordp4a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpordp4a; if (!buffer.str().empty()) @@ -134,7 +135,8 @@ bool get_WindContPType4aIEC_tpordp4a(const BaseClass* BaseClass_ptr1, std::strin bool get_WindContPType4aIEC_tufiltp4a(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType4aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tufiltp4a; if (!buffer.str().empty()) @@ -146,8 +148,6 @@ bool get_WindContPType4aIEC_tufiltp4a(const BaseClass* BaseClass_ptr1, std::stri return false; } - - const char WindContPType4aIEC::debugName[] = "WindContPType4aIEC"; const char* WindContPType4aIEC::debugString() const { @@ -156,19 +156,19 @@ const char* WindContPType4aIEC::debugString() const void WindContPType4aIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindContPType4aIEC"), &WindContPType4aIEC_factory)); + factory_map.emplace("cim:WindContPType4aIEC", &WindContPType4aIEC_factory); } void WindContPType4aIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContPType4aIEC.dpmaxp4a"), &assign_WindContPType4aIEC_dpmaxp4a)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType4aIEC.tpordp4a"), &assign_WindContPType4aIEC_tpordp4a)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType4aIEC.tufiltp4a"), &assign_WindContPType4aIEC_tufiltp4a)); + assign_map.emplace("cim:WindContPType4aIEC.dpmaxp4a", &assign_WindContPType4aIEC_dpmaxp4a); + assign_map.emplace("cim:WindContPType4aIEC.tpordp4a", &assign_WindContPType4aIEC_tpordp4a); + assign_map.emplace("cim:WindContPType4aIEC.tufiltp4a", &assign_WindContPType4aIEC_tufiltp4a); } void WindContPType4aIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContPType4aIEC.WindTurbineType4aIEC"), &assign_WindContPType4aIEC_WindTurbineType4aIEC)); + assign_map.emplace("cim:WindContPType4aIEC.WindTurbineType4aIEC", &assign_WindContPType4aIEC_WindTurbineType4aIEC); } void WindContPType4aIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindContPType4aIEC.hpp b/CGMES_3.0.0/WindContPType4aIEC.hpp index 66848c8c5..b83c70f1b 100644 --- a/CGMES_3.0.0/WindContPType4aIEC.hpp +++ b/CGMES_3.0.0/WindContPType4aIEC.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class WindTurbineType4aIEC; - /* - P control model type 4A. Reference: IEC 61400-27-1:2015, 5.6.5.5. - */ + /** \brief P control model type 4A. Reference: IEC 61400-27-1:2015, 5.6.5.5. */ class WindContPType4aIEC : public IdentifiedObject { public: @@ -29,10 +27,17 @@ namespace CIMPP WindContPType4aIEC(); ~WindContPType4aIEC() override; - CIMPP::WindTurbineType4aIEC* WindTurbineType4aIEC; /* Wind turbine type 4A model with which this wind control P type 4A model is associated. Default: 0 */ - CIMPP::PU dpmaxp4a; /* Maximum wind turbine power ramp rate (<i>dp</i><i><sub>maxp4A</sub></i>). It is a project-dependent parameter. Default: nullptr */ - CIMPP::Seconds tpordp4a; /* Time constant in power order lag (<i>T</i><i><sub>pordp4A</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ - CIMPP::Seconds tufiltp4a; /* Voltage measurement filter time constant (<i>T</i><i><sub>ufiltp4A</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ + /** \brief Wind turbine type 4A model with which this wind control P type 4A model is associated. Default: 0 */ + CIMPP::WindTurbineType4aIEC* WindTurbineType4aIEC; + + /** \brief Maximum wind turbine power ramp rate (<i>dp</i><i><sub>maxp4A</sub></i>). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU dpmaxp4a; + + /** \brief Time constant in power order lag (<i>T</i><i><sub>pordp4A</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ + CIMPP::Seconds tpordp4a; + + /** \brief Voltage measurement filter time constant (<i>T</i><i><sub>ufiltp4A</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ + CIMPP::Seconds tufiltp4a; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindContPType4bIEC.cpp b/CGMES_3.0.0/WindContPType4bIEC.cpp index 498254cf6..8cd9589d9 100644 --- a/CGMES_3.0.0/WindContPType4bIEC.cpp +++ b/CGMES_3.0.0/WindContPType4bIEC.cpp @@ -9,15 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "WindTurbineType4bIEC.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -WindContPType4bIEC::WindContPType4bIEC() : WindTurbineType4bIEC(nullptr) {}; -WindContPType4bIEC::~WindContPType4bIEC() {}; +WindContPType4bIEC::WindContPType4bIEC() : WindTurbineType4bIEC(nullptr) {} +WindContPType4bIEC::~WindContPType4bIEC() {} static const std::list PossibleProfilesForClass = { @@ -48,80 +44,84 @@ WindContPType4bIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindContPType4bIEC_dpmaxp4b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType4bIEC_WindContPType4bIEC(BaseClass*, BaseClass*); +bool assign_WindContPType4bIEC_WindTurbineType4bIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType4bIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->dpmaxp4b; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType4bIEC != element2) + { + element->WindTurbineType4bIEC = element2; + return assign_WindTurbineType4bIEC_WindContPType4bIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindContPType4bIEC_tpaero(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType4bIEC_dpmaxp4b(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tpaero; - if (buffer.fail()) - return false; - else + buffer >> element->dpmaxp4b; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType4bIEC_tpordp4b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType4bIEC_tpaero(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tpordp4b; - if (buffer.fail()) - return false; - else + buffer >> element->tpaero; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPType4bIEC_tufiltp4b(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPType4bIEC_tpordp4b(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tufiltp4b; - if (buffer.fail()) - return false; - else + buffer >> element->tpordp4b; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindTurbineType4bIEC_WindContPType4bIEC(BaseClass*, BaseClass*); -bool assign_WindContPType4bIEC_WindTurbineType4bIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindContPType4bIEC_tufiltp4b(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType4bIEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType4bIEC != element2) + buffer >> element->tufiltp4b; + if (!buffer.fail()) { - element->WindTurbineType4bIEC = element2; - return assign_WindTurbineType4bIEC_WindContPType4bIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_WindContPType4bIEC_dpmaxp4b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dpmaxp4b; if (!buffer.str().empty()) @@ -135,7 +135,8 @@ bool get_WindContPType4bIEC_dpmaxp4b(const BaseClass* BaseClass_ptr1, std::strin bool get_WindContPType4bIEC_tpaero(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpaero; if (!buffer.str().empty()) @@ -149,7 +150,8 @@ bool get_WindContPType4bIEC_tpaero(const BaseClass* BaseClass_ptr1, std::strings bool get_WindContPType4bIEC_tpordp4b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpordp4b; if (!buffer.str().empty()) @@ -163,7 +165,8 @@ bool get_WindContPType4bIEC_tpordp4b(const BaseClass* BaseClass_ptr1, std::strin bool get_WindContPType4bIEC_tufiltp4b(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tufiltp4b; if (!buffer.str().empty()) @@ -175,8 +178,6 @@ bool get_WindContPType4bIEC_tufiltp4b(const BaseClass* BaseClass_ptr1, std::stri return false; } - - const char WindContPType4bIEC::debugName[] = "WindContPType4bIEC"; const char* WindContPType4bIEC::debugString() const { @@ -185,20 +186,20 @@ const char* WindContPType4bIEC::debugString() const void WindContPType4bIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindContPType4bIEC"), &WindContPType4bIEC_factory)); + factory_map.emplace("cim:WindContPType4bIEC", &WindContPType4bIEC_factory); } void WindContPType4bIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContPType4bIEC.dpmaxp4b"), &assign_WindContPType4bIEC_dpmaxp4b)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType4bIEC.tpaero"), &assign_WindContPType4bIEC_tpaero)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType4bIEC.tpordp4b"), &assign_WindContPType4bIEC_tpordp4b)); - assign_map.insert(std::make_pair(std::string("cim:WindContPType4bIEC.tufiltp4b"), &assign_WindContPType4bIEC_tufiltp4b)); + assign_map.emplace("cim:WindContPType4bIEC.dpmaxp4b", &assign_WindContPType4bIEC_dpmaxp4b); + assign_map.emplace("cim:WindContPType4bIEC.tpaero", &assign_WindContPType4bIEC_tpaero); + assign_map.emplace("cim:WindContPType4bIEC.tpordp4b", &assign_WindContPType4bIEC_tpordp4b); + assign_map.emplace("cim:WindContPType4bIEC.tufiltp4b", &assign_WindContPType4bIEC_tufiltp4b); } void WindContPType4bIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContPType4bIEC.WindTurbineType4bIEC"), &assign_WindContPType4bIEC_WindTurbineType4bIEC)); + assign_map.emplace("cim:WindContPType4bIEC.WindTurbineType4bIEC", &assign_WindContPType4bIEC_WindTurbineType4bIEC); } void WindContPType4bIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindContPType4bIEC.hpp b/CGMES_3.0.0/WindContPType4bIEC.hpp index 0e5b1cc26..e1f1ebd74 100644 --- a/CGMES_3.0.0/WindContPType4bIEC.hpp +++ b/CGMES_3.0.0/WindContPType4bIEC.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class WindTurbineType4bIEC; - /* - P control model type 4B. Reference: IEC 61400-27-1:2015, 5.6.5.6. - */ + /** \brief P control model type 4B. Reference: IEC 61400-27-1:2015, 5.6.5.6. */ class WindContPType4bIEC : public IdentifiedObject { public: @@ -29,11 +27,20 @@ namespace CIMPP WindContPType4bIEC(); ~WindContPType4bIEC() override; - CIMPP::WindTurbineType4bIEC* WindTurbineType4bIEC; /* Wind turbine type 4B model with which this wind control P type 4B model is associated. Default: 0 */ - CIMPP::PU dpmaxp4b; /* Maximum wind turbine power ramp rate (<i>dp</i><i><sub>maxp4B</sub></i>). It is a project-dependent parameter. Default: nullptr */ - CIMPP::Seconds tpaero; /* Time constant in aerodynamic power response (<i>T</i><i><sub>paero</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ - CIMPP::Seconds tpordp4b; /* Time constant in power order lag (<i>T</i><i><sub>pordp4B</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ - CIMPP::Seconds tufiltp4b; /* Voltage measurement filter time constant (<i>T</i><i><sub>ufiltp4B</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ + /** \brief Wind turbine type 4B model with which this wind control P type 4B model is associated. Default: 0 */ + CIMPP::WindTurbineType4bIEC* WindTurbineType4bIEC; + + /** \brief Maximum wind turbine power ramp rate (<i>dp</i><i><sub>maxp4B</sub></i>). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU dpmaxp4b; + + /** \brief Time constant in aerodynamic power response (<i>T</i><i><sub>paero</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ + CIMPP::Seconds tpaero; + + /** \brief Time constant in power order lag (<i>T</i><i><sub>pordp4B</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ + CIMPP::Seconds tpordp4b; + + /** \brief Voltage measurement filter time constant (<i>T</i><i><sub>ufiltp4B</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ + CIMPP::Seconds tufiltp4b; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindContPitchAngleIEC.cpp b/CGMES_3.0.0/WindContPitchAngleIEC.cpp index 313e1bda3..e9cad0d85 100644 --- a/CGMES_3.0.0/WindContPitchAngleIEC.cpp +++ b/CGMES_3.0.0/WindContPitchAngleIEC.cpp @@ -9,21 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "WindTurbineType3IEC.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "AngleDegrees.hpp" -#include "AngleDegrees.hpp" -#include "Seconds.hpp" using namespace CIMPP; -WindContPitchAngleIEC::WindContPitchAngleIEC() : WindTurbineType3IEC(nullptr) {}; -WindContPitchAngleIEC::~WindContPitchAngleIEC() {}; +WindContPitchAngleIEC::WindContPitchAngleIEC() : WindTurbineType3IEC(nullptr) {} +WindContPitchAngleIEC::~WindContPitchAngleIEC() {} static const std::list PossibleProfilesForClass = { @@ -60,158 +50,168 @@ WindContPitchAngleIEC::getPossibleProfilesForAttributes() const return map; } +bool assign_WindTurbineType3IEC_WindContPitchAngleIEC(BaseClass*, BaseClass*); +bool assign_WindContPitchAngleIEC_WindTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType3IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindTurbineType3IEC != element2) + { + element->WindTurbineType3IEC = element2; + return assign_WindTurbineType3IEC_WindContPitchAngleIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_WindContPitchAngleIEC_dthetamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPitchAngleIEC_dthetamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dthetamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPitchAngleIEC_dthetamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPitchAngleIEC_dthetamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dthetamin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPitchAngleIEC_kic(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPitchAngleIEC_kic(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kic; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPitchAngleIEC_kiomega(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPitchAngleIEC_kiomega(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kiomega; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPitchAngleIEC_kpc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPitchAngleIEC_kpc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpc; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPitchAngleIEC_kpomega(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPitchAngleIEC_kpomega(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpomega; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPitchAngleIEC_kpx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPitchAngleIEC_kpx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPitchAngleIEC_thetamax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPitchAngleIEC_thetamax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->thetamax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContPitchAngleIEC_thetamin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContPitchAngleIEC_thetamin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->thetamin; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_WindContPitchAngleIEC_ttheta(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->ttheta; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindTurbineType3IEC_WindContPitchAngleIEC(BaseClass*, BaseClass*); -bool assign_WindContPitchAngleIEC_WindTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindContPitchAngleIEC_ttheta(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType3IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType3IEC != element2) + buffer >> element->ttheta; + if (!buffer.fail()) { - element->WindTurbineType3IEC = element2; - return assign_WindTurbineType3IEC_WindContPitchAngleIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_WindContPitchAngleIEC_dthetamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dthetamax; if (!buffer.str().empty()) @@ -225,7 +225,8 @@ bool get_WindContPitchAngleIEC_dthetamax(const BaseClass* BaseClass_ptr1, std::s bool get_WindContPitchAngleIEC_dthetamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dthetamin; if (!buffer.str().empty()) @@ -239,7 +240,8 @@ bool get_WindContPitchAngleIEC_dthetamin(const BaseClass* BaseClass_ptr1, std::s bool get_WindContPitchAngleIEC_kic(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kic; if (!buffer.str().empty()) @@ -253,7 +255,8 @@ bool get_WindContPitchAngleIEC_kic(const BaseClass* BaseClass_ptr1, std::strings bool get_WindContPitchAngleIEC_kiomega(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kiomega; if (!buffer.str().empty()) @@ -267,7 +270,8 @@ bool get_WindContPitchAngleIEC_kiomega(const BaseClass* BaseClass_ptr1, std::str bool get_WindContPitchAngleIEC_kpc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpc; if (!buffer.str().empty()) @@ -281,7 +285,8 @@ bool get_WindContPitchAngleIEC_kpc(const BaseClass* BaseClass_ptr1, std::strings bool get_WindContPitchAngleIEC_kpomega(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpomega; if (!buffer.str().empty()) @@ -295,7 +300,8 @@ bool get_WindContPitchAngleIEC_kpomega(const BaseClass* BaseClass_ptr1, std::str bool get_WindContPitchAngleIEC_kpx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpx; if (!buffer.str().empty()) @@ -309,7 +315,8 @@ bool get_WindContPitchAngleIEC_kpx(const BaseClass* BaseClass_ptr1, std::strings bool get_WindContPitchAngleIEC_thetamax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thetamax; if (!buffer.str().empty()) @@ -323,7 +330,8 @@ bool get_WindContPitchAngleIEC_thetamax(const BaseClass* BaseClass_ptr1, std::st bool get_WindContPitchAngleIEC_thetamin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->thetamin; if (!buffer.str().empty()) @@ -337,7 +345,8 @@ bool get_WindContPitchAngleIEC_thetamin(const BaseClass* BaseClass_ptr1, std::st bool get_WindContPitchAngleIEC_ttheta(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContPitchAngleIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->ttheta; if (!buffer.str().empty()) @@ -349,8 +358,6 @@ bool get_WindContPitchAngleIEC_ttheta(const BaseClass* BaseClass_ptr1, std::stri return false; } - - const char WindContPitchAngleIEC::debugName[] = "WindContPitchAngleIEC"; const char* WindContPitchAngleIEC::debugString() const { @@ -359,26 +366,26 @@ const char* WindContPitchAngleIEC::debugString() const void WindContPitchAngleIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC"), &WindContPitchAngleIEC_factory)); + factory_map.emplace("cim:WindContPitchAngleIEC", &WindContPitchAngleIEC_factory); } void WindContPitchAngleIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.dthetamax"), &assign_WindContPitchAngleIEC_dthetamax)); - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.dthetamin"), &assign_WindContPitchAngleIEC_dthetamin)); - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.kic"), &assign_WindContPitchAngleIEC_kic)); - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.kiomega"), &assign_WindContPitchAngleIEC_kiomega)); - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.kpc"), &assign_WindContPitchAngleIEC_kpc)); - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.kpomega"), &assign_WindContPitchAngleIEC_kpomega)); - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.kpx"), &assign_WindContPitchAngleIEC_kpx)); - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.thetamax"), &assign_WindContPitchAngleIEC_thetamax)); - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.thetamin"), &assign_WindContPitchAngleIEC_thetamin)); - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.ttheta"), &assign_WindContPitchAngleIEC_ttheta)); + assign_map.emplace("cim:WindContPitchAngleIEC.dthetamax", &assign_WindContPitchAngleIEC_dthetamax); + assign_map.emplace("cim:WindContPitchAngleIEC.dthetamin", &assign_WindContPitchAngleIEC_dthetamin); + assign_map.emplace("cim:WindContPitchAngleIEC.kic", &assign_WindContPitchAngleIEC_kic); + assign_map.emplace("cim:WindContPitchAngleIEC.kiomega", &assign_WindContPitchAngleIEC_kiomega); + assign_map.emplace("cim:WindContPitchAngleIEC.kpc", &assign_WindContPitchAngleIEC_kpc); + assign_map.emplace("cim:WindContPitchAngleIEC.kpomega", &assign_WindContPitchAngleIEC_kpomega); + assign_map.emplace("cim:WindContPitchAngleIEC.kpx", &assign_WindContPitchAngleIEC_kpx); + assign_map.emplace("cim:WindContPitchAngleIEC.thetamax", &assign_WindContPitchAngleIEC_thetamax); + assign_map.emplace("cim:WindContPitchAngleIEC.thetamin", &assign_WindContPitchAngleIEC_thetamin); + assign_map.emplace("cim:WindContPitchAngleIEC.ttheta", &assign_WindContPitchAngleIEC_ttheta); } void WindContPitchAngleIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContPitchAngleIEC.WindTurbineType3IEC"), &assign_WindContPitchAngleIEC_WindTurbineType3IEC)); + assign_map.emplace("cim:WindContPitchAngleIEC.WindTurbineType3IEC", &assign_WindContPitchAngleIEC_WindTurbineType3IEC); } void WindContPitchAngleIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindContPitchAngleIEC.hpp b/CGMES_3.0.0/WindContPitchAngleIEC.hpp index 495b16c5f..80831c41e 100644 --- a/CGMES_3.0.0/WindContPitchAngleIEC.hpp +++ b/CGMES_3.0.0/WindContPitchAngleIEC.hpp @@ -21,9 +21,7 @@ namespace CIMPP { class WindTurbineType3IEC; - /* - Pitch angle control model. Reference: IEC 61400-27-1:2015, 5.6.5.2. - */ + /** \brief Pitch angle control model. Reference: IEC 61400-27-1:2015, 5.6.5.2. */ class WindContPitchAngleIEC : public IdentifiedObject { public: @@ -31,17 +29,38 @@ namespace CIMPP WindContPitchAngleIEC(); ~WindContPitchAngleIEC() override; - CIMPP::WindTurbineType3IEC* WindTurbineType3IEC; /* Wind turbine type 3 model with which this pitch control model is associated. Default: 0 */ - CIMPP::Float dthetamax; /* Maximum pitch positive ramp rate (<i>dtheta</i><i><sub>max</sub></i>) (&gt; WindContPitchAngleIEC.dthetamin). It is a type-dependent parameter. Unit = degrees / s. Default: 0.0 */ - CIMPP::Float dthetamin; /* Maximum pitch negative ramp rate (<i>dtheta</i><i><sub>min</sub></i><i>)</i> (&lt; WindContPitchAngleIEC.dthetamax). It is a type-dependent parameter. Unit = degrees / s. Default: 0.0 */ - CIMPP::PU kic; /* Power PI controller integration gain (<i>K</i><i><sub>Ic</sub></i>). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU kiomega; /* Speed PI controller integration gain (<i>K</i><i><sub>Iomega</sub></i>). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU kpc; /* Power PI controller proportional gain (<i>K</i><i><sub>Pc</sub></i>). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU kpomega; /* Speed PI controller proportional gain (<i>K</i><i><sub>Pomega</sub></i>). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU kpx; /* Pitch cross coupling gain (<i>K</i><i><sub>PX</sub></i>). It is a type-dependent parameter. Default: nullptr */ - CIMPP::AngleDegrees thetamax; /* Maximum pitch angle (<i>theta</i><i><sub>max</sub></i>) (&gt; WindContPitchAngleIEC.thetamin). It is a type-dependent parameter. Default: nullptr */ - CIMPP::AngleDegrees thetamin; /* Minimum pitch angle (<i>theta</i><i><sub>min</sub></i>) (&lt; WindContPitchAngleIEC.thetamax). It is a type-dependent parameter. Default: nullptr */ - CIMPP::Seconds ttheta; /* Pitch time constant (<i>ttheta</i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ + /** \brief Wind turbine type 3 model with which this pitch control model is associated. Default: 0 */ + CIMPP::WindTurbineType3IEC* WindTurbineType3IEC; + + /** \brief Maximum pitch positive ramp rate (<i>dtheta</i><i><sub>max</sub></i>) (&gt; WindContPitchAngleIEC.dthetamin). It is a type-dependent parameter. Unit = degrees / s. Default: 0.0 */ + CIMPP::Float dthetamax; + + /** \brief Maximum pitch negative ramp rate (<i>dtheta</i><i><sub>min</sub></i><i>)</i> (&lt; WindContPitchAngleIEC.dthetamax). It is a type-dependent parameter. Unit = degrees / s. Default: 0.0 */ + CIMPP::Float dthetamin; + + /** \brief Power PI controller integration gain (<i>K</i><i><sub>Ic</sub></i>). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU kic; + + /** \brief Speed PI controller integration gain (<i>K</i><i><sub>Iomega</sub></i>). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU kiomega; + + /** \brief Power PI controller proportional gain (<i>K</i><i><sub>Pc</sub></i>). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU kpc; + + /** \brief Speed PI controller proportional gain (<i>K</i><i><sub>Pomega</sub></i>). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU kpomega; + + /** \brief Pitch cross coupling gain (<i>K</i><i><sub>PX</sub></i>). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU kpx; + + /** \brief Maximum pitch angle (<i>theta</i><i><sub>max</sub></i>) (&gt; WindContPitchAngleIEC.thetamin). It is a type-dependent parameter. Default: nullptr */ + CIMPP::AngleDegrees thetamax; + + /** \brief Minimum pitch angle (<i>theta</i><i><sub>min</sub></i>) (&lt; WindContPitchAngleIEC.thetamax). It is a type-dependent parameter. Default: nullptr */ + CIMPP::AngleDegrees thetamin; + + /** \brief Pitch time constant (<i>ttheta</i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ + CIMPP::Seconds ttheta; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindContQIEC.cpp b/CGMES_3.0.0/WindContQIEC.cpp index ed836bbce..f8e48bde6 100644 --- a/CGMES_3.0.0/WindContQIEC.cpp +++ b/CGMES_3.0.0/WindContQIEC.cpp @@ -9,34 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "WindTurbineType3or4IEC.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "WindQcontrolModeKind.hpp" -#include "WindUVRTQcontrolModeKind.hpp" -#include "PU.hpp" using namespace CIMPP; -WindContQIEC::WindContQIEC() : WindTurbineType3or4IEC(nullptr) {}; -WindContQIEC::~WindContQIEC() {}; +WindContQIEC::WindContQIEC() : WindTurbineType3or4IEC(nullptr) {} +WindContQIEC::~WindContQIEC() {} static const std::list PossibleProfilesForClass = { @@ -86,327 +63,350 @@ WindContQIEC::getPossibleProfilesForAttributes() const return map; } +bool assign_WindTurbineType3or4IEC_WIndContQIEC(BaseClass*, BaseClass*); +bool assign_WindContQIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType3or4IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindTurbineType3or4IEC != element2) + { + element->WindTurbineType3or4IEC = element2; + return assign_WindTurbineType3or4IEC_WIndContQIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_WindContQIEC_iqh1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_iqh1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->iqh1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_iqmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_iqmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->iqmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_iqmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_iqmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->iqmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_iqpost(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_iqpost(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->iqpost; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_kiq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_kiq(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kiq; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_kiu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_kiu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kiu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_kpq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_kpq(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpq; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_kpu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_kpu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_kqv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_kqv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kqv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_rdroop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_rdroop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->rdroop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_tpfiltq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_tpfiltq(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpfiltq; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_tpost(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_tpost(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpost; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_tqord(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_tqord(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tqord; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_tufiltq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_tufiltq(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tufiltq; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_udb1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_udb1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->udb1; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_udb2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_udb2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->udb2; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_umax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_umax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->umax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_umin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_umin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->umin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_uqdip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_uqdip(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uqdip; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_uref0(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_uref0(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uref0; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_windQcontrolModesType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_windQcontrolModesType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->windQcontrolModesType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContQIEC_windUVRTQcontrolModesType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQIEC_windUVRTQcontrolModesType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->windUVRTQcontrolModesType; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_WindContQIEC_xdroop(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->xdroop; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindTurbineType3or4IEC_WIndContQIEC(BaseClass*, BaseClass*); -bool assign_WindContQIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindContQIEC_xdroop(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindContQIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType3or4IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType3or4IEC != element2) + buffer >> element->xdroop; + if (!buffer.fail()) { - element->WindTurbineType3or4IEC = element2; - return assign_WindTurbineType3or4IEC_WIndContQIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_WindContQIEC_iqh1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->iqh1; if (!buffer.str().empty()) @@ -420,7 +420,8 @@ bool get_WindContQIEC_iqh1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_WindContQIEC_iqmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->iqmax; if (!buffer.str().empty()) @@ -434,7 +435,8 @@ bool get_WindContQIEC_iqmax(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_WindContQIEC_iqmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->iqmin; if (!buffer.str().empty()) @@ -448,7 +450,8 @@ bool get_WindContQIEC_iqmin(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_WindContQIEC_iqpost(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->iqpost; if (!buffer.str().empty()) @@ -462,7 +465,8 @@ bool get_WindContQIEC_iqpost(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_WindContQIEC_kiq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kiq; if (!buffer.str().empty()) @@ -476,7 +480,8 @@ bool get_WindContQIEC_kiq(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_WindContQIEC_kiu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kiu; if (!buffer.str().empty()) @@ -490,7 +495,8 @@ bool get_WindContQIEC_kiu(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_WindContQIEC_kpq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpq; if (!buffer.str().empty()) @@ -504,7 +510,8 @@ bool get_WindContQIEC_kpq(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_WindContQIEC_kpu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpu; if (!buffer.str().empty()) @@ -518,7 +525,8 @@ bool get_WindContQIEC_kpu(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_WindContQIEC_kqv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kqv; if (!buffer.str().empty()) @@ -532,7 +540,8 @@ bool get_WindContQIEC_kqv(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_WindContQIEC_rdroop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rdroop; if (!buffer.str().empty()) @@ -546,7 +555,8 @@ bool get_WindContQIEC_rdroop(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_WindContQIEC_tpfiltq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpfiltq; if (!buffer.str().empty()) @@ -560,7 +570,8 @@ bool get_WindContQIEC_tpfiltq(const BaseClass* BaseClass_ptr1, std::stringstream bool get_WindContQIEC_tpost(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpost; if (!buffer.str().empty()) @@ -574,7 +585,8 @@ bool get_WindContQIEC_tpost(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_WindContQIEC_tqord(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tqord; if (!buffer.str().empty()) @@ -588,7 +600,8 @@ bool get_WindContQIEC_tqord(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_WindContQIEC_tufiltq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tufiltq; if (!buffer.str().empty()) @@ -602,7 +615,8 @@ bool get_WindContQIEC_tufiltq(const BaseClass* BaseClass_ptr1, std::stringstream bool get_WindContQIEC_udb1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->udb1; if (!buffer.str().empty()) @@ -616,7 +630,8 @@ bool get_WindContQIEC_udb1(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_WindContQIEC_udb2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->udb2; if (!buffer.str().empty()) @@ -630,7 +645,8 @@ bool get_WindContQIEC_udb2(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_WindContQIEC_umax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->umax; if (!buffer.str().empty()) @@ -644,7 +660,8 @@ bool get_WindContQIEC_umax(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_WindContQIEC_umin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->umin; if (!buffer.str().empty()) @@ -658,7 +675,8 @@ bool get_WindContQIEC_umin(const BaseClass* BaseClass_ptr1, std::stringstream& b bool get_WindContQIEC_uqdip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uqdip; if (!buffer.str().empty()) @@ -672,7 +690,8 @@ bool get_WindContQIEC_uqdip(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_WindContQIEC_uref0(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uref0; if (!buffer.str().empty()) @@ -684,11 +703,12 @@ bool get_WindContQIEC_uref0(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } -bool get_WindContQIEC_xdroop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_WindContQIEC_windQcontrolModesType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xdroop; + buffer << element->windQcontrolModesType; if (!buffer.str().empty()) { return true; @@ -698,13 +718,12 @@ bool get_WindContQIEC_xdroop(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - -bool get_WindContQIEC_windQcontrolModesType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_WindContQIEC_windUVRTQcontrolModesType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->windQcontrolModesType; + buffer << element->windUVRTQcontrolModesType; if (!buffer.str().empty()) { return true; @@ -714,11 +733,12 @@ bool get_WindContQIEC_windQcontrolModesType(const BaseClass* BaseClass_ptr1, std return false; } -bool get_WindContQIEC_windUVRTQcontrolModesType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_WindContQIEC_xdroop(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->windUVRTQcontrolModesType; + buffer << element->xdroop; if (!buffer.str().empty()) { return true; @@ -736,39 +756,39 @@ const char* WindContQIEC::debugString() const void WindContQIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindContQIEC"), &WindContQIEC_factory)); + factory_map.emplace("cim:WindContQIEC", &WindContQIEC_factory); } void WindContQIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.iqh1"), &assign_WindContQIEC_iqh1)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.iqmax"), &assign_WindContQIEC_iqmax)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.iqmin"), &assign_WindContQIEC_iqmin)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.iqpost"), &assign_WindContQIEC_iqpost)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.kiq"), &assign_WindContQIEC_kiq)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.kiu"), &assign_WindContQIEC_kiu)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.kpq"), &assign_WindContQIEC_kpq)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.kpu"), &assign_WindContQIEC_kpu)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.kqv"), &assign_WindContQIEC_kqv)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.rdroop"), &assign_WindContQIEC_rdroop)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.tpfiltq"), &assign_WindContQIEC_tpfiltq)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.tpost"), &assign_WindContQIEC_tpost)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.tqord"), &assign_WindContQIEC_tqord)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.tufiltq"), &assign_WindContQIEC_tufiltq)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.udb1"), &assign_WindContQIEC_udb1)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.udb2"), &assign_WindContQIEC_udb2)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.umax"), &assign_WindContQIEC_umax)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.umin"), &assign_WindContQIEC_umin)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.uqdip"), &assign_WindContQIEC_uqdip)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.uref0"), &assign_WindContQIEC_uref0)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.windQcontrolModesType"), &assign_WindContQIEC_windQcontrolModesType)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.windUVRTQcontrolModesType"), &assign_WindContQIEC_windUVRTQcontrolModesType)); - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.xdroop"), &assign_WindContQIEC_xdroop)); + assign_map.emplace("cim:WindContQIEC.iqh1", &assign_WindContQIEC_iqh1); + assign_map.emplace("cim:WindContQIEC.iqmax", &assign_WindContQIEC_iqmax); + assign_map.emplace("cim:WindContQIEC.iqmin", &assign_WindContQIEC_iqmin); + assign_map.emplace("cim:WindContQIEC.iqpost", &assign_WindContQIEC_iqpost); + assign_map.emplace("cim:WindContQIEC.kiq", &assign_WindContQIEC_kiq); + assign_map.emplace("cim:WindContQIEC.kiu", &assign_WindContQIEC_kiu); + assign_map.emplace("cim:WindContQIEC.kpq", &assign_WindContQIEC_kpq); + assign_map.emplace("cim:WindContQIEC.kpu", &assign_WindContQIEC_kpu); + assign_map.emplace("cim:WindContQIEC.kqv", &assign_WindContQIEC_kqv); + assign_map.emplace("cim:WindContQIEC.rdroop", &assign_WindContQIEC_rdroop); + assign_map.emplace("cim:WindContQIEC.tpfiltq", &assign_WindContQIEC_tpfiltq); + assign_map.emplace("cim:WindContQIEC.tpost", &assign_WindContQIEC_tpost); + assign_map.emplace("cim:WindContQIEC.tqord", &assign_WindContQIEC_tqord); + assign_map.emplace("cim:WindContQIEC.tufiltq", &assign_WindContQIEC_tufiltq); + assign_map.emplace("cim:WindContQIEC.udb1", &assign_WindContQIEC_udb1); + assign_map.emplace("cim:WindContQIEC.udb2", &assign_WindContQIEC_udb2); + assign_map.emplace("cim:WindContQIEC.umax", &assign_WindContQIEC_umax); + assign_map.emplace("cim:WindContQIEC.umin", &assign_WindContQIEC_umin); + assign_map.emplace("cim:WindContQIEC.uqdip", &assign_WindContQIEC_uqdip); + assign_map.emplace("cim:WindContQIEC.uref0", &assign_WindContQIEC_uref0); + assign_map.emplace("cim:WindContQIEC.windQcontrolModesType", &assign_WindContQIEC_windQcontrolModesType); + assign_map.emplace("cim:WindContQIEC.windUVRTQcontrolModesType", &assign_WindContQIEC_windUVRTQcontrolModesType); + assign_map.emplace("cim:WindContQIEC.xdroop", &assign_WindContQIEC_xdroop); } void WindContQIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContQIEC.WindTurbineType3or4IEC"), &assign_WindContQIEC_WindTurbineType3or4IEC)); + assign_map.emplace("cim:WindContQIEC.WindTurbineType3or4IEC", &assign_WindContQIEC_WindTurbineType3or4IEC); } void WindContQIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindContQIEC.hpp b/CGMES_3.0.0/WindContQIEC.hpp index e32a2cf6d..a57caf3a0 100644 --- a/CGMES_3.0.0/WindContQIEC.hpp +++ b/CGMES_3.0.0/WindContQIEC.hpp @@ -21,9 +21,7 @@ namespace CIMPP { class WindTurbineType3or4IEC; - /* - Q control model. Reference: IEC 61400-27-1:2015, 5.6.5.7. - */ + /** \brief Q control model. Reference: IEC 61400-27-1:2015, 5.6.5.7. */ class WindContQIEC : public IdentifiedObject { public: @@ -31,30 +29,77 @@ namespace CIMPP WindContQIEC(); ~WindContQIEC() override; - CIMPP::WindTurbineType3or4IEC* WindTurbineType3or4IEC; /* Wind turbine type 3 or type 4 model with which this reactive control model is associated. Default: 0 */ - CIMPP::PU iqh1; /* Maximum reactive current injection during dip (<i>i</i><i><sub>qh1</sub></i>). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU iqmax; /* Maximum reactive current injection (<i>i</i><i><sub>qmax</sub></i>) (&gt; WindContQIEC.iqmin). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU iqmin; /* Minimum reactive current injection (<i>i</i><i><sub>qmin</sub></i>) (&lt; WindContQIEC.iqmax). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU iqpost; /* Post fault reactive current injection (<i>i</i><i><sub>qpost</sub></i>). It is a project-dependent parameter. Default: nullptr */ - CIMPP::PU kiq; /* Reactive power PI controller integration gain (<i>K</i><i><sub>I,q</sub></i>). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU kiu; /* Voltage PI controller integration gain (<i>K</i><i><sub>I,u</sub></i>). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU kpq; /* Reactive power PI controller proportional gain (<i>K</i><i><sub>P,q</sub></i>). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU kpu; /* Voltage PI controller proportional gain (<i>K</i><i><sub>P,u</sub></i>). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU kqv; /* Voltage scaling factor for UVRT current (<i>K</i><i><sub>qv</sub></i>). It is a project-dependent parameter. Default: nullptr */ - CIMPP::PU rdroop; /* Resistive component of voltage drop impedance (<i>r</i><i><sub>droop</sub></i>) (&gt;= 0). It is a project-dependent parameter. Default: nullptr */ - CIMPP::Seconds tpfiltq; /* Power measurement filter time constant (<i>T</i><i><sub>pfiltq</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ - CIMPP::Seconds tpost; /* Length of time period where post fault reactive power is injected (<i>T</i><i><sub>post</sub></i>) (&gt;= 0). It is a project-dependent parameter. Default: nullptr */ - CIMPP::Seconds tqord; /* Time constant in reactive power order lag (<i>T</i><i><sub>qord</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ - CIMPP::Seconds tufiltq; /* Voltage measurement filter time constant (<i>T</i><i><sub>ufiltq</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU udb1; /* Voltage deadband lower limit (<i>u</i><i><sub>db1</sub></i>). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU udb2; /* Voltage deadband upper limit (<i>u</i><i><sub>db2</sub></i>). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU umax; /* Maximum voltage in voltage PI controller integral term (<i>u</i><i><sub>max</sub></i>) (&gt; WindContQIEC.umin). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU umin; /* Minimum voltage in voltage PI controller integral term (<i>u</i><i><sub>min</sub></i>) (&lt; WindContQIEC.umax). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU uqdip; /* Voltage threshold for UVRT detection in Q control (<i>u</i><i><sub>qdip</sub></i>). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU uref0; /* User-defined bias in voltage reference (<i>u</i><i><sub>ref0</sub></i>). It is a case-dependent parameter. Default: nullptr */ - CIMPP::WindQcontrolModeKind windQcontrolModesType; /* Types of general wind turbine Q control modes (<i>M</i><i><sub>qG</sub></i>). It is a project-dependent parameter. Default: 0 */ - CIMPP::WindUVRTQcontrolModeKind windUVRTQcontrolModesType; /* Types of UVRT Q control modes (<i>M</i><i><sub>qUVRT</sub></i>). It is a project-dependent parameter. Default: 0 */ - CIMPP::PU xdroop; /* Inductive component of voltage drop impedance (<i>x</i><i><sub>droop</sub></i>) (&gt;= 0). It is a project-dependent parameter. Default: nullptr */ + /** \brief Wind turbine type 3 or type 4 model with which this reactive control model is associated. Default: 0 */ + CIMPP::WindTurbineType3or4IEC* WindTurbineType3or4IEC; + + /** \brief Maximum reactive current injection during dip (<i>i</i><i><sub>qh1</sub></i>). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU iqh1; + + /** \brief Maximum reactive current injection (<i>i</i><i><sub>qmax</sub></i>) (&gt; WindContQIEC.iqmin). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU iqmax; + + /** \brief Minimum reactive current injection (<i>i</i><i><sub>qmin</sub></i>) (&lt; WindContQIEC.iqmax). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU iqmin; + + /** \brief Post fault reactive current injection (<i>i</i><i><sub>qpost</sub></i>). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU iqpost; + + /** \brief Reactive power PI controller integration gain (<i>K</i><i><sub>I,q</sub></i>). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU kiq; + + /** \brief Voltage PI controller integration gain (<i>K</i><i><sub>I,u</sub></i>). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU kiu; + + /** \brief Reactive power PI controller proportional gain (<i>K</i><i><sub>P,q</sub></i>). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU kpq; + + /** \brief Voltage PI controller proportional gain (<i>K</i><i><sub>P,u</sub></i>). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU kpu; + + /** \brief Voltage scaling factor for UVRT current (<i>K</i><i><sub>qv</sub></i>). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU kqv; + + /** \brief Resistive component of voltage drop impedance (<i>r</i><i><sub>droop</sub></i>) (&gt;= 0). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU rdroop; + + /** \brief Power measurement filter time constant (<i>T</i><i><sub>pfiltq</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ + CIMPP::Seconds tpfiltq; + + /** \brief Length of time period where post fault reactive power is injected (<i>T</i><i><sub>post</sub></i>) (&gt;= 0). It is a project-dependent parameter. Default: nullptr */ + CIMPP::Seconds tpost; + + /** \brief Time constant in reactive power order lag (<i>T</i><i><sub>qord</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ + CIMPP::Seconds tqord; + + /** \brief Voltage measurement filter time constant (<i>T</i><i><sub>ufiltq</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ + CIMPP::Seconds tufiltq; + + /** \brief Voltage deadband lower limit (<i>u</i><i><sub>db1</sub></i>). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU udb1; + + /** \brief Voltage deadband upper limit (<i>u</i><i><sub>db2</sub></i>). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU udb2; + + /** \brief Maximum voltage in voltage PI controller integral term (<i>u</i><i><sub>max</sub></i>) (&gt; WindContQIEC.umin). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU umax; + + /** \brief Minimum voltage in voltage PI controller integral term (<i>u</i><i><sub>min</sub></i>) (&lt; WindContQIEC.umax). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU umin; + + /** \brief Voltage threshold for UVRT detection in Q control (<i>u</i><i><sub>qdip</sub></i>). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU uqdip; + + /** \brief User-defined bias in voltage reference (<i>u</i><i><sub>ref0</sub></i>). It is a case-dependent parameter. Default: nullptr */ + CIMPP::PU uref0; + + /** \brief Types of general wind turbine Q control modes (<i>M</i><i><sub>qG</sub></i>). It is a project-dependent parameter. Default: 0 */ + CIMPP::WindQcontrolModeKind windQcontrolModesType; + + /** \brief Types of UVRT Q control modes (<i>M</i><i><sub>qUVRT</sub></i>). It is a project-dependent parameter. Default: 0 */ + CIMPP::WindUVRTQcontrolModeKind windUVRTQcontrolModesType; + + /** \brief Inductive component of voltage drop impedance (<i>x</i><i><sub>droop</sub></i>) (&gt;= 0). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU xdroop; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindContQLimIEC.cpp b/CGMES_3.0.0/WindContQLimIEC.cpp index 1ff8210cb..9da0270a9 100644 --- a/CGMES_3.0.0/WindContQLimIEC.cpp +++ b/CGMES_3.0.0/WindContQLimIEC.cpp @@ -9,13 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "WindTurbineType3or4IEC.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -WindContQLimIEC::WindContQLimIEC() : WindTurbineType3or4IEC(nullptr) {}; -WindContQLimIEC::~WindContQLimIEC() {}; +WindContQLimIEC::WindContQLimIEC() : WindTurbineType3or4IEC(nullptr) {} +WindContQLimIEC::~WindContQLimIEC() {} static const std::list PossibleProfilesForClass = { @@ -44,54 +42,56 @@ WindContQLimIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindContQLimIEC_qmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType3or4IEC_WindContQLimIEC(BaseClass*, BaseClass*); +bool assign_WindContQLimIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindContQLimIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQLimIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType3or4IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->qmax; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType3or4IEC != element2) + { + element->WindTurbineType3or4IEC = element2; + return assign_WindTurbineType3or4IEC_WindContQLimIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindContQLimIEC_qmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContQLimIEC_qmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContQLimIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContQLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->qmin; - if (buffer.fail()) - return false; - else + buffer >> element->qmax; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindTurbineType3or4IEC_WindContQLimIEC(BaseClass*, BaseClass*); -bool assign_WindContQLimIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindContQLimIEC_qmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindContQLimIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType3or4IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType3or4IEC != element2) + buffer >> element->qmin; + if (!buffer.fail()) { - element->WindTurbineType3or4IEC = element2; - return assign_WindTurbineType3or4IEC_WindContQLimIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_WindContQLimIEC_qmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQLimIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qmax; if (!buffer.str().empty()) @@ -105,7 +105,8 @@ bool get_WindContQLimIEC_qmax(const BaseClass* BaseClass_ptr1, std::stringstream bool get_WindContQLimIEC_qmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQLimIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQLimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->qmin; if (!buffer.str().empty()) @@ -117,8 +118,6 @@ bool get_WindContQLimIEC_qmin(const BaseClass* BaseClass_ptr1, std::stringstream return false; } - - const char WindContQLimIEC::debugName[] = "WindContQLimIEC"; const char* WindContQLimIEC::debugString() const { @@ -127,18 +126,18 @@ const char* WindContQLimIEC::debugString() const void WindContQLimIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindContQLimIEC"), &WindContQLimIEC_factory)); + factory_map.emplace("cim:WindContQLimIEC", &WindContQLimIEC_factory); } void WindContQLimIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContQLimIEC.qmax"), &assign_WindContQLimIEC_qmax)); - assign_map.insert(std::make_pair(std::string("cim:WindContQLimIEC.qmin"), &assign_WindContQLimIEC_qmin)); + assign_map.emplace("cim:WindContQLimIEC.qmax", &assign_WindContQLimIEC_qmax); + assign_map.emplace("cim:WindContQLimIEC.qmin", &assign_WindContQLimIEC_qmin); } void WindContQLimIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContQLimIEC.WindTurbineType3or4IEC"), &assign_WindContQLimIEC_WindTurbineType3or4IEC)); + assign_map.emplace("cim:WindContQLimIEC.WindTurbineType3or4IEC", &assign_WindContQLimIEC_WindTurbineType3or4IEC); } void WindContQLimIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindContQLimIEC.hpp b/CGMES_3.0.0/WindContQLimIEC.hpp index 58a0756fa..a719ffa3e 100644 --- a/CGMES_3.0.0/WindContQLimIEC.hpp +++ b/CGMES_3.0.0/WindContQLimIEC.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class WindTurbineType3or4IEC; - /* - Constant Q limitation model. Reference: IEC 61400-27-1:2015, 5.6.5.9. - */ + /** \brief Constant Q limitation model. Reference: IEC 61400-27-1:2015, 5.6.5.9. */ class WindContQLimIEC : public IdentifiedObject { public: @@ -28,9 +26,14 @@ namespace CIMPP WindContQLimIEC(); ~WindContQLimIEC() override; - CIMPP::WindTurbineType3or4IEC* WindTurbineType3or4IEC; /* Wind generator type 3 or type 4 model with which this constant Q limitation model is associated. Default: 0 */ - CIMPP::PU qmax; /* Maximum reactive power (<i>q</i><i><sub>max</sub></i>) (&gt; WindContQLimIEC.qmin). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU qmin; /* Minimum reactive power (<i>q</i><i><sub>min</sub></i>) (&lt; WindContQLimIEC.qmax). It is a type-dependent parameter. Default: nullptr */ + /** \brief Wind generator type 3 or type 4 model with which this constant Q limitation model is associated. Default: 0 */ + CIMPP::WindTurbineType3or4IEC* WindTurbineType3or4IEC; + + /** \brief Maximum reactive power (<i>q</i><i><sub>max</sub></i>) (&gt; WindContQLimIEC.qmin). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU qmax; + + /** \brief Minimum reactive power (<i>q</i><i><sub>min</sub></i>) (&lt; WindContQLimIEC.qmax). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU qmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindContQPQULimIEC.cpp b/CGMES_3.0.0/WindContQPQULimIEC.cpp index d5f14d620..c72457faa 100644 --- a/CGMES_3.0.0/WindContQPQULimIEC.cpp +++ b/CGMES_3.0.0/WindContQPQULimIEC.cpp @@ -10,13 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindDynamicsLookupTable.hpp" #include "WindTurbineType3or4IEC.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -WindContQPQULimIEC::WindContQPQULimIEC() : WindTurbineType3or4IEC(nullptr) {}; -WindContQPQULimIEC::~WindContQPQULimIEC() {}; +WindContQPQULimIEC::WindContQPQULimIEC() : WindTurbineType3or4IEC(nullptr) {} +WindContQPQULimIEC::~WindContQPQULimIEC() {} static const std::list PossibleProfilesForClass = { @@ -46,34 +44,6 @@ WindContQPQULimIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindContQPQULimIEC_tpfiltql(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindContQPQULimIEC* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->tpfiltql; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_WindContQPQULimIEC_tufiltql(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindContQPQULimIEC* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->tufiltql; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_WindDynamicsLookupTable_WindContQPQULimIEC(BaseClass*, BaseClass*); bool assign_WindContQPQULimIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -90,6 +60,7 @@ bool assign_WindContQPQULimIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1 } return false; } + bool assign_WindTurbineType3or4IEC_WindContQPQULimIEC(BaseClass*, BaseClass*); bool assign_WindContQPQULimIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -107,9 +78,40 @@ bool assign_WindContQPQULimIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, return false; } +bool assign_WindContQPQULimIEC_tpfiltql(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + WindContQPQULimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->tpfiltql; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + +bool assign_WindContQPQULimIEC_tufiltql(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + WindContQPQULimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->tufiltql; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + + bool get_WindContQPQULimIEC_tpfiltql(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQPQULimIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQPQULimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpfiltql; if (!buffer.str().empty()) @@ -123,7 +125,8 @@ bool get_WindContQPQULimIEC_tpfiltql(const BaseClass* BaseClass_ptr1, std::strin bool get_WindContQPQULimIEC_tufiltql(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContQPQULimIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContQPQULimIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tufiltql; if (!buffer.str().empty()) @@ -135,8 +138,6 @@ bool get_WindContQPQULimIEC_tufiltql(const BaseClass* BaseClass_ptr1, std::strin return false; } - - const char WindContQPQULimIEC::debugName[] = "WindContQPQULimIEC"; const char* WindContQPQULimIEC::debugString() const { @@ -145,19 +146,19 @@ const char* WindContQPQULimIEC::debugString() const void WindContQPQULimIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindContQPQULimIEC"), &WindContQPQULimIEC_factory)); + factory_map.emplace("cim:WindContQPQULimIEC", &WindContQPQULimIEC_factory); } void WindContQPQULimIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContQPQULimIEC.tpfiltql"), &assign_WindContQPQULimIEC_tpfiltql)); - assign_map.insert(std::make_pair(std::string("cim:WindContQPQULimIEC.tufiltql"), &assign_WindContQPQULimIEC_tufiltql)); + assign_map.emplace("cim:WindContQPQULimIEC.tpfiltql", &assign_WindContQPQULimIEC_tpfiltql); + assign_map.emplace("cim:WindContQPQULimIEC.tufiltql", &assign_WindContQPQULimIEC_tufiltql); } void WindContQPQULimIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContQPQULimIEC.WindDynamicsLookupTable"), &assign_WindContQPQULimIEC_WindDynamicsLookupTable)); - assign_map.insert(std::make_pair(std::string("cim:WindContQPQULimIEC.WindTurbineType3or4IEC"), &assign_WindContQPQULimIEC_WindTurbineType3or4IEC)); + assign_map.emplace("cim:WindContQPQULimIEC.WindDynamicsLookupTable", &assign_WindContQPQULimIEC_WindDynamicsLookupTable); + assign_map.emplace("cim:WindContQPQULimIEC.WindTurbineType3or4IEC", &assign_WindContQPQULimIEC_WindTurbineType3or4IEC); } void WindContQPQULimIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindContQPQULimIEC.hpp b/CGMES_3.0.0/WindContQPQULimIEC.hpp index e5ba575b2..07eb8de88 100644 --- a/CGMES_3.0.0/WindContQPQULimIEC.hpp +++ b/CGMES_3.0.0/WindContQPQULimIEC.hpp @@ -19,9 +19,7 @@ namespace CIMPP class WindDynamicsLookupTable; class WindTurbineType3or4IEC; - /* - QP and QU limitation model. Reference: IEC 61400-27-1:2015, 5.6.5.10. - */ + /** \brief QP and QU limitation model. Reference: IEC 61400-27-1:2015, 5.6.5.10. */ class WindContQPQULimIEC : public IdentifiedObject { public: @@ -29,10 +27,17 @@ namespace CIMPP WindContQPQULimIEC(); ~WindContQPQULimIEC() override; - std::list WindDynamicsLookupTable; /* The wind dynamics lookup table associated with this QP and QU limitation model. Default: 0 */ - CIMPP::WindTurbineType3or4IEC* WindTurbineType3or4IEC; /* Wind generator type 3 or type 4 model with which this QP and QU limitation model is associated. Default: 0 */ - CIMPP::Seconds tpfiltql; /* Power measurement filter time constant for Q capacity (<i>T</i><i><sub>pfiltql</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ - CIMPP::Seconds tufiltql; /* Voltage measurement filter time constant for Q capacity (<i>T</i><i><sub>ufiltql</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ + /** \brief The wind dynamics lookup table associated with this QP and QU limitation model. Default: 0 */ + std::list WindDynamicsLookupTable; + + /** \brief Wind generator type 3 or type 4 model with which this QP and QU limitation model is associated. Default: 0 */ + CIMPP::WindTurbineType3or4IEC* WindTurbineType3or4IEC; + + /** \brief Power measurement filter time constant for Q capacity (<i>T</i><i><sub>pfiltql</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ + CIMPP::Seconds tpfiltql; + + /** \brief Voltage measurement filter time constant for Q capacity (<i>T</i><i><sub>ufiltql</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ + CIMPP::Seconds tufiltql; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindContRotorRIEC.cpp b/CGMES_3.0.0/WindContRotorRIEC.cpp index 7bfe8d1dc..6d57f58a7 100644 --- a/CGMES_3.0.0/WindContRotorRIEC.cpp +++ b/CGMES_3.0.0/WindContRotorRIEC.cpp @@ -10,19 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindDynamicsLookupTable.hpp" #include "WindGenTurbineType2IEC.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -WindContRotorRIEC::WindContRotorRIEC() : WindGenTurbineType2IEC(nullptr) {}; -WindContRotorRIEC::~WindContRotorRIEC() {}; +WindContRotorRIEC::WindContRotorRIEC() : WindGenTurbineType2IEC(nullptr) {} +WindContRotorRIEC::~WindContRotorRIEC() {} static const std::list PossibleProfilesForClass = { @@ -58,148 +50,158 @@ WindContRotorRIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindContRotorRIEC_kirr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindDynamicsLookupTable_WindContRotorRIEC(BaseClass*, BaseClass*); +bool assign_WindContRotorRIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->kirr; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) + { + element->WindDynamicsLookupTable.push_back(element2); + return assign_WindDynamicsLookupTable_WindContRotorRIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindContRotorRIEC_komegafilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType2IEC_WindContRotorRIEC(BaseClass*, BaseClass*); +bool assign_WindContRotorRIEC_WindGenTurbineType2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + WindGenTurbineType2IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->komegafilt; - if (buffer.fail()) - return false; - else - return true; + if (element->WindGenTurbineType2IEC != element2) + { + element->WindGenTurbineType2IEC = element2; + return assign_WindGenTurbineType2IEC_WindContRotorRIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindContRotorRIEC_kpfilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContRotorRIEC_kirr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->kpfilt; - if (buffer.fail()) - return false; - else + buffer >> element->kirr; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContRotorRIEC_kprr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContRotorRIEC_komegafilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->kprr; - if (buffer.fail()) - return false; - else + buffer >> element->komegafilt; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContRotorRIEC_rmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContRotorRIEC_kpfilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->rmax; - if (buffer.fail()) - return false; - else + buffer >> element->kpfilt; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContRotorRIEC_rmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContRotorRIEC_kprr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->rmin; - if (buffer.fail()) - return false; - else + buffer >> element->kprr; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContRotorRIEC_tomegafiltrr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContRotorRIEC_rmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tomegafiltrr; - if (buffer.fail()) - return false; - else + buffer >> element->rmax; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindContRotorRIEC_tpfiltrr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindContRotorRIEC_rmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tpfiltrr; - if (buffer.fail()) - return false; - else + buffer >> element->rmin; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindDynamicsLookupTable_WindContRotorRIEC(BaseClass*, BaseClass*); -bool assign_WindContRotorRIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindContRotorRIEC_tomegafiltrr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); - WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) + buffer >> element->tomegafiltrr; + if (!buffer.fail()) { - element->WindDynamicsLookupTable.push_back(element2); - return assign_WindDynamicsLookupTable_WindContRotorRIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_WindGenTurbineType2IEC_WindContRotorRIEC(BaseClass*, BaseClass*); -bool assign_WindContRotorRIEC_WindGenTurbineType2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_WindContRotorRIEC_tpfiltrr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); - WindGenTurbineType2IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindGenTurbineType2IEC != element2) + buffer >> element->tpfiltrr; + if (!buffer.fail()) { - element->WindGenTurbineType2IEC = element2; - return assign_WindGenTurbineType2IEC_WindContRotorRIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + + bool get_WindContRotorRIEC_kirr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kirr; if (!buffer.str().empty()) @@ -213,7 +215,8 @@ bool get_WindContRotorRIEC_kirr(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindContRotorRIEC_komegafilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->komegafilt; if (!buffer.str().empty()) @@ -227,7 +230,8 @@ bool get_WindContRotorRIEC_komegafilt(const BaseClass* BaseClass_ptr1, std::stri bool get_WindContRotorRIEC_kpfilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpfilt; if (!buffer.str().empty()) @@ -241,7 +245,8 @@ bool get_WindContRotorRIEC_kpfilt(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindContRotorRIEC_kprr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kprr; if (!buffer.str().empty()) @@ -255,7 +260,8 @@ bool get_WindContRotorRIEC_kprr(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindContRotorRIEC_rmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rmax; if (!buffer.str().empty()) @@ -269,7 +275,8 @@ bool get_WindContRotorRIEC_rmax(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindContRotorRIEC_rmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->rmin; if (!buffer.str().empty()) @@ -283,7 +290,8 @@ bool get_WindContRotorRIEC_rmin(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindContRotorRIEC_tomegafiltrr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tomegafiltrr; if (!buffer.str().empty()) @@ -297,7 +305,8 @@ bool get_WindContRotorRIEC_tomegafiltrr(const BaseClass* BaseClass_ptr1, std::st bool get_WindContRotorRIEC_tpfiltrr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindContRotorRIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpfiltrr; if (!buffer.str().empty()) @@ -309,8 +318,6 @@ bool get_WindContRotorRIEC_tpfiltrr(const BaseClass* BaseClass_ptr1, std::string return false; } - - const char WindContRotorRIEC::debugName[] = "WindContRotorRIEC"; const char* WindContRotorRIEC::debugString() const { @@ -319,25 +326,25 @@ const char* WindContRotorRIEC::debugString() const void WindContRotorRIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC"), &WindContRotorRIEC_factory)); + factory_map.emplace("cim:WindContRotorRIEC", &WindContRotorRIEC_factory); } void WindContRotorRIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.kirr"), &assign_WindContRotorRIEC_kirr)); - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.komegafilt"), &assign_WindContRotorRIEC_komegafilt)); - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.kpfilt"), &assign_WindContRotorRIEC_kpfilt)); - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.kprr"), &assign_WindContRotorRIEC_kprr)); - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.rmax"), &assign_WindContRotorRIEC_rmax)); - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.rmin"), &assign_WindContRotorRIEC_rmin)); - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.tomegafiltrr"), &assign_WindContRotorRIEC_tomegafiltrr)); - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.tpfiltrr"), &assign_WindContRotorRIEC_tpfiltrr)); + assign_map.emplace("cim:WindContRotorRIEC.kirr", &assign_WindContRotorRIEC_kirr); + assign_map.emplace("cim:WindContRotorRIEC.komegafilt", &assign_WindContRotorRIEC_komegafilt); + assign_map.emplace("cim:WindContRotorRIEC.kpfilt", &assign_WindContRotorRIEC_kpfilt); + assign_map.emplace("cim:WindContRotorRIEC.kprr", &assign_WindContRotorRIEC_kprr); + assign_map.emplace("cim:WindContRotorRIEC.rmax", &assign_WindContRotorRIEC_rmax); + assign_map.emplace("cim:WindContRotorRIEC.rmin", &assign_WindContRotorRIEC_rmin); + assign_map.emplace("cim:WindContRotorRIEC.tomegafiltrr", &assign_WindContRotorRIEC_tomegafiltrr); + assign_map.emplace("cim:WindContRotorRIEC.tpfiltrr", &assign_WindContRotorRIEC_tpfiltrr); } void WindContRotorRIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.WindDynamicsLookupTable"), &assign_WindContRotorRIEC_WindDynamicsLookupTable)); - assign_map.insert(std::make_pair(std::string("cim:WindContRotorRIEC.WindGenTurbineType2IEC"), &assign_WindContRotorRIEC_WindGenTurbineType2IEC)); + assign_map.emplace("cim:WindContRotorRIEC.WindDynamicsLookupTable", &assign_WindContRotorRIEC_WindDynamicsLookupTable); + assign_map.emplace("cim:WindContRotorRIEC.WindGenTurbineType2IEC", &assign_WindContRotorRIEC_WindGenTurbineType2IEC); } void WindContRotorRIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindContRotorRIEC.hpp b/CGMES_3.0.0/WindContRotorRIEC.hpp index fedca8bcd..aa38dd601 100644 --- a/CGMES_3.0.0/WindContRotorRIEC.hpp +++ b/CGMES_3.0.0/WindContRotorRIEC.hpp @@ -21,9 +21,7 @@ namespace CIMPP class WindDynamicsLookupTable; class WindGenTurbineType2IEC; - /* - Rotor resistance control model. Reference: IEC 61400-27-1:2015, 5.6.5.3. - */ + /** \brief Rotor resistance control model. Reference: IEC 61400-27-1:2015, 5.6.5.3. */ class WindContRotorRIEC : public IdentifiedObject { public: @@ -31,16 +29,35 @@ namespace CIMPP WindContRotorRIEC(); ~WindContRotorRIEC() override; - std::list WindDynamicsLookupTable; /* The wind dynamics lookup table associated with this rotor resistance control model. Default: 0 */ - CIMPP::WindGenTurbineType2IEC* WindGenTurbineType2IEC; /* Wind turbine type 2 model with whitch this wind control rotor resistance model is associated. Default: 0 */ - CIMPP::PU kirr; /* Integral gain in rotor resistance PI controller (<i>K</i><i><sub>Irr</sub></i>). It is a type-dependent parameter. Default: nullptr */ - CIMPP::Float komegafilt; /* Filter gain for generator speed measurement (<i>K</i><i><sub>omegafilt</sub></i>). It is a type-dependent parameter. Default: 0.0 */ - CIMPP::Float kpfilt; /* Filter gain for power measurement (<i>K</i><i><sub>pfilt</sub></i>). It is a type-dependent parameter. Default: 0.0 */ - CIMPP::PU kprr; /* Proportional gain in rotor resistance PI controller (<i>K</i><i><sub>Prr</sub></i>). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU rmax; /* Maximum rotor resistance (<i>r</i><i><sub>max</sub></i>) (&gt; WindContRotorRIEC.rmin). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU rmin; /* Minimum rotor resistance (<i>r</i><i><sub>min</sub></i>) (&lt; WindContRotorRIEC.rmax). It is a type-dependent parameter. Default: nullptr */ - CIMPP::Seconds tomegafiltrr; /* Filter time constant for generator speed measurement (<i>T</i><i><sub>omegafiltrr</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ - CIMPP::Seconds tpfiltrr; /* Filter time constant for power measurement (<i>T</i><i><sub>pfiltrr</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ + /** \brief The wind dynamics lookup table associated with this rotor resistance control model. Default: 0 */ + std::list WindDynamicsLookupTable; + + /** \brief Wind turbine type 2 model with whitch this wind control rotor resistance model is associated. Default: 0 */ + CIMPP::WindGenTurbineType2IEC* WindGenTurbineType2IEC; + + /** \brief Integral gain in rotor resistance PI controller (<i>K</i><i><sub>Irr</sub></i>). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU kirr; + + /** \brief Filter gain for generator speed measurement (<i>K</i><i><sub>omegafilt</sub></i>). It is a type-dependent parameter. Default: 0.0 */ + CIMPP::Float komegafilt; + + /** \brief Filter gain for power measurement (<i>K</i><i><sub>pfilt</sub></i>). It is a type-dependent parameter. Default: 0.0 */ + CIMPP::Float kpfilt; + + /** \brief Proportional gain in rotor resistance PI controller (<i>K</i><i><sub>Prr</sub></i>). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU kprr; + + /** \brief Maximum rotor resistance (<i>r</i><i><sub>max</sub></i>) (&gt; WindContRotorRIEC.rmin). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU rmax; + + /** \brief Minimum rotor resistance (<i>r</i><i><sub>min</sub></i>) (&lt; WindContRotorRIEC.rmax). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU rmin; + + /** \brief Filter time constant for generator speed measurement (<i>T</i><i><sub>omegafiltrr</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ + CIMPP::Seconds tomegafiltrr; + + /** \brief Filter time constant for power measurement (<i>T</i><i><sub>pfiltrr</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ + CIMPP::Seconds tpfiltrr; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindDynamicsLookupTable.cpp b/CGMES_3.0.0/WindDynamicsLookupTable.cpp index 66f3a1305..56162c71f 100644 --- a/CGMES_3.0.0/WindDynamicsLookupTable.cpp +++ b/CGMES_3.0.0/WindDynamicsLookupTable.cpp @@ -17,15 +17,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindPlantFreqPcontrolIEC.hpp" #include "WindPlantReactiveControlIEC.hpp" #include "WindProtectionIEC.hpp" -#include "Float.hpp" -#include "WindLookupTableFunctionKind.hpp" -#include "Float.hpp" -#include "Integer.hpp" using namespace CIMPP; -WindDynamicsLookupTable::WindDynamicsLookupTable() : WindContCurrLimIEC(nullptr), WindContPType3IEC(nullptr), WindContQPQULimIEC(nullptr), WindContRotorRIEC(nullptr), WindGenType3bIEC(nullptr), WindPitchContPowerIEC(nullptr), WindPlantFreqPcontrolIEC(nullptr), WindPlantReactiveControlIEC(nullptr), WindProtectionIEC(nullptr) {}; -WindDynamicsLookupTable::~WindDynamicsLookupTable() {}; +WindDynamicsLookupTable::WindDynamicsLookupTable() : WindContCurrLimIEC(nullptr), WindContPType3IEC(nullptr), WindContQPQULimIEC(nullptr), WindContRotorRIEC(nullptr), WindGenType3bIEC(nullptr), WindPitchContPowerIEC(nullptr), WindPlantFreqPcontrolIEC(nullptr), WindPlantReactiveControlIEC(nullptr), WindProtectionIEC(nullptr) {} +WindDynamicsLookupTable::~WindDynamicsLookupTable() {} static const std::list PossibleProfilesForClass = { @@ -64,60 +60,6 @@ WindDynamicsLookupTable::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindDynamicsLookupTable_input(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->input; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_WindDynamicsLookupTable_lookupTableFunctionType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->lookupTableFunctionType; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_WindDynamicsLookupTable_output(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->output; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - -bool assign_WindDynamicsLookupTable_sequence(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->sequence; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_WindContCurrLimIEC_WindDynamicsLookupTable(BaseClass*, BaseClass*); bool assign_WindDynamicsLookupTable_WindContCurrLimIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -134,6 +76,7 @@ bool assign_WindDynamicsLookupTable_WindContCurrLimIEC(BaseClass* BaseClass_ptr1 } return false; } + bool assign_WindContPType3IEC_WindDynamicsLookupTable(BaseClass*, BaseClass*); bool assign_WindDynamicsLookupTable_WindContPType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -150,6 +93,7 @@ bool assign_WindDynamicsLookupTable_WindContPType3IEC(BaseClass* BaseClass_ptr1, } return false; } + bool assign_WindContQPQULimIEC_WindDynamicsLookupTable(BaseClass*, BaseClass*); bool assign_WindDynamicsLookupTable_WindContQPQULimIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -166,6 +110,7 @@ bool assign_WindDynamicsLookupTable_WindContQPQULimIEC(BaseClass* BaseClass_ptr1 } return false; } + bool assign_WindContRotorRIEC_WindDynamicsLookupTable(BaseClass*, BaseClass*); bool assign_WindDynamicsLookupTable_WindContRotorRIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -182,6 +127,7 @@ bool assign_WindDynamicsLookupTable_WindContRotorRIEC(BaseClass* BaseClass_ptr1, } return false; } + bool assign_WindGenType3bIEC_WindDynamicsLookupTable(BaseClass*, BaseClass*); bool assign_WindDynamicsLookupTable_WindGenType3bIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -198,6 +144,7 @@ bool assign_WindDynamicsLookupTable_WindGenType3bIEC(BaseClass* BaseClass_ptr1, } return false; } + bool assign_WindPitchContPowerIEC_WindDynamicsLookupTable(BaseClass*, BaseClass*); bool assign_WindDynamicsLookupTable_WindPitchContPowerIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -214,6 +161,7 @@ bool assign_WindDynamicsLookupTable_WindPitchContPowerIEC(BaseClass* BaseClass_p } return false; } + bool assign_WindPlantFreqPcontrolIEC_WindDynamicsLookupTable(BaseClass*, BaseClass*); bool assign_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -230,6 +178,7 @@ bool assign_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC(BaseClass* BaseClas } return false; } + bool assign_WindPlantReactiveControlIEC_WindDynamicsLookupTable(BaseClass*, BaseClass*); bool assign_WindDynamicsLookupTable_WindPlantReactiveControlIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -246,6 +195,7 @@ bool assign_WindDynamicsLookupTable_WindPlantReactiveControlIEC(BaseClass* BaseC } return false; } + bool assign_WindProtectionIEC_WindDynamicsLookupTable(BaseClass*, BaseClass*); bool assign_WindDynamicsLookupTable_WindProtectionIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -263,52 +213,66 @@ bool assign_WindDynamicsLookupTable_WindProtectionIEC(BaseClass* BaseClass_ptr1, return false; } -bool get_WindDynamicsLookupTable_input(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_WindDynamicsLookupTable_input(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->input; - if (!buffer.str().empty()) + buffer >> element->input; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_WindDynamicsLookupTable_output(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_WindDynamicsLookupTable_lookupTableFunctionType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->output; - if (!buffer.str().empty()) + buffer >> element->lookupTableFunctionType; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } -bool get_WindDynamicsLookupTable_sequence(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool assign_WindDynamicsLookupTable_output(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->sequence; - if (!buffer.str().empty()) + buffer >> element->output; + if (!buffer.fail()) { return true; } } - buffer.setstate(std::ios::failbit); return false; } +bool assign_WindDynamicsLookupTable_sequence(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->sequence; + if (!buffer.fail()) + { + return true; + } + } + return false; +} bool get_WindDynamicsLookupTable_WindContCurrLimIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContCurrLimIEC != 0) { @@ -321,7 +285,8 @@ bool get_WindDynamicsLookupTable_WindContCurrLimIEC(const BaseClass* BaseClass_p bool get_WindDynamicsLookupTable_WindContPType3IEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContPType3IEC != 0) { @@ -334,7 +299,8 @@ bool get_WindDynamicsLookupTable_WindContPType3IEC(const BaseClass* BaseClass_pt bool get_WindDynamicsLookupTable_WindContQPQULimIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContQPQULimIEC != 0) { @@ -347,7 +313,8 @@ bool get_WindDynamicsLookupTable_WindContQPQULimIEC(const BaseClass* BaseClass_p bool get_WindDynamicsLookupTable_WindContRotorRIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContRotorRIEC != 0) { @@ -360,7 +327,8 @@ bool get_WindDynamicsLookupTable_WindContRotorRIEC(const BaseClass* BaseClass_pt bool get_WindDynamicsLookupTable_WindGenType3bIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindGenType3bIEC != 0) { @@ -373,7 +341,8 @@ bool get_WindDynamicsLookupTable_WindGenType3bIEC(const BaseClass* BaseClass_ptr bool get_WindDynamicsLookupTable_WindPitchContPowerIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindPitchContPowerIEC != 0) { @@ -386,7 +355,8 @@ bool get_WindDynamicsLookupTable_WindPitchContPowerIEC(const BaseClass* BaseClas bool get_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindPlantFreqPcontrolIEC != 0) { @@ -399,7 +369,8 @@ bool get_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC(const BaseClass* BaseC bool get_WindDynamicsLookupTable_WindPlantReactiveControlIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindPlantReactiveControlIEC != 0) { @@ -412,7 +383,8 @@ bool get_WindDynamicsLookupTable_WindPlantReactiveControlIEC(const BaseClass* Ba bool get_WindDynamicsLookupTable_WindProtectionIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindProtectionIEC != 0) { @@ -423,10 +395,25 @@ bool get_WindDynamicsLookupTable_WindProtectionIEC(const BaseClass* BaseClass_pt return false; } +bool get_WindDynamicsLookupTable_input(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->input; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} bool get_WindDynamicsLookupTable_lookupTableFunctionType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1)) + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->lookupTableFunctionType; if (!buffer.str().empty()) @@ -438,6 +425,36 @@ bool get_WindDynamicsLookupTable_lookupTableFunctionType(const BaseClass* BaseCl return false; } +bool get_WindDynamicsLookupTable_output(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->output; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + +bool get_WindDynamicsLookupTable_sequence(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +{ + const WindDynamicsLookupTable* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer << element->sequence; + if (!buffer.str().empty()) + { + return true; + } + } + buffer.setstate(std::ios::failbit); + return false; +} + const char WindDynamicsLookupTable::debugName[] = "WindDynamicsLookupTable"; const char* WindDynamicsLookupTable::debugString() const { @@ -446,28 +463,28 @@ const char* WindDynamicsLookupTable::debugString() const void WindDynamicsLookupTable::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable"), &WindDynamicsLookupTable_factory)); + factory_map.emplace("cim:WindDynamicsLookupTable", &WindDynamicsLookupTable_factory); } void WindDynamicsLookupTable::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.input"), &assign_WindDynamicsLookupTable_input)); - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.lookupTableFunctionType"), &assign_WindDynamicsLookupTable_lookupTableFunctionType)); - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.output"), &assign_WindDynamicsLookupTable_output)); - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.sequence"), &assign_WindDynamicsLookupTable_sequence)); + assign_map.emplace("cim:WindDynamicsLookupTable.input", &assign_WindDynamicsLookupTable_input); + assign_map.emplace("cim:WindDynamicsLookupTable.lookupTableFunctionType", &assign_WindDynamicsLookupTable_lookupTableFunctionType); + assign_map.emplace("cim:WindDynamicsLookupTable.output", &assign_WindDynamicsLookupTable_output); + assign_map.emplace("cim:WindDynamicsLookupTable.sequence", &assign_WindDynamicsLookupTable_sequence); } void WindDynamicsLookupTable::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.WindContCurrLimIEC"), &assign_WindDynamicsLookupTable_WindContCurrLimIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.WindContPType3IEC"), &assign_WindDynamicsLookupTable_WindContPType3IEC)); - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.WindContQPQULimIEC"), &assign_WindDynamicsLookupTable_WindContQPQULimIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.WindContRotorRIEC"), &assign_WindDynamicsLookupTable_WindContRotorRIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.WindGenType3bIEC"), &assign_WindDynamicsLookupTable_WindGenType3bIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.WindPitchContPowerIEC"), &assign_WindDynamicsLookupTable_WindPitchContPowerIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.WindPlantFreqPcontrolIEC"), &assign_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.WindPlantReactiveControlIEC"), &assign_WindDynamicsLookupTable_WindPlantReactiveControlIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindDynamicsLookupTable.WindProtectionIEC"), &assign_WindDynamicsLookupTable_WindProtectionIEC)); + assign_map.emplace("cim:WindDynamicsLookupTable.WindContCurrLimIEC", &assign_WindDynamicsLookupTable_WindContCurrLimIEC); + assign_map.emplace("cim:WindDynamicsLookupTable.WindContPType3IEC", &assign_WindDynamicsLookupTable_WindContPType3IEC); + assign_map.emplace("cim:WindDynamicsLookupTable.WindContQPQULimIEC", &assign_WindDynamicsLookupTable_WindContQPQULimIEC); + assign_map.emplace("cim:WindDynamicsLookupTable.WindContRotorRIEC", &assign_WindDynamicsLookupTable_WindContRotorRIEC); + assign_map.emplace("cim:WindDynamicsLookupTable.WindGenType3bIEC", &assign_WindDynamicsLookupTable_WindGenType3bIEC); + assign_map.emplace("cim:WindDynamicsLookupTable.WindPitchContPowerIEC", &assign_WindDynamicsLookupTable_WindPitchContPowerIEC); + assign_map.emplace("cim:WindDynamicsLookupTable.WindPlantFreqPcontrolIEC", &assign_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC); + assign_map.emplace("cim:WindDynamicsLookupTable.WindPlantReactiveControlIEC", &assign_WindDynamicsLookupTable_WindPlantReactiveControlIEC); + assign_map.emplace("cim:WindDynamicsLookupTable.WindProtectionIEC", &assign_WindDynamicsLookupTable_WindProtectionIEC); } void WindDynamicsLookupTable::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindDynamicsLookupTable.hpp b/CGMES_3.0.0/WindDynamicsLookupTable.hpp index c8826dbed..a5f98f62f 100644 --- a/CGMES_3.0.0/WindDynamicsLookupTable.hpp +++ b/CGMES_3.0.0/WindDynamicsLookupTable.hpp @@ -28,9 +28,7 @@ namespace CIMPP class WindPlantReactiveControlIEC; class WindProtectionIEC; - /* - Look up table for the purpose of wind standard models. - */ + /** \brief Look up table for the purpose of wind standard models. */ class WindDynamicsLookupTable : public IdentifiedObject { public: @@ -38,19 +36,44 @@ namespace CIMPP WindDynamicsLookupTable(); ~WindDynamicsLookupTable() override; - CIMPP::WindContCurrLimIEC* WindContCurrLimIEC; /* The current control limitation model with which this wind dynamics lookup table is associated. Default: 0 */ - CIMPP::WindContPType3IEC* WindContPType3IEC; /* The P control type 3 model with which this wind dynamics lookup table is associated. Default: 0 */ - CIMPP::WindContQPQULimIEC* WindContQPQULimIEC; /* The QP and QU limitation model with which this wind dynamics lookup table is associated. Default: 0 */ - CIMPP::WindContRotorRIEC* WindContRotorRIEC; /* The rotor resistance control model with which this wind dynamics lookup table is associated. Default: 0 */ - CIMPP::WindGenType3bIEC* WindGenType3bIEC; /* The generator type 3B model with which this wind dynamics lookup table is associated. Default: 0 */ - CIMPP::WindPitchContPowerIEC* WindPitchContPowerIEC; /* The pitch control power model with which this wind dynamics lookup table is associated. Default: 0 */ - CIMPP::WindPlantFreqPcontrolIEC* WindPlantFreqPcontrolIEC; /* The frequency and active power wind plant control model with which this wind dynamics lookup table is associated. Default: 0 */ - CIMPP::WindPlantReactiveControlIEC* WindPlantReactiveControlIEC; /* The voltage and reactive power wind plant control model with which this wind dynamics lookup table is associated. Default: 0 */ - CIMPP::WindProtectionIEC* WindProtectionIEC; /* The grid protection model with which this wind dynamics lookup table is associated. Default: 0 */ - CIMPP::Float input; /* Input value (<i>x</i>) for the lookup table function. Default: 0.0 */ - CIMPP::WindLookupTableFunctionKind lookupTableFunctionType; /* Type of the lookup table function. Default: 0 */ - CIMPP::Float output; /* Output value (<i>y</i>) for the lookup table function. Default: 0.0 */ - CIMPP::Integer sequence; /* Sequence numbers of the pairs of the input (<i>x</i>) and the output (<i>y</i>) of the lookup table function. Default: 0 */ + /** \brief The current control limitation model with which this wind dynamics lookup table is associated. Default: 0 */ + CIMPP::WindContCurrLimIEC* WindContCurrLimIEC; + + /** \brief The P control type 3 model with which this wind dynamics lookup table is associated. Default: 0 */ + CIMPP::WindContPType3IEC* WindContPType3IEC; + + /** \brief The QP and QU limitation model with which this wind dynamics lookup table is associated. Default: 0 */ + CIMPP::WindContQPQULimIEC* WindContQPQULimIEC; + + /** \brief The rotor resistance control model with which this wind dynamics lookup table is associated. Default: 0 */ + CIMPP::WindContRotorRIEC* WindContRotorRIEC; + + /** \brief The generator type 3B model with which this wind dynamics lookup table is associated. Default: 0 */ + CIMPP::WindGenType3bIEC* WindGenType3bIEC; + + /** \brief The pitch control power model with which this wind dynamics lookup table is associated. Default: 0 */ + CIMPP::WindPitchContPowerIEC* WindPitchContPowerIEC; + + /** \brief The frequency and active power wind plant control model with which this wind dynamics lookup table is associated. Default: 0 */ + CIMPP::WindPlantFreqPcontrolIEC* WindPlantFreqPcontrolIEC; + + /** \brief The voltage and reactive power wind plant control model with which this wind dynamics lookup table is associated. Default: 0 */ + CIMPP::WindPlantReactiveControlIEC* WindPlantReactiveControlIEC; + + /** \brief The grid protection model with which this wind dynamics lookup table is associated. Default: 0 */ + CIMPP::WindProtectionIEC* WindProtectionIEC; + + /** \brief Input value (<i>x</i>) for the lookup table function. Default: 0.0 */ + CIMPP::Float input; + + /** \brief Type of the lookup table function. Default: 0 */ + CIMPP::WindLookupTableFunctionKind lookupTableFunctionType; + + /** \brief Output value (<i>y</i>) for the lookup table function. Default: 0.0 */ + CIMPP::Float output; + + /** \brief Sequence numbers of the pairs of the input (<i>x</i>) and the output (<i>y</i>) of the lookup table function. Default: 0 */ + CIMPP::Integer sequence; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindGenTurbineType1aIEC.cpp b/CGMES_3.0.0/WindGenTurbineType1aIEC.cpp index 36962d635..cfe60f57a 100644 --- a/CGMES_3.0.0/WindGenTurbineType1aIEC.cpp +++ b/CGMES_3.0.0/WindGenTurbineType1aIEC.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindGenTurbineType1aIEC::WindGenTurbineType1aIEC() : WindAeroConstIEC(nullptr) {}; -WindGenTurbineType1aIEC::~WindGenTurbineType1aIEC() {}; +WindGenTurbineType1aIEC::WindGenTurbineType1aIEC() : WindAeroConstIEC(nullptr) {} +WindGenTurbineType1aIEC::~WindGenTurbineType1aIEC() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ WindGenTurbineType1aIEC::getPossibleProfilesForAttributes() const return map; } - - bool assign_WindAeroConstIEC_WindGenTurbineType1aIEC(BaseClass*, BaseClass*); bool assign_WindGenTurbineType1aIEC_WindAeroConstIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_WindGenTurbineType1aIEC_WindAeroConstIEC(BaseClass* BaseClass_ptr1, return false; } - bool get_WindGenTurbineType1aIEC_WindAeroConstIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindGenTurbineType1aIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType1aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindAeroConstIEC != 0) { @@ -73,7 +71,6 @@ bool get_WindGenTurbineType1aIEC_WindAeroConstIEC(const BaseClass* BaseClass_ptr return false; } - const char WindGenTurbineType1aIEC::debugName[] = "WindGenTurbineType1aIEC"; const char* WindGenTurbineType1aIEC::debugString() const { @@ -82,7 +79,7 @@ const char* WindGenTurbineType1aIEC::debugString() const void WindGenTurbineType1aIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindGenTurbineType1aIEC"), &WindGenTurbineType1aIEC_factory)); + factory_map.emplace("cim:WindGenTurbineType1aIEC", &WindGenTurbineType1aIEC_factory); } void WindGenTurbineType1aIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void WindGenTurbineType1aIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType1aIEC.WindAeroConstIEC"), &assign_WindGenTurbineType1aIEC_WindAeroConstIEC)); + assign_map.emplace("cim:WindGenTurbineType1aIEC.WindAeroConstIEC", &assign_WindGenTurbineType1aIEC_WindAeroConstIEC); } void WindGenTurbineType1aIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindGenTurbineType1aIEC.hpp b/CGMES_3.0.0/WindGenTurbineType1aIEC.hpp index b7621bdcc..0992de82b 100644 --- a/CGMES_3.0.0/WindGenTurbineType1aIEC.hpp +++ b/CGMES_3.0.0/WindGenTurbineType1aIEC.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class WindAeroConstIEC; - /* - Wind turbine IEC type 1A. Reference: IEC 61400-27-1:2015, 5.5.2.2. - */ + /** \brief Wind turbine IEC type 1A. Reference: IEC 61400-27-1:2015, 5.5.2.2. */ class WindGenTurbineType1aIEC : public WindTurbineType1or2IEC { public: @@ -27,7 +25,8 @@ namespace CIMPP WindGenTurbineType1aIEC(); ~WindGenTurbineType1aIEC() override; - CIMPP::WindAeroConstIEC* WindAeroConstIEC; /* Wind aerodynamic model associated with this wind turbine type 1A model. Default: 0 */ + /** \brief Wind aerodynamic model associated with this wind turbine type 1A model. Default: 0 */ + CIMPP::WindAeroConstIEC* WindAeroConstIEC; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindGenTurbineType1bIEC.cpp b/CGMES_3.0.0/WindGenTurbineType1bIEC.cpp index dcb062ef0..b4df37858 100644 --- a/CGMES_3.0.0/WindGenTurbineType1bIEC.cpp +++ b/CGMES_3.0.0/WindGenTurbineType1bIEC.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindGenTurbineType1bIEC::WindGenTurbineType1bIEC() : WindPitchContPowerIEC(nullptr) {}; -WindGenTurbineType1bIEC::~WindGenTurbineType1bIEC() {}; +WindGenTurbineType1bIEC::WindGenTurbineType1bIEC() : WindPitchContPowerIEC(nullptr) {} +WindGenTurbineType1bIEC::~WindGenTurbineType1bIEC() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ WindGenTurbineType1bIEC::getPossibleProfilesForAttributes() const return map; } - - bool assign_WindPitchContPowerIEC_WindGenTurbineType1bIEC(BaseClass*, BaseClass*); bool assign_WindGenTurbineType1bIEC_WindPitchContPowerIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_WindGenTurbineType1bIEC_WindPitchContPowerIEC(BaseClass* BaseClass_p return false; } - bool get_WindGenTurbineType1bIEC_WindPitchContPowerIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindGenTurbineType1bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType1bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindPitchContPowerIEC != 0) { @@ -73,7 +71,6 @@ bool get_WindGenTurbineType1bIEC_WindPitchContPowerIEC(const BaseClass* BaseClas return false; } - const char WindGenTurbineType1bIEC::debugName[] = "WindGenTurbineType1bIEC"; const char* WindGenTurbineType1bIEC::debugString() const { @@ -82,7 +79,7 @@ const char* WindGenTurbineType1bIEC::debugString() const void WindGenTurbineType1bIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindGenTurbineType1bIEC"), &WindGenTurbineType1bIEC_factory)); + factory_map.emplace("cim:WindGenTurbineType1bIEC", &WindGenTurbineType1bIEC_factory); } void WindGenTurbineType1bIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void WindGenTurbineType1bIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType1bIEC.WindPitchContPowerIEC"), &assign_WindGenTurbineType1bIEC_WindPitchContPowerIEC)); + assign_map.emplace("cim:WindGenTurbineType1bIEC.WindPitchContPowerIEC", &assign_WindGenTurbineType1bIEC_WindPitchContPowerIEC); } void WindGenTurbineType1bIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindGenTurbineType1bIEC.hpp b/CGMES_3.0.0/WindGenTurbineType1bIEC.hpp index c074f4e46..b3bb3c3a6 100644 --- a/CGMES_3.0.0/WindGenTurbineType1bIEC.hpp +++ b/CGMES_3.0.0/WindGenTurbineType1bIEC.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class WindPitchContPowerIEC; - /* - Wind turbine IEC type 1B. Reference: IEC 61400-27-1:2015, 5.5.2.3. - */ + /** \brief Wind turbine IEC type 1B. Reference: IEC 61400-27-1:2015, 5.5.2.3. */ class WindGenTurbineType1bIEC : public WindTurbineType1or2IEC { public: @@ -27,7 +25,8 @@ namespace CIMPP WindGenTurbineType1bIEC(); ~WindGenTurbineType1bIEC() override; - CIMPP::WindPitchContPowerIEC* WindPitchContPowerIEC; /* Pitch control power model associated with this wind turbine type 1B model. Default: 0 */ + /** \brief Pitch control power model associated with this wind turbine type 1B model. Default: 0 */ + CIMPP::WindPitchContPowerIEC* WindPitchContPowerIEC; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindGenTurbineType2IEC.cpp b/CGMES_3.0.0/WindGenTurbineType2IEC.cpp index 3a9c9cccf..d23e059d6 100644 --- a/CGMES_3.0.0/WindGenTurbineType2IEC.cpp +++ b/CGMES_3.0.0/WindGenTurbineType2IEC.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindGenTurbineType2IEC::WindGenTurbineType2IEC() : WindContRotorRIEC(nullptr), WindPitchContPowerIEC(nullptr) {}; -WindGenTurbineType2IEC::~WindGenTurbineType2IEC() {}; +WindGenTurbineType2IEC::WindGenTurbineType2IEC() : WindContRotorRIEC(nullptr), WindPitchContPowerIEC(nullptr) {} +WindGenTurbineType2IEC::~WindGenTurbineType2IEC() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ WindGenTurbineType2IEC::getPossibleProfilesForAttributes() const return map; } - - bool assign_WindContRotorRIEC_WindGenTurbineType2IEC(BaseClass*, BaseClass*); bool assign_WindGenTurbineType2IEC_WindContRotorRIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_WindGenTurbineType2IEC_WindContRotorRIEC(BaseClass* BaseClass_ptr1, } return false; } + bool assign_WindPitchContPowerIEC_WindGenTurbineType2IEC(BaseClass*, BaseClass*); bool assign_WindGenTurbineType2IEC_WindPitchContPowerIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_WindGenTurbineType2IEC_WindPitchContPowerIEC(BaseClass* BaseClass_pt return false; } - bool get_WindGenTurbineType2IEC_WindContRotorRIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindGenTurbineType2IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType2IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContRotorRIEC != 0) { @@ -93,7 +92,8 @@ bool get_WindGenTurbineType2IEC_WindContRotorRIEC(const BaseClass* BaseClass_ptr bool get_WindGenTurbineType2IEC_WindPitchContPowerIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindGenTurbineType2IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenTurbineType2IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindPitchContPowerIEC != 0) { @@ -104,7 +104,6 @@ bool get_WindGenTurbineType2IEC_WindPitchContPowerIEC(const BaseClass* BaseClass return false; } - const char WindGenTurbineType2IEC::debugName[] = "WindGenTurbineType2IEC"; const char* WindGenTurbineType2IEC::debugString() const { @@ -113,7 +112,7 @@ const char* WindGenTurbineType2IEC::debugString() const void WindGenTurbineType2IEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindGenTurbineType2IEC"), &WindGenTurbineType2IEC_factory)); + factory_map.emplace("cim:WindGenTurbineType2IEC", &WindGenTurbineType2IEC_factory); } void WindGenTurbineType2IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void WindGenTurbineType2IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType2IEC.WindContRotorRIEC"), &assign_WindGenTurbineType2IEC_WindContRotorRIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindGenTurbineType2IEC.WindPitchContPowerIEC"), &assign_WindGenTurbineType2IEC_WindPitchContPowerIEC)); + assign_map.emplace("cim:WindGenTurbineType2IEC.WindContRotorRIEC", &assign_WindGenTurbineType2IEC_WindContRotorRIEC); + assign_map.emplace("cim:WindGenTurbineType2IEC.WindPitchContPowerIEC", &assign_WindGenTurbineType2IEC_WindPitchContPowerIEC); } void WindGenTurbineType2IEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindGenTurbineType2IEC.hpp b/CGMES_3.0.0/WindGenTurbineType2IEC.hpp index e398905a4..7f7d6c7dc 100644 --- a/CGMES_3.0.0/WindGenTurbineType2IEC.hpp +++ b/CGMES_3.0.0/WindGenTurbineType2IEC.hpp @@ -18,9 +18,7 @@ namespace CIMPP class WindContRotorRIEC; class WindPitchContPowerIEC; - /* - Wind turbine IEC type 2. Reference: IEC 61400-27-1:2015, 5.5.3. - */ + /** \brief Wind turbine IEC type 2. Reference: IEC 61400-27-1:2015, 5.5.3. */ class WindGenTurbineType2IEC : public WindTurbineType1or2IEC { public: @@ -28,8 +26,11 @@ namespace CIMPP WindGenTurbineType2IEC(); ~WindGenTurbineType2IEC() override; - CIMPP::WindContRotorRIEC* WindContRotorRIEC; /* Wind control rotor resistance model associated with wind turbine type 2 model. Default: 0 */ - CIMPP::WindPitchContPowerIEC* WindPitchContPowerIEC; /* Pitch control power model associated with this wind turbine type 2 model. Default: 0 */ + /** \brief Wind control rotor resistance model associated with wind turbine type 2 model. Default: 0 */ + CIMPP::WindContRotorRIEC* WindContRotorRIEC; + + /** \brief Pitch control power model associated with this wind turbine type 2 model. Default: 0 */ + CIMPP::WindPitchContPowerIEC* WindPitchContPowerIEC; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindGenType3IEC.cpp b/CGMES_3.0.0/WindGenType3IEC.cpp index 414ee3d4c..d41a083ed 100644 --- a/CGMES_3.0.0/WindGenType3IEC.cpp +++ b/CGMES_3.0.0/WindGenType3IEC.cpp @@ -9,14 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "WindTurbineType3IEC.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -WindGenType3IEC::WindGenType3IEC() : WindTurbineType3IEC(nullptr) {}; -WindGenType3IEC::~WindGenType3IEC() {}; +WindGenType3IEC::WindGenType3IEC() : WindTurbineType3IEC(nullptr) {} +WindGenType3IEC::~WindGenType3IEC() {} static const std::list PossibleProfilesForClass = { @@ -46,67 +43,70 @@ WindGenType3IEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindGenType3IEC_dipmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType3IEC_WindGenType3IEC(BaseClass*, BaseClass*); +bool assign_WindGenType3IEC_WindTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindGenType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenType3IEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType3IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->dipmax; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType3IEC != element2) + { + element->WindTurbineType3IEC = element2; + return assign_WindTurbineType3IEC_WindGenType3IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindGenType3IEC_diqmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenType3IEC_dipmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->diqmax; - if (buffer.fail()) - return false; - else + buffer >> element->dipmax; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindGenType3IEC_xs(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenType3IEC_diqmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenType3IEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->xs; - if (buffer.fail()) - return false; - else + buffer >> element->diqmax; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindTurbineType3IEC_WindGenType3IEC(BaseClass*, BaseClass*); -bool assign_WindGenType3IEC_WindTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindGenType3IEC_xs(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindGenType3IEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType3IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType3IEC != element2) + buffer >> element->xs; + if (!buffer.fail()) { - element->WindTurbineType3IEC = element2; - return assign_WindTurbineType3IEC_WindGenType3IEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_WindGenType3IEC_dipmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dipmax; if (!buffer.str().empty()) @@ -120,7 +120,8 @@ bool get_WindGenType3IEC_dipmax(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindGenType3IEC_diqmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->diqmax; if (!buffer.str().empty()) @@ -134,7 +135,8 @@ bool get_WindGenType3IEC_diqmax(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindGenType3IEC_xs(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->xs; if (!buffer.str().empty()) @@ -146,8 +148,6 @@ bool get_WindGenType3IEC_xs(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char WindGenType3IEC::debugName[] = "WindGenType3IEC"; const char* WindGenType3IEC::debugString() const { @@ -156,19 +156,19 @@ const char* WindGenType3IEC::debugString() const void WindGenType3IEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindGenType3IEC"), &WindGenType3IEC_factory)); + factory_map.emplace("cim:WindGenType3IEC", &WindGenType3IEC_factory); } void WindGenType3IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGenType3IEC.dipmax"), &assign_WindGenType3IEC_dipmax)); - assign_map.insert(std::make_pair(std::string("cim:WindGenType3IEC.diqmax"), &assign_WindGenType3IEC_diqmax)); - assign_map.insert(std::make_pair(std::string("cim:WindGenType3IEC.xs"), &assign_WindGenType3IEC_xs)); + assign_map.emplace("cim:WindGenType3IEC.dipmax", &assign_WindGenType3IEC_dipmax); + assign_map.emplace("cim:WindGenType3IEC.diqmax", &assign_WindGenType3IEC_diqmax); + assign_map.emplace("cim:WindGenType3IEC.xs", &assign_WindGenType3IEC_xs); } void WindGenType3IEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGenType3IEC.WindTurbineType3IEC"), &assign_WindGenType3IEC_WindTurbineType3IEC)); + assign_map.emplace("cim:WindGenType3IEC.WindTurbineType3IEC", &assign_WindGenType3IEC_WindTurbineType3IEC); } void WindGenType3IEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindGenType3IEC.hpp b/CGMES_3.0.0/WindGenType3IEC.hpp index ef9145b62..19b49e8b8 100644 --- a/CGMES_3.0.0/WindGenType3IEC.hpp +++ b/CGMES_3.0.0/WindGenType3IEC.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class WindTurbineType3IEC; - /* - Parent class supporting relationships to IEC wind turbines type 3 generator models of IEC type 3A and 3B. - */ + /** \brief Parent class supporting relationships to IEC wind turbines type 3 generator models of IEC type 3A and 3B. */ class WindGenType3IEC : public IdentifiedObject { public: @@ -28,10 +26,17 @@ namespace CIMPP WindGenType3IEC(); ~WindGenType3IEC() override; - CIMPP::WindTurbineType3IEC* WindTurbineType3IEC; /* Wind turbine type 3 model with which this wind generator type 3 is associated. Default: 0 */ - CIMPP::PU dipmax; /* Maximum active current ramp rate (<i>di</i><i><sub>pmax</sub></i>). It is a project-dependent parameter. Default: nullptr */ - CIMPP::PU diqmax; /* Maximum reactive current ramp rate (<i>di</i><i><sub>qmax</sub></i>). It is a project-dependent parameter. Default: nullptr */ - CIMPP::PU xs; /* Electromagnetic transient reactance (<i>x</i><i><sub>S</sub></i>). It is a type-dependent parameter. Default: nullptr */ + /** \brief Wind turbine type 3 model with which this wind generator type 3 is associated. Default: 0 */ + CIMPP::WindTurbineType3IEC* WindTurbineType3IEC; + + /** \brief Maximum active current ramp rate (<i>di</i><i><sub>pmax</sub></i>). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU dipmax; + + /** \brief Maximum reactive current ramp rate (<i>di</i><i><sub>qmax</sub></i>). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU diqmax; + + /** \brief Electromagnetic transient reactance (<i>x</i><i><sub>S</sub></i>). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU xs; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindGenType3aIEC.cpp b/CGMES_3.0.0/WindGenType3aIEC.cpp index a914e6663..b4ff42111 100644 --- a/CGMES_3.0.0/WindGenType3aIEC.cpp +++ b/CGMES_3.0.0/WindGenType3aIEC.cpp @@ -9,13 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "WindTurbineType4IEC.hpp" -#include "Float.hpp" -#include "Seconds.hpp" using namespace CIMPP; -WindGenType3aIEC::WindGenType3aIEC() : WindTurbineType4IEC(nullptr) {}; -WindGenType3aIEC::~WindGenType3aIEC() {}; +WindGenType3aIEC::WindGenType3aIEC() : WindTurbineType4IEC(nullptr) {} +WindGenType3aIEC::~WindGenType3aIEC() {} static const std::list PossibleProfilesForClass = { @@ -44,54 +42,56 @@ WindGenType3aIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindGenType3aIEC_kpc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType4IEC_WindGenType3aIEC(BaseClass*, BaseClass*); +bool assign_WindGenType3aIEC_WindTurbineType4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindGenType3aIEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenType3aIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType4IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->kpc; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType4IEC != element2) + { + element->WindTurbineType4IEC = element2; + return assign_WindTurbineType4IEC_WindGenType3aIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindGenType3aIEC_tic(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenType3aIEC_kpc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenType3aIEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenType3aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tic; - if (buffer.fail()) - return false; - else + buffer >> element->kpc; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindTurbineType4IEC_WindGenType3aIEC(BaseClass*, BaseClass*); -bool assign_WindGenType3aIEC_WindTurbineType4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindGenType3aIEC_tic(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindGenType3aIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType4IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType4IEC != element2) + buffer >> element->tic; + if (!buffer.fail()) { - element->WindTurbineType4IEC = element2; - return assign_WindTurbineType4IEC_WindGenType3aIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_WindGenType3aIEC_kpc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenType3aIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenType3aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpc; if (!buffer.str().empty()) @@ -105,7 +105,8 @@ bool get_WindGenType3aIEC_kpc(const BaseClass* BaseClass_ptr1, std::stringstream bool get_WindGenType3aIEC_tic(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenType3aIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenType3aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tic; if (!buffer.str().empty()) @@ -117,8 +118,6 @@ bool get_WindGenType3aIEC_tic(const BaseClass* BaseClass_ptr1, std::stringstream return false; } - - const char WindGenType3aIEC::debugName[] = "WindGenType3aIEC"; const char* WindGenType3aIEC::debugString() const { @@ -127,18 +126,18 @@ const char* WindGenType3aIEC::debugString() const void WindGenType3aIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindGenType3aIEC"), &WindGenType3aIEC_factory)); + factory_map.emplace("cim:WindGenType3aIEC", &WindGenType3aIEC_factory); } void WindGenType3aIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGenType3aIEC.kpc"), &assign_WindGenType3aIEC_kpc)); - assign_map.insert(std::make_pair(std::string("cim:WindGenType3aIEC.tic"), &assign_WindGenType3aIEC_tic)); + assign_map.emplace("cim:WindGenType3aIEC.kpc", &assign_WindGenType3aIEC_kpc); + assign_map.emplace("cim:WindGenType3aIEC.tic", &assign_WindGenType3aIEC_tic); } void WindGenType3aIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGenType3aIEC.WindTurbineType4IEC"), &assign_WindGenType3aIEC_WindTurbineType4IEC)); + assign_map.emplace("cim:WindGenType3aIEC.WindTurbineType4IEC", &assign_WindGenType3aIEC_WindTurbineType4IEC); } void WindGenType3aIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindGenType3aIEC.hpp b/CGMES_3.0.0/WindGenType3aIEC.hpp index 19cc8ee5e..5a390689c 100644 --- a/CGMES_3.0.0/WindGenType3aIEC.hpp +++ b/CGMES_3.0.0/WindGenType3aIEC.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class WindTurbineType4IEC; - /* - IEC type 3A generator set model. Reference: IEC 61400-27-1:2015, 5.6.3.2. - */ + /** \brief IEC type 3A generator set model. Reference: IEC 61400-27-1:2015, 5.6.3.2. */ class WindGenType3aIEC : public WindGenType3IEC { public: @@ -29,9 +27,14 @@ namespace CIMPP WindGenType3aIEC(); ~WindGenType3aIEC() override; - CIMPP::WindTurbineType4IEC* WindTurbineType4IEC; /* Wind turbine type 4 model with which this wind generator type 3A model is associated. Default: 0 */ - CIMPP::Float kpc; /* Current PI controller proportional gain (<i>K</i><i><sub>Pc</sub></i>). It is a type-dependent parameter. Default: 0.0 */ - CIMPP::Seconds tic; /* Current PI controller integration time constant (<i>T</i><i><sub>Ic</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ + /** \brief Wind turbine type 4 model with which this wind generator type 3A model is associated. Default: 0 */ + CIMPP::WindTurbineType4IEC* WindTurbineType4IEC; + + /** \brief Current PI controller proportional gain (<i>K</i><i><sub>Pc</sub></i>). It is a type-dependent parameter. Default: 0.0 */ + CIMPP::Float kpc; + + /** \brief Current PI controller integration time constant (<i>T</i><i><sub>Ic</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ + CIMPP::Seconds tic; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindGenType3bIEC.cpp b/CGMES_3.0.0/WindGenType3bIEC.cpp index 1717a2bfa..ce842e56c 100644 --- a/CGMES_3.0.0/WindGenType3bIEC.cpp +++ b/CGMES_3.0.0/WindGenType3bIEC.cpp @@ -9,14 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "WindDynamicsLookupTable.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -WindGenType3bIEC::WindGenType3bIEC() {}; -WindGenType3bIEC::~WindGenType3bIEC() {}; +WindGenType3bIEC::WindGenType3bIEC() {} +WindGenType3bIEC::~WindGenType3bIEC() {} static const std::list PossibleProfilesForClass = { @@ -46,67 +43,70 @@ WindGenType3bIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindGenType3bIEC_mwtcwp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindDynamicsLookupTable_WindGenType3bIEC(BaseClass*, BaseClass*); +bool assign_WindGenType3bIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindGenType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenType3bIEC* element = dynamic_cast(BaseClass_ptr1); + WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->mwtcwp; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) + { + element->WindDynamicsLookupTable.push_back(element2); + return assign_WindDynamicsLookupTable_WindGenType3bIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindGenType3bIEC_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenType3bIEC_mwtcwp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenType3bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tg; - if (buffer.fail()) - return false; - else + buffer >> element->mwtcwp; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindGenType3bIEC_two(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenType3bIEC_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenType3bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->two; - if (buffer.fail()) - return false; - else + buffer >> element->tg; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindDynamicsLookupTable_WindGenType3bIEC(BaseClass*, BaseClass*); -bool assign_WindGenType3bIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindGenType3bIEC_two(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindGenType3bIEC* element = dynamic_cast(BaseClass_ptr1); - WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) + buffer >> element->two; + if (!buffer.fail()) { - element->WindDynamicsLookupTable.push_back(element2); - return assign_WindDynamicsLookupTable_WindGenType3bIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_WindGenType3bIEC_mwtcwp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenType3bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mwtcwp; if (!buffer.str().empty()) @@ -120,7 +120,8 @@ bool get_WindGenType3bIEC_mwtcwp(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindGenType3bIEC_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenType3bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -134,7 +135,8 @@ bool get_WindGenType3bIEC_tg(const BaseClass* BaseClass_ptr1, std::stringstream& bool get_WindGenType3bIEC_two(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenType3bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenType3bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->two; if (!buffer.str().empty()) @@ -146,8 +148,6 @@ bool get_WindGenType3bIEC_two(const BaseClass* BaseClass_ptr1, std::stringstream return false; } - - const char WindGenType3bIEC::debugName[] = "WindGenType3bIEC"; const char* WindGenType3bIEC::debugString() const { @@ -156,19 +156,19 @@ const char* WindGenType3bIEC::debugString() const void WindGenType3bIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindGenType3bIEC"), &WindGenType3bIEC_factory)); + factory_map.emplace("cim:WindGenType3bIEC", &WindGenType3bIEC_factory); } void WindGenType3bIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGenType3bIEC.mwtcwp"), &assign_WindGenType3bIEC_mwtcwp)); - assign_map.insert(std::make_pair(std::string("cim:WindGenType3bIEC.tg"), &assign_WindGenType3bIEC_tg)); - assign_map.insert(std::make_pair(std::string("cim:WindGenType3bIEC.two"), &assign_WindGenType3bIEC_two)); + assign_map.emplace("cim:WindGenType3bIEC.mwtcwp", &assign_WindGenType3bIEC_mwtcwp); + assign_map.emplace("cim:WindGenType3bIEC.tg", &assign_WindGenType3bIEC_tg); + assign_map.emplace("cim:WindGenType3bIEC.two", &assign_WindGenType3bIEC_two); } void WindGenType3bIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGenType3bIEC.WindDynamicsLookupTable"), &assign_WindGenType3bIEC_WindDynamicsLookupTable)); + assign_map.emplace("cim:WindGenType3bIEC.WindDynamicsLookupTable", &assign_WindGenType3bIEC_WindDynamicsLookupTable); } void WindGenType3bIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindGenType3bIEC.hpp b/CGMES_3.0.0/WindGenType3bIEC.hpp index 5fe8a2d0a..c7812f789 100644 --- a/CGMES_3.0.0/WindGenType3bIEC.hpp +++ b/CGMES_3.0.0/WindGenType3bIEC.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class WindDynamicsLookupTable; - /* - IEC type 3B generator set model. Reference: IEC 61400-27-1:2015, 5.6.3.3. - */ + /** \brief IEC type 3B generator set model. Reference: IEC 61400-27-1:2015, 5.6.3.3. */ class WindGenType3bIEC : public WindGenType3IEC { public: @@ -29,10 +27,17 @@ namespace CIMPP WindGenType3bIEC(); ~WindGenType3bIEC() override; - std::list WindDynamicsLookupTable; /* The wind dynamics lookup table associated with this generator type 3B model. Default: 0 */ - CIMPP::Boolean mwtcwp; /* Crowbar control mode (<i>M</i><i><sub>WTcwp</sub></i>). It is a case-dependent parameter. true = 1 in the IEC model false = 0 in the IEC model. Default: false */ - CIMPP::Seconds tg; /* Current generation time constant (<i>T</i><i><sub>g</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ - CIMPP::Seconds two; /* Time constant for crowbar washout filter (<i>T</i><i><sub>wo</sub></i>) (&gt;= 0). It is a case-dependent parameter. Default: nullptr */ + /** \brief The wind dynamics lookup table associated with this generator type 3B model. Default: 0 */ + std::list WindDynamicsLookupTable; + + /** \brief Crowbar control mode (<i>M</i><i><sub>WTcwp</sub></i>). It is a case-dependent parameter. true = 1 in the IEC model false = 0 in the IEC model. Default: false */ + CIMPP::Boolean mwtcwp; + + /** \brief Current generation time constant (<i>T</i><i><sub>g</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ + CIMPP::Seconds tg; + + /** \brief Time constant for crowbar washout filter (<i>T</i><i><sub>wo</sub></i>) (&gt;= 0). It is a case-dependent parameter. Default: nullptr */ + CIMPP::Seconds two; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindGenType4IEC.cpp b/CGMES_3.0.0/WindGenType4IEC.cpp index e549a1e87..f69ea991a 100644 --- a/CGMES_3.0.0/WindGenType4IEC.cpp +++ b/CGMES_3.0.0/WindGenType4IEC.cpp @@ -10,15 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindTurbineType4aIEC.hpp" #include "WindTurbineType4bIEC.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" using namespace CIMPP; -WindGenType4IEC::WindGenType4IEC() : WindTurbineType4aIEC(nullptr), WindTurbineType4bIEC(nullptr) {}; -WindGenType4IEC::~WindGenType4IEC() {}; +WindGenType4IEC::WindGenType4IEC() : WindTurbineType4aIEC(nullptr), WindTurbineType4bIEC(nullptr) {} +WindGenType4IEC::~WindGenType4IEC() {} static const std::list PossibleProfilesForClass = { @@ -50,96 +46,102 @@ WindGenType4IEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindGenType4IEC_dipmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType4aIEC_WindGenType4IEC(BaseClass*, BaseClass*); +bool assign_WindGenType4IEC_WindTurbineType4aIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType4aIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->dipmax; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType4aIEC != element2) + { + element->WindTurbineType4aIEC = element2; + return assign_WindTurbineType4aIEC_WindGenType4IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindGenType4IEC_diqmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType4bIEC_WindGenType4IEC(BaseClass*, BaseClass*); +bool assign_WindGenType4IEC_WindTurbineType4bIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType4bIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->diqmax; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType4bIEC != element2) + { + element->WindTurbineType4bIEC = element2; + return assign_WindTurbineType4bIEC_WindGenType4IEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindGenType4IEC_diqmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenType4IEC_dipmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->diqmin; - if (buffer.fail()) - return false; - else + buffer >> element->dipmax; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindGenType4IEC_tg(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenType4IEC_diqmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tg; - if (buffer.fail()) - return false; - else + buffer >> element->diqmax; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindTurbineType4aIEC_WindGenType4IEC(BaseClass*, BaseClass*); -bool assign_WindGenType4IEC_WindTurbineType4aIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindGenType4IEC_diqmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType4aIEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType4aIEC != element2) + buffer >> element->diqmin; + if (!buffer.fail()) { - element->WindTurbineType4aIEC = element2; - return assign_WindTurbineType4aIEC_WindGenType4IEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_WindTurbineType4bIEC_WindGenType4IEC(BaseClass*, BaseClass*); -bool assign_WindGenType4IEC_WindTurbineType4bIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_WindGenType4IEC_tg(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType4bIEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType4bIEC != element2) + buffer >> element->tg; + if (!buffer.fail()) { - element->WindTurbineType4bIEC = element2; - return assign_WindTurbineType4bIEC_WindGenType4IEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + + bool get_WindGenType4IEC_dipmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dipmax; if (!buffer.str().empty()) @@ -153,7 +155,8 @@ bool get_WindGenType4IEC_dipmax(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindGenType4IEC_diqmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->diqmax; if (!buffer.str().empty()) @@ -167,7 +170,8 @@ bool get_WindGenType4IEC_diqmax(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindGenType4IEC_diqmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->diqmin; if (!buffer.str().empty()) @@ -181,7 +185,8 @@ bool get_WindGenType4IEC_diqmin(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindGenType4IEC_tg(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindGenType4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tg; if (!buffer.str().empty()) @@ -193,8 +198,6 @@ bool get_WindGenType4IEC_tg(const BaseClass* BaseClass_ptr1, std::stringstream& return false; } - - const char WindGenType4IEC::debugName[] = "WindGenType4IEC"; const char* WindGenType4IEC::debugString() const { @@ -203,21 +206,21 @@ const char* WindGenType4IEC::debugString() const void WindGenType4IEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindGenType4IEC"), &WindGenType4IEC_factory)); + factory_map.emplace("cim:WindGenType4IEC", &WindGenType4IEC_factory); } void WindGenType4IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGenType4IEC.dipmax"), &assign_WindGenType4IEC_dipmax)); - assign_map.insert(std::make_pair(std::string("cim:WindGenType4IEC.diqmax"), &assign_WindGenType4IEC_diqmax)); - assign_map.insert(std::make_pair(std::string("cim:WindGenType4IEC.diqmin"), &assign_WindGenType4IEC_diqmin)); - assign_map.insert(std::make_pair(std::string("cim:WindGenType4IEC.tg"), &assign_WindGenType4IEC_tg)); + assign_map.emplace("cim:WindGenType4IEC.dipmax", &assign_WindGenType4IEC_dipmax); + assign_map.emplace("cim:WindGenType4IEC.diqmax", &assign_WindGenType4IEC_diqmax); + assign_map.emplace("cim:WindGenType4IEC.diqmin", &assign_WindGenType4IEC_diqmin); + assign_map.emplace("cim:WindGenType4IEC.tg", &assign_WindGenType4IEC_tg); } void WindGenType4IEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGenType4IEC.WindTurbineType4aIEC"), &assign_WindGenType4IEC_WindTurbineType4aIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindGenType4IEC.WindTurbineType4bIEC"), &assign_WindGenType4IEC_WindTurbineType4bIEC)); + assign_map.emplace("cim:WindGenType4IEC.WindTurbineType4aIEC", &assign_WindGenType4IEC_WindTurbineType4aIEC); + assign_map.emplace("cim:WindGenType4IEC.WindTurbineType4bIEC", &assign_WindGenType4IEC_WindTurbineType4bIEC); } void WindGenType4IEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindGenType4IEC.hpp b/CGMES_3.0.0/WindGenType4IEC.hpp index cd49c9ebc..e5ead6451 100644 --- a/CGMES_3.0.0/WindGenType4IEC.hpp +++ b/CGMES_3.0.0/WindGenType4IEC.hpp @@ -20,9 +20,7 @@ namespace CIMPP class WindTurbineType4aIEC; class WindTurbineType4bIEC; - /* - IEC type 4 generator set model. Reference: IEC 61400-27-1:2015, 5.6.3.4. - */ + /** \brief IEC type 4 generator set model. Reference: IEC 61400-27-1:2015, 5.6.3.4. */ class WindGenType4IEC : public IdentifiedObject { public: @@ -30,12 +28,23 @@ namespace CIMPP WindGenType4IEC(); ~WindGenType4IEC() override; - CIMPP::WindTurbineType4aIEC* WindTurbineType4aIEC; /* Wind turbine type 4A model with which this wind generator type 4 model is associated. Default: 0 */ - CIMPP::WindTurbineType4bIEC* WindTurbineType4bIEC; /* Wind turbine type 4B model with which this wind generator type 4 model is associated. Default: 0 */ - CIMPP::PU dipmax; /* Maximum active current ramp rate (<i>di</i><i><sub>pmax</sub></i>). It is a project-dependent parameter. Default: nullptr */ - CIMPP::PU diqmax; /* Maximum reactive current ramp rate (<i>di</i><i><sub>qmax</sub></i>). It is a project-dependent parameter. Default: nullptr */ - CIMPP::PU diqmin; /* Minimum reactive current ramp rate (<i>di</i><i><sub>qmin</sub></i>). It is a project-dependent parameter. Default: nullptr */ - CIMPP::Seconds tg; /* Time constant (<i>T</i><i><sub>g</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ + /** \brief Wind turbine type 4A model with which this wind generator type 4 model is associated. Default: 0 */ + CIMPP::WindTurbineType4aIEC* WindTurbineType4aIEC; + + /** \brief Wind turbine type 4B model with which this wind generator type 4 model is associated. Default: 0 */ + CIMPP::WindTurbineType4bIEC* WindTurbineType4bIEC; + + /** \brief Maximum active current ramp rate (<i>di</i><i><sub>pmax</sub></i>). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU dipmax; + + /** \brief Maximum reactive current ramp rate (<i>di</i><i><sub>qmax</sub></i>). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU diqmax; + + /** \brief Minimum reactive current ramp rate (<i>di</i><i><sub>qmin</sub></i>). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU diqmin; + + /** \brief Time constant (<i>T</i><i><sub>g</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ + CIMPP::Seconds tg; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindGenUnitKind.cpp b/CGMES_3.0.0/WindGenUnitKind.cpp index f92814598..c2290d973 100644 --- a/CGMES_3.0.0/WindGenUnitKind.cpp +++ b/CGMES_3.0.0/WindGenUnitKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "WindGenUnitKind") + if (EnumSymbol.substr(0, pos) != "WindGenUnitKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,12 +50,12 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "offshore") + if (EnumSymbol == "offshore") { rop = WindGenUnitKind::offshore; return lop; } - if(EnumSymbol == "onshore") + if (EnumSymbol == "onshore") { rop = WindGenUnitKind::onshore; return lop; diff --git a/CGMES_3.0.0/WindGenUnitKind.hpp b/CGMES_3.0.0/WindGenUnitKind.hpp index 4aa57c46c..52d17765c 100644 --- a/CGMES_3.0.0/WindGenUnitKind.hpp +++ b/CGMES_3.0.0/WindGenUnitKind.hpp @@ -9,21 +9,15 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Kind of wind generating unit. - */ + /** \brief Kind of wind generating unit. */ class WindGenUnitKind { public: enum WindGenUnitKind_ENUM { - /** - * The wind generating unit is located offshore. - */ + /** The wind generating unit is located offshore. */ offshore, - /** - * The wind generating unit is located onshore. - */ + /** The wind generating unit is located onshore. */ onshore, }; diff --git a/CGMES_3.0.0/WindGeneratingUnit.cpp b/CGMES_3.0.0/WindGeneratingUnit.cpp index 076d3d101..36288bf89 100644 --- a/CGMES_3.0.0/WindGeneratingUnit.cpp +++ b/CGMES_3.0.0/WindGeneratingUnit.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "WindPowerPlant.hpp" -#include "WindGenUnitKind.hpp" using namespace CIMPP; -WindGeneratingUnit::WindGeneratingUnit() : WindPowerPlant(nullptr) {}; -WindGeneratingUnit::~WindGeneratingUnit() {}; +WindGeneratingUnit::WindGeneratingUnit() : WindPowerPlant(nullptr) {} +WindGeneratingUnit::~WindGeneratingUnit() {} static const std::list PossibleProfilesForClass = { @@ -43,21 +42,6 @@ WindGeneratingUnit::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindGeneratingUnit_windGenUnitType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->windGenUnitType; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_WindPowerPlant_WindGeneratingUnits(BaseClass*, BaseClass*); bool assign_WindGeneratingUnit_WindPowerPlant(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -75,10 +59,24 @@ bool assign_WindGeneratingUnit_WindPowerPlant(BaseClass* BaseClass_ptr1, BaseCla return false; } +bool assign_WindGeneratingUnit_windGenUnitType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + WindGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->windGenUnitType; + if (!buffer.fail()) + { + return true; + } + } + return false; +} bool get_WindGeneratingUnit_WindPowerPlant(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const WindGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindPowerPlant != 0) { @@ -89,10 +87,10 @@ bool get_WindGeneratingUnit_WindPowerPlant(const BaseClass* BaseClass_ptr1, std: return false; } - bool get_WindGeneratingUnit_windGenUnitType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindGeneratingUnit* element = dynamic_cast(BaseClass_ptr1)) + const WindGeneratingUnit* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->windGenUnitType; if (!buffer.str().empty()) @@ -112,17 +110,17 @@ const char* WindGeneratingUnit::debugString() const void WindGeneratingUnit::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindGeneratingUnit"), &WindGeneratingUnit_factory)); + factory_map.emplace("cim:WindGeneratingUnit", &WindGeneratingUnit_factory); } void WindGeneratingUnit::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGeneratingUnit.windGenUnitType"), &assign_WindGeneratingUnit_windGenUnitType)); + assign_map.emplace("cim:WindGeneratingUnit.windGenUnitType", &assign_WindGeneratingUnit_windGenUnitType); } void WindGeneratingUnit::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindGeneratingUnit.WindPowerPlant"), &assign_WindGeneratingUnit_WindPowerPlant)); + assign_map.emplace("cim:WindGeneratingUnit.WindPowerPlant", &assign_WindGeneratingUnit_WindPowerPlant); } void WindGeneratingUnit::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindGeneratingUnit.hpp b/CGMES_3.0.0/WindGeneratingUnit.hpp index 50d439b0a..a1171697d 100644 --- a/CGMES_3.0.0/WindGeneratingUnit.hpp +++ b/CGMES_3.0.0/WindGeneratingUnit.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class WindPowerPlant; - /* - A wind driven generating unit, connected to the grid by means of a rotating machine. May be used to represent a single turbine or an aggregation. - */ + /** \brief A wind driven generating unit, connected to the grid by means of a rotating machine. May be used to represent a single turbine or an aggregation. */ class WindGeneratingUnit : public GeneratingUnit { public: @@ -28,8 +26,11 @@ namespace CIMPP WindGeneratingUnit(); ~WindGeneratingUnit() override; - CIMPP::WindPowerPlant* WindPowerPlant; /* A wind power plant may have wind generating units. Default: 0 */ - CIMPP::WindGenUnitKind windGenUnitType; /* The kind of wind generating unit. Default: 0 */ + /** \brief A wind power plant may have wind generating units. Default: 0 */ + CIMPP::WindPowerPlant* WindPowerPlant; + + /** \brief The kind of wind generating unit. Default: 0 */ + CIMPP::WindGenUnitKind windGenUnitType; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindLookupTableFunctionKind.cpp b/CGMES_3.0.0/WindLookupTableFunctionKind.cpp index de8925127..09feb7572 100644 --- a/CGMES_3.0.0/WindLookupTableFunctionKind.cpp +++ b/CGMES_3.0.0/WindLookupTableFunctionKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "WindLookupTableFunctionKind") + if (EnumSymbol.substr(0, pos) != "WindLookupTableFunctionKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,82 +50,82 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "prr") + if (EnumSymbol == "prr") { rop = WindLookupTableFunctionKind::prr; return lop; } - if(EnumSymbol == "omegap") + if (EnumSymbol == "omegap") { rop = WindLookupTableFunctionKind::omegap; return lop; } - if(EnumSymbol == "ipmax") + if (EnumSymbol == "ipmax") { rop = WindLookupTableFunctionKind::ipmax; return lop; } - if(EnumSymbol == "iqmax") + if (EnumSymbol == "iqmax") { rop = WindLookupTableFunctionKind::iqmax; return lop; } - if(EnumSymbol == "pwp") + if (EnumSymbol == "pwp") { rop = WindLookupTableFunctionKind::pwp; return lop; } - if(EnumSymbol == "tcwdu") + if (EnumSymbol == "tcwdu") { rop = WindLookupTableFunctionKind::tcwdu; return lop; } - if(EnumSymbol == "tduwt") + if (EnumSymbol == "tduwt") { rop = WindLookupTableFunctionKind::tduwt; return lop; } - if(EnumSymbol == "qmaxp") + if (EnumSymbol == "qmaxp") { rop = WindLookupTableFunctionKind::qmaxp; return lop; } - if(EnumSymbol == "qminp") + if (EnumSymbol == "qminp") { rop = WindLookupTableFunctionKind::qminp; return lop; } - if(EnumSymbol == "qmaxu") + if (EnumSymbol == "qmaxu") { rop = WindLookupTableFunctionKind::qmaxu; return lop; } - if(EnumSymbol == "qminu") + if (EnumSymbol == "qminu") { rop = WindLookupTableFunctionKind::qminu; return lop; } - if(EnumSymbol == "tuover") + if (EnumSymbol == "tuover") { rop = WindLookupTableFunctionKind::tuover; return lop; } - if(EnumSymbol == "tuunder") + if (EnumSymbol == "tuunder") { rop = WindLookupTableFunctionKind::tuunder; return lop; } - if(EnumSymbol == "tfover") + if (EnumSymbol == "tfover") { rop = WindLookupTableFunctionKind::tfover; return lop; } - if(EnumSymbol == "tfunder") + if (EnumSymbol == "tfunder") { rop = WindLookupTableFunctionKind::tfunder; return lop; } - if(EnumSymbol == "qwp") + if (EnumSymbol == "qwp") { rop = WindLookupTableFunctionKind::qwp; return lop; diff --git a/CGMES_3.0.0/WindLookupTableFunctionKind.hpp b/CGMES_3.0.0/WindLookupTableFunctionKind.hpp index ae550dd36..43230160a 100644 --- a/CGMES_3.0.0/WindLookupTableFunctionKind.hpp +++ b/CGMES_3.0.0/WindLookupTableFunctionKind.hpp @@ -9,77 +9,43 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Function of the lookup table. - */ + /** \brief Function of the lookup table. */ class WindLookupTableFunctionKind { public: enum WindLookupTableFunctionKind_ENUM { - /** - * Power versus speed change (negative slip) lookup table (p<sub>rr</sub>(deltaomega)). It is used for the rotor resistance control model, IEC 61400-27-1:2015, 5.6.5.3. - */ + /** Power versus speed change (negative slip) lookup table (p<sub>rr</sub>(deltaomega)). It is used for the rotor resistance control model, IEC 61400-27-1:2015, 5.6.5.3. */ prr, - /** - * Power vs. speed lookup table (omega(p)). It is used for the P control model type 3, IEC 61400-27-1:2015, 5.6.5.4. - */ + /** Power vs. speed lookup table (omega(p)). It is used for the P control model type 3, IEC 61400-27-1:2015, 5.6.5.4. */ omegap, - /** - * Lookup table for voltage dependency of active current limits (i<sub>pmax</sub>(u<sub>WT</sub>)). It is used for the current limitation model, IEC 61400-27-1:2015, 5.6.5.8. - */ + /** Lookup table for voltage dependency of active current limits (i<sub>pmax</sub>(u<sub>WT</sub>)). It is used for the current limitation model, IEC 61400-27-1:2015, 5.6.5.8. */ ipmax, - /** - * Lookup table for voltage dependency of reactive current limits (i<sub>qmax</sub>(u<sub>WT</sub>)). It is used for the current limitation model, IEC 61400-27-1:2015, 5.6.5.8. - */ + /** Lookup table for voltage dependency of reactive current limits (i<sub>qmax</sub>(u<sub>WT</sub>)). It is used for the current limitation model, IEC 61400-27-1:2015, 5.6.5.8. */ iqmax, - /** - * Power vs. frequency lookup table (p<sub>WPbias</sub>(f)). It is used for the wind power plant frequency and active power control model, IEC 61400-27-1:2015, Annex D. - */ + /** Power vs. frequency lookup table (p<sub>WPbias</sub>(f)). It is used for the wind power plant frequency and active power control model, IEC 61400-27-1:2015, Annex D. */ pwp, - /** - * Crowbar duration versus voltage variation look-up table (T<sub>CW</sub>(du)). It is a case-dependent parameter. It is used for the type 3B generator set model, IEC 61400-27-1:2015, 5.6.3.3. - */ + /** Crowbar duration versus voltage variation look-up table (T<sub>CW</sub>(du)). It is a case-dependent parameter. It is used for the type 3B generator set model, IEC 61400-27-1:2015, 5.6.3.3. */ tcwdu, - /** - * Lookup table to determine the duration of the power reduction after a voltage dip, depending on the size of the voltage dip (T<sub>d</sub>(u<sub>WT</sub>)). It is a type-dependent parameter. It is used for the pitch control power model, IEC 61400-27-1:2015, 5.6.5.1. - */ + /** Lookup table to determine the duration of the power reduction after a voltage dip, depending on the size of the voltage dip (T<sub>d</sub>(u<sub>WT</sub>)). It is a type-dependent parameter. It is used for the pitch control power model, IEC 61400-27-1:2015, 5.6.5.1. */ tduwt, - /** - * Lookup table for active power dependency of reactive power maximum limit (q<sub>maxp</sub>(p)). It is used for the QP and QU limitation model, IEC 61400-27-1:2015, 5.6.5.10. - */ + /** Lookup table for active power dependency of reactive power maximum limit (q<sub>maxp</sub>(p)). It is used for the QP and QU limitation model, IEC 61400-27-1:2015, 5.6.5.10. */ qmaxp, - /** - * Lookup table for active power dependency of reactive power minimum limit (q<sub>minp</sub>(p)). It is used for the QP and QU limitation model, IEC 61400-27-1:2015, 5.6.5.10. - */ + /** Lookup table for active power dependency of reactive power minimum limit (q<sub>minp</sub>(p)). It is used for the QP and QU limitation model, IEC 61400-27-1:2015, 5.6.5.10. */ qminp, - /** - * Lookup table for voltage dependency of reactive power maximum limit (q<sub>maxu</sub>(p)). It is used for the QP and QU limitation model, IEC 61400-27-1:2015, 5.6.5.10. - */ + /** Lookup table for voltage dependency of reactive power maximum limit (q<sub>maxu</sub>(p)). It is used for the QP and QU limitation model, IEC 61400-27-1:2015, 5.6.5.10. */ qmaxu, - /** - * Lookup table for voltage dependency of reactive power minimum limit (q<sub>minu</sub>(p)). It is used for the QP and QU limitation model, IEC 61400-27-1:2015, 5.6.5.10. - */ + /** Lookup table for voltage dependency of reactive power minimum limit (q<sub>minu</sub>(p)). It is used for the QP and QU limitation model, IEC 61400-27-1:2015, 5.6.5.10. */ qminu, - /** - * Disconnection time versus over-voltage lookup table (T<sub>uover</sub>(u<sub>WT</sub>)). It is used for the grid protection model, IEC 61400-27-1:2015, 5.6.6. - */ + /** Disconnection time versus over-voltage lookup table (T<sub>uover</sub>(u<sub>WT</sub>)). It is used for the grid protection model, IEC 61400-27-1:2015, 5.6.6. */ tuover, - /** - * Disconnection time versus under-voltage lookup table (T<sub>uunder</sub>(u<sub>WT</sub>)). It is used for the grid protection model, IEC 61400-27-1:2015, 5.6.6. - */ + /** Disconnection time versus under-voltage lookup table (T<sub>uunder</sub>(u<sub>WT</sub>)). It is used for the grid protection model, IEC 61400-27-1:2015, 5.6.6. */ tuunder, - /** - * Disconnection time versus over-frequency lookup table (T<sub>fover</sub>(f<sub>WT</sub>)). It is used for the grid protection model, IEC 61400-27-1:2015, 5.6.6. - */ + /** Disconnection time versus over-frequency lookup table (T<sub>fover</sub>(f<sub>WT</sub>)). It is used for the grid protection model, IEC 61400-27-1:2015, 5.6.6. */ tfover, - /** - * Disconnection time versus under-frequency lookup table (T<sub>funder</sub>(f<sub>WT</sub>)). It is used for the grid protection model, IEC 61400-27-1:2015, 5.6.6. - */ + /** Disconnection time versus under-frequency lookup table (T<sub>funder</sub>(f<sub>WT</sub>)). It is used for the grid protection model, IEC 61400-27-1:2015, 5.6.6. */ tfunder, - /** - * Look up table for the UQ static mode (q<sub>WP</sub>(u<sub>err</sub>)). It is used for the voltage and reactive power control model, IEC 61400-27-1:2015, Annex D. - */ + /** Look up table for the UQ static mode (q<sub>WP</sub>(u<sub>err</sub>)). It is used for the voltage and reactive power control model, IEC 61400-27-1:2015, Annex D. */ qwp, }; diff --git a/CGMES_3.0.0/WindMechIEC.cpp b/CGMES_3.0.0/WindMechIEC.cpp index 6966c80ba..36d81fd65 100644 --- a/CGMES_3.0.0/WindMechIEC.cpp +++ b/CGMES_3.0.0/WindMechIEC.cpp @@ -11,15 +11,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindTurbineType1or2IEC.hpp" #include "WindTurbineType3IEC.hpp" #include "WindTurbineType4bIEC.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" using namespace CIMPP; -WindMechIEC::WindMechIEC() : WindTurbineType1or2IEC(nullptr), WindTurbineType3IEC(nullptr), WindTurbineType4bIEC(nullptr) {}; -WindMechIEC::~WindMechIEC() {}; +WindMechIEC::WindMechIEC() : WindTurbineType1or2IEC(nullptr), WindTurbineType3IEC(nullptr), WindTurbineType4bIEC(nullptr) {} +WindMechIEC::~WindMechIEC() {} static const std::list PossibleProfilesForClass = { @@ -52,112 +48,120 @@ WindMechIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindMechIEC_cdrt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType1or2IEC_WindMechIEC(BaseClass*, BaseClass*); +bool assign_WindMechIEC_WindTurbineType1or2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + WindMechIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType1or2IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->cdrt; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType1or2IEC != element2) + { + element->WindTurbineType1or2IEC = element2; + return assign_WindTurbineType1or2IEC_WindMechIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindMechIEC_hgen(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType3IEC_WindMechIEC(BaseClass*, BaseClass*); +bool assign_WindMechIEC_WindTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + WindMechIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType3IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->hgen; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType3IEC != element2) + { + element->WindTurbineType3IEC = element2; + return assign_WindTurbineType3IEC_WindMechIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindMechIEC_hwtr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType4bIEC_WindMechIEC(BaseClass*, BaseClass*); +bool assign_WindMechIEC_WindTurbineType4bIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + WindMechIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType4bIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->hwtr; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType4bIEC != element2) + { + element->WindTurbineType4bIEC = element2; + return assign_WindTurbineType4bIEC_WindMechIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindMechIEC_kdrt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindMechIEC_cdrt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + WindMechIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->kdrt; - if (buffer.fail()) - return false; - else + buffer >> element->cdrt; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindTurbineType1or2IEC_WindMechIEC(BaseClass*, BaseClass*); -bool assign_WindMechIEC_WindTurbineType1or2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindMechIEC_hgen(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindMechIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType1or2IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType1or2IEC != element2) + buffer >> element->hgen; + if (!buffer.fail()) { - element->WindTurbineType1or2IEC = element2; - return assign_WindTurbineType1or2IEC_WindMechIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_WindTurbineType3IEC_WindMechIEC(BaseClass*, BaseClass*); -bool assign_WindMechIEC_WindTurbineType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_WindMechIEC_hwtr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindMechIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType3IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType3IEC != element2) + buffer >> element->hwtr; + if (!buffer.fail()) { - element->WindTurbineType3IEC = element2; - return assign_WindTurbineType3IEC_WindMechIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_WindTurbineType4bIEC_WindMechIEC(BaseClass*, BaseClass*); -bool assign_WindMechIEC_WindTurbineType4bIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_WindMechIEC_kdrt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindMechIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType4bIEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType4bIEC != element2) + buffer >> element->kdrt; + if (!buffer.fail()) { - element->WindTurbineType4bIEC = element2; - return assign_WindTurbineType4bIEC_WindMechIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + + + bool get_WindMechIEC_cdrt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindMechIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->cdrt; if (!buffer.str().empty()) @@ -171,7 +175,8 @@ bool get_WindMechIEC_cdrt(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_WindMechIEC_hgen(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindMechIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hgen; if (!buffer.str().empty()) @@ -185,7 +190,8 @@ bool get_WindMechIEC_hgen(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_WindMechIEC_hwtr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindMechIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->hwtr; if (!buffer.str().empty()) @@ -199,7 +205,8 @@ bool get_WindMechIEC_hwtr(const BaseClass* BaseClass_ptr1, std::stringstream& bu bool get_WindMechIEC_kdrt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindMechIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindMechIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kdrt; if (!buffer.str().empty()) @@ -211,8 +218,6 @@ bool get_WindMechIEC_kdrt(const BaseClass* BaseClass_ptr1, std::stringstream& bu return false; } - - const char WindMechIEC::debugName[] = "WindMechIEC"; const char* WindMechIEC::debugString() const { @@ -221,22 +226,22 @@ const char* WindMechIEC::debugString() const void WindMechIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindMechIEC"), &WindMechIEC_factory)); + factory_map.emplace("cim:WindMechIEC", &WindMechIEC_factory); } void WindMechIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindMechIEC.cdrt"), &assign_WindMechIEC_cdrt)); - assign_map.insert(std::make_pair(std::string("cim:WindMechIEC.hgen"), &assign_WindMechIEC_hgen)); - assign_map.insert(std::make_pair(std::string("cim:WindMechIEC.hwtr"), &assign_WindMechIEC_hwtr)); - assign_map.insert(std::make_pair(std::string("cim:WindMechIEC.kdrt"), &assign_WindMechIEC_kdrt)); + assign_map.emplace("cim:WindMechIEC.cdrt", &assign_WindMechIEC_cdrt); + assign_map.emplace("cim:WindMechIEC.hgen", &assign_WindMechIEC_hgen); + assign_map.emplace("cim:WindMechIEC.hwtr", &assign_WindMechIEC_hwtr); + assign_map.emplace("cim:WindMechIEC.kdrt", &assign_WindMechIEC_kdrt); } void WindMechIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindMechIEC.WindTurbineType1or2IEC"), &assign_WindMechIEC_WindTurbineType1or2IEC)); - assign_map.insert(std::make_pair(std::string("cim:WindMechIEC.WindTurbineType3IEC"), &assign_WindMechIEC_WindTurbineType3IEC)); - assign_map.insert(std::make_pair(std::string("cim:WindMechIEC.WindTurbineType4bIEC"), &assign_WindMechIEC_WindTurbineType4bIEC)); + assign_map.emplace("cim:WindMechIEC.WindTurbineType1or2IEC", &assign_WindMechIEC_WindTurbineType1or2IEC); + assign_map.emplace("cim:WindMechIEC.WindTurbineType3IEC", &assign_WindMechIEC_WindTurbineType3IEC); + assign_map.emplace("cim:WindMechIEC.WindTurbineType4bIEC", &assign_WindMechIEC_WindTurbineType4bIEC); } void WindMechIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindMechIEC.hpp b/CGMES_3.0.0/WindMechIEC.hpp index 8a78c0606..399101c72 100644 --- a/CGMES_3.0.0/WindMechIEC.hpp +++ b/CGMES_3.0.0/WindMechIEC.hpp @@ -21,9 +21,7 @@ namespace CIMPP class WindTurbineType3IEC; class WindTurbineType4bIEC; - /* - Two mass model. Reference: IEC 61400-27-1:2015, 5.6.2.1. - */ + /** \brief Two mass model. Reference: IEC 61400-27-1:2015, 5.6.2.1. */ class WindMechIEC : public IdentifiedObject { public: @@ -31,13 +29,26 @@ namespace CIMPP WindMechIEC(); ~WindMechIEC() override; - CIMPP::WindTurbineType1or2IEC* WindTurbineType1or2IEC; /* Wind generator type 1 or type 2 model with which this wind mechanical model is associated. Default: 0 */ - CIMPP::WindTurbineType3IEC* WindTurbineType3IEC; /* Wind turbine type 3 model with which this wind mechanical model is associated. Default: 0 */ - CIMPP::WindTurbineType4bIEC* WindTurbineType4bIEC; /* Wind turbine type 4B model with which this wind mechanical model is associated. Default: 0 */ - CIMPP::PU cdrt; /* Drive train damping (<i>c</i><i><sub>drt</sub></i><i>)</i>. It is a type-dependent parameter. Default: nullptr */ - CIMPP::Seconds hgen; /* Inertia constant of generator (<i>H</i><i><sub>gen</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ - CIMPP::Seconds hwtr; /* Inertia constant of wind turbine rotor (<i>H</i><i><sub>WTR</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU kdrt; /* Drive train stiffness (<i>k</i><i><sub>drt</sub></i>). It is a type-dependent parameter. Default: nullptr */ + /** \brief Wind generator type 1 or type 2 model with which this wind mechanical model is associated. Default: 0 */ + CIMPP::WindTurbineType1or2IEC* WindTurbineType1or2IEC; + + /** \brief Wind turbine type 3 model with which this wind mechanical model is associated. Default: 0 */ + CIMPP::WindTurbineType3IEC* WindTurbineType3IEC; + + /** \brief Wind turbine type 4B model with which this wind mechanical model is associated. Default: 0 */ + CIMPP::WindTurbineType4bIEC* WindTurbineType4bIEC; + + /** \brief Drive train damping (<i>c</i><i><sub>drt</sub></i><i>)</i>. It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU cdrt; + + /** \brief Inertia constant of generator (<i>H</i><i><sub>gen</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ + CIMPP::Seconds hgen; + + /** \brief Inertia constant of wind turbine rotor (<i>H</i><i><sub>WTR</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ + CIMPP::Seconds hwtr; + + /** \brief Drive train stiffness (<i>k</i><i><sub>drt</sub></i>). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU kdrt; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindPitchContPowerIEC.cpp b/CGMES_3.0.0/WindPitchContPowerIEC.cpp index eee09d2ee..424f5592d 100644 --- a/CGMES_3.0.0/WindPitchContPowerIEC.cpp +++ b/CGMES_3.0.0/WindPitchContPowerIEC.cpp @@ -11,18 +11,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindDynamicsLookupTable.hpp" #include "WindGenTurbineType1bIEC.hpp" #include "WindGenTurbineType2IEC.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" using namespace CIMPP; -WindPitchContPowerIEC::WindPitchContPowerIEC() : WindGenTurbineType1bIEC(nullptr), WindGenTurbineType2IEC(nullptr) {}; -WindPitchContPowerIEC::~WindPitchContPowerIEC() {}; +WindPitchContPowerIEC::WindPitchContPowerIEC() : WindGenTurbineType1bIEC(nullptr), WindGenTurbineType2IEC(nullptr) {} +WindPitchContPowerIEC::~WindPitchContPowerIEC() {} static const std::list PossibleProfilesForClass = { @@ -58,151 +51,162 @@ WindPitchContPowerIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindPitchContPowerIEC_dpmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindDynamicsLookupTable_WindPitchContPowerIEC(BaseClass*, BaseClass*); +bool assign_WindPitchContPowerIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1); + WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->dpmax; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) + { + element->WindDynamicsLookupTable.push_back(element2); + return assign_WindDynamicsLookupTable_WindPitchContPowerIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindPitchContPowerIEC_dpmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType1bIEC_WindPitchContPowerIEC(BaseClass*, BaseClass*); +bool assign_WindPitchContPowerIEC_WindGenTurbineType1bIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1); + WindGenTurbineType1bIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->dpmin; - if (buffer.fail()) - return false; - else - return true; + if (element->WindGenTurbineType1bIEC != element2) + { + element->WindGenTurbineType1bIEC = element2; + return assign_WindGenTurbineType1bIEC_WindPitchContPowerIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindPitchContPowerIEC_pmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindGenTurbineType2IEC_WindPitchContPowerIEC(BaseClass*, BaseClass*); +bool assign_WindPitchContPowerIEC_WindGenTurbineType2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1); + WindGenTurbineType2IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->pmin; - if (buffer.fail()) - return false; - else - return true; + if (element->WindGenTurbineType2IEC != element2) + { + element->WindGenTurbineType2IEC = element2; + return assign_WindGenTurbineType2IEC_WindPitchContPowerIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindPitchContPowerIEC_pset(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPitchContPowerIEC_dpmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->pset; - if (buffer.fail()) - return false; - else + buffer >> element->dpmax; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPitchContPowerIEC_t1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPitchContPowerIEC_dpmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->t1; - if (buffer.fail()) - return false; - else + buffer >> element->dpmin; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPitchContPowerIEC_tr(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPitchContPowerIEC_pmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tr; - if (buffer.fail()) - return false; - else + buffer >> element->pmin; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPitchContPowerIEC_uuvrt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPitchContPowerIEC_pset(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->uuvrt; - if (buffer.fail()) - return false; - else + buffer >> element->pset; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindDynamicsLookupTable_WindPitchContPowerIEC(BaseClass*, BaseClass*); -bool assign_WindPitchContPowerIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindPitchContPowerIEC_t1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1); - WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) + buffer >> element->t1; + if (!buffer.fail()) { - element->WindDynamicsLookupTable.push_back(element2); - return assign_WindDynamicsLookupTable_WindPitchContPowerIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_WindGenTurbineType1bIEC_WindPitchContPowerIEC(BaseClass*, BaseClass*); -bool assign_WindPitchContPowerIEC_WindGenTurbineType1bIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_WindPitchContPowerIEC_tr(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1); - WindGenTurbineType1bIEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindGenTurbineType1bIEC != element2) + buffer >> element->tr; + if (!buffer.fail()) { - element->WindGenTurbineType1bIEC = element2; - return assign_WindGenTurbineType1bIEC_WindPitchContPowerIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_WindGenTurbineType2IEC_WindPitchContPowerIEC(BaseClass*, BaseClass*); -bool assign_WindPitchContPowerIEC_WindGenTurbineType2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_WindPitchContPowerIEC_uuvrt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1); - WindGenTurbineType2IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindGenTurbineType2IEC != element2) + buffer >> element->uuvrt; + if (!buffer.fail()) { - element->WindGenTurbineType2IEC = element2; - return assign_WindGenTurbineType2IEC_WindPitchContPowerIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + + + bool get_WindPitchContPowerIEC_dpmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dpmax; if (!buffer.str().empty()) @@ -216,7 +220,8 @@ bool get_WindPitchContPowerIEC_dpmax(const BaseClass* BaseClass_ptr1, std::strin bool get_WindPitchContPowerIEC_dpmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dpmin; if (!buffer.str().empty()) @@ -230,7 +235,8 @@ bool get_WindPitchContPowerIEC_dpmin(const BaseClass* BaseClass_ptr1, std::strin bool get_WindPitchContPowerIEC_pmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pmin; if (!buffer.str().empty()) @@ -244,7 +250,8 @@ bool get_WindPitchContPowerIEC_pmin(const BaseClass* BaseClass_ptr1, std::string bool get_WindPitchContPowerIEC_pset(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->pset; if (!buffer.str().empty()) @@ -258,7 +265,8 @@ bool get_WindPitchContPowerIEC_pset(const BaseClass* BaseClass_ptr1, std::string bool get_WindPitchContPowerIEC_t1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->t1; if (!buffer.str().empty()) @@ -272,7 +280,8 @@ bool get_WindPitchContPowerIEC_t1(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindPitchContPowerIEC_tr(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tr; if (!buffer.str().empty()) @@ -286,7 +295,8 @@ bool get_WindPitchContPowerIEC_tr(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindPitchContPowerIEC_uuvrt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPitchContPowerIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uuvrt; if (!buffer.str().empty()) @@ -298,8 +308,6 @@ bool get_WindPitchContPowerIEC_uuvrt(const BaseClass* BaseClass_ptr1, std::strin return false; } - - const char WindPitchContPowerIEC::debugName[] = "WindPitchContPowerIEC"; const char* WindPitchContPowerIEC::debugString() const { @@ -308,25 +316,25 @@ const char* WindPitchContPowerIEC::debugString() const void WindPitchContPowerIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindPitchContPowerIEC"), &WindPitchContPowerIEC_factory)); + factory_map.emplace("cim:WindPitchContPowerIEC", &WindPitchContPowerIEC_factory); } void WindPitchContPowerIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPitchContPowerIEC.dpmax"), &assign_WindPitchContPowerIEC_dpmax)); - assign_map.insert(std::make_pair(std::string("cim:WindPitchContPowerIEC.dpmin"), &assign_WindPitchContPowerIEC_dpmin)); - assign_map.insert(std::make_pair(std::string("cim:WindPitchContPowerIEC.pmin"), &assign_WindPitchContPowerIEC_pmin)); - assign_map.insert(std::make_pair(std::string("cim:WindPitchContPowerIEC.pset"), &assign_WindPitchContPowerIEC_pset)); - assign_map.insert(std::make_pair(std::string("cim:WindPitchContPowerIEC.t1"), &assign_WindPitchContPowerIEC_t1)); - assign_map.insert(std::make_pair(std::string("cim:WindPitchContPowerIEC.tr"), &assign_WindPitchContPowerIEC_tr)); - assign_map.insert(std::make_pair(std::string("cim:WindPitchContPowerIEC.uuvrt"), &assign_WindPitchContPowerIEC_uuvrt)); + assign_map.emplace("cim:WindPitchContPowerIEC.dpmax", &assign_WindPitchContPowerIEC_dpmax); + assign_map.emplace("cim:WindPitchContPowerIEC.dpmin", &assign_WindPitchContPowerIEC_dpmin); + assign_map.emplace("cim:WindPitchContPowerIEC.pmin", &assign_WindPitchContPowerIEC_pmin); + assign_map.emplace("cim:WindPitchContPowerIEC.pset", &assign_WindPitchContPowerIEC_pset); + assign_map.emplace("cim:WindPitchContPowerIEC.t1", &assign_WindPitchContPowerIEC_t1); + assign_map.emplace("cim:WindPitchContPowerIEC.tr", &assign_WindPitchContPowerIEC_tr); + assign_map.emplace("cim:WindPitchContPowerIEC.uuvrt", &assign_WindPitchContPowerIEC_uuvrt); } void WindPitchContPowerIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPitchContPowerIEC.WindDynamicsLookupTable"), &assign_WindPitchContPowerIEC_WindDynamicsLookupTable)); - assign_map.insert(std::make_pair(std::string("cim:WindPitchContPowerIEC.WindGenTurbineType1bIEC"), &assign_WindPitchContPowerIEC_WindGenTurbineType1bIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindPitchContPowerIEC.WindGenTurbineType2IEC"), &assign_WindPitchContPowerIEC_WindGenTurbineType2IEC)); + assign_map.emplace("cim:WindPitchContPowerIEC.WindDynamicsLookupTable", &assign_WindPitchContPowerIEC_WindDynamicsLookupTable); + assign_map.emplace("cim:WindPitchContPowerIEC.WindGenTurbineType1bIEC", &assign_WindPitchContPowerIEC_WindGenTurbineType1bIEC); + assign_map.emplace("cim:WindPitchContPowerIEC.WindGenTurbineType2IEC", &assign_WindPitchContPowerIEC_WindGenTurbineType2IEC); } void WindPitchContPowerIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindPitchContPowerIEC.hpp b/CGMES_3.0.0/WindPitchContPowerIEC.hpp index d015bf748..cf707c5e0 100644 --- a/CGMES_3.0.0/WindPitchContPowerIEC.hpp +++ b/CGMES_3.0.0/WindPitchContPowerIEC.hpp @@ -21,9 +21,7 @@ namespace CIMPP class WindGenTurbineType1bIEC; class WindGenTurbineType2IEC; - /* - Pitch control power model. Reference: IEC 61400-27-1:2015, 5.6.5.1. - */ + /** \brief Pitch control power model. Reference: IEC 61400-27-1:2015, 5.6.5.1. */ class WindPitchContPowerIEC : public IdentifiedObject { public: @@ -31,16 +29,35 @@ namespace CIMPP WindPitchContPowerIEC(); ~WindPitchContPowerIEC() override; - std::list WindDynamicsLookupTable; /* The wind dynamics lookup table associated with this pitch control power model. Default: 0 */ - CIMPP::WindGenTurbineType1bIEC* WindGenTurbineType1bIEC; /* Wind turbine type 1B model with which this pitch control power model is associated. Default: 0 */ - CIMPP::WindGenTurbineType2IEC* WindGenTurbineType2IEC; /* Wind turbine type 2 model with which this pitch control power model is associated. Default: 0 */ - CIMPP::PU dpmax; /* Rate limit for increasing power (<i>dp</i><i><sub>max</sub></i>) (&gt; WindPitchContPowerIEC.dpmin). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU dpmin; /* Rate limit for decreasing power (<i>dp</i><i><sub>min</sub></i>) (&lt; WindPitchContPowerIEC.dpmax). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU pmin; /* Minimum power setting (<i>p</i><i><sub>min</sub></i>). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU pset; /* If <i>p</i><i><sub>init</sub></i><sub> </sub>&lt; <i>p</i><i><sub>set</sub></i><sub> </sub>then power will be ramped down to <i>p</i><i><sub>min</sub></i>. It is (<i>p</i><i><sub>set</sub></i>) in the IEC 61400-27-1:2015. It is a type-dependent parameter. Default: nullptr */ - CIMPP::Seconds t1; /* Lag time constant (<i>T</i><i><sub>1</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ - CIMPP::Seconds tr; /* Voltage measurement time constant (<i>T</i><i><sub>r</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU uuvrt; /* Dip detection threshold (<i>u</i><i><sub>UVRT</sub></i>). It is a type-dependent parameter. Default: nullptr */ + /** \brief The wind dynamics lookup table associated with this pitch control power model. Default: 0 */ + std::list WindDynamicsLookupTable; + + /** \brief Wind turbine type 1B model with which this pitch control power model is associated. Default: 0 */ + CIMPP::WindGenTurbineType1bIEC* WindGenTurbineType1bIEC; + + /** \brief Wind turbine type 2 model with which this pitch control power model is associated. Default: 0 */ + CIMPP::WindGenTurbineType2IEC* WindGenTurbineType2IEC; + + /** \brief Rate limit for increasing power (<i>dp</i><i><sub>max</sub></i>) (&gt; WindPitchContPowerIEC.dpmin). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU dpmax; + + /** \brief Rate limit for decreasing power (<i>dp</i><i><sub>min</sub></i>) (&lt; WindPitchContPowerIEC.dpmax). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU dpmin; + + /** \brief Minimum power setting (<i>p</i><i><sub>min</sub></i>). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU pmin; + + /** \brief If <i>p</i><i><sub>init</sub></i><sub> </sub>&lt; <i>p</i><i><sub>set</sub></i><sub> </sub>then power will be ramped down to <i>p</i><i><sub>min</sub></i>. It is (<i>p</i><i><sub>set</sub></i>) in the IEC 61400-27-1:2015. It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU pset; + + /** \brief Lag time constant (<i>T</i><i><sub>1</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ + CIMPP::Seconds t1; + + /** \brief Voltage measurement time constant (<i>T</i><i><sub>r</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ + CIMPP::Seconds tr; + + /** \brief Dip detection threshold (<i>u</i><i><sub>UVRT</sub></i>). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU uuvrt; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindPlantDynamics.cpp b/CGMES_3.0.0/WindPlantDynamics.cpp index 07c27bcf5..c89fc1bb8 100644 --- a/CGMES_3.0.0/WindPlantDynamics.cpp +++ b/CGMES_3.0.0/WindPlantDynamics.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindPlantDynamics::WindPlantDynamics() : RemoteInputSignal(nullptr) {}; -WindPlantDynamics::~WindPlantDynamics() {}; +WindPlantDynamics::WindPlantDynamics() : RemoteInputSignal(nullptr) {} +WindPlantDynamics::~WindPlantDynamics() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ WindPlantDynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_RemoteInputSignal_WindPlantDynamics(BaseClass*, BaseClass*); bool assign_WindPlantDynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_WindPlantDynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseC } return false; } + bool assign_WindTurbineType3or4Dynamics_WindPlantDynamics(BaseClass*, BaseClass*); bool assign_WindPlantDynamics_WindTurbineType3or4Dynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_WindPlantDynamics_WindTurbineType3or4Dynamics(BaseClass* BaseClass_p return false; } - bool get_WindPlantDynamics_RemoteInputSignal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindPlantDynamics* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantDynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->RemoteInputSignal != 0) { @@ -100,7 +99,7 @@ const char* WindPlantDynamics::debugString() const void WindPlantDynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindPlantDynamics"), &WindPlantDynamics_factory)); + factory_map.emplace("cim:WindPlantDynamics", &WindPlantDynamics_factory); } void WindPlantDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -109,8 +108,8 @@ void WindPlantDynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPlantDynamics.RemoteInputSignal"), &assign_WindPlantDynamics_RemoteInputSignal)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantDynamics.WindTurbineType3or4Dynamics"), &assign_WindPlantDynamics_WindTurbineType3or4Dynamics)); + assign_map.emplace("cim:WindPlantDynamics.RemoteInputSignal", &assign_WindPlantDynamics_RemoteInputSignal); + assign_map.emplace("cim:WindPlantDynamics.WindTurbineType3or4Dynamics", &assign_WindPlantDynamics_WindTurbineType3or4Dynamics); } void WindPlantDynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindPlantDynamics.hpp b/CGMES_3.0.0/WindPlantDynamics.hpp index de68526ca..f8475b535 100644 --- a/CGMES_3.0.0/WindPlantDynamics.hpp +++ b/CGMES_3.0.0/WindPlantDynamics.hpp @@ -18,9 +18,7 @@ namespace CIMPP class RemoteInputSignal; class WindTurbineType3or4Dynamics; - /* - Parent class supporting relationships to wind turbines type 3 and type 4 and wind plant IEC and user-defined wind plants including their control models. - */ + /** \brief Parent class supporting relationships to wind turbines type 3 and type 4 and wind plant IEC and user-defined wind plants including their control models. */ class WindPlantDynamics : public DynamicsFunctionBlock { public: @@ -28,8 +26,11 @@ namespace CIMPP WindPlantDynamics(); ~WindPlantDynamics() override; - CIMPP::RemoteInputSignal* RemoteInputSignal; /* The remote signal with which this power plant is associated. Default: 0 */ - std::list WindTurbineType3or4Dynamics; /* The wind turbine type 3 or type 4 associated with this wind plant. Default: 0 */ + /** \brief The remote signal with which this power plant is associated. Default: 0 */ + CIMPP::RemoteInputSignal* RemoteInputSignal; + + /** \brief The wind turbine type 3 or type 4 associated with this wind plant. Default: 0 */ + std::list WindTurbineType3or4Dynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindPlantFreqPcontrolIEC.cpp b/CGMES_3.0.0/WindPlantFreqPcontrolIEC.cpp index f65f7ae33..e8b85f2ab 100644 --- a/CGMES_3.0.0/WindPlantFreqPcontrolIEC.cpp +++ b/CGMES_3.0.0/WindPlantFreqPcontrolIEC.cpp @@ -10,26 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindDynamicsLookupTable.hpp" #include "WindPlantIEC.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" using namespace CIMPP; -WindPlantFreqPcontrolIEC::WindPlantFreqPcontrolIEC() : WindPlantIEC(nullptr) {}; -WindPlantFreqPcontrolIEC::~WindPlantFreqPcontrolIEC() {}; +WindPlantFreqPcontrolIEC::WindPlantFreqPcontrolIEC() : WindPlantIEC(nullptr) {} +WindPlantFreqPcontrolIEC::~WindPlantFreqPcontrolIEC() {} static const std::list PossibleProfilesForClass = { @@ -72,239 +57,256 @@ WindPlantFreqPcontrolIEC::getPossibleProfilesForAttributes() const return map; } +bool assign_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC(BaseClass*, BaseClass*); +bool assign_WindPlantFreqPcontrolIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) + { + element->WindDynamicsLookupTable.push_back(element2); + return assign_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindPlantIEC_WindPlantFreqPcontrolIEC(BaseClass*, BaseClass*); +bool assign_WindPlantFreqPcontrolIEC_WindPlantIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + WindPlantIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindPlantIEC != element2) + { + element->WindPlantIEC = element2; + return assign_WindPlantIEC_WindPlantFreqPcontrolIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_WindPlantFreqPcontrolIEC_dprefmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_dprefmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dprefmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantFreqPcontrolIEC_dprefmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_dprefmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dprefmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantFreqPcontrolIEC_dpwprefmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_dpwprefmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dpwprefmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantFreqPcontrolIEC_dpwprefmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_dpwprefmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dpwprefmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantFreqPcontrolIEC_kiwpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_kiwpp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kiwpp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantFreqPcontrolIEC_kiwppmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_kiwppmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kiwppmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantFreqPcontrolIEC_kiwppmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_kiwppmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kiwppmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantFreqPcontrolIEC_kpwpp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_kpwpp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpwpp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantFreqPcontrolIEC_kwppref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_kwppref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kwppref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantFreqPcontrolIEC_prefmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_prefmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->prefmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantFreqPcontrolIEC_prefmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_prefmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->prefmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantFreqPcontrolIEC_tpft(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_tpft(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpft; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantFreqPcontrolIEC_tpfv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_tpfv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tpfv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantFreqPcontrolIEC_twpffiltp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_twpffiltp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->twpffiltp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantFreqPcontrolIEC_twppfiltp(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantFreqPcontrolIEC_twppfiltp(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->twppfiltp; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC(BaseClass*, BaseClass*); -bool assign_WindPlantFreqPcontrolIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) -{ - WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); - WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) - { - if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) - { - element->WindDynamicsLookupTable.push_back(element2); - return assign_WindDynamicsLookupTable_WindPlantFreqPcontrolIEC(BaseClass_ptr2, BaseClass_ptr1); - } - return true; - } - return false; -} -bool assign_WindPlantIEC_WindPlantFreqPcontrolIEC(BaseClass*, BaseClass*); -bool assign_WindPlantFreqPcontrolIEC_WindPlantIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) -{ - WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); - WindPlantIEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) - { - if (element->WindPlantIEC != element2) - { - element->WindPlantIEC = element2; - return assign_WindPlantIEC_WindPlantFreqPcontrolIEC(BaseClass_ptr2, BaseClass_ptr1); - } - return true; - } - return false; -} bool get_WindPlantFreqPcontrolIEC_dprefmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dprefmax; if (!buffer.str().empty()) @@ -318,7 +320,8 @@ bool get_WindPlantFreqPcontrolIEC_dprefmax(const BaseClass* BaseClass_ptr1, std: bool get_WindPlantFreqPcontrolIEC_dprefmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dprefmin; if (!buffer.str().empty()) @@ -332,7 +335,8 @@ bool get_WindPlantFreqPcontrolIEC_dprefmin(const BaseClass* BaseClass_ptr1, std: bool get_WindPlantFreqPcontrolIEC_dpwprefmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dpwprefmax; if (!buffer.str().empty()) @@ -346,7 +350,8 @@ bool get_WindPlantFreqPcontrolIEC_dpwprefmax(const BaseClass* BaseClass_ptr1, st bool get_WindPlantFreqPcontrolIEC_dpwprefmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dpwprefmin; if (!buffer.str().empty()) @@ -360,7 +365,8 @@ bool get_WindPlantFreqPcontrolIEC_dpwprefmin(const BaseClass* BaseClass_ptr1, st bool get_WindPlantFreqPcontrolIEC_kiwpp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kiwpp; if (!buffer.str().empty()) @@ -374,7 +380,8 @@ bool get_WindPlantFreqPcontrolIEC_kiwpp(const BaseClass* BaseClass_ptr1, std::st bool get_WindPlantFreqPcontrolIEC_kiwppmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kiwppmax; if (!buffer.str().empty()) @@ -388,7 +395,8 @@ bool get_WindPlantFreqPcontrolIEC_kiwppmax(const BaseClass* BaseClass_ptr1, std: bool get_WindPlantFreqPcontrolIEC_kiwppmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kiwppmin; if (!buffer.str().empty()) @@ -402,7 +410,8 @@ bool get_WindPlantFreqPcontrolIEC_kiwppmin(const BaseClass* BaseClass_ptr1, std: bool get_WindPlantFreqPcontrolIEC_kpwpp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpwpp; if (!buffer.str().empty()) @@ -416,7 +425,8 @@ bool get_WindPlantFreqPcontrolIEC_kpwpp(const BaseClass* BaseClass_ptr1, std::st bool get_WindPlantFreqPcontrolIEC_kwppref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kwppref; if (!buffer.str().empty()) @@ -430,7 +440,8 @@ bool get_WindPlantFreqPcontrolIEC_kwppref(const BaseClass* BaseClass_ptr1, std:: bool get_WindPlantFreqPcontrolIEC_prefmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->prefmax; if (!buffer.str().empty()) @@ -444,7 +455,8 @@ bool get_WindPlantFreqPcontrolIEC_prefmax(const BaseClass* BaseClass_ptr1, std:: bool get_WindPlantFreqPcontrolIEC_prefmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->prefmin; if (!buffer.str().empty()) @@ -458,7 +470,8 @@ bool get_WindPlantFreqPcontrolIEC_prefmin(const BaseClass* BaseClass_ptr1, std:: bool get_WindPlantFreqPcontrolIEC_tpft(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpft; if (!buffer.str().empty()) @@ -472,7 +485,8 @@ bool get_WindPlantFreqPcontrolIEC_tpft(const BaseClass* BaseClass_ptr1, std::str bool get_WindPlantFreqPcontrolIEC_tpfv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpfv; if (!buffer.str().empty()) @@ -486,7 +500,8 @@ bool get_WindPlantFreqPcontrolIEC_tpfv(const BaseClass* BaseClass_ptr1, std::str bool get_WindPlantFreqPcontrolIEC_twpffiltp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twpffiltp; if (!buffer.str().empty()) @@ -500,7 +515,8 @@ bool get_WindPlantFreqPcontrolIEC_twpffiltp(const BaseClass* BaseClass_ptr1, std bool get_WindPlantFreqPcontrolIEC_twppfiltp(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantFreqPcontrolIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twppfiltp; if (!buffer.str().empty()) @@ -512,8 +528,6 @@ bool get_WindPlantFreqPcontrolIEC_twppfiltp(const BaseClass* BaseClass_ptr1, std return false; } - - const char WindPlantFreqPcontrolIEC::debugName[] = "WindPlantFreqPcontrolIEC"; const char* WindPlantFreqPcontrolIEC::debugString() const { @@ -522,32 +536,32 @@ const char* WindPlantFreqPcontrolIEC::debugString() const void WindPlantFreqPcontrolIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC"), &WindPlantFreqPcontrolIEC_factory)); + factory_map.emplace("cim:WindPlantFreqPcontrolIEC", &WindPlantFreqPcontrolIEC_factory); } void WindPlantFreqPcontrolIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.dprefmax"), &assign_WindPlantFreqPcontrolIEC_dprefmax)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.dprefmin"), &assign_WindPlantFreqPcontrolIEC_dprefmin)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.dpwprefmax"), &assign_WindPlantFreqPcontrolIEC_dpwprefmax)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.dpwprefmin"), &assign_WindPlantFreqPcontrolIEC_dpwprefmin)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.kiwpp"), &assign_WindPlantFreqPcontrolIEC_kiwpp)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.kiwppmax"), &assign_WindPlantFreqPcontrolIEC_kiwppmax)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.kiwppmin"), &assign_WindPlantFreqPcontrolIEC_kiwppmin)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.kpwpp"), &assign_WindPlantFreqPcontrolIEC_kpwpp)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.kwppref"), &assign_WindPlantFreqPcontrolIEC_kwppref)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.prefmax"), &assign_WindPlantFreqPcontrolIEC_prefmax)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.prefmin"), &assign_WindPlantFreqPcontrolIEC_prefmin)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.tpft"), &assign_WindPlantFreqPcontrolIEC_tpft)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.tpfv"), &assign_WindPlantFreqPcontrolIEC_tpfv)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.twpffiltp"), &assign_WindPlantFreqPcontrolIEC_twpffiltp)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.twppfiltp"), &assign_WindPlantFreqPcontrolIEC_twppfiltp)); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.dprefmax", &assign_WindPlantFreqPcontrolIEC_dprefmax); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.dprefmin", &assign_WindPlantFreqPcontrolIEC_dprefmin); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.dpwprefmax", &assign_WindPlantFreqPcontrolIEC_dpwprefmax); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.dpwprefmin", &assign_WindPlantFreqPcontrolIEC_dpwprefmin); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.kiwpp", &assign_WindPlantFreqPcontrolIEC_kiwpp); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.kiwppmax", &assign_WindPlantFreqPcontrolIEC_kiwppmax); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.kiwppmin", &assign_WindPlantFreqPcontrolIEC_kiwppmin); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.kpwpp", &assign_WindPlantFreqPcontrolIEC_kpwpp); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.kwppref", &assign_WindPlantFreqPcontrolIEC_kwppref); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.prefmax", &assign_WindPlantFreqPcontrolIEC_prefmax); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.prefmin", &assign_WindPlantFreqPcontrolIEC_prefmin); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.tpft", &assign_WindPlantFreqPcontrolIEC_tpft); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.tpfv", &assign_WindPlantFreqPcontrolIEC_tpfv); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.twpffiltp", &assign_WindPlantFreqPcontrolIEC_twpffiltp); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.twppfiltp", &assign_WindPlantFreqPcontrolIEC_twppfiltp); } void WindPlantFreqPcontrolIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.WindDynamicsLookupTable"), &assign_WindPlantFreqPcontrolIEC_WindDynamicsLookupTable)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantFreqPcontrolIEC.WindPlantIEC"), &assign_WindPlantFreqPcontrolIEC_WindPlantIEC)); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.WindDynamicsLookupTable", &assign_WindPlantFreqPcontrolIEC_WindDynamicsLookupTable); + assign_map.emplace("cim:WindPlantFreqPcontrolIEC.WindPlantIEC", &assign_WindPlantFreqPcontrolIEC_WindPlantIEC); } void WindPlantFreqPcontrolIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindPlantFreqPcontrolIEC.hpp b/CGMES_3.0.0/WindPlantFreqPcontrolIEC.hpp index 7b48d6243..039e72f9e 100644 --- a/CGMES_3.0.0/WindPlantFreqPcontrolIEC.hpp +++ b/CGMES_3.0.0/WindPlantFreqPcontrolIEC.hpp @@ -21,9 +21,7 @@ namespace CIMPP class WindDynamicsLookupTable; class WindPlantIEC; - /* - Frequency and active power controller model. Reference: IEC 61400-27-1:2015, Annex D. - */ + /** \brief Frequency and active power controller model. Reference: IEC 61400-27-1:2015, Annex D. */ class WindPlantFreqPcontrolIEC : public IdentifiedObject { public: @@ -31,23 +29,56 @@ namespace CIMPP WindPlantFreqPcontrolIEC(); ~WindPlantFreqPcontrolIEC() override; - std::list WindDynamicsLookupTable; /* The wind dynamics lookup table associated with this frequency and active power wind plant model. Default: 0 */ - CIMPP::WindPlantIEC* WindPlantIEC; /* Wind plant model with which this wind plant frequency and active power control is associated. Default: 0 */ - CIMPP::PU dprefmax; /* Maximum ramp rate of <i>p</i><i><sub>WTref</sub></i> request from the plant controller to the wind turbines (<i>dp</i><i><sub>refmax</sub></i>) (&gt; WindPlantFreqPcontrolIEC.dprefmin). It is a case-dependent parameter. Default: nullptr */ - CIMPP::PU dprefmin; /* Minimum (negative) ramp rate of <i>p</i><i><sub>WTref</sub></i> request from the plant controller to the wind turbines (<i>dp</i><i><sub>refmin</sub></i>) (&lt; WindPlantFreqPcontrolIEC.dprefmax). It is a project-dependent parameter. Default: nullptr */ - CIMPP::PU dpwprefmax; /* Maximum positive ramp rate for wind plant power reference (<i>dp</i><i><sub>WPrefmax</sub></i>) (&gt; WindPlantFreqPcontrolIEC.dpwprefmin). It is a project-dependent parameter. Default: nullptr */ - CIMPP::PU dpwprefmin; /* Maximum negative ramp rate for wind plant power reference (<i>dp</i><i><sub>WPrefmin</sub></i>) (&lt; WindPlantFreqPcontrolIEC.dpwprefmax). It is a project-dependent parameter. Default: nullptr */ - CIMPP::Float kiwpp; /* Plant P controller integral gain (<i>K</i><i><sub>IWPp</sub></i>). It is a project-dependent parameter. Default: 0.0 */ - CIMPP::PU kiwppmax; /* Maximum PI integrator term (<i>K</i><i><sub>IWPpmax</sub></i>) (&gt; WindPlantFreqPcontrolIEC.kiwppmin). It is a project-dependent parameter. Default: nullptr */ - CIMPP::PU kiwppmin; /* Minimum PI integrator term (<i>K</i><i><sub>IWPpmin</sub></i>) (&lt; WindPlantFreqPcontrolIEC.kiwppmax). It is a project-dependent parameter. Default: nullptr */ - CIMPP::Float kpwpp; /* Plant P controller proportional gain (<i>K</i><i><sub>PWPp</sub></i>). It is a project-dependent parameter. Default: 0.0 */ - CIMPP::PU kwppref; /* Power reference gain (<i>K</i><i><sub>WPpref</sub></i>). It is a project-dependent parameter. Default: nullptr */ - CIMPP::PU prefmax; /* Maximum <i>p</i><i><sub>WTref</sub></i> request from the plant controller to the wind turbines (<i>p</i><i><sub>refmax</sub></i>) (&gt; WindPlantFreqPcontrolIEC.prefmin). It is a project-dependent parameter. Default: nullptr */ - CIMPP::PU prefmin; /* Minimum <i>p</i><i><sub>WTref</sub></i> request from the plant controller to the wind turbines (<i>p</i><i><sub>refmin</sub></i>) (&lt; WindPlantFreqPcontrolIEC.prefmax). It is a project-dependent parameter. Default: nullptr */ - CIMPP::Seconds tpft; /* Lead time constant in reference value transfer function (<i>T</i><i><sub>pft</sub></i>) (&gt;= 0). It is a project-dependent parameter. Default: nullptr */ - CIMPP::Seconds tpfv; /* Lag time constant in reference value transfer function (<i>T</i><i><sub>pfv</sub></i>) (&gt;= 0). It is a project-dependent parameter. Default: nullptr */ - CIMPP::Seconds twpffiltp; /* Filter time constant for frequency measurement (<i>T</i><i><sub>WPffiltp</sub></i>) (&gt;= 0). It is a project-dependent parameter. Default: nullptr */ - CIMPP::Seconds twppfiltp; /* Filter time constant for active power measurement (<i>T</i><i><sub>WPpfiltp</sub></i>) (&gt;= 0). It is a project-dependent parameter. Default: nullptr */ + /** \brief The wind dynamics lookup table associated with this frequency and active power wind plant model. Default: 0 */ + std::list WindDynamicsLookupTable; + + /** \brief Wind plant model with which this wind plant frequency and active power control is associated. Default: 0 */ + CIMPP::WindPlantIEC* WindPlantIEC; + + /** \brief Maximum ramp rate of <i>p</i><i><sub>WTref</sub></i> request from the plant controller to the wind turbines (<i>dp</i><i><sub>refmax</sub></i>) (&gt; WindPlantFreqPcontrolIEC.dprefmin). It is a case-dependent parameter. Default: nullptr */ + CIMPP::PU dprefmax; + + /** \brief Minimum (negative) ramp rate of <i>p</i><i><sub>WTref</sub></i> request from the plant controller to the wind turbines (<i>dp</i><i><sub>refmin</sub></i>) (&lt; WindPlantFreqPcontrolIEC.dprefmax). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU dprefmin; + + /** \brief Maximum positive ramp rate for wind plant power reference (<i>dp</i><i><sub>WPrefmax</sub></i>) (&gt; WindPlantFreqPcontrolIEC.dpwprefmin). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU dpwprefmax; + + /** \brief Maximum negative ramp rate for wind plant power reference (<i>dp</i><i><sub>WPrefmin</sub></i>) (&lt; WindPlantFreqPcontrolIEC.dpwprefmax). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU dpwprefmin; + + /** \brief Plant P controller integral gain (<i>K</i><i><sub>IWPp</sub></i>). It is a project-dependent parameter. Default: 0.0 */ + CIMPP::Float kiwpp; + + /** \brief Maximum PI integrator term (<i>K</i><i><sub>IWPpmax</sub></i>) (&gt; WindPlantFreqPcontrolIEC.kiwppmin). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU kiwppmax; + + /** \brief Minimum PI integrator term (<i>K</i><i><sub>IWPpmin</sub></i>) (&lt; WindPlantFreqPcontrolIEC.kiwppmax). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU kiwppmin; + + /** \brief Plant P controller proportional gain (<i>K</i><i><sub>PWPp</sub></i>). It is a project-dependent parameter. Default: 0.0 */ + CIMPP::Float kpwpp; + + /** \brief Power reference gain (<i>K</i><i><sub>WPpref</sub></i>). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU kwppref; + + /** \brief Maximum <i>p</i><i><sub>WTref</sub></i> request from the plant controller to the wind turbines (<i>p</i><i><sub>refmax</sub></i>) (&gt; WindPlantFreqPcontrolIEC.prefmin). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU prefmax; + + /** \brief Minimum <i>p</i><i><sub>WTref</sub></i> request from the plant controller to the wind turbines (<i>p</i><i><sub>refmin</sub></i>) (&lt; WindPlantFreqPcontrolIEC.prefmax). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU prefmin; + + /** \brief Lead time constant in reference value transfer function (<i>T</i><i><sub>pft</sub></i>) (&gt;= 0). It is a project-dependent parameter. Default: nullptr */ + CIMPP::Seconds tpft; + + /** \brief Lag time constant in reference value transfer function (<i>T</i><i><sub>pfv</sub></i>) (&gt;= 0). It is a project-dependent parameter. Default: nullptr */ + CIMPP::Seconds tpfv; + + /** \brief Filter time constant for frequency measurement (<i>T</i><i><sub>WPffiltp</sub></i>) (&gt;= 0). It is a project-dependent parameter. Default: nullptr */ + CIMPP::Seconds twpffiltp; + + /** \brief Filter time constant for active power measurement (<i>T</i><i><sub>WPpfiltp</sub></i>) (&gt;= 0). It is a project-dependent parameter. Default: nullptr */ + CIMPP::Seconds twppfiltp; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindPlantIEC.cpp b/CGMES_3.0.0/WindPlantIEC.cpp index 5e9a20c83..b455a5284 100644 --- a/CGMES_3.0.0/WindPlantIEC.cpp +++ b/CGMES_3.0.0/WindPlantIEC.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindPlantIEC::WindPlantIEC() : WindPlantFreqPcontrolIEC(nullptr), WindPlantReactiveControlIEC(nullptr) {}; -WindPlantIEC::~WindPlantIEC() {}; +WindPlantIEC::WindPlantIEC() : WindPlantFreqPcontrolIEC(nullptr), WindPlantReactiveControlIEC(nullptr) {} +WindPlantIEC::~WindPlantIEC() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ WindPlantIEC::getPossibleProfilesForAttributes() const return map; } - - bool assign_WindPlantFreqPcontrolIEC_WindPlantIEC(BaseClass*, BaseClass*); bool assign_WindPlantIEC_WindPlantFreqPcontrolIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_WindPlantIEC_WindPlantFreqPcontrolIEC(BaseClass* BaseClass_ptr1, Bas } return false; } + bool assign_WindPlantReactiveControlIEC_WindPlantIEC(BaseClass*, BaseClass*); bool assign_WindPlantIEC_WindPlantReactiveControlIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_WindPlantIEC_WindPlantReactiveControlIEC(BaseClass* BaseClass_ptr1, return false; } - bool get_WindPlantIEC_WindPlantFreqPcontrolIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindPlantIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindPlantFreqPcontrolIEC != 0) { @@ -93,7 +92,8 @@ bool get_WindPlantIEC_WindPlantFreqPcontrolIEC(const BaseClass* BaseClass_ptr1, bool get_WindPlantIEC_WindPlantReactiveControlIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindPlantIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindPlantReactiveControlIEC != 0) { @@ -104,7 +104,6 @@ bool get_WindPlantIEC_WindPlantReactiveControlIEC(const BaseClass* BaseClass_ptr return false; } - const char WindPlantIEC::debugName[] = "WindPlantIEC"; const char* WindPlantIEC::debugString() const { @@ -113,7 +112,7 @@ const char* WindPlantIEC::debugString() const void WindPlantIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindPlantIEC"), &WindPlantIEC_factory)); + factory_map.emplace("cim:WindPlantIEC", &WindPlantIEC_factory); } void WindPlantIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void WindPlantIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPlantIEC.WindPlantFreqPcontrolIEC"), &assign_WindPlantIEC_WindPlantFreqPcontrolIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantIEC.WindPlantReactiveControlIEC"), &assign_WindPlantIEC_WindPlantReactiveControlIEC)); + assign_map.emplace("cim:WindPlantIEC.WindPlantFreqPcontrolIEC", &assign_WindPlantIEC_WindPlantFreqPcontrolIEC); + assign_map.emplace("cim:WindPlantIEC.WindPlantReactiveControlIEC", &assign_WindPlantIEC_WindPlantReactiveControlIEC); } void WindPlantIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindPlantIEC.hpp b/CGMES_3.0.0/WindPlantIEC.hpp index 932e2552e..78e0651ce 100644 --- a/CGMES_3.0.0/WindPlantIEC.hpp +++ b/CGMES_3.0.0/WindPlantIEC.hpp @@ -18,9 +18,7 @@ namespace CIMPP class WindPlantFreqPcontrolIEC; class WindPlantReactiveControlIEC; - /* - Simplified IEC type plant level model. Reference: IEC 61400-27-1:2015, Annex D. - */ + /** \brief Simplified IEC type plant level model. Reference: IEC 61400-27-1:2015, Annex D. */ class WindPlantIEC : public WindPlantDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP WindPlantIEC(); ~WindPlantIEC() override; - CIMPP::WindPlantFreqPcontrolIEC* WindPlantFreqPcontrolIEC; /* Wind plant frequency and active power control model associated with this wind plant. Default: 0 */ - CIMPP::WindPlantReactiveControlIEC* WindPlantReactiveControlIEC; /* Wind plant model with which this wind reactive control is associated. Default: 0 */ + /** \brief Wind plant frequency and active power control model associated with this wind plant. Default: 0 */ + CIMPP::WindPlantFreqPcontrolIEC* WindPlantFreqPcontrolIEC; + + /** \brief Wind plant model with which this wind reactive control is associated. Default: 0 */ + CIMPP::WindPlantReactiveControlIEC* WindPlantReactiveControlIEC; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindPlantQcontrolModeKind.cpp b/CGMES_3.0.0/WindPlantQcontrolModeKind.cpp index eef537e80..5d8035433 100644 --- a/CGMES_3.0.0/WindPlantQcontrolModeKind.cpp +++ b/CGMES_3.0.0/WindPlantQcontrolModeKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "WindPlantQcontrolModeKind") + if (EnumSymbol.substr(0, pos) != "WindPlantQcontrolModeKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,22 +50,22 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "reactivePower") + if (EnumSymbol == "reactivePower") { rop = WindPlantQcontrolModeKind::reactivePower; return lop; } - if(EnumSymbol == "powerFactor") + if (EnumSymbol == "powerFactor") { rop = WindPlantQcontrolModeKind::powerFactor; return lop; } - if(EnumSymbol == "uqStatic") + if (EnumSymbol == "uqStatic") { rop = WindPlantQcontrolModeKind::uqStatic; return lop; } - if(EnumSymbol == "voltageControl") + if (EnumSymbol == "voltageControl") { rop = WindPlantQcontrolModeKind::voltageControl; return lop; diff --git a/CGMES_3.0.0/WindPlantQcontrolModeKind.hpp b/CGMES_3.0.0/WindPlantQcontrolModeKind.hpp index 638e1143b..8bf73c437 100644 --- a/CGMES_3.0.0/WindPlantQcontrolModeKind.hpp +++ b/CGMES_3.0.0/WindPlantQcontrolModeKind.hpp @@ -9,29 +9,19 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Reactive power/voltage controller mode. - */ + /** \brief Reactive power/voltage controller mode. */ class WindPlantQcontrolModeKind { public: enum WindPlantQcontrolModeKind_ENUM { - /** - * Reactive power reference. - */ + /** Reactive power reference. */ reactivePower, - /** - * Power factor reference. - */ + /** Power factor reference. */ powerFactor, - /** - * UQ static. - */ + /** UQ static. */ uqStatic, - /** - * Voltage control. - */ + /** Voltage control. */ voltageControl, }; diff --git a/CGMES_3.0.0/WindPlantReactiveControlIEC.cpp b/CGMES_3.0.0/WindPlantReactiveControlIEC.cpp index a673856da..ab7f19d05 100644 --- a/CGMES_3.0.0/WindPlantReactiveControlIEC.cpp +++ b/CGMES_3.0.0/WindPlantReactiveControlIEC.cpp @@ -10,29 +10,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindDynamicsLookupTable.hpp" #include "WindPlantIEC.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Float.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "WindPlantQcontrolModeKind.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -WindPlantReactiveControlIEC::WindPlantReactiveControlIEC() : WindPlantIEC(nullptr) {}; -WindPlantReactiveControlIEC::~WindPlantReactiveControlIEC() {}; +WindPlantReactiveControlIEC::WindPlantReactiveControlIEC() : WindPlantIEC(nullptr) {} +WindPlantReactiveControlIEC::~WindPlantReactiveControlIEC() {} static const std::list PossibleProfilesForClass = { @@ -78,278 +60,298 @@ WindPlantReactiveControlIEC::getPossibleProfilesForAttributes() const return map; } +bool assign_WindDynamicsLookupTable_WindPlantReactiveControlIEC(BaseClass*, BaseClass*); +bool assign_WindPlantReactiveControlIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) + { + element->WindDynamicsLookupTable.push_back(element2); + return assign_WindDynamicsLookupTable_WindPlantReactiveControlIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} + +bool assign_WindPlantIEC_WindPlantReactiveControlIEC(BaseClass*, BaseClass*); +bool assign_WindPlantReactiveControlIEC_WindPlantIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +{ + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + WindPlantIEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) + { + if (element->WindPlantIEC != element2) + { + element->WindPlantIEC = element2; + return assign_WindPlantIEC_WindPlantReactiveControlIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; + } + return false; +} -bool assign_WindPlantReactiveControlIEC_dxrefmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_dxrefmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dxrefmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_dxrefmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_dxrefmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->dxrefmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_kiwpx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_kiwpx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kiwpx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_kiwpxmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_kiwpxmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kiwpxmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_kiwpxmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_kiwpxmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kiwpxmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_kpwpx(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_kpwpx(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kpwpx; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_kwpqref(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_kwpqref(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kwpqref; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_kwpqu(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_kwpqu(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->kwpqu; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_tuqfilt(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_tuqfilt(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->tuqfilt; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_twppfiltq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_twppfiltq(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->twppfiltq; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_twpqfiltq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_twpqfiltq(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->twpqfiltq; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_twpufiltq(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_twpufiltq(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->twpufiltq; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_txft(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_txft(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->txft; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_txfv(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_txfv(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->txfv; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_uwpqdip(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_uwpqdip(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->uwpqdip; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_windPlantQcontrolModesType(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_windPlantQcontrolModesType(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->windPlantQcontrolModesType; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_xrefmax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_xrefmax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xrefmax; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindPlantReactiveControlIEC_xrefmin(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindPlantReactiveControlIEC_xrefmin(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer >> element->xrefmin; - if (buffer.fail()) - return false; - else + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindDynamicsLookupTable_WindPlantReactiveControlIEC(BaseClass*, BaseClass*); -bool assign_WindPlantReactiveControlIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) -{ - WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); - WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) - { - if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) - { - element->WindDynamicsLookupTable.push_back(element2); - return assign_WindDynamicsLookupTable_WindPlantReactiveControlIEC(BaseClass_ptr2, BaseClass_ptr1); - } - return true; - } - return false; -} -bool assign_WindPlantIEC_WindPlantReactiveControlIEC(BaseClass*, BaseClass*); -bool assign_WindPlantReactiveControlIEC_WindPlantIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) -{ - WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); - WindPlantIEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) - { - if (element->WindPlantIEC != element2) - { - element->WindPlantIEC = element2; - return assign_WindPlantIEC_WindPlantReactiveControlIEC(BaseClass_ptr2, BaseClass_ptr1); - } - return true; - } - return false; -} bool get_WindPlantReactiveControlIEC_dxrefmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dxrefmax; if (!buffer.str().empty()) @@ -363,7 +365,8 @@ bool get_WindPlantReactiveControlIEC_dxrefmax(const BaseClass* BaseClass_ptr1, s bool get_WindPlantReactiveControlIEC_dxrefmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dxrefmin; if (!buffer.str().empty()) @@ -377,7 +380,8 @@ bool get_WindPlantReactiveControlIEC_dxrefmin(const BaseClass* BaseClass_ptr1, s bool get_WindPlantReactiveControlIEC_kiwpx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kiwpx; if (!buffer.str().empty()) @@ -391,7 +395,8 @@ bool get_WindPlantReactiveControlIEC_kiwpx(const BaseClass* BaseClass_ptr1, std: bool get_WindPlantReactiveControlIEC_kiwpxmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kiwpxmax; if (!buffer.str().empty()) @@ -405,7 +410,8 @@ bool get_WindPlantReactiveControlIEC_kiwpxmax(const BaseClass* BaseClass_ptr1, s bool get_WindPlantReactiveControlIEC_kiwpxmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kiwpxmin; if (!buffer.str().empty()) @@ -419,7 +425,8 @@ bool get_WindPlantReactiveControlIEC_kiwpxmin(const BaseClass* BaseClass_ptr1, s bool get_WindPlantReactiveControlIEC_kpwpx(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kpwpx; if (!buffer.str().empty()) @@ -433,7 +440,8 @@ bool get_WindPlantReactiveControlIEC_kpwpx(const BaseClass* BaseClass_ptr1, std: bool get_WindPlantReactiveControlIEC_kwpqref(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kwpqref; if (!buffer.str().empty()) @@ -447,7 +455,8 @@ bool get_WindPlantReactiveControlIEC_kwpqref(const BaseClass* BaseClass_ptr1, st bool get_WindPlantReactiveControlIEC_kwpqu(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->kwpqu; if (!buffer.str().empty()) @@ -461,7 +470,8 @@ bool get_WindPlantReactiveControlIEC_kwpqu(const BaseClass* BaseClass_ptr1, std: bool get_WindPlantReactiveControlIEC_tuqfilt(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tuqfilt; if (!buffer.str().empty()) @@ -475,7 +485,8 @@ bool get_WindPlantReactiveControlIEC_tuqfilt(const BaseClass* BaseClass_ptr1, st bool get_WindPlantReactiveControlIEC_twppfiltq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twppfiltq; if (!buffer.str().empty()) @@ -489,7 +500,8 @@ bool get_WindPlantReactiveControlIEC_twppfiltq(const BaseClass* BaseClass_ptr1, bool get_WindPlantReactiveControlIEC_twpqfiltq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twpqfiltq; if (!buffer.str().empty()) @@ -503,7 +515,8 @@ bool get_WindPlantReactiveControlIEC_twpqfiltq(const BaseClass* BaseClass_ptr1, bool get_WindPlantReactiveControlIEC_twpufiltq(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->twpufiltq; if (!buffer.str().empty()) @@ -517,7 +530,8 @@ bool get_WindPlantReactiveControlIEC_twpufiltq(const BaseClass* BaseClass_ptr1, bool get_WindPlantReactiveControlIEC_txft(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->txft; if (!buffer.str().empty()) @@ -531,7 +545,8 @@ bool get_WindPlantReactiveControlIEC_txft(const BaseClass* BaseClass_ptr1, std:: bool get_WindPlantReactiveControlIEC_txfv(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->txfv; if (!buffer.str().empty()) @@ -545,7 +560,8 @@ bool get_WindPlantReactiveControlIEC_txfv(const BaseClass* BaseClass_ptr1, std:: bool get_WindPlantReactiveControlIEC_uwpqdip(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uwpqdip; if (!buffer.str().empty()) @@ -557,11 +573,12 @@ bool get_WindPlantReactiveControlIEC_uwpqdip(const BaseClass* BaseClass_ptr1, st return false; } -bool get_WindPlantReactiveControlIEC_xrefmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_WindPlantReactiveControlIEC_windPlantQcontrolModesType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xrefmax; + buffer << element->windPlantQcontrolModesType; if (!buffer.str().empty()) { return true; @@ -571,11 +588,12 @@ bool get_WindPlantReactiveControlIEC_xrefmax(const BaseClass* BaseClass_ptr1, st return false; } -bool get_WindPlantReactiveControlIEC_xrefmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_WindPlantReactiveControlIEC_xrefmax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->xrefmin; + buffer << element->xrefmax; if (!buffer.str().empty()) { return true; @@ -585,13 +603,12 @@ bool get_WindPlantReactiveControlIEC_xrefmin(const BaseClass* BaseClass_ptr1, st return false; } - - -bool get_WindPlantReactiveControlIEC_windPlantQcontrolModesType(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) +bool get_WindPlantReactiveControlIEC_xrefmin(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantReactiveControlIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer << element->windPlantQcontrolModesType; + buffer << element->xrefmin; if (!buffer.str().empty()) { return true; @@ -609,35 +626,35 @@ const char* WindPlantReactiveControlIEC::debugString() const void WindPlantReactiveControlIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC"), &WindPlantReactiveControlIEC_factory)); + factory_map.emplace("cim:WindPlantReactiveControlIEC", &WindPlantReactiveControlIEC_factory); } void WindPlantReactiveControlIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.dxrefmax"), &assign_WindPlantReactiveControlIEC_dxrefmax)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.dxrefmin"), &assign_WindPlantReactiveControlIEC_dxrefmin)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.kiwpx"), &assign_WindPlantReactiveControlIEC_kiwpx)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.kiwpxmax"), &assign_WindPlantReactiveControlIEC_kiwpxmax)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.kiwpxmin"), &assign_WindPlantReactiveControlIEC_kiwpxmin)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.kpwpx"), &assign_WindPlantReactiveControlIEC_kpwpx)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.kwpqref"), &assign_WindPlantReactiveControlIEC_kwpqref)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.kwpqu"), &assign_WindPlantReactiveControlIEC_kwpqu)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.tuqfilt"), &assign_WindPlantReactiveControlIEC_tuqfilt)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.twppfiltq"), &assign_WindPlantReactiveControlIEC_twppfiltq)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.twpqfiltq"), &assign_WindPlantReactiveControlIEC_twpqfiltq)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.twpufiltq"), &assign_WindPlantReactiveControlIEC_twpufiltq)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.txft"), &assign_WindPlantReactiveControlIEC_txft)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.txfv"), &assign_WindPlantReactiveControlIEC_txfv)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.uwpqdip"), &assign_WindPlantReactiveControlIEC_uwpqdip)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.windPlantQcontrolModesType"), &assign_WindPlantReactiveControlIEC_windPlantQcontrolModesType)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.xrefmax"), &assign_WindPlantReactiveControlIEC_xrefmax)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.xrefmin"), &assign_WindPlantReactiveControlIEC_xrefmin)); + assign_map.emplace("cim:WindPlantReactiveControlIEC.dxrefmax", &assign_WindPlantReactiveControlIEC_dxrefmax); + assign_map.emplace("cim:WindPlantReactiveControlIEC.dxrefmin", &assign_WindPlantReactiveControlIEC_dxrefmin); + assign_map.emplace("cim:WindPlantReactiveControlIEC.kiwpx", &assign_WindPlantReactiveControlIEC_kiwpx); + assign_map.emplace("cim:WindPlantReactiveControlIEC.kiwpxmax", &assign_WindPlantReactiveControlIEC_kiwpxmax); + assign_map.emplace("cim:WindPlantReactiveControlIEC.kiwpxmin", &assign_WindPlantReactiveControlIEC_kiwpxmin); + assign_map.emplace("cim:WindPlantReactiveControlIEC.kpwpx", &assign_WindPlantReactiveControlIEC_kpwpx); + assign_map.emplace("cim:WindPlantReactiveControlIEC.kwpqref", &assign_WindPlantReactiveControlIEC_kwpqref); + assign_map.emplace("cim:WindPlantReactiveControlIEC.kwpqu", &assign_WindPlantReactiveControlIEC_kwpqu); + assign_map.emplace("cim:WindPlantReactiveControlIEC.tuqfilt", &assign_WindPlantReactiveControlIEC_tuqfilt); + assign_map.emplace("cim:WindPlantReactiveControlIEC.twppfiltq", &assign_WindPlantReactiveControlIEC_twppfiltq); + assign_map.emplace("cim:WindPlantReactiveControlIEC.twpqfiltq", &assign_WindPlantReactiveControlIEC_twpqfiltq); + assign_map.emplace("cim:WindPlantReactiveControlIEC.twpufiltq", &assign_WindPlantReactiveControlIEC_twpufiltq); + assign_map.emplace("cim:WindPlantReactiveControlIEC.txft", &assign_WindPlantReactiveControlIEC_txft); + assign_map.emplace("cim:WindPlantReactiveControlIEC.txfv", &assign_WindPlantReactiveControlIEC_txfv); + assign_map.emplace("cim:WindPlantReactiveControlIEC.uwpqdip", &assign_WindPlantReactiveControlIEC_uwpqdip); + assign_map.emplace("cim:WindPlantReactiveControlIEC.windPlantQcontrolModesType", &assign_WindPlantReactiveControlIEC_windPlantQcontrolModesType); + assign_map.emplace("cim:WindPlantReactiveControlIEC.xrefmax", &assign_WindPlantReactiveControlIEC_xrefmax); + assign_map.emplace("cim:WindPlantReactiveControlIEC.xrefmin", &assign_WindPlantReactiveControlIEC_xrefmin); } void WindPlantReactiveControlIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.WindDynamicsLookupTable"), &assign_WindPlantReactiveControlIEC_WindDynamicsLookupTable)); - assign_map.insert(std::make_pair(std::string("cim:WindPlantReactiveControlIEC.WindPlantIEC"), &assign_WindPlantReactiveControlIEC_WindPlantIEC)); + assign_map.emplace("cim:WindPlantReactiveControlIEC.WindDynamicsLookupTable", &assign_WindPlantReactiveControlIEC_WindDynamicsLookupTable); + assign_map.emplace("cim:WindPlantReactiveControlIEC.WindPlantIEC", &assign_WindPlantReactiveControlIEC_WindPlantIEC); } void WindPlantReactiveControlIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindPlantReactiveControlIEC.hpp b/CGMES_3.0.0/WindPlantReactiveControlIEC.hpp index d249e784c..d5cd67165 100644 --- a/CGMES_3.0.0/WindPlantReactiveControlIEC.hpp +++ b/CGMES_3.0.0/WindPlantReactiveControlIEC.hpp @@ -22,9 +22,7 @@ namespace CIMPP class WindDynamicsLookupTable; class WindPlantIEC; - /* - Simplified plant voltage and reactive power control model for use with type 3 and type 4 wind turbine models. Reference: IEC 61400-27-1:2015, Annex D. - */ + /** \brief Simplified plant voltage and reactive power control model for use with type 3 and type 4 wind turbine models. Reference: IEC 61400-27-1:2015, Annex D. */ class WindPlantReactiveControlIEC : public IdentifiedObject { public: @@ -32,26 +30,65 @@ namespace CIMPP WindPlantReactiveControlIEC(); ~WindPlantReactiveControlIEC() override; - std::list WindDynamicsLookupTable; /* The wind dynamics lookup table associated with this voltage and reactive power wind plant model. Default: 0 */ - CIMPP::WindPlantIEC* WindPlantIEC; /* Wind plant reactive control model associated with this wind plant. Default: 0 */ - CIMPP::PU dxrefmax; /* Maximum positive ramp rate for wind turbine reactive power/voltage reference (<i>dx</i><i><sub>refmax</sub></i>) (&gt; WindPlantReactiveControlIEC.dxrefmin). It is a project-dependent parameter. Default: nullptr */ - CIMPP::PU dxrefmin; /* Maximum negative ramp rate for wind turbine reactive power/voltage reference (<i>dx</i><i><sub>refmin</sub></i>) (&lt; WindPlantReactiveControlIEC.dxrefmax). It is a project-dependent parameter. Default: nullptr */ - CIMPP::Float kiwpx; /* Plant Q controller integral gain (<i>K</i><i><sub>IWPx</sub></i>). It is a project-dependent parameter. Default: 0.0 */ - CIMPP::PU kiwpxmax; /* Maximum reactive power/voltage reference from integration (<i>K</i><i><sub>IWPxmax</sub></i>) (&gt; WindPlantReactiveControlIEC.kiwpxmin). It is a project-dependent parameter. Default: nullptr */ - CIMPP::PU kiwpxmin; /* Minimum reactive power/voltage reference from integration (<i>K</i><i><sub>IWPxmin</sub></i>) (&lt; WindPlantReactiveControlIEC.kiwpxmax). It is a project-dependent parameter. Default: nullptr */ - CIMPP::Float kpwpx; /* Plant Q controller proportional gain (<i>K</i><i><sub>PWPx</sub></i>). It is a project-dependent parameter. Default: 0.0 */ - CIMPP::PU kwpqref; /* Reactive power reference gain (<i>K</i><i><sub>WPqref</sub></i>). It is a project-dependent parameter. Default: nullptr */ - CIMPP::PU kwpqu; /* Plant voltage control droop (<i>K</i><i><sub>WPqu</sub></i>). It is a project-dependent parameter. Default: nullptr */ - CIMPP::Seconds tuqfilt; /* Filter time constant for voltage-dependent reactive power (<i>T</i><i><sub>uqfilt</sub></i>) (&gt;= 0). It is a project-dependent parameter. Default: nullptr */ - CIMPP::Seconds twppfiltq; /* Filter time constant for active power measurement (<i>T</i><i><sub>WPpfiltq</sub></i>) (&gt;= 0). It is a project-dependent parameter. Default: nullptr */ - CIMPP::Seconds twpqfiltq; /* Filter time constant for reactive power measurement (<i>T</i><i><sub>WPqfiltq</sub></i>) (&gt;= 0). It is a project-dependent parameter. Default: nullptr */ - CIMPP::Seconds twpufiltq; /* Filter time constant for voltage measurement (<i>T</i><i><sub>WPufiltq</sub></i>) (&gt;= 0). It is a project-dependent parameter. Default: nullptr */ - CIMPP::Seconds txft; /* Lead time constant in reference value transfer function (<i>T</i><i><sub>xft</sub></i>) (&gt;= 0). It is a project-dependent parameter. Default: nullptr */ - CIMPP::Seconds txfv; /* Lag time constant in reference value transfer function (<i>T</i><i><sub>xfv</sub></i>) (&gt;= 0). It is a project-dependent parameter. Default: nullptr */ - CIMPP::PU uwpqdip; /* Voltage threshold for UVRT detection in Q control (<i>u</i><i><sub>WPqdip</sub></i>). It is a project-dependent parameter. Default: nullptr */ - CIMPP::WindPlantQcontrolModeKind windPlantQcontrolModesType; /* Reactive power/voltage controller mode (<i>M</i><i><sub>WPqmode</sub></i>). It is a case-dependent parameter. Default: 0 */ - CIMPP::PU xrefmax; /* Maximum <i>x</i><sub>WTref</sub> (<i>q</i><i><sub>WTref</sub></i> or delta<i> u</i><i><sub>WTref</sub></i>) request from the plant controller (<i>x</i><i><sub>refmax</sub></i>) (&gt; WindPlantReactiveControlIEC.xrefmin). It is a case-dependent parameter. Default: nullptr */ - CIMPP::PU xrefmin; /* Minimum <i>x</i><i><sub>WTref</sub></i> (<i>q</i><i><sub>WTref</sub></i> or delta <i>u</i><i><sub>WTref</sub></i>) request from the plant controller (<i>x</i><i><sub>refmin</sub></i>) (&lt; WindPlantReactiveControlIEC.xrefmax). It is a project-dependent parameter. Default: nullptr */ + /** \brief The wind dynamics lookup table associated with this voltage and reactive power wind plant model. Default: 0 */ + std::list WindDynamicsLookupTable; + + /** \brief Wind plant reactive control model associated with this wind plant. Default: 0 */ + CIMPP::WindPlantIEC* WindPlantIEC; + + /** \brief Maximum positive ramp rate for wind turbine reactive power/voltage reference (<i>dx</i><i><sub>refmax</sub></i>) (&gt; WindPlantReactiveControlIEC.dxrefmin). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU dxrefmax; + + /** \brief Maximum negative ramp rate for wind turbine reactive power/voltage reference (<i>dx</i><i><sub>refmin</sub></i>) (&lt; WindPlantReactiveControlIEC.dxrefmax). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU dxrefmin; + + /** \brief Plant Q controller integral gain (<i>K</i><i><sub>IWPx</sub></i>). It is a project-dependent parameter. Default: 0.0 */ + CIMPP::Float kiwpx; + + /** \brief Maximum reactive power/voltage reference from integration (<i>K</i><i><sub>IWPxmax</sub></i>) (&gt; WindPlantReactiveControlIEC.kiwpxmin). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU kiwpxmax; + + /** \brief Minimum reactive power/voltage reference from integration (<i>K</i><i><sub>IWPxmin</sub></i>) (&lt; WindPlantReactiveControlIEC.kiwpxmax). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU kiwpxmin; + + /** \brief Plant Q controller proportional gain (<i>K</i><i><sub>PWPx</sub></i>). It is a project-dependent parameter. Default: 0.0 */ + CIMPP::Float kpwpx; + + /** \brief Reactive power reference gain (<i>K</i><i><sub>WPqref</sub></i>). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU kwpqref; + + /** \brief Plant voltage control droop (<i>K</i><i><sub>WPqu</sub></i>). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU kwpqu; + + /** \brief Filter time constant for voltage-dependent reactive power (<i>T</i><i><sub>uqfilt</sub></i>) (&gt;= 0). It is a project-dependent parameter. Default: nullptr */ + CIMPP::Seconds tuqfilt; + + /** \brief Filter time constant for active power measurement (<i>T</i><i><sub>WPpfiltq</sub></i>) (&gt;= 0). It is a project-dependent parameter. Default: nullptr */ + CIMPP::Seconds twppfiltq; + + /** \brief Filter time constant for reactive power measurement (<i>T</i><i><sub>WPqfiltq</sub></i>) (&gt;= 0). It is a project-dependent parameter. Default: nullptr */ + CIMPP::Seconds twpqfiltq; + + /** \brief Filter time constant for voltage measurement (<i>T</i><i><sub>WPufiltq</sub></i>) (&gt;= 0). It is a project-dependent parameter. Default: nullptr */ + CIMPP::Seconds twpufiltq; + + /** \brief Lead time constant in reference value transfer function (<i>T</i><i><sub>xft</sub></i>) (&gt;= 0). It is a project-dependent parameter. Default: nullptr */ + CIMPP::Seconds txft; + + /** \brief Lag time constant in reference value transfer function (<i>T</i><i><sub>xfv</sub></i>) (&gt;= 0). It is a project-dependent parameter. Default: nullptr */ + CIMPP::Seconds txfv; + + /** \brief Voltage threshold for UVRT detection in Q control (<i>u</i><i><sub>WPqdip</sub></i>). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU uwpqdip; + + /** \brief Reactive power/voltage controller mode (<i>M</i><i><sub>WPqmode</sub></i>). It is a case-dependent parameter. Default: 0 */ + CIMPP::WindPlantQcontrolModeKind windPlantQcontrolModesType; + + /** \brief Maximum <i>x</i><sub>WTref</sub> (<i>q</i><i><sub>WTref</sub></i> or delta<i> u</i><i><sub>WTref</sub></i>) request from the plant controller (<i>x</i><i><sub>refmax</sub></i>) (&gt; WindPlantReactiveControlIEC.xrefmin). It is a case-dependent parameter. Default: nullptr */ + CIMPP::PU xrefmax; + + /** \brief Minimum <i>x</i><i><sub>WTref</sub></i> (<i>q</i><i><sub>WTref</sub></i> or delta <i>u</i><i><sub>WTref</sub></i>) request from the plant controller (<i>x</i><i><sub>refmin</sub></i>) (&lt; WindPlantReactiveControlIEC.xrefmax). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU xrefmin; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindPlantUserDefined.cpp b/CGMES_3.0.0/WindPlantUserDefined.cpp index 8c93c7a24..549a06449 100644 --- a/CGMES_3.0.0/WindPlantUserDefined.cpp +++ b/CGMES_3.0.0/WindPlantUserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -WindPlantUserDefined::WindPlantUserDefined() {}; -WindPlantUserDefined::~WindPlantUserDefined() {}; +WindPlantUserDefined::WindPlantUserDefined() {} +WindPlantUserDefined::~WindPlantUserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ WindPlantUserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindPlantUserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindPlantUserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_WindPlantUserDefined(BaseClass*, BaseClass*); bool assign_WindPlantUserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_WindPlantUserDefined_ProprietaryParameterDynamics(BaseClass* BaseCla return false; } +bool assign_WindPlantUserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + WindPlantUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_WindPlantUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindPlantUserDefined* element = dynamic_cast(BaseClass_ptr1)) + const WindPlantUserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_WindPlantUserDefined_proprietary(const BaseClass* BaseClass_ptr1, std:: return false; } - - const char WindPlantUserDefined::debugName[] = "WindPlantUserDefined"; const char* WindPlantUserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* WindPlantUserDefined::debugString() const void WindPlantUserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindPlantUserDefined"), &WindPlantUserDefined_factory)); + factory_map.emplace("cim:WindPlantUserDefined", &WindPlantUserDefined_factory); } void WindPlantUserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPlantUserDefined.proprietary"), &assign_WindPlantUserDefined_proprietary)); + assign_map.emplace("cim:WindPlantUserDefined.proprietary", &assign_WindPlantUserDefined_proprietary); } void WindPlantUserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPlantUserDefined.ProprietaryParameterDynamics"), &assign_WindPlantUserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:WindPlantUserDefined.ProprietaryParameterDynamics", &assign_WindPlantUserDefined_ProprietaryParameterDynamics); } void WindPlantUserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindPlantUserDefined.hpp b/CGMES_3.0.0/WindPlantUserDefined.hpp index c2fbf9f9b..713b0093d 100644 --- a/CGMES_3.0.0/WindPlantUserDefined.hpp +++ b/CGMES_3.0.0/WindPlantUserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Wind plant function block whose dynamic behaviour is described by a user-defined model. - */ + /** \brief Wind plant function block whose dynamic behaviour is described by a user-defined model. */ class WindPlantUserDefined : public WindPlantDynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP WindPlantUserDefined(); ~WindPlantUserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindPowerPlant.cpp b/CGMES_3.0.0/WindPowerPlant.cpp index c622d8df7..d38ca0910 100644 --- a/CGMES_3.0.0/WindPowerPlant.cpp +++ b/CGMES_3.0.0/WindPowerPlant.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindPowerPlant::WindPowerPlant() {}; -WindPowerPlant::~WindPowerPlant() {}; +WindPowerPlant::WindPowerPlant() {} +WindPowerPlant::~WindPowerPlant() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ WindPowerPlant::getPossibleProfilesForAttributes() const return map; } - - bool assign_WindGeneratingUnit_WindPowerPlant(BaseClass*, BaseClass*); bool assign_WindPowerPlant_WindGeneratingUnits(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,7 +58,6 @@ bool assign_WindPowerPlant_WindGeneratingUnits(BaseClass* BaseClass_ptr1, BaseCl } - const char WindPowerPlant::debugName[] = "WindPowerPlant"; const char* WindPowerPlant::debugString() const { @@ -69,7 +66,7 @@ const char* WindPowerPlant::debugString() const void WindPowerPlant::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindPowerPlant"), &WindPowerPlant_factory)); + factory_map.emplace("cim:WindPowerPlant", &WindPowerPlant_factory); } void WindPowerPlant::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -78,7 +75,7 @@ void WindPowerPlant::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindPowerPlant.WindGeneratingUnits"), &assign_WindPowerPlant_WindGeneratingUnits)); + assign_map.emplace("cim:WindPowerPlant.WindGeneratingUnits", &assign_WindPowerPlant_WindGeneratingUnits); } void WindPowerPlant::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindPowerPlant.hpp b/CGMES_3.0.0/WindPowerPlant.hpp index 065fd83fc..feef50426 100644 --- a/CGMES_3.0.0/WindPowerPlant.hpp +++ b/CGMES_3.0.0/WindPowerPlant.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class WindGeneratingUnit; - /* - Wind power plant. - */ + /** \brief Wind power plant. */ class WindPowerPlant : public PowerSystemResource { public: @@ -27,7 +25,8 @@ namespace CIMPP WindPowerPlant(); ~WindPowerPlant() override; - std::list WindGeneratingUnits; /* A wind generating unit or units may be a member of a wind power plant. Default: 0 */ + /** \brief A wind generating unit or units may be a member of a wind power plant. Default: 0 */ + std::list WindGeneratingUnits; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindProtectionIEC.cpp b/CGMES_3.0.0/WindProtectionIEC.cpp index 94588f19c..169065c03 100644 --- a/CGMES_3.0.0/WindProtectionIEC.cpp +++ b/CGMES_3.0.0/WindProtectionIEC.cpp @@ -11,18 +11,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include "WindDynamicsLookupTable.hpp" #include "WindTurbineType1or2IEC.hpp" #include "WindTurbineType3or4IEC.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "PU.hpp" -#include "Boolean.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -WindProtectionIEC::WindProtectionIEC() : WindTurbineType1or2IEC(nullptr), WindTurbineType3or4IEC(nullptr) {}; -WindProtectionIEC::~WindProtectionIEC() {}; +WindProtectionIEC::WindProtectionIEC() : WindTurbineType1or2IEC(nullptr), WindTurbineType3or4IEC(nullptr) {} +WindProtectionIEC::~WindProtectionIEC() {} static const std::list PossibleProfilesForClass = { @@ -58,151 +51,162 @@ WindProtectionIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindProtectionIEC_dfimax(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindDynamicsLookupTable_WindProtectionIEC(BaseClass*, BaseClass*); +bool assign_WindProtectionIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->dfimax; - if (buffer.fail()) - return false; - else - return true; + if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) + { + element->WindDynamicsLookupTable.push_back(element2); + return assign_WindDynamicsLookupTable_WindProtectionIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindProtectionIEC_fover(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType1or2IEC_WindProtectionIEC(BaseClass*, BaseClass*); +bool assign_WindProtectionIEC_WindTurbineType1or2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType1or2IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->fover; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType1or2IEC != element2) + { + element->WindTurbineType1or2IEC = element2; + return assign_WindTurbineType1or2IEC_WindProtectionIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindProtectionIEC_funder(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType3or4IEC_WindProtectionIEC(BaseClass*, BaseClass*); +bool assign_WindProtectionIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType3or4IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->funder; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType3or4IEC != element2) + { + element->WindTurbineType3or4IEC = element2; + return assign_WindTurbineType3or4IEC_WindProtectionIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindProtectionIEC_mzc(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindProtectionIEC_dfimax(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->mzc; - if (buffer.fail()) - return false; - else + buffer >> element->dfimax; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindProtectionIEC_tfma(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindProtectionIEC_fover(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->tfma; - if (buffer.fail()) - return false; - else + buffer >> element->fover; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindProtectionIEC_uover(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindProtectionIEC_funder(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->uover; - if (buffer.fail()) - return false; - else + buffer >> element->funder; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindProtectionIEC_uunder(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindProtectionIEC_mzc(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->uunder; - if (buffer.fail()) - return false; - else + buffer >> element->mzc; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindDynamicsLookupTable_WindProtectionIEC(BaseClass*, BaseClass*); -bool assign_WindProtectionIEC_WindDynamicsLookupTable(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindProtectionIEC_tfma(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); - WindDynamicsLookupTable* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (std::find(element->WindDynamicsLookupTable.begin(), element->WindDynamicsLookupTable.end(), element2) == element->WindDynamicsLookupTable.end()) + buffer >> element->tfma; + if (!buffer.fail()) { - element->WindDynamicsLookupTable.push_back(element2); - return assign_WindDynamicsLookupTable_WindProtectionIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_WindTurbineType1or2IEC_WindProtectionIEC(BaseClass*, BaseClass*); -bool assign_WindProtectionIEC_WindTurbineType1or2IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_WindProtectionIEC_uover(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType1or2IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType1or2IEC != element2) + buffer >> element->uover; + if (!buffer.fail()) { - element->WindTurbineType1or2IEC = element2; - return assign_WindTurbineType1or2IEC_WindProtectionIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } -bool assign_WindTurbineType3or4IEC_WindProtectionIEC(BaseClass*, BaseClass*); -bool assign_WindProtectionIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) + +bool assign_WindProtectionIEC_uunder(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType3or4IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType3or4IEC != element2) + buffer >> element->uunder; + if (!buffer.fail()) { - element->WindTurbineType3or4IEC = element2; - return assign_WindTurbineType3or4IEC_WindProtectionIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + + + bool get_WindProtectionIEC_dfimax(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->dfimax; if (!buffer.str().empty()) @@ -216,7 +220,8 @@ bool get_WindProtectionIEC_dfimax(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindProtectionIEC_fover(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->fover; if (!buffer.str().empty()) @@ -230,7 +235,8 @@ bool get_WindProtectionIEC_fover(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindProtectionIEC_funder(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->funder; if (!buffer.str().empty()) @@ -244,7 +250,8 @@ bool get_WindProtectionIEC_funder(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindProtectionIEC_mzc(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->mzc; if (!buffer.str().empty()) @@ -258,7 +265,8 @@ bool get_WindProtectionIEC_mzc(const BaseClass* BaseClass_ptr1, std::stringstrea bool get_WindProtectionIEC_tfma(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tfma; if (!buffer.str().empty()) @@ -272,7 +280,8 @@ bool get_WindProtectionIEC_tfma(const BaseClass* BaseClass_ptr1, std::stringstre bool get_WindProtectionIEC_uover(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uover; if (!buffer.str().empty()) @@ -286,7 +295,8 @@ bool get_WindProtectionIEC_uover(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindProtectionIEC_uunder(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindProtectionIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->uunder; if (!buffer.str().empty()) @@ -298,8 +308,6 @@ bool get_WindProtectionIEC_uunder(const BaseClass* BaseClass_ptr1, std::stringst return false; } - - const char WindProtectionIEC::debugName[] = "WindProtectionIEC"; const char* WindProtectionIEC::debugString() const { @@ -308,25 +316,25 @@ const char* WindProtectionIEC::debugString() const void WindProtectionIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindProtectionIEC"), &WindProtectionIEC_factory)); + factory_map.emplace("cim:WindProtectionIEC", &WindProtectionIEC_factory); } void WindProtectionIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.dfimax"), &assign_WindProtectionIEC_dfimax)); - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.fover"), &assign_WindProtectionIEC_fover)); - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.funder"), &assign_WindProtectionIEC_funder)); - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.mzc"), &assign_WindProtectionIEC_mzc)); - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.tfma"), &assign_WindProtectionIEC_tfma)); - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.uover"), &assign_WindProtectionIEC_uover)); - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.uunder"), &assign_WindProtectionIEC_uunder)); + assign_map.emplace("cim:WindProtectionIEC.dfimax", &assign_WindProtectionIEC_dfimax); + assign_map.emplace("cim:WindProtectionIEC.fover", &assign_WindProtectionIEC_fover); + assign_map.emplace("cim:WindProtectionIEC.funder", &assign_WindProtectionIEC_funder); + assign_map.emplace("cim:WindProtectionIEC.mzc", &assign_WindProtectionIEC_mzc); + assign_map.emplace("cim:WindProtectionIEC.tfma", &assign_WindProtectionIEC_tfma); + assign_map.emplace("cim:WindProtectionIEC.uover", &assign_WindProtectionIEC_uover); + assign_map.emplace("cim:WindProtectionIEC.uunder", &assign_WindProtectionIEC_uunder); } void WindProtectionIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.WindDynamicsLookupTable"), &assign_WindProtectionIEC_WindDynamicsLookupTable)); - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.WindTurbineType1or2IEC"), &assign_WindProtectionIEC_WindTurbineType1or2IEC)); - assign_map.insert(std::make_pair(std::string("cim:WindProtectionIEC.WindTurbineType3or4IEC"), &assign_WindProtectionIEC_WindTurbineType3or4IEC)); + assign_map.emplace("cim:WindProtectionIEC.WindDynamicsLookupTable", &assign_WindProtectionIEC_WindDynamicsLookupTable); + assign_map.emplace("cim:WindProtectionIEC.WindTurbineType1or2IEC", &assign_WindProtectionIEC_WindTurbineType1or2IEC); + assign_map.emplace("cim:WindProtectionIEC.WindTurbineType3or4IEC", &assign_WindProtectionIEC_WindTurbineType3or4IEC); } void WindProtectionIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindProtectionIEC.hpp b/CGMES_3.0.0/WindProtectionIEC.hpp index 114aa146d..781e1b508 100644 --- a/CGMES_3.0.0/WindProtectionIEC.hpp +++ b/CGMES_3.0.0/WindProtectionIEC.hpp @@ -22,9 +22,7 @@ namespace CIMPP class WindTurbineType1or2IEC; class WindTurbineType3or4IEC; - /* - The grid protection model includes protection against over- and under-voltage, and against over- and under-frequency. Reference: IEC 61400-27-1:2015, 5.6.6. - */ + /** \brief The grid protection model includes protection against over- and under-voltage, and against over- and under-frequency. Reference: IEC 61400-27-1:2015, 5.6.6. */ class WindProtectionIEC : public IdentifiedObject { public: @@ -32,16 +30,35 @@ namespace CIMPP WindProtectionIEC(); ~WindProtectionIEC() override; - std::list WindDynamicsLookupTable; /* The wind dynamics lookup table associated with this grid protection model. Default: 0 */ - CIMPP::WindTurbineType1or2IEC* WindTurbineType1or2IEC; /* Wind generator type 1 or type 2 model with which this wind turbine protection model is associated. Default: 0 */ - CIMPP::WindTurbineType3or4IEC* WindTurbineType3or4IEC; /* Wind generator type 3 or type 4 model with which this wind turbine protection model is associated. Default: 0 */ - CIMPP::PU dfimax; /* Maximum rate of change of frequency (<i>dF</i><i><sub>max</sub></i>). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU fover; /* Wind turbine over frequency protection activation threshold (<i>f</i><i><sub>over</sub></i>). It is a project-dependent parameter. Default: nullptr */ - CIMPP::PU funder; /* Wind turbine under frequency protection activation threshold (<i>f</i><i><sub>under</sub></i>). It is a project-dependent parameter. Default: nullptr */ - CIMPP::Boolean mzc; /* Zero crossing measurement mode (<i>Mzc</i>). It is a type-dependent parameter. true = WT protection system uses zero crossings to detect frequency (1 in the IEC model) false = WT protection system does not use zero crossings to detect frequency (0 in the IEC model). Default: false */ - CIMPP::Seconds tfma; /* Time interval of moving average window (<i>TfMA</i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU uover; /* Wind turbine over voltage protection activation threshold (<i>u</i><i><sub>over</sub></i>). It is a project-dependent parameter. Default: nullptr */ - CIMPP::PU uunder; /* Wind turbine under voltage protection activation threshold (<i>u</i><i><sub>under</sub></i>). It is a project-dependent parameter. Default: nullptr */ + /** \brief The wind dynamics lookup table associated with this grid protection model. Default: 0 */ + std::list WindDynamicsLookupTable; + + /** \brief Wind generator type 1 or type 2 model with which this wind turbine protection model is associated. Default: 0 */ + CIMPP::WindTurbineType1or2IEC* WindTurbineType1or2IEC; + + /** \brief Wind generator type 3 or type 4 model with which this wind turbine protection model is associated. Default: 0 */ + CIMPP::WindTurbineType3or4IEC* WindTurbineType3or4IEC; + + /** \brief Maximum rate of change of frequency (<i>dF</i><i><sub>max</sub></i>). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU dfimax; + + /** \brief Wind turbine over frequency protection activation threshold (<i>f</i><i><sub>over</sub></i>). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU fover; + + /** \brief Wind turbine under frequency protection activation threshold (<i>f</i><i><sub>under</sub></i>). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU funder; + + /** \brief Zero crossing measurement mode (<i>Mzc</i>). It is a type-dependent parameter. true = WT protection system uses zero crossings to detect frequency (1 in the IEC model) false = WT protection system does not use zero crossings to detect frequency (0 in the IEC model). Default: false */ + CIMPP::Boolean mzc; + + /** \brief Time interval of moving average window (<i>TfMA</i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ + CIMPP::Seconds tfma; + + /** \brief Wind turbine over voltage protection activation threshold (<i>u</i><i><sub>over</sub></i>). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU uover; + + /** \brief Wind turbine under voltage protection activation threshold (<i>u</i><i><sub>under</sub></i>). It is a project-dependent parameter. Default: nullptr */ + CIMPP::PU uunder; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindQcontrolModeKind.cpp b/CGMES_3.0.0/WindQcontrolModeKind.cpp index 6a621a99b..b55652c55 100644 --- a/CGMES_3.0.0/WindQcontrolModeKind.cpp +++ b/CGMES_3.0.0/WindQcontrolModeKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "WindQcontrolModeKind") + if (EnumSymbol.substr(0, pos) != "WindQcontrolModeKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,27 +50,27 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "voltage") + if (EnumSymbol == "voltage") { rop = WindQcontrolModeKind::voltage; return lop; } - if(EnumSymbol == "reactivePower") + if (EnumSymbol == "reactivePower") { rop = WindQcontrolModeKind::reactivePower; return lop; } - if(EnumSymbol == "openLoopReactivePower") + if (EnumSymbol == "openLoopReactivePower") { rop = WindQcontrolModeKind::openLoopReactivePower; return lop; } - if(EnumSymbol == "powerFactor") + if (EnumSymbol == "powerFactor") { rop = WindQcontrolModeKind::powerFactor; return lop; } - if(EnumSymbol == "openLooppowerFactor") + if (EnumSymbol == "openLooppowerFactor") { rop = WindQcontrolModeKind::openLooppowerFactor; return lop; diff --git a/CGMES_3.0.0/WindQcontrolModeKind.hpp b/CGMES_3.0.0/WindQcontrolModeKind.hpp index fc6dd69b1..1cf862b27 100644 --- a/CGMES_3.0.0/WindQcontrolModeKind.hpp +++ b/CGMES_3.0.0/WindQcontrolModeKind.hpp @@ -9,33 +9,21 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - General wind turbine Q control modes MqG. - */ + /** \brief General wind turbine Q control modes MqG. */ class WindQcontrolModeKind { public: enum WindQcontrolModeKind_ENUM { - /** - * Voltage control (<i>M</i><i><sub>qG</sub></i> equals 0). - */ + /** Voltage control (<i>M</i><i><sub>qG</sub></i> equals 0). */ voltage, - /** - * Reactive power control (<i>M</i><i><sub>qG</sub></i> equals 1). - */ + /** Reactive power control (<i>M</i><i><sub>qG</sub></i> equals 1). */ reactivePower, - /** - * Open loop reactive power control (only used with closed loop at plant level) (<i>M</i><i><sub>qG</sub></i><sub> </sub>equals 2). - */ + /** Open loop reactive power control (only used with closed loop at plant level) (<i>M</i><i><sub>qG</sub></i><sub> </sub>equals 2). */ openLoopReactivePower, - /** - * Power factor control (<i>M</i><i><sub>qG</sub></i><sub> </sub>equals 3). - */ + /** Power factor control (<i>M</i><i><sub>qG</sub></i><sub> </sub>equals 3). */ powerFactor, - /** - * Open loop power factor control (<i>M</i><i><sub>qG</sub></i><sub> </sub>equals 4). - */ + /** Open loop power factor control (<i>M</i><i><sub>qG</sub></i><sub> </sub>equals 4). */ openLooppowerFactor, }; diff --git a/CGMES_3.0.0/WindRefFrameRotIEC.cpp b/CGMES_3.0.0/WindRefFrameRotIEC.cpp index 6d3acaf23..7e1b0f407 100644 --- a/CGMES_3.0.0/WindRefFrameRotIEC.cpp +++ b/CGMES_3.0.0/WindRefFrameRotIEC.cpp @@ -9,14 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "WindTurbineType3or4IEC.hpp" -#include "Seconds.hpp" -#include "PU.hpp" -#include "PU.hpp" using namespace CIMPP; -WindRefFrameRotIEC::WindRefFrameRotIEC() : WindTurbineType3or4IEC(nullptr) {}; -WindRefFrameRotIEC::~WindRefFrameRotIEC() {}; +WindRefFrameRotIEC::WindRefFrameRotIEC() : WindTurbineType3or4IEC(nullptr) {} +WindRefFrameRotIEC::~WindRefFrameRotIEC() {} static const std::list PossibleProfilesForClass = { @@ -46,67 +43,70 @@ WindRefFrameRotIEC::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindRefFrameRotIEC_tpll(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindTurbineType3or4IEC_WindRefFrameRotIEC(BaseClass*, BaseClass*); +bool assign_WindRefFrameRotIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { - if (WindRefFrameRotIEC* element = dynamic_cast(BaseClass_ptr1)) + WindRefFrameRotIEC* element = dynamic_cast(BaseClass_ptr1); + WindTurbineType3or4IEC* element2 = dynamic_cast(BaseClass_ptr2); + if (element != nullptr && element2 != nullptr) { - buffer >> element->tpll; - if (buffer.fail()) - return false; - else - return true; + if (element->WindTurbineType3or4IEC != element2) + { + element->WindTurbineType3or4IEC = element2; + return assign_WindTurbineType3or4IEC_WindRefFrameRotIEC(BaseClass_ptr2, BaseClass_ptr1); + } + return true; } return false; } -bool assign_WindRefFrameRotIEC_upll1(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindRefFrameRotIEC_tpll(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindRefFrameRotIEC* element = dynamic_cast(BaseClass_ptr1)) + WindRefFrameRotIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->upll1; - if (buffer.fail()) - return false; - else + buffer >> element->tpll; + if (!buffer.fail()) + { return true; + } } return false; } -bool assign_WindRefFrameRotIEC_upll2(std::stringstream &buffer, BaseClass* BaseClass_ptr1) +bool assign_WindRefFrameRotIEC_upll1(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { - if (WindRefFrameRotIEC* element = dynamic_cast(BaseClass_ptr1)) + WindRefFrameRotIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { - buffer >> element->upll2; - if (buffer.fail()) - return false; - else + buffer >> element->upll1; + if (!buffer.fail()) + { return true; + } } return false; } - -bool assign_WindTurbineType3or4IEC_WindRefFrameRotIEC(BaseClass*, BaseClass*); -bool assign_WindRefFrameRotIEC_WindTurbineType3or4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) +bool assign_WindRefFrameRotIEC_upll2(std::stringstream& buffer, BaseClass* BaseClass_ptr1) { WindRefFrameRotIEC* element = dynamic_cast(BaseClass_ptr1); - WindTurbineType3or4IEC* element2 = dynamic_cast(BaseClass_ptr2); - if (element != nullptr && element2 != nullptr) + if (element != nullptr) { - if (element->WindTurbineType3or4IEC != element2) + buffer >> element->upll2; + if (!buffer.fail()) { - element->WindTurbineType3or4IEC = element2; - return assign_WindTurbineType3or4IEC_WindRefFrameRotIEC(BaseClass_ptr2, BaseClass_ptr1); + return true; } - return true; } return false; } + bool get_WindRefFrameRotIEC_tpll(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindRefFrameRotIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindRefFrameRotIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->tpll; if (!buffer.str().empty()) @@ -120,7 +120,8 @@ bool get_WindRefFrameRotIEC_tpll(const BaseClass* BaseClass_ptr1, std::stringstr bool get_WindRefFrameRotIEC_upll1(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindRefFrameRotIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindRefFrameRotIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->upll1; if (!buffer.str().empty()) @@ -134,7 +135,8 @@ bool get_WindRefFrameRotIEC_upll1(const BaseClass* BaseClass_ptr1, std::stringst bool get_WindRefFrameRotIEC_upll2(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindRefFrameRotIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindRefFrameRotIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->upll2; if (!buffer.str().empty()) @@ -146,8 +148,6 @@ bool get_WindRefFrameRotIEC_upll2(const BaseClass* BaseClass_ptr1, std::stringst return false; } - - const char WindRefFrameRotIEC::debugName[] = "WindRefFrameRotIEC"; const char* WindRefFrameRotIEC::debugString() const { @@ -156,19 +156,19 @@ const char* WindRefFrameRotIEC::debugString() const void WindRefFrameRotIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindRefFrameRotIEC"), &WindRefFrameRotIEC_factory)); + factory_map.emplace("cim:WindRefFrameRotIEC", &WindRefFrameRotIEC_factory); } void WindRefFrameRotIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindRefFrameRotIEC.tpll"), &assign_WindRefFrameRotIEC_tpll)); - assign_map.insert(std::make_pair(std::string("cim:WindRefFrameRotIEC.upll1"), &assign_WindRefFrameRotIEC_upll1)); - assign_map.insert(std::make_pair(std::string("cim:WindRefFrameRotIEC.upll2"), &assign_WindRefFrameRotIEC_upll2)); + assign_map.emplace("cim:WindRefFrameRotIEC.tpll", &assign_WindRefFrameRotIEC_tpll); + assign_map.emplace("cim:WindRefFrameRotIEC.upll1", &assign_WindRefFrameRotIEC_upll1); + assign_map.emplace("cim:WindRefFrameRotIEC.upll2", &assign_WindRefFrameRotIEC_upll2); } void WindRefFrameRotIEC::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindRefFrameRotIEC.WindTurbineType3or4IEC"), &assign_WindRefFrameRotIEC_WindTurbineType3or4IEC)); + assign_map.emplace("cim:WindRefFrameRotIEC.WindTurbineType3or4IEC", &assign_WindRefFrameRotIEC_WindTurbineType3or4IEC); } void WindRefFrameRotIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindRefFrameRotIEC.hpp b/CGMES_3.0.0/WindRefFrameRotIEC.hpp index 860e34c7f..952d6b968 100644 --- a/CGMES_3.0.0/WindRefFrameRotIEC.hpp +++ b/CGMES_3.0.0/WindRefFrameRotIEC.hpp @@ -19,9 +19,7 @@ namespace CIMPP { class WindTurbineType3or4IEC; - /* - Reference frame rotation model. Reference: IEC 61400-27-1:2015, 5.6.3.5. - */ + /** \brief Reference frame rotation model. Reference: IEC 61400-27-1:2015, 5.6.3.5. */ class WindRefFrameRotIEC : public IdentifiedObject { public: @@ -29,10 +27,17 @@ namespace CIMPP WindRefFrameRotIEC(); ~WindRefFrameRotIEC() override; - CIMPP::WindTurbineType3or4IEC* WindTurbineType3or4IEC; /* Wind turbine type 3 or type 4 model with which this reference frame rotation model is associated. Default: 0 */ - CIMPP::Seconds tpll; /* Time constant for PLL first order filter model (<i>T</i><i><sub>PLL</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU upll1; /* Voltage below which the angle of the voltage is filtered and possibly also frozen (<i>u</i><i><sub>PLL1</sub></i>). It is a type-dependent parameter. Default: nullptr */ - CIMPP::PU upll2; /* Voltage (<i>u</i><i><sub>PLL2</sub></i>) below which the angle of the voltage is frozen if <i>u</i><i><sub>PLL2</sub></i><sub> </sub>is smaller or equal to <i>u</i><i><sub>PLL1</sub></i> . It is a type-dependent parameter. Default: nullptr */ + /** \brief Wind turbine type 3 or type 4 model with which this reference frame rotation model is associated. Default: 0 */ + CIMPP::WindTurbineType3or4IEC* WindTurbineType3or4IEC; + + /** \brief Time constant for PLL first order filter model (<i>T</i><i><sub>PLL</sub></i>) (&gt;= 0). It is a type-dependent parameter. Default: nullptr */ + CIMPP::Seconds tpll; + + /** \brief Voltage below which the angle of the voltage is filtered and possibly also frozen (<i>u</i><i><sub>PLL1</sub></i>). It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU upll1; + + /** \brief Voltage (<i>u</i><i><sub>PLL2</sub></i>) below which the angle of the voltage is frozen if <i>u</i><i><sub>PLL2</sub></i><sub> </sub>is smaller or equal to <i>u</i><i><sub>PLL1</sub></i> . It is a type-dependent parameter. Default: nullptr */ + CIMPP::PU upll2; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindTurbineType1or2Dynamics.cpp b/CGMES_3.0.0/WindTurbineType1or2Dynamics.cpp index 0b1deb098..2d438018b 100644 --- a/CGMES_3.0.0/WindTurbineType1or2Dynamics.cpp +++ b/CGMES_3.0.0/WindTurbineType1or2Dynamics.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindTurbineType1or2Dynamics::WindTurbineType1or2Dynamics() : AsynchronousMachineDynamics(nullptr), RemoteInputSignal(nullptr) {}; -WindTurbineType1or2Dynamics::~WindTurbineType1or2Dynamics() {}; +WindTurbineType1or2Dynamics::WindTurbineType1or2Dynamics() : AsynchronousMachineDynamics(nullptr), RemoteInputSignal(nullptr) {} +WindTurbineType1or2Dynamics::~WindTurbineType1or2Dynamics() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ WindTurbineType1or2Dynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_AsynchronousMachineDynamics_WindTurbineType1or2Dynamics(BaseClass*, BaseClass*); bool assign_WindTurbineType1or2Dynamics_AsynchronousMachineDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_WindTurbineType1or2Dynamics_AsynchronousMachineDynamics(BaseClass* B } return false; } + bool assign_RemoteInputSignal_WindTurbineType1or2Dynamics(BaseClass*, BaseClass*); bool assign_WindTurbineType1or2Dynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_WindTurbineType1or2Dynamics_RemoteInputSignal(BaseClass* BaseClass_p return false; } - bool get_WindTurbineType1or2Dynamics_AsynchronousMachineDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType1or2Dynamics* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType1or2Dynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->AsynchronousMachineDynamics != 0) { @@ -93,7 +92,8 @@ bool get_WindTurbineType1or2Dynamics_AsynchronousMachineDynamics(const BaseClass bool get_WindTurbineType1or2Dynamics_RemoteInputSignal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType1or2Dynamics* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType1or2Dynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->RemoteInputSignal != 0) { @@ -104,7 +104,6 @@ bool get_WindTurbineType1or2Dynamics_RemoteInputSignal(const BaseClass* BaseClas return false; } - const char WindTurbineType1or2Dynamics::debugName[] = "WindTurbineType1or2Dynamics"; const char* WindTurbineType1or2Dynamics::debugString() const { @@ -113,7 +112,7 @@ const char* WindTurbineType1or2Dynamics::debugString() const void WindTurbineType1or2Dynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindTurbineType1or2Dynamics"), &WindTurbineType1or2Dynamics_factory)); + factory_map.emplace("cim:WindTurbineType1or2Dynamics", &WindTurbineType1or2Dynamics_factory); } void WindTurbineType1or2Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void WindTurbineType1or2Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map< void WindTurbineType1or2Dynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType1or2Dynamics.AsynchronousMachineDynamics"), &assign_WindTurbineType1or2Dynamics_AsynchronousMachineDynamics)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType1or2Dynamics.RemoteInputSignal"), &assign_WindTurbineType1or2Dynamics_RemoteInputSignal)); + assign_map.emplace("cim:WindTurbineType1or2Dynamics.AsynchronousMachineDynamics", &assign_WindTurbineType1or2Dynamics_AsynchronousMachineDynamics); + assign_map.emplace("cim:WindTurbineType1or2Dynamics.RemoteInputSignal", &assign_WindTurbineType1or2Dynamics_RemoteInputSignal); } void WindTurbineType1or2Dynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindTurbineType1or2Dynamics.hpp b/CGMES_3.0.0/WindTurbineType1or2Dynamics.hpp index 99ed23f6d..31e5995a0 100644 --- a/CGMES_3.0.0/WindTurbineType1or2Dynamics.hpp +++ b/CGMES_3.0.0/WindTurbineType1or2Dynamics.hpp @@ -18,9 +18,7 @@ namespace CIMPP class AsynchronousMachineDynamics; class RemoteInputSignal; - /* - Parent class supporting relationships to wind turbines type 1 and type 2 and their control models. Generator model for wind turbine of type 1 or type 2 is a standard asynchronous generator model. - */ + /** \brief Parent class supporting relationships to wind turbines type 1 and type 2 and their control models. Generator model for wind turbine of type 1 or type 2 is a standard asynchronous generator model. */ class WindTurbineType1or2Dynamics : public DynamicsFunctionBlock { public: @@ -28,8 +26,11 @@ namespace CIMPP WindTurbineType1or2Dynamics(); ~WindTurbineType1or2Dynamics() override; - CIMPP::AsynchronousMachineDynamics* AsynchronousMachineDynamics; /* Asynchronous machine model with which this wind generator type 1 or type 2 model is associated. Default: 0 */ - CIMPP::RemoteInputSignal* RemoteInputSignal; /* Remote input signal used by this wind generator type 1 or type 2 model. Default: 0 */ + /** \brief Asynchronous machine model with which this wind generator type 1 or type 2 model is associated. Default: 0 */ + CIMPP::AsynchronousMachineDynamics* AsynchronousMachineDynamics; + + /** \brief Remote input signal used by this wind generator type 1 or type 2 model. Default: 0 */ + CIMPP::RemoteInputSignal* RemoteInputSignal; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindTurbineType1or2IEC.cpp b/CGMES_3.0.0/WindTurbineType1or2IEC.cpp index f27dc7912..251c07766 100644 --- a/CGMES_3.0.0/WindTurbineType1or2IEC.cpp +++ b/CGMES_3.0.0/WindTurbineType1or2IEC.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindTurbineType1or2IEC::WindTurbineType1or2IEC() : WindMechIEC(nullptr), WindProtectionIEC(nullptr) {}; -WindTurbineType1or2IEC::~WindTurbineType1or2IEC() {}; +WindTurbineType1or2IEC::WindTurbineType1or2IEC() : WindMechIEC(nullptr), WindProtectionIEC(nullptr) {} +WindTurbineType1or2IEC::~WindTurbineType1or2IEC() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ WindTurbineType1or2IEC::getPossibleProfilesForAttributes() const return map; } - - bool assign_WindMechIEC_WindTurbineType1or2IEC(BaseClass*, BaseClass*); bool assign_WindTurbineType1or2IEC_WindMechIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_WindTurbineType1or2IEC_WindMechIEC(BaseClass* BaseClass_ptr1, BaseCl } return false; } + bool assign_WindProtectionIEC_WindTurbineType1or2IEC(BaseClass*, BaseClass*); bool assign_WindTurbineType1or2IEC_WindProtectionIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_WindTurbineType1or2IEC_WindProtectionIEC(BaseClass* BaseClass_ptr1, return false; } - bool get_WindTurbineType1or2IEC_WindMechIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType1or2IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType1or2IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindMechIEC != 0) { @@ -93,7 +92,8 @@ bool get_WindTurbineType1or2IEC_WindMechIEC(const BaseClass* BaseClass_ptr1, std bool get_WindTurbineType1or2IEC_WindProtectionIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType1or2IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType1or2IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindProtectionIEC != 0) { @@ -104,7 +104,6 @@ bool get_WindTurbineType1or2IEC_WindProtectionIEC(const BaseClass* BaseClass_ptr return false; } - const char WindTurbineType1or2IEC::debugName[] = "WindTurbineType1or2IEC"; const char* WindTurbineType1or2IEC::debugString() const { @@ -113,7 +112,7 @@ const char* WindTurbineType1or2IEC::debugString() const void WindTurbineType1or2IEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindTurbineType1or2IEC"), &WindTurbineType1or2IEC_factory)); + factory_map.emplace("cim:WindTurbineType1or2IEC", &WindTurbineType1or2IEC_factory); } void WindTurbineType1or2IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void WindTurbineType1or2IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType1or2IEC.WindMechIEC"), &assign_WindTurbineType1or2IEC_WindMechIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType1or2IEC.WindProtectionIEC"), &assign_WindTurbineType1or2IEC_WindProtectionIEC)); + assign_map.emplace("cim:WindTurbineType1or2IEC.WindMechIEC", &assign_WindTurbineType1or2IEC_WindMechIEC); + assign_map.emplace("cim:WindTurbineType1or2IEC.WindProtectionIEC", &assign_WindTurbineType1or2IEC_WindProtectionIEC); } void WindTurbineType1or2IEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindTurbineType1or2IEC.hpp b/CGMES_3.0.0/WindTurbineType1or2IEC.hpp index 28b6ef35a..8e9f7f117 100644 --- a/CGMES_3.0.0/WindTurbineType1or2IEC.hpp +++ b/CGMES_3.0.0/WindTurbineType1or2IEC.hpp @@ -18,9 +18,7 @@ namespace CIMPP class WindMechIEC; class WindProtectionIEC; - /* - Parent class supporting relationships to IEC wind turbines type 1 and type 2 including their control models. Generator model for wind turbine of IEC type 1 or type 2 is a standard asynchronous generator model. Reference: IEC 61400-27-1:2015, 5.5.2 and 5.5.3. - */ + /** \brief Parent class supporting relationships to IEC wind turbines type 1 and type 2 including their control models. Generator model for wind turbine of IEC type 1 or type 2 is a standard asynchronous generator model. Reference: IEC 61400-27-1:2015, 5.5.2 and 5.5.3. */ class WindTurbineType1or2IEC : public WindTurbineType1or2Dynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP WindTurbineType1or2IEC(); ~WindTurbineType1or2IEC() override; - CIMPP::WindMechIEC* WindMechIEC; /* Wind mechanical model associated with this wind generator type 1 or type 2 model. Default: 0 */ - CIMPP::WindProtectionIEC* WindProtectionIEC; /* Wind turbune protection model associated with this wind generator type 1 or type 2 model. Default: 0 */ + /** \brief Wind mechanical model associated with this wind generator type 1 or type 2 model. Default: 0 */ + CIMPP::WindMechIEC* WindMechIEC; + + /** \brief Wind turbune protection model associated with this wind generator type 1 or type 2 model. Default: 0 */ + CIMPP::WindProtectionIEC* WindProtectionIEC; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindTurbineType3IEC.cpp b/CGMES_3.0.0/WindTurbineType3IEC.cpp index c0421a01f..6083f1c7e 100644 --- a/CGMES_3.0.0/WindTurbineType3IEC.cpp +++ b/CGMES_3.0.0/WindTurbineType3IEC.cpp @@ -17,8 +17,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindTurbineType3IEC::WindTurbineType3IEC() : WindAeroOneDimIEC(nullptr), WindAeroTwoDimIEC(nullptr), WindContPType3IEC(nullptr), WindContPitchAngleIEC(nullptr), WindGenType3IEC(nullptr), WindMechIEC(nullptr) {}; -WindTurbineType3IEC::~WindTurbineType3IEC() {}; +WindTurbineType3IEC::WindTurbineType3IEC() : WindAeroOneDimIEC(nullptr), WindAeroTwoDimIEC(nullptr), WindContPType3IEC(nullptr), WindContPitchAngleIEC(nullptr), WindGenType3IEC(nullptr), WindMechIEC(nullptr) {} +WindTurbineType3IEC::~WindTurbineType3IEC() {} static const std::list PossibleProfilesForClass = { @@ -50,8 +50,6 @@ WindTurbineType3IEC::getPossibleProfilesForAttributes() const return map; } - - bool assign_WindAeroOneDimIEC_WindTurbineType3IEC(BaseClass*, BaseClass*); bool assign_WindTurbineType3IEC_WindAeroOneDimIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -68,6 +66,7 @@ bool assign_WindTurbineType3IEC_WindAeroOneDimIEC(BaseClass* BaseClass_ptr1, Bas } return false; } + bool assign_WindAeroTwoDimIEC_WindTurbineType3IEC(BaseClass*, BaseClass*); bool assign_WindTurbineType3IEC_WindAeroTwoDimIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -84,6 +83,7 @@ bool assign_WindTurbineType3IEC_WindAeroTwoDimIEC(BaseClass* BaseClass_ptr1, Bas } return false; } + bool assign_WindContPType3IEC_WindTurbineType3IEC(BaseClass*, BaseClass*); bool assign_WindTurbineType3IEC_WindContPType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -100,6 +100,7 @@ bool assign_WindTurbineType3IEC_WindContPType3IEC(BaseClass* BaseClass_ptr1, Bas } return false; } + bool assign_WindContPitchAngleIEC_WindTurbineType3IEC(BaseClass*, BaseClass*); bool assign_WindTurbineType3IEC_WindContPitchAngleIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -116,6 +117,7 @@ bool assign_WindTurbineType3IEC_WindContPitchAngleIEC(BaseClass* BaseClass_ptr1, } return false; } + bool assign_WindGenType3IEC_WindTurbineType3IEC(BaseClass*, BaseClass*); bool assign_WindTurbineType3IEC_WindGenType3IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -132,6 +134,7 @@ bool assign_WindTurbineType3IEC_WindGenType3IEC(BaseClass* BaseClass_ptr1, BaseC } return false; } + bool assign_WindMechIEC_WindTurbineType3IEC(BaseClass*, BaseClass*); bool assign_WindTurbineType3IEC_WindMechIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -149,10 +152,10 @@ bool assign_WindTurbineType3IEC_WindMechIEC(BaseClass* BaseClass_ptr1, BaseClass return false; } - bool get_WindTurbineType3IEC_WindAeroOneDimIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindAeroOneDimIEC != 0) { @@ -165,7 +168,8 @@ bool get_WindTurbineType3IEC_WindAeroOneDimIEC(const BaseClass* BaseClass_ptr1, bool get_WindTurbineType3IEC_WindAeroTwoDimIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindAeroTwoDimIEC != 0) { @@ -178,7 +182,8 @@ bool get_WindTurbineType3IEC_WindAeroTwoDimIEC(const BaseClass* BaseClass_ptr1, bool get_WindTurbineType3IEC_WindContPType3IEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContPType3IEC != 0) { @@ -191,7 +196,8 @@ bool get_WindTurbineType3IEC_WindContPType3IEC(const BaseClass* BaseClass_ptr1, bool get_WindTurbineType3IEC_WindContPitchAngleIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContPitchAngleIEC != 0) { @@ -204,7 +210,8 @@ bool get_WindTurbineType3IEC_WindContPitchAngleIEC(const BaseClass* BaseClass_pt bool get_WindTurbineType3IEC_WindGenType3IEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindGenType3IEC != 0) { @@ -217,7 +224,8 @@ bool get_WindTurbineType3IEC_WindGenType3IEC(const BaseClass* BaseClass_ptr1, st bool get_WindTurbineType3IEC_WindMechIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType3IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindMechIEC != 0) { @@ -228,7 +236,6 @@ bool get_WindTurbineType3IEC_WindMechIEC(const BaseClass* BaseClass_ptr1, std::l return false; } - const char WindTurbineType3IEC::debugName[] = "WindTurbineType3IEC"; const char* WindTurbineType3IEC::debugString() const { @@ -237,7 +244,7 @@ const char* WindTurbineType3IEC::debugString() const void WindTurbineType3IEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindTurbineType3IEC"), &WindTurbineType3IEC_factory)); + factory_map.emplace("cim:WindTurbineType3IEC", &WindTurbineType3IEC_factory); } void WindTurbineType3IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -246,12 +253,12 @@ void WindTurbineType3IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType3IEC.WindAeroOneDimIEC"), &assign_WindTurbineType3IEC_WindAeroOneDimIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType3IEC.WindAeroTwoDimIEC"), &assign_WindTurbineType3IEC_WindAeroTwoDimIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType3IEC.WindContPType3IEC"), &assign_WindTurbineType3IEC_WindContPType3IEC)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType3IEC.WindContPitchAngleIEC"), &assign_WindTurbineType3IEC_WindContPitchAngleIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType3IEC.WindGenType3IEC"), &assign_WindTurbineType3IEC_WindGenType3IEC)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType3IEC.WindMechIEC"), &assign_WindTurbineType3IEC_WindMechIEC)); + assign_map.emplace("cim:WindTurbineType3IEC.WindAeroOneDimIEC", &assign_WindTurbineType3IEC_WindAeroOneDimIEC); + assign_map.emplace("cim:WindTurbineType3IEC.WindAeroTwoDimIEC", &assign_WindTurbineType3IEC_WindAeroTwoDimIEC); + assign_map.emplace("cim:WindTurbineType3IEC.WindContPType3IEC", &assign_WindTurbineType3IEC_WindContPType3IEC); + assign_map.emplace("cim:WindTurbineType3IEC.WindContPitchAngleIEC", &assign_WindTurbineType3IEC_WindContPitchAngleIEC); + assign_map.emplace("cim:WindTurbineType3IEC.WindGenType3IEC", &assign_WindTurbineType3IEC_WindGenType3IEC); + assign_map.emplace("cim:WindTurbineType3IEC.WindMechIEC", &assign_WindTurbineType3IEC_WindMechIEC); } void WindTurbineType3IEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindTurbineType3IEC.hpp b/CGMES_3.0.0/WindTurbineType3IEC.hpp index 12fec805f..4a511f756 100644 --- a/CGMES_3.0.0/WindTurbineType3IEC.hpp +++ b/CGMES_3.0.0/WindTurbineType3IEC.hpp @@ -22,9 +22,7 @@ namespace CIMPP class WindGenType3IEC; class WindMechIEC; - /* - Parent class supporting relationships to IEC wind turbines type 3 including their control models. - */ + /** \brief Parent class supporting relationships to IEC wind turbines type 3 including their control models. */ class WindTurbineType3IEC : public WindTurbineType3or4IEC { public: @@ -32,12 +30,23 @@ namespace CIMPP WindTurbineType3IEC(); ~WindTurbineType3IEC() override; - CIMPP::WindAeroOneDimIEC* WindAeroOneDimIEC; /* Wind aerodynamic model associated with this wind generator type 3 model. Default: 0 */ - CIMPP::WindAeroTwoDimIEC* WindAeroTwoDimIEC; /* Wind aerodynamic model associated with this wind turbine type 3 model. Default: 0 */ - CIMPP::WindContPType3IEC* WindContPType3IEC; /* Wind control P type 3 model associated with this wind turbine type 3 model. Default: 0 */ - CIMPP::WindContPitchAngleIEC* WindContPitchAngleIEC; /* Wind control pitch angle model associated with this wind turbine type 3. Default: 0 */ - CIMPP::WindGenType3IEC* WindGenType3IEC; /* Wind generator type 3 model associated with this wind turbine type 3 model. Default: 0 */ - CIMPP::WindMechIEC* WindMechIEC; /* Wind mechanical model associated with this wind turbine type 3 model. Default: 0 */ + /** \brief Wind aerodynamic model associated with this wind generator type 3 model. Default: 0 */ + CIMPP::WindAeroOneDimIEC* WindAeroOneDimIEC; + + /** \brief Wind aerodynamic model associated with this wind turbine type 3 model. Default: 0 */ + CIMPP::WindAeroTwoDimIEC* WindAeroTwoDimIEC; + + /** \brief Wind control P type 3 model associated with this wind turbine type 3 model. Default: 0 */ + CIMPP::WindContPType3IEC* WindContPType3IEC; + + /** \brief Wind control pitch angle model associated with this wind turbine type 3. Default: 0 */ + CIMPP::WindContPitchAngleIEC* WindContPitchAngleIEC; + + /** \brief Wind generator type 3 model associated with this wind turbine type 3 model. Default: 0 */ + CIMPP::WindGenType3IEC* WindGenType3IEC; + + /** \brief Wind mechanical model associated with this wind turbine type 3 model. Default: 0 */ + CIMPP::WindMechIEC* WindMechIEC; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindTurbineType3or4Dynamics.cpp b/CGMES_3.0.0/WindTurbineType3or4Dynamics.cpp index 46b65fc4f..b453a7075 100644 --- a/CGMES_3.0.0/WindTurbineType3or4Dynamics.cpp +++ b/CGMES_3.0.0/WindTurbineType3or4Dynamics.cpp @@ -14,8 +14,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindTurbineType3or4Dynamics::WindTurbineType3or4Dynamics() : PowerElectronicsConnection(nullptr), RemoteInputSignal(nullptr), WindPlantDynamics(nullptr) {}; -WindTurbineType3or4Dynamics::~WindTurbineType3or4Dynamics() {}; +WindTurbineType3or4Dynamics::WindTurbineType3or4Dynamics() : PowerElectronicsConnection(nullptr), RemoteInputSignal(nullptr), WindPlantDynamics(nullptr) {} +WindTurbineType3or4Dynamics::~WindTurbineType3or4Dynamics() {} static const std::list PossibleProfilesForClass = { @@ -44,8 +44,6 @@ WindTurbineType3or4Dynamics::getPossibleProfilesForAttributes() const return map; } - - bool assign_PowerElectronicsConnection_WindTurbineType3or4Dynamics(BaseClass*, BaseClass*); bool assign_WindTurbineType3or4Dynamics_PowerElectronicsConnection(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -62,6 +60,7 @@ bool assign_WindTurbineType3or4Dynamics_PowerElectronicsConnection(BaseClass* Ba } return false; } + bool assign_RemoteInputSignal_WindTurbineType3or4Dynamics(BaseClass*, BaseClass*); bool assign_WindTurbineType3or4Dynamics_RemoteInputSignal(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -78,6 +77,7 @@ bool assign_WindTurbineType3or4Dynamics_RemoteInputSignal(BaseClass* BaseClass_p } return false; } + bool assign_WindPlantDynamics_WindTurbineType3or4Dynamics(BaseClass*, BaseClass*); bool assign_WindTurbineType3or4Dynamics_WindPlantDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -95,10 +95,10 @@ bool assign_WindTurbineType3or4Dynamics_WindPlantDynamics(BaseClass* BaseClass_p return false; } - bool get_WindTurbineType3or4Dynamics_PowerElectronicsConnection(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType3or4Dynamics* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType3or4Dynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->PowerElectronicsConnection != 0) { @@ -111,7 +111,8 @@ bool get_WindTurbineType3or4Dynamics_PowerElectronicsConnection(const BaseClass* bool get_WindTurbineType3or4Dynamics_RemoteInputSignal(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType3or4Dynamics* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType3or4Dynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->RemoteInputSignal != 0) { @@ -124,7 +125,8 @@ bool get_WindTurbineType3or4Dynamics_RemoteInputSignal(const BaseClass* BaseClas bool get_WindTurbineType3or4Dynamics_WindPlantDynamics(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType3or4Dynamics* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType3or4Dynamics* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindPlantDynamics != 0) { @@ -135,7 +137,6 @@ bool get_WindTurbineType3or4Dynamics_WindPlantDynamics(const BaseClass* BaseClas return false; } - const char WindTurbineType3or4Dynamics::debugName[] = "WindTurbineType3or4Dynamics"; const char* WindTurbineType3or4Dynamics::debugString() const { @@ -144,7 +145,7 @@ const char* WindTurbineType3or4Dynamics::debugString() const void WindTurbineType3or4Dynamics::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4Dynamics"), &WindTurbineType3or4Dynamics_factory)); + factory_map.emplace("cim:WindTurbineType3or4Dynamics", &WindTurbineType3or4Dynamics_factory); } void WindTurbineType3or4Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -153,9 +154,9 @@ void WindTurbineType3or4Dynamics::addPrimitiveAssignFnsToMap(std::unordered_map< void WindTurbineType3or4Dynamics::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4Dynamics.PowerElectronicsConnection"), &assign_WindTurbineType3or4Dynamics_PowerElectronicsConnection)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4Dynamics.RemoteInputSignal"), &assign_WindTurbineType3or4Dynamics_RemoteInputSignal)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4Dynamics.WindPlantDynamics"), &assign_WindTurbineType3or4Dynamics_WindPlantDynamics)); + assign_map.emplace("cim:WindTurbineType3or4Dynamics.PowerElectronicsConnection", &assign_WindTurbineType3or4Dynamics_PowerElectronicsConnection); + assign_map.emplace("cim:WindTurbineType3or4Dynamics.RemoteInputSignal", &assign_WindTurbineType3or4Dynamics_RemoteInputSignal); + assign_map.emplace("cim:WindTurbineType3or4Dynamics.WindPlantDynamics", &assign_WindTurbineType3or4Dynamics_WindPlantDynamics); } void WindTurbineType3or4Dynamics::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindTurbineType3or4Dynamics.hpp b/CGMES_3.0.0/WindTurbineType3or4Dynamics.hpp index c1c735819..a635b105a 100644 --- a/CGMES_3.0.0/WindTurbineType3or4Dynamics.hpp +++ b/CGMES_3.0.0/WindTurbineType3or4Dynamics.hpp @@ -19,9 +19,7 @@ namespace CIMPP class RemoteInputSignal; class WindPlantDynamics; - /* - Parent class supporting relationships to wind turbines type 3 and type 4 and wind plant including their control models. - */ + /** \brief Parent class supporting relationships to wind turbines type 3 and type 4 and wind plant including their control models. */ class WindTurbineType3or4Dynamics : public DynamicsFunctionBlock { public: @@ -29,9 +27,14 @@ namespace CIMPP WindTurbineType3or4Dynamics(); ~WindTurbineType3or4Dynamics() override; - CIMPP::PowerElectronicsConnection* PowerElectronicsConnection; /* The power electronics connection associated with this wind turbine type 3 or type 4 dynamics model. Default: 0 */ - CIMPP::RemoteInputSignal* RemoteInputSignal; /* Remote input signal used by these wind turbine type 3 or type 4 models. Default: 0 */ - CIMPP::WindPlantDynamics* WindPlantDynamics; /* The wind plant with which the wind turbines type 3 or type 4 are associated. Default: 0 */ + /** \brief The power electronics connection associated with this wind turbine type 3 or type 4 dynamics model. Default: 0 */ + CIMPP::PowerElectronicsConnection* PowerElectronicsConnection; + + /** \brief Remote input signal used by these wind turbine type 3 or type 4 models. Default: 0 */ + CIMPP::RemoteInputSignal* RemoteInputSignal; + + /** \brief The wind plant with which the wind turbines type 3 or type 4 are associated. Default: 0 */ + CIMPP::WindPlantDynamics* WindPlantDynamics; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindTurbineType3or4IEC.cpp b/CGMES_3.0.0/WindTurbineType3or4IEC.cpp index 3858d8250..70f2321f4 100644 --- a/CGMES_3.0.0/WindTurbineType3or4IEC.cpp +++ b/CGMES_3.0.0/WindTurbineType3or4IEC.cpp @@ -8,8 +8,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include -#include "WindContQIEC.hpp" #include "WindContCurrLimIEC.hpp" +#include "WindContQIEC.hpp" #include "WindContQLimIEC.hpp" #include "WindContQPQULimIEC.hpp" #include "WindProtectionIEC.hpp" @@ -17,8 +17,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindTurbineType3or4IEC::WindTurbineType3or4IEC() : WIndContQIEC(nullptr), WindContCurrLimIEC(nullptr), WindContQLimIEC(nullptr), WindContQPQULimIEC(nullptr), WindProtectionIEC(nullptr), WindRefFrameRotIEC(nullptr) {}; -WindTurbineType3or4IEC::~WindTurbineType3or4IEC() {}; +WindTurbineType3or4IEC::WindTurbineType3or4IEC() : WIndContQIEC(nullptr), WindContCurrLimIEC(nullptr), WindContQLimIEC(nullptr), WindContQPQULimIEC(nullptr), WindProtectionIEC(nullptr), WindRefFrameRotIEC(nullptr) {} +WindTurbineType3or4IEC::~WindTurbineType3or4IEC() {} static const std::list PossibleProfilesForClass = { @@ -50,8 +50,6 @@ WindTurbineType3or4IEC::getPossibleProfilesForAttributes() const return map; } - - bool assign_WindContQIEC_WindTurbineType3or4IEC(BaseClass*, BaseClass*); bool assign_WindTurbineType3or4IEC_WIndContQIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -68,6 +66,7 @@ bool assign_WindTurbineType3or4IEC_WIndContQIEC(BaseClass* BaseClass_ptr1, BaseC } return false; } + bool assign_WindContCurrLimIEC_WindTurbineType3or4IEC(BaseClass*, BaseClass*); bool assign_WindTurbineType3or4IEC_WindContCurrLimIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -84,6 +83,7 @@ bool assign_WindTurbineType3or4IEC_WindContCurrLimIEC(BaseClass* BaseClass_ptr1, } return false; } + bool assign_WindContQLimIEC_WindTurbineType3or4IEC(BaseClass*, BaseClass*); bool assign_WindTurbineType3or4IEC_WindContQLimIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -100,6 +100,7 @@ bool assign_WindTurbineType3or4IEC_WindContQLimIEC(BaseClass* BaseClass_ptr1, Ba } return false; } + bool assign_WindContQPQULimIEC_WindTurbineType3or4IEC(BaseClass*, BaseClass*); bool assign_WindTurbineType3or4IEC_WindContQPQULimIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -116,6 +117,7 @@ bool assign_WindTurbineType3or4IEC_WindContQPQULimIEC(BaseClass* BaseClass_ptr1, } return false; } + bool assign_WindProtectionIEC_WindTurbineType3or4IEC(BaseClass*, BaseClass*); bool assign_WindTurbineType3or4IEC_WindProtectionIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -132,6 +134,7 @@ bool assign_WindTurbineType3or4IEC_WindProtectionIEC(BaseClass* BaseClass_ptr1, } return false; } + bool assign_WindRefFrameRotIEC_WindTurbineType3or4IEC(BaseClass*, BaseClass*); bool assign_WindTurbineType3or4IEC_WindRefFrameRotIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -149,10 +152,10 @@ bool assign_WindTurbineType3or4IEC_WindRefFrameRotIEC(BaseClass* BaseClass_ptr1, return false; } - bool get_WindTurbineType3or4IEC_WIndContQIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WIndContQIEC != 0) { @@ -165,7 +168,8 @@ bool get_WindTurbineType3or4IEC_WIndContQIEC(const BaseClass* BaseClass_ptr1, st bool get_WindTurbineType3or4IEC_WindContCurrLimIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContCurrLimIEC != 0) { @@ -178,7 +182,8 @@ bool get_WindTurbineType3or4IEC_WindContCurrLimIEC(const BaseClass* BaseClass_pt bool get_WindTurbineType3or4IEC_WindContQLimIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContQLimIEC != 0) { @@ -191,7 +196,8 @@ bool get_WindTurbineType3or4IEC_WindContQLimIEC(const BaseClass* BaseClass_ptr1, bool get_WindTurbineType3or4IEC_WindContQPQULimIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContQPQULimIEC != 0) { @@ -204,7 +210,8 @@ bool get_WindTurbineType3or4IEC_WindContQPQULimIEC(const BaseClass* BaseClass_pt bool get_WindTurbineType3or4IEC_WindProtectionIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindProtectionIEC != 0) { @@ -217,7 +224,8 @@ bool get_WindTurbineType3or4IEC_WindProtectionIEC(const BaseClass* BaseClass_ptr bool get_WindTurbineType3or4IEC_WindRefFrameRotIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType3or4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindRefFrameRotIEC != 0) { @@ -228,7 +236,6 @@ bool get_WindTurbineType3or4IEC_WindRefFrameRotIEC(const BaseClass* BaseClass_pt return false; } - const char WindTurbineType3or4IEC::debugName[] = "WindTurbineType3or4IEC"; const char* WindTurbineType3or4IEC::debugString() const { @@ -237,7 +244,7 @@ const char* WindTurbineType3or4IEC::debugString() const void WindTurbineType3or4IEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4IEC"), &WindTurbineType3or4IEC_factory)); + factory_map.emplace("cim:WindTurbineType3or4IEC", &WindTurbineType3or4IEC_factory); } void WindTurbineType3or4IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -246,12 +253,12 @@ void WindTurbineType3or4IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4IEC.WIndContQIEC"), &assign_WindTurbineType3or4IEC_WIndContQIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4IEC.WindContCurrLimIEC"), &assign_WindTurbineType3or4IEC_WindContCurrLimIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4IEC.WindContQLimIEC"), &assign_WindTurbineType3or4IEC_WindContQLimIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4IEC.WindContQPQULimIEC"), &assign_WindTurbineType3or4IEC_WindContQPQULimIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4IEC.WindProtectionIEC"), &assign_WindTurbineType3or4IEC_WindProtectionIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType3or4IEC.WindRefFrameRotIEC"), &assign_WindTurbineType3or4IEC_WindRefFrameRotIEC)); + assign_map.emplace("cim:WindTurbineType3or4IEC.WIndContQIEC", &assign_WindTurbineType3or4IEC_WIndContQIEC); + assign_map.emplace("cim:WindTurbineType3or4IEC.WindContCurrLimIEC", &assign_WindTurbineType3or4IEC_WindContCurrLimIEC); + assign_map.emplace("cim:WindTurbineType3or4IEC.WindContQLimIEC", &assign_WindTurbineType3or4IEC_WindContQLimIEC); + assign_map.emplace("cim:WindTurbineType3or4IEC.WindContQPQULimIEC", &assign_WindTurbineType3or4IEC_WindContQPQULimIEC); + assign_map.emplace("cim:WindTurbineType3or4IEC.WindProtectionIEC", &assign_WindTurbineType3or4IEC_WindProtectionIEC); + assign_map.emplace("cim:WindTurbineType3or4IEC.WindRefFrameRotIEC", &assign_WindTurbineType3or4IEC_WindRefFrameRotIEC); } void WindTurbineType3or4IEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindTurbineType3or4IEC.hpp b/CGMES_3.0.0/WindTurbineType3or4IEC.hpp index f38075ac0..d72c0b1ab 100644 --- a/CGMES_3.0.0/WindTurbineType3or4IEC.hpp +++ b/CGMES_3.0.0/WindTurbineType3or4IEC.hpp @@ -22,9 +22,7 @@ namespace CIMPP class WindProtectionIEC; class WindRefFrameRotIEC; - /* - Parent class supporting relationships to IEC wind turbines type 3 and type 4 including their control models. - */ + /** \brief Parent class supporting relationships to IEC wind turbines type 3 and type 4 including their control models. */ class WindTurbineType3or4IEC : public WindTurbineType3or4Dynamics { public: @@ -32,12 +30,23 @@ namespace CIMPP WindTurbineType3or4IEC(); ~WindTurbineType3or4IEC() override; - CIMPP::WindContQIEC* WIndContQIEC; /* Wind control Q model associated with this wind turbine type 3 or type 4 model. Default: 0 */ - CIMPP::WindContCurrLimIEC* WindContCurrLimIEC; /* Wind control current limitation model associated with this wind turbine type 3 or type 4 model. Default: 0 */ - CIMPP::WindContQLimIEC* WindContQLimIEC; /* Constant Q limitation model associated with this wind generator type 3 or type 4 model. Default: 0 */ - CIMPP::WindContQPQULimIEC* WindContQPQULimIEC; /* QP and QU limitation model associated with this wind generator type 3 or type 4 model. Default: 0 */ - CIMPP::WindProtectionIEC* WindProtectionIEC; /* Wind turbune protection model associated with this wind generator type 3 or type 4 model. Default: 0 */ - CIMPP::WindRefFrameRotIEC* WindRefFrameRotIEC; /* Reference frame rotation model associated with this wind turbine type 3 or type 4 model. Default: 0 */ + /** \brief Wind control Q model associated with this wind turbine type 3 or type 4 model. Default: 0 */ + CIMPP::WindContQIEC* WIndContQIEC; + + /** \brief Wind control current limitation model associated with this wind turbine type 3 or type 4 model. Default: 0 */ + CIMPP::WindContCurrLimIEC* WindContCurrLimIEC; + + /** \brief Constant Q limitation model associated with this wind generator type 3 or type 4 model. Default: 0 */ + CIMPP::WindContQLimIEC* WindContQLimIEC; + + /** \brief QP and QU limitation model associated with this wind generator type 3 or type 4 model. Default: 0 */ + CIMPP::WindContQPQULimIEC* WindContQPQULimIEC; + + /** \brief Wind turbune protection model associated with this wind generator type 3 or type 4 model. Default: 0 */ + CIMPP::WindProtectionIEC* WindProtectionIEC; + + /** \brief Reference frame rotation model associated with this wind turbine type 3 or type 4 model. Default: 0 */ + CIMPP::WindRefFrameRotIEC* WindRefFrameRotIEC; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindTurbineType4IEC.cpp b/CGMES_3.0.0/WindTurbineType4IEC.cpp index b4f4b3a8c..b8c86f657 100644 --- a/CGMES_3.0.0/WindTurbineType4IEC.cpp +++ b/CGMES_3.0.0/WindTurbineType4IEC.cpp @@ -12,8 +12,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindTurbineType4IEC::WindTurbineType4IEC() : WindGenType3aIEC(nullptr) {}; -WindTurbineType4IEC::~WindTurbineType4IEC() {}; +WindTurbineType4IEC::WindTurbineType4IEC() : WindGenType3aIEC(nullptr) {} +WindTurbineType4IEC::~WindTurbineType4IEC() {} static const std::list PossibleProfilesForClass = { @@ -40,8 +40,6 @@ WindTurbineType4IEC::getPossibleProfilesForAttributes() const return map; } - - bool assign_WindGenType3aIEC_WindTurbineType4IEC(BaseClass*, BaseClass*); bool assign_WindTurbineType4IEC_WindGenType3aIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -59,10 +57,10 @@ bool assign_WindTurbineType4IEC_WindGenType3aIEC(BaseClass* BaseClass_ptr1, Base return false; } - bool get_WindTurbineType4IEC_WindGenType3aIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType4IEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType4IEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindGenType3aIEC != 0) { @@ -73,7 +71,6 @@ bool get_WindTurbineType4IEC_WindGenType3aIEC(const BaseClass* BaseClass_ptr1, s return false; } - const char WindTurbineType4IEC::debugName[] = "WindTurbineType4IEC"; const char* WindTurbineType4IEC::debugString() const { @@ -82,7 +79,7 @@ const char* WindTurbineType4IEC::debugString() const void WindTurbineType4IEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindTurbineType4IEC"), &WindTurbineType4IEC_factory)); + factory_map.emplace("cim:WindTurbineType4IEC", &WindTurbineType4IEC_factory); } void WindTurbineType4IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -91,7 +88,7 @@ void WindTurbineType4IEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType4IEC.WindGenType3aIEC"), &assign_WindTurbineType4IEC_WindGenType3aIEC)); + assign_map.emplace("cim:WindTurbineType4IEC.WindGenType3aIEC", &assign_WindTurbineType4IEC_WindGenType3aIEC); } void WindTurbineType4IEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindTurbineType4IEC.hpp b/CGMES_3.0.0/WindTurbineType4IEC.hpp index 87832a342..1ead86cbe 100644 --- a/CGMES_3.0.0/WindTurbineType4IEC.hpp +++ b/CGMES_3.0.0/WindTurbineType4IEC.hpp @@ -17,9 +17,7 @@ namespace CIMPP { class WindGenType3aIEC; - /* - Parent class supporting relationships to IEC wind turbines type 4 including their control models. - */ + /** \brief Parent class supporting relationships to IEC wind turbines type 4 including their control models. */ class WindTurbineType4IEC : public WindTurbineType3or4IEC { public: @@ -27,7 +25,8 @@ namespace CIMPP WindTurbineType4IEC(); ~WindTurbineType4IEC() override; - CIMPP::WindGenType3aIEC* WindGenType3aIEC; /* Wind generator type 3A model associated with this wind turbine type 4 model. Default: 0 */ + /** \brief Wind generator type 3A model associated with this wind turbine type 4 model. Default: 0 */ + CIMPP::WindGenType3aIEC* WindGenType3aIEC; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindTurbineType4aIEC.cpp b/CGMES_3.0.0/WindTurbineType4aIEC.cpp index 6dc1f75cd..d6dda8c46 100644 --- a/CGMES_3.0.0/WindTurbineType4aIEC.cpp +++ b/CGMES_3.0.0/WindTurbineType4aIEC.cpp @@ -13,8 +13,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindTurbineType4aIEC::WindTurbineType4aIEC() : WindContPType4aIEC(nullptr), WindGenType4IEC(nullptr) {}; -WindTurbineType4aIEC::~WindTurbineType4aIEC() {}; +WindTurbineType4aIEC::WindTurbineType4aIEC() : WindContPType4aIEC(nullptr), WindGenType4IEC(nullptr) {} +WindTurbineType4aIEC::~WindTurbineType4aIEC() {} static const std::list PossibleProfilesForClass = { @@ -42,8 +42,6 @@ WindTurbineType4aIEC::getPossibleProfilesForAttributes() const return map; } - - bool assign_WindContPType4aIEC_WindTurbineType4aIEC(BaseClass*, BaseClass*); bool assign_WindTurbineType4aIEC_WindContPType4aIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -60,6 +58,7 @@ bool assign_WindTurbineType4aIEC_WindContPType4aIEC(BaseClass* BaseClass_ptr1, B } return false; } + bool assign_WindGenType4IEC_WindTurbineType4aIEC(BaseClass*, BaseClass*); bool assign_WindTurbineType4aIEC_WindGenType4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -77,10 +76,10 @@ bool assign_WindTurbineType4aIEC_WindGenType4IEC(BaseClass* BaseClass_ptr1, Base return false; } - bool get_WindTurbineType4aIEC_WindContPType4aIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType4aIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType4aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContPType4aIEC != 0) { @@ -93,7 +92,8 @@ bool get_WindTurbineType4aIEC_WindContPType4aIEC(const BaseClass* BaseClass_ptr1 bool get_WindTurbineType4aIEC_WindGenType4IEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType4aIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType4aIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindGenType4IEC != 0) { @@ -104,7 +104,6 @@ bool get_WindTurbineType4aIEC_WindGenType4IEC(const BaseClass* BaseClass_ptr1, s return false; } - const char WindTurbineType4aIEC::debugName[] = "WindTurbineType4aIEC"; const char* WindTurbineType4aIEC::debugString() const { @@ -113,7 +112,7 @@ const char* WindTurbineType4aIEC::debugString() const void WindTurbineType4aIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindTurbineType4aIEC"), &WindTurbineType4aIEC_factory)); + factory_map.emplace("cim:WindTurbineType4aIEC", &WindTurbineType4aIEC_factory); } void WindTurbineType4aIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -122,8 +121,8 @@ void WindTurbineType4aIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType4aIEC.WindContPType4aIEC"), &assign_WindTurbineType4aIEC_WindContPType4aIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType4aIEC.WindGenType4IEC"), &assign_WindTurbineType4aIEC_WindGenType4IEC)); + assign_map.emplace("cim:WindTurbineType4aIEC.WindContPType4aIEC", &assign_WindTurbineType4aIEC_WindContPType4aIEC); + assign_map.emplace("cim:WindTurbineType4aIEC.WindGenType4IEC", &assign_WindTurbineType4aIEC_WindGenType4IEC); } void WindTurbineType4aIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindTurbineType4aIEC.hpp b/CGMES_3.0.0/WindTurbineType4aIEC.hpp index f53092178..02f440eff 100644 --- a/CGMES_3.0.0/WindTurbineType4aIEC.hpp +++ b/CGMES_3.0.0/WindTurbineType4aIEC.hpp @@ -18,9 +18,7 @@ namespace CIMPP class WindContPType4aIEC; class WindGenType4IEC; - /* - Wind turbine IEC type 4A. Reference: IEC 61400-27-1:2015, 5.5.5.2. - */ + /** \brief Wind turbine IEC type 4A. Reference: IEC 61400-27-1:2015, 5.5.5.2. */ class WindTurbineType4aIEC : public WindTurbineType4IEC { public: @@ -28,8 +26,11 @@ namespace CIMPP WindTurbineType4aIEC(); ~WindTurbineType4aIEC() override; - CIMPP::WindContPType4aIEC* WindContPType4aIEC; /* Wind control P type 4A model associated with this wind turbine type 4A model. Default: 0 */ - CIMPP::WindGenType4IEC* WindGenType4IEC; /* Wind generator type 4 model associated with this wind turbine type 4A model. Default: 0 */ + /** \brief Wind control P type 4A model associated with this wind turbine type 4A model. Default: 0 */ + CIMPP::WindContPType4aIEC* WindContPType4aIEC; + + /** \brief Wind generator type 4 model associated with this wind turbine type 4A model. Default: 0 */ + CIMPP::WindGenType4IEC* WindGenType4IEC; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindTurbineType4bIEC.cpp b/CGMES_3.0.0/WindTurbineType4bIEC.cpp index 504a453cb..9ac4e6046 100644 --- a/CGMES_3.0.0/WindTurbineType4bIEC.cpp +++ b/CGMES_3.0.0/WindTurbineType4bIEC.cpp @@ -14,8 +14,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WindTurbineType4bIEC::WindTurbineType4bIEC() : WindContPType4bIEC(nullptr), WindGenType4IEC(nullptr), WindMechIEC(nullptr) {}; -WindTurbineType4bIEC::~WindTurbineType4bIEC() {}; +WindTurbineType4bIEC::WindTurbineType4bIEC() : WindContPType4bIEC(nullptr), WindGenType4IEC(nullptr), WindMechIEC(nullptr) {} +WindTurbineType4bIEC::~WindTurbineType4bIEC() {} static const std::list PossibleProfilesForClass = { @@ -44,8 +44,6 @@ WindTurbineType4bIEC::getPossibleProfilesForAttributes() const return map; } - - bool assign_WindContPType4bIEC_WindTurbineType4bIEC(BaseClass*, BaseClass*); bool assign_WindTurbineType4bIEC_WindContPType4bIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -62,6 +60,7 @@ bool assign_WindTurbineType4bIEC_WindContPType4bIEC(BaseClass* BaseClass_ptr1, B } return false; } + bool assign_WindGenType4IEC_WindTurbineType4bIEC(BaseClass*, BaseClass*); bool assign_WindTurbineType4bIEC_WindGenType4IEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -78,6 +77,7 @@ bool assign_WindTurbineType4bIEC_WindGenType4IEC(BaseClass* BaseClass_ptr1, Base } return false; } + bool assign_WindMechIEC_WindTurbineType4bIEC(BaseClass*, BaseClass*); bool assign_WindTurbineType4bIEC_WindMechIEC(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -95,10 +95,10 @@ bool assign_WindTurbineType4bIEC_WindMechIEC(BaseClass* BaseClass_ptr1, BaseClas return false; } - bool get_WindTurbineType4bIEC_WindContPType4bIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindContPType4bIEC != 0) { @@ -111,7 +111,8 @@ bool get_WindTurbineType4bIEC_WindContPType4bIEC(const BaseClass* BaseClass_ptr1 bool get_WindTurbineType4bIEC_WindGenType4IEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindGenType4IEC != 0) { @@ -124,7 +125,8 @@ bool get_WindTurbineType4bIEC_WindGenType4IEC(const BaseClass* BaseClass_ptr1, s bool get_WindTurbineType4bIEC_WindMechIEC(const BaseClass* BaseClass_ptr1, std::list& BaseClass_list) { - if (const WindTurbineType4bIEC* element = dynamic_cast(BaseClass_ptr1)) + const WindTurbineType4bIEC* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { if (element->WindMechIEC != 0) { @@ -135,7 +137,6 @@ bool get_WindTurbineType4bIEC_WindMechIEC(const BaseClass* BaseClass_ptr1, std:: return false; } - const char WindTurbineType4bIEC::debugName[] = "WindTurbineType4bIEC"; const char* WindTurbineType4bIEC::debugString() const { @@ -144,7 +145,7 @@ const char* WindTurbineType4bIEC::debugString() const void WindTurbineType4bIEC::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindTurbineType4bIEC"), &WindTurbineType4bIEC_factory)); + factory_map.emplace("cim:WindTurbineType4bIEC", &WindTurbineType4bIEC_factory); } void WindTurbineType4bIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) @@ -153,9 +154,9 @@ void WindTurbineType4bIEC::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType4bIEC.WindContPType4bIEC"), &assign_WindTurbineType4bIEC_WindContPType4bIEC)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType4bIEC.WindGenType4IEC"), &assign_WindTurbineType4bIEC_WindGenType4IEC)); - assign_map.insert(std::make_pair(std::string("cim:WindTurbineType4bIEC.WindMechIEC"), &assign_WindTurbineType4bIEC_WindMechIEC)); + assign_map.emplace("cim:WindTurbineType4bIEC.WindContPType4bIEC", &assign_WindTurbineType4bIEC_WindContPType4bIEC); + assign_map.emplace("cim:WindTurbineType4bIEC.WindGenType4IEC", &assign_WindTurbineType4bIEC_WindGenType4IEC); + assign_map.emplace("cim:WindTurbineType4bIEC.WindMechIEC", &assign_WindTurbineType4bIEC_WindMechIEC); } void WindTurbineType4bIEC::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindTurbineType4bIEC.hpp b/CGMES_3.0.0/WindTurbineType4bIEC.hpp index f7bfeb986..751928516 100644 --- a/CGMES_3.0.0/WindTurbineType4bIEC.hpp +++ b/CGMES_3.0.0/WindTurbineType4bIEC.hpp @@ -19,9 +19,7 @@ namespace CIMPP class WindGenType4IEC; class WindMechIEC; - /* - Wind turbine IEC type 4B. Reference: IEC 61400-27-1:2015, 5.5.5.3. - */ + /** \brief Wind turbine IEC type 4B. Reference: IEC 61400-27-1:2015, 5.5.5.3. */ class WindTurbineType4bIEC : public WindTurbineType4IEC { public: @@ -29,9 +27,14 @@ namespace CIMPP WindTurbineType4bIEC(); ~WindTurbineType4bIEC() override; - CIMPP::WindContPType4bIEC* WindContPType4bIEC; /* Wind control P type 4B model associated with this wind turbine type 4B model. Default: 0 */ - CIMPP::WindGenType4IEC* WindGenType4IEC; /* Wind generator type 4 model associated with this wind turbine type 4B model. Default: 0 */ - CIMPP::WindMechIEC* WindMechIEC; /* Wind mechanical model associated with this wind turbine type 4B model. Default: 0 */ + /** \brief Wind control P type 4B model associated with this wind turbine type 4B model. Default: 0 */ + CIMPP::WindContPType4bIEC* WindContPType4bIEC; + + /** \brief Wind generator type 4 model associated with this wind turbine type 4B model. Default: 0 */ + CIMPP::WindGenType4IEC* WindGenType4IEC; + + /** \brief Wind mechanical model associated with this wind turbine type 4B model. Default: 0 */ + CIMPP::WindMechIEC* WindMechIEC; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindType1or2UserDefined.cpp b/CGMES_3.0.0/WindType1or2UserDefined.cpp index 9a6a86bd9..be1daa797 100644 --- a/CGMES_3.0.0/WindType1or2UserDefined.cpp +++ b/CGMES_3.0.0/WindType1or2UserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -WindType1or2UserDefined::WindType1or2UserDefined() {}; -WindType1or2UserDefined::~WindType1or2UserDefined() {}; +WindType1or2UserDefined::WindType1or2UserDefined() {} +WindType1or2UserDefined::~WindType1or2UserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ WindType1or2UserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindType1or2UserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindType1or2UserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_WindType1or2UserDefined(BaseClass*, BaseClass*); bool assign_WindType1or2UserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_WindType1or2UserDefined_ProprietaryParameterDynamics(BaseClass* Base return false; } +bool assign_WindType1or2UserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + WindType1or2UserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_WindType1or2UserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindType1or2UserDefined* element = dynamic_cast(BaseClass_ptr1)) + const WindType1or2UserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_WindType1or2UserDefined_proprietary(const BaseClass* BaseClass_ptr1, st return false; } - - const char WindType1or2UserDefined::debugName[] = "WindType1or2UserDefined"; const char* WindType1or2UserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* WindType1or2UserDefined::debugString() const void WindType1or2UserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindType1or2UserDefined"), &WindType1or2UserDefined_factory)); + factory_map.emplace("cim:WindType1or2UserDefined", &WindType1or2UserDefined_factory); } void WindType1or2UserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindType1or2UserDefined.proprietary"), &assign_WindType1or2UserDefined_proprietary)); + assign_map.emplace("cim:WindType1or2UserDefined.proprietary", &assign_WindType1or2UserDefined_proprietary); } void WindType1or2UserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindType1or2UserDefined.ProprietaryParameterDynamics"), &assign_WindType1or2UserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:WindType1or2UserDefined.ProprietaryParameterDynamics", &assign_WindType1or2UserDefined_ProprietaryParameterDynamics); } void WindType1or2UserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindType1or2UserDefined.hpp b/CGMES_3.0.0/WindType1or2UserDefined.hpp index fee1a5904..81d758773 100644 --- a/CGMES_3.0.0/WindType1or2UserDefined.hpp +++ b/CGMES_3.0.0/WindType1or2UserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Wind type 1 or type 2 function block whose dynamic behaviour is described by a user-defined model. - */ + /** \brief Wind type 1 or type 2 function block whose dynamic behaviour is described by a user-defined model. */ class WindType1or2UserDefined : public WindTurbineType1or2Dynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP WindType1or2UserDefined(); ~WindType1or2UserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindType3or4UserDefined.cpp b/CGMES_3.0.0/WindType3or4UserDefined.cpp index d749efa43..300908ba4 100644 --- a/CGMES_3.0.0/WindType3or4UserDefined.cpp +++ b/CGMES_3.0.0/WindType3or4UserDefined.cpp @@ -9,12 +9,11 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim #include #include "ProprietaryParameterDynamics.hpp" -#include "Boolean.hpp" using namespace CIMPP; -WindType3or4UserDefined::WindType3or4UserDefined() {}; -WindType3or4UserDefined::~WindType3or4UserDefined() {}; +WindType3or4UserDefined::WindType3or4UserDefined() {} +WindType3or4UserDefined::~WindType3or4UserDefined() {} static const std::list PossibleProfilesForClass = { @@ -42,21 +41,6 @@ WindType3or4UserDefined::getPossibleProfilesForAttributes() const return map; } - -bool assign_WindType3or4UserDefined_proprietary(std::stringstream &buffer, BaseClass* BaseClass_ptr1) -{ - if (WindType3or4UserDefined* element = dynamic_cast(BaseClass_ptr1)) - { - buffer >> element->proprietary; - if (buffer.fail()) - return false; - else - return true; - } - return false; -} - - bool assign_ProprietaryParameterDynamics_WindType3or4UserDefined(BaseClass*, BaseClass*); bool assign_WindType3or4UserDefined_ProprietaryParameterDynamics(BaseClass* BaseClass_ptr1, BaseClass* BaseClass_ptr2) { @@ -74,9 +58,25 @@ bool assign_WindType3or4UserDefined_ProprietaryParameterDynamics(BaseClass* Base return false; } +bool assign_WindType3or4UserDefined_proprietary(std::stringstream& buffer, BaseClass* BaseClass_ptr1) +{ + WindType3or4UserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) + { + buffer >> element->proprietary; + if (!buffer.fail()) + { + return true; + } + } + return false; +} + + bool get_WindType3or4UserDefined_proprietary(const BaseClass* BaseClass_ptr1, std::stringstream& buffer) { - if (const WindType3or4UserDefined* element = dynamic_cast(BaseClass_ptr1)) + const WindType3or4UserDefined* element = dynamic_cast(BaseClass_ptr1); + if (element != nullptr) { buffer << element->proprietary; if (!buffer.str().empty()) @@ -88,8 +88,6 @@ bool get_WindType3or4UserDefined_proprietary(const BaseClass* BaseClass_ptr1, st return false; } - - const char WindType3or4UserDefined::debugName[] = "WindType3or4UserDefined"; const char* WindType3or4UserDefined::debugString() const { @@ -98,17 +96,17 @@ const char* WindType3or4UserDefined::debugString() const void WindType3or4UserDefined::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WindType3or4UserDefined"), &WindType3or4UserDefined_factory)); + factory_map.emplace("cim:WindType3or4UserDefined", &WindType3or4UserDefined_factory); } void WindType3or4UserDefined::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindType3or4UserDefined.proprietary"), &assign_WindType3or4UserDefined_proprietary)); + assign_map.emplace("cim:WindType3or4UserDefined.proprietary", &assign_WindType3or4UserDefined_proprietary); } void WindType3or4UserDefined::addClassAssignFnsToMap(std::unordered_map& assign_map) { - assign_map.insert(std::make_pair(std::string("cim:WindType3or4UserDefined.ProprietaryParameterDynamics"), &assign_WindType3or4UserDefined_ProprietaryParameterDynamics)); + assign_map.emplace("cim:WindType3or4UserDefined.ProprietaryParameterDynamics", &assign_WindType3or4UserDefined_ProprietaryParameterDynamics); } void WindType3or4UserDefined::addPrimitiveGetFnsToMap(std::map& get_map) const diff --git a/CGMES_3.0.0/WindType3or4UserDefined.hpp b/CGMES_3.0.0/WindType3or4UserDefined.hpp index 8dd9f1aac..e5b1b41f2 100644 --- a/CGMES_3.0.0/WindType3or4UserDefined.hpp +++ b/CGMES_3.0.0/WindType3or4UserDefined.hpp @@ -18,9 +18,7 @@ namespace CIMPP { class ProprietaryParameterDynamics; - /* - Wind type 3 or type 4 function block whose dynamic behaviour is described by a user-defined model. - */ + /** \brief Wind type 3 or type 4 function block whose dynamic behaviour is described by a user-defined model. */ class WindType3or4UserDefined : public WindTurbineType3or4Dynamics { public: @@ -28,8 +26,11 @@ namespace CIMPP WindType3or4UserDefined(); ~WindType3or4UserDefined() override; - std::list ProprietaryParameterDynamics; /* Parameter of this proprietary user-defined model. Default: 0 */ - CIMPP::Boolean proprietary; /* Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + /** \brief Parameter of this proprietary user-defined model. Default: 0 */ + std::list ProprietaryParameterDynamics; + + /** \brief Behaviour is based on a proprietary model as opposed to a detailed model. true = user-defined model is proprietary with behaviour mutually understood by sending and receiving applications and parameters passed as general attributes false = user-defined model is explicitly defined in terms of control blocks and their input and output signals. Default: false */ + CIMPP::Boolean proprietary; static const char debugName[]; const char* debugString() const override; diff --git a/CGMES_3.0.0/WindUVRTQcontrolModeKind.cpp b/CGMES_3.0.0/WindUVRTQcontrolModeKind.cpp index ff0846d8f..6db93d5e0 100644 --- a/CGMES_3.0.0/WindUVRTQcontrolModeKind.cpp +++ b/CGMES_3.0.0/WindUVRTQcontrolModeKind.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "WindUVRTQcontrolModeKind") + if (EnumSymbol.substr(0, pos) != "WindUVRTQcontrolModeKind") { lop.setstate(std::ios::failbit); return lop; @@ -50,17 +50,17 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "mode0") + if (EnumSymbol == "mode0") { rop = WindUVRTQcontrolModeKind::mode0; return lop; } - if(EnumSymbol == "mode1") + if (EnumSymbol == "mode1") { rop = WindUVRTQcontrolModeKind::mode1; return lop; } - if(EnumSymbol == "mode2") + if (EnumSymbol == "mode2") { rop = WindUVRTQcontrolModeKind::mode2; return lop; diff --git a/CGMES_3.0.0/WindUVRTQcontrolModeKind.hpp b/CGMES_3.0.0/WindUVRTQcontrolModeKind.hpp index 4646437a2..602dd2d3c 100644 --- a/CGMES_3.0.0/WindUVRTQcontrolModeKind.hpp +++ b/CGMES_3.0.0/WindUVRTQcontrolModeKind.hpp @@ -9,25 +9,17 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - UVRT Q control modes MqUVRT. - */ + /** \brief UVRT Q control modes MqUVRT. */ class WindUVRTQcontrolModeKind { public: enum WindUVRTQcontrolModeKind_ENUM { - /** - * Voltage-dependent reactive current injection (<i>M</i><i><sub>qUVRT</sub></i> <sub> </sub>equals 0). - */ + /** Voltage-dependent reactive current injection (<i>M</i><i><sub>qUVRT</sub></i> <sub> </sub>equals 0). */ mode0, - /** - * Reactive current injection controlled as the pre-fault value plus an additional voltage dependent reactive current injection (<i>M</i><i><sub>qUVRT</sub></i> equals 1). - */ + /** Reactive current injection controlled as the pre-fault value plus an additional voltage dependent reactive current injection (<i>M</i><i><sub>qUVRT</sub></i> equals 1). */ mode1, - /** - * Reactive current injection controlled as the pre-fault value plus an additional voltage-dependent reactive current injection during fault, and as the pre-fault value plus an additional constant reactive current injection post fault (<i>M</i><i><sub>qUVRT</sub></i><sub> </sub>equals 2). - */ + /** Reactive current injection controlled as the pre-fault value plus an additional voltage-dependent reactive current injection during fault, and as the pre-fault value plus an additional constant reactive current injection post fault (<i>M</i><i><sub>qUVRT</sub></i><sub> </sub>equals 2). */ mode2, }; diff --git a/CGMES_3.0.0/WindingConnection.cpp b/CGMES_3.0.0/WindingConnection.cpp index 498dcbe94..90e8fc5af 100644 --- a/CGMES_3.0.0/WindingConnection.cpp +++ b/CGMES_3.0.0/WindingConnection.cpp @@ -42,7 +42,7 @@ namespace CIMPP lop >> EnumSymbol; size_t pos = EnumSymbol.find_first_of('.'); - if(EnumSymbol.substr(0, pos) != "WindingConnection") + if (EnumSymbol.substr(0, pos) != "WindingConnection") { lop.setstate(std::ios::failbit); return lop; @@ -50,37 +50,37 @@ namespace CIMPP EnumSymbol = EnumSymbol.substr(pos + 1); - if(EnumSymbol == "D") + if (EnumSymbol == "D") { rop = WindingConnection::D; return lop; } - if(EnumSymbol == "Y") + if (EnumSymbol == "Y") { rop = WindingConnection::Y; return lop; } - if(EnumSymbol == "Z") + if (EnumSymbol == "Z") { rop = WindingConnection::Z; return lop; } - if(EnumSymbol == "Yn") + if (EnumSymbol == "Yn") { rop = WindingConnection::Yn; return lop; } - if(EnumSymbol == "Zn") + if (EnumSymbol == "Zn") { rop = WindingConnection::Zn; return lop; } - if(EnumSymbol == "A") + if (EnumSymbol == "A") { rop = WindingConnection::A; return lop; } - if(EnumSymbol == "I") + if (EnumSymbol == "I") { rop = WindingConnection::I; return lop; diff --git a/CGMES_3.0.0/WindingConnection.hpp b/CGMES_3.0.0/WindingConnection.hpp index 8e4cee0f7..9f5d4d97e 100644 --- a/CGMES_3.0.0/WindingConnection.hpp +++ b/CGMES_3.0.0/WindingConnection.hpp @@ -9,41 +9,25 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Winding connection type. - */ + /** \brief Winding connection type. */ class WindingConnection { public: enum WindingConnection_ENUM { - /** - * Delta. - */ + /** Delta. */ D, - /** - * Wye. - */ + /** Wye. */ Y, - /** - * ZigZag. - */ + /** ZigZag. */ Z, - /** - * Wye, with neutral brought out for grounding. - */ + /** Wye, with neutral brought out for grounding. */ Yn, - /** - * ZigZag, with neutral brought out for grounding. - */ + /** ZigZag, with neutral brought out for grounding. */ Zn, - /** - * Autotransformer common winding. - */ + /** Autotransformer common winding. */ A, - /** - * Independent winding, for single-phase connections. - */ + /** Independent winding, for single-phase connections. */ I, }; diff --git a/CGMES_3.0.0/WorkLocation.cpp b/CGMES_3.0.0/WorkLocation.cpp index cccb25c66..e5a958f85 100644 --- a/CGMES_3.0.0/WorkLocation.cpp +++ b/CGMES_3.0.0/WorkLocation.cpp @@ -11,8 +11,8 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim using namespace CIMPP; -WorkLocation::WorkLocation() {}; -WorkLocation::~WorkLocation() {}; +WorkLocation::WorkLocation() {} +WorkLocation::~WorkLocation() {} static const std::list PossibleProfilesForClass = { @@ -38,11 +38,6 @@ WorkLocation::getPossibleProfilesForAttributes() const return map; } - - - - - const char WorkLocation::debugName[] = "WorkLocation"; const char* WorkLocation::debugString() const { @@ -51,7 +46,7 @@ const char* WorkLocation::debugString() const void WorkLocation::addConstructToMap(std::unordered_map& factory_map) { - factory_map.insert(std::make_pair(std::string("cim:WorkLocation"), &WorkLocation_factory)); + factory_map.emplace("cim:WorkLocation", &WorkLocation_factory); } void WorkLocation::addPrimitiveAssignFnsToMap(std::unordered_map& assign_map) diff --git a/CGMES_3.0.0/WorkLocation.hpp b/CGMES_3.0.0/WorkLocation.hpp index 50b4f644b..b47676a48 100644 --- a/CGMES_3.0.0/WorkLocation.hpp +++ b/CGMES_3.0.0/WorkLocation.hpp @@ -16,9 +16,7 @@ Generated from the CGMES files via cimgen: https://github.com/sogno-platform/cim namespace CIMPP { - /* - Information about a particular location for various forms of work. - */ + /** \brief Information about a particular location for various forms of work. */ class WorkLocation : public Location { public: @@ -26,7 +24,6 @@ namespace CIMPP WorkLocation(); ~WorkLocation() override; - static const char debugName[]; const char* debugString() const override; diff --git a/src/CIMWriter.cpp b/src/CIMWriter.cpp index 12551333d..569496696 100644 --- a/src/CIMWriter.cpp +++ b/src/CIMWriter.cpp @@ -10,6 +10,7 @@ #include #include "CGMESProfile.hpp" +#include "CimConstants.hpp" #include "BaseClass.hpp" #include "gettercache.hpp" #include "profilecache.hpp" @@ -42,9 +43,9 @@ bool CIMWriter::writeCim(std::ostream& rdf, const std::vector& objLi const std::map& classProfileMap) { int objectsCount = 0; - static char rdfURL[] = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"; - static auto cimURL = getCimNamespace(); - static char mdURL[] = "http://iec.ch/TC57/61970-552/ModelDescription/1#"; + static const auto& rdfURL = NamespaceMap.at("rdf"); + static const auto& cimURL = NamespaceMap.at("cim"); + static const auto& mdURL = NamespaceMap.at("md"); rdf << "" << std::endl; rdf << "